/home/lnzliplg/www/lib.tar
to-batch-syntax.js000064400000003100151730672220010126 0ustar00exports.replaceDollarWithPercentPair = replaceDollarWithPercentPair
exports.convertToSetCommand = convertToSetCommand
exports.convertToSetCommands = convertToSetCommands

function convertToSetCommand(key, value) {
    var line = ""
    key = key || ""
    key = key.trim()
    value = value || ""
    value = value.trim()
    if(key && value && value.length > 0) {
        line = "@SET " + key + "=" + replaceDollarWithPercentPair(value) + "\r\n"
    }
    return line
}

function extractVariableValuePairs(declarations) {
    var pairs = {}
    declarations.map(function(declaration) {
        var split = declaration.split("=")
        pairs[split[0]]=split[1]
    })
    return pairs
}

function convertToSetCommands(variableString) {
    var variableValuePairs = extractVariableValuePairs(variableString.split(" "))
    var variableDeclarationsAsBatch = ""
    Object.keys(variableValuePairs).forEach(function (key) {
        variableDeclarationsAsBatch += convertToSetCommand(key, variableValuePairs[key])
    })
    return variableDeclarationsAsBatch
}

function replaceDollarWithPercentPair(value) {
    var dollarExpressions = /\$\{?([^\$@#\?\- \t{}:]+)\}?/g
    var result = ""
    var startIndex = 0
    do {
        var match = dollarExpressions.exec(value)
        if(match) {
            var betweenMatches = value.substring(startIndex, match.index) || ""
            result +=  betweenMatches + "%" + match[1] + "%"
            startIndex = dollarExpressions.lastIndex
        }
    } while (dollarExpressions.lastIndex > 0)
    result += value.substr(startIndex)
    return result
}


pear/pkgxml/alt-php74-vld.xml000064400000005146151731502510012030 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.10.12" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
 <name>vld</name>
 <channel>pecl.php.net</channel>
 <summary>Provides functionality to dump the internal representation of PHP scripts</summary>
 <description>The Vulcan Logic Disassembler hooks into the Zend Engine and
dumps all the opcodes (execution units) of a script.</description>
 <lead>
  <name>Derick Rethans</name>
  <user>derick</user>
  <email>derick@xdebug.org</email>
  <active>yes</active>
 </lead>
 <date>2021-01-11</date>
 <time>14:39:16</time>
 <version>
  <release>0.17.1</release>
  <api>0.17.1</api>
 </version>
 <stability>
  <release>beta</release>
  <api>beta</api>
 </stability>
 <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD style</license>
 <notes>
- Added support for PHP 8.0.
 </notes>
 <contents>
  <dir name="/">
   <file md5sum="07c8a931c445845cd3c4447cd63e9602" name="branchinfo.c" role="src" />
   <file md5sum="33fa9200791fdced7579f4213e7d3d07" name="branchinfo.h" role="src" />
   <file md5sum="24ee28790811e701ed638f18b6836ac5" name="Changelog" role="doc" />
   <file md5sum="c4242d8d5af2d183a852ce5f41f17fbd" name="config.m4" role="src" />
   <file md5sum="d593048fddad29e35374fe313148b362" name="config.w32" role="src" />
   <file md5sum="2ff4bed9def897f2e3e7b97b0c7a9bbb" name="CREDITS" role="doc" />
   <file md5sum="a6c3175094f39c92adebcb40c89a18f3" name="LICENSE" role="src" />
   <file md5sum="51f68176e059d4acc76236dcaab047d6" name="README.rst" role="doc" />
   <file md5sum="4a457fcf7b75bd09ac9faf2f45b94efe" name="Makefile.in" role="src" />
   <file md5sum="acfc5fea66b523f6d4cc94d2122da1bc" name="php_vld.h" role="src" />
   <file md5sum="9750929c2ab85cc6407759ea3c84c710" name="set.c" role="src" />
   <file md5sum="17c57cde6ffb1e8cb26f2b0763bc929d" name="set.h" role="src" />
   <file md5sum="8610b6d440c0f83e884e350b9ed0201a" name="srm_oparray.c" role="src" />
   <file md5sum="7ed01788f15907de365a0bf42b605856" name="srm_oparray.h" role="src" />
   <file md5sum="68ac1e9634d5da9333c2d6e9acdd4718" name="vld.c" role="src" />
  </dir>
 </contents>
 <dependencies>
  <required>
   <php>
    <min>7.0.0</min>
   </php>
   <pearinstaller>
    <min>1.4.0b1</min>
   </pearinstaller>
  </required>
 </dependencies>
 <providesextension>vld</providesextension>
 <extsrcrelease />
</package>
fixer.js000064400000027032151731565310006232 0ustar00var semver = require("semver")
var validateLicense = require('validate-npm-package-license');
var hostedGitInfo = require("hosted-git-info")
var isBuiltinModule = require("resolve").isCore
var depTypes = ["dependencies","devDependencies","optionalDependencies"]
var extractDescription = require("./extract_description")
var url = require("url")
var typos = require("./typos.json")

var fixer = module.exports = {
  // default warning function
  warn: function() {},

  fixRepositoryField: function(data) {
    if (data.repositories) {
      this.warn("repositories");
      data.repository = data.repositories[0]
    }
    if (!data.repository) return this.warn("missingRepository")
    if (typeof data.repository === "string") {
      data.repository = {
        type: "git",
        url: data.repository
      }
    }
    var r = data.repository.url || ""
    if (r) {
      var hosted = hostedGitInfo.fromUrl(r)
      if (hosted) {
        r = data.repository.url
          = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString()
      }
    }

    if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) {
      this.warn("brokenGitUrl", r)
    }
  }

, fixTypos: function(data) {
    Object.keys(typos.topLevel).forEach(function (d) {
      if (data.hasOwnProperty(d)) {
        this.warn("typo", d, typos.topLevel[d])
      }
    }, this)
  }

, fixScriptsField: function(data) {
    if (!data.scripts) return
    if (typeof data.scripts !== "object") {
      this.warn("nonObjectScripts")
      delete data.scripts
      return
    }
    Object.keys(data.scripts).forEach(function (k) {
      if (typeof data.scripts[k] !== "string") {
        this.warn("nonStringScript")
        delete data.scripts[k]
      } else if (typos.script[k] && !data.scripts[typos.script[k]]) {
        this.warn("typo", k, typos.script[k], "scripts")
      }
    }, this)
  }

, fixFilesField: function(data) {
    var files = data.files
    if (files && !Array.isArray(files)) {
      this.warn("nonArrayFiles")
      delete data.files
    } else if (data.files) {
      data.files = data.files.filter(function(file) {
        if (!file || typeof file !== "string") {
          this.warn("invalidFilename", file)
          return false
        } else {
          return true
        }
      }, this)
    }
  }

, fixBinField: function(data) {
    if (!data.bin) return;
    if (typeof data.bin === "string") {
      var b = {}
      var match
      if (match = data.name.match(/^@[^/]+[/](.*)$/)) {
        b[match[1]] = data.bin
      } else {
        b[data.name] = data.bin
      }
      data.bin = b
    }
  }

, fixManField: function(data) {
    if (!data.man) return;
    if (typeof data.man === "string") {
      data.man = [ data.man ]
    }
  }
, fixBundleDependenciesField: function(data) {
    var bdd = "bundledDependencies"
    var bd = "bundleDependencies"
    if (data[bdd] && !data[bd]) {
      data[bd] = data[bdd]
      delete data[bdd]
    }
    if (data[bd] && !Array.isArray(data[bd])) {
      this.warn("nonArrayBundleDependencies")
      delete data[bd]
    } else if (data[bd]) {
      data[bd] = data[bd].filter(function(bd) {
        if (!bd || typeof bd !== 'string') {
          this.warn("nonStringBundleDependency", bd)
          return false
        } else {
          if (!data.dependencies) {
            data.dependencies = {}
          }
          if (!data.dependencies.hasOwnProperty(bd)) {
            this.warn("nonDependencyBundleDependency", bd)
            data.dependencies[bd] = "*"
          }
          return true
        }
      }, this)
    }
  }

, fixDependencies: function(data, strict) {
    var loose = !strict
    objectifyDeps(data, this.warn)
    addOptionalDepsToDeps(data, this.warn)
    this.fixBundleDependenciesField(data)

    ;['dependencies','devDependencies'].forEach(function(deps) {
      if (!(deps in data)) return
      if (!data[deps] || typeof data[deps] !== "object") {
        this.warn("nonObjectDependencies", deps)
        delete data[deps]
        return
      }
      Object.keys(data[deps]).forEach(function (d) {
        var r = data[deps][d]
        if (typeof r !== 'string') {
          this.warn("nonStringDependency", d, JSON.stringify(r))
          delete data[deps][d]
        }
        var hosted = hostedGitInfo.fromUrl(data[deps][d])
        if (hosted) data[deps][d] = hosted.toString()
      }, this)
    }, this)
  }

, fixModulesField: function (data) {
    if (data.modules) {
      this.warn("deprecatedModules")
      delete data.modules
    }
  }

, fixKeywordsField: function (data) {
    if (typeof data.keywords === "string") {
      data.keywords = data.keywords.split(/,\s+/)
    }
    if (data.keywords && !Array.isArray(data.keywords)) {
      delete data.keywords
      this.warn("nonArrayKeywords")
    } else if (data.keywords) {
      data.keywords = data.keywords.filter(function(kw) {
        if (typeof kw !== "string" || !kw) {
          this.warn("nonStringKeyword");
          return false
        } else {
          return true
        }
      }, this)
    }
  }

, fixVersionField: function(data, strict) {
    // allow "loose" semver 1.0 versions in non-strict mode
    // enforce strict semver 2.0 compliance in strict mode
    var loose = !strict
    if (!data.version) {
      data.version = ""
      return true
    }
    if (!semver.valid(data.version, loose)) {
      throw new Error('Invalid version: "'+ data.version + '"')
    }
    data.version = semver.clean(data.version, loose)
    return true
  }

, fixPeople: function(data) {
    modifyPeople(data, unParsePerson)
    modifyPeople(data, parsePerson)
  }

, fixNameField: function(data, options) {
    if (typeof options === "boolean") options = {strict: options}
    else if (typeof options === "undefined") options = {}
    var strict = options.strict
    if (!data.name && !strict) {
      data.name = ""
      return
    }
    if (typeof data.name !== "string") {
      throw new Error("name field must be a string.")
    }
    if (!strict)
      data.name = data.name.trim()
    ensureValidName(data.name, strict, options.allowLegacyCase)
    if (isBuiltinModule(data.name))
      this.warn("conflictingName", data.name)
  }


, fixDescriptionField: function (data) {
    if (data.description && typeof data.description !== 'string') {
      this.warn("nonStringDescription")
      delete data.description
    }
    if (data.readme && !data.description)
      data.description = extractDescription(data.readme)
      if(data.description === undefined) delete data.description;
    if (!data.description) this.warn("missingDescription")
  }

, fixReadmeField: function (data) {
    if (!data.readme) {
      this.warn("missingReadme")
      data.readme = "ERROR: No README data found!"
    }
  }

, fixBugsField: function(data) {
    if (!data.bugs && data.repository && data.repository.url) {
      var hosted = hostedGitInfo.fromUrl(data.repository.url)
      if(hosted && hosted.bugs()) {
        data.bugs = {url: hosted.bugs()}
      }
    }
    else if(data.bugs) {
      var emailRe = /^.+@.*\..+$/
      if(typeof data.bugs == "string") {
        if(emailRe.test(data.bugs))
          data.bugs = {email:data.bugs}
        else if(url.parse(data.bugs).protocol)
          data.bugs = {url: data.bugs}
        else
          this.warn("nonEmailUrlBugsString")
      }
      else {
        bugsTypos(data.bugs, this.warn)
        var oldBugs = data.bugs
        data.bugs = {}
        if(oldBugs.url) {
          if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol)
            data.bugs.url = oldBugs.url
          else
            this.warn("nonUrlBugsUrlField")
        }
        if(oldBugs.email) {
          if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email))
            data.bugs.email = oldBugs.email
          else
            this.warn("nonEmailBugsEmailField")
        }
      }
      if(!data.bugs.email && !data.bugs.url) {
        delete data.bugs
        this.warn("emptyNormalizedBugs")
      }
    }
  }

, fixHomepageField: function(data) {
    if (!data.homepage && data.repository && data.repository.url) {
      var hosted = hostedGitInfo.fromUrl(data.repository.url)
      if (hosted && hosted.docs()) data.homepage = hosted.docs()
    }
    if (!data.homepage) return

    if(typeof data.homepage !== "string") {
      this.warn("nonUrlHomepage")
      return delete data.homepage
    }
    if(!url.parse(data.homepage).protocol) {
      data.homepage = "http://" + data.homepage
    }
  }

, fixLicenseField: function(data) {
    if (!data.license) {
      return this.warn("missingLicense")
    } else{
      if (
        typeof(data.license) !== 'string' ||
        data.license.length < 1 ||
        data.license.trim() === ''
      ) {
        this.warn("invalidLicense")
      } else {
        if (!validateLicense(data.license).validForNewPackages)
          this.warn("invalidLicense")
      }
    }
  }
}

function isValidScopedPackageName(spec) {
  if (spec.charAt(0) !== '@') return false

  var rest = spec.slice(1).split('/')
  if (rest.length !== 2) return false

  return rest[0] && rest[1] &&
    rest[0] === encodeURIComponent(rest[0]) &&
    rest[1] === encodeURIComponent(rest[1])
}

function isCorrectlyEncodedName(spec) {
  return !spec.match(/[\/@\s\+%:]/) &&
    spec === encodeURIComponent(spec)
}

function ensureValidName (name, strict, allowLegacyCase) {
  if (name.charAt(0) === "." ||
      !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) ||
      (strict && (!allowLegacyCase) && name !== name.toLowerCase()) ||
      name.toLowerCase() === "node_modules" ||
      name.toLowerCase() === "favicon.ico") {
        throw new Error("Invalid name: " + JSON.stringify(name))
  }
}

function modifyPeople (data, fn) {
  if (data.author) data.author = fn(data.author)
  ;["maintainers", "contributors"].forEach(function (set) {
    if (!Array.isArray(data[set])) return;
    data[set] = data[set].map(fn)
  })
  return data
}

function unParsePerson (person) {
  if (typeof person === "string") return person
  var name = person.name || ""
  var u = person.url || person.web
  var url = u ? (" ("+u+")") : ""
  var e = person.email || person.mail
  var email = e ? (" <"+e+">") : ""
  return name+email+url
}

function parsePerson (person) {
  if (typeof person !== "string") return person
  var name = person.match(/^([^\(<]+)/)
  var url = person.match(/\(([^\)]+)\)/)
  var email = person.match(/<([^>]+)>/)
  var obj = {}
  if (name && name[0].trim()) obj.name = name[0].trim()
  if (email) obj.email = email[1];
  if (url) obj.url = url[1];
  return obj
}

function addOptionalDepsToDeps (data, warn) {
  var o = data.optionalDependencies
  if (!o) return;
  var d = data.dependencies || {}
  Object.keys(o).forEach(function (k) {
    d[k] = o[k]
  })
  data.dependencies = d
}

function depObjectify (deps, type, warn) {
  if (!deps) return {}
  if (typeof deps === "string") {
    deps = deps.trim().split(/[\n\r\s\t ,]+/)
  }
  if (!Array.isArray(deps)) return deps
  warn("deprecatedArrayDependencies", type)
  var o = {}
  deps.filter(function (d) {
    return typeof d === "string"
  }).forEach(function(d) {
    d = d.trim().split(/(:?[@\s><=])/)
    var dn = d.shift()
    var dv = d.join("")
    dv = dv.trim()
    dv = dv.replace(/^@/, "")
    o[dn] = dv
  })
  return o
}

function objectifyDeps (data, warn) {
  depTypes.forEach(function (type) {
    if (!data[type]) return;
    data[type] = depObjectify(data[type], type, warn)
  })
}

function bugsTypos(bugs, warn) {
  if (!bugs) return
  Object.keys(bugs).forEach(function (k) {
    if (typos.bugs[k]) {
      warn("typo", k, typos.bugs[k], "bugs")
      bugs[typos.bugs[k]] = bugs[k]
      delete bugs[k]
    }
  })
}
normalize.js000064400000002475151731565320007122 0ustar00module.exports = normalize

var fixer = require("./fixer")
normalize.fixer = fixer

var makeWarning = require("./make_warning")

var fieldsToFix = ['name','version','description','repository','modules','scripts'
                  ,'files','bin','man','bugs','keywords','readme','homepage','license']
var otherThingsToFix = ['dependencies','people', 'typos']

var thingsToFix = fieldsToFix.map(function(fieldName) {
  return ucFirst(fieldName) + "Field"
})
// two ways to do this in CoffeeScript on only one line, sub-70 chars:
// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field"
// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix)
thingsToFix = thingsToFix.concat(otherThingsToFix)

function normalize (data, warn, strict) {
  if(warn === true) warn = null, strict = true
  if(!strict) strict = false
  if(!warn || data.private) warn = function(msg) { /* noop */ }

  if (data.scripts &&
      data.scripts.install === "node-gyp rebuild" &&
      !data.scripts.preinstall) {
    data.gypfile = true
  }
  fixer.warn = function() { warn(makeWarning.apply(null, arguments)) }
  thingsToFix.forEach(function(thingName) {
    fixer["fix" + ucFirst(thingName)](data, strict)
  })
  data._id = data.name + "@" + data.version
}

function ucFirst (string) {
  return string.charAt(0).toUpperCase() + string.slice(1);
}
typos.json000064400000001353151731565330006630 0ustar00{
  "topLevel": {
    "dependancies": "dependencies"
   ,"dependecies": "dependencies"
   ,"depdenencies": "dependencies"
   ,"devEependencies": "devDependencies"
   ,"depends": "dependencies"
   ,"dev-dependencies": "devDependencies"
   ,"devDependences": "devDependencies"
   ,"devDepenencies": "devDependencies"
   ,"devdependencies": "devDependencies"
   ,"repostitory": "repository"
   ,"repo": "repository"
   ,"prefereGlobal": "preferGlobal"
   ,"hompage": "homepage"
   ,"hampage": "homepage"
   ,"autohr": "author"
   ,"autor": "author"
   ,"contributers": "contributors"
   ,"publicationConfig": "publishConfig"
   ,"script": "scripts"
  },
  "bugs": { "web": "url", "name": "url" },
  "script": { "server": "start", "tests": "test" }
}
make_warning.js000064400000001306151731565340007556 0ustar00var util = require("util")
var messages = require("./warning_messages.json")

module.exports = function() {
  var args = Array.prototype.slice.call(arguments, 0)
  var warningName = args.shift()
  if (warningName == "typo") {
    return makeTypoWarning.apply(null,args)
  }
  else {
    var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'"
    args.unshift(msgTemplate)
    return util.format.apply(null, args)
  }
}

function makeTypoWarning (providedName, probableName, field) {
  if (field) {
    providedName = field + "['" + providedName + "']"
    probableName = field + "['" + probableName + "']"
  }
  return util.format(messages.typo, providedName, probableName)
}
warning_messages.json000064400000003406151731565350011011 0ustar00{
  "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field"
  ,"missingRepository": "No repository field."
  ,"brokenGitUrl": "Probably broken git url: %s"
  ,"nonObjectScripts": "scripts must be an object"
  ,"nonStringScript": "script values must be string commands"
  ,"nonArrayFiles": "Invalid 'files' member"
  ,"invalidFilename": "Invalid filename in 'files' list: %s"
  ,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names"
  ,"nonStringBundleDependency": "Invalid bundleDependencies member: %s"
  ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s"
  ,"nonObjectDependencies": "%s field must be an object"
  ,"nonStringDependency": "Invalid dependency: %s %s"
  ,"deprecatedArrayDependencies": "specifying %s as array is deprecated"
  ,"deprecatedModules": "modules field is deprecated"
  ,"nonArrayKeywords": "keywords should be an array of strings"
  ,"nonStringKeyword": "keywords should be an array of strings"
  ,"conflictingName": "%s is also the name of a node core module."
  ,"nonStringDescription": "'description' field should be a string"
  ,"missingDescription": "No description"
  ,"missingReadme": "No README data"
  ,"missingLicense": "No license field."
  ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}"
  ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted."
  ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted."
  ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted."
  ,"nonUrlHomepage": "homepage field must be a string url. Deleted."
  ,"invalidLicense": "license should be a valid SPDX license expression"
  ,"typo": "%s should probably be %s."
}
safe_format.js000064400000000366151731565350007410 0ustar00var util = require('util')

module.exports = function() {
  var args = Array.prototype.slice.call(arguments, 0)
  args.forEach(function(arg) {
    if (!arg) throw new TypeError('Bad arguments.')
  })
  return util.format.apply(null, arguments)
}
extract_description.js000064400000000775151731565360011204 0ustar00module.exports = extractDescription

// Extracts description from contents of a readme file in markdown format
function extractDescription (d) {
  if (!d) return;
  if (d === "ERROR: No README data found!") return;
  // the first block of text before the first heading
  // that isn't the first line heading
  d = d.trim().split('\n')
  for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++);
  var l = d.length
  for (var e = s + 1; e < l && d[e].trim(); e ++);
  return d.slice(s, e).join(' ').trim()
}
ec.js000064400000035726151731636350005520 0ustar00// Basic Javascript Elliptic Curve implementation
// Ported loosely from BouncyCastle's Java EC code
// Only Fp curves implemented for now

// Requires jsbn.js and jsbn2.js
var BigInteger = require('jsbn').BigInteger
var Barrett = BigInteger.prototype.Barrett

// ----------------
// ECFieldElementFp

// constructor
function ECFieldElementFp(q,x) {
    this.x = x;
    // TODO if(x.compareTo(q) >= 0) error
    this.q = q;
}

function feFpEquals(other) {
    if(other == this) return true;
    return (this.q.equals(other.q) && this.x.equals(other.x));
}

function feFpToBigInteger() {
    return this.x;
}

function feFpNegate() {
    return new ECFieldElementFp(this.q, this.x.negate().mod(this.q));
}

function feFpAdd(b) {
    return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q));
}

function feFpSubtract(b) {
    return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q));
}

function feFpMultiply(b) {
    return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q));
}

function feFpSquare() {
    return new ECFieldElementFp(this.q, this.x.square().mod(this.q));
}

function feFpDivide(b) {
    return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q));
}

ECFieldElementFp.prototype.equals = feFpEquals;
ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger;
ECFieldElementFp.prototype.negate = feFpNegate;
ECFieldElementFp.prototype.add = feFpAdd;
ECFieldElementFp.prototype.subtract = feFpSubtract;
ECFieldElementFp.prototype.multiply = feFpMultiply;
ECFieldElementFp.prototype.square = feFpSquare;
ECFieldElementFp.prototype.divide = feFpDivide;

// ----------------
// ECPointFp

// constructor
function ECPointFp(curve,x,y,z) {
    this.curve = curve;
    this.x = x;
    this.y = y;
    // Projective coordinates: either zinv == null or z * zinv == 1
    // z and zinv are just BigIntegers, not fieldElements
    if(z == null) {
      this.z = BigInteger.ONE;
    }
    else {
      this.z = z;
    }
    this.zinv = null;
    //TODO: compression flag
}

function pointFpGetX() {
    if(this.zinv == null) {
      this.zinv = this.z.modInverse(this.curve.q);
    }
    var r = this.x.toBigInteger().multiply(this.zinv);
    this.curve.reduce(r);
    return this.curve.fromBigInteger(r);
}

function pointFpGetY() {
    if(this.zinv == null) {
      this.zinv = this.z.modInverse(this.curve.q);
    }
    var r = this.y.toBigInteger().multiply(this.zinv);
    this.curve.reduce(r);
    return this.curve.fromBigInteger(r);
}

function pointFpEquals(other) {
    if(other == this) return true;
    if(this.isInfinity()) return other.isInfinity();
    if(other.isInfinity()) return this.isInfinity();
    var u, v;
    // u = Y2 * Z1 - Y1 * Z2
    u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q);
    if(!u.equals(BigInteger.ZERO)) return false;
    // v = X2 * Z1 - X1 * Z2
    v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q);
    return v.equals(BigInteger.ZERO);
}

function pointFpIsInfinity() {
    if((this.x == null) && (this.y == null)) return true;
    return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO);
}

function pointFpNegate() {
    return new ECPointFp(this.curve, this.x, this.y.negate(), this.z);
}

function pointFpAdd(b) {
    if(this.isInfinity()) return b;
    if(b.isInfinity()) return this;

    // u = Y2 * Z1 - Y1 * Z2
    var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q);
    // v = X2 * Z1 - X1 * Z2
    var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);

    if(BigInteger.ZERO.equals(v)) {
        if(BigInteger.ZERO.equals(u)) {
            return this.twice(); // this == b, so double
        }
	return this.curve.getInfinity(); // this = -b, so infinity
    }

    var THREE = new BigInteger("3");
    var x1 = this.x.toBigInteger();
    var y1 = this.y.toBigInteger();
    var x2 = b.x.toBigInteger();
    var y2 = b.y.toBigInteger();

    var v2 = v.square();
    var v3 = v2.multiply(v);
    var x1v2 = x1.multiply(v2);
    var zu2 = u.square().multiply(this.z);

    // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3)
    var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q);
    // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3
    var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q);
    // z3 = v^3 * z1 * z2
    var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q);

    return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);
}

function pointFpTwice() {
    if(this.isInfinity()) return this;
    if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity();

    // TODO: optimized handling of constants
    var THREE = new BigInteger("3");
    var x1 = this.x.toBigInteger();
    var y1 = this.y.toBigInteger();

    var y1z1 = y1.multiply(this.z);
    var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q);
    var a = this.curve.a.toBigInteger();

    // w = 3 * x1^2 + a * z1^2
    var w = x1.square().multiply(THREE);
    if(!BigInteger.ZERO.equals(a)) {
      w = w.add(this.z.square().multiply(a));
    }
    w = w.mod(this.curve.q);
    //this.curve.reduce(w);
    // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1)
    var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q);
    // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3
    var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q);
    // z3 = 8 * (y1 * z1)^3
    var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q);

    return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);
}

// Simple NAF (Non-Adjacent Form) multiplication algorithm
// TODO: modularize the multiplication algorithm
function pointFpMultiply(k) {
    if(this.isInfinity()) return this;
    if(k.signum() == 0) return this.curve.getInfinity();

    var e = k;
    var h = e.multiply(new BigInteger("3"));

    var neg = this.negate();
    var R = this;

    var i;
    for(i = h.bitLength() - 2; i > 0; --i) {
	R = R.twice();

	var hBit = h.testBit(i);
	var eBit = e.testBit(i);

	if (hBit != eBit) {
	    R = R.add(hBit ? this : neg);
	}
    }

    return R;
}

// Compute this*j + x*k (simultaneous multiplication)
function pointFpMultiplyTwo(j,x,k) {
  var i;
  if(j.bitLength() > k.bitLength())
    i = j.bitLength() - 1;
  else
    i = k.bitLength() - 1;

  var R = this.curve.getInfinity();
  var both = this.add(x);
  while(i >= 0) {
    R = R.twice();
    if(j.testBit(i)) {
      if(k.testBit(i)) {
        R = R.add(both);
      }
      else {
        R = R.add(this);
      }
    }
    else {
      if(k.testBit(i)) {
        R = R.add(x);
      }
    }
    --i;
  }

  return R;
}

ECPointFp.prototype.getX = pointFpGetX;
ECPointFp.prototype.getY = pointFpGetY;
ECPointFp.prototype.equals = pointFpEquals;
ECPointFp.prototype.isInfinity = pointFpIsInfinity;
ECPointFp.prototype.negate = pointFpNegate;
ECPointFp.prototype.add = pointFpAdd;
ECPointFp.prototype.twice = pointFpTwice;
ECPointFp.prototype.multiply = pointFpMultiply;
ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo;

// ----------------
// ECCurveFp

// constructor
function ECCurveFp(q,a,b) {
    this.q = q;
    this.a = this.fromBigInteger(a);
    this.b = this.fromBigInteger(b);
    this.infinity = new ECPointFp(this, null, null);
    this.reducer = new Barrett(this.q);
}

function curveFpGetQ() {
    return this.q;
}

function curveFpGetA() {
    return this.a;
}

function curveFpGetB() {
    return this.b;
}

function curveFpEquals(other) {
    if(other == this) return true;
    return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b));
}

function curveFpGetInfinity() {
    return this.infinity;
}

function curveFpFromBigInteger(x) {
    return new ECFieldElementFp(this.q, x);
}

function curveReduce(x) {
    this.reducer.reduce(x);
}

// for now, work with hex strings because they're easier in JS
function curveFpDecodePointHex(s) {
    switch(parseInt(s.substr(0,2), 16)) { // first byte
    case 0:
	return this.infinity;
    case 2:
    case 3:
	// point compression not supported yet
	return null;
    case 4:
    case 6:
    case 7:
	var len = (s.length - 2) / 2;
	var xHex = s.substr(2, len);
	var yHex = s.substr(len+2, len);

	return new ECPointFp(this,
			     this.fromBigInteger(new BigInteger(xHex, 16)),
			     this.fromBigInteger(new BigInteger(yHex, 16)));

    default: // unsupported
	return null;
    }
}

function curveFpEncodePointHex(p) {
	if (p.isInfinity()) return "00";
	var xHex = p.getX().toBigInteger().toString(16);
	var yHex = p.getY().toBigInteger().toString(16);
	var oLen = this.getQ().toString(16).length;
	if ((oLen % 2) != 0) oLen++;
	while (xHex.length < oLen) {
		xHex = "0" + xHex;
	}
	while (yHex.length < oLen) {
		yHex = "0" + yHex;
	}
	return "04" + xHex + yHex;
}

ECCurveFp.prototype.getQ = curveFpGetQ;
ECCurveFp.prototype.getA = curveFpGetA;
ECCurveFp.prototype.getB = curveFpGetB;
ECCurveFp.prototype.equals = curveFpEquals;
ECCurveFp.prototype.getInfinity = curveFpGetInfinity;
ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger;
ECCurveFp.prototype.reduce = curveReduce;
//ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex;
ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex;

// from: https://github.com/kaielvin/jsbn-ec-point-compression
ECCurveFp.prototype.decodePointHex = function(s)
{
	var yIsEven;
    switch(parseInt(s.substr(0,2), 16)) { // first byte
    case 0:
	return this.infinity;
    case 2:
	yIsEven = false;
    case 3:
	if(yIsEven == undefined) yIsEven = true;
	var len = s.length - 2;
	var xHex = s.substr(2, len);
	var x = this.fromBigInteger(new BigInteger(xHex,16));
	var alpha = x.multiply(x.square().add(this.getA())).add(this.getB());
	var beta = alpha.sqrt();

    if (beta == null) throw "Invalid point compression";

    var betaValue = beta.toBigInteger();
    if (betaValue.testBit(0) != yIsEven)
    {
        // Use the other root
        beta = this.fromBigInteger(this.getQ().subtract(betaValue));
    }
    return new ECPointFp(this,x,beta);
    case 4:
    case 6:
    case 7:
	var len = (s.length - 2) / 2;
	var xHex = s.substr(2, len);
	var yHex = s.substr(len+2, len);

	return new ECPointFp(this,
			     this.fromBigInteger(new BigInteger(xHex, 16)),
			     this.fromBigInteger(new BigInteger(yHex, 16)));

    default: // unsupported
	return null;
    }
}
ECCurveFp.prototype.encodeCompressedPointHex = function(p)
{
	if (p.isInfinity()) return "00";
	var xHex = p.getX().toBigInteger().toString(16);
	var oLen = this.getQ().toString(16).length;
	if ((oLen % 2) != 0) oLen++;
	while (xHex.length < oLen)
		xHex = "0" + xHex;
	var yPrefix;
	if(p.getY().toBigInteger().isEven()) yPrefix = "02";
	else                                 yPrefix = "03";

	return yPrefix + xHex;
}


ECFieldElementFp.prototype.getR = function()
{
	if(this.r != undefined) return this.r;

    this.r = null;
    var bitLength = this.q.bitLength();
    if (bitLength > 128)
    {
        var firstWord = this.q.shiftRight(bitLength - 64);
        if (firstWord.intValue() == -1)
        {
            this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q);
        }
    }
    return this.r;
}
ECFieldElementFp.prototype.modMult = function(x1,x2)
{
    return this.modReduce(x1.multiply(x2));
}
ECFieldElementFp.prototype.modReduce = function(x)
{
    if (this.getR() != null)
    {
        var qLen = q.bitLength();
        while (x.bitLength() > (qLen + 1))
        {
            var u = x.shiftRight(qLen);
            var v = x.subtract(u.shiftLeft(qLen));
            if (!this.getR().equals(BigInteger.ONE))
            {
                u = u.multiply(this.getR());
            }
            x = u.add(v); 
        }
        while (x.compareTo(q) >= 0)
        {
            x = x.subtract(q);
        }
    }
    else
    {
        x = x.mod(q);
    }
    return x;
}
ECFieldElementFp.prototype.sqrt = function()
{
    if (!this.q.testBit(0)) throw "unsupported";

    // p mod 4 == 3
    if (this.q.testBit(1))
    {
    	var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));
    	return z.square().equals(this) ? z : null;
    }

    // p mod 4 == 1
    var qMinusOne = this.q.subtract(BigInteger.ONE);

    var legendreExponent = qMinusOne.shiftRight(1);
    if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE)))
    {
        return null;
    }

    var u = qMinusOne.shiftRight(2);
    var k = u.shiftLeft(1).add(BigInteger.ONE);

    var Q = this.x;
    var fourQ = modDouble(modDouble(Q));

    var U, V;
    do
    {
        var P;
        do
        {
            P = new BigInteger(this.q.bitLength(), new SecureRandom());
        }
        while (P.compareTo(this.q) >= 0
            || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne)));

        var result = this.lucasSequence(P, Q, k);
        U = result[0];
        V = result[1];

        if (this.modMult(V, V).equals(fourQ))
        {
            // Integer division by 2, mod q
            if (V.testBit(0))
            {
                V = V.add(q);
            }

            V = V.shiftRight(1);

            return new ECFieldElementFp(q,V);
        }
    }
    while (U.equals(BigInteger.ONE) || U.equals(qMinusOne));

    return null;
}
ECFieldElementFp.prototype.lucasSequence = function(P,Q,k)
{
    var n = k.bitLength();
    var s = k.getLowestSetBit();

    var Uh = BigInteger.ONE;
    var Vl = BigInteger.TWO;
    var Vh = P;
    var Ql = BigInteger.ONE;
    var Qh = BigInteger.ONE;

    for (var j = n - 1; j >= s + 1; --j)
    {
        Ql = this.modMult(Ql, Qh);

        if (k.testBit(j))
        {
            Qh = this.modMult(Ql, Q);
            Uh = this.modMult(Uh, Vh);
            Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
            Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1)));
        }
        else
        {
            Qh = Ql;
            Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));
            Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
            Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));
        }
    }

    Ql = this.modMult(Ql, Qh);
    Qh = this.modMult(Ql, Q);
    Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));
    Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
    Ql = this.modMult(Ql, Qh);

    for (var j = 1; j <= s; ++j)
    {
        Uh = this.modMult(Uh, Vl);
        Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));
        Ql = this.modMult(Ql, Ql);
    }

    return [ Uh, Vl ];
}

var exports = {
  ECCurveFp: ECCurveFp,
  ECPointFp: ECPointFp,
  ECFieldElementFp: ECFieldElementFp
}

module.exports = exports
sec.js000064400000013724151731636360005676 0ustar00// Named EC curves

// Requires ec.js, jsbn.js, and jsbn2.js
var BigInteger = require('jsbn').BigInteger
var ECCurveFp = require('./ec.js').ECCurveFp


// ----------------
// X9ECParameters

// constructor
function X9ECParameters(curve,g,n,h) {
    this.curve = curve;
    this.g = g;
    this.n = n;
    this.h = h;
}

function x9getCurve() {
    return this.curve;
}

function x9getG() {
    return this.g;
}

function x9getN() {
    return this.n;
}

function x9getH() {
    return this.h;
}

X9ECParameters.prototype.getCurve = x9getCurve;
X9ECParameters.prototype.getG = x9getG;
X9ECParameters.prototype.getN = x9getN;
X9ECParameters.prototype.getH = x9getH;

// ----------------
// SECNamedCurves

function fromHex(s) { return new BigInteger(s, 16); }

function secp128r1() {
    // p = 2^128 - 2^97 - 1
    var p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");
    var a = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC");
    var b = fromHex("E87579C11079F43DD824993C2CEE5ED3");
    //byte[] S = Hex.decode("000E0D4D696E6768756151750CC03A4473D03679");
    var n = fromHex("FFFFFFFE0000000075A30D1B9038A115");
    var h = BigInteger.ONE;
    var curve = new ECCurveFp(p, a, b);
    var G = curve.decodePointHex("04"
                + "161FF7528B899B2D0C28607CA52C5B86"
		+ "CF5AC8395BAFEB13C02DA292DDED7A83");
    return new X9ECParameters(curve, G, n, h);
}

function secp160k1() {
    // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1
    var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");
    var a = BigInteger.ZERO;
    var b = fromHex("7");
    //byte[] S = null;
    var n = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");
    var h = BigInteger.ONE;
    var curve = new ECCurveFp(p, a, b);
    var G = curve.decodePointHex("04"
                + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"
                + "938CF935318FDCED6BC28286531733C3F03C4FEE");
    return new X9ECParameters(curve, G, n, h);
}

function secp160r1() {
    // p = 2^160 - 2^31 - 1
    var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF");
    var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC");
    var b = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45");
    //byte[] S = Hex.decode("1053CDE42C14D696E67687561517533BF3F83345");
    var n = fromHex("0100000000000000000001F4C8F927AED3CA752257");
    var h = BigInteger.ONE;
    var curve = new ECCurveFp(p, a, b);
    var G = curve.decodePointHex("04"
		+ "4A96B5688EF573284664698968C38BB913CBFC82"
		+ "23A628553168947D59DCC912042351377AC5FB32");
    return new X9ECParameters(curve, G, n, h);
}

function secp192k1() {
    // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1
    var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");
    var a = BigInteger.ZERO;
    var b = fromHex("3");
    //byte[] S = null;
    var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");
    var h = BigInteger.ONE;
    var curve = new ECCurveFp(p, a, b);
    var G = curve.decodePointHex("04"
                + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"
                + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");
    return new X9ECParameters(curve, G, n, h);
}

function secp192r1() {
    // p = 2^192 - 2^64 - 1
    var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");
    var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");
    var b = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");
    //byte[] S = Hex.decode("3045AE6FC8422F64ED579528D38120EAE12196D5");
    var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");
    var h = BigInteger.ONE;
    var curve = new ECCurveFp(p, a, b);
    var G = curve.decodePointHex("04"
                + "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"
                + "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
    return new X9ECParameters(curve, G, n, h);
}

function secp224r1() {
    // p = 2^224 - 2^96 + 1
    var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");
    var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");
    var b = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");
    //byte[] S = Hex.decode("BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5");
    var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");
    var h = BigInteger.ONE;
    var curve = new ECCurveFp(p, a, b);
    var G = curve.decodePointHex("04"
                + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"
                + "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");
    return new X9ECParameters(curve, G, n, h);
}

function secp256r1() {
    // p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1
    var p = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");
    var a = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");
    var b = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");
    //byte[] S = Hex.decode("C49D360886E704936A6678E1139D26B7819F7E90");
    var n = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");
    var h = BigInteger.ONE;
    var curve = new ECCurveFp(p, a, b);
    var G = curve.decodePointHex("04"
                + "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"
		+ "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");
    return new X9ECParameters(curve, G, n, h);
}

// TODO: make this into a proper hashtable
function getSECCurveByName(name) {
    if(name == "secp128r1") return secp128r1();
    if(name == "secp160k1") return secp160k1();
    if(name == "secp160r1") return secp160r1();
    if(name == "secp192k1") return secp192k1();
    if(name == "secp192r1") return secp192r1();
    if(name == "secp224r1") return secp224r1();
    if(name == "secp256r1") return secp256r1();
    return null;
}

module.exports = {
  "secp128r1":secp128r1,
  "secp160k1":secp160k1,
  "secp160r1":secp160r1,
  "secp192k1":secp192k1,
  "secp192r1":secp192r1,
  "secp224r1":secp224r1,
  "secp256r1":secp256r1
}
LICENSE-jsbn000064400000003010151731636360006510 0ustar00Licensing
---------

This software is covered under the following copyright:

/*
 * Copyright (c) 2003-2005  Tom Wu
 * All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
 *
 * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
 * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
 * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *
 * In addition, the following condition applies:
 *
 * All redistributions must retain an intact copy of this copyright notice
 * and disclaimer.
 */

Address all questions regarding this license to:

  Tom Wu
  tjw@cs.Stanford.EDU
python3.12/site-packages/pkg_resources/__pycache__/__init__.cpython-312.pyc000064400000435531151732700750022460 0ustar00�

��_i���`�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZ	ddlZ	eddlm!Z!	ddlm"Z"m#Z#m$Z$dZ%ddlm&Z'dd	l(m)Z)m*Z*	ddl+m,Z-e-j\dd
l/m0Z0m1Z1m2Z2ddl3m4Z4ddl3m5Z5e6d
�e6d�e6d�e6d�e6d�ejndkre8d��dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIe	j�deKd��ej�dej��ZNGd�deO�ZPe5j�j�ZSiZTd�ZUd�ZVd�ZWd�ZXd�ZYd�ZZd �Z[d!�xZ\Z]d"�Z^gd#�Z_Gd$�d%e`�ZaGd&�d'ea�ZbGd(�d)eb�ZcGd*�d+ea�ZdGd,�d-ea�ZeiZfd.j�ejn�Zhd/ZidZjd0ZkdZld1Zmd2�Znd3�Zogfd4�Zpd5�Zqd6�Zrej�d7�Zsej�d8�ZterZud9�Zvd:�ZwewZxd;�Zyd<�Zzd�d=�Z{d>�Z|Gd?�d@�Z}GdA�dBe}�Z~GdC�dD�ZGdE�dFe��Z�GdG�dH�Z�e�Z�GdI�dJe8�Z�GdK�dL�Z�dM�Z�dN�Z�dO�Z�dP�Z�dQ�Z�dR�Z�dS�Z�dT�Z�d�dU�Z�GdV�dW�Z�ene�e��dX�Z�GdY�dZe��Z�Gd[�d\e��Z�e��j)�Gd]�d^e��Z�e��Z�Gd_�d`e��Z�Gda�dbe��Z�Gdc�dde��Z�ene�j4e��Gde�dfe��Z�Gdg�dhe��Z�Gdi�dje��Z�eUdki�l�dm�Z�d�dn�Z�d�do�Z�e�e�j4e��d�dp�Z�e�e�e��d�dq�Z�dr�Z�Gds�dt�Z�du�Z�dv�Z�dw�Z�dx�Z�e�edy�re�e�jTe��e�e-�jVe��eUdki�z�eUdki�{�d|�Z�d}�Z�d~�Z�d�Z�d�d��Z�d��Z�e�edy�re�e�jTe��e�e�j4e��e�e-�jVe��d��Z�e�e�e��d��Z�d��Z�ifd��Z�d��Z�d��Z�d��Z�d��Z�ej�d���jtZ�ej�d�e�jxe�jzz��jtZ�Gd��d��Z�d��Z�Gd��d��Z�Gd��d�e��Z�Gd��d�e��Z�e�e�e�d��Z�d��Z�d��Z�Gd��d�e5�j��j��Z�Gd��d�e5�j��j��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�e	�j�d�ePd���d��Z�e�eӫfd���Z�Gd��d�eիZ�e�d���Z�y#e$rddlZY��wxYw#e$re ZY��wxYw#e$rdZ%Y��wxYw#e$rdZ-Y��wxYw)�a�
Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.

This module is deprecated. Users are directed to :mod:`importlib.resources`,
:mod:`importlib.metadata` and :pypi:`packaging` instead.
�N)�get_importer)�utime)�mkdir�rename�unlinkTF)�open)�isdir�split)�yield_lines�drop_comment�join_continuation)�platformdirs)�	packagingz&pkg_resources.extern.packaging.versionz)pkg_resources.extern.packaging.specifiersz+pkg_resources.extern.packaging.requirementsz&pkg_resources.extern.packaging.markersz$pkg_resources.extern.packaging.utils)��zPython 3.5 or later is requiredzbpkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html���
stacklevelz,^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)c��eZdZdZy)�
PEP440Warningza
    Used when there is an issue with a version or specifier not complying with
    PEP 440.
    N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/__init__.pyrr�s��rrc��t�j|�tjtj	||��y�N)�globals�update�_state_vars�dict�fromkeys)�vartype�kws  r�_declare_stater(�s+���I���R�����t�}�}�R��1�2rc�~�i}t�}tj�D]\}}|d|z||�||<�|S)N�_sget_)r!r#�items��state�g�k�vs    r�__getstate__r1�sF���E��	�A��!�!�#���1�"�1�X��\�?�1�Q�4�(��a��$��Lrc�~�t�}|j�D]\}}|dt|z||||��!|S)N�_sset_)r!r+r#r,s    r�__setstate__r4�sB���	�A����
���1�$��(�[��^�
#�$�Q��!��a�0���Lrc�"�|j�Sr )�copy��vals r�
_sget_dictr9�s���8�8�:�rc�F�|j�|j|�yr )�clearr"��key�obr-s   r�
_sset_dictr?�s���H�H�J��I�I�e�rc�"�|j�Sr )r1r7s r�_sget_objectrA�s������rc�&�|j|�yr )r4r<s   r�_sset_objectrC�s���O�O�E�rc��yr r��argss r�<lambda>rG�s��rc���t�}tj|�}|�Ftjdk(r3ddjt
�dd��d|jd���}|S|S#t$rY|SwxYw)aQReturn this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of macOS that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of macOS that we are *running*.  To allow usage of packages that
    explicitly require a newer version of macOS, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    N�darwin�macosx-�.r�-r)	�get_build_platform�macosVersionString�match�sys�platform�join�_macos_vers�group�
ValueError)�plat�ms  r�get_supported_platformrX�sy����D�� � ��&�A��}�����1�	�%(�X�X�k�m�B�Q�.?�%@�!�'�'�!�*�M�D��K�4�K���	���K�	�s�1A*�*	A7�6A7)G�require�
run_script�get_provider�get_distribution�load_entry_point�
get_entry_map�get_entry_info�iter_entry_points�resource_string�resource_stream�resource_filename�resource_listdir�resource_exists�resource_isdir�declare_namespace�working_set�add_activation_listener�find_distributions�set_extraction_path�cleanup_resources�get_default_cache�Environment�
WorkingSet�ResourceManager�Distribution�Requirement�
EntryPoint�ResolutionError�VersionConflict�DistributionNotFound�UnknownExtra�ExtractionErrorr�parse_requirements�
parse_version�	safe_name�safe_version�get_platform�compatible_platformsr�split_sections�
safe_extra�to_filename�invalid_marker�evaluate_marker�ensure_directory�normalize_path�EGG_DIST�BINARY_DIST�SOURCE_DIST�
CHECKOUT_DIST�DEVELOP_DIST�IMetadataProvider�IResourceProvider�FileMetadata�PathMetadata�EggMetadata�
EmptyProvider�empty_provider�NullProvider�EggProvider�DefaultProvider�ZipProvider�register_finder�register_namespace_handler�register_loader_type�fixup_namespace_packagesr�PkgResourcesDeprecationWarning�run_main�AvailableDistributionsc��eZdZdZd�Zy)rtz.Abstract base for dependency resolution errorsc�Z�|jjt|j�zSr )�	__class__r�reprrF��selfs r�__repr__zResolutionError.__repr__'s���~�~�&�&��d�i�i��8�8rN)rrrrr�rrrrtrt$s
��8�9rrtc�@�eZdZdZdZed��Zed��Zd�Zd�Z	y)ruz�
    An already-installed version conflicts with the requested version.

    Should be initialized with the installed Distribution and the requested
    Requirement.
    z3{self.dist} is installed but {self.req} is requiredc� �|jdS�NrrEr�s r�distzVersionConflict.dist5����y�y��|�rc� �|jdS�N�rEr�s r�reqzVersionConflict.req9r�rc�J�|jjdit���S�Nr��	_template�format�localsr�s r�reportzVersionConflict.report=���$�t�~�~�$�$�0�v�x�0�0rc�:�|s|S|j|fz}t|�S)zt
        If required_by is non-empty, return a version of self that is a
        ContextualVersionConflict.
        )rF�ContextualVersionConflict)r��required_byrFs   r�with_contextzVersionConflict.with_context@s'��
��K��y�y�K�>�)��(�$�/�/rN)
rrrrr��propertyr�r�r�r�rrrruru+s?���F�I�
��������1�0rruc�>�eZdZdZej
dzZed��Zy)r�z�
    A VersionConflict that accepts a third parameter, the set of the
    requirements that required the installed Distribution.
    z by {self.required_by}c� �|jdS)NrrEr�s rr�z%ContextualVersionConflict.required_bySr�rN)rrrrrur�r�r�rrrr�r�Ks,���
 �)�)�,D�D�I�
���rr�c�P�eZdZdZdZed��Zed��Zed��Zd�Z	d�Z
y)	rvz&A requested distribution was not foundzSThe '{self.req}' distribution was not found and is required by {self.requirers_str}c� �|jdSr�rEr�s rr�zDistributionNotFound.req`r�rc� �|jdSr�rEr�s r�	requirerszDistributionNotFound.requirersdr�rc�R�|jsydj|j�S)Nzthe applicationz, )r�rRr�s r�
requirers_strz"DistributionNotFound.requirers_strhs���~�~�$��y�y����(�(rc�J�|jjdit���Sr�r�r�s rr�zDistributionNotFound.reportnr�rc�"�|j�Sr )r�r�s r�__str__zDistributionNotFound.__str__qs���{�{�}�rN)rrrrr�r�r�r�r�r�r�rrrrvrvXsU��0�	2��
���������)��)�
1�rrvc��eZdZdZy)rwz>Distribution doesn't have an "extra feature" of the given nameNrrrrrwrwus��Hrrwz{}.{}rr����c��|t|<y)aRegister `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    N)�_provider_factories)�loader_type�provider_factorys  rr�r��s��(8���$rc�F�t|t�r.tj|�xst	t|��dS	tj|}t|dd�}tt|�|�S#t$r!t|�tj|}Y�LwxYw)z?Return an IResourceProvider for the named module or requirementr�
__loader__N)
�
isinstancerrrh�findrY�strrP�modules�KeyError�
__import__�getattr�
_find_adapterr�)�moduleOrReq�module�loaders   rr[r[�s����+�{�+�����,�L���K�8H�0I�!�0L�L�*����[�)���V�\�4�
0�F�5�=�,�f�5�f�=�=��	�*��;�����[�)��*�s�A6�6'B �B c�&�|s�tj�d}|dk(rOd}tjj	|�r.ttd�rt
j|�}d|vr|d}|j|jd��|dS)Nr�z0/System/Library/CoreServices/SystemVersion.plist�	readPlist�ProductVersionrK)
rQ�mac_ver�os�path�exists�hasattr�plistlibr��appendr
)�_cache�version�plist�
plist_contents    rrSrS�s�����"�"�$�Q�'���b�=�F�E��w�w�~�~�e�$��8�[�1�$,�$6�$6�u�$=�M�'�=�8�"/�0@�"A���
�
�g�m�m�C�(�)��!�9�rc�,�ddd�j||�S)N�ppc)�PowerPC�Power_Macintosh)�get)�machines r�_macos_archr��s����7�;�;�G�W�M�Mrc�>�ddlm}|�}tjdk(rl|j	d�s[	t�}t
j�djdd�}dt|d�t|d	�t|�fzS|S#t$rY|SwxYw)
z�Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and macOS.
    r)r}rIrJ�� �_zmacosx-%d.%d-%sr�)�	sysconfigr}rPrQ�
startswithrSr��uname�replace�intr�rU)r}rVr�r�s    rrMrM�s���'��>�D�
�|�|�x�����	�(B�	�!�m�G��h�h�j��m�+�+�C��5�G�$��G�A�J���G�A�J���G�$�(��
��K��	�	�
��K�		�s�AB�	B�Bzmacosx-(\d+)\.(\d+)-(.*)zdarwin-(\d+)\.(\d+)\.(\d+)-(.*)c�J�|�|�||k(rytj|�}|�rtj|�}|sltj|�}|rTt|j	d��}|j	d��d|j	d���}|dk(r|dk\s
|dk(r|dk\ryy	|j	d�|j	d�k7s#|j	d
�|j	d
�k7ry	t|j	d��t|j	d��kDry	yy	)z�Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    Tr�rKr�z10.3�z10.4Fr)rNrO�darwinVersionStringr�rT)�provided�required�reqMac�provMac�
provDarwin�dversion�macosversions       rr~r~�s����8�+�x�8�/C�� �
%�
%�h�
/�F�
�$�*�*�8�4���-�2�2�8�<�J���z�/�/��2�3��*0�,�,�q�/�6�<�<��?�K����M�$��.��1�}�$��.����=�=���v�|�|�A��.�'�-�-��2B�f�l�l�ST�o�2U���w�}�}�Q�� �3�v�|�|�A��#7�7���rc��tjd�j}|d}|j�||d<t	|�dj||�y)z@Locate distribution `dist_spec` and run its `script_name` scriptr�rrN�rP�	_getframe�	f_globalsr;rYrZ)�	dist_spec�script_name�ns�names    rrZrZ�sK��	���q�	�	#�	#�B�
�j�>�D��H�H�J��B�z�N��I��q��$�$�[�"�5rc��t|t�rtj|�}t|t�rt	|�}t|t
�st
d|��|S)z@Return a current distribution object for a Requirement or stringz-Expected string, Requirement, or Distribution)r�r�rr�parser[rq�	TypeError�r�s rr\r\sM���$���� � ��&���$��$��D�!���d�L�)��G��N�N��Krc�8�t|�j||�S)zDReturn `name` entry point of `group` for `dist` or raise ImportError)r\r]�r�rTr	s   rr]r]s���D�!�2�2�5�$�?�?rc�6�t|�j|�S)�=Return the entry point map for `group`, or the full entry map)r\r^)r�rTs  rr^r^s���D�!�/�/��6�6rc�8�t|�j||�S�z<Return the EntryPoint object for `group`+`name`, or ``None``)r\r_rs   rr_r_ s���D�!�0�0���=�=rc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)r�c��y)z;Does the package's distribution contain the named metadata?Nr�r	s r�has_metadatazIMetadataProvider.has_metadata&��rc��y)z'The named metadata resource as a stringNrrs r�get_metadatazIMetadataProvider.get_metadata)rrc��y)z�Yield named metadata resource as list of non-blank non-comment lines

        Leading and trailing whitespace is stripped from each line, and lines
        with ``#`` as the first non-blank character are omitted.Nrrs r�get_metadata_linesz$IMetadataProvider.get_metadata_lines,rrc��y)z>Is the named metadata a directory?  (like ``os.path.isdir()``)Nrrs r�metadata_isdirz IMetadataProvider.metadata_isdir2rrc��y)z?List of metadata names in the directory (like ``os.listdir()``)Nrrs r�metadata_listdirz"IMetadataProvider.metadata_listdir5rrc��y)z=Execute the named script in the supplied namespace dictionaryNr)r�	namespaces  rrZzIMetadataProvider.run_script8rrN)	rrrrrrrr rZrrrr�r�%s%��J�6�D�M�N�Lrr�c�4�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	y)	r�z3An object that provides access to package resourcesc��y)zdReturn a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``Nr��manager�
resource_names  r�get_resource_filenamez'IResourceProvider.get_resource_filename?rrc��y)ziReturn a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``Nrr%s  r�get_resource_streamz%IResourceProvider.get_resource_streamDrrc��y)zmReturn a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``Nrr%s  r�get_resource_stringz%IResourceProvider.get_resource_stringIrrc��y)z,Does the package contain the named resource?Nr�r's r�has_resourcezIResourceProvider.has_resourceNrrc��y)z>Is the named resource a directory?  (like ``os.path.isdir()``)Nrr.s rrfz IResourceProvider.resource_isdirQrrc��y)z?List of resource names in the directory (like ``os.listdir()``)Nrr.s rrdz"IResourceProvider.resource_listdirTrrN)
rrrrr(r*r,r/rfrdrrrr�r�<s%��=�5�
5�
5�
;�M�Nrr�c��eZdZdZdd�Zed��Zed��Zd�Zd�Z	d�Z
dd	�Zd
�Zd�Z
dd�Z				dd
�Zd�Zdd�Zd�Zdd�Zd�Zd�Zd�Zy)rozDA collection of active distributions on sys.path (or a similar list)Nc��g|_i|_i|_i|_g|_|�t
j}|D]}|j|��y)z?Create working set from list of path entries (default=sys.path)N)�entries�
entry_keys�by_key�normalized_to_canonical_keys�	callbacksrPr��	add_entry)r�r4�entrys   r�__init__zWorkingSet.__init__[sJ�����������,.��)�����?��h�h�G��E��N�N�5�!�rc��|�}	ddlm}	|j|�|S#t$r|cYSwxYw#t$r|j|�cYSwxYw)z1
        Prepare the master working set.
        r)�__requires__)�__main__r=�ImportErrorrYru�_build_from_requirements)�cls�wsr=s   r�
_build_masterzWorkingSet._build_masterisb��
�U��	�-�	>��J�J�|�$��	���	��I�	���	>��/�/��=�=�	>�s�#�4�1�1�A�Ac�4�|g�}t|�}|j|t��}|D]}|j|��tj
D]"}||jvs�|j|��$|jtj
dd|S)zQ
        Build a working set from a requirement spec. Rewrites sys.path.
        N)ry�resolvern�addrPr�r4r9)rA�req_specrB�reqs�distsr�r:s       rr@z#WorkingSet._build_from_requirements}s~����W��!�(�+���
�
�4���/���D��F�F�4�L���X�X�E��B�J�J�&����U�#��
�j�j�������	rc��|jj|g�|jj|�t	|d�D]}|j||d��y)a�Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        TFN)r5�
setdefaultr4r�rjrF)r�r:r�s   rr9zWorkingSet.add_entry�sK��	
���"�"�5�"�-������E�"�&�u�d�3�D��H�H�T�5�%�(�4rc�R�|jj|j�|k(S)z9True if `dist` is the active distribution for its project)r6r�r=�r�r�s  r�__contains__zWorkingSet.__contains__�s���{�{���t�x�x�(�D�0�0rc�
�|jj|j�}|�I|jj|j�}|�"||_|jj|�}|�||vrt	||��|S)a�Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        )r6r�r=r7ru)r�r�r��
canonical_keys    rr�zWorkingSet.find�sv���{�{���s�w�w�'���<� �=�=�A�A�#�'�'�J�M��(�'����{�{���}�5�����C��!�$��,�,��rc������fd�|D�S)aYield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        c3��K�|];}|j��j�D]}���|jk(r|����=y�wr )r^�valuesr	)�.0r�r:rTr	s   ��r�	<genexpr>z/WorkingSet.iter_entry_points.<locals>.<genexpr>�sJ�����
����+�+�E�2�9�9�;���|�t�u�z�z�1�
�;�
��s�AAr�r�rTr	s ``rr`zWorkingSet.iter_entry_points�s���
��
�	
rc��tjd�j}|d}|j�||d<|j	|�dj||�y)z?Locate distribution for `requires` and run `script_name` scriptr�rrNr)r��requiresrrr	s     rrZzWorkingSet.run_script�sO��
�]�]�1�
�
'�
'���*�~��
���
���:�����X��q�!�,�,�[�"�=rc#�K�i}|jD]@}||jvr�|j|D]}||vs�d||<|j|����By�w)z�Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        r�N)r4r5r6)r��seen�itemr=s    r�__iter__zWorkingSet.__iter__�s\�������L�L�D��4�?�?�*�����t�,���d�?� !�D��I��+�+�c�*�*�-�!�s
�7A�Ac��|r|j|j||��|�|j}|jj	|g�}|jj	|jg�}|s|j
|jvry||j|j
<tjj|j
�}|j
|j|<|j
|vr|j|j
�|j
|vr|j|j
�|j|�y)aAdd `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        �r�N)
�	insert_onr4�locationr5rKr=r6r�utils�canonicalize_namer7r��
_added_new)r�r�r:�insertr��keys�keys2�normalized_names        rrFzWorkingSet.add�s�����N�N�4�<�<���N�@��=��M�M�E����)�)�%��4�����*�*�4�=�=�"�=���4�8�8�t�{�{�2�� $����D�H�H��#�/�/�;�;�D�H�H�E��=A�X�X��)�)�/�:��8�8�4���K�K����!��8�8�5� ��L�L����"�����rc	���t|�ddd�}i}i}g}t�}	tjt�}
|r�|jd�}||vr�|	j
||�s�+|j||||||
|�}|j|j�ddd�}
|j|
�|
D]/}|
|j|j�|j|	|<�1d||<|r��|S)a�List all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.

        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.

        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        Nr�rT)
�list�
_ReqExtras�collections�defaultdict�set�pop�markers_pass�
_resolve_distrX�extras�extendrF�project_name)r��requirements�env�	installer�replace_conflictingrq�	processed�best�to_activate�
req_extrasr�r�r��new_requirements�new_requirements               rrEzWorkingSet.resolves	��B�L�)�$�B�$�/���	������\�
�"�-�-�c�2����"�"�1�%�C��i����*�*�3��7���%�%��T�.��Y��[��D�
 $�}�}�S�Z�Z�8��2��>����� 0�1�$4���O�,�0�0��1A�1A�B�.1�j�j�
�?�+�$4�"�I�c�N�/�4�rc���|j|j�}|��|jj|j�}|�||vrx|rv|}	|�.|�t|j�}ntg�}tg�}	|j
||	||��x}||j<|�|j|d�}
t||
��|j|�||vr ||}t||�j|��|S)N)rw)r�r=r6rnr4ro�
best_matchrvr�rur�)r�r�ryrwrurvr�rzr�rBr��
dependent_reqs            rrpzWorkingSet._resolve_distOs����x�x���� ���<��;�;�?�?�3�7�7�+�D��|��C��4G����;��|�)�$�,�,�7��
*�"�o��'��^��'*�~�~���Y�<O�(6�(���t�C�G�G�}��<� +����T� :�I�.�s�I�>�>����t�$��s�?�'��,�M�!�$��,�9�9�-�H�H��rc�\�t|�}|j�i}i}|�t|j�}||z
}n||z}|j	g�}	tt|	j|��|D]u}
||
D]k}|j�g}	|	j|||�}
tt|	j|
��|jtj|
���u�wt|�}|j�||fS#t$r}|||<|rYd}~��Yd}~��d}~wwxYw)asFind all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            # add plugins+libs to sys.path
            map(working_set.add, distributions)
            # display errors
            print('Could not load', errors)

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        N)
ri�sortrnr4r��maprF�as_requirementrEr"r$r%rt)r��
plugin_env�full_envrv�fallback�plugin_projects�
error_info�
distributionsru�
shadow_setrsr�r��	resolveesr0s               r�find_pluginszWorkingSet.find_pluginsns,��F�z�*�������
��
����d�l�l�+�C��:��C��Z�'�C��^�^�B�'�
��S�����
&�'�+�L�"�<�0���*�*�,�-��� *� 2� 2�3��Y� G�I���Z�^�^�Y�7�8�!�(�(����y�)A�B��+1�,�0�]�+�
������j�(�(��)'��'(�J�t�$�� ����s�D�	D+�D&�&D+c�j�|jt|��}|D]}|j|��|S)a�Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        )rEryrF)r�rt�neededr�s    rrYzWorkingSet.require�s4�����0��>�?���D��H�H�T�N���
rc�|�||jvry|jj|�|sy|D]
}||��y)z�Invoke `callback` for all distributions

        If `existing=True` (default),
        call on all existing ones, as well.
        N)r8r�)r��callback�existingr�s    r�	subscribezWorkingSet.subscribe�s<���t�~�~�%�������h�'����D��T�N�rc�6�|jD]
}||��yr )r8)r�r�r�s   rrczWorkingSet._added_new�s�����H��T�N�'rc���|jdd|jj�|jj�|jj�|j
ddfSr )r4r5r6r6r7r8r�s rr1zWorkingSet.__getstate__�sU���L�L��O��O�O� � �"��K�K�����-�-�2�2�4��N�N�1��
�	
rc��|\}}}}}|dd|_|j�|_|j�|_|j�|_|dd|_yr )r4r6r5r6r7r8)r��	e_k_b_n_cr4rer6r7r8s       rr4zWorkingSet.__setstate__�sT��IR�F���v�;�Y��q�z����)�)�+����k�k�m���,H�,M�,M�,O��)�"�1���rr )NTF)NNFN)NNT�T)rrrrr;�classmethodrCr@r9rNr�r`rZr\rFrErpr�rYr�rcr1r4rrrroroXs���N�"�����&����*
)�1��0
�>�+�"�F
��!��
H�T�>O)�b� ��
�&rroc��eZdZdZdd�Zy)rjz>
    Map each requirement to the extras that demanded it.
    Nc�|���fd�|j�d�|xsdzD�}�jxst|�S)z�
        Evaluate markers for req against each extra that
        demanded it.

        Return False if the req has a marker and fails
        evaluation. Otherwise, return True.
        c3�X�K�|]!}�jjd|i����#y�w)�extraN��marker�evaluate)rTr�r�s  �rrUz*_ReqExtras.markers_pass.<locals>.<genexpr>s-�����
�@��
�J�J����%� 0�1�@�s�'*rr )r�r��any)r�r�rq�extra_evalss `  rroz_ReqExtras.markers_pass�s?���
����#�r�*�f�.?��@�
���:�:�~�1��[�!1�1rr )rrrrrorrrrjrj�s���2rrjc�j�eZdZdZde�efd�Zd�Zd�Zdd�Z	d�Z
d�Zdd	�Zdd
�Z
d�Zd�Zd
�Zy)rnz5Searchable snapshot of distributions on a search pathNc�P�i|_||_||_|j|�y)a!Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.6'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        N)�_distmaprQ�python�scan)r��search_pathrQr�s    rr;zEnvironment.__init__
s%��&��
� ��
�����	�	�+�rc��|jduxs)|jduxs|j|jk(}|xr t|j|j�S)z�Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        N)r��
py_versionr~rQ)r�r��	py_compats   r�can_addzEnvironment.can_add"sX��
�K�K�4��
.����$�&�
.����$�+�+�-�	�
�O�1�$�-�-����O�Orc�T�|j|jj|�y)z"Remove `dist` from the environmentN)r�r=�removerMs  rr�zEnvironment.remove0s���
�
�d�h�h��&�&�t�,rc�x�|�tj}|D]#}t|�D]}|j|���%y)adScan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        N)rPr�rjrF)r�r�r[r�s    rr�zEnvironment.scan4s7�����(�(�K��D�*�4�0�������1� rc�Z�|j�}|jj|g�S)aReturn a newest-to-oldest list of distributions for `project_name`

        Uses case-insensitive `project_name` comparison, assuming all the
        project's distributions use their project's name converted to all
        lowercase as their key.

        )�lowerr�r�)r�rs�distribution_keys   r�__getitem__zEnvironment.__getitem__Cs+��(�-�-�/���}�}� � �!1�2�6�6rc��|j|�rt|j�rc|jj|jg�}||vr8|j|�|j
tjd�d��yyyy)zCAdd `dist` if we ``can_add()`` it and it has not already been added�hashcmpT)r=�reverseN)	r��has_versionr�rKr=r�r��operator�
attrgetter)r�r�rIs   rrFzEnvironment.addNso���<�<���$�"2�"2�"4��M�M�,�,�T�X�X�r�:�E��5� ����T�"��
�
�x�2�2�9�=�t�
�L�!�#5�rc��	|j|�}|�|S||jD]
}||vs�|cS|j||�S#t$r|s�d}Y�BwxYw)a�Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        N)r�rur=�obtain)r�r�rhrvrwr�s      rrzEnvironment.best_matchVsq��	��#�#�C�(�D�
���K�����M�D��s�{���"��{�{�3�	�*�*���	�&���D�	�s�A�A�Ac��|�||�Sy)a�Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument.Nr)r��requirementrvs   rr�zEnvironment.obtainqs��� ��[�)�)�!rc#�^K�|jj�D]}||s�	|���y�w)z=Yield the unique project names of the available distributionsN)r�re�r�r=s  rr\zEnvironment.__iter__}s)�����=�=�%�%�'�C��C�y��	�(�s�#-�-c���t|t�r|j|�|St|t�r$|D]}||D]}|j|���|St	d|�d���)z2In-place addition of a distribution or environmentz
Can't add z to environment)r�rqrFrnr)r��other�projectr�s    r�__iadd__zEnvironment.__iadd__�sd���e�\�*��H�H�U�O���
��{�
+� ��!�'�N�D��H�H�T�N�+�!�
���U�D�E�Erc�J�|jgdd��}||fD]}||z
}�	|S)z4Add an environment or distribution to an environmentN)rQr��r�)r�r��newrus    r�__add__zEnvironment.__add__�s2���n�n�R�$�t�n�<����;�C��3�J�C���
rr �NF)rrrrrX�PY_MAJORr;r�r�r�r�rFrr�r\r�r�rrrrnrnsK��?��)?�)A�(��0P�-�
�	7�M�+�6
*��
�rrnc��eZdZdZy)rxaTAn error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    Nrrrrrxrx�s��rrxc�p�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zdd�Z
ed��Zd
�Zd�Zdd�Zy)rpz'Manage resource extraction and packagesNc��i|_yr )�cached_filesr�s rr;zResourceManager.__init__�s
����rc�6�t|�j|�S)zDoes the named resource exist?)r[r/�r��package_or_requirementr's   rrezResourceManager.resource_exists�s���2�3�@�@��O�Orc�6�t|�j|�S)z,Is the named resource an existing directory?)r[rfr�s   rrfzResourceManager.resource_isdir�s���2�3�B�B�=�Q�Qrc�8�t|�j||�S)z4Return a true filesystem path for specified resource)r[r(r�s   rrcz!ResourceManager.resource_filename�s ���2�3�I�I��-�
�	
rc�8�t|�j||�S)z9Return a readable file-like object for specified resource)r[r*r�s   rrbzResourceManager.resource_stream�� ���2�3�G�G��-�
�	
rc�8�t|�j||�S)z%Return specified resource as a string)r[r,r�s   rrazResourceManager.resource_string�r�rc�6�t|�j|�S)z1List the contents of the named resource directory)r[rdr�s   rrdz ResourceManager.resource_listdir�s���2�3�D�D�]�S�Src��tj�d}|jxs
t�}t	j
d�j
�}t|jdit����}||_
||_||_|�)z5Give an error message for problems extracting file(s)r�a
            Can't extract file(s) to egg cache

            The following error occurred while trying to extract file(s)
            to the Python egg cache:

              {old_exc}

            The Python egg cache directory is currently set to:

              {cache_path}

            Perhaps your account does not have write access to this directory?
            You can change the cache directory by setting the PYTHON_EGG_CACHE
            environment variable to point to an accessible directory.
            r)
rP�exc_info�extraction_pathrm�textwrap�dedent�lstriprxr�r�r&�
cache_path�original_error)r��old_excr��tmpl�errs     r�extraction_errorz ResourceManager.extraction_error�s~���,�,�.��#���)�)�@�->�-@�
����
�
�"�&�(�#	
�$�k�d�k�k�5�F�H�5�6�����#���$����	rc��|jxs
t�}tjj||dzg|���}	t|�|j|�d|j|<|S#t$r|j�Y�=wxYw)a�Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        z-tmpr�)
r�rmr�r�rR�_bypass_ensure_directory�	Exceptionr��_warn_unsafe_extraction_pathr�)r��archive_name�names�extract_path�target_paths     r�get_cache_pathzResourceManager.get_cache_path�s����+�+�B�/@�/B���g�g�l�l�<���1F�O��O��	$�$�[�1�	
�)�)�,�7�)*����+�&����
�	$��!�!�#�	$�s�A+�+B�Bc�d�tjdk(r#|jtjd�sytj|�j
}|tjzs|tjzr5djdit���}tj|t�yy)aN
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        �nt�windirNz�Extraction path is writable by group/others and vulnerable to attack when used with get_resource_filename ({path}). Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).r)
r�r	r��environ�stat�st_mode�S_IWOTH�S_IWGRPr�r��warnings�warn�UserWarning)r��mode�msgs   rr�z,ResourceManager._warn_unsafe_extraction_paths����7�7�d�?�4�?�?�2�:�:�h�3G�#H�
��w�w�t�}�$�$���$�,�,��$����"5��:��f�!��x�!�C�
�M�M�#�{�+�#6rc��tjdk(r<tj|�jdzdz}tj||�yy)a4Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        �posiximi�N)r�r	r�r��chmod)r��tempname�filenamer�s    r�postprocesszResourceManager.postprocess#sA���7�7�g���W�W�X�&�.�.�%�7�6�A�D��H�H�X�t�$�rc�@�|jrtd��||_y)a�Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        z5Can't change extraction path, files already extractedN)r�rUr��r�r�s  rrkz#ResourceManager.set_extraction_path7s!��&����T�U�U�#��rc��y)aB
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        Nr)r��forces  rrlz!ResourceManager.cleanup_resourcesOrr�r�F)rrrrr�r;rerfrcrbrardr�r��staticmethodr�r�rkrlrrrrprp�s]��1��O��P�R�
�
�
�T��<�2�,��,�4%�($�0
rrpc�p�tjjd�xstjd��S)z�
    Return the ``PYTHON_EGG_CACHE`` environment variable
    or a platform-relevant user cache dir for an app
    named "Python-Eggs".
    �PYTHON_EGG_CACHEzPython-Eggs)�appname)r�r�r�r�user_cache_dirrrrrmrm]s/���:�:�>�>�,�-���1L�1L��2�rc�0�tjdd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    �[^A-Za-z0-9.]+rL)�re�subrs rr{r{hs��
�6�6�"�C��.�.rc���	ttjj|��S#tjj$r,|jdd�}t
jdd|�cYSwxYw)zB
    Convert an arbitrary string to a standard version string
    r�rKrrL)r�rr��Version�InvalidVersionr�rr
)r�s rr|r|psb��6��9�$�$�,�,�W�5�6�6�����+�+�6��/�/�#�s�+���v�v�&��W�5�5�6�s�'*�AA3�2A3c���|jdd�}tj|�}|r|d}|t|�d}nd}|}dt	|���jd�}|�d|��S)aFallback when ``safe_version`` is not safe enough
    >>> parse_version(_forgiving_version('0.23ubuntu1'))
    <Version('0.23.dev0+sanitized.ubuntu1')>
    >>> parse_version(_forgiving_version('0.23-'))
    <Version('0.23.dev0+sanitized')>
    >>> parse_version(_forgiving_version('0.-_'))
    <Version('0.dev0+sanitized')>
    >>> parse_version(_forgiving_version('42.+?1'))
    <Version('42.dev0+sanitized.1')>
    >>> parse_version(_forgiving_version('hello world'))
    <Version('0.dev0+sanitized.hello.world')>
    r�rK�safeN�0z
sanitized.z.dev0+)r��_PEP440_FALLBACK�search�len�
_safe_segment�strip)r�rOr�rest�locals     r�_forgiving_versionr|sx���o�o�c�3�'�G��#�#�G�,�E���V�}���s�4�y�{�#��������t�,�-�.�4�4�S�9�E��V�6�%��!�!rc��tjdd|�}tjdd|�}tjdd|�jd�S)z/Convert an arbitrary string into a safe segmentrrLz-[^A-Za-z0-9]+z\.[^A-Za-z0-9]+rKz.-)rr
r)�segments rrr�sG���f�f�%�s�G�4�G��f�f�%�s�G�4�G�
�6�6�$�c�7�3�9�9�$�?�?rc�L�tjdd|�j�S)z�Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    z[^A-Za-z0-9.-]+r�)rr
r�)r�s rr�r��s!���6�6�#�S�%�0�6�6�8�8rc�&�|jdd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    rLr�r^rs rr�r��s��
�<�<��S�!�!rc�h�	t|�y#t$r}d|_d|_|cYd}~Sd}~wwxYw)zo
    Validate text as a PEP 508 environment marker; return an exception
    if invalid or False otherwise.
    NF)r��SyntaxErrorr��lineno)�text�es  rr�r��s9��
����
��	����
��������s��	1�,�1�1c���	tjj|�}|j�S#tjj$r}t|�|�d}~wwxYw)z�
    Evaluate a PEP 508 environment marker.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.

    This implementation uses the 'pyparsing' module.
    N)r�markers�Markerr��
InvalidMarkerr!)r#r�r�r$s    rr�r��sR��$��"�"�)�)�$�/����� � �����*�*�$��!�n�!�#��$�s�.1�A�A�Ac��eZdZdZdZdZdZd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed��Zd�Zy)r�zETry to implement resources and metadata for arbitrary PEP 302 loadersNc��t|dd�|_tjj	t|dd��|_y)Nr��__file__r�)r�r�r�r��dirname�module_path)r�r�s  rr;zNullProvider.__init__�s0���f�l�D�9����7�7�?�?�7�6�:�r�+J�K��rc�:�|j|j|�Sr )�_fnr-�r�r&r's   rr(z"NullProvider.get_resource_filename�s���x�x��(�(�-�8�8rc�L�tj|j||��Sr )�io�BytesIOr,r0s   rr*z NullProvider.get_resource_stream�s���z�z�$�2�2�7�M�J�K�Krc�X�|j|j|j|��Sr )�_getr/r-r0s   rr,z NullProvider.get_resource_string��"���y�y����$�"2�"2�M�B�C�Crc�X�|j|j|j|��Sr )�_hasr/r-�r�r's  rr/zNullProvider.has_resource�r6rc�:�|j|j|�Sr )r/�egg_info�r�r	s  r�_get_metadata_pathzNullProvider._get_metadata_path�s���x�x��
�
�t�,�,rc�v�|js|jS|j|�}|j|�Sr )r;r=r8�r�r	r�s   rrzNullProvider.has_metadata�s1���}�}��=�=� ��&�&�t�,���y�y���rc���|jsy|j|�}|j|�}	|jd�S#t$r+}|xj
dj
||�z
c_�d}~wwxYw)Nr��utf-8z in {} file at path: {})r;r=r5�decode�UnicodeDecodeError�reasonr�)r�r	r��value�excs     rrzNullProvider.get_metadata�sn���}�}���&�&�t�,���	�	�$���	��<�<��(�(��!�	�
�J�J�3�:�:�4��F�F�J���		�s�A�	A6�&A1�1A6c�6�t|j|��Sr �rrr<s  rrzNullProvider.get_metadata_lines�����4�,�,�T�2�3�3rc�X�|j|j|j|��Sr )�_isdirr/r-r9s  rrfzNullProvider.resource_isdir�s"���{�{�4�8�8�D�$4�$4�m�D�E�Erc�t�|jxr+|j|j|j|��Sr )r;rKr/r<s  rrzNullProvider.metadata_isdir�s)���}�}�K����T�X�X�d�m�m�T�-J�!K�Krc�X�|j|j|j|��Sr )�_listdirr/r-r9s  rrdzNullProvider.resource_listdirs"���}�}�T�X�X�d�&6�&6�
�F�G�Grc�t�|jr+|j|j|j|��SgSr )r;rNr/r<s  rr zNullProvider.metadata_listdirs,���=�=��=�=����$�-�-��!>�?�?��	rc�t�d|z}|j|�s#tdjd
it�����|j	|�jdd�}|jdd�}|j
|j|�}||d<tjj|�r?t|�5}|j�}ddd�t|d�}t|||�ydd	lm}	t#|�d|j%d�|f|	|<t||d�}
t|
||�y#1swY�fxYw)Nzscripts/z<Script {script!r} not found in metadata at {self.egg_info!r}z
�
�
r+�execr)�cacher)rrtr�r�rr�r/r;r�r�r�r�read�compilerS�	linecacherTrr
)r�rr"�script�script_text�script_filename�fid�source�coderT�script_codes           rrZzNullProvider.run_script	s'���k�)��� � ��(�!�U�N�U�U���h���
�
�'�'��/�7�7���E��!�)�)�$��5���(�(�4�=�=�&�9�� /�	�*��
�7�7�>�>�/�*��o�&�#������'��6�?�F�;�D���y�)�,�'��K� ���!�!�$�'��	&�E�/�"�"�+���G�K���i��3�'�&�s�8D.�.D7c��td���Nz9Can't perform this operation for unregistered loader type��NotImplementedErrorrs  rr8zNullProvider._has&���!�G�
�	
rc��td��r`rars  rrKzNullProvider._isdir+rcrc��td��r`rars  rrNzNullProvider._listdir0rcrc��|j|�|r/tjj|g|j	d����S|S)N�/)�_validate_resource_pathr�r�rRr
)r��baser's   rr/zNullProvider._fn5s;���$�$�]�3���7�7�<�<��@�}�':�':�3�'?�@�@��rc�r�tjj|jtj
�vxs,t	j|�xstj|�}|syd}tj|�r t	j|�st|��t|dddzt�y)aH
        Validate the resource paths according to the docs.
        https://setuptools.pypa.io/en/latest/pkg_resources.html#basic-resource-access

        >>> warned = getfixture('recwarn')
        >>> warnings.simplefilter('always')
        >>> vrp = NullProvider._validate_resource_path
        >>> vrp('foo/bar.txt')
        >>> bool(warned)
        False
        >>> vrp('../foo/bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('/foo/bar.txt')
        >>> bool(warned)
        True
        >>> vrp('foo/../../bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('foo/f../bar.txt')
        >>> bool(warned)
        False

        Windows path separators are straight-up disallowed.
        >>> vrp(r'\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path is not allowed.

        >>> vrp(r'C:\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path is not allowed.

        Blank values are allowed

        >>> vrp('')
        >>> bool(warned)
        False

        Non-string values are not.

        >>> vrp(None)
        Traceback (most recent call last):
        ...
        AttributeError: ...
        Nz=Use of .. or absolute path in a resource path is not allowed.r�z/ and will raise exceptions in a future release.)r�r��pardirr
�	posixpath�sep�isabs�ntpathrU�
issue_warning�DeprecationWarning)r��invalidr�s   rrhz$NullProvider._validate_resource_path;s���l
�G�G�N�N�d�j�j����7�7�
"����t�$�
"��|�|�D�!�	�
��M���<�<���i�o�o�d�&;��S�/�!�	����H�H�H��	
rc�z�t|jd�r|jj|�Std��)N�get_dataz=Can't perform this operation for loaders without 'get_data()')r�r�rtrbrs  rr5zNullProvider._get�s5���4�;�;�
�+��;�;�'�'��-�-�!�K�
�	
r)rrrr�egg_namer;r�r;r(r*r,r/r=rrrrfrrdr rZr8rKrNr/rrhr5rrrr�r��s���O��H��H�
�F�L�9�L�D�D�-���4�F�L�H��
4�:
�

�

�
��G
��G
�R
rr�c#�xK�d}||k7r/|��|}tjj|�\}}||k7r�.yy�w)z2
    yield all parents of path including path
    N)r�r�r
)r��lastr�s   r�_parentsrx�s=�����D�
�$�,��
����'�'�-�-��%���a��$�,�s�5:�:c�.��eZdZdZ�fd�Zd�Zd�Z�xZS)r�z&Provider based on a virtual filesystemc�D��t�|�|�|j�yr )�superr;�
_setup_prefix�r�r�r�s  �rr;zEggProvider.__init__�s���
���� ����rc��ttt|j��}t	|d�}|xr|j|�yyr )�filter�_is_egg_pathrxr-�next�_set_egg)r��eggs�eggs   rr|zEggProvider._setup_prefix�s;���l�H�T�-=�-=�$>�?���4�����"��
�
�c�"�"rc��tjj|�|_tjj	|d�|_||_y)N�EGG-INFO)r�r��basenamerurRr;�egg_rootrs  rr�zEggProvider._set_egg�s5�����(�(��.��
������T�:�6��
���
r)rrrrr;r|r��
__classcell__r�s@rr�r��s���0��#�rr�c�>�eZdZdZd�Zd�Zd�Zd�Zd�Ze	d��Z
y)	r�z6Provides access to package resources in the filesystemc�@�tjj|�Sr )r�r�r�rs  rr8zDefaultProvider._has�s���w�w�~�~�d�#�#rc�@�tjj|�Sr )r�r�r	rs  rrKzDefaultProvider._isdir�s���w�w�}�}�T�"�"rc�,�tj|�Sr )r��listdirrs  rrNzDefaultProvider._listdir�s���z�z�$��rc�N�t|j|j|�d�S�N�rb)rr/r-r0s   rr*z#DefaultProvider.get_resource_stream�s ���D�H�H�T�-�-�}�=�t�D�Drc�f�t|d�5}|j�cddd�S#1swYyxYwr�)rrU)r�r��streams   rr5zDefaultProvider._get�s#��
�$��
���;�;�=��
�
�s�'�0c�b�d}|D](}tt|td��}t||��*y)N)�SourceFileLoader�SourcelessFileLoader)r��importlib_machinery�typer�)rA�loader_namesr	�
loader_clss    r�	_registerzDefaultProvider._register�s2��
��!�D� �!4�d�D��J�G�J� ��S�1�!rN)rrrrr8rKrNr*r5r�r�rrrr�r��s3��@�$�#� �E�!��2��2rr�c�0�eZdZdZdZd�xZZd�Zd�Zd�Z	y)r�z.Provider that returns nothing for all requestsNc��yr�rrs  rrGzEmptyProvider.<lambda>�s��urc��y�Nr�rrs  rr5zEmptyProvider._get�s��rc��gSr rrs  rrNzEmptyProvider._listdir�s���	rc��yr rr�s rr;zEmptyProvider.__init__�s��r)
rrrrr-rKr8r5rNr;rrrr�r��s#��8��K�,�,�F�T���
rr�c�$�eZdZdZed��ZeZy)�ZipManifestsz
    zip manifest builder
    c���tj|�5��fd��j�D�}t|�cddd�S#1swYyxYw)a
        Build a dictionary similar to the zipimport directory
        caches, except instead of tuples, store ZipInfo objects.

        Use a platform-specific path separator (os.sep) for the path keys
        for compatibility with pypy on Windows.
        c3��K�|]5}|jdtj��j|�f���7y�w)rgN)r�r�rm�getinfo)rTr	�zfiles  �rrUz%ZipManifests.build.<locals>.<genexpr>�s=������
-�D��L�L��b�f�f�-��M�M�$�'��-�s�;>N)�zipfile�ZipFile�namelistr$)rAr�r+r�s   @r�buildzZipManifests.build�s@����_�_�T�
"�e��
"�N�N�,��E���;�#�
"�
"�s�$A�AN)rrrrr�r��loadrrrr�r��s"�������$�Drr�c�<�eZdZdZej
dd�Zd�Zy)�MemoizedZipManifestsz%
    Memoized zipfile manifests.
    �manifest_modzmanifest mtimec��tjj|�}tj|�j}||vs||j
|k7r&|j
|�}|j||�||<||jS)zW
        Load a manifest at path or return a suitable manifest already loaded.
        )	r�r��normpathr��st_mtime�mtimer�r��manifest)r�r�r�r�s    rr�zMemoizedZipManifests.loadsx���w�w����%������
�&�&���t��t�D�z�/�/�5�8��z�z�$�'�H��*�*�8�U�;�D��J��D�z�"�"�"rN)rrrrrk�
namedtupler�r�rrrr�r��s#���*�;�)�)�.�:J�K�L�#rr�c���eZdZdZdZe�Z�fd�Zd�Zd�Z	e
d��Zd�Ze
d��Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Z�xZS)r�z"Resource support for zips and eggsNc�|��t�|�|�|jjtj
z|_yr )r{r;r��archiver�rm�zip_prer}s  �rr;zZipProvider.__init__s*���
���� ��{�{�*�*�R�V�V�3��rc��|jtj�}||jjk(ry|j|j�r|t|j�dSt|�d|j����)Nr�� is not a subpath of )	�rstripr�rmr�r�r�r�r�AssertionError�r��fspaths  r�
_zipinfo_namezZipProvider._zipinfo_namesh�����r�v�v�&���T�[�[�(�(�(�����T�\�\�*��#�d�l�l�+�-�.�.��F�D�L�L�Q�R�Rrc��|j|z}|j|jtjz�r8|t|j�dzdj
tj�St|�d|j����)Nr�r�)r�r�r�r�rmrr
r�)r��zip_pathr�s   r�_partszZipProvider._parts(sl������(�����T�]�]�R�V�V�3�4��#�d�m�m�,�q�0�2�3�9�9�"�&�&�A�A��F�D�M�M�R�S�Src�`�|jj|jj�Sr )�_zip_manifestsr�r�r�r�s r�zipinfozZipProvider.zipinfo0s#���"�"�'�'����(;�(;�<�<rc�*�|jstd��|j|�}|j�}dj	|j|��|vr(|D]#}|j
||j|���%|j
||�S)Nz5resource_filename() only supported for .egg, not .ziprg)rurb�_resource_to_zip�_get_eager_resourcesrRr��_extract_resource�
_eager_to_zip)r�r&r'r��eagersr	s      rr(z!ZipProvider.get_resource_filename4s����}�}�%�G��
��(�(��7���*�*�,���8�8�D�K�K��)�*�f�4����&�&�w��0B�0B�4�0H�I���%�%�g�x�8�8rc�j�|j}|jdz}tj|�}||fS)N)rrr�)�	file_size�	date_time�time�mktime)�zip_stat�sizer��	timestamps    r�_get_date_and_sizezZipProvider._get_date_and_sizeAs5���!�!���&�&��3�	��K�K�	�*�	��$��rc�b�||j�vrg|j�|D]2}|j|tjj	||��}�4tjj�S|j
|j|�\}}tstd��	|j|j|j|��}|j||�r|Stdtjj|���\}}	tj||j j#|��tj$|�t'|	||f�|j)|	|�	t+|	|�|S#tj,$retjj/|�rD|j||�r|cYStj0dk(rt3|�t+|	|�|cYS�wxYw#tj,$r|j5�YSwxYw)Nz>"os.rename" and "os.unlink" are not supported on this platformz	.$extract)�dirr�)�_indexr�r�r�rRr,r�r��
WRITE_SUPPORT�OSErrorr�rur��_is_current�_mkstemp�writer�rt�closerr�r�error�isfiler	rr�)
r�r&r�r	rwr�r��	real_path�outf�tmpnams
          rr�zZipProvider._extract_resourceKs����t�{�{�}�$����
�h�/���-�-�g�r�w�w�|�|�H�d�7S�T��0��7�7�?�?�4�(�(��1�1�$�,�,�x�2H�I��	�4���S��
�!	'��.�.�t�}�}�d�k�k�(�>S�T�I����	�8�4� � �#���G�G�O�O�I�.��L�D�&�
�H�H�T�4�;�;�/�/��9�:��H�H�T�N��&�9�i�0�1�����	�2�
��v�y�)�&���#�8�8�
��7�7�>�>�)�,��'�'�	�8�<� )�(����D���y�)��v�y�1�(�(��
���x�x�	'��$�$�&���		'�sD�->H�,BH�>F�AH�H�,H�H�H�H�#H.�-H.c��|j|j|�\}}tjj	|�sytj
|�}|j|k7s|j|k7ry|jj|�}t|d�5}|j�}ddd�||k(S#1swY|k(SxYw)zK
        Return True if the file_path is current for this zip_path
        Fr�N)r�r�r�r�r�r��st_sizer�r�rtrrU)	r��	file_pathr�r�r�r��zip_contents�f�
file_contentss	         rr�zZipProvider._is_current}s����1�1�$�,�,�x�2H�I��	�4��w�w�~�~�i�(���w�w�y�!���<�<�4��4�=�=�I�#=���{�{�+�+�H�5��
�)�T�
"�a��F�F�H�M�#��}�,�,�#��}�,�,�s�B;�;Cc��|j�Bg}dD]4}|j|�s�|j|j|���6||_|jS)N)znative_libs.txtzeager_resources.txt)r�rrrr)r�r�r	s   rr�z ZipProvider._get_eager_resources�sT���;�;���F�B���$�$�T�*��M�M�$�"9�"9�$�"?�@�C�!�D�K��{�{�rc�`�	|jS#t$r�i}|jD]y}|jtj
�}|s�%tj
j
|dd�}||vr||j|d��c|j�g||<|r�U�{||_|cYSwxYw)Nr�)	�	_dirindex�AttributeErrorr�r
r�rmrRr�rn)r��indr��parts�parents     rr�zZipProvider._index�s���	��>�>�!���	��C������
�
�2�6�6�*����V�V�[�[��s���4�F���}��F��*�*�5��9�5��',�y�y�{�m��F��
�%�!�D�N��J�	�s��;B-�
AB-�B-�,B-c�h�|j|�}||jvxs||j�vSr )r�r�r�)r�r�r�s   rr8zZipProvider._has�s1���%�%�f�-���4�<�<�'�D�8�t�{�{�}�+D�Drc�D�|j|�|j�vSr )r�r�r�s  rrKzZipProvider._isdir�s���!�!�&�)�T�[�[�]�:�:rc�r�t|j�j|j|�d��Sr�)rir�r�r�r�s  rrNzZipProvider._listdir�s+���D�K�K�M�%�%�d�&8�&8��&@�"�E�F�Frc�X�|j|j|j|��Sr )r�r/r�r9s  rr�zZipProvider._eager_to_zip�s"���!�!�$�(�(�4�=�=�-�"H�I�Irc�X�|j|j|j|��Sr )r�r/r-r9s  rr�zZipProvider._resource_to_zip�s$���!�!�$�(�(�4�+;�+;�]�"K�L�Lr)rrrrr�r�r�r;r�r�r�r�r(rr�r�r�r�r�r8rKrNr�r�r�r�s@rr�r�s����,�
�F�)�+�N�4�S�T��=��=�9�����0�d-� ��"E�;�G�J�Mrr�c�4�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	y)	r�a*Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    c��||_yr �r�rs  rr;zFileMetadata.__init__�s	����	rc��|jSr r�r<s  rr=zFileMetadata._get_metadata_path�s���y�y�rc�b�|dk(xr)tjj|j�S)N�PKG-INFO)r�r�r�r<s  rrzFileMetadata.has_metadata�s#���z�!�?�b�g�g�n�n�T�Y�Y�&?�?rc���|dk7rtd��t|jdd��5}|j�}ddd�|j	�|S#1swY�xYw)Nr�z(No metadata except PKG-INFO is availablerAr�)�encoding�errors)r�rr�rU�_warn_on_replacement)r�r	r��metadatas    rrzFileMetadata.get_metadata�sV���:���E�F�F�
�$�)�)�g�i�
@�A��v�v�x�H�A��!�!�(�+���A�
@�s�A�Ac�t�d}||vr2d}|jdit���}tj|�yy)Nu�z2{self.path} could not be properly decoded in UTF-8r)r�r�r�r�)r�r�replacement_charr�r�s     rr�z!FileMetadata._warn_on_replacement�s;�� ���x�'�G�D��$�+�+�)���)�C��M�M�#��(rc�6�t|j|��Sr rHr<s  rrzFileMetadata.get_metadata_lines�rIrN)
rrrrr;r=rrr�rrrrr�r��s&��	���@���4rr�c��eZdZdZd�Zy)r�asMetadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir, project_name=dist_name, metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    c� �||_||_yr )r-r;)r�r�r;s   rr;zPathMetadata.__init__�s����� ��
rN�rrrrr;rrrr�r��s���&!rr�c��eZdZdZd�Zy)r�z Metadata provider for .egg filesc�$�|jtjz|_||_|j
r:tjj|j|j
�|_n|j|_|j�y)z-Create a metadata provider from a zipimporterN)
r�r�rmr�r��prefixr�rRr-r|)r��importers  rr;zEggMetadata.__init__sc�� �'�'�"�&�&�0�������?�?�!�w�w�|�|�H�,<�,<�h�o�o�N�D��'�/�/�D�����rNrrrrr�r��s
��*�	rr�r$��_distribution_findersc��|t|<y)axRegister `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example.Nr)�
importer_type�distribution_finders  rr�r�s��,?��-�(rc�L�t|�}tt|�}||||�S)z.Yield distributions accessible via `path_item`)rr�r)�	path_item�onlyr
�finders    rrjrjs(���I�&�H�
�0�(�
;�F��(�I�t�,�,rc#�K�|jjd�ryt|�}|jd�rtj||����|ry|j
d�D]�}t|�rJtjj||�}ttj|�|�}|Ed{����X|j�jd�s�xtjj||�}ttj|��}||_tj!|||�����y7���w)z@
    Find eggs in zip files; possibly multiple nested eggs.
    z.whlNr��rr�)�
.dist-info�	.egg-info)r��endswithr�rrq�
from_filenamerdr�r�r�rR�find_eggs_in_zip�	zipimport�zipimporterr�r;�
from_location)r
rrr�subitem�subpathrI�submetas        rrr s������� � ��(�	��8�$�H����Z�(��(�(��X�(�F�F����,�,�R�0���� ��g�g�l�l�9�g�6�G�$�Y�%:�%:�7�%C�W�M�E����
�]�]�_�
%�
%�&A�
B��g�g�l�l�9�g�6�G�!�)�"7�"7��"@�A�G�&�G���,�,�Y���I�I�1�
�s�B8E�:E�;$E� A"Ec��yr�r)r
rrs   r�find_nothingr"=s��
rc
#��K�t���t��rBtj�t	�t
jj�d������y�fd�t��D�}t|�D]?}t
jj�|�}t�||�}||�Ed{����Ay7��w)z6Yield distributions accessible on a sys.path directoryr�rNc3�^�K�|]$}tjj�|����&y�wr )r�r�rR)rT�childrs  �rrUzfind_on_path.<locals>.<genexpr>Os#�����S�;R�%�r�w�w�|�|�I�u�-�;R�s�*-)�_normalize_cached�_is_unpacked_eggrqrr�r�r�rR�safe_listdir�sorted�dist_factory)r
rrr4r:�fullpath�factorys `     r�find_on_pathr-Ds������!�)�,�I��	�"��(�(��!�)�R�W�W�\�\�)�Z�-P�Q�)�
�	
�	�S�<�	�;R�S�G������7�7�<�<�	�5�1���y�%��6���8�$�$�$�!�	%�s�B3C�6B>�7Cc�l�|j�}|jd�}|jd�xr=tjj	tjj||��}|xs|}|rtS|st|�rtS|s|jd�rtSt�S)z*Return a dist_factory for the given entry.rrz	.egg-link)r�rr�r�r	rR�distributions_from_metadatar�rj�resolve_egg_link�NoDists)rr:rr��is_egg_info�is_dist_info�is_metas       rr*r*Xs����K�K�M�E��.�.��-�K��>�>�,�/��B�G�G�M�M�
�����Y��&�5�L��)�\�G��	$����U�+� ������{�3����Y�rc��eZdZdZd�Zd�Zy)r1zS
    >>> bool(NoDists())
    False

    >>> list(NoDists()('anything'))
    []
    c��yr�rr�s r�__bool__zNoDists.__bool__ts��rc��td�Sr�)�iter)r�r+s  r�__call__zNoDists.__call__ws���B�x�rN)rrrrr7r:rrrr1r1ks����rr1c���	tj|�S#ttf$rYyt$rF}|j
t
jt
jt
jfvr�Yd}~yd}~wwxYw)zI
    Attempt to list contents of path, but suppress some exceptions.
    Nr)	r�r��PermissionError�NotADirectoryErrorr��errno�ENOTDIR�EACCES�ENOENT)r�r$s  rr(r({sk����z�z�$�����/�0�
�����
�7�7�5�=�=�%�,�,����E�E��F�
���s��A6�A6�<A1�1A6c#�xK�tjj|�}tjj|�r/t	tj
|��dk(ryt
||�}nt|�}tjj|�}tj|||t����y�w)Nr)�
precedence)r�r�r,r	rr�r�r�r�rqrr�)r��rootrr:s    rr/r/�s�����
�7�7�?�?�4� �D�	�w�w�}�}�T���r�z�z�$�� �A�%����d�+����%���G�G���T�"�E�
�
$�
$��
���	%���s�B8B:c#�K�t|�5}|D]}|j�}|s�|���	ddd�y#1swYyxYw�w)z1
    Yield non-empty lines from file at path
    N)rr)r�r��lines   r�non_empty_linesrG�s7����
�d��q��D��:�:�<�D���
��
���s�A�7�7�	A�A�Ac�h��t��}�fd�|D�}tt|�}t|d�S)za
    Given a path to an .egg-link, resolve distributions
    present in the referenced path.
    c3��K�|]A}tjjtjj��|����Cy�wr )r�r�rRr,)rT�refr�s  �rrUz#resolve_egg_link.<locals>.<genexpr>�s2������<L�S������R�W�W�_�_�T�*�C�0�<L�s�AA
r)rGr�rjr�)r��referenced_paths�resolved_paths�dist_groupss`   rr0r0�s;���
'�t�,���<L��N��(�.�9�K���R� � r�ImpImporter��_namespace_handlers)�_namespace_packagesc��|t|<y)a�Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer, path_entry, moduleName, module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    NrO)r�namespace_handlers  rr�r��s��*;��
�&rc���t|�}|�y	|j|�}|r|jnd}�ytjj|�}|�;tj|�x}tj|<g|_
t|�nt|d�st!d|��t#t$|�}|||||�}|�?|j}|j'|�t)j*|�t-|||�|S#t$rTt	j
�5t	jd�|j|�}ddd�n#1swYnxYwY��1wxYw)zEEnsure that named package includes a subpath of path_item (if needed)N�ignore�__path__�Not a package:)r�	find_specr�r�r��catch_warnings�simplefilter�find_modulerPr�r��types�
ModuleTyperV�_set_parent_nsr�rr�rPr��	importlib�
import_module�_rebuild_mod_path)	�packageNamerr
�specr�r��handlerrr�s	         r�
_handle_nsre�s=���I�&�H����/��!�!�+�.��!%����$��
�~��
�[�[�_�_�[�
)�F�
�~�,1�,<�,<�[�,I�I�����[�)�����{�#�
�V�Z�
(��(�+�6�6��/��:�G��h�	�;��?�G����������G������,��$��V�4��N��1�7�
�
$�
$�
&��!�!�(�+��)�)�+�6�F�'�
&�
&��7�s)�D�E#�#'E�
	E#�E	�E#�"E#c�.����tjD�cgc]
}t|���c}��fd����fd�}t||��}|D�cgc]
}t|���}}t	|j
t�r||j
ddy||_ycc}wcc}w)zq
    Rebuild module.__path__ ensuring that all entries are ordered
    corresponding to their sys.path order
    c�\��	�j|�S#t$rtd�cYSwxYw)z/
        Workaround for #520 and #513.
        �inf)�indexrU�float)r:�sys_paths �r�safe_sys_path_indexz._rebuild_mod_path.<locals>.safe_sys_path_index�s0���	 ��>�>�%�(�(���	 ���<��	 �s��+�+c����|jtj�}�jd�dz}|d|}�t	tjj|���S)zR
        Return the ordinal of the path based on its position in sys.path
        rKr�N)r
r�rm�countr&rR)r��
path_parts�module_partsr��package_namerls    ��r�position_in_sys_pathz/_rebuild_mod_path.<locals>.position_in_sys_path	sX����Z�Z����'�
�#�)�)�#�.��2���>�\�M�*��"�#4�R�V�V�[�[��5G�#H�I�Ir)r=N)rPr�r&r)r�rVri)�	orig_pathrqr��prr�new_pathrlrks `    @@rrara�s����
/2�h�h�7�h��!�!�$�h�7�H� �J��i�%9�:�H�.6�7�h��!�!�$�h�H�7��&�/�/�4�(�%������"����58��*8s�B
�Bc��d|�d�}tj|td��tj�	|t
vr	tj�ytj}|jd�\}}}|r<t|�|t
vrt|�	tj|j}t
j!|xsdg�j#|�t
j!|g�|D]}t%||��	tj�y#t$r}td|�|�d}~wwxYw#tj�wxYw)z9Declare that package 'packageName' is a namespace packagez4Deprecated call to `pkg_resources.declare_namespace(z�)`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packagesrrNrKrW)r�r�rq�_imp�acquire_lockrQ�release_lockrPr��
rpartitionrgr�r�rVr�rrKr�re)rbr�r�r�r�r$rs       rrgrg	s8��?�{�o�N3�	3��
�M�M�#�)�a�8�������-�-��2	
����/�x�x��"�-�-�c�2����1���f�%��0�0��6�"�
A��{�{�6�*�3�3��	�&�&�v�~��r�:�A�A�+�N��&�&�{�B�7��I�
�{�I�.��	
�����"�
A�� 0�&�9�q�@��
A��	
����s7�D?�AD?�D!�9AD?�!	D<�*
D7�7D<�<D?�?Ec��tj�	tj|d�D]}t	||�}|s�t||��	tj�y#tj�wxYw)zDEnsure that previously-declared namespace packages include path_itemrN)rwrxrQr�rer�ry)rr��packagers    rr�r�B	s^�������*�.�.�v�r�:�G� ��)�4�G��(��'�:�;�
	
���������s�'A"�A"�"A8c���tjj||jd�d�}t	|�}|j
D]}t	|�|k(s�y|S)zBCompute an ns-package subpath for a filesystem or zipfile importerrKr�N)r�r�rRr
r&rV)r
rrbr�r�
normalizedr[s       r�file_ns_handlerrN	sW���g�g�l�l�9�k�&7�&7��&<�R�&@�A�G�"�7�+�J������T�"�j�0�� �
�rc��yr r)r
rrbr�s    r�null_ns_handlerr�b	s��rc	���tjjtjjtjj	t|����S)z1Normalize a file/dir name for comparison purposes)r�r��normcase�realpathr��
_cygwin_patch�r�s rr�r�i	s:��
�7�7���B�G�G�,�,�R�W�W�-=�-=�m�H�>U�-V�W�X�Xrc�j�tjdk(rtjj	|�S|S)a
    Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
    symlink components. Using
    os.path.abspath() works around this limitation. A fix in os.getcwd()
    would probably better, in Cygwin even more so, except
    that this seems to be by design...
    �cygwin)rPrQr�r��abspathr�s rr�r�n	s'��),����(@�2�7�7�?�?�8�$�N�h�Nrc�P�	||S#t$rt|�x||<}|cYSwxYwr )r�r�)r�r��results   rr&r&y	s:����h������$2�8�$<�<��x��6��
��s��%�%c�2�t|�xst|�S)z7
    Determine if given path appears to be an egg.
    )�_is_zip_eggr'r�s rr�r��	s���t��6� 0�� 6�6rc��|j�jd�xr6tjj	|�xrtj|�S)N�.egg)r�rr�r�r�r��
is_zipfiler�s rr�r��	sC���
�
����f�%�	%��G�G�N�N�4� �	%����t�$�rc��|j�jd�xr>tjj	tjj|dd��S)z@
    Determine if given path appears to be an unpacked egg.
    r�r�r�)r�rr�r�r�rRr�s rr'r'�	sE���:�:�<� � ��(��R�W�W�^�^�
�����T�:�z�2�.�rc���|jd�}|j�}|rAdj|�}ttj
||tj
|�yy)NrK)r
rnrR�setattrrPr�)rbr�r	r�s    rr^r^�	sP�����c�"�E��9�9�;�D�����%�������F�#�T�3�;�;�{�+C�D�
rz\w+(\.\w+)*$z�
    (?P<name>[^-]+) (
        -(?P<ver>[^-]+) (
            -py(?P<pyver>[^-]+) (
                -(?P<plat>.+)
            )?
        )?
    )?
    c��eZdZdZdd�Zd�Zd�Zdd�Zd�Zdd�Z	e
jd	�Ze
dd
��Ze
d��Ze
dd��Ze
dd
��Zy)rsz3Object representing an advertised importable objectNc��t|�std|��||_||_t	|�|_t	|�|_||_y)NzInvalid module name)�MODULErUr	�module_name�tuple�attrsrqr�)r�r	r�r�rqr�s      rr;zEntryPoint.__init__�	sD���k�"��2�K�@�@���	�&����5�\��
��F�m�����	rc���|j�d|j��}|jr!|ddj|j�zz
}|jr!|ddj|j�zz
}|S)Nz = �:rKz [%s]�,)r	r�r�rRrq)r��ss  rr�zEntryPoint.__str__�	sa�����D�$4�$4�5���:�:�
��s�x�x��
�
�+�+�+�A��;�;�
��3�8�8�D�K�K�0�0�0�A��rc��dt|�zS)NzEntryPoint.parse(%r)�r�r�s rr�zEntryPoint.__repr__�	s��%��D�	�1�1rc��|r|s|rtjdtd��|r|j|i|��|j	�S)zH
        Require packages for this EntryPoint, then resolve it.
        zJParameters to load are deprecated.  Call .resolve and .require separately.rr)r�r�r�rYrE)r�rYrF�kwargss    rr�zEntryPoint.load�	sF���$�&��M�M�'�.��	
���D�L�L�$�)�&�)��|�|�~�rc���t|jdgd��}	tjt|j
|�S#t$r}tt|��|�d}~wwxYw)zD
        Resolve the entry point from its module and attrs.
        rr)�fromlist�levelN)	r�r��	functools�reducer�r�r�r?r�)r�r�rFs   rrEzEntryPoint.resolve�	sY���D�,�,�
�|�1�M��	1��#�#�G�T�Z�Z��@�@���	1��c�#�h�'�S�0��	1�s�$A�	A#�	A�A#c�"�|jr|jstd|��|jj|j�}tj||||j��}t
ttj|��y)Nz&Can't require() without a distribution)rq)	rqr�rwrXrhrErir�rF)r�rurvrHr+s     rrYzEntryPoint.require�	sg���;�;�t�y�y��G��N�N��y�y�!�!�$�+�+�.���#�#�D�#�y����#�M���S����%�
(�)rz]\s*(?P<name>.+?)\s*=\s*(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+))?\s*(?P<extras>\[.*\])?\s*$c��|jj|�}|sd}t||��|j�}|j	|d�}|dr|djd�nd}||d|d|||�S)aParse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1, extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        z9EntryPoint must be in 'name=module:attrs [extras]' formatrq�attrrKrr	r�)�patternrOrU�	groupdict�
_parse_extrasr
)rA�srcr�rWr��resrqr�s        rrzEntryPoint.parse�	s���
�K�K���c�"���M�C��S�#�&�&��k�k�m���"�"�3�x�=�1��*-�f�+��F��!�!�#�&�2���3�v�;��H�
�u�f�d�C�Crc�|�|sytjd|z�}|jr
t��|jS)Nr�x)rrr�specsrUrq)rA�extras_specr�s   rr�zEntryPoint._parse_extras

s6��������k� 1�2���9�9��,���z�z�rc���t|�std|��i}t|�D]H}|j||�}|j|vrtd||j��|||j<�J|S)zParse an entry point groupzInvalid group namezDuplicate entry point)r�rUrrr	)rArT�linesr��thisrF�eps       r�parse_groupzEntryPoint.parse_group
sp���e�}��1�5�9�9�����&�D����4��&�B��w�w�$�� �!8�%����I�I��D����M�	'�
�rc��t|t�r|j�}nt|�}i}|D]K\}}|�|s�t	d��|j�}||vrt	d|��|j
|||�||<�M|S)z!Parse a map of entry point groupsz%Entry points must be listed in groupszDuplicate group name)r�r$r+rrUrr�)rA�datar��mapsrTr�s      r�	parse_mapzEntryPoint.parse_map 
s����d�D�!��:�:�<�D�!�$�'�D��� �L�E�5��}��� �!H�I�I��K�K�M�E���}� �!7��?�?��/�/�%���=�D��K�!��r)rrNr�)NNr )rrrrr;r�r�r�rErYrrVr�r�rr�r�r�rrrrsrs�	s���=���2�
�1�*��b�j�j�	#��G��D��D�&�����
��
����rrsc��d�}t||�}tt|�d�}|jd�\}}}t	|j��xsdS)z�
    Given an iterable of lines from a Metadata file, return
    the value of the Version field, if present, or None otherwise.
    c�@�|j�jd�S)Nzversion:)r�r�)rFs r�is_version_linez+_version_from_file.<locals>.is_version_line:
s���z�z�|�&�&�z�2�2rr�r�N)rr�r9�	partitionr|r)r�r��
version_linesrFr�rEs      r�_version_from_filer�4
sP��3��?�E�2�M���]�#�R�(�D��.�.��%�K�A�q�%�����
�&�.�$�.rc���eZdZdZdZddddedefd�Zed*d��Z	d�Z
ed��Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zed��Zed��Zed��Zed��Zed��Zed��Zd�Zd+d�Zd�Zd�Zd�Zd,d�Z d�Z!d�Z"d�Z#d�Z$�fd�Z%ed*d ��Z&d!�Z'd"�Z(d*d#�Z)d$�Z*d,d%�Z+d&�Z,d'�Z-d(�Z.ed)��Z/�xZ0S)-rqz5Wrap an actual or potential sys.path entry w/metadatar�Nc��t|xsd�|_|�t|�|_||_||_||_||_|xst|_	y)N�Unknown)
r{rsr|�_versionr�rQr`rCr��	_provider)r�r`rrsr�r�rQrCs        rr;zDistribution.__init__H
sP��&�l�&?�i�@�����(��1�D�M�$��� ��
� ��
�$���!�3�^��rc�<�dgdz\}}}}tjj|�\}}	|	j�tvr=t|	j�}t|�}
|
r|
j
dddd�\}}}}|||f||||d�|��j�S)Nr�r	�ver�pyverrV)rsr�r�rQ)r�r��splitextr��_distributionImpl�EGG_NAMErT�_reload_version)rAr`r�rr'rsr�r�rQ�extrOs           rrzDistribution.from_location[
s���7;�f�q�j�3��g�z�8����(�(��2�
��#��9�9�;�+�+�#�C�I�I�K�0�C��X�&�E��>C�k�k��E�7�F�?�;��g�z�8����
�&��!��

��
��/�
�	rc��|Sr rr�s rr�zDistribution._reload_versionq
s���rc��|j|j|j|j|jxsd|j
xsdfSr�)�_forgiving_parsed_versionrCr=r`r�rQr�s rr�zDistribution.hashcmpt
sD��
�*�*��O�O��H�H��M�M��O�O�!�r��M�M��R�

�	
rc�,�t|j�Sr )�hashr�r�s r�__hash__zDistribution.__hash__
s���D�L�L�!�!rc�4�|j|jkSr �r��r�r�s  r�__lt__zDistribution.__lt__�
����|�|�e�m�m�+�+rc�4�|j|jkSr r�r�s  r�__le__zDistribution.__le__�
����|�|�u�}�}�,�,rc�4�|j|jkDSr r�r�s  r�__gt__zDistribution.__gt__�
r�rc�4�|j|jk\Sr r�r�s  r�__ge__zDistribution.__ge__�
r�rc�b�t||j�sy|j|jk(Sr�)r�r�r�r�s  r�__eq__zDistribution.__eq__�
s&���%����0���|�|�u�}�}�,�,rc��||k(Sr rr�s  r�__ne__zDistribution.__ne__�
����5�=� � rc��	|jS#t$r&|jj�x|_}|cYSwxYwr )�_keyr�rsr�r�s  rr=zDistribution.key�
s@��	��9�9����	�"�/�/�5�5�7�7�D�I���J�	�s��,=�=c��t|d�s'	t|j�|_|jS|jS#tjj
$ra}d|j�d�}t|d�r|j|��tjjt|��d|���d�d}~wwxYw)N�_parsed_versionz
(package: �)�add_noter�)	r�rzr�r�rrrsr�r�)r��ex�infos   r�parsed_versionzDistribution.parsed_version�
s����t�.�/�
V�'4�T�\�\�'B��$��#�#�#�t�#�#�#���$�$�3�3�
V�#�D�$5�$5�#6�a�8���2�z�*��K�K��%���'�'�6�6�#�b�'��!�D�6�7J�K�QU�U��
V�s�A�B>�AB9�9B>c
��	|jS#tjj$r�}t	t|j��|_djt|dg��}dt|��d|�d|j�d|j�d�	}tj|t�|jcYd}~Sd}~wwxYw)NrQ�	__notes__zg!!


            *************************************************************************
            zl

            This is a long overdue deprecation.
            For the time being, `pkg_resources` will use `z�`
            as a replacement to avoid breaking existing environments,
            but no future compatibility is guaranteed.

            If you maintain package z� you should implement
            the relevant changes to adequate the project to PEP 440 immediately.
            *************************************************************************
            

!!
            )r�rr�rrzrr�rRr�r�rsr�r�rq)r�r��notesr�s    rr�z&Distribution._forgiving_parsed_version�
s���	(��&�&�&��� � �/�/�	(�#0�1C�D�L�L�1Q�#R�D� ��I�I�g�b�+�r�:�;�E�
�
��W�I�R��w�;�<@�;O�;O�:P�Q%�&*�%6�%6�$7�8
�
�C�
�M�M�#�1�2��'�'�'��)	(�s��C�BC�;C�Cc��	|jS#t$rb}|j�}|�D|j|j�}dj|j|�}t
||�|�|cYd}~Sd}~wwxYw)Nz4Missing 'Version:' header and/or {} file at path: {})r�r��_get_version�_get_metadata_path_for_display�PKG_INFOr�rU)r�r$r�r�r�s     rr�zDistribution.version�
sw��	��=�=� ���		��'�'�)�G����:�:�4�=�=�I��M�U�U��M�M�4���!��d�+��2��N��		�s��	A9�AA4�.A9�4A9c��	|jS#t$r2|j|j��|_Y|jSwxYw)z~
        A map of extra to its list of (direct) requirements
        for this distribution, including the null extra.
        )�_Distribution__dep_mapr��_filter_extras�_build_dep_mapr�s r�_dep_mapzDistribution._dep_map�
sH��	H��>�>�!���	H�!�0�0��1D�1D�1F�G�D�N��~�~��	H�s��-A	�A	c�,�ttd|��D]{}|}|j|�}|jd�\}}}|xrt	|�xst|�}|rg}t
|�xsd}|j|g�j|��}|S)z�
        Given a mapping of extras to dependencies, strip off
        environment markers and filter out any dependencies
        not matching the markers.
        Nr�)	rirrnr�r�r�r�rKrr)�dmr��	new_extrarHr�r��fails_markers       rr�zDistribution._filter_extras�
s����&��r�*�+�E��I��6�6�%�=�D�#(�?�?�3�#7� �I�q�&�!���v�&�E�o�f�.E�*E�
����"�9�-�5��I��M�M�)�R�(�/�/��5�,��	rc��i}dD]N}t|j|��D]/\}}|j|g�jt	|���1�P|S)N)zrequires.txtzdepends.txt)r�
_get_metadatarKrrry)r�r�r	r�rHs     rr�zDistribution._build_dep_map�
sV��
��1�D�-�d�.@�.@��.F�G���t��
�
�e�R�(�/�/�0B�4�0H�I� H�2��	rc���|j}g}|j|jdd��|D] }	|j|t|���"|S#t$r}t|�d|���|�d}~wwxYw)z@List of Requirements needed for this distro if `extras` are usedNrz has no such extra feature )r�rrr�r�r�rw)r�rqr��depsr�r$s      rrXzDistribution.requiress|��
�]�]�������B�F�F�4��$�%��C�
����B�z�#��/�0�����	�
�"�9=�s�C�����
�s�A�	A6� A1�1A6c�\�	|jj|�}|S#t$rYywxYw)zK
        Return the path to the given metadata file, if available.
        z[could not detect])r�r=r�r?s   rr�z+Distribution._get_metadata_path_for_displays8��		(��>�>�4�4�T�:�D�����	(�'�	(�s��	+�+c#�fK�|j|�r|j|�Ed{���yy7��wr )rrr<s  rrzDistribution._get_metadata!s0�������T�"��.�.�t�4�4�4�#�4�s�&1�/�1c�R�|j|j�}t|�}|Sr )rr�r�)r�r�r�s   rr�zDistribution._get_version%s%���"�"�4�=�=�1��$�U�+���rc��|�tj}|j||��|tjurJt|j�|jd�D] }|tjvs�t|��"yy)z>Ensure distribution is importable on `path` (default=sys.path)Nr^�namespace_packages.txt)rPr�r_r�r`rr�rg)r�r�r��pkgs    r�activatezDistribution.activate+sh���<��8�8�D����t�W��-��3�8�8��$�T�]�]�3��)�)�*B�C���#�+�+�%�%�c�*�D�rc���t|j��dt|j��d|jxst��}|j
r|d|j
zz
}|S)z@Return what this distribution's standard .egg filename should berLz-py)r�rsr�r�r�rQ)r�r�s  rruzDistribution.egg_name6sU��
��)�)�*�����%��O�O�'�x�'�
���=�=���d�m�m�+�+�H��rc�T�|jr|�d|j�d�St|�S)Nz (r�)r`r�r�s rr�zDistribution.__repr__Bs"���=�=� $�d�m�m�4�4��t�9�rc�n�	t|dd�}|xsd}|j�d|��S#t$rd}Y�$wxYw)Nr�z[unknown version]r�)r�rUrs)r�r�s  rr�zDistribution.__str__HsI��	��d�I�t�4�G��0�0���+�+�W�5�5���	��G�	�s�
&�4�4c�f�|jd�rt|��t|j|�S)zADelegate all unrecognized public attributes to .metadata providerr�)r�r�r�r�)r�r�s  r�__getattr__zDistribution.__getattr__Ps*���?�?�3�� ��&�&��t�~�~�t�,�,rc���tttt|���td�|j
j	�D��z�S)Nc3�DK�|]}|jd�r�|���y�w�r�N)r�)rTr�s  rrUz'Distribution.__dir__.<locals>.<genexpr>Ys����X�#;�4�4�?�?�SV�CW�$�#;�s� � )rirmr{rq�__dir__r�)r�r�s �rrzDistribution.__dir__VsC������l�D�1�3�4��X�4�>�>�#9�#9�#;�X�X�
Y�
�	
rc�x�|jt|�tjj	|�|fi|��Sr )rr&r�r�r�)rAr�rr's    rrzDistribution.from_filename\s:�� �s� � ��h�'����)9�)9�(�)C�X�
�QS�
�	
rc��t|jtjj�r|j
�d|j��}n|j
�d|j��}tj|�S)z?Return a ``Requirement`` that matches this distribution exactlyz==z===)r�r�rr�rrsrrr)r�rcs  rr�zDistribution.as_requirementbs[���d�)�)�9�+<�+<�+D�+D�E�#�0�0�$�2E�2E�F�D� $� 1� 1�4�3F�3F�G�D�� � ��&�&rc�l�|j||�}|�td||f�d���|j�S)z=Return the `name` entry point of `group` or raise ImportErrorzEntry point z
 not found)r_r?r�)r�rTr	r�s    rr]zDistribution.load_entry_pointks7��
�
 �
 ���
-��
�:��U�D�M�K�L�L��w�w�y�rc��	|j}|�|j|i�S|S#t$r/tj|j	d�|�x}|_Y�MwxYw)rzentry_points.txt)�_ep_mapr�rsr�rr�)r�rT�ep_maps   rr^zDistribution.get_entry_maprsi��	��\�\�F�
���:�:�e�R�(�(��
��
�	�$.�$8�$8��"�"�#5�6��%�
�F�T�\�	�s�$�5A�Ac�B�|j|�j|�Sr)r^r�rVs   rr_zDistribution.get_entry_info~s���!�!�%�(�,�,�T�2�2rc���|xs|j}|syt|�}tjj	|�}|D�cgc]}|xrt|�xs|��}}t|�D]|\}}||k(r|rn�y||k(s�|jtk(s�+|s	|||dvry|tjur|j�|j||�|j||�nJ|tjur|j�|r|jd|�y|j|�y		|j||dz�}	||	=||	=|	}�cc}w#t$rYywxYw)a�Ensure self.location is on path

        If replace=False (default):
            - If location is already in path anywhere, do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent.
              - Else: add to the end of path.
        If replace=True:
            - If location is already on path anywhere (not eggs)
              or higher priority than its parent (eggs)
              do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent,
                removing any lower-priority entries.
              - Else: add it to the front of path.
        Nrr�)r`r&r�r�r,�	enumeraterCr�rP�check_version_conflictrdr�rirU)
r�r��locr��nloc�bdirrt�npathr[�nps
          rr_zDistribution.insert_on�sv��(�"�T�]�]���� ��%���w�w���t�$��<@�A�D�q�!�,�)�!�,�1��1�D��A� ��'�G�A�t��t�|�������$�/�/�X�"=� �T�U�1�2�Y�%6���3�8�8�#��/�/�1����A�s�#����Q��%��#(�&�s�x�x���+�+�-�����A�s�#�
����C� ���
��[�[��q�1�u�-���"�I�t�B�x�����=B��B�
��	�
�s�E�3E�	E"�!E"c
���|jdk(rytj|jd��}t	|j
�}|jd�D]�}|tjvs||vs|tvr�"|dvr�'ttj|dd�}|r6t	|�j|�s|j|j
�r�}td|�d|�d|j
�d	����y)
N�
setuptoolsrz
top_level.txt)�
pkg_resourcesr#�siter+zModule z was already imported from z, but z is being added to sys.path)r=r$r%rr�r`rPr�rQr�r�rp)r��nspr�modname�fns     rrz#Distribution.check_version_conflict�s����8�8�|�#���m�m�D�.�.�/G�H�I���T�]�]�+���)�)�/�:�G��s�{�{�*��c�>��1�1���A�A������W�-�z�4�@�B���r�"�-�-�c�2�b�m�m�D�M�M�6R���")�2�t�}�}�>�
�;rc�~�	|jy#t$rtdt|�z�Yyt$rYywxYw)NzUnbuilt egg for FT)r�rUrpr��SystemErrorr�s rr�zDistribution.has_version�sD��	��L�L���
�	��,�t�D�z�9�:���	��	�s�� <�<�<c	���d}|j�D]}|j|t||d���!|jd|j�|jdi|��S)z@Copy this distribution, substituting in any changed keyword argsz<project_name version py_version platform location precedenceNrr)r
rKr�r�r�)r�r'r�r�s    r�clonezDistribution.clone�sT��N���K�K�M�D��M�M�$���d�D� 9�:�"�
�
�
�j�$�.�.�1��t�~�~�#��#�#rc�F�|jD�cgc]}|s�|��	c}Scc}wr )r�)r��deps  rrqzDistribution.extras�s ��#�}�}�4�}����}�4�4��4s��r rr�)1rrrrr�r�r�r;r�rr�r�r�r�r�r�r�r�r�r�r=r�r�r�r�rr�r�rXr�rr�r	rur�r�rrrr�r]r^r_r_rr�r,rqr�r�s@rrqrqC
sx���?��H��������4�&����*��
��
�"�,�-�,�-�-�!������$��$��(��(�2�����	��	�����(���"5��	+�
��6�-�
��
��
�
'��
�3�
B�H�4	�$��5��5rrqc��eZdZd�Zy)�EggInfoDistributionc�8�|j�}|r||_|S)a�
        Packages installed by distutils (e.g. numpy or scipy),
        which uses an old safe_version, and so
        their version numbers can get mangled when
        converted to filenames (e.g., 1.11.0.dev0+2329eae to
        1.11.0.dev0_2329eae). These distributions will not be
        parsed properly
        downstream by Distribution and safe_version, so
        take an extra step and try to get the version number from
        the metadata file itself instead of the filename.
        )r�r�)r��
md_versions  rr�z#EggInfoDistribution._reload_version�s!���&�&�(�
��&�D�M��rN)rrrr�rrrr0r0�s��rr0c�^�eZdZdZdZejd�Zed��Z	ed��Z
d�Zy)�DistInfoDistributionzV
    Wrap an actual or potential sys.path entry
    w/metadata, .dist-info style.
    �METADATAz([\(,])\s*(\d.*?)\s*([,\)])c���	|jS#t$r\|j|j�}tj
j
�j|�|_|jcYSwxYw)zParse and cache metadata)�	_pkg_infor�rr��email�parser�Parser�parsestr)r�rs  r�_parsed_pkg_infoz%DistInfoDistribution._parsed_pkg_infos]��	"��>�>�!���	"��(�(����7�H�"�\�\�0�0�2�;�;�H�E�D�N��>�>�!�	"�s��A"A3�2A3c�|�	|jS#t$r$|j�|_|jcYSwxYwr )�_DistInfoDistribution__dep_mapr��_compute_dependenciesr�s rr�zDistInfoDistribution._dep_maps:��	"��>�>�!���	"�!�7�7�9�D�N��>�>�!�	"�s��*;�;c����dgix}|_g�|jjd�xsgD]}�jt	|����fd�}tjtj|d���}|dj|�|jjd�xsgD]9}t|j��}||�D�cgc]	}||vs�|��c}||<�;|Scc}w)z+Recompute this distribution's dependencies.Nz
Requires-Distc3�x�K��D]0}|jr|jjd|i�s�-|���2y�w)Nr�r�)r�r�rHs  �r�reqs_for_extrazBDistInfoDistribution._compute_dependencies.<locals>.reqs_for_extra0s3��������z�z�S�Z�Z�%8�%8�'�5�9I�%J��I��s�/:�:zProvides-Extra)r>r<�get_allrrryr\�MappingProxyTyper$r%r�r)	r�r�r�rB�commonr��s_extra�rrHs	        @rr?z*DistInfoDistribution._compute_dependencies's����#�R�j�(��T�^����(�(�0�0��A�G�R�G�C��K�K�*�3�/�0�H�	�
�'�'��
�
�n�T�6J�(K�L��
�4�������*�*�2�2�3C�D�J��J�E� �����/�G�&4�U�&;�O�&;��q���1�&;�O�B�w�K�K��	��Ps�	C1�#C1N)rrrrr�rrV�EQEQr�r<r�r?rrrr4r4sJ���
�H��2�:�:�4�5�D�
�"��"��"��"�rr4)r�rrc��d}t�}	tj|�j|ur'|dz
}tj|�j|ur�'tj|d|dzi|��y#t$rY�&wxYw)Nr�r)r!rPrrrUr�r�)rFr'r�r.s    rrprpFs~��
�E��	�A�
��m�m�E�"�,�,��1��Q�J�E��m�m�E�"�,�,��1�
�M�M��4�U�Q�Y�4��4���
��
�s�AA1�1	A=�<A=c�b�tttttt	|����S)z�
    Yield ``Requirement`` objects for each specification in `strs`.

    `strs` must be a string, or a (possibly-nested) iterable thereof.
    )r�rrr
rr)�strss rryrySs#���{�-�c�,��D�@Q�.R�S�T�Trc��eZdZdZy)�RequirementParseErrorz,Compatibility wrapper for InvalidRequirementNrrrrrMrM\s��2rrMc�L��eZdZ�fd�Zd�Zd�Zd�Zd�Zd�Ze	d��Z
�xZS)rrc�f��tt|�|�|j|_t|j�}||j
�c|_|_|jD�cgc]}|j|jf��c}|_ttt|j ��|_|j|j"|jt%|j �|j&rt)|j&�ndf|_t-|j*�|_ycc}w)z>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!N)r{rrr;r	�unsafe_namer{r�rsr=�	specifierr�r�r�r�r�r�rq�url�	frozensetr�r��hashCmpr��_Requirement__hash)r��requirement_stringrsrcr�s    �rr;zRequirement.__init__as����
�k�4�)�*<�=��9�9��� ����+��&2�L�4F�4F�4H�#���4�8�@D���O���t�}�}�d�l�l�3��O��
��C�
�D�K�K�8�9����H�H��H�H��N�N��d�k�k�"� $���C������
����4�<�<�(����Ps�&D.c�X�t|t�xr|j|jk(Sr )r�rrrTr�s  rr�zRequirement.__eq__rs!���%��-�O�$�,�,�%�-�-�2O�Orc��||k(Sr rr�s  rr�zRequirement.__ne__ur�rc��t|t�r&|j|jk7ry|j}|jj|d��S)NFT)�prereleases)r�rqr=r�rQ�contains)r�r[s  rrNzRequirement.__contains__xsD���d�L�)��x�x�4�8�8�#���<�<�D�
�~�~�&�&�t��&�>�>rc��|jSr )rUr�s rr�zRequirement.__hash__�s���{�{�rc��dt|�zS)NzRequirement.parse(%r)r�r�s rr�zRequirement.__repr__�s��&��T��2�2rc� �t|�\}|Sr )ry)r�r�s  rrzRequirement.parse�s��#�A�&����
r)rrrr;r�r�rNr�r�rrr�r�s@rrrrr`s6���)�"P�!�
?��3����rrrc�*�t|vr
|tfzS|S)zJ
    Ensure object appears in the mro even
    for old-style classes.
    )�object)�classess r�_always_objectrb�s��
�W���&��"�"��Nrc��ttjt|dt	|����}|D]
}||vs�||cSy)z2Return an adapter factory for `ob` from `registry`r�N)rb�inspect�getmror�r�)�registryr>r\�ts    rr�r��s=���7�>�>�'�"�k�4��8�*L�M�N�E�
����=��A�;��rc�p�tjj|�}tj|d��y)z1Ensure that the parent directory of `path` existsT)�exist_okN)r�r�r,�makedirs)r�r,s  rr�r��s"���g�g�o�o�d�#�G��K�K��$�'rc��tstd��t|�\}}|r(|r%t|�st	|�	t|d�yyyy#t$rYywxYw)z/Sandbox-bypassing version of ensure_directory()z*"os.mkdir" not supported on this platform.i�N)r�r�r
r	r�r�FileExistsError)r�r,r�s   rr�r��s^����B�C�C��d���G�X��8�E�'�N� ��)�	��'�5�!�%3�8�w���	��	�s�A�	A�Ac#�K�d}g}t|�D]a}|jd�r=|jd�r |s|r||f��|ddj�}g}�Et	d|��|j|��c||f��y�w)asSplit a string or iterable thereof into (section, content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    N�[�]r�r�zInvalid section heading)rr�rrrUr�)r��section�contentrFs    rrr�s������G��G��A����?�?�3���}�}�S�!��g�!�7�*�*��q��*�*�*�,���� �!:�D�A�A��N�N�4� ���7�
��s�A;A=c��tj}	tt_tj|i|��|t_S#|t_wxYwr )r�r�os_open�tempfile�mkstemp)rFr'�old_opens   rr�r��s;���w�w�H���������,��,�����(���s�#A�
ArU)�categoryr�c��||i|��|Sr r)r�rFr�s   r�_call_asidery�s���t��v���Hrc�j��t���|d<|j�fd�t��D��y)z=Set up global resource manager (deliberately not state-saved)�_managerc3�\�K�|]#}|jd�s|t�|�f���%y�wr)r�r�)rTr	r&s  �rrUz_initialize.<locals>.<genexpr>�s1�����
� �D����s�#�
�w�w��%�&� �s�),N)rpr"r�)r.r&s @r�_initializer}�s3�����G��A�j�M��H�H�
���L�
�rc��eZdZdZy)r�z�
    Base class for warning about deprecations in ``pkg_resources``

    This class is not derived from ``DeprecationWarning``, and as such is
    visible by default.
    Nrrrrr�r��s��rr�c��tj�}td|��|j}|j}|j
}|j}|}td�|D��|d�d��g|_tt|jtj��t�jt!��y)aE
    Prepare the master working set and make the ``require()``
    API available.

    This function has explicit effects on the global state
    of pkg_resources. It is intended to be invoked once at
    the initialization of this module.

    Invocation by other packages is unsupported and done
    at their own risk.
    r`)rhc3�@K�|]}|jd�����y�w)Fr^N�r	)rTr�s  rrUz1_initialize_master_working_set.<locals>.<genexpr>
s����	?�;�4�$�-�-��-�
&�;�s�c�&�|jd��S)NTr^r�r
s rrGz0_initialize_master_working_set.<locals>.<lambda>
s��T�]�]�4�]�0rF)r�N)rorCr(rYr`r�rZr�r4rir�r9rPr�r!r"r�)rhrYr`rirZr�s      r�_initialize_master_working_setr��s����*�*�,�K��8��5��!�!�G�#�5�5��)�3�3���'�'�J��H�

�	?�;�	?�?��0����K����[�
"�
"�C�H�H�	-�.��I���V�X�rr r)�rrPr�r2r�rr\r�rr�r�r��pkgutilr�rQrkr��email.parserr8r>rtr�rdrorlr_rrwr?�imprl�	NameErrorr�rrrrr�rrs�os.pathr	r
�importlib.machinery�	machineryr�r� pkg_resources.extern.jaraco.textrrr
�pkg_resources.externrrr��version_info�RuntimeErrorrYrhri�resources_streamrl�resource_dirrbrkrfrar`rdrcrerrPrQr�rqrV�Ir�RuntimeWarningrr�rrzr#r(r1r4r9r?rArC�
_sget_none�
_sset_nonerX�__all__r�rtrur�rvrwr�r�r�r�r�r�r�r�r�r[rSr�rMrNr�r}r~rZr�r\r]r^r_r�r�ror$rjrnr�rxrprmr{r|rrr�r�r�r�r�r`rxr�r�r�r�r�r�r�r�rr�r�r�r�rjrr"r-r*r1r(r/rGr0r�rN�
FileFinderr�rerargr�rr�r�r�r&r�r�r'r^rOr��VERBOSE�
IGNORECASEr�rsr�rqr0r4r�rpryrt�InvalidRequirementrMrrrbr�r�r�rr��filterwarningsryr!r}�Warningr�r�rrr�<module>r�s����&�	�	��	�����������������
��� ���
��
��(�(��M�
� ��5�� � ���.�*�
�3�4�
�6�7�
�8�9�
�3�4�
�1�2����f��
�8�
9�9�������������������������������������
�
�B���	��2�:�:�M�r�t�t�T���N���!�!�)�)�
���3�
����
��-�,�
�Z��0S��l9�i�9�0�o�0�@
��
��?��:I�?�I����7�>�>�3�+�+�,���������
���8�
>��
� N��2 �R�Z�Z� ;�<�� �b�j�j�!C�D��!��.�b6����@�
7�
>�
L�L�.N�)�N�8X&�X&�v2��2�(M�M�b%��
�l�
� n�n�d�/�	6�"�2@�9�"��$�@
�@
�F�V�\�*�&��,��(2�k�2�<����
�L�
�"����4��6#�<�#�*aM�+�aM�H�Y�*�*�K�8�&4�=�&4�R!�?�!�2�+���v�R�0�?�-�J�4�	�%�%�'7�8�����%�%�(�&
�
� 
� �$�
!��7�M�"��G�'�'��6��#�.�.��=��v�2�.��v�2�.�;�$"�J#�D(�V	�
��7�M�"��w�2�2�O�D��9�0�0�/�B��.�9�9�?�K���6�?�3�Y�
O�(*��7���E�
����O�	$�	*�	*���2�:�:���J�J�������%�	�A�A�H/�s5�s5�l
�,��&0�<�0�h
�$�&���
5�U�3�I�2�2�E�E�3�-�)�(�(�4�4�-�`��(�
��4������=��F�
�

��)��
���W��
�!�
�!��[f��������O������M��������sH�*U6�/V�8V�V"�6	V�V�V�V�V�V�"V-�,V-python3.12/site-packages/pkg_resources/_vendor/packaging/_elffile.py000064400000006302151732700750021473 0ustar00"""
ELF file parser.

This provides a class ``ELFFile`` that parses an ELF executable in a similar
interface to ``ZipFile``. Only the read interface is implemented.

Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
"""

import enum
import os
import struct
from typing import IO, Optional, Tuple


class ELFInvalid(ValueError):
    pass


class EIClass(enum.IntEnum):
    C32 = 1
    C64 = 2


class EIData(enum.IntEnum):
    Lsb = 1
    Msb = 2


class EMachine(enum.IntEnum):
    I386 = 3
    S390 = 22
    Arm = 40
    X8664 = 62
    AArc64 = 183


class ELFFile:
    """
    Representation of an ELF executable.
    """

    def __init__(self, f: IO[bytes]) -> None:
        self._f = f

        try:
            ident = self._read("16B")
        except struct.error:
            raise ELFInvalid("unable to parse identification")
        magic = bytes(ident[:4])
        if magic != b"\x7fELF":
            raise ELFInvalid(f"invalid magic: {magic!r}")

        self.capacity = ident[4]  # Format for program header (bitness).
        self.encoding = ident[5]  # Data structure encoding (endianness).

        try:
            # e_fmt: Format for program header.
            # p_fmt: Format for section header.
            # p_idx: Indexes to find p_type, p_offset, and p_filesz.
            e_fmt, self._p_fmt, self._p_idx = {
                (1, 1): ("<HHIIIIIHHH", "<IIIIIIII", (0, 1, 4)),  # 32-bit LSB.
                (1, 2): (">HHIIIIIHHH", ">IIIIIIII", (0, 1, 4)),  # 32-bit MSB.
                (2, 1): ("<HHIQQQIHHH", "<IIQQQQQQ", (0, 2, 5)),  # 64-bit LSB.
                (2, 2): (">HHIQQQIHHH", ">IIQQQQQQ", (0, 2, 5)),  # 64-bit MSB.
            }[(self.capacity, self.encoding)]
        except KeyError:
            raise ELFInvalid(
                f"unrecognized capacity ({self.capacity}) or "
                f"encoding ({self.encoding})"
            )

        try:
            (
                _,
                self.machine,  # Architecture type.
                _,
                _,
                self._e_phoff,  # Offset of program header.
                _,
                self.flags,  # Processor-specific flags.
                _,
                self._e_phentsize,  # Size of section.
                self._e_phnum,  # Number of sections.
            ) = self._read(e_fmt)
        except struct.error as e:
            raise ELFInvalid("unable to parse machine and section information") from e

    def _read(self, fmt: str) -> Tuple[int, ...]:
        return struct.unpack(fmt, self._f.read(struct.calcsize(fmt)))

    @property
    def interpreter(self) -> Optional[str]:
        """
        The path recorded in the ``PT_INTERP`` section header.
        """
        for index in range(self._e_phnum):
            self._f.seek(self._e_phoff + self._e_phentsize * index)
            try:
                data = self._read(self._p_fmt)
            except struct.error:
                continue
            if data[self._p_idx[0]] != 3:  # Not PT_INTERP.
                continue
            self._f.seek(data[self._p_idx[1]])
            return os.fsdecode(self._f.read(data[self._p_idx[2]])).strip("\0")
        return None
python3.12/site-packages/pkg_resources/_vendor/packaging/version.py000064400000037706151732700760021430 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
"""
.. testsetup::

    from packaging.version import parse, Version
"""

import collections
import itertools
import re
from typing import Any, Callable, Optional, SupportsInt, Tuple, Union

from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType

__all__ = ["VERSION_PATTERN", "parse", "Version", "InvalidVersion"]

InfiniteTypes = Union[InfinityType, NegativeInfinityType]
PrePostDevType = Union[InfiniteTypes, Tuple[str, int]]
SubLocalType = Union[InfiniteTypes, int, str]
LocalType = Union[
    NegativeInfinityType,
    Tuple[
        Union[
            SubLocalType,
            Tuple[SubLocalType, str],
            Tuple[NegativeInfinityType, SubLocalType],
        ],
        ...,
    ],
]
CmpKey = Tuple[
    int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType
]
VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool]

_Version = collections.namedtuple(
    "_Version", ["epoch", "release", "dev", "pre", "post", "local"]
)


def parse(version: str) -> "Version":
    """Parse the given version string.

    >>> parse('1.0.dev1')
    <Version('1.0.dev1')>

    :param version: The version string to parse.
    :raises InvalidVersion: When the version string is not a valid version.
    """
    return Version(version)


class InvalidVersion(ValueError):
    """Raised when a version string is not a valid version.

    >>> Version("invalid")
    Traceback (most recent call last):
        ...
    packaging.version.InvalidVersion: Invalid version: 'invalid'
    """


class _BaseVersion:
    _key: Tuple[Any, ...]

    def __hash__(self) -> int:
        return hash(self._key)

    # Please keep the duplicated `isinstance` check
    # in the six comparisons hereunder
    # unless you find a way to avoid adding overhead function calls.
    def __lt__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key < other._key

    def __le__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key <= other._key

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key == other._key

    def __ge__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key >= other._key

    def __gt__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key > other._key

    def __ne__(self, other: object) -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key != other._key


# Deliberately not anchored to the start and end of the string, to make it
# easier for 3rd party code to reuse
_VERSION_PATTERN = r"""
    v?
    (?:
        (?:(?P<epoch>[0-9]+)!)?                           # epoch
        (?P<release>[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P<pre>                                          # pre-release
            [-_\.]?
            (?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P<pre_n>[0-9]+)?
        )?
        (?P<post>                                         # post release
            (?:-(?P<post_n1>[0-9]+))
            |
            (?:
                [-_\.]?
                (?P<post_l>post|rev|r)
                [-_\.]?
                (?P<post_n2>[0-9]+)?
            )
        )?
        (?P<dev>                                          # dev release
            [-_\.]?
            (?P<dev_l>dev)
            [-_\.]?
            (?P<dev_n>[0-9]+)?
        )?
    )
    (?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
"""

VERSION_PATTERN = _VERSION_PATTERN
"""
A string containing the regular expression used to match a valid version.

The pattern is not anchored at either end, and is intended for embedding in larger
expressions (for example, matching a version number as part of a file name). The
regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
flags set.

:meta hide-value:
"""


class Version(_BaseVersion):
    """This class abstracts handling of a project's versions.

    A :class:`Version` instance is comparison aware and can be compared and
    sorted using the standard Python interfaces.

    >>> v1 = Version("1.0a5")
    >>> v2 = Version("1.0")
    >>> v1
    <Version('1.0a5')>
    >>> v2
    <Version('1.0')>
    >>> v1 < v2
    True
    >>> v1 == v2
    False
    >>> v1 > v2
    False
    >>> v1 >= v2
    False
    >>> v1 <= v2
    True
    """

    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
    _key: CmpKey

    def __init__(self, version: str) -> None:
        """Initialize a Version object.

        :param version:
            The string representation of a version which will be parsed and normalized
            before use.
        :raises InvalidVersion:
            If the ``version`` does not conform to PEP 440 in any way then this
            exception will be raised.
        """

        # Validate the version and parse it into pieces
        match = self._regex.search(version)
        if not match:
            raise InvalidVersion(f"Invalid version: '{version}'")

        # Store the parsed out pieces of the version
        self._version = _Version(
            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
            release=tuple(int(i) for i in match.group("release").split(".")),
            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
            post=_parse_letter_version(
                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
            ),
            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
            local=_parse_local_version(match.group("local")),
        )

        # Generate a key which will be used for sorting
        self._key = _cmpkey(
            self._version.epoch,
            self._version.release,
            self._version.pre,
            self._version.post,
            self._version.dev,
            self._version.local,
        )

    def __repr__(self) -> str:
        """A representation of the Version that shows all internal state.

        >>> Version('1.0.0')
        <Version('1.0.0')>
        """
        return f"<Version('{self}')>"

    def __str__(self) -> str:
        """A string representation of the version that can be rounded-tripped.

        >>> str(Version("1.0a5"))
        '1.0a5'
        """
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        # Pre-release
        if self.pre is not None:
            parts.append("".join(str(x) for x in self.pre))

        # Post-release
        if self.post is not None:
            parts.append(f".post{self.post}")

        # Development release
        if self.dev is not None:
            parts.append(f".dev{self.dev}")

        # Local version segment
        if self.local is not None:
            parts.append(f"+{self.local}")

        return "".join(parts)

    @property
    def epoch(self) -> int:
        """The epoch of the version.

        >>> Version("2.0.0").epoch
        0
        >>> Version("1!2.0.0").epoch
        1
        """
        _epoch: int = self._version.epoch
        return _epoch

    @property
    def release(self) -> Tuple[int, ...]:
        """The components of the "release" segment of the version.

        >>> Version("1.2.3").release
        (1, 2, 3)
        >>> Version("2.0.0").release
        (2, 0, 0)
        >>> Version("1!2.0.0.post0").release
        (2, 0, 0)

        Includes trailing zeroes but not the epoch or any pre-release / development /
        post-release suffixes.
        """
        _release: Tuple[int, ...] = self._version.release
        return _release

    @property
    def pre(self) -> Optional[Tuple[str, int]]:
        """The pre-release segment of the version.

        >>> print(Version("1.2.3").pre)
        None
        >>> Version("1.2.3a1").pre
        ('a', 1)
        >>> Version("1.2.3b1").pre
        ('b', 1)
        >>> Version("1.2.3rc1").pre
        ('rc', 1)
        """
        _pre: Optional[Tuple[str, int]] = self._version.pre
        return _pre

    @property
    def post(self) -> Optional[int]:
        """The post-release number of the version.

        >>> print(Version("1.2.3").post)
        None
        >>> Version("1.2.3.post1").post
        1
        """
        return self._version.post[1] if self._version.post else None

    @property
    def dev(self) -> Optional[int]:
        """The development number of the version.

        >>> print(Version("1.2.3").dev)
        None
        >>> Version("1.2.3.dev1").dev
        1
        """
        return self._version.dev[1] if self._version.dev else None

    @property
    def local(self) -> Optional[str]:
        """The local version segment of the version.

        >>> print(Version("1.2.3").local)
        None
        >>> Version("1.2.3+abc").local
        'abc'
        """
        if self._version.local:
            return ".".join(str(x) for x in self._version.local)
        else:
            return None

    @property
    def public(self) -> str:
        """The public portion of the version.

        >>> Version("1.2.3").public
        '1.2.3'
        >>> Version("1.2.3+abc").public
        '1.2.3'
        >>> Version("1.2.3+abc.dev1").public
        '1.2.3'
        """
        return str(self).split("+", 1)[0]

    @property
    def base_version(self) -> str:
        """The "base version" of the version.

        >>> Version("1.2.3").base_version
        '1.2.3'
        >>> Version("1.2.3+abc").base_version
        '1.2.3'
        >>> Version("1!1.2.3+abc.dev1").base_version
        '1!1.2.3'

        The "base version" is the public version of the project without any pre or post
        release markers.
        """
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        return "".join(parts)

    @property
    def is_prerelease(self) -> bool:
        """Whether this version is a pre-release.

        >>> Version("1.2.3").is_prerelease
        False
        >>> Version("1.2.3a1").is_prerelease
        True
        >>> Version("1.2.3b1").is_prerelease
        True
        >>> Version("1.2.3rc1").is_prerelease
        True
        >>> Version("1.2.3dev1").is_prerelease
        True
        """
        return self.dev is not None or self.pre is not None

    @property
    def is_postrelease(self) -> bool:
        """Whether this version is a post-release.

        >>> Version("1.2.3").is_postrelease
        False
        >>> Version("1.2.3.post1").is_postrelease
        True
        """
        return self.post is not None

    @property
    def is_devrelease(self) -> bool:
        """Whether this version is a development release.

        >>> Version("1.2.3").is_devrelease
        False
        >>> Version("1.2.3.dev1").is_devrelease
        True
        """
        return self.dev is not None

    @property
    def major(self) -> int:
        """The first item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").major
        1
        """
        return self.release[0] if len(self.release) >= 1 else 0

    @property
    def minor(self) -> int:
        """The second item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").minor
        2
        >>> Version("1").minor
        0
        """
        return self.release[1] if len(self.release) >= 2 else 0

    @property
    def micro(self) -> int:
        """The third item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").micro
        3
        >>> Version("1").micro
        0
        """
        return self.release[2] if len(self.release) >= 3 else 0


def _parse_letter_version(
    letter: str, number: Union[str, bytes, SupportsInt]
) -> Optional[Tuple[str, int]]:

    if letter:
        # We consider there to be an implicit 0 in a pre-release if there is
        # not a numeral associated with it.
        if number is None:
            number = 0

        # We normalize any letters to their lower case form
        letter = letter.lower()

        # We consider some words to be alternate spellings of other words and
        # in those cases we want to normalize the spellings to our preferred
        # spelling.
        if letter == "alpha":
            letter = "a"
        elif letter == "beta":
            letter = "b"
        elif letter in ["c", "pre", "preview"]:
            letter = "rc"
        elif letter in ["rev", "r"]:
            letter = "post"

        return letter, int(number)
    if not letter and number:
        # We assume if we are given a number, but we are not given a letter
        # then this is using the implicit post release syntax (e.g. 1.0-1)
        letter = "post"

        return letter, int(number)

    return None


_local_version_separators = re.compile(r"[\._-]")


def _parse_local_version(local: str) -> Optional[LocalType]:
    """
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    """
    if local is not None:
        return tuple(
            part.lower() if not part.isdigit() else int(part)
            for part in _local_version_separators.split(local)
        )
    return None


def _cmpkey(
    epoch: int,
    release: Tuple[int, ...],
    pre: Optional[Tuple[str, int]],
    post: Optional[Tuple[str, int]],
    dev: Optional[Tuple[str, int]],
    local: Optional[Tuple[SubLocalType]],
) -> CmpKey:

    # When we compare a release version, we want to compare it with all of the
    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    # leading zeros until we come to something non zero, then take the rest
    # re-reverse it back into the correct order and make it a tuple and use
    # that for our sorting key.
    _release = tuple(
        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
    )

    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    # We'll do this by abusing the pre segment, but we _only_ want to do this
    # if there is not a pre or a post segment. If we have one of those then
    # the normal sorting rules will handle this case correctly.
    if pre is None and post is None and dev is not None:
        _pre: PrePostDevType = NegativeInfinity
    # Versions without a pre-release (except as noted above) should sort after
    # those with one.
    elif pre is None:
        _pre = Infinity
    else:
        _pre = pre

    # Versions without a post segment should sort before those with one.
    if post is None:
        _post: PrePostDevType = NegativeInfinity

    else:
        _post = post

    # Versions without a development segment should sort after those with one.
    if dev is None:
        _dev: PrePostDevType = Infinity

    else:
        _dev = dev

    if local is None:
        # Versions without a local segment should sort before those with one.
        _local: LocalType = NegativeInfinity
    else:
        # Versions with a local segment need that segment parsed to implement
        # the sorting rules in PEP440.
        # - Alpha numeric segments sort before numeric segments
        # - Alpha numeric segments sort lexicographically
        # - Numeric segments sort numerically
        # - Shorter versions sort before longer versions when the prefixes
        #   match exactly
        _local = tuple(
            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
        )

    return epoch, _release, _pre, _post, _dev, _local
python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py000064400000023722151732700760021367 0ustar00"""Handwritten parser of dependency specifiers.

The docstring for each __parse_* function contains ENBF-inspired grammar representing
the implementation.
"""

import ast
from typing import Any, List, NamedTuple, Optional, Tuple, Union

from ._tokenizer import DEFAULT_RULES, Tokenizer


class Node:
    def __init__(self, value: str) -> None:
        self.value = value

    def __str__(self) -> str:
        return self.value

    def __repr__(self) -> str:
        return f"<{self.__class__.__name__}('{self}')>"

    def serialize(self) -> str:
        raise NotImplementedError


class Variable(Node):
    def serialize(self) -> str:
        return str(self)


class Value(Node):
    def serialize(self) -> str:
        return f'"{self}"'


class Op(Node):
    def serialize(self) -> str:
        return str(self)


MarkerVar = Union[Variable, Value]
MarkerItem = Tuple[MarkerVar, Op, MarkerVar]
# MarkerAtom = Union[MarkerItem, List["MarkerAtom"]]
# MarkerList = List[Union["MarkerList", MarkerAtom, str]]
# mypy does not support recursive type definition
# https://github.com/python/mypy/issues/731
MarkerAtom = Any
MarkerList = List[Any]


class ParsedRequirement(NamedTuple):
    name: str
    url: str
    extras: List[str]
    specifier: str
    marker: Optional[MarkerList]


# --------------------------------------------------------------------------------------
# Recursive descent parser for dependency specifier
# --------------------------------------------------------------------------------------
def parse_requirement(source: str) -> ParsedRequirement:
    return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))


def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement:
    """
    requirement = WS? IDENTIFIER WS? extras WS? requirement_details
    """
    tokenizer.consume("WS")

    name_token = tokenizer.expect(
        "IDENTIFIER", expected="package name at the start of dependency specifier"
    )
    name = name_token.text
    tokenizer.consume("WS")

    extras = _parse_extras(tokenizer)
    tokenizer.consume("WS")

    url, specifier, marker = _parse_requirement_details(tokenizer)
    tokenizer.expect("END", expected="end of dependency specifier")

    return ParsedRequirement(name, url, extras, specifier, marker)


def _parse_requirement_details(
    tokenizer: Tokenizer,
) -> Tuple[str, str, Optional[MarkerList]]:
    """
    requirement_details = AT URL (WS requirement_marker?)?
                        | specifier WS? (requirement_marker)?
    """

    specifier = ""
    url = ""
    marker = None

    if tokenizer.check("AT"):
        tokenizer.read()
        tokenizer.consume("WS")

        url_start = tokenizer.position
        url = tokenizer.expect("URL", expected="URL after @").text
        if tokenizer.check("END", peek=True):
            return (url, specifier, marker)

        tokenizer.expect("WS", expected="whitespace after URL")

        # The input might end after whitespace.
        if tokenizer.check("END", peek=True):
            return (url, specifier, marker)

        marker = _parse_requirement_marker(
            tokenizer, span_start=url_start, after="URL and whitespace"
        )
    else:
        specifier_start = tokenizer.position
        specifier = _parse_specifier(tokenizer)
        tokenizer.consume("WS")

        if tokenizer.check("END", peek=True):
            return (url, specifier, marker)

        marker = _parse_requirement_marker(
            tokenizer,
            span_start=specifier_start,
            after=(
                "version specifier"
                if specifier
                else "name and no valid version specifier"
            ),
        )

    return (url, specifier, marker)


def _parse_requirement_marker(
    tokenizer: Tokenizer, *, span_start: int, after: str
) -> MarkerList:
    """
    requirement_marker = SEMICOLON marker WS?
    """

    if not tokenizer.check("SEMICOLON"):
        tokenizer.raise_syntax_error(
            f"Expected end or semicolon (after {after})",
            span_start=span_start,
        )
    tokenizer.read()

    marker = _parse_marker(tokenizer)
    tokenizer.consume("WS")

    return marker


def _parse_extras(tokenizer: Tokenizer) -> List[str]:
    """
    extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?
    """
    if not tokenizer.check("LEFT_BRACKET", peek=True):
        return []

    with tokenizer.enclosing_tokens(
        "LEFT_BRACKET",
        "RIGHT_BRACKET",
        around="extras",
    ):
        tokenizer.consume("WS")
        extras = _parse_extras_list(tokenizer)
        tokenizer.consume("WS")

    return extras


def _parse_extras_list(tokenizer: Tokenizer) -> List[str]:
    """
    extras_list = identifier (wsp* ',' wsp* identifier)*
    """
    extras: List[str] = []

    if not tokenizer.check("IDENTIFIER"):
        return extras

    extras.append(tokenizer.read().text)

    while True:
        tokenizer.consume("WS")
        if tokenizer.check("IDENTIFIER", peek=True):
            tokenizer.raise_syntax_error("Expected comma between extra names")
        elif not tokenizer.check("COMMA"):
            break

        tokenizer.read()
        tokenizer.consume("WS")

        extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma")
        extras.append(extra_token.text)

    return extras


def _parse_specifier(tokenizer: Tokenizer) -> str:
    """
    specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS
              | WS? version_many WS?
    """
    with tokenizer.enclosing_tokens(
        "LEFT_PARENTHESIS",
        "RIGHT_PARENTHESIS",
        around="version specifier",
    ):
        tokenizer.consume("WS")
        parsed_specifiers = _parse_version_many(tokenizer)
        tokenizer.consume("WS")

    return parsed_specifiers


def _parse_version_many(tokenizer: Tokenizer) -> str:
    """
    version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)?
    """
    parsed_specifiers = ""
    while tokenizer.check("SPECIFIER"):
        span_start = tokenizer.position
        parsed_specifiers += tokenizer.read().text
        if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True):
            tokenizer.raise_syntax_error(
                ".* suffix can only be used with `==` or `!=` operators",
                span_start=span_start,
                span_end=tokenizer.position + 1,
            )
        if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True):
            tokenizer.raise_syntax_error(
                "Local version label can only be used with `==` or `!=` operators",
                span_start=span_start,
                span_end=tokenizer.position,
            )
        tokenizer.consume("WS")
        if not tokenizer.check("COMMA"):
            break
        parsed_specifiers += tokenizer.read().text
        tokenizer.consume("WS")

    return parsed_specifiers


# --------------------------------------------------------------------------------------
# Recursive descent parser for marker expression
# --------------------------------------------------------------------------------------
def parse_marker(source: str) -> MarkerList:
    return _parse_marker(Tokenizer(source, rules=DEFAULT_RULES))


def _parse_marker(tokenizer: Tokenizer) -> MarkerList:
    """
    marker = marker_atom (BOOLOP marker_atom)+
    """
    expression = [_parse_marker_atom(tokenizer)]
    while tokenizer.check("BOOLOP"):
        token = tokenizer.read()
        expr_right = _parse_marker_atom(tokenizer)
        expression.extend((token.text, expr_right))
    return expression


def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom:
    """
    marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS?
                | WS? marker_item WS?
    """

    tokenizer.consume("WS")
    if tokenizer.check("LEFT_PARENTHESIS", peek=True):
        with tokenizer.enclosing_tokens(
            "LEFT_PARENTHESIS",
            "RIGHT_PARENTHESIS",
            around="marker expression",
        ):
            tokenizer.consume("WS")
            marker: MarkerAtom = _parse_marker(tokenizer)
            tokenizer.consume("WS")
    else:
        marker = _parse_marker_item(tokenizer)
    tokenizer.consume("WS")
    return marker


def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem:
    """
    marker_item = WS? marker_var WS? marker_op WS? marker_var WS?
    """
    tokenizer.consume("WS")
    marker_var_left = _parse_marker_var(tokenizer)
    tokenizer.consume("WS")
    marker_op = _parse_marker_op(tokenizer)
    tokenizer.consume("WS")
    marker_var_right = _parse_marker_var(tokenizer)
    tokenizer.consume("WS")
    return (marker_var_left, marker_op, marker_var_right)


def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar:
    """
    marker_var = VARIABLE | QUOTED_STRING
    """
    if tokenizer.check("VARIABLE"):
        return process_env_var(tokenizer.read().text.replace(".", "_"))
    elif tokenizer.check("QUOTED_STRING"):
        return process_python_str(tokenizer.read().text)
    else:
        tokenizer.raise_syntax_error(
            message="Expected a marker variable or quoted string"
        )


def process_env_var(env_var: str) -> Variable:
    if (
        env_var == "platform_python_implementation"
        or env_var == "python_implementation"
    ):
        return Variable("platform_python_implementation")
    else:
        return Variable(env_var)


def process_python_str(python_str: str) -> Value:
    value = ast.literal_eval(python_str)
    return Value(str(value))


def _parse_marker_op(tokenizer: Tokenizer) -> Op:
    """
    marker_op = IN | NOT IN | OP
    """
    if tokenizer.check("IN"):
        tokenizer.read()
        return Op("in")
    elif tokenizer.check("NOT"):
        tokenizer.read()
        tokenizer.expect("WS", expected="whitespace after 'not'")
        tokenizer.expect("IN", expected="'in' after 'not'")
        return Op("not in")
    elif tokenizer.check("OP"):
        return Op(tokenizer.read().text)
    else:
        return tokenizer.raise_syntax_error(
            "Expected marker operator, one of "
            "<=, <, !=, ==, >=, >, ~=, ===, in, not in"
        )
python3.12/site-packages/pkg_resources/_vendor/packaging/requirements.py000064400000006327151732700760022461 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import urllib.parse
from typing import Any, List, Optional, Set

from ._parser import parse_requirement as _parse_requirement
from ._tokenizer import ParserSyntaxError
from .markers import Marker, _normalize_extra_values
from .specifiers import SpecifierSet


class InvalidRequirement(ValueError):
    """
    An invalid requirement was found, users should refer to PEP 508.
    """


class Requirement:
    """Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    """

    # TODO: Can we test whether something is contained within a requirement?
    #       If so how do we do that? Do we need to test against the _name_ of
    #       the thing as well as the version? What about the markers?
    # TODO: Can we normalize the name and extra name?

    def __init__(self, requirement_string: str) -> None:
        try:
            parsed = _parse_requirement(requirement_string)
        except ParserSyntaxError as e:
            raise InvalidRequirement(str(e)) from e

        self.name: str = parsed.name
        if parsed.url:
            parsed_url = urllib.parse.urlparse(parsed.url)
            if parsed_url.scheme == "file":
                if urllib.parse.urlunparse(parsed_url) != parsed.url:
                    raise InvalidRequirement("Invalid URL given")
            elif not (parsed_url.scheme and parsed_url.netloc) or (
                not parsed_url.scheme and not parsed_url.netloc
            ):
                raise InvalidRequirement(f"Invalid URL: {parsed.url}")
            self.url: Optional[str] = parsed.url
        else:
            self.url = None
        self.extras: Set[str] = set(parsed.extras if parsed.extras else [])
        self.specifier: SpecifierSet = SpecifierSet(parsed.specifier)
        self.marker: Optional[Marker] = None
        if parsed.marker is not None:
            self.marker = Marker.__new__(Marker)
            self.marker._markers = _normalize_extra_values(parsed.marker)

    def __str__(self) -> str:
        parts: List[str] = [self.name]

        if self.extras:
            formatted_extras = ",".join(sorted(self.extras))
            parts.append(f"[{formatted_extras}]")

        if self.specifier:
            parts.append(str(self.specifier))

        if self.url:
            parts.append(f"@ {self.url}")
            if self.marker:
                parts.append(" ")

        if self.marker:
            parts.append(f"; {self.marker}")

        return "".join(parts)

    def __repr__(self) -> str:
        return f"<Requirement('{self}')>"

    def __hash__(self) -> int:
        return hash((self.__class__.__name__, str(self)))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, Requirement):
            return NotImplemented

        return (
            self.name == other.name
            and self.extras == other.extras
            and self.specifier == other.specifier
            and self.url == other.url
            and self.marker == other.marker
        )
python3.12/site-packages/pkg_resources/_vendor/packaging/metadata.py000064400000040015151732700760021506 0ustar00import email.feedparser
import email.header
import email.message
import email.parser
import email.policy
import sys
import typing
from typing import Dict, List, Optional, Tuple, Union, cast

if sys.version_info >= (3, 8):  # pragma: no cover
    from typing import TypedDict
else:  # pragma: no cover
    if typing.TYPE_CHECKING:
        from typing_extensions import TypedDict
    else:
        try:
            from typing_extensions import TypedDict
        except ImportError:

            class TypedDict:
                def __init_subclass__(*_args, **_kwargs):
                    pass


# The RawMetadata class attempts to make as few assumptions about the underlying
# serialization formats as possible. The idea is that as long as a serialization
# formats offer some very basic primitives in *some* way then we can support
# serializing to and from that format.
class RawMetadata(TypedDict, total=False):
    """A dictionary of raw core metadata.

    Each field in core metadata maps to a key of this dictionary (when data is
    provided). The key is lower-case and underscores are used instead of dashes
    compared to the equivalent core metadata field. Any core metadata field that
    can be specified multiple times or can hold multiple values in a single
    field have a key with a plural name.

    Core metadata fields that can be specified multiple times are stored as a
    list or dict depending on which is appropriate for the field. Any fields
    which hold multiple values in a single field are stored as a list.

    """

    # Metadata 1.0 - PEP 241
    metadata_version: str
    name: str
    version: str
    platforms: List[str]
    summary: str
    description: str
    keywords: List[str]
    home_page: str
    author: str
    author_email: str
    license: str

    # Metadata 1.1 - PEP 314
    supported_platforms: List[str]
    download_url: str
    classifiers: List[str]
    requires: List[str]
    provides: List[str]
    obsoletes: List[str]

    # Metadata 1.2 - PEP 345
    maintainer: str
    maintainer_email: str
    requires_dist: List[str]
    provides_dist: List[str]
    obsoletes_dist: List[str]
    requires_python: str
    requires_external: List[str]
    project_urls: Dict[str, str]

    # Metadata 2.0
    # PEP 426 attempted to completely revamp the metadata format
    # but got stuck without ever being able to build consensus on
    # it and ultimately ended up withdrawn.
    #
    # However, a number of tools had started emiting METADATA with
    # `2.0` Metadata-Version, so for historical reasons, this version
    # was skipped.

    # Metadata 2.1 - PEP 566
    description_content_type: str
    provides_extra: List[str]

    # Metadata 2.2 - PEP 643
    dynamic: List[str]

    # Metadata 2.3 - PEP 685
    # No new fields were added in PEP 685, just some edge case were
    # tightened up to provide better interoptability.


_STRING_FIELDS = {
    "author",
    "author_email",
    "description",
    "description_content_type",
    "download_url",
    "home_page",
    "license",
    "maintainer",
    "maintainer_email",
    "metadata_version",
    "name",
    "requires_python",
    "summary",
    "version",
}

_LIST_STRING_FIELDS = {
    "classifiers",
    "dynamic",
    "obsoletes",
    "obsoletes_dist",
    "platforms",
    "provides",
    "provides_dist",
    "provides_extra",
    "requires",
    "requires_dist",
    "requires_external",
    "supported_platforms",
}


def _parse_keywords(data: str) -> List[str]:
    """Split a string of comma-separate keyboards into a list of keywords."""
    return [k.strip() for k in data.split(",")]


def _parse_project_urls(data: List[str]) -> Dict[str, str]:
    """Parse a list of label/URL string pairings separated by a comma."""
    urls = {}
    for pair in data:
        # Our logic is slightly tricky here as we want to try and do
        # *something* reasonable with malformed data.
        #
        # The main thing that we have to worry about, is data that does
        # not have a ',' at all to split the label from the Value. There
        # isn't a singular right answer here, and we will fail validation
        # later on (if the caller is validating) so it doesn't *really*
        # matter, but since the missing value has to be an empty str
        # and our return value is dict[str, str], if we let the key
        # be the missing value, then they'd have multiple '' values that
        # overwrite each other in a accumulating dict.
        #
        # The other potentional issue is that it's possible to have the
        # same label multiple times in the metadata, with no solid "right"
        # answer with what to do in that case. As such, we'll do the only
        # thing we can, which is treat the field as unparseable and add it
        # to our list of unparsed fields.
        parts = [p.strip() for p in pair.split(",", 1)]
        parts.extend([""] * (max(0, 2 - len(parts))))  # Ensure 2 items

        # TODO: The spec doesn't say anything about if the keys should be
        #       considered case sensitive or not... logically they should
        #       be case-preserving and case-insensitive, but doing that
        #       would open up more cases where we might have duplicate
        #       entries.
        label, url = parts
        if label in urls:
            # The label already exists in our set of urls, so this field
            # is unparseable, and we can just add the whole thing to our
            # unparseable data and stop processing it.
            raise KeyError("duplicate labels in project urls")
        urls[label] = url

    return urls


def _get_payload(msg: email.message.Message, source: Union[bytes, str]) -> str:
    """Get the body of the message."""
    # If our source is a str, then our caller has managed encodings for us,
    # and we don't need to deal with it.
    if isinstance(source, str):
        payload: str = msg.get_payload()
        return payload
    # If our source is a bytes, then we're managing the encoding and we need
    # to deal with it.
    else:
        bpayload: bytes = msg.get_payload(decode=True)
        try:
            return bpayload.decode("utf8", "strict")
        except UnicodeDecodeError:
            raise ValueError("payload in an invalid encoding")


# The various parse_FORMAT functions here are intended to be as lenient as
# possible in their parsing, while still returning a correctly typed
# RawMetadata.
#
# To aid in this, we also generally want to do as little touching of the
# data as possible, except where there are possibly some historic holdovers
# that make valid data awkward to work with.
#
# While this is a lower level, intermediate format than our ``Metadata``
# class, some light touch ups can make a massive difference in usability.

# Map METADATA fields to RawMetadata.
_EMAIL_TO_RAW_MAPPING = {
    "author": "author",
    "author-email": "author_email",
    "classifier": "classifiers",
    "description": "description",
    "description-content-type": "description_content_type",
    "download-url": "download_url",
    "dynamic": "dynamic",
    "home-page": "home_page",
    "keywords": "keywords",
    "license": "license",
    "maintainer": "maintainer",
    "maintainer-email": "maintainer_email",
    "metadata-version": "metadata_version",
    "name": "name",
    "obsoletes": "obsoletes",
    "obsoletes-dist": "obsoletes_dist",
    "platform": "platforms",
    "project-url": "project_urls",
    "provides": "provides",
    "provides-dist": "provides_dist",
    "provides-extra": "provides_extra",
    "requires": "requires",
    "requires-dist": "requires_dist",
    "requires-external": "requires_external",
    "requires-python": "requires_python",
    "summary": "summary",
    "supported-platform": "supported_platforms",
    "version": "version",
}


def parse_email(data: Union[bytes, str]) -> Tuple[RawMetadata, Dict[str, List[str]]]:
    """Parse a distribution's metadata.

    This function returns a two-item tuple of dicts. The first dict is of
    recognized fields from the core metadata specification. Fields that can be
    parsed and translated into Python's built-in types are converted
    appropriately. All other fields are left as-is. Fields that are allowed to
    appear multiple times are stored as lists.

    The second dict contains all other fields from the metadata. This includes
    any unrecognized fields. It also includes any fields which are expected to
    be parsed into a built-in type but were not formatted appropriately. Finally,
    any fields that are expected to appear only once but are repeated are
    included in this dict.

    """
    raw: Dict[str, Union[str, List[str], Dict[str, str]]] = {}
    unparsed: Dict[str, List[str]] = {}

    if isinstance(data, str):
        parsed = email.parser.Parser(policy=email.policy.compat32).parsestr(data)
    else:
        parsed = email.parser.BytesParser(policy=email.policy.compat32).parsebytes(data)

    # We have to wrap parsed.keys() in a set, because in the case of multiple
    # values for a key (a list), the key will appear multiple times in the
    # list of keys, but we're avoiding that by using get_all().
    for name in frozenset(parsed.keys()):
        # Header names in RFC are case insensitive, so we'll normalize to all
        # lower case to make comparisons easier.
        name = name.lower()

        # We use get_all() here, even for fields that aren't multiple use,
        # because otherwise someone could have e.g. two Name fields, and we
        # would just silently ignore it rather than doing something about it.
        headers = parsed.get_all(name)

        # The way the email module works when parsing bytes is that it
        # unconditionally decodes the bytes as ascii using the surrogateescape
        # handler. When you pull that data back out (such as with get_all() ),
        # it looks to see if the str has any surrogate escapes, and if it does
        # it wraps it in a Header object instead of returning the string.
        #
        # As such, we'll look for those Header objects, and fix up the encoding.
        value = []
        # Flag if we have run into any issues processing the headers, thus
        # signalling that the data belongs in 'unparsed'.
        valid_encoding = True
        for h in headers:
            # It's unclear if this can return more types than just a Header or
            # a str, so we'll just assert here to make sure.
            assert isinstance(h, (email.header.Header, str))

            # If it's a header object, we need to do our little dance to get
            # the real data out of it. In cases where there is invalid data
            # we're going to end up with mojibake, but there's no obvious, good
            # way around that without reimplementing parts of the Header object
            # ourselves.
            #
            # That should be fine since, if mojibacked happens, this key is
            # going into the unparsed dict anyways.
            if isinstance(h, email.header.Header):
                # The Header object stores it's data as chunks, and each chunk
                # can be independently encoded, so we'll need to check each
                # of them.
                chunks: List[Tuple[bytes, Optional[str]]] = []
                for bin, encoding in email.header.decode_header(h):
                    try:
                        bin.decode("utf8", "strict")
                    except UnicodeDecodeError:
                        # Enable mojibake.
                        encoding = "latin1"
                        valid_encoding = False
                    else:
                        encoding = "utf8"
                    chunks.append((bin, encoding))

                # Turn our chunks back into a Header object, then let that
                # Header object do the right thing to turn them into a
                # string for us.
                value.append(str(email.header.make_header(chunks)))
            # This is already a string, so just add it.
            else:
                value.append(h)

        # We've processed all of our values to get them into a list of str,
        # but we may have mojibake data, in which case this is an unparsed
        # field.
        if not valid_encoding:
            unparsed[name] = value
            continue

        raw_name = _EMAIL_TO_RAW_MAPPING.get(name)
        if raw_name is None:
            # This is a bit of a weird situation, we've encountered a key that
            # we don't know what it means, so we don't know whether it's meant
            # to be a list or not.
            #
            # Since we can't really tell one way or another, we'll just leave it
            # as a list, even though it may be a single item list, because that's
            # what makes the most sense for email headers.
            unparsed[name] = value
            continue

        # If this is one of our string fields, then we'll check to see if our
        # value is a list of a single item. If it is then we'll assume that
        # it was emitted as a single string, and unwrap the str from inside
        # the list.
        #
        # If it's any other kind of data, then we haven't the faintest clue
        # what we should parse it as, and we have to just add it to our list
        # of unparsed stuff.
        if raw_name in _STRING_FIELDS and len(value) == 1:
            raw[raw_name] = value[0]
        # If this is one of our list of string fields, then we can just assign
        # the value, since email *only* has strings, and our get_all() call
        # above ensures that this is a list.
        elif raw_name in _LIST_STRING_FIELDS:
            raw[raw_name] = value
        # Special Case: Keywords
        # The keywords field is implemented in the metadata spec as a str,
        # but it conceptually is a list of strings, and is serialized using
        # ", ".join(keywords), so we'll do some light data massaging to turn
        # this into what it logically is.
        elif raw_name == "keywords" and len(value) == 1:
            raw[raw_name] = _parse_keywords(value[0])
        # Special Case: Project-URL
        # The project urls is implemented in the metadata spec as a list of
        # specially-formatted strings that represent a key and a value, which
        # is fundamentally a mapping, however the email format doesn't support
        # mappings in a sane way, so it was crammed into a list of strings
        # instead.
        #
        # We will do a little light data massaging to turn this into a map as
        # it logically should be.
        elif raw_name == "project_urls":
            try:
                raw[raw_name] = _parse_project_urls(value)
            except KeyError:
                unparsed[name] = value
        # Nothing that we've done has managed to parse this, so it'll just
        # throw it in our unparseable data and move on.
        else:
            unparsed[name] = value

    # We need to support getting the Description from the message payload in
    # addition to getting it from the the headers. This does mean, though, there
    # is the possibility of it being set both ways, in which case we put both
    # in 'unparsed' since we don't know which is right.
    try:
        payload = _get_payload(parsed, data)
    except ValueError:
        unparsed.setdefault("description", []).append(
            parsed.get_payload(decode=isinstance(data, bytes))
        )
    else:
        if payload:
            # Check to see if we've already got a description, if so then both
            # it, and this body move to unparseable.
            if "description" in raw:
                description_header = cast(str, raw.pop("description"))
                unparsed.setdefault("description", []).extend(
                    [description_header, payload]
                )
            elif "description" in unparsed:
                unparsed["description"].append(payload)
            else:
                raw["description"] = payload

    # We need to cast our `raw` to a metadata, because a TypedDict only support
    # literal key names, but we're computing our key names on purpose, but the
    # way this function is implemented, our `TypedDict` can only have valid key
    # names.
    return cast(RawMetadata, raw), unparsed
python3.12/site-packages/pkg_resources/_vendor/packaging/markers.py000064400000020020151732700760021364 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import operator
import os
import platform
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

from ._parser import (
    MarkerAtom,
    MarkerList,
    Op,
    Value,
    Variable,
    parse_marker as _parse_marker,
)
from ._tokenizer import ParserSyntaxError
from .specifiers import InvalidSpecifier, Specifier
from .utils import canonicalize_name

__all__ = [
    "InvalidMarker",
    "UndefinedComparison",
    "UndefinedEnvironmentName",
    "Marker",
    "default_environment",
]

Operator = Callable[[str, str], bool]


class InvalidMarker(ValueError):
    """
    An invalid marker was found, users should refer to PEP 508.
    """


class UndefinedComparison(ValueError):
    """
    An invalid operation was attempted on a value that doesn't support it.
    """


class UndefinedEnvironmentName(ValueError):
    """
    A name was attempted to be used that does not exist inside of the
    environment.
    """


def _normalize_extra_values(results: Any) -> Any:
    """
    Normalize extra values.
    """
    if isinstance(results[0], tuple):
        lhs, op, rhs = results[0]
        if isinstance(lhs, Variable) and lhs.value == "extra":
            normalized_extra = canonicalize_name(rhs.value)
            rhs = Value(normalized_extra)
        elif isinstance(rhs, Variable) and rhs.value == "extra":
            normalized_extra = canonicalize_name(lhs.value)
            lhs = Value(normalized_extra)
        results[0] = lhs, op, rhs
    return results


def _format_marker(
    marker: Union[List[str], MarkerAtom, str], first: Optional[bool] = True
) -> str:

    assert isinstance(marker, (list, tuple, str))

    # Sometimes we have a structure like [[...]] which is a single item list
    # where the single item is itself it's own list. In that case we want skip
    # the rest of this function so that we don't get extraneous () on the
    # outside.
    if (
        isinstance(marker, list)
        and len(marker) == 1
        and isinstance(marker[0], (list, tuple))
    ):
        return _format_marker(marker[0])

    if isinstance(marker, list):
        inner = (_format_marker(m, first=False) for m in marker)
        if first:
            return " ".join(inner)
        else:
            return "(" + " ".join(inner) + ")"
    elif isinstance(marker, tuple):
        return " ".join([m.serialize() for m in marker])
    else:
        return marker


_operators: Dict[str, Operator] = {
    "in": lambda lhs, rhs: lhs in rhs,
    "not in": lambda lhs, rhs: lhs not in rhs,
    "<": operator.lt,
    "<=": operator.le,
    "==": operator.eq,
    "!=": operator.ne,
    ">=": operator.ge,
    ">": operator.gt,
}


def _eval_op(lhs: str, op: Op, rhs: str) -> bool:
    try:
        spec = Specifier("".join([op.serialize(), rhs]))
    except InvalidSpecifier:
        pass
    else:
        return spec.contains(lhs, prereleases=True)

    oper: Optional[Operator] = _operators.get(op.serialize())
    if oper is None:
        raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.")

    return oper(lhs, rhs)


def _normalize(*values: str, key: str) -> Tuple[str, ...]:
    # PEP 685 – Comparison of extra names for optional distribution dependencies
    # https://peps.python.org/pep-0685/
    # > When comparing extra names, tools MUST normalize the names being
    # > compared using the semantics outlined in PEP 503 for names
    if key == "extra":
        return tuple(canonicalize_name(v) for v in values)

    # other environment markers don't have such standards
    return values


def _evaluate_markers(markers: MarkerList, environment: Dict[str, str]) -> bool:
    groups: List[List[bool]] = [[]]

    for marker in markers:
        assert isinstance(marker, (list, tuple, str))

        if isinstance(marker, list):
            groups[-1].append(_evaluate_markers(marker, environment))
        elif isinstance(marker, tuple):
            lhs, op, rhs = marker

            if isinstance(lhs, Variable):
                environment_key = lhs.value
                lhs_value = environment[environment_key]
                rhs_value = rhs.value
            else:
                lhs_value = lhs.value
                environment_key = rhs.value
                rhs_value = environment[environment_key]

            lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key)
            groups[-1].append(_eval_op(lhs_value, op, rhs_value))
        else:
            assert marker in ["and", "or"]
            if marker == "or":
                groups.append([])

    return any(all(item) for item in groups)


def format_full_version(info: "sys._version_info") -> str:
    version = "{0.major}.{0.minor}.{0.micro}".format(info)
    kind = info.releaselevel
    if kind != "final":
        version += kind[0] + str(info.serial)
    return version


def default_environment() -> Dict[str, str]:
    iver = format_full_version(sys.implementation.version)
    implementation_name = sys.implementation.name
    return {
        "implementation_name": implementation_name,
        "implementation_version": iver,
        "os_name": os.name,
        "platform_machine": platform.machine(),
        "platform_release": platform.release(),
        "platform_system": platform.system(),
        "platform_version": platform.version(),
        "python_full_version": platform.python_version(),
        "platform_python_implementation": platform.python_implementation(),
        "python_version": ".".join(platform.python_version_tuple()[:2]),
        "sys_platform": sys.platform,
    }


class Marker:
    def __init__(self, marker: str) -> None:
        # Note: We create a Marker object without calling this constructor in
        #       packaging.requirements.Requirement. If any additional logic is
        #       added here, make sure to mirror/adapt Requirement.
        try:
            self._markers = _normalize_extra_values(_parse_marker(marker))
            # The attribute `_markers` can be described in terms of a recursive type:
            # MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]]
            #
            # For example, the following expression:
            # python_version > "3.6" or (python_version == "3.6" and os_name == "unix")
            #
            # is parsed into:
            # [
            #     (<Variable('python_version')>, <Op('>')>, <Value('3.6')>),
            #     'and',
            #     [
            #         (<Variable('python_version')>, <Op('==')>, <Value('3.6')>),
            #         'or',
            #         (<Variable('os_name')>, <Op('==')>, <Value('unix')>)
            #     ]
            # ]
        except ParserSyntaxError as e:
            raise InvalidMarker(str(e)) from e

    def __str__(self) -> str:
        return _format_marker(self._markers)

    def __repr__(self) -> str:
        return f"<Marker('{self}')>"

    def __hash__(self) -> int:
        return hash((self.__class__.__name__, str(self)))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, Marker):
            return NotImplemented

        return str(self) == str(other)

    def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
        """Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        """
        current_environment = default_environment()
        current_environment["extra"] = ""
        if environment is not None:
            current_environment.update(environment)
            # The API used to allow setting extra to None. We need to handle this
            # case for backwards compatibility.
            if current_environment["extra"] is None:
                current_environment["extra"] = ""

        return _evaluate_markers(self._markers, current_environment)
python3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-312.pyc000064400000001164151732700760026030 0ustar00�

��_i���*�dZdZdZdZdZdZdZdezZy)	�	packagingz"Core utilities for Python packagesz!https://github.com/pypa/packagingz23.1z)Donald Stufft and individual contributorszdonald@stufft.iozBSD-2-Clause or Apache-2.0z2014-2019 %sN)�	__title__�__summary__�__uri__�__version__�
__author__�	__email__�__license__�
__copyright__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/__init__.py�<module>rs4��

�	�2��
-����
8�
��	�*����+�
rpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-312.pyc000064400000006352151732700760026657 0ustar00�

��_i���H�Gd�d�Ze�ZGd�d�Ze�Zy)c��eZdZdefd�Zdefd�Zdedefd�Z	dedefd�Z
dedefd�Zdedefd�Zdedefd	�Z
d
eddfd�Zy
)�InfinityType�returnc��y)N�Infinity���selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_structures.py�__repr__zInfinityType.__repr__s���c�*�tt|��S�N��hash�reprrs r
�__hash__zInfinityType.__hash__
����D��J��r�otherc��y�NFr�r	rs  r
�__lt__zInfinityType.__lt__
���rc��yrrrs  r
�__le__zInfinityType.__le__rrc�.�t||j�Sr��
isinstance�	__class__rs  r
�__eq__zInfinityType.__eq__����%����0�0rc��y�NTrrs  r
�__gt__zInfinityType.__gt__���rc��yr#rrs  r
�__ge__zInfinityType.__ge__r%rr	�NegativeInfinityTypec��tSr)�NegativeInfinityrs r
�__neg__zInfinityType.__neg__s���rN)�__name__�
__module__�__qualname__�strr�intr�object�boolrrr r$r'r+rrr
rrs����#�� �#� ��F��t���F��t��1�F�1�t�1��F��t���F��t�� �f� �!7� rrc��eZdZdefd�Zdefd�Zdedefd�Z	dedefd�Z
dedefd�Zdedefd�Zdedefd	�Z
d
edefd�Zy)
r(rc��y)Nz	-Infinityrrs r
rzNegativeInfinityType.__repr__$s��rc�*�tt|��Srrrs r
rzNegativeInfinityType.__hash__'rrrc��yr#rrs  r
rzNegativeInfinityType.__lt__*r%rc��yr#rrs  r
rzNegativeInfinityType.__le__-r%rc�.�t||j�Srrrs  r
r zNegativeInfinityType.__eq__0r!rc��yrrrs  r
r$zNegativeInfinityType.__gt__3rrc��yrrrs  r
r'zNegativeInfinityType.__ge__6rrr	c��tSr)rrs r
r+zNegativeInfinityType.__neg__9s���rN)r,r-r.r/rr0rr1r2rrr r$r'rr+rrr
r(r(#s����#�� �#� ��F��t���F��t��1�F�1�t�1��F��t���F��t���f���rr(N)rrr(r*rrr
�<module>r<s-�� � �4�>����4(�)�rpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc000064400000011734151732700760026042 0ustar00�

��_i�����dZddlZddlZddlZddlmZmZmZGd�de�Z	Gd�dej�ZGd�d	ej�ZGd
�dej�Z
Gd�d
�Zy)a;
ELF file parser.

This provides a class ``ELFFile`` that parses an ELF executable in a similar
interface to ``ZipFile``. Only the read interface is implemented.

Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
�N)�IO�Optional�Tuplec��eZdZy)�
ELFInvalidN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_elffile.pyrrs��rrc��eZdZdZdZy)�EIClass��N)rr	r
�C32�C64rrr
rr���
�C�
�Crrc��eZdZdZdZy)�EIDatarrN)rr	r
�Lsb�Msbrrr
rrrrrc� �eZdZdZdZdZdZdZy)�EMachine���(�>�N)rr	r
�I386�S390�Arm�X8664�AArc64rrr
rrs���D�
�D�
�C��E�
�Frrc�\�eZdZdZdeeddfd�Zdedee	dffd�Z
edeefd	��Z
y)
�ELFFilez.
    Representation of an ELF executable.
    �f�returnNc
�b�||_	|jd�}t|dd�}|dk7rt	d|����|d|_|d|_	ddd	d
d�|j|jf\}|_|_		|j|�\
}|_}}|_}|_
}|_|_y#tj$rt	d��wxYw#t$r't	d|j�d
|j�d���wxYw#tj$r}t	d�|�d}~wwxYw)N�16Bzunable to parse identification�sELFzinvalid magic: �)z<HHIIIIIHHHz	<IIIIIIII�rrr+)z>HHIIIIIHHHz	>IIIIIIIIr-)z<HHIQQQIHHHz	<IIQQQQQQ�rrr,)z>HHIQQQIHHHz	>IIQQQQQQr.))rr)rr)rr)rrzunrecognized capacity (z) or encoding (�)z/unable to parse machine and section information)�_f�_read�struct�errorr�bytes�capacity�encoding�_p_fmt�_p_idx�KeyError�machine�_e_phoff�flags�_e_phentsize�_e_phnum)�selfr'�ident�magic�e_fmt�_�es       r
�__init__zELFFile.__init__,sb�����	?��J�J�u�%�E��e�B�Q�i� ���J����u�i�8�9�9��a���
��a���
�	�
@�?�?�?�	/�
�}�}�d�m�m�,�/.�+�E�4�;���	W��
�
�5�!�
�������
���
���!��
��I�|�|�	?��=�>�>�	?��&�	��)�$�-�-��9�!�]�]�O�1�.��
�	��&�|�|�	W��N�O�UV�V��	W�s/�B5�.C�?5D
�5C�0D�
D.�D)�)D.�fmt.c��tj||jjtj|���S)N)r2�unpackr0�read�calcsize)r?rFs  r
r1z
ELFFile._readZs)���}�}�S�$�'�'�,�,�v���s�/C�"D�E�Erc�*�t|j�D]�}|jj|j|j
|zz�	|j
|j�}||jddk7r�j|jj||jd�tj|jj||jd��jd�cSy#tj$rY��wxYw)zH
        The path recorded in the ``PT_INTERP`` section header.
        rrrr�N)�ranger>r0�seekr;r=r1r7r2r3r8�os�fsdecoderI�strip)r?�index�datas   r
�interpreterzELFFile.interpreter]s���
�4�=�=�)�E��G�G�L�L�����):�):�U�)B�B�C�
��z�z�$�+�+�.���D�K�K��N�#�q�(���G�G�L�L��d�k�k�!�n�-�.��;�;�t�w�w�|�|�D����Q��,@�A�B�H�H��N�N�*���
�<�<�
��
�s�C<�<D�D)rr	r
�__doc__rr4rE�strr�intr1�propertyrrTrrr
r&r&'s_���,W�"�U�)�,W��,W�\F��F��s�C�x��F���X�c�]���rr&)rU�enumrOr2�typingrrr�
ValueErrorr�IntEnumrrrr&rrr
�<module>r]sc����	�
�&�&�	��	��d�l�l��
�T�\�\��
�t�|�|��E�Erpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/_parser.cpython-312.pyc000064400000033046151732700760025730 0ustar00�

��_i�'���dZddlZddlmZmZmZmZmZmZddl	m
Z
mZGd�d�ZGd�d	e�Z
Gd
�de�ZGd�d
e�Zee
efZeeeefZeZeeZGd�de�Zdedefd�Zdedefd�Zdedeeeeeffd�Zdedededefd�Zdedeefd�Zdedeefd�Zdedefd�Zdedefd�Zdedefd�Zdedefd�Z dedefd�Z!dedefd �Z"dedefd!�Z#d"ede
fd#�Z$d$edefd%�Z%dedefd&�Z&y)'z�Handwritten parser of dependency specifiers.

The docstring for each __parse_* function contains ENBF-inspired grammar representing
the implementation.
�N)�Any�List�
NamedTuple�Optional�Tuple�Union�)�
DEFAULT_RULES�	Tokenizerc�@�eZdZdeddfd�Zdefd�Zdefd�Zdefd�Zy)�Node�value�returnNc��||_y�N�r)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_parser.py�__init__z
Node.__init__s	����
�c��|jSrr�rs r�__str__zNode.__str__s���z�z�rc�<�d|jj�d|�d�S)N�<z('z')>)�	__class__�__name__rs r�__repr__z
Node.__repr__s"���4�>�>�*�*�+�2�d�V�3�7�7rc��t�r)�NotImplementedErrorrs r�	serializezNode.serializes��!�!r)r�
__module__�__qualname__�strrrrr!�rrr
r

s9���c��d�����8�#�8�"�3�"rr
c��eZdZdefd�Zy)�Variablerc��t|�Sr�r$rs rr!zVariable.serialize����4�y�rN�rr"r#r$r!r%rrr'r'����3�rr'c��eZdZdefd�Zy)�Valuerc��d|�d�S)N�"r%rs rr!zValue.serialize!s���4�&��{�rNr+r%rrr.r. s���3�rr.c��eZdZdefd�Zy)�Oprc��t|�Srr)rs rr!zOp.serialize&r*rNr+r%rrr2r2%r,rr2c�L�eZdZUeed<eed<eeed<eed<eeed<y)�ParsedRequirement�name�url�extras�	specifier�markerN)rr"r#r$�__annotations__rr�
MarkerListr%rrr5r54s&��

�I�	�H���I���N��Z� � rr5�sourcerc�6�tt|t���S�N)�rules)�_parse_requirementrr
�r=s r�parse_requirementrC?s���i��m�D�E�Er�	tokenizerc��|jd�|jdd��}|j}|jd�t|�}|jd�t	|�\}}}|jdd��t|||||�S)zI
    requirement = WS? IDENTIFIER WS? extras WS? requirement_details
    �WS�
IDENTIFIERz1package name at the start of dependency specifier��expected�ENDzend of dependency specifier)�consume�expect�text�
_parse_extras�_parse_requirement_detailsr5)rD�
name_tokenr6r8r7r9r:s       rrArACs������d���!�!��R�"��J��?�?�D�
���d��
�9�
%�F�
���d��7�	�B��C��F�
���U�%B��C��T�3��	�6�B�Brc��d}d}d}|jd�r�|j�|jd�|j}|j	dd��j
}|jdd	�
�r|||fS|j	dd��|jdd	�
�r|||fSt
||d�
�}nR|j}t|�}|jd�|jdd	�
�r|||fSt
|||rdnd�
�}|||fS)z~
    requirement_details = AT URL (WS requirement_marker?)?
                        | specifier WS? (requirement_marker)?
    �N�ATrF�URLzURL after @rHrJT��peekzwhitespace after URLzURL and whitespace)�
span_start�after�version specifierz#name and no valid version specifier)�check�readrK�positionrLrM�_parse_requirement_marker�_parse_specifier)rDr9r7r:�	url_start�specifier_starts      rrOrOXs-���I�
�C�
�F����t���������$���&�&�	����u�}��=�B�B���?�?�5�t�?�,���F�+�+�����(>��?��?�?�5�t�?�,���F�+�+�*��)�3G�
��$�,�,��$�Y�/�	����$���?�?�5�t�?�,���F�+�+�*��&��$�:�

��
��F�#�#rrWrXc��|jd�s|jd|�d�|��|j�t|�}|j	d�|S)z3
    requirement_marker = SEMICOLON marker WS?
    �	SEMICOLONz!Expected end or semicolon (after �))rWrF)rZ�raise_syntax_errorr[�
_parse_markerrK)rDrWrXr:s    rr]r]�s[���?�?�;�'��$�$�/��w�a�8�!�	%�	
��N�N��
�9�
%�F�
���d���Mrc���|jdd��sgS|jddd��5|jd�t|�}|jd�ddd�|S#1swYSxYw)	zG
    extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?
    �LEFT_BRACKETTrU�
RIGHT_BRACKETr8��aroundrFN)rZ�enclosing_tokensrK�_parse_extras_list)rDr8s  rrNrN�sv���?�?�>��?�5��	�	�	#�	#����
$�
�
	���$��#�I�.�����$��
��M�
��M�s�.A"�"A,c��g}|jd�s|S|j|j�j�	|j	d�|jdd��r|jd�n|jd�s	|S|j�|j	d�|j
dd��}|j|j���)	z>
    extras_list = identifier (wsp* ',' wsp* identifier)*
    rGTrFrUz"Expected comma between extra names�COMMAzextra name after commarH)rZ�appendr[rMrKrdrL)rDr8�extra_tokens   rrlrl�s����F��?�?�<�(��
�
�M�M�)�.�.�"�'�'�(�
����$���?�?�<�d�?�3��(�(�)M�N�����)���M�
	�������$���&�&�|�>V�&�W���
�
�k�&�&�'�rc��|jddd��5|jd�t|�}|jd�ddd�|S#1swYSxYw)zr
    specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS
              | WS? version_many WS?
    �LEFT_PARENTHESIS�RIGHT_PARENTHESISrYrirFN)rkrK�_parse_version_many)rD�parsed_specifierss  rr^r^�sd��

�	#�	#���"�
$�
�
	���$��/�	�:�����$��
���
���s�.A
�
Ac��d}|jd�r�|j}||j�jz
}|jdd��r!|j	d||jdz��|jd	d��r|j	d
||j��|jd�|jd�s	|S||j�jz
}|jd�|jd�r��|S)
z@
    version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)?
    rR�	SPECIFIER�VERSION_PREFIX_TRAILTrUz6.* suffix can only be used with `==` or `!=` operatorsr	)rW�span_end�VERSION_LOCAL_LABEL_TRAILz@Local version label can only be used with `==` or `!=` operatorsrFrn)rZr\r[rMrdrK)rDrurWs   rrtrt�s����
�/�/�+�
&��'�'�
��Y�^�^�-�2�2�2���?�?�1��?�=��(�(�H�%�"�+�+�a�/�
)�
�
�?�?�6�T�?�B��(�(�R�%�"�+�+�
)�
�
	���$�����w�'����	�Y�^�^�-�2�2�2�����$��'�/�/�+�
&�*�rc�6�tt|t���Sr?)rerr
rBs r�parse_markerr|�s����6��?�@�@rc���t|�g}|jd�rJ|j�}t|�}|j|j|f�|jd�r�J|S)z4
    marker = marker_atom (BOOLOP marker_atom)+
    �BOOLOP)�_parse_marker_atomrZr[�extendrM)rD�
expression�token�
expr_rights    rreres`��%�Y�/�0�J�
�/�/�(�
#���� ��'�	�2�
����5�:�:�z�2�3��/�/�(�
#��rc�4�|jd�|jdd��rK|jddd��5|jd�t|�}|jd�ddd�nt	|�}|jd�S#1swY�xYw)	zw
    marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS?
                | WS? marker_item WS?
    rFrrTrUrszmarker expressionriN)rKrZrkre�_parse_marker_item)rDr:s  rrrs������d�����)���5�
�
'�
'���&�(�
�

���d�#�!.�y�!9�F����d�#�
�
�$�I�.��
���d���M�
�
�s�.B�Bc���|jd�t|�}|jd�t|�}|jd�t|�}|jd�|||fS)zG
    marker_item = WS? marker_var WS? marker_op WS? marker_var WS?
    rF)rK�_parse_marker_var�_parse_marker_op)rD�marker_var_left�	marker_op�marker_var_rights    rr�r�$si�����d��'�	�2�O�
���d�� ��+�I�
���d��(��3��
���d���Y�(8�9�9rc��|jd�r3t|j�jj	dd��S|jd�r#t|j�j�S|j
d��y)z/
    marker_var = VARIABLE | QUOTED_STRING
    �VARIABLE�.�_�
QUOTED_STRINGz+Expected a marker variable or quoted string)�messageN)rZ�process_env_varr[rM�replace�process_python_strrd�rDs rr�r�2so�����z�"��y�~�~�/�4�4�<�<�S�#�F�G�G�	����	)�!�)�.�.�"2�"7�"7�8�8��$�$�A�	%�	
r�env_varc�B�|dk(s|dk(rtd�St|�S)N�platform_python_implementation�python_implementation)r')r�s rr�r�@s+���3�3��-�-��8�9�9��� � r�
python_strc�T�tj|�}tt|��Sr)�ast�literal_evalr.r$)r�rs  rr�r�Js!�����Z�(�E���U���rc��|jd�r|j�td�S|jd�rA|j�|jdd��|jdd��td�S|jd	�r#t|j�j�S|jd
�S)z&
    marker_op = IN | NOT IN | OP
    �IN�in�NOTrFzwhitespace after 'not'rHz'in' after 'not'znot in�OPzJExpected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in)rZr[r2rLrMrdr�s rr�r�Os������t�������$�x��	����	���������(@��A�����(:��;��(�|��	����	��)�.�.�"�'�'�(�(��+�+�
8�
�	
r)'�__doc__r��typingrrrrrr�
_tokenizerr
rr
r'r.r2�	MarkerVar�
MarkerItem�
MarkerAtomr<r5r$rCrArO�intr]rNrlr^rtr|rerr�r�r�r�r�r%rr�<module>r�s�����@�@�0�"�"��t��
�D��
���

�(�E�/�"�	�
�9�b�)�+�
,�
�
�
�
�#�Y�
�!�
�!�F�c�F�&7�F�C�)�C�0A�C�*0$��0$�
�3��X�j�)�)�*�0$�f���),��58����(�Y��4��9��&�)���S�	��6�	��c��"�9����@A��A��A�	�Y�	�:�	��)��
��,:�)�:�
�:�
��
�y�
�!�S�!�X�!��3��5��

�	�
�b�
rpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/version.cpython-312.pyc000064400000046555151732700770025774 0ustar00�

��_i�?��X�dZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
ddlmZm
Z
mZmZgd�Ze
e
efZe
ee	eeffZe
eeefZe
ee	e
ee	eefe	eeffdffZe	ee	edfeeeefZeeegefZej4dgd	��Zd
eddfd
�ZGd�de�ZGd�d�ZdZ e Z!	Gd�de�Z"dede
ee#efdee	eeffd�Z$ejJd�Z&dedeefd�Z'dede	edfdee	eefdee	eefdee	eefdee	edefd�Z(y) zB
.. testsetup::

    from packaging.version import parse, Version
�N)�Any�Callable�Optional�SupportsInt�Tuple�Union�)�Infinity�InfinityType�NegativeInfinity�NegativeInfinityType)�VERSION_PATTERN�parse�Version�InvalidVersion.�_Version)�epoch�release�dev�pre�post�local�version�returnrc��t|�S)z�Parse the given version string.

    >>> parse('1.0.dev1')
    <Version('1.0.dev1')>

    :param version: The version string to parse.
    :raises InvalidVersion: When the version string is not a valid version.
    )r)rs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/version.pyrr+s���7���c��eZdZdZy)rz�Raised when a version string is not a valid version.

    >>> Version("invalid")
    Traceback (most recent call last):
        ...
    packaging.version.InvalidVersion: Invalid version: 'invalid'
    N)�__name__�
__module__�__qualname__�__doc__�rrrr7s��rrc��eZdZUeedfed<defd�Zdddefd�Z	dddefd�Z
dedefd�Zdddefd	�Z
dddefd
�Zdedefd�Zy)
�_BaseVersion.�_keyrc�,�t|j�S�N)�hashr&��selfs r�__hash__z_BaseVersion.__hash__Ds���D�I�I��r�otherc�`�t|t�stS|j|jkSr(��
isinstancer%�NotImplementedr&�r+r-s  r�__lt__z_BaseVersion.__lt__J�%���%��.�!�!��y�y�5�:�:�%�%rc�`�t|t�stS|j|jkSr(r/r2s  r�__le__z_BaseVersion.__le__P�%���%��.�!�!��y�y�E�J�J�&�&rc�`�t|t�stS|j|jk(Sr(r/r2s  r�__eq__z_BaseVersion.__eq__Vr7rc�`�t|t�stS|j|jk\Sr(r/r2s  r�__ge__z_BaseVersion.__ge__\r7rc�`�t|t�stS|j|jkDSr(r/r2s  r�__gt__z_BaseVersion.__gt__br4rc�`�t|t�stS|j|jk7Sr(r/r2s  r�__ne__z_BaseVersion.__ne__hr7rN)rr r!rr�__annotations__�intr,�boolr3r6�objectr9r;r=r?r#rrr%r%As���
��S��/���#��&�N�&�t�&�'�N�'�t�'�'�F�'�t�'�'�N�'�t�'�&�N�&�t�&�'�F�'�t�'rr%a�
    v?
    (?:
        (?:(?P<epoch>[0-9]+)!)?                           # epoch
        (?P<release>[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P<pre>                                          # pre-release
            [-_\.]?
            (?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P<pre_n>[0-9]+)?
        )?
        (?P<post>                                         # post release
            (?:-(?P<post_n1>[0-9]+))
            |
            (?:
                [-_\.]?
                (?P<post_l>post|rev|r)
                [-_\.]?
                (?P<post_n2>[0-9]+)?
            )
        )?
        (?P<dev>                                          # dev release
            [-_\.]?
            (?P<dev_l>dev)
            [-_\.]?
            (?P<dev_n>[0-9]+)?
        )?
    )
    (?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
c��eZdZUdZej
dezdzejejz�Z	e
ed<deddfd�Z
defd	�Zdefd
�Zedefd��Zedeedffd
��Zedeeeeffd��Zedeefd��Zedeefd��Zedeefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Z edefd��Z!edefd��Z"y)ra�This class abstracts handling of a project's versions.

    A :class:`Version` instance is comparison aware and can be compared and
    sorted using the standard Python interfaces.

    >>> v1 = Version("1.0a5")
    >>> v2 = Version("1.0")
    >>> v1
    <Version('1.0a5')>
    >>> v2
    <Version('1.0')>
    >>> v1 < v2
    True
    >>> v1 == v2
    False
    >>> v1 > v2
    False
    >>> v1 >= v2
    False
    >>> v1 <= v2
    True
    z^\s*z\s*$r&rrNc��|jj|�}|std|�d���t|j	d�rt|j	d��ndt
d�|j	d�jd�D��t|j	d�|j	d	��t|j	d
�|j	d�xs|j	d��t|j	d
�|j	d��t|j	d����|_
t|jj|jj|jj|jj|jj |jj"�|_y)aCInitialize a Version object.

        :param version:
            The string representation of a version which will be parsed and normalized
            before use.
        :raises InvalidVersion:
            If the ``version`` does not conform to PEP 440 in any way then this
            exception will be raised.
        zInvalid version: '�'rrc3�2K�|]}t|����y�wr()rA��.0�is  r�	<genexpr>z#Version.__init__.<locals>.<genexpr>�s����L�*K�Q�#�a�&�*K���r�.�pre_l�pre_n�post_l�post_n1�post_n2�dev_l�dev_nr)rrrrrrN)�_regex�searchrr�grouprA�tuple�split�_parse_letter_version�_parse_local_version�_version�_cmpkeyrrrrrrr&)r+r�matchs   r�__init__zVersion.__init__�sR�����"�"�7�+��� �#5�g�Y�a�!@�A�A�!�/4�{�{�7�/C�#�e�k�k�'�*�+���L�%�+�+�i�*@�*F�*F�s�*K�L�L�%�e�k�k�'�&:�E�K�K��<P�Q�&����H�%�u�{�{�9�'=�'W����Y�AW��&�e�k�k�'�&:�E�K�K��<P�Q�&�u�{�{�7�';�<�	
��
���M�M����M�M�!�!��M�M����M�M����M�M����M�M���

��	rc��d|�d�S)z�A representation of the Version that shows all internal state.

        >>> Version('1.0.0')
        <Version('1.0.0')>
        z
<Version('z')>r#r*s r�__repr__zVersion.__repr__�s���D�6��%�%rc�Z�g}|jdk7r|j|j�d��|jdjd�|jD���|j�1|jdjd�|jD���|j
�|jd|j
���|j�|jd|j���|j�|jd	|j���dj|�S)
zA string representation of the version that can be rounded-tripped.

        >>> str(Version("1.0a5"))
        '1.0a5'
        r�!rMc3�2K�|]}t|����y�wr(��str�rI�xs  rrKz"Version.__str__.<locals>.<genexpr>������;�l��c�!�f�l�rL�c3�2K�|]}t|����y�wr(rergs  rrKz"Version.__str__.<locals>.<genexpr>�s���� :��A��Q���rLz.postz.dev�+)r�append�joinrrrrr�r+�partss  r�__str__zVersion.__str__�s������:�:��?��L�L�D�J�J�<�q�)�*�	���S�X�X�;�d�l�l�;�;�<��8�8���L�L���� :���� :�:�;��9�9� ��L�L�5�����,�-��8�8���L�L�4����z�*�+��:�:�!��L�L�1�T�Z�Z�L�)�*��w�w�u�~�rc�2�|jj}|S)zThe epoch of the version.

        >>> Version("2.0.0").epoch
        0
        >>> Version("1!2.0.0").epoch
        1
        )r\r)r+�_epochs  rrz
Version.epochs���m�m�)�)���
r.c�2�|jj}|S)adThe components of the "release" segment of the version.

        >>> Version("1.2.3").release
        (1, 2, 3)
        >>> Version("2.0.0").release
        (2, 0, 0)
        >>> Version("1!2.0.0.post0").release
        (2, 0, 0)

        Includes trailing zeroes but not the epoch or any pre-release / development /
        post-release suffixes.
        )r\r)r+�_releases  rrzVersion.releases��%)�M�M�$9�$9���rc�2�|jj}|S)aThe pre-release segment of the version.

        >>> print(Version("1.2.3").pre)
        None
        >>> Version("1.2.3a1").pre
        ('a', 1)
        >>> Version("1.2.3b1").pre
        ('b', 1)
        >>> Version("1.2.3rc1").pre
        ('rc', 1)
        )r\r)r+�_pres  rrzVersion.pre$s��+/�-�-�*;�*;���rc�d�|jjr|jjdSdS)z�The post-release number of the version.

        >>> print(Version("1.2.3").post)
        None
        >>> Version("1.2.3.post1").post
        1
        r	N)r\rr*s rrzVersion.post4s*��)-�
�
�(:�(:�t�}�}�!�!�!�$�D��Drc�d�|jjr|jjdSdS)z�The development number of the version.

        >>> print(Version("1.2.3").dev)
        None
        >>> Version("1.2.3.dev1").dev
        1
        r	N)r\rr*s rrzVersion.dev?s*��(,�}�}�'8�'8�t�}�}� � ��#�B�d�Brc��|jjr,djd�|jjD��Sy)z�The local version segment of the version.

        >>> print(Version("1.2.3").local)
        None
        >>> Version("1.2.3+abc").local
        'abc'
        rMc3�2K�|]}t|����y�wr(rergs  rrKz Version.local.<locals>.<genexpr>Ts����@�,?�q�C��F�,?�rLN)r\rrnr*s rrz
Version.localJs3���=�=����8�8�@�D�M�M�,?�,?�@�@�@�rc�>�t|�jdd�dS)z�The public portion of the version.

        >>> Version("1.2.3").public
        '1.2.3'
        >>> Version("1.2.3+abc").public
        '1.2.3'
        >>> Version("1.2.3+abc.dev1").public
        '1.2.3'
        rlr	r)rfrYr*s r�publiczVersion.publicXs���4�y���s�A�&�q�)�)rc���g}|jdk7r|j|j�d��|jdjd�|jD���dj|�S)a]The "base version" of the version.

        >>> Version("1.2.3").base_version
        '1.2.3'
        >>> Version("1.2.3+abc").base_version
        '1.2.3'
        >>> Version("1!1.2.3+abc.dev1").base_version
        '1!1.2.3'

        The "base version" is the public version of the project without any pre or post
        release markers.
        rrcrMc3�2K�|]}t|����y�wr(rergs  rrKz'Version.base_version.<locals>.<genexpr>zrirLrj)rrmrnrros  r�base_versionzVersion.base_versiones\�����:�:��?��L�L�D�J�J�<�q�)�*�	���S�X�X�;�d�l�l�;�;�<��w�w�u�~�rc�>�|jduxs|jduS)aTWhether this version is a pre-release.

        >>> Version("1.2.3").is_prerelease
        False
        >>> Version("1.2.3a1").is_prerelease
        True
        >>> Version("1.2.3b1").is_prerelease
        True
        >>> Version("1.2.3rc1").is_prerelease
        True
        >>> Version("1.2.3dev1").is_prerelease
        True
        N)rrr*s r�
is_prereleasezVersion.is_prerelease~s!���x�x�t�#�;�t�x�x�t�';�;rc��|jduS)z�Whether this version is a post-release.

        >>> Version("1.2.3").is_postrelease
        False
        >>> Version("1.2.3.post1").is_postrelease
        True
        N)rr*s r�is_postreleasezVersion.is_postrelease�s���y�y��$�$rc��|jduS)z�Whether this version is a development release.

        >>> Version("1.2.3").is_devrelease
        False
        >>> Version("1.2.3.dev1").is_devrelease
        True
        N)rr*s r�
is_devreleasezVersion.is_devrelease�s���x�x�t�#�#rc�T�t|j�dk\r|jdSdS)zqThe first item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").major
        1
        r	r��lenrr*s r�majorz
Version.major�s'��#&�d�l�l�"3�q�"8�t�|�|�A��?�a�?rc�T�t|j�dk\r|jdSdS)z�The second item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").minor
        2
        >>> Version("1").minor
        0
        �r	rr�r*s r�minorz
Version.minor��'��#&�d�l�l�"3�q�"8�t�|�|�A��?�a�?rc�T�t|j�dk\r|jdSdS)z�The third item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").micro
        3
        >>> Version("1").micro
        0
        �r�rr�r*s r�microz
Version.micro�r�r)#rr r!r"�re�compiler�VERBOSE�
IGNORECASErU�CmpKeyr@rfr_rarq�propertyrArrrrrrrrr}r�rBr�r�r�r�r�r�r#rrrr�s���.�R�Z�Z��/�1�G�;�R�Z�Z�"�-�-�=W�
X�F�
�L�$
��$
��$
�L&�#�&����B�	�s�	��	����s�C�x����� �
�X�e�C��H�o�.�
��
��E�h�s�m�E��E��C�X�c�]�C��C���x��}�����
*��
*��
*���c����0�<�t�<��<� �%��%��%��$�t�$��$��@�s�@��@��@�s�@��@��@�s�@��@r�letter�numberc��|r>|�d}|j�}|dk(rd}n|dk(rd}n
|dvrd}n|dvrd	}|t|�fS|s|rd	}|t|�fSy)
Nr�alpha�a�beta�b)�cr�preview�rc)�rev�rr)�lowerrA)r�r�s  rrZrZ�s�����>��F������
�W���F�
�v�
��F�
�.�
.��F�
�|�
#��F��s�6�{�"�"��f����s�6�{�"�"�rz[\._-]rc�R�|�%td�tj|�D��Sy)zR
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    Nc3�rK�|]/}|j�s|j�n
t|����1y�wr()�isdigitr�rA)rI�parts  rrKz'_parse_local_version.<locals>.<genexpr>�s/����
�>��!%����D�J�J�L�C��I�=�>�s�57)rX�_local_version_separatorsrY)rs rr[r[�s4��
���
�1�7�7��>�
�
�	
�rrrrrrc��ttttjd�t|�����}|�|�	|�t
}n|�t}n|}|�t
}n|}|�t}	n|}	|�t
}
ntd�|D��}
|||||	|
fS)Nc��|dk(S)Nrr#)rhs r�<lambda>z_cmpkey.<locals>.<lambda>s��A��Frc3�TK�|] }t|t�r|dfnt|f���"y�w)rjN)r0rArrHs  rrKz_cmpkey.<locals>.<genexpr>0s,����
�NS��z�!�S�)�Q��G�0@�!�/D�D�e�s�&()rX�reversed�list�	itertools�	dropwhilerr
)rrrrrrrurw�_post�_dev�_locals           rr]r]�s������i�)�)�*:�H�W�<M�N�O�P��H��{�t�|���/��

�������|� 0�����{�'�����}�,���
�NS�
�
���(�D�%��v�5�5r))r"�collectionsr�r��typingrrrrrr�_structuresr
rrr
�__all__�
InfiniteTypesrfrA�PrePostDevType�SubLocalType�	LocalTyper�rB�VersionComparisonMethod�
namedtuplerr�
ValueErrorrr%�_VERSION_PATTERNrr�bytesrZr�r�r[r]r#rr�<module>r�s1�����	�E�E�W�W�
C���l�$8�8�9�
��}�e�C��H�o�5�6���]�C��,�-����	�
���,��#�$��&��4�5�
7�	
�
	�	
���

�	�
���s�C�x��.�.�.�)�S�
��#�F�F�#3�T�#9�:��!�;�!�!��C���
	�3�	�9�	��Z��+'�+'�`��>#��	�e@�l�e@�P	!��!��s�E�;�6�7�!�
�e�C��H�o��!�H'�B�J�J�y�1��	��	���(;�	�<6��<6�
�3��8�_�<6�
�%��S��/�	"�<6��5��c��?�
#�	<6�

�%��S��/�	"�<6��E�,�'�(�
<6��<6rpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/metadata.cpython-312.pyc000064400000023261151732700770026054 0ustar00�

��_i
@�
�F�ddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
ejdk\rddlmZnej rddlmZn	ddlmZGd�ded	�
�Zhd�Zhd�Zd
ede	efd�Zd
e	edeeeffd�Zdej2j4deeefdefd�Zidd�dd�dd�dd�dd�dd�dd�dd �d!d!�d"d"�d#d#�d$d%�d&d'�d(d(�d)d)�d*d+�d,d-�d.d/d0d1d2d3d4d5d6d7d8d9��Zd
eeefdeeeee	efffd:�Zy#e$r
Gd�d�ZY��wxYw);�N)�Dict�List�Optional�Tuple�Union�cast)��)�	TypedDictc��eZdZd�Zy)rc��y)N�)�_args�_kwargss  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/metadata.py�__init_subclass__zTypedDict.__init_subclass__s���N)�__name__�
__module__�__qualname__rrrrrrs��rrc��eZdZUdZeed<eed<eed<eeed<eed<eed<eeed<eed	<eed
<eed<eed<eeed
<eed<eeed<eeed<eeed<eeed<eed<eed<eeed<eeed<eeed<eed<eeed<eeefed<eed<eeed<eeed<y)�RawMetadataaqA dictionary of raw core metadata.

    Each field in core metadata maps to a key of this dictionary (when data is
    provided). The key is lower-case and underscores are used instead of dashes
    compared to the equivalent core metadata field. Any core metadata field that
    can be specified multiple times or can hold multiple values in a single
    field have a key with a plural name.

    Core metadata fields that can be specified multiple times are stored as a
    list or dict depending on which is appropriate for the field. Any fields
    which hold multiple values in a single field are stored as a list.

    �metadata_version�name�version�	platforms�summary�description�keywords�	home_page�author�author_email�license�supported_platforms�download_url�classifiers�requires�provides�	obsoletes�
maintainer�maintainer_email�
requires_dist�
provides_dist�obsoletes_dist�requires_python�requires_external�project_urls�description_content_type�provides_extra�dynamicN)rrr�__doc__�str�__annotations__rrrrrrrs������

�I�
�L��C�y��
�L����3�i���N��K���
�L��c��"����c����3�i���3�i���C�y���O�����9����9����I�����C�y� ��s�C�x�.� �"�!���I���#�Y�rrF)�total>rr!r#rrr r*rr"r%r/r+rr2>r4r(r'r)rr&r-r,r.r3r0r$�data�returnc�f�|jd�D�cgc]}|j���c}Scc}w)zCSplit a string of comma-separate keyboards into a list of keywords.�,)�split�strip)r9�ks  r�_parse_keywordsr@�s(��#�z�z�#��/��!�A�G�G�I��/�/��/s�.c��i}|D]s}|jdd�D�cgc]}|j���}}|jdgtddt	|�z
�z�|\}}||vrtd��|||<�u|Scc}w)z?Parse a list of label/URL string pairings separated by a comma.r<��r�z duplicate labels in project urls)r=r>�extend�max�len�KeyError)r9�urls�pair�p�parts�label�urls       r�_parse_project_urlsrO�s���
�D���$%)�J�J�s�A�$6�7�$6�q�����$6��7�
���b�T�S��A��E�
�N�3�4�5��
��s��D�=��=�>�>���U��A�D�K��!8s�A=�msg�sourcec��t|t�r|j�}|S|jd��}	|jdd�S#t$rtd��wxYw)zGet the body of the message.T��decode�utf8�strictzpayload in an invalid encoding)�
isinstancer6�get_payloadrT�UnicodeDecodeError�
ValueError)rPrQ�payload�bpayloads    r�_get_payloadr]�sb���&�#�����(�����/�/��/�6��	?��?�?�6�8�4�4��!�	?��=�>�>�	?�s�A�Ar!zauthor-emailr"�
classifierr&rzdescription-content-typer2zdownload-urlr%r4z	home-pager rr#r*zmaintainer-emailr+zmetadata-versionrrr)zobsoletes-distr.�platformrr1r(r-r3r'r,r0r/rr$r)zproject-urlr(z
provides-distzprovides-extrar'z
requires-distzrequires-externalzrequires-pythonrzsupported-platformrc	���i}i}t|t�rHtjj	tj
j��j|�}nGtjjtj
j��j|�}t|j��D�]�}|j�}|j|�}g}d}|D]�}t|tjjtf�sJ�t|tjj�r�g}	tjj!|�D]-\}
}	|
j#dd�d}|	j'|
|f��/|j'ttjj)|	�����|j'|���|s|||<��#t*j-|�}|�|||<��A|t.vrt1|�dk(r
|d||<��a|t2vr|||<��p|d	k(r!t1|�dk(rt5|d�||<���|d
k(r	t7|�||<���|||<���	t;||�}
|
rfd|vrCt=t|j?d��}|jAdg�jC||
g�nd|vr|dj'|
�n|
|d<	t=tJ|�|fS#t$$rd}d}Y���wxYw#t8$r	|||<Y��`wxYw#tD$rB|jAdg�j'|jGt|tH����Y��wxYw)
a�Parse a distribution's metadata.

    This function returns a two-item tuple of dicts. The first dict is of
    recognized fields from the core metadata specification. Fields that can be
    parsed and translated into Python's built-in types are converted
    appropriately. All other fields are left as-is. Fields that are allowed to
    appear multiple times are stored as lists.

    The second dict contains all other fields from the metadata. This includes
    any unrecognized fields. It also includes any fields which are expected to
    be parsed into a built-in type but were not formatted appropriately. Finally,
    any fields that are expected to appear only once but are repeated are
    included in this dict.

    )�policyTrUrV�latin1FrBrrr1rrS)&rWr6�email�parser�Parserra�compat32�parsestr�BytesParser�
parsebytes�	frozenset�keys�lower�get_all�header�Header�
decode_headerrTrY�append�make_header�_EMAIL_TO_RAW_MAPPING�get�_STRING_FIELDSrG�_LIST_STRING_FIELDSr@rOrHr]r�pop�
setdefaultrErZrX�bytesr)r9�raw�unparsed�parsedr�headers�value�valid_encoding�h�chunks�bin�encoding�raw_namer[�description_headers               r�parse_emailr��s;�� =?�C�%'�H��$������$�$�E�L�L�,A�,A�$�B�K�K�D�Q�����)�)����1F�1F�)�G�R�R�SW�X��
�&�+�+�-�(���z�z�|��
�.�.��&�������A��a�%�,�,�"5�"5�s�!;�<�<�<��!�U�\�\�0�0�1�=?��%*�\�\�%?�%?��%B�M�C��*��
�
�6�8�4�$*���M�M�3��/�2�&C����S����!9�!9�&�!A�B�C����Q��G�P�"�H�T�N��(�,�,�T�2����#�H�T�N���~�%�#�e�*��/�!�!�H�C��M��,�
,�!�C��M���
#��E�
�a��+�E�!�H�5�C��M���
'�
'� 3�E� :��H�
�#�H�T�N�i)�t-��v�t�,�����#�%)�#�s�w�w�}�/E�%F�"��#�#�M�2�6�=�=�'��1���(�*���'�.�.�w�7�%,��M�"���S�!�8�+�+��Q.�/�#+��).��/��J�
'�!&����
'���
����M�2�.�5�5����j��u�&=��>�	
�
�s7�#K8�L�2L!�8
L		�L		�L�L�!AM,�+M,)�email.feedparserrc�email.header�
email.message�email.parser�email.policy�sys�typingrrrrrr�version_infor�
TYPE_CHECKING�typing_extensions�ImportErrorrrurvr6r@rO�message�Messageryr]rsr�rrr�<module>r�s�������
�
�;�;����v�� �
���/�	�3�<�)�5�<�F��"
�� 0�#�0�$�s�)�0�
%�d�3�i�%�D��c��N�%�P?�e�m�m�+�+�?�U�5�#�:�5F�?�3�?�:��h���N���-���=�	�
� :���N�
��y������
���y���,���*���*���F����� �&�!�"��#�$"��$�&��$�,�(��/��9��@m,�e�E�3�J�'�m,�E�+�t�C��c��N�?S�2S�,T�m,��s�	�
�
�	�s�D�D �D python3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/requirements.cpython-312.pyc000064400000011523151732700770027015 0ustar00�

��_i����ddlZddlmZmZmZmZddlmZ	ddl
mZddlm
Z
mZddlmZGd�d	e�ZGd
�d�Zy)�N)�Any�List�Optional�Set�)�parse_requirement)�ParserSyntaxError)�Marker�_normalize_extra_values)�SpecifierSetc��eZdZdZy)�InvalidRequirementzJ
    An invalid requirement was found, users should refer to PEP 508.
    N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/requirements.pyrrs��rrc�T�eZdZdZdeddfd�Zdefd�Zdefd�Zdefd�Z	d	e
defd
�Zy)�Requirementz�Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    �requirement_string�returnNc�r�	t|�}|j|_|j
r�tjj|j
�}|jdk(r7tjj|�|j
k7rStd��|jr$|jr|js$|jstd|j
����|j
|_nd|_t|jr|jng�|_
t|j�|_d|_|j �Ct#j$t"�|_t'|j �|j _yy#t$r}tt|��|�d}~wwxYw)N�filezInvalid URL givenz
Invalid URL: )�_parse_requirementr	r�str�name�url�urllib�parse�urlparse�scheme�
urlunparse�netloc�set�extrasr�	specifier�markerr
�__new__r�_markers)�selfr�parsed�e�
parsed_urls     r�__init__zRequirement.__init__!sE��	4�'�(:�;�F� ����	��:�:����.�.�v�z�z�:�J�� � �F�*��<�<�*�*�:�6�&�*�*�D�,�-@�A�A� �'�'�J�,=�,=��%�%�j�.?�.?�(�=�����)E�F�F�&,�j�j�D�H��D�H� #�V�]�]�F�M�M�� K���'3�F�4D�4D�'E���(,����=�=�$� �.�.��0�D�K�#:�6�=�=�#I�D�K�K� �%��'!�	4�$�S��V�,�!�3��	4�s�F�	F6�F1�1F6c�
�|jg}|jr9djt|j��}|j	d|�d��|j
r$|j	t
|j
��|jr;|j	d|j���|jr|j	d�|jr|j	d|j���dj|�S)N�,�[�]z@ � z; �)	rr'�join�sorted�appendr(rrr))r,�parts�formatted_extrass   r�__str__zRequirement.__str__;s��� �I�I�;���;�;�"�x�x��t�{�{�(;�<���L�L�1�-�.�a�0�1��>�>��L�L��T�^�^�,�-��8�8��L�L�2�d�h�h�Z��)��{�{����S�!��;�;��L�L�2�d�k�k�]�+�,��w�w�u�~�rc��d|�d�S)Nz<Requirement('z')>r�r,s r�__repr__zRequirement.__repr__Os����v�S�)�)rc�V�t|jjt|�f�S�N)�hash�	__class__rrr>s r�__hash__zRequirement.__hash__Rs ���T�^�^�,�,�c�$�i�8�9�9r�otherc�8�t|t�stS|j|jk(xrj|j|jk(xrO|j
|j
k(xr4|j|jk(xr|j|jk(SrA)�
isinstancer�NotImplementedrr'r(rr))r,rEs  r�__eq__zRequirement.__eq__Us����%��-�!�!�
�I�I����#�
,����u�|�|�+�
,����%�/�/�1�
,����E�I�I�%�
,����u�|�|�+�	
r)
rrrrrr0r<r?�intrDr�boolrIrrrrrsT���J�3�J�4�J�4���(*�#�*�:�#�:�

�C�

�D�

rr)�urllib.parser �typingrrrr�_parserrr�
_tokenizerr	�markersr
r�
specifiersr�
ValueErrorrrrrr�<module>rSs4��
�+�+�<�)�4�$����K
�K
rpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/markers.cpython-312.pyc000064400000024502151732700770025737 0ustar00�

��_i �	�b�UddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZddlmZddlmZmZddlmZgd�ZeeegefZGd	�d
e�Z Gd�de�Z!Gd
�de�Z"dedefd�Z#	d*deeee
efde	edefd�Z$d�d�ejJejLejNejPejRejTd�Z+eeefe,d<dedededefd�Z-dedede
edffd �Z.d!ed"eeefdefd#�Z/d$d%defd&�Z0deeeffd'�Z1Gd(�d)�Z2y)+�N)�Any�Callable�Dict�List�Optional�Tuple�Union�)�
MarkerAtom�
MarkerList�Op�Value�Variable�parse_marker)�ParserSyntaxError)�InvalidSpecifier�	Specifier��canonicalize_name)�
InvalidMarker�UndefinedComparison�UndefinedEnvironmentName�Marker�default_environmentc��eZdZdZy)rzE
    An invalid marker was found, users should refer to PEP 508.
    N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/markers.pyrr"���r"rc��eZdZdZy)rzP
    An invalid operation was attempted on a value that doesn't support it.
    Nrr!r"r#rr(r$r"rc��eZdZdZy)rz\
    A name was attempted to be used that does not exist inside of the
    environment.
    Nrr!r"r#rr.s��r"r�results�returnc�L�t|dt�r�|d\}}}t|t�r0|jdk(r!t	|j�}t|�}n?t|t�r/|jdk(r t	|j�}t|�}|||f|d<|S)z!
    Normalize extra values.
    r�extra)�
isinstance�tupler�valuerr)r'�lhs�op�rhs�normalized_extras     r#�_normalize_extra_valuesr25s����'�!�*�e�$��q�z���R���c�8�$����g�)=�0����;���(�)�C�
��X�
&�3�9�9��+?�0����;���(�)�C��"�c�\���
��Nr"�marker�firstc���t|tttf�sJ�t|t�r5t	|�dk(r't|dttf�rt|d�St|t�r3d�|D�}|rdj
|�Sddj
|�zdzSt|t�r-dj
|D�cgc]}|j���c}�S|Scc}w)Nr
rc3�6K�|]}t|d�����y�w)F)r4N)�_format_marker)�.0�ms  r#�	<genexpr>z!_format_marker.<locals>.<genexpr>Ws����@��A����/�/��s�� �(�))r+�listr,�str�lenr7�join�	serialize)r3r4�innerr9s    r#r7r7Es����f�t�U�C�0�1�1�1�	�6�4� ���K�1���v�a�y�4��-�0��f�Q�i�(�(��&�$��@��@����8�8�E�?�"�����%��(�3�.�.�	�F�E�	"��x�x��7��1������7�8�8��
��8s�C%c�
�||vS�Nr!�r.r0s  r#�<lambda>rGcs��3�#�:r"c�
�||vSrEr!rFs  r#rGrGds��s�#�~r")�inznot in�<z<=z==z!=z>=�>�
_operatorsr.r/r0c	�"�	tdj|j�|g��}|j|d��S#t$rYnwxYwt
j
|j��}|�td|�d|�d|�d���|||�S)N�T)�prereleasesz
Undefined z on z and �.)rrArB�containsrrL�getr)r.r/r0�spec�opers     r#�_eval_oprUns���4�����"�,�,�.�#�!6�7�8���}�}�S�d�}�3�3���
��
��
 *�~�~�b�l�l�n�=�D��|�!�J�r�f�D���u�S�G�1�"M�N�N���S�>�s�*?�	A�
A�values�key.c�4�|dk(rtd�|D��S|S)Nr*c3�2K�|]}t|����y�wrEr)r8�vs  r#r:z_normalize.<locals>.<genexpr>�s����:�6�a�&�q�)�6���)r,)rWrVs  r#�
_normalizer\}s#��
�g�~��:�6�:�:�:��Mr"�markers�environmentc�0�gg}|D]�}t|tttf�sJ�t|t�r|dj	t||���Ot|t�r�|\}}}t|t�r|j}||}|j}	n|j}|j}||}	t||	|��\}}	|dj	t|||	����|dvsJ�|dk(s��|j	g���td�|D��S)N���)rW)�and�orrbc3�2K�|]}t|����y�wrE)�all)r8�items  r#r:z$_evaluate_markers.<locals>.<genexpr>�s����,�V�T�s�4�y�V�r[)r+r>r,r?�append�_evaluate_markersrr-r\rU�any)
r]r^�groupsr3r.r/r0�environment_key�	lhs_value�	rhs_values
          r#rgrg�s�� "�t�F����&�4���"4�5�5�5��f�d�#��2�J���/���D�E�
���
&�!�L�C��S��#�x�(�"%�)�)��'��8�	��I�I�	��I�I�	�"%�)�)��'��8�	�#-�i���#X� �I�y��2�J���h�y�"�i�@�A��]�*�*�*���~��
�
�b�!�-�0�,�V�,�,�,r"�infozsys._version_infoc��dj|�}|j}|dk7r||dt|j�zz
}|S)Nz{0.major}.{0.minor}.{0.micro}�finalr)�format�releaselevelr?�serial)rm�version�kinds   r#�format_full_versionru�sE��-�4�4�T�:�G����D��w���4��7�S����-�-�-���Nr"c���ttjj�}tjj}||t
jt
j�t
j�t
j�t
j�t
j�t
j�djt
j�dd�tjd�S)NrP�)�implementation_name�implementation_version�os_name�platform_machine�platform_release�platform_system�platform_version�python_full_version�platform_python_implementation�python_version�sys_platform)ru�sys�implementationrs�name�os�platform�machine�release�systemr��python_implementationrA�python_version_tuple)�iverrxs  r#rr�s����s�1�1�9�9�:�D��,�,�1�1��2�"&��7�7�$�,�,�.�$�,�,�.�#�?�?�,�$�,�,�.�'�6�6�8�*2�*H�*H�*J��(�(�8�#@�#@�#B�2�A�#F�G�����r"c�r�eZdZdeddfd�Zdefd�Zdefd�Zdefd�Zde	de
fd	�Zdd
ee
eefde
fd�Zy)
rr3r(Nc��	tt|��|_y#t$r}t	t|��|�d}~wwxYwrE)r2�
_parse_marker�_markersrrr?)�selfr3�es   r#�__init__zMarker.__init__�s;��	/�3�M�&�4I�J�D�M��"!�	/���A��'�Q�.��	/�s��	?�:�?c�,�t|j�SrE)r7r��r�s r#�__str__zMarker.__str__�s���d�m�m�,�,r"c��d|�d�S)Nz	<Marker('z')>r!r�s r#�__repr__zMarker.__repr__�s���4�&��$�$r"c�V�t|jjt|�f�SrE)�hash�	__class__rr?r�s r#�__hash__zMarker.__hash__�s ���T�^�^�,�,�c�$�i�8�9�9r"�otherc�\�t|t�stSt|�t|�k(SrE)r+r�NotImplementedr?)r�r�s  r#�__eq__z
Marker.__eq__�s%���%��(�!�!��4�y�C��J�&�&r"r^c��t�}d|d<|�|j|�|d�d|d<t|j|�S)a$Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        rNr*)r�updatergr�)r�r^�current_environments   r#�evaluatezMarker.evaluate�sV��2�3��')��G�$��"��&�&�{�3�#�7�+�3�/1�#�G�,� ����0C�D�Dr"rE)rrrr?r�r�r��intr�r�boolr�rrr�r!r"r#rr�so��/�s�/�t�/�2-��-�%�#�%�:�#�:�'�C�'�D�'�E�H�T�#�s�(�^�$<�E��Er"r)T)3�operatorr�r�r��typingrrrrrrr	�_parserrrr
rrrr��
_tokenizerr�
specifiersrr�utilsr�__all__r?r��Operator�
ValueErrorrrrr2r7�lt�le�eq�ne�ge�gtrL�__annotations__rUr\rgrurrr!r"r#�<module>r�s���
�	��
�D�D�D���*�3�$����S�#�J��$�%���J���*���z��
�S�
�S�
�"HL���$�s�)�Z��,�-��6>�t�n����<&�-�	���
�+�+�
�+�+�
�+�+�
�+�+�	���	#�
�D��h���	��#��2��C��D��	��	�#�	�%��S��/�	�-�z�-��S�#�X��-�4�-�<�1��c���T�#�s�(�^��$;E�;Er"python3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc000064400000010576151732700770026500 0ustar00�

��_i�	�
��dZddlZddlZddlZddlZddlmZmZmZddl	m
Z
Gd�de�Zded	eefd
�Z
ej�ded	eefd��Zd
ed	eefd�Zedk(r�ddlZej&�Zej+d�sJd��ede�edeej.��edd��eej0ddej3dd�d��D]Zeed���yy)z�PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
�N)�Iterator�
NamedTuple�Optional�)�ELFFilec�"�eZdZUeed<eed<y)�_MuslVersion�major�minorN)�__name__�
__module__�__qualname__�int�__annotations__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_musllinux.pyr	r	s���J��Jrr	�output�returnc�@�d�|j�D�D�cgc]}|s�|��	}}t|�dks|ddddk7rytjd|d�}|syt	t|j
d��t|j
d����Scc}w)	Nc3�<K�|]}|j����y�w)N)�strip)�.0�ns  r�	<genexpr>z&_parse_musl_version.<locals>.<genexpr>s����@�,?�q�����,?�s��r��muslzVersion (\d+)\.(\d+)r)r
r)�
splitlines�len�re�matchr	r�group)rr�lines�ms    r�_parse_musl_versionr&s���@�F�,=�,=�,?�@�F�@�1�A�Q�@�E�F�
�5�z�A�~��q��"�1���/��
���(�%��(�3�A����c�!�'�'�!�*�o�S������_�E�E��

Gs
�B�B�
executablec�*�	t|d�5}t|�j}ddd��d|vryt
j|gtjd��}t|j�S#1swY�LxYw#ttt
f$rYywxYw)a`Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    �rbNrT)�stderr�universal_newlines)�openr�interpreter�OSError�	TypeError�
ValueError�
subprocess�run�PIPEr&r*)r'�f�ld�procs    r�_get_musl_versionr7s����
�*�d�
#�q����'�'�B�$�
�z�V�2�%���>�>�2�$�z���4�P�D��t�{�{�+�+�$�
#���Y�
�+����s'�A;�A/�A;�/A8�4A;�;B�B�archc#�K�ttj�}|�yt|jdd�D]}d|j
�d|�d|�����y�w)aTGenerate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    N����
musllinux_�_)r7�sysr'�rangerr
)r8�sys_muslrs   r�
platform_tagsr@6sT����!����0�H�����x�~�~�r�2�.���8�>�>�*�!�E�7�!�D�6�:�:�/�s�AA�__main__zlinux-z	not linuxzplat:zmusl:ztags:� )�endz[.-]r<�-r:z
      )�__doc__�	functoolsr!r1r=�typingrrr�_elffilerr	�strr&�	lru_cacher7r@r�	sysconfig�get_platform�plat�
startswith�printr'�sub�split�trrr�<module>rSs+����	��
�1�1���:��
F��F���(>�F������,�#�,�(�<�*@�,��,�,
;��
;���
�
;� �z���!�9�!�!�#�D��?�?�8�$�1�k�1�$�	�'�4��	�'�$�S�^�^�4�5�	�'�s��
�6�2�6�6�'�3��
�
�3��0B�2�0F�G�
H��
�a�Z� �I�rpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc000064400000113461151732700770026432 0ustar00�

��_i&��	��dZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZe
eefZede��ZeeegefZd	ed
efd�ZGd�d
e�ZGd�dej4��ZGd�de�Zej:d�Zd	ed
eefd�Zded
efd�Z deedeed
eeeeeffd�Z!Gd�de�Z"y)z�
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
�N)	�Callable�Iterable�Iterator�List�Optional�Set�Tuple�TypeVar�Union�)�canonicalize_version)�Version�UnparsedVersionVar)�bound�version�returnc�<�t|t�st|�}|S�N)�
isinstancer)rs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/specifiers.py�_coerce_versionr"s���g�w�'��'�"���N�c��eZdZdZy)�InvalidSpecifiera
    Raised when attempting to create a :class:`Specifier` with a specifier
    string that is invalid.

    >>> Specifier("lolwat")
    Traceback (most recent call last):
        ...
    packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'
    N)�__name__�
__module__�__qualname__�__doc__�rrrr(s��rrc	�x�eZdZejdefd��Zejdefd��Zejde	de
fd��Zeejde
e
fd���Zejde
ddfd	��Zejdd
ede
e
de
fd��Zej	dd
eede
e
deefd��Zy)�
BaseSpecifierrc��y)z�
        Returns the str representation of this Specifier-like object. This
        should be representative of the Specifier itself.
        Nr��selfs r�__str__zBaseSpecifier.__str__5��rc��y)zF
        Returns a hash value for this Specifier-like object.
        Nrr#s r�__hash__zBaseSpecifier.__hash__<r&r�otherc��y)z�
        Returns a boolean representing whether or not the two Specifier-like
        objects are equal.

        :param other: The other object to check against.
        Nr�r$r)s  r�__eq__zBaseSpecifier.__eq__Br&rc��y)z�Whether or not pre-releases as a whole are allowed.

        This can be set to either ``True`` or ``False`` to explicitly enable or disable
        prereleases or it can be set to ``None`` (the default) to use default semantics.
        Nrr#s r�prereleaseszBaseSpecifier.prereleasesKr&r�valueNc��y)zQSetter for :attr:`prereleases`.

        :param value: The value to set.
        Nr�r$r/s  rr.zBaseSpecifier.prereleasesTr&r�itemr.c��y)zR
        Determines if the given item is contained within this specifier.
        Nr)r$r2r.s   r�containszBaseSpecifier.contains[r&r�iterablec��y)z�
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr)r$r5r.s   r�filterzBaseSpecifier.filterar&rr)rrr�abc�abstractmethod�strr%�intr(�object�boolr,�propertyrr.�setterr4rrrr7rrrr!r!4s7����������	����#����
	����F��t���������X�d�^�����������$����	����S��x��~������
	���TX�� �!3�4��CK�D�>��	�$�	%���rr!)�	metaclassc	��eZdZdZdZdZejdezezdzejejz�Z
dddd	d
ddd
d�Zd0dede
eddfd�Zedefd��Zej$deddfd��Zedefd��Zedefd��Zdefd�Zdefd�Zedeeeffd��Zdefd�Zdedefd�Zdedefd �Zd!ededefd"�Z d!ededefd#�Z!d!ededefd$�Z"d!ededefd%�Z#d!ededefd&�Z$d!ed'edefd(�Z%d!ed'edefd)�Z&d!ededefd*�Z'd+e(eefdefd,�Z)	d1d+e*de
edefd-�Z+	d1d.e,e-de
ede.e-fd/�Z/y)2�	Specifiera?This class abstracts handling of version specifiers.

    .. tip::

        It is generally not required to instantiate this manually. You should instead
        prefer to work with :class:`SpecifierSet` instead, which can parse
        comma-separated version specifiers (which is what package metadata contains).
    z8
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        a�
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s;)]*  # The arbitrary version can be just about anything,
                          # we match everything except for whitespace, a
                          # semi-colon for marker support, and a closing paren
                          # since versions can be enclosed in them.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release

                # You cannot use a wild card and a pre-release, post-release, a dev or
                # local version together so group them with a | and make them optional.
                (?:
                    \.\*  # Wild card syntax of .*
                    |
                    (?:                                  # pre release
                        [-_\.]?
                        (alpha|beta|preview|pre|a|b|c|rc)
                        [-_\.]?
                        [0-9]*
                    )?
                    (?:                                  # post release
                        (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                    )?
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        z^\s*z\s*$�
compatible�equal�	not_equal�less_than_equal�greater_than_equal�	less_than�greater_than�	arbitrary)�~=�==z!=�<=�>=�<�>�===N�specr.rc���|jj|�}|std|�d���|jd�j	�|jd�j	�f|_||_y)a�Initialize a Specifier instance.

        :param spec:
            The string representation of a specifier which will be parsed and
            normalized before use.
        :param prereleases:
            This tells the specifier if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.
        :raises InvalidSpecifier:
            If the given specifier is invalid (i.e. bad syntax).
        zInvalid specifier: '�'�operatorrN)�_regex�searchr�group�strip�_spec�_prereleases)r$rRr.�matchs    r�__init__zSpecifier.__init__�so�����"�"�4�(���"�%9�$��q�#A�B�B�
�K�K�
�#�)�)�+��K�K�	�"�(�(�*�'
��
�(��rc��|j�|jS|j\}}|dvr1|dk(r|jd�r|dd}t|�jryy)N)rLrNrMrKrQrL�.*���TF)r[rZ�endswithr�
is_prerelease)r$rUrs   rr.zSpecifier.prereleasessm�����(��$�$�$�
!�J�J���'��6�6��4��G�$4�$4�T�$:�!�#�2�,���w��-�-��rr/c��||_yr�r[r1s  rr.zSpecifier.prereleases�
��!��rc� �|jdS)z`The operator of this specifier.

        >>> Specifier("==1.2.3").operator
        '=='
        r�rZr#s rrUzSpecifier.operator����z�z�!�}�rc� �|jdS)zaThe version of this specifier.

        >>> Specifier("==1.2.3").version
        '1.2.3'
        rrgr#s rrzSpecifier.version%rhrc��|j�d|j��nd}d|jj�dt	|��|�d�S)aTA representation of the Specifier that shows all internal state.

        >>> Specifier('>=1.0.0')
        <Specifier('>=1.0.0')>
        >>> Specifier('>=1.0.0', prereleases=False)
        <Specifier('>=1.0.0', prereleases=False)>
        >>> Specifier('>=1.0.0', prereleases=True)
        <Specifier('>=1.0.0', prereleases=True)>
        �, prereleases=�rO�(�)>)r[r.�	__class__rr:�r$�pres  r�__repr__zSpecifier.__repr__.sU��� � �,��T�-�-�0�1��	��4�>�>�*�*�+�1�S��Y�M�#��b�A�Arc�4�dj|j�S)z�A string representation of the Specifier that can be round-tripped.

        >>> str(Specifier('>=1.0.0'))
        '>=1.0.0'
        >>> str(Specifier('>=1.0.0', prereleases=False))
        '>=1.0.0'
        z{}{})�formatrZr#s rr%zSpecifier.__str__@s���v�}�}�d�j�j�)�)rc�x�t|jd|jddk7��}|jd|fS)NrrrK��strip_trailing_zero)r
rZ)r$�canonical_versions  r�_canonical_speczSpecifier._canonical_specJs>��0��J�J�q�M�!%���A��$�!6�
���z�z�!�}�/�/�/rc�,�t|j�Sr)�hashryr#s rr(zSpecifier.__hash__Rs���D�(�(�)�)rr)c���t|t�r	|jt|��}nt||j�stS|j
|j
k(S#t$r	tcYSwxYw)a>Whether or not the two Specifier-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0")
        True
        >>> (Specifier("==1.2.3", prereleases=False) ==
        ...  Specifier("==1.2.3", prereleases=True))
        True
        >>> Specifier("==1.2.3") == "==1.2.3"
        True
        >>> Specifier("==1.2.3") == Specifier("==1.2.4")
        False
        >>> Specifier("==1.2.3") == Specifier("~=1.2.3")
        False
        )rr:ror�NotImplementedryr+s  rr,zSpecifier.__eq__Usi��&�e�S�!�
&����s�5�z�2���E�4�>�>�2�!�!��#�#�u�'<�'<�<�<��$�
&�%�%�
&�s�A"�"A4�3A4�opc�>�t|d|j|���}|S)N�	_compare_)�getattr�
_operators)r$r~�operator_callables   r�
_get_operatorzSpecifier._get_operatorrs+��.5��I�d�o�o�b�1�2�3�/
��!� r�prospectivec
���djttjtt|���dd�}|dz
}|j
d�||�xr|j
d�||�S)N�.���r_rNrL)�join�list�	itertools�	takewhile�_is_not_suffix�_version_splitr�)r$r�rR�prefixs    r�_compare_compatiblezSpecifier._compare_compatiblexs{�������$�$�^�^�D�5I�J�K�C�R�P�
��
	�$���'�t�!�!�$�'��T�:�
�?W�t�?Q�?Q�RV�?W���@
�	
rc�D�|jd�r_t|jd��}t|ddd��}t|�}t|�}t	||�\}}|dt|�}	|	|k(St
|�}
|
jst
|j�}||
k(S)Nr_Frvr`)rar
�publicr��_pad_version�lenr�local)r$r�rR�normalized_prospective�normalized_spec�
split_spec�split_prospective�padded_prospective�_�shortened_prospective�spec_versions           r�_compare_equalzSpecifier._compare_equal�s����=�=���%9��"�"��&�"�3�4���9�RW�X�O�(��8�J�
!/�/E� F��%1�1B�J�$O�!���
%7�7H��Z��$I�!�(�J�6�6�#�4�=�L�
 �%�%�%�k�&8�&8�9���,�.�.rc�(�|j||�Sr)r��r$r�rRs   r�_compare_not_equalzSpecifier._compare_not_equal�s���&�&�{�D�9�9�9rc�D�t|j�t|�kSr�rr�r�s   r�_compare_less_than_equalz"Specifier._compare_less_than_equal����
�{�)�)�*�g�d�m�;�;rc�D�t|j�t|�k\Srr�r�s   r�_compare_greater_than_equalz%Specifier._compare_greater_than_equal�r�r�spec_strc��t|�}||ksy|js8|jr,t|j�t|j�k(ryy�NFT)rrb�base_version�r$r�r�rRs    r�_compare_less_thanzSpecifier._compare_less_than�sT���x� ��
�T�!���!�!�k�&?�&?��{�/�/�0�G�D�<M�<M�4N�N��
rc��t|�}||kDsy|js8|jr,t|j�t|j�k(ry|j�,t|j�t|j�k(ryyr�)r�is_postreleaser�r�r�s    r�_compare_greater_thanzSpecifier._compare_greater_than�s����x� ��
�T�!���"�"�{�'A�'A��{�/�/�0�G�D�<M�<M�4N�N�����(��{�/�/�0�G�D�<M�<M�4N�N��
rc�h�t|�j�t|�j�k(Sr)r:�lowerr�s   r�_compare_arbitraryzSpecifier._compare_arbitrary�s&���;��%�%�'�3�t�9�?�?�+<�<�<rr2c�$�|j|�S)a;Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in Specifier(">=1.2.3")
        True
        >>> Version("1.2.3") in Specifier(">=1.2.3")
        True
        >>> "1.0.0" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
        True
        �r4�r$r2s  r�__contains__zSpecifier.__contains__���&�}�}�T�"�"rc��|�|j}t|�}|jr|sy|j|j�}|||j
�S)alReturn whether or not the item is contained in this specifier.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this Specifier. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> Specifier(">=1.2.3").contains("1.2.3")
        True
        >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
        True
        >>> Specifier(">=1.2.3").contains("1.0.0")
        False
        >>> Specifier(">=1.2.3").contains("1.3.0a1")
        False
        >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
        True
        >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
        True
        F)r.rrbr�rUr)r$r2r.�normalized_itemr�s     rr4zSpecifier.containssY��8���*�*�K�*�$�/��
�(�(���/3�.@�.@����.O�� ��$�,�,�?�?rr5c#�K�d}g}d|�|ndi}|D]S}t|�}|j|fi|��s�"|jr |s|js|j	|��Nd}|���U|s|r|D]}|���yyy�w)aOFilter items in the given iterable, that match the specifier.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(Specifier().contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")]))
        ['1.2.3', '1.3', <Version('1.4')>]
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"]))
        ['1.5a1']
        >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        Fr.NT)rr4rbr.�append)r$r5r.�yielded�found_prereleases�kwr�parsed_versions        rr7zSpecifier.filterEs�����<�����K�,C�[��
N�� �G�,�W�5�N��t�}�}�^�2�r�2�"�/�/��4�#3�#3�%�,�,�W�5�#�G�!�M� �(�,�,���
�-�-�w�s�0A9�AA9�rlNr)0rrrr�_operator_regex_str�_version_regex_str�re�compile�VERBOSE�
IGNORECASErVr�r:rr=r]r>r.r?rUrrrr%r	ryr;r(r<r,�CallableOperatorr�rr�r�r�r�r�r�r�r�rr��UnparsedVersionr4rrrr7rrrrBrBks������\��|�R�Z�Z��%�%�(:�:�W�D�
�
�
�R�]�]�"��F�����"�
�
��	�J�(�S�(�H�T�N�(�d�(�4��T����.���"��"�$�"��"���#����������B�#�B�$*��*��0��s�C�x��0��0�*�#�*�=�F�=�t�=�:!��!�(8�!�
�w�
�c�
�d�
�*'/�'�'/��'/��'/�R:�g�:�S�:�T�:�<�G�<�3�<�4�<�<�w�<�c�<�d�<��g������2���C��D��>=�g�=�S�=�T�=�#��s�G�|�!4�#��#�,DH�,@�#�,@�2:�4�.�,@�	
�,@�^UY�;� �!3�4�;�CK�D�>�;�	�$�	%�;rrBz^([0-9]+)((?:a|b|c|rc)[0-9]+)$c���g}|jd�D]J}tj|�}|r |j|j	���:|j|��L|S)Nr�)�split�
_prefix_regexrW�extend�groupsr�)r�resultr2r\s    rr�r��sR���F��
�
�c�"���$�$�T�*����M�M�%�,�,�.�)��M�M�$��#��Mr�segmentc�.��t�fd�dD��S)Nc3�@�K�|]}�j|����y�wr)�
startswith)�.0r�r�s  �r�	<genexpr>z!_is_not_suffix.<locals>.<genexpr>�s!������1P�v����6�"�1P�s�)�dev�a�b�rc�post)�any)r�s`rr�r��s"�����1P����r�left�rightc��gg}}|jttjd�|���|jttjd�|���|j|t	|d�d�|j|t	|d�d�|jddgt
dt	|d�t	|d�z
�z�|jddgt
dt	|d�t	|d�z
�z�ttj|��ttj|��fS)Nc�"�|j�Sr��isdigit��xs r�<lambda>z_pad_version.<locals>.<lambda>�s
�����rc�"�|j�Srr�r�s rr�z_pad_version.<locals>.<lambda>�s
��!�)�)�+rrr�0)r�r�r�r�r��insert�max�chain)r�r��
left_split�right_splits    rr�r��s"�� �"��J����d�9�.�.�/D�d�K�L�M����t�I�/�/�0E�u�M�N�O����d�3�z�!�}�-�/�0�1����u�S��Q��0�2�3�4����a�#���Q��K��N�(;�c�*�Q�-�>P�(P�!Q�Q�R����q�3�%�#�a��Z��]�);�c�+�a�.�>Q�)Q�"R�R�S�����*�-�.��Y�_�_�k�5R�0S�T�Trc	�H�eZdZdZ	ddedeeddfd�Zedeefd��Z	e	jdeddfd	��Z	defd
�Zdefd�Zde
fd�Zd
edefddfd�Zd
edefd�Zde
fd�Zdeefd�Zdedefd�Z		ddedeedeedefd�Z	ddeedeedeefd�Zy)�SpecifierSetz�This class abstracts handling of a set of version specifiers.

    It can be passed a single specifier (``>=3.0``), a comma-separated list of
    specifiers (``>=3.0,!=3.1``), or no specifier at all.
    N�
specifiersr.rc��|jd�D�cgc]#}|j�s�|j���%}}t�}|D]}|jt	|���t|�|_||_ycc}w)aNInitialize a SpecifierSet instance.

        :param specifiers:
            The string representation of a specifier or a comma-separated list of
            specifiers which will be parsed and normalized before use.
        :param prereleases:
            This tells the SpecifierSet if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.

        :raises InvalidSpecifier:
            If the given ``specifiers`` are not parseable than this exception will be
            raised.
        �,N)r�rY�set�addrB�	frozenset�_specsr[)r$r�r.�s�split_specifiers�parsed�	specifiers       rr]zSpecifierSet.__init__�sv��(0:�/?�/?��/D�R�/D�!����	�A�G�G�I�/D��R�"%���)�I��J�J�y��+�,�*� ��'���(����Ss
�B�Bc��|j�|jS|jsytd�|jD��S)Nc3�4K�|]}|j���y�wr�r.�r�r�s  rr�z+SpecifierSet.prereleases.<locals>.<genexpr>�s����6�+�Q�1�=�=�+�s�)r[r�r�r#s rr.zSpecifierSet.prereleases�s?�����(��$�$�$�
�{�{���6�$�+�+�6�6�6rr/c��||_yrrdr1s  rr.zSpecifierSet.prereleases�rerc�^�|j�d|j��nd}dt|��|�d�S)aA representation of the specifier set that shows all internal state.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> SpecifierSet('>=1.0.0,!=2.0.0')
        <SpecifierSet('!=2.0.0,>=1.0.0')>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=False)>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=True)>
        rkrlz<SpecifierSet(rn)r[r.r:rps  rrrzSpecifierSet.__repr__�sD��� � �,��T�-�-�0�1��	� ��D�	�}�S�E��4�4rc�X�djtd�|jD���S)anA string representation of the specifier set that can be round-tripped.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
        '!=1.0.1,>=1.0.0'
        >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
        '!=1.0.1,>=1.0.0'
        r�c3�2K�|]}t|����y�wr)r:r�s  rr�z'SpecifierSet.__str__.<locals>.<genexpr>s����;�{�!�s�1�v�{�s�)r��sortedr�r#s rr%zSpecifierSet.__str__�s"���x�x��;�t�{�{�;�;�<�<rc�,�t|j�Sr)r{r�r#s rr(zSpecifierSet.__hash__
s���D�K�K� � rr)c���t|t�rt|�}nt|t�stSt�}t	|j
|j
z�|_|j�|j�|j|_|S|j�|j�|j|_|S|j|jk(r|j|_|Std��)a�Return a SpecifierSet which is a combination of the two sets.

        :param other: The other object to combine with.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        zFCannot combine SpecifierSets with True and False prerelease overrides.)rr:r�r}r�r�r[�
ValueError)r$r)r�s   r�__and__zSpecifierSet.__and__
s����e�S�!� ��'�E��E�<�0�!�!� �N�	�$�T�[�[�5�<�<�%?�@�	�����$��);�);�)G�%*�%7�%7�I�"����
�
�
*�u�/A�/A�/I�%)�%6�%6�I�"����
�
�%�"4�"4�
4�%)�%6�%6�I�"������
rc��t|ttf�rtt|��}nt|t�stS|j
|j
k(S)a�Whether or not the two SpecifierSet-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
        ...  SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
        False
        )rr:rBr�r}r�r+s  rr,zSpecifierSet.__eq__-sD��&�e�c�9�-�.� ��U��,�E��E�<�0�!�!��{�{�e�l�l�*�*rc�,�t|j�S)z7Returns the number of specifiers in this specifier set.)r�r�r#s r�__len__zSpecifierSet.__len__Gs���4�;�;��rc�,�t|j�S)z�
        Returns an iterator over all the underlying :class:`Specifier` instances
        in this specifier set.

        >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
        [<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]
        )�iterr�r#s r�__iter__zSpecifierSet.__iter__Ks���D�K�K� � rr2c�$�|j|�S)arReturn whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
        True
        r�r�s  rr�zSpecifierSet.__contains__Ur�r�	installedc����t�t�st�����|j��s
�jry|r!�jrt�j��t��fd�|jD��S)a�Return whether or not the item is contained in this SpecifierSet.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this SpecifierSet. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
        True
        Fc3�D�K�|]}|j�������y�w)r�Nr�)r�r�r2r.s  ��rr�z(SpecifierSet.contains.<locals>.<genexpr>�s�����R�k��1�:�:�d��:�<�k�s� )rrr.rbr��allr�)r$r2r.r
s `` rr4zSpecifierSet.containsjsm���<�$��(��4�=�D�
���*�*�K��t�1�1����+�+��4�,�,�-�D��R�d�k�k�R�R�Rrr5c�r�|�|j}|jr8|jD]}|j|t|���}� t	|�Sg}g}|D]A}t|�}|jr|s|r�|j|��1|j|��C|s|r
|�t	|�St	|�S)a.Filter items in the given iterable, that match the specifiers in this set.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(SpecifierSet(...).contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
        ['1.3', <Version('1.4')>]
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
        []
        >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']

        An "empty" SpecifierSet will filter items based on the presence of prerelease
        versions in the set.

        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet("").filter(["1.5a1"]))
        ['1.5a1']
        >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        r�)r.r�r7r=r
rrbr�)r$r5r.rR�filteredr�r2r�s        rr7zSpecifierSet.filter�s���X���*�*�K�
�;�;������;�;�x�T�+�=N�;�O��$���>�!�
24�H�:<�� ��!0��!6��"�/�/��#�)�0�0��6��O�O�D�)�!�� 1�k�6I��-�.�.���>�!rr�)NNr)rrrrr:rr=r]r>r.r?rrr%r;r(rrr<r,rrrBrr�r�r4rrr7rrrr�r��su���CG�!(��!(�19�$��!(�	
�!(�F�7�X�d�^�7��7� ���"��"�$�"��"�5�#�5�*=��=�!�#�!��U�>�3�#6�7��N��@+�F�+�t�+�4 �� �!�(�9�-�!�#��#�T�#�0'+�$(�	7S��7S��d�^�7S��D�>�	7S�

�7S�tUY�M"� �!3�4�M"�CK�D�>�M"�	�$�	%�M"rr�)#rr8r�r��typingrrrrrrr	r
r�utilsr
rrr:r�rr=r�rrr�ABCMetar!rBr�r�r�r�r�r�rrr�<module>rs�����	�
�
�
�(������%���1��I���W�c�N�D�0�1���_����	�z�	�4�c�k�k�4�nU�
�U�p��
�
�<�=�
��C��D��I���C��D��U�t�C�y�U��c��U�u�T�#�Y��S�	�=Q�7R�U�$G"�=�G"rpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/utils.cpython-312.pyc000064400000013636151732700770025441 0ustar00�

��_i�	�^�ddlZddlmZmZmZmZmZddlmZm	Z	ddl
mZmZeedee
effZede�ZGd�d	e�ZGd
�de�Zej(d�Zej(d
�Zdedefd�Zdd�deeefdedefd�Zdedeeeeeeffd�Zdedeeeffd�Zy)�N)�	FrozenSet�NewType�Tuple�Union�cast�)�Tag�	parse_tag)�InvalidVersion�Version��NormalizedNamec��eZdZdZy)�InvalidWheelFilenamezM
    An invalid wheel filename was found, users should refer to PEP 427.
    N��__name__�
__module__�__qualname__�__doc__r
���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/utils.pyrr���rrc��eZdZdZy)�InvalidSdistFilenamez^
    An invalid sdist filename was found, users should refer to the packaging user guide.
    Nrr
rrrrrrrz[-_.]+z	(\d+)(.*)�name�returnc�j�tjd|�j�}tt|�S)N�-)�_canonicalize_regex�sub�lowerrr)r�values  r�canonicalize_namer# s*���#�#�C��.�4�4�6�E����&�&rT)�strip_trailing_zero�versionr$c���t|t�r
	t|�}n|}g}|jdk7r|j|j�d��dj
d�|jD��}|rtjdd|�}|j|�|j�1|jdj
d�|jD���|j�|jd|j���|j�|jd	|j���|j�|jd
|j���dj
|�S#t$r|cYSwxYw)z�
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    r�!�.c3�2K�|]}t|����y�w�N��str��.0�xs  r�	<genexpr>z'canonicalize_version.<locals>.<genexpr>=s����>�~�!�s�1�v�~���z(\.0)+$�c3�2K�|]}t|����y�wr*r+r-s  rr0z'canonicalize_version.<locals>.<genexpr>Es����8�Z��S��V�Z�r1z.postz.dev�+)�
isinstancer,rr�epoch�append�join�release�rer �pre�post�dev�local)r%r$�parsed�parts�release_segments     r�canonicalize_versionrB&sB���'�3��	��W�%�F�
���E��|�|�q��
������~�Q�'�(��h�h�>�v�~�~�>�>�O���&�&��R��A��	�L�L��!��z�z��
���R�W�W�8�V�Z�Z�8�8�9��{�{��
���u�V�[�[�M�*�+��z�z��
���t�F�J�J�<�(�)��|�|��
���q�����'�(�
�7�7�5�>���G�	��N�	�s�E'�'E5�4E5�filenamec�j�|jd�std|����|dd}|jd�}|dvrtd|����|jd|dz
�}|d}d	|vs%t	j
d
|tj��td|����t|�}t|d�}|d
k(rh|d}tj|�}|�td|�d|�d���ttt|jd��|jd�f�}nd}t|d�}	||||	fS)Nz.whlz3Invalid wheel filename (extension must be '.whl'): ���r)��z0Invalid wheel filename (wrong number of parts): �r�__z^[\w\d._]*$zInvalid project name: rrGzInvalid build number: z in '�'r
���)�endswithr�count�splitr:�match�UNICODEr#r�_build_tag_regexr�BuildTag�int�groupr
)
rC�dashesr@�	name_partrr%�
build_part�build_match�build�tagss
          r�parse_wheel_filenamer[Vs`�����V�$�"�A�(��L�
�	
����}�H�
�^�^�C�
 �F�
�V��"�>�x�j�I�
�	
�
�N�N�3���
�+�E��a��I��y��B�H�H�^�Y��
�
�K�S�"�%;�H�:�#F�G�G��Y�'�D��e�A�h��G�
��{��1�X�
�&�,�,�Z�8����&�(���E�(��1�E��
��X��K�$5�$5�a�$8� 9�;�;L�;L�Q�;O�P�Q�����U�2�Y��D��'�5�$�'�'rc� �|jd�r|dtd�}n/|jd�r|dtd�}ntd|����|jd�\}}}|std|����t	|�}t|�}||fS)Nz.tar.gzz.zipz@Invalid sdist filename (extension must be '.tar.gz' or '.zip'): rzInvalid sdist filename: )rL�lenr�
rpartitionr#r)rC�	file_stemrV�sep�version_partrr%s       r�parse_sdist_filenamerbzs�������#��.��I���/�	�	�	�	�6�	"��^��F��|�,�	�"���z�
�
�	
�$-�#7�#7��#<� �I�s�L��"�%=�h�Z�#H�I�I��Y�'�D��l�#�G��'�?�r)r:�typingrrrrrrZr	r
r%rrrSr,rRr�
ValueErrorrr�compilerrQr#�boolrBr[rbr
rr�<module>rgs��

�9�9� �,���r��E�#�s�(�O�+�,���)�3�/���:���:��!�b�j�j��+���2�:�:�l�+��'�C�'�N�'�BF�-�
�7�C�<�
 �-�:>�-��-�`!(��!(�
�>�7�H�i��n�<�=�!(�H�3��5���1H�+I�rpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc000064400000017506151732701000026435 0ustar00�

��_i����UddlZddlZddlmZddlmZmZmZmZm	Z	m
Z
ddlmZeGd�d��Z
Gd�d	e�Zid
d�dd
�dd�dd�dd�dd�dej dej"��dd�dd�dd�dd�d ej d!ej"��d"ej ej$ej&zej"ej(z��d#d$�d%d&�d'd(�d)d*�d+d,d-d.��Zd/ed0<Gd1�d2�Zy)3�N)�	dataclass)�Dict�Iterator�NoReturn�Optional�Tuple�Union�)�	Specifierc�,�eZdZUeed<eed<eed<y)�Token�name�text�positionN)�__name__�
__module__�__qualname__�str�__annotations__�int����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_tokenizer.pyr
r
	s��

�I�

�I��Mrr
c�J��eZdZdZdededeeefddf�fd�Zdefd�Z�xZ	S)	�ParserSyntaxErrorz7The provided source text could not be parsed correctly.�message�source�span�returnNc�L��||_||_||_t�|��y)N)rrr�super�__init__)�selfrrr�	__class__s    �rr"zParserSyntaxError.__init__s%�����	�������
���rc���d|jdzd|jd|jdz
zzdz}dj|j|j|g�S)N� r�~r
�^z
    )r�joinrr)r#�markers  r�__str__zParserSyntaxError.__str__ sV���t�y�y��|�#�c�T�Y�Y�q�\�D�I�I�a�L�-H�&I�I�C�O���}�}�d�l�l�D�K�K��@�A�Ar)
rrr�__doc__rrrr"r+�
__classcell__)r$s@rrrsG���A�����	�
�C��H�o��
�
�B��Brr�LEFT_PARENTHESISz\(�RIGHT_PARENTHESISz\)�LEFT_BRACKETz\[�
RIGHT_BRACKETz\]�	SEMICOLON�;�COMMA�,�
QUOTED_STRINGzk
            (
                ('[^']*')
                |
                ("[^"]*")
            )
        �OPz(===|==|~=|!=|<=|>=|<|>)�BOOLOPz\b(or|and)\b�INz\bin\b�NOTz\bnot\b�VARIABLEa�
            \b(
                python_version
                |python_full_version
                |os[._]name
                |sys[._]platform
                |platform_(release|system)
                |platform[._](version|machine|python_implementation)
                |python_implementation
                |implementation_(name|version)
                |extra
            )\b
        �	SPECIFIER�ATz\@�URLz[^ \t]+�
IDENTIFIERz\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b�VERSION_PREFIX_TRAILz\.\*z\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*z[ \t]+�$)�VERSION_LOCAL_LABEL_TRAIL�WS�END�&Dict[str, Union[str, re.Pattern[str]]]�
DEFAULT_RULESc
���eZdZdZdeddddfd�Zdeddfd	�Zd
d�dededefd
�Zdedede	fd�Z
de	fd�Zddd�dedee
dee
defd�Zej"dededededfd��Zy)�	Tokenizerz�Context-sensitive token parsing.

    Provides methods to examine the input stream to check whether the next token
    matches.
    r�rulesrErNc��||_|j�D��cic]\}}|tj|���c}}|_d|_d|_ycc}}w)Nr)r�items�re�compilerI�
next_tokenr)r#rrIr�patterns     rr"zTokenizer.__init___sS�����;@�;�;�=�2
�;H�-�$��D�"�*�*�W�%�%�=�2
��
�,0�����
��	2
s� Arc�H�|j|�r|j�yy)z8Move beyond provided token name, if at current position.N)�check�read)r#rs  r�consumezTokenizer.consumels���:�:�d���I�I�K�rF)�peekrTc�,�|j�Jd|�d|j����||jvs
Jd|����|j|}|j|j|j�}|�y|st||d|j�|_y)z�Check whether the next token has the provided name.

        By default, if the check succeeds, the token *must* be read before
        another check. If `peek` is set to `True`, the token is not loaded and
        would need to be checked again.
        zCannot check for z, already have zUnknown token name: FrT)rNrI�matchrrr
)r#rrT�
expressionrVs     rrQzTokenizer.checkqs���
�O�O�#�	J�
�t�h�o�d�o�o�5H�I�	J�#��t�z�z�!�B�%9�$��#B�B�!��Z�Z��%�
�� � ����d�m�m�<���=���#�D�%��(�D�M�M�B�D�O�r�expectedc�l�|j|�s|jd|����|j�S)zsExpect a certain token name next, failing with a syntax error otherwise.

        The token is *not* read.
        z	Expected )rQ�raise_syntax_errorrR)r#rrXs   r�expectzTokenizer.expect�s4��
�z�z�$���)�)�I�h�Z�*@�A�A��y�y�{�rc��|j}|�J�|xjt|j�z
c_d|_|S)z%Consume the next token and return it.N)rNr�lenr)r#�tokens  rrRzTokenizer.read�s9������� � � ��
�
��U�Z�Z��(�
�����r)�
span_start�span_endrr_r`c�r�|�|jn||�|jn|f}t||j|���)z.Raise ParserSyntaxError at the given position.)rr)rrr)r#rr_r`rs     rrZzTokenizer.raise_syntax_error�sC��(�/�D�M�M�Z�%�-�D�M�M�8�
�� ���;�;��
�	
r�
open_token�close_token�aroundc#��K�|j|�r|j}|j�nd}d��|�y|j|�s|jd|�d|�d|��|��|j�y�w)NzExpected matching z for z, after )r_)rQrrRrZ)r#rbrcrd�
open_positions     r�enclosing_tokenszTokenizer.enclosing_tokens�sz�����:�:�j�!� �M�M�M��I�I�K� �M�
�� ���z�z�+�&��#�#�$�[�M��z�l�(�6�(�S�(�
$�
�
	
�	�	��s�A6A8)rrrr,rr"rS�boolrQr
r[rRrrrrZ�
contextlib�contextmanagerrrgrrrrHrHXs�������8�	�

���C��D��
05��#������*�3��S��U���e��%)�"&�
��
��S�M�	
�
�3�-�
�
�

�$������,/��<?��	�$����rrH)rirL�dataclassesr�typingrrrrrr	�
specifiersrr
�	ExceptionrrM�VERBOSE�_operator_regex_str�_version_regex_str�
IGNORECASErFrrHrrr�<module>rss����	�!�C�C�!������B�	�B�*0;���0;���0;��E�0;��U�	0;�
��0;��T�
0;��Z�R�Z�Z�	�	�
�
�	�0;�"	�
%�#0;�$
�o�%0;�&	�)�'0;�(
�:�)0;�*�
��
�
�	�	�
�
��+0;�J������%�%�	�(D�(D�D�
�
�
�R�]�]�"��K0;�R	�%�S0;�T
�:�U0;�V�3�W0;�X�G�Y0;�Z"D�
��_0;�
�7�0�fh�hrpython3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/tags.cpython-312.pyc000064400000050370151732701000025216 0ustar00�

��_i�F�
�j�UddlZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZddlmZmZej*e�ZeeZeeefZdddd	d
d�Zeeefed<ej<d
kZGd�d�Z dede	e fd�Z!d4dede"deeedffd�Z#dedefd�Z$dede"fd�Z%d4dede"deefd�Z&			d5dd�de
ede
e
ede
e
ede"dee f
d �Z'deefd!�Z(			d5dd�d"e
ede
e
ede
e
ede"dee f
d#�Z)dedeefd$�Z*			d5de
ed"e
ede
e
edee fd%�Z+efd&ed'e"defd(�Z,d)ed*edeefd+�Z-	d6d)e
ed&e
edeefd,�Z.efd'e"deefd-�Z/deefd.�Z0deefd/�Z1defd0�Z2dd�de"defd1�Z3d)edefd2�Z4dd�de"dee fd3�Z5y)7�N)�EXTENSION_SUFFIXES)
�Dict�	FrozenSet�Iterable�Iterator�List�Optional�Sequence�Tuple�Union�cast�)�
_manylinux�
_musllinux�py�cp�pp�ip�jy)�python�cpython�pypy�
ironpython�jython�INTERPRETER_SHORT_NAMESlc��eZdZdZgd�Zdedededdfd�Zedefd	��Zedefd
��Z	edefd��Z
dedefd
�Z
defd�Zdefd�Zdefd�Zy)�Tagz�
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    )�_interpreter�_abi�	_platform�_hash�interpreter�abi�platform�returnNc���|j�|_|j�|_|j�|_t	|j|j|jf�|_y�N)�lowerrrr �hashr!)�selfr"r#r$s    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/tags.py�__init__zTag.__init__5sS��'�-�-�/����I�I�K��	�'����)����4�,�,�d�i�i����H�I��
�c��|jSr')r�r*s r+r"zTag.interpreter@s��� � � r-c��|jSr')rr/s r+r#zTag.abiDs���y�y�r-c��|jSr')r r/s r+r$zTag.platformHs���~�~�r-�otherc��t|t�stS|j|jk(xrO|j|jk(xr4|j
|j
k(xr|j|jk(Sr')�
isinstancer�NotImplementedr!r rr)r*r2s  r+�__eq__z
Tag.__eq__Lsn���%��%�!�!��Z�Z�5�;�;�
&�
:����5�?�?�2�
:����e�j�j�(�
:��"�"�e�&8�&8�8�		
r-c��|jSr')r!r/s r+�__hash__zTag.__hash__Ws���z�z�r-c�R�|j�d|j�d|j��S)N�-)rrr r/s r+�__str__zTag.__str__Zs)���#�#�$�A�d�i�i�[��$�.�.�1A�B�Br-c�&�d|�dt|��d�S)N�<z @ �>)�idr/s r+�__repr__zTag.__repr__]s���4�&��B�t�H�:�Q�'�'r-)�__name__�
__module__�__qualname__�__doc__�	__slots__�strr,�propertyr"r#r$�object�boolr6�intr8r;r@�r-r+rr+s����?�I�	J�C�	J�c�	J�S�	J�T�	J��!�S�!��!���S������#����	
�F�	
�t�	
��#��C��C�(�#�(r-r�tagr%c
��t�}|jd�\}}}|jd�D]J}|jd�D]4}|jd�D]}|jt|||��� �6�Lt	|�S)z�
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    r:�.)�set�split�addr�	frozenset)rL�tags�interpreters�abis�	platformsr"r#�	platform_s        r+�	parse_tagrXasz���5�D�$'�I�I�c�N�!�L�$�	�#�)�)�#�.���:�:�c�?�C�&�_�_�S�1�	�����[�#�y�9�:�2�#�/��T�?�r-F�name�warnc�d�tj|�}|�|rtjd|�|S)Nz>Config variable '%s' is unset, Python ABI tag may be incorrect)�	sysconfig�get_config_var�logger�debug)rYrZ�values   r+�_get_config_varraqs1��#,�#;�#;�D�#A�E��}�����L�d�	
��Lr-�stringc�f�|jdd�jdd�jdd�S)NrN�_r:� )�replace)rbs r+�_normalize_stringrgzs-���>�>�#�s�#�+�+�C��5�=�=�c�3�G�Gr-�python_versionc�>�t|�dkDxrt|�dk\S)zj
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    r)��)�len�tuple)rhs r+�
_abi3_appliesrn~s#���~���"�F�u�^�'<��'F�Fr-�
py_versionc	��t|�}g}t|dd�}dx}x}}td|�}ttd�}dt
v}	|s|�|s|	rd}|dkr@td|�}
|
s|
�d	}|d
kr?td|�}|dk(s|�,tjd
k(rd}n|r|jd|���|jddj||||���|S)Nrk��Py_DEBUG�gettotalrefcountz_d.pyd�d)rj��
WITH_PYMALLOC�m)rjrj�Py_UNICODE_SIZE�i���urrz"cp{version}{debug}{pymalloc}{ucs4})�versionr_�pymalloc�ucs4)
rm�_version_nodotra�hasattr�sysr�
maxunicode�append�insert�format)rorZrUr{r_r|r}�
with_debug�has_refcount�has_ext�
with_pymalloc�unicode_sizes            r+�
_cpython_abisr��s���z�"�J�
�D��Z���^�,�G� � �E� �H�t� ��T�2�J��3� 2�3�L��,�,�G��j�(�l�g����F��'���>�
��M�1��H����*�+<�d�C�L��q� ��$����8�)C���	�	
���b��	�N�#��K�K�	�,�3�3��5�8�$�	4�	
���Kr-�rZrUrVc#��K�|stjdd}dt|dd����|�t|�dkDr
t	||�}ng}t|�}dD]}	|j
|��t|xs
t��}|D]}|D]}t�||�����t|�r�fd�|D�Ed{����fd�|D�Ed{���t|�rOt|ddz
dd�D]8}|D]1}d	jt|d
|f����t�d|����3�:yy#t$rY��wxYw7��7�p�w)
a
    Yields the tags for a CPython interpreter.

    The tags consist of:
    - cp<python_version>-<abi>-<platform>
    - cp<python_version>-abi3-<platform>
    - cp<python_version>-none-<platform>
    - cp<less than python_version>-abi3-<platform>  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    Nrkrr)�abi3�nonec3�8�K�|]}t�d|����y�w)r�N�r��.0rWr"s  �r+�	<genexpr>zcpython_tags.<locals>.<genexpr>�s�����S��I�C��V�Y�7����c3�8�K�|]}t�d|����y�w)r�Nr�r�s  �r+r�zcpython_tags.<locals>.<genexpr>�s�����O�Y�	��K���3�Y�r����zcp{version}r�r{r�)
r��version_infor~rlr��list�remove�
ValueError�
platform_tagsrrn�ranger�)	rhrUrVrZ�explicit_abir#rW�
minor_versionr"s	        @r+�cpython_tagsr��se�����,��)�)�"�1�-���~�n�R�a�&8�9�:�;�K��|��~���"� ���6�D��D���:�D�(��	��K�K��%�)��Y�1�-�/�2�I���"�I��k�3�	�2�2�#���^�$�S��S�S�S�O�Y�O�O�O��^�$�"�>�!�#4�q�#8�!�R�@�M�&�	�+�2�2�*�N�1�,=�}�+M�N�3����+�v�y�9�9�	'�A�%���	��	��	T��O�sJ�AE�D-�+AE�:D<�;E�
D>�AE�-	D9�6E�8D9�9E�>Ec�z�tdd��}t|t�r|ddk7rtd��|j	d�}t|�dkrt
tjdd	�S|d
}|jd�rd|j	d
�d
z}n�|jd�r|j	d
�d}nq|jd�r$d
j|j	d
�dd	�}n<|jd�r$d
j|j	d
�dd�}n|r|}ngSt|�gS)z1
    Return the ABI tag based on EXT_SUFFIX.
    �
EXT_SUFFIXTr�rrNz.invalid sysconfig.get_config_var('EXT_SUFFIX')rjNrkrrrr:r�graalpy)rar4rF�SystemErrorrPrlr�r�r��
startswith�joinrg)�
ext_suffix�parts�soabir#s    r+�_generic_abir��s'��!��D�9�J��j�#�&�*�Q�-�3�*>��J�K�K����S�!�E�
�5�z�A�~��S�-�-�b�q�1�2�2��!�H�E����	�"��U�[�[��%�a�(�(��	�	�	�$�	��k�k�#��q�!��	�	�	�&�	!��h�h�u�{�{�3�'���+�,��	�	�	�)�	$��h�h�u�{�{�3�'���+�,��	����	��c�"�#�#r-r"c#�$K�|s)t�}t|��}dj||g�}|�t�}nt	|�}t	|xs
t��}d|vr|j
d�|D]}|D]}t|||�����y�w)z�
    Yields the tags for a generic interpreter.

    The tags consist of:
    - <interpreter>-<abi>-<platform>

    The "none" ABI will be added if it was not explicitly provided.
    r�rqNr�)�interpreter_name�interpreter_versionr�r�r�r�r�r)r"rUrVrZ�interp_name�interp_versionr#rWs        r+�generic_tagsr�
s������&�(��,�$�7���g�g�{�N�;�<���|��~���D�z���Y�1�-�/�2�I�
�T�����F����"�I��k�3�	�2�2�#��s�BBc#��K�t|�dkDrdt|dd�����d|d����t|�dkDr.t|ddz
dd�D]}dt|d|f������yy�w)z�
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    rrNrkrr�)rlr~r�)ro�minors  r+�_py_interpreter_ranger�,s������:�����>�*�R�a�.�1�2�3�3��z�!�}�o�
��
�:�����:�a�=�1�,�b�"�5�E��~�z�!�}�e�&<�=�>�?�?�6��s�A)A+c#�K�|stjdd}t|xs
t��}t	|�D]}|D]}t|d|�����|rt|dd���t	|�D]}t|dd����y�w)z�
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-<platform>
    - <interpreter>-none-any  # ... if `interpreter` is provided.
    - py*-none-any
    Nrkr��any)r�r�r�r�r�r)rhr"rVr{rWs     r+�compatible_tagsr�;s�������)�)�"�1�-���Y�1�-�/�2�I�(��8��"�I��g�v�y�1�1�#�9���+�v�u�-�-�(��8���'�6�5�)�)�9�s�BB�arch�is_32bitc�0�|s|S|jd�ryy)N�ppc�i386)r�)r�r�s  r+�	_mac_archr�Ts��������u���r-r{�cpu_archc�d�|g}|dk(r|dkrgS|jgd��nb|dk(r|dkrgS|jgd��nB|dk(r|dkDs|dkrgS|jd�n|d	k(r|d
kDrgS|jddg�|d
vr|jd�|dvr|jd�|S)N�x86_64)�
ry)�intel�fat64�fat32r�)r�r��fat�ppc64)r��r�r�)r��r�r�>�arm64r��
universal2>r�r�r�r�r��	universal)�extendr�)r{r��formatss   r+�_mac_binary_formatsr�^s����j�G��8���W���I����2�3�	�V�	��W���I����0�1�	�W�	��W���'� 1��I����w��	�U�	��W���I������'�(��&�&����|�$��>�>����{�#��Nr-c#�K�tj�\}}}|��tdtt	t
|j
d�dd���}|dk(r~tjtjdddgd	d
ditjd	��j}tdtt	t
|j
d�dd���}n|}|�t|�}n|}d
|krG|dkrBt|ddd�D]/}d|f}t||�}|D]}dj!d||������1|dk\rBt|ddd�D]/}	|	df}t||�}|D]}dj!|	d|������1|dk\r�|dk(rFtddd�D]5}d|f}t||�}|D]}dj!|d|d|����� �7ytddd�D]$}d|f}d}dj!|d|d|�����&yy�w)aD
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    N�
MacVersionrNrk)r��z-sSz-cz-import platform; print(platform.mac_ver()[0])T�SYSTEM_VERSION_COMPAT�0)�check�env�stdout�universal_newlines)r�r)�rrr�r�z&macosx_{major}_{minor}_{binary_format})�majorr��
binary_formatrr�r�rjr�)r$�mac_verr
rm�maprJrP�
subprocess�runr��
executable�PIPEr�r�r�r�r�)
r{r��version_strrdr�r��compat_version�binary_formatsr��
major_versions
          r+�
mac_platformsr�~ss���� (�/�/�1��K��H����|�U�3�s�K�4E�4E�c�4J�2�A�4N�+O�%P�Q���h��%�.�.��N�N���C�	��,�c�2�!���#'���f�
��<��s�3��8I�8I�#�8N�r�PQ�8R�/S�)T�U�G����|���"�����'��g��/�#�7�1�:�r�2�6�M���.�N�0���F�N�!/�
�>�E�E��M��F���"0�7��'��#�7�1�:�r�2�6�M�*�A�-�N�0���F�N�!/�
�>�E�E�'�q�
�F���"0�7��'���8��!&�r�1�b�!1�
�!#�]�!2��!4�^�T�!J��%3�M�B�I�I�,�Q�/�,�Q�/�&3�J���&4�"2�"'�r�1�b�!1�
�!#�]�!2�� ,�
�>�E�E�(��+�(��+�"/�F���"2�'�s�G<G>c#�K�ttj��}|r|dk(rd}n|dk(rd}|jdd�\}}t	j
||�Ed{���t
j
|�Ed{���|��y7�&7��w)N�linux_x86_64�
linux_i686�
linux_aarch64�linux_armv7lrdr)rgr\�get_platformrPrr�r)r��linuxrdr�s    r+�_linux_platformsr��s������i�4�4�6�7�E���N�"� �E�
�o�
%�"�E��k�k�#�q�!�G�A�t��'�'��t�4�4�4��'�'��-�-�-�
�K�5��-�s$�AB
�B� B
�<B�=
B
�B
c#�JK�ttj����y�wr')rgr\r�rKr-r+�_generic_platformsr��s����
�I�2�2�4�
5�5�s�!#c��tj�dk(r
t�Stj�dk(r
t�St	�S)z;
    Provides the platform tags for this installation.
    �Darwin�Linux)r$�systemr�r�r�rKr-r+r�r��s<������H�$����	���	�g�	%��!�!�!�#�#r-c�h�tjj}tj	|�xs|S)z�
    Returns the name of the running interpreter.

    Some implementations have a reserved, two-letter abbreviation which will
    be returned when appropriate.
    )r��implementationrYr�get)rYs r+r�r��s+�����"�"�D�"�&�&�t�,�4��4r-c�v�td|��}|r
t|�}|Sttjdd�}|S)z9
    Returns the version of the running interpreter.
    �py_version_nodotr�Nrk)rarFr~r�r�)rZr{s  r+r�r��sB���0�t�<�G���g�,���N�!��!1�!1�"�1�!5�6���Nr-c�@�djtt|��S)Nrq)r�r�rFr�s r+r~r~
s��
�7�7�3�s�G�$�%�%r-c#��K�t�}|dk(rt|��Ed{���nt�Ed{���|dk(rd}n|dk(rdt|��z}nd}t	|��Ed{���y7�K7�:7�	�w)z�
    Returns the sequence of tag triples for the running interpreter.

    The order of the sequence corresponds to priority order for the
    interpreter, from most to least important.
    rr�Nr�pp3)r")r�r�r�r�r�)rZr��interps   r+�sys_tagsr�sx����#�$�K��d���T�*�*�*��>�!�!��d����	��	��+��6�6�����6�2�2�2�	+��!��3�s1�A3�A-�A3�A/�2A3�'A1�(A3�/A3�1A3)F)NNN)NN)6�loggingr$r�r�r\�importlib.machineryr�typingrrrrrr	r
rrr
rqrr�	getLoggerrAr^rJ�
PythonVersionr�rrF�__annotations__�maxsize�_32_BIT_INTERPRETERrrXrIrargrnr�r�r�r�r�r�r�r�r�r�r�r�r�r�r~r�rKr-r+�<module>rs^��
���
��2����%�	��	�	�8�	$����
�
�
�3��8�_�
������+���c�3�h����k�k�U�*��3(�3(�l
�3�
�9�S�>�
� �#��T��e�C��d�N�6K��H�c�H�c�H�G�-�G�D�G�!�m�!�4�!�D��I�!�J/3�$(�)-�6:�
�6:��]�+�6:�
�8�C�=�
!�6:����
�&�6:�
�6:��c�]�
6:�r&$�d�3�i�&$�T"&�$(�)-�3�
�3��#��3�
�8�C�=�
!�3����
�&�3�
�3��c�]�
3�>@�m�@���
�@� /3�!%�)-�*��]�+�*��#��*����
�&�*��c�]�	*�2+>��C��4��#�����s��t�C�y��BAE�U�
�j�
!�U�08��
�U�
�c�]�U�p':�
�t�
�h�s�m�
�6�H�S�M�6�	$�x��}�	$�5�#�5�).�	��	�#�	�&�M�&�c�&�#�3�d�3�x��}�3r-python3.12/site-packages/pkg_resources/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc000064400000021747151732701000026451 0ustar00�

��_i�"���UddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
ddlmZmZmZmZdZdZdZej,ded	e	eeddffd
��Zded	efd�Zded	efd
�Zdeded	efd�Zej:d��Zeeefe d<Gd�de�Z!d	eefd�Z"d	eefd�Z#d	eefd�Z$ded	e
eeffd�Z%ejL�d	e
eeffd��Z'dedede!d	efd�Z(dddd �Z)d!eded	e
efd"�Z*y)#�N)�Dict�	Generator�Iterator�
NamedTuple�Optional�Tuple�)�EIClass�EIData�ELFFile�EMachinel~ii�path�returnc#�K�	t|d�5}t|���ddd�y#1swYyxYw#tttf$rd��YywxYw�w)N�rb)�openr�OSError�	TypeError�
ValueError)r�fs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/packaging/_manylinux.py�
_parse_elfrsF�����
�$��
���!�*���
�
���Y�
�+���
��s>�A�3�'�3�A�0�3�A�3�A�A�
A�A�
executablec�x�t|�5}|duxr�|jtjk(xrt|jt
jk(xrU|jtjk(xr6|jtztk(xr|jtztk(	cddd�S#1swYyxYw�N)r�capacityr
�C32�encodingr�Lsb�machiner
�Arm�flags�EF_ARM_ABIMASK�EF_ARM_ABI_VER5�EF_ARM_ABI_FLOAT_HARD�rrs  r�_is_linux_armhfr's���
�J�	�1�
�T�M�
I��
�
�g�k�k�)�
I��
�
�f�j�j�(�
I��	�	�X�\�\�)�
I����.�(�O�;�	
I�
���/�/�3H�H�
	
�
 �	�	�s�BB0�0B9c��t|�5}|duxr[|jtjk(xr<|jt
jk(xr|jtjk(	cddd�S#1swYyxYwr)
rrr
rrrrr r
�I386r&s  r�_is_linux_i686r*+se��	�J�	�1�
�T�M�
+��
�
�g�k�k�)�
+��
�
�f�j�j�(�
+��	�	�X�]�]�*�		
�
 �	�	�s�A"A8�8B�archc�J�|dk(rt|�S|dk(rt|�S|dvS)N�armv7l�i686>�ppc64�s390x�x86_64�aarch64�ppc64le)r'r*)rr+s  r�_have_compatible_abir45s3���x���z�*�*��v�~��j�)�)��E�E�E�c��y)N�2�r8r5r�<lambda>r9Bs��Br5�_LAST_GLIBC_MINORc�"�eZdZUeed<eed<y)�
_GLibCVersion�major�minorN)�__name__�
__module__�__qualname__�int�__annotations__r8r5rr<r<Es���J��Jr5r<c��	ttd�d�}|�J�|j�\}}|S#ttt
tf$rYywxYw)zJ
    Primary implementation of glibc_version_string using os.confstr.
    �confstr�CS_GNU_LIBC_VERSIONN)�getattr�os�rsplit�AssertionError�AttributeErrorrr)�version_string�_�versions   r�_glibc_version_string_confstrrOJs]���4�g�b�)�4�5J�K���)�)�)�#�*�*�,�
��7��N��
�N�G�Z�@����s�-1�A
�A
c��	ddl}	|jd�}	|j}|j|_|�}t|t�s|jd�}|S#t$rYywxYw#t$rYywxYw#t
$rYywxYw)zG
    Fallback implementation of glibc_version_string using ctypes.
    rN�ascii)�ctypes�ImportError�CDLLr�gnu_get_libc_versionrK�c_char_p�restype�
isinstance�str�decode)rR�process_namespacerU�version_strs    r�_glibc_version_string_ctypesr]]s�����"�"�K�K��-���0�E�E��$*�?�?�� �+�-�K��k�3�'�!�(�(��1�����G�����$�����
����s3�A �A/�A>� 	A,�+A,�/	A;�:A;�>	B
�	B
c�.�t�xs
t�S)z9Returns glibc version string, or None if not using glibc.)rOr]r8r5r�_glibc_version_stringr_�s��(�*�L�.J�.L�Lr5r\c���tjd|�}|stjd|��t�yt|j
d��t|j
d��fS)a3Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    z$(?P<major>[0-9]+)\.(?P<minor>[0-9]+)z;Expected glibc version with 2 components major.minor, got: ����rbr=r>)�re�match�warnings�warn�RuntimeWarningrB�group)r\�ms  r�_parse_glibc_versionrj�sb��	���8�+�F�A���
�
�� �M�
#��	
�
��q�w�w�w�� �#�a�g�g�g�&6�"7�7�7r5c�2�t�}|�yt|�S)Nra)r_rj)r\s r�_get_glibc_versionrl�s��'�)�K������,�,r5�namerNc���t�}||kry	ddl}t|d�r'|j	|d|d|�}|�t|�Sy|t
dd�k(r!t|d�rt|j�S|t
dd	�k(r!t|d
�rt|j�S|t
dd�k(r!t|d�rt|j�Sy#t$rYywxYw)
NFrT�manylinux_compatibler	���manylinux1_compatible��manylinux2010_compatible��manylinux2014_compatible)
rl�
_manylinuxrS�hasattrro�boolr<rrrtrv)rmr+rN�	sys_glibcrw�results      r�_is_compatibler|�s���"�$�I��7������z�1�2��0�0����W�Q�Z��N������<����-��1�%�%��:�6�7��
�8�8�9�9��-��2�&�&��:�9�:��
�;�;�<�<��-��2�&�&��:�9�:��
�;�;�<�<���!����s�C�	C&�%C&�
manylinux2014�
manylinux2010�
manylinux1))rpru)rprs)rprq�linuxc#�K�ttj|�sytdd�}|dvrtdd�}tt	��}|g}t|jdz
dd�D]&}t|}|jt||���(|D]�}|j|jk(r
|j}nd}t|j|d�D]|}t|j|�}	dj|	�}
t|
||	�r|jd|
���|	tvs�Rt|	}t|||	�s�i|jd|����~��y�w)	Nrp�>r.r1�r	rbzmanylinux_{}_{}r�)r4�sysrr<rl�ranger=r:�appendr>�formatr|�replace�_LEGACY_MANYLINUX_MAP)r�r+�too_old_glibc2�
current_glibc�glibc_max_list�glibc_major�glibc_minor�	glibc_max�	min_minor�
glibc_version�tag�
legacy_tags            r�
platform_tagsr��sD���������5��"�1�b�)�N��!�!�&�q�!�,��!�#5�#7�8�M�#�_�N��]�0�0�1�4�a��<��'��4�����m�K��E�F�=�$�	��?�?�n�2�2�2�&�,�,�I��I� ����)�R�@�K�)�)�/�/�;�G�M�*�#�*�*�M�:�C��c�4��7��m�m�G�S�1�1�� 5�5�2�=�A�
�!�*�d�M�B��-�-���<�<�A�
$�s�D#E�&E�=E)+�collections�
contextlib�	functoolsrHrcr�re�typingrrrrrr�_elffiler
rrr
r#r$r%�contextmanagerrYrryr'r*r4�defaultdictr:rBrCr<rOr]r_rj�	lru_cacherlr|r�r�r8r5r�<module>r�s������	�	�
��I�I�8�8�����"��
����S��Y�x��'8�$��'D�E����
��
��
�
�s�
�t�
�F�S�F��F��F�%<�K�$;�$;�J�$G��4��S��>�G��J��
�x��}��&)�h�s�m�)�XM�x��}�M�
8�c�8�e�C��H�o�8�&�����-�E�#�s�(�O�-��-����C��-��D��8�
��
��"=��"=�C�"=�H�S�M�"=r5python3.12/site-packages/pkg_resources/_vendor/packaging/_musllinux.py000064400000004734151732701000022121 0ustar00"""PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
"""

import functools
import re
import subprocess
import sys
from typing import Iterator, NamedTuple, Optional

from ._elffile import ELFFile


class _MuslVersion(NamedTuple):
    major: int
    minor: int


def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
    lines = [n for n in (n.strip() for n in output.splitlines()) if n]
    if len(lines) < 2 or lines[0][:4] != "musl":
        return None
    m = re.match(r"Version (\d+)\.(\d+)", lines[1])
    if not m:
        return None
    return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2)))


@functools.lru_cache()
def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
    """Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    """
    try:
        with open(executable, "rb") as f:
            ld = ELFFile(f).interpreter
    except (OSError, TypeError, ValueError):
        return None
    if ld is None or "musl" not in ld:
        return None
    proc = subprocess.run([ld], stderr=subprocess.PIPE, universal_newlines=True)
    return _parse_musl_version(proc.stderr)


def platform_tags(arch: str) -> Iterator[str]:
    """Generate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    """
    sys_musl = _get_musl_version(sys.executable)
    if sys_musl is None:  # Python not dynamically linked against musl.
        return
    for minor in range(sys_musl.minor, -1, -1):
        yield f"musllinux_{sys_musl.major}_{minor}_{arch}"


if __name__ == "__main__":  # pragma: no cover
    import sysconfig

    plat = sysconfig.get_platform()
    assert plat.startswith("linux-"), "not linux"

    print("plat:", plat)
    print("musl:", _get_musl_version(sys.executable))
    print("tags:", end=" ")
    for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])):
        print(t, end="\n      ")
python3.12/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py000064400000012254151732701000022067 0ustar00import contextlib
import re
from dataclasses import dataclass
from typing import Dict, Iterator, NoReturn, Optional, Tuple, Union

from .specifiers import Specifier


@dataclass
class Token:
    name: str
    text: str
    position: int


class ParserSyntaxError(Exception):
    """The provided source text could not be parsed correctly."""

    def __init__(
        self,
        message: str,
        *,
        source: str,
        span: Tuple[int, int],
    ) -> None:
        self.span = span
        self.message = message
        self.source = source

        super().__init__()

    def __str__(self) -> str:
        marker = " " * self.span[0] + "~" * (self.span[1] - self.span[0]) + "^"
        return "\n    ".join([self.message, self.source, marker])


DEFAULT_RULES: "Dict[str, Union[str, re.Pattern[str]]]" = {
    "LEFT_PARENTHESIS": r"\(",
    "RIGHT_PARENTHESIS": r"\)",
    "LEFT_BRACKET": r"\[",
    "RIGHT_BRACKET": r"\]",
    "SEMICOLON": r";",
    "COMMA": r",",
    "QUOTED_STRING": re.compile(
        r"""
            (
                ('[^']*')
                |
                ("[^"]*")
            )
        """,
        re.VERBOSE,
    ),
    "OP": r"(===|==|~=|!=|<=|>=|<|>)",
    "BOOLOP": r"\b(or|and)\b",
    "IN": r"\bin\b",
    "NOT": r"\bnot\b",
    "VARIABLE": re.compile(
        r"""
            \b(
                python_version
                |python_full_version
                |os[._]name
                |sys[._]platform
                |platform_(release|system)
                |platform[._](version|machine|python_implementation)
                |python_implementation
                |implementation_(name|version)
                |extra
            )\b
        """,
        re.VERBOSE,
    ),
    "SPECIFIER": re.compile(
        Specifier._operator_regex_str + Specifier._version_regex_str,
        re.VERBOSE | re.IGNORECASE,
    ),
    "AT": r"\@",
    "URL": r"[^ \t]+",
    "IDENTIFIER": r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b",
    "VERSION_PREFIX_TRAIL": r"\.\*",
    "VERSION_LOCAL_LABEL_TRAIL": r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*",
    "WS": r"[ \t]+",
    "END": r"$",
}


class Tokenizer:
    """Context-sensitive token parsing.

    Provides methods to examine the input stream to check whether the next token
    matches.
    """

    def __init__(
        self,
        source: str,
        *,
        rules: "Dict[str, Union[str, re.Pattern[str]]]",
    ) -> None:
        self.source = source
        self.rules: Dict[str, re.Pattern[str]] = {
            name: re.compile(pattern) for name, pattern in rules.items()
        }
        self.next_token: Optional[Token] = None
        self.position = 0

    def consume(self, name: str) -> None:
        """Move beyond provided token name, if at current position."""
        if self.check(name):
            self.read()

    def check(self, name: str, *, peek: bool = False) -> bool:
        """Check whether the next token has the provided name.

        By default, if the check succeeds, the token *must* be read before
        another check. If `peek` is set to `True`, the token is not loaded and
        would need to be checked again.
        """
        assert (
            self.next_token is None
        ), f"Cannot check for {name!r}, already have {self.next_token!r}"
        assert name in self.rules, f"Unknown token name: {name!r}"

        expression = self.rules[name]

        match = expression.match(self.source, self.position)
        if match is None:
            return False
        if not peek:
            self.next_token = Token(name, match[0], self.position)
        return True

    def expect(self, name: str, *, expected: str) -> Token:
        """Expect a certain token name next, failing with a syntax error otherwise.

        The token is *not* read.
        """
        if not self.check(name):
            raise self.raise_syntax_error(f"Expected {expected}")
        return self.read()

    def read(self) -> Token:
        """Consume the next token and return it."""
        token = self.next_token
        assert token is not None

        self.position += len(token.text)
        self.next_token = None

        return token

    def raise_syntax_error(
        self,
        message: str,
        *,
        span_start: Optional[int] = None,
        span_end: Optional[int] = None,
    ) -> NoReturn:
        """Raise ParserSyntaxError at the given position."""
        span = (
            self.position if span_start is None else span_start,
            self.position if span_end is None else span_end,
        )
        raise ParserSyntaxError(
            message,
            source=self.source,
            span=span,
        )

    @contextlib.contextmanager
    def enclosing_tokens(
        self, open_token: str, close_token: str, *, around: str
    ) -> Iterator[None]:
        if self.check(open_token):
            open_position = self.position
            self.read()
        else:
            open_position = None

        yield

        if open_position is None:
            return

        if not self.check(close_token):
            self.raise_syntax_error(
                f"Expected matching {close_token} for {open_token}, after {around}",
                span_start=open_position,
            )

        self.read()
python3.12/site-packages/pkg_resources/_vendor/packaging/_manylinux.py000064400000021336151732701000022102 0ustar00import collections
import contextlib
import functools
import os
import re
import sys
import warnings
from typing import Dict, Generator, Iterator, NamedTuple, Optional, Tuple

from ._elffile import EIClass, EIData, ELFFile, EMachine

EF_ARM_ABIMASK = 0xFF000000
EF_ARM_ABI_VER5 = 0x05000000
EF_ARM_ABI_FLOAT_HARD = 0x00000400


# `os.PathLike` not a generic type until Python 3.9, so sticking with `str`
# as the type for `path` until then.
@contextlib.contextmanager
def _parse_elf(path: str) -> Generator[Optional[ELFFile], None, None]:
    try:
        with open(path, "rb") as f:
            yield ELFFile(f)
    except (OSError, TypeError, ValueError):
        yield None


def _is_linux_armhf(executable: str) -> bool:
    # hard-float ABI can be detected from the ELF header of the running
    # process
    # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf
    with _parse_elf(executable) as f:
        return (
            f is not None
            and f.capacity == EIClass.C32
            and f.encoding == EIData.Lsb
            and f.machine == EMachine.Arm
            and f.flags & EF_ARM_ABIMASK == EF_ARM_ABI_VER5
            and f.flags & EF_ARM_ABI_FLOAT_HARD == EF_ARM_ABI_FLOAT_HARD
        )


def _is_linux_i686(executable: str) -> bool:
    with _parse_elf(executable) as f:
        return (
            f is not None
            and f.capacity == EIClass.C32
            and f.encoding == EIData.Lsb
            and f.machine == EMachine.I386
        )


def _have_compatible_abi(executable: str, arch: str) -> bool:
    if arch == "armv7l":
        return _is_linux_armhf(executable)
    if arch == "i686":
        return _is_linux_i686(executable)
    return arch in {"x86_64", "aarch64", "ppc64", "ppc64le", "s390x"}


# If glibc ever changes its major version, we need to know what the last
# minor version was, so we can build the complete list of all versions.
# For now, guess what the highest minor version might be, assume it will
# be 50 for testing. Once this actually happens, update the dictionary
# with the actual value.
_LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50)


class _GLibCVersion(NamedTuple):
    major: int
    minor: int


def _glibc_version_string_confstr() -> Optional[str]:
    """
    Primary implementation of glibc_version_string using os.confstr.
    """
    # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely
    # to be broken or missing. This strategy is used in the standard library
    # platform module.
    # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183
    try:
        # Should be a string like "glibc 2.17".
        version_string: str = getattr(os, "confstr")("CS_GNU_LIBC_VERSION")
        assert version_string is not None
        _, version = version_string.rsplit()
    except (AssertionError, AttributeError, OSError, ValueError):
        # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...
        return None
    return version


def _glibc_version_string_ctypes() -> Optional[str]:
    """
    Fallback implementation of glibc_version_string using ctypes.
    """
    try:
        import ctypes
    except ImportError:
        return None

    # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
    # manpage says, "If filename is NULL, then the returned handle is for the
    # main program". This way we can let the linker do the work to figure out
    # which libc our process is actually using.
    #
    # We must also handle the special case where the executable is not a
    # dynamically linked executable. This can occur when using musl libc,
    # for example. In this situation, dlopen() will error, leading to an
    # OSError. Interestingly, at least in the case of musl, there is no
    # errno set on the OSError. The single string argument used to construct
    # OSError comes from libc itself and is therefore not portable to
    # hard code here. In any case, failure to call dlopen() means we
    # can proceed, so we bail on our attempt.
    try:
        process_namespace = ctypes.CDLL(None)
    except OSError:
        return None

    try:
        gnu_get_libc_version = process_namespace.gnu_get_libc_version
    except AttributeError:
        # Symbol doesn't exist -> therefore, we are not linked to
        # glibc.
        return None

    # Call gnu_get_libc_version, which returns a string like "2.5"
    gnu_get_libc_version.restype = ctypes.c_char_p
    version_str: str = gnu_get_libc_version()
    # py2 / py3 compatibility:
    if not isinstance(version_str, str):
        version_str = version_str.decode("ascii")

    return version_str


def _glibc_version_string() -> Optional[str]:
    """Returns glibc version string, or None if not using glibc."""
    return _glibc_version_string_confstr() or _glibc_version_string_ctypes()


def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
    """Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    """
    m = re.match(r"(?P<major>[0-9]+)\.(?P<minor>[0-9]+)", version_str)
    if not m:
        warnings.warn(
            f"Expected glibc version with 2 components major.minor,"
            f" got: {version_str}",
            RuntimeWarning,
        )
        return -1, -1
    return int(m.group("major")), int(m.group("minor"))


@functools.lru_cache()
def _get_glibc_version() -> Tuple[int, int]:
    version_str = _glibc_version_string()
    if version_str is None:
        return (-1, -1)
    return _parse_glibc_version(version_str)


# From PEP 513, PEP 600
def _is_compatible(name: str, arch: str, version: _GLibCVersion) -> bool:
    sys_glibc = _get_glibc_version()
    if sys_glibc < version:
        return False
    # Check for presence of _manylinux module.
    try:
        import _manylinux  # noqa
    except ImportError:
        return True
    if hasattr(_manylinux, "manylinux_compatible"):
        result = _manylinux.manylinux_compatible(version[0], version[1], arch)
        if result is not None:
            return bool(result)
        return True
    if version == _GLibCVersion(2, 5):
        if hasattr(_manylinux, "manylinux1_compatible"):
            return bool(_manylinux.manylinux1_compatible)
    if version == _GLibCVersion(2, 12):
        if hasattr(_manylinux, "manylinux2010_compatible"):
            return bool(_manylinux.manylinux2010_compatible)
    if version == _GLibCVersion(2, 17):
        if hasattr(_manylinux, "manylinux2014_compatible"):
            return bool(_manylinux.manylinux2014_compatible)
    return True


_LEGACY_MANYLINUX_MAP = {
    # CentOS 7 w/ glibc 2.17 (PEP 599)
    (2, 17): "manylinux2014",
    # CentOS 6 w/ glibc 2.12 (PEP 571)
    (2, 12): "manylinux2010",
    # CentOS 5 w/ glibc 2.5 (PEP 513)
    (2, 5): "manylinux1",
}


def platform_tags(linux: str, arch: str) -> Iterator[str]:
    if not _have_compatible_abi(sys.executable, arch):
        return
    # Oldest glibc to be supported regardless of architecture is (2, 17).
    too_old_glibc2 = _GLibCVersion(2, 16)
    if arch in {"x86_64", "i686"}:
        # On x86/i686 also oldest glibc to be supported is (2, 5).
        too_old_glibc2 = _GLibCVersion(2, 4)
    current_glibc = _GLibCVersion(*_get_glibc_version())
    glibc_max_list = [current_glibc]
    # We can assume compatibility across glibc major versions.
    # https://sourceware.org/bugzilla/show_bug.cgi?id=24636
    #
    # Build a list of maximum glibc versions so that we can
    # output the canonical list of all glibc from current_glibc
    # down to too_old_glibc2, including all intermediary versions.
    for glibc_major in range(current_glibc.major - 1, 1, -1):
        glibc_minor = _LAST_GLIBC_MINOR[glibc_major]
        glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor))
    for glibc_max in glibc_max_list:
        if glibc_max.major == too_old_glibc2.major:
            min_minor = too_old_glibc2.minor
        else:
            # For other glibc major versions oldest supported is (x, 0).
            min_minor = -1
        for glibc_minor in range(glibc_max.minor, min_minor, -1):
            glibc_version = _GLibCVersion(glibc_max.major, glibc_minor)
            tag = "manylinux_{}_{}".format(*glibc_version)
            if _is_compatible(tag, arch, glibc_version):
                yield linux.replace("linux", tag)
            # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags.
            if glibc_version in _LEGACY_MANYLINUX_MAP:
                legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version]
                if _is_compatible(legacy_tag, arch, glibc_version):
                    yield linux.replace("linux", legacy_tag)
python3.12/site-packages/pkg_resources/_vendor/packaging/tags.py000064400000043272151732701000020660 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import logging
import platform
import subprocess
import sys
import sysconfig
from importlib.machinery import EXTENSION_SUFFIXES
from typing import (
    Dict,
    FrozenSet,
    Iterable,
    Iterator,
    List,
    Optional,
    Sequence,
    Tuple,
    Union,
    cast,
)

from . import _manylinux, _musllinux

logger = logging.getLogger(__name__)

PythonVersion = Sequence[int]
MacVersion = Tuple[int, int]

INTERPRETER_SHORT_NAMES: Dict[str, str] = {
    "python": "py",  # Generic.
    "cpython": "cp",
    "pypy": "pp",
    "ironpython": "ip",
    "jython": "jy",
}


_32_BIT_INTERPRETER = sys.maxsize <= 2**32


class Tag:
    """
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    """

    __slots__ = ["_interpreter", "_abi", "_platform", "_hash"]

    def __init__(self, interpreter: str, abi: str, platform: str) -> None:
        self._interpreter = interpreter.lower()
        self._abi = abi.lower()
        self._platform = platform.lower()
        # The __hash__ of every single element in a Set[Tag] will be evaluated each time
        # that a set calls its `.disjoint()` method, which may be called hundreds of
        # times when scanning a page of links for packages with tags matching that
        # Set[Tag]. Pre-computing the value here produces significant speedups for
        # downstream consumers.
        self._hash = hash((self._interpreter, self._abi, self._platform))

    @property
    def interpreter(self) -> str:
        return self._interpreter

    @property
    def abi(self) -> str:
        return self._abi

    @property
    def platform(self) -> str:
        return self._platform

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, Tag):
            return NotImplemented

        return (
            (self._hash == other._hash)  # Short-circuit ASAP for perf reasons.
            and (self._platform == other._platform)
            and (self._abi == other._abi)
            and (self._interpreter == other._interpreter)
        )

    def __hash__(self) -> int:
        return self._hash

    def __str__(self) -> str:
        return f"{self._interpreter}-{self._abi}-{self._platform}"

    def __repr__(self) -> str:
        return f"<{self} @ {id(self)}>"


def parse_tag(tag: str) -> FrozenSet[Tag]:
    """
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    """
    tags = set()
    interpreters, abis, platforms = tag.split("-")
    for interpreter in interpreters.split("."):
        for abi in abis.split("."):
            for platform_ in platforms.split("."):
                tags.add(Tag(interpreter, abi, platform_))
    return frozenset(tags)


def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]:
    value: Union[int, str, None] = sysconfig.get_config_var(name)
    if value is None and warn:
        logger.debug(
            "Config variable '%s' is unset, Python ABI tag may be incorrect", name
        )
    return value


def _normalize_string(string: str) -> str:
    return string.replace(".", "_").replace("-", "_").replace(" ", "_")


def _abi3_applies(python_version: PythonVersion) -> bool:
    """
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    """
    return len(python_version) > 1 and tuple(python_version) >= (3, 2)


def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
    py_version = tuple(py_version)  # To allow for version comparison.
    abis = []
    version = _version_nodot(py_version[:2])
    debug = pymalloc = ucs4 = ""
    with_debug = _get_config_var("Py_DEBUG", warn)
    has_refcount = hasattr(sys, "gettotalrefcount")
    # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled
    # extension modules is the best option.
    # https://github.com/pypa/pip/issues/3383#issuecomment-173267692
    has_ext = "_d.pyd" in EXTENSION_SUFFIXES
    if with_debug or (with_debug is None and (has_refcount or has_ext)):
        debug = "d"
    if py_version < (3, 8):
        with_pymalloc = _get_config_var("WITH_PYMALLOC", warn)
        if with_pymalloc or with_pymalloc is None:
            pymalloc = "m"
        if py_version < (3, 3):
            unicode_size = _get_config_var("Py_UNICODE_SIZE", warn)
            if unicode_size == 4 or (
                unicode_size is None and sys.maxunicode == 0x10FFFF
            ):
                ucs4 = "u"
    elif debug:
        # Debug builds can also load "normal" extension modules.
        # We can also assume no UCS-4 or pymalloc requirement.
        abis.append(f"cp{version}")
    abis.insert(
        0,
        "cp{version}{debug}{pymalloc}{ucs4}".format(
            version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4
        ),
    )
    return abis


def cpython_tags(
    python_version: Optional[PythonVersion] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a CPython interpreter.

    The tags consist of:
    - cp<python_version>-<abi>-<platform>
    - cp<python_version>-abi3-<platform>
    - cp<python_version>-none-<platform>
    - cp<less than python_version>-abi3-<platform>  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    """
    if not python_version:
        python_version = sys.version_info[:2]

    interpreter = f"cp{_version_nodot(python_version[:2])}"

    if abis is None:
        if len(python_version) > 1:
            abis = _cpython_abis(python_version, warn)
        else:
            abis = []
    abis = list(abis)
    # 'abi3' and 'none' are explicitly handled later.
    for explicit_abi in ("abi3", "none"):
        try:
            abis.remove(explicit_abi)
        except ValueError:
            pass

    platforms = list(platforms or platform_tags())
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)
    if _abi3_applies(python_version):
        yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms)
    yield from (Tag(interpreter, "none", platform_) for platform_ in platforms)

    if _abi3_applies(python_version):
        for minor_version in range(python_version[1] - 1, 1, -1):
            for platform_ in platforms:
                interpreter = "cp{version}".format(
                    version=_version_nodot((python_version[0], minor_version))
                )
                yield Tag(interpreter, "abi3", platform_)


def _generic_abi() -> List[str]:
    """
    Return the ABI tag based on EXT_SUFFIX.
    """
    # The following are examples of `EXT_SUFFIX`.
    # We want to keep the parts which are related to the ABI and remove the
    # parts which are related to the platform:
    # - linux:   '.cpython-310-x86_64-linux-gnu.so' => cp310
    # - mac:     '.cpython-310-darwin.so'           => cp310
    # - win:     '.cp310-win_amd64.pyd'             => cp310
    # - win:     '.pyd'                             => cp37 (uses _cpython_abis())
    # - pypy:    '.pypy38-pp73-x86_64-linux-gnu.so' => pypy38_pp73
    # - graalpy: '.graalpy-38-native-x86_64-darwin.dylib'
    #                                               => graalpy_38_native

    ext_suffix = _get_config_var("EXT_SUFFIX", warn=True)
    if not isinstance(ext_suffix, str) or ext_suffix[0] != ".":
        raise SystemError("invalid sysconfig.get_config_var('EXT_SUFFIX')")
    parts = ext_suffix.split(".")
    if len(parts) < 3:
        # CPython3.7 and earlier uses ".pyd" on Windows.
        return _cpython_abis(sys.version_info[:2])
    soabi = parts[1]
    if soabi.startswith("cpython"):
        # non-windows
        abi = "cp" + soabi.split("-")[1]
    elif soabi.startswith("cp"):
        # windows
        abi = soabi.split("-")[0]
    elif soabi.startswith("pypy"):
        abi = "-".join(soabi.split("-")[:2])
    elif soabi.startswith("graalpy"):
        abi = "-".join(soabi.split("-")[:3])
    elif soabi:
        # pyston, ironpython, others?
        abi = soabi
    else:
        return []
    return [_normalize_string(abi)]


def generic_tags(
    interpreter: Optional[str] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a generic interpreter.

    The tags consist of:
    - <interpreter>-<abi>-<platform>

    The "none" ABI will be added if it was not explicitly provided.
    """
    if not interpreter:
        interp_name = interpreter_name()
        interp_version = interpreter_version(warn=warn)
        interpreter = "".join([interp_name, interp_version])
    if abis is None:
        abis = _generic_abi()
    else:
        abis = list(abis)
    platforms = list(platforms or platform_tags())
    if "none" not in abis:
        abis.append("none")
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)


def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
    """
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    """
    if len(py_version) > 1:
        yield f"py{_version_nodot(py_version[:2])}"
    yield f"py{py_version[0]}"
    if len(py_version) > 1:
        for minor in range(py_version[1] - 1, -1, -1):
            yield f"py{_version_nodot((py_version[0], minor))}"


def compatible_tags(
    python_version: Optional[PythonVersion] = None,
    interpreter: Optional[str] = None,
    platforms: Optional[Iterable[str]] = None,
) -> Iterator[Tag]:
    """
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-<platform>
    - <interpreter>-none-any  # ... if `interpreter` is provided.
    - py*-none-any
    """
    if not python_version:
        python_version = sys.version_info[:2]
    platforms = list(platforms or platform_tags())
    for version in _py_interpreter_range(python_version):
        for platform_ in platforms:
            yield Tag(version, "none", platform_)
    if interpreter:
        yield Tag(interpreter, "none", "any")
    for version in _py_interpreter_range(python_version):
        yield Tag(version, "none", "any")


def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str:
    if not is_32bit:
        return arch

    if arch.startswith("ppc"):
        return "ppc"

    return "i386"


def _mac_binary_formats(version: MacVersion, cpu_arch: str) -> List[str]:
    formats = [cpu_arch]
    if cpu_arch == "x86_64":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat64", "fat32"])

    elif cpu_arch == "i386":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat32", "fat"])

    elif cpu_arch == "ppc64":
        # TODO: Need to care about 32-bit PPC for ppc64 through 10.2?
        if version > (10, 5) or version < (10, 4):
            return []
        formats.append("fat64")

    elif cpu_arch == "ppc":
        if version > (10, 6):
            return []
        formats.extend(["fat32", "fat"])

    if cpu_arch in {"arm64", "x86_64"}:
        formats.append("universal2")

    if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}:
        formats.append("universal")

    return formats


def mac_platforms(
    version: Optional[MacVersion] = None, arch: Optional[str] = None
) -> Iterator[str]:
    """
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    """
    version_str, _, cpu_arch = platform.mac_ver()
    if version is None:
        version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
        if version == (10, 16):
            # When built against an older macOS SDK, Python will report macOS 10.16
            # instead of the real version.
            version_str = subprocess.run(
                [
                    sys.executable,
                    "-sS",
                    "-c",
                    "import platform; print(platform.mac_ver()[0])",
                ],
                check=True,
                env={"SYSTEM_VERSION_COMPAT": "0"},
                stdout=subprocess.PIPE,
                universal_newlines=True,
            ).stdout
            version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
    else:
        version = version
    if arch is None:
        arch = _mac_arch(cpu_arch)
    else:
        arch = arch

    if (10, 0) <= version and version < (11, 0):
        # Prior to Mac OS 11, each yearly release of Mac OS bumped the
        # "minor" version number.  The major version was always 10.
        for minor_version in range(version[1], -1, -1):
            compat_version = 10, minor_version
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=10, minor=minor_version, binary_format=binary_format
                )

    if version >= (11, 0):
        # Starting with Mac OS 11, each yearly release bumps the major version
        # number.   The minor versions are now the midyear updates.
        for major_version in range(version[0], 10, -1):
            compat_version = major_version, 0
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=major_version, minor=0, binary_format=binary_format
                )

    if version >= (11, 0):
        # Mac OS 11 on x86_64 is compatible with binaries from previous releases.
        # Arm64 support was introduced in 11.0, so no Arm binaries from previous
        # releases exist.
        #
        # However, the "universal2" binary format can have a
        # macOS version earlier than 11.0 when the x86_64 part of the binary supports
        # that version of macOS.
        if arch == "x86_64":
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_formats = _mac_binary_formats(compat_version, arch)
                for binary_format in binary_formats:
                    yield "macosx_{major}_{minor}_{binary_format}".format(
                        major=compat_version[0],
                        minor=compat_version[1],
                        binary_format=binary_format,
                    )
        else:
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_format = "universal2"
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=compat_version[0],
                    minor=compat_version[1],
                    binary_format=binary_format,
                )


def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]:
    linux = _normalize_string(sysconfig.get_platform())
    if is_32bit:
        if linux == "linux_x86_64":
            linux = "linux_i686"
        elif linux == "linux_aarch64":
            linux = "linux_armv7l"
    _, arch = linux.split("_", 1)
    yield from _manylinux.platform_tags(linux, arch)
    yield from _musllinux.platform_tags(arch)
    yield linux


def _generic_platforms() -> Iterator[str]:
    yield _normalize_string(sysconfig.get_platform())


def platform_tags() -> Iterator[str]:
    """
    Provides the platform tags for this installation.
    """
    if platform.system() == "Darwin":
        return mac_platforms()
    elif platform.system() == "Linux":
        return _linux_platforms()
    else:
        return _generic_platforms()


def interpreter_name() -> str:
    """
    Returns the name of the running interpreter.

    Some implementations have a reserved, two-letter abbreviation which will
    be returned when appropriate.
    """
    name = sys.implementation.name
    return INTERPRETER_SHORT_NAMES.get(name) or name


def interpreter_version(*, warn: bool = False) -> str:
    """
    Returns the version of the running interpreter.
    """
    version = _get_config_var("py_version_nodot", warn=warn)
    if version:
        version = str(version)
    else:
        version = _version_nodot(sys.version_info[:2])
    return version


def _version_nodot(version: PythonVersion) -> str:
    return "".join(map(str, version))


def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
    """
    Returns the sequence of tag triples for the running interpreter.

    The order of the sequence corresponds to priority order for the
    interpreter, from most to least important.
    """

    interp_name = interpreter_name()
    if interp_name == "cp":
        yield from cpython_tags(warn=warn)
    else:
        yield from generic_tags()

    if interp_name == "pp":
        interp = "pp3"
    elif interp_name == "cp":
        interp = "cp" + interpreter_version(warn=warn)
    else:
        interp = None
    yield from compatible_tags(interpreter=interp)
python3.12/site-packages/pkg_resources/_vendor/packaging/specifiers.py000064400000114446151732701000022060 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
"""
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
"""

import abc
import itertools
import re
from typing import (
    Callable,
    Iterable,
    Iterator,
    List,
    Optional,
    Set,
    Tuple,
    TypeVar,
    Union,
)

from .utils import canonicalize_version
from .version import Version

UnparsedVersion = Union[Version, str]
UnparsedVersionVar = TypeVar("UnparsedVersionVar", bound=UnparsedVersion)
CallableOperator = Callable[[Version, str], bool]


def _coerce_version(version: UnparsedVersion) -> Version:
    if not isinstance(version, Version):
        version = Version(version)
    return version


class InvalidSpecifier(ValueError):
    """
    Raised when attempting to create a :class:`Specifier` with a specifier
    string that is invalid.

    >>> Specifier("lolwat")
    Traceback (most recent call last):
        ...
    packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'
    """


class BaseSpecifier(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def __str__(self) -> str:
        """
        Returns the str representation of this Specifier-like object. This
        should be representative of the Specifier itself.
        """

    @abc.abstractmethod
    def __hash__(self) -> int:
        """
        Returns a hash value for this Specifier-like object.
        """

    @abc.abstractmethod
    def __eq__(self, other: object) -> bool:
        """
        Returns a boolean representing whether or not the two Specifier-like
        objects are equal.

        :param other: The other object to check against.
        """

    @property
    @abc.abstractmethod
    def prereleases(self) -> Optional[bool]:
        """Whether or not pre-releases as a whole are allowed.

        This can be set to either ``True`` or ``False`` to explicitly enable or disable
        prereleases or it can be set to ``None`` (the default) to use default semantics.
        """

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        """Setter for :attr:`prereleases`.

        :param value: The value to set.
        """

    @abc.abstractmethod
    def contains(self, item: str, prereleases: Optional[bool] = None) -> bool:
        """
        Determines if the given item is contained within this specifier.
        """

    @abc.abstractmethod
    def filter(
        self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
    ) -> Iterator[UnparsedVersionVar]:
        """
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        """


class Specifier(BaseSpecifier):
    """This class abstracts handling of version specifiers.

    .. tip::

        It is generally not required to instantiate this manually. You should instead
        prefer to work with :class:`SpecifierSet` instead, which can parse
        comma-separated version specifiers (which is what package metadata contains).
    """

    _operator_regex_str = r"""
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        """
    _version_regex_str = r"""
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s;)]*  # The arbitrary version can be just about anything,
                          # we match everything except for whitespace, a
                          # semi-colon for marker support, and a closing paren
                          # since versions can be enclosed in them.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release

                # You cannot use a wild card and a pre-release, post-release, a dev or
                # local version together so group them with a | and make them optional.
                (?:
                    \.\*  # Wild card syntax of .*
                    |
                    (?:                                  # pre release
                        [-_\.]?
                        (alpha|beta|preview|pre|a|b|c|rc)
                        [-_\.]?
                        [0-9]*
                    )?
                    (?:                                  # post release
                        (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                    )?
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        """

    _regex = re.compile(
        r"^\s*" + _operator_regex_str + _version_regex_str + r"\s*$",
        re.VERBOSE | re.IGNORECASE,
    )

    _operators = {
        "~=": "compatible",
        "==": "equal",
        "!=": "not_equal",
        "<=": "less_than_equal",
        ">=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
        "===": "arbitrary",
    }

    def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
        """Initialize a Specifier instance.

        :param spec:
            The string representation of a specifier which will be parsed and
            normalized before use.
        :param prereleases:
            This tells the specifier if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.
        :raises InvalidSpecifier:
            If the given specifier is invalid (i.e. bad syntax).
        """
        match = self._regex.search(spec)
        if not match:
            raise InvalidSpecifier(f"Invalid specifier: '{spec}'")

        self._spec: Tuple[str, str] = (
            match.group("operator").strip(),
            match.group("version").strip(),
        )

        # Store whether or not this Specifier should accept prereleases
        self._prereleases = prereleases

    # https://github.com/python/mypy/pull/13475#pullrequestreview-1079784515
    @property  # type: ignore[override]
    def prereleases(self) -> bool:
        # If there is an explicit prereleases set for this, then we'll just
        # blindly use that.
        if self._prereleases is not None:
            return self._prereleases

        # Look at all of our specifiers and determine if they are inclusive
        # operators, and if they are if they are including an explicit
        # prerelease.
        operator, version = self._spec
        if operator in ["==", ">=", "<=", "~=", "==="]:
            # The == specifier can include a trailing .*, if it does we
            # want to remove before parsing.
            if operator == "==" and version.endswith(".*"):
                version = version[:-2]

            # Parse the version, and if it is a pre-release than this
            # specifier allows pre-releases.
            if Version(version).is_prerelease:
                return True

        return False

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    @property
    def operator(self) -> str:
        """The operator of this specifier.

        >>> Specifier("==1.2.3").operator
        '=='
        """
        return self._spec[0]

    @property
    def version(self) -> str:
        """The version of this specifier.

        >>> Specifier("==1.2.3").version
        '1.2.3'
        """
        return self._spec[1]

    def __repr__(self) -> str:
        """A representation of the Specifier that shows all internal state.

        >>> Specifier('>=1.0.0')
        <Specifier('>=1.0.0')>
        >>> Specifier('>=1.0.0', prereleases=False)
        <Specifier('>=1.0.0', prereleases=False)>
        >>> Specifier('>=1.0.0', prereleases=True)
        <Specifier('>=1.0.0', prereleases=True)>
        """
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f"<{self.__class__.__name__}({str(self)!r}{pre})>"

    def __str__(self) -> str:
        """A string representation of the Specifier that can be round-tripped.

        >>> str(Specifier('>=1.0.0'))
        '>=1.0.0'
        >>> str(Specifier('>=1.0.0', prereleases=False))
        '>=1.0.0'
        """
        return "{}{}".format(*self._spec)

    @property
    def _canonical_spec(self) -> Tuple[str, str]:
        canonical_version = canonicalize_version(
            self._spec[1],
            strip_trailing_zero=(self._spec[0] != "~="),
        )
        return self._spec[0], canonical_version

    def __hash__(self) -> int:
        return hash(self._canonical_spec)

    def __eq__(self, other: object) -> bool:
        """Whether or not the two Specifier-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0")
        True
        >>> (Specifier("==1.2.3", prereleases=False) ==
        ...  Specifier("==1.2.3", prereleases=True))
        True
        >>> Specifier("==1.2.3") == "==1.2.3"
        True
        >>> Specifier("==1.2.3") == Specifier("==1.2.4")
        False
        >>> Specifier("==1.2.3") == Specifier("~=1.2.3")
        False
        """
        if isinstance(other, str):
            try:
                other = self.__class__(str(other))
            except InvalidSpecifier:
                return NotImplemented
        elif not isinstance(other, self.__class__):
            return NotImplemented

        return self._canonical_spec == other._canonical_spec

    def _get_operator(self, op: str) -> CallableOperator:
        operator_callable: CallableOperator = getattr(
            self, f"_compare_{self._operators[op]}"
        )
        return operator_callable

    def _compare_compatible(self, prospective: Version, spec: str) -> bool:

        # Compatible releases have an equivalent combination of >= and ==. That
        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
        # implement this in terms of the other specifiers instead of
        # implementing it ourselves. The only thing we need to do is construct
        # the other specifiers.

        # We want everything but the last item in the version, but we want to
        # ignore suffix segments.
        prefix = ".".join(
            list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1]
        )

        # Add the prefix notation to the end of our string
        prefix += ".*"

        return self._get_operator(">=")(prospective, spec) and self._get_operator("==")(
            prospective, prefix
        )

    def _compare_equal(self, prospective: Version, spec: str) -> bool:

        # We need special logic to handle prefix matching
        if spec.endswith(".*"):
            # In the case of prefix matching we want to ignore local segment.
            normalized_prospective = canonicalize_version(
                prospective.public, strip_trailing_zero=False
            )
            # Get the normalized version string ignoring the trailing .*
            normalized_spec = canonicalize_version(spec[:-2], strip_trailing_zero=False)
            # Split the spec out by dots, and pretend that there is an implicit
            # dot in between a release segment and a pre-release segment.
            split_spec = _version_split(normalized_spec)

            # Split the prospective version out by dots, and pretend that there
            # is an implicit dot in between a release segment and a pre-release
            # segment.
            split_prospective = _version_split(normalized_prospective)

            # 0-pad the prospective version before shortening it to get the correct
            # shortened version.
            padded_prospective, _ = _pad_version(split_prospective, split_spec)

            # Shorten the prospective version to be the same length as the spec
            # so that we can determine if the specifier is a prefix of the
            # prospective version or not.
            shortened_prospective = padded_prospective[: len(split_spec)]

            return shortened_prospective == split_spec
        else:
            # Convert our spec string into a Version
            spec_version = Version(spec)

            # If the specifier does not have a local segment, then we want to
            # act as if the prospective version also does not have a local
            # segment.
            if not spec_version.local:
                prospective = Version(prospective.public)

            return prospective == spec_version

    def _compare_not_equal(self, prospective: Version, spec: str) -> bool:
        return not self._compare_equal(prospective, spec)

    def _compare_less_than_equal(self, prospective: Version, spec: str) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) <= Version(spec)

    def _compare_greater_than_equal(self, prospective: Version, spec: str) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) >= Version(spec)

    def _compare_less_than(self, prospective: Version, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is less than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective < spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a pre-release version, that we do not accept pre-release
        # versions for the version mentioned in the specifier (e.g. <3.1 should
        # not match 3.1.dev0, but should match 3.0.dev0).
        if not spec.is_prerelease and prospective.is_prerelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # less than the spec version *and* it's not a pre-release of the same
        # version in the spec.
        return True

    def _compare_greater_than(self, prospective: Version, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is greater than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective > spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a post-release version, that we do not accept
        # post-release versions for the version mentioned in the specifier
        # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0).
        if not spec.is_postrelease and prospective.is_postrelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # Ensure that we do not allow a local version of the version mentioned
        # in the specifier, which is technically greater than, to match.
        if prospective.local is not None:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # greater than the spec version *and* it's not a pre-release of the
        # same version in the spec.
        return True

    def _compare_arbitrary(self, prospective: Version, spec: str) -> bool:
        return str(prospective).lower() == str(spec).lower()

    def __contains__(self, item: Union[str, Version]) -> bool:
        """Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in Specifier(">=1.2.3")
        True
        >>> Version("1.2.3") in Specifier(">=1.2.3")
        True
        >>> "1.0.0" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
        True
        """
        return self.contains(item)

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:
        """Return whether or not the item is contained in this specifier.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this Specifier. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> Specifier(">=1.2.3").contains("1.2.3")
        True
        >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
        True
        >>> Specifier(">=1.2.3").contains("1.0.0")
        False
        >>> Specifier(">=1.2.3").contains("1.3.0a1")
        False
        >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
        True
        >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
        True
        """

        # Determine if prereleases are to be allowed or not.
        if prereleases is None:
            prereleases = self.prereleases

        # Normalize item to a Version, this allows us to have a shortcut for
        # "2.0" in Specifier(">=2")
        normalized_item = _coerce_version(item)

        # Determine if we should be supporting prereleases in this specifier
        # or not, if we do not support prereleases than we can short circuit
        # logic if this version is a prereleases.
        if normalized_item.is_prerelease and not prereleases:
            return False

        # Actually do the comparison to determine if this item is contained
        # within this Specifier or not.
        operator_callable: CallableOperator = self._get_operator(self.operator)
        return operator_callable(normalized_item, self.version)

    def filter(
        self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
    ) -> Iterator[UnparsedVersionVar]:
        """Filter items in the given iterable, that match the specifier.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(Specifier().contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")]))
        ['1.2.3', '1.3', <Version('1.4')>]
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"]))
        ['1.5a1']
        >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        """

        yielded = False
        found_prereleases = []

        kw = {"prereleases": prereleases if prereleases is not None else True}

        # Attempt to iterate over all the values in the iterable and if any of
        # them match, yield them.
        for version in iterable:
            parsed_version = _coerce_version(version)

            if self.contains(parsed_version, **kw):
                # If our version is a prerelease, and we were not set to allow
                # prereleases, then we'll store it for later in case nothing
                # else matches this specifier.
                if parsed_version.is_prerelease and not (
                    prereleases or self.prereleases
                ):
                    found_prereleases.append(version)
                # Either this is not a prerelease, or we should have been
                # accepting prereleases from the beginning.
                else:
                    yielded = True
                    yield version

        # Now that we've iterated over everything, determine if we've yielded
        # any values, and if we have not and we have any prereleases stored up
        # then we will go ahead and yield the prereleases.
        if not yielded and found_prereleases:
            for version in found_prereleases:
                yield version


_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")


def _version_split(version: str) -> List[str]:
    result: List[str] = []
    for item in version.split("."):
        match = _prefix_regex.search(item)
        if match:
            result.extend(match.groups())
        else:
            result.append(item)
    return result


def _is_not_suffix(segment: str) -> bool:
    return not any(
        segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post")
    )


def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]:
    left_split, right_split = [], []

    # Get the release segment of our versions
    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))

    # Get the rest of our versions
    left_split.append(left[len(left_split[0]) :])
    right_split.append(right[len(right_split[0]) :])

    # Insert our padding
    left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0])))
    right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0])))

    return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split)))


class SpecifierSet(BaseSpecifier):
    """This class abstracts handling of a set of version specifiers.

    It can be passed a single specifier (``>=3.0``), a comma-separated list of
    specifiers (``>=3.0,!=3.1``), or no specifier at all.
    """

    def __init__(
        self, specifiers: str = "", prereleases: Optional[bool] = None
    ) -> None:
        """Initialize a SpecifierSet instance.

        :param specifiers:
            The string representation of a specifier or a comma-separated list of
            specifiers which will be parsed and normalized before use.
        :param prereleases:
            This tells the SpecifierSet if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.

        :raises InvalidSpecifier:
            If the given ``specifiers`` are not parseable than this exception will be
            raised.
        """

        # Split on `,` to break each individual specifier into it's own item, and
        # strip each item to remove leading/trailing whitespace.
        split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]

        # Parsed each individual specifier, attempting first to make it a
        # Specifier.
        parsed: Set[Specifier] = set()
        for specifier in split_specifiers:
            parsed.add(Specifier(specifier))

        # Turn our parsed specifiers into a frozen set and save them for later.
        self._specs = frozenset(parsed)

        # Store our prereleases value so we can use it later to determine if
        # we accept prereleases or not.
        self._prereleases = prereleases

    @property
    def prereleases(self) -> Optional[bool]:
        # If we have been given an explicit prerelease modifier, then we'll
        # pass that through here.
        if self._prereleases is not None:
            return self._prereleases

        # If we don't have any specifiers, and we don't have a forced value,
        # then we'll just return None since we don't know if this should have
        # pre-releases or not.
        if not self._specs:
            return None

        # Otherwise we'll see if any of the given specifiers accept
        # prereleases, if any of them do we'll return True, otherwise False.
        return any(s.prereleases for s in self._specs)

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    def __repr__(self) -> str:
        """A representation of the specifier set that shows all internal state.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> SpecifierSet('>=1.0.0,!=2.0.0')
        <SpecifierSet('!=2.0.0,>=1.0.0')>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=False)>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=True)>
        """
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f"<SpecifierSet({str(self)!r}{pre})>"

    def __str__(self) -> str:
        """A string representation of the specifier set that can be round-tripped.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
        '!=1.0.1,>=1.0.0'
        >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
        '!=1.0.1,>=1.0.0'
        """
        return ",".join(sorted(str(s) for s in self._specs))

    def __hash__(self) -> int:
        return hash(self._specs)

    def __and__(self, other: Union["SpecifierSet", str]) -> "SpecifierSet":
        """Return a SpecifierSet which is a combination of the two sets.

        :param other: The other object to combine with.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        """
        if isinstance(other, str):
            other = SpecifierSet(other)
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        specifier = SpecifierSet()
        specifier._specs = frozenset(self._specs | other._specs)

        if self._prereleases is None and other._prereleases is not None:
            specifier._prereleases = other._prereleases
        elif self._prereleases is not None and other._prereleases is None:
            specifier._prereleases = self._prereleases
        elif self._prereleases == other._prereleases:
            specifier._prereleases = self._prereleases
        else:
            raise ValueError(
                "Cannot combine SpecifierSets with True and False prerelease "
                "overrides."
            )

        return specifier

    def __eq__(self, other: object) -> bool:
        """Whether or not the two SpecifierSet-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
        ...  SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
        False
        """
        if isinstance(other, (str, Specifier)):
            other = SpecifierSet(str(other))
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        return self._specs == other._specs

    def __len__(self) -> int:
        """Returns the number of specifiers in this specifier set."""
        return len(self._specs)

    def __iter__(self) -> Iterator[Specifier]:
        """
        Returns an iterator over all the underlying :class:`Specifier` instances
        in this specifier set.

        >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
        [<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]
        """
        return iter(self._specs)

    def __contains__(self, item: UnparsedVersion) -> bool:
        """Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
        True
        """
        return self.contains(item)

    def contains(
        self,
        item: UnparsedVersion,
        prereleases: Optional[bool] = None,
        installed: Optional[bool] = None,
    ) -> bool:
        """Return whether or not the item is contained in this SpecifierSet.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this SpecifierSet. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
        True
        """
        # Ensure that our item is a Version instance.
        if not isinstance(item, Version):
            item = Version(item)

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # We can determine if we're going to allow pre-releases by looking to
        # see if any of the underlying items supports them. If none of them do
        # and this item is a pre-release then we do not allow it and we can
        # short circuit that here.
        # Note: This means that 1.0.dev1 would not be contained in something
        #       like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
        if not prereleases and item.is_prerelease:
            return False

        if installed and item.is_prerelease:
            item = Version(item.base_version)

        # We simply dispatch to the underlying specs here to make sure that the
        # given version is contained within all of them.
        # Note: This use of all() here means that an empty set of specifiers
        #       will always return True, this is an explicit design decision.
        return all(s.contains(item, prereleases=prereleases) for s in self._specs)

    def filter(
        self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
    ) -> Iterator[UnparsedVersionVar]:
        """Filter items in the given iterable, that match the specifiers in this set.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(SpecifierSet(...).contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
        ['1.3', <Version('1.4')>]
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
        []
        >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']

        An "empty" SpecifierSet will filter items based on the presence of prerelease
        versions in the set.

        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet("").filter(["1.5a1"]))
        ['1.5a1']
        >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        """
        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # If we have any specifiers, then we want to wrap our iterable in the
        # filter method for each one, this will act as a logical AND amongst
        # each specifier.
        if self._specs:
            for spec in self._specs:
                iterable = spec.filter(iterable, prereleases=bool(prereleases))
            return iter(iterable)
        # If we do not have any specifiers, then we need to have a rough filter
        # which will filter out any pre-releases, unless there are no final
        # releases.
        else:
            filtered: List[UnparsedVersionVar] = []
            found_prereleases: List[UnparsedVersionVar] = []

            for item in iterable:
                parsed_version = _coerce_version(item)

                # Store any item which is a pre-release for later unless we've
                # already found a final version or we are accepting prereleases
                if parsed_version.is_prerelease and not prereleases:
                    if not filtered:
                        found_prereleases.append(item)
                else:
                    filtered.append(item)

            # If we've found no items except for pre-releases, then we'll go
            # ahead and use the pre-releases
            if not filtered and found_prereleases and prereleases is None:
                return iter(found_prereleases)

            return iter(filtered)
python3.12/site-packages/pkg_resources/_vendor/packaging/_structures.py000064400000002627151732701000022303 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.


class InfinityType:
    def __repr__(self) -> str:
        return "Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return False

    def __le__(self, other: object) -> bool:
        return False

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return True

    def __ge__(self, other: object) -> bool:
        return True

    def __neg__(self: object) -> "NegativeInfinityType":
        return NegativeInfinity


Infinity = InfinityType()


class NegativeInfinityType:
    def __repr__(self) -> str:
        return "-Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return True

    def __le__(self, other: object) -> bool:
        return True

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return False

    def __ge__(self, other: object) -> bool:
        return False

    def __neg__(self: object) -> InfinityType:
        return Infinity


NegativeInfinity = NegativeInfinityType()
python3.12/site-packages/pkg_resources/_vendor/packaging/__init__.py000064400000000765151732701000021461 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

__title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"

__version__ = "23.1"

__author__ = "Donald Stufft and individual contributors"
__email__ = "donald@stufft.io"

__license__ = "BSD-2-Clause or Apache-2.0"
__copyright__ = "2014-2019 %s" % __author__
python3.12/site-packages/pkg_resources/_vendor/packaging/py.typed000064400000000000151732701000021025 0ustar00python3.12/site-packages/pkg_resources/_vendor/packaging/utils.py000064400000010403151732701000021050 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import re
from typing import FrozenSet, NewType, Tuple, Union, cast

from .tags import Tag, parse_tag
from .version import InvalidVersion, Version

BuildTag = Union[Tuple[()], Tuple[int, str]]
NormalizedName = NewType("NormalizedName", str)


class InvalidWheelFilename(ValueError):
    """
    An invalid wheel filename was found, users should refer to PEP 427.
    """


class InvalidSdistFilename(ValueError):
    """
    An invalid sdist filename was found, users should refer to the packaging user guide.
    """


_canonicalize_regex = re.compile(r"[-_.]+")
# PEP 427: The build number must start with a digit.
_build_tag_regex = re.compile(r"(\d+)(.*)")


def canonicalize_name(name: str) -> NormalizedName:
    # This is taken from PEP 503.
    value = _canonicalize_regex.sub("-", name).lower()
    return cast(NormalizedName, value)


def canonicalize_version(
    version: Union[Version, str], *, strip_trailing_zero: bool = True
) -> str:
    """
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    """
    if isinstance(version, str):
        try:
            parsed = Version(version)
        except InvalidVersion:
            # Legacy versions cannot be normalized
            return version
    else:
        parsed = version

    parts = []

    # Epoch
    if parsed.epoch != 0:
        parts.append(f"{parsed.epoch}!")

    # Release segment
    release_segment = ".".join(str(x) for x in parsed.release)
    if strip_trailing_zero:
        # NB: This strips trailing '.0's to normalize
        release_segment = re.sub(r"(\.0)+$", "", release_segment)
    parts.append(release_segment)

    # Pre-release
    if parsed.pre is not None:
        parts.append("".join(str(x) for x in parsed.pre))

    # Post-release
    if parsed.post is not None:
        parts.append(f".post{parsed.post}")

    # Development release
    if parsed.dev is not None:
        parts.append(f".dev{parsed.dev}")

    # Local version segment
    if parsed.local is not None:
        parts.append(f"+{parsed.local}")

    return "".join(parts)


def parse_wheel_filename(
    filename: str,
) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
    if not filename.endswith(".whl"):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (extension must be '.whl'): {filename}"
        )

    filename = filename[:-4]
    dashes = filename.count("-")
    if dashes not in (4, 5):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (wrong number of parts): {filename}"
        )

    parts = filename.split("-", dashes - 2)
    name_part = parts[0]
    # See PEP 427 for the rules on escaping the project name
    if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None:
        raise InvalidWheelFilename(f"Invalid project name: {filename}")
    name = canonicalize_name(name_part)
    version = Version(parts[1])
    if dashes == 5:
        build_part = parts[2]
        build_match = _build_tag_regex.match(build_part)
        if build_match is None:
            raise InvalidWheelFilename(
                f"Invalid build number: {build_part} in '{filename}'"
            )
        build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
    else:
        build = ()
    tags = parse_tag(parts[-1])
    return (name, version, build, tags)


def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
    if filename.endswith(".tar.gz"):
        file_stem = filename[: -len(".tar.gz")]
    elif filename.endswith(".zip"):
        file_stem = filename[: -len(".zip")]
    else:
        raise InvalidSdistFilename(
            f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):"
            f" {filename}"
        )

    # We are requiring a PEP 440 version, which cannot contain dashes,
    # so we split on the last dash.
    name_part, sep, version_part = file_stem.rpartition("-")
    if not sep:
        raise InvalidSdistFilename(f"Invalid sdist filename: {filename}")

    name = canonicalize_name(name_part)
    version = Version(version_part)
    return (name, version)
python3.12/site-packages/pkg_resources/_vendor/jaraco/__pycache__/__init__.cpython-312.pyc000064400000000377151732701000025334 0ustar00�

��_i���y)N�r���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/jaraco/__init__.py�<module>rs�rpython3.12/site-packages/pkg_resources/_vendor/jaraco/__pycache__/functools.cpython-312.pyc000064400000050166151732701000025612 0ustar00�

��_i�:��:�ddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZede
def��Z
d�Zd�Zd�Zej"�fd	e
d
e
e
ge
fde
fd�Zd
�Zd�Zd�Zd�Zd�ZGd�d�Zd�Zd�ddfd�Zd�Zd�Zd�Zd�Zd�Zddd�d�Z y)�N)�Callable�TypeVar�	CallableT.)�boundc�4�d�}tj||�S)a;
    Compose any number of unary functions into a single unary function.

    >>> import textwrap
    >>> expected = str.strip(textwrap.dedent(compose.__doc__))
    >>> strip_and_dedent = compose(str.strip, textwrap.dedent)
    >>> strip_and_dedent(compose.__doc__) == expected
    True

    Compose also allows the innermost function to take arbitrary arguments.

    >>> round_three = lambda x: round(x, ndigits=3)
    >>> f = compose(round_three, int.__truediv__)
    >>> [f(3*x, x+1) for x in range(1,10)]
    [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]
    c������fd�S)Nc� ����|i|���S�N�)�args�kwargs�f1�f2s  ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/jaraco/functools.py�<lambda>z.compose.<locals>.compose_two.<locals>.<lambda>$s���r�"�d�*=�f�*=�'>�r)rrs``r�compose_twozcompose.<locals>.compose_two#s	���>�>r)�	functools�reduce)�funcsrs  r�composers��$?����K��/�/rc��������fd�}|S)z�
    Return a function that will call a named method on the
    target object with optional positional and keyword
    arguments.

    >>> lower = method_caller('lower')
    >>> lower('MyString')
    'mystring'
    c�,��t|��}|�i���Sr
)�getattr)�target�funcrr
�method_names  ���r�call_methodz"method_caller.<locals>.call_method4s����v�{�+���T�$�V�$�$rr)rrr
rs``` r�
method_callerr)s���%��rc�Z���tj����fd����fd��_�S)ad
    Decorate func so it's only ever called the first time.

    This decorator can ensure that an expensive or non-idempotent function
    will not be expensive on subsequent calls and is idempotent.

    >>> add_three = once(lambda a: a+3)
    >>> add_three(3)
    6
    >>> add_three(9)
    6
    >>> add_three('12')
    6

    To reset the stored value, simply clear the property ``saved_result``.

    >>> del add_three.saved_result
    >>> add_three(9)
    12
    >>> add_three(8)
    12

    Or invoke 'reset()' on it.

    >>> add_three.reset()
    >>> add_three(-3)
    0
    >>> add_three(0)
    0
    c�N��t�d�s
�|i|���_�jS�N�saved_result)�hasattrr#)rr
r�wrappers  ��rr%zonce.<locals>.wrapper[s+����w��/�#'��#8��#8�G� ��#�#�#rc�8��t��jd�Sr")�vars�__delitem__)r%s�rrzonce.<locals>.<lambda>as���D��M�5�5�n�Er)r�wraps�reset�rr%s`@r�oncer,;s0���@�_�_�T��$��$�
F�G�M��Nr�method�
cache_wrapper�returnc�t���dtdtdtdtf��fd�}d�|_t���xs|S)aV
    Wrap lru_cache to support storing the cache data in the object instances.

    Abstracts the common paradigm where the method explicitly saves an
    underscore-prefixed protected property on first call and returns that
    subsequently.

    >>> class MyClass:
    ...     calls = 0
    ...
    ...     @method_cache
    ...     def method(self, value):
    ...         self.calls += 1
    ...         return value

    >>> a = MyClass()
    >>> a.method(3)
    3
    >>> for x in range(75):
    ...     res = a.method(x)
    >>> a.calls
    75

    Note that the apparent behavior will be exactly like that of lru_cache
    except that the cache is stored on each instance, so values in one
    instance will not flush values from another, and when an instance is
    deleted, so are the cached values for that instance.

    >>> b = MyClass()
    >>> for x in range(35):
    ...     res = b.method(x)
    >>> b.calls
    35
    >>> a.method(0)
    0
    >>> a.calls
    75

    Note that if method had been decorated with ``functools.lru_cache()``,
    a.calls would have been 76 (due to the cached value of 0 having been
    flushed by the 'b' instance).

    Clear the cache with ``.cache_clear()``

    >>> a.method.cache_clear()

    Same for a method that hasn't yet been called.

    >>> c = MyClass()
    >>> c.method.cache_clear()

    Another cache wrapper may be supplied:

    >>> cache = functools.lru_cache(maxsize=2)
    >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
    >>> a = MyClass()
    >>> a.method2()
    3

    Caution - do not subsequently wrap the method with another decorator, such
    as ``@property``, which changes the semantics of the function.

    See also
    http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
    for another implementation and additional justification.
    �selfrr
r/c�~��tj�|�}�|�}t|�j|�||i|��Sr
)�types�
MethodType�setattr�__name__)r1rr
�bound_method�
cached_methodr.r-s     ��rr%zmethod_cache.<locals>.wrapper�sD���"'�"2�"2��D�#
��&�l�3�
���f�o�o�}�5��d�-�f�-�-rc��yr
rrrrrzmethod_cache.<locals>.<lambda>�s��$r)�object�cache_clear�_special_method_cache)r-r.r%s`` r�method_cacher=esE���R.�f�.�V�.�v�.�&�.�'�G��	�f�m�4�?��rc�J�����j}d}||vryd|z����fd�}|S)a:
    Because Python treats special methods differently, it's not
    possible to use instance attributes to implement the cached
    methods.

    Instead, install the wrapper method under a different name
    and return a simple proxy to that wrapper.

    https://github.com/jaraco/jaraco.functools/issues/5
    )�__getattr__�__getitem__N�__cachedc����t|�vr,tj�|�}�|�}t|�|�nt	|��}||i|��Sr
)r'r3r4r5r)r1rr
r�cacher.r-�wrapper_names     ���r�proxyz$_special_method_cache.<locals>.proxy�sS����t�D�z�)��$�$�V�T�2�E�!�%�(�E��D�,��.��D�,�/�E��d�%�f�%�%r)r6)r-r.�name�
special_namesrErDs``   @rr<r<�s4����?�?�D�0�M��=� ����$�L�&��Lrc����fd�}|S)ab
    Decorate a function with a transform function that is
    invoked on results returned from the decorated function.

    >>> @apply(reversed)
    ... def get_numbers(start):
    ...     "doc for get_numbers"
    ...     return range(start, start+3)
    >>> list(get_numbers(4))
    [6, 5, 4]
    >>> get_numbers.__doc__
    'doc for get_numbers'
    c�N��tj|�t�|��Sr
)rr)r)r�	transforms �r�wrapzapply.<locals>.wrap�s ���$�y���t�$�W�Y��%=�>�>rr)rJrKs` r�applyrL�s���?��Krc����fd�}|S)a@
    Decorate a function with an action function that is
    invoked on the results returned from the decorated
    function (for its side-effect), then return the original
    result.

    >>> @result_invoke(print)
    ... def add_two(a, b):
    ...     return a + b
    >>> x = add_two(2, 3)
    5
    >>> x
    5
    c�F���tj����fd��}|S)Nc�(���|i|��}�|�|Sr
r)rr
�result�actionrs   ��rr%z,result_invoke.<locals>.wrap.<locals>.wrappers����4�*�6�*�F��6�N��Mr�rr))rr%rQs` �rrKzresult_invoke.<locals>.wraps%���	����	�	�
�	�
�rr)rQrKs` r�
result_invokerS�s��� ��Krc��||i|��|S)a�
    Call a function for its side effect after initialization.

    The benefit of using the decorator instead of simply invoking a function
    after defining it is that it makes explicit the author's intent for the
    function to be called immediately. Whereas if one simply calls the
    function immediately, it's less obvious if that was intentional or
    incidental. It also avoids repeating the name - the two actions, defining
    the function and calling it immediately are modeled separately, but linked
    by the decorator construct.

    The benefit of having a function construct (opposed to just invoking some
    behavior inline) is to serve as a scope in which the behavior occurs. It
    avoids polluting the global namespace with local variables, provides an
    anchor on which to attach documentation (docstring), keeps the behavior
    logically separated (instead of conceptually separated or not separated at
    all), and provides potential to re-use the behavior for testing or other
    purposes.

    This function is named as a pithy way to communicate, "call this function
    primarily for its side effect", or "while defining this function, also
    take it aside and call it". It exists because there's no Python construct
    for "define and call" (nor should there be, as decorators serve this need
    just fine). The behavior happens immediately and synchronously.

    >>> @invoke
    ... def func(): print("called")
    called
    >>> func()
    called

    Use functools.partial to pass parameters to the initial call

    >>> @functools.partial(invoke, name='bingo')
    ... def func(name): print("called with", name)
    called with bingo
    r)�frr
s   r�invokerVs��L�t��v���Hrc�L�tjdt�t|i|��S)z%
    Deprecated name for invoke.
    z$call_aside is deprecated, use invoke)�warnings�warn�DeprecationWarningrV)rr
s  r�
call_asider[8s$��
�M�M�8�:L�M��4�"�6�"�"rc�@�eZdZdZed�fd�Zd�Zd�Zd�Zd	d�Z	y)
�	Throttlerz3
    Rate-limit a function (or other callable)
    �Infc�x�t|t�r|j}||_||_|j	�yr
)�
isinstancer]r�max_rater*)r1rras   r�__init__zThrottler.__init__Es,���d�I�&��9�9�D���	� ��
��
�
�rc��d|_y)Nr)�last_called)r1s rr*zThrottler.resetLs
����rc�F�|j�|j|i|��Sr
)�_waitr)r1rr
s   r�__call__zThrottler.__call__Os!���
�
���t�y�y�$�)�&�)�)rc���tj�|jz
}d|jz|z
}tjt	d|��tj�|_y)z1ensure at least 1/max_rate seconds from last call�rN)�timerdra�sleep�max)r1�elapsed�	must_waits   rrfzThrottler._waitSsL���)�)�+�� 0� 0�0����
�
�%��/�	��
�
�3�q�)�$�%��9�9�;��rNc�j�t|jtj|j|��Sr
)�first_invokerfr�partialr)r1�obj�types   r�__get__zThrottler.__get__Zs$���D�J�J�	�(9�(9�$�)�)�S�(I�J�Jrr
)
r6�
__module__�__qualname__�__doc__�floatrbr*rgrfrtrrrr]r]@s*���',�E�l���*�'�Krr]c������fd�}|S)z�
    Return a function that when invoked will invoke func1 without
    any parameters (for its side-effect) and then invoke func2
    with whatever parameters were passed, returning its result.
    c�"�����|i|��Sr
r)rr
�func1�func2s  ��rr%zfirst_invoke.<locals>.wrapperes���
���d�%�f�%�%rr)r{r|r%s`` rrprp^s���&��Nrc��yr
rrrrrrls��Trrc��|td�k(rtj�n
t|�}|D]}	|�cS|�S#|$r
|�Y�#wxYw)z�
    Given a callable func, trap the indicated exceptions
    for up to 'retries' times, invoking cleanup on the
    exception. On the final attempt, allow any exceptions
    to propagate.
    �inf)rx�	itertools�count�range)r�cleanup�retries�trap�attempts�attempts      r�
retry_callr�lsV��%,�u�U�|�$;�y��� ��w��H���	��6�M���6�M���	��I�	�s�A�A�Ac������fd�}|S)a7
    Decorator wrapper for retry_call. Accepts arguments to retry_call
    except func and then returns a decorator for the decorated function.

    Ex:

    >>> @retry(retries=3)
    ... def my_func(a, b):
    ...     "this is my funk"
    ...     print(a, b)
    >>> my_func.__doc__
    'this is my funk'
    c�H���tj�����fd��}|S)Nc�T��tj�g|��i|��}t|g���i���Sr
)rrqr�)�f_args�f_kwargsrr�r_args�r_kwargss   ���rr%z(retry.<locals>.decorate.<locals>.wrapper�s2����%�%�d�@�V�@�x�@�E��e�9�f�9��9�9rrR)rr%r�r�s` ��r�decoratezretry.<locals>.decorate�s%���	����	�	:�
�	:��rr)r�r�r�s`` r�retryr�}s�����Orc��tjtt�}t	t
j||�}tj|�|�S)z�
    Convert a generator into a function that prints all yielded elements

    >>> @print_yielded
    ... def x():
    ...     yield 3; yield None
    >>> x()
    3
    None
    )rrq�map�printr�more_itertools�consumer))r�	print_all�
print_resultss   r�
print_yieldedr��s@���!�!�#�u�-�I��N�2�2�I�t�D�M� �9�?�?�4� ��/�/rc�B��tj���fd��}|S)z�
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    c�"��|��|g|��i|��Syr
r)�paramrr
rs   �rr%zpass_none.<locals>.wrapper�s#�������/��/��/�/�rrRr+s` r�	pass_noner��s'����_�_�T��0��0��Nrc���tj|�}|jj�}|D�cic]
}||vs�|||��}}t	j
|fi|��Scc}w)a�
    Assign parameters from namespace where func solicits.

    >>> def func(x, y=3):
    ...     print(x, y)
    >>> assigned = assign_params(func, dict(x=2, z=4))
    >>> assigned()
    2 3

    The usual errors are raised if a function doesn't receive
    its required parameters:

    >>> assigned = assign_params(func, dict(y=3, z=4))
    >>> assigned()
    Traceback (most recent call last):
    TypeError: func() ...argument...

    It even works on methods:

    >>> class Handler:
    ...     def meth(self, arg):
    ...         print(arg)
    >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))()
    crystal
    )�inspect�	signature�
parameters�keysrrq)r�	namespace�sig�params�k�call_nss      r�
assign_paramsr��sd��4�
�
�D�
!�C�
�^�^�
 �
 �
"�F�(.�A��1�!�y�.�q�)�A�,���G�A����T�-�W�-�-��Bs
�	A�Ac�r���tjdd��tj����fd��}|S)a&
    Wrap a method such that when it is called, the args and kwargs are
    saved on the method.

    >>> class MyClass:
    ...     @save_method_args
    ...     def method(self, a, b):
    ...         print(a, b)
    >>> my_ob = MyClass()
    >>> my_ob.method(1, 2)
    1 2
    >>> my_ob._saved_method.args
    (1, 2)
    >>> my_ob._saved_method.kwargs
    {}
    >>> my_ob.method(a=3, b='foo')
    3 foo
    >>> my_ob._saved_method.args
    ()
    >>> my_ob._saved_method.kwargs == dict(a=3, b='foo')
    True

    The arguments are stored on the instance, allowing for
    different instance to save different args.

    >>> your_ob = MyClass()
    >>> your_ob.method({str('x'): 3}, b=[4])
    {'x': 3} [4]
    >>> your_ob._saved_method.args
    ({'x': 3},)
    >>> my_ob._saved_method.args
    ()
    �args_and_kwargszargs kwargsc�f��d�jz}�||�}t|||��|g|��i|��S)N�_saved_)r6r5)r1rr
�	attr_name�attrr�r-s     ��rr%z!save_method_args.<locals>.wrapper�s>�������/�	��t�V�,����i��&��d�,�T�,�V�,�,r)�collections�
namedtuplerr))r-r%r�s` @r�save_method_argsr��s;���D"�,�,�->�
�N�O��_�_�V��-��-��Nr)�replace�usec��������fd�}|S)a-
    Replace the indicated exceptions, if raised, with the indicated
    literal replacement or evaluated expression (if present).

    >>> safe_int = except_(ValueError)(int)
    >>> safe_int('five')
    >>> safe_int('5')
    5

    Specify a literal replacement with ``replace``.

    >>> safe_int_r = except_(ValueError, replace=0)(int)
    >>> safe_int_r('five')
    0

    Provide an expression to ``use`` to pass through particular parameters.

    >>> safe_int_pt = except_(ValueError, use='args[0]')(int)
    >>> safe_int_pt('five')
    'five'

    c�J���tj������fd��}|S)Nc�j��	�|i|��S#�$r"	t��cYS#t$r�cYcYSwxYwwxYwr
)�eval�	TypeError)rr
�
exceptionsrr�r�s  ����rr%z*except_.<locals>.decorate.<locals>.wrapper sJ���
#��T�,�V�,�,���
#�#���9�$�� �#�"�N�#��
#�s ��2�
�2�.�2�.�2rR)rr%r�r�r�s` ���rr�zexcept_.<locals>.decorates%���	����	�	#�
�	#��rr)r�r�r�r�s``` r�except_r�s���0��Or)!rrjr�r�r3r�rX�#pkg_resources.extern.more_itertools�
pkg_resources�typingrrr:rrrr,�	lru_cacher=r<rLrSrVr[r]rpr�r�r�r�r�r�r�rrr�<module>r�s����������*�$�
�K�x��V��'<�=�	�0�0�$'�\	�	����	W��W��	��Y���W�
�W�t�<�*�8'
�T#�K�K�<�*�1�2��"�4
0� �$.�@+�\"&�4�%rpython3.12/site-packages/pkg_resources/_vendor/jaraco/__pycache__/context.cpython-312.pyc000064400000025632151732701000025262 0ustar00�

��_i$���ddlZddlZddlZddlZddlZddlZddlZddlZejd��Z	ejdde	fd��Z
d�Zejejfd��Z
ejdde
fd��Zejd��ZGd	�d
�ZGd�dej"ej$�ZGd
�dej$�Zy)�Nc#��K�tj�}tj|�	|��tj|�y#tj|�wxYw�w)z�
    >>> tmp_path = getfixture('tmp_path')
    >>> with pushd(tmp_path):
    ...     assert os.getcwd() == os.fspath(tmp_path)
    >>> assert os.getcwd() != os.fspath(tmp_path)
    N)�os�getcwd�chdir)�dir�origs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/jaraco/context.py�pushdr
s>�����9�9�;�D��H�H�S�M���	�
�����������s�*A!�A�A!�A�A!c
#�K�|�?tjj|�jdd�jdd�}|�&t	j
tjd��}ntjdt�|djdit����	d	}d
}dj||f�}||jddt|�it����||�5|��ddd�|d
jdit����y#1swY�*xYw#|d
jdit����wxYw�w)z�
    Get a tarball, extract it, change to that directory, yield, then
    clean up.
    `runner` is the function to invoke commands.
    `pushd` is a context manager for changing the directory.
    Nz.tar.gz�z.tgzT)�shellzrunner parameter is deprecatedzmkdir {target_dir}zwget {url} -O -z7tar x{compression} --strip-components=1 -C {target_dir}z | �compressionzrm -Rf {target_dir}�)r�path�basename�replace�	functools�partial�
subprocess�
check_call�warnings�warn�DeprecationWarning�format�vars�join�infer_compression)�url�
target_dir�runnerr
�getter�extract�cmds       r	�tarball_contextr$s%�������W�W�%�%�c�*�2�2�9�b�A�I�I�&�RT�U�
�
�~��"�"�:�#8�#8��E���
�
�6�8J�K�
�&��&�&�0���0�1�7�"��K���j�j�&�'�*�+���z�s�z�z�G�&7��&<�G���G�H�
�:�
����	�+�$�+�+�5�d�f�5�6��
��	�+�$�+�+�5�d�f�5�6�s7�B$E�'A
D+�1D�6D+�>!E�D(�$D+�+"E
�
Ec�L�|dd}tddd��}|j|d�S)a
    Given a URL or filename, infer the compression code for tar.

    >>> infer_compression('http://foo/bar.tar.gz')
    'z'
    >>> infer_compression('http://foo/bar.tgz')
    'z'
    >>> infer_compression('file.bz')
    'j'
    >>> infer_compression('file.xz')
    'J'
    ���N�z�j�J)�gz�bz�xz)�dict�get)r�compression_indicator�mappings   r	rr:s0�� ���H���c�c�c�*�G��;�;�,�c�2�2�c#�hK�tj�}	|��||�y#||�wxYw�w)aN
    Create a temporary directory context. Pass a custom remover
    to override the removal behavior.

    >>> import pathlib
    >>> with temp_dir() as the_dir:
    ...     assert os.path.isdir(the_dir)
    ...     _ = pathlib.Path(the_dir).joinpath('somefile').write_text('contents')
    >>> assert not os.path.exists(the_dir)
    N)�tempfile�mkdtemp)�remover�temp_dirs  r	r6r6Ns0�������!�H�����������s�2�%�	2�
/�2Tc#�K�d|vrdnd}|�5}|d||g}|r|jd|g�ttjjd�}|r|nd}tj||��|��ddd�y#1swYyxYw�w)z�
    Check out the repo indicated by url.

    If dest_ctx is supplied, it should be a context manager
    to yield the target directory for the check out.
    �git�hg�clonez--branch�wN)�stdout)�extend�openrr�devnullrr)	r�branch�quiet�dest_ctx�exe�repo_dirr#r?r<s	         r	�repo_contextrEasy�����C�<�%�T�C�	��x��G�S�(�+����J�J�
�F�+�,��r�w�w����,��!��t�����c�&�1���
���s�B�A!A<�3	B�<B�Bc#�K�d��y�w)z�
    A null context suitable to stand in for a meaningful context.

    >>> with null() as value:
    ...     assert value is None
    Nrrr1r	�nullrGts����
�s�c�t�eZdZdZdZeffd�Zd�Zed��Z	ed��Z
ed��Zd�Zd	�Z
ed
�d�Zd�Zy
)�
ExceptionTrapa�
    A context manager that will catch certain exceptions and provide an
    indication they occurred.

    >>> with ExceptionTrap() as trap:
    ...     raise Exception()
    >>> bool(trap)
    True

    >>> with ExceptionTrap() as trap:
    ...     pass
    >>> bool(trap)
    False

    >>> with ExceptionTrap(ValueError) as trap:
    ...     raise ValueError("1 + 1 is not 3")
    >>> bool(trap)
    True
    >>> trap.value
    ValueError('1 + 1 is not 3')
    >>> trap.tb
    <traceback object at ...>

    >>> with ExceptionTrap(ValueError) as trap:
    ...     raise Exception()
    Traceback (most recent call last):
    ...
    Exception

    >>> bool(trap)
    False
    )NNNc��||_y�N)�
exceptions)�selfrLs  r	�__init__zExceptionTrap.__init__�s	��$��r1c��|SrKr�rMs r	�	__enter__zExceptionTrap.__enter__�����r1c� �|jdS�Nr��exc_inforPs r	�typezExceptionTrap.type�����}�}�Q��r1c� �|jdS)N�rUrPs r	�valuezExceptionTrap.value�rXr1c� �|jdS)N�rUrPs r	�tbzExceptionTrap.tb�rXr1c�V�|d}|xrt||j�}|r||_|SrT)�
issubclassrLrV)rMrVrW�matchess    r	�__exit__zExceptionTrap.__exit__�s/����{���<�:�d�D�O�O�<���$�D�M��r1c�,�t|j�SrK)�boolrWrPs r	�__bool__zExceptionTrap.__bool__�s���D�I�I��r1��_testc�J����tj�����fd��}|S)a�
        Wrap func and replace the result with the truth
        value of the trap (True if an exception occurred).

        First, give the decorator an alias to support Python 3.8
        Syntax.

        >>> raises = ExceptionTrap(ValueError).raises

        Now decorate a function that always fails.

        >>> @raises
        ... def fail():
        ...     raise ValueError('failed')
        >>> fail()
        True
        c�x��t�j�5}�|i|��ddd���S#1swY�xYwrK)rIrL)�args�kwargs�traprg�funcrMs   ���r	�wrapperz%ExceptionTrap.raises.<locals>.wrapper�s6����t���/�4��d�%�f�%�0���;��0�/�s�	0�9)r�wraps)rMrmrgrns``` r	�raiseszExceptionTrap.raises�s'���&
����	�	�
�	�
�r1c�D�|j|tj��S)a�
        Wrap func and replace the result with the truth
        value of the trap (True if no exception).

        First, give the decorator an alias to support Python 3.8
        Syntax.

        >>> passes = ExceptionTrap(ValueError).passes

        Now decorate a function that always fails.

        >>> @passes
        ... def fail():
        ...     raise ValueError('failed')

        >>> fail()
        False
        rf)rp�operator�not_)rMrms  r	�passeszExceptionTrap.passes�s��&�{�{�4�x�}�}�{�5�5r1N)�__name__�
__module__�__qualname__�__doc__rV�	ExceptionrNrQ�propertyrWr[r^rbrerdrprtrr1r	rIrIss���B �H�#,�,�%��� �� �� �� �� �� ���%)��66r1rIc��eZdZdZy)�suppressz�
    A version of contextlib.suppress with decorator support.

    >>> @suppress(KeyError)
    ... def key_error():
    ...     {}['']
    >>> key_error()
    N)rurvrwrxrr1r	r|r|�s��r1r|c�(�eZdZdZ		dd�Zd�Zd�Zy)�on_interrupta
    Replace a KeyboardInterrupt with SystemExit(1)

    >>> def do_interrupt():
    ...     raise KeyboardInterrupt()
    >>> on_interrupt('error')(do_interrupt)()
    Traceback (most recent call last):
    ...
    SystemExit: 1
    >>> on_interrupt('error', code=255)(do_interrupt)()
    Traceback (most recent call last):
    ...
    SystemExit: 255
    >>> on_interrupt('suppress')(do_interrupt)()
    >>> with __import__('pytest').raises(KeyboardInterrupt):
    ...     on_interrupt('ignore')(do_interrupt)()
    c� �||_||_yrK)�action�code)rMr�r�s   r	rNzon_interrupt.__init__s�������	r1c��|SrKrrPs r	rQzon_interrupt.__enter__rRr1c��|tus|jdk(ry|jdk(rt|j�|�|jdk(S)N�ignore�errorr|)�KeyboardInterruptr��
SystemExitr�)rM�exctype�excinst�exctbs    r	rbzon_interrupt.__exit__sE���+�+�t�{�{�h�/F��
�[�[�G�
#��T�Y�Y�'�W�4��{�{�j�(�(r1N)r�rZ)rurvrwrxrNrQrbrr1r	r~r~�s ���(����)r1r~)rr�
contextlibrr3�shutilrrr�contextmanagerr
r$r�rmtreer6rErGrIr|�ContextDecoratorr~rr1r	�<module>r�s���	�����
������
��
� ���$(��U�7��7�:3�(����]�]����$���!������$���
��
�n6�n6�b�z�"�"�J�$?�$?��%)�:�.�.�%)r1python3.12/site-packages/pkg_resources/_vendor/jaraco/text/__pycache__/__init__.cpython-312.pyc000064400000057670151732701000026330 0ustar00�

��_i�<����ddlZddlZddlZddlZ	ddlmZddlm	Z	m
Z
ddlmZd�Z
d�ZGd�de�Zee�Zej&d	��Zd
�Zd�Zd�Zd
�ZGd�de�Zd d�ZGd�de�Zej<Zd�Z Gd�de�Z!Gd�d�Z"d�Z#d�Z$d�Z%d�Z&ejNd��Z(e(jSe�d��Z*d�Z+d�Z,y#e$r	ddlmZY��wxYw)!�N)�files)�compose�method_cache)�
ExceptionTrapc������fd�S)zH
    Return a function that will perform a substitution on a string
    c�(��|j���S�N��replace)�s�new�olds ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/jaraco/text/__init__.py�<lambda>zsubstitution.<locals>.<lambda>s���Q�Y�Y�s�C�(��)rr
s``r�substitutionrs���)�(rc�n�tjt|�}tt	|��}t|�S)z�
    Take a sequence of pairs specifying substitutions, and create
    a function that performs those substitutions.

    >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo')
    'baz'
    )�	itertools�starmapr�reversed�tupler)�
substitutionss r�multi_substitutionrs2���%�%�l�M�B�M��U�=�1�2�M��M�"�"rc�h��eZdZdZd�Zd�Zd�Zd�Zd�Z�fd�Z	d�Z
e�fd	��Zd
�Z
dd�Z�xZS)
�
FoldedCasea
    A case insensitive string class; behaves just like str
    except compares equal when the only variation is case.

    >>> s = FoldedCase('hello world')

    >>> s == 'Hello World'
    True

    >>> 'Hello World' == s
    True

    >>> s != 'Hello World'
    False

    >>> s.index('O')
    4

    >>> s.split('O')
    ['hell', ' w', 'rld']

    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
    ['alpha', 'Beta', 'GAMMA']

    Sequence membership is straightforward.

    >>> "Hello World" in [s]
    True
    >>> s in ["Hello World"]
    True

    You may test for set inclusion, but candidate and elements
    must both be folded.

    >>> FoldedCase("Hello World") in {s}
    True
    >>> s in {FoldedCase("Hello World")}
    True

    String inclusion works as long as the FoldedCase object
    is on the right.

    >>> "hello" in FoldedCase("Hello World")
    True

    But not if the FoldedCase object is on the left:

    >>> FoldedCase('hello') in 'Hello World'
    False

    In that case, use ``in_``:

    >>> FoldedCase('hello').in_('Hello World')
    True

    >>> FoldedCase('hello') > FoldedCase('Hello')
    False
    c�D�|j�|j�kSr	��lower��self�others  r�__lt__zFoldedCase.__lt__a����z�z�|�e�k�k�m�+�+rc�D�|j�|j�kDSr	rr s  r�__gt__zFoldedCase.__gt__dr$rc�D�|j�|j�k(Sr	rr s  r�__eq__zFoldedCase.__eq__g����z�z�|�u�{�{�}�,�,rc�D�|j�|j�k7Sr	rr s  r�__ne__zFoldedCase.__ne__jr)rc�4�t|j��Sr	)�hashr�r!s r�__hash__zFoldedCase.__hash__ms���D�J�J�L�!�!rc�Z��t�|��j|j��Sr	)�superr�__contains__)r!r"�	__class__s  �rr2zFoldedCase.__contains__ps ����w�}��+�+�E�K�K�M�:�:rc��|t|�vS)zDoes self appear in other?)rr s  r�in_zFoldedCase.in_ss���z�%�(�(�(rc� ��t�|��Sr	)r1r)r!r3s �rrzFoldedCase.lowerxs����w�}��rc�\�|j�j|j��Sr	)r�index)r!�subs  rr8zFoldedCase.index|s���z�z�|�!�!�#�)�)�+�.�.rc��tjtj|�tj�}|j	||�Sr	)�re�compile�escape�I�split)r!�splitter�maxsplit�patterns    rr?zFoldedCase.splits0���*�*�R�Y�Y�x�0�"�$�$�7���}�}�T�8�,�,r)� r)�__name__�
__module__�__qualname__�__doc__r#r&r(r+r/r2r5rrr8r?�
__classcell__�r3s@rrr%sJ���9�v,�,�-�-�"�;�)�
����/�-rrc�$�|j�y)z�
    Return True if the supplied value is decodable (using the default
    encoding).

    >>> is_decodable(b'\xff')
    False
    >>> is_decodable(b'\x32')
    True
    N)�decode��values r�is_decodablerN�s
��
�L�L�Nrc�>�t|t�xrt|�S)z�
    Return True if the value appears to be binary (that is, it's a byte
    string and isn't decodable).

    >>> is_binary(b'\xff')
    True
    >>> is_binary('\xff')
    False
    )�
isinstance�bytesrNrLs r�	is_binaryrR�s���e�U�#�?�L��,?�(?�?rc�H�tj|�j�S)z�
    Trim something like a docstring to remove the whitespace that
    is common due to indentation and formatting.

    >>> trim("\n\tfoo = bar\n\t\tbar = baz\n")
    'foo = bar\n\tbar = baz'
    )�textwrap�dedent�strip)rs r�trimrW�s���?�?�1��#�#�%�%rc�V�|j�}d�|D�}dj|�S)a
    Wrap lines of text, retaining existing newlines as
    paragraph markers.

    >>> print(wrap(lorem_ipsum))
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
    aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum.
    <BLANKLINE>
    Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam
    varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus
    magna felis sollicitudin mauris. Integer in mauris eu nibh euismod
    gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis
    risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue,
    eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas
    fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla
    a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis,
    neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing
    sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque
    nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus
    quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis,
    molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
    c3�dK�|](}djtj|�����*y�w)�
N)�joinrT�wrap��.0�paras  r�	<genexpr>zwrap.<locals>.<genexpr>�s#����E�*�$�t�y�y����t�,�-�*�s�.0z

)�
splitlinesr[)r�
paragraphs�wrappeds   rr\r\�s(��8����J�E�*�E�G��;�;�w��rc�b�tjd|�}d�|D�}dj|�S)ad
    Given a multi-line string, return an unwrapped version.

    >>> wrapped = wrap(lorem_ipsum)
    >>> wrapped.count('\n')
    20
    >>> unwrapped = unwrap(wrapped)
    >>> unwrapped.count('\n')
    1
    >>> print(unwrapped)
    Lorem ipsum dolor sit amet, consectetur adipiscing ...
    Curabitur pretium tincidunt lacus. Nulla gravida orci ...

    z\n\n+c3�@K�|]}|jdd����y�w)rZrCNr
r]s  rr`zunwrap.<locals>.<genexpr>�s����>�:�4�t�|�|�D�#�&�:�s�rZ)r;r?r[)rrb�cleaneds   r�unwraprg�s-�����(�A�&�J�>�:�>�G��9�9�W��rc��eZdZdZd�Zd�Zy)�Splitterz�object that will split a string with the given arguments for each call

    >>> s = Splitter(',')
    >>> s('hello, world, this is your, master calling')
    ['hello', ' world', ' this is your', ' master calling']
    c��||_yr	)�args)r!rks  r�__init__zSplitter.__init__�s	����	rc�4�|j|j�Sr	)r?rk)r!rs  r�__call__zSplitter.__call__�s���q�w�w��	�	�"�"rN)rDrErFrGrlrnrrrriri�s����#rric��||zS)z)
    >>> indent('foo')
    '    foo'
    r)�string�prefixs  r�indentrr�s��
�F�?�rc���eZdZdZej
d�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Z�fd
�Zed��Zed��Z�xZS)�WordSeta
    Given an identifier, return the words that identifier represents,
    whether in camel case, underscore-separated, etc.

    >>> WordSet.parse("camelCase")
    ('camel', 'Case')

    >>> WordSet.parse("under_sep")
    ('under', 'sep')

    Acronyms should be retained

    >>> WordSet.parse("firstSNL")
    ('first', 'SNL')

    >>> WordSet.parse("you_and_I")
    ('you', 'and', 'I')

    >>> WordSet.parse("A simple test")
    ('A', 'simple', 'test')

    Multiple caps should not interfere with the first cap of another word.

    >>> WordSet.parse("myABCClass")
    ('my', 'ABC', 'Class')

    The result is a WordSet, so you can get the form you need.

    >>> WordSet.parse("myABCClass").underscore_separated()
    'my_ABC_Class'

    >>> WordSet.parse('a-command').camel_case()
    'ACommand'

    >>> WordSet.parse('someIdentifier').lowered().space_separated()
    'some identifier'

    Slices of the result should return another WordSet.

    >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated()
    'out_of_context'

    >>> WordSet.from_class_name(WordSet()).lowered().space_separated()
    'word set'

    >>> example = WordSet.parse('figured it out')
    >>> example.headless_camel_case()
    'figuredItOut'
    >>> example.dash_separated()
    'figured-it-out'

    z ([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))c�&�td�|D��S)Nc3�<K�|]}|j����y�wr	)�
capitalize�r^�words  rr`z&WordSet.capitalized.<locals>.<genexpr>5s����:�T�T�t���(�T����rtr.s r�capitalizedzWordSet.capitalized4s���:�T�:�:�:rc�&�td�|D��S)Nc3�<K�|]}|j����y�wr	rrxs  rr`z"WordSet.lowered.<locals>.<genexpr>8s����5���t�z�z�|��rzr{r.s r�loweredzWordSet.lowered7s���5��5�5�5rc�@�dj|j��S�N�)r[r|r.s r�
camel_casezWordSet.camel_case:s���w�w�t�'�'�)�*�*rc���t|�}t|�j�}tj|ft|�j
��}dj|�Sr�)�iter�nextrr�chainrtr�r[)r!�words�first�	new_wordss    r�headless_camel_casezWordSet.headless_camel_case=sK���T�
���U��!�!�#���O�O�U�H�g�e�n�.G�.G�.I�J�	��w�w�y�!�!rc�$�dj|�S)N�_�r[r.s r�underscore_separatedzWordSet.underscore_separatedC����x�x��~�rc�$�dj|�S)N�-r�r.s r�dash_separatedzWordSet.dash_separatedFr�rc�$�dj|�S)NrCr�r.s r�space_separatedzWordSet.space_separatedIr�rc�$�|r
|d|k(r|ddS|S)a
        Remove the item from the end of the set.

        >>> WordSet.parse('foo bar').trim_right('foo')
        ('foo', 'bar')
        >>> WordSet.parse('foo bar').trim_right('bar')
        ('foo',)
        >>> WordSet.parse('').trim_right('bar')
        ()
        ���Nr�r!�items  r�
trim_rightzWordSet.trim_rightLs"��!�T�"�X��%5�t�C�R�y�?�4�?rc�$�|r
|d|k(r|ddS|S)a
        Remove the item from the beginning of the set.

        >>> WordSet.parse('foo bar').trim_left('foo')
        ('bar',)
        >>> WordSet.parse('foo bar').trim_left('bar')
        ('foo', 'bar')
        >>> WordSet.parse('').trim_left('bar')
        ()
        r�Nrr�s  r�	trim_leftzWordSet.trim_leftYs!�� �D��G�t�O�t�A�B�x�=��=rc�B�|j|�j|�S)zK
        >>> WordSet.parse('foo bar').trim('foo')
        ('bar',)
        )r�r�r�s  rrWzWordSet.trimfs��
�~�~�d�#�.�.�t�4�4rc�d��tt|�|�}t|t�rt|�}|Sr	)r1rt�__getitem__rP�slice)r!r��resultr3s   �rr�zWordSet.__getitem__ms,����w��1�$�7���d�E�"��V�_�F��
rc�\�|jj|�}td�|D��S)Nc3�>K�|]}|jd����y�w)rN��group�r^�matchs  rr`z WordSet.parse.<locals>.<genexpr>vs����;�7�%�u�{�{�1�~�7�s�)�_pattern�finditerrt)�cls�
identifier�matchess   r�parsez
WordSet.parsess'���,�,�'�'�
�3���;�7�;�;�;rc�L�|j|jj�Sr	)r�r3rD)r��subjects  r�from_class_namezWordSet.from_class_namexs���y�y��*�*�3�3�4�4r)rDrErFrGr;r<r�r|rr�r�r�r�r�r�r�rWr��classmethodr�r�rHrIs@rrtrt�s|���3�j�r�z�z�<�=�H�;�6�+�"����@�>�5���<��<��5��5rrtc��tjdtj�}d�|j|�D�}dj	|�S)a�
    Remove HTML from the string `s`.

    >>> str(simple_html_strip(''))
    ''

    >>> print(simple_html_strip('A <bold>stormy</bold> day in paradise'))
    A stormy day in paradise

    >>> print(simple_html_strip('Somebody <!-- do not --> tell the truth.'))
    Somebody  tell the truth.

    >>> print(simple_html_strip('What about<br/>\nmultiple lines?'))
    What about
    multiple lines?
    z(<!--.*?-->)|(<[^>]*>)|([^<]+)c3�FK�|]}|jd�xsd���y�w)�r�Nr�r�s  rr`z$simple_html_strip.<locals>.<genexpr>�s#����I�/H�e�U�[�[��^�
!�r�
!�/H�s�!r�)r;r<�DOTALLr�r[)r�
html_stripper�textss   r�simple_html_stripr��s<��"�J�J�?����K�M�I�}�/E�/E�a�/H�I�E�
�7�7�5�>�rc��eZdZdZdZd�Zy)�SeparatedValuesa
    A string separated by a separator. Overrides __iter__ for getting
    the values.

    >>> list(SeparatedValues('a,b,c'))
    ['a', 'b', 'c']

    Whitespace is stripped and empty values are discarded.

    >>> list(SeparatedValues(' a,   b   , c,  '))
    ['a', 'b', 'c']
    �,c�^�|j|j�}tdd�|D��S)Nc3�<K�|]}|j����y�wr	)rV)r^�parts  rr`z+SeparatedValues.__iter__.<locals>.<genexpr>�s����<�e�d�T�Z�Z�\�e�rz)r?�	separator�filter)r!�partss  r�__iter__zSeparatedValues.__iter__�s'���
�
�4�>�>�*���d�<�e�<�=�=rN)rDrErFrGr�r�rrrr�r��s����I�>rr�c�<�eZdZdZd�Zed��Zd�Zed��Z	y)�Strippera&
    Given a series of lines, find the common prefix and strip it from them.

    >>> lines = [
    ...     'abcdefg\n',
    ...     'abc\n',
    ...     'abcde\n',
    ... ]
    >>> res = Stripper.strip_prefix(lines)
    >>> res.prefix
    'abc'
    >>> list(res.lines)
    ['defg\n', '\n', 'de\n']

    If no prefix is common, nothing should be stripped.

    >>> lines = [
    ...     'abcd\n',
    ...     '1234\n',
    ... ]
    >>> res = Stripper.strip_prefix(lines)
    >>> res.prefix = ''
    >>> list(res.lines)
    ['abcd\n', '1234\n']
    c�4�||_t||�|_yr	)rq�map�lines)r!rqr�s   rrlzStripper.__init__�s�������u�%��
rc��tj|�\}}tj|j|�}|||�Sr	)r�tee�	functools�reduce�
common_prefix)r�r��prefix_linesrqs    r�strip_prefixzStripper.strip_prefix�s:��'�m�m�E�2���e��!�!�#�"3�"3�\�B���6�5�!�!rc�`�|js|S|j|j�\}}}|Sr	)rq�	partition)r!�line�nullrq�rests     rrnzStripper.__call__�s,���{�{��K�!�^�^�D�K�K�8���f�d��rc��tt|�t|��}|d||d|k7r|dz}|d||d|k7r�|d|S)z8
        Return the common prefix of two lines.
        Nr�)�min�len)�s1�s2r8s   rr�zStripper.common_prefix�sW��
�C��G�S��W�%����%�j�B�v��J�&��Q�J�E���%�j�B�v��J�&��&�5�z�rN)
rDrErFrGrlr�r�rn�staticmethodr�rrrr�r��s9���4&��"��"�
����rr�c�0�|j|�\}}}|S)z�
    Remove the prefix from the text if it exists.

    >>> remove_prefix('underwhelming performance', 'underwhelming ')
    'performance'

    >>> remove_prefix('something special', 'sample')
    'something special'
    )�
rpartition)�textrqr�r�s    r�
remove_prefixr��s������0��D�&�$��Krc�0�|j|�\}}}|S)z�
    Remove the suffix from the text if it exists.

    >>> remove_suffix('name.git', '.git')
    'name'

    >>> remove_suffix('something special', 'sample')
    'something special'
    �r�)r��suffixr�r�s    r�
remove_suffixr��s������/��D�&�$��Krc�Z�gd�}dj|�}tj|d|�S)a	
    Replace alternate newlines with the canonical newline.

    >>> normalize_newlines('Lorem Ipsum\u2029')
    'Lorem Ipsum\n'
    >>> normalize_newlines('Lorem Ipsum\r\n')
    'Lorem Ipsum\n'
    >>> normalize_newlines('Lorem Ipsum\x85')
    'Lorem Ipsum\n'
    )z
�
rZ�…u
u
�|rZ)r[r;r9)r��newlinesrBs   r�normalize_newlinesr��s+��B�H��h�h�x� �G�
�6�6�'�4��&�&rc�.�|xr|jd�S)N�#)�
startswith)�strs r�	_nonblankr�s���*�s�~�~�c�*�*�*rc�\�tjjtt|��S)a�
    Yield valid lines of a string or iterable.

    >>> list(yield_lines(''))
    []
    >>> list(yield_lines(['foo', 'bar']))
    ['foo', 'bar']
    >>> list(yield_lines('foo\nbar'))
    ['foo', 'bar']
    >>> list(yield_lines('\nfoo\n#bar\nbaz #comment'))
    ['foo', 'baz #comment']
    >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n']))
    ['foo', 'bar', 'baz', 'bing']
    )rr��
from_iterabler��yield_lines)�iterables rr�r�s �� �?�?�(�(��[�(�)C�D�Drc�n�ttttj|j���Sr	)r�r�r�r�rVra)r�s rr�r�%s!���)�S����D�O�O�,=�>�?�?rc�*�|jd�dS)z�
    Drop comments.

    >>> drop_comment('foo # bar')
    'foo'

    A hash without a space may be in a URL.

    >>> drop_comment('http://example.com/foo#bar')
    'http://example.com/foo#bar'
    z #rr�)r�s r�drop_commentr�*s���>�>�$���"�"rc#��K�t|�}|D]I}|jd�r2	|ddj�t|�z}|jd�r�2|���Ky#t$rYywxYw�w)a_
    Join lines continued by a trailing backslash.

    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar \\', 'baz']))
    ['foobarbaz']

    Not sure why, but...
    The character preceeding the backslash is also elided.

    >>> list(join_continuation(['goo\\', 'dly']))
    ['godly']

    A terrible idea, but...
    If no line is available to continue, suppress the lines.

    >>> list(join_continuation(['foo', 'bar\\', 'baz\\']))
    ['foo']
    �\N���)r��endswithrVr��
StopIteration)r�r�s  r�join_continuationr�9so����.
��K�E����m�m�D�!�
��C�R�y���(�4��;�6���m�m�D�!�
�
�
��!�
��
�s.�"A-�A�A-�A-�	A*�&A-�)A*�*A-)z    )-r;rrTr��importlib.resourcesr�ImportError�(pkg_resources.extern.importlib_resources�%pkg_resources.extern.jaraco.functoolsrr�#pkg_resources.extern.jaraco.contextrrrr�r�UnicodeDecodeError�
_unicode_trap�passesrNrRrWr\rg�objectrirrrrtr�r�r�r�r�r�r�r�r��singledispatchr��registerr�r�r�rrr�<module>rs/��	����?�)�H�=�)�#�\-��\-�@�0�1�
����
��
�
@�&� �B�,#�v�#��~5�e�~5�D	�
�
���,>�c�>�*3�3�l��
'� +����E��E�$
���c��@��@�#���c�?�>�?�s�C�C%�$C%python3.12/site-packages/pkg_resources/_vendor/jaraco/text/__init__.py000064400000036246151732701000021763 0ustar00import re
import itertools
import textwrap
import functools

try:
    from importlib.resources import files  # type: ignore
except ImportError:  # pragma: nocover
    from pkg_resources.extern.importlib_resources import files  # type: ignore

from pkg_resources.extern.jaraco.functools import compose, method_cache
from pkg_resources.extern.jaraco.context import ExceptionTrap


def substitution(old, new):
    """
    Return a function that will perform a substitution on a string
    """
    return lambda s: s.replace(old, new)


def multi_substitution(*substitutions):
    """
    Take a sequence of pairs specifying substitutions, and create
    a function that performs those substitutions.

    >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo')
    'baz'
    """
    substitutions = itertools.starmap(substitution, substitutions)
    # compose function applies last function first, so reverse the
    #  substitutions to get the expected order.
    substitutions = reversed(tuple(substitutions))
    return compose(*substitutions)


class FoldedCase(str):
    """
    A case insensitive string class; behaves just like str
    except compares equal when the only variation is case.

    >>> s = FoldedCase('hello world')

    >>> s == 'Hello World'
    True

    >>> 'Hello World' == s
    True

    >>> s != 'Hello World'
    False

    >>> s.index('O')
    4

    >>> s.split('O')
    ['hell', ' w', 'rld']

    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
    ['alpha', 'Beta', 'GAMMA']

    Sequence membership is straightforward.

    >>> "Hello World" in [s]
    True
    >>> s in ["Hello World"]
    True

    You may test for set inclusion, but candidate and elements
    must both be folded.

    >>> FoldedCase("Hello World") in {s}
    True
    >>> s in {FoldedCase("Hello World")}
    True

    String inclusion works as long as the FoldedCase object
    is on the right.

    >>> "hello" in FoldedCase("Hello World")
    True

    But not if the FoldedCase object is on the left:

    >>> FoldedCase('hello') in 'Hello World'
    False

    In that case, use ``in_``:

    >>> FoldedCase('hello').in_('Hello World')
    True

    >>> FoldedCase('hello') > FoldedCase('Hello')
    False
    """

    def __lt__(self, other):
        return self.lower() < other.lower()

    def __gt__(self, other):
        return self.lower() > other.lower()

    def __eq__(self, other):
        return self.lower() == other.lower()

    def __ne__(self, other):
        return self.lower() != other.lower()

    def __hash__(self):
        return hash(self.lower())

    def __contains__(self, other):
        return super().lower().__contains__(other.lower())

    def in_(self, other):
        "Does self appear in other?"
        return self in FoldedCase(other)

    # cache lower since it's likely to be called frequently.
    @method_cache
    def lower(self):
        return super().lower()

    def index(self, sub):
        return self.lower().index(sub.lower())

    def split(self, splitter=' ', maxsplit=0):
        pattern = re.compile(re.escape(splitter), re.I)
        return pattern.split(self, maxsplit)


# Python 3.8 compatibility
_unicode_trap = ExceptionTrap(UnicodeDecodeError)


@_unicode_trap.passes
def is_decodable(value):
    r"""
    Return True if the supplied value is decodable (using the default
    encoding).

    >>> is_decodable(b'\xff')
    False
    >>> is_decodable(b'\x32')
    True
    """
    value.decode()


def is_binary(value):
    r"""
    Return True if the value appears to be binary (that is, it's a byte
    string and isn't decodable).

    >>> is_binary(b'\xff')
    True
    >>> is_binary('\xff')
    False
    """
    return isinstance(value, bytes) and not is_decodable(value)


def trim(s):
    r"""
    Trim something like a docstring to remove the whitespace that
    is common due to indentation and formatting.

    >>> trim("\n\tfoo = bar\n\t\tbar = baz\n")
    'foo = bar\n\tbar = baz'
    """
    return textwrap.dedent(s).strip()


def wrap(s):
    """
    Wrap lines of text, retaining existing newlines as
    paragraph markers.

    >>> print(wrap(lorem_ipsum))
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
    aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum.
    <BLANKLINE>
    Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam
    varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus
    magna felis sollicitudin mauris. Integer in mauris eu nibh euismod
    gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis
    risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue,
    eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas
    fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla
    a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis,
    neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing
    sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque
    nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus
    quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis,
    molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
    """
    paragraphs = s.splitlines()
    wrapped = ('\n'.join(textwrap.wrap(para)) for para in paragraphs)
    return '\n\n'.join(wrapped)


def unwrap(s):
    r"""
    Given a multi-line string, return an unwrapped version.

    >>> wrapped = wrap(lorem_ipsum)
    >>> wrapped.count('\n')
    20
    >>> unwrapped = unwrap(wrapped)
    >>> unwrapped.count('\n')
    1
    >>> print(unwrapped)
    Lorem ipsum dolor sit amet, consectetur adipiscing ...
    Curabitur pretium tincidunt lacus. Nulla gravida orci ...

    """
    paragraphs = re.split(r'\n\n+', s)
    cleaned = (para.replace('\n', ' ') for para in paragraphs)
    return '\n'.join(cleaned)




class Splitter(object):
    """object that will split a string with the given arguments for each call

    >>> s = Splitter(',')
    >>> s('hello, world, this is your, master calling')
    ['hello', ' world', ' this is your', ' master calling']
    """

    def __init__(self, *args):
        self.args = args

    def __call__(self, s):
        return s.split(*self.args)


def indent(string, prefix=' ' * 4):
    """
    >>> indent('foo')
    '    foo'
    """
    return prefix + string


class WordSet(tuple):
    """
    Given an identifier, return the words that identifier represents,
    whether in camel case, underscore-separated, etc.

    >>> WordSet.parse("camelCase")
    ('camel', 'Case')

    >>> WordSet.parse("under_sep")
    ('under', 'sep')

    Acronyms should be retained

    >>> WordSet.parse("firstSNL")
    ('first', 'SNL')

    >>> WordSet.parse("you_and_I")
    ('you', 'and', 'I')

    >>> WordSet.parse("A simple test")
    ('A', 'simple', 'test')

    Multiple caps should not interfere with the first cap of another word.

    >>> WordSet.parse("myABCClass")
    ('my', 'ABC', 'Class')

    The result is a WordSet, so you can get the form you need.

    >>> WordSet.parse("myABCClass").underscore_separated()
    'my_ABC_Class'

    >>> WordSet.parse('a-command').camel_case()
    'ACommand'

    >>> WordSet.parse('someIdentifier').lowered().space_separated()
    'some identifier'

    Slices of the result should return another WordSet.

    >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated()
    'out_of_context'

    >>> WordSet.from_class_name(WordSet()).lowered().space_separated()
    'word set'

    >>> example = WordSet.parse('figured it out')
    >>> example.headless_camel_case()
    'figuredItOut'
    >>> example.dash_separated()
    'figured-it-out'

    """

    _pattern = re.compile('([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))')

    def capitalized(self):
        return WordSet(word.capitalize() for word in self)

    def lowered(self):
        return WordSet(word.lower() for word in self)

    def camel_case(self):
        return ''.join(self.capitalized())

    def headless_camel_case(self):
        words = iter(self)
        first = next(words).lower()
        new_words = itertools.chain((first,), WordSet(words).camel_case())
        return ''.join(new_words)

    def underscore_separated(self):
        return '_'.join(self)

    def dash_separated(self):
        return '-'.join(self)

    def space_separated(self):
        return ' '.join(self)

    def trim_right(self, item):
        """
        Remove the item from the end of the set.

        >>> WordSet.parse('foo bar').trim_right('foo')
        ('foo', 'bar')
        >>> WordSet.parse('foo bar').trim_right('bar')
        ('foo',)
        >>> WordSet.parse('').trim_right('bar')
        ()
        """
        return self[:-1] if self and self[-1] == item else self

    def trim_left(self, item):
        """
        Remove the item from the beginning of the set.

        >>> WordSet.parse('foo bar').trim_left('foo')
        ('bar',)
        >>> WordSet.parse('foo bar').trim_left('bar')
        ('foo', 'bar')
        >>> WordSet.parse('').trim_left('bar')
        ()
        """
        return self[1:] if self and self[0] == item else self

    def trim(self, item):
        """
        >>> WordSet.parse('foo bar').trim('foo')
        ('bar',)
        """
        return self.trim_left(item).trim_right(item)

    def __getitem__(self, item):
        result = super(WordSet, self).__getitem__(item)
        if isinstance(item, slice):
            result = WordSet(result)
        return result

    @classmethod
    def parse(cls, identifier):
        matches = cls._pattern.finditer(identifier)
        return WordSet(match.group(0) for match in matches)

    @classmethod
    def from_class_name(cls, subject):
        return cls.parse(subject.__class__.__name__)


# for backward compatibility
words = WordSet.parse


def simple_html_strip(s):
    r"""
    Remove HTML from the string `s`.

    >>> str(simple_html_strip(''))
    ''

    >>> print(simple_html_strip('A <bold>stormy</bold> day in paradise'))
    A stormy day in paradise

    >>> print(simple_html_strip('Somebody <!-- do not --> tell the truth.'))
    Somebody  tell the truth.

    >>> print(simple_html_strip('What about<br/>\nmultiple lines?'))
    What about
    multiple lines?
    """
    html_stripper = re.compile('(<!--.*?-->)|(<[^>]*>)|([^<]+)', re.DOTALL)
    texts = (match.group(3) or '' for match in html_stripper.finditer(s))
    return ''.join(texts)


class SeparatedValues(str):
    """
    A string separated by a separator. Overrides __iter__ for getting
    the values.

    >>> list(SeparatedValues('a,b,c'))
    ['a', 'b', 'c']

    Whitespace is stripped and empty values are discarded.

    >>> list(SeparatedValues(' a,   b   , c,  '))
    ['a', 'b', 'c']
    """

    separator = ','

    def __iter__(self):
        parts = self.split(self.separator)
        return filter(None, (part.strip() for part in parts))


class Stripper:
    r"""
    Given a series of lines, find the common prefix and strip it from them.

    >>> lines = [
    ...     'abcdefg\n',
    ...     'abc\n',
    ...     'abcde\n',
    ... ]
    >>> res = Stripper.strip_prefix(lines)
    >>> res.prefix
    'abc'
    >>> list(res.lines)
    ['defg\n', '\n', 'de\n']

    If no prefix is common, nothing should be stripped.

    >>> lines = [
    ...     'abcd\n',
    ...     '1234\n',
    ... ]
    >>> res = Stripper.strip_prefix(lines)
    >>> res.prefix = ''
    >>> list(res.lines)
    ['abcd\n', '1234\n']
    """

    def __init__(self, prefix, lines):
        self.prefix = prefix
        self.lines = map(self, lines)

    @classmethod
    def strip_prefix(cls, lines):
        prefix_lines, lines = itertools.tee(lines)
        prefix = functools.reduce(cls.common_prefix, prefix_lines)
        return cls(prefix, lines)

    def __call__(self, line):
        if not self.prefix:
            return line
        null, prefix, rest = line.partition(self.prefix)
        return rest

    @staticmethod
    def common_prefix(s1, s2):
        """
        Return the common prefix of two lines.
        """
        index = min(len(s1), len(s2))
        while s1[:index] != s2[:index]:
            index -= 1
        return s1[:index]


def remove_prefix(text, prefix):
    """
    Remove the prefix from the text if it exists.

    >>> remove_prefix('underwhelming performance', 'underwhelming ')
    'performance'

    >>> remove_prefix('something special', 'sample')
    'something special'
    """
    null, prefix, rest = text.rpartition(prefix)
    return rest


def remove_suffix(text, suffix):
    """
    Remove the suffix from the text if it exists.

    >>> remove_suffix('name.git', '.git')
    'name'

    >>> remove_suffix('something special', 'sample')
    'something special'
    """
    rest, suffix, null = text.partition(suffix)
    return rest


def normalize_newlines(text):
    r"""
    Replace alternate newlines with the canonical newline.

    >>> normalize_newlines('Lorem Ipsum\u2029')
    'Lorem Ipsum\n'
    >>> normalize_newlines('Lorem Ipsum\r\n')
    'Lorem Ipsum\n'
    >>> normalize_newlines('Lorem Ipsum\x85')
    'Lorem Ipsum\n'
    """
    newlines = ['\r\n', '\r', '\n', '\u0085', '\u2028', '\u2029']
    pattern = '|'.join(newlines)
    return re.sub(pattern, '\n', text)


def _nonblank(str):
    return str and not str.startswith('#')


@functools.singledispatch
def yield_lines(iterable):
    r"""
    Yield valid lines of a string or iterable.

    >>> list(yield_lines(''))
    []
    >>> list(yield_lines(['foo', 'bar']))
    ['foo', 'bar']
    >>> list(yield_lines('foo\nbar'))
    ['foo', 'bar']
    >>> list(yield_lines('\nfoo\n#bar\nbaz #comment'))
    ['foo', 'baz #comment']
    >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n']))
    ['foo', 'bar', 'baz', 'bing']
    """
    return itertools.chain.from_iterable(map(yield_lines, iterable))


@yield_lines.register(str)
def _(text):
    return filter(_nonblank, map(str.strip, text.splitlines()))


def drop_comment(line):
    """
    Drop comments.

    >>> drop_comment('foo # bar')
    'foo'

    A hash without a space may be in a URL.

    >>> drop_comment('http://example.com/foo#bar')
    'http://example.com/foo#bar'
    """
    return line.partition(' #')[0]


def join_continuation(lines):
    r"""
    Join lines continued by a trailing backslash.

    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar \\', 'baz']))
    ['foobarbaz']

    Not sure why, but...
    The character preceeding the backslash is also elided.

    >>> list(join_continuation(['goo\\', 'dly']))
    ['godly']

    A terrible idea, but...
    If no line is available to continue, suppress the lines.

    >>> list(join_continuation(['foo', 'bar\\', 'baz\\']))
    ['foo']
    """
    lines = iter(lines)
    for item in lines:
        while item.endswith('\\'):
            try:
                item = item[:-2].strip() + next(lines)
            except StopIteration:
                return
        yield item
python3.12/site-packages/pkg_resources/_vendor/jaraco/__init__.py000064400000000000151732701000020752 0ustar00python3.12/site-packages/pkg_resources/_vendor/jaraco/functools.py000064400000035320151732701000021244 0ustar00import functools
import time
import inspect
import collections
import types
import itertools
import warnings

import pkg_resources.extern.more_itertools

from typing import Callable, TypeVar


CallableT = TypeVar("CallableT", bound=Callable[..., object])


def compose(*funcs):
    """
    Compose any number of unary functions into a single unary function.

    >>> import textwrap
    >>> expected = str.strip(textwrap.dedent(compose.__doc__))
    >>> strip_and_dedent = compose(str.strip, textwrap.dedent)
    >>> strip_and_dedent(compose.__doc__) == expected
    True

    Compose also allows the innermost function to take arbitrary arguments.

    >>> round_three = lambda x: round(x, ndigits=3)
    >>> f = compose(round_three, int.__truediv__)
    >>> [f(3*x, x+1) for x in range(1,10)]
    [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]
    """

    def compose_two(f1, f2):
        return lambda *args, **kwargs: f1(f2(*args, **kwargs))

    return functools.reduce(compose_two, funcs)


def method_caller(method_name, *args, **kwargs):
    """
    Return a function that will call a named method on the
    target object with optional positional and keyword
    arguments.

    >>> lower = method_caller('lower')
    >>> lower('MyString')
    'mystring'
    """

    def call_method(target):
        func = getattr(target, method_name)
        return func(*args, **kwargs)

    return call_method


def once(func):
    """
    Decorate func so it's only ever called the first time.

    This decorator can ensure that an expensive or non-idempotent function
    will not be expensive on subsequent calls and is idempotent.

    >>> add_three = once(lambda a: a+3)
    >>> add_three(3)
    6
    >>> add_three(9)
    6
    >>> add_three('12')
    6

    To reset the stored value, simply clear the property ``saved_result``.

    >>> del add_three.saved_result
    >>> add_three(9)
    12
    >>> add_three(8)
    12

    Or invoke 'reset()' on it.

    >>> add_three.reset()
    >>> add_three(-3)
    0
    >>> add_three(0)
    0
    """

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        if not hasattr(wrapper, 'saved_result'):
            wrapper.saved_result = func(*args, **kwargs)
        return wrapper.saved_result

    wrapper.reset = lambda: vars(wrapper).__delitem__('saved_result')
    return wrapper


def method_cache(
    method: CallableT,
    cache_wrapper: Callable[
        [CallableT], CallableT
    ] = functools.lru_cache(),  # type: ignore[assignment]
) -> CallableT:
    """
    Wrap lru_cache to support storing the cache data in the object instances.

    Abstracts the common paradigm where the method explicitly saves an
    underscore-prefixed protected property on first call and returns that
    subsequently.

    >>> class MyClass:
    ...     calls = 0
    ...
    ...     @method_cache
    ...     def method(self, value):
    ...         self.calls += 1
    ...         return value

    >>> a = MyClass()
    >>> a.method(3)
    3
    >>> for x in range(75):
    ...     res = a.method(x)
    >>> a.calls
    75

    Note that the apparent behavior will be exactly like that of lru_cache
    except that the cache is stored on each instance, so values in one
    instance will not flush values from another, and when an instance is
    deleted, so are the cached values for that instance.

    >>> b = MyClass()
    >>> for x in range(35):
    ...     res = b.method(x)
    >>> b.calls
    35
    >>> a.method(0)
    0
    >>> a.calls
    75

    Note that if method had been decorated with ``functools.lru_cache()``,
    a.calls would have been 76 (due to the cached value of 0 having been
    flushed by the 'b' instance).

    Clear the cache with ``.cache_clear()``

    >>> a.method.cache_clear()

    Same for a method that hasn't yet been called.

    >>> c = MyClass()
    >>> c.method.cache_clear()

    Another cache wrapper may be supplied:

    >>> cache = functools.lru_cache(maxsize=2)
    >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
    >>> a = MyClass()
    >>> a.method2()
    3

    Caution - do not subsequently wrap the method with another decorator, such
    as ``@property``, which changes the semantics of the function.

    See also
    http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
    for another implementation and additional justification.
    """

    def wrapper(self: object, *args: object, **kwargs: object) -> object:
        # it's the first call, replace the method with a cached, bound method
        bound_method: CallableT = types.MethodType(  # type: ignore[assignment]
            method, self
        )
        cached_method = cache_wrapper(bound_method)
        setattr(self, method.__name__, cached_method)
        return cached_method(*args, **kwargs)

    # Support cache clear even before cache has been created.
    wrapper.cache_clear = lambda: None  # type: ignore[attr-defined]

    return (  # type: ignore[return-value]
        _special_method_cache(method, cache_wrapper) or wrapper
    )


def _special_method_cache(method, cache_wrapper):
    """
    Because Python treats special methods differently, it's not
    possible to use instance attributes to implement the cached
    methods.

    Instead, install the wrapper method under a different name
    and return a simple proxy to that wrapper.

    https://github.com/jaraco/jaraco.functools/issues/5
    """
    name = method.__name__
    special_names = '__getattr__', '__getitem__'
    if name not in special_names:
        return

    wrapper_name = '__cached' + name

    def proxy(self, *args, **kwargs):
        if wrapper_name not in vars(self):
            bound = types.MethodType(method, self)
            cache = cache_wrapper(bound)
            setattr(self, wrapper_name, cache)
        else:
            cache = getattr(self, wrapper_name)
        return cache(*args, **kwargs)

    return proxy


def apply(transform):
    """
    Decorate a function with a transform function that is
    invoked on results returned from the decorated function.

    >>> @apply(reversed)
    ... def get_numbers(start):
    ...     "doc for get_numbers"
    ...     return range(start, start+3)
    >>> list(get_numbers(4))
    [6, 5, 4]
    >>> get_numbers.__doc__
    'doc for get_numbers'
    """

    def wrap(func):
        return functools.wraps(func)(compose(transform, func))

    return wrap


def result_invoke(action):
    r"""
    Decorate a function with an action function that is
    invoked on the results returned from the decorated
    function (for its side-effect), then return the original
    result.

    >>> @result_invoke(print)
    ... def add_two(a, b):
    ...     return a + b
    >>> x = add_two(2, 3)
    5
    >>> x
    5
    """

    def wrap(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            result = func(*args, **kwargs)
            action(result)
            return result

        return wrapper

    return wrap


def invoke(f, *args, **kwargs):
    """
    Call a function for its side effect after initialization.

    The benefit of using the decorator instead of simply invoking a function
    after defining it is that it makes explicit the author's intent for the
    function to be called immediately. Whereas if one simply calls the
    function immediately, it's less obvious if that was intentional or
    incidental. It also avoids repeating the name - the two actions, defining
    the function and calling it immediately are modeled separately, but linked
    by the decorator construct.

    The benefit of having a function construct (opposed to just invoking some
    behavior inline) is to serve as a scope in which the behavior occurs. It
    avoids polluting the global namespace with local variables, provides an
    anchor on which to attach documentation (docstring), keeps the behavior
    logically separated (instead of conceptually separated or not separated at
    all), and provides potential to re-use the behavior for testing or other
    purposes.

    This function is named as a pithy way to communicate, "call this function
    primarily for its side effect", or "while defining this function, also
    take it aside and call it". It exists because there's no Python construct
    for "define and call" (nor should there be, as decorators serve this need
    just fine). The behavior happens immediately and synchronously.

    >>> @invoke
    ... def func(): print("called")
    called
    >>> func()
    called

    Use functools.partial to pass parameters to the initial call

    >>> @functools.partial(invoke, name='bingo')
    ... def func(name): print("called with", name)
    called with bingo
    """
    f(*args, **kwargs)
    return f


def call_aside(*args, **kwargs):
    """
    Deprecated name for invoke.
    """
    warnings.warn("call_aside is deprecated, use invoke", DeprecationWarning)
    return invoke(*args, **kwargs)


class Throttler:
    """
    Rate-limit a function (or other callable)
    """

    def __init__(self, func, max_rate=float('Inf')):
        if isinstance(func, Throttler):
            func = func.func
        self.func = func
        self.max_rate = max_rate
        self.reset()

    def reset(self):
        self.last_called = 0

    def __call__(self, *args, **kwargs):
        self._wait()
        return self.func(*args, **kwargs)

    def _wait(self):
        "ensure at least 1/max_rate seconds from last call"
        elapsed = time.time() - self.last_called
        must_wait = 1 / self.max_rate - elapsed
        time.sleep(max(0, must_wait))
        self.last_called = time.time()

    def __get__(self, obj, type=None):
        return first_invoke(self._wait, functools.partial(self.func, obj))


def first_invoke(func1, func2):
    """
    Return a function that when invoked will invoke func1 without
    any parameters (for its side-effect) and then invoke func2
    with whatever parameters were passed, returning its result.
    """

    def wrapper(*args, **kwargs):
        func1()
        return func2(*args, **kwargs)

    return wrapper


def retry_call(func, cleanup=lambda: None, retries=0, trap=()):
    """
    Given a callable func, trap the indicated exceptions
    for up to 'retries' times, invoking cleanup on the
    exception. On the final attempt, allow any exceptions
    to propagate.
    """
    attempts = itertools.count() if retries == float('inf') else range(retries)
    for attempt in attempts:
        try:
            return func()
        except trap:
            cleanup()

    return func()


def retry(*r_args, **r_kwargs):
    """
    Decorator wrapper for retry_call. Accepts arguments to retry_call
    except func and then returns a decorator for the decorated function.

    Ex:

    >>> @retry(retries=3)
    ... def my_func(a, b):
    ...     "this is my funk"
    ...     print(a, b)
    >>> my_func.__doc__
    'this is my funk'
    """

    def decorate(func):
        @functools.wraps(func)
        def wrapper(*f_args, **f_kwargs):
            bound = functools.partial(func, *f_args, **f_kwargs)
            return retry_call(bound, *r_args, **r_kwargs)

        return wrapper

    return decorate


def print_yielded(func):
    """
    Convert a generator into a function that prints all yielded elements

    >>> @print_yielded
    ... def x():
    ...     yield 3; yield None
    >>> x()
    3
    None
    """
    print_all = functools.partial(map, print)
    print_results = compose(more_itertools.consume, print_all, func)
    return functools.wraps(func)(print_results)


def pass_none(func):
    """
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    """

    @functools.wraps(func)
    def wrapper(param, *args, **kwargs):
        if param is not None:
            return func(param, *args, **kwargs)

    return wrapper


def assign_params(func, namespace):
    """
    Assign parameters from namespace where func solicits.

    >>> def func(x, y=3):
    ...     print(x, y)
    >>> assigned = assign_params(func, dict(x=2, z=4))
    >>> assigned()
    2 3

    The usual errors are raised if a function doesn't receive
    its required parameters:

    >>> assigned = assign_params(func, dict(y=3, z=4))
    >>> assigned()
    Traceback (most recent call last):
    TypeError: func() ...argument...

    It even works on methods:

    >>> class Handler:
    ...     def meth(self, arg):
    ...         print(arg)
    >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))()
    crystal
    """
    sig = inspect.signature(func)
    params = sig.parameters.keys()
    call_ns = {k: namespace[k] for k in params if k in namespace}
    return functools.partial(func, **call_ns)


def save_method_args(method):
    """
    Wrap a method such that when it is called, the args and kwargs are
    saved on the method.

    >>> class MyClass:
    ...     @save_method_args
    ...     def method(self, a, b):
    ...         print(a, b)
    >>> my_ob = MyClass()
    >>> my_ob.method(1, 2)
    1 2
    >>> my_ob._saved_method.args
    (1, 2)
    >>> my_ob._saved_method.kwargs
    {}
    >>> my_ob.method(a=3, b='foo')
    3 foo
    >>> my_ob._saved_method.args
    ()
    >>> my_ob._saved_method.kwargs == dict(a=3, b='foo')
    True

    The arguments are stored on the instance, allowing for
    different instance to save different args.

    >>> your_ob = MyClass()
    >>> your_ob.method({str('x'): 3}, b=[4])
    {'x': 3} [4]
    >>> your_ob._saved_method.args
    ({'x': 3},)
    >>> my_ob._saved_method.args
    ()
    """
    args_and_kwargs = collections.namedtuple('args_and_kwargs', 'args kwargs')

    @functools.wraps(method)
    def wrapper(self, *args, **kwargs):
        attr_name = '_saved_' + method.__name__
        attr = args_and_kwargs(args, kwargs)
        setattr(self, attr_name, attr)
        return method(self, *args, **kwargs)

    return wrapper


def except_(*exceptions, replace=None, use=None):
    """
    Replace the indicated exceptions, if raised, with the indicated
    literal replacement or evaluated expression (if present).

    >>> safe_int = except_(ValueError)(int)
    >>> safe_int('five')
    >>> safe_int('5')
    5

    Specify a literal replacement with ``replace``.

    >>> safe_int_r = except_(ValueError, replace=0)(int)
    >>> safe_int_r('five')
    0

    Provide an expression to ``use`` to pass through particular parameters.

    >>> safe_int_pt = except_(ValueError, use='args[0]')(int)
    >>> safe_int_pt('five')
    'five'

    """

    def decorate(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            try:
                return func(*args, **kwargs)
            except exceptions:
                try:
                    return eval(use)
                except TypeError:
                    return replace

        return wrapper

    return decorate
python3.12/site-packages/pkg_resources/_vendor/jaraco/context.py000064400000016444151732701000020722 0ustar00import os
import subprocess
import contextlib
import functools
import tempfile
import shutil
import operator
import warnings


@contextlib.contextmanager
def pushd(dir):
    """
    >>> tmp_path = getfixture('tmp_path')
    >>> with pushd(tmp_path):
    ...     assert os.getcwd() == os.fspath(tmp_path)
    >>> assert os.getcwd() != os.fspath(tmp_path)
    """

    orig = os.getcwd()
    os.chdir(dir)
    try:
        yield dir
    finally:
        os.chdir(orig)


@contextlib.contextmanager
def tarball_context(url, target_dir=None, runner=None, pushd=pushd):
    """
    Get a tarball, extract it, change to that directory, yield, then
    clean up.
    `runner` is the function to invoke commands.
    `pushd` is a context manager for changing the directory.
    """
    if target_dir is None:
        target_dir = os.path.basename(url).replace('.tar.gz', '').replace('.tgz', '')
    if runner is None:
        runner = functools.partial(subprocess.check_call, shell=True)
    else:
        warnings.warn("runner parameter is deprecated", DeprecationWarning)
    # In the tar command, use --strip-components=1 to strip the first path and
    #  then
    #  use -C to cause the files to be extracted to {target_dir}. This ensures
    #  that we always know where the files were extracted.
    runner('mkdir {target_dir}'.format(**vars()))
    try:
        getter = 'wget {url} -O -'
        extract = 'tar x{compression} --strip-components=1 -C {target_dir}'
        cmd = ' | '.join((getter, extract))
        runner(cmd.format(compression=infer_compression(url), **vars()))
        with pushd(target_dir):
            yield target_dir
    finally:
        runner('rm -Rf {target_dir}'.format(**vars()))


def infer_compression(url):
    """
    Given a URL or filename, infer the compression code for tar.

    >>> infer_compression('http://foo/bar.tar.gz')
    'z'
    >>> infer_compression('http://foo/bar.tgz')
    'z'
    >>> infer_compression('file.bz')
    'j'
    >>> infer_compression('file.xz')
    'J'
    """
    # cheat and just assume it's the last two characters
    compression_indicator = url[-2:]
    mapping = dict(gz='z', bz='j', xz='J')
    # Assume 'z' (gzip) if no match
    return mapping.get(compression_indicator, 'z')


@contextlib.contextmanager
def temp_dir(remover=shutil.rmtree):
    """
    Create a temporary directory context. Pass a custom remover
    to override the removal behavior.

    >>> import pathlib
    >>> with temp_dir() as the_dir:
    ...     assert os.path.isdir(the_dir)
    ...     _ = pathlib.Path(the_dir).joinpath('somefile').write_text('contents')
    >>> assert not os.path.exists(the_dir)
    """
    temp_dir = tempfile.mkdtemp()
    try:
        yield temp_dir
    finally:
        remover(temp_dir)


@contextlib.contextmanager
def repo_context(url, branch=None, quiet=True, dest_ctx=temp_dir):
    """
    Check out the repo indicated by url.

    If dest_ctx is supplied, it should be a context manager
    to yield the target directory for the check out.
    """
    exe = 'git' if 'git' in url else 'hg'
    with dest_ctx() as repo_dir:
        cmd = [exe, 'clone', url, repo_dir]
        if branch:
            cmd.extend(['--branch', branch])
        devnull = open(os.path.devnull, 'w')
        stdout = devnull if quiet else None
        subprocess.check_call(cmd, stdout=stdout)
        yield repo_dir


@contextlib.contextmanager
def null():
    """
    A null context suitable to stand in for a meaningful context.

    >>> with null() as value:
    ...     assert value is None
    """
    yield


class ExceptionTrap:
    """
    A context manager that will catch certain exceptions and provide an
    indication they occurred.

    >>> with ExceptionTrap() as trap:
    ...     raise Exception()
    >>> bool(trap)
    True

    >>> with ExceptionTrap() as trap:
    ...     pass
    >>> bool(trap)
    False

    >>> with ExceptionTrap(ValueError) as trap:
    ...     raise ValueError("1 + 1 is not 3")
    >>> bool(trap)
    True
    >>> trap.value
    ValueError('1 + 1 is not 3')
    >>> trap.tb
    <traceback object at ...>

    >>> with ExceptionTrap(ValueError) as trap:
    ...     raise Exception()
    Traceback (most recent call last):
    ...
    Exception

    >>> bool(trap)
    False
    """

    exc_info = None, None, None

    def __init__(self, exceptions=(Exception,)):
        self.exceptions = exceptions

    def __enter__(self):
        return self

    @property
    def type(self):
        return self.exc_info[0]

    @property
    def value(self):
        return self.exc_info[1]

    @property
    def tb(self):
        return self.exc_info[2]

    def __exit__(self, *exc_info):
        type = exc_info[0]
        matches = type and issubclass(type, self.exceptions)
        if matches:
            self.exc_info = exc_info
        return matches

    def __bool__(self):
        return bool(self.type)

    def raises(self, func, *, _test=bool):
        """
        Wrap func and replace the result with the truth
        value of the trap (True if an exception occurred).

        First, give the decorator an alias to support Python 3.8
        Syntax.

        >>> raises = ExceptionTrap(ValueError).raises

        Now decorate a function that always fails.

        >>> @raises
        ... def fail():
        ...     raise ValueError('failed')
        >>> fail()
        True
        """

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            with ExceptionTrap(self.exceptions) as trap:
                func(*args, **kwargs)
            return _test(trap)

        return wrapper

    def passes(self, func):
        """
        Wrap func and replace the result with the truth
        value of the trap (True if no exception).

        First, give the decorator an alias to support Python 3.8
        Syntax.

        >>> passes = ExceptionTrap(ValueError).passes

        Now decorate a function that always fails.

        >>> @passes
        ... def fail():
        ...     raise ValueError('failed')

        >>> fail()
        False
        """
        return self.raises(func, _test=operator.not_)


class suppress(contextlib.suppress, contextlib.ContextDecorator):
    """
    A version of contextlib.suppress with decorator support.

    >>> @suppress(KeyError)
    ... def key_error():
    ...     {}['']
    >>> key_error()
    """


class on_interrupt(contextlib.ContextDecorator):
    """
    Replace a KeyboardInterrupt with SystemExit(1)

    >>> def do_interrupt():
    ...     raise KeyboardInterrupt()
    >>> on_interrupt('error')(do_interrupt)()
    Traceback (most recent call last):
    ...
    SystemExit: 1
    >>> on_interrupt('error', code=255)(do_interrupt)()
    Traceback (most recent call last):
    ...
    SystemExit: 255
    >>> on_interrupt('suppress')(do_interrupt)()
    >>> with __import__('pytest').raises(KeyboardInterrupt):
    ...     on_interrupt('ignore')(do_interrupt)()
    """

    def __init__(
        self,
        action='error',
        # py3.7 compat
        # /,
        code=1,
    ):
        self.action = action
        self.code = code

    def __enter__(self):
        return self

    def __exit__(self, exctype, excinst, exctb):
        if exctype is not KeyboardInterrupt or self.action == 'ignore':
            return
        elif self.action == 'error':
            raise SystemExit(self.code) from excinst
        return self.action == 'suppress'
python3.12/site-packages/pkg_resources/_vendor/__pycache__/__init__.cpython-312.pyc000064400000000370151732701000024066 0ustar00�

��_i���y)N�r���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/__init__.py�<module>rs�rpython3.12/site-packages/pkg_resources/_vendor/__pycache__/zipp.cpython-312.pyc000064400000035053151732701000023317 0ustar00�

��_i� ���ddlZddlZddlZddlZddlZddlZddlZejdkrddlm	Z	ne
Z	dgZd�Zd�Z
e	jZ	d�ZGd�d	ej"�ZGd
�de�Zd�ZGd
�d�Zy)�N)��)�OrderedDict�Pathc�B�tjt|�dd�S)a2
    Given a path with elements separated by
    posixpath.sep, generate all parents of that path.

    >>> list(_parents('b/d'))
    ['b']
    >>> list(_parents('/b/d/'))
    ['/b']
    >>> list(_parents('b/d/f/'))
    ['b/d', 'b']
    >>> list(_parents('b'))
    []
    >>> list(_parents(''))
    []
    �N)�	itertools�islice�	_ancestry��paths ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/zipp.py�_parentsrs�� ���I�d�O�Q��5�5�c#��K�|jtj�}|rH|tjk7r4|��tj|�\}}|r|tjk7r�2yyyy�w)aR
    Given a path with elements separated by
    posixpath.sep, generate all elements of that path

    >>> list(_ancestry('b/d'))
    ['b/d', 'b']
    >>> list(_ancestry('/b/d/'))
    ['/b/d', '/b']
    >>> list(_ancestry('b/d/f/'))
    ['b/d/f', 'b/d', 'b']
    >>> list(_ancestry('b'))
    ['b']
    >>> list(_ancestry(''))
    []
    N)�rstrip�	posixpath�sep�split)r
�tails  rrr%sV���� �;�;�y�}�}�%�D�
�4�9�=�=�(��
��_�_�T�*�
��d��4�9�=�=�(�$�(�$�s�A&A-�)A-c�T�tjt|�j|�S)zZ
    Return items in minuend not in subtrahend, retaining order
    with O(1) lookup.
    )r	�filterfalse�set�__contains__)�minuend�
subtrahends  r�_differencer?s!��
� � ��Z��!=�!=�w�G�Grc�N��eZdZdZed��Z�fd�Zd�Zd�Ze	d��Z
�xZS)�CompleteDirszk
    A ZipFile subclass that ensures that implied directories
    are always included in the namelist.
    c��tjjtt|��}d�|D�}tt
||��S)Nc3�BK�|]}|tjz���y�w�N)rr)�.0�ps  r�	<genexpr>z-CompleteDirs._implied_dirs.<locals>.<genexpr>Ps����6�g��1�y�}�}�$�g�s�)r	�chain�
from_iterable�mapr�_deduper)�names�parents�as_dirss   r�
_implied_dirszCompleteDirs._implied_dirsMs9���/�/�/�/��H�e�0D�E��6�g�6���{�7�E�2�3�3rc�b��tt|��}|t|j	|��zSr")�superr�namelist�listr-)�selfr*�	__class__s  �rr0zCompleteDirs.namelistSs-����l�D�2�4���t�D�.�.�u�5�6�6�6rc�4�t|j��Sr")rr0�r2s r�	_name_setzCompleteDirs._name_setWs���4�=�=�?�#�#rc�L�|j�}|dz}||vxr||v}|r|S|S)zx
        If the name represents a directory, return that name
        as a directory (with the trailing slash).
        �/)r6)r2�namer*�dirname�	dir_matchs     r�resolve_dirzCompleteDirs.resolve_dirZs:��
��� ����*����%�:�'�U�*:�	�#�w�-��-rc��t|t�r|St|tj�s|t	|��Sd|j
vrt}||_|S)zl
        Given a source (filename or zipfile), return an
        appropriate CompleteDirs subclass.
        �r)�
isinstancer�zipfile�ZipFile�_pathlib_compat�moder3)�cls�sources  r�makezCompleteDirs.makedsQ���f�l�+��M��&�'�/�/�2���v�.�/�/��f�k�k�!��C�����
r)�__name__�
__module__�__qualname__�__doc__�staticmethodr-r0r6r<�classmethodrF�
__classcell__�r3s@rrrGs?����
�4��4�
7�$�.����rrc�,��eZdZdZ�fd�Z�fd�Z�xZS)�
FastLookupzV
    ZipFile subclass to ensure implicit
    dirs exist and are resolved rapidly.
    c���tjt�5|jcddd�S#1swYnxYwtt
|��|_|jSr")�
contextlib�suppress�AttributeError�_FastLookup__namesr/rPr0�r2r3s �rr0zFastLookup.namelist~s?���
�
 �
 ��
0��<�<�1�
0�
0���Z��7�9����|�|���1�:c���tjt�5|jcddd�S#1swYnxYwtt
|��|_|jSr")rRrSrT�_FastLookup__lookupr/rPr6rVs �rr6zFastLookup._name_set�s?���
�
 �
 ��
0��=�=�1�
0�
0���j�$�9�;��
��}�}�rW)rGrHrIrJr0r6rMrNs@rrPrPxs����
��rrPc�X�	|j�S#t$rt|�cYSwxYw)zi
    For path-like objects, convert to a filename for compatibility
    on Python 3.6.1 and earlier.
    )�
__fspath__rT�strrs rrBrB�s-��
���� � �����4�y���s��)�)c���eZdZdZdZdd�Zddd�d�Zed��Zed��Z	ed	��Z
ed
��Zed��Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZeZed��Zy)ru4
    A pathlib-compatible interface for zip files.

    Consider a zip file with this structure::

        .
        ├── a.txt
        └── b
            ├── c.txt
            └── d
                └── e.txt

    >>> data = io.BytesIO()
    >>> zf = zipfile.ZipFile(data, 'w')
    >>> zf.writestr('a.txt', 'content of a')
    >>> zf.writestr('b/c.txt', 'content of c')
    >>> zf.writestr('b/d/e.txt', 'content of e')
    >>> zf.filename = 'mem/abcde.zip'

    Path accepts the zipfile object itself or a filename

    >>> root = Path(zf)

    From there, several path operations are available.

    Directory iteration (including the zip file itself):

    >>> a, b = root.iterdir()
    >>> a
    Path('mem/abcde.zip', 'a.txt')
    >>> b
    Path('mem/abcde.zip', 'b/')

    name property:

    >>> b.name
    'b'

    join with divide operator:

    >>> c = b / 'c.txt'
    >>> c
    Path('mem/abcde.zip', 'b/c.txt')
    >>> c.name
    'c.txt'

    Read text:

    >>> c.read_text()
    'content of c'

    existence:

    >>> c.exists()
    True
    >>> (b / 'missing.txt').exists()
    False

    Coercion to string:

    >>> import os
    >>> str(c).replace(os.sep, posixpath.sep)
    'mem/abcde.zip/b/c.txt'

    At the root, ``name``, ``filename``, and ``parent``
    resolve to the zipfile. Note these attributes are not
    valid and will raise a ``ValueError`` if the zipfile
    has no filename.

    >>> root.name
    'abcde.zip'
    >>> str(root.filename).replace(os.sep, posixpath.sep)
    'mem/abcde.zip'
    >>> str(root.parent)
    'mem'
    z>{self.__class__.__name__}({self.root.filename!r}, {self.at!r})c�F�tj|�|_||_y)aX
        Construct a Path from a ZipFile or filename.

        Note: When the source is an existing ZipFile object,
        its type (__class__) will be mutated to a
        specialized type. If the caller wishes to retain the
        original type, the caller should either create a
        separate ZipFile object or pass a filename.
        N)rPrF�root�at)r2r_r`s   r�__init__z
Path.__init__�s���O�O�D�)��	���rN��pwdc�.�|j�rt|��|d}|j�s|dk(rt|��|jj|j||��}d|vr|s|rtd��|Stj|g|��i|��S)z�
        Open this entry as text or binary following the semantics
        of ``pathlib.Path.open()`` by passing arguments through
        to io.TextIOWrapper().
        rr>rb�bz*encoding args invalid for binary operation)
�is_dir�IsADirectoryError�exists�FileNotFoundErrorr_�openr`�
ValueError�io�
TextIOWrapper)r2rCrc�args�kwargs�zip_mode�streams       rrjz	Path.open�s����;�;�=�#�D�)�)���7���{�{�}��S��#�D�)�)����������s��;���$�;��v� �!M�N�N��M�����8��8��8�8rc��tj|j�jxs|jjSr")�pathlibrr`r9�filenamer5s rr9z	Path.name�*���|�|�D�G�G�$�)�)�?�T�]�]�-?�-?�?rc��tj|j�jxs|jjSr")rsrr`�suffixrtr5s rrwzPath.suffix	s*���|�|�D�G�G�$�+�+�C�t�}�}�/C�/C�Crc��tj|j�jxs|jjSr")rsrr`�suffixesrtr5s rryz
Path.suffixes
s*���|�|�D�G�G�$�-�-�G����1G�1G�Grc��tj|j�jxs|jjSr")rsrr`�stemrtr5s rr{z	Path.stemrurc��tj|jj�j	|j
�Sr")rsrr_rt�joinpathr`r5s rrtz
Path.filenames*���|�|�D�I�I�.�.�/�8�8����A�Arc�z�|jdg|��i|��5}|j�cddd�S#1swYyxYw)Nr>�rj�read)r2rnro�strms    r�	read_textzPath.read_texts1��
�T�Y�Y�s�
,�T�
,�V�
,���9�9�;�-�
,�
,�s�1�:c�p�|jd�5}|j�cddd�S#1swYyxYw)N�rbr)r2r�s  r�
read_byteszPath.read_bytess"��
�Y�Y�t�_���9�9�;��_�_�s�,�5c��tj|jjd��|jjd�k(S�Nr8)rr:r`r)r2r
s  r�	_is_childzPath._is_child!s2��� � �������!4�5�������9L�L�Lrc�:�|j|j|�Sr")r3r_)r2r`s  r�_nextz
Path._next$s���~�~�d�i�i��,�,rc�V�|jxs|jjd�Sr�)r`�endswithr5s rrfzPath.is_dir's"���7�7�{�3�d�g�g�.�.�s�3�3rc�H�|j�xr|j�Sr")rhrfr5s r�is_filezPath.is_file*s���{�{�}�2�T�[�[�]�!2�2rc�N�|j|jj�vSr")r`r_r6r5s rrhzPath.exists-s���w�w�$�)�)�-�-�/�/�/rc��|j�std��t|j|jj��}t
|j|�S)NzCan't listdir a file)rfrkr(r�r_r0�filterr�)r2�subss  r�iterdirzPath.iterdir0sE���{�{�}��3�4�4��4�:�:�t�y�y�1�1�3�4���d�n�n�d�+�+rc�j�tj|jj|j�Sr")r�joinr_rtr`r5s r�__str__zPath.__str__6s!���~�~�d�i�i�0�0�$�'�'�:�:rc�:�|jj|��S)Nr5)�_Path__repr�formatr5s r�__repr__z
Path.__repr__9s���{�{�!�!�t�!�,�,rc��tj|jgtt|����}|j|jj|��Sr")rr�r`r(rBr�r_r<)r2�other�nexts   rr}z
Path.joinpath<s>���~�~�d�g�g�D��O�U�(C�D���z�z�$�)�)�/�/��5�6�6rc���|js|jjStj|jjd��}|r|dz
}|j
|�Sr�)r`rt�parentrr:rr�)r2�	parent_ats  rr�zPath.parentBsR���w�w��=�=�'�'�'��%�%�d�g�g�n�n�S�&9�:�	�����I��z�z�)�$�$r)�)r>)rGrHrIrJr�rarj�propertyr9rwryr{rtr�r�r�r�rfr�rhr�r�r�r}�__truediv__r��rrrr�s���K�ZN�F��9��9�$�@��@��D��D��H��H��@��@��B��B���M�-�4�3�0�,�;�-�7��K�
�%��%r)rlrr@r	rR�sysrs�version_info�collectionsr�dict�__all__rr�fromkeysr)rrArrPrBrr�rr�<module>r�s���	�����
�����f��'��K��(��6�&+�,�
�
��/�H�.�7�?�?�.�b���&�s%�s%rpython3.12/site-packages/pkg_resources/_vendor/__pycache__/typing_extensions.cpython-312.pyc000064400000257404151732701000026134 0ustar00�

��_i�8���ddlZddlZddlZddlZddlZddlZddlZddlZgd�Z	dZ
eZe
�Zefd�Zej dk\rd�Znej dk\rd�Znd	�Zd�d
�Zej&Zej(d�Zej(d�Zej(d
�Zej(dd��Zej(dd��Zej dk\rddlmZnGd�de�ZGd�de��Zej8Zeed�rej dddk\r
ej<Zn!Gd�dej>d��Z e dd� �Zej dk\r
ejBZ!nd!�Z!d"�Z"eed#�r
ejFZ#n!Gd$�d%ej>d��Z$e$d#d&� �Z#ejJZ%eed'�r%ejLZ&ejNZ'ejPZ(n6ejRejTejRe+��Z,d(�Z&d)�Z'd*�Z(ejZZ-ej\Z.ej^Z/ej`Z0ejbZ1ejdZ2ejfZ3ejhZ4ejjZ5eed+�r
ejlZ6nejnejleef�Z6ejpZ8ejrZ9ejtZ:ejvZ;ejxZ<ejzZ=gd,�Z>d-�Z?d.�Z@d/�ZAeed0�r
ej�ZBn$d1�ZCGd2�d3ej��ZEGd4�d0eE��ZBeed5�r
ej�ZFnd6�ZFeFZGeed7�r
ej�ZHneFGd8�d7eB��ZHeed9�r%ej�ZIej�ZJej�ZKn\d:�ZLd;�ZMd<eM_Ndd=�d>�ZOd?eO_NGd@�dAe�ZJeJdBe+fi�ZIePeI_QdCeI_ReedA�rej�eJfZSneJfZSdD�ZKeedE�r
ej�ZTndF�ZTeed9�r
ej�ZUnddlZddlZdG�ZVd�dI�ZUeedJ�rej�ZWej�ZXn!GdK�dLej�d��ZXGdM�dJ�ZWej dddk\rej�ZZej�Z[n	ddNlm\Z\	ddOlm^Z_dP�ZZdQ�Z[eedR�r
ej�Z`nSej dddk\r GdS�dTej>d��ZaeadU��Z`n!GdV�dTej>d��ZaeadRdW� �Z`GdX�dY�ZbGdZ�d[ej(ebd��Zeed\�rej�Zcej�Zdn Gd]�d^�ZeGd_�d\ee�ZcGd`�daee�Zdeedb�rGdc�dbej�ebd��ZfnGdd�dbegeb�Zfeede�sGdf�dgeg�Zhej�dh��Zjeede�rej�Zkej�Zhn<ej dddk\r	eadi��Zkn!Gdj�dkej>d��Zleldedl� �Zkeedm�r
ej�ZmnSej dddk\r Gdn�doej>d��Znendp��Zmn!Gdq�doej>d��Znendmdr� �ZmGds�dtej�d��Zeedu�r
ej�Zpnedv��Zpeedw�r
ej�Zqnedx��Zqeedy�r
ej�Zrnedz��Zreed9�rej�Zsej�Ztneej dddk\r(Gd{�d|ej>d��Zueud}��Zseud~��Ztn+Gd�d�ej>d��Zvevd9d�� �Zsevd�d�� �Zteed��r
ej�Zwn�ej dddk\r:Gd��d�ej>d��ZxGd��d�ej�d��Zyexd���Zwd��Zzn;Gd��d�ej�d��ZyGd��d�ej>d��Z{e{d�d�� �Zwd��Zzeed��rGd��d�ej�ebd��Z|nGd��d�eb�Z|eed��r
ej�Z}nd�ed�efd��Z}eed��r
ej�Z~nd�erd�erfd��Z~eed��r
ej�Zn�ddHdHd�d��d�e�d�e�d�e�d�e�je�jejZej4e�jd�ej4ffd�fd�ej4d�e�jegeffd��Zeed��re�jZ�n6ej(d�e�jd�ej4f���Z�d�e�d�e�fd��Z�eed��see_ee_ej dk\re�jZ�yd��Z�d�d��Z�e�jZ�e�hd���Z�Gd��d�e�Z�d�d��Z�e�jj�e�_Re�je�d�d�i�Z�ej d�k\rd�e�_Nd��Z�e�e�_�y#e]$rej�Z\Y���wxYw#e]$rej�Z_Y���wxYw)��N)8�Any�ClassVar�Concatenate�Final�
LiteralString�	ParamSpec�
ParamSpecArgs�ParamSpecKwargs�Self�Type�TypeVar�TypeVarTuple�Unpack�	Awaitable�
AsyncIterator�
AsyncIterable�	Coroutine�AsyncGenerator�AsyncContextManager�ChainMap�ContextManager�Counter�Deque�DefaultDict�
NamedTuple�OrderedDict�	TypedDict�
SupportsIndex�	Annotated�assert_never�assert_type�clear_overloads�dataclass_transform�
get_overloads�final�get_args�
get_origin�get_type_hints�IntVar�is_typeddict�Literal�NewType�overload�override�Protocol�reveal_type�runtime�runtime_checkable�Text�	TypeAlias�	TypeGuard�
TYPE_CHECKING�Never�NoReturn�Required�NotRequiredTc
��|st|�d���|tur;t|d�r|jst|�d���t	|j�}t	|�}||k7rot|d�rE|jD�cgc]}t|�r�|��}}t
d�|D��}|dkDr	|||z
k\rytd||kDrdnd�d	|�d
|�d|����ycc}w)z�Check correct count for parameters of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
    z is not a generic class�__parameters__c3�<K�|]}t|t����y�w�N)�
isinstancer��.0�ps  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/typing_extensions.py�	<genexpr>z!_check_generic.<locals>.<genexpr>gs����P�Z��
�1�l� ;�Z���rNzToo �many�fewz parameters for z	; actual z, expected )�	TypeError�_marker�hasattrr<�len�
_is_unpack�sum)�cls�
parameters�elen�alenrB�
num_tv_tupless      rC�_check_genericrSYs�����3�%�6�7�8�8��w���s�,�-�S�5G�5G��s�e�#:�;�<�<��3�%�%�&���z�?�D��t�|��3�(�)�%(�%7�%7�M�%7��z�!�}�!�%7�J�M��P�Z�P�P�M���!���}�0D�(D���$����v�%�@�@P�QT�PU�V#�#'�&��D�6�;�<�	<�
��Ms�>C�C)��
c�t�t|tjtjtj
f�Sr>)r?�typing�
_GenericAlias�_types�GenericAlias�	UnionType��ts rC�_should_collect_from_parametersr^os-���
��$�$�f�&9�&9�6�;K�;K�L�
�	
��rT�	c�V�t|tjtjf�Sr>)r?rWrXrYrZr\s rCr^r^ts ���!�f�2�2�F�4G�4G�H�I�Ir_c�T�t|tj�xr
|jSr>)r?rWrX�_specialr\s rCr^r^ws ���!�V�1�1�2�E�1�:�:�~�Er_c�$�|�tj}g}|D]h}t||�r ||vrt|�s|j	|�t|�s�;|j
|jD�cgc]	}||vs�|��c}��jt|�Scc}w)z�Collect all type variable contained in types in order of
    first appearance (lexicographic order). For example::

        _collect_type_vars((T, List[S, T])) == (T, S)
    )	rWr
r?rL�appendr^�extendr<�tuple)�types�
typevar_types�tvarsr]s    rC�_collect_type_varsrl{s��������
��E�
���q�-�(�
�U�N��1�
��L�L��O�*�1�-��L�L�Q�%5�%5�H�%5���%��!�%5�H�I����<���Is�+	B
�5B
�T�KT�VT�T_co)�	covariant�T_contra)�
contravariant)rT�)rc�(��eZdZ�fd�Z�fd�Z�xZS)�_AnyMetac�H��|turtd��t�|�
|�S)Nz6typing_extensions.Any cannot be used with isinstance())rrH�super�__instancecheck__)�self�obj�	__class__s  �rCryz_AnyMeta.__instancecheck__�s&����s�{�� X�Y�Y��7�,�S�1�1r_c�2��|turyt�|�	�S)Nztyping_extensions.Any)rrx�__repr__)rzr|s �rCr~z_AnyMeta.__repr__�s����s�{�.��7�#�%�%r_)�__name__�
__module__�__qualname__ryr~�
__classcell__�r|s@rCrvrv�s���	2�
	&�	&r_rvc�"��eZdZdZ�fd�Z�xZS)raqSpecial type indicating an unconstrained type.
        - Any is compatible with every type.
        - Any assumed to have all methods.
        - All values assumed to be instances of Any.
        Note that all the above statements are true from the point of view of
        static type checkers. At runtime, Any should not be used with instance
        checks.
        c�P��|turtd��t�|�|g|��i|��S)NzAny cannot be instantiated)rrHrx�__new__)rN�args�kwargsr|s   �rCr�zAny.__new__�s/����c�z�� <�=�=��7�?�3�8��8��8�8r_)rr�r��__doc__r�r�r�s@rCrr�s���	�	9�	9r_r)�	metaclassr�)rT�c��eZdZd�Zd�Zy)�
_FinalFormc� �d|jzS�Nztyping_extensions.��_name�rzs rCr~z_FinalForm.__repr__����'�$�*�*�4�4r_c�v�tj||j�d��}tj||f�S�N� accepts only a single type.�rW�_type_checkr�rX�rzrO�items   rC�__getitem__z_FinalForm.__getitem__��9���%�%�j�)-����4P�&Q�S�D��'�'��t�g�6�6r_N�rr�r�r~r��r_rCr�r�����	5�	7r_r�)�_rootaWA special typing construct to indicate that a name
                       cannot be re-assigned or overridden in a subclass.
                       For example:

                           MAX_SIZE: Final = 9000
                           MAX_SIZE += 1  # Error reported by type checker

                           class Connection:
                               TIMEOUT: Final[int] = 10
                           class FastConnector(Connection):
                               TIMEOUT = 1  # Error reported by type checker

                       There is no runtime checking of these properties.)�docc�B�	d|_|S#ttf$rY|SwxYw)a�This decorator can be used to indicate to type checkers that
        the decorated method cannot be overridden, and decorated class
        cannot be subclassed. For example:

            class Base:
                @final
                def done(self) -> None:
                    ...
            class Sub(Base):
                def done(self) -> None:  # Error reported by type checker
                    ...
            @final
            class Leaf:
                ...
            class Other(Leaf):  # Error reported by type checker
                ...

        There is no runtime checking of these properties. The decorator
        sets the ``__final__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.
        T)�	__final__�AttributeErrorrH)�fs rCr%r%�s5��,	��A�K�����	�*�	�
���	�s���c�,�tj|�Sr>)rWr
)�names rCr)r)s���>�>�$��r_r+c��eZdZd�Zd�Zy)�_LiteralFormc� �d|jzSr�r�r�s rCr~z_LiteralForm.__repr__r�r_c�.�tj||�Sr>)rWrX�rzrOs  rCr�z_LiteralForm.__getitem__s���'�'��j�9�9r_Nr�r�r_rCr�r�	s��	5�	:r_r�aoA type that can be used to indicate to type checkers
                           that the corresponding value has a value literally equivalent
                           to the provided parameter. For example:

                               var: Literal[4] = 4

                           The type checker understands that 'var' is literally equal to
                           the value 4 and no other value.

                           Literal[...] cannot be subclassed. There is no runtime
                           checking verifying that the parameter is actually a value
                           instead of a type.r$c��t|d|�}	|t|j|j|jj
<tS#t$rYtSwxYw)a�Decorator for overloaded functions/methods.

        In a stub file, place two or more stub definitions for the same
        function in a row, each decorated with @overload.  For example:

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...

        In a non-stub file (i.e. a regular .py file), do the same but
        follow it with an implementation.  The implementation should *not*
        be decorated with @overload.  For example:

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...
        def utf8(value):
            # implementation goes here

        The overloads for a function can be retrieved at runtime using the
        get_overloads() function.
        �__func__)�getattr�_overload_registryr�r��__code__�co_firstlinenor��_overload_dummy)�funcr�s  rCr-r--sg��<
�D�*�d�+��	��
�q�|�|�,�Q�^�^�<��
�
�)�)�
�����	����	�s�7A�	A�Ac���t|d|�}|jtvrgSt|j}|j|vrgSt	||jj��S)z6Return all defined overloads for *func* as a sequence.r�)r�r�r�r��list�values)r�r��mod_dicts   rCr$r$Us`��
�D�*�d�+���<�<�1�1��I�%�a�l�l�3���>�>��)��I��H�Q�^�^�,�3�3�5�6�6r_c�,�tj�y)z$Clear all overloads in the registry.N)r��clearr�r_rCr"r"`s��� � �"r_r)
�Callabler�Iterable�Iteratorrr�Hashable�Sized�	Container�
Collection�
Reversiblerrc�N�t�}|jddD]�}|jdvr�t|di�}t	|j
j
��t	|j
��zD]*}|jd�r�|dvs�|j|��,��|S)N���)r/�Generic�__annotations__�_abc_)�__abstractmethods__r��__weakref__�_is_protocol�_is_runtime_protocol�__dict__�__args__�	__slots__�__next_in_mro__r<�
__origin__�__orig_bases__�	__extra__�
__tree_hash__r��__subclasshook__�__init__r�r��_MutableMapping__marker�_gorg)	�set�__mro__rr�r�r��keys�
startswith�add)rN�attrs�base�annotations�attrs     rC�_get_protocol_attrsr��s����E�E����C�R� ���=�=�3�3���d�$5�r�:������+�+�-�.��k�6F�6F�6H�1I�I�D��O�O�G�,��>F�2F��	�	�$��J�	!��Lr_c�>��t�fd�t��D��S)Nc3�J�K�|]}tt�|d�����y�wr>)�callabler�)rAr�rNs  �rCrDz,_is_callable_members_only.<locals>.<genexpr>�s"�����W�>V�d�x���T�4�0�1�>V��� #)�allr��rNs`rC�_is_callable_members_onlyr��s����W�>Q�RU�>V�W�W�Wr_c	�X��g}d|jv�rtj|j�}d}|jD]o}t	|tj
�s�|jtjtfvs�A|jj}|�td��|j}�q|�|}ndt|�}t|��|�ksGdj�fd�|D��}djd�|D��}td|�d�d	|�d
���|}t|�|_y)z�Helper function used in Protocol.__init_subclass__ and _TypedDictMeta.__new__.

    The contents of this function are very similar
    to logic found in typing.Generic.__init_subclass__
    on the CPython main branch.
    r�NzECannot inherit from Generic[...] and/or Protocol[...] multiple types.�, c3�>�K�|]}|�vs�t|����y�wr>��str)rAr]�gvarsets  �rCrDz+_maybe_adjust_parameters.<locals>.<genexpr>�s�����"M�5�a�A�W�<L�3�q�6�5�s�	�c3�2K�|]}t|����y�wr>r�)rA�gs  rCrDz+_maybe_adjust_parameters.<locals>.<genexpr>�s����"9�5�a�3�q�6�5���zSome type variables (z) are not listed in �[�])r�rWrlr�r?rXr�r�r/rrHr<r��joinrh)	rNrk�gvarsr��the_base�tvarset�s_vars�s_argsr�s	        @rC�_maybe_adjust_parametersr��s-���
�E��3�<�<�'��)�)�#�*<�*<�=�����&�&�D��4��!5�!5�6��O�O�����'A�A��?�?�3�3���$�#�@�A�A��+�+��'��=��E��%�j�G��%�j�G��g�%����"M�5�"M�M�����"9�5�"9�9���"7��x�@2�2:��1�V�H�A�!G�H�H��E��u��C�r_r/c�D�t|�jrtd��y)Nz Protocols cannot be instantiated)�typer�rH�rzr�r�s   rC�_no_initr��s ����:�"�"��>�?�?�#r_c���eZdZ�fd�Z�xZS)�
_ProtocolMetac������t�dd�rt��rt�j��ry�jrt��fd�t
��D��ryt���!��S)Nr�FTc3��K�|]9}t�|�xr'tt�|d��xst�|�du���;y�wr>)rJr�r�)rAr�rN�instances  ��rCrDz2_ProtocolMeta.__instancecheck__.<locals>.<genexpr>�sV�����=�$<�4��x��.�=�$�W�S�$��%=�>�>�<���$�/�t�;�=�$<�s�?A)	r�r��
issubclassr|r�r�r�rxry)rNrr|s``�rCryz_ProtocolMeta.__instancecheck__�sf����S�.�%�8�*�3�/��x�1�1�3�7������=�$7�s�#;�=�=� ��7�,�X�6�6r_)rr�r�ryr�r�s@rCrr�s
���
	7�
	7r_rc�T��eZdZdZdZdZ�fd�Zejd��Z	d�Z
�xZS)r/a�Base class for protocol classes. Protocol classes are defined as::

            class Proto(Protocol):
                def meth(self) -> int:
                    ...

        Such classes are primarily used with static type checkers that recognize
        structural subtyping (static duck-typing), for example::

            class C:
                def meth(self) -> int:
                    return 0

            def func(x: Proto) -> int:
                return x.meth()

            func(C())  # Passes static type check

        See PEP 544 for details. Protocol classes decorated with
        @typing_extensions.runtime act as simple-minded runtime protocol that checks
        only the presence of given attributes, ignoring their type signatures.

        Protocol classes can be generic, they are defined as::

            class GenProto(Protocol[T]):
                def meth(self) -> T:
                    ...
        r�Tc�H��|turtd��t�|�
|�S)NzIType Protocol cannot be instantiated; it can only be used as a base class)r/rHrxr�)rNr��kwdsr|s   �rCr�zProtocol.__new__s.����h���!F�G�G��7�?�3�'�'r_c�X��t|t�s|f}|s+|tjurt	d|j
�d���d�t�fd�|D��}|tur�td�|D��sYd}t||tj�r#|dz
}t||tj�r�#t	d|dz�d	||����tt|��t|�k7r+t	d
��t||t|j��tj||�S)NzParameter list to z[...] cannot be emptyz*Parameters to generic types must be types.c3�J�K�|]}tj|�����y�wr>�rWr��rArB�msgs  �rCrDz-Protocol.__class_getitem__.<locals>.<genexpr>s�����F�v�!�6�-�-�a��5�v�r�c3�PK�|]}t|tj���� y�wr>)r?rWr
r@s  rCrDz-Protocol.__class_getitem__.<locals>.<genexpr>s����I�&�Q�:�a����8�&���$&r�zBParameters to Protocol[...] must all be type variables. Parameter z is z.Parameters to Protocol[...] must all be unique)r?rhrW�TuplerHr�r/r�r
rKr�rSr<rX)rN�params�ir
s   @rC�__class_getitem__zProtocol.__class_getitem__s"����f�e�,� ����c����5��(��)9�)9�(:�:O�P�R�R�>�C��F�v�F�F�F��h���I�&�I�I��A�$�V�A�Y����?��Q���%�V�A�Y����?�#�&�&'�!�e�W�D�����=�>�>��s�6�{�#�s�6�{�2�#�H�J�J��s�F�C��0B�0B�,C�D��'�'��V�4�4r_c���d�jvrtj�jv}ntj�jv}|rtd��t
���jjdd�s!td��jD���_	�fd�}d�jvr|�_
�jsy�jD]p}|ttjfvr�|jdk(r|jtvr�>t|t �r
|jr�[tdt#|�����t$�_y)	Nr�z!Cannot inherit from plain Genericr�c3�,K�|]}|tu���y�wr>)r/)rA�bs  rCrDz-Protocol.__init_subclass__.<locals>.<genexpr>3s����&L�m��q�H�}�m�s�c����jjdd�stSt�dd�s5t	j
d�jddvrtStd��t��s5t	j
d�jddvrtStd��t|t�std	��t��D]�}|jD]w}||jvr|j|�
tccS�;t|d
i�}t|tj�s�T||vs�Yt|t�s�j|j s�w��tcSy)Nr�r�Fr�r)�abc�	functoolszBInstance and class checks can only be used with @runtime protocolsz<Protocols with non-method members don't support issubclass()z"issubclass() arg 1 must be a classr�T)r��get�NotImplementedr��sys�	_getframe�	f_globalsrHr�r?r�r�r�rW�Mappingrr�)�otherr�r�r�rNs    �rC�_proto_hookz/Protocol.__init_subclass__.<locals>._proto_hook6s>����|�|�'�'���=�)�)��s�$:�E�B��}�}�Q�'�1�1�*�=�AU�U�-�-�#�%:�;�;�0��5��}�}�Q�'�1�1�*�=�AU�U�-�-�#�%B�C�C�!�%��.�#�$H�I�I�/��4�D� %�
�
���4�=�=�0�#�}�}�T�2�:�'5� 5�!�&-�d�4E�r�&J��&�{�F�N�N�C� $�� 3� *�5�-� @� %� 2� 2�!�!.� .�-�5�r_r�zcollections.abcz5Protocols can only inherit from other protocols, got )r�rWr�r��	__bases__rHr�r�anyr�r��objectr�r�_PROTO_WHITELISTr?r�reprr�r�)rNr�r��errorr"r�s`     rC�__init_subclass__zProtocol.__init_subclass__(s����3�<�<�/����#�*<�*<�<�����#�-�-�7���� C�D�D�$�S�)��<�<�#�#�N�D�9�#&�&L�c�m�m�&L�#L�� �
�>"����5�'2��$��#�#���
�
������� 8�8����+<�<��
�
�)9�9�"�4��7�D�<M�<M�#�%7�7;�D�z�l�%D�E�E�&�$�C�Lr_)rr�r�r�r�r�r�rW�	_tp_cacherr)r�r�s@rCr/r/�s8���	�8�	���	(�
�	�	�	5�
�	5�2<	$r_r2c�h�t|t�r|jstd|����d|_|S)a4Mark a protocol class as a runtime protocol, so that it
        can be used with isinstance() and issubclass(). Raise TypeError
        if applied to a non-protocol class.

        This allows a simple-minded structural check very similar to the
        one-offs in collections.abc such as Hashable.
        z@@runtime_checkable can be only applied to protocol classes, got T)r?rr�rHr�r�s rCr2r2ls?���#�}�-�S�5E�5E��$�$'�7�,�-�
-�#'�� ��
r_rc�:�eZdZdZej
defd��Zy)rr��returnc��yr>r�r�s rC�	__index__zSupportsIndex.__index__�s��r_N)rr�r�r�r�abstractmethod�intr/r�r_rCrr�s&���	�	�	�	�	�s�	�
�	r_r9c��	tjd�jddvrtd��	y#tt
f$rYywxYw)Nrr)rrrWz4TypedDict does not support instance and class checksF)rrrrHr��
ValueError)rNr!s  rC�_check_failsr4�s_��	��}�}�Q��)�)�*�5�>H�H� � V�W�W�	H����
�+�	���	�s�/3�A�Ac�F�|std��|d|dd}}t|i|��S)N�)TypedDict.__new__(): not enough argumentsrr)rH�dict)r�r��_s   rC�	_dict_newr9�s4����G�H�H��q�'�4���8�4���T�$�V�$�$r_z,($cls, _typename, _fields=None, /, **kwargs)��totalc��|std��|d|dd}}|r|d|dd}}n=d|vr.|jd�}ddl}|jdtd��ntd��|r	|\}nBd|vr<t
|�dk(r.|jd�}ddl}|jdtd��nd}|�|}n
|rtd
��dt|�i}	tjd�jjdd�|d<t|d||��S#t
$rtd	t
|�dz�d
���wxYw#tt
f$rY�HwxYw)Nr6rr�	_typenamez5Passing '_typename' as keyword argument is deprecatedr�)�
stacklevelzGTypedDict.__new__() missing 1 required positional argument: '_typename'z?TypedDict.__new__() takes from 2 to 3 positional arguments but z were given�_fieldsz3Passing '_fields' as keyword argument is deprecatedz@TypedDict takes either a dict or keyword arguments, but not bothr�r�__main__r�r�r:)rH�pop�warnings�warn�DeprecationWarningr3rKr7rrrrr��_TypedDictMeta)r;r�r�r8�typenamerB�fields�nss        rC�_typeddict_newrI�s�����G�H�H��q�'�4���8�4���!�!�W�d�1�2�h�d�H�
�F�
"��z�z�+�.�H���M�M�Q�,��
�
<��4�5�
5��
.����
�&�
 �S��[�A�%5��Z�Z�	�*�F���M�M�O�,��
�
<��F��>��F�
��,�-�
-� ��f��
.��	�"�}�}�Q�/�9�9�=�=�j�*�U�B�|���h��B�e�<�<��3�
.��!<�<?��I��M�?�K-�!-�.�.�
.��,�
�+�	��	�s�%D
�2D5�
%D2�5E�Ez;($cls, _typename, _fields=None, /, *, total=True, **kwargs)c�4��eZdZd�fd�	Zd�fd�	ZexZZ�xZS)rEc�(��t�|�|||�yr>)rxr�)rNr��basesrHr;r|s     �rCr�z_TypedDictMeta.__init__�s����G��T�5�"�-r_c	���|dk(rtnt|d<t�|�
||tf|�}td�|D��r&tjtf|_t|�i}|jdi�}d}|j�D�	�
cic]\}	}
|	t
j|
|���}}	}
t�}t�}|D]�}
|j|
jjdi��|j|
jjdd��|j|
jjdd����|j|�|j�D]�\}}t!|�}|t"urt%|�}|r|d	}t!|�}|t&ur|j)|��P|t*ur|j)|��j|r|j)|��~|j)|���||_t/|�|_t/|�|_t5|d
�s||_|Scc}
}	w)Nrr�c3�PK�|]}t|tj���� y�wr>)rrWr��rAr�s  rCrDz)_TypedDictMeta.__new__.<locals>.<genexpr>�s����F���:�d�F�N�N�3��rr�z?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type�__required_keys__r��__optional_keys__r�	__total__)rIr9rxr�r7r$rWr�r#r�r�itemsr�r��updater�r'rr&r9r�r:r��	frozensetrPrQrJrR)rNr�rLrHr;�tp_dictr��own_annotationsr
�n�tp�
required_keys�
optional_keysr��annotation_key�annotation_type�annotation_origin�annotation_argsr|s                  �rCr�z_TypedDictMeta.__new__�s���/3�k�.A�N�y�B�y�M�
�g�o�c�4�$��"�=�G��F��F�F�%+�^�^�T�$:��!�(��1��K� �f�f�%6��;�O�S�C�<K�<Q�<Q�<S��<S�5�1�b��6�%�%�b�#�.�.�<S�
�� �E�M��E�M����"�"�4�=�=�#4�#4�5F��#K�L��$�$�T�]�]�%6�%6�7J�B�%O�P��$�$�T�]�]�%6�%6�7J�B�%O�P��

����/�3B�3H�3H�3J�/���$.��$?�!�$�	�1�&.��&?�O�&�*9�!�*<��,6��,G�)�$��0�!�%�%�n�5�&�+�5�!�%�%�n�5��!�%�%�n�5�!�%�%�n�5�4K�"'2�G�#�(1�-�(@�G�%�(1�-�(@�G�%��7�K�0�$)��!��N��Es�!H<)T)	rr�r�r�r�r4ry�__subclasscheck__r�r�s@rCrErE�s���	.�7	�r1=�<��-r_rEra�A simple typed name space. At runtime it is equivalent to a plain dict.

        TypedDict creates a dictionary type that expects all of its
        instances to have a certain set of keys, with each key
        associated with a value of a consistent type. This expectation
        is not checked at runtime but is only enforced by type checkers.
        Usage::

            class Point2D(TypedDict):
                x: int
                y: int
                label: str

            a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
            b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

            assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

        The type info can be accessed via the Point2D.__annotations__ dict, and
        the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
        TypedDict supports two additional equivalent forms::

            Point2D = TypedDict('Point2D', x=int, y=int, label=str)
            Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

        The class syntax is only supported in Python 3.6+, while two other
        syntax forms work for Python 2.7 and 3.2+
        c�4�t|tt��S)aCheck if an annotation is a TypedDict class

        For example::
            class Film(TypedDict):
                title: str
                year: int

            is_typeddict(Film)  # => True
            is_typeddict(Union[list, str])  # => False
        )r?rh�_TYPEDDICT_TYPES�rYs rCr*r*?s���"�e�$4�5�6�6r_r!c��|S)a�Assert (to the type checker) that the value is of the given type.

        When the type checker encounters a call to assert_type(), it
        emits an error if the value is not of the specified type::

            def greet(name: str) -> None:
                assert_type(name, str)  # ok
                assert_type(name, int)  # type checker error

        At runtime this returns the first argument unchanged and otherwise
        does nothing.
        r�)�__val�__typs  rCr!r!Qs	���r_c�\�t|t�rt|j�St	|d�r0|jt
tfvrt|jd�St|tj�r>td�|jD��}||jk(r|S|j|�St	td�rgt|tj�rMtd�|jD��}||jk(r|Stj|j|�St	td�rkt|tj�rQtd�|jD��}||jk(r|Stj t"j$|�S|S)z=Strips Annotated, Required and NotRequired from a given type.r�rc3�2K�|]}t|����y�wr>��
_strip_extras�rA�as  rCrDz _strip_extras.<locals>.<genexpr>o�����!G�J�q�-��"2�J�r�rZc3�2K�|]}t|����y�wr>rirks  rCrDz _strip_extras.<locals>.<genexpr>trmr�r[c3�2K�|]}t|����y�wr>rirks  rCrDz _strip_extras.<locals>.<genexpr>yrmr�)r?�_AnnotatedAliasrjr�rJr9r:r�rWrXrh�	copy_withrirZr[r�reduce�operator�or_)r]�
stripped_argss  rCrjrjhs9���a��)� ����.�.��1�l�#�����;�8O�(O� ����A��/�/��a��-�-�.�!�!G�A�J�J�!G�G�M���
�
�*����;�;�}�-�-��5�.�)�j��E�<N�<N�.O�!�!G�A�J�J�!G�G�M���
�
�*����%�%�a�l�l�M�B�B��5�+�&�:�a����+I�!�!G�A�J�J�!G�G�M���
�
�*����#�#�H�L�L�-�@�@��r_Fc���ttd�rtj|||d��}ntj|||��}|r|S|j�D��cic]\}}|t	|���c}}Scc}}w)a�Return type hints for an object.

        This is often the same as obj.__annotations__, but it handles
        forward references encoded as string literals, adds Optional[t] if a
        default value equal to None is set and recursively replaces all
        'Annotated[T, ...]', 'Required[T]' or 'NotRequired[T]' with 'T'
        (unless 'include_extras=True').

        The argument may be a module, class, method, or function. The annotations
        are returned as a dictionary. For classes, annotations include also
        inherited members.

        TypeError is raised if the argument is not of a type that can contain
        annotations, and an empty dictionary is returned if no annotations are
        present.

        BEWARE -- the behavior of globalns and localns is counterintuitive
        (unless you are familiar with how eval() and exec() work).  The
        search order is locals first, then globals.

        - If no dict arguments are passed, an attempt is made to use the
          globals from obj (or the respective module's globals for classes),
          and these are also used as the locals.  If the object does not appear
          to have globals, an empty dictionary is used.

        - If one dict argument is passed, it is used for both globals and
          locals.

        - If two dict arguments are passed, they specify globals and
          locals, respectively.
        rT)�globalns�localns�include_extras)rwrx)rJrWr(rSrj)r{rwrxry�hint�kr]s       rCr(r(�sr��@�6�;�'��(�(��h����D��(�(��x��Q�D���K�04�
�
��=����1��=��#�#��=�=��=s�A4rc�@��eZdZdZ�fd�Zd�Zd�Zd�Zd�Zd�Z	�xZ
S)rpaKRuntime representation of an annotated type.

        At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
        with extra annotations. The alias behaves like a normal typing alias,
        instantiating is the same as instantiating the underlying type, binding
        it to types is also the same.
        c���t|t�r|j|z}|j}t�|�||�||_yr>)r?rp�__metadata__r�rxr�)rz�origin�metadatar|s   �rCr�z_AnnotatedAlias.__init__�s?����&�/�2�!�.�.��9���*�*���G��V�V�,� (�D�r_c�X�t|�dk(sJ�|d}t||j�S)Nrr)rKrpr~)rzr�new_types   rCrqz_AnnotatedAlias.copy_with�s0���v�;�!�#�#�#��a�y�H�"�8�T�->�->�?�?r_c��dtj|j��ddjd�|jD���d�S)Nztyping_extensions.Annotated[r�c3�2K�|]}t|����y�wr>)r'rks  rCrDz+_AnnotatedAlias.__repr__.<locals>.<genexpr>�s���� D�2C�Q��a��2C�r�r�)rW�
_type_reprr�r�r~r�s rCr~z_AnnotatedAlias.__repr__�sE��2�6�3D�3D�T�_�_�3U�2V�VX��y�y� D�$�2C�2C� D�D�E�Q�H�
Ir_c�b�tjt|jf|jzffSr>)rs�getitemrr�r~r�s rC�
__reduce__z_AnnotatedAlias.__reduce__�s1���#�#��D�O�O�-��0A�0A�A�&��
r_c��t|t�stS|j|jk7ry|j|jk(S)NF)r?rprr�r~�rzr!s  rC�__eq__z_AnnotatedAlias.__eq__�s>���e�_�5�%�%����%�"2�"2�2���$�$��(:�(:�:�:r_c�D�t|j|jf�Sr>)�hashr�r~r�s rC�__hash__z_AnnotatedAlias.__hash__�s������$�*;�*;�<�=�=r_)rr�r�r�r�rqr~r�r�r�r�r�s@rCrprp�s(���	�	)�	@�
	I�	�
	;�	>r_rpc�D�eZdZdZdZd�Zejd��Zd�Z	y)ra�Add context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to the
        hypothetical runtime_check module that this type is an unsigned int.
        Every other consumer of this type can ignore this metadata and treat
        this type as int.

        The first argument to Annotated must be a valid type (and will be in
        the __origin__ field), the remaining arguments are kept as a tuple in
        the __extra__ field.

        Details:

        - It's an error to call `Annotated` with less than two arguments.
        - Nested Annotated are flattened::

            Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

        - Instantiating an annotated type is equivalent to instantiating the
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can be used as a generic type alias::

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
        r�c��td��)Nz&Type Annotated cannot be instantiated.�rH�rNr�r�s   rCr�zAnnotated.__new__�s���D�E�Er_c��t|t�rt|�dkrtd��tt
f}t
|d�|vr|d}nd}tj|d|�}t|dd�}t||�S)Nr�zUAnnotated[...] should be used with at least two arguments (a type and an annotation).rz$Annotated[t, ...]: t must be a type.r)
r?rhrKrHrrr'rWr�rp)rNr�allowed_special_formsrr
r�s      rCrzAnnotated.__class_getitem__s����f�e�,��F��a���!/�0�0�&.�u�$5�!��&��)�$�(=�=�����<���+�+�F�1�I�s�;���V�A�B�Z�(�H�"�6�8�4�4r_c�4�td|j�d���)N�Cannot subclass z
.Annotated)rHr�r�s   rCr)zAnnotated.__init_subclass__s ���"�3�>�>�"2�*�=��
r_N)
rr�r�r�r�r�rWr*rr)r�r_rCrr�s4��	�@�	�	F�
�	�	�	5�
�	5�	r_)�_BaseGenericAlias)rZc���t|t�rtSt|tjt
tttf�r|jS|tjurtjSy)a6Get the unsubscripted version of a type.

        This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
        and Annotated. Return None for unsupported types. Examples::

            get_origin(Literal[42]) is Literal
            get_origin(int) is None
            get_origin(ClassVar[int]) is ClassVar
            get_origin(Generic) is Generic
            get_origin(Generic[T]) is Generic
            get_origin(Union[T, int]) is Union
            get_origin(List[Tuple[T, T]][int]) == list
            get_origin(P.args) is P
        N)r?rprrWrX�_typing_GenericAliasr�r	r
r�r�rcs rCr'r''sY���b�/�*����b�6�/�/�1E�GX�(�/�;�<��=�=� �
������>�>�!�r_c�V�t|t�r|jf|jzSt|tj
tf�r_t|dd�ry|j}t|�tjjur|dturt|dd�|df}|Sy)a�Get type arguments with all substitutions performed.

        For unions, basic simplifications used by Union constructor are performed.
        Examples::
            get_args(Dict[str, int]) == (str, int)
            get_args(int) == ()
            get_args(Union[int, Union[T, int], str][int]) == (int, str)
            get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
            get_args(Callable[[], T][int]) == ([], int)
        rdFr�rNr�)r?rpr�r~rWrXr�r�r�r'�collectionsrr��Ellipsisr�)rY�ress  rCr&r&?s����b�/�*��M�M�#�b�o�o�5�5��b�6�/�/�1E�F�G��r�:�u�-���+�+�C��"�~����!9�!9�9�c�!�f�H�>T��C���H�~�s�2�w�/���J�r_r4c��eZdZd�Zy)�_TypeAliasFormc� �d|jzSr�r�r�s rCr~z_TypeAliasForm.__repr__\r�r_N�rr�r�r~r�r_rCr�r�[���	5r_r�c��t|�d���)a&Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example above.
        � is not subscriptabler�r�s  rCr4r4_s���4�&� 5�6�7�7r_c��eZdZd�Zy)r�c� �d|jzSr�r�r�s rCr~z_TypeAliasForm.__repr__or�r_Nr�r�r_rCr�r�nr�r_a�Special marker indicating that an assignment should
                               be recognized as a proper type alias definition by type
                               checkers.

                               For example::

                                   Predicate: TypeAlias = Callable[..., bool]

                               It's invalid when used anywhere except as in the example
                               above.c��eZdZdZdZd�Zy)�
_DefaultMixinzMixin for TypeVarLike defaults.r�c��t|ttf�rtd�|D��|_y|rt	j
|d�|_yd|_y)Nc3�HK�|]}tj|d����y�w)�Default must be a typeNr)rA�ds  rCrDz)_DefaultMixin.__init__.<locals>.<genexpr>�s&����&8�/6�!�'-�&8�&8��<T�&U�/6�s� "r�)r?rhr��__default__rWr�)rz�defaults  rCr�z_DefaultMixin.__init__�sK���g��t�}�-�$�&8�/6�&8� 9�D��
�%�1�1�'�;S�T�D��#�D�r_N)rr�r�r�r�r�r�r_rCr�r�s��)��I�$r_r�c�4��eZdZdZdZdddddd��fd�
Z�xZS)r
zType variable.rWNF)�boundrqrsr��infer_variancec���t�	|�|g|��|||d��tj||�||_	t	j
d�jjdd�}|dk7r||_
yy#ttf$rd}Y�!wxYw�N)r�rqrsrrr@�typing_extensions)rxr�r��__infer_variance__rrrrr�r3r�)
rzr�r�rqrsr�r��constraints�def_modr|s
         �rCr�zTypeVar.__init__�s����	����	6��	6�5�I�'4�	6����t�W�-�"0���	��m�m�A�&�0�0�4�4�Z��L�G��)�)�%�D�O�*���
�+�	��G�	�s�/A2�2B�B�rr�r�r�r�r�r�s@rCr
r
�s"�����J�15� ���e�&�&r_r
r	c� �eZdZdZdZd�Zd�Zy)�
_Immutablez3Mixin to indicate that object should not be copied.r�c��|Sr>r�r�s rC�__copy__z_Immutable.__copy__�����Kr_c��|Sr>r�)rz�memos  rC�__deepcopy__z_Immutable.__deepcopy__�r�r_N)rr�r�r�r�r�r�r�r_rCr�r��s��A��	�	�	r_r�c�"�eZdZdZd�Zd�Zd�Zy)r	aQThe args for a ParamSpec object.

        Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.

        ParamSpecArgs objects have a reference back to their ParamSpec:

        P.args.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        c��||_yr>�r��rzrs  rCr�zParamSpecArgs.__init__��	��$�D�Or_c�4�|jj�d�S)Nz.args�r�rr�s rCr~zParamSpecArgs.__repr__�s���o�o�.�.�/�u�5�5r_c�`�t|t�stS|j|jk(Sr>)r?r	rr�r�s  rCr�zParamSpecArgs.__eq__�s'���e�]�3�%�%��?�?�e�&6�&6�6�6r_N�rr�r�r�r�r~r�r�r_rCr	r	�s��
	�	%�	6�	7r_c�"�eZdZdZd�Zd�Zd�Zy)r
a[The kwargs for a ParamSpec object.

        Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.

        ParamSpecKwargs objects have a reference back to their ParamSpec:

        P.kwargs.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        c��||_yr>r�r�s  rCr�zParamSpecKwargs.__init__�r�r_c�4�|jj�d�S)Nz.kwargsr�r�s rCr~zParamSpecKwargs.__repr__�s���o�o�.�.�/�w�7�7r_c�`�t|t�stS|j|jk(Sr>)r?r
rr�r�s  rCr�zParamSpecKwargs.__eq__�s'���e�_�5�%�%��?�?�e�&6�&6�6�6r_Nr�r�r_rCr
r
�s��
	�	%�	8�	7r_r
rc�2��eZdZdZdZddddd��fd�
Z�xZS)rz!Parameter specification variable.rWNF�r�rqrsr�c���t�|�||||��tj||�	tjd�j
j
dd�}|dk7r||_	yy#ttf$rd}Y�!wxYwr��
rxr�r�rrrrr�r3r��rzr�r�rqrsr�r�r|s       �rCr�zParamSpec.__init__�s�����G��T��)�+8�
�
:��"�"�4��1�
��-�-��*�4�4�8�8��Z�P���-�-�")���.��#�J�/�
���
�s�/A)�)A=�<A=r�r�s@rCrr�s���/��
�*.�%�u�!�	*�	*r_c���eZdZdZej
Zed��Zed��Z	ddddd��fd�
Z
d�Zd	�Zd
�Z
d�Zd�Z�xZS)
ra'Parameter specification variable.

        Usage::

           P = ParamSpec('P')

        Parameter specification variables exist primarily for the benefit of static
        type checkers.  They are used to forward the parameter types of one
        callable to another callable, a pattern commonly found in higher order
        functions and decorators.  They are only valid when used in ``Concatenate``,
        or s the first argument to ``Callable``. In Python 3.10 and higher,
        they are also supported in user-defined Generics at runtime.
        See class Generic for more information on generic types.  An
        example for annotating a decorator::

           T = TypeVar('T')
           P = ParamSpec('P')

           def add_logging(f: Callable[P, T]) -> Callable[P, T]:
               '''A type-safe decorator to add logging to a function.'''
               def inner(*args: P.args, **kwargs: P.kwargs) -> T:
                   logging.info(f'{f.__name__} was called')
                   return f(*args, **kwargs)
               return inner

           @add_logging
           def add_two(x: float, y: float) -> float:
               '''Add two numbers together.'''
               return x + y

        Parameter specification variables defined with covariant=True or
        contravariant=True can be used to declare covariant or contravariant
        generic types.  These keyword arguments are valid, but their actual semantics
        are yet to be decided.  See PEP 612 for details.

        Parameter specification variables can be introspected. e.g.:

           P.__name__ == 'T'
           P.__bound__ == None
           P.__covariant__ == False
           P.__contravariant__ == False

        Note that only parameter specification variables defined in global scope can
        be pickled.
        c��t|�Sr>)r	r�s rCr�zParamSpec.args0s
�� ��&�&r_c��t|�Sr>)r
r�s rCr�zParamSpec.kwargs4s
��"�4�(�(r_NFr�c���t�|�|g�||_t|�|_t|�|_|rt
j|d�|_nd|_tj||�	tjd�jjdd�}|dk7r||_yy#ttf$rd}Y�!wxYw)NzBound must be a type.rrr@r�)rxr�r�bool�
__covariant__�__contravariant__rWr��	__bound__r�rrrrr�r3r�r�s       �rCr�zParamSpec.__init__8s�����G��d�V�$� �D�M�!%�i��D��%)�-�%8�D�"��!'�!3�!3�E�;R�!S���!%����"�"�4��1�
��-�-��*�4�4�8�8��Z�P���-�-�")���.��#�J�/�
���
�s�5/B2�2C�Cc�`�|jrd}n|jrd}nd}||jzS)N�+�-�~)r�r�r)rz�prefixs  rCr~zParamSpec.__repr__Ls2���!�!����'�'������D�M�M�)�)r_c�,�tj|�Sr>�r%r�r�s rCr�zParamSpec.__hash__U����?�?�4�(�(r_c�
�||uSr>r�r�s  rCr�zParamSpec.__eq__X����5�=� r_c��|jSr>�rr�s rCr�zParamSpec.__reduce__[����=�=� r_c��yr>r�r�s   rC�__call__zParamSpec.__call___���r_)rr�r�r�rWr
r|�propertyr�r�r�r~r�r�r�r�r�r�s@rCrr�sd���,	�^�N�N�	�	�	'�
�	'�
�	)�
�	)�+/�%�u�!�	*�(	*�	)�	!�	!�	r_rc�\��eZdZejZdZ�fd�Zd�Zd�Z	d�Z
ed��Z�xZ
S)�_ConcatenateGenericAliasFc�@��t�|�|�||_||_yr>)rxr�r�r�)rzrr�r|s   �rCr�z!_ConcatenateGenericAlias.__init__ns����G��T�"�$�D�O� �D�Mr_c���tj��|j��ddj�fd�|jD���d�S)Nr�r�c3�.�K�|]}�|����y�wr>r�)rA�argr�s  �rCrDz4_ConcatenateGenericAlias.__repr__.<locals>.<genexpr>vs�����!K�]�c�*�S�/�]�s�r�)rWr�r�r�r�)rzr�s @rCr~z!_ConcatenateGenericAlias.__repr__ssF����*�*�J�!�$�/�/�2�3���	�	�!K�T�]�]�!K�K�L�A�O�
Pr_c�D�t|j|jf�Sr>)r�r�r�r�s rCr�z!_ConcatenateGenericAlias.__hash__xs������$�-�-�8�9�9r_c��yr>r�r�s   rCr�z!_ConcatenateGenericAlias.__call__|r�r_c�:�td�|jD��S)Nc3�bK�|]'}t|tjtf�s�$|���)y�wr>)r?rWr
r)rArYs  rCrDz:_ConcatenateGenericAlias.__parameters__.<locals>.<genexpr>�s&�����*�r�j��f�n�n�i�=X�.Y��]�s�%/�/)rhr�r�s rCr<z'_ConcatenateGenericAlias.__parameters__s ����!�]�]���
r_)rr�r�rWrXr|rdr�r~r�r�r�r<r�r�s@rCr�r�fs@����(�(�	���	!�
	P�
	:�	�
�	�
�	r_r�c����|dk(rtd��t|t�s|f}t|dt�std��d�t�fd�|D��}t	||�S)Nr�z&Cannot take a Concatenate of no types.r�zAThe last parameter to Concatenate should be a ParamSpec variable.z/Concatenate[arg, ...]: each arg must be a type.c3�J�K�|]}tj|�����y�wr>rrs  �rCrDz'_concatenate_getitem.<locals>.<genexpr>�s�����F�:�a�v�)�)�!�S�1�:�r�)rHr?rhrr�)rzrOr
s  @rC�_concatenate_getitemr��sj����R���@�A�A��j�%�(� �]�
��j��n�i�0��.�/�	/�
;�C��F�:�F�F�J�#�D�*�5�5r_c��t||�S)�&Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        �r�r�s  rCrr�s��$�D�*�5�5r_c��eZdZd�Zd�Zy)�_ConcatenateFormc� �d|jzSr�r�r�s rCr~z_ConcatenateForm.__repr__�r�r_c��t||�Sr>r�r�s  rCr�z_ConcatenateForm.__getitem__�s��'��j�9�9r_Nr�r�r_rCr�r��s��	5�	:r_r�r�r5c��eZdZd�Zy)�_TypeGuardFormc� �d|jzSr�r�r�s rCr~z_TypeGuardForm.__repr__�r�r_Nr�r�r_rCrr�r�r_rc�b�tj||�d��}tj||f�S)�	Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        r�)rWr�rXr�s   rCr5r5�s4��X�!�!�*���6R�.S�T���#�#�D�4�'�2�2r_c��eZdZd�Zd�Zy)rc� �d|jzSr�r�r�s rCr~z_TypeGuardForm.__repr__�r�r_c�v�tj||j�d��}tj||f�S)Nz accepts only a single typer�r�s   rCr�z_TypeGuardForm.__getitem__�s9���%�%�j�)-����4O�&P�R�D��'�'��t�g�6�6r_Nr�r�r_rCrr�r�r_rc�p�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ejd��Zy
)�_SpecialForm)r�r��_getitemc�V�||_|j|_|j|_yr>)r
rr�r�)rzr�s  rCr�z_SpecialForm.__init__3s!����
��%�%��
�����r_c�8�|dvr|jSt|��)N>rr�)r�r�)rzr�s  rC�__getattr__z_SpecialForm.__getattr__8s ���/�/��:�:���T�"�"r_c��td|����)Nr�r�)rzrLs  rC�__mro_entries__z_SpecialForm.__mro_entries__>s���*�4�(�3�4�4r_c� �d|j��Sr�r�r�s rCr~z_SpecialForm.__repr__As��#�D�J�J�<�0�0r_c��|jSr>r�r�s rCr�z_SpecialForm.__reduce__Ds���z�z�r_c��td|����)NzCannot instantiate r��rzr�rs   rCr�z_SpecialForm.__call__Gs���-�d�X�6�7�7r_c�,�tj||fSr>�rW�Unionr�s  rC�__or__z_SpecialForm.__or__Js���|�|�D�%�K�(�(r_c�,�tj||fSr>rr�s  rC�__ror__z_SpecialForm.__ror__Ms���|�|�E�4�K�(�(r_c��t|�d���)Nz! cannot be used with isinstance()r�)rzr{s  rCryz_SpecialForm.__instancecheck__P����4�&� A�B�C�Cr_c��t|�d���)Nz! cannot be used with issubclass()r�)rzrNs  rCr`z_SpecialForm.__subclasscheck__Srr_c�&�|j||�Sr>)r
r�s  rCr�z_SpecialForm.__getitem__Vs���}�}�T�:�.�.r_N)rr�r�r�r�r
rr~r�r�rrryr`rWr*r�r�r_rCr	r	0sU��0�I�'�
#�5�1��8�)�)�D�D����/��/r_r	rc��t|�d���)aDRepresents an arbitrary literal string.

        Example::

          from typing_extensions import LiteralString

          def query(sql: LiteralString) -> ...:
              ...

          query("SELECT * FROM table")  # ok
          query(f"SELECT * FROM {input()}")  # not ok

        See PEP 675 for details.

        r�r��rzrs  rCrr^s��"�4�&� 5�6�7�7r_rc��t|�d���)z�Used to spell the type of "self" in classes.

        Example::

          from typing import Self

          class ReturnsSelf:
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        r�r�rs  rCrrus���4�&� 5�6�7�7r_r7c��t|�d���)a�The bottom type, a type that has no members.

        This can be used to define a function that should never be
        called, or a function that never returns::

            from typing_extensions import Never

            def never_call_me(arg: Never) -> None:
                pass

            def int_or_str(arg: int | str) -> None:
                never_call_me(arg)  # type checker error
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                    case _:
                        never_call_me(arg)  # ok, arg is of type Never

        r�r�rs  rCr7r7�s��0�4�&� 5�6�7�7r_c��eZdZd�Zy)�_ExtensionsSpecialFormc� �d|jzSr�r�r�s rCr~z_ExtensionsSpecialForm.__repr__�r�r_Nr�r�r_rCr#r#�r�r_r#c�v�tj||j�d��}tj||f�S)��A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        r�r�r�s   rCr9r9�s7��"�!�!�*�����<X�.Y�Z���#�#�D�4�'�2�2r_c�v�tj||j�d��}tj||f�S)�`A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        r�r�r�s   rCr:r:�s7���!�!�*�����<X�.Y�Z���#�#�D�4�'�2�2r_c��eZdZd�Zd�Zy)�
_RequiredFormc� �d|jzSr�r�r�s rCr~z_RequiredForm.__repr__�r�r_c�v�tj||j�d��}tj||f�Sr�r�r�s   rCr�z_RequiredForm.__getitem__�r�r_Nr�r�r_rCr*r*�s��	5�	7r_r*r&r:r(rc��eZdZd�Zy)�_UnpackSpecialFormc� �d|jzSr�r�r�s rCr~z_UnpackSpecialForm.__repr__r�r_Nr�r�r_rCr.r.r�r_r.c�$�eZdZejZy��_UnpackAliasN�rr�r�rWr
r|r�r_rCr2r2����N�N�	r_r2c�b�tj||j�d��}t||f�S)�A special typing construct to unpack a variadic type. For example:

            Shape = TypeVarTuple('Shape')
            Batch = NewType('Batch', int)

            def add_batch_axis(
                x: Array[Unpack[Shape]]
            ) -> Array[Batch, Unpack[Shape]]: ...

        r��rWr�r�r2r�s   rCrrs1���!�!�*�����<X�.Y�Z���D�4�'�*�*r_c�"�t|t�Sr>�r?r2�r{s rCrLrL����#�|�,�,r_c�$�eZdZejZyr1r3r�r_rCr2r2r4r_c��eZdZd�Zd�Zy)�_UnpackFormc� �d|jzSr�r�r�s rCr~z_UnpackForm.__repr__r�r_c�b�tj||j�d��}t||f�Sr�r7r�s   rCr�z_UnpackForm.__getitem__!s3���%�%�j�)-����4P�&Q�S�D���t�g�.�.r_Nr�r�r_rCr>r>s��	5�	/r_r>r6c�"�t|t�Sr>r9r:s rCrLrL3r;r_rc�(��eZdZdZdd��fd�
Z�xZS)rzType variable tuple.N�r�c���t�|�|�tj||�	tjd�j
j
dd�}|dk7r||_	yy#ttf$rd}Y�!wxYw�Nrrr@r�r�)rzr�r�r�r|s    �rCr�zTypeVarTuple.__init__=sx����G��T�"��"�"�4��1�
��-�-��*�4�4�8�8��Z�P���-�-�")���.��#�J�/�
���
�s�/A%�%A9�8A9r�r�s@rCrr:s���"�,0�
	*�
	*r_c�X�eZdZdZej
Zd�Zdd�d�Zd�Z	d�Z
d�Zd	�Zd
�Z
y)ra�Type variable tuple.

        Usage::

            Ts = TypeVarTuple('Ts')

        In the same way that a normal type variable is a stand-in for a single
        type such as ``int``, a type variable *tuple* is a stand-in for a *tuple*
        type such as ``Tuple[int, str]``.

        Type variable tuples can be used in ``Generic`` declarations.
        Consider the following example::

            class Array(Generic[*Ts]): ...

        The ``Ts`` type variable tuple here behaves like ``tuple[T1, T2]``,
        where ``T1`` and ``T2`` are type variables. To use these type variables
        as type parameters of ``Array``, we must *unpack* the type variable tuple using
        the star operator: ``*Ts``. The signature of ``Array`` then behaves
        as if we had simply written ``class Array(Generic[T1, T2]): ...``.
        In contrast to ``Generic[T1, T2]``, however, ``Generic[*Shape]`` allows
        us to parameterise the class with an *arbitrary* number of type parameters.

        Type variable tuples can be used anywhere a normal ``TypeVar`` can.
        This includes class definitions, as shown above, as well as function
        signatures and variable annotations::

            class Array(Generic[*Ts]):

                def __init__(self, shape: Tuple[*Ts]):
                    self._shape: Tuple[*Ts] = shape

                def get_shape(self) -> Tuple[*Ts]:
                    return self._shape

            shape = (Height(480), Width(640))
            x: Array[Height, Width] = Array(shape)
            y = abs(x)  # Inferred type is Array[Height, Width]
            z = x + x   #        ...    is Array[Height, Width]
            x.get_shape()  #     ...    is tuple[Height, Width]

        c#�(K�|j��y�wr>)�__unpacked__r�s rC�__iter__zTypeVarTuple.__iter__ys�����#�#�#�s�NrCc��||_tj||�	tjd�j
j
dd�}|dk7r||_	t||_y#ttf$rd}Y�.wxYwrE)rr�r�rrrrr�r3r�rrH)rzr�r�r�s    rCr�zTypeVarTuple.__init__|sx�� �D�M��"�"�4��1�
��-�-��*�4�4�8�8��Z�P���-�-�")��� &�t��D���#�J�/�
���
�s�/A)�)A=�<A=c��|jSr>r�r�s rCr~zTypeVarTuple.__repr__�r�r_c�,�tj|�Sr>r�r�s rCr�zTypeVarTuple.__hash__�r�r_c�
�||uSr>r�r�s  rCr�zTypeVarTuple.__eq__�r�r_c��|jSr>r�r�s rCr�zTypeVarTuple.__reduce__�r�r_c�"�d|vrtd��y)Nr�z&Cannot subclass special typing classesr�rs   rCr)zTypeVarTuple.__init_subclass__�s���d�"�� H�I�I�#r_)rr�r�r�rWr
r|rIr�r~r�r�r�r)r�r_rCrrJs<��)	�X�N�N�	�	$�-1�	-�	!�	)�	!�	!�	Jr_r0�__objr-c�h�tdt|�j��tj��|S)a�Reveal the inferred type of a variable.

        When a static type checker encounters a call to ``reveal_type()``,
        it will emit the inferred type of the argument::

            x: int = 1
            reveal_type(x)

        Running a static type checker (e.g., ``mypy``) on this example
        will produce output similar to 'Revealed type is "builtins.int"'.

        At runtime, the function prints the runtime type of the
        argument and returns it unchanged.

        zRuntime type is )�file)�printr�rr�stderr)rPs rCr0r0�s*�� 	� ��e��!5�!5� 8�9��
�
�K��r_r �__argc��td��)a1Assert to the type checker that a line of code is unreachable.

        Example::

            def int_or_str(arg: int | str) -> None:
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                    case _:
                        assert_never(arg)

        If a type checker finds that a call to assert_never() is
        reachable, it will emit an error.

        At runtime, this throws an exception when called.

        zExpected code to be unreachable)�AssertionError�rUs rCr r �s��(�>�?�?r_r#r�)�
eq_default�
order_default�kw_only_default�field_specifiersrYrZr[r\.r�c�"�����������fd�}|S)aDecorator that marks a function, class, or metaclass as providing
        dataclass-like behavior.

        Example:

            from typing_extensions import dataclass_transform

            _T = TypeVar("_T")

            # Used on a decorator function
            @dataclass_transform()
            def create_model(cls: type[_T]) -> type[_T]:
                ...
                return cls

            @create_model
            class CustomerModel:
                id: int
                name: str

            # Used on a base class
            @dataclass_transform()
            class ModelBase: ...

            class CustomerModel(ModelBase):
                id: int
                name: str

            # Used on a metaclass
            @dataclass_transform()
            class ModelMeta(type): ...

            class ModelBase(metaclass=ModelMeta): ...

            class CustomerModel(ModelBase):
                id: int
                name: str

        Each of the ``CustomerModel`` classes defined in this example will now
        behave similarly to a dataclass created with the ``@dataclasses.dataclass``
        decorator. For example, the type checker will synthesize an ``__init__``
        method.

        The arguments to this decorator can be used to customize this behavior:
        - ``eq_default`` indicates whether the ``eq`` parameter is assumed to be
          True or False if it is omitted by the caller.
        - ``order_default`` indicates whether the ``order`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``kw_only_default`` indicates whether the ``kw_only`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``field_specifiers`` specifies a static list of supported classes
          or functions that describe fields, similar to ``dataclasses.field()``.

        At runtime, this decorator records its arguments in the
        ``__dataclass_transform__`` attribute on the decorated object.

        See PEP 681 for details.

        c�"�������d�|_|S)N)rYrZr[r\r�)�__dataclass_transform__)�	cls_or_fnrYr\r[r�rZs �����rC�	decoratorz&dataclass_transform.<locals>.decorators$���(�!.�#2�$4� �1�I�-��r_r�)rYrZr[r\r�ras````` rCr#r#�s���L	�	��r_r.�_F)r�c��|S)a�Indicate that a method is intended to override a method in a base class.

        Usage:

            class Base:
                def method(self) -> None: ...
                    pass

            class Child(Base):
                @override
                def method(self) -> None:
                    super().method()

        When this decorator is applied to a method, the type checker will
        validate that it overrides a method with the same name on a base class.
        This helps prevent bugs that may occur when a base class is changed
        without an equivalent change to a child class.

        See PEP 698 for details.

        r�rXs rCr.r.&s	��,�r_c��	tjd�jjdd�S#tt
f$rYywxYw)Nr�rr@)rrrrr�r3r�r_rC�_callerreQs@��	��=�=��#�-�-�1�1�*�j�I�I���
�+�	��	�s�.1�A�Ac�6�|D��cgc]\}}|��	}}}|D��cic] \}}|tj|d|�d����"}}}tj||||��}|x|_|j
_tjdkr||_|Scc}}wcc}}w)Nzfield z annotation must be a type��defaults�moduler`)	rWr�r��
namedtupler�r�r�version_info�_field_types)	r�ririrhrXr]rGr��nm_tpls	         rC�
_make_nmtuplernWs��� %�&����1�!���&�#(�*�#(�4�1�a��&�,�,�Q�&���;U�0V�W�W�#(�	�*��'�'��f�19�&�J��BM�M������!?����f�$�"-�F���
��'��*s
�B�%B>rr�r�c��eZdZd�Zy)�_NamedTupleMetac�:�t|vsJ�|D](}|tus�|tjus�td��t	d�|D��}|jdi�}g}|D]M}||vr|j
|��|s�td|�dt|�dkDrdnd�d	d
j|�����t||j�|D�cgc]}||��	c}|d��}	||	_tj|vr4tjjj}
t|
�|	_|D]@}|tvrt!d
|z��|t"vs�"||	j$vs�1t'|	|||��Btj|vr|	j)�|	Scc}w)Nz3can only inherit from a NamedTuple type and Genericc3�<K�|]}|turtn|���y�wr>)�_NamedTuplerhrOs  rCrDz*_NamedTupleMeta.__new__.<locals>.<genexpr>ns����S�U�T�4�;�#6�%�D�@�U�rEr�zNon-default namedtuple field z cannot follow default fieldr�s�� r�r�rgz&Cannot overwrite NamedTuple attribute )rsrWr�rHrhrrfrKr�rnrSr#rr��classmethod�_prohibited_namedtuple_fieldsr��_special_namedtuple_fieldsr?�setattrr))rNrFrLrHr�ri�
default_names�
field_namerXrm�
class_getitem�keys            rCr�z_NamedTupleMeta.__new__hs����%�'�'�'����{�*�t�6�>�>�/I�#�M�O�O���S�U�S�S�E��F�F�,�b�1�E��M�#�
���#�!�(�(��4�"�#�&C�J�<�PB�.1�-�.@�1�.D�s�"�&M�Q�'+�y�y��'?�&@�%B�C�C�	$�#��+�%�+�+�-�)6�7��A�"�Q�%��7��,�'��F�
 %�F���~�~��&� &��� @� @� I� I�
�+6�}�+E��(����7�7�(�)Q�TW�)W�X�X�� :�:�s�&�.�.�?X��F�C��C��1�	�
�~�~��&��(�(�*��M��8s�
FN)rr�r�r�r�r_rCrprpgs��"	r_rpc�n�|�|j�}n
|rtd��t||t���S)NzIEither list of fields or keywords can be provided to NamedTuple, not both)ri)rSrHrnre)�
__typename�__fieldsr�s   rCrr�s<�����|�|�~�H�
��G�H�
H��Z��'�)�D�Dr_r)rT�z$(typename, fields=None, /, **kwargs)c�$�t|vsJ�tfSr>)rrs)rLs rC�_namedtuple_mro_entriesr��s���U�"�"�"��~�r_r>)NNF)r�)�rr��collections.abcrrsrrirYrW�__all__�PEP_560r��GenericMetar%rIrSrkr^rlr8r
rmrnrorprrrrvrrJrr	r�r%r)r+r�r�r-r$r"�defaultdict�partialr7r�rrrrrrrrrr�_aliasrrrr,r3r6r&r�r�r�r/r��ABCMetarr2r1rrrEr*r4r9�__text_signature__rIrr�r�rbr!r(rjrrprXr'r&r��ImportErrorrZr�r4r�r�r	r
r�rr�r�r*r�rr�r5r�_Finalrrr7r9r:r#r*rr.r2rLr>rr0r r#r�rrr�r.rbrrern�_prohibitedrxrUryrpr�rsr�rr�r_rC�<module>r�s���
�����
��
�B��J����
�(��*1�<�*���w��
�	�����J�F��*�?�?���F�N�N�3����V�^�^�D����V�^�^�D����v�~�~�f��-���6�>�>�*�D�9�����w���	&�4�	&�9��9��?�?���6�7��� 0� 0��!� 4�� >��L�L�E�7�V�(�(��7�
�w�L�

M�E����w���L�L�E�
�@ �
�6�9���n�n�G�:�v�*�*�$�:��9� 1�2�G��(�(���6�?�#����H��(�(�M��,�,�O�1��0�0��	���+�1�1�4�8���&�P	7�#��{�{��
���	����	��$�$�
��$�$�
������&�&���0�0��� � ���6�=�!��$�$�K� �&�-�-�� 7� 7�"�b��B�K�
�.�.���?�?���&�&��
�.�.��
�{�{���$�$�
�=���&X�%&�R�6�:�����H�@�7����7�$$�]�$�F�6�&�'��0�0��� ���6�?�#��(�(�M��������6�:��� � �I��*�*�N��&�&�L�	�%�$R�I� �$(�*=�X*H�N�%�==��==�~�{�T�G�R�8�I�#�I��	���<�v�'�(�"�1�1�>�B��*�,��7��6�=�!��$�$�K�
� �6�:���*�*�N����0(>�X�6�;��� � �I��,�,�O�%>�&�.�.�d�%>�N8�8�z���B�Q��7�"��"�"�J����H�1�,�4�?��0�0�6�;��� � �I����b�q��V�#�5��,�,�D�5��8��8�5��,�,�D�5��{�	$)�
*�I�$�$� &�f�n�n�m�4�&�.�6�?�#��(�(�M��,�,�O���7�
�7�.7�*�7�0�6�;��*�F�$�$�m�4�*�.b�D�-�b�L�v�}�%��4��B���
6��
6��6�=�!��$�$�K�%�>�>�����b�q��V�#��6��6�:�6�.�.�d�:�#��	
�
�K��6�;��� � �I����b�q��V�#�5��,�,�D�5��,3��,3�^7��,�,�D�7���)
�+
�I�^(/�6�=�=��(/�V�6�?�#��(�(�M��8��8�&�6�6���;�;�D��8��8�"�6�7���L�L�E��8��8�4�6�:�����H��$�$�K����b�q��V�#�5��!4�!4�D�5��3��3�&�3��3�"7��+�+�4�7���
�
�H�" ��
�

�K� �6�8��
�]�]�F����b�q��V�#�5�V�0�0��5�#�v�+�+�4�#��+��+�-�#�v�+�+�4�#�/�f�)�)��/���	
�
�F�-��6�>�"�
*�v�*�*�M��
*� NJ�}�NJ�b�6�=�!��$�$�K��1����(�6�>�"��&�&�L�@�E�@�e�@�.�6�(�)� �4�4�� �#� %�
�O��O��O��	O�
!�,�,��L�L����V�Z�Z�0�&�/�/�#�v�z�z�/�2R�R�S��
�
�O��*�*�O�
���!��a��	 �O�d�6�:�����H�	�����F�O�O�C����O�$D�	E�B����r��@�v�~�&� 2�F��*�F�����w���"�"�J���%+�$6�$6�!�!*�+X�!Y��#�$�#�JE� �*�*�2�2�J���,�,���b�"�E�K�
���6�!�(N�
�%��"9�J���E$�1�"�0�0��1��
�4�%�3�3��4�s$�?i�i(�i%�$i%�(i=�<i=python3.12/site-packages/pkg_resources/_vendor/zipp.py000064400000020351151732701000016751 0ustar00import io
import posixpath
import zipfile
import itertools
import contextlib
import sys
import pathlib

if sys.version_info < (3, 7):
    from collections import OrderedDict
else:
    OrderedDict = dict


__all__ = ['Path']


def _parents(path):
    """
    Given a path with elements separated by
    posixpath.sep, generate all parents of that path.

    >>> list(_parents('b/d'))
    ['b']
    >>> list(_parents('/b/d/'))
    ['/b']
    >>> list(_parents('b/d/f/'))
    ['b/d', 'b']
    >>> list(_parents('b'))
    []
    >>> list(_parents(''))
    []
    """
    return itertools.islice(_ancestry(path), 1, None)


def _ancestry(path):
    """
    Given a path with elements separated by
    posixpath.sep, generate all elements of that path

    >>> list(_ancestry('b/d'))
    ['b/d', 'b']
    >>> list(_ancestry('/b/d/'))
    ['/b/d', '/b']
    >>> list(_ancestry('b/d/f/'))
    ['b/d/f', 'b/d', 'b']
    >>> list(_ancestry('b'))
    ['b']
    >>> list(_ancestry(''))
    []
    """
    path = path.rstrip(posixpath.sep)
    while path and path != posixpath.sep:
        yield path
        path, tail = posixpath.split(path)


_dedupe = OrderedDict.fromkeys
"""Deduplicate an iterable in original order"""


def _difference(minuend, subtrahend):
    """
    Return items in minuend not in subtrahend, retaining order
    with O(1) lookup.
    """
    return itertools.filterfalse(set(subtrahend).__contains__, minuend)


class CompleteDirs(zipfile.ZipFile):
    """
    A ZipFile subclass that ensures that implied directories
    are always included in the namelist.
    """

    @staticmethod
    def _implied_dirs(names):
        parents = itertools.chain.from_iterable(map(_parents, names))
        as_dirs = (p + posixpath.sep for p in parents)
        return _dedupe(_difference(as_dirs, names))

    def namelist(self):
        names = super(CompleteDirs, self).namelist()
        return names + list(self._implied_dirs(names))

    def _name_set(self):
        return set(self.namelist())

    def resolve_dir(self, name):
        """
        If the name represents a directory, return that name
        as a directory (with the trailing slash).
        """
        names = self._name_set()
        dirname = name + '/'
        dir_match = name not in names and dirname in names
        return dirname if dir_match else name

    @classmethod
    def make(cls, source):
        """
        Given a source (filename or zipfile), return an
        appropriate CompleteDirs subclass.
        """
        if isinstance(source, CompleteDirs):
            return source

        if not isinstance(source, zipfile.ZipFile):
            return cls(_pathlib_compat(source))

        # Only allow for FastLookup when supplied zipfile is read-only
        if 'r' not in source.mode:
            cls = CompleteDirs

        source.__class__ = cls
        return source


class FastLookup(CompleteDirs):
    """
    ZipFile subclass to ensure implicit
    dirs exist and are resolved rapidly.
    """

    def namelist(self):
        with contextlib.suppress(AttributeError):
            return self.__names
        self.__names = super(FastLookup, self).namelist()
        return self.__names

    def _name_set(self):
        with contextlib.suppress(AttributeError):
            return self.__lookup
        self.__lookup = super(FastLookup, self)._name_set()
        return self.__lookup


def _pathlib_compat(path):
    """
    For path-like objects, convert to a filename for compatibility
    on Python 3.6.1 and earlier.
    """
    try:
        return path.__fspath__()
    except AttributeError:
        return str(path)


class Path:
    """
    A pathlib-compatible interface for zip files.

    Consider a zip file with this structure::

        .
        ├── a.txt
        └── b
            ├── c.txt
            └── d
                └── e.txt

    >>> data = io.BytesIO()
    >>> zf = zipfile.ZipFile(data, 'w')
    >>> zf.writestr('a.txt', 'content of a')
    >>> zf.writestr('b/c.txt', 'content of c')
    >>> zf.writestr('b/d/e.txt', 'content of e')
    >>> zf.filename = 'mem/abcde.zip'

    Path accepts the zipfile object itself or a filename

    >>> root = Path(zf)

    From there, several path operations are available.

    Directory iteration (including the zip file itself):

    >>> a, b = root.iterdir()
    >>> a
    Path('mem/abcde.zip', 'a.txt')
    >>> b
    Path('mem/abcde.zip', 'b/')

    name property:

    >>> b.name
    'b'

    join with divide operator:

    >>> c = b / 'c.txt'
    >>> c
    Path('mem/abcde.zip', 'b/c.txt')
    >>> c.name
    'c.txt'

    Read text:

    >>> c.read_text()
    'content of c'

    existence:

    >>> c.exists()
    True
    >>> (b / 'missing.txt').exists()
    False

    Coercion to string:

    >>> import os
    >>> str(c).replace(os.sep, posixpath.sep)
    'mem/abcde.zip/b/c.txt'

    At the root, ``name``, ``filename``, and ``parent``
    resolve to the zipfile. Note these attributes are not
    valid and will raise a ``ValueError`` if the zipfile
    has no filename.

    >>> root.name
    'abcde.zip'
    >>> str(root.filename).replace(os.sep, posixpath.sep)
    'mem/abcde.zip'
    >>> str(root.parent)
    'mem'
    """

    __repr = "{self.__class__.__name__}({self.root.filename!r}, {self.at!r})"

    def __init__(self, root, at=""):
        """
        Construct a Path from a ZipFile or filename.

        Note: When the source is an existing ZipFile object,
        its type (__class__) will be mutated to a
        specialized type. If the caller wishes to retain the
        original type, the caller should either create a
        separate ZipFile object or pass a filename.
        """
        self.root = FastLookup.make(root)
        self.at = at

    def open(self, mode='r', *args, pwd=None, **kwargs):
        """
        Open this entry as text or binary following the semantics
        of ``pathlib.Path.open()`` by passing arguments through
        to io.TextIOWrapper().
        """
        if self.is_dir():
            raise IsADirectoryError(self)
        zip_mode = mode[0]
        if not self.exists() and zip_mode == 'r':
            raise FileNotFoundError(self)
        stream = self.root.open(self.at, zip_mode, pwd=pwd)
        if 'b' in mode:
            if args or kwargs:
                raise ValueError("encoding args invalid for binary operation")
            return stream
        return io.TextIOWrapper(stream, *args, **kwargs)

    @property
    def name(self):
        return pathlib.Path(self.at).name or self.filename.name

    @property
    def suffix(self):
        return pathlib.Path(self.at).suffix or self.filename.suffix

    @property
    def suffixes(self):
        return pathlib.Path(self.at).suffixes or self.filename.suffixes

    @property
    def stem(self):
        return pathlib.Path(self.at).stem or self.filename.stem

    @property
    def filename(self):
        return pathlib.Path(self.root.filename).joinpath(self.at)

    def read_text(self, *args, **kwargs):
        with self.open('r', *args, **kwargs) as strm:
            return strm.read()

    def read_bytes(self):
        with self.open('rb') as strm:
            return strm.read()

    def _is_child(self, path):
        return posixpath.dirname(path.at.rstrip("/")) == self.at.rstrip("/")

    def _next(self, at):
        return self.__class__(self.root, at)

    def is_dir(self):
        return not self.at or self.at.endswith("/")

    def is_file(self):
        return self.exists() and not self.is_dir()

    def exists(self):
        return self.at in self.root._name_set()

    def iterdir(self):
        if not self.is_dir():
            raise ValueError("Can't listdir a file")
        subs = map(self._next, self.root.namelist())
        return filter(self._is_child, subs)

    def __str__(self):
        return posixpath.join(self.root.filename, self.at)

    def __repr__(self):
        return self.__repr.format(self=self)

    def joinpath(self, *other):
        next = posixpath.join(self.at, *map(_pathlib_compat, other))
        return self._next(self.root.resolve_dir(next))

    __truediv__ = joinpath

    @property
    def parent(self):
        if not self.at:
            return self.filename.parent
        parent_at = posixpath.dirname(self.at.rstrip('/'))
        if parent_at:
            parent_at += '/'
        return self._next(parent_at)
python3.12/site-packages/pkg_resources/_vendor/more_itertools/__init__.pyi000064400000000053151732701000022742 0ustar00from .more import *
from .recipes import *
python3.12/site-packages/pkg_resources/_vendor/more_itertools/__pycache__/__init__.cpython-312.pyc000064400000000640151732701000027134 0ustar00�

��_i��� �dZddl�ddl�dZy)z:More routines for operating on iterables, beyond itertools�)�*z9.1.0N)�__doc__�more�recipes�__version__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/more_itertools/__init__.py�<module>rs��@����r	python3.12/site-packages/pkg_resources/_vendor/more_itertools/__pycache__/recipes.cpython-312.pyc000064400000101136151732701000027031 0ustar00�

��_iHc��2�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZmZmZddlmZmZmZddlmZgd	�Ze�Zd
�Z d9d�Z!d�Z"d:d
�Z#d:d�Z$d�Z%e&fd�Z'd�Z(e(Z)d�Z*d�Z+d�Z,d:d�Z-d�Z.	ddl
m/Z0d�Z/e.je/_Gd�de2�Z3d�Z4d�Z5d;d�Z6d�Z7d�Z8d �Z9d:d!�Z:d:d"�Z;d:d#�Z<d<d$�Z=d%d&�d'�Z>d:d(�Z?d)�Z@d*�ZAd+�ZBd,�ZCd-�ZDd.�ZEd/�ZFd0�ZGd1�ZHd2�ZId9d3�ZJd4�ZKd5�ZLd6�ZMd7�ZNd8�ZOy#e1$re.Z/Y�swxYw)=aImported from the recipes section of the itertools documentation.

All functions taken from the recipes section of the itertools library docs
[1]_.
Some backward-compatible usability improvements have been made.

.. [1] http://docs.python.org/library/itertools.html#recipes

�N)�deque)�Sized)�reduce)�chain�combinations�compress�count�cycle�groupby�islice�product�repeat�starmap�tee�zip_longest)�	randrange�sample�choice)�
hexversion)(�	all_equal�batched�before_and_after�consume�convolve�
dotproduct�
first_true�factor�flatten�grouper�iter_except�
iter_index�matmul�ncycles�nth�nth_combination�padnone�pad_none�pairwise�	partition�polynomial_from_roots�powerset�prepend�quantify�#random_combination_with_replacement�random_combination�random_permutation�random_product�
repeatfunc�
roundrobin�sieve�sliding_window�	subslices�tabulate�tail�take�	transpose�
triplewise�unique_everseen�unique_justseenc�,�tt||��S)z�Return first *n* items of the iterable as a list.

        >>> take(3, range(10))
        [0, 1, 2]

    If there are fewer than *n* items in the iterable, all of them are
    returned.

        >>> take(10, range(3))
        [0, 1, 2]

    )�listr��n�iterables  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/more_itertools/recipes.pyr9r9Ps����x��#�$�$�c�,�t|t|��S)a�Return an iterator over the results of ``func(start)``,
    ``func(start + 1)``, ``func(start + 2)``...

    *func* should be a function that accepts one integer argument.

    If *start* is not specified it defaults to 0. It will be incremented each
    time the iterator is advanced.

        >>> square = lambda x: x ** 2
        >>> iterator = tabulate(square, -3)
        >>> take(4, iterator)
        [9, 4, 1, 0]

    )�mapr	)�function�starts  rCr7r7`s���x��u��&�&rDc	#��K�t|t�r,t|tdt	|�|z
�d�Ed{���ytt
||���Ed{���y7�$7��w)z�Return an iterator over the last *n* items of *iterable*.

    >>> t = tail(3, 'ABCDEFG')
    >>> list(t)
    ['E', 'F', 'G']

    rN��maxlen)�
isinstancerr�max�len�iterrr@s  rCr8r8rsS�����(�E�"��(�C��3�x�=�1�+<�$=�t�D�D�D���h�q�1�2�2�2�	E��2�s!�7A"�A�A"�A �A"� A"c�R�|�t|d��ytt|||�d�y)aXAdvance *iterable* by *n* steps. If *n* is ``None``, consume it
    entirely.

    Efficiently exhausts an iterator without returning values. Defaults to
    consuming the whole iterator, but an optional second argument may be
    provided to limit consumption.

        >>> i = (x for x in range(10))
        >>> next(i)
        0
        >>> consume(i, 3)
        >>> next(i)
        4
        >>> consume(i)
        >>> next(i)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        StopIteration

    If the iterator has fewer items remaining than the provided limit, the
    whole iterator will be consumed.

        >>> i = (x for x in range(3))
        >>> consume(i, 5)
        >>> next(i)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        StopIteration

    NrrJ)r�nextr)�iteratorrAs  rCrr�s)��@	�y�
�h�q�!�	
�V�H�a��
#�T�*rDc�0�tt||d�|�S)z�Returns the nth item or a default value.

    >>> l = range(10)
    >>> nth(l, 3)
    3
    >>> nth(l, 20, "zebra")
    'zebra'

    N)rQr)rBrA�defaults   rCr$r$�s����x��D�)�7�3�3rDc�N�t|�}t|d�xr
t|d�S)z�
    Returns ``True`` if all the elements are equal to each other.

        >>> all_equal('aaaa')
        True
        >>> all_equal('aaab')
        False

    TF)rrQ)rB�gs  rCrr�s(��	���A���4�=�/��a���/�/rDc�,�tt||��S)zcReturn the how many times the predicate is true.

    >>> quantify([True, False, True])
    2

    )�sumrF)rB�preds  rCr-r-�s���s�4��"�#�#rDc�,�t|td��S)aReturns the sequence of elements and then returns ``None`` indefinitely.

        >>> take(5, pad_none(range(3)))
        [0, 1, 2, None, None]

    Useful for emulating the behavior of the built-in :func:`map` function.

    See also :func:`padded`.

    N)rr�rBs rCr'r'�s����6�$�<�(�(rDc�R�tjtt|�|��S)zvReturns the sequence elements *n* times

    >>> list(ncycles(["a", "b"], 3))
    ['a', 'b', 'a', 'b', 'a', 'b']

    )r�
from_iterabler�tuple)rBrAs  rCr#r#�s �����v�e�H�o�q�9�:�:rDc�J�tttj||��S)zcReturns the dot product of the two iterables.

    >>> dotproduct([10, 10], [20, 20])
    400

    )rXrF�operator�mul)�vec1�vec2s  rCrr�s���s�8�<�<��t�,�-�-rDc�,�tj|�S)z�Return an iterator flattening one level of nesting in a list of lists.

        >>> list(flatten([[0, 1], [2, 3]]))
        [0, 1, 2, 3]

    See also :func:`collapse`, which can flatten multiple levels of nesting.

    )rr])�listOfListss rCrr�s�����{�+�+rDc�\�|�t|t|��St|t||��S)aGCall *func* with *args* repeatedly, returning an iterable over the
    results.

    If *times* is specified, the iterable will terminate after that many
    repetitions:

        >>> from operator import add
        >>> times = 4
        >>> args = 3, 5
        >>> list(repeatfunc(add, times, *args))
        [8, 8, 8, 8]

    If *times* is ``None`` the iterable will not terminate:

        >>> from random import randrange
        >>> times = None
        >>> args = 1, 11
        >>> take(6, repeatfunc(randrange, times, *args))  # doctest:+SKIP
        [2, 4, 8, 1, 8, 4]

    )rr)�func�times�argss   rCr2r2s.��,
�}��t�V�D�\�*�*��4���e�,�-�-rDc#�lK�t|�\}}t|d�t||�Ed{���y7��w)z�Returns an iterator of paired items, overlapping, from the original

    >>> take(4, pairwise(count()))
    [(0, 1), (1, 2), (2, 3), (3, 4)]

    On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`.

    N)rrQ�zip)rB�a�bs   rC�	_pairwiserns-�����x�=�D�A�q���D�M��1�a�y���s�*4�2�4�r(c#�6K�t|�Ed{���y7��w�N)�itertools_pairwiser[s rCr(r(1s����%�h�/�/�/�s���c� ��eZdZd�fd�	Z�xZS)�UnequalIterablesErrorc�P��d}|�|dj|�z
}t�|�	|�y)Nz Iterables have different lengthsz/: index 0 has length {}; index {} has length {})�format�super�__init__)�self�details�msg�	__class__s   �rCrxzUnequalIterablesError.__init__8s;���0�����M�E�M�M���
�C�	����rDrq)�__name__�
__module__�__qualname__rx�
__classcell__)r|s@rCrtrt7s
����rDrtc#�nK�t|dti�D]}|D]}|tus�t��|���!y�w)N�	fillvalue)r�_markerrt)�	iterables�combo�vals   rC�_zip_equal_generatorr�Bs;�����i�;�7�;���C��g�~�+�-�-����	<�s� 5�5c���	t|d�}t|ddd�D]\}}t|�}||k7s�n	t|�St|||f���#t$rt|�cYSwxYw)Nr�)rz)rN�	enumeraterkrt�	TypeErrorr�)r��
first_size�i�it�sizes     rC�
_zip_equalr�Js���/���1��&�
��y���}�a�0�E�A�r��r�7�D��z�!��1��	�?�"�$�Z��D�,A�B�B���/�#�I�.�.�/�s�3A�
A�A�A'�&A'c��t|�g|z}|dk(rt|d|i�S|dk(rt|�S|dk(rt|�St	d��)a�Group elements from *iterable* into fixed-length groups of length *n*.

    >>> list(grouper('ABCDEF', 3))
    [('A', 'B', 'C'), ('D', 'E', 'F')]

    The keyword arguments *incomplete* and *fillvalue* control what happens for
    iterables whose length is not a multiple of *n*.

    When *incomplete* is `'fill'`, the last group will contain instances of
    *fillvalue*.

    >>> list(grouper('ABCDEFG', 3, incomplete='fill', fillvalue='x'))
    [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')]

    When *incomplete* is `'ignore'`, the last group will not be emitted.

    >>> list(grouper('ABCDEFG', 3, incomplete='ignore', fillvalue='x'))
    [('A', 'B', 'C'), ('D', 'E', 'F')]

    When *incomplete* is `'strict'`, a subclass of `ValueError` will be raised.

    >>> it = grouper('ABCDEFG', 3, incomplete='strict')
    >>> list(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    UnequalIterablesError

    �fillr��strict�ignorez Expected fill, strict, or ignore)rOrr�rk�
ValueError)rBrA�
incompleter�ris     rCrr^s^��:
��N��a��D��V���D�6�I�6�6��X���4� � ��X���D�z���;�<�<rDc'��K�t|�}td�|D��}|r	|D]}|����
	|r�yy#t$r|dz}tt||��}Y�*wxYw�w)aJYields an item from each iterable, alternating between them.

        >>> list(roundrobin('ABC', 'D', 'EF'))
        ['A', 'D', 'E', 'B', 'F', 'C']

    This function produces the same output as :func:`interleave_longest`, but
    may perform better for some inputs (in particular when the number of
    iterables is small).

    c3�FK�|]}t|�j���y�wrq)rO�__next__)�.0r�s  rC�	<genexpr>zroundrobin.<locals>.<genexpr>�s����8�i��$�r�(�#�#�i�s�!r�N)rNr
�
StopIterationr)r��pending�nextsrQs    rCr3r3�si�����)�n�G��8�i�8�8�E�
�	2����f������	2��q�L�G��&���0�1�E�	2�s*� A"�9�A"�A"�#A�A"�A�A"c�j����t��fd�|D�}t|�\}}d�|D�d�|D�fS)a�
    Returns a 2-tuple of iterables derived from the input iterable.
    The first yields the items that have ``pred(item) == False``.
    The second yields the items that have ``pred(item) == True``.

        >>> is_odd = lambda x: x % 2 != 0
        >>> iterable = range(10)
        >>> even_items, odd_items = partition(is_odd, iterable)
        >>> list(even_items), list(odd_items)
        ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])

    If *pred* is None, :func:`bool` is used.

        >>> iterable = [0, 1, False, True, '', ' ']
        >>> false_items, true_items = partition(None, iterable)
        >>> list(false_items), list(true_items)
        ([0, False, ''], [1, True, ' '])

    c3�2�K�|]}�|�|f���y�wrq�)r��xrYs  �rCr�zpartition.<locals>.<genexpr>�s�����2��A�D��G�Q�<��s�c3�,K�|]\}}|r�	|���y�wrqr��r��condr�s   rCr�zpartition.<locals>.<genexpr>�s����+�B�y��a�d��B���
�c3�,K�|]\}}|s�	|���y�wrqr�r�s   rCr�zpartition.<locals>.<genexpr>�s����'�B�y��a�$��B�r�)�boolr)rYrB�evaluations�t1�t2s`    rCr)r)�sA���(�|���2��2�K�
��
�F�B��+�B�+�'�B�'��rDc���t|��tj�fd�tt	��dz�D��S)a�Yields all possible subsets of the iterable.

        >>> list(powerset([1, 2, 3]))
        [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)]

    :func:`powerset` will operate on iterables that aren't :class:`set`
    instances, so repeated elements in the input will produce repeated elements
    in the output. Use :func:`unique_everseen` on the input to avoid generating
    duplicates:

        >>> seq = [1, 1, 0]
        >>> list(powerset(seq))
        [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)]
        >>> from more_itertools import unique_everseen
        >>> list(powerset(unique_everseen(seq)))
        [(), (1,), (0,), (1, 0)]

    c3�6�K�|]}t�|����y�wrq)r)r��r�ss  �rCr�zpowerset.<locals>.<genexpr>�s�����M�;L�a�|�A�q�1�;L�s�r�)r?rr]�rangerN)rBr�s @rCr+r+�s2���&	
�X��A����M�5��Q��!��;L�M�M�MrDc#��K�t�}|j}g}|j}|du}|D]}|r||�n|}	||vr||�|���!y#t$r||vr||�|��Y�>wxYw�w)a�
    Yield unique elements, preserving order.

        >>> list(unique_everseen('AAAABBBCCDAABBB'))
        ['A', 'B', 'C', 'D']
        >>> list(unique_everseen('ABBCcAD', str.lower))
        ['A', 'B', 'C', 'D']

    Sequences with a mix of hashable and unhashable items can be used.
    The function will be slower (i.e., `O(n^2)`) for unhashable items.

    Remember that ``list`` objects are unhashable - you can use the *key*
    parameter to transform the list to a tuple (which is hashable) to
    avoid a slowdown.

        >>> iterable = ([1, 2], [2, 3], [1, 2])
        >>> list(unique_everseen(iterable))  # Slow
        [[1, 2], [2, 3]]
        >>> list(unique_everseen(iterable, key=tuple))  # Faster
        [[1, 2], [2, 3]]

    Similary, you may want to convert unhashable ``set`` objects with
    ``key=frozenset``. For ``dict`` objects,
    ``key=lambda x: frozenset(x.items())`` can be used.

    N)�set�add�appendr�)	rB�key�seenset�seenset_add�seenlist�seenlist_add�use_key�element�ks	         rCr<r<�s�����6�e�G��+�+�K��H��?�?�L���o�G���#�C��L���	�����A���
�����	��� ��Q���
��	�s(�:A/�A�
A/�A,�)A/�+A,�,A/c
�p�ttttjd�t	||���S)z�Yields elements in order, ignoring serial duplicates

    >>> list(unique_justseen('AAAABBBCCDAABBB'))
    ['A', 'B', 'C', 'D', 'A', 'B']
    >>> list(unique_justseen('ABBCcAD', str.lower))
    ['A', 'B', 'C', 'A', 'D']

    r�)rFrQr`�
itemgetterr)rBr�s  rCr=r=s*���t�S��,�,�Q�/���3�1G�H�I�IrDc#�NK�	|�	|���	|����
#|$rYywxYw�w)a�Yields results from a function repeatedly until an exception is raised.

    Converts a call-until-exception interface to an iterator interface.
    Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel
    to end the loop.

        >>> l = [0, 1, 2]
        >>> list(iter_except(l.pop, IndexError))
        [2, 1, 0]

    Multiple exceptions can be specified as a stopping condition:

        >>> l = [1, 2, 3, '...', 4, 5, 6]
        >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
        [7, 6, 5]
        >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
        [4, 3, 2]
        >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
        []

    Nr�)rg�	exception�firsts   rCr r s8����,
����'�M���&�L����
��
�s�%��"�%�"�%c�.�tt||�|�S)a�
    Returns the first true value in the iterable.

    If no true value is found, returns *default*

    If *pred* is not None, returns the first item for which
    ``pred(item) == True`` .

        >>> first_true(range(10))
        1
        >>> first_true(range(10), pred=lambda x: x > 5)
        6
        >>> first_true(range(10), default='missing', pred=lambda x: x > 9)
        'missing'

    )rQ�filter)rBrTrYs   rCrr+s��"��t�X�&��0�0rDr�)rc�h�|D�cgc]
}t|���c}|z}td�|D��Scc}w)a�Draw an item at random from each of the input iterables.

        >>> random_product('abc', range(4), 'XYZ')  # doctest:+SKIP
        ('c', 3, 'Z')

    If *repeat* is provided as a keyword argument, that many items will be
    drawn from each iterable.

        >>> random_product('abcd', range(4), repeat=2)  # doctest:+SKIP
        ('a', 2, 'd', 3)

    This equivalent to taking a random selection from
    ``itertools.product(*args, **kwarg)``.

    c3�2K�|]}t|����y�wrq)r)r��pools  rCr�z!random_product.<locals>.<genexpr>Ps����0�%�$����%�s�)r^)rrir��poolss    rCr1r1?s7�� &*�*�T�T�U�4�[�T�*�V�3�E��0�%�0�0�0��
+s�/c�`�t|�}|�t|�n|}tt||��S)abReturn a random *r* length permutation of the elements in *iterable*.

    If *r* is not specified or is ``None``, then *r* defaults to the length of
    *iterable*.

        >>> random_permutation(range(5))  # doctest:+SKIP
        (3, 4, 0, 1, 2)

    This equivalent to taking a random selection from
    ``itertools.permutations(iterable, r)``.

    )r^rNr)rBr�r�s   rCr0r0Ss-����?�D��Y��D�	�A�A����a��!�!rDc���t|��t��}ttt	|�|��}t�fd�|D��S)z�Return a random *r* length subsequence of the elements in *iterable*.

        >>> random_combination(range(5), 3)  # doctest:+SKIP
        (2, 3, 4)

    This equivalent to taking a random selection from
    ``itertools.combinations(iterable, r)``.

    c3�(�K�|]	}�|���y�wrqr��r�r�r�s  �rCr�z%random_combination.<locals>.<genexpr>r������*�'�Q��a��'���)r^rN�sortedrr�)rBr�rA�indicesr�s    @rCr/r/es=�����?�D��D�	�A��V�E�!�H�a�(�)�G��*�'�*�*�*rDc����t|��t���t�fd�t|�D��}t�fd�|D��S)aSReturn a random *r* length subsequence of elements in *iterable*,
    allowing individual elements to be repeated.

        >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP
        (0, 0, 1, 2, 2)

    This equivalent to taking a random selection from
    ``itertools.combinations_with_replacement(iterable, r)``.

    c3�4�K�|]}t�����y�wrq)r)r�r�rAs  �rCr�z6random_combination_with_replacement.<locals>.<genexpr>�s�����4�8�a�Y�q�\�8�s�c3�(�K�|]	}�|���y�wrqr�r�s  �rCr�z6random_combination_with_replacement.<locals>.<genexpr>�r�r�)r^rNr�r�)rBr�r�rAr�s   @@rCr.r.us<�����?�D��D�	�A��4�5��8�4�4�G��*�'�*�*�*rDc��t|�}t|�}|dks||kDrt�d}t|||z
�}t	d|dz�D]}|||z
|zz|z}�|dkr||z
}|dks||k\rt
�g}|rL||z|z|dz
|dz
}}}||k\r||z}|||z
z|z|dz
}}||k\r�|j
|d|z
�|r�Lt|�S)aEquivalent to ``list(combinations(iterable, r))[index]``.

    The subsequences of *iterable* that are of length *r* can be ordered
    lexicographically. :func:`nth_combination` computes the subsequence at
    sort position *index* directly, without computing the previous
    subsequences.

        >>> nth_combination(range(5), 3, 5)
        (0, 3, 4)

    ``ValueError`` will be raised If *r* is negative or greater than the length
    of *iterable*.
    ``IndexError`` will be raised if the given *index* is invalid.
    rr����)r^rNr��minr��
IndexErrorr�)	rBr��indexr�rA�cr�r��results	         rCr%r%�s����?�D��D�	�A�	�A��1�q�5���	�A��A�q�1�u�
�A�
�1�a�!�e�_��
��Q����O�q� ���
�q�y�
��
��
��	�u��z���
�F�
��a�%�1�*�a�!�e�Q��U�a�1���q�j��Q�J�E���A��;�!�#�Q��U�q�A��q�j�	�
�
�d�2��6�l�#����=�rDc��t|g|�S)aYield *value*, followed by the elements in *iterator*.

        >>> value = '0'
        >>> iterator = ['1', '2', '3']
        >>> list(prepend(value, iterator))
        ['0', '1', '2', '3']

    To prepend multiple values, see :func:`itertools.chain`
    or :func:`value_chain`.

    )r)�valuerRs  rCr,r,�s���%��(�#�#rDc#�K�t|�ddd�}t|�}tdg|��|z}t|t	d|dz
��D]9}|j|�t
ttj||�����;y�w)aBConvolve the iterable *signal* with the iterable *kernel*.

        >>> signal = (1, 2, 3, 4, 5)
        >>> kernel = [3, 2, 1]
        >>> list(convolve(signal, kernel))
        [3, 8, 14, 20, 26, 14, 5]

    Note: the input arguments are not interchangeable, as the *kernel*
    is immediately consumed and stored.

    Nr�rrJr�)
r^rNrrrr�rXrFr`ra)�signal�kernelrA�windowr�s     rCrr�sv�����6�]�4�R�4�
 �F��F��A�
�A�3�q�
!�A�
%�F�
�6�6�!�Q��U�+�
,���
�
�a���#�h�l�l�F�F�3�4�4�-�s�BBc�Z����t���g����fd�}t���}|�|fS)a�A variant of :func:`takewhile` that allows complete access to the
    remainder of the iterator.

         >>> it = iter('ABCdEfGhI')
         >>> all_upper, remainder = before_and_after(str.isupper, it)
         >>> ''.join(all_upper)
         'ABC'
         >>> ''.join(remainder) # takewhile() would lose the 'd'
         'dEfGhI'

    Note that the first iterator must be fully consumed before the second
    iterator can generate valid results.
    c3�Z�K��D]!}�|�r|����j|�yy�wrq)r�)�elemr��	predicate�
transitions ���rC�
true_iteratorz'before_and_after.<locals>.true_iterator�s.������D�����
��!�!�$�'���s�(+)rOr)r�r�r��remainder_iteratorr�s``  @rCrr�s5���
�b��B��J���z�2�.���?�.�.�.rDc#�^K�tt|��D]\\}}\}}|||f���y�w)z�Return overlapping triplets from *iterable*.

    >>> list(triplewise('ABCDE'))
    [('A', 'B', 'C'), ('B', 'C', 'D'), ('C', 'D', 'E')]

    Nro)rBrl�_rmr�s     rCr;r;�s3����#�8�H�#5�6����A���A���A�g�
�7�s�+-c#��K�t|�}tt||�|��}t|�|k(r
t	|���|D] }|j|�t	|����"y�w)aYReturn a sliding window of width *n* over *iterable*.

        >>> list(sliding_window(range(6), 4))
        [(0, 1, 2, 3), (1, 2, 3, 4), (2, 3, 4, 5)]

    If *iterable* has fewer than *n* items, then nothing is yielded:

        >>> list(sliding_window(range(3), 4))
        []

    For a variant with more features, see :func:`windowed`.
    rJN)rOrrrNr^r�)rBrAr�r�r�s     rCr5r5�sY����
�h��B�
�6�"�a�=��
+�F�
�6�{�a���F�m��
���
�
�a���F�m���s�A$A&c
��t|�}tttt	t|�dz�d��}t
tjt|�|�S)z�Return all contiguous non-empty subslices of *iterable*.

        >>> list(subslices('ABC'))
        [['A'], ['A', 'B'], ['A', 'B', 'C'], ['B'], ['B', 'C'], ['C']]

    This is similar to :func:`substrings`, but emits items in a different
    order.
    r��)
r?r�slicerr�rNrFr`�getitemr)rB�seq�slicess   rCr6r6sF���x�.�C�
�U�L��s�3�x�!�|�)<�a�@�
A�F��x������f�5�5rDc��ttdd��}tttj
|��}t
t|�dz�D�cgc]!}tt|t||�����#c}Scc}w)z�Compute a polynomial's coefficients from its roots.

    >>> roots = [5, -4, 3]  # (x - 5) * (x + 4) * (x - 3)
    >>> polynomial_from_roots(roots)  # x^3 - 4 * x^2 - 17 * x + 60
    [1, -4, -17, 60]
    �prodc�8�ttj|d�S)Nr�)rr`ra�r�s rC�<lambda>z'polynomial_from_roots.<locals>.<lambda>+s��6�(�,�,��1�+ErDr�)
�getattr�mathr?rFr`�negr�rNrXr)�rootsr�r�s   rCr*r*#sj���4��!E�F�D���X�\�\�5�)�*�E�8=�c�%�j�1�n�8M��8M�1��C��l�5�!�,�-�.�8M����s�&A8c#��K�	|j}|dz
}		|||dz�}|���#t$rYywxYw#t$r2t||d�}t	||�D]\}}||us||k(s�|���YywxYw�w)aYield the index of each place in *iterable* that *value* occurs,
    beginning with index *start*.

    See :func:`locate` for a more general means of finding the indexes
    associated with particular values.

    >>> list(iter_index('AABCADEAF', 'A'))
    [0, 1, 4, 7]
    r�N)r�r��AttributeErrorrr�)rBr�rH�	seq_indexr�r�r�s       rCr!r!2s�������N�N�	�
�A�I��	���e�Q��U�+�������	��	����
�H�e�T�
*��#�B��.�J�A�w��%��7�e�#3���/��sA�A5�7�A5�(�	4�A5�4�A5�1A2�)A2�/A5�1A2�2A5c�@�ttdd��}td�|dzz}d|dd||�dz}tt	|�|�D]3}tt
t	||z|||z���|||z|||z�<�5d|d<|dkDrt|d�Stg�S)	zdYield the primes less than n.

    >>> list(sieve(30))
    [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
    �isqrtc�>�ttj|��Srq��intr��sqrtr�s rCr�zsieve.<locals>.<lambda>U���S����1��->rD)rr�r�)rrrN�r�)	r�r��	bytearrayrr��bytesrNr!rO)rAr��data�limit�ps     rCr4r4Os���
�D�'�#>�?�E��V���Q��'�D��D��!�H��!�H�q�L�E�
�e�E�l�D�
)��"'��E�!�a�%��A��E�,B�(C�"D��Q��U�Q��Q��
��*��D��G�"#�a�%�:�d�A��5�T�"�X�5rDc#�K�tdk\rtjdt�t	|�}	tt
||��}|sy|����w)a"Batch data into lists of length *n*. The last batch may be shorter.

    >>> list(batched('ABCDEFG', 3))
    [['A', 'B', 'C'], ['D', 'E', 'F'], ['G']]

    This recipe is from the ``itertools`` docs. This library also provides
    :func:`chunked`, which has a different implementation.
    i�zzbatched will be removed in a future version of more-itertools. Use the standard library itertools.batched function insteadN)r�warnings�warn�DeprecationWarningrOr?r)rBrAr��batchs    rCrr_sT�����Y���
�
�5�
�
	
�
�h��B�
��V�B��]�#������	�s�A
Ac��t|�S)z�Swap the rows and columns of the input.

    >>> list(transpose([(1, 2, 3), (11, 22, 33)]))
    [(1, 11), (2, 22), (3, 33)]

    The caller should ensure that the dimensions of the input are compatible.
    )rk)r�s rCr:r:zs
����8�OrDc�x�t|d�}tttt	|t|���|�S)z�Multiply two matrices.
    >>> list(matmul([(7, 5), (3, 5)], [(2, 5), (7, 9)]))
    [[49, 80], [41, 60]]

    The caller should ensure that the dimensions of the input matrices are
    compatible with each other.
    r)rNrrrr
r:)�m1�m2rAs   rCr"r"�s0��	�B�q�E�
�A��7�:�w�r�9�R�=�'A�B�A�F�FrDc#�K�ttdd��}t||�dz�D]"}	t||�\}}|r�|��|}|dk(ry� |dk\r|��yy�w)zSYield the prime factors of n.
    >>> list(factor(360))
    [2, 2, 2, 3, 3, 5]
    r�c�>�ttj|��Srqr�r�s rCr�zfactor.<locals>.<lambda>�rrDr�Nr�)r�r�r4�divmod)rAr��prime�quotient�	remainders     rCrr�st����

�D�'�#>�?�E��u�Q�x�!�|�$���"(��E�"2��H�i����K��A��A�v���%�	�A�v����s�AA)rrq)r�N)NN)P�__doc__r�r`r
�collectionsr�collections.abcr�	functoolsr�	itertoolsrrrr	r
rrr
rrrr�randomrrr�sysr�__all__�objectr�r9r7r8rr$rr�r-r'r&r#rrr2rnr(rr�ImportErrorr�rtr�r�rr3r)r+r<r=r rr1r0r/r.r%r,rrr;r5r6r*r!r4rr:r"rr�rDrC�<module>r"st�������!��
�
�
�
�-�,��)��V�(��
%� '�$3�$%+�P
4�0�!�$�)���;�.�	,�.�6�	)�8�
0�!�(�(�H���J���/�(%=�P2�.�>N�.*�Z	J�
�>1�("#�1�("�$
+� +�"'�T$�5�(/�B��,6���:
6� �6	�	G���K���H��s�D�D�Dpython3.12/site-packages/pkg_resources/_vendor/more_itertools/__pycache__/more.cpython-312.pyc000064400000464277151732701000026363 0ustar00�

��_i@��$�ddlZddlmZmZmZmZddlmZddlm	Z	m
Z
mZddlm
Z
mZmZddlmZmZmZmZmZmZmZmZmZmZmZmZddlmZmZm Z m!Z!ddl"m#Z#m$Z$dd	l%m%Z%m&Z&m'Z'dd
l(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ddl0m1Z1m2Z2ddl3m4Z4d
dl5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?gd�Z@d�d�ZAe6fd�ZBe6fd�ZCe6fd�ZDGd�d�ZEd�ZFd�ZGd�ZHd�ZId�d�ZJd�ZKd�d�ZLd�d�ZMd�d�ZNd �ZOd�d!�ZPd"�ZQd�d#�ZRGd$�d%�ZSd�d&�ZTd'�ZUd(�ZVd�d)�ZWd�d*�ZXd�d+�ZYd�d,�ZZd�d-�Z[d�d.�Z\d�d/�Z]d�d0�Z^d1�Z_d�d2�Z`d�d3�Zad�d4�Zbd5�Zcd�d6�Zdd7�Zeddd8�d9�Zfd�d;�Zgd<�Zhd=�Ziejekffd>�Zld�d?�Zmd�d@�ZnGdA�dBejej��Zpd�dC�ZqdD�ZresdfdE�ZtdF�ZudG�ZvdH�ZwdI�ZxGdJ�dK�ZydL�ZzdM�Z{dN�fdO�Z|e+fddP�dQ�Z}GdR�dSe�Z~GdT�dU�ZGdV�dW�Z�esfdX�Z�dY�Z�d:dZ�Z�d�d[�Z�esdfd\�Z�d�d]�Z�d^�Z�d�d_�Z�Gd`�da�Z�d�db�Z�Gdc�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�fdk�Z�dl�Z�dm�Z�d�dn�Z�d�do�Z�Gdp�dqe��Z�Gdr�ds�Z�dt�Z�d�du�Z�dv�Z�dw�Z�dx�Z�dy�Z�dz�Z�d{�Z�Gd|�d}�Z�d~�Z�d�Z�d��Z�ejekfdd��d��Z�d�d��Z�d�d��Z�d�d��Z�de6d��d��Z�de�d�fd��Z�d��Z�y)��N)�Counter�defaultdict�deque�abc)�Sequence)�partial�reduce�wraps)�heapify�heapreplace�heappop)�chain�compress�count�cycle�	dropwhile�groupby�islice�repeat�starmap�	takewhile�tee�zip_longest)�exp�	factorial�floor�log)�Empty�Queue)�random�	randrange�uniform)�
itemgetter�mul�sub�gt�lt�ge�le)�
hexversion�maxsize)�	monotonic�)
�_marker�
_zip_equal�UnequalIterablesError�consume�flatten�pairwise�powerset�take�unique_everseen�	all_equal)a�AbortThread�SequenceViewr0�adjacent�
all_unique�always_iterable�always_reversible�bucket�
callback_iter�chunked�chunked_even�circular_shifts�collapse�combination_index�consecutive_groups�constrained_batches�consumer�count_cycle�	countable�
difference�distinct_combinations�distinct_permutations�
distribute�divide�duplicates_everseen�duplicates_justseen�	exactly_n�
filter_except�first�gray_product�groupby_transform�ichunked�iequals�ilen�
interleave�interleave_evenly�interleave_longest�intersperse�	is_sorted�islice_extended�iterate�last�locate�longest_common_prefix�lstrip�make_decorator�
map_except�map_if�
map_reduce�	mark_ends�minmax�nth_or_last�nth_permutation�nth_product�
numeric_range�one�only�padded�
partitions�peekable�permutation_index�
product_index�raise_�repeat_each�repeat_last�replace�rlocate�rstrip�
run_length�sample�seekable�set_partitions�side_effect�sliced�
sort_together�split_after�split_at�split_before�
split_into�
split_when�spy�stagger�strip�
strictly_n�
substrings�substrings_indexes�time_limited�unique_in_window�unique_to_each�unzip�value_chain�windowed�windowed_complete�	with_iter�
zip_broadcast�	zip_equal�
zip_offsetFc	����ttt�t|��g��|r#��td����fd�}t|��S�S)aJBreak *iterable* into lists of length *n*:

        >>> list(chunked([1, 2, 3, 4, 5, 6], 3))
        [[1, 2, 3], [4, 5, 6]]

    By the default, the last yielded list will have fewer than *n* elements
    if the length of *iterable* is not divisible by *n*:

        >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3))
        [[1, 2, 3], [4, 5, 6], [7, 8]]

    To use a fill-in value instead, see the :func:`grouper` recipe.

    If the length of *iterable* is not divisible by *n* and *strict* is
    ``True``, then ``ValueError`` will be raised before the last
    list is yielded.

    z*n must not be None when using strict mode.c3�V�K��D]}t|��k7rtd��|���!y�w)Nziterable is not divisible by n.��len�
ValueError)�chunk�iterator�ns ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/more_itertools/more.py�retzchunked.<locals>.ret�s-�����!���u�:��?�$�%F�G�G���"���&))�iterrr5r�)�iterabler��strictr�r�s `  @r�r@r@�sJ���&�G�D�!�T�(�^�4�b�9�H�
��9��I�J�J�	��C�E�{����c��	tt|��S#t$r }|turt	d�|�|cYd}~Sd}~wwxYw)a�Return the first item of *iterable*, or *default* if *iterable* is
    empty.

        >>> first([0, 1, 2, 3])
        0
        >>> first([], 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.

    :func:`first` is useful when you have a generator of expensive-to-retrieve
    values and want any arbitrary one. It is marginally shorter than
    ``next(iter(iterable), default)``.

    zKfirst() was called on an empty iterable, and no default value was provided.N)�nextr��
StopIterationr.r�)r��default�es   r�rSrS�sL��"��D��N�#�#�����g���.���
����
�s��	?�:�?�?c��	t|t�r|dSt|d�rtdk7rt	t|��St
|d��dS#tttf$r|turtd��|cYSwxYw)aReturn the last item of *iterable*, or *default* if *iterable* is
    empty.

        >>> last([0, 1, 2, 3])
        3
        >>> last([], 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.
    ����__reversed__i�r-��maxlenzDlast() was called on an empty iterable, and no default was provided.)�
isinstancer�hasattrr*r��reversedr�
IndexError�	TypeErrorr�r.r�)r�r�s  r�r`r`�s�����h��)��B�<��
�X�~�
.�J�*�4L����*�+�+���!�,�R�0�0���	�=�1���g�����
���
�s�A�(A�A�)A<�;A<c�6�tt||dz�|��S)agReturn the nth or the last item of *iterable*,
    or *default* if *iterable* is empty.

        >>> nth_or_last([0, 1, 2, 3], 2)
        2
        >>> nth_or_last([0, 1], 2)
        1
        >>> nth_or_last([], 0, 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.
    r-�r�)r`r)r�r�r�s   r�rjrj�s����x��Q��'��9�9r�c�D�eZdZdZd�Zd�Zd�Zefd�Zd�Z	d�Z
d�Zd	�Zy
)rraWrap an iterator to allow lookahead and prepending elements.

    Call :meth:`peek` on the result to get the value that will be returned
    by :func:`next`. This won't advance the iterator:

        >>> p = peekable(['a', 'b'])
        >>> p.peek()
        'a'
        >>> next(p)
        'a'

    Pass :meth:`peek` a default value to return that instead of raising
    ``StopIteration`` when the iterator is exhausted.

        >>> p = peekable([])
        >>> p.peek('hi')
        'hi'

    peekables also offer a :meth:`prepend` method, which "inserts" items
    at the head of the iterable:

        >>> p = peekable([1, 2, 3])
        >>> p.prepend(10, 11, 12)
        >>> next(p)
        10
        >>> p.peek()
        11
        >>> list(p)
        [11, 12, 1, 2, 3]

    peekables can be indexed. Index 0 is the item that will be returned by
    :func:`next`, index 1 is the item after that, and so on:
    The values up to the given index will be cached.

        >>> p = peekable(['a', 'b', 'c', 'd'])
        >>> p[0]
        'a'
        >>> p[1]
        'b'
        >>> next(p)
        'a'

    Negative indexes are supported, but be aware that they will cache the
    remaining items in the source iterator, which may require significant
    storage.

    To check whether a peekable is exhausted, check its truth value:

        >>> p = peekable(['a', 'b'])
        >>> if p:  # peekable has items
        ...     list(p)
        ['a', 'b']
        >>> if not p:  # peekable is exhausted
        ...     list(p)
        []

    c�B�t|�|_t�|_y�N)r��_itr�_cache��selfr�s  r��__init__zpeekable.__init__6s����>����g��r�c��|Sr���r�s r��__iter__zpeekable.__iter__:����r�c�D�	|j�y#t$rYywxYw�NFT��peekr�r�s r��__bool__zpeekable.__bool__=�)��	��I�I�K����	��	����	�c���|js/	|jjt|j��|jdS#t$r|t
ur�|cYSwxYw)z�Return the item that will be next returned from ``next()``.

        Return ``default`` if there are no items left. If ``default`` is not
        provided, raise ``StopIteration``.

        r)r��appendr�r�r�r.)r�r�s  r�r�z
peekable.peekDs[���{�{�
����"�"�4����>�2�
�{�{�1�~���	!�
��g�%����
�s�.A�A"�!A"c�L�|jjt|��y)aStack up items to be the next ones returned from ``next()`` or
        ``self.peek()``. The items will be returned in
        first in, first out order::

            >>> p = peekable([1, 2, 3])
            >>> p.prepend(10, 11, 12)
            >>> next(p)
            10
            >>> list(p)
            [11, 12, 1, 2, 3]

        It is possible, by prepending items, to "resurrect" a peekable that
        previously raised ``StopIteration``.

            >>> p = peekable([])
            >>> next(p)
            Traceback (most recent call last):
              ...
            StopIteration
            >>> p.prepend(1)
            >>> next(p)
            1
            >>> next(p)
            Traceback (most recent call last):
              ...
            StopIteration

        N)r��
extendleftr�)r��itemss  r��prependzpeekable.prependTs��:	
�����x���/r�c�x�|jr|jj�St|j�Sr�)r��popleftr�r�r�s r��__next__zpeekable.__next__ss*���;�;��;�;�&�&�(�(��D�H�H�~�r�c��|j�dn|j}|dkDr9|j�dn|j}|j�tn|j}nM|dkr=|j�dn|j}|j�
tdz
n|j}nt	d��|dks|dkr&|j
j
|j�nitt||�dzt�}t|j
�}||k\r2|j
j
t|j||z
��t|j
�|S)Nr-rr�zslice step cannot be zero)
�step�start�stopr+r�r��extendr��min�maxr�r�list)r��indexr�r�r�r��	cache_lens       r��
_get_slicezpeekable._get_sliceys���Z�Z�'�q�e�j�j���!�8��+�+�-�A�E�K�K�E�$�z�z�1�7��
�
�D�
�A�X� �;�;�.�B�U�[�[�E�&+�j�j�&8�W�H�q�L�u�z�z�D��8�9�9�
�A�I�4�!�8��K�K���t�x�x�(��C��t�$�q�(�'�2�A��D�K�K�(�I��I�~����"�"�6�$�(�(�A�	�M�#B�C��D�K�K� ��'�'r�c�V�t|t�r|j|�St|j�}|dkr&|jj|j�n:||k\r5|jjt|j|dz|z
��|j|S�Nrr-)r��slicer�r�r�r�r�r)r�r�r�s   r��__getitem__zpeekable.__getitem__�s����e�U�#��?�?�5�)�)�����$�	��1�9��K�K���t�x�x�(�
�i�
��K�K���v�d�h�h���	�I�0E�F�G��{�{�5�!�!r�N)
�__name__�
__module__�__qualname__�__doc__r�r�r�r.r�r�r�r�r�r�r�r�rrrr�s5��8�t���#�� 0�>�(�4
"r�rrc�.��t���fd��}|S)abDecorator that automatically advances a PEP-342-style "reverse iterator"
    to its first yield point so you don't have to call ``next()`` on it
    manually.

        >>> @consumer
        ... def tally():
        ...     i = 0
        ...     while True:
        ...         print('Thing number %s is %s.' % (i, (yield)))
        ...         i += 1
        ...
        >>> t = tally()
        >>> t.send('red')
        Thing number 0 is red.
        >>> t.send('fish')
        Thing number 1 is fish.

    Without the decorator, you would have to call ``next(t)`` before
    ``t.send()`` could be used.

    c�.���|i|��}t|�|Sr�)r�)�args�kwargs�gen�funcs   �r��wrapperzconsumer.<locals>.wrapper�s����D�#�F�#���S�	��
r�)r
)r�r�s` r�rGrG�s"���.�4�[����
�Nr�c�Z�t�}tt||�d��t|�S)z�Return the number of items in *iterable*.

        >>> ilen(x for x in range(1000000) if x % 3 == 0)
        333334

    This consumes the iterable, so handle with care.

    rr�)rr�zipr�)r��counters  r�rXrX�s&���g�G�	�#�h��
 ��+���=�r�c#�&K�	|��||�}�
�w)z�Return ``start``, ``func(start)``, ``func(func(start))``, ...

    >>> from itertools import islice
    >>> list(islice(iterate(lambda x: 2*x, 1), 10))
    [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]

    r�)r�r�s  r�r_r_�s��������U������c#�RK�|5}|Ed{���ddd�y7�
#1swYyxYw�w)a:Wrap an iterable in a ``with`` statement, so it closes once exhausted.

    For example, this will close the file when the iterator is exhausted::

        upper_lines = (line.upper() for line in with_iter(open('foo')))

    Any context manager which returns an iterable is a candidate for
    ``with_iter``.

    Nr�)�context_managerr�s  r�r�r��s(����
�H����
����
��s �'����	'��$�'c���t|�}	t|�}	t|�}dj	||�}|xst|��#t$r}|xstd�|�d}~wwxYw#t$rY|SwxYw)a�Return the first item from *iterable*, which is expected to contain only
    that item. Raise an exception if *iterable* is empty or has more than one
    item.

    :func:`one` is useful for ensuring that an iterable contains only one item.
    For example, it can be used to retrieve the result of a database query
    that is expected to return a single row.

    If *iterable* is empty, ``ValueError`` will be raised. You may specify a
    different exception with the *too_short* keyword:

        >>> it = []
        >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: too many items in iterable (expected 1)'
        >>> too_short = IndexError('too few items')
        >>> one(it, too_short=too_short)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        IndexError: too few items

    Similarly, if *iterable* contains more than one item, ``ValueError`` will
    be raised. You may specify a different exception with the *too_long*
    keyword:

        >>> it = ['too', 'many']
        >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: Expected exactly one item in iterable, but got 'too',
        'many', and perhaps more.
        >>> too_long = RuntimeError
        >>> one(it, too_long=too_long)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        RuntimeError

    Note that :func:`one` attempts to advance *iterable* twice to ensure there
    is only one item. See :func:`spy` or :func:`peekable` to check iterable
    contents less destructively.

    z&too few items in iterable (expected 1)N�LExpected exactly one item in iterable, but got {!r}, {!r}, and perhaps more.)r�r�r�r��format)r��	too_short�too_long�it�first_valuer��second_value�msgs        r�rnrn�s���X
�h��B���2�h��	*��B�x��

 � &��{�L� A�	��)�*�S�/�)�����M��$L�M��	�����
����
�s(�A�A&�	A#�A�A#�&	A3�2A3c��||��r�r�)�	exceptionr�s  r�ruru0s
��
�T�
�r�c#��K�|�d�}|�d�}t|�}t|�D]}	t|�}|���	t|�||dz�y#t$r||�YywxYw#t$rYywxYw�w)aValidate that *iterable* has exactly *n* items and return them if
    it does. If it has fewer than *n* items, call function *too_short*
    with those items. If it has more than *n* items, call function
    *too_long* with the first ``n + 1`` items.

        >>> iterable = ['a', 'b', 'c', 'd']
        >>> n = 4
        >>> list(strictly_n(iterable, n))
        ['a', 'b', 'c', 'd']

    By default, *too_short* and *too_long* are functions that raise
    ``ValueError``.

        >>> list(strictly_n('ab', 3))  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: too few items in iterable (got 2)

        >>> list(strictly_n('abc', 2))  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: too many items in iterable (got at least 3)

    You can instead supply functions that do something else.
    *too_short* will be called with the number of items in *iterable*.
    *too_long* will be called with `n + 1`.

        >>> def too_short(item_count):
        ...     raise RuntimeError
        >>> it = strictly_n('abcd', 6, too_short=too_short)
        >>> list(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        RuntimeError

        >>> def too_long(item_count):
        ...     print('The boss is going to hear about this')
        >>> it = strictly_n('abcdef', 4, too_long=too_long)
        >>> list(it)
        The boss is going to hear about this
        ['a', 'b', 'c', 'd']

    Nc�@�ttdj|��S)Nz"Too few items in iterable (got {})�rur�r���
item_counts r��<lambda>zstrictly_n.<locals>.<lambda>as��v��0�7�7�
�C�(
r�c�@�ttdj|��S)Nz,Too many items in iterable (got at least {})rrs r�rzstrictly_n.<locals>.<lambda>gs��f��:�A�A�*�M�'
r�r-)r��ranger�r�)r�r�r�r�r��i�items       r�r�r�4s�����X��
�	�
��
��

�h��B�
�1�X��	���8�D�
�J����R��	��Q�����	��a�L��	���
��
�sJ�$A7�A�A7�A(�A7�A%�!A7�$A%�%A7�(	A4�1A7�3A4�4A7c����fd�}d�}t|�}t|��|��}d|cxkr�krnn|�k(r||�S|||�St|rd�Sd�S)a�Yield successive distinct permutations of the elements in *iterable*.

        >>> sorted(distinct_permutations([1, 0, 1]))
        [(0, 1, 1), (1, 0, 1), (1, 1, 0)]

    Equivalent to ``set(permutations(iterable))``, except duplicates are not
    generated and thrown away. For larger input sequences this is much more
    efficient.

    Duplicate permutations arise when there are duplicated elements in the
    input iterable. The number of items returned is
    `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of
    items input, and each `x_i` is the count of a distinct item in the input
    sequence.

    If *r* is given, only the *r*-length permutations are yielded.

        >>> sorted(distinct_permutations([1, 0, 1], r=2))
        [(0, 1), (1, 0), (1, 1)]
        >>> sorted(distinct_permutations(range(3), r=2))
        [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)]

    c3��K�	t|���t�dz
dd�D]}||||dzks�nyt�dz
|d�D]}||||ks�n|||c||<||<|d|�z
d�||dzd�x�w)N�r�r-)�tupler)�Ar	�j�sizes   �r��_fullz$distinct_permutations.<locals>._full�s���������(�N��4�!�8�R��,���Q�4�!�A��E�(�?��-�
��4�!�8�Q��+���Q�4�!�A�$�;��,��1��q��t�J�A�a�D�!�A�$��?�Q��X��?�+�A�a�!�e�g�J�)�s�0A=�"A=�&A=c3�K�|d|||d}}t|dz
dd�}tt|��}	t|���|d}|D]}|||krn||}�y|D] }||||kDs�||||c||<||<n&|D] }||||kDs�||||c||<||<n||d||z
d�z
}|dz
}|d||z
|||z
dc||d|dd���w)Nr-r�)rr�r)	r�r�head�tail�right_head_indexes�left_tail_indexes�pivotr	rs	         r��_partialz'distinct_permutations.<locals>._partial�sD�����r��U�A�a�b�E�d��"�1�q�5�"�b�1��!�#�d�)�,�����+����H�E�'����7�U�?���Q���(�
�'����7�T�!�W�$�'+�A�w��Q��$�D��G�T�!�W��'�,�A��A�w��a��(�+/��7�D��G�(��Q���a���,�
�D��1�q�5�2��&�&�D�
��F�A� $�W�q�1�u�
�t�A��E�G�}��D���H�d�1�g�?�s�A)C�,$C�?Crr�)r�)�sortedr�r�)r�rrrr�rs     @r�rLrL~si���4,�0%=�N
�8��E��u�:�D��y����1�}��}� !�T�	�u�U�|�B����0B�B��a��#�#�U�#�#r�c���|dk(rtd��|dk(r ttt|�|�dd�St|g�}t	||�}ttt||�dd��S)a6Intersperse filler element *e* among the items in *iterable*, leaving
    *n* items between each filler element.

        >>> list(intersperse('!', [1, 2, 3, 4, 5]))
        [1, '!', 2, '!', 3, '!', 4, '!', 5]

        >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2))
        [1, 2, None, 3, 4, None, 5]

    rz
n must be > 0r-N)r�rrYrr@r2)r�r�r��filler�chunkss     r�r\r\�sm��	�A�v���)�)�	
�a���j����H�5�q�$�?�?�
�������1�%���v�j���8�!�T�B�C�Cr�c	�2�|D�cgc]
}t|���}}ttjt	t
|���}|D�chc]
}||dk(s�|��}}|D�cgc]!}tt
|j|����#c}Scc}wcc}wcc}w)a�Return the elements from each of the input iterables that aren't in the
    other input iterables.

    For example, suppose you have a set of packages, each with a set of
    dependencies::

        {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}}

    If you remove one package, which dependencies can also be removed?

    If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not
    associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for
    ``pkg_2``, and ``D`` is only needed for ``pkg_3``::

        >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'})
        [['A'], ['C'], ['D']]

    If there are duplicates in one input iterable that aren't in the others
    they will be duplicated in the output. Input order is preserved::

        >>> unique_to_each("mississippi", "missouri")
        [['p', 'p'], ['o', 'u', 'r']]

    It is assumed that the elements of each iterable are hashable.

    r-)r�rr�
from_iterable�map�set�filter�__contains__)�	iterablesr��pool�counts�element�uniquess      r�r�r��s���6 )�)�y��D��H�y�D�)�
�U�(�(��S�$��8�
9�F�&,�E�f�7��w��1�0D�w�f�G�E�=A�B�T�r�D���,�,�b�1�2�T�B�B��*��E��Bs�B
�	
B�B�!&Bc
#��K�|dkrtd��|dk(r
t���y|dkrtd��t|��}|}t|j|�D]}|dz}|r�|}t|����t|�}|dk(ry||kr%tt
|t|||z
�����yd|cxkrt||�krny||f|zz
}t|���yy�w)aMReturn a sliding window of width *n* over the given iterable.

        >>> all_windows = windowed([1, 2, 3, 4, 5], 3)
        >>> list(all_windows)
        [(1, 2, 3), (2, 3, 4), (3, 4, 5)]

    When the window is larger than the iterable, *fillvalue* is used in place
    of missing values:

        >>> list(windowed([1, 2, 3], 4))
        [(1, 2, 3, None)]

    Each window will advance in increments of *step*:

        >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2))
        [(1, 2, 3), (3, 4, 5), (5, 6, '!')]

    To slide into the iterable's items, use :func:`chain` to add filler items
    to the left:

        >>> iterable = [1, 2, 3, 4]
        >>> n = 3
        >>> padding = [None] * (n - 1)
        >>> list(windowed(chain(padding, iterable), 3))
        [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)]
    r�n must be >= 0Nr-zstep must be >= 1r�)	r�rrr!r�r�rrr�)�seqr��	fillvaluer��windowr	�_rs        r�r�r�s�����6	�1�u��)�*�*��A�v��g�
���a�x��,�-�-�
�!�_�F�	�A�
�����
$��	�Q�����A���-��	%��v�;�D��q�y��	
����E�&�&��A��H�"=�>�?�?�	
�Q�	��T�1��	��9�,��"�"���F�m��
�s
�A!C �$A<C c#��K�g}t|�D]}|j|�|f���t|�}t|�}t	d|dz�D]"}t	||z
dz�D]}||||z����$y�w)aFYield all of the substrings of *iterable*.

        >>> [''.join(s) for s in substrings('more')]
        ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more']

    Note that non-string iterables can also be subdivided.

        >>> list(substrings([0, 1, 2]))
        [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)]

    r
r-N)r�r�rr�r)r�r,r
rr�r	s      r�r�r�Ss�����
�C��X����
�
�4���g�
����*�C��S��J��1�j�1�n�
%���z�A�~��)�*�A��a�!�a�%�.� �+�&�s�A4A6c�d��tdt��dz�}|rt|�}�fd�|D�S)a@Yield all substrings and their positions in *seq*

    The items yielded will be a tuple of the form ``(substr, i, j)``, where
    ``substr == seq[i:j]``.

    This function only works for iterables that support slicing, such as
    ``str`` objects.

    >>> for item in substrings_indexes('more'):
    ...    print(item)
    ('m', 0, 1)
    ('o', 1, 2)
    ('r', 2, 3)
    ('e', 3, 4)
    ('mo', 0, 2)
    ('or', 1, 3)
    ('re', 2, 4)
    ('mor', 0, 3)
    ('ore', 1, 4)
    ('more', 0, 4)

    Set *reverse* to ``True`` to yield the same items in the opposite order.


    r-c3�x�K�|]1}tt��|z
dz�D]}�|||z|||zf����3y�w�r-N)rr�)�.0�Lr	r,s   �r��	<genexpr>z%substrings_indexes.<locals>.<genexpr>�sF������,-�q�u�S��X��\�A�=M�7N�!��Q��Q����A��E�"�7N�"�A�s�7:)rr�r�)r,�reversers`  r�r�r�ms7���4	�a��S��A���A���Q�K���,-��r�c�0�eZdZdZdd�Zd�Zd�Zd�Zd�Zy)	r>a�Wrap *iterable* and return an object that buckets it iterable into
    child iterables based on a *key* function.

        >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
        >>> s = bucket(iterable, key=lambda x: x[0])  # Bucket by 1st character
        >>> sorted(list(s))  # Get the keys
        ['a', 'b', 'c']
        >>> a_iterable = s['a']
        >>> next(a_iterable)
        'a1'
        >>> next(a_iterable)
        'a2'
        >>> list(s['b'])
        ['b1', 'b2', 'b3']

    The original iterable will be advanced and its items will be cached until
    they are used by the child iterables. This may require significant storage.

    By default, attempting to select a bucket to which no items belong  will
    exhaust the iterable and cache all values.
    If you specify a *validator* function, selected buckets will instead be
    checked against it.

        >>> from itertools import count
        >>> it = count(1, 2)  # Infinite sequence of odd numbers
        >>> key = lambda x: x % 10  # Bucket by last digit
        >>> validator = lambda x: x in {1, 3, 5, 7, 9}  # Odd digits only
        >>> s = bucket(it, key=key, validator=validator)
        >>> 2 in s
        False
        >>> list(s[2])
        []

    Nc�r�t|�|_||_tt�|_|xsd�|_y)Nc��y�NTr���xs r�rz!bucket.__init__.<locals>.<lambda>�s��$r�)r�r��_keyrrr��
_validator)r�r��key�	validators    r�r�zbucket.__init__�s,����>�����	�!�%�(���#�7���r�c��|j|�sy	t||�}|j|j|�y#t$rYywxYwr�)r?r�r��
appendleftr�)r��valuer
s   r�r$zbucket.__contains__�sT�����u�%��	0���U��$�D�
�K�K���)�)�$�/����	��	�s�A�	A
�A
c#�NK�	|j|r |j|j���nb		t|j�}|j|�}||k(r|��n0|j
|�r|j|j|��a��#t$rYywxYw�w)z�
        Helper to yield items from the parent iterator that match *value*.
        Items that don't match are stored in the local cache as they
        are encountered.
        N)r�r�r�r�r�r>r?r�)r�rDr
�
item_values    r��_get_valueszbucket._get_values�s�������{�{�5�!��k�k�%�(�0�0�2�2���#�D�H�H�~��"&���4��J�!�U�*�"�
������4����J�/�6�6�t�<����)����s)�2B%�B�
AB%�	B"�B%�!B"�"B%c#�K�|jD]C}|j|�}|j|�s�&|j|j	|��E|jj�Ed{���y7��wr�)r�r>r?r�r��keys)r�r
rFs   r�r�zbucket.__iter__�s\�����H�H�D����4��J����z�*����J�'�.�.�t�4��
�;�;�#�#�%�%�%�s�2A:�=A:�2A8�3A:c�\�|j|�std�S|j|�S)Nr�)r?r�rG�r�rDs  r�r�zbucket.__getitem__�s(�����u�%���8�O�����&�&r�r�)	r�r�r�r�r�r$rGr�r�r�r�r�r>r>�s!��!�F8��=�4&�'r�r>c�h�t|�}t||�}|j�t||�fS)a�Return a 2-tuple with a list containing the first *n* elements of
    *iterable*, and an iterator with the same items as *iterable*.
    This allows you to "look ahead" at the items in the iterable without
    advancing it.

    There is one item in the list by default:

        >>> iterable = 'abcdefg'
        >>> head, iterable = spy(iterable)
        >>> head
        ['a']
        >>> list(iterable)
        ['a', 'b', 'c', 'd', 'e', 'f', 'g']

    You may use unpacking to retrieve items instead of lists:

        >>> (head,), iterable = spy('abcdefg')
        >>> head
        'a'
        >>> (first, second), iterable = spy('abcdefg', 2)
        >>> first
        'a'
        >>> second
        'b'

    The number of items requested can be larger than the number of items in
    the iterable:

        >>> iterable = [1, 2, 3, 4, 5]
        >>> head, iterable = spy(iterable, 10)
        >>> head
        [1, 2, 3, 4, 5]
        >>> list(iterable)
        [1, 2, 3, 4, 5]

    )r�r5�copyr)r�r�r�rs    r�r�r��s0��J
�h��B���2�;�D��9�9�;��d�B��'�'r�c�8�tjt|��S)a4Return a new iterable yielding from each iterable in turn,
    until the shortest is exhausted.

        >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8]))
        [1, 4, 6, 2, 5, 7]

    For a version that doesn't terminate after the shortest iterable is
    exhausted, see :func:`interleave_longest`.

    )rr r��r%s r�rYrYs�����s�I��/�/r�c�X�tjt|dti��}d�|D�S)asReturn a new iterable yielding from each iterable in turn,
    skipping any that are exhausted.

        >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8]))
        [1, 4, 6, 2, 5, 7, 3, 8]

    This function produces the same output as :func:`roundrobin`, but may
    perform better for some inputs (in particular when the number of iterables
    is large).

    r-c3�2K�|]}|tus�|���y�wr�)r.�r4r=s  r�r6z%interleave_longest.<locals>.<genexpr>5s����-�q�!�A�W�,�A�q�s�
�)rr rr.)r%r	s  r�r[r[(s)��	���K��F�g�F�G�A�-�q�-�-r�c#���K���	|D�cgc]
}t|���c}�n"t|�t��k7rtd��t��}tt	|��fd�d��}|D�cgc]}�|��	}}|D�cgc]}t||���}}|d|dd}	}|d|dd}}
||zgt|	�z}t
��}
|
rrt|
���|
dz}
t||	�D��cgc]
\}}||z
��}}}t|�D]-\}}|dks�t||���|
dz}
||xx|z
cc<�/|
r�qyycc}w#t$rtd��wxYwcc}wcc}wcc}}w�w)	aG
    Interleave multiple iterables so that their elements are evenly distributed
    throughout the output sequence.

    >>> iterables = [1, 2, 3, 4, 5], ['a', 'b']
    >>> list(interleave_evenly(iterables))
    [1, 2, 'a', 3, 4, 'b', 5]

    >>> iterables = [[1, 2, 3], [4, 5], [6, 7, 8]]
    >>> list(interleave_evenly(iterables))
    [1, 6, 4, 2, 7, 3, 8, 5]

    This function requires iterables of known length. Iterables without
    ``__len__()`` can be used by manually specifying lengths with *lengths*:

    >>> from itertools import combinations, repeat
    >>> iterables = [combinations(range(4), 2), ['a', 'b', 'c']]
    >>> lengths = [4 * (4 - 1) // 2, 3]
    >>> list(interleave_evenly(iterables, lengths=lengths))
    [(0, 1), (0, 2), 'a', (0, 3), (1, 2), 'b', (1, 3), (2, 3), 'c']

    Based on Bresenham's algorithm.
    Nz^Iterable lengths could not be determined automatically. Specify them with the lengths keyword.z,Mismatching number of iterables and lengths.c����|Sr�r�)r	�lengthss �r�rz#interleave_evenly.<locals>.<lambda>_s	���7�1�:r�T�r@r7rr-)
r�r�r�rrr��sumr�r��	enumerate)r%rUr��dims�lengths_permuter	�lengths_desc�
iters_desc�
delta_primary�deltas_secondary�iter_primary�iters_secondary�errors�to_yieldr��deltas `              r�rZrZ8s������0��	�)2�3��2�s�2�w��3�G�

�Y��3�w�<�	'��G�H�H��w�<�D��
�d��-�t��O�)8�8��1�G�A�J��L�8�.=�>�o��$�y��|�$�o�J�>�'3�1�o�|�A�B�7G�#�M�$.�q�M�:�a�b�>�/�L��t�#�
$�s�+;�'<�
<�F��7�|�H�
��<� � ��A�
��,/��8H�,I�J�,I���5�!�e�)�,I��J��f�%�D�A�q��1�u��?�1�-�.�.��A�
���q�	�]�*�	�	&���34���	��9��
�	��9��>��K�s]�E(�E�D;�E�AE(�,E�8E(�>E�AE(�)E"�8E(�&E(�9E(�;E�E�E(c#�F���K����fd���|d�Ed{���y7��w)a>Flatten an iterable with multiple levels of nesting (e.g., a list of
    lists of tuples) into non-iterable types.

        >>> iterable = [(1, 2), ([3, 4], [[5], [6]])]
        >>> list(collapse(iterable))
        [1, 2, 3, 4, 5, 6]

    Binary and text strings are not considered iterable and
    will not be collapsed.

    To avoid collapsing other types, specify *base_type*:

        >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']]
        >>> list(collapse(iterable, base_type=tuple))
        ['ab', ('cd', 'ef'), 'gh', 'ij']

    Specify *levels* to stop flattening after a certain level:

    >>> iterable = [('a', ['b']), ('c', ['d'])]
    >>> list(collapse(iterable))  # Fully flattened
    ['a', 'b', 'c', 'd']
    >>> list(collapse(iterable, levels=1))  # Only one level flattened
    ['a', ['b'], 'c', ['d']]

    c3���K���|�kDs$t|ttf�s��t|��r|��y	t|�}|D]}�||dz�Ed{����y7�#t$r|��YywxYw�w�Nr-)r��str�bytesr�r�)�node�level�tree�child�	base_type�levels�walks    ���r�rozcollapse.<locals>.walk�s������� �u�v�~��$��e��-��&�J�t�Y�,G��J��	2���:�D�
����u�q�y�1�1�1��1���	��J��	�s4�1A1�A�A1�A�A1�
A.�+A1�-A.�.A1rNr�)r�rmrnros ``@r�rCrCzs�����62�$�H�a� � � �s�!��!c#��K�	|�|�|�|D]}||�|���n#t||�D]}||�|Ed{����|�|�yy7�#|�|�wwxYw�w)auInvoke *func* on each item in *iterable* (or on each *chunk_size* group
    of items) before yielding the item.

    `func` must be a function that takes a single argument. Its return value
    will be discarded.

    *before* and *after* are optional functions that take no arguments. They
    will be executed before iteration starts and after it ends, respectively.

    `side_effect` can be used for logging, updating progress bars, or anything
    that is not functionally "pure."

    Emitting a status message:

        >>> from more_itertools import consume
        >>> func = lambda item: print('Received {}'.format(item))
        >>> consume(side_effect(func, range(2)))
        Received 0
        Received 1

    Operating on chunks of items:

        >>> pair_sums = []
        >>> func = lambda chunk: pair_sums.append(sum(chunk))
        >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2))
        [0, 1, 2, 3, 4, 5]
        >>> list(pair_sums)
        [1, 5, 9]

    Writing to a file-like object:

        >>> from io import StringIO
        >>> from more_itertools import consume
        >>> f = StringIO()
        >>> func = lambda x: print(x, file=f)
        >>> before = lambda: print(u'HEADER', file=f)
        >>> after = f.close
        >>> it = [u'a', u'b', u'c']
        >>> consume(side_effect(func, it, before=before, after=after))
        >>> f.closed
        True

    N)r@)r�r��
chunk_size�before�afterr
r�s       r�rr�s~����X����H��� ���T�
��
�!�!��:�6���U�� � � �7����G��!�����G��s-�A"�;A�A�A�A"�A�A�A"c�����tt��fd�td��D���|r��fd�}t|��S�S)apYield slices of length *n* from the sequence *seq*.

    >>> list(sliced((1, 2, 3, 4, 5, 6), 3))
    [(1, 2, 3), (4, 5, 6)]

    By the default, the last yielded slice will have fewer than *n* elements
    if the length of *seq* is not divisible by *n*:

    >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3))
    [(1, 2, 3), (4, 5, 6), (7, 8)]

    If the length of *seq* is not divisible by *n* and *strict* is
    ``True``, then ``ValueError`` will be raised before the last
    slice is yielded.

    This function will only work for iterables that support slicing.
    For non-sliceable iterables, see :func:`chunked`.

    c3�.�K�|]}�||�z���y�wr�r�)r4r	r�r,s  ��r�r6zsliced.<locals>.<genexpr>�s�����C�{�!�s�1�q�1�u�~�{���rc3�V�K��D]}t|��k7rtd��|���!y�w)Nzseq is not divisible by n.r�)�_slicer�r�s ��r�r�zsliced.<locals>.ret�s.�����"���v�;�!�#�$�%A�B�B���#�r�)rr�rr�)r,r�r�r�r�s``  @r�r�r��s8���(��C�u�Q��{�C�D�H�
�	��C�E�{���r�c#��K�|dk(rt|���yg}t|�}|D]B}||�r'|��|r|g��|dk(rt|���yg}|dz}�2|j|��D|��y�w)a;Yield lists of items from *iterable*, where each list is delimited by
    an item where callable *pred* returns ``True``.

        >>> list(split_at('abcdcba', lambda x: x == 'b'))
        [['a'], ['c', 'd', 'c'], ['a']]

        >>> list(split_at(range(10), lambda n: n % 2 == 1))
        [[0], [2], [4], [6], [8], []]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2))
        [[0], [2], [4, 5, 6, 7, 8, 9]]

    By default, the delimiting items are not included in the output.
    To include them, set *keep_separator* to ``True``.

        >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True))
        [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']]

    rNr-�r�r�r�)r��pred�maxsplit�keep_separator�bufr�r
s       r�r�r�	s~����.�1�}��8�n���
�C�	
�h��B�����:��I���f���1�}��2�h����C���M�H��J�J�t����I�s�A-A/c#��K�|dk(rt|���yg}t|�}|D]@}||�r%|r#|��|dk(r|gt|�z��yg}|dz}|j|��B|r|��yy�w)a\Yield lists of items from *iterable*, where each list ends just before
    an item for which callable *pred* returns ``True``:

        >>> list(split_before('OneTwo', lambda s: s.isupper()))
        [['O', 'n', 'e'], ['T', 'w', 'o']]

        >>> list(split_before(range(10), lambda n: n % 3 == 0))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]]
    rNr-rz�r�r{r|r~r�r
s      r�r�r�5s����� �1�}��8�n���
�C�	
�h��B�����:�#��I��1�}��f�t�B�x�'�'���C���M�H��
�
�4�����	��s�A.A0c#��K�|dk(rt|���yg}t|�}|D]B}|j|�||�s�|s� |��|dk(rt|�}|r|��yg}|dz}�D|r|��yy�w)a[Yield lists of items from *iterable*, where each list ends with an
    item where callable *pred* returns ``True``:

        >>> list(split_after('one1two2', lambda s: s.isdigit()))
        [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']]

        >>> list(split_after(range(10), lambda n: n % 3 == 0))
        [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2))
        [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]]

    rNr-rzr�s      r�r�r�Xs�����"�1�}��8�n���
�C�	
�h��B����
�
�4����:�#��I��1�}��2�h����I���C���M�H����	��s�?A2�A2�-A2c#�K�|dk(rt|���yt|�}	t|�}|g}|D]A}|||�r#|��|dk(r|gt|�z��yg}|dz}|j	|�|}�C|��y#t$rYywxYw�w)a�Split *iterable* into pieces based on the output of *pred*.
    *pred* should be a function that takes successive pairs of items and
    returns ``True`` if the iterable should be split in between them.

    For example, to find runs of increasing numbers, split the iterable when
    element ``i`` is larger than element ``i + 1``:

        >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y))
        [[1, 2, 3, 3], [2, 5], [2, 4], [2]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2],
        ...                 lambda x, y: x > y, maxsplit=2))
        [[1, 2, 3, 3], [2, 5], [2, 4, 2]]

    rNr-)r�r�r�r�r�)r�r{r|r��cur_itemr~�	next_items       r�r�r�~s�����&�1�}��8�n���	
�h��B����8���*�C��	���)�$��I��1�}� �k�D��H�,�,���C���M�H��
�
�9������I��!����s(�B
�A;�AB
�;	B�B
�B�B
c#�K�t|�}|D]*}|�t|���ytt||�����,y�w)a�Yield a list of sequential items from *iterable* of length 'n' for each
    integer 'n' in *sizes*.

        >>> list(split_into([1,2,3,4,5,6], [1,2,3]))
        [[1], [2, 3], [4, 5, 6]]

    If the sum of *sizes* is smaller than the length of *iterable*, then the
    remaining items of *iterable* will not be returned.

        >>> list(split_into([1,2,3,4,5,6], [2,3]))
        [[1, 2], [3, 4, 5]]

    If the sum of *sizes* is larger than the length of *iterable*, fewer items
    will be returned in the iteration that overruns *iterable* and further
    lists will be empty:

        >>> list(split_into([1,2,3,4], [1,2,3,4]))
        [[1], [2, 3], [4], []]

    When a ``None`` object is encountered in *sizes*, the returned list will
    contain items up to the end of *iterable* the same way that itertools.slice
    does:

        >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None]))
        [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]]

    :func:`split_into` can be useful for grouping a series of items where the
    sizes of the groups are not uniform. An example would be where in a row
    from a table, multiple columns represent elements of the same feature
    (e.g. a point represented by x,y,z) but, the format is not the same for
    all columns.
    N)r�r�r)r��sizesr�rs    r�r�r��s?����F
�h��B����<��r�(�N���v�b�$�'�(�(��s�<>c#��K�t|�}|�t|t|��Ed{���y|dkrtd��d}|D]}|��|dz
}�
|r||z
|zn||z
}t	|�D]}|���y7�K�w)a�Yield the elements from *iterable*, followed by *fillvalue*, such that
    at least *n* items are emitted.

        >>> list(padded([1, 2, 3], '?', 5))
        [1, 2, 3, '?', '?']

    If *next_multiple* is ``True``, *fillvalue* will be emitted until the
    number of items emitted is a multiple of *n*::

        >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True))
        [1, 2, 3, 4, None, None]

    If *n* is ``None``, *fillvalue* will be emitted indefinitely.

    Nr-�n must be at least 1r)r�rrr�r)	r�r-r��
next_multipler�rr
�	remainingr/s	         r�rprp�s����� 
�h��B��y���V�I�.�/�/�/�	
�Q���/�0�0��
��D��J��!�O�J��-:�Q��^�q�(�q�:�~�	��y�!�A��O�"�	0�s�&A6�A4�AA6c	�\�tjtt|t|���S)z�Repeat each element in *iterable* *n* times.

    >>> list(repeat_each('ABC', 3))
    ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C']
    )rr r!r)r�r�s  r�rvrv�s"�����s�6�8�V�A�Y�?�@�@r�c#�pK�t}|D]}|���|tur|n|}t|�Ed{���y7��w)a"After the *iterable* is exhausted, keep yielding its last element.

        >>> list(islice(repeat_last(range(3)), 5))
        [0, 1, 2, 2, 2]

    If the iterable is empty, yield *default* forever::

        >>> list(islice(repeat_last(range(0), 42), 5))
        [42, 42, 42, 42, 42]

    N)r.r)r�r�r
�finals    r�rwrws6�����D����
���w��G�D�E��e�}���s�,6�4�6c
��|dkrtd��t||�}t|�D��cgc]\}}t||d|���c}}Scc}}w)a�Distribute the items from *iterable* among *n* smaller iterables.

        >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6])
        >>> list(group_1)
        [1, 3, 5]
        >>> list(group_2)
        [2, 4, 6]

    If the length of *iterable* is not evenly divisible by *n*, then the
    length of the returned iterables will not be identical:

        >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7])
        >>> [list(c) for c in children]
        [[1, 4, 7], [2, 5], [3, 6]]

    If the length of *iterable* is smaller than *n*, then the last returned
    iterables will be empty:

        >>> children = distribute(5, [1, 2, 3])
        >>> [list(c) for c in children]
        [[1], [2], [3], [], []]

    This function uses :func:`itertools.tee` and may require significant
    storage. If you need the order items in the smaller iterables to match the
    original iterable, see :func:`divide`.

    r-r�N)r�rrXr)r�r��childrenr�r�s     r�rMrMsQ��8	�1�u��/�0�0��8�Q��H�8A�(�8K�L�8K�9�5�"�F�2�u�d�A�&�8K�L�L��Ls�Ac�F�t|t|��}t||||d��S)a[Yield tuples whose elements are offset from *iterable*.
    The amount by which the `i`-th item in each tuple is offset is given by
    the `i`-th item in *offsets*.

        >>> list(stagger([0, 1, 2, 3]))
        [(None, 0, 1), (0, 1, 2), (1, 2, 3)]
        >>> list(stagger(range(8), offsets=(0, 2, 4)))
        [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)]

    By default, the sequence will end when the final element of a tuple is the
    last item in the iterable. To continue until the first element of a tuple
    is the last item in the iterable, set *longest* to ``True``::

        >>> list(stagger([0, 1, 2, 3], longest=True))
        [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)]

    By default, ``None`` will be used to replace offsets beyond the end of the
    sequence. Specify *fillvalue* to use some other value.

    )�offsets�longestr-)rr�r�)r�r�r�r-r�s     r�r�r�7s*��*�8�S��\�*�H��	�7�G�y��r�c�X�tdk\rtjdt�t	|�S)a ``zip`` the input *iterables* together, but raise
    ``UnequalIterablesError`` if they aren't all the same length.

        >>> it_1 = range(3)
        >>> it_2 = iter('abc')
        >>> list(zip_equal(it_1, it_2))
        [(0, 'a'), (1, 'b'), (2, 'c')]

        >>> it_1 = range(3)
        >>> it_2 = iter('abcd')
        >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        more_itertools.more.UnequalIterablesError: Iterables have different
        lengths

    i�
zwzip_equal will be removed in a future version of more-itertools. Use the builtin zip function with strict=True instead.)r*�warnings�warn�DeprecationWarningr/rOs r�r�r�Ss/��$�Y���
�
�'�
�
	
��y�!�!r�)r�r-c	�Z�t|�t|�k7rtd��g}t||�D]d\}}|dkr'|jt	t||�|���2|dkDr|jt
||d���T|j|��f|rt|d|i�St|�S)aF``zip`` the input *iterables* together, but offset the `i`-th iterable
    by the `i`-th item in *offsets*.

        >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1)))
        [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')]

    This can be used as a lightweight alternative to SciPy or pandas to analyze
    data sets in which some series have a lead or lag relationship.

    By default, the sequence will end when the shortest iterable is exhausted.
    To continue until the longest iterable is exhausted, set *longest* to
    ``True``.

        >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True))
        [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')]

    By default, ``None`` will be used to replace offsets beyond the end of the
    sequence. Specify *fillvalue* to use some other value.

    z,Number of iterables and offsets didn't matchrNr-)r�r�r�r�rrrr)r�r�r-r%�	staggeredr�r�s       r�r�r�rs���*�9�~��W��%��G�H�H��I��Y��(���A��q�5����U�6�)�a�R�#8�"�=�>�
��U����V�B��4�0�1����R� �
)���I�;��;�;��	�?�r��rc	��������	t|�}n3t|�}t|�dk(r|d���fd�}nt|����fd�}ttt	t|�||����S)a�Return the input iterables sorted together, with *key_list* as the
    priority for sorting. All iterables are trimmed to the length of the
    shortest one.

    This can be used like the sorting function in a spreadsheet. If each
    iterable represents a column of data, the key list determines which
    columns are used for sorting.

    By default, all iterables are sorted using the ``0``-th iterable::

        >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')]
        >>> sort_together(iterables)
        [(1, 2, 3, 4), ('d', 'c', 'b', 'a')]

    Set a different key list to sort according to another iterable.
    Specifying multiple keys dictates how ties are broken::

        >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')]
        >>> sort_together(iterables, key_list=(1, 2))
        [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')]

    To sort by a function of the elements of the iterable, pass a *key*
    function. Its arguments are the elements of the iterables corresponding to
    the key list::

        >>> names = ('a', 'b', 'c')
        >>> lengths = (1, 2, 3)
        >>> widths = (5, 2, 1)
        >>> def area(length, width):
        ...     return length * width
        >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area)
        [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)]

    Set *reverse* to ``True`` to sort in descending order.

        >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True)
        [(3, 2, 1), ('a', 'b', 'c')]

    r-rc����|��Sr�r�)�zipped_itemsr@�
key_offsets ��r�rzsort_together.<locals>.<lambda>�s����L��4L�0Mr�c�����|��Sr�r�)r��
get_key_itemsr@s ��r�rzsort_together.<locals>.<lambda>�s�����|�,�1r�rV)r#r�r�r�r)r%�key_listr@r7�key_argumentr�r�s  `  @@r�r�r��su���P�{�"�8�,����>���x�=�A��"�!��J�M�L�'��1�M��L���V�C��O��w�
G�H��r�c���tt|��\}}|sy|d}t|t|��}d��t	�fd�t|�D��S)a�The inverse of :func:`zip`, this function disaggregates the elements
    of the zipped *iterable*.

    The ``i``-th iterable contains the ``i``-th element from each element
    of the zipped iterable. The first element is used to determine the
    length of the remaining elements.

        >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
        >>> letters, numbers = unzip(iterable)
        >>> list(letters)
        ['a', 'b', 'c', 'd']
        >>> list(numbers)
        [1, 2, 3, 4]

    This is similar to using ``zip(*iterable)``, but it avoids reading
    *iterable* into memory. Note, however, that this function uses
    :func:`itertools.tee` and thus may require significant storage.

    r�rc����fd�}|S)Nc�6��	|�S#t$rt�wxYwr�)r�r�)�objr	s �r��getterz)unzip.<locals>.itemgetter.<locals>.getter�s(���
$��1�v�
���

$�$�#�

$�s��r�)r	r�s` r�r#zunzip.<locals>.itemgetter�s���
	$��
r�c3�H�K�|]\}}t�|�|����y�wr��r!)r4r	r�r#s   �r�r6zunzip.<locals>.<genexpr>	s#�����J�5I�E�A�r��Z��]�B�'�5I�s�")r�r�rr�rrX)r�rr%r#s   @r�r�r��sS���(��h��(�N�D�(�����7�D��H�c�$�i�(�I��$�J�Y�y�5I�J�J�Jr�c�&�|dkrtd��	|dd|}tt	|�|�\}}g}d}td|dz�D]0}|}|||kr|dzn|z
}|j
t|||���2|S#t$rt|�}Y�vwxYw)a�Divide the elements from *iterable* into *n* parts, maintaining
    order.

        >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6])
        >>> list(group_1)
        [1, 2, 3]
        >>> list(group_2)
        [4, 5, 6]

    If the length of *iterable* is not evenly divisible by *n*, then the
    length of the returned iterables will not be identical:

        >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7])
        >>> [list(c) for c in children]
        [[1, 2, 3], [4, 5], [6, 7]]

    If the length of the iterable is smaller than n, then the last returned
    iterables will be empty:

        >>> children = divide(5, [1, 2, 3])
        >>> [list(c) for c in children]
        [[1], [2], [3], [], []]

    This function will exhaust the iterable before returning and may require
    significant storage. If order is not important, see :func:`distribute`,
    which does not first pull the iterable into memory.

    r-r�Nr)r�r�r�divmodr�rr�r�)	r�r�r,�qrr�r�r	r�s	         r�rNrNs���:	�1�u��/�0�0����!�����#�c�(�A��D�A�q�
�C��D�
�1�a�!�e�_������a���A��Q�&���
�
�4��E�$��(�)��
�J�����H�o���s�A9�9B�Bc��|�td�S|�t||�rt|f�S	t|�S#t$rt|f�cYSwxYw)axIf *obj* is iterable, return an iterator over its items::

        >>> obj = (1, 2, 3)
        >>> list(always_iterable(obj))
        [1, 2, 3]

    If *obj* is not iterable, return a one-item iterable containing *obj*::

        >>> obj = 1
        >>> list(always_iterable(obj))
        [1]

    If *obj* is ``None``, return an empty iterable:

        >>> obj = None
        >>> list(always_iterable(None))
        []

    By default, binary and text strings are not considered iterable::

        >>> obj = 'foo'
        >>> list(always_iterable(obj))
        ['foo']

    If *base_type* is set, objects for which ``isinstance(obj, base_type)``
    returns ``True`` won't be considered iterable.

        >>> obj = {'a': 1}
        >>> list(always_iterable(obj))  # Iterate over the dict's keys
        ['a']
        >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
        [{'a': 1}]

    Set *base_type* to ``None`` to avoid any special handling and treat objects
    Python considers iterable as iterable:

        >>> obj = 'foo'
        >>> list(always_iterable(obj, base_type=None))
        ['f', 'o', 'o']
    r�)r�r�r�)r�rms  r�r<r<?sX��R�{��B�x����:�c�9�#=��S�F�|����C�y������S�F�|���s�
4�A�Ac���|dkrtd��t|�\}}dg|z}t|t||�|�}ttt|d|zdz��}t
||�S)asReturn an iterable over `(bool, item)` tuples where the `item` is
    drawn from *iterable* and the `bool` indicates whether
    that item satisfies the *predicate* or is adjacent to an item that does.

    For example, to find whether items are adjacent to a ``3``::

        >>> list(adjacent(lambda x: x == 3, range(6)))
        [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)]

    Set *distance* to change what counts as adjacent. For example, to find
    whether items are two places away from a ``3``:

        >>> list(adjacent(lambda x: x == 3, range(6), distance=2))
        [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)]

    This is useful for contextualizing the results of a search function.
    For example, a code comparison tool might want to identify lines that
    have changed, but also surrounding lines to give the viewer of the diff
    context.

    The predicate function will only be called once for each item in the
    iterable.

    See also :func:`groupby_transform`, which can be used with this function
    to group ranges of items with the same `bool` value.

    rzdistance must be at least 0Fr
r-)r�rrr!�anyr�r�)�	predicater��distance�i1�i2�padding�selected�adjacent_to_selecteds        r�r:r:tsp��:�!�|��6�7�7�
��]�F�B���g�� �G��W�c�)�R�0�'�:�H��s�H�X�q�8�|�a�7G�$H�I���#�R�(�(r�c�V���t||�}�r�fd�|D�}�r�fd�|D�}|S)aAn extension of :func:`itertools.groupby` that can apply transformations
    to the grouped data.

    * *keyfunc* is a function computing a key value for each item in *iterable*
    * *valuefunc* is a function that transforms the individual items from
      *iterable* after grouping
    * *reducefunc* is a function that transforms each group of items

    >>> iterable = 'aAAbBBcCC'
    >>> keyfunc = lambda k: k.upper()
    >>> valuefunc = lambda v: v.lower()
    >>> reducefunc = lambda g: ''.join(g)
    >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc))
    [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')]

    Each optional argument defaults to an identity function if not specified.

    :func:`groupby_transform` is useful when grouping elements of an iterable
    using a separate iterable as the key. To do this, :func:`zip` the iterables
    and pass a *keyfunc* that extracts the first element and a *valuefunc*
    that extracts the second element::

        >>> from operator import itemgetter
        >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3]
        >>> values = 'abcdefghi'
        >>> iterable = zip(keys, values)
        >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1))
        >>> [(k, ''.join(g)) for k, g in grouper]
        [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')]

    Note that the order of items in the iterable is significant.
    Only adjacent items are grouped together, so if you don't want any
    duplicate groups, you should sort the iterable by the key function.

    c3�@�K�|]\}}|t�|�f���y�wr�r�)r4�k�g�	valuefuncs   �r�r6z$groupby_transform.<locals>.<genexpr>�s"�����6�#�$�!�Q��3�y�!�$�%�#�s�c3�8�K�|]\}}|�|�f���y�wr�r�)r4r�r��
reducefuncs   �r�r6z$groupby_transform.<locals>.<genexpr>�s�����2�c�d�a���:�a�=�!�c�s��r)r��keyfuncr�r�r�s  `` r�rUrU�s1���H�(�G�
$�C��6�#�6���2�c�2���Jr�c��eZdZdZeedd��Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zy)rma<An extension of the built-in ``range()`` function whose arguments can
    be any orderable numeric type.

    With only *stop* specified, *start* defaults to ``0`` and *step*
    defaults to ``1``. The output items will match the type of *stop*:

        >>> list(numeric_range(3.5))
        [0.0, 1.0, 2.0, 3.0]

    With only *start* and *stop* specified, *step* defaults to ``1``. The
    output items will match the type of *start*:

        >>> from decimal import Decimal
        >>> start = Decimal('2.1')
        >>> stop = Decimal('5.1')
        >>> list(numeric_range(start, stop))
        [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')]

    With *start*, *stop*, and *step*  specified the output items will match
    the type of ``start + step``:

        >>> from fractions import Fraction
        >>> start = Fraction(1, 2)  # Start at 1/2
        >>> stop = Fraction(5, 2)  # End at 5/2
        >>> step = Fraction(1, 2)  # Count by 1/2
        >>> list(numeric_range(start, stop, step))
        [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)]

    If *step* is zero, ``ValueError`` is raised. Negative steps are supported:

        >>> list(numeric_range(3, -1, -1.0))
        [3.0, 2.0, 1.0, 0.0]

    Be aware of the limitations of floating point numbers; the representation
    of the yielded numbers may be surprising.

    ``datetime.datetime`` objects can be used for *start* and *stop*, if *step*
    is a ``datetime.timedelta`` object:

        >>> import datetime
        >>> start = datetime.datetime(2019, 1, 1)
        >>> stop = datetime.datetime(2019, 1, 3)
        >>> step = datetime.timedelta(days=1)
        >>> items = iter(numeric_range(start, stop, step))
        >>> next(items)
        datetime.datetime(2019, 1, 1, 0, 0)
        >>> next(items)
        datetime.datetime(2019, 1, 2, 0, 0)

    rc���t|�}|dk(rW|\|_t|j�d�|_t|j|jz
�d�|_n�|dk(r=|\|_|_t|j|jz
�d�|_nT|dk(r|\|_|_|_n9|dk(rtdj
|���tdj
|���t|j�d�|_|j|jk(rtd��|j|jkD|_	|j�y)Nr-rr
�z2numeric_range expected at least 1 argument, got {}z2numeric_range expected at most 3 arguments, got {}z&numeric_range() arg 3 must not be zero)r��_stop�type�_start�_stepr�r��_zeror��_growing�	_init_len)r�r��argcs   r�r�znumeric_range.__init__�s2���4�y���1�9� �M�T�Z�*�$�t�z�z�*�1�-�D�K�7��d�j�j�4�;�;�6�7��:�D�J�
�Q�Y�&*�#�D�K���7��d�j�j�4�;�;�6�7��:�D�J�
�Q�Y�26�/�D�K���T�Z�
�Q�Y��%�%+�V�D�\��
�
�&�&,�f�T�l��
�
&�T�$�*�*�%�a�(��
��:�:����#��E�F�F��
�
�T�Z�Z�/��
����r�c�~�|jr|j|jkS|j|jkDSr�)r�r�r�r�s r�r�znumeric_range.__bool__s/���=�=��;�;����+�+��;�;����+�+r�c�L�|jrL|j|cxkr|jkr,ny||jz
|jz|jk(Sy|j|cxk\r|jkDr-ny|j|z
|jz|jk(Sy�NF)r�r�r�r�r�)r��elems  r�r$znumeric_range.__contains__ s����=�=��{�{�d�/�T�Z�Z�/���t�{�{�*�d�j�j�8�D�J�J�F�F�
��{�{�d�/�T�Z�Z�/�����d�*��
�
�{�;�t�z�z�I�I�r�c��t|t�r{t|�}t|�}|s|r|xr|S|j|jk(xr>|j|jk(xr#|jd�|jd�k(Sy)Nr�F)r�rm�boolr�r��
_get_by_index)r��other�
empty_self�empty_others    r��__eq__znumeric_range.__eq__*s����e�]�+�!�$�Z��J�"�5�k�/�K��[�!�1�k�1��K�K�5�<�<�/�J��
�
�e�k�k�1�J��*�*�2�.�%�2E�2E�b�2I�I��r�c��t|t�r|j|�St|t��r&|j�|j
n|j|j
z}|j�|j|jkr
|j}nA|j|jk\r
|j}n|j|j�}|j�|j|jk\r
|j}nB|j|jkr
|j}n|j|j�}t|||�Stdjt|�j���)Nz8numeric range indices must be integers or slices, not {})r��intr�r�r�r�r��_lenr�r�r�rmr�r�r�r�)r�r@r�r�r�s     r�r�znumeric_range.__getitem__9s���c�3���%�%�c�*�*�
��U�
#�!$���!1�4�:�:�s�x�x�$�*�*�7L�D��y�y� �C�I�I�$�)�)��$;��������d�i�i�'��
�
���*�*�3�9�9�5���x�x��3�8�8�t�y�y�#8��z�z�����d�i�i�Z�'��{�{���)�)�#�(�(�3�� ���d�3�3��-�-3�V�D��I�4F�4F�-G��
r�c��|r1t|j|jd�|jf�S|jS�Nr�)�hashr�r�r��_EMPTY_HASHr�s r��__hash__znumeric_range.__hash__Ts6�������d�&8�&8��&<�d�j�j�I�J�J��#�#�#r�c�����fd�t�D�}�jr$ttt�j
�|�Sttt�j
�|�S)Nc3�V�K�|] }�j|�jzz���"y�wr�)r�r�)r4r�r�s  �r�r6z)numeric_range.__iter__.<locals>.<genexpr>[s#�����B�'�Q�$�+�+��T�Z�Z��0�'�r�)rr�rrr&r�r')r��valuess` r�r�znumeric_range.__iter__ZsF���B�%�'�B���=�=��W�R����4�f�=�=��W�R����4�f�=�=r�c��|jSr�)r�r�s r��__len__znumeric_range.__len__as���y�y�r�c�X�|jr%|j}|j}|j}n%|j}|j}|j}||z
}||jkrd|_yt
||�\}}t|�t||jk7�z|_y�Nr)r�r�r�r�r�r�r�r�)r�r�r�r�r�r�rs       r�r�znumeric_range._init_lends����=�=��K�K�E��:�:�D��:�:�D��J�J�E��;�;�D��J�J�;�D��%�<���t�z�z�!��D�I��(�D�)�D�A�q��A���Q�$�*�*�_�!5�5�D�Ir�c�T�t|j|j|jffSr�)rmr�r�r�r�s r��
__reduce__znumeric_range.__reduce__ts ���t�{�{�D�J�J��
�
�C�C�Cr�c�(�|jdk(r8djt|j�t|j��Sdjt|j�t|j�t|j��S)Nr-znumeric_range({}, {})znumeric_range({}, {}, {}))r�r��reprr�r�r�s r��__repr__znumeric_range.__repr__wsn���:�:��?�*�1�1��T�[�[�!�4��
�
�#3��
�/�5�5��T�[�[�!�4��
�
�#3�T�$�*�*�5E��
r�c��tt|jd�|j|jz
|j��Sr�)r�rmr�r�r�r�s r�r�znumeric_range.__reversed__�s<�����"�"�2�&����d�j�j�(@�4�:�:�+�
�
�	
r�c��t||v�Sr�)r�rKs  r�rznumeric_range.count�s���5�D�=�!�!r�c���|jrb|j|cxkr|jkr�nn�t||jz
|j�\}}||j
k(rnt
|�S|j|cxk\r|jkDrDnnAt|j|z
|j�\}}||j
k(rt
|�Stdj|���)Nz{} is not in numeric range)	r�r�r�r�r�r�r�r�r�)r�rDr�rs    r�r�znumeric_range.index�s����=�=��{�{�e�0�d�j�j�0��e�d�k�k�1�4�:�:�>���1���
�
�?��q�6�M��{�{�e�0�d�j�j�0��d�k�k�E�1�D�J�J�;�?���1���
�
�?��q�6�M��5�<�<�U�C�D�Dr�c��|dkr||jz
}|dks||jk\rtd��|j||jzzS)Nrz'numeric range object index out of range)r�r�r�r�)r�r	s  r�r�znumeric_range._get_by_index�sJ���q�5�
����N�A��q�5�A����N��F�G�G��{�{�Q����^�+�+r�N)r�r�r�r�r�rr�r�r�r$r�r�r�r�r�r�r�r�r�rr�r�r�r�r�rmrm�sg��1�f�u�Q��{�#�K��8,��
��6$�>��6� D��
�"�E�,r�rmc�x��t����std�S|�
t�n
t|�}�fd�|D�S)aCycle through the items from *iterable* up to *n* times, yielding
    the number of completed cycles along with each item. If *n* is omitted the
    process repeats indefinitely.

    >>> list(count_cycle('AB', 3))
    [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')]

    r�c3�4�K�|]}�D]}||f���
�y�wr�r�)r4r	r
r�s   �r�r6zcount_cycle.<locals>.<genexpr>�s�����<�w�!�8�4�Q��I�8�I�w���)rr�rr)r�r�r�s`  r�rHrH�s6����X��H���B�x����e�g��a��G�<�w�<�<r�c#��K�t|�}	t|�}	t�D]}|}t|�}|dk(d|f���y#t$rYywxYw#t$r
dk(df��YywxYw�w)aHYield 3-tuples of the form ``(is_first, is_last, item)``.

    >>> list(mark_ends('ABC'))
    [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')]

    Use this when looping over an iterable to take special action on its first
    and/or last items:

    >>> iterable = ['Header', 100, 200, 'Footer']
    >>> total = 0
    >>> for is_first, is_last, item in mark_ends(iterable):
    ...     if is_first:
    ...         continue  # Skip the header
    ...     if is_last:
    ...         continue  # Skip the footer
    ...     total += item
    >>> print(total)
    300
    NrFT)r�r�r�r)r�r��br	�as     r�rhrh�s�����(
�h��B����H�����A��A��R��A��q�&�%��"�"���	��������1�f�d�A�o���sE�A*�A�&A�A*�	A�A*�
A�A*�A'�$A*�&A'�'A*c���|�tt�t||��S|dkrtd��t	||t
��}tt�t
||��S)a�Yield the index of each item in *iterable* for which *pred* returns
    ``True``.

    *pred* defaults to :func:`bool`, which will select truthy items:

        >>> list(locate([0, 1, 1, 0, 1, 0, 0]))
        [1, 2, 4]

    Set *pred* to a custom function to, e.g., find the indexes for a particular
    item.

        >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b'))
        [1, 3]

    If *window_size* is given, then the *pred* function will be called with
    that many items. This enables searching for sub-sequences:

        >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
        >>> pred = lambda *args: args == (1, 2, 3)
        >>> list(locate(iterable, pred=pred, window_size=3))
        [1, 5, 9]

    Use with :func:`seekable` to find indexes and then retrieve the associated
    items:

        >>> from itertools import count
        >>> from more_itertools import seekable
        >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count())
        >>> it = seekable(source)
        >>> pred = lambda x: x > 100
        >>> indexes = locate(it, pred=pred)
        >>> i = next(indexes)
        >>> it.seek(i)
        >>> next(it)
        106

    r-zwindow size must be at least 1�r-)rrr!r�r�r.r)r�r{�window_sizer�s    r�rara�sX��L������T�8�!4�5�5��Q���9�:�:�	�(�K�7�	;�B��E�G�W�T�2�.�/�/r�c�<�d�ttt|��D�S)z�Yield elements of the longest common prefix amongst given *iterables*.

    >>> ''.join(longest_common_prefix(['abcd', 'abc', 'abf']))
    'ab'

    c3�&K�|]	}|d���y�w)rNr�)r4�cs  r�r6z(longest_common_prefix.<locals>.<genexpr>
	s����@�?�Q�A�a�D�?�r�)rr7r�rOs r�rbrb	s��A�)�I�s�I��?�@�@r�c��t||�S)a�Yield the items from *iterable*, but strip any from the beginning
    for which *pred* returns ``True``.

    For example, to remove a set of items from the start of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(lstrip(iterable, pred))
        [1, 2, None, 3, False, None]

    This function is analogous to to :func:`str.lstrip`, and is essentially
    an wrapper for :func:`itertools.dropwhile`.

    )r�r�r{s  r�rcrc	s���T�8�$�$r�c#�K�g}|j}|j}|D](}||�r	||��|Ed{���|�|���*y7��w)a�Yield the items from *iterable*, but strip any from the end
    for which *pred* returns ``True``.

    For example, to remove a set of items from the end of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(rstrip(iterable, pred))
        [None, False, None, 1, 2, None, 3]

    This function is analogous to :func:`str.rstrip`.

    N)r��clear)r�r{�cache�cache_append�cache_clearr=s      r�rzrz"	sO����
�E��<�<�L��+�+�K�
����7���O�����M��G�
�
�s�6A
�A�A
c�.�tt||�|�S)a�Yield the items from *iterable*, but strip any from the
    beginning and end for which *pred* returns ``True``.

    For example, to remove a set of items from both ends of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(strip(iterable, pred))
        [1, 2, None, 3]

    This function is analogous to :func:`str.strip`.

    )rzrcr�s  r�r�r�<	s���&��4�(�$�/�/r�c�(�eZdZdZd�Zd�Zd�Zd�Zy)r^aAn extension of :func:`itertools.islice` that supports negative values
    for *stop*, *start*, and *step*.

        >>> iterable = iter('abcdefgh')
        >>> list(islice_extended(iterable, -4, -1))
        ['e', 'f', 'g']

    Slices with negative values require some caching of *iterable*, but this
    function takes care to minimize the amount of memory required.

    For example, you can use a negative step with an infinite iterator:

        >>> from itertools import count
        >>> list(islice_extended(count(), 110, 99, -2))
        [110, 108, 106, 104, 102, 100]

    You can also use slice notation directly:

        >>> iterable = map(str, count())
        >>> it = islice_extended(iterable)[10:20:2]
        >>> list(it)
        ['10', '12', '14', '16', '18']

    c�\�t|�}|rt|t|��|_y||_yr�)r��_islice_helperr��	_iterable)r�r�r�r�s    r�r�zislice_extended.__init__g	s'��
�(�^���+�B��t��=�D�N��D�Nr�c��|Sr�r�r�s r�r�zislice_extended.__iter__n	r�r�c�,�t|j�Sr�)r�rr�s r�r�zislice_extended.__next__q	����D�N�N�#�#r�c�v�t|t�rtt|j|��Std��)Nz4islice_extended.__getitem__ argument must be a slice)r�r�r^rrr�)r�r@s  r�r�zislice_extended.__getitem__t	s.���c�5�!�"�>�$�.�.�#�#F�G�G��N�O�Or�N)r�r�r�r�r�r�r�r�r�r�r�r^r^M	s���2 ��$�Pr�r^c#�|K�|j}|j}|jdk(rtd��|jxsd}|dkD�r|�dn|}|dkrt	t|d�|��}|r|ddnd}t
||zd�}|�|}n!|dk\r
t||�}nt
||zd�}||z
}	|	dkryt|d|	|�D]	\}
}|���y|�v|dkrqtt|||�d�t	t||�|��}t|�D]2\}
}|j�}|
|zdk(r|��|j|��4yt||||�Ed{���y|�dn|}|�g|dkrb|dz
}	t	t|d�|	��}|r|ddnd}|dkr||}}nt||z
d�d}}t|�|||�D]	\}
}|���y|�|dz}
tt||
|
�d�|dkr|}d}	n|�d}|dz}	n
d}||z
}	|	dkrytt||	��}||d|�Ed{���y7��7��w)Nrz1step argument must be a non-zero integer or None.r-r�r�)
r�r�r�r�rrXr�r�rr�r�r�r�)r��sr�r�r�r��len_iterr	rr�r�r
�cached_item�ms              r�rr{	s�����
�G�G�E��6�6�D��v�v��{��L�M�M��6�6�;�Q�D��a�x��m��%���1�9��)�B��*�E�6�:�E�',�u�R�y��|�!�H��H�u�$�a�(�A��|��������h�'����4���+���A��A��A�v��%�e�Q��4�8���t��
� 9���T�A�X����E�5�)�4�0��&��d�U�+�T�E�:�E�(��}���t�#�m�m�o���4�<�1�$�%�%����T�"�	 -��b�%��t�4�4�4��}��5����4�!�8����	�A��)�B��*�1�5�E�',�u�R�y��|�!�H�
�q�y��d�1���5�8�+�R�0�$�1��#�E�{�1�Q�t�8�4���t��
� 5����1�H���V�B��1�%�t�,��q�y����������A�I�����D�L����6�����A��'�E��Q�W��W�~�%�%�[
5��Z
&�s%�EH<�H8�CH<�2H:�3H<�:H<c�`�	t|�S#t$rtt|��cYSwxYw)a�An extension of :func:`reversed` that supports all iterables, not
    just those which implement the ``Reversible`` or ``Sequence`` protocols.

        >>> print(*always_reversible(x for x in range(3)))
        2 1 0

    If the iterable is already reversible, this function returns the
    result of :func:`reversed()`. If the iterable is not reversible,
    this function will cache the remaining items in the iterable and
    yield them in reverse order, which may require significant storage.
    )r�r�r��r�s r�r=r=�	s0��(���!�!���(���X��'�'�(�s�

�-�-c��|Sr�r�r<s r�rr�	s��Ar�c#�~�K�tt|��fd���D]\}}ttd�|����y�w)a�Yield groups of consecutive items using :func:`itertools.groupby`.
    The *ordering* function determines whether two items are adjacent by
    returning their position.

    By default, the ordering function is the identity function. This is
    suitable for finding runs of numbers:

        >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40]
        >>> for group in consecutive_groups(iterable):
        ...     print(list(group))
        [1]
        [10, 11, 12]
        [20]
        [30, 31, 32, 33]
        [40]

    For finding runs of adjacent letters, try using the :meth:`index` method
    of a string of letters:

        >>> from string import ascii_lowercase
        >>> iterable = 'abcdfgilmnop'
        >>> ordering = ascii_lowercase.index
        >>> for group in consecutive_groups(iterable, ordering):
        ...     print(list(group))
        ['a', 'b', 'c', 'd']
        ['f', 'g']
        ['i']
        ['l', 'm', 'n', 'o', 'p']

    Each group of consecutive items is an iterator that shares it source with
    *iterable*. When an an output group is advanced, the previous group is
    no longer available unless its elements are copied (e.g., into a ``list``).

        >>> iterable = [1, 2, 11, 12, 21, 22]
        >>> saved_groups = []
        >>> for group in consecutive_groups(iterable):
        ...     saved_groups.append(list(group))  # Copy group elements
        >>> saved_groups
        [[1, 2], [11, 12], [21, 22]]

    c�&��|d�|d�z
Sr�r�)r=�orderings �r�rz$consecutive_groups.<locals>.<lambda>
s���1�Q�4�(�1�Q�4�.�+@r��r@r-N)rrXr!r#)r�rr�r�s `  r�rErE�	s;�����T��(��!@����1��*�Q�-��#�#��s�:=)�initialc��t|�\}}	t|�g}|�g}t	|t|||��S#t$rtg�cYSwxYw)a�This function is the inverse of :func:`itertools.accumulate`. By default
    it will compute the first difference of *iterable* using
    :func:`operator.sub`:

        >>> from itertools import accumulate
        >>> iterable = accumulate([0, 1, 2, 3, 4])  # produces 0, 1, 3, 6, 10
        >>> list(difference(iterable))
        [0, 1, 2, 3, 4]

    *func* defaults to :func:`operator.sub`, but other functions can be
    specified. They will be applied as follows::

        A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ...

    For example, to do progressive division:

        >>> iterable = [1, 2, 6, 24, 120]
        >>> func = lambda x, y: x // y
        >>> list(difference(iterable, func))
        [1, 2, 3, 4, 5]

    If the *initial* keyword is set, the first element will be skipped when
    computing successive differences.

        >>> it = [10, 11, 13, 16]  # from accumulate([1, 2, 3], initial=10)
        >>> list(difference(it, initial=10))
        [1, 2, 3]

    )rr�r�r�rr!)r�r�rr�r�rSs      r�rJrJ
s]��<�x�=�D�A�q���a��	���������D�!�Q��(�(��
���B�x���s�7�A�
Ac�(�eZdZdZd�Zd�Zd�Zd�Zy)r9aSReturn a read-only view of the sequence object *target*.

    :class:`SequenceView` objects are analogous to Python's built-in
    "dictionary view" types. They provide a dynamic view of a sequence's items,
    meaning that when the sequence updates, so does the view.

        >>> seq = ['0', '1', '2']
        >>> view = SequenceView(seq)
        >>> view
        SequenceView(['0', '1', '2'])
        >>> seq.append('3')
        >>> view
        SequenceView(['0', '1', '2', '3'])

    Sequence views support indexing, slicing, and length queries. They act
    like the underlying sequence, except they don't allow assignment:

        >>> view[1]
        '1'
        >>> view[1:-1]
        ['1', '2']
        >>> len(view)
        4

    Sequence views are useful as an alternative to copying, as they don't
    require (much) extra storage.

    c�>�t|t�st�||_yr�)r�rr��_target)r��targets  r�r�zSequenceView.__init__e
s���&�(�+��O���r�c� �|j|Sr�)r)r�r�s  r�r�zSequenceView.__getitem__j
s���|�|�E�"�"r�c�,�t|j�Sr�)r�rr�s r�r�zSequenceView.__len__m
s���4�<�<� � r�c�t�dj|jjt|j��S)Nz{}({}))r��	__class__r�r�rr�s r�r�zSequenceView.__repr__p
s&�����t�~�~�6�6��T�\�\�8J�K�Kr�N)r�r�r�r�r�r�r�r�r�r�r�r9r9G
s���:�
#�!�Lr�r9c�@�eZdZdZd
d�Zd�Zd�Zd�Zefd�Z	d�Z
d	�Zy)r}a
Wrap an iterator to allow for seeking backward and forward. This
    progressively caches the items in the source iterable so they can be
    re-visited.

    Call :meth:`seek` with an index to seek to that position in the source
    iterable.

    To "reset" an iterator, seek to ``0``:

        >>> from itertools import count
        >>> it = seekable((str(n) for n in count()))
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> it.seek(0)
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> next(it)
        '3'

    You can also seek forward:

        >>> it = seekable((str(n) for n in range(20)))
        >>> it.seek(10)
        >>> next(it)
        '10'
        >>> it.seek(20)  # Seeking past the end of the source isn't a problem
        >>> list(it)
        []
        >>> it.seek(0)  # Resetting works even after hitting the end
        >>> next(it), next(it), next(it)
        ('0', '1', '2')

    Call :meth:`peek` to look ahead one item without advancing the iterator:

        >>> it = seekable('1234')
        >>> it.peek()
        '1'
        >>> list(it)
        ['1', '2', '3', '4']
        >>> it.peek(default='empty')
        'empty'

    Before the iterator is at its end, calling :func:`bool` on it will return
    ``True``. After it will return ``False``:

        >>> it = seekable('5678')
        >>> bool(it)
        True
        >>> list(it)
        ['5', '6', '7', '8']
        >>> bool(it)
        False

    You may view the contents of the cache with the :meth:`elements` method.
    That returns a :class:`SequenceView`, a view that updates automatically:

        >>> it = seekable((str(n) for n in range(10)))
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> elements = it.elements()
        >>> elements
        SequenceView(['0', '1', '2'])
        >>> next(it)
        '3'
        >>> elements
        SequenceView(['0', '1', '2', '3'])

    By default, the cache grows as the source iterable progresses, so beware of
    wrapping very large or infinite iterables. Supply *maxlen* to limit the
    size of the cache (this of course limits how far back you can seek).

        >>> from itertools import count
        >>> it = seekable((str(n) for n in count()), maxlen=2)
        >>> next(it), next(it), next(it), next(it)
        ('0', '1', '2', '3')
        >>> list(it.elements())
        ['2', '3']
        >>> it.seek(0)
        >>> next(it), next(it), next(it), next(it)
        ('2', '3', '4', '5')
        >>> next(it)
        '6'

    Nc�v�t|�|_|�g|_d|_ytg|�|_d|_yr�)r��_sourcer�r�_index)r�r�r�s   r�r�zseekable.__init__�
s9���H�~����>��D�K���� ��F�+�D�K���r�c��|Sr�r�r�s r�r�zseekable.__iter__�
r�r�c��|j�1	|j|j}|xjdz
c_|St|j�}|jj|�|S#t$r
d|_Y�DwxYwrf)r"r�r�r�r!r��r�r
s  r�r�zseekable.__next__�
su���;�;�"�
��{�{�4�;�;�/�����q� �����D�L�L�!�������4� �����
#�"���
#�s�A0�0B�Bc�D�	|j�y#t$rYywxYwr�r�r�s r�r�zseekable.__bool__�
r�r�c���	t|�}|j�t	|j
�|_|xjdzc_|S#t$r|tur�|cYSwxYwrf)r�r�r.r"r�r�)r�r��peekeds   r�r�z
seekable.peek�
s`��	��$�Z�F�
�;�;���d�k�k�*�D�K����q����
���	��'�!���N�	�s�A
�
A!� A!c�,�t|j�Sr�)r9r�r�s r��elementszseekable.elements�
s���D�K�K�(�(r�c�f�||_|t|j�z
}|dkDr
t||�yyr�)r"r�r�r1)r�r��	remainders   r��seekz
seekable.seek�
s2������C����,�,�	��q�=��D�)�$�r�r�)r�r�r�r�r�r�r�r�r.r�r*r-r�r�r�r}r}t
s1��S�j����#�
�)�%r�r}c�0�eZdZdZed��Zed��Zy)r{a�
    :func:`run_length.encode` compresses an iterable with run-length encoding.
    It yields groups of repeated items with the count of how many times they
    were repeated:

        >>> uncompressed = 'abbcccdddd'
        >>> list(run_length.encode(uncompressed))
        [('a', 1), ('b', 2), ('c', 3), ('d', 4)]

    :func:`run_length.decode` decompresses an iterable that was previously
    compressed with run-length encoding. It yields the items of the
    decompressed iterable:

        >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
        >>> list(run_length.decode(compressed))
        ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd']

    c�&�d�t|�D�S)Nc3�<K�|]\}}|t|�f���y�wr�)rX)r4r�r�s   r�r6z$run_length.encode.<locals>.<genexpr>s����;�):���A��D��G��):�s�r�rs r��encodezrun_length.encodes��;���):�;�;r�c�:�tjd�|D��S)Nc3�:K�|]\}}t||����y�wr�)r)r4r�r�s   r�r6z$run_length.decode.<locals>.<genexpr>s����"E�H�D�A�q�6�!�Q�<�H�s�)rr rs r��decodezrun_length.decodes���"�"�"E�H�"E�E�Er�N)r�r�r�r��staticmethodr1r4r�r�r�r{r{s1���&�<��<��F��Fr�r{c	�L�tt|dzt||���|k(S)a�Return ``True`` if exactly ``n`` items in the iterable are ``True``
    according to the *predicate* function.

        >>> exactly_n([True, True, False], 2)
        True
        >>> exactly_n([True, True, False], 1)
        False
        >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3)
        True

    The iterable will be advanced until ``n + 1`` truthy items are encountered,
    so avoid calling it on infinite iterables.

    r-)r�r5r#)r�r�r�s   r�rQrQs&���t�A��E�6�)�X�6�7�8�A�=�=r�c	�z�t|�}tt|�tt	|�t|���S)z�Return a list of circular shifts of *iterable*.

    >>> circular_shifts(range(4))
    [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)]
    )r�r5r�r�r)r��lsts  r�rBrB/s-���x�.�C���C��(�5��:�s�3�x�8�9�9r�c������fd�}|S)a�Return a decorator version of *wrapping_func*, which is a function that
    modifies an iterable. *result_index* is the position in that function's
    signature where the iterable goes.

    This lets you use itertools on the "production end," i.e. at function
    definition. This can augment what the function returns without changing the
    function's code.

    For example, to produce a decorator version of :func:`chunked`:

        >>> from more_itertools import chunked
        >>> chunker = make_decorator(chunked, result_index=0)
        >>> @chunker(3)
        ... def iter_range(n):
        ...     return iter(range(n))
        ...
        >>> list(iter_range(9))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

    To only allow truthy items to be returned:

        >>> truth_serum = make_decorator(filter, result_index=1)
        >>> @truth_serum(bool)
        ... def boolean_test():
        ...     return [0, 1, '', ' ', False, True]
        ...
        >>> list(boolean_test())
        [1, ' ', True]

    The :func:`peekable` and :func:`seekable` wrappers make for practical
    decorators:

        >>> from more_itertools import peekable
        >>> peekable_function = make_decorator(peekable)
        >>> @peekable_function()
        ... def str_range(*args):
        ...     return (str(x) for x in range(*args))
        ...
        >>> it = str_range(1, 20, 2)
        >>> next(it), next(it), next(it)
        ('1', '3', '5')
        >>> it.peek()
        '7'
        >>> next(it)
        '7'

    c���������fd�}|S)Nc���������fd�}|S)Nc�^���|i|��}t��}|j�|��|i���Sr�)r��insert)	r�r��result�wrapping_args_�f�result_index�
wrapping_args�
wrapping_func�wrapping_kwargss	    �����r��
inner_wrapperzOmake_decorator.<locals>.decorator.<locals>.outer_wrapper.<locals>.inner_wrapperns<����D�+�F�+��!%�m�!4���%�%�l�F�;�$�n�H��H�Hr�r�)r@rErArBrCrDs` ����r��
outer_wrapperz8make_decorator.<locals>.decorator.<locals>.outer_wrapperms���
I�
I�!� r�r�)rBrDrFrArCs`` ��r��	decoratorz!make_decorator.<locals>.decoratorls���	!��r�r�)rCrArGs`` r�rdrd9s���f
��r�c���|�d�n|}tt�}|D]&}||�}||�}||j|��(|�#|j�D]\}}||�||<�d|_|S)a�Return a dictionary that maps the items in *iterable* to categories
    defined by *keyfunc*, transforms them with *valuefunc*, and
    then summarizes them by category with *reducefunc*.

    *valuefunc* defaults to the identity function if it is unspecified.
    If *reducefunc* is unspecified, no summarization takes place:

        >>> keyfunc = lambda x: x.upper()
        >>> result = map_reduce('abbccc', keyfunc)
        >>> sorted(result.items())
        [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])]

    Specifying *valuefunc* transforms the categorized items:

        >>> keyfunc = lambda x: x.upper()
        >>> valuefunc = lambda x: 1
        >>> result = map_reduce('abbccc', keyfunc, valuefunc)
        >>> sorted(result.items())
        [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])]

    Specifying *reducefunc* summarizes the categorized items:

        >>> keyfunc = lambda x: x.upper()
        >>> valuefunc = lambda x: 1
        >>> reducefunc = sum
        >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc)
        >>> sorted(result.items())
        [('A', 1), ('B', 2), ('C', 3)]

    You may want to filter the input iterable before applying the map/reduce
    procedure:

        >>> all_items = range(30)
        >>> items = [x for x in all_items if 10 <= x <= 20]  # Filter
        >>> keyfunc = lambda x: x % 2  # Evens map to 0; odds to 1
        >>> categories = map_reduce(items, keyfunc=keyfunc)
        >>> sorted(categories.items())
        [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])]
        >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum)
        >>> sorted(summaries.items())
        [(0, 90), (1, 75)]

    Note that all items in the iterable are gathered into a list before the
    summarization step, which may require significant storage.

    The returned object is a :obj:`collections.defaultdict` with the
    ``default_factory`` set to ``None``, such that it behaves like a normal
    dictionary.

    Nc��|Sr�r�r<s r�rzmap_reduce.<locals>.<lambda>�s��1r�)rr�r�r��default_factory)	r�r�r�r�r�r
r@rD�
value_lists	         r�rgrg{s���f#,�"3��)�I�
�d�
�C����d�m���$����C�������
��"�y�y�{�O�C��!�*�-�C��H� +��C���Jr�c	���|�*	t|���fd�tt|�|�D�Stt	t|||���S#t$rY�*wxYw)a�Yield the index of each item in *iterable* for which *pred* returns
    ``True``, starting from the right and moving left.

    *pred* defaults to :func:`bool`, which will select truthy items:

        >>> list(rlocate([0, 1, 1, 0, 1, 0, 0]))  # Truthy at 1, 2, and 4
        [4, 2, 1]

    Set *pred* to a custom function to, e.g., find the indexes for a particular
    item:

        >>> iterable = iter('abcb')
        >>> pred = lambda x: x == 'b'
        >>> list(rlocate(iterable, pred))
        [3, 1]

    If *window_size* is given, then the *pred* function will be called with
    that many items. This enables searching for sub-sequences:

        >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
        >>> pred = lambda *args: args == (1, 2, 3)
        >>> list(rlocate(iterable, pred=pred, window_size=3))
        [9, 5, 1]

    Beware, this function won't return anything for infinite iterables.
    If *iterable* is reversible, ``rlocate`` will reverse it and search from
    the right. Otherwise, it will search from the left and return the results
    in reverse order.

    See :func:`locate` to for other example applications.

    c3�.�K�|]}�|z
dz
���y�wr3r�)r4r	rs  �r�r6zrlocate.<locals>.<genexpr>�s�����O�.N��H�q�L�1�$�.N�rv)r�rar�r�r�)r�r{r�rs   @r�ryry�s`���B��	��8�}�H�O�f�X�h�5G��.N�O�O��D���$��<�=�>�>���	��	�s�(A
�
	A�Ac#� K�|dkrtd��t|�}t|tg|dz
z�}t	||�}d}|D]C}||�r&|�||kr|dz
}|Ed{���t||dz
��.|s�1|dtus�=|d���Ey7�-�w)aYYield the items from *iterable*, replacing the items for which *pred*
    returns ``True`` with the items from the iterable *substitutes*.

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1]
        >>> pred = lambda x: x == 0
        >>> substitutes = (2, 3)
        >>> list(replace(iterable, pred, substitutes))
        [1, 1, 2, 3, 1, 1, 2, 3, 1, 1]

    If *count* is given, the number of replacements will be limited:

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0]
        >>> pred = lambda x: x == 0
        >>> substitutes = [None]
        >>> list(replace(iterable, pred, substitutes, count=2))
        [1, 1, None, 1, 1, None, 1, 1, 0]

    Use *window_size* to control the number of items passed as arguments to
    *pred*. This allows for locating and replacing subsequences.

        >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5]
        >>> window_size = 3
        >>> pred = lambda *args: args == (0, 1, 2)  # 3 items passed to pred
        >>> substitutes = [3, 4] # Splice in these items
        >>> list(replace(iterable, pred, substitutes, window_size=window_size))
        [3, 4, 5, 3, 4, 5]

    r-zwindow_size must be at least 1rN)r�rrr.r�r1)	r�r{�substitutesrr�r��windowsr��ws	         r�rxrx�s�����:�Q���9�:�:���$�K�
�x�'��k�A�o�6�	7�B��r�;�'�G�	�A�
����8��
�1�u�9��Q���&�&�&����q��1��
�!�A�$�g�%��A�$�J�#�'�s�AB�B�B�6B�Bc#��K�t|�}t|�}ttd|��D]-}t	d|z||fz�D��cgc]
\}}|||��c}}���/ycc}}w�w)a"Yield all possible order-preserving partitions of *iterable*.

    >>> iterable = 'abc'
    >>> for part in partitions(iterable):
    ...     print([''.join(p) for p in part])
    ['abc']
    ['a', 'bc']
    ['ab', 'c']
    ['a', 'b', 'c']

    This is unrelated to :func:`partition`.

    r-r�N)r�r�r4rr�)r��sequencer�r	rs     r�rqrq&sd�����H�~�H��H�
�A�
�e�A�q�k�
"��),�T�A�X�q�A�4�x�)@�A�)@���A�x��!�}�)@�A�A�#��A�s�AA%�A�A%c#���K�t|�}t|�}|�|dkrtd��||kDry�fd��|�&td|dz�D]}�||�Ed{����y�||�Ed{���y7�7��w)a
    Yield the set partitions of *iterable* into *k* parts. Set partitions are
    not order-preserving.

    >>> iterable = 'abc'
    >>> for part in set_partitions(iterable, 2):
    ...     print([''.join(p) for p in part])
    ['a', 'bc']
    ['ab', 'c']
    ['b', 'ac']


    If *k* is not given, every set partition is generated.

    >>> iterable = 'abc'
    >>> for part in set_partitions(iterable):
    ...     print([''.join(p) for p in part])
    ['abc']
    ['a', 'bc']
    ['ab', 'c']
    ['b', 'ac']
    ['a', 'b', 'c']

    Nr-z6Can't partition in a negative or zero number of groupsc3�4�K�t|�}|dk(r|g��y||k(r|D�cgc]}|g��c}��y|^}}�||dz
�D]
}|gg|�����||�D]6}tt|��D]}|d||g||zgz||dzdz����8ycc}w�wrf)r�r)	r5r�r�r
r��M�pr	�set_partitions_helpers	        �r�rXz-set_partitions.<locals>.set_partitions_helper]s��������F����6��#�I�
�!�V� !�"��1�A�3��"�"��E�A��*�1�a�!�e�4���s�i�Q�i��5�*�1�a�0���s�1�v��A��B�Q�%�A�3��1��:�,�.��1�q�5�7��;�;�'�1��#�s� B�
B�A+B)r�r�r�r)r�r�r5r�rXs    @r�r~r~:s������2	
�X��A��A��A��}��q�5��H��
���U��<�	�y��q�!�a�%��A�,�Q��2�2�2�!�)��A�.�.�.�
3��.�s$�AA5�A1�A5�+A3�,A5�3A5c�"�eZdZdZd�Zd�Zd�Zy)r�a�
    Yield items from *iterable* until *limit_seconds* have passed.
    If the time limit expires before all items have been yielded, the
    ``timed_out`` parameter will be set to ``True``.

    >>> from time import sleep
    >>> def generator():
    ...     yield 1
    ...     yield 2
    ...     sleep(0.2)
    ...     yield 3
    >>> iterable = time_limited(0.1, generator())
    >>> list(iterable)
    [1, 2]
    >>> iterable.timed_out
    True

    Note that the time is checked before each item is yielded, and iteration
    stops if  the time elapsed is greater than *limit_seconds*. If your time
    limit is 1 second, but it takes 2 seconds to generate the first item from
    the iterable, the function will run for 2 seconds and not yield anything.

    c�~�|dkrtd��||_t|�|_t	�|_d|_y)Nrzlimit_seconds must be positiveF)r��
limit_secondsr�rr,�_start_time�	timed_out)r�r[r�s   r�r�ztime_limited.__init__�s:���1���=�>�>�*����h����$�;�����r�c��|Sr�r�r�s r�r�ztime_limited.__iter__�r�r�c��t|j�}t�|jz
|jkDr
d|_t�|Sr;)r�rr,r\r[r]r�r%s  r�r�ztime_limited.__next__�s=���D�N�N�#���;��)�)�)�D�,>�,>�>�!�D�N����r�N�r�r�r�r�r�r�r�r�r�r�r�r�rs���0��r�r�c��t|�}t||�}	t|�}dj||�}|xst|��#t$rY|SwxYw)a*If *iterable* has only one item, return it.
    If it has zero items, return *default*.
    If it has more than one item, raise the exception given by *too_long*,
    which is ``ValueError`` by default.

    >>> only([], default='missing')
    'missing'
    >>> only([1])
    1
    >>> only([1, 2])  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: Expected exactly one item in iterable, but got 1, 2,
     and perhaps more.'
    >>> only([1, 2], too_long=TypeError)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    TypeError

    Note that :func:`only` attempts to advance *iterable* twice to ensure there
    is only one item.  See :func:`spy` or :func:`peekable` to check
    iterable contents less destructively.
    r�)r�r�r�r�r�)r�r�r�r�r�r�r�s       r�roro�sj��0
�h��B��r�7�#�K�	*��B�x��

 � &��{�L� A�	��)�*�S�/�)���
����
�s�A�	A�Ac�$�eZdZd�Zd�Zd�Zd�Zy)�_IChunkc�D�t||�|_t�|_yr�)rr�rr�)r�r�r�s   r�r�z_IChunk.__init__�s���(�A�&����g��r�c�N�|jj|j�yr�)r�r�r�r�s r��
fill_cachez_IChunk.fill_cache�s�������4�8�8�$r�c��|Sr�r�r�s r�r�z_IChunk.__iter__�r�r�c��	t|j�S#t$r*|jr|jj	�cYS�wxYwr�)r�r�r�r�r�r�s r�r�z_IChunk.__next__�sA��	�����>�!���	��{�{��{�{�*�*�,�,��		�s��/A
�A
N)r�r�r�r�rfr�r�r�r�r�rcrc�s���%��r�rcc#�K�tt|��}t�}	|j|�}||uryt	||�}|��|j��7�w)a�Break *iterable* into sub-iterables with *n* elements each.
    :func:`ichunked` is like :func:`chunked`, but it yields iterables
    instead of lists.

    If the sub-iterables are read in order, the elements of *iterable*
    won't be stored in memory.
    If they are read out of order, :func:`itertools.tee` is used to cache
    elements as necessary.

    >>> from itertools import count
    >>> all_chunks = ichunked(count(), 4)
    >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks)
    >>> list(c_2)  # c_1's elements have been cached; c_3's haven't been
    [4, 5, 6, 7]
    >>> list(c_1)
    [0, 1, 2, 3]
    >>> list(c_3)
    [8, 9, 10, 11]

    N)rrr��objectr�rcrf)r�r��source�
ichunk_markerr
r�s      r�rVrV�s]����*�d�8�n�
%�F��H�M�
��{�{�=�)���=� �����"����	�����s�AAc�V�tttt|dt	�i���S)aReturn ``True`` if all given *iterables* are equal to each other,
    which means that they contain the same elements in the same order.

    The function is useful for comparing iterables of different data types
    or iterables that do not support equality checks.

    >>> iequals("abc", ['a', 'b', 'c'], ('a', 'b', 'c'), iter("abc"))
    True

    >>> iequals("abc", "acb")
    False

    Not to be confused with :func:`all_equals`, which checks whether all
    elements of iterable are equal to each other.

    r-)�allr!r7rrjrOs r�rWrW
s"��"�s�9�k�9�I���I�J�K�Kr�c	#��K�|dkrtd��|dk(rd��yt|�}tt|�t	d���g}dg|z}d}|rn	t|d�\}}|||<|dz|k(rt|���n=|jtt||dzd|dz�t	d����|dz
}|r�myy#t$r|j�|dz}Y��wxYw�w)aBYield the distinct combinations of *r* items taken from *iterable*.

        >>> list(distinct_combinations([0, 0, 1], 2))
        [(0, 0), (0, 1)]

    Equivalent to ``set(combinations(iterable))``, except duplicates are not
    generated and thrown away. For larger input sequences this is much more
    efficient.

    rzr must be non-negativer�Nr-rr�)	r�rr6rXr#r�r��popr�)r�rr&�
generators�
current_comborj�cur_idxrWs        r�rKrK
s����	�1�u��1�2�2�	
�a�������?�D�!�)�D�/�z�!�}�E�F�J��F�Q�J�M�
�E�
�	��j��n�-�J�G�Q�
 !�
�e���1�9��>��
�&�&������d�7�Q�;�=�1�7�Q�;�?�"�1�
��
�
�Q�J�E�#���	��N�N���Q�J�E��	�s1�AC%�C�$AC%�?C%�C"�C%�!C"�"C%c'�JK�|D]}	||�|���y#|$rY�wxYw�w)aYield the items from *iterable* for which the *validator* function does
    not raise one of the specified *exceptions*.

    *validator* is called for each item in *iterable*.
    It should be a function that accepts one argument and raises an exception
    if that item is not valid.

    >>> iterable = ['1', '2', 'three', '4', None]
    >>> list(filter_except(int, iterable, ValueError, TypeError))
    ['1', '2', '4']

    If an exception other than one given by *exceptions* is raised by
    *validator*, it is raised like normal.
    Nr�)rAr��
exceptionsr
s    r�rRrR=
s8������	��d�O��J�
���	��	�s�#��#� �#� �#c'�FK�|D]
}	||����y#|$rY�wxYw�w)a�Transform each item from *iterable* with *function* and yield the
    result, unless *function* raises one of the specified *exceptions*.

    *function* is called to transform each item in *iterable*.
    It should accept one argument.

    >>> iterable = ['1', '2', 'three', '4', None]
    >>> list(map_except(int, iterable, ValueError, TypeError))
    [1, 2, 4]

    If an exception other than one given by *exceptions* is raised by
    *function*, it is raised like normal.
    Nr�)�functionr�rur
s    r�rereU
s4������	��4�.� ����	��	�s�!�
�!��!��!c��|Sr�r�r<s r�rrj
s��Qr�c#�NK�|D]}||�r||�n||����y�w)a�Evaluate each item from *iterable* using *pred*. If the result is
    equivalent to ``True``, transform the item with *func* and yield it.
    Otherwise, transform the item with *func_else* and yield it.

    *pred*, *func*, and *func_else* should each be functions that accept
    one argument. By default, *func_else* is the identity function.

    >>> from math import sqrt
    >>> iterable = list(range(-5, 5))
    >>> iterable
    [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4]
    >>> list(map_if(iterable, lambda x: x > 3, lambda x: 'toobig'))
    [-5, -4, -3, -2, -1, 0, 1, 2, 3, 'toobig']
    >>> list(map_if(iterable, lambda x: x >= 0,
    ... lambda x: f'{sqrt(x):.2f}', lambda x: None))
    [None, None, None, None, None, '0.00', '1.00', '1.41', '1.73', '2.00']
    Nr�)r�r{r��	func_elser
s     r�rfrfj
s(����$�� ��J�d�4�j�I�d�O�;��s�#%c	��t||�}ttt��|z�}|t	tt��td|z
�z�z}t||�D]l\}}||k(s�||t
|�<|ttt��|z�z}|t	tt��td|z
�z�dzz
}�n|Srf)r5rrr rrXr!)r�r��	reservoir�W�
next_indexr�r(s       r��_sample_unweightedr�
s���
�Q��!�I�	�C���M�A���A��U�3�v�x�=�3�q�1�u�:�5�6�6�J�#�H�a�0���w��J��&-�I�i��l�#�
��S���]�Q�&�'�'�A��%��F�H�
��A��E�
� :�;�a�?�?�J�1��r�c���d�|D�}t|t||��}t|�|d\}}tt	��|z}t||�D]l\}}	||k\r]|d\}}t||z�}
t
|
d�}t|�|z}t|||	f�|d\}}tt	��|z}�h||z}�nt|�D�cgc]}t|�d��c}Scc}w)Nc3�HK�|]}tt��|z���y�wr�)rr )r4�weights  r�r6z#_sample_weighted.<locals>.<genexpr>�
s����@��f�3�v�x�=�6�)��s� "rr-)
r5r�rrr rr"rrr
)
r�r��weights�weight_keysr|�smallest_weight_keyr/�weights_to_skipr�r(�t_w�r_2�
weight_keys
             r��_sample_weightedr��
s��
A��@�K��Q��K��2�3�I��I��'�q�\�����&�(�m�&9�9�O��w��1�����_�$�&/�q�\�"����f�2�2�3�C��#�q�/�C��S��F�*�J��	�J��#8�9�%.�q�\�"���!�&�(�m�.A�A�O��v�%�O�2�,1��8�4�8�a�G�I��q�!�8�4�4��4s�C)c�r�|dk(rgSt|�}|�t||�St|�}t|||�S)afReturn a *k*-length list of elements chosen (without replacement)
    from the *iterable*. Like :func:`random.sample`, but works on iterables
    of unknown length.

    >>> iterable = range(100)
    >>> sample(iterable, 5)  # doctest: +SKIP
    [81, 60, 96, 16, 4]

    An iterable with *weights* may also be given:

    >>> iterable = range(100)
    >>> weights = (i * i + 1 for i in range(100))
    >>> sampled = sample(iterable, 5, weights=weights)  # doctest: +SKIP
    [79, 67, 74, 66, 78]

    The algorithm can also be used to generate weighted random permutations.
    The relative weight of each item determines the probability that it
    appears late in the permutation.

    >>> data = "abcdefgh"
    >>> weights = range(1, len(data) + 1)
    >>> sample(data, k=len(data), weights=weights)  # doctest: +SKIP
    ['c', 'a', 'b', 'e', 'g', 'd', 'h', 'f']
    r)r�rr�)r�r�r�s   r�r|r|�
sC��2	�A�v��	��H�~�H���!�(�A�.�.��w�-����!�W�5�5r�c��|r|rtntn
|rtnt}|�|nt	||�}tt
|t|���S)a�Returns ``True`` if the items of iterable are in sorted order, and
    ``False`` otherwise. *key* and *reverse* have the same meaning that they do
    in the built-in :func:`sorted` function.

    >>> is_sorted(['1', '2', '3', '4', '5'], key=int)
    True
    >>> is_sorted([5, 4, 3, 1, 2], reverse=True)
    False

    If *strict*, tests for strict sorting, that is, returns ``False`` if equal
    elements are found:

    >>> is_sorted([1, 2, 2])
    True
    >>> is_sorted([1, 2, 2], strict=True)
    False

    The function returns ``False`` after encountering the first out-of-order
    item. If there are no out-of-order items, the iterable is exhausted.
    )r)r(r'r&r!r�rr3)r�r@r7r��comparer�s      r�r]r]�
s@��,*0�W�r�"�G�b��G��[��c�#�x�&8�B��7�7�H�R�L�1�2�2�2r�c��eZdZy)r8N)r�r�r�r�r�r�r8r8�
s��r�r8c�V�eZdZdZdd�Zd�Zd�Zd�Zd�Ze	d��Z
e	d��Zd	�Zy
)r?a�Convert a function that uses callbacks to an iterator.

    Let *func* be a function that takes a `callback` keyword argument.
    For example:

    >>> def func(callback=None):
    ...     for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]:
    ...         if callback:
    ...             callback(i, c)
    ...     return 4


    Use ``with callback_iter(func)`` to get an iterator over the parameters
    that are delivered to the callback.

    >>> with callback_iter(func) as it:
    ...     for args, kwargs in it:
    ...         print(args)
    (1, 'a')
    (2, 'b')
    (3, 'c')

    The function will be called in a background thread. The ``done`` property
    indicates whether it has completed execution.

    >>> it.done
    True

    If it completes successfully, its return value will be available
    in the ``result`` property.

    >>> it.result
    4

    Notes:

    * If the function uses some keyword argument besides ``callback``, supply
      *callback_kwd*.
    * If it finished executing, but raised an exception, accessing the
      ``result`` property will raise the same exception.
    * If it hasn't finished executing, accessing the ``result``
      property from within the ``with`` block will raise ``RuntimeError``.
    * If it hasn't finished executing, accessing the ``result`` property from
      outside the ``with`` block will raise a
      ``more_itertools.AbortThread`` exception.
    * Provide *wait_seconds* to adjust how frequently the it is polled for
      output.

    c��||_||_d|_d|_||_t�jjd�jjd��|_|j�|_
y)NFzconcurrent.futuresr-)�max_workers)�_func�
_callback_kwd�_aborted�_future�
_wait_seconds�
__import__�futures�ThreadPoolExecutor�	_executor�_reader�	_iterator)r�r��callback_kwd�wait_secondss    r�r�zcallback_iter.__init__2se����
�)�����
����)���#�
�
�'�*�*�1�2�7�7�;M�;M�Z[�;M�;\�	
�������r�c��|Sr�r�r�s r��	__enter__zcallback_iter.__enter__=r�r�c�F�d|_|jj�yr;)r�r��shutdown)r��exc_type�	exc_value�	tracebacks    r��__exit__zcallback_iter.__exit__@s����
������!r�c��|Sr�r�r�s r�r�zcallback_iter.__iter__Dr�r�c�,�t|j�Sr�)r�r�r�s r�r�zcallback_iter.__next__Grr�c�P�|j�y|jj�Sr�)r��doner�s r�r�zcallback_iter.doneJs"���<�<����|�|� � �"�"r�c�d�|jstd��|jj�S)NzFunction has not yet completed)r��RuntimeErrorr�r>r�s r�r>zcallback_iter.resultPs(���y�y��?�@�@��|�|�"�"�$�$r�c#���K�t����fd�}�jj�jfi�j|i���_		�j
�j��}�j�|���j
j�rn�Mg}		�j�}�j�|j|��3#t$rY�]wxYw#t$rYnwxYw�j�|Ed{���7y�w)Nc�Z���jrtd���j||f�y)Nzcanceled by user)r�r8�put)r�r�r�r�s  ��r��callbackz'callback_iter._reader.<locals>.callbackZs&����}�}�!�"4�5�5�
�E�E�4��.�!r�)�timeout)rr��submitr�r�r��getr��	task_donerr��
get_nowaitr��join)r�r�r
r�r�s`   @r�r�zcallback_iter._readerWs������G��	"�-�t�~�~�,�,��J�J�
��-�-�x�8�
����
��u�u�T�%7�%7�u�8�����
��
��|�|� � �"����	��
'��|�|�~�����
�� � ��&����
��
���
��
��
	
�������sZ�A
D�C�+3D�C �/"D�	C�D�C�D� 	C,�)D�+C,�,D�D�DN)r�g�������?)
r�r�r�r�r�r�r�r�r��propertyr�r>r�r�r�r�r?r?�
sN��0�d	(��"��$��#��#�
�%��%�#r�r?c#��K�|dkrtd��t|�}t|�}||kDrtd��t||z
dz�D]}|d|}||||z}|||zd}|||f��� y�w)a�
    Yield ``(beginning, middle, end)`` tuples, where:

    * Each ``middle`` has *n* items from *iterable*
    * Each ``beginning`` has the items before the ones in ``middle``
    * Each ``end`` has the items after the ones in ``middle``

    >>> iterable = range(7)
    >>> n = 3
    >>> for beginning, middle, end in windowed_complete(iterable, n):
    ...     print(beginning, middle, end)
    () (0, 1, 2) (3, 4, 5, 6)
    (0,) (1, 2, 3) (4, 5, 6)
    (0, 1) (2, 3, 4) (5, 6)
    (0, 1, 2) (3, 4, 5) (6,)
    (0, 1, 2, 3) (4, 5, 6) ()

    Note that *n* must be at least 0 and most equal to the length of
    *iterable*.

    This function will exhaust the iterable and may require significant
    storage.
    rr+zn must be <= len(seq)r-N)r�rr�r)r�r�r,rr	�	beginning�middle�ends        r�r�r�}s�����0	�1�u��)�*�*�
��/�C��s�8�D��4�x��0�1�1�
�4�!�8�a�<�
 �����G�	��Q��Q�����!�a�%�'�l�����$�$�	!�s�A*A,c���t�}|j}g}|j}|rt||�n|D]}	||vry||��y#t$r||vrYy||�Y�/wxYw)a
    Returns ``True`` if all the elements of *iterable* are unique (no two
    elements are equal).

        >>> all_unique('ABCB')
        False

    If a *key* function is specified, it will be used to make comparisons.

        >>> all_unique('ABCb')
        True
        >>> all_unique('ABCb', str.lower)
        False

    The function returns as soon as the first non-unique element is
    encountered. Iterables with a mix of hashable and unhashable items can
    be used, but the function will be slower for unhashable items.
    FT)r"�addr�r!r�)r�r@�seenset�seenset_add�seenlist�seenlist_addr(s       r�r;r;�s{��&�e�G��+�+�K��H��?�?�L�),�3�s�H�%�(�:��	"��'�!���� �	;���	�	"��(�"����!�	"�s�A
�A
�

A%�A%�$A%c�h�tttt|���}ttt|��}tt|�}|dkr||z
}d|cxkr
|ks
t�t�g}t||�D]!\}}|j|||z�||z}�#tt|��S)a�Equivalent to ``list(product(*args))[index]``.

    The products of *args* can be ordered lexicographically.
    :func:`nth_product` computes the product at sort position *index* without
    computing the previous products.

        >>> nth_product(8, range(2), range(2), range(2), range(2))
        (1, 0, 0, 0)

    ``IndexError`` will be raised if the given *index* is invalid.
    r)
r�r!rr�r�r	r$r�r�r�)r�r��pools�nsr�r>r&r�s        r�rlrl�s���
��U�H�T�N�+�,�E�	
�c�#�u�o�	�B��s�B��A��q�y�
��
����>��>������
�F��u�b�>���a��
�
�d�5�1�9�o�&�
�!���"���&�!�"�"r�c��t|�}t|�}|�||k(r|t|�}}n2d|cxkr
|ks
t�t�t|�t||z
�z}|dkr||z
}d|cxkr
|ks
t�t�|dk(r
t�Sdg|z}||kr|t|�z|zn|}t
d|dz�D]1}t||�\}}	d||z
cxkr|krnn|	|||z
<|dk(s�1ntt|j|��S)a'Equivalent to ``list(permutations(iterable, r))[index]```

    The subsequences of *iterable* that are of length *r* where order is
    important can be ordered lexicographically. :func:`nth_permutation`
    computes the subsequence at sort position *index* directly, without
    computing the previous subsequences.

        >>> nth_permutation('ghijk', 2, 5)
        ('h', 'i')

    ``ValueError`` will be raised If *r* is negative or greater than the length
    of *iterable*.
    ``IndexError`` will be raised if the given *index* is invalid.
    rr-)
r�r�rr�r�rrr�r!rp)
r�rr�r&r�r�r>r��dr	s
          r�rkrk�s"����>�D��D�	�A��y�A��F��)�A�,�1��
�!�Z�a�Z�������a�L�I�a�!�e�,�,���q�y�
��
����>��>�������A�v��w���S�1�W�F�%&��U��	�!����!��A�
�1�a�!�e�_���a��|���1���A��>��>��F�1�q�5�M���6�����T�X�X�v�&�'�'r�c'�K�|D](}t|ttf�r|���	|Ed{����*y7�#t$r|��Y�=wxYw�w)a�Yield all arguments passed to the function in the same order in which
    they were passed. If an argument itself is iterable then iterate over its
    values.

        >>> list(value_chain(1, 2, 3, [4, 5, 6]))
        [1, 2, 3, 4, 5, 6]

    Binary and text strings are not considered iterable and are emitted
    as-is:

        >>> list(value_chain('12', '34', ['56', '78']))
        ['12', '34', '56', '78']


    Multiple levels of nesting are not flattened.

    N)r�rgrhr�)r�rDs  r�r�r�sN����$���e�c�5�\�*��K��	�����

���	��K�	�s1�!A�3�1�3�A�3�
A�A�A�Ac���d}t||t��D]K\}}|tus|turtd��t|�}|t	|�z|j|�z}�M|S)a�Equivalent to ``list(product(*args)).index(element)``

    The products of *args* can be ordered lexicographically.
    :func:`product_index` computes the first index of *element* without
    computing the previous products.

        >>> product_index([8, 2], range(10), range(5))
        42

    ``ValueError`` will be raised if the given *element* isn't in the product
    of *args*.
    rr�z element is not a product of args)rr.r�rr�r�)r(r�r�r=r&s     r�rtrt1se��
�E��w���@���4���<�4�7�?��?�@�@��T�{����D�	�!�D�J�J�q�M�1��A��Lr�c��t|�}t|d�\}}|�yg}t|�}|D]1\}}||k(s�|j|�t|d�\}}|�n|}�3td��t	||df��\}}	d}
tt|�d��D]9\}}||z
}||ks�|
t
|�t
|�t
||z
�zzz
}
�;t
|dz�t
|dz�t
||z
�zz|
z
S)a�Equivalent to ``list(combinations(iterable, r)).index(element)``

    The subsequences of *iterable* that are of length *r* can be ordered
    lexicographically. :func:`combination_index` computes the index of the
    first *element*, without computing the previous combinations.

        >>> combination_index('adf', 'abcdefg')
        10

    ``ValueError`` will be raised if the given *element* isn't one of the
    combinations of *iterable*.
    �NNNrz(element is not a combination of iterabler�r-)r�)rXr�r�r�r`r�r)
r(r�r��y�indexesr&r�r=�tmpr/r�r	rs
             r�rDrDJs���� �G����&�D�A�q��y���G��X��D����1���6��N�N�1���'�<�0�F�C���{������C�D�D���q�$�i�(�D�A�q�
�E��(�7�+�1�5���1�
��E����6��Y�q�\�i��l�Y�q�1�u�5E�&E�F�F�E�6�
�Q��U��	�!�a�%� 0�9�Q��U�3C� C�D�u�L�Lr�c��d}t|�}ttt|�dd�|�D]!\}}|j	|�}||z|z}||=�#|S)a�Equivalent to ``list(permutations(iterable, r)).index(element)```

    The subsequences of *iterable* that are of length *r* where order is
    important can be ordered lexicographically. :func:`permutation_index`
    computes the index of the first *element* directly, without computing
    the previous permutations.

        >>> permutation_index([1, 3, 2], range(5))
        19

    ``ValueError`` will be raised if the given *element* isn't one of the
    permutations of *iterable*.
    rr�)r�r�rr�r�)r(r�r�r&r	r=rs       r�rsrsus\��
�E���>�D��E�#�d�)�R��,�g�6���1��J�J�q�M����	�A�
����G�7�
�Lr�c�"�eZdZdZd�Zd�Zd�Zy)rIa�Wrap *iterable* and keep a count of how many items have been consumed.

    The ``items_seen`` attribute starts at ``0`` and increments as the iterable
    is consumed:

        >>> iterable = map(str, range(10))
        >>> it = countable(iterable)
        >>> it.items_seen
        0
        >>> next(it), next(it)
        ('0', '1')
        >>> list(it)
        ['2', '3', '4', '5', '6', '7', '8', '9']
        >>> it.items_seen
        10
    c�2�t|�|_d|_yr�)r�r��
items_seenr�s  r�r�zcountable.__init__�s����>�����r�c��|Sr�r�r�s r�r�zcountable.__iter__�r�r�c�Z�t|j�}|xjdz
c_|Srf)r�r�r�r%s  r�r�zcountable.__next__�s"���D�H�H�~�����1����r�Nr`r�r�r�rIrI�s���"��r�rIc�\�t|dd�}|�t||�St||�|�S)a�Break *iterable* into lists of approximately length *n*.
    Items are distributed such the lengths of the lists differ by at most
    1 item.

    >>> iterable = [1, 2, 3, 4, 5, 6, 7]
    >>> n = 3
    >>> list(chunked_even(iterable, n))  # List lengths: 3, 2, 2
    [[1, 2, 3], [4, 5], [6, 7]]
    >>> list(chunked(iterable, n))  # List lengths: 3, 3, 1
    [[1, 2, 3], [4, 5, 6], [7]]

    r�N)�getattr�_chunked_even_online�_chunked_even_finite)r�r��
len_methods   r�rArA�s6����9�d�3�J���#�H�a�0�0�#�H�j�l�A�>�>r�c#��K�g}||dz
|dz
zz}|D].}|j|�t|�|k(s�#|d|��||d}�0t|t|�|�Ed{���y7��w)Nr
r-)r�r�r�)r�r��buffer�maxbufr=s     r�r�r��ss����
�F�
�!�a�%�A��E�"�
"�F�
���
�
�a���v�;�&� ���!�*���A�B�Z�F�	�
$�F�C��K��;�;�;�s�5A'�'A'�A%� A'c#�K�|dkryt||�\}}||dkDrdndz}t||�\}}||dkDrdndz}|dz
}|||zz
}||z
}	g}
t|�}|D]4}|
j|�t|
�|k(s�#|
��g}
|dz}|dks�4n|D]-}|
j|�t|
�|k(s�#|
��g}
|	dz}	�/y�w)Nr-r)r�r�r�r�)
r��Nr�r�r�	num_lists�	full_size�partial_size�num_full�num_partialr�r�r=s
             r�r�r��s������1�u���!�Q�<�D�A�q��!�a�%�Q�Q�'�I��!�Y��D�A�q��!�a�%�Q�Q�'�I��q�=�L��<�)�+�+�H��h�&�K�
�F��H�~�H����
�
�a���v�;�)�#��L��F���M�H��1�}������
�
�a���v�;�,�&��L��F��1��K��s�BC
�C
�'C
�<C
)�scalar_typesr�c'��K��fd�}t|�}|sygg}}gg}}t|�D][\}	}
||
�r#|j|
�|j|	��1|jt|
��|j|	��]t|�|k(rt	|���y|rt
nt}||�D]G}dg|z}
t
||�D]
\}	}||
|	<�t
||�D]
\}	}||
|	<�t	|
����Iy�w)aA version of :func:`zip` that "broadcasts" any scalar
    (i.e., non-iterable) items into output tuples.

    >>> iterable_1 = [1, 2, 3]
    >>> iterable_2 = ['a', 'b', 'c']
    >>> scalar = '_'
    >>> list(zip_broadcast(iterable_1, iterable_2, scalar))
    [(1, 'a', '_'), (2, 'b', '_'), (3, 'c', '_')]

    The *scalar_types* keyword argument determines what types are considered
    scalar. It is set to ``(str, bytes)`` by default. Set it to ``None`` to
    treat strings and byte strings as iterable:

    >>> list(zip_broadcast('abc', 0, 'xyz', scalar_types=None))
    [('a', 0, 'x'), ('b', 0, 'y'), ('c', 0, 'z')]

    If the *strict* keyword argument is ``True``, then
    ``UnequalIterablesError`` will be raised if any of the iterables have
    different lengths.
    c�Z���r
t|��ry	t|�y#t$rYywxYw)NTF)r�r�r�)r�r�s �r��	is_scalarz zip_broadcast.<locals>.is_scalars7����J�s�L�9��	���I����	��	�s��	*�*N)r�rXr�r�rr/r�)r�r��objectsr�rr%�iterable_positions�scalars�scalar_positionsr	r��zipperr
�new_itemr�s`              r�r�r��s�����,��w�<�D���$&��!�I� "�B�
�G��G�$���3��S�>��N�N�3���#�#�A�&����T�#�Y�'��%�%�a�(�
%��7�|�t���G�n���!�Z�s�F��	�"���6�D�=���-�t�4�G�A�t��H�Q�K�5��+�W�5�G�A�t��H�Q�K�6��H�o��#�s�C?Dc#� K�|dkrtd��t|��}t�}|du}|D][}|r||�n|}||vr�t|�|k(r|j	|d�|j|�|j
|�|���]y�w)a�Yield the items from *iterable* that haven't been seen recently.
    *n* is the size of the lookback window.

        >>> iterable = [0, 1, 0, 2, 3, 0]
        >>> n = 3
        >>> list(unique_in_window(iterable, n))
        [0, 1, 2, 3, 0]

    The *key* function, if provided, will be used to determine uniqueness:

        >>> list(unique_in_window('abAcda', 3, key=lambda x: x.lower()))
        ['a', 'b', 'c', 'd', 'a']

    The items in *iterable* must be hashable.

    rzn must be greater than 0r�N)r�rr"r��discardr�r�)r�r�r@r.r)�use_keyr
r�s        r�r�r�0s�����"	�A�v��3�4�4�
�!�_�F��e�G���o�G��� �C��I�d����<���w�<�1���O�O�F�1�I�&����A���
�
�a���
��s�BBc#��K�t�}g}|du}|D])}|r||�n|}	||vr|j|�n|���+y#t$r||vr|j|�n|��Y�RwxYw�w)a{Yield duplicate elements after their first appearance.

    >>> list(duplicates_everseen('mississippi'))
    ['s', 'i', 's', 's', 'i', 'p', 'i']
    >>> list(duplicates_everseen('AaaBbbCccAaa', str.lower))
    ['a', 'a', 'b', 'b', 'c', 'c', 'A', 'a', 'a']

    This function is analagous to :func:`unique_everseen` and is subject to
    the same performance considerations.

    N)r"r�r�r�)r�r@�seen_set�	seen_listr�r(r�s       r�rOrOVs~�����u�H��I���o�G���#�C��L���		��� ����Q���
��
���	��	�!�� � ��#��
��		�s'�"A+�A�A+�#A(�%A+�'A(�(A+c	�B�ttd�t||���S)a2Yields serially-duplicate elements after their first appearance.

    >>> list(duplicates_justseen('mississippi'))
    ['s', 's', 'p']
    >>> list(duplicates_justseen('AaaBbbCccAaa', str.lower))
    ['a', 'a', 'b', 'b', 'c', 'c', 'a', 'a']

    This function is analagous to :func:`unique_justseen`.

    c�$�t|d�ddSrf)r^)�group_tuples r�rz%duplicates_justseen.<locals>.<lambda>�s����A�� ?��� Cr�)r2r!r)r�r@s  r�rPrPts&����C��H�c�"�	
��r�)r@r�c��|r|g|��n|}t|�}	t|�x}}|�2t|||��D]\}	}
|
|	kr|
|	}
}	|	|kr|	}||
ks�|
}�||fS||�x}}t|||��D]8\}	}
||	�||
�}}
||
kr|
|	||
f\}	}
}
}|
|kr|	|
}}||ks�5|
|}}�:||fS#t$r }|turt	d�|�|cYd}~Sd}~wwxYw)a�Returns both the smallest and largest items in an iterable
    or the largest of two or more arguments.

        >>> minmax([3, 1, 5])
        (1, 5)

        >>> minmax(4, 2, 6)
        (2, 6)

    If a *key* function is provided, it will be used to transform the input
    items for comparison.

        >>> minmax([5, 30], key=str)  # '30' sorts before '5'
        (30, 5)

    If a *default* value is provided, it will be returned if there are no
    input items.

        >>> minmax([], default=(0, 0))
        (0, 0)

    Otherwise ``ValueError`` is raised.

    This function is based on the
    `recipe <http://code.activestate.com/recipes/577916/>`__ by
    Raymond Hettinger and takes care to minimize the number of comparisons
    performed.
    z[`minmax()` argument is an empty iterable. Provide a `default` value to suppress this error.Nr�)r�r�r�r.r�r)�iterable_or_valuer@r��othersr�r��lo�hir�r=r��lo_key�hi_key�x_key�y_keys               r�riri�s?��:06�!�+�F�+�;L�H�	
�h��B���r�(���R��{���B�"�5�D�A�q��1�u��!�1���2�v����A�v���
6�*�r�6�M��b�'�!�����B�"�5�D�A�q��q�6�3�q�6�5�E��u�}�%&��5�%�%7�"��1�e�U��v�~���F����~���F��6��r�6�M��C���g���D���
����
�s�
B/�/	C�8C�
C�CTc#�8K�|dkrtd��g}d}d}|D]k}||�}	|r|	|kDrtd��||k(}
|	|z|kD}|r%|s|
r!t|���|j�d}d}|j|�||	z
}|dz
}�m|rt|���yy�w)aBYield batches of items from *iterable* with a combined size limited by
    *max_size*.

    >>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1']
    >>> list(constrained_batches(iterable, 10))
    [(b'12345', b'123'), (b'12345678', b'1', b'1'), (b'12', b'1')]

    If a *max_count* is supplied, the number of items per batch is also
    limited:

    >>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1']
    >>> list(constrained_batches(iterable, 10, max_count = 2))
    [(b'12345', b'123'), (b'12345678', b'1'), (b'1', b'12'), (b'1',)]

    If a *get_len* function is supplied, use that instead of :func:`len` to
    determine item size.

    If *strict* is ``True``, raise ``ValueError`` if any single item is bigger
    than *max_size*. Otherwise, allow single items to exceed *max_size*.
    rz&maximum size must be greater than zerozitem size exceeds maximum sizer-N)r�rr�r�)r��max_size�	max_count�get_lenr��batch�
batch_size�batch_countr
�item_len�
reached_count�reached_sizes            r�rFrF�s�����.�1�}��A�B�B��E��J��K����4�=���h��)��=�>�>�#�y�0�
��*�,�x�7���L�M���,���K�K�M��J��K�
���T���h��
��q����"
��E�l��
�s�BBc'����K�td�|D���t��}�D]}t|�dks�td��dg|z�tt	|dz��}dg|z}	t��fd�t	|�D����|d}d|d<||k(ry�|||z�|<�|dk(s�|t�|�dz
k(r||||<||dz||<|dz||dz<�}�w)afLike :func:`itertools.product`, but return tuples in an order such
    that only one element in the generated tuple changes from one iteration
    to the next.

        >>> list(gray_product('AB','CD'))
        [('A', 'C'), ('B', 'C'), ('B', 'D'), ('A', 'D')]

    This function consumes all of the input iterables before producing output.
    If any of the input iterables have fewer than two items, ``ValueError``
    is raised.

    For information on the algorithm, see
    `this section <https://www-cs-faculty.stanford.edu/~knuth/fasc2a.ps.gz>`__
    of Donald Knuth's *The Art of Computer Programming*.
    c3�2K�|]}t|����y�wr�)rrRs  r�r6zgray_product.<locals>.<genexpr>s����6�I�q�%��(�I�s�r
z)each iterable must have two or more itemsrr-c3�4�K�|]}�|�|���y�wr�r�)r4r	r��
all_iterabless  ��r�r6zgray_product.<locals>.<genexpr>s"�����J�4I�q�M�!�$�Q�q�T�*�4I�r�N)rr�r�r�r)r%�iterable_countr�r@�orr�rs      @@r�rTrTs����� �6�I�6�6�M���'�N�!���x�=�1���H�I�I�"�
��n��A��U�>�A�%�
&�'�A�	
��n��A�
��J�E�.�4I�J�J�J�
�a�D����!��������t�a��d�{��!���Q�4�1�9��!���M�!�$4� 5�� 9�9��a�D�5�A�a�D��Q��U�8�A�a�D��1�u�A�a�!�e�H��s�1C#�B-C#)Fr�r�)r-rf)NNN)r�F)r�)NNF)r
))r�rr-FN)r�NF)NFF)�r��collectionsrrrr�collections.abcr�	functoolsrr	r
�heapqrrr
�	itertoolsrrrrrrrrrrrr�mathrrrr�queuerrr r!r"�operatorr#r$r%r&r'r(r)�sysr*r+�timer,�recipesr.r/r0r1r2r3r4r5r6r7�__all__r@rSr`rjrrrGrXr_r�rnrur�rLr\r�r�r�r�r>r�rYr[rZrCrr�r�r�r�r�r�rprvrwrMr�r�r�r�r�rNrgrhr<r:rU�HashablermrHrhr�rarbrcrzr�r^rr=rErJr9r}r{rQrBrdrgryrxrqr~r�rorcrVrWrKrRrerfrr�r|r]�
BaseExceptionr8r?r�r;rlrkr�rtrDrsrIrAr�r�r�r�rOrPrir�rFrTr�r�r��<module>rsq���8�8�$�,�,�/�/�
�
�
�
�,�+��-�-�9�9�9�#�����b��J �F$��8#��:&-�:�"b"�b"�J�@�"
��@�F�G�Tb$�JD�4C�B2�j!�4�D]'�]'�@((�V0�
.� ?+�D-!�`:�z�D)�X �F#�L*�Z*)�Z�@A��& M�F�8"�>-2�T�$�N?�D.K�b0�f%(��<�2�j$)�N*�ZV,�C�L�L�#�,�,�V,�r
=� "�J�D�-0�`A�%�$�40�"+P�+P�\]&�@(�$+6�-$�`"�')�d�')�T*L�8�*L�ZI%�I%�XF�F�:&*�>�$:�?�D@�F �T�(?�V:�zB�(5/�p*�*�Z&�R��*!�HL�(%�P�0�*,7�<�,�2 5�F!6�H3�6	�-�	�{�{�|%%�P �F#�>+(�\�8�2(M�V�0��@?�,<� �F+.�u��e�<�~#�L�<�&,0��D�P#'��D�/�d'r�python3.12/site-packages/pkg_resources/_vendor/more_itertools/recipes.py000064400000061510151732701010022472 0ustar00"""Imported from the recipes section of the itertools documentation.

All functions taken from the recipes section of the itertools library docs
[1]_.
Some backward-compatible usability improvements have been made.

.. [1] http://docs.python.org/library/itertools.html#recipes

"""
import math
import operator
import warnings

from collections import deque
from collections.abc import Sized
from functools import reduce
from itertools import (
    chain,
    combinations,
    compress,
    count,
    cycle,
    groupby,
    islice,
    product,
    repeat,
    starmap,
    tee,
    zip_longest,
)
from random import randrange, sample, choice
from sys import hexversion

__all__ = [
    'all_equal',
    'batched',
    'before_and_after',
    'consume',
    'convolve',
    'dotproduct',
    'first_true',
    'factor',
    'flatten',
    'grouper',
    'iter_except',
    'iter_index',
    'matmul',
    'ncycles',
    'nth',
    'nth_combination',
    'padnone',
    'pad_none',
    'pairwise',
    'partition',
    'polynomial_from_roots',
    'powerset',
    'prepend',
    'quantify',
    'random_combination_with_replacement',
    'random_combination',
    'random_permutation',
    'random_product',
    'repeatfunc',
    'roundrobin',
    'sieve',
    'sliding_window',
    'subslices',
    'tabulate',
    'tail',
    'take',
    'transpose',
    'triplewise',
    'unique_everseen',
    'unique_justseen',
]

_marker = object()


def take(n, iterable):
    """Return first *n* items of the iterable as a list.

        >>> take(3, range(10))
        [0, 1, 2]

    If there are fewer than *n* items in the iterable, all of them are
    returned.

        >>> take(10, range(3))
        [0, 1, 2]

    """
    return list(islice(iterable, n))


def tabulate(function, start=0):
    """Return an iterator over the results of ``func(start)``,
    ``func(start + 1)``, ``func(start + 2)``...

    *func* should be a function that accepts one integer argument.

    If *start* is not specified it defaults to 0. It will be incremented each
    time the iterator is advanced.

        >>> square = lambda x: x ** 2
        >>> iterator = tabulate(square, -3)
        >>> take(4, iterator)
        [9, 4, 1, 0]

    """
    return map(function, count(start))


def tail(n, iterable):
    """Return an iterator over the last *n* items of *iterable*.

    >>> t = tail(3, 'ABCDEFG')
    >>> list(t)
    ['E', 'F', 'G']

    """
    # If the given iterable has a length, then we can use islice to get its
    # final elements. Note that if the iterable is not actually Iterable,
    # either islice or deque will throw a TypeError. This is why we don't
    # check if it is Iterable.
    if isinstance(iterable, Sized):
        yield from islice(iterable, max(0, len(iterable) - n), None)
    else:
        yield from iter(deque(iterable, maxlen=n))


def consume(iterator, n=None):
    """Advance *iterable* by *n* steps. If *n* is ``None``, consume it
    entirely.

    Efficiently exhausts an iterator without returning values. Defaults to
    consuming the whole iterator, but an optional second argument may be
    provided to limit consumption.

        >>> i = (x for x in range(10))
        >>> next(i)
        0
        >>> consume(i, 3)
        >>> next(i)
        4
        >>> consume(i)
        >>> next(i)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        StopIteration

    If the iterator has fewer items remaining than the provided limit, the
    whole iterator will be consumed.

        >>> i = (x for x in range(3))
        >>> consume(i, 5)
        >>> next(i)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        StopIteration

    """
    # Use functions that consume iterators at C speed.
    if n is None:
        # feed the entire iterator into a zero-length deque
        deque(iterator, maxlen=0)
    else:
        # advance to the empty slice starting at position n
        next(islice(iterator, n, n), None)


def nth(iterable, n, default=None):
    """Returns the nth item or a default value.

    >>> l = range(10)
    >>> nth(l, 3)
    3
    >>> nth(l, 20, "zebra")
    'zebra'

    """
    return next(islice(iterable, n, None), default)


def all_equal(iterable):
    """
    Returns ``True`` if all the elements are equal to each other.

        >>> all_equal('aaaa')
        True
        >>> all_equal('aaab')
        False

    """
    g = groupby(iterable)
    return next(g, True) and not next(g, False)


def quantify(iterable, pred=bool):
    """Return the how many times the predicate is true.

    >>> quantify([True, False, True])
    2

    """
    return sum(map(pred, iterable))


def pad_none(iterable):
    """Returns the sequence of elements and then returns ``None`` indefinitely.

        >>> take(5, pad_none(range(3)))
        [0, 1, 2, None, None]

    Useful for emulating the behavior of the built-in :func:`map` function.

    See also :func:`padded`.

    """
    return chain(iterable, repeat(None))


padnone = pad_none


def ncycles(iterable, n):
    """Returns the sequence elements *n* times

    >>> list(ncycles(["a", "b"], 3))
    ['a', 'b', 'a', 'b', 'a', 'b']

    """
    return chain.from_iterable(repeat(tuple(iterable), n))


def dotproduct(vec1, vec2):
    """Returns the dot product of the two iterables.

    >>> dotproduct([10, 10], [20, 20])
    400

    """
    return sum(map(operator.mul, vec1, vec2))


def flatten(listOfLists):
    """Return an iterator flattening one level of nesting in a list of lists.

        >>> list(flatten([[0, 1], [2, 3]]))
        [0, 1, 2, 3]

    See also :func:`collapse`, which can flatten multiple levels of nesting.

    """
    return chain.from_iterable(listOfLists)


def repeatfunc(func, times=None, *args):
    """Call *func* with *args* repeatedly, returning an iterable over the
    results.

    If *times* is specified, the iterable will terminate after that many
    repetitions:

        >>> from operator import add
        >>> times = 4
        >>> args = 3, 5
        >>> list(repeatfunc(add, times, *args))
        [8, 8, 8, 8]

    If *times* is ``None`` the iterable will not terminate:

        >>> from random import randrange
        >>> times = None
        >>> args = 1, 11
        >>> take(6, repeatfunc(randrange, times, *args))  # doctest:+SKIP
        [2, 4, 8, 1, 8, 4]

    """
    if times is None:
        return starmap(func, repeat(args))
    return starmap(func, repeat(args, times))


def _pairwise(iterable):
    """Returns an iterator of paired items, overlapping, from the original

    >>> take(4, pairwise(count()))
    [(0, 1), (1, 2), (2, 3), (3, 4)]

    On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`.

    """
    a, b = tee(iterable)
    next(b, None)
    yield from zip(a, b)


try:
    from itertools import pairwise as itertools_pairwise
except ImportError:
    pairwise = _pairwise
else:

    def pairwise(iterable):
        yield from itertools_pairwise(iterable)

    pairwise.__doc__ = _pairwise.__doc__


class UnequalIterablesError(ValueError):
    def __init__(self, details=None):
        msg = 'Iterables have different lengths'
        if details is not None:
            msg += (': index 0 has length {}; index {} has length {}').format(
                *details
            )

        super().__init__(msg)


def _zip_equal_generator(iterables):
    for combo in zip_longest(*iterables, fillvalue=_marker):
        for val in combo:
            if val is _marker:
                raise UnequalIterablesError()
        yield combo


def _zip_equal(*iterables):
    # Check whether the iterables are all the same size.
    try:
        first_size = len(iterables[0])
        for i, it in enumerate(iterables[1:], 1):
            size = len(it)
            if size != first_size:
                break
        else:
            # If we didn't break out, we can use the built-in zip.
            return zip(*iterables)

        # If we did break out, there was a mismatch.
        raise UnequalIterablesError(details=(first_size, i, size))
    # If any one of the iterables didn't have a length, start reading
    # them until one runs out.
    except TypeError:
        return _zip_equal_generator(iterables)


def grouper(iterable, n, incomplete='fill', fillvalue=None):
    """Group elements from *iterable* into fixed-length groups of length *n*.

    >>> list(grouper('ABCDEF', 3))
    [('A', 'B', 'C'), ('D', 'E', 'F')]

    The keyword arguments *incomplete* and *fillvalue* control what happens for
    iterables whose length is not a multiple of *n*.

    When *incomplete* is `'fill'`, the last group will contain instances of
    *fillvalue*.

    >>> list(grouper('ABCDEFG', 3, incomplete='fill', fillvalue='x'))
    [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')]

    When *incomplete* is `'ignore'`, the last group will not be emitted.

    >>> list(grouper('ABCDEFG', 3, incomplete='ignore', fillvalue='x'))
    [('A', 'B', 'C'), ('D', 'E', 'F')]

    When *incomplete* is `'strict'`, a subclass of `ValueError` will be raised.

    >>> it = grouper('ABCDEFG', 3, incomplete='strict')
    >>> list(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    UnequalIterablesError

    """
    args = [iter(iterable)] * n
    if incomplete == 'fill':
        return zip_longest(*args, fillvalue=fillvalue)
    if incomplete == 'strict':
        return _zip_equal(*args)
    if incomplete == 'ignore':
        return zip(*args)
    else:
        raise ValueError('Expected fill, strict, or ignore')


def roundrobin(*iterables):
    """Yields an item from each iterable, alternating between them.

        >>> list(roundrobin('ABC', 'D', 'EF'))
        ['A', 'D', 'E', 'B', 'F', 'C']

    This function produces the same output as :func:`interleave_longest`, but
    may perform better for some inputs (in particular when the number of
    iterables is small).

    """
    # Recipe credited to George Sakkis
    pending = len(iterables)
    nexts = cycle(iter(it).__next__ for it in iterables)
    while pending:
        try:
            for next in nexts:
                yield next()
        except StopIteration:
            pending -= 1
            nexts = cycle(islice(nexts, pending))


def partition(pred, iterable):
    """
    Returns a 2-tuple of iterables derived from the input iterable.
    The first yields the items that have ``pred(item) == False``.
    The second yields the items that have ``pred(item) == True``.

        >>> is_odd = lambda x: x % 2 != 0
        >>> iterable = range(10)
        >>> even_items, odd_items = partition(is_odd, iterable)
        >>> list(even_items), list(odd_items)
        ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])

    If *pred* is None, :func:`bool` is used.

        >>> iterable = [0, 1, False, True, '', ' ']
        >>> false_items, true_items = partition(None, iterable)
        >>> list(false_items), list(true_items)
        ([0, False, ''], [1, True, ' '])

    """
    if pred is None:
        pred = bool

    evaluations = ((pred(x), x) for x in iterable)
    t1, t2 = tee(evaluations)
    return (
        (x for (cond, x) in t1 if not cond),
        (x for (cond, x) in t2 if cond),
    )


def powerset(iterable):
    """Yields all possible subsets of the iterable.

        >>> list(powerset([1, 2, 3]))
        [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)]

    :func:`powerset` will operate on iterables that aren't :class:`set`
    instances, so repeated elements in the input will produce repeated elements
    in the output. Use :func:`unique_everseen` on the input to avoid generating
    duplicates:

        >>> seq = [1, 1, 0]
        >>> list(powerset(seq))
        [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)]
        >>> from more_itertools import unique_everseen
        >>> list(powerset(unique_everseen(seq)))
        [(), (1,), (0,), (1, 0)]

    """
    s = list(iterable)
    return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1))


def unique_everseen(iterable, key=None):
    """
    Yield unique elements, preserving order.

        >>> list(unique_everseen('AAAABBBCCDAABBB'))
        ['A', 'B', 'C', 'D']
        >>> list(unique_everseen('ABBCcAD', str.lower))
        ['A', 'B', 'C', 'D']

    Sequences with a mix of hashable and unhashable items can be used.
    The function will be slower (i.e., `O(n^2)`) for unhashable items.

    Remember that ``list`` objects are unhashable - you can use the *key*
    parameter to transform the list to a tuple (which is hashable) to
    avoid a slowdown.

        >>> iterable = ([1, 2], [2, 3], [1, 2])
        >>> list(unique_everseen(iterable))  # Slow
        [[1, 2], [2, 3]]
        >>> list(unique_everseen(iterable, key=tuple))  # Faster
        [[1, 2], [2, 3]]

    Similary, you may want to convert unhashable ``set`` objects with
    ``key=frozenset``. For ``dict`` objects,
    ``key=lambda x: frozenset(x.items())`` can be used.

    """
    seenset = set()
    seenset_add = seenset.add
    seenlist = []
    seenlist_add = seenlist.append
    use_key = key is not None

    for element in iterable:
        k = key(element) if use_key else element
        try:
            if k not in seenset:
                seenset_add(k)
                yield element
        except TypeError:
            if k not in seenlist:
                seenlist_add(k)
                yield element


def unique_justseen(iterable, key=None):
    """Yields elements in order, ignoring serial duplicates

    >>> list(unique_justseen('AAAABBBCCDAABBB'))
    ['A', 'B', 'C', 'D', 'A', 'B']
    >>> list(unique_justseen('ABBCcAD', str.lower))
    ['A', 'B', 'C', 'A', 'D']

    """
    return map(next, map(operator.itemgetter(1), groupby(iterable, key)))


def iter_except(func, exception, first=None):
    """Yields results from a function repeatedly until an exception is raised.

    Converts a call-until-exception interface to an iterator interface.
    Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel
    to end the loop.

        >>> l = [0, 1, 2]
        >>> list(iter_except(l.pop, IndexError))
        [2, 1, 0]

    Multiple exceptions can be specified as a stopping condition:

        >>> l = [1, 2, 3, '...', 4, 5, 6]
        >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
        [7, 6, 5]
        >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
        [4, 3, 2]
        >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
        []

    """
    try:
        if first is not None:
            yield first()
        while 1:
            yield func()
    except exception:
        pass


def first_true(iterable, default=None, pred=None):
    """
    Returns the first true value in the iterable.

    If no true value is found, returns *default*

    If *pred* is not None, returns the first item for which
    ``pred(item) == True`` .

        >>> first_true(range(10))
        1
        >>> first_true(range(10), pred=lambda x: x > 5)
        6
        >>> first_true(range(10), default='missing', pred=lambda x: x > 9)
        'missing'

    """
    return next(filter(pred, iterable), default)


def random_product(*args, repeat=1):
    """Draw an item at random from each of the input iterables.

        >>> random_product('abc', range(4), 'XYZ')  # doctest:+SKIP
        ('c', 3, 'Z')

    If *repeat* is provided as a keyword argument, that many items will be
    drawn from each iterable.

        >>> random_product('abcd', range(4), repeat=2)  # doctest:+SKIP
        ('a', 2, 'd', 3)

    This equivalent to taking a random selection from
    ``itertools.product(*args, **kwarg)``.

    """
    pools = [tuple(pool) for pool in args] * repeat
    return tuple(choice(pool) for pool in pools)


def random_permutation(iterable, r=None):
    """Return a random *r* length permutation of the elements in *iterable*.

    If *r* is not specified or is ``None``, then *r* defaults to the length of
    *iterable*.

        >>> random_permutation(range(5))  # doctest:+SKIP
        (3, 4, 0, 1, 2)

    This equivalent to taking a random selection from
    ``itertools.permutations(iterable, r)``.

    """
    pool = tuple(iterable)
    r = len(pool) if r is None else r
    return tuple(sample(pool, r))


def random_combination(iterable, r):
    """Return a random *r* length subsequence of the elements in *iterable*.

        >>> random_combination(range(5), 3)  # doctest:+SKIP
        (2, 3, 4)

    This equivalent to taking a random selection from
    ``itertools.combinations(iterable, r)``.

    """
    pool = tuple(iterable)
    n = len(pool)
    indices = sorted(sample(range(n), r))
    return tuple(pool[i] for i in indices)


def random_combination_with_replacement(iterable, r):
    """Return a random *r* length subsequence of elements in *iterable*,
    allowing individual elements to be repeated.

        >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP
        (0, 0, 1, 2, 2)

    This equivalent to taking a random selection from
    ``itertools.combinations_with_replacement(iterable, r)``.

    """
    pool = tuple(iterable)
    n = len(pool)
    indices = sorted(randrange(n) for i in range(r))
    return tuple(pool[i] for i in indices)


def nth_combination(iterable, r, index):
    """Equivalent to ``list(combinations(iterable, r))[index]``.

    The subsequences of *iterable* that are of length *r* can be ordered
    lexicographically. :func:`nth_combination` computes the subsequence at
    sort position *index* directly, without computing the previous
    subsequences.

        >>> nth_combination(range(5), 3, 5)
        (0, 3, 4)

    ``ValueError`` will be raised If *r* is negative or greater than the length
    of *iterable*.
    ``IndexError`` will be raised if the given *index* is invalid.
    """
    pool = tuple(iterable)
    n = len(pool)
    if (r < 0) or (r > n):
        raise ValueError

    c = 1
    k = min(r, n - r)
    for i in range(1, k + 1):
        c = c * (n - k + i) // i

    if index < 0:
        index += c

    if (index < 0) or (index >= c):
        raise IndexError

    result = []
    while r:
        c, n, r = c * r // n, n - 1, r - 1
        while index >= c:
            index -= c
            c, n = c * (n - r) // n, n - 1
        result.append(pool[-1 - n])

    return tuple(result)


def prepend(value, iterator):
    """Yield *value*, followed by the elements in *iterator*.

        >>> value = '0'
        >>> iterator = ['1', '2', '3']
        >>> list(prepend(value, iterator))
        ['0', '1', '2', '3']

    To prepend multiple values, see :func:`itertools.chain`
    or :func:`value_chain`.

    """
    return chain([value], iterator)


def convolve(signal, kernel):
    """Convolve the iterable *signal* with the iterable *kernel*.

        >>> signal = (1, 2, 3, 4, 5)
        >>> kernel = [3, 2, 1]
        >>> list(convolve(signal, kernel))
        [3, 8, 14, 20, 26, 14, 5]

    Note: the input arguments are not interchangeable, as the *kernel*
    is immediately consumed and stored.

    """
    kernel = tuple(kernel)[::-1]
    n = len(kernel)
    window = deque([0], maxlen=n) * n
    for x in chain(signal, repeat(0, n - 1)):
        window.append(x)
        yield sum(map(operator.mul, kernel, window))


def before_and_after(predicate, it):
    """A variant of :func:`takewhile` that allows complete access to the
    remainder of the iterator.

         >>> it = iter('ABCdEfGhI')
         >>> all_upper, remainder = before_and_after(str.isupper, it)
         >>> ''.join(all_upper)
         'ABC'
         >>> ''.join(remainder) # takewhile() would lose the 'd'
         'dEfGhI'

    Note that the first iterator must be fully consumed before the second
    iterator can generate valid results.
    """
    it = iter(it)
    transition = []

    def true_iterator():
        for elem in it:
            if predicate(elem):
                yield elem
            else:
                transition.append(elem)
                return

    # Note: this is different from itertools recipes to allow nesting
    # before_and_after remainders into before_and_after again. See tests
    # for an example.
    remainder_iterator = chain(transition, it)

    return true_iterator(), remainder_iterator


def triplewise(iterable):
    """Return overlapping triplets from *iterable*.

    >>> list(triplewise('ABCDE'))
    [('A', 'B', 'C'), ('B', 'C', 'D'), ('C', 'D', 'E')]

    """
    for (a, _), (b, c) in pairwise(pairwise(iterable)):
        yield a, b, c


def sliding_window(iterable, n):
    """Return a sliding window of width *n* over *iterable*.

        >>> list(sliding_window(range(6), 4))
        [(0, 1, 2, 3), (1, 2, 3, 4), (2, 3, 4, 5)]

    If *iterable* has fewer than *n* items, then nothing is yielded:

        >>> list(sliding_window(range(3), 4))
        []

    For a variant with more features, see :func:`windowed`.
    """
    it = iter(iterable)
    window = deque(islice(it, n), maxlen=n)
    if len(window) == n:
        yield tuple(window)
    for x in it:
        window.append(x)
        yield tuple(window)


def subslices(iterable):
    """Return all contiguous non-empty subslices of *iterable*.

        >>> list(subslices('ABC'))
        [['A'], ['A', 'B'], ['A', 'B', 'C'], ['B'], ['B', 'C'], ['C']]

    This is similar to :func:`substrings`, but emits items in a different
    order.
    """
    seq = list(iterable)
    slices = starmap(slice, combinations(range(len(seq) + 1), 2))
    return map(operator.getitem, repeat(seq), slices)


def polynomial_from_roots(roots):
    """Compute a polynomial's coefficients from its roots.

    >>> roots = [5, -4, 3]  # (x - 5) * (x + 4) * (x - 3)
    >>> polynomial_from_roots(roots)  # x^3 - 4 * x^2 - 17 * x + 60
    [1, -4, -17, 60]
    """
    # Use math.prod for Python 3.8+,
    prod = getattr(math, 'prod', lambda x: reduce(operator.mul, x, 1))
    roots = list(map(operator.neg, roots))
    return [
        sum(map(prod, combinations(roots, k))) for k in range(len(roots) + 1)
    ]


def iter_index(iterable, value, start=0):
    """Yield the index of each place in *iterable* that *value* occurs,
    beginning with index *start*.

    See :func:`locate` for a more general means of finding the indexes
    associated with particular values.

    >>> list(iter_index('AABCADEAF', 'A'))
    [0, 1, 4, 7]
    """
    try:
        seq_index = iterable.index
    except AttributeError:
        # Slow path for general iterables
        it = islice(iterable, start, None)
        for i, element in enumerate(it, start):
            if element is value or element == value:
                yield i
    else:
        # Fast path for sequences
        i = start - 1
        try:
            while True:
                i = seq_index(value, i + 1)
                yield i
        except ValueError:
            pass


def sieve(n):
    """Yield the primes less than n.

    >>> list(sieve(30))
    [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
    """
    isqrt = getattr(math, 'isqrt', lambda x: int(math.sqrt(x)))
    data = bytearray((0, 1)) * (n // 2)
    data[:3] = 0, 0, 0
    limit = isqrt(n) + 1
    for p in compress(range(limit), data):
        data[p * p : n : p + p] = bytes(len(range(p * p, n, p + p)))
    data[2] = 1
    return iter_index(data, 1) if n > 2 else iter([])


def batched(iterable, n):
    """Batch data into lists of length *n*. The last batch may be shorter.

    >>> list(batched('ABCDEFG', 3))
    [['A', 'B', 'C'], ['D', 'E', 'F'], ['G']]

    This recipe is from the ``itertools`` docs. This library also provides
    :func:`chunked`, which has a different implementation.
    """
    if hexversion >= 0x30C00A0:  # Python 3.12.0a0
        warnings.warn(
            (
                'batched will be removed in a future version of '
                'more-itertools. Use the standard library '
                'itertools.batched function instead'
            ),
            DeprecationWarning,
        )

    it = iter(iterable)
    while True:
        batch = list(islice(it, n))
        if not batch:
            break
        yield batch


def transpose(it):
    """Swap the rows and columns of the input.

    >>> list(transpose([(1, 2, 3), (11, 22, 33)]))
    [(1, 11), (2, 22), (3, 33)]

    The caller should ensure that the dimensions of the input are compatible.
    """
    # TODO: when 3.9 goes end-of-life, add stric=True to this.
    return zip(*it)


def matmul(m1, m2):
    """Multiply two matrices.
    >>> list(matmul([(7, 5), (3, 5)], [(2, 5), (7, 9)]))
    [[49, 80], [41, 60]]

    The caller should ensure that the dimensions of the input matrices are
    compatible with each other.
    """
    n = len(m2[0])
    return batched(starmap(dotproduct, product(m1, transpose(m2))), n)


def factor(n):
    """Yield the prime factors of n.
    >>> list(factor(360))
    [2, 2, 2, 3, 3, 5]
    """
    isqrt = getattr(math, 'isqrt', lambda x: int(math.sqrt(x)))
    for prime in sieve(isqrt(n) + 1):
        while True:
            quotient, remainder = divmod(n, prime)
            if remainder:
                break
            yield prime
            n = quotient
            if n == 1:
                return
    if n >= 2:
        yield n
python3.12/site-packages/pkg_resources/_vendor/more_itertools/more.pyi000064400000047211151732701010022155 0ustar00"""Stubs for more_itertools.more"""
from __future__ import annotations

from types import TracebackType
from typing import (
    Any,
    Callable,
    Container,
    ContextManager,
    Generic,
    Hashable,
    Iterable,
    Iterator,
    overload,
    Reversible,
    Sequence,
    Sized,
    Type,
    TypeVar,
    type_check_only,
)
from typing_extensions import Protocol

# Type and type variable definitions
_T = TypeVar('_T')
_T1 = TypeVar('_T1')
_T2 = TypeVar('_T2')
_U = TypeVar('_U')
_V = TypeVar('_V')
_W = TypeVar('_W')
_T_co = TypeVar('_T_co', covariant=True)
_GenFn = TypeVar('_GenFn', bound=Callable[..., Iterator[object]])
_Raisable = BaseException | Type[BaseException]

@type_check_only
class _SizedIterable(Protocol[_T_co], Sized, Iterable[_T_co]): ...

@type_check_only
class _SizedReversible(Protocol[_T_co], Sized, Reversible[_T_co]): ...

@type_check_only
class _SupportsSlicing(Protocol[_T_co]):
    def __getitem__(self, __k: slice) -> _T_co: ...

def chunked(
    iterable: Iterable[_T], n: int | None, strict: bool = ...
) -> Iterator[list[_T]]: ...
@overload
def first(iterable: Iterable[_T]) -> _T: ...
@overload
def first(iterable: Iterable[_T], default: _U) -> _T | _U: ...
@overload
def last(iterable: Iterable[_T]) -> _T: ...
@overload
def last(iterable: Iterable[_T], default: _U) -> _T | _U: ...
@overload
def nth_or_last(iterable: Iterable[_T], n: int) -> _T: ...
@overload
def nth_or_last(iterable: Iterable[_T], n: int, default: _U) -> _T | _U: ...

class peekable(Generic[_T], Iterator[_T]):
    def __init__(self, iterable: Iterable[_T]) -> None: ...
    def __iter__(self) -> peekable[_T]: ...
    def __bool__(self) -> bool: ...
    @overload
    def peek(self) -> _T: ...
    @overload
    def peek(self, default: _U) -> _T | _U: ...
    def prepend(self, *items: _T) -> None: ...
    def __next__(self) -> _T: ...
    @overload
    def __getitem__(self, index: int) -> _T: ...
    @overload
    def __getitem__(self, index: slice) -> list[_T]: ...

def consumer(func: _GenFn) -> _GenFn: ...
def ilen(iterable: Iterable[object]) -> int: ...
def iterate(func: Callable[[_T], _T], start: _T) -> Iterator[_T]: ...
def with_iter(
    context_manager: ContextManager[Iterable[_T]],
) -> Iterator[_T]: ...
def one(
    iterable: Iterable[_T],
    too_short: _Raisable | None = ...,
    too_long: _Raisable | None = ...,
) -> _T: ...
def raise_(exception: _Raisable, *args: Any) -> None: ...
def strictly_n(
    iterable: Iterable[_T],
    n: int,
    too_short: _GenFn | None = ...,
    too_long: _GenFn | None = ...,
) -> list[_T]: ...
def distinct_permutations(
    iterable: Iterable[_T], r: int | None = ...
) -> Iterator[tuple[_T, ...]]: ...
def intersperse(
    e: _U, iterable: Iterable[_T], n: int = ...
) -> Iterator[_T | _U]: ...
def unique_to_each(*iterables: Iterable[_T]) -> list[list[_T]]: ...
@overload
def windowed(
    seq: Iterable[_T], n: int, *, step: int = ...
) -> Iterator[tuple[_T | None, ...]]: ...
@overload
def windowed(
    seq: Iterable[_T], n: int, fillvalue: _U, step: int = ...
) -> Iterator[tuple[_T | _U, ...]]: ...
def substrings(iterable: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ...
def substrings_indexes(
    seq: Sequence[_T], reverse: bool = ...
) -> Iterator[tuple[Sequence[_T], int, int]]: ...

class bucket(Generic[_T, _U], Container[_U]):
    def __init__(
        self,
        iterable: Iterable[_T],
        key: Callable[[_T], _U],
        validator: Callable[[object], object] | None = ...,
    ) -> None: ...
    def __contains__(self, value: object) -> bool: ...
    def __iter__(self) -> Iterator[_U]: ...
    def __getitem__(self, value: object) -> Iterator[_T]: ...

def spy(
    iterable: Iterable[_T], n: int = ...
) -> tuple[list[_T], Iterator[_T]]: ...
def interleave(*iterables: Iterable[_T]) -> Iterator[_T]: ...
def interleave_longest(*iterables: Iterable[_T]) -> Iterator[_T]: ...
def interleave_evenly(
    iterables: list[Iterable[_T]], lengths: list[int] | None = ...
) -> Iterator[_T]: ...
def collapse(
    iterable: Iterable[Any],
    base_type: type | None = ...,
    levels: int | None = ...,
) -> Iterator[Any]: ...
@overload
def side_effect(
    func: Callable[[_T], object],
    iterable: Iterable[_T],
    chunk_size: None = ...,
    before: Callable[[], object] | None = ...,
    after: Callable[[], object] | None = ...,
) -> Iterator[_T]: ...
@overload
def side_effect(
    func: Callable[[list[_T]], object],
    iterable: Iterable[_T],
    chunk_size: int,
    before: Callable[[], object] | None = ...,
    after: Callable[[], object] | None = ...,
) -> Iterator[_T]: ...
def sliced(
    seq: _SupportsSlicing[_T], n: int, strict: bool = ...
) -> Iterator[_T]: ...
def split_at(
    iterable: Iterable[_T],
    pred: Callable[[_T], object],
    maxsplit: int = ...,
    keep_separator: bool = ...,
) -> Iterator[list[_T]]: ...
def split_before(
    iterable: Iterable[_T], pred: Callable[[_T], object], maxsplit: int = ...
) -> Iterator[list[_T]]: ...
def split_after(
    iterable: Iterable[_T], pred: Callable[[_T], object], maxsplit: int = ...
) -> Iterator[list[_T]]: ...
def split_when(
    iterable: Iterable[_T],
    pred: Callable[[_T, _T], object],
    maxsplit: int = ...,
) -> Iterator[list[_T]]: ...
def split_into(
    iterable: Iterable[_T], sizes: Iterable[int | None]
) -> Iterator[list[_T]]: ...
@overload
def padded(
    iterable: Iterable[_T],
    *,
    n: int | None = ...,
    next_multiple: bool = ...,
) -> Iterator[_T | None]: ...
@overload
def padded(
    iterable: Iterable[_T],
    fillvalue: _U,
    n: int | None = ...,
    next_multiple: bool = ...,
) -> Iterator[_T | _U]: ...
@overload
def repeat_last(iterable: Iterable[_T]) -> Iterator[_T]: ...
@overload
def repeat_last(iterable: Iterable[_T], default: _U) -> Iterator[_T | _U]: ...
def distribute(n: int, iterable: Iterable[_T]) -> list[Iterator[_T]]: ...
@overload
def stagger(
    iterable: Iterable[_T],
    offsets: _SizedIterable[int] = ...,
    longest: bool = ...,
) -> Iterator[tuple[_T | None, ...]]: ...
@overload
def stagger(
    iterable: Iterable[_T],
    offsets: _SizedIterable[int] = ...,
    longest: bool = ...,
    fillvalue: _U = ...,
) -> Iterator[tuple[_T | _U, ...]]: ...

class UnequalIterablesError(ValueError):
    def __init__(self, details: tuple[int, int, int] | None = ...) -> None: ...

@overload
def zip_equal(__iter1: Iterable[_T1]) -> Iterator[tuple[_T1]]: ...
@overload
def zip_equal(
    __iter1: Iterable[_T1], __iter2: Iterable[_T2]
) -> Iterator[tuple[_T1, _T2]]: ...
@overload
def zip_equal(
    __iter1: Iterable[_T],
    __iter2: Iterable[_T],
    __iter3: Iterable[_T],
    *iterables: Iterable[_T],
) -> Iterator[tuple[_T, ...]]: ...
@overload
def zip_offset(
    __iter1: Iterable[_T1],
    *,
    offsets: _SizedIterable[int],
    longest: bool = ...,
    fillvalue: None = None,
) -> Iterator[tuple[_T1 | None]]: ...
@overload
def zip_offset(
    __iter1: Iterable[_T1],
    __iter2: Iterable[_T2],
    *,
    offsets: _SizedIterable[int],
    longest: bool = ...,
    fillvalue: None = None,
) -> Iterator[tuple[_T1 | None, _T2 | None]]: ...
@overload
def zip_offset(
    __iter1: Iterable[_T],
    __iter2: Iterable[_T],
    __iter3: Iterable[_T],
    *iterables: Iterable[_T],
    offsets: _SizedIterable[int],
    longest: bool = ...,
    fillvalue: None = None,
) -> Iterator[tuple[_T | None, ...]]: ...
@overload
def zip_offset(
    __iter1: Iterable[_T1],
    *,
    offsets: _SizedIterable[int],
    longest: bool = ...,
    fillvalue: _U,
) -> Iterator[tuple[_T1 | _U]]: ...
@overload
def zip_offset(
    __iter1: Iterable[_T1],
    __iter2: Iterable[_T2],
    *,
    offsets: _SizedIterable[int],
    longest: bool = ...,
    fillvalue: _U,
) -> Iterator[tuple[_T1 | _U, _T2 | _U]]: ...
@overload
def zip_offset(
    __iter1: Iterable[_T],
    __iter2: Iterable[_T],
    __iter3: Iterable[_T],
    *iterables: Iterable[_T],
    offsets: _SizedIterable[int],
    longest: bool = ...,
    fillvalue: _U,
) -> Iterator[tuple[_T | _U, ...]]: ...
def sort_together(
    iterables: Iterable[Iterable[_T]],
    key_list: Iterable[int] = ...,
    key: Callable[..., Any] | None = ...,
    reverse: bool = ...,
) -> list[tuple[_T, ...]]: ...
def unzip(iterable: Iterable[Sequence[_T]]) -> tuple[Iterator[_T], ...]: ...
def divide(n: int, iterable: Iterable[_T]) -> list[Iterator[_T]]: ...
def always_iterable(
    obj: object,
    base_type: type | tuple[type | tuple[Any, ...], ...] | None = ...,
) -> Iterator[Any]: ...
def adjacent(
    predicate: Callable[[_T], bool],
    iterable: Iterable[_T],
    distance: int = ...,
) -> Iterator[tuple[bool, _T]]: ...
@overload
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: None = None,
    valuefunc: None = None,
    reducefunc: None = None,
) -> Iterator[tuple[_T, Iterator[_T]]]: ...
@overload
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: None,
    reducefunc: None,
) -> Iterator[tuple[_U, Iterator[_T]]]: ...
@overload
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: None,
    valuefunc: Callable[[_T], _V],
    reducefunc: None,
) -> Iterable[tuple[_T, Iterable[_V]]]: ...
@overload
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: Callable[[_T], _V],
    reducefunc: None,
) -> Iterable[tuple[_U, Iterator[_V]]]: ...
@overload
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: None,
    valuefunc: None,
    reducefunc: Callable[[Iterator[_T]], _W],
) -> Iterable[tuple[_T, _W]]: ...
@overload
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: None,
    reducefunc: Callable[[Iterator[_T]], _W],
) -> Iterable[tuple[_U, _W]]: ...
@overload
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: None,
    valuefunc: Callable[[_T], _V],
    reducefunc: Callable[[Iterable[_V]], _W],
) -> Iterable[tuple[_T, _W]]: ...
@overload
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: Callable[[_T], _V],
    reducefunc: Callable[[Iterable[_V]], _W],
) -> Iterable[tuple[_U, _W]]: ...

class numeric_range(Generic[_T, _U], Sequence[_T], Hashable, Reversible[_T]):
    @overload
    def __init__(self, __stop: _T) -> None: ...
    @overload
    def __init__(self, __start: _T, __stop: _T) -> None: ...
    @overload
    def __init__(self, __start: _T, __stop: _T, __step: _U) -> None: ...
    def __bool__(self) -> bool: ...
    def __contains__(self, elem: object) -> bool: ...
    def __eq__(self, other: object) -> bool: ...
    @overload
    def __getitem__(self, key: int) -> _T: ...
    @overload
    def __getitem__(self, key: slice) -> numeric_range[_T, _U]: ...
    def __hash__(self) -> int: ...
    def __iter__(self) -> Iterator[_T]: ...
    def __len__(self) -> int: ...
    def __reduce__(
        self,
    ) -> tuple[Type[numeric_range[_T, _U]], tuple[_T, _T, _U]]: ...
    def __repr__(self) -> str: ...
    def __reversed__(self) -> Iterator[_T]: ...
    def count(self, value: _T) -> int: ...
    def index(self, value: _T) -> int: ...  # type: ignore

def count_cycle(
    iterable: Iterable[_T], n: int | None = ...
) -> Iterable[tuple[int, _T]]: ...
def mark_ends(
    iterable: Iterable[_T],
) -> Iterable[tuple[bool, bool, _T]]: ...
def locate(
    iterable: Iterable[object],
    pred: Callable[..., Any] = ...,
    window_size: int | None = ...,
) -> Iterator[int]: ...
def lstrip(
    iterable: Iterable[_T], pred: Callable[[_T], object]
) -> Iterator[_T]: ...
def rstrip(
    iterable: Iterable[_T], pred: Callable[[_T], object]
) -> Iterator[_T]: ...
def strip(
    iterable: Iterable[_T], pred: Callable[[_T], object]
) -> Iterator[_T]: ...

class islice_extended(Generic[_T], Iterator[_T]):
    def __init__(self, iterable: Iterable[_T], *args: int | None) -> None: ...
    def __iter__(self) -> islice_extended[_T]: ...
    def __next__(self) -> _T: ...
    def __getitem__(self, index: slice) -> islice_extended[_T]: ...

def always_reversible(iterable: Iterable[_T]) -> Iterator[_T]: ...
def consecutive_groups(
    iterable: Iterable[_T], ordering: Callable[[_T], int] = ...
) -> Iterator[Iterator[_T]]: ...
@overload
def difference(
    iterable: Iterable[_T],
    func: Callable[[_T, _T], _U] = ...,
    *,
    initial: None = ...,
) -> Iterator[_T | _U]: ...
@overload
def difference(
    iterable: Iterable[_T], func: Callable[[_T, _T], _U] = ..., *, initial: _U
) -> Iterator[_U]: ...

class SequenceView(Generic[_T], Sequence[_T]):
    def __init__(self, target: Sequence[_T]) -> None: ...
    @overload
    def __getitem__(self, index: int) -> _T: ...
    @overload
    def __getitem__(self, index: slice) -> Sequence[_T]: ...
    def __len__(self) -> int: ...

class seekable(Generic[_T], Iterator[_T]):
    def __init__(
        self, iterable: Iterable[_T], maxlen: int | None = ...
    ) -> None: ...
    def __iter__(self) -> seekable[_T]: ...
    def __next__(self) -> _T: ...
    def __bool__(self) -> bool: ...
    @overload
    def peek(self) -> _T: ...
    @overload
    def peek(self, default: _U) -> _T | _U: ...
    def elements(self) -> SequenceView[_T]: ...
    def seek(self, index: int) -> None: ...

class run_length:
    @staticmethod
    def encode(iterable: Iterable[_T]) -> Iterator[tuple[_T, int]]: ...
    @staticmethod
    def decode(iterable: Iterable[tuple[_T, int]]) -> Iterator[_T]: ...

def exactly_n(
    iterable: Iterable[_T], n: int, predicate: Callable[[_T], object] = ...
) -> bool: ...
def circular_shifts(iterable: Iterable[_T]) -> list[tuple[_T, ...]]: ...
def make_decorator(
    wrapping_func: Callable[..., _U], result_index: int = ...
) -> Callable[..., Callable[[Callable[..., Any]], Callable[..., _U]]]: ...
@overload
def map_reduce(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: None = ...,
    reducefunc: None = ...,
) -> dict[_U, list[_T]]: ...
@overload
def map_reduce(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: Callable[[_T], _V],
    reducefunc: None = ...,
) -> dict[_U, list[_V]]: ...
@overload
def map_reduce(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: None = ...,
    reducefunc: Callable[[list[_T]], _W] = ...,
) -> dict[_U, _W]: ...
@overload
def map_reduce(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: Callable[[_T], _V],
    reducefunc: Callable[[list[_V]], _W],
) -> dict[_U, _W]: ...
def rlocate(
    iterable: Iterable[_T],
    pred: Callable[..., object] = ...,
    window_size: int | None = ...,
) -> Iterator[int]: ...
def replace(
    iterable: Iterable[_T],
    pred: Callable[..., object],
    substitutes: Iterable[_U],
    count: int | None = ...,
    window_size: int = ...,
) -> Iterator[_T | _U]: ...
def partitions(iterable: Iterable[_T]) -> Iterator[list[list[_T]]]: ...
def set_partitions(
    iterable: Iterable[_T], k: int | None = ...
) -> Iterator[list[list[_T]]]: ...

class time_limited(Generic[_T], Iterator[_T]):
    def __init__(
        self, limit_seconds: float, iterable: Iterable[_T]
    ) -> None: ...
    def __iter__(self) -> islice_extended[_T]: ...
    def __next__(self) -> _T: ...

@overload
def only(
    iterable: Iterable[_T], *, too_long: _Raisable | None = ...
) -> _T | None: ...
@overload
def only(
    iterable: Iterable[_T], default: _U, too_long: _Raisable | None = ...
) -> _T | _U: ...
def ichunked(iterable: Iterable[_T], n: int) -> Iterator[Iterator[_T]]: ...
def distinct_combinations(
    iterable: Iterable[_T], r: int
) -> Iterator[tuple[_T, ...]]: ...
def filter_except(
    validator: Callable[[Any], object],
    iterable: Iterable[_T],
    *exceptions: Type[BaseException],
) -> Iterator[_T]: ...
def map_except(
    function: Callable[[Any], _U],
    iterable: Iterable[_T],
    *exceptions: Type[BaseException],
) -> Iterator[_U]: ...
def map_if(
    iterable: Iterable[Any],
    pred: Callable[[Any], bool],
    func: Callable[[Any], Any],
    func_else: Callable[[Any], Any] | None = ...,
) -> Iterator[Any]: ...
def sample(
    iterable: Iterable[_T],
    k: int,
    weights: Iterable[float] | None = ...,
) -> list[_T]: ...
def is_sorted(
    iterable: Iterable[_T],
    key: Callable[[_T], _U] | None = ...,
    reverse: bool = False,
    strict: bool = False,
) -> bool: ...

class AbortThread(BaseException):
    pass

class callback_iter(Generic[_T], Iterator[_T]):
    def __init__(
        self,
        func: Callable[..., Any],
        callback_kwd: str = ...,
        wait_seconds: float = ...,
    ) -> None: ...
    def __enter__(self) -> callback_iter[_T]: ...
    def __exit__(
        self,
        exc_type: Type[BaseException] | None,
        exc_value: BaseException | None,
        traceback: TracebackType | None,
    ) -> bool | None: ...
    def __iter__(self) -> callback_iter[_T]: ...
    def __next__(self) -> _T: ...
    def _reader(self) -> Iterator[_T]: ...
    @property
    def done(self) -> bool: ...
    @property
    def result(self) -> Any: ...

def windowed_complete(
    iterable: Iterable[_T], n: int
) -> Iterator[tuple[_T, ...]]: ...
def all_unique(
    iterable: Iterable[_T], key: Callable[[_T], _U] | None = ...
) -> bool: ...
def nth_product(index: int, *args: Iterable[_T]) -> tuple[_T, ...]: ...
def nth_permutation(
    iterable: Iterable[_T], r: int, index: int
) -> tuple[_T, ...]: ...
def value_chain(*args: _T | Iterable[_T]) -> Iterable[_T]: ...
def product_index(element: Iterable[_T], *args: Iterable[_T]) -> int: ...
def combination_index(
    element: Iterable[_T], iterable: Iterable[_T]
) -> int: ...
def permutation_index(
    element: Iterable[_T], iterable: Iterable[_T]
) -> int: ...
def repeat_each(iterable: Iterable[_T], n: int = ...) -> Iterator[_T]: ...

class countable(Generic[_T], Iterator[_T]):
    def __init__(self, iterable: Iterable[_T]) -> None: ...
    def __iter__(self) -> countable[_T]: ...
    def __next__(self) -> _T: ...

def chunked_even(iterable: Iterable[_T], n: int) -> Iterator[list[_T]]: ...
def zip_broadcast(
    *objects: _T | Iterable[_T],
    scalar_types: type | tuple[type | tuple[Any, ...], ...] | None = ...,
    strict: bool = ...,
) -> Iterable[tuple[_T, ...]]: ...
def unique_in_window(
    iterable: Iterable[_T], n: int, key: Callable[[_T], _U] | None = ...
) -> Iterator[_T]: ...
def duplicates_everseen(
    iterable: Iterable[_T], key: Callable[[_T], _U] | None = ...
) -> Iterator[_T]: ...
def duplicates_justseen(
    iterable: Iterable[_T], key: Callable[[_T], _U] | None = ...
) -> Iterator[_T]: ...

class _SupportsLessThan(Protocol):
    def __lt__(self, __other: Any) -> bool: ...

_SupportsLessThanT = TypeVar("_SupportsLessThanT", bound=_SupportsLessThan)

@overload
def minmax(
    iterable_or_value: Iterable[_SupportsLessThanT], *, key: None = None
) -> tuple[_SupportsLessThanT, _SupportsLessThanT]: ...
@overload
def minmax(
    iterable_or_value: Iterable[_T], *, key: Callable[[_T], _SupportsLessThan]
) -> tuple[_T, _T]: ...
@overload
def minmax(
    iterable_or_value: Iterable[_SupportsLessThanT],
    *,
    key: None = None,
    default: _U,
) -> _U | tuple[_SupportsLessThanT, _SupportsLessThanT]: ...
@overload
def minmax(
    iterable_or_value: Iterable[_T],
    *,
    key: Callable[[_T], _SupportsLessThan],
    default: _U,
) -> _U | tuple[_T, _T]: ...
@overload
def minmax(
    iterable_or_value: _SupportsLessThanT,
    __other: _SupportsLessThanT,
    *others: _SupportsLessThanT,
) -> tuple[_SupportsLessThanT, _SupportsLessThanT]: ...
@overload
def minmax(
    iterable_or_value: _T,
    __other: _T,
    *others: _T,
    key: Callable[[_T], _SupportsLessThan],
) -> tuple[_T, _T]: ...
def longest_common_prefix(
    iterables: Iterable[Iterable[_T]],
) -> Iterator[_T]: ...
def iequals(*iterables: Iterable[object]) -> bool: ...
def constrained_batches(
    iterable: Iterable[object],
    max_size: int,
    max_count: int | None = ...,
    get_len: Callable[[_T], object] = ...,
    strict: bool = ...,
) -> Iterator[tuple[_T]]: ...
def gray_product(*iterables: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ...
python3.12/site-packages/pkg_resources/_vendor/more_itertools/recipes.pyi000064400000007730151732701010022647 0ustar00"""Stubs for more_itertools.recipes"""
from __future__ import annotations

from typing import (
    Any,
    Callable,
    Iterable,
    Iterator,
    overload,
    Sequence,
    Type,
    TypeVar,
)

# Type and type variable definitions
_T = TypeVar('_T')
_U = TypeVar('_U')

def take(n: int, iterable: Iterable[_T]) -> list[_T]: ...
def tabulate(
    function: Callable[[int], _T], start: int = ...
) -> Iterator[_T]: ...
def tail(n: int, iterable: Iterable[_T]) -> Iterator[_T]: ...
def consume(iterator: Iterable[object], n: int | None = ...) -> None: ...
@overload
def nth(iterable: Iterable[_T], n: int) -> _T | None: ...
@overload
def nth(iterable: Iterable[_T], n: int, default: _U) -> _T | _U: ...
def all_equal(iterable: Iterable[object]) -> bool: ...
def quantify(
    iterable: Iterable[_T], pred: Callable[[_T], bool] = ...
) -> int: ...
def pad_none(iterable: Iterable[_T]) -> Iterator[_T | None]: ...
def padnone(iterable: Iterable[_T]) -> Iterator[_T | None]: ...
def ncycles(iterable: Iterable[_T], n: int) -> Iterator[_T]: ...
def dotproduct(vec1: Iterable[object], vec2: Iterable[object]) -> object: ...
def flatten(listOfLists: Iterable[Iterable[_T]]) -> Iterator[_T]: ...
def repeatfunc(
    func: Callable[..., _U], times: int | None = ..., *args: Any
) -> Iterator[_U]: ...
def pairwise(iterable: Iterable[_T]) -> Iterator[tuple[_T, _T]]: ...
def grouper(
    iterable: Iterable[_T],
    n: int,
    incomplete: str = ...,
    fillvalue: _U = ...,
) -> Iterator[tuple[_T | _U, ...]]: ...
def roundrobin(*iterables: Iterable[_T]) -> Iterator[_T]: ...
def partition(
    pred: Callable[[_T], object] | None, iterable: Iterable[_T]
) -> tuple[Iterator[_T], Iterator[_T]]: ...
def powerset(iterable: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ...
def unique_everseen(
    iterable: Iterable[_T], key: Callable[[_T], _U] | None = ...
) -> Iterator[_T]: ...
def unique_justseen(
    iterable: Iterable[_T], key: Callable[[_T], object] | None = ...
) -> Iterator[_T]: ...
@overload
def iter_except(
    func: Callable[[], _T],
    exception: Type[BaseException] | tuple[Type[BaseException], ...],
    first: None = ...,
) -> Iterator[_T]: ...
@overload
def iter_except(
    func: Callable[[], _T],
    exception: Type[BaseException] | tuple[Type[BaseException], ...],
    first: Callable[[], _U],
) -> Iterator[_T | _U]: ...
@overload
def first_true(
    iterable: Iterable[_T], *, pred: Callable[[_T], object] | None = ...
) -> _T | None: ...
@overload
def first_true(
    iterable: Iterable[_T],
    default: _U,
    pred: Callable[[_T], object] | None = ...,
) -> _T | _U: ...
def random_product(
    *args: Iterable[_T], repeat: int = ...
) -> tuple[_T, ...]: ...
def random_permutation(
    iterable: Iterable[_T], r: int | None = ...
) -> tuple[_T, ...]: ...
def random_combination(iterable: Iterable[_T], r: int) -> tuple[_T, ...]: ...
def random_combination_with_replacement(
    iterable: Iterable[_T], r: int
) -> tuple[_T, ...]: ...
def nth_combination(
    iterable: Iterable[_T], r: int, index: int
) -> tuple[_T, ...]: ...
def prepend(value: _T, iterator: Iterable[_U]) -> Iterator[_T | _U]: ...
def convolve(signal: Iterable[_T], kernel: Iterable[_T]) -> Iterator[_T]: ...
def before_and_after(
    predicate: Callable[[_T], bool], it: Iterable[_T]
) -> tuple[Iterator[_T], Iterator[_T]]: ...
def triplewise(iterable: Iterable[_T]) -> Iterator[tuple[_T, _T, _T]]: ...
def sliding_window(
    iterable: Iterable[_T], n: int
) -> Iterator[tuple[_T, ...]]: ...
def subslices(iterable: Iterable[_T]) -> Iterator[list[_T]]: ...
def polynomial_from_roots(roots: Sequence[int]) -> list[int]: ...
def iter_index(
    iterable: Iterable[object],
    value: Any,
    start: int | None = ...,
) -> Iterator[int]: ...
def sieve(n: int) -> Iterator[int]: ...
def batched(
    iterable: Iterable[_T],
    n: int,
) -> Iterator[list[_T]]: ...
def transpose(
    it: Iterable[Iterable[_T]],
) -> tuple[Iterator[_T], ...]: ...
def matmul(m1: Sequence[_T], m2: Sequence[_T]) -> Iterator[list[_T]]: ...
def factor(n: int) -> Iterator[int]: ...
python3.12/site-packages/pkg_resources/_vendor/more_itertools/__init__.py000064400000000224151732701010022572 0ustar00"""More routines for operating on iterables, beyond itertools"""

from .more import *  # noqa
from .recipes import *  # noqa

__version__ = '9.1.0'
python3.12/site-packages/pkg_resources/_vendor/more_itertools/py.typed000064400000000000151732701010022150 0ustar00python3.12/site-packages/pkg_resources/_vendor/more_itertools/more.py000064400000407500151732701010022005 0ustar00import warnings

from collections import Counter, defaultdict, deque, abc
from collections.abc import Sequence
from functools import partial, reduce, wraps
from heapq import heapify, heapreplace, heappop
from itertools import (
    chain,
    compress,
    count,
    cycle,
    dropwhile,
    groupby,
    islice,
    repeat,
    starmap,
    takewhile,
    tee,
    zip_longest,
)
from math import exp, factorial, floor, log
from queue import Empty, Queue
from random import random, randrange, uniform
from operator import itemgetter, mul, sub, gt, lt, ge, le
from sys import hexversion, maxsize
from time import monotonic

from .recipes import (
    _marker,
    _zip_equal,
    UnequalIterablesError,
    consume,
    flatten,
    pairwise,
    powerset,
    take,
    unique_everseen,
    all_equal,
)

__all__ = [
    'AbortThread',
    'SequenceView',
    'UnequalIterablesError',
    'adjacent',
    'all_unique',
    'always_iterable',
    'always_reversible',
    'bucket',
    'callback_iter',
    'chunked',
    'chunked_even',
    'circular_shifts',
    'collapse',
    'combination_index',
    'consecutive_groups',
    'constrained_batches',
    'consumer',
    'count_cycle',
    'countable',
    'difference',
    'distinct_combinations',
    'distinct_permutations',
    'distribute',
    'divide',
    'duplicates_everseen',
    'duplicates_justseen',
    'exactly_n',
    'filter_except',
    'first',
    'gray_product',
    'groupby_transform',
    'ichunked',
    'iequals',
    'ilen',
    'interleave',
    'interleave_evenly',
    'interleave_longest',
    'intersperse',
    'is_sorted',
    'islice_extended',
    'iterate',
    'last',
    'locate',
    'longest_common_prefix',
    'lstrip',
    'make_decorator',
    'map_except',
    'map_if',
    'map_reduce',
    'mark_ends',
    'minmax',
    'nth_or_last',
    'nth_permutation',
    'nth_product',
    'numeric_range',
    'one',
    'only',
    'padded',
    'partitions',
    'peekable',
    'permutation_index',
    'product_index',
    'raise_',
    'repeat_each',
    'repeat_last',
    'replace',
    'rlocate',
    'rstrip',
    'run_length',
    'sample',
    'seekable',
    'set_partitions',
    'side_effect',
    'sliced',
    'sort_together',
    'split_after',
    'split_at',
    'split_before',
    'split_into',
    'split_when',
    'spy',
    'stagger',
    'strip',
    'strictly_n',
    'substrings',
    'substrings_indexes',
    'time_limited',
    'unique_in_window',
    'unique_to_each',
    'unzip',
    'value_chain',
    'windowed',
    'windowed_complete',
    'with_iter',
    'zip_broadcast',
    'zip_equal',
    'zip_offset',
]


def chunked(iterable, n, strict=False):
    """Break *iterable* into lists of length *n*:

        >>> list(chunked([1, 2, 3, 4, 5, 6], 3))
        [[1, 2, 3], [4, 5, 6]]

    By the default, the last yielded list will have fewer than *n* elements
    if the length of *iterable* is not divisible by *n*:

        >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3))
        [[1, 2, 3], [4, 5, 6], [7, 8]]

    To use a fill-in value instead, see the :func:`grouper` recipe.

    If the length of *iterable* is not divisible by *n* and *strict* is
    ``True``, then ``ValueError`` will be raised before the last
    list is yielded.

    """
    iterator = iter(partial(take, n, iter(iterable)), [])
    if strict:
        if n is None:
            raise ValueError('n must not be None when using strict mode.')

        def ret():
            for chunk in iterator:
                if len(chunk) != n:
                    raise ValueError('iterable is not divisible by n.')
                yield chunk

        return iter(ret())
    else:
        return iterator


def first(iterable, default=_marker):
    """Return the first item of *iterable*, or *default* if *iterable* is
    empty.

        >>> first([0, 1, 2, 3])
        0
        >>> first([], 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.

    :func:`first` is useful when you have a generator of expensive-to-retrieve
    values and want any arbitrary one. It is marginally shorter than
    ``next(iter(iterable), default)``.

    """
    try:
        return next(iter(iterable))
    except StopIteration as e:
        if default is _marker:
            raise ValueError(
                'first() was called on an empty iterable, and no '
                'default value was provided.'
            ) from e
        return default


def last(iterable, default=_marker):
    """Return the last item of *iterable*, or *default* if *iterable* is
    empty.

        >>> last([0, 1, 2, 3])
        3
        >>> last([], 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.
    """
    try:
        if isinstance(iterable, Sequence):
            return iterable[-1]
        # Work around https://bugs.python.org/issue38525
        elif hasattr(iterable, '__reversed__') and (hexversion != 0x030800F0):
            return next(reversed(iterable))
        else:
            return deque(iterable, maxlen=1)[-1]
    except (IndexError, TypeError, StopIteration):
        if default is _marker:
            raise ValueError(
                'last() was called on an empty iterable, and no default was '
                'provided.'
            )
        return default


def nth_or_last(iterable, n, default=_marker):
    """Return the nth or the last item of *iterable*,
    or *default* if *iterable* is empty.

        >>> nth_or_last([0, 1, 2, 3], 2)
        2
        >>> nth_or_last([0, 1], 2)
        1
        >>> nth_or_last([], 0, 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.
    """
    return last(islice(iterable, n + 1), default=default)


class peekable:
    """Wrap an iterator to allow lookahead and prepending elements.

    Call :meth:`peek` on the result to get the value that will be returned
    by :func:`next`. This won't advance the iterator:

        >>> p = peekable(['a', 'b'])
        >>> p.peek()
        'a'
        >>> next(p)
        'a'

    Pass :meth:`peek` a default value to return that instead of raising
    ``StopIteration`` when the iterator is exhausted.

        >>> p = peekable([])
        >>> p.peek('hi')
        'hi'

    peekables also offer a :meth:`prepend` method, which "inserts" items
    at the head of the iterable:

        >>> p = peekable([1, 2, 3])
        >>> p.prepend(10, 11, 12)
        >>> next(p)
        10
        >>> p.peek()
        11
        >>> list(p)
        [11, 12, 1, 2, 3]

    peekables can be indexed. Index 0 is the item that will be returned by
    :func:`next`, index 1 is the item after that, and so on:
    The values up to the given index will be cached.

        >>> p = peekable(['a', 'b', 'c', 'd'])
        >>> p[0]
        'a'
        >>> p[1]
        'b'
        >>> next(p)
        'a'

    Negative indexes are supported, but be aware that they will cache the
    remaining items in the source iterator, which may require significant
    storage.

    To check whether a peekable is exhausted, check its truth value:

        >>> p = peekable(['a', 'b'])
        >>> if p:  # peekable has items
        ...     list(p)
        ['a', 'b']
        >>> if not p:  # peekable is exhausted
        ...     list(p)
        []

    """

    def __init__(self, iterable):
        self._it = iter(iterable)
        self._cache = deque()

    def __iter__(self):
        return self

    def __bool__(self):
        try:
            self.peek()
        except StopIteration:
            return False
        return True

    def peek(self, default=_marker):
        """Return the item that will be next returned from ``next()``.

        Return ``default`` if there are no items left. If ``default`` is not
        provided, raise ``StopIteration``.

        """
        if not self._cache:
            try:
                self._cache.append(next(self._it))
            except StopIteration:
                if default is _marker:
                    raise
                return default
        return self._cache[0]

    def prepend(self, *items):
        """Stack up items to be the next ones returned from ``next()`` or
        ``self.peek()``. The items will be returned in
        first in, first out order::

            >>> p = peekable([1, 2, 3])
            >>> p.prepend(10, 11, 12)
            >>> next(p)
            10
            >>> list(p)
            [11, 12, 1, 2, 3]

        It is possible, by prepending items, to "resurrect" a peekable that
        previously raised ``StopIteration``.

            >>> p = peekable([])
            >>> next(p)
            Traceback (most recent call last):
              ...
            StopIteration
            >>> p.prepend(1)
            >>> next(p)
            1
            >>> next(p)
            Traceback (most recent call last):
              ...
            StopIteration

        """
        self._cache.extendleft(reversed(items))

    def __next__(self):
        if self._cache:
            return self._cache.popleft()

        return next(self._it)

    def _get_slice(self, index):
        # Normalize the slice's arguments
        step = 1 if (index.step is None) else index.step
        if step > 0:
            start = 0 if (index.start is None) else index.start
            stop = maxsize if (index.stop is None) else index.stop
        elif step < 0:
            start = -1 if (index.start is None) else index.start
            stop = (-maxsize - 1) if (index.stop is None) else index.stop
        else:
            raise ValueError('slice step cannot be zero')

        # If either the start or stop index is negative, we'll need to cache
        # the rest of the iterable in order to slice from the right side.
        if (start < 0) or (stop < 0):
            self._cache.extend(self._it)
        # Otherwise we'll need to find the rightmost index and cache to that
        # point.
        else:
            n = min(max(start, stop) + 1, maxsize)
            cache_len = len(self._cache)
            if n >= cache_len:
                self._cache.extend(islice(self._it, n - cache_len))

        return list(self._cache)[index]

    def __getitem__(self, index):
        if isinstance(index, slice):
            return self._get_slice(index)

        cache_len = len(self._cache)
        if index < 0:
            self._cache.extend(self._it)
        elif index >= cache_len:
            self._cache.extend(islice(self._it, index + 1 - cache_len))

        return self._cache[index]


def consumer(func):
    """Decorator that automatically advances a PEP-342-style "reverse iterator"
    to its first yield point so you don't have to call ``next()`` on it
    manually.

        >>> @consumer
        ... def tally():
        ...     i = 0
        ...     while True:
        ...         print('Thing number %s is %s.' % (i, (yield)))
        ...         i += 1
        ...
        >>> t = tally()
        >>> t.send('red')
        Thing number 0 is red.
        >>> t.send('fish')
        Thing number 1 is fish.

    Without the decorator, you would have to call ``next(t)`` before
    ``t.send()`` could be used.

    """

    @wraps(func)
    def wrapper(*args, **kwargs):
        gen = func(*args, **kwargs)
        next(gen)
        return gen

    return wrapper


def ilen(iterable):
    """Return the number of items in *iterable*.

        >>> ilen(x for x in range(1000000) if x % 3 == 0)
        333334

    This consumes the iterable, so handle with care.

    """
    # This approach was selected because benchmarks showed it's likely the
    # fastest of the known implementations at the time of writing.
    # See GitHub tracker: #236, #230.
    counter = count()
    deque(zip(iterable, counter), maxlen=0)
    return next(counter)


def iterate(func, start):
    """Return ``start``, ``func(start)``, ``func(func(start))``, ...

    >>> from itertools import islice
    >>> list(islice(iterate(lambda x: 2*x, 1), 10))
    [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]

    """
    while True:
        yield start
        start = func(start)


def with_iter(context_manager):
    """Wrap an iterable in a ``with`` statement, so it closes once exhausted.

    For example, this will close the file when the iterator is exhausted::

        upper_lines = (line.upper() for line in with_iter(open('foo')))

    Any context manager which returns an iterable is a candidate for
    ``with_iter``.

    """
    with context_manager as iterable:
        yield from iterable


def one(iterable, too_short=None, too_long=None):
    """Return the first item from *iterable*, which is expected to contain only
    that item. Raise an exception if *iterable* is empty or has more than one
    item.

    :func:`one` is useful for ensuring that an iterable contains only one item.
    For example, it can be used to retrieve the result of a database query
    that is expected to return a single row.

    If *iterable* is empty, ``ValueError`` will be raised. You may specify a
    different exception with the *too_short* keyword:

        >>> it = []
        >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: too many items in iterable (expected 1)'
        >>> too_short = IndexError('too few items')
        >>> one(it, too_short=too_short)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        IndexError: too few items

    Similarly, if *iterable* contains more than one item, ``ValueError`` will
    be raised. You may specify a different exception with the *too_long*
    keyword:

        >>> it = ['too', 'many']
        >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: Expected exactly one item in iterable, but got 'too',
        'many', and perhaps more.
        >>> too_long = RuntimeError
        >>> one(it, too_long=too_long)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        RuntimeError

    Note that :func:`one` attempts to advance *iterable* twice to ensure there
    is only one item. See :func:`spy` or :func:`peekable` to check iterable
    contents less destructively.

    """
    it = iter(iterable)

    try:
        first_value = next(it)
    except StopIteration as e:
        raise (
            too_short or ValueError('too few items in iterable (expected 1)')
        ) from e

    try:
        second_value = next(it)
    except StopIteration:
        pass
    else:
        msg = (
            'Expected exactly one item in iterable, but got {!r}, {!r}, '
            'and perhaps more.'.format(first_value, second_value)
        )
        raise too_long or ValueError(msg)

    return first_value


def raise_(exception, *args):
    raise exception(*args)


def strictly_n(iterable, n, too_short=None, too_long=None):
    """Validate that *iterable* has exactly *n* items and return them if
    it does. If it has fewer than *n* items, call function *too_short*
    with those items. If it has more than *n* items, call function
    *too_long* with the first ``n + 1`` items.

        >>> iterable = ['a', 'b', 'c', 'd']
        >>> n = 4
        >>> list(strictly_n(iterable, n))
        ['a', 'b', 'c', 'd']

    By default, *too_short* and *too_long* are functions that raise
    ``ValueError``.

        >>> list(strictly_n('ab', 3))  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: too few items in iterable (got 2)

        >>> list(strictly_n('abc', 2))  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: too many items in iterable (got at least 3)

    You can instead supply functions that do something else.
    *too_short* will be called with the number of items in *iterable*.
    *too_long* will be called with `n + 1`.

        >>> def too_short(item_count):
        ...     raise RuntimeError
        >>> it = strictly_n('abcd', 6, too_short=too_short)
        >>> list(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        RuntimeError

        >>> def too_long(item_count):
        ...     print('The boss is going to hear about this')
        >>> it = strictly_n('abcdef', 4, too_long=too_long)
        >>> list(it)
        The boss is going to hear about this
        ['a', 'b', 'c', 'd']

    """
    if too_short is None:
        too_short = lambda item_count: raise_(
            ValueError,
            'Too few items in iterable (got {})'.format(item_count),
        )

    if too_long is None:
        too_long = lambda item_count: raise_(
            ValueError,
            'Too many items in iterable (got at least {})'.format(item_count),
        )

    it = iter(iterable)
    for i in range(n):
        try:
            item = next(it)
        except StopIteration:
            too_short(i)
            return
        else:
            yield item

    try:
        next(it)
    except StopIteration:
        pass
    else:
        too_long(n + 1)


def distinct_permutations(iterable, r=None):
    """Yield successive distinct permutations of the elements in *iterable*.

        >>> sorted(distinct_permutations([1, 0, 1]))
        [(0, 1, 1), (1, 0, 1), (1, 1, 0)]

    Equivalent to ``set(permutations(iterable))``, except duplicates are not
    generated and thrown away. For larger input sequences this is much more
    efficient.

    Duplicate permutations arise when there are duplicated elements in the
    input iterable. The number of items returned is
    `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of
    items input, and each `x_i` is the count of a distinct item in the input
    sequence.

    If *r* is given, only the *r*-length permutations are yielded.

        >>> sorted(distinct_permutations([1, 0, 1], r=2))
        [(0, 1), (1, 0), (1, 1)]
        >>> sorted(distinct_permutations(range(3), r=2))
        [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)]

    """

    # Algorithm: https://w.wiki/Qai
    def _full(A):
        while True:
            # Yield the permutation we have
            yield tuple(A)

            # Find the largest index i such that A[i] < A[i + 1]
            for i in range(size - 2, -1, -1):
                if A[i] < A[i + 1]:
                    break
            #  If no such index exists, this permutation is the last one
            else:
                return

            # Find the largest index j greater than j such that A[i] < A[j]
            for j in range(size - 1, i, -1):
                if A[i] < A[j]:
                    break

            # Swap the value of A[i] with that of A[j], then reverse the
            # sequence from A[i + 1] to form the new permutation
            A[i], A[j] = A[j], A[i]
            A[i + 1 :] = A[: i - size : -1]  # A[i + 1:][::-1]

    # Algorithm: modified from the above
    def _partial(A, r):
        # Split A into the first r items and the last r items
        head, tail = A[:r], A[r:]
        right_head_indexes = range(r - 1, -1, -1)
        left_tail_indexes = range(len(tail))

        while True:
            # Yield the permutation we have
            yield tuple(head)

            # Starting from the right, find the first index of the head with
            # value smaller than the maximum value of the tail - call it i.
            pivot = tail[-1]
            for i in right_head_indexes:
                if head[i] < pivot:
                    break
                pivot = head[i]
            else:
                return

            # Starting from the left, find the first value of the tail
            # with a value greater than head[i] and swap.
            for j in left_tail_indexes:
                if tail[j] > head[i]:
                    head[i], tail[j] = tail[j], head[i]
                    break
            # If we didn't find one, start from the right and find the first
            # index of the head with a value greater than head[i] and swap.
            else:
                for j in right_head_indexes:
                    if head[j] > head[i]:
                        head[i], head[j] = head[j], head[i]
                        break

            # Reverse head[i + 1:] and swap it with tail[:r - (i + 1)]
            tail += head[: i - r : -1]  # head[i + 1:][::-1]
            i += 1
            head[i:], tail[:] = tail[: r - i], tail[r - i :]

    items = sorted(iterable)

    size = len(items)
    if r is None:
        r = size

    if 0 < r <= size:
        return _full(items) if (r == size) else _partial(items, r)

    return iter(() if r else ((),))


def intersperse(e, iterable, n=1):
    """Intersperse filler element *e* among the items in *iterable*, leaving
    *n* items between each filler element.

        >>> list(intersperse('!', [1, 2, 3, 4, 5]))
        [1, '!', 2, '!', 3, '!', 4, '!', 5]

        >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2))
        [1, 2, None, 3, 4, None, 5]

    """
    if n == 0:
        raise ValueError('n must be > 0')
    elif n == 1:
        # interleave(repeat(e), iterable) -> e, x_0, e, x_1, e, x_2...
        # islice(..., 1, None) -> x_0, e, x_1, e, x_2...
        return islice(interleave(repeat(e), iterable), 1, None)
    else:
        # interleave(filler, chunks) -> [e], [x_0, x_1], [e], [x_2, x_3]...
        # islice(..., 1, None) -> [x_0, x_1], [e], [x_2, x_3]...
        # flatten(...) -> x_0, x_1, e, x_2, x_3...
        filler = repeat([e])
        chunks = chunked(iterable, n)
        return flatten(islice(interleave(filler, chunks), 1, None))


def unique_to_each(*iterables):
    """Return the elements from each of the input iterables that aren't in the
    other input iterables.

    For example, suppose you have a set of packages, each with a set of
    dependencies::

        {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}}

    If you remove one package, which dependencies can also be removed?

    If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not
    associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for
    ``pkg_2``, and ``D`` is only needed for ``pkg_3``::

        >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'})
        [['A'], ['C'], ['D']]

    If there are duplicates in one input iterable that aren't in the others
    they will be duplicated in the output. Input order is preserved::

        >>> unique_to_each("mississippi", "missouri")
        [['p', 'p'], ['o', 'u', 'r']]

    It is assumed that the elements of each iterable are hashable.

    """
    pool = [list(it) for it in iterables]
    counts = Counter(chain.from_iterable(map(set, pool)))
    uniques = {element for element in counts if counts[element] == 1}
    return [list(filter(uniques.__contains__, it)) for it in pool]


def windowed(seq, n, fillvalue=None, step=1):
    """Return a sliding window of width *n* over the given iterable.

        >>> all_windows = windowed([1, 2, 3, 4, 5], 3)
        >>> list(all_windows)
        [(1, 2, 3), (2, 3, 4), (3, 4, 5)]

    When the window is larger than the iterable, *fillvalue* is used in place
    of missing values:

        >>> list(windowed([1, 2, 3], 4))
        [(1, 2, 3, None)]

    Each window will advance in increments of *step*:

        >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2))
        [(1, 2, 3), (3, 4, 5), (5, 6, '!')]

    To slide into the iterable's items, use :func:`chain` to add filler items
    to the left:

        >>> iterable = [1, 2, 3, 4]
        >>> n = 3
        >>> padding = [None] * (n - 1)
        >>> list(windowed(chain(padding, iterable), 3))
        [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)]
    """
    if n < 0:
        raise ValueError('n must be >= 0')
    if n == 0:
        yield tuple()
        return
    if step < 1:
        raise ValueError('step must be >= 1')

    window = deque(maxlen=n)
    i = n
    for _ in map(window.append, seq):
        i -= 1
        if not i:
            i = step
            yield tuple(window)

    size = len(window)
    if size == 0:
        return
    elif size < n:
        yield tuple(chain(window, repeat(fillvalue, n - size)))
    elif 0 < i < min(step, n):
        window += (fillvalue,) * i
        yield tuple(window)


def substrings(iterable):
    """Yield all of the substrings of *iterable*.

        >>> [''.join(s) for s in substrings('more')]
        ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more']

    Note that non-string iterables can also be subdivided.

        >>> list(substrings([0, 1, 2]))
        [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)]

    """
    # The length-1 substrings
    seq = []
    for item in iter(iterable):
        seq.append(item)
        yield (item,)
    seq = tuple(seq)
    item_count = len(seq)

    # And the rest
    for n in range(2, item_count + 1):
        for i in range(item_count - n + 1):
            yield seq[i : i + n]


def substrings_indexes(seq, reverse=False):
    """Yield all substrings and their positions in *seq*

    The items yielded will be a tuple of the form ``(substr, i, j)``, where
    ``substr == seq[i:j]``.

    This function only works for iterables that support slicing, such as
    ``str`` objects.

    >>> for item in substrings_indexes('more'):
    ...    print(item)
    ('m', 0, 1)
    ('o', 1, 2)
    ('r', 2, 3)
    ('e', 3, 4)
    ('mo', 0, 2)
    ('or', 1, 3)
    ('re', 2, 4)
    ('mor', 0, 3)
    ('ore', 1, 4)
    ('more', 0, 4)

    Set *reverse* to ``True`` to yield the same items in the opposite order.


    """
    r = range(1, len(seq) + 1)
    if reverse:
        r = reversed(r)
    return (
        (seq[i : i + L], i, i + L) for L in r for i in range(len(seq) - L + 1)
    )


class bucket:
    """Wrap *iterable* and return an object that buckets it iterable into
    child iterables based on a *key* function.

        >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
        >>> s = bucket(iterable, key=lambda x: x[0])  # Bucket by 1st character
        >>> sorted(list(s))  # Get the keys
        ['a', 'b', 'c']
        >>> a_iterable = s['a']
        >>> next(a_iterable)
        'a1'
        >>> next(a_iterable)
        'a2'
        >>> list(s['b'])
        ['b1', 'b2', 'b3']

    The original iterable will be advanced and its items will be cached until
    they are used by the child iterables. This may require significant storage.

    By default, attempting to select a bucket to which no items belong  will
    exhaust the iterable and cache all values.
    If you specify a *validator* function, selected buckets will instead be
    checked against it.

        >>> from itertools import count
        >>> it = count(1, 2)  # Infinite sequence of odd numbers
        >>> key = lambda x: x % 10  # Bucket by last digit
        >>> validator = lambda x: x in {1, 3, 5, 7, 9}  # Odd digits only
        >>> s = bucket(it, key=key, validator=validator)
        >>> 2 in s
        False
        >>> list(s[2])
        []

    """

    def __init__(self, iterable, key, validator=None):
        self._it = iter(iterable)
        self._key = key
        self._cache = defaultdict(deque)
        self._validator = validator or (lambda x: True)

    def __contains__(self, value):
        if not self._validator(value):
            return False

        try:
            item = next(self[value])
        except StopIteration:
            return False
        else:
            self._cache[value].appendleft(item)

        return True

    def _get_values(self, value):
        """
        Helper to yield items from the parent iterator that match *value*.
        Items that don't match are stored in the local cache as they
        are encountered.
        """
        while True:
            # If we've cached some items that match the target value, emit
            # the first one and evict it from the cache.
            if self._cache[value]:
                yield self._cache[value].popleft()
            # Otherwise we need to advance the parent iterator to search for
            # a matching item, caching the rest.
            else:
                while True:
                    try:
                        item = next(self._it)
                    except StopIteration:
                        return
                    item_value = self._key(item)
                    if item_value == value:
                        yield item
                        break
                    elif self._validator(item_value):
                        self._cache[item_value].append(item)

    def __iter__(self):
        for item in self._it:
            item_value = self._key(item)
            if self._validator(item_value):
                self._cache[item_value].append(item)

        yield from self._cache.keys()

    def __getitem__(self, value):
        if not self._validator(value):
            return iter(())

        return self._get_values(value)


def spy(iterable, n=1):
    """Return a 2-tuple with a list containing the first *n* elements of
    *iterable*, and an iterator with the same items as *iterable*.
    This allows you to "look ahead" at the items in the iterable without
    advancing it.

    There is one item in the list by default:

        >>> iterable = 'abcdefg'
        >>> head, iterable = spy(iterable)
        >>> head
        ['a']
        >>> list(iterable)
        ['a', 'b', 'c', 'd', 'e', 'f', 'g']

    You may use unpacking to retrieve items instead of lists:

        >>> (head,), iterable = spy('abcdefg')
        >>> head
        'a'
        >>> (first, second), iterable = spy('abcdefg', 2)
        >>> first
        'a'
        >>> second
        'b'

    The number of items requested can be larger than the number of items in
    the iterable:

        >>> iterable = [1, 2, 3, 4, 5]
        >>> head, iterable = spy(iterable, 10)
        >>> head
        [1, 2, 3, 4, 5]
        >>> list(iterable)
        [1, 2, 3, 4, 5]

    """
    it = iter(iterable)
    head = take(n, it)

    return head.copy(), chain(head, it)


def interleave(*iterables):
    """Return a new iterable yielding from each iterable in turn,
    until the shortest is exhausted.

        >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8]))
        [1, 4, 6, 2, 5, 7]

    For a version that doesn't terminate after the shortest iterable is
    exhausted, see :func:`interleave_longest`.

    """
    return chain.from_iterable(zip(*iterables))


def interleave_longest(*iterables):
    """Return a new iterable yielding from each iterable in turn,
    skipping any that are exhausted.

        >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8]))
        [1, 4, 6, 2, 5, 7, 3, 8]

    This function produces the same output as :func:`roundrobin`, but may
    perform better for some inputs (in particular when the number of iterables
    is large).

    """
    i = chain.from_iterable(zip_longest(*iterables, fillvalue=_marker))
    return (x for x in i if x is not _marker)


def interleave_evenly(iterables, lengths=None):
    """
    Interleave multiple iterables so that their elements are evenly distributed
    throughout the output sequence.

    >>> iterables = [1, 2, 3, 4, 5], ['a', 'b']
    >>> list(interleave_evenly(iterables))
    [1, 2, 'a', 3, 4, 'b', 5]

    >>> iterables = [[1, 2, 3], [4, 5], [6, 7, 8]]
    >>> list(interleave_evenly(iterables))
    [1, 6, 4, 2, 7, 3, 8, 5]

    This function requires iterables of known length. Iterables without
    ``__len__()`` can be used by manually specifying lengths with *lengths*:

    >>> from itertools import combinations, repeat
    >>> iterables = [combinations(range(4), 2), ['a', 'b', 'c']]
    >>> lengths = [4 * (4 - 1) // 2, 3]
    >>> list(interleave_evenly(iterables, lengths=lengths))
    [(0, 1), (0, 2), 'a', (0, 3), (1, 2), 'b', (1, 3), (2, 3), 'c']

    Based on Bresenham's algorithm.
    """
    if lengths is None:
        try:
            lengths = [len(it) for it in iterables]
        except TypeError:
            raise ValueError(
                'Iterable lengths could not be determined automatically. '
                'Specify them with the lengths keyword.'
            )
    elif len(iterables) != len(lengths):
        raise ValueError('Mismatching number of iterables and lengths.')

    dims = len(lengths)

    # sort iterables by length, descending
    lengths_permute = sorted(
        range(dims), key=lambda i: lengths[i], reverse=True
    )
    lengths_desc = [lengths[i] for i in lengths_permute]
    iters_desc = [iter(iterables[i]) for i in lengths_permute]

    # the longest iterable is the primary one (Bresenham: the longest
    # distance along an axis)
    delta_primary, deltas_secondary = lengths_desc[0], lengths_desc[1:]
    iter_primary, iters_secondary = iters_desc[0], iters_desc[1:]
    errors = [delta_primary // dims] * len(deltas_secondary)

    to_yield = sum(lengths)
    while to_yield:
        yield next(iter_primary)
        to_yield -= 1
        # update errors for each secondary iterable
        errors = [e - delta for e, delta in zip(errors, deltas_secondary)]

        # those iterables for which the error is negative are yielded
        # ("diagonal step" in Bresenham)
        for i, e in enumerate(errors):
            if e < 0:
                yield next(iters_secondary[i])
                to_yield -= 1
                errors[i] += delta_primary


def collapse(iterable, base_type=None, levels=None):
    """Flatten an iterable with multiple levels of nesting (e.g., a list of
    lists of tuples) into non-iterable types.

        >>> iterable = [(1, 2), ([3, 4], [[5], [6]])]
        >>> list(collapse(iterable))
        [1, 2, 3, 4, 5, 6]

    Binary and text strings are not considered iterable and
    will not be collapsed.

    To avoid collapsing other types, specify *base_type*:

        >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']]
        >>> list(collapse(iterable, base_type=tuple))
        ['ab', ('cd', 'ef'), 'gh', 'ij']

    Specify *levels* to stop flattening after a certain level:

    >>> iterable = [('a', ['b']), ('c', ['d'])]
    >>> list(collapse(iterable))  # Fully flattened
    ['a', 'b', 'c', 'd']
    >>> list(collapse(iterable, levels=1))  # Only one level flattened
    ['a', ['b'], 'c', ['d']]

    """

    def walk(node, level):
        if (
            ((levels is not None) and (level > levels))
            or isinstance(node, (str, bytes))
            or ((base_type is not None) and isinstance(node, base_type))
        ):
            yield node
            return

        try:
            tree = iter(node)
        except TypeError:
            yield node
            return
        else:
            for child in tree:
                yield from walk(child, level + 1)

    yield from walk(iterable, 0)


def side_effect(func, iterable, chunk_size=None, before=None, after=None):
    """Invoke *func* on each item in *iterable* (or on each *chunk_size* group
    of items) before yielding the item.

    `func` must be a function that takes a single argument. Its return value
    will be discarded.

    *before* and *after* are optional functions that take no arguments. They
    will be executed before iteration starts and after it ends, respectively.

    `side_effect` can be used for logging, updating progress bars, or anything
    that is not functionally "pure."

    Emitting a status message:

        >>> from more_itertools import consume
        >>> func = lambda item: print('Received {}'.format(item))
        >>> consume(side_effect(func, range(2)))
        Received 0
        Received 1

    Operating on chunks of items:

        >>> pair_sums = []
        >>> func = lambda chunk: pair_sums.append(sum(chunk))
        >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2))
        [0, 1, 2, 3, 4, 5]
        >>> list(pair_sums)
        [1, 5, 9]

    Writing to a file-like object:

        >>> from io import StringIO
        >>> from more_itertools import consume
        >>> f = StringIO()
        >>> func = lambda x: print(x, file=f)
        >>> before = lambda: print(u'HEADER', file=f)
        >>> after = f.close
        >>> it = [u'a', u'b', u'c']
        >>> consume(side_effect(func, it, before=before, after=after))
        >>> f.closed
        True

    """
    try:
        if before is not None:
            before()

        if chunk_size is None:
            for item in iterable:
                func(item)
                yield item
        else:
            for chunk in chunked(iterable, chunk_size):
                func(chunk)
                yield from chunk
    finally:
        if after is not None:
            after()


def sliced(seq, n, strict=False):
    """Yield slices of length *n* from the sequence *seq*.

    >>> list(sliced((1, 2, 3, 4, 5, 6), 3))
    [(1, 2, 3), (4, 5, 6)]

    By the default, the last yielded slice will have fewer than *n* elements
    if the length of *seq* is not divisible by *n*:

    >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3))
    [(1, 2, 3), (4, 5, 6), (7, 8)]

    If the length of *seq* is not divisible by *n* and *strict* is
    ``True``, then ``ValueError`` will be raised before the last
    slice is yielded.

    This function will only work for iterables that support slicing.
    For non-sliceable iterables, see :func:`chunked`.

    """
    iterator = takewhile(len, (seq[i : i + n] for i in count(0, n)))
    if strict:

        def ret():
            for _slice in iterator:
                if len(_slice) != n:
                    raise ValueError("seq is not divisible by n.")
                yield _slice

        return iter(ret())
    else:
        return iterator


def split_at(iterable, pred, maxsplit=-1, keep_separator=False):
    """Yield lists of items from *iterable*, where each list is delimited by
    an item where callable *pred* returns ``True``.

        >>> list(split_at('abcdcba', lambda x: x == 'b'))
        [['a'], ['c', 'd', 'c'], ['a']]

        >>> list(split_at(range(10), lambda n: n % 2 == 1))
        [[0], [2], [4], [6], [8], []]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2))
        [[0], [2], [4, 5, 6, 7, 8, 9]]

    By default, the delimiting items are not included in the output.
    To include them, set *keep_separator* to ``True``.

        >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True))
        [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']]

    """
    if maxsplit == 0:
        yield list(iterable)
        return

    buf = []
    it = iter(iterable)
    for item in it:
        if pred(item):
            yield buf
            if keep_separator:
                yield [item]
            if maxsplit == 1:
                yield list(it)
                return
            buf = []
            maxsplit -= 1
        else:
            buf.append(item)
    yield buf


def split_before(iterable, pred, maxsplit=-1):
    """Yield lists of items from *iterable*, where each list ends just before
    an item for which callable *pred* returns ``True``:

        >>> list(split_before('OneTwo', lambda s: s.isupper()))
        [['O', 'n', 'e'], ['T', 'w', 'o']]

        >>> list(split_before(range(10), lambda n: n % 3 == 0))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]]
    """
    if maxsplit == 0:
        yield list(iterable)
        return

    buf = []
    it = iter(iterable)
    for item in it:
        if pred(item) and buf:
            yield buf
            if maxsplit == 1:
                yield [item] + list(it)
                return
            buf = []
            maxsplit -= 1
        buf.append(item)
    if buf:
        yield buf


def split_after(iterable, pred, maxsplit=-1):
    """Yield lists of items from *iterable*, where each list ends with an
    item where callable *pred* returns ``True``:

        >>> list(split_after('one1two2', lambda s: s.isdigit()))
        [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']]

        >>> list(split_after(range(10), lambda n: n % 3 == 0))
        [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2))
        [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]]

    """
    if maxsplit == 0:
        yield list(iterable)
        return

    buf = []
    it = iter(iterable)
    for item in it:
        buf.append(item)
        if pred(item) and buf:
            yield buf
            if maxsplit == 1:
                buf = list(it)
                if buf:
                    yield buf
                return
            buf = []
            maxsplit -= 1
    if buf:
        yield buf


def split_when(iterable, pred, maxsplit=-1):
    """Split *iterable* into pieces based on the output of *pred*.
    *pred* should be a function that takes successive pairs of items and
    returns ``True`` if the iterable should be split in between them.

    For example, to find runs of increasing numbers, split the iterable when
    element ``i`` is larger than element ``i + 1``:

        >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y))
        [[1, 2, 3, 3], [2, 5], [2, 4], [2]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2],
        ...                 lambda x, y: x > y, maxsplit=2))
        [[1, 2, 3, 3], [2, 5], [2, 4, 2]]

    """
    if maxsplit == 0:
        yield list(iterable)
        return

    it = iter(iterable)
    try:
        cur_item = next(it)
    except StopIteration:
        return

    buf = [cur_item]
    for next_item in it:
        if pred(cur_item, next_item):
            yield buf
            if maxsplit == 1:
                yield [next_item] + list(it)
                return
            buf = []
            maxsplit -= 1

        buf.append(next_item)
        cur_item = next_item

    yield buf


def split_into(iterable, sizes):
    """Yield a list of sequential items from *iterable* of length 'n' for each
    integer 'n' in *sizes*.

        >>> list(split_into([1,2,3,4,5,6], [1,2,3]))
        [[1], [2, 3], [4, 5, 6]]

    If the sum of *sizes* is smaller than the length of *iterable*, then the
    remaining items of *iterable* will not be returned.

        >>> list(split_into([1,2,3,4,5,6], [2,3]))
        [[1, 2], [3, 4, 5]]

    If the sum of *sizes* is larger than the length of *iterable*, fewer items
    will be returned in the iteration that overruns *iterable* and further
    lists will be empty:

        >>> list(split_into([1,2,3,4], [1,2,3,4]))
        [[1], [2, 3], [4], []]

    When a ``None`` object is encountered in *sizes*, the returned list will
    contain items up to the end of *iterable* the same way that itertools.slice
    does:

        >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None]))
        [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]]

    :func:`split_into` can be useful for grouping a series of items where the
    sizes of the groups are not uniform. An example would be where in a row
    from a table, multiple columns represent elements of the same feature
    (e.g. a point represented by x,y,z) but, the format is not the same for
    all columns.
    """
    # convert the iterable argument into an iterator so its contents can
    # be consumed by islice in case it is a generator
    it = iter(iterable)

    for size in sizes:
        if size is None:
            yield list(it)
            return
        else:
            yield list(islice(it, size))


def padded(iterable, fillvalue=None, n=None, next_multiple=False):
    """Yield the elements from *iterable*, followed by *fillvalue*, such that
    at least *n* items are emitted.

        >>> list(padded([1, 2, 3], '?', 5))
        [1, 2, 3, '?', '?']

    If *next_multiple* is ``True``, *fillvalue* will be emitted until the
    number of items emitted is a multiple of *n*::

        >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True))
        [1, 2, 3, 4, None, None]

    If *n* is ``None``, *fillvalue* will be emitted indefinitely.

    """
    it = iter(iterable)
    if n is None:
        yield from chain(it, repeat(fillvalue))
    elif n < 1:
        raise ValueError('n must be at least 1')
    else:
        item_count = 0
        for item in it:
            yield item
            item_count += 1

        remaining = (n - item_count) % n if next_multiple else n - item_count
        for _ in range(remaining):
            yield fillvalue


def repeat_each(iterable, n=2):
    """Repeat each element in *iterable* *n* times.

    >>> list(repeat_each('ABC', 3))
    ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C']
    """
    return chain.from_iterable(map(repeat, iterable, repeat(n)))


def repeat_last(iterable, default=None):
    """After the *iterable* is exhausted, keep yielding its last element.

        >>> list(islice(repeat_last(range(3)), 5))
        [0, 1, 2, 2, 2]

    If the iterable is empty, yield *default* forever::

        >>> list(islice(repeat_last(range(0), 42), 5))
        [42, 42, 42, 42, 42]

    """
    item = _marker
    for item in iterable:
        yield item
    final = default if item is _marker else item
    yield from repeat(final)


def distribute(n, iterable):
    """Distribute the items from *iterable* among *n* smaller iterables.

        >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6])
        >>> list(group_1)
        [1, 3, 5]
        >>> list(group_2)
        [2, 4, 6]

    If the length of *iterable* is not evenly divisible by *n*, then the
    length of the returned iterables will not be identical:

        >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7])
        >>> [list(c) for c in children]
        [[1, 4, 7], [2, 5], [3, 6]]

    If the length of *iterable* is smaller than *n*, then the last returned
    iterables will be empty:

        >>> children = distribute(5, [1, 2, 3])
        >>> [list(c) for c in children]
        [[1], [2], [3], [], []]

    This function uses :func:`itertools.tee` and may require significant
    storage. If you need the order items in the smaller iterables to match the
    original iterable, see :func:`divide`.

    """
    if n < 1:
        raise ValueError('n must be at least 1')

    children = tee(iterable, n)
    return [islice(it, index, None, n) for index, it in enumerate(children)]


def stagger(iterable, offsets=(-1, 0, 1), longest=False, fillvalue=None):
    """Yield tuples whose elements are offset from *iterable*.
    The amount by which the `i`-th item in each tuple is offset is given by
    the `i`-th item in *offsets*.

        >>> list(stagger([0, 1, 2, 3]))
        [(None, 0, 1), (0, 1, 2), (1, 2, 3)]
        >>> list(stagger(range(8), offsets=(0, 2, 4)))
        [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)]

    By default, the sequence will end when the final element of a tuple is the
    last item in the iterable. To continue until the first element of a tuple
    is the last item in the iterable, set *longest* to ``True``::

        >>> list(stagger([0, 1, 2, 3], longest=True))
        [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)]

    By default, ``None`` will be used to replace offsets beyond the end of the
    sequence. Specify *fillvalue* to use some other value.

    """
    children = tee(iterable, len(offsets))

    return zip_offset(
        *children, offsets=offsets, longest=longest, fillvalue=fillvalue
    )


def zip_equal(*iterables):
    """``zip`` the input *iterables* together, but raise
    ``UnequalIterablesError`` if they aren't all the same length.

        >>> it_1 = range(3)
        >>> it_2 = iter('abc')
        >>> list(zip_equal(it_1, it_2))
        [(0, 'a'), (1, 'b'), (2, 'c')]

        >>> it_1 = range(3)
        >>> it_2 = iter('abcd')
        >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        more_itertools.more.UnequalIterablesError: Iterables have different
        lengths

    """
    if hexversion >= 0x30A00A6:
        warnings.warn(
            (
                'zip_equal will be removed in a future version of '
                'more-itertools. Use the builtin zip function with '
                'strict=True instead.'
            ),
            DeprecationWarning,
        )

    return _zip_equal(*iterables)


def zip_offset(*iterables, offsets, longest=False, fillvalue=None):
    """``zip`` the input *iterables* together, but offset the `i`-th iterable
    by the `i`-th item in *offsets*.

        >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1)))
        [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')]

    This can be used as a lightweight alternative to SciPy or pandas to analyze
    data sets in which some series have a lead or lag relationship.

    By default, the sequence will end when the shortest iterable is exhausted.
    To continue until the longest iterable is exhausted, set *longest* to
    ``True``.

        >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True))
        [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')]

    By default, ``None`` will be used to replace offsets beyond the end of the
    sequence. Specify *fillvalue* to use some other value.

    """
    if len(iterables) != len(offsets):
        raise ValueError("Number of iterables and offsets didn't match")

    staggered = []
    for it, n in zip(iterables, offsets):
        if n < 0:
            staggered.append(chain(repeat(fillvalue, -n), it))
        elif n > 0:
            staggered.append(islice(it, n, None))
        else:
            staggered.append(it)

    if longest:
        return zip_longest(*staggered, fillvalue=fillvalue)

    return zip(*staggered)


def sort_together(iterables, key_list=(0,), key=None, reverse=False):
    """Return the input iterables sorted together, with *key_list* as the
    priority for sorting. All iterables are trimmed to the length of the
    shortest one.

    This can be used like the sorting function in a spreadsheet. If each
    iterable represents a column of data, the key list determines which
    columns are used for sorting.

    By default, all iterables are sorted using the ``0``-th iterable::

        >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')]
        >>> sort_together(iterables)
        [(1, 2, 3, 4), ('d', 'c', 'b', 'a')]

    Set a different key list to sort according to another iterable.
    Specifying multiple keys dictates how ties are broken::

        >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')]
        >>> sort_together(iterables, key_list=(1, 2))
        [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')]

    To sort by a function of the elements of the iterable, pass a *key*
    function. Its arguments are the elements of the iterables corresponding to
    the key list::

        >>> names = ('a', 'b', 'c')
        >>> lengths = (1, 2, 3)
        >>> widths = (5, 2, 1)
        >>> def area(length, width):
        ...     return length * width
        >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area)
        [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)]

    Set *reverse* to ``True`` to sort in descending order.

        >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True)
        [(3, 2, 1), ('a', 'b', 'c')]

    """
    if key is None:
        # if there is no key function, the key argument to sorted is an
        # itemgetter
        key_argument = itemgetter(*key_list)
    else:
        # if there is a key function, call it with the items at the offsets
        # specified by the key function as arguments
        key_list = list(key_list)
        if len(key_list) == 1:
            # if key_list contains a single item, pass the item at that offset
            # as the only argument to the key function
            key_offset = key_list[0]
            key_argument = lambda zipped_items: key(zipped_items[key_offset])
        else:
            # if key_list contains multiple items, use itemgetter to return a
            # tuple of items, which we pass as *args to the key function
            get_key_items = itemgetter(*key_list)
            key_argument = lambda zipped_items: key(
                *get_key_items(zipped_items)
            )

    return list(
        zip(*sorted(zip(*iterables), key=key_argument, reverse=reverse))
    )


def unzip(iterable):
    """The inverse of :func:`zip`, this function disaggregates the elements
    of the zipped *iterable*.

    The ``i``-th iterable contains the ``i``-th element from each element
    of the zipped iterable. The first element is used to determine the
    length of the remaining elements.

        >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
        >>> letters, numbers = unzip(iterable)
        >>> list(letters)
        ['a', 'b', 'c', 'd']
        >>> list(numbers)
        [1, 2, 3, 4]

    This is similar to using ``zip(*iterable)``, but it avoids reading
    *iterable* into memory. Note, however, that this function uses
    :func:`itertools.tee` and thus may require significant storage.

    """
    head, iterable = spy(iter(iterable))
    if not head:
        # empty iterable, e.g. zip([], [], [])
        return ()
    # spy returns a one-length iterable as head
    head = head[0]
    iterables = tee(iterable, len(head))

    def itemgetter(i):
        def getter(obj):
            try:
                return obj[i]
            except IndexError:
                # basically if we have an iterable like
                # iter([(1, 2, 3), (4, 5), (6,)])
                # the second unzipped iterable would fail at the third tuple
                # since it would try to access tup[1]
                # same with the third unzipped iterable and the second tuple
                # to support these "improperly zipped" iterables,
                # we create a custom itemgetter
                # which just stops the unzipped iterables
                # at first length mismatch
                raise StopIteration

        return getter

    return tuple(map(itemgetter(i), it) for i, it in enumerate(iterables))


def divide(n, iterable):
    """Divide the elements from *iterable* into *n* parts, maintaining
    order.

        >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6])
        >>> list(group_1)
        [1, 2, 3]
        >>> list(group_2)
        [4, 5, 6]

    If the length of *iterable* is not evenly divisible by *n*, then the
    length of the returned iterables will not be identical:

        >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7])
        >>> [list(c) for c in children]
        [[1, 2, 3], [4, 5], [6, 7]]

    If the length of the iterable is smaller than n, then the last returned
    iterables will be empty:

        >>> children = divide(5, [1, 2, 3])
        >>> [list(c) for c in children]
        [[1], [2], [3], [], []]

    This function will exhaust the iterable before returning and may require
    significant storage. If order is not important, see :func:`distribute`,
    which does not first pull the iterable into memory.

    """
    if n < 1:
        raise ValueError('n must be at least 1')

    try:
        iterable[:0]
    except TypeError:
        seq = tuple(iterable)
    else:
        seq = iterable

    q, r = divmod(len(seq), n)

    ret = []
    stop = 0
    for i in range(1, n + 1):
        start = stop
        stop += q + 1 if i <= r else q
        ret.append(iter(seq[start:stop]))

    return ret


def always_iterable(obj, base_type=(str, bytes)):
    """If *obj* is iterable, return an iterator over its items::

        >>> obj = (1, 2, 3)
        >>> list(always_iterable(obj))
        [1, 2, 3]

    If *obj* is not iterable, return a one-item iterable containing *obj*::

        >>> obj = 1
        >>> list(always_iterable(obj))
        [1]

    If *obj* is ``None``, return an empty iterable:

        >>> obj = None
        >>> list(always_iterable(None))
        []

    By default, binary and text strings are not considered iterable::

        >>> obj = 'foo'
        >>> list(always_iterable(obj))
        ['foo']

    If *base_type* is set, objects for which ``isinstance(obj, base_type)``
    returns ``True`` won't be considered iterable.

        >>> obj = {'a': 1}
        >>> list(always_iterable(obj))  # Iterate over the dict's keys
        ['a']
        >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
        [{'a': 1}]

    Set *base_type* to ``None`` to avoid any special handling and treat objects
    Python considers iterable as iterable:

        >>> obj = 'foo'
        >>> list(always_iterable(obj, base_type=None))
        ['f', 'o', 'o']
    """
    if obj is None:
        return iter(())

    if (base_type is not None) and isinstance(obj, base_type):
        return iter((obj,))

    try:
        return iter(obj)
    except TypeError:
        return iter((obj,))


def adjacent(predicate, iterable, distance=1):
    """Return an iterable over `(bool, item)` tuples where the `item` is
    drawn from *iterable* and the `bool` indicates whether
    that item satisfies the *predicate* or is adjacent to an item that does.

    For example, to find whether items are adjacent to a ``3``::

        >>> list(adjacent(lambda x: x == 3, range(6)))
        [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)]

    Set *distance* to change what counts as adjacent. For example, to find
    whether items are two places away from a ``3``:

        >>> list(adjacent(lambda x: x == 3, range(6), distance=2))
        [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)]

    This is useful for contextualizing the results of a search function.
    For example, a code comparison tool might want to identify lines that
    have changed, but also surrounding lines to give the viewer of the diff
    context.

    The predicate function will only be called once for each item in the
    iterable.

    See also :func:`groupby_transform`, which can be used with this function
    to group ranges of items with the same `bool` value.

    """
    # Allow distance=0 mainly for testing that it reproduces results with map()
    if distance < 0:
        raise ValueError('distance must be at least 0')

    i1, i2 = tee(iterable)
    padding = [False] * distance
    selected = chain(padding, map(predicate, i1), padding)
    adjacent_to_selected = map(any, windowed(selected, 2 * distance + 1))
    return zip(adjacent_to_selected, i2)


def groupby_transform(iterable, keyfunc=None, valuefunc=None, reducefunc=None):
    """An extension of :func:`itertools.groupby` that can apply transformations
    to the grouped data.

    * *keyfunc* is a function computing a key value for each item in *iterable*
    * *valuefunc* is a function that transforms the individual items from
      *iterable* after grouping
    * *reducefunc* is a function that transforms each group of items

    >>> iterable = 'aAAbBBcCC'
    >>> keyfunc = lambda k: k.upper()
    >>> valuefunc = lambda v: v.lower()
    >>> reducefunc = lambda g: ''.join(g)
    >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc))
    [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')]

    Each optional argument defaults to an identity function if not specified.

    :func:`groupby_transform` is useful when grouping elements of an iterable
    using a separate iterable as the key. To do this, :func:`zip` the iterables
    and pass a *keyfunc* that extracts the first element and a *valuefunc*
    that extracts the second element::

        >>> from operator import itemgetter
        >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3]
        >>> values = 'abcdefghi'
        >>> iterable = zip(keys, values)
        >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1))
        >>> [(k, ''.join(g)) for k, g in grouper]
        [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')]

    Note that the order of items in the iterable is significant.
    Only adjacent items are grouped together, so if you don't want any
    duplicate groups, you should sort the iterable by the key function.

    """
    ret = groupby(iterable, keyfunc)
    if valuefunc:
        ret = ((k, map(valuefunc, g)) for k, g in ret)
    if reducefunc:
        ret = ((k, reducefunc(g)) for k, g in ret)

    return ret


class numeric_range(abc.Sequence, abc.Hashable):
    """An extension of the built-in ``range()`` function whose arguments can
    be any orderable numeric type.

    With only *stop* specified, *start* defaults to ``0`` and *step*
    defaults to ``1``. The output items will match the type of *stop*:

        >>> list(numeric_range(3.5))
        [0.0, 1.0, 2.0, 3.0]

    With only *start* and *stop* specified, *step* defaults to ``1``. The
    output items will match the type of *start*:

        >>> from decimal import Decimal
        >>> start = Decimal('2.1')
        >>> stop = Decimal('5.1')
        >>> list(numeric_range(start, stop))
        [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')]

    With *start*, *stop*, and *step*  specified the output items will match
    the type of ``start + step``:

        >>> from fractions import Fraction
        >>> start = Fraction(1, 2)  # Start at 1/2
        >>> stop = Fraction(5, 2)  # End at 5/2
        >>> step = Fraction(1, 2)  # Count by 1/2
        >>> list(numeric_range(start, stop, step))
        [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)]

    If *step* is zero, ``ValueError`` is raised. Negative steps are supported:

        >>> list(numeric_range(3, -1, -1.0))
        [3.0, 2.0, 1.0, 0.0]

    Be aware of the limitations of floating point numbers; the representation
    of the yielded numbers may be surprising.

    ``datetime.datetime`` objects can be used for *start* and *stop*, if *step*
    is a ``datetime.timedelta`` object:

        >>> import datetime
        >>> start = datetime.datetime(2019, 1, 1)
        >>> stop = datetime.datetime(2019, 1, 3)
        >>> step = datetime.timedelta(days=1)
        >>> items = iter(numeric_range(start, stop, step))
        >>> next(items)
        datetime.datetime(2019, 1, 1, 0, 0)
        >>> next(items)
        datetime.datetime(2019, 1, 2, 0, 0)

    """

    _EMPTY_HASH = hash(range(0, 0))

    def __init__(self, *args):
        argc = len(args)
        if argc == 1:
            (self._stop,) = args
            self._start = type(self._stop)(0)
            self._step = type(self._stop - self._start)(1)
        elif argc == 2:
            self._start, self._stop = args
            self._step = type(self._stop - self._start)(1)
        elif argc == 3:
            self._start, self._stop, self._step = args
        elif argc == 0:
            raise TypeError(
                'numeric_range expected at least '
                '1 argument, got {}'.format(argc)
            )
        else:
            raise TypeError(
                'numeric_range expected at most '
                '3 arguments, got {}'.format(argc)
            )

        self._zero = type(self._step)(0)
        if self._step == self._zero:
            raise ValueError('numeric_range() arg 3 must not be zero')
        self._growing = self._step > self._zero
        self._init_len()

    def __bool__(self):
        if self._growing:
            return self._start < self._stop
        else:
            return self._start > self._stop

    def __contains__(self, elem):
        if self._growing:
            if self._start <= elem < self._stop:
                return (elem - self._start) % self._step == self._zero
        else:
            if self._start >= elem > self._stop:
                return (self._start - elem) % (-self._step) == self._zero

        return False

    def __eq__(self, other):
        if isinstance(other, numeric_range):
            empty_self = not bool(self)
            empty_other = not bool(other)
            if empty_self or empty_other:
                return empty_self and empty_other  # True if both empty
            else:
                return (
                    self._start == other._start
                    and self._step == other._step
                    and self._get_by_index(-1) == other._get_by_index(-1)
                )
        else:
            return False

    def __getitem__(self, key):
        if isinstance(key, int):
            return self._get_by_index(key)
        elif isinstance(key, slice):
            step = self._step if key.step is None else key.step * self._step

            if key.start is None or key.start <= -self._len:
                start = self._start
            elif key.start >= self._len:
                start = self._stop
            else:  # -self._len < key.start < self._len
                start = self._get_by_index(key.start)

            if key.stop is None or key.stop >= self._len:
                stop = self._stop
            elif key.stop <= -self._len:
                stop = self._start
            else:  # -self._len < key.stop < self._len
                stop = self._get_by_index(key.stop)

            return numeric_range(start, stop, step)
        else:
            raise TypeError(
                'numeric range indices must be '
                'integers or slices, not {}'.format(type(key).__name__)
            )

    def __hash__(self):
        if self:
            return hash((self._start, self._get_by_index(-1), self._step))
        else:
            return self._EMPTY_HASH

    def __iter__(self):
        values = (self._start + (n * self._step) for n in count())
        if self._growing:
            return takewhile(partial(gt, self._stop), values)
        else:
            return takewhile(partial(lt, self._stop), values)

    def __len__(self):
        return self._len

    def _init_len(self):
        if self._growing:
            start = self._start
            stop = self._stop
            step = self._step
        else:
            start = self._stop
            stop = self._start
            step = -self._step
        distance = stop - start
        if distance <= self._zero:
            self._len = 0
        else:  # distance > 0 and step > 0: regular euclidean division
            q, r = divmod(distance, step)
            self._len = int(q) + int(r != self._zero)

    def __reduce__(self):
        return numeric_range, (self._start, self._stop, self._step)

    def __repr__(self):
        if self._step == 1:
            return "numeric_range({}, {})".format(
                repr(self._start), repr(self._stop)
            )
        else:
            return "numeric_range({}, {}, {})".format(
                repr(self._start), repr(self._stop), repr(self._step)
            )

    def __reversed__(self):
        return iter(
            numeric_range(
                self._get_by_index(-1), self._start - self._step, -self._step
            )
        )

    def count(self, value):
        return int(value in self)

    def index(self, value):
        if self._growing:
            if self._start <= value < self._stop:
                q, r = divmod(value - self._start, self._step)
                if r == self._zero:
                    return int(q)
        else:
            if self._start >= value > self._stop:
                q, r = divmod(self._start - value, -self._step)
                if r == self._zero:
                    return int(q)

        raise ValueError("{} is not in numeric range".format(value))

    def _get_by_index(self, i):
        if i < 0:
            i += self._len
        if i < 0 or i >= self._len:
            raise IndexError("numeric range object index out of range")
        return self._start + i * self._step


def count_cycle(iterable, n=None):
    """Cycle through the items from *iterable* up to *n* times, yielding
    the number of completed cycles along with each item. If *n* is omitted the
    process repeats indefinitely.

    >>> list(count_cycle('AB', 3))
    [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')]

    """
    iterable = tuple(iterable)
    if not iterable:
        return iter(())
    counter = count() if n is None else range(n)
    return ((i, item) for i in counter for item in iterable)


def mark_ends(iterable):
    """Yield 3-tuples of the form ``(is_first, is_last, item)``.

    >>> list(mark_ends('ABC'))
    [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')]

    Use this when looping over an iterable to take special action on its first
    and/or last items:

    >>> iterable = ['Header', 100, 200, 'Footer']
    >>> total = 0
    >>> for is_first, is_last, item in mark_ends(iterable):
    ...     if is_first:
    ...         continue  # Skip the header
    ...     if is_last:
    ...         continue  # Skip the footer
    ...     total += item
    >>> print(total)
    300
    """
    it = iter(iterable)

    try:
        b = next(it)
    except StopIteration:
        return

    try:
        for i in count():
            a = b
            b = next(it)
            yield i == 0, False, a

    except StopIteration:
        yield i == 0, True, a


def locate(iterable, pred=bool, window_size=None):
    """Yield the index of each item in *iterable* for which *pred* returns
    ``True``.

    *pred* defaults to :func:`bool`, which will select truthy items:

        >>> list(locate([0, 1, 1, 0, 1, 0, 0]))
        [1, 2, 4]

    Set *pred* to a custom function to, e.g., find the indexes for a particular
    item.

        >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b'))
        [1, 3]

    If *window_size* is given, then the *pred* function will be called with
    that many items. This enables searching for sub-sequences:

        >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
        >>> pred = lambda *args: args == (1, 2, 3)
        >>> list(locate(iterable, pred=pred, window_size=3))
        [1, 5, 9]

    Use with :func:`seekable` to find indexes and then retrieve the associated
    items:

        >>> from itertools import count
        >>> from more_itertools import seekable
        >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count())
        >>> it = seekable(source)
        >>> pred = lambda x: x > 100
        >>> indexes = locate(it, pred=pred)
        >>> i = next(indexes)
        >>> it.seek(i)
        >>> next(it)
        106

    """
    if window_size is None:
        return compress(count(), map(pred, iterable))

    if window_size < 1:
        raise ValueError('window size must be at least 1')

    it = windowed(iterable, window_size, fillvalue=_marker)
    return compress(count(), starmap(pred, it))


def longest_common_prefix(iterables):
    """Yield elements of the longest common prefix amongst given *iterables*.

    >>> ''.join(longest_common_prefix(['abcd', 'abc', 'abf']))
    'ab'

    """
    return (c[0] for c in takewhile(all_equal, zip(*iterables)))


def lstrip(iterable, pred):
    """Yield the items from *iterable*, but strip any from the beginning
    for which *pred* returns ``True``.

    For example, to remove a set of items from the start of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(lstrip(iterable, pred))
        [1, 2, None, 3, False, None]

    This function is analogous to to :func:`str.lstrip`, and is essentially
    an wrapper for :func:`itertools.dropwhile`.

    """
    return dropwhile(pred, iterable)


def rstrip(iterable, pred):
    """Yield the items from *iterable*, but strip any from the end
    for which *pred* returns ``True``.

    For example, to remove a set of items from the end of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(rstrip(iterable, pred))
        [None, False, None, 1, 2, None, 3]

    This function is analogous to :func:`str.rstrip`.

    """
    cache = []
    cache_append = cache.append
    cache_clear = cache.clear
    for x in iterable:
        if pred(x):
            cache_append(x)
        else:
            yield from cache
            cache_clear()
            yield x


def strip(iterable, pred):
    """Yield the items from *iterable*, but strip any from the
    beginning and end for which *pred* returns ``True``.

    For example, to remove a set of items from both ends of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(strip(iterable, pred))
        [1, 2, None, 3]

    This function is analogous to :func:`str.strip`.

    """
    return rstrip(lstrip(iterable, pred), pred)


class islice_extended:
    """An extension of :func:`itertools.islice` that supports negative values
    for *stop*, *start*, and *step*.

        >>> iterable = iter('abcdefgh')
        >>> list(islice_extended(iterable, -4, -1))
        ['e', 'f', 'g']

    Slices with negative values require some caching of *iterable*, but this
    function takes care to minimize the amount of memory required.

    For example, you can use a negative step with an infinite iterator:

        >>> from itertools import count
        >>> list(islice_extended(count(), 110, 99, -2))
        [110, 108, 106, 104, 102, 100]

    You can also use slice notation directly:

        >>> iterable = map(str, count())
        >>> it = islice_extended(iterable)[10:20:2]
        >>> list(it)
        ['10', '12', '14', '16', '18']

    """

    def __init__(self, iterable, *args):
        it = iter(iterable)
        if args:
            self._iterable = _islice_helper(it, slice(*args))
        else:
            self._iterable = it

    def __iter__(self):
        return self

    def __next__(self):
        return next(self._iterable)

    def __getitem__(self, key):
        if isinstance(key, slice):
            return islice_extended(_islice_helper(self._iterable, key))

        raise TypeError('islice_extended.__getitem__ argument must be a slice')


def _islice_helper(it, s):
    start = s.start
    stop = s.stop
    if s.step == 0:
        raise ValueError('step argument must be a non-zero integer or None.')
    step = s.step or 1

    if step > 0:
        start = 0 if (start is None) else start

        if start < 0:
            # Consume all but the last -start items
            cache = deque(enumerate(it, 1), maxlen=-start)
            len_iter = cache[-1][0] if cache else 0

            # Adjust start to be positive
            i = max(len_iter + start, 0)

            # Adjust stop to be positive
            if stop is None:
                j = len_iter
            elif stop >= 0:
                j = min(stop, len_iter)
            else:
                j = max(len_iter + stop, 0)

            # Slice the cache
            n = j - i
            if n <= 0:
                return

            for index, item in islice(cache, 0, n, step):
                yield item
        elif (stop is not None) and (stop < 0):
            # Advance to the start position
            next(islice(it, start, start), None)

            # When stop is negative, we have to carry -stop items while
            # iterating
            cache = deque(islice(it, -stop), maxlen=-stop)

            for index, item in enumerate(it):
                cached_item = cache.popleft()
                if index % step == 0:
                    yield cached_item
                cache.append(item)
        else:
            # When both start and stop are positive we have the normal case
            yield from islice(it, start, stop, step)
    else:
        start = -1 if (start is None) else start

        if (stop is not None) and (stop < 0):
            # Consume all but the last items
            n = -stop - 1
            cache = deque(enumerate(it, 1), maxlen=n)
            len_iter = cache[-1][0] if cache else 0

            # If start and stop are both negative they are comparable and
            # we can just slice. Otherwise we can adjust start to be negative
            # and then slice.
            if start < 0:
                i, j = start, stop
            else:
                i, j = min(start - len_iter, -1), None

            for index, item in list(cache)[i:j:step]:
                yield item
        else:
            # Advance to the stop position
            if stop is not None:
                m = stop + 1
                next(islice(it, m, m), None)

            # stop is positive, so if start is negative they are not comparable
            # and we need the rest of the items.
            if start < 0:
                i = start
                n = None
            # stop is None and start is positive, so we just need items up to
            # the start index.
            elif stop is None:
                i = None
                n = start + 1
            # Both stop and start are positive, so they are comparable.
            else:
                i = None
                n = start - stop
                if n <= 0:
                    return

            cache = list(islice(it, n))

            yield from cache[i::step]


def always_reversible(iterable):
    """An extension of :func:`reversed` that supports all iterables, not
    just those which implement the ``Reversible`` or ``Sequence`` protocols.

        >>> print(*always_reversible(x for x in range(3)))
        2 1 0

    If the iterable is already reversible, this function returns the
    result of :func:`reversed()`. If the iterable is not reversible,
    this function will cache the remaining items in the iterable and
    yield them in reverse order, which may require significant storage.
    """
    try:
        return reversed(iterable)
    except TypeError:
        return reversed(list(iterable))


def consecutive_groups(iterable, ordering=lambda x: x):
    """Yield groups of consecutive items using :func:`itertools.groupby`.
    The *ordering* function determines whether two items are adjacent by
    returning their position.

    By default, the ordering function is the identity function. This is
    suitable for finding runs of numbers:

        >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40]
        >>> for group in consecutive_groups(iterable):
        ...     print(list(group))
        [1]
        [10, 11, 12]
        [20]
        [30, 31, 32, 33]
        [40]

    For finding runs of adjacent letters, try using the :meth:`index` method
    of a string of letters:

        >>> from string import ascii_lowercase
        >>> iterable = 'abcdfgilmnop'
        >>> ordering = ascii_lowercase.index
        >>> for group in consecutive_groups(iterable, ordering):
        ...     print(list(group))
        ['a', 'b', 'c', 'd']
        ['f', 'g']
        ['i']
        ['l', 'm', 'n', 'o', 'p']

    Each group of consecutive items is an iterator that shares it source with
    *iterable*. When an an output group is advanced, the previous group is
    no longer available unless its elements are copied (e.g., into a ``list``).

        >>> iterable = [1, 2, 11, 12, 21, 22]
        >>> saved_groups = []
        >>> for group in consecutive_groups(iterable):
        ...     saved_groups.append(list(group))  # Copy group elements
        >>> saved_groups
        [[1, 2], [11, 12], [21, 22]]

    """
    for k, g in groupby(
        enumerate(iterable), key=lambda x: x[0] - ordering(x[1])
    ):
        yield map(itemgetter(1), g)


def difference(iterable, func=sub, *, initial=None):
    """This function is the inverse of :func:`itertools.accumulate`. By default
    it will compute the first difference of *iterable* using
    :func:`operator.sub`:

        >>> from itertools import accumulate
        >>> iterable = accumulate([0, 1, 2, 3, 4])  # produces 0, 1, 3, 6, 10
        >>> list(difference(iterable))
        [0, 1, 2, 3, 4]

    *func* defaults to :func:`operator.sub`, but other functions can be
    specified. They will be applied as follows::

        A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ...

    For example, to do progressive division:

        >>> iterable = [1, 2, 6, 24, 120]
        >>> func = lambda x, y: x // y
        >>> list(difference(iterable, func))
        [1, 2, 3, 4, 5]

    If the *initial* keyword is set, the first element will be skipped when
    computing successive differences.

        >>> it = [10, 11, 13, 16]  # from accumulate([1, 2, 3], initial=10)
        >>> list(difference(it, initial=10))
        [1, 2, 3]

    """
    a, b = tee(iterable)
    try:
        first = [next(b)]
    except StopIteration:
        return iter([])

    if initial is not None:
        first = []

    return chain(first, map(func, b, a))


class SequenceView(Sequence):
    """Return a read-only view of the sequence object *target*.

    :class:`SequenceView` objects are analogous to Python's built-in
    "dictionary view" types. They provide a dynamic view of a sequence's items,
    meaning that when the sequence updates, so does the view.

        >>> seq = ['0', '1', '2']
        >>> view = SequenceView(seq)
        >>> view
        SequenceView(['0', '1', '2'])
        >>> seq.append('3')
        >>> view
        SequenceView(['0', '1', '2', '3'])

    Sequence views support indexing, slicing, and length queries. They act
    like the underlying sequence, except they don't allow assignment:

        >>> view[1]
        '1'
        >>> view[1:-1]
        ['1', '2']
        >>> len(view)
        4

    Sequence views are useful as an alternative to copying, as they don't
    require (much) extra storage.

    """

    def __init__(self, target):
        if not isinstance(target, Sequence):
            raise TypeError
        self._target = target

    def __getitem__(self, index):
        return self._target[index]

    def __len__(self):
        return len(self._target)

    def __repr__(self):
        return '{}({})'.format(self.__class__.__name__, repr(self._target))


class seekable:
    """Wrap an iterator to allow for seeking backward and forward. This
    progressively caches the items in the source iterable so they can be
    re-visited.

    Call :meth:`seek` with an index to seek to that position in the source
    iterable.

    To "reset" an iterator, seek to ``0``:

        >>> from itertools import count
        >>> it = seekable((str(n) for n in count()))
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> it.seek(0)
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> next(it)
        '3'

    You can also seek forward:

        >>> it = seekable((str(n) for n in range(20)))
        >>> it.seek(10)
        >>> next(it)
        '10'
        >>> it.seek(20)  # Seeking past the end of the source isn't a problem
        >>> list(it)
        []
        >>> it.seek(0)  # Resetting works even after hitting the end
        >>> next(it), next(it), next(it)
        ('0', '1', '2')

    Call :meth:`peek` to look ahead one item without advancing the iterator:

        >>> it = seekable('1234')
        >>> it.peek()
        '1'
        >>> list(it)
        ['1', '2', '3', '4']
        >>> it.peek(default='empty')
        'empty'

    Before the iterator is at its end, calling :func:`bool` on it will return
    ``True``. After it will return ``False``:

        >>> it = seekable('5678')
        >>> bool(it)
        True
        >>> list(it)
        ['5', '6', '7', '8']
        >>> bool(it)
        False

    You may view the contents of the cache with the :meth:`elements` method.
    That returns a :class:`SequenceView`, a view that updates automatically:

        >>> it = seekable((str(n) for n in range(10)))
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> elements = it.elements()
        >>> elements
        SequenceView(['0', '1', '2'])
        >>> next(it)
        '3'
        >>> elements
        SequenceView(['0', '1', '2', '3'])

    By default, the cache grows as the source iterable progresses, so beware of
    wrapping very large or infinite iterables. Supply *maxlen* to limit the
    size of the cache (this of course limits how far back you can seek).

        >>> from itertools import count
        >>> it = seekable((str(n) for n in count()), maxlen=2)
        >>> next(it), next(it), next(it), next(it)
        ('0', '1', '2', '3')
        >>> list(it.elements())
        ['2', '3']
        >>> it.seek(0)
        >>> next(it), next(it), next(it), next(it)
        ('2', '3', '4', '5')
        >>> next(it)
        '6'

    """

    def __init__(self, iterable, maxlen=None):
        self._source = iter(iterable)
        if maxlen is None:
            self._cache = []
        else:
            self._cache = deque([], maxlen)
        self._index = None

    def __iter__(self):
        return self

    def __next__(self):
        if self._index is not None:
            try:
                item = self._cache[self._index]
            except IndexError:
                self._index = None
            else:
                self._index += 1
                return item

        item = next(self._source)
        self._cache.append(item)
        return item

    def __bool__(self):
        try:
            self.peek()
        except StopIteration:
            return False
        return True

    def peek(self, default=_marker):
        try:
            peeked = next(self)
        except StopIteration:
            if default is _marker:
                raise
            return default
        if self._index is None:
            self._index = len(self._cache)
        self._index -= 1
        return peeked

    def elements(self):
        return SequenceView(self._cache)

    def seek(self, index):
        self._index = index
        remainder = index - len(self._cache)
        if remainder > 0:
            consume(self, remainder)


class run_length:
    """
    :func:`run_length.encode` compresses an iterable with run-length encoding.
    It yields groups of repeated items with the count of how many times they
    were repeated:

        >>> uncompressed = 'abbcccdddd'
        >>> list(run_length.encode(uncompressed))
        [('a', 1), ('b', 2), ('c', 3), ('d', 4)]

    :func:`run_length.decode` decompresses an iterable that was previously
    compressed with run-length encoding. It yields the items of the
    decompressed iterable:

        >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
        >>> list(run_length.decode(compressed))
        ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd']

    """

    @staticmethod
    def encode(iterable):
        return ((k, ilen(g)) for k, g in groupby(iterable))

    @staticmethod
    def decode(iterable):
        return chain.from_iterable(repeat(k, n) for k, n in iterable)


def exactly_n(iterable, n, predicate=bool):
    """Return ``True`` if exactly ``n`` items in the iterable are ``True``
    according to the *predicate* function.

        >>> exactly_n([True, True, False], 2)
        True
        >>> exactly_n([True, True, False], 1)
        False
        >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3)
        True

    The iterable will be advanced until ``n + 1`` truthy items are encountered,
    so avoid calling it on infinite iterables.

    """
    return len(take(n + 1, filter(predicate, iterable))) == n


def circular_shifts(iterable):
    """Return a list of circular shifts of *iterable*.

    >>> circular_shifts(range(4))
    [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)]
    """
    lst = list(iterable)
    return take(len(lst), windowed(cycle(lst), len(lst)))


def make_decorator(wrapping_func, result_index=0):
    """Return a decorator version of *wrapping_func*, which is a function that
    modifies an iterable. *result_index* is the position in that function's
    signature where the iterable goes.

    This lets you use itertools on the "production end," i.e. at function
    definition. This can augment what the function returns without changing the
    function's code.

    For example, to produce a decorator version of :func:`chunked`:

        >>> from more_itertools import chunked
        >>> chunker = make_decorator(chunked, result_index=0)
        >>> @chunker(3)
        ... def iter_range(n):
        ...     return iter(range(n))
        ...
        >>> list(iter_range(9))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

    To only allow truthy items to be returned:

        >>> truth_serum = make_decorator(filter, result_index=1)
        >>> @truth_serum(bool)
        ... def boolean_test():
        ...     return [0, 1, '', ' ', False, True]
        ...
        >>> list(boolean_test())
        [1, ' ', True]

    The :func:`peekable` and :func:`seekable` wrappers make for practical
    decorators:

        >>> from more_itertools import peekable
        >>> peekable_function = make_decorator(peekable)
        >>> @peekable_function()
        ... def str_range(*args):
        ...     return (str(x) for x in range(*args))
        ...
        >>> it = str_range(1, 20, 2)
        >>> next(it), next(it), next(it)
        ('1', '3', '5')
        >>> it.peek()
        '7'
        >>> next(it)
        '7'

    """

    # See https://sites.google.com/site/bbayles/index/decorator_factory for
    # notes on how this works.
    def decorator(*wrapping_args, **wrapping_kwargs):
        def outer_wrapper(f):
            def inner_wrapper(*args, **kwargs):
                result = f(*args, **kwargs)
                wrapping_args_ = list(wrapping_args)
                wrapping_args_.insert(result_index, result)
                return wrapping_func(*wrapping_args_, **wrapping_kwargs)

            return inner_wrapper

        return outer_wrapper

    return decorator


def map_reduce(iterable, keyfunc, valuefunc=None, reducefunc=None):
    """Return a dictionary that maps the items in *iterable* to categories
    defined by *keyfunc*, transforms them with *valuefunc*, and
    then summarizes them by category with *reducefunc*.

    *valuefunc* defaults to the identity function if it is unspecified.
    If *reducefunc* is unspecified, no summarization takes place:

        >>> keyfunc = lambda x: x.upper()
        >>> result = map_reduce('abbccc', keyfunc)
        >>> sorted(result.items())
        [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])]

    Specifying *valuefunc* transforms the categorized items:

        >>> keyfunc = lambda x: x.upper()
        >>> valuefunc = lambda x: 1
        >>> result = map_reduce('abbccc', keyfunc, valuefunc)
        >>> sorted(result.items())
        [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])]

    Specifying *reducefunc* summarizes the categorized items:

        >>> keyfunc = lambda x: x.upper()
        >>> valuefunc = lambda x: 1
        >>> reducefunc = sum
        >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc)
        >>> sorted(result.items())
        [('A', 1), ('B', 2), ('C', 3)]

    You may want to filter the input iterable before applying the map/reduce
    procedure:

        >>> all_items = range(30)
        >>> items = [x for x in all_items if 10 <= x <= 20]  # Filter
        >>> keyfunc = lambda x: x % 2  # Evens map to 0; odds to 1
        >>> categories = map_reduce(items, keyfunc=keyfunc)
        >>> sorted(categories.items())
        [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])]
        >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum)
        >>> sorted(summaries.items())
        [(0, 90), (1, 75)]

    Note that all items in the iterable are gathered into a list before the
    summarization step, which may require significant storage.

    The returned object is a :obj:`collections.defaultdict` with the
    ``default_factory`` set to ``None``, such that it behaves like a normal
    dictionary.

    """
    valuefunc = (lambda x: x) if (valuefunc is None) else valuefunc

    ret = defaultdict(list)
    for item in iterable:
        key = keyfunc(item)
        value = valuefunc(item)
        ret[key].append(value)

    if reducefunc is not None:
        for key, value_list in ret.items():
            ret[key] = reducefunc(value_list)

    ret.default_factory = None
    return ret


def rlocate(iterable, pred=bool, window_size=None):
    """Yield the index of each item in *iterable* for which *pred* returns
    ``True``, starting from the right and moving left.

    *pred* defaults to :func:`bool`, which will select truthy items:

        >>> list(rlocate([0, 1, 1, 0, 1, 0, 0]))  # Truthy at 1, 2, and 4
        [4, 2, 1]

    Set *pred* to a custom function to, e.g., find the indexes for a particular
    item:

        >>> iterable = iter('abcb')
        >>> pred = lambda x: x == 'b'
        >>> list(rlocate(iterable, pred))
        [3, 1]

    If *window_size* is given, then the *pred* function will be called with
    that many items. This enables searching for sub-sequences:

        >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
        >>> pred = lambda *args: args == (1, 2, 3)
        >>> list(rlocate(iterable, pred=pred, window_size=3))
        [9, 5, 1]

    Beware, this function won't return anything for infinite iterables.
    If *iterable* is reversible, ``rlocate`` will reverse it and search from
    the right. Otherwise, it will search from the left and return the results
    in reverse order.

    See :func:`locate` to for other example applications.

    """
    if window_size is None:
        try:
            len_iter = len(iterable)
            return (len_iter - i - 1 for i in locate(reversed(iterable), pred))
        except TypeError:
            pass

    return reversed(list(locate(iterable, pred, window_size)))


def replace(iterable, pred, substitutes, count=None, window_size=1):
    """Yield the items from *iterable*, replacing the items for which *pred*
    returns ``True`` with the items from the iterable *substitutes*.

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1]
        >>> pred = lambda x: x == 0
        >>> substitutes = (2, 3)
        >>> list(replace(iterable, pred, substitutes))
        [1, 1, 2, 3, 1, 1, 2, 3, 1, 1]

    If *count* is given, the number of replacements will be limited:

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0]
        >>> pred = lambda x: x == 0
        >>> substitutes = [None]
        >>> list(replace(iterable, pred, substitutes, count=2))
        [1, 1, None, 1, 1, None, 1, 1, 0]

    Use *window_size* to control the number of items passed as arguments to
    *pred*. This allows for locating and replacing subsequences.

        >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5]
        >>> window_size = 3
        >>> pred = lambda *args: args == (0, 1, 2)  # 3 items passed to pred
        >>> substitutes = [3, 4] # Splice in these items
        >>> list(replace(iterable, pred, substitutes, window_size=window_size))
        [3, 4, 5, 3, 4, 5]

    """
    if window_size < 1:
        raise ValueError('window_size must be at least 1')

    # Save the substitutes iterable, since it's used more than once
    substitutes = tuple(substitutes)

    # Add padding such that the number of windows matches the length of the
    # iterable
    it = chain(iterable, [_marker] * (window_size - 1))
    windows = windowed(it, window_size)

    n = 0
    for w in windows:
        # If the current window matches our predicate (and we haven't hit
        # our maximum number of replacements), splice in the substitutes
        # and then consume the following windows that overlap with this one.
        # For example, if the iterable is (0, 1, 2, 3, 4...)
        # and the window size is 2, we have (0, 1), (1, 2), (2, 3)...
        # If the predicate matches on (0, 1), we need to zap (0, 1) and (1, 2)
        if pred(*w):
            if (count is None) or (n < count):
                n += 1
                yield from substitutes
                consume(windows, window_size - 1)
                continue

        # If there was no match (or we've reached the replacement limit),
        # yield the first item from the window.
        if w and (w[0] is not _marker):
            yield w[0]


def partitions(iterable):
    """Yield all possible order-preserving partitions of *iterable*.

    >>> iterable = 'abc'
    >>> for part in partitions(iterable):
    ...     print([''.join(p) for p in part])
    ['abc']
    ['a', 'bc']
    ['ab', 'c']
    ['a', 'b', 'c']

    This is unrelated to :func:`partition`.

    """
    sequence = list(iterable)
    n = len(sequence)
    for i in powerset(range(1, n)):
        yield [sequence[i:j] for i, j in zip((0,) + i, i + (n,))]


def set_partitions(iterable, k=None):
    """
    Yield the set partitions of *iterable* into *k* parts. Set partitions are
    not order-preserving.

    >>> iterable = 'abc'
    >>> for part in set_partitions(iterable, 2):
    ...     print([''.join(p) for p in part])
    ['a', 'bc']
    ['ab', 'c']
    ['b', 'ac']


    If *k* is not given, every set partition is generated.

    >>> iterable = 'abc'
    >>> for part in set_partitions(iterable):
    ...     print([''.join(p) for p in part])
    ['abc']
    ['a', 'bc']
    ['ab', 'c']
    ['b', 'ac']
    ['a', 'b', 'c']

    """
    L = list(iterable)
    n = len(L)
    if k is not None:
        if k < 1:
            raise ValueError(
                "Can't partition in a negative or zero number of groups"
            )
        elif k > n:
            return

    def set_partitions_helper(L, k):
        n = len(L)
        if k == 1:
            yield [L]
        elif n == k:
            yield [[s] for s in L]
        else:
            e, *M = L
            for p in set_partitions_helper(M, k - 1):
                yield [[e], *p]
            for p in set_partitions_helper(M, k):
                for i in range(len(p)):
                    yield p[:i] + [[e] + p[i]] + p[i + 1 :]

    if k is None:
        for k in range(1, n + 1):
            yield from set_partitions_helper(L, k)
    else:
        yield from set_partitions_helper(L, k)


class time_limited:
    """
    Yield items from *iterable* until *limit_seconds* have passed.
    If the time limit expires before all items have been yielded, the
    ``timed_out`` parameter will be set to ``True``.

    >>> from time import sleep
    >>> def generator():
    ...     yield 1
    ...     yield 2
    ...     sleep(0.2)
    ...     yield 3
    >>> iterable = time_limited(0.1, generator())
    >>> list(iterable)
    [1, 2]
    >>> iterable.timed_out
    True

    Note that the time is checked before each item is yielded, and iteration
    stops if  the time elapsed is greater than *limit_seconds*. If your time
    limit is 1 second, but it takes 2 seconds to generate the first item from
    the iterable, the function will run for 2 seconds and not yield anything.

    """

    def __init__(self, limit_seconds, iterable):
        if limit_seconds < 0:
            raise ValueError('limit_seconds must be positive')
        self.limit_seconds = limit_seconds
        self._iterable = iter(iterable)
        self._start_time = monotonic()
        self.timed_out = False

    def __iter__(self):
        return self

    def __next__(self):
        item = next(self._iterable)
        if monotonic() - self._start_time > self.limit_seconds:
            self.timed_out = True
            raise StopIteration

        return item


def only(iterable, default=None, too_long=None):
    """If *iterable* has only one item, return it.
    If it has zero items, return *default*.
    If it has more than one item, raise the exception given by *too_long*,
    which is ``ValueError`` by default.

    >>> only([], default='missing')
    'missing'
    >>> only([1])
    1
    >>> only([1, 2])  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: Expected exactly one item in iterable, but got 1, 2,
     and perhaps more.'
    >>> only([1, 2], too_long=TypeError)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    TypeError

    Note that :func:`only` attempts to advance *iterable* twice to ensure there
    is only one item.  See :func:`spy` or :func:`peekable` to check
    iterable contents less destructively.
    """
    it = iter(iterable)
    first_value = next(it, default)

    try:
        second_value = next(it)
    except StopIteration:
        pass
    else:
        msg = (
            'Expected exactly one item in iterable, but got {!r}, {!r}, '
            'and perhaps more.'.format(first_value, second_value)
        )
        raise too_long or ValueError(msg)

    return first_value


class _IChunk:
    def __init__(self, iterable, n):
        self._it = islice(iterable, n)
        self._cache = deque()

    def fill_cache(self):
        self._cache.extend(self._it)

    def __iter__(self):
        return self

    def __next__(self):
        try:
            return next(self._it)
        except StopIteration:
            if self._cache:
                return self._cache.popleft()
            else:
                raise


def ichunked(iterable, n):
    """Break *iterable* into sub-iterables with *n* elements each.
    :func:`ichunked` is like :func:`chunked`, but it yields iterables
    instead of lists.

    If the sub-iterables are read in order, the elements of *iterable*
    won't be stored in memory.
    If they are read out of order, :func:`itertools.tee` is used to cache
    elements as necessary.

    >>> from itertools import count
    >>> all_chunks = ichunked(count(), 4)
    >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks)
    >>> list(c_2)  # c_1's elements have been cached; c_3's haven't been
    [4, 5, 6, 7]
    >>> list(c_1)
    [0, 1, 2, 3]
    >>> list(c_3)
    [8, 9, 10, 11]

    """
    source = peekable(iter(iterable))
    ichunk_marker = object()
    while True:
        # Check to see whether we're at the end of the source iterable
        item = source.peek(ichunk_marker)
        if item is ichunk_marker:
            return

        chunk = _IChunk(source, n)
        yield chunk

        # Advance the source iterable and fill previous chunk's cache
        chunk.fill_cache()


def iequals(*iterables):
    """Return ``True`` if all given *iterables* are equal to each other,
    which means that they contain the same elements in the same order.

    The function is useful for comparing iterables of different data types
    or iterables that do not support equality checks.

    >>> iequals("abc", ['a', 'b', 'c'], ('a', 'b', 'c'), iter("abc"))
    True

    >>> iequals("abc", "acb")
    False

    Not to be confused with :func:`all_equals`, which checks whether all
    elements of iterable are equal to each other.

    """
    return all(map(all_equal, zip_longest(*iterables, fillvalue=object())))


def distinct_combinations(iterable, r):
    """Yield the distinct combinations of *r* items taken from *iterable*.

        >>> list(distinct_combinations([0, 0, 1], 2))
        [(0, 0), (0, 1)]

    Equivalent to ``set(combinations(iterable))``, except duplicates are not
    generated and thrown away. For larger input sequences this is much more
    efficient.

    """
    if r < 0:
        raise ValueError('r must be non-negative')
    elif r == 0:
        yield ()
        return
    pool = tuple(iterable)
    generators = [unique_everseen(enumerate(pool), key=itemgetter(1))]
    current_combo = [None] * r
    level = 0
    while generators:
        try:
            cur_idx, p = next(generators[-1])
        except StopIteration:
            generators.pop()
            level -= 1
            continue
        current_combo[level] = p
        if level + 1 == r:
            yield tuple(current_combo)
        else:
            generators.append(
                unique_everseen(
                    enumerate(pool[cur_idx + 1 :], cur_idx + 1),
                    key=itemgetter(1),
                )
            )
            level += 1


def filter_except(validator, iterable, *exceptions):
    """Yield the items from *iterable* for which the *validator* function does
    not raise one of the specified *exceptions*.

    *validator* is called for each item in *iterable*.
    It should be a function that accepts one argument and raises an exception
    if that item is not valid.

    >>> iterable = ['1', '2', 'three', '4', None]
    >>> list(filter_except(int, iterable, ValueError, TypeError))
    ['1', '2', '4']

    If an exception other than one given by *exceptions* is raised by
    *validator*, it is raised like normal.
    """
    for item in iterable:
        try:
            validator(item)
        except exceptions:
            pass
        else:
            yield item


def map_except(function, iterable, *exceptions):
    """Transform each item from *iterable* with *function* and yield the
    result, unless *function* raises one of the specified *exceptions*.

    *function* is called to transform each item in *iterable*.
    It should accept one argument.

    >>> iterable = ['1', '2', 'three', '4', None]
    >>> list(map_except(int, iterable, ValueError, TypeError))
    [1, 2, 4]

    If an exception other than one given by *exceptions* is raised by
    *function*, it is raised like normal.
    """
    for item in iterable:
        try:
            yield function(item)
        except exceptions:
            pass


def map_if(iterable, pred, func, func_else=lambda x: x):
    """Evaluate each item from *iterable* using *pred*. If the result is
    equivalent to ``True``, transform the item with *func* and yield it.
    Otherwise, transform the item with *func_else* and yield it.

    *pred*, *func*, and *func_else* should each be functions that accept
    one argument. By default, *func_else* is the identity function.

    >>> from math import sqrt
    >>> iterable = list(range(-5, 5))
    >>> iterable
    [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4]
    >>> list(map_if(iterable, lambda x: x > 3, lambda x: 'toobig'))
    [-5, -4, -3, -2, -1, 0, 1, 2, 3, 'toobig']
    >>> list(map_if(iterable, lambda x: x >= 0,
    ... lambda x: f'{sqrt(x):.2f}', lambda x: None))
    [None, None, None, None, None, '0.00', '1.00', '1.41', '1.73', '2.00']
    """
    for item in iterable:
        yield func(item) if pred(item) else func_else(item)


def _sample_unweighted(iterable, k):
    # Implementation of "Algorithm L" from the 1994 paper by Kim-Hung Li:
    # "Reservoir-Sampling Algorithms of Time Complexity O(n(1+log(N/n)))".

    # Fill up the reservoir (collection of samples) with the first `k` samples
    reservoir = take(k, iterable)

    # Generate random number that's the largest in a sample of k U(0,1) numbers
    # Largest order statistic: https://en.wikipedia.org/wiki/Order_statistic
    W = exp(log(random()) / k)

    # The number of elements to skip before changing the reservoir is a random
    # number with a geometric distribution. Sample it using random() and logs.
    next_index = k + floor(log(random()) / log(1 - W))

    for index, element in enumerate(iterable, k):
        if index == next_index:
            reservoir[randrange(k)] = element
            # The new W is the largest in a sample of k U(0, `old_W`) numbers
            W *= exp(log(random()) / k)
            next_index += floor(log(random()) / log(1 - W)) + 1

    return reservoir


def _sample_weighted(iterable, k, weights):
    # Implementation of "A-ExpJ" from the 2006 paper by Efraimidis et al. :
    # "Weighted random sampling with a reservoir".

    # Log-transform for numerical stability for weights that are small/large
    weight_keys = (log(random()) / weight for weight in weights)

    # Fill up the reservoir (collection of samples) with the first `k`
    # weight-keys and elements, then heapify the list.
    reservoir = take(k, zip(weight_keys, iterable))
    heapify(reservoir)

    # The number of jumps before changing the reservoir is a random variable
    # with an exponential distribution. Sample it using random() and logs.
    smallest_weight_key, _ = reservoir[0]
    weights_to_skip = log(random()) / smallest_weight_key

    for weight, element in zip(weights, iterable):
        if weight >= weights_to_skip:
            # The notation here is consistent with the paper, but we store
            # the weight-keys in log-space for better numerical stability.
            smallest_weight_key, _ = reservoir[0]
            t_w = exp(weight * smallest_weight_key)
            r_2 = uniform(t_w, 1)  # generate U(t_w, 1)
            weight_key = log(r_2) / weight
            heapreplace(reservoir, (weight_key, element))
            smallest_weight_key, _ = reservoir[0]
            weights_to_skip = log(random()) / smallest_weight_key
        else:
            weights_to_skip -= weight

    # Equivalent to [element for weight_key, element in sorted(reservoir)]
    return [heappop(reservoir)[1] for _ in range(k)]


def sample(iterable, k, weights=None):
    """Return a *k*-length list of elements chosen (without replacement)
    from the *iterable*. Like :func:`random.sample`, but works on iterables
    of unknown length.

    >>> iterable = range(100)
    >>> sample(iterable, 5)  # doctest: +SKIP
    [81, 60, 96, 16, 4]

    An iterable with *weights* may also be given:

    >>> iterable = range(100)
    >>> weights = (i * i + 1 for i in range(100))
    >>> sampled = sample(iterable, 5, weights=weights)  # doctest: +SKIP
    [79, 67, 74, 66, 78]

    The algorithm can also be used to generate weighted random permutations.
    The relative weight of each item determines the probability that it
    appears late in the permutation.

    >>> data = "abcdefgh"
    >>> weights = range(1, len(data) + 1)
    >>> sample(data, k=len(data), weights=weights)  # doctest: +SKIP
    ['c', 'a', 'b', 'e', 'g', 'd', 'h', 'f']
    """
    if k == 0:
        return []

    iterable = iter(iterable)
    if weights is None:
        return _sample_unweighted(iterable, k)
    else:
        weights = iter(weights)
        return _sample_weighted(iterable, k, weights)


def is_sorted(iterable, key=None, reverse=False, strict=False):
    """Returns ``True`` if the items of iterable are in sorted order, and
    ``False`` otherwise. *key* and *reverse* have the same meaning that they do
    in the built-in :func:`sorted` function.

    >>> is_sorted(['1', '2', '3', '4', '5'], key=int)
    True
    >>> is_sorted([5, 4, 3, 1, 2], reverse=True)
    False

    If *strict*, tests for strict sorting, that is, returns ``False`` if equal
    elements are found:

    >>> is_sorted([1, 2, 2])
    True
    >>> is_sorted([1, 2, 2], strict=True)
    False

    The function returns ``False`` after encountering the first out-of-order
    item. If there are no out-of-order items, the iterable is exhausted.
    """

    compare = (le if reverse else ge) if strict else (lt if reverse else gt)
    it = iterable if key is None else map(key, iterable)
    return not any(starmap(compare, pairwise(it)))


class AbortThread(BaseException):
    pass


class callback_iter:
    """Convert a function that uses callbacks to an iterator.

    Let *func* be a function that takes a `callback` keyword argument.
    For example:

    >>> def func(callback=None):
    ...     for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]:
    ...         if callback:
    ...             callback(i, c)
    ...     return 4


    Use ``with callback_iter(func)`` to get an iterator over the parameters
    that are delivered to the callback.

    >>> with callback_iter(func) as it:
    ...     for args, kwargs in it:
    ...         print(args)
    (1, 'a')
    (2, 'b')
    (3, 'c')

    The function will be called in a background thread. The ``done`` property
    indicates whether it has completed execution.

    >>> it.done
    True

    If it completes successfully, its return value will be available
    in the ``result`` property.

    >>> it.result
    4

    Notes:

    * If the function uses some keyword argument besides ``callback``, supply
      *callback_kwd*.
    * If it finished executing, but raised an exception, accessing the
      ``result`` property will raise the same exception.
    * If it hasn't finished executing, accessing the ``result``
      property from within the ``with`` block will raise ``RuntimeError``.
    * If it hasn't finished executing, accessing the ``result`` property from
      outside the ``with`` block will raise a
      ``more_itertools.AbortThread`` exception.
    * Provide *wait_seconds* to adjust how frequently the it is polled for
      output.

    """

    def __init__(self, func, callback_kwd='callback', wait_seconds=0.1):
        self._func = func
        self._callback_kwd = callback_kwd
        self._aborted = False
        self._future = None
        self._wait_seconds = wait_seconds
        # Lazily import concurrent.future
        self._executor = __import__(
        ).futures.__import__("concurrent.futures").futures.ThreadPoolExecutor(max_workers=1)
        self._iterator = self._reader()

    def __enter__(self):
        return self

    def __exit__(self, exc_type, exc_value, traceback):
        self._aborted = True
        self._executor.shutdown()

    def __iter__(self):
        return self

    def __next__(self):
        return next(self._iterator)

    @property
    def done(self):
        if self._future is None:
            return False
        return self._future.done()

    @property
    def result(self):
        if not self.done:
            raise RuntimeError('Function has not yet completed')

        return self._future.result()

    def _reader(self):
        q = Queue()

        def callback(*args, **kwargs):
            if self._aborted:
                raise AbortThread('canceled by user')

            q.put((args, kwargs))

        self._future = self._executor.submit(
            self._func, **{self._callback_kwd: callback}
        )

        while True:
            try:
                item = q.get(timeout=self._wait_seconds)
            except Empty:
                pass
            else:
                q.task_done()
                yield item

            if self._future.done():
                break

        remaining = []
        while True:
            try:
                item = q.get_nowait()
            except Empty:
                break
            else:
                q.task_done()
                remaining.append(item)
        q.join()
        yield from remaining


def windowed_complete(iterable, n):
    """
    Yield ``(beginning, middle, end)`` tuples, where:

    * Each ``middle`` has *n* items from *iterable*
    * Each ``beginning`` has the items before the ones in ``middle``
    * Each ``end`` has the items after the ones in ``middle``

    >>> iterable = range(7)
    >>> n = 3
    >>> for beginning, middle, end in windowed_complete(iterable, n):
    ...     print(beginning, middle, end)
    () (0, 1, 2) (3, 4, 5, 6)
    (0,) (1, 2, 3) (4, 5, 6)
    (0, 1) (2, 3, 4) (5, 6)
    (0, 1, 2) (3, 4, 5) (6,)
    (0, 1, 2, 3) (4, 5, 6) ()

    Note that *n* must be at least 0 and most equal to the length of
    *iterable*.

    This function will exhaust the iterable and may require significant
    storage.
    """
    if n < 0:
        raise ValueError('n must be >= 0')

    seq = tuple(iterable)
    size = len(seq)

    if n > size:
        raise ValueError('n must be <= len(seq)')

    for i in range(size - n + 1):
        beginning = seq[:i]
        middle = seq[i : i + n]
        end = seq[i + n :]
        yield beginning, middle, end


def all_unique(iterable, key=None):
    """
    Returns ``True`` if all the elements of *iterable* are unique (no two
    elements are equal).

        >>> all_unique('ABCB')
        False

    If a *key* function is specified, it will be used to make comparisons.

        >>> all_unique('ABCb')
        True
        >>> all_unique('ABCb', str.lower)
        False

    The function returns as soon as the first non-unique element is
    encountered. Iterables with a mix of hashable and unhashable items can
    be used, but the function will be slower for unhashable items.
    """
    seenset = set()
    seenset_add = seenset.add
    seenlist = []
    seenlist_add = seenlist.append
    for element in map(key, iterable) if key else iterable:
        try:
            if element in seenset:
                return False
            seenset_add(element)
        except TypeError:
            if element in seenlist:
                return False
            seenlist_add(element)
    return True


def nth_product(index, *args):
    """Equivalent to ``list(product(*args))[index]``.

    The products of *args* can be ordered lexicographically.
    :func:`nth_product` computes the product at sort position *index* without
    computing the previous products.

        >>> nth_product(8, range(2), range(2), range(2), range(2))
        (1, 0, 0, 0)

    ``IndexError`` will be raised if the given *index* is invalid.
    """
    pools = list(map(tuple, reversed(args)))
    ns = list(map(len, pools))

    c = reduce(mul, ns)

    if index < 0:
        index += c

    if not 0 <= index < c:
        raise IndexError

    result = []
    for pool, n in zip(pools, ns):
        result.append(pool[index % n])
        index //= n

    return tuple(reversed(result))


def nth_permutation(iterable, r, index):
    """Equivalent to ``list(permutations(iterable, r))[index]```

    The subsequences of *iterable* that are of length *r* where order is
    important can be ordered lexicographically. :func:`nth_permutation`
    computes the subsequence at sort position *index* directly, without
    computing the previous subsequences.

        >>> nth_permutation('ghijk', 2, 5)
        ('h', 'i')

    ``ValueError`` will be raised If *r* is negative or greater than the length
    of *iterable*.
    ``IndexError`` will be raised if the given *index* is invalid.
    """
    pool = list(iterable)
    n = len(pool)

    if r is None or r == n:
        r, c = n, factorial(n)
    elif not 0 <= r < n:
        raise ValueError
    else:
        c = factorial(n) // factorial(n - r)

    if index < 0:
        index += c

    if not 0 <= index < c:
        raise IndexError

    if c == 0:
        return tuple()

    result = [0] * r
    q = index * factorial(n) // c if r < n else index
    for d in range(1, n + 1):
        q, i = divmod(q, d)
        if 0 <= n - d < r:
            result[n - d] = i
        if q == 0:
            break

    return tuple(map(pool.pop, result))


def value_chain(*args):
    """Yield all arguments passed to the function in the same order in which
    they were passed. If an argument itself is iterable then iterate over its
    values.

        >>> list(value_chain(1, 2, 3, [4, 5, 6]))
        [1, 2, 3, 4, 5, 6]

    Binary and text strings are not considered iterable and are emitted
    as-is:

        >>> list(value_chain('12', '34', ['56', '78']))
        ['12', '34', '56', '78']


    Multiple levels of nesting are not flattened.

    """
    for value in args:
        if isinstance(value, (str, bytes)):
            yield value
            continue
        try:
            yield from value
        except TypeError:
            yield value


def product_index(element, *args):
    """Equivalent to ``list(product(*args)).index(element)``

    The products of *args* can be ordered lexicographically.
    :func:`product_index` computes the first index of *element* without
    computing the previous products.

        >>> product_index([8, 2], range(10), range(5))
        42

    ``ValueError`` will be raised if the given *element* isn't in the product
    of *args*.
    """
    index = 0

    for x, pool in zip_longest(element, args, fillvalue=_marker):
        if x is _marker or pool is _marker:
            raise ValueError('element is not a product of args')

        pool = tuple(pool)
        index = index * len(pool) + pool.index(x)

    return index


def combination_index(element, iterable):
    """Equivalent to ``list(combinations(iterable, r)).index(element)``

    The subsequences of *iterable* that are of length *r* can be ordered
    lexicographically. :func:`combination_index` computes the index of the
    first *element*, without computing the previous combinations.

        >>> combination_index('adf', 'abcdefg')
        10

    ``ValueError`` will be raised if the given *element* isn't one of the
    combinations of *iterable*.
    """
    element = enumerate(element)
    k, y = next(element, (None, None))
    if k is None:
        return 0

    indexes = []
    pool = enumerate(iterable)
    for n, x in pool:
        if x == y:
            indexes.append(n)
            tmp, y = next(element, (None, None))
            if tmp is None:
                break
            else:
                k = tmp
    else:
        raise ValueError('element is not a combination of iterable')

    n, _ = last(pool, default=(n, None))

    # Python versions below 3.8 don't have math.comb
    index = 1
    for i, j in enumerate(reversed(indexes), start=1):
        j = n - j
        if i <= j:
            index += factorial(j) // (factorial(i) * factorial(j - i))

    return factorial(n + 1) // (factorial(k + 1) * factorial(n - k)) - index


def permutation_index(element, iterable):
    """Equivalent to ``list(permutations(iterable, r)).index(element)```

    The subsequences of *iterable* that are of length *r* where order is
    important can be ordered lexicographically. :func:`permutation_index`
    computes the index of the first *element* directly, without computing
    the previous permutations.

        >>> permutation_index([1, 3, 2], range(5))
        19

    ``ValueError`` will be raised if the given *element* isn't one of the
    permutations of *iterable*.
    """
    index = 0
    pool = list(iterable)
    for i, x in zip(range(len(pool), -1, -1), element):
        r = pool.index(x)
        index = index * i + r
        del pool[r]

    return index


class countable:
    """Wrap *iterable* and keep a count of how many items have been consumed.

    The ``items_seen`` attribute starts at ``0`` and increments as the iterable
    is consumed:

        >>> iterable = map(str, range(10))
        >>> it = countable(iterable)
        >>> it.items_seen
        0
        >>> next(it), next(it)
        ('0', '1')
        >>> list(it)
        ['2', '3', '4', '5', '6', '7', '8', '9']
        >>> it.items_seen
        10
    """

    def __init__(self, iterable):
        self._it = iter(iterable)
        self.items_seen = 0

    def __iter__(self):
        return self

    def __next__(self):
        item = next(self._it)
        self.items_seen += 1

        return item


def chunked_even(iterable, n):
    """Break *iterable* into lists of approximately length *n*.
    Items are distributed such the lengths of the lists differ by at most
    1 item.

    >>> iterable = [1, 2, 3, 4, 5, 6, 7]
    >>> n = 3
    >>> list(chunked_even(iterable, n))  # List lengths: 3, 2, 2
    [[1, 2, 3], [4, 5], [6, 7]]
    >>> list(chunked(iterable, n))  # List lengths: 3, 3, 1
    [[1, 2, 3], [4, 5, 6], [7]]

    """

    len_method = getattr(iterable, '__len__', None)

    if len_method is None:
        return _chunked_even_online(iterable, n)
    else:
        return _chunked_even_finite(iterable, len_method(), n)


def _chunked_even_online(iterable, n):
    buffer = []
    maxbuf = n + (n - 2) * (n - 1)
    for x in iterable:
        buffer.append(x)
        if len(buffer) == maxbuf:
            yield buffer[:n]
            buffer = buffer[n:]
    yield from _chunked_even_finite(buffer, len(buffer), n)


def _chunked_even_finite(iterable, N, n):
    if N < 1:
        return

    # Lists are either size `full_size <= n` or `partial_size = full_size - 1`
    q, r = divmod(N, n)
    num_lists = q + (1 if r > 0 else 0)
    q, r = divmod(N, num_lists)
    full_size = q + (1 if r > 0 else 0)
    partial_size = full_size - 1
    num_full = N - partial_size * num_lists
    num_partial = num_lists - num_full

    buffer = []
    iterator = iter(iterable)

    # Yield num_full lists of full_size
    for x in iterator:
        buffer.append(x)
        if len(buffer) == full_size:
            yield buffer
            buffer = []
            num_full -= 1
            if num_full <= 0:
                break

    # Yield num_partial lists of partial_size
    for x in iterator:
        buffer.append(x)
        if len(buffer) == partial_size:
            yield buffer
            buffer = []
            num_partial -= 1


def zip_broadcast(*objects, scalar_types=(str, bytes), strict=False):
    """A version of :func:`zip` that "broadcasts" any scalar
    (i.e., non-iterable) items into output tuples.

    >>> iterable_1 = [1, 2, 3]
    >>> iterable_2 = ['a', 'b', 'c']
    >>> scalar = '_'
    >>> list(zip_broadcast(iterable_1, iterable_2, scalar))
    [(1, 'a', '_'), (2, 'b', '_'), (3, 'c', '_')]

    The *scalar_types* keyword argument determines what types are considered
    scalar. It is set to ``(str, bytes)`` by default. Set it to ``None`` to
    treat strings and byte strings as iterable:

    >>> list(zip_broadcast('abc', 0, 'xyz', scalar_types=None))
    [('a', 0, 'x'), ('b', 0, 'y'), ('c', 0, 'z')]

    If the *strict* keyword argument is ``True``, then
    ``UnequalIterablesError`` will be raised if any of the iterables have
    different lengths.
    """

    def is_scalar(obj):
        if scalar_types and isinstance(obj, scalar_types):
            return True
        try:
            iter(obj)
        except TypeError:
            return True
        else:
            return False

    size = len(objects)
    if not size:
        return

    iterables, iterable_positions = [], []
    scalars, scalar_positions = [], []
    for i, obj in enumerate(objects):
        if is_scalar(obj):
            scalars.append(obj)
            scalar_positions.append(i)
        else:
            iterables.append(iter(obj))
            iterable_positions.append(i)

    if len(scalars) == size:
        yield tuple(objects)
        return

    zipper = _zip_equal if strict else zip
    for item in zipper(*iterables):
        new_item = [None] * size

        for i, elem in zip(iterable_positions, item):
            new_item[i] = elem

        for i, elem in zip(scalar_positions, scalars):
            new_item[i] = elem

        yield tuple(new_item)


def unique_in_window(iterable, n, key=None):
    """Yield the items from *iterable* that haven't been seen recently.
    *n* is the size of the lookback window.

        >>> iterable = [0, 1, 0, 2, 3, 0]
        >>> n = 3
        >>> list(unique_in_window(iterable, n))
        [0, 1, 2, 3, 0]

    The *key* function, if provided, will be used to determine uniqueness:

        >>> list(unique_in_window('abAcda', 3, key=lambda x: x.lower()))
        ['a', 'b', 'c', 'd', 'a']

    The items in *iterable* must be hashable.

    """
    if n <= 0:
        raise ValueError('n must be greater than 0')

    window = deque(maxlen=n)
    uniques = set()
    use_key = key is not None

    for item in iterable:
        k = key(item) if use_key else item
        if k in uniques:
            continue

        if len(uniques) == n:
            uniques.discard(window[0])

        uniques.add(k)
        window.append(k)

        yield item


def duplicates_everseen(iterable, key=None):
    """Yield duplicate elements after their first appearance.

    >>> list(duplicates_everseen('mississippi'))
    ['s', 'i', 's', 's', 'i', 'p', 'i']
    >>> list(duplicates_everseen('AaaBbbCccAaa', str.lower))
    ['a', 'a', 'b', 'b', 'c', 'c', 'A', 'a', 'a']

    This function is analagous to :func:`unique_everseen` and is subject to
    the same performance considerations.

    """
    seen_set = set()
    seen_list = []
    use_key = key is not None

    for element in iterable:
        k = key(element) if use_key else element
        try:
            if k not in seen_set:
                seen_set.add(k)
            else:
                yield element
        except TypeError:
            if k not in seen_list:
                seen_list.append(k)
            else:
                yield element


def duplicates_justseen(iterable, key=None):
    """Yields serially-duplicate elements after their first appearance.

    >>> list(duplicates_justseen('mississippi'))
    ['s', 's', 'p']
    >>> list(duplicates_justseen('AaaBbbCccAaa', str.lower))
    ['a', 'a', 'b', 'b', 'c', 'c', 'a', 'a']

    This function is analagous to :func:`unique_justseen`.

    """
    return flatten(
        map(
            lambda group_tuple: islice_extended(group_tuple[1])[1:],
            groupby(iterable, key),
        )
    )


def minmax(iterable_or_value, *others, key=None, default=_marker):
    """Returns both the smallest and largest items in an iterable
    or the largest of two or more arguments.

        >>> minmax([3, 1, 5])
        (1, 5)

        >>> minmax(4, 2, 6)
        (2, 6)

    If a *key* function is provided, it will be used to transform the input
    items for comparison.

        >>> minmax([5, 30], key=str)  # '30' sorts before '5'
        (30, 5)

    If a *default* value is provided, it will be returned if there are no
    input items.

        >>> minmax([], default=(0, 0))
        (0, 0)

    Otherwise ``ValueError`` is raised.

    This function is based on the
    `recipe <http://code.activestate.com/recipes/577916/>`__ by
    Raymond Hettinger and takes care to minimize the number of comparisons
    performed.
    """
    iterable = (iterable_or_value, *others) if others else iterable_or_value

    it = iter(iterable)

    try:
        lo = hi = next(it)
    except StopIteration as e:
        if default is _marker:
            raise ValueError(
                '`minmax()` argument is an empty iterable. '
                'Provide a `default` value to suppress this error.'
            ) from e
        return default

    # Different branches depending on the presence of key. This saves a lot
    # of unimportant copies which would slow the "key=None" branch
    # significantly down.
    if key is None:
        for x, y in zip_longest(it, it, fillvalue=lo):
            if y < x:
                x, y = y, x
            if x < lo:
                lo = x
            if hi < y:
                hi = y

    else:
        lo_key = hi_key = key(lo)

        for x, y in zip_longest(it, it, fillvalue=lo):
            x_key, y_key = key(x), key(y)

            if y_key < x_key:
                x, y, x_key, y_key = y, x, y_key, x_key
            if x_key < lo_key:
                lo, lo_key = x, x_key
            if hi_key < y_key:
                hi, hi_key = y, y_key

    return lo, hi


def constrained_batches(
    iterable, max_size, max_count=None, get_len=len, strict=True
):
    """Yield batches of items from *iterable* with a combined size limited by
    *max_size*.

    >>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1']
    >>> list(constrained_batches(iterable, 10))
    [(b'12345', b'123'), (b'12345678', b'1', b'1'), (b'12', b'1')]

    If a *max_count* is supplied, the number of items per batch is also
    limited:

    >>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1']
    >>> list(constrained_batches(iterable, 10, max_count = 2))
    [(b'12345', b'123'), (b'12345678', b'1'), (b'1', b'12'), (b'1',)]

    If a *get_len* function is supplied, use that instead of :func:`len` to
    determine item size.

    If *strict* is ``True``, raise ``ValueError`` if any single item is bigger
    than *max_size*. Otherwise, allow single items to exceed *max_size*.
    """
    if max_size <= 0:
        raise ValueError('maximum size must be greater than zero')

    batch = []
    batch_size = 0
    batch_count = 0
    for item in iterable:
        item_len = get_len(item)
        if strict and item_len > max_size:
            raise ValueError('item size exceeds maximum size')

        reached_count = batch_count == max_count
        reached_size = item_len + batch_size > max_size
        if batch_count and (reached_size or reached_count):
            yield tuple(batch)
            batch.clear()
            batch_size = 0
            batch_count = 0

        batch.append(item)
        batch_size += item_len
        batch_count += 1

    if batch:
        yield tuple(batch)


def gray_product(*iterables):
    """Like :func:`itertools.product`, but return tuples in an order such
    that only one element in the generated tuple changes from one iteration
    to the next.

        >>> list(gray_product('AB','CD'))
        [('A', 'C'), ('B', 'C'), ('B', 'D'), ('A', 'D')]

    This function consumes all of the input iterables before producing output.
    If any of the input iterables have fewer than two items, ``ValueError``
    is raised.

    For information on the algorithm, see
    `this section <https://www-cs-faculty.stanford.edu/~knuth/fasc2a.ps.gz>`__
    of Donald Knuth's *The Art of Computer Programming*.
    """
    all_iterables = tuple(tuple(x) for x in iterables)
    iterable_count = len(all_iterables)
    for iterable in all_iterables:
        if len(iterable) < 2:
            raise ValueError("each iterable must have two or more items")

    # This is based on "Algorithm H" from section 7.2.1.1, page 20.
    # a holds the indexes of the source iterables for the n-tuple to be yielded
    # f is the array of "focus pointers"
    # o is the array of "directions"
    a = [0] * iterable_count
    f = list(range(iterable_count + 1))
    o = [1] * iterable_count
    while True:
        yield tuple(all_iterables[i][a[i]] for i in range(iterable_count))
        j = f[0]
        f[0] = 0
        if j == iterable_count:
            break
        a[j] = a[j] + o[j]
        if a[j] == 0 or a[j] == len(all_iterables[j]) - 1:
            o[j] = -o[j]
            f[j] = f[j + 1]
            f[j + 1] = j + 1
python3.12/site-packages/pkg_resources/_vendor/__init__.py000064400000000000151732701010017514 0ustar00python3.12/site-packages/pkg_resources/_vendor/importlib_resources/readers.py000064400000006775151732701010023526 0ustar00import collections
import pathlib
import operator

from . import abc

from ._itertools import unique_everseen
from ._compat import ZipPath


def remove_duplicates(items):
    return iter(collections.OrderedDict.fromkeys(items))


class FileReader(abc.TraversableResources):
    def __init__(self, loader):
        self.path = pathlib.Path(loader.path).parent

    def resource_path(self, resource):
        """
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        """
        return str(self.path.joinpath(resource))

    def files(self):
        return self.path


class ZipReader(abc.TraversableResources):
    def __init__(self, loader, module):
        _, _, name = module.rpartition('.')
        self.prefix = loader.prefix.replace('\\', '/') + name + '/'
        self.archive = loader.archive

    def open_resource(self, resource):
        try:
            return super().open_resource(resource)
        except KeyError as exc:
            raise FileNotFoundError(exc.args[0])

    def is_resource(self, path):
        # workaround for `zipfile.Path.is_file` returning true
        # for non-existent paths.
        target = self.files().joinpath(path)
        return target.is_file() and target.exists()

    def files(self):
        return ZipPath(self.archive, self.prefix)


class MultiplexedPath(abc.Traversable):
    """
    Given a series of Traversable objects, implement a merged
    version of the interface across all objects. Useful for
    namespace packages which may be multihomed at a single
    name.
    """

    def __init__(self, *paths):
        self._paths = list(map(pathlib.Path, remove_duplicates(paths)))
        if not self._paths:
            message = 'MultiplexedPath must contain at least one path'
            raise FileNotFoundError(message)
        if not all(path.is_dir() for path in self._paths):
            raise NotADirectoryError('MultiplexedPath only supports directories')

    def iterdir(self):
        files = (file for path in self._paths for file in path.iterdir())
        return unique_everseen(files, key=operator.attrgetter('name'))

    def read_bytes(self):
        raise FileNotFoundError(f'{self} is not a file')

    def read_text(self, *args, **kwargs):
        raise FileNotFoundError(f'{self} is not a file')

    def is_dir(self):
        return True

    def is_file(self):
        return False

    def joinpath(self, *descendants):
        try:
            return super().joinpath(*descendants)
        except abc.TraversalError:
            # One of the paths did not resolve (a directory does not exist).
            # Just return something that will not exist.
            return self._paths[0].joinpath(*descendants)

    def open(self, *args, **kwargs):
        raise FileNotFoundError(f'{self} is not a file')

    @property
    def name(self):
        return self._paths[0].name

    def __repr__(self):
        paths = ', '.join(f"'{path}'" for path in self._paths)
        return f'MultiplexedPath({paths})'


class NamespaceReader(abc.TraversableResources):
    def __init__(self, namespace_path):
        if 'NamespacePath' not in str(namespace_path):
            raise ValueError('Invalid path')
        self.path = MultiplexedPath(*list(namespace_path))

    def resource_path(self, resource):
        """
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        """
        return str(self.path.joinpath(resource))

    def files(self):
        return self.path
python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_itertools.py000064400000001564151732701010024253 0ustar00from itertools import filterfalse

from typing import (
    Callable,
    Iterable,
    Iterator,
    Optional,
    Set,
    TypeVar,
    Union,
)

# Type and type variable definitions
_T = TypeVar('_T')
_U = TypeVar('_U')


def unique_everseen(
    iterable: Iterable[_T], key: Optional[Callable[[_T], _U]] = None
) -> Iterator[_T]:
    "List unique elements, preserving order. Remember all elements ever seen."
    # unique_everseen('AAAABBBCCDAABBB') --> A B C D
    # unique_everseen('ABBCcAD', str.lower) --> A B C D
    seen: Set[Union[_T, _U]] = set()
    seen_add = seen.add
    if key is None:
        for element in filterfalse(seen.__contains__, iterable):
            seen_add(element)
            yield element
    else:
        for element in iterable:
            k = key(element)
            if k not in seen:
                seen_add(k)
                yield element
site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/__init__.cpython-312.pyc000064400000001337151732701020030110 0ustar00python3.12�

��_i���X�dZddlmZmZmZddlmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZgd�Zy)z*Read resources contained within a package.�)�as_file�files�Package)�contents�open_binary�read_binary�	open_text�	read_text�is_resource�path�Resource)�ResourceReader)rr
rrrrrrr	rrr
N)�__doc__�_commonrrr�_legacyrrrr	r
rrr
�abcr�__all__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/__init__.py�<module>rs-��0���	�	�	� �
�rsite-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_compat.cpython-312.pyc000064400000011706151732701020027774 0ustar00python3.12�

��_im��J�ddlZddlZddlZddlZddlmZddlmZejdk\rddl	m
Znddlm
Z	ddlm
Z
	dd	lmZGd
�d�Zd�Zejd
k\reeej(efZyeedfZy#e$rd�Z
Y�JwxYw#e$rej ZY�ZwxYw)�N)�suppress)�Union)��
)�Path�)�runtime_checkablec��|S�N�)�clss ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_compat.pyr	r	s���
�)�Protocolc�,�eZdZdZd�Zed��Zd�Zy)�TraversableResourcesLoaderz�
    Adapt loaders to provide TraversableResources and other
    compatibility.

    Used primarily for Python 3.9 and earlier where the native
    loaders do not yet implement TraversableResources.
    c��||_yr��spec)�selfrs  r�__init__z#TraversableResourcesLoader.__init__(s	����	rc�.�|jjSr)r�origin)rs r�pathzTraversableResourcesLoader.path+s���y�y���rc�����ddlm�m}�fd�}�fd�}d���fd�}��fd�}|�j�xsW|�j�xsC|�j�xs/|�j�xs|j	�j�S)N�)�readers�	_adaptersc���tt�5�j|j|j�cddd�S#1swYyxYwr)r�AttributeError�	ZipReader�loader�name�rrs �r�_zip_readerzCTraversableResourcesLoader.get_resource_reader.<locals>._zip_reader2s/����.�)��(�(����d�i�i�@�*�)�)�s�&A�A
c���ttt�5�j|j�cddd�S#1swYyxYwr)rr �
ValueError�NamespaceReader�submodule_search_locationsr$s �r�_namespace_readerzITraversableResourcesLoader.get_resource_reader.<locals>._namespace_reader6s-����.�*�5��.�.�t�/N�/N�O�6�5�5�s	�;�Ac��tt�5|jj|j�cddd�S#1swYyxYwr)rr r"�get_resource_readerr#rs r�_available_readerzITraversableResourcesLoader.get_resource_reader.<locals>._available_reader:s,���.�)��{�{�6�6�t�y�y�A�*�)�)�s	�%?�Ac�4���|�}t|d�r|SdS)N�files)�hasattr)r�readerr-s  �r�_native_readerzFTraversableResourcesLoader.get_resource_reader.<locals>._native_reader>s!���&�t�,�F�$�V�W�5�6�?�4�?rc���	tj�j�}|j	�r�j��Sy#t$rYywxYwr)�pathlibrr�	TypeError�exists�
FileReader)rrrrs  ��r�_file_readerzDTraversableResourcesLoader.get_resource_reader.<locals>._file_readerBsO���
��|�|�D�I�I�.���{�{�}��)�)�$�/�/����
��
�s�A�	A�A)�rrr�CompatibilityFiles)	rr#rr%r*r2r8r-rs	`      @@rr,z.TraversableResourcesLoader.get_resource_reader/s����(�	A�	P�	B�	@�	0�
�4�9�9�%�
7�
��	�	�"�
7�
�d�i�i�(�

7�
����#�
7��+�+�D�I�I�6�	
rN)�__name__�
__module__�__qualname__�__doc__r�propertyrr,rrrrrs%����� �� �)
rrc�N�ddlm}|j|jt�S)z�
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.

    Supersedes _adapters.wrap_spec to use TraversableResourcesLoader
    from above for older Python compatibility (<3.10).
    r)r)r9r�SpecLoaderAdapter�__spec__r)�packagers  r�	wrap_specrD[s!����&�&�w�'7�'7�9S�T�Tr)r�	zos.PathLike[str])�abc�os�sysr4�
contextlibr�typingr�version_info�zipfiler�ZipPath�zippr	�ImportErrorr�ABCrrD�str�PathLike�StrPathrrr�<module>rTs����	�
�������w��'�&��(���
9
�9
�x
U����v���C����S�)�)�*�G��C�+�+�,�G��s��������w�w�H��s#�B�B�B�
B�B"�!B"site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_adapters.cpython-312.pyc000064400000023045151732701020030313 0ustar00python3.12�

��_i���r�ddlmZddlmZddlmZGd�d�ZGd�d�Zdd	�ZGd
�d�Z	d�Z
y
)�)�suppress)�
TextIOWrapper�)�abcc�"�eZdZdZd�fd�Zd�Zy)�SpecLoaderAdapterz>
    Adapt a package spec to adapt the underlying loader.
    c��|jS�N)�loader��specs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_adapters.py�<lambda>zSpecLoaderAdapter.<lambda>s��$�+�+�c�,�||_||�|_yr
)r
r)�selfr
�adapters   r�__init__zSpecLoaderAdapter.__init__s����	��d�m��rc�.�t|j|�Sr
)�getattrr
�r�names  r�__getattr__zSpecLoaderAdapter.__getattr__s���t�y�y�$�'�'rN)�__name__�
__module__�__qualname__�__doc__rr�rrrrs���&>�$�(rrc��eZdZdZd�Zd�Zy)�TraversableResourcesLoaderz9
    Adapt a loader to provide TraversableResources.
    c��||_yr
r�rr
s  rrz#TraversableResourcesLoader.__init__�	����	rc�H�t|j�j�Sr
)�CompatibilityFilesr
�_nativers  r�get_resource_readerz.TraversableResourcesLoader.get_resource_readers��!�$�)�)�,�4�4�6�6rN)rrrrrr'rrrr r s����7rr c�l�|dk(rt|g|��i|��S|dk(r|Stdj|���)N�r�rbz8Invalid mode value '{}', only 'r' and 'rb' are supported)r�
ValueError�format)�file�mode�args�kwargss    r�_io_wrapperr1 sE���s�{��T�3�D�3�F�3�3�	
�����
�B�I�I�$�O��rc��eZdZdZGd�dej
�ZGd�dej
�ZGd�dej
�Zd�Z	e
d	��Zd
�Zd�Z
d�Zy
)r%zj
    Adapter for an existing or non-existent resource reader
    to provide a compatibility .files().
    c�D�eZdZdZd�Zd�Zd�ZeZd�Ze	d��Z
d	d�Zy)
�CompatibilityFiles.SpecPathzk
        Path tied to a module spec.
        Can be read and exposes the resource reader children.
        c� �||_||_yr
)�_spec�_reader)rr
�readers   rrz$CompatibilityFiles.SpecPath.__init__6s���D�J�!�D�Lrc����jstd�St�fd��jj�D��S)Nrc3�^�K�|]$}tj�j|����&y�wr
)r%�	ChildPathr7)�.0�pathrs  �r�	<genexpr>z6CompatibilityFiles.SpecPath.iterdir.<locals>.<genexpr>=s*������3�D�#�,�,�T�\�\�4�@�3�s�*-)r7�iter�contents�rs`r�iterdirz#CompatibilityFiles.SpecPath.iterdir:s:����<�<��B�x���� �L�L�1�1�3���
rc��y�NFrrAs r�is_filez#CompatibilityFiles.SpecPath.is_fileB���rc��|jstj|�Stj|j|�Sr
)r7r%�
OrphanPathr;�r�others  r�joinpathz$CompatibilityFiles.SpecPath.joinpathGs1���<�<�)�4�4�U�;�;�%�/�/����e�D�Drc�.�|jjSr
)r6rrAs rrz CompatibilityFiles.SpecPath.nameLs���:�:�?�?�"rc�T�t|jjd�|g|��i|��Sr
)r1r7�
open_resource�rr.r/r0s    r�openz CompatibilityFiles.SpecPath.openPs)���t�|�|�9�9�$�?��W��W�PV�W�WrN�r)�rrrrrrBrE�is_dirrK�propertyrrPrrr�SpecPathr40s=��	�
	"�	�	���	E�

�	#�
�	#�	XrrUc�F�eZdZdZd�Zd�Zd�Zd�Zd�Ze	d��Z
d
d�Zy	)�CompatibilityFiles.ChildPathzw
        Path tied to a resource reader child.
        Can be read but doesn't expose any meaningful children.
        c� �||_||_yr
)r7�_name)rr8rs   rrz%CompatibilityFiles.ChildPath.__init__Ys��!�D�L��D�Jrc��td�S�Nr�r?rAs rrBz$CompatibilityFiles.ChildPath.iterdir]�����8�Orc�L�|jj|j�Sr
)r7�is_resourcerrAs rrEz$CompatibilityFiles.ChildPath.is_file`s���<�<�+�+�D�I�I�6�6rc�$�|j�Sr
)rErAs rrSz#CompatibilityFiles.ChildPath.is_dircs���|�|�~�%�%rc�B�tj|j|�Sr
)r%rHrrIs  rrKz%CompatibilityFiles.ChildPath.joinpathfs��%�0�0����E�B�Brc��|jSr
)rYrAs rrz!CompatibilityFiles.ChildPath.nameis���:�:�rc�h�t|jj|j�|g|��i|��Sr
)r1r7rNrrOs    rrPz!CompatibilityFiles.ChildPath.openms7������*�*�4�9�9�5�t��>B��FL��
rNrQrRrrrr;rWSs:��	�
	�	�	7�	&�	C�
�	�
�	�	rr;c�D�eZdZdZd�Zd�Zd�ZeZd�Ze	d��Z
d	d�Zy)
�CompatibilityFiles.OrphanPathz�
        Orphan path, not tied to a module spec or resource reader.
        Can't be read and doesn't expose any meaningful children.
        c�D�t|�dkrtd��||_y)Nrz/Need at least one path part to construct a path)�lenr+�_path)r�
path_partss  rrz&CompatibilityFiles.OrphanPath.__init__xs!���:���"� �!R�S�S�#�D�Jrc��td�Sr[r\rAs rrBz%CompatibilityFiles.OrphanPath.iterdir}r]rc��yrDrrAs rrEz%CompatibilityFiles.OrphanPath.is_file�rFrc�D�tjg|j�|���Sr
)r%rHrhrIs  rrKz&CompatibilityFiles.OrphanPath.joinpath�s��%�0�0�D�$�*�*�D�e�D�Drc� �|jdS)N���)rhrAs rrz"CompatibilityFiles.OrphanPath.name�s���:�:�b�>�!rc��td��)NzCan't open orphan path)�FileNotFoundErrorrOs    rrPz"CompatibilityFiles.OrphanPath.open�s��#�$<�=�=rNrQrRrrrrHrers<��	�
	$�
	�	���	E�
�	"�
�	"�	>rrHc��||_yr
rr"s  rrzCompatibilityFiles.__init__�r#rc��tt�5|jjj	|jj
�cddd�S#1swYyxYwr
)r�AttributeErrorr
rr'rrAs rr7zCompatibilityFiles._reader�s6��
�n�
%��9�9�#�#�7�7��	�	���G�&�
%�
%�s�9A�Ac�:�|j}t|d�r|S|S)zB
        Return the native reader if it supports files().
        �files)r7�hasattr)rr8s  rr&zCompatibilityFiles._native�s!������ ���1�v�;�t�;rc�.�t|j|�Sr
)rr7)r�attrs  rrzCompatibilityFiles.__getattr__�s���t�|�|�T�*�*rc�V�tj|j|j�Sr
)r%rUr
r7rAs rruzCompatibilityFiles.files�s��!�*�*�4�9�9�d�l�l�C�CrN)rrrrr�TraversablerUr;rHrrTr7r&rrurrrr%r%*se���
!X�3�?�?�!X�F�C�O�O��>>�S�_�_�>�:��H��H�<�+�Drr%c�6�t|jt�S)z`
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.
    )r�__spec__r )�packages r�	wrap_specr~�s��
�W�-�-�/I�J�JrNrQ)�
contextlibr�ior�rrr r1r%r~rrr�<module>r�s<�����
(�
(�	7�	7��xD�xD�vKrsite-packages/pkg_resources/_vendor/importlib_resources/__pycache__/simple.cpython-312.pyc000064400000012706151732701020027644 0ustar00python3.12�

��_i
���dZddlZddlZddlZddlmZmZddlmZmZGd�dej�Z
Gd�d	e�ZGd
�de�ZGd�d
ee
�Z
y)z+
Interface adapters for low-level readers.
�N)�BinaryIO�List�)�Traversable�TraversableResourcesc���eZdZdZeejdefd���Zejde	dfd��Z
ejde	efd��Zejdedefd��Z
ed��Zy	)
�SimpleReaderzQ
    The minimum, low-level interface required from a resource
    provider.
    �returnc��y)zP
        The name of the package for which this reader loads resources.
        N���selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/simple.py�packagezSimpleReader.package���c��y)zo
        Obtain an iterable of SimpleReader for available
        child containers (e.g. directories).
        Nrr
s r�childrenzSimpleReader.childrenrrc��y)zL
        Obtain available named resources for this virtual package.
        Nrr
s r�	resourceszSimpleReader.resources!rr�resourcec��y)z:
        Obtain a File-like for a named resource.
        Nr)rrs  r�open_binaryzSimpleReader.open_binary'rrc�>�|jjd�dS)N�.���)r�splitr
s r�namezSimpleReader.name-s���|�|�!�!�#�&�r�*�*rN)�__name__�
__module__�__qualname__�__doc__�property�abc�abstractmethod�strrrrrrrrrrrr	r	
s����
����������
	����$�~�.����	����4��9����
	����C��H����
�+��+rr	c�4�eZdZdZdefd�Zd�Zd�Zd�Zd�Z	y)	�ResourceContainerzI
    Traversable container for a package's resources via its reader.
    �readerc��||_y�N)r))rr)s  r�__init__zResourceContainer.__init__7s	����rc��y�NTrr
s r�is_dirzResourceContainer.is_dir:���rc��y�NFrr
s r�is_filezResourceContainer.is_file=���rc����fd��jjD�}tt�jj	��}tj||�S)Nc3�6�K�|]}t�|����y�wr+)�ResourceHandle)�.0rrs  �r�	<genexpr>z,ResourceContainer.iterdir.<locals>.<genexpr>As�����N�8M����d�+�8M�s�)r)r�mapr(r�	itertools�chain)r�files�dirss`  r�iterdirzResourceContainer.iterdir@sB���N����8M�8M�N���$�d�k�k�&:�&:�&<�=�����u�d�+�+rc��t��r+)�IsADirectoryError)r�args�kwargss   r�openzResourceContainer.openEs���!�!rN)
rr r!r"r	r,r/r3r?rDrrrr(r(2s'����|����,�
"rr(c�:�eZdZdZdedefd�Zd�Zd�Zd
d�Z	d�Z
y	)r7z9
    Handle to a named resource in a ResourceReader.
    �parentrc� �||_||_yr+)rFr)rrFrs   rr,zResourceHandle.__init__Ns�������	rc��yr.rr
s rr3zResourceHandle.is_fileRr0rc��yr2rr
s rr/zResourceHandle.is_dirUr4rc��|jjj|j�}d|vrt	j
|i|��}|S)N�b)rFr)rr�io�
TextIOWrapper)r�moderBrC�streams     rrDzResourceHandle.openXsA�����#�#�/�/��	�	�:���d�?��%�%�t�6�v�6�F��
rc��td��)NzCannot traverse into a resource)�RuntimeError)rrs  r�joinpathzResourceHandle.joinpath^s���<�=�=rN)�r)rr r!r"r(r&r,r3r/rDrRrrrr7r7Is/����0�������>rr7c��eZdZdZd�Zy)�TraversableReaderz�
    A TraversableResources based on SimpleReader. Resource providers
    may derive from this class to provide the TraversableResources
    interface by supplying the SimpleReader interface.
    c��t|�Sr+)r(r
s rr=zTraversableReader.filesis
�� ��&�&rN)rr r!r"r=rrrrUrUbs���'rrU)r"r$rLr;�typingrrrr�ABCr	r(r7rUrrr�<module>rYsS����	��!�2�"+�3�7�7�"+�J"��"�.>�[�>�2'�,�l�'rsite-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_itertools.cpython-312.pyc000064400000002326151732701020030533 0ustar00python3.12�

��_it���ddlmZddlmZmZmZmZmZmZm	Z	ed�Z
ed�Z	d
dee
deee
gefdee
fd	�Zy)�)�filterfalse)�Callable�Iterable�Iterator�Optional�Set�TypeVar�Union�_T�_UN�iterable�key�returnc#��K�t�}|j}|�(t|j|�D]}||�|���y|D]}||�}||vs�||�|���y�w)zHList unique elements, preserving order. Remember all elements ever seen.N)�set�addr�__contains__)r
r�seen�seen_add�element�ks      ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_itertools.py�unique_everseenrsj���� #�u�D��x�x�H�
�{�"�4�#4�#4�h�?�G��W���M�@� �G��G��A���}�����
�	 �s�AA$�A$)N)
�	itertoolsr�typingrrrrrr	r
rrr��r�<module>rsg��!����
�T�]���T�]��AE���r�l��!)�(�B�4��8�*<�!=��
�b�\�rpython3.12/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/abc.cpython-312.pyc000064400000021337151732701020027157 0ustar00�

��_i����ddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZgd�ZGd�dej"��ZGd	�d
e�Ze
Gd�de��ZGd
�de�Zy)�N)�Any�BinaryIO�Iterable�Iterator�NoReturn�Text�Optional�)�runtime_checkable�Protocol�StrPath)�ResourceReader�Traversable�TraversableResourcesc���eZdZdZej
dedefd��Zej
dedefd��Z	ej
dede
fd��Zej
dee
fd��Zy	)
rzDAbstract base class for loaders to provide resource reading support.�resource�returnc��t�)z�Return an opened, file-like object for binary reading.

        The 'resource' argument is expected to represent only a file name.
        If the resource cannot be found, FileNotFoundError is raised.
        ��FileNotFoundError��selfrs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/abc.py�
open_resourcezResourceReader.open_resources
�� ��c��t�)z�Return the file system path to the specified resource.

        The 'resource' argument is expected to represent only a file name.
        If the resource does not exist on the file system, raise
        FileNotFoundError.
        rrs  r�
resource_pathzResourceReader.resource_paths
�� �r�pathc��t�)zjReturn True if the named 'path' is a resource.

        Files are resources, directories are not.
        r�rrs  r�is_resourcezResourceReader.is_resource)s
�� �rc��t�)z+Return an iterable of entries in `package`.r�rs r�contentszResourceReader.contents1s
�� �rN)�__name__�
__module__�__qualname__�__doc__�abc�abstractmethodrrrr�boolr!r�strr$�rrrr
s���N����	 �d�	 �x�	 ��	 �	���
 �d�
 �t�
 ��
 �	��� �� �� �� �	��� �(�3�-� �� rr)�	metaclassc��eZdZy)�TraversalErrorN)r%r&r'r-rrr0r07s��rr0c�2�eZdZdZej
dedfd��Zdefd�Z	dde
edefd�Zej
de
fd��Zej
de
fd	��Zd
eddfd�Zdeddfd
�Zej
dd��Zeej
defd���Zy)rz�
    An object with a subset of pathlib.Path methods suitable for
    traversing directories and opening files.

    Any exceptions that occur when accessing the backing resource
    may propagate unaltered.
    rc��y)z3
        Yield Traversable objects in self
        Nr-r#s r�iterdirzTraversable.iterdirE��rc�p�|jd�5}|j�cddd�S#1swYyxYw)z0
        Read contents of self as bytes
        �rbN��open�read)r�strms  r�
read_byteszTraversable.read_bytesKs$���Y�Y�t�_���9�9�;��_�_�s�,�5N�encodingc�r�|j|��5}|j�cddd�S#1swYyxYw)z/
        Read contents of self as text
        )r<Nr7)rr<r:s   r�	read_textzTraversable.read_textRs)���Y�Y��Y�
)�T��9�9�;�*�
)�
)�s�-�6c��y)z4
        Return True if self is a directory
        Nr-r#s r�is_dirzTraversable.is_dirYr4rc��y)z/
        Return True if self is a file
        Nr-r#s r�is_filezTraversable.is_file_r4r�descendantsc�L��|s|Stjjd�ttj
|�D��}t
|���fd�|j�D�}	t
|�}|j|�S#t$rtd�t|���wxYw)z�
        Return Traversable resolved with any descendants applied.

        Each descendant should be a path segment relative to self
        and each may contain multiple levels separated by
        ``posixpath.sep`` (``/``).
        c3�4K�|]}|j���y�w�N)�parts)�.0rs  r�	<genexpr>z'Traversable.joinpath.<locals>.<genexpr>os����.
�#J�4�D�J�J�#J���c3�B�K�|]}|j�k(s�|���y�wrF��name)rH�traversable�targets  �rrIz'Traversable.joinpath.<locals>.<genexpr>ss#�����
�+9�K�[�=M�=M�QW�=W�K�>�s��z"Target not found during traversal.)�	itertools�chain�
from_iterable�map�pathlib�
PurePosixPath�nextr3�
StopIterationr0�list�joinpath)rrC�names�matches�matchrOs     @rrYzTraversable.joinpathes������K����-�-�.
�#&�w�'<�'<�k�#J�.
�
���e���
�+/�<�<�>�
��	���M�E�
�u�~�~�u�%�%��	�	� �4�f�d�5�k��
�	�s�)B� B#�childc�$�|j|�S)z2
        Return Traversable child in self
        )rY)rr]s  r�__truediv__zTraversable.__truediv__~s���}�}�U�#�#rc��y)z�
        mode may be 'r' or 'rb' to open as text or binary. Return a handle
        suitable for reading (same as pathlib.Path.open).

        When opening as text, accepts encoding parameters such as those
        accepted by io.TextIOWrapper.
        Nr-)r�mode�args�kwargss    rr8zTraversable.open�r4rc��y)zM
        The base name of this object without any parent references.
        Nr-r#s rrMzTraversable.name�r4rrF)�r)r%r&r'r(r)r*rr3�bytesr;r	r,r>r+r@rBr
rYr_r8�propertyrMr-rrrr;s����	�����-�0����
�E���(�3�-��3��	��������
	��������
&�W�&��&�2$��$�]�$�	�����������c����rrc��eZdZdZej
dd��Zdedejfd�Z
dedefd�Z
dedefd�Zdeefd	�Zy
)rzI
    The required interface for providing traversable
    resources.
    rc��y)z3Return a Traversable object for the loaded package.Nr-r#s r�fileszTraversableResources.files�r4rrc�^�|j�j|�jd�S)Nr6)rjrYr8rs  rrz"TraversableResources.open_resource�s$���z�z�|�$�$�X�.�3�3�D�9�9rc��t|��rFrrs  rrz"TraversableResources.resource_path�s
����)�)rrc�\�|j�j|�j�SrF)rjrYrBr s  rr!z TraversableResources.is_resource�s"���z�z�|�$�$�T�*�2�2�4�4rc�L�d�|j�j�D�S)Nc3�4K�|]}|j���y�wrFrL)rH�items  rrIz0TraversableResources.contents.<locals>.<genexpr>�s����=�&<�d��	�	�&<�rJ)rjr3r#s rr$zTraversableResources.contents�s��=�d�j�j�l�&:�&:�&<�=�=rN)rr)r%r&r'r(r)r*rjr
�io�BufferedReaderrrrrr+r!rr,r$r-rrrr�sr���
	���B��B�:�g�:�"�2C�2C�:�*�c�*�h�*�5��5�D�5�>�(�3�-�>rr)r)rqrPrT�typingrrrrrrr	�_compatrrr
�__all__�ABCMetar�	Exceptionr0rrr-rr�<module>rxsp��
�	���N�N�N�9�9�D��' �s�{�{�' �T	�Y�	��W�(�W��W�t>�>�>rsite-packages/pkg_resources/_vendor/importlib_resources/__pycache__/readers.cpython-312.pyc000064400000017045151732701020030001 0ustar00python3.12�

��_i�
����ddlZddlZddlZddlmZddlmZddlmZd�Z	Gd�dej�ZGd	�d
ej�ZGd�dej�ZGd
�dej�Zy)�N�)�abc)�unique_everseen)�ZipPathc�R�ttjj|��S�N)�iter�collections�OrderedDict�fromkeys)�itemss ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/readers.py�remove_duplicatesrs����'�'�0�0��7�8�8�c��eZdZd�Zd�Zd�Zy)�
FileReaderc�`�tj|j�j|_yr)�pathlib�Path�path�parent)�self�loaders  r�__init__zFileReader.__init__s���L�L����-�4�4��	rc�J�t|jj|��S�z{
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        ��strr�joinpath�r�resources  r�
resource_pathzFileReader.resource_path����4�9�9�%�%�h�/�0�0rc��|jSr�r�rs r�fileszFileReader.files����y�y�rN��__name__�
__module__�__qualname__rr"r'�rrrrs��5�1�rrc�0��eZdZd�Z�fd�Zd�Zd�Z�xZS)�	ZipReaderc��|jd�\}}}|jjdd�|zdz|_|j|_y)N�.�\�/)�
rpartition�prefix�replace�archive)rr�module�_�names     rrzZipReader.__init__ sE���&�&�s�+�
��1�d��m�m�+�+�D�#�6��=��C����~�~��rc�v��	t�|�|�S#t$r}t|jd��d}~wwxYw�Nr)�super�
open_resource�KeyError�FileNotFoundError�args)rr!�exc�	__class__s   �rr>zZipReader.open_resource%s;���	1��7�(��2�2���	1�#�C�H�H�Q�K�0�0��	1�s��	8�3�8c��|j�j|�}|j�xr|j�Sr)r'r�is_file�exists)rr�targets   r�is_resourcezZipReader.is_resource+s2������&�&�t�,���~�~��3�F�M�M�O�3rc�B�t|j|j�Sr)rr7r5r&s rr'zZipReader.files1s���t�|�|�T�[�[�1�1r)r*r+r,rr>rHr'�
__classcell__�rCs@rr/r/s���&�
1�4�2rr/c�b��eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	�fd�Z
d	�Zed
��Z
d�Z�xZS)�MultiplexedPathz�
    Given a series of Traversable objects, implement a merged
    version of the interface across all objects. Useful for
    namespace packages which may be multihomed at a single
    name.
    c���tttjt	|���|_|j
s
d}t
|��td�|j
D��std��y)Nz.MultiplexedPath must contain at least one pathc3�<K�|]}|j����y�wr)�is_dir��.0rs  r�	<genexpr>z+MultiplexedPath.__init__.<locals>.<genexpr>Bs����9�[�T�4�;�;�=�[�s�z)MultiplexedPath only supports directories)	�list�maprrr�_pathsr@�all�NotADirectoryError)r�paths�messages   rrzMultiplexedPath.__init__=sY���3�w�|�|�->�u�-E�F�G����{�{�F�G�#�G�,�,��9�T�[�[�9�9�$�%P�Q�Q�:rc�h�d�|jD�}t|tjd���S)Nc3�JK�|]}|j�D]}|����y�wr)�iterdir)rRr�files   rrSz*MultiplexedPath.iterdir.<locals>.<genexpr>Fs����I�+�$�$�,�,�.�$��.��+�s�!#r:)�key)rVr�operator�
attrgetter)rr's  rr]zMultiplexedPath.iterdirEs(��I�$�+�+�I���u�(�*=�*=�f�*E�F�Frc��t|�d����Nz is not a file�r@r&s r�
read_byteszMultiplexedPath.read_bytesI����4�&�� 7�8�8rc��t|�d���rcrd�rrA�kwargss   r�	read_textzMultiplexedPath.read_textLrfrc��y)NTr-r&s rrPzMultiplexedPath.is_dirOs��rc��y)NFr-r&s rrEzMultiplexedPath.is_fileRs��rc���	t�|�|�S#tj$r|jdj|�cYSwxYwr<)r=rr�TraversalErrorrV)r�descendantsrCs  �rrzMultiplexedPath.joinpathUsJ���	9��7�#�[�1�1���!�!�	9�+�4�;�;�q�>�*�*�K�8�8�	9�s��/A�Ac��t|�d���rcrdrhs   r�openzMultiplexedPath.open]rfrc�4�|jdjSr<)rVr:r&s rr:zMultiplexedPath.name`s���{�{�1�~�"�"�"rc�R�djd�|jD��}d|�d�S)Nz, c3�(K�|]
}d|�d����y�w)�'Nr-rQs  rrSz+MultiplexedPath.__repr__.<locals>.<genexpr>es����>�+�$�A�d�V�1�+�+�s�zMultiplexedPath(�))�joinrV)rrYs  r�__repr__zMultiplexedPath.__repr__ds)���	�	�>�$�+�+�>�>��!�%���*�*r)r*r+r,�__doc__rr]rerjrPrErrq�propertyr:rxrJrKs@rrMrM5sK����R�G�9�9���9�9��#��#�+rrMc��eZdZd�Zd�Zd�Zy)�NamespaceReaderc�`�dt|�vrtd��tt|��|_y)N�
NamespacePathzInvalid path)r�
ValueErrorrMrTr)r�namespace_paths  rrzNamespaceReader.__init__js+���#�n�"5�5��^�,�,�#�T�.�%9�:��	rc�J�t|jj|��Srrr s  rr"zNamespaceReader.resource_pathor#rc��|jSrr%r&s rr'zNamespaceReader.fileswr(rNr)r-rrr|r|is��;�
1�rr|)r
rr`�r�
_itertoolsr�_compatrr�TraversableResourcesrr/�TraversablerMr|r-rr�<module>r�sc������'��9�
��)�)�
� 2��(�(�2�,1+�c�o�o�1+�h�c�.�.�rsite-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_legacy.cpython-312.pyc000064400000013344151732701030027756 0ustar00python3.12�

��_i�
���ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZddlm
Z
eejefZeZd�Zdedefd�Zed	ed
ede	fd��Zed	ed
edefd��Ze		dd	ed
ed
edede
f
d��Ze		dd	ed
ed
ededef
d��Zed	edeefd��Zed	ededefd��Zed	ed
edeej8fd��Zy)�N)�Union�Iterable�ContextManager�BinaryIO�TextIO�Any�)�_commonc�B��tj���fd��}|S)Nc�f��tj�j�d�td���|i|��S)Nz� is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.�)�
stacklevel)�warnings�warn�__name__�DeprecationWarning)�args�kwargs�funcs  ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_legacy.py�wrapperzdeprecated.<locals>.wrappers>����
�
��}�}�o�P�
P�
��	
��T�$�V�$�$�)�	functools�wraps)rrs` r�
deprecatedrs%����_�_�T��%��%��Nr�path�returnc��t|�}tjj|�\}}|rt	|�d���|S)z�Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    z must be only a file name)�str�osr�split�
ValueError)r�str_path�parent�	file_names    r�normalize_pathr&s@��
�4�y�H����
�
�h�/��F�I�
��D�8�#<�=�>�>��r�package�resourcec�b�tj|�t|�zjd�S)zDReturn a file-like object opened for binary reading of the resource.�rb�r
�filesr&�open�r'r(s  r�open_binaryr/*s(��
�M�M�'�"�^�H�%=�=�C�C�D�I�Irc�`�tj|�t|�zj�S)z+Return the binary contents of the resource.)r
r,r&�
read_bytesr.s  r�read_binaryr20s&��
�M�M�'�"�^�H�%=�=�I�I�K�Kr�encoding�errorsc�h�tj|�t|�zjd||��S)zBReturn a file-like object opened for text reading of the resource.�r)r3r4r+)r'r(r3r4s    r�	open_textr76s7��
�M�M�'�"�^�H�%=�=�C�C��h�v�D��rc�j�t||||�5}|j�cddd�S#1swYyxYw)z�Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    N)r7�read)r'r(r3r4�fps     r�	read_textr;Cs)��
�7�H�h��	7�2��w�w�y�
8�	7�	7�s�)�2c��tj|�j�D�cgc]}|j��c}Scc}w)z�Return an iterable of entries in `package`.

    Note that not all entries are resources.  Specifically, directories are
    not considered resources.  Use `is_resource()` on each entry returned here
    to check if it is a resource or not.
    )r
r,�iterdir�name)r'rs  r�contentsr?Ss4��#*�-�-��"8�"@�"@�"B�C�"B�$�D�I�I�"B�C�C��Cs�<r>c���t|��t�fd�tj|�j	�D��S)zYTrue if `name` is a resource inside `package`.

    Directories are *not* resources.
    c3�`�K�|]%}|j�k(xr|j����'y�w)N)r>�is_file)�.0�traversabler(s  �r�	<genexpr>zis_resource.<locals>.<genexpr>es5������;�K�	���H�$�>��)<�)<�)>�>�;�s�+.)r&�anyr
r,r=)r'r>r(s  @r�is_resourcerG^s;����d�#�H���"�=�=��1�9�9�;���rc�j�tjtj|�t|�z�S)akA context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    )r
�as_filer,r&r.s  rrrks&���?�?�7�=�=��1�N�8�4L�L�M�Mr)zutf-8�strict)rr �pathlib�typesr�typingrrrrrr�r
�
ModuleTyper�Package�Resourcerr&r/�bytesr2r7r;r?�boolrG�Pathr�rr�<module>rVs����	����I�I��
�� � �#�%�
&�����	��	��	��J��J�H�J��J��J�
�L��L�H�L��L��L�
���		�
�	��	��	�
�		�
�	��	����	�
������
�	�
	�����D�g�D�(�3�-�D��D��	��	��	��	��	��N�
�N��N��G�L�L�!�N��Nrsite-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_common.cpython-312.pyc000064400000021133151732701030027775 0ustar00python3.12�

��_iQ��2�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZm
Z
ddlmZmZddlmZeej&efZeZd�Zeddeedefd	��Zd
ej&deefd�Zej4deedej&fd
��Zej8dedej&fd��Zej8dddej&fd��Zd�Zd
ej&fd�Zej@	dejBd�d��Z"d�Z#dede$fd�Z%ej4d��Z&e&j9ejN�ej@d���Zej@dejPfd��Z)ej@d��Z*d�Z+y)�N)�Union�Optional�cast�)�ResourceReader�Traversable)�	wrap_specc�`���t��tj����f��fd�	�}|S)a
    Replace 'package' parameter as 'anchor' and warn about the change.

    Other errors should fall through.

    >>> files('a', 'b')
    Traceback (most recent call last):
    TypeError: files() takes from 0 to 1 positional arguments but 2 were given
    c���|�ur1|�ur	�||�Stjdtd���|�S|�ur��S�|�S)Nz/First parameter to files is renamed to 'anchor'�)�
stacklevel)�warnings�warn�DeprecationWarning)�anchor�package�func�	undefineds  ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_common.py�wrapperz"package_to_anchor.<locals>.wrapper!sZ����)�#��Y�&��F�G�,�,��M�M�A�"��
�
��=� �
�y�
 ��6�M��F�|��)�object�	functools�wraps)rrrs` @r�package_to_anchorrs3�����I��_�_�T�� �)�����Nrr�returnc�*�tt|��S)z3
    Get a Traversable resource for an anchor.
    )�from_package�resolve)rs r�filesr 3s��
����(�(rrc�r�|j}t|jdd�}|�y||j�S)z?
    Return the package's loader if it's a ResourceReader.
    �get_resource_readerN)�__spec__�getattr�loader�name�r�spec�readers   rr"r";s9�����D�
�T�[�[�"7��
>�F�
�~���$�)�)��r�candc�6�ttj|�S�N)r�types�
ModuleType�r*s rrrKs���� � �$�'�'rc�,�tj|�Sr,)�	importlib�
import_moduler/s r�_r3Ps���"�"�4�(�(rc�B�tt�jd�S)N�__name__)r�
_infer_caller�	f_globalsr/s rr3r3Us���=�?�,�,�Z�8�9�9rc��d�}d�}tj|tj��}tj||�}t	|�j
S)zS
    Walk the stack and find the frame of the first caller not in this module.
    c�(�|jtk(Sr,)�filename�__file__��
frame_infos r�is_this_filez#_infer_caller.<locals>.is_this_file_s���"�"�h�.�.rc� �|jdk(S)Nr)�functionr<s r�
is_wrapperz!_infer_caller.<locals>.is_wrapperbs���"�"�i�/�/r)�	itertools�filterfalse�inspect�stack�next�frame)r>rA�
not_this_file�callerss    rr6r6ZsH��
/�0��)�)�,��
�
��H�M��#�#�J�
�>�G���=���rc��t|�}|jj|j�}|j	�S)z=
    Return a Traversable object for the given package.

    )r	r%r"r&r r's   rrrks2��
�W��D�
�[�[�
,�
,�T�Y�Y�
7�F��<�<�>�r)�
_os_removec#�pK�tj|��\}}		tj||��tj|�~tj|���	||�y#tj|�wxYw#t$rYywxYw#	||�w#t$rYwwxYwxYw�w�N)�suffix)�tempfile�mkstemp�os�write�close�pathlib�Path�FileNotFoundError)r)rNrK�fd�raw_paths     r�	_tempfilerYus������#�#�6�2�L�B���	��H�H�R���"��H�H�R�L���l�l�8�$�$�	��x� ��
�H�H�R�L��!�	��	��	��x� �� �	��	�so�B6�A0�-B�'B
�/B6�0B�B�
	B�B6�B�B6�B3�B$�#B3�$	B0�-B3�/B0�0B3�3B6c�D�t|j|j��SrM)rY�
read_bytesr&��paths r�
_temp_filer^�s���T�_�_�T�Y�Y�7�7rr]c��tjt�5|j�cddd�S#1swYyxYw)a
    Some Traversables implement ``is_dir()`` to raise an
    exception (i.e. ``FileNotFoundError``) when the
    directory doesn't exist. This function wraps that call
    to always return a boolean and only return True
    if there's a dir and it exists.
    NF)�
contextlib�suppressrV�is_dirr\s r�_is_present_dirrc�s+��
�	�	�.�	/��{�{�}�
0�	/�	/��s�4�=c�D�t|�rt|�St|�S)zu
    Given a Traversable object, return that object as a
    path on the local file system in a context manager.
    )rc�	_temp_dirr^r\s r�as_filerf�s��.�d�3�9�T�?�I��D�9I�Irc#�K�|��y�w)z7
    Degenerate behavior for pathlib.Path objects.
    N�r\s rr3r3�s
�����J�s��dirc#�hK�|5}tj|���ddd�y#1swYyxYw�w)zD
    Wrap tempfile.TemporyDirectory to return a pathlib object.
    N)rTrU)ri�results  r�
_temp_pathrl�s%����


���l�l�6�"�"�

���s�2�&�	2�/�2c#�K�|j�sJ�ttj��5}t	||���ddd�y#1swYyxYw�w)zt
    Given a traversable dir, recursively replicate the whole tree
    to the file system in a context manager.
    N)rbrlrO�TemporaryDirectory�_write_contents)r]�temp_dirs  rrere�sA�����;�;�=��=�	�H�/�/�1�	2�h��h��-�-�
3�	2�	2�s�0A�A
�	A�
A�Ac��|j|j�}|j�r3|j�|j	�D]}t||��|S|j
|j��|Sr,)�joinpathr&rb�mkdir�iterdirro�write_bytesr[)�target�source�child�items    rroro�sf���O�O�F�K�K�(�E�
�}�}��
���
��N�N�$�D��E�4�(�%��L�	���&�+�+�-�.��Lrr,)�),rQrTrOrr`r-r1rDrrB�typingrrr�abcrr�_compatr	r.�str�Package�Anchorrr r"�singledispatchr�registerr3r6r�contextmanager�removerYr^�boolrcrfrUrnrlrerorhrr�<module>r�s��	����������(�(�,��
�� � �#�%�
&��	���<�)�(�6�"�)�k�)��)�
��!1�!1�
�h�~�6N�
� ���(�(�6�"�(�u�'7�'7�(��(�	���)�C�)�E�$�$�)��)�	���:�D�:�U�%�%�:��:��"�%�*�*��������y�y�
���48�
�+�
�$�
����J��J�	���'�,�,������� �����#�H�/�/�#��#����.��.�rpython3.12/site-packages/pkg_resources/_vendor/importlib_resources/_compat.py000064400000005555151732701030023520 0ustar00# flake8: noqa

import abc
import os
import sys
import pathlib
from contextlib import suppress
from typing import Union


if sys.version_info >= (3, 10):
    from zipfile import Path as ZipPath  # type: ignore
else:
    from ..zipp import Path as ZipPath  # type: ignore


try:
    from typing import runtime_checkable  # type: ignore
except ImportError:

    def runtime_checkable(cls):  # type: ignore
        return cls


try:
    from typing import Protocol  # type: ignore
except ImportError:
    Protocol = abc.ABC  # type: ignore


class TraversableResourcesLoader:
    """
    Adapt loaders to provide TraversableResources and other
    compatibility.

    Used primarily for Python 3.9 and earlier where the native
    loaders do not yet implement TraversableResources.
    """

    def __init__(self, spec):
        self.spec = spec

    @property
    def path(self):
        return self.spec.origin

    def get_resource_reader(self, name):
        from . import readers, _adapters

        def _zip_reader(spec):
            with suppress(AttributeError):
                return readers.ZipReader(spec.loader, spec.name)

        def _namespace_reader(spec):
            with suppress(AttributeError, ValueError):
                return readers.NamespaceReader(spec.submodule_search_locations)

        def _available_reader(spec):
            with suppress(AttributeError):
                return spec.loader.get_resource_reader(spec.name)

        def _native_reader(spec):
            reader = _available_reader(spec)
            return reader if hasattr(reader, 'files') else None

        def _file_reader(spec):
            try:
                path = pathlib.Path(self.path)
            except TypeError:
                return None
            if path.exists():
                return readers.FileReader(self)

        return (
            # native reader if it supplies 'files'
            _native_reader(self.spec)
            or
            # local ZipReader if a zip module
            _zip_reader(self.spec)
            or
            # local NamespaceReader if a namespace module
            _namespace_reader(self.spec)
            or
            # local FileReader
            _file_reader(self.spec)
            # fallback - adapt the spec ResourceReader to TraversableReader
            or _adapters.CompatibilityFiles(self.spec)
        )


def wrap_spec(package):
    """
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.

    Supersedes _adapters.wrap_spec to use TraversableResourcesLoader
    from above for older Python compatibility (<3.10).
    """
    from . import _adapters

    return _adapters.SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader)


if sys.version_info >= (3, 9):
    StrPath = Union[str, os.PathLike[str]]
else:
    # PathLike is only subscriptable at runtime in 3.9+
    StrPath = Union[str, "os.PathLike[str]"]
python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_adapters.py000064400000010630151732701040024027 0ustar00from contextlib import suppress
from io import TextIOWrapper

from . import abc


class SpecLoaderAdapter:
    """
    Adapt a package spec to adapt the underlying loader.
    """

    def __init__(self, spec, adapter=lambda spec: spec.loader):
        self.spec = spec
        self.loader = adapter(spec)

    def __getattr__(self, name):
        return getattr(self.spec, name)


class TraversableResourcesLoader:
    """
    Adapt a loader to provide TraversableResources.
    """

    def __init__(self, spec):
        self.spec = spec

    def get_resource_reader(self, name):
        return CompatibilityFiles(self.spec)._native()


def _io_wrapper(file, mode='r', *args, **kwargs):
    if mode == 'r':
        return TextIOWrapper(file, *args, **kwargs)
    elif mode == 'rb':
        return file
    raise ValueError(
        "Invalid mode value '{}', only 'r' and 'rb' are supported".format(mode)
    )


class CompatibilityFiles:
    """
    Adapter for an existing or non-existent resource reader
    to provide a compatibility .files().
    """

    class SpecPath(abc.Traversable):
        """
        Path tied to a module spec.
        Can be read and exposes the resource reader children.
        """

        def __init__(self, spec, reader):
            self._spec = spec
            self._reader = reader

        def iterdir(self):
            if not self._reader:
                return iter(())
            return iter(
                CompatibilityFiles.ChildPath(self._reader, path)
                for path in self._reader.contents()
            )

        def is_file(self):
            return False

        is_dir = is_file

        def joinpath(self, other):
            if not self._reader:
                return CompatibilityFiles.OrphanPath(other)
            return CompatibilityFiles.ChildPath(self._reader, other)

        @property
        def name(self):
            return self._spec.name

        def open(self, mode='r', *args, **kwargs):
            return _io_wrapper(self._reader.open_resource(None), mode, *args, **kwargs)

    class ChildPath(abc.Traversable):
        """
        Path tied to a resource reader child.
        Can be read but doesn't expose any meaningful children.
        """

        def __init__(self, reader, name):
            self._reader = reader
            self._name = name

        def iterdir(self):
            return iter(())

        def is_file(self):
            return self._reader.is_resource(self.name)

        def is_dir(self):
            return not self.is_file()

        def joinpath(self, other):
            return CompatibilityFiles.OrphanPath(self.name, other)

        @property
        def name(self):
            return self._name

        def open(self, mode='r', *args, **kwargs):
            return _io_wrapper(
                self._reader.open_resource(self.name), mode, *args, **kwargs
            )

    class OrphanPath(abc.Traversable):
        """
        Orphan path, not tied to a module spec or resource reader.
        Can't be read and doesn't expose any meaningful children.
        """

        def __init__(self, *path_parts):
            if len(path_parts) < 1:
                raise ValueError('Need at least one path part to construct a path')
            self._path = path_parts

        def iterdir(self):
            return iter(())

        def is_file(self):
            return False

        is_dir = is_file

        def joinpath(self, other):
            return CompatibilityFiles.OrphanPath(*self._path, other)

        @property
        def name(self):
            return self._path[-1]

        def open(self, mode='r', *args, **kwargs):
            raise FileNotFoundError("Can't open orphan path")

    def __init__(self, spec):
        self.spec = spec

    @property
    def _reader(self):
        with suppress(AttributeError):
            return self.spec.loader.get_resource_reader(self.spec.name)

    def _native(self):
        """
        Return the native reader if it supports files().
        """
        reader = self._reader
        return reader if hasattr(reader, 'files') else self

    def __getattr__(self, attr):
        return getattr(self._reader, attr)

    def files(self):
        return CompatibilityFiles.SpecPath(self.spec, self._reader)


def wrap_spec(package):
    """
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.
    """
    return SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader)
python3.12/site-packages/pkg_resources/_vendor/importlib_resources/__init__.py000064400000000772151732701040023632 0ustar00"""Read resources contained within a package."""

from ._common import (
    as_file,
    files,
    Package,
)

from ._legacy import (
    contents,
    open_binary,
    read_binary,
    open_text,
    read_text,
    is_resource,
    path,
    Resource,
)

from .abc import ResourceReader


__all__ = [
    'Package',
    'Resource',
    'ResourceReader',
    'as_file',
    'contents',
    'files',
    'is_resource',
    'open_binary',
    'open_text',
    'path',
    'read_binary',
    'read_text',
]
python3.12/site-packages/pkg_resources/_vendor/importlib_resources/py.typed000064400000000000151732701050023201 0ustar00python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_legacy.py000064400000006631151732701050023477 0ustar00import functools
import os
import pathlib
import types
import warnings

from typing import Union, Iterable, ContextManager, BinaryIO, TextIO, Any

from . import _common

Package = Union[types.ModuleType, str]
Resource = str


def deprecated(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
        return func(*args, **kwargs)

    return wrapper


def normalize_path(path: Any) -> str:
    """Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    """
    str_path = str(path)
    parent, file_name = os.path.split(str_path)
    if parent:
        raise ValueError(f'{path!r} must be only a file name')
    return file_name


@deprecated
def open_binary(package: Package, resource: Resource) -> BinaryIO:
    """Return a file-like object opened for binary reading of the resource."""
    return (_common.files(package) / normalize_path(resource)).open('rb')


@deprecated
def read_binary(package: Package, resource: Resource) -> bytes:
    """Return the binary contents of the resource."""
    return (_common.files(package) / normalize_path(resource)).read_bytes()


@deprecated
def open_text(
    package: Package,
    resource: Resource,
    encoding: str = 'utf-8',
    errors: str = 'strict',
) -> TextIO:
    """Return a file-like object opened for text reading of the resource."""
    return (_common.files(package) / normalize_path(resource)).open(
        'r', encoding=encoding, errors=errors
    )


@deprecated
def read_text(
    package: Package,
    resource: Resource,
    encoding: str = 'utf-8',
    errors: str = 'strict',
) -> str:
    """Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    """
    with open_text(package, resource, encoding, errors) as fp:
        return fp.read()


@deprecated
def contents(package: Package) -> Iterable[str]:
    """Return an iterable of entries in `package`.

    Note that not all entries are resources.  Specifically, directories are
    not considered resources.  Use `is_resource()` on each entry returned here
    to check if it is a resource or not.
    """
    return [path.name for path in _common.files(package).iterdir()]


@deprecated
def is_resource(package: Package, name: str) -> bool:
    """True if `name` is a resource inside `package`.

    Directories are *not* resources.
    """
    resource = normalize_path(name)
    return any(
        traversable.name == resource and traversable.is_file()
        for traversable in _common.files(package).iterdir()
    )


@deprecated
def path(
    package: Package,
    resource: Resource,
) -> ContextManager[pathlib.Path]:
    """A context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    """
    return _common.as_file(_common.files(package) / normalize_path(resource))
python3.12/site-packages/pkg_resources/_vendor/importlib_resources/_common.py000064400000012521151732701050023516 0ustar00import os
import pathlib
import tempfile
import functools
import contextlib
import types
import importlib
import inspect
import warnings
import itertools

from typing import Union, Optional, cast
from .abc import ResourceReader, Traversable

from ._compat import wrap_spec

Package = Union[types.ModuleType, str]
Anchor = Package


def package_to_anchor(func):
    """
    Replace 'package' parameter as 'anchor' and warn about the change.

    Other errors should fall through.

    >>> files('a', 'b')
    Traceback (most recent call last):
    TypeError: files() takes from 0 to 1 positional arguments but 2 were given
    """
    undefined = object()

    @functools.wraps(func)
    def wrapper(anchor=undefined, package=undefined):
        if package is not undefined:
            if anchor is not undefined:
                return func(anchor, package)
            warnings.warn(
                "First parameter to files is renamed to 'anchor'",
                DeprecationWarning,
                stacklevel=2,
            )
            return func(package)
        elif anchor is undefined:
            return func()
        return func(anchor)

    return wrapper


@package_to_anchor
def files(anchor: Optional[Anchor] = None) -> Traversable:
    """
    Get a Traversable resource for an anchor.
    """
    return from_package(resolve(anchor))


def get_resource_reader(package: types.ModuleType) -> Optional[ResourceReader]:
    """
    Return the package's loader if it's a ResourceReader.
    """
    # We can't use
    # a issubclass() check here because apparently abc.'s __subclasscheck__()
    # hook wants to create a weak reference to the object, but
    # zipimport.zipimporter does not support weak references, resulting in a
    # TypeError.  That seems terrible.
    spec = package.__spec__
    reader = getattr(spec.loader, 'get_resource_reader', None)  # type: ignore
    if reader is None:
        return None
    return reader(spec.name)  # type: ignore


@functools.singledispatch
def resolve(cand: Optional[Anchor]) -> types.ModuleType:
    return cast(types.ModuleType, cand)


@resolve.register
def _(cand: str) -> types.ModuleType:
    return importlib.import_module(cand)


@resolve.register
def _(cand: None) -> types.ModuleType:
    return resolve(_infer_caller().f_globals['__name__'])


def _infer_caller():
    """
    Walk the stack and find the frame of the first caller not in this module.
    """

    def is_this_file(frame_info):
        return frame_info.filename == __file__

    def is_wrapper(frame_info):
        return frame_info.function == 'wrapper'

    not_this_file = itertools.filterfalse(is_this_file, inspect.stack())
    # also exclude 'wrapper' due to singledispatch in the call stack
    callers = itertools.filterfalse(is_wrapper, not_this_file)
    return next(callers).frame


def from_package(package: types.ModuleType):
    """
    Return a Traversable object for the given package.

    """
    spec = wrap_spec(package)
    reader = spec.loader.get_resource_reader(spec.name)
    return reader.files()


@contextlib.contextmanager
def _tempfile(
    reader,
    suffix='',
    # gh-93353: Keep a reference to call os.remove() in late Python
    # finalization.
    *,
    _os_remove=os.remove,
):
    # Not using tempfile.NamedTemporaryFile as it leads to deeper 'try'
    # blocks due to the need to close the temporary file to work on Windows
    # properly.
    fd, raw_path = tempfile.mkstemp(suffix=suffix)
    try:
        try:
            os.write(fd, reader())
        finally:
            os.close(fd)
        del reader
        yield pathlib.Path(raw_path)
    finally:
        try:
            _os_remove(raw_path)
        except FileNotFoundError:
            pass


def _temp_file(path):
    return _tempfile(path.read_bytes, suffix=path.name)


def _is_present_dir(path: Traversable) -> bool:
    """
    Some Traversables implement ``is_dir()`` to raise an
    exception (i.e. ``FileNotFoundError``) when the
    directory doesn't exist. This function wraps that call
    to always return a boolean and only return True
    if there's a dir and it exists.
    """
    with contextlib.suppress(FileNotFoundError):
        return path.is_dir()
    return False


@functools.singledispatch
def as_file(path):
    """
    Given a Traversable object, return that object as a
    path on the local file system in a context manager.
    """
    return _temp_dir(path) if _is_present_dir(path) else _temp_file(path)


@as_file.register(pathlib.Path)
@contextlib.contextmanager
def _(path):
    """
    Degenerate behavior for pathlib.Path objects.
    """
    yield path


@contextlib.contextmanager
def _temp_path(dir: tempfile.TemporaryDirectory):
    """
    Wrap tempfile.TemporyDirectory to return a pathlib object.
    """
    with dir as result:
        yield pathlib.Path(result)


@contextlib.contextmanager
def _temp_dir(path):
    """
    Given a traversable dir, recursively replicate the whole tree
    to the file system in a context manager.
    """
    assert path.is_dir()
    with _temp_path(tempfile.TemporaryDirectory()) as temp_dir:
        yield _write_contents(temp_dir, path)


def _write_contents(target, source):
    child = target.joinpath(source.name)
    if source.is_dir():
        child.mkdir()
        for item in source.iterdir():
            _write_contents(child, item)
    else:
        child.write_bytes(source.read_bytes())
    return child
python3.12/site-packages/pkg_resources/_vendor/importlib_resources/simple.py000064400000005020151732701050023354 0ustar00"""
Interface adapters for low-level readers.
"""

import abc
import io
import itertools
from typing import BinaryIO, List

from .abc import Traversable, TraversableResources


class SimpleReader(abc.ABC):
    """
    The minimum, low-level interface required from a resource
    provider.
    """

    @property
    @abc.abstractmethod
    def package(self) -> str:
        """
        The name of the package for which this reader loads resources.
        """

    @abc.abstractmethod
    def children(self) -> List['SimpleReader']:
        """
        Obtain an iterable of SimpleReader for available
        child containers (e.g. directories).
        """

    @abc.abstractmethod
    def resources(self) -> List[str]:
        """
        Obtain available named resources for this virtual package.
        """

    @abc.abstractmethod
    def open_binary(self, resource: str) -> BinaryIO:
        """
        Obtain a File-like for a named resource.
        """

    @property
    def name(self):
        return self.package.split('.')[-1]


class ResourceContainer(Traversable):
    """
    Traversable container for a package's resources via its reader.
    """

    def __init__(self, reader: SimpleReader):
        self.reader = reader

    def is_dir(self):
        return True

    def is_file(self):
        return False

    def iterdir(self):
        files = (ResourceHandle(self, name) for name in self.reader.resources)
        dirs = map(ResourceContainer, self.reader.children())
        return itertools.chain(files, dirs)

    def open(self, *args, **kwargs):
        raise IsADirectoryError()


class ResourceHandle(Traversable):
    """
    Handle to a named resource in a ResourceReader.
    """

    def __init__(self, parent: ResourceContainer, name: str):
        self.parent = parent
        self.name = name  # type: ignore

    def is_file(self):
        return True

    def is_dir(self):
        return False

    def open(self, mode='r', *args, **kwargs):
        stream = self.parent.reader.open_binary(self.name)
        if 'b' not in mode:
            stream = io.TextIOWrapper(*args, **kwargs)
        return stream

    def joinpath(self, name):
        raise RuntimeError("Cannot traverse into a resource")


class TraversableReader(TraversableResources, SimpleReader):
    """
    A TraversableResources based on SimpleReader. Resource providers
    may derive from this class to provide the TraversableResources
    interface by supplying the SimpleReader interface.
    """

    def files(self):
        return ResourceContainer(self)
python3.12/site-packages/pkg_resources/_vendor/importlib_resources/abc.py000064400000012024151732701060022613 0ustar00import abc
import io
import itertools
import pathlib
from typing import Any, BinaryIO, Iterable, Iterator, NoReturn, Text, Optional

from ._compat import runtime_checkable, Protocol, StrPath


__all__ = ["ResourceReader", "Traversable", "TraversableResources"]


class ResourceReader(metaclass=abc.ABCMeta):
    """Abstract base class for loaders to provide resource reading support."""

    @abc.abstractmethod
    def open_resource(self, resource: Text) -> BinaryIO:
        """Return an opened, file-like object for binary reading.

        The 'resource' argument is expected to represent only a file name.
        If the resource cannot be found, FileNotFoundError is raised.
        """
        # This deliberately raises FileNotFoundError instead of
        # NotImplementedError so that if this method is accidentally called,
        # it'll still do the right thing.
        raise FileNotFoundError

    @abc.abstractmethod
    def resource_path(self, resource: Text) -> Text:
        """Return the file system path to the specified resource.

        The 'resource' argument is expected to represent only a file name.
        If the resource does not exist on the file system, raise
        FileNotFoundError.
        """
        # This deliberately raises FileNotFoundError instead of
        # NotImplementedError so that if this method is accidentally called,
        # it'll still do the right thing.
        raise FileNotFoundError

    @abc.abstractmethod
    def is_resource(self, path: Text) -> bool:
        """Return True if the named 'path' is a resource.

        Files are resources, directories are not.
        """
        raise FileNotFoundError

    @abc.abstractmethod
    def contents(self) -> Iterable[str]:
        """Return an iterable of entries in `package`."""
        raise FileNotFoundError


class TraversalError(Exception):
    pass


@runtime_checkable
class Traversable(Protocol):
    """
    An object with a subset of pathlib.Path methods suitable for
    traversing directories and opening files.

    Any exceptions that occur when accessing the backing resource
    may propagate unaltered.
    """

    @abc.abstractmethod
    def iterdir(self) -> Iterator["Traversable"]:
        """
        Yield Traversable objects in self
        """

    def read_bytes(self) -> bytes:
        """
        Read contents of self as bytes
        """
        with self.open('rb') as strm:
            return strm.read()

    def read_text(self, encoding: Optional[str] = None) -> str:
        """
        Read contents of self as text
        """
        with self.open(encoding=encoding) as strm:
            return strm.read()

    @abc.abstractmethod
    def is_dir(self) -> bool:
        """
        Return True if self is a directory
        """

    @abc.abstractmethod
    def is_file(self) -> bool:
        """
        Return True if self is a file
        """

    def joinpath(self, *descendants: StrPath) -> "Traversable":
        """
        Return Traversable resolved with any descendants applied.

        Each descendant should be a path segment relative to self
        and each may contain multiple levels separated by
        ``posixpath.sep`` (``/``).
        """
        if not descendants:
            return self
        names = itertools.chain.from_iterable(
            path.parts for path in map(pathlib.PurePosixPath, descendants)
        )
        target = next(names)
        matches = (
            traversable for traversable in self.iterdir() if traversable.name == target
        )
        try:
            match = next(matches)
        except StopIteration:
            raise TraversalError(
                "Target not found during traversal.", target, list(names)
            )
        return match.joinpath(*names)

    def __truediv__(self, child: StrPath) -> "Traversable":
        """
        Return Traversable child in self
        """
        return self.joinpath(child)

    @abc.abstractmethod
    def open(self, mode='r', *args, **kwargs):
        """
        mode may be 'r' or 'rb' to open as text or binary. Return a handle
        suitable for reading (same as pathlib.Path.open).

        When opening as text, accepts encoding parameters such as those
        accepted by io.TextIOWrapper.
        """

    @property
    @abc.abstractmethod
    def name(self) -> str:
        """
        The base name of this object without any parent references.
        """


class TraversableResources(ResourceReader):
    """
    The required interface for providing traversable
    resources.
    """

    @abc.abstractmethod
    def files(self) -> "Traversable":
        """Return a Traversable object for the loaded package."""

    def open_resource(self, resource: StrPath) -> io.BufferedReader:
        return self.files().joinpath(resource).open('rb')

    def resource_path(self, resource: Any) -> NoReturn:
        raise FileNotFoundError(resource)

    def is_resource(self, path: StrPath) -> bool:
        return self.files().joinpath(path).is_file()

    def contents(self) -> Iterator[str]:
        return (item.name for item in self.files().iterdir())
python3.12/site-packages/pkg_resources/_vendor/typing_extensions.py000064400000234316151732701060021576 0ustar00import abc
import collections
import collections.abc
import functools
import operator
import sys
import types as _types
import typing


__all__ = [
    # Super-special typing primitives.
    'Any',
    'ClassVar',
    'Concatenate',
    'Final',
    'LiteralString',
    'ParamSpec',
    'ParamSpecArgs',
    'ParamSpecKwargs',
    'Self',
    'Type',
    'TypeVar',
    'TypeVarTuple',
    'Unpack',

    # ABCs (from collections.abc).
    'Awaitable',
    'AsyncIterator',
    'AsyncIterable',
    'Coroutine',
    'AsyncGenerator',
    'AsyncContextManager',
    'ChainMap',

    # Concrete collection types.
    'ContextManager',
    'Counter',
    'Deque',
    'DefaultDict',
    'NamedTuple',
    'OrderedDict',
    'TypedDict',

    # Structural checks, a.k.a. protocols.
    'SupportsIndex',

    # One-off things.
    'Annotated',
    'assert_never',
    'assert_type',
    'clear_overloads',
    'dataclass_transform',
    'get_overloads',
    'final',
    'get_args',
    'get_origin',
    'get_type_hints',
    'IntVar',
    'is_typeddict',
    'Literal',
    'NewType',
    'overload',
    'override',
    'Protocol',
    'reveal_type',
    'runtime',
    'runtime_checkable',
    'Text',
    'TypeAlias',
    'TypeGuard',
    'TYPE_CHECKING',
    'Never',
    'NoReturn',
    'Required',
    'NotRequired',
]

# for backward compatibility
PEP_560 = True
GenericMeta = type

# The functions below are modified copies of typing internal helpers.
# They are needed by _ProtocolMeta and they provide support for PEP 646.

_marker = object()


def _check_generic(cls, parameters, elen=_marker):
    """Check correct count for parameters of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
    """
    if not elen:
        raise TypeError(f"{cls} is not a generic class")
    if elen is _marker:
        if not hasattr(cls, "__parameters__") or not cls.__parameters__:
            raise TypeError(f"{cls} is not a generic class")
        elen = len(cls.__parameters__)
    alen = len(parameters)
    if alen != elen:
        if hasattr(cls, "__parameters__"):
            parameters = [p for p in cls.__parameters__ if not _is_unpack(p)]
            num_tv_tuples = sum(isinstance(p, TypeVarTuple) for p in parameters)
            if (num_tv_tuples > 0) and (alen >= elen - num_tv_tuples):
                return
        raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for {cls};"
                        f" actual {alen}, expected {elen}")


if sys.version_info >= (3, 10):
    def _should_collect_from_parameters(t):
        return isinstance(
            t, (typing._GenericAlias, _types.GenericAlias, _types.UnionType)
        )
elif sys.version_info >= (3, 9):
    def _should_collect_from_parameters(t):
        return isinstance(t, (typing._GenericAlias, _types.GenericAlias))
else:
    def _should_collect_from_parameters(t):
        return isinstance(t, typing._GenericAlias) and not t._special


def _collect_type_vars(types, typevar_types=None):
    """Collect all type variable contained in types in order of
    first appearance (lexicographic order). For example::

        _collect_type_vars((T, List[S, T])) == (T, S)
    """
    if typevar_types is None:
        typevar_types = typing.TypeVar
    tvars = []
    for t in types:
        if (
            isinstance(t, typevar_types) and
            t not in tvars and
            not _is_unpack(t)
        ):
            tvars.append(t)
        if _should_collect_from_parameters(t):
            tvars.extend([t for t in t.__parameters__ if t not in tvars])
    return tuple(tvars)


NoReturn = typing.NoReturn

# Some unconstrained type variables.  These are used by the container types.
# (These are not for export.)
T = typing.TypeVar('T')  # Any type.
KT = typing.TypeVar('KT')  # Key type.
VT = typing.TypeVar('VT')  # Value type.
T_co = typing.TypeVar('T_co', covariant=True)  # Any type covariant containers.
T_contra = typing.TypeVar('T_contra', contravariant=True)  # Ditto contravariant.


if sys.version_info >= (3, 11):
    from typing import Any
else:

    class _AnyMeta(type):
        def __instancecheck__(self, obj):
            if self is Any:
                raise TypeError("typing_extensions.Any cannot be used with isinstance()")
            return super().__instancecheck__(obj)

        def __repr__(self):
            if self is Any:
                return "typing_extensions.Any"
            return super().__repr__()

    class Any(metaclass=_AnyMeta):
        """Special type indicating an unconstrained type.
        - Any is compatible with every type.
        - Any assumed to have all methods.
        - All values assumed to be instances of Any.
        Note that all the above statements are true from the point of view of
        static type checkers. At runtime, Any should not be used with instance
        checks.
        """
        def __new__(cls, *args, **kwargs):
            if cls is Any:
                raise TypeError("Any cannot be instantiated")
            return super().__new__(cls, *args, **kwargs)


ClassVar = typing.ClassVar

# On older versions of typing there is an internal class named "Final".
# 3.8+
if hasattr(typing, 'Final') and sys.version_info[:2] >= (3, 7):
    Final = typing.Final
# 3.7
else:
    class _FinalForm(typing._SpecialForm, _root=True):

        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return typing._GenericAlias(self, (item,))

    Final = _FinalForm('Final',
                       doc="""A special typing construct to indicate that a name
                       cannot be re-assigned or overridden in a subclass.
                       For example:

                           MAX_SIZE: Final = 9000
                           MAX_SIZE += 1  # Error reported by type checker

                           class Connection:
                               TIMEOUT: Final[int] = 10
                           class FastConnector(Connection):
                               TIMEOUT = 1  # Error reported by type checker

                       There is no runtime checking of these properties.""")

if sys.version_info >= (3, 11):
    final = typing.final
else:
    # @final exists in 3.8+, but we backport it for all versions
    # before 3.11 to keep support for the __final__ attribute.
    # See https://bugs.python.org/issue46342
    def final(f):
        """This decorator can be used to indicate to type checkers that
        the decorated method cannot be overridden, and decorated class
        cannot be subclassed. For example:

            class Base:
                @final
                def done(self) -> None:
                    ...
            class Sub(Base):
                def done(self) -> None:  # Error reported by type checker
                    ...
            @final
            class Leaf:
                ...
            class Other(Leaf):  # Error reported by type checker
                ...

        There is no runtime checking of these properties. The decorator
        sets the ``__final__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.
        """
        try:
            f.__final__ = True
        except (AttributeError, TypeError):
            # Skip the attribute silently if it is not writable.
            # AttributeError happens if the object has __slots__ or a
            # read-only property, TypeError if it's a builtin class.
            pass
        return f


def IntVar(name):
    return typing.TypeVar(name)


# 3.8+:
if hasattr(typing, 'Literal'):
    Literal = typing.Literal
# 3.7:
else:
    class _LiteralForm(typing._SpecialForm, _root=True):

        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            return typing._GenericAlias(self, parameters)

    Literal = _LiteralForm('Literal',
                           doc="""A type that can be used to indicate to type checkers
                           that the corresponding value has a value literally equivalent
                           to the provided parameter. For example:

                               var: Literal[4] = 4

                           The type checker understands that 'var' is literally equal to
                           the value 4 and no other value.

                           Literal[...] cannot be subclassed. There is no runtime
                           checking verifying that the parameter is actually a value
                           instead of a type.""")


_overload_dummy = typing._overload_dummy  # noqa


if hasattr(typing, "get_overloads"):  # 3.11+
    overload = typing.overload
    get_overloads = typing.get_overloads
    clear_overloads = typing.clear_overloads
else:
    # {module: {qualname: {firstlineno: func}}}
    _overload_registry = collections.defaultdict(
        functools.partial(collections.defaultdict, dict)
    )

    def overload(func):
        """Decorator for overloaded functions/methods.

        In a stub file, place two or more stub definitions for the same
        function in a row, each decorated with @overload.  For example:

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...

        In a non-stub file (i.e. a regular .py file), do the same but
        follow it with an implementation.  The implementation should *not*
        be decorated with @overload.  For example:

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...
        def utf8(value):
            # implementation goes here

        The overloads for a function can be retrieved at runtime using the
        get_overloads() function.
        """
        # classmethod and staticmethod
        f = getattr(func, "__func__", func)
        try:
            _overload_registry[f.__module__][f.__qualname__][
                f.__code__.co_firstlineno
            ] = func
        except AttributeError:
            # Not a normal function; ignore.
            pass
        return _overload_dummy

    def get_overloads(func):
        """Return all defined overloads for *func* as a sequence."""
        # classmethod and staticmethod
        f = getattr(func, "__func__", func)
        if f.__module__ not in _overload_registry:
            return []
        mod_dict = _overload_registry[f.__module__]
        if f.__qualname__ not in mod_dict:
            return []
        return list(mod_dict[f.__qualname__].values())

    def clear_overloads():
        """Clear all overloads in the registry."""
        _overload_registry.clear()


# This is not a real generic class.  Don't use outside annotations.
Type = typing.Type

# Various ABCs mimicking those in collections.abc.
# A few are simply re-exported for completeness.


Awaitable = typing.Awaitable
Coroutine = typing.Coroutine
AsyncIterable = typing.AsyncIterable
AsyncIterator = typing.AsyncIterator
Deque = typing.Deque
ContextManager = typing.ContextManager
AsyncContextManager = typing.AsyncContextManager
DefaultDict = typing.DefaultDict

# 3.7.2+
if hasattr(typing, 'OrderedDict'):
    OrderedDict = typing.OrderedDict
# 3.7.0-3.7.2
else:
    OrderedDict = typing._alias(collections.OrderedDict, (KT, VT))

Counter = typing.Counter
ChainMap = typing.ChainMap
AsyncGenerator = typing.AsyncGenerator
NewType = typing.NewType
Text = typing.Text
TYPE_CHECKING = typing.TYPE_CHECKING


_PROTO_WHITELIST = ['Callable', 'Awaitable',
                    'Iterable', 'Iterator', 'AsyncIterable', 'AsyncIterator',
                    'Hashable', 'Sized', 'Container', 'Collection', 'Reversible',
                    'ContextManager', 'AsyncContextManager']


def _get_protocol_attrs(cls):
    attrs = set()
    for base in cls.__mro__[:-1]:  # without object
        if base.__name__ in ('Protocol', 'Generic'):
            continue
        annotations = getattr(base, '__annotations__', {})
        for attr in list(base.__dict__.keys()) + list(annotations.keys()):
            if (not attr.startswith('_abc_') and attr not in (
                    '__abstractmethods__', '__annotations__', '__weakref__',
                    '_is_protocol', '_is_runtime_protocol', '__dict__',
                    '__args__', '__slots__',
                    '__next_in_mro__', '__parameters__', '__origin__',
                    '__orig_bases__', '__extra__', '__tree_hash__',
                    '__doc__', '__subclasshook__', '__init__', '__new__',
                    '__module__', '_MutableMapping__marker', '_gorg')):
                attrs.add(attr)
    return attrs


def _is_callable_members_only(cls):
    return all(callable(getattr(cls, attr, None)) for attr in _get_protocol_attrs(cls))


def _maybe_adjust_parameters(cls):
    """Helper function used in Protocol.__init_subclass__ and _TypedDictMeta.__new__.

    The contents of this function are very similar
    to logic found in typing.Generic.__init_subclass__
    on the CPython main branch.
    """
    tvars = []
    if '__orig_bases__' in cls.__dict__:
        tvars = typing._collect_type_vars(cls.__orig_bases__)
        # Look for Generic[T1, ..., Tn] or Protocol[T1, ..., Tn].
        # If found, tvars must be a subset of it.
        # If not found, tvars is it.
        # Also check for and reject plain Generic,
        # and reject multiple Generic[...] and/or Protocol[...].
        gvars = None
        for base in cls.__orig_bases__:
            if (isinstance(base, typing._GenericAlias) and
                    base.__origin__ in (typing.Generic, Protocol)):
                # for error messages
                the_base = base.__origin__.__name__
                if gvars is not None:
                    raise TypeError(
                        "Cannot inherit from Generic[...]"
                        " and/or Protocol[...] multiple types.")
                gvars = base.__parameters__
        if gvars is None:
            gvars = tvars
        else:
            tvarset = set(tvars)
            gvarset = set(gvars)
            if not tvarset <= gvarset:
                s_vars = ', '.join(str(t) for t in tvars if t not in gvarset)
                s_args = ', '.join(str(g) for g in gvars)
                raise TypeError(f"Some type variables ({s_vars}) are"
                                f" not listed in {the_base}[{s_args}]")
            tvars = gvars
    cls.__parameters__ = tuple(tvars)


# 3.8+
if hasattr(typing, 'Protocol'):
    Protocol = typing.Protocol
# 3.7
else:

    def _no_init(self, *args, **kwargs):
        if type(self)._is_protocol:
            raise TypeError('Protocols cannot be instantiated')

    class _ProtocolMeta(abc.ABCMeta):  # noqa: B024
        # This metaclass is a bit unfortunate and exists only because of the lack
        # of __instancehook__.
        def __instancecheck__(cls, instance):
            # We need this method for situations where attributes are
            # assigned in __init__.
            if ((not getattr(cls, '_is_protocol', False) or
                 _is_callable_members_only(cls)) and
                    issubclass(instance.__class__, cls)):
                return True
            if cls._is_protocol:
                if all(hasattr(instance, attr) and
                       (not callable(getattr(cls, attr, None)) or
                        getattr(instance, attr) is not None)
                       for attr in _get_protocol_attrs(cls)):
                    return True
            return super().__instancecheck__(instance)

    class Protocol(metaclass=_ProtocolMeta):
        # There is quite a lot of overlapping code with typing.Generic.
        # Unfortunately it is hard to avoid this while these live in two different
        # modules. The duplicated code will be removed when Protocol is moved to typing.
        """Base class for protocol classes. Protocol classes are defined as::

            class Proto(Protocol):
                def meth(self) -> int:
                    ...

        Such classes are primarily used with static type checkers that recognize
        structural subtyping (static duck-typing), for example::

            class C:
                def meth(self) -> int:
                    return 0

            def func(x: Proto) -> int:
                return x.meth()

            func(C())  # Passes static type check

        See PEP 544 for details. Protocol classes decorated with
        @typing_extensions.runtime act as simple-minded runtime protocol that checks
        only the presence of given attributes, ignoring their type signatures.

        Protocol classes can be generic, they are defined as::

            class GenProto(Protocol[T]):
                def meth(self) -> T:
                    ...
        """
        __slots__ = ()
        _is_protocol = True

        def __new__(cls, *args, **kwds):
            if cls is Protocol:
                raise TypeError("Type Protocol cannot be instantiated; "
                                "it can only be used as a base class")
            return super().__new__(cls)

        @typing._tp_cache
        def __class_getitem__(cls, params):
            if not isinstance(params, tuple):
                params = (params,)
            if not params and cls is not typing.Tuple:
                raise TypeError(
                    f"Parameter list to {cls.__qualname__}[...] cannot be empty")
            msg = "Parameters to generic types must be types."
            params = tuple(typing._type_check(p, msg) for p in params)  # noqa
            if cls is Protocol:
                # Generic can only be subscripted with unique type variables.
                if not all(isinstance(p, typing.TypeVar) for p in params):
                    i = 0
                    while isinstance(params[i], typing.TypeVar):
                        i += 1
                    raise TypeError(
                        "Parameters to Protocol[...] must all be type variables."
                        f" Parameter {i + 1} is {params[i]}")
                if len(set(params)) != len(params):
                    raise TypeError(
                        "Parameters to Protocol[...] must all be unique")
            else:
                # Subscripting a regular Generic subclass.
                _check_generic(cls, params, len(cls.__parameters__))
            return typing._GenericAlias(cls, params)

        def __init_subclass__(cls, *args, **kwargs):
            if '__orig_bases__' in cls.__dict__:
                error = typing.Generic in cls.__orig_bases__
            else:
                error = typing.Generic in cls.__bases__
            if error:
                raise TypeError("Cannot inherit from plain Generic")
            _maybe_adjust_parameters(cls)

            # Determine if this is a protocol or a concrete subclass.
            if not cls.__dict__.get('_is_protocol', None):
                cls._is_protocol = any(b is Protocol for b in cls.__bases__)

            # Set (or override) the protocol subclass hook.
            def _proto_hook(other):
                if not cls.__dict__.get('_is_protocol', None):
                    return NotImplemented
                if not getattr(cls, '_is_runtime_protocol', False):
                    if sys._getframe(2).f_globals['__name__'] in ['abc', 'functools']:
                        return NotImplemented
                    raise TypeError("Instance and class checks can only be used with"
                                    " @runtime protocols")
                if not _is_callable_members_only(cls):
                    if sys._getframe(2).f_globals['__name__'] in ['abc', 'functools']:
                        return NotImplemented
                    raise TypeError("Protocols with non-method members"
                                    " don't support issubclass()")
                if not isinstance(other, type):
                    # Same error as for issubclass(1, int)
                    raise TypeError('issubclass() arg 1 must be a class')
                for attr in _get_protocol_attrs(cls):
                    for base in other.__mro__:
                        if attr in base.__dict__:
                            if base.__dict__[attr] is None:
                                return NotImplemented
                            break
                        annotations = getattr(base, '__annotations__', {})
                        if (isinstance(annotations, typing.Mapping) and
                                attr in annotations and
                                isinstance(other, _ProtocolMeta) and
                                other._is_protocol):
                            break
                    else:
                        return NotImplemented
                return True
            if '__subclasshook__' not in cls.__dict__:
                cls.__subclasshook__ = _proto_hook

            # We have nothing more to do for non-protocols.
            if not cls._is_protocol:
                return

            # Check consistency of bases.
            for base in cls.__bases__:
                if not (base in (object, typing.Generic) or
                        base.__module__ == 'collections.abc' and
                        base.__name__ in _PROTO_WHITELIST or
                        isinstance(base, _ProtocolMeta) and base._is_protocol):
                    raise TypeError('Protocols can only inherit from other'
                                    f' protocols, got {repr(base)}')
            cls.__init__ = _no_init


# 3.8+
if hasattr(typing, 'runtime_checkable'):
    runtime_checkable = typing.runtime_checkable
# 3.7
else:
    def runtime_checkable(cls):
        """Mark a protocol class as a runtime protocol, so that it
        can be used with isinstance() and issubclass(). Raise TypeError
        if applied to a non-protocol class.

        This allows a simple-minded structural check very similar to the
        one-offs in collections.abc such as Hashable.
        """
        if not isinstance(cls, _ProtocolMeta) or not cls._is_protocol:
            raise TypeError('@runtime_checkable can be only applied to protocol classes,'
                            f' got {cls!r}')
        cls._is_runtime_protocol = True
        return cls


# Exists for backwards compatibility.
runtime = runtime_checkable


# 3.8+
if hasattr(typing, 'SupportsIndex'):
    SupportsIndex = typing.SupportsIndex
# 3.7
else:
    @runtime_checkable
    class SupportsIndex(Protocol):
        __slots__ = ()

        @abc.abstractmethod
        def __index__(self) -> int:
            pass


if hasattr(typing, "Required"):
    # The standard library TypedDict in Python 3.8 does not store runtime information
    # about which (if any) keys are optional.  See https://bugs.python.org/issue38834
    # The standard library TypedDict in Python 3.9.0/1 does not honour the "total"
    # keyword with old-style TypedDict().  See https://bugs.python.org/issue42059
    # The standard library TypedDict below Python 3.11 does not store runtime
    # information about optional and required keys when using Required or NotRequired.
    # Generic TypedDicts are also impossible using typing.TypedDict on Python <3.11.
    TypedDict = typing.TypedDict
    _TypedDictMeta = typing._TypedDictMeta
    is_typeddict = typing.is_typeddict
else:
    def _check_fails(cls, other):
        try:
            if sys._getframe(1).f_globals['__name__'] not in ['abc',
                                                              'functools',
                                                              'typing']:
                # Typed dicts are only for static structural subtyping.
                raise TypeError('TypedDict does not support instance and class checks')
        except (AttributeError, ValueError):
            pass
        return False

    def _dict_new(*args, **kwargs):
        if not args:
            raise TypeError('TypedDict.__new__(): not enough arguments')
        _, args = args[0], args[1:]  # allow the "cls" keyword be passed
        return dict(*args, **kwargs)

    _dict_new.__text_signature__ = '($cls, _typename, _fields=None, /, **kwargs)'

    def _typeddict_new(*args, total=True, **kwargs):
        if not args:
            raise TypeError('TypedDict.__new__(): not enough arguments')
        _, args = args[0], args[1:]  # allow the "cls" keyword be passed
        if args:
            typename, args = args[0], args[1:]  # allow the "_typename" keyword be passed
        elif '_typename' in kwargs:
            typename = kwargs.pop('_typename')
            import warnings
            warnings.warn("Passing '_typename' as keyword argument is deprecated",
                          DeprecationWarning, stacklevel=2)
        else:
            raise TypeError("TypedDict.__new__() missing 1 required positional "
                            "argument: '_typename'")
        if args:
            try:
                fields, = args  # allow the "_fields" keyword be passed
            except ValueError:
                raise TypeError('TypedDict.__new__() takes from 2 to 3 '
                                f'positional arguments but {len(args) + 2} '
                                'were given')
        elif '_fields' in kwargs and len(kwargs) == 1:
            fields = kwargs.pop('_fields')
            import warnings
            warnings.warn("Passing '_fields' as keyword argument is deprecated",
                          DeprecationWarning, stacklevel=2)
        else:
            fields = None

        if fields is None:
            fields = kwargs
        elif kwargs:
            raise TypeError("TypedDict takes either a dict or keyword arguments,"
                            " but not both")

        ns = {'__annotations__': dict(fields)}
        try:
            # Setting correct module is necessary to make typed dict classes pickleable.
            ns['__module__'] = sys._getframe(1).f_globals.get('__name__', '__main__')
        except (AttributeError, ValueError):
            pass

        return _TypedDictMeta(typename, (), ns, total=total)

    _typeddict_new.__text_signature__ = ('($cls, _typename, _fields=None,'
                                         ' /, *, total=True, **kwargs)')

    class _TypedDictMeta(type):
        def __init__(cls, name, bases, ns, total=True):
            super().__init__(name, bases, ns)

        def __new__(cls, name, bases, ns, total=True):
            # Create new typed dict class object.
            # This method is called directly when TypedDict is subclassed,
            # or via _typeddict_new when TypedDict is instantiated. This way
            # TypedDict supports all three syntaxes described in its docstring.
            # Subclasses and instances of TypedDict return actual dictionaries
            # via _dict_new.
            ns['__new__'] = _typeddict_new if name == 'TypedDict' else _dict_new
            # Don't insert typing.Generic into __bases__ here,
            # or Generic.__init_subclass__ will raise TypeError
            # in the super().__new__() call.
            # Instead, monkey-patch __bases__ onto the class after it's been created.
            tp_dict = super().__new__(cls, name, (dict,), ns)

            if any(issubclass(base, typing.Generic) for base in bases):
                tp_dict.__bases__ = (typing.Generic, dict)
                _maybe_adjust_parameters(tp_dict)

            annotations = {}
            own_annotations = ns.get('__annotations__', {})
            msg = "TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type"
            own_annotations = {
                n: typing._type_check(tp, msg) for n, tp in own_annotations.items()
            }
            required_keys = set()
            optional_keys = set()

            for base in bases:
                annotations.update(base.__dict__.get('__annotations__', {}))
                required_keys.update(base.__dict__.get('__required_keys__', ()))
                optional_keys.update(base.__dict__.get('__optional_keys__', ()))

            annotations.update(own_annotations)
            for annotation_key, annotation_type in own_annotations.items():
                annotation_origin = get_origin(annotation_type)
                if annotation_origin is Annotated:
                    annotation_args = get_args(annotation_type)
                    if annotation_args:
                        annotation_type = annotation_args[0]
                        annotation_origin = get_origin(annotation_type)

                if annotation_origin is Required:
                    required_keys.add(annotation_key)
                elif annotation_origin is NotRequired:
                    optional_keys.add(annotation_key)
                elif total:
                    required_keys.add(annotation_key)
                else:
                    optional_keys.add(annotation_key)

            tp_dict.__annotations__ = annotations
            tp_dict.__required_keys__ = frozenset(required_keys)
            tp_dict.__optional_keys__ = frozenset(optional_keys)
            if not hasattr(tp_dict, '__total__'):
                tp_dict.__total__ = total
            return tp_dict

        __instancecheck__ = __subclasscheck__ = _check_fails

    TypedDict = _TypedDictMeta('TypedDict', (dict,), {})
    TypedDict.__module__ = __name__
    TypedDict.__doc__ = \
        """A simple typed name space. At runtime it is equivalent to a plain dict.

        TypedDict creates a dictionary type that expects all of its
        instances to have a certain set of keys, with each key
        associated with a value of a consistent type. This expectation
        is not checked at runtime but is only enforced by type checkers.
        Usage::

            class Point2D(TypedDict):
                x: int
                y: int
                label: str

            a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
            b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

            assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

        The type info can be accessed via the Point2D.__annotations__ dict, and
        the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
        TypedDict supports two additional equivalent forms::

            Point2D = TypedDict('Point2D', x=int, y=int, label=str)
            Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

        The class syntax is only supported in Python 3.6+, while two other
        syntax forms work for Python 2.7 and 3.2+
        """

    if hasattr(typing, "_TypedDictMeta"):
        _TYPEDDICT_TYPES = (typing._TypedDictMeta, _TypedDictMeta)
    else:
        _TYPEDDICT_TYPES = (_TypedDictMeta,)

    def is_typeddict(tp):
        """Check if an annotation is a TypedDict class

        For example::
            class Film(TypedDict):
                title: str
                year: int

            is_typeddict(Film)  # => True
            is_typeddict(Union[list, str])  # => False
        """
        return isinstance(tp, tuple(_TYPEDDICT_TYPES))


if hasattr(typing, "assert_type"):
    assert_type = typing.assert_type

else:
    def assert_type(__val, __typ):
        """Assert (to the type checker) that the value is of the given type.

        When the type checker encounters a call to assert_type(), it
        emits an error if the value is not of the specified type::

            def greet(name: str) -> None:
                assert_type(name, str)  # ok
                assert_type(name, int)  # type checker error

        At runtime this returns the first argument unchanged and otherwise
        does nothing.
        """
        return __val


if hasattr(typing, "Required"):
    get_type_hints = typing.get_type_hints
else:
    import functools
    import types

    # replaces _strip_annotations()
    def _strip_extras(t):
        """Strips Annotated, Required and NotRequired from a given type."""
        if isinstance(t, _AnnotatedAlias):
            return _strip_extras(t.__origin__)
        if hasattr(t, "__origin__") and t.__origin__ in (Required, NotRequired):
            return _strip_extras(t.__args__[0])
        if isinstance(t, typing._GenericAlias):
            stripped_args = tuple(_strip_extras(a) for a in t.__args__)
            if stripped_args == t.__args__:
                return t
            return t.copy_with(stripped_args)
        if hasattr(types, "GenericAlias") and isinstance(t, types.GenericAlias):
            stripped_args = tuple(_strip_extras(a) for a in t.__args__)
            if stripped_args == t.__args__:
                return t
            return types.GenericAlias(t.__origin__, stripped_args)
        if hasattr(types, "UnionType") and isinstance(t, types.UnionType):
            stripped_args = tuple(_strip_extras(a) for a in t.__args__)
            if stripped_args == t.__args__:
                return t
            return functools.reduce(operator.or_, stripped_args)

        return t

    def get_type_hints(obj, globalns=None, localns=None, include_extras=False):
        """Return type hints for an object.

        This is often the same as obj.__annotations__, but it handles
        forward references encoded as string literals, adds Optional[t] if a
        default value equal to None is set and recursively replaces all
        'Annotated[T, ...]', 'Required[T]' or 'NotRequired[T]' with 'T'
        (unless 'include_extras=True').

        The argument may be a module, class, method, or function. The annotations
        are returned as a dictionary. For classes, annotations include also
        inherited members.

        TypeError is raised if the argument is not of a type that can contain
        annotations, and an empty dictionary is returned if no annotations are
        present.

        BEWARE -- the behavior of globalns and localns is counterintuitive
        (unless you are familiar with how eval() and exec() work).  The
        search order is locals first, then globals.

        - If no dict arguments are passed, an attempt is made to use the
          globals from obj (or the respective module's globals for classes),
          and these are also used as the locals.  If the object does not appear
          to have globals, an empty dictionary is used.

        - If one dict argument is passed, it is used for both globals and
          locals.

        - If two dict arguments are passed, they specify globals and
          locals, respectively.
        """
        if hasattr(typing, "Annotated"):
            hint = typing.get_type_hints(
                obj, globalns=globalns, localns=localns, include_extras=True
            )
        else:
            hint = typing.get_type_hints(obj, globalns=globalns, localns=localns)
        if include_extras:
            return hint
        return {k: _strip_extras(t) for k, t in hint.items()}


# Python 3.9+ has PEP 593 (Annotated)
if hasattr(typing, 'Annotated'):
    Annotated = typing.Annotated
    # Not exported and not a public API, but needed for get_origin() and get_args()
    # to work.
    _AnnotatedAlias = typing._AnnotatedAlias
# 3.7-3.8
else:
    class _AnnotatedAlias(typing._GenericAlias, _root=True):
        """Runtime representation of an annotated type.

        At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
        with extra annotations. The alias behaves like a normal typing alias,
        instantiating is the same as instantiating the underlying type, binding
        it to types is also the same.
        """
        def __init__(self, origin, metadata):
            if isinstance(origin, _AnnotatedAlias):
                metadata = origin.__metadata__ + metadata
                origin = origin.__origin__
            super().__init__(origin, origin)
            self.__metadata__ = metadata

        def copy_with(self, params):
            assert len(params) == 1
            new_type = params[0]
            return _AnnotatedAlias(new_type, self.__metadata__)

        def __repr__(self):
            return (f"typing_extensions.Annotated[{typing._type_repr(self.__origin__)}, "
                    f"{', '.join(repr(a) for a in self.__metadata__)}]")

        def __reduce__(self):
            return operator.getitem, (
                Annotated, (self.__origin__,) + self.__metadata__
            )

        def __eq__(self, other):
            if not isinstance(other, _AnnotatedAlias):
                return NotImplemented
            if self.__origin__ != other.__origin__:
                return False
            return self.__metadata__ == other.__metadata__

        def __hash__(self):
            return hash((self.__origin__, self.__metadata__))

    class Annotated:
        """Add context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to the
        hypothetical runtime_check module that this type is an unsigned int.
        Every other consumer of this type can ignore this metadata and treat
        this type as int.

        The first argument to Annotated must be a valid type (and will be in
        the __origin__ field), the remaining arguments are kept as a tuple in
        the __extra__ field.

        Details:

        - It's an error to call `Annotated` with less than two arguments.
        - Nested Annotated are flattened::

            Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

        - Instantiating an annotated type is equivalent to instantiating the
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can be used as a generic type alias::

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
        """

        __slots__ = ()

        def __new__(cls, *args, **kwargs):
            raise TypeError("Type Annotated cannot be instantiated.")

        @typing._tp_cache
        def __class_getitem__(cls, params):
            if not isinstance(params, tuple) or len(params) < 2:
                raise TypeError("Annotated[...] should be used "
                                "with at least two arguments (a type and an "
                                "annotation).")
            allowed_special_forms = (ClassVar, Final)
            if get_origin(params[0]) in allowed_special_forms:
                origin = params[0]
            else:
                msg = "Annotated[t, ...]: t must be a type."
                origin = typing._type_check(params[0], msg)
            metadata = tuple(params[1:])
            return _AnnotatedAlias(origin, metadata)

        def __init_subclass__(cls, *args, **kwargs):
            raise TypeError(
                f"Cannot subclass {cls.__module__}.Annotated"
            )

# Python 3.8 has get_origin() and get_args() but those implementations aren't
# Annotated-aware, so we can't use those. Python 3.9's versions don't support
# ParamSpecArgs and ParamSpecKwargs, so only Python 3.10's versions will do.
if sys.version_info[:2] >= (3, 10):
    get_origin = typing.get_origin
    get_args = typing.get_args
# 3.7-3.9
else:
    try:
        # 3.9+
        from typing import _BaseGenericAlias
    except ImportError:
        _BaseGenericAlias = typing._GenericAlias
    try:
        # 3.9+
        from typing import GenericAlias as _typing_GenericAlias
    except ImportError:
        _typing_GenericAlias = typing._GenericAlias

    def get_origin(tp):
        """Get the unsubscripted version of a type.

        This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
        and Annotated. Return None for unsupported types. Examples::

            get_origin(Literal[42]) is Literal
            get_origin(int) is None
            get_origin(ClassVar[int]) is ClassVar
            get_origin(Generic) is Generic
            get_origin(Generic[T]) is Generic
            get_origin(Union[T, int]) is Union
            get_origin(List[Tuple[T, T]][int]) == list
            get_origin(P.args) is P
        """
        if isinstance(tp, _AnnotatedAlias):
            return Annotated
        if isinstance(tp, (typing._GenericAlias, _typing_GenericAlias, _BaseGenericAlias,
                           ParamSpecArgs, ParamSpecKwargs)):
            return tp.__origin__
        if tp is typing.Generic:
            return typing.Generic
        return None

    def get_args(tp):
        """Get type arguments with all substitutions performed.

        For unions, basic simplifications used by Union constructor are performed.
        Examples::
            get_args(Dict[str, int]) == (str, int)
            get_args(int) == ()
            get_args(Union[int, Union[T, int], str][int]) == (int, str)
            get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
            get_args(Callable[[], T][int]) == ([], int)
        """
        if isinstance(tp, _AnnotatedAlias):
            return (tp.__origin__,) + tp.__metadata__
        if isinstance(tp, (typing._GenericAlias, _typing_GenericAlias)):
            if getattr(tp, "_special", False):
                return ()
            res = tp.__args__
            if get_origin(tp) is collections.abc.Callable and res[0] is not Ellipsis:
                res = (list(res[:-1]), res[-1])
            return res
        return ()


# 3.10+
if hasattr(typing, 'TypeAlias'):
    TypeAlias = typing.TypeAlias
# 3.9
elif sys.version_info[:2] >= (3, 9):
    class _TypeAliasForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    @_TypeAliasForm
    def TypeAlias(self, parameters):
        """Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example above.
        """
        raise TypeError(f"{self} is not subscriptable")
# 3.7-3.8
else:
    class _TypeAliasForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    TypeAlias = _TypeAliasForm('TypeAlias',
                               doc="""Special marker indicating that an assignment should
                               be recognized as a proper type alias definition by type
                               checkers.

                               For example::

                                   Predicate: TypeAlias = Callable[..., bool]

                               It's invalid when used anywhere except as in the example
                               above.""")


class _DefaultMixin:
    """Mixin for TypeVarLike defaults."""

    __slots__ = ()

    def __init__(self, default):
        if isinstance(default, (tuple, list)):
            self.__default__ = tuple((typing._type_check(d, "Default must be a type")
                                      for d in default))
        elif default:
            self.__default__ = typing._type_check(default, "Default must be a type")
        else:
            self.__default__ = None


# Add default and infer_variance parameters from PEP 696 and 695
class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
    """Type variable."""

    __module__ = 'typing'

    def __init__(self, name, *constraints, bound=None,
                 covariant=False, contravariant=False,
                 default=None, infer_variance=False):
        super().__init__(name, *constraints, bound=bound, covariant=covariant,
                         contravariant=contravariant)
        _DefaultMixin.__init__(self, default)
        self.__infer_variance__ = infer_variance

        # for pickling:
        try:
            def_mod = sys._getframe(1).f_globals.get('__name__', '__main__')
        except (AttributeError, ValueError):
            def_mod = None
        if def_mod != 'typing_extensions':
            self.__module__ = def_mod


# Python 3.10+ has PEP 612
if hasattr(typing, 'ParamSpecArgs'):
    ParamSpecArgs = typing.ParamSpecArgs
    ParamSpecKwargs = typing.ParamSpecKwargs
# 3.7-3.9
else:
    class _Immutable:
        """Mixin to indicate that object should not be copied."""
        __slots__ = ()

        def __copy__(self):
            return self

        def __deepcopy__(self, memo):
            return self

    class ParamSpecArgs(_Immutable):
        """The args for a ParamSpec object.

        Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.

        ParamSpecArgs objects have a reference back to their ParamSpec:

        P.args.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        """
        def __init__(self, origin):
            self.__origin__ = origin

        def __repr__(self):
            return f"{self.__origin__.__name__}.args"

        def __eq__(self, other):
            if not isinstance(other, ParamSpecArgs):
                return NotImplemented
            return self.__origin__ == other.__origin__

    class ParamSpecKwargs(_Immutable):
        """The kwargs for a ParamSpec object.

        Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.

        ParamSpecKwargs objects have a reference back to their ParamSpec:

        P.kwargs.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        """
        def __init__(self, origin):
            self.__origin__ = origin

        def __repr__(self):
            return f"{self.__origin__.__name__}.kwargs"

        def __eq__(self, other):
            if not isinstance(other, ParamSpecKwargs):
                return NotImplemented
            return self.__origin__ == other.__origin__

# 3.10+
if hasattr(typing, 'ParamSpec'):

    # Add default Parameter - PEP 696
    class ParamSpec(typing.ParamSpec, _DefaultMixin, _root=True):
        """Parameter specification variable."""

        __module__ = 'typing'

        def __init__(self, name, *, bound=None, covariant=False, contravariant=False,
                     default=None):
            super().__init__(name, bound=bound, covariant=covariant,
                             contravariant=contravariant)
            _DefaultMixin.__init__(self, default)

            # for pickling:
            try:
                def_mod = sys._getframe(1).f_globals.get('__name__', '__main__')
            except (AttributeError, ValueError):
                def_mod = None
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

# 3.7-3.9
else:

    # Inherits from list as a workaround for Callable checks in Python < 3.9.2.
    class ParamSpec(list, _DefaultMixin):
        """Parameter specification variable.

        Usage::

           P = ParamSpec('P')

        Parameter specification variables exist primarily for the benefit of static
        type checkers.  They are used to forward the parameter types of one
        callable to another callable, a pattern commonly found in higher order
        functions and decorators.  They are only valid when used in ``Concatenate``,
        or s the first argument to ``Callable``. In Python 3.10 and higher,
        they are also supported in user-defined Generics at runtime.
        See class Generic for more information on generic types.  An
        example for annotating a decorator::

           T = TypeVar('T')
           P = ParamSpec('P')

           def add_logging(f: Callable[P, T]) -> Callable[P, T]:
               '''A type-safe decorator to add logging to a function.'''
               def inner(*args: P.args, **kwargs: P.kwargs) -> T:
                   logging.info(f'{f.__name__} was called')
                   return f(*args, **kwargs)
               return inner

           @add_logging
           def add_two(x: float, y: float) -> float:
               '''Add two numbers together.'''
               return x + y

        Parameter specification variables defined with covariant=True or
        contravariant=True can be used to declare covariant or contravariant
        generic types.  These keyword arguments are valid, but their actual semantics
        are yet to be decided.  See PEP 612 for details.

        Parameter specification variables can be introspected. e.g.:

           P.__name__ == 'T'
           P.__bound__ == None
           P.__covariant__ == False
           P.__contravariant__ == False

        Note that only parameter specification variables defined in global scope can
        be pickled.
        """

        # Trick Generic __parameters__.
        __class__ = typing.TypeVar

        @property
        def args(self):
            return ParamSpecArgs(self)

        @property
        def kwargs(self):
            return ParamSpecKwargs(self)

        def __init__(self, name, *, bound=None, covariant=False, contravariant=False,
                     default=None):
            super().__init__([self])
            self.__name__ = name
            self.__covariant__ = bool(covariant)
            self.__contravariant__ = bool(contravariant)
            if bound:
                self.__bound__ = typing._type_check(bound, 'Bound must be a type.')
            else:
                self.__bound__ = None
            _DefaultMixin.__init__(self, default)

            # for pickling:
            try:
                def_mod = sys._getframe(1).f_globals.get('__name__', '__main__')
            except (AttributeError, ValueError):
                def_mod = None
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

        def __repr__(self):
            if self.__covariant__:
                prefix = '+'
            elif self.__contravariant__:
                prefix = '-'
            else:
                prefix = '~'
            return prefix + self.__name__

        def __hash__(self):
            return object.__hash__(self)

        def __eq__(self, other):
            return self is other

        def __reduce__(self):
            return self.__name__

        # Hack to get typing._type_check to pass.
        def __call__(self, *args, **kwargs):
            pass


# 3.7-3.9
if not hasattr(typing, 'Concatenate'):
    # Inherits from list as a workaround for Callable checks in Python < 3.9.2.
    class _ConcatenateGenericAlias(list):

        # Trick Generic into looking into this for __parameters__.
        __class__ = typing._GenericAlias

        # Flag in 3.8.
        _special = False

        def __init__(self, origin, args):
            super().__init__(args)
            self.__origin__ = origin
            self.__args__ = args

        def __repr__(self):
            _type_repr = typing._type_repr
            return (f'{_type_repr(self.__origin__)}'
                    f'[{", ".join(_type_repr(arg) for arg in self.__args__)}]')

        def __hash__(self):
            return hash((self.__origin__, self.__args__))

        # Hack to get typing._type_check to pass in Generic.
        def __call__(self, *args, **kwargs):
            pass

        @property
        def __parameters__(self):
            return tuple(
                tp for tp in self.__args__ if isinstance(tp, (typing.TypeVar, ParamSpec))
            )


# 3.7-3.9
@typing._tp_cache
def _concatenate_getitem(self, parameters):
    if parameters == ():
        raise TypeError("Cannot take a Concatenate of no types.")
    if not isinstance(parameters, tuple):
        parameters = (parameters,)
    if not isinstance(parameters[-1], ParamSpec):
        raise TypeError("The last parameter to Concatenate should be a "
                        "ParamSpec variable.")
    msg = "Concatenate[arg, ...]: each arg must be a type."
    parameters = tuple(typing._type_check(p, msg) for p in parameters)
    return _ConcatenateGenericAlias(self, parameters)


# 3.10+
if hasattr(typing, 'Concatenate'):
    Concatenate = typing.Concatenate
    _ConcatenateGenericAlias = typing._ConcatenateGenericAlias # noqa
# 3.9
elif sys.version_info[:2] >= (3, 9):
    @_TypeAliasForm
    def Concatenate(self, parameters):
        """Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        """
        return _concatenate_getitem(self, parameters)
# 3.7-8
else:
    class _ConcatenateForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            return _concatenate_getitem(self, parameters)

    Concatenate = _ConcatenateForm(
        'Concatenate',
        doc="""Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        """)

# 3.10+
if hasattr(typing, 'TypeGuard'):
    TypeGuard = typing.TypeGuard
# 3.9
elif sys.version_info[:2] >= (3, 9):
    class _TypeGuardForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    @_TypeGuardForm
    def TypeGuard(self, parameters):
        """Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        """
        item = typing._type_check(parameters, f'{self} accepts only a single type.')
        return typing._GenericAlias(self, (item,))
# 3.7-3.8
else:
    class _TypeGuardForm(typing._SpecialForm, _root=True):

        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type')
            return typing._GenericAlias(self, (item,))

    TypeGuard = _TypeGuardForm(
        'TypeGuard',
        doc="""Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        """)


# Vendored from cpython typing._SpecialFrom
class _SpecialForm(typing._Final, _root=True):
    __slots__ = ('_name', '__doc__', '_getitem')

    def __init__(self, getitem):
        self._getitem = getitem
        self._name = getitem.__name__
        self.__doc__ = getitem.__doc__

    def __getattr__(self, item):
        if item in {'__name__', '__qualname__'}:
            return self._name

        raise AttributeError(item)

    def __mro_entries__(self, bases):
        raise TypeError(f"Cannot subclass {self!r}")

    def __repr__(self):
        return f'typing_extensions.{self._name}'

    def __reduce__(self):
        return self._name

    def __call__(self, *args, **kwds):
        raise TypeError(f"Cannot instantiate {self!r}")

    def __or__(self, other):
        return typing.Union[self, other]

    def __ror__(self, other):
        return typing.Union[other, self]

    def __instancecheck__(self, obj):
        raise TypeError(f"{self} cannot be used with isinstance()")

    def __subclasscheck__(self, cls):
        raise TypeError(f"{self} cannot be used with issubclass()")

    @typing._tp_cache
    def __getitem__(self, parameters):
        return self._getitem(self, parameters)


if hasattr(typing, "LiteralString"):
    LiteralString = typing.LiteralString
else:
    @_SpecialForm
    def LiteralString(self, params):
        """Represents an arbitrary literal string.

        Example::

          from typing_extensions import LiteralString

          def query(sql: LiteralString) -> ...:
              ...

          query("SELECT * FROM table")  # ok
          query(f"SELECT * FROM {input()}")  # not ok

        See PEP 675 for details.

        """
        raise TypeError(f"{self} is not subscriptable")


if hasattr(typing, "Self"):
    Self = typing.Self
else:
    @_SpecialForm
    def Self(self, params):
        """Used to spell the type of "self" in classes.

        Example::

          from typing import Self

          class ReturnsSelf:
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        """

        raise TypeError(f"{self} is not subscriptable")


if hasattr(typing, "Never"):
    Never = typing.Never
else:
    @_SpecialForm
    def Never(self, params):
        """The bottom type, a type that has no members.

        This can be used to define a function that should never be
        called, or a function that never returns::

            from typing_extensions import Never

            def never_call_me(arg: Never) -> None:
                pass

            def int_or_str(arg: int | str) -> None:
                never_call_me(arg)  # type checker error
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                    case _:
                        never_call_me(arg)  # ok, arg is of type Never

        """

        raise TypeError(f"{self} is not subscriptable")


if hasattr(typing, 'Required'):
    Required = typing.Required
    NotRequired = typing.NotRequired
elif sys.version_info[:2] >= (3, 9):
    class _ExtensionsSpecialForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    @_ExtensionsSpecialForm
    def Required(self, parameters):
        """A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        """
        item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
        return typing._GenericAlias(self, (item,))

    @_ExtensionsSpecialForm
    def NotRequired(self, parameters):
        """A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        """
        item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
        return typing._GenericAlias(self, (item,))

else:
    class _RequiredForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return typing._GenericAlias(self, (item,))

    Required = _RequiredForm(
        'Required',
        doc="""A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        """)
    NotRequired = _RequiredForm(
        'NotRequired',
        doc="""A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        """)


if hasattr(typing, "Unpack"):  # 3.11+
    Unpack = typing.Unpack
elif sys.version_info[:2] >= (3, 9):
    class _UnpackSpecialForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    class _UnpackAlias(typing._GenericAlias, _root=True):
        __class__ = typing.TypeVar

    @_UnpackSpecialForm
    def Unpack(self, parameters):
        """A special typing construct to unpack a variadic type. For example:

            Shape = TypeVarTuple('Shape')
            Batch = NewType('Batch', int)

            def add_batch_axis(
                x: Array[Unpack[Shape]]
            ) -> Array[Batch, Unpack[Shape]]: ...

        """
        item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
        return _UnpackAlias(self, (item,))

    def _is_unpack(obj):
        return isinstance(obj, _UnpackAlias)

else:
    class _UnpackAlias(typing._GenericAlias, _root=True):
        __class__ = typing.TypeVar

    class _UnpackForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return _UnpackAlias(self, (item,))

    Unpack = _UnpackForm(
        'Unpack',
        doc="""A special typing construct to unpack a variadic type. For example:

            Shape = TypeVarTuple('Shape')
            Batch = NewType('Batch', int)

            def add_batch_axis(
                x: Array[Unpack[Shape]]
            ) -> Array[Batch, Unpack[Shape]]: ...

        """)

    def _is_unpack(obj):
        return isinstance(obj, _UnpackAlias)


if hasattr(typing, "TypeVarTuple"):  # 3.11+

    # Add default Parameter - PEP 696
    class TypeVarTuple(typing.TypeVarTuple, _DefaultMixin, _root=True):
        """Type variable tuple."""

        def __init__(self, name, *, default=None):
            super().__init__(name)
            _DefaultMixin.__init__(self, default)

            # for pickling:
            try:
                def_mod = sys._getframe(1).f_globals.get('__name__', '__main__')
            except (AttributeError, ValueError):
                def_mod = None
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

else:
    class TypeVarTuple(_DefaultMixin):
        """Type variable tuple.

        Usage::

            Ts = TypeVarTuple('Ts')

        In the same way that a normal type variable is a stand-in for a single
        type such as ``int``, a type variable *tuple* is a stand-in for a *tuple*
        type such as ``Tuple[int, str]``.

        Type variable tuples can be used in ``Generic`` declarations.
        Consider the following example::

            class Array(Generic[*Ts]): ...

        The ``Ts`` type variable tuple here behaves like ``tuple[T1, T2]``,
        where ``T1`` and ``T2`` are type variables. To use these type variables
        as type parameters of ``Array``, we must *unpack* the type variable tuple using
        the star operator: ``*Ts``. The signature of ``Array`` then behaves
        as if we had simply written ``class Array(Generic[T1, T2]): ...``.
        In contrast to ``Generic[T1, T2]``, however, ``Generic[*Shape]`` allows
        us to parameterise the class with an *arbitrary* number of type parameters.

        Type variable tuples can be used anywhere a normal ``TypeVar`` can.
        This includes class definitions, as shown above, as well as function
        signatures and variable annotations::

            class Array(Generic[*Ts]):

                def __init__(self, shape: Tuple[*Ts]):
                    self._shape: Tuple[*Ts] = shape

                def get_shape(self) -> Tuple[*Ts]:
                    return self._shape

            shape = (Height(480), Width(640))
            x: Array[Height, Width] = Array(shape)
            y = abs(x)  # Inferred type is Array[Height, Width]
            z = x + x   #        ...    is Array[Height, Width]
            x.get_shape()  #     ...    is tuple[Height, Width]

        """

        # Trick Generic __parameters__.
        __class__ = typing.TypeVar

        def __iter__(self):
            yield self.__unpacked__

        def __init__(self, name, *, default=None):
            self.__name__ = name
            _DefaultMixin.__init__(self, default)

            # for pickling:
            try:
                def_mod = sys._getframe(1).f_globals.get('__name__', '__main__')
            except (AttributeError, ValueError):
                def_mod = None
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

            self.__unpacked__ = Unpack[self]

        def __repr__(self):
            return self.__name__

        def __hash__(self):
            return object.__hash__(self)

        def __eq__(self, other):
            return self is other

        def __reduce__(self):
            return self.__name__

        def __init_subclass__(self, *args, **kwds):
            if '_root' not in kwds:
                raise TypeError("Cannot subclass special typing classes")


if hasattr(typing, "reveal_type"):
    reveal_type = typing.reveal_type
else:
    def reveal_type(__obj: T) -> T:
        """Reveal the inferred type of a variable.

        When a static type checker encounters a call to ``reveal_type()``,
        it will emit the inferred type of the argument::

            x: int = 1
            reveal_type(x)

        Running a static type checker (e.g., ``mypy``) on this example
        will produce output similar to 'Revealed type is "builtins.int"'.

        At runtime, the function prints the runtime type of the
        argument and returns it unchanged.

        """
        print(f"Runtime type is {type(__obj).__name__!r}", file=sys.stderr)
        return __obj


if hasattr(typing, "assert_never"):
    assert_never = typing.assert_never
else:
    def assert_never(__arg: Never) -> Never:
        """Assert to the type checker that a line of code is unreachable.

        Example::

            def int_or_str(arg: int | str) -> None:
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                    case _:
                        assert_never(arg)

        If a type checker finds that a call to assert_never() is
        reachable, it will emit an error.

        At runtime, this throws an exception when called.

        """
        raise AssertionError("Expected code to be unreachable")


if hasattr(typing, 'dataclass_transform'):
    dataclass_transform = typing.dataclass_transform
else:
    def dataclass_transform(
        *,
        eq_default: bool = True,
        order_default: bool = False,
        kw_only_default: bool = False,
        field_specifiers: typing.Tuple[
            typing.Union[typing.Type[typing.Any], typing.Callable[..., typing.Any]],
            ...
        ] = (),
        **kwargs: typing.Any,
    ) -> typing.Callable[[T], T]:
        """Decorator that marks a function, class, or metaclass as providing
        dataclass-like behavior.

        Example:

            from typing_extensions import dataclass_transform

            _T = TypeVar("_T")

            # Used on a decorator function
            @dataclass_transform()
            def create_model(cls: type[_T]) -> type[_T]:
                ...
                return cls

            @create_model
            class CustomerModel:
                id: int
                name: str

            # Used on a base class
            @dataclass_transform()
            class ModelBase: ...

            class CustomerModel(ModelBase):
                id: int
                name: str

            # Used on a metaclass
            @dataclass_transform()
            class ModelMeta(type): ...

            class ModelBase(metaclass=ModelMeta): ...

            class CustomerModel(ModelBase):
                id: int
                name: str

        Each of the ``CustomerModel`` classes defined in this example will now
        behave similarly to a dataclass created with the ``@dataclasses.dataclass``
        decorator. For example, the type checker will synthesize an ``__init__``
        method.

        The arguments to this decorator can be used to customize this behavior:
        - ``eq_default`` indicates whether the ``eq`` parameter is assumed to be
          True or False if it is omitted by the caller.
        - ``order_default`` indicates whether the ``order`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``kw_only_default`` indicates whether the ``kw_only`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``field_specifiers`` specifies a static list of supported classes
          or functions that describe fields, similar to ``dataclasses.field()``.

        At runtime, this decorator records its arguments in the
        ``__dataclass_transform__`` attribute on the decorated object.

        See PEP 681 for details.

        """
        def decorator(cls_or_fn):
            cls_or_fn.__dataclass_transform__ = {
                "eq_default": eq_default,
                "order_default": order_default,
                "kw_only_default": kw_only_default,
                "field_specifiers": field_specifiers,
                "kwargs": kwargs,
            }
            return cls_or_fn
        return decorator


if hasattr(typing, "override"):
    override = typing.override
else:
    _F = typing.TypeVar("_F", bound=typing.Callable[..., typing.Any])

    def override(__arg: _F) -> _F:
        """Indicate that a method is intended to override a method in a base class.

        Usage:

            class Base:
                def method(self) -> None: ...
                    pass

            class Child(Base):
                @override
                def method(self) -> None:
                    super().method()

        When this decorator is applied to a method, the type checker will
        validate that it overrides a method with the same name on a base class.
        This helps prevent bugs that may occur when a base class is changed
        without an equivalent change to a child class.

        See PEP 698 for details.

        """
        return __arg


# We have to do some monkey patching to deal with the dual nature of
# Unpack/TypeVarTuple:
# - We want Unpack to be a kind of TypeVar so it gets accepted in
#   Generic[Unpack[Ts]]
# - We want it to *not* be treated as a TypeVar for the purposes of
#   counting generic parameters, so that when we subscript a generic,
#   the runtime doesn't try to substitute the Unpack with the subscripted type.
if not hasattr(typing, "TypeVarTuple"):
    typing._collect_type_vars = _collect_type_vars
    typing._check_generic = _check_generic


# Backport typing.NamedTuple as it exists in Python 3.11.
# In 3.11, the ability to define generic `NamedTuple`s was supported.
# This was explicitly disallowed in 3.9-3.10, and only half-worked in <=3.8.
if sys.version_info >= (3, 11):
    NamedTuple = typing.NamedTuple
else:
    def _caller():
        try:
            return sys._getframe(2).f_globals.get('__name__', '__main__')
        except (AttributeError, ValueError):  # For platforms without _getframe()
            return None

    def _make_nmtuple(name, types, module, defaults=()):
        fields = [n for n, t in types]
        annotations = {n: typing._type_check(t, f"field {n} annotation must be a type")
                       for n, t in types}
        nm_tpl = collections.namedtuple(name, fields,
                                        defaults=defaults, module=module)
        nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = annotations
        # The `_field_types` attribute was removed in 3.9;
        # in earlier versions, it is the same as the `__annotations__` attribute
        if sys.version_info < (3, 9):
            nm_tpl._field_types = annotations
        return nm_tpl

    _prohibited_namedtuple_fields = typing._prohibited
    _special_namedtuple_fields = frozenset({'__module__', '__name__', '__annotations__'})

    class _NamedTupleMeta(type):
        def __new__(cls, typename, bases, ns):
            assert _NamedTuple in bases
            for base in bases:
                if base is not _NamedTuple and base is not typing.Generic:
                    raise TypeError(
                        'can only inherit from a NamedTuple type and Generic')
            bases = tuple(tuple if base is _NamedTuple else base for base in bases)
            types = ns.get('__annotations__', {})
            default_names = []
            for field_name in types:
                if field_name in ns:
                    default_names.append(field_name)
                elif default_names:
                    raise TypeError(f"Non-default namedtuple field {field_name} "
                                    f"cannot follow default field"
                                    f"{'s' if len(default_names) > 1 else ''} "
                                    f"{', '.join(default_names)}")
            nm_tpl = _make_nmtuple(
                typename, types.items(),
                defaults=[ns[n] for n in default_names],
                module=ns['__module__']
            )
            nm_tpl.__bases__ = bases
            if typing.Generic in bases:
                class_getitem = typing.Generic.__class_getitem__.__func__
                nm_tpl.__class_getitem__ = classmethod(class_getitem)
            # update from user namespace without overriding special namedtuple attributes
            for key in ns:
                if key in _prohibited_namedtuple_fields:
                    raise AttributeError("Cannot overwrite NamedTuple attribute " + key)
                elif key not in _special_namedtuple_fields and key not in nm_tpl._fields:
                    setattr(nm_tpl, key, ns[key])
            if typing.Generic in bases:
                nm_tpl.__init_subclass__()
            return nm_tpl

    def NamedTuple(__typename, __fields=None, **kwargs):
        if __fields is None:
            __fields = kwargs.items()
        elif kwargs:
            raise TypeError("Either list of fields or keywords"
                            " can be provided to NamedTuple, not both")
        return _make_nmtuple(__typename, __fields, module=_caller())

    NamedTuple.__doc__ = typing.NamedTuple.__doc__
    _NamedTuple = type.__new__(_NamedTupleMeta, 'NamedTuple', (), {})

    # On 3.8+, alter the signature so that it matches typing.NamedTuple.
    # The signature of typing.NamedTuple on >=3.8 is invalid syntax in Python 3.7,
    # so just leave the signature as it is on 3.7.
    if sys.version_info >= (3, 8):
        NamedTuple.__text_signature__ = '(typename, fields=None, /, **kwargs)'

    def _namedtuple_mro_entries(bases):
        assert NamedTuple in bases
        return (_NamedTuple,)

    NamedTuple.__mro_entries__ = _namedtuple_mro_entries
python3.12/site-packages/pkg_resources/_vendor/platformdirs/windows.py000064400000014704151732701070022203 0ustar00from __future__ import annotations

import ctypes
import os
import sys
from functools import lru_cache
from typing import Callable

from .api import PlatformDirsABC


class Windows(PlatformDirsABC):
    """`MSDN on where to store app data files
    <http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120>`_.
    Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `roaming <platformdirs.api.PlatformDirsABC.roaming>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`."""

    @property
    def user_data_dir(self) -> str:
        """
        :return: data directory tied to the user, e.g.
         ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname`` (not roaming) or
         ``%USERPROFILE%\\AppData\\Roaming\\$appauthor\\$appname`` (roaming)
        """
        const = "CSIDL_APPDATA" if self.roaming else "CSIDL_LOCAL_APPDATA"
        path = os.path.normpath(get_win_folder(const))
        return self._append_parts(path)

    def _append_parts(self, path: str, *, opinion_value: str | None = None) -> str:
        params = []
        if self.appname:
            if self.appauthor is not False:
                author = self.appauthor or self.appname
                params.append(author)
            params.append(self.appname)
            if opinion_value is not None and self.opinion:
                params.append(opinion_value)
            if self.version:
                params.append(self.version)
        return os.path.join(path, *params)

    @property
    def site_data_dir(self) -> str:
        """:return: data directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname``"""
        path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
        return self._append_parts(path)

    @property
    def user_config_dir(self) -> str:
        """:return: config directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def site_config_dir(self) -> str:
        """:return: config directory shared by the users, same as `site_data_dir`"""
        return self.site_data_dir

    @property
    def user_cache_dir(self) -> str:
        """
        :return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
         ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname\\Cache\\$version``
        """
        path = os.path.normpath(get_win_folder("CSIDL_LOCAL_APPDATA"))
        return self._append_parts(path, opinion_value="Cache")

    @property
    def user_state_dir(self) -> str:
        """:return: state directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def user_log_dir(self) -> str:
        """
        :return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it
        """
        path = self.user_data_dir
        if self.opinion:
            path = os.path.join(path, "Logs")
        return path

    @property
    def user_documents_dir(self) -> str:
        """
        :return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``
        """
        return os.path.normpath(get_win_folder("CSIDL_PERSONAL"))

    @property
    def user_runtime_dir(self) -> str:
        """
        :return: runtime directory tied to the user, e.g.
         ``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``
        """
        path = os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Temp"))
        return self._append_parts(path)


def get_win_folder_from_env_vars(csidl_name: str) -> str:
    """Get folder from environment variables."""
    if csidl_name == "CSIDL_PERSONAL":  # does not have an environment name
        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Documents")

    env_var_name = {
        "CSIDL_APPDATA": "APPDATA",
        "CSIDL_COMMON_APPDATA": "ALLUSERSPROFILE",
        "CSIDL_LOCAL_APPDATA": "LOCALAPPDATA",
    }.get(csidl_name)
    if env_var_name is None:
        raise ValueError(f"Unknown CSIDL name: {csidl_name}")
    result = os.environ.get(env_var_name)
    if result is None:
        raise ValueError(f"Unset environment variable: {env_var_name}")
    return result


def get_win_folder_from_registry(csidl_name: str) -> str:
    """Get folder from the registry.

    This is a fallback technique at best. I'm not sure if using the
    registry for this guarantees us the correct answer for all CSIDL_*
    names.
    """
    shell_folder_name = {
        "CSIDL_APPDATA": "AppData",
        "CSIDL_COMMON_APPDATA": "Common AppData",
        "CSIDL_LOCAL_APPDATA": "Local AppData",
        "CSIDL_PERSONAL": "Personal",
    }.get(csidl_name)
    if shell_folder_name is None:
        raise ValueError(f"Unknown CSIDL name: {csidl_name}")
    if sys.platform != "win32":  # only needed for mypy type checker to know that this code runs only on Windows
        raise NotImplementedError
    import winreg

    key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
    directory, _ = winreg.QueryValueEx(key, shell_folder_name)
    return str(directory)


def get_win_folder_via_ctypes(csidl_name: str) -> str:
    """Get folder with ctypes."""
    csidl_const = {
        "CSIDL_APPDATA": 26,
        "CSIDL_COMMON_APPDATA": 35,
        "CSIDL_LOCAL_APPDATA": 28,
        "CSIDL_PERSONAL": 5,
    }.get(csidl_name)
    if csidl_const is None:
        raise ValueError(f"Unknown CSIDL name: {csidl_name}")

    buf = ctypes.create_unicode_buffer(1024)
    windll = getattr(ctypes, "windll")  # noqa: B009 # using getattr to avoid false positive with mypy type checker
    windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)

    # Downgrade to short path name if it has highbit chars.
    if any(ord(c) > 255 for c in buf):
        buf2 = ctypes.create_unicode_buffer(1024)
        if windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):
            buf = buf2

    return buf.value


def _pick_get_win_folder() -> Callable[[str], str]:
    if hasattr(ctypes, "windll"):
        return get_win_folder_via_ctypes
    try:
        import winreg  # noqa: F401
    except ImportError:
        return get_win_folder_from_env_vars
    else:
        return get_win_folder_from_registry


get_win_folder = lru_cache(maxsize=None)(_pick_get_win_folder())

__all__ = [
    "Windows",
]
python3.12/site-packages/pkg_resources/_vendor/platformdirs/unix.py000064400000015377151732701100021475 0ustar00from __future__ import annotations

import os
import sys
from configparser import ConfigParser
from pathlib import Path

from .api import PlatformDirsABC

if sys.platform.startswith("linux"):  # pragma: no branch # no op check, only to please the type checker
    from os import getuid
else:

    def getuid() -> int:
        raise RuntimeError("should only be used on Linux")


class Unix(PlatformDirsABC):
    """
    On Unix/Linux, we follow the
    `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. The spec allows
    overriding directories with environment variables. The examples show are the default values, alongside the name of
    the environment variable that overrides them. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `multipath <platformdirs.api.PlatformDirsABC.multipath>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    """

    @property
    def user_data_dir(self) -> str:
        """
        :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
         ``$XDG_DATA_HOME/$appname/$version``
        """
        path = os.environ.get("XDG_DATA_HOME", "")
        if not path.strip():
            path = os.path.expanduser("~/.local/share")
        return self._append_app_name_and_version(path)

    @property
    def site_data_dir(self) -> str:
        """
        :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
         enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
        """
        # XDG default for $XDG_DATA_DIRS; only first, if multipath is False
        path = os.environ.get("XDG_DATA_DIRS", "")
        if not path.strip():
            path = f"/usr/local/share{os.pathsep}/usr/share"
        return self._with_multi_path(path)

    def _with_multi_path(self, path: str) -> str:
        path_list = path.split(os.pathsep)
        if not self.multipath:
            path_list = path_list[0:1]
        path_list = [self._append_app_name_and_version(os.path.expanduser(p)) for p in path_list]
        return os.pathsep.join(path_list)

    @property
    def user_config_dir(self) -> str:
        """
        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
         ``$XDG_CONFIG_HOME/$appname/$version``
        """
        path = os.environ.get("XDG_CONFIG_HOME", "")
        if not path.strip():
            path = os.path.expanduser("~/.config")
        return self._append_app_name_and_version(path)

    @property
    def site_config_dir(self) -> str:
        """
        :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
         is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/etc/xdg/$appname/$version``
        """
        # XDG default for $XDG_CONFIG_DIRS only first, if multipath is False
        path = os.environ.get("XDG_CONFIG_DIRS", "")
        if not path.strip():
            path = "/etc/xdg"
        return self._with_multi_path(path)

    @property
    def user_cache_dir(self) -> str:
        """
        :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
         ``~/$XDG_CACHE_HOME/$appname/$version``
        """
        path = os.environ.get("XDG_CACHE_HOME", "")
        if not path.strip():
            path = os.path.expanduser("~/.cache")
        return self._append_app_name_and_version(path)

    @property
    def user_state_dir(self) -> str:
        """
        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
         ``$XDG_STATE_HOME/$appname/$version``
        """
        path = os.environ.get("XDG_STATE_HOME", "")
        if not path.strip():
            path = os.path.expanduser("~/.local/state")
        return self._append_app_name_and_version(path)

    @property
    def user_log_dir(self) -> str:
        """
        :return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it
        """
        path = self.user_state_dir
        if self.opinion:
            path = os.path.join(path, "log")
        return path

    @property
    def user_documents_dir(self) -> str:
        """
        :return: documents directory tied to the user, e.g. ``~/Documents``
        """
        documents_dir = _get_user_dirs_folder("XDG_DOCUMENTS_DIR")
        if documents_dir is None:
            documents_dir = os.environ.get("XDG_DOCUMENTS_DIR", "").strip()
            if not documents_dir:
                documents_dir = os.path.expanduser("~/Documents")

        return documents_dir

    @property
    def user_runtime_dir(self) -> str:
        """
        :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
         ``$XDG_RUNTIME_DIR/$appname/$version``
        """
        path = os.environ.get("XDG_RUNTIME_DIR", "")
        if not path.strip():
            path = f"/run/user/{getuid()}"
        return self._append_app_name_and_version(path)

    @property
    def site_data_path(self) -> Path:
        """:return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``"""
        return self._first_item_as_path_if_multipath(self.site_data_dir)

    @property
    def site_config_path(self) -> Path:
        """:return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``"""
        return self._first_item_as_path_if_multipath(self.site_config_dir)

    def _first_item_as_path_if_multipath(self, directory: str) -> Path:
        if self.multipath:
            # If multipath is True, the first path is returned.
            directory = directory.split(os.pathsep)[0]
        return Path(directory)


def _get_user_dirs_folder(key: str) -> str | None:
    """Return directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/"""
    user_dirs_config_path = os.path.join(Unix().user_config_dir, "user-dirs.dirs")
    if os.path.exists(user_dirs_config_path):
        parser = ConfigParser()

        with open(user_dirs_config_path) as stream:
            # Add fake section header, so ConfigParser doesn't complain
            parser.read_string(f"[top]\n{stream.read()}")

        if key not in parser["top"]:
            return None

        path = parser["top"][key].strip('"')
        # Handle relative home paths
        path = path.replace("$HOME", os.path.expanduser("~"))
        return path

    return None


__all__ = [
    "Unix",
]
python3.12/site-packages/pkg_resources/_vendor/platformdirs/version.py000064400000000240151732701100022156 0ustar00# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = '2.6.2'
__version_tuple__ = version_tuple = (2, 6, 2)
python3.12/site-packages/pkg_resources/_vendor/platformdirs/__pycache__/android.cpython-312.pyc000064400000013325151732701110026463 0ustar00�

��_i����ddlmZddlZddlZddlZddlmZddlmZddl	m
Z
Gd�de
�Zed�	�dd
��Zed�	�d
d��Z
dgZy)�)�annotationsN)�	lru_cache)�cast�)�PlatformDirsABCc��eZdZdZedd��Zedd��Zedd��Zedd��Zedd��Z	edd��Z
edd��Zedd	��Zedd
��Z
y)
�Androidz�
    Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>` and
    `version <platformdirs.api.PlatformDirsABC.version>`.
    c�R�|jttt��d�S)zd:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``�files��_append_app_name_and_versionr�str�_android_folder��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/android.py�
user_data_dirzAndroid.user_data_dir�!���0�0��c�?�;L�1M�w�W�W�c��|jS)z@:return: data directory shared by users, same as `user_data_dir`�rrs r�
site_data_dirzAndroid.site_data_dir����!�!�!rc�R�|jttt��d�S)z
        :return: config directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
        �shared_prefsrrs r�user_config_dirzAndroid.user_config_dirs!��
�0�0��c�?�;L�1M�~�^�^rc��|jS)zH:return: config directory shared by the users, same as `user_config_dir`)rrs r�site_config_dirzAndroid.site_config_dir$s���#�#�#rc�R�|jttt��d�S)zj:return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``�cacherrs r�user_cache_dirzAndroid.user_cache_dir)rrc��|jS)zB:return: state directory tied to the user, same as `user_data_dir`rrs r�user_state_dirzAndroid.user_state_dir.rrc�v�|j}|jr tjj	|d�}|S)z�
        :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
          e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``
        �log�r!�opinion�os�path�join�rr)s  r�user_log_dirzAndroid.user_log_dir3�/���"�"���<�<��7�7�<�<��e�,�D��rc��t�S)zf
        :return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``
        )�_android_documents_folderrs r�user_documents_dirzAndroid.user_documents_dir>s
��
)�*�*rc�v�|j}|jr tjj	|d�}|S)z�
        :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
          e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``
        �tmpr&r+s  r�user_runtime_dirzAndroid.user_runtime_dirEr-rN��returnr)�__name__�
__module__�__qualname__�__doc__�propertyrrrrr!r#r,r0r3�rrr	r	s�����X��X��"��"��_��_��$��$��X��X��"��"������+��+����rr	)�maxsizec�F�	ddlm}|d�}|j�j�j	�}|S#t
$rYt
jd�}tjD]+}|j|�s�|jd�d}Y|Sd}Y|SwxYw)zB:return: base folder for the Android OS or None if cannot be foundr��	autoclass�android.content.Contextz /data/(data|user/\d+)/(.+)/filesz/filesN)�jniusr?�getFilesDir�
getParentFile�getAbsolutePath�	Exception�re�compile�sysr)�match�split)r?�Context�result�patternr)s     rrrQs����#��5�6��$�0�0�2�@�@�B�R�R�T���M�����*�*�@�A���H�H�D��}�}�T�"����H�-�a�0����M�
�
�F��M��s�:>�AB �B �B �B c��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z,:return: documents folder for the Android OSrr>r@zandroid.os.Environmentz/storage/emulated/0/Documents)rAr?�getExternalFilesDir�DIRECTORY_DOCUMENTSrDrE)r?rK�Environment�
documents_dirs    rr/r/fsc��8�#��5�6��� 8�9��$�8�8��9X�9X�Y�i�i�k�
�����8�7�
���8�s�?A�A�A)r5z
str | Noner4)�
__future__rr(rFrH�	functoolsr�typingr�apirr	rr/�__all__r;rr�<module>rXsg��"�	�	�
��� �B�o�B�J�1�����(�1����� ��rpython3.12/site-packages/pkg_resources/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc000064400000023455151732701110026033 0ustar00�

��_i����ddlmZddlZddlZddlmZddlmZddlm	Z	ejjd�rddlmZnd
d	�ZGd
�de	�Z
dd�ZdgZy)�)�annotationsN)�ConfigParser)�Path�)�PlatformDirsABC�linux)�getuidc��td��)Nzshould only be used on Linux)�RuntimeError����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/unix.pyr	r	s���9�:�:r
c���eZdZdZedd��Zedd��Zdd�Zedd��Zedd��Z	edd��Z
edd��Zedd	��Zedd
��Z
edd��Zedd��Zedd
��Zdd�Zy)�UnixaD
    On Unix/Linux, we follow the
    `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. The spec allows
    overriding directories with environment variables. The examples show are the default values, alongside the name of
    the environment variable that overrides them. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `multipath <platformdirs.api.PlatformDirsABC.multipath>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    c���tjjdd�}|j�stjjd�}|j
|�S)z�
        :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
         ``$XDG_DATA_HOME/$appname/$version``
        �
XDG_DATA_HOME�z~/.local/share��os�environ�get�strip�path�
expanduser�_append_app_name_and_version��selfrs  r�
user_data_dirzUnix.user_data_dirsG���z�z�~�~�o�r�2���z�z�|��7�7�%�%�&6�7�D��0�0��6�6r
c��tjjdd�}|j�sdtj�d�}|j|�S)aY
        :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
         enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
        �
XDG_DATA_DIRSrz/usr/local/sharez
/usr/share)rrrr�pathsep�_with_multi_pathrs  r�
site_data_dirzUnix.site_data_dir)sD���z�z�~�~�o�r�2���z�z�|�%�b�j�j�\��<�D��$�$�T�*�*r
c� �|jtj�}|js|dd}|D�cgc]0}|j	tj
j
|����2}}tjj|�Scc}w)Nrr)�splitrr!�	multipathrrr�join)rr�	path_list�ps    rr"zUnix._with_multi_path6sp���J�J�r�z�z�*�	��~�~�!�!�A��I�W`�a�W`�RS�T�6�6�r�w�w�7I�7I�!�7L�M�W`�	�a��z�z���y�)�)��bs�5Bc���tjjdd�}|j�stjjd�}|j
|�S)z�
        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
         ``$XDG_CONFIG_HOME/$appname/$version``
        �XDG_CONFIG_HOMErz	~/.configrrs  r�user_config_dirzUnix.user_config_dir=sG���z�z�~�~�/��4���z�z�|��7�7�%�%�k�2�D��0�0��6�6r
c��tjjdd�}|j�sd}|j	|�S)a/
        :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
         is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/etc/xdg/$appname/$version``
        �XDG_CONFIG_DIRSrz/etc/xdg)rrrrr"rs  r�site_config_dirzUnix.site_config_dirHs8���z�z�~�~�/��4���z�z�|��D��$�$�T�*�*r
c���tjjdd�}|j�stjjd�}|j
|�S)z�
        :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
         ``~/$XDG_CACHE_HOME/$appname/$version``
        �XDG_CACHE_HOMErz~/.cacherrs  r�user_cache_dirzUnix.user_cache_dirUsG���z�z�~�~�.��3���z�z�|��7�7�%�%�j�1�D��0�0��6�6r
c���tjjdd�}|j�stjjd�}|j
|�S)z�
        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
         ``$XDG_STATE_HOME/$appname/$version``
        �XDG_STATE_HOMErz~/.local/staterrs  r�user_state_dirzUnix.user_state_dir`sH���z�z�~�~�.��3���z�z�|��7�7�%�%�&6�7�D��0�0��6�6r
c�v�|j}|jr tjj	|d�}|S)zy
        :return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it
        �log)r5�opinionrrr'rs  r�user_log_dirzUnix.user_log_dirks/��
�"�"���<�<��7�7�<�<��e�,�D��r
c��td�}|�Otjjdd�j	�}|stj
j
d�}|S)zU
        :return: documents directory tied to the user, e.g. ``~/Documents``
        �XDG_DOCUMENTS_DIRrz~/Documents)�_get_user_dirs_folderrrrrrr)r�
documents_dirs  r�user_documents_dirzUnix.user_documents_dirusP��
.�.A�B�
�� ��J�J�N�N�+>��C�I�I�K�M� � "��� 2� 2�=� A�
��r
c��tjjdd�}|j�s
dt	���}|j|�S)z�
        :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
         ``$XDG_RUNTIME_DIR/$appname/$version``
        �XDG_RUNTIME_DIRrz
/run/user/)rrrrr	rrs  r�user_runtime_dirzUnix.user_runtime_dir�sA���z�z�~�~�/��4���z�z�|����z�*�D��0�0��6�6r
c�8�|j|j�S)zd:return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``)� _first_item_as_path_if_multipathr#�rs r�site_data_pathzUnix.site_data_path�s���4�4�T�5G�5G�H�Hr
c�8�|j|j�S)zj:return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``)rCr/rDs r�site_config_pathzUnix.site_config_path�s���4�4�T�5I�5I�J�Jr
c�t�|jr"|jtj�d}t	|�S)Nr)r&r%rr!r)r�	directorys  rrCz%Unix._first_item_as_path_if_multipath�s*���>�>�!����
�
�3�A�6�I��I��r
N)�return�str)rrKrJrK)rJr)rIrKrJr)�__name__�
__module__�__qualname__�__doc__�propertyrr#r"r,r/r2r5r9r>rArErGrCrr
rrrs���	��7��7��
+��
+�*��7��7��
+��
+��7��7��7��7������
��
��7��7��I��I��K��K�r
rc���tjjt�jd�}tjj|�r�t
�}t|�5}|jd|j����ddd�||dvry|d|jd�}|jdtjjd��}|Sy#1swY�ZxYw)zjReturn directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/zuser-dirs.dirsz[top]
N�top�"z$HOME�~)
rrr'rr,�existsr�open�read_string�readr�replacer)�key�user_dirs_config_path�parser�streamrs     rr<r<�s����G�G�L�L���)?�)?�AQ�R��	�w�w�~�~�+�,����
�'�
(�F����������8�9�)��f�U�m�#���e�}�S�!�'�'��,���|�|�G�R�W�W�%7�%7��%<�=�����)�
(�s�'#C#�#C,)rJ�int)rZrKrJz
str | None)�
__future__rr�sys�configparserr�pathlibr�apir�platform�
startswithr	rr<�__all__rr
r�<module>rgsQ��"�	�
�%�� ��<�<���7�#��;�I�?�I�X�,��r
python3.12/site-packages/pkg_resources/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc000064400000031721151732701120026603 0ustar00�

��_i2���dZddlmZddlZddlZddlmZejdk\rddlm	Z	nddl
m	Z	dd	lmZdd
l
mZddl
mZd d�Ze�ZeZ				d!									d"d
�Z				d!									d#d�Z				d!									d"d�Z				d!									d#d�Z				d$									d%d�Z				d!									d"d�Z				d$									d%d�Zd&d�Z				d$									d%d�Z				d!									d'd�Z				d!									d(d�Z				d!									d'd�Z				d!									d(d�Z 				d$									d)d�Z!				d!									d'd�Z"				d$									d)d�Z#d*d�Z$				d$									d)d�Z%gd�Z&y)+z�
Utilities for determining application-specific dirs. See <https://github.com/platformdirs/platformdirs> for details and
usage.
�)�annotationsN)�Path)��)�Literal��)�PlatformDirsABC)�__version__)�__version_tuple__c�\�tjdk(rddlm}n tjdk(rddlm}nddlm}tjd�dk(rYtjd	�d
k(rAtjd�stjd�r|Sdd
l
m}|��ddl
m}|S|S)N�win32r	)�Windows�darwin)�MacOS)�Unix�ANDROID_DATAz/data�ANDROID_ROOTz/system�SHELL�PREFIX)�_android_folder)�Android)
�sys�platform�windowsr�macosr�unixr�os�getenv�androidrr)�Resultrrs   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/__init__.py�_set_platform_dir_classr#sy��
�|�|�w��.�	����	!�*�(�	�y�y�� �G�+��	�	�.�0I�Y�0V�
�9�9�W�����8�!4��M�,���(�(��N��M�c�4�t||||��jS)aq
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: data directory tied to the user
    ��appname�	appauthor�version�roaming)�PlatformDirs�
user_data_dirr&s    r"r,r,0�����9�g�W^�_�m�m�mr$c�4�t||||��jS)at
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :returns: data directory shared by users
    �r'r(r)�	multipath)r+�
site_data_dirr/s    r"r1r1@s����9�g�Yb�c�q�q�qr$c�4�t||||��jS)as
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: config directory tied to the user
    r&)r+�user_config_dirr&s    r"r3r3P�����9�g�W^�_�o�o�or$c�4�t||||��jS)az
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :returns: config directory shared by the users
    r/)r+�site_config_dirr/s    r"r6r6`s����9�g�Yb�c�s�s�sr$c�4�t||||��jS)ar
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: cache directory tied to the user
    �r'r(r)�opinion)r+�user_cache_dirr8s    r"r:r:p�����9�g�W^�_�n�n�nr$c�4�t||||��jS)ar
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: state directory tied to the user
    r&)r+�user_state_dirr&s    r"r=r=�r;r$c�4�t||||��jS)ap
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: log directory tied to the user
    r8)r+�user_log_dirr8s    r"r?r?�s����9�g�W^�_�l�l�lr$c�*�t�jS)z8
    :returns: documents directory tied to the user
    )r+�user_documents_dir�r$r"rArA�s���>�,�,�,r$c�4�t||||��jS)at
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: runtime directory tied to the user
    r8)r+�user_runtime_dirr8s    r"rDrD������9�g�W^�_�p�p�pr$c�4�t||||��jS)al
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: data path tied to the user
    r&)r+�user_data_pathr&s    r"rGrG�r;r$c�4�t||||��jS)aq
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
    :returns: data path shared by users
    r/)r+�site_data_pathr/s    r"rIrI�s����9�g�Yb�c�r�r�rr$c�4�t||||��jS)an
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: config path tied to the user
    r&)r+�user_config_pathr&s    r"rKrK�rEr$c�4�t||||��jS)au
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :returns: config path shared by the users
    r/)r+�site_config_pathr/s    r"rMrM�s����9�g�Yb�c�t�t�tr$c�4�t||||��jS)am
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: cache path tied to the user
    r8)r+�user_cache_pathr8s    r"rOrO�r4r$c�4�t||||��jS)am
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: state path tied to the user
    r&)r+�user_state_pathr&s    r"rQrQr4r$c�4�t||||��jS)ak
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: log path tied to the user
    r8)r+�
user_log_pathr8s    r"rSrSr-r$c�*�t�jS)z3
    :returns: documents path tied to the user
    )r+�user_documents_pathrBr$r"rUrU's���>�-�-�-r$c�4�t||||��jS)ao
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: runtime path tied to the user
    r8)r+�user_runtime_pathr8s    r"rWrW.s����9�g�W^�_�q�q�qr$)r�__version_info__r+�AppDirsr
r,r3r:r=r?rArDr1r6rGrKrOrQrSrUrWrIrM)�returnztype[PlatformDirsABC])NNNF)
r'�
str | Noner(�str | None | Literal[False]r)r[r*�boolrZ�str)
r'r[r(r\r)r[r0r]rZr^)NNNT)
r'r[r(r\r)r[r9r]rZr^)rZr^)
r'r[r(r\r)r[r*r]rZr)
r'r[r(r\r)r[r0r]rZr)
r'r[r(r\r)r[r9r]rZr)rZr)'�__doc__�
__future__rrr�pathlibr�version_info�typingr�typing_extensions�apir
r)rrrXr#r+rYr,r1r3r6r:r=r?rArDrGrIrKrMrOrQrSrUrW�__all__rBr$r"�<module>rgs����#�	�
�����v���+� � �:��.'�(��
���-1���	
n�
�
n�*�
n��
n��	
n�
	�
n�"�-1���	
r�
�
r�*�
r��
r��	
r�
	�
r�"�-1���	
p�
�
p�*�
p��
p��	
p�
	�
p�"�-1���	
t�
�
t�*�
t��
t��	
t�
	�
t�"�-1���	
o�
�
o�*�
o��
o��	
o�
	�
o�"�-1���	
o�
�
o�*�
o��
o��	
o�
	�
o�"�-1���	
m�
�
m�*�
m��
m��	
m�
	�
m� -��-1���	
q�
�
q�*�
q��
q��	
q�
	�
q�"�-1���	
o�
�
o�*�
o��
o��	
o�

�
o�"�-1���	
s�
�
s�*�
s��
s��	
s�

�
s�"�-1���	
q�
�
q�*�
q��
q��	
q�

�
q�"�-1���	
u�
�
u�*�
u��
u��	
u�

�
u�"�-1���	
p�
�
p�*�
p��
p��	
p�

�
p�"�-1���	
p�
�
p�*�
p��
p��	
p�

�
p�"�-1���	
n�
�
n�*�
n��
n��	
n�

�
n� .��-1���	
r�
�
r�*�
r��
r��	
r�

�
r� �r$python3.12/site-packages/pkg_resources/_vendor/platformdirs/__pycache__/version.cpython-312.pyc000064400000000570151732701120026527 0ustar00�

��_i����dxZZdxZZy)z2.6.2)��rN)�__version__�version�__version_tuple__�
version_tuple����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/version.py�<module>rs�� ���g�$-�-��Mr	python3.12/site-packages/pkg_resources/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc000064400000022172151732701120026536 0ustar00�

��_i����ddlmZddlZddlZddlZddlmZddlmZddl	m
Z
Gd�de
�Zdd	�Zdd
�Z
dd�Zdd�Zed�
�e��ZdgZy)�)�annotationsN)�	lru_cache)�Callable�)�PlatformDirsABCc��eZdZdZedd��Zdd�dd�Zedd��Zedd��Zedd��Z	edd	��Z
edd
��Zedd��Zedd��Z
edd
��Zy)�Windowsa�`MSDN on where to store app data files
    <http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120>`_.
    Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `roaming <platformdirs.api.PlatformDirsABC.roaming>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`.c��|jrdnd}tjjt	|��}|j|�S)z�
        :return: data directory tied to the user, e.g.
         ``%USERPROFILE%\AppData\Local\$appauthor\$appname`` (not roaming) or
         ``%USERPROFILE%\AppData\Roaming\$appauthor\$appname`` (roaming)
        �
CSIDL_APPDATA�CSIDL_LOCAL_APPDATA)�roaming�os�path�normpath�get_win_folder�
_append_parts)�self�constrs   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/windows.py�
user_data_dirzWindows.user_data_dirs<��$(�<�<��5J���w�w����u� 5�6���!�!�$�'�'�N��
opinion_valuec��g}|jr�|jdur+|jxs|j}|j|�|j|j�|�|jr|j|�|jr|j|j�tjj|g|���S)NF)�appname�	appauthor�append�opinion�versionrr�join)rrr�params�authors     rrzWindows._append_parts!s������<�<��~�~�U�*����7�4�<�<���
�
�f�%��M�M�$�,�,�'��(�T�\�\��
�
�m�,��|�|��
�
�d�l�l�+��w�w�|�|�D�*�6�*�*rc�t�tjjtd��}|j	|�S)zT:return: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``�CSIDL_COMMON_APPDATA�rrrrr�rrs  r�
site_data_dirzWindows.site_data_dir.s/���w�w����/E� F�G���!�!�$�'�'rc��|jS)zC:return: config directory tied to the user, same as `user_data_dir`�r�rs r�user_config_dirzWindows.user_config_dir4����!�!�!rc��|jS)zF:return: config directory shared by the users, same as `site_data_dir`)r'r*s r�site_config_dirzWindows.site_config_dir9r,rc�x�tjjtd��}|j	|d��S)z�
        :return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
         ``%USERPROFILE%\AppData\Local\$appauthor\$appname\Cache\$version``
        r�Cacherr%r&s  r�user_cache_dirzWindows.user_cache_dir>s4���w�w����/D� E�F���!�!�$�g�!�>�>rc��|jS)zB:return: state directory tied to the user, same as `user_data_dir`r)r*s r�user_state_dirzWindows.user_state_dirGr,rc�v�|j}|jr tjj	|d�}|S)zy
        :return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it
        �Logs)rrrrr r&s  r�user_log_dirzWindows.user_log_dirLs/��
�!�!���<�<��7�7�<�<��f�-�D��rc�R�tjjtd��S)z`
        :return: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``
        �CSIDL_PERSONAL)rrrrr*s r�user_documents_dirzWindows.user_documents_dirVs��
�w�w����/?� @�A�Arc��tjjtjjt	d�d��}|j|�S)z�
        :return: runtime directory tied to the user, e.g.
         ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``
        r�Temp)rrrr rrr&s  r�user_runtime_dirzWindows.user_runtime_dir]s?���w�w��������^�<Q�-R�TZ� [�\���!�!�$�'�'r)�return�str)rr>rz
str | Noner=r>)�__name__�
__module__�__qualname__�__doc__�propertyrrr'r+r.r1r3r6r9r<�rrr	r	s���=��(��(�GK�+��(��(�
�"��"��"��"��?��?��"��"������B��B��(��(rr	c�T�|dk(rNtjjtjjtjd�d�Sdddd�j|�}|�t
d|����tjj|�}|�t
d	|����|S)
z&Get folder from environment variables.r8�USERPROFILE�	Documents�APPDATA�ALLUSERSPROFILE�LOCALAPPDATA)rr$r�Unknown CSIDL name: zUnset environment variable: )rrr r�environ�get�
ValueError)�
csidl_name�env_var_name�results   r�get_win_folder_from_env_varsrRgs����%�%��w�w�|�|�B�G�G�,�,�R�Z�Z�
�-F�G��U�U�#� 1�-��
�c�*�o�	�
���/�
�|�<�=�=�
�Z�Z�^�^�L�
)�F�
�~��7��~�F�G�G��Mrc��ddddd�j|�}|�td|����tjdk7rt�d	dl}|j
|jd
�}|j||�\}}t|�S)z�Get folder from the registry.

    This is a fallback technique at best. I'm not sure if using the
    registry for this guarantees us the correct answer for all CSIDL_*
    names.
    �AppDatazCommon AppDataz
Local AppData�Personal�rr$rr8NrK�win32rz@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)
rMrN�sys�platform�NotImplementedError�winreg�OpenKey�HKEY_CURRENT_USER�QueryValueExr>)rO�shell_folder_namer[�key�	directory�_s      r�get_win_folder_from_registryrcys���#� 0�.�$�	�

�c�*�o��� ��/�
�|�<�=�=�
�|�|�w��!�!��
�.�.��1�1�3v�
w�C��&�&�s�,=�>�L�I�q��y�>�rc��ddddd�j|�}|�td|����tjd�}t	td	�}|j
j
d|dd
|�td�|D��r>tjd�}|jj|j|d�r|}|jS)zGet folder with ctypes.��#��rVNrKi�windllrc3�8K�|]}t|�dkD���y�w)�N)�ord)�.0�cs  r�	<genexpr>z,get_win_folder_via_ctypes.<locals>.<genexpr>�s����
%��A�3�q�6�C�<��s�)rMrN�ctypes�create_unicode_buffer�getattr�shell32�SHGetFolderPathW�any�kernel32�GetShortPathNameW�value)rO�csidl_const�bufri�buf2s     r�get_win_folder_via_ctypesr|�s���� "�!��	�

�c�*�o�����/�
�|�<�=�=�
�
&�
&�t�
,�C�
�V�X�
&�F�
�N�N�#�#�D�+�t�Q��D��
%��
%�%��+�+�D�1���?�?�,�,�S�Y�Y��d�C��C��9�9�rc�n�ttd�rtS	ddl}tS#t
$r	tcYSwxYw)Nrir)�hasattrrpr|r[rc�ImportErrorrR)r[s r�_pick_get_win_folderr��s9���v�x� �(�(�,��,�+���,�+�+�,�s�"�4�4)�maxsize)rOr>r=r>)r=zCallable[[str], str])�
__future__rrprrX�	functoolsr�typingr�apirr	rRrcr|r�r�__all__rDrr�<module>r�s`��"�
�	�
��� �X(�o�X(�v�$�0�0,�)��4�(�)=�)?�@����rpython3.12/site-packages/pkg_resources/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc000064400000003451151732701130026564 0ustar00�

��_i���F�ddlmZddlmZmZdZdd�Zedk(re�yy)�)�annotations)�PlatformDirs�__version__)	�
user_data_dir�user_config_dir�user_cache_dir�user_state_dir�user_log_dir�user_documents_dir�user_runtime_dir�
site_data_dir�site_config_dirc	��d}d}tdt�d��td�t||d��}tD]}t|�dt	||�����td	�t||�}tD]}t|�dt	||�����td
�t|�}tD]}t|�dt	||�����td�t|d�
�}tD]}t|�dt	||�����y)N�MyApp�	MyCompanyz-- platformdirs z --z%-- app dirs (with optional 'version')z1.0)�versionz: z)
-- app dirs (without optional 'version')z+
-- app dirs (without optional 'appauthor')z(
-- app dirs (with disabled 'appauthor')F)�	appauthor)�printrr�PROPS�getattr)�app_name�
app_author�dirs�props    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/__main__.py�mainrs���H��J�	��[�M��
-�.�	�
1�2���*�e�<�D���
���b���t�,�-�.�/��
�
6�7���*�-�D���
���b���t�,�-�.�/��
�
8�9���!�D���
���b���t�,�-�.�/��
�
5�6���E�2�D���
���b���t�,�-�.�/���__main__N)�return�None)�
__future__r�platformdirsrrrr�__name__�rr�<module>r%s+��"�2�
	��0�6�z���F�rpython3.12/site-packages/pkg_resources/_vendor/platformdirs/__pycache__/api.cpython-312.pyc000064400000015020151732701130025610 0ustar00�

��_i.��|�ddlmZddlZddlZddlmZmZddlmZejdk\rddl
mZGd�de�Zy)	�)�annotationsN)�ABC�abstractmethod)�Path)��)�Literalc���eZdZdZ						d											dd�Zdd�Zeedd���Zeedd���Z	eedd���Z
eedd���Zeedd	���Zeedd
���Z
eedd���Zeedd���Zeedd
���Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zy)�PlatformDirsABCz7
    Abstract base class for platform directories.
    Nc�`�||_||_	||_	||_	||_	||_y)a%
        Create a new platform directory.

        :param appname: See `appname`.
        :param appauthor: See `appauthor`.
        :param version: See `version`.
        :param roaming: See `roaming`.
        :param multipath: See `multipath`.
        :param opinion: See `opinion`.
        N)�appname�	appauthor�version�roaming�	multipath�opinion)�selfr
rrrrrs       ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/api.py�__init__zPlatformDirsABC.__init__sJ��&���"���	����	����	�
#���	����c��t|dd�}|jrB|j|j�|jr|j|j�t	j
j|dg|���S)N�r)�listr
�appendr�os�path�join)r�base�paramss   r�_append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_version<s[���d�1�2�h����<�<��M�M�$�,�,�'��|�|��
�
�d�l�l�+��w�w�|�|�D��G�-�f�-�-rc��y)z(:return: data directory tied to the userN��rs r�
user_data_dirzPlatformDirsABC.user_data_dirD��rc��y)z':return: data directory shared by usersNr"r#s r�
site_data_dirzPlatformDirsABC.site_data_dirIr%rc��y)z*:return: config directory tied to the userNr"r#s r�user_config_dirzPlatformDirsABC.user_config_dirNr%rc��y)z-:return: config directory shared by the usersNr"r#s r�site_config_dirzPlatformDirsABC.site_config_dirSr%rc��y)z):return: cache directory tied to the userNr"r#s r�user_cache_dirzPlatformDirsABC.user_cache_dirXr%rc��y)z):return: state directory tied to the userNr"r#s r�user_state_dirzPlatformDirsABC.user_state_dir]r%rc��y)z':return: log directory tied to the userNr"r#s r�user_log_dirzPlatformDirsABC.user_log_dirbr%rc��y)z-:return: documents directory tied to the userNr"r#s r�user_documents_dirz"PlatformDirsABC.user_documents_dirgr%rc��y)z+:return: runtime directory tied to the userNr"r#s r�user_runtime_dirz PlatformDirsABC.user_runtime_dirlr%rc�,�t|j�S)z#:return: data path tied to the user)rr$r#s r�user_data_pathzPlatformDirsABC.user_data_pathq����D�&�&�'�'rc�,�t|j�S)z":return: data path shared by users)rr'r#s r�site_data_pathzPlatformDirsABC.site_data_pathvr8rc�,�t|j�S)z%:return: config path tied to the user)rr)r#s r�user_config_pathz PlatformDirsABC.user_config_path{����D�(�(�)�)rc�,�t|j�S)z(:return: config path shared by the users)rr+r#s r�site_config_pathz PlatformDirsABC.site_config_path�r=rc�,�t|j�S)z$:return: cache path tied to the user)rr-r#s r�user_cache_pathzPlatformDirsABC.user_cache_path�����D�'�'�(�(rc�,�t|j�S)z$:return: state path tied to the user)rr/r#s r�user_state_pathzPlatformDirsABC.user_state_path�rBrc�,�t|j�S)z":return: log path tied to the user)rr1r#s r�
user_log_pathzPlatformDirsABC.user_log_path�s���D�%�%�&�&rc�,�t|j�S)z(:return: documents path tied to the user)rr3r#s r�user_documents_pathz#PlatformDirsABC.user_documents_path�s���D�+�+�,�,rc�,�t|j�S)z&:return: runtime path tied to the user)rr5r#s r�user_runtime_pathz!PlatformDirsABC.user_runtime_path�s���D�)�)�*�*r)NNNFFT)r
�
str | Nonerzstr | None | Literal[False]rrKr�boolrrLrrL)r�str�returnrM)rNrM)rNr)�__name__�
__module__�__qualname__�__doc__rr �propertyrr$r'r)r+r-r/r1r3r5r7r:r<r?rArDrFrHrJr"rrrrs���#�15�"����)��)�/�)��	)�
�)��
)��)�V.���7���7���6���6���9���9���<���<���8���8���8���8���6���6���<���<���:���:��(��(��(��(��*��*��*��*��)��)��)��)��'��'��-��-��+��+rr)
�
__future__rr�sys�abcrr�pathlibr�version_info�typingr	rr"rr�<module>rZs3��"�	�
�#�����v���P+�c�P+rpython3.12/site-packages/pkg_resources/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc000064400000010310151732701130026136 0ustar00�

��_i_
��@�ddlmZddlZddlmZGd�de�ZdgZy)�)�annotationsN�)�PlatformDirsABCc��eZdZdZedd��Zedd��Zedd��Zedd��Zedd��Z	edd��Z
edd��Zedd	��Zedd
��Z
y)
�MacOSa�
    Platform directories for the macOS operating system. Follows the guidance from `Apple documentation
    <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
    Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>` and
    `version <platformdirs.api.PlatformDirsABC.version>`.
    c�^�|jtjjd��S)zb:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``z~/Library/Application Support/��_append_app_name_and_version�os�path�
expanduser��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/macos.py�
user_data_dirzMacOS.user_data_dirs%���0�0����1C�1C�Dd�1e�f�f�c�$�|jd�S)z`:return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``z/Library/Application Support�r
rs r�
site_data_dirzMacOS.site_data_dirs���0�0�1O�P�Prc�^�|jtjjd��S)z\:return: config directory tied to the user, e.g. ``~/Library/Preferences/$appname/$version``z~/Library/Preferences/r	rs r�user_config_dirzMacOS.user_config_dirs%���0�0����1C�1C�D\�1]�^�^rc�$�|jd�S)zU:return: config directory shared by the users, e.g. ``/Library/Preferences/$appname``z/Library/Preferencesrrs r�site_config_dirzMacOS.site_config_dirs���0�0�1G�H�Hrc�^�|jtjjd��S)zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesr	rs r�user_cache_dirzMacOS.user_cache_dir$s%���0�0����1C�1C�DV�1W�X�Xrc��|jS)zB:return: state directory tied to the user, same as `user_data_dir`)rrs r�user_state_dirzMacOS.user_state_dir)s���!�!�!rc�^�|jtjjd��S)zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsr	rs r�user_log_dirzMacOS.user_log_dir.s%���0�0����1C�1C�DT�1U�V�Vrc�@�tjjd�S)zC:return: documents directory tied to the user, e.g. ``~/Documents``z~/Documents)rrr
rs r�user_documents_dirzMacOS.user_documents_dir3s���w�w�!�!�-�0�0rc�^�|jtjjd��S)zg:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``z~/Library/Caches/TemporaryItemsr	rs r�user_runtime_dirzMacOS.user_runtime_dir8s%���0�0����1C�1C�De�1f�g�grN)�return�str)�__name__�
__module__�__qualname__�__doc__�propertyrrrrrrrr!r#�rrrrs�����g��g��Q��Q��_��_��I��I��Y��Y��"��"��W��W��1��1��h��hrr)�
__future__rr�apirr�__all__r+rr�<module>r/s)��"�	� �3h�O�3h�n��rpython3.12/site-packages/pkg_resources/_vendor/platformdirs/__main__.py000064400000002214151732701130022217 0ustar00from __future__ import annotations

from platformdirs import PlatformDirs, __version__

PROPS = (
    "user_data_dir",
    "user_config_dir",
    "user_cache_dir",
    "user_state_dir",
    "user_log_dir",
    "user_documents_dir",
    "user_runtime_dir",
    "site_data_dir",
    "site_config_dir",
)


def main() -> None:
    app_name = "MyApp"
    app_author = "MyCompany"

    print(f"-- platformdirs {__version__} --")

    print("-- app dirs (with optional 'version')")
    dirs = PlatformDirs(app_name, app_author, version="1.0")
    for prop in PROPS:
        print(f"{prop}: {getattr(dirs, prop)}")

    print("\n-- app dirs (without optional 'version')")
    dirs = PlatformDirs(app_name, app_author)
    for prop in PROPS:
        print(f"{prop}: {getattr(dirs, prop)}")

    print("\n-- app dirs (without optional 'appauthor')")
    dirs = PlatformDirs(app_name)
    for prop in PROPS:
        print(f"{prop}: {getattr(dirs, prop)}")

    print("\n-- app dirs (with disabled 'appauthor')")
    dirs = PlatformDirs(app_name, appauthor=False)
    for prop in PROPS:
        print(f"{prop}: {getattr(dirs, prop)}")


if __name__ == "__main__":
    main()
python3.12/site-packages/pkg_resources/_vendor/platformdirs/android.py000064400000007744151732701140022135 0ustar00from __future__ import annotations

import os
import re
import sys
from functools import lru_cache
from typing import cast

from .api import PlatformDirsABC


class Android(PlatformDirsABC):
    """
    Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>` and
    `version <platformdirs.api.PlatformDirsABC.version>`.
    """

    @property
    def user_data_dir(self) -> str:
        """:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``"""
        return self._append_app_name_and_version(cast(str, _android_folder()), "files")

    @property
    def site_data_dir(self) -> str:
        """:return: data directory shared by users, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def user_config_dir(self) -> str:
        """
        :return: config directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
        """
        return self._append_app_name_and_version(cast(str, _android_folder()), "shared_prefs")

    @property
    def site_config_dir(self) -> str:
        """:return: config directory shared by the users, same as `user_config_dir`"""
        return self.user_config_dir

    @property
    def user_cache_dir(self) -> str:
        """:return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``"""
        return self._append_app_name_and_version(cast(str, _android_folder()), "cache")

    @property
    def user_state_dir(self) -> str:
        """:return: state directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def user_log_dir(self) -> str:
        """
        :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
          e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``
        """
        path = self.user_cache_dir
        if self.opinion:
            path = os.path.join(path, "log")
        return path

    @property
    def user_documents_dir(self) -> str:
        """
        :return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``
        """
        return _android_documents_folder()

    @property
    def user_runtime_dir(self) -> str:
        """
        :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
          e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``
        """
        path = self.user_cache_dir
        if self.opinion:
            path = os.path.join(path, "tmp")
        return path


@lru_cache(maxsize=1)
def _android_folder() -> str | None:
    """:return: base folder for the Android OS or None if cannot be found"""
    try:
        # First try to get path to android app via pyjnius
        from jnius import autoclass

        Context = autoclass("android.content.Context")  # noqa: N806
        result: str | None = Context.getFilesDir().getParentFile().getAbsolutePath()
    except Exception:
        # if fails find an android folder looking path on the sys.path
        pattern = re.compile(r"/data/(data|user/\d+)/(.+)/files")
        for path in sys.path:
            if pattern.match(path):
                result = path.split("/files")[0]
                break
        else:
            result = None
    return result


@lru_cache(maxsize=1)
def _android_documents_folder() -> str:
    """:return: documents folder for the Android OS"""
    # Get directories with pyjnius
    try:
        from jnius import autoclass

        Context = autoclass("android.content.Context")  # noqa: N806
        Environment = autoclass("android.os.Environment")  # noqa: N806
        documents_dir: str = Context.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath()
    except Exception:
        documents_dir = "/storage/emulated/0/Documents"

    return documents_dir


__all__ = [
    "Android",
]
python3.12/site-packages/pkg_resources/_vendor/platformdirs/api.py000064400000011456151732701140021261 0ustar00from __future__ import annotations

import os
import sys
from abc import ABC, abstractmethod
from pathlib import Path

if sys.version_info >= (3, 8):  # pragma: no branch
    from typing import Literal  # pragma: no cover


class PlatformDirsABC(ABC):
    """
    Abstract base class for platform directories.
    """

    def __init__(
        self,
        appname: str | None = None,
        appauthor: str | None | Literal[False] = None,
        version: str | None = None,
        roaming: bool = False,
        multipath: bool = False,
        opinion: bool = True,
    ):
        """
        Create a new platform directory.

        :param appname: See `appname`.
        :param appauthor: See `appauthor`.
        :param version: See `version`.
        :param roaming: See `roaming`.
        :param multipath: See `multipath`.
        :param opinion: See `opinion`.
        """
        self.appname = appname  #: The name of application.
        self.appauthor = appauthor
        """
        The name of the app author or distributing body for this application. Typically, it is the owning company name.
        Defaults to `appname`. You may pass ``False`` to disable it.
        """
        self.version = version
        """
        An optional version path element to append to the path. You might want to use this if you want multiple versions
        of your app to be able to run independently. If used, this would typically be ``<major>.<minor>``.
        """
        self.roaming = roaming
        """
        Whether to use the roaming appdata directory on Windows. That means that for users on a Windows network setup
        for roaming profiles, this user data will be synced on login (see
        `here <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>`_).
        """
        self.multipath = multipath
        """
        An optional parameter only applicable to Unix/Linux which indicates that the entire list of data dirs should be
        returned. By default, the first item would only be returned.
        """
        self.opinion = opinion  #: A flag to indicating to use opinionated values.

    def _append_app_name_and_version(self, *base: str) -> str:
        params = list(base[1:])
        if self.appname:
            params.append(self.appname)
            if self.version:
                params.append(self.version)
        return os.path.join(base[0], *params)

    @property
    @abstractmethod
    def user_data_dir(self) -> str:
        """:return: data directory tied to the user"""

    @property
    @abstractmethod
    def site_data_dir(self) -> str:
        """:return: data directory shared by users"""

    @property
    @abstractmethod
    def user_config_dir(self) -> str:
        """:return: config directory tied to the user"""

    @property
    @abstractmethod
    def site_config_dir(self) -> str:
        """:return: config directory shared by the users"""

    @property
    @abstractmethod
    def user_cache_dir(self) -> str:
        """:return: cache directory tied to the user"""

    @property
    @abstractmethod
    def user_state_dir(self) -> str:
        """:return: state directory tied to the user"""

    @property
    @abstractmethod
    def user_log_dir(self) -> str:
        """:return: log directory tied to the user"""

    @property
    @abstractmethod
    def user_documents_dir(self) -> str:
        """:return: documents directory tied to the user"""

    @property
    @abstractmethod
    def user_runtime_dir(self) -> str:
        """:return: runtime directory tied to the user"""

    @property
    def user_data_path(self) -> Path:
        """:return: data path tied to the user"""
        return Path(self.user_data_dir)

    @property
    def site_data_path(self) -> Path:
        """:return: data path shared by users"""
        return Path(self.site_data_dir)

    @property
    def user_config_path(self) -> Path:
        """:return: config path tied to the user"""
        return Path(self.user_config_dir)

    @property
    def site_config_path(self) -> Path:
        """:return: config path shared by the users"""
        return Path(self.site_config_dir)

    @property
    def user_cache_path(self) -> Path:
        """:return: cache path tied to the user"""
        return Path(self.user_cache_dir)

    @property
    def user_state_path(self) -> Path:
        """:return: state path tied to the user"""
        return Path(self.user_state_dir)

    @property
    def user_log_path(self) -> Path:
        """:return: log path tied to the user"""
        return Path(self.user_log_dir)

    @property
    def user_documents_path(self) -> Path:
        """:return: documents path tied to the user"""
        return Path(self.user_documents_dir)

    @property
    def user_runtime_path(self) -> Path:
        """:return: runtime path tied to the user"""
        return Path(self.user_runtime_dir)
python3.12/site-packages/pkg_resources/_vendor/platformdirs/__init__.py000064400000031006151732701140022240 0ustar00"""
Utilities for determining application-specific dirs. See <https://github.com/platformdirs/platformdirs> for details and
usage.
"""
from __future__ import annotations

import os
import sys
from pathlib import Path

if sys.version_info >= (3, 8):  # pragma: no cover (py38+)
    from typing import Literal
else:  # pragma: no cover (py38+)
    from ..typing_extensions import Literal

from .api import PlatformDirsABC
from .version import __version__
from .version import __version_tuple__ as __version_info__


def _set_platform_dir_class() -> type[PlatformDirsABC]:
    if sys.platform == "win32":
        from .windows import Windows as Result
    elif sys.platform == "darwin":
        from .macos import MacOS as Result
    else:
        from .unix import Unix as Result

    if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system":

        if os.getenv("SHELL") or os.getenv("PREFIX"):
            return Result

        from .android import _android_folder

        if _android_folder() is not None:
            from .android import Android

            return Android  # return to avoid redefinition of result

    return Result


PlatformDirs = _set_platform_dir_class()  #: Currently active platform
AppDirs = PlatformDirs  #: Backwards compatibility with appdirs


def user_data_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: data directory tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_data_dir


def site_data_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    multipath: bool = False,
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :returns: data directory shared by users
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_data_dir


def user_config_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: config directory tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_config_dir


def site_config_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    multipath: bool = False,
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :returns: config directory shared by the users
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_config_dir


def user_cache_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: cache directory tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_cache_dir


def user_state_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: state directory tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_state_dir


def user_log_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: log directory tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_log_dir


def user_documents_dir() -> str:
    """
    :returns: documents directory tied to the user
    """
    return PlatformDirs().user_documents_dir


def user_runtime_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: runtime directory tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_runtime_dir


def user_data_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: data path tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_data_path


def site_data_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    multipath: bool = False,
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
    :returns: data path shared by users
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_data_path


def user_config_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: config path tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_config_path


def site_config_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    multipath: bool = False,
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :returns: config path shared by the users
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_config_path


def user_cache_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: cache path tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_cache_path


def user_state_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.
    :returns: state path tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_state_path


def user_log_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: log path tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_log_path


def user_documents_path() -> Path:
    """
    :returns: documents path tied to the user
    """
    return PlatformDirs().user_documents_path


def user_runtime_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :returns: runtime path tied to the user
    """
    return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_runtime_path


__all__ = [
    "__version__",
    "__version_info__",
    "PlatformDirs",
    "AppDirs",
    "PlatformDirsABC",
    "user_data_dir",
    "user_config_dir",
    "user_cache_dir",
    "user_state_dir",
    "user_log_dir",
    "user_documents_dir",
    "user_runtime_dir",
    "site_data_dir",
    "site_config_dir",
    "user_data_path",
    "user_config_path",
    "user_cache_path",
    "user_state_path",
    "user_log_path",
    "user_documents_path",
    "user_runtime_path",
    "site_data_path",
    "site_config_path",
]
python3.12/site-packages/pkg_resources/_vendor/platformdirs/macos.py000064400000005137151732701140021611 0ustar00from __future__ import annotations

import os

from .api import PlatformDirsABC


class MacOS(PlatformDirsABC):
    """
    Platform directories for the macOS operating system. Follows the guidance from `Apple documentation
    <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
    Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>` and
    `version <platformdirs.api.PlatformDirsABC.version>`.
    """

    @property
    def user_data_dir(self) -> str:
        """:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Application Support/"))

    @property
    def site_data_dir(self) -> str:
        """:return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``"""
        return self._append_app_name_and_version("/Library/Application Support")

    @property
    def user_config_dir(self) -> str:
        """:return: config directory tied to the user, e.g. ``~/Library/Preferences/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Preferences/"))

    @property
    def site_config_dir(self) -> str:
        """:return: config directory shared by the users, e.g. ``/Library/Preferences/$appname``"""
        return self._append_app_name_and_version("/Library/Preferences")

    @property
    def user_cache_dir(self) -> str:
        """:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches"))

    @property
    def user_state_dir(self) -> str:
        """:return: state directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def user_log_dir(self) -> str:
        """:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Logs"))

    @property
    def user_documents_dir(self) -> str:
        """:return: documents directory tied to the user, e.g. ``~/Documents``"""
        return os.path.expanduser("~/Documents")

    @property
    def user_runtime_dir(self) -> str:
        """:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches/TemporaryItems"))


__all__ = [
    "MacOS",
]
python3.12/site-packages/pkg_resources/_vendor/platformdirs/py.typed000064400000000000151732701140021614 0ustar00python3.12/site-packages/pkg_resources/__init__.py000064400000325437151732701140016114 0ustar00"""
Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.

This module is deprecated. Users are directed to :mod:`importlib.resources`,
:mod:`importlib.metadata` and :pypi:`packaging` instead.
"""

import sys
import os
import io
import time
import re
import types
import zipfile
import zipimport
import warnings
import stat
import functools
import pkgutil
import operator
import platform
import collections
import plistlib
import email.parser
import errno
import tempfile
import textwrap
import inspect
import ntpath
import posixpath
import importlib
from pkgutil import get_importer

try:
    import _imp
except ImportError:
    # Python 3.2 compatibility
    import imp as _imp

try:
    FileExistsError
except NameError:
    FileExistsError = OSError

# capture these to bypass sandboxing
from os import utime

try:
    from os import mkdir, rename, unlink

    WRITE_SUPPORT = True
except ImportError:
    # no write support, probably under GAE
    WRITE_SUPPORT = False

from os import open as os_open
from os.path import isdir, split

try:
    import importlib.machinery as importlib_machinery

    # access attribute to force import under delayed import mechanisms.
    importlib_machinery.__name__
except ImportError:
    importlib_machinery = None

from pkg_resources.extern.jaraco.text import (
    yield_lines,
    drop_comment,
    join_continuation,
)

from pkg_resources.extern import platformdirs
from pkg_resources.extern import packaging

__import__('pkg_resources.extern.packaging.version')
__import__('pkg_resources.extern.packaging.specifiers')
__import__('pkg_resources.extern.packaging.requirements')
__import__('pkg_resources.extern.packaging.markers')
__import__('pkg_resources.extern.packaging.utils')

if sys.version_info < (3, 5):
    raise RuntimeError("Python 3.5 or later is required")

# declare some globals that will be defined later to
# satisfy the linters.
require = None
working_set = None
add_activation_listener = None
resources_stream = None
cleanup_resources = None
resource_dir = None
resource_stream = None
set_extraction_path = None
resource_isdir = None
resource_string = None
iter_entry_points = None
resource_listdir = None
resource_filename = None
resource_exists = None
_distribution_finders = None
_namespace_handlers = None
_namespace_packages = None


warnings.warn(
    "pkg_resources is deprecated as an API. "
    "See https://setuptools.pypa.io/en/latest/pkg_resources.html",
    DeprecationWarning,
    stacklevel=2,
)


_PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I)


class PEP440Warning(RuntimeWarning):
    """
    Used when there is an issue with a version or specifier not complying with
    PEP 440.
    """


parse_version = packaging.version.Version


_state_vars = {}


def _declare_state(vartype, **kw):
    globals().update(kw)
    _state_vars.update(dict.fromkeys(kw, vartype))


def __getstate__():
    state = {}
    g = globals()
    for k, v in _state_vars.items():
        state[k] = g['_sget_' + v](g[k])
    return state


def __setstate__(state):
    g = globals()
    for k, v in state.items():
        g['_sset_' + _state_vars[k]](k, g[k], v)
    return state


def _sget_dict(val):
    return val.copy()


def _sset_dict(key, ob, state):
    ob.clear()
    ob.update(state)


def _sget_object(val):
    return val.__getstate__()


def _sset_object(key, ob, state):
    ob.__setstate__(state)


_sget_none = _sset_none = lambda *args: None


def get_supported_platform():
    """Return this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of macOS that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of macOS that we are *running*.  To allow usage of packages that
    explicitly require a newer version of macOS, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    """
    plat = get_build_platform()
    m = macosVersionString.match(plat)
    if m is not None and sys.platform == "darwin":
        try:
            plat = 'macosx-%s-%s' % ('.'.join(_macos_vers()[:2]), m.group(3))
        except ValueError:
            # not macOS
            pass
    return plat


__all__ = [
    # Basic resource access and distribution/entry point discovery
    'require',
    'run_script',
    'get_provider',
    'get_distribution',
    'load_entry_point',
    'get_entry_map',
    'get_entry_info',
    'iter_entry_points',
    'resource_string',
    'resource_stream',
    'resource_filename',
    'resource_listdir',
    'resource_exists',
    'resource_isdir',
    # Environmental control
    'declare_namespace',
    'working_set',
    'add_activation_listener',
    'find_distributions',
    'set_extraction_path',
    'cleanup_resources',
    'get_default_cache',
    # Primary implementation classes
    'Environment',
    'WorkingSet',
    'ResourceManager',
    'Distribution',
    'Requirement',
    'EntryPoint',
    # Exceptions
    'ResolutionError',
    'VersionConflict',
    'DistributionNotFound',
    'UnknownExtra',
    'ExtractionError',
    # Warnings
    'PEP440Warning',
    # Parsing functions and string utilities
    'parse_requirements',
    'parse_version',
    'safe_name',
    'safe_version',
    'get_platform',
    'compatible_platforms',
    'yield_lines',
    'split_sections',
    'safe_extra',
    'to_filename',
    'invalid_marker',
    'evaluate_marker',
    # filesystem utilities
    'ensure_directory',
    'normalize_path',
    # Distribution "precedence" constants
    'EGG_DIST',
    'BINARY_DIST',
    'SOURCE_DIST',
    'CHECKOUT_DIST',
    'DEVELOP_DIST',
    # "Provider" interfaces, implementations, and registration/lookup APIs
    'IMetadataProvider',
    'IResourceProvider',
    'FileMetadata',
    'PathMetadata',
    'EggMetadata',
    'EmptyProvider',
    'empty_provider',
    'NullProvider',
    'EggProvider',
    'DefaultProvider',
    'ZipProvider',
    'register_finder',
    'register_namespace_handler',
    'register_loader_type',
    'fixup_namespace_packages',
    'get_importer',
    # Warnings
    'PkgResourcesDeprecationWarning',
    # Deprecated/backward compatibility only
    'run_main',
    'AvailableDistributions',
]


class ResolutionError(Exception):
    """Abstract base for dependency resolution errors"""

    def __repr__(self):
        return self.__class__.__name__ + repr(self.args)


class VersionConflict(ResolutionError):
    """
    An already-installed version conflicts with the requested version.

    Should be initialized with the installed Distribution and the requested
    Requirement.
    """

    _template = "{self.dist} is installed but {self.req} is required"

    @property
    def dist(self):
        return self.args[0]

    @property
    def req(self):
        return self.args[1]

    def report(self):
        return self._template.format(**locals())

    def with_context(self, required_by):
        """
        If required_by is non-empty, return a version of self that is a
        ContextualVersionConflict.
        """
        if not required_by:
            return self
        args = self.args + (required_by,)
        return ContextualVersionConflict(*args)


class ContextualVersionConflict(VersionConflict):
    """
    A VersionConflict that accepts a third parameter, the set of the
    requirements that required the installed Distribution.
    """

    _template = VersionConflict._template + ' by {self.required_by}'

    @property
    def required_by(self):
        return self.args[2]


class DistributionNotFound(ResolutionError):
    """A requested distribution was not found"""

    _template = (
        "The '{self.req}' distribution was not found "
        "and is required by {self.requirers_str}"
    )

    @property
    def req(self):
        return self.args[0]

    @property
    def requirers(self):
        return self.args[1]

    @property
    def requirers_str(self):
        if not self.requirers:
            return 'the application'
        return ', '.join(self.requirers)

    def report(self):
        return self._template.format(**locals())

    def __str__(self):
        return self.report()


class UnknownExtra(ResolutionError):
    """Distribution doesn't have an "extra feature" of the given name"""


_provider_factories = {}

PY_MAJOR = '{}.{}'.format(*sys.version_info)
EGG_DIST = 3
BINARY_DIST = 2
SOURCE_DIST = 1
CHECKOUT_DIST = 0
DEVELOP_DIST = -1


def register_loader_type(loader_type, provider_factory):
    """Register `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    """
    _provider_factories[loader_type] = provider_factory


def get_provider(moduleOrReq):
    """Return an IResourceProvider for the named module or requirement"""
    if isinstance(moduleOrReq, Requirement):
        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
    try:
        module = sys.modules[moduleOrReq]
    except KeyError:
        __import__(moduleOrReq)
        module = sys.modules[moduleOrReq]
    loader = getattr(module, '__loader__', None)
    return _find_adapter(_provider_factories, loader)(module)


def _macos_vers(_cache=[]):
    if not _cache:
        version = platform.mac_ver()[0]
        # fallback for MacPorts
        if version == '':
            plist = '/System/Library/CoreServices/SystemVersion.plist'
            if os.path.exists(plist):
                if hasattr(plistlib, 'readPlist'):
                    plist_content = plistlib.readPlist(plist)
                    if 'ProductVersion' in plist_content:
                        version = plist_content['ProductVersion']

        _cache.append(version.split('.'))
    return _cache[0]


def _macos_arch(machine):
    return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine)


def get_build_platform():
    """Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and macOS.
    """
    from sysconfig import get_platform

    plat = get_platform()
    if sys.platform == "darwin" and not plat.startswith('macosx-'):
        try:
            version = _macos_vers()
            machine = os.uname()[4].replace(" ", "_")
            return "macosx-%d.%d-%s" % (
                int(version[0]),
                int(version[1]),
                _macos_arch(machine),
            )
        except ValueError:
            # if someone is running a non-Mac darwin system, this will fall
            # through to the default implementation
            pass
    return plat


macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
# XXX backward compat
get_platform = get_build_platform


def compatible_platforms(provided, required):
    """Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    """
    if provided is None or required is None or provided == required:
        # easy case
        return True

    # macOS special cases
    reqMac = macosVersionString.match(required)
    if reqMac:
        provMac = macosVersionString.match(provided)

        # is this a Mac package?
        if not provMac:
            # this is backwards compatibility for packages built before
            # setuptools 0.6. All packages built after this point will
            # use the new macOS designation.
            provDarwin = darwinVersionString.match(provided)
            if provDarwin:
                dversion = int(provDarwin.group(1))
                macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2))
                if (
                    dversion == 7
                    and macosversion >= "10.3"
                    or dversion == 8
                    and macosversion >= "10.4"
                ):
                    return True
            # egg isn't macOS or legacy darwin
            return False

        # are they the same major version and machine type?
        if provMac.group(1) != reqMac.group(1) or provMac.group(3) != reqMac.group(3):
            return False

        # is the required OS major update >= the provided one?
        if int(provMac.group(2)) > int(reqMac.group(2)):
            return False

        return True

    # XXX Linux and other platforms' special cases should go here
    return False


def run_script(dist_spec, script_name):
    """Locate distribution `dist_spec` and run its `script_name` script"""
    ns = sys._getframe(1).f_globals
    name = ns['__name__']
    ns.clear()
    ns['__name__'] = name
    require(dist_spec)[0].run_script(script_name, ns)


# backward compatibility
run_main = run_script


def get_distribution(dist):
    """Return a current distribution object for a Requirement or string"""
    if isinstance(dist, str):
        dist = Requirement.parse(dist)
    if isinstance(dist, Requirement):
        dist = get_provider(dist)
    if not isinstance(dist, Distribution):
        raise TypeError("Expected string, Requirement, or Distribution", dist)
    return dist


def load_entry_point(dist, group, name):
    """Return `name` entry point of `group` for `dist` or raise ImportError"""
    return get_distribution(dist).load_entry_point(group, name)


def get_entry_map(dist, group=None):
    """Return the entry point map for `group`, or the full entry map"""
    return get_distribution(dist).get_entry_map(group)


def get_entry_info(dist, group, name):
    """Return the EntryPoint object for `group`+`name`, or ``None``"""
    return get_distribution(dist).get_entry_info(group, name)


class IMetadataProvider:
    def has_metadata(name):
        """Does the package's distribution contain the named metadata?"""

    def get_metadata(name):
        """The named metadata resource as a string"""

    def get_metadata_lines(name):
        """Yield named metadata resource as list of non-blank non-comment lines

        Leading and trailing whitespace is stripped from each line, and lines
        with ``#`` as the first non-blank character are omitted."""

    def metadata_isdir(name):
        """Is the named metadata a directory?  (like ``os.path.isdir()``)"""

    def metadata_listdir(name):
        """List of metadata names in the directory (like ``os.listdir()``)"""

    def run_script(script_name, namespace):
        """Execute the named script in the supplied namespace dictionary"""


class IResourceProvider(IMetadataProvider):
    """An object that provides access to package resources"""

    def get_resource_filename(manager, resource_name):
        """Return a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_stream(manager, resource_name):
        """Return a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_string(manager, resource_name):
        """Return a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``"""

    def has_resource(resource_name):
        """Does the package contain the named resource?"""

    def resource_isdir(resource_name):
        """Is the named resource a directory?  (like ``os.path.isdir()``)"""

    def resource_listdir(resource_name):
        """List of resource names in the directory (like ``os.listdir()``)"""


class WorkingSet:
    """A collection of active distributions on sys.path (or a similar list)"""

    def __init__(self, entries=None):
        """Create working set from list of path entries (default=sys.path)"""
        self.entries = []
        self.entry_keys = {}
        self.by_key = {}
        self.normalized_to_canonical_keys = {}
        self.callbacks = []

        if entries is None:
            entries = sys.path

        for entry in entries:
            self.add_entry(entry)

    @classmethod
    def _build_master(cls):
        """
        Prepare the master working set.
        """
        ws = cls()
        try:
            from __main__ import __requires__
        except ImportError:
            # The main program does not list any requirements
            return ws

        # ensure the requirements are met
        try:
            ws.require(__requires__)
        except VersionConflict:
            return cls._build_from_requirements(__requires__)

        return ws

    @classmethod
    def _build_from_requirements(cls, req_spec):
        """
        Build a working set from a requirement spec. Rewrites sys.path.
        """
        # try it without defaults already on sys.path
        # by starting with an empty path
        ws = cls([])
        reqs = parse_requirements(req_spec)
        dists = ws.resolve(reqs, Environment())
        for dist in dists:
            ws.add(dist)

        # add any missing entries from sys.path
        for entry in sys.path:
            if entry not in ws.entries:
                ws.add_entry(entry)

        # then copy back to sys.path
        sys.path[:] = ws.entries
        return ws

    def add_entry(self, entry):
        """Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        """
        self.entry_keys.setdefault(entry, [])
        self.entries.append(entry)
        for dist in find_distributions(entry, True):
            self.add(dist, entry, False)

    def __contains__(self, dist):
        """True if `dist` is the active distribution for its project"""
        return self.by_key.get(dist.key) == dist

    def find(self, req):
        """Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        """
        dist = self.by_key.get(req.key)

        if dist is None:
            canonical_key = self.normalized_to_canonical_keys.get(req.key)

            if canonical_key is not None:
                req.key = canonical_key
                dist = self.by_key.get(canonical_key)

        if dist is not None and dist not in req:
            # XXX add more info
            raise VersionConflict(dist, req)
        return dist

    def iter_entry_points(self, group, name=None):
        """Yield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        """
        return (
            entry
            for dist in self
            for entry in dist.get_entry_map(group).values()
            if name is None or name == entry.name
        )

    def run_script(self, requires, script_name):
        """Locate distribution for `requires` and run `script_name` script"""
        ns = sys._getframe(1).f_globals
        name = ns['__name__']
        ns.clear()
        ns['__name__'] = name
        self.require(requires)[0].run_script(script_name, ns)

    def __iter__(self):
        """Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        """
        seen = {}
        for item in self.entries:
            if item not in self.entry_keys:
                # workaround a cache issue
                continue

            for key in self.entry_keys[item]:
                if key not in seen:
                    seen[key] = 1
                    yield self.by_key[key]

    def add(self, dist, entry=None, insert=True, replace=False):
        """Add `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        """
        if insert:
            dist.insert_on(self.entries, entry, replace=replace)

        if entry is None:
            entry = dist.location
        keys = self.entry_keys.setdefault(entry, [])
        keys2 = self.entry_keys.setdefault(dist.location, [])
        if not replace and dist.key in self.by_key:
            # ignore hidden distros
            return

        self.by_key[dist.key] = dist
        normalized_name = packaging.utils.canonicalize_name(dist.key)
        self.normalized_to_canonical_keys[normalized_name] = dist.key
        if dist.key not in keys:
            keys.append(dist.key)
        if dist.key not in keys2:
            keys2.append(dist.key)
        self._added_new(dist)

    def resolve(
        self,
        requirements,
        env=None,
        installer=None,
        replace_conflicting=False,
        extras=None,
    ):
        """List all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.

        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.

        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """

        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []

        req_extras = _ReqExtras()

        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)

        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue

            if not req_extras.markers_pass(req, extras):
                continue

            dist = self._resolve_dist(
                req, best, replace_conflicting, env, installer, required_by, to_activate
            )

            # push the new requirements onto the stack
            new_requirements = dist.requires(req.extras)[::-1]
            requirements.extend(new_requirements)

            # Register the new requirements needed by req
            for new_requirement in new_requirements:
                required_by[new_requirement].add(req.project_name)
                req_extras[new_requirement] = req.extras

            processed[req] = True

        # return list of distros to activate
        return to_activate

    def _resolve_dist(
        self, req, best, replace_conflicting, env, installer, required_by, to_activate
    ):
        dist = best.get(req.key)
        if dist is None:
            # Find the best distribution and add it to the map
            dist = self.by_key.get(req.key)
            if dist is None or (dist not in req and replace_conflicting):
                ws = self
                if env is None:
                    if dist is None:
                        env = Environment(self.entries)
                    else:
                        # Use an empty environment and workingset to avoid
                        # any further conflicts with the conflicting
                        # distribution
                        env = Environment([])
                        ws = WorkingSet([])
                dist = best[req.key] = env.best_match(
                    req, ws, installer, replace_conflicting=replace_conflicting
                )
                if dist is None:
                    requirers = required_by.get(req, None)
                    raise DistributionNotFound(req, requirers)
            to_activate.append(dist)
        if dist not in req:
            # Oops, the "best" so far conflicts with a dependency
            dependent_req = required_by[req]
            raise VersionConflict(dist, req).with_context(dependent_req)
        return dist

    def find_plugins(self, plugin_env, full_env=None, installer=None, fallback=True):
        """Find all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            # add plugins+libs to sys.path
            map(working_set.add, distributions)
            # display errors
            print('Could not load', errors)

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        """

        plugin_projects = list(plugin_env)
        # scan project names in alphabetic order
        plugin_projects.sort()

        error_info = {}
        distributions = {}

        if full_env is None:
            env = Environment(self.entries)
            env += plugin_env
        else:
            env = full_env + plugin_env

        shadow_set = self.__class__([])
        # put all our entries in shadow_set
        list(map(shadow_set.add, self))

        for project_name in plugin_projects:
            for dist in plugin_env[project_name]:
                req = [dist.as_requirement()]

                try:
                    resolvees = shadow_set.resolve(req, env, installer)

                except ResolutionError as v:
                    # save error info
                    error_info[dist] = v
                    if fallback:
                        # try the next older version of project
                        continue
                    else:
                        # give up on this project, keep going
                        break

                else:
                    list(map(shadow_set.add, resolvees))
                    distributions.update(dict.fromkeys(resolvees))

                    # success, no need to try any more versions of this project
                    break

        distributions = list(distributions)
        distributions.sort()

        return distributions, error_info

    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
        needed = self.resolve(parse_requirements(requirements))

        for dist in needed:
            self.add(dist)

        return needed

    def subscribe(self, callback, existing=True):
        """Invoke `callback` for all distributions

        If `existing=True` (default),
        call on all existing ones, as well.
        """
        if callback in self.callbacks:
            return
        self.callbacks.append(callback)
        if not existing:
            return
        for dist in self:
            callback(dist)

    def _added_new(self, dist):
        for callback in self.callbacks:
            callback(dist)

    def __getstate__(self):
        return (
            self.entries[:],
            self.entry_keys.copy(),
            self.by_key.copy(),
            self.normalized_to_canonical_keys.copy(),
            self.callbacks[:],
        )

    def __setstate__(self, e_k_b_n_c):
        entries, keys, by_key, normalized_to_canonical_keys, callbacks = e_k_b_n_c
        self.entries = entries[:]
        self.entry_keys = keys.copy()
        self.by_key = by_key.copy()
        self.normalized_to_canonical_keys = normalized_to_canonical_keys.copy()
        self.callbacks = callbacks[:]


class _ReqExtras(dict):
    """
    Map each requirement to the extras that demanded it.
    """

    def markers_pass(self, req, extras=None):
        """
        Evaluate markers for req against each extra that
        demanded it.

        Return False if the req has a marker and fails
        evaluation. Otherwise, return True.
        """
        extra_evals = (
            req.marker.evaluate({'extra': extra})
            for extra in self.get(req, ()) + (extras or (None,))
        )
        return not req.marker or any(extra_evals)


class Environment:
    """Searchable snapshot of distributions on a search path"""

    def __init__(
        self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR
    ):
        """Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.6'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        """
        self._distmap = {}
        self.platform = platform
        self.python = python
        self.scan(search_path)

    def can_add(self, dist):
        """Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        """
        py_compat = (
            self.python is None
            or dist.py_version is None
            or dist.py_version == self.python
        )
        return py_compat and compatible_platforms(dist.platform, self.platform)

    def remove(self, dist):
        """Remove `dist` from the environment"""
        self._distmap[dist.key].remove(dist)

    def scan(self, search_path=None):
        """Scan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        """
        if search_path is None:
            search_path = sys.path

        for item in search_path:
            for dist in find_distributions(item):
                self.add(dist)

    def __getitem__(self, project_name):
        """Return a newest-to-oldest list of distributions for `project_name`

        Uses case-insensitive `project_name` comparison, assuming all the
        project's distributions use their project's name converted to all
        lowercase as their key.

        """
        distribution_key = project_name.lower()
        return self._distmap.get(distribution_key, [])

    def add(self, dist):
        """Add `dist` if we ``can_add()`` it and it has not already been added"""
        if self.can_add(dist) and dist.has_version():
            dists = self._distmap.setdefault(dist.key, [])
            if dist not in dists:
                dists.append(dist)
                dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)

    def best_match(self, req, working_set, installer=None, replace_conflicting=False):
        """Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        """
        try:
            dist = working_set.find(req)
        except VersionConflict:
            if not replace_conflicting:
                raise
            dist = None
        if dist is not None:
            return dist
        for dist in self[req.key]:
            if dist in req:
                return dist
        # try to download/install
        return self.obtain(req, installer)

    def obtain(self, requirement, installer=None):
        """Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument."""
        if installer is not None:
            return installer(requirement)

    def __iter__(self):
        """Yield the unique project names of the available distributions"""
        for key in self._distmap.keys():
            if self[key]:
                yield key

    def __iadd__(self, other):
        """In-place addition of a distribution or environment"""
        if isinstance(other, Distribution):
            self.add(other)
        elif isinstance(other, Environment):
            for project in other:
                for dist in other[project]:
                    self.add(dist)
        else:
            raise TypeError("Can't add %r to environment" % (other,))
        return self

    def __add__(self, other):
        """Add an environment or distribution to an environment"""
        new = self.__class__([], platform=None, python=None)
        for env in self, other:
            new += env
        return new


# XXX backward compatibility
AvailableDistributions = Environment


class ExtractionError(RuntimeError):
    """An error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    """


class ResourceManager:
    """Manage resource extraction and packages"""

    extraction_path = None

    def __init__(self):
        self.cached_files = {}

    def resource_exists(self, package_or_requirement, resource_name):
        """Does the named resource exist?"""
        return get_provider(package_or_requirement).has_resource(resource_name)

    def resource_isdir(self, package_or_requirement, resource_name):
        """Is the named resource an existing directory?"""
        return get_provider(package_or_requirement).resource_isdir(resource_name)

    def resource_filename(self, package_or_requirement, resource_name):
        """Return a true filesystem path for specified resource"""
        return get_provider(package_or_requirement).get_resource_filename(
            self, resource_name
        )

    def resource_stream(self, package_or_requirement, resource_name):
        """Return a readable file-like object for specified resource"""
        return get_provider(package_or_requirement).get_resource_stream(
            self, resource_name
        )

    def resource_string(self, package_or_requirement, resource_name):
        """Return specified resource as a string"""
        return get_provider(package_or_requirement).get_resource_string(
            self, resource_name
        )

    def resource_listdir(self, package_or_requirement, resource_name):
        """List the contents of the named resource directory"""
        return get_provider(package_or_requirement).resource_listdir(resource_name)

    def extraction_error(self):
        """Give an error message for problems extracting file(s)"""

        old_exc = sys.exc_info()[1]
        cache_path = self.extraction_path or get_default_cache()

        tmpl = textwrap.dedent(
            """
            Can't extract file(s) to egg cache

            The following error occurred while trying to extract file(s)
            to the Python egg cache:

              {old_exc}

            The Python egg cache directory is currently set to:

              {cache_path}

            Perhaps your account does not have write access to this directory?
            You can change the cache directory by setting the PYTHON_EGG_CACHE
            environment variable to point to an accessible directory.
            """
        ).lstrip()
        err = ExtractionError(tmpl.format(**locals()))
        err.manager = self
        err.cache_path = cache_path
        err.original_error = old_exc
        raise err

    def get_cache_path(self, archive_name, names=()):
        """Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        """
        extract_path = self.extraction_path or get_default_cache()
        target_path = os.path.join(extract_path, archive_name + '-tmp', *names)
        try:
            _bypass_ensure_directory(target_path)
        except Exception:
            self.extraction_error()

        self._warn_unsafe_extraction_path(extract_path)

        self.cached_files[target_path] = 1
        return target_path

    @staticmethod
    def _warn_unsafe_extraction_path(path):
        """
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        """
        if os.name == 'nt' and not path.startswith(os.environ['windir']):
            # On Windows, permissions are generally restrictive by default
            #  and temp directories are not writable by other users, so
            #  bypass the warning.
            return
        mode = os.stat(path).st_mode
        if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
            msg = (
                "Extraction path is writable by group/others "
                "and vulnerable to attack when "
                "used with get_resource_filename ({path}). "
                "Consider a more secure "
                "location (set with .set_extraction_path or the "
                "PYTHON_EGG_CACHE environment variable)."
            ).format(**locals())
            warnings.warn(msg, UserWarning)

    def postprocess(self, tempname, filename):
        """Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        """

        if os.name == 'posix':
            # Make the resource executable
            mode = ((os.stat(tempname).st_mode) | 0o555) & 0o7777
            os.chmod(tempname, mode)

    def set_extraction_path(self, path):
        """Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        """
        if self.cached_files:
            raise ValueError("Can't change extraction path, files already extracted")

        self.extraction_path = path

    def cleanup_resources(self, force=False):
        """
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        """
        # XXX


def get_default_cache():
    """
    Return the ``PYTHON_EGG_CACHE`` environment variable
    or a platform-relevant user cache dir for an app
    named "Python-Eggs".
    """
    return os.environ.get('PYTHON_EGG_CACHE') or platformdirs.user_cache_dir(
        appname='Python-Eggs'
    )


def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """
    Convert an arbitrary string to a standard version string
    """
    try:
        # normalize the version
        return str(packaging.version.Version(version))
    except packaging.version.InvalidVersion:
        version = version.replace(' ', '.')
        return re.sub('[^A-Za-z0-9.]+', '-', version)


def _forgiving_version(version):
    """Fallback when ``safe_version`` is not safe enough
    >>> parse_version(_forgiving_version('0.23ubuntu1'))
    <Version('0.23.dev0+sanitized.ubuntu1')>
    >>> parse_version(_forgiving_version('0.23-'))
    <Version('0.23.dev0+sanitized')>
    >>> parse_version(_forgiving_version('0.-_'))
    <Version('0.dev0+sanitized')>
    >>> parse_version(_forgiving_version('42.+?1'))
    <Version('42.dev0+sanitized.1')>
    >>> parse_version(_forgiving_version('hello world'))
    <Version('0.dev0+sanitized.hello.world')>
    """
    version = version.replace(' ', '.')
    match = _PEP440_FALLBACK.search(version)
    if match:
        safe = match["safe"]
        rest = version[len(safe) :]
    else:
        safe = "0"
        rest = version
    local = f"sanitized.{_safe_segment(rest)}".strip(".")
    return f"{safe}.dev0+{local}"


def _safe_segment(segment):
    """Convert an arbitrary string into a safe segment"""
    segment = re.sub('[^A-Za-z0-9.]+', '-', segment)
    segment = re.sub('-[^A-Za-z0-9]+', '-', segment)
    return re.sub(r'\.[^A-Za-z0-9]+', '.', segment).strip(".-")


def safe_extra(extra):
    """Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    """
    return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower()


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-', '_')


def invalid_marker(text):
    """
    Validate text as a PEP 508 environment marker; return an exception
    if invalid or False otherwise.
    """
    try:
        evaluate_marker(text)
    except SyntaxError as e:
        e.filename = None
        e.lineno = None
        return e
    return False


def evaluate_marker(text, extra=None):
    """
    Evaluate a PEP 508 environment marker.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.

    This implementation uses the 'pyparsing' module.
    """
    try:
        marker = packaging.markers.Marker(text)
        return marker.evaluate()
    except packaging.markers.InvalidMarker as e:
        raise SyntaxError(e) from e


class NullProvider:
    """Try to implement resources and metadata for arbitrary PEP 302 loaders"""

    egg_name = None
    egg_info = None
    loader = None

    def __init__(self, module):
        self.loader = getattr(module, '__loader__', None)
        self.module_path = os.path.dirname(getattr(module, '__file__', ''))

    def get_resource_filename(self, manager, resource_name):
        return self._fn(self.module_path, resource_name)

    def get_resource_stream(self, manager, resource_name):
        return io.BytesIO(self.get_resource_string(manager, resource_name))

    def get_resource_string(self, manager, resource_name):
        return self._get(self._fn(self.module_path, resource_name))

    def has_resource(self, resource_name):
        return self._has(self._fn(self.module_path, resource_name))

    def _get_metadata_path(self, name):
        return self._fn(self.egg_info, name)

    def has_metadata(self, name):
        if not self.egg_info:
            return self.egg_info

        path = self._get_metadata_path(name)
        return self._has(path)

    def get_metadata(self, name):
        if not self.egg_info:
            return ""
        path = self._get_metadata_path(name)
        value = self._get(path)
        try:
            return value.decode('utf-8')
        except UnicodeDecodeError as exc:
            # Include the path in the error message to simplify
            # troubleshooting, and without changing the exception type.
            exc.reason += ' in {} file at path: {}'.format(name, path)
            raise

    def get_metadata_lines(self, name):
        return yield_lines(self.get_metadata(name))

    def resource_isdir(self, resource_name):
        return self._isdir(self._fn(self.module_path, resource_name))

    def metadata_isdir(self, name):
        return self.egg_info and self._isdir(self._fn(self.egg_info, name))

    def resource_listdir(self, resource_name):
        return self._listdir(self._fn(self.module_path, resource_name))

    def metadata_listdir(self, name):
        if self.egg_info:
            return self._listdir(self._fn(self.egg_info, name))
        return []

    def run_script(self, script_name, namespace):
        script = 'scripts/' + script_name
        if not self.has_metadata(script):
            raise ResolutionError(
                "Script {script!r} not found in metadata at {self.egg_info!r}".format(
                    **locals()
                ),
            )
        script_text = self.get_metadata(script).replace('\r\n', '\n')
        script_text = script_text.replace('\r', '\n')
        script_filename = self._fn(self.egg_info, script)
        namespace['__file__'] = script_filename
        if os.path.exists(script_filename):
            with open(script_filename) as fid:
                source = fid.read()
            code = compile(source, script_filename, 'exec')
            exec(code, namespace, namespace)
        else:
            from linecache import cache

            cache[script_filename] = (
                len(script_text),
                0,
                script_text.split('\n'),
                script_filename,
            )
            script_code = compile(script_text, script_filename, 'exec')
            exec(script_code, namespace, namespace)

    def _has(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _isdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _listdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _fn(self, base, resource_name):
        self._validate_resource_path(resource_name)
        if resource_name:
            return os.path.join(base, *resource_name.split('/'))
        return base

    @staticmethod
    def _validate_resource_path(path):
        """
        Validate the resource paths according to the docs.
        https://setuptools.pypa.io/en/latest/pkg_resources.html#basic-resource-access

        >>> warned = getfixture('recwarn')
        >>> warnings.simplefilter('always')
        >>> vrp = NullProvider._validate_resource_path
        >>> vrp('foo/bar.txt')
        >>> bool(warned)
        False
        >>> vrp('../foo/bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('/foo/bar.txt')
        >>> bool(warned)
        True
        >>> vrp('foo/../../bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('foo/f../bar.txt')
        >>> bool(warned)
        False

        Windows path separators are straight-up disallowed.
        >>> vrp(r'\\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path \
is not allowed.

        >>> vrp(r'C:\\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path \
is not allowed.

        Blank values are allowed

        >>> vrp('')
        >>> bool(warned)
        False

        Non-string values are not.

        >>> vrp(None)
        Traceback (most recent call last):
        ...
        AttributeError: ...
        """
        invalid = (
            os.path.pardir in path.split(posixpath.sep)
            or posixpath.isabs(path)
            or ntpath.isabs(path)
        )
        if not invalid:
            return

        msg = "Use of .. or absolute path in a resource path is not allowed."

        # Aggressively disallow Windows absolute paths
        if ntpath.isabs(path) and not posixpath.isabs(path):
            raise ValueError(msg)

        # for compatibility, warn; in future
        # raise ValueError(msg)
        issue_warning(
            msg[:-1] + " and will raise exceptions in a future release.",
            DeprecationWarning,
        )

    def _get(self, path):
        if hasattr(self.loader, 'get_data'):
            return self.loader.get_data(path)
        raise NotImplementedError(
            "Can't perform this operation for loaders without 'get_data()'"
        )


register_loader_type(object, NullProvider)


def _parents(path):
    """
    yield all parents of path including path
    """
    last = None
    while path != last:
        yield path
        last = path
        path, _ = os.path.split(path)


class EggProvider(NullProvider):
    """Provider based on a virtual filesystem"""

    def __init__(self, module):
        super().__init__(module)
        self._setup_prefix()

    def _setup_prefix(self):
        # Assume that metadata may be nested inside a "basket"
        # of multiple eggs and use module_path instead of .archive.
        eggs = filter(_is_egg_path, _parents(self.module_path))
        egg = next(eggs, None)
        egg and self._set_egg(egg)

    def _set_egg(self, path):
        self.egg_name = os.path.basename(path)
        self.egg_info = os.path.join(path, 'EGG-INFO')
        self.egg_root = path


class DefaultProvider(EggProvider):
    """Provides access to package resources in the filesystem"""

    def _has(self, path):
        return os.path.exists(path)

    def _isdir(self, path):
        return os.path.isdir(path)

    def _listdir(self, path):
        return os.listdir(path)

    def get_resource_stream(self, manager, resource_name):
        return open(self._fn(self.module_path, resource_name), 'rb')

    def _get(self, path):
        with open(path, 'rb') as stream:
            return stream.read()

    @classmethod
    def _register(cls):
        loader_names = (
            'SourceFileLoader',
            'SourcelessFileLoader',
        )
        for name in loader_names:
            loader_cls = getattr(importlib_machinery, name, type(None))
            register_loader_type(loader_cls, cls)


DefaultProvider._register()


class EmptyProvider(NullProvider):
    """Provider that returns nothing for all requests"""

    module_path = None

    _isdir = _has = lambda self, path: False

    def _get(self, path):
        return ''

    def _listdir(self, path):
        return []

    def __init__(self):
        pass


empty_provider = EmptyProvider()


class ZipManifests(dict):
    """
    zip manifest builder
    """

    @classmethod
    def build(cls, path):
        """
        Build a dictionary similar to the zipimport directory
        caches, except instead of tuples, store ZipInfo objects.

        Use a platform-specific path separator (os.sep) for the path keys
        for compatibility with pypy on Windows.
        """
        with zipfile.ZipFile(path) as zfile:
            items = (
                (
                    name.replace('/', os.sep),
                    zfile.getinfo(name),
                )
                for name in zfile.namelist()
            )
            return dict(items)

    load = build


class MemoizedZipManifests(ZipManifests):
    """
    Memoized zipfile manifests.
    """

    manifest_mod = collections.namedtuple('manifest_mod', 'manifest mtime')

    def load(self, path):
        """
        Load a manifest at path or return a suitable manifest already loaded.
        """
        path = os.path.normpath(path)
        mtime = os.stat(path).st_mtime

        if path not in self or self[path].mtime != mtime:
            manifest = self.build(path)
            self[path] = self.manifest_mod(manifest, mtime)

        return self[path].manifest


class ZipProvider(EggProvider):
    """Resource support for zips and eggs"""

    eagers = None
    _zip_manifests = MemoizedZipManifests()

    def __init__(self, module):
        super().__init__(module)
        self.zip_pre = self.loader.archive + os.sep

    def _zipinfo_name(self, fspath):
        # Convert a virtual filename (full path to file) into a zipfile subpath
        # usable with the zipimport directory cache for our target archive
        fspath = fspath.rstrip(os.sep)
        if fspath == self.loader.archive:
            return ''
        if fspath.startswith(self.zip_pre):
            return fspath[len(self.zip_pre) :]
        raise AssertionError("%s is not a subpath of %s" % (fspath, self.zip_pre))

    def _parts(self, zip_path):
        # Convert a zipfile subpath into an egg-relative path part list.
        # pseudo-fs path
        fspath = self.zip_pre + zip_path
        if fspath.startswith(self.egg_root + os.sep):
            return fspath[len(self.egg_root) + 1 :].split(os.sep)
        raise AssertionError("%s is not a subpath of %s" % (fspath, self.egg_root))

    @property
    def zipinfo(self):
        return self._zip_manifests.load(self.loader.archive)

    def get_resource_filename(self, manager, resource_name):
        if not self.egg_name:
            raise NotImplementedError(
                "resource_filename() only supported for .egg, not .zip"
            )
        # no need to lock for extraction, since we use temp names
        zip_path = self._resource_to_zip(resource_name)
        eagers = self._get_eager_resources()
        if '/'.join(self._parts(zip_path)) in eagers:
            for name in eagers:
                self._extract_resource(manager, self._eager_to_zip(name))
        return self._extract_resource(manager, zip_path)

    @staticmethod
    def _get_date_and_size(zip_stat):
        size = zip_stat.file_size
        # ymdhms+wday, yday, dst
        date_time = zip_stat.date_time + (0, 0, -1)
        # 1980 offset already done
        timestamp = time.mktime(date_time)
        return timestamp, size

    # FIXME: 'ZipProvider._extract_resource' is too complex (12)
    def _extract_resource(self, manager, zip_path):  # noqa: C901
        if zip_path in self._index():
            for name in self._index()[zip_path]:
                last = self._extract_resource(manager, os.path.join(zip_path, name))
            # return the extracted directory name
            return os.path.dirname(last)

        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])

        if not WRITE_SUPPORT:
            raise OSError(
                '"os.rename" and "os.unlink" are not supported ' 'on this platform'
            )
        try:
            real_path = manager.get_cache_path(self.egg_name, self._parts(zip_path))

            if self._is_current(real_path, zip_path):
                return real_path

            outf, tmpnam = _mkstemp(
                ".$extract",
                dir=os.path.dirname(real_path),
            )
            os.write(outf, self.loader.get_data(zip_path))
            os.close(outf)
            utime(tmpnam, (timestamp, timestamp))
            manager.postprocess(tmpnam, real_path)

            try:
                rename(tmpnam, real_path)

            except os.error:
                if os.path.isfile(real_path):
                    if self._is_current(real_path, zip_path):
                        # the file became current since it was checked above,
                        #  so proceed.
                        return real_path
                    # Windows, del old file and retry
                    elif os.name == 'nt':
                        unlink(real_path)
                        rename(tmpnam, real_path)
                        return real_path
                raise

        except os.error:
            # report a user-friendly error
            manager.extraction_error()

        return real_path

    def _is_current(self, file_path, zip_path):
        """
        Return True if the file_path is current for this zip_path
        """
        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
        if not os.path.isfile(file_path):
            return False
        stat = os.stat(file_path)
        if stat.st_size != size or stat.st_mtime != timestamp:
            return False
        # check that the contents match
        zip_contents = self.loader.get_data(zip_path)
        with open(file_path, 'rb') as f:
            file_contents = f.read()
        return zip_contents == file_contents

    def _get_eager_resources(self):
        if self.eagers is None:
            eagers = []
            for name in ('native_libs.txt', 'eager_resources.txt'):
                if self.has_metadata(name):
                    eagers.extend(self.get_metadata_lines(name))
            self.eagers = eagers
        return self.eagers

    def _index(self):
        try:
            return self._dirindex
        except AttributeError:
            ind = {}
            for path in self.zipinfo:
                parts = path.split(os.sep)
                while parts:
                    parent = os.sep.join(parts[:-1])
                    if parent in ind:
                        ind[parent].append(parts[-1])
                        break
                    else:
                        ind[parent] = [parts.pop()]
            self._dirindex = ind
            return ind

    def _has(self, fspath):
        zip_path = self._zipinfo_name(fspath)
        return zip_path in self.zipinfo or zip_path in self._index()

    def _isdir(self, fspath):
        return self._zipinfo_name(fspath) in self._index()

    def _listdir(self, fspath):
        return list(self._index().get(self._zipinfo_name(fspath), ()))

    def _eager_to_zip(self, resource_name):
        return self._zipinfo_name(self._fn(self.egg_root, resource_name))

    def _resource_to_zip(self, resource_name):
        return self._zipinfo_name(self._fn(self.module_path, resource_name))


register_loader_type(zipimport.zipimporter, ZipProvider)


class FileMetadata(EmptyProvider):
    """Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    """

    def __init__(self, path):
        self.path = path

    def _get_metadata_path(self, name):
        return self.path

    def has_metadata(self, name):
        return name == 'PKG-INFO' and os.path.isfile(self.path)

    def get_metadata(self, name):
        if name != 'PKG-INFO':
            raise KeyError("No metadata except PKG-INFO is available")

        with open(self.path, encoding='utf-8', errors="replace") as f:
            metadata = f.read()
        self._warn_on_replacement(metadata)
        return metadata

    def _warn_on_replacement(self, metadata):
        replacement_char = '�'
        if replacement_char in metadata:
            tmpl = "{self.path} could not be properly decoded in UTF-8"
            msg = tmpl.format(**locals())
            warnings.warn(msg)

    def get_metadata_lines(self, name):
        return yield_lines(self.get_metadata(name))


class PathMetadata(DefaultProvider):
    """Metadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir, project_name=dist_name, metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    """

    def __init__(self, path, egg_info):
        self.module_path = path
        self.egg_info = egg_info


class EggMetadata(ZipProvider):
    """Metadata provider for .egg files"""

    def __init__(self, importer):
        """Create a metadata provider from a zipimporter"""

        self.zip_pre = importer.archive + os.sep
        self.loader = importer
        if importer.prefix:
            self.module_path = os.path.join(importer.archive, importer.prefix)
        else:
            self.module_path = importer.archive
        self._setup_prefix()


_declare_state('dict', _distribution_finders={})


def register_finder(importer_type, distribution_finder):
    """Register `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example."""
    _distribution_finders[importer_type] = distribution_finder


def find_distributions(path_item, only=False):
    """Yield distributions accessible via `path_item`"""
    importer = get_importer(path_item)
    finder = _find_adapter(_distribution_finders, importer)
    return finder(importer, path_item, only)


def find_eggs_in_zip(importer, path_item, only=False):
    """
    Find eggs in zip files; possibly multiple nested eggs.
    """
    if importer.archive.endswith('.whl'):
        # wheels are not supported with this finder
        # they don't have PKG-INFO metadata, and won't ever contain eggs
        return
    metadata = EggMetadata(importer)
    if metadata.has_metadata('PKG-INFO'):
        yield Distribution.from_filename(path_item, metadata=metadata)
    if only:
        # don't yield nested distros
        return
    for subitem in metadata.resource_listdir(''):
        if _is_egg_path(subitem):
            subpath = os.path.join(path_item, subitem)
            dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath)
            yield from dists
        elif subitem.lower().endswith(('.dist-info', '.egg-info')):
            subpath = os.path.join(path_item, subitem)
            submeta = EggMetadata(zipimport.zipimporter(subpath))
            submeta.egg_info = subpath
            yield Distribution.from_location(path_item, subitem, submeta)


register_finder(zipimport.zipimporter, find_eggs_in_zip)


def find_nothing(importer, path_item, only=False):
    return ()


register_finder(object, find_nothing)


def find_on_path(importer, path_item, only=False):
    """Yield distributions accessible on a sys.path directory"""
    path_item = _normalize_cached(path_item)

    if _is_unpacked_egg(path_item):
        yield Distribution.from_filename(
            path_item,
            metadata=PathMetadata(path_item, os.path.join(path_item, 'EGG-INFO')),
        )
        return

    entries = (os.path.join(path_item, child) for child in safe_listdir(path_item))

    # scan for .egg and .egg-info in directory
    for entry in sorted(entries):
        fullpath = os.path.join(path_item, entry)
        factory = dist_factory(path_item, entry, only)
        yield from factory(fullpath)


def dist_factory(path_item, entry, only):
    """Return a dist_factory for the given entry."""
    lower = entry.lower()
    is_egg_info = lower.endswith('.egg-info')
    is_dist_info = lower.endswith('.dist-info') and os.path.isdir(
        os.path.join(path_item, entry)
    )
    is_meta = is_egg_info or is_dist_info
    return (
        distributions_from_metadata
        if is_meta
        else find_distributions
        if not only and _is_egg_path(entry)
        else resolve_egg_link
        if not only and lower.endswith('.egg-link')
        else NoDists()
    )


class NoDists:
    """
    >>> bool(NoDists())
    False

    >>> list(NoDists()('anything'))
    []
    """

    def __bool__(self):
        return False

    def __call__(self, fullpath):
        return iter(())


def safe_listdir(path):
    """
    Attempt to list contents of path, but suppress some exceptions.
    """
    try:
        return os.listdir(path)
    except (PermissionError, NotADirectoryError):
        pass
    except OSError as e:
        # Ignore the directory if does not exist, not a directory or
        # permission denied
        if e.errno not in (errno.ENOTDIR, errno.EACCES, errno.ENOENT):
            raise
    return ()


def distributions_from_metadata(path):
    root = os.path.dirname(path)
    if os.path.isdir(path):
        if len(os.listdir(path)) == 0:
            # empty metadata dir; skip
            return
        metadata = PathMetadata(root, path)
    else:
        metadata = FileMetadata(path)
    entry = os.path.basename(path)
    yield Distribution.from_location(
        root,
        entry,
        metadata,
        precedence=DEVELOP_DIST,
    )


def non_empty_lines(path):
    """
    Yield non-empty lines from file at path
    """
    with open(path) as f:
        for line in f:
            line = line.strip()
            if line:
                yield line


def resolve_egg_link(path):
    """
    Given a path to an .egg-link, resolve distributions
    present in the referenced path.
    """
    referenced_paths = non_empty_lines(path)
    resolved_paths = (
        os.path.join(os.path.dirname(path), ref) for ref in referenced_paths
    )
    dist_groups = map(find_distributions, resolved_paths)
    return next(dist_groups, ())


if hasattr(pkgutil, 'ImpImporter'):
    register_finder(pkgutil.ImpImporter, find_on_path)

register_finder(importlib_machinery.FileFinder, find_on_path)

_declare_state('dict', _namespace_handlers={})
_declare_state('dict', _namespace_packages={})


def register_namespace_handler(importer_type, namespace_handler):
    """Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer, path_entry, moduleName, module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    """
    _namespace_handlers[importer_type] = namespace_handler


def _handle_ns(packageName, path_item):
    """Ensure that named package includes a subpath of path_item (if needed)"""

    importer = get_importer(path_item)
    if importer is None:
        return None

    # use find_spec (PEP 451) and fall-back to find_module (PEP 302)
    try:
        spec = importer.find_spec(packageName)
    except AttributeError:
        # capture warnings due to #1111
        with warnings.catch_warnings():
            warnings.simplefilter("ignore")
            loader = importer.find_module(packageName)
    else:
        loader = spec.loader if spec else None

    if loader is None:
        return None
    module = sys.modules.get(packageName)
    if module is None:
        module = sys.modules[packageName] = types.ModuleType(packageName)
        module.__path__ = []
        _set_parent_ns(packageName)
    elif not hasattr(module, '__path__'):
        raise TypeError("Not a package:", packageName)
    handler = _find_adapter(_namespace_handlers, importer)
    subpath = handler(importer, path_item, packageName, module)
    if subpath is not None:
        path = module.__path__
        path.append(subpath)
        importlib.import_module(packageName)
        _rebuild_mod_path(path, packageName, module)
    return subpath


def _rebuild_mod_path(orig_path, package_name, module):
    """
    Rebuild module.__path__ ensuring that all entries are ordered
    corresponding to their sys.path order
    """
    sys_path = [_normalize_cached(p) for p in sys.path]

    def safe_sys_path_index(entry):
        """
        Workaround for #520 and #513.
        """
        try:
            return sys_path.index(entry)
        except ValueError:
            return float('inf')

    def position_in_sys_path(path):
        """
        Return the ordinal of the path based on its position in sys.path
        """
        path_parts = path.split(os.sep)
        module_parts = package_name.count('.') + 1
        parts = path_parts[:-module_parts]
        return safe_sys_path_index(_normalize_cached(os.sep.join(parts)))

    new_path = sorted(orig_path, key=position_in_sys_path)
    new_path = [_normalize_cached(p) for p in new_path]

    if isinstance(module.__path__, list):
        module.__path__[:] = new_path
    else:
        module.__path__ = new_path


def declare_namespace(packageName):
    """Declare that package 'packageName' is a namespace package"""

    msg = (
        f"Deprecated call to `pkg_resources.declare_namespace({packageName!r})`.\n"
        "Implementing implicit namespace packages (as specified in PEP 420) "
        "is preferred to `pkg_resources.declare_namespace`. "
        "See https://setuptools.pypa.io/en/latest/references/"
        "keywords.html#keyword-namespace-packages"
    )
    warnings.warn(msg, DeprecationWarning, stacklevel=2)

    _imp.acquire_lock()
    try:
        if packageName in _namespace_packages:
            return

        path = sys.path
        parent, _, _ = packageName.rpartition('.')

        if parent:
            declare_namespace(parent)
            if parent not in _namespace_packages:
                __import__(parent)
            try:
                path = sys.modules[parent].__path__
            except AttributeError as e:
                raise TypeError("Not a package:", parent) from e

        # Track what packages are namespaces, so when new path items are added,
        # they can be updated
        _namespace_packages.setdefault(parent or None, []).append(packageName)
        _namespace_packages.setdefault(packageName, [])

        for path_item in path:
            # Ensure all the parent's path items are reflected in the child,
            # if they apply
            _handle_ns(packageName, path_item)

    finally:
        _imp.release_lock()


def fixup_namespace_packages(path_item, parent=None):
    """Ensure that previously-declared namespace packages include path_item"""
    _imp.acquire_lock()
    try:
        for package in _namespace_packages.get(parent, ()):
            subpath = _handle_ns(package, path_item)
            if subpath:
                fixup_namespace_packages(subpath, package)
    finally:
        _imp.release_lock()


def file_ns_handler(importer, path_item, packageName, module):
    """Compute an ns-package subpath for a filesystem or zipfile importer"""

    subpath = os.path.join(path_item, packageName.split('.')[-1])
    normalized = _normalize_cached(subpath)
    for item in module.__path__:
        if _normalize_cached(item) == normalized:
            break
    else:
        # Only return the path if it's not already there
        return subpath


if hasattr(pkgutil, 'ImpImporter'):
    register_namespace_handler(pkgutil.ImpImporter, file_ns_handler)

register_namespace_handler(zipimport.zipimporter, file_ns_handler)
register_namespace_handler(importlib_machinery.FileFinder, file_ns_handler)


def null_ns_handler(importer, path_item, packageName, module):
    return None


register_namespace_handler(object, null_ns_handler)


def normalize_path(filename):
    """Normalize a file/dir name for comparison purposes"""
    return os.path.normcase(os.path.realpath(os.path.normpath(_cygwin_patch(filename))))


def _cygwin_patch(filename):  # pragma: nocover
    """
    Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
    symlink components. Using
    os.path.abspath() works around this limitation. A fix in os.getcwd()
    would probably better, in Cygwin even more so, except
    that this seems to be by design...
    """
    return os.path.abspath(filename) if sys.platform == 'cygwin' else filename


def _normalize_cached(filename, _cache={}):
    try:
        return _cache[filename]
    except KeyError:
        _cache[filename] = result = normalize_path(filename)
        return result


def _is_egg_path(path):
    """
    Determine if given path appears to be an egg.
    """
    return _is_zip_egg(path) or _is_unpacked_egg(path)


def _is_zip_egg(path):
    return (
        path.lower().endswith('.egg')
        and os.path.isfile(path)
        and zipfile.is_zipfile(path)
    )


def _is_unpacked_egg(path):
    """
    Determine if given path appears to be an unpacked egg.
    """
    return path.lower().endswith('.egg') and os.path.isfile(
        os.path.join(path, 'EGG-INFO', 'PKG-INFO')
    )


def _set_parent_ns(packageName):
    parts = packageName.split('.')
    name = parts.pop()
    if parts:
        parent = '.'.join(parts)
        setattr(sys.modules[parent], name, sys.modules[packageName])


MODULE = re.compile(r"\w+(\.\w+)*$").match
EGG_NAME = re.compile(
    r"""
    (?P<name>[^-]+) (
        -(?P<ver>[^-]+) (
            -py(?P<pyver>[^-]+) (
                -(?P<plat>.+)
            )?
        )?
    )?
    """,
    re.VERBOSE | re.IGNORECASE,
).match


class EntryPoint:
    """Object representing an advertised importable object"""

    def __init__(self, name, module_name, attrs=(), extras=(), dist=None):
        if not MODULE(module_name):
            raise ValueError("Invalid module name", module_name)
        self.name = name
        self.module_name = module_name
        self.attrs = tuple(attrs)
        self.extras = tuple(extras)
        self.dist = dist

    def __str__(self):
        s = "%s = %s" % (self.name, self.module_name)
        if self.attrs:
            s += ':' + '.'.join(self.attrs)
        if self.extras:
            s += ' [%s]' % ','.join(self.extras)
        return s

    def __repr__(self):
        return "EntryPoint.parse(%r)" % str(self)

    def load(self, require=True, *args, **kwargs):
        """
        Require packages for this EntryPoint, then resolve it.
        """
        if not require or args or kwargs:
            warnings.warn(
                "Parameters to load are deprecated.  Call .resolve and "
                ".require separately.",
                PkgResourcesDeprecationWarning,
                stacklevel=2,
            )
        if require:
            self.require(*args, **kwargs)
        return self.resolve()

    def resolve(self):
        """
        Resolve the entry point from its module and attrs.
        """
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
        try:
            return functools.reduce(getattr, self.attrs, module)
        except AttributeError as exc:
            raise ImportError(str(exc)) from exc

    def require(self, env=None, installer=None):
        if self.extras and not self.dist:
            raise UnknownExtra("Can't require() without a distribution", self)

        # Get the requirements for this entry point with all its extras and
        # then resolve them. We have to pass `extras` along when resolving so
        # that the working set knows what extras we want. Otherwise, for
        # dist-info distributions, the working set will assume that the
        # requirements for that extra are purely optional and skip over them.
        reqs = self.dist.requires(self.extras)
        items = working_set.resolve(reqs, env, installer, extras=self.extras)
        list(map(working_set.add, items))

    pattern = re.compile(
        r'\s*'
        r'(?P<name>.+?)\s*'
        r'=\s*'
        r'(?P<module>[\w.]+)\s*'
        r'(:\s*(?P<attr>[\w.]+))?\s*'
        r'(?P<extras>\[.*\])?\s*$'
    )

    @classmethod
    def parse(cls, src, dist=None):
        """Parse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1, extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        """
        m = cls.pattern.match(src)
        if not m:
            msg = "EntryPoint must be in 'name=module:attrs [extras]' format"
            raise ValueError(msg, src)
        res = m.groupdict()
        extras = cls._parse_extras(res['extras'])
        attrs = res['attr'].split('.') if res['attr'] else ()
        return cls(res['name'], res['module'], attrs, extras, dist)

    @classmethod
    def _parse_extras(cls, extras_spec):
        if not extras_spec:
            return ()
        req = Requirement.parse('x' + extras_spec)
        if req.specs:
            raise ValueError()
        return req.extras

    @classmethod
    def parse_group(cls, group, lines, dist=None):
        """Parse an entry point group"""
        if not MODULE(group):
            raise ValueError("Invalid group name", group)
        this = {}
        for line in yield_lines(lines):
            ep = cls.parse(line, dist)
            if ep.name in this:
                raise ValueError("Duplicate entry point", group, ep.name)
            this[ep.name] = ep
        return this

    @classmethod
    def parse_map(cls, data, dist=None):
        """Parse a map of entry point groups"""
        if isinstance(data, dict):
            data = data.items()
        else:
            data = split_sections(data)
        maps = {}
        for group, lines in data:
            if group is None:
                if not lines:
                    continue
                raise ValueError("Entry points must be listed in groups")
            group = group.strip()
            if group in maps:
                raise ValueError("Duplicate group name", group)
            maps[group] = cls.parse_group(group, lines, dist)
        return maps


def _version_from_file(lines):
    """
    Given an iterable of lines from a Metadata file, return
    the value of the Version field, if present, or None otherwise.
    """

    def is_version_line(line):
        return line.lower().startswith('version:')

    version_lines = filter(is_version_line, lines)
    line = next(iter(version_lines), '')
    _, _, value = line.partition(':')
    return safe_version(value.strip()) or None


class Distribution:
    """Wrap an actual or potential sys.path entry w/metadata"""

    PKG_INFO = 'PKG-INFO'

    def __init__(
        self,
        location=None,
        metadata=None,
        project_name=None,
        version=None,
        py_version=PY_MAJOR,
        platform=None,
        precedence=EGG_DIST,
    ):
        self.project_name = safe_name(project_name or 'Unknown')
        if version is not None:
            self._version = safe_version(version)
        self.py_version = py_version
        self.platform = platform
        self.location = location
        self.precedence = precedence
        self._provider = metadata or empty_provider

    @classmethod
    def from_location(cls, location, basename, metadata=None, **kw):
        project_name, version, py_version, platform = [None] * 4
        basename, ext = os.path.splitext(basename)
        if ext.lower() in _distributionImpl:
            cls = _distributionImpl[ext.lower()]

            match = EGG_NAME(basename)
            if match:
                project_name, version, py_version, platform = match.group(
                    'name', 'ver', 'pyver', 'plat'
                )
        return cls(
            location,
            metadata,
            project_name=project_name,
            version=version,
            py_version=py_version,
            platform=platform,
            **kw,
        )._reload_version()

    def _reload_version(self):
        return self

    @property
    def hashcmp(self):
        return (
            self._forgiving_parsed_version,
            self.precedence,
            self.key,
            self.location,
            self.py_version or '',
            self.platform or '',
        )

    def __hash__(self):
        return hash(self.hashcmp)

    def __lt__(self, other):
        return self.hashcmp < other.hashcmp

    def __le__(self, other):
        return self.hashcmp <= other.hashcmp

    def __gt__(self, other):
        return self.hashcmp > other.hashcmp

    def __ge__(self, other):
        return self.hashcmp >= other.hashcmp

    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            # It's not a Distribution, so they are not equal
            return False
        return self.hashcmp == other.hashcmp

    def __ne__(self, other):
        return not self == other

    # These properties have to be lazy so that we don't have to load any
    # metadata until/unless it's actually needed.  (i.e., some distributions
    # may not know their name or version without loading PKG-INFO)

    @property
    def key(self):
        try:
            return self._key
        except AttributeError:
            self._key = key = self.project_name.lower()
            return key

    @property
    def parsed_version(self):
        if not hasattr(self, "_parsed_version"):
            try:
                self._parsed_version = parse_version(self.version)
            except packaging.version.InvalidVersion as ex:
                info = f"(package: {self.project_name})"
                if hasattr(ex, "add_note"):
                    ex.add_note(info)  # PEP 678
                    raise
                raise packaging.version.InvalidVersion(f"{str(ex)} {info}") from None

        return self._parsed_version

    @property
    def _forgiving_parsed_version(self):
        try:
            return self.parsed_version
        except packaging.version.InvalidVersion as ex:
            self._parsed_version = parse_version(_forgiving_version(self.version))

            notes = "\n".join(getattr(ex, "__notes__", []))  # PEP 678
            msg = f"""!!\n\n
            *************************************************************************
            {str(ex)}\n{notes}

            This is a long overdue deprecation.
            For the time being, `pkg_resources` will use `{self._parsed_version}`
            as a replacement to avoid breaking existing environments,
            but no future compatibility is guaranteed.

            If you maintain package {self.project_name} you should implement
            the relevant changes to adequate the project to PEP 440 immediately.
            *************************************************************************
            \n\n!!
            """
            warnings.warn(msg, DeprecationWarning)

            return self._parsed_version

    @property
    def version(self):
        try:
            return self._version
        except AttributeError as e:
            version = self._get_version()
            if version is None:
                path = self._get_metadata_path_for_display(self.PKG_INFO)
                msg = ("Missing 'Version:' header and/or {} file at path: {}").format(
                    self.PKG_INFO, path
                )
                raise ValueError(msg, self) from e

            return version

    @property
    def _dep_map(self):
        """
        A map of extra to its list of (direct) requirements
        for this distribution, including the null extra.
        """
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._filter_extras(self._build_dep_map())
        return self.__dep_map

    @staticmethod
    def _filter_extras(dm):
        """
        Given a mapping of extras to dependencies, strip off
        environment markers and filter out any dependencies
        not matching the markers.
        """
        for extra in list(filter(None, dm)):
            new_extra = extra
            reqs = dm.pop(extra)
            new_extra, _, marker = extra.partition(':')
            fails_marker = marker and (
                invalid_marker(marker) or not evaluate_marker(marker)
            )
            if fails_marker:
                reqs = []
            new_extra = safe_extra(new_extra) or None

            dm.setdefault(new_extra, []).extend(reqs)
        return dm

    def _build_dep_map(self):
        dm = {}
        for name in 'requires.txt', 'depends.txt':
            for extra, reqs in split_sections(self._get_metadata(name)):
                dm.setdefault(extra, []).extend(parse_requirements(reqs))
        return dm

    def requires(self, extras=()):
        """List of Requirements needed for this distro if `extras` are used"""
        dm = self._dep_map
        deps = []
        deps.extend(dm.get(None, ()))
        for ext in extras:
            try:
                deps.extend(dm[safe_extra(ext)])
            except KeyError as e:
                raise UnknownExtra(
                    "%s has no such extra feature %r" % (self, ext)
                ) from e
        return deps

    def _get_metadata_path_for_display(self, name):
        """
        Return the path to the given metadata file, if available.
        """
        try:
            # We need to access _get_metadata_path() on the provider object
            # directly rather than through this class's __getattr__()
            # since _get_metadata_path() is marked private.
            path = self._provider._get_metadata_path(name)

        # Handle exceptions e.g. in case the distribution's metadata
        # provider doesn't support _get_metadata_path().
        except Exception:
            return '[could not detect]'

        return path

    def _get_metadata(self, name):
        if self.has_metadata(name):
            yield from self.get_metadata_lines(name)

    def _get_version(self):
        lines = self._get_metadata(self.PKG_INFO)
        version = _version_from_file(lines)

        return version

    def activate(self, path=None, replace=False):
        """Ensure distribution is importable on `path` (default=sys.path)"""
        if path is None:
            path = sys.path
        self.insert_on(path, replace=replace)
        if path is sys.path:
            fixup_namespace_packages(self.location)
            for pkg in self._get_metadata('namespace_packages.txt'):
                if pkg in sys.modules:
                    declare_namespace(pkg)

    def egg_name(self):
        """Return what this distribution's standard .egg filename should be"""
        filename = "%s-%s-py%s" % (
            to_filename(self.project_name),
            to_filename(self.version),
            self.py_version or PY_MAJOR,
        )

        if self.platform:
            filename += '-' + self.platform
        return filename

    def __repr__(self):
        if self.location:
            return "%s (%s)" % (self, self.location)
        else:
            return str(self)

    def __str__(self):
        try:
            version = getattr(self, 'version', None)
        except ValueError:
            version = None
        version = version or "[unknown version]"
        return "%s %s" % (self.project_name, version)

    def __getattr__(self, attr):
        """Delegate all unrecognized public attributes to .metadata provider"""
        if attr.startswith('_'):
            raise AttributeError(attr)
        return getattr(self._provider, attr)

    def __dir__(self):
        return list(
            set(super(Distribution, self).__dir__())
            | set(attr for attr in self._provider.__dir__() if not attr.startswith('_'))
        )

    @classmethod
    def from_filename(cls, filename, metadata=None, **kw):
        return cls.from_location(
            _normalize_cached(filename), os.path.basename(filename), metadata, **kw
        )

    def as_requirement(self):
        """Return a ``Requirement`` that matches this distribution exactly"""
        if isinstance(self.parsed_version, packaging.version.Version):
            spec = "%s==%s" % (self.project_name, self.parsed_version)
        else:
            spec = "%s===%s" % (self.project_name, self.parsed_version)

        return Requirement.parse(spec)

    def load_entry_point(self, group, name):
        """Return the `name` entry point of `group` or raise ImportError"""
        ep = self.get_entry_info(group, name)
        if ep is None:
            raise ImportError("Entry point %r not found" % ((group, name),))
        return ep.load()

    def get_entry_map(self, group=None):
        """Return the entry point map for `group`, or the full entry map"""
        try:
            ep_map = self._ep_map
        except AttributeError:
            ep_map = self._ep_map = EntryPoint.parse_map(
                self._get_metadata('entry_points.txt'), self
            )
        if group is not None:
            return ep_map.get(group, {})
        return ep_map

    def get_entry_info(self, group, name):
        """Return the EntryPoint object for `group`+`name`, or ``None``"""
        return self.get_entry_map(group).get(name)

    # FIXME: 'Distribution.insert_on' is too complex (13)
    def insert_on(self, path, loc=None, replace=False):  # noqa: C901
        """Ensure self.location is on path

        If replace=False (default):
            - If location is already in path anywhere, do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent.
              - Else: add to the end of path.
        If replace=True:
            - If location is already on path anywhere (not eggs)
              or higher priority than its parent (eggs)
              do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent,
                removing any lower-priority entries.
              - Else: add it to the front of path.
        """

        loc = loc or self.location
        if not loc:
            return

        nloc = _normalize_cached(loc)
        bdir = os.path.dirname(nloc)
        npath = [(p and _normalize_cached(p) or p) for p in path]

        for p, item in enumerate(npath):
            if item == nloc:
                if replace:
                    break
                else:
                    # don't modify path (even removing duplicates) if
                    # found and not replace
                    return
            elif item == bdir and self.precedence == EGG_DIST:
                # if it's an .egg, give it precedence over its directory
                # UNLESS it's already been added to sys.path and replace=False
                if (not replace) and nloc in npath[p:]:
                    return
                if path is sys.path:
                    self.check_version_conflict()
                path.insert(p, loc)
                npath.insert(p, nloc)
                break
        else:
            if path is sys.path:
                self.check_version_conflict()
            if replace:
                path.insert(0, loc)
            else:
                path.append(loc)
            return

        # p is the spot where we found or inserted loc; now remove duplicates
        while True:
            try:
                np = npath.index(nloc, p + 1)
            except ValueError:
                break
            else:
                del npath[np], path[np]
                # ha!
                p = np

        return

    def check_version_conflict(self):
        if self.key == 'setuptools':
            # ignore the inevitable setuptools self-conflicts  :(
            return

        nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
        loc = normalize_path(self.location)
        for modname in self._get_metadata('top_level.txt'):
            if (
                modname not in sys.modules
                or modname in nsp
                or modname in _namespace_packages
            ):
                continue
            if modname in ('pkg_resources', 'setuptools', 'site'):
                continue
            fn = getattr(sys.modules[modname], '__file__', None)
            if fn and (
                normalize_path(fn).startswith(loc) or fn.startswith(self.location)
            ):
                continue
            issue_warning(
                "Module %s was already imported from %s, but %s is being added"
                " to sys.path" % (modname, fn, self.location),
            )

    def has_version(self):
        try:
            self.version
        except ValueError:
            issue_warning("Unbuilt egg for " + repr(self))
            return False
        except SystemError:
            # TODO: remove this except clause when python/cpython#103632 is fixed.
            return False
        return True

    def clone(self, **kw):
        """Copy this distribution, substituting in any changed keyword args"""
        names = 'project_name version py_version platform location precedence'
        for attr in names.split():
            kw.setdefault(attr, getattr(self, attr, None))
        kw.setdefault('metadata', self._provider)
        return self.__class__(**kw)

    @property
    def extras(self):
        return [dep for dep in self._dep_map if dep]


class EggInfoDistribution(Distribution):
    def _reload_version(self):
        """
        Packages installed by distutils (e.g. numpy or scipy),
        which uses an old safe_version, and so
        their version numbers can get mangled when
        converted to filenames (e.g., 1.11.0.dev0+2329eae to
        1.11.0.dev0_2329eae). These distributions will not be
        parsed properly
        downstream by Distribution and safe_version, so
        take an extra step and try to get the version number from
        the metadata file itself instead of the filename.
        """
        md_version = self._get_version()
        if md_version:
            self._version = md_version
        return self


class DistInfoDistribution(Distribution):
    """
    Wrap an actual or potential sys.path entry
    w/metadata, .dist-info style.
    """

    PKG_INFO = 'METADATA'
    EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])")

    @property
    def _parsed_pkg_info(self):
        """Parse and cache metadata"""
        try:
            return self._pkg_info
        except AttributeError:
            metadata = self.get_metadata(self.PKG_INFO)
            self._pkg_info = email.parser.Parser().parsestr(metadata)
            return self._pkg_info

    @property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._compute_dependencies()
            return self.__dep_map

    def _compute_dependencies(self):
        """Recompute this distribution's dependencies."""
        dm = self.__dep_map = {None: []}

        reqs = []
        # Including any condition expressions
        for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
            reqs.extend(parse_requirements(req))

        def reqs_for_extra(extra):
            for req in reqs:
                if not req.marker or req.marker.evaluate({'extra': extra}):
                    yield req

        common = types.MappingProxyType(dict.fromkeys(reqs_for_extra(None)))
        dm[None].extend(common)

        for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
            s_extra = safe_extra(extra.strip())
            dm[s_extra] = [r for r in reqs_for_extra(extra) if r not in common]

        return dm


_distributionImpl = {
    '.egg': Distribution,
    '.egg-info': EggInfoDistribution,
    '.dist-info': DistInfoDistribution,
}


def issue_warning(*args, **kw):
    level = 1
    g = globals()
    try:
        # find the first stack frame that is *not* code in
        # the pkg_resources module, to use for the warning
        while sys._getframe(level).f_globals is g:
            level += 1
    except ValueError:
        pass
    warnings.warn(stacklevel=level + 1, *args, **kw)


def parse_requirements(strs):
    """
    Yield ``Requirement`` objects for each specification in `strs`.

    `strs` must be a string, or a (possibly-nested) iterable thereof.
    """
    return map(Requirement, join_continuation(map(drop_comment, yield_lines(strs))))


class RequirementParseError(packaging.requirements.InvalidRequirement):
    "Compatibility wrapper for InvalidRequirement"


class Requirement(packaging.requirements.Requirement):
    def __init__(self, requirement_string):
        """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
        super(Requirement, self).__init__(requirement_string)
        self.unsafe_name = self.name
        project_name = safe_name(self.name)
        self.project_name, self.key = project_name, project_name.lower()
        self.specs = [(spec.operator, spec.version) for spec in self.specifier]
        self.extras = tuple(map(safe_extra, self.extras))
        self.hashCmp = (
            self.key,
            self.url,
            self.specifier,
            frozenset(self.extras),
            str(self.marker) if self.marker else None,
        )
        self.__hash = hash(self.hashCmp)

    def __eq__(self, other):
        return isinstance(other, Requirement) and self.hashCmp == other.hashCmp

    def __ne__(self, other):
        return not self == other

    def __contains__(self, item):
        if isinstance(item, Distribution):
            if item.key != self.key:
                return False

            item = item.version

        # Allow prereleases always in order to match the previous behavior of
        # this method. In the future this should be smarter and follow PEP 440
        # more accurately.
        return self.specifier.contains(item, prereleases=True)

    def __hash__(self):
        return self.__hash

    def __repr__(self):
        return "Requirement.parse(%r)" % str(self)

    @staticmethod
    def parse(s):
        (req,) = parse_requirements(s)
        return req


def _always_object(classes):
    """
    Ensure object appears in the mro even
    for old-style classes.
    """
    if object not in classes:
        return classes + (object,)
    return classes


def _find_adapter(registry, ob):
    """Return an adapter factory for `ob` from `registry`"""
    types = _always_object(inspect.getmro(getattr(ob, '__class__', type(ob))))
    for t in types:
        if t in registry:
            return registry[t]


def ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    os.makedirs(dirname, exist_ok=True)


def _bypass_ensure_directory(path):
    """Sandbox-bypassing version of ensure_directory()"""
    if not WRITE_SUPPORT:
        raise OSError('"os.mkdir" not supported on this platform.')
    dirname, filename = split(path)
    if dirname and filename and not isdir(dirname):
        _bypass_ensure_directory(dirname)
        try:
            mkdir(dirname, 0o755)
        except FileExistsError:
            pass


def split_sections(s):
    """Split a string or iterable thereof into (section, content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    """
    section = None
    content = []
    for line in yield_lines(s):
        if line.startswith("["):
            if line.endswith("]"):
                if section or content:
                    yield section, content
                section = line[1:-1].strip()
                content = []
            else:
                raise ValueError("Invalid section heading", line)
        else:
            content.append(line)

    # wrap up last segment
    yield section, content


def _mkstemp(*args, **kw):
    old_open = os.open
    try:
        # temporarily bypass sandboxing
        os.open = os_open
        return tempfile.mkstemp(*args, **kw)
    finally:
        # and then put it back
        os.open = old_open


# Silence the PEP440Warning by default, so that end users don't get hit by it
# randomly just because they use pkg_resources. We want to append the rule
# because we want earlier uses of filterwarnings to take precedence over this
# one.
warnings.filterwarnings("ignore", category=PEP440Warning, append=True)


# from jaraco.functools 1.3
def _call_aside(f, *args, **kwargs):
    f(*args, **kwargs)
    return f


@_call_aside
def _initialize(g=globals()):
    "Set up global resource manager (deliberately not state-saved)"
    manager = ResourceManager()
    g['_manager'] = manager
    g.update(
        (name, getattr(manager, name))
        for name in dir(manager)
        if not name.startswith('_')
    )


class PkgResourcesDeprecationWarning(Warning):
    """
    Base class for warning about deprecations in ``pkg_resources``

    This class is not derived from ``DeprecationWarning``, and as such is
    visible by default.
    """


@_call_aside
def _initialize_master_working_set():
    """
    Prepare the master working set and make the ``require()``
    API available.

    This function has explicit effects on the global state
    of pkg_resources. It is intended to be invoked once at
    the initialization of this module.

    Invocation by other packages is unsupported and done
    at their own risk.
    """
    working_set = WorkingSet._build_master()
    _declare_state('object', working_set=working_set)

    require = working_set.require
    iter_entry_points = working_set.iter_entry_points
    add_activation_listener = working_set.subscribe
    run_script = working_set.run_script
    # backward compatibility
    run_main = run_script
    # Activate all distributions already on sys.path with replace=False and
    # ensure that all distributions added to the working set in the future
    # (e.g. by calling ``require()``) will get activated as well,
    # with higher priority (replace=True).
    tuple(dist.activate(replace=False) for dist in working_set)
    add_activation_listener(
        lambda dist: dist.activate(replace=True),
        existing=False,
    )
    working_set.entries = []
    # match order
    list(map(working_set.add_entry, sys.path))
    globals().update(locals())
python3.12/site-packages/pkg_resources/extern/__pycache__/__init__.cpython-312.pyc000064400000007775151732701140023764 0ustar00�

��_i�	��Z�ddlZddlZGd�d�ZdZeee�j
�y)�Nc�N�eZdZdZdd�Zed��Zd�Zd�Zd�Z	d�Z
dd	�Zd
�Zy)
�VendorImporterz�
    A PEP 302 meta path importer for finding optionally-vendored
    or otherwise naturally-installed packages from root_name.
    Nc�h�||_t|�|_|xs|jdd�|_y)N�extern�_vendor)�	root_name�set�vendored_names�replace�
vendor_pkg)�selfrr
rs    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/extern/__init__.py�__init__zVendorImporter.__init__s/��"���!�.�1���$�N�	�(9�(9�(�I�(N���c#�6K�|jdz��d��y�w)zL
        Search first the vendor package then as a natural package.
        �.�N)r�r
s r�search_pathzVendorImporter.search_paths����
�o�o��#�#���s�c��|j|jdz�\}}}|xr)tt|j|j
��S)z,Figure out if the target module is vendored.r)�	partitionr�any�map�
startswithr
)r
�fullname�root�base�targets     r�_module_matches_namespacez(VendorImporter._module_matches_namespacesG��%�/�/�����0D�E���d�F��x�L�C��F�$5�$5�t�7J�7J� K�L�Lrc�@�|j|jdz�\}}}|jD]<}	||z}t|�tj
|}|tj
|<|cSt
djdit�����#t$rY�mwxYw)zK
        Iterate over the search path to locate and load fullname.
        rz�The '{target}' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.�)	rrr�
__import__�sys�modules�ImportError�format�locals)r
rrrr�prefix�extant�mods        r�load_modulezVendorImporter.load_modules���&�/�/�����0D�E���d�F��&�&�F�
��&����6�"��k�k�&�)��(+����H�%��
�
'��'� �!'��3�*0��3��
���
��
�s�7B�	B�Bc�8�|j|j�S�N)r+�name)r
�specs  r�
create_modulezVendorImporter.create_module3s������	�	�*�*rc��yr-r!)r
�modules  r�exec_modulezVendorImporter.exec_module6s��rc�h�|j|�r tjj||�SdS)z(Return a module spec for vendored names.N)r�	importlib�util�spec_from_loader)r
r�pathrs    r�	find_speczVendorImporter.find_spec9s7���-�-�h�7�
�N�N�+�+�H�d�;�	
��	
rc�h�|tjvr tjj|�yy)zR
        Install this importer into sys.meta_path if not already present.
        N)r#�	meta_path�appendrs r�installzVendorImporter.installAs'���s�}�}�$��M�M� � ��&�%r)r!N)NN)
�__name__�
__module__�__qualname__�__doc__r�propertyrrr+r0r3r9r=r!rrrrs@���
O�
����M�
�,+�
�
�'rr)�	packaging�platformdirs�jaraco�importlib_resources�more_itertools)�importlib.utilr5r#r�namesr>r=r!rr�<module>rJs4���
�A'�A'�H	���x���'�'�)rpython3.12/site-packages/pkg_resources/extern/__init__.py000064400000004612151732701140017406 0ustar00import importlib.util
import sys


class VendorImporter:
    """
    A PEP 302 meta path importer for finding optionally-vendored
    or otherwise naturally-installed packages from root_name.
    """

    def __init__(self, root_name, vendored_names=(), vendor_pkg=None):
        self.root_name = root_name
        self.vendored_names = set(vendored_names)
        self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor')

    @property
    def search_path(self):
        """
        Search first the vendor package then as a natural package.
        """
        yield self.vendor_pkg + '.'
        yield ''

    def _module_matches_namespace(self, fullname):
        """Figure out if the target module is vendored."""
        root, base, target = fullname.partition(self.root_name + '.')
        return not root and any(map(target.startswith, self.vendored_names))

    def load_module(self, fullname):
        """
        Iterate over the search path to locate and load fullname.
        """
        root, base, target = fullname.partition(self.root_name + '.')
        for prefix in self.search_path:
            try:
                extant = prefix + target
                __import__(extant)
                mod = sys.modules[extant]
                sys.modules[fullname] = mod
                return mod
            except ImportError:
                pass
        else:
            raise ImportError(
                "The '{target}' package is required; "
                "normally this is bundled with this package so if you get "
                "this warning, consult the packager of your "
                "distribution.".format(**locals())
            )

    def create_module(self, spec):
        return self.load_module(spec.name)

    def exec_module(self, module):
        pass

    def find_spec(self, fullname, path=None, target=None):
        """Return a module spec for vendored names."""
        return (
            importlib.util.spec_from_loader(fullname, self)
            if self._module_matches_namespace(fullname)
            else None
        )

    def install(self):
        """
        Install this importer into sys.meta_path if not already present.
        """
        if self not in sys.meta_path:
            sys.meta_path.append(self)


names = (
    'packaging',
    'platformdirs',
    'jaraco',
    'importlib_resources',
    'more_itertools',
)
VendorImporter(__name__, names).install()
python3.12/site-packages/pip-23.3.1.dist-info/entry_points.txt000064400000000175151732701140017620 0ustar00[console_scripts]
pip = pip._internal.cli.main:main
pip3 = pip._internal.cli.main:main
pip3.12 = pip._internal.cli.main:main
python3.12/site-packages/pip-23.3.1.dist-info/METADATA000064400000006724151732701140015433 0ustar00Metadata-Version: 2.1
Name: pip
Version: 23.3.1
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Project-URL: Documentation, https://pip.pypa.io
Project-URL: Source, https://github.com/pypa/pip
Project-URL: Changelog, https://pip.pypa.io/en/stable/news/
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Build Tools
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
License-File: LICENSE.txt
License-File: AUTHORS.txt

pip - The Python Package Installer
==================================

.. image:: https://img.shields.io/pypi/v/pip.svg
   :target: https://pypi.org/project/pip/
   :alt: PyPI

.. image:: https://img.shields.io/pypi/pyversions/pip
   :target: https://pypi.org/project/pip
   :alt: PyPI - Python Version

.. image:: https://readthedocs.org/projects/pip/badge/?version=latest
   :target: https://pip.pypa.io/en/latest
   :alt: Documentation

pip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.

Please take a look at our documentation for how to install and use pip:

* `Installation`_
* `Usage`_

We release updates regularly, with a new version every 3 months. Find more details in our documentation:

* `Release notes`_
* `Release process`_

If you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:

* `Issue tracking`_
* `Discourse channel`_
* `User IRC`_

If you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:

* `GitHub page`_
* `Development documentation`_
* `Development IRC`_

Code of Conduct
---------------

Everyone interacting in the pip project's codebases, issue trackers, chat
rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.

.. _package installer: https://packaging.python.org/guides/tool-recommendations/
.. _Python Package Index: https://pypi.org
.. _Installation: https://pip.pypa.io/en/stable/installation/
.. _Usage: https://pip.pypa.io/en/stable/
.. _Release notes: https://pip.pypa.io/en/stable/news.html
.. _Release process: https://pip.pypa.io/en/latest/development/release-process/
.. _GitHub page: https://github.com/pypa/pip
.. _Development documentation: https://pip.pypa.io/en/latest/development
.. _Issue tracking: https://github.com/pypa/pip/issues
.. _Discourse channel: https://discuss.python.org/c/packaging
.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
python3.12/site-packages/pip-23.3.1.dist-info/INSTALLER000064400000000004151732701140015571 0ustar00rpm
python3.12/site-packages/pip-23.3.1.dist-info/RECORD000064400000233715151732701140015233 0ustar00../../../bin/pip,sha256=x6IBJdDgwPurVObC4mRtY0LcA_R1QCtzY3Wanz9H-ag,235
../../../bin/pip3,sha256=x6IBJdDgwPurVObC4mRtY0LcA_R1QCtzY3Wanz9H-ag,235
../../../bin/pip3.12,sha256=x6IBJdDgwPurVObC4mRtY0LcA_R1QCtzY3Wanz9H-ag,235
pip-23.3.1.dist-info/AUTHORS.txt,sha256=HOVK0m4Fk7uZrqt9MhiBlBTdmUbMIxXJziTWeMc_Jxc,10253
pip-23.3.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
pip-23.3.1.dist-info/LICENSE.txt,sha256=Y0MApmnUmurmWxLGxIySTFGkzfPR_whtw0VtyLyqIQQ,1093
pip-23.3.1.dist-info/METADATA,sha256=ePd4oJwtCOg7e5hjeRczRRgaxHUSasxlmRPNHMtKToE,3540
pip-23.3.1.dist-info/RECORD,,
pip-23.3.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip-23.3.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
pip-23.3.1.dist-info/direct_url.json,sha256=HciSP4BM3PP1Dh2pPyRHSJEK8sfHYRPBPKU4WUiP88M,274
pip-23.3.1.dist-info/entry_points.txt,sha256=Fa_c0b-xGFaYxagIruvpJD6qqXmNTA02vAVIkmMj-9o,125
pip-23.3.1.dist-info/top_level.txt,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
pip/__init__.py,sha256=MSbZQYwV5U4mAXP2fBQh70QhM71N-1vh7T4CRREqVog,357
pip/__main__.py,sha256=WzbhHXTbSE6gBY19mNN9m4s5o_365LOvTYSgqgbdBhE,854
pip/__pip-runner__.py,sha256=EnrfKmKMzWAdqg_JicLCOP9Y95Ux7zHh4ObvqLtQcjo,1444
pip/__pycache__/__init__.cpython-312.pyc,,
pip/__pycache__/__main__.cpython-312.pyc,,
pip/__pycache__/__pip-runner__.cpython-312.pyc,,
pip/_internal/__init__.py,sha256=iVyyL1Ss1KKqc3nAmdxV29pNJMSIk-4M_kQV4RgFhw4,529
pip/_internal/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/__pycache__/build_env.cpython-312.pyc,,
pip/_internal/__pycache__/cache.cpython-312.pyc,,
pip/_internal/__pycache__/configuration.cpython-312.pyc,,
pip/_internal/__pycache__/exceptions.cpython-312.pyc,,
pip/_internal/__pycache__/main.cpython-312.pyc,,
pip/_internal/__pycache__/pyproject.cpython-312.pyc,,
pip/_internal/__pycache__/self_outdated_check.cpython-312.pyc,,
pip/_internal/__pycache__/wheel_builder.cpython-312.pyc,,
pip/_internal/build_env.py,sha256=1ESpqw0iupS_K7phZK5zshVE5Czy9BtGLFU4W6Enva8,10243
pip/_internal/cache.py,sha256=uiYD-9F0Bv1C8ZyWE85lpzDmQf7hcUkgL99GmI8I41Q,10370
pip/_internal/cli/__init__.py,sha256=FkHBgpxxb-_gd6r1FjnNhfMOzAUYyXoXKJ6abijfcFU,132
pip/_internal/cli/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc,,
pip/_internal/cli/__pycache__/base_command.cpython-312.pyc,,
pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc,,
pip/_internal/cli/__pycache__/command_context.cpython-312.pyc,,
pip/_internal/cli/__pycache__/main.cpython-312.pyc,,
pip/_internal/cli/__pycache__/main_parser.cpython-312.pyc,,
pip/_internal/cli/__pycache__/parser.cpython-312.pyc,,
pip/_internal/cli/__pycache__/progress_bars.cpython-312.pyc,,
pip/_internal/cli/__pycache__/req_command.cpython-312.pyc,,
pip/_internal/cli/__pycache__/spinners.cpython-312.pyc,,
pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc,,
pip/_internal/cli/autocompletion.py,sha256=_br_5NgSxSuvPjMF0MLHzS5s6BpSkQAQHKrLK89VauM,6690
pip/_internal/cli/base_command.py,sha256=iuVWGa2oTq7gBReo0er3Z0tXJ2oqBIC6QjDHcnDhKXY,8733
pip/_internal/cli/cmdoptions.py,sha256=fAi5GzWuM9mKUesJZO56LcPCVMDtm64c2tC_YUpI1qs,30117
pip/_internal/cli/command_context.py,sha256=RHgIPwtObh5KhMrd3YZTkl8zbVG-6Okml7YbFX4Ehg0,774
pip/_internal/cli/main.py,sha256=Uzxt_YD1hIvB1AW5mxt6IVcht5G712AtMqdo51UMhmQ,2816
pip/_internal/cli/main_parser.py,sha256=laDpsuBDl6kyfywp9eMMA9s84jfH2TJJn-vmL0GG90w,4338
pip/_internal/cli/parser.py,sha256=o4esYgG-rvPsf6FBpF3fSLGHa4ndDvJtwxBgeckGyfI,10801
pip/_internal/cli/progress_bars.py,sha256=So4mPoSjXkXiSHiTzzquH3VVyVD_njXlHJSExYPXAow,1968
pip/_internal/cli/req_command.py,sha256=c7_XHABnXmD3_qlK9-r37KqdKBAcgmVKvQ2WcTrNLfc,18369
pip/_internal/cli/spinners.py,sha256=hIJ83GerdFgFCdobIA23Jggetegl_uC4Sp586nzFbPE,5118
pip/_internal/cli/status_codes.py,sha256=sEFHUaUJbqv8iArL3HAtcztWZmGOFX01hTesSytDEh0,116
pip/_internal/commands/__init__.py,sha256=5oRO9O3dM2vGuh0bFw4HOVletryrz5HHMmmPWwJrH9U,3882
pip/_internal/commands/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/commands/__pycache__/cache.cpython-312.pyc,,
pip/_internal/commands/__pycache__/check.cpython-312.pyc,,
pip/_internal/commands/__pycache__/completion.cpython-312.pyc,,
pip/_internal/commands/__pycache__/configuration.cpython-312.pyc,,
pip/_internal/commands/__pycache__/debug.cpython-312.pyc,,
pip/_internal/commands/__pycache__/download.cpython-312.pyc,,
pip/_internal/commands/__pycache__/freeze.cpython-312.pyc,,
pip/_internal/commands/__pycache__/hash.cpython-312.pyc,,
pip/_internal/commands/__pycache__/help.cpython-312.pyc,,
pip/_internal/commands/__pycache__/index.cpython-312.pyc,,
pip/_internal/commands/__pycache__/inspect.cpython-312.pyc,,
pip/_internal/commands/__pycache__/install.cpython-312.pyc,,
pip/_internal/commands/__pycache__/list.cpython-312.pyc,,
pip/_internal/commands/__pycache__/search.cpython-312.pyc,,
pip/_internal/commands/__pycache__/show.cpython-312.pyc,,
pip/_internal/commands/__pycache__/uninstall.cpython-312.pyc,,
pip/_internal/commands/__pycache__/wheel.cpython-312.pyc,,
pip/_internal/commands/cache.py,sha256=LfPA8wNcgZtjiI5faeFFCR2Zp-ugaj7XX--FmKxx4_4,7952
pip/_internal/commands/check.py,sha256=Rb13Q28yoLh0j1gpx5SU0jlResNct21eQCRsnaO9xKA,1782
pip/_internal/commands/completion.py,sha256=HT4lD0bgsflHq2IDgYfiEdp7IGGtE7s6MgI3xn0VQEw,4287
pip/_internal/commands/configuration.py,sha256=NB5uf8HIX8-li95YLoZO09nALIWlLCHDF5aifSKcBn8,9815
pip/_internal/commands/debug.py,sha256=L15rfN8DwORQln-QW3ihBaVdCfV7Iba-lwlcyw1f_Vk,6854
pip/_internal/commands/download.py,sha256=e4hw088zGo26WmJaMIRvCniLlLmoOjqolGyfHjsCkCQ,5335
pip/_internal/commands/freeze.py,sha256=2qjQrH9KWi5Roav0CuR7vc7hWm4uOi_0l6tp3ESKDHM,3172
pip/_internal/commands/hash.py,sha256=EVVOuvGtoPEdFi8SNnmdqlCQrhCxV-kJsdwtdcCnXGQ,1703
pip/_internal/commands/help.py,sha256=gcc6QDkcgHMOuAn5UxaZwAStsRBrnGSn_yxjS57JIoM,1132
pip/_internal/commands/index.py,sha256=cGQVSA5dAs7caQ9sz4kllYvaI4ZpGiq1WhCgaImXNSA,4793
pip/_internal/commands/inspect.py,sha256=2wSPt9yfr3r6g-s2S5L6PvRtaHNVyb4TuodMStJ39cw,3188
pip/_internal/commands/install.py,sha256=KTHT8EASlPfbNx428tcvnGhN8D9jlfBwcRa5lxEhFsA,28920
pip/_internal/commands/list.py,sha256=7wRUUmdyyOknl-WZYbO_LtFQxHlWod3pjOY9yYH435o,12450
pip/_internal/commands/search.py,sha256=sbBZiARRc050QquOKcCvOr2K3XLsoYebLKZGRi__iUI,5697
pip/_internal/commands/show.py,sha256=t5jia4zcYJRJZy4U_Von7zMl03hJmmcofj6oDNTnj7Y,6419
pip/_internal/commands/uninstall.py,sha256=OIqO9tqadY8kM4HwhFf1Q62fUIp7v8KDrTRo8yWMz7Y,3886
pip/_internal/commands/wheel.py,sha256=CSnX8Pmf1oPCnd7j7bn1_f58G9KHNiAblvVJ5zykN-A,6476
pip/_internal/configuration.py,sha256=i_dePJKndPAy7hf48Sl6ZuPyl3tFPCE67z0SNatwuwE,13839
pip/_internal/distributions/__init__.py,sha256=Hq6kt6gXBgjNit5hTTWLAzeCNOKoB-N0pGYSqehrli8,858
pip/_internal/distributions/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/distributions/__pycache__/base.cpython-312.pyc,,
pip/_internal/distributions/__pycache__/installed.cpython-312.pyc,,
pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc,,
pip/_internal/distributions/__pycache__/wheel.cpython-312.pyc,,
pip/_internal/distributions/base.py,sha256=oRSEvnv2ZjBnargamnv2fcJa1n6gUDKaW0g6CWSEpWs,1743
pip/_internal/distributions/installed.py,sha256=QinHFbWAQ8oE0pbD8MFZWkwlnfU1QYTccA1vnhrlYOU,842
pip/_internal/distributions/sdist.py,sha256=4K3V0VNMllHbBzCJibjwd_tylUKpmIdu2AQyhplvCQo,6709
pip/_internal/distributions/wheel.py,sha256=-ma3sOtUQj0AxXCEb6_Fhmjl3nh4k3A0HC2taAb2N-4,1277
pip/_internal/exceptions.py,sha256=LyTVY2dANx-i_TEk5Yr9YcwUtiy0HOEFCAQq1F_46co,23737
pip/_internal/index/__init__.py,sha256=vpt-JeTZefh8a-FC22ZeBSXFVbuBcXSGiILhQZJaNpQ,30
pip/_internal/index/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/index/__pycache__/collector.cpython-312.pyc,,
pip/_internal/index/__pycache__/package_finder.cpython-312.pyc,,
pip/_internal/index/__pycache__/sources.cpython-312.pyc,,
pip/_internal/index/collector.py,sha256=3OmYZ3tCoRPGOrELSgQWG-03M-bQHa2-VCA3R_nJAaU,16504
pip/_internal/index/package_finder.py,sha256=uA354-mHjHvTwxDmk9HvpAkq_7KyGvEd7_9aZFqu0HY,37889
pip/_internal/index/sources.py,sha256=7jw9XSeeQA5K-H4I5a5034Ks2gkQqm4zPXjrhwnP1S4,6556
pip/_internal/locations/__init__.py,sha256=Dh8LJWG8LRlDK4JIj9sfRF96TREzE--N_AIlx7Tqoe4,15365
pip/_internal/locations/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/locations/__pycache__/_distutils.cpython-312.pyc,,
pip/_internal/locations/__pycache__/_sysconfig.cpython-312.pyc,,
pip/_internal/locations/__pycache__/base.cpython-312.pyc,,
pip/_internal/locations/_distutils.py,sha256=DXL6H3xERLF76BjcYanV4j-4Sw-qcPdO2qeZhLN30WQ,6102
pip/_internal/locations/_sysconfig.py,sha256=jyNVtUfMIf0mtyY-Xp1m9yQ8iwECozSVVFmjkN9a2yw,7680
pip/_internal/locations/base.py,sha256=RQiPi1d4FVM2Bxk04dQhXZ2PqkeljEL2fZZ9SYqIQ78,2556
pip/_internal/main.py,sha256=r-UnUe8HLo5XFJz8inTcOOTiu_sxNhgHb6VwlGUllOI,340
pip/_internal/metadata/__init__.py,sha256=9pU3W3s-6HtjFuYhWcLTYVmSaziklPv7k2x8p7X1GmA,4339
pip/_internal/metadata/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/metadata/__pycache__/_json.cpython-312.pyc,,
pip/_internal/metadata/__pycache__/base.cpython-312.pyc,,
pip/_internal/metadata/__pycache__/pkg_resources.cpython-312.pyc,,
pip/_internal/metadata/_json.py,sha256=BTkWfFDrWFwuSodImjtbAh8wCL3isecbnjTb5E6UUDI,2595
pip/_internal/metadata/base.py,sha256=Klf2mwKINYsK7vtxBJzanw0PKx96zWiyIjp6bkIWoVc,26270
pip/_internal/metadata/importlib/__init__.py,sha256=jUUidoxnHcfITHHaAWG1G2i5fdBYklv_uJcjo2x7VYE,135
pip/_internal/metadata/importlib/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/metadata/importlib/__pycache__/_compat.cpython-312.pyc,,
pip/_internal/metadata/importlib/__pycache__/_dists.cpython-312.pyc,,
pip/_internal/metadata/importlib/__pycache__/_envs.cpython-312.pyc,,
pip/_internal/metadata/importlib/_compat.py,sha256=GAe_prIfCE4iUylrnr_2dJRlkkBVRUbOidEoID7LPoE,1882
pip/_internal/metadata/importlib/_dists.py,sha256=UPl1wUujFqiwiltRJ1tMF42WRINO1sSpNNlYQ2mX0mk,8297
pip/_internal/metadata/importlib/_envs.py,sha256=XTaFIYERP2JF0QUZuPx2ETiugXbPEcZ8q8ZKeht6Lpc,7456
pip/_internal/metadata/pkg_resources.py,sha256=opjw4IBSqHvie6sXJ_cbT42meygoPEUfNURJuWZY7sk,10035
pip/_internal/models/__init__.py,sha256=3DHUd_qxpPozfzouoqa9g9ts1Czr5qaHfFxbnxriepM,63
pip/_internal/models/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/models/__pycache__/candidate.cpython-312.pyc,,
pip/_internal/models/__pycache__/direct_url.cpython-312.pyc,,
pip/_internal/models/__pycache__/format_control.cpython-312.pyc,,
pip/_internal/models/__pycache__/index.cpython-312.pyc,,
pip/_internal/models/__pycache__/installation_report.cpython-312.pyc,,
pip/_internal/models/__pycache__/link.cpython-312.pyc,,
pip/_internal/models/__pycache__/scheme.cpython-312.pyc,,
pip/_internal/models/__pycache__/search_scope.cpython-312.pyc,,
pip/_internal/models/__pycache__/selection_prefs.cpython-312.pyc,,
pip/_internal/models/__pycache__/target_python.cpython-312.pyc,,
pip/_internal/models/__pycache__/wheel.cpython-312.pyc,,
pip/_internal/models/candidate.py,sha256=6pcABsaR7CfIHlbJbr2_kMkVJFL_yrYjTx6SVWUnCPQ,990
pip/_internal/models/direct_url.py,sha256=EepBxI97j7wSZ3AmRETYyVTmR9NoTas15vc8popxVTg,6931
pip/_internal/models/format_control.py,sha256=DJpMYjxeYKKQdwNcML2_F0vtAh-qnKTYe-CpTxQe-4g,2520
pip/_internal/models/index.py,sha256=tYnL8oxGi4aSNWur0mG8DAP7rC6yuha_MwJO8xw0crI,1030
pip/_internal/models/installation_report.py,sha256=zRVZoaz-2vsrezj_H3hLOhMZCK9c7TbzWgC-jOalD00,2818
pip/_internal/models/link.py,sha256=6OEk3bt41WU7QZoiyuoVPGsKOU-J_BbDDhouKbIXm0Y,20819
pip/_internal/models/scheme.py,sha256=3EFQp_ICu_shH1-TBqhl0QAusKCPDFOlgHFeN4XowWs,738
pip/_internal/models/search_scope.py,sha256=ASVyyZxiJILw7bTIVVpJx8J293M3Hk5F33ilGn0e80c,4643
pip/_internal/models/selection_prefs.py,sha256=KZdi66gsR-_RUXUr9uejssk3rmTHrQVJWeNA2sV-VSY,1907
pip/_internal/models/target_python.py,sha256=34EkorrMuRvRp-bjqHKJ-bOO71m9xdjN2b8WWFEC2HU,4272
pip/_internal/models/wheel.py,sha256=YqazoIZyma_Q1ejFa1C7NHKQRRWlvWkdK96VRKmDBeI,3600
pip/_internal/network/__init__.py,sha256=jf6Tt5nV_7zkARBrKojIXItgejvoegVJVKUbhAa5Ioc,50
pip/_internal/network/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/network/__pycache__/auth.cpython-312.pyc,,
pip/_internal/network/__pycache__/cache.cpython-312.pyc,,
pip/_internal/network/__pycache__/download.cpython-312.pyc,,
pip/_internal/network/__pycache__/lazy_wheel.cpython-312.pyc,,
pip/_internal/network/__pycache__/session.cpython-312.pyc,,
pip/_internal/network/__pycache__/utils.cpython-312.pyc,,
pip/_internal/network/__pycache__/xmlrpc.cpython-312.pyc,,
pip/_internal/network/auth.py,sha256=TC-OcW2KU4W6R1hU4qPgQXvVH54adACpZz6sWq-R9NA,20541
pip/_internal/network/cache.py,sha256=48A971qCzKNFvkb57uGEk7-0xaqPS0HWj2711QNTxkU,3935
pip/_internal/network/download.py,sha256=HvDDq9bVqaN3jcS3DyVJHP7uTqFzbShdkf7NFSoHfkw,6096
pip/_internal/network/lazy_wheel.py,sha256=2PXVduYZPCPZkkQFe1J1GbfHJWeCU--FXonGyIfw9eU,7638
pip/_internal/network/session.py,sha256=uhovd4J7abd0Yr2g426yC4aC6Uw1VKrQfpzalsEBEMw,18607
pip/_internal/network/utils.py,sha256=6A5SrUJEEUHxbGtbscwU2NpCyz-3ztiDlGWHpRRhsJ8,4073
pip/_internal/network/xmlrpc.py,sha256=AzQgG4GgS152_cqmGr_Oz2MIXsCal-xfsis7fA7nmU0,1791
pip/_internal/operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_internal/operations/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/operations/__pycache__/check.cpython-312.pyc,,
pip/_internal/operations/__pycache__/freeze.cpython-312.pyc,,
pip/_internal/operations/__pycache__/prepare.cpython-312.pyc,,
pip/_internal/operations/build/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_internal/operations/build/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/operations/build/__pycache__/build_tracker.cpython-312.pyc,,
pip/_internal/operations/build/__pycache__/metadata.cpython-312.pyc,,
pip/_internal/operations/build/__pycache__/metadata_editable.cpython-312.pyc,,
pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-312.pyc,,
pip/_internal/operations/build/__pycache__/wheel.cpython-312.pyc,,
pip/_internal/operations/build/__pycache__/wheel_editable.cpython-312.pyc,,
pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-312.pyc,,
pip/_internal/operations/build/build_tracker.py,sha256=z-H5DOknZdBa3dh2Vq6VBMY5qLYIKmlj2p6CGZK5Lc8,4832
pip/_internal/operations/build/metadata.py,sha256=9S0CUD8U3QqZeXp-Zyt8HxwU90lE4QrnYDgrqZDzBnc,1422
pip/_internal/operations/build/metadata_editable.py,sha256=VLL7LvntKE8qxdhUdEJhcotFzUsOSI8NNS043xULKew,1474
pip/_internal/operations/build/metadata_legacy.py,sha256=o-eU21As175hDC7dluM1fJJ_FqokTIShyWpjKaIpHZw,2198
pip/_internal/operations/build/wheel.py,sha256=sT12FBLAxDC6wyrDorh8kvcZ1jG5qInCRWzzP-UkJiQ,1075
pip/_internal/operations/build/wheel_editable.py,sha256=yOtoH6zpAkoKYEUtr8FhzrYnkNHQaQBjWQ2HYae1MQg,1417
pip/_internal/operations/build/wheel_legacy.py,sha256=C9j6rukgQI1n_JeQLoZGuDdfUwzCXShyIdPTp6edbMQ,3064
pip/_internal/operations/check.py,sha256=Hgz0wQJ4fGi8aAVfmdShviNc7XM_2j8oMQJUsVv6AqY,6806
pip/_internal/operations/freeze.py,sha256=uqoeTAf6HOYVMR2UgAT8N85UZoGEVEoQdan_Ao6SOfk,9816
pip/_internal/operations/install/__init__.py,sha256=mX7hyD2GNBO2mFGokDQ30r_GXv7Y_PLdtxcUv144e-s,51
pip/_internal/operations/install/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/operations/install/__pycache__/editable_legacy.cpython-312.pyc,,
pip/_internal/operations/install/__pycache__/wheel.cpython-312.pyc,,
pip/_internal/operations/install/editable_legacy.py,sha256=YeR0KadWXw_ZheC1NtAG1qVIEkOgRGHc23x-YtGW7NU,1282
pip/_internal/operations/install/wheel.py,sha256=a5KnguJ9uQRo7Ikq4YJEno0fFltXYlud-0DpRj3zLr0,27457
pip/_internal/operations/prepare.py,sha256=NWkGkNOjrnnUbHgJPTms_5usKF0M8JlaHL3nyIHABMk,28155
pip/_internal/pyproject.py,sha256=ltmrXWaMXjiJHbYyzWplTdBvPYPdKk99GjKuQVypGZU,7161
pip/_internal/req/__init__.py,sha256=TELFgZOof3lhMmaICVWL9U7PlhXo9OufokbMAJ6J2GI,2738
pip/_internal/req/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/req/__pycache__/constructors.cpython-312.pyc,,
pip/_internal/req/__pycache__/req_file.cpython-312.pyc,,
pip/_internal/req/__pycache__/req_install.cpython-312.pyc,,
pip/_internal/req/__pycache__/req_set.cpython-312.pyc,,
pip/_internal/req/__pycache__/req_uninstall.cpython-312.pyc,,
pip/_internal/req/constructors.py,sha256=PgLoQlsZ_ErZORw5M1mgnxW5V4mKZC0-gyj_3k4hCe0,19028
pip/_internal/req/req_file.py,sha256=5PCO4GnDEnUENiFj4vD_1QmAMjHNtvN6HXbETZ9UGok,17872
pip/_internal/req/req_install.py,sha256=k6JBOchmAJjZ6RU3KJhrw6kC6kRi04MkNVYoeiZ34CE,35160
pip/_internal/req/req_set.py,sha256=nM-CetUtESEH31fdugrOl20GV5-pCUYAvu65FwYDJeI,4704
pip/_internal/req/req_uninstall.py,sha256=m9GlbQ3rzLORTSa6NPFFCmONmC5zTw2lY_0fLOkLYCk,24676
pip/_internal/resolution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_internal/resolution/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/resolution/__pycache__/base.cpython-312.pyc,,
pip/_internal/resolution/base.py,sha256=qlmh325SBVfvG6Me9gc5Nsh5sdwHBwzHBq6aEXtKsLA,583
pip/_internal/resolution/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_internal/resolution/legacy/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/resolution/legacy/__pycache__/resolver.cpython-312.pyc,,
pip/_internal/resolution/legacy/resolver.py,sha256=FwvklD7q8CLdGXeaN8LX72ZclsEbBjZyBeqx8NwCQm4,24201
pip/_internal/resolution/resolvelib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/__pycache__/base.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-312.pyc,,
pip/_internal/resolution/resolvelib/base.py,sha256=jg5COmHLhmBIKOR-4spdJD3jyULYa1BdsqiBu2YJnJ4,5173
pip/_internal/resolution/resolvelib/candidates.py,sha256=IAcXcBj-LLzJwwfBXFGyhpxir42CMBW64oCc4zEgLYo,21320
pip/_internal/resolution/resolvelib/factory.py,sha256=38pCOhY2EMfUmROm5UqXeSSb3RimchN-7vRP0cO9ypM,31806
pip/_internal/resolution/resolvelib/found_candidates.py,sha256=hvL3Hoa9VaYo-qEOZkBi2Iqw251UDxPz-uMHVaWmLpE,5705
pip/_internal/resolution/resolvelib/provider.py,sha256=4t23ivjruqM6hKBX1KpGiTt-M4HGhRcZnGLV0c01K7U,9824
pip/_internal/resolution/resolvelib/reporter.py,sha256=YFm9hQvz4DFCbjZeFTQ56hTz3Ac-mDBnHkeNRVvMHLY,3100
pip/_internal/resolution/resolvelib/requirements.py,sha256=SZh98hbSVbHiHBkgjrSLtdrrZB1zqRIUqFdXptS-aVY,6030
pip/_internal/resolution/resolvelib/resolver.py,sha256=nLJOsVMEVi2gQUVJoUFKMZAeu2f7GRMjGMvNSWyz0Bc,12592
pip/_internal/self_outdated_check.py,sha256=saxQLB8UzIFtMScquytG10TOTsYVFJQ_mkW1NY-46wE,8378
pip/_internal/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_internal/utils/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/utils/__pycache__/_jaraco_text.cpython-312.pyc,,
pip/_internal/utils/__pycache__/_log.cpython-312.pyc,,
pip/_internal/utils/__pycache__/appdirs.cpython-312.pyc,,
pip/_internal/utils/__pycache__/compat.cpython-312.pyc,,
pip/_internal/utils/__pycache__/compatibility_tags.cpython-312.pyc,,
pip/_internal/utils/__pycache__/datetime.cpython-312.pyc,,
pip/_internal/utils/__pycache__/deprecation.cpython-312.pyc,,
pip/_internal/utils/__pycache__/direct_url_helpers.cpython-312.pyc,,
pip/_internal/utils/__pycache__/egg_link.cpython-312.pyc,,
pip/_internal/utils/__pycache__/encoding.cpython-312.pyc,,
pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc,,
pip/_internal/utils/__pycache__/filesystem.cpython-312.pyc,,
pip/_internal/utils/__pycache__/filetypes.cpython-312.pyc,,
pip/_internal/utils/__pycache__/glibc.cpython-312.pyc,,
pip/_internal/utils/__pycache__/hashes.cpython-312.pyc,,
pip/_internal/utils/__pycache__/logging.cpython-312.pyc,,
pip/_internal/utils/__pycache__/misc.cpython-312.pyc,,
pip/_internal/utils/__pycache__/models.cpython-312.pyc,,
pip/_internal/utils/__pycache__/packaging.cpython-312.pyc,,
pip/_internal/utils/__pycache__/setuptools_build.cpython-312.pyc,,
pip/_internal/utils/__pycache__/subprocess.cpython-312.pyc,,
pip/_internal/utils/__pycache__/temp_dir.cpython-312.pyc,,
pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc,,
pip/_internal/utils/__pycache__/urls.cpython-312.pyc,,
pip/_internal/utils/__pycache__/virtualenv.cpython-312.pyc,,
pip/_internal/utils/__pycache__/wheel.cpython-312.pyc,,
pip/_internal/utils/_jaraco_text.py,sha256=yvDGelTVugRayPaOF2k4ab0Ky4d3uOkAfuOQjASjImY,3351
pip/_internal/utils/_log.py,sha256=-jHLOE_THaZz5BFcCnoSL9EYAtJ0nXem49s9of4jvKw,1015
pip/_internal/utils/appdirs.py,sha256=swgcTKOm3daLeXTW6v5BUS2Ti2RvEnGRQYH_yDXklAo,1665
pip/_internal/utils/compat.py,sha256=ACyBfLgj3_XG-iA5omEDrXqDM0cQKzi8h8HRBInzG6Q,1884
pip/_internal/utils/compatibility_tags.py,sha256=ydin8QG8BHqYRsPY4OL6cmb44CbqXl1T0xxS97VhHkk,5377
pip/_internal/utils/datetime.py,sha256=m21Y3wAtQc-ji6Veb6k_M5g6A0ZyFI4egchTdnwh-pQ,242
pip/_internal/utils/deprecation.py,sha256=NKo8VqLioJ4nnXXGmW4KdasxF90EFHkZaHeX1fT08C8,3627
pip/_internal/utils/direct_url_helpers.py,sha256=6F1tc2rcKaCZmgfVwsE6ObIe_Pux23mUVYA-2D9wCFc,3206
pip/_internal/utils/egg_link.py,sha256=ZryCchR_yQSCsdsMkCpxQjjLbQxObA5GDtLG0RR5mGc,2118
pip/_internal/utils/encoding.py,sha256=qqsXDtiwMIjXMEiIVSaOjwH5YmirCaK-dIzb6-XJsL0,1169
pip/_internal/utils/entrypoints.py,sha256=mIoISyVsr-lfGYj0m62FlVgaa9TkizAeFMwiAyh4jEY,3139
pip/_internal/utils/filesystem.py,sha256=RhMIXUaNVMGjc3rhsDahWQ4MavvEQDdqXqgq-F6fpw8,5122
pip/_internal/utils/filetypes.py,sha256=i8XAQ0eFCog26Fw9yV0Yb1ygAqKYB1w9Cz9n0fj8gZU,716
pip/_internal/utils/glibc.py,sha256=Mesxxgg3BLxheLZx-dSf30b6gKpOgdVXw6W--uHSszQ,3113
pip/_internal/utils/hashes.py,sha256=MjOigC75z6qoRMkgHiHqot7eqxfwDZSrEflJMPm-bHE,5118
pip/_internal/utils/logging.py,sha256=fdtuZJ-AKkqwDTANDvGcBEpssL8el7T1jnwk1CnZl3Y,11603
pip/_internal/utils/misc.py,sha256=96DVNJQIeMi0vWrNp0C0v3xjk2r7Zcay5yDoruIm_Js,23739
pip/_internal/utils/models.py,sha256=5GoYU586SrxURMvDn_jBMJInitviJg4O5-iOU-6I0WY,1193
pip/_internal/utils/packaging.py,sha256=5Wm6_x7lKrlqVjPI5MBN_RurcRHwVYoQ7Ksrs84de7s,2108
pip/_internal/utils/setuptools_build.py,sha256=ouXpud-jeS8xPyTPsXJ-m34NPvK5os45otAzdSV_IJE,4435
pip/_internal/utils/subprocess.py,sha256=zzdimb75jVLE1GU4WlTZ055gczhD7n1y1xTcNc7vNZQ,9207
pip/_internal/utils/temp_dir.py,sha256=DUAw22uFruQdK43i2L2K53C-CDjRCPeAsBKJpu-rHQ4,9312
pip/_internal/utils/unpacking.py,sha256=SBb2iV1crb89MDRTEKY86R4A_UOWApTQn9VQVcMDOlE,8821
pip/_internal/utils/urls.py,sha256=AhaesUGl-9it6uvG6fsFPOr9ynFpGaTMk4t5XTX7Z_Q,1759
pip/_internal/utils/virtualenv.py,sha256=S6f7csYorRpiD6cvn3jISZYc3I8PJC43H5iMFpRAEDU,3456
pip/_internal/utils/wheel.py,sha256=lXOgZyTlOm5HmK8tw5iw0A3_5A6wRzsXHOaQkIvvloU,4549
pip/_internal/vcs/__init__.py,sha256=UAqvzpbi0VbZo3Ub6skEeZAw-ooIZR-zX_WpCbxyCoU,596
pip/_internal/vcs/__pycache__/__init__.cpython-312.pyc,,
pip/_internal/vcs/__pycache__/bazaar.cpython-312.pyc,,
pip/_internal/vcs/__pycache__/git.cpython-312.pyc,,
pip/_internal/vcs/__pycache__/mercurial.cpython-312.pyc,,
pip/_internal/vcs/__pycache__/subversion.cpython-312.pyc,,
pip/_internal/vcs/__pycache__/versioncontrol.cpython-312.pyc,,
pip/_internal/vcs/bazaar.py,sha256=j0oin0fpGRHcCFCxEcpPCQoFEvA-DMLULKdGP8Nv76o,3519
pip/_internal/vcs/git.py,sha256=CeKBGJnl6uskvvjkAUXrJVxbHJrpS_B_pyfFdjL3CRc,18121
pip/_internal/vcs/mercurial.py,sha256=ytRnzmP5CkLM2RfdiS4mVJx4jQcmB3FjXeLOPPFEjG8,5246
pip/_internal/vcs/subversion.py,sha256=vhZs8L-TNggXqM1bbhl-FpbxE3TrIB6Tgnx8fh3S2HE,11729
pip/_internal/vcs/versioncontrol.py,sha256=KUOc-hN51em9jrqxKwUR3JnkgSE-xSOqMiiJcSaL6B8,22811
pip/_internal/wheel_builder.py,sha256=3UlHfxQi7_AAXI7ur8aPpPbmqHhecCsubmkHEl-00KU,11842
pip/_vendor/__init__.py,sha256=U51NPwXdA-wXOiANIQncYjcMp6txgeOL5nHxksJeyas,4993
pip/_vendor/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/__pycache__/six.cpython-312.pyc,,
pip/_vendor/__pycache__/typing_extensions.cpython-312.pyc,,
pip/_vendor/cachecontrol/__init__.py,sha256=ctHagMhQXuvQDdm4TirZrwDOT5H8oBNAJqzdKI6sovk,676
pip/_vendor/cachecontrol/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-312.pyc,,
pip/_vendor/cachecontrol/__pycache__/adapter.cpython-312.pyc,,
pip/_vendor/cachecontrol/__pycache__/cache.cpython-312.pyc,,
pip/_vendor/cachecontrol/__pycache__/controller.cpython-312.pyc,,
pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-312.pyc,,
pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-312.pyc,,
pip/_vendor/cachecontrol/__pycache__/serialize.cpython-312.pyc,,
pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-312.pyc,,
pip/_vendor/cachecontrol/_cmd.py,sha256=iist2EpzJvDVIhMAxXq8iFnTBsiZAd6iplxfmNboNyk,1737
pip/_vendor/cachecontrol/adapter.py,sha256=_CcWvUP9048qAZjsNqViaHbdcLs9mmFNixVfpO7oebE,6392
pip/_vendor/cachecontrol/cache.py,sha256=OTQj72tUf8C1uEgczdl3Gc8vkldSzsTITKtDGKMx4z8,1952
pip/_vendor/cachecontrol/caches/__init__.py,sha256=dtrrroK5BnADR1GWjCZ19aZ0tFsMfvFBtLQQU1sp_ag,303
pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-312.pyc,,
pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-312.pyc,,
pip/_vendor/cachecontrol/caches/file_cache.py,sha256=3z8AWKD-vfKeiJqIzLmJyIYtR2yd6Tsh3u1TyLRQoIQ,5352
pip/_vendor/cachecontrol/caches/redis_cache.py,sha256=9rmqwtYu_ljVkW6_oLqbC7EaX_a8YT_yLuna-eS0dgo,1386
pip/_vendor/cachecontrol/controller.py,sha256=keCFA3ZaNVaWTwHd6F1zqWhb4vyvNx_UvZuo5iIYMfo,18384
pip/_vendor/cachecontrol/filewrapper.py,sha256=STttGmIPBvZzt2b51dUOwoWX5crcMCpKZOisM3f5BNc,4292
pip/_vendor/cachecontrol/heuristics.py,sha256=fdFbk9W8IeLrjteIz_fK4mj2HD_Y7COXF2Uc8TgjT1c,4828
pip/_vendor/cachecontrol/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/cachecontrol/serialize.py,sha256=0dHeMaDwysVAAnGVlhMOP4tDliohgNK0Jxk_zsOiWxw,7173
pip/_vendor/cachecontrol/wrapper.py,sha256=hsGc7g8QGQTT-4f8tgz3AM5qwScg6FO0BSdLSRdEvpU,1417
pip/_vendor/certifi/__init__.py,sha256=L_j-d0kYuA_MzA2_2hraF1ovf6KT6DTquRdV3paQwOk,94
pip/_vendor/certifi/__main__.py,sha256=1k3Cr95vCxxGRGDljrW3wMdpZdL3Nhf0u1n-k2qdsCY,255
pip/_vendor/certifi/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/certifi/__pycache__/__main__.cpython-312.pyc,,
pip/_vendor/certifi/__pycache__/core.cpython-312.pyc,,
pip/_vendor/certifi/core.py,sha256=nnfLLkgF14y9y0rl1f7AtoRdjVJCPHconFbfvQn_6vQ,1005
pip/_vendor/certifi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/chardet/__init__.py,sha256=57R-HSxj0PWmILMN0GFmUNqEMfrEVSamXyjD-W6_fbs,4797
pip/_vendor/chardet/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/big5freq.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/big5prober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/chardistribution.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/charsetgroupprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/charsetprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/codingstatemachine.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/codingstatemachinedict.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/cp949prober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/enums.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/escprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/escsm.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/eucjpprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/euckrfreq.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/euckrprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/euctwfreq.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/euctwprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/gb2312freq.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/gb2312prober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/hebrewprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/jisfreq.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/johabfreq.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/johabprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/jpcntx.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/langbulgarianmodel.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/langgreekmodel.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/langhebrewmodel.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/langhungarianmodel.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/langrussianmodel.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/langthaimodel.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/langturkishmodel.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/latin1prober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/macromanprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/mbcharsetprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/mbcsgroupprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/mbcssm.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/resultdict.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/sbcharsetprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/sbcsgroupprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/sjisprober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/universaldetector.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/utf1632prober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/utf8prober.cpython-312.pyc,,
pip/_vendor/chardet/__pycache__/version.cpython-312.pyc,,
pip/_vendor/chardet/big5freq.py,sha256=ltcfP-3PjlNHCoo5e4a7C4z-2DhBTXRfY6jbMbB7P30,31274
pip/_vendor/chardet/big5prober.py,sha256=lPMfwCX6v2AaPgvFh_cSWZcgLDbWiFCHLZ_p9RQ9uxE,1763
pip/_vendor/chardet/chardistribution.py,sha256=13B8XUG4oXDuLdXvfbIWwLFeR-ZU21AqTS1zcdON8bU,10032
pip/_vendor/chardet/charsetgroupprober.py,sha256=UKK3SaIZB2PCdKSIS0gnvMtLR9JJX62M-fZJu3OlWyg,3915
pip/_vendor/chardet/charsetprober.py,sha256=L3t8_wIOov8em-vZWOcbkdsrwe43N6_gqNh5pH7WPd4,5420
pip/_vendor/chardet/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/chardet/cli/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/chardet/cli/__pycache__/chardetect.cpython-312.pyc,,
pip/_vendor/chardet/cli/chardetect.py,sha256=zibMVg5RpKb-ME9_7EYG4ZM2Sf07NHcQzZ12U-rYJho,3242
pip/_vendor/chardet/codingstatemachine.py,sha256=K7k69sw3jY5DmTXoSJQVsUtFIQKYPQVOSJJhBuGv_yE,3732
pip/_vendor/chardet/codingstatemachinedict.py,sha256=0GY3Hi2qIZvDrOOJ3AtqppM1RsYxr_66ER4EHjuMiMc,542
pip/_vendor/chardet/cp949prober.py,sha256=0jKRV7fECuWI16rNnks0ZECKA1iZYCIEaP8A1ZvjUSI,1860
pip/_vendor/chardet/enums.py,sha256=TzECiZoCKNMqgwU76cPCeKWFBqaWvAdLMev5_bCkhY8,1683
pip/_vendor/chardet/escprober.py,sha256=Kho48X65xE0scFylIdeJjM2bcbvRvv0h0WUbMWrJD3A,4006
pip/_vendor/chardet/escsm.py,sha256=AqyXpA2FQFD7k-buBty_7itGEYkhmVa8X09NLRul3QM,12176
pip/_vendor/chardet/eucjpprober.py,sha256=5KYaM9fsxkRYzw1b5k0fL-j_-ezIw-ij9r97a9MHxLY,3934
pip/_vendor/chardet/euckrfreq.py,sha256=3mHuRvXfsq_QcQysDQFb8qSudvTiol71C6Ic2w57tKM,13566
pip/_vendor/chardet/euckrprober.py,sha256=hiFT6wM174GIwRvqDsIcuOc-dDsq2uPKMKbyV8-1Xnc,1753
pip/_vendor/chardet/euctwfreq.py,sha256=2alILE1Lh5eqiFJZjzRkMQXolNJRHY5oBQd-vmZYFFM,36913
pip/_vendor/chardet/euctwprober.py,sha256=NxbpNdBtU0VFI0bKfGfDkpP7S2_8_6FlO87dVH0ogws,1753
pip/_vendor/chardet/gb2312freq.py,sha256=49OrdXzD-HXqwavkqjo8Z7gvs58hONNzDhAyMENNkvY,20735
pip/_vendor/chardet/gb2312prober.py,sha256=KPEBueaSLSvBpFeINMu0D6TgHcR90e5PaQawifzF4o0,1759
pip/_vendor/chardet/hebrewprober.py,sha256=96T_Lj_OmW-fK7JrSHojYjyG3fsGgbzkoTNleZ3kfYE,14537
pip/_vendor/chardet/jisfreq.py,sha256=mm8tfrwqhpOd3wzZKS4NJqkYBQVcDfTM2JiQ5aW932E,25796
pip/_vendor/chardet/johabfreq.py,sha256=dBpOYG34GRX6SL8k_LbS9rxZPMjLjoMlgZ03Pz5Hmqc,42498
pip/_vendor/chardet/johabprober.py,sha256=O1Qw9nVzRnun7vZp4UZM7wvJSv9W941mEU9uDMnY3DU,1752
pip/_vendor/chardet/jpcntx.py,sha256=uhHrYWkLxE_rF5OkHKInm0HUsrjgKHHVQvtt3UcvotA,27055
pip/_vendor/chardet/langbulgarianmodel.py,sha256=vmbvYFP8SZkSxoBvLkFqKiH1sjma5ihk3PTpdy71Rr4,104562
pip/_vendor/chardet/langgreekmodel.py,sha256=JfB7bupjjJH2w3X_mYnQr9cJA_7EuITC2cRW13fUjeI,98484
pip/_vendor/chardet/langhebrewmodel.py,sha256=3HXHaLQPNAGcXnJjkIJfozNZLTvTJmf4W5Awi6zRRKc,98196
pip/_vendor/chardet/langhungarianmodel.py,sha256=WxbeQIxkv8YtApiNqxQcvj-tMycsoI4Xy-fwkDHpP_Y,101363
pip/_vendor/chardet/langrussianmodel.py,sha256=s395bTZ87ESTrZCOdgXbEjZ9P1iGPwCl_8xSsac_DLY,128035
pip/_vendor/chardet/langthaimodel.py,sha256=7bJlQitRpTnVGABmbSznHnJwOHDy3InkTvtFUx13WQI,102774
pip/_vendor/chardet/langturkishmodel.py,sha256=XY0eGdTIy4eQ9Xg1LVPZacb-UBhHBR-cq0IpPVHowKc,95372
pip/_vendor/chardet/latin1prober.py,sha256=p15EEmFbmQUwbKLC7lOJVGHEZwcG45ubEZYTGu01J5g,5380
pip/_vendor/chardet/macromanprober.py,sha256=9anfzmY6TBfUPDyBDOdY07kqmTHpZ1tK0jL-p1JWcOY,6077
pip/_vendor/chardet/mbcharsetprober.py,sha256=Wr04WNI4F3X_VxEverNG-H25g7u-MDDKlNt-JGj-_uU,3715
pip/_vendor/chardet/mbcsgroupprober.py,sha256=iRpaNBjV0DNwYPu_z6TiHgRpwYahiM7ztI_4kZ4Uz9A,2131
pip/_vendor/chardet/mbcssm.py,sha256=hUtPvDYgWDaA2dWdgLsshbwRfm3Q5YRlRogdmeRUNQw,30391
pip/_vendor/chardet/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/chardet/metadata/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/chardet/metadata/__pycache__/languages.cpython-312.pyc,,
pip/_vendor/chardet/metadata/languages.py,sha256=FhvBIdZFxRQ-dTwkb_0madRKgVBCaUMQz9I5xqjE5iQ,13560
pip/_vendor/chardet/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/chardet/resultdict.py,sha256=ez4FRvN5KaSosJeJ2WzUyKdDdg35HDy_SSLPXKCdt5M,402
pip/_vendor/chardet/sbcharsetprober.py,sha256=-nd3F90i7GpXLjehLVHqVBE0KlWzGvQUPETLBNn4o6U,6400
pip/_vendor/chardet/sbcsgroupprober.py,sha256=gcgI0fOfgw_3YTClpbra_MNxwyEyJ3eUXraoLHYb59E,4137
pip/_vendor/chardet/sjisprober.py,sha256=aqQufMzRw46ZpFlzmYaYeT2-nzmKb-hmcrApppJ862k,4007
pip/_vendor/chardet/universaldetector.py,sha256=xYBrg4x0dd9WnT8qclfADVD9ondrUNkqPmvte1pa520,14848
pip/_vendor/chardet/utf1632prober.py,sha256=pw1epGdMj1hDGiCu1AHqqzOEfjX8MVdiW7O1BlT8-eQ,8505
pip/_vendor/chardet/utf8prober.py,sha256=8m08Ub5490H4jQ6LYXvFysGtgKoKsHUd2zH_i8_TnVw,2812
pip/_vendor/chardet/version.py,sha256=lGtJcxGM44Qz4Cbk4rbbmrKxnNr1-97U25TameLehZw,244
pip/_vendor/colorama.pyi,sha256=_T0bPmucr1r9rkW27BRPzWEcsN1RpXYZcuN6D5Y-EI8,22
pip/_vendor/colorama/__init__.py,sha256=wePQA4U20tKgYARySLEC047ucNX-g8pRLpYBuiHlLb8,266
pip/_vendor/colorama/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/colorama/__pycache__/ansi.cpython-312.pyc,,
pip/_vendor/colorama/__pycache__/ansitowin32.cpython-312.pyc,,
pip/_vendor/colorama/__pycache__/initialise.cpython-312.pyc,,
pip/_vendor/colorama/__pycache__/win32.cpython-312.pyc,,
pip/_vendor/colorama/__pycache__/winterm.cpython-312.pyc,,
pip/_vendor/colorama/ansi.py,sha256=Top4EeEuaQdBWdteKMEcGOTeKeF19Q-Wo_6_Cj5kOzQ,2522
pip/_vendor/colorama/ansitowin32.py,sha256=vPNYa3OZbxjbuFyaVo0Tmhmy1FZ1lKMWCnT7odXpItk,11128
pip/_vendor/colorama/initialise.py,sha256=-hIny86ClXo39ixh5iSCfUIa2f_h_bgKRDW7gqs-KLU,3325
pip/_vendor/colorama/tests/__init__.py,sha256=MkgPAEzGQd-Rq0w0PZXSX2LadRWhUECcisJY8lSrm4Q,75
pip/_vendor/colorama/tests/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/colorama/tests/__pycache__/ansi_test.cpython-312.pyc,,
pip/_vendor/colorama/tests/__pycache__/ansitowin32_test.cpython-312.pyc,,
pip/_vendor/colorama/tests/__pycache__/initialise_test.cpython-312.pyc,,
pip/_vendor/colorama/tests/__pycache__/isatty_test.cpython-312.pyc,,
pip/_vendor/colorama/tests/__pycache__/utils.cpython-312.pyc,,
pip/_vendor/colorama/tests/__pycache__/winterm_test.cpython-312.pyc,,
pip/_vendor/colorama/tests/ansi_test.py,sha256=FeViDrUINIZcr505PAxvU4AjXz1asEiALs9GXMhwRaE,2839
pip/_vendor/colorama/tests/ansitowin32_test.py,sha256=RN7AIhMJ5EqDsYaCjVo-o4u8JzDD4ukJbmevWKS70rY,10678
pip/_vendor/colorama/tests/initialise_test.py,sha256=BbPy-XfyHwJ6zKozuQOvNvQZzsx9vdb_0bYXn7hsBTc,6741
pip/_vendor/colorama/tests/isatty_test.py,sha256=Pg26LRpv0yQDB5Ac-sxgVXG7hsA1NYvapFgApZfYzZg,1866
pip/_vendor/colorama/tests/utils.py,sha256=1IIRylG39z5-dzq09R_ngufxyPZxgldNbrxKxUGwGKE,1079
pip/_vendor/colorama/tests/winterm_test.py,sha256=qoWFPEjym5gm2RuMwpf3pOis3a5r_PJZFCzK254JL8A,3709
pip/_vendor/colorama/win32.py,sha256=YQOKwMTwtGBbsY4dL5HYTvwTeP9wIQra5MvPNddpxZs,6181
pip/_vendor/colorama/winterm.py,sha256=XCQFDHjPi6AHYNdZwy0tA02H-Jh48Jp-HvCjeLeLp3U,7134
pip/_vendor/distlib.pyi,sha256=P03Rtk2Cnk8uurQ3IC5bIwXBDNkUUA0beV-d5blmh4s,21
pip/_vendor/distlib/__init__.py,sha256=acgfseOC55dNrVAzaBKpUiH3Z6V7Q1CaxsiQ3K7pC-E,581
pip/_vendor/distlib/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/compat.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/database.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/index.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/locators.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/manifest.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/markers.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/metadata.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/resources.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/util.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/version.cpython-312.pyc,,
pip/_vendor/distlib/__pycache__/wheel.cpython-312.pyc,,
pip/_vendor/distlib/compat.py,sha256=tfoMrj6tujk7G4UC2owL6ArgDuCKabgBxuJRGZSmpko,41259
pip/_vendor/distlib/database.py,sha256=o_mw0fAr93NDAHHHfqG54Y1Hi9Rkfrp2BX15XWZYK50,51697
pip/_vendor/distlib/index.py,sha256=HFiDG7LMoaBs829WuotrfIwcErOOExUOR_AeBtw_TCU,20834
pip/_vendor/distlib/locators.py,sha256=wNzG-zERzS_XGls-nBPVVyLRHa2skUlkn0-5n0trMWA,51991
pip/_vendor/distlib/manifest.py,sha256=nQEhYmgoreaBZzyFzwYsXxJARu3fo4EkunU163U16iE,14811
pip/_vendor/distlib/markers.py,sha256=TpHHHLgkzyT7YHbwj-2i6weRaq-Ivy2-MUnrDkjau-U,5058
pip/_vendor/distlib/metadata.py,sha256=g_DIiu8nBXRzA-mWPRpatHGbmFZqaFoss7z9TG7QSUU,39801
pip/_vendor/distlib/resources.py,sha256=LwbPksc0A1JMbi6XnuPdMBUn83X7BPuFNWqPGEKI698,10820
pip/_vendor/distlib/scripts.py,sha256=BmkTKmiTk4m2cj-iueliatwz3ut_9SsABBW51vnQnZU,18102
pip/_vendor/distlib/util.py,sha256=31dPXn3Rfat0xZLeVoFpuniyhe6vsbl9_QN-qd9Lhlk,66262
pip/_vendor/distlib/version.py,sha256=WG__LyAa2GwmA6qSoEJtvJE8REA1LZpbSizy8WvhJLk,23513
pip/_vendor/distlib/wheel.py,sha256=Rgqs658VsJ3R2845qwnZD8XQryV2CzWw2mghwLvxxsI,43898
pip/_vendor/distro/__init__.py,sha256=2fHjF-SfgPvjyNZ1iHh_wjqWdR_Yo5ODHwZC0jLBPhc,981
pip/_vendor/distro/__main__.py,sha256=bu9d3TifoKciZFcqRBuygV3GSuThnVD_m2IK4cz96Vs,64
pip/_vendor/distro/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/distro/__pycache__/__main__.cpython-312.pyc,,
pip/_vendor/distro/__pycache__/distro.cpython-312.pyc,,
pip/_vendor/distro/distro.py,sha256=UZO1LjIhtFCMdlbiz39gj3raV-Amf3SBwzGzfApiMHw,49330
pip/_vendor/distro/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/idna/__init__.py,sha256=KJQN1eQBr8iIK5SKrJ47lXvxG0BJ7Lm38W4zT0v_8lk,849
pip/_vendor/idna/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/idna/__pycache__/codec.cpython-312.pyc,,
pip/_vendor/idna/__pycache__/compat.cpython-312.pyc,,
pip/_vendor/idna/__pycache__/core.cpython-312.pyc,,
pip/_vendor/idna/__pycache__/idnadata.cpython-312.pyc,,
pip/_vendor/idna/__pycache__/intranges.cpython-312.pyc,,
pip/_vendor/idna/__pycache__/package_data.cpython-312.pyc,,
pip/_vendor/idna/__pycache__/uts46data.cpython-312.pyc,,
pip/_vendor/idna/codec.py,sha256=6ly5odKfqrytKT9_7UrlGklHnf1DSK2r9C6cSM4sa28,3374
pip/_vendor/idna/compat.py,sha256=0_sOEUMT4CVw9doD3vyRhX80X19PwqFoUBs7gWsFME4,321
pip/_vendor/idna/core.py,sha256=1JxchwKzkxBSn7R_oCE12oBu3eVux0VzdxolmIad24M,12950
pip/_vendor/idna/idnadata.py,sha256=xUjqKqiJV8Ho_XzBpAtv5JFoVPSupK-SUXvtjygUHqw,44375
pip/_vendor/idna/intranges.py,sha256=YBr4fRYuWH7kTKS2tXlFjM24ZF1Pdvcir-aywniInqg,1881
pip/_vendor/idna/package_data.py,sha256=C_jHJzmX8PI4xq0jpzmcTMxpb5lDsq4o5VyxQzlVrZE,21
pip/_vendor/idna/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/idna/uts46data.py,sha256=zvjZU24s58_uAS850Mcd0NnD0X7_gCMAMjzWNIeUJdc,206539
pip/_vendor/msgpack.pyi,sha256=LGihZLiPGbuCbL-HBl3TdFrv-98bjZAxzu0oSEotWh0,21
pip/_vendor/msgpack/__init__.py,sha256=hyGhlnmcJkxryJBKC3X5FnEph375kQoL_mG8LZUuXgY,1132
pip/_vendor/msgpack/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/msgpack/__pycache__/exceptions.cpython-312.pyc,,
pip/_vendor/msgpack/__pycache__/ext.cpython-312.pyc,,
pip/_vendor/msgpack/__pycache__/fallback.cpython-312.pyc,,
pip/_vendor/msgpack/exceptions.py,sha256=dCTWei8dpkrMsQDcjQk74ATl9HsIBH0ybt8zOPNqMYc,1081
pip/_vendor/msgpack/ext.py,sha256=C5MK8JhVYGYFWPvxsORsqZAnvOXefYQ57m1Ym0luW5M,6079
pip/_vendor/msgpack/fallback.py,sha256=tvNBHyxxFbuVlC8GZShETClJxjLiDMOja4XwwyvNm2g,34544
pip/_vendor/packaging/__about__.py,sha256=ugASIO2w1oUyH8_COqQ2X_s0rDhjbhQC3yJocD03h2c,661
pip/_vendor/packaging/__init__.py,sha256=b9Kk5MF7KxhhLgcDmiUWukN-LatWFxPdNug0joPhHSk,497
pip/_vendor/packaging/__pycache__/__about__.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/_structures.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/markers.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/requirements.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/tags.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/utils.cpython-312.pyc,,
pip/_vendor/packaging/__pycache__/version.cpython-312.pyc,,
pip/_vendor/packaging/_manylinux.py,sha256=XcbiXB-qcjv3bcohp6N98TMpOP4_j3m-iOA8ptK2GWY,11488
pip/_vendor/packaging/_musllinux.py,sha256=_KGgY_qc7vhMGpoqss25n2hiLCNKRtvz9mCrS7gkqyc,4378
pip/_vendor/packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431
pip/_vendor/packaging/markers.py,sha256=AJBOcY8Oq0kYc570KuuPTkvuqjAlhufaE2c9sCUbm64,8487
pip/_vendor/packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/packaging/requirements.py,sha256=NtDlPBtojpn1IUC85iMjPNsUmufjpSlwnNA-Xb4m5NA,4676
pip/_vendor/packaging/specifiers.py,sha256=LRQ0kFsHrl5qfcFNEEJrIFYsnIHQUJXY9fIsakTrrqE,30110
pip/_vendor/packaging/tags.py,sha256=lmsnGNiJ8C4D_Pf9PbM0qgbZvD9kmB9lpZBQUZa3R_Y,15699
pip/_vendor/packaging/utils.py,sha256=dJjeat3BS-TYn1RrUFVwufUMasbtzLfYRoy_HXENeFQ,4200
pip/_vendor/packaging/version.py,sha256=AOLsewGcHCskMRdz2ykO3Gv7U7YZwgzE5Pj9ifjd6S8,14479
pip/_vendor/pkg_resources.pyi,sha256=V05N22qNUcvu9AZPw6CfM7ld7sm1kvwcJG9dIm-VuWQ,27
pip/_vendor/pkg_resources/__init__.py,sha256=hTAeJCNYb7dJseIDVsYK3mPQep_gphj4tQh-bspX8bg,109364
pip/_vendor/pkg_resources/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/platformdirs/__init__.py,sha256=SkhEYVyC_HUHC6KX7n4M_6coyRMtEB38QMyOYIAX6Yk,20155
pip/_vendor/platformdirs/__main__.py,sha256=fVvSiTzr2-RM6IsjWjj4fkaOtDOgDhUWv6sA99do4CQ,1476
pip/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc,,
pip/_vendor/platformdirs/__pycache__/android.cpython-312.pyc,,
pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc,,
pip/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc,,
pip/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc,,
pip/_vendor/platformdirs/__pycache__/version.cpython-312.pyc,,
pip/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc,,
pip/_vendor/platformdirs/android.py,sha256=y_EEMKwYl2-bzYBDovksSn8m76on0Lda8eyJksVQE9U,7211
pip/_vendor/platformdirs/api.py,sha256=jWtX06jAJytYrkJDOqEls97mCkyHRSZkoqUlbMK5Qew,7132
pip/_vendor/platformdirs/macos.py,sha256=LueVOoVgGWDBwQb8OFwXkVKfVn33CM1Lkwf1-A86tRQ,3678
pip/_vendor/platformdirs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/platformdirs/unix.py,sha256=22JhR8ZY0aLxSVCFnKrc6f1iz6Gv42K24Daj7aTjfSg,8809
pip/_vendor/platformdirs/version.py,sha256=mavZTQIJIXfdewEaSTn7EWrNfPZWeRofb-74xqW5f2M,160
pip/_vendor/platformdirs/windows.py,sha256=4TtbPGoWG2PRgI11uquDa7eRk8TcxvnUNuuMGZItnXc,9573
pip/_vendor/pygments.pyi,sha256=igKR64uiY7H36sba0OCu6nLV8aytWE-r9gG-xRRQZ6E,22
pip/_vendor/pygments/__init__.py,sha256=6AuDljQtvf89DTNUyWM7k3oUlP_lq70NU-INKKteOBY,2983
pip/_vendor/pygments/__main__.py,sha256=es8EKMvXj5yToIfQ-pf3Dv5TnIeeM6sME0LW-n4ecHo,353
pip/_vendor/pygments/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/__main__.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/cmdline.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/console.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/filter.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/formatter.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/lexer.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/modeline.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/plugin.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/regexopt.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/scanner.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/sphinxext.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/style.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/token.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/unistring.cpython-312.pyc,,
pip/_vendor/pygments/__pycache__/util.cpython-312.pyc,,
pip/_vendor/pygments/cmdline.py,sha256=byxYJp9gnjVeyhRlZ3UTMgo_LhkXh1afvN8wJBtAcc8,23685
pip/_vendor/pygments/console.py,sha256=2wZ5W-U6TudJD1_NLUwjclMpbomFM91lNv11_60sfGY,1697
pip/_vendor/pygments/filter.py,sha256=j5aLM9a9wSx6eH1oy473oSkJ02hGWNptBlVo4s1g_30,1938
pip/_vendor/pygments/filters/__init__.py,sha256=h_koYkUFo-FFUxjs564JHUAz7O3yJpVwI6fKN3MYzG0,40386
pip/_vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pygments/formatter.py,sha256=J9OL9hXLJKZk7moUgKwpjW9HNf4WlJFg_o_-Z_S_tTY,4178
pip/_vendor/pygments/formatters/__init__.py,sha256=_xgAcdFKr0QNYwh_i98AU9hvfP3X2wAkhElFcRRF3Uo,5424
pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/bbcode.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/groff.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/html.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/img.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/irc.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/latex.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/other.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/pangomarkup.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/svg.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-312.pyc,,
pip/_vendor/pygments/formatters/__pycache__/terminal256.cpython-312.pyc,,
pip/_vendor/pygments/formatters/_mapping.py,sha256=1Cw37FuQlNacnxRKmtlPX4nyLoX9_ttko5ZwscNUZZ4,4176
pip/_vendor/pygments/formatters/bbcode.py,sha256=r1b7wzWTJouADDLh-Z11iRi4iQxD0JKJ1qHl6mOYxsA,3314
pip/_vendor/pygments/formatters/groff.py,sha256=xy8Zf3tXOo6MWrXh7yPGWx3lVEkg_DhY4CxmsDb0IVo,5094
pip/_vendor/pygments/formatters/html.py,sha256=PIzAyilNqaTzSSP2slDG2VDLE3qNioWy2rgtSSoviuI,35610
pip/_vendor/pygments/formatters/img.py,sha256=XKXmg2_XONrR4mtq2jfEU8XCsoln3VSGTw-UYiEokys,21938
pip/_vendor/pygments/formatters/irc.py,sha256=Ep-m8jd3voFO6Fv57cUGFmz6JVA67IEgyiBOwv0N4a0,4981
pip/_vendor/pygments/formatters/latex.py,sha256=FGzJ-YqSTE8z_voWPdzvLY5Tq8jE_ygjGjM6dXZJ8-k,19351
pip/_vendor/pygments/formatters/other.py,sha256=gPxkk5BdAzWTCgbEHg1lpLi-1F6ZPh5A_aotgLXHnzg,5073
pip/_vendor/pygments/formatters/pangomarkup.py,sha256=6LKnQc8yh49f802bF0sPvbzck4QivMYqqoXAPaYP8uU,2212
pip/_vendor/pygments/formatters/rtf.py,sha256=aA0v_psW6KZI3N18TKDifxeL6mcF8EDXcPXDWI4vhVQ,5014
pip/_vendor/pygments/formatters/svg.py,sha256=dQONWypbzfvzGCDtdp3M_NJawScJvM2DiHbx1k-ww7g,7335
pip/_vendor/pygments/formatters/terminal.py,sha256=FG-rpjRpFmNpiGB4NzIucvxq6sQIXB3HOTo2meTKtrU,4674
pip/_vendor/pygments/formatters/terminal256.py,sha256=13SJ3D5pFdqZ9zROE6HbWnBDwHvOGE8GlsmqGhprRp4,11753
pip/_vendor/pygments/lexer.py,sha256=2BpqLlT2ExvOOi7vnjK5nB4Fp-m52ldiPaXMox5uwug,34618
pip/_vendor/pygments/lexers/__init__.py,sha256=j5KEi5O_VQ5GS59H49l-10gzUOkWKxlwGeVMlGO2MMk,12130
pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-312.pyc,,
pip/_vendor/pygments/lexers/__pycache__/python.cpython-312.pyc,,
pip/_vendor/pygments/lexers/_mapping.py,sha256=Hts4r_ZQ8icftGM7gkBPeED5lyVSv4affFgXYE6Ap04,72281
pip/_vendor/pygments/lexers/python.py,sha256=c7jnmKFU9DLxTJW0UbwXt6Z9FJqbBlVsWA1Qr9xSA_w,53424
pip/_vendor/pygments/modeline.py,sha256=eF2vO4LpOGoPvIKKkbPfnyut8hT4UiebZPpb-BYGQdI,986
pip/_vendor/pygments/plugin.py,sha256=j1Fh310RbV2DQ9nvkmkqvlj38gdyuYKllLnGxbc8sJM,2591
pip/_vendor/pygments/regexopt.py,sha256=jg1ALogcYGU96TQS9isBl6dCrvw5y5--BP_K-uFk_8s,3072
pip/_vendor/pygments/scanner.py,sha256=b_nu5_f3HCgSdp5S_aNRBQ1MSCm4ZjDwec2OmTRickw,3092
pip/_vendor/pygments/sphinxext.py,sha256=wBFYm180qea9JKt__UzhRlNRNhczPDFDaqGD21sbuso,6882
pip/_vendor/pygments/style.py,sha256=C4qyoJrUTkq-OV3iO-8Vz3UtWYpJwSTdh5_vlGCGdNQ,6257
pip/_vendor/pygments/styles/__init__.py,sha256=he7HjQx7sC0d2kfTVLjUs0J15mtToJM6M1brwIm9--Q,3700
pip/_vendor/pygments/styles/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pygments/token.py,sha256=seNsmcch9OEHXYirh8Ool7w8xDhfNTbLj5rHAC-gc_o,6184
pip/_vendor/pygments/unistring.py,sha256=FaUfG14NBJEKLQoY9qj6JYeXrpYcLmKulghdxOGFaOc,63223
pip/_vendor/pygments/util.py,sha256=AEVY0qonyyEMgv4Do2dINrrqUAwUk2XYSqHM650uzek,10230
pip/_vendor/pyparsing/__init__.py,sha256=9m1JbE2JTLdBG0Mb6B0lEaZj181Wx5cuPXZpsbHEYgE,9116
pip/_vendor/pyparsing/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/actions.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/common.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/core.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/exceptions.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/helpers.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/results.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/testing.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/unicode.cpython-312.pyc,,
pip/_vendor/pyparsing/__pycache__/util.cpython-312.pyc,,
pip/_vendor/pyparsing/actions.py,sha256=05uaIPOznJPQ7VgRdmGCmG4sDnUPtwgv5qOYIqbL2UY,6567
pip/_vendor/pyparsing/common.py,sha256=p-3c83E5-DjlkF35G0O9-kjQRpoejP-2_z0hxZ-eol4,13387
pip/_vendor/pyparsing/core.py,sha256=yvuRlLpXSF8mgk-QhiW3OVLqD9T0rsj9tbibhRH4Yaw,224445
pip/_vendor/pyparsing/diagram/__init__.py,sha256=nxmDOoYF9NXuLaGYy01tKFjkNReWJlrGFuJNWEiTo84,24215
pip/_vendor/pyparsing/diagram/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pyparsing/exceptions.py,sha256=6Jc6W1eDZBzyFu1J0YrcdNFVBC-RINujZmveSnB8Rxw,9523
pip/_vendor/pyparsing/helpers.py,sha256=BZJHCA8SS0pYio30KGQTc9w2qMOaK4YpZ7hcvHbnTgk,38646
pip/_vendor/pyparsing/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/pyparsing/results.py,sha256=9dyqQ-w3MjfmxWbFt8KEPU6IfXeyRdoWp2Og802rUQY,26692
pip/_vendor/pyparsing/testing.py,sha256=eJncg0p83zm1FTPvM9auNT6oavIvXaibmRFDf1qmwkY,13488
pip/_vendor/pyparsing/unicode.py,sha256=fAPdsJiARFbkPAih6NkYry0dpj4jPqelGVMlE4wWFW8,10646
pip/_vendor/pyparsing/util.py,sha256=vTMzTdwSDyV8d_dSgquUTdWgBFoA_W30nfxEJDsshRQ,8670
pip/_vendor/pyproject_hooks.pyi,sha256=c-rItImZyF9aKP6g6WeAHVhtFNSv8nSoaJgmhXd4thQ,29
pip/_vendor/pyproject_hooks/__init__.py,sha256=kCehmy0UaBa9oVMD7ZIZrnswfnP3LXZ5lvnNJAL5JBM,491
pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pyproject_hooks/__pycache__/_compat.cpython-312.pyc,,
pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-312.pyc,,
pip/_vendor/pyproject_hooks/_compat.py,sha256=by6evrYnqkisiM-MQcvOKs5bgDMzlOSgZqRHNqf04zE,138
pip/_vendor/pyproject_hooks/_impl.py,sha256=61GJxzQip0IInhuO69ZI5GbNQ82XEDUB_1Gg5_KtUoc,11920
pip/_vendor/pyproject_hooks/_in_process/__init__.py,sha256=9gQATptbFkelkIy0OfWFEACzqxXJMQDWCH9rBOAZVwQ,546
pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-312.pyc,,
pip/_vendor/pyproject_hooks/_in_process/_in_process.py,sha256=m2b34c917IW5o-Q_6TYIHlsK9lSUlNiyrITTUH_zwew,10927
pip/_vendor/requests.pyi,sha256=-pi-p9FsFmT6p_n66osl1atfHzkHn3cruhS1K3YoeMk,22
pip/_vendor/requests/__init__.py,sha256=owujob4dk45Siy4EYtbCKR6wcFph7E04a_v_OuAacBA,5169
pip/_vendor/requests/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/__version__.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/_internal_utils.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/adapters.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/api.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/auth.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/certs.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/compat.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/cookies.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/exceptions.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/help.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/hooks.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/models.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/packages.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/sessions.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/status_codes.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/structures.cpython-312.pyc,,
pip/_vendor/requests/__pycache__/utils.cpython-312.pyc,,
pip/_vendor/requests/__version__.py,sha256=ssI3Ezt7PaxgkOW45GhtwPUclo_SO_ygtIm4A74IOfw,435
pip/_vendor/requests/_internal_utils.py,sha256=nMQymr4hs32TqVo5AbCrmcJEhvPUh7xXlluyqwslLiQ,1495
pip/_vendor/requests/adapters.py,sha256=idj6cZcId3L5xNNeJ7ieOLtw3awJk5A64xUfetHwq3M,19697
pip/_vendor/requests/api.py,sha256=q61xcXq4tmiImrvcSVLTbFyCiD2F-L_-hWKGbz4y8vg,6449
pip/_vendor/requests/auth.py,sha256=h-HLlVx9j8rKV5hfSAycP2ApOSglTz77R0tz7qCbbEE,10187
pip/_vendor/requests/certs.py,sha256=PVPooB0jP5hkZEULSCwC074532UFbR2Ptgu0I5zwmCs,575
pip/_vendor/requests/compat.py,sha256=IhK9quyX0RRuWTNcg6d2JGSAOUbM6mym2p_2XjLTwf4,1286
pip/_vendor/requests/cookies.py,sha256=kD3kNEcCj-mxbtf5fJsSaT86eGoEYpD3X0CSgpzl7BM,18560
pip/_vendor/requests/exceptions.py,sha256=FA-_kVwBZ2jhXauRctN_ewHVK25b-fj0Azyz1THQ0Kk,3823
pip/_vendor/requests/help.py,sha256=FnAAklv8MGm_qb2UilDQgS6l0cUttiCFKUjx0zn2XNA,3879
pip/_vendor/requests/hooks.py,sha256=CiuysiHA39V5UfcCBXFIx83IrDpuwfN9RcTUgv28ftQ,733
pip/_vendor/requests/models.py,sha256=dDZ-iThotky-Noq9yy97cUEJhr3wnY6mv-xR_ePg_lk,35288
pip/_vendor/requests/packages.py,sha256=njJmVifY4aSctuW3PP5EFRCxjEwMRDO6J_feG2dKWsI,695
pip/_vendor/requests/sessions.py,sha256=-LvTzrPtetSTrR3buxu4XhdgMrJFLB1q5D7P--L2Xhw,30373
pip/_vendor/requests/status_codes.py,sha256=FvHmT5uH-_uimtRz5hH9VCbt7VV-Nei2J9upbej6j8g,4235
pip/_vendor/requests/structures.py,sha256=-IbmhVz06S-5aPSZuUthZ6-6D9XOjRuTXHOabY041XM,2912
pip/_vendor/requests/utils.py,sha256=kOPn0qYD6xRTzaxbqTdYiSInBZHl6379AJsyIgzYGLY,33460
pip/_vendor/resolvelib/__init__.py,sha256=h509TdEcpb5-44JonaU3ex2TM15GVBLjM9CNCPwnTTs,537
pip/_vendor/resolvelib/__init__.pyi,sha256=YxnZt4n4JqCtmCjUG10r-neBcf458mnAJu4ECwZwURE,564
pip/_vendor/resolvelib/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/resolvelib/__pycache__/providers.cpython-312.pyc,,
pip/_vendor/resolvelib/__pycache__/reporters.cpython-312.pyc,,
pip/_vendor/resolvelib/__pycache__/resolvers.cpython-312.pyc,,
pip/_vendor/resolvelib/__pycache__/structs.cpython-312.pyc,,
pip/_vendor/resolvelib/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/resolvelib/compat/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/resolvelib/compat/__pycache__/collections_abc.cpython-312.pyc,,
pip/_vendor/resolvelib/compat/collections_abc.py,sha256=uy8xUZ-NDEw916tugUXm8HgwCGiMO0f-RcdnpkfXfOs,156
pip/_vendor/resolvelib/compat/collections_abc.pyi,sha256=Jd_BiylBxNC88bLJD-lX4pLRlkx5s9kZtSiOOG7GZ6w,46
pip/_vendor/resolvelib/providers.py,sha256=fuuvVrCetu5gsxPB43ERyjfO8aReS3rFQHpDgiItbs4,5871
pip/_vendor/resolvelib/providers.pyi,sha256=yW_vIn8k-Z9mm1uPX_WhJ8ZF6rpi0538OVBBrXkOR8k,1343
pip/_vendor/resolvelib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/resolvelib/reporters.py,sha256=TSbRmWzTc26w0ggsV1bxVpeWDB8QNIre6twYl7GIZBE,1601
pip/_vendor/resolvelib/reporters.pyi,sha256=WOfjSeEqKVh8iagF6ATtGxjKKdTMgB89EpFihlRBco8,503
pip/_vendor/resolvelib/resolvers.py,sha256=G8rsLZSq64g5VmIq-lB7UcIJ1gjAxIQJmTF4REZleQ0,20511
pip/_vendor/resolvelib/resolvers.pyi,sha256=6v-ClNWqfQk6wGMo6PaOUKJekuxfdMljz0ixOP74BHI,2490
pip/_vendor/resolvelib/structs.py,sha256=0_1_XO8z_CLhegP3Vpf9VJ3zJcfLm0NOHRM-i0Ykz3o,4963
pip/_vendor/resolvelib/structs.pyi,sha256=R5adjFpLfgMdklQ8jYqJa6vCbKZeJWaIaFZxx-xhdaY,1121
pip/_vendor/rich/__init__.py,sha256=dRxjIL-SbFVY0q3IjSMrfgBTHrm1LZDgLOygVBwiYZc,6090
pip/_vendor/rich/__main__.py,sha256=TT8sb9PTnsnKhhrGuHkLN0jdN0dtKhtPkEr9CidDbPM,8478
pip/_vendor/rich/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/__main__.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_cell_widths.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_emoji_codes.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_emoji_replace.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_export_format.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_extension.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_fileno.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_inspect.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_log_render.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_loop.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_null_file.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_palettes.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_pick.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_ratio.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_spinners.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_stack.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_timer.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_win32_console.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_windows.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_windows_renderer.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/_wrap.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/abc.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/align.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/ansi.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/bar.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/box.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/cells.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/color.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/color_triplet.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/columns.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/console.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/constrain.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/containers.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/control.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/default_styles.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/diagnose.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/emoji.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/errors.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/file_proxy.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/filesize.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/highlighter.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/json.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/jupyter.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/layout.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/live.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/live_render.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/logging.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/markup.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/measure.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/padding.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/pager.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/palette.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/panel.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/pretty.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/progress.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/progress_bar.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/prompt.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/protocol.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/region.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/repr.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/rule.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/scope.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/screen.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/segment.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/spinner.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/status.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/style.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/styled.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/syntax.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/table.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/terminal_theme.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/text.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/theme.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/themes.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/traceback.cpython-312.pyc,,
pip/_vendor/rich/__pycache__/tree.cpython-312.pyc,,
pip/_vendor/rich/_cell_widths.py,sha256=2n4EiJi3X9sqIq0O16kUZ_zy6UYMd3xFfChlKfnW1Hc,10096
pip/_vendor/rich/_emoji_codes.py,sha256=hu1VL9nbVdppJrVoijVshRlcRRe_v3dju3Mmd2sKZdY,140235
pip/_vendor/rich/_emoji_replace.py,sha256=n-kcetsEUx2ZUmhQrfeMNc-teeGhpuSQ5F8VPBsyvDo,1064
pip/_vendor/rich/_export_format.py,sha256=qxgV3nKnXQu1hfbnRVswPYy-AwIg1X0LSC47cK5s8jk,2100
pip/_vendor/rich/_extension.py,sha256=Xt47QacCKwYruzjDi-gOBq724JReDj9Cm9xUi5fr-34,265
pip/_vendor/rich/_fileno.py,sha256=HWZxP5C2ajMbHryvAQZseflVfQoGzsKOHzKGsLD8ynQ,799
pip/_vendor/rich/_inspect.py,sha256=oZJGw31e64dwXSCmrDnvZbwVb1ZKhWfU8wI3VWohjJk,9695
pip/_vendor/rich/_log_render.py,sha256=1ByI0PA1ZpxZY3CGJOK54hjlq4X-Bz_boIjIqCd8Kns,3225
pip/_vendor/rich/_loop.py,sha256=hV_6CLdoPm0va22Wpw4zKqM0RYsz3TZxXj0PoS-9eDQ,1236
pip/_vendor/rich/_null_file.py,sha256=tGSXk_v-IZmbj1GAzHit8A3kYIQMiCpVsCFfsC-_KJ4,1387
pip/_vendor/rich/_palettes.py,sha256=cdev1JQKZ0JvlguV9ipHgznTdnvlIzUFDBb0It2PzjI,7063
pip/_vendor/rich/_pick.py,sha256=evDt8QN4lF5CiwrUIXlOJCntitBCOsI3ZLPEIAVRLJU,423
pip/_vendor/rich/_ratio.py,sha256=2lLSliL025Y-YMfdfGbutkQDevhcyDqc-DtUYW9mU70,5472
pip/_vendor/rich/_spinners.py,sha256=U2r1_g_1zSjsjiUdAESc2iAMc3i4ri_S8PYP6kQ5z1I,19919
pip/_vendor/rich/_stack.py,sha256=-C8OK7rxn3sIUdVwxZBBpeHhIzX0eI-VM3MemYfaXm0,351
pip/_vendor/rich/_timer.py,sha256=zelxbT6oPFZnNrwWPpc1ktUeAT-Vc4fuFcRZLQGLtMI,417
pip/_vendor/rich/_win32_console.py,sha256=P0vxI2fcndym1UU1S37XAzQzQnkyY7YqAKmxm24_gug,22820
pip/_vendor/rich/_windows.py,sha256=dvNl9TmfPzNVxiKk5WDFihErZ5796g2UC9-KGGyfXmk,1926
pip/_vendor/rich/_windows_renderer.py,sha256=t74ZL3xuDCP3nmTp9pH1L5LiI2cakJuQRQleHCJerlk,2783
pip/_vendor/rich/_wrap.py,sha256=xfV_9t0Sg6rzimmrDru8fCVmUlalYAcHLDfrJZnbbwQ,1840
pip/_vendor/rich/abc.py,sha256=ON-E-ZqSSheZ88VrKX2M3PXpFbGEUUZPMa_Af0l-4f0,890
pip/_vendor/rich/align.py,sha256=Ji-Yokfkhnfe_xMmr4ISjZB07TJXggBCOYoYa-HDAr8,10368
pip/_vendor/rich/ansi.py,sha256=iD6532QYqnBm6hADulKjrV8l8kFJ-9fEVooHJHH3hMg,6906
pip/_vendor/rich/bar.py,sha256=a7UD303BccRCrEhGjfMElpv5RFYIinaAhAuqYqhUvmw,3264
pip/_vendor/rich/box.py,sha256=FJ6nI3jD7h2XNFU138bJUt2HYmWOlRbltoCEuIAZhew,9842
pip/_vendor/rich/cells.py,sha256=627ztJs9zOL-38HJ7kXBerR-gT8KBfYC8UzEwMJDYYo,4509
pip/_vendor/rich/color.py,sha256=9Gh958U3f75WVdLTeC0U9nkGTn2n0wnojKpJ6jQEkIE,18224
pip/_vendor/rich/color_triplet.py,sha256=3lhQkdJbvWPoLDO-AnYImAWmJvV5dlgYNCVZ97ORaN4,1054
pip/_vendor/rich/columns.py,sha256=HUX0KcMm9dsKNi11fTbiM_h2iDtl8ySCaVcxlalEzq8,7131
pip/_vendor/rich/console.py,sha256=pDvkbLkvtZIMIwQx_jkZ-seyNl4zGBLviXoWXte9fwg,99218
pip/_vendor/rich/constrain.py,sha256=1VIPuC8AgtKWrcncQrjBdYqA3JVWysu6jZo1rrh7c7Q,1288
pip/_vendor/rich/containers.py,sha256=aKgm5UDHn5Nmui6IJaKdsZhbHClh_X7D-_Wg8Ehrr7s,5497
pip/_vendor/rich/control.py,sha256=DSkHTUQLorfSERAKE_oTAEUFefZnZp4bQb4q8rHbKws,6630
pip/_vendor/rich/default_styles.py,sha256=-Fe318kMVI_IwciK5POpThcO0-9DYJ67TZAN6DlmlmM,8082
pip/_vendor/rich/diagnose.py,sha256=an6uouwhKPAlvQhYpNNpGq9EJysfMIOvvCbO3oSoR24,972
pip/_vendor/rich/emoji.py,sha256=omTF9asaAnsM4yLY94eR_9dgRRSm1lHUszX20D1yYCQ,2501
pip/_vendor/rich/errors.py,sha256=5pP3Kc5d4QJ_c0KFsxrfyhjiPVe7J1zOqSFbFAzcV-Y,642
pip/_vendor/rich/file_proxy.py,sha256=Tl9THMDZ-Pk5Wm8sI1gGg_U5DhusmxD-FZ0fUbcU0W0,1683
pip/_vendor/rich/filesize.py,sha256=9fTLAPCAwHmBXdRv7KZU194jSgNrRb6Wx7RIoBgqeKY,2508
pip/_vendor/rich/highlighter.py,sha256=p3C1g4QYzezFKdR7NF9EhPbzQDvdPUhGRgSyGGEmPko,9584
pip/_vendor/rich/json.py,sha256=EYp9ucj-nDjYDkHCV6Mk1ve8nUOpuFLaW76X50Mis2M,5032
pip/_vendor/rich/jupyter.py,sha256=QyoKoE_8IdCbrtiSHp9TsTSNyTHY0FO5whE7jOTd9UE,3252
pip/_vendor/rich/layout.py,sha256=RFYL6HdCFsHf9WRpcvi3w-fpj-8O5dMZ8W96VdKNdbI,14007
pip/_vendor/rich/live.py,sha256=vZzYvu7fqwlv3Gthl2xiw1Dc_O80VlGcCV0DOHwCyDM,14273
pip/_vendor/rich/live_render.py,sha256=zElm3PrfSIvjOce28zETHMIUf9pFYSUA5o0AflgUP64,3667
pip/_vendor/rich/logging.py,sha256=uB-cB-3Q4bmXDLLpbOWkmFviw-Fde39zyMV6tKJ2WHQ,11903
pip/_vendor/rich/markup.py,sha256=xzF4uAafiEeEYDJYt_vUnJOGoTU8RrH-PH7WcWYXjCg,8198
pip/_vendor/rich/measure.py,sha256=HmrIJX8sWRTHbgh8MxEay_83VkqNW_70s8aKP5ZcYI8,5305
pip/_vendor/rich/padding.py,sha256=kTFGsdGe0os7tXLnHKpwTI90CXEvrceeZGCshmJy5zw,4970
pip/_vendor/rich/pager.py,sha256=SO_ETBFKbg3n_AgOzXm41Sv36YxXAyI3_R-KOY2_uSc,828
pip/_vendor/rich/palette.py,sha256=lInvR1ODDT2f3UZMfL1grq7dY_pDdKHw4bdUgOGaM4Y,3396
pip/_vendor/rich/panel.py,sha256=wGMe40J8KCGgQoM0LyjRErmGIkv2bsYA71RCXThD0xE,10574
pip/_vendor/rich/pretty.py,sha256=eLEYN9xVaMNuA6EJVYm4li7HdOHxCqmVKvnOqJpyFt0,35852
pip/_vendor/rich/progress.py,sha256=n4KF9vky8_5iYeXcyZPEvzyLplWlDvFLkM5JI0Bs08A,59706
pip/_vendor/rich/progress_bar.py,sha256=cEoBfkc3lLwqba4XKsUpy4vSQKDh2QQ5J2J94-ACFoo,8165
pip/_vendor/rich/prompt.py,sha256=x0mW-pIPodJM4ry6grgmmLrl8VZp99kqcmdnBe70YYA,11303
pip/_vendor/rich/protocol.py,sha256=5hHHDDNHckdk8iWH5zEbi-zuIVSF5hbU2jIo47R7lTE,1391
pip/_vendor/rich/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/rich/region.py,sha256=rNT9xZrVZTYIXZC0NYn41CJQwYNbR-KecPOxTgQvB8Y,166
pip/_vendor/rich/repr.py,sha256=9Z8otOmM-tyxnyTodvXlectP60lwahjGiDTrbrxPSTg,4431
pip/_vendor/rich/rule.py,sha256=0fNaS_aERa3UMRc3T5WMpN_sumtDxfaor2y3of1ftBk,4602
pip/_vendor/rich/scope.py,sha256=TMUU8qo17thyqQCPqjDLYpg_UU1k5qVd-WwiJvnJVas,2843
pip/_vendor/rich/screen.py,sha256=YoeReESUhx74grqb0mSSb9lghhysWmFHYhsbMVQjXO8,1591
pip/_vendor/rich/segment.py,sha256=XLnJEFvcV3bjaVzMNUJiem3n8lvvI9TJ5PTu-IG2uTg,24247
pip/_vendor/rich/spinner.py,sha256=15koCmF0DQeD8-k28Lpt6X_zJQUlzEhgo_6A6uy47lc,4339
pip/_vendor/rich/status.py,sha256=gJsIXIZeSo3urOyxRUjs6VrhX5CZrA0NxIQ-dxhCnwo,4425
pip/_vendor/rich/style.py,sha256=3hiocH_4N8vwRm3-8yFWzM7tSwjjEven69XqWasSQwM,27073
pip/_vendor/rich/styled.py,sha256=eZNnzGrI4ki_54pgY3Oj0T-x3lxdXTYh4_ryDB24wBU,1258
pip/_vendor/rich/syntax.py,sha256=jgDiVCK6cpR0NmBOpZmIu-Ud4eaW7fHvjJZkDbjpcSA,35173
pip/_vendor/rich/table.py,sha256=-WzesL-VJKsaiDU3uyczpJMHy6VCaSewBYJwx8RudI8,39684
pip/_vendor/rich/terminal_theme.py,sha256=1j5-ufJfnvlAo5Qsi_ACZiXDmwMXzqgmFByObT9-yJY,3370
pip/_vendor/rich/text.py,sha256=_8JBlSau0c2z8ENOZMi1hJ7M1ZGY408E4-hXjHyyg1A,45525
pip/_vendor/rich/theme.py,sha256=belFJogzA0W0HysQabKaHOc3RWH2ko3fQAJhoN-AFdo,3777
pip/_vendor/rich/themes.py,sha256=0xgTLozfabebYtcJtDdC5QkX5IVUEaviqDUJJh4YVFk,102
pip/_vendor/rich/traceback.py,sha256=yCLVrCtyoFNENd9mkm2xeG3KmqkTwH9xpFOO7p2Bq0A,29604
pip/_vendor/rich/tree.py,sha256=BMbUYNjS9uodNPfvtY_odmU09GA5QzcMbQ5cJZhllQI,9169
pip/_vendor/six.py,sha256=TOOfQi7nFGfMrIvtdr6wX4wyHH8M7aknmuLfo2cBBrM,34549
pip/_vendor/tenacity/__init__.py,sha256=3kvAL6KClq8GFo2KFhmOzskRKSDQI-ubrlfZ8AQEEI0,20493
pip/_vendor/tenacity/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/_asyncio.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/_utils.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/after.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/before.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/before_sleep.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/nap.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/retry.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/stop.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/tornadoweb.cpython-312.pyc,,
pip/_vendor/tenacity/__pycache__/wait.cpython-312.pyc,,
pip/_vendor/tenacity/_asyncio.py,sha256=Qi6wgQsGa9MQibYRy3OXqcDQswIZZ00dLOoSUGN-6o8,3551
pip/_vendor/tenacity/_utils.py,sha256=ubs6a7sxj3JDNRKWCyCU2j5r1CB7rgyONgZzYZq6D_4,2179
pip/_vendor/tenacity/after.py,sha256=S5NCISScPeIrKwIeXRwdJl3kV9Q4nqZfnNPDx6Hf__g,1682
pip/_vendor/tenacity/before.py,sha256=dIZE9gmBTffisfwNkK0F1xFwGPV41u5GK70UY4Pi5Kc,1562
pip/_vendor/tenacity/before_sleep.py,sha256=YmpgN9Y7HGlH97U24vvq_YWb5deaK4_DbiD8ZuFmy-E,2372
pip/_vendor/tenacity/nap.py,sha256=fRWvnz1aIzbIq9Ap3gAkAZgDH6oo5zxMrU6ZOVByq0I,1383
pip/_vendor/tenacity/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/tenacity/retry.py,sha256=jrzD_mxA5mSTUEdiYB7SHpxltjhPSYZSnSRATb-ggRc,8746
pip/_vendor/tenacity/stop.py,sha256=YMJs7ZgZfND65PRLqlGB_agpfGXlemx_5Hm4PKnBqpQ,3086
pip/_vendor/tenacity/tornadoweb.py,sha256=po29_F1Mt8qZpsFjX7EVwAT0ydC_NbVia9gVi7R_wXA,2142
pip/_vendor/tenacity/wait.py,sha256=3FcBJoCDgym12_dN6xfK8C1gROY0Hn4NSI2u8xv50uE,8024
pip/_vendor/tomli/__init__.py,sha256=JhUwV66DB1g4Hvt1UQCVMdfCu-IgAV8FXmvDU9onxd4,396
pip/_vendor/tomli/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/tomli/__pycache__/_parser.cpython-312.pyc,,
pip/_vendor/tomli/__pycache__/_re.cpython-312.pyc,,
pip/_vendor/tomli/__pycache__/_types.cpython-312.pyc,,
pip/_vendor/tomli/_parser.py,sha256=g9-ENaALS-B8dokYpCuzUFalWlog7T-SIYMjLZSWrtM,22633
pip/_vendor/tomli/_re.py,sha256=dbjg5ChZT23Ka9z9DHOXfdtSpPwUfdgMXnj8NOoly-w,2943
pip/_vendor/tomli/_types.py,sha256=-GTG2VUqkpxwMqzmVO4F7ybKddIbAnuAHXfmWQcTi3Q,254
pip/_vendor/tomli/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
pip/_vendor/truststore/__init__.py,sha256=qzTLSH8PvAkY1fr6QQ2vV-KwE_M83wdXugtpJaP_AbM,403
pip/_vendor/truststore/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/truststore/__pycache__/_api.cpython-312.pyc,,
pip/_vendor/truststore/__pycache__/_macos.cpython-312.pyc,,
pip/_vendor/truststore/__pycache__/_openssl.cpython-312.pyc,,
pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-312.pyc,,
pip/_vendor/truststore/__pycache__/_windows.cpython-312.pyc,,
pip/_vendor/truststore/_api.py,sha256=xjuEu_rlH4hcdJTROImEyOEqdw-F8t5vO2H2BToY0Ro,9893
pip/_vendor/truststore/_macos.py,sha256=BjvAKoAjXhdIPuxpY124HJIFswDb0pq8DjynzJOVwqc,17694
pip/_vendor/truststore/_openssl.py,sha256=LLUZ7ZGaio-i5dpKKjKCSeSufmn6T8pi9lDcFnvSyq0,2324
pip/_vendor/truststore/_ssl_constants.py,sha256=NUD4fVKdSD02ri7-db0tnO0VqLP9aHuzmStcW7tAl08,1130
pip/_vendor/truststore/_windows.py,sha256=1x_EhROeJ9QK1sMAjfnZC7awYI8UnBJYL-TjACUYI4A,17468
pip/_vendor/truststore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/typing_extensions.py,sha256=EWpcpyQnVmc48E9fSyPGs-vXgHcAk9tQABQIxmMsCGk,111130
pip/_vendor/typing_extensions.pyi,sha256=EU1HG7qq2S4Wbyi9Hezw0ZgBtHbxm-pDvwGY3Cth1gQ,31
pip/_vendor/urllib3.pyi,sha256=CZaBjfrmxRAl5uJO8SDUGkMhAD1yV2e6ZchLSR0RQx4,21
pip/_vendor/urllib3/__init__.py,sha256=iXLcYiJySn0GNbWOOZDDApgBL1JgP44EZ8i1760S8Mc,3333
pip/_vendor/urllib3/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/_collections.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/_version.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/connection.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/connectionpool.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/exceptions.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/fields.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/filepost.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/poolmanager.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/request.cpython-312.pyc,,
pip/_vendor/urllib3/__pycache__/response.cpython-312.pyc,,
pip/_vendor/urllib3/_collections.py,sha256=Rp1mVyBgc_UlAcp6M3at1skJBXR5J43NawRTvW2g_XY,10811
pip/_vendor/urllib3/_version.py,sha256=azoM7M7BUADl2kBhMVR6PPf2GhBDI90me1fcnzTwdcw,64
pip/_vendor/urllib3/connection.py,sha256=92k9td_y4PEiTIjNufCUa1NzMB3J3w0LEdyokYgXnW8,20300
pip/_vendor/urllib3/connectionpool.py,sha256=ItVDasDnPRPP9R8bNxY7tPBlC724nJ9nlxVgXG_SLbI,39990
pip/_vendor/urllib3/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/__pycache__/_appengine_environ.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/__pycache__/appengine.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/__pycache__/ntlmpool.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/__pycache__/securetransport.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/_appengine_environ.py,sha256=bDbyOEhW2CKLJcQqAKAyrEHN-aklsyHFKq6vF8ZFsmk,957
pip/_vendor/urllib3/contrib/_securetransport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/urllib3/contrib/_securetransport/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/_securetransport/__pycache__/bindings.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/_securetransport/__pycache__/low_level.cpython-312.pyc,,
pip/_vendor/urllib3/contrib/_securetransport/bindings.py,sha256=4Xk64qIkPBt09A5q-RIFUuDhNc9mXilVapm7WnYnzRw,17632
pip/_vendor/urllib3/contrib/_securetransport/low_level.py,sha256=B2JBB2_NRP02xK6DCa1Pa9IuxrPwxzDzZbixQkb7U9M,13922
pip/_vendor/urllib3/contrib/appengine.py,sha256=VR68eAVE137lxTgjBDwCna5UiBZTOKa01Aj_-5BaCz4,11036
pip/_vendor/urllib3/contrib/ntlmpool.py,sha256=NlfkW7WMdW8ziqudopjHoW299og1BTWi0IeIibquFwk,4528
pip/_vendor/urllib3/contrib/pyopenssl.py,sha256=hDJh4MhyY_p-oKlFcYcQaVQRDv6GMmBGuW9yjxyeejM,17081
pip/_vendor/urllib3/contrib/securetransport.py,sha256=yhZdmVjY6PI6EeFbp7qYOp6-vp1Rkv2NMuOGaEj7pmc,34448
pip/_vendor/urllib3/contrib/socks.py,sha256=aRi9eWXo9ZEb95XUxef4Z21CFlnnjbEiAo9HOseoMt4,7097
pip/_vendor/urllib3/exceptions.py,sha256=0Mnno3KHTNfXRfY7638NufOPkUb6mXOm-Lqj-4x2w8A,8217
pip/_vendor/urllib3/fields.py,sha256=kvLDCg_JmH1lLjUUEY_FLS8UhY7hBvDPuVETbY8mdrM,8579
pip/_vendor/urllib3/filepost.py,sha256=5b_qqgRHVlL7uLtdAYBzBh-GHmU5AfJVt_2N0XS3PeY,2440
pip/_vendor/urllib3/packages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/urllib3/packages/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/urllib3/packages/__pycache__/six.cpython-312.pyc,,
pip/_vendor/urllib3/packages/backports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/urllib3/packages/backports/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/urllib3/packages/backports/__pycache__/makefile.cpython-312.pyc,,
pip/_vendor/urllib3/packages/backports/__pycache__/weakref_finalize.cpython-312.pyc,,
pip/_vendor/urllib3/packages/backports/makefile.py,sha256=nbzt3i0agPVP07jqqgjhaYjMmuAi_W5E0EywZivVO8E,1417
pip/_vendor/urllib3/packages/backports/weakref_finalize.py,sha256=tRCal5OAhNSRyb0DhHp-38AtIlCsRP8BxF3NX-6rqIA,5343
pip/_vendor/urllib3/packages/six.py,sha256=b9LM0wBXv7E7SrbCjAm4wwN-hrH-iNxv18LgWNMMKPo,34665
pip/_vendor/urllib3/poolmanager.py,sha256=0i8cJgrqupza67IBPZ_u9jXvnSxr5UBlVEiUqdkPtYI,19752
pip/_vendor/urllib3/request.py,sha256=YTWFNr7QIwh7E1W9dde9LM77v2VWTJ5V78XuTTw7D1A,6691
pip/_vendor/urllib3/response.py,sha256=fmDJAFkG71uFTn-sVSTh2Iw0WmcXQYqkbRjihvwBjU8,30641
pip/_vendor/urllib3/util/__init__.py,sha256=JEmSmmqqLyaw8P51gUImZh8Gwg9i1zSe-DoqAitn2nc,1155
pip/_vendor/urllib3/util/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/connection.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/proxy.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/queue.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/request.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/response.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/retry.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/timeout.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/url.cpython-312.pyc,,
pip/_vendor/urllib3/util/__pycache__/wait.cpython-312.pyc,,
pip/_vendor/urllib3/util/connection.py,sha256=5Lx2B1PW29KxBn2T0xkN1CBgRBa3gGVJBKoQoRogEVk,4901
pip/_vendor/urllib3/util/proxy.py,sha256=zUvPPCJrp6dOF0N4GAVbOcl6o-4uXKSrGiTkkr5vUS4,1605
pip/_vendor/urllib3/util/queue.py,sha256=nRgX8_eX-_VkvxoX096QWoz8Ps0QHUAExILCY_7PncM,498
pip/_vendor/urllib3/util/request.py,sha256=C0OUt2tcU6LRiQJ7YYNP9GvPrSvl7ziIBekQ-5nlBZk,3997
pip/_vendor/urllib3/util/response.py,sha256=GJpg3Egi9qaJXRwBh5wv-MNuRWan5BIu40oReoxWP28,3510
pip/_vendor/urllib3/util/retry.py,sha256=Z6WEf518eTOXP5jr5QSQ9gqJI0DVYt3Xs3EKnYaTmus,22013
pip/_vendor/urllib3/util/ssl_.py,sha256=X4-AqW91aYPhPx6-xbf66yHFQKbqqfC_5Zt4WkLX1Hc,17177
pip/_vendor/urllib3/util/ssl_match_hostname.py,sha256=Ir4cZVEjmAk8gUAIHWSi7wtOO83UCYABY2xFD1Ql_WA,5758
pip/_vendor/urllib3/util/ssltransport.py,sha256=NA-u5rMTrDFDFC8QzRKUEKMG0561hOD4qBTr3Z4pv6E,6895
pip/_vendor/urllib3/util/timeout.py,sha256=cwq4dMk87mJHSBktK1miYJ-85G-3T3RmT20v7SFCpno,10168
pip/_vendor/urllib3/util/url.py,sha256=lCAE7M5myA8EDdW0sJuyyZhVB9K_j38ljWhHAnFaWoE,14296
pip/_vendor/urllib3/util/wait.py,sha256=fOX0_faozG2P7iVojQoE1mbydweNyTcm-hXEfFrTtLI,5403
pip/_vendor/vendor.txt,sha256=epuLpe-n1shCqP5BzC97iMIAIeOeDHdtNKFgcxax-9A,493
pip/_vendor/webencodings.pyi,sha256=qyNV2_4M7N5o1lGWev0tkupF3gSCdv4ucE2RhJz1C1Y,26
pip/_vendor/webencodings/__init__.py,sha256=qOBJIuPy_4ByYH6W_bNgJF-qYQ2DoU-dKsDu5yRWCXg,10579
pip/_vendor/webencodings/__pycache__/__init__.cpython-312.pyc,,
pip/_vendor/webencodings/__pycache__/labels.cpython-312.pyc,,
pip/_vendor/webencodings/__pycache__/mklabels.cpython-312.pyc,,
pip/_vendor/webencodings/__pycache__/tests.cpython-312.pyc,,
pip/_vendor/webencodings/__pycache__/x_user_defined.cpython-312.pyc,,
pip/_vendor/webencodings/labels.py,sha256=4AO_KxTddqGtrL9ns7kAPjb0CcN6xsCIxbK37HY9r3E,8979
pip/_vendor/webencodings/mklabels.py,sha256=GYIeywnpaLnP0GSic8LFWgd0UVvO_l1Nc6YoF-87R_4,1305
pip/_vendor/webencodings/tests.py,sha256=OtGLyjhNY1fvkW1GvLJ_FV9ZoqC9Anyjr7q3kxTbzNs,6563
pip/_vendor/webencodings/x_user_defined.py,sha256=yOqWSdmpytGfUgh_Z6JYgDNhoc-BAHyyeeT15Fr42tM,4307
pip/py.typed,sha256=EBVvvPRTn_eIpz5e5QztSCdrMX7Qwd7VP93RSoIlZ2I,286
python3.12/site-packages/pip-23.3.1.dist-info/top_level.txt000064400000000004151732701140017043 0ustar00pip
python3.12/site-packages/pip-23.3.1.dist-info/LICENSE.txt000064400000002105151732701140016140 0ustar00Copyright (c) 2008-present The pip developers (see AUTHORS.txt file)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
python3.12/site-packages/pip-23.3.1.dist-info/AUTHORS.txt000064400000024015151732701150016210 0ustar00@Switch01
A_Rog
Aakanksha Agrawal
Abhinav Sagar
ABHYUDAY PRATAP SINGH
abs51295
AceGentile
Adam Chainz
Adam Tse
Adam Wentz
admin
Adrien Morison
ahayrapetyan
Ahilya
AinsworthK
Akash Srivastava
Alan Yee
Albert Tugushev
Albert-Guan
albertg
Alberto Sottile
Aleks Bunin
Ales Erjavec
Alethea Flowers
Alex Gaynor
Alex Grönholm
Alex Hedges
Alex Loosley
Alex Morega
Alex Stachowiak
Alexander Shtyrov
Alexandre Conrad
Alexey Popravka
Aleš Erjavec
Alli
Ami Fischman
Ananya Maiti
Anatoly Techtonik
Anders Kaseorg
Andre Aguiar
Andreas Lutro
Andrei Geacar
Andrew Gaul
Andrew Shymanel
Andrey Bienkowski
Andrey Bulgakov
Andrés Delfino
Andy Freeland
Andy Kluger
Ani Hayrapetyan
Aniruddha Basak
Anish Tambe
Anrs Hu
Anthony Sottile
Antoine Musso
Anton Ovchinnikov
Anton Patrushev
Antonio Alvarado Hernandez
Antony Lee
Antti Kaihola
Anubhav Patel
Anudit Nagar
Anuj Godase
AQNOUCH Mohammed
AraHaan
Arindam Choudhury
Armin Ronacher
Artem
Arun Babu Neelicattu
Ashley Manton
Ashwin Ramaswami
atse
Atsushi Odagiri
Avinash Karhana
Avner Cohen
Awit (Ah-Wit) Ghirmai
Baptiste Mispelon
Barney Gale
barneygale
Bartek Ogryczak
Bastian Venthur
Ben Bodenmiller
Ben Darnell
Ben Hoyt
Ben Mares
Ben Rosser
Bence Nagy
Benjamin Peterson
Benjamin VanEvery
Benoit Pierre
Berker Peksag
Bernard
Bernard Tyers
Bernardo B. Marques
Bernhard M. Wiedemann
Bertil Hatt
Bhavam Vidyarthi
Blazej Michalik
Bogdan Opanchuk
BorisZZZ
Brad Erickson
Bradley Ayers
Brandon L. Reiss
Brandt Bucher
Brett Randall
Brett Rosen
Brian Cristante
Brian Rosner
briantracy
BrownTruck
Bruno Oliveira
Bruno Renié
Bruno S
Bstrdsmkr
Buck Golemon
burrows
Bussonnier Matthias
bwoodsend
c22
Caleb Martinez
Calvin Smith
Carl Meyer
Carlos Liam
Carol Willing
Carter Thayer
Cass
Chandrasekhar Atina
Chih-Hsuan Yen
Chris Brinker
Chris Hunt
Chris Jerdonek
Chris Kuehl
Chris McDonough
Chris Pawley
Chris Pryer
Chris Wolfe
Christian Clauss
Christian Heimes
Christian Oudard
Christoph Reiter
Christopher Hunt
Christopher Snyder
cjc7373
Clark Boylan
Claudio Jolowicz
Clay McClure
Cody
Cody Soyland
Colin Watson
Collin Anderson
Connor Osborn
Cooper Lees
Cooper Ry Lees
Cory Benfield
Cory Wright
Craig Kerstiens
Cristian Sorinel
Cristina
Cristina Muñoz
Curtis Doty
cytolentino
Daan De Meyer
Damian
Damian Quiroga
Damian Shaw
Dan Black
Dan Savilonis
Dan Sully
Dane Hillard
daniel
Daniel Collins
Daniel Hahler
Daniel Holth
Daniel Jost
Daniel Katz
Daniel Shaulov
Daniele Esposti
Daniele Nicolodi
Daniele Procida
Daniil Konovalenko
Danny Hermes
Danny McClanahan
Darren Kavanagh
Dav Clark
Dave Abrahams
Dave Jones
David Aguilar
David Black
David Bordeynik
David Caro
David D Lowe
David Evans
David Hewitt
David Linke
David Poggi
David Pursehouse
David Runge
David Tucker
David Wales
Davidovich
ddelange
Deepak Sharma
Deepyaman Datta
Denise Yu
dependabot[bot]
derwolfe
Desetude
Devesh Kumar Singh
Diego Caraballo
Diego Ramirez
DiegoCaraballo
Dimitri Merejkowsky
Dimitri Papadopoulos
Dirk Stolle
Dmitry Gladkov
Dmitry Volodin
Domen Kožar
Dominic Davis-Foster
Donald Stufft
Dongweiming
doron zarhi
Dos Moonen
Douglas Thor
DrFeathers
Dustin Ingram
Dwayne Bailey
Ed Morley
Edgar Ramírez
Ee Durbin
Eitan Adler
ekristina
elainechan
Eli Schwartz
Elisha Hollander
Ellen Marie Dash
Emil Burzo
Emil Styrke
Emmanuel Arias
Endoh Takanao
enoch
Erdinc Mutlu
Eric Cousineau
Eric Gillingham
Eric Hanchrow
Eric Hopper
Erik M. Bray
Erik Rose
Erwin Janssen
Eugene Vereshchagin
everdimension
Federico
Felipe Peter
Felix Yan
fiber-space
Filip Kokosiński
Filipe Laíns
Finn Womack
finnagin
Florian Briand
Florian Rathgeber
Francesco
Francesco Montesano
Frost Ming
Gabriel Curio
Gabriel de Perthuis
Garry Polley
gavin
gdanielson
Geoffrey Sneddon
George Song
Georgi Valkov
Georgy Pchelkin
ghost
Giftlin Rajaiah
gizmoguy1
gkdoc
Godefroid Chapelle
Gopinath M
GOTO Hayato
gousaiyang
gpiks
Greg Roodt
Greg Ward
Guilherme Espada
Guillaume Seguin
gutsytechster
Guy Rozendorn
Guy Tuval
gzpan123
Hanjun Kim
Hari Charan
Harsh Vardhan
harupy
Harutaka Kawamura
hauntsaninja
Henrich Hartzer
Henry Schreiner
Herbert Pfennig
Holly Stotelmyer
Honnix
Hsiaoming Yang
Hugo Lopes Tavares
Hugo van Kemenade
Hugues Bruant
Hynek Schlawack
Ian Bicking
Ian Cordasco
Ian Lee
Ian Stapleton Cordasco
Ian Wienand
Igor Kuzmitshov
Igor Sobreira
Ilan Schnell
Illia Volochii
Ilya Baryshev
Inada Naoki
Ionel Cristian Mărieș
Ionel Maries Cristian
Itamar Turner-Trauring
Ivan Pozdeev
Jacob Kim
Jacob Walls
Jaime Sanz
jakirkham
Jakub Kuczys
Jakub Stasiak
Jakub Vysoky
Jakub Wilk
James Cleveland
James Curtin
James Firth
James Gerity
James Polley
Jan Pokorný
Jannis Leidel
Jarek Potiuk
jarondl
Jason Curtis
Jason R. Coombs
JasonMo
JasonMo1
Jay Graves
Jean-Christophe Fillion-Robin
Jeff Barber
Jeff Dairiki
Jeff Widman
Jelmer Vernooij
jenix21
Jeremy Stanley
Jeremy Zafran
Jesse Rittner
Jiashuo Li
Jim Fisher
Jim Garrison
Jiun Bae
Jivan Amara
Joe Bylund
Joe Michelini
John Paton
John T. Wodder II
John-Scott Atlakson
johnthagen
Jon Banafato
Jon Dufresne
Jon Parise
Jonas Nockert
Jonathan Herbert
Joonatan Partanen
Joost Molenaar
Jorge Niedbalski
Joseph Bylund
Joseph Long
Josh Bronson
Josh Hansen
Josh Schneier
Joshua
Juan Luis Cano Rodríguez
Juanjo Bazán
Judah Rand
Julian Berman
Julian Gethmann
Julien Demoor
Jussi Kukkonen
jwg4
Jyrki Pulliainen
Kai Chen
Kai Mueller
Kamal Bin Mustafa
kasium
kaustav haldar
keanemind
Keith Maxwell
Kelsey Hightower
Kenneth Belitzky
Kenneth Reitz
Kevin Burke
Kevin Carter
Kevin Frommelt
Kevin R Patterson
Kexuan Sun
Kit Randel
Klaas van Schelven
KOLANICH
kpinc
Krishna Oza
Kumar McMillan
Kurt McKee
Kyle Persohn
lakshmanaram
Laszlo Kiss-Kollar
Laurent Bristiel
Laurent LAPORTE
Laurie O
Laurie Opperman
layday
Leon Sasson
Lev Givon
Lincoln de Sousa
Lipis
lorddavidiii
Loren Carvalho
Lucas Cimon
Ludovic Gasc
Lukas Geiger
Lukas Juhrich
Luke Macken
Luo Jiebin
luojiebin
luz.paz
László Kiss Kollár
M00nL1ght
Marc Abramowitz
Marc Tamlyn
Marcus Smith
Mariatta
Mark Kohler
Mark Williams
Markus Hametner
Martey Dodoo
Martin Fischer
Martin Häcker
Martin Pavlasek
Masaki
Masklinn
Matej Stuchlik
Mathew Jennings
Mathieu Bridon
Mathieu Kniewallner
Matt Bacchi
Matt Good
Matt Maker
Matt Robenolt
matthew
Matthew Einhorn
Matthew Feickert
Matthew Gilliard
Matthew Iversen
Matthew Treinish
Matthew Trumbell
Matthew Willson
Matthias Bussonnier
mattip
Maurits van Rees
Max W Chase
Maxim Kurnikov
Maxime Rouyrre
mayeut
mbaluna
mdebi
memoselyk
meowmeowcat
Michael
Michael Aquilina
Michael E. Karpeles
Michael Klich
Michael Mintz
Michael Williamson
michaelpacer
Michał Górny
Mickaël Schoentgen
Miguel Araujo Perez
Mihir Singh
Mike
Mike Hendricks
Min RK
MinRK
Miro Hrončok
Monica Baluna
montefra
Monty Taylor
Muha Ajjan‮
Nadav Wexler
Nahuel Ambrosini
Nate Coraor
Nate Prewitt
Nathan Houghton
Nathaniel J. Smith
Nehal J Wani
Neil Botelho
Nguyễn Gia Phong
Nicholas Serra
Nick Coghlan
Nick Stenning
Nick Timkovich
Nicolas Bock
Nicole Harris
Nikhil Benesch
Nikhil Ladha
Nikita Chepanov
Nikolay Korolev
Nipunn Koorapati
Nitesh Sharma
Niyas Sait
Noah
Noah Gorny
Nowell Strite
NtaleGrey
nvdv
OBITORASU
Ofek Lev
ofrinevo
Oliver Freund
Oliver Jeeves
Oliver Mannion
Oliver Tonnhofer
Olivier Girardot
Olivier Grisel
Ollie Rutherfurd
OMOTO Kenji
Omry Yadan
onlinejudge95
Oren Held
Oscar Benjamin
Oz N Tiram
Pachwenko
Patrick Dubroy
Patrick Jenkins
Patrick Lawson
patricktokeeffe
Patrik Kopkan
Paul Ganssle
Paul Kehrer
Paul Moore
Paul Nasrat
Paul Oswald
Paul van der Linden
Paulus Schoutsen
Pavel Safronov
Pavithra Eswaramoorthy
Pawel Jasinski
Paweł Szramowski
Pekka Klärck
Peter Gessler
Peter Lisák
Peter Waller
petr-tik
Phaneendra Chiruvella
Phil Elson
Phil Freo
Phil Pennock
Phil Whelan
Philip Jägenstedt
Philip Molloy
Philippe Ombredanne
Pi Delport
Pierre-Yves Rofes
Pieter Degroote
pip
Prabakaran Kumaresshan
Prabhjyotsing Surjit Singh Sodhi
Prabhu Marappan
Pradyun Gedam
Prashant Sharma
Pratik Mallya
pre-commit-ci[bot]
Preet Thakkar
Preston Holmes
Przemek Wrzos
Pulkit Goyal
q0w
Qiangning Hong
Quentin Lee
Quentin Pradet
R. David Murray
Rafael Caricio
Ralf Schmitt
Razzi Abuissa
rdb
Reece Dunham
Remi Rampin
Rene Dudfield
Riccardo Magliocchetti
Riccardo Schirone
Richard Jones
Richard Si
Ricky Ng-Adam
Rishi
RobberPhex
Robert Collins
Robert McGibbon
Robert Pollak
Robert T. McGibbon
robin elisha robinson
Roey Berman
Rohan Jain
Roman Bogorodskiy
Roman Donchenko
Romuald Brunet
ronaudinho
Ronny Pfannschmidt
Rory McCann
Ross Brattain
Roy Wellington Ⅳ
Ruairidh MacLeod
Russell Keith-Magee
Ryan Shepherd
Ryan Wooden
ryneeverett
Sachi King
Salvatore Rinchiera
sandeepkiran-js
Sander Van Balen
Savio Jomton
schlamar
Scott Kitterman
Sean
seanj
Sebastian Jordan
Sebastian Schaetz
Segev Finer
SeongSoo Cho
Sergey Vasilyev
Seth Michael Larson
Seth Woodworth
Shahar Epstein
Shantanu
shireenrao
Shivansh-007
Shlomi Fish
Shovan Maity
Simeon Visser
Simon Cross
Simon Pichugin
sinoroc
sinscary
snook92
socketubs
Sorin Sbarnea
Srinivas Nyayapati
Stavros Korokithakis
Stefan Scherfke
Stefano Rivera
Stephan Erb
Stephen Rosen
stepshal
Steve (Gadget) Barnes
Steve Barnes
Steve Dower
Steve Kowalik
Steven Myint
Steven Silvester
stonebig
studioj
Stéphane Bidoul
Stéphane Bidoul (ACSONE)
Stéphane Klein
Sumana Harihareswara
Surbhi Sharma
Sviatoslav Sydorenko
Swat009
Sylvain
Takayuki SHIMIZUKAWA
Taneli Hukkinen
tbeswick
Thiago
Thijs Triemstra
Thomas Fenzl
Thomas Grainger
Thomas Guettler
Thomas Johansson
Thomas Kluyver
Thomas Smith
Thomas VINCENT
Tim D. Smith
Tim Gates
Tim Harder
Tim Heap
tim smith
tinruufu
Tobias Hermann
Tom Forbes
Tom Freudenheim
Tom V
Tomas Hrnciar
Tomas Orsava
Tomer Chachamu
Tommi Enenkel | AnB
Tomáš Hrnčiar
Tony Beswick
Tony Narlock
Tony Zhaocheng Tan
TonyBeswick
toonarmycaptain
Toshio Kuratomi
toxinu
Travis Swicegood
Tushar Sadhwani
Tzu-ping Chung
Valentin Haenel
Victor Stinner
victorvpaulo
Vikram - Google
Viktor Szépe
Ville Skyttä
Vinay Sajip
Vincent Philippon
Vinicyus Macedo
Vipul Kumar
Vitaly Babiy
Vladimir Rutsky
W. Trevor King
Wil Tan
Wilfred Hughes
William Edwards
William ML Leslie
William T Olson
William Woodruff
Wilson Mo
wim glenn
Winson Luk
Wolfgang Maier
Wu Zhenyu
XAMES3
Xavier Fernandez
xoviat
xtreak
YAMAMOTO Takashi
Yen Chi Hsuan
Yeray Diaz Diaz
Yoval P
Yu Jian
Yuan Jing Vincent Yan
Yusuke Hayashi
Zearin
Zhiping Deng
ziebam
Zvezdan Petkovic
Łukasz Langa
Роман Донченко
Семён Марьясин
‮rekcäH nitraM‮
python3.12/site-packages/pip-23.3.1.dist-info/WHEEL000064400000000134151732701150015105 0ustar00Wheel-Version: 1.0
Generator: bdist_wheel (0.42.0)
Root-Is-Purelib: true
Tag: py3-none-any

python3.12/site-packages/pip-23.3.1.dist-info/direct_url.json000064400000000422151732701150017345 0ustar00{"archive_info": {"hash": "sha256=0be49d960f3e53b7f32592bed0a90a55e976b2f72f0aacdb68a1200faffa004e", "hashes": {"sha256": "0be49d960f3e53b7f32592bed0a90a55e976b2f72f0aacdb68a1200faffa004e"}}, "url": "file:///builddir/build/BUILD/pip-23.3.1/dist/pip-23.3.1-py3-none-any.whl"}python3.12/site-packages/pip-23.3.1.dist-info/REQUESTED000064400000000000151732701150015572 0ustar00python3.12/site-packages/_distutils_hack/override.py000064400000000054151732701150016454 0ustar00__import__('_distutils_hack').do_override()
python3.12/site-packages/_distutils_hack/__pycache__/__init__.cpython-312.pyc000064400000023535151732701150022746 0ustar00�

��_i����ddlZddlZdejvZd�Zd�Zd�Zd�Zd�ZGd�d	�Z	Gd
�d�Z
e
jD]Ze
e
de��e
j��e
�Zd
�ZGd�d�Zd�Zd�Zej(dkreZyy)�N�__pypy__c��dtjvrytrtjdkryddl}|jd�y)N�	distutils)��ra�Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.)�sys�modules�is_pypy�version_info�warnings�warn)rs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/_distutils_hack/__init__.py�warn_distutils_presentr	s:���#�+�+�%���3�#�#�f�,�	���M�M�	?��c���dtjvryddl}|jd�tjD�cgc]}|dk(s|j	d�r|��}}|D]}tj|=�ycc}w)Nrrz"Setuptools is replacing distutils.z
distutils.)rr	rr
�
startswith)r�name�modss   r�clear_distutilsrsw���#�+�+�%����M�M�6�7��K�K���D��;��$�/�/�,�"?�	
��	��
���K�K�����s�A5c�L�tjjdd�}|dk(S)z?
    Allow selection of distutils by environment variable.
    �SETUPTOOLS_USE_DISTUTILS�local)�os�environ�get)�whichs r�enabledr+s$��
�J�J�N�N�5�w�?�E��G��rc��ddl}t�t�5|jd�ddd�|jd�}d|jvsJ|j��dt
jvsJ�y#1swY�NxYw)Nrrzdistutils.core�
_distutilszsetuptools._distutils.log)�	importlibr�shim�
import_module�__file__rr	)r �cores  r�ensure_local_distutilsr%3sm�����

������,�
��"�"�#3�4�D��4�=�=�(�7�$�-�-�7�(�&�c�k�k�9�9�9�

��s�A8�8Bc�B�t�rt�t�yy)z�
    Ensure that the local copy of distutils is preferred over stdlib.

    See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401
    for more motivation.
    N)rrr%�rr�do_overrider(Ds���y�� �� �rc��eZdZd�Zd�Zy)�
_TrivialRec��||_y�N)�	_patterns)�self�patternss  r�__init__z_TrivialRe.__init__Qs	��!��rc�@��t�fd�|jD��S)Nc3�&�K�|]}|�v���
y�wr,r')�.0�pat�strings  �r�	<genexpr>z#_TrivialRe.match.<locals>.<genexpr>Us�����;�N�S�3�&�=�N�s�)�allr-)r.r5s `r�matchz_TrivialRe.matchTs����;�D�N�N�;�;�;rN)�__name__�
__module__�__qualname__r0r8r'rrr*r*Ps��"�<rr*c��eZdZdd�Zd�Zed��Zd�Zed��Z	ed��Z
d�Zejd	krgd
�ZydgZy)
�DistutilsMetaFinderNc��|�|jd�sydjdit���}t||d��}|�S)Nztest.zspec_for_{fullname}c��yr,r'r'rr�<lambda>z/DistutilsMetaFinder.find_spec.<locals>.<lambda>`s��Drr')r�format�locals�getattr)r.�fullname�path�target�method_name�methods      r�	find_speczDistutilsMetaFinder.find_specYsG����H�$7�$7��$@��2�+�2�2�>�V�X�>����{�L�9���x�rc���|j�ryddl}ddl}ddl}	|j	d��G�fd�d|jj�}|jjd|��j��S#t
$rYywxYw)Nrzsetuptools._distutilsc���eZdZ�fd�Zd�Zy)�?DistutilsMetaFinder.spec_for_distutils.<locals>.DistutilsLoaderc���d�_�S)Nr)r9)r.�spec�mods  �r�
create_modulezMDistutilsMetaFinder.spec_for_distutils.<locals>.DistutilsLoader.create_moduleys���*����
rc��yr,r')r.�modules  r�exec_modulezKDistutilsMetaFinder.spec_for_distutils.<locals>.DistutilsLoader.exec_module}s��rN)r9r:r;rPrS)rOs�r�DistutilsLoaderrLxs
���
�
rrTr)�origin)�
is_cpythonr �
importlib.abc�importlib.utilr"�	Exception�abc�Loader�util�spec_from_loaderr#)r.r rTrOs   @r�spec_for_distutilsz&DistutilsMetaFinder.spec_for_distutilscs�����?�?������	��)�)�*A�B�C�	�i�m�m�2�2�	��~�~�.�.���*�3�<�<�/�
�	
��'�		�
�		�s�A?�?	B�
Bc�@�tjjd�S)zj
        Suppress supplying distutils for CPython (build and tests).
        Ref #2965 and #3007.
        zpybuilddir.txt)rrE�isfiler'rrrVzDistutilsMetaFinder.is_cpython�s���w�w�~�~�.�/�/rc�p�tjdk\s|j�ryt�d�|_y)zj
        Ensure stdlib distutils when running under pip.
        See pypa/pip#8761 for rationale.
        �r�Nc��yr,r'r'rrr@z2DistutilsMetaFinder.spec_for_pip.<locals>.<lambda>����$r)rr�pip_imported_during_buildrr^�r.s r�spec_for_pipz DistutilsMetaFinder.spec_for_pip�s.��
���w�&�$�*H�*H�*J����".��rc�R��ddl}t�fd�|jd�D��S)zO
        Detect if pip is being imported in a build script. Ref #2355.
        rNc3�F�K�|]\}}�j|����y�wr,)�frame_file_is_setup)r3�frame�line�clss   �rr6z@DistutilsMetaFinder.pip_imported_during_build.<locals>.<genexpr>�s%�����
�>X�{�u�d�C�#�#�E�*�>X�s�!)�	traceback�any�
walk_stack)rnros` rrfz-DistutilsMetaFinder.pip_imported_during_build�s.���
	��
�>G�>R�>R�SW�>X�
�
�	
rc�X�|jjdd�jd�S)zN
        Return True if the indicated frame suggests a setup.py file.
        r#�zsetup.py)�	f_globalsr�endswith)rls rrkz'DistutilsMetaFinder.frame_file_is_setup�s&�����"�"�:�r�2�;�;�J�G�Grc�(�t�d�|_y)zp
        Ensure stdlib distutils when running select tests under CPython.

        python/cpython#91169
        c��yr,r'r'rrr@z>DistutilsMetaFinder.spec_for_sensitive_tests.<locals>.<lambda>�rerN)rr^rgs r�spec_for_sensitive_testsz,DistutilsMetaFinder.spec_for_sensitive_tests�s��	��".��r)r�
)�test.test_distutilsztest.test_peg_generatorztest.test_importlibrzr,)r9r:r;rIr^�staticmethodrVrh�classmethodrfrkrxrr�sensitive_testsr'rrr=r=Xs~���
�B�0��0�/��
��
��H��H�/����g�%�	
��
"�
�rr=�	spec_for_c�L�ttjvxst�yyr,)�DISTUTILS_FINDERr�	meta_path�insert_shimr'rr�add_shimr��s����
�
�%�6���6rc��eZdZd�Zd�Zy)r!c��t�yr,)r�rgs r�	__enter__zshim.__enter__�s���
rc��t�yr,)�_remove_shim)r.�exc�value�tbs    r�__exit__z
shim.__exit__�s���rN)r9r:r;r�r�r'rrr!r!�s���rr!c�L�tjjdt�y)Nr)rr��insertr�r'rrr�r��s���M�M����,�-rc�j�	tjjt�y#t$rYywxYwr,)rr��remover��
ValueErrorr'rrr�r��s,��
��
�
���-�.���
��
�s�#&�	2�2rb)rr�builtin_module_namesr
rrrr%r(r*r=r}r�setattrrxr�r�r!r�r�r�remove_shimr'rr�<module>r�s���
�	���0�0�
0���&��:�"	!�<�<�d�d�N
 �/�/�D���
�D�6���4�4��
0�'�(��7���.�
����g���K�rpython3.12/site-packages/_distutils_hack/__pycache__/override.cpython-312.pyc000064400000000527151732701160023023 0ustar00�

��_i,��0�ed�j�y)�_distutils_hackN)�
__import__�do_override����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/_distutils_hack/override.py�<module>rs��
���)�)�+rpython3.12/site-packages/_distutils_hack/__init__.py000064400000014233151732701160016401 0ustar00# don't import any costly modules
import sys
import os


is_pypy = '__pypy__' in sys.builtin_module_names


def warn_distutils_present():
    if 'distutils' not in sys.modules:
        return
    if is_pypy and sys.version_info < (3, 7):
        # PyPy for 3.6 unconditionally imports distutils, so bypass the warning
        # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250
        return
    import warnings

    warnings.warn(
        "Distutils was imported before Setuptools, but importing Setuptools "
        "also replaces the `distutils` module in `sys.modules`. This may lead "
        "to undesirable behaviors or errors. To avoid these issues, avoid "
        "using distutils directly, ensure that setuptools is installed in the "
        "traditional way (e.g. not an editable install), and/or make sure "
        "that setuptools is always imported before distutils."
    )


def clear_distutils():
    if 'distutils' not in sys.modules:
        return
    import warnings

    warnings.warn("Setuptools is replacing distutils.")
    mods = [
        name
        for name in sys.modules
        if name == "distutils" or name.startswith("distutils.")
    ]
    for name in mods:
        del sys.modules[name]


def enabled():
    """
    Allow selection of distutils by environment variable.
    """
    which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local')
    return which == 'local'


def ensure_local_distutils():
    import importlib

    clear_distutils()

    # With the DistutilsMetaFinder in place,
    # perform an import to cause distutils to be
    # loaded from setuptools._distutils. Ref #2906.
    with shim():
        importlib.import_module('distutils')

    # check that submodules load as expected
    core = importlib.import_module('distutils.core')
    assert '_distutils' in core.__file__, core.__file__
    assert 'setuptools._distutils.log' not in sys.modules


def do_override():
    """
    Ensure that the local copy of distutils is preferred over stdlib.

    See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401
    for more motivation.
    """
    if enabled():
        warn_distutils_present()
        ensure_local_distutils()


class _TrivialRe:
    def __init__(self, *patterns):
        self._patterns = patterns

    def match(self, string):
        return all(pat in string for pat in self._patterns)


class DistutilsMetaFinder:
    def find_spec(self, fullname, path, target=None):
        # optimization: only consider top level modules and those
        # found in the CPython test suite.
        if path is not None and not fullname.startswith('test.'):
            return

        method_name = 'spec_for_{fullname}'.format(**locals())
        method = getattr(self, method_name, lambda: None)
        return method()

    def spec_for_distutils(self):
        if self.is_cpython():
            return

        import importlib
        import importlib.abc
        import importlib.util

        try:
            mod = importlib.import_module('setuptools._distutils')
        except Exception:
            # There are a couple of cases where setuptools._distutils
            # may not be present:
            # - An older Setuptools without a local distutils is
            #   taking precedence. Ref #2957.
            # - Path manipulation during sitecustomize removes
            #   setuptools from the path but only after the hook
            #   has been loaded. Ref #2980.
            # In either case, fall back to stdlib behavior.
            return

        class DistutilsLoader(importlib.abc.Loader):
            def create_module(self, spec):
                mod.__name__ = 'distutils'
                return mod

            def exec_module(self, module):
                pass

        return importlib.util.spec_from_loader(
            'distutils', DistutilsLoader(), origin=mod.__file__
        )

    @staticmethod
    def is_cpython():
        """
        Suppress supplying distutils for CPython (build and tests).
        Ref #2965 and #3007.
        """
        return os.path.isfile('pybuilddir.txt')

    def spec_for_pip(self):
        """
        Ensure stdlib distutils when running under pip.
        See pypa/pip#8761 for rationale.
        """
        if sys.version_info >= (3, 12) or self.pip_imported_during_build():
            return
        clear_distutils()
        self.spec_for_distutils = lambda: None

    @classmethod
    def pip_imported_during_build(cls):
        """
        Detect if pip is being imported in a build script. Ref #2355.
        """
        import traceback

        return any(
            cls.frame_file_is_setup(frame) for frame, line in traceback.walk_stack(None)
        )

    @staticmethod
    def frame_file_is_setup(frame):
        """
        Return True if the indicated frame suggests a setup.py file.
        """
        # some frames may not have __file__ (#2940)
        return frame.f_globals.get('__file__', '').endswith('setup.py')

    def spec_for_sensitive_tests(self):
        """
        Ensure stdlib distutils when running select tests under CPython.

        python/cpython#91169
        """
        clear_distutils()
        self.spec_for_distutils = lambda: None

    sensitive_tests = (
        [
            'test.test_distutils',
            'test.test_peg_generator',
            'test.test_importlib',
        ]
        if sys.version_info < (3, 10)
        else [
            'test.test_distutils',
        ]
    )


for name in DistutilsMetaFinder.sensitive_tests:
    setattr(
        DistutilsMetaFinder,
        f'spec_for_{name}',
        DistutilsMetaFinder.spec_for_sensitive_tests,
    )


DISTUTILS_FINDER = DistutilsMetaFinder()


def add_shim():
    DISTUTILS_FINDER in sys.meta_path or insert_shim()


class shim:
    def __enter__(self):
        insert_shim()

    def __exit__(self, exc, value, tb):
        _remove_shim()


def insert_shim():
    sys.meta_path.insert(0, DISTUTILS_FINDER)


def _remove_shim():
    try:
        sys.meta_path.remove(DISTUTILS_FINDER)
    except ValueError:
        pass


if sys.version_info < (3, 12):
    # DistutilsMetaFinder can only be disabled in Python < 3.12 (PEP 632)
    remove_shim = _remove_shim
python3.12/site-packages/pip/__pycache__/__pip-runner__.cpython-312.pyc000064400000004314151732701160021514 0ustar00�

R`i��	�t�dZddlZdZd�Zejddekr1edj
eejdd�ee����ddlZddlm	Z	ddl
mZeee��Z
Gd	�d
�Zejj!de��edk(sJd��ej$d
dd��y)z�Execute exactly this copy of pip, within a different environment.

This file is named as it is, to ensure that this module can't be imported via
an import statement.
�N)��c�2�djd�|D��S)N�.c3�2K�|]}t|����y�w)N)�str)�.0�vs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/__pip-runner__.py�	<genexpr>zversion_str.<locals>.<genexpr>s����,�G�q�C��F�G�s�)�join)�versions r�version_strrs���8�8�,�G�,�,�,��z?This version of pip does not support python {} (requires >={}).)�
PathFinder)�dirnamec��eZdZedd��Zy)�PipImportRedirectingFinderNc�h�|dk7rytj|tg|�}|s
Jt|f��|S)N�pip)r�	find_spec�PIP_SOURCES_ROOT)�self�fullname�path�target�specs     rrz$PipImportRedirectingFinder.find_spec%s=���u����#�#�H�/?�.@�&�I���1�&��1�1�t��r)NN)�__name__�
__module__�__qualname__�classmethodr�rrrr$s�����rr�__main__z1Cannot run __pip-runner__.py as a non-main modulerT)�run_name�	alter_sys)�__doc__�sys�PYTHON_REQUIRESr�version_info�
SystemExit�format�runpy�importlib.machineryr�os.pathr�__file__rr�	meta_path�insertr�
run_moduler#rr�<module>r4s�������-����B�Q��/�)�
�I�P�P���(�(��!�,�-�{�?�/K�	
���
�*���7�8�,�-�����
�
���Q�2�4�5��:��R�R�R��������t�<rpython3.12/site-packages/pip/__pycache__/__init__.cpython-312.pyc000064400000001336151732701160020361 0ustar00�

R`ie��6�ddlmZmZdZddeeedefd�Zy)�)�List�Optionalz23.3.1N�args�returnc��ddlm}||�S)z�This is an internal API only meant for use by pip's own console scripts.

    For additional details, see https://github.com/pypa/pip/issues/7498.
    r)�_wrapper)�pip._internal.utils.entrypointsr)rrs  �~/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/__init__.py�mainrs��
9��D�>��)N)�typingrr�__version__�str�intr�rr
�<module>rs)��!����x��S�	�"��c�rpython3.12/site-packages/pip/__pycache__/__main__.cpython-312.pyc000064400000001570151732701160020342 0ustar00�

R`iV��~�ddlZddlZejddej�fvrejj	d�edk(rPejj
ejj
e��Zejjde�e	dk(rddl
mZeje��yy)�N��__main__)�main)�os�sys�path�getcwd�pop�__package__�dirname�__file__�insert�__name__�pip._internal.cli.mainr�_main�exit���~/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/__main__.py�<module>rs���	�
��8�8�A�;�2�y�r�y�y�{�#�#��H�H�L�L��O��"��
�7�7�?�?�2�7�7�?�?�8�4�5�D��H�H�O�O�A�t���z��4��C�H�H�U�W��rpython3.12/site-packages/pip/__main__.py000064400000001526151732701160014002 0ustar00import os
import sys

# Remove '' and current working directory from the first entry
# of sys.path, if present to avoid using current directory
# in pip commands check, freeze, install, list and show,
# when invoked as python -m pip <command>
if sys.path[0] in ("", os.getcwd()):
    sys.path.pop(0)

# If we are running from a wheel, add the wheel to sys.path
# This allows the usage python pip-*.whl/pip install pip-*.whl
if __package__ == "":
    # __file__ is pip-*.whl/pip/__main__.py
    # first dirname call strips of '/__main__.py', second strips off '/pip'
    # Resulting path is the name of the wheel itself
    # Add that to sys.path so we can import pip
    path = os.path.dirname(os.path.dirname(__file__))
    sys.path.insert(0, path)

if __name__ == "__main__":
    from pip._internal.cli.main import main as _main

    sys.exit(_main())
python3.12/site-packages/pip/_internal/wheel_builder.py000064400000027102151732701160017045 0ustar00"""Orchestrator for building wheels from InstallRequirements.
"""

import logging
import os.path
import re
import shutil
from typing import Iterable, List, Optional, Tuple

from pip._vendor.packaging.utils import canonicalize_name, canonicalize_version
from pip._vendor.packaging.version import InvalidVersion, Version

from pip._internal.cache import WheelCache
from pip._internal.exceptions import InvalidWheelFilename, UnsupportedWheel
from pip._internal.metadata import FilesystemWheel, get_wheel_distribution
from pip._internal.models.link import Link
from pip._internal.models.wheel import Wheel
from pip._internal.operations.build.wheel import build_wheel_pep517
from pip._internal.operations.build.wheel_editable import build_wheel_editable
from pip._internal.operations.build.wheel_legacy import build_wheel_legacy
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import ensure_dir, hash_file
from pip._internal.utils.setuptools_build import make_setuptools_clean_args
from pip._internal.utils.subprocess import call_subprocess
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.utils.urls import path_to_url
from pip._internal.vcs import vcs

logger = logging.getLogger(__name__)

_egg_info_re = re.compile(r"([a-z0-9_.]+)-([a-z0-9_.!+-]+)", re.IGNORECASE)

BuildResult = Tuple[List[InstallRequirement], List[InstallRequirement]]


def _contains_egg_info(s: str) -> bool:
    """Determine whether the string looks like an egg_info.

    :param s: The string to parse. E.g. foo-2.1
    """
    return bool(_egg_info_re.search(s))


def _should_build(
    req: InstallRequirement,
    need_wheel: bool,
) -> bool:
    """Return whether an InstallRequirement should be built into a wheel."""
    if req.constraint:
        # never build requirements that are merely constraints
        return False
    if req.is_wheel:
        if need_wheel:
            logger.info(
                "Skipping %s, due to already being wheel.",
                req.name,
            )
        return False

    if need_wheel:
        # i.e. pip wheel, not pip install
        return True

    # From this point, this concerns the pip install command only
    # (need_wheel=False).

    if not req.source_dir:
        return False

    if req.editable:
        # we only build PEP 660 editable requirements
        return req.supports_pyproject_editable()

    return True


def should_build_for_wheel_command(
    req: InstallRequirement,
) -> bool:
    return _should_build(req, need_wheel=True)


def should_build_for_install_command(
    req: InstallRequirement,
) -> bool:
    return _should_build(req, need_wheel=False)


def _should_cache(
    req: InstallRequirement,
) -> Optional[bool]:
    """
    Return whether a built InstallRequirement can be stored in the persistent
    wheel cache, assuming the wheel cache is available, and _should_build()
    has determined a wheel needs to be built.
    """
    if req.editable or not req.source_dir:
        # never cache editable requirements
        return False

    if req.link and req.link.is_vcs:
        # VCS checkout. Do not cache
        # unless it points to an immutable commit hash.
        assert not req.editable
        assert req.source_dir
        vcs_backend = vcs.get_backend_for_scheme(req.link.scheme)
        assert vcs_backend
        if vcs_backend.is_immutable_rev_checkout(req.link.url, req.source_dir):
            return True
        return False

    assert req.link
    base, ext = req.link.splitext()
    if _contains_egg_info(base):
        return True

    # Otherwise, do not cache.
    return False


def _get_cache_dir(
    req: InstallRequirement,
    wheel_cache: WheelCache,
) -> str:
    """Return the persistent or temporary cache directory where the built
    wheel need to be stored.
    """
    cache_available = bool(wheel_cache.cache_dir)
    assert req.link
    if cache_available and _should_cache(req):
        cache_dir = wheel_cache.get_path_for_link(req.link)
    else:
        cache_dir = wheel_cache.get_ephem_path_for_link(req.link)
    return cache_dir


def _verify_one(req: InstallRequirement, wheel_path: str) -> None:
    canonical_name = canonicalize_name(req.name or "")
    w = Wheel(os.path.basename(wheel_path))
    if canonicalize_name(w.name) != canonical_name:
        raise InvalidWheelFilename(
            "Wheel has unexpected file name: expected {!r}, "
            "got {!r}".format(canonical_name, w.name),
        )
    dist = get_wheel_distribution(FilesystemWheel(wheel_path), canonical_name)
    dist_verstr = str(dist.version)
    if canonicalize_version(dist_verstr) != canonicalize_version(w.version):
        raise InvalidWheelFilename(
            "Wheel has unexpected file name: expected {!r}, "
            "got {!r}".format(dist_verstr, w.version),
        )
    metadata_version_value = dist.metadata_version
    if metadata_version_value is None:
        raise UnsupportedWheel("Missing Metadata-Version")
    try:
        metadata_version = Version(metadata_version_value)
    except InvalidVersion:
        msg = f"Invalid Metadata-Version: {metadata_version_value}"
        raise UnsupportedWheel(msg)
    if metadata_version >= Version("1.2") and not isinstance(dist.version, Version):
        raise UnsupportedWheel(
            "Metadata 1.2 mandates PEP 440 version, "
            "but {!r} is not".format(dist_verstr)
        )


def _build_one(
    req: InstallRequirement,
    output_dir: str,
    verify: bool,
    build_options: List[str],
    global_options: List[str],
    editable: bool,
) -> Optional[str]:
    """Build one wheel.

    :return: The filename of the built wheel, or None if the build failed.
    """
    artifact = "editable" if editable else "wheel"
    try:
        ensure_dir(output_dir)
    except OSError as e:
        logger.warning(
            "Building %s for %s failed: %s",
            artifact,
            req.name,
            e,
        )
        return None

    # Install build deps into temporary directory (PEP 518)
    with req.build_env:
        wheel_path = _build_one_inside_env(
            req, output_dir, build_options, global_options, editable
        )
    if wheel_path and verify:
        try:
            _verify_one(req, wheel_path)
        except (InvalidWheelFilename, UnsupportedWheel) as e:
            logger.warning("Built %s for %s is invalid: %s", artifact, req.name, e)
            return None
    return wheel_path


def _build_one_inside_env(
    req: InstallRequirement,
    output_dir: str,
    build_options: List[str],
    global_options: List[str],
    editable: bool,
) -> Optional[str]:
    with TempDirectory(kind="wheel") as temp_dir:
        assert req.name
        if req.use_pep517:
            assert req.metadata_directory
            assert req.pep517_backend
            if global_options:
                logger.warning(
                    "Ignoring --global-option when building %s using PEP 517", req.name
                )
            if build_options:
                logger.warning(
                    "Ignoring --build-option when building %s using PEP 517", req.name
                )
            if editable:
                wheel_path = build_wheel_editable(
                    name=req.name,
                    backend=req.pep517_backend,
                    metadata_directory=req.metadata_directory,
                    tempd=temp_dir.path,
                )
            else:
                wheel_path = build_wheel_pep517(
                    name=req.name,
                    backend=req.pep517_backend,
                    metadata_directory=req.metadata_directory,
                    tempd=temp_dir.path,
                )
        else:
            wheel_path = build_wheel_legacy(
                name=req.name,
                setup_py_path=req.setup_py_path,
                source_dir=req.unpacked_source_directory,
                global_options=global_options,
                build_options=build_options,
                tempd=temp_dir.path,
            )

        if wheel_path is not None:
            wheel_name = os.path.basename(wheel_path)
            dest_path = os.path.join(output_dir, wheel_name)
            try:
                wheel_hash, length = hash_file(wheel_path)
                shutil.move(wheel_path, dest_path)
                logger.info(
                    "Created wheel for %s: filename=%s size=%d sha256=%s",
                    req.name,
                    wheel_name,
                    length,
                    wheel_hash.hexdigest(),
                )
                logger.info("Stored in directory: %s", output_dir)
                return dest_path
            except Exception as e:
                logger.warning(
                    "Building wheel for %s failed: %s",
                    req.name,
                    e,
                )
        # Ignore return, we can't do anything else useful.
        if not req.use_pep517:
            _clean_one_legacy(req, global_options)
        return None


def _clean_one_legacy(req: InstallRequirement, global_options: List[str]) -> bool:
    clean_args = make_setuptools_clean_args(
        req.setup_py_path,
        global_options=global_options,
    )

    logger.info("Running setup.py clean for %s", req.name)
    try:
        call_subprocess(
            clean_args, command_desc="python setup.py clean", cwd=req.source_dir
        )
        return True
    except Exception:
        logger.error("Failed cleaning build dir for %s", req.name)
        return False


def build(
    requirements: Iterable[InstallRequirement],
    wheel_cache: WheelCache,
    verify: bool,
    build_options: List[str],
    global_options: List[str],
) -> BuildResult:
    """Build wheels.

    :return: The list of InstallRequirement that succeeded to build and
        the list of InstallRequirement that failed to build.
    """
    if not requirements:
        return [], []

    # Build the wheels.
    logger.info(
        "Building wheels for collected packages: %s",
        ", ".join(req.name for req in requirements),  # type: ignore
    )

    with indent_log():
        build_successes, build_failures = [], []
        for req in requirements:
            assert req.name
            cache_dir = _get_cache_dir(req, wheel_cache)
            wheel_file = _build_one(
                req,
                cache_dir,
                verify,
                build_options,
                global_options,
                req.editable and req.permit_editable_wheels,
            )
            if wheel_file:
                # Record the download origin in the cache
                if req.download_info is not None:
                    # download_info is guaranteed to be set because when we build an
                    # InstallRequirement it has been through the preparer before, but
                    # let's be cautious.
                    wheel_cache.record_download_origin(cache_dir, req.download_info)
                # Update the link for this.
                req.link = Link(path_to_url(wheel_file))
                req.local_file_path = req.link.file_path
                assert req.link.is_wheel
                build_successes.append(req)
            else:
                build_failures.append(req)

    # notify success/failure
    if build_successes:
        logger.info(
            "Successfully built %s",
            " ".join([req.name for req in build_successes]),  # type: ignore
        )
    if build_failures:
        logger.info(
            "Failed to build %s",
            " ".join([req.name for req in build_failures]),  # type: ignore
        )
    # Return a list of requirements that failed to build
    return build_successes, build_failures
python3.12/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-312.pyc000064400000040654151732701160024335 0ustar00�

R`i<��r�UddlZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlmZddlmZdd	lmZmZmZmZmZmZgd
�Zej>e �Z!e"edd�Z#e$e%d
<ejLdk\Z'de(fd�Z)e)�Z*e*sddlm+Z+e're*s
ejXZ-nej\Z-de(fd�Z/dee$e$fde(fd�Z0ejbd��de(fd��Z2ejbd��de(fd��Z3ejbd��de(fd��Z4ejbd��de(fd��Z5ejbd��de(fd��Z6dee$de	e$ddffd�Z7ejbd��dejpdejpde$ddfd ��Z9dejpdejpde$de(fd!�Z:ejbd��d"dddd#�d$e(d%e
e$d&e
e$d'e
e$ddf
d(��Z;					d2d)e$d$e(d%e
e$d&e
e$d*e(d'e
e$defd+�Z<de$fd,�Z=de$fd-�Z>d.e$de(fd/�Z?de$fd0�Z@de$fd1�ZAy)3�N)�Any�Dict�	Generator�Optional�Tuple)�SCHEME_KEYS�Scheme)�WINDOWS)�
deprecated)�running_under_virtualenv�)�
_sysconfig)�USER_CACHE_DIR�get_major_minor_version�get_src_prefix�is_osx_framework�
site_packages�	user_site)
r�get_bin_prefix�get_bin_userr�get_platlib�get_purelib�
get_schemerrr�
platlibdir�lib�_PLATLIBDIR)��
�returnc�>�tttdt��S)axThis function determines the value of _USE_SYSCONFIG.

    By default, pip uses sysconfig on Python 3.10+.
    But Python distributors can override this decision by setting:
        sysconfig._PIP_USE_SYSCONFIG = True / False
    Rationale in https://github.com/pypa/pip/issues/10647

    This is a function for testability, but should be constant during any one
    run.
    �_PIP_USE_SYSCONFIG)�bool�getattr�	sysconfig�_USE_SYSCONFIG_DEFAULT����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/locations/__init__.py�_should_use_sysconfigr).s����	�#7�9O�P�Q�Qr'��
_distutilsc�H�ddlm}	|dd}|dk(S#t$rYywxYw)zsThe resolution to bpo-44860 will change this incorrect platlib.

    See <https://bugs.python.org/issue44860>.
    r��INSTALL_SCHEMES�	unix_user�platlibFz	$usersite)�distutils.command.installr.�KeyError)r.�unix_user_platlibs  r(�_looks_like_bpo_44860r4Ls=��
:��+�K�8��C����+�+������s��	!�!�schemec��|d}d|vr|jddt�d��}d|vry|jdd�}|jdd�|d	k(S)
Nr0z
/$platlibdir/�/�/lib64/Fz/lib/z
$platbase/z$base/�purelib)�replacer)r5r0�	unpatcheds   r(�+_looks_like_red_hat_patched_platlib_purelibr<Zse���Y��G��'�!��/�/�/�Q�{�m�1�3E�F���������	�7�3�I����\�8�4��y�8I�I�Ir')�maxsizec�8��ddlm�t�fd�dD��S)z�Red Hat patches platlib in unix_prefix and unix_home, but not purelib.

    This is the only way I can see to tell a Red Hat-patched Python.
    rr-c3�F�K�|]}|�vxrt�|����y�w�N)r<)�.0�kr.s  �r(�	<genexpr>z*_looks_like_red_hat_lib.<locals>.<genexpr>ls9������.�A�	
�_��	L�7���8J�K�	L�-�s�!)�unix_prefix�	unix_home)r1r.�allr-s@r(�_looks_like_red_hat_librGds$���:���.���r'c�"�ddlm}d|vxrd|vS)z#Debian adds two additional schemes.rr-�
deb_system�
unix_local)r1r.r-s r(�_looks_like_debian_schemerKss��:��?�*�N�|��/N�Nr'c�L�ddlm}ddlm}||��}|j	�|j
tjjtj
��d�k(xr=|jtjjtj��d�k(S)a\Red Hat patches ``sys.prefix`` and ``sys.exec_prefix``.

    Red Hat's ``00251-change-user-install-location.patch`` changes the install
    command's ``prefix`` and ``exec_prefix`` to append ``"/local"``. This is
    (fortunately?) done quite unconditionally, so we create a default command
    object without any configuration to detect this.
    r)�install)�Distributionz/local)r1rM�distutils.distrN�finalize_options�exec_prefix�os�path�normpath�sys�prefix)rMrN�cmds   r(�_looks_like_red_hat_schemerX{s{��2�+��|�~�&�C��������b�g�g�.�.�s���?�@��G�G�	B��J�J�R�W�W�-�-�c�j�j�9�:�&�A�A�r'c��t�y	tjdd��}d|dvxrdtvS#t$rYywxYw)z�Slackware patches sysconfig but fails to patch distutils and site.

    Slackware changes sysconfig's user scheme to use ``"lib64"`` for the lib
    path, but does not do the same to the site module.
    F�
posix_user)r5�expandr8r9)rr$�	get_pathsr2��pathss r(�_looks_like_slackware_schemer_�sT�������#�#�<��F����i�(�(�G�Y�i�-G�G������s�1�	=�=c�h��tjdd���td��fd�dD�D��S)a�MSYS2 patches distutils and sysconfig to use a UNIX-like scheme.

    However, MSYS2 incorrectly patches sysconfig ``nt`` scheme. The fix is
    likely going to be included in their 3.10 release, so we ignore the warning.
    See msys2/MINGW-packages#9319.

    MSYS2 MINGW's patch uses lowercase ``"lib"`` instead of the usual uppercase,
    and is missing the final ``"site-packages"``.
    �ntF)r[c3�XK�|]"}d|vxrd|vxr|jd����$y�w)�Librz
site-packagesN)�endswith)rA�ps  r(rCz1_looks_like_msys2_mingw_scheme.<locals>.<genexpr>�s9�����?�A�	�Q��I�5�A�:�I�a�j�j��.I�*I�I�?�s�(*c3�(�K�|]	}�|���y�wr@r&)rA�keyr^s  �r(rCz1_looks_like_msys2_mingw_scheme.<locals>.<genexpr>�s�����?�(>��%��*�(>�s��r0r9)r$r\rFr]s@r(�_looks_like_msys2_mingw_schemeri�s7���
����U�3�E���?�(>�?���r'�partsc#�K�tjd�}ttdd�}|r|r|j	|�s|Ed{���y|D](}|j	|�r|ddt|�z
}|���*y7�3�w)N�	LDVERSION�abiflagsr)r$�get_config_varr#rUrd�len)rj�	ldversionrm�parts    r(�
_fix_abiflagsrr�s|�����(�(��5�I��s�J��-�H��H�I�,>�,>�x�,H��������=�=��#��-�1�s�8�}�,�.�D��
��		�s�AA9�A7�4A9�old�newrgc�H�d}d}tjt|||||�y)Nz(https://github.com/pypa/pip/issues/10151zSValue for %s does not match. Please report this to <%s>
distutils: %s
sysconfig: %s)�logger�log�_MISMATCH_LEVEL)rsrtrg�	issue_url�messages     r(�_warn_mismatchedr{�s)��:�I�	��
�J�J����i��c�Br'c�,�||k(ryt|||��y)NF�rgT)r{)rsrtrgs   r(�_warn_if_mismatchr~�s��
�c�z���S�#�3�'�r'F��user�home�rootrVr�r�r�rVc�f�gd�}tjtdj|�||||�y)N)zAdditional context:z	user = %rz	home = %rz	root = %rzprefix = %r�
)rvrwrx�join)r�r�r�rVrjs     r(�_log_contextr��s*��
�E��J�J���	�	�%� 0�$��d�F�Kr'�	dist_name�isolatedc	�f���tj||||||��}tr|Stj||||||���g}tD�]�}tjt�|��}	tjt||��}
|	|
k(r�Htjjdk(xr_|duxrY|dvxrS|	j|
jk(xr8|	jjd�xr|
jjd�}|r��|xr]t�xrQ|dk(xrJ|	jj|
jk(xr%|	jjjd�}|r��.|dk(rt�r��?|xr:|dk(xr3txr*tj dk\xrt"dk7xr
t%�}
|
r���|xr|dvxrtxr
t'�}|r���|xs|xs|xs
t)�xr�|	j*d	d
dk(xrrt-|
j*�d	kDxrX|
j*d	dk(xrDt-|
j*�d
kxs|
j*d
dk7xrt/�xs
t1�}|r��Etj dkxr:txr1|dvxr+t3t5|	j*��|
j*k(}|r���txr|dvxr
t7�}|r���t9j:d��xr
txr|dv}|r���|j=|	|
d|��f����|s�Stj>||||||d���tA��fd�tD��rtCddd���S|D]\}	}
}tE|	|
|���tG||||���S)N)r�r�r�r�rV�pypyrh�python�headersr0)r�	rr
r)�usr�localr��r�)r�)r�r0r9T)�
check_home)r��include�platincludezscheme.)�ignore_config_filesc3�B�K�|]}�|t�|�k7���y�wr@)r#)rArB�default_oldrss  ��r(rCzget_scheme.<locals>.<genexpr>�s!�����
B�k��;�q�>�W�S�!�_�,�k�s�z�Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621)�reason�replacement�gone_inr}r)$rr�_USE_SYSCONFIGr+r�pathlib�Pathr#rU�implementation�name�parent�
startswithrrGr
�version_inforr4r_rrjrorXrK�tuplerrrir$�is_python_build�append�distutils_scheme�anyrr{r�)r�r�r�r�r�rVrt�warning_contextsrB�old_v�new_v�skip_pypy_special_case�$skip_osx_framework_user_special_case�skip_bpo_44860�skip_slackware_user_scheme�skip_linux_system_special_case�skip_sysconfig_abiflag_bug�skip_msys2_mingw_bug�skip_cpython_buildrgr�rss                    @@r(rr�s;����
�
��
�
�
���
�C���
�
�
�
��
�
�
���
�C���
�[�����W�S�!�_�-�����W�S�!�_�-���E�>��
���#�#�v�-�
.��D� �
.��+�+�
.�������,�
.��
�
�%�%�h�/�	
.�
�
�
�%�%�f�-�
	�"��
�
7� �"�
7��Y��
7����#�#�u�|�|�3�
7����!�!�,�,�X�6�	-�0��
�	�>�5�7��
�
(��Y��
(���
(�� � �F�*�
(��u�$�	
(�
&�'�
	���

�
/��+�+�
/���
/�-�.�		#�&���E��E��E�+C�+E�F�
N����A�a� �$4�4�
N��E�K�K� �1�$�
N����A��%�'�
N��U�[�[�!�A�%�B����Q��7�)B�	
N�
,�-�L�1J�1L�
	'�*��

���v�%�
A���
A��6�6�
A��m�E�K�K�0�1�U�[�[�@�		#�&��

�X��3�3�X�8V�8X�	� ��
�%�%��6�
;���
;��:�:�	�
����������}� =�>�_�b��
�
�-�-������� ��K��
B�k�
B�B��L�
��		
��
�.���u�c����3�/�.��d��D��@��Jr'c���tj�}tr|Stj�}t	tj|�tj|�d��r
t�|S)N�
bin_prefixr})rrr�r+r~r�r�r��rtrss  r(rr�sN��
�
#�
#�
%�C���
�
�
#�
#�
%�C�����c�*�G�L�L��,=�<�P����Jr'c�D�tjdd��jS)N�T)r�)rr�scriptsr&r'r(rr�s��� � ��$�/�7�7�7r'�valuec�&�t�sy|dk(ryy)a�Check if the value is Debian's APT-controlled dist-packages.

    Debian's ``distutils.sysconfig.get_python_lib()`` implementation returns the
    default package path controlled by APT, but does not patch ``sysconfig`` to
    do the same. This is similar to the bug worked around in ``get_scheme()``,
    but here the default is ``deb_system`` instead of ``unix_local``. Ultimately
    we can't do anything about this Debian bug, and this detection allows us to
    skip the warning when needed.
    Fz/usr/lib/python3/dist-packagesT)rK)r�s r(�$_looks_like_deb_system_dist_packagesr��s��%�&���0�0��r'c��tj�}tr|Stj�}t	|�r|Stt
j|�t
j|�d��r
t�|S)z,Return the default pure-Python lib location.r9r})	rrr�r+r�r~r�r�r�r�s  r(rr�s[��
�
 �
 �
"�C���
�
�
 �
 �
"�C�+�C�0��
�����c�*�G�L�L��,=�9�M����Jr'c��tj�}tr|Sddlm}|j�}t|�r|St
tj|�tj|�d��r
t�|S)z0Return the default platform-shared lib location.r
r*r0r})
rrr�r�r+r�r~r�r�r�)rtr+rss   r(rr�s`��
�
 �
 �
"�C���
��
 �*�
 �
 �
"�C�+�C�0��
�����c�*�G�L�L��,=�9�M����Jr')FNNFN)B�	functools�loggingrRr�rUr$�typingrrrrr�pip._internal.models.schemerr	�pip._internal.utils.compatr
�pip._internal.utils.deprecationr�pip._internal.utils.virtualenvrr�r�baserrrrrr�__all__�	getLogger�__name__rvr#r�str�__annotations__r�r%r"r)r�r+�WARNINGrx�DEBUGr4r<�	lru_cacherGrKrXr_rirrr�r{r~r�rrrr�rrr&r'r(�<module>r�s`����	��
��8�8�;�.�6�C������
��	�	�8�	$���3��e�4��S�4��)�)�W�4��R�t�R�'�(�����.��o�o�O��m�m�O�,�t�,�J��S�#�X��J�4�J�����T�"����#������T�"�O�4�O�#�O�����T�"��D��#��&����T�"�H�d�H�#�H�����T�"����#��"
��s��
�	�#�t�T�/�(B�
� ����T�"�C�'�,�,�C�W�\�\�C�3�C�4�C�#�C��7�<�<��g�l�l��C��D������T�"���� �L�
�L��3�-�L��3�-�	L�

�S�M�L�
�
L�#�L�(���� �
o��o�
�o��3�-�o��3�-�	o�
�o�
�S�M�
o��o�d���8�c�8������"�S��
�S�
r'python3.12/site-packages/pip/_internal/locations/__pycache__/_sysconfig.cpython-312.pyc000064400000017567151732701160024750 0ustar00�

R`i����ddlZddlZddlZddlZddlZddlmZmZddlm	Z	m
Z
ddlmZddl
mZmZmZej"e�Zeej*��Zeedd�Zdefd	�Zdefd
�Zdefd�Zdefd�Zgd
�Zej@d��ejCd�					ddededejDedejDededejDede
fd�Z#defd�Z$defd�Z%defd�Z&y)�N)�InvalidSchemeCombination�UserInstallationInvalid)�SCHEME_KEYS�Scheme)�running_under_virtualenv�)�change_root�get_major_minor_version�is_osx_framework�get_preferred_scheme�returnc�D�dtvxrt�xr
t�S)a�Check for Apple's ``osx_framework_library`` scheme.

    Python distributed by Apple's Command Line Tools has this special scheme
    that's used when:

    * This is a framework build.
    * We are installing into the system prefix.

    This does not account for ``pip install --prefix`` (also means we're not
    installing to the system prefix), which should use ``posix_prefix``, but
    logic here means ``_infer_prefix()`` outputs ``osx_framework_library``. But
    since ``prefix`` is not available for ``sysconfig.get_default_scheme()``,
    which is the stdlib replacement for ``_infer_prefix()``, presumably Apple
    wouldn't be able to magically switch between ``osx_framework_library`` and
    ``posix_prefix``. ``_infer_prefix()`` returning ``osx_framework_library``
    means its behavior is consistent whether we use the stdlib implementation
    or our own, and we deal with this special case in ``get_scheme()`` instead.
    �osx_framework_library)�_AVAILABLE_SCHEMESrr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/locations/_sysconfig.py� _should_use_osx_framework_prefixrs+��(	 �#5�5�	�(�*�*�	���rc��trtd�St�rytjj�dt
j��}|tvr|StjjtvrtjjSt
j�d�}|tvr|St
jtvrt
jSy)a!Try to find a prefix scheme for the current platform.

    This tries:

    * A special ``osx_framework_library`` for Python distributed by Apple's
      Command Line Tools, when not running in a virtual environment.
    * Implementation + OS, used by PyPy on Windows (``pypy_nt``).
    * Implementation without OS, used by PyPy on POSIX (``pypy``).
    * OS + "prefix", used by CPython on POSIX (``posix_prefix``).
    * Just the OS name, used by CPython on Windows (``nt``).

    If none of the above works, fall back to ``posix_prefix``.
    �prefixr�_�_prefix�posix_prefix)�_PREFERRED_SCHEME_APIr�sys�implementation�name�osr)�implementation_suffixed�suffixeds  r�
_infer_prefixr!7s����$�X�.�.�'�)�&�!$�!3�!3�!8�!8� 9��2�7�7�)�D���"4�4�&�&�
�����"4�4��!�!�&�&�&��'�'��'�"�H��%�%���	�w�w�$�$��w�w��rc��trtd�St�r
t�sd}ntj�d�}|t
vr|Sdt
vr
t
��y)z3Try to find a user scheme for the current platform.�user�osx_framework_user�_user�
posix_user)rrrrrrr�r s r�_infer_userr(VsT���$�V�,�,���":�"<�'���g�g�Y�e�$���%�%����-�-�%�'�'�rc�`�trtd�Stj�d�}|tvr|Sy)z,Try to find a home for the current platform.�home�_home�
posix_home)rrrrr's r�_infer_homer-es1���$�V�,�,��'�'��%� �H��%�%���r)�installed_base�base�installed_platbase�platbaser�exec_prefix�userbase�	dist_namer#r*�root�isolatedrc�$�|r|rtdd��|r|rtdd��|�t�}n|rt�}n
t�}|�|dk(rd}|�tD�cic]}||��}}n|�tD�cic]}||��}}ni}tj||��}	t�rv|r!|jdtj�}
n |jdtj�}
d	t���}tjj|
d
d|�|	d
<n|sd}t|	d
|	dtjj|	d
|�|	d|	d��}|�.t D]%}
t#|t%||
��}t'||
|��'|Scc}wcc}w)a\
    Get the "scheme" corresponding to the input parameters.

    :param dist_name: the name of the package to retrieve the scheme for, used
        in the headers scheme path
    :param user: indicates to use the "user" scheme
    :param home: indicates to use the "home" scheme
    :param root: root under which other directories are re-based
    :param isolated: ignored, but kept for distutils compatibility (where
        this controls whether the user-site pydistutils.cfg is honored)
    :param prefix: indicates to use the "prefix" scheme and provides the
        base directory for the same
    z--userz--prefixz--homerr)�scheme�varsr3r/�python�include�site�UNKNOWN�platlib�purelib�scripts�data)r>r?�headersr@rA)rr-r(r!�
_HOME_KEYS�	sysconfig�	get_pathsr�getrrr
r�path�joinrrr	�getattr�setattr)r4r#r*r5r6r�scheme_name�k�	variables�pathsr/�	python_xyr8�key�values               r�
get_schemerR|s���*��&�x��<�<���&�x��<�<���!�m��	
�!�m��#�o��
��k�-D�D�$����&0�1�j��Q��W�j�	�1�	�	�(2�3�
�1�Q��Y�
�	�3��	����{��C�E� �!���=�=��S�Z�Z�8�D��=�=�����4�D��4�6�7�8�	��7�7�<�<��i���K��i��
��	�
��i� ��i� ������U�9�-�y�9��i� �
�6�]��F����C���g�f�c�&:�;�E��F�C��'���M��E2��3s�
F�/
F
c��tjdddk(rtjdddk(rytj�dS)N��darwin�z/System/Library/z/usr/local/binr@)r�platformrrDrErrr�get_bin_prefixrX�s>��
�|�|�B�Q��8�#��
�
�3�B��;M�(M����� ��+�+rc�0�tj�dS)Nr?�rDrErrr�get_purelibr[������� ��+�+rc�0�tj�dS)Nr>rZrrr�get_platlibr^�r\r)FNNFN)'�loggingrrrD�typing�pip._internal.exceptionsrr�pip._internal.models.schemerr�pip._internal.utils.virtualenvrr/r	r
r�	getLogger�__name__�logger�set�get_scheme_namesrrIr�boolr�strr!r(r-rC�get_config_var�append�OptionalrRrXr[r^rrr�<module>rnsX���	�
��
�V�;�C�H�H�	��	�	�8�	$���3��3�3�5�6���	�+A�4�H���$��4�s��>�S���S���
��9���J�'�3����j�!�
�!%�!%��#'�
J��J�
�J��/�/�#�
�J��/�/�#�
�	J�
�J�
�O�O�C� �
J��J�Z,��,�,�S�,�,�S�,rpython3.12/site-packages/pip/_internal/locations/__pycache__/base.cpython-312.pyc000064400000007364151732701160023511 0ustar00�

R`i�	���UddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZe	jd�Z
ejd�Zeed<defd	�Zd
ededefd�Zdefd
�Z	ej*�Zej.eed<ej4d��defd��Zy#e$rej2ZY�0wxYw)�N)�InstallationError)�appdirs)�running_under_virtualenv�pip�purelib�
site_packages�returnc�<�djtj�S)ze
    Return the major-minor version of the current Python as a string, e.g.
    "3.7" or "3.10".
    z{}.{})�format�sys�version_info����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/locations/base.py�get_major_minor_versionrs��
�7�>�>�3�+�+�,�,r�new_root�pathnamec���tjdk(rbtjj|�s tjj	||�Stjj	||dd�Stjdk(rOtjj|�\}}|ddk(r|dd}tjj	||�St
dtj�d���)	aQReturn 'pathname' with 'new_root' prepended.

    If 'pathname' is relative, this is equivalent to os.path.join(new_root, pathname).
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.

    This is borrowed from Python's standard library's distutils module.
    �posix�N�ntr�\zUnknown platform: z5
Can not change root path prefix on unknown platform.)�os�name�path�isabs�join�
splitdriver)rr�drivers    r�change_rootr s���
�w�w�'���w�w�}�}�X�&��7�7�<�<��(�3�3��7�7�<�<��(�1�2�,�7�7�	���D�����*�*�8�4�
�����7�d�?����8�D��w�w�|�|�H�d�+�+� � ����	�*C�
C�
�	
rc�`�t�r/tjjtj
d�}n3	tjjtj�d�}tjj�S#t$rt	jd�Y�?wxYw)N�srcz=The folder you are executing pip from can no longer be found.)
rrrrr�prefix�getcwd�OSError�exit�abspath)�
src_prefixs r�get_src_prefixr)7su���!��W�W�\�\�#�*�*�e�4�
�	V������b�i�i�k�5�9�J��7�7�?�?�:�&�&��
�	V��H�H�T�U�	V�s�2B�B-�,B-�	user_site)�maxsizec�>�ttjd��S)N�PYTHONFRAMEWORK)�bool�	sysconfig�get_config_varrrr�is_osx_frameworkr1Os���	�(�(�):�;�<�<r)�	functoolsr�siterr/�typing�pip._internal.exceptionsr�pip._internal.utilsr�pip._internal.utils.virtualenvr�user_cache_dir�USER_CACHE_DIR�get_pathr�str�__annotations__rr r)�getusersitepackagesr*�Optional�AttributeError�	USER_SITE�	lru_cacher.r1rrr�<module>rBs����	��
��
�6�'�C�(��'�'��.��(�Y�'�'�	�2�
�s�2�-��-�
�#�
��
��
�8
'��
'� �'?�d�&>�&>�&@�I�v���s�#�@�
����T�"�=�$�=�#�=�������I��s�,#B,�,C�?Cpython3.12/site-packages/pip/_internal/locations/__pycache__/_distutils.cpython-312.pyc000064400000015363151732701160024760 0ustar00�

R`i�����dZ	ed�j�ddlZddlZddlZddlm	Z
ddlmZddlm
ZddlmZddlmZmZmZmZmZdd	lmZdd
lmZddlmZdd
lmZej>e �Z!					ddd�de"de#dee"dee"de#dee"de#dee"e"ffd�Z$					dde"de#dee"dee"de#dee"defd�Z%de"fd�Z&de"fd�Z'de"fd�Z(y#eef$rY��wxYw)z7Locations where we look for configs, install stuff, etc�_distutils_hack�N)�Command)�SCHEME_KEYS)�install��get_python_lib)�Dict�List�Optional�Union�cast)�Scheme)�WINDOWS)�running_under_virtualenv�)�get_major_minor_versionF)�ignore_config_files�	dist_name�user�home�root�isolated�prefixr�returnc��ddlm}d|i}|rdg|d<||�}	|s	|	j�d	}|	jd
d��}|�J�tt|�}|r|r
Jd
|�d|����|r|r
Jd|�d|����|xs|j|_|s|rd|_|xs|j|_|xs|j|_
|xs|j|_|j�i}
t D]}t#|d|z�|
|<�d|	j%d
�vr(|
j'|j(|j(d��t+�r�|r|}n|r
|j,}n|j}t.j0j|dddt3���|�|
d<|�ht.j0j5t.j0j7|
d��d}t.j0j||dd	�|
d<|
S#t$r@|	j	�}
t
j
ddjd�|
D���Y��#wxYw)z+
    Return a distutils install scheme
    r)�Distribution�namez
--no-user-cfg�script_argsz6Ignore distutils configs in %s due to encoding errors.z, c3�ZK�|]#}tjj|����%y�w)N)�os�path�basename)�.0�ps  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/locations/_distutils.py�	<genexpr>z#distutils_scheme.<locals>.<genexpr>?s ����=�u�!�"�'�'�*�*�1�-�u�s�)+NrT)�createzuser=z prefix=zhome=��install_�install_lib)�purelib�platlib�include�site�python�headersr)�distutils.distr�parse_config_files�UnicodeDecodeError�find_config_files�logger�warning�join�get_command_objr
�distutils_install_commandrrrr�finalize_optionsr�getattr�get_option_dict�updater*r�install_userbaser r!r�
splitdrive�abspath)rrrrrrrr�	dist_args�d�paths�obj�i�scheme�key�
path_no_drives                r%�distutils_schemerI#sF��,�39�9�2E�I��$3�#4�	�-� ��Y��A��	�
� � �"�'+�C�
�
�
�I�d�
�
3�C��?��?��
&��,�A���@�E�$��x��x�"@�@� ���@�E�$��x��x�"@�@� �
�^�Q�V�V�A�F��t�����!����A�H�
�^�Q�V�V�A�F�
�^�Q�V�V�A�F�����
�F����a��c�!1�2��s�����)�)�)�4�4��
�
�!�-�-�A�M�M�J�K��!���F�
��'�'�F��X�X�F��G�G�L�L�����,�.�/�0��
��y�����G�G�.�.�r�w�w���v�i�?P�/Q�R�ST�U�M� "�����T�=���3D� E�F�9���M��o"�	��'�'�)�E��N�N�H��	�	�=�u�=�=�
�	�s�H	�	AI�Ic�`�t||||||�}t|d|d|d|d|d��S)a;
    Get the "scheme" corresponding to the input parameters. The distutils
    documentation provides the context for the available schemes:
    https://docs.python.org/3/install/index.html#alternate-installation

    :param dist_name: the name of the package to retrieve the scheme for, used
        in the headers scheme path
    :param user: indicates to use the "user" scheme
    :param home: indicates to use the "home" scheme and provides the base
        directory for the same
    :param root: root under which other directories are re-based
    :param isolated: equivalent to --no-user-cfg, i.e. do not consider
        ~/.pydistutils.cfg (posix) or ~/pydistutils.cfg (non-posix) for
        scheme paths
    :param prefix: indicates to use the "prefix" scheme and provides the
        base directory for the same
    r,r+r0�scripts�data)r,r+r0rKrL)rIr)rrrrrrrFs       r%�
get_schemerMtsL��2�i��t�T�8�V�
L�F���y�!��y�!��y�!��y�!�
�F�^���c��tjjtj�}t
ratjj
|d�}tjj|�s tjj
|d�}|Stjdddk(r	|dddk(rytjj
|d�S)N�Scripts�bin��darwin�z/System/Library/z/usr/local/bin)	r r!�normpath�sysrrr7�exists�platform)r�bin_pys  r%�get_bin_prefixrZ�s����W�W�
�
�c�j�j�
)�F�������f�i�0���w�w�~�~�f�%��W�W�\�\�&�%�0�F��
��|�|�B�Q��8�#��s���7I�(I��
�7�7�<�<���&�&rNc��td��S)NF��
plat_specificr�rNr%�get_purelibr_�s
����.�.rNc��td��S)NTr\rr^rNr%�get_platlibra�s
����-�-rN)FNNFN))�__doc__�
__import__�remove_shim�ImportError�AttributeError�loggingr rV�
distutils.cmdr�DistutilsCommand�distutils.command.installrrr9�distutils.sysconfigr�typingr	r
rrr
�pip._internal.models.schemer�pip._internal.utils.compatr�pip._internal.utils.virtualenvr�baser�	getLogger�__name__r5�str�boolrIrMrZr_rar^rNr%�<module>rus���=�	�� �!�-�-�/��	�
�5�1�J�.�4�4�.�.�C�)�	��	�	�8�	$��
���� �
N�!&�N��N�
�N��3�-�N��3�-�	N�
�N�
�S�M�
N��N�
�#�s�(�^�N�f���� �
 �� �
� ��3�-� ��3�-�	 �
� �
�S�M�
 �� �F'��'�"/�S�/�.�S�.��}	�^�$�	��	�s�C�C�Cpython3.12/site-packages/pip/_internal/locations/base.py000064400000004774151732701160017152 0ustar00import functools
import os
import site
import sys
import sysconfig
import typing

from pip._internal.exceptions import InstallationError
from pip._internal.utils import appdirs
from pip._internal.utils.virtualenv import running_under_virtualenv

# Application Directories
USER_CACHE_DIR = appdirs.user_cache_dir("pip")

# FIXME doesn't account for venv linked to global site-packages
site_packages: str = sysconfig.get_path("purelib")


def get_major_minor_version() -> str:
    """
    Return the major-minor version of the current Python as a string, e.g.
    "3.7" or "3.10".
    """
    return "{}.{}".format(*sys.version_info)


def change_root(new_root: str, pathname: str) -> str:
    """Return 'pathname' with 'new_root' prepended.

    If 'pathname' is relative, this is equivalent to os.path.join(new_root, pathname).
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.

    This is borrowed from Python's standard library's distutils module.
    """
    if os.name == "posix":
        if not os.path.isabs(pathname):
            return os.path.join(new_root, pathname)
        else:
            return os.path.join(new_root, pathname[1:])

    elif os.name == "nt":
        (drive, path) = os.path.splitdrive(pathname)
        if path[0] == "\\":
            path = path[1:]
        return os.path.join(new_root, path)

    else:
        raise InstallationError(
            f"Unknown platform: {os.name}\n"
            "Can not change root path prefix on unknown platform."
        )


def get_src_prefix() -> str:
    if running_under_virtualenv():
        src_prefix = os.path.join(sys.prefix, "src")
    else:
        # FIXME: keep src in cwd for now (it is not a temporary folder)
        try:
            src_prefix = os.path.join(os.getcwd(), "src")
        except OSError:
            # In case the current working directory has been renamed or deleted
            sys.exit("The folder you are executing pip from can no longer be found.")

    # under macOS + virtualenv sys.prefix is not properly resolved
    # it is something like /path/to/python/bin/..
    return os.path.abspath(src_prefix)


try:
    # Use getusersitepackages if this is present, as it ensures that the
    # value is initialised properly.
    user_site: typing.Optional[str] = site.getusersitepackages()
except AttributeError:
    user_site = site.USER_SITE


@functools.lru_cache(maxsize=None)
def is_osx_framework() -> bool:
    return bool(sysconfig.get_config_var("PYTHONFRAMEWORK"))
python3.12/site-packages/pip/_internal/locations/_sysconfig.py000064400000017000151732701160020365 0ustar00import logging
import os
import sys
import sysconfig
import typing

from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid
from pip._internal.models.scheme import SCHEME_KEYS, Scheme
from pip._internal.utils.virtualenv import running_under_virtualenv

from .base import change_root, get_major_minor_version, is_osx_framework

logger = logging.getLogger(__name__)


# Notes on _infer_* functions.
# Unfortunately ``get_default_scheme()`` didn't exist before 3.10, so there's no
# way to ask things like "what is the '_prefix' scheme on this platform". These
# functions try to answer that with some heuristics while accounting for ad-hoc
# platforms not covered by CPython's default sysconfig implementation. If the
# ad-hoc implementation does not fully implement sysconfig, we'll fall back to
# a POSIX scheme.

_AVAILABLE_SCHEMES = set(sysconfig.get_scheme_names())

_PREFERRED_SCHEME_API = getattr(sysconfig, "get_preferred_scheme", None)


def _should_use_osx_framework_prefix() -> bool:
    """Check for Apple's ``osx_framework_library`` scheme.

    Python distributed by Apple's Command Line Tools has this special scheme
    that's used when:

    * This is a framework build.
    * We are installing into the system prefix.

    This does not account for ``pip install --prefix`` (also means we're not
    installing to the system prefix), which should use ``posix_prefix``, but
    logic here means ``_infer_prefix()`` outputs ``osx_framework_library``. But
    since ``prefix`` is not available for ``sysconfig.get_default_scheme()``,
    which is the stdlib replacement for ``_infer_prefix()``, presumably Apple
    wouldn't be able to magically switch between ``osx_framework_library`` and
    ``posix_prefix``. ``_infer_prefix()`` returning ``osx_framework_library``
    means its behavior is consistent whether we use the stdlib implementation
    or our own, and we deal with this special case in ``get_scheme()`` instead.
    """
    return (
        "osx_framework_library" in _AVAILABLE_SCHEMES
        and not running_under_virtualenv()
        and is_osx_framework()
    )


def _infer_prefix() -> str:
    """Try to find a prefix scheme for the current platform.

    This tries:

    * A special ``osx_framework_library`` for Python distributed by Apple's
      Command Line Tools, when not running in a virtual environment.
    * Implementation + OS, used by PyPy on Windows (``pypy_nt``).
    * Implementation without OS, used by PyPy on POSIX (``pypy``).
    * OS + "prefix", used by CPython on POSIX (``posix_prefix``).
    * Just the OS name, used by CPython on Windows (``nt``).

    If none of the above works, fall back to ``posix_prefix``.
    """
    if _PREFERRED_SCHEME_API:
        return _PREFERRED_SCHEME_API("prefix")
    if _should_use_osx_framework_prefix():
        return "osx_framework_library"
    implementation_suffixed = f"{sys.implementation.name}_{os.name}"
    if implementation_suffixed in _AVAILABLE_SCHEMES:
        return implementation_suffixed
    if sys.implementation.name in _AVAILABLE_SCHEMES:
        return sys.implementation.name
    suffixed = f"{os.name}_prefix"
    if suffixed in _AVAILABLE_SCHEMES:
        return suffixed
    if os.name in _AVAILABLE_SCHEMES:  # On Windows, prefx is just called "nt".
        return os.name
    return "posix_prefix"


def _infer_user() -> str:
    """Try to find a user scheme for the current platform."""
    if _PREFERRED_SCHEME_API:
        return _PREFERRED_SCHEME_API("user")
    if is_osx_framework() and not running_under_virtualenv():
        suffixed = "osx_framework_user"
    else:
        suffixed = f"{os.name}_user"
    if suffixed in _AVAILABLE_SCHEMES:
        return suffixed
    if "posix_user" not in _AVAILABLE_SCHEMES:  # User scheme unavailable.
        raise UserInstallationInvalid()
    return "posix_user"


def _infer_home() -> str:
    """Try to find a home for the current platform."""
    if _PREFERRED_SCHEME_API:
        return _PREFERRED_SCHEME_API("home")
    suffixed = f"{os.name}_home"
    if suffixed in _AVAILABLE_SCHEMES:
        return suffixed
    return "posix_home"


# Update these keys if the user sets a custom home.
_HOME_KEYS = [
    "installed_base",
    "base",
    "installed_platbase",
    "platbase",
    "prefix",
    "exec_prefix",
]
if sysconfig.get_config_var("userbase") is not None:
    _HOME_KEYS.append("userbase")


def get_scheme(
    dist_name: str,
    user: bool = False,
    home: typing.Optional[str] = None,
    root: typing.Optional[str] = None,
    isolated: bool = False,
    prefix: typing.Optional[str] = None,
) -> Scheme:
    """
    Get the "scheme" corresponding to the input parameters.

    :param dist_name: the name of the package to retrieve the scheme for, used
        in the headers scheme path
    :param user: indicates to use the "user" scheme
    :param home: indicates to use the "home" scheme
    :param root: root under which other directories are re-based
    :param isolated: ignored, but kept for distutils compatibility (where
        this controls whether the user-site pydistutils.cfg is honored)
    :param prefix: indicates to use the "prefix" scheme and provides the
        base directory for the same
    """
    if user and prefix:
        raise InvalidSchemeCombination("--user", "--prefix")
    if home and prefix:
        raise InvalidSchemeCombination("--home", "--prefix")

    if home is not None:
        scheme_name = _infer_home()
    elif user:
        scheme_name = _infer_user()
    else:
        scheme_name = _infer_prefix()

    # Special case: When installing into a custom prefix, use posix_prefix
    # instead of osx_framework_library. See _should_use_osx_framework_prefix()
    # docstring for details.
    if prefix is not None and scheme_name == "osx_framework_library":
        scheme_name = "posix_prefix"

    if home is not None:
        variables = {k: home for k in _HOME_KEYS}
    elif prefix is not None:
        variables = {k: prefix for k in _HOME_KEYS}
    else:
        variables = {}

    paths = sysconfig.get_paths(scheme=scheme_name, vars=variables)

    # Logic here is very arbitrary, we're doing it for compatibility, don't ask.
    # 1. Pip historically uses a special header path in virtual environments.
    # 2. If the distribution name is not known, distutils uses 'UNKNOWN'. We
    #    only do the same when not running in a virtual environment because
    #    pip's historical header path logic (see point 1) did not do this.
    if running_under_virtualenv():
        if user:
            base = variables.get("userbase", sys.prefix)
        else:
            base = variables.get("base", sys.prefix)
        python_xy = f"python{get_major_minor_version()}"
        paths["include"] = os.path.join(base, "include", "site", python_xy)
    elif not dist_name:
        dist_name = "UNKNOWN"

    scheme = Scheme(
        platlib=paths["platlib"],
        purelib=paths["purelib"],
        headers=os.path.join(paths["include"], dist_name),
        scripts=paths["scripts"],
        data=paths["data"],
    )
    if root is not None:
        for key in SCHEME_KEYS:
            value = change_root(root, getattr(scheme, key))
            setattr(scheme, key, value)
    return scheme


def get_bin_prefix() -> str:
    # Forcing to use /usr/local/bin for standard macOS framework installs.
    if sys.platform[:6] == "darwin" and sys.prefix[:16] == "/System/Library/":
        return "/usr/local/bin"
    return sysconfig.get_paths()["scripts"]


def get_purelib() -> str:
    return sysconfig.get_paths()["purelib"]


def get_platlib() -> str:
    return sysconfig.get_paths()["platlib"]
python3.12/site-packages/pip/_internal/locations/__init__.py000064400000036005151732701160017767 0ustar00import functools
import logging
import os
import pathlib
import sys
import sysconfig
from typing import Any, Dict, Generator, Optional, Tuple

from pip._internal.models.scheme import SCHEME_KEYS, Scheme
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.deprecation import deprecated
from pip._internal.utils.virtualenv import running_under_virtualenv

from . import _sysconfig
from .base import (
    USER_CACHE_DIR,
    get_major_minor_version,
    get_src_prefix,
    is_osx_framework,
    site_packages,
    user_site,
)

__all__ = [
    "USER_CACHE_DIR",
    "get_bin_prefix",
    "get_bin_user",
    "get_major_minor_version",
    "get_platlib",
    "get_purelib",
    "get_scheme",
    "get_src_prefix",
    "site_packages",
    "user_site",
]


logger = logging.getLogger(__name__)


_PLATLIBDIR: str = getattr(sys, "platlibdir", "lib")

_USE_SYSCONFIG_DEFAULT = sys.version_info >= (3, 10)


def _should_use_sysconfig() -> bool:
    """This function determines the value of _USE_SYSCONFIG.

    By default, pip uses sysconfig on Python 3.10+.
    But Python distributors can override this decision by setting:
        sysconfig._PIP_USE_SYSCONFIG = True / False
    Rationale in https://github.com/pypa/pip/issues/10647

    This is a function for testability, but should be constant during any one
    run.
    """
    return bool(getattr(sysconfig, "_PIP_USE_SYSCONFIG", _USE_SYSCONFIG_DEFAULT))


_USE_SYSCONFIG = _should_use_sysconfig()

if not _USE_SYSCONFIG:
    # Import distutils lazily to avoid deprecation warnings,
    # but import it soon enough that it is in memory and available during
    # a pip reinstall.
    from . import _distutils

# Be noisy about incompatibilities if this platforms "should" be using
# sysconfig, but is explicitly opting out and using distutils instead.
if _USE_SYSCONFIG_DEFAULT and not _USE_SYSCONFIG:
    _MISMATCH_LEVEL = logging.WARNING
else:
    _MISMATCH_LEVEL = logging.DEBUG


def _looks_like_bpo_44860() -> bool:
    """The resolution to bpo-44860 will change this incorrect platlib.

    See <https://bugs.python.org/issue44860>.
    """
    from distutils.command.install import INSTALL_SCHEMES

    try:
        unix_user_platlib = INSTALL_SCHEMES["unix_user"]["platlib"]
    except KeyError:
        return False
    return unix_user_platlib == "$usersite"


def _looks_like_red_hat_patched_platlib_purelib(scheme: Dict[str, str]) -> bool:
    platlib = scheme["platlib"]
    if "/$platlibdir/" in platlib:
        platlib = platlib.replace("/$platlibdir/", f"/{_PLATLIBDIR}/")
    if "/lib64/" not in platlib:
        return False
    unpatched = platlib.replace("/lib64/", "/lib/")
    return unpatched.replace("$platbase/", "$base/") == scheme["purelib"]


@functools.lru_cache(maxsize=None)
def _looks_like_red_hat_lib() -> bool:
    """Red Hat patches platlib in unix_prefix and unix_home, but not purelib.

    This is the only way I can see to tell a Red Hat-patched Python.
    """
    from distutils.command.install import INSTALL_SCHEMES

    return all(
        k in INSTALL_SCHEMES
        and _looks_like_red_hat_patched_platlib_purelib(INSTALL_SCHEMES[k])
        for k in ("unix_prefix", "unix_home")
    )


@functools.lru_cache(maxsize=None)
def _looks_like_debian_scheme() -> bool:
    """Debian adds two additional schemes."""
    from distutils.command.install import INSTALL_SCHEMES

    return "deb_system" in INSTALL_SCHEMES and "unix_local" in INSTALL_SCHEMES


@functools.lru_cache(maxsize=None)
def _looks_like_red_hat_scheme() -> bool:
    """Red Hat patches ``sys.prefix`` and ``sys.exec_prefix``.

    Red Hat's ``00251-change-user-install-location.patch`` changes the install
    command's ``prefix`` and ``exec_prefix`` to append ``"/local"``. This is
    (fortunately?) done quite unconditionally, so we create a default command
    object without any configuration to detect this.
    """
    from distutils.command.install import install
    from distutils.dist import Distribution

    cmd: Any = install(Distribution())
    cmd.finalize_options()
    return (
        cmd.exec_prefix == f"{os.path.normpath(sys.exec_prefix)}/local"
        and cmd.prefix == f"{os.path.normpath(sys.prefix)}/local"
    )


@functools.lru_cache(maxsize=None)
def _looks_like_slackware_scheme() -> bool:
    """Slackware patches sysconfig but fails to patch distutils and site.

    Slackware changes sysconfig's user scheme to use ``"lib64"`` for the lib
    path, but does not do the same to the site module.
    """
    if user_site is None:  # User-site not available.
        return False
    try:
        paths = sysconfig.get_paths(scheme="posix_user", expand=False)
    except KeyError:  # User-site not available.
        return False
    return "/lib64/" in paths["purelib"] and "/lib64/" not in user_site


@functools.lru_cache(maxsize=None)
def _looks_like_msys2_mingw_scheme() -> bool:
    """MSYS2 patches distutils and sysconfig to use a UNIX-like scheme.

    However, MSYS2 incorrectly patches sysconfig ``nt`` scheme. The fix is
    likely going to be included in their 3.10 release, so we ignore the warning.
    See msys2/MINGW-packages#9319.

    MSYS2 MINGW's patch uses lowercase ``"lib"`` instead of the usual uppercase,
    and is missing the final ``"site-packages"``.
    """
    paths = sysconfig.get_paths("nt", expand=False)
    return all(
        "Lib" not in p and "lib" in p and not p.endswith("site-packages")
        for p in (paths[key] for key in ("platlib", "purelib"))
    )


def _fix_abiflags(parts: Tuple[str]) -> Generator[str, None, None]:
    ldversion = sysconfig.get_config_var("LDVERSION")
    abiflags = getattr(sys, "abiflags", None)

    # LDVERSION does not end with sys.abiflags. Just return the path unchanged.
    if not ldversion or not abiflags or not ldversion.endswith(abiflags):
        yield from parts
        return

    # Strip sys.abiflags from LDVERSION-based path components.
    for part in parts:
        if part.endswith(ldversion):
            part = part[: (0 - len(abiflags))]
        yield part


@functools.lru_cache(maxsize=None)
def _warn_mismatched(old: pathlib.Path, new: pathlib.Path, *, key: str) -> None:
    issue_url = "https://github.com/pypa/pip/issues/10151"
    message = (
        "Value for %s does not match. Please report this to <%s>"
        "\ndistutils: %s"
        "\nsysconfig: %s"
    )
    logger.log(_MISMATCH_LEVEL, message, key, issue_url, old, new)


def _warn_if_mismatch(old: pathlib.Path, new: pathlib.Path, *, key: str) -> bool:
    if old == new:
        return False
    _warn_mismatched(old, new, key=key)
    return True


@functools.lru_cache(maxsize=None)
def _log_context(
    *,
    user: bool = False,
    home: Optional[str] = None,
    root: Optional[str] = None,
    prefix: Optional[str] = None,
) -> None:
    parts = [
        "Additional context:",
        "user = %r",
        "home = %r",
        "root = %r",
        "prefix = %r",
    ]

    logger.log(_MISMATCH_LEVEL, "\n".join(parts), user, home, root, prefix)


def get_scheme(
    dist_name: str,
    user: bool = False,
    home: Optional[str] = None,
    root: Optional[str] = None,
    isolated: bool = False,
    prefix: Optional[str] = None,
) -> Scheme:
    new = _sysconfig.get_scheme(
        dist_name,
        user=user,
        home=home,
        root=root,
        isolated=isolated,
        prefix=prefix,
    )
    if _USE_SYSCONFIG:
        return new

    old = _distutils.get_scheme(
        dist_name,
        user=user,
        home=home,
        root=root,
        isolated=isolated,
        prefix=prefix,
    )

    warning_contexts = []
    for k in SCHEME_KEYS:
        old_v = pathlib.Path(getattr(old, k))
        new_v = pathlib.Path(getattr(new, k))

        if old_v == new_v:
            continue

        # distutils incorrectly put PyPy packages under ``site-packages/python``
        # in the ``posix_home`` scheme, but PyPy devs said they expect the
        # directory name to be ``pypy`` instead. So we treat this as a bug fix
        # and not warn about it. See bpo-43307 and python/cpython#24628.
        skip_pypy_special_case = (
            sys.implementation.name == "pypy"
            and home is not None
            and k in ("platlib", "purelib")
            and old_v.parent == new_v.parent
            and old_v.name.startswith("python")
            and new_v.name.startswith("pypy")
        )
        if skip_pypy_special_case:
            continue

        # sysconfig's ``osx_framework_user`` does not include ``pythonX.Y`` in
        # the ``include`` value, but distutils's ``headers`` does. We'll let
        # CPython decide whether this is a bug or feature. See bpo-43948.
        skip_osx_framework_user_special_case = (
            user
            and is_osx_framework()
            and k == "headers"
            and old_v.parent.parent == new_v.parent
            and old_v.parent.name.startswith("python")
        )
        if skip_osx_framework_user_special_case:
            continue

        # On Red Hat and derived Linux distributions, distutils is patched to
        # use "lib64" instead of "lib" for platlib.
        if k == "platlib" and _looks_like_red_hat_lib():
            continue

        # On Python 3.9+, sysconfig's posix_user scheme sets platlib against
        # sys.platlibdir, but distutils's unix_user incorrectly coninutes
        # using the same $usersite for both platlib and purelib. This creates a
        # mismatch when sys.platlibdir is not "lib".
        skip_bpo_44860 = (
            user
            and k == "platlib"
            and not WINDOWS
            and sys.version_info >= (3, 9)
            and _PLATLIBDIR != "lib"
            and _looks_like_bpo_44860()
        )
        if skip_bpo_44860:
            continue

        # Slackware incorrectly patches posix_user to use lib64 instead of lib,
        # but not usersite to match the location.
        skip_slackware_user_scheme = (
            user
            and k in ("platlib", "purelib")
            and not WINDOWS
            and _looks_like_slackware_scheme()
        )
        if skip_slackware_user_scheme:
            continue

        # Both Debian and Red Hat patch Python to place the system site under
        # /usr/local instead of /usr. Debian also places lib in dist-packages
        # instead of site-packages, but the /usr/local check should cover it.
        skip_linux_system_special_case = (
            not (user or home or prefix or running_under_virtualenv())
            and old_v.parts[1:3] == ("usr", "local")
            and len(new_v.parts) > 1
            and new_v.parts[1] == "usr"
            and (len(new_v.parts) < 3 or new_v.parts[2] != "local")
            and (_looks_like_red_hat_scheme() or _looks_like_debian_scheme())
        )
        if skip_linux_system_special_case:
            continue

        # On Python 3.7 and earlier, sysconfig does not include sys.abiflags in
        # the "pythonX.Y" part of the path, but distutils does.
        skip_sysconfig_abiflag_bug = (
            sys.version_info < (3, 8)
            and not WINDOWS
            and k in ("headers", "platlib", "purelib")
            and tuple(_fix_abiflags(old_v.parts)) == new_v.parts
        )
        if skip_sysconfig_abiflag_bug:
            continue

        # MSYS2 MINGW's sysconfig patch does not include the "site-packages"
        # part of the path. This is incorrect and will be fixed in MSYS.
        skip_msys2_mingw_bug = (
            WINDOWS and k in ("platlib", "purelib") and _looks_like_msys2_mingw_scheme()
        )
        if skip_msys2_mingw_bug:
            continue

        # CPython's POSIX install script invokes pip (via ensurepip) against the
        # interpreter located in the source tree, not the install site. This
        # triggers special logic in sysconfig that's not present in distutils.
        # https://github.com/python/cpython/blob/8c21941ddaf/Lib/sysconfig.py#L178-L194
        skip_cpython_build = (
            sysconfig.is_python_build(check_home=True)
            and not WINDOWS
            and k in ("headers", "include", "platinclude")
        )
        if skip_cpython_build:
            continue

        warning_contexts.append((old_v, new_v, f"scheme.{k}"))

    if not warning_contexts:
        return old

    # Check if this path mismatch is caused by distutils config files. Those
    # files will no longer work once we switch to sysconfig, so this raises a
    # deprecation message for them.
    default_old = _distutils.distutils_scheme(
        dist_name,
        user,
        home,
        root,
        isolated,
        prefix,
        ignore_config_files=True,
    )
    if any(default_old[k] != getattr(old, k) for k in SCHEME_KEYS):
        deprecated(
            reason=(
                "Configuring installation scheme with distutils config files "
                "is deprecated and will no longer work in the near future. If you "
                "are using a Homebrew or Linuxbrew Python, please see discussion "
                "at https://github.com/Homebrew/homebrew-core/issues/76621"
            ),
            replacement=None,
            gone_in=None,
        )
        return old

    # Post warnings about this mismatch so user can report them back.
    for old_v, new_v, key in warning_contexts:
        _warn_mismatched(old_v, new_v, key=key)
    _log_context(user=user, home=home, root=root, prefix=prefix)

    return old


def get_bin_prefix() -> str:
    new = _sysconfig.get_bin_prefix()
    if _USE_SYSCONFIG:
        return new

    old = _distutils.get_bin_prefix()
    if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="bin_prefix"):
        _log_context()
    return old


def get_bin_user() -> str:
    return _sysconfig.get_scheme("", user=True).scripts


def _looks_like_deb_system_dist_packages(value: str) -> bool:
    """Check if the value is Debian's APT-controlled dist-packages.

    Debian's ``distutils.sysconfig.get_python_lib()`` implementation returns the
    default package path controlled by APT, but does not patch ``sysconfig`` to
    do the same. This is similar to the bug worked around in ``get_scheme()``,
    but here the default is ``deb_system`` instead of ``unix_local``. Ultimately
    we can't do anything about this Debian bug, and this detection allows us to
    skip the warning when needed.
    """
    if not _looks_like_debian_scheme():
        return False
    if value == "/usr/lib/python3/dist-packages":
        return True
    return False


def get_purelib() -> str:
    """Return the default pure-Python lib location."""
    new = _sysconfig.get_purelib()
    if _USE_SYSCONFIG:
        return new

    old = _distutils.get_purelib()
    if _looks_like_deb_system_dist_packages(old):
        return old
    if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="purelib"):
        _log_context()
    return old


def get_platlib() -> str:
    """Return the default platform-shared lib location."""
    new = _sysconfig.get_platlib()
    if _USE_SYSCONFIG:
        return new

    from . import _distutils

    old = _distutils.get_platlib()
    if _looks_like_deb_system_dist_packages(old):
        return old
    if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="platlib"):
        _log_context()
    return old
python3.12/site-packages/pip/_internal/locations/_distutils.py000064400000013726151732701160020420 0ustar00"""Locations where we look for configs, install stuff, etc"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

# If pip's going to use distutils, it should not be using the copy that setuptools
# might have injected into the environment. This is done by removing the injected
# shim, if it's injected.
#
# See https://github.com/pypa/pip/issues/8761 for the original discussion and
# rationale for why this is done within pip.
try:
    __import__("_distutils_hack").remove_shim()
except (ImportError, AttributeError):
    pass

import logging
import os
import sys
from distutils.cmd import Command as DistutilsCommand
from distutils.command.install import SCHEME_KEYS
from distutils.command.install import install as distutils_install_command
from distutils.sysconfig import get_python_lib
from typing import Dict, List, Optional, Union, cast

from pip._internal.models.scheme import Scheme
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.virtualenv import running_under_virtualenv

from .base import get_major_minor_version

logger = logging.getLogger(__name__)


def distutils_scheme(
    dist_name: str,
    user: bool = False,
    home: Optional[str] = None,
    root: Optional[str] = None,
    isolated: bool = False,
    prefix: Optional[str] = None,
    *,
    ignore_config_files: bool = False,
) -> Dict[str, str]:
    """
    Return a distutils install scheme
    """
    from distutils.dist import Distribution

    dist_args: Dict[str, Union[str, List[str]]] = {"name": dist_name}
    if isolated:
        dist_args["script_args"] = ["--no-user-cfg"]

    d = Distribution(dist_args)
    if not ignore_config_files:
        try:
            d.parse_config_files()
        except UnicodeDecodeError:
            # Typeshed does not include find_config_files() for some reason.
            paths = d.find_config_files()  # type: ignore
            logger.warning(
                "Ignore distutils configs in %s due to encoding errors.",
                ", ".join(os.path.basename(p) for p in paths),
            )
    obj: Optional[DistutilsCommand] = None
    obj = d.get_command_obj("install", create=True)
    assert obj is not None
    i = cast(distutils_install_command, obj)
    # NOTE: setting user or home has the side-effect of creating the home dir
    # or user base for installations during finalize_options()
    # ideally, we'd prefer a scheme class that has no side-effects.
    assert not (user and prefix), f"user={user} prefix={prefix}"
    assert not (home and prefix), f"home={home} prefix={prefix}"
    i.user = user or i.user
    if user or home:
        i.prefix = ""
    i.prefix = prefix or i.prefix
    i.home = home or i.home
    i.root = root or i.root
    i.finalize_options()

    scheme = {}
    for key in SCHEME_KEYS:
        scheme[key] = getattr(i, "install_" + key)

    # install_lib specified in setup.cfg should install *everything*
    # into there (i.e. it takes precedence over both purelib and
    # platlib).  Note, i.install_lib is *always* set after
    # finalize_options(); we only want to override here if the user
    # has explicitly requested it hence going back to the config
    if "install_lib" in d.get_option_dict("install"):
        scheme.update({"purelib": i.install_lib, "platlib": i.install_lib})

    if running_under_virtualenv():
        if home:
            prefix = home
        elif user:
            prefix = i.install_userbase
        else:
            prefix = i.prefix
        scheme["headers"] = os.path.join(
            prefix,
            "include",
            "site",
            f"python{get_major_minor_version()}",
            dist_name,
        )

        if root is not None:
            path_no_drive = os.path.splitdrive(os.path.abspath(scheme["headers"]))[1]
            scheme["headers"] = os.path.join(root, path_no_drive[1:])

    return scheme


def get_scheme(
    dist_name: str,
    user: bool = False,
    home: Optional[str] = None,
    root: Optional[str] = None,
    isolated: bool = False,
    prefix: Optional[str] = None,
) -> Scheme:
    """
    Get the "scheme" corresponding to the input parameters. The distutils
    documentation provides the context for the available schemes:
    https://docs.python.org/3/install/index.html#alternate-installation

    :param dist_name: the name of the package to retrieve the scheme for, used
        in the headers scheme path
    :param user: indicates to use the "user" scheme
    :param home: indicates to use the "home" scheme and provides the base
        directory for the same
    :param root: root under which other directories are re-based
    :param isolated: equivalent to --no-user-cfg, i.e. do not consider
        ~/.pydistutils.cfg (posix) or ~/pydistutils.cfg (non-posix) for
        scheme paths
    :param prefix: indicates to use the "prefix" scheme and provides the
        base directory for the same
    """
    scheme = distutils_scheme(dist_name, user, home, root, isolated, prefix)
    return Scheme(
        platlib=scheme["platlib"],
        purelib=scheme["purelib"],
        headers=scheme["headers"],
        scripts=scheme["scripts"],
        data=scheme["data"],
    )


def get_bin_prefix() -> str:
    # XXX: In old virtualenv versions, sys.prefix can contain '..' components,
    # so we need to call normpath to eliminate them.
    prefix = os.path.normpath(sys.prefix)
    if WINDOWS:
        bin_py = os.path.join(prefix, "Scripts")
        # buildout uses 'bin' on Windows too?
        if not os.path.exists(bin_py):
            bin_py = os.path.join(prefix, "bin")
        return bin_py
    # Forcing to use /usr/local/bin for standard macOS framework installs
    # Also log to ~/Library/Logs/ for use with the Console.app log viewer
    if sys.platform[:6] == "darwin" and prefix[:16] == "/System/Library/":
        return "/usr/local/bin"
    return os.path.join(prefix, "bin")


def get_purelib() -> str:
    return get_python_lib(plat_specific=False)


def get_platlib() -> str:
    return get_python_lib(plat_specific=True)
python3.12/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-312.pyc000064400000000471151732701160026164 0ustar00�

R`i3���dZy)z,For modules related to installing packages.
N)�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/install/__init__.py�<module>rs
��rsite-packages/pip/_internal/operations/install/__pycache__/editable_legacy.cpython-312.pyc000064400000003463151732701170027450 0ustar00python3.12�

R`i���dZddlZddlmZmZddlmZddlmZddl	m
Z
ddlmZeje�Zdeed	eed
eededed
ededededdfd�Zy)z?Legacy editable installation process, i.e. `setup.py develop`.
�N)�Optional�Sequence)�BuildEnvironment)�
indent_log)�make_setuptools_develop_args)�call_subprocess�global_options�prefix�home�
use_user_site�name�
setup_py_path�isolated�	build_env�unpacked_source_directory�returnc	���tjd|�t||||||��}	t�5|5t	|	d|��ddd�ddd�y#1swY�xYw#1swYyxYw)z[Install a package in editable mode. Most arguments are pass-through
    to setuptools.
    zRunning setup.py develop for %s)r	�no_user_configr
rrzpython setup.py develop)�command_desc�cwdN)�logger�inforrr)
r	r
rrr
rrrr�argss
          ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/install/editable_legacy.py�install_editablersd���K�K�1�4�8�'��%���
�#�
�D�
��
���6�-�
��
��
�Y��
��s"�A!�A�A!�A	�A!�!A*)�__doc__�logging�typingrr�pip._internal.build_envr�pip._internal.utils.loggingr�$pip._internal.utils.setuptools_buildr�pip._internal.utils.subprocessr�	getLogger�__name__r�str�boolr��r�<module>r)s�����%�4�2�M�:�	��	�	�8�	$�� ��S�M� �
�S�M� ��3�-�	 �
� ��
 �� �� � � � #� �
� r(python3.12/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-312.pyc000064400000102204151732701170025527 0ustar00�

R`iAk���dZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZddlmZmZmZddlmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&ddl'm(Z(m)Z)ddl*m+Z+dd	l,m-Z-dd
l.m/Z/ddl0m1Z1ddl2m3Z3dd
l4m5Z5m6Z6m7Z7ddl8m9Z9m:Z:ddl;m<Z<m=Z=ddl>m?Z?m@Z@ddlAmBZBmCZCmDZDmEZEddlFmGZGmHZHmIZImJZJddlKmLZLerddlmMZMGd�deM�ZNej�eP�ZQe deR�ZSe$eSeRe%eTeRffZUdIdeRdeTde$eReRffd�ZVdeRdeeReffd�ZWdeRdeXfd�ZYdedeXfd �ZZd!e5de$eeReRfeeReRfffd"�Z[d#e"eRde!eRfd$�Z\d%eeUdee$eReReRffd&�Z]d'eSd(eRdeRfd)�Z^deRd(eRdeSfd*�Z_d+eeeRd,eeSeSfd-e#eSd.eeRd(eRdeeUfd/�Z`d0eeReRfdeeRfd1�ZaGd2�d3�ZbGd4�d5�ZcGd6�d7e1�Zdd8eRddfd9�ZeGd:�d;e+�Zf				dJd<eRd=e(d>eRd?e=d@eXdAeXdBe!e:dCeXddfdD�Zgej�dEeRdedFfdG��Zi				dJd<eRd>eRd?e=dEeRd@eXdAeXdBe!e:dCeXddfdH�Zjy)KzGSupport for installing and building the "wheel" binary package format.
�N)�urlsafe_b64encode)�Message)�chain�filterfalse�starmap)�IO�
TYPE_CHECKING�Any�BinaryIO�Callable�Dict�	Generator�Iterable�Iterator�List�NewType�Optional�Sequence�Set�Tuple�Union�cast)�ZipFile�ZipInfo)�ScriptMaker)�get_export_entry)�canonicalize_name)�InstallationError)�get_major_minor_version)�BaseDistribution�FilesystemWheel�get_wheel_distribution)�DIRECT_URL_METADATA_NAME�	DirectUrl)�SCHEME_KEYS�Scheme)�adjacent_tmp_file�replace)�captured_stdout�
ensure_dir�	hash_file�	partition)�
current_umask�is_within_directory�2set_extracted_file_to_default_mode_plus_executable�zip_item_is_executable)�parse_wheel)�Protocolc�4�eZdZUded<eed<eed<dd�Zy)�File�
RecordPath�src_record_path�	dest_path�changedNc��y�N���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/install/wheel.py�savez	File.saveFs�����returnN)�__name__�
__module__�__qualname__�__annotations__�str�boolr?r;r@r>r4r4As��%�%����
�	r@r4r5�path�	blocksizerBc��t||�\}}dt|j��jd�j	d�z}|t|�fS)z?Return (encoded_digest, length) for path using hashlib.sha256()zsha256=�latin1�=)r+r�digest�decode�rstriprG)rIrJ�h�lengthrNs     r>�rehashrSPsM���$�	�*�I�A�v�
�*�1�8�8�:�6�=�=�h�G�N�N�s�S�
S�F��C��K� � r@�modec��|ddd�S)zPReturn keyword arguments to properly open a CSV file
    in the given mode.
    ��utf-8)rT�newline�encodingr;)rTs r>�
csv_io_kwargsrZWs���R�W�=�=r@c�0�tjj|�sJ�t|d�5}|j	�}|jd�s
	ddd�ytjjt
j��}d|ztjjd�z}|j�}ddd�t|d�5}|j�|j�ddd�y#1swY�AxYw#1swYyxYw)	zQReplace #!python with #!/path/to/python
    Return True if file was changed.
    �rbs#!pythonNFs#!�ascii�wbT)
�osrI�isfile�open�readline�
startswith�sys�
executable�encode�getfilesystemencoding�linesep�read�write)rI�script�	firstline�exename�rests     r>�
fix_scriptro^s���
�7�7�>�>�$����	
�d�D�	�V��O�O�%�	��#�#�K�0��
�	��.�.�'�'��(A�(A�(C�D���G�O�b�j�j�&7�&7��&@�@�	��{�{�}��

�
�d�D�	�V����Y�����T��
��
�	��
��s�#D�A&D�#D�D	�D�metadatac�H�|jdd�j�dk(S)NzRoot-Is-PurelibrV�true)�get�lower)rps r>�wheel_root_is_purelibrurs"���<�<�)�2�.�4�4�6�&�@�@r@�distc���i}i}|j�D]T}|jdk(r|j||j<�,|jdk(s�<|j||j<�V||fS)N�console_scripts�gui_scripts)�iter_entry_points�group�value�name)rvrxry�entry_points    r>�get_entrypointsrvsu���O��K��-�-�/����� 1�1�0;�0A�0A�O�K�,�,�-�
�
�
�-�
/�,7�,=�,=�K��(�(�)�	0�
�K�'�'r@�scriptsc	��|sytjt�}|D]T}tjj|�}tjj
|�}||j|��Vtjjdd�jtj�D�cgc][}tjjtjj|��jtj���]}}|j!tjjtjjtjjt"j$����|j'�D��cic]F\}}tjjtjj|��|vr||��H}}}|syg}|j'�D]�\}}	t)|	�}
t+|
�dk(rdj-|
d�}n,dj-dj/|
dd	�d
z|
d	z�}|j!dj-||����d}t+|�dk(r!|j!|j-d
��n |j!|j-d��t1d�tjjdd�jtj�D��}
|
rd}|j!|�dj/|�Scc}wcc}}w)z�Determine if any scripts are not on PATH and format a warning.
    Returns a warning message if one or more scripts are not on PATH,
    otherwise None.
    N�PATHrV�zscript {} isrzscripts {} are�, ���z and z.The {} installed in '{}' which is not on PATH.zeConsider adding {} to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.zthis directoryzthese directoriesc3�2K�|]}|s�|ddk(���y�w)r�~Nr;)�.0�is  r>�	<genexpr>z4message_about_scripts_not_on_PATH.<locals>.<genexpr>�s�����I��Q��!����I�s��
ziNOTE: The current PATH contains path(s) starting with `~`, which may not be expanded by all applications.�
)�collections�defaultdict�setr_rI�dirname�basename�add�environrs�split�pathsep�normcase�normpathrP�sep�appendrdre�items�sorted�len�format�join�any)r��grouped_by_dir�destfile�
parent_dir�script_namer��
not_warn_dirs�warn_for�	msg_lines�dir_scripts�sorted_scripts�
start_text�
last_line_fmt�warn_for_tilde�tilde_warning_msgs               r>�!message_about_scripts_not_on_PATHr��s���
��+6�*A�*A�#�*F�N����W�W�_�_�X�.�
��g�g�&�&�x�0���z�"�&�&�{�3���������+�1�1�"�*�*�=��=�A�	��������)�)�!�,�-�4�4�R�V�V�<�=������
��������)�)�"�'�'�/�/�#�.�.�*I�J�K��
$2�#7�#7�#9�%�#9��J��
�7�7���B�G�G�,�,�Z�8�9��N�	�G��#9�
�%�
���I�#+�>�>�#3��
�K�$*�;�$7���~��!�#�'�.�.�~�a�/@�A�J�)�0�0��	�	�.��"�-�.��8�>�"�;M�M��J�	���<�C�C��J�
�	
�$4� 	C���9�~�������-�-�.>�?�@�����-�-�.A�B�C����Z�Z�^�^�F�B�7�=�=�b�j�j�I���N��
=�	�	���*�+��9�9�Y����o��%s�5A M
� AM�outrowsc�&�td�|D��S)a�Normalize the given rows of a RECORD file.

    Items in each row are converted into str. Rows are then sorted to make
    the value more predictable for tests.

    Each row is a 3-tuple (path, hash, size) and corresponds to a record of
    a RECORD file (see PEP 376 and PEP 427 for details).  For the rows
    passed to this function, the size can be an integer as an int or string,
    or the empty string.
    c3�@K�|]\}}}||t|�f���y�wr:)rG)r��record_path�hash_�sizes    r>r�z&_normalized_outrows.<locals>.<genexpr>�s&�����HO�,D�K����e�S��Y�'��s�)r�)r�s r>�_normalized_outrowsr��s��*��HO���r@r��lib_dirc�B�tjj||�Sr:)r_rIr�)r�r�s  r>�_record_to_fs_pathr��s��
�7�7�<�<���-�-r@c�p�tjj|�dj�tjj|�dj�k(r tjj	||�}|jtjjd�}td|�S)Nr�/r5)r_rI�
splitdrivert�relpathr(r�r)rIr�s  r>�_fs_to_record_pathr��s��
�w�w���$���"�(�(�*�b�g�g�.@�.@��.I�!�.L�.R�.R�.T�T��w�w���t�W�-���<�<������S�)�D���d�#�#r@�old_csv_rows�	installedr8�	generatedc��g}|D]�}t|�dkDrtjd|�td|d�}|j	||�}||vrtt
||��\}	}
n*t|�dkDr|dnd}	t|�dkDr|dnd}
|j||	|
f���|D]0}t||�}t|�\}	}
|j||	|
f��2||j�D�
cgc]}
|
ddf��	c}
zScc}
w)z_
    :param installed: A map from archive RECORD path to installation RECORD
        path.
    �z,RECORD line has more than three elements: %sr5rr�rV�)
r��logger�warningr�poprSr�r�r��values)r�r�r8r�r��installed_rows�row�old_record_path�new_record_pathrNrR�frI�installed_record_paths              r>�get_csv_rows_for_installedr��s"��-/�N����s�8�a�<��N�N�I�3�O��|�S��V�4��#�-�-���I���g�%�#�$6���$P�Q�N�F�F�"�3�x�!�|�S��V��F�"�3�x�!�|�S��V��F�������?�@����!�!�W�-�����������t�V�V�4�5���EN�EU�EU�EW��EW�,A�	��B�'�EW�����s�2D�consolec��|j�}g}|jdd�}|r�dtjvr|j	d|z�tjjdd�dk7r2|j	dj
tjd|��|j	dt��d	|���|D�cgc]}tjd
|�s�|��}}|D]}||=�|jdd�}|rdtjvr|j	d|z�|j	d
j
t�|��|D�cgc]}tjd|�s�|��}}|D]}||=�|jtdj|j���|Scc}wcc}w)zk
    Given the mapping from entrypoint name to callable, return the relevant
    console script specs.
    �pipN�ENSUREPIP_OPTIONSzpip = rV�
altinstallz
pip{} = {}rz = zpip(\d+(\.\d+)?)?$�easy_installzeasy_install = zeasy_install-{} = {}zeasy_install(-\d+\.\d+)?$�{} = {})�copyr�r_r�r�rsr�rd�version_infor�re�match�extendrr�)r��scripts_to_generate�
pip_script�k�pip_ep�easy_install_script�easy_install_eps       r>�get_console_script_specsr�s����l�l�n�G���F���U�D�)�J���b�j�j�0��&�&�x�*�'<�=�
�:�:�>�>�-�r�2�l�B��&�&��#�#�C�$4�$4�Q�$7��D�
�	�"�"�S�)@�)B�(C�3�z�l�#S�T�$�K�W�����1F��(J�!�W��K��A���
��!�+�+�n�d�;����b�j�j�0��&�&�'8�;N�'N�O��"�"�"�)�)�'�)�+>�
�	
��
��!�"�(�(�+G��"K�A�w�	�
�!�A���
�!����w�y�'7�'7�����I�J����/L��
s�F9�!F9�F>�4F>c�8�eZdZdedededdfd�Zdefd�Zd	d�Z	y)
�
ZipBackedFiler6r7�zip_filerBNc�<�||_||_||_d|_y�NF)r6r7�	_zip_filer8)r=r6r7r�s    r>�__init__zZipBackedFile.__init__es!�� /���"���!�����r@c�L�|jj|j�Sr:)r��getinfor6r<s r>�_getinfozZipBackedFile._getinfoms���~�~�%�%�d�&:�&:�;�;r@c�@�tjj|j�}t	|�tjj|j�rtj|j�|j�}|jj|�5}t|jd�5}tj||�ddd�ddd�t|�rt|j�yy#1swY�3xYw#1swY�7xYw)Nr^)r_rIr�r7r*�exists�unlinkr�r�ra�shutil�copyfileobjr0r/)r=r��zipinfor��dests     r>r?zZipBackedFile.saveps����W�W�_�_�T�^�^�4�
��:���7�7�>�>�$�.�.�)��I�I�d�n�n�%��-�-�/��
�^�^�
 �
 ��
)�Q��d�n�n�d�+�t��"�"�1�d�+�,�*�"�'�*�>�t�~�~�N�+�,�+��*�
)�s$�(D�?D�D�D	�
D�DrA)
rCrDrEr5rGrr�rr�r?r;r@r>r�r�ds9���)��69��EL��	
��<�'�<�Or@r�c��eZdZdd�Zdd�Zy)�
ScriptFileNc��||_|jj|_|jj|_d|_yr�)�_filer6r7r8)r=�files  r>r�zScriptFile.__init__�s3����
�#�z�z�9�9������-�-�����r@c�l�|jj�t|j�|_yr:)r�r?ror7r8r<s r>r?zScriptFile.save�s ���
�
����!�$�.�.�1��r@)r�r4rBNrA)rCrDrEr�r?r;r@r>r�r��s���2r@r�c�(��eZdZdeddf�fd�Z�xZS)�MissingCallableSuffixr~rBNc�B��t�|�dj|��y)Nz�Invalid script entry point: {} - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.)�superr�r�)r=r~�	__class__s  �r>r�zMissingCallableSuffix.__init__�s!���
���
�"�6�+�.�		
r@)rCrDrErGr��
__classcell__�r�s@r>r�r��s���
�C�
�D�
�
r@r��
specificationc�`�t|�}|�!|j�tt|���yyr:)r�suffixr�rG)r��entrys  r>�_raise_for_invalid_entrypointr�s2���]�+�E���U�\�\�1�#�C��J�/�/�2�r@c�F��eZdZ	ddedeeeefdeef�fd�
Z�xZ	S)�PipScriptMakerr��optionsrBc�:��t|�t�|�	||�Sr:)rr��make)r=r�rr�s   �r>rzPipScriptMaker.make�s���	&�m�4��w�|�M�7�3�3r@r:)
rCrDrErGrr
r
rrr�r�s@r>rr�s9���FJ�4� �4�+3�D��c��N�+C�4�	
�c��4�4r@rr}�	wheel_zip�
wheel_path�scheme�	pycompile�warn_script_location�
direct_url�	requestedc
�(
��8�9�:�;�<�=�>�t||�\}}	t|	�r
|j�>n|j�>i�=t	��9g}
	d,dt
dtdtddf�9�=�>fd�
}dt
dtfd�}d	td
tddf�fd��8dtd
tdtt
gdff�8fd�}
dtdtdtt
gdff�8�fd�}dt
dtfd�}ttt
|j��}t||�}t||�\}}|
|�>�}t!||�}dt
dtfd�}t||�\}}|||�}t!||�}t#||�}t%t'��t)|��}t+|�\�:�<dddtf�:�<fd�}t!||�}t||�}t!t,|�}t#||�}|D]:}|j/�||j0|j2|j4��<dt6tddff�=�>fd�}dtdtfd�} |r�t9�5}!t;j<�5t;j>d�|�D]�}"tAjB|"dd��}#|#s�| |"�}$tDjFjI|$�sJ�td|$jKtDjFjLd��}%||%|$���	ddd�ddd�tNjQ!jS��tUd|jV�}&d|&_,dh|&_-d|&_.t_�:�}'tatcdjd�<jg���}(|&ji|'�})|
jk|)�|
jk|&ji|(ddi��|r"tm|)�}*|*�tNjo|*�d tq�z�;trjtdtd!tvdt6txddff�;fd"��}+tDjFj{�>|�},tDjFj{|,d#�}-|+|-�5}.|.j}d$�ddd�|
j|-�|�ttDjFj{|,t��}/|+|/�5}0|0j}|j��j�d%��ddd�|
j|/�|rGtDjFj{|,d&�}1t�|1d'�5	ddd�|
j|1�|j�d(�}2tat�j�|2j����}3t�|3�=�9|
�>�)�}4tDjFj{|,d(�}5|+|5fit�d*���5}6t�j�td+|6��}7|7j�t�|4��ddd�y#1swY��9xYw#1swY��>xYw#1swY���xYw#1swY��MxYw#1swY��xYw#1swYyxYw)-a�Install a wheel.

    :param name: Name of the project to install
    :param wheel_zip: open ZipFile for wheel being installed
    :param scheme: Distutils scheme dictating the install directories
    :param req_description: String used in place of the requirement, for
        logging
    :param pycompile: Whether to byte-compile installed Python files
    :param warn_script_location: Whether to check that scripts are installed
        into a directory on PATH
    :raises UnsupportedWheel:
        * when the directory holds an unpacked wheel with incompatible
          Wheel-Version
        * when the .dist-info dir does not match the wheel
    �srcfiler��modifiedrBNc�P��t|��}|�|<|r�j|�yy)z6Map archive RECORD paths to installation RECORD paths.N)r�r�)rr�r�newpathr8r�r�s    ���r>�record_installedz(_install_wheel.<locals>.record_installed�s/���%�X�w�7��$�	�'����K�K�� �r@rIc�$�|jd�S)Nr�)�endswith�rIs r>�is_dir_pathz#_install_wheel.<locals>.is_dir_path�s���}�}�S�!�!r@�
dest_dir_path�target_pathc�Z��t||�sd}t|j�||���y)NzRThe wheel {!r} has a file {!r} trying to install outside the target directory {!r})r.rr�)rr�messager	s   �r>�assert_no_path_traversalz0_install_wheel.<locals>.assert_no_path_traversal�s;���"�=�+�>�5�
�$����z�;�
�F��
�?r@r�r�r4c�,����dtddf���fd�}|S)Nr�rBr4c���tjj|�}tjj�|�}��|�t	||��Sr:)r_rIr�r�r�)r��normed_pathr7rr�r�s   ���r>�make_root_scheme_filezM_install_wheel.<locals>.root_scheme_file_maker.<locals>.make_root_scheme_file�sD����'�'�*�*�;�7�K������T�;�7�I�$�T�9�5� ��i��B�Br@)r5)r�r�r!rs`` �r>�root_scheme_file_makerz._install_wheel.<locals>.root_scheme_file_maker�s!���	C�z�	C�f�	C�%�$r@r
c�v����tD�cic]}|t||���c}�dtddf����fd�}|Scc}w)Nr�rBr4c���tjj|�}	|jtjjd�\}}}	�
|}tjj||�}�	||�t||��S#t
$rdj
�|�}t|��wxYw#t$r:djt�
��}dj
�|||�}t|��wxYw)Nr�zbUnexpected file in {}: {!r}. .data directory contents should be named like: '<scheme key>/<path>'.r�z�Unknown scheme key used in {}: {} (for file {!r}). .data directory contents should be in subdirectories named with a valid scheme key ({}))r_rIr�r�r��
ValueErrorr�r�KeyErrorr�r�r�)
r�r �_�
scheme_key�dest_subpathr�scheme_path�valid_scheme_keysr7r�scheme_pathsr	r�s
         ����r>�make_data_scheme_filezM_install_wheel.<locals>.data_scheme_file_maker.<locals>.make_data_scheme_file�s�����'�'�*�*�;�7�K�
1�.9�.?�.?������Q�.O�+��:�|�	
1�*�:�6�������[�,�?�I�$�[�)�<� ��i��B�B��)�
1�D��&��[�1��(��0�0�
1���
1�$(�I�I�f�\�.B�$C�!�4��&��Z��>O�P�	�
(��0�0�
1�s�.B�B6�'B3�6AC9)r%�getattrr5)r�r
�keyr-r,rr	s`   @��r>�data_scheme_file_makerz._install_wheel.<locals>.data_scheme_file_maker�sP���>I�I�[�c��W�V�S�1�1�[�I��	C�z�	C�f�	C�	C�4%�$��9Js�6c�J�|jdd�djd�S)Nr�r�r�.data)r�rrs r>�is_data_scheme_pathz+_install_wheel.<locals>.is_data_scheme_paths#���z�z�#�q�!�!�$�-�-�g�6�6r@c��|jdd�}t|�dkDxr|djd�xr|ddk(S)Nr�r�rr2r�r�)r�r�r)rI�partss  r>�is_script_scheme_pathz-_install_wheel.<locals>.is_script_scheme_path$sB���
�
�3��"���5�z�A�~�V�%��(�"3�"3�G�"<�V��q��Y�AV�Vr@r�c�P��|j}tjj|�}|j	�jd�r|dd}nL|j	�jd�r|dd}n'|j	�jd�r|dd}n|}|�vxs|�vS)Nz.exe���z
-script.pyi����z.pya)r7r_rIr�rtr)r�rIr}�	matchnamer��guis    ��r>�is_entrypoint_wrapperz-_install_wheel.<locals>.is_entrypoint_wrapper7s�����~�~���w�w����%���:�:�<� � ��(��S�b�	�I�
�Z�Z�\�
"�
"�<�
0��T�c�
�I�
�Z�Z�\�
"�
"�6�
*��S�b�	�I��I��G�#�7�y�C�'7�7r@c3��K�tt�j���D]X}tjj�|�}tjj
|�s�C|jd�s�U|���Zy�w)Nz.py)r�r�r�r_rIr�r`r)�installed_path�full_installed_pathr�r�s  ��r>�pyc_source_file_pathsz-_install_wheel.<locals>.pyc_source_file_pathsRsf�����
%�S��)9�)9�);�%<�=�N�"$�'�'�,�,�w��"G���7�7�>�>�"5�6��&�/�/��6��%�%�
>�s�A?Bc�@�tjj|�S)z8Return the path the pyc file would have been written to.)�	importlib�util�cache_from_sourcers r>�pyc_output_pathz'_install_wheel.<locals>.pyc_output_path_s���~�~�/�/��5�5r@�ignoreT)�force�quietr5r�rVr�r:i��kwargsc;���K�t|fi|��5}|��ddd�tjj��t	|j|�y#1swY�@xYw�wr:)r'r_�chmodr}r()rIrHr��generated_file_modes   �r>�_generate_filez&_install_wheel.<locals>._generate_file�sI�����
�t�
.�v�
.�!��G�/�
������,�-�������/�
.�s�
A �A�?A �A�A �	INSTALLERspip
rW�	REQUESTEDr^�RECORD)r�r8r�r��wzIO[str])F)Mr1ru�purelib�platlibr�r5rGrHrrr&rr�namelistrr,�maprr"r!rrr�r?r6r7r8rr)�warnings�catch_warnings�filterwarnings�
compileall�compile_filer_rIr�r(r�r��debug�getvaluerr��clobber�variants�set_moder��listrr�r��
make_multipler�r�r�r-�
contextlib�contextmanagerr
rr�rjr�r#�to_jsonrfra�	read_text�csv�reader�
splitlinesr�rZ�writer�	writerowsr�)?r}rr	r
rrr
r�info_dirrpr�rrr"r0r3�paths�
file_paths�root_scheme_paths�data_scheme_pathsr!�filesr6�other_scheme_paths�script_scheme_pathsr-�other_scheme_files�distributionr;�script_scheme_filesr�r?rD�stdoutrI�success�pyc_path�pyc_record_path�makerr��gui_scripts_to_generate�generated_console_scripts�msgrL�
dest_info_dir�installer_path�installer_file�direct_url_path�direct_url_file�requested_path�record_text�record_rows�rowsr��record_filerhrr8r�rKr:r�r�s?  `                                                     @@@@@@@r>�_install_wheelr��s���2%�Y��5��H�h��X�&��.�.���.�.��/1�I�"�u�G��I�>C�!��!�'*�!�6:�!�	
�!�"�*�"��"����#��$��	%��	%�!$�	%�	�:�,��&�	'�	%�%��%�#)�%�	�:�,��&�	'�%�B7�*�7��7�
��j�!�9�#5�#5�#7�8�E��[�%�0�J�+4�5H�*�+U�(��(�2�9�g�F��� 5�7H�I�E�W�J�W�4�W�/8��0�/�+��+�3�9�f�E���2�4F�G���%�+�,�E�*��
�#��$���L�#�<�0�L�G�S�8�F�8�t�8� +.��2�+��&�&;�=P�Q���j�*=�>���%�,�-�E����	�	����-�-�t�~�~�t�|�|�L��&�9�S�$��_�#=�&�6�c�6�c�6�
�
�
�&��(�(�*��'�'��1�1�3�D�(�5�5�d�$�d�S�G��#2�4�#8��!�w�w�~�~�h�7�7�7�*.�(�(�*:�*:�2�7�7�;�;��*L�+��)��(�C�4�+��	���V�_�_�&�'��4����0�E��E�M�
�T�E�N�
�E�N�3�7�;��"�7�9�+;�+;�S�Y�Y�[�#I�J�� %� 3� 3�4G� H��
���.�/�
���U�(�(�)@�5�$�-�P�Q��/�0I�J���?��N�N�3���=�?�"2�2������S��C��I�h��d�>R�4S�����G�G�L�L��(�3�M��W�W�\�\�-��=�N�	��	'�>����X�&�
(�
���^�$����'�'�,�,�}�6N�O��
�O�
,���!�!�*�"4�"4�"6�"=�"=�g�"F�G�-�����)�������m�[�A��
�.�$�
'��(�����(��(�(��2�K��s�z�z�+�"8�"8�":�;�<�K�%�������D��'�'�,�,�}�h�7�K�	��	:�}�S�'9�	:�k����D��K�8�9�����,�T�2�3�	
;�	:�s+�*���
��t
(�	'��-�
,��(�
'��$
;�	:�s[�Y�,:Y�'A(Y�Y�Y!�4/Y.�*Y;�:Z�Y	�Y�Y�!Y+�.Y8�;Z�Z�req_description)NNNc#�K�	d��y#t$r0}dj||jd�}t|�|�d}~wwxYw�w)NzFor req: {}. {}r)rr��args)r��ers   r>�req_error_contextr��sD����0�
���0�#�*�*�?�A�F�F�1�I�F����(�a�/��0�s"�A�	�A�	A�+=�A�Ac��t|d��5}t|�5t||||||||��ddd�ddd�y#1swY�xYw#1swYyxYw)NT)�
allowZip64)r}rr	r
rrr
r)rr�r�)	r}r	r
r�rrr
r�zs	         r>�
install_wheelr��sU��
���	-��
��
/����%��#�%9�%�#�	
�0�
.�	-�
/�
/��
.�	-�s�A�?�A�A	�A�A)i)TTNF)k�__doc__r�rXrarerA�logging�os.pathr_r�r�rdrU�base64r�
email.messager�	itertoolsrrr�typingrr	r
rrr
rrrrrrrrrrr�zipfilerr�pip._vendor.distlib.scriptsr�pip._vendor.distlib.utilr�pip._vendor.packaging.utilsr�pip._internal.exceptionsr�pip._internal.locationsr�pip._internal.metadatar r!r"�pip._internal.models.direct_urlr#r$�pip._internal.models.schemer%r&�pip._internal.utils.filesystemr'r(�pip._internal.utils.miscr)r*r+r,�pip._internal.utils.unpackingr-r.r/r0�pip._internal.utils.wheelr1r2r4�	getLoggerrCr�rGr5�int�InstalledCSVRowrSrZrHrorurr�r�r�r�r�r�r�r�r�rrr�rbr�r�r;r@r>�<module>r�s�������
����	�
�
��$�!�1�1������&%�3�5�9�6�;���
P�;�E�V�V���2����x��
��	�	�8�	$��
�\�3�
'�
��
�C��s�C�x��8�9��!��!��!�5��c��?�!�>��>��S�#�X��>��S��T��(A�G�A��A�(�*�(�u�T�#�s�(�^�T�#�s�(�^�5S�/T�(�G �x��}�G ��#��G �T�
�o�
&��	�%��S�#�
�
���4.�J�.��.��.�$�S�$�3�$�:�$���t�C�y�/���J�
�*�+����_���C�y�	�
��
�/��
�@N�d�3��8�n�N��c��N�b%O�%O�P	2�	2�
�-�
�0��0��0�4�[�4��!%�&*��S4�

�S4��S4��S4�
�	S4�
�S4��
S4���#�S4��S4�
�S4�l���0�s�0�y�9I�/J�0��0��!%�&*���

����
���	�
���
���#����
�r@python3.12/site-packages/pip/_internal/operations/install/wheel.py000064400000065501151732701170021176 0ustar00"""Support for installing and building the "wheel" binary package format.
"""

import collections
import compileall
import contextlib
import csv
import importlib
import logging
import os.path
import re
import shutil
import sys
import warnings
from base64 import urlsafe_b64encode
from email.message import Message
from itertools import chain, filterfalse, starmap
from typing import (
    IO,
    TYPE_CHECKING,
    Any,
    BinaryIO,
    Callable,
    Dict,
    Generator,
    Iterable,
    Iterator,
    List,
    NewType,
    Optional,
    Sequence,
    Set,
    Tuple,
    Union,
    cast,
)
from zipfile import ZipFile, ZipInfo

from pip._vendor.distlib.scripts import ScriptMaker
from pip._vendor.distlib.util import get_export_entry
from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.exceptions import InstallationError
from pip._internal.locations import get_major_minor_version
from pip._internal.metadata import (
    BaseDistribution,
    FilesystemWheel,
    get_wheel_distribution,
)
from pip._internal.models.direct_url import DIRECT_URL_METADATA_NAME, DirectUrl
from pip._internal.models.scheme import SCHEME_KEYS, Scheme
from pip._internal.utils.filesystem import adjacent_tmp_file, replace
from pip._internal.utils.misc import captured_stdout, ensure_dir, hash_file, partition
from pip._internal.utils.unpacking import (
    current_umask,
    is_within_directory,
    set_extracted_file_to_default_mode_plus_executable,
    zip_item_is_executable,
)
from pip._internal.utils.wheel import parse_wheel

if TYPE_CHECKING:
    from typing import Protocol

    class File(Protocol):
        src_record_path: "RecordPath"
        dest_path: str
        changed: bool

        def save(self) -> None:
            pass


logger = logging.getLogger(__name__)

RecordPath = NewType("RecordPath", str)
InstalledCSVRow = Tuple[RecordPath, str, Union[int, str]]


def rehash(path: str, blocksize: int = 1 << 20) -> Tuple[str, str]:
    """Return (encoded_digest, length) for path using hashlib.sha256()"""
    h, length = hash_file(path, blocksize)
    digest = "sha256=" + urlsafe_b64encode(h.digest()).decode("latin1").rstrip("=")
    return (digest, str(length))


def csv_io_kwargs(mode: str) -> Dict[str, Any]:
    """Return keyword arguments to properly open a CSV file
    in the given mode.
    """
    return {"mode": mode, "newline": "", "encoding": "utf-8"}


def fix_script(path: str) -> bool:
    """Replace #!python with #!/path/to/python
    Return True if file was changed.
    """
    # XXX RECORD hashes will need to be updated
    assert os.path.isfile(path)

    with open(path, "rb") as script:
        firstline = script.readline()
        if not firstline.startswith(b"#!python"):
            return False
        exename = sys.executable.encode(sys.getfilesystemencoding())
        firstline = b"#!" + exename + os.linesep.encode("ascii")
        rest = script.read()
    with open(path, "wb") as script:
        script.write(firstline)
        script.write(rest)
    return True


def wheel_root_is_purelib(metadata: Message) -> bool:
    return metadata.get("Root-Is-Purelib", "").lower() == "true"


def get_entrypoints(dist: BaseDistribution) -> Tuple[Dict[str, str], Dict[str, str]]:
    console_scripts = {}
    gui_scripts = {}
    for entry_point in dist.iter_entry_points():
        if entry_point.group == "console_scripts":
            console_scripts[entry_point.name] = entry_point.value
        elif entry_point.group == "gui_scripts":
            gui_scripts[entry_point.name] = entry_point.value
    return console_scripts, gui_scripts


def message_about_scripts_not_on_PATH(scripts: Sequence[str]) -> Optional[str]:
    """Determine if any scripts are not on PATH and format a warning.
    Returns a warning message if one or more scripts are not on PATH,
    otherwise None.
    """
    if not scripts:
        return None

    # Group scripts by the path they were installed in
    grouped_by_dir: Dict[str, Set[str]] = collections.defaultdict(set)
    for destfile in scripts:
        parent_dir = os.path.dirname(destfile)
        script_name = os.path.basename(destfile)
        grouped_by_dir[parent_dir].add(script_name)

    # We don't want to warn for directories that are on PATH.
    not_warn_dirs = [
        os.path.normcase(os.path.normpath(i)).rstrip(os.sep)
        for i in os.environ.get("PATH", "").split(os.pathsep)
    ]
    # If an executable sits with sys.executable, we don't warn for it.
    #     This covers the case of venv invocations without activating the venv.
    not_warn_dirs.append(
        os.path.normcase(os.path.normpath(os.path.dirname(sys.executable)))
    )
    warn_for: Dict[str, Set[str]] = {
        parent_dir: scripts
        for parent_dir, scripts in grouped_by_dir.items()
        if os.path.normcase(os.path.normpath(parent_dir)) not in not_warn_dirs
    }
    if not warn_for:
        return None

    # Format a message
    msg_lines = []
    for parent_dir, dir_scripts in warn_for.items():
        sorted_scripts: List[str] = sorted(dir_scripts)
        if len(sorted_scripts) == 1:
            start_text = "script {} is".format(sorted_scripts[0])
        else:
            start_text = "scripts {} are".format(
                ", ".join(sorted_scripts[:-1]) + " and " + sorted_scripts[-1]
            )

        msg_lines.append(
            "The {} installed in '{}' which is not on PATH.".format(
                start_text, parent_dir
            )
        )

    last_line_fmt = (
        "Consider adding {} to PATH or, if you prefer "
        "to suppress this warning, use --no-warn-script-location."
    )
    if len(msg_lines) == 1:
        msg_lines.append(last_line_fmt.format("this directory"))
    else:
        msg_lines.append(last_line_fmt.format("these directories"))

    # Add a note if any directory starts with ~
    warn_for_tilde = any(
        i[0] == "~" for i in os.environ.get("PATH", "").split(os.pathsep) if i
    )
    if warn_for_tilde:
        tilde_warning_msg = (
            "NOTE: The current PATH contains path(s) starting with `~`, "
            "which may not be expanded by all applications."
        )
        msg_lines.append(tilde_warning_msg)

    # Returns the formatted multiline message
    return "\n".join(msg_lines)


def _normalized_outrows(
    outrows: Iterable[InstalledCSVRow],
) -> List[Tuple[str, str, str]]:
    """Normalize the given rows of a RECORD file.

    Items in each row are converted into str. Rows are then sorted to make
    the value more predictable for tests.

    Each row is a 3-tuple (path, hash, size) and corresponds to a record of
    a RECORD file (see PEP 376 and PEP 427 for details).  For the rows
    passed to this function, the size can be an integer as an int or string,
    or the empty string.
    """
    # Normally, there should only be one row per path, in which case the
    # second and third elements don't come into play when sorting.
    # However, in cases in the wild where a path might happen to occur twice,
    # we don't want the sort operation to trigger an error (but still want
    # determinism).  Since the third element can be an int or string, we
    # coerce each element to a string to avoid a TypeError in this case.
    # For additional background, see--
    # https://github.com/pypa/pip/issues/5868
    return sorted(
        (record_path, hash_, str(size)) for record_path, hash_, size in outrows
    )


def _record_to_fs_path(record_path: RecordPath, lib_dir: str) -> str:
    return os.path.join(lib_dir, record_path)


def _fs_to_record_path(path: str, lib_dir: str) -> RecordPath:
    # On Windows, do not handle relative paths if they belong to different
    # logical disks
    if os.path.splitdrive(path)[0].lower() == os.path.splitdrive(lib_dir)[0].lower():
        path = os.path.relpath(path, lib_dir)

    path = path.replace(os.path.sep, "/")
    return cast("RecordPath", path)


def get_csv_rows_for_installed(
    old_csv_rows: List[List[str]],
    installed: Dict[RecordPath, RecordPath],
    changed: Set[RecordPath],
    generated: List[str],
    lib_dir: str,
) -> List[InstalledCSVRow]:
    """
    :param installed: A map from archive RECORD path to installation RECORD
        path.
    """
    installed_rows: List[InstalledCSVRow] = []
    for row in old_csv_rows:
        if len(row) > 3:
            logger.warning("RECORD line has more than three elements: %s", row)
        old_record_path = cast("RecordPath", row[0])
        new_record_path = installed.pop(old_record_path, old_record_path)
        if new_record_path in changed:
            digest, length = rehash(_record_to_fs_path(new_record_path, lib_dir))
        else:
            digest = row[1] if len(row) > 1 else ""
            length = row[2] if len(row) > 2 else ""
        installed_rows.append((new_record_path, digest, length))
    for f in generated:
        path = _fs_to_record_path(f, lib_dir)
        digest, length = rehash(f)
        installed_rows.append((path, digest, length))
    return installed_rows + [
        (installed_record_path, "", "") for installed_record_path in installed.values()
    ]


def get_console_script_specs(console: Dict[str, str]) -> List[str]:
    """
    Given the mapping from entrypoint name to callable, return the relevant
    console script specs.
    """
    # Don't mutate caller's version
    console = console.copy()

    scripts_to_generate = []

    # Special case pip and setuptools to generate versioned wrappers
    #
    # The issue is that some projects (specifically, pip and setuptools) use
    # code in setup.py to create "versioned" entry points - pip2.7 on Python
    # 2.7, pip3.3 on Python 3.3, etc. But these entry points are baked into
    # the wheel metadata at build time, and so if the wheel is installed with
    # a *different* version of Python the entry points will be wrong. The
    # correct fix for this is to enhance the metadata to be able to describe
    # such versioned entry points, but that won't happen till Metadata 2.0 is
    # available.
    # In the meantime, projects using versioned entry points will either have
    # incorrect versioned entry points, or they will not be able to distribute
    # "universal" wheels (i.e., they will need a wheel per Python version).
    #
    # Because setuptools and pip are bundled with _ensurepip and virtualenv,
    # we need to use universal wheels. So, as a stopgap until Metadata 2.0, we
    # override the versioned entry points in the wheel and generate the
    # correct ones. This code is purely a short-term measure until Metadata 2.0
    # is available.
    #
    # To add the level of hack in this section of code, in order to support
    # ensurepip this code will look for an ``ENSUREPIP_OPTIONS`` environment
    # variable which will control which version scripts get installed.
    #
    # ENSUREPIP_OPTIONS=altinstall
    #   - Only pipX.Y and easy_install-X.Y will be generated and installed
    # ENSUREPIP_OPTIONS=install
    #   - pipX.Y, pipX, easy_install-X.Y will be generated and installed. Note
    #     that this option is technically if ENSUREPIP_OPTIONS is set and is
    #     not altinstall
    # DEFAULT
    #   - The default behavior is to install pip, pipX, pipX.Y, easy_install
    #     and easy_install-X.Y.
    pip_script = console.pop("pip", None)
    if pip_script:
        if "ENSUREPIP_OPTIONS" not in os.environ:
            scripts_to_generate.append("pip = " + pip_script)

        if os.environ.get("ENSUREPIP_OPTIONS", "") != "altinstall":
            scripts_to_generate.append(
                "pip{} = {}".format(sys.version_info[0], pip_script)
            )

        scripts_to_generate.append(f"pip{get_major_minor_version()} = {pip_script}")
        # Delete any other versioned pip entry points
        pip_ep = [k for k in console if re.match(r"pip(\d+(\.\d+)?)?$", k)]
        for k in pip_ep:
            del console[k]
    easy_install_script = console.pop("easy_install", None)
    if easy_install_script:
        if "ENSUREPIP_OPTIONS" not in os.environ:
            scripts_to_generate.append("easy_install = " + easy_install_script)

        scripts_to_generate.append(
            "easy_install-{} = {}".format(
                get_major_minor_version(), easy_install_script
            )
        )
        # Delete any other versioned easy_install entry points
        easy_install_ep = [
            k for k in console if re.match(r"easy_install(-\d+\.\d+)?$", k)
        ]
        for k in easy_install_ep:
            del console[k]

    # Generate the console entry points specified in the wheel
    scripts_to_generate.extend(starmap("{} = {}".format, console.items()))

    return scripts_to_generate


class ZipBackedFile:
    def __init__(
        self, src_record_path: RecordPath, dest_path: str, zip_file: ZipFile
    ) -> None:
        self.src_record_path = src_record_path
        self.dest_path = dest_path
        self._zip_file = zip_file
        self.changed = False

    def _getinfo(self) -> ZipInfo:
        return self._zip_file.getinfo(self.src_record_path)

    def save(self) -> None:
        # directory creation is lazy and after file filtering
        # to ensure we don't install empty dirs; empty dirs can't be
        # uninstalled.
        parent_dir = os.path.dirname(self.dest_path)
        ensure_dir(parent_dir)

        # When we open the output file below, any existing file is truncated
        # before we start writing the new contents. This is fine in most
        # cases, but can cause a segfault if pip has loaded a shared
        # object (e.g. from pyopenssl through its vendored urllib3)
        # Since the shared object is mmap'd an attempt to call a
        # symbol in it will then cause a segfault. Unlinking the file
        # allows writing of new contents while allowing the process to
        # continue to use the old copy.
        if os.path.exists(self.dest_path):
            os.unlink(self.dest_path)

        zipinfo = self._getinfo()

        with self._zip_file.open(zipinfo) as f:
            with open(self.dest_path, "wb") as dest:
                shutil.copyfileobj(f, dest)

        if zip_item_is_executable(zipinfo):
            set_extracted_file_to_default_mode_plus_executable(self.dest_path)


class ScriptFile:
    def __init__(self, file: "File") -> None:
        self._file = file
        self.src_record_path = self._file.src_record_path
        self.dest_path = self._file.dest_path
        self.changed = False

    def save(self) -> None:
        self._file.save()
        self.changed = fix_script(self.dest_path)


class MissingCallableSuffix(InstallationError):
    def __init__(self, entry_point: str) -> None:
        super().__init__(
            "Invalid script entry point: {} - A callable "
            "suffix is required. Cf https://packaging.python.org/"
            "specifications/entry-points/#use-for-scripts for more "
            "information.".format(entry_point)
        )


def _raise_for_invalid_entrypoint(specification: str) -> None:
    entry = get_export_entry(specification)
    if entry is not None and entry.suffix is None:
        raise MissingCallableSuffix(str(entry))


class PipScriptMaker(ScriptMaker):
    def make(
        self, specification: str, options: Optional[Dict[str, Any]] = None
    ) -> List[str]:
        _raise_for_invalid_entrypoint(specification)
        return super().make(specification, options)


def _install_wheel(
    name: str,
    wheel_zip: ZipFile,
    wheel_path: str,
    scheme: Scheme,
    pycompile: bool = True,
    warn_script_location: bool = True,
    direct_url: Optional[DirectUrl] = None,
    requested: bool = False,
) -> None:
    """Install a wheel.

    :param name: Name of the project to install
    :param wheel_zip: open ZipFile for wheel being installed
    :param scheme: Distutils scheme dictating the install directories
    :param req_description: String used in place of the requirement, for
        logging
    :param pycompile: Whether to byte-compile installed Python files
    :param warn_script_location: Whether to check that scripts are installed
        into a directory on PATH
    :raises UnsupportedWheel:
        * when the directory holds an unpacked wheel with incompatible
          Wheel-Version
        * when the .dist-info dir does not match the wheel
    """
    info_dir, metadata = parse_wheel(wheel_zip, name)

    if wheel_root_is_purelib(metadata):
        lib_dir = scheme.purelib
    else:
        lib_dir = scheme.platlib

    # Record details of the files moved
    #   installed = files copied from the wheel to the destination
    #   changed = files changed while installing (scripts #! line typically)
    #   generated = files newly generated during the install (script wrappers)
    installed: Dict[RecordPath, RecordPath] = {}
    changed: Set[RecordPath] = set()
    generated: List[str] = []

    def record_installed(
        srcfile: RecordPath, destfile: str, modified: bool = False
    ) -> None:
        """Map archive RECORD paths to installation RECORD paths."""
        newpath = _fs_to_record_path(destfile, lib_dir)
        installed[srcfile] = newpath
        if modified:
            changed.add(newpath)

    def is_dir_path(path: RecordPath) -> bool:
        return path.endswith("/")

    def assert_no_path_traversal(dest_dir_path: str, target_path: str) -> None:
        if not is_within_directory(dest_dir_path, target_path):
            message = (
                "The wheel {!r} has a file {!r} trying to install"
                " outside the target directory {!r}"
            )
            raise InstallationError(
                message.format(wheel_path, target_path, dest_dir_path)
            )

    def root_scheme_file_maker(
        zip_file: ZipFile, dest: str
    ) -> Callable[[RecordPath], "File"]:
        def make_root_scheme_file(record_path: RecordPath) -> "File":
            normed_path = os.path.normpath(record_path)
            dest_path = os.path.join(dest, normed_path)
            assert_no_path_traversal(dest, dest_path)
            return ZipBackedFile(record_path, dest_path, zip_file)

        return make_root_scheme_file

    def data_scheme_file_maker(
        zip_file: ZipFile, scheme: Scheme
    ) -> Callable[[RecordPath], "File"]:
        scheme_paths = {key: getattr(scheme, key) for key in SCHEME_KEYS}

        def make_data_scheme_file(record_path: RecordPath) -> "File":
            normed_path = os.path.normpath(record_path)
            try:
                _, scheme_key, dest_subpath = normed_path.split(os.path.sep, 2)
            except ValueError:
                message = (
                    "Unexpected file in {}: {!r}. .data directory contents"
                    " should be named like: '<scheme key>/<path>'."
                ).format(wheel_path, record_path)
                raise InstallationError(message)

            try:
                scheme_path = scheme_paths[scheme_key]
            except KeyError:
                valid_scheme_keys = ", ".join(sorted(scheme_paths))
                message = (
                    "Unknown scheme key used in {}: {} (for file {!r}). .data"
                    " directory contents should be in subdirectories named"
                    " with a valid scheme key ({})"
                ).format(wheel_path, scheme_key, record_path, valid_scheme_keys)
                raise InstallationError(message)

            dest_path = os.path.join(scheme_path, dest_subpath)
            assert_no_path_traversal(scheme_path, dest_path)
            return ZipBackedFile(record_path, dest_path, zip_file)

        return make_data_scheme_file

    def is_data_scheme_path(path: RecordPath) -> bool:
        return path.split("/", 1)[0].endswith(".data")

    paths = cast(List[RecordPath], wheel_zip.namelist())
    file_paths = filterfalse(is_dir_path, paths)
    root_scheme_paths, data_scheme_paths = partition(is_data_scheme_path, file_paths)

    make_root_scheme_file = root_scheme_file_maker(wheel_zip, lib_dir)
    files: Iterator[File] = map(make_root_scheme_file, root_scheme_paths)

    def is_script_scheme_path(path: RecordPath) -> bool:
        parts = path.split("/", 2)
        return len(parts) > 2 and parts[0].endswith(".data") and parts[1] == "scripts"

    other_scheme_paths, script_scheme_paths = partition(
        is_script_scheme_path, data_scheme_paths
    )

    make_data_scheme_file = data_scheme_file_maker(wheel_zip, scheme)
    other_scheme_files = map(make_data_scheme_file, other_scheme_paths)
    files = chain(files, other_scheme_files)

    # Get the defined entry points
    distribution = get_wheel_distribution(
        FilesystemWheel(wheel_path),
        canonicalize_name(name),
    )
    console, gui = get_entrypoints(distribution)

    def is_entrypoint_wrapper(file: "File") -> bool:
        # EP, EP.exe and EP-script.py are scripts generated for
        # entry point EP by setuptools
        path = file.dest_path
        name = os.path.basename(path)
        if name.lower().endswith(".exe"):
            matchname = name[:-4]
        elif name.lower().endswith("-script.py"):
            matchname = name[:-10]
        elif name.lower().endswith(".pya"):
            matchname = name[:-4]
        else:
            matchname = name
        # Ignore setuptools-generated scripts
        return matchname in console or matchname in gui

    script_scheme_files: Iterator[File] = map(
        make_data_scheme_file, script_scheme_paths
    )
    script_scheme_files = filterfalse(is_entrypoint_wrapper, script_scheme_files)
    script_scheme_files = map(ScriptFile, script_scheme_files)
    files = chain(files, script_scheme_files)

    for file in files:
        file.save()
        record_installed(file.src_record_path, file.dest_path, file.changed)

    def pyc_source_file_paths() -> Generator[str, None, None]:
        # We de-duplicate installation paths, since there can be overlap (e.g.
        # file in .data maps to same location as file in wheel root).
        # Sorting installation paths makes it easier to reproduce and debug
        # issues related to permissions on existing files.
        for installed_path in sorted(set(installed.values())):
            full_installed_path = os.path.join(lib_dir, installed_path)
            if not os.path.isfile(full_installed_path):
                continue
            if not full_installed_path.endswith(".py"):
                continue
            yield full_installed_path

    def pyc_output_path(path: str) -> str:
        """Return the path the pyc file would have been written to."""
        return importlib.util.cache_from_source(path)

    # Compile all of the pyc files for the installed files
    if pycompile:
        with captured_stdout() as stdout:
            with warnings.catch_warnings():
                warnings.filterwarnings("ignore")
                for path in pyc_source_file_paths():
                    success = compileall.compile_file(path, force=True, quiet=True)
                    if success:
                        pyc_path = pyc_output_path(path)
                        assert os.path.exists(pyc_path)
                        pyc_record_path = cast(
                            "RecordPath", pyc_path.replace(os.path.sep, "/")
                        )
                        record_installed(pyc_record_path, pyc_path)
        logger.debug(stdout.getvalue())

    maker = PipScriptMaker(None, scheme.scripts)

    # Ensure old scripts are overwritten.
    # See https://github.com/pypa/pip/issues/1800
    maker.clobber = True

    # Ensure we don't generate any variants for scripts because this is almost
    # never what somebody wants.
    # See https://bitbucket.org/pypa/distlib/issue/35/
    maker.variants = {""}

    # This is required because otherwise distlib creates scripts that are not
    # executable.
    # See https://bitbucket.org/pypa/distlib/issue/32/
    maker.set_mode = True

    # Generate the console and GUI entry points specified in the wheel
    scripts_to_generate = get_console_script_specs(console)

    gui_scripts_to_generate = list(starmap("{} = {}".format, gui.items()))

    generated_console_scripts = maker.make_multiple(scripts_to_generate)
    generated.extend(generated_console_scripts)

    generated.extend(maker.make_multiple(gui_scripts_to_generate, {"gui": True}))

    if warn_script_location:
        msg = message_about_scripts_not_on_PATH(generated_console_scripts)
        if msg is not None:
            logger.warning(msg)

    generated_file_mode = 0o666 & ~current_umask()

    @contextlib.contextmanager
    def _generate_file(path: str, **kwargs: Any) -> Generator[BinaryIO, None, None]:
        with adjacent_tmp_file(path, **kwargs) as f:
            yield f
        os.chmod(f.name, generated_file_mode)
        replace(f.name, path)

    dest_info_dir = os.path.join(lib_dir, info_dir)

    # Record pip as the installer
    installer_path = os.path.join(dest_info_dir, "INSTALLER")
    with _generate_file(installer_path) as installer_file:
        installer_file.write(b"pip\n")
    generated.append(installer_path)

    # Record the PEP 610 direct URL reference
    if direct_url is not None:
        direct_url_path = os.path.join(dest_info_dir, DIRECT_URL_METADATA_NAME)
        with _generate_file(direct_url_path) as direct_url_file:
            direct_url_file.write(direct_url.to_json().encode("utf-8"))
        generated.append(direct_url_path)

    # Record the REQUESTED file
    if requested:
        requested_path = os.path.join(dest_info_dir, "REQUESTED")
        with open(requested_path, "wb"):
            pass
        generated.append(requested_path)

    record_text = distribution.read_text("RECORD")
    record_rows = list(csv.reader(record_text.splitlines()))

    rows = get_csv_rows_for_installed(
        record_rows,
        installed=installed,
        changed=changed,
        generated=generated,
        lib_dir=lib_dir,
    )

    # Record details of all files installed
    record_path = os.path.join(dest_info_dir, "RECORD")

    with _generate_file(record_path, **csv_io_kwargs("w")) as record_file:
        # Explicitly cast to typing.IO[str] as a workaround for the mypy error:
        # "writer" has incompatible type "BinaryIO"; expected "_Writer"
        writer = csv.writer(cast("IO[str]", record_file))
        writer.writerows(_normalized_outrows(rows))


@contextlib.contextmanager
def req_error_context(req_description: str) -> Generator[None, None, None]:
    try:
        yield
    except InstallationError as e:
        message = "For req: {}. {}".format(req_description, e.args[0])
        raise InstallationError(message) from e


def install_wheel(
    name: str,
    wheel_path: str,
    scheme: Scheme,
    req_description: str,
    pycompile: bool = True,
    warn_script_location: bool = True,
    direct_url: Optional[DirectUrl] = None,
    requested: bool = False,
) -> None:
    with ZipFile(wheel_path, allowZip64=True) as z:
        with req_error_context(req_description):
            _install_wheel(
                name=name,
                wheel_zip=z,
                wheel_path=wheel_path,
                scheme=scheme,
                pycompile=pycompile,
                warn_script_location=warn_script_location,
                direct_url=direct_url,
                requested=requested,
            )
python3.12/site-packages/pip/_internal/operations/install/__init__.py000064400000000063151732701170021621 0ustar00"""For modules related to installing packages.
"""
python3.12/site-packages/pip/_internal/operations/install/editable_legacy.py000064400000002402151732701170023156 0ustar00"""Legacy editable installation process, i.e. `setup.py develop`.
"""
import logging
from typing import Optional, Sequence

from pip._internal.build_env import BuildEnvironment
from pip._internal.utils.logging import indent_log
from pip._internal.utils.setuptools_build import make_setuptools_develop_args
from pip._internal.utils.subprocess import call_subprocess

logger = logging.getLogger(__name__)


def install_editable(
    *,
    global_options: Sequence[str],
    prefix: Optional[str],
    home: Optional[str],
    use_user_site: bool,
    name: str,
    setup_py_path: str,
    isolated: bool,
    build_env: BuildEnvironment,
    unpacked_source_directory: str,
) -> None:
    """Install a package in editable mode. Most arguments are pass-through
    to setuptools.
    """
    logger.info("Running setup.py develop for %s", name)

    args = make_setuptools_develop_args(
        setup_py_path,
        global_options=global_options,
        no_user_config=isolated,
        prefix=prefix,
        home=home,
        use_user_site=use_user_site,
    )

    with indent_log():
        with build_env:
            call_subprocess(
                args,
                command_desc="python setup.py develop",
                cwd=unpacked_source_directory,
            )
python3.12/site-packages/pip/_internal/operations/build/metadata.py000064400000002616151732701170021301 0ustar00"""Metadata generation logic for source distributions.
"""

import os

from pip._vendor.pyproject_hooks import BuildBackendHookCaller

from pip._internal.build_env import BuildEnvironment
from pip._internal.exceptions import (
    InstallationSubprocessError,
    MetadataGenerationFailed,
)
from pip._internal.utils.subprocess import runner_with_spinner_message
from pip._internal.utils.temp_dir import TempDirectory


def generate_metadata(
    build_env: BuildEnvironment, backend: BuildBackendHookCaller, details: str
) -> str:
    """Generate metadata using mechanisms described in PEP 517.

    Returns the generated metadata directory.
    """
    metadata_tmpdir = TempDirectory(kind="modern-metadata", globally_managed=True)

    metadata_dir = metadata_tmpdir.path

    with build_env:
        # Note that BuildBackendHookCaller implements a fallback for
        # prepare_metadata_for_build_wheel, so we don't have to
        # consider the possibility that this hook doesn't exist.
        runner = runner_with_spinner_message("Preparing metadata (pyproject.toml)")
        with backend.subprocess_runner(runner):
            try:
                distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
            except InstallationSubprocessError as error:
                raise MetadataGenerationFailed(package_details=details) from error

    return os.path.join(metadata_dir, distinfo_dir)
python3.12/site-packages/pip/_internal/operations/build/__pycache__/build_tracker.cpython-312.pyc000064400000017212151732701170026672 0ustar00�

R`i���&�ddlZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZddl
mZddlmZddlmZej&e�Zej,deded	fd
��Zej,dedfd��ZGd
�de�ZGd�d�Zy)�N)�
TracebackType)�Dict�	Generator�Optional�Set�Type�Union)�Link)�InstallRequirement)�
TempDirectory�changes�return�NNNc+�K�tj}t�}i}|j�D]\}}	||||<|||<�	d��|j�D]$\}}||ur||=�t|t�sJ�|||<�&y#t$r|||<Y�TwxYw#|j�D]$\}}||ur||=�t|t�sJ�|||<�&wxYw�w�N)�os�environ�object�items�KeyError�
isinstance�str)r
�target�non_existent_marker�saved_values�name�	new_value�original_values       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py�update_env_context_managerr s�����
�Z�Z�F�!�(��24�L�"�=�=�?���i�	5�!'���L���!��t��+�	.�
�%1�$6�$6�$8� �D�.��!4�4��4�L�!�.�#�6�6�6�-��t��%9���	5�!4�L���	5��%1�$6�$6�$8� �D�.��!4�4��4�L�!�.�#�6�6�6�-��t��%9�s?�3C�B�C�B�
8C�B�C�B�C�9C�C)�BuildTrackerNNc#�K�tjjd�}tj�5}|�V|jt
d���j}|jt|���tjd|�t|�5}|��ddd�ddd�y#1swY�xYw#1swYyxYw�w)N�PIP_BUILD_TRACKERz
build-tracker)�kind)r#z Initialized build tracking at %s)rr�get�
contextlib�	ExitStack�
enter_contextr�pathr �logger�debugr!)�root�ctx�trackers   r�get_build_trackerr/)s�����
�:�:�>�>�-�.�D�	�	�	�	�3��<��$�$�]��%H�I�N�N�D����8�4�P�Q��L�L�;�T�B�
�$�
�7��M� �

 �	� �
��

 �	�s5�4C�A$B<�B0�B<�'	C�0B9	�5B<�<C�Cc��eZdZdZy)�	TrackerIdz:Uniquely identifying string provided to the build tracker.N)�__name__�
__module__�__qualname__�__doc__��rr1r16s��Dr7r1c���eZdZdZdeddfd�Zdd�Zdeee	dee	d	ee
ddfd
�Zdedefd�Z
d
ededdfd�Zd
ededdfd�Zdd�Zej&d
edededfd��Zy)r!a7Ensure that an sdist cannot request itself as a setup requirement.

    When an sdist is prepared, it identifies its setup requirements in the
    context of ``BuildTracker.track()``. If a requirement shows up recursively, this
    raises an exception.

    This stops fork bombs embedded in malicious packages.r,rNc�`�||_i|_tjd|j�y)NzCreated build tracker: %s)�_root�_entriesr*r+)�selfr,s  r�__init__zBuildTracker.__init__Cs#����
�=?��
����0�$�*�*�=r7c�F�tjd|j�|S)NzEntered build tracker: %s)r*r+r:)r<s r�	__enter__zBuildTracker.__enter__Hs�����0�$�*�*�=��r7�exc_type�exc_val�exc_tbc�$�|j�yr)�cleanup)r<r@rArBs    r�__exit__zBuildTracker.__exit__Ls
��	
���r7�keyc��tj|j��j�}tj
j
|j|�Sr)�hashlib�sha224�encode�	hexdigestrr)�joinr:)r<rF�hasheds   r�_entry_pathzBuildTracker._entry_pathTs8������
�
��-�7�7�9���w�w�|�|�D�J�J��/�/r7�reqc���|j|�}	t|�5}|j�}ddd�dj|j�}t|��#1swY�0xYw#t$rYnwxYw||jvsJ�t|dd��5}|jt|��ddd�n#1swYnxYw||j|<tjd||j�y)z,Add an InstallRequirement to build tracking.Nz{} is already being built: {}�wzutf-8)�encodingzAdded %s to build tracker %r)
rN�open�read�format�link�LookupError�FileNotFoundErrorr;�writerr*r+r:)r<rOrF�
entry_path�fp�contents�messages       r�addzBuildTracker.addXs����%�%�c�*�
�	'��j�!�R��7�7�9��"�
6�<�<�S�X�X�x�P�G��g�&�&�
"�!�� �	��	���$�-�-�'�'�'��*�c�G�
4���H�H�S��X��5�
4�
4�� ��
�
�c�����3�S�$�*�*�Es3�A*�A�A*�A'�#A*�*	A6�5A6�B;�;Cc��tj|j|��|j|=tjd||j�y)z1Remove an InstallRequirement from build tracking.z Removed %s from build tracker %rN)r�unlinkrNr;r*r+r:)r<rOrFs   r�removezBuildTracker.removess<��	�	�	�$�"�"�3�'�(��M�M�#�����7��d�j�j�Ir7c��t|jj��D]\}}|j||��tjd|j�y)NzRemoved build tracker: %r)�listr;rrar*r+r:)r<rFrOs   rrDzBuildTracker.cleanup|sE���T�]�]�0�0�2�3�H�C���K�K��S�!�4�	���0�$�*�*�=r7rc#�rK�t|�}|j||�d��|j||�y�w)z�Ensure that `key` cannot install itself as a setup requirement.

        :raises LookupError: If `key` was already provided in a parent invocation of
                             the context introduced by this method.N)r1r^ra)r<rOrF�
tracker_ids    r�trackzBuildTracker.track�s0�����s�^�
�����j�!�
����C��$�s�57)rr!)rN)r2r3r4r5rr=r?rr�
BaseExceptionrrEr1rNrr^rarDr&�contextmanagerrrfr6r7rr!r!:s���=�>�S�>�T�>�
���4�
�.�/���-�(����'�	�

��0�y�0�S�0�F�)�F�	�F�d�F�6J�,�J�9�J��J�>����%�+�%�#�%�)�DT�:U�%��%r7r!)r&rH�loggingr�typesr�typingrrrrrr	�pip._internal.models.linkr
�pip._internal.req.req_installr�pip._internal.utils.temp_dirr�	getLoggerr2r*rhrr r/r1r!r6r7r�<module>rps������	��>�>�*�<�6�	��	�	�8�	$�����.�#�.�)�<L�2M�.��.�2���	�9�%?�@�	��	�E��E�Q%�Q%r7python3.12/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-312.pyc000064400000000372151732701170025616 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/build/__init__.py�<module>rs�rsite-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-312.pyc000064400000003622151732701200027404 0ustar00python3.12�

R`i���h�dZddlZddlmZddlmZddlmZmZddl	m
Z
ddlmZded	ed
e
de
fd�Zy)
z4Metadata generation logic for source distributions.
�N)�BuildBackendHookCaller)�BuildEnvironment)�InstallationSubprocessError�MetadataGenerationFailed)�runner_with_spinner_message)�
TempDirectory�	build_env�backend�details�returnc�f�tdd��}|j}|5td�}|j|�5	|j	|�}	ddd�ddd�tjj|�S#t
$r}t
|��|�d}~wwxYw#1swY�OxYw#1swY�SxYw)zlGenerate metadata using mechanisms described in PEP 660.

    Returns the generated metadata directory.
    zmodern-metadataT)�kind�globally_managedz,Preparing editable metadata (pyproject.toml))�package_detailsN)	r�pathr�subprocess_runner�#prepare_metadata_for_build_editablerr�os�join)r	r
r�metadata_tmpdir�metadata_dir�runner�distinfo_dir�errors        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_editable.py�generate_editable_metadatars���$�):�T�R�O�"�'�'�L�	�-�:�
���
&�
&�v�
.�
S�&�J�J�<�X��/�
��7�7�<�<��l�3�3��/�
S�.�w�G�U�R��
S��/�
.��
��s?�B'�B�A=�
B'�=	B�
B�B�B�B$	� B'�'B0)�__doc__r�pip._vendor.pyproject_hooksr�pip._internal.build_envr�pip._internal.exceptionsrr�pip._internal.utils.subprocessr�pip._internal.utils.temp_dirr�strr��r�<module>r&sH���
�>�4��G�6�4��4�*@�4�KN�4��4r%python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-312.pyc000064400000003274151732701200025161 0ustar00�

R`i3��~�ddlZddlZddlmZddlmZddlmZeje	�Z
dedededed	eef
d
�Zy)�N)�Optional)�BuildBackendHookCaller)�runner_with_spinner_message�name�backend�metadata_directory�tempd�returnc�R�|�J�	tjd|�td|�d��}|j|�5|j	||��}ddd�tjj|�S#1swY�)xYw#t
$rtj
d|�YywxYw)z�Build one InstallRequirement using the PEP 517 build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    NzDestination directory: %szBuilding wheel for z (pyproject.toml))rzFailed building wheel for %s)
�logger�debugr�subprocess_runner�build_wheel�	Exception�error�os�path�join)rrrr	�runner�
wheel_names      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/build/wheel.py�build_wheel_pep517rs����)�)�)�
����0�%�8�,�!�$��'8�9�
���
&�
&�v�
.� �,�,��#5�-��J�/��7�7�<�<��z�*�*�/�
.��
�����3�T�:���s(�6B�A8�B�8B�=B�B&�%B&)
�loggingr�typingr�pip._vendor.pyproject_hooksr�pip._internal.utils.subprocessr�	getLogger�__name__r�strr��r�<module>r"s]���	��>�F�	��	�	�8�	$��+�

�+�
#�+��+��	+�
�c�]�+r!python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_editable.cpython-312.pyc000064400000004017151732701200027006 0ustar00�

R`i����ddlZddlZddlmZddlmZmZddlmZeje
�Zdedededed	eef
d
�Z
y)�N)�Optional)�BuildBackendHookCaller�HookMissing)�runner_with_spinner_message�name�backend�metadata_directory�tempd�returnc��|�J�	tjd|�td|�d��}|j|�5	|j	||��}	ddd�tjj|�S#t
$r)}tj
d||�Yd}~ddd�yd}~wwxYw#1swY�^xYw#t$rtj
d|�YywxYw)z�Build one InstallRequirement using the PEP 660 build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    NzDestination directory: %szBuilding editable for z (pyproject.toml))r	zLCannot build editable %s because the build backend does not have the %s hookzFailed building editable for %s)�logger�debugr�subprocess_runner�build_editabler�error�	Exception�os�path�join)rrr	r
�runner�
wheel_name�es       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_editable.py�build_wheel_editablers����)�)�)�����0�%�8�,�$�T�F�*;�<�
���
&�
&�v�
.�
�$�3�3��'9�4��
�/�"�7�7�<�<��z�*�*���
����8���	��/�
.��
��
/�
.�������6��=���sQ�6B;�B/�A:�B;�:	B,�B'�B/�B;�'B,�,B/�/B8�4B;�;C�C)�loggingr�typingr�pip._vendor.pyproject_hooksrr�pip._internal.utils.subprocessr�	getLogger�__name__r
�strr��r�<module>r$s]���	��K�F�	��	�	�8�	$��"+�

�"+�
#�"+��"+��	"+�
�c�]�"+r#python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-312.pyc000064400000003560151732701200025633 0ustar00�

R`i���h�dZddlZddlmZddlmZddlmZmZddl	m
Z
ddlmZded	ed
e
de
fd�Zy)
z4Metadata generation logic for source distributions.
�N)�BuildBackendHookCaller)�BuildEnvironment)�InstallationSubprocessError�MetadataGenerationFailed)�runner_with_spinner_message)�
TempDirectory�	build_env�backend�details�returnc�f�tdd��}|j}|5td�}|j|�5	|j	|�}	ddd�ddd�tjj|�S#t
$r}t
|��|�d}~wwxYw#1swY�OxYw#1swY�SxYw)zlGenerate metadata using mechanisms described in PEP 517.

    Returns the generated metadata directory.
    zmodern-metadataT)�kind�globally_managedz#Preparing metadata (pyproject.toml))�package_detailsN)	r�pathr�subprocess_runner� prepare_metadata_for_build_wheelrr�os�join)r	r
r�metadata_tmpdir�metadata_dir�runner�distinfo_dir�errors        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/build/metadata.py�generate_metadatars���$�):�T�R�O�"�'�'�L�	�-�-R�S��
�
&�
&�v�
.�
S�&�G�G��U��/�
��7�7�<�<��l�3�3��/�
S�.�w�G�U�R��
S��/�
.��
��s?�B'�B�A=�
B'�=	B�
B�B�B�B$	� B'�'B0)�__doc__r�pip._vendor.pyproject_hooksr�pip._internal.build_envr�pip._internal.exceptionsrr�pip._internal.utils.subprocessr�pip._internal.utils.temp_dirr�strr��r�<module>r&sH���
�>�4��G�6�4��4�*@�4�KN�4��4r%python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-312.pyc000064400000007575151732701200026515 0ustar00�

R`i�����ddlZddlZddlmZmZddlmZddlm	Z	ddl
mZmZeje�Zdeededefd	�Zd
eedededeededeefd
�Zdedededeedeededeefd�Zy)�N)�List�Optional)�open_spinner)� make_setuptools_bdist_wheel_args)�call_subprocess�format_command_args�command_args�command_output�returnc���t|�}d|�d�}|s|dz
}|Stj�tjkDr|dz
}|S|jd�s|dz
}|d|��z
}|S)z'Format command information for logging.zCommand arguments: �
zCommand output: Nonez'Command output: [use --verbose to show]zCommand output:
)r�logger�getEffectiveLevel�logging�DEBUG�endswith)r	r
�command_desc�texts    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_legacy.py�format_command_resultrs���
'�|�4�L�
 ���b�1�D���&�&���K�
�	!�	!�	#�g�m�m�	3��9�9���K�	�&�&�t�,��d�"�N��#�N�#3�4�4���K��names�temp_dir�namec�V�t|�}|s6dj|�}|t||�z
}tj	|�yt|�dkDr6dj||�}|t||�z
}tj	|�tjj||d�S)z>Return the path to the wheel in the temporary build directory.z1Legacy build of wheel for {!r} created no files.
N�zZLegacy build of wheel for {!r} created more than one file.
Filenames (choosing first): {}
r)	�sorted�formatrr�warning�len�os�path�join)rrrr	r
�msgs      r�get_legacy_build_wheel_pathr% s���
�5�M�E��C�K�K�D�Q���$�\�>�B�B�����s���
�5�z�A�~�
/�
�&��u�
�	�	�$�\�>�B�B�����s��
�7�7�<�<��%��(�+�+r�
setup_py_path�
source_dir�global_options�
build_options�tempdc��t||||��}d|�d�}t|�5}tjd|�	t	|d||��}	tj|�}
t|
||||	�
�}|cd	d	d	�S#t
$r2|j
d�tjd|�Yd	d	d	�y	wxYw#1swYy	xYw)z�Build one unpacked package using the "legacy" build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    )r(r)�destination_dirzBuilding wheel for z (setup.py)zDestination directory: %szpython setup.py bdist_wheel)r�cwd�spinner�errorzFailed building wheel for %sN)rrrr	r
)rrr�debugr�	Exception�finishr/r!�listdirr%)rr&r'r(r)r*�
wheel_args�spin_messager.�outputr�
wheel_paths            r�build_wheel_legacyr8;s���2��%�#��	�J�)���k�:�L�	�l�	#�w����0�%�8�
	�$��:���	�F��
�
�5�!��0����#�!�
�
��/
$�	#���	��N�N�7�#��L�L�7��>��
$�	#�	��
$�	#�s.�B6�A8�&B6�80B3�(B6�2B3�3B6�6B?)r�os.pathr!�typingrr�pip._internal.cli.spinnersr�$pip._internal.utils.setuptools_buildr�pip._internal.utils.subprocessrr�	getLogger�__name__r�strrr%r8�rr�<module>rBs�����!�3�Q�O�	��	�	�8�	$����s�)����	��(,���9�,��,��,��s�)�	,�
�,��c�]�
,�6+�

�+��+��+���I�	+�
��9�+��
+��c�]�+rpython3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-312.pyc000064400000006030151732701200027152 0ustar00�

R`i����dZddlZddlZddlmZddlmZddlmZm	Z	m
Z
ddlmZddl
mZddlmZej"e�Zd	ed
efd�Zded
edededed
efd�Zy)z;Metadata generation logic for legacy source distributions.
�N)�BuildEnvironment)�open_spinner)�InstallationError�InstallationSubprocessError�MetadataGenerationFailed)�make_setuptools_egg_info_args)�call_subprocess)�
TempDirectory�	directory�returnc�*�tj|�D�cgc]}|jd�s�|��}}|std|����t	|�dkDrtdj|���tjj||d�Scc}w)z.Find an .egg-info subdirectory in `directory`.z	.egg-infoz No .egg-info directory found in �z-More than one .egg-info directory found in {}r)�os�listdir�endswithr�len�format�path�join)r�f�	filenamess   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_legacy.py�_find_egg_infors����J�J�y�1�M�1�q�Q�Z�Z��5L��1�I�M���"B�9�+� N�O�O�
�9�~����;�B�B�9�M�
�	
��7�7�<�<�	�9�Q�<�0�0��Ns
�B�B�	build_env�
setup_py_path�
source_dir�isolated�detailsc�p�tjd||�tdd��j}t	|||��}|5td�5}	t
||d|��	d
d
d
�d
d
d
�t|�S#t$r}t|�	�|�d
}~wwxYw#1swY�:xYw#1swYt|�SxYw)znGenerate metadata using setup.py-based defacto mechanisms.

    Returns the generated metadata directory.
    z2Running setup.py (path:%s) egg_info for package %szpip-egg-infoT)�kind�globally_managed)�egg_info_dir�no_user_configzPreparing metadata (setup.py)zpython setup.py egg_info)�cwd�command_desc�spinner)�package_detailsN)
�logger�debugr
rrrr	rrr)	rrrrrr"�argsr&�errors	         r�generate_metadatar,$s����L�L�<����!�n�t�L�Q�Q�L�(��!���D�
�
�9�
:�g�
S���"�!;�#�	�;�
��,�'�'��	/�
S�.�w�G�U�R��
S��;�
:��
��,�'�'�sA�B"�B�
A8�B"�8	B�
B�B�B�B	�B"�"B5)�__doc__�loggingr�pip._internal.build_envr�pip._internal.cli.spinnersr�pip._internal.exceptionsrrr�$pip._internal.utils.setuptools_buildr�pip._internal.utils.subprocessr	�pip._internal.utils.temp_dirr
�	getLogger�__name__r(�strr�boolr,��r�<module>r;s�����	�4�3���
O�:�6�	��	�	�8�	$��1�c�1�c�1�&(��&(��&(��&(��	&(�
�&(�	�
&(r:python3.12/site-packages/pip/_internal/operations/build/wheel_legacy.py000064400000005770151732701200022147 0ustar00import logging
import os.path
from typing import List, Optional

from pip._internal.cli.spinners import open_spinner
from pip._internal.utils.setuptools_build import make_setuptools_bdist_wheel_args
from pip._internal.utils.subprocess import call_subprocess, format_command_args

logger = logging.getLogger(__name__)


def format_command_result(
    command_args: List[str],
    command_output: str,
) -> str:
    """Format command information for logging."""
    command_desc = format_command_args(command_args)
    text = f"Command arguments: {command_desc}\n"

    if not command_output:
        text += "Command output: None"
    elif logger.getEffectiveLevel() > logging.DEBUG:
        text += "Command output: [use --verbose to show]"
    else:
        if not command_output.endswith("\n"):
            command_output += "\n"
        text += f"Command output:\n{command_output}"

    return text


def get_legacy_build_wheel_path(
    names: List[str],
    temp_dir: str,
    name: str,
    command_args: List[str],
    command_output: str,
) -> Optional[str]:
    """Return the path to the wheel in the temporary build directory."""
    # Sort for determinism.
    names = sorted(names)
    if not names:
        msg = ("Legacy build of wheel for {!r} created no files.\n").format(name)
        msg += format_command_result(command_args, command_output)
        logger.warning(msg)
        return None

    if len(names) > 1:
        msg = (
            "Legacy build of wheel for {!r} created more than one file.\n"
            "Filenames (choosing first): {}\n"
        ).format(name, names)
        msg += format_command_result(command_args, command_output)
        logger.warning(msg)

    return os.path.join(temp_dir, names[0])


def build_wheel_legacy(
    name: str,
    setup_py_path: str,
    source_dir: str,
    global_options: List[str],
    build_options: List[str],
    tempd: str,
) -> Optional[str]:
    """Build one unpacked package using the "legacy" build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    """
    wheel_args = make_setuptools_bdist_wheel_args(
        setup_py_path,
        global_options=global_options,
        build_options=build_options,
        destination_dir=tempd,
    )

    spin_message = f"Building wheel for {name} (setup.py)"
    with open_spinner(spin_message) as spinner:
        logger.debug("Destination directory: %s", tempd)

        try:
            output = call_subprocess(
                wheel_args,
                command_desc="python setup.py bdist_wheel",
                cwd=source_dir,
                spinner=spinner,
            )
        except Exception:
            spinner.finish("error")
            logger.error("Failed building wheel for %s", name)
            return None

        names = os.listdir(tempd)
        wheel_path = get_legacy_build_wheel_path(
            names=names,
            temp_dir=tempd,
            name=name,
            command_args=wheel_args,
            command_output=output,
        )
        return wheel_path
python3.12/site-packages/pip/_internal/operations/build/build_tracker.py000064400000011340151732701200022317 0ustar00import contextlib
import hashlib
import logging
import os
from types import TracebackType
from typing import Dict, Generator, Optional, Set, Type, Union

from pip._internal.models.link import Link
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils.temp_dir import TempDirectory

logger = logging.getLogger(__name__)


@contextlib.contextmanager
def update_env_context_manager(**changes: str) -> Generator[None, None, None]:
    target = os.environ

    # Save values from the target and change them.
    non_existent_marker = object()
    saved_values: Dict[str, Union[object, str]] = {}
    for name, new_value in changes.items():
        try:
            saved_values[name] = target[name]
        except KeyError:
            saved_values[name] = non_existent_marker
        target[name] = new_value

    try:
        yield
    finally:
        # Restore original values in the target.
        for name, original_value in saved_values.items():
            if original_value is non_existent_marker:
                del target[name]
            else:
                assert isinstance(original_value, str)  # for mypy
                target[name] = original_value


@contextlib.contextmanager
def get_build_tracker() -> Generator["BuildTracker", None, None]:
    root = os.environ.get("PIP_BUILD_TRACKER")
    with contextlib.ExitStack() as ctx:
        if root is None:
            root = ctx.enter_context(TempDirectory(kind="build-tracker")).path
            ctx.enter_context(update_env_context_manager(PIP_BUILD_TRACKER=root))
            logger.debug("Initialized build tracking at %s", root)

        with BuildTracker(root) as tracker:
            yield tracker


class TrackerId(str):
    """Uniquely identifying string provided to the build tracker."""


class BuildTracker:
    """Ensure that an sdist cannot request itself as a setup requirement.

    When an sdist is prepared, it identifies its setup requirements in the
    context of ``BuildTracker.track()``. If a requirement shows up recursively, this
    raises an exception.

    This stops fork bombs embedded in malicious packages."""

    def __init__(self, root: str) -> None:
        self._root = root
        self._entries: Dict[TrackerId, InstallRequirement] = {}
        logger.debug("Created build tracker: %s", self._root)

    def __enter__(self) -> "BuildTracker":
        logger.debug("Entered build tracker: %s", self._root)
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self.cleanup()

    def _entry_path(self, key: TrackerId) -> str:
        hashed = hashlib.sha224(key.encode()).hexdigest()
        return os.path.join(self._root, hashed)

    def add(self, req: InstallRequirement, key: TrackerId) -> None:
        """Add an InstallRequirement to build tracking."""

        # Get the file to write information about this requirement.
        entry_path = self._entry_path(key)

        # Try reading from the file. If it exists and can be read from, a build
        # is already in progress, so a LookupError is raised.
        try:
            with open(entry_path) as fp:
                contents = fp.read()
        except FileNotFoundError:
            pass
        else:
            message = "{} is already being built: {}".format(req.link, contents)
            raise LookupError(message)

        # If we're here, req should really not be building already.
        assert key not in self._entries

        # Start tracking this requirement.
        with open(entry_path, "w", encoding="utf-8") as fp:
            fp.write(str(req))
        self._entries[key] = req

        logger.debug("Added %s to build tracker %r", req, self._root)

    def remove(self, req: InstallRequirement, key: TrackerId) -> None:
        """Remove an InstallRequirement from build tracking."""

        # Delete the created file and the corresponding entry.
        os.unlink(self._entry_path(key))
        del self._entries[key]

        logger.debug("Removed %s from build tracker %r", req, self._root)

    def cleanup(self) -> None:
        for key, req in list(self._entries.items()):
            self.remove(req, key)

        logger.debug("Removed build tracker: %r", self._root)

    @contextlib.contextmanager
    def track(self, req: InstallRequirement, key: str) -> Generator[None, None, None]:
        """Ensure that `key` cannot install itself as a setup requirement.

        :raises LookupError: If `key` was already provided in a parent invocation of
                             the context introduced by this method."""
        tracker_id = TrackerId(key)
        self.add(req, tracker_id)
        yield
        self.remove(req, tracker_id)
python3.12/site-packages/pip/_internal/operations/build/wheel_editable.py000064400000002611151732701200022443 0ustar00import logging
import os
from typing import Optional

from pip._vendor.pyproject_hooks import BuildBackendHookCaller, HookMissing

from pip._internal.utils.subprocess import runner_with_spinner_message

logger = logging.getLogger(__name__)


def build_wheel_editable(
    name: str,
    backend: BuildBackendHookCaller,
    metadata_directory: str,
    tempd: str,
) -> Optional[str]:
    """Build one InstallRequirement using the PEP 660 build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    """
    assert metadata_directory is not None
    try:
        logger.debug("Destination directory: %s", tempd)

        runner = runner_with_spinner_message(
            f"Building editable for {name} (pyproject.toml)"
        )
        with backend.subprocess_runner(runner):
            try:
                wheel_name = backend.build_editable(
                    tempd,
                    metadata_directory=metadata_directory,
                )
            except HookMissing as e:
                logger.error(
                    "Cannot build editable %s because the build "
                    "backend does not have the %s hook",
                    name,
                    e,
                )
                return None
    except Exception:
        logger.error("Failed building editable for %s", name)
        return None
    return os.path.join(tempd, wheel_name)
python3.12/site-packages/pip/_internal/operations/build/wheel.py000064400000002063151732701200020613 0ustar00import logging
import os
from typing import Optional

from pip._vendor.pyproject_hooks import BuildBackendHookCaller

from pip._internal.utils.subprocess import runner_with_spinner_message

logger = logging.getLogger(__name__)


def build_wheel_pep517(
    name: str,
    backend: BuildBackendHookCaller,
    metadata_directory: str,
    tempd: str,
) -> Optional[str]:
    """Build one InstallRequirement using the PEP 517 build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    """
    assert metadata_directory is not None
    try:
        logger.debug("Destination directory: %s", tempd)

        runner = runner_with_spinner_message(
            f"Building wheel for {name} (pyproject.toml)"
        )
        with backend.subprocess_runner(runner):
            wheel_name = backend.build_wheel(
                tempd,
                metadata_directory=metadata_directory,
            )
    except Exception:
        logger.error("Failed building wheel for %s", name)
        return None
    return os.path.join(tempd, wheel_name)
python3.12/site-packages/pip/_internal/operations/build/__init__.py000064400000000000151732701200021233 0ustar00python3.12/site-packages/pip/_internal/operations/build/metadata_legacy.py000064400000004226151732701200022616 0ustar00"""Metadata generation logic for legacy source distributions.
"""

import logging
import os

from pip._internal.build_env import BuildEnvironment
from pip._internal.cli.spinners import open_spinner
from pip._internal.exceptions import (
    InstallationError,
    InstallationSubprocessError,
    MetadataGenerationFailed,
)
from pip._internal.utils.setuptools_build import make_setuptools_egg_info_args
from pip._internal.utils.subprocess import call_subprocess
from pip._internal.utils.temp_dir import TempDirectory

logger = logging.getLogger(__name__)


def _find_egg_info(directory: str) -> str:
    """Find an .egg-info subdirectory in `directory`."""
    filenames = [f for f in os.listdir(directory) if f.endswith(".egg-info")]

    if not filenames:
        raise InstallationError(f"No .egg-info directory found in {directory}")

    if len(filenames) > 1:
        raise InstallationError(
            "More than one .egg-info directory found in {}".format(directory)
        )

    return os.path.join(directory, filenames[0])


def generate_metadata(
    build_env: BuildEnvironment,
    setup_py_path: str,
    source_dir: str,
    isolated: bool,
    details: str,
) -> str:
    """Generate metadata using setup.py-based defacto mechanisms.

    Returns the generated metadata directory.
    """
    logger.debug(
        "Running setup.py (path:%s) egg_info for package %s",
        setup_py_path,
        details,
    )

    egg_info_dir = TempDirectory(kind="pip-egg-info", globally_managed=True).path

    args = make_setuptools_egg_info_args(
        setup_py_path,
        egg_info_dir=egg_info_dir,
        no_user_config=isolated,
    )

    with build_env:
        with open_spinner("Preparing metadata (setup.py)") as spinner:
            try:
                call_subprocess(
                    args,
                    cwd=source_dir,
                    command_desc="python setup.py egg_info",
                    spinner=spinner,
                )
            except InstallationSubprocessError as error:
                raise MetadataGenerationFailed(package_details=details) from error

    # Return the .egg-info directory.
    return _find_egg_info(egg_info_dir)
python3.12/site-packages/pip/_internal/operations/build/metadata_editable.py000064400000002702151732701200023120 0ustar00"""Metadata generation logic for source distributions.
"""

import os

from pip._vendor.pyproject_hooks import BuildBackendHookCaller

from pip._internal.build_env import BuildEnvironment
from pip._internal.exceptions import (
    InstallationSubprocessError,
    MetadataGenerationFailed,
)
from pip._internal.utils.subprocess import runner_with_spinner_message
from pip._internal.utils.temp_dir import TempDirectory


def generate_editable_metadata(
    build_env: BuildEnvironment, backend: BuildBackendHookCaller, details: str
) -> str:
    """Generate metadata using mechanisms described in PEP 660.

    Returns the generated metadata directory.
    """
    metadata_tmpdir = TempDirectory(kind="modern-metadata", globally_managed=True)

    metadata_dir = metadata_tmpdir.path

    with build_env:
        # Note that BuildBackendHookCaller implements a fallback for
        # prepare_metadata_for_build_wheel/editable, so we don't have to
        # consider the possibility that this hook doesn't exist.
        runner = runner_with_spinner_message(
            "Preparing editable metadata (pyproject.toml)"
        )
        with backend.subprocess_runner(runner):
            try:
                distinfo_dir = backend.prepare_metadata_for_build_editable(metadata_dir)
            except InstallationSubprocessError as error:
                raise MetadataGenerationFailed(package_details=details) from error

    return os.path.join(metadata_dir, distinfo_dir)
python3.12/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-312.pyc000064400000023577151732701200024246 0ustar00�

R`iX&��t�ddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZmZddlmZmZddlmZmZddlmZdd	lmZej:e�ZGd
�de	�Z 							dde
ee!d
e"de"de
ee!de"de"dee!dee!ddffd�Z#dede!fd�Z$dede fd�Z%Gd�d�Z&y)�N)�	Container�Dict�	Generator�Iterable�List�
NamedTuple�Optional�Set)�canonicalize_name)�Version)�
BadCommand�InstallationError)�BaseDistribution�get_environment)�install_req_from_editable�install_req_from_line)�
COMMENT_RE)�%direct_url_as_pep440_direct_referencec�(�eZdZUeed<eeed<y)�
_EditableInfo�requirement�commentsN)�__name__�
__module__�__qualname__�str�__annotations__r����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/freeze.pyrrs�����3�i�rrr�
local_only�	user_only�paths�isolated�exclude_editable�skip�returnc#�*K�i}t|�j|d|��}|D]5}	tj|	�}
|r
|
jr�'|
||
j
<�7|�r�t
�}tjt�}|D�]O}
t|
�5}|D�]1}|j�r0|j�jd�s|jd�r*|j�}||vr|j|�|���n|jd�s|jd�r^|jd�r|ddj�}n+|td�dj�j!d�}t#||�	�}n/t%t'j(d
|�j�|�	�}|j*s<t,j/d|
|j��t,j/d���et1|j*�}||vru||j*sFt,j3d
|
t'j(d
|�j�|j*����||j*j5|
����t7||�j���||=||j*j5|
���4	ddd���R|j9�D]L\}}t|�dkDs�t,j3d|dj;t=t
|�����Nd��t=|j?�d���D],}|j
|vs�t7|�j����.y#1swY��xYw�w)Nr)r!r&r"�#)z-rz
--requirementz-fz--find-linksz-iz--index-urlz--prez--trusted-hostz--process-dependency-linksz--extra-index-urlz
--use-featurez-ez
--editable��=)r$�zWSkipping line in requirement file [%s] because it's not clear what it would install: %sz9  (add #egg=PackageName to the URL to avoid this warning)zBRequirement file [%s] contains %s, but package %r is not installed�z+Requirement %s included multiple times [%s]z, z7## The following requirements were added by pip freeze:c�6�|jj�S�N)�name�lower)�xs r �<lambda>zfreeze.<locals>.<lambda>�s��Q�V�V�\�\�^r)�key) r�iter_installed_distributions�FrozenRequirement�	from_dist�editable�canonical_name�set�collections�defaultdict�list�open�strip�
startswith�rstrip�add�len�lstriprrr�subr0�logger�infor�warning�appendr�items�join�sorted�values)rr!r"r#r$r%r&�
installations�dists�dist�req�emitted_options�	req_files�
req_file_path�req_file�line�line_req�line_req_canonical_namer0�files�installations                     r �freezer[s����35�M��E�"�?�?��
��
@�
�E�
���)�)�$�/�������,/�
�c�(�(�)�	��
%(�E��+6�*A�*A�$�*G�	�(�M��m�$��$�D� �J�J�L��:�:�<�2�2�3�7��?�?���  $�{�{�}����6�+�/�/��5�"&�J� ����t�,�����0M��?�?�4�0�#'���8�>�>�#3�D�#'��L�(9�(;�#<�#B�#B�#D�#K�#K�C�#P�D�#<� �%-�$��
$9�&�N�N�2�t�4�:�:�<�%-�$��
$�=�=����G�)� �J�J�L�	����-��
3D�H�M�M�2R�/�2�-�G�$-�X�]�]�#;� &���%B�$1�$.�N�N�2�t�$<�$B�$B�$D�$,�M�M�!"�!*�(�-�-� 8� ?� ?�
� N�"%�m�4K�&L�"M�"T�"T�"V�V� -�.E� F�%�h�m�m�4�;�;�M�J�M%�%�$�)�X%�?�?�,�K�D�%��5�z�A�~����A���I�I�f�S��Z�0�1��-�I�I��}�3�3�5�;S�T���&�&�d�2��l�#�*�*�,�,�U�i%�$�s,�BN�H8N�/N�<A+N�(N�N	�NrPc�~�|j}t|t�r|j�d|��S|j�d|��S)Nz==z===)�version�
isinstancer�raw_name)rP�dist_versions  r �_format_as_name_versionra�s?���<�<�L��,��(��-�-���<�.�1�1��m�m�_�C��~�.�.rc	��|j}|sJ�tjjtjj	|��}ddlm}m}m}|j|�}|�4t|�}tjd||�t|d|�d�g��St|�j}	|j!||j"�}	t|	g��S#|$r#t|�}t|d|�d	|�d�g��cYS|$r9}
t|�}t|d|�d
|�d�d|
j$�d
�g��cYd}
~
Sd}
~
wt&$r1tj)d||j*�t|g��cYSt,$r }tj)d|�Yd}~nd}~wwxYwtj)d|�t|dg��S)za
    Compute and return values (req, comments) for use in
    FrozenRequirement.from_dist().
    r)�RemoteNotFoundError�RemoteNotValidError�vcsNz1No VCS found for editable requirement "%s" in: %rz,# Editable install with no version control (�))rrz# Editable z install with no remote (z
 install (z4) with either a deleted local remote or invalid URI:z# '�'zPcannot determine version of editable source in %s (%s command not found in path)z6Error when trying to get requirement for VCS system %sz-Could not determine repository location of %sz-## !! Could not determine repository location)�editable_project_location�os�path�normcase�abspath�pip._internal.vcsrcrdre�get_backend_for_dirrarF�debugr�typer�get_src_requirementr_�urlr
rHr0r)rPrh�locationrcrdre�vcs_backend�display�vcs_namerQ�ex�excs            r �_get_editable_infory�s���
!%� >� >��$�$�$��w�w��������0I� J�K�H�O�O��)�)�(�3�K���)�$�/�����?���	
�
� �D�W�I�Q�O�P�
�	
�
�K� �)�)�H�;��-�-�h��
�
�F��8��r�:�:��7�
�)�$�/��� �#�H�:�-F�w�i�q�Q�R�
�	
��	
�)�$�/��� ��h�Z�z�'��;/�0��b�f�f�X�Q���
�	
���@����
-�����		
���B�?�?��V����O�QT�U�U��V��
�N�N�B�H�M���A�B��s6�4C�%F �F �.D<�6F �<:F �8F �F�F c�X�eZdZ	ddedededeeddf
d�Zededdfd	��Z	defd
�Z
y)r6r0rQr8rr'Nc�\�||_t|�|_||_||_||_yr/)r0rr9rQr8r)�selfr0rQr8rs     r �__init__zFrozenRequirement.__init__�s-����	�/��5������ ��
� ��
rrPc���|j}|rt|�\}}n2g}|j}|rt||j�}nt|�}||j|||��S)N)r)r8ry�
direct_urlrr_ra)�clsrPr8rQrrs      r r7zFrozenRequirement.from_dist�s^���=�=���.�t�4�M�C���H����J��;�J��
�
�V��.�d�3���4�=�=�#�x�(�C�Crc��|j}|jrd|��}djt|j�t|�gz�dzS)Nz-e �
)rQr8rKr=rr)r|rQs  r �__str__zFrozenRequirement.__str__�sE���h�h���=�=���u�+�C��y�y��d�m�m�,��C��z�9�:�T�A�Ar)r)rrrr�boolrr}�classmethodrr7r�rrr r6r6�sv��#%�!��!��!��	!�
�3�-�!�
�
!��D�-�D�2E�D��D� B��Brr6)NFFNFFr)'r;�loggingri�typingrrrrrrr	r
�pip._vendor.packaging.utilsr�pip._vendor.packaging.versionr�pip._internal.exceptionsr
r�pip._internal.metadatarr�pip._internal.req.constructorsrr�pip._internal.req.req_filer�&pip._internal.utils.direct_url_helpersr�	getLoggerrrFrrr�r[raryr6rrr �<module>r�s����	�X�X�X�9�1�B�D��2�X�	��	�	�8�	$���J��(,���!%��"��v-��$�s�)�$�v-��v-��v-��D��I��	v-�
�v-��
v-��C�.�v-��s�D�$���v-�r/�"2�/�s�/�?�-�?�-�?�D#B�#Brpython3.12/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-312.pyc000064400000000364151732701200024512 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/__init__.py�<module>rs�rpython3.12/site-packages/pip/_internal/operations/__pycache__/check.cpython-312.pyc000064400000016640151732701200024034 0ustar00�

R`i�����dZddlZddlmZmZmZmZmZmZm	Z	ddl
mZddlm
Z
ddlmZmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZej:e�ZGd
�de�Z eee fZ!e	eefZ"e	eeefZ#eeee"fZ$eeee#fZ%e	e$e%fZ&e	e!e&fZ'de	e!e(ffd�Z)	dde!deee*ge(fde&fd�Z+deede'fd�Z,deede!deefd�Z-deede!deefd�Z.de!ddfd�Z/y)z'Validation of dependencies of packages
�N)�Callable�Dict�List�
NamedTuple�Optional�Set�Tuple)�Requirement)�LegacySpecifier)�NormalizedName�canonicalize_name)�
LegacyVersion)�)make_distribution_for_install_requirement)�get_default_environment)�DistributionVersion)�InstallRequirement)�
deprecatedc�(�eZdZUeed<eeed<y)�PackageDetails�version�dependenciesN)�__name__�
__module__�__qualname__r�__annotations__rr
����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/check.pyrrs��
 � ��{�#�#rr�returnc�>�i}d}t�}|jdd��D]A}|j}	t|j	��}t|j|�||<�C||fS#ttf$r#}tjd||�d}Yd}~�ud}~wwxYw)z3Converts a list of distributions into a PackageSet.Fr)�
local_only�skipz%Error parsing requirements for %s: %sTN)r�iter_installed_distributions�canonical_name�list�iter_dependenciesrr�OSError�
ValueError�logger�warning)�package_set�problems�env�dist�namer�es       r�!create_package_set_from_installedr1%s����K��H�
!�
#�C��0�0�E��0�K���"�"��	��� 6� 6� 8�9�L� .�t�|�|�\� J�K���	L��� � ��	��$�	��N�N�B�D�!�L��H��	�s�2A*�*B�9B�Br+�
should_ignorec�H�t|�i}i}|j�D]�\}}t�}t�}|r	||�r�%|jD]�}t	|j
�}	|	|vrAd}
|j�|jjddi�}
|
r|j|	|f��]||	j}|jj|d��r��|j|	||f���|rt|t��||<|s��t|t��||<��||fS)z�Check if a package set is consistent

    If should_ignore is passed, it should be a callable that takes a
    package name and returns a boolean.
    T�extra�)�prereleases)�key)�#warn_legacy_versions_and_specifiers�items�setrr
r/�marker�evaluate�addr�	specifier�contains�sorted�str)r+r2�missing�conflicting�package_name�package_detail�missing_deps�conflicting_deps�reqr/�missedrs            r�check_package_setrJ6s'��(��4��G��K�(3�(9�(9�(;�$��n�%(�U��-0�U���]�<�8��!�.�.�C�$�S�X�X�.�D��;�&����:�:�)� �Z�Z�0�0�'�2��?�F�� �$�$�d�C�[�1��"�$�'�/�/�G��=�=�)�)�'�t�)�D� �$�$�d�G�S�%9�:�/�"�$*�<�S�$A�G�L�!��(.�/?�S�(I�K��%�9)<�<�K��r�
to_installc�r��t�\}}t||�}t||��|t|�fd���fS)zeFor checking if the dependency graph would be consistent after     installing given requirements
    c���|�vS�Nr)r/�	whitelists �r�<lambda>z)check_install_conflicts.<locals>.<lambda>ts
���D�	�4Ir)r2)r1�_simulate_installation_of�_create_whitelistrJ)rKr+�_�would_be_installedrOs    @r�check_install_conflictsrUesJ���
7�8�N�K��2�:�{�K��"�"4�k�B�I�	���'I�	
��rc��t�}|D]j}t|�}|j�}|j}t	|j
t
|j���||<|j|��l|S)z=Computes the version of packages after installing to_install.)	r:r�get_metadata_distributionr$rrr%r&r=)rKr+�	installed�inst_req�
abstract_distr.r/s       rrQrQysq��
��I���A�(�K�
��6�6�8���"�"��*�4�<�<��d�>T�>T�>V�9W�X��D���
�
�d��
��rrTc��t|�}|D]E}||vr�||jD],}t|j�|vs�|j	|��E�G|SrN)r:rr
r/r=)rTr+�packages_affectedrDrHs     rrRrR�sf���.�/��#���,�,���|�,�9�9�C� ����*�.?�?�!�%�%�l�3��:�	$��rc
�V�|j�D]�\}}t|jt�r#t	|�d|j�d�d|�d�dd��|j
D]E}t
d�|jD��s� t	|�d|j�d	|�d
�d|�d�dd���G��y)N� z# has a non-standard version number.z!to upgrade to a newer version of z^ or contact the author to suggest that they release a version with a conforming version numberi/z24.0)�reason�replacement�issue�gone_inc3�<K�|]}t|t����y�wrN)�
isinstancer)�.0�specs  r�	<genexpr>z6warn_legacy_versions_and_specifiers.<locals>.<genexpr>�s����O���:�d�O�4��s�z) has a non-standard dependency specifier �.ze or contact the author to suggest that they release a version with a conforming dependency specifiers)r9rdrrrr�anyr>)r+�project_name�package_details�deps    rr8r8�s���)4�):�):�)<�%��o��o�-�-�}�=��#�n�A�o�&=�&=�%>�?9�:�8��~�FI�J���
�#�/�/�C��O����O�O��'�.��/�*A�*A�)B�CC�CF�%�q�J�<�L�>�JT�U� �"��0�*=rrN)0�__doc__�logging�typingrrrrrrr	�"pip._vendor.packaging.requirementsr
� pip._vendor.packaging.specifiersr�pip._vendor.packaging.utilsrr
�pip._vendor.packaging.versionr�pip._internal.distributionsr�pip._internal.metadatar�pip._internal.metadata.baser�pip._internal.req.req_installr�pip._internal.utils.deprecationr�	getLoggerrr)r�
PackageSet�Missing�Conflicting�MissingDict�ConflictingDict�CheckResult�ConflictDetails�boolr1rArJrUrQrRr8rrr�<module>r�s�����I�I�I�:�<�I�7�Q�:�;�<�6�	��	�	�8�	$��$�Z�$��.�.�0�
1�
�
���+�
,���N�$7��D�E���>�4��=�0�1���~�t�K�'8�8�9���K��0�1���
�K�/�0��!�5��T�1A�+B�!�$OS�, ��, �,4�X�s�e�T�k�5J�,K�, ��, �^��-?�(@��_��(��'�(��7A������&��N�+��:D������"�Z��D�rpython3.12/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-312.pyc000064400000062247151732701200024421 0ustar00�

R`i�m���dZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZddl
mZddlmZddlmZmZmZmZmZmZmZdd	lmZdd
lmZmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3m4Z4ddl5m6Z6m7Z7ddl8m9Z9ddl:m;Z;m<Z<m=Z=m>Z>ddl?m@Z@ddlAmBZBddlCmDZDe1eE�ZFde/de-dedeGdeGd efd!�ZHd"e!d#eId$eJd dfd%�ZKGd&�d'�ZL		d2d"e!d(e&d)e
eId*e
e6d eLf
d+�ZM	d2d"e!d)e
eId*e
e6d eLfd,�ZN		d2d"e!d#eId(e&d$eJd)e
eId*e
e6d e
eLfd-�ZO	d3d"e!d)eId*e
e6d.eGd e
eIf
d/�ZPGd0�d1�ZQy)4z)Prepares a distribution for installation
�N)�Path)�Dict�Iterable�List�Optional)�canonicalize_name)�)make_distribution_for_install_requirement)�InstalledDistribution)�DirectoryUrlHashUnsupported�HashMismatch�HashUnpinned�InstallationError�MetadataInconsistent�NetworkConnectionError�VcsHashUnsupported)�
PackageFinder)�BaseDistribution�get_metadata_distribution)�ArchiveInfo)�Link)�Wheel)�BatchDownloader�
Downloader)�HTTPRangeRequestUnsupported�dist_from_wheel_url)�
PipSession)�BuildTracker)�InstallRequirement)�	getLogger)�direct_url_for_editable�direct_url_from_link)�Hashes�
MissingHashes)�
indent_log)�display_path�	hash_file�hide_url�redact_auth_from_requirement)�
TempDirectory)�unpack_file)�vcs�req�
build_tracker�finder�build_isolation�check_build_deps�returnc��t|�}|j}|�>|j||�5|j|||�ddd�|j	�S|j	�S#1swY|j	�SxYw)z(Prepare a distribution for installation.N)r	�build_tracker_id�track�prepare_distribution_metadatar)r,r-r.r/r0�
abstract_dist�
tracker_ids       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/operations/prepare.py�_get_prepared_distributionr9;s���>�c�B�M��/�/�J���
�
 �
 ��j�
1��7�7���)9�
�2��2�2�4�4�=�2�2�4�4�	2��2�2�4�4�s�A(�(B�link�location�	verbosityc��tj|j�}|�J�|j|t	|j
�|��y)N)�urlr<)r+�get_backend_for_scheme�scheme�unpackr'r>)r:r;r<�vcs_backends    r8�unpack_vcs_linkrCMs@���,�,�T�[�[�9�K��"�"�"����x�X�d�h�h�%7�9��M�c�&�eZdZdedeeddfd�Zy)�File�path�content_typer1Nc�`�||_|�tj|�d|_y||_y)Nr)rG�	mimetypes�
guess_typerH)�selfrGrHs   r8�__init__z
File.__init__Ts/����	��� )� 4� 4�T� :�1� =�D�� ,�D�rD)�__name__�
__module__�__qualname__�strrrM�rDr8rFrFSs ��-�S�-���
�-�$�-rDrF�download�download_dir�hashesc��tdd��}d}|r
t|||�}|r|}d}n)|||j�\}}|r|j|�t	||�S)NrAT��kind�globally_managed)r)�_check_download_dirrG�check_against_pathrF)r:rSrTrU�temp_dir�already_downloaded_path�	from_pathrHs        r8�get_http_urlr_\sj���(�T�B�H�"���"5�d�L�&�"Q���+�	���#+�4����"?��	�<���%�%�i�0��	�<�(�(rDc��d}|r
t|||�}|r|}n|j}|r|j|�t|d�S)z'Get file and optionally check its hash.N)rZ�	file_pathr[rF)r:rTrUr]r^s     r8�get_file_urlrbtsM��
#���"5�d�L�&�"Q���+�	��N�N�	���!�!�)�,��	�4� � rDc��|jrt|||��y|j�rJ�|jrt	|||��}nt||||��}|js!t|j||j�|S)a_Unpack link into location, downloading if required.

    :param hashes: A Hashes object, one of whose embedded hashes must match,
        or HashMismatch will be raised. If the Hashes is empty, no matches are
        required, and unhashable types of requirements (like VCS ones, which
        would ordinarily raise HashUnsupported) are allowed.
    )r<N�rU)
�is_vcsrC�is_existing_dir�is_filerbr_�is_wheelr*rGrH)r:r;rSr<rTrU�files       r8�
unpack_urlrj�s�� �{�{���h�)�<���#�#�%�%�%��|�|��D�,�v�>�������	
���=�=��D�I�I�x��):�):�;��KrD�warn_on_hash_mismatchc�j�tjj||j�}tjj	|�syt
j
d|�|r	|j|�|S|S#t$r0|rt
jd|�tj|�YywxYw)z�Check download_dir for previously downloaded file with correct hash
    If a correct file is found return its path else None
    NzFile was already downloaded %sz;Previously-downloaded file %s has bad hash. Re-downloading.)�osrG�join�filename�exists�logger�infor[r�warning�unlink)r:rTrUrk�
download_paths     r8rZrZ�s����G�G�L�L��t�}�}�=�M�
�7�7�>�>�-�(���K�K�0�-�@�
�		��%�%�m�4���=����	�$����Q�!��
�I�I�m�$��	�s�$A9�96B2�1B2c�x��eZdZdZdedeedededededed	ed
e	deded
ede
deddf�fd�Zdeddfd�Z
dededdfd�Zdedefd�Zdedeefd�Zdedeefd�Zdedeefd�Z	d&deededdfd�Z	d&dededefd�Z	d&deededdfd �Zdededefd!�Zdeddfd"�Zdedefd#�Zded$edefd%�Z�xZS)'�RequirementPreparerzPrepares a Requirement�	build_dirrT�src_dirr/r0r-�session�progress_barr.�require_hashes�
use_user_site�
lazy_wheelr<�legacy_resolverr1Nc�8��t�|��||_||_||_||_t
||�|_t||�|_	|	|_
||_||_||_
|
|_||_||_|
|_||_i|_d|_y)N)�r�)�superrMryrxr-�_sessionr�	_downloadr�_batch_downloadr.rTr/r0r|r}�use_lazy_wheelr<r�_downloaded�_previous_requirement_header)rLrxrTryr/r0r-rzr{r.r|r}r~r<r�	__class__s               �r8rMzRequirementPreparer.__init__�s����"	�������"���*�����
�#�G�\�:���.�w��E������)��� /���!1���-���+���)���#��� /���,.���-5��)rDr,c���|jjr7|js+d}tt	|jj
��}n.d}|jrt|j�n
t|�}|jrX|jrLt|jt�r
|j}n|jj�}|r	|d|�d�z
}||f|jk7r||f|_tj||�|jr>t�5tjd|jj�ddd�yy#1swYyxYw)z3Provide context for the requirement being prepared.z
Processing %sz
Collecting %sz (from �)zUsing cached %sN)r:rg�is_wheel_from_cacherQr%rar,r(�
comes_from�
isinstancer^r�rqrrr$ro)rLr,�message�informationr�s     r8�_log_preparing_linkz'RequirementPreparer._log_preparing_links
���8�8���C�$;�$;�%�G��l�3�8�8�+=�+=�>�?�K�%�G�CF�7�7�6�s�w�w�?�PS�TW�PX�K��7�7�s�~�~��#�.�.�#�.�,/�N�N�
� �^�^�5�5�7�
������A�6�6���[�!�T�%F�%F�F�18�+�0F�D�-��K�K���-��"�"������-�s�x�x�/@�/@�A���#���s�&+E�E$�parallel_buildsc��|jjry|j�J�|jj�r|jj|_y|j|jd|��|j�y)z1Ensure source_dir of a linked InstallRequirement.NT)�
autodeleter�)r:rh�
source_dirrfra�ensure_has_source_dirrx�ensure_pristine_source_checkout)rLr,r�s   r8�_ensure_link_req_src_dirz,RequirementPreparer._ensure_link_req_src_dir-sz��
�8�8���
��~�~�%�%�%��8�8�#�#�%� �X�X�/�/�C�N��	�!�!��N�N��+�	"�	
�
	�+�+�-rDc�F�|js|jd��S|jjr
t	��|jj�r
t
��|js|js
t��|jd��xs
t�S)NT)�trust_internetF)r|rUr:rerrfr�	is_direct�	is_pinnedr
r#�rLr,s  r8�_get_linked_req_hashesz*RequirementPreparer._get_linked_req_hashesDs~���"�"��:�:�T�:�2�2��8�8�?�?�$�&�&��8�8�#�#�%�-�/�/��}�}�S�]�]��.� ��z�z��z�/�B�=�?�BrDc���|jrtjd�y|jrtjd�y|j	|�xs|j|j�S)Nz9Metadata-only fetching is not used in the legacy resolverz?Metadata-only fetching is not used as hash checking is required)rrq�debugr|�$_fetch_metadata_using_link_data_attr� _fetch_metadata_using_lazy_wheelr:r�s  r8�_fetch_metadata_onlyz(RequirementPreparer._fetch_metadata_onlydsk������L�L�K�
������L�L�Q�
���8�8��
�=�
�
2�
2�3�8�8�
<�	=rDc��|jj�}|�y|j�J�tj	d|j|�t||j|j���}t|jd�5}|j�}ddd�t|jj|jj�}t|j�t|jj�k7r,t!|d|jj|j��|S#1swY��xYw)zGFetch metadata from the data-dist-info-metadata attribute, if possible.Nz/Obtaining dependency information for %s from %srd�rb�Name)r:�
metadata_linkr,rq�verboser_r��	as_hashes�openrG�readrro�namer�raw_namer)rLr,r��
metadata_file�f�metadata_contents�
metadata_dists       r8r�z8RequirementPreparer._fetch_metadata_using_link_data_attrws�����.�.�0�
�� ���w�w�"�"�"����=��G�G��	
�%���N�N� �*�*�,�
�
�
�-�$�$�d�
+�q� !�����,�2���H�H����G�G�L�L�
�
��]�3�3�4�8I�#�'�'�,�,�8W�W�&��V�S�W�W�\�\�=�+A�+A��
���%,�
+�s�	D:�:Er:c���|jsy|js|jstj	d|�yt|j�}t|j�}tjd||j�|jjdd�d}	t|||j�S#t$rtj	d|�YywxYw)z-Fetch metadata using lazy wheel, if possible.Nz=Lazy wheel is not used as %r does not point to a remote wheelz+Obtaining dependency information from %s %s�#�rz"%s does not support range requests)r�rgrhrqr�rrorr�rr�versionr>�splitrr�r)rLr:�wheelr�r>s     r8r�z4RequirementPreparer._fetch_metadata_using_lazy_wheel�s����"�"���<�<�t�}�}��L�L�O��
���d�m�m�$�� ����,�����9���M�M�	
�
�h�h�n�n�S�!�$�Q�'��	�&�t�S�$�-�-�@�@��*�	��L�L�=�s�C��	�s�(B?�?C!� C!�partially_downloaded_reqsc���tdd��j}i}|D]}|jsJ�|||j<�!|j|j	�|�}|D]u\}\}}	t
j
d||�||}||_||j|jj<|jr�\|jt|���w|D]}|j||��y)z>Download any requirements which were only fetched by metadata.rATrWzDownloading link %s to %sN)r)rGr:r��keysrqr��local_file_pathr�r>rh�needs_unpacked_archiver�_prepare_linked_requirement)
rLr�r�r\�links_to_fully_downloadr,�batch_downloadr:�filepath�_s
          r8�_complete_partial_requirementsz2RequirementPreparer._complete_partial_requirements�s���!�h��F�K�K��
CE��,�C��8�8�O�8�03�#�C�H�H�-�-��-�-�#�(�(�*��
��$2��D�-�8�Q��L�L�4�d�H�E�)�$�/�C�#+�C��.6�D���S�X�X�\�\�*��<�<��*�*�4��>�:�$2�&-�C��,�,�S�/�B�-rDc��|jsJ�|j|�t�5d}|j�U|jjr?|j|�}t
|j|j||j��}|�$||j|jj<n%|j|�}|�d|_|cddd�S|j||�cddd�S#1swYyxYw)z3Prepare a requirement to be obtained from req.link.N)rkT)
r:r�r$rTrhr�rZr�r�r>r��needs_more_preparationr�)rLr,r�rarUr�s      r8�prepare_linked_requirementz.RequirementPreparer.prepare_linked_requirement�s����x�x��x�� � ��%�
�\��I�� � �,����1B�1B��4�4�S�9��/��H�H��%�%��/2�.E�.E�*E��	��$�1:�� � ������.�!%� 9� 9�#� >�
� �,�15�C�.�(�7�\�<�3�3�C��I�=�\�\�s�B%C4�C4�4C=�reqsc���|D�cgc]}|js�|��}}|D]�}|j��|jjs�'|j	|�}t|j|j|�}|��\||j|jj<d|_��g}|D]2}|jr|j|��!|j||��4|j||��ycc}w)z,Prepare linked requirements more, if needed.NF)r�)r�rTr:rhr�rZr�r>�appendr�r�)rLr�r�r,rUrar�s       r8� prepare_linked_requirements_morez4RequirementPreparer.prepare_linked_requirements_mores��� $�B�t��s�'A�'A��t��B��C�� � �,����1B�1B��4�4�S�9��/����$�:K�:K�V�T�	��(�5>�D�$�$�S�X�X�\�\�2�16�C�.��?A�!��C��)�)�)�0�0��5��0�0��o�F�	�	
�+�+�%�+�	,�	
��+Cs
�C4�C4c���|jsJ�|j}|j|�}|r�|jr�|j�J�|jsJ�|j
sJ�t
|jjt�rR|jjjr2|j|jjj�rd}n2tjd�|j|_|j}|j||�|j�rd}n�|j |j"vr:	t%||j&|j(|j*|j,|�}n9|j"|j }|r|j5|�t7|d��}|j��|j8rJ�t;||j&�|_t
|jjt�rf|jjjsF|rDt=|j>�djA�}d|��|jj_!|r|j>|_"tG||jH|jJ|jL|jN�}	|	S#t.$r!}t1dj3|||���d}~wwxYw)NzyThe hashes of the source archive found in cache entry don't match, ignoring cached built wheel and re-downloading source.zDCould not install requirement {} because of HTTP error {} for URL {})rHrzsha256=)(r:r�r��
download_inforhrgr�rrrrU�
has_one_ofrqrs�cached_wheel_source_linkr�rfr>r�rjr�r�r<rTrr�formatr[rF�editabler!r&rG�	hexdigest�hashr�r9r-r.r/r0)
rLr,r�r:rU�
local_file�excrar��dists
          r8r�z/RequirementPreparer._prepare_linked_requirement-s����x�x��x��x�x���,�,�S�1���c�-�-��$�$�0�0�0��=�=� �=��<�<��<��3�,�,�1�1�;�?��%�%�*�*�1�1��%�%�c�&7�&7�&<�&<�&C�&C�D������1��
�7�7����x�x���%�%�c�?�;����!��J�
�X�X�T�-�-�
-�

�'���N�N��N�N��N�N��%�%��
�
��(�(����2�I���)�)�)�4��i�d�;�J����$��|�|�#�#� 4�T�3�>�>� J�C���3�,�,�1�1�;�?��)�)�.�.�5�5�� ����1�!�4�>�>�@��18��v�.>��!�!�&�&�+��",�/�/�C��)������K�K�� � ��!�!�
�����W*�
�'�*�*0�&��c�4�*@����
�s�
8K�	K1�K,�,K1c�n�|j�J�|j�J�|j}|js|j�r(|jr|j|j�y|j�rtjd|�y|j�ytjj|j|j�}tjj|�sBtj|j|�t!|�}tj#d|�yy)NzENot copying link to destination directory since it is a directory: %szSaved %s)rTr:rerfr��archiverqr�r�rmrGrnrorp�shutil�copyr%rr)rLr,r:�download_locationrus     r8�save_linked_requirementz+RequirementPreparer.save_linked_requirement�s���� � �,�,�,��x�x�#�#�#��x�x���;�;�4�/�/�1�c�l�l��K�K��)�)�*�����!��L�L�.��
�

����&���G�G�L�L��):�):�D�M�M�J���w�w�~�~�/�0��K�K��+�+�->�?�(�):�;�M��K�K�
�M�2�1rDc�.�|jsJd��tjd|�t�5|jrtdj
|���|j|j�|j�|jsJ�t|j�|_
t||j|j |j"|j$�}|j'|j(�ddd�|S#1swYSxYw)z Prepare an editable requirement.z-cannot prepare a non-editable req as editablezObtaining %szoThe editable requirement {} cannot be installed when requiring hashes, because there is no single file to hash.N)r�rqrrr$r|rr�r�ry�update_editabler�r �unpacked_source_directoryr�r9r-r.r/r0�check_if_existsr})rLr,r�s   r8�prepare_editable_requirementz0RequirementPreparer.prepare_editable_requirement�s���
�|�|�L�L�L�|����N�C�(�
�\��"�"�'��"�F�3�K���

�%�%�d�l�l�3����!��>�>�!�>� 7��8U�8U� V�C��-���"�"�����$�$��%�%��D�
���� 2� 2�3�)�,��-�,��s�CD
�
D�skip_reasonc�x�|jsJd��|� Jdj|j���tjd|||jj�t�5|jrtjd�t|�j�cddd�S#1swYyxYw)z)Prepare an already-installed requirement.z(req should have been satisfied but isn'tNzAdid not get skip reason skipped but req.satisfied_by is set to {}zRequirement %s: %s (%s)z�Since it is already installed, we are trusting this package without checking its hash. To ensure a completely repeatable environment, install into an empty virtualenv.)
�satisfied_byr�rqrrr�r$r|r�r
r)rLr,r�s   r8�prepare_installed_requirementz1RequirementPreparer.prepare_installed_requirement�s������K�!K�K���&�	
�
�!�6�#�"2�"2�3�	
�&�	���%�{�C��9I�9I�9Q�9Q�	
��\��"�"����(��)��-�G�G�I��\�\�s�,:B0�0B9)F)rNrOrP�__doc__rQr�boolrrr�intrMrr�r�r"r�rr�r�rr�rr�r�r�r�r�r�r��
__classcell__)r�s@r8rwrw�s@��� �85��85��s�m�85��	85�
�85��
85�$�85��85��85��85��85��85��85��85��85� 
�!85�tB�'9�B�d�B�6.�%�.�8<�.�	
�.�.C�*<�C��C�@=�
�=�
�"�	#�=�&'�
�'�
�"�	#�'�R���
�"�	#��@!&�*C�#+�,>�#?�*C��*C�
�	*C�Z@E�$J�%�$J�8<�$J�	�$J�NKP�
��/�0�
�CG�
�	
�
�<Z�%�Z�8<�Z�	�Z�x3�+=�3�$�3�4�
��
��BJ�
�J��J�
�	JrDrw)NN)T)Rr�rJrmr��pathlibr�typingrrrr�pip._vendor.packaging.utilsr�pip._internal.distributionsr	�%pip._internal.distributions.installedr
�pip._internal.exceptionsrrr
rrrr�"pip._internal.index.package_finderr�pip._internal.metadatarr�pip._internal.models.direct_urlr�pip._internal.models.linkr�pip._internal.models.wheelr�pip._internal.network.downloadrr� pip._internal.network.lazy_wheelrr�pip._internal.network.sessionr�,pip._internal.operations.build.build_trackerr�pip._internal.req.req_installr�pip._internal.utils._logr�&pip._internal.utils.direct_url_helpersr r!�pip._internal.utils.hashesr"r#�pip._internal.utils.loggingr$�pip._internal.utils.miscr%r&r'r(�pip._internal.utils.temp_dirr)�pip._internal.utils.unpackingr*�pip._internal.vcsr+rNrqr�r9rQr�rCrFr_rbrjrZrwrRrDr8�<module>rs����	�
��1�1�9�Q�G����=�N�7�*�,�F��5�E�<�.��=�2���7�5�!�	�8�	��5�	�5��5�
�5��	5�
�5��
5�$N�$�N�#�N�#�N�$�N�-�-�#'�#�	)�
�)��)��3�-�)�
�V��	)�

�)�2PT�!�
�!�&�s�m�!�<D�V�<L�!�	�!�:#'�#�
(�
�(��(��(��	(�
�3�-�(�
�V��
(��d�^�(�^#'�	�
����
�V��� �	�
�c�]��<EJ�EJrDpython3.12/site-packages/pip/_internal/operations/freeze.py000064400000023130151732701200017666 0ustar00import collections
import logging
import os
from typing import Container, Dict, Generator, Iterable, List, NamedTuple, Optional, Set

from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.packaging.version import Version

from pip._internal.exceptions import BadCommand, InstallationError
from pip._internal.metadata import BaseDistribution, get_environment
from pip._internal.req.constructors import (
    install_req_from_editable,
    install_req_from_line,
)
from pip._internal.req.req_file import COMMENT_RE
from pip._internal.utils.direct_url_helpers import direct_url_as_pep440_direct_reference

logger = logging.getLogger(__name__)


class _EditableInfo(NamedTuple):
    requirement: str
    comments: List[str]


def freeze(
    requirement: Optional[List[str]] = None,
    local_only: bool = False,
    user_only: bool = False,
    paths: Optional[List[str]] = None,
    isolated: bool = False,
    exclude_editable: bool = False,
    skip: Container[str] = (),
) -> Generator[str, None, None]:
    installations: Dict[str, FrozenRequirement] = {}

    dists = get_environment(paths).iter_installed_distributions(
        local_only=local_only,
        skip=(),
        user_only=user_only,
    )
    for dist in dists:
        req = FrozenRequirement.from_dist(dist)
        if exclude_editable and req.editable:
            continue
        installations[req.canonical_name] = req

    if requirement:
        # the options that don't get turned into an InstallRequirement
        # should only be emitted once, even if the same option is in multiple
        # requirements files, so we need to keep track of what has been emitted
        # so that we don't emit it again if it's seen again
        emitted_options: Set[str] = set()
        # keep track of which files a requirement is in so that we can
        # give an accurate warning if a requirement appears multiple times.
        req_files: Dict[str, List[str]] = collections.defaultdict(list)
        for req_file_path in requirement:
            with open(req_file_path) as req_file:
                for line in req_file:
                    if (
                        not line.strip()
                        or line.strip().startswith("#")
                        or line.startswith(
                            (
                                "-r",
                                "--requirement",
                                "-f",
                                "--find-links",
                                "-i",
                                "--index-url",
                                "--pre",
                                "--trusted-host",
                                "--process-dependency-links",
                                "--extra-index-url",
                                "--use-feature",
                            )
                        )
                    ):
                        line = line.rstrip()
                        if line not in emitted_options:
                            emitted_options.add(line)
                            yield line
                        continue

                    if line.startswith("-e") or line.startswith("--editable"):
                        if line.startswith("-e"):
                            line = line[2:].strip()
                        else:
                            line = line[len("--editable") :].strip().lstrip("=")
                        line_req = install_req_from_editable(
                            line,
                            isolated=isolated,
                        )
                    else:
                        line_req = install_req_from_line(
                            COMMENT_RE.sub("", line).strip(),
                            isolated=isolated,
                        )

                    if not line_req.name:
                        logger.info(
                            "Skipping line in requirement file [%s] because "
                            "it's not clear what it would install: %s",
                            req_file_path,
                            line.strip(),
                        )
                        logger.info(
                            "  (add #egg=PackageName to the URL to avoid"
                            " this warning)"
                        )
                    else:
                        line_req_canonical_name = canonicalize_name(line_req.name)
                        if line_req_canonical_name not in installations:
                            # either it's not installed, or it is installed
                            # but has been processed already
                            if not req_files[line_req.name]:
                                logger.warning(
                                    "Requirement file [%s] contains %s, but "
                                    "package %r is not installed",
                                    req_file_path,
                                    COMMENT_RE.sub("", line).strip(),
                                    line_req.name,
                                )
                            else:
                                req_files[line_req.name].append(req_file_path)
                        else:
                            yield str(installations[line_req_canonical_name]).rstrip()
                            del installations[line_req_canonical_name]
                            req_files[line_req.name].append(req_file_path)

        # Warn about requirements that were included multiple times (in a
        # single requirements file or in different requirements files).
        for name, files in req_files.items():
            if len(files) > 1:
                logger.warning(
                    "Requirement %s included multiple times [%s]",
                    name,
                    ", ".join(sorted(set(files))),
                )

        yield ("## The following requirements were added by pip freeze:")
    for installation in sorted(installations.values(), key=lambda x: x.name.lower()):
        if installation.canonical_name not in skip:
            yield str(installation).rstrip()


def _format_as_name_version(dist: BaseDistribution) -> str:
    dist_version = dist.version
    if isinstance(dist_version, Version):
        return f"{dist.raw_name}=={dist_version}"
    return f"{dist.raw_name}==={dist_version}"


def _get_editable_info(dist: BaseDistribution) -> _EditableInfo:
    """
    Compute and return values (req, comments) for use in
    FrozenRequirement.from_dist().
    """
    editable_project_location = dist.editable_project_location
    assert editable_project_location
    location = os.path.normcase(os.path.abspath(editable_project_location))

    from pip._internal.vcs import RemoteNotFoundError, RemoteNotValidError, vcs

    vcs_backend = vcs.get_backend_for_dir(location)

    if vcs_backend is None:
        display = _format_as_name_version(dist)
        logger.debug(
            'No VCS found for editable requirement "%s" in: %r',
            display,
            location,
        )
        return _EditableInfo(
            requirement=location,
            comments=[f"# Editable install with no version control ({display})"],
        )

    vcs_name = type(vcs_backend).__name__

    try:
        req = vcs_backend.get_src_requirement(location, dist.raw_name)
    except RemoteNotFoundError:
        display = _format_as_name_version(dist)
        return _EditableInfo(
            requirement=location,
            comments=[f"# Editable {vcs_name} install with no remote ({display})"],
        )
    except RemoteNotValidError as ex:
        display = _format_as_name_version(dist)
        return _EditableInfo(
            requirement=location,
            comments=[
                f"# Editable {vcs_name} install ({display}) with either a deleted "
                f"local remote or invalid URI:",
                f"# '{ex.url}'",
            ],
        )
    except BadCommand:
        logger.warning(
            "cannot determine version of editable source in %s "
            "(%s command not found in path)",
            location,
            vcs_backend.name,
        )
        return _EditableInfo(requirement=location, comments=[])
    except InstallationError as exc:
        logger.warning("Error when trying to get requirement for VCS system %s", exc)
    else:
        return _EditableInfo(requirement=req, comments=[])

    logger.warning("Could not determine repository location of %s", location)

    return _EditableInfo(
        requirement=location,
        comments=["## !! Could not determine repository location"],
    )


class FrozenRequirement:
    def __init__(
        self,
        name: str,
        req: str,
        editable: bool,
        comments: Iterable[str] = (),
    ) -> None:
        self.name = name
        self.canonical_name = canonicalize_name(name)
        self.req = req
        self.editable = editable
        self.comments = comments

    @classmethod
    def from_dist(cls, dist: BaseDistribution) -> "FrozenRequirement":
        editable = dist.editable
        if editable:
            req, comments = _get_editable_info(dist)
        else:
            comments = []
            direct_url = dist.direct_url
            if direct_url:
                # if PEP 610 metadata is present, use it
                req = direct_url_as_pep440_direct_reference(direct_url, dist.raw_name)
            else:
                # name==version requirement
                req = _format_as_name_version(dist)

        return cls(dist.raw_name, req, editable, comments=comments)

    def __str__(self) -> str:
        req = self.req
        if self.editable:
            req = f"-e {req}"
        return "\n".join(list(self.comments) + [str(req)]) + "\n"
python3.12/site-packages/pip/_internal/operations/__init__.py000064400000000000151732701200020134 0ustar00python3.12/site-packages/pip/_internal/operations/check.py000064400000015226151732701200017472 0ustar00"""Validation of dependencies of packages
"""

import logging
from typing import Callable, Dict, List, NamedTuple, Optional, Set, Tuple

from pip._vendor.packaging.requirements import Requirement
from pip._vendor.packaging.specifiers import LegacySpecifier
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from pip._vendor.packaging.version import LegacyVersion

from pip._internal.distributions import make_distribution_for_install_requirement
from pip._internal.metadata import get_default_environment
from pip._internal.metadata.base import DistributionVersion
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils.deprecation import deprecated

logger = logging.getLogger(__name__)


class PackageDetails(NamedTuple):
    version: DistributionVersion
    dependencies: List[Requirement]


# Shorthands
PackageSet = Dict[NormalizedName, PackageDetails]
Missing = Tuple[NormalizedName, Requirement]
Conflicting = Tuple[NormalizedName, DistributionVersion, Requirement]

MissingDict = Dict[NormalizedName, List[Missing]]
ConflictingDict = Dict[NormalizedName, List[Conflicting]]
CheckResult = Tuple[MissingDict, ConflictingDict]
ConflictDetails = Tuple[PackageSet, CheckResult]


def create_package_set_from_installed() -> Tuple[PackageSet, bool]:
    """Converts a list of distributions into a PackageSet."""
    package_set = {}
    problems = False
    env = get_default_environment()
    for dist in env.iter_installed_distributions(local_only=False, skip=()):
        name = dist.canonical_name
        try:
            dependencies = list(dist.iter_dependencies())
            package_set[name] = PackageDetails(dist.version, dependencies)
        except (OSError, ValueError) as e:
            # Don't crash on unreadable or broken metadata.
            logger.warning("Error parsing requirements for %s: %s", name, e)
            problems = True
    return package_set, problems


def check_package_set(
    package_set: PackageSet, should_ignore: Optional[Callable[[str], bool]] = None
) -> CheckResult:
    """Check if a package set is consistent

    If should_ignore is passed, it should be a callable that takes a
    package name and returns a boolean.
    """

    warn_legacy_versions_and_specifiers(package_set)

    missing = {}
    conflicting = {}

    for package_name, package_detail in package_set.items():
        # Info about dependencies of package_name
        missing_deps: Set[Missing] = set()
        conflicting_deps: Set[Conflicting] = set()

        if should_ignore and should_ignore(package_name):
            continue

        for req in package_detail.dependencies:
            name = canonicalize_name(req.name)

            # Check if it's missing
            if name not in package_set:
                missed = True
                if req.marker is not None:
                    missed = req.marker.evaluate({"extra": ""})
                if missed:
                    missing_deps.add((name, req))
                continue

            # Check if there's a conflict
            version = package_set[name].version
            if not req.specifier.contains(version, prereleases=True):
                conflicting_deps.add((name, version, req))

        if missing_deps:
            missing[package_name] = sorted(missing_deps, key=str)
        if conflicting_deps:
            conflicting[package_name] = sorted(conflicting_deps, key=str)

    return missing, conflicting


def check_install_conflicts(to_install: List[InstallRequirement]) -> ConflictDetails:
    """For checking if the dependency graph would be consistent after \
    installing given requirements
    """
    # Start from the current state
    package_set, _ = create_package_set_from_installed()
    # Install packages
    would_be_installed = _simulate_installation_of(to_install, package_set)

    # Only warn about directly-dependent packages; create a whitelist of them
    whitelist = _create_whitelist(would_be_installed, package_set)

    return (
        package_set,
        check_package_set(
            package_set, should_ignore=lambda name: name not in whitelist
        ),
    )


def _simulate_installation_of(
    to_install: List[InstallRequirement], package_set: PackageSet
) -> Set[NormalizedName]:
    """Computes the version of packages after installing to_install."""
    # Keep track of packages that were installed
    installed = set()

    # Modify it as installing requirement_set would (assuming no errors)
    for inst_req in to_install:
        abstract_dist = make_distribution_for_install_requirement(inst_req)
        dist = abstract_dist.get_metadata_distribution()
        name = dist.canonical_name
        package_set[name] = PackageDetails(dist.version, list(dist.iter_dependencies()))

        installed.add(name)

    return installed


def _create_whitelist(
    would_be_installed: Set[NormalizedName], package_set: PackageSet
) -> Set[NormalizedName]:
    packages_affected = set(would_be_installed)

    for package_name in package_set:
        if package_name in packages_affected:
            continue

        for req in package_set[package_name].dependencies:
            if canonicalize_name(req.name) in packages_affected:
                packages_affected.add(package_name)
                break

    return packages_affected


def warn_legacy_versions_and_specifiers(package_set: PackageSet) -> None:
    for project_name, package_details in package_set.items():
        if isinstance(package_details.version, LegacyVersion):
            deprecated(
                reason=(
                    f"{project_name} {package_details.version} "
                    f"has a non-standard version number."
                ),
                replacement=(
                    f"to upgrade to a newer version of {project_name} "
                    f"or contact the author to suggest that they "
                    f"release a version with a conforming version number"
                ),
                issue=12063,
                gone_in="24.0",
            )
        for dep in package_details.dependencies:
            if any(isinstance(spec, LegacySpecifier) for spec in dep.specifier):
                deprecated(
                    reason=(
                        f"{project_name} {package_details.version} "
                        f"has a non-standard dependency specifier {dep}."
                    ),
                    replacement=(
                        f"to upgrade to a newer version of {project_name} "
                        f"or contact the author to suggest that they "
                        f"release a version with a conforming dependency specifiers"
                    ),
                    issue=12063,
                    gone_in="24.0",
                )
python3.12/site-packages/pip/_internal/operations/prepare.py000064400000066773151732701200020070 0ustar00"""Prepares a distribution for installation
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import mimetypes
import os
import shutil
from pathlib import Path
from typing import Dict, Iterable, List, Optional

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.distributions import make_distribution_for_install_requirement
from pip._internal.distributions.installed import InstalledDistribution
from pip._internal.exceptions import (
    DirectoryUrlHashUnsupported,
    HashMismatch,
    HashUnpinned,
    InstallationError,
    MetadataInconsistent,
    NetworkConnectionError,
    VcsHashUnsupported,
)
from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata import BaseDistribution, get_metadata_distribution
from pip._internal.models.direct_url import ArchiveInfo
from pip._internal.models.link import Link
from pip._internal.models.wheel import Wheel
from pip._internal.network.download import BatchDownloader, Downloader
from pip._internal.network.lazy_wheel import (
    HTTPRangeRequestUnsupported,
    dist_from_wheel_url,
)
from pip._internal.network.session import PipSession
from pip._internal.operations.build.build_tracker import BuildTracker
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils._log import getLogger
from pip._internal.utils.direct_url_helpers import (
    direct_url_for_editable,
    direct_url_from_link,
)
from pip._internal.utils.hashes import Hashes, MissingHashes
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import (
    display_path,
    hash_file,
    hide_url,
    redact_auth_from_requirement,
)
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.utils.unpacking import unpack_file
from pip._internal.vcs import vcs

logger = getLogger(__name__)


def _get_prepared_distribution(
    req: InstallRequirement,
    build_tracker: BuildTracker,
    finder: PackageFinder,
    build_isolation: bool,
    check_build_deps: bool,
) -> BaseDistribution:
    """Prepare a distribution for installation."""
    abstract_dist = make_distribution_for_install_requirement(req)
    tracker_id = abstract_dist.build_tracker_id
    if tracker_id is not None:
        with build_tracker.track(req, tracker_id):
            abstract_dist.prepare_distribution_metadata(
                finder, build_isolation, check_build_deps
            )
    return abstract_dist.get_metadata_distribution()


def unpack_vcs_link(link: Link, location: str, verbosity: int) -> None:
    vcs_backend = vcs.get_backend_for_scheme(link.scheme)
    assert vcs_backend is not None
    vcs_backend.unpack(location, url=hide_url(link.url), verbosity=verbosity)


class File:
    def __init__(self, path: str, content_type: Optional[str]) -> None:
        self.path = path
        if content_type is None:
            self.content_type = mimetypes.guess_type(path)[0]
        else:
            self.content_type = content_type


def get_http_url(
    link: Link,
    download: Downloader,
    download_dir: Optional[str] = None,
    hashes: Optional[Hashes] = None,
) -> File:
    temp_dir = TempDirectory(kind="unpack", globally_managed=True)
    # If a download dir is specified, is the file already downloaded there?
    already_downloaded_path = None
    if download_dir:
        already_downloaded_path = _check_download_dir(link, download_dir, hashes)

    if already_downloaded_path:
        from_path = already_downloaded_path
        content_type = None
    else:
        # let's download to a tmp dir
        from_path, content_type = download(link, temp_dir.path)
        if hashes:
            hashes.check_against_path(from_path)

    return File(from_path, content_type)


def get_file_url(
    link: Link, download_dir: Optional[str] = None, hashes: Optional[Hashes] = None
) -> File:
    """Get file and optionally check its hash."""
    # If a download dir is specified, is the file already there and valid?
    already_downloaded_path = None
    if download_dir:
        already_downloaded_path = _check_download_dir(link, download_dir, hashes)

    if already_downloaded_path:
        from_path = already_downloaded_path
    else:
        from_path = link.file_path

    # If --require-hashes is off, `hashes` is either empty, the
    # link's embedded hash, or MissingHashes; it is required to
    # match. If --require-hashes is on, we are satisfied by any
    # hash in `hashes` matching: a URL-based or an option-based
    # one; no internet-sourced hash will be in `hashes`.
    if hashes:
        hashes.check_against_path(from_path)
    return File(from_path, None)


def unpack_url(
    link: Link,
    location: str,
    download: Downloader,
    verbosity: int,
    download_dir: Optional[str] = None,
    hashes: Optional[Hashes] = None,
) -> Optional[File]:
    """Unpack link into location, downloading if required.

    :param hashes: A Hashes object, one of whose embedded hashes must match,
        or HashMismatch will be raised. If the Hashes is empty, no matches are
        required, and unhashable types of requirements (like VCS ones, which
        would ordinarily raise HashUnsupported) are allowed.
    """
    # non-editable vcs urls
    if link.is_vcs:
        unpack_vcs_link(link, location, verbosity=verbosity)
        return None

    assert not link.is_existing_dir()

    # file urls
    if link.is_file:
        file = get_file_url(link, download_dir, hashes=hashes)

    # http urls
    else:
        file = get_http_url(
            link,
            download,
            download_dir,
            hashes=hashes,
        )

    # unpack the archive to the build dir location. even when only downloading
    # archives, they have to be unpacked to parse dependencies, except wheels
    if not link.is_wheel:
        unpack_file(file.path, location, file.content_type)

    return file


def _check_download_dir(
    link: Link,
    download_dir: str,
    hashes: Optional[Hashes],
    warn_on_hash_mismatch: bool = True,
) -> Optional[str]:
    """Check download_dir for previously downloaded file with correct hash
    If a correct file is found return its path else None
    """
    download_path = os.path.join(download_dir, link.filename)

    if not os.path.exists(download_path):
        return None

    # If already downloaded, does its hash match?
    logger.info("File was already downloaded %s", download_path)
    if hashes:
        try:
            hashes.check_against_path(download_path)
        except HashMismatch:
            if warn_on_hash_mismatch:
                logger.warning(
                    "Previously-downloaded file %s has bad hash. Re-downloading.",
                    download_path,
                )
            os.unlink(download_path)
            return None
    return download_path


class RequirementPreparer:
    """Prepares a Requirement"""

    def __init__(
        self,
        build_dir: str,
        download_dir: Optional[str],
        src_dir: str,
        build_isolation: bool,
        check_build_deps: bool,
        build_tracker: BuildTracker,
        session: PipSession,
        progress_bar: str,
        finder: PackageFinder,
        require_hashes: bool,
        use_user_site: bool,
        lazy_wheel: bool,
        verbosity: int,
        legacy_resolver: bool,
    ) -> None:
        super().__init__()

        self.src_dir = src_dir
        self.build_dir = build_dir
        self.build_tracker = build_tracker
        self._session = session
        self._download = Downloader(session, progress_bar)
        self._batch_download = BatchDownloader(session, progress_bar)
        self.finder = finder

        # Where still-packed archives should be written to. If None, they are
        # not saved, and are deleted immediately after unpacking.
        self.download_dir = download_dir

        # Is build isolation allowed?
        self.build_isolation = build_isolation

        # Should check build dependencies?
        self.check_build_deps = check_build_deps

        # Should hash-checking be required?
        self.require_hashes = require_hashes

        # Should install in user site-packages?
        self.use_user_site = use_user_site

        # Should wheels be downloaded lazily?
        self.use_lazy_wheel = lazy_wheel

        # How verbose should underlying tooling be?
        self.verbosity = verbosity

        # Are we using the legacy resolver?
        self.legacy_resolver = legacy_resolver

        # Memoized downloaded files, as mapping of url: path.
        self._downloaded: Dict[str, str] = {}

        # Previous "header" printed for a link-based InstallRequirement
        self._previous_requirement_header = ("", "")

    def _log_preparing_link(self, req: InstallRequirement) -> None:
        """Provide context for the requirement being prepared."""
        if req.link.is_file and not req.is_wheel_from_cache:
            message = "Processing %s"
            information = str(display_path(req.link.file_path))
        else:
            message = "Collecting %s"
            information = redact_auth_from_requirement(req.req) if req.req else str(req)

        # If we used req.req, inject requirement source if available (this
        # would already be included if we used req directly)
        if req.req and req.comes_from:
            if isinstance(req.comes_from, str):
                comes_from: Optional[str] = req.comes_from
            else:
                comes_from = req.comes_from.from_path()
            if comes_from:
                information += f" (from {comes_from})"

        if (message, information) != self._previous_requirement_header:
            self._previous_requirement_header = (message, information)
            logger.info(message, information)

        if req.is_wheel_from_cache:
            with indent_log():
                logger.info("Using cached %s", req.link.filename)

    def _ensure_link_req_src_dir(
        self, req: InstallRequirement, parallel_builds: bool
    ) -> None:
        """Ensure source_dir of a linked InstallRequirement."""
        # Since source_dir is only set for editable requirements.
        if req.link.is_wheel:
            # We don't need to unpack wheels, so no need for a source
            # directory.
            return
        assert req.source_dir is None
        if req.link.is_existing_dir():
            # build local directories in-tree
            req.source_dir = req.link.file_path
            return

        # We always delete unpacked sdists after pip runs.
        req.ensure_has_source_dir(
            self.build_dir,
            autodelete=True,
            parallel_builds=parallel_builds,
        )
        req.ensure_pristine_source_checkout()

    def _get_linked_req_hashes(self, req: InstallRequirement) -> Hashes:
        # By the time this is called, the requirement's link should have
        # been checked so we can tell what kind of requirements req is
        # and raise some more informative errors than otherwise.
        # (For example, we can raise VcsHashUnsupported for a VCS URL
        # rather than HashMissing.)
        if not self.require_hashes:
            return req.hashes(trust_internet=True)

        # We could check these first 2 conditions inside unpack_url
        # and save repetition of conditions, but then we would
        # report less-useful error messages for unhashable
        # requirements, complaining that there's no hash provided.
        if req.link.is_vcs:
            raise VcsHashUnsupported()
        if req.link.is_existing_dir():
            raise DirectoryUrlHashUnsupported()

        # Unpinned packages are asking for trouble when a new version
        # is uploaded.  This isn't a security check, but it saves users
        # a surprising hash mismatch in the future.
        # file:/// URLs aren't pinnable, so don't complain about them
        # not being pinned.
        if not req.is_direct and not req.is_pinned:
            raise HashUnpinned()

        # If known-good hashes are missing for this requirement,
        # shim it with a facade object that will provoke hash
        # computation and then raise a HashMissing exception
        # showing the user what the hash should be.
        return req.hashes(trust_internet=False) or MissingHashes()

    def _fetch_metadata_only(
        self,
        req: InstallRequirement,
    ) -> Optional[BaseDistribution]:
        if self.legacy_resolver:
            logger.debug(
                "Metadata-only fetching is not used in the legacy resolver",
            )
            return None
        if self.require_hashes:
            logger.debug(
                "Metadata-only fetching is not used as hash checking is required",
            )
            return None
        # Try PEP 658 metadata first, then fall back to lazy wheel if unavailable.
        return self._fetch_metadata_using_link_data_attr(
            req
        ) or self._fetch_metadata_using_lazy_wheel(req.link)

    def _fetch_metadata_using_link_data_attr(
        self,
        req: InstallRequirement,
    ) -> Optional[BaseDistribution]:
        """Fetch metadata from the data-dist-info-metadata attribute, if possible."""
        # (1) Get the link to the metadata file, if provided by the backend.
        metadata_link = req.link.metadata_link()
        if metadata_link is None:
            return None
        assert req.req is not None
        logger.verbose(
            "Obtaining dependency information for %s from %s",
            req.req,
            metadata_link,
        )
        # (2) Download the contents of the METADATA file, separate from the dist itself.
        metadata_file = get_http_url(
            metadata_link,
            self._download,
            hashes=metadata_link.as_hashes(),
        )
        with open(metadata_file.path, "rb") as f:
            metadata_contents = f.read()
        # (3) Generate a dist just from those file contents.
        metadata_dist = get_metadata_distribution(
            metadata_contents,
            req.link.filename,
            req.req.name,
        )
        # (4) Ensure the Name: field from the METADATA file matches the name from the
        #     install requirement.
        #
        #     NB: raw_name will fall back to the name from the install requirement if
        #     the Name: field is not present, but it's noted in the raw_name docstring
        #     that that should NEVER happen anyway.
        if canonicalize_name(metadata_dist.raw_name) != canonicalize_name(req.req.name):
            raise MetadataInconsistent(
                req, "Name", req.req.name, metadata_dist.raw_name
            )
        return metadata_dist

    def _fetch_metadata_using_lazy_wheel(
        self,
        link: Link,
    ) -> Optional[BaseDistribution]:
        """Fetch metadata using lazy wheel, if possible."""
        # --use-feature=fast-deps must be provided.
        if not self.use_lazy_wheel:
            return None
        if link.is_file or not link.is_wheel:
            logger.debug(
                "Lazy wheel is not used as %r does not point to a remote wheel",
                link,
            )
            return None

        wheel = Wheel(link.filename)
        name = canonicalize_name(wheel.name)
        logger.info(
            "Obtaining dependency information from %s %s",
            name,
            wheel.version,
        )
        url = link.url.split("#", 1)[0]
        try:
            return dist_from_wheel_url(name, url, self._session)
        except HTTPRangeRequestUnsupported:
            logger.debug("%s does not support range requests", url)
            return None

    def _complete_partial_requirements(
        self,
        partially_downloaded_reqs: Iterable[InstallRequirement],
        parallel_builds: bool = False,
    ) -> None:
        """Download any requirements which were only fetched by metadata."""
        # Download to a temporary directory. These will be copied over as
        # needed for downstream 'download', 'wheel', and 'install' commands.
        temp_dir = TempDirectory(kind="unpack", globally_managed=True).path

        # Map each link to the requirement that owns it. This allows us to set
        # `req.local_file_path` on the appropriate requirement after passing
        # all the links at once into BatchDownloader.
        links_to_fully_download: Dict[Link, InstallRequirement] = {}
        for req in partially_downloaded_reqs:
            assert req.link
            links_to_fully_download[req.link] = req

        batch_download = self._batch_download(
            links_to_fully_download.keys(),
            temp_dir,
        )
        for link, (filepath, _) in batch_download:
            logger.debug("Downloading link %s to %s", link, filepath)
            req = links_to_fully_download[link]
            # Record the downloaded file path so wheel reqs can extract a Distribution
            # in .get_dist().
            req.local_file_path = filepath
            # Record that the file is downloaded so we don't do it again in
            # _prepare_linked_requirement().
            self._downloaded[req.link.url] = filepath

            # If this is an sdist, we need to unpack it after downloading, but the
            # .source_dir won't be set up until we are in _prepare_linked_requirement().
            # Add the downloaded archive to the install requirement to unpack after
            # preparing the source dir.
            if not req.is_wheel:
                req.needs_unpacked_archive(Path(filepath))

        # This step is necessary to ensure all lazy wheels are processed
        # successfully by the 'download', 'wheel', and 'install' commands.
        for req in partially_downloaded_reqs:
            self._prepare_linked_requirement(req, parallel_builds)

    def prepare_linked_requirement(
        self, req: InstallRequirement, parallel_builds: bool = False
    ) -> BaseDistribution:
        """Prepare a requirement to be obtained from req.link."""
        assert req.link
        self._log_preparing_link(req)
        with indent_log():
            # Check if the relevant file is already available
            # in the download directory
            file_path = None
            if self.download_dir is not None and req.link.is_wheel:
                hashes = self._get_linked_req_hashes(req)
                file_path = _check_download_dir(
                    req.link,
                    self.download_dir,
                    hashes,
                    # When a locally built wheel has been found in cache, we don't warn
                    # about re-downloading when the already downloaded wheel hash does
                    # not match. This is because the hash must be checked against the
                    # original link, not the cached link. It that case the already
                    # downloaded file will be removed and re-fetched from cache (which
                    # implies a hash check against the cache entry's origin.json).
                    warn_on_hash_mismatch=not req.is_wheel_from_cache,
                )

            if file_path is not None:
                # The file is already available, so mark it as downloaded
                self._downloaded[req.link.url] = file_path
            else:
                # The file is not available, attempt to fetch only metadata
                metadata_dist = self._fetch_metadata_only(req)
                if metadata_dist is not None:
                    req.needs_more_preparation = True
                    return metadata_dist

            # None of the optimizations worked, fully prepare the requirement
            return self._prepare_linked_requirement(req, parallel_builds)

    def prepare_linked_requirements_more(
        self, reqs: Iterable[InstallRequirement], parallel_builds: bool = False
    ) -> None:
        """Prepare linked requirements more, if needed."""
        reqs = [req for req in reqs if req.needs_more_preparation]
        for req in reqs:
            # Determine if any of these requirements were already downloaded.
            if self.download_dir is not None and req.link.is_wheel:
                hashes = self._get_linked_req_hashes(req)
                file_path = _check_download_dir(req.link, self.download_dir, hashes)
                if file_path is not None:
                    self._downloaded[req.link.url] = file_path
                    req.needs_more_preparation = False

        # Prepare requirements we found were already downloaded for some
        # reason. The other downloads will be completed separately.
        partially_downloaded_reqs: List[InstallRequirement] = []
        for req in reqs:
            if req.needs_more_preparation:
                partially_downloaded_reqs.append(req)
            else:
                self._prepare_linked_requirement(req, parallel_builds)

        # TODO: separate this part out from RequirementPreparer when the v1
        # resolver can be removed!
        self._complete_partial_requirements(
            partially_downloaded_reqs,
            parallel_builds=parallel_builds,
        )

    def _prepare_linked_requirement(
        self, req: InstallRequirement, parallel_builds: bool
    ) -> BaseDistribution:
        assert req.link
        link = req.link

        hashes = self._get_linked_req_hashes(req)

        if hashes and req.is_wheel_from_cache:
            assert req.download_info is not None
            assert link.is_wheel
            assert link.is_file
            # We need to verify hashes, and we have found the requirement in the cache
            # of locally built wheels.
            if (
                isinstance(req.download_info.info, ArchiveInfo)
                and req.download_info.info.hashes
                and hashes.has_one_of(req.download_info.info.hashes)
            ):
                # At this point we know the requirement was built from a hashable source
                # artifact, and we verified that the cache entry's hash of the original
                # artifact matches one of the hashes we expect. We don't verify hashes
                # against the cached wheel, because the wheel is not the original.
                hashes = None
            else:
                logger.warning(
                    "The hashes of the source archive found in cache entry "
                    "don't match, ignoring cached built wheel "
                    "and re-downloading source."
                )
                req.link = req.cached_wheel_source_link
                link = req.link

        self._ensure_link_req_src_dir(req, parallel_builds)

        if link.is_existing_dir():
            local_file = None
        elif link.url not in self._downloaded:
            try:
                local_file = unpack_url(
                    link,
                    req.source_dir,
                    self._download,
                    self.verbosity,
                    self.download_dir,
                    hashes,
                )
            except NetworkConnectionError as exc:
                raise InstallationError(
                    "Could not install requirement {} because of HTTP "
                    "error {} for URL {}".format(req, exc, link)
                )
        else:
            file_path = self._downloaded[link.url]
            if hashes:
                hashes.check_against_path(file_path)
            local_file = File(file_path, content_type=None)

        # If download_info is set, we got it from the wheel cache.
        if req.download_info is None:
            # Editables don't go through this function (see
            # prepare_editable_requirement).
            assert not req.editable
            req.download_info = direct_url_from_link(link, req.source_dir)
            # Make sure we have a hash in download_info. If we got it as part of the
            # URL, it will have been verified and we can rely on it. Otherwise we
            # compute it from the downloaded file.
            # FIXME: https://github.com/pypa/pip/issues/11943
            if (
                isinstance(req.download_info.info, ArchiveInfo)
                and not req.download_info.info.hashes
                and local_file
            ):
                hash = hash_file(local_file.path)[0].hexdigest()
                # We populate info.hash for backward compatibility.
                # This will automatically populate info.hashes.
                req.download_info.info.hash = f"sha256={hash}"

        # For use in later processing,
        # preserve the file path on the requirement.
        if local_file:
            req.local_file_path = local_file.path

        dist = _get_prepared_distribution(
            req,
            self.build_tracker,
            self.finder,
            self.build_isolation,
            self.check_build_deps,
        )
        return dist

    def save_linked_requirement(self, req: InstallRequirement) -> None:
        assert self.download_dir is not None
        assert req.link is not None
        link = req.link
        if link.is_vcs or (link.is_existing_dir() and req.editable):
            # Make a .zip of the source_dir we already created.
            req.archive(self.download_dir)
            return

        if link.is_existing_dir():
            logger.debug(
                "Not copying link to destination directory "
                "since it is a directory: %s",
                link,
            )
            return
        if req.local_file_path is None:
            # No distribution was downloaded for this requirement.
            return

        download_location = os.path.join(self.download_dir, link.filename)
        if not os.path.exists(download_location):
            shutil.copy(req.local_file_path, download_location)
            download_path = display_path(download_location)
            logger.info("Saved %s", download_path)

    def prepare_editable_requirement(
        self,
        req: InstallRequirement,
    ) -> BaseDistribution:
        """Prepare an editable requirement."""
        assert req.editable, "cannot prepare a non-editable req as editable"

        logger.info("Obtaining %s", req)

        with indent_log():
            if self.require_hashes:
                raise InstallationError(
                    "The editable requirement {} cannot be installed when "
                    "requiring hashes, because there is no single file to "
                    "hash.".format(req)
                )
            req.ensure_has_source_dir(self.src_dir)
            req.update_editable()
            assert req.source_dir
            req.download_info = direct_url_for_editable(req.unpacked_source_directory)

            dist = _get_prepared_distribution(
                req,
                self.build_tracker,
                self.finder,
                self.build_isolation,
                self.check_build_deps,
            )

            req.check_if_exists(self.use_user_site)

        return dist

    def prepare_installed_requirement(
        self,
        req: InstallRequirement,
        skip_reason: str,
    ) -> BaseDistribution:
        """Prepare an already-installed requirement."""
        assert req.satisfied_by, "req should have been satisfied but isn't"
        assert skip_reason is not None, (
            "did not get skip reason skipped but req.satisfied_by "
            "is set to {}".format(req.satisfied_by)
        )
        logger.info(
            "Requirement %s: %s (%s)", skip_reason, req, req.satisfied_by.version
        )
        with indent_log():
            if self.require_hashes:
                logger.debug(
                    "Since it is already installed, we are trusting this "
                    "package without checking its hash. To ensure a "
                    "completely repeatable environment, install into an "
                    "empty virtualenv."
                )
            return InstalledDistribution(req).get_metadata_distribution()
python3.12/site-packages/pip/_internal/cache.py000064400000024202151732701200015267 0ustar00"""Cache Management
"""

import hashlib
import json
import logging
import os
from pathlib import Path
from typing import Any, Dict, List, Optional

from pip._vendor.packaging.tags import Tag, interpreter_name, interpreter_version
from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.exceptions import InvalidWheelFilename
from pip._internal.models.direct_url import DirectUrl
from pip._internal.models.link import Link
from pip._internal.models.wheel import Wheel
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
from pip._internal.utils.urls import path_to_url

logger = logging.getLogger(__name__)

ORIGIN_JSON_NAME = "origin.json"


def _hash_dict(d: Dict[str, str]) -> str:
    """Return a stable sha224 of a dictionary."""
    s = json.dumps(d, sort_keys=True, separators=(",", ":"), ensure_ascii=True)
    return hashlib.sha224(s.encode("ascii")).hexdigest()


class Cache:
    """An abstract class - provides cache directories for data from links

    :param cache_dir: The root of the cache.
    """

    def __init__(self, cache_dir: str) -> None:
        super().__init__()
        assert not cache_dir or os.path.isabs(cache_dir)
        self.cache_dir = cache_dir or None

    def _get_cache_path_parts(self, link: Link) -> List[str]:
        """Get parts of part that must be os.path.joined with cache_dir"""

        # We want to generate an url to use as our cache key, we don't want to
        # just re-use the URL because it might have other items in the fragment
        # and we don't care about those.
        key_parts = {"url": link.url_without_fragment}
        if link.hash_name is not None and link.hash is not None:
            key_parts[link.hash_name] = link.hash
        if link.subdirectory_fragment:
            key_parts["subdirectory"] = link.subdirectory_fragment

        # Include interpreter name, major and minor version in cache key
        # to cope with ill-behaved sdists that build a different wheel
        # depending on the python version their setup.py is being run on,
        # and don't encode the difference in compatibility tags.
        # https://github.com/pypa/pip/issues/7296
        key_parts["interpreter_name"] = interpreter_name()
        key_parts["interpreter_version"] = interpreter_version()

        # Encode our key url with sha224, we'll use this because it has similar
        # security properties to sha256, but with a shorter total output (and
        # thus less secure). However the differences don't make a lot of
        # difference for our use case here.
        hashed = _hash_dict(key_parts)

        # We want to nest the directories some to prevent having a ton of top
        # level directories where we might run out of sub directories on some
        # FS.
        parts = [hashed[:2], hashed[2:4], hashed[4:6], hashed[6:]]

        return parts

    def _get_candidates(self, link: Link, canonical_package_name: str) -> List[Any]:
        can_not_cache = not self.cache_dir or not canonical_package_name or not link
        if can_not_cache:
            return []

        path = self.get_path_for_link(link)
        if os.path.isdir(path):
            return [(candidate, path) for candidate in os.listdir(path)]
        return []

    def get_path_for_link(self, link: Link) -> str:
        """Return a directory to store cached items in for link."""
        raise NotImplementedError()

    def get(
        self,
        link: Link,
        package_name: Optional[str],
        supported_tags: List[Tag],
    ) -> Link:
        """Returns a link to a cached item if it exists, otherwise returns the
        passed link.
        """
        raise NotImplementedError()


class SimpleWheelCache(Cache):
    """A cache of wheels for future installs."""

    def __init__(self, cache_dir: str) -> None:
        super().__init__(cache_dir)

    def get_path_for_link(self, link: Link) -> str:
        """Return a directory to store cached wheels for link

        Because there are M wheels for any one sdist, we provide a directory
        to cache them in, and then consult that directory when looking up
        cache hits.

        We only insert things into the cache if they have plausible version
        numbers, so that we don't contaminate the cache with things that were
        not unique. E.g. ./package might have dozens of installs done for it
        and build a version of 0.0...and if we built and cached a wheel, we'd
        end up using the same wheel even if the source has been edited.

        :param link: The link of the sdist for which this will cache wheels.
        """
        parts = self._get_cache_path_parts(link)
        assert self.cache_dir
        # Store wheels within the root cache_dir
        return os.path.join(self.cache_dir, "wheels", *parts)

    def get(
        self,
        link: Link,
        package_name: Optional[str],
        supported_tags: List[Tag],
    ) -> Link:
        candidates = []

        if not package_name:
            return link

        canonical_package_name = canonicalize_name(package_name)
        for wheel_name, wheel_dir in self._get_candidates(link, canonical_package_name):
            try:
                wheel = Wheel(wheel_name)
            except InvalidWheelFilename:
                continue
            if canonicalize_name(wheel.name) != canonical_package_name:
                logger.debug(
                    "Ignoring cached wheel %s for %s as it "
                    "does not match the expected distribution name %s.",
                    wheel_name,
                    link,
                    package_name,
                )
                continue
            if not wheel.supported(supported_tags):
                # Built for a different python/arch/etc
                continue
            candidates.append(
                (
                    wheel.support_index_min(supported_tags),
                    wheel_name,
                    wheel_dir,
                )
            )

        if not candidates:
            return link

        _, wheel_name, wheel_dir = min(candidates)
        return Link(path_to_url(os.path.join(wheel_dir, wheel_name)))


class EphemWheelCache(SimpleWheelCache):
    """A SimpleWheelCache that creates it's own temporary cache directory"""

    def __init__(self) -> None:
        self._temp_dir = TempDirectory(
            kind=tempdir_kinds.EPHEM_WHEEL_CACHE,
            globally_managed=True,
        )

        super().__init__(self._temp_dir.path)


class CacheEntry:
    def __init__(
        self,
        link: Link,
        persistent: bool,
    ):
        self.link = link
        self.persistent = persistent
        self.origin: Optional[DirectUrl] = None
        origin_direct_url_path = Path(self.link.file_path).parent / ORIGIN_JSON_NAME
        if origin_direct_url_path.exists():
            try:
                self.origin = DirectUrl.from_json(
                    origin_direct_url_path.read_text(encoding="utf-8")
                )
            except Exception as e:
                logger.warning(
                    "Ignoring invalid cache entry origin file %s for %s (%s)",
                    origin_direct_url_path,
                    link.filename,
                    e,
                )


class WheelCache(Cache):
    """Wraps EphemWheelCache and SimpleWheelCache into a single Cache

    This Cache allows for gracefully degradation, using the ephem wheel cache
    when a certain link is not found in the simple wheel cache first.
    """

    def __init__(self, cache_dir: str) -> None:
        super().__init__(cache_dir)
        self._wheel_cache = SimpleWheelCache(cache_dir)
        self._ephem_cache = EphemWheelCache()

    def get_path_for_link(self, link: Link) -> str:
        return self._wheel_cache.get_path_for_link(link)

    def get_ephem_path_for_link(self, link: Link) -> str:
        return self._ephem_cache.get_path_for_link(link)

    def get(
        self,
        link: Link,
        package_name: Optional[str],
        supported_tags: List[Tag],
    ) -> Link:
        cache_entry = self.get_cache_entry(link, package_name, supported_tags)
        if cache_entry is None:
            return link
        return cache_entry.link

    def get_cache_entry(
        self,
        link: Link,
        package_name: Optional[str],
        supported_tags: List[Tag],
    ) -> Optional[CacheEntry]:
        """Returns a CacheEntry with a link to a cached item if it exists or
        None. The cache entry indicates if the item was found in the persistent
        or ephemeral cache.
        """
        retval = self._wheel_cache.get(
            link=link,
            package_name=package_name,
            supported_tags=supported_tags,
        )
        if retval is not link:
            return CacheEntry(retval, persistent=True)

        retval = self._ephem_cache.get(
            link=link,
            package_name=package_name,
            supported_tags=supported_tags,
        )
        if retval is not link:
            return CacheEntry(retval, persistent=False)

        return None

    @staticmethod
    def record_download_origin(cache_dir: str, download_info: DirectUrl) -> None:
        origin_path = Path(cache_dir) / ORIGIN_JSON_NAME
        if origin_path.exists():
            try:
                origin = DirectUrl.from_json(origin_path.read_text(encoding="utf-8"))
            except Exception as e:
                logger.warning(
                    "Could not read origin file %s in cache entry (%s). "
                    "Will attempt to overwrite it.",
                    origin_path,
                    e,
                )
            else:
                # TODO: use DirectUrl.equivalent when
                # https://github.com/pypa/pip/pull/10564 is merged.
                if origin.url != download_info.url:
                    logger.warning(
                        "Origin URL %s in cache entry %s does not match download URL "
                        "%s. This is likely a pip bug or a cache corruption issue. "
                        "Will overwrite it with the new value.",
                        origin.url,
                        cache_dir,
                        download_info.url,
                    )
        origin_path.write_text(download_info.to_json(), encoding="utf-8")
python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py000064400000013111151732701200024064 0ustar00"""Utilities to lazily create and visit candidates found.

Creating and visiting a candidate is a *very* costly operation. It involves
fetching, extracting, potentially building modules from source, and verifying
distribution metadata. It is therefore crucial for performance to keep
everything here lazy all the way down, so we only touch candidates that we
absolutely need, and not "download the world" when we only need one version of
something.
"""

import functools
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any, Callable, Iterator, Optional, Set, Tuple

from pip._vendor.packaging.version import _BaseVersion

from .base import Candidate

IndexCandidateInfo = Tuple[_BaseVersion, Callable[[], Optional[Candidate]]]

if TYPE_CHECKING:
    SequenceCandidate = Sequence[Candidate]
else:
    # For compatibility: Python before 3.9 does not support using [] on the
    # Sequence class.
    #
    # >>> from collections.abc import Sequence
    # >>> Sequence[str]
    # Traceback (most recent call last):
    #   File "<stdin>", line 1, in <module>
    # TypeError: 'ABCMeta' object is not subscriptable
    #
    # TODO: Remove this block after dropping Python 3.8 support.
    SequenceCandidate = Sequence


def _iter_built(infos: Iterator[IndexCandidateInfo]) -> Iterator[Candidate]:
    """Iterator for ``FoundCandidates``.

    This iterator is used when the package is not already installed. Candidates
    from index come later in their normal ordering.
    """
    versions_found: Set[_BaseVersion] = set()
    for version, func in infos:
        if version in versions_found:
            continue
        candidate = func()
        if candidate is None:
            continue
        yield candidate
        versions_found.add(version)


def _iter_built_with_prepended(
    installed: Candidate, infos: Iterator[IndexCandidateInfo]
) -> Iterator[Candidate]:
    """Iterator for ``FoundCandidates``.

    This iterator is used when the resolver prefers the already-installed
    candidate and NOT to upgrade. The installed candidate is therefore
    always yielded first, and candidates from index come later in their
    normal ordering, except skipped when the version is already installed.
    """
    yield installed
    versions_found: Set[_BaseVersion] = {installed.version}
    for version, func in infos:
        if version in versions_found:
            continue
        candidate = func()
        if candidate is None:
            continue
        yield candidate
        versions_found.add(version)


def _iter_built_with_inserted(
    installed: Candidate, infos: Iterator[IndexCandidateInfo]
) -> Iterator[Candidate]:
    """Iterator for ``FoundCandidates``.

    This iterator is used when the resolver prefers to upgrade an
    already-installed package. Candidates from index are returned in their
    normal ordering, except replaced when the version is already installed.

    The implementation iterates through and yields other candidates, inserting
    the installed candidate exactly once before we start yielding older or
    equivalent candidates, or after all other candidates if they are all newer.
    """
    versions_found: Set[_BaseVersion] = set()
    for version, func in infos:
        if version in versions_found:
            continue
        # If the installed candidate is better, yield it first.
        if installed.version >= version:
            yield installed
            versions_found.add(installed.version)
        candidate = func()
        if candidate is None:
            continue
        yield candidate
        versions_found.add(version)

    # If the installed candidate is older than all other candidates.
    if installed.version not in versions_found:
        yield installed


class FoundCandidates(SequenceCandidate):
    """A lazy sequence to provide candidates to the resolver.

    The intended usage is to return this from `find_matches()` so the resolver
    can iterate through the sequence multiple times, but only access the index
    page when remote packages are actually needed. This improve performances
    when suitable candidates are already installed on disk.
    """

    def __init__(
        self,
        get_infos: Callable[[], Iterator[IndexCandidateInfo]],
        installed: Optional[Candidate],
        prefers_installed: bool,
        incompatible_ids: Set[int],
    ):
        self._get_infos = get_infos
        self._installed = installed
        self._prefers_installed = prefers_installed
        self._incompatible_ids = incompatible_ids

    def __getitem__(self, index: Any) -> Any:
        # Implemented to satisfy the ABC check. This is not needed by the
        # resolver, and should not be used by the provider either (for
        # performance reasons).
        raise NotImplementedError("don't do this")

    def __iter__(self) -> Iterator[Candidate]:
        infos = self._get_infos()
        if not self._installed:
            iterator = _iter_built(infos)
        elif self._prefers_installed:
            iterator = _iter_built_with_prepended(self._installed, infos)
        else:
            iterator = _iter_built_with_inserted(self._installed, infos)
        return (c for c in iterator if id(c) not in self._incompatible_ids)

    def __len__(self) -> int:
        # Implemented to satisfy the ABC check. This is not needed by the
        # resolver, and should not be used by the provider either (for
        # performance reasons).
        raise NotImplementedError("don't do this")

    @functools.lru_cache(maxsize=1)
    def __bool__(self) -> bool:
        if self._prefers_installed and self._installed:
            return True
        return any(self)
python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py000064400000006034151732701200022442 0ustar00from collections import defaultdict
from logging import getLogger
from typing import Any, DefaultDict

from pip._vendor.resolvelib.reporters import BaseReporter

from .base import Candidate, Requirement

logger = getLogger(__name__)


class PipReporter(BaseReporter):
    def __init__(self) -> None:
        self.reject_count_by_package: DefaultDict[str, int] = defaultdict(int)

        self._messages_at_reject_count = {
            1: (
                "pip is looking at multiple versions of {package_name} to "
                "determine which version is compatible with other "
                "requirements. This could take a while."
            ),
            8: (
                "pip is still looking at multiple versions of {package_name} to "
                "determine which version is compatible with other "
                "requirements. This could take a while."
            ),
            13: (
                "This is taking longer than usual. You might need to provide "
                "the dependency resolver with stricter constraints to reduce "
                "runtime. See https://pip.pypa.io/warnings/backtracking for "
                "guidance. If you want to abort this run, press Ctrl + C."
            ),
        }

    def rejecting_candidate(self, criterion: Any, candidate: Candidate) -> None:
        self.reject_count_by_package[candidate.name] += 1

        count = self.reject_count_by_package[candidate.name]
        if count not in self._messages_at_reject_count:
            return

        message = self._messages_at_reject_count[count]
        logger.info("INFO: %s", message.format(package_name=candidate.name))

        msg = "Will try a different candidate, due to conflict:"
        for req_info in criterion.information:
            req, parent = req_info.requirement, req_info.parent
            # Inspired by Factory.get_installation_error
            msg += "\n    "
            if parent:
                msg += f"{parent.name} {parent.version} depends on "
            else:
                msg += "The user requested "
            msg += req.format_for_error()
        logger.debug(msg)


class PipDebuggingReporter(BaseReporter):
    """A reporter that does an info log for every event it sees."""

    def starting(self) -> None:
        logger.info("Reporter.starting()")

    def starting_round(self, index: int) -> None:
        logger.info("Reporter.starting_round(%r)", index)

    def ending_round(self, index: int, state: Any) -> None:
        logger.info("Reporter.ending_round(%r, state)", index)

    def ending(self, state: Any) -> None:
        logger.info("Reporter.ending(%r)", state)

    def adding_requirement(self, requirement: Requirement, parent: Candidate) -> None:
        logger.info("Reporter.adding_requirement(%r, %r)", requirement, parent)

    def rejecting_candidate(self, criterion: Any, candidate: Candidate) -> None:
        logger.info("Reporter.rejecting_candidate(%r, %r)", criterion, candidate)

    def pinning(self, candidate: Candidate) -> None:
        logger.info("Reporter.pinning(%r)", candidate)
python3.12/site-packages/pip/_internal/resolution/resolvelib/requirements.py000064400000013616151732701200023327 0ustar00from pip._vendor.packaging.specifiers import SpecifierSet
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name

from pip._internal.req.constructors import install_req_drop_extras
from pip._internal.req.req_install import InstallRequirement

from .base import Candidate, CandidateLookup, Requirement, format_name


class ExplicitRequirement(Requirement):
    def __init__(self, candidate: Candidate) -> None:
        self.candidate = candidate

    def __str__(self) -> str:
        return str(self.candidate)

    def __repr__(self) -> str:
        return "{class_name}({candidate!r})".format(
            class_name=self.__class__.__name__,
            candidate=self.candidate,
        )

    @property
    def project_name(self) -> NormalizedName:
        # No need to canonicalize - the candidate did this
        return self.candidate.project_name

    @property
    def name(self) -> str:
        # No need to canonicalize - the candidate did this
        return self.candidate.name

    def format_for_error(self) -> str:
        return self.candidate.format_for_error()

    def get_candidate_lookup(self) -> CandidateLookup:
        return self.candidate, None

    def is_satisfied_by(self, candidate: Candidate) -> bool:
        return candidate == self.candidate


class SpecifierRequirement(Requirement):
    def __init__(self, ireq: InstallRequirement) -> None:
        assert ireq.link is None, "This is a link, not a specifier"
        self._ireq = ireq
        self._extras = frozenset(canonicalize_name(e) for e in self._ireq.extras)

    def __str__(self) -> str:
        return str(self._ireq.req)

    def __repr__(self) -> str:
        return "{class_name}({requirement!r})".format(
            class_name=self.__class__.__name__,
            requirement=str(self._ireq.req),
        )

    @property
    def project_name(self) -> NormalizedName:
        assert self._ireq.req, "Specifier-backed ireq is always PEP 508"
        return canonicalize_name(self._ireq.req.name)

    @property
    def name(self) -> str:
        return format_name(self.project_name, self._extras)

    def format_for_error(self) -> str:
        # Convert comma-separated specifiers into "A, B, ..., F and G"
        # This makes the specifier a bit more "human readable", without
        # risking a change in meaning. (Hopefully! Not all edge cases have
        # been checked)
        parts = [s.strip() for s in str(self).split(",")]
        if len(parts) == 0:
            return ""
        elif len(parts) == 1:
            return parts[0]

        return ", ".join(parts[:-1]) + " and " + parts[-1]

    def get_candidate_lookup(self) -> CandidateLookup:
        return None, self._ireq

    def is_satisfied_by(self, candidate: Candidate) -> bool:
        assert candidate.name == self.name, (
            f"Internal issue: Candidate is not for this requirement "
            f"{candidate.name} vs {self.name}"
        )
        # We can safely always allow prereleases here since PackageFinder
        # already implements the prerelease logic, and would have filtered out
        # prerelease candidates if the user does not expect them.
        assert self._ireq.req, "Specifier-backed ireq is always PEP 508"
        spec = self._ireq.req.specifier
        return spec.contains(candidate.version, prereleases=True)


class SpecifierWithoutExtrasRequirement(SpecifierRequirement):
    """
    Requirement backed by an install requirement on a base package.
    Trims extras from its install requirement if there are any.
    """

    def __init__(self, ireq: InstallRequirement) -> None:
        assert ireq.link is None, "This is a link, not a specifier"
        self._ireq = install_req_drop_extras(ireq)
        self._extras = frozenset(canonicalize_name(e) for e in self._ireq.extras)


class RequiresPythonRequirement(Requirement):
    """A requirement representing Requires-Python metadata."""

    def __init__(self, specifier: SpecifierSet, match: Candidate) -> None:
        self.specifier = specifier
        self._candidate = match

    def __str__(self) -> str:
        return f"Python {self.specifier}"

    def __repr__(self) -> str:
        return "{class_name}({specifier!r})".format(
            class_name=self.__class__.__name__,
            specifier=str(self.specifier),
        )

    @property
    def project_name(self) -> NormalizedName:
        return self._candidate.project_name

    @property
    def name(self) -> str:
        return self._candidate.name

    def format_for_error(self) -> str:
        return str(self)

    def get_candidate_lookup(self) -> CandidateLookup:
        if self.specifier.contains(self._candidate.version, prereleases=True):
            return self._candidate, None
        return None, None

    def is_satisfied_by(self, candidate: Candidate) -> bool:
        assert candidate.name == self._candidate.name, "Not Python candidate"
        # We can safely always allow prereleases here since PackageFinder
        # already implements the prerelease logic, and would have filtered out
        # prerelease candidates if the user does not expect them.
        return self.specifier.contains(candidate.version, prereleases=True)


class UnsatisfiableRequirement(Requirement):
    """A requirement that cannot be satisfied."""

    def __init__(self, name: NormalizedName) -> None:
        self._name = name

    def __str__(self) -> str:
        return f"{self._name} (unavailable)"

    def __repr__(self) -> str:
        return "{class_name}({name!r})".format(
            class_name=self.__class__.__name__,
            name=str(self._name),
        )

    @property
    def project_name(self) -> NormalizedName:
        return self._name

    @property
    def name(self) -> str:
        return self._name

    def format_for_error(self) -> str:
        return str(self)

    def get_candidate_lookup(self) -> CandidateLookup:
        return None, None

    def is_satisfied_by(self, candidate: Candidate) -> bool:
        return False
python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-312.pyc000064400000024271151732701200026776 0ustar00�

R`i`&�
��ddlZddlZddlmZmZmZmZmZmZm	Z	m
Z
ddlmZddl
mZmZmZddlmZddlmZerddlmZdd	lmZeeefZeeeefZneZe	d
�Ze	d�Zdeeefd
edede
eeffd�ZGd�de�Zy)�N)�
TYPE_CHECKING�Dict�Iterable�Iterator�Mapping�Sequence�TypeVar�Union)�AbstractProvider�)�	Candidate�
Constraint�Requirement)�REQUIRES_PYTHON_IDENTIFIER)�Factory)�
Preference)�RequirementInformation�D�V�mapping�
identifier�default�returnc�X�||vr||S|jd�\}}}|r	||vr||S|S)aiGet item from a package name lookup mapping with a resolver identifier.

    This extra logic is needed when the target mapping is keyed by package
    name, which cannot be directly looked up with an identifier (which may
    contain requested extras). Additional logic is added to also look up a value
    by "cleaning up" the extras from the identifier.
    �[)�	partition)rrr�name�open_bracket�_s      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/provider.py�_get_with_identifierr!5sH���W���z�"�"�'�0�0��5��D�,�������t�}���N�c�:�eZdZdZdedeeefdededeee	fddfd	�Z
d
eee
fdefd�Zded
eee
fdeeee
fdeeedfdedddfd�Zdedeeeefdeeee
fdee
fd�Zdede
defd�Zde
deefd�Zedededdefd��Zy)�PipProvidera�Pip's provider implementation for resolvelib.

    :params constraints: A mapping of constraints specified by the user. Keys
        are canonicalized project names.
    :params ignore_dependencies: Whether the user specified ``--no-deps``.
    :params upgrade_strategy: The user-specified upgrade strategy.
    :params user_requested: A set of canonicalized package names that the user
        supplied for pip to install/upgrade.
    �factory�constraints�ignore_dependencies�upgrade_strategy�user_requestedrNc��||_||_||_||_||_tjd��|_y)Nc�"�tjS�N)�math�inf�r"r �<lambda>z&PipProvider.__init__.<locals>.<lambda>fs��t�x�xr")�_factory�_constraints�_ignore_dependencies�_upgrade_strategy�_user_requested�collections�defaultdict�
_known_depths)�selfr%r&r'r(r)s      r �__init__zPipProvider.__init__Ys?�� ��
�'���$7��!�!1���-���/:�/F�/F�GW�/X��r"�requirement_or_candidatec��|jSr,)r)r9r;s  r �identifyzPipProvider.identifyhs��'�,�,�,r"r�resolutions�
candidates�information�PreferenceInformation�backtrack_causesrc����	tt||��d}|rd�||D�}t|�\}}	nd\}}	d�|	D�D�
�cgc]}
|
D]}|j���}}
}|du}
td�|D��}t
|�}	�j|}d}|�j|<�jj|tj�}|tk(}�j||�}||
||||||fS#t$rd}Y��wxYwcc}}
w#t$rItj}|r$�fd	�||D�}td
�|D��dz}ntj}Y��wxYw)a�Produce a sort key for given requirement based on preference.

        The lower the return value is, the more preferred this group of
        arguments is.

        Currently pip considers the following in order:

        * Prefer if any of the known requirements is "direct", e.g. points to an
          explicit URL.
        * If equal, prefer if any requirement is "pinned", i.e. contains
          operator ``===`` or ``==``.
        * If equal, calculate an approximate "depth" and resolve requirements
          closer to the user-specified requirements first. If the depth cannot
          by determined (eg: due to no matching parents), it is considered
          infinite.
        * Order user-specified requirements by the order they are specified.
        * If equal, prefers "non-free" requirements, i.e. contains at least one
          operator, such as ``>=`` or ``<``.
        * If equal, order alphabetically for consistency (helps debuggability).
        TFc3�BK�|]\}}|j����y�wr,)�get_candidate_lookup)�.0�rrs   r �	<genexpr>z-PipProvider.get_preference.<locals>.<genexpr>�s ����T�<S�D�A�q�q�-�-�/�<S�s�)Nr/c3�:K�|]}|s�|j���y�wr,)�	specifier)rF�ireqs  r rHz-PipProvider.get_preference.<locals>.<genexpr>�s����!K�U�T�d�$�.�.�U�s��Nc3�,K�|]}|dddk(���y�w)N�z==r/)rF�ops  r rHz-PipProvider.get_preference.<locals>.<genexpr>�s����8�i��R���V�t�^�i�s�g�?c3�^�K�|]$\}}|��j|jnd���&y�w)Ng)r8r)rFr�parentr9s   �r rHz-PipProvider.get_preference.<locals>.<genexpr>�s6�����!�%<�	��6�8>�7I�D�&�&�v�{�{�3�s�R�%<�s�*-c3� K�|]}|���y�wr,r/)rF�ds  r rHz-PipProvider.get_preference.<locals>.<genexpr>�s����$>�
�1�Q�
�s�)�next�iter�
StopIteration�zip�operator�any�boolr5�KeyErrorr-r.�minr8�getr�is_backtrack_cause)r9rr>r?r@rB�has_information�lookups�	candidate�ireqs�
specifier_setrJ�	operators�direct�pinned�unfree�requested_order�inferred_depth�
parent_depths�requires_python�backtrack_causes`                    r �get_preferencezPipProvider.get_preferenceks����8	#���k�*�-�.�/�#�O��T�K�
�<S�T�G�"�G�}��I�u�'��I�u�"L�U�!K�
�!K�
�*�	�
���*�
�!K�	�
��$�&���8�i�8�8���i���
	!�15�1E�1E�j�1Q�O�!�N�)7����:�&��.�.�2�2�:�t�x�x�H��%�(B�B��
�1�1�*�>N�O�� ���J��J������J��	
�		
��e�	$�$�O�	$��
���		*�"�h�h�O��!�%0��%<�!�
�"%�$>�
�$>�!>��!D��!%�����		*�s*�C:�D�D�:D�D�AE#�"E#�requirements�incompatibilitiesc����dtdtf�fd�}t�j|t	j
���}�jj|||||�|��S)Nrrc�|���jdk(ry�jdk(rt�j|d��}|duSy)a�Are upgrades allowed for this project?

            This checks the upgrade strategy, and whether the project was one
            that the user specified in the command line, in order to decide
            whether we should upgrade if there's a newer version available.

            (Note that we don't need access to the `--upgrade` flag, because
            an upgrade strategy of "to-satisfy-only" means that `--upgrade`
            was not specified).
            �eagerTzonly-if-neededN�rF)r4r!r5)r�
user_orderr9s  �r �_eligible_for_upgradez7PipProvider.find_matches.<locals>._eligible_for_upgrade�sN����%�%��0���'�'�+;�;�1��(�(�� ��
�
"��-�-�r"rr)rrm�
constraint�prefers_installedrn)�strrYr!r2r�emptyr1�find_candidates)r9rrmrnrtrus`     r �find_matcheszPipProvider.find_matches�so���	�c�	�d�	�,*������$�$�&�
�
�
�}�}�,�,�!�%�!�#8��#D�D�/�-�
�	
r"�requirementr`c�$�|j|�Sr,)�is_satisfied_by)r9r{r`s   r r}zPipProvider.is_satisfied_by�s���*�*�9�5�5r"c�j�|j}|j|�D�cgc]}|��|��	c}Scc}wr,)r3�iter_dependencies)r9r`�
with_requiresrGs    r �get_dependencieszPipProvider.get_dependencies�s9�� �5�5�5�
�$�6�6�}�E�W�E�a����E�W�W��Ws�0�0c��|D]E}||jjk(ry|js�+||jjk(s�Eyy)NTF)r{rrP)rrBrks   r r]zPipProvider.is_backtrack_cause�sI�� 0�O��_�8�8�=�=�=���%�%�*��8N�8N�8S�8S�*S��	 0�
r")�__name__�
__module__�__qualname__�__doc__rrrwrrY�intr:r
rr
r=rrrrrlrzr}r��staticmethodr]r/r"r r$r$Ns����
Y��
Y��#�z�/�*�
Y�"�	
Y�
�
Y��S�#�X��

Y�
�
Y�-��{�I�7M�1N�-�SV�-�Y
��Y
��S�)�^�,�Y
��C��)�!4�4�5�	Y
�
�S�(�+B�"C�C�D�Y
�#�#:�;�
Y
�
�Y
�v'
��'
��c�8�K�#8�8�9�'
�#�3���(;�#;�<�	'
�

�)�	�'
�R6�;�6�9�6�QU�6�X�)�X���8M�X�����+3�4K�+L��	
���r"r$)r6r-�typingrrrrrrr	r
� pip._vendor.resolvelib.providersr�baser
rrr?rr%rr� pip._vendor.resolvelib.resolversrrArw�
_ProviderBaserrr!r$r/r"r �<module>r�s�����	�	�	�>�4�4�2���;�G�2�;�	�3I�J��$�[�)�S�%@�A�M�$�M�*�C�L���C�L���
�S�!�V�_�������1�a�4�[�	�2q�-�qr"python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-312.pyc000064400000000377151732701200026704 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py�<module>rs�rpython3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-312.pyc000064400000020301151732701200026044 0ustar00�

R`i5���ddlmZmZmZmZmZddlmZddlm	Z	ddl
mZmZddl
mZmZddlmZddlmZeedeefZeeefZd	e	d
ee	defd�ZGd
�d�ZGd�d�Zdedddefd�ZGd�d�Zy)�)�	FrozenSet�Iterable�Optional�Tuple�Union)�SpecifierSet)�NormalizedName)�
LegacyVersion�Version)�Link�links_equivalent)�InstallRequirement)�Hashes�	Candidate�project�extras�returnc�N�|s|Sdjt|��}|�d|�d�S)N�,�[�])�join�sorted)rr�extras_exprs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.py�format_namers/������(�(�6�&�>�*�K��Y�a��}�A�&�&�c��eZdZdededeeddfd�Zedd��Z	ede
ddfd	��Zdefd
�Z
de
ddfd�Zd
ddefd�Zy)�
Constraint�	specifier�hashes�linksrNc�.�||_||_||_y�N)r r!r")�selfr r!r"s    r�__init__zConstraint.__init__s��#��������
rc�L�tt�t�t��Sr$)rrr�	frozenset)�clss r�emptyzConstraint.emptys���,�.�&�(�I�K�@�@r�ireqc��|jrt|jg�n	t�}t|j|j	d��|�S�NF)�trust_internet)�linkr(rr r!)r)r+r"s   r�	from_ireqzConstraint.from_ireq"s:��*.�)�)�	�4�9�9�+�&�����$�.�.�$�+�+�U�+�*K�U�S�Src��t|j�xs,t|j�xst|j�Sr$)�boolr r!r"�r%s r�__bool__zConstraint.__bool__'s-���D�N�N�#�L�t�D�K�K�'8�L�D����<L�Lr�otherc� �t|t�stS|j|jz}|j|j	d��z}|j
}|jr|j|jg�}t|||�Sr-)	�
isinstancer�NotImplementedr r!r"r/�unionr)r%r5r r!r"s     r�__and__zConstraint.__and__*sq���%�!3�4�!�!��N�N�U�_�_�4�	����u�|�|�5�|�A�A���
�
���:�:��K�K�����-�E��)�V�U�3�3r�	candidaterc���|jrt�fd�|jD��sy|jj�jd��S)Nc3�6�K�|]}t|�����y�wr$)�_match_link)�.0r/r;s  �r�	<genexpr>z-Constraint.is_satisfied_by.<locals>.<genexpr>6s�����!V�:�4�+�d�I�">�:�s�FT)�prereleases)r"�allr �contains�version�r%r;s `r�is_satisfied_byzConstraint.is_satisfied_by4s@����:�:�c�!V�4�:�:�!V�V���~�~�&�&�y�'8�'8�d�&�K�Kr)rr)�__name__�
__module__�__qualname__rrrrr&�classmethodr*rr0r2r4r:rF�rrrrs����%��/5��>G��o��	
���A��A��T�/�T�L�T��T�M�$�M�4�/�4�L�4�L��L��Lrrc�`�eZdZedefd��Zedefd��Zdddefd�Z	de
fd�Zdefd�Zy	)
�Requirementrc��td��)z�The "project name" of a requirement.

        This is different from ``name`` if this requirement contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        �Subclass should override��NotImplementedErrorr3s r�project_namezRequirement.project_name?s��"�"<�=�=rc��td��)z�The name identifying this requirement in the resolver.

        This is different from ``project_name`` if this requirement contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        rOrPr3s r�namezRequirement.nameIs��"�"<�=�=rr;rc��y�NFrKrEs  rrFzRequirement.is_satisfied_byRs��rc��td���NrOrPr3s r�get_candidate_lookupz Requirement.get_candidate_lookupU���!�"<�=�=rc��td��rXrPr3s r�format_for_errorzRequirement.format_for_errorXrZrN)
rGrHrI�propertyr	rR�strrTr2rF�CandidateLookuprYr\rKrrrMrM>sa��
�>�n�>��>��>�c�>��>������>�o�>�>�#�>rrMr/r;c�H�|jrt||j�SyrV)�source_linkr
)r/r;s  rr>r>\s!�������i�&;�&;�<�<�rc���eZdZedefd��Zedefd��Zedefd��Z	ede
fd��Zede
fd��Zede
efd��Zde
dee
efd	�Zde
efd
�Zdefd�Zy)
rrc��td��)z�The "project name" of the candidate.

        This is different from ``name`` if this candidate contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        �Override in subclassrPr3s rrRzCandidate.project_namecs��"�"8�9�9rc��td��)z�The name identifying this candidate in the resolver.

        This is different from ``project_name`` if this candidate contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        rdrPr3s rrTzCandidate.namems��"�"8�9�9rc��td���NrdrPr3s rrDzCandidate.versionv���!�"8�9�9rc��td��rgrPr3s r�is_installedzCandidate.is_installedzrhrc��td��rgrPr3s r�is_editablezCandidate.is_editable~rhrc��td��rgrPr3s rrazCandidate.source_link�rhr�
with_requiresc��td��rgrP)r%rns  r�iter_dependencieszCandidate.iter_dependencies����!�"8�9�9rc��td��rgrPr3s r�get_install_requirementz!Candidate.get_install_requirement�rqrc��td��rXrPr3s rr\zCandidate.format_for_error�rZrN)rGrHrIr]r	rRr^rT�CandidateVersionrDr2rjrlrrrarrMrprrsr\rKrrrrbs���
�:�n�:��:��:�c�:��:��:�)�:��:��:�d�:��:��:�T�:��:��:�X�d�^�:��:�:�t�:���+�AV�8W�:�:��2D�)E�:�>�#�>rN)�typingrrrrr� pip._vendor.packaging.specifiersr�pip._vendor.packaging.utilsr	�pip._vendor.packaging.versionr
r�pip._internal.models.linkrr
�pip._internal.req.req_installr�pip._internal.utils.hashesrr_rur^rrrMr2r>rrKrr�<module>r}s���>�>�9�6�@�<�<�-����-�x�8J�/K�K�L�����/�0��'��'��>�1J�'�s�'�%L�%L�P>�>�<�d��{��t��+>�+>rsite-packages/pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-312.pyc000064400000014141151732701200030352 0ustar00python3.12�

R`iI���dZddlZddlmZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
ddlmZee
ege	effZereeZneZdeed	eefd
�Zdedeed	eefd�Zdedeed	eefd
�ZGd�de�Zy)a�Utilities to lazily create and visit candidates found.

Creating and visiting a candidate is a *very* costly operation. It involves
fetching, extracting, potentially building modules from source, and verifying
distribution metadata. It is therefore crucial for performance to keep
everything here lazy all the way down, so we only touch candidates that we
absolutely need, and not "download the world" when we only need one version of
something.
�N)�Sequence)�
TYPE_CHECKING�Any�Callable�Iterator�Optional�Set�Tuple)�_BaseVersion�)�	Candidate�infos�returnc#�|K�t�}|D])\}}||vr�|�}|��|��|j|��+y�w)z�Iterator for ``FoundCandidates``.

    This iterator is used when the package is not already installed. Candidates
    from index come later in their normal ordering.
    N)�set�add)r�versions_found�version�func�	candidates     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py�_iter_builtr%sK����),��N��
����n�$���F�	���������7�#��s�:<�	installedc#�K�|��|jh}|D])\}}||vr�|�}|��|��|j|��+y�w)aKIterator for ``FoundCandidates``.

    This iterator is used when the resolver prefers the already-installed
    candidate and NOT to upgrade. The installed candidate is therefore
    always yielded first, and candidates from index come later in their
    normal ordering, except skipped when the version is already installed.
    N)rr�rrrrrrs      r�_iter_built_with_prependedr6sW�����O�)2�):�):�(;�N��
����n�$���F�	���������7�#��s�AAc#�K�t�}|D]W\}}||vr�|j|k\r|��|j|j�|�}|��C|��|j|��Y|j|vr|��yy�w)a�Iterator for ``FoundCandidates``.

    This iterator is used when the resolver prefers to upgrade an
    already-installed package. Candidates from index are returned in their
    normal ordering, except replaced when the version is already installed.

    The implementation iterates through and yields other candidates, inserting
    the installed candidate exactly once before we start yielding older or
    equivalent candidates, or after all other candidates if they are all newer.
    N)rrrrs      r�_iter_built_with_insertedrLs�����),��N��
����n�$������'��O����y�0�0�1��F�	���������7�#������.���/�s�A;A=c	��eZdZdZdegeefdeede	de
efd�Zde
de
fd	�Zdeefd
�Zdefd�Zej$d�
�de	fd��Zy)�FoundCandidatesacA lazy sequence to provide candidates to the resolver.

    The intended usage is to return this from `find_matches()` so the resolver
    can iterate through the sequence multiple times, but only access the index
    page when remote packages are actually needed. This improve performances
    when suitable candidates are already installed on disk.
    �	get_infosr�prefers_installed�incompatible_idsc�<�||_||_||_||_y�N)�
_get_infos�
_installed�_prefers_installed�_incompatible_ids)�selfr!rr"r#s     r�__init__zFoundCandidates.__init__us"��$���#���"3���!1����indexrc��td���Nz
don't do this��NotImplementedError)r*r-s  r�__getitem__zFoundCandidates.__getitem__����"�/�2�2r,c�����j�}�jst|�}n9�jrt	�j|�}nt�j|�}�fd�|D�S)Nc3�R�K�|]}t|��jvs�|��� y�wr%)�idr))�.0�cr*s  �r�	<genexpr>z+FoundCandidates.__iter__.<locals>.<genexpr>�s#�����K�8�a�r�!�u�D�4J�4J�'J��8�s�'�')r&r'rr(rr)r*r�iterators`  r�__iter__zFoundCandidates.__iter__�sT������!�����"�5�)�H�
�
$�
$�1�$�/�/�5�I�H�0����%�H�H�K�8�K�Kr,c��td��r/r0�r*s r�__len__zFoundCandidates.__len__�r3r,r)�maxsizec�J�|jr
|jryt|�S)NT)r(r'�anyr=s r�__bool__zFoundCandidates.__bool__�s���"�"�t�����4�y�r,N)�__name__�
__module__�__qualname__�__doc__rr�IndexCandidateInforr
�boolr	�intr+rr2r;r>�	functools�	lru_cacherB�r,rr r ls����
2��B��);� <�<�=�
2��I�&�
2� �	
2�
�c�(�
2�3��3��3�L�(�9�-�L�3��3��Y����#��$��$�r,r )rFrJ�collections.abcr�typingrrrrrr	r
�pip._vendor.packaging.versionr�baser
rG�SequenceCandidaterrrr rLr,r�<module>rRs�����$�O�O�O�6���<��"�h�y�6I�2I�)J�J�K��� ��+��!��$�x� 2�3�$���8K�$�"$��$�!)�*<�!=�$�
�i��$�,���!)�*<�!=��
�i���@/�'�/r,python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-312.pyc000064400000076460151732701200026622 0ustar00�

R`i>|��^�ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZddlmZddlmZddlmZmZddlmZddlmZmZddl m!Z!m"Z"m#Z#m$Z$m%Z%dd	l&m'Z'dd
l(m)Z)m*Z*ddl+m,Z,ddl-m.Z.dd
l/m0Z0ddl1m2Z2ddl3m4Z4m5Z5ddl6m7Z7ddl8m9Z9ddl:m;Z;ddl<m=Z=ddl>m?Z?ddl@mAZAmBZBmCZCmDZDddlEmFZFmGZGmHZHmIZImJZJmKZKmLZLddlMmNZNmOZOddlPmQZQmRZRmSZSmTZTmUZUerddlmVZVGd�deV�ZWej�eY�ZZed�Z[ee,e[fZ\Gd�de
�Z]Gd �d!�Z^y)"�N)�
TYPE_CHECKING�Dict�	FrozenSet�Iterable�Iterator�List�Mapping�
NamedTuple�Optional�Sequence�Set�Tuple�TypeVar�cast)�InvalidRequirement)�SpecifierSet)�NormalizedName�canonicalize_name)�ResolutionImpossible)�
CacheEntry�
WheelCache)�DistributionNotFound�InstallationError�MetadataInconsistent�UnsupportedPythonVersion�UnsupportedWheel)�
PackageFinder)�BaseDistribution�get_default_environment)�Link)�Wheel)�RequirementPreparer)�install_req_from_link_and_ireq)�InstallRequirement�check_invalid_constraint_type)�InstallRequirementProvider)�
get_supported)�Hashes)�get_requirement)�running_under_virtualenv�)�	Candidate�CandidateVersion�
Constraint�Requirement)�AlreadyInstalledCandidate�
BaseCandidate�EditableCandidate�ExtrasCandidate�
LinkCandidate�RequiresPythonCandidate�as_base_candidate)�FoundCandidates�IndexCandidateInfo)�ExplicitRequirement�RequiresPythonRequirement�SpecifierRequirement�!SpecifierWithoutExtrasRequirement�UnsatisfiableRequirement)�Protocolc�"�eZdZUeed<eed<y)�
ConflictCause�requirement�parentN)�__name__�
__module__�__qualname__r:�__annotations__r,����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.pyr@r@Js��.�.��rHr@�Cc�F�eZdZUeeed<eeefed<eee	fed<y)�CollectedRootRequirements�requirements�constraints�user_requestedN)
rCrDrErr/rFr�strr.�intrGrHrIrLrLUs*���{�#�#��c�:�o�&�&���c��N�"rHrLc���eZdZ	d?dedededeedededed	ed
ee	e
dfddfd
�Zedefd��Z
deddfd�Zdd�dedeedeedefd�Zdedeededefd�Zdedeededeedeedeefd�Zdeedededed ee
de efd!�Z!d"e e"deede#efd#�Z$d$ed%e%dede#efd&�Z&d$ed'e'ee e"fd(e'ee#efd%e%dede efd)�Z(d*ed+e ede#e"fd,�Z)d-e*ede+fd.�Z,d/ede-fd0�Z.	d@dedeed+e ede#e"fd1�Z/dedee"fd2�Z0dedeedee1fd3�Z2d/edeefd4�Z3d5ed6de4fd7�Z5d8e"d9eede6fd:�Z7d;d<d=e8ee%fde9fd>�Z:y)A�FactoryN�finder�preparer�make_install_req�wheel_cache�
use_user_site�force_reinstall�ignore_installed�ignore_requires_python�py_version_info.�returnc
�^�||_||_||_t|	�|_||_||_||_||_i|_	i|_
i|_i|_i|_
|s;t�}
|
jd��D�cic]}|j |��c}|_yi|_ycc}w)NF)�
local_only)�_finderrU�_wheel_cacher5�_python_candidate�_make_install_req_from_spec�_use_user_site�_force_reinstall�_ignore_requires_python�_build_failures�_link_candidate_cache�_editable_candidate_cache�_installed_candidate_cache�_extras_candidate_cacher�iter_installed_distributions�canonical_name�_installed_dists)�selfrTrUrVrWrXrYrZr[r\�env�dists            rI�__init__zFactory.__init__\s������ ��
�'���!8��!I���+;��(�+��� /���'=��$�9;���;=��"�CE��&�PR��'�
�	
�$� �)�+�C� �<�<��<�N�%�N�D��#�#�T�)�N�%�D�!�
%'�D�!��%s�B*c��|jS�N)re)ros rIrYzFactory.force_reinstall�s���$�$�$rH�linkc���|jsyt|j�}|j|jj
j
��ry|j�d�}t|��)Nz+ is not a supported wheel on this platform.)�is_wheelr!�filename�	supportedr`�
target_python�get_unsorted_tagsr)roru�wheel�msgs    rI�"_fail_if_link_is_unsupported_wheelz*Factory._fail_if_link_is_unsupported_wheel�sX���}�}���d�m�m�$���?�?�4�<�<�5�5�G�G�I�J������J�K���s�#�#rH��
comes_from�base�extrasr�c��t|�td�|D��f}	|j|}|S#t$r!t	|||��}||j|<Y|SwxYw)Nc3�2K�|]}t|����y�wrt)r)�.0�es  rI�	<genexpr>z1Factory._make_extras_candidate.<locals>.<genexpr>�s����(N�v�!�):�1�)=�v�s�r)�id�	frozensetrk�KeyErrorr3)ror�r�r��	cache_key�	candidates      rI�_make_extras_candidatezFactory._make_extras_candidate�sr����X�y�(N�v�(N�N�O�	�	@��4�4�Y�?�I�����	@�'��f��L�I�6?�D�(�(��3���	@�s�0�&A�Arq�templatec���	|j|j}|s|S|j	|||��S#t$r*t|||��}||j|j<Y�JwxYw)N)�factoryr)rjrmr�r0r�)rorqr�r�r�s     rI�_make_candidate_from_distz!Factory._make_candidate_from_dist�sw��	H��2�2�4�3F�3F�G�D���K��*�*�4��H�*�M�M���	H�,�T�8�T�J�D�CG�D�+�+�D�,?�,?�@�	H�s�3�0A&�%A&�name�versionc�V�||jvry|jr<||jvr	t|||||��|j|<|j|}n;||jvr	t|||||��|j|<|j|}|s|S|j|||��S#t$r4}t
j
d||ddi��||j|<Yd}~yd}~wwxYw#t$r4}t
j
d||ddi��||j|<Yd}~yd}~wwxYw)N)r�r�r�z3Discarding [blue underline]%s[/]: [yellow]%s[reset]�markupT)�extrar)
rg�editablerir2r�logger�inforhr4r�)rorur�r�r�r�r�r�s        rI�_make_candidate_from_linkz!Factory._make_candidate_from_link�sd���4�'�'�'������4�9�9�9� �;L�� � $�!� '�<�D�2�2�4�8�"#'�"@�"@��"F�D��4�5�5�5� �7D�� � $�!� '�8�D�.�.�t�4� �-�-�d�3�D���K��*�*�4��H�*�M�M��E,� ��K�K�M���'��.�	 ��23�D�(�(��.��� ��*,� ��K�K�M���'��.�	 ��23�D�(�(��.��� �s/�B+�'C+�+	C(�4*C#�#C(�+	D(�4*D#�#D(�ireqs�	specifier�hashes�prefers_installed�incompatible_idsc�������	�
��|sy|d��jsJd��t�jj��
t��	|D][}|jsJd���|jjz��|jd��z��	t|j�z�	�]dttf�	��
���fd�}dttf�	��
���fd�}t||�|��S)	NrGrz)Candidates found on index must be PEP 508F)�trust_internetr]c�����jry	�j�}�j|jd��sy�j|����}t
|��vry|S#t$rYywxYw)z6Get the candidate for the currently-installed version.NT)�prereleases)rqr�r�)rernr��containsr�r�r�)�installed_distr�r�r�r�ror�r�s  ������rI�_get_installed_candidatez@Factory._iter_found_candidates.<locals>._get_installed_candidates�����$�$��
�!%�!6�!6�t�!<��
�%�%�n�&<�&<�$�%�O���6�6�#��!�7��I��)�}� 0�0������
��
�s�A!�!	A-�,A-c	3��K��
jj�	����}t|j��}t	d�|D��}dt
dtfd�}|��}t|�D]f}|r|s|jjr�tj�
j|j���	|j��}|j|f���hy�w)N)�project_namer�r�c3�HK�|]}|jj���y�wrt)ru�	is_yanked)r��icans  rIr�zUFactory._iter_found_candidates.<locals>.iter_index_candidate_infos.<locals>.<genexpr>(s����C�U�T�T�Y�Y�0�0�U�s� "r�r]c��|D]@}|jdk(ry|jdk7r�$|jjd�r�@yy)Nz===T�==z.*F)�operatorr��endswith)r��sps  rI�	is_pinnedzUFactory._iter_found_candidates.<locals>.iter_index_candidate_infos.<locals>.is_pinned*sG��#�B��{�{�e�+�#��{�{�d�*� ��z�z�*�*�4�0� ��$�rH)rur�r�r�r�)r`�find_best_candidate�list�iter_applicable�allr�bool�reversedrur��	functools�partialr�r�)
�result�icans�
all_yankedr��pinnedr��funcr�r�r�ror�r�s
       ������rI�iter_index_candidate_infoszBFactory._iter_found_candidates.<locals>.iter_index_candidate_infoss�������\�\�5�5�!�#��6��F�
��/�/�1�2�E�
�C�U�C�C�J�	
�\�	
�d�	
��y�)�F�!����"�v�4�9�9�3F�3F�� �(�(��2�2����!�%�� �L�L�
���l�l�D�(�(�(�s�CC)�reqrr�r�r�r�r�rr,rr8r7)ror�r�r�r�r��ireqr�r�r�r�r�s` `` `   @@@rI�_iter_found_candidateszFactory._iter_found_candidates�s��������8���|�|�H�H�H�|� ����!2�!2�3��!*����D��8�8�H�H�H�8�����+�+�+�I��d�k�k��k�7�7�F��i����,�,�F�	�	�(�9�*=�	�	�0&	)�H�5G�,H�&	)�&	)�P�&�$�&���	
�	
rH�base_requirementsc#�K�|D]@}|j�\}}|��t|�}|�Jd��|j||����By�w)a8Produce explicit candidates from the base given an extra-ed package.

        :param base_requirements: Requirements known to the resolver. The
            requirements are guaranteed to not have extras.
        :param extras: The extras to inject into the explicit requirements'
            candidates.
        Nzno extras here)�get_candidate_lookupr6r�)ror�r�r��lookup_cand�_�	base_cands       rI�#_iter_explicit_candidates_from_basez+Factory._iter_explicit_candidates_from_baseLs^����%�C� �5�5�7�N�K���"��*�+�6�I��(�:�*:�:�(��-�-�i��@�@�%�s�AA	�
identifier�
constraintc	#�K�|jD]K}|j|�|j|t�t	||�t|�d��}|s�H|���My�w)z�Produce explicit candidates from constraints.

        This creates "fake" InstallRequirement objects that are basically clones
        of what "should" be the template, but with original_link set to link.
        N�r�r�r�r�)�linksr~r�r�r#r)ror�r�r�rur�s      rI�!_iter_candidates_from_constraintsz)Factory._iter_candidates_from_constraintsbsb�����$�$�D��3�3�D�9��6�6�� �{�7��h�G�&�z�2��7��I����%�s�AA�ArM�incompatibilitiesc	������t�}g}��D]<}|j�\}	}
|	�|j|	�|
��,|j|
��>t	j
t�5t��}|j�k7r�|j|j�j|jd�t|j����j|jg�D])}|j�\}}
|
��|j|
��+ddd�|r'	|j|j��|d���|j�d�D�
chc]
}
t!|
���c}
�|s)|j#|�j$�j&|��S����fd�|D�S#1swY��xYw#t$rYywxYwcc}
w)NrGr)r�c3���K�|];�t���vr,�j��rt�fd���D��r����=y�w)c3�@�K�|]}|j�����y�wrt)�is_satisfied_by)r�r��cs  �rIr�z4Factory.find_candidates.<locals>.<genexpr>.<genexpr>�s�����O�6N�s�C�'�'��*�6N�s�N)r�r�r�)r�r�r�r��incompat_idsrMs @����rIr�z*Factory.find_candidates.<locals>.<genexpr>�sF�����
�(���!�u�L�(��*�*�1�-��O�l�:�6N�O�O�	
�(�s�AA)�setr��add�append�
contextlib�suppressrr)r��updater��getr�r�r�rr�r�r�r�)ror�rMr�r�r��explicit_candidatesr�r��candr��parsed_requirementr�r�r�s `` `         @rI�find_candidateszFactory.find_candidatesys����/2�e��*,���
�+�C��1�1�3�J�D�$���#�'�'��-������T�"�,��
 �
 �!3�
4�!0��!<��!�&�&�*�4�#�*�*��<�<�$�(�(�);�)@�)@�"�E�!�"4�";�";�<���(�+�+�,>�,C�,C�R�H�C�!�6�6�8�G�A�t��'����T�*�I�5�$�
�#�*�*��:�:�"�"�!&�q��;���(9�'<�'<�Z��'L�M�'L�!��1��'L�M��#��.�.���$�$��!�!�!���
�
�(�
�	
�_5�
4��6$�
��
��Ns+�.BF2�F2�*&F>�$G
�2F;�>	G
�	G
r��requested_extrasc#��K�|j|�s,tjd|j|j�y|j
sI|jr/|j�#|jjr
t|���t|���y|j|j
�|j|j
t|j�||jrt|j�ndd��}|�F|js|j|j
�t!t|j����y|j#|���y�w)aC
        Returns requirement objects associated with the given InstallRequirement. In
        most cases this will be a single object but the following special cases exist:
            - the InstallRequirement has markers that do not apply -> result is empty
            - the InstallRequirement has both a constraint and extras -> result is split
                in two requirement objects: one with the constraint and one with the
                extra. This allows centralized constraint handling for the base,
                resulting in fewer candidate rejections.
        z6Ignoring %s: markers '%s' don't match your environmentNr�)�
match_markersr�r�r��markersrur�r�r�r<r;r~r�r�rrgr=�make_requirement_from_candidate)ror�r�r�s    rI�#_make_requirements_from_install_reqz+Factory._make_requirements_from_install_req�s�����!�!�"2�3��K�K�H��	�	����
�
����{�{�t�x�x�3����8J�8J�7��=�=�&�t�,�,��3�3�D�I�I�>��1�1��	�	� ����-��59�Y�Y�&�t�y�y�1�D��2��D��|��y�y��.�.�t�y�y�9�9�.�/@����/K�L�L��:�:�4�@�@�s�EE �
root_ireqsc���tgii�}t|�D�](\}}|jr�t|�}|rt	|��|j�s�<|jsJd��t|j�}||jvr|j|xx|zcc<��tj|�|j|<��t|j|d���}|s��|d}|jr1|j|jvr||j|j<|jj!|���+|jj#d���|S)NzConstraint must be namedrG)r�rc�4�|j|jk7Srt)r�r�)�rs rI�<lambda>z3Factory.collect_root_requirements.<locals>.<lambda>s��!�&�&�A�N�N�2JrH)�key)rL�	enumerater�r%rr�r�rrNr.�	from_ireqr�r��
user_suppliedrOrM�extend�sort)	ror��	collected�ir��problemr��reqsr�s	         rI�collect_root_requirementsz!Factory.collect_root_requirements�sI��.�b�"�b�9�	� ��,�G�A�t����7��=���+�G�4�4��)�)�+���y�y�<�"<�<�y�(����3���9�0�0�0��)�)�$�/�4�7�/�2<�2F�2F�t�2L�I�)�)�$�/���<�<��)+�=��������7���%�%�(�-�-�y�?W�?W�*W�>?�I�,�,�X�]�]�;��&�&�-�-�d�3�5-�F	���#�#�(J�#�K��rHr�c��t|�Srt)r9)ror�s  rIr�z'Factory.make_requirement_from_candidates��#�9�-�-rHc�J�|j||�}|j||�S)a(
        Returns requirement objects associated with the given specifier. In most cases
        this will be a single object but the following special cases exist:
            - the specifier has markers that do not apply -> result is empty
            - the specifier has both a constraint and extras -> result is split
                in two requirement objects: one with the constraint and one with the
                extra. This allows centralized constraint handling for the base,
                resulting in fewer candidate rejections.
        )rcr�)ror�r�r�r�s     rI�make_requirements_from_specz#Factory.make_requirements_from_specs*���/�/�	�:�F���7�7��>N�O�OrHc�`�|jryt|�syt||j�Srt)rfrPr:rb)ror�s  rI� make_requires_python_requirementz(Factory.make_requires_python_requirement1s-���'�'���9�~��(��D�4J�4J�K�KrHc�h�|j�y|jj||t���S)a�Look up the link in the wheel cache.

        If ``preparer.require_hashes`` is True, don't use the wheel cache,
        because cached wheels, always built locally, have different hashes
        than the files downloaded from the index server and thus throw false
        hash mismatches. Furthermore, cached wheels at present have
        nondeterministic contents due to file modification times.
        N)ru�package_name�supported_tags)ra�get_cache_entryr')rorur�s   rI�get_wheel_cache_entryzFactory.get_wheel_cache_entry<s<�����$��� � �0�0���(�?�1�
�	
rHc���|jj|j�}|�y	|jt	j
dddtji��t	j
dddtji��fvry	|js|S|jr|St�r3|jr'd|j�d|j��}t|��y#t$rY�ewxYw)	N�purelib�posix_prefixr�)�scheme�vars�platlib�platbasezNWill not install to the user site because it will lack sys.path precedence to z in )rnr�r��installed_location�	sysconfig�get_path�sys�base_prefixr�rd�in_usersiter*�in_site_packages�raw_name�locationr)ror�rq�messages    rI�get_dist_to_uninstallzFactory.get_dist_to_uninstallOs����$�$�(�(��)?�)?�@���<��	��&�&��&�&�y��v�WZ�Wf�Wf�Ng�h��&�&�y��z�[^�[j�[j�Nk�l�+���	��"�"��K�����K�$�%�$�*?�*?�*�*.�-�-���T�]�]�O�M�
�$�G�,�,���/�	��	�s�AC"�"	C.�-C.�causesr@c��|sJd��|jj}t|�dk(rOt|djj
�}d|djj�d|�d|��}t|�Sd|�d�}|D]G}|jj�}t|jj
�}|d	|�d
|�d�z
}�It|�S)Nz,Requires-Python error reported with no causer+rzPackage z requires a different Python: z not in z%Packages require a different Python. z not in:�
z (required by �))
rbr��lenrPrAr�rBr�r�format_for_error)rorr�r�r�cause�packages       rI�_report_requires_python_errorz%Factory._report_requires_python_errorus����E�E�E�v��(�(�0�0���v�;�!���F�1�I�1�1�;�;�<�I��6�!�9�+�+�0�0�3�4�"�)�8�I�=�:�
�,�G�4�4�9�'��(�K���E��l�l�3�3�5�G��E�-�-�7�7�8�I���I�=��w�i�q�A�A�G��(��0�0rHr�rBc��|�t|�}n|�d|j�d�}|jj|j�}|jj�}t
�}t
�}|D]_}|jr|jjnd}	|	r|j|j��E|j|j��at|�D�
cgc]
}
t|
���}}
t|�D�
cgc]
}
t|
���}}
|r)tjddj|�xsd�|r)tjddj|�xsd�tjd	|dj|�xsd�t|�d
k(rtjd�t!d|���Scc}
wcc}
w)
Nz (from rFz)Ignored the following yanked versions: %s�, �nonezJIgnored the following versions that require a different python version: %sz; zNCould not find a version that satisfies the requirement %s (from versions: %s)zrequirements.txtz�HINT: You are attempting to install a package literally named "requirements.txt" (which cannot exist). Consider using the '-r' flag to install the packages listed in requirements.txtz#No matching distribution found for )rPr�r`�find_all_candidatesr��requires_python_skipped_reasonsr�rur�r�r��sortedr��critical�joinr�r)
ror�rB�req_disp�cands�skipped_by_requires_python�versions_set�yanked_versions_setr�r��v�versions�yanked_versionss
             rI�#_report_single_requirement_conflictz+Factory._report_single_requirement_conflict�s����>��3�x�H���g�f�k�k�]�!�4�H����0�0��1A�1A�B��%)�\�\�%Q�%Q�%S�"�.1�e��58�U���A�,-�F�F����(�(��I��#�'�'��	�	�2�� � ����+��%+�<�$8�9�$8�q�C��F�$8��9�+1�2E�+F�G�+F�a�3�q�6�+F��G��
�O�O�;��	�	�/�*�4�f�
�&��O�O���	�	�4�5�?��
�
	���
"���I�I�h��)�6�		
��s�8�)�)��K�K�#�
�$�&I�#��$O�P�P��=:��Gs�%G�Gr�z,ResolutionImpossible[Requirement, Candidate]rNc��|jsJd��|jD�cgc]C}t|jt�r'|jj	|j
�s|��E}}|r|j
td|��St|j�dk(r2|jd\}}|j|vr|j||�Sdttdtfd�}dtdtfd	�}t�}	|jD]1\}}|�|j�}
n||�}
|	j!|
��3|	r|t#|	��}nd
}dj%|�}t&j)|�d}t�}
|jD]m\}}|j|vr|
j!|j�|d
z}|r ||j�d|j*�d�z}n|dz}||j�z}�o|
D]}||j,}|d|�|��z
}�|dzdzdzdzdz}t&j/|�t1d�Scc}w)Nz)Installation error reported with no causezSequence[ConflictCause]r+r�partsr]c�b�t|�dk(r|dSdj|dd�dz|dzS)Nr+rr���z and )rr$)r/s rI�	text_joinz1Factory.get_installation_error.<locals>.text_join�s9���5�z�Q���Q�x���9�9�U�3�B�Z�(�7�2�U�2�Y�>�>rHrBc��|j�}|r|js|j�d|j��St	|jt
�rt
|jj�St
|j�S)Nr�)�get_install_requirementr�r�r��
isinstancer$rP)rBr�s  rI�describe_triggerz8Factory.get_installation_error.<locals>.describe_trigger�sf���1�1�3�D��t��� �+�+��b����(8�9�9��$�/�/�+=�>��4�?�?�/�/�0�0��t���'�'rHzthe requested packageszOCannot install {} because these package versions have conflicting dependencies.z
The conflict is caused by:z
    � z depends on zThe user requested z%
    The user requested (constraint) z

zTo fix this you could try to:
z91. loosen the range of package versions you've specified
z92. remove package versions to allow pip attempt to solve zthe dependency conflict
z�ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts)rr5rAr:r�rbrrrr�r-rrPr,r�rr�r"�formatr�r#r�r�r�r)ror�rNr�requires_python_causesr�rBr2r6�triggers�triggerr�r}�relevant_constraintsr��specs                rI�get_installation_errorzFactory.get_installation_error�s���
�x�x�D�D�D�x����"
�!���%�+�+�-F�G��%�%�5�5�d�6L�6L�M�
�!�	�"
�"��5�5��.�0F�G��
��q�x�x�=�A���(�(�1�+�K�C���x�x�{�*��?�?��V�L�L�	?�T�#�Y�	?�3�	?�	(�Y�	(�3�	(��5���8�8�K�C���~��.�.�0��*�6�2���L�L��!�
$���V�H�-�.�D�+�D�
-�-3�V�D�\�	�	�����,��"�u���8�8�K�C���x�x�;�&�$�(�(����2���.�C���v�{�{�m�1�V�^�^�,<�L�I�I���1�1����,�,�.�.�C�$�(�C��s�#�-�-�D��;�C�5���G�G�C�(�

��
�/�
0�K�
K�J�	
J�
*�
*�	�	���C��#�
1�
�	
��o"
s�AIrt)rG);rCrDrErr"r&rrr�rrQrr�propertyrYr r~r1rrPr$r3r�rr,r�rr-r�rrr(r
rr�r/rr�r.r�r	r�r�rrLr�r9r�r�r�rrrrrrr-rrr>rGrHrIrSrS[s	��6:�$'��$'�&�$'�5�	$'�
�j�)�$'��
$'��$'��$'�!%�$'�"�%��S��/�2�$'�
�$'�L�%��%��%�$�t�$��$�48�
��
��#��
�
�/�0�
�
�

�
N��
N��#��
N�%�	
N�

�
N�<N��<N��#��<N�%�	<N�
�~�&�<N��*�+�
<N�
�)�	�<N�|_
��*�+�_
� �_
��	_
�
 �_
��c�(�
_
�
�)�	�_
�BA�#�K�0�A��#��A�
�)�	�	A�, �� �� �%�	 �

�)�	� �.I
��I
��c�8�K�#8�8�9�I
�#�3���(;�#;�<�	I
�
�I
� �
I
�
�)�	�I
�V*A�&�*A�:B�3�-�*A�	�+�	�*A�X(��1�2�(�	"�(�T.�"�.�	�.�+-�	P��P��/�0�P�#�3�-�	P�

�+�	�P�$	L��	L�
�+�	�	L�
��
� (��
�
�	�*�	�
�&$�y�$�X�FV�=W�$�L1���/�1�	!�1�,2Q��2Q�(0��(;�2Q�	�2Q�hd
�9�d
��#�z�/�*�d
�
�	d
rHrS)_r�r��loggingrr
�typingrrrrrrr	r
rrr
rrr�"pip._vendor.packaging.requirementsr� pip._vendor.packaging.specifiersr�pip._vendor.packaging.utilsrr�pip._vendor.resolvelibr�pip._internal.cacherr�pip._internal.exceptionsrrrrr�"pip._internal.index.package_finderr�pip._internal.metadatarr�pip._internal.models.linkr �pip._internal.models.wheelr!� pip._internal.operations.preparer"�pip._internal.req.constructorsr#�pip._internal.req.req_installr$r%�pip._internal.resolution.baser&�&pip._internal.utils.compatibility_tagsr'�pip._internal.utils.hashesr(�pip._internal.utils.packagingr)�pip._internal.utils.virtualenvr*r�r,r-r.r/�
candidatesr0r1r2r3r4r5r6�found_candidatesr7r8rMr9r:r;r<r=r>r@�	getLoggerrCr�rJ�CacherLrSrGrHrI�<module>rXs������
������"B�9�I�7�6���=�L�*�,�@�I��E�@�-�9�C�F�F����B��������

��	�	�8�	$���C�L���T�1�W�
��#�
�#�H
�H
rHpython3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-312.pyc000064400000011561151732701200027004 0ustar00�

R`i���ddlmZddlmZddlmZmZddlmZddl	m
Z
mZee�Z
Gd�de�ZGd	�d
e�Zy)�)�defaultdict)�	getLogger)�Any�DefaultDict)�BaseReporter�)�	Candidate�Requirementc�(�eZdZdd�Zdededdfd�Zy)�PipReporter�returnNc�B�tt�|_dddd�|_y)Nz�pip is looking at multiple versions of {package_name} to determine which version is compatible with other requirements. This could take a while.z�pip is still looking at multiple versions of {package_name} to determine which version is compatible with other requirements. This could take a while.z�This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.)r��
)r�int�reject_count_by_package�_messages_at_reject_count��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py�__init__zPipReporter.__init__
s)��>I�#�>N��$�9�
9�
K�*
��&��	criterion�	candidatec��|j|jxxdz
cc<|j|j}||jvry|j|}tj	d|j|j���d}|jD]Y}|j|j}}|dz
}|r ||j�d|j�d�z
}n|dz
}||j�z
}�[tj|�y)	NrzINFO: %s)�package_namez0Will try a different candidate, due to conflict:z
    � z depends on zThe user requested )r�namer�logger�info�format�information�requirement�parent�version�format_for_error�debug)	rrr�count�message�msg�req_info�reqr$s	         r�rejecting_candidatezPipReporter.rejecting_candidate#s����$�$�Y�^�^�4��9�4��,�,�Y�^�^�<����6�6�6���0�0��7�����J����I�N�N�� K�L�@��!�-�-�H�"�.�.�����C��8�O�C���&�+�+��a����'7�|�D�D���,�,���3�'�'�)�)�C�.�	���S�r�r
N)�__name__�
__module__�__qualname__rrr	r-�rrrrs!��
�,�S��Y��4�rrc��eZdZdZdd�Zdeddfd�Zdededdfd�Zdeddfd	�Z	d
e
deddfd�Zd
ededdfd�Z
deddfd�Zy)�PipDebuggingReporterz9A reporter that does an info log for every event it sees.r
Nc�.�tjd�y)NzReporter.starting()�rr rs r�startingzPipDebuggingReporter.starting=s�����)�*r�indexc�0�tjd|�y)NzReporter.starting_round(%r)r6)rr8s  r�starting_roundz#PipDebuggingReporter.starting_round@s�����1�5�9r�statec�0�tjd|�y)Nz Reporter.ending_round(%r, state)r6)rr8r;s   r�ending_roundz!PipDebuggingReporter.ending_roundCs�����6��>rc�0�tjd|�y)NzReporter.ending(%r)r6)rr;s  r�endingzPipDebuggingReporter.endingFs�����)�5�1rr#r$c�2�tjd||�y)Nz#Reporter.adding_requirement(%r, %r)r6)rr#r$s   r�adding_requirementz'PipDebuggingReporter.adding_requirementIs�����9�;��Orrrc�2�tjd||�y)Nz$Reporter.rejecting_candidate(%r, %r)r6)rrrs   rr-z(PipDebuggingReporter.rejecting_candidateLs�����:�I�y�Qrc�0�tjd|�y)NzReporter.pinning(%r)r6)rrs  r�pinningzPipDebuggingReporter.pinningOs�����*�I�6rr.)r/r0r1�__doc__r7rr:rr=r?r
r	rAr-rDr2rrr4r4:s���C�+�:�C�:�D�:�?�#�?�c�?�d�?�2�C�2�D�2�P�k�P�9�P�QU�P�R�S�R�Y�R�4�R�7��7�t�7rr4N)�collectionsr�loggingr�typingrr� pip._vendor.resolvelib.reportersr�baser	r
r/rrr4r2rr�<module>rKs7��#��#�9�(�	�8�	��+�,�+�\7�<�7rsite-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-312.pyc000064400000027012151732701200027604 0ustar00python3.12�

R`i����ddlmZddlmZmZddlmZddlmZddl	m
Z
mZmZm
Z
Gd�de�ZGd	�d
e�ZGd�de�ZGd
�de�ZGd�de�Zy)�)�SpecifierSet)�NormalizedName�canonicalize_name)�install_req_drop_extras)�InstallRequirement�)�	Candidate�CandidateLookup�Requirement�format_namec��eZdZdeddfd�Zdefd�Zdefd�Zede	fd��Z
edefd��Zdefd	�Zde
fd
�Zdedefd�Zy)�ExplicitRequirement�	candidate�returnNc��||_y�N�r��selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/requirements.py�__init__zExplicitRequirement.__init__s	��"���c�,�t|j�Sr)�strr�rs r�__str__zExplicitRequirement.__str__s���4�>�>�"�"rc�d�dj|jj|j��S)Nz{class_name}({candidate!r}))�
class_namer)�format�	__class__�__name__rrs r�__repr__zExplicitRequirement.__repr__s.��,�3�3��~�~�.�.��n�n�4�
�	
rc�.�|jjSr)r�project_namers rr$z ExplicitRequirement.project_names���~�~�*�*�*rc�.�|jjSr)r�namers rr&zExplicitRequirement.names���~�~�"�"�"rc�6�|jj�Sr)r�format_for_errorrs rr(z$ExplicitRequirement.format_for_error!s���~�~�.�.�0�0rc��|jdfSrrrs r�get_candidate_lookupz(ExplicitRequirement.get_candidate_lookup$s���~�~�t�#�#rc� �||jk(Srrrs  r�is_satisfied_byz#ExplicitRequirement.is_satisfied_by's���D�N�N�*�*r)r!�
__module__�__qualname__r	rrrr"�propertyrr$r&r(r
r*�boolr,�rrrr
s���#�)�#��#�#��#�
�#�
��+�n�+��+��#�c�#��#�1�#�1�$�o�$�+��+�t�+rrc��eZdZdeddfd�Zdefd�Zdefd�Zede	fd��Z
edefd��Zdefd	�Zde
fd
�Zdedefd�Zy)
�SpecifierRequirement�ireqrNc��|j�Jd��||_td�|jjD��|_y)N�This is a link, not a specifierc3�2K�|]}t|����y�wr�r��.0�es  r�	<genexpr>z0SpecifierRequirement.__init__.<locals>.<genexpr>/����� Q�?P�!�!2�1�!5�?P���)�link�_ireq�	frozenset�extras�_extras�rr4s  rrzSpecifierRequirement.__init__,s;���y�y� �C�"C�C� ���
� � Q�t�z�z�?P�?P� Q�Q��rc�@�t|jj�Sr)rr@�reqrs rrzSpecifierRequirement.__str__1s���4�:�:�>�>�"�"rc��dj|jjt|jj
���S)Nz{class_name}({requirement!r}))r�requirement)rr r!rr@rFrs rr"zSpecifierRequirement.__repr__4s7��.�5�5��~�~�.�.��D�J�J�N�N�+�6�
�	
rc��|jjsJd��t|jjj�S)N�'Specifier-backed ireq is always PEP 508)r@rFrr&rs rr$z!SpecifierRequirement.project_name:s1���z�z�~�~�H�H�H�~� ������!4�!4�5�5rc�B�t|j|j�Sr)rr$rCrs rr&zSpecifierRequirement.name?s���4�,�,�d�l�l�;�;rc���t|�jd�D�cgc]}|j���}}t|�dk(ryt|�dk(r|dSdj	|dd�dz|dzScc}w)N�,r�rz, ���z and )r�split�strip�len�join)r�s�partss   rr(z%SpecifierRequirement.format_for_errorCsw��
%(��I�O�O�C�$8�9�$8�q�����$8��9��u�:��?��
��Z�1�_���8�O��y�y��s���$�w�.��r��:�:��
:s�A5c��d|jfSr)r@rs rr*z)SpecifierRequirement.get_candidate_lookupPs���T�Z�Z��rrc�*�|j|jk(s!Jd|j�d|j����|jjsJd��|jjj}|j	|j
d��S)Nz6Internal issue: Candidate is not for this requirement z vs rJT��prereleases)r&r@rF�	specifier�contains�version)rr�specs   rr,z$SpecifierRequirement.is_satisfied_bySs���~�~����*�	
�D��~�~��d�4�9�9�+�
/�	
�*��z�z�~�~�H�H�H�~��z�z�~�~�'�'���}�}�Y�.�.�D�}�A�Ar)r!r-r.rrrrr"r/rr$r&r(r
r*r	r0r,r1rrr3r3+s���R�/�R�D�R�
#��#�
�#�
��6�n�6��6��<�c�<��<�;�#�;� �o� �
B��
B�t�
Brr3c� �eZdZdZdeddfd�Zy)�!SpecifierWithoutExtrasRequirementz�
    Requirement backed by an install requirement on a base package.
    Trims extras from its install requirement if there are any.
    r4rNc��|j�Jd��t|�|_td�|jjD��|_y)Nr6c3�2K�|]}t|����y�wrr8r9s  rr<z=SpecifierWithoutExtrasRequirement.__init__.<locals>.<genexpr>ir=r>)r?rr@rArBrCrDs  rrz*SpecifierWithoutExtrasRequirement.__init__fs@���y�y� �C�"C�C� �,�T�2��
� � Q�t�z�z�?P�?P� Q�Q��r)r!r-r.�__doc__rrr1rrr_r_`s���
R�/�R�D�Rrr_c��eZdZdZdededdfd�Zdefd�Zdefd�Z	e
defd	��Ze
defd
��Z
defd�Zdefd�Zd
edefd�Zy)�RequiresPythonRequirementz4A requirement representing Requires-Python metadata.rZ�matchrNc� �||_||_yr)rZ�
_candidate)rrZres   rrz"RequiresPythonRequirement.__init__os��"�����rc� �d|j��S)NzPython )rZrs rrz!RequiresPythonRequirement.__str__ss������(�)�)rc�v�dj|jjt|j���S)Nz{class_name}({specifier!r}))rrZ)rr r!rrZrs rr"z"RequiresPythonRequirement.__repr__vs3��,�3�3��~�~�.�.��$�.�.�)�4�
�	
rc�.�|jjSr)rgr$rs rr$z&RequiresPythonRequirement.project_name|s�����+�+�+rc�.�|jjSr)rgr&rs rr&zRequiresPythonRequirement.name�s�����#�#�#rc��t|�Sr�rrs rr(z*RequiresPythonRequirement.format_for_error�����4�y�rc��|jj|jjd��r|jdfSy)NTrX�NN)rZr[rgr\rs rr*z.RequiresPythonRequirement.get_candidate_lookup�s5���>�>�"�"�4�?�?�#:�#:��"�M��?�?�D�(�(�rrc��|j|jjk(sJd��|jj|jd��S)NzNot Python candidateTrX)r&rgrZr[r\rs  rr,z)RequiresPythonRequirement.is_satisfied_by�sF���~�~����!5�!5�5�M�7M�M�5��~�~�&�&�y�'8�'8�d�&�K�Kr)r!r-r.rbrr	rrrr"r/rr$r&r(r
r*r0r,r1rrrdrdls���>� �,� �y� �T� �*��*�
�#�
��,�n�,��,��$�c�$��$��#���o��
L��L�t�Lrrdc��eZdZdZdeddfd�Zdefd�Zdefd�Ze	defd��Z
e	defd	��Zdefd
�Zde
fd�Zdedefd
�Zy)�UnsatisfiableRequirementz'A requirement that cannot be satisfied.r&rNc��||_yr��_name)rr&s  rrz!UnsatisfiableRequirement.__init__�s	����
rc� �|j�d�S)Nz (unavailable)rurs rrz UnsatisfiableRequirement.__str__�s���*�*��^�,�,rc�v�dj|jjt|j���S)Nz{class_name}({name!r}))rr&)rr r!rrvrs rr"z!UnsatisfiableRequirement.__repr__�s2��'�.�.��~�~�.�.��T�Z�Z��/�
�	
rc��|jSrrurs rr$z%UnsatisfiableRequirement.project_name�����z�z�rc��|jSrrurs rr&zUnsatisfiableRequirement.name�rzrc��t|�Srrmrs rr(z)UnsatisfiableRequirement.format_for_error�rnrc��y)Nrpr1rs rr*z-UnsatisfiableRequirement.get_candidate_lookup�s��rrc��y)NFr1rs  rr,z(UnsatisfiableRequirement.is_satisfied_by�s��r)r!r-r.rbrrrrr"r/r$r&r(r
r*r	r0r,r1rrrsrs�s���1��^����-��-�
�#�
���n������c�����#���o�����t�rrsN)� pip._vendor.packaging.specifiersr�pip._vendor.packaging.utilsrr�pip._internal.req.constructorsr�pip._internal.req.req_installr�baser	r
rrrr3r_rdrsr1rr�<module>r�s]��9�I�B�<�F�F�+�+�+�B2B�;�2B�j	R�(<�	R�%L��%L�P�{�rpython3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-312.pyc000064400000073674151732701200027256 0ustar00�

R`iHS���ddlZddlZddlmZmZmZmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZddlmZmZmZddlmZddlmZmZddlmZdd	lmZmZdd
lmZddl m!Z!ddl"m#Z#d
dl$m%Z%m&Z&m'Z'm(Z(erd
dl)m*Z*ejVe,�Z-e	dZ.e
ed�Z/de%dee.fd�Z0dededefd�Z1dededefd�Z2dededefd�Z3Gd�de%�Z4Gd�de4�Z5Gd�d e4�Z6Gd!�d"e%�Z7Gd#�d$e%�Z8Gd%�d&e%�Z9y)'�N)�
TYPE_CHECKING�Any�	FrozenSet�Iterable�Optional�Tuple�Union�cast)�NormalizedName�canonicalize_name)�Version)�	HashError�InstallationSubprocessError�MetadataInconsistent)�BaseDistribution)�Link�links_equivalent)�Wheel)�install_req_from_editable�install_req_from_line)�InstallRequirement)�direct_url_from_link)�normalize_version_info�)�	Candidate�CandidateVersion�Requirement�format_name)�Factory)�AlreadyInstalledCandidate�EditableCandidate�
LinkCandidatez<Python from Requires-Python>�	candidate�returnc�B�tttf}t||�r|Sy)z%The runtime version of BaseCandidate.N)r r!r"�
isinstance)r#�base_candidate_classess  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py�as_base_candidater))s+��	"�����
�)�3�4�����link�templatec��|jrJd��|jrt|j�}n|j}t	||j
|j|j|j|j|j|j|j��	}|j|_
||_|j|_|S)Nztemplate is editable��
user_supplied�
comes_from�
use_pep517�isolated�
constraint�global_options�hash_options�config_settings)�editable�req�str�urlrr/r0r1r2r3r4r5r6�
original_linkr+�extras)r+r,�line�ireqs    r(�make_install_req_from_linkr?5s���� � �8�"8�8� ��|�|��8�<�<� ���x�x�� ���,�,��&�&��&�&��"�"��&�&��.�.��*�*� �0�0�
�D�"�/�/�D���D�I��/�/�D�K��Kr*c�@�|jsJd��t|j|j|j|j
|j|j|j|j|j|j��
}|j|_|S)Nztemplate not editable)	r/r0r1r2r3�permit_editable_wheelsr4r5r6)
r7rr:r/r0r1r2r3rAr4r5r6r<)r+r,r>s   r(�make_install_req_from_editablerBNs������5�5�5��$�����,�,��&�&��&�&��"�"��&�&�'�>�>��.�.��*�*� �0�0��D��/�/�D�K��Kr*�distc��|jrt|j�}nM|jr&|j�d|jj��}n|j�d|j
��}t
||j|j|j|j|j|j|j|j��	}||_|S)Nz @ z==r.)r8r9r+�canonical_namer:�versionrr/r0r1r2r3r4r5r6�satisfied_by)rCr,r=r>s    r(�_make_install_req_from_distrHbs����|�|��8�<�<� ��	����%�%�&�c�(�-�-�*;�*;�)<�=���%�%�&�b�����7�� ���,�,��&�&��&�&��"�"��&�&��.�.��*�*� �0�0�
�D��D���Kr*c�J�eZdZUdZeed<dZ		ddedededd	d
e	e
de	eddfd
�Zde
fd�Zde
fd�Zdefd�Zdedefd�Zede	efd��Zede
fd��Zede
fd��Zedefd��Zde
fd�Zdefd�Zdeddfd�Zdefd�Zdedee	efd�Z de	efd�Z!y)�"_InstallRequirementBackedCandidatea�A candidate backed by an ``InstallRequirement``.

    This represents a package request with the target not being already
    in the environment, and needs to be fetched and installed. The backing
    ``InstallRequirement`` is responsible for most of the leg work; this
    class exposes appropriate information to the resolver.

    :param link: The link passed to the ``InstallRequirement``. The backing
        ``InstallRequirement`` will use this link to fetch the distribution.
    :param source_link: The link this candidate "originates" from. This is
        different from ``link`` when the link is found in the wheel cache.
        ``link`` would point to the wheel cache, while this points to the
        found remote link (e.g. from pypi.org).
    rCFNr+�source_linkr>�factoryr�namerFr$c��||_||_||_||_||_||_|j
�|_y�N)�_link�_source_link�_factory�_ireq�_name�_version�_preparerC)�selfr+rKr>rLrMrFs       r(�__init__z+_InstallRequirementBackedCandidate.__init__�s<����
�'�����
���
���
���
��M�M�O��	r*c�8�|j�d|j��S)N� �rMrF�rWs r(�__str__z*_InstallRequirementBackedCandidate.__str__�s���)�)��A�d�l�l�^�,�,r*c�v�dj|jjt|j���S)Nz{class_name}({link!r}))�
class_namer+)�format�	__class__�__name__r9rPr\s r(�__repr__z+_InstallRequirementBackedCandidate.__repr__�s2��'�.�.��~�~�.�.��T�Z�Z��/�
�	
r*c�D�t|j|jf�SrO)�hashrarPr\s r(�__hash__z+_InstallRequirementBackedCandidate.__hash__�s���T�^�^�T�Z�Z�0�1�1r*�otherc�p�t||j�r t|j|j�Sy�NF)r&rarrP�rWrgs  r(�__eq__z)_InstallRequirementBackedCandidate.__eq__�s(���e�T�^�^�,�#�D�J�J����<�<�r*c��|jSrO)rQr\s r(rKz._InstallRequirementBackedCandidate.source_link����� � � r*c�h�|j�|jj|_|jS�z:The normalised name of the project the candidate refers to)rTrCrEr\s r(�project_namez/_InstallRequirementBackedCandidate.project_name�s)���:�:�����1�1�D�J��z�z�r*c��|jSrO�rpr\s r(rMz'_InstallRequirementBackedCandidate.name�rmr*c�h�|j�|jj|_|jSrO�rUrCrFr\s r(rFz*_InstallRequirementBackedCandidate.version��'���=�=� � �I�I�-�-�D�M��}�}�r*c���dj|j|j|jjr|jj
�S|j�S)Nz{} {} (from {}))r`rMrFrP�is_file�	file_pathr\s r(�format_for_errorz3_InstallRequirementBackedCandidate.format_for_error�sP�� �'�'��I�I��L�L�$(�J�J�$6�$6�D�J�J� � �
�	
�=A�J�J�
�	
r*c��td��)NzOverride in subclass)�NotImplementedErrorr\s r(�_prepare_distributionz8_InstallRequirementBackedCandidate._prepare_distribution�s��!�"8�9�9r*c�n�|j�E|j|jk7r,t|jd|j|j��|j�X|j|j
k7r>t|jdt
|j�t
|j
���yy)z:Check for consistency of project name and version of dist.NrMrF)rTrErrSrUrFr9)rWrCs  r(�_check_metadata_consistencyz>_InstallRequirementBackedCandidate._check_metadata_consistency�s����:�:�!�d�j�j�D�4G�4G�&G�&��
�
���
�
��#�#�	�
��=�=�$����$�,�,�)F�&��
�
���D�M�M�"��D�L�L�!�	�
�*G�$r*c��	|j�}|j
|�|S#t$r}|j|_�d}~wt$r
}d|_�d}~wwxYw)NzSee above for output.)r|rrSr8r�contextr~)rWrC�e�excs    r(rVz+_InstallRequirementBackedCandidate._prepare�s_��	��-�-�/�D�	
�(�(��.�����	��J�J�A�E���*�	�1�C�K���	�s �%�	A�A�A�A�A�
with_requiresc#�*K�|r|jj�nd}|D]9}|jjt	|�|j
�Ed{����;|jj
|jj���y7�8�w�N�)rC�iter_dependenciesrR�make_requirements_from_specr9rS� make_requires_python_requirement�requires_python)rWr��requires�rs    r(r�z4_InstallRequirementBackedCandidate.iter_dependencies�sm����4A�4�9�9�.�.�0�r���A��}�}�@�@��Q�����T�T�T���m�m�<�<�T�Y�Y�=V�=V�W�W�
U�s�AB�B�9Bc��|jSrO)rSr\s r(�get_install_requirementz:_InstallRequirementBackedCandidate.get_install_requirement�s���z�z�r*�NN)"rb�
__module__�__qualname__�__doc__r�__annotations__�is_installedrrrrrrXr9r]rc�intrfr�boolrk�propertyrKrprMrFryr|r~rVrrr�r�r�r*r(rJrJzs���
����L�*.�.2�$��$��$�!�	$�
�$��~�&�
$��*�+�$�
�$�"-��-�
�#�
�2�#�2��C��D��
�!�X�d�^�!��!���n�����!�c�!��!���)����

�#�
�:�'7�:��0@��T��"�*��"X�t�X���+�AV�8W�X���2D�)E�r*rJc
�Z��eZdZdZ		ddededddeedeed	df�fd
�
Z	d	e
fd�Z�xZS)
r"FNr+r,rLrrMrFr$c�h��|}|j||�}|�,tjd|j�|j}t	||�}|j|k(sJ�|jj
r�|jjszt|jj�}	t|	j�}
||
k(s
J|�d|
�d���|�2t|	j�}||k(sJdj|||���|��|jj
sJ�|jjsJ�|jr|j|jur||_|j"�|j"|_nt'||j��|_t(�|�U||||||��y)NzUsing cached wheel link: %sz != z
 for wheelz{!r} != {!r} for wheel {})�link_is_in_wheel_cache�r+rKr>rLrMrF)�get_wheel_cache_entry�logger�debugr+r?�is_wheelrwr�filenamerrMr
rFr`�
persistentr;�cached_wheel_source_link�origin�
download_infor�superrX)
rWr+r,rLrMrFrK�cache_entryr>�wheel�
wheel_name�
wheel_versionras
            �r(rXzLinkCandidate.__init__�s�������3�3�K��F���"��L�L�6��8H�8H�I��#�#�D�)�$��9���y�y�D� � � ��9�9���d�i�i�&7�&7��$�)�)�,�,�-�E�*�5�:�:�6�J��:�%�N�$���j�^�:�'N�N�%��"� '��
�
� 6�
��-�/��1L�1S�1S��]�D�2��/��"��9�9�%�%�%�%��9�9�$�$�$�$��%�%�(�-�-�8�;Q�;Q�*Q�0;��-��!�!�-�%0�%7�%7��"�&:���8N�8N�&��"�	����#�����
	�	
r*c�h�|jj}|j|jd��S)NT)�parallel_builds)rR�preparer�prepare_linked_requirementrS)rWr�s  r(r|z#LinkCandidate._prepare_distribution.s+���=�=�)�)���2�2�4�:�:�t�2�T�Tr*r��
rbr�r��is_editablerrrrrrXrr|�
__classcell__�ras@r(r"r"�sj����K�*.�.2�
/
��/
�%�/
��	/
�
�~�&�/
��*�+�
/
�
�/
�bU�'7�Ur*r"c
�Z��eZdZdZ		ddededddeedeed	df�fd
�
Z	d	e
fd�Z�xZS)
r!TNr+r,rLrrMrFr$c�D��t�|�||t||�|||��y)Nr�)r�rXrB)rWr+r,rLrMrFras      �r(rXzEditableCandidate.__init__6s0���	�����/��h�?����
	�	
r*c�`�|jjj|j�SrO)rRr��prepare_editable_requirementrSr\s r(r|z'EditableCandidate._prepare_distributionGs!���}�}�%�%�B�B�4�:�:�N�Nr*r�r�r�s@r(r!r!3si����K�*.�.2�

��
�%�
��	
�
�~�&�
��*�+�

�
�
�"O�'7�Or*r!c���eZdZdZdZdededdddfd�Zdefd	�Z	defd
�Z
defd�Zde
defd
�Zedefd��Zedefd��Zedefd��Zedefd��Zdefd�Zdedeeefd�Zdeefd�Zy)r TNrCr,rLrr$c��||_t||�|_||_d|_d}|j
j
|j|�y)Nzalready satisfied)rCrHrSrRrUr��prepare_installed_requirement)rWrCr,rL�skip_reasons     r(rXz"AlreadyInstalledCandidate.__init__OsH����	�0��x�@��
���
���
�*�����6�6�t�z�z�;�Or*c�,�t|j�SrO)r9rCr\s r(r]z!AlreadyInstalledCandidate.__str__as���4�9�9�~�r*c�d�dj|jj|j��S)Nz{class_name}({distribution!r}))r_�distribution)r`rarbrCr\s r(rcz"AlreadyInstalledCandidate.__repr__ds.��/�6�6��~�~�.�.����7�
�	
r*c�Z�t|j|j|jf�SrO)rerarMrFr\s r(rfz"AlreadyInstalledCandidate.__hash__js ���T�^�^�T�Y�Y����=�>�>r*rgc��t||j�r4|j|jk(xr|j|jk(Syri)r&rarMrFrjs  r(rkz AlreadyInstalledCandidate.__eq__ms8���e�T�^�^�,��9�9��
�
�*�L�t�|�|�u�}�}�/L�L�r*c�.�|jjSrO)rCrEr\s r(rpz&AlreadyInstalledCandidate.project_namers���y�y�'�'�'r*c��|jSrOrrr\s r(rMzAlreadyInstalledCandidate.namevrmr*c�h�|j�|jj|_|jSrOrtr\s r(rFz!AlreadyInstalledCandidate.versionzrur*c�.�|jjSrO)rCr7r\s r(r�z%AlreadyInstalledCandidate.is_editable�s���y�y�!�!�!r*c�:�|j�d|j�d�S)NrZz (Installed)r[r\s r(ryz*AlreadyInstalledCandidate.format_for_error�s���)�)��A�d�l�l�^�<�8�8r*r�c#��K�|sy|jj�D]9}|jjt	|�|j
�Ed{����;y7��wrO)rCr�rRr�r9rS)rWr�r�s   r(r�z+AlreadyInstalledCandidate.iter_dependencies�sH���������,�,�.�A��}�}�@�@��Q�����T�T�T�/�T�s�AA�A�Ac��yrOr�r\s r(r�z1AlreadyInstalledCandidate.get_install_requirement����r*)rbr�r�r�rKrrrXr9r]rcr�rfrr�rkr�rrprMrrFr�ryrrrr�r�r�r*r(r r Ks���L��K�P��P�%�P��	P�

�P�$���
�#�
�?�#�?��C��D��
�(�n�(��(��!�c�!��!���)����
�"�T�"��"�9�#�9�U�t�U���+�AV�8W�U���2D�)E�r*r c	�d�eZdZdZdd�dedeedeeddfd�Z	defd	�Z
defd
�Zdefd�Z
dedefd
�Zedefd��Zedefd��Zedefd��Zdefd�Zedefd��Zedefd��Zedeefd��Zdeedeeddfd�Zdeefd�Zdedeeefd�Z deefd�Z!y)�ExtrasCandidatea�A candidate that has 'extras', indicating additional dependencies.

    Requirements can be for a project with dependencies, something like
    foo[extra].  The extras don't affect the project/version being installed
    directly, but indicate that we need additional dependencies. We model that
    by having an artificial ExtrasCandidate that wraps the "base" candidate.

    The ExtrasCandidate differs from the base in the following ways:

    1. It has a unique name, of the form foo[extra]. This causes the resolver
       to treat it as a separate node in the dependency graph.
    2. When we're getting the candidate's dependencies,
       a) We specify that we want the extra dependencies as well.
       b) We add a dependency on the base candidate.
          See below for why this is needed.
    3. We return None for the underlying InstallRequirement, as the base
       candidate will provide it, and we don't want to end up with duplicates.

    The dependency on the base candidate is needed so that the resolver can't
    decide that it should recommend foo[extra1] version 1.0 and foo[extra2]
    version 2.0. Having those candidates depend on foo=1.0 and foo=2.0
    respectively forces the resolver to recognise that this is a conflict.
    N)r0�baser<r0r$c���||_td�|D��|_|j|j�|_|�||_y|jj
|_y)a�
        :param comes_from: the InstallRequirement that led to this candidate if it
            differs from the base's InstallRequirement. This will often be the
            case in the sense that this candidate's requirement has the extras
            while the base's does not. Unlike the InstallRequirement backed
            candidates, this requirement is used solely for reporting purposes,
            it does not do any leg work.
        c3�2K�|]}t|����y�wrO)r)�.0r�s  r(�	<genexpr>z+ExtrasCandidate.__init__.<locals>.<genexpr>�s����E�f�� 1�!� 4�f���N)r��	frozensetr<�
difference�_unnormalized_extrasrS�_comes_from)rWr�r<r0s    r(rXzExtrasCandidate.__init__�sR����	��E�f�E�E���%+�$5�$5�d�k�k�$B��!�)3�)?�:���T�Y�Y�_�_��r*c��t|j�jdd�\}}dj|dj	|j
�|�S)NrZrz	{}[{}] {}�,)r9r��splitr`�joinr<)rWrM�rests   r(r]zExtrasCandidate.__str__�sB������^�)�)�#�q�1�
��d��!�!�$�������(=�t�D�Dr*c�z�dj|jj|j|j��S)Nz.{class_name}(base={base!r}, extras={extras!r}))r_r�r<)r`rarbr�r<r\s r(rczExtrasCandidate.__repr__�s6��?�F�F��~�~�.�.�����;�;�G�
�	
r*c�D�t|j|jf�SrO)rer�r<r\s r(rfzExtrasCandidate.__hash__�s���T�Y�Y����,�-�-r*rgc��t||j�r4|j|jk(xr|j|jk(Syri)r&rar�r<rjs  r(rkzExtrasCandidate.__eq__�s8���e�T�^�^�,��9�9��
�
�*�J�t�{�{�e�l�l�/J�J�r*c�.�|jjSrO)r�rpr\s r(rpzExtrasCandidate.project_name�����y�y�%�%�%r*c�V�t|jj|j�Sro)rr�rpr<r\s r(rMzExtrasCandidate.name�s���4�9�9�1�1�4�;�;�?�?r*c�.�|jjSrO)r�rFr\s r(rFzExtrasCandidate.version�s���y�y� � � r*c��dj|jj�djt	|j
���S)Nz{} [{}]z, )r`r�ryr��sortedr<r\s r(ryz ExtrasCandidate.format_for_error�s9������I�I�&�&�(�$�)�)�F�4�;�;�4G�*H�
�	
r*c�.�|jjSrO)r�r�r\s r(r�zExtrasCandidate.is_installed�r�r*c�.�|jjSrO)r�r�r\s r(r�zExtrasCandidate.is_editable�����y�y�$�$�$r*c�.�|jjSrO)r�rKr\s r(rKzExtrasCandidate.source_link�r�r*�	requested�validc�����t��fd�|D��}|syt|�D]8}tjd�jj
�j|��:y)z�Emit warnings for invalid extras being requested.

        This emits a warning for each requested extra that is not in the
        candidate's ``Provides-Extra`` list.
        c3�F�K�|]}|�vr|�jvr|���y�wrO)r<)r��extrarWr�s  ��r(r�z7ExtrasCandidate._warn_invalid_extras.<locals>.<genexpr>s/�����+
�"���E�!�����$�
�"�s�!Nz%%s %s does not provide the extra '%s')r�r�r��warningr�rMrF)rWr�r��invalid_extras_to_warnr�s` `  r(�_warn_invalid_extrasz$ExtrasCandidate._warn_invalid_extras�sY���"+�+
�"�+
�"
��&���2�3�E��N�N�7��	�	�������	
�4r*c����jj�j�}t�fd�|D��}�j	||�|S)aGet a list of valid extras requested by this candidate.

        The user (or upstream dependant) may have specified extras that the
        candidate doesn't support. Any unsupported extras are dropped, and each
        cause a warning to be logged here.
        c3�l�K�|]+}�jjj|�r|���-y�wrO)r�rC�is_extra_provided)r�r�rWs  �r(r�zDExtrasCandidate._calculate_valid_requested_extras.<locals>.<genexpr>s/�����!
�)���y�y�~�~�/�/��6�
�)�s�14)r<�unionr�r�r�)rW�requested_extras�valid_extrass`  r(�!_calculate_valid_requested_extrasz1ExtrasCandidate._calculate_valid_requested_extrassP��� �;�;�,�,�T�-F�-F�G�� �!
�)�!
�
��
	
�!�!�"2�L�A��r*r�c#�LK�|jj}|j|j���|sy|j�}|jjj|�D]0}|j
t|�|j|�Ed{����2y7��wrO)	r�rR�make_requirement_from_candidater�rCr�r�r9r�)rWr�rLr�r�s     r(r�z!ExtrasCandidate.iter_dependencies"s������)�)�$�$���5�5�d�i�i�@�@����=�=�?�������1�1�,�?�A��:�:��A��� � ���
�
�@�
�s�BB$�B"�B$c��yrOr�r\s r(r�z'ExtrasCandidate.get_install_requirement3s��r*)"rbr�r�r��
BaseCandidaterr9rrrXr]rcr�rfrr�rkr�rrprMrrFryr�r�rrKr�r�rrr�r�r�r*r(r�r��s����:48�U��U��#��U�
�/�0�U�
�
U�6E��E�
�#�
�.�#�.��C��D��
�&�n�&��&��@�c�@��@��!�)�!��!�
�#�
�
�&�d�&��&��%�T�%��%��%�X�d�^�%��%���S�>����~��
�	�8�9�S�>�� �t����+�AV�8W��"��2D�)E�r*r�c��eZdZdZdZdeeedfddfd�Zde	fd�Z
edefd��Z
ede	fd	��Zedefd
��Zde	fd�Zdedeeefd
�Zdeefd�Zy)�RequiresPythonCandidateFN�py_version_info.r$c��|�t|�}ntjdd}tdj	d�|D���|_y)N��.c3�2K�|]}t|����y�wrO)r9)r��cs  r(r�z3RequiresPythonCandidate.__init__.<locals>.<genexpr>Cs����(F��A��Q���r�)r�sys�version_infor
r�rU)rWr�rs   r(rXz RequiresPythonCandidate.__init__>s?���&�1�/�B�L��+�+�B�Q�/�L�����(F��(F� F�G��
r*c� �d|j��S�NzPython �rUr\s r(r]zRequiresPythonCandidate.__str__Is�������(�(r*c��tSrO��REQUIRES_PYTHON_IDENTIFIERr\s r(rpz$RequiresPythonCandidate.project_nameL���)�)r*c��tSrOrr\s r(rMzRequiresPythonCandidate.namePrr*c��|jSrOrr\s r(rFzRequiresPythonCandidate.versionTs���}�}�r*c� �d|j��Sr)rFr\s r(ryz(RequiresPythonCandidate.format_for_errorXs�������'�'r*r�c��yr�r�)rWr�s  r(r�z)RequiresPythonCandidate.iter_dependencies[s��r*c��yrOr�r\s r(r�z/RequiresPythonCandidate.get_install_requirement^r�r*)rbr�r�r�rKrrr�rXr9r]r�rrprMrrFryr�rrr�rr�r�r*r(r�r�:s����L��K�H���s�C�x��(A�H�d�H�)��)��*�n�*��*��*�c�*��*���)����(�#�(��t����+�AV�8W����2D�)E�r*r�):�loggingr�typingrrrrrrr	r
�pip._vendor.packaging.utilsrr�pip._vendor.packaging.versionr
�pip._internal.exceptionsrrr�pip._internal.metadatar�pip._internal.models.linkrr�pip._internal.models.wheelr�pip._internal.req.constructorsrr�pip._internal.req.req_installr�&pip._internal.utils.direct_url_helpersr�pip._internal.utils.miscrr�rrrrrLr�	getLoggerrbr�r�rr)r?rBrHrJr"r!r r�r�r�r*r(�<module>rsC���
�X�X�X�I�1���
4�<�,��=�G�;�G�G�� �	��	�	�8�	$�����
�"�.�2Q�R��	��	�x�
�/F�	��
��,����2�
��,����(�
��&8����0}��}�@6U�6�6U�rO�:�O�0C�	�C�Lf�i�f�R%�i�%r*python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-312.pyc000064400000030111151732701210026774 0ustar00�

R`i01����ddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
ddlmZmZddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlm Z dd
l!m"Z"m#Z#ddl$m%Z%ddl&m'Z'm(Z(ddl)m*Z*ddl+m,Z,m-Z-ddl.m/Z/erddl0m1Z2e2e-e,e3fZ1ejhe5�Z6Gd�de"�Zddde	e3deee3e7ffd�Z8de
e3efdeee3e7fde
e7e3ffd�Z9y)�N)�
TYPE_CHECKING�Dict�List�Optional�Set�Tuple�cast��canonicalize_name)�BaseReporter�ResolutionImpossible)�Resolver)�
DirectedGraph)�
WheelCache)�
PackageFinder)�RequirementPreparer)�install_req_extend_extras)�InstallRequirement)�RequirementSet)�BaseResolver�InstallRequirementProvider)�PipProvider)�PipDebuggingReporter�PipReporter)�get_requirement�)�	Candidate�Requirement)�Factory)�Resultc���eZdZhd�Z	ddededeedede	de	de	d	e	d
e	de
deeed
ff�fd�
Z
deede	defd�Zdedeefd�Z�xZS)r>�only-if-needed�to-satisfy-only�eager�preparer�finder�wheel_cache�make_install_req�
use_user_site�ignore_dependencies�ignore_installed�ignore_requires_python�force_reinstall�upgrade_strategy�py_version_info.c���t�|��|
|jvsJ�t||||||	|||��	|_||_|
|_d|_y)N)	r&r%r(r'r)r-r+r,r/)�super�__init__�_allowed_strategiesr�factoryr*r.�_result)
�selfr%r&r'r(r)r*r+r,r-r.r/�	__class__s
            ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.pyr2zResolver.__init__)sd���	�����4�#;�#;�;�;�;����-�#�'�+�-�#9�+�

���$7�� � 0���)-����	root_reqs�check_supported_wheels�returnc
��|jj|�}t|j|j|j|j
|j��}dtjvrt�}n
t�}t||�}	d}|j|j|��x}|_t%|��}t'|j(j+�d���D�]}|j-�}
|
��|j.|j0k7rut3j4t6�5|j9|j0�}|j;t=|t9|j.�j>��ddd���|jjA|�}|�d	|
_!n�|jjDrd
|
_!n�|jF|jFk7rd
|
_!n�|jHs|jJrd
|
_!nd|jLrV|jLjNr@|jLjPr"tRjUd|
j.����d
|
_!n���|jL}|rX|jVrLdjY|j.|jF||jZxsd
��}tRj]|�|j;|
���|j^}|jj`jc|�|D]}d
|_2d	|_3�|S#t$r8}	|jj!t#d|	�|j�}
|
|	�d}	~	wwxYw#1swY���xYw)N)r4�constraintsr*r.�user_requested�PIP_RESOLVER_DEBUGi@
)�
max_roundsz,ResolutionImpossible[Requirement, Candidate])r;c�4�|j|jk7S�N)�name�project_name)�cs r8�<lambda>z"Resolver.resolve.<locals>.<lambda>ps��1�6�6�Q�^�^�3Kr9)�keyFTz�%s is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.z�The candidate selected for download or install is a yanked version: {name!r} candidate (version {version} at {link})
Reason for being yanked: {reason}z<none given>)rD�version�link�reason)4r4�collect_root_requirementsrr>r*r.r?�os�environrr�
RLResolver�resolve�requirementsr5r
�get_installation_errorr	r�sorted�mapping�values�get_install_requirementrDrE�
contextlib�suppress�KeyErrorr�add_named_requirementr�extras�get_dist_to_uninstall�should_reinstallr-rI�is_editable�editable�source_link�is_file�is_wheel�logger�info�	is_yanked�format�
yanked_reason�warning�all_requirementsr%� prepare_linked_requirements_more�prepared�needs_more_preparation)r6r:r;�	collected�provider�reporter�resolver�#limit_how_complex_resolution_can_be�result�e�error�req_set�	candidate�ireq�req�installed_distrJ�msg�reqss                   r8rPzResolver.resolveIs(���L�L�:�:�9�E�	���L�L�!�-�-� $� 8� 8�!�2�2�$�3�3�
�� �2�:�:�-�%9�%;�H�"�}�H�<F���=
��
	�28�/�$,�$4�$4��&�&�3V�%5�%�
�F�T�\�!�8N�O��
 ��N�N�!�!�#�)K�
�
�I��4�4�6�D��|��>�>�Y�%;�%;�;�#�,�,�X�6�%�5�5�i�6L�6L�M���5�5�5� #�_�Y�^�^�%D�%K�%K���7��"�\�\�?�?�	�J�N��%�(-��%����-�-�(,��%��'�'�9�+<�+<�<�(,��%��&�&�.�*A�*A�)-��%��&�&�9�+@�+@�+H�+H��(�(�1�1��K�K�5��	�	�	��)-��%���(�(�D�����D��&�"���%�-�-���-�-�?��	��	����s�#��)�)�$�/�C
�F�'�'�������>�>�t�D��C��C�L�).�C�&�����i$�	��L�L�7�7��C�Q�G��%�%��E��Q���	��&7�6�s%�&L9�2AM=�9	M:�3M5�5M:�=N	ruc�~�|j�Jd��|jsgS|jj}t|t	|jj���}t
|jj�tjt|��d��}|D��cgc]\}}|��	c}}Scc}}w)aZGet order for installation of requirements in RequirementSet.

        The returned list contains a requirement before another that depends on
        it. This helps ensure that the environment is kept consistent as they
        get installed one-by-one.

        The current implementation creates a topological ordering of the
        dependency graph, giving more weight to packages with less
        or no dependencies, while breaking any cycles in the graph at
        arbitrary points. We make no guarantees about where the cycle
        would be broken, other than it *would* be broken.
        zmust call resolve() first)�weightsT)rH�reverse)r5rQ�graph�get_topological_weights�set�keysrS�items�	functools�partial�_req_set_item_sorter)r6rurr}�sorted_items�_rws       r8�get_installation_orderzResolver.get_installation_order�s����|�|�'�D�)D�D�'��#�#��I����"�"��)�%��W�5I�5I�5N�5N�5P�1Q�R���� � �&�&�(��!�!�"6��H��
��
%1�1�L���D��L�1�1��1s�)B9rC)�__name__�
__module__�__qualname__r3rrrrr�bool�strr�intr2rrrrPr��
__classcell__)r7s@r8rr&s����H��6:�.�%�.��.��j�)�	.�
5�.��
.�"�.��.�!%�.��.��.�"�%��S��/�2�.�@n��0�1�n�KO�n�	�n�`2�%�2�	
� �	!�2r9rrzDirectedGraph[Optional[str]]�requirement_keysr<c�����	�
�t��i�
dttddf����	�
fd��		t�}�D]-}|���j|�D]}�|j	|��/|sn8t��dz
}|D]}|�vr�|�
|<�|D]}�j
|���w�	d�t�
j��j��}|rJ|���
S)a�Assign weights to each node based on how "deep" they are.

    This implementation may change at any point in the future without prior
    notice.

    We first simplify the dependency graph by pruning any leaves and giving them
    the highest weight: a package without any dependencies should be installed
    first. This is done again and again in the same way, giving ever less weight
    to the newly found leaves. The loop stops when no leaves are left: all
    remaining packages have at least one dependency left in the graph.

    Then we continue with the remaining graph, by taking the length for the
    longest path to any node from root, ignoring any paths that contain a single
    node twice (i.e. cycles). This is done through a depth-first search through
    the graph, while keeping track of the path to the node.

    Cycles in the graph result would result in node being revisited while also
    being on its own path. In this case, take no action. This helps ensure we
    don't get stuck in a cycle.

    When assigning weight, the longer path (i.e. larger length) is preferred.

    We are only interested in the weights of packages that are in the
    requirement_keys.
    �noder<Nc����|�vry�j|��j|�D]
}�|���j|�|�vry�j|d�}t	|t����|<y)Nr)�add�
iter_children�remove�get�max�len)r��child�last_known_parent_countr�pathr��visitr}s   �����r8r�z&get_topological_weights.<locals>.visit�st����4�<��	
������(�(��.�E��%�L�/����D���'�'��")�+�+�d�A�"6���3�S��Y�?���
r9r)	r�rr�r�r�r�r�r��
difference)rr��leavesrH�_child�weight�leafr�r�r�r}s``      @@@r8r�r��s����8 #�u�D�(*�G�@�H�S�M�@�d�@�@�,�����C��{���-�-�c�2���3�
�
�
�3������U��a����D��+�+��"�G�D�M��
�D��L�L����+�4
�$�K��W�\�\�^�$�/�/�0@�A�J��%�:�%�>��Nr9�itemr}c�,�t|d�}|||fS)a)Key function used to sort install requirements for installation.

    Based on the "weight" mapping calculated in ``get_installation_order()``.
    The canonical package name is returned as the second member as a tie-
    breaker to ensure the result is predictable, which is useful in tests.
    rr
)r�r}rDs   r8r�r�2s!���T�!�W�%�D��4�=�$��r9):rWr��loggingrM�typingrrrrrrr	�pip._vendor.packaging.utilsr�pip._vendor.resolvelibrr
rrO�pip._vendor.resolvelib.structsr�pip._internal.cacher�"pip._internal.index.package_finderr� pip._internal.operations.preparer�pip._internal.req.constructorsr�pip._internal.req.req_installr�pip._internal.req.req_setr�pip._internal.resolution.baserr�,pip._internal.resolution.resolvelib.providerr�,pip._internal.resolution.resolvelib.reporterrr�pip._internal.utils.packagingr�baserrr4r� pip._vendor.resolvelib.resolversr �RLResultr��	getLoggerr�rcr�r�r��r9r8�<module>r�s������	�H�H�H�9�E�9�8�*�<�@�D�<�4�R�D��:�(���C�
�k�9�c�1�
2�F�
��	�	�8�	$��p2�|�p2�fV�)�V�=@��X�V�	�(�3�-��
��V�r�
��'�'�
(��
�(�3�-��$�
%���3��8�_�r9python3.12/site-packages/pip/_internal/resolution/resolvelib/base.py000064400000012065151732701210021514 0ustar00from typing import FrozenSet, Iterable, Optional, Tuple, Union

from pip._vendor.packaging.specifiers import SpecifierSet
from pip._vendor.packaging.utils import NormalizedName
from pip._vendor.packaging.version import LegacyVersion, Version

from pip._internal.models.link import Link, links_equivalent
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils.hashes import Hashes

CandidateLookup = Tuple[Optional["Candidate"], Optional[InstallRequirement]]
CandidateVersion = Union[LegacyVersion, Version]


def format_name(project: NormalizedName, extras: FrozenSet[NormalizedName]) -> str:
    if not extras:
        return project
    extras_expr = ",".join(sorted(extras))
    return f"{project}[{extras_expr}]"


class Constraint:
    def __init__(
        self, specifier: SpecifierSet, hashes: Hashes, links: FrozenSet[Link]
    ) -> None:
        self.specifier = specifier
        self.hashes = hashes
        self.links = links

    @classmethod
    def empty(cls) -> "Constraint":
        return Constraint(SpecifierSet(), Hashes(), frozenset())

    @classmethod
    def from_ireq(cls, ireq: InstallRequirement) -> "Constraint":
        links = frozenset([ireq.link]) if ireq.link else frozenset()
        return Constraint(ireq.specifier, ireq.hashes(trust_internet=False), links)

    def __bool__(self) -> bool:
        return bool(self.specifier) or bool(self.hashes) or bool(self.links)

    def __and__(self, other: InstallRequirement) -> "Constraint":
        if not isinstance(other, InstallRequirement):
            return NotImplemented
        specifier = self.specifier & other.specifier
        hashes = self.hashes & other.hashes(trust_internet=False)
        links = self.links
        if other.link:
            links = links.union([other.link])
        return Constraint(specifier, hashes, links)

    def is_satisfied_by(self, candidate: "Candidate") -> bool:
        # Reject if there are any mismatched URL constraints on this package.
        if self.links and not all(_match_link(link, candidate) for link in self.links):
            return False
        # We can safely always allow prereleases here since PackageFinder
        # already implements the prerelease logic, and would have filtered out
        # prerelease candidates if the user does not expect them.
        return self.specifier.contains(candidate.version, prereleases=True)


class Requirement:
    @property
    def project_name(self) -> NormalizedName:
        """The "project name" of a requirement.

        This is different from ``name`` if this requirement contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        """
        raise NotImplementedError("Subclass should override")

    @property
    def name(self) -> str:
        """The name identifying this requirement in the resolver.

        This is different from ``project_name`` if this requirement contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        """
        raise NotImplementedError("Subclass should override")

    def is_satisfied_by(self, candidate: "Candidate") -> bool:
        return False

    def get_candidate_lookup(self) -> CandidateLookup:
        raise NotImplementedError("Subclass should override")

    def format_for_error(self) -> str:
        raise NotImplementedError("Subclass should override")


def _match_link(link: Link, candidate: "Candidate") -> bool:
    if candidate.source_link:
        return links_equivalent(link, candidate.source_link)
    return False


class Candidate:
    @property
    def project_name(self) -> NormalizedName:
        """The "project name" of the candidate.

        This is different from ``name`` if this candidate contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        """
        raise NotImplementedError("Override in subclass")

    @property
    def name(self) -> str:
        """The name identifying this candidate in the resolver.

        This is different from ``project_name`` if this candidate contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        """
        raise NotImplementedError("Override in subclass")

    @property
    def version(self) -> CandidateVersion:
        raise NotImplementedError("Override in subclass")

    @property
    def is_installed(self) -> bool:
        raise NotImplementedError("Override in subclass")

    @property
    def is_editable(self) -> bool:
        raise NotImplementedError("Override in subclass")

    @property
    def source_link(self) -> Optional[Link]:
        raise NotImplementedError("Override in subclass")

    def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]:
        raise NotImplementedError("Override in subclass")

    def get_install_requirement(self) -> Optional[InstallRequirement]:
        raise NotImplementedError("Override in subclass")

    def format_for_error(self) -> str:
        raise NotImplementedError("Subclass should override")
python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py000064400000030460151732701210022442 0ustar00import contextlib
import functools
import logging
import os
from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, cast

from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.resolvelib import BaseReporter, ResolutionImpossible
from pip._vendor.resolvelib import Resolver as RLResolver
from pip._vendor.resolvelib.structs import DirectedGraph

from pip._internal.cache import WheelCache
from pip._internal.index.package_finder import PackageFinder
from pip._internal.operations.prepare import RequirementPreparer
from pip._internal.req.constructors import install_req_extend_extras
from pip._internal.req.req_install import InstallRequirement
from pip._internal.req.req_set import RequirementSet
from pip._internal.resolution.base import BaseResolver, InstallRequirementProvider
from pip._internal.resolution.resolvelib.provider import PipProvider
from pip._internal.resolution.resolvelib.reporter import (
    PipDebuggingReporter,
    PipReporter,
)
from pip._internal.utils.packaging import get_requirement

from .base import Candidate, Requirement
from .factory import Factory

if TYPE_CHECKING:
    from pip._vendor.resolvelib.resolvers import Result as RLResult

    Result = RLResult[Requirement, Candidate, str]


logger = logging.getLogger(__name__)


class Resolver(BaseResolver):
    _allowed_strategies = {"eager", "only-if-needed", "to-satisfy-only"}

    def __init__(
        self,
        preparer: RequirementPreparer,
        finder: PackageFinder,
        wheel_cache: Optional[WheelCache],
        make_install_req: InstallRequirementProvider,
        use_user_site: bool,
        ignore_dependencies: bool,
        ignore_installed: bool,
        ignore_requires_python: bool,
        force_reinstall: bool,
        upgrade_strategy: str,
        py_version_info: Optional[Tuple[int, ...]] = None,
    ):
        super().__init__()
        assert upgrade_strategy in self._allowed_strategies

        self.factory = Factory(
            finder=finder,
            preparer=preparer,
            make_install_req=make_install_req,
            wheel_cache=wheel_cache,
            use_user_site=use_user_site,
            force_reinstall=force_reinstall,
            ignore_installed=ignore_installed,
            ignore_requires_python=ignore_requires_python,
            py_version_info=py_version_info,
        )
        self.ignore_dependencies = ignore_dependencies
        self.upgrade_strategy = upgrade_strategy
        self._result: Optional[Result] = None

    def resolve(
        self, root_reqs: List[InstallRequirement], check_supported_wheels: bool
    ) -> RequirementSet:
        collected = self.factory.collect_root_requirements(root_reqs)
        provider = PipProvider(
            factory=self.factory,
            constraints=collected.constraints,
            ignore_dependencies=self.ignore_dependencies,
            upgrade_strategy=self.upgrade_strategy,
            user_requested=collected.user_requested,
        )
        if "PIP_RESOLVER_DEBUG" in os.environ:
            reporter: BaseReporter = PipDebuggingReporter()
        else:
            reporter = PipReporter()
        resolver: RLResolver[Requirement, Candidate, str] = RLResolver(
            provider,
            reporter,
        )

        try:
            limit_how_complex_resolution_can_be = 200000
            result = self._result = resolver.resolve(
                collected.requirements, max_rounds=limit_how_complex_resolution_can_be
            )

        except ResolutionImpossible as e:
            error = self.factory.get_installation_error(
                cast("ResolutionImpossible[Requirement, Candidate]", e),
                collected.constraints,
            )
            raise error from e

        req_set = RequirementSet(check_supported_wheels=check_supported_wheels)
        # process candidates with extras last to ensure their base equivalent is
        # already in the req_set if appropriate.
        # Python's sort is stable so using a binary key function keeps relative order
        # within both subsets.
        for candidate in sorted(
            result.mapping.values(), key=lambda c: c.name != c.project_name
        ):
            ireq = candidate.get_install_requirement()
            if ireq is None:
                if candidate.name != candidate.project_name:
                    # extend existing req's extras
                    with contextlib.suppress(KeyError):
                        req = req_set.get_requirement(candidate.project_name)
                        req_set.add_named_requirement(
                            install_req_extend_extras(
                                req, get_requirement(candidate.name).extras
                            )
                        )
                continue

            # Check if there is already an installation under the same name,
            # and set a flag for later stages to uninstall it, if needed.
            installed_dist = self.factory.get_dist_to_uninstall(candidate)
            if installed_dist is None:
                # There is no existing installation -- nothing to uninstall.
                ireq.should_reinstall = False
            elif self.factory.force_reinstall:
                # The --force-reinstall flag is set -- reinstall.
                ireq.should_reinstall = True
            elif installed_dist.version != candidate.version:
                # The installation is different in version -- reinstall.
                ireq.should_reinstall = True
            elif candidate.is_editable or installed_dist.editable:
                # The incoming distribution is editable, or different in
                # editable-ness to installation -- reinstall.
                ireq.should_reinstall = True
            elif candidate.source_link and candidate.source_link.is_file:
                # The incoming distribution is under file://
                if candidate.source_link.is_wheel:
                    # is a local wheel -- do nothing.
                    logger.info(
                        "%s is already installed with the same version as the "
                        "provided wheel. Use --force-reinstall to force an "
                        "installation of the wheel.",
                        ireq.name,
                    )
                    continue

                # is a local sdist or path -- reinstall
                ireq.should_reinstall = True
            else:
                continue

            link = candidate.source_link
            if link and link.is_yanked:
                # The reason can contain non-ASCII characters, Unicode
                # is required for Python 2.
                msg = (
                    "The candidate selected for download or install is a "
                    "yanked version: {name!r} candidate (version {version} "
                    "at {link})\nReason for being yanked: {reason}"
                ).format(
                    name=candidate.name,
                    version=candidate.version,
                    link=link,
                    reason=link.yanked_reason or "<none given>",
                )
                logger.warning(msg)

            req_set.add_named_requirement(ireq)

        reqs = req_set.all_requirements
        self.factory.preparer.prepare_linked_requirements_more(reqs)
        for req in reqs:
            req.prepared = True
            req.needs_more_preparation = False
        return req_set

    def get_installation_order(
        self, req_set: RequirementSet
    ) -> List[InstallRequirement]:
        """Get order for installation of requirements in RequirementSet.

        The returned list contains a requirement before another that depends on
        it. This helps ensure that the environment is kept consistent as they
        get installed one-by-one.

        The current implementation creates a topological ordering of the
        dependency graph, giving more weight to packages with less
        or no dependencies, while breaking any cycles in the graph at
        arbitrary points. We make no guarantees about where the cycle
        would be broken, other than it *would* be broken.
        """
        assert self._result is not None, "must call resolve() first"

        if not req_set.requirements:
            # Nothing is left to install, so we do not need an order.
            return []

        graph = self._result.graph
        weights = get_topological_weights(graph, set(req_set.requirements.keys()))

        sorted_items = sorted(
            req_set.requirements.items(),
            key=functools.partial(_req_set_item_sorter, weights=weights),
            reverse=True,
        )
        return [ireq for _, ireq in sorted_items]


def get_topological_weights(
    graph: "DirectedGraph[Optional[str]]", requirement_keys: Set[str]
) -> Dict[Optional[str], int]:
    """Assign weights to each node based on how "deep" they are.

    This implementation may change at any point in the future without prior
    notice.

    We first simplify the dependency graph by pruning any leaves and giving them
    the highest weight: a package without any dependencies should be installed
    first. This is done again and again in the same way, giving ever less weight
    to the newly found leaves. The loop stops when no leaves are left: all
    remaining packages have at least one dependency left in the graph.

    Then we continue with the remaining graph, by taking the length for the
    longest path to any node from root, ignoring any paths that contain a single
    node twice (i.e. cycles). This is done through a depth-first search through
    the graph, while keeping track of the path to the node.

    Cycles in the graph result would result in node being revisited while also
    being on its own path. In this case, take no action. This helps ensure we
    don't get stuck in a cycle.

    When assigning weight, the longer path (i.e. larger length) is preferred.

    We are only interested in the weights of packages that are in the
    requirement_keys.
    """
    path: Set[Optional[str]] = set()
    weights: Dict[Optional[str], int] = {}

    def visit(node: Optional[str]) -> None:
        if node in path:
            # We hit a cycle, so we'll break it here.
            return

        # Time to visit the children!
        path.add(node)
        for child in graph.iter_children(node):
            visit(child)
        path.remove(node)

        if node not in requirement_keys:
            return

        last_known_parent_count = weights.get(node, 0)
        weights[node] = max(last_known_parent_count, len(path))

    # Simplify the graph, pruning leaves that have no dependencies.
    # This is needed for large graphs (say over 200 packages) because the
    # `visit` function is exponentially slower then, taking minutes.
    # See https://github.com/pypa/pip/issues/10557
    # We will loop until we explicitly break the loop.
    while True:
        leaves = set()
        for key in graph:
            if key is None:
                continue
            for _child in graph.iter_children(key):
                # This means we have at least one child
                break
            else:
                # No child.
                leaves.add(key)
        if not leaves:
            # We are done simplifying.
            break
        # Calculate the weight for the leaves.
        weight = len(graph) - 1
        for leaf in leaves:
            if leaf not in requirement_keys:
                continue
            weights[leaf] = weight
        # Remove the leaves from the graph, making it simpler.
        for leaf in leaves:
            graph.remove(leaf)

    # Visit the remaining graph.
    # `None` is guaranteed to be the root node by resolvelib.
    visit(None)

    # Sanity check: all requirement keys should be in the weights,
    # and no other keys should be in the weights.
    difference = set(weights.keys()).difference(requirement_keys)
    assert not difference, difference

    return weights


def _req_set_item_sorter(
    item: Tuple[str, InstallRequirement],
    weights: Dict[Optional[str], int],
) -> Tuple[int, str]:
    """Key function used to sort install requirements for installation.

    Based on the "weight" mapping calculated in ``get_installation_order()``.
    The canonical package name is returned as the second member as a tie-
    breaker to ensure the result is predictable, which is useful in tests.
    """
    name = canonicalize_name(item[0])
    return weights[name], name
python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py000064400000000000151732701210022323 0ustar00python3.12/site-packages/pip/_internal/resolution/resolvelib/provider.py000064400000023140151732701210022430 0ustar00import collections
import math
from typing import (
    TYPE_CHECKING,
    Dict,
    Iterable,
    Iterator,
    Mapping,
    Sequence,
    TypeVar,
    Union,
)

from pip._vendor.resolvelib.providers import AbstractProvider

from .base import Candidate, Constraint, Requirement
from .candidates import REQUIRES_PYTHON_IDENTIFIER
from .factory import Factory

if TYPE_CHECKING:
    from pip._vendor.resolvelib.providers import Preference
    from pip._vendor.resolvelib.resolvers import RequirementInformation

    PreferenceInformation = RequirementInformation[Requirement, Candidate]

    _ProviderBase = AbstractProvider[Requirement, Candidate, str]
else:
    _ProviderBase = AbstractProvider

# Notes on the relationship between the provider, the factory, and the
# candidate and requirement classes.
#
# The provider is a direct implementation of the resolvelib class. Its role
# is to deliver the API that resolvelib expects.
#
# Rather than work with completely abstract "requirement" and "candidate"
# concepts as resolvelib does, pip has concrete classes implementing these two
# ideas. The API of Requirement and Candidate objects are defined in the base
# classes, but essentially map fairly directly to the equivalent provider
# methods. In particular, `find_matches` and `is_satisfied_by` are
# requirement methods, and `get_dependencies` is a candidate method.
#
# The factory is the interface to pip's internal mechanisms. It is stateless,
# and is created by the resolver and held as a property of the provider. It is
# responsible for creating Requirement and Candidate objects, and provides
# services to those objects (access to pip's finder and preparer).


D = TypeVar("D")
V = TypeVar("V")


def _get_with_identifier(
    mapping: Mapping[str, V],
    identifier: str,
    default: D,
) -> Union[D, V]:
    """Get item from a package name lookup mapping with a resolver identifier.

    This extra logic is needed when the target mapping is keyed by package
    name, which cannot be directly looked up with an identifier (which may
    contain requested extras). Additional logic is added to also look up a value
    by "cleaning up" the extras from the identifier.
    """
    if identifier in mapping:
        return mapping[identifier]
    # HACK: Theoretically we should check whether this identifier is a valid
    # "NAME[EXTRAS]" format, and parse out the name part with packaging or
    # some regular expression. But since pip's resolver only spits out three
    # kinds of identifiers: normalized PEP 503 names, normalized names plus
    # extras, and Requires-Python, we can cheat a bit here.
    name, open_bracket, _ = identifier.partition("[")
    if open_bracket and name in mapping:
        return mapping[name]
    return default


class PipProvider(_ProviderBase):
    """Pip's provider implementation for resolvelib.

    :params constraints: A mapping of constraints specified by the user. Keys
        are canonicalized project names.
    :params ignore_dependencies: Whether the user specified ``--no-deps``.
    :params upgrade_strategy: The user-specified upgrade strategy.
    :params user_requested: A set of canonicalized package names that the user
        supplied for pip to install/upgrade.
    """

    def __init__(
        self,
        factory: Factory,
        constraints: Dict[str, Constraint],
        ignore_dependencies: bool,
        upgrade_strategy: str,
        user_requested: Dict[str, int],
    ) -> None:
        self._factory = factory
        self._constraints = constraints
        self._ignore_dependencies = ignore_dependencies
        self._upgrade_strategy = upgrade_strategy
        self._user_requested = user_requested
        self._known_depths: Dict[str, float] = collections.defaultdict(lambda: math.inf)

    def identify(self, requirement_or_candidate: Union[Requirement, Candidate]) -> str:
        return requirement_or_candidate.name

    def get_preference(
        self,
        identifier: str,
        resolutions: Mapping[str, Candidate],
        candidates: Mapping[str, Iterator[Candidate]],
        information: Mapping[str, Iterable["PreferenceInformation"]],
        backtrack_causes: Sequence["PreferenceInformation"],
    ) -> "Preference":
        """Produce a sort key for given requirement based on preference.

        The lower the return value is, the more preferred this group of
        arguments is.

        Currently pip considers the following in order:

        * Prefer if any of the known requirements is "direct", e.g. points to an
          explicit URL.
        * If equal, prefer if any requirement is "pinned", i.e. contains
          operator ``===`` or ``==``.
        * If equal, calculate an approximate "depth" and resolve requirements
          closer to the user-specified requirements first. If the depth cannot
          by determined (eg: due to no matching parents), it is considered
          infinite.
        * Order user-specified requirements by the order they are specified.
        * If equal, prefers "non-free" requirements, i.e. contains at least one
          operator, such as ``>=`` or ``<``.
        * If equal, order alphabetically for consistency (helps debuggability).
        """
        try:
            next(iter(information[identifier]))
        except StopIteration:
            # There is no information for this identifier, so there's no known
            # candidates.
            has_information = False
        else:
            has_information = True

        if has_information:
            lookups = (r.get_candidate_lookup() for r, _ in information[identifier])
            candidate, ireqs = zip(*lookups)
        else:
            candidate, ireqs = None, ()

        operators = [
            specifier.operator
            for specifier_set in (ireq.specifier for ireq in ireqs if ireq)
            for specifier in specifier_set
        ]

        direct = candidate is not None
        pinned = any(op[:2] == "==" for op in operators)
        unfree = bool(operators)

        try:
            requested_order: Union[int, float] = self._user_requested[identifier]
        except KeyError:
            requested_order = math.inf
            if has_information:
                parent_depths = (
                    self._known_depths[parent.name] if parent is not None else 0.0
                    for _, parent in information[identifier]
                )
                inferred_depth = min(d for d in parent_depths) + 1.0
            else:
                inferred_depth = math.inf
        else:
            inferred_depth = 1.0
        self._known_depths[identifier] = inferred_depth

        requested_order = self._user_requested.get(identifier, math.inf)

        # Requires-Python has only one candidate and the check is basically
        # free, so we always do it first to avoid needless work if it fails.
        requires_python = identifier == REQUIRES_PYTHON_IDENTIFIER

        # Prefer the causes of backtracking on the assumption that the problem
        # resolving the dependency tree is related to the failures that caused
        # the backtracking
        backtrack_cause = self.is_backtrack_cause(identifier, backtrack_causes)

        return (
            not requires_python,
            not direct,
            not pinned,
            not backtrack_cause,
            inferred_depth,
            requested_order,
            not unfree,
            identifier,
        )

    def find_matches(
        self,
        identifier: str,
        requirements: Mapping[str, Iterator[Requirement]],
        incompatibilities: Mapping[str, Iterator[Candidate]],
    ) -> Iterable[Candidate]:
        def _eligible_for_upgrade(identifier: str) -> bool:
            """Are upgrades allowed for this project?

            This checks the upgrade strategy, and whether the project was one
            that the user specified in the command line, in order to decide
            whether we should upgrade if there's a newer version available.

            (Note that we don't need access to the `--upgrade` flag, because
            an upgrade strategy of "to-satisfy-only" means that `--upgrade`
            was not specified).
            """
            if self._upgrade_strategy == "eager":
                return True
            elif self._upgrade_strategy == "only-if-needed":
                user_order = _get_with_identifier(
                    self._user_requested,
                    identifier,
                    default=None,
                )
                return user_order is not None
            return False

        constraint = _get_with_identifier(
            self._constraints,
            identifier,
            default=Constraint.empty(),
        )
        return self._factory.find_candidates(
            identifier=identifier,
            requirements=requirements,
            constraint=constraint,
            prefers_installed=(not _eligible_for_upgrade(identifier)),
            incompatibilities=incompatibilities,
        )

    def is_satisfied_by(self, requirement: Requirement, candidate: Candidate) -> bool:
        return requirement.is_satisfied_by(candidate)

    def get_dependencies(self, candidate: Candidate) -> Sequence[Requirement]:
        with_requires = not self._ignore_dependencies
        return [r for r in candidate.iter_dependencies(with_requires) if r is not None]

    @staticmethod
    def is_backtrack_cause(
        identifier: str, backtrack_causes: Sequence["PreferenceInformation"]
    ) -> bool:
        for backtrack_cause in backtrack_causes:
            if identifier == backtrack_cause.requirement.name:
                return True
            if backtrack_cause.parent and identifier == backtrack_cause.parent.name:
                return True
        return False
python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py000064400000051510151732701210022677 0ustar00import logging
import sys
from typing import TYPE_CHECKING, Any, FrozenSet, Iterable, Optional, Tuple, Union, cast

from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from pip._vendor.packaging.version import Version

from pip._internal.exceptions import (
    HashError,
    InstallationSubprocessError,
    MetadataInconsistent,
)
from pip._internal.metadata import BaseDistribution
from pip._internal.models.link import Link, links_equivalent
from pip._internal.models.wheel import Wheel
from pip._internal.req.constructors import (
    install_req_from_editable,
    install_req_from_line,
)
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils.direct_url_helpers import direct_url_from_link
from pip._internal.utils.misc import normalize_version_info

from .base import Candidate, CandidateVersion, Requirement, format_name

if TYPE_CHECKING:
    from .factory import Factory

logger = logging.getLogger(__name__)

BaseCandidate = Union[
    "AlreadyInstalledCandidate",
    "EditableCandidate",
    "LinkCandidate",
]

# Avoid conflicting with the PyPI package "Python".
REQUIRES_PYTHON_IDENTIFIER = cast(NormalizedName, "<Python from Requires-Python>")


def as_base_candidate(candidate: Candidate) -> Optional[BaseCandidate]:
    """The runtime version of BaseCandidate."""
    base_candidate_classes = (
        AlreadyInstalledCandidate,
        EditableCandidate,
        LinkCandidate,
    )
    if isinstance(candidate, base_candidate_classes):
        return candidate
    return None


def make_install_req_from_link(
    link: Link, template: InstallRequirement
) -> InstallRequirement:
    assert not template.editable, "template is editable"
    if template.req:
        line = str(template.req)
    else:
        line = link.url
    ireq = install_req_from_line(
        line,
        user_supplied=template.user_supplied,
        comes_from=template.comes_from,
        use_pep517=template.use_pep517,
        isolated=template.isolated,
        constraint=template.constraint,
        global_options=template.global_options,
        hash_options=template.hash_options,
        config_settings=template.config_settings,
    )
    ireq.original_link = template.original_link
    ireq.link = link
    ireq.extras = template.extras
    return ireq


def make_install_req_from_editable(
    link: Link, template: InstallRequirement
) -> InstallRequirement:
    assert template.editable, "template not editable"
    ireq = install_req_from_editable(
        link.url,
        user_supplied=template.user_supplied,
        comes_from=template.comes_from,
        use_pep517=template.use_pep517,
        isolated=template.isolated,
        constraint=template.constraint,
        permit_editable_wheels=template.permit_editable_wheels,
        global_options=template.global_options,
        hash_options=template.hash_options,
        config_settings=template.config_settings,
    )
    ireq.extras = template.extras
    return ireq


def _make_install_req_from_dist(
    dist: BaseDistribution, template: InstallRequirement
) -> InstallRequirement:
    if template.req:
        line = str(template.req)
    elif template.link:
        line = f"{dist.canonical_name} @ {template.link.url}"
    else:
        line = f"{dist.canonical_name}=={dist.version}"
    ireq = install_req_from_line(
        line,
        user_supplied=template.user_supplied,
        comes_from=template.comes_from,
        use_pep517=template.use_pep517,
        isolated=template.isolated,
        constraint=template.constraint,
        global_options=template.global_options,
        hash_options=template.hash_options,
        config_settings=template.config_settings,
    )
    ireq.satisfied_by = dist
    return ireq


class _InstallRequirementBackedCandidate(Candidate):
    """A candidate backed by an ``InstallRequirement``.

    This represents a package request with the target not being already
    in the environment, and needs to be fetched and installed. The backing
    ``InstallRequirement`` is responsible for most of the leg work; this
    class exposes appropriate information to the resolver.

    :param link: The link passed to the ``InstallRequirement``. The backing
        ``InstallRequirement`` will use this link to fetch the distribution.
    :param source_link: The link this candidate "originates" from. This is
        different from ``link`` when the link is found in the wheel cache.
        ``link`` would point to the wheel cache, while this points to the
        found remote link (e.g. from pypi.org).
    """

    dist: BaseDistribution
    is_installed = False

    def __init__(
        self,
        link: Link,
        source_link: Link,
        ireq: InstallRequirement,
        factory: "Factory",
        name: Optional[NormalizedName] = None,
        version: Optional[CandidateVersion] = None,
    ) -> None:
        self._link = link
        self._source_link = source_link
        self._factory = factory
        self._ireq = ireq
        self._name = name
        self._version = version
        self.dist = self._prepare()

    def __str__(self) -> str:
        return f"{self.name} {self.version}"

    def __repr__(self) -> str:
        return "{class_name}({link!r})".format(
            class_name=self.__class__.__name__,
            link=str(self._link),
        )

    def __hash__(self) -> int:
        return hash((self.__class__, self._link))

    def __eq__(self, other: Any) -> bool:
        if isinstance(other, self.__class__):
            return links_equivalent(self._link, other._link)
        return False

    @property
    def source_link(self) -> Optional[Link]:
        return self._source_link

    @property
    def project_name(self) -> NormalizedName:
        """The normalised name of the project the candidate refers to"""
        if self._name is None:
            self._name = self.dist.canonical_name
        return self._name

    @property
    def name(self) -> str:
        return self.project_name

    @property
    def version(self) -> CandidateVersion:
        if self._version is None:
            self._version = self.dist.version
        return self._version

    def format_for_error(self) -> str:
        return "{} {} (from {})".format(
            self.name,
            self.version,
            self._link.file_path if self._link.is_file else self._link,
        )

    def _prepare_distribution(self) -> BaseDistribution:
        raise NotImplementedError("Override in subclass")

    def _check_metadata_consistency(self, dist: BaseDistribution) -> None:
        """Check for consistency of project name and version of dist."""
        if self._name is not None and self._name != dist.canonical_name:
            raise MetadataInconsistent(
                self._ireq,
                "name",
                self._name,
                dist.canonical_name,
            )
        if self._version is not None and self._version != dist.version:
            raise MetadataInconsistent(
                self._ireq,
                "version",
                str(self._version),
                str(dist.version),
            )

    def _prepare(self) -> BaseDistribution:
        try:
            dist = self._prepare_distribution()
        except HashError as e:
            # Provide HashError the underlying ireq that caused it. This
            # provides context for the resulting error message to show the
            # offending line to the user.
            e.req = self._ireq
            raise
        except InstallationSubprocessError as exc:
            # The output has been presented already, so don't duplicate it.
            exc.context = "See above for output."
            raise

        self._check_metadata_consistency(dist)
        return dist

    def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]:
        requires = self.dist.iter_dependencies() if with_requires else ()
        for r in requires:
            yield from self._factory.make_requirements_from_spec(str(r), self._ireq)
        yield self._factory.make_requires_python_requirement(self.dist.requires_python)

    def get_install_requirement(self) -> Optional[InstallRequirement]:
        return self._ireq


class LinkCandidate(_InstallRequirementBackedCandidate):
    is_editable = False

    def __init__(
        self,
        link: Link,
        template: InstallRequirement,
        factory: "Factory",
        name: Optional[NormalizedName] = None,
        version: Optional[CandidateVersion] = None,
    ) -> None:
        source_link = link
        cache_entry = factory.get_wheel_cache_entry(source_link, name)
        if cache_entry is not None:
            logger.debug("Using cached wheel link: %s", cache_entry.link)
            link = cache_entry.link
        ireq = make_install_req_from_link(link, template)
        assert ireq.link == link
        if ireq.link.is_wheel and not ireq.link.is_file:
            wheel = Wheel(ireq.link.filename)
            wheel_name = canonicalize_name(wheel.name)
            assert name == wheel_name, f"{name!r} != {wheel_name!r} for wheel"
            # Version may not be present for PEP 508 direct URLs
            if version is not None:
                wheel_version = Version(wheel.version)
                assert version == wheel_version, "{!r} != {!r} for wheel {}".format(
                    version, wheel_version, name
                )

        if cache_entry is not None:
            assert ireq.link.is_wheel
            assert ireq.link.is_file
            if cache_entry.persistent and template.link is template.original_link:
                ireq.cached_wheel_source_link = source_link
            if cache_entry.origin is not None:
                ireq.download_info = cache_entry.origin
            else:
                # Legacy cache entry that does not have origin.json.
                # download_info may miss the archive_info.hashes field.
                ireq.download_info = direct_url_from_link(
                    source_link, link_is_in_wheel_cache=cache_entry.persistent
                )

        super().__init__(
            link=link,
            source_link=source_link,
            ireq=ireq,
            factory=factory,
            name=name,
            version=version,
        )

    def _prepare_distribution(self) -> BaseDistribution:
        preparer = self._factory.preparer
        return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)


class EditableCandidate(_InstallRequirementBackedCandidate):
    is_editable = True

    def __init__(
        self,
        link: Link,
        template: InstallRequirement,
        factory: "Factory",
        name: Optional[NormalizedName] = None,
        version: Optional[CandidateVersion] = None,
    ) -> None:
        super().__init__(
            link=link,
            source_link=link,
            ireq=make_install_req_from_editable(link, template),
            factory=factory,
            name=name,
            version=version,
        )

    def _prepare_distribution(self) -> BaseDistribution:
        return self._factory.preparer.prepare_editable_requirement(self._ireq)


class AlreadyInstalledCandidate(Candidate):
    is_installed = True
    source_link = None

    def __init__(
        self,
        dist: BaseDistribution,
        template: InstallRequirement,
        factory: "Factory",
    ) -> None:
        self.dist = dist
        self._ireq = _make_install_req_from_dist(dist, template)
        self._factory = factory
        self._version = None

        # This is just logging some messages, so we can do it eagerly.
        # The returned dist would be exactly the same as self.dist because we
        # set satisfied_by in _make_install_req_from_dist.
        # TODO: Supply reason based on force_reinstall and upgrade_strategy.
        skip_reason = "already satisfied"
        factory.preparer.prepare_installed_requirement(self._ireq, skip_reason)

    def __str__(self) -> str:
        return str(self.dist)

    def __repr__(self) -> str:
        return "{class_name}({distribution!r})".format(
            class_name=self.__class__.__name__,
            distribution=self.dist,
        )

    def __hash__(self) -> int:
        return hash((self.__class__, self.name, self.version))

    def __eq__(self, other: Any) -> bool:
        if isinstance(other, self.__class__):
            return self.name == other.name and self.version == other.version
        return False

    @property
    def project_name(self) -> NormalizedName:
        return self.dist.canonical_name

    @property
    def name(self) -> str:
        return self.project_name

    @property
    def version(self) -> CandidateVersion:
        if self._version is None:
            self._version = self.dist.version
        return self._version

    @property
    def is_editable(self) -> bool:
        return self.dist.editable

    def format_for_error(self) -> str:
        return f"{self.name} {self.version} (Installed)"

    def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]:
        if not with_requires:
            return
        for r in self.dist.iter_dependencies():
            yield from self._factory.make_requirements_from_spec(str(r), self._ireq)

    def get_install_requirement(self) -> Optional[InstallRequirement]:
        return None


class ExtrasCandidate(Candidate):
    """A candidate that has 'extras', indicating additional dependencies.

    Requirements can be for a project with dependencies, something like
    foo[extra].  The extras don't affect the project/version being installed
    directly, but indicate that we need additional dependencies. We model that
    by having an artificial ExtrasCandidate that wraps the "base" candidate.

    The ExtrasCandidate differs from the base in the following ways:

    1. It has a unique name, of the form foo[extra]. This causes the resolver
       to treat it as a separate node in the dependency graph.
    2. When we're getting the candidate's dependencies,
       a) We specify that we want the extra dependencies as well.
       b) We add a dependency on the base candidate.
          See below for why this is needed.
    3. We return None for the underlying InstallRequirement, as the base
       candidate will provide it, and we don't want to end up with duplicates.

    The dependency on the base candidate is needed so that the resolver can't
    decide that it should recommend foo[extra1] version 1.0 and foo[extra2]
    version 2.0. Having those candidates depend on foo=1.0 and foo=2.0
    respectively forces the resolver to recognise that this is a conflict.
    """

    def __init__(
        self,
        base: BaseCandidate,
        extras: FrozenSet[str],
        *,
        comes_from: Optional[InstallRequirement] = None,
    ) -> None:
        """
        :param comes_from: the InstallRequirement that led to this candidate if it
            differs from the base's InstallRequirement. This will often be the
            case in the sense that this candidate's requirement has the extras
            while the base's does not. Unlike the InstallRequirement backed
            candidates, this requirement is used solely for reporting purposes,
            it does not do any leg work.
        """
        self.base = base
        self.extras = frozenset(canonicalize_name(e) for e in extras)
        # If any extras are requested in their non-normalized forms, keep track
        # of their raw values. This is needed when we look up dependencies
        # since PEP 685 has not been implemented for marker-matching, and using
        # the non-normalized extra for lookup ensures the user can select a
        # non-normalized extra in a package with its non-normalized form.
        # TODO: Remove this attribute when packaging is upgraded to support the
        # marker comparison logic specified in PEP 685.
        self._unnormalized_extras = extras.difference(self.extras)
        self._comes_from = comes_from if comes_from is not None else self.base._ireq

    def __str__(self) -> str:
        name, rest = str(self.base).split(" ", 1)
        return "{}[{}] {}".format(name, ",".join(self.extras), rest)

    def __repr__(self) -> str:
        return "{class_name}(base={base!r}, extras={extras!r})".format(
            class_name=self.__class__.__name__,
            base=self.base,
            extras=self.extras,
        )

    def __hash__(self) -> int:
        return hash((self.base, self.extras))

    def __eq__(self, other: Any) -> bool:
        if isinstance(other, self.__class__):
            return self.base == other.base and self.extras == other.extras
        return False

    @property
    def project_name(self) -> NormalizedName:
        return self.base.project_name

    @property
    def name(self) -> str:
        """The normalised name of the project the candidate refers to"""
        return format_name(self.base.project_name, self.extras)

    @property
    def version(self) -> CandidateVersion:
        return self.base.version

    def format_for_error(self) -> str:
        return "{} [{}]".format(
            self.base.format_for_error(), ", ".join(sorted(self.extras))
        )

    @property
    def is_installed(self) -> bool:
        return self.base.is_installed

    @property
    def is_editable(self) -> bool:
        return self.base.is_editable

    @property
    def source_link(self) -> Optional[Link]:
        return self.base.source_link

    def _warn_invalid_extras(
        self,
        requested: FrozenSet[str],
        valid: FrozenSet[str],
    ) -> None:
        """Emit warnings for invalid extras being requested.

        This emits a warning for each requested extra that is not in the
        candidate's ``Provides-Extra`` list.
        """
        invalid_extras_to_warn = frozenset(
            extra
            for extra in requested
            if extra not in valid
            # If an extra is requested in an unnormalized form, skip warning
            # about the normalized form being missing.
            and extra in self.extras
        )
        if not invalid_extras_to_warn:
            return
        for extra in sorted(invalid_extras_to_warn):
            logger.warning(
                "%s %s does not provide the extra '%s'",
                self.base.name,
                self.version,
                extra,
            )

    def _calculate_valid_requested_extras(self) -> FrozenSet[str]:
        """Get a list of valid extras requested by this candidate.

        The user (or upstream dependant) may have specified extras that the
        candidate doesn't support. Any unsupported extras are dropped, and each
        cause a warning to be logged here.
        """
        requested_extras = self.extras.union(self._unnormalized_extras)
        valid_extras = frozenset(
            extra
            for extra in requested_extras
            if self.base.dist.is_extra_provided(extra)
        )
        self._warn_invalid_extras(requested_extras, valid_extras)
        return valid_extras

    def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]:
        factory = self.base._factory

        # Add a dependency on the exact base
        # (See note 2b in the class docstring)
        yield factory.make_requirement_from_candidate(self.base)
        if not with_requires:
            return

        valid_extras = self._calculate_valid_requested_extras()
        for r in self.base.dist.iter_dependencies(valid_extras):
            yield from factory.make_requirements_from_spec(
                str(r),
                self._comes_from,
                valid_extras,
            )

    def get_install_requirement(self) -> Optional[InstallRequirement]:
        # We don't return anything here, because we always
        # depend on the base candidate, and we'll get the
        # install requirement from that.
        return None


class RequiresPythonCandidate(Candidate):
    is_installed = False
    source_link = None

    def __init__(self, py_version_info: Optional[Tuple[int, ...]]) -> None:
        if py_version_info is not None:
            version_info = normalize_version_info(py_version_info)
        else:
            version_info = sys.version_info[:3]
        self._version = Version(".".join(str(c) for c in version_info))

    # We don't need to implement __eq__() and __ne__() since there is always
    # only one RequiresPythonCandidate in a resolution, i.e. the host Python.
    # The built-in object.__eq__() and object.__ne__() do exactly what we want.

    def __str__(self) -> str:
        return f"Python {self._version}"

    @property
    def project_name(self) -> NormalizedName:
        return REQUIRES_PYTHON_IDENTIFIER

    @property
    def name(self) -> str:
        return REQUIRES_PYTHON_IDENTIFIER

    @property
    def version(self) -> CandidateVersion:
        return self._version

    def format_for_error(self) -> str:
        return f"Python {self.version}"

    def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]:
        return ()

    def get_install_requirement(self) -> Optional[InstallRequirement]:
        return None
python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py000064400000076076151732701210022265 0ustar00import contextlib
import functools
import logging
import sys
import sysconfig
from typing import (
    TYPE_CHECKING,
    Dict,
    FrozenSet,
    Iterable,
    Iterator,
    List,
    Mapping,
    NamedTuple,
    Optional,
    Sequence,
    Set,
    Tuple,
    TypeVar,
    cast,
)

from pip._vendor.packaging.requirements import InvalidRequirement
from pip._vendor.packaging.specifiers import SpecifierSet
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from pip._vendor.resolvelib import ResolutionImpossible

from pip._internal.cache import CacheEntry, WheelCache
from pip._internal.exceptions import (
    DistributionNotFound,
    InstallationError,
    MetadataInconsistent,
    UnsupportedPythonVersion,
    UnsupportedWheel,
)
from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata import BaseDistribution, get_default_environment
from pip._internal.models.link import Link
from pip._internal.models.wheel import Wheel
from pip._internal.operations.prepare import RequirementPreparer
from pip._internal.req.constructors import install_req_from_link_and_ireq
from pip._internal.req.req_install import (
    InstallRequirement,
    check_invalid_constraint_type,
)
from pip._internal.resolution.base import InstallRequirementProvider
from pip._internal.utils.compatibility_tags import get_supported
from pip._internal.utils.hashes import Hashes
from pip._internal.utils.packaging import get_requirement
from pip._internal.utils.virtualenv import running_under_virtualenv

from .base import Candidate, CandidateVersion, Constraint, Requirement
from .candidates import (
    AlreadyInstalledCandidate,
    BaseCandidate,
    EditableCandidate,
    ExtrasCandidate,
    LinkCandidate,
    RequiresPythonCandidate,
    as_base_candidate,
)
from .found_candidates import FoundCandidates, IndexCandidateInfo
from .requirements import (
    ExplicitRequirement,
    RequiresPythonRequirement,
    SpecifierRequirement,
    SpecifierWithoutExtrasRequirement,
    UnsatisfiableRequirement,
)

if TYPE_CHECKING:
    from typing import Protocol

    class ConflictCause(Protocol):
        requirement: RequiresPythonRequirement
        parent: Candidate


logger = logging.getLogger(__name__)

C = TypeVar("C")
Cache = Dict[Link, C]


class CollectedRootRequirements(NamedTuple):
    requirements: List[Requirement]
    constraints: Dict[str, Constraint]
    user_requested: Dict[str, int]


class Factory:
    def __init__(
        self,
        finder: PackageFinder,
        preparer: RequirementPreparer,
        make_install_req: InstallRequirementProvider,
        wheel_cache: Optional[WheelCache],
        use_user_site: bool,
        force_reinstall: bool,
        ignore_installed: bool,
        ignore_requires_python: bool,
        py_version_info: Optional[Tuple[int, ...]] = None,
    ) -> None:
        self._finder = finder
        self.preparer = preparer
        self._wheel_cache = wheel_cache
        self._python_candidate = RequiresPythonCandidate(py_version_info)
        self._make_install_req_from_spec = make_install_req
        self._use_user_site = use_user_site
        self._force_reinstall = force_reinstall
        self._ignore_requires_python = ignore_requires_python

        self._build_failures: Cache[InstallationError] = {}
        self._link_candidate_cache: Cache[LinkCandidate] = {}
        self._editable_candidate_cache: Cache[EditableCandidate] = {}
        self._installed_candidate_cache: Dict[str, AlreadyInstalledCandidate] = {}
        self._extras_candidate_cache: Dict[
            Tuple[int, FrozenSet[NormalizedName]], ExtrasCandidate
        ] = {}

        if not ignore_installed:
            env = get_default_environment()
            self._installed_dists = {
                dist.canonical_name: dist
                for dist in env.iter_installed_distributions(local_only=False)
            }
        else:
            self._installed_dists = {}

    @property
    def force_reinstall(self) -> bool:
        return self._force_reinstall

    def _fail_if_link_is_unsupported_wheel(self, link: Link) -> None:
        if not link.is_wheel:
            return
        wheel = Wheel(link.filename)
        if wheel.supported(self._finder.target_python.get_unsorted_tags()):
            return
        msg = f"{link.filename} is not a supported wheel on this platform."
        raise UnsupportedWheel(msg)

    def _make_extras_candidate(
        self,
        base: BaseCandidate,
        extras: FrozenSet[str],
        *,
        comes_from: Optional[InstallRequirement] = None,
    ) -> ExtrasCandidate:
        cache_key = (id(base), frozenset(canonicalize_name(e) for e in extras))
        try:
            candidate = self._extras_candidate_cache[cache_key]
        except KeyError:
            candidate = ExtrasCandidate(base, extras, comes_from=comes_from)
            self._extras_candidate_cache[cache_key] = candidate
        return candidate

    def _make_candidate_from_dist(
        self,
        dist: BaseDistribution,
        extras: FrozenSet[str],
        template: InstallRequirement,
    ) -> Candidate:
        try:
            base = self._installed_candidate_cache[dist.canonical_name]
        except KeyError:
            base = AlreadyInstalledCandidate(dist, template, factory=self)
            self._installed_candidate_cache[dist.canonical_name] = base
        if not extras:
            return base
        return self._make_extras_candidate(base, extras, comes_from=template)

    def _make_candidate_from_link(
        self,
        link: Link,
        extras: FrozenSet[str],
        template: InstallRequirement,
        name: Optional[NormalizedName],
        version: Optional[CandidateVersion],
    ) -> Optional[Candidate]:
        # TODO: Check already installed candidate, and use it if the link and
        # editable flag match.

        if link in self._build_failures:
            # We already tried this candidate before, and it does not build.
            # Don't bother trying again.
            return None

        if template.editable:
            if link not in self._editable_candidate_cache:
                try:
                    self._editable_candidate_cache[link] = EditableCandidate(
                        link,
                        template,
                        factory=self,
                        name=name,
                        version=version,
                    )
                except MetadataInconsistent as e:
                    logger.info(
                        "Discarding [blue underline]%s[/]: [yellow]%s[reset]",
                        link,
                        e,
                        extra={"markup": True},
                    )
                    self._build_failures[link] = e
                    return None

            base: BaseCandidate = self._editable_candidate_cache[link]
        else:
            if link not in self._link_candidate_cache:
                try:
                    self._link_candidate_cache[link] = LinkCandidate(
                        link,
                        template,
                        factory=self,
                        name=name,
                        version=version,
                    )
                except MetadataInconsistent as e:
                    logger.info(
                        "Discarding [blue underline]%s[/]: [yellow]%s[reset]",
                        link,
                        e,
                        extra={"markup": True},
                    )
                    self._build_failures[link] = e
                    return None
            base = self._link_candidate_cache[link]

        if not extras:
            return base
        return self._make_extras_candidate(base, extras, comes_from=template)

    def _iter_found_candidates(
        self,
        ireqs: Sequence[InstallRequirement],
        specifier: SpecifierSet,
        hashes: Hashes,
        prefers_installed: bool,
        incompatible_ids: Set[int],
    ) -> Iterable[Candidate]:
        if not ireqs:
            return ()

        # The InstallRequirement implementation requires us to give it a
        # "template". Here we just choose the first requirement to represent
        # all of them.
        # Hopefully the Project model can correct this mismatch in the future.
        template = ireqs[0]
        assert template.req, "Candidates found on index must be PEP 508"
        name = canonicalize_name(template.req.name)

        extras: FrozenSet[str] = frozenset()
        for ireq in ireqs:
            assert ireq.req, "Candidates found on index must be PEP 508"
            specifier &= ireq.req.specifier
            hashes &= ireq.hashes(trust_internet=False)
            extras |= frozenset(ireq.extras)

        def _get_installed_candidate() -> Optional[Candidate]:
            """Get the candidate for the currently-installed version."""
            # If --force-reinstall is set, we want the version from the index
            # instead, so we "pretend" there is nothing installed.
            if self._force_reinstall:
                return None
            try:
                installed_dist = self._installed_dists[name]
            except KeyError:
                return None
            # Don't use the installed distribution if its version does not fit
            # the current dependency graph.
            if not specifier.contains(installed_dist.version, prereleases=True):
                return None
            candidate = self._make_candidate_from_dist(
                dist=installed_dist,
                extras=extras,
                template=template,
            )
            # The candidate is a known incompatibility. Don't use it.
            if id(candidate) in incompatible_ids:
                return None
            return candidate

        def iter_index_candidate_infos() -> Iterator[IndexCandidateInfo]:
            result = self._finder.find_best_candidate(
                project_name=name,
                specifier=specifier,
                hashes=hashes,
            )
            icans = list(result.iter_applicable())

            # PEP 592: Yanked releases are ignored unless the specifier
            # explicitly pins a version (via '==' or '===') that can be
            # solely satisfied by a yanked release.
            all_yanked = all(ican.link.is_yanked for ican in icans)

            def is_pinned(specifier: SpecifierSet) -> bool:
                for sp in specifier:
                    if sp.operator == "===":
                        return True
                    if sp.operator != "==":
                        continue
                    if sp.version.endswith(".*"):
                        continue
                    return True
                return False

            pinned = is_pinned(specifier)

            # PackageFinder returns earlier versions first, so we reverse.
            for ican in reversed(icans):
                if not (all_yanked and pinned) and ican.link.is_yanked:
                    continue
                func = functools.partial(
                    self._make_candidate_from_link,
                    link=ican.link,
                    extras=extras,
                    template=template,
                    name=name,
                    version=ican.version,
                )
                yield ican.version, func

        return FoundCandidates(
            iter_index_candidate_infos,
            _get_installed_candidate(),
            prefers_installed,
            incompatible_ids,
        )

    def _iter_explicit_candidates_from_base(
        self,
        base_requirements: Iterable[Requirement],
        extras: FrozenSet[str],
    ) -> Iterator[Candidate]:
        """Produce explicit candidates from the base given an extra-ed package.

        :param base_requirements: Requirements known to the resolver. The
            requirements are guaranteed to not have extras.
        :param extras: The extras to inject into the explicit requirements'
            candidates.
        """
        for req in base_requirements:
            lookup_cand, _ = req.get_candidate_lookup()
            if lookup_cand is None:  # Not explicit.
                continue
            # We've stripped extras from the identifier, and should always
            # get a BaseCandidate here, unless there's a bug elsewhere.
            base_cand = as_base_candidate(lookup_cand)
            assert base_cand is not None, "no extras here"
            yield self._make_extras_candidate(base_cand, extras)

    def _iter_candidates_from_constraints(
        self,
        identifier: str,
        constraint: Constraint,
        template: InstallRequirement,
    ) -> Iterator[Candidate]:
        """Produce explicit candidates from constraints.

        This creates "fake" InstallRequirement objects that are basically clones
        of what "should" be the template, but with original_link set to link.
        """
        for link in constraint.links:
            self._fail_if_link_is_unsupported_wheel(link)
            candidate = self._make_candidate_from_link(
                link,
                extras=frozenset(),
                template=install_req_from_link_and_ireq(link, template),
                name=canonicalize_name(identifier),
                version=None,
            )
            if candidate:
                yield candidate

    def find_candidates(
        self,
        identifier: str,
        requirements: Mapping[str, Iterable[Requirement]],
        incompatibilities: Mapping[str, Iterator[Candidate]],
        constraint: Constraint,
        prefers_installed: bool,
    ) -> Iterable[Candidate]:
        # Collect basic lookup information from the requirements.
        explicit_candidates: Set[Candidate] = set()
        ireqs: List[InstallRequirement] = []
        for req in requirements[identifier]:
            cand, ireq = req.get_candidate_lookup()
            if cand is not None:
                explicit_candidates.add(cand)
            if ireq is not None:
                ireqs.append(ireq)

        # If the current identifier contains extras, add requires and explicit
        # candidates from entries from extra-less identifier.
        with contextlib.suppress(InvalidRequirement):
            parsed_requirement = get_requirement(identifier)
            if parsed_requirement.name != identifier:
                explicit_candidates.update(
                    self._iter_explicit_candidates_from_base(
                        requirements.get(parsed_requirement.name, ()),
                        frozenset(parsed_requirement.extras),
                    ),
                )
                for req in requirements.get(parsed_requirement.name, []):
                    _, ireq = req.get_candidate_lookup()
                    if ireq is not None:
                        ireqs.append(ireq)

        # Add explicit candidates from constraints. We only do this if there are
        # known ireqs, which represent requirements not already explicit. If
        # there are no ireqs, we're constraining already-explicit requirements,
        # which is handled later when we return the explicit candidates.
        if ireqs:
            try:
                explicit_candidates.update(
                    self._iter_candidates_from_constraints(
                        identifier,
                        constraint,
                        template=ireqs[0],
                    ),
                )
            except UnsupportedWheel:
                # If we're constrained to install a wheel incompatible with the
                # target architecture, no candidates will ever be valid.
                return ()

        # Since we cache all the candidates, incompatibility identification
        # can be made quicker by comparing only the id() values.
        incompat_ids = {id(c) for c in incompatibilities.get(identifier, ())}

        # If none of the requirements want an explicit candidate, we can ask
        # the finder for candidates.
        if not explicit_candidates:
            return self._iter_found_candidates(
                ireqs,
                constraint.specifier,
                constraint.hashes,
                prefers_installed,
                incompat_ids,
            )

        return (
            c
            for c in explicit_candidates
            if id(c) not in incompat_ids
            and constraint.is_satisfied_by(c)
            and all(req.is_satisfied_by(c) for req in requirements[identifier])
        )

    def _make_requirements_from_install_req(
        self, ireq: InstallRequirement, requested_extras: Iterable[str]
    ) -> Iterator[Requirement]:
        """
        Returns requirement objects associated with the given InstallRequirement. In
        most cases this will be a single object but the following special cases exist:
            - the InstallRequirement has markers that do not apply -> result is empty
            - the InstallRequirement has both a constraint and extras -> result is split
                in two requirement objects: one with the constraint and one with the
                extra. This allows centralized constraint handling for the base,
                resulting in fewer candidate rejections.
        """
        if not ireq.match_markers(requested_extras):
            logger.info(
                "Ignoring %s: markers '%s' don't match your environment",
                ireq.name,
                ireq.markers,
            )
        elif not ireq.link:
            if ireq.extras and ireq.req is not None and ireq.req.specifier:
                yield SpecifierWithoutExtrasRequirement(ireq)
            yield SpecifierRequirement(ireq)
        else:
            self._fail_if_link_is_unsupported_wheel(ireq.link)
            cand = self._make_candidate_from_link(
                ireq.link,
                extras=frozenset(ireq.extras),
                template=ireq,
                name=canonicalize_name(ireq.name) if ireq.name else None,
                version=None,
            )
            if cand is None:
                # There's no way we can satisfy a URL requirement if the underlying
                # candidate fails to build. An unnamed URL must be user-supplied, so
                # we fail eagerly. If the URL is named, an unsatisfiable requirement
                # can make the resolver do the right thing, either backtrack (and
                # maybe find some other requirement that's buildable) or raise a
                # ResolutionImpossible eventually.
                if not ireq.name:
                    raise self._build_failures[ireq.link]
                yield UnsatisfiableRequirement(canonicalize_name(ireq.name))
            else:
                yield self.make_requirement_from_candidate(cand)

    def collect_root_requirements(
        self, root_ireqs: List[InstallRequirement]
    ) -> CollectedRootRequirements:
        collected = CollectedRootRequirements([], {}, {})
        for i, ireq in enumerate(root_ireqs):
            if ireq.constraint:
                # Ensure we only accept valid constraints
                problem = check_invalid_constraint_type(ireq)
                if problem:
                    raise InstallationError(problem)
                if not ireq.match_markers():
                    continue
                assert ireq.name, "Constraint must be named"
                name = canonicalize_name(ireq.name)
                if name in collected.constraints:
                    collected.constraints[name] &= ireq
                else:
                    collected.constraints[name] = Constraint.from_ireq(ireq)
            else:
                reqs = list(
                    self._make_requirements_from_install_req(
                        ireq,
                        requested_extras=(),
                    )
                )
                if not reqs:
                    continue
                template = reqs[0]
                if ireq.user_supplied and template.name not in collected.user_requested:
                    collected.user_requested[template.name] = i
                collected.requirements.extend(reqs)
        # Put requirements with extras at the end of the root requires. This does not
        # affect resolvelib's picking preference but it does affect its initial criteria
        # population: by putting extras at the end we enable the candidate finder to
        # present resolvelib with a smaller set of candidates to resolvelib, already
        # taking into account any non-transient constraints on the associated base. This
        # means resolvelib will have fewer candidates to visit and reject.
        # Python's list sort is stable, meaning relative order is kept for objects with
        # the same key.
        collected.requirements.sort(key=lambda r: r.name != r.project_name)
        return collected

    def make_requirement_from_candidate(
        self, candidate: Candidate
    ) -> ExplicitRequirement:
        return ExplicitRequirement(candidate)

    def make_requirements_from_spec(
        self,
        specifier: str,
        comes_from: Optional[InstallRequirement],
        requested_extras: Iterable[str] = (),
    ) -> Iterator[Requirement]:
        """
        Returns requirement objects associated with the given specifier. In most cases
        this will be a single object but the following special cases exist:
            - the specifier has markers that do not apply -> result is empty
            - the specifier has both a constraint and extras -> result is split
                in two requirement objects: one with the constraint and one with the
                extra. This allows centralized constraint handling for the base,
                resulting in fewer candidate rejections.
        """
        ireq = self._make_install_req_from_spec(specifier, comes_from)
        return self._make_requirements_from_install_req(ireq, requested_extras)

    def make_requires_python_requirement(
        self,
        specifier: SpecifierSet,
    ) -> Optional[Requirement]:
        if self._ignore_requires_python:
            return None
        # Don't bother creating a dependency for an empty Requires-Python.
        if not str(specifier):
            return None
        return RequiresPythonRequirement(specifier, self._python_candidate)

    def get_wheel_cache_entry(
        self, link: Link, name: Optional[str]
    ) -> Optional[CacheEntry]:
        """Look up the link in the wheel cache.

        If ``preparer.require_hashes`` is True, don't use the wheel cache,
        because cached wheels, always built locally, have different hashes
        than the files downloaded from the index server and thus throw false
        hash mismatches. Furthermore, cached wheels at present have
        nondeterministic contents due to file modification times.
        """
        if self._wheel_cache is None:
            return None
        return self._wheel_cache.get_cache_entry(
            link=link,
            package_name=name,
            supported_tags=get_supported(),
        )

    def get_dist_to_uninstall(self, candidate: Candidate) -> Optional[BaseDistribution]:
        # TODO: Are there more cases this needs to return True? Editable?
        dist = self._installed_dists.get(candidate.project_name)
        if dist is None:  # Not installed, no uninstallation required.
            return None

        # Prevent uninstalling packages from /usr
        try:
            if dist.installed_location in (
                    sysconfig.get_path('purelib', scheme='posix_prefix', vars={'base': sys.base_prefix}),
                    sysconfig.get_path('platlib', scheme='posix_prefix', vars={'platbase': sys.base_prefix}),
            ):
                return None
        except KeyError:  # this Python doesn't have 'rpm_prefix' scheme yet
            pass

        # We're installing into global site. The current installation must
        # be uninstalled, no matter it's in global or user site, because the
        # user site installation has precedence over global.
        if not self._use_user_site:
            return dist

        # We're installing into user site. Remove the user site installation.
        if dist.in_usersite:
            return dist

        # We're installing into user site, but the installed incompatible
        # package is in global site. We can't uninstall that, and would let
        # the new user installation to "shadow" it. But shadowing won't work
        # in virtual environments, so we error out.
        if running_under_virtualenv() and dist.in_site_packages:
            message = (
                f"Will not install to the user site because it will lack "
                f"sys.path precedence to {dist.raw_name} in {dist.location}"
            )
            raise InstallationError(message)
        return None

    def _report_requires_python_error(
        self, causes: Sequence["ConflictCause"]
    ) -> UnsupportedPythonVersion:
        assert causes, "Requires-Python error reported with no cause"

        version = self._python_candidate.version

        if len(causes) == 1:
            specifier = str(causes[0].requirement.specifier)
            message = (
                f"Package {causes[0].parent.name!r} requires a different "
                f"Python: {version} not in {specifier!r}"
            )
            return UnsupportedPythonVersion(message)

        message = f"Packages require a different Python. {version} not in:"
        for cause in causes:
            package = cause.parent.format_for_error()
            specifier = str(cause.requirement.specifier)
            message += f"\n{specifier!r} (required by {package})"
        return UnsupportedPythonVersion(message)

    def _report_single_requirement_conflict(
        self, req: Requirement, parent: Optional[Candidate]
    ) -> DistributionNotFound:
        if parent is None:
            req_disp = str(req)
        else:
            req_disp = f"{req} (from {parent.name})"

        cands = self._finder.find_all_candidates(req.project_name)
        skipped_by_requires_python = self._finder.requires_python_skipped_reasons()

        versions_set: Set[CandidateVersion] = set()
        yanked_versions_set: Set[CandidateVersion] = set()
        for c in cands:
            is_yanked = c.link.is_yanked if c.link else False
            if is_yanked:
                yanked_versions_set.add(c.version)
            else:
                versions_set.add(c.version)

        versions = [str(v) for v in sorted(versions_set)]
        yanked_versions = [str(v) for v in sorted(yanked_versions_set)]

        if yanked_versions:
            # Saying "version X is yanked" isn't entirely accurate.
            # https://github.com/pypa/pip/issues/11745#issuecomment-1402805842
            logger.critical(
                "Ignored the following yanked versions: %s",
                ", ".join(yanked_versions) or "none",
            )
        if skipped_by_requires_python:
            logger.critical(
                "Ignored the following versions that require a different python "
                "version: %s",
                "; ".join(skipped_by_requires_python) or "none",
            )
        logger.critical(
            "Could not find a version that satisfies the requirement %s "
            "(from versions: %s)",
            req_disp,
            ", ".join(versions) or "none",
        )
        if str(req) == "requirements.txt":
            logger.info(
                "HINT: You are attempting to install a package literally "
                'named "requirements.txt" (which cannot exist). Consider '
                "using the '-r' flag to install the packages listed in "
                "requirements.txt"
            )

        return DistributionNotFound(f"No matching distribution found for {req}")

    def get_installation_error(
        self,
        e: "ResolutionImpossible[Requirement, Candidate]",
        constraints: Dict[str, Constraint],
    ) -> InstallationError:
        assert e.causes, "Installation error reported with no cause"

        # If one of the things we can't solve is "we need Python X.Y",
        # that is what we report.
        requires_python_causes = [
            cause
            for cause in e.causes
            if isinstance(cause.requirement, RequiresPythonRequirement)
            and not cause.requirement.is_satisfied_by(self._python_candidate)
        ]
        if requires_python_causes:
            # The comprehension above makes sure all Requirement instances are
            # RequiresPythonRequirement, so let's cast for convenience.
            return self._report_requires_python_error(
                cast("Sequence[ConflictCause]", requires_python_causes),
            )

        # Otherwise, we have a set of causes which can't all be satisfied
        # at once.

        # The simplest case is when we have *one* cause that can't be
        # satisfied. We just report that case.
        if len(e.causes) == 1:
            req, parent = e.causes[0]
            if req.name not in constraints:
                return self._report_single_requirement_conflict(req, parent)

        # OK, we now have a list of requirements that can't all be
        # satisfied at once.

        # A couple of formatting helpers
        def text_join(parts: List[str]) -> str:
            if len(parts) == 1:
                return parts[0]

            return ", ".join(parts[:-1]) + " and " + parts[-1]

        def describe_trigger(parent: Candidate) -> str:
            ireq = parent.get_install_requirement()
            if not ireq or not ireq.comes_from:
                return f"{parent.name}=={parent.version}"
            if isinstance(ireq.comes_from, InstallRequirement):
                return str(ireq.comes_from.name)
            return str(ireq.comes_from)

        triggers = set()
        for req, parent in e.causes:
            if parent is None:
                # This is a root requirement, so we can report it directly
                trigger = req.format_for_error()
            else:
                trigger = describe_trigger(parent)
            triggers.add(trigger)

        if triggers:
            info = text_join(sorted(triggers))
        else:
            info = "the requested packages"

        msg = (
            "Cannot install {} because these package versions "
            "have conflicting dependencies.".format(info)
        )
        logger.critical(msg)
        msg = "\nThe conflict is caused by:"

        relevant_constraints = set()
        for req, parent in e.causes:
            if req.name in constraints:
                relevant_constraints.add(req.name)
            msg = msg + "\n    "
            if parent:
                msg = msg + f"{parent.name} {parent.version} depends on "
            else:
                msg = msg + "The user requested "
            msg = msg + req.format_for_error()
        for key in relevant_constraints:
            spec = constraints[key].specifier
            msg += f"\n    The user requested (constraint) {key}{spec}"

        msg = (
            msg
            + "\n\n"
            + "To fix this you could try to:\n"
            + "1. loosen the range of package versions you've specified\n"
            + "2. remove package versions to allow pip attempt to solve "
            + "the dependency conflict\n"
        )

        logger.info(msg)

        return DistributionNotFound(
            "ResolutionImpossible: for help visit "
            "https://pip.pypa.io/en/latest/topics/dependency-resolution/"
            "#dealing-with-dependency-conflicts"
        )
python3.12/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-312.pyc000064400000000364151732701210024533 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/__init__.py�<module>rs�rpython3.12/site-packages/pip/_internal/resolution/__pycache__/base.cpython-312.pyc000064400000002320151732701210023700 0ustar00�

R`iG��\�ddlmZmZmZddlmZddlmZeeeegefZ	Gd�d�Z
y)�)�Callable�List�Optional)�InstallRequirement)�RequirementSetc�<�eZdZdeededefd�Zdedeefd�Zy)�BaseResolver�	root_reqs�check_supported_wheels�returnc��t���N��NotImplementedError)�selfr
rs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/base.py�resolvezBaseResolver.resolve�
��"�#�#��req_setc��t��rr)rrs  r�get_installation_orderz#BaseResolver.get_installation_orderrrN)	�__name__�
__module__�__qualname__rr�boolrrr�rrr	r	s@��$��0�1�$�KO�$�	�$�
$�%�$�	
� �	!�$rr	N)�typingrrr�pip._internal.req.req_installr�pip._internal.req.req_setr�str�InstallRequirementProviderr	rrr�<module>r#s:��+�+�<�4�%��(�%�
&�'�);�;���
	$�	$rpython3.12/site-packages/pip/_internal/resolution/base.py000064400000001107151732701210017341 0ustar00from typing import Callable, List, Optional

from pip._internal.req.req_install import InstallRequirement
from pip._internal.req.req_set import RequirementSet

InstallRequirementProvider = Callable[
    [str, Optional[InstallRequirement]], InstallRequirement
]


class BaseResolver:
    def resolve(
        self, root_reqs: List[InstallRequirement], check_supported_wheels: bool
    ) -> RequirementSet:
        raise NotImplementedError()

    def get_installation_order(
        self, req_set: RequirementSet
    ) -> List[InstallRequirement]:
        raise NotImplementedError()
python3.12/site-packages/pip/_internal/resolution/__init__.py000064400000000000151732701210020155 0ustar00python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-312.pyc000064400000000373151732701210025777 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py�<module>rs�rpython3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-312.pyc000064400000054147151732701210026111 0ustar00�

R`i�^�	��dZddlZddlZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZddlmZdd	lmZmZmZmZmZmZmZdd
lmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%ddl&m'Z'm(Z(ddl)m*Z*ddl+m,Z,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddl8m9Z9ejte;�Z<ee=e
e'fZ>	ddede
e?e?e?fde@ddfd�ZAGd�de,�ZBy) ayDependency Resolution

The dependency resolution in pip is performed as follows:

for top-level requirements:
    a. only one spec allowed per project, regardless of conflicts or not.
       otherwise a "double requirement" exception is raised
    b. they override sub-dependency requirements.
for sub-dependencies
    a. "first found, wins" (where the order is breadth first)
�N)�defaultdict)�chain)�DefaultDict�Iterable�List�Optional�Set�Tuple)�
specifiers)�Requirement)�
WheelCache)�BestVersionAlreadyInstalled�DistributionNotFound�	HashError�
HashErrors�InstallationError�NoneMetadataError�UnsupportedPythonVersion)�
PackageFinder)�BaseDistribution)�Link)�Wheel)�RequirementPreparer)�InstallRequirement�check_invalid_constraint_type)�RequirementSet)�BaseResolver�InstallRequirementProvider)�compatibility_tags)�
get_supported)�direct_url_from_link)�
indent_log)�normalize_version_info)�check_requires_python�dist�version_info�ignore_requires_python�returnc���	t|j�}	t	||��}|rydjtt|��}|r#tjd|j||�ytdj|j||���#t$r}t|t|���d}~wwxYw#t
j$r+}tjd|j|�Yd}~yd}~wwxYw)a�
    Check whether the given Python version is compatible with a distribution's
    "Requires-Python" value.

    :param version_info: A 3-tuple of ints representing the Python
        major-minor-micro version to check.
    :param ignore_requires_python: Whether to ignore the "Requires-Python"
        value if the given Python version isn't compatible.

    :raises UnsupportedPythonVersion: When the given Python version isn't
        compatible.
    N)r&z-Package %r has an invalid Requires-Python: %s�.zBIgnoring failed Requires-Python check for package %r: %s not in %rz8Package {!r} requires a different Python: {} not in {!r})�str�requires_python�FileNotFoundErrorrr$r�InvalidSpecifier�logger�warning�raw_name�join�map�debugr�format)r%r&r'r,�e�
is_compatible�exc�versions        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/resolution/legacy/resolver.py�_check_dist_requires_pythonr;:s���(.��d�2�2�3��	�-��%�
�
����h�h�s�3��-�.�G�����P��M�M���		
�	�
"�B�I�I��M�M�7�O�	
����5�.���c�!�f�-�-��.���&�&�����;�T�]�]�C�	
�	��	�s.�B�
B8�	B5�B0�0B5�8C6�!C1�1C6c�v��eZdZdZhd�Z	d%dededeede	de
d	e
d
e
de
de
d
edeee
dfddf�fd�
Zdeede
defd�Z		d&dededeedeeedeeeeeff
d�Zdede
fd�Zdeddfd�Zdedeefd�Zdedeefd�Zdeddfd �Zdedefd!�Zdededeefd"�Zd#edeefd$�Z�xZS)'�Resolverz�Resolves which packages need to be installed/uninstalled to perform     the requested operation without breaking the requirements of any package.
    >�eager�only-if-needed�to-satisfy-onlyN�preparer�finder�wheel_cache�make_install_req�
use_user_site�ignore_dependencies�ignore_installedr'�force_reinstall�upgrade_strategy�py_version_info.r(c�F��t�|��|
|jvsJ�|�tjdd}nt|�}||_||_||_||_	|
|_
|	|_||_||_
||_||_||_t#t$�|_y)N�)�super�__init__�_allowed_strategies�sysr&r#�_py_version_inforArBrCrIrHrFrGr'rE�_make_install_reqr�list�_discovered_dependencies)
�selfrArBrCrDrErFrGr'rHrIrJ�	__class__s
            �r:rNzResolver.__init__xs����	�����4�#;�#;�;�;�;��"�!�.�.�r��2�O�4�_�E�O� /��� ��
����&��� 0���.���#6�� � 0���&<��#�*���!1���@K�D�@Q��%��	root_reqs�check_supported_wheelsc�t�t|��}|D]+}|jrt|�|j||��-g}t	�}t|j|�D]$}	|j|j||���&|r|�|S#t$r"}||_
|j|�Yd}~�Sd}~wwxYw)a�Resolve what operations need to be done

        As a side-effect of this method, the packages (and their dependencies)
        are downloaded, unpacked and prepared for installation. This
        preparation is done by ``pip.operations.prepare``.

        Once PyPI has static dependency metadata available, it would be
        possible to move the preparation to become a step separated from
        dependency resolution.
        )rYN)r�
constraintr�_add_requirement_to_setrr�all_requirements�extend�_resolve_oner�req�append)rUrXrY�requirement_setr`�discovered_reqs�hash_errorsr8s        r:�resolvezResolver.resolve�s���)�@V�W���C��~�~�-�c�2��(�(��#�>��57�� �l����9�9�?�K�C�
(��&�&�t�'8�'8��#�'N�O�L��������
(�����"�"�3�'�'��
(�s�#!B�	B7�B2�2B7rb�install_req�parent_req_name�extras_requestedc��|j|�s/tjd|j|j�gdfS|j
r�|j
jrtt|j
j�}tj�}|jr5|j|�s$tdj|j���|jr	|�Jd��|js|j!|�|gdfS	|j#|j�}|duxrw|xrs|j&xrd|j(|j(k(xrI|j*xr;|j*xr-|j*j,|j*j,k7}|r&tdj|||j���|s|j/|�|g|fS|j&s|j&sg|fS|j
xr<|j
xr-|j
j0|j
j0k(}	|	r$tdj|j���d|_|jrd|_t3t5t7|j(�t7|j(�z��|_tj9d	||j(�|g|fS#t$$rd}Y���wxYw)
a&Add install_req as a requirement to install.

        :param parent_req_name: The name of the requirement that needed this
            added. The name is used because when multiple unnamed requirements
            resolve to the same name, we could otherwise end up with dependency
            links that point outside the Requirements set. parent_req must
            already be added. Note that None implies that this is a user
            supplied requirement, vs an inferred one.
        :param extras_requested: an iterable of extras used to evaluate the
            environment markers.
        :return: Additional requirements to scan. That is either [] if
            the requirement is not applicable, or [install_req] if the
            requirement is applicable and has just been added.
        z6Ignoring %s: markers '%s' don't match your environmentNz-{} is not a supported wheel on this platform.z+a user supplied req shouldn't have a parentz7Double requirement given: {} (already in {}, name={!r})zhCould not satisfy constraints for '{}': installation from path or url cannot be constrained to a versionFTzSetting %s extras to: %s)�
match_markersr/�info�name�markers�link�is_wheelr�filenamerr rY�	supportedrr5�
user_supplied�add_unnamed_requirement�get_requirement�KeyErrorr[�extrasr`�	specifier�add_named_requirement�path�tuple�sorted�setr4)
rUrbrfrgrh�wheel�tags�existing_req�has_conflicting_requirement�does_not_satisfy_constraints
          r:r\z Resolver._add_requirement_to_set�s��,�(�(�)9�:��K�K�H�� � ��#�#�
�
�t�8�O����� 0� 0� 9� 9��+�*�*�3�3�4�E�%�3�3�5�D��5�5�e�o�o�d�>S�'�C�J�J��������)�)�_�-D�	9�8�	9�D�
����3�3�K�@��=�$�&�&�	 � �/�/��0@�0@�A�
�
�t�#�
H��
H� �+�+�+�
H��#�#�{�'9�'9�9�
H�� � �	
H�
���
H�� � �*�*�k�o�o�.G�.G�G�	$�'�#�I�P�P���{�/?�/?���
���1�1�+�>��=�+�-�-��!�!��)@�)@��|�#�#�&1�&6�&6�'
����Q�+�"2�"2�"7�"7�<�;L�;L�;Q�;Q�"Q�<
�#�'�#�+�+1�6�+�2B�2B�+C��
�#(����$�$�)-�L�&�#��3�|�*�*�+�c�+�2D�2D�.E�E�F�
���	���&�����	
��~�|�+�+��s�	 ��L�	 �s�K5�5L�Lr`c��|jdk(ry|jdk(ry|jdk(sJ�|jxs|jS)Nr@Fr>Tr?)rIrrr[�rUr`s  r:�_is_upgrade_allowedzResolver._is_upgrade_allowed9sO��� � �$5�5��
�
"�
"�g�
-���(�(�,<�<�<�<��$�$�6����6rWc��|jr|jjr|jjrd|_d|_y)z4
        Set a requirement to be installed.
        TN)rE�satisfied_by�in_usersite�in_install_path�should_reinstallr�s  r:�_set_req_to_reinstallzResolver._set_req_to_reinstallBs;���#�#��#�#�/�/��$�$�4�4�#'�C� ���rW�req_to_installc��|jry|j|j�|jsy|jr|j|�y|j
|�s|jdk(ryy|js	|jj|d��|j|�y#t$rYyt$rY�'wxYw)aCheck if req_to_install should be skipped.

        This will check if the req is installed, and whether we should upgrade
        or reinstall it, taking into account all the relevant user options.

        After calling this req_to_install will only have satisfied_by set to
        None if the req_to_install is to be upgraded/reinstalled etc. Any
        other value will be a dist recording the current thing installed that
        satisfies the requirement.

        Note that for vcs urls and the like we can't assess skipping in this
        routine - we simply identify that we need to pull the thing down,
        then later on it is pulled down and introspected to assess upgrade/
        reinstalls etc.

        :return: A text reason for why it was skipped, or None.
        Nr?z#already satisfied, skipping upgradezalready satisfiedT)�upgradezalready up-to-date)
rG�check_if_existsrEr�rHr�r�rIrnrB�find_requirementrr)rUr�s  r:�_check_skip_installedzResolver._check_skip_installedNs���(� � ���&�&�t�'9�'9�:��*�*������&�&�~�6���'�'��7��$�$�(8�8�<�&�
�"�"�	
����,�,�^�T�,�J�	
�"�"�>�2���/�
,�+�'�
��	
�s�B2�2	C�=C�Cc��|j|�}|jj||�}|sy|j}|jr8|j
xsd}dj
||��}tj|�|S)Nz<none given>zqThe candidate selected for download or install is a yanked version: {candidate}
Reason for being yanked: {reason})�	candidate�reason)	r�rBr�rn�	is_yanked�
yanked_reasonr5r/r0)rUr`r��best_candidaternr��msgs       r:�_find_requirement_linkzResolver._find_requirement_link�s���*�*�3�/�����5�5�c�7�C�����"�"���>�>��'�'�9�>�F�
4��f�~�f�f�=�
�
�N�N�3���rWc�\�|j�|j|�|_|j�|jjry|jj|j|jt���}|��tjd|j�|j|jur|jr|j|_|j�|j|_n&t|j|j��|_|j|_yy)afEnsure that if a link can be found for this, that it is found.

        Note that req.link may still be None - if the requirement is already
        installed and not needed to be upgraded based on the return value of
        _is_upgrade_allowed().

        If preparer.require_hashes is True, don't use the wheel cache, because
        cached wheels, always built locally, have different hashes than the
        files downloaded from the index server and thus throw false hash
        mismatches. Furthermore, cached wheels at present have undeterministic
        contents due to file modification times.
        N)rn�package_name�supported_tagszUsing cached wheel link: %s)�link_is_in_wheel_cache)rnr�rCrA�require_hashes�get_cache_entryrlr r/r4�
original_link�
persistent�cached_wheel_source_link�origin�
download_infor!)rUr`�cache_entrys   r:�_populate_linkzResolver._populate_link�s����8�8���2�2�3�7�C�H����#�t�}�}�'C�'C���&�&�6�6�������(�?�7�
��
�"��L�L�6��8H�8H�I��x�x�3�,�,�,��1G�1G�/2�x�x��,��!�!�-�$/�$6�$6��!�%9��H�H�[�5K�5K�%��!�#�'�'�C�H�#rWc��|jr|jj|�S|j�J�|j	|�}|jr|jj||�S|j
|�|jj|�}|js|j|j�|jrq|jdk7xs5|jxs'|jxs|jjdk(}|r|j|�|St j#d|�|S)zzTakes a InstallRequirement and returns a single AbstractDist         representing a prepared variant of the same.
        r@�filez<Requirement already satisfied (use --upgrade to upgrade): %s)�editablerA�prepare_editable_requirementr�r��prepare_installed_requirementr��prepare_linked_requirementrGr�rErIrHrn�schemer�r/rk)rUr`�skip_reasonr%�
should_modifys     r:�
_get_dist_forzResolver._get_dist_for�s,���<�<��=�=�=�=�c�B�B����'�'�'��0�0��5������=�=�>�>�s�K�P�P�	
���C� ��}�}�7�7��<���$�$����� 2� 2�3�����%�%�):�:�-��'�'�-��(�(�-��8�8�?�?�f�,�	
���*�*�3�/���	���R����rWc������	��js�jrgSd�_�j��}t|�j�j
��g�	dtdttddf�	���fd�}t�5�j�j�s"�jsJ��j��d���js��jr/t j#d	d
j%�j��t't)�j�t)|j+��z
�}|D].}t j-d|j.|j0|��0t't)|j+��t)�j�z�}|j3|�D]}|||���ddd��	S#1swY�	SxYw)
zxPrepare a single requirements file.

        :return: A list of additional InstallRequirements to also install.
        T)r&r'�subreqrhr(Nc�����	jt|���}�j}�	j�|||��\}}|r |r�	j|j|��j
|�y)N)rgrh)rRr+rlr\rTrar^)
r�rh�sub_install_reqrg�
to_scan_again�
add_to_parent�	more_reqsr�rbrUs
      ����r:�add_reqz&Resolver._resolve_one.<locals>.add_req
s{���#�4�4�S��[�.�Q�O�,�1�1�O�+/�+G�+G��� /�!1�	,H�,�(�M�=��=��-�-�o�>�E�E�m�T����]�+rW)rgz!Installing extra requirements: %r�,z%%s %s does not provide the extra '%s')rh)r[�preparedr�r;rQr'rrr+r"�has_requirementrlrrr\rFrvr/r4r2r{r|�iter_provided_extrasr0r1r9�iter_dependencies)
rUrbr�r%r��missing_requested�missing�available_requestedr�r�s
```      @r:r_zResolver._resolve_one�s�����$�$��(?�(?��I�"&����!�!�.�1��	$���.�.�#'�#>�#>�	
�/1�	�	,�K�	,�8�C�=�	,�T�	,�	,� �\�#�2�2�>�3F�3F�G�&�3�3�3�3��,�,�#�^�T�-���+�+�!�(�(��L�L�;�����!6�!6�7��%+���-�-�.��T�5N�5N�5P�1Q�Q�%�!� 1�G��N�N�?��
�
�����	� 1�'-���1�1�3�4�s�>�;P�;P�7Q�Q�'�#�#�4�4�5H�I�F��F�5H�I�J�A�F��G�F��s
�EG�G�req_setc������g�t��dtddf����fd��|jj�D]
}�|���S)z�Create the installation order.

        The installation order is topological - requirements are installed
        before the requiring thing. We break cycles at an arbitrary point,
        and make no other guarantees.
        r`r(Nc����|js|�vry|jry�j|��j|jD]
}�|���j|�y�N)r�r[�addrTrlra)r`�dep�order�ordered_reqs�schedulerUs  ����r:r�z1Resolver.get_installation_order.<locals>.scheduleNsZ������3�,�#6���~�~�����S�!��4�4�S�X�X�>����
�?��L�L��rW)r|r�requirements�values)rUr�rfr�r�r�s`  @@@r:�get_installation_orderzResolver.get_installation_order?sR�����03���	�,�	��	�	�#�/�/�6�6�8�K��[�!�9��rWr�)NN) �__name__�
__module__�__qualname__�__doc__rOrrrr
r�boolr+r
�intrNrrrrerr\r�r�r�rr�r�rr�r_r��
__classcell__)rVs@r:r=r=qs����I��6:�$R�%�$R��$R��j�)�	$R�
5�$R��
$R�"�$R��$R�!%�$R��$R��$R�"�%��S��/�2�$R�
�$R�L#��0�1�#�KO�#�	�#�R*.�48�t,�'�t,�(�t,�"�#��	t,�
#�8�C�=�1�t,�
�t�&�'��2D�)E�E�	F�
t,�l7�'9�7�d�7�
 �);�
 ��
 �4�0�4�	�#��4�l�*<���$���,#(�"4�#(��#(�J,�!3�,�8H�,�\P�'�P�+�P�
� �	!�	P�d�%��	
� �	!�rWr=)F)Cr��loggingrP�collectionsr�	itertoolsr�typingrrrrr	r
�pip._vendor.packagingr�"pip._vendor.packaging.requirementsr�pip._internal.cacher
�pip._internal.exceptionsrrrrrrr�"pip._internal.index.package_finderr�pip._internal.metadatar�pip._internal.models.linkr�pip._internal.models.wheelr� pip._internal.operations.preparer�pip._internal.req.req_installrr�pip._internal.req.req_setr�pip._internal.resolution.baserr�pip._internal.utilsr�&pip._internal.utils.compatibility_tagsr �&pip._internal.utils.direct_url_helpersr!�pip._internal.utils.loggingr"�pip._internal.utils.miscr#�pip._internal.utils.packagingr$�	getLoggerr�r/r+�DiscoveredDependenciesr�r�r;r=�rWr:�<module>r�s���
��
�#��D�D�,�:�*����=�3�*�,�@��5�R�2�@�G�2�;�?�	��	�	�8�	$��$�S�$�/A�*B�%B�C��$)�4�
�4���S�#�
�&�4�!�4�
�	4�ni�|�irWpython3.12/site-packages/pip/_internal/resolution/legacy/resolver.py000064400000057211151732701210021543 0ustar00"""Dependency Resolution

The dependency resolution in pip is performed as follows:

for top-level requirements:
    a. only one spec allowed per project, regardless of conflicts or not.
       otherwise a "double requirement" exception is raised
    b. they override sub-dependency requirements.
for sub-dependencies
    a. "first found, wins" (where the order is breadth first)
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import logging
import sys
from collections import defaultdict
from itertools import chain
from typing import DefaultDict, Iterable, List, Optional, Set, Tuple

from pip._vendor.packaging import specifiers
from pip._vendor.packaging.requirements import Requirement

from pip._internal.cache import WheelCache
from pip._internal.exceptions import (
    BestVersionAlreadyInstalled,
    DistributionNotFound,
    HashError,
    HashErrors,
    InstallationError,
    NoneMetadataError,
    UnsupportedPythonVersion,
)
from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata import BaseDistribution
from pip._internal.models.link import Link
from pip._internal.models.wheel import Wheel
from pip._internal.operations.prepare import RequirementPreparer
from pip._internal.req.req_install import (
    InstallRequirement,
    check_invalid_constraint_type,
)
from pip._internal.req.req_set import RequirementSet
from pip._internal.resolution.base import BaseResolver, InstallRequirementProvider
from pip._internal.utils import compatibility_tags
from pip._internal.utils.compatibility_tags import get_supported
from pip._internal.utils.direct_url_helpers import direct_url_from_link
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import normalize_version_info
from pip._internal.utils.packaging import check_requires_python

logger = logging.getLogger(__name__)

DiscoveredDependencies = DefaultDict[str, List[InstallRequirement]]


def _check_dist_requires_python(
    dist: BaseDistribution,
    version_info: Tuple[int, int, int],
    ignore_requires_python: bool = False,
) -> None:
    """
    Check whether the given Python version is compatible with a distribution's
    "Requires-Python" value.

    :param version_info: A 3-tuple of ints representing the Python
        major-minor-micro version to check.
    :param ignore_requires_python: Whether to ignore the "Requires-Python"
        value if the given Python version isn't compatible.

    :raises UnsupportedPythonVersion: When the given Python version isn't
        compatible.
    """
    # This idiosyncratically converts the SpecifierSet to str and let
    # check_requires_python then parse it again into SpecifierSet. But this
    # is the legacy resolver so I'm just not going to bother refactoring.
    try:
        requires_python = str(dist.requires_python)
    except FileNotFoundError as e:
        raise NoneMetadataError(dist, str(e))
    try:
        is_compatible = check_requires_python(
            requires_python,
            version_info=version_info,
        )
    except specifiers.InvalidSpecifier as exc:
        logger.warning(
            "Package %r has an invalid Requires-Python: %s", dist.raw_name, exc
        )
        return

    if is_compatible:
        return

    version = ".".join(map(str, version_info))
    if ignore_requires_python:
        logger.debug(
            "Ignoring failed Requires-Python check for package %r: %s not in %r",
            dist.raw_name,
            version,
            requires_python,
        )
        return

    raise UnsupportedPythonVersion(
        "Package {!r} requires a different Python: {} not in {!r}".format(
            dist.raw_name, version, requires_python
        )
    )


class Resolver(BaseResolver):
    """Resolves which packages need to be installed/uninstalled to perform \
    the requested operation without breaking the requirements of any package.
    """

    _allowed_strategies = {"eager", "only-if-needed", "to-satisfy-only"}

    def __init__(
        self,
        preparer: RequirementPreparer,
        finder: PackageFinder,
        wheel_cache: Optional[WheelCache],
        make_install_req: InstallRequirementProvider,
        use_user_site: bool,
        ignore_dependencies: bool,
        ignore_installed: bool,
        ignore_requires_python: bool,
        force_reinstall: bool,
        upgrade_strategy: str,
        py_version_info: Optional[Tuple[int, ...]] = None,
    ) -> None:
        super().__init__()
        assert upgrade_strategy in self._allowed_strategies

        if py_version_info is None:
            py_version_info = sys.version_info[:3]
        else:
            py_version_info = normalize_version_info(py_version_info)

        self._py_version_info = py_version_info

        self.preparer = preparer
        self.finder = finder
        self.wheel_cache = wheel_cache

        self.upgrade_strategy = upgrade_strategy
        self.force_reinstall = force_reinstall
        self.ignore_dependencies = ignore_dependencies
        self.ignore_installed = ignore_installed
        self.ignore_requires_python = ignore_requires_python
        self.use_user_site = use_user_site
        self._make_install_req = make_install_req

        self._discovered_dependencies: DiscoveredDependencies = defaultdict(list)

    def resolve(
        self, root_reqs: List[InstallRequirement], check_supported_wheels: bool
    ) -> RequirementSet:
        """Resolve what operations need to be done

        As a side-effect of this method, the packages (and their dependencies)
        are downloaded, unpacked and prepared for installation. This
        preparation is done by ``pip.operations.prepare``.

        Once PyPI has static dependency metadata available, it would be
        possible to move the preparation to become a step separated from
        dependency resolution.
        """
        requirement_set = RequirementSet(check_supported_wheels=check_supported_wheels)
        for req in root_reqs:
            if req.constraint:
                check_invalid_constraint_type(req)
            self._add_requirement_to_set(requirement_set, req)

        # Actually prepare the files, and collect any exceptions. Most hash
        # exceptions cannot be checked ahead of time, because
        # _populate_link() needs to be called before we can make decisions
        # based on link type.
        discovered_reqs: List[InstallRequirement] = []
        hash_errors = HashErrors()
        for req in chain(requirement_set.all_requirements, discovered_reqs):
            try:
                discovered_reqs.extend(self._resolve_one(requirement_set, req))
            except HashError as exc:
                exc.req = req
                hash_errors.append(exc)

        if hash_errors:
            raise hash_errors

        return requirement_set

    def _add_requirement_to_set(
        self,
        requirement_set: RequirementSet,
        install_req: InstallRequirement,
        parent_req_name: Optional[str] = None,
        extras_requested: Optional[Iterable[str]] = None,
    ) -> Tuple[List[InstallRequirement], Optional[InstallRequirement]]:
        """Add install_req as a requirement to install.

        :param parent_req_name: The name of the requirement that needed this
            added. The name is used because when multiple unnamed requirements
            resolve to the same name, we could otherwise end up with dependency
            links that point outside the Requirements set. parent_req must
            already be added. Note that None implies that this is a user
            supplied requirement, vs an inferred one.
        :param extras_requested: an iterable of extras used to evaluate the
            environment markers.
        :return: Additional requirements to scan. That is either [] if
            the requirement is not applicable, or [install_req] if the
            requirement is applicable and has just been added.
        """
        # If the markers do not match, ignore this requirement.
        if not install_req.match_markers(extras_requested):
            logger.info(
                "Ignoring %s: markers '%s' don't match your environment",
                install_req.name,
                install_req.markers,
            )
            return [], None

        # If the wheel is not supported, raise an error.
        # Should check this after filtering out based on environment markers to
        # allow specifying different wheels based on the environment/OS, in a
        # single requirements file.
        if install_req.link and install_req.link.is_wheel:
            wheel = Wheel(install_req.link.filename)
            tags = compatibility_tags.get_supported()
            if requirement_set.check_supported_wheels and not wheel.supported(tags):
                raise InstallationError(
                    "{} is not a supported wheel on this platform.".format(
                        wheel.filename
                    )
                )

        # This next bit is really a sanity check.
        assert (
            not install_req.user_supplied or parent_req_name is None
        ), "a user supplied req shouldn't have a parent"

        # Unnamed requirements are scanned again and the requirement won't be
        # added as a dependency until after scanning.
        if not install_req.name:
            requirement_set.add_unnamed_requirement(install_req)
            return [install_req], None

        try:
            existing_req: Optional[
                InstallRequirement
            ] = requirement_set.get_requirement(install_req.name)
        except KeyError:
            existing_req = None

        has_conflicting_requirement = (
            parent_req_name is None
            and existing_req
            and not existing_req.constraint
            and existing_req.extras == install_req.extras
            and existing_req.req
            and install_req.req
            and existing_req.req.specifier != install_req.req.specifier
        )
        if has_conflicting_requirement:
            raise InstallationError(
                "Double requirement given: {} (already in {}, name={!r})".format(
                    install_req, existing_req, install_req.name
                )
            )

        # When no existing requirement exists, add the requirement as a
        # dependency and it will be scanned again after.
        if not existing_req:
            requirement_set.add_named_requirement(install_req)
            # We'd want to rescan this requirement later
            return [install_req], install_req

        # Assume there's no need to scan, and that we've already
        # encountered this for scanning.
        if install_req.constraint or not existing_req.constraint:
            return [], existing_req

        does_not_satisfy_constraint = install_req.link and not (
            existing_req.link and install_req.link.path == existing_req.link.path
        )
        if does_not_satisfy_constraint:
            raise InstallationError(
                "Could not satisfy constraints for '{}': "
                "installation from path or url cannot be "
                "constrained to a version".format(install_req.name)
            )
        # If we're now installing a constraint, mark the existing
        # object for real installation.
        existing_req.constraint = False
        # If we're now installing a user supplied requirement,
        # mark the existing object as such.
        if install_req.user_supplied:
            existing_req.user_supplied = True
        existing_req.extras = tuple(
            sorted(set(existing_req.extras) | set(install_req.extras))
        )
        logger.debug(
            "Setting %s extras to: %s",
            existing_req,
            existing_req.extras,
        )
        # Return the existing requirement for addition to the parent and
        # scanning again.
        return [existing_req], existing_req

    def _is_upgrade_allowed(self, req: InstallRequirement) -> bool:
        if self.upgrade_strategy == "to-satisfy-only":
            return False
        elif self.upgrade_strategy == "eager":
            return True
        else:
            assert self.upgrade_strategy == "only-if-needed"
            return req.user_supplied or req.constraint

    def _set_req_to_reinstall(self, req: InstallRequirement) -> None:
        """
        Set a requirement to be installed.
        """
        # Don't uninstall the conflict if doing a user install and the
        # conflict is not a user install.
        if ((not self.use_user_site
                or req.satisfied_by.in_usersite)
                and req.satisfied_by.in_install_path):
            req.should_reinstall = True
        req.satisfied_by = None

    def _check_skip_installed(
        self, req_to_install: InstallRequirement
    ) -> Optional[str]:
        """Check if req_to_install should be skipped.

        This will check if the req is installed, and whether we should upgrade
        or reinstall it, taking into account all the relevant user options.

        After calling this req_to_install will only have satisfied_by set to
        None if the req_to_install is to be upgraded/reinstalled etc. Any
        other value will be a dist recording the current thing installed that
        satisfies the requirement.

        Note that for vcs urls and the like we can't assess skipping in this
        routine - we simply identify that we need to pull the thing down,
        then later on it is pulled down and introspected to assess upgrade/
        reinstalls etc.

        :return: A text reason for why it was skipped, or None.
        """
        if self.ignore_installed:
            return None

        req_to_install.check_if_exists(self.use_user_site)
        if not req_to_install.satisfied_by:
            return None

        if self.force_reinstall:
            self._set_req_to_reinstall(req_to_install)
            return None

        if not self._is_upgrade_allowed(req_to_install):
            if self.upgrade_strategy == "only-if-needed":
                return "already satisfied, skipping upgrade"
            return "already satisfied"

        # Check for the possibility of an upgrade.  For link-based
        # requirements we have to pull the tree down and inspect to assess
        # the version #, so it's handled way down.
        if not req_to_install.link:
            try:
                self.finder.find_requirement(req_to_install, upgrade=True)
            except BestVersionAlreadyInstalled:
                # Then the best version is installed.
                return "already up-to-date"
            except DistributionNotFound:
                # No distribution found, so we squash the error.  It will
                # be raised later when we re-try later to do the install.
                # Why don't we just raise here?
                pass

        self._set_req_to_reinstall(req_to_install)
        return None

    def _find_requirement_link(self, req: InstallRequirement) -> Optional[Link]:
        upgrade = self._is_upgrade_allowed(req)
        best_candidate = self.finder.find_requirement(req, upgrade)
        if not best_candidate:
            return None

        # Log a warning per PEP 592 if necessary before returning.
        link = best_candidate.link
        if link.is_yanked:
            reason = link.yanked_reason or "<none given>"
            msg = (
                # Mark this as a unicode string to prevent
                # "UnicodeEncodeError: 'ascii' codec can't encode character"
                # in Python 2 when the reason contains non-ascii characters.
                "The candidate selected for download or install is a "
                "yanked version: {candidate}\n"
                "Reason for being yanked: {reason}"
            ).format(candidate=best_candidate, reason=reason)
            logger.warning(msg)

        return link

    def _populate_link(self, req: InstallRequirement) -> None:
        """Ensure that if a link can be found for this, that it is found.

        Note that req.link may still be None - if the requirement is already
        installed and not needed to be upgraded based on the return value of
        _is_upgrade_allowed().

        If preparer.require_hashes is True, don't use the wheel cache, because
        cached wheels, always built locally, have different hashes than the
        files downloaded from the index server and thus throw false hash
        mismatches. Furthermore, cached wheels at present have undeterministic
        contents due to file modification times.
        """
        if req.link is None:
            req.link = self._find_requirement_link(req)

        if self.wheel_cache is None or self.preparer.require_hashes:
            return
        cache_entry = self.wheel_cache.get_cache_entry(
            link=req.link,
            package_name=req.name,
            supported_tags=get_supported(),
        )
        if cache_entry is not None:
            logger.debug("Using cached wheel link: %s", cache_entry.link)
            if req.link is req.original_link and cache_entry.persistent:
                req.cached_wheel_source_link = req.link
            if cache_entry.origin is not None:
                req.download_info = cache_entry.origin
            else:
                # Legacy cache entry that does not have origin.json.
                # download_info may miss the archive_info.hashes field.
                req.download_info = direct_url_from_link(
                    req.link, link_is_in_wheel_cache=cache_entry.persistent
                )
            req.link = cache_entry.link

    def _get_dist_for(self, req: InstallRequirement) -> BaseDistribution:
        """Takes a InstallRequirement and returns a single AbstractDist \
        representing a prepared variant of the same.
        """
        if req.editable:
            return self.preparer.prepare_editable_requirement(req)

        # satisfied_by is only evaluated by calling _check_skip_installed,
        # so it must be None here.
        assert req.satisfied_by is None
        skip_reason = self._check_skip_installed(req)

        if req.satisfied_by:
            return self.preparer.prepare_installed_requirement(req, skip_reason)

        # We eagerly populate the link, since that's our "legacy" behavior.
        self._populate_link(req)
        dist = self.preparer.prepare_linked_requirement(req)

        # NOTE
        # The following portion is for determining if a certain package is
        # going to be re-installed/upgraded or not and reporting to the user.
        # This should probably get cleaned up in a future refactor.

        # req.req is only avail after unpack for URL
        # pkgs repeat check_if_exists to uninstall-on-upgrade
        # (#14)
        if not self.ignore_installed:
            req.check_if_exists(self.use_user_site)

        if req.satisfied_by:
            should_modify = (
                self.upgrade_strategy != "to-satisfy-only"
                or self.force_reinstall
                or self.ignore_installed
                or req.link.scheme == "file"
            )
            if should_modify:
                self._set_req_to_reinstall(req)
            else:
                logger.info(
                    "Requirement already satisfied (use --upgrade to upgrade): %s",
                    req,
                )
        return dist

    def _resolve_one(
        self,
        requirement_set: RequirementSet,
        req_to_install: InstallRequirement,
    ) -> List[InstallRequirement]:
        """Prepare a single requirements file.

        :return: A list of additional InstallRequirements to also install.
        """
        # Tell user what we are doing for this requirement:
        # obtain (editable), skipping, processing (local url), collecting
        # (remote url or package name)
        if req_to_install.constraint or req_to_install.prepared:
            return []

        req_to_install.prepared = True

        # Parse and return dependencies
        dist = self._get_dist_for(req_to_install)
        # This will raise UnsupportedPythonVersion if the given Python
        # version isn't compatible with the distribution's Requires-Python.
        _check_dist_requires_python(
            dist,
            version_info=self._py_version_info,
            ignore_requires_python=self.ignore_requires_python,
        )

        more_reqs: List[InstallRequirement] = []

        def add_req(subreq: Requirement, extras_requested: Iterable[str]) -> None:
            # This idiosyncratically converts the Requirement to str and let
            # make_install_req then parse it again into Requirement. But this is
            # the legacy resolver so I'm just not going to bother refactoring.
            sub_install_req = self._make_install_req(str(subreq), req_to_install)
            parent_req_name = req_to_install.name
            to_scan_again, add_to_parent = self._add_requirement_to_set(
                requirement_set,
                sub_install_req,
                parent_req_name=parent_req_name,
                extras_requested=extras_requested,
            )
            if parent_req_name and add_to_parent:
                self._discovered_dependencies[parent_req_name].append(add_to_parent)
            more_reqs.extend(to_scan_again)

        with indent_log():
            # We add req_to_install before its dependencies, so that we
            # can refer to it when adding dependencies.
            if not requirement_set.has_requirement(req_to_install.name):
                # 'unnamed' requirements will get added here
                # 'unnamed' requirements can only come from being directly
                # provided by the user.
                assert req_to_install.user_supplied
                self._add_requirement_to_set(
                    requirement_set, req_to_install, parent_req_name=None
                )

            if not self.ignore_dependencies:
                if req_to_install.extras:
                    logger.debug(
                        "Installing extra requirements: %r",
                        ",".join(req_to_install.extras),
                    )
                missing_requested = sorted(
                    set(req_to_install.extras) - set(dist.iter_provided_extras())
                )
                for missing in missing_requested:
                    logger.warning(
                        "%s %s does not provide the extra '%s'",
                        dist.raw_name,
                        dist.version,
                        missing,
                    )

                available_requested = sorted(
                    set(dist.iter_provided_extras()) & set(req_to_install.extras)
                )
                for subreq in dist.iter_dependencies(available_requested):
                    add_req(subreq, extras_requested=available_requested)

        return more_reqs

    def get_installation_order(
        self, req_set: RequirementSet
    ) -> List[InstallRequirement]:
        """Create the installation order.

        The installation order is topological - requirements are installed
        before the requiring thing. We break cycles at an arbitrary point,
        and make no other guarantees.
        """
        # The current implementation, which we may change at any point
        # installs the user specified things in the order given, except when
        # dependencies must come earlier to achieve topological order.
        order = []
        ordered_reqs: Set[InstallRequirement] = set()

        def schedule(req: InstallRequirement) -> None:
            if req.satisfied_by or req in ordered_reqs:
                return
            if req.constraint:
                return
            ordered_reqs.add(req)
            for dep in self._discovered_dependencies[req.name]:
                schedule(dep)
            order.append(req)

        for install_req in req_set.requirements.values():
            schedule(install_req)
        return order
python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py000064400000000000151732701210021421 0ustar00python3.12/site-packages/pip/_internal/models/direct_url.py000064400000015423151732701210017651 0ustar00""" PEP 610 """
import json
import re
import urllib.parse
from typing import Any, Dict, Iterable, Optional, Type, TypeVar, Union

__all__ = [
    "DirectUrl",
    "DirectUrlValidationError",
    "DirInfo",
    "ArchiveInfo",
    "VcsInfo",
]

T = TypeVar("T")

DIRECT_URL_METADATA_NAME = "direct_url.json"
ENV_VAR_RE = re.compile(r"^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$")


class DirectUrlValidationError(Exception):
    pass


def _get(
    d: Dict[str, Any], expected_type: Type[T], key: str, default: Optional[T] = None
) -> Optional[T]:
    """Get value from dictionary and verify expected type."""
    if key not in d:
        return default
    value = d[key]
    if not isinstance(value, expected_type):
        raise DirectUrlValidationError(
            "{!r} has unexpected type for {} (expected {})".format(
                value, key, expected_type
            )
        )
    return value


def _get_required(
    d: Dict[str, Any], expected_type: Type[T], key: str, default: Optional[T] = None
) -> T:
    value = _get(d, expected_type, key, default)
    if value is None:
        raise DirectUrlValidationError(f"{key} must have a value")
    return value


def _exactly_one_of(infos: Iterable[Optional["InfoType"]]) -> "InfoType":
    infos = [info for info in infos if info is not None]
    if not infos:
        raise DirectUrlValidationError(
            "missing one of archive_info, dir_info, vcs_info"
        )
    if len(infos) > 1:
        raise DirectUrlValidationError(
            "more than one of archive_info, dir_info, vcs_info"
        )
    assert infos[0] is not None
    return infos[0]


def _filter_none(**kwargs: Any) -> Dict[str, Any]:
    """Make dict excluding None values."""
    return {k: v for k, v in kwargs.items() if v is not None}


class VcsInfo:
    name = "vcs_info"

    def __init__(
        self,
        vcs: str,
        commit_id: str,
        requested_revision: Optional[str] = None,
    ) -> None:
        self.vcs = vcs
        self.requested_revision = requested_revision
        self.commit_id = commit_id

    @classmethod
    def _from_dict(cls, d: Optional[Dict[str, Any]]) -> Optional["VcsInfo"]:
        if d is None:
            return None
        return cls(
            vcs=_get_required(d, str, "vcs"),
            commit_id=_get_required(d, str, "commit_id"),
            requested_revision=_get(d, str, "requested_revision"),
        )

    def _to_dict(self) -> Dict[str, Any]:
        return _filter_none(
            vcs=self.vcs,
            requested_revision=self.requested_revision,
            commit_id=self.commit_id,
        )


class ArchiveInfo:
    name = "archive_info"

    def __init__(
        self,
        hash: Optional[str] = None,
        hashes: Optional[Dict[str, str]] = None,
    ) -> None:
        # set hashes before hash, since the hash setter will further populate hashes
        self.hashes = hashes
        self.hash = hash

    @property
    def hash(self) -> Optional[str]:
        return self._hash

    @hash.setter
    def hash(self, value: Optional[str]) -> None:
        if value is not None:
            # Auto-populate the hashes key to upgrade to the new format automatically.
            # We don't back-populate the legacy hash key from hashes.
            try:
                hash_name, hash_value = value.split("=", 1)
            except ValueError:
                raise DirectUrlValidationError(
                    f"invalid archive_info.hash format: {value!r}"
                )
            if self.hashes is None:
                self.hashes = {hash_name: hash_value}
            elif hash_name not in self.hashes:
                self.hashes = self.hashes.copy()
                self.hashes[hash_name] = hash_value
        self._hash = value

    @classmethod
    def _from_dict(cls, d: Optional[Dict[str, Any]]) -> Optional["ArchiveInfo"]:
        if d is None:
            return None
        return cls(hash=_get(d, str, "hash"), hashes=_get(d, dict, "hashes"))

    def _to_dict(self) -> Dict[str, Any]:
        return _filter_none(hash=self.hash, hashes=self.hashes)


class DirInfo:
    name = "dir_info"

    def __init__(
        self,
        editable: bool = False,
    ) -> None:
        self.editable = editable

    @classmethod
    def _from_dict(cls, d: Optional[Dict[str, Any]]) -> Optional["DirInfo"]:
        if d is None:
            return None
        return cls(editable=_get_required(d, bool, "editable", default=False))

    def _to_dict(self) -> Dict[str, Any]:
        return _filter_none(editable=self.editable or None)


InfoType = Union[ArchiveInfo, DirInfo, VcsInfo]


class DirectUrl:
    def __init__(
        self,
        url: str,
        info: InfoType,
        subdirectory: Optional[str] = None,
    ) -> None:
        self.url = url
        self.info = info
        self.subdirectory = subdirectory

    def _remove_auth_from_netloc(self, netloc: str) -> str:
        if "@" not in netloc:
            return netloc
        user_pass, netloc_no_user_pass = netloc.split("@", 1)
        if (
            isinstance(self.info, VcsInfo)
            and self.info.vcs == "git"
            and user_pass == "git"
        ):
            return netloc
        if ENV_VAR_RE.match(user_pass):
            return netloc
        return netloc_no_user_pass

    @property
    def redacted_url(self) -> str:
        """url with user:password part removed unless it is formed with
        environment variables as specified in PEP 610, or it is ``git``
        in the case of a git URL.
        """
        purl = urllib.parse.urlsplit(self.url)
        netloc = self._remove_auth_from_netloc(purl.netloc)
        surl = urllib.parse.urlunsplit(
            (purl.scheme, netloc, purl.path, purl.query, purl.fragment)
        )
        return surl

    def validate(self) -> None:
        self.from_dict(self.to_dict())

    @classmethod
    def from_dict(cls, d: Dict[str, Any]) -> "DirectUrl":
        return DirectUrl(
            url=_get_required(d, str, "url"),
            subdirectory=_get(d, str, "subdirectory"),
            info=_exactly_one_of(
                [
                    ArchiveInfo._from_dict(_get(d, dict, "archive_info")),
                    DirInfo._from_dict(_get(d, dict, "dir_info")),
                    VcsInfo._from_dict(_get(d, dict, "vcs_info")),
                ]
            ),
        )

    def to_dict(self) -> Dict[str, Any]:
        res = _filter_none(
            url=self.redacted_url,
            subdirectory=self.subdirectory,
        )
        res[self.info.name] = self.info._to_dict()
        return res

    @classmethod
    def from_json(cls, s: str) -> "DirectUrl":
        return cls.from_dict(json.loads(s))

    def to_json(self) -> str:
        return json.dumps(self.to_dict(), sort_keys=True)

    def is_local_editable(self) -> bool:
        return isinstance(self.info, DirInfo) and self.info.editable
python3.12/site-packages/pip/_internal/models/index.py000064400000002006151732701210016615 0ustar00import urllib.parse


class PackageIndex:
    """Represents a Package Index and provides easier access to endpoints"""

    __slots__ = ["url", "netloc", "simple_url", "pypi_url", "file_storage_domain"]

    def __init__(self, url: str, file_storage_domain: str) -> None:
        super().__init__()
        self.url = url
        self.netloc = urllib.parse.urlsplit(url).netloc
        self.simple_url = self._url_for_path("simple")
        self.pypi_url = self._url_for_path("pypi")

        # This is part of a temporary hack used to block installs of PyPI
        # packages which depend on external urls only necessary until PyPI can
        # block such packages themselves
        self.file_storage_domain = file_storage_domain

    def _url_for_path(self, path: str) -> str:
        return urllib.parse.urljoin(self.url, path)


PyPI = PackageIndex("https://pypi.org/", file_storage_domain="files.pythonhosted.org")
TestPyPI = PackageIndex(
    "https://test.pypi.org/", file_storage_domain="test-files.pythonhosted.org"
)
python3.12/site-packages/pip/_internal/models/installation_report.py000064400000005402151732701210021605 0ustar00from typing import Any, Dict, Sequence

from pip._vendor.packaging.markers import default_environment

from pip import __version__
from pip._internal.req.req_install import InstallRequirement


class InstallationReport:
    def __init__(self, install_requirements: Sequence[InstallRequirement]):
        self._install_requirements = install_requirements

    @classmethod
    def _install_req_to_dict(cls, ireq: InstallRequirement) -> Dict[str, Any]:
        assert ireq.download_info, f"No download_info for {ireq}"
        res = {
            # PEP 610 json for the download URL. download_info.archive_info.hashes may
            # be absent when the requirement was installed from the wheel cache
            # and the cache entry was populated by an older pip version that did not
            # record origin.json.
            "download_info": ireq.download_info.to_dict(),
            # is_direct is true if the requirement was a direct URL reference (which
            # includes editable requirements), and false if the requirement was
            # downloaded from a PEP 503 index or --find-links.
            "is_direct": ireq.is_direct,
            # is_yanked is true if the requirement was yanked from the index, but
            # was still selected by pip to conform to PEP 592.
            "is_yanked": ireq.link.is_yanked if ireq.link else False,
            # requested is true if the requirement was specified by the user (aka
            # top level requirement), and false if it was installed as a dependency of a
            # requirement. https://peps.python.org/pep-0376/#requested
            "requested": ireq.user_supplied,
            # PEP 566 json encoding for metadata
            # https://www.python.org/dev/peps/pep-0566/#json-compatible-metadata
            "metadata": ireq.get_dist().metadata_dict,
        }
        if ireq.user_supplied and ireq.extras:
            # For top level requirements, the list of requested extras, if any.
            res["requested_extras"] = sorted(ireq.extras)
        return res

    def to_dict(self) -> Dict[str, Any]:
        return {
            "version": "1",
            "pip_version": __version__,
            "install": [
                self._install_req_to_dict(ireq) for ireq in self._install_requirements
            ],
            # https://peps.python.org/pep-0508/#environment-markers
            # TODO: currently, the resolver uses the default environment to evaluate
            # environment markers, so that is what we report here. In the future, it
            # should also take into account options such as --python-version or
            # --platform, perhaps under the form of an environment_override field?
            # https://github.com/pypa/pip/issues/11198
            "environment": default_environment(),
        }
python3.12/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-312.pyc000064400000004424151732701210026151 0ustar00�

R`i��P�ddlmZmZmZddlmZddlmZddlm	Z	Gd�d�Z
y)�)�Any�Dict�Sequence)�default_environment)�__version__)�InstallRequirementc�X�eZdZdeefd�Zededeee	ffd��Z
deee	ffd�Zy)�InstallationReport�install_requirementsc��||_y)N)�_install_requirements)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/installation_report.py�__init__zInstallationReport.__init__
s
��%9��"��ireq�returnc�n�|js
Jd|����|jj�|j|jr|jjnd|j
|j
�jd�}|j
r$|jrt|j�|d<|S)NzNo download_info for F)�
download_info�	is_direct�	is_yanked�	requested�metadata�requested_extras)
r�to_dictr�linkr�
user_supplied�get_dist�
metadata_dict�extras�sorted)�clsr�ress   r�_install_req_to_dictz'InstallationReport._install_req_to_dict
s����!�!�A�%:�4�&�#A�A�!�"�/�/�7�7�9����15�	�	����,�,�u��+�+��
�
��5�5�'
��*���$�+�+�&,�T�[�[�&9�C�"�#��
rc��dt|jD�cgc]}|j|���c}t�d�Scc}w)N�1)�version�pip_version�install�environment)rr
r$r)rrs  rrzInstallationReport.to_dict*sH���&�<@�<V�<V��<V�D��)�)�$�/�<V��/�0�

�
	
��s�;N)�__name__�
__module__�__qualname__rrr�classmethodr�strrr$r�rrr
r
	sS��:�X�6H�-I�:���(:��t�C��H�~����8
��c�3�h��
rr
N)�typingrrr�pip._vendor.packaging.markersr�pipr�pip._internal.req.req_installrr
r0rr�<module>r5s��&�&�=��<�/
�/
rpython3.12/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-312.pyc000064400000003552151732701210025242 0ustar00�

R`is��0�ddlmZddlmZGd�d�Zy)�)�Optional)�
FormatControlc
�N�eZdZdZgd�Z				ddededeededeed	dfd
�Zy)�SelectionPreferenceszd
    Encapsulates the candidate selection preferences for downloading
    and installing files.
    ��allow_yanked�allow_all_prereleases�format_control�
prefer_binary�ignore_requires_pythonNrr	r
rr�returnc�R�|�d}||_||_||_||_||_y)awCreate a SelectionPreferences object.

        :param allow_yanked: Whether files marked as yanked (in the sense
            of PEP 592) are permitted to be candidates for install.
        :param format_control: A FormatControl object or None. Used to control
            the selection of source packages / binary packages when consulting
            the index and links.
        :param prefer_binary: Whether to prefer an old, but valid, binary
            dist over a new source dist.
        :param ignore_requires_python: Whether to ignore incompatible
            "Requires-Python" values in links. Defaults to False.
        NFr)�selfrr	r
rrs      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/selection_prefs.py�__init__zSelectionPreferences.__init__s8��("�)�%*�"�(���%:��"�,���*���&<��#�)FNFN)	�__name__�
__module__�__qualname__�__doc__�	__slots__�boolrrr�rrrrsd���
�I�',�26�#�15�
=��=� $�=�!��/�	=�
�=�!)���
=�
�=rrN)�typingr�#pip._internal.models.format_controlrrrrr�<module>rs���=�-=�-=rpython3.12/site-packages/pip/_internal/models/__pycache__/__init__.cpython-312.pyc000064400000000471151732701210023612 0ustar00�

R`i?���dZy)z8A package that contains models that represent entities.
N)�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/__init__.py�<module>rs
��rpython3.12/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-312.pyc000064400000012006151732701210024506 0ustar00�

R`i#���ddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZmZej"e�ZGd�d�Zy)	�N)�List)�canonicalize_name)�PyPI)�has_tls)�normalize_path�redact_auth_from_urlc	��eZdZdZgd�Zedeedeededdfd��Z	deedeededdfd	�Z
defd
�Zdedeefd�Zy)
�SearchScopezF
    Encapsulates the locations that pip is configured to search.
    ��
find_links�
index_urls�no_indexrr
r�returnc��g}|D]P}|jd�r,t|�}tjj	|�r|}|j|��Rt
�s`tj||�D]G}tjj|�}|jdk(s�2tjd�n||||��S)zQ
        Create a SearchScope object after normalizing the `find_links`.
        �~�httpszipip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.r)�
startswithr�os�path�exists�appendr�	itertools�chain�urllib�parse�urlparse�scheme�logger�warning)�clsrr
r�built_find_links�link�new_link�parseds        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/search_scope.py�createzSearchScope.creates���')���D����s�#�)�$�/���7�7�>�>�(�+�#�D��#�#�D�)���y�!���
�4D�E�����.�.�t�4���=�=�G�+��N�N�%��
�F��'�!��
�	
�Nc�.�||_||_||_y�Nr)�selfrr
rs    r%�__init__zSearchScope.__init__Cs��%���$��� ��
r'c�j�g}g}|jr�|jtjgk7r�|jD]k}t|�}tj
j
|�}|js"|jstjd|�|j|��m|jdjdj|���|jr@|jdjdjd�|jD����dj|�S)Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c3�2K�|]}t|����y�wr))r)�.0�urls  r%�	<genexpr>z6SearchScope.get_formatted_locations.<locals>.<genexpr>ks����S�?�C�2�3�7�?�s��
)r
r�
simple_urlrrr�urlsplitr�netlocrrr�format�joinr)r*�lines�redacted_index_urlsr/�redacted_index_url�purls      r%�get_formatted_locationsz#SearchScope.get_formatted_locationsMs����� ���?�?�t���4�?�?�2C�C�����%9�#�%>�"��|�|�,�,�-?�@���{�{�4�;�;��N�N�T�*��
$�*�*�+=�>�#'�&
�L�L�(�/�/��	�	�:M�0N�O�
��?�?��L�L�&�-�-��I�I�S�4�?�?�S�S��
�
�y�y���r'�project_namec�r��dtdtf�fd�}|jD�cgc]
}||���c}Scc}w)z�Returns the locations found via self.index_urls

        Checks the url_name on the main (first in the list) index and
        use this url_name to produce all locations
        r/rc���tj|tjj	t����}|j
d�s|dz}|S)N�/)�	posixpathr6rr�quoter�endswith)r/�locr<s  �r%�mkurl_pypi_urlz<SearchScope.get_index_urls_locations.<locals>.mkurl_pypi_urlwsG����.�.��V�\�\�'�'�(9�,�(G�H��C��<�<��$��C�i���Jr')�strr
)r*r<rDr/s `  r%�get_index_urls_locationsz$SearchScope.get_index_urls_locationsps9���	��	��	�04���?����s�#��?�?��?s�4)
�__name__�
__module__�__qualname__�__doc__�	__slots__�classmethodrrE�boolr&r+r;rF�r'r%r
r
s����9�I��'
���I�'
���I�'
��	'
�

�'
��'
�R!���I�!���I�!��	!�

�!�! ��! �F@�S�@�T�#�Y�@r'r
)r�loggingrr@�urllib.parser�typingr�pip._vendor.packaging.utilsr�pip._internal.models.indexr�pip._internal.utils.compatr�pip._internal.utils.miscrr�	getLoggerrGrr
rNr'r%�<module>rWsC����	����9�+�.�I�	��	�	�8�	$��s@�s@r'python3.12/site-packages/pip/_internal/models/__pycache__/target_python.cpython-312.pyc000064400000011610151732701210024737 0ustar00�

R`i���`�ddlZddlmZmZmZmZddlmZddlm	Z	m
Z
ddlmZGd�d�Z
y)�N)�List�Optional�Set�Tuple)�Tag)�
get_supported�version_info_to_nodot)�normalize_version_infoc��eZdZdZgd�Z				ddeeedeee	dfdeeedeed	df
d
�Z
d	efd�Zd	eefd�Z
d	eefd
�Zy)�TargetPythonzx
    Encapsulates the properties of a Python interpreter one is targeting
    for a package install, download, etc.
    )�_given_py_version_info�abis�implementation�	platforms�
py_version�py_version_info�_valid_tags�_valid_tags_setNrr.rr�returnc��||_|�tjdd}nt|�}dj	tt|dd��}||_||_||_	||_
||_d|_d|_
y)a<
        :param platforms: A list of strings or None. If None, searches for
            packages that are supported by the current system. Otherwise, will
            find packages that can be built on the platforms passed in. These
            packages will only be downloaded for distribution: they will
            not be built locally.
        :param py_version_info: An optional tuple of ints representing the
            Python version information to use (e.g. `sys.version_info[:3]`).
            This can have length 1, 2, or 3 when provided.
        :param abis: A list of strings or None. This is passed to
            compatibility_tags.py's get_supported() function as is.
        :param implementation: A string or None. This is passed to
            compatibility_tags.py's get_supported() function as is.
        N��.�)r
�sys�version_infor
�join�map�strrrrrrrr)�selfrrrrrs      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/target_python.py�__init__zTargetPython.__init__s���,'6��#��"�!�.�.�r��2�O�4�_�E�O��X�X�c�#��r��':�;�<�
���	�,���"���$���.���15���37���c���d}|j�"djd�|jD��}d|jfd|fd|jfd|jfg}djd	�|D��S)
zD
        Format the given, non-None attributes for display.
        Nrc3�2K�|]}t|����y�w)N)r)�.0�parts  r �	<genexpr>z,TargetPython.format_given.<locals>.<genexpr>Ks����'�&A�d��D�	�&A�s�rrrr� c3�6K�|]\}}|��	|�d|�����y�w)N�=�)r%�key�values   r r'z,TargetPython.format_given.<locals>.<genexpr>Us(����
�1;�:�3��u�?P�s�e�1�U�I���s�
�)r
rrrr)r�display_version�
key_valuess   r �format_givenzTargetPython.format_givenEs������&�&�2�!�h�h�'�&*�&A�&A�'��O�
�$�.�.�)�
�_�-�
�T�Y�Y��
�t�2�2�3�	
�
��x�x�
�1;�
�
�	
r"c���|j�P|j}|�d}nt|�}t||j|j
|j��}||_|jS)z�
        Return the supported PEP 425 tags to check wheel candidates against.

        The tags are returned in order of preference (most preferred first).
        N)�versionrr�impl)rr
r	rrrr)rrr2�tagss    r �get_sorted_tagszTargetPython.get_sorted_tagsYsl�����#�#�9�9�O��&���/��@�� ���.�.��Y�Y��(�(�	�D� $�D�����r"c�n�|j�t|j��|_|jS)zlExactly the same as get_sorted_tags, but returns a set.

        This is important for performance.
        )r�setr5)rs r �get_unsorted_tagszTargetPython.get_unsorted_tagsrs2��
���'�#&�t�';�';�'=�#>�D� ��#�#�#r")NNNN)�__name__�
__module__�__qualname__�__doc__�	__slots__rrrr�intr!r0rr5rr8r+r"r rr
s����
	�I�*.�59�$(�(,�'8��D��I�&�'8�"�%��S��/�2�'8��t�C�y�!�	'8�
!��
�'8�
�
'8�R
�c�
�( ��c�� �2$�3�s�8�$r"r)r�typingrrrr�pip._vendor.packaging.tagsr�&pip._internal.utils.compatibility_tagsrr	�pip._internal.utils.miscr
rr+r"r �<module>rCs#��
�-�-�*�W�;�p$�p$r"python3.12/site-packages/pip/_internal/models/__pycache__/wheel.cpython-312.pyc000064400000013257151732701210023165 0ustar00�

R`i��P�dZddlZddlmZmZmZddlmZddlm	Z	Gd�d�Z
y)z`Represents a wheel file and provides access to the various parts of the
name that have meaning.
�N)�Dict�Iterable�List)�Tag)�InvalidWheelFilenamec��eZdZdZej
dej�Zdeddfd�Z	de
efd�Zde
ede
fd	�Zde
ed
eee
fde
fd�Zdeedefd�Zy)
�WheelzA wheel filez�^(?P<namever>(?P<name>[^\s-]+?)-(?P<ver>[^\s-]*?))
        ((-(?P<build>\d[^-]*?))?-(?P<pyver>[^\s-]+?)-(?P<abi>[^\s-]+?)-(?P<plat>[^\s-]+?)
        \.whl|\.dist-info)$�filename�returnNc��|jj|�}|st|�d���||_|j	d�jdd�|_|j	d�jdd�|_|j	d�|_|j	d�jd�|_
|j	d	�jd�|_|j	d
�jd�|_|jD���chc]1}|jD] }|jD]}t|||����"�3c}}}|_ycc}}}w)zX
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        z is not a valid wheel filename.�name�_�-�ver�build�pyver�.�abi�platN)�
wheel_file_re�matchrr
�group�replacer
�version�	build_tag�split�
pyversions�abis�platsr�	file_tags)�selfr
�
wheel_info�x�y�zs      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/wheel.py�__init__zWheel.__init__s&���'�'�-�-�h�7�
��&�(��3R�'S�T�T� ��
��$�$�V�,�4�4�S�#�>��	�"�'�'��.�6�6�s�C�@���#�)�)�'�2���$�*�*�7�3�9�9�#�>����$�$�U�+�1�1�#�6��	��%�%�f�-�3�3�C�8��
�#'�/�/�
�"1�Q�4�9�9�a�d�j�j��C��1�a�L�j�L�9�L�/�
����
s�6Ec�:�td�|jD��S)z4Return the wheel's tags as a sorted list of strings.c3�2K�|]}t|����y�w�N)�str)�.0�tags  r&�	<genexpr>z0Wheel.get_formatted_file_tags.<locals>.<genexpr>.s����9�.�3�c�#�h�.�s�)�sortedr )r!s r&�get_formatted_file_tagszWheel.get_formatted_file_tags,s���9�$�.�.�9�9�9��tagsc�n��	t�fd�t|�D��S#t$rt��wxYw)a�Return the lowest index that one of the wheel's file_tag combinations
        achieves in the given list of supported tags.

        For example, if there are 8 supported tags and one of the file tags
        is first in the list, then return 0.

        :param tags: the PEP 425 tags to check the wheel against, in order
            with most preferred first.

        :raises ValueError: If none of the wheel's file tags match one of
            the supported tags.
        c3�F�K�|]\}}|�jvs�|���y�wr*)r )r,�i�tr!s   �r&r.z*Wheel.support_index_min.<locals>.<genexpr>>s!�����M�o�d�a���d�n�n�9L��o�s�!�!)�next�	enumerate�
StopIteration�
ValueError�r!r2s` r&�support_index_minzWheel.support_index_min0s4���	��M�i��o�M�M�M���	��,��	�s� �4�tag_to_priorityc�@��t�fd�|jD��S)a�Return the priority of the most preferred tag that one of the wheel's file
        tag combinations achieves in the given list of supported tags using the given
        tag_to_priority mapping, where lower priorities are more-preferred.

        This is used in place of support_index_min in some cases in order to avoid
        an expensive linear scan of a large list of tags.

        :param tags: the PEP 425 tags to check the wheel against.
        :param tag_to_priority: a mapping from tag to priority of that tag, where
            lower is more preferred.

        :raises ValueError: If none of the wheel's file tags match one of
            the supported tags.
        c3�2�K�|]}|�vs��|���y�wr*�)r,r-r=s  �r&r.z0Wheel.find_most_preferred_tag.<locals>.<genexpr>Ss!�����
�,:�S�c�_�>T�O�C� �N�s�	�
)�minr )r!r2r=s  `r&�find_most_preferred_tagzWheel.find_most_preferred_tagBs#���"�
�,0�N�N�
�
�	
r1c�:�|jj|�S)z�Return whether the wheel is compatible with one of the given tags.

        :param tags: the PEP 425 tags to check the wheel against.
        )r �
isdisjointr;s  r&�	supportedzWheel.supportedWs��
�>�>�,�,�T�2�2�2r1)�__name__�
__module__�__qualname__�__doc__�re�compile�VERBOSErr+r'rr0r�intr<rrBr�boolrEr@r1r&r	r	s�����B�J�J�	�	�
�
�	�M�
��
��
�,:��c��:��d�3�i��C��$
���I�
�04�S�#�X��
�	�
�*3�h�s�m�3��3r1r	)rIrJ�typingrrr�pip._vendor.packaging.tagsr�pip._internal.exceptionsrr	r@r1r&�<module>rRs'���
�'�'�*�9�P3�P3r1python3.12/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-312.pyc000064400000026015151732701210024211 0ustar00�

R`i���dZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZgd�Z
ed�ZdZej d�ZGd�d	e�Z	dd
eeefde
eded
e	ede	ef
d�Z	dd
eeefde
eded
e	edef
d�Zdee	dddfd�Zdedeeeffd�ZGd�d�ZGd�d�ZGd�d�ZeeeefZGd�d�Zy)z	 PEP 610 �N)�Any�Dict�Iterable�Optional�Type�TypeVar�Union)�	DirectUrl�DirectUrlValidationError�DirInfo�ArchiveInfo�VcsInfo�Tzdirect_url.jsonz.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$c��eZdZy)rN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/direct_url.pyrrs��rr�d�
expected_type�key�default�returnc�l�||vr|S||}t||�stdj|||���|S)z3Get value from dictionary and verify expected type.z-{!r} has unexpected type for {} (expected {}))�
isinstancer�format�rrrr�values     r�_getr!sL���!�|���
�c�F�E��e�]�+�&�;�B�B��s�M�
�
�	
�
�Lrc�B�t||||�}|�t|�d���|S)Nz must have a value)r!rrs     r�
_get_requiredr#)s1��
��M�3��0�E��}�&�#��.@�'A�B�B��Lr�infos�InfoTypec��|D�cgc]}|��|��	}}|std��t|�dkDrtd��|d�J�|dScc}w)Nz/missing one of archive_info, dir_info, vcs_info�z1more than one of archive_info, dir_info, vcs_infor)r�len)r$�infos  r�_exactly_one_ofr*2sk��#�8�e�d�t�'7�T�e�E�8��&�=�
�	
��5�z�A�~�&�?�
�	
���8������8�O��
9s
�A�A�kwargsc�\�|j�D��cic]\}}|��	||��
c}}Scc}}w)z Make dict excluding None values.)�items)r+�k�vs   r�_filter_noner0@s,��#�\�\�^�=�^�T�Q��q�}�A�q�D�^�=�=��=s�
(�(c	�x�eZdZdZ	ddededeeddfd�Zedeeee	fdedfd	��Z
deee	ffd
�Zy)r�vcs_infoN�vcs�	commit_id�requested_revisionrc�.�||_||_||_y�N�r3r5r4)�selfr3r4r5s    r�__init__zVcsInfo.__init__Hs�����"4���"��rrc	�x�|�y|t|td�t|td�t|td���S)Nr3r4r5)r3r4r5)r#�strr!��clsrs  r�
_from_dictzVcsInfo._from_dictRs<���9����a��e�,�#�A�s�K�8�#�A�s�,@�A�
�	
rc�Z�t|j|j|j��S)Nr8)r0r3r5r4�r9s r�_to_dictzVcsInfo._to_dict\s&������#�6�6��n�n�
�	
rr7)rrr�namer<rr:�classmethodrrr?rBrrrrrEs����D�-1�	#�
�#��#�%�S�M�	#�

�#��
�8�D��c��N�3�
���8K�
��
�
�$�s�C�x�.�
rrc���eZdZdZ		d
deedeeeefddfd�Zedeefd��Z	e	jdeeddfd	��Z	ed
eeeefdedfd��Z
deeeffd�Zy)r
�archive_infoN�hash�hashesrc� �||_||_yr7)rHrG)r9rGrHs   rr:zArchiveInfo.__init__gs�������	rc��|jSr7)�_hashrAs rrGzArchiveInfo.hashps���z�z�rr c�*�|�o	|jdd�\}}|j�||i|_||_y||jvr.|jj	�|_||j|<||_y#t$rtd|����wxYw)N�=r'z"invalid archive_info.hash format: )�split�
ValueErrorrrH�copyrK)r9r �	hash_name�
hash_values    rrGzArchiveInfo.hashts�����
�(-���C��(;�%�	�:�
�{�{�"�(�*�5�����
��$�+�+�-�"�k�k�.�.�0���)3����I�&���
���
�.�8��	�B���
�s�A:�:Brc�X�|�y|t|td�t|td���S)NrGrH�rGrH)r!r<�dictr=s  rr?zArchiveInfo._from_dict�s)���9����Q��V�,�T�!�T�8�5L�M�Mrc�D�t|j|j��S)NrT)r0rGrHrAs rrBzArchiveInfo._to_dict�s������4�;�;�?�?r)NN)rrrrCrr<rr:�propertyrG�setterrDrr?rBrrrr
r
ds����D�#�+/���s�m����c�3�h��(��
�	���h�s�m����
�[�[��(�3�-��D����"�N�8�D��c��N�3�N���8O�N��N�
@�$�s�C�x�.�@rr
c�j�eZdZdZ	d	deddfd�Zedeee	e
fdedfd��Zdee	e
ffd�Zy)
r�dir_info�editablerNc��||_yr7�r[)r9r[s  rr:zDirInfo.__init__�s��!��
rrc�<�|�y|t|tdd����S)Nr[F)rr])r#�boolr=s  rr?zDirInfo._from_dict�s ���9���M�!�T�:�u�M�N�Nrc�6�t|jxsd��S)Nr])r0r[rAs rrBzDirInfo._to_dict�s���T�]�]�%:�d�;�;r)F)
rrrrCr_r:rDrrr<rr?rBrrrrr�so���D��!��!�
�!��O�8�D��c��N�3�O���8K�O��O�
<�$�s�C�x�.�<rrc	���eZdZ	ddededeeddfd�Zdedefd�Zedefd	��Z	dd
�Z
edeee
fddfd��Zdeee
ffd
�Zededdfd��Zdefd�Zdefd�Zy)r
N�urlr)�subdirectoryrc�.�||_||_||_yr7)rbr)rc)r9rbr)rcs    rr:zDirectUrl.__init__�s�������	�(��r�netlocc���d|vr|S|jdd�\}}t|jt�r |jjdk(r|dk(r|St
j
|�r|S|S)N�@r'�git)rNrr)rr3�
ENV_VAR_RE�match)r9re�	user_pass�netloc_no_user_passs    r�_remove_auth_from_netlocz"DirectUrl._remove_auth_from_netloc�si���f���M�)/���c�1�)=�&�	�&��t�y�y�'�*��	�	�
�
��&��U�"��M����I�&��M�"�"rc�&�tjj|j�}|j	|j
�}tjj
|j||j|j|jf�}|S)z�url with user:password part removed unless it is formed with
        environment variables as specified in PEP 610, or it is ``git``
        in the case of a git URL.
        )�urllib�parse�urlsplitrbrmre�
urlunsplit�scheme�path�query�fragment)r9�purlre�surls    r�redacted_urlzDirectUrl.redacted_url�si���|�|�$�$�T�X�X�.���.�.�t�{�{�;���|�|�&�&�
�[�[�&�$�)�)�T�Z�Z����G�
���rc�B�|j|j��yr7)�	from_dict�to_dictrAs r�validatezDirectUrl.validate�s�����t�|�|�~�&rrc�>�tt|td�t|td�t	t
j
t|td��tj
t|td��tj
t|td��g���S)NrbrcrFrZr2)rbrcr))
r
r#r<r!r*r
r?rUrrr=s  rr{zDirectUrl.from_dict�sy����a��e�,��a��n�5� ��*�*�4��4��+H�I��&�&�t�A�t�Z�'@�A��&�&�t�A�t�Z�'@�A���

�
	
rc��t|j|j��}|jj	�||jj
<|S)N)rbrc)r0ryrcr)rBrC)r9�ress  rr|zDirectUrl.to_dict�sD����!�!��*�*�
��#�i�i�0�0�2��D�I�I�N�N���
r�sc�J�|jtj|��Sr7)r{�json�loads)r>r�s  r�	from_jsonzDirectUrl.from_json�s���}�}�T�Z�Z��]�+�+rc�L�tj|j�d��S)NT)�	sort_keys)r��dumpsr|rAs r�to_jsonzDirectUrl.to_json�s���z�z�$�,�,�.�D�9�9rc�f�t|jt�xr|jjSr7)rr)rr[rAs r�is_local_editablezDirectUrl.is_local_editable�s"���$�)�)�W�-�D�$�)�)�2D�2D�Drr7)rN)rrrr<r%rr:rmrWryr}rDrrr{r|r�r�r_r�rrrr
r
�s���
'+�	)�
�)��)��s�m�	)�

�)�#�s�#�s�#��
�c�
��
�'��
�$�s�C�x�.�
�[�
��
���c�3�h����,�#�,�+�,��,�:��:�E�4�Err
r7)�__doc__r��re�urllib.parsero�typingrrrrrrr	�__all__r�DIRECT_URL_METADATA_NAME�compileri�	Exceptionrr<r!r#r*r0rr
rr%r
rrr�<module>r�sU����	��F�F�F����C�L��,��
�R�Z�Z�I�
J�
�	�y�	�
QU�
��C��H�~�
�&*�1�g�
�47�
�BJ�1�+�
�
�a�[�
�"QU���C��H�~��&*�1�g��47��BJ�1�+�����8�H�Z�$8�9��j��>�3�>�4��S��>�>�

�
�>)@�)@�X<�<�&��g�w�.�/��GE�GErpython3.12/site-packages/pip/_internal/models/__pycache__/scheme.cpython-312.pyc000064400000002300151732701210023310 0ustar00�

R`i���$�dZgd�ZGd�d�Zy)z�
For types associated with installation schemes.

For a general overview of available schemes and their context, see
https://docs.python.org/3/install/index.html#alternate-installation.
��platlib�purelib�headers�scripts�datac�4�eZdZdZeZdedededededdfd	�Zy)
�SchemeztA Scheme holds paths which are used as the base directories for
    artifacts associated with a Python package.
    rrrrr�returnNc�J�||_||_||_||_||_y)Nr)�selfrrrrrs      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/scheme.py�__init__zScheme.__init__s'����������������	�)�__name__�
__module__�__qualname__�__doc__�SCHEME_KEYS�	__slots__�strr�rr
r	r	sM����I�������	�
���
�
�rr	N)rrr	rrr
�<module>rs���C���rpython3.12/site-packages/pip/_internal/models/__pycache__/format_control.cpython-312.pyc000064400000010304151732701210025077 0ustar00�

R`i�	��D�ddlmZmZmZddlmZddlmZGd�d�Zy)�)�	FrozenSet�Optional�Set)�canonicalize_name)�CommandErrorc	��eZdZdZddgZ		ddeeedeeeddfd�Zde	de
fd�Zdefd	�Ze
d
edeedeeddfd��Zd
edeefd�Zdd�Zy)�
FormatControlzBHelper for managing formats from which a package can be installed.�	no_binary�only_binaryN�returnc�P�|�
t�}|�
t�}||_||_y�N)�setr
r)�selfr
rs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/format_control.py�__init__zFormatControl.__init__
s-��
����I����%�K�"���&����otherc����t��j�stS�j�jk7ryt	��fd��jD��S)NFc3�P�K�|]}t�|�t�|�k(���y�wr)�getattr)�.0�krrs  ��r�	<genexpr>z'FormatControl.__eq__.<locals>.<genexpr>!s%�����Q�.�Q�7�4��#�w�u�a�'8�8�.�s�#&)�
isinstance�	__class__�NotImplemented�	__slots__�all)rrs``r�__eq__zFormatControl.__eq__s?����%����0�!�!��>�>�U�_�_�,���Q�$�.�.�Q�Q�Qrc�x�dj|jj|j|j�S)Nz
{}({}, {}))�formatr�__name__r
r�rs r�__repr__zFormatControl.__repr__#s0���"�"��N�N�#�#�T�^�^�T�5E�5E�
�	
r�value�targetc��|jd�rtd��|jd�}d|vrR|j�|j�|j	d�|d|jd�dz�=d|vryd|vr�R|D]E}|dk(r|j��t
|�}|j|�|j	|��Gy)N�-z7--no-binary / --only-binary option requires 1 argument.�,�:all:�z:none:)�
startswithr�split�clear�add�indexr�discard)r&r'r�new�names     r�handle_mutual_excludesz$FormatControl.handle_mutual_excludes(s������C� ��I��
��k�k�#�����n��K�K�M��L�L�N��J�J�w���,�c�i�i��(�1�,�,�-��s�"����n��D��x�������$�T�*�D��M�M�$���J�J�t��
r�canonical_namec�Z�ddh}||jvr|jd�t|�S||jvr|jd�t|�Sd|jvr|jd�t|�Sd|jvr|jd�t|�S)N�binary�sourcer+)rr2r
�	frozenset)rr6�results   r�get_allowed_formatsz!FormatControl.get_allowed_formats?s����H�%���T�-�-�-��N�N�8�$��� � �
�t�~�~�
-��N�N�8�$�
�� � �	��(�(�
(��N�N�8�$��� � �����
&��N�N�8�$��� � rc�R�|jd|j|j�y)Nr+)r5r
rr$s r�disallow_binarieszFormatControl.disallow_binariesKs#���#�#���N�N����	
r)NN)rN)r#�
__module__�__qualname__�__doc__rrr�strr�object�boolr r%�staticmethodr5rr<r>�rrr	r	s���L��m�,�I�)-�*.�'��C��H�%�'��c�#�h�'�'�
�	'�R�F�R�t�R�
�#�
�
��c��3�s�8��C��H��QU����,
!�#�
!�)�C�.�
!�
rr	N)	�typingrrr�pip._vendor.packaging.utilsr�pip._internal.exceptionsrr	rFrr�<module>rJs��+�+�9�1�H
�H
rpython3.12/site-packages/pip/_internal/models/__pycache__/candidate.cpython-312.pyc000064400000003662151732701210023774 0ustar00�

R`i���>�ddlmZddlmZddlmZGd�de�Zy)�)�parse)�Link)�KeyBasedCompareMixinc�T��eZdZdZgd�Zdedededdf�fd�Zdefd	�Zdefd
�Z	�xZ
S)�InstallationCandidatez4Represents a potential "candidate" for installation.)�name�version�linkrr	r
�returnNc���||_t|�|_||_t�|�|j|j|jft��y)N)�key�defining_class)r�
parse_versionr	r
�super�__init__r)�selfrr	r
�	__class__s    ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/candidate.pyrzInstallationCandidate.__init__sH�����	�$�W�-�����	�
������D�L�L�$�)�)�4�0�	�	
�c�d�dj|j|j|j�S)Nz)<InstallationCandidate({!r}, {!r}, {!r})>��formatrr	r
�rs r�__repr__zInstallationCandidate.__repr__s*��:�A�A��I�I��L�L��I�I�
�	
rc�d�dj|j|j|j�S)Nz!{!r} candidate (version {} at {})rrs r�__str__zInstallationCandidate.__str__s*��2�9�9��I�I��L�L��I�I�
�	
r)�__name__�
__module__�__qualname__�__doc__�	__slots__�strrrrr�
__classcell__)rs@rrrsD���>�+�I�
�S�
�3�
�d�
�t�
�
�#�
�
��
rrN)�pip._vendor.packaging.versionrr�pip._internal.models.linkr�pip._internal.utils.modelsrr�rr�<module>r(s��@�*�;�
�0�
rpython3.12/site-packages/pip/_internal/models/__pycache__/index.cpython-312.pyc000064400000003315151732701210023162 0ustar00�

R`i��H�ddlZGd�d�Zedd��Zedd��Zy)	�Nc�H��eZdZdZgd�Zdededdf�fd�Zdedefd	�Z�xZS)
�PackageIndexzBRepresents a Package Index and provides easier access to endpoints)�url�netloc�
simple_url�pypi_url�file_storage_domainrr	�returnNc����t�|��||_tjj|�j|_|jd�|_|jd�|_	||_
y)N�simple�pypi)�super�__init__r�urllib�parse�urlsplitr�
_url_for_pathrrr	)�selfrr	�	__class__s   ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/index.pyrzPackageIndex.__init__	s_���
��������l�l�+�+�C�0�7�7����,�,�X�6����*�*�6�2��
�
$7�� ��pathc�V�tjj|j|�S)N)rr�urljoinr)rrs  rrzPackageIndex._url_for_paths���|�|�#�#�D�H�H�d�3�3r)	�__name__�
__module__�__qualname__�__doc__�	__slots__�strrr�
__classcell__)rs@rrrs8���L�R�I�
7�C�
7�c�
7�d�
7�4�#�4�#�4rrzhttps://pypi.org/zfiles.pythonhosted.org)r	zhttps://test.pypi.org/ztest-files.pythonhosted.org)�urllib.parserr�PyPI�TestPyPI�rr�<module>r&s2���4�4�*�'�=U�V����2O��rpython3.12/site-packages/pip/_internal/models/__pycache__/link.cpython-312.pyc000064400000062756151732701210023026 0ustar00�

R`iSQ���ddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZddlmZddlmZddlmZddlmZmZmZmZddlm Z dd	l!m"Z"m#Z#erdd
l$m%Z%ejLe'�Z(dZ)e	d�
�Gd�d��Z*e	d�
�Gd�d��Z+dee
e,e,fdee
e,e,ffd�Z-de,de,fd�Z.de,de,fd�Z/ej`dejb�Z2de,de3de,fd�Z4de,de,fd�Z5Gd�de �Z6Gd �d!e�Z7d"e6de7fd#�Z8ejrd�$�d%e6d&e6de3fd'��Z:y)(�N)�	dataclass)	�
TYPE_CHECKING�Any�Dict�List�Mapping�
NamedTuple�Optional�Tuple�Union)�
deprecated)�WHEEL_EXTENSION)�Hashes)�pairwise�redact_auth_from_url�split_auth_from_netloc�splitext)�KeyBasedCompareMixin)�path_to_url�url_to_path)�IndexContent)�sha512�sha384�sha256�sha224�sha1�md5T)�frozenc�"�eZdZUdZeed<eed<ejdjdjd�e
D�����Zdd
�Ze
ejd	��dededfd
���Zdeeeffd�Zdefd�Zdeedefd�Zy	)�LinkHasha�Links to content may have embedded hash values. This class parses those.

    `name` must be any member of `_SUPPORTED_HASHES`.

    This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to
    be JSON-serializable to conform to PEP 610, this class contains the logic for
    parsing a hash name and value for correctness, and then checking whether that hash
    conforms to a schema with `.is_hash_allowed()`.�name�valuez[#&]({choices})=([^&]*)�|c#�FK�|]}tj|����y�w�N)�re�escape)�.0�	hash_names  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/link.py�	<genexpr>zLinkHash.<genexpr>As����U�CT�i�R�Y�Y�y�1�CT�s�!)�choices�returnNc�,�|jtvsJ�yr%)r!�_SUPPORTED_HASHES��selfs r*�
__post_init__zLinkHash.__post_init__Es���y�y�-�-�-�-���maxsize�urlc�x�|jj|�}|�y|j�\}}|||��S)zGSearch a string for a checksum algorithm name and encoded output value.N�r!r")�_hash_url_fragment_re�search�groups)�clsr6�matchr!r"s     r*�find_hash_url_fragmentzLinkHash.find_hash_url_fragmentHs>���)�)�0�0��5���=���l�l�n���e���E�*�*r3c�2�|j|jiSr%r8r0s r*�as_dictzLinkHash.as_dictRs���	�	�4�:�:�&�&r3c�F�t|j|jgi�S)z@Return a Hashes instance which checks only for the current hash.)rr!r"r0s r*�	as_hasheszLinkHash.as_hashesUs���t�y�y�4�:�:�,�/�0�0r3�hashesc�V�|�y|j|j|j��S)zI
        Return True if the current hash is allowed by `hashes`.
        F)�
hex_digest)�is_hash_allowedr!r"�r1rCs  r*rFzLinkHash.is_hash_allowedYs*���>���%�%�d�i�i�D�J�J�%�G�Gr3�r-N)�__name__�
__module__�__qualname__�__doc__�str�__annotations__r&�compile�format�joinr/r9r2�classmethod�	functools�	lru_cacher
r>rr@rrB�boolrF�r3r*r r ,s���7��I��J�&�B�J�J�	#�)�)��H�H�U�CT�U�U�	*�	
�
	��.���Y����&�+��+��*�1E�+�'��+�'��c�3�h��'�1�6�1�H�h�v�&6�H�4�Hr3r c�4�eZdZUdZeeeefed<dd�Zy)�MetadataFilezFInformation about a core metadata file associated with a distribution.rCNc�Z�|j�td�|jD��sJ�yy)Nc3�,K�|]}|tv���y�wr%)r/)r(r!s  r*r+z-MetadataFile.__post_init__.<locals>.<genexpr>js����I�[�T�t�0�0�[�s�)rC�allr0s r*r2zMetadataFile.__post_init__hs)���;�;�"��I�T�[�[�I�I�I�I�#r3rH)	rIrJrKrLr
rrMrNr2rVr3r*rXrXbs��P��T�#�s�(�^�$�$�Jr3rXrCr-c�v�|�y|j�D��cic]\}}|tvs�||��}}}|sy|Scc}}wr%)�itemsr/)rC�n�vs   r*�supported_hashesr`msG���~��%�|�|�~�
H�~�t�q�!��6G�1G�a��d�~�F�
H����M��Is�5�5�partc�z�tjjtjj|��S)zP
    Clean a "part" of a URL path (i.e. after splitting on "@" characters).
    )�urllib�parse�quote�unquote�ras r*�_clean_url_path_partrhxs(��
�<�<���f�l�l�2�2�4�8�9�9r3c�z�tjjtjj|��S)z�
    Clean the first part of a URL path that corresponds to a local
    filesystem path (i.e. the first part after splitting on "@" characters).
    )rc�request�pathname2url�url2pathnamergs r*�_clean_file_url_pathrm�s(���>�>�&�&�v�~�~�'B�'B�4�'H�I�Ir3z(@|%2F)�path�
is_local_pathc�,�|rt}nt}tj|�}g}t	tj|dg��D];\}}|j||��|j|j���=dj|�S)z*
    Clean the path portion of a URL.
    �)
rmrh�_reserved_chars_re�splitr�	itertools�chain�append�upperrQ)rnro�
clean_func�parts�
cleaned_parts�to_clean�reserveds       r*�_clean_url_pathr}�s����)�
�)�
�
�$�$�T�*�E��M�&�y���u�r�d�'C�D���(����Z��1�2����X�^�^�-�.�E�
�7�7�=�!�!r3r6c���tjj|�}|j}t	|j
|��}tjj
|j|���S)z�
    Make sure a link is fully quoted.
    For example, if ' ' occurs in the URL, it will be replaced with "%20",
    and without double-quoting other characters.
    )ro)rn)rcrd�urlparse�netlocr}rn�
urlunparse�_replace)r6�resultrorns    r*�_ensure_quoted_urlr��sT���\�\�
"�
"�3�
'�F��
�
�%�M��6�;�;�m�D�D��<�<�"�"�6�?�?��?�#=�>�>r3c�|��eZdZdZgd�Z						d0dedeeedfdeedeed	eed
e	dee
eefddf�fd
�
Zede
eefdededfd��Zede
eeefdedededfd��Zdefd�Zdefd�Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Zdeeeffd�Zedefd��Zedefd��Zej>d�Z ej>d ejB�Z"deefd!�Z#ej>d"�Z$edeefd#��Z%dedfd$�Z&de'fd%�Z(edeefd&��Z)edeefd'��Z*edefd(��Z+ede	fd)��Z,de	fd*�Z-ede	fd+��Z.ede	fd,��Z/ede	fd-��Z0ede	fd.��Z1dee'de	fd/�Z2�xZ3S)1�Linkz:Represents a parsed link from a Package Index's simple URL)	�_parsed_url�_url�_hashes�
comes_from�requires_python�
yanked_reason�metadata_file_data�cache_link_parsing�egg_fragmentNr6r�rr�r�r�r�rCr-c���|jd�rt|�}tjj	|�|_||_tj|�}|�in|j�}	|�|	|_
ni|�|	�|_
||_|r|nd|_||_
||_t�
|�A|t"��||_|j'�|_y)a�
        :param url: url of the resource pointed to (href of the link)
        :param comes_from: instance of IndexContent where the link was found,
            or string.
        :param requires_python: String containing the `Requires-Python`
            metadata field, specified in PEP 345. This may be specified by
            a data-requires-python attribute in the HTML link tag, as
            described in PEP 503.
        :param yanked_reason: the reason the file has been yanked, if the
            file has been yanked, or None if the file hasn't been yanked.
            This is the value of the "data-yanked" attribute, if present, in
            a simple repository HTML link. If the file has been yanked but
            no reason was provided, this should be the empty string. See
            PEP 592 for more information and the specification.
        :param metadata_file_data: the metadata attached to the file, or None if
            no such metadata is provided. This argument, if not None, indicates
            that a separate metadata file exists, and also optionally supplies
            hashes for that file.
        :param cache_link_parsing: A flag that is used elsewhere to determine
            whether resources retrieved from this link should be cached. PyPI
            URLs should generally have this set to False, for example.
        :param hashes: A mapping of hash names to digests to allow us to
            determine the validity of a download.
        z\\N)�key�defining_class)�
startswithrrcrd�urlsplitr�r�r r>r@r�r�r�r�r��super�__init__r�r��
_egg_fragmentr�)r1r6r�r�r�r�r�rC�	link_hash�hashes_from_link�	__class__s          �r*r�z
Link.__init__�s����P�>�>�&�!��c�"�C�!�<�<�0�0��5�����	��3�3�C�8�	�!*�!2�2�	�8I�8I�8K���>�+�D�L�9�f�9�(8�9�D�L�$���2A��t���*���"4���
���S���6�"4��� �.�.�0��r3�	file_data�page_urlc���|jd�}|�yttjj	||��}|jd�}|jd�}|jdi�}|jd�}|�|jd�}t|t�rtt|��}	n|rtd�}	nd}	|rt|t�sd}n|sd}|||||||	�	�S)
zZ
        Convert an pypi json document from a simple repository page into a Link.
        r6Nzrequires-python�yankedrCz
core-metadatazdist-info-metadatarq)r�r�r�rCr�)
�getr�rcrd�urljoin�
isinstance�dictrXr`rM)
r<r�r��file_urlr6�	pyrequirer�rC�
metadata_infor�s
          r*�	from_jsonzLink.from_jsons����=�=��'����� ����!5�!5�h��!I�J���M�M�"3�4�	�!�
�
�h�/�
����x��,��"�
�
�o�6�
�� �%�M�M�*>�?�M��m�T�*�!-�.>�}�.M�!N��
�!-�d�!3��"&����M�3�!?��M�� �M����%�'��1�

�	
r3�anchor_attribs�base_urlc���|jd�}|syttjj	||��}|jd�}|jd�}|jd�}|�|jd�}|dk(rtd�}	nW|�d}	nR|j
d�\}
}}|dk(rtt|
|i��}	n!tjd	|�td�}	||||||	�
�S)z_
        Convert an anchor element's attributes in a simple repository page to a Link.
        �hrefNzdata-requires-pythonzdata-yankedzdata-core-metadatazdata-dist-info-metadata�true�=z8Index returned invalid data-dist-info-metadata value: %s)r�r�r�r�)
r�r�rcrdr�rX�	partitionr`�logger�debug)
r<r�r�r�r�r6r�r�r�r��hashname�sep�hashvals
             r*�from_elementzLink.from_element9s���!�!�&�)���� ����!5�!5�h��!E�F��"�&�&�'=�>�	�&�*�*�=�9�
�'�*�*�+?�@�
�� �*�.�.�/H�I�M��F�"�!-�d�!3��
�
"�!%��&3�%<�%<�S�%A�"�H�c�7��c�z�%1�2B�H�g�CV�2W�%X�"����N�!��&2�$�%7�"����%�'�1�
�	
r3c���|jrd|j�d�}nd}|jr0djt|j�|j|�Stt|j��S)Nz (requires-python:�)rqz{} (from {}){})r�r�rPrr�rM)r1�rps  r*�__str__zLink.__str__msh�����%�d�&:�&:�%;�1�=�B��B��?�?�#�*�*�$�T�Y�Y�/����"��
�(��D�I�I��7�7r3c��d|�d�S)Nz<Link �>rVr0s r*�__repr__z
Link.__repr__ys����v�Q��r3c��|jSr%)r�r0s r*r6zLink.url|s���y�y�r3c�
�|jjd�}tj|�}|st	|j
�\}}|Stjj|�}|sJd|j�d���|S)N�/zURL z produced no filename)
rn�rstrip�	posixpath�basenamerr�rcrdrfr�)r1rnr!r��	user_passs     r*�filenamez
Link.filename�sw���y�y����$���!�!�$�'���!7�t�{�{� C��F�I��M��|�|�#�#�D�)���>�t�D�I�I�=�(=�>�>�t��r3c�,�t|j�Sr%)rr6r0s r*�	file_pathzLink.file_path�s���4�8�8�$�$r3c�.�|jjSr%)r��schemer0s r*r�zLink.scheme�s�����&�&�&r3c�.�|jjS)z4
        This can contain auth information.
        )r�r�r0s r*r�zLink.netloc�s��
���&�&�&r3c�h�tjj|jj�Sr%)rcrdrfr�rnr0s r*rnz	Link.path�s#���|�|�#�#�D�$4�$4�$9�$9�:�:r3c�p�ttj|jj	d���S)Nr�)rr�r�rnr�r0s r*rz
Link.splitext�s'���	�*�*�4�9�9�+;�+;�C�+@�A�B�Br3c�(�|j�dS�N�)rr0s r*�extzLink.ext�s���}�}��q�!�!r3c�n�|j\}}}}}tjj||||df�S)Nrq)r�rcrd�
urlunsplit)r1r�r�rn�query�fragments      r*�url_without_fragmentzLink.url_without_fragment�s8��04�0@�0@�-����e�X��|�|�&�&����e�R�'H�I�Ir3z[#&]egg=([^&]*)z)^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$c���|jj|j�}|sy|jd�}|jj|�st
|�d�ddd��|S)Nr�z1 contains an egg fragment with a non-PEP 508 namez8to use the req @ url syntax, and remove the egg fragmentz25.0ia-)�reason�replacement�gone_in�issue)�_egg_fragment_rer:r��group�_project_name_rer=r
)r1r=�project_names   r*r�zLink._egg_fragment�si���%�%�,�,�T�Y�Y�7�����{�{�1�~���$�$�*�*�<�8����P�Q�V���	
��r3z[#&]subdirectory=([^&]*)c�t�|jj|j�}|sy|jd�Sr�)�_subdirectory_fragment_rer:r�r�)r1r=s  r*�subdirectory_fragmentzLink.subdirectory_fragment�s0���.�.�5�5�d�i�i�@�����{�{�1�~�r3c��|j�y|j�d�}|jj�t|�St||jj��S)z<Return a link to the associated core metadata file (if any).Nz	.metadata)rC)r�r�rCr�)r1�metadata_urls  r*�
metadata_linkzLink.metadata_link�sZ���"�"�*���3�3�4�I�>���"�"�)�)�1���%�%��L��)@�)@�)G�)G�H�Hr3c�~�t|jj�D��cic]	\}}||g��c}}�Scc}}wr%)rr�r])r1�kr_s   r*rBzLink.as_hashes�s8���$�,�,�*<�*<�*>�?�*>�$�!�Q�q�1�#�v�*>�?�@�@��?s�9
c�\�tt|jj��d�Sr%)�next�iterr��valuesr0s r*�hashz	Link.hash�s!���D����,�,�.�/��6�6r3c�@�tt|j�d�Sr%)r�r�r�r0s r*r)zLink.hash_name�s���D����&��-�-r3c��tj|jjdd�djdd�d�S)N�#r�r�?)r�r�r�rsr0s r*�show_urlz
Link.show_url�s9���!�!�$�)�)�/�/�#�q�"9�!�"<�"B�"B�3��"J�1�"M�N�Nr3c� �|jdk(S)N�file)r�r0s r*�is_filezLink.is_file�s���{�{�f�$�$r3c�p�|jxr)tjj|j�Sr%)r��osrn�isdirr�r0s r*�is_existing_dirzLink.is_existing_dir�s"���|�|�=����
�
�d�n�n� =�=r3c�(�|jtk(Sr%)r�rr0s r*�is_wheelz
Link.is_wheel�s���x�x�?�*�*r3c�>�ddlm}|j|jvS)Nr)�vcs)�pip._internal.vcsr�r��all_schemes)r1r�s  r*�is_vcszLink.is_vcs�s��)��{�{�c�o�o�-�-r3c��|jduSr%)r�r0s r*�	is_yankedzLink.is_yanked�s���!�!��-�-r3c�,�t|j�Sr%)rUr�r0s r*�has_hashz
Link.has_hash�s���D�L�L�!�!r3c�b����yt�fd�|jj�D��S)zS
        Return True if the link has a hash and it is allowed by `hashes`.
        Fc3�H�K�|]\}}�j||����y�wr%)rF)r(r�r_rCs   �r*r+z'Link.is_hash_allowed.<locals>.<genexpr>s%�����Q�<P�D�A�q�6�)�)�!�Q�/�<P�s�")�anyr�r]rGs `r*rFzLink.is_hash_alloweds+����>���Q�D�L�L�<N�<N�<P�Q�Q�Qr3)NNNNTN)4rIrJrKrL�	__slots__rMr
rrXrUrr�rRrrr�r�r�r��propertyr6r�r�r�r�rnrrr�r�r&rOr��
IGNORECASEr�r�r�r�r�rrBr�r)r�r�r�r�r�r�r�rF�
__classcell__)r�s@r*r�r��s����D�
�I�<@�)-�'+�59�#'�.2�?1�
�?1��U�3��#6�7�8�?1�"�#��	?1�
 ��}�?1�%�\�2�
?1�!�?1����c��*�+�?1�
�?1�B�0
���S��>�0
��0
�
�&�	�	0
��0
�d�1
��S�(�3�-�/�0�1
��1
��	1
�

�&�	�1
��1
�f
8��
8� �#� ���S������#�����%�3�%��%��'��'��'��'��'��'��;�c�;��;�C�%��S��/�C��"�S�"��"��J�c�J��J�"�r�z�z�"4�5��"�r�z�z�4�b�m�m����x��}��$!+��
�
�+F� G��
��x��}����I�x��/�I�A�6�A��7�h�s�m�7��7��.�8�C�=�.��.��O�#�O��O��%��%��%�>��>��+�$�+��+��.��.��.�
�.�4�.��.��"�$�"��"�R�h�v�&6�R�4�Rr3r�c�|�eZdZUdZej
jed<ee	e
e	fed<e	ed<ee	e	fed<y)�_CleanResulta�Convert link for equivalency check.

    This is used in the resolver to check whether two URL-specified requirements
    likely point to the same distribution and can be considered equivalent. This
    equivalency logic avoids comparing URLs literally, which can be too strict
    (e.g. "a=1&b=2" vs "b=2&a=1") and produce conflicts unexpecting to users.

    Currently this does three things:

    1. Drop the basic auth part. This is technically wrong since a server can
       serve different content based on auth, but if it does that, it is even
       impossible to guarantee two URLs without auth are equivalent, since
       the user can input different auth information when prompted. So the
       practical solution is to assume the auth doesn't affect the response.
    2. Parse the query to avoid the ordering issue. Note that ordering under the
       same key in the query are NOT cleaned; i.e. "a=1&a=2" and "a=2&a=1" are
       still considered different.
    3. Explicitly drop most of the fragment part, except ``subdirectory=`` and
       hash values, since it should have no impact the downloaded content. Note
       that this drops the "egg=" part historically used to denote the requested
       project (and extras), which is wrong in the strictest sense, but too many
       people are supplying it inconsistently to cause superfluous resolution
       conflicts, so we choose to also ignore them.
    �parsedr��subdirectoryrCN)rIrJrKrLrcrd�SplitResultrNrrMrrVr3r*rr	s@���2
�L�L�$�$�$���T�#�Y��������c��N�r3r�linkc��|j}|jjdd�d}|jdk(r|sd}tj
j
|j�}d|vrtjd|�	|dd	}tD�cic]}||vs�|||d	��}}t|j|d
d
��tj
j
|j�||��S#ttf$rd
}Y�zwxYwcc}w)
N�@r����r��	localhost�eggzIgnoring egg= fragment in %sr
rrq)r�r�r�)r	r�r
rC)r�r��rsplitr�rcrd�parse_qsr�r�r��
IndexError�KeyErrorr/rr�r�)rr	r�r�r
r�rCs       r*�_clean_linkr)s��
�
�
�F�
�]�]�
!�
!�#�q�
)�"�
-�F�
�}�}���v����|�|�$�$�V�_�_�5�H�������3�T�:�� ��/��2��
*;�
L�):�A�a�8�m�a��!��Q���):�F�
L�����f�B���D��l�l�#�#�F�L�L�1�!��	���
��!������Ms�C2�	D	�D	�2D�Dr4�link1�link2c�0�t|�t|�k(Sr%)r)rrs  r*�links_equivalentrCs���u���U�!3�3�3r3);rSrt�loggingr�r�r&�urllib.parserc�dataclassesr�typingrrrrrr	r
rr�pip._internal.utils.deprecationr
�pip._internal.utils.filetypesr�pip._internal.utils.hashesr�pip._internal.utils.miscrrrr�pip._internal.utils.modelsr�pip._internal.utils.urlsrr�pip._internal.index.collectorr�	getLoggerrIr�r/r rXrMr`rhrmrOrrrrUr}r�r�rrrTrrVr3r*�<module>r's������	��	��!�
�
�
�7�9�-���<�=��:�	��	�	�8�	$��
L���$��2H�2H��2H�j�$��J�J��J��X�d�3��8�n�5��(�4��S��>�:R��:�s�:�s�:�
J�s�
J�s�
J� �R�Z�Z�	�2�=�=�9��"�#�"�d�"�s�"�,?�C�?�C�?�PR��PR�f
�:��@�d��|��4����T�"�4�D�4��4�$�4�#�4r3python3.12/site-packages/pip/_internal/models/selection_prefs.py000064400000003563151732701210020703 0ustar00from typing import Optional

from pip._internal.models.format_control import FormatControl


class SelectionPreferences:
    """
    Encapsulates the candidate selection preferences for downloading
    and installing files.
    """

    __slots__ = [
        "allow_yanked",
        "allow_all_prereleases",
        "format_control",
        "prefer_binary",
        "ignore_requires_python",
    ]

    # Don't include an allow_yanked default value to make sure each call
    # site considers whether yanked releases are allowed. This also causes
    # that decision to be made explicit in the calling code, which helps
    # people when reading the code.
    def __init__(
        self,
        allow_yanked: bool,
        allow_all_prereleases: bool = False,
        format_control: Optional[FormatControl] = None,
        prefer_binary: bool = False,
        ignore_requires_python: Optional[bool] = None,
    ) -> None:
        """Create a SelectionPreferences object.

        :param allow_yanked: Whether files marked as yanked (in the sense
            of PEP 592) are permitted to be candidates for install.
        :param format_control: A FormatControl object or None. Used to control
            the selection of source packages / binary packages when consulting
            the index and links.
        :param prefer_binary: Whether to prefer an old, but valid, binary
            dist over a new source dist.
        :param ignore_requires_python: Whether to ignore incompatible
            "Requires-Python" values in links. Defaults to False.
        """
        if ignore_requires_python is None:
            ignore_requires_python = False

        self.allow_yanked = allow_yanked
        self.allow_all_prereleases = allow_all_prereleases
        self.format_control = format_control
        self.prefer_binary = prefer_binary
        self.ignore_requires_python = ignore_requires_python
python3.12/site-packages/pip/_internal/models/target_python.py000064400000010260151732701210020376 0ustar00import sys
from typing import List, Optional, Set, Tuple

from pip._vendor.packaging.tags import Tag

from pip._internal.utils.compatibility_tags import get_supported, version_info_to_nodot
from pip._internal.utils.misc import normalize_version_info


class TargetPython:

    """
    Encapsulates the properties of a Python interpreter one is targeting
    for a package install, download, etc.
    """

    __slots__ = [
        "_given_py_version_info",
        "abis",
        "implementation",
        "platforms",
        "py_version",
        "py_version_info",
        "_valid_tags",
        "_valid_tags_set",
    ]

    def __init__(
        self,
        platforms: Optional[List[str]] = None,
        py_version_info: Optional[Tuple[int, ...]] = None,
        abis: Optional[List[str]] = None,
        implementation: Optional[str] = None,
    ) -> None:
        """
        :param platforms: A list of strings or None. If None, searches for
            packages that are supported by the current system. Otherwise, will
            find packages that can be built on the platforms passed in. These
            packages will only be downloaded for distribution: they will
            not be built locally.
        :param py_version_info: An optional tuple of ints representing the
            Python version information to use (e.g. `sys.version_info[:3]`).
            This can have length 1, 2, or 3 when provided.
        :param abis: A list of strings or None. This is passed to
            compatibility_tags.py's get_supported() function as is.
        :param implementation: A string or None. This is passed to
            compatibility_tags.py's get_supported() function as is.
        """
        # Store the given py_version_info for when we call get_supported().
        self._given_py_version_info = py_version_info

        if py_version_info is None:
            py_version_info = sys.version_info[:3]
        else:
            py_version_info = normalize_version_info(py_version_info)

        py_version = ".".join(map(str, py_version_info[:2]))

        self.abis = abis
        self.implementation = implementation
        self.platforms = platforms
        self.py_version = py_version
        self.py_version_info = py_version_info

        # This is used to cache the return value of get_(un)sorted_tags.
        self._valid_tags: Optional[List[Tag]] = None
        self._valid_tags_set: Optional[Set[Tag]] = None

    def format_given(self) -> str:
        """
        Format the given, non-None attributes for display.
        """
        display_version = None
        if self._given_py_version_info is not None:
            display_version = ".".join(
                str(part) for part in self._given_py_version_info
            )

        key_values = [
            ("platforms", self.platforms),
            ("version_info", display_version),
            ("abis", self.abis),
            ("implementation", self.implementation),
        ]
        return " ".join(
            f"{key}={value!r}" for key, value in key_values if value is not None
        )

    def get_sorted_tags(self) -> List[Tag]:
        """
        Return the supported PEP 425 tags to check wheel candidates against.

        The tags are returned in order of preference (most preferred first).
        """
        if self._valid_tags is None:
            # Pass versions=None if no py_version_info was given since
            # versions=None uses special default logic.
            py_version_info = self._given_py_version_info
            if py_version_info is None:
                version = None
            else:
                version = version_info_to_nodot(py_version_info)

            tags = get_supported(
                version=version,
                platforms=self.platforms,
                abis=self.abis,
                impl=self.implementation,
            )
            self._valid_tags = tags

        return self._valid_tags

    def get_unsorted_tags(self) -> Set[Tag]:
        """Exactly the same as get_sorted_tags, but returns a set.

        This is important for performance.
        """
        if self._valid_tags_set is None:
            self._valid_tags_set = set(self.get_sorted_tags())

        return self._valid_tags_set
python3.12/site-packages/pip/_internal/models/wheel.py000064400000007020151732701220016614 0ustar00"""Represents a wheel file and provides access to the various parts of the
name that have meaning.
"""
import re
from typing import Dict, Iterable, List

from pip._vendor.packaging.tags import Tag

from pip._internal.exceptions import InvalidWheelFilename


class Wheel:
    """A wheel file"""

    wheel_file_re = re.compile(
        r"""^(?P<namever>(?P<name>[^\s-]+?)-(?P<ver>[^\s-]*?))
        ((-(?P<build>\d[^-]*?))?-(?P<pyver>[^\s-]+?)-(?P<abi>[^\s-]+?)-(?P<plat>[^\s-]+?)
        \.whl|\.dist-info)$""",
        re.VERBOSE,
    )

    def __init__(self, filename: str) -> None:
        """
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        """
        wheel_info = self.wheel_file_re.match(filename)
        if not wheel_info:
            raise InvalidWheelFilename(f"{filename} is not a valid wheel filename.")
        self.filename = filename
        self.name = wheel_info.group("name").replace("_", "-")
        # we'll assume "_" means "-" due to wheel naming scheme
        # (https://github.com/pypa/pip/issues/1150)
        self.version = wheel_info.group("ver").replace("_", "-")
        self.build_tag = wheel_info.group("build")
        self.pyversions = wheel_info.group("pyver").split(".")
        self.abis = wheel_info.group("abi").split(".")
        self.plats = wheel_info.group("plat").split(".")

        # All the tag combinations from this file
        self.file_tags = {
            Tag(x, y, z) for x in self.pyversions for y in self.abis for z in self.plats
        }

    def get_formatted_file_tags(self) -> List[str]:
        """Return the wheel's tags as a sorted list of strings."""
        return sorted(str(tag) for tag in self.file_tags)

    def support_index_min(self, tags: List[Tag]) -> int:
        """Return the lowest index that one of the wheel's file_tag combinations
        achieves in the given list of supported tags.

        For example, if there are 8 supported tags and one of the file tags
        is first in the list, then return 0.

        :param tags: the PEP 425 tags to check the wheel against, in order
            with most preferred first.

        :raises ValueError: If none of the wheel's file tags match one of
            the supported tags.
        """
        try:
            return next(i for i, t in enumerate(tags) if t in self.file_tags)
        except StopIteration:
            raise ValueError()

    def find_most_preferred_tag(
        self, tags: List[Tag], tag_to_priority: Dict[Tag, int]
    ) -> int:
        """Return the priority of the most preferred tag that one of the wheel's file
        tag combinations achieves in the given list of supported tags using the given
        tag_to_priority mapping, where lower priorities are more-preferred.

        This is used in place of support_index_min in some cases in order to avoid
        an expensive linear scan of a large list of tags.

        :param tags: the PEP 425 tags to check the wheel against.
        :param tag_to_priority: a mapping from tag to priority of that tag, where
            lower is more preferred.

        :raises ValueError: If none of the wheel's file tags match one of
            the supported tags.
        """
        return min(
            tag_to_priority[tag] for tag in self.file_tags if tag in tag_to_priority
        )

    def supported(self, tags: Iterable[Tag]) -> bool:
        """Return whether the wheel is compatible with one of the given tags.

        :param tags: the PEP 425 tags to check the wheel against.
        """
        return not self.file_tags.isdisjoint(tags)
python3.12/site-packages/pip/_internal/models/__init__.py000064400000000077151732701220017254 0ustar00"""A package that contains models that represent entities.
"""
python3.12/site-packages/pip/_internal/models/format_control.py000064400000004730151732701220020545 0ustar00from typing import FrozenSet, Optional, Set

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.exceptions import CommandError


class FormatControl:
    """Helper for managing formats from which a package can be installed."""

    __slots__ = ["no_binary", "only_binary"]

    def __init__(
        self,
        no_binary: Optional[Set[str]] = None,
        only_binary: Optional[Set[str]] = None,
    ) -> None:
        if no_binary is None:
            no_binary = set()
        if only_binary is None:
            only_binary = set()

        self.no_binary = no_binary
        self.only_binary = only_binary

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, self.__class__):
            return NotImplemented

        if self.__slots__ != other.__slots__:
            return False

        return all(getattr(self, k) == getattr(other, k) for k in self.__slots__)

    def __repr__(self) -> str:
        return "{}({}, {})".format(
            self.__class__.__name__, self.no_binary, self.only_binary
        )

    @staticmethod
    def handle_mutual_excludes(value: str, target: Set[str], other: Set[str]) -> None:
        if value.startswith("-"):
            raise CommandError(
                "--no-binary / --only-binary option requires 1 argument."
            )
        new = value.split(",")
        while ":all:" in new:
            other.clear()
            target.clear()
            target.add(":all:")
            del new[: new.index(":all:") + 1]
            # Without a none, we want to discard everything as :all: covers it
            if ":none:" not in new:
                return
        for name in new:
            if name == ":none:":
                target.clear()
                continue
            name = canonicalize_name(name)
            other.discard(name)
            target.add(name)

    def get_allowed_formats(self, canonical_name: str) -> FrozenSet[str]:
        result = {"binary", "source"}
        if canonical_name in self.only_binary:
            result.discard("source")
        elif canonical_name in self.no_binary:
            result.discard("binary")
        elif ":all:" in self.only_binary:
            result.discard("source")
        elif ":all:" in self.no_binary:
            result.discard("binary")
        return frozenset(result)

    def disallow_binaries(self) -> None:
        self.handle_mutual_excludes(
            ":all:",
            self.no_binary,
            self.only_binary,
        )
python3.12/site-packages/pip/_internal/models/link.py000064400000050523151732701220016453 0ustar00import functools
import itertools
import logging
import os
import posixpath
import re
import urllib.parse
from dataclasses import dataclass
from typing import (
    TYPE_CHECKING,
    Any,
    Dict,
    List,
    Mapping,
    NamedTuple,
    Optional,
    Tuple,
    Union,
)

from pip._internal.utils.deprecation import deprecated
from pip._internal.utils.filetypes import WHEEL_EXTENSION
from pip._internal.utils.hashes import Hashes
from pip._internal.utils.misc import (
    pairwise,
    redact_auth_from_url,
    split_auth_from_netloc,
    splitext,
)
from pip._internal.utils.models import KeyBasedCompareMixin
from pip._internal.utils.urls import path_to_url, url_to_path

if TYPE_CHECKING:
    from pip._internal.index.collector import IndexContent

logger = logging.getLogger(__name__)


# Order matters, earlier hashes have a precedence over later hashes for what
# we will pick to use.
_SUPPORTED_HASHES = ("sha512", "sha384", "sha256", "sha224", "sha1", "md5")


@dataclass(frozen=True)
class LinkHash:
    """Links to content may have embedded hash values. This class parses those.

    `name` must be any member of `_SUPPORTED_HASHES`.

    This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to
    be JSON-serializable to conform to PEP 610, this class contains the logic for
    parsing a hash name and value for correctness, and then checking whether that hash
    conforms to a schema with `.is_hash_allowed()`."""

    name: str
    value: str

    _hash_url_fragment_re = re.compile(
        # NB: we do not validate that the second group (.*) is a valid hex
        # digest. Instead, we simply keep that string in this class, and then check it
        # against Hashes when hash-checking is needed. This is easier to debug than
        # proactively discarding an invalid hex digest, as we handle incorrect hashes
        # and malformed hashes in the same place.
        r"[#&]({choices})=([^&]*)".format(
            choices="|".join(re.escape(hash_name) for hash_name in _SUPPORTED_HASHES)
        ),
    )

    def __post_init__(self) -> None:
        assert self.name in _SUPPORTED_HASHES

    @classmethod
    @functools.lru_cache(maxsize=None)
    def find_hash_url_fragment(cls, url: str) -> Optional["LinkHash"]:
        """Search a string for a checksum algorithm name and encoded output value."""
        match = cls._hash_url_fragment_re.search(url)
        if match is None:
            return None
        name, value = match.groups()
        return cls(name=name, value=value)

    def as_dict(self) -> Dict[str, str]:
        return {self.name: self.value}

    def as_hashes(self) -> Hashes:
        """Return a Hashes instance which checks only for the current hash."""
        return Hashes({self.name: [self.value]})

    def is_hash_allowed(self, hashes: Optional[Hashes]) -> bool:
        """
        Return True if the current hash is allowed by `hashes`.
        """
        if hashes is None:
            return False
        return hashes.is_hash_allowed(self.name, hex_digest=self.value)


@dataclass(frozen=True)
class MetadataFile:
    """Information about a core metadata file associated with a distribution."""

    hashes: Optional[Dict[str, str]]

    def __post_init__(self) -> None:
        if self.hashes is not None:
            assert all(name in _SUPPORTED_HASHES for name in self.hashes)


def supported_hashes(hashes: Optional[Dict[str, str]]) -> Optional[Dict[str, str]]:
    # Remove any unsupported hash types from the mapping. If this leaves no
    # supported hashes, return None
    if hashes is None:
        return None
    hashes = {n: v for n, v in hashes.items() if n in _SUPPORTED_HASHES}
    if not hashes:
        return None
    return hashes


def _clean_url_path_part(part: str) -> str:
    """
    Clean a "part" of a URL path (i.e. after splitting on "@" characters).
    """
    # We unquote prior to quoting to make sure nothing is double quoted.
    return urllib.parse.quote(urllib.parse.unquote(part))


def _clean_file_url_path(part: str) -> str:
    """
    Clean the first part of a URL path that corresponds to a local
    filesystem path (i.e. the first part after splitting on "@" characters).
    """
    # We unquote prior to quoting to make sure nothing is double quoted.
    # Also, on Windows the path part might contain a drive letter which
    # should not be quoted. On Linux where drive letters do not
    # exist, the colon should be quoted. We rely on urllib.request
    # to do the right thing here.
    return urllib.request.pathname2url(urllib.request.url2pathname(part))


# percent-encoded:                   /
_reserved_chars_re = re.compile("(@|%2F)", re.IGNORECASE)


def _clean_url_path(path: str, is_local_path: bool) -> str:
    """
    Clean the path portion of a URL.
    """
    if is_local_path:
        clean_func = _clean_file_url_path
    else:
        clean_func = _clean_url_path_part

    # Split on the reserved characters prior to cleaning so that
    # revision strings in VCS URLs are properly preserved.
    parts = _reserved_chars_re.split(path)

    cleaned_parts = []
    for to_clean, reserved in pairwise(itertools.chain(parts, [""])):
        cleaned_parts.append(clean_func(to_clean))
        # Normalize %xx escapes (e.g. %2f -> %2F)
        cleaned_parts.append(reserved.upper())

    return "".join(cleaned_parts)


def _ensure_quoted_url(url: str) -> str:
    """
    Make sure a link is fully quoted.
    For example, if ' ' occurs in the URL, it will be replaced with "%20",
    and without double-quoting other characters.
    """
    # Split the URL into parts according to the general structure
    # `scheme://netloc/path;parameters?query#fragment`.
    result = urllib.parse.urlparse(url)
    # If the netloc is empty, then the URL refers to a local filesystem path.
    is_local_path = not result.netloc
    path = _clean_url_path(result.path, is_local_path=is_local_path)
    return urllib.parse.urlunparse(result._replace(path=path))


class Link(KeyBasedCompareMixin):
    """Represents a parsed link from a Package Index's simple URL"""

    __slots__ = [
        "_parsed_url",
        "_url",
        "_hashes",
        "comes_from",
        "requires_python",
        "yanked_reason",
        "metadata_file_data",
        "cache_link_parsing",
        "egg_fragment",
    ]

    def __init__(
        self,
        url: str,
        comes_from: Optional[Union[str, "IndexContent"]] = None,
        requires_python: Optional[str] = None,
        yanked_reason: Optional[str] = None,
        metadata_file_data: Optional[MetadataFile] = None,
        cache_link_parsing: bool = True,
        hashes: Optional[Mapping[str, str]] = None,
    ) -> None:
        """
        :param url: url of the resource pointed to (href of the link)
        :param comes_from: instance of IndexContent where the link was found,
            or string.
        :param requires_python: String containing the `Requires-Python`
            metadata field, specified in PEP 345. This may be specified by
            a data-requires-python attribute in the HTML link tag, as
            described in PEP 503.
        :param yanked_reason: the reason the file has been yanked, if the
            file has been yanked, or None if the file hasn't been yanked.
            This is the value of the "data-yanked" attribute, if present, in
            a simple repository HTML link. If the file has been yanked but
            no reason was provided, this should be the empty string. See
            PEP 592 for more information and the specification.
        :param metadata_file_data: the metadata attached to the file, or None if
            no such metadata is provided. This argument, if not None, indicates
            that a separate metadata file exists, and also optionally supplies
            hashes for that file.
        :param cache_link_parsing: A flag that is used elsewhere to determine
            whether resources retrieved from this link should be cached. PyPI
            URLs should generally have this set to False, for example.
        :param hashes: A mapping of hash names to digests to allow us to
            determine the validity of a download.
        """

        # The comes_from, requires_python, and metadata_file_data arguments are
        # only used by classmethods of this class, and are not used in client
        # code directly.

        # url can be a UNC windows share
        if url.startswith("\\\\"):
            url = path_to_url(url)

        self._parsed_url = urllib.parse.urlsplit(url)
        # Store the url as a private attribute to prevent accidentally
        # trying to set a new value.
        self._url = url

        link_hash = LinkHash.find_hash_url_fragment(url)
        hashes_from_link = {} if link_hash is None else link_hash.as_dict()
        if hashes is None:
            self._hashes = hashes_from_link
        else:
            self._hashes = {**hashes, **hashes_from_link}

        self.comes_from = comes_from
        self.requires_python = requires_python if requires_python else None
        self.yanked_reason = yanked_reason
        self.metadata_file_data = metadata_file_data

        super().__init__(key=url, defining_class=Link)

        self.cache_link_parsing = cache_link_parsing
        self.egg_fragment = self._egg_fragment()

    @classmethod
    def from_json(
        cls,
        file_data: Dict[str, Any],
        page_url: str,
    ) -> Optional["Link"]:
        """
        Convert an pypi json document from a simple repository page into a Link.
        """
        file_url = file_data.get("url")
        if file_url is None:
            return None

        url = _ensure_quoted_url(urllib.parse.urljoin(page_url, file_url))
        pyrequire = file_data.get("requires-python")
        yanked_reason = file_data.get("yanked")
        hashes = file_data.get("hashes", {})

        # PEP 714: Indexes must use the name core-metadata, but
        # clients should support the old name as a fallback for compatibility.
        metadata_info = file_data.get("core-metadata")
        if metadata_info is None:
            metadata_info = file_data.get("dist-info-metadata")

        # The metadata info value may be a boolean, or a dict of hashes.
        if isinstance(metadata_info, dict):
            # The file exists, and hashes have been supplied
            metadata_file_data = MetadataFile(supported_hashes(metadata_info))
        elif metadata_info:
            # The file exists, but there are no hashes
            metadata_file_data = MetadataFile(None)
        else:
            # False or not present: the file does not exist
            metadata_file_data = None

        # The Link.yanked_reason expects an empty string instead of a boolean.
        if yanked_reason and not isinstance(yanked_reason, str):
            yanked_reason = ""
        # The Link.yanked_reason expects None instead of False.
        elif not yanked_reason:
            yanked_reason = None

        return cls(
            url,
            comes_from=page_url,
            requires_python=pyrequire,
            yanked_reason=yanked_reason,
            hashes=hashes,
            metadata_file_data=metadata_file_data,
        )

    @classmethod
    def from_element(
        cls,
        anchor_attribs: Dict[str, Optional[str]],
        page_url: str,
        base_url: str,
    ) -> Optional["Link"]:
        """
        Convert an anchor element's attributes in a simple repository page to a Link.
        """
        href = anchor_attribs.get("href")
        if not href:
            return None

        url = _ensure_quoted_url(urllib.parse.urljoin(base_url, href))
        pyrequire = anchor_attribs.get("data-requires-python")
        yanked_reason = anchor_attribs.get("data-yanked")

        # PEP 714: Indexes must use the name data-core-metadata, but
        # clients should support the old name as a fallback for compatibility.
        metadata_info = anchor_attribs.get("data-core-metadata")
        if metadata_info is None:
            metadata_info = anchor_attribs.get("data-dist-info-metadata")
        # The metadata info value may be the string "true", or a string of
        # the form "hashname=hashval"
        if metadata_info == "true":
            # The file exists, but there are no hashes
            metadata_file_data = MetadataFile(None)
        elif metadata_info is None:
            # The file does not exist
            metadata_file_data = None
        else:
            # The file exists, and hashes have been supplied
            hashname, sep, hashval = metadata_info.partition("=")
            if sep == "=":
                metadata_file_data = MetadataFile(supported_hashes({hashname: hashval}))
            else:
                # Error - data is wrong. Treat as no hashes supplied.
                logger.debug(
                    "Index returned invalid data-dist-info-metadata value: %s",
                    metadata_info,
                )
                metadata_file_data = MetadataFile(None)

        return cls(
            url,
            comes_from=page_url,
            requires_python=pyrequire,
            yanked_reason=yanked_reason,
            metadata_file_data=metadata_file_data,
        )

    def __str__(self) -> str:
        if self.requires_python:
            rp = f" (requires-python:{self.requires_python})"
        else:
            rp = ""
        if self.comes_from:
            return "{} (from {}){}".format(
                redact_auth_from_url(self._url), self.comes_from, rp
            )
        else:
            return redact_auth_from_url(str(self._url))

    def __repr__(self) -> str:
        return f"<Link {self}>"

    @property
    def url(self) -> str:
        return self._url

    @property
    def filename(self) -> str:
        path = self.path.rstrip("/")
        name = posixpath.basename(path)
        if not name:
            # Make sure we don't leak auth information if the netloc
            # includes a username and password.
            netloc, user_pass = split_auth_from_netloc(self.netloc)
            return netloc

        name = urllib.parse.unquote(name)
        assert name, f"URL {self._url!r} produced no filename"
        return name

    @property
    def file_path(self) -> str:
        return url_to_path(self.url)

    @property
    def scheme(self) -> str:
        return self._parsed_url.scheme

    @property
    def netloc(self) -> str:
        """
        This can contain auth information.
        """
        return self._parsed_url.netloc

    @property
    def path(self) -> str:
        return urllib.parse.unquote(self._parsed_url.path)

    def splitext(self) -> Tuple[str, str]:
        return splitext(posixpath.basename(self.path.rstrip("/")))

    @property
    def ext(self) -> str:
        return self.splitext()[1]

    @property
    def url_without_fragment(self) -> str:
        scheme, netloc, path, query, fragment = self._parsed_url
        return urllib.parse.urlunsplit((scheme, netloc, path, query, ""))

    _egg_fragment_re = re.compile(r"[#&]egg=([^&]*)")

    # Per PEP 508.
    _project_name_re = re.compile(
        r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE
    )

    def _egg_fragment(self) -> Optional[str]:
        match = self._egg_fragment_re.search(self._url)
        if not match:
            return None

        # An egg fragment looks like a PEP 508 project name, along with
        # an optional extras specifier. Anything else is invalid.
        project_name = match.group(1)
        if not self._project_name_re.match(project_name):
            deprecated(
                reason=f"{self} contains an egg fragment with a non-PEP 508 name",
                replacement="to use the req @ url syntax, and remove the egg fragment",
                gone_in="25.0",
                issue=11617,
            )

        return project_name

    _subdirectory_fragment_re = re.compile(r"[#&]subdirectory=([^&]*)")

    @property
    def subdirectory_fragment(self) -> Optional[str]:
        match = self._subdirectory_fragment_re.search(self._url)
        if not match:
            return None
        return match.group(1)

    def metadata_link(self) -> Optional["Link"]:
        """Return a link to the associated core metadata file (if any)."""
        if self.metadata_file_data is None:
            return None
        metadata_url = f"{self.url_without_fragment}.metadata"
        if self.metadata_file_data.hashes is None:
            return Link(metadata_url)
        return Link(metadata_url, hashes=self.metadata_file_data.hashes)

    def as_hashes(self) -> Hashes:
        return Hashes({k: [v] for k, v in self._hashes.items()})

    @property
    def hash(self) -> Optional[str]:
        return next(iter(self._hashes.values()), None)

    @property
    def hash_name(self) -> Optional[str]:
        return next(iter(self._hashes), None)

    @property
    def show_url(self) -> str:
        return posixpath.basename(self._url.split("#", 1)[0].split("?", 1)[0])

    @property
    def is_file(self) -> bool:
        return self.scheme == "file"

    def is_existing_dir(self) -> bool:
        return self.is_file and os.path.isdir(self.file_path)

    @property
    def is_wheel(self) -> bool:
        return self.ext == WHEEL_EXTENSION

    @property
    def is_vcs(self) -> bool:
        from pip._internal.vcs import vcs

        return self.scheme in vcs.all_schemes

    @property
    def is_yanked(self) -> bool:
        return self.yanked_reason is not None

    @property
    def has_hash(self) -> bool:
        return bool(self._hashes)

    def is_hash_allowed(self, hashes: Optional[Hashes]) -> bool:
        """
        Return True if the link has a hash and it is allowed by `hashes`.
        """
        if hashes is None:
            return False
        return any(hashes.is_hash_allowed(k, v) for k, v in self._hashes.items())


class _CleanResult(NamedTuple):
    """Convert link for equivalency check.

    This is used in the resolver to check whether two URL-specified requirements
    likely point to the same distribution and can be considered equivalent. This
    equivalency logic avoids comparing URLs literally, which can be too strict
    (e.g. "a=1&b=2" vs "b=2&a=1") and produce conflicts unexpecting to users.

    Currently this does three things:

    1. Drop the basic auth part. This is technically wrong since a server can
       serve different content based on auth, but if it does that, it is even
       impossible to guarantee two URLs without auth are equivalent, since
       the user can input different auth information when prompted. So the
       practical solution is to assume the auth doesn't affect the response.
    2. Parse the query to avoid the ordering issue. Note that ordering under the
       same key in the query are NOT cleaned; i.e. "a=1&a=2" and "a=2&a=1" are
       still considered different.
    3. Explicitly drop most of the fragment part, except ``subdirectory=`` and
       hash values, since it should have no impact the downloaded content. Note
       that this drops the "egg=" part historically used to denote the requested
       project (and extras), which is wrong in the strictest sense, but too many
       people are supplying it inconsistently to cause superfluous resolution
       conflicts, so we choose to also ignore them.
    """

    parsed: urllib.parse.SplitResult
    query: Dict[str, List[str]]
    subdirectory: str
    hashes: Dict[str, str]


def _clean_link(link: Link) -> _CleanResult:
    parsed = link._parsed_url
    netloc = parsed.netloc.rsplit("@", 1)[-1]
    # According to RFC 8089, an empty host in file: means localhost.
    if parsed.scheme == "file" and not netloc:
        netloc = "localhost"
    fragment = urllib.parse.parse_qs(parsed.fragment)
    if "egg" in fragment:
        logger.debug("Ignoring egg= fragment in %s", link)
    try:
        # If there are multiple subdirectory values, use the first one.
        # This matches the behavior of Link.subdirectory_fragment.
        subdirectory = fragment["subdirectory"][0]
    except (IndexError, KeyError):
        subdirectory = ""
    # If there are multiple hash values under the same algorithm, use the
    # first one. This matches the behavior of Link.hash_value.
    hashes = {k: fragment[k][0] for k in _SUPPORTED_HASHES if k in fragment}
    return _CleanResult(
        parsed=parsed._replace(netloc=netloc, query="", fragment=""),
        query=urllib.parse.parse_qs(parsed.query),
        subdirectory=subdirectory,
        hashes=hashes,
    )


@functools.lru_cache(maxsize=None)
def links_equivalent(link1: Link, link2: Link) -> bool:
    return _clean_link(link1) == _clean_link(link2)
python3.12/site-packages/pip/_internal/models/candidate.py000064400000001736151732701220017434 0ustar00from pip._vendor.packaging.version import parse as parse_version

from pip._internal.models.link import Link
from pip._internal.utils.models import KeyBasedCompareMixin


class InstallationCandidate(KeyBasedCompareMixin):
    """Represents a potential "candidate" for installation."""

    __slots__ = ["name", "version", "link"]

    def __init__(self, name: str, version: str, link: Link) -> None:
        self.name = name
        self.version = parse_version(version)
        self.link = link

        super().__init__(
            key=(self.name, self.version, self.link),
            defining_class=InstallationCandidate,
        )

    def __repr__(self) -> str:
        return "<InstallationCandidate({!r}, {!r}, {!r})>".format(
            self.name,
            self.version,
            self.link,
        )

    def __str__(self) -> str:
        return "{!r} candidate (version {} at {})".format(
            self.name,
            self.version,
            self.link,
        )
python3.12/site-packages/pip/_internal/models/scheme.py000064400000001342151732701220016755 0ustar00"""
For types associated with installation schemes.

For a general overview of available schemes and their context, see
https://docs.python.org/3/install/index.html#alternate-installation.
"""


SCHEME_KEYS = ["platlib", "purelib", "headers", "scripts", "data"]


class Scheme:
    """A Scheme holds paths which are used as the base directories for
    artifacts associated with a Python package.
    """

    __slots__ = SCHEME_KEYS

    def __init__(
        self,
        platlib: str,
        purelib: str,
        headers: str,
        scripts: str,
        data: str,
    ) -> None:
        self.platlib = platlib
        self.purelib = purelib
        self.headers = headers
        self.scripts = scripts
        self.data = data
python3.12/site-packages/pip/_internal/models/search_scope.py000064400000011043151732701220020146 0ustar00import itertools
import logging
import os
import posixpath
import urllib.parse
from typing import List

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.models.index import PyPI
from pip._internal.utils.compat import has_tls
from pip._internal.utils.misc import normalize_path, redact_auth_from_url

logger = logging.getLogger(__name__)


class SearchScope:

    """
    Encapsulates the locations that pip is configured to search.
    """

    __slots__ = ["find_links", "index_urls", "no_index"]

    @classmethod
    def create(
        cls,
        find_links: List[str],
        index_urls: List[str],
        no_index: bool,
    ) -> "SearchScope":
        """
        Create a SearchScope object after normalizing the `find_links`.
        """
        # Build find_links. If an argument starts with ~, it may be
        # a local file relative to a home directory. So try normalizing
        # it and if it exists, use the normalized version.
        # This is deliberately conservative - it might be fine just to
        # blindly normalize anything starting with a ~...
        built_find_links: List[str] = []
        for link in find_links:
            if link.startswith("~"):
                new_link = normalize_path(link)
                if os.path.exists(new_link):
                    link = new_link
            built_find_links.append(link)

        # If we don't have TLS enabled, then WARN if anyplace we're looking
        # relies on TLS.
        if not has_tls():
            for link in itertools.chain(index_urls, built_find_links):
                parsed = urllib.parse.urlparse(link)
                if parsed.scheme == "https":
                    logger.warning(
                        "pip is configured with locations that require "
                        "TLS/SSL, however the ssl module in Python is not "
                        "available."
                    )
                    break

        return cls(
            find_links=built_find_links,
            index_urls=index_urls,
            no_index=no_index,
        )

    def __init__(
        self,
        find_links: List[str],
        index_urls: List[str],
        no_index: bool,
    ) -> None:
        self.find_links = find_links
        self.index_urls = index_urls
        self.no_index = no_index

    def get_formatted_locations(self) -> str:
        lines = []
        redacted_index_urls = []
        if self.index_urls and self.index_urls != [PyPI.simple_url]:
            for url in self.index_urls:
                redacted_index_url = redact_auth_from_url(url)

                # Parse the URL
                purl = urllib.parse.urlsplit(redacted_index_url)

                # URL is generally invalid if scheme and netloc is missing
                # there are issues with Python and URL parsing, so this test
                # is a bit crude. See bpo-20271, bpo-23505. Python doesn't
                # always parse invalid URLs correctly - it should raise
                # exceptions for malformed URLs
                if not purl.scheme and not purl.netloc:
                    logger.warning(
                        'The index url "%s" seems invalid, please provide a scheme.',
                        redacted_index_url,
                    )

                redacted_index_urls.append(redacted_index_url)

            lines.append(
                "Looking in indexes: {}".format(", ".join(redacted_index_urls))
            )

        if self.find_links:
            lines.append(
                "Looking in links: {}".format(
                    ", ".join(redact_auth_from_url(url) for url in self.find_links)
                )
            )
        return "\n".join(lines)

    def get_index_urls_locations(self, project_name: str) -> List[str]:
        """Returns the locations found via self.index_urls

        Checks the url_name on the main (first in the list) index and
        use this url_name to produce all locations
        """

        def mkurl_pypi_url(url: str) -> str:
            loc = posixpath.join(
                url, urllib.parse.quote(canonicalize_name(project_name))
            )
            # For maximum compatibility with easy_install, ensure the path
            # ends in a trailing slash.  Although this isn't in the spec
            # (and PyPI can handle it without the slash) some other index
            # implementations might break if they relied on easy_install's
            # behavior.
            if not loc.endswith("/"):
                loc = loc + "/"
            return loc

        return [mkurl_pypi_url(url) for url in self.index_urls]
python3.12/site-packages/pip/_internal/__pycache__/__init__.cpython-312.pyc000064400000001525151732701220022331 0ustar00�

R`i��`�ddlmZmZddlmZej
�ddeeedefd�Zy)�)�List�Optional)�_logN�args�returnc�"�ddlm}||d��S)z�This is preserved for old console scripts that may still be referencing
    it.

    For additional details, see https://github.com/pypa/pip/issues/7498.
    r)�_wrapperT)�_nowarn)�pip._internal.utils.entrypointsr	)rr	s  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/__init__.py�mainr

s��9��D�$�'�'�)N)	�typingrr�pip._internal.utilsr�init_logging�str�intr
�rr�<module>rs7��!�$������(���c��#�(��(rpython3.12/site-packages/pip/_internal/__pycache__/pyproject.cpython-312.pyc000064400000011623151732701220022611 0ustar00�

R`i�����ddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZm
Z
ddlmZmZmZdedefd	�Zd
edefd�Zedgd
��Zdeededededeef
d�Zy)�N)�
namedtuple)�Any�List�Optional)�tomli)�InvalidRequirement�Requirement)�InstallationError�InvalidPyProjectBuildRequires�MissingPyProjectBuildRequires�obj�returnc�J�t|t�xrtd�|D��S)Nc3�<K�|]}t|t����y�w)N)�
isinstance�str)�.0�items  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/pyproject.py�	<genexpr>z"_is_list_of_str.<locals>.<genexpr>s����(O�3�4��D�#�)>�3�s�)r�list�all)r
s r�_is_list_of_strrs���c�4� �O�S�(O�3�(O�%O�O��unpacked_source_directoryc�B�tjj|d�S)Nzpyproject.toml)�os�path�join)rs r�make_pyproject_pathr s��
�7�7�<�<�1�3C�D�Dr�BuildSystemDetails)�requires�backend�check�backend_path�
use_pep517�pyproject_toml�setup_py�req_namec���tjj|�}tjj|�}|s|st|�d���|rKt	|d��5}tj|j��}ddd�jd�}nd}|r|s|�
|std��d}nr|r(d|vr$|�|std	j|d���d}nH|�F|xsBtjjd
�xs tjjd�}|�J�|sy|�ddgd
d�}|�J�d|vrt|���|d}	t|	�s
t|d���|	D]}
	t!|
��|jd�}|jdg�}
g}|�d
}dg}t%|	|||
�S#1swY��4xYw#t"$r}t|d|
����|�d}~wwxYw)aBLoad the pyproject.toml file.

    Parameters:
        use_pep517 - Has the user requested PEP 517 processing? None
                     means the user hasn't explicitly specified.
        pyproject_toml - Location of the project's pyproject.toml file
        setup_py - Location of the project's setup.py file
        req_name - The name of the requirement we're processing (for
                   error reporting)

    Returns:
        None if we should use the legacy code path, otherwise a tuple
        (
            requirements from pyproject.toml,
            name of PEP 517 backend,
            requirements we should check are installed after setting
                up the build environment
            directory paths to import the backend from (backend-path),
                relative to the project root.
        )
    zW does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.zutf-8)�encodingNzbuild-systemzIDisabling PEP 517 processing is invalid: project does not have a setup.pyT�
build-backendzbDisabling PEP 517 processing is invalid: project specifies a build backend of {} in pyproject.toml�
setuptools�wheelzsetuptools>=40.8.0z setuptools.build_meta:__legacy__)r"r,r")�packagezIt is not a list of strings.)r/�reasonz$It contains an invalid requirement: zbackend-path)rr�isfiler
�openr�loads�read�get�format�	importlib�util�	find_specrrrr	rr!)r&r'r(r)�
has_pyproject�	has_setup�f�pp_toml�build_systemr"�requirement�errorr#r%r$s               r�load_pyproject_tomlrAsH��0�G�G�N�N�>�2�M������x�(�I�����j�=�
>�
�	
�
�
�.�7�
3�q��k�k�!�&�&�(�+�G�4��{�{�>�2�����Y��!�*�#�3��
��
�	�/�\�9��!�*�#�$�$*�F�<��+H�$I��
�
�
�
�	��
5��>�>�+�+�L�9�9�
5��>�>�+�+�G�4�4�	��!�!�!�����.�w�7�?�
���#�#�#���%�+�H�=�=��J�'�H��8�$�+��1�
�	
� ��	���$� �����/�G��#�#�N�B�7�L��E���5��%�&���h����E�E�i4�
3��x"�	�/� �=�k�_�M���
��	�s$� $F6�/G�6G�	G"�G�G")�importlib.utilr7r�collectionsr�typingrrr�pip._vendorr�"pip._vendor.packaging.requirementsrr	�pip._internal.exceptionsr
rr�boolrrr r!rA�rr�<module>rJs����	�"�&�&��N���P��P��P�E�3�E�3�E� ��J���
VF����VF�03�VF�?B�VF�NQ�VF�
� �!�VFrpython3.12/site-packages/pip/_internal/__pycache__/cache.cpython-312.pyc000064400000030652151732701220021640 0ustar00�

R`i�(��d�dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZddlm
Z
mZmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZmZddlmZej>e �Z!d
Z"de	e#e#fde#fd�Z$Gd�d�Z%Gd�de%�Z&Gd�de&�Z'Gd�d�Z(Gd�de%�Z)y)zCache Management
�N)�Path)�Any�Dict�List�Optional)�Tag�interpreter_name�interpreter_version)�canonicalize_name)�InvalidWheelFilename)�	DirectUrl)�Link)�Wheel)�
TempDirectory�
tempdir_kinds)�path_to_urlzorigin.json�d�returnc��tj|ddd��}tj|j	d��j�S)z'Return a stable sha224 of a dictionary.T)�,�:)�	sort_keys�
separators�ensure_ascii�ascii)�json�dumps�hashlib�sha224�encode�	hexdigest)r�ss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cache.py�
_hash_dictr$s7���
�
�1���$�O�A��>�>�!�(�(�7�+�,�6�6�8�8�c���eZdZdZdeddf�fd�Zdedeefd�Zdededee	fd	�Z
dedefd
�Zdedeedee
defd
�Z�xZS)�CachezuAn abstract class - provides cache directories for data from links

    :param cache_dir: The root of the cache.
    �	cache_dirrNc�~��t�|��|r!tjj	|�sJ�|xsd|_y�N)�super�__init__�os�path�isabsr(��selfr(�	__class__s  �r#r,zCache.__init__&s2���
��������
�
�i� 8�8�8�"�*�d��r%�linkc�(�d|ji}|j�%|j�|j||j<|jr|j|d<t	�|d<t�|d<t
|�}|dd|dd|dd|ddg}|S)	z<Get parts of part that must be os.path.joined with cache_dir�urlN�subdirectoryr	r
���)�url_without_fragment�	hash_name�hash�subdirectory_fragmentr	r
r$)r1r3�	key_parts�hashed�partss     r#�_get_cache_path_partszCache._get_cache_path_parts+s����D�5�5�6�	��>�>�%�$�)�)�*?�(,�	�	�I�d�n�n�%��%�%�(,�(B�(B�I�n�%�)9�(:�	�$�%�+>�+@�	�'�(��I�&��
����V�A�a�[�&��1�+�v�a�b�z�B���r%�canonical_package_namec���|jxs|xs|}|rgS|j|�}tjj	|�r%tj
|�D�cgc]}||f��c}SgScc}wr*)r(�get_path_for_linkr-r.�isdir�listdir)r1r3rB�
can_not_cacher.�	candidates      r#�_get_candidateszCache._get_candidatesLsw�� �N�N�*�T�2H�.H�T�PT�H�
���I��%�%�d�+��
�7�7�=�=���79�z�z�$�7G�H�7G�)�Y��%�7G�H�H��	��Is�#A3c��t��)z5Return a directory to store cached items in for link.��NotImplementedError�r1r3s  r#rDzCache.get_path_for_linkVs��!�#�#r%�package_name�supported_tagsc��t��)zaReturns a link to a cached item if it exists, otherwise returns the
        passed link.
        rK)r1r3rNrOs    r#�getz	Cache.getZs
��"�#�#r%)�__name__�
__module__�__qualname__�__doc__�strr,rrrArrIrDrrrQ�
__classcell__�r2s@r#r'r' s�����
+�#�+�$�+�
�$��4��9��B�D��#��$�s�)��$�d�$�s�$�	$��	$��s�m�	$��S�	�		$�

�	$r%r'c�`��eZdZdZdeddf�fd�Zdedefd�Zdedeed	e	e
defd
�Z�xZS)�SimpleWheelCachez&A cache of wheels for future installs.r(rNc�$��t�|�|�yr*)r+r,r0s  �r#r,zSimpleWheelCache.__init__is���
����#r%r3c��|j|�}|jsJ�tjj|jdg|���S)a�Return a directory to store cached wheels for link

        Because there are M wheels for any one sdist, we provide a directory
        to cache them in, and then consult that directory when looking up
        cache hits.

        We only insert things into the cache if they have plausible version
        numbers, so that we don't contaminate the cache with things that were
        not unique. E.g. ./package might have dozens of installs done for it
        and build a version of 0.0...and if we built and cached a wheel, we'd
        end up using the same wheel even if the source has been edited.

        :param link: The link of the sdist for which this will cache wheels.
        �wheels)rAr(r-r.�join)r1r3r@s   r#rDz"SimpleWheelCache.get_path_for_linkls>���*�*�4�0���~�~��~��w�w�|�|�D�N�N�H�=�u�=�=r%rNrOc���g}|s|St|�}|j||�D]w\}}	t|�}t|j�|k7rt
j
d|||��C|j|�s�U|j|j|�||f��y|s|St|�\}	}}tttjj||���S#t$rY��wxYw)NzWIgnoring cached wheel %s for %s as it does not match the expected distribution name %s.)rrIrr�name�logger�debug�	supported�append�support_index_min�minrrr-r.r^)
r1r3rNrO�
candidatesrB�
wheel_name�	wheel_dir�wheel�_s
          r#rQzSimpleWheelCache.get�s���
���K�!2�<�!@��%)�%9�%9�$�@V�%W�!�J�	�
��j�)��!����,�0F�F����H��� ����?�?�>�2������+�+�N�;����
�#&X�2��K�#&�z�?� ��:�y��K������Y�
� C�D�E�E��5(�
��
�s�C#�#	C/�.C/)
rRrSrTrUrVr,rrDrrrrQrWrXs@r#rZrZfsd���0�$�#�$�$�$�>�d�>�s�>�()F��)F��s�m�)F��S�	�	)F�

�)Fr%rZc�$��eZdZdZd�fd�Z�xZS)�EphemWheelCachezBA SimpleWheelCache that creates it's own temporary cache directoryc���ttjd��|_t�|�|jj�y)NT)�kind�globally_managed)rr�EPHEM_WHEEL_CACHE�	_temp_dirr+r,r.)r1r2s �r#r,zEphemWheelCache.__init__�s4���&��0�0�!�
���
	������,�,�-r%)rN)rRrSrTrUr,rWrXs@r#rmrm�s���L�.�.r%rmc��eZdZdedefd�Zy)�
CacheEntryr3�
persistentc�v�||_||_d|_t|jj�j
tz}|j�r,	tj|jd���|_yy#t$r,}tjd||j|�Yd}~yd}~wwxYw)N�utf-8��encodingz7Ignoring invalid cache entry origin file %s for %s (%s))r3ru�originr�	file_path�parent�ORIGIN_JSON_NAME�existsr
�	from_json�	read_text�	Exceptionra�warning�filename)r1r3ru�origin_direct_url_path�es     r#r,zCacheEntry.__init__�s���
��	�$���+/���!%�d�i�i�&9�&9�!:�!A�!A�DT�!T��!�(�(�*�

�'�1�1�*�4�4�g�4�F����+��
�
����M�*��M�M��	���
�s�*B�	B8�"B3�3B8N)rRrSrTr�boolr,�r%r#rtrt�s������r%rtc	���eZdZdZdeddf�fd�Zdedefd�Zdedefd�Zded	e	ed
e
edefd�Zded	e	ed
e
ede	e
fd�Zeded
eddfd��Z�xZS)�
WheelCachez�Wraps EphemWheelCache and SimpleWheelCache into a single Cache

    This Cache allows for gracefully degradation, using the ephem wheel cache
    when a certain link is not found in the simple wheel cache first.
    r(rNc�b��t�|�|�t|�|_t	�|_yr*)r+r,rZ�_wheel_cacherm�_ephem_cacher0s  �r#r,zWheelCache.__init__�s(���
����#�,�Y�7���+�-��r%r3c�8�|jj|�Sr*)r�rDrMs  r#rDzWheelCache.get_path_for_link����� � �2�2�4�8�8r%c�8�|jj|�Sr*)r�rDrMs  r#�get_ephem_path_for_linkz"WheelCache.get_ephem_path_for_link�r�r%rNrOc�H�|j|||�}|�|S|jSr*)�get_cache_entryr3)r1r3rNrO�cache_entrys     r#rQzWheelCache.get�s/���*�*�4��~�N�����K����r%c��|jj|||��}||ur
t|d��S|jj|||��}||ur
t|d��Sy)z�Returns a CacheEntry with a link to a cached item if it exists or
        None. The cache entry indicates if the item was found in the persistent
        or ephemeral cache.
        )r3rNrOT)ruFN)r�rQrtr�)r1r3rNrO�retvals     r#r�zWheelCache.get_cache_entry�s}���"�"�&�&��%�)�'�
��
����f��6�6��"�"�&�&��%�)�'�
��
����f��7�7�r%�
download_infoc��t|�tz}|j�rl	tj|jd���}|j|jk7r-tjd|j||j�	|j|j�d��y#t$r!}tjd||�Yd}~�Gd}~wwxYw)Nrwrxz�Origin URL %s in cache entry %s does not match download URL %s. This is likely a pip bug or a cache corruption issue. Will overwrite it with the new value.zPCould not read origin file %s in cache entry (%s). Will attempt to overwrite it.)rr}r~r
rr�r5rar�r��
write_text�to_json)r(r��origin_pathrzr�s     r#�record_download_originz!WheelCache.record_download_origin	s����9�o�(8�8������
�"�,�,�[�-B�-B�G�-B�-T�U���:�:��!2�!2�2��N�N�@��
�
�!�%�)�)�
�	���}�4�4�6���I��'�
����4���	���
�s�%B1�1	C�:C�C)rRrSrTrUrVr,rrDr�rrrrQrtr��staticmethodr
r�rWrXs@r#r�r��s�����.�#�.�$�.�
9�d�9�s�9�9�D�9�S�9�	 ��	 ��s�m�	 ��S�	�		 �

�	 �����s�m���S�	�	�

�*�	��8�J�#�J�i�J�D�J��Jr%r�)*rUrr�loggingr-�pathlibr�typingrrrr�pip._vendor.packaging.tagsrr	r
�pip._vendor.packaging.utilsr�pip._internal.exceptionsr�pip._internal.models.direct_urlr
�pip._internal.models.linkr�pip._internal.models.wheelr�pip._internal.utils.temp_dirrr�pip._internal.utils.urlsr�	getLoggerrRrar}rVr$r'rZrmrtr�r�r%r#�<module>r�s�������	��,�,�Q�Q�9�9�5�*�,�E�0�	��	�	�8�	$�� ��9�$�s�C�x�.�9�S�9�C$�C$�LCF�u�CF�L	.�&�	.���0RJ��RJr%python3.12/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-312.pyc000064400000024531151732701220024553 0ustar00�

R`i� ��x�ddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZm
Z
mZmZddlmZddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlm Z ddl!m"Z"dd
l#m$Z$ddl%m&Z&ddl'm(Z(m)Z)ddl*m+Z+m,Z,m-Z-ddl.m/Z/ej`d��Z1ejde3�Z4de5de5fd�Z6de5dejfd�Z7Gd�d�Z8e
Gd�d��Z9de5de:fd�Z;de$d ejxdee5fd!�Z=d"e8d#ejd$e d%e
gee5fdee9f
d&�Z>de$d ejxddfd'�Z?y)(�N)�	dataclass)�Any�Callable�Dict�Optional)�parse)�Group)�escape)�Text)�
LinkCollector)�
PackageFinder)�get_default_environment)�DistributionVersion)�SelectionPreferences)�
PipSession)�WINDOWS)� get_best_invocation_for_this_pip�#get_best_invocation_for_this_python)�adjacent_tmp_file�check_path_owner�replace)�
ensure_dir�)�days�key�returnc�l�|j�}tj|�j�}|S�N)�encode�hashlib�sha224�	hexdigest)r�	key_bytes�names   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/self_outdated_check.py�_get_statefile_namer&$s)���
�
��I��>�>�)�$�.�.�0�D��K��isodatec�`�tjj|jdd��S)z�Convert an ISO format string to a date.

    Handles the format 2020-01-22T14:24:01Z (trailing Z)
    which is not supported by older versions of fromisoformat.
    �Zz+00:00)�datetime�
fromisoformatr)r(s r%�
_convert_dater-*s&�����*�*�7�?�?�3��+I�J�Jr'c��eZdZdeddfd�Zedefd��Zdejdeefd�Z	dedejddfd	�Z
y)
�SelfCheckState�	cache_dirrNc�Z�i|_d|_|rutjj	|dt|j��|_	t|jd��5}tj|�|_ddd�yy#1swYyxYw#tttf$rYywxYw)N�	selfcheckzutf-8)�encoding)
�_state�_statefile_path�os�path�joinr&r�open�json�load�OSError�
ValueError�KeyError)�selfr0�	statefiles   r%�__init__zSelfCheckState.__init__4s���&(���#����#%�7�7�<�<��;�(;�D�H�H�(E�$�D� �
��$�.�.��A�Y�"&�)�)�I�"6�D�K�B�A��
B�A���Z��2�
��
�s0�B�"B�=B�B�B�B�B*�)B*c�"�tjSr)�sys�prefix)r?s r%rzSelfCheckState.keyEs���z�z�r'�current_timec���|jsyd|jvryd|jvryt|jd�}||z
}|tkDry|jdS)z7Check if we have a not-outdated version loaded already.N�
last_check�pypi_version)r4r-�_WEEK)r?rErG�time_since_last_checks    r%�getzSelfCheckState.getIsd���{�{���t�{�{�*������,��#�4�;�;�|�#<�=�
� ,�z� 9�� �5�(���{�{�>�*�*r'rHc�F�|jsyttjj	|j��syttjj	|j��|j|j�|d�}tj|dd��}t|j�5}|j|j��ddd�	tj|j�y#1swY�+xYw#t$rYywxYw)N)rrGrHT)�,�:)�	sort_keys�
separators)r5rr6r7�dirnamerr�	isoformatr:�dumpsr�writerrr$r<)r?rHrE�state�text�fs      r%�setzSelfCheckState.set\s����#�#�� �������0D�0D� E�F��	�2�7�7�?�?�4�#7�#7�8�9�
�8�8�&�0�0�2�(�
���z�z�%�4�J�G��
�t�3�3�
4��
�G�G�D�K�K�M�"�5�	�
�A�F�F�D�0�0�1�
5�
4���	��	�s�> D�' D�D�	D �D )�__name__�
__module__�__qualname__�strrA�propertyrr+rrKrX�r'r%r/r/3sm���#��$��"��S����+�� 1� 1�+�h�s�m�+�& �� �8�3D�3D� �� r'r/c�.�eZdZUeed<eed<defd�Zy)�
UpgradePrompt�old�newrc��trt��d�}n
t�}d}tt	�t	j
|�d|j�d|j�d��t	j
|�dt|��d���S)Nz -m pipz/[bold][[reset][blue]notice[reset][bold]][reset]z) A new release of pip is available: [red]z[reset] -> [green]z[reset]z To update, run: [green]z install --upgrade pip)	rrrr	r�from_markuprarbr
)r?�pip_cmd�notices   r%�__rich__zUpgradePrompt.__rich__�s����<�>�?�w�G�G�6�8�G�B����F�����(�����z�!3�D�H�H�:�W�F�
�
����(�� ��/�*�*@�B�
�

�
	
r'N)rYrZr[r\�__annotations__r	rgr^r'r%r`r`s��	�H�	�H�
�%�
r'r`�pkgc�^�t�j|�}|duxrd|jk(S)z�Checks whether pkg was installed by pip

    This is used not to display the upgrade message when pip is in fact
    installed by system package manager, such as dnf on Fedora.
    N�pip)r�get_distribution�	installer)ri�dists  r%�was_installed_by_pipro�s0��#�$�5�5�c�:�D��t��7����� 7�7r'�session�optionsc���tj||d��}tdd��}tj||��}|j	d�j
}|�yt
|j�S)NT)rq�suppress_no_indexF)�allow_yanked�allow_all_prereleases)�link_collector�selection_prefsrk)r�createrr
�find_best_candidate�best_candidater\�version)rprqrvrw�finderrzs      r%�_get_current_remote_pip_versionr}�sy��#�)�)�����N�+��#��O�
�
!�
!�%�'��F��/�/��6�E�E�N�����~�%�%�&�&r'rUrE�
local_version�get_remote_versionc��|j|�}|�1|�}|�tjd�y|j||�t	|�}tjd|�tjd|�td�}tjd|�|sy||kxr|j|jk7}|rtt|�|��Sy)NzNo remote pip version foundzRemote version of pip: %szLocal version of pip:  %srkzWas pip installed by pip? %s)rarb)	rK�logger�debugrX�
parse_versionro�base_versionr`r\)rUrEr~r�remote_version_str�remote_version�pip_installed_by_pip�local_version_is_olders        r%�_self_version_check_logicr��s������<�0���!�/�1���%��L�L�6�7��
�	�	�$�l�3�"�#5�6�N�
�L�L�,�n�=�
�L�L�,�m�<�/��6��
�L�L�/�1E�F���	��&�	F��&�&�.�*E�*E�E�����]�!3�9K�L�L�r'c
���t�jd�}|sy	tt|j��t
j
j
t
jj�|jtjt||���}|�tjd|ddi��yy#t$r/tjd	�tj!d
d��YywxYw)z�Check for an update for pip.

    Limit the frequency of checks to once per week. State is stored either in
    the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix
    of the pip script path.
    rkN)r0)rUrEr~rz%s�richT)�extraz6There was an error checking the latest version of pip.zSee below for error)�exc_info)rrlr�r/r0r+�now�timezone�utcr{�	functools�partialr}r��warning�	Exceptionr�)rprq�installed_dist�upgrade_prompts    r%�pip_self_version_checkr��s���-�.�?�?��F�N���
;�2� �7�+<�+<�=�!�*�*�.�.�x�/@�/@�/D�/D�E�(�0�0�(�0�0�/��'� �	
���%��N�N�4����~�N�F�&���;����O�P����*�T��:�;�s�BB7�75C/�.C/)@r+r�r r:�logging�optparse�os.pathr6rC�dataclassesr�typingrrrr�pip._vendor.packaging.versionrr��pip._vendor.rich.consoler	�pip._vendor.rich.markupr
�pip._vendor.rich.textr�pip._internal.index.collectorr�"pip._internal.index.package_finderr
�pip._internal.metadatar�pip._internal.metadata.baser�$pip._internal.models.selection_prefsr�pip._internal.network.sessionr�pip._internal.utils.compatr�pip._internal.utils.entrypointsrr�pip._internal.utils.filesystemrrr�pip._internal.utils.miscr�	timedeltarI�	getLoggerrYr�r\r&r-r/r`�boolro�Valuesr}r�r�r^r'r%�<module>r�sv���������
�!�0�0�@�*�*�&�7�<�:�;�E�4�.��X�W�/������"��	��	�	�8�	$���S��S��K�3�K�8�#4�#4�K�I�I�X�
�
��
�08�c�8�d�8�'�
�'�"*�/�/�'�
�c�]�'�8����#�#��'�	�
!��X�c�]�!2�3���m��
�D;�J�;����;�T�;r'python3.12/site-packages/pip/_internal/__pycache__/build_env.cpython-312.pyc000064400000033731151732701220022545 0ustar00�

R`i(�
��dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZmZddlmZddlmZddlmZdd	lmZdd
lmZddlm Z m!Z!m"Z"ddl#m$Z$m%Z%dd
l&m'Z'ddl(m)Z)m*Z*erddl+m,Z,ejZe.�Z/de0de0deee0ee0e0fffd�Z1Gd�d�Z2de0fd�Z3dee0fd�Z4Gd�d�Z5Gd�de5�Z6y)z;Build Environment used for isolation during sdist building
�N)�OrderedDict)�
TracebackType)�
TYPE_CHECKING�Iterable�List�Optional�Set�Tuple�Type�Union)�where)�Requirement)�Version)�__file__)�open_spinner)�get_platlib�get_purelib�
get_scheme)�get_default_environment�get_environment)�call_subprocess)�
TempDirectory�
tempdir_kinds)�
PackageFinder�a�b�returnc��||k7r||fS|fS�N�)rrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/build_env.py�_dedupr"s���!�V�A�q�6�%�!��%�c��eZdZdeddfd�Zy)�_Prefix�pathrNc��||_d|_td|��}|j|_t|j|j�|_y)NF�)�prefix)	r&�setupr�scripts�bin_dirr"�purelib�platlib�lib_dirs)�selfr&�schemes   r!�__init__z_Prefix.__init__$s=����	���
��B�t�,���~�~����v�~�~�v�~�~�>��
r#)�__name__�
__module__�__qualname__�strr2r r#r!r%r%#s��?�S�?�T�?r#r%c���tjt�j�j}|j�st
|�Stj|dz�S)z�Get a file to pass to a Python executable, to run the currently-running pip.

    This is used to run a pip subprocess, for installing requirements into the build
    environment.
    z__pip-runner__.py)	�pathlib�Path�pip_location�resolve�parent�is_dirr6�os�fsdecode)�sources r!�get_runnable_piprA,sK���\�\�,�
'�
/�
/�
1�
8�
8�F��=�=�?��6�{��
�;�;�v� 3�3�4�4r#c���ttd�rtj�}nt�t	�g}|D�chc]!}t
jj|���#c}Scc}w)z�Get system site packages

    Usually from site.getsitepackages,
    but fallback on `get_purelib()/get_platlib()` if unavailable
    (e.g. in a virtualenv created by virtualenv<20)

    Returns normalized set of strings.
    �getsitepackages)�hasattr�siterCrrr>r&�normcase)�system_sitesr&s  r!�_get_system_sitepackagesrH<sT���t�&�'��+�+�-��$�
�{�}�5��/;�<�|�t�B�G�G���T�"�|�<�<��<s�&A'c
���eZdZdZdd�Zdd�Zdeeedeedee	ddfd	�Z
d
eede
ee
eefeeffd�Zdd
deedededdf
d�Zededd
deedededdfd��Zy)�BuildEnvironmentzACreates and manages an isolated environment to install build depsrNc���ttjd���t�fd�dD��|_g|_g|_tt|jj���D]L}|j
j|j�|jj|j��Nt�}tj j#�j d�|_tj j'|j$�stj(|j$�t+tj j#|j$d�dd�	�5}|j-t/j0d
�j3||j���ddd�y#1swYyxYw)NT)�kind�globally_managedc3��K�|]9}|ttjj�j|��f���;y�wr)r%r>r&�join)�.0�name�temp_dirs  �r!�	<genexpr>z,BuildEnvironment.__init__.<locals>.<genexpr>Vs6�����%
�-���7�2�7�7�<�<��
�
�t�<�=�>�-�s�?A)�normal�overlayrEzsitecustomize.py�wzutf-8)�encodinga�
                import os, site, sys

                # First, drop system-sites related paths.
                original_sys_path = sys.path[:]
                known_paths = set()
                for path in {system_sites!r}:
                    site.addsitedir(path, known_paths=known_paths)
                system_paths = set(
                    os.path.normcase(path)
                    for path in sys.path[len(original_sys_path):]
                )
                original_sys_path = [
                    path for path in original_sys_path
                    if os.path.normcase(path) not in system_paths
                ]
                sys.path = original_sys_path

                # Second, add lib directories.
                # ensuring .pth file are processed.
                for path in {lib_dirs!r}:
                    assert not path in sys.path
                    site.addsitedir(path)
                )rGr/)rr�	BUILD_ENVr�	_prefixes�	_bin_dirs�	_lib_dirs�reversed�list�values�appendr,�extendr/rHr>r&rO�	_site_dir�exists�mkdir�open�write�textwrap�dedent�format)r0r)rG�fprRs    @r!r2zBuildEnvironment.__init__Ss;��� �m�&=�&=�PT�U��$�%
�-�%
�
���
%'���$&����t�D�N�N�$9�$9�$;�<�=�F��N�N�!�!�&�.�.�1��N�N�!�!�&�/�/�2�>�0�1�������h�m�m�V�<����w�w�~�~�d�n�n�-��H�H�T�^�^�$�
��G�G�L�L����);�<�c�G�
�
��H�H������2�&�l�T�^�^�&�L�5
�
�
�
�s
�6AF?�?Gc���dD�cic]#}|tjj|d���%c}|_|jdd}|jd}|r.|j|j
tj��|jg}tjjtjj|�dtjj|�d��ycc}w)N)�PATH�PYTHONNOUSERSITE�
PYTHONPATHrk�1)r>�environ�get�	_save_envrZr`�split�pathsepra�updaterO)r0rQr&�old_path�
pythonpaths     r!�	__enter__zBuildEnvironment.__enter__�s���C�
�B��
�"�*�*�.�.��t�,�,�B�
���
�~�~�a� ���>�>�&�)����K�K����r�z�z�2�3��n�n�%�
�
�
�
����
�
����-�$'� �j�j�o�o�j�9�
�	
��
s�(C.�exc_type�exc_val�exc_tbc��|jj�D];\}}|�!tjj	|d��)|tj|<�=yr)rq�itemsr>ro�pop)r0rxryrz�varname�	old_values      r!�__exit__zBuildEnvironment.__exit__�sF��#'�.�.�"6�"6�"8��G�Y�� ��
�
���w��-�&/��
�
�7�#�	#9r#�reqsc�|�t�}t�}|�r"t|d�rt|j�n	t	�}|D]�}t|�}|j�|jjddi�s�8|j|j�}|s|j|��gt|jt�r|j�d|j��}n|j�d|j��}|jj|jd��r��|j||f���||fS)z�Return 2 sets:
        - conflicting requirements: set of (installed, wanted) reqs tuples
        - missing requirements: set of reqs
        r[�extrar(z==z===T)�prereleases)�setrDrr[rr�marker�evaluate�get_distributionrQ�add�
isinstance�versionr�	specifier�contains)	r0r��missing�conflicting�env�req_str�req�dist�installed_req_strs	         r!�check_requirementsz#BuildEnvironment.check_requirements�s���%���e����4��-� ����/�,�.�
�
 ��!�'�*���:�:�)�#�*�*�2E�2E�w�PR�m�2T���+�+�C�H�H�5����K�K��(���d�l�l�G�4�+.�8�8�*�B�t�|�|�n�(E�%�+.�8�8�*�C����~�(F�%��}�}�-�-�d�l�l��-�M��O�O�%6��$@�A� �"�G�#�#r#�finderr�requirements�prefix_as_stringrLc��|j|}|jrJ�d|_|sy|jt�||||��y)NT)rL)rYr*�_install_requirementsrA)r0r�r�r�rLr)s      r!�install_requirementsz%BuildEnvironment.install_requirements�sR����� 0�1���<�<���������"�"�������	#�	
r#�pip_runnabler)c
���tj|dddd|jdg}tj	�t
jkr|jd�dD][}t|j|�}|jd|jd	d
�zdjt|xsdh��f��]|j}|r4|jd
|dg�|ddD]}	|jd|	g��n|jd�|jD]}
|jd|
g��|j D]}|jd|g��|j"r|jd�|j$r|jd�|jd�|j|�dt'�i}t)d|���5}
t+|d|��|
|��ddd�y#1swYyxYw)N�installz--ignore-installedz	--no-userz--prefixz--no-warn-script-locationz-v)�	no_binary�only_binaryz--�_�-�,z:none:z-ir�z--extra-index-urlz
--no-indexz--find-linksz--trusted-hostz--prez--prefer-binary�_PIP_STANDALONE_CERTzInstalling zpip subprocess to install )�command_desc�spinner�
extra_environ)�sys�
executabler&�logger�getEffectiveLevel�logging�DEBUGr_�getattr�format_controlr`�replacerO�sorted�
index_urls�
find_links�
trusted_hosts�allow_all_prereleases�
prefer_binaryr
rr)r�r�r�r)rL�argsr��formatsr��extra_index�link�hostr�r�s              r!r�z&BuildEnvironment._install_requirements�s���
�N�N��� ����K�K�'�	
���#�#�%����6��K�K���:�N��f�3�3�^�D�G��K�K��>�1�1�#�s�;�;��H�H�V�G�$9��z�:�;��
�;��&�&�
���K�K��z�!�}�-�.�)�!�"�~�����0�+�>�?� .�
�K�K��%��%�%�D��K�K���.�/�&��(�(�D��K�K�)�4�0�1�)��'�'��K�K�� �����K�K�)�*����D�����L�!�/���9�
�
�K��v�.�
/�7���9�$��@��+�	
�0�
/�
/�s�
G&�&G/�rN)r3r4r5�__doc__r2rwrr�
BaseExceptionrr�rr6r
r	r�r��staticmethodr%r�r r#r!rJrJPs
��K�4�l
�*
0��4�
�.�/�
0��-�(�
0���'�	
0�

�
0� $��S�M� $�	�s�5��c��?�#�S��X�-�	.� $�D
��
��s�m�
��	
��

�
�
�*�6��6��6��s�m�6��	6��
6�
�6��6r#rJc
�z�eZdZdZdd�Zdd�Zdeeedeedee	ddfd	�Z
dd
�Zddd
ee
de
de
ddf
d�Zy)�NoOpBuildEnvironmentz0A no-op drop-in replacement for BuildEnvironmentrNc��yrr �r0s r!r2zNoOpBuildEnvironment.__init__���r#c��yrr r�s r!rwzNoOpBuildEnvironment.__enter__!r�r#rxryrzc��yrr )r0rxryrzs    r!r�zNoOpBuildEnvironment.__exit__$s��	
r#c��yrr r�s r!�cleanupzNoOpBuildEnvironment.cleanup,r�r#r�rr�r�rLc��t��r)�NotImplementedError)r0r�r�r�rLs     r!r�z)NoOpBuildEnvironment.install_requirements/s
��"�#�#r#r�)r3r4r5r�r2rwrrr�rr�r�rr6r�r r#r!r�r�s���:�
�
�
��4�
�.�/�
��-�(�
���'�	
�

�
�
�$��$��s�m�$��	$��
$�
�$r#r�)7r�r�r>r8rEr�rf�collectionsr�typesr�typingrrrrr	r
rr�pip._vendor.certifir
�"pip._vendor.packaging.requirementsr�pip._vendor.packaging.versionr�piprr:�pip._internal.cli.spinnersr�pip._internal.locationsrrr�pip._internal.metadatarr�pip._internal.utils.subprocessr�pip._internal.utils.temp_dirrr�"pip._internal.index.package_finderr�	getLoggerr3r�r6r"r%rArHrJr�r r#r!�<module>r�s�����	���
��#��S�S�S�%�:�1�(�3�H�H�K�:�E��@�	��	�	�8�	$��&�c�&�c�&�e�E�#�J��c�3�h��$?�@�&�?�?�
5�#�
5� =�#�c�(�=�(H�H�V$�+�$r#python3.12/site-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc000064400000101222151732701220022746 0ustar00�

R`i�\�
�8�dZddlZddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZddlm
Z
mZmZmZmZmZddlmZmZddlmZmZmZddlmZddlmZe
rdd	lmZdd
lm Z ddl!m"Z"ddl#m$Z$ejJe&�Z'd
e(de)fd�Z*d
eee(fdede(de(def
d�Z+Gd�de,�Z-Gd�de-�Z.Gd�de-�Z/Gd�de-�Z0Gd�de-�Z1Gd�de.�Z2Gd �d!e.�Z3Gd"�d#e-�Z4Gd$�d%e0�Z5Gd&�d'e0�Z6Gd(�d)e0�Z7Gd*�d+e0�Z8Gd,�d-e-�Z9Gd.�d/e-�Z:Gd0�d1e-�Z;Gd2�d3e-�Z<Gd4�d5e-�Z=Gd6�d7e0�Z>Gd8�d9e0�Z?Gd:�d;e0�Z@Gd<�d=e0�ZAGd>�d?e.e0�ZBGd@�dAeBe0�ZCGdB�dCe0�ZDGdD�dEe0�ZEGdF�dGeE�ZFGdH�dIeE�ZGGdJ�dKeE�ZHGdL�dMeE�ZIGdN�dOeE�ZJGdP�dQe0�ZKGdR�dSe/�ZLdTej��dU�ZNGdV�dWe.�ZOy)Xz�Exceptions used throughout package.

This module MUST NOT try to import from anything within `pip._internal` to
operate. This is expected to be importable from any/all files within the
subpackage and, thus, should not depend on them.
�N)�chain�groupby�repeat)�
TYPE_CHECKING�Dict�Iterator�List�Optional�Union)�Request�Response)�Console�ConsoleOptions�RenderResult)�escape)�Text)�_Hash)�Literal)�BaseDistribution)�InstallRequirement�s�returnc�2�tjd|�duS)Nz^[a-z]+(-[a-z]+)*$)�re�match)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/exceptions.py�_is_kebab_caser$s��
�8�8�)�1�-�T�9�9��console�prefix�indentc���t|t�r|}n|j|�}|j|d��|jd|��d��j|j	d���zS)N�ignore)�overflow�
T)�allow_blank)�
isinstancer�
render_str�join�split)rrr r!�texts     r�_prefix_with_indentr,(ss���!�T�����!�!�!�$�����f�x��8�7�;M�;M�
�V�H�
��<N�<�
�d�4�:�:�$�:�'�(�)�)rc��eZdZdZy)�PipErrorzThe base pip error.N��__name__�
__module__�__qualname__�__doc__�rrr.r.9s��rr.c����eZdZUdZeed<ddddd�dddeedeeefd	eeeefd
eeeefdeeeefdeed
df�fd�Z	d
efd�Z
deded
e
fd�Z�xZS)�DiagnosticPipErrora�An error, that presents diagnostic information to the user.

    This contains a bunch of logic, to enable pretty presentation of our error
    messages. Each error gets a unique reference. Each error can also include
    additional context, a hint and/or a note -- which are presented with the
    main error message in a consistent style.

    This is adapted from the error output styling in `sphinx-theme-builder`.
    �	reference�errorN)�kindr7�	note_stmt�linkr9zLiteral["error", "warning"]�message�context�	hint_stmtr:r;rc�6��|�t|d�sJd��|j}t|�sJd��||_||_||_||_||_||_||_t�|�)d|jj�d|j�d��y)Nr7zerror reference not provided!z#error reference must be kebab-case!�<z: �>)
�hasattrr7rr9r<r=r:r>r;�super�__init__�	__class__r0)	�selfr9r7r<r=r>r:r;rEs	        �rrDzDiagnosticPipError.__init__Js�������4��-�N�/N�N�-����I��i�(�O�*O�O�(���	�"���������"���"�����	�
���1�T�^�^�4�4�5�R����7G�q�I�Jrc
��d|jj�d|j�d|j�d|j�d|j
�d|j�d�
S)Nr@z(reference=z
, message=z
, context=z, note_stmt=z, hint_stmt=z)>)rEr0r7r<r=r:r>�rFs r�__repr__zDiagnosticPipError.__repr__hsl������'�'�(�)����*�+��|�|�&�'��|�|�&�'����*�+����*��

�	
rr�optionsc#��K�|jdk(rdnd}d|�d|j�d|j�d���d��|jso|j�Gt	|j
|d|�d	�d|�d
�����t	|j|d|�d�d|�d
�����nHt	|j
|dd����n,|j
��|j�d��|j��|j�|j�d��|j�t	|j|dd����|j�t	|j|dd����|j�d��d|j����yy�w)Nr8�red�yellow�[z bold]z[/]: [bold]z[/]�u]×[/] u]│[/] )r r!u]╰─>[/] z]   [/] u[red]×[/] z  z[magenta bold]note[/]: z      z[cyan bold]hint[/]: zLink: )	r9r7�
ascii_onlyr=r,r<r:r>r;)rFrrJ�colours    r�__rich_console__z#DiagnosticPipError.__rich_console__ss�����
�)�)�w�.��H���&����	�	�{�+�d�n�n�5E�S�I�I����!�!��|�|�'�)��L�L���v�h�g�.��v�h�h�/�	��*��L�L���v�h�l�3��v�h�h�/�	��*��L�L��(��	���,�,���|�|�'����l�l�"��>�>�%����)C��H��>�>�%�%�����0��	�
��>�>�%�%�����-��	�
��9�9� ��H��4�9�9�+�&�&�!�s�E.E0)r0r1r2r3�str�__annotations__r
rrrDrIrrrrR�
__classcell__�rEs@rr6r6=s������N�
/6�#'�15�"�K�,�K��C�=�	K�
�s�D�y�!�K��%��T�	�*�+�
K��E�#�t�)�,�-�K��E�#�t�)�,�-�K��s�m�K�
�K�<	
�#�	
�:'��:'� �:'�
�	:'rr6c��eZdZdZy)�ConfigurationErrorz"General exception in configurationNr/r4rrrXrX�s��,rrXc��eZdZdZy)�InstallationErrorz%General exception during installationNr/r4rrrZrZ�s��/rrZc��eZdZdZy)�UninstallationErrorz'General exception during uninstallationNr/r4rrr\r\�s��1rr\c�0��eZdZdZdZdeddf�fd�Z�xZS)�MissingPyProjectBuildRequireszNRaised when pyproject.toml has `build-system`, but no `build-system.requires`.z'missing-pyproject-build-system-requires�packagerNc�h��t�|�dt|���td�dtd���y)N�Can not process zrThis package has an invalid pyproject.toml file.
The [build-system] table is missing the mandatory `requires` key.�;This is an issue with the package mentioned above, not pip.�+See PEP 518 for the detailed specification.�r<r=r:r>�rCrDrr)rFr_rEs  �rrDz&MissingPyProjectBuildRequires.__init__�sA���
���&�v�g��&7�8��T��T��H�I�	�	
r�r0r1r2r3r7rSrDrUrVs@rr^r^�s#���X�9�I�	
�3�	
�4�	
�	
rr^c�4��eZdZdZdZdededdf�fd�Z�xZS)�InvalidPyProjectBuildRequiresz>Raised when pyproject.toml an invalid `build-system.requires`.z'invalid-pyproject-build-system-requiresr_�reasonrNc�n��t�|�dt|���td|���dtd���y)NrazKThis package has an invalid `build-system.requires` key in pyproject.toml.
rbrcrdre)rFr_rirEs   �rrDz&InvalidPyProjectBuildRequires.__init__�sJ���
���&�v�g��&7�8��$�$*�8�-��T��H�I�	�	
rrfrVs@rrhrh�s*���H�9�I�	
�3�	
��	
��	
�	
rrhc�0�eZdZdZdddeddfd�Zdefd�Zy)	�NoneMetadataErrora4Raised when accessing a Distribution's "METADATA" or "PKG-INFO".

    This signifies an inconsistency, when the Distribution claims to have
    the metadata file (if not, raise ``FileNotFoundError`` instead), but is
    not actually able to produce its content. This may be due to permission
    errors.
    �distr�
metadata_namerNc� �||_||_y)z�
        :param dist: A Distribution object.
        :param metadata_name: The name of the metadata being accessed
            (can be "METADATA" or "PKG-INFO").
        N)rmrn)rFrmrns   rrDzNoneMetadataError.__init__�s����	�*��rc�N�dj|j|j�S)Nz+None {} metadata found for distribution: {})�formatrnrmrHs r�__str__zNoneMetadataError.__str__�s'��=�C�C�����I�I�
�	
r�r0r1r2r3rSrDrrr4rrrlrl�s4���+� �+��+�
�	+�
��
rrlc��eZdZdZdefd�Zy)�UserInstallationInvalidzBA --user install is requested on an environment without user site.rc��y)Nz$User base directory is not specifiedr4rHs rrrzUserInstallationInvalid.__str__s��5rN)r0r1r2r3rSrrr4rrrurus��L�6��6rruc��eZdZdefd�Zy)�InvalidSchemeCombinationrc�x�djd�|jddD��}d|�d|jd�d�S)Nz, c3�2K�|]}t|����y�w�N)rS)�.0�as  r�	<genexpr>z3InvalidSchemeCombination.__str__.<locals>.<genexpr>	s����:�>�a�3�q�6�>�s����zCannot set z and z	 together)r)�args)rF�befores  rrrz InvalidSchemeCombination.__str__s=�����:�4�9�9�S�b�>�:�:���V�H�E�$�)�)�B�-��	�B�BrN)r0r1r2rSrrr4rrrxrxs��C��Crrxc��eZdZdZy)�DistributionNotFoundzCRaised when a distribution cannot be found to satisfy a requirementNr/r4rrr�r�
s��Mrr�c��eZdZdZy)�RequirementsFileParseErrorzDRaised when a general error occurs parsing a requirements file line.Nr/r4rrr�r�s��Nrr�c��eZdZdZy)�BestVersionAlreadyInstalledzNRaised when the most up-to-date version of a package is already
    installed.Nr/r4rrr�r�s��rr�c��eZdZdZy)�
BadCommandz0Raised when virtualenv or a command is not foundNr/r4rrr�r�s��:rr�c��eZdZdZy)�CommandErrorz7Raised when there is an error in command-line argumentsNr/r4rrr�r�s��Arr�c��eZdZdZy)�PreviousBuildDirErrorz:Raised when there's a previous conflicting build directoryNr/r4rrr�r�"s��Drr�c	�R��eZdZdZ		d	dedeedeeddf�fd�
Zdefd�Z	�xZ
S)
�NetworkConnectionErrorzHTTP connection errorN�	error_msg�response�requestrc����||_||_||_|j�3|js't|d�r|jj|_t�|�|||�y)zc
        Initialize NetworkConnectionError with  `request` and `response`
        objects.
        Nr�)r�r�r�rBrCrD)rFr�r�r�rEs    �rrDzNetworkConnectionError.__init__)sW���!��
����"����M�M�%��L�L���)�,��=�=�0�0�D�L�
����H�g�6rc�,�t|j�Sr{)rSr�rHs rrrzNetworkConnectionError.__str__>s���4�>�>�"�"r)NN)r0r1r2r3rSr
r
rrDrrrUrVs@rr�r�&sO����
(,�%)�	7��7��8�$�7��'�"�	7�

�7�*#��#rr�c��eZdZdZy)�InvalidWheelFilenamezInvalid wheel filename.Nr/r4rrr�r�Bs��!rr�c��eZdZdZy)�UnsupportedWheelzUnsupported wheel.Nr/r4rrr�r�Fs��rr�c�,�eZdZdZdedefd�Zdefd�Zy)�InvalidWheelzInvalid (e.g. corrupt) wheel.�location�namec� �||_||_yr{)r�r�)rFr�r�s   rrDzInvalidWheel.__init__Ms�� ��
���	rrc�<�d|j�d|j�d�S)NzWheel 'z
' located at z is invalid.)r�r�rHs rrrzInvalidWheel.__str__Qs�������=�����|�L�LrNrsr4rrr�r�Js&��'����C��M��Mrr�c
�8�eZdZdZdddedededdf
d	�Zdefd
�Zy)�MetadataInconsistentaBuilt metadata contains inconsistent information.

    This is raised when the metadata contains values (e.g. name and version)
    that do not match the information previously obtained from sdist filename,
    user-supplied ``#egg=`` value, or an install requirement name.
    �ireqr�field�f_val�m_valrNc�<�||_||_||_||_yr{�r�r�r�r�)rFr�r�r�r�s     rrDzMetadataInconsistent.__init__]s ����	���
���
���
rc�n�d|j�d|j�d|j�d|j��S)Nz
Requested z has inconsistent z: expected z, but metadata has r�rHs rrrzMetadataInconsistent.__str__es=�������#5�d�j�j�\�B��
�
�~�%8�����
H�	
rrsr4rrr�r�Us@����(��14��=@��IL��	
��
��
rr�c�P��eZdZdZdZdededeeeddf�fd�Z	defd	�Z
�xZS)
�InstallationSubprocessErrorzA subprocess call failed.zsubprocess-exited-with-error�command_description�	exit_code�output_linesrNc�(��|�td�}nStjdt|��d��tdj|��ztjd�z}t�|�dt
|��d|��|dd�	�||_||_y)
NzSee above for output.z[red][z lines of output][/]
rOz[red]\[end of output][/]z[green]z)[/] did not run successfully.
exit code: zNThis error originates from a subprocess, and is likely not a problem with pip.�r<r=r>r:)	r�from_markup�lenr)rCrDrr�r�)rFr�r�r��
output_promptrEs     �rrDz$InstallationSubprocessError.__init__qs������ �!8�9�M�� � �6�#�l�*;�)<�<R�!S�T��r�w�w�|�,�-�.��"�"�#>�?�@�
�	����&�!4�5�6�7�'�[�*�"��$�	�	
�$7�� �"��rc�8�|j�d|j��S)Nz
 exited with )r�r�rHs rrrz#InstallationSubprocessError.__str__�s���*�*�+�=����8H�I�Ir)r0r1r2r3r7rS�intr
r	rDrrrUrVs@rr�r�lsP���#�.�I�#�!�#��	#�
�t�C�y�)�#�
�
#�@J��Jrr�c�8��eZdZdZdeddf�fd�Zdefd�Z�xZS)�MetadataGenerationFailedzmetadata-generation-failed�package_detailsrNc�F��tt|�dt|�dd��y)Nz4Encountered error while generating package metadata.zSee above for details.rbr�)rCr�rDr)rFr�rEs  �rrDz!MetadataGenerationFailed.__init__�s+���
	�)�4�9�J��?�+�.�S�		:�	
rc��y)Nzmetadata generation failedr4rHs rrrz MetadataGenerationFailed.__str__�s��+r)r0r1r2r7rSrDrrrUrVs@rr�r��s-���,�I�

��

�
�	

�,��,rr�c�8�eZdZdZdd�Zd	d�Zdefd�Zdefd�Z	y)
�
HashErrorsz:Multiple HashError instances rolled into one for reportingrNc��g|_yr{)�errorsrHs rrDzHashErrors.__init__�s	��)+��rc�:�|jj|�yr{)r��append)rFr8s  rr�zHashErrors.append�s�������5�!rc��g}|jjd���t|jd��D]8\}}|j|j�|jd�|D���:|rdj
|�Sy)Nc��|jSr{)�order��es r�<lambda>z$HashErrors.__str__.<locals>.<lambda>�s��q�w�wr)�keyc��|jSr{rVr�s rr�z$HashErrors.__str__.<locals>.<lambda>�s����rc3�<K�|]}|j����y�wr{)�body)r|r�s  rr~z%HashErrors.__str__.<locals>.<genexpr>�s����9�=�a�����=�s�r%rO)r��sortrr��head�extendr))rF�lines�cls�
errors_of_clss    rrrzHashErrors.__str__�sr���������.��/�")�$�+�+�7L�"M��C���L�L����"��L�L�9�=�9�9�#N���9�9�U�#�#�rc�,�t|j�Sr{)�boolr�rHs r�__bool__zHashErrors.__bool__�s���D�K�K� � r)rN)r8�	HashErrorrN)
r0r1r2r3rDr�rSrrr�r�r4rrr�r��s'��D�,�"����!�$�!rr�c�\�eZdZUdZdZeded<dZdZe	ed<de
fd	�Zde
fd
�Zde
fd�Z
y)r�a�
    A failure to verify a package against known-good hashes

    :cvar order: An int sorting hash exception classes by difficulty of
        recovery (lower being harder), so the user doesn't bother fretting
        about unpinned packages when he has deeper issues, like VCS
        dependencies, to deal with. Also keeps error reports in a
        deterministic order.
    :cvar head: A section heading for display above potentially many
        exceptions of this kind
    :ivar req: The InstallRequirement that triggered this error. This is
        pasted on after the exception is instantiated, because it's not
        typically available earlier.

    Nr�reqrOrr�rc�(�d|j���S)a=Return a summary of me for display under the heading.

        This default implementation simply prints a description of the
        triggering requirement.

        :param req: The InstallRequirement that provoked this error, with
            its link already populated by the resolver's _populate_link().

        z    )�_requirement_namerHs rr�zHashError.body�s���d�,�,�.�/�0�0rc�@�|j�d|j���S)Nr%)r�r�rHs rrrzHashError.__str__�s���)�)��B�t�y�y�{�m�,�,rc�H�|jrt|j�SdS)z�Return a description of the requirement that triggered me.

        This default implementation returns long description of the req, with
        line numbers

        �unknown package)r�rSrHs rr�zHashError._requirement_name�s��!%���s�4�8�8�}�?�.?�?r)r0r1r2r3r�r
rTr�r�r�rSr�rrr�r4rrr�r��sM��� +/�C��&�	'�.�
�D��E�3�O�
1�c�
1�-��-�@�3�@rr�c��eZdZdZdZdZy)�VcsHashUnsupported�uA hash was provided for a version-control-system-based requirement, but
    we don't have a method for hashing those.rzlCan't verify hashes for these requirements because we don't have a way to hash version control repositories:N�r0r1r2r3r�r�r4rrr�r��s��1�
�E�	;�	rr�c��eZdZdZdZdZy)�DirectoryUrlHashUnsupportedr��zUCan't verify hashes for these file:// requirements because they point to directories:Nr�r4rrr�r��s��1�
�E�	 �	rr�c�4�eZdZdZdZdZdeddfd�Zdefd�Zy)	�HashMissingz2A hash was needed for a requirement but is absent.�awHashes are required in --require-hashes mode, but they are missing from some requirements. Here is a list of those requirements along with the hashes their downloaded archives actually had. Add lines like these to your requirements files to prevent tampering. (If you did not enable --require-hashes manually, note that it turns on automatically when any package has a hash.)�gotten_hashrNc��||_y)zq
        :param gotten_hash: The hash of the (possibly malicious) archive we
            just downloaded
        N)r�)rFr�s  rrDzHashMissing.__init__s��
'��rc���ddlm}d}|jrC|jjr|jjnt|jdd�}dj
|xsd||j�S)Nr)�
FAVORITE_HASHr�z    {} --hash={}:{}r�)�pip._internal.utils.hashesr�r��	is_direct�
original_link�getattrrqr�)rFr�r_s   rr�zHashMissing.bodysn��<����8�8��8�8�%�%����&�&��T�X�X�u�d�3�
�%�+�+��(�(�-��9I�9I�
�	
r)	r0r1r2r3r�r�rSrDr�r4rrr�r�s3��<�
�E�	�	�'�C�'�D�'�
�c�
rr�c��eZdZdZdZdZy)�HashUnpinnedzPA requirement had a hash specified but was not pinned to a specific
    version.�zaIn --require-hashes mode, all requirements must have their versions pinned with ==. These do not:Nr�r4rrr�r�-s���
�E�	1�	rr�c�^�eZdZdZdZdZdeeeefdeedfddfd	�Z	defd
�Z
defd�Zy)�HashMismatchz�
    Distribution file hash values don't match.

    :ivar package_name: The name of the package that triggered the hash
        mismatch. Feel free to write to this after the exception is raise to
        improve its error message.

    �z�THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.�allowed�gotsrrNc� �||_||_y)z�
        :param allowed: A dict of algorithm names pointing to lists of allowed
            hex digests
        :param gots: A dict of algorithm names pointing to hashes we
            actually got from the files under suspicion
        N)r�r�)rFr�r�s   rrDzHashMismatch.__init__Js�������	rc�^�dj|j�|j��S)Nz
    {}:
{})rqr��_hash_comparisonrHs rr�zHashMismatch.bodyTs'���#�#�D�$:�$:�$<�d�>S�>S�>U�V�Vrc�@��dtddfd�}g}|jj�D]b\}}||��|j�fd�|D��|j	dj|j|j����ddj|�S)aE
        Return a comparison of actual and expected hash values.

        Example::

               Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
                            or 123451234512345123451234512345123451234512345
                    Got        bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef

        �	hash_namerz
chain[str]c�.�t|gtd��S)Nz    or)rr)r�s r�hash_then_orz3HashMismatch._hash_comparison.<locals>.hash_then_orcs���)��f�X�&6�7�7rc3�T�K�|]}djt��|����!y�w)z        Expected {} {}N)rq�next)r|r�r s  �rr~z0HashMismatch._hash_comparison.<locals>.<genexpr>ks'������LU�q�)�0�0��f��q�A�I�s�%(z             Got        {}
r%)	rSr��itemsr�r�rqr��	hexdigestr))rFr�r�r��	expectedsr s     @rr�zHashMismatch._hash_comparisonWs����	8�C�	8�L�	8�
��$(�L�L�$6�$6�$8� �I�y�!�)�,�F��L�L��LU��
�
�L�L�.�5�5�d�i�i�	�6J�6T�6T�6V�W�
�%9��y�y���r)r0r1r2r3r�r�rrSr	rDr�r�r4rrr�r�8sc���
�E�	/�	���S�$�s�)�^� 4��D��g��<N��SW��W�c�W� �#� rr�c��eZdZdZy)�UnsupportedPythonVersionzMUnsupported python version according to Requires-Python package
    metadata.Nr/r4rrrrts��rrc	�h��eZdZdZ			d	dedeedeejddf�fd�
Zdefd�Z	�xZ
S)
�!ConfigurationFileCouldNotBeLoadedz8When there are errors while loading a configuration fileNri�fnamer8rc�N��t�|�|�||_||_||_yr{)rCrDrirr8)rFrirr8rEs    �rrDz*ConfigurationFileCouldNotBeLoaded.__init__|s'���	����������
���
rc��|j�d|j�d�}n|j�J�d|j�d�}d|j�|��S)Nz in �.z.
r%zConfiguration file )rr8ri)rF�message_parts  rrrz)ConfigurationFileCouldNotBeLoaded.__str__�sU���:�:�!�!�$�*�*��Q�/�L��:�:�)�)�)� �����B�/�L�$�T�[�[�M�,��@�@r)zcould not be loadedNN)r0r1r2r3rSr
�configparser�ErrorrDrrrUrVs@rrrysY���B�,�#�.2�		��	���}�	���*�*�+�		�

�	�A��ArrzThe Python environment under z� is managed externally, and may not be
manipulated by the user. Please use specific tooling from the distributor of
the Python installation to interact with this environment instead.
c���eZdZdZdZdeeddf�fd�Zede	efd��Z
edee
jefddfd	��Z�xZS)
�ExternallyManagedEnvironmentaPThe current environment is externally managed.

    This is raised when the current environment is externally managed, as
    defined by `PEP 668`_. The ``EXTERNALLY-MANAGED`` configuration is checked
    and displayed when the error is bubbled up to the user.

    :param error: The error message read from ``EXTERNALLY-MANAGED``.
    zexternally-managed-environmentr8rNc�x��|�tt�}nt|�}t�|�
d|dtd���y)Nz&This environment is externally managedz�If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.z+See PEP 668 for the detailed specification.rd)r�!_DEFAULT_EXTERNALLY_MANAGED_ERRORrCrD)rFr8r=rEs   �rrDz%ExternallyManagedEnvironment.__init__�sE����=��<�=�G��5�k�G�
���<��J�
�H�I�	�
	
rc#��K�	tj}tj|�\}}|�-d|����dD]!}|j	|�\}}}|s�d|�����#d��y#t$rd}Y�AwxYw�w)NzError-)�-�_r
)�locale�LC_MESSAGES�	getlocale�AttributeError�	partition)�category�langr�sepr��founds      r�#_iter_externally_managed_error_keysz@ExternallyManagedEnvironment._iter_externally_managed_error_keys�s�����	1��)�)�H��&�&�x�0�G�D�!����4�&�/�!�!��#'�>�>�#�#6� ���q����v�h�'�'�	"�
�
���	'�"&�D�	'�s(�A1�A �AA1� A.�+A1�-A.�.A1�configc���tjd��}	|j|d��|d}|j�D]1}t	j
t�5|||�cddd�cS	|d�S#1swY�FxYw#t$rY�tttjf$r6ddl
m}tj|�}tjd||��Y�qwxYw)	N)�
interpolationzutf-8)�encodingzexternally-managedr)�VERBOSEzFailed to read %s)�exc_info)r	�ConfigParser�readr�
contextlib�suppress�KeyError�OSError�UnicodeDecodeError�ParsingError�pip._internal.utils._logr �logger�isEnabledFor�warning)r�r�parser�sectionr�r r!s       r�from_configz(ExternallyManagedEnvironment.from_config�s���
�*�*��>��	K��K�K���K�1��1�2�G��>�>�@���(�(��2��w�s�|�,�3�2�A��4�y��3�2���	���+�\�-F�-F�G�	K�8��*�*�7�3�H��N�N�.���N�J�		K�s7�AB	�A=�'B	�3B	�=B	�B	�		C'�AC'�&C')r0r1r2r3r7r
rSrD�staticmethodrr�classmethodr�pathlib�Pathr0rUrVs@rrr�sy����1�I�
�h�s�m�
��
�"���#�����*���g�l�l�C�'�(��
(���rr)Pr3r	r$r�loggingr3r�sys�	itertoolsrrr�typingrrrr	r
r�pip._vendor.requests.modelsrr
�pip._vendor.rich.consolerrr�pip._vendor.rich.markupr�pip._vendor.rich.textr�hashlibrr�pip._internal.metadatar�pip._internal.req.req_installr�	getLoggerr0r+rSr�rr,�	Exceptionr.r6rXrZr\r^rhrlrurxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr rrr4rr�<module>rBs������
���	�
�,�,�G�G�9�J�J�*�&����7�@�	��	�	�8�	$��:�c�:�d�:�)��T�3�Y��)�
�)�
�	)�

�)�
�
)�"�y��p'��p'�l-��-�0��0�2�(�2�
�$6�
�"
�$6�
�"
��
�>6�/�6�C�0�C�N�,�N�O�!2�O��(��
;��;�B�8�B�E�H�E�#�X�#�8"�,�"��(��M�$�M�
�,�
�.&J�"4�6G�&J�R,�:�<M�,�&!�"�!�.+@�!�+@�\����)��'
�)�'
�T�9��9 �9�9 �x�0��
A�(:�A�.)�!�j�j�\�*�%�!�F�#5�Frpython3.12/site-packages/pip/_internal/__pycache__/main.cpython-312.pyc000064400000001315151732701220021513 0ustar00�

R`iT��2�ddlmZmZddeeedefd�Zy)�)�List�OptionalN�args�returnc��ddlm}||�S)z�This is preserved for old console scripts that may still be referencing
    it.

    For additional details, see https://github.com/pypa/pip/issues/7498.
    r)�_wrapper)�pip._internal.utils.entrypointsr)rrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/main.py�mainrs��9��D�>��)N)�typingrr�str�intr�rr
�<module>rs$��!��x��S�	�"��c�rpython3.12/site-packages/pip/_internal/__pycache__/configuration.cpython-312.pyc000064400000042015151732701220023440 0ustar00�

R`i6���dZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZddl
mZmZddlmZddlmZddlmZddlmZmZej2Ze
d	e�Zerd
ndZdZed
dddd��Zej>ej@ejBejDejFfZ$ej@ej>ejBfZ%ee&�Z'dedefd�Z(dede	efd�Z)deee	effd�Z*Gd�d�Z+y)aConfiguration management setup

Some terminology:
- name
  As written in config files.
- value
  Value associated with a name
- key
  Name combined with it's section (section.name)
- variant
  A single word describing where the configuration key-value pair came from
�N)�Any�Dict�Iterable�List�NewType�Optional�Tuple)�ConfigurationError�!ConfigurationFileCouldNotBeLoaded)�appdirs)�WINDOWS)�	getLogger)�
ensure_dir�enum�Kindzpip.inizpip.conf)�version�help�user�global�site�envzenv-var)�USER�GLOBAL�SITE�ENV�ENV_VAR�name�returnc�r�|j�jdd�}|jd�r|dd}|S)zAMake a name consistent regardless of source (environment or file)�_�-z--�N)�lower�replace�
startswith)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/configuration.py�_normalize_namer'2s6���:�:�<����S�)�D����t���A�B�x���K�c�f�d|vrdj|�}t|��|jdd�S)N�.zbKey does not contain dot separated section and key. Perhaps you wanted to use 'global.{}' instead?�)�formatr
�split)r�
error_messages  r&�_disassemble_keyr/:s:��
�$��
=�
�&��,�	�!��/�/��:�:�c�1��r(c�d�tjd�D�cgc]&}tjj	|t
���(}}tjj	tjt
�}tjj	tjjd�trdndt
�}tjj	tjd�t
�}tj|tj|gtj||giScc}w)N�pip�~z.pip)r�site_config_dirs�os�path�join�CONFIG_BASENAME�sys�prefix�
expanduserr
�user_config_dir�kindsrrr)r5�global_config_files�site_config_file�legacy_config_file�new_config_files     r&�get_configuration_filesrADs���8?�8P�8P�QV�8W��8W�������T�?�+�8W����w�w�|�|�C�J�J��@�������
�����3����f����
�g�g�l�l�7�#:�#:�5�#A�?�S�O�
���)�
�
�
�%�&�
�
�
�'��9����s�+D-c����eZdZdZd"dedeeddf�fd�
Zd#d�Zdee	fd�Z
deee	e
ffd	�Zd
e	de
fd�Zd
e	de
ddfd
�Zd
e	ddfd�Zd#d�Zd#d�Zedee	e
ffd��Zd#d�Zdede	defd�Zde	defd�Zd#d�Zde	deee	e
fdee	e
ffd�Zdeee	e	ffd�Zdeeeee	ffd�Zdedee	e
ffd�Z dee	effd�Z!de	deddfd �Z"de	fd!�Z#�xZ$S)$�
Configurationa�Handles management of configuration.

    Provides an interface to accessing and managing configuration files.

    This class converts provides an API that takes "section.key-name" style
    keys and stores the value associated with it as "key-name" under the
    section "section".

    This allows for a clean interface wherein the both the section and the
    key-name are preserved in an easy to manage form in the configuration files
    and the data stored is also nice.
    N�isolated�	load_onlyrc
�R��t�|��|�C|tvr;tdj	djt
tt�����||_||_	tD�cic]}|g��c}|_tD�cic]}|i��c}|_g|_
ycc}wcc}w)Nz5Got invalid value for load_only - should be one of {}z, )�super�__init__�VALID_LOAD_ONLYr
r,r6�map�reprrDrE�OVERRIDE_ORDER�_parsers�_config�_modified_parsers)�selfrDrE�variant�	__class__s    �r&rHzConfiguration.__init__es����
����� �Y�o�%E�$�G�N�N��I�I�c�$��8�9���
�
!��
�"���(6�H
�'5�G�G�R�K�~�H
��
�(6�4
�'5�G�G�R�K�~�4
���EG����
H
��4
s�+
B�
B$c�^�|j�|js|j�yy)z<Loads configuration from configuration files and environmentN)�_load_config_filesrD�_load_environment_vars�rPs r&�loadzConfiguration.loadzs&�����!��}�}��'�'�)�r(c�n�|j�Jd��	|j�dS#t$rYywxYw)z7Returns the file with highest priority in configurationNz)Need to be specified a file to be editingr)rE�_get_parser_to_modify�
IndexErrorrVs r&�get_file_to_editzConfiguration.get_file_to_edit�sC���~�~�)�V�+V�V�)�	��-�-�/��2�2���	��	�s�(�	4�4c�6�|jj�S)z`Returns key-value pairs like dict.items() representing the loaded
        configuration
        )�_dictionary�itemsrVs r&r^zConfiguration.items�s�����%�%�'�'r(�keyc��|}t|�}	|j|S#t$rt|�t	d|����wxYw)z#Get a value from the configuration.�No such key - )r'r]�KeyErrorr/r
)rPr_�orig_keys   r&�	get_valuezConfiguration.get_value�sU�����c�"��	B��#�#�C�(�(���	B�
�S�!�$�~�h�Z�%@�A�A�		B�s	��#A�valuec�b�t|�}|j�|jsJ�|j�\}}|�Ct	|�\}}|j|�s|j
|�|j|||�||j|j|<|j||�y)z$Modify a value in the configuration.N)
r'�_ensure_have_load_onlyrErYr/�has_section�add_section�setrN�_mark_as_modified)rPr_re�fname�parser�sectionrs       r&�	set_valuezConfiguration.set_value�s����c�"���#�#�%��~�~��~��2�2�4�
��v���,�S�1�M�G�T��%�%�g�.��"�"�7�+��J�J�w��e�,�,1����T�^�^�$�S�)����u�f�-r(c���|}t|�}|j�|jsJ�||j|jvrt	d|����|j�\}}|�pt
|�\}}|j|�r|j||�st	d��|j|�s|j|�|j||�|j|j|=y)z#Unset a value in the configuration.raNz4Fatal Internal error [id=1]. Please report as a bug.)r'rgrErNr
rYr/rh�
remove_optionr^�remove_sectionrk)rPr_rcrlrmrnrs       r&�unset_valuezConfiguration.unset_value�s������c�"���#�#�%��~�~��~��d�l�l�4�>�>�2�2�$�~�h�Z�%@�A�A��2�2�4�
��v���,�S�1�M�G�T��"�"�7�+��0D�0D�W�d�0S�)�J���
�<�<��(��%�%�g�.��"�"�5�&�1��L�L����(��-r(c�r�|j�|jD]j\}}tjd|�t	t
jj|��	t|d�5}|j|�ddd��ly#1swY�xYw#t$r}td|�d|����d}~wwxYw)z!Save the current in-memory state.z
Writing to %s�wNz:An error occurred while writing to the configuration file z: )rgrO�logger�inforr4r5�dirname�open�write�OSErrorr
)rPrlrm�f�errors     r&�savezConfiguration.save�s����#�#�%�!�3�3�M�E�6��K�K���/�
�r�w�w���u�-�.�
��%��%���L�L��O�&��4�&�%���
�(�P��g�R��w�(����
�s0�"B�.B�B�B	�B�	B6� B1�1B6c�r�|j�td��tjd|j�y)Nz'Needed a specific file to be modifying.z$Will be working with %s variant only)rEr
rv�debugrVs r&rgz$Configuration._ensure_have_load_only�s+���>�>�!�$�%N�O�O����;�T�^�^�Lr(c�\�i}tD] }|j|j|��"|S)z3A dictionary representing the loaded configuration.)rL�updaterN)rP�retvalrQs   r&r]zConfiguration._dictionary�s/��
��%�G��M�M�$�,�,�w�/�0�&��
r(c��t|j��}|tjddtj
gk(rtjd�y|j�D]q\}}|D]g}|j�'||jk7rtjd||��6|j||�}|j|j||f��i�sy)z,Loads configuration from configuration filesrr+zZSkipping loading configuration files due to environment's PIP_CONFIG_FILE being os.devnullNz Skipping file '%s' (variant: %s))
�dict�iter_config_filesr<rr4�devnullrvr�r^rE�
_load_filerM�append)rP�config_filesrQ�filesrlrms      r&rTz Configuration._load_config_files�s����D�2�2�4�5����	�	�"�1�Q�'�B�J�J�<�7��L�L�A�
�
�*�0�0�2�N�G�U����>�>�-�'�T�^�^�2K��L�L�!C�U�G�T������%�8���
�
�g�&�-�-�u�f�o�>��3r(rQrlc��tjd||�|j|�}|j�D]A}|j	|�}|j
|j
|j||���C|S)Nz'For variant '%s', will try loading '%s')rv�verbose�_construct_parser�sectionsr^rNr��_normalized_keys)rPrQrlrmrnr^s      r&r�zConfiguration._load_filesm�����@�'�5�Q��'�'��.�����(�G��L�L��)�E��L�L��!�(�(��)>�)>�w��)N�O�)��
r(c�B�tj�}tjj	|�r+tjd�}	|j||��|S|S#t$rtd|�d�|���tj$r}t|���d}~wwxYw)NF)�encodingzcontains invalid z characters)�reasonrl)r})�configparser�RawConfigParserr4r5�exists�locale�getpreferredencoding�read�UnicodeDecodeErrorr�Error)rPrlrm�locale_encodingr}s     r&r�zConfiguration._construct_parsers����-�-�/��
�7�7�>�>�%� �$�9�9�%�@�O�

E����E�O��<��
�v�
��&�
�7�.��.?�{�K���� �%�%�
E�7�e�D�D��
E�s�
A!�!,B�
B�Bc��|jtjj|j	d|j���y)z.Loads configuration from environment variablesz:env:N)rNr<rr�r��get_environ_varsrVs r&rUz$Configuration._load_environment_vars*s6�����U�]�]�#�*�*��!�!�'�4�+@�+@�+B�C�	
r(rnr^c�J�i}|D]\}}|dzt|�z}|||<�|S)z�Normalizes items to construct a dictionary with normalized keys.

        This routine is where the names become keys and are made the same
        regardless of source - configuration files or environment.
        r*)r')rPrnr^�
normalizedr�valr_s       r&r�zConfiguration._normalized_keys0s;���
��I�D�#��C�-�/�$�"7�7�C�!�J�s�O���r(c#�K�tjj�D]9\}}|jd�s�|ddj	�}|t
vs�4||f���;y�w)z@Returns a generator with all environmental vars with prefix PIP_�PIP_�N)r4�environr^r%r#�ENV_NAMES_IGNORED)rPr_r�rs    r&r�zConfiguration.get_environ_vars>sP�����
�
�(�(�*�H�C���~�~�f�%��1�2�w�}�}����0�0���)�O�	+�s�6A�A�	Ac#�K�tjjdd�}|�tj|gf��ntjgf��t�}tj|tjf��|jxr$|xrtjj|�}|r%tj|tjf��tj|tjf��y�w)zYields variant and configuration files associated with it.

        This should be treated like items of a dictionary.
        �PIP_CONFIG_FILEN)r4r��getr<rrArrDr5r�rr)rP�config_filer��should_load_user_configs    r&r�zConfiguration.iter_config_filesGs������j�j�n�n�%6��=���"��)�)�k�]�*�*��)�)�R�-��.�0���l�l�L����6�6�6�'+�m�m�"3�#
��7�B�G�G�N�N�;�7�9
��#��*�*�l�5�:�:�6�6�6��j�j�,�u�z�z�2�2�2�s�C<C>c� �|j|S)z#Get values present in a config file)rN)rPrQs  r&�get_values_in_configz"Configuration.get_values_in_configes���|�|�G�$�$r(c�t�|jsJ�|j|j}|std��|dS)Nz4Fatal Internal error [id=2]. Please report as a bug.���)rErMr
)rP�parserss  r&rYz#Configuration._get_parser_to_modifyis?���~�~��~��-�-����/���$�F��
�
�r�{�r(rmc�`�||f}||jvr|jj|�yy�N)rOr�)rPrlrm�file_parser_tuples    r&rkzConfiguration._mark_as_modifiedws4��"�F�O���D�$:�$:�:��"�"�)�)�*;�<�;r(c�N�|jj�d|j�d�S)N�(�))rR�__name__r]rVs r&�__repr__zConfiguration.__repr__|s'���.�.�)�)�*�!�D�,<�,<�+?�q�A�Ar(r�)rN)%r��
__module__�__qualname__�__doc__�boolrrrHrW�strr[rr	rr^rdrorsr~rg�propertyrr]rTr�r�r�rUr�r�rr�r�rYrkr��
__classcell__)rRs@r&rCrCWs�����G��G�(�4�.�G�D�G�**��(�3�-��(�x��c�3�h��0�(�
B�S�
B�S�
B�.�S�.��.��.�&.�s�.�t�.�:�0M�
�	�T�#�s�(�^�	��	�?�.�$��s�����s����*
����#+�E�#�s�(�O�#<��	
�c�3�h���$�(�5��c��?�";�$�3�8�E�$��S�	�/�,B�#C�3�<%�D�%�T�#�s�(�^�%��u�S�/�-A�'B��=�s�=�O�=��=�
B�#�Br(rC),r�r�r�r4r8�typingrrrrrrr	�pip._internal.exceptionsr
r�pip._internal.utilsr�pip._internal.utils.compatr
�pip._internal.utils.loggingr�pip._internal.utils.miscrrr�r�rr7r�r<rrrrrrLrIr�rvr'r/rArC�r(r&�<module>r�s����
�	�
�F�F�F��(�.�1�5��.�.���v�s���&�)�J��%��	
�	��	�
��	�����u�z�z�5�:�:�u�y�y�%�-�-�O���*�*�e�l�l�E�J�J�6��	�8�	���#��#���3��4��9����d�D��I�o�!6��&fB�fBr(python3.12/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-312.pyc000064400000032655151732701220023414 0ustar00�

R`iB.����dZddlZddlZddlZddlZddlmZmZm	Z	m
Z
ddlmZm
Z
ddlmZmZddlmZddlmZmZddlmZmZdd	lmZdd
lmZddlmZddlm Z dd
l!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ejhe5�Z6ejndejp�Z9e
ee$ee$fZ:de;de<fd�Z=de$de<de<fd�Z>de$de<fd�Z?de$de<fd�Z@de$de	e<fd�ZAde$d ede;fd!�ZBde$d"e;ddfd#�ZCde$d$e;d%e<d&ee;d'ee;d(e<de	e;fd)�ZDde$d$e;d&ee;d'ee;d(e<de	e;fd*�ZEde$d'ee;de<fd+�ZFd,ee$d ed%e<d&ee;d'ee;de:fd-�ZGy).z;Orchestrator for building wheels from InstallRequirements.
�N)�Iterable�List�Optional�Tuple)�canonicalize_name�canonicalize_version)�InvalidVersion�Version)�
WheelCache)�InvalidWheelFilename�UnsupportedWheel)�FilesystemWheel�get_wheel_distribution)�Link)�Wheel)�build_wheel_pep517)�build_wheel_editable)�build_wheel_legacy)�InstallRequirement)�
indent_log)�
ensure_dir�	hash_file)�make_setuptools_clean_args)�call_subprocess)�
TempDirectory)�path_to_url)�vcsz([a-z0-9_.]+)-([a-z0-9_.!+-]+)�s�returnc�>�ttj|��S)zjDetermine whether the string looks like an egg_info.

    :param s: The string to parse. E.g. foo-2.1
    )�bool�_egg_info_re�search)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/wheel_builder.py�_contains_egg_infor%%s��
��#�#�A�&�'�'��req�
need_wheelc���|jry|jr#|r tjd|j�y|ry|j
sy|jr|j�Sy)zBReturn whether an InstallRequirement should be built into a wheel.Fz(Skipping %s, due to already being wheel.T)�
constraint�is_wheel�logger�info�name�
source_dir�editable�supports_pyproject_editable)r'r(s  r$�
_should_buildr2-s^��
�~�~��
�|�|���K�K�:����
����
�>�>��
�|�|��.�.�0�0�r&c��t|d��S)NT�r(�r2�r's r$�should_build_for_wheel_commandr7Ns�����.�.r&c��t|d��S)NFr4r5r6s r$� should_build_for_install_commandr9Ts�����/�/r&c���|js|jsy|jr�|jjr{|jrJ�|jsJ�t	j
|jj�}|sJ�|j|jj|j�ryy|jsJ�|jj�\}}t|�ryy)z�
    Return whether a built InstallRequirement can be stored in the persistent
    wheel cache, assuming the wheel cache is available, and _should_build()
    has determined a wheel needs to be built.
    FT)r0r/�link�is_vcsr�get_backend_for_scheme�scheme�is_immutable_rev_checkout�url�splitextr%)r'�vcs_backend�base�exts    r$�
_should_cacherEZs����|�|�3�>�>��
�x�x�C�H�H�O�O��<�<����~�~��~��0�0������A����{��0�0������s�~�~�N����8�8�O�8����!�!�#�I�D�#��$���r&�wheel_cachec���t|j�}|jsJ�|r(t|�r|j	|j�}|S|j|j�}|S)zdReturn the persistent or temporary cache directory where the built
    wheel need to be stored.
    )r!�	cache_dirr;rE�get_path_for_link�get_ephem_path_for_link)r'rF�cache_availablerHs    r$�_get_cache_dirrLzsa���;�0�0�1�O��8�8�O�8��=��-��1�1�#�(�(�;�	��� �7�7����A�	��r&�
wheel_pathc���t|jxsd�}ttjj|��}t|j�|k7r%t
dj||j���tt|�|�}t|j�}t|�t|j�k7r%t
dj||j���|j}|�td��	t|�}|td�k\r5t#|jt�stdj|���yy#t $rd|��}t|��wxYw)N�z7Wheel has unexpected file name: expected {!r}, got {!r}zMissing Metadata-VersionzInvalid Metadata-Version: z1.2z6Metadata 1.2 mandates PEP 440 version, but {!r} is not)rr.r�os�path�basenamer�formatrr�str�versionr�metadata_versionr
r
r	�
isinstance)	r'rM�canonical_name�w�dist�dist_verstr�metadata_version_valuerV�msgs	         r$�_verify_oner^�sU��&�s�x�x�~�2�6�N�
�b�g�g���z�*�+�A����� �N�2�"�
��v�n�a�f�f�5�
�	
�"�/�*�"=�~�N�D��d�l�l�#�K��K�(�,@����,K�K�"�
��v�k�1�9�9�5�
�	
�"�2�2���%��9�:�:�$�"�#9�:���7�5�>�)�*�T�\�\�7�2S��
�$�f�[�1�
�	
�3T�)���$�*�+A�*B�C���s�#�#�$�s�	E�E2�
output_dir�verify�
build_options�global_optionsr0c��|rdnd}	t|�|j
5t
|||||�}ddd�r|r	t||�|S|S#t$r,}tjd||j|�Yd}~yd}~wwxYw#1swY�VxYw#ttf$r,}tjd||j|�Yd}~yd}~wwxYw)zaBuild one wheel.

    :return: The filename of the built wheel, or None if the build failed.
    r0�wheelzBuilding %s for %s failed: %sNzBuilt %s for %s is invalid: %s)
r�OSErrorr,�warningr.�	build_env�_build_one_inside_envr^rr
)	r'r_r`rarbr0�artifact�erMs	         r$�
_build_onerk�s���&�z�7�H�	��:��

���*���]�N�H�
�
�
��f�	���Z�(���:���)�����+���H�H�
�		
�����
���%�&6�7�	��N�N�;�X�s�x�x�QR�S���	�s9�A�B�B�	B�"A<�<B�B
�C�"C�Cc	��td��5}|jsJ�|jr�|jsJ�|jsJ�|r t
j
d|j�|r t
j
d|j�|r8t|j|j|j|j��}nqt|j|j|j|j��}n9t|j|j|j|||j��}|��tjj|�}tjj||�}	t!|�\}	}
t#j$||�t
j'd|j||
|	j)��t
j'd|�|cddd�S|jst-||�	ddd�y#t*$r+}t
j
d	|j|�Yd}~�Qd}~wwxYw#1swYyxYw)
Nrd)�kindz7Ignoring --global-option when building %s using PEP 517z6Ignoring --build-option when building %s using PEP 517)r.�backend�metadata_directory�tempd)r.�
setup_py_pathr/rbrarpz3Created wheel for %s: filename=%s size=%d sha256=%szStored in directory: %sz Building wheel for %s failed: %s)rr.�
use_pep517ro�pep517_backendr,rfrrQrrrq�unpacked_source_directoryrPrR�joinr�shutil�mover-�	hexdigest�	Exception�_clean_one_legacy)r'r_rarbr0�temp_dirrM�
wheel_name�	dest_path�
wheel_hash�lengthrjs            r$rhrh�s���
�G�	$���x�x��x��>�>��)�)�)�)��%�%�%�%�����M�s�x�x������L�c�h�h���1�����.�.�'*�'=�'=�"�-�-�	�
�0�����.�.�'*�'=�'=�"�-�-�	�
�,��X�X�!�/�/��8�8�-�+��m�m�
�J��!����)�)�*�5�J������Z��<�I�
�%.�z�%:�"�
�F����J�	�2����I��H�H����(�(�*�����5�z�B� �g
%�	$�v�~�~��c�>�2��{
%�	$��h�
����6��H�H�����
��i
%�	$�s7�E'I�5A,H
�+I�
	I�!H<�7I�<I�I�I
c��t|j|��}tjd|j�	t|d|j��y#t$r#tjd|j�YywxYw)N)rbzRunning setup.py clean for %szpython setup.py clean)�command_desc�cwdTz Failed cleaning build dir for %sF)	rrqr,r-r.rr/ry�error)r'rb�
clean_argss   r$rzrzsp��+����%��J�
�K�K�/����:����%<�#�.�.�	
��������7����B���s�A�)A>�=A>�requirementsc��|sggfStjddjd�|D���t�5gg}}|D]�}|jsJ�t||�}t
||||||jxr|j�}	|	r�|j�|j||j�tt|	��|_
|jj|_|jj sJ�|j#|���|j#|���	ddd�r=tjddj|D�cgc]}|j��c}��r=tjddj|D�cgc]}|j��c}��||fS#1swY��xYwcc}wcc}w)z�Build wheels.

    :return: The list of InstallRequirement that succeeded to build and
        the list of InstallRequirement that failed to build.
    z*Building wheels for collected packages: %sz, c3�4K�|]}|j���y�w)N)r.)�.0r's  r$�	<genexpr>zbuild.<locals>.<genexpr>8s����3�l�s�#�(�(�l�s�NzSuccessfully built %s� zFailed to build %s)r,r-rurr.rLrkr0�permit_editable_wheels�
download_info�record_download_originrrr;�	file_path�local_file_pathr+�append)
r�rFr`rarb�build_successes�build_failuresr'rH�
wheel_files
          r$�buildr�&s�����2�v�
��K�K�4��	�	�3�l�3�3��

��*,�b����C��8�8�O�8�&�s�K�8�I�#���������;��!;�!;�
�J���$�$�0� �6�6�y�#�BS�BS�T���J� 7�8���&)�h�h�&8�&8��#��x�x�(�(�(�(��&�&�s�+��%�%�c�*�1 �
�:����#��H�H�/�:�/�3�c�h�h�/�:�;�	
����� ��H�H�.�9�.�3�c�h�h�.�9�:�	
�
�N�*�*�Q
���@;��
:s�C'F/�F;�
G�/F8)H�__doc__�logging�os.pathrP�rerv�typingrrrr�pip._vendor.packaging.utilsrr�pip._vendor.packaging.versionr	r
�pip._internal.cacher�pip._internal.exceptionsrr
�pip._internal.metadatarr�pip._internal.models.linkr�pip._internal.models.wheelr�$pip._internal.operations.build.wheelr�-pip._internal.operations.build.wheel_editabler�+pip._internal.operations.build.wheel_legacyr�pip._internal.req.req_installr�pip._internal.utils.loggingr�pip._internal.utils.miscrr�$pip._internal.utils.setuptools_buildr�pip._internal.utils.subprocessr�pip._internal.utils.temp_dirr�pip._internal.utils.urlsr�pip._internal.vcsr�	getLogger�__name__r,�compile�
IGNORECASEr"�BuildResultrTr!r%r2r7r9rErLr^rkrhrzr��r&r$�<module>r�sX�����	�
�2�2�O�A�*�K�J�*�,�C�N�J�<�2�:�K�:�6�0�!�	��	�	�8�	$���r�z�z�;�R�]�]�K���D�+�,�d�3E�.F�F�G��(�#�(�$�(��	����
��B/�	�/�	�/�0�	�0�	�0��	��
�d�^��@
�	�
��
�	�
� 
�'�
�S�
�T�
�<#�	�#��#�
�#���9�	#�
��I�#��
#��c�]�#�LD�	�D��D���9�D���I�	D�
�D��c�]�
D�N�-��t�C�y��T��"=+��-�.�=+��=+�
�=+���9�	=+�
��I�=+��
=+r&python3.12/site-packages/pip/_internal/pyproject.py000064400000015771151732701220016260 0ustar00import importlib.util
import os
from collections import namedtuple
from typing import Any, List, Optional

from pip._vendor import tomli
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement

from pip._internal.exceptions import (
    InstallationError,
    InvalidPyProjectBuildRequires,
    MissingPyProjectBuildRequires,
)


def _is_list_of_str(obj: Any) -> bool:
    return isinstance(obj, list) and all(isinstance(item, str) for item in obj)


def make_pyproject_path(unpacked_source_directory: str) -> str:
    return os.path.join(unpacked_source_directory, "pyproject.toml")


BuildSystemDetails = namedtuple(
    "BuildSystemDetails", ["requires", "backend", "check", "backend_path"]
)


def load_pyproject_toml(
    use_pep517: Optional[bool], pyproject_toml: str, setup_py: str, req_name: str
) -> Optional[BuildSystemDetails]:
    """Load the pyproject.toml file.

    Parameters:
        use_pep517 - Has the user requested PEP 517 processing? None
                     means the user hasn't explicitly specified.
        pyproject_toml - Location of the project's pyproject.toml file
        setup_py - Location of the project's setup.py file
        req_name - The name of the requirement we're processing (for
                   error reporting)

    Returns:
        None if we should use the legacy code path, otherwise a tuple
        (
            requirements from pyproject.toml,
            name of PEP 517 backend,
            requirements we should check are installed after setting
                up the build environment
            directory paths to import the backend from (backend-path),
                relative to the project root.
        )
    """
    has_pyproject = os.path.isfile(pyproject_toml)
    has_setup = os.path.isfile(setup_py)

    if not has_pyproject and not has_setup:
        raise InstallationError(
            f"{req_name} does not appear to be a Python project: "
            f"neither 'setup.py' nor 'pyproject.toml' found."
        )

    if has_pyproject:
        with open(pyproject_toml, encoding="utf-8") as f:
            pp_toml = tomli.loads(f.read())
        build_system = pp_toml.get("build-system")
    else:
        build_system = None

    # The following cases must use PEP 517
    # We check for use_pep517 being non-None and falsey because that means
    # the user explicitly requested --no-use-pep517.  The value 0 as
    # opposed to False can occur when the value is provided via an
    # environment variable or config file option (due to the quirk of
    # strtobool() returning an integer in pip's configuration code).
    if has_pyproject and not has_setup:
        if use_pep517 is not None and not use_pep517:
            raise InstallationError(
                "Disabling PEP 517 processing is invalid: "
                "project does not have a setup.py"
            )
        use_pep517 = True
    elif build_system and "build-backend" in build_system:
        if use_pep517 is not None and not use_pep517:
            raise InstallationError(
                "Disabling PEP 517 processing is invalid: "
                "project specifies a build backend of {} "
                "in pyproject.toml".format(build_system["build-backend"])
            )
        use_pep517 = True

    # If we haven't worked out whether to use PEP 517 yet,
    # and the user hasn't explicitly stated a preference,
    # we do so if the project has a pyproject.toml file
    # or if we cannot import setuptools or wheels.

    # We fallback to PEP 517 when without setuptools or without the wheel package,
    # so setuptools can be installed as a default build backend.
    # For more info see:
    # https://discuss.python.org/t/pip-without-setuptools-could-the-experience-be-improved/11810/9
    # https://github.com/pypa/pip/issues/8559
    elif use_pep517 is None:
        use_pep517 = (
            has_pyproject
            or not importlib.util.find_spec("setuptools")
            or not importlib.util.find_spec("wheel")
        )

    # At this point, we know whether we're going to use PEP 517.
    assert use_pep517 is not None

    # If we're using the legacy code path, there is nothing further
    # for us to do here.
    if not use_pep517:
        return None

    if build_system is None:
        # Either the user has a pyproject.toml with no build-system
        # section, or the user has no pyproject.toml, but has opted in
        # explicitly via --use-pep517.
        # In the absence of any explicit backend specification, we
        # assume the setuptools backend that most closely emulates the
        # traditional direct setup.py execution, and require wheel and
        # a version of setuptools that supports that backend.

        build_system = {
            "requires": ["setuptools>=40.8.0", "wheel"],
            "build-backend": "setuptools.build_meta:__legacy__",
        }

    # If we're using PEP 517, we have build system information (either
    # from pyproject.toml, or defaulted by the code above).
    # Note that at this point, we do not know if the user has actually
    # specified a backend, though.
    assert build_system is not None

    # Ensure that the build-system section in pyproject.toml conforms
    # to PEP 518.

    # Specifying the build-system table but not the requires key is invalid
    if "requires" not in build_system:
        raise MissingPyProjectBuildRequires(package=req_name)

    # Error out if requires is not a list of strings
    requires = build_system["requires"]
    if not _is_list_of_str(requires):
        raise InvalidPyProjectBuildRequires(
            package=req_name,
            reason="It is not a list of strings.",
        )

    # Each requirement must be valid as per PEP 508
    for requirement in requires:
        try:
            Requirement(requirement)
        except InvalidRequirement as error:
            raise InvalidPyProjectBuildRequires(
                package=req_name,
                reason=f"It contains an invalid requirement: {requirement!r}",
            ) from error

    backend = build_system.get("build-backend")
    backend_path = build_system.get("backend-path", [])
    check: List[str] = []
    if backend is None:
        # If the user didn't specify a backend, we assume they want to use
        # the setuptools backend. But we can't be sure they have included
        # a version of setuptools which supplies the backend. So we
        # make a note to check that this requirement is present once
        # we have set up the environment.
        # This is quite a lot of work to check for a very specific case. But
        # the problem is, that case is potentially quite common - projects that
        # adopted PEP 518 early for the ability to specify requirements to
        # execute setup.py, but never considered needing to mention the build
        # tools themselves. The original PEP 518 code had a similar check (but
        # implemented in a different way).
        backend = "setuptools.build_meta:__legacy__"
        check = ["setuptools>=40.8.0"]

    return BuildSystemDetails(requires, backend, check, backend_path)
python3.12/site-packages/pip/_internal/utils/compat.py000064400000003534151732701220016656 0ustar00"""Stuff that differs in different Python versions and platform
distributions."""

import logging
import os
import sys

__all__ = ["get_path_uid", "stdlib_pkgs", "WINDOWS"]


logger = logging.getLogger(__name__)


def has_tls() -> bool:
    try:
        import _ssl  # noqa: F401  # ignore unused

        return True
    except ImportError:
        pass

    from pip._vendor.urllib3.util import IS_PYOPENSSL

    return IS_PYOPENSSL


def get_path_uid(path: str) -> int:
    """
    Return path's uid.

    Does not follow symlinks:
        https://github.com/pypa/pip/pull/935#discussion_r5307003

    Placed this function in compat due to differences on AIX and
    Jython, that should eventually go away.

    :raises OSError: When path is a symlink or can't be read.
    """
    if hasattr(os, "O_NOFOLLOW"):
        fd = os.open(path, os.O_RDONLY | os.O_NOFOLLOW)
        file_uid = os.fstat(fd).st_uid
        os.close(fd)
    else:  # AIX and Jython
        # WARNING: time of check vulnerability, but best we can do w/o NOFOLLOW
        if not os.path.islink(path):
            # older versions of Jython don't have `os.fstat`
            file_uid = os.stat(path).st_uid
        else:
            # raise OSError for parity with os.O_NOFOLLOW above
            raise OSError(f"{path} is a symlink; Will not return uid for symlinks")
    return file_uid


# packages in the stdlib that may have installation metadata, but should not be
# considered 'installed'.  this theoretically could be determined based on
# dist.location (py27:`sysconfig.get_paths()['stdlib']`,
# py26:sysconfig.get_config_vars('LIBDEST')), but fear platform variation may
# make this ineffective, so hard-coding
stdlib_pkgs = {"python", "wsgiref", "argparse"}


# windows detection, covers cpython and ironpython
WINDOWS = sys.platform.startswith("win") or (sys.platform == "cli" and os.name == "nt")
python3.12/site-packages/pip/_internal/utils/models.py000064400000002251151732701220016651 0ustar00"""Utilities for defining models
"""

import operator
from typing import Any, Callable, Type


class KeyBasedCompareMixin:
    """Provides comparison capabilities that is based on a key"""

    __slots__ = ["_compare_key", "_defining_class"]

    def __init__(self, key: Any, defining_class: Type["KeyBasedCompareMixin"]) -> None:
        self._compare_key = key
        self._defining_class = defining_class

    def __hash__(self) -> int:
        return hash(self._compare_key)

    def __lt__(self, other: Any) -> bool:
        return self._compare(other, operator.__lt__)

    def __le__(self, other: Any) -> bool:
        return self._compare(other, operator.__le__)

    def __gt__(self, other: Any) -> bool:
        return self._compare(other, operator.__gt__)

    def __ge__(self, other: Any) -> bool:
        return self._compare(other, operator.__ge__)

    def __eq__(self, other: Any) -> bool:
        return self._compare(other, operator.__eq__)

    def _compare(self, other: Any, method: Callable[[Any, Any], bool]) -> bool:
        if not isinstance(other, self._defining_class):
            return NotImplemented

        return method(self._compare_key, other._compare_key)
python3.12/site-packages/pip/_internal/utils/filetypes.py000064400000001314151732701220017371 0ustar00"""Filetype information.
"""

from typing import Tuple

from pip._internal.utils.misc import splitext

WHEEL_EXTENSION = ".whl"
BZ2_EXTENSIONS: Tuple[str, ...] = (".tar.bz2", ".tbz")
XZ_EXTENSIONS: Tuple[str, ...] = (
    ".tar.xz",
    ".txz",
    ".tlz",
    ".tar.lz",
    ".tar.lzma",
)
ZIP_EXTENSIONS: Tuple[str, ...] = (".zip", WHEEL_EXTENSION)
TAR_EXTENSIONS: Tuple[str, ...] = (".tar.gz", ".tgz", ".tar")
ARCHIVE_EXTENSIONS = ZIP_EXTENSIONS + BZ2_EXTENSIONS + TAR_EXTENSIONS + XZ_EXTENSIONS


def is_archive_file(name: str) -> bool:
    """Return True if `name` is a considered as an archive file."""
    ext = splitext(name)[1].lower()
    if ext in ARCHIVE_EXTENSIONS:
        return True
    return False
python3.12/site-packages/pip/_internal/utils/unpacking.py000064400000021165151732701220017352 0ustar00"""Utilities related archives.
"""

import logging
import os
import shutil
import stat
import tarfile
import zipfile
from typing import Iterable, List, Optional
from zipfile import ZipInfo

from pip._internal.exceptions import InstallationError
from pip._internal.utils.filetypes import (
    BZ2_EXTENSIONS,
    TAR_EXTENSIONS,
    XZ_EXTENSIONS,
    ZIP_EXTENSIONS,
)
from pip._internal.utils.misc import ensure_dir

logger = logging.getLogger(__name__)


SUPPORTED_EXTENSIONS = ZIP_EXTENSIONS + TAR_EXTENSIONS

try:
    import bz2  # noqa

    SUPPORTED_EXTENSIONS += BZ2_EXTENSIONS
except ImportError:
    logger.debug("bz2 module is not available")

try:
    # Only for Python 3.3+
    import lzma  # noqa

    SUPPORTED_EXTENSIONS += XZ_EXTENSIONS
except ImportError:
    logger.debug("lzma module is not available")


def current_umask() -> int:
    """Get the current umask which involves having to set it temporarily."""
    mask = os.umask(0)
    os.umask(mask)
    return mask


def split_leading_dir(path: str) -> List[str]:
    path = path.lstrip("/").lstrip("\\")
    if "/" in path and (
        ("\\" in path and path.find("/") < path.find("\\")) or "\\" not in path
    ):
        return path.split("/", 1)
    elif "\\" in path:
        return path.split("\\", 1)
    else:
        return [path, ""]


def has_leading_dir(paths: Iterable[str]) -> bool:
    """Returns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)"""
    common_prefix = None
    for path in paths:
        prefix, rest = split_leading_dir(path)
        if not prefix:
            return False
        elif common_prefix is None:
            common_prefix = prefix
        elif prefix != common_prefix:
            return False
    return True


def is_within_directory(directory: str, target: str) -> bool:
    """
    Return true if the absolute path of target is within the directory
    """
    abs_directory = os.path.abspath(directory)
    abs_target = os.path.abspath(target)

    prefix = os.path.commonprefix([abs_directory, abs_target])
    return prefix == abs_directory


def set_extracted_file_to_default_mode_plus_executable(path: str) -> None:
    """
    Make file present at path have execute for user/group/world
    (chmod +x) is no-op on windows per python docs
    """
    os.chmod(path, (0o777 & ~current_umask() | 0o111))


def zip_item_is_executable(info: ZipInfo) -> bool:
    mode = info.external_attr >> 16
    # if mode and regular file and any execute permissions for
    # user/group/world?
    return bool(mode and stat.S_ISREG(mode) and mode & 0o111)


def unzip_file(filename: str, location: str, flatten: bool = True) -> None:
    """
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    """
    ensure_dir(location)
    zipfp = open(filename, "rb")
    try:
        zip = zipfile.ZipFile(zipfp, allowZip64=True)
        leading = has_leading_dir(zip.namelist()) and flatten
        for info in zip.infolist():
            name = info.filename
            fn = name
            if leading:
                fn = split_leading_dir(name)[1]
            fn = os.path.join(location, fn)
            dir = os.path.dirname(fn)
            if not is_within_directory(location, fn):
                message = (
                    "The zip file ({}) has a file ({}) trying to install "
                    "outside target directory ({})"
                )
                raise InstallationError(message.format(filename, fn, location))
            if fn.endswith("/") or fn.endswith("\\"):
                # A directory
                ensure_dir(fn)
            else:
                ensure_dir(dir)
                # Don't use read() to avoid allocating an arbitrarily large
                # chunk of memory for the file's content
                fp = zip.open(name)
                try:
                    with open(fn, "wb") as destfp:
                        shutil.copyfileobj(fp, destfp)
                finally:
                    fp.close()
                    if zip_item_is_executable(info):
                        set_extracted_file_to_default_mode_plus_executable(fn)
    finally:
        zipfp.close()


def untar_file(filename: str, location: str) -> None:
    """
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    """
    ensure_dir(location)
    if filename.lower().endswith(".gz") or filename.lower().endswith(".tgz"):
        mode = "r:gz"
    elif filename.lower().endswith(BZ2_EXTENSIONS):
        mode = "r:bz2"
    elif filename.lower().endswith(XZ_EXTENSIONS):
        mode = "r:xz"
    elif filename.lower().endswith(".tar"):
        mode = "r"
    else:
        logger.warning(
            "Cannot determine compression type for file %s",
            filename,
        )
        mode = "r:*"
    tar = tarfile.open(filename, mode, encoding="utf-8")
    try:
        leading = has_leading_dir([member.name for member in tar.getmembers()])
        for member in tar.getmembers():
            fn = member.name
            if leading:
                fn = split_leading_dir(fn)[1]
            path = os.path.join(location, fn)
            if not is_within_directory(location, path):
                message = (
                    "The tar file ({}) has a file ({}) trying to install "
                    "outside target directory ({})"
                )
                raise InstallationError(message.format(filename, path, location))
            if member.isdir():
                ensure_dir(path)
            elif member.issym():
                try:
                    tar._extract_member(member, path)
                except Exception as exc:
                    # Some corrupt tar files seem to produce this
                    # (specifically bad symlinks)
                    logger.warning(
                        "In the tar file %s the member %s is invalid: %s",
                        filename,
                        member.name,
                        exc,
                    )
                    continue
            else:
                try:
                    fp = tar.extractfile(member)
                except (KeyError, AttributeError) as exc:
                    # Some corrupt tar files seem to produce this
                    # (specifically bad symlinks)
                    logger.warning(
                        "In the tar file %s the member %s is invalid: %s",
                        filename,
                        member.name,
                        exc,
                    )
                    continue
                ensure_dir(os.path.dirname(path))
                assert fp is not None
                with open(path, "wb") as destfp:
                    shutil.copyfileobj(fp, destfp)
                fp.close()
                # Update the timestamp (useful for cython compiled files)
                tar.utime(member, path)
                # member have any execute permissions for user/group/world?
                if member.mode & 0o111:
                    set_extracted_file_to_default_mode_plus_executable(path)
    finally:
        tar.close()


def unpack_file(
    filename: str,
    location: str,
    content_type: Optional[str] = None,
) -> None:
    filename = os.path.realpath(filename)
    if (
        content_type == "application/zip"
        or filename.lower().endswith(ZIP_EXTENSIONS)
        or zipfile.is_zipfile(filename)
    ):
        unzip_file(filename, location, flatten=not filename.endswith(".whl"))
    elif (
        content_type == "application/x-gzip"
        or tarfile.is_tarfile(filename)
        or filename.lower().endswith(TAR_EXTENSIONS + BZ2_EXTENSIONS + XZ_EXTENSIONS)
    ):
        untar_file(filename, location)
    else:
        # FIXME: handle?
        # FIXME: magic signatures?
        logger.critical(
            "Cannot unpack file %s (downloaded from %s, content-type: %s); "
            "cannot detect archive format",
            filename,
            location,
            content_type,
        )
        raise InstallationError(f"Cannot determine archive format of {location}")
python3.12/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc000064400000007755151732701220024343 0ustar00�

R`iC���ddlZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddejj��dejj�dejj��gZe
r4ddhZej ee�D�cgc]}dj#|���c}Zdd	eeed
edefd�Zdefd
�Zdefd�Zycc}w)�N)�List�Optional)�main)�WINDOWS�pip�.�z.exe�args�_nowarn�returnc�Z�|stjjd�t|�S)a�Central wrapper for all old entrypoints.

    Historically pip has had several entrypoints defined. Because of issues
    arising from PATH, sys.path, multiple Pythons, their interactions, and most
    of them having a pip installed, users suffer every time an entrypoint gets
    moved.

    To alleviate this pain, and provide a mechanism for warning users and
    directing them to an appropriate place for help, we now define all of
    our old entrypoints as wrappers for the current one.
    aWARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
)�sys�stderr�writer)r
rs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/entrypoints.py�_wrapperrs*����
�
���
&�	
���:��c��trdnd}tjjtj
|�}tjj
tjjdd��jtj�}tjj
|�|v}|r�tD]~}tj|�}tjj||�}|s�;tjj|�s�[tjj||�s�||cSt!��d�S)zHTry to figure out the best way to invoke pip in the current environment.�Scripts�bin�PATHr	z -m pip)r�os�path�joinr�prefix�normcase�environ�get�split�pathsep�_EXECUTABLE_NAMES�shutil�which�exists�samefile�#get_best_invocation_for_this_python)�binary_directory�
binary_prefix�
path_parts�exe_are_in_PATH�exe_name�found_executable�binary_executables       r� get_best_invocation_for_this_pipr./s���$+�y����G�G�L�L����-=�>�M����!�!�"�*�*�.�.���"<�=�C�C�B�J�J�O�J��g�g�&�&�}�5��C�O��)�H�%�|�|�H�5�� "�����]�H� E�� ��G�G�N�N�#4�5��G�G�$�$�$�%��
 ��*�2�3�
4�G�<�<rc���tj}tjj	|�}tj|�}|r"tjj||�r|S|S)z<Try to figure out the best way to invoke the current Python.)r�
executablerr�basenamer"r#r%)�exer+r,s   rr&r&JsS��

�.�.�C��w�w����$�H��|�|�H�-���B�G�G�,�,�-=�s�C����Jr)NF)�	itertoolsrr"r�typingrr�pip._internal.cli.mainr�pip._internal.utils.compatr�version_info�major�minorr!�_allowed_extensions�productr�str�bool�intrr.r&)�partss0r�<module>r@s����	�
�
�!�'�.�
�	�#�
�
�
 �
 �	!�"�	�#�
�
�
 �
 �	!��3�#3�#3�#9�#9�":�;���
��v�,��'�Y�&�&�'8�:M�N��N�E�	�����N����8�D��I�&������0=�#�=�6�S���ss�
Cpython3.12/site-packages/pip/_internal/utils/__pycache__/logging.cpython-312.pyc000064400000032442151732701220023362 0ustar00�

R`iS-���ddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddlm
Z
mZmZmZmZmZmZddlmZmZmZmZmZmZddlmZddlmZdd	lm Z dd
l!m"Z"ddl#m$Z$m%Z%ddl&m'Z'dd
l(m)Z)ddl*m+Z+ejX�Z-e%d�Z.Gd�de/�Z0dee1de1de2fd�Z3ejhd*de5dedfd��Z6de5fd�Z7Gd�dejp�Z9eGd�d��Z:Gd�de�Z;Gd �d!ejxjz�Z>Gd"�d#e�Z?Gd$�d%e�Z@d&e5d'e2d(eeAde5fd)�ZBy)+�N)�	dataclass)�
TextIOWrapper)�Filter)�Any�ClassVar�	Generator�List�Optional�TextIO�Type)�Console�ConsoleOptions�ConsoleRenderable�RenderableType�RenderResult�RichCast)�NullHighlighter)�RichHandler)�Segment)�Style)�VERBOSE�	getLogger)�WINDOWS)�DEPRECATION_MSG_PREFIX)�
ensure_dirzpip.subprocessorc��eZdZdZy)�BrokenStdoutLoggingErrorzO
    Raised if BrokenPipeError occurs for the stdout stream while logging.
    N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/logging.pyrr#s��r#r�	exc_class�exc�returnc��|turytsyt|t�xr,|jtj
tjfvS)NTF)�BrokenPipeErrorr�
isinstance�OSError�errno�EINVAL�EPIPE)r%r&s  r$�_is_broken_pipe_errorr/)s=���O�#��
���c�7�#�P��	�	�e�l�l�E�K�K�5P�(P�Pr#�num)NNNc#��K�t�t_txj|z
c_	d��txj|zc_y#txj|zc_wxYw�w)zv
    A context manager which will cause the log output to be indented for any
    log messages emitted inside it.
    N)�get_indentation�
_log_state�indentation)r0s r$�
indent_logr56sN����-�.�J�����c�!��&�
����#�%���
���#�%��s�-A,�A�A,�A)�)A,c�$�ttdd�S)Nr4r)�getattrr3r"r#r$r2r2Es���:�}�a�0�0r#c	�v��eZdZdZdd�dedededdf�fd	�Zd
ededefd�Z	d
e
jdef�fd�Z�xZ
S)�IndentingFormatterz%Y-%m-%dT%H:%M:%SF)�
add_timestamp�argsr:�kwargsr'Nc�2��||_t�|�|i|��y)z�
        A logging.Formatter that obeys the indent_log() context manager.

        :param add_timestamp: A bool indicating output lines should be prefixed
            with their record's timestamp.
        N)r:�super�__init__)�selfr:r;r<�	__class__s    �r$r?zIndentingFormatter.__init__Ls���+���
���$�)�&�)r#�	formatted�levelnoc��|tjkry|jt�ry|tjkryy)zv
        Return the start of the formatted log message (not counting the
        prefix to add to each line).
        �z	WARNING: zERROR: )�logging�WARNING�
startswithr�ERROR)r@rBrCs   r$�get_message_startz$IndentingFormatter.get_message_start[s9��
�W�_�_�$����� 6�7���W�]�]�"��r#�recordc�8��t�|�|�}|j||j�}||z}d}|jr|j|��d�}|dt
�zz
}dj|jd�D�cgc]}||z��	c}�}|Scc}w)z�
        Calls the standard formatter, but will indent all of the log message
        lines by our current indentation level.
        rE� T)	r>�formatrJrCr:�
formatTimer2�join�
splitlines)r@rKrB�
message_start�prefix�linerAs      �r$rNzIndentingFormatter.formatks����
�G�N�6�*�	��.�.�y�&�.�.�I�
�!�I�-�	����������/�0��2�F��#��)�)�)���G�G�y�7K�7K�D�7Q�R�7Q�t�V�d�]�7Q�R�S�	����Ss�B)rrr �default_time_formatr�boolr?�str�intrJrF�	LogRecordrN�
__classcell__�rAs@r$r9r9Isq���-��
$�
*��
*��
*��	
*�

�
*��3������ �W�.�.��3��r#r9c�6�eZdZUeed<eed<dededefd�Z	y)�IndentedRenderable�
renderable�indent�console�optionsr'c#��K�|j|j|�}tj|�}|D]3}td|jz���|Ed{���td����5y7��w)NrM�
)�renderr^r�split_linesr_)r@r`ra�segments�linesrTs      r$�__rich_console__z#IndentedRenderable.__rich_console__�s^�����>�>�$�/�/�7�;���#�#�H�-���D��#����+�,�,��O�O��$�-����s�AA/�A-�A/N)
rrr r�__annotations__rXr
rrrhr"r#r$r]r]|s*�����K� �� �)7� �	� r#r]c���eZdZUgZeeeeed<dee	de
ddf�fd�Zdejddfd�Zdejddf�fd	�Z�xZS)
�RichPipStreamHandler�KEYWORDS�stream�no_colorr'Nc�V��t�|�t||d��dddt���y)NT)�filern�	soft_wrapF)r`�	show_time�
show_level�	show_path�highlighter)r>r?r
r)r@rmrnrAs   �r$r?zRichPipStreamHandler.__init__�s0���
�����(�d�K����'�)�	�	
r#rKc�p�d}t|jt�sJ�t|dd�rI|j\}t|tt
tf�s
J|�d���t|t���}n�|j|�}|j||�}|j�S|jtjk\r
td��}n)|jtjk\rtd��}	|j j#|dd|�	�y#t$$r|j'|�YywxYw)
N�richFz is not rich-console-renderable)r_�red)�color�yellow�ignore)�overflow�crop�style)r*r;�tupler7rrrWr]r2rN�render_messagerCrFrIrrGr`�print�	Exception�handleError)r@rKr~�rich_renderabler^�messages      r$�emitzRichPipStreamHandler.emit�s��!%���&�+�+�u�-�-�-��6�6�5�)�!'����_���"3�X�s�!C��
C�!�"�"A�B�
C��*<���(9�*�J��k�k�&�)�G��,�,�V�W�=�J��~�~�)��>�>�W�]�]�2�!��.�E��^�^�w���6�!��1�E�	%��L�L���z�H�5�PU��V���	%����V�$�	%�s�8D�D5�4D5c����tj�dd\}}|r>|r<|jjtjurt||�r
t
��t�|�!|�S)z1Called when logging is unable to log some output.N�)	�sys�exc_infor`rp�stdoutr/rr>r�)r@rKr%r&rAs    �r$r�z RichPipStreamHandler.handleError�s\���������+��	�3�
�����!�!�S�Z�Z�/�%�i��5�*�,�,��w�"�6�*�*r#)rrr rlrr
r	rWrirrVr?rFrYr�r�rZr[s@r$rkrk�sq���.0�H�h�x��S�	�*�+�0�
�x��/�
�4�
�D�
�%�7�,�,�%��%�8+�'�"3�"3�+��+�+r#rkc�$��eZdZdef�fd�Z�xZS)�BetterRotatingFileHandlerr'c���ttjj|j��t
�|��S�N)r�os�path�dirname�baseFilenamer>�_open)r@rAs �r$r�zBetterRotatingFileHandler._open�s*����2�7�7�?�?�4�#4�#4�5�6��w�}��r#)rrr rr�rZr[s@r$r�r��s����}��r#r�c�@�eZdZdeddfd�Zdejdefd�Zy)�MaxLevelFilter�levelr'Nc��||_yr�)r�)r@r�s  r$r?zMaxLevelFilter.__init__�s	����
r#rKc�4�|j|jkSr�)rCr�)r@rKs  r$�filterzMaxLevelFilter.filter�s���~�~��
�
�*�*r#)	rrr rXr?rFrYrVr�r"r#r$r�r��s.���c��d��+�W�.�.�+�4�+r#r�c�@��eZdZdZdej
def�fd�Z�xZS)�ExcludeLoggerFilterzQ
    A logging Filter that excludes records from a logger (or its children).
    rKr'c�$��t�|�|�Sr�)r>r�)r@rKrAs  �r$r�zExcludeLoggerFilter.filter�s����7�>�&�)�)�)r#)	rrr r!rFrYrVr�rZr[s@r$r�r��s&����*�W�.�.�*�4�*�*r#r��	verbosityrn�
user_log_filec���|dk\rtj}n^|dk(rt}nR|dk(rtj}n<|dk(rtj}n&|dkrtj
}ntj}tj|�}|du}|r|}d}nd}|}|d	vrd
nd}ddd
�}	ddd�}
gd�|rdgngz}tjjdddtjd�dtjd�dtjd�d�tdd�tddd�d�||
d||	d d!d"gd#d$�d
|
d||	d%d!gd#d$�||
d|	d%|d&gd#d'�d|
d(|d)dd*d+�d,�||d-�d.d/|iid0��|S)1znConfigures and sets up all of the logging

    Returns the requested logging level, as its integer value.
    r�����������N�DEBUGz	/dev/null)�INFOrIrGzext://sys.stdoutzext://sys.stderr)r��stderrz0pip._internal.utils.logging.RichPipStreamHandlerz5pip._internal.utils.logging.BetterRotatingFileHandler)rmrp)r`�console_errors�console_subprocess�user_logFz*pip._internal.utils.logging.MaxLevelFilter)�()r�zlogging.Filter)r��namez/pip._internal.utils.logging.ExcludeLoggerFilter)�exclude_warnings�restrict_to_subprocess�exclude_subprocessz%(message)s)r�rNT)r�rNr:)r_�indent_with_timestamprmr�r�r�r_)r��classrnrm�filters�	formatterr�r�)r�r�rmrnr�r�rpzutf-8r�)r�r��filename�encoding�delayr�)r`r�r�r�)r��handlerszpip._vendorr�)�version�disable_existing_loggersr��
formattersr��root�loggers)
rFr�rrGrI�CRITICALr��getLevelName�config�
dictConfig�subprocess_loggerr�r9)r�rnr��level_numberr��include_user_log�additional_log_file�
root_level�vendored_log_level�log_streams�handler_classesr�s            r$�
setup_loggingr��s���A�~��}�}��	�a����	�b������	�b���}�}��	�b���'�'���|�|��� � ��.�E�%�D�0���+���
�)���
�',�/@�&@��g��%�$��K�
E�G��O�C�(���b��H��N�N����(-�G�$�_�_�%�
+�-�2�2�+�
L�-�2�2�'�
� -�+��
-�+�%)�*�
�#�,�X�6� (�)�(�3� 4�6H�I�!)�
�'�,�X�6� (�)�(�3� 4�5�!)�
#�#�,�X�6�)�(�3� (� 8�9�!)�
'�%�,�V�4� 3� '�!�!8�
�7#�J$�$��&��1C�'D�E�IE	
�G�R�r#)r�)C�
contextlibr,rF�logging.handlersr�r��	threading�dataclassesr�iorr�typingrrrr	r
rr�pip._vendor.rich.consoler
rrrrr�pip._vendor.rich.highlighterr�pip._vendor.rich.loggingr�pip._vendor.rich.segmentr�pip._vendor.rich.styler�pip._internal.utils._logrr�pip._internal.utils.compatr�pip._internal.utils.deprecationr�pip._internal.utils.miscr�localr3r�r�r�
BaseExceptionrVr/�contextmanagerrXr5r2�	Formatterr9r]rkr��RotatingFileHandlerr�r�r�rWr�r"r#r$�<module>r�sh������	�
��!���I�I�I���9�0�,�(�7�.�B�/�
�Y�_�_�
�
��0�1���y��
Q�T�-�%8�
Q�}�
Q�QU�
Q����&�C�&�	�*:� ;�&��&�1��1�0��*�*�0�f� � �� �9+�;�9+�x�� 0� 0� D� D��+�V�+�	*�&�	*�z�S�z�D�z��#��z�SV�zr#python3.12/site-packages/pip/_internal/utils/__pycache__/_log.cpython-312.pyc000064400000003566151732701220022661 0ustar00�

R`i���f�dZddlZddlmZmZdZGd�dej�Zdedefd	�Z	dd
�Z
y)z�Customize logging

Defines custom logger class for the `logger.verbose(...)` method.

init_logging() must be called before any other modules that call logging.getLogger.
�N)�Any�cast�c�(�eZdZdZdedededdfd�Zy)�
VerboseLoggerzXCustom Logger, defining a verbose log-level

    VERBOSE is between INFO and DEBUG.
    �msg�args�kwargs�returnNc�8�|jt|g|��i|��S)N)�log�VERBOSE)�selfrr	r
s    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/_log.py�verbosezVerboseLogger.verboses���t�x�x���6�t�6�v�6�6�)�__name__�
__module__�__qualname__�__doc__�strrr�rrrrs(���
7�3�7�s�7�c�7�d�7rr�namerc�H�tttj|��S)zBlogging.getLogger, but ensures our VerboseLogger class is returned)rr�logging�	getLogger)rs rrrs���
�w�0�0��6�7�7rc�j�tjt�tjtd�y)z�Register our VerboseLogger and VERBOSE log level.

    Should be called before any calls to getLogger(),
    i.e. in pip._internal.__init__
    rN)r�setLoggerClassr�addLevelNamerrrr�init_loggingr s"�����=�)�����)�,r)rN)rr�typingrrr�Loggerrrrr rrr�<module>r#sA�����
��7�G�N�N�7�8�C�8�M�8�
-rpython3.12/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-312.pyc000064400000000357151732701220023473 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/__init__.py�<module>rs�rpython3.12/site-packages/pip/_internal/utils/__pycache__/appdirs.cpython-312.pyc000064400000004626151732701220023401 0ustar00�

R`i����dZddlZddlZddlmZddlmZdedefd�Z	ddede
defd	�Zddede
defd
�Zdedeefd�Z
y)
z�
This code wraps the vendored appdirs module to so the return values are
compatible for the current pip code base.

The intention is to rewrite current usages gradually, keeping the tests pass,
and eventually drop this after all usages are changed.
�N)�List)�platformdirs�appname�returnc�0�tj|d��S)NF)�	appauthor)�_appdirs�user_cache_dir)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/appdirs.pyr
r
s���"�"�7�e�<�<��roamingc��tj|d|��}tjj	|�r|Sd}|r tjj||�}tjj
|�S)NF�rr
z
~/.config/)r	�
user_data_dir�os�path�isdir�join�
expanduser)rr
r�linux_like_paths    r�_macos_user_config_dirrs^���!�!�'�U�G�L�D�	�w�w�}�}�T����#�O���'�'�,�,���@��
�7�7���o�.�.rc�p�tjdk(rt||�Stj|d|��S)N�darwinFr)�sys�platformrr	�user_config_dir)rr
s  rrr"s0��
�|�|�x��%�g�w�7�7��#�#�G�u�g�N�Nrc��tjdk(rtj|dd��gStj|dd��}tjdk(r|gS|jtj�dgzS)NrFT)r�	multipath�win32z/etc)rrr	�
site_data_dir�site_config_dir�splitr�pathsep)r�dirvals  r�site_config_dirsr%+si��
�|�|�x���&�&�w�%�4�P�Q�Q�
�
%�
%�g��$�
O�F�
�|�|�w���x���<�<��
�
�#�v�h�.�.r)T)�__doc__rr�typingr�pip._vendorrr	�strr
�boolrrr%�rr�<module>r,sz���
�
��0�=�C�=�C�=�/�C�/�$�/�#�/�O�S�O�4�O�3�O�	/�c�	/�d�3�i�	/rpython3.12/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-312.pyc000064400000021041151732701220024115 0ustar00�

R`i�#����ddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZmZddl
mZddlmZmZddlmZddlmZmZddlmZerddlmZe	eeefZd	eeeefd
efd�Zd	ee	eefd
efd�Zd	ee	eefd
e	efd
�Z									ddee	eefdedeedddeee dee
eefdeeedeedeedeeded
efd�Z!ded
edfd�Z"y)�N)�
TYPE_CHECKING�Any�Callable�Iterable�List�Mapping�Optional�Union)�escape)�SpinnerInterface�open_spinner)�InstallationSubprocessError)�VERBOSE�subprocess_logger)�
HiddenText)�Literal�args�returnc�~�g}|D]5}t|t�r|j|��%|j|��7|S)z&
    Create a CommandArgs object.
    )�
isinstance�list�extend�append)r�command_args�args   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/subprocess.py�make_commandr sE��!#�L����c�4� �����$�
����$����c�2�djd�|D��S)z/
    Format command arguments for display.
    � c3�K�|]G}t|t�rtjt	|��ntj|����Iy�w)N)rr�shlex�quote�str)�.0rs  r�	<genexpr>z&format_command_args.<locals>.<genexpr>:s<������C�",�C��!<����C��H��%�+�+�c�BR�R��s�A
A)�join)rs r�format_command_argsr(1s"���8�8�����rc�d�|D�cgc] }t|t�r|jn|��"c}Scc}w)z=
    Return the arguments in their raw, unredacted form.
    )rr�secret)rrs  r�reveal_command_argsr+@s0��KO�O�$�3�*�S�*�5�C�J�J�3�>�$�O�O��Os�%-�cmd�show_stdout�cwd�
on_returncodez"Literal["raise", "warn", "ignore"]�extra_ok_returncodes�
extra_environ�
unset_environ�spinner�log_failed_cmd�stdout_only�command_descc
	��|�g}|�g}|r!tj}tj}ntj}t
}tj�|k}
|
xr|du}|d|
�tjj�}|r|j|�|D]}|j|d��	tjt|�tjtj|	stj ntj||d��}g}|	s�|j&sJ�|j(sJ�|j(j+�	|j&j-�}|snC|j/�}|j1|dz�||�|r|sJ�|j3��`	|j5�|j&r|j&j+�	dj7|�}nq|j9�\}}|j;�D]
}||��|j1|�|j;�D]
}||��|j1|�|}|j<xr|j<|v}|r)|sJ�|r|j?d	�n|j?d
�|r�|dk(r�tA|
|j<|
s|nd��}|rmtjBd
|ddi��tjdtEtG|��ddi��tjdtE|xsd�ddi��|�|dk(r$tjHd|
|j<|�|S|dk(r	|StKd|����|S#t"$r}|rtj$d||
��d}~wwxYw#|j&r|j&j+�wwxYw)a�
    Args:
      show_stdout: if true, use INFO to log the subprocess's stderr and
        stdout streams.  Otherwise, use DEBUG.  Defaults to False.
      extra_ok_returncodes: an iterable of integer return codes that are
        acceptable, in addition to 0. Defaults to None, which means [].
      unset_environ: an iterable of environment variable names to unset
        prior to calling subprocess.Popen().
      log_failed_cmd: if false, failed commands are not logged, only raised.
      stdout_only: if true, return only stdout, else return both. When true,
        logging of both stdout and stderr occurs when the subprocess has
        terminated, else logging occurs as subprocess output is produced.
    NzRunning command %s�backslashreplace)�stdin�stdout�stderrr.�env�errorsz#Error %s while executing command %sT�
��error�done�raise)�command_description�	exit_code�output_linesz%s�rich)�extraz*[bold magenta]full command[/]: [blue]%s[/]�markupz[bold magenta]cwd[/]: %sz	[inherit]�warnz$Command "%s" had error code %s in %s�ignorezInvalid value: on_returncode=)&r�info�logging�INFO�verboser�getEffectiveLevel�os�environ�copy�update�pop�
subprocess�Popenr+�PIPE�STDOUT�	Exception�criticalr:r9�close�readline�rstripr�spin�waitr'�communicate�
splitlines�
returncode�finishrr@rr(�warning�
ValueError)r,r-r.r/r0r1r2r3r4r5r6�log_subprocess�
used_level�showing_subprocess�use_spinnerr<�name�proc�exc�
all_output�line�output�out�err�out_line�err_line�proc_had_errorr@s                            r�call_subprocessruGs���6�#�!�����
� �.?�.D�.D���\�\�
�+�2�2���
�+�<�<�>�*�L��)�(�@�W�D�-@�K��'��6�
�*�*�/�/�
�C���
�
�=�!�������d���������$��/�/��?�?�,7�:�$�$�Z�_�_���%�	
��$�J���{�{��{��z�z��z��
�
��������,�,�.�D����;�;�=�D����d�T�k�*�
�4� ����w������	$��I�I�K��{�{����!�!�#�����$���#�#�%���S����(�H��8�$�)����#�����(�H��8�$�)����#�����_�_�T����@T�)T�N����w���N�N�7�#��N�N�6�"���G�#�/�$0��/�/�/A�Z�t��E�
�!�'�'��e�F�D�>�J�!�)�)�@��.�s�3�4�#�T�*��
"�)�)�.��3�-�+�.�#�T�*���K�
�f�
$��%�%�6������	
��M�	�h�
&���M��<�]�<M�N�O�O��M��k����&�&�5���
�
	����<�{�{����!�!�#��s%�6A!N	�3N4�		N1�N,�,N1�4)O�message).Nc
���		ddttdttdttttfddf�fd�
}|S)z�Provide a subprocess_runner that shows a spinner message.

    Intended for use with for BuildBackendHookCaller. Thus, the runner has
    an API that matches what's expected by BuildBackendHookCaller.subprocess_runner.
    Nr,r.r1rc�f��t��5}t|�|||��ddd�y#1swYyxYw)N)r6r.r1r3)r
ru)r,r.r1r3rvs    �r�runnerz+runner_with_spinner_message.<locals>.runner�s2���
�'�
"�g���$��+��
�#�
"�
"�s�'�0)NN)rr$r	rr)rvrys` r�runner_with_spinner_messagerz�sQ���"�59��
�#�Y��
�c�]�� ���S�� 1�2��
�	��Mr)	FNrBNNNNTF)#rLrPr"rU�typingrrrrrrr	r
�pip._vendor.rich.markupr�pip._internal.cli.spinnersrr
�pip._internal.exceptionsr�pip._internal.utils.loggingrr�pip._internal.utils.miscrrr$�CommandArgsrr(r+�bool�intrurz�rr�<module>r�s����	���	�	�	�+�E�@�B�/����5��j��)�*����c�:�{�:�;����"�e�D��I�{�$:�;����P�e�D��I�{�$:�;�P��S�	�P���:A�48�15�-1�*.�%)�"'�e�	�t�C�y�+�%�	&�e��e�
�#��e�8�	e�
#�8�C�=�1�e��G�C��H�-�.�
e��H�S�M�*�e��&�
'�e��T�N�e��$��e��e�	�e�P����)�1D�rpython3.12/site-packages/pip/_internal/utils/__pycache__/temp_dir.cpython-312.pyc000064400000027444151732701220023545 0ustar00�

R`i`$���UddlZddlZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlm
Z
mZmZmZmZmZmZmZddlmZmZej0e�Zedd��Zed	d
d��Zdaeeed
<e	dedfd��ZGd�d�Z da!ee ed<e	dee ddffd��Z"Gd�d�Z#e#�Z$Gd�d�Z%Gd�de%�Z&y)�N)�	ExitStack�contextmanager)�Path)�Any�Callable�Dict�	Generator�List�Optional�TypeVar�Union)�enum�rmtree�_T�
TempDirectory)�boundz	build-envzephem-wheel-cachez	req-build)�	BUILD_ENV�EPHEM_WHEEL_CACHE�	REQ_BUILD�_tempdir_manager�return)NNNc#�zK�t�5}t|c}a	d��|a	ddd�y#|awxYw#1swYyxYw�w�N)rr)�stack�old_tempdir_managers  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/temp_dir.py�global_tempdir_managerr'sC����
���0@�%�-��-�	3��2��
���
 3���
��s$�;�
/�(�/�	;�,�/�8�;c�<�eZdZdZd	d�Zdededdfd�Zdedefd�Zy)
�TempDirectoryTypeRegistryzManages temp directory behaviorrNc��i|_yr��_should_delete��selfs r�__init__z"TempDirectoryTypeRegistry.__init__5s
��/1����kind�valuec�"�||j|<y)z[Indicate whether a TempDirectory of the given kind should be
        auto-deleted.
        Nr!)r$r'r(s   r�
set_deletez$TempDirectoryTypeRegistry.set_delete8s��%*����D�!r&c�:�|jj|d�S)z^Get configured auto-delete flag for a given TempDirectory type,
        default True.
        T)r"�get)r$r's  r�
get_deletez$TempDirectoryTypeRegistry.get_delete>s���"�"�&�&�t�T�2�2r&�rN)	�__name__�
__module__�__qualname__�__doc__r%�str�boolr*r-�r&rrr2s7��)�2�*�s�*�4�*�D�*�3�s�3�t�3r&r�_tempdir_registryc#�PK�t}t�a	t��|ay#|awxYw�w)zuProvides a scoped global tempdir registry that can be used to dictate
    whether directories should be deleted.
    N)r6r)�old_tempdir_registrys r�tempdir_registryr9Hs/����-��1�3��1���0���0��s�&��&�#�&c��eZdZy)�_DefaultN)r/r0r1r5r&rr;r;Vs��r&r;c���eZdZdZdedddfdeedeede	fded	ed
ef
�fd�
Z
edefd
��Zdefd�Z
dedefd�Zdedededdfd�Zdedefd�Zdd�Z�xZS)raMHelper class that owns and cleans up a temporary directory.

    This class can be used as a context manager or as an OO representation of a
    temporary directory.

    Attributes:
        path
            Location to the created temporary directory
        delete
            Whether the directory should be deleted when exiting
            (when used as a contextmanager)

    Methods:
        cleanup()
            Deletes the temporary directory

    When used as a context manager, if the delete attribute is True, on
    exiting the context the temporary directory is deleted.
    N�tempFT�path�deleter'�globally_managed�ignore_cleanup_errorsc����t�|��|tur|�d}nd}|�|j|�}||_d|_||_||_||_|rt�J�tj|�yy)NF)�superr%�_default�_create�_path�_deletedr?r'rAr�
enter_context)r$r>r?r'r@rA�	__class__s      �rr%zTempDirectory.__init__rs����	�����X���������<��<�<��%�D���
���
������	�%:��"��#�/�/�/��*�*�4�0�r&rc�Z�|jrJd|j����|jS)Nz"Attempted to access deleted path: )rGrFr#s rr>zTempDirectory.path�s*���=�=�S�$F�t�z�z�l�"S�S� ��z�z�r&c�P�d|jj�d|j�d�S)N�<� �>)rIr/r>r#s r�__repr__zTempDirectory.__repr__�s&���4�>�>�*�*�+�1�T�Y�Y�M��;�;r&r$c��|Srr5r#s r�	__enter__zTempDirectory.__enter__�s���r&�excr(�tbc��|j�
|j}n(tr tj|j�}nd}|r|j	�yy)NT)r?r6r-r'�cleanup)r$rRr(rSr?s     r�__exit__zTempDirectory.__exit__�sB���;�;�"��[�[�F�
�&�1�1�$�)�)�<�F��F���L�L�N�r&c��tjjtjd|�d����}t
j
d|�|S)z<Create a temporary directory and store its path in self.path�pip-�-��prefix�Created temporary directory: %s)�osr>�realpath�tempfile�mkdtemp�logger�debug)r$r'r>s   rrEzTempDirectory._create�s?���w�w���� 0� 0�$�t�f�A�� G�H�����6��=��r&c���d|_tjj|j�syg�dt
dtfdtdtddf�fd�}|jr<	t|jd	�
��r!tjd|j�yyt|j�y#t$rt|j|��Y�\wxYw)
z6Remove the temporary directory created and reset stateTN�func.r>�exc_valrc�x��djtjt|�|��}|j	�}|t
jt
jt
jfvrtjd||�n!tjd|j|��j|�y)z/Log a warning for a `rmtree` error and continue�
z2Failed to remove a temporary file '%s' due to %s.
z%s failed with %s.N)
�join�	traceback�format_exception_only�type�rstripr]�unlink�remove�rmdirrarbr1�append)rdr>re�
formatted_exc�errorss    �r�onerrorz&TempDirectory.cleanup.<locals>.onerror�s����!�I�I��/�/��W�
�w�G��M�*�0�0�2�M���	�	�2�9�9�b�h�h�7�7����I��!�����1�4�3D�3D�m�T��M�M�'�"r&F)�
ignore_errors)�onexcz[Failed to remove contents in a temporary directory '%s'.
You can safely remove it manually.)rGr]r>�existsrFrrr�
BaseExceptionrAr�OSErrorra�warning)r$rsrrs  @rrUzTempDirectory.cleanup�s������
��w�w�~�~�d�j�j�)��&(��	#��3��8�$�	#��	#�#�	#��		#�(�%�%�
2��t�z�z��7�����9��J�J���
�4�:�:����
2��t�z�z��1�
2�s�%B6�6 C�Cr.)r/r0r1r2rDrr3r
r4r;r%�propertyr>rOrrQrrVrErU�
__classcell__�rIs@rrr]s�����,#�.6��!&�&*�
!1��s�m�!1��d�D�(�*�+�!1��	!1�
�!1� $�
!1�F��c����<�#�<����r��	�C�	��	��	��	��C��C��*r&c�r��eZdZdZdZddedeeddf�fd�
Ze	dede
eddffd	��Zd
edefd�Z�xZ
S)
�AdjacentTempDirectorya�Helper class that creates a temporary directory adjacent to a real one.

    Attributes:
        original
            The original directory to create a temp directory for.
        path
            After calling create() or entering, contains the full
            path to the temporary directory.
        delete
            Whether the directory should be deleted when exiting
            (when used as a contextmanager)

    z-~.=%0123456789N�originalr?rc�R��|jd�|_t�|�
|��y)Nz/\)r?)rlrrCr%)r$rr?rIs   �rr%zAdjacentTempDirectory.__init__�s#��� ����.��
�
�����'r&�namec#�K�tdt|��D]N}tj|j|dz
�D]&}ddj|�z||dz}||k7s�#|���(�Ptt|j��D]H}tj|j|�D]#}ddj|�z|z}||k7s� |���%�Jy�w)aGenerates a series of temporary names.

        The algorithm replaces the leading characters in the name
        with ones that are valid filesystem characters, but are not
        valid package names (for both Python and pip definitions of
        package).
        ��~�N)�range�len�	itertools�combinations_with_replacement�
LEADING_CHARSrh)�clsr��i�	candidate�new_names     r�_generate_namesz%AdjacentTempDirectory._generate_names�s������q�#�d�)�$�A�&�D�D��!�!�1�q�5��	������!3�3�d�1�2�h�>���t�#�"�N��%��s�3�,�,�-�.�A�&�D�D��!�!�1��	������!3�3�d�:���t�#�"�N��/�s�AC�!A(C�
	Cr'c�8�tjj|j�\}}|j	|�D]X}tjj||�}	tj|�tjj|�}n8tjjtjd|�d����}tjd|�|S#t$r(}|jtjk7r�Yd}~��d}~wwxYw)NrXrYrZr\)r]r>�splitrr�rh�mkdirr^rx�errno�EEXISTr_r`rarb)r$r'�rootr�r�r>�exs       rrEzAdjacentTempDirectory._creates����W�W�]�]�4�=�=�1�
��d��-�-�d�3�I��7�7�<�<��i�0�D�
�������w�w�'�'��-���4��7�7�#�#�H�$4�$4�d�4�&��N�$K�L�D����6��=�����
��8�8�u�|�|�+��,��
�s�"C(�(	D�1D�Dr)r/r0r1r2r�r3rr4r%�classmethodr	r�rEr{r|s@rr~r~�sm����&&�M�(��(�h�t�n�(��(��#�3�#�9�S�$��_�+E�#��#�2�C��C�r&r~)'r�r��logging�os.pathr]r_ri�
contextlibrr�pathlibr�typingrrrr	r
rrr
�pip._internal.utils.miscrr�	getLoggerr/rar�
tempdir_kindsr�__annotations__rrr6r9r;rDrr~r5r&r�<module>r�s
��������0��	�	�	�2�	��	�	�8�	$���T��)��
��)���
�)-��(�9�%�,��3�	�*:� ;�3��3�3�3�&:>��8�5�6�=��
1�)�$=�t�T�$I�J�
1��
1�	�	��:��B�B�JF�M�Fr&python3.12/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-312.pyc000064400000010207151732701230024225 0ustar00�

R`i+���UdZddlZddlZddlmZmZmZmZmZddl	m
Z
ddlmZ
dZGd�de�Zdaeed	<		dd
eeefdeeded
edeedeeddfd�Zdd�Zddd�dedeedeedeedeeddfd�Zy)zN
A module that implements tooling to enable easy warnings about deprecations.
�N)�Any�Optional�TextIO�Type�Union)�parse)�__version__z
DEPRECATION: c��eZdZy)�PipDeprecationWarningN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/deprecation.pyrrs��rr�_original_showwarning�message�category�filename�lineno�file�line�returnc���|�t�t||||||�yyt|t�r'tjd�}|j|�yt||||||�y)Nzpip._internal.deprecations)r�
issubclassr�logging�	getLogger�warning)rrrrrr�loggers       r�_showwarningr sc���� �,�!�'�8�X�v�t�T�R�-�	�H�3�	4��"�"�#?�@�����w���g�x��6�4��Nrc��tjdtd��t� tjat
t_yy)N�defaultT)�append)�warnings�simplefilterrr�showwarningr rrr�install_warning_loggerr',s6�����)�%:�4�H��$� (� 4� 4��+���%r)�feature_flag�issue�reason�replacement�gone_inr(r)c��|duxrtt�t|�k\}|t�d�f||sdndf|df||sdndf|dfg}djd	�|D��}|rt	|��tj|td
��y)aHelper to deprecate existing functionality.

    reason:
        Textual reason shown to the user about why this functionality has
        been deprecated. Should be a complete sentence.
    replacement:
        Textual suggestion shown to the user about what alternative
        functionality they can use.
    gone_in:
        The version of pip does this functionality should get removed in.
        Raises an error if pip's current version is greater than or equal to
        this.
    feature_flag:
        Command-line flag of the form --use-feature={feature_flag} for testing
        upcoming functionality.
    issue:
        Issue number on the tracker that would serve as a useful place for
        users to find related discussion and provide feedback.
    Nz{}z*pip {} will enforce this behaviour change.z*Since pip {}, this is no longer supported.zA possible replacement is {}.zEYou can use the flag --use-feature={} to test the upcoming behaviour.z@Discussion can be found at https://github.com/pypa/pip/issues/{}� c3�LK�|]\}}|�|�|j|����y�w)N)�format)�.0�value�
format_strs   r�	<genexpr>zdeprecated.<locals>.<genexpr>ns3�����!.��E�:��!�e�&7�	���%� �!.�s�"$�)r�
stacklevel)r�current_version�DEPRECATION_MSG_PREFIX�joinrr$�warn)r*r+r,r(r)�is_gone�
message_partsrs        r�
deprecatedr=7s���:�T�!�N�e�O�&<��g��&N�G�
�*�+�4�0�1���
9�=�		
�
�+�	
�

��
T��		
�
�N�	
�%�M�0�h�h��!.���G��#�G�,�,��M�M�'�$9�a�Hr)NN)rN)�__doc__rr$�typingrrrrr�pip._vendor.packaging.versionr�pipr	r7r8�Warningrr�__annotations__�str�intr r'r=rrr�<module>rFs�����5�5�/�.�(��	�G�	�"��s�!�"��
O�
�7�C�<�
 �O��7�m�O��O�
�	O�
�6�
�O��3�-�
O�
�O�(,� #'��
AI��AI��#��AI��c�]�	AI�
�3�-�AI��C�=�
AI�
�AIrpython3.12/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-312.pyc000064400000016467151732701230024132 0ustar00�

R`i�
��ddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZddlmZmZmZddlmZddlmZded	efd
�Zedede
d	eeddffd��Zed
ed�ed���Zeej:�Zded	efd�Zded	efd�Zdeded	e
efd�Z ded	ee!e"ffd�Z#ded	efd�Z$ded	ee!e"ffd�Z%ded	efd�Z&y)�N)�contextmanager)�NamedTemporaryFile)�Any�BinaryIO�	Generator�List�Union�cast)�retry�stop_after_delay�
wait_fixed)�get_path_uid)�format_size�path�returnc���tjdk(sttd�sytjj|�sJ�d}||k7r�tjj
|�rLtj�dk(r	t|�}|dk(Stj|tj�S|tjj|�}}||k7r��y#t$rYywxYw)N�win32�geteuidTrF)
�sys�platform�hasattr�osr�isabs�lexistsrr�OSError�access�W_OK�dirname)r�previous�path_uids   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/filesystem.py�check_path_ownerr"s����|�|�w��g�b�)�&<��
�7�7�=�=������H�
�(�
�
�7�7�?�?�4� ��z�z�|�q� �!�+�D�1�H� �1�}�$��y�y��r�w�w�/�/�!�2�7�7�?�?�4�#8�d�H��(�
����!� �!�s�C � 	C,�+C,�kwargsc+��K�tddtjj|�tjj	|�dd�|��5}tt|�}	|��|j�tj|j��	ddd�y#|j�tj|j��wxYw#1swYyxYw�w)a%Return a file-like object pointing to a tmp file next to path.

    The file is created securely and is ensured to be written to disk
    after the context reaches its end.

    kwargs will be passed to tempfile.NamedTemporaryFile to control
    the way the temporary file will be opened.
    Fz.tmp)�delete�dir�prefix�suffixN�)
rrrr�basenamer
r�flush�fsync�fileno)rr#�f�results    r!�adjacent_tmp_filer0+s�����
�
���G�G�O�O�D�!��w�w����%��	
�
�
�
��h��"��	&��L��L�L�N��H�H�V�]�]�_�%�
�
��
�L�L�N��H�H�V�]�]�_�%��
�
�s6�AC$�
C�B �#3C�	C$� 5C�C�C!�C$T�g�?)�reraise�stop�waitc�R�tjj|�sGtjj|�}||k(rn"|}tjj|�s�Gtjdk(r$tj
|tj�St|�S)zgCheck if a directory is writable.

    Uses os.access() on POSIX, tries creating files on Windows.
    �posix)rr�isdirr�namerr�_test_writable_dir_win)r�parents  r!�test_writable_dirr;Lsu���g�g�m�m�D�!�������&���T�>����	�g�g�m�m�D�!�
�w�w�'���y�y��r�w�w�'�'�!�$�'�'�c����d}d�td�D]�}|dj�fd�td�D��z}tjj||�}	tj|tj
tjztjz�}tj|�tj|�ytd	��#t$rY��t$rYywxYw)
N�(accesstest_deleteme_fishfingers_custard_�$abcdefghijklmnopqrstuvwxyz0123456789�
�c3�H�K�|]}tj�����y�w�N)�random�choice)�.0�_�alphabets  �r!�	<genexpr>z)_test_writable_dir_win.<locals>.<genexpr>ds�����!L�8�a�&�-�-��"9�8�s�"�TFz3Unexpected condition testing for writable directory)
�range�joinrr�open�O_RDWR�O_CREAT�O_EXCL�close�unlink�FileExistsError�PermissionErrorr)rr*rGr8�file�fdrHs      @r!r9r9^s����:�H�5�H�
�2�Y���"�'�'�!L�5��8�!L�L�L���w�w�|�|�D�$�'��	�����r�y�y�2�:�:�5��	�	�A�B�B�
�H�H�R�L��I�I�d�O��#�(�G�
H�H���	���	��
	�s�AC�	C0�$C0�/C0�patternc���g}tj|�D]6\�}}tj||�}|j	�fd�|D���8|S)z�Returns a list of absolute paths of files beneath path, recursively,
    with filenames which match the UNIX-style shell glob pattern.c3�^�K�|]$}tjj�|����&y�wrC)rrrL)rFr.�roots  �r!rIzfind_files.<locals>.<genexpr>�s!�����=�W��b�g�g�l�l�4��+�W�s�*-)r�walk�fnmatch�filter�extend)rrWr/rG�files�matchesrZs      @r!�
find_filesrazsK����F��'�'�$�-���a���.�.���0���
�
�=�W�=�=�(��Mr<c��tjj|�rytjj|�S)Nr)rr�islink�getsize�rs r!�	file_sizerf�s(��	�w�w�~�~�d���
�7�7�?�?�4� � r<c�*�tt|��SrC)rrfres r!�format_file_sizerh�s���y���'�'r<c��d}tj|�D];\}}}|D]0}tjj||�}|t	|�z
}�2�=|S)Ng)rr[rrLrf)r�sizerZ�_dirsr_�filename�	file_paths       r!�directory_sizern�sT���D� �g�g�d�m���e�U��H������T�8�4�I��I�i�(�(�D��,��Kr<c�*�tt|��SrC)rrnres r!�format_directory_sizerp�s���~�d�+�,�,r<)'r\r�os.pathrDr�
contextlibr�tempfiler�typingrrrrr	r
�pip._vendor.tenacityrrr
�pip._internal.utils.compatr�pip._internal.utils.miscr�str�boolr"r0�_replace_retry�replacer;r9ra�int�floatrfrhrnrpr)r<r!�<module>r~sB���	��
�
�%�'�>�>�D�D�3�0��3��4��6�&�C�&�3�&�9�X�t�T�=Q�3R�&��&�2�t�*:�1�*=�J�t�DT�U��
����
$��
(�C�(�D�(�$I��I��I�8�S��3��4��9��!�C�!�E�#�u�*�-�!�(�3�(�3�(�����s�E�z�!2��-��-��-r<python3.12/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc000064400000025564151732701230023723 0ustar00�

R`iu"�	�
�dZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
ddlmZddlm
Z
ddlmZmZmZmZddlmZej*e�ZeezZ	ddlZeez
Z	ddlZeez
Zd
efd�Zded
e	efd
�Z deed
e!fd�Z"deded
e!fd�Z#ded
dfd�Z$ded
e!fd�Z%ddedede!d
dfd�Z&deded
dfd�Z'	ddedede
ed
dfd�Z(y#e$rej7d�Y��wxYw#e$rej7d	�Y��wxYw)zUtilities related archives.
�N)�Iterable�List�Optional)�ZipInfo)�InstallationError)�BZ2_EXTENSIONS�TAR_EXTENSIONS�
XZ_EXTENSIONS�ZIP_EXTENSIONS)�
ensure_dirzbz2 module is not availablezlzma module is not available�returnc�Z�tjd�}tj|�|S)zBGet the current umask which involves having to set it temporarily.r)�os�umask)�masks ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/unpacking.py�
current_umaskr+s��
�8�8�A�;�D��H�H�T�N��K��pathc��|jd�jd�}d|vr=d|vr#|jd�|jd�ksd|vr|jdd�Sd|vr|jdd�S|dgS)N�/�\��)�lstrip�find�split�rs r�split_leading_dirr2sz���;�;�s��"�"�4�(�D�
�d�{�	
���$�)�)�C�.�4�9�9�T�?�:�t�4�?O��z�z�#�q�!�!�	
����z�z�$��"�"��b�z�r�pathsc�R�d}|D] }t|�\}}|sy|�|}�||k7s� yy)zyReturns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)NFT)r)r �
common_prefixr�prefix�rests     r�has_leading_dirr%>sB���M���(��.������
�
"�"�M�
�}�
$���r�	directory�targetc���tjj|�}tjj|�}tjj||g�}||k(S)zL
    Return true if the absolute path of target is within the directory
    )rr�abspath�commonprefix)r&r'�
abs_directory�
abs_targetr#s     r�is_within_directoryr-MsL���G�G�O�O�I�.�M�������(�J�
�W�W�
!�
!�=�*�"=�
>�F��]�"�"rc�N�tj|dt�zdz�y)zx
    Make file present at path have execute for user/group/world
    (chmod +x) is no-op on windows per python docs
    i��IN)r�chmodrrs r�2set_extracted_file_to_default_mode_plus_executabler1Xs!��
�H�H�T�E�]�_�,�,�u�4�6r�infoc�r�|jdz	}t|xrtj|�xr|dz�S)N�r/)�
external_attr�bool�stat�S_ISREG)r2�modes  r�zip_item_is_executabler:`s6������#�D���<����d�+�<��u��=�=r�filename�location�flattenc���t|�t|d�}	tj|d��}t	|j��xr|}|j
�D�](}|j}|}|rt|�d}tjj||�}tjj|�}	t||�sd}
t|
j|||���|j!d�s|j!d�rt|���t|	�|j|�}	t|d�5}t#j$||�d	d	d	�|j'�t)|�s��t+|���+	|j'�y	#1swY�FxYw#|j'�t)|�rt+|�wwxYw#|j'�wxYw)
a�
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    �rbT)�
allowZip64rzQThe zip file ({}) has a file ({}) trying to install outside target directory ({})rr�wbN)r�open�zipfile�ZipFiler%�namelist�infolistr;rrr�join�dirnamer-r�format�endswith�shutil�copyfileobj�closer:r1)
r;r<r=�zipfp�zip�leadingr2�name�fn�dir�message�fp�destfps
             r�
unzip_filerWgs{���x����4� �E� ��o�o�e��5��!�#�,�,�.�1�=�g���L�L�N�D��=�=�D��B��&�t�,�Q�/�������h��+�B��'�'�/�/�"�%�C�&�x��4�4��(����x��X�(N�O�O��{�{�3��2�;�;�t�#4��2���3���X�X�d�^��O��b�$��6��*�*�2�v�6�(��H�H�J�-�d�3�J�2�N�7#�:	���
�(����H�H�J�-�d�3�J�2�N�4��	���
�sB�DG�3F'�?F�F'�G�;G�F$	� F'�')G�G�G%c�b�t|�|j�jd�s|j�jd�rd}n�|j�jt�rd}n`|j�jt�rd}n:|j�jd�rd}nt
j
d|�d	}tj||d
��}	t|j�D�cgc]}|j��c}�}|j�D�]P}|j}|rt|�d}tjj||�}t!||�sd
}t#|j%|||���|j'�rt|���|j)�r	|j+||���	|j/|�}
ttjj5|��|
�J�t|d�5}t7j8|
|�ddd�|
j;�|j=||�|j>dzs��FtA|���S	|j;�ycc}w#t,$r-}	t
j
d||j|	�Yd}	~	���d}	~	wwxYw#t0t2f$r-}	t
j
d||j|	�Yd}	~	���d}	~	wwxYw#1swY��xYw#|j;�wxYw)a�
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    z.gzz.tgzzr:gzzr:bz2zr:xzz.tar�rz-Cannot determine compression type for file %szr:*zutf-8)�encodingrzQThe tar file ({}) has a file ({}) trying to install outside target directory ({})z/In the tar file %s the member %s is invalid: %sNrAr/)!r�lowerrJrr
�logger�warning�tarfilerBr%�
getmembersrQrrrrGr-rrI�isdir�issym�_extract_member�	Exception�extractfile�KeyError�AttributeErrorrHrKrLrM�utimer9r1)r;r<r9�tar�memberrPrRrrT�excrUrVs            r�
untar_filerk�s����x���~�~�� � ��'�8�>�>�+;�+D�+D�V�+L���	���	�	"�	"�>�	2���	���	�	"�	"�=�	1���	���	�	"�	"�6�	*������;��	
���
�,�,�x���
8�C�4�!�S�^�^�=M�"N�=M�6�6�;�;�=M�"N�O���n�n�&�F����B��&�r�*�1�-���7�7�<�<��"�-�D�&�x��6�4��(����x��x�(P�Q�Q��|�|�~��4� �������'�'���5������0�B��2�7�7�?�?�4�0�1��~�%�~��$��%���&�&�r�6�2�&����
��	�	�&�$�'��;�;��&�F�t�L�a'�d	�	�	���g#O��"!�	��N�N�I� �����	���	��!�.�1�	��N�N�I� �����	���	��&�%��	�	�	��s��,L�J�B-L�J�L�K�)8L�!L�89L�3L�L�	K�!"K	�L�	K�L�L
� "L�L�L
�
L�L	�L�L.�content_typec���tjj|�}|dk(s8|j�j	t
�st
j|�rt|||j	d���y|dk(sFtj|�s1|j�j	ttztz�r
t||�ytj!d|||�t#d|����)Nzapplication/zipz.whl)r=zapplication/x-gzipzZCannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formatz#Cannot determine archive format of )rr�realpathr[rJrrC�
is_zipfilerWr^�
is_tarfiler	rr
rkr\�criticalr)r;r<rls   r�unpack_filerr�s���
�w�w����)�H��)�)��>�>��$�$�^�4����h�'��8�X�8�3D�3D�V�3L�/L�M��,�,����h�'��>�>��$�$�^�n�%D�}�%T�U��8�X�&�	���
+����	
� �"E�h�Z� P�Q�Qr)T)N))�__doc__�loggingrrKr7r^rC�typingrrrr�pip._internal.exceptionsr�pip._internal.utils.filetypesrr	r
r�pip._internal.utils.miscr�	getLogger�__name__r\�SUPPORTED_EXTENSIONS�bz2�ImportError�debug�lzma�intr�strrr6r%r-r1r:rWrkrr�rr�<module>r�s�����	�
����+�+��6���0�	��	�	�8�	$��&��6��0���N�*��1���M�)��
�s��	�C�	�D��I�	��8�C�=��T��#�3�#��#��#�7�S�7�T�7�>��>�T�>�+��+��+�d�+�d�+�\M��M��M��M�f#'�R��R��R��3�-�R�
�	R��M�0�
�L�L�.�/�0���1�
�L�L�/�0�1�s$�	C
�%	C)�
C&�%C&�)D�Dpython3.12/site-packages/pip/_internal/utils/__pycache__/compatibility_tags.cpython-312.pyc000064400000012747151732701230025632 0ustar00�

R`i��x�dZddlZddlmZmZmZddlmZmZm	Z	m
Z
mZmZm
Z
mZejd�Zdeedfdefd	�Zd
edeefd�Zd
edeefd�Zd
edeefd
�Zdeeedeeefd�Zdedefd�Z	ddeedeedefd�Z				ddeedeeedeedeeedeef
d�Zy)z3Generate and work with PEP 425 Compatibility Tags.
�N)�List�Optional�Tuple)�
PythonVersion�Tag�compatible_tags�cpython_tags�generic_tags�interpreter_name�interpreter_version�
mac_platformsz(.+)_(\d+)_(\d+)_(.+)�version_info.�returnc�F�djtt|dd��S)N��)�join�map�str)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/compatibility_tags.py�version_info_to_nodotrs��
�7�7�3�s�L��!�,�-�.�.��archc
��tj|�}|rb|j�\}}}}t|�t|�f}t	||�D�cgc] }dj||t
d�d���"}}|S|g}|Scc}w)Nz{}_{}�macosx_)�
_osx_arch_pat�match�groups�intr
�format�len)rr�name�major�minor�actual_arch�mac_version�archess        r�_mac_platformsr(s�������%�E��*/�,�,�.�'��e�U�K��5�z�3�u�:�.��&�k�;�?�
�@��
�N�N�4��c�)�n�&6�!7�8�?�	�
��M�����M��
s�%A?c���|g}|jd�\}}}|dk(r4|dvr.|jd|z|z�|jd|z|z�|S|dk(r|jd|z|z�|S)N�_�
manylinux2014>�i686�x86_64�
manylinux2010�
manylinux1)�	partition�append)rr'�arch_prefix�arch_sep�arch_suffixs     r�_custom_manylinux_platformsr5.s����V�F�)-����)<�&�K��;��o�%��,�,��M�M�/�H�4�{�B�C��M�M�,��1�K�?�@��M�

��	'�
	�
�
�l�X�-��;�<��Mrc��|jd�\}}}|jd�r
t|�}|S|dvr
t|�}|S|g}|S)Nr*�macosx)r+r.)r0�
startswithr(r5)rr2r3r4r's     r�_get_custom_platformsr9Cs^��)-����)<�&�K��;����x� ���%��
�M�	
�:�	:�,�T�2���M�����Mr�	platformsc���|syt�}g}|D]F}||vr�t|�D�cgc]	}||vs�|��}}|j|�|j|��H|Scc}w�N)�setr9�update�extend)r:�seen�result�p�c�	additionss      r�_expand_allowed_platformsrENsn�����5�D�
�F�
����9�� 5�a� 8�J� 8�1�A�T�M�Q� 8�	�J����I���
�
�i� ���M��	Ks
�	A�A�versionc�t�t|�dkDrt|d�t|dd�fSt|d�fS)N�r)r!r)rFs r�_get_python_versionrI_s=��
�7�|�a���7�1�:���G�A�B�K� 0�0�0��G�A�J��!�!r�implementationc�>�|�
t�}|�
t�}|�|��Sr<)rr)rJrFs  r�_get_custom_interpreterrLfs/����)�+����%�'���
�g�Y�'�'r�impl�abisc�,�g}d}|�t|�}t||�}t|�}|xs
t�dk(}|r|j	t|||���n|j	t
|||���|j	t|||���|S)aVReturn a list of supported tags for each version specified in
    `versions`.

    :param version: a string version, of the form "33" or "32",
        or None. The version will be assumed to support our ABI.
    :param platform: specify a list of platforms you want valid
        tags for, or None. If None, use the local system platform.
    :param impl: specify the exact implementation you want valid
        tags for, or None. If None, use the local interpreter impl.
    :param abis: specify a list of abis you want valid
        tags for, or None. If None, use the local interpreter abi.
    N�cp)�python_versionrNr:)�interpreterrNr:)rQrRr:)rIrLrErr?r	r
r)rFr:rMrN�	supportedrQrR�
is_cpythons        r�
get_supportedrUps���$�I�.2�N���,�W�5��)�$��8�K�)�)�4�I��,�*�,��5�J������-��#�
�	
�	����'��#�
�	
�����)�#��	
���r)NN)NNNN)�__doc__�re�typingrrr�pip._vendor.packaging.tagsrrrr	r
rrr
�compilerrrrr(r5r9rErIrLrU�rr�<module>r\sZ���
�(�(�	�	�	���
�
�3�4�
�/��c�3�h��/�C�/�
����c���(�c��d�3�i��*����S�	����$�s�)�)<���$�s�)�AT��""��"��"�DH�(��S�M�(�3;�C�=�(��(�"�%)�� $�	5�
�c�]�5���S�	�"�5��3�-�5��4��9�
�	5�

�#�Y�5rpython3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc000064400000004321151732701230023213 0ustar00�

R`i\����dZddlZddlZddlZgd�Zej
e�Zdefd�Z	de
defd�Zhd�Z
ejjd	�xs ejd
k(xrej dk(Zy)zKStuff that differs in different Python versions and platform
distributions.�N)�get_path_uid�stdlib_pkgs�WINDOWS�returnc�<�	ddl}y#t$rYnwxYwddlm}|S)NrT)�IS_PYOPENSSL)�_ssl�ImportError�pip._vendor.urllib3.utilr)r	rs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/compat.py�has_tlsr
s*��
�����
��
��6��s��	��pathc��ttd�rktj|tjtjz�}tj
|�j}tj|�|Stjj|�s!tj|�j}|St|�d���)a)
    Return path's uid.

    Does not follow symlinks:
        https://github.com/pypa/pip/pull/935#discussion_r5307003

    Placed this function in compat due to differences on AIX and
    Jython, that should eventually go away.

    :raises OSError: When path is a symlink or can't be read.
    �
O_NOFOLLOWz/ is a symlink; Will not return uid for symlinks)�hasattr�os�open�O_RDONLYr�fstat�st_uid�closer�islink�stat�OSError)r�fd�file_uids   rrrs����r�<� �
�W�W�T�2�;�;����6�
7���8�8�B�<�&�&��
������O�
�w�w�~�~�d�#��w�w�t�}�+�+�H��O��T�F�"Q�R�S�S�>�python�wsgiref�argparse�win�cli�nt)�__doc__�loggingr�sys�__all__�	getLogger�__name__�logger�boolr
�str�intrr�platform�
startswith�namer�rr�<module>r2s�����	�
�
4��
��	�	�8�	$��
��
��s��s��@0���,�,�
!�
!�%�
(�
W�S�\�\�U�-B�-V�r�w�w�RV��rpython3.12/site-packages/pip/_internal/utils/__pycache__/packaging.cpython-312.pyc000064400000005103151732701230023653 0ustar00�

R`i<���ddlZddlZddlZddlmZmZmZmZddlm	Z	m
Z
ddlmZede
�Zeje�Zdee
deedfd	efd
�Zej*d��d
e
d	efd��Zde
d	efd�Zy)�N)�NewType�Optional�Tuple�cast)�
specifiers�version��Requirement�NormalizedExtra�requires_python�version_info.�returnc��|�ytj|�}tjdj	tt|���}||vS)a�
    Check if the given Python version matches a "Requires-Python" specifier.

    :param version_info: A 3-tuple of ints representing a Python
        major-minor-micro version to check (e.g. `sys.version_info[:3]`).

    :return: `True` if the given Python version satisfies the requirement.
        Otherwise, return `False`.

    :raises InvalidSpecifier: If `requires_python` has an invalid format.
    T�.)r�SpecifierSetr�parse�join�map�str)rr
�requires_python_specifier�python_versions    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/packaging.py�check_requires_pythonrsH����� *� 7� 7�� H���]�]�3�8�8�C��\�,B�#C�D�N��6�6�6�i)�maxsize�
req_stringc��t|�S)z5Construct a packaging.Requirement object with cachingr	)rs r�get_requirementr%s���z�"�"r�extrac�h�tttjdd|�j	��S)aDConvert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.

    This function is duplicated from ``pkg_resources``. Note that this is not
    the same to either ``canonicalize_name`` or ``_egg_link_name``.
    z[^A-Za-z0-9.-]+�_)rr�re�sub�lower)rs r�
safe_extrar%0s(�������(9�3��!F�!L�!L�!N�O�Or)�	functools�loggingr"�typingrrrr�pip._vendor.packagingrr�"pip._vendor.packaging.requirementsr
rr�	getLogger�__name__�logger�int�boolr�	lru_cacherr%�rr�<module>r2s�����	�1�1�5�:��+�S�1��	��	�	�8�	$��7��c�]�7�27��S��/�7�	�7�.����S�!�#��#��#�"�#�	P�c�	P�o�	Prpython3.12/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-312.pyc000064400000013623151732701230023041 0ustar00�

R`i����dZddlZddlmZddlmZddlmZddlm	Z	m
Z
ddlmZddl
mZd	Zej e�Zd
e
dedeeeffd
�Zde
dedefd�Zde
dedefd�Zde
dedefd�Zdedeedffd�Zdeedfdeddfd�Zy)z0Support functions for working with wheel files.
�N)�Message)�Parser)�Tuple)�
BadZipFile�ZipFile)�canonicalize_name)�UnsupportedWheel)�r�	wheel_zip�name�returnc	���	t||�}t||�}t|�}t
||�||fS#t$r)}tdj	|t|����d}~wwxYw)z�Extract information from the provided wheel, ensuring it meets basic
    standards.

    Returns the name of the .dist-info directory and the parsed WHEEL metadata.
    z{} has an invalid wheel, {}N)�wheel_dist_info_dir�wheel_metadata�
wheel_versionr	�format�str�check_compatibility)rr�info_dir�metadata�version�es      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/wheel.py�parse_wheelrsr��S�&�y�$�7��!�)�X�6����)�����&��X�����S��<�C�C�D�#�a�&�Q�R�R��S�s�#5�	A'�$A"�"A'�sourcec���|j�D�chc]}|jdd�d��}}|D�cgc]}|jd�s�|��}}|std��t	|�dkDr)tdjdj
|����|d}t|�}t|�}|j|�stdj||���|Scc}wcc}w)	z�Returns the name of the contained .dist-info directory.

    Raises AssertionError or UnsupportedWheel if not found, >1 found, or
    it doesn't match the provided name.
    �/r
rz
.dist-infoz.dist-info directory not foundz)multiple .dist-info directories found: {}z, z2.dist-info directory {!r} does not start with {!r})	�namelist�split�endswithr	�lenr�joinr�
startswith)	rr�p�subdirs�s�	info_dirsr�
info_dir_name�canonical_names	         rrr&s���,2�?�?�+<�=�+<�a�q�w�w�s�A��q�!�+<�G�=�#�@�G�q�q�z�z�,�'?��G�I�@���?�@�@�
�9�~����7�>�>�t�y�y��?S�T�
�	
���|�H�%�h�/�M�&�t�,�N��#�#�N�3��@�G�G��.�
�
�	
��O��/>��@s�C�C$�C$�pathc��	|j|�S#tttf$r}t	d|�d|����d}~wwxYw)Nzcould not read z file: )�readr�KeyError�RuntimeErrorr	)rr*rs   r�read_wheel_metadata_filer/GsJ��G��{�{�4� � ��
��,�/�G�������u�E�F�F��G�s��=�8�=�
dist_info_dirc��|�d�}t||�}	|j�}t	�j|�S#t$r}td|�d|����d}~wwxYw)ziReturn the WHEEL metadata of an extracted wheel, if possible.
    Otherwise, raise UnsupportedWheel.
    z/WHEELzerror decoding z: N)r/�decode�UnicodeDecodeErrorr	r�parsestr)rr0r*�wheel_contents�
wheel_textrs      rrrPsq���_�F�#�D�-�f�d�;�N�B�#�*�*�,�
��8���Z�(�(��
�B������1�%�@�A�A��B�s�<�	A�A�A�
wheel_data.c���|d}|�td��|j�}	ttt|jd���S#t$rtd|����wxYw)zbGiven WHEEL metadata, return the parsed Wheel-Version.
    Otherwise, raise UnsupportedWheel.
    z
Wheel-VersionzWHEEL is missing Wheel-Version�.zinvalid Wheel-Version: )r	�strip�tuple�map�intr�
ValueError)r7�version_textrs   rrrcss���o�.�L����?�@�@�� � �"�G�F��S��g�m�m�C�0�1�2�2���F��!8���D�E�E�F�s�'A�A$rc��|dtdkDr8tdj|djt	t
|�����|tkDr4tjddjt	t
|���yy)a�Raises errors or warns if called with an incompatible Wheel-Version.

    pip should refuse to install a Wheel-Version that's a major series
    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
    installing a version only minor version ahead (e.g 1.2 > 1.1).

    version: a 2-tuple representing a Wheel-Version (Major, Minor)
    name: name of wheel or package to raise exception about

    :raises UnsupportedWheel: when an incompatible Wheel-Version is given
    rzB{}'s Wheel-Version ({}) is not compatible with this version of pipr9z*Installing from a newer Wheel-Version (%s)N)�VERSION_COMPATIBLEr	rr"r<r�logger�warning)rrs  rrrssv���q�z�&�q�)�)��
��V�D�#�(�(�3�s�G�+<�"=�>�
�	
�
�%�	%����8��H�H�S��g�&�'�	
�
&�)�__doc__�logging�
email.messager�email.parserr�typingr�zipfilerr�pip._vendor.packaging.utilsr�pip._internal.exceptionsr	rA�	getLogger�__name__rBrrr�bytesr/rr=rr�rDr�<module>rQs�����!���'�9�5���
��	�	�8�	$���7��#��%��W��2E��$���s��s��BG�W�G�C�G�E�G�)�7�)�3�)�7�)�&
F�g�
F�%��S��/�
F� 
��s�C�x��
��
��
rDpython3.12/site-packages/pip/_internal/utils/__pycache__/misc.cpython-312.pyc000064400000103137151732701230022670 0ustar00�

R`i�\��D�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZ
ddlmZddlmZddlmZmZmZddlmZddlmZmZddlmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*ddl+m,Z,dd	l-m.Z.dd
l/m0Z0m1Z1m2Z2ddl3m4Z4ddl5m6Z6m7Z7dd
l8m9Z9ddl:m;Z;ddl<m=Z=gd�Z>ej~e@�ZAe(d�ZBe&e'eCeCefZDe&eEeEeEfZFe&eGe&e$eGe$eGffZHeeeeCgefZIeeeeDgefZJdeGfd�ZKde&eEdfde&eEeEeEffd�ZLdeGddfd�ZMdeGfd�ZNe0de1d�e2d���		dtdeGdeOd e$eIddfd!��ZPd"eddfd#�ZQd"eddfd$�ZReRd%�d&eded'e)eDeCfd eIddf
d(�ZSdeGdeGfd)�ZTdudeGd*eGdeGfd+�ZUd,eGd-e!eGdeGfd.�ZVd,eGddfd/�ZWd,eGd-e!eGdeGfd0�ZXd,eGdeGfd1�ZYd,eGdeGfd2�ZZd3eGdeEfd4�Z[d5e\deGfd6�Z]d7e!e!ede&e#eGe#eEffd8�Z^deGdeOfd9�Z_ej�fd:ed;eEde eaddffd<�ZbdvdeGd=eOdeGfd>�ZcdeGde&eGeGffd?�Zdd@eGdAeGddfdB�ZedeGdeOfdC�ZfdDedEeddfdF�ZgGdG�dHe�Zhej�dIeGde ehddffdJ��ZjdeehfdK�ZkdeehfdL�ZldMedNede'efdO�ZmdPeGdQe$eEdeGfdR�ZndwdSeGdTeGdeGfdU�ZodSeGde&e$eGe$eEffdV�ZpdSeGdeHfdW�ZqdSeGdeGfdX�ZrdYeGdZeeGge&edffde&eGeHffd[�ZsdSeGdeHfd\�ZtdSeGde&eGfd]�ZudYeGde&eGeGe&e$eGe$eGfffd^�ZvdYeGdeGfd_�ZwdYeGdeGfd`�Zxdae,deGfdb�ZyGdc�dd�ZzdeeGdezfdf�Z{dYeGdezfdg�Z|dheOddfdi�Z}dxdj�Z~deOfdk�ZdydeGdleEde&eeEffdm�Z�dne!ede"e&eeffdo�Z�dpeeBgeOfdne!eBde&e!eBe!eBffdq�Z�Gdr�dse.�Z�y)z�N)�partial)�StringIO)�filterfalse�tee�zip_longest)�Path)�FunctionType�
TracebackType)�Any�BinaryIO�Callable�ContextManager�Dict�	Generator�Iterable�Iterator�List�Optional�TextIO�Tuple�Type�TypeVar�Union�cast)�Requirement)�BuildBackendHookCaller)�retry�stop_after_delay�
wait_fixed)�__version__)�CommandError�ExternallyManagedEnvironment)�get_major_minor_version)�WINDOWS)�running_under_virtualenv)�rmtree�display_path�
backup_dir�ask�splitext�format_size�is_installable_dir�normalize_path�renames�get_prog�captured_stdout�
ensure_dir�remove_auth_from_url�check_externally_managed� ConfiguredBuildBackendHookCaller�T�returnc��tjjtjjt�dd�}tjj|�}dj
t|t��S)Nz..zpip {} from {} (python {}))	�os�path�join�dirname�__file__�abspath�formatr r#)�pip_pkg_dirs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/misc.py�get_pip_versionrALsV���'�'�,�,�r�w�w���x�8�$��E�K��'�'�/�/�+�.�K�'�.�.����!����py_version_info.c��t|�dkr|dt|�z
dzz
}nt|�dkDr|dd}td|�S)ax
    Convert a tuple of ints representing a Python version to one of length
    three.

    :param py_version_info: a tuple of ints representing a Python version,
        or None to specify no version. The tuple can have any length.

    :return: a tuple of length three if `py_version_info` is non-None.
        Otherwise, return `py_version_info` unchanged (i.e. None).
    �)rN�VersionInfo)�lenr)rCs r@�normalize_version_inforHWsP���?��a���A��O� 4�4��<�<��	�_�	��	!�)�"�1�-���
��/�/rBr9c���	tj|�y#t$rJ}|jtjk7r#|jtj
k7r�Yd}~yYd}~yd}~wwxYw)z os.path.makedirs without EEXIST.N)r8�makedirs�OSError�errno�EEXIST�	ENOTEMPTY)r9�es  r@r1r1jsN���
���D������7�7�e�l�l�"�q�w�w�%�/�/�'A��(B�"���s��	A+�;A&�&A+c���	tjjtjd�}|dvrtj
�d�S|S#tttf$rYywxYw)Nr)z__main__.pyz-cz -m pip�pip)	r8r9�basename�sys�argv�
executable�AttributeError�	TypeError�
IndexError)�progs r@r/r/ts_��
��w�w��������,���(�(��n�n�%�W�-�-��K���I�z�2�
���
�s�AA�	A�A"�!A"TrEg�?)�reraise�stop�wait�dir�
ignore_errors�onexcc��|rt}|�t}tttt
tft�|��}tjdk\rtj||��ytj||��y)N�r_)rE�)�onerror)�_onerror_ignore�_onerror_reraiserrr�OnExc�OnErr�rmtree_errorhandlerrS�version_info�shutilr&)r]r^r_�handlers    r@r&r&�se������}� ���	
�U�5�%�<�
 �"5�6��	�G����7�"��
�
�c��)��
�
�c�7�+rB�_argsc��y�N��rls r@rdrd�s��rBc���rnrorps r@rere�s��	rBra�func�exc_infoc�h�	tj|�j}|tjzs2	tj
||tjz�	||�yt
|t�s|\}}}||||�y#t$rYywxYw#t$rY�;wxYw#t$rY�JwxYw)a1
    `rmtree` error handler to 'force' a file remove (i.e. like `rm -f`).

    * If a file is readonly then it's write flag is set and operation is
      retried.

    * `onerror` is the original callback from `rmtree(... onerror=onerror)`
      that is chained at the end if the "rm -f" still fails.
    N)r8�stat�st_moderK�S_IWRITE�chmod�
isinstance�
BaseException)rrr9rsr_rv�_s      r@rhrh�s��� ��'�'�$�-�'�'��
�T�]�]�"�
	��H�H�T�7�T�]�]�2�3�

��T�
���h�
�.�!���8�Q�	�$��h���)������
��
���	��	�s4�B�'B%�B�	B�B�	B"�!B"�%	B1�0B1c�@�tjjtjj|��}|j	tj
�tjjz�r#d|ttj
��dz}|S)zTGives the display value for a given path, making it relative to cwd
    if possible.�.N)r8r9�normcaser=�
startswith�getcwd�seprG�r9s r@r'r'�sf���7�7���B�G�G�O�O�D�1�2�D����r�y�y�{�R�W�W�[�[�0�1��T�#�b�i�i�k�*�,�-�-���KrB�extc���d}|}tjj||z�r6|dz
}|t|�z}tjj||z�r�6||zS)z\Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)�)r8r9�exists�str)r]r��n�	extensions    r@r(r(�sZ��	
�A��I�
�'�'�.�.��y��
)�	�Q����#�a�&�L�	�
�'�'�.�.��y��
)���?�rB�message�optionsc��tjjdd�j�D]
}||vs�|cSt	||�S)N�PIP_EXISTS_ACTION�)r8�environ�get�splitr))r�r��actions   r@�ask_path_existsr��sB���*�*�.�.�!4�b�9�?�?�A���W���M�B��w�� � rBc�^�tjjd�rtd|����y)z&Raise an error if no input is allowed.�PIP_NO_INPUTz5No input was expected ($PIP_NO_INPUT set); question: N)r8r�r��	Exception�r�s r@�_check_no_inputr��s.��	�z�z�~�~�n�%��C�G�9�M�
�	
�&rBc���	t|�t|�}|j�j�}||vr+t	dj|dj
|���n|S�f)z@Ask the message interactively, with the given possible responsesz>Your response ({!r}) was not one of the expected responses: {}z, )r��input�strip�lower�printr>r:)r�r��responses   r@r)r)�sa��
��� ���>���>�>�#�)�)�+���7�"����V�H�d�i�i��&8�9�
�
�O�rBc�.�t|�t|�S)zAsk for input interactively.)r�r�r�s r@�	ask_inputr��s���G����>�rBc�B�t|�tj|�S)z!Ask for a password interactively.)r��getpassr�s r@�ask_passwordr�s���G���?�?�7�#�#rB�valc�R�|j�}|dvry|dvrytd|����)z�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    )�y�yes�t�true�on�1r�)r��no�f�false�off�0rzinvalid truth value )r��
ValueError)r�s r@�	strtoboolr�s:���)�)�+�C�
�2�2��	�5�	5���/��w�7�8�8rB�bytesc���|dkDrdj|dzdz�S|dkDrdjt|dz��S|dkDrdj|dz�Sdjt|��S)	Ni@Bz	{:.1f} MBg@�@i�i'z{} kBz	{:.1f} kBz{} bytes)r>�int)r�s r@r+r+su���{���!�!�%�&�.�4�"7�8�8�	��	��~�~�c�%�$�,�/�0�0�	����!�!�%�&�.�1�1�� � ��U��,�,rB�rowsc
�\�|D�cgc]}ttt|����}}t|ddi�D�cgc]}t	tt
|����}}|D�cgc]:}dj
ttj||��j���<}}||fScc}wcc}wcc}w)z�Return a list of formatted rows and a list of column sizes.

    For example::

    >>> tabulate([['foobar', 2000], [0xdeadbeef]])
    (['foobar     2000', '3735928559'], [10, 4])
    �	fillvaluer�� )	�tuple�mapr�r�maxrGr:�ljust�rstrip)r��row�col�sizes�tables     r@�tabulater�#s���-1�1�D�S�E�#�c�3�-� �D�D�1�+6��+K��+K�L�+K�C�S��S�#��
�+K�E�L�FJ�K�d�s�S�X�X�c�#�)�)�S�%�0�
1�
8�
8�
:�d�E�K��%�<���2��L��Ks� B� B$�?B)c�<�tjj|�sytjjtjj	|d��rytjjtjj	|d��ryy)atIs path is a directory containing pyproject.toml or setup.py?

    If pyproject.toml exists, this is a PEP 517 project. Otherwise we look for
    a legacy setuptools layout by identifying setup.py. We don't check for the
    setup.cfg because using it without setup.py is only available for PEP 517
    projects, which are already covered by the pyproject.toml check.
    Fzpyproject.tomlTzsetup.py)r8r9�isdir�isfiler:r�s r@r,r,1s_���7�7�=�=����	�w�w�~�~�b�g�g�l�l�4�)9�:�;��	�w�w�~�~�b�g�g�l�l�4��4�5��rB�file�sizec#�>K�	|j|�}|sy|����w)z7Yield pieces of data from a file-like object until EOF.N)�read)r�r��chunks   r@�read_chunksr�Bs(������	�	�$�������	�s��resolve_symlinksc��tjj|�}|r tjj|�}ntjj	|�}tjj|�S)zN
    Convert a path to its canonical, case-normalized, absolute version.

    )r8r9�
expanduser�realpathr=r~)r9r�s  r@r-r-MsV��
�7�7���d�#�D���w�w����%���w�w���t�$��
�7�7���D�!�!rBc��tj|�\}}|j�jd�r
|dd|z}|dd}||fS)z,Like os.path.splitext, but take off .tar tooz.tar���N)�	posixpathr*r��endswith)r9�baser�s   r@r*r*ZsN���"�"�4�(�I�D�#��z�z�|���V�$��2�3�i�#�o���C�R�y����9�rB�old�newc�~�tjj|�\}}|r6|r4tjj|�stj|�tj||�tjj|�\}}|r|r	tj|�yyy#t$rYywxYw)z7Like os.renames(), but handles renaming across devices.N)	r8r9r�r�rJrj�move�
removedirsrK)r�r��head�tails    r@r.r.cs��������s�#�J�D�$���R�W�W�^�^�D�1�
���D��
�K�K��S�������s�#�J�D�$���	��M�M�$���t���	��	�s�B0�0	B<�;B<c�h�t�sy|jttj��S)z�
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    Caution: this function assumes the head of path has been normalized
    with normalize_path.
    T)r%rr-rS�prefixr�s r@�is_localr�ts%��$�%���?�?�>�#�*�*�5�6�6rB�msg�argsc�0�tj|g|���yrn)�logger�info)r�r�s  r@�write_outputr��s��
�K�K���d�rBc�H�eZdZUeed<ededdfd��Zedefd��Z	y)�
StreamWrapper�orig_streamr6c�"�|�}||_|Srn)r�)�clsr��rets   r@�from_streamzStreamWrapper.from_stream�s���e��%����
rBc�.�|jjSrn)r��encoding��selfs r@r�zStreamWrapper.encoding�s�����(�(�(rBN)
�__name__�
__module__�__qualname__r�__annotations__�classmethodr��propertyr�r�rorBr@r�r��sC������f�������)�#�)��)rBr��stream_namec#��K�tt|�}tt|tj	|��	tt|���tt||�y#tt||�wxYw�w)z�Return a context manager used by captured_stdout/stdin/stderr
    that temporarily replaces the sys stream *stream_name* with a StringIO.

    Taken from Lib/support/__init__.py in the CPython repo.
    N)�getattrrS�setattrr�r�)r��orig_stdouts  r@�captured_outputr��sU�����#�{�+�K��C��m�7�7��D�E�/��c�;�'�'���[�+�.����[�+�.�s�5A2�A�
A2�A/�/A2c��td�S)z�Capture the output of sys.stdout:

       with captured_stdout() as stdout:
           print('hello')
       self.assertEqual(stdout.getvalue(), 'hello
')

    Taken from Lib/support/__init__.py in the CPython repo.
    �stdout�r�rorBr@r0r0�s���8�$�$rBc��td�S)z 
    See captured_stdout().
    �stderrr�rorBr@�captured_stderrr�s���8�$�$rB�
sequential�namedc
���tt|tt|���fi|��}|j	�D��cic]\}}||��
}}}||d<tdd|�Scc}}w)N�reverse_mapping�Enumro)�dict�zip�rangerG�items�type)rr�enums�key�value�reverses      r@�enumr�sb����Z��s�:��!7�8�B�E�B�E�,1�K�K�M�:�M�j�c�5�u�c�z�M�G�:�&�E�
�����E�"�"��;s�
A�host�portc�,�|�|Sd|vrd|�d�}|�d|��S)z.
    Build a netloc from a host-port pair
    �:�[�]ro)rrs  r@�build_netlocr�s3���|���
�d�{��4�&��{���V�1�T�F��rB�netloc�schemec�T�|jd�dk\rd|vr
d|vrd|�d�}|�d|��S)z)
    Build a full URL from a netloc.
    r��@rrz://)�count)rrs  r@�build_url_from_netlocr�sA���|�|�C��A��#�V�"3��6�8I��V�H�A����X�S���!�!rBc��t|�}tjj|�}|j|j
fS)z2
    Return the host-port pair from a netloc.
    )r�urllib�parse�urlparse�hostnamer)r�url�parseds   r@�parse_netlocr'�s5�� ��
'�C�
�\�\�
"�
"�3�
'�F��?�?�F�K�K�'�'rBc��d|vr|dfS|jdd�\}}d}d|vr|jdd�\}}n|d}}tjj	|�}|�tjj	|�}|||ffS)zp
    Parse out and remove the auth information from a netloc.

    Returns: (netloc, (username, password)).
    r�NNr�Nr)�rsplitr�r!r"�unquote)r�auth�pw�users    r@�split_auth_from_netlocr/�s����&���|�#�#�
�=�=��a�(�L�D�&��B�
�d�{��:�:�c�1�%���b���b���<�<����%�D�	�~�
�\�\�
!�
!�"�
%���D�"�:��rBc��t|�\}\}}|�|S|�d}d}n!tjj|�}d}dj	|||��S)z�
    Replace the sensitive data in a netloc with "****", if it exists.

    For example:
        - "user:pass@example.com" returns "user:****@example.com"
        - "accesstoken@example.com" returns "****@example.com"
    �****r�z:****z{user}{password}@{netloc})r.�passwordr)r/r!r"�quoter>)rr.r2s   r@�
redact_netlocr4�sj�� 6�f�=��F��T�8��|��
��������|�|�!�!�$�'����&�-�-�
�H�V�.��rBr%�transform_netlocc�"�tjj|�}||j�}|j|d|j
|j|jf}tjj|�}|td|�fS)aRTransform and replace netloc in a url.

    transform_netloc is a function taking the netloc and returning a
    tuple. The first element of this tuple is the new netloc. The
    entire tuple is returned.

    Returns a tuple containing the transformed url as item 0 and the
    original tuple returned by transform_netloc as item 1.
    r�NetlocTuple)
r!r"�urlsplitrrr9�query�fragment�
urlunsplitr)r%r5�purl�netloc_tuple�
url_pieces�surls      r@�_transform_urlr@sp���<�<� � ��%�D�#�D�K�K�0�L��+�+�|�A���	�	�4�:�:�t�}�}�U�J��<�<�"�"�:�.�D���m�\�2�2�2rBc��t|�Srn)r/�rs r@�_get_netlocrC&s
��!�&�)�)rBc��t|�fSrn)r4rBs r@�_redact_netlocrE*s���&�!�#�#rBc�8�t|t�\}\}}|||fS)z�
    Parse a url into separate netloc, auth, and url with no auth.

    Returns: (url_without_auth, netloc, (username, password))
    �r@rC)r%�url_without_authrr,s    r@�split_auth_netloc_from_urlrI.s'��(6�c�;�'G�$��n�v�t��V�T�)�)rBc�(�t|t�dS)z7Return a copy of url with 'username:password@' removed.rrG�r%s r@r2r2:s���#�{�+�A�.�.rBc�(�t|t�dS)z.Replace the password in a given url with ****.r)r@rErKs r@�redact_auth_from_urlrMAs���#�~�.�q�1�1rB�reqc��|jst|�St|�j|jt|j��S)z:Replace the password in a given requirement url with ****.)r%r��replacerM)rNs r@�redact_auth_from_requirementrQFs7���7�7��3�x���s�8���C�G�G�%9�#�'�'�%B�C�CrBc�H�eZdZdededdfd�Zdefd�Zdefd�Zdedefd	�Z	y)
�
HiddenText�secret�redactedr6Nc� �||_||_yrn)rTrU)r�rTrUs   r@�__init__zHiddenText.__init__Ns����� ��
rBc�6�djt|��S)Nz<HiddenText {!r}>)r>r�r�s r@�__repr__zHiddenText.__repr__Rs��"�)�)�#�d�)�4�4rBc��|jSrn�rUr�s r@�__str__zHiddenText.__str__Us���}�}�rB�otherc�d�t|�t|�k7ry|j|jk(S)NF)rrT)r�r]s  r@�__eq__zHiddenText.__eq__Ys*����:��e��$���{�{�e�l�l�*�*rB)
r�r�r�r�rWrYr\r�boolr_rorBr@rSrSMsG��!�s�!�c�!�d�!�5�#�5����+�C�+�D�+rBrSrc��t|d��S)Nr1r[)rS)rs r@�
hide_valuerbbs���e�f�-�-rBc�2�t|�}t||��S)Nr[)rMrS)r%rUs  r@�hide_urlrdfs��#�C�(�H��c�H�-�-rB�
modifying_pipc���ddtjj��dtjj�dtjj��g}|xr:txr2t
jjtjd�|v}|rPtjddgtjddz}tdjdj|����y)	z�Protection of pip.exe from modification on Windows

    On Windows, any operation modifying pip should be run as:
        python -m pip ...
    rQr}rz-mr�Nz3To modify pip, please run the following command:
{}r�)
rSri�major�minorr$r8r9rRrTrUr!r>r:)re�	pip_names�should_show_use_python_msg�new_commands    r@�(protect_pip_from_modification_on_windowsrlks���	�

�c���$�$�
%�&�

�c���$�$�
%�Q�s�'7�'7�'=�'=�&>�?��I�	�P�'�P�b�g�g�&6�&6�s�x�x��{�&C�y�&P��"��~�~�t�U�3�c�h�h�q�r�l�B���B�I�I�����%�
�
�	
�"rBc���t�rytjjt	j
d�d�}tjj
|�sytj|��)z�Check whether the current environment is externally managed.

    If the ``EXTERNALLY-MANAGED`` config file is found, the current environment
    is considered externally managed, and an ExternallyManagedEnvironment is
    raised.
    N�stdlibzEXTERNALLY-MANAGED)	r%r8r9r:�	sysconfig�get_pathr�r"�from_config)�markers r@r3r3�sQ�� �!��
�W�W�\�\�)�,�,�X�6�8L�
M�F�
�7�7�>�>�&�!��
&�
2�
2�6�
:�:rBc�f�tjduxrtjj�S)zIs this console interactive?N)rS�stdin�isattyrorBr@�is_console_interactiverv�s#���9�9�D� �7�S�Y�Y�%5�%5�%7�7rB�	blocksizec���tj�}d}t|d�5}t||��D]!}|t	|�z
}|j|��#	ddd�||fS#1swY||fSxYw)z5Return (hash, length) for path using hashlib.sha256()r�rb)r�N)�hashlib�sha256�openr�rG�update)r9rw�h�lengthr��blocks      r@�	hash_filer��sn��	����A�
�F�	
�d�D�	�Q� ���3�E��c�%�j� �F�
�H�H�U�O�4�
�
�f�9��	
�
�f�9��s�2A"�"A.�iterablec�0�t|�}t||�S)zb
    Return paired elements.

    For example:
        s -> (s0, s1), (s2, s3), (s4, s5), ...
    )�iterr)r�s r@�pairwiser��s���H�~�H��x��*�*rB�predc�N�t|�\}}t||�t||�fS)z�
    Use a predicate to partition entries into false entries and true entries,
    like

        partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9
    )rr�filter)r�r��t1�t2s    r@�	partitionr��s*����]�F�B���t�R� �&��r�"2�2�2rBc�b��eZdZ			ddedededeedeeddeef�fd�
Z		dd	ed
eeee	ee
effdeedef�fd
�
Z	dded
eeee	ee
effdef�fd�
Z		dd	ed
eeee	ee
effdeedef�fd�
Z
	dd
eeee	ee
effde
ef�fd�
Z	dd
eeee	ee
effde
ef�fd�
Z	dd
eeee	ee
effde
ef�fd�
Z		dded
eeee	ee
effdedef�fd�
Z		dded
eeee	ee
effdedef�fd�
Z�xZS)r4�
config_holder�
source_dir�
build_backend�backend_path�runner).N�python_executablec�:��t�|�|||||�||_yrn)�superrWr�)r�r�r�r�r�r�r��	__class__s       �r@rWz)ConfiguredBuildBackendHookCaller.__init__�s(���	����
�|�V�=N�	
�+��rB�wheel_directory�config_settings�metadata_directoryr6c�T��|jj}t�|�
|||��S�N)r�r�)r�r�r��build_wheel�r�r�r�r��csr�s     �r@r�z,ConfiguredBuildBackendHookCaller.build_wheel�s5����
�
�
/�
/���w�"��R�DV�#�
�	
rB�sdist_directoryc�R��|jj}t�|�
||��S�N)r�)r�r�r��build_sdist)r�r�r�r�r�s    �r@r�z,ConfiguredBuildBackendHookCaller.build_sdist�s+���
�
�
�
/�
/���w�"�?�B�"�G�GrBc�T��|jj}t�|�
|||��Sr�)r�r�r��build_editabler�s     �r@r�z/ConfiguredBuildBackendHookCaller.build_editable�s5����
�
�
/�
/���w�%��R�DV�&�
�	
rBc�P��|jj}t�|�
|��Sr�)r�r�r��get_requires_for_build_wheel�r�r�r�r�s   �r@r�z=ConfiguredBuildBackendHookCaller.get_requires_for_build_wheel��)����
�
�
/�
/���w�3�B�3�G�GrBc�P��|jj}t�|�
|��Sr�)r�r�r��get_requires_for_build_sdistr�s   �r@r�z=ConfiguredBuildBackendHookCaller.get_requires_for_build_sdist�r�rBc�P��|jj}t�|�
|��Sr�)r�r�r��get_requires_for_build_editabler�s   �r@r�z@ConfiguredBuildBackendHookCaller.get_requires_for_build_editable�s)����
�
�
/�
/���w�6�r�6�J�JrB�_allow_fallbackc�T��|jj}t�|�
|||��S�N)r�r�r�)r�r�r�� prepare_metadata_for_build_wheel�r�r�r�r�r�r�s     �r@r�zAConfiguredBuildBackendHookCaller.prepare_metadata_for_build_wheel�s6����
�
�
/�
/���w�7�1��+�8�
�	
rBc�T��|jj}t�|�
|||��Sr�)r�r�r��#prepare_metadata_for_build_editabler�s     �r@r�zDConfiguredBuildBackendHookCaller.prepare_metadata_for_build_editable
s6����
�
�
/�
/���w�:�1��+�;�
�	
rB)NNNr)rn)NT)r�r�r�rr�rr
rWrrrr�r�r�r�r�r�r`r�r��
__classcell__)r�s@r@r4r4�s����'+�04�+/�+��+��+��	+�
�s�m�+���)�,�-�
+�$�C�=�+�"GK�,0�		
��	
�"�$�s�E�#�t�C�y�.�,A�'A�"B�C�	
�%�S�M�		
�


�	
�GK�H��H�"�$�s�E�#�t�C�y�.�,A�'A�"B�C�H�

�	H�GK�,0�		
��	
�"�$�s�E�#�t�C�y�.�,A�'A�"B�C�	
�%�S�M�		
�


�	
�MQ�H�'��S�%��T�#�Y��2G�-G�(H�I�H�	
�c��H�MQ�H�'��S�%��T�#�Y��2G�-G�(H�I�H�	
�c��H�MQ�K�'��S�%��T�#�Y��2G�-G�(H�I�K�	
�c��K�GK� $�	
��
�"�$�s�E�#�t�C�y�.�,A�'A�"B�C�
��	
�


�
� GK� $�	
��
�"�$�s�E�#�t�C�y�.�,A�'A�"B�C�
��	
�


�
�
rBr4)FN)z.bak)T)�https)r6N)i)��
contextlibrLr�rz�io�loggingr8r�rjrurSro�urllib.parser!�	functoolsrr�	itertoolsrrr�pathlibr�typesr	r
�typingrrr
rrrrrrrrrrrrr�"pip._vendor.packaging.requirementsr�pip._vendor.pyproject_hooksr�pip._vendor.tenacityrrrrQr �pip._internal.exceptionsr!r"�pip._internal.locationsr#�pip._internal.utils.compatr$�pip._internal.utils.virtualenvr%�__all__�	getLoggerr�r�r5rz�ExcInfor�rFr�r7rfrgrArHr1r/r`r&rdrerhr'r(r�r�r)r�r�r��floatr+r�r,�DEFAULT_BUFFER_SIZEr�r�r-r*r.r�r�r��contextmanagerr�r0rrrrr'r/r4r@rCrErIr2rMrQrSrbrdrlr3rvr�r�r�r4rorBr@�<module>r�s�������	��	��
��
�����3�3��-������&;�>�D�D��O�;�.�C���$
��	�	�8�	$���C�L��
��]�#�]�M�A�
B���C��c�M�"���C��x��}�h�s�m�;�<�<�=���,��m�4�c�9�:���,��g�.��3�4�����0�E�#�s�(�O�0��c�3�PS�m�@T�0�&�S��T��	�#�	��t�*�1�-�J�s�O�D� �!�,�	�,��,��E�?�,�
�	,�E�,�,	�C�	�D�	�
�S�
�T�
�$�& �
�& �
�& ��G�]�*�+�& �
�& �
�
& �R�s��s���C��c��s��!�S�!�8�C�=�!�S�!�
�S�
�T�
����x��}�����s��s��$�#�$�#�$�
9�3�
9�3�
9� -�u�-��-��8�H�S�M�*��u�T�#�Y��S�	�5I�/J���S��T��$!#� 6� 6��
�����u�d�D� �!��
"��
"��
"��
"��3��5��c��?�����3��4��"7�3�7�4�7��c��#��$��
)�H�
)� ���/��/��=�$��3L�)M�/��/�	%��
�6�	%�%��
�6�%�#�c�#�C�#�D��I�#�	�s�	�(�3�-�	�C�	�"�#�"�s�"��"�(��(��x��}�h�s�m�'C�!D�(��3��;��:�#��#��,3�	�3� (�#���c�3�h��)?� @�3�
�3����3�(*��*��*�$�3�$�5��:�$�	*�	�	*�
�3��U�8�C�=�(�3�-�7�8�8�9�	*�/�c�/�c�/�2�c�2�c�2�
D�k�D�c�D�+�+�*.�c�.�j�.�.�#�.�*�.�

�D�
�T�
�4;�8��8�
	�C�	�C�	�e�C��H�o�	�+�x��}�+��%��S��/�)B�+�3�
�A�3��9�
�3��q�k�3��8�A�;����#�$�3�W
�'=�W
rBpython3.12/site-packages/pip/_internal/utils/__pycache__/urls.cpython-312.pyc000064400000004621151732701230022720 0ustar00�

R`i���r�ddlZddlZddlZddlZddlmZddlmZde	dee	fd�Z
de	de	fd	�Zde	de	fd
�Zy)�N)�Optional�)�WINDOWS�url�returnc�R�d|vry|jdd�dj�S)N�:rr)�split�lower)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/urls.py�get_url_schemer

s+��
�#�~���9�9�S�!��Q��%�%�'�'��pathc��tjjtjj|��}tj
j
dtjj|��}|S)zh
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    �file:)	�osr�normpath�abspath�urllib�parse�urljoin�request�pathname2url)rrs  r�path_to_urlrsO��
�7�7���B�G�G�O�O�D�1�2�D�
�,�,�
�
�w����(C�(C�D�(I�
J�C��Jrc��|jd�sJd|�d���tjj|�\}}}}}|r|dk(rd}ntrd|z}ntd|����tjj||z�}tr9|s7t|�dk\r)|d	d
k(r!|dtjvr|dd
dvr|dd}|S)z(
    Convert a file: URL to a path.
    rz1You can only turn file: urls into filenames (not �)�	localhost�z\\z8non-local file URIs are not supported on this platform: �r�/r��)r	z:/N)�
startswithrr�urlsplitr�
ValueErrorr�url2pathname�len�string�
ascii_letters)r�_�netlocrs    r�url_to_pathr,s����>�>���D�	:�3�'��C�D��#�L�L�1�1�#�6��A�v�t�Q���V�{�*���	��&����F�s�g�N�
�	
��>�>�&�&�v��}�5�D�	����I��N���G�s�N���G�v�+�+�+���1�I��$��A�B�x���Kr)
rr(�urllib.parser�urllib.request�typingr�compatr�strr
rr,�rr�<module>r3sT��	�
�����(��(���
�(��c��c��$�S�$�S�$rpython3.12/site-packages/pip/_internal/utils/__pycache__/encoding.cpython-312.pyc000064400000004220151732701230023514 0ustar00�

R`i���>�UddlZddlZddlZddlZddlmZmZejdfejdfejdfejdfejdfejdfejd	fgZeeeefed
<ej$d�Zded
efd�Zy)�N)�List�Tuplezutf-8zutf-16z	utf-16-bez	utf-16-lezutf-32z	utf-32-bez	utf-32-le�BOMSscoding[:=]\s*([-\w.]+)�data�returnc��tD]5\}}|j|�s�|t|�dj|�cS|j	d�ddD]n}|dddk(s�t
j
|�s�"t
j
|�}|�J�|j�djd�}|j|�cS|jtjd�xstj��S)	z�Check a bytes string for a BOM to correctly detect the encoding

    Fallback to locale.getpreferredencoding(False) like open() on Python3N�
�r��#�asciiF)r�
startswith�len�decode�split�ENCODING_RE�search�groups�locale�getpreferredencoding�sys�getdefaultencoding)r�bom�encoding�line�results     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/encoding.py�auto_decoders����
��X��?�?�3����C��
�#�*�*�8�4�4���
�
�5�!�"�1�%����!�9����!3�!3�D�!9� �'�'��-�F��%�%�%��}�}��q�)�0�0��9�H��;�;�x�(�(�&��;�;��#�#�E�*�F�c�.D�.D�.F���)�codecsr�rer�typingrr�BOM_UTF8�	BOM_UTF16�BOM_UTF16_BE�BOM_UTF16_LE�	BOM_UTF32�BOM_UTF32_BE�BOM_UTF32_LEr�bytes�str�__annotations__�compilerr�rr�<module>r/s���
�
�	�
���_�_�g�����x� ����+�&����+�&����x� ����+�&����+�&�!��d�5��������b�j�j�3�4���e���rpython3.12/site-packages/pip/_internal/utils/__pycache__/_jaraco_text.cpython-312.pyc000064400000010737151732701240024403 0ustar00�

R`i
��|�dZddlZddlZd�Zejd��Zej
e�d��Zd�Z	d�Z
y)a�Functions brought over from jaraco.text.

These functions are not supposed to be used within `pip._internal`. These are
helper functions brought over from `jaraco.text` to enable vendoring newer
copies of `pkg_resources` without having to vendor `jaraco.text` and its entire
dependency cone; something that our vendoring setup is not currently capable of
handling.

License reproduced from original source below:

Copyright Jason R. Coombs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
�Nc�.�|xr|jd�S)N�#)�
startswith)�strs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/_jaraco_text.py�	_nonblankr$s���*�s�~�~�c�*�*�*�c�\�tjjtt|��S)a�
    Yield valid lines of a string or iterable.

    >>> list(yield_lines(''))
    []
    >>> list(yield_lines(['foo', 'bar']))
    ['foo', 'bar']
    >>> list(yield_lines('foo\nbar'))
    ['foo', 'bar']
    >>> list(yield_lines('\nfoo\n#bar\nbaz #comment'))
    ['foo', 'baz #comment']
    >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n']))
    ['foo', 'bar', 'baz', 'bing']
    )�	itertools�chain�
from_iterable�map�yield_lines)�iterables rrr(s �� �?�?�(�(��[�(�)C�D�Dr	c�n�ttttj|j���S)N)�filterrrr�strip�
splitlines)�texts r�_r;s!���)�S����D�O�O�,=�>�?�?r	c�*�|jd�dS)z�
    Drop comments.

    >>> drop_comment('foo # bar')
    'foo'

    A hash without a space may be in a URL.

    >>> drop_comment('http://example.com/foo#bar')
    'http://example.com/foo#bar'
    z #r)�	partition)�lines r�drop_commentr@s���>�>�$���"�"r	c#��K�t|�}|D]I}|jd�r2	|ddj�t|�z}|jd�r�2|���Ky#t$rYywxYw�w)a_
    Join lines continued by a trailing backslash.

    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar \\', 'baz']))
    ['foobarbaz']

    Not sure why, but...
    The character preceeding the backslash is also elided.

    >>> list(join_continuation(['goo\\', 'dly']))
    ['godly']

    A terrible idea, but...
    If no line is available to continue, suppress the lines.

    >>> list(join_continuation(['foo', 'bar\\', 'baz\\']))
    ['foo']
    �\N���)�iter�endswithr�next�
StopIteration)�lines�items  r�join_continuationr$Oso����.
��K�E����m�m�D�!�
��C�R�y���(�4��;�6���m�m�D�!�
�
�
��!�
��
�s.�"A-�A�A-�A-�	A*�&A-�)A*�*A-)�__doc__�	functoolsrr�singledispatchr�registerrrrr$�r	r�<module>r*s^���>��+����E��E�$
���c��@��@�#�r	python3.12/site-packages/pip/_internal/utils/__pycache__/virtualenv.cpython-312.pyc000064400000010636151732701240024136 0ustar00�

R`i�
����ddlZddlZddlZddlZddlZddlmZmZeje	�Z
ejd�Zde
fd�Zde
fd�Zde
fd�Zdeeefd�Zde
fd	�Zde
fd
�Zde
fd�Zy)�N)�List�Optionalz8include-system-site-packages\s*=\s*(?P<value>true|false)�returnc�b�tjttdtj�k7S)znChecks if sys.base_prefix and sys.prefix match.

    This handles PEP 405 compliant virtual environments.
    �base_prefix)�sys�prefix�getattr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/virtualenv.py�_running_under_venvrs ��
�:�:���m�S�Z�Z�@�@�@rc�"�ttd�S)zmChecks if sys.real_prefix is set.

    This handles virtual environments created with pypa's virtualenv.
    �real_prefix)�hasattrrrrr
� _running_under_legacy_virtualenvrs���3�
�&�&rc�.�t�xs
t�S)zDTrue if we're running inside a virtual environment, False otherwise.)rrrrr
�running_under_virtualenvrs��� �F�$D�$F�Frc��tjjtjd�}	t|d��5}|j
�j�cddd�S#1swYyxYw#t$rYywxYw)z�Reads {sys.prefix}/pyvenv.cfg and returns its contents as list of lines

    Returns None, if it could not read/access the file.
    z
pyvenv.cfgzutf-8)�encodingN)	�os�path�joinrr	�open�read�
splitlines�OSError)�pyvenv_cfg_file�fs  r
�_get_pyvenv_cfg_linesr $s^��
�g�g�l�l�3�:�:�|�<�O���/�G�
4���6�6�8�&�&�(�5�
4�
4������s.�
A1�A%�	A1�%A.�*A1�.A1�1	A=�<A=c��t�}|�tjd�y|D]0}tj	|�}|��|jd�dk(s�0yy)aZCheck `{sys.prefix}/pyvenv.cfg` for system site-packages inclusion

    PEP 405 specifies that when system site-packages are not supposed to be
    visible from a virtual environment, `pyvenv.cfg` must contain the following
    line:

        include-system-site-packages = false

    Additionally, log a warning if accessing the file fails.
    z�Could not access 'pyvenv.cfg' despite a virtual environment being active. Assuming global site-packages is not accessible in this environment.T�value�falseF)r �logger�warning�#_INCLUDE_SYSTEM_SITE_PACKAGES_REGEX�match�group)�	cfg_lines�liner's   r
�_no_global_under_venvr+3sb��&�'�I���	���
#�	
�
���3�9�9�$�?�������W�!5��!@���rc��tjjtjjtj
��}tjj
|d�}tjj|�S)z�Check if "no-global-site-packages.txt" exists beside site.py

    This mirrors logic in pypa/virtualenv for determining whether system
    site-packages are visible in the virtual environment.
    zno-global-site-packages.txt)rr�dirname�abspath�site�__file__r�exists)�site_mod_dir�no_global_site_packages_files  r
�"_no_global_under_legacy_virtualenvr4PsV���7�7�?�?�2�7�7�?�?�4�=�=�#A�B�L�#%�7�7�<�<��%�$� ��7�7�>�>�6�7�7rc�T�t�r
t�St�r
t�Sy)zHReturns a boolean, whether running in venv with no system site-packages.F)rr+rr4rrr
�virtualenv_no_globalr6^s%����$�&�&�'�)�1�3�3�r)�loggingr�rer/r�typingrr�	getLogger�__name__r$�compiler&�boolrrr�strr r+r4r6rrr
�<module>r?s����	�	��
�!�	��	�	�8�	$��&0�b�j�j�?�'�#�
A�T�A�'�$�'�G�$�G�
�x��S�	�2���t��:8�D�8�
�d�
rpython3.12/site-packages/pip/_internal/utils/__pycache__/glibc.cpython-312.pyc000064400000004522151732701240023014 0ustar00�

R`i)��p�ddlZddlZddlmZmZdeefd�Zdeefd�Zdeefd�Zdeeeffd�Z	y)�N)�Optional�Tuple�returnc�.�t�xs
t�S)z9Returns glibc version string, or None if not using glibc.)�glibc_version_string_confstr�glibc_version_string_ctypes����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/glibc.py�glibc_version_stringrs��'�)�J�-H�-J�Jr
c��tjdk(ry	tjd�}|�y|j	�\}}|S#t
ttf$rYywxYw)z@Primary implementation of glibc_version_string using os.confstr.�win32N�CS_GNU_LIBC_VERSION)�sys�platform�os�confstr�split�AttributeError�OSError�
ValueError)�gnu_libc_version�_�versions   rrrse���|�|�w�����:�:�&;�<���#��%�+�+�-�
��7��N��
�G�Z�0����s�A�A�A�Ac��	ddl}|jd�}	|j}|j
|_|�}t|t�s|jd�}|S#t$rYywxYw#t$rYywxYw)z=Fallback implementation of glibc_version_string using ctypes.rN�ascii)
�ctypes�ImportError�CDLL�gnu_get_libc_versionr�c_char_p�restype�
isinstance�str�decode)r�process_namespacer �version_strs    rrrs��������D�)���0�E�E��$*�?�?�� �&�(�K��k�3�'�!�(�(��1�����-���������s"�A�A.�	A+�*A+�.	A:�9A:c�$�t�}|�yd|fS)z�Try to determine the glibc version

    Returns a tuple of strings (lib, version) which default to empty strings
    in case the lookup fails.
    )�r)�glibc)r)�
glibc_versions r�libc_verr,Ns ��)�*�M������'�'r
)
rr�typingrrr$rrrr,r	r
r�<module>r.sU��	�
�"�K�h�s�m�K�
�h�s�m��(�X�c�]��^
(�%��S��/�
(r
python3.12/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-312.pyc000064400000002270151732701240023736 0ustar00�

R`i����UdZddlmZddlmZdZdZeedfed<dZ	eedfed	<d
efZ
eedfed<dZeedfed
<e
ezeze	zZdede
fd�Zy)zFiletype information.
�)�Tuple)�splitextz.whl)z.tar.bz2z.tbz.�BZ2_EXTENSIONS)z.tar.xzz.txzz.tlzz.tar.lzz	.tar.lzma�
XZ_EXTENSIONSz.zip�ZIP_EXTENSIONS)z.tar.gzz.tgzz.tar�TAR_EXTENSIONS�name�returnc�N�t|�dj�}|tvryy)z9Return True if `name` is a considered as an archive file.�TF)r�lower�ARCHIVE_EXTENSIONS)r	�exts  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/filetypes.py�is_archive_filers(��
�4�.��
�
!�
!�
#�C�
� � ���N)�__doc__�typingr�pip._internal.utils.miscr�WHEEL_EXTENSIONr�str�__annotations__rrrr�boolr�rr�<module>rs�����-���"6���c�3�h��6�"�
�u�S�#�X���$*�?�";���c�3�h��;�"=���c�3�h��=�#�n�4�~�E�
�U���#��$�rpython3.12/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-312.pyc000064400000007027151732701250025616 0ustar00�

R`i��	��ddlmZddlmZmZmZmZddlmZddl	m
Z
ddlmZdede
de
fd	�Zd
e
defd�Z	dd
ed
ee
dedefd�Zy)�)�Optional)�ArchiveInfo�	DirectUrl�DirInfo�VcsInfo)�Link)�path_to_url)�vcs�
direct_url�name�returnc��|j�|dz}g}t|jt�rI|dj	|jj
|j|jj�z
}n�t|jt�rK||jz
}|jjrQ|j|jj�n+t|jt�sJ�||jz
}|jr|jd|jz�|r|ddj|�zz
}|S)z0Convert a DirectUrl to a pip requirement string.z @ z{}+{}@{}z
subdirectory=�#�&)�validate�
isinstance�infor�formatr
�url�	commit_idr�hash�appendr�subdirectory�join)rr�requirement�	fragmentss    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/direct_url_helpers.py�%direct_url_as_pep440_direct_referencer	s��������,�K��I��*�/�/�7�+��z�(�(��O�O���������1J�1J�
�	
��
�J�O�O�[�	1��z�~�~�%���?�?������Z�_�_�1�1�2��*�/�/�7�3�3�3��z�~�~�%���������:�+B�+B�B�C���s�S�X�X�i�0�0�0�����
source_dirc�B�tt|�td����S)NT)�editable)rr)rr	r)r s r�direct_url_for_editabler# s����
�#�
�d�
#��rN�link�link_is_in_wheel_cachec�D�|jr�tj|j�}|sJ�|j	|j
�\}}}|r|sJ�|}n|sJ�|j
|�}t|t|j||��|j��S|j�r*t|j
t�|j��Sd}|j}	|	r|	�d|j��}t|j
t|��|j��S)N)r
r�requested_revision)rrr�=)r)�is_vcsr
�get_backend_for_scheme�scheme�get_url_rev_and_auth�url_without_fragment�get_revisionrrr�subdirectory_fragment�is_existing_dirr�	hash_namerr)
r$r r%�vcs_backendrr'�_rrr1s
          r�direct_url_from_linkr4's)���{�{��0�0����=����{�%0�%E�%E��%�%�&
�"��
��"�&�%�%�*�I�
��:�#�0�0��<�I�����$�$�#�#5��
�3�3�
�	
�
�	�	�	���)�)����3�3�
�	
����N�N�	���[��$�)�)��-�D���)�)��$�'��3�3�
�	
r)NF)�typingr�pip._internal.models.direct_urlrrrr�pip._internal.models.linkr�pip._internal.utils.urlsr	�pip._internal.vcsr
�strrr#�boolr4�rr�<module>r=st���T�T�*�0�!��i��s��s��.���	��RW�0
�
�0
�$�S�M�0
�JN�0
��0
rpython3.12/site-packages/pip/_internal/utils/__pycache__/egg_link.cpython-312.pyc000064400000005622151732701250023516 0ustar00�

R`iF���ddlZddlZddlZddlmZmZddlmZmZddl	m
Z
mZddgZde
de
fd	�Zde
dee
fd
�Zde
dee
fd�Zy)�N)�List�Optional)�
site_packages�	user_site)�running_under_virtualenv�virtualenv_no_global�egg_link_path_from_sys_path�egg_link_path_from_location�raw_name�returnc�6�tjdd|�dzS)z�
    Convert a Name metadata value to a .egg-link name, by applying
    the same substitution as pkg_resources's safe_name function.
    Note: we cannot use canonicalize_name because it has a different logic.
    z[^A-Za-z0-9.]+�-z	.egg-link)�re�sub)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/egg_link.py�_egg_link_namers���6�6�"�C��2�[�@�@�c���t|�}tjD]E}tjj	||�}tjj|�s�C|cSy)zJ
    Look for a .egg-link file for project name, by walking sys.path.
    N)r�sys�path�os�join�isfile)r�
egg_link_name�	path_item�egg_links    rr	r	sJ��#�8�,�M��X�X�	��7�7�<�<�	�=�9��
�7�7�>�>�(�#��O��rc��g}t�r;|jt�t�sLtrF|jt�n0tr|jt�|jt�t|�}|D]E}tjj||�}tjj|�s�C|cSy)a
    Return the path for the .egg-link file if it exists, otherwise, None.

    There's 3 scenarios:
    1) not in a virtualenv
       try to find in site.USER_SITE, then site_packages
    2) in a no-global virtualenv
       try to find in site_packages
    3) in a yes-global virtualenv
       try to find in site_packages, then site.USER_SITE
       (don't look in global location)

    For #1 and #3, there could be odd cases, where there's an egg-link in 2
    locations.

    This method will just return the first one found.
    N)
r�appendrrrrrrrr)r�sitesr�site�egglinks     rr
r
's���$�E��!�
���]�#�#�%�)��L�L��#���L�L��#�
���]�#�"�8�,�M����'�'�,�,�t�]�3��
�7�7�>�>�'�"��N��r)rrr�typingrr�pip._internal.locationsrr�pip._internal.utils.virtualenvrr�__all__�strrr	r
�rr�<module>r(sl��	�	�
�!�<��"�!���A�S�A�S�A�	�#�	�(�3�-�	�!�#�!�(�3�-�!rpython3.12/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-312.pyc000064400000016576151732701260023225 0ustar00�

R`i����ddlZddlmZmZmZmZmZmZddlm	Z	m
Z
mZddlm
Z
erddlmZddlmZdZgd�ZGd	�d
�ZGd�de�Zy)
�N)�
TYPE_CHECKING�BinaryIO�Dict�Iterable�List�Optional)�HashMismatch�HashMissing�InstallationError)�read_chunks)�_Hash)�NoReturn�sha256)r�sha384�sha512c��eZdZdZddeeeeefddfd�Zdd�Z	e
defd��Zd	ed
ede
fd�Zdeeddfd
�Zdeedfddfd�Zdeddfd�Zdeddfd�Zdeeefde
fd�Zde
fd�Zdede
fd�Zdefd�Zy)�HasheszaA wrapper that builds multiple hashes at once and checks them against
    known-good values

    N�hashes�returnc�f�i}|�&|j�D]\}}t|�||<�||_y)zo
        :param hashes: A dict of algorithm names pointing to lists of allowed
            hex digests
        N)�items�sorted�_allowed)�selfr�allowed�alg�keyss     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/hashes.py�__init__zHashes.__init__s9��
����#�\�\�^�	��T�%�d�|����,� ��
��otherc��t|t�stS|s|S|s|Si}|jj	�D]9\}}||jvr�|D�cgc]}||j|vs�|��c}||<�;t|�Scc}w�N)�
isinstancer�NotImplementedrr)rr!�newr�values�vs      r�__and__zHashes.__and__+s����%��(�!�!���K���L��� �>�>�/�/�1�K�C���$�-�-�'��#)�E�6�a�Q�$�-�-��2D�-D��6�E�C��H�2��c�{���Fs�B�+Bc�V�td�|jj�D��S)Nc3�2K�|]}t|����y�wr#)�len)�.0�digestss  r�	<genexpr>z&Hashes.digest_count.<locals>.<genexpr>@s����F�/E�G�3�w�<�/E�s�)�sumrr'�rs r�digest_countzHashes.digest_count>s ���F�t�}�}�/C�/C�/E�F�F�Fr �	hash_name�
hex_digestc�>�||jj|g�vS)z/Return whether the given hex digest is allowed.)r�get)rr3r4s   r�is_hash_allowedzHashes.is_hash_allowedBs���T�]�]�.�.�y�"�=�=�=r �chunksc��i}|jj�D]}	tj|�||<�|D](}|j�D]}|j|���*|j�D]&\}}|j�|j|vs�&y|j|�y#tt
f$rt
d|����wxYw)z�Check good hashes against ones built from iterable of chunks of
        data.

        Raise HashMismatch if none match.

        zUnknown hash name: N)rr�hashlibr&�
ValueError�	TypeErrorrr'�updater�	hexdigest�_raise)rr8�gotsr3�chunk�hash�gots       r�check_against_chunkszHashes.check_against_chunksFs��������+�+�-�I�
K�")�+�+�i�"8��Y��.��E����
�����E�"�&��#�j�j�l�N�I�s��}�}��$�-�-�	�":�:��+�	
���D����	�*�
K�'�*=�i�[�(I�J�J�
K�s�B3�3Cr@r
rc�.�t|j|��r#)r	r�rr@s  rr?z
Hashes._raise]s���4�=�=�$�/�/r �filec�6�|jt|��S)zaCheck good hashes against a file-like object

        Raise HashMismatch if none match.

        )rDr)rrGs  r�check_against_filezHashes.check_against_file`s���(�(��T�):�;�;r �pathc�h�t|d�5}|j|�cddd�S#1swYyxYw)N�rb)�openrI)rrJrGs   r�check_against_pathzHashes.check_against_pathhs(��
�$��
���*�*�4�0��
�
�s�(�1c�\�|j�D]\}}|j||�s�yy)z3Return whether any of the given hashes are allowed.TF)rr7)rrr3r4s    r�
has_one_ofzHashes.has_one_ofls/��%+�\�\�^�!�I�z��#�#�I�z�:��&4�r c�,�t|j�S)z,Return whether I know any known-good hashes.)�boolrr1s r�__bool__zHashes.__bool__ss���D�M�M�"�"r c�`�t|t�stS|j|jk(Sr#)r$rr%r)rr!s  r�__eq__z
Hashes.__eq__ws%���%��(�!�!��}�}����.�.r c	��tdjtd�|jj	�D����S)N�,c3�VK�|]!\}}|D]}dj||f�����#y�w)�:N)�join)r-r�digest_list�digests    rr/z"Hashes.__hash__.<locals>.<genexpr>s7�����,A�(��[�"-���H�H�c�6�]�+�"-�,�,A�s�'))rBrZrrrr1s r�__hash__zHashes.__hash__|s=����H�H���,0�M�M�,?�,?�,A���
�
�	
r r#)r!rrr)�__name__�
__module__�__qualname__�__doc__rr�strrrr)�property�intr2rRr7r�bytesrDr?rrIrNrPrS�objectrUr]�r rrrs���

 �x��S�$�s�)�^�(<�=�
 ��
 ��&�G�c�G��G�>��>�#�>�$�>��8�E�?��t��.0�4��W��-�0�*�0�<�x�<�D�<�1�s�1�t�1���c�3�h���D��#�$�#�/�F�/�t�/�
	
�#�	
r rc�>��eZdZdZd�fd�Zdeedfddfd�Z�xZS)	�
MissingHashesz�A workalike for Hashes used when we're missing a hash for a requirement

    It computes the actual hash of the requirement and raises a HashMissing
    exception showing it to the user.

    rc�2��t�|�tgi��y)z!Don't offer the ``hashes`` kwarg.)rN)�superr�
FAVORITE_HASH)r�	__class__s �rrzMissingHashes.__init__�s���	����� 3��4r r@r
rc�B�t|tj���r#)r
rlr>rFs  rr?zMissingHashes._raise�s���$�}�-�7�7�9�:�:r )rN)	r^r_r`rarrrbr?�
__classcell__)rms@rriri�s)����5�;�4��W��-�;�*�;r ri)r:�typingrrrrrr�pip._internal.exceptionsr	r
r�pip._internal.utils.miscrr
rrl�
STRONG_HASHESrrirgr r�<module>rtsI���J�J�Q�Q�0��� �
�
�
/�
�l
�l
�^;�F�;r python3.12/site-packages/pip/_internal/utils/__pycache__/setuptools_build.cpython-312.pyc000064400000010762151732701260025341 0ustar00�

R`iS��L�ddlZddlZddlmZmZmZejd�j�Z			dde	deee	de
de
dee	f
d	�Zde	dee	d
ee	de	dee	f
d�Zde	dee	dee	fd
�Z
de	dee	de
dee	dee	de
dee	fd�Zde	dee	de
dee	fd�Zy)�N)�List�Optional�Sequenceah
    exec(compile('''
    # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
    #
    # - It imports setuptools before invoking setup.py, to enable projects that directly
    #   import from `distutils.core` to work with newer packaging standards.
    # - It provides a clear error message when setuptools is not installed.
    # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
    #   setuptools doesn't think the script is `-c`. This avoids the following warning:
    #     manifest_maker: standard file '-c' not found".
    # - It generates a shim setup.py, for handling setup.cfg-only projects.
    import os, sys, tokenize

    try:
        import setuptools
    except ImportError as error:
        print(
            "ERROR: Can not execute `setup.py` since setuptools is not available in "
            "the build environment.",
            file=sys.stderr,
        )
        sys.exit(1)

    __file__ = %r
    sys.argv[0] = __file__

    if os.path.exists(__file__):
        filename = __file__
        with tokenize.open(__file__) as f:
            setup_py_code = f.read()
    else:
        filename = "<auto-generated setuptools caller>"
        setup_py_code = "from setuptools import setup; setup()"

    exec(compile(setup_py_code, filename, "exec"))
    ''' % ({!r},), "<pip-setuptools-caller>", "exec"))
    �
setup_py_path�global_options�no_user_config�unbuffered_output�returnc��tjg}|r|dgz
}|dtj|�gz
}|r||z
}|r|dgz
}|S)ao
    Get setuptools command arguments with shim wrapped setup file invocation.

    :param setup_py_path: The path to setup.py to be wrapped.
    :param global_options: Additional global options.
    :param no_user_config: If True, disables personal user configuration.
    :param unbuffered_output: If True, adds the unbuffered switch to the
     argument list.
    z-uz-cz
--no-user-cfg)�sys�
executable�_SETUPTOOLS_SHIM�format)rrrr	�argss     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/setuptools_build.py�make_setuptools_shim_argsr1s[��
�N�N��D��������T�#�*�*�=�9�:�:�D���������!�!���K��
build_options�destination_dirc�<�t||d��}|dd|gz
}||z
}|S)NT�rr	�bdist_wheelz-d�r)rrrrrs     r� make_setuptools_bdist_wheel_argsrKs7��%��n���D�	�]�D�/�2�2�D��M��D��Krc�0�t||d��}|ddgz
}|S)NTr�cleanz--allr)rrrs   r�make_setuptools_clean_argsr]s+��%��n���D�	�W�g���D��Kr�prefix�home�
use_user_sitec�r�|r|rJ�t|||��}|ddgz
}|r|d|gz
}|�|d|gz
}|r|ddgz
}|S)N)rr�developz	--no-depsz--prefixz
--install-dirz--userz	--prefix=r)rrrrrr rs       r�make_setuptools_develop_argsr#hsq���&�)�)�$��%�%��D�	�Y��$�$�D�
���V�$�$������$�'�'�����;�'�'���Kr�egg_info_dirc�>�t||��}|dgz
}|r|d|gz
}|S)N)r�egg_infoz
--egg-baser)rr$rrs    r�make_setuptools_egg_info_argsr'�s3��
%�]�>�R�D��Z�L��D����|�,�,���Kr)NFF)r�textwrap�typingrrr�dedent�rstripr�str�boolrrrr#r'�rr�<module>r/sr��
��+�+�
#�8�?�?�$�&�L	�&�(�M�V/3� �#�	����X�c�]�+�����	�

�#�Y��4����S�M���C�=���	�

�#�Y��$����S�M��
�#�Y������S�M���	�

�S�M���3�-�
���
�#�Y��<����3�-����
�#�Y�	rpython3.12/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-312.pyc000064400000001330151732701270023525 0ustar00�

R`i���(�dZddlZdedededefd�Zy)z.For when pip wants to check the date or time.
�N�year�month�day�returnc�v�tjj�}tj|||�}||kDS)N)�datetime�date�today)rrrr
�givens     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/datetime.py�today_is_later_thanr
s0���M�M���!�E��M�M�$��s�+�E��5�=��)�__doc__r�int�boolr
�rr�<module>rs0�����c��#��C��D�rpython3.12/site-packages/pip/_internal/utils/__pycache__/models.cpython-312.pyc000064400000005304151732701270023221 0ustar00�

R`i���8�dZddlZddlmZmZmZGd�d�Zy)zUtilities for defining models
�N)�Any�Callable�Typec��eZdZdZddgZdededddfd�Zdefd	�Z	d
ede
fd�Zd
ede
fd�Zd
ede
fd
�Z
d
ede
fd�Zd
ede
fd�Zd
edeeege
fde
fd�Zy)�KeyBasedCompareMixinz7Provides comparison capabilities that is based on a key�_compare_key�_defining_class�key�defining_class�returnNc� �||_||_y�N)rr	)�selfr
rs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/models.py�__init__zKeyBasedCompareMixin.__init__
s�����-���c�,�t|j�Sr)�hashr)rs r�__hash__zKeyBasedCompareMixin.__hash__s���D�%�%�&�&r�otherc�B�|j|tj�Sr)�_compare�operator�__lt__�rrs  rrzKeyBasedCompareMixin.__lt__����}�}�U�H�O�O�4�4rc�B�|j|tj�Sr)rr�__le__rs  rrzKeyBasedCompareMixin.__le__rrc�B�|j|tj�Sr)rr�__gt__rs  rr zKeyBasedCompareMixin.__gt__rrc�B�|j|tj�Sr)rr�__ge__rs  rr"zKeyBasedCompareMixin.__ge__rrc�B�|j|tj�Sr)rr�__eq__rs  rr$zKeyBasedCompareMixin.__eq__ rr�methodc�t�t||j�stS||j|j�Sr)�
isinstancer	�NotImplementedr)rrr%s   rrzKeyBasedCompareMixin._compare#s1���%��!5�!5�6�!�!��d�'�'��);�);�<�<r)�__name__�
__module__�__qualname__�__doc__�	__slots__rrr�intr�boolrrr r"r$rr�rrrrs���A��!2�3�I�.�C�.��6L�1M�.�RV�.�'�#�'�5�C�5�D�5�5�C�5�D�5�5�C�5�D�5�5�C�5�D�5�5�C�5�D�5�=�c�=�8�S�#�J��4D�+E�=�$�=rr)r,r�typingrrrrr0rr�<module>r2s����&�&�=�=rpython3.12/site-packages/pip/_internal/utils/datetime.py000064400000000362151732701270017170 0ustar00"""For when pip wants to check the date or time.
"""

import datetime


def today_is_later_than(year: int, month: int, day: int) -> bool:
    today = datetime.date.today()
    given = datetime.date(year, month, day)

    return today > given
python3.12/site-packages/pip/_internal/utils/direct_url_helpers.py000064400000006206151732701270021255 0ustar00from typing import Optional

from pip._internal.models.direct_url import ArchiveInfo, DirectUrl, DirInfo, VcsInfo
from pip._internal.models.link import Link
from pip._internal.utils.urls import path_to_url
from pip._internal.vcs import vcs


def direct_url_as_pep440_direct_reference(direct_url: DirectUrl, name: str) -> str:
    """Convert a DirectUrl to a pip requirement string."""
    direct_url.validate()  # if invalid, this is a pip bug
    requirement = name + " @ "
    fragments = []
    if isinstance(direct_url.info, VcsInfo):
        requirement += "{}+{}@{}".format(
            direct_url.info.vcs, direct_url.url, direct_url.info.commit_id
        )
    elif isinstance(direct_url.info, ArchiveInfo):
        requirement += direct_url.url
        if direct_url.info.hash:
            fragments.append(direct_url.info.hash)
    else:
        assert isinstance(direct_url.info, DirInfo)
        requirement += direct_url.url
    if direct_url.subdirectory:
        fragments.append("subdirectory=" + direct_url.subdirectory)
    if fragments:
        requirement += "#" + "&".join(fragments)
    return requirement


def direct_url_for_editable(source_dir: str) -> DirectUrl:
    return DirectUrl(
        url=path_to_url(source_dir),
        info=DirInfo(editable=True),
    )


def direct_url_from_link(
    link: Link, source_dir: Optional[str] = None, link_is_in_wheel_cache: bool = False
) -> DirectUrl:
    if link.is_vcs:
        vcs_backend = vcs.get_backend_for_scheme(link.scheme)
        assert vcs_backend
        url, requested_revision, _ = vcs_backend.get_url_rev_and_auth(
            link.url_without_fragment
        )
        # For VCS links, we need to find out and add commit_id.
        if link_is_in_wheel_cache:
            # If the requested VCS link corresponds to a cached
            # wheel, it means the requested revision was an
            # immutable commit hash, otherwise it would not have
            # been cached. In that case we don't have a source_dir
            # with the VCS checkout.
            assert requested_revision
            commit_id = requested_revision
        else:
            # If the wheel was not in cache, it means we have
            # had to checkout from VCS to build and we have a source_dir
            # which we can inspect to find out the commit id.
            assert source_dir
            commit_id = vcs_backend.get_revision(source_dir)
        return DirectUrl(
            url=url,
            info=VcsInfo(
                vcs=vcs_backend.name,
                commit_id=commit_id,
                requested_revision=requested_revision,
            ),
            subdirectory=link.subdirectory_fragment,
        )
    elif link.is_existing_dir():
        return DirectUrl(
            url=link.url_without_fragment,
            info=DirInfo(),
            subdirectory=link.subdirectory_fragment,
        )
    else:
        hash = None
        hash_name = link.hash_name
        if hash_name:
            hash = f"{hash_name}={link.hash}"
        return DirectUrl(
            url=link.url_without_fragment,
            info=ArchiveInfo(hash=hash),
            subdirectory=link.subdirectory_fragment,
        )
python3.12/site-packages/pip/_internal/utils/temp_dir.py000064400000022140151732701300017167 0ustar00import errno
import itertools
import logging
import os.path
import tempfile
import traceback
from contextlib import ExitStack, contextmanager
from pathlib import Path
from typing import (
    Any,
    Callable,
    Dict,
    Generator,
    List,
    Optional,
    TypeVar,
    Union,
)

from pip._internal.utils.misc import enum, rmtree

logger = logging.getLogger(__name__)

_T = TypeVar("_T", bound="TempDirectory")


# Kinds of temporary directories. Only needed for ones that are
# globally-managed.
tempdir_kinds = enum(
    BUILD_ENV="build-env",
    EPHEM_WHEEL_CACHE="ephem-wheel-cache",
    REQ_BUILD="req-build",
)


_tempdir_manager: Optional[ExitStack] = None


@contextmanager
def global_tempdir_manager() -> Generator[None, None, None]:
    global _tempdir_manager
    with ExitStack() as stack:
        old_tempdir_manager, _tempdir_manager = _tempdir_manager, stack
        try:
            yield
        finally:
            _tempdir_manager = old_tempdir_manager


class TempDirectoryTypeRegistry:
    """Manages temp directory behavior"""

    def __init__(self) -> None:
        self._should_delete: Dict[str, bool] = {}

    def set_delete(self, kind: str, value: bool) -> None:
        """Indicate whether a TempDirectory of the given kind should be
        auto-deleted.
        """
        self._should_delete[kind] = value

    def get_delete(self, kind: str) -> bool:
        """Get configured auto-delete flag for a given TempDirectory type,
        default True.
        """
        return self._should_delete.get(kind, True)


_tempdir_registry: Optional[TempDirectoryTypeRegistry] = None


@contextmanager
def tempdir_registry() -> Generator[TempDirectoryTypeRegistry, None, None]:
    """Provides a scoped global tempdir registry that can be used to dictate
    whether directories should be deleted.
    """
    global _tempdir_registry
    old_tempdir_registry = _tempdir_registry
    _tempdir_registry = TempDirectoryTypeRegistry()
    try:
        yield _tempdir_registry
    finally:
        _tempdir_registry = old_tempdir_registry


class _Default:
    pass


_default = _Default()


class TempDirectory:
    """Helper class that owns and cleans up a temporary directory.

    This class can be used as a context manager or as an OO representation of a
    temporary directory.

    Attributes:
        path
            Location to the created temporary directory
        delete
            Whether the directory should be deleted when exiting
            (when used as a contextmanager)

    Methods:
        cleanup()
            Deletes the temporary directory

    When used as a context manager, if the delete attribute is True, on
    exiting the context the temporary directory is deleted.
    """

    def __init__(
        self,
        path: Optional[str] = None,
        delete: Union[bool, None, _Default] = _default,
        kind: str = "temp",
        globally_managed: bool = False,
        ignore_cleanup_errors: bool = True,
    ):
        super().__init__()

        if delete is _default:
            if path is not None:
                # If we were given an explicit directory, resolve delete option
                # now.
                delete = False
            else:
                # Otherwise, we wait until cleanup and see what
                # tempdir_registry says.
                delete = None

        # The only time we specify path is in for editables where it
        # is the value of the --src option.
        if path is None:
            path = self._create(kind)

        self._path = path
        self._deleted = False
        self.delete = delete
        self.kind = kind
        self.ignore_cleanup_errors = ignore_cleanup_errors

        if globally_managed:
            assert _tempdir_manager is not None
            _tempdir_manager.enter_context(self)

    @property
    def path(self) -> str:
        assert not self._deleted, f"Attempted to access deleted path: {self._path}"
        return self._path

    def __repr__(self) -> str:
        return f"<{self.__class__.__name__} {self.path!r}>"

    def __enter__(self: _T) -> _T:
        return self

    def __exit__(self, exc: Any, value: Any, tb: Any) -> None:
        if self.delete is not None:
            delete = self.delete
        elif _tempdir_registry:
            delete = _tempdir_registry.get_delete(self.kind)
        else:
            delete = True

        if delete:
            self.cleanup()

    def _create(self, kind: str) -> str:
        """Create a temporary directory and store its path in self.path"""
        # We realpath here because some systems have their default tmpdir
        # symlinked to another directory.  This tends to confuse build
        # scripts, so we canonicalize the path by traversing potential
        # symlinks here.
        path = os.path.realpath(tempfile.mkdtemp(prefix=f"pip-{kind}-"))
        logger.debug("Created temporary directory: %s", path)
        return path

    def cleanup(self) -> None:
        """Remove the temporary directory created and reset state"""
        self._deleted = True
        if not os.path.exists(self._path):
            return

        errors: List[BaseException] = []

        def onerror(
            func: Callable[..., Any],
            path: Path,
            exc_val: BaseException,
        ) -> None:
            """Log a warning for a `rmtree` error and continue"""
            formatted_exc = "\n".join(
                traceback.format_exception_only(type(exc_val), exc_val)
            )
            formatted_exc = formatted_exc.rstrip()  # remove trailing new line
            if func in (os.unlink, os.remove, os.rmdir):
                logger.debug(
                    "Failed to remove a temporary file '%s' due to %s.\n",
                    path,
                    formatted_exc,
                )
            else:
                logger.debug("%s failed with %s.", func.__qualname__, formatted_exc)
            errors.append(exc_val)

        if self.ignore_cleanup_errors:
            try:
                # first try with tenacity; retrying to handle ephemeral errors
                rmtree(self._path, ignore_errors=False)
            except OSError:
                # last pass ignore/log all errors
                rmtree(self._path, onexc=onerror)
            if errors:
                logger.warning(
                    "Failed to remove contents in a temporary directory '%s'.\n"
                    "You can safely remove it manually.",
                    self._path,
                )
        else:
            rmtree(self._path)


class AdjacentTempDirectory(TempDirectory):
    """Helper class that creates a temporary directory adjacent to a real one.

    Attributes:
        original
            The original directory to create a temp directory for.
        path
            After calling create() or entering, contains the full
            path to the temporary directory.
        delete
            Whether the directory should be deleted when exiting
            (when used as a contextmanager)

    """

    # The characters that may be used to name the temp directory
    # We always prepend a ~ and then rotate through these until
    # a usable name is found.
    # pkg_resources raises a different error for .dist-info folder
    # with leading '-' and invalid metadata
    LEADING_CHARS = "-~.=%0123456789"

    def __init__(self, original: str, delete: Optional[bool] = None) -> None:
        self.original = original.rstrip("/\\")
        super().__init__(delete=delete)

    @classmethod
    def _generate_names(cls, name: str) -> Generator[str, None, None]:
        """Generates a series of temporary names.

        The algorithm replaces the leading characters in the name
        with ones that are valid filesystem characters, but are not
        valid package names (for both Python and pip definitions of
        package).
        """
        for i in range(1, len(name)):
            for candidate in itertools.combinations_with_replacement(
                cls.LEADING_CHARS, i - 1
            ):
                new_name = "~" + "".join(candidate) + name[i:]
                if new_name != name:
                    yield new_name

        # If we make it this far, we will have to make a longer name
        for i in range(len(cls.LEADING_CHARS)):
            for candidate in itertools.combinations_with_replacement(
                cls.LEADING_CHARS, i
            ):
                new_name = "~" + "".join(candidate) + name
                if new_name != name:
                    yield new_name

    def _create(self, kind: str) -> str:
        root, name = os.path.split(self.original)
        for candidate in self._generate_names(name):
            path = os.path.join(root, candidate)
            try:
                os.mkdir(path)
            except OSError as ex:
                # Continue if the name exists already
                if ex.errno != errno.EEXIST:
                    raise
            else:
                path = os.path.realpath(path)
                break
        else:
            # Final fallback on the default behavior.
            path = os.path.realpath(tempfile.mkdtemp(prefix=f"pip-{kind}-"))

        logger.debug("Created temporary directory: %s", path)
        return path
python3.12/site-packages/pip/_internal/utils/compatibility_tags.py000064400000012401151732701300021252 0ustar00"""Generate and work with PEP 425 Compatibility Tags.
"""

import re
from typing import List, Optional, Tuple

from pip._vendor.packaging.tags import (
    PythonVersion,
    Tag,
    compatible_tags,
    cpython_tags,
    generic_tags,
    interpreter_name,
    interpreter_version,
    mac_platforms,
)

_osx_arch_pat = re.compile(r"(.+)_(\d+)_(\d+)_(.+)")


def version_info_to_nodot(version_info: Tuple[int, ...]) -> str:
    # Only use up to the first two numbers.
    return "".join(map(str, version_info[:2]))


def _mac_platforms(arch: str) -> List[str]:
    match = _osx_arch_pat.match(arch)
    if match:
        name, major, minor, actual_arch = match.groups()
        mac_version = (int(major), int(minor))
        arches = [
            # Since we have always only checked that the platform starts
            # with "macosx", for backwards-compatibility we extract the
            # actual prefix provided by the user in case they provided
            # something like "macosxcustom_". It may be good to remove
            # this as undocumented or deprecate it in the future.
            "{}_{}".format(name, arch[len("macosx_") :])
            for arch in mac_platforms(mac_version, actual_arch)
        ]
    else:
        # arch pattern didn't match (?!)
        arches = [arch]
    return arches


def _custom_manylinux_platforms(arch: str) -> List[str]:
    arches = [arch]
    arch_prefix, arch_sep, arch_suffix = arch.partition("_")
    if arch_prefix == "manylinux2014":
        # manylinux1/manylinux2010 wheels run on most manylinux2014 systems
        # with the exception of wheels depending on ncurses. PEP 599 states
        # manylinux1/manylinux2010 wheels should be considered
        # manylinux2014 wheels:
        # https://www.python.org/dev/peps/pep-0599/#backwards-compatibility-with-manylinux2010-wheels
        if arch_suffix in {"i686", "x86_64"}:
            arches.append("manylinux2010" + arch_sep + arch_suffix)
            arches.append("manylinux1" + arch_sep + arch_suffix)
    elif arch_prefix == "manylinux2010":
        # manylinux1 wheels run on most manylinux2010 systems with the
        # exception of wheels depending on ncurses. PEP 571 states
        # manylinux1 wheels should be considered manylinux2010 wheels:
        # https://www.python.org/dev/peps/pep-0571/#backwards-compatibility-with-manylinux1-wheels
        arches.append("manylinux1" + arch_sep + arch_suffix)
    return arches


def _get_custom_platforms(arch: str) -> List[str]:
    arch_prefix, arch_sep, arch_suffix = arch.partition("_")
    if arch.startswith("macosx"):
        arches = _mac_platforms(arch)
    elif arch_prefix in ["manylinux2014", "manylinux2010"]:
        arches = _custom_manylinux_platforms(arch)
    else:
        arches = [arch]
    return arches


def _expand_allowed_platforms(platforms: Optional[List[str]]) -> Optional[List[str]]:
    if not platforms:
        return None

    seen = set()
    result = []

    for p in platforms:
        if p in seen:
            continue
        additions = [c for c in _get_custom_platforms(p) if c not in seen]
        seen.update(additions)
        result.extend(additions)

    return result


def _get_python_version(version: str) -> PythonVersion:
    if len(version) > 1:
        return int(version[0]), int(version[1:])
    else:
        return (int(version[0]),)


def _get_custom_interpreter(
    implementation: Optional[str] = None, version: Optional[str] = None
) -> str:
    if implementation is None:
        implementation = interpreter_name()
    if version is None:
        version = interpreter_version()
    return f"{implementation}{version}"


def get_supported(
    version: Optional[str] = None,
    platforms: Optional[List[str]] = None,
    impl: Optional[str] = None,
    abis: Optional[List[str]] = None,
) -> List[Tag]:
    """Return a list of supported tags for each version specified in
    `versions`.

    :param version: a string version, of the form "33" or "32",
        or None. The version will be assumed to support our ABI.
    :param platform: specify a list of platforms you want valid
        tags for, or None. If None, use the local system platform.
    :param impl: specify the exact implementation you want valid
        tags for, or None. If None, use the local interpreter impl.
    :param abis: specify a list of abis you want valid
        tags for, or None. If None, use the local interpreter abi.
    """
    supported: List[Tag] = []

    python_version: Optional[PythonVersion] = None
    if version is not None:
        python_version = _get_python_version(version)

    interpreter = _get_custom_interpreter(impl, version)

    platforms = _expand_allowed_platforms(platforms)

    is_cpython = (impl or interpreter_name()) == "cp"
    if is_cpython:
        supported.extend(
            cpython_tags(
                python_version=python_version,
                abis=abis,
                platforms=platforms,
            )
        )
    else:
        supported.extend(
            generic_tags(
                interpreter=interpreter,
                abis=abis,
                platforms=platforms,
            )
        )
    supported.extend(
        compatible_tags(
            python_version=python_version,
            interpreter=interpreter,
            platforms=platforms,
        )
    )

    return supported
python3.12/site-packages/pip/_internal/utils/appdirs.py000064400000003201151732701310017024 0ustar00"""
This code wraps the vendored appdirs module to so the return values are
compatible for the current pip code base.

The intention is to rewrite current usages gradually, keeping the tests pass,
and eventually drop this after all usages are changed.
"""

import os
import sys
from typing import List

from pip._vendor import platformdirs as _appdirs


def user_cache_dir(appname: str) -> str:
    return _appdirs.user_cache_dir(appname, appauthor=False)


def _macos_user_config_dir(appname: str, roaming: bool = True) -> str:
    # Use ~/Application Support/pip, if the directory exists.
    path = _appdirs.user_data_dir(appname, appauthor=False, roaming=roaming)
    if os.path.isdir(path):
        return path

    # Use a Linux-like ~/.config/pip, by default.
    linux_like_path = "~/.config/"
    if appname:
        linux_like_path = os.path.join(linux_like_path, appname)

    return os.path.expanduser(linux_like_path)


def user_config_dir(appname: str, roaming: bool = True) -> str:
    if sys.platform == "darwin":
        return _macos_user_config_dir(appname, roaming)

    return _appdirs.user_config_dir(appname, appauthor=False, roaming=roaming)


# for the discussion regarding site_config_dir locations
# see <https://github.com/pypa/pip/issues/1733>
def site_config_dirs(appname: str) -> List[str]:
    if sys.platform == "darwin":
        return [_appdirs.site_data_dir(appname, appauthor=False, multipath=True)]

    dirval = _appdirs.site_config_dir(appname, appauthor=False, multipath=True)
    if sys.platform == "win32":
        return [dirval]

    # Unix-y system. Look in /etc as well.
    return dirval.split(os.pathsep) + ["/etc"]
python3.12/site-packages/pip/_internal/utils/subprocess.py000064400000021767151732701310017573 0ustar00import logging
import os
import shlex
import subprocess
from typing import (
    TYPE_CHECKING,
    Any,
    Callable,
    Iterable,
    List,
    Mapping,
    Optional,
    Union,
)

from pip._vendor.rich.markup import escape

from pip._internal.cli.spinners import SpinnerInterface, open_spinner
from pip._internal.exceptions import InstallationSubprocessError
from pip._internal.utils.logging import VERBOSE, subprocess_logger
from pip._internal.utils.misc import HiddenText

if TYPE_CHECKING:
    # Literal was introduced in Python 3.8.
    #
    # TODO: Remove `if TYPE_CHECKING` when dropping support for Python 3.7.
    from typing import Literal

CommandArgs = List[Union[str, HiddenText]]


def make_command(*args: Union[str, HiddenText, CommandArgs]) -> CommandArgs:
    """
    Create a CommandArgs object.
    """
    command_args: CommandArgs = []
    for arg in args:
        # Check for list instead of CommandArgs since CommandArgs is
        # only known during type-checking.
        if isinstance(arg, list):
            command_args.extend(arg)
        else:
            # Otherwise, arg is str or HiddenText.
            command_args.append(arg)

    return command_args


def format_command_args(args: Union[List[str], CommandArgs]) -> str:
    """
    Format command arguments for display.
    """
    # For HiddenText arguments, display the redacted form by calling str().
    # Also, we don't apply str() to arguments that aren't HiddenText since
    # this can trigger a UnicodeDecodeError in Python 2 if the argument
    # has type unicode and includes a non-ascii character.  (The type
    # checker doesn't ensure the annotations are correct in all cases.)
    return " ".join(
        shlex.quote(str(arg)) if isinstance(arg, HiddenText) else shlex.quote(arg)
        for arg in args
    )


def reveal_command_args(args: Union[List[str], CommandArgs]) -> List[str]:
    """
    Return the arguments in their raw, unredacted form.
    """
    return [arg.secret if isinstance(arg, HiddenText) else arg for arg in args]


def call_subprocess(
    cmd: Union[List[str], CommandArgs],
    show_stdout: bool = False,
    cwd: Optional[str] = None,
    on_returncode: 'Literal["raise", "warn", "ignore"]' = "raise",
    extra_ok_returncodes: Optional[Iterable[int]] = None,
    extra_environ: Optional[Mapping[str, Any]] = None,
    unset_environ: Optional[Iterable[str]] = None,
    spinner: Optional[SpinnerInterface] = None,
    log_failed_cmd: Optional[bool] = True,
    stdout_only: Optional[bool] = False,
    *,
    command_desc: str,
) -> str:
    """
    Args:
      show_stdout: if true, use INFO to log the subprocess's stderr and
        stdout streams.  Otherwise, use DEBUG.  Defaults to False.
      extra_ok_returncodes: an iterable of integer return codes that are
        acceptable, in addition to 0. Defaults to None, which means [].
      unset_environ: an iterable of environment variable names to unset
        prior to calling subprocess.Popen().
      log_failed_cmd: if false, failed commands are not logged, only raised.
      stdout_only: if true, return only stdout, else return both. When true,
        logging of both stdout and stderr occurs when the subprocess has
        terminated, else logging occurs as subprocess output is produced.
    """
    if extra_ok_returncodes is None:
        extra_ok_returncodes = []
    if unset_environ is None:
        unset_environ = []
    # Most places in pip use show_stdout=False. What this means is--
    #
    # - We connect the child's output (combined stderr and stdout) to a
    #   single pipe, which we read.
    # - We log this output to stderr at DEBUG level as it is received.
    # - If DEBUG logging isn't enabled (e.g. if --verbose logging wasn't
    #   requested), then we show a spinner so the user can still see the
    #   subprocess is in progress.
    # - If the subprocess exits with an error, we log the output to stderr
    #   at ERROR level if it hasn't already been displayed to the console
    #   (e.g. if --verbose logging wasn't enabled).  This way we don't log
    #   the output to the console twice.
    #
    # If show_stdout=True, then the above is still done, but with DEBUG
    # replaced by INFO.
    if show_stdout:
        # Then log the subprocess output at INFO level.
        log_subprocess: Callable[..., None] = subprocess_logger.info
        used_level = logging.INFO
    else:
        # Then log the subprocess output using VERBOSE.  This also ensures
        # it will be logged to the log file (aka user_log), if enabled.
        log_subprocess = subprocess_logger.verbose
        used_level = VERBOSE

    # Whether the subprocess will be visible in the console.
    showing_subprocess = subprocess_logger.getEffectiveLevel() <= used_level

    # Only use the spinner if we're not showing the subprocess output
    # and we have a spinner.
    use_spinner = not showing_subprocess and spinner is not None

    log_subprocess("Running command %s", command_desc)
    env = os.environ.copy()
    if extra_environ:
        env.update(extra_environ)
    for name in unset_environ:
        env.pop(name, None)
    try:
        proc = subprocess.Popen(
            # Convert HiddenText objects to the underlying str.
            reveal_command_args(cmd),
            stdin=subprocess.PIPE,
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT if not stdout_only else subprocess.PIPE,
            cwd=cwd,
            env=env,
            errors="backslashreplace",
        )
    except Exception as exc:
        if log_failed_cmd:
            subprocess_logger.critical(
                "Error %s while executing command %s",
                exc,
                command_desc,
            )
        raise
    all_output = []
    if not stdout_only:
        assert proc.stdout
        assert proc.stdin
        proc.stdin.close()
        # In this mode, stdout and stderr are in the same pipe.
        while True:
            line: str = proc.stdout.readline()
            if not line:
                break
            line = line.rstrip()
            all_output.append(line + "\n")

            # Show the line immediately.
            log_subprocess(line)
            # Update the spinner.
            if use_spinner:
                assert spinner
                spinner.spin()
        try:
            proc.wait()
        finally:
            if proc.stdout:
                proc.stdout.close()
        output = "".join(all_output)
    else:
        # In this mode, stdout and stderr are in different pipes.
        # We must use communicate() which is the only safe way to read both.
        out, err = proc.communicate()
        # log line by line to preserve pip log indenting
        for out_line in out.splitlines():
            log_subprocess(out_line)
        all_output.append(out)
        for err_line in err.splitlines():
            log_subprocess(err_line)
        all_output.append(err)
        output = out

    proc_had_error = proc.returncode and proc.returncode not in extra_ok_returncodes
    if use_spinner:
        assert spinner
        if proc_had_error:
            spinner.finish("error")
        else:
            spinner.finish("done")
    if proc_had_error:
        if on_returncode == "raise":
            error = InstallationSubprocessError(
                command_description=command_desc,
                exit_code=proc.returncode,
                output_lines=all_output if not showing_subprocess else None,
            )
            if log_failed_cmd:
                subprocess_logger.error("%s", error, extra={"rich": True})
                subprocess_logger.verbose(
                    "[bold magenta]full command[/]: [blue]%s[/]",
                    escape(format_command_args(cmd)),
                    extra={"markup": True},
                )
                subprocess_logger.verbose(
                    "[bold magenta]cwd[/]: %s",
                    escape(cwd or "[inherit]"),
                    extra={"markup": True},
                )

            raise error
        elif on_returncode == "warn":
            subprocess_logger.warning(
                'Command "%s" had error code %s in %s',
                command_desc,
                proc.returncode,
                cwd,
            )
        elif on_returncode == "ignore":
            pass
        else:
            raise ValueError(f"Invalid value: on_returncode={on_returncode!r}")
    return output


def runner_with_spinner_message(message: str) -> Callable[..., None]:
    """Provide a subprocess_runner that shows a spinner message.

    Intended for use with for BuildBackendHookCaller. Thus, the runner has
    an API that matches what's expected by BuildBackendHookCaller.subprocess_runner.
    """

    def runner(
        cmd: List[str],
        cwd: Optional[str] = None,
        extra_environ: Optional[Mapping[str, Any]] = None,
    ) -> None:
        with open_spinner(message) as spinner:
            call_subprocess(
                cmd,
                command_desc=message,
                cwd=cwd,
                extra_environ=extra_environ,
                spinner=spinner,
            )

    return runner
python3.12/site-packages/pip/_internal/utils/wheel.py000064400000010705151732701320016476 0ustar00"""Support functions for working with wheel files.
"""

import logging
from email.message import Message
from email.parser import Parser
from typing import Tuple
from zipfile import BadZipFile, ZipFile

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.exceptions import UnsupportedWheel

VERSION_COMPATIBLE = (1, 0)


logger = logging.getLogger(__name__)


def parse_wheel(wheel_zip: ZipFile, name: str) -> Tuple[str, Message]:
    """Extract information from the provided wheel, ensuring it meets basic
    standards.

    Returns the name of the .dist-info directory and the parsed WHEEL metadata.
    """
    try:
        info_dir = wheel_dist_info_dir(wheel_zip, name)
        metadata = wheel_metadata(wheel_zip, info_dir)
        version = wheel_version(metadata)
    except UnsupportedWheel as e:
        raise UnsupportedWheel("{} has an invalid wheel, {}".format(name, str(e)))

    check_compatibility(version, name)

    return info_dir, metadata


def wheel_dist_info_dir(source: ZipFile, name: str) -> str:
    """Returns the name of the contained .dist-info directory.

    Raises AssertionError or UnsupportedWheel if not found, >1 found, or
    it doesn't match the provided name.
    """
    # Zip file path separators must be /
    subdirs = {p.split("/", 1)[0] for p in source.namelist()}

    info_dirs = [s for s in subdirs if s.endswith(".dist-info")]

    if not info_dirs:
        raise UnsupportedWheel(".dist-info directory not found")

    if len(info_dirs) > 1:
        raise UnsupportedWheel(
            "multiple .dist-info directories found: {}".format(", ".join(info_dirs))
        )

    info_dir = info_dirs[0]

    info_dir_name = canonicalize_name(info_dir)
    canonical_name = canonicalize_name(name)
    if not info_dir_name.startswith(canonical_name):
        raise UnsupportedWheel(
            ".dist-info directory {!r} does not start with {!r}".format(
                info_dir, canonical_name
            )
        )

    return info_dir


def read_wheel_metadata_file(source: ZipFile, path: str) -> bytes:
    try:
        return source.read(path)
        # BadZipFile for general corruption, KeyError for missing entry,
        # and RuntimeError for password-protected files
    except (BadZipFile, KeyError, RuntimeError) as e:
        raise UnsupportedWheel(f"could not read {path!r} file: {e!r}")


def wheel_metadata(source: ZipFile, dist_info_dir: str) -> Message:
    """Return the WHEEL metadata of an extracted wheel, if possible.
    Otherwise, raise UnsupportedWheel.
    """
    path = f"{dist_info_dir}/WHEEL"
    # Zip file path separators must be /
    wheel_contents = read_wheel_metadata_file(source, path)

    try:
        wheel_text = wheel_contents.decode()
    except UnicodeDecodeError as e:
        raise UnsupportedWheel(f"error decoding {path!r}: {e!r}")

    # FeedParser (used by Parser) does not raise any exceptions. The returned
    # message may have .defects populated, but for backwards-compatibility we
    # currently ignore them.
    return Parser().parsestr(wheel_text)


def wheel_version(wheel_data: Message) -> Tuple[int, ...]:
    """Given WHEEL metadata, return the parsed Wheel-Version.
    Otherwise, raise UnsupportedWheel.
    """
    version_text = wheel_data["Wheel-Version"]
    if version_text is None:
        raise UnsupportedWheel("WHEEL is missing Wheel-Version")

    version = version_text.strip()

    try:
        return tuple(map(int, version.split(".")))
    except ValueError:
        raise UnsupportedWheel(f"invalid Wheel-Version: {version!r}")


def check_compatibility(version: Tuple[int, ...], name: str) -> None:
    """Raises errors or warns if called with an incompatible Wheel-Version.

    pip should refuse to install a Wheel-Version that's a major series
    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
    installing a version only minor version ahead (e.g 1.2 > 1.1).

    version: a 2-tuple representing a Wheel-Version (Major, Minor)
    name: name of wheel or package to raise exception about

    :raises UnsupportedWheel: when an incompatible Wheel-Version is given
    """
    if version[0] > VERSION_COMPATIBLE[0]:
        raise UnsupportedWheel(
            "{}'s Wheel-Version ({}) is not compatible with this version "
            "of pip".format(name, ".".join(map(str, version)))
        )
    elif version > VERSION_COMPATIBLE:
        logger.warning(
            "Installing from a newer Wheel-Version (%s)",
            ".".join(map(str, version)),
        )
python3.12/site-packages/pip/_internal/utils/_log.py000064400000001767151732701320016322 0ustar00"""Customize logging

Defines custom logger class for the `logger.verbose(...)` method.

init_logging() must be called before any other modules that call logging.getLogger.
"""

import logging
from typing import Any, cast

# custom log level for `--verbose` output
# between DEBUG and INFO
VERBOSE = 15


class VerboseLogger(logging.Logger):
    """Custom Logger, defining a verbose log-level

    VERBOSE is between INFO and DEBUG.
    """

    def verbose(self, msg: str, *args: Any, **kwargs: Any) -> None:
        return self.log(VERBOSE, msg, *args, **kwargs)


def getLogger(name: str) -> VerboseLogger:
    """logging.getLogger, but ensures our VerboseLogger class is returned"""
    return cast(VerboseLogger, logging.getLogger(name))


def init_logging() -> None:
    """Register our VerboseLogger and VERBOSE log level.

    Should be called before any calls to getLogger(),
    i.e. in pip._internal.__init__
    """
    logging.setLoggerClass(VerboseLogger)
    logging.addLevelName(VERBOSE, "VERBOSE")
python3.12/site-packages/pip/_internal/utils/glibc.py000064400000006051151732701330016452 0ustar00import os
import sys
from typing import Optional, Tuple


def glibc_version_string() -> Optional[str]:
    "Returns glibc version string, or None if not using glibc."
    return glibc_version_string_confstr() or glibc_version_string_ctypes()


def glibc_version_string_confstr() -> Optional[str]:
    "Primary implementation of glibc_version_string using os.confstr."
    # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely
    # to be broken or missing. This strategy is used in the standard library
    # platform module:
    # https://github.com/python/cpython/blob/fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71/Lib/platform.py#L175-L183
    if sys.platform == "win32":
        return None
    try:
        gnu_libc_version = os.confstr("CS_GNU_LIBC_VERSION")
        if gnu_libc_version is None:
            return None
        # os.confstr("CS_GNU_LIBC_VERSION") returns a string like "glibc 2.17":
        _, version = gnu_libc_version.split()
    except (AttributeError, OSError, ValueError):
        # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...
        return None
    return version


def glibc_version_string_ctypes() -> Optional[str]:
    "Fallback implementation of glibc_version_string using ctypes."

    try:
        import ctypes
    except ImportError:
        return None

    # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
    # manpage says, "If filename is NULL, then the returned handle is for the
    # main program". This way we can let the linker do the work to figure out
    # which libc our process is actually using.
    process_namespace = ctypes.CDLL(None)
    try:
        gnu_get_libc_version = process_namespace.gnu_get_libc_version
    except AttributeError:
        # Symbol doesn't exist -> therefore, we are not linked to
        # glibc.
        return None

    # Call gnu_get_libc_version, which returns a string like "2.5"
    gnu_get_libc_version.restype = ctypes.c_char_p
    version_str = gnu_get_libc_version()
    # py2 / py3 compatibility:
    if not isinstance(version_str, str):
        version_str = version_str.decode("ascii")

    return version_str


# platform.libc_ver regularly returns completely nonsensical glibc
# versions. E.g. on my computer, platform says:
#
#   ~$ python2.7 -c 'import platform; print(platform.libc_ver())'
#   ('glibc', '2.7')
#   ~$ python3.5 -c 'import platform; print(platform.libc_ver())'
#   ('glibc', '2.9')
#
# But the truth is:
#
#   ~$ ldd --version
#   ldd (Debian GLIBC 2.22-11) 2.22
#
# This is unfortunate, because it means that the linehaul data on libc
# versions that was generated by pip 8.1.2 and earlier is useless and
# misleading. Solution: instead of using platform, use our code that actually
# works.
def libc_ver() -> Tuple[str, str]:
    """Try to determine the glibc version

    Returns a tuple of strings (lib, version) which default to empty strings
    in case the lookup fails.
    """
    glibc_version = glibc_version_string()
    if glibc_version is None:
        return ("", "")
    else:
        return ("glibc", glibc_version)
python3.12/site-packages/pip/_internal/utils/setuptools_build.py000064400000010523151732701330020771 0ustar00import sys
import textwrap
from typing import List, Optional, Sequence

# Shim to wrap setup.py invocation with setuptools
# Note that __file__ is handled via two {!r} *and* %r, to ensure that paths on
# Windows are correctly handled (it should be "C:\\Users" not "C:\Users").
_SETUPTOOLS_SHIM = textwrap.dedent(
    """
    exec(compile('''
    # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
    #
    # - It imports setuptools before invoking setup.py, to enable projects that directly
    #   import from `distutils.core` to work with newer packaging standards.
    # - It provides a clear error message when setuptools is not installed.
    # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
    #   setuptools doesn't think the script is `-c`. This avoids the following warning:
    #     manifest_maker: standard file '-c' not found".
    # - It generates a shim setup.py, for handling setup.cfg-only projects.
    import os, sys, tokenize

    try:
        import setuptools
    except ImportError as error:
        print(
            "ERROR: Can not execute `setup.py` since setuptools is not available in "
            "the build environment.",
            file=sys.stderr,
        )
        sys.exit(1)

    __file__ = %r
    sys.argv[0] = __file__

    if os.path.exists(__file__):
        filename = __file__
        with tokenize.open(__file__) as f:
            setup_py_code = f.read()
    else:
        filename = "<auto-generated setuptools caller>"
        setup_py_code = "from setuptools import setup; setup()"

    exec(compile(setup_py_code, filename, "exec"))
    ''' % ({!r},), "<pip-setuptools-caller>", "exec"))
    """
).rstrip()


def make_setuptools_shim_args(
    setup_py_path: str,
    global_options: Optional[Sequence[str]] = None,
    no_user_config: bool = False,
    unbuffered_output: bool = False,
) -> List[str]:
    """
    Get setuptools command arguments with shim wrapped setup file invocation.

    :param setup_py_path: The path to setup.py to be wrapped.
    :param global_options: Additional global options.
    :param no_user_config: If True, disables personal user configuration.
    :param unbuffered_output: If True, adds the unbuffered switch to the
     argument list.
    """
    args = [sys.executable]
    if unbuffered_output:
        args += ["-u"]
    args += ["-c", _SETUPTOOLS_SHIM.format(setup_py_path)]
    if global_options:
        args += global_options
    if no_user_config:
        args += ["--no-user-cfg"]
    return args


def make_setuptools_bdist_wheel_args(
    setup_py_path: str,
    global_options: Sequence[str],
    build_options: Sequence[str],
    destination_dir: str,
) -> List[str]:
    # NOTE: Eventually, we'd want to also -S to the flags here, when we're
    # isolating. Currently, it breaks Python in virtualenvs, because it
    # relies on site.py to find parts of the standard library outside the
    # virtualenv.
    args = make_setuptools_shim_args(
        setup_py_path, global_options=global_options, unbuffered_output=True
    )
    args += ["bdist_wheel", "-d", destination_dir]
    args += build_options
    return args


def make_setuptools_clean_args(
    setup_py_path: str,
    global_options: Sequence[str],
) -> List[str]:
    args = make_setuptools_shim_args(
        setup_py_path, global_options=global_options, unbuffered_output=True
    )
    args += ["clean", "--all"]
    return args


def make_setuptools_develop_args(
    setup_py_path: str,
    *,
    global_options: Sequence[str],
    no_user_config: bool,
    prefix: Optional[str],
    home: Optional[str],
    use_user_site: bool,
) -> List[str]:
    assert not (use_user_site and prefix)

    args = make_setuptools_shim_args(
        setup_py_path,
        global_options=global_options,
        no_user_config=no_user_config,
    )

    args += ["develop", "--no-deps"]

    if prefix:
        args += ["--prefix", prefix]
    if home is not None:
        args += ["--install-dir", home]

    if use_user_site:
        args += ["--user", "--prefix="]

    return args


def make_setuptools_egg_info_args(
    setup_py_path: str,
    egg_info_dir: Optional[str],
    no_user_config: bool,
) -> List[str]:
    args = make_setuptools_shim_args(setup_py_path, no_user_config=no_user_config)

    args += ["egg_info"]

    if egg_info_dir:
        args += ["--egg-base", egg_info_dir]

    return args
python3.12/site-packages/pip/_internal/utils/encoding.py000064400000002221151732701330017153 0ustar00import codecs
import locale
import re
import sys
from typing import List, Tuple

BOMS: List[Tuple[bytes, str]] = [
    (codecs.BOM_UTF8, "utf-8"),
    (codecs.BOM_UTF16, "utf-16"),
    (codecs.BOM_UTF16_BE, "utf-16-be"),
    (codecs.BOM_UTF16_LE, "utf-16-le"),
    (codecs.BOM_UTF32, "utf-32"),
    (codecs.BOM_UTF32_BE, "utf-32-be"),
    (codecs.BOM_UTF32_LE, "utf-32-le"),
]

ENCODING_RE = re.compile(rb"coding[:=]\s*([-\w.]+)")


def auto_decode(data: bytes) -> str:
    """Check a bytes string for a BOM to correctly detect the encoding

    Fallback to locale.getpreferredencoding(False) like open() on Python3"""
    for bom, encoding in BOMS:
        if data.startswith(bom):
            return data[len(bom) :].decode(encoding)
    # Lets check the first two lines as in PEP263
    for line in data.split(b"\n")[:2]:
        if line[0:1] == b"#" and ENCODING_RE.search(line):
            result = ENCODING_RE.search(line)
            assert result is not None
            encoding = result.groups()[0].decode("ascii")
            return data.decode(encoding)
    return data.decode(
        locale.getpreferredencoding(False) or sys.getdefaultencoding(),
    )
python3.12/site-packages/pip/_internal/utils/packaging.py000064400000004074151732701330017321 0ustar00import functools
import logging
import re
from typing import NewType, Optional, Tuple, cast

from pip._vendor.packaging import specifiers, version
from pip._vendor.packaging.requirements import Requirement

NormalizedExtra = NewType("NormalizedExtra", str)

logger = logging.getLogger(__name__)


def check_requires_python(
    requires_python: Optional[str], version_info: Tuple[int, ...]
) -> bool:
    """
    Check if the given Python version matches a "Requires-Python" specifier.

    :param version_info: A 3-tuple of ints representing a Python
        major-minor-micro version to check (e.g. `sys.version_info[:3]`).

    :return: `True` if the given Python version satisfies the requirement.
        Otherwise, return `False`.

    :raises InvalidSpecifier: If `requires_python` has an invalid format.
    """
    if requires_python is None:
        # The package provides no information
        return True
    requires_python_specifier = specifiers.SpecifierSet(requires_python)

    python_version = version.parse(".".join(map(str, version_info)))
    return python_version in requires_python_specifier


@functools.lru_cache(maxsize=512)
def get_requirement(req_string: str) -> Requirement:
    """Construct a packaging.Requirement object with caching"""
    # Parsing requirement strings is expensive, and is also expected to happen
    # with a low diversity of different arguments (at least relative the number
    # constructed). This method adds a cache to requirement object creation to
    # minimize repeated parsing of the same string to construct equivalent
    # Requirement objects.
    return Requirement(req_string)


def safe_extra(extra: str) -> NormalizedExtra:
    """Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.

    This function is duplicated from ``pkg_resources``. Note that this is not
    the same to either ``canonicalize_name`` or ``_egg_link_name``.
    """
    return cast(NormalizedExtra, re.sub("[^A-Za-z0-9.-]+", "_", extra).lower())
python3.12/site-packages/pip/_internal/utils/__init__.py000064400000000000151732701330017115 0ustar00python3.12/site-packages/pip/_internal/utils/virtualenv.py000064400000006600151732701330017571 0ustar00import logging
import os
import re
import site
import sys
from typing import List, Optional

logger = logging.getLogger(__name__)
_INCLUDE_SYSTEM_SITE_PACKAGES_REGEX = re.compile(
    r"include-system-site-packages\s*=\s*(?P<value>true|false)"
)


def _running_under_venv() -> bool:
    """Checks if sys.base_prefix and sys.prefix match.

    This handles PEP 405 compliant virtual environments.
    """
    return sys.prefix != getattr(sys, "base_prefix", sys.prefix)


def _running_under_legacy_virtualenv() -> bool:
    """Checks if sys.real_prefix is set.

    This handles virtual environments created with pypa's virtualenv.
    """
    # pypa/virtualenv case
    return hasattr(sys, "real_prefix")


def running_under_virtualenv() -> bool:
    """True if we're running inside a virtual environment, False otherwise."""
    return _running_under_venv() or _running_under_legacy_virtualenv()


def _get_pyvenv_cfg_lines() -> Optional[List[str]]:
    """Reads {sys.prefix}/pyvenv.cfg and returns its contents as list of lines

    Returns None, if it could not read/access the file.
    """
    pyvenv_cfg_file = os.path.join(sys.prefix, "pyvenv.cfg")
    try:
        # Although PEP 405 does not specify, the built-in venv module always
        # writes with UTF-8. (pypa/pip#8717)
        with open(pyvenv_cfg_file, encoding="utf-8") as f:
            return f.read().splitlines()  # avoids trailing newlines
    except OSError:
        return None


def _no_global_under_venv() -> bool:
    """Check `{sys.prefix}/pyvenv.cfg` for system site-packages inclusion

    PEP 405 specifies that when system site-packages are not supposed to be
    visible from a virtual environment, `pyvenv.cfg` must contain the following
    line:

        include-system-site-packages = false

    Additionally, log a warning if accessing the file fails.
    """
    cfg_lines = _get_pyvenv_cfg_lines()
    if cfg_lines is None:
        # We're not in a "sane" venv, so assume there is no system
        # site-packages access (since that's PEP 405's default state).
        logger.warning(
            "Could not access 'pyvenv.cfg' despite a virtual environment "
            "being active. Assuming global site-packages is not accessible "
            "in this environment."
        )
        return True

    for line in cfg_lines:
        match = _INCLUDE_SYSTEM_SITE_PACKAGES_REGEX.match(line)
        if match is not None and match.group("value") == "false":
            return True
    return False


def _no_global_under_legacy_virtualenv() -> bool:
    """Check if "no-global-site-packages.txt" exists beside site.py

    This mirrors logic in pypa/virtualenv for determining whether system
    site-packages are visible in the virtual environment.
    """
    site_mod_dir = os.path.dirname(os.path.abspath(site.__file__))
    no_global_site_packages_file = os.path.join(
        site_mod_dir,
        "no-global-site-packages.txt",
    )
    return os.path.exists(no_global_site_packages_file)


def virtualenv_no_global() -> bool:
    """Returns a boolean, whether running in venv with no system site-packages."""
    # PEP 405 compliance needs to be checked first since virtualenv >=20 would
    # return True for both checks, but is only able to use the PEP 405 config.
    if _running_under_venv():
        return _no_global_under_venv()

    if _running_under_legacy_virtualenv():
        return _no_global_under_legacy_virtualenv()

    return False
python3.12/site-packages/pip/_internal/utils/logging.py000064400000026523151732701330017026 0ustar00import contextlib
import errno
import logging
import logging.handlers
import os
import sys
import threading
from dataclasses import dataclass
from io import TextIOWrapper
from logging import Filter
from typing import Any, ClassVar, Generator, List, Optional, TextIO, Type

from pip._vendor.rich.console import (
    Console,
    ConsoleOptions,
    ConsoleRenderable,
    RenderableType,
    RenderResult,
    RichCast,
)
from pip._vendor.rich.highlighter import NullHighlighter
from pip._vendor.rich.logging import RichHandler
from pip._vendor.rich.segment import Segment
from pip._vendor.rich.style import Style

from pip._internal.utils._log import VERBOSE, getLogger
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.deprecation import DEPRECATION_MSG_PREFIX
from pip._internal.utils.misc import ensure_dir

_log_state = threading.local()
subprocess_logger = getLogger("pip.subprocessor")


class BrokenStdoutLoggingError(Exception):
    """
    Raised if BrokenPipeError occurs for the stdout stream while logging.
    """


def _is_broken_pipe_error(exc_class: Type[BaseException], exc: BaseException) -> bool:
    if exc_class is BrokenPipeError:
        return True

    # On Windows, a broken pipe can show up as EINVAL rather than EPIPE:
    # https://bugs.python.org/issue19612
    # https://bugs.python.org/issue30418
    if not WINDOWS:
        return False

    return isinstance(exc, OSError) and exc.errno in (errno.EINVAL, errno.EPIPE)


@contextlib.contextmanager
def indent_log(num: int = 2) -> Generator[None, None, None]:
    """
    A context manager which will cause the log output to be indented for any
    log messages emitted inside it.
    """
    # For thread-safety
    _log_state.indentation = get_indentation()
    _log_state.indentation += num
    try:
        yield
    finally:
        _log_state.indentation -= num


def get_indentation() -> int:
    return getattr(_log_state, "indentation", 0)


class IndentingFormatter(logging.Formatter):
    default_time_format = "%Y-%m-%dT%H:%M:%S"

    def __init__(
        self,
        *args: Any,
        add_timestamp: bool = False,
        **kwargs: Any,
    ) -> None:
        """
        A logging.Formatter that obeys the indent_log() context manager.

        :param add_timestamp: A bool indicating output lines should be prefixed
            with their record's timestamp.
        """
        self.add_timestamp = add_timestamp
        super().__init__(*args, **kwargs)

    def get_message_start(self, formatted: str, levelno: int) -> str:
        """
        Return the start of the formatted log message (not counting the
        prefix to add to each line).
        """
        if levelno < logging.WARNING:
            return ""
        if formatted.startswith(DEPRECATION_MSG_PREFIX):
            # Then the message already has a prefix.  We don't want it to
            # look like "WARNING: DEPRECATION: ...."
            return ""
        if levelno < logging.ERROR:
            return "WARNING: "

        return "ERROR: "

    def format(self, record: logging.LogRecord) -> str:
        """
        Calls the standard formatter, but will indent all of the log message
        lines by our current indentation level.
        """
        formatted = super().format(record)
        message_start = self.get_message_start(formatted, record.levelno)
        formatted = message_start + formatted

        prefix = ""
        if self.add_timestamp:
            prefix = f"{self.formatTime(record)} "
        prefix += " " * get_indentation()
        formatted = "".join([prefix + line for line in formatted.splitlines(True)])
        return formatted


@dataclass
class IndentedRenderable:
    renderable: RenderableType
    indent: int

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        segments = console.render(self.renderable, options)
        lines = Segment.split_lines(segments)
        for line in lines:
            yield Segment(" " * self.indent)
            yield from line
            yield Segment("\n")


class RichPipStreamHandler(RichHandler):
    KEYWORDS: ClassVar[Optional[List[str]]] = []

    def __init__(self, stream: Optional[TextIO], no_color: bool) -> None:
        super().__init__(
            console=Console(file=stream, no_color=no_color, soft_wrap=True),
            show_time=False,
            show_level=False,
            show_path=False,
            highlighter=NullHighlighter(),
        )

    # Our custom override on Rich's logger, to make things work as we need them to.
    def emit(self, record: logging.LogRecord) -> None:
        style: Optional[Style] = None

        # If we are given a diagnostic error to present, present it with indentation.
        assert isinstance(record.args, tuple)
        if getattr(record, "rich", False):
            (rich_renderable,) = record.args
            assert isinstance(
                rich_renderable, (ConsoleRenderable, RichCast, str)
            ), f"{rich_renderable} is not rich-console-renderable"

            renderable: RenderableType = IndentedRenderable(
                rich_renderable, indent=get_indentation()
            )
        else:
            message = self.format(record)
            renderable = self.render_message(record, message)
            if record.levelno is not None:
                if record.levelno >= logging.ERROR:
                    style = Style(color="red")
                elif record.levelno >= logging.WARNING:
                    style = Style(color="yellow")

        try:
            self.console.print(renderable, overflow="ignore", crop=False, style=style)
        except Exception:
            self.handleError(record)

    def handleError(self, record: logging.LogRecord) -> None:
        """Called when logging is unable to log some output."""

        exc_class, exc = sys.exc_info()[:2]
        # If a broken pipe occurred while calling write() or flush() on the
        # stdout stream in logging's Handler.emit(), then raise our special
        # exception so we can handle it in main() instead of logging the
        # broken pipe error and continuing.
        if (
            exc_class
            and exc
            and self.console.file is sys.stdout
            and _is_broken_pipe_error(exc_class, exc)
        ):
            raise BrokenStdoutLoggingError()

        return super().handleError(record)


class BetterRotatingFileHandler(logging.handlers.RotatingFileHandler):
    def _open(self) -> TextIOWrapper:
        ensure_dir(os.path.dirname(self.baseFilename))
        return super()._open()


class MaxLevelFilter(Filter):
    def __init__(self, level: int) -> None:
        self.level = level

    def filter(self, record: logging.LogRecord) -> bool:
        return record.levelno < self.level


class ExcludeLoggerFilter(Filter):

    """
    A logging Filter that excludes records from a logger (or its children).
    """

    def filter(self, record: logging.LogRecord) -> bool:
        # The base Filter class allows only records from a logger (or its
        # children).
        return not super().filter(record)


def setup_logging(verbosity: int, no_color: bool, user_log_file: Optional[str]) -> int:
    """Configures and sets up all of the logging

    Returns the requested logging level, as its integer value.
    """

    # Determine the level to be logging at.
    if verbosity >= 2:
        level_number = logging.DEBUG
    elif verbosity == 1:
        level_number = VERBOSE
    elif verbosity == -1:
        level_number = logging.WARNING
    elif verbosity == -2:
        level_number = logging.ERROR
    elif verbosity <= -3:
        level_number = logging.CRITICAL
    else:
        level_number = logging.INFO

    level = logging.getLevelName(level_number)

    # The "root" logger should match the "console" level *unless* we also need
    # to log to a user log file.
    include_user_log = user_log_file is not None
    if include_user_log:
        additional_log_file = user_log_file
        root_level = "DEBUG"
    else:
        additional_log_file = "/dev/null"
        root_level = level

    # Disable any logging besides WARNING unless we have DEBUG level logging
    # enabled for vendored libraries.
    vendored_log_level = "WARNING" if level in ["INFO", "ERROR"] else "DEBUG"

    # Shorthands for clarity
    log_streams = {
        "stdout": "ext://sys.stdout",
        "stderr": "ext://sys.stderr",
    }
    handler_classes = {
        "stream": "pip._internal.utils.logging.RichPipStreamHandler",
        "file": "pip._internal.utils.logging.BetterRotatingFileHandler",
    }
    handlers = ["console", "console_errors", "console_subprocess"] + (
        ["user_log"] if include_user_log else []
    )

    logging.config.dictConfig(
        {
            "version": 1,
            "disable_existing_loggers": False,
            "filters": {
                "exclude_warnings": {
                    "()": "pip._internal.utils.logging.MaxLevelFilter",
                    "level": logging.WARNING,
                },
                "restrict_to_subprocess": {
                    "()": "logging.Filter",
                    "name": subprocess_logger.name,
                },
                "exclude_subprocess": {
                    "()": "pip._internal.utils.logging.ExcludeLoggerFilter",
                    "name": subprocess_logger.name,
                },
            },
            "formatters": {
                "indent": {
                    "()": IndentingFormatter,
                    "format": "%(message)s",
                },
                "indent_with_timestamp": {
                    "()": IndentingFormatter,
                    "format": "%(message)s",
                    "add_timestamp": True,
                },
            },
            "handlers": {
                "console": {
                    "level": level,
                    "class": handler_classes["stream"],
                    "no_color": no_color,
                    "stream": log_streams["stdout"],
                    "filters": ["exclude_subprocess", "exclude_warnings"],
                    "formatter": "indent",
                },
                "console_errors": {
                    "level": "WARNING",
                    "class": handler_classes["stream"],
                    "no_color": no_color,
                    "stream": log_streams["stderr"],
                    "filters": ["exclude_subprocess"],
                    "formatter": "indent",
                },
                # A handler responsible for logging to the console messages
                # from the "subprocessor" logger.
                "console_subprocess": {
                    "level": level,
                    "class": handler_classes["stream"],
                    "stream": log_streams["stderr"],
                    "no_color": no_color,
                    "filters": ["restrict_to_subprocess"],
                    "formatter": "indent",
                },
                "user_log": {
                    "level": "DEBUG",
                    "class": handler_classes["file"],
                    "filename": additional_log_file,
                    "encoding": "utf-8",
                    "delay": True,
                    "formatter": "indent_with_timestamp",
                },
            },
            "root": {
                "level": root_level,
                "handlers": handlers,
            },
            "loggers": {"pip._vendor": {"level": vendored_log_level}},
        }
    )

    return level_number
python3.12/site-packages/pip/_internal/utils/hashes.py000064400000011776151732701330016657 0ustar00import hashlib
from typing import TYPE_CHECKING, BinaryIO, Dict, Iterable, List, Optional

from pip._internal.exceptions import HashMismatch, HashMissing, InstallationError
from pip._internal.utils.misc import read_chunks

if TYPE_CHECKING:
    from hashlib import _Hash

    # NoReturn introduced in 3.6.2; imported only for type checking to maintain
    # pip compatibility with older patch versions of Python 3.6
    from typing import NoReturn


# The recommended hash algo of the moment. Change this whenever the state of
# the art changes; it won't hurt backward compatibility.
FAVORITE_HASH = "sha256"


# Names of hashlib algorithms allowed by the --hash option and ``pip hash``
# Currently, those are the ones at least as collision-resistant as sha256.
STRONG_HASHES = ["sha256", "sha384", "sha512"]


class Hashes:
    """A wrapper that builds multiple hashes at once and checks them against
    known-good values

    """

    def __init__(self, hashes: Optional[Dict[str, List[str]]] = None) -> None:
        """
        :param hashes: A dict of algorithm names pointing to lists of allowed
            hex digests
        """
        allowed = {}
        if hashes is not None:
            for alg, keys in hashes.items():
                # Make sure values are always sorted (to ease equality checks)
                allowed[alg] = sorted(keys)
        self._allowed = allowed

    def __and__(self, other: "Hashes") -> "Hashes":
        if not isinstance(other, Hashes):
            return NotImplemented

        # If either of the Hashes object is entirely empty (i.e. no hash
        # specified at all), all hashes from the other object are allowed.
        if not other:
            return self
        if not self:
            return other

        # Otherwise only hashes that present in both objects are allowed.
        new = {}
        for alg, values in other._allowed.items():
            if alg not in self._allowed:
                continue
            new[alg] = [v for v in values if v in self._allowed[alg]]
        return Hashes(new)

    @property
    def digest_count(self) -> int:
        return sum(len(digests) for digests in self._allowed.values())

    def is_hash_allowed(self, hash_name: str, hex_digest: str) -> bool:
        """Return whether the given hex digest is allowed."""
        return hex_digest in self._allowed.get(hash_name, [])

    def check_against_chunks(self, chunks: Iterable[bytes]) -> None:
        """Check good hashes against ones built from iterable of chunks of
        data.

        Raise HashMismatch if none match.

        """
        gots = {}
        for hash_name in self._allowed.keys():
            try:
                gots[hash_name] = hashlib.new(hash_name)
            except (ValueError, TypeError):
                raise InstallationError(f"Unknown hash name: {hash_name}")

        for chunk in chunks:
            for hash in gots.values():
                hash.update(chunk)

        for hash_name, got in gots.items():
            if got.hexdigest() in self._allowed[hash_name]:
                return
        self._raise(gots)

    def _raise(self, gots: Dict[str, "_Hash"]) -> "NoReturn":
        raise HashMismatch(self._allowed, gots)

    def check_against_file(self, file: BinaryIO) -> None:
        """Check good hashes against a file-like object

        Raise HashMismatch if none match.

        """
        return self.check_against_chunks(read_chunks(file))

    def check_against_path(self, path: str) -> None:
        with open(path, "rb") as file:
            return self.check_against_file(file)

    def has_one_of(self, hashes: Dict[str, str]) -> bool:
        """Return whether any of the given hashes are allowed."""
        for hash_name, hex_digest in hashes.items():
            if self.is_hash_allowed(hash_name, hex_digest):
                return True
        return False

    def __bool__(self) -> bool:
        """Return whether I know any known-good hashes."""
        return bool(self._allowed)

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, Hashes):
            return NotImplemented
        return self._allowed == other._allowed

    def __hash__(self) -> int:
        return hash(
            ",".join(
                sorted(
                    ":".join((alg, digest))
                    for alg, digest_list in self._allowed.items()
                    for digest in digest_list
                )
            )
        )


class MissingHashes(Hashes):
    """A workalike for Hashes used when we're missing a hash for a requirement

    It computes the actual hash of the requirement and raises a HashMissing
    exception showing it to the user.

    """

    def __init__(self) -> None:
        """Don't offer the ``hashes`` kwarg."""
        # Pass our favorite hash in to generate a "gotten hash". With the
        # empty list, it will never match, so an error will always raise.
        super().__init__(hashes={FAVORITE_HASH: []})

    def _raise(self, gots: Dict[str, "_Hash"]) -> "NoReturn":
        raise HashMissing(gots[FAVORITE_HASH].hexdigest())
python3.12/site-packages/pip/_internal/utils/egg_link.py000064400000004106151732701340017151 0ustar00import os
import re
import sys
from typing import List, Optional

from pip._internal.locations import site_packages, user_site
from pip._internal.utils.virtualenv import (
    running_under_virtualenv,
    virtualenv_no_global,
)

__all__ = [
    "egg_link_path_from_sys_path",
    "egg_link_path_from_location",
]


def _egg_link_name(raw_name: str) -> str:
    """
    Convert a Name metadata value to a .egg-link name, by applying
    the same substitution as pkg_resources's safe_name function.
    Note: we cannot use canonicalize_name because it has a different logic.
    """
    return re.sub("[^A-Za-z0-9.]+", "-", raw_name) + ".egg-link"


def egg_link_path_from_sys_path(raw_name: str) -> Optional[str]:
    """
    Look for a .egg-link file for project name, by walking sys.path.
    """
    egg_link_name = _egg_link_name(raw_name)
    for path_item in sys.path:
        egg_link = os.path.join(path_item, egg_link_name)
        if os.path.isfile(egg_link):
            return egg_link
    return None


def egg_link_path_from_location(raw_name: str) -> Optional[str]:
    """
    Return the path for the .egg-link file if it exists, otherwise, None.

    There's 3 scenarios:
    1) not in a virtualenv
       try to find in site.USER_SITE, then site_packages
    2) in a no-global virtualenv
       try to find in site_packages
    3) in a yes-global virtualenv
       try to find in site_packages, then site.USER_SITE
       (don't look in global location)

    For #1 and #3, there could be odd cases, where there's an egg-link in 2
    locations.

    This method will just return the first one found.
    """
    sites: List[str] = []
    if running_under_virtualenv():
        sites.append(site_packages)
        if not virtualenv_no_global() and user_site:
            sites.append(user_site)
    else:
        if user_site:
            sites.append(user_site)
        sites.append(site_packages)

    egg_link_name = _egg_link_name(raw_name)
    for site in sites:
        egglink = os.path.join(site, egg_link_name)
        if os.path.isfile(egglink):
            return egglink
    return None
python3.12/site-packages/pip/_internal/utils/_jaraco_text.py000064400000006427151732701340020044 0ustar00"""Functions brought over from jaraco.text.

These functions are not supposed to be used within `pip._internal`. These are
helper functions brought over from `jaraco.text` to enable vendoring newer
copies of `pkg_resources` without having to vendor `jaraco.text` and its entire
dependency cone; something that our vendoring setup is not currently capable of
handling.

License reproduced from original source below:

Copyright Jason R. Coombs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""

import functools
import itertools


def _nonblank(str):
    return str and not str.startswith("#")


@functools.singledispatch
def yield_lines(iterable):
    r"""
    Yield valid lines of a string or iterable.

    >>> list(yield_lines(''))
    []
    >>> list(yield_lines(['foo', 'bar']))
    ['foo', 'bar']
    >>> list(yield_lines('foo\nbar'))
    ['foo', 'bar']
    >>> list(yield_lines('\nfoo\n#bar\nbaz #comment'))
    ['foo', 'baz #comment']
    >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n']))
    ['foo', 'bar', 'baz', 'bing']
    """
    return itertools.chain.from_iterable(map(yield_lines, iterable))


@yield_lines.register(str)
def _(text):
    return filter(_nonblank, map(str.strip, text.splitlines()))


def drop_comment(line):
    """
    Drop comments.

    >>> drop_comment('foo # bar')
    'foo'

    A hash without a space may be in a URL.

    >>> drop_comment('http://example.com/foo#bar')
    'http://example.com/foo#bar'
    """
    return line.partition(" #")[0]


def join_continuation(lines):
    r"""
    Join lines continued by a trailing backslash.

    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar \\', 'baz']))
    ['foobarbaz']

    Not sure why, but...
    The character preceeding the backslash is also elided.

    >>> list(join_continuation(['goo\\', 'dly']))
    ['godly']

    A terrible idea, but...
    If no line is available to continue, suppress the lines.

    >>> list(join_continuation(['foo', 'bar\\', 'baz\\']))
    ['foo']
    """
    lines = iter(lines)
    for item in lines:
        while item.endswith("\\"):
            try:
                item = item[:-2].strip() + next(lines)
            except StopIteration:
                return
        yield item
python3.12/site-packages/pip/_internal/utils/entrypoints.py000064400000006103151732701340017767 0ustar00import itertools
import os
import shutil
import sys
from typing import List, Optional

from pip._internal.cli.main import main
from pip._internal.utils.compat import WINDOWS

_EXECUTABLE_NAMES = [
    "pip",
    f"pip{sys.version_info.major}",
    f"pip{sys.version_info.major}.{sys.version_info.minor}",
]
if WINDOWS:
    _allowed_extensions = {"", ".exe"}
    _EXECUTABLE_NAMES = [
        "".join(parts)
        for parts in itertools.product(_EXECUTABLE_NAMES, _allowed_extensions)
    ]


def _wrapper(args: Optional[List[str]] = None, _nowarn: bool = False) -> int:
    """Central wrapper for all old entrypoints.

    Historically pip has had several entrypoints defined. Because of issues
    arising from PATH, sys.path, multiple Pythons, their interactions, and most
    of them having a pip installed, users suffer every time an entrypoint gets
    moved.

    To alleviate this pain, and provide a mechanism for warning users and
    directing them to an appropriate place for help, we now define all of
    our old entrypoints as wrappers for the current one.
    """
    if not _nowarn:
        sys.stderr.write(
            "WARNING: pip is being invoked by an old script wrapper. This will "
            "fail in a future version of pip.\n"
            "Please see https://github.com/pypa/pip/issues/5599 for advice on "
            "fixing the underlying issue.\n"
            "To avoid this problem you can invoke Python with '-m pip' instead of "
            "running pip directly.\n"
        )
    return main(args)


def get_best_invocation_for_this_pip() -> str:
    """Try to figure out the best way to invoke pip in the current environment."""
    binary_directory = "Scripts" if WINDOWS else "bin"
    binary_prefix = os.path.join(sys.prefix, binary_directory)

    # Try to use pip[X[.Y]] names, if those executables for this environment are
    # the first on PATH with that name.
    path_parts = os.path.normcase(os.environ.get("PATH", "")).split(os.pathsep)
    exe_are_in_PATH = os.path.normcase(binary_prefix) in path_parts
    if exe_are_in_PATH:
        for exe_name in _EXECUTABLE_NAMES:
            found_executable = shutil.which(exe_name)
            binary_executable = os.path.join(binary_prefix, exe_name)
            if (
                found_executable
                and os.path.exists(binary_executable)
                and os.path.samefile(
                    found_executable,
                    binary_executable,
                )
            ):
                return exe_name

    # Use the `-m` invocation, if there's no "nice" invocation.
    return f"{get_best_invocation_for_this_python()} -m pip"


def get_best_invocation_for_this_python() -> str:
    """Try to figure out the best way to invoke the current Python."""
    exe = sys.executable
    exe_name = os.path.basename(exe)

    # Try to use the basename, if it's the first executable.
    found_executable = shutil.which(exe_name)
    if found_executable and os.path.samefile(found_executable, exe):
        return exe_name

    # Use the full executable name, because we couldn't find something simpler.
    return exe
python3.12/site-packages/pip/_internal/utils/filesystem.py000064400000012002151732701340017550 0ustar00import fnmatch
import os
import os.path
import random
import sys
from contextlib import contextmanager
from tempfile import NamedTemporaryFile
from typing import Any, BinaryIO, Generator, List, Union, cast

from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed

from pip._internal.utils.compat import get_path_uid
from pip._internal.utils.misc import format_size


def check_path_owner(path: str) -> bool:
    # If we don't have a way to check the effective uid of this process, then
    # we'll just assume that we own the directory.
    if sys.platform == "win32" or not hasattr(os, "geteuid"):
        return True

    assert os.path.isabs(path)

    previous = None
    while path != previous:
        if os.path.lexists(path):
            # Check if path is writable by current user.
            if os.geteuid() == 0:
                # Special handling for root user in order to handle properly
                # cases where users use sudo without -H flag.
                try:
                    path_uid = get_path_uid(path)
                except OSError:
                    return False
                return path_uid == 0
            else:
                return os.access(path, os.W_OK)
        else:
            previous, path = path, os.path.dirname(path)
    return False  # assume we don't own the path


@contextmanager
def adjacent_tmp_file(path: str, **kwargs: Any) -> Generator[BinaryIO, None, None]:
    """Return a file-like object pointing to a tmp file next to path.

    The file is created securely and is ensured to be written to disk
    after the context reaches its end.

    kwargs will be passed to tempfile.NamedTemporaryFile to control
    the way the temporary file will be opened.
    """
    with NamedTemporaryFile(
        delete=False,
        dir=os.path.dirname(path),
        prefix=os.path.basename(path),
        suffix=".tmp",
        **kwargs,
    ) as f:
        result = cast(BinaryIO, f)
        try:
            yield result
        finally:
            result.flush()
            os.fsync(result.fileno())


# Tenacity raises RetryError by default, explicitly raise the original exception
_replace_retry = retry(reraise=True, stop=stop_after_delay(1), wait=wait_fixed(0.25))

replace = _replace_retry(os.replace)


# test_writable_dir and _test_writable_dir_win are copied from Flit,
# with the author's agreement to also place them under pip's license.
def test_writable_dir(path: str) -> bool:
    """Check if a directory is writable.

    Uses os.access() on POSIX, tries creating files on Windows.
    """
    # If the directory doesn't exist, find the closest parent that does.
    while not os.path.isdir(path):
        parent = os.path.dirname(path)
        if parent == path:
            break  # Should never get here, but infinite loops are bad
        path = parent

    if os.name == "posix":
        return os.access(path, os.W_OK)

    return _test_writable_dir_win(path)


def _test_writable_dir_win(path: str) -> bool:
    # os.access doesn't work on Windows: http://bugs.python.org/issue2528
    # and we can't use tempfile: http://bugs.python.org/issue22107
    basename = "accesstest_deleteme_fishfingers_custard_"
    alphabet = "abcdefghijklmnopqrstuvwxyz0123456789"
    for _ in range(10):
        name = basename + "".join(random.choice(alphabet) for _ in range(6))
        file = os.path.join(path, name)
        try:
            fd = os.open(file, os.O_RDWR | os.O_CREAT | os.O_EXCL)
        except FileExistsError:
            pass
        except PermissionError:
            # This could be because there's a directory with the same name.
            # But it's highly unlikely there's a directory called that,
            # so we'll assume it's because the parent dir is not writable.
            # This could as well be because the parent dir is not readable,
            # due to non-privileged user access.
            return False
        else:
            os.close(fd)
            os.unlink(file)
            return True

    # This should never be reached
    raise OSError("Unexpected condition testing for writable directory")


def find_files(path: str, pattern: str) -> List[str]:
    """Returns a list of absolute paths of files beneath path, recursively,
    with filenames which match the UNIX-style shell glob pattern."""
    result: List[str] = []
    for root, _, files in os.walk(path):
        matches = fnmatch.filter(files, pattern)
        result.extend(os.path.join(root, f) for f in matches)
    return result


def file_size(path: str) -> Union[int, float]:
    # If it's a symlink, return 0.
    if os.path.islink(path):
        return 0
    return os.path.getsize(path)


def format_file_size(path: str) -> str:
    return format_size(file_size(path))


def directory_size(path: str) -> Union[int, float]:
    size = 0.0
    for root, _dirs, files in os.walk(path):
        for filename in files:
            file_path = os.path.join(root, filename)
            size += file_size(file_path)
    return size


def format_directory_size(path: str) -> str:
    return format_size(directory_size(path))
python3.12/site-packages/pip/_internal/utils/urls.py000064400000003337151732701350016365 0ustar00import os
import string
import urllib.parse
import urllib.request
from typing import Optional

from .compat import WINDOWS


def get_url_scheme(url: str) -> Optional[str]:
    if ":" not in url:
        return None
    return url.split(":", 1)[0].lower()


def path_to_url(path: str) -> str:
    """
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    """
    path = os.path.normpath(os.path.abspath(path))
    url = urllib.parse.urljoin("file:", urllib.request.pathname2url(path))
    return url


def url_to_path(url: str) -> str:
    """
    Convert a file: URL to a path.
    """
    assert url.startswith(
        "file:"
    ), f"You can only turn file: urls into filenames (not {url!r})"

    _, netloc, path, _, _ = urllib.parse.urlsplit(url)

    if not netloc or netloc == "localhost":
        # According to RFC 8089, same as empty authority.
        netloc = ""
    elif WINDOWS:
        # If we have a UNC path, prepend UNC share notation.
        netloc = "\\\\" + netloc
    else:
        raise ValueError(
            f"non-local file URIs are not supported on this platform: {url!r}"
        )

    path = urllib.request.url2pathname(netloc + path)

    # On Windows, urlsplit parses the path as something like "/C:/Users/foo".
    # This creates issues for path-related functions like io.open(), so we try
    # to detect and strip the leading slash.
    if (
        WINDOWS
        and not netloc  # Not UNC.
        and len(path) >= 3
        and path[0] == "/"  # Leading slash to strip.
        and path[1] in string.ascii_letters  # Drive letter.
        and path[2:4] in (":", ":/")  # Colon + end of string, or colon + absolute path.
    ):
        path = path[1:]

    return path
python3.12/site-packages/pip/_internal/utils/misc.py000064400000056273151732701350016342 0ustar00import contextlib
import errno
import getpass
import hashlib
import io
import logging
import os
import posixpath
import shutil
import stat
import sys
import sysconfig
import urllib.parse
from functools import partial
from io import StringIO
from itertools import filterfalse, tee, zip_longest
from pathlib import Path
from types import FunctionType, TracebackType
from typing import (
    Any,
    BinaryIO,
    Callable,
    ContextManager,
    Dict,
    Generator,
    Iterable,
    Iterator,
    List,
    Optional,
    TextIO,
    Tuple,
    Type,
    TypeVar,
    Union,
    cast,
)

from pip._vendor.packaging.requirements import Requirement
from pip._vendor.pyproject_hooks import BuildBackendHookCaller
from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed

from pip import __version__
from pip._internal.exceptions import CommandError, ExternallyManagedEnvironment
from pip._internal.locations import get_major_minor_version
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.virtualenv import running_under_virtualenv

__all__ = [
    "rmtree",
    "display_path",
    "backup_dir",
    "ask",
    "splitext",
    "format_size",
    "is_installable_dir",
    "normalize_path",
    "renames",
    "get_prog",
    "captured_stdout",
    "ensure_dir",
    "remove_auth_from_url",
    "check_externally_managed",
    "ConfiguredBuildBackendHookCaller",
]

logger = logging.getLogger(__name__)

T = TypeVar("T")
ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType]
VersionInfo = Tuple[int, int, int]
NetlocTuple = Tuple[str, Tuple[Optional[str], Optional[str]]]
OnExc = Callable[[FunctionType, Path, BaseException], Any]
OnErr = Callable[[FunctionType, Path, ExcInfo], Any]


def get_pip_version() -> str:
    pip_pkg_dir = os.path.join(os.path.dirname(__file__), "..", "..")
    pip_pkg_dir = os.path.abspath(pip_pkg_dir)

    return "pip {} from {} (python {})".format(
        __version__,
        pip_pkg_dir,
        get_major_minor_version(),
    )


def normalize_version_info(py_version_info: Tuple[int, ...]) -> Tuple[int, int, int]:
    """
    Convert a tuple of ints representing a Python version to one of length
    three.

    :param py_version_info: a tuple of ints representing a Python version,
        or None to specify no version. The tuple can have any length.

    :return: a tuple of length three if `py_version_info` is non-None.
        Otherwise, return `py_version_info` unchanged (i.e. None).
    """
    if len(py_version_info) < 3:
        py_version_info += (3 - len(py_version_info)) * (0,)
    elif len(py_version_info) > 3:
        py_version_info = py_version_info[:3]

    return cast("VersionInfo", py_version_info)


def ensure_dir(path: str) -> None:
    """os.path.makedirs without EEXIST."""
    try:
        os.makedirs(path)
    except OSError as e:
        # Windows can raise spurious ENOTEMPTY errors. See #6426.
        if e.errno != errno.EEXIST and e.errno != errno.ENOTEMPTY:
            raise


def get_prog() -> str:
    try:
        prog = os.path.basename(sys.argv[0])
        if prog in ("__main__.py", "-c"):
            return f"{sys.executable} -m pip"
        else:
            return prog
    except (AttributeError, TypeError, IndexError):
        pass
    return "pip"


# Retry every half second for up to 3 seconds
# Tenacity raises RetryError by default, explicitly raise the original exception
@retry(reraise=True, stop=stop_after_delay(3), wait=wait_fixed(0.5))
def rmtree(
    dir: str,
    ignore_errors: bool = False,
    onexc: Optional[OnExc] = None,
) -> None:
    if ignore_errors:
        onexc = _onerror_ignore
    if onexc is None:
        onexc = _onerror_reraise
    handler: OnErr = partial(
        # `[func, path, Union[ExcInfo, BaseException]] -> Any` is equivalent to
        # `Union[([func, path, ExcInfo] -> Any), ([func, path, BaseException] -> Any)]`.
        cast(Union[OnExc, OnErr], rmtree_errorhandler),
        onexc=onexc,
    )
    if sys.version_info >= (3, 12):
        # See https://docs.python.org/3.12/whatsnew/3.12.html#shutil.
        shutil.rmtree(dir, onexc=handler)
    else:
        shutil.rmtree(dir, onerror=handler)


def _onerror_ignore(*_args: Any) -> None:
    pass


def _onerror_reraise(*_args: Any) -> None:
    raise


def rmtree_errorhandler(
    func: FunctionType,
    path: Path,
    exc_info: Union[ExcInfo, BaseException],
    *,
    onexc: OnExc = _onerror_reraise,
) -> None:
    """
    `rmtree` error handler to 'force' a file remove (i.e. like `rm -f`).

    * If a file is readonly then it's write flag is set and operation is
      retried.

    * `onerror` is the original callback from `rmtree(... onerror=onerror)`
      that is chained at the end if the "rm -f" still fails.
    """
    try:
        st_mode = os.stat(path).st_mode
    except OSError:
        # it's equivalent to os.path.exists
        return

    if not st_mode & stat.S_IWRITE:
        # convert to read/write
        try:
            os.chmod(path, st_mode | stat.S_IWRITE)
        except OSError:
            pass
        else:
            # use the original function to repeat the operation
            try:
                func(path)
                return
            except OSError:
                pass

    if not isinstance(exc_info, BaseException):
        _, exc_info, _ = exc_info
    onexc(func, path, exc_info)


def display_path(path: str) -> str:
    """Gives the display value for a given path, making it relative to cwd
    if possible."""
    path = os.path.normcase(os.path.abspath(path))
    if path.startswith(os.getcwd() + os.path.sep):
        path = "." + path[len(os.getcwd()) :]
    return path


def backup_dir(dir: str, ext: str = ".bak") -> str:
    """Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)"""
    n = 1
    extension = ext
    while os.path.exists(dir + extension):
        n += 1
        extension = ext + str(n)
    return dir + extension


def ask_path_exists(message: str, options: Iterable[str]) -> str:
    for action in os.environ.get("PIP_EXISTS_ACTION", "").split():
        if action in options:
            return action
    return ask(message, options)


def _check_no_input(message: str) -> None:
    """Raise an error if no input is allowed."""
    if os.environ.get("PIP_NO_INPUT"):
        raise Exception(
            f"No input was expected ($PIP_NO_INPUT set); question: {message}"
        )


def ask(message: str, options: Iterable[str]) -> str:
    """Ask the message interactively, with the given possible responses"""
    while 1:
        _check_no_input(message)
        response = input(message)
        response = response.strip().lower()
        if response not in options:
            print(
                "Your response ({!r}) was not one of the expected responses: "
                "{}".format(response, ", ".join(options))
            )
        else:
            return response


def ask_input(message: str) -> str:
    """Ask for input interactively."""
    _check_no_input(message)
    return input(message)


def ask_password(message: str) -> str:
    """Ask for a password interactively."""
    _check_no_input(message)
    return getpass.getpass(message)


def strtobool(val: str) -> int:
    """Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    """
    val = val.lower()
    if val in ("y", "yes", "t", "true", "on", "1"):
        return 1
    elif val in ("n", "no", "f", "false", "off", "0"):
        return 0
    else:
        raise ValueError(f"invalid truth value {val!r}")


def format_size(bytes: float) -> str:
    if bytes > 1000 * 1000:
        return "{:.1f} MB".format(bytes / 1000.0 / 1000)
    elif bytes > 10 * 1000:
        return "{} kB".format(int(bytes / 1000))
    elif bytes > 1000:
        return "{:.1f} kB".format(bytes / 1000.0)
    else:
        return "{} bytes".format(int(bytes))


def tabulate(rows: Iterable[Iterable[Any]]) -> Tuple[List[str], List[int]]:
    """Return a list of formatted rows and a list of column sizes.

    For example::

    >>> tabulate([['foobar', 2000], [0xdeadbeef]])
    (['foobar     2000', '3735928559'], [10, 4])
    """
    rows = [tuple(map(str, row)) for row in rows]
    sizes = [max(map(len, col)) for col in zip_longest(*rows, fillvalue="")]
    table = [" ".join(map(str.ljust, row, sizes)).rstrip() for row in rows]
    return table, sizes


def is_installable_dir(path: str) -> bool:
    """Is path is a directory containing pyproject.toml or setup.py?

    If pyproject.toml exists, this is a PEP 517 project. Otherwise we look for
    a legacy setuptools layout by identifying setup.py. We don't check for the
    setup.cfg because using it without setup.py is only available for PEP 517
    projects, which are already covered by the pyproject.toml check.
    """
    if not os.path.isdir(path):
        return False
    if os.path.isfile(os.path.join(path, "pyproject.toml")):
        return True
    if os.path.isfile(os.path.join(path, "setup.py")):
        return True
    return False


def read_chunks(
    file: BinaryIO, size: int = io.DEFAULT_BUFFER_SIZE
) -> Generator[bytes, None, None]:
    """Yield pieces of data from a file-like object until EOF."""
    while True:
        chunk = file.read(size)
        if not chunk:
            break
        yield chunk


def normalize_path(path: str, resolve_symlinks: bool = True) -> str:
    """
    Convert a path to its canonical, case-normalized, absolute version.

    """
    path = os.path.expanduser(path)
    if resolve_symlinks:
        path = os.path.realpath(path)
    else:
        path = os.path.abspath(path)
    return os.path.normcase(path)


def splitext(path: str) -> Tuple[str, str]:
    """Like os.path.splitext, but take off .tar too"""
    base, ext = posixpath.splitext(path)
    if base.lower().endswith(".tar"):
        ext = base[-4:] + ext
        base = base[:-4]
    return base, ext


def renames(old: str, new: str) -> None:
    """Like os.renames(), but handles renaming across devices."""
    # Implementation borrowed from os.renames().
    head, tail = os.path.split(new)
    if head and tail and not os.path.exists(head):
        os.makedirs(head)

    shutil.move(old, new)

    head, tail = os.path.split(old)
    if head and tail:
        try:
            os.removedirs(head)
        except OSError:
            pass


def is_local(path: str) -> bool:
    """
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    Caution: this function assumes the head of path has been normalized
    with normalize_path.
    """
    if not running_under_virtualenv():
        return True
    return path.startswith(normalize_path(sys.prefix))


def write_output(msg: Any, *args: Any) -> None:
    logger.info(msg, *args)


class StreamWrapper(StringIO):
    orig_stream: TextIO

    @classmethod
    def from_stream(cls, orig_stream: TextIO) -> "StreamWrapper":
        ret = cls()
        ret.orig_stream = orig_stream
        return ret

    # compileall.compile_dir() needs stdout.encoding to print to stdout
    # type ignore is because TextIOBase.encoding is writeable
    @property
    def encoding(self) -> str:  # type: ignore
        return self.orig_stream.encoding


@contextlib.contextmanager
def captured_output(stream_name: str) -> Generator[StreamWrapper, None, None]:
    """Return a context manager used by captured_stdout/stdin/stderr
    that temporarily replaces the sys stream *stream_name* with a StringIO.

    Taken from Lib/support/__init__.py in the CPython repo.
    """
    orig_stdout = getattr(sys, stream_name)
    setattr(sys, stream_name, StreamWrapper.from_stream(orig_stdout))
    try:
        yield getattr(sys, stream_name)
    finally:
        setattr(sys, stream_name, orig_stdout)


def captured_stdout() -> ContextManager[StreamWrapper]:
    """Capture the output of sys.stdout:

       with captured_stdout() as stdout:
           print('hello')
       self.assertEqual(stdout.getvalue(), 'hello\n')

    Taken from Lib/support/__init__.py in the CPython repo.
    """
    return captured_output("stdout")


def captured_stderr() -> ContextManager[StreamWrapper]:
    """
    See captured_stdout().
    """
    return captured_output("stderr")


# Simulates an enum
def enum(*sequential: Any, **named: Any) -> Type[Any]:
    enums = dict(zip(sequential, range(len(sequential))), **named)
    reverse = {value: key for key, value in enums.items()}
    enums["reverse_mapping"] = reverse
    return type("Enum", (), enums)


def build_netloc(host: str, port: Optional[int]) -> str:
    """
    Build a netloc from a host-port pair
    """
    if port is None:
        return host
    if ":" in host:
        # Only wrap host with square brackets when it is IPv6
        host = f"[{host}]"
    return f"{host}:{port}"


def build_url_from_netloc(netloc: str, scheme: str = "https") -> str:
    """
    Build a full URL from a netloc.
    """
    if netloc.count(":") >= 2 and "@" not in netloc and "[" not in netloc:
        # It must be a bare IPv6 address, so wrap it with brackets.
        netloc = f"[{netloc}]"
    return f"{scheme}://{netloc}"


def parse_netloc(netloc: str) -> Tuple[Optional[str], Optional[int]]:
    """
    Return the host-port pair from a netloc.
    """
    url = build_url_from_netloc(netloc)
    parsed = urllib.parse.urlparse(url)
    return parsed.hostname, parsed.port


def split_auth_from_netloc(netloc: str) -> NetlocTuple:
    """
    Parse out and remove the auth information from a netloc.

    Returns: (netloc, (username, password)).
    """
    if "@" not in netloc:
        return netloc, (None, None)

    # Split from the right because that's how urllib.parse.urlsplit()
    # behaves if more than one @ is present (which can be checked using
    # the password attribute of urlsplit()'s return value).
    auth, netloc = netloc.rsplit("@", 1)
    pw: Optional[str] = None
    if ":" in auth:
        # Split from the left because that's how urllib.parse.urlsplit()
        # behaves if more than one : is present (which again can be checked
        # using the password attribute of the return value)
        user, pw = auth.split(":", 1)
    else:
        user, pw = auth, None

    user = urllib.parse.unquote(user)
    if pw is not None:
        pw = urllib.parse.unquote(pw)

    return netloc, (user, pw)


def redact_netloc(netloc: str) -> str:
    """
    Replace the sensitive data in a netloc with "****", if it exists.

    For example:
        - "user:pass@example.com" returns "user:****@example.com"
        - "accesstoken@example.com" returns "****@example.com"
    """
    netloc, (user, password) = split_auth_from_netloc(netloc)
    if user is None:
        return netloc
    if password is None:
        user = "****"
        password = ""
    else:
        user = urllib.parse.quote(user)
        password = ":****"
    return "{user}{password}@{netloc}".format(
        user=user, password=password, netloc=netloc
    )


def _transform_url(
    url: str, transform_netloc: Callable[[str], Tuple[Any, ...]]
) -> Tuple[str, NetlocTuple]:
    """Transform and replace netloc in a url.

    transform_netloc is a function taking the netloc and returning a
    tuple. The first element of this tuple is the new netloc. The
    entire tuple is returned.

    Returns a tuple containing the transformed url as item 0 and the
    original tuple returned by transform_netloc as item 1.
    """
    purl = urllib.parse.urlsplit(url)
    netloc_tuple = transform_netloc(purl.netloc)
    # stripped url
    url_pieces = (purl.scheme, netloc_tuple[0], purl.path, purl.query, purl.fragment)
    surl = urllib.parse.urlunsplit(url_pieces)
    return surl, cast("NetlocTuple", netloc_tuple)


def _get_netloc(netloc: str) -> NetlocTuple:
    return split_auth_from_netloc(netloc)


def _redact_netloc(netloc: str) -> Tuple[str]:
    return (redact_netloc(netloc),)


def split_auth_netloc_from_url(
    url: str,
) -> Tuple[str, str, Tuple[Optional[str], Optional[str]]]:
    """
    Parse a url into separate netloc, auth, and url with no auth.

    Returns: (url_without_auth, netloc, (username, password))
    """
    url_without_auth, (netloc, auth) = _transform_url(url, _get_netloc)
    return url_without_auth, netloc, auth


def remove_auth_from_url(url: str) -> str:
    """Return a copy of url with 'username:password@' removed."""
    # username/pass params are passed to subversion through flags
    # and are not recognized in the url.
    return _transform_url(url, _get_netloc)[0]


def redact_auth_from_url(url: str) -> str:
    """Replace the password in a given url with ****."""
    return _transform_url(url, _redact_netloc)[0]


def redact_auth_from_requirement(req: Requirement) -> str:
    """Replace the password in a given requirement url with ****."""
    if not req.url:
        return str(req)
    return str(req).replace(req.url, redact_auth_from_url(req.url))


class HiddenText:
    def __init__(self, secret: str, redacted: str) -> None:
        self.secret = secret
        self.redacted = redacted

    def __repr__(self) -> str:
        return "<HiddenText {!r}>".format(str(self))

    def __str__(self) -> str:
        return self.redacted

    # This is useful for testing.
    def __eq__(self, other: Any) -> bool:
        if type(self) != type(other):
            return False

        # The string being used for redaction doesn't also have to match,
        # just the raw, original string.
        return self.secret == other.secret


def hide_value(value: str) -> HiddenText:
    return HiddenText(value, redacted="****")


def hide_url(url: str) -> HiddenText:
    redacted = redact_auth_from_url(url)
    return HiddenText(url, redacted=redacted)


def protect_pip_from_modification_on_windows(modifying_pip: bool) -> None:
    """Protection of pip.exe from modification on Windows

    On Windows, any operation modifying pip should be run as:
        python -m pip ...
    """
    pip_names = [
        "pip",
        f"pip{sys.version_info.major}",
        f"pip{sys.version_info.major}.{sys.version_info.minor}",
    ]

    # See https://github.com/pypa/pip/issues/1299 for more discussion
    should_show_use_python_msg = (
        modifying_pip and WINDOWS and os.path.basename(sys.argv[0]) in pip_names
    )

    if should_show_use_python_msg:
        new_command = [sys.executable, "-m", "pip"] + sys.argv[1:]
        raise CommandError(
            "To modify pip, please run the following command:\n{}".format(
                " ".join(new_command)
            )
        )


def check_externally_managed() -> None:
    """Check whether the current environment is externally managed.

    If the ``EXTERNALLY-MANAGED`` config file is found, the current environment
    is considered externally managed, and an ExternallyManagedEnvironment is
    raised.
    """
    if running_under_virtualenv():
        return
    marker = os.path.join(sysconfig.get_path("stdlib"), "EXTERNALLY-MANAGED")
    if not os.path.isfile(marker):
        return
    raise ExternallyManagedEnvironment.from_config(marker)


def is_console_interactive() -> bool:
    """Is this console interactive?"""
    return sys.stdin is not None and sys.stdin.isatty()


def hash_file(path: str, blocksize: int = 1 << 20) -> Tuple[Any, int]:
    """Return (hash, length) for path using hashlib.sha256()"""

    h = hashlib.sha256()
    length = 0
    with open(path, "rb") as f:
        for block in read_chunks(f, size=blocksize):
            length += len(block)
            h.update(block)
    return h, length


def pairwise(iterable: Iterable[Any]) -> Iterator[Tuple[Any, Any]]:
    """
    Return paired elements.

    For example:
        s -> (s0, s1), (s2, s3), (s4, s5), ...
    """
    iterable = iter(iterable)
    return zip_longest(iterable, iterable)


def partition(
    pred: Callable[[T], bool],
    iterable: Iterable[T],
) -> Tuple[Iterable[T], Iterable[T]]:
    """
    Use a predicate to partition entries into false entries and true entries,
    like

        partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9
    """
    t1, t2 = tee(iterable)
    return filterfalse(pred, t1), filter(pred, t2)


class ConfiguredBuildBackendHookCaller(BuildBackendHookCaller):
    def __init__(
        self,
        config_holder: Any,
        source_dir: str,
        build_backend: str,
        backend_path: Optional[str] = None,
        runner: Optional[Callable[..., None]] = None,
        python_executable: Optional[str] = None,
    ):
        super().__init__(
            source_dir, build_backend, backend_path, runner, python_executable
        )
        self.config_holder = config_holder

    def build_wheel(
        self,
        wheel_directory: str,
        config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
        metadata_directory: Optional[str] = None,
    ) -> str:
        cs = self.config_holder.config_settings
        return super().build_wheel(
            wheel_directory, config_settings=cs, metadata_directory=metadata_directory
        )

    def build_sdist(
        self,
        sdist_directory: str,
        config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
    ) -> str:
        cs = self.config_holder.config_settings
        return super().build_sdist(sdist_directory, config_settings=cs)

    def build_editable(
        self,
        wheel_directory: str,
        config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
        metadata_directory: Optional[str] = None,
    ) -> str:
        cs = self.config_holder.config_settings
        return super().build_editable(
            wheel_directory, config_settings=cs, metadata_directory=metadata_directory
        )

    def get_requires_for_build_wheel(
        self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None
    ) -> List[str]:
        cs = self.config_holder.config_settings
        return super().get_requires_for_build_wheel(config_settings=cs)

    def get_requires_for_build_sdist(
        self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None
    ) -> List[str]:
        cs = self.config_holder.config_settings
        return super().get_requires_for_build_sdist(config_settings=cs)

    def get_requires_for_build_editable(
        self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None
    ) -> List[str]:
        cs = self.config_holder.config_settings
        return super().get_requires_for_build_editable(config_settings=cs)

    def prepare_metadata_for_build_wheel(
        self,
        metadata_directory: str,
        config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
        _allow_fallback: bool = True,
    ) -> str:
        cs = self.config_holder.config_settings
        return super().prepare_metadata_for_build_wheel(
            metadata_directory=metadata_directory,
            config_settings=cs,
            _allow_fallback=_allow_fallback,
        )

    def prepare_metadata_for_build_editable(
        self,
        metadata_directory: str,
        config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
        _allow_fallback: bool = True,
    ) -> str:
        cs = self.config_holder.config_settings
        return super().prepare_metadata_for_build_editable(
            metadata_directory=metadata_directory,
            config_settings=cs,
            _allow_fallback=_allow_fallback,
        )
python3.12/site-packages/pip/_internal/utils/deprecation.py000064400000007053151732701350017674 0ustar00"""
A module that implements tooling to enable easy warnings about deprecations.
"""

import logging
import warnings
from typing import Any, Optional, TextIO, Type, Union

from pip._vendor.packaging.version import parse

from pip import __version__ as current_version  # NOTE: tests patch this name.

DEPRECATION_MSG_PREFIX = "DEPRECATION: "


class PipDeprecationWarning(Warning):
    pass


_original_showwarning: Any = None


# Warnings <-> Logging Integration
def _showwarning(
    message: Union[Warning, str],
    category: Type[Warning],
    filename: str,
    lineno: int,
    file: Optional[TextIO] = None,
    line: Optional[str] = None,
) -> None:
    if file is not None:
        if _original_showwarning is not None:
            _original_showwarning(message, category, filename, lineno, file, line)
    elif issubclass(category, PipDeprecationWarning):
        # We use a specially named logger which will handle all of the
        # deprecation messages for pip.
        logger = logging.getLogger("pip._internal.deprecations")
        logger.warning(message)
    else:
        _original_showwarning(message, category, filename, lineno, file, line)


def install_warning_logger() -> None:
    # Enable our Deprecation Warnings
    warnings.simplefilter("default", PipDeprecationWarning, append=True)

    global _original_showwarning

    if _original_showwarning is None:
        _original_showwarning = warnings.showwarning
        warnings.showwarning = _showwarning


def deprecated(
    *,
    reason: str,
    replacement: Optional[str],
    gone_in: Optional[str],
    feature_flag: Optional[str] = None,
    issue: Optional[int] = None,
) -> None:
    """Helper to deprecate existing functionality.

    reason:
        Textual reason shown to the user about why this functionality has
        been deprecated. Should be a complete sentence.
    replacement:
        Textual suggestion shown to the user about what alternative
        functionality they can use.
    gone_in:
        The version of pip does this functionality should get removed in.
        Raises an error if pip's current version is greater than or equal to
        this.
    feature_flag:
        Command-line flag of the form --use-feature={feature_flag} for testing
        upcoming functionality.
    issue:
        Issue number on the tracker that would serve as a useful place for
        users to find related discussion and provide feedback.
    """

    # Determine whether or not the feature is already gone in this version.
    is_gone = gone_in is not None and parse(current_version) >= parse(gone_in)

    message_parts = [
        (reason, f"{DEPRECATION_MSG_PREFIX}{{}}"),
        (
            gone_in,
            "pip {} will enforce this behaviour change."
            if not is_gone
            else "Since pip {}, this is no longer supported.",
        ),
        (
            replacement,
            "A possible replacement is {}.",
        ),
        (
            feature_flag,
            "You can use the flag --use-feature={} to test the upcoming behaviour."
            if not is_gone
            else None,
        ),
        (
            issue,
            "Discussion can be found at https://github.com/pypa/pip/issues/{}",
        ),
    ]

    message = " ".join(
        format_str.format(value)
        for value, format_str in message_parts
        if format_str is not None and value is not None
    )

    # Raise as an error if this behaviour is deprecated.
    if is_gone:
        raise PipDeprecationWarning(message)

    warnings.warn(message, category=PipDeprecationWarning, stacklevel=2)
python3.12/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-312.pyc000064400000001734151732701350025241 0ustar00�

R`iZ��D�ddlmZddlmZddlmZddlmZdedefd�Zy)	�)�AbstractDistribution)�SourceDistribution)�WheelDistribution)�InstallRequirement�install_req�returnc�t�|jrt|�S|jrt|�St|�S)z7Returns a Distribution for the given InstallRequirement)�editabler�is_wheelr)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/distributions/__init__.py�)make_distribution_for_install_requirementr
s;�����!�+�.�.���� ��-�-��k�*�*�N)	� pip._internal.distributions.baser�!pip._internal.distributions.sdistr�!pip._internal.distributions.wheelr�pip._internal.req.req_installrr
�rr�<module>rs&��A�@�?�<�+�#�+��+rpython3.12/site-packages/pip/_internal/distributions/__pycache__/base.cpython-312.pyc000064400000005535151732701350024417 0ustar00�

R`i���h�ddlZddlmZddlmZddlmZddlmZGd�dej��Z
y)	�N)�Optional)�
PackageFinder)�BaseDistribution)�InstallRequirementc	���eZdZdZdeddf�fd�Zejdee	fd��Z
ejdefd��Z
ejded	ed
eddfd��Z�xZS)�AbstractDistributiona�A base class for handling installable artifacts.

    The requirements for anything installable are as follows:

     - we must be able to determine the requirement name
       (or we can't correctly handle the non-upgrade case).

     - for packages with setup requirements, we must also be able
       to determine their requirements without installing additional
       packages (for the same reason as run-time dependencies)

     - we must be able to create a Distribution object exposing the
       above metadata.

     - if we need to do work in the build tracker, we must be able to generate a unique
       string to identify the requirement in the build tracker.
    �req�returnNc�0��t�|��||_y�N)�super�__init__r	)�selfr	�	__class__s  ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/distributions/base.pyrzAbstractDistribution.__init__s���
�������c��t��)z�A string that uniquely identifies this requirement to the build tracker.

        If None, then this dist has no work to do in the build tracker, and
        ``.prepare_distribution_metadata()`` will not be called.��NotImplementedError�rs r�build_tracker_idz%AbstractDistribution.build_tracker_id s
��"�#�#rc��t��rrrs r�get_metadata_distributionz.AbstractDistribution.get_metadata_distribution(s��!�#�#r�finder�build_isolation�check_build_depsc��t��rr)rrrrs    r�prepare_distribution_metadataz2AbstractDistribution.prepare_distribution_metadata,s
��"�#�#r)�__name__�
__module__�__qualname__�__doc__rr�abc�abstractpropertyr�strr�abstractmethodrrr�boolr�
__classcell__)rs@rrr	s�����$�.��4��	���$�(�3�-�$��$�	���$�+;�$��$�	���$��$��$��	$�

�$��$rr)�	metaclass)r#�typingr�"pip._internal.index.package_finderr�pip._internal.metadata.baser�pip._internal.reqr�ABCMetar�rr�<module>r0s$��
��<�8�0�*$�S�[�[�*$rpython3.12/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-312.pyc000064400000004367151732701350024613 0ustar00�

R`i���^�ddlmZddlmZddlmZddlmZddlm	Z	m
Z
mZGd�de�Zy)	�)�Optional)�canonicalize_name)�AbstractDistribution)�
PackageFinder)�BaseDistribution�FilesystemWheel�get_wheel_distributionc�P�eZdZdZedeefd��Zdefd�Z	de
dededdfd	�Zy)
�WheelDistributionzqRepresents a wheel distribution.

    This does not need any preparation as wheels can be directly unpacked.
    �returnc��y�N�)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/distributions/wheel.py�build_tracker_idz"WheelDistribution.build_tracker_ids���c��|jjsJd��|jjsJd��t|jj�}t	|t|jj��S)z�Loads the metadata from the wheel file into memory and returns a
        Distribution that uses it, not relying on the wheel file or
        requirement.
        z*Set as part of preparation during downloadzWheels are never unnamed)�req�local_file_path�namerr	r)r�wheels  r�get_metadata_distributionz+WheelDistribution.get_metadata_distributionsb��
�x�x�'�'�U�)U�U�'��x�x�}�}�8�8�8�}����� 8� 8�9��%�e�->�t�x�x�}�}�-M�N�Nr�finder�build_isolation�check_build_depsNc��yrr)rrrrs    r�prepare_distribution_metadataz/WheelDistribution.prepare_distribution_metadata"s��	
r)
�__name__�
__module__�__qualname__�__doc__�propertyr�strrrrr�boolrrrrrrs`���
��(�3�-����O�+;�O�
��
��
��	
�

�
rrN)
�typingr�pip._vendor.packaging.utilsr� pip._internal.distributions.baser�"pip._internal.index.package_finderr�pip._internal.metadatarrr	rrrr�<module>r+s(���9�A�<���
�,�
rpython3.12/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-312.pyc000064400000003323151732701350025455 0ustar00�

R`iJ��J�ddlmZddlmZddlmZddlmZGd�de�Zy)�)�Optional)�AbstractDistribution)�
PackageFinder)�BaseDistributionc�P�eZdZdZedeefd��Zdefd�Z	de
dededdfd	�Zy)
�InstalledDistributionz�Represents an installed package.

    This does not need any preparation as the required information has already
    been computed.
    �returnc��y�N���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/distributions/installed.py�build_tracker_idz&InstalledDistribution.build_tracker_ids���c�h�|jj�Jd��|jjS)Nznot actually installed)�req�satisfied_byr
s r�get_metadata_distributionz/InstalledDistribution.get_metadata_distributions.���x�x�$�$�0�J�2J�J�0��x�x�$�$�$r�finder�build_isolation�check_build_depsNc��yrr)rrrrs    r�prepare_distribution_metadataz3InstalledDistribution.prepare_distribution_metadatas��	
r)
�__name__�
__module__�__qualname__�__doc__�propertyr�strrrrr�boolrrrrrrs^�����(�3�-����%�+;�%�
��
��
��	
�

�
rrN)	�typingr� pip._internal.distributions.baser�"pip._internal.index.package_finderr�pip._internal.metadatarrrrr�<module>r&s���A�<�3�
�0�
rpython3.12/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc000064400000020440151732701360024624 0ustar00�

R`i5���ddlZddlmZmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZej$e�ZGd	�d
e	�Zy)�N)�Iterable�Optional�Set�Tuple)�BuildEnvironment)�AbstractDistribution)�InstallationError)�
PackageFinder)�BaseDistribution)�runner_with_spinner_messagec���eZdZdZedeefd��Zdefd�Z	de
dededdfd	�Zde
ddfd
�Z
deefd�Zdeefd�Zde
ddfd
�Zdedeeeefddfd�Zdeeddfd�Zy)�SourceDistributionz�Represents a source distribution.

    The preparation step for these needs metadata for the packages to be
    generated, either using PEP 517 or using the legacy `setup.py egg_info`.
    �returnc�r�|jjsJ�|jjjS)z/Identify this requirement uniquely by its link.)�req�link�url_without_fragment��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py�build_tracker_idz#SourceDistribution.build_tracker_ids(���x�x�}�}��}��x�x�}�}�1�1�1�c�6�|jj�S)N)r�get_distrs r�get_metadata_distributionz,SourceDistribution.get_metadata_distributions���x�x� � �"�"r�finder�build_isolation�check_build_depsNc�&�|jj�|jjxr|}|r<|j|�|jj	�|j|�|jjxr|}|ri|jj}|�J�|jjj|�\}}|r|jd|�|r|j|�|jj�y)N�the backend dependencies)r�load_pyproject_toml�
use_pep517�_prepare_build_backend�isolated_editable_sanity_check�_install_build_reqs�pyproject_requires�	build_env�check_requirements�_raise_conflicts�_raise_missing_reqs�prepare_metadata)	rrrr�should_isolate�should_check_depsr&�conflicting�missings	         r�prepare_distribution_metadataz0SourceDistribution.prepare_distribution_metadatas���	
���$�$�&����,�,�@����
�'�'��/�
�H�H�3�3�5��$�$�V�,� �H�H�/�/�D�4D���!%���!<�!<��%�1�1�1�#'�8�8�#5�#5�#H�#H�"�$� �K����%�%�&@�+�N���(�(��1����!�!�#rc��|jj}|�J�t�|j_|jjj	||dd��|jjj|jj�\}}|r|jd|�|r]tjd|j�tjddjttt|����yy)N�overlayzbuild dependencies��kindz"PEP 517/518 supported requirementsz4Missing build requirements in pyproject.toml for %s.z`The project does not specify a build backend, and pip cannot fall back to setuptools without %s.z and )rr&rr'�install_requirementsr(�requirements_to_checkr)�logger�warning�join�map�repr�sorted)rrr&r.r/s     rr#z)SourceDistribution._prepare_build_backendEs���"�X�X�8�8��!�-�-�-�-�/����������/�/��&�	�8L�	0�	
� $�x�x�1�1�D�D��H�H�*�*� 
���W���!�!�"F��T���N�N�F����
�
�N�N�A����S��v�g��7�8�
�rc�&�|jj5td�}|jj}|�J�|j	|�5|j�cddd�cddd�S#1swYnxYw	ddd�y#1swYyxYw)Nz#Getting requirements to build wheel)rr'r�pep517_backend�subprocess_runner�get_requires_for_build_wheel�r�runner�backends   r�_get_build_requires_wheelz,SourceDistribution._get_build_requires_wheel_sw��
�X�X�
�
�0�1V�W�F��h�h�-�-�G��&�&�&��*�*�6�2��;�;�=�3�2�	 �
�3�2��2�	 �
�
��#�7B�A1�	B�1A:	�6B�Bc�&�|jj5td�}|jj}|�J�|j	|�5|j�cddd�cddd�S#1swYnxYw	ddd�y#1swYyxYw)Nz&Getting requirements to build editable)rr'rr>r?�get_requires_for_build_editablerAs   r�_get_build_requires_editablez/SourceDistribution._get_build_requires_editablegs{��
�X�X�
�
�0�8��F��h�h�-�-�G��&�&�&��*�*�6�2��>�>�@�3�2�
 �
�3�2��2�
 �
�
�rEc��|jjrA|jjr+|jj�r|j	�}n|j�}|jjj|�\}}|r|jd|�|jjj||dd��y)Nr �normalzbackend dependenciesr3)
r�editable�permit_editable_wheels�supports_pyproject_editablerHrDr'r(r)r5)rr�
build_reqsr.r/s     rr%z&SourceDistribution._install_build_reqsqs���

�H�H������/�/����4�4�6��:�:�<�J��7�7�9�J�#�x�x�1�1�D�D�Z�P���W���!�!�"<�k�J������/�/��G�X�,B�	0�	
r�conflicting_with�conflicting_reqsc
��d}|j|j|djd�t|�D����}t	|��)NzZSome build dependencies for {requirement} conflict with {conflicting_with}: {description}.�, c3�0K�|]\}}|�d|�����y�w)z is incompatible with N�)�.0�	installed�wanteds   r�	<genexpr>z6SourceDistribution._raise_conflicts.<locals>.<genexpr>�s)����"�)A�%�I�v��+�3�F�8�<�)A�s�)�requirementrO�description)�formatrr9r<r	)rrOrP�
format_string�
error_messages     rr)z#SourceDistribution._raise_conflicts�sY��
?�	�&�,�,����-��	�	�"�)/�0@�)A�"��-�
�
� �
�.�.rr/c��d}|j|jdjttt|�����}t
|��)NzASome build dependencies for {requirement} are missing: {missing}.rR)rYr/)r[rr9r:r;r<r	)rr/r\r]s    rr*z&SourceDistribution._raise_missing_reqs�sK��O�	�&�,�,����$�)�)�C��f�W�o�4N�*O�-�
�
� �
�.�.r)�__name__�
__module__�__qualname__�__doc__�propertyr�strrrrr
�boolr0r#rrDrHr%rrr)r*rTrrrrs�����2�(�3�-�2��2�
#�+;�#�%$��%$��%$��	%$�

�%$�N�]��t��4>�8�C�=�>�A�h�s�m�A�
�-�
�D�
�&/� #�/�7:�5��c��?�7K�/�	
�/�"/�3�s�8�/��/rr)�logging�typingrrrr�pip._internal.build_envr� pip._internal.distributions.baser�pip._internal.exceptionsr	�"pip._internal.index.package_finderr
�pip._internal.metadatar�pip._internal.utils.subprocessr�	getLoggerr_r7rrTrr�<module>rosA���1�1�4�A�6�<�3�F�	��	�	�8�	$��N/�-�N/rpython3.12/site-packages/pip/_internal/distributions/base.py000064400000003317151732701360020053 0ustar00import abc
from typing import Optional

from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata.base import BaseDistribution
from pip._internal.req import InstallRequirement


class AbstractDistribution(metaclass=abc.ABCMeta):
    """A base class for handling installable artifacts.

    The requirements for anything installable are as follows:

     - we must be able to determine the requirement name
       (or we can't correctly handle the non-upgrade case).

     - for packages with setup requirements, we must also be able
       to determine their requirements without installing additional
       packages (for the same reason as run-time dependencies)

     - we must be able to create a Distribution object exposing the
       above metadata.

     - if we need to do work in the build tracker, we must be able to generate a unique
       string to identify the requirement in the build tracker.
    """

    def __init__(self, req: InstallRequirement) -> None:
        super().__init__()
        self.req = req

    @abc.abstractproperty
    def build_tracker_id(self) -> Optional[str]:
        """A string that uniquely identifies this requirement to the build tracker.

        If None, then this dist has no work to do in the build tracker, and
        ``.prepare_distribution_metadata()`` will not be called."""
        raise NotImplementedError()

    @abc.abstractmethod
    def get_metadata_distribution(self) -> BaseDistribution:
        raise NotImplementedError()

    @abc.abstractmethod
    def prepare_distribution_metadata(
        self,
        finder: PackageFinder,
        build_isolation: bool,
        check_build_deps: bool,
    ) -> None:
        raise NotImplementedError()
python3.12/site-packages/pip/_internal/distributions/wheel.py000064400000002375151732701370020251 0ustar00from typing import Optional

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.distributions.base import AbstractDistribution
from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata import (
    BaseDistribution,
    FilesystemWheel,
    get_wheel_distribution,
)


class WheelDistribution(AbstractDistribution):
    """Represents a wheel distribution.

    This does not need any preparation as wheels can be directly unpacked.
    """

    @property
    def build_tracker_id(self) -> Optional[str]:
        return None

    def get_metadata_distribution(self) -> BaseDistribution:
        """Loads the metadata from the wheel file into memory and returns a
        Distribution that uses it, not relying on the wheel file or
        requirement.
        """
        assert self.req.local_file_path, "Set as part of preparation during download"
        assert self.req.name, "Wheels are never unnamed"
        wheel = FilesystemWheel(self.req.local_file_path)
        return get_wheel_distribution(wheel, canonicalize_name(self.req.name))

    def prepare_distribution_metadata(
        self,
        finder: PackageFinder,
        build_isolation: bool,
        check_build_deps: bool,
    ) -> None:
        pass
python3.12/site-packages/pip/_internal/distributions/__init__.py000064400000001532151732701370020676 0ustar00from pip._internal.distributions.base import AbstractDistribution
from pip._internal.distributions.sdist import SourceDistribution
from pip._internal.distributions.wheel import WheelDistribution
from pip._internal.req.req_install import InstallRequirement


def make_distribution_for_install_requirement(
    install_req: InstallRequirement,
) -> AbstractDistribution:
    """Returns a Distribution for the given InstallRequirement"""
    # Editable requirements will always be source distributions. They use the
    # legacy logic until we create a modern standard for them.
    if install_req.editable:
        return SourceDistribution(install_req)

    # If it's a wheel, it's a WheelDistribution
    if install_req.is_wheel:
        return WheelDistribution(install_req)

    # Otherwise, a SourceDistribution
    return SourceDistribution(install_req)
python3.12/site-packages/pip/_internal/distributions/installed.py000064400000001512151732701370021114 0ustar00from typing import Optional

from pip._internal.distributions.base import AbstractDistribution
from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata import BaseDistribution


class InstalledDistribution(AbstractDistribution):
    """Represents an installed package.

    This does not need any preparation as the required information has already
    been computed.
    """

    @property
    def build_tracker_id(self) -> Optional[str]:
        return None

    def get_metadata_distribution(self) -> BaseDistribution:
        assert self.req.satisfied_by is not None, "not actually installed"
        return self.req.satisfied_by

    def prepare_distribution_metadata(
        self,
        finder: PackageFinder,
        build_isolation: bool,
        check_build_deps: bool,
    ) -> None:
        pass
python3.12/site-packages/pip/_internal/distributions/sdist.py000064400000015065151732701370020273 0ustar00import logging
from typing import Iterable, Optional, Set, Tuple

from pip._internal.build_env import BuildEnvironment
from pip._internal.distributions.base import AbstractDistribution
from pip._internal.exceptions import InstallationError
from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata import BaseDistribution
from pip._internal.utils.subprocess import runner_with_spinner_message

logger = logging.getLogger(__name__)


class SourceDistribution(AbstractDistribution):
    """Represents a source distribution.

    The preparation step for these needs metadata for the packages to be
    generated, either using PEP 517 or using the legacy `setup.py egg_info`.
    """

    @property
    def build_tracker_id(self) -> Optional[str]:
        """Identify this requirement uniquely by its link."""
        assert self.req.link
        return self.req.link.url_without_fragment

    def get_metadata_distribution(self) -> BaseDistribution:
        return self.req.get_dist()

    def prepare_distribution_metadata(
        self,
        finder: PackageFinder,
        build_isolation: bool,
        check_build_deps: bool,
    ) -> None:
        # Load pyproject.toml, to determine whether PEP 517 is to be used
        self.req.load_pyproject_toml()

        # Set up the build isolation, if this requirement should be isolated
        should_isolate = self.req.use_pep517 and build_isolation
        if should_isolate:
            # Setup an isolated environment and install the build backend static
            # requirements in it.
            self._prepare_build_backend(finder)
            # Check that if the requirement is editable, it either supports PEP 660 or
            # has a setup.py or a setup.cfg. This cannot be done earlier because we need
            # to setup the build backend to verify it supports build_editable, nor can
            # it be done later, because we want to avoid installing build requirements
            # needlessly. Doing it here also works around setuptools generating
            # UNKNOWN.egg-info when running get_requires_for_build_wheel on a directory
            # without setup.py nor setup.cfg.
            self.req.isolated_editable_sanity_check()
            # Install the dynamic build requirements.
            self._install_build_reqs(finder)
        # Check if the current environment provides build dependencies
        should_check_deps = self.req.use_pep517 and check_build_deps
        if should_check_deps:
            pyproject_requires = self.req.pyproject_requires
            assert pyproject_requires is not None
            conflicting, missing = self.req.build_env.check_requirements(
                pyproject_requires
            )
            if conflicting:
                self._raise_conflicts("the backend dependencies", conflicting)
            if missing:
                self._raise_missing_reqs(missing)
        self.req.prepare_metadata()

    def _prepare_build_backend(self, finder: PackageFinder) -> None:
        # Isolate in a BuildEnvironment and install the build-time
        # requirements.
        pyproject_requires = self.req.pyproject_requires
        assert pyproject_requires is not None

        self.req.build_env = BuildEnvironment()
        self.req.build_env.install_requirements(
            finder, pyproject_requires, "overlay", kind="build dependencies"
        )
        conflicting, missing = self.req.build_env.check_requirements(
            self.req.requirements_to_check
        )
        if conflicting:
            self._raise_conflicts("PEP 517/518 supported requirements", conflicting)
        if missing:
            logger.warning(
                "Missing build requirements in pyproject.toml for %s.",
                self.req,
            )
            logger.warning(
                "The project does not specify a build backend, and "
                "pip cannot fall back to setuptools without %s.",
                " and ".join(map(repr, sorted(missing))),
            )

    def _get_build_requires_wheel(self) -> Iterable[str]:
        with self.req.build_env:
            runner = runner_with_spinner_message("Getting requirements to build wheel")
            backend = self.req.pep517_backend
            assert backend is not None
            with backend.subprocess_runner(runner):
                return backend.get_requires_for_build_wheel()

    def _get_build_requires_editable(self) -> Iterable[str]:
        with self.req.build_env:
            runner = runner_with_spinner_message(
                "Getting requirements to build editable"
            )
            backend = self.req.pep517_backend
            assert backend is not None
            with backend.subprocess_runner(runner):
                return backend.get_requires_for_build_editable()

    def _install_build_reqs(self, finder: PackageFinder) -> None:
        # Install any extra build dependencies that the backend requests.
        # This must be done in a second pass, as the pyproject.toml
        # dependencies must be installed before we can call the backend.
        if (
            self.req.editable
            and self.req.permit_editable_wheels
            and self.req.supports_pyproject_editable()
        ):
            build_reqs = self._get_build_requires_editable()
        else:
            build_reqs = self._get_build_requires_wheel()
        conflicting, missing = self.req.build_env.check_requirements(build_reqs)
        if conflicting:
            self._raise_conflicts("the backend dependencies", conflicting)
        self.req.build_env.install_requirements(
            finder, missing, "normal", kind="backend dependencies"
        )

    def _raise_conflicts(
        self, conflicting_with: str, conflicting_reqs: Set[Tuple[str, str]]
    ) -> None:
        format_string = (
            "Some build dependencies for {requirement} "
            "conflict with {conflicting_with}: {description}."
        )
        error_message = format_string.format(
            requirement=self.req,
            conflicting_with=conflicting_with,
            description=", ".join(
                f"{installed} is incompatible with {wanted}"
                for installed, wanted in sorted(conflicting_reqs)
            ),
        )
        raise InstallationError(error_message)

    def _raise_missing_reqs(self, missing: Set[str]) -> None:
        format_string = (
            "Some build dependencies for {requirement} are missing: {missing}."
        )
        error_message = format_string.format(
            requirement=self.req, missing=", ".join(map(repr, sorted(missing)))
        )
        raise InstallationError(error_message)
python3.12/site-packages/pip/_internal/commands/download.py000064400000012327151732701370017651 0ustar00import logging
import os
from optparse import Values
from typing import List

from pip._internal.cli import cmdoptions
from pip._internal.cli.cmdoptions import make_target_python
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.operations.build.build_tracker import get_build_tracker
from pip._internal.req.req_install import check_legacy_setup_py_options
from pip._internal.utils.misc import ensure_dir, normalize_path, write_output
from pip._internal.utils.temp_dir import TempDirectory

logger = logging.getLogger(__name__)


class DownloadCommand(RequirementCommand):
    """
    Download packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports downloading from "requirements files", which provide
    an easy way to specify a whole environment to be downloaded.
    """

    usage = """
      %prog [options] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] <vcs project url> ...
      %prog [options] <local project path> ...
      %prog [options] <archive url/path> ..."""

    def add_options(self) -> None:
        self.cmd_opts.add_option(cmdoptions.constraints())
        self.cmd_opts.add_option(cmdoptions.requirements())
        self.cmd_opts.add_option(cmdoptions.no_deps())
        self.cmd_opts.add_option(cmdoptions.global_options())
        self.cmd_opts.add_option(cmdoptions.no_binary())
        self.cmd_opts.add_option(cmdoptions.only_binary())
        self.cmd_opts.add_option(cmdoptions.prefer_binary())
        self.cmd_opts.add_option(cmdoptions.src())
        self.cmd_opts.add_option(cmdoptions.pre())
        self.cmd_opts.add_option(cmdoptions.require_hashes())
        self.cmd_opts.add_option(cmdoptions.progress_bar())
        self.cmd_opts.add_option(cmdoptions.no_build_isolation())
        self.cmd_opts.add_option(cmdoptions.use_pep517())
        self.cmd_opts.add_option(cmdoptions.no_use_pep517())
        self.cmd_opts.add_option(cmdoptions.check_build_deps())
        self.cmd_opts.add_option(cmdoptions.ignore_requires_python())

        self.cmd_opts.add_option(
            "-d",
            "--dest",
            "--destination-dir",
            "--destination-directory",
            dest="download_dir",
            metavar="dir",
            default=os.curdir,
            help="Download packages into <dir>.",
        )

        cmdoptions.add_target_python_options(self.cmd_opts)

        index_opts = cmdoptions.make_option_group(
            cmdoptions.index_group,
            self.parser,
        )

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, self.cmd_opts)

    @with_cleanup
    def run(self, options: Values, args: List[str]) -> int:
        options.ignore_installed = True
        # editable doesn't really make sense for `pip download`, but the bowels
        # of the RequirementSet code require that property.
        options.editables = []

        cmdoptions.check_dist_restriction(options)

        options.download_dir = normalize_path(options.download_dir)
        ensure_dir(options.download_dir)

        session = self.get_default_session(options)

        target_python = make_target_python(options)
        finder = self._build_package_finder(
            options=options,
            session=session,
            target_python=target_python,
            ignore_requires_python=options.ignore_requires_python,
        )

        build_tracker = self.enter_context(get_build_tracker())

        directory = TempDirectory(
            delete=not options.no_clean,
            kind="download",
            globally_managed=True,
        )

        reqs = self.get_requirements(args, options, finder, session)
        check_legacy_setup_py_options(options, reqs)

        preparer = self.make_requirement_preparer(
            temp_build_dir=directory,
            options=options,
            build_tracker=build_tracker,
            session=session,
            finder=finder,
            download_dir=options.download_dir,
            use_user_site=False,
            verbosity=self.verbosity,
        )

        resolver = self.make_resolver(
            preparer=preparer,
            finder=finder,
            options=options,
            ignore_requires_python=options.ignore_requires_python,
            use_pep517=options.use_pep517,
            py_version_info=options.python_version,
        )

        self.trace_basic_info(finder)

        requirement_set = resolver.resolve(reqs, check_supported_wheels=True)

        downloaded: List[str] = []
        for req in requirement_set.requirements.values():
            if req.satisfied_by is None:
                assert req.name is not None
                preparer.save_linked_requirement(req)
                downloaded.append(req.name)

        preparer.prepare_linked_requirements_more(requirement_set.requirements.values())
        requirement_set.warn_legacy_versions_and_specifiers()

        if downloaded:
            write_output("Successfully downloaded %s", " ".join(downloaded))

        return SUCCESS
python3.12/site-packages/pip/_internal/commands/list.py000064400000030242151732701370017011 0ustar00import json
import logging
from optparse import Values
from typing import TYPE_CHECKING, Generator, List, Optional, Sequence, Tuple, cast

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.cli import cmdoptions
from pip._internal.cli.req_command import IndexGroupCommand
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.exceptions import CommandError
from pip._internal.index.collector import LinkCollector
from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata import BaseDistribution, get_environment
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.network.session import PipSession
from pip._internal.utils.compat import stdlib_pkgs
from pip._internal.utils.misc import tabulate, write_output

if TYPE_CHECKING:
    from pip._internal.metadata.base import DistributionVersion

    class _DistWithLatestInfo(BaseDistribution):
        """Give the distribution object a couple of extra fields.

        These will be populated during ``get_outdated()``. This is dirty but
        makes the rest of the code much cleaner.
        """

        latest_version: DistributionVersion
        latest_filetype: str

    _ProcessedDists = Sequence[_DistWithLatestInfo]


logger = logging.getLogger(__name__)


class ListCommand(IndexGroupCommand):
    """
    List installed packages, including editables.

    Packages are listed in a case-insensitive sorted order.
    """

    ignore_require_venv = True
    usage = """
      %prog [options]"""

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "-o",
            "--outdated",
            action="store_true",
            default=False,
            help="List outdated packages",
        )
        self.cmd_opts.add_option(
            "-u",
            "--uptodate",
            action="store_true",
            default=False,
            help="List uptodate packages",
        )
        self.cmd_opts.add_option(
            "-e",
            "--editable",
            action="store_true",
            default=False,
            help="List editable projects.",
        )
        self.cmd_opts.add_option(
            "-l",
            "--local",
            action="store_true",
            default=False,
            help=(
                "If in a virtualenv that has global access, do not list "
                "globally-installed packages."
            ),
        )
        self.cmd_opts.add_option(
            "--user",
            dest="user",
            action="store_true",
            default=False,
            help="Only output packages installed in user-site.",
        )
        self.cmd_opts.add_option(cmdoptions.list_path())
        self.cmd_opts.add_option(
            "--pre",
            action="store_true",
            default=False,
            help=(
                "Include pre-release and development versions. By default, "
                "pip only finds stable versions."
            ),
        )

        self.cmd_opts.add_option(
            "--format",
            action="store",
            dest="list_format",
            default="columns",
            choices=("columns", "freeze", "json"),
            help=(
                "Select the output format among: columns (default), freeze, or json. "
                "The 'freeze' format cannot be used with the --outdated option."
            ),
        )

        self.cmd_opts.add_option(
            "--not-required",
            action="store_true",
            dest="not_required",
            help="List packages that are not dependencies of installed packages.",
        )

        self.cmd_opts.add_option(
            "--exclude-editable",
            action="store_false",
            dest="include_editable",
            help="Exclude editable package from output.",
        )
        self.cmd_opts.add_option(
            "--include-editable",
            action="store_true",
            dest="include_editable",
            help="Include editable package from output.",
            default=True,
        )
        self.cmd_opts.add_option(cmdoptions.list_exclude())
        index_opts = cmdoptions.make_option_group(cmdoptions.index_group, self.parser)

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, self.cmd_opts)

    def _build_package_finder(
        self, options: Values, session: PipSession
    ) -> PackageFinder:
        """
        Create a package finder appropriate to this list command.
        """
        link_collector = LinkCollector.create(session, options=options)

        # Pass allow_yanked=False to ignore yanked versions.
        selection_prefs = SelectionPreferences(
            allow_yanked=False,
            allow_all_prereleases=options.pre,
        )

        return PackageFinder.create(
            link_collector=link_collector,
            selection_prefs=selection_prefs,
        )

    def run(self, options: Values, args: List[str]) -> int:
        if options.outdated and options.uptodate:
            raise CommandError("Options --outdated and --uptodate cannot be combined.")

        if options.outdated and options.list_format == "freeze":
            raise CommandError(
                "List format 'freeze' cannot be used with the --outdated option."
            )

        cmdoptions.check_list_path_option(options)

        skip = set(stdlib_pkgs)
        if options.excludes:
            skip.update(canonicalize_name(n) for n in options.excludes)

        packages: "_ProcessedDists" = [
            cast("_DistWithLatestInfo", d)
            for d in get_environment(options.path).iter_installed_distributions(
                local_only=options.local,
                user_only=options.user,
                editables_only=options.editable,
                include_editables=options.include_editable,
                skip=skip,
            )
        ]

        # get_not_required must be called firstly in order to find and
        # filter out all dependencies correctly. Otherwise a package
        # can't be identified as requirement because some parent packages
        # could be filtered out before.
        if options.not_required:
            packages = self.get_not_required(packages, options)

        if options.outdated:
            packages = self.get_outdated(packages, options)
        elif options.uptodate:
            packages = self.get_uptodate(packages, options)

        self.output_package_listing(packages, options)
        return SUCCESS

    def get_outdated(
        self, packages: "_ProcessedDists", options: Values
    ) -> "_ProcessedDists":
        return [
            dist
            for dist in self.iter_packages_latest_infos(packages, options)
            if dist.latest_version > dist.version
        ]

    def get_uptodate(
        self, packages: "_ProcessedDists", options: Values
    ) -> "_ProcessedDists":
        return [
            dist
            for dist in self.iter_packages_latest_infos(packages, options)
            if dist.latest_version == dist.version
        ]

    def get_not_required(
        self, packages: "_ProcessedDists", options: Values
    ) -> "_ProcessedDists":
        dep_keys = {
            canonicalize_name(dep.name)
            for dist in packages
            for dep in (dist.iter_dependencies() or ())
        }

        # Create a set to remove duplicate packages, and cast it to a list
        # to keep the return type consistent with get_outdated and
        # get_uptodate
        return list({pkg for pkg in packages if pkg.canonical_name not in dep_keys})

    def iter_packages_latest_infos(
        self, packages: "_ProcessedDists", options: Values
    ) -> Generator["_DistWithLatestInfo", None, None]:
        with self._build_session(options) as session:
            finder = self._build_package_finder(options, session)

            def latest_info(
                dist: "_DistWithLatestInfo",
            ) -> Optional["_DistWithLatestInfo"]:
                all_candidates = finder.find_all_candidates(dist.canonical_name)
                if not options.pre:
                    # Remove prereleases
                    all_candidates = [
                        candidate
                        for candidate in all_candidates
                        if not candidate.version.is_prerelease
                    ]

                evaluator = finder.make_candidate_evaluator(
                    project_name=dist.canonical_name,
                )
                best_candidate = evaluator.sort_best_candidate(all_candidates)
                if best_candidate is None:
                    return None

                remote_version = best_candidate.version
                if best_candidate.link.is_wheel:
                    typ = "wheel"
                else:
                    typ = "sdist"
                dist.latest_version = remote_version
                dist.latest_filetype = typ
                return dist

            for dist in map(latest_info, packages):
                if dist is not None:
                    yield dist

    def output_package_listing(
        self, packages: "_ProcessedDists", options: Values
    ) -> None:
        packages = sorted(
            packages,
            key=lambda dist: dist.canonical_name,
        )
        if options.list_format == "columns" and packages:
            data, header = format_for_columns(packages, options)
            self.output_package_listing_columns(data, header)
        elif options.list_format == "freeze":
            for dist in packages:
                if options.verbose >= 1:
                    write_output(
                        "%s==%s (%s)", dist.raw_name, dist.version, dist.location
                    )
                else:
                    write_output("%s==%s", dist.raw_name, dist.version)
        elif options.list_format == "json":
            write_output(format_for_json(packages, options))

    def output_package_listing_columns(
        self, data: List[List[str]], header: List[str]
    ) -> None:
        # insert the header first: we need to know the size of column names
        if len(data) > 0:
            data.insert(0, header)

        pkg_strings, sizes = tabulate(data)

        # Create and add a separator.
        if len(data) > 0:
            pkg_strings.insert(1, " ".join("-" * x for x in sizes))

        for val in pkg_strings:
            write_output(val)


def format_for_columns(
    pkgs: "_ProcessedDists", options: Values
) -> Tuple[List[List[str]], List[str]]:
    """
    Convert the package data into something usable
    by output_package_listing_columns.
    """
    header = ["Package", "Version"]

    running_outdated = options.outdated
    if running_outdated:
        header.extend(["Latest", "Type"])

    has_editables = any(x.editable for x in pkgs)
    if has_editables:
        header.append("Editable project location")

    if options.verbose >= 1:
        header.append("Location")
    if options.verbose >= 1:
        header.append("Installer")

    data = []
    for proj in pkgs:
        # if we're working on the 'outdated' list, separate out the
        # latest_version and type
        row = [proj.raw_name, str(proj.version)]

        if running_outdated:
            row.append(str(proj.latest_version))
            row.append(proj.latest_filetype)

        if has_editables:
            row.append(proj.editable_project_location or "")

        if options.verbose >= 1:
            row.append(proj.location or "")
        if options.verbose >= 1:
            row.append(proj.installer)

        data.append(row)

    return data, header


def format_for_json(packages: "_ProcessedDists", options: Values) -> str:
    data = []
    for dist in packages:
        info = {
            "name": dist.raw_name,
            "version": str(dist.version),
        }
        if options.verbose >= 1:
            info["location"] = dist.location or ""
            info["installer"] = dist.installer
        if options.outdated:
            info["latest_version"] = str(dist.latest_version)
            info["latest_filetype"] = dist.latest_filetype
        editable_project_location = dist.editable_project_location
        if editable_project_location:
            info["editable_project_location"] = editable_project_location
        data.append(info)
    return json.dumps(data)
python3.12/site-packages/pip/_internal/commands/inspect.py000064400000006164151732701370017511 0ustar00import logging
from optparse import Values
from typing import Any, Dict, List

from pip._vendor.packaging.markers import default_environment
from pip._vendor.rich import print_json

from pip import __version__
from pip._internal.cli import cmdoptions
from pip._internal.cli.req_command import Command
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.metadata import BaseDistribution, get_environment
from pip._internal.utils.compat import stdlib_pkgs
from pip._internal.utils.urls import path_to_url

logger = logging.getLogger(__name__)


class InspectCommand(Command):
    """
    Inspect the content of a Python environment and produce a report in JSON format.
    """

    ignore_require_venv = True
    usage = """
      %prog [options]"""

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "--local",
            action="store_true",
            default=False,
            help=(
                "If in a virtualenv that has global access, do not list "
                "globally-installed packages."
            ),
        )
        self.cmd_opts.add_option(
            "--user",
            dest="user",
            action="store_true",
            default=False,
            help="Only output packages installed in user-site.",
        )
        self.cmd_opts.add_option(cmdoptions.list_path())
        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        cmdoptions.check_list_path_option(options)
        dists = get_environment(options.path).iter_installed_distributions(
            local_only=options.local,
            user_only=options.user,
            skip=set(stdlib_pkgs),
        )
        output = {
            "version": "1",
            "pip_version": __version__,
            "installed": [self._dist_to_dict(dist) for dist in dists],
            "environment": default_environment(),
            # TODO tags? scheme?
        }
        print_json(data=output)
        return SUCCESS

    def _dist_to_dict(self, dist: BaseDistribution) -> Dict[str, Any]:
        res: Dict[str, Any] = {
            "metadata": dist.metadata_dict,
            "metadata_location": dist.info_location,
        }
        # direct_url. Note that we don't have download_info (as in the installation
        # report) since it is not recorded in installed metadata.
        direct_url = dist.direct_url
        if direct_url is not None:
            res["direct_url"] = direct_url.to_dict()
        else:
            # Emulate direct_url for legacy editable installs.
            editable_project_location = dist.editable_project_location
            if editable_project_location is not None:
                res["direct_url"] = {
                    "url": path_to_url(editable_project_location),
                    "dir_info": {
                        "editable": True,
                    },
                }
        # installer
        installer = dist.installer
        if dist.installer:
            res["installer"] = installer
        # requested
        if dist.installed_with_dist_info:
            res["requested"] = dist.requested
        return res
python3.12/site-packages/pip/_internal/commands/cache.py000064400000017420151732701370017104 0ustar00import os
import textwrap
from optparse import Values
from typing import Any, List

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.exceptions import CommandError, PipError
from pip._internal.utils import filesystem
from pip._internal.utils.logging import getLogger

logger = getLogger(__name__)


class CacheCommand(Command):
    """
    Inspect and manage pip's wheel cache.

    Subcommands:

    - dir: Show the cache directory.
    - info: Show information about the cache.
    - list: List filenames of packages stored in the cache.
    - remove: Remove one or more package from the cache.
    - purge: Remove all items from the cache.

    ``<pattern>`` can be a glob expression or a package name.
    """

    ignore_require_venv = True
    usage = """
        %prog dir
        %prog info
        %prog list [<pattern>] [--format=[human, abspath]]
        %prog remove <pattern>
        %prog purge
    """

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "--format",
            action="store",
            dest="list_format",
            default="human",
            choices=("human", "abspath"),
            help="Select the output format among: human (default) or abspath",
        )

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        handlers = {
            "dir": self.get_cache_dir,
            "info": self.get_cache_info,
            "list": self.list_cache_items,
            "remove": self.remove_cache_items,
            "purge": self.purge_cache,
        }

        if not options.cache_dir:
            logger.error("pip cache commands can not function since cache is disabled.")
            return ERROR

        # Determine action
        if not args or args[0] not in handlers:
            logger.error(
                "Need an action (%s) to perform.",
                ", ".join(sorted(handlers)),
            )
            return ERROR

        action = args[0]

        # Error handling happens here, not in the action-handlers.
        try:
            handlers[action](options, args[1:])
        except PipError as e:
            logger.error(e.args[0])
            return ERROR

        return SUCCESS

    def get_cache_dir(self, options: Values, args: List[Any]) -> None:
        if args:
            raise CommandError("Too many arguments")

        logger.info(options.cache_dir)

    def get_cache_info(self, options: Values, args: List[Any]) -> None:
        if args:
            raise CommandError("Too many arguments")

        num_http_files = len(self._find_http_files(options))
        num_packages = len(self._find_wheels(options, "*"))

        http_cache_location = self._cache_dir(options, "http-v2")
        old_http_cache_location = self._cache_dir(options, "http")
        wheels_cache_location = self._cache_dir(options, "wheels")
        http_cache_size = filesystem.format_size(
            filesystem.directory_size(http_cache_location)
            + filesystem.directory_size(old_http_cache_location)
        )
        wheels_cache_size = filesystem.format_directory_size(wheels_cache_location)

        message = (
            textwrap.dedent(
                """
                    Package index page cache location (pip v23.3+): {http_cache_location}
                    Package index page cache location (older pips): {old_http_cache_location}
                    Package index page cache size: {http_cache_size}
                    Number of HTTP files: {num_http_files}
                    Locally built wheels location: {wheels_cache_location}
                    Locally built wheels size: {wheels_cache_size}
                    Number of locally built wheels: {package_count}
                """  # noqa: E501
            )
            .format(
                http_cache_location=http_cache_location,
                old_http_cache_location=old_http_cache_location,
                http_cache_size=http_cache_size,
                num_http_files=num_http_files,
                wheels_cache_location=wheels_cache_location,
                package_count=num_packages,
                wheels_cache_size=wheels_cache_size,
            )
            .strip()
        )

        logger.info(message)

    def list_cache_items(self, options: Values, args: List[Any]) -> None:
        if len(args) > 1:
            raise CommandError("Too many arguments")

        if args:
            pattern = args[0]
        else:
            pattern = "*"

        files = self._find_wheels(options, pattern)
        if options.list_format == "human":
            self.format_for_human(files)
        else:
            self.format_for_abspath(files)

    def format_for_human(self, files: List[str]) -> None:
        if not files:
            logger.info("No locally built wheels cached.")
            return

        results = []
        for filename in files:
            wheel = os.path.basename(filename)
            size = filesystem.format_file_size(filename)
            results.append(f" - {wheel} ({size})")
        logger.info("Cache contents:\n")
        logger.info("\n".join(sorted(results)))

    def format_for_abspath(self, files: List[str]) -> None:
        if files:
            logger.info("\n".join(sorted(files)))

    def remove_cache_items(self, options: Values, args: List[Any]) -> None:
        if len(args) > 1:
            raise CommandError("Too many arguments")

        if not args:
            raise CommandError("Please provide a pattern")

        files = self._find_wheels(options, args[0])

        no_matching_msg = "No matching packages"
        if args[0] == "*":
            # Only fetch http files if no specific pattern given
            files += self._find_http_files(options)
        else:
            # Add the pattern to the log message
            no_matching_msg += ' for pattern "{}"'.format(args[0])

        if not files:
            logger.warning(no_matching_msg)

        for filename in files:
            os.unlink(filename)
            logger.verbose("Removed %s", filename)
        logger.info("Files removed: %s", len(files))

    def purge_cache(self, options: Values, args: List[Any]) -> None:
        if args:
            raise CommandError("Too many arguments")

        return self.remove_cache_items(options, ["*"])

    def _cache_dir(self, options: Values, subdir: str) -> str:
        return os.path.join(options.cache_dir, subdir)

    def _find_http_files(self, options: Values) -> List[str]:
        old_http_dir = self._cache_dir(options, "http")
        new_http_dir = self._cache_dir(options, "http-v2")
        return filesystem.find_files(old_http_dir, "*") + filesystem.find_files(
            new_http_dir, "*"
        )

    def _find_wheels(self, options: Values, pattern: str) -> List[str]:
        wheel_dir = self._cache_dir(options, "wheels")

        # The wheel filename format, as specified in PEP 427, is:
        #     {distribution}-{version}(-{build})?-{python}-{abi}-{platform}.whl
        #
        # Additionally, non-alphanumeric values in the distribution are
        # normalized to underscores (_), meaning hyphens can never occur
        # before `-{version}`.
        #
        # Given that information:
        # - If the pattern we're given contains a hyphen (-), the user is
        #   providing at least the version. Thus, we can just append `*.whl`
        #   to match the rest of it.
        # - If the pattern we're given doesn't contain a hyphen (-), the
        #   user is only providing the name. Thus, we append `-*.whl` to
        #   match the hyphen before the version, followed by anything else.
        #
        # PEP 427: https://www.python.org/dev/peps/pep-0427/
        pattern = pattern + ("*.whl" if "-" in pattern else "-*.whl")

        return filesystem.find_files(wheel_dir, pattern)
python3.12/site-packages/pip/_internal/commands/index.py000064400000011271151732701370017146 0ustar00import logging
from optparse import Values
from typing import Any, Iterable, List, Optional, Union

from pip._vendor.packaging.version import LegacyVersion, Version

from pip._internal.cli import cmdoptions
from pip._internal.cli.req_command import IndexGroupCommand
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.commands.search import print_dist_installation_info
from pip._internal.exceptions import CommandError, DistributionNotFound, PipError
from pip._internal.index.collector import LinkCollector
from pip._internal.index.package_finder import PackageFinder
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.models.target_python import TargetPython
from pip._internal.network.session import PipSession
from pip._internal.utils.misc import write_output

logger = logging.getLogger(__name__)


class IndexCommand(IndexGroupCommand):
    """
    Inspect information available from package indexes.
    """

    ignore_require_venv = True
    usage = """
        %prog versions <package>
    """

    def add_options(self) -> None:
        cmdoptions.add_target_python_options(self.cmd_opts)

        self.cmd_opts.add_option(cmdoptions.ignore_requires_python())
        self.cmd_opts.add_option(cmdoptions.pre())
        self.cmd_opts.add_option(cmdoptions.no_binary())
        self.cmd_opts.add_option(cmdoptions.only_binary())

        index_opts = cmdoptions.make_option_group(
            cmdoptions.index_group,
            self.parser,
        )

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        handlers = {
            "versions": self.get_available_package_versions,
        }

        logger.warning(
            "pip index is currently an experimental command. "
            "It may be removed/changed in a future release "
            "without prior warning."
        )

        # Determine action
        if not args or args[0] not in handlers:
            logger.error(
                "Need an action (%s) to perform.",
                ", ".join(sorted(handlers)),
            )
            return ERROR

        action = args[0]

        # Error handling happens here, not in the action-handlers.
        try:
            handlers[action](options, args[1:])
        except PipError as e:
            logger.error(e.args[0])
            return ERROR

        return SUCCESS

    def _build_package_finder(
        self,
        options: Values,
        session: PipSession,
        target_python: Optional[TargetPython] = None,
        ignore_requires_python: Optional[bool] = None,
    ) -> PackageFinder:
        """
        Create a package finder appropriate to the index command.
        """
        link_collector = LinkCollector.create(session, options=options)

        # Pass allow_yanked=False to ignore yanked versions.
        selection_prefs = SelectionPreferences(
            allow_yanked=False,
            allow_all_prereleases=options.pre,
            ignore_requires_python=ignore_requires_python,
        )

        return PackageFinder.create(
            link_collector=link_collector,
            selection_prefs=selection_prefs,
            target_python=target_python,
        )

    def get_available_package_versions(self, options: Values, args: List[Any]) -> None:
        if len(args) != 1:
            raise CommandError("You need to specify exactly one argument")

        target_python = cmdoptions.make_target_python(options)
        query = args[0]

        with self._build_session(options) as session:
            finder = self._build_package_finder(
                options=options,
                session=session,
                target_python=target_python,
                ignore_requires_python=options.ignore_requires_python,
            )

            versions: Iterable[Union[LegacyVersion, Version]] = (
                candidate.version for candidate in finder.find_all_candidates(query)
            )

            if not options.pre:
                # Remove prereleases
                versions = (
                    version for version in versions if not version.is_prerelease
                )
            versions = set(versions)

            if not versions:
                raise DistributionNotFound(
                    "No matching distribution found for {}".format(query)
                )

            formatted_versions = [str(ver) for ver in sorted(versions, reverse=True)]
            latest = formatted_versions[0]

        write_output("{} ({})".format(query, latest))
        write_output("Available versions: {}".format(", ".join(formatted_versions)))
        print_dist_installation_info(query, latest)
python3.12/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-312.pyc000064400000010456151732701370023664 0ustar00�

R`id���ddlZddlmZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZd	efd
�Zd	eefd�ZGd�d
e	�Zy)�N)�Values)�AbstractSet�List)�
cmdoptions)�Command)�SUCCESS)�freeze)�stdlib_pkgs�returnc�(�tjdkS)N)��)�sys�version_info����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/freeze.py�_should_suppress_build_backendsrs�����g�%�%rc�.�dh}t�r|hd�z}|S)N�pip>�wheel�
distribute�
setuptools)r)�pkgss r�	_dev_pkgsrs���7�D�&�(��5�5���Krc�:�eZdZdZdZdZd
d�Zdedee	de
fd	�Zy)�
FreezeCommandzx
    Output installed packages in requirements format.

    packages are listed in a case-insensitive sorted order.
    z
      %prog [options])�ext://sys.stderrrrNc��|jjddddgdd��|jjdd	d
ddd
��|jjddddd��|jjtj��|jjddddj	djt
�����|jjdddd��|jjtj��|jjd|j�y)Nz-rz
--requirement�requirements�append�filez}Use the order in the given requirements file and its comments when generating output. This option can be used multiple times.)�dest�action�default�metavar�helpz-lz--local�local�
store_trueFzUIf in a virtualenv that has global access, do not output globally-installed packages.)r#r$r%r'z--user�userz,Only output packages installed in user-site.z--all�
freeze_allz,Do not skip these packages in the output: {}z, )r#r$r'z--exclude-editable�exclude_editablez%Exclude editable package from output.r)
�cmd_opts�
add_optionr�	list_path�format�joinr�list_exclude�parser�insert_option_group)�selfs r�add_optionszFreezeCommand.add_options$s6���
�
� � �������'�	!�	
�	
�
�
� � ������/�	!�
	
�	
�
�
� � �����?�	!�	
�	
�
�
� � ��!5�!5�!7�8��
�
� � ������f�T�Y�Y�y�{�3�4�
	!�	
�	
�
�
� � � �#��8�		!�	
�	
�
�
� � ��!8�!8�!:�;����'�'��4�=�=�9r�options�argsc	���tt�}|js|jt	��|j
r|j|j
�t
j|�t|j|j|j|j|j||j��D]$}tj j#|dz��&t$S)N)�requirement�
local_only�	user_only�paths�isolated�skipr,�
)�setr
r+�updater�excludesr�check_list_path_optionr	r r(r*�path�
isolated_moder,r�stdout�writer)r5r7r8r?�lines     r�runzFreezeCommand.runXs����;����!�!��K�K�	��$�����K�K��(�(�)��)�)�'�2���,�,��}�}��l�l��,�,��*�*��$�5�5�
�D�
�J�J���T�D�[�)�
��r)rN)�__name__�
__module__�__qualname__�__doc__�usage�log_streamsr6rr�str�intrJrrrrrs7���
�E�:�K�2:�h�6���c���s�rr)r�optparser�typingrr�pip._internal.clir�pip._internal.cli.base_commandr�pip._internal.cli.status_codesr�pip._internal.operations.freezer	�pip._internal.utils.compatr
�boolrrQrrrrr�<module>r[sH��
��$�(�2�2�2�2�&��&��;�s�#��S�G�Srpython3.12/site-packages/pip/_internal/commands/__pycache__/show.cpython-312.pyc000064400000023044151732701370023361 0ustar00�

R`i���ddlZddlmZddlmZmZmZmZmZm	Z	ddl
mZddlm
Z
ddlmZmZddlmZmZddlmZej,e�ZGd	�d
e
�ZGd�de�Zd
eedeeddffd�Zdeedededefd�Zy)�N)�Values)�	Generator�Iterable�Iterator�List�
NamedTuple�Optional)�canonicalize_name)�Command)�ERROR�SUCCESS)�BaseDistribution�get_default_environment)�write_outputc�:�eZdZdZdZdZd
d�Zdedee	de
fd	�Zy)�ShowCommandzx
    Show information about one or more installed packages.

    The output is in RFC-compliant mail header format.
    z$
      %prog [options] <package> ...T�returnNc��|jjdddddd��|jjd|j�y)	Nz-fz--files�files�
store_trueFz7Show the full list of installed files for each package.)�dest�action�default�helpr)�cmd_opts�
add_option�parser�insert_option_group)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/show.py�add_optionszShowCommand.add_optionssE���
�
� � ������J�
	!�	
�	
���'�'��4�=�=�9��options�argsc��|stjd�tS|}t|�}t	||j
|j��stStS)Nz.ERROR: Please provide a package name or names.)�
list_files�verbose)�logger�warningr�search_packages_info�
print_resultsrr'r
)rr#r$�query�resultss     r �runzShowCommand.run&sI����N�N�K�L��L���&�u�-�����
�
�w���
��L��r")rN)�__name__�
__module__�__qualname__�__doc__�usage�ignore_require_venvr!rr�str�intr.�r"r rrs7���
'�E���
:��6���c���s�r"rc���eZdZUeed<eed<eed<eeed<eeed<eeed<eed<eed<eeed	<eed
<eed<eeed<eed
<eed<eed<eeed<eeeed<y)�_PackageInfo�name�version�location�editable_project_location�requires�required_by�	installer�metadata_version�classifiers�summary�homepage�project_urls�author�author_email�license�entry_pointsrN)r/r0r1r5�__annotations__r	rr7r"r r9r94s���

�I�
�L��M�'��}�,��3�i���c����N����c���
�L��M��s�)���K���
�L��s�)���D��I��r"r9r,rc
#�8�K�t�}|j�D�cic]}|j|��c}�|D�cgc]
}t|���}}t	t||�D��cgc]\}}|�vs�|��c}}�}|r%tjddj|��dtdttf�fd�}|D�]�}	�|}t	d�|j�D�tj��}	t	||�tj��}
	|jd�}|j!d	�
�}|j%�}
|
�d}nt	|
�}|j&}t)d%id|j*�d
t|j,��d|j.xsd�d|j0�d|	�d|
�d|j2�d|j4xsd�d|j7dg��d|j9dd��d|j9dd��d|j7dg��d|j9dd��d|j9d d��d!|j9d"d��d#|�d$|�������ycc}wcc}wcc}}w#t$rY���wxYw#t"$rg}Y��YwxYw�w)&z�
    Gather details from installed distributions. Print distribution name,
    version, location, and installed files. Installed files requires a
    pip generated 'installed-files.txt' in the distributions '.egg-info'
    directory.
    zPackage(s) not found: %s�, �current_distrc�8����fd��j�D�S)Nc3���K�|]T}�j|j�D�chc]}t|j���c}vr|jdxsd���Vycc}w�w)�Name�UNKNOWNN)�canonical_name�iter_dependenciesr
r:�metadata)�.0�dist�drMs   �r �	<genexpr>zHsearch_packages_info.<locals>._get_requiring_packages.<locals>.<genexpr>Zsc�����
�*���*�*�37�3I�3I�3K�L�3K�a�!�!�&�&�)�3K�L�M�
�M�M�&�!�.�Y�.�*��L�s�"A"�A�!A")�values)rM�	installeds`�r �_get_requiring_packagesz5search_packages_info.<locals>._get_requiring_packagesYs���
�!�(�(�*�
�	
r"c3�4K�|]}|j���y�w)N)r:)rU�reqs  r rXz'search_packages_info.<locals>.<genexpr>gs����H�/G��3�8�8�/G�s�)�keyzentry_points.txtF)�keependsNr:r;r<�r=r>r?r@rArB�
ClassifierrC�SummaryrDz	Home-pagerEzProject-URLrF�AuthorrGzAuthor-emailrH�LicenserIrr7)r�iter_all_distributionsrRr
�sorted�zipr(r)�joinrrr5�KeyErrorrS�lower�	read_text�
splitlines�FileNotFoundError�iter_declared_entriesrTr9�raw_namer;r<r=r@rA�get_all�get)r,�envrVr:�query_names�pkg�missingr[�
query_namer>r?�entry_points_textrI�
files_iterrrTrZs                @r r*r*Hs������"�
#�C�7:�7Q�7Q�7S�T�7S�t��$�$�d�*�7S�T�I�7<�=�u�t�$�T�*�u�K�=��"�5�+�6�O�6�)�$��#�Y�:N��6�O��G�����1�4�9�9�W�3E�F�
�.>�
�8�C�=�
�"�
�	��Z�(�D��H�t�/E�/E�/G�H�c�i�i�X���4�T�:��	�	�J��	� $���/A� B��,�7�7��7�G�L��/�/�1�
���)-�E��:�&�E��=�=���
����
�����%�
��]�]�(�b��
�'+�&D�&D�	
�
�
�$�

��n�n�
�"�2�2�8�b��
�!�(�(��r�:�
��L�L��B�/�
��\�\�+�r�2�
�"�)�)�-��<�
��<�<��"�-�
�"���n�b�9�
��L�L��B�/�
� &�!
�"�#
�	
�/"��!U��=��O�� �	��	��!�	��L�	�sw�J�I(�J�I-�
J�#I2
�0I2
�4AJ�I8�AJ�#J�=D;J�8	J�J�J�J�J�J�J�J�
distributionsr&r'c��d}t|�D�];\}}d}|dkDrtd�td|j�td|j�td|j�td|j
�td	|j�td
|j�td|j�td|j�|j�td
|j�tddj|j��tddj|j��|r�td|j�td|j�td�|j D]}td|��td�|j"D]}td|j%���td�|j&D]}td|��|s���td�|j(�
td���|j(D]}	td|	j%�����>|S)zC
    Print the information from installed distributions found.
    FTrz---zName: %szVersion: %szSummary: %sz
Home-page: %sz
Author: %szAuthor-email: %szLicense: %szLocation: %szEditable project location: %szRequires: %srLzRequired-by: %szMetadata-Version: %sz
Installer: %szClassifiers:z  %sz
Entry-points:z
Project-URLs:zFiles:z+Cannot locate RECORD or installed-files.txt)�	enumeraterr:r;rCrDrFrGrHr<r=rhr>r?rAr@rBrI�striprEr)
ryr&r'�results_printed�irV�
classifier�entry�project_url�lines
          r r+r+�s����O��]�+���4����q�5�����Z����+��]�D�L�L�1��]�D�L�L�1��_�d�m�m�4��\�4�;�;�/��'��):�):�;��]�D�L�L�1��^�T�]�]�3��)�)�5��/��1O�1O�
�	�^�T�Y�Y�t�}�}�%=�>��&��	�	�$�2B�2B�(C�D���/��1F�1F�G���$�.�.�9���(�"�.�.�
��V�Z�0�/���)��*�*���V�U�[�[�]�3�+���)�#�0�0���V�[�1� 1����"��z�z�!��J�K� �J�J�D� ������6�'�K,�N�r")�logging�optparser�typingrrrrrr	�pip._vendor.packaging.utilsr
�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr
�pip._internal.metadatarr�pip._internal.utils.miscr�	getLoggerr/r(rr9r5r*�boolr+r7r"r �<module>r�s�����L�L�9�2�9�L�1�	��	�	�8�	$��"�'�"�J�:��(B
��S�	�B
�i��d�D�8P�.Q�B
�J0��L�)�0��0��0�
�	0r"python3.12/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-312.pyc000064400000007721151732701370024144 0ustar00�

R`i*���UdZddlZddlmZddlmZmZmZddlm	Z	edd�Z
ide
d	d
d��de
d
dd��de
ddd��de
ddd��de
ddd��de
ddd��d e
d!d"d#��d$e
d%d&d'��d(e
d)d*d+��d,e
d-d.d/��d0e
d1d2d3��d4e
d5d6d7��d8e
d9d:d;��d<e
d=d>d?��d@e
dAdBdC��dDe
dEdFdG��dHe
dIdJdK��Zeee
fe
dL<dMedNedOe	fdP�ZdMedOeefdQ�Zy)Rz%
Package containing all pip commands
�N)�
namedtuple)�Any�Dict�Optional)�Command�CommandInfoz module_path, class_name, summary�installzpip._internal.commands.install�InstallCommandzInstall packages.�downloadzpip._internal.commands.download�DownloadCommandzDownload packages.�	uninstallz pip._internal.commands.uninstall�UninstallCommandzUninstall packages.�freezezpip._internal.commands.freeze�
FreezeCommandz1Output installed packages in requirements format.�inspectzpip._internal.commands.inspect�InspectCommandzInspect the python environment.�listzpip._internal.commands.list�ListCommandzList installed packages.�showzpip._internal.commands.show�ShowCommandz*Show information about installed packages.�checkzpip._internal.commands.check�CheckCommandz7Verify installed packages have compatible dependencies.�configz$pip._internal.commands.configuration�ConfigurationCommandz&Manage local and global configuration.�searchzpip._internal.commands.search�
SearchCommandzSearch PyPI for packages.�cachezpip._internal.commands.cache�CacheCommandz%Inspect and manage pip's wheel cache.�indexzpip._internal.commands.index�IndexCommandz3Inspect information available from package indexes.�wheelzpip._internal.commands.wheel�WheelCommandz$Build wheels from your requirements.�hashzpip._internal.commands.hash�HashCommandz#Compute hashes of package archives.�
completionz!pip._internal.commands.completion�CompletionCommandz-A helper command used for command completion.�debugzpip._internal.commands.debug�DebugCommandz&Show information useful for debugging.�helpzpip._internal.commands.help�HelpCommandzShow help for commands.�
commands_dict�name�kwargs�returnc�x�t|\}}}tj|�}t||�}|d||d�|��}|S)zF
    Create an instance of the Command class with the given name.
    )r,�summary�)r+�	importlib�
import_module�getattr)r,r-�module_path�
class_namer0�module�
command_class�commands        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/__init__.py�create_commandr;msJ��(5�T�':�$�K��W�
�
$�
$�[�
1�F��F�J�/�M��A��w�A�&�A�G��N�c�t�ddlm}|j�}||tj	��}|r|dSy)zCommand name auto-correct.r)�get_close_matchesN)�difflibr>�lowerr+�keys)r,r>�close_commandss   r:�get_similar_commandsrCys6��)��:�:�<�D�&�t�]�-?�-?�-A�B�N���a� � �r<)�__doc__r2�collectionsr�typingrrr�pip._internal.cli.base_commandrrr+�str�__annotations__r;rCr1r<r:�<module>rJsQ����"�&�&�2���(J�K��V)�
�{�(����V)���)����
V)���*����V)� 
�k�'��;��!V)�*�{�(��)��+V)�4�K�%��"�
�5V)�>�K�%��4�
�?V)�H�[�&��A��IV)�R
�k�.��0��SV)�\
�k�'��#��]V)�f�[�&��/��gV)�p�[�&��=��qV)�z�[�&��.��{V)�D�K�%��-�
�EV)�N�+�+��7��OV)�X�[�&��0��YV)�b�K�%��!�
�cV)�
�t�C��$�%�V�r	��	��	��	��s��x��}�r<python3.12/site-packages/pip/_internal/commands/__pycache__/search.cpython-312.pyc000064400000016731151732701370023653 0ustar00�

R`iA�	��ddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZm
Z
mZddlmZddlmZddlmZddlmZmZdd	lmZdd
lmZddlmZddlm Z dd
l!m"Z"ddl#m$Z$erddl
m%Z%Gd�de%�Z&ejNe(�Z)Gd�dee�Z*de
ee+e+fde
dfd�Z,de+de+ddfd�Z-		dde
ddee.dee.ddfd�Z/de
e+de+fd�Z0y) �N)�OrderedDict)�Values)�
TYPE_CHECKING�Dict�List�Optional)�parse)�Command)�SessionCommandMixin)�NO_MATCHES_FOUND�SUCCESS)�CommandError)�get_default_environment)�PyPI)�PipXmlrpcTransport)�
indent_log)�write_output)�	TypedDictc�2�eZdZUeed<eed<eeed<y)�TransformedHit�name�summary�versionsN)�__name__�
__module__�__qualname__�str�__annotations__r����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/search.pyrrs���	����s�)�r rc	�d�eZdZdZdZdZdd�Zdedee	de
fd	�Zd
ee	dedeee	e	ffd�Z
y)
�
SearchCommandz@Search for PyPI packages whose name or summary contains <query>.z
      %prog [options] <query>T�returnNc��|jjddddtjd��|jjd|j�y)Nz-iz--index�index�URLz3Base URL of Python Package Index (default %default))�dest�metavar�default�helpr)�cmd_opts�
add_optionr�pypi_url�parser�insert_option_group)�selfs r!�add_optionszSearchCommand.add_options)sI���
�
� � ������M�M�F�
	!�	
�	
���'�'��4�=�=�9r �options�argsc��|std��|}|j||�}t|�}d}tjj�rt
j�d}t||��|rtStS)Nz)Missing required argument (search query).r)�terminal_width)r�search�transform_hits�sys�stdout�isatty�shutil�get_terminal_size�
print_resultsr
r)r1r3r4�query�	pypi_hits�hitsr6s       r!�runzSearchCommand.run5sp����J�K�K����K�K��w�/�	��i�(�����:�:����#�5�5�7��:�N��d�>�:���N��r r?c��|j}|j|�}t||�}tjj||�}	|j
||d�d�}t|t�sJ�|S#tjj$r7}dj|j|j��}	t|	��d}~wwxYw)N)rr�orz-XMLRPC request failed [code: {code}]
{string})�code�string)r&�get_default_sessionr�xmlrpc�client�ServerProxyr7�Fault�format�	faultCode�faultStringr�
isinstance�list)
r1r?r3�	index_url�session�	transport�pypirA�fault�messages
          r!r7zSearchCommand.searchEs����M�M�	��*�*�7�3��&�y�'�:�	��}�}�(�(��I�>��	(��;�;��%�@�$�G�D��$��%�%�%�����}�}�"�"�	(�F�M�M��_�_��(�(�N��G��w�'�'��	(�s�A4�4C�2C�C)r$N)rrr�__doc__�usage�ignore_require_venvr2rrr�intrBrr7rr r!r#r#"s`��J�
!�E���
:� �6� ��c�� �s� � �D��I����4��S�#�X��;O�r r#rAr$c��t�}|D]b}|d}|d}|d}||j�vr|||gd�||<�/||dj|�|t||d�k(s�[|||d<�dt	|j��S)z�
    The list from pypi is really a list of versions. We want a list of
    packages with the list of versions stored inline. This converts the
    list from pypi into one we can use.
    rr�version)rrrr)r�keys�append�highest_versionrP�values)rA�packages�hitrrr\s      r!r8r8Xs���-8�M�H����6�{���i�.���i�.���x�}�}��&��"�$�I��H�T�N�
�T�N�:�&�-�-�g�6��/�(�4�.��*D�E�E�,3����y�)�!�$����!�"�"r r�latestc�R�t�}|j|�}|�~t�5|j|k(rt	d|j�nDt	d|j�t|�jr
t	d|�nt	d|�ddd�yy#1swYyxYw)NzINSTALLED: %s (latest)z
INSTALLED: %sz=LATEST:    %s (pre-release; install with `pip install --pre`)z
LATEST:    %s)r�get_distributionrr\r�
parse_version�pre)rrc�env�dists    r!�print_dist_installation_inforjts���
!�
#�C�����%�D���
�\��|�|�v�%��5�t�|�|�D��_�d�l�l�;� ��(�,�,� �5���!��&�9��\��
�\�s�A+B�B&�name_column_widthr6c��|sy|�Nt|D�cgc]6}t|d�tt|jddg���z��8c}�dz}|D]�}|d}|dxsd}t|jddg��}|�=||z
dz
}|dkDr0t	j
||�}d	d
|dzzzj
|�}|�d|�d
�}	|	|��d|��}
	t|
�t||���ycc}w#t$rY��wxYw)Nrr�-�r���
�
� �z (�)z - )
�max�lenr_�get�textwrap�wrap�joinrrj�UnicodeEncodeError)rArkr6rbrrrc�target_width�
summary_lines�name_latest�lines           r!r>r>�sK��
��� �� $��#����F��$�s�?�3�7�7�:�PS�u�;U�+V�'W�W�#��
��

�	����6�{���i�.�&�B�� �����c�U�!;�<���%�)�,=�=��A�L��b� � (�
�
�g�|� D�
��#�):�Q�)>�"?�?�E�E�m�T����b����*���0�1�2�#�g�Y�?��	����(��v�6�����0"�	��	�s�;C.�C3�3	C?�>C?rc�$�t|t��S)N)�key)rvrf)rs r!r_r_�s���x�]�+�+r )NN)1�loggingr<r9ry�
xmlrpc.clientrH�collectionsr�optparser�typingrrrr�pip._vendor.packaging.versionr	rf�pip._internal.cli.base_commandr
�pip._internal.cli.req_commandr�pip._internal.cli.status_codesrr
�pip._internal.exceptionsr�pip._internal.metadatar�pip._internal.models.indexr�pip._internal.network.xmlrpcr�pip._internal.utils.loggingr�pip._internal.utils.miscrrr�	getLoggerr�loggerr#rr8rjrZr>r_rr r!�<module>r�s���
�
���#��6�6�@�2�=�D�1�:�+�;�2�1�� ����
��	�	�8�	$��3�G�0�3�l#��d�3��8�n�-�#�$�7G�2H�#�8:�s�:�C�:�D�:�*(,�$(�#�
��
 �#���}�#��S�M�#�
�	#�L,�d�3�i�,�C�,r python3.12/site-packages/pip/_internal/commands/__pycache__/debug.cpython-312.pyc000064400000024037151732701400023464 0ustar00�

R`i����ddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZm
Z
mZddlZddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%ejLe'�Z(de)deddfd�Z*d!d�Z+dee)e)ffd�Z,de)dee	fd�Z-de)dee)fd�Z.dee)e)fddfd�Z/d!d�Z0deddfd�Z1dede)fd�Z2Gd�d e�Z3y)"�N)�Values)�
ModuleType)�Any�Dict�List�Optional)�where)�parse)�
cmdoptions)�Command)�make_target_python)�SUCCESS)�
Configuration)�get_environment)�
indent_log)�get_pip_version�name�value�returnc�2�tjd||�y)Nz%s: %s)�logger�info)rrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/debug.py�
show_valuers��
�K�K��$��&�c��tjd�tjj}t�5t
d|�ddd�y#1swYyxYw)Nzsys.implementation:r)rr�sys�implementationrrr)�implementation_names r�show_sys_implementationr s;��
�K�K�%�&��,�,�1�1��	���6�.�/�
���s�
A�Ac� �tjjdd�5}|j�D�cgc]*}d|vs�|j	�jdd�d��,}}ddd�t
d�D��Scc}w#1swY� xYw)Nzpip._vendorz
vendor.txt�==� �rc3�@K�|]}|jdd����y�w)r"r$N)�split)�.0�lines  r�	<genexpr>z(create_vendor_txt_map.<locals>.<genexpr>.s����6����
�
�4��#��s�)�	importlib�	resources�	open_text�	readlines�stripr&�dict)�fr(�liness   r�create_vendor_txt_mapr2%s���	�	�	�	&�	&�}�l�	C�q�78�k�k�m�
�6C�d�t�t�|�D�J�J�L���s�A�&�q�)�m�	�
�
D��6��6�6�6��
�
D�	C�s!�B�	A?�%A?�#B�?B�B
�module_namec��|j�jdd�}|dk(rd}	td|��t�t	�d��ttj|�S#t$r|dk(rtjd	krYy�wxYw)
N�-�_�
setuptools�
pkg_resourceszpip._vendor.r)�level�
truststore)��
)�lower�replace�
__import__�globals�locals�getattr�pip�_vendor�ImportErrorr�version_info)r3s r�get_module_from_module_namerG1s����#�#�%�-�-�c�3�7�K��l�"�%����\�+��/���F�H�A�N��s�{�{�K�0�0�����,�&�3�+;�+;�g�+E��
��s�;A%�%!B
�B
c��t|�}t|dd�}|rk|si|j�J�ttj
j
|j�g�}|j|�}|rt|j�}|S)N�__version__)
rGrB�__file__r�os�path�dirname�get_distribution�str�version)r3�modulerP�env�dists     r�get_vendor_version_from_modulerTCss��
(��
5�F��f�m�T�2�G�
�g����*�*�*��r�w�w���v���?�@�A���#�#�K�0����$�,�,�'�G��Nr�vendor_txt_versionsc���|j�D]Y\}}d}t|�}|sd}|}n(t|�t|�k7rdj|�}tjd|||��[y)z{Log the actual version and print extra info if there is
    a conflict or if the actual version could not be imported.
    �zM (Unable to locate actual module version, using vendor.txt specified version)z5 (CONFLICT: vendor.txt suggests version should be {})z%s==%s%sN)�itemsrT�
parse_version�formatrr)rUr3�expected_version�
extra_message�actual_versions     r�show_actual_vendor_versionsr^Rs}��*=�)B�)B�)D�%��%��
�7��D���1�
�.�N�
�>�
*�m�<L�.M�
M�� �&�!1�2�
�	���J��^�]�K�*Erc��tjd�t�}t�5t	|�ddd�y#1swYyxYw)Nzvendored library versions:)rrr2rr^)rUs r�show_vendor_versionsr`gs0��
�K�K�,�-�/�1��	��#�$7�8�
���s	�?�A�optionsc��d}t|�}|j�}|j�}d}|rd|�d�}djt	|�|�}t
j
|�|jdkrt	|�|kDrd}|d|}nd}t�5|D] }t
j
t|���"|r'd	j|�
�}t
j
|�ddd�y#1swYyxYw)Nr<rWz
 (target: �)zCompatible tags: {}{}r$TFz?...
[First {tag_limit} tags shown. Pass --verbose to show all.])�	tag_limit)
r
�get_sorted_tags�format_givenrZ�lenrr�verboserrO)	rard�
target_python�tags�formatted_target�suffix�msg�tags_limited�tags	         r�	show_tagsrpos����I�&�w�/�M��(�(�*�D�%�1�1�3��
�F���.�/�q�1��
!�
(�
(��T��F�
;�C�
�K�K��������s�4�y�9�4����J�Y�����	���C��K�K��C��!���R��f�y�f�)�
�
�K�K���
���s
�AC1�1C:�configc�
�|j�D��chc]\}}|jdd�d��}}}|sygd�}|D�cgc]	}||vs�|��}}|syd|vr|jd�dj|�Scc}}wcc}w)N�.r$rz
Not specified)�install�wheel�download�globalz, )rXr&�remove�join)rq�keyr6�levels�levels_that_override_globalr9�global_overriding_levels       r�ca_bundle_infor~�s���17����
@��v�s�A�c�i�i��Q���"��F�
@���"B��!��!�%�U�.I�%I��6���#���6���
�
�h���9�9�V����A��
s�A:�	B�Bc�:�eZdZdZdZdZd
d�Zdedee	de
fd	�Zy)�DebugCommandz$
    Display debug information.
    z
      %prog <options>TrNc���tj|j�|jj	d|j�|jj
j
�y)Nr)r�add_target_python_options�cmd_opts�parser�insert_option_grouprq�load)�selfs r�add_optionszDebugCommand.add_options�sB���,�,�T�]�]�;����'�'��4�=�=�9��������!rra�argsc�T�tjd�tdt��tdtj
�tdtj�tdt	j��tdt	j��tdtj��tdtj�t�td	t|jj��td
t j"j%d
��tdt j"j%d��tdt'��td
t(j*j,�t/�t1|�t2S)Nz�This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.zpip versionzsys.versionzsys.executablezsys.getdefaultencodingzsys.getfilesystemencodingzlocale.getpreferredencodingzsys.platformz'cert' config value�REQUESTS_CA_BUNDLE�CURL_CA_BUNDLEzpip._vendor.certifi.where()zpip._vendor.DEBUNDLED)r�warningrrrrP�
executable�getdefaultencoding�getfilesystemencoding�locale�getpreferredencoding�platformr r~r�rqrK�environ�getr	rCrD�	DEBUNDLEDr`rpr)r�rar�s   r�runzDebugCommand.run�s�����
%�	
�	�=�/�"3�4��=�#�+�+�.��#�S�^�^�4��+�S�-C�-C�-E�F��.��0I�0I�0K�L��)��'�'�)�	
�	�>�3�<�<�0��!��(�.����9K�9K�*L�M��'������8L�)M�N��#�R�Z�Z�^�^�4D�%E�F��0�%�'�:��*�C�K�K�,A�,A�B����'���r�rN)�__name__�
__module__�__qualname__�__doc__�usage�ignore_require_venvr�rrrO�intr��rrr�r��s7���
�E���"�
�6���c���s�rr�r�)4�importlib.resourcesr*r��loggingrKr�optparser�typesr�typingrrrr�pip._vendorrC�pip._vendor.certifir	�pip._vendor.packaging.versionr
rY�pip._internal.clir�pip._internal.cli.base_commandr�pip._internal.cli.cmdoptionsr
�pip._internal.cli.status_codesr�pip._internal.configurationr�pip._internal.metadatar�pip._internal.utils.loggingr�pip._internal.utils.miscr�	getLoggerr�rrOrr r2rGrTr^r`rpr~r�r�rr�<module>r�s���
��	�
���,�,��%�@�(�2�;�2�5�2�2�4�	��	�	�8�	$��'�S�'��'��'�0�	7�t�C��H�~�	7��S��X�j�5I��$�����
��L�T�#�s�(�^�L��L�*9��v��$��@�=��S��"+�7�+rpython3.12/site-packages/pip/_internal/commands/__pycache__/cache.cpython-312.pyc000064400000023062151732701400023436 0ustar00�

R`i���ddlZddlZddlmZddlmZmZddlmZddl	m
Z
mZddlm
Z
mZddlmZddlmZee�ZGd	�d
e�Zy)�N)�Values)�Any�List)�Command)�ERROR�SUCCESS)�CommandError�PipError)�
filesystem)�	getLoggerc�,�eZdZdZdZdZdd�Zdedee	de
fd	�Zdedeeddfd
�Z
dedeeddfd�Zdedeeddfd�Zd
ee	ddfd�Zd
ee	ddfd�Zdedeeddfd�Zdedeeddfd�Zdede	de	fd�Zdedee	fd�Zdede	dee	fd�Zy)�CacheCommandaw
    Inspect and manage pip's wheel cache.

    Subcommands:

    - dir: Show the cache directory.
    - info: Show information about the cache.
    - list: List filenames of packages stored in the cache.
    - remove: Remove one or more package from the cache.
    - purge: Remove all items from the cache.

    ``<pattern>`` can be a glob expression or a package name.
    Tz�
        %prog dir
        %prog info
        %prog list [<pattern>] [--format=[human, abspath]]
        %prog remove <pattern>
        %prog purge
    �returnNc��|jjdddddd��|jjd|j�y)	Nz--format�store�list_format�human)r�abspathz:Select the output format among: human (default) or abspath)�action�dest�default�choices�helpr)�cmd_opts�
add_option�parser�insert_option_group)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/cache.py�add_optionszCacheCommand.add_options'sE���
�
� � �����(�M�
	!�	
�	
���'�'��4�=�=�9��options�argsc���|j|j|j|j|jd�}|j
stjd�tS|r|d|vr4tjddjt|���tS|d}	||||dd�tS#t$r2}tj|jd�tcYd}~Sd}~wwxYw)N)�dir�info�list�remove�purgez<pip cache commands can not function since cache is disabled.rzNeed an action (%s) to perform.z, �)�
get_cache_dir�get_cache_info�list_cache_items�remove_cache_items�purge_cache�	cache_dir�logger�errorr�join�sortedr
r#r)rr"r#�handlersr�es      r�runzCacheCommand.run3s����%�%��'�'��)�)��-�-��%�%�
��� � ��L�L�W�X��L��t�A�w�h�.��L�L�1��	�	�&��*�+�
��L��a���	��H�V��W�d�1�2�h�/�
���	�	��L�L������#��L��	�s�%B:�:	C5�'C0�*C5�0C5c�\�|rtd��tj|j�y)N�Too many arguments)r	r1r&r0�rr"r#s   rr+zCacheCommand.get_cache_dirSs#����3�4�4����G�%�%�&r!c	�6�|rtd��t|j|��}t|j|d��}|j	|d�}|j	|d�}|j	|d�}tjtj|�tj|�z�}tj|�}	tjd�j|||||||	��j�}
tj|
�y)Nr9�*�http-v2�http�wheelsa
                    Package index page cache location (pip v23.3+): {http_cache_location}
                    Package index page cache location (older pips): {old_http_cache_location}
                    Package index page cache size: {http_cache_size}
                    Number of HTTP files: {num_http_files}
                    Locally built wheels location: {wheels_cache_location}
                    Locally built wheels size: {wheels_cache_size}
                    Number of locally built wheels: {package_count}
                )�http_cache_location�old_http_cache_location�http_cache_size�num_http_files�wheels_cache_location�
package_count�wheels_cache_size)r	�len�_find_http_files�_find_wheels�
_cache_dirr�format_size�directory_size�format_directory_size�textwrap�dedent�format�stripr1r&)rr"r#rC�num_packagesr@rArDrBrF�messages           rr,zCacheCommand.get_cache_infoYs
����3�4�4��T�2�2�7�;�<���4�,�,�W�c�:�;��"�o�o�g�y�A��"&�/�/�'�6�"B�� $����� B��$�0�0��%�%�&9�:��'�'�(?�@�
A�
��'�<�<�=R�S��
�O�O��

��V�$7�(?� /�-�&;�*�"3����U�W�+	�0	���G�r!c���t|�dkDrtd��|r|d}nd}|j||�}|jdk(r|j	|�y|j|�y)Nr*r9rr<r)rGr	rIr�format_for_human�format_for_abspath)rr"r#�pattern�filess     rr-zCacheCommand.list_cache_items�sf���t�9�q�=��3�4�4���1�g�G��G��!�!�'�7�3�����'�)��!�!�%�(��#�#�E�*r!rXc�b�|stjd�yg}|D]N}tjj	|�}tj|�}|jd|�d|�d���Ptjd�tjdjt|���y)NzNo locally built wheels cached.z - z (�)zCache contents:
�
)
r1r&�os�path�basenamer�format_file_size�appendr3r4)rrX�results�filename�wheel�sizes      rrUzCacheCommand.format_for_human�s�����K�K�9�:�����H��G�G�$�$�X�.�E��.�.�x�8�D��N�N�S���r�$��q�1�2��	���'�(����D�I�I�f�W�o�.�/r!c�d�|r.tjdjt|���yy)Nr[)r1r&r3r4)rrXs  rrVzCacheCommand.format_for_abspath�s#����K�K��	�	�&��-�0�1�r!c��t|�dkDrtd��|std��|j||d�}d}|ddk(r||j|�z
}n|dj	|d�z
}|st
j
|�|D]-}tj|�t
jd|��/t
jd	t|��y)
Nr*r9zPlease provide a patternrzNo matching packagesr<z for pattern "{}"z
Removed %szFiles removed: %s)rGr	rIrHrPr1�warningr\�unlink�verboser&)rr"r#rX�no_matching_msgrbs      rr.zCacheCommand.remove_cache_items�s����t�9�q�=��3�4�4���9�:�:��!�!�'�4��7�3��0����7�c�>��T�*�*�7�3�3�E�
�2�9�9�$�q�'�B�B�O���N�N�?�+��H��I�I�h���N�N�<��2��	���'��U��4r!c�B�|rtd��|j|dg�S)Nr9r<)r	r.r:s   rr/zCacheCommand.purge_cache�s&����3�4�4��&�&�w���6�6r!�subdirc�V�tjj|j|�S)N)r\r]r3r0)rr"rls   rrJzCacheCommand._cache_dir�s���w�w�|�|�G�-�-�v�6�6r!c��|j|d�}|j|d�}tj|d�tj|d�zS)Nr>r=r<�rJr�
find_files)rr"�old_http_dir�new_http_dirs    rrHzCacheCommand._find_http_files�sN�����w��7�����w�	�:���$�$�\�3�7�*�:O�:O��#�;
�
�	
r!rWc�h�|j|d�}|d|vrdndz}tj||�S)Nr?�-z*.whlz-*.whlro)rr"rW�	wheel_dirs    rrIzCacheCommand._find_wheels�s9���O�O�G�X�6�	�$��w��W�H�E���$�$�Y��8�8r!)rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usager rr�str�intr7rr+r,r-rUrVr.r/rJrHrI�r!rrrsN�����
�E�
:��6���c���s��@'�V�'�4��9�'��'�(�f�(�D��I�(�$�(�T
+��
+�d�3�i�
+�D�
+�0�d�3�i�0�D�0�2��S�	�2�d�2�5�&�5��S�	�5�d�5�27�6�7��c��7�t�7�7�&�7�#�7�#�7�
��
�4��9�
�9�F�9�S�9�T�#�Y�9r!r)r\rN�optparser�typingrr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr�pip._internal.exceptionsr	r
�pip._internal.utilsr�pip._internal.utils.loggingrrvr1rr~r!r�<module>r�s8��	����2�9�;�*�1�	�8�	��R9�7�R9r!python3.12/site-packages/pip/_internal/commands/__pycache__/download.cpython-312.pyc000064400000016717151732701410024214 0ustar00�

R`i�����ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddl
mZddlmZdd	lmZdd
lmZmZmZddlmZej2e�ZGd�d
e�Zy)�N)�Values)�List)�
cmdoptions)�make_target_python)�RequirementCommand�with_cleanup)�SUCCESS)�get_build_tracker)�check_legacy_setup_py_options)�
ensure_dir�normalize_path�write_output)�
TempDirectoryc�@�eZdZdZdZd	d�Zededee	de
fd��Zy)
�DownloadCommandaL
    Download packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports downloading from "requirements files", which provide
    an easy way to specify a whole environment to be downloaded.
    a
      %prog [options] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] <vcs project url> ...
      %prog [options] <local project path> ...
      %prog [options] <archive url/path> ...�returnNc
�$�|jjtj��|jjtj��|jjtj
��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj ��|jjtj"��|jjtj$��|jjddddddt&j(d��tj*|j�tj,tj.|j0�}|j0j3d	|�|j0j3d	|j�y)
Nz-dz--destz--destination-dirz--destination-directory�download_dir�dirzDownload packages into <dir>.)�dest�metavar�default�helpr)�cmd_opts�
add_optionr�constraints�requirements�no_deps�global_options�	no_binary�only_binary�
prefer_binary�src�pre�require_hashes�progress_bar�no_build_isolation�
use_pep517�
no_use_pep517�check_build_deps�ignore_requires_python�os�curdir�add_target_python_options�make_option_group�index_group�parser�insert_option_group)�self�
index_optss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/download.py�add_optionszDownloadCommand.add_options&sC���
�
� � ��!7�!7�!9�:��
�
� � ��!8�!8�!:�;��
�
� � ��!3�!3�!5�6��
�
� � ��!:�!:�!<�=��
�
� � ��!5�!5�!7�8��
�
� � ��!7�!7�!9�:��
�
� � ��!9�!9�!;�<��
�
� � ����!1�2��
�
� � ����!1�2��
�
� � ��!:�!:�!<�=��
�
� � ��!8�!8�!:�;��
�
� � ��!>�!>�!@�A��
�
� � ��!6�!6�!8�9��
�
� � ��!9�!9�!;�<��
�
� � ��!<�!<�!>�?��
�
� � ��!B�!B�!D�E��
�
� � ����%����I�I�0�	!�		
�	�,�,�T�]�]�;��1�1��"�"��K�K�
�
�
	
���'�'��:�6����'�'��4�=�=�9��options�argsc
�T�d|_g|_tj|�t	|j
�|_t
|j
�|j|�}t|�}|j||||j��}|jt��}t|jdd��}|j||||�}t!||�|j#||||||j
d|j$��}	|j'|	|||j|j(|j*��}
|j-|�|
j/|d��}g}|j0j3�D]I}
|
j4��|
j6�J�|	j9|
�|j;|
j6��K|	j=|j0j3��|j?�|rtAd	d
jC|��tDS)NT)r8�session�
target_pythonr+�download)�delete�kind�globally_managedF)�temp_build_dirr8�
build_trackerr;�finderr�
use_user_site�	verbosity)�preparerrCr8r+r(�py_version_info)�check_supported_wheelszSuccessfully downloaded %s� )#�ignore_installed�	editablesr�check_dist_restrictionr
rr�get_default_sessionr�_build_package_finderr+�
enter_contextr
r�no_clean�get_requirementsr�make_requirement_preparerrE�
make_resolverr(�python_version�trace_basic_info�resolver�values�satisfied_by�name�save_linked_requirement�append� prepare_linked_requirements_more�#warn_legacy_versions_and_specifiersr�joinr	)r3r8r9r;r<rCrB�	directory�reqsrF�resolver�requirement_set�
downloaded�reqs              r5�runzDownloadCommand.runMs��#'�� �����)�)�'�2�-�g�.B�.B�C����7�'�'�(��*�*�7�3��*�7�3�
��+�+���'�#*�#A�#A�	,�
���*�*�+<�+>�?�
�!��'�'�'��!�
�	��$�$�T�7�F�G�D��%�g�t�4��1�1�$��'��� �-�-���n�n�2�	
���%�%����#*�#A�#A��)�)�#�2�2�
&�
��	
���f�%�"�*�*�4��*�M�� "�
�"�/�/�6�6�8�C����'��x�x�+�+�+��0�0��5��!�!�#�(�(�+�	9�	�1�1�/�2N�2N�2U�2U�2W�X��;�;�=���5�s�x�x�
�7K�L��r7)rN)�__name__�
__module__�__qualname__�__doc__�usager6rrr�str�intre�r7r5rrsF��
�
0�E�%:�N�E�6�E��c��E�s�E��Er7r)�loggingr,�optparser�typingr�pip._internal.clir�pip._internal.cli.cmdoptionsr�pip._internal.cli.req_commandrr�pip._internal.cli.status_codesr	�,pip._internal.operations.build.build_trackerr
�pip._internal.req.req_installr�pip._internal.utils.miscrr
r�pip._internal.utils.temp_dirr�	getLoggerrf�loggerrrmr7r5�<module>r{sM���	���(�;�J�2�J�G�M�M�6�	��	�	�8�	$��A�(�Ar7python3.12/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-312.pyc000064400000021441151732701410023477 0ustar00�

R`iL���ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZddlmZdd	lmZdd
lmZmZddlmZmZddlmZdd
lmZmZej>e �Z!Gd�de�Z"y)�N)�Values)�List)�
WheelCache)�
cmdoptions)�RequirementCommand�with_cleanup)�SUCCESS)�CommandError)�get_build_tracker)�InstallRequirement�check_legacy_setup_py_options)�
ensure_dir�normalize_path)�
TempDirectory)�build�should_build_for_wheel_commandc�@�eZdZdZdZd	d�Zededee	de
fd��Zy)
�WheelCommanda�
    Build Wheel archives for your requirements and dependencies.

    Wheel is a built-package format, and offers the advantage of not
    recompiling your software during every install. For more details, see the
    wheel docs: https://wheel.readthedocs.io/en/latest/

    'pip wheel' uses the build system interface as described here:
    https://pip.pypa.io/en/stable/reference/build-system/

    z�
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...�returnNc��|jjddddtjd��|jjt	j
��|jjt	j��|jjt	j��|jjt	j��|jjt	j��|jjt	j��|jjt	j��|jjt	j��|jjt	j��|jjt	j��|jjt	j��|jjt	j ��|jjt	j"��|jjt	j$��|jjddd	d
d��|jjt	j&��|jjt	j(��|jjt	j*��|jjd
d	d
d��|jjt	j,��t	j.tj0|j2�}|j2j5d|�|j2j5d|j�y)Nz-wz--wheel-dir�	wheel_dir�dirzLBuild wheels into <dir>, where the default is the current working directory.)�dest�metavar�default�helpz--no-verify�	no_verify�
store_trueFz%Don't verify if built wheel is valid.)r�actionrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.)rrrr)�cmd_opts�
add_option�os�curdirr�	no_binary�only_binary�
prefer_binary�no_build_isolation�
use_pep517�
no_use_pep517�check_build_deps�constraints�editable�requirements�src�ignore_requires_python�no_deps�progress_bar�config_settings�
build_options�global_options�require_hashes�make_option_group�index_group�parser�insert_option_group)�self�
index_optss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/wheel.py�add_optionszWheelCommand.add_options,s����
�
� � ������I�I�-�	!�
	
�	
�
�
� � ��!5�!5�!7�8��
�
� � ��!7�!7�!9�:��
�
� � ��!9�!9�!;�<��
�
� � ��!>�!>�!@�A��
�
� � ��!6�!6�!8�9��
�
� � ��!9�!9�!;�<��
�
� � ��!<�!<�!>�?��
�
� � ��!7�!7�!9�:��
�
� � ��!4�!4�!6�7��
�
� � ��!8�!8�!:�;��
�
� � ����!1�2��
�
� � ��!B�!B�!D�E��
�
� � ��!3�!3�!5�6��
�
� � ��!8�!8�!:�;��
�
� � �����8�	!�	
�	
�
�
� � ��!;�!;�!=�>��
�
� � ��!9�!9�!;�<��
�
� � ��!:�!:�!<�=��
�
� � ����2�	!�	
�	
�
�
� � ��!:�!:�!<�=��1�1��"�"��K�K�
�
�
	
���'�'��:�6����'�'��4�=�=�9��options�argsc
��|j|�}|j||�}t|j�|_t	|j�|jt
��}t|jdd��}|j||||�}t||�t|j�}|j||||||jd|j��}	|j|	||||j |j"��}
|j%|�|
j'|d��}g}|j(j+�D]=}
|
j,r|	j/|
��!t1|
�s�-|j3|
��?|	j5|j(j+��|j7�t9|||j:|j<xsg|j>xsg��\}}|D]_}
|
j@r|
j@j,sJ�|
jBsJ�	tEjF|
jB|j��atQ|�d
k7rtSd��tTS#tH$r<}tJjMd	|
jN|�|j3|
�Yd}~��d}~wwxYw)N�wheelT)�delete�kind�globally_managedF)�temp_build_dirr?�
build_tracker�session�finder�download_dir�
use_user_site�	verbosity)�preparerrIr?�wheel_cacher/r()�check_supported_wheels)rN�verifyr3r4z Building wheel for %s failed: %srz"Failed to build one or more wheels)+�get_default_session�_build_package_finderrrr�
enter_contextrr�no_clean�get_requirementsr
r�	cache_dir�make_requirement_preparerrL�
make_resolverr/r(�trace_basic_info�resolver-�values�is_wheel�save_linked_requirementr�append� prepare_linked_requirements_more�#warn_legacy_versions_and_specifiersrrr3r4�link�local_file_path�shutil�copy�OSError�logger�warning�name�lenr
r	)r:r?r@rHrIrG�	directory�reqsrNrM�resolver�requirement_set�
reqs_to_build�req�build_successes�build_failures�es                 r<�runzWheelCommand.rungs����*�*�7�3���+�+�G�W�=��*�7�+<�+<�=����7�$�$�%��*�*�+<�+>�?�
�!��'�'�'��!�
�	��$�$�T�7�F�G�D��%�g�t�4� ��!2�!2�3���1�1�$��'��� �*�*���n�n�2�	
���%�%����#�#*�#A�#A��)�)�
&�
��	
���f�%�"�*�*�4��*�M��24�
�"�/�/�6�6�8�C��|�|��0�0��5�/��4��$�$�S�)�	9�	�1�1�/�2N�2N�2U�2U�2W�X��;�;�=�+0��#��)�)�)�!�/�/�5�2�"�1�1�7�R�+
�'���#�C��8�8���� 1� 1�1�1��&�&�&�&�
+����C�/�/��1B�1B�C�#��~��!�#��C�D�D�����
+����6��H�H���
�%�%�c�*�*��

+�s�=*J�	K
�2K�K
)rN)�__name__�
__module__�__qualname__�__doc__�usager=rrr�str�intrs�r>r<rrsF��
�
0�E�9:�v�O�6�O��c��O�s�O��Or>r)#�loggingr"rc�optparser�typingr�pip._internal.cacher�pip._internal.clir�pip._internal.cli.req_commandrr�pip._internal.cli.status_codesr	�pip._internal.exceptionsr
�,pip._internal.operations.build.build_trackerr�pip._internal.req.req_installrr
�pip._internal.utils.miscrr�pip._internal.utils.temp_dirr�pip._internal.wheel_builderrr�	getLoggerrtrfrr{r>r<�<module>r�sX���	�
���*�(�J�2�1�J��@�6�M�	��	�	�8�	$��_�%�_r>python3.12/site-packages/pip/_internal/commands/__pycache__/install.cpython-312.pyc000064400000070460151732701410024046 0ustar00�

R`i�p��^�ddlZddlZddlZddlZddlZddlZddlmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZddlmZddlmZmZmZdd	lmZmZdd
lmZmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%ddl&m'Z'm(Z(ddl)m*Z*ddl+m,Z,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5m6Z6m7Z7m8Z8m9Z9ddl:m;Z;ddl<m=Z=m>Z>ddl?m@Z@mAZAe3eB�ZCGd�de�ZD					d-deEdeeFdeeFdeEdeeFd e
eFfd!�ZGdeeFdeEd eEfd"�ZH				d.d#eeEd$eeFd%eeFd&eeFd'eEd eEfd(�ZId)eJd*eEd+eEd eFfd,�ZKy)/�N)�
SUPPRESS_HELP�Values)�List�Optional)�
print_json)�
WheelCache)�
cmdoptions)�make_target_python)�RequirementCommand�warn_if_run_as_root�with_cleanup)�ERROR�SUCCESS)�CommandError�InstallationError)�
get_scheme)�get_environment)�InstallationReport)�get_build_tracker)�ConflictDetails�check_install_conflicts)�install_given_reqs)�InstallRequirement�check_legacy_setup_py_options)�WINDOWS��test_writable_dir)�	getLogger)�check_externally_managed�
ensure_dir�get_pip_version�(protect_pip_from_modification_on_windows�write_output)�
TempDirectory)�running_under_virtualenv�virtualenv_no_global)�build� should_build_for_install_commandc��eZdZdZdZdd�Zededee	de
fd��Zd	e	d
ede
ddfd�Zd
eedeefd�Zdede	ddfd�Zy)�InstallCommandaI
    Install packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    a%
      %prog [options] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...�returnNc���|jjtj��|jjtj��|jjtj
��|jjtj��|jjtj��|jjddddd��|jjddd	d
dd��tj|j�|jjd
ddd��|jjdddt��|jjddd
dd��|jjddd
dd��|jjtj��|jjddddd��|jjddddd gd!�"�|jjd#d$dd%��|jjd&d'd(dd)��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj��|jjtj ��|jjtj"��|jjtj$��|jjd*dd+d,d-��|jjd.dd+d/�0�|jjd1dd2d,d3��|jjd4dd5d,d6��|jjtj&��|jjtj(��|jjtj*��|jjtj,��|jjtj.��|jjtj0��tj2tj4|j6�}|j6j9d7|�|j6j9d7|j�|jjd8d9d:dd;��y)<Nz	--dry-run�
store_true�dry_runFz�Don't actually install anything, just print what would be. Can be used in combination with --ignore-installed to 'resolve' the requirements.)�action�dest�default�helpz-tz--target�
target_dir�dirz�Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> with new versions.)r0�metavarr1r2z--user�
use_user_sitez�Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.))r0r/r2z	--no-user�store_falsez--root�	root_pathz=Install everything relative to this alternate root directory.z--prefix�prefix_patha[Installation prefix where lib, bin and other top-level folders are placed. Note that the resulting installation may contain scripts and other resources which reference the Python interpreter of pip, and not that of ``--prefix``. See also the ``--python`` option if the intention is to install packages into another (possibly pip-free) environment.z-Uz	--upgrade�upgradez�Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategy�upgrade_strategyzonly-if-needed�eageraGDetermines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" -  are upgraded only when they do not satisfy the requirements of the upgraded package(s).)r0r1�choicesr2z--force-reinstall�force_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installed�ignore_installedz�Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!z	--compile�compileTz'Compile Python source files to bytecodez--no-compilez.Do not compile Python source files to bytecode)r/r0r2z--no-warn-script-location�warn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflicts�warn_about_conflictsz%Do not warn about broken dependenciesrz--report�json_report_file�fileaWGenerate a JSON file describing what pip did to install the provided requirements. Can be used in combination with --dry-run and --ignore-installed to 'resolve' the requirements. When - is used as file name it writes to stdout. When writing to stdout, please combine with the --quiet option to avoid mixing pip logging output with JSON output.)�cmd_opts�
add_optionr	�requirements�constraints�no_deps�pre�editable�add_target_python_optionsr�src�ignore_requires_python�no_build_isolation�
use_pep517�
no_use_pep517�check_build_deps�override_externally_managed�config_settings�global_options�	no_binary�only_binary�
prefer_binary�require_hashes�progress_bar�root_user_action�make_option_group�index_group�parser�insert_option_group)�self�
index_optss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/install.py�add_optionszInstallCommand.add_optionsHs����
�
� � ��!8�!8�!:�;��
�
� � ��!7�!7�!9�:��
�
� � ��!3�!3�!5�6��
�
� � ����!1�2��
�
� � ��!4�!4�!6�7��
�
� � �����1�
	!�
	
�	
�
�
� � ������%�	!�	
�	�,�,�T�]�]�;��
�
� � �� ��%�	!�
	
�	
�
�
� � �� � ��		!�	
�	
�
�
� � �����P�	!�	
�	
�
�
� � ������
	!�	
� 	
�
�
� � ����!1�2��
�
� � �����)�
	!�
	
�	
�
�
� � � �#�$�%�w�/�G�
	!�	
� 	
�
�
� � ��"��N�		!�	
�	
�
�
� � �� �#��4�
	!�	
�	
�
�
� � ��!B�!B�!D�E��
�
� � ��!>�!>�!@�A��
�
� � ��!6�!6�!8�9��
�
� � ��!9�!9�!;�<��
�
� � ��!<�!<�!>�?��
�
� � ��!G�!G�!I�J��
�
� � ��!;�!;�!=�>��
�
� � ��!:�!:�!<�=��
�
� � �����:�	!�	
�	
�
�
� � �� ��A�		!�	
�	
�
�
� � �'� �'��C�	!�	
�	
�
�
� � �!� �'��8�	!�	
�	
�
�
� � ��!5�!5�!7�8��
�
� � ��!7�!7�!9�:��
�
� � ��!9�!9�!;�<��
�
� � ��!:�!:�!<�=��
�
� � ��!8�!8�!:�;��
�
� � ��!<�!<�!>�?��1�1��"�"��K�K�
�
�
	
���'�'��:�6����'�'��4�=�=�9��
�
� � ��#���G�
	!�	
��options�argsc���|jr|j�td��|jxr|jxr.|j
duxr|jduxr|jdu}|r|js
t�d}|jr|j}tj|d��tjdt��t!|j|j|j|j
|j"��|_d}d}|jr�d|_t&j(j+|j�|_t&j(j-|j�r4t&j(j/|j�std��t1d�	�}|j(}|j3|�|j4xsg}|j7|�}t9|�}	|j;|||	|j<�
�}
|j3t?��}t1|j@dd��}	|jC|||
|�}
tE||
�tG|jH�}|
D]	}d|_%�|jM|||||
|j|jN�
�}|jQ||
|||j|j$|j<|jR||jT��
}|jW|
�|jY|
|j��}|jr�t[|j\�}|jdk(rt_|ja���nHtc|jdd��5}tejf|ja�|dd��ddd�|jrV|ji�tkd�|j\D��}|r"tmddjod�|D���tpS	|jsd�}|jtdu}ty|��|jzj}�D�cgc]}t|�r|��}}t�||dg|��\}}|r0t�dj�d jod!�|D�����|j�|�}d}|j�xr|j�}|r|j�|�}|j�}|js|jrd}t�|||j
||j||j|j��"�} t�|j||j
|j|j"�#�}!t�|!�}"| j�t�j�d$��%�g}#| D]D}$|$j�}%	|"j�|%�}&|&�|%�d|&j���}%|#j�|%��F|�"|j�||j�|��&�djo|#�}'|'rtmd'|'�|jr+|sJ�|j�|j||j�|j�d*k(r
t��tpS#1swY���xYw#tv$rd}Y���wxYwcc}w#t�$rY��wxYw#t�$rM}(|jNd(k\})t�|(|)|j�}*tj�|*|)�)�t�cYd}(~(Sd}(~(wwxYw)+Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT)�check_targetzUsing %s)r9r3r8�
isolated_modez=Target path exists but is not a directory, will not continue.�target)�kind)re�session�
target_pythonrN�install)�deleterk�globally_managed)�temp_build_dirre�
build_trackerrl�finderr6�	verbosity)
�preparerrsre�wheel_cacher6r?rNr>r;rP)�check_supported_wheels�-)�data�wzutf-8)�encoding�F)�indent�ensure_asciic3�XK�|]"}|jd|jdf���$y�w)�name�versionN)�metadata��.0�rs  rb�	<genexpr>z%InstallCommand.run.<locals>.<genexpr>�s/����-�D���Z�Z��'����I�)>�?�D�s�(*zWould install %s� c3�>K�|]}dj|����y�w)rxN)�join)r��items  rbr�z%InstallCommand.run.<locals>.<genexpr>�s���� P�<O�D����$��<O�s��pip)�
modifying_pip)rv�verify�
build_optionsrUzYCould not build wheels for {}, which is required to install pyproject.toml-based projectsz, c3�4K�|]}|j���y�w�N)r�r�s  rbr�z%InstallCommand.run.<locals>.<genexpr>�s����!A�.�Q�!�&�&�.�s�)�root�home�prefixrAr6�	pycompile)�userr�r�r��isolatedr�)�key)�resolver_variantzSuccessfully installed %s�)�exc_info�warn)]r6r3rr.rCr8r9rSrr:r;r	�check_dist_restriction�logger�verboser!�decide_user_installrir?�os�path�abspath�exists�isdirr$�
enter_contextrU�get_default_sessionr
�_build_package_finderrNr�no_clean�get_requirementsrr�	cache_dir�permit_editable_wheels�make_requirement_preparerrt�
make_resolverr>rP�trace_basic_info�resolver�requirements_to_installr�to_dict�open�json�dump�#warn_legacy_versions_and_specifiers�sortedr#r�r�get_requirement�satisfied_by�KeyErrorr"rG�valuesr(r'r�format�get_installation_order�ignore_dependenciesrB�_determine_conflictsrArr@�get_lib_location_guessesr�sort�operator�
attrgetterr��get_distributionr��	Exception�append�_warn_about_conflicts�determine_resolver_variant�OSError�create_os_error_message�errorr�_handle_target_dirr[r)+r`rerf�#installing_into_current_environmentr;�target_temp_dir�target_temp_dir_pathrUrlrmrsrr�	directory�reqsrv�reqru�resolver�requirement_set�report�f�would_install_items�pip_reqr�r��
reqs_to_build�_�build_failures�
to_install�	conflicts�should_warn_about_conflictsrA�	installed�
lib_locations�env�items�resultr��installed_dist�installed_descr��show_traceback�messages+                                           rb�runzInstallCommand.run	s'��� � �W�%7�%7�%C��H�I�I����=�W�%=�%=�>�
,��!�!�T�)�
,��"�"�d�*�
,��#�#�t�+�		,�
0��7�7�$�&�,���?�?�&�7�7���)�)�'��E����z�?�#4�5� 3��!�!��+�+��)�)��'�'�!�/�/�!
���48��.2�����'+�G�$�!#������1C�1C�!D�G�������w�1�1�2��G�G�M�M�'�"4�"4�5�#�S���
,��:�O�#2�#7�#7� �����/� �/�/�5�2���*�*�7�3��*�7�3�
��+�+���'�#*�#A�#A�	,�
���*�*�+<�+>�?�
�!��'�'�'��!�
�	�e	��(�(��w���H�D�)�'�4�8�$�W�%6�%6�7�K�
��-1��*���5�5�(��+���%�3�3��.�.�6��H��)�)�!���'�%�3�3�!(�!9�!9�'.�'E�'E� '� 7� 7�!1�"�-�-�*��H�
�!�!�&�)�&�.�.���1C�1C�-C�/��O��'�'�+�O�,S�,S�T���+�+�s�2��F�N�N�$4�5��g�6�6��g�N�RS��	�	�&�.�.�"2�A�a�e�T�O���� �C�C�E�&,�-�,�D�D�-�'�#�'� �*���� P�<O� P�P����
=�)�9�9�%�@��!(� 4� 4�� <�
�4�=�Q�)�5�5�<�<�>��>�A�3�A�6��>�
��!&��'�� �-�!��A�~��'�<�<B�F��	�	�!A�.�!A�A�=���"�8�8��I�J�48�I��/�/�/�P�G�4P�4P�
(�+� �5�5�j�A�	�$+�#?�#?� ��!�!�W�%8�%8�',�$�*����&�&�)��*�*�%9�%�3�3�!�/�/�	�I�5��*�*�)��&�&��*�*� �.�.��M�"�-�0�C��N�N�x�2�2�6�:�N�;��E�#���{�{���%(�%9�%9�$�%?�N�%�1�"&��q��)?�)?�(@�A�����T�"�$��$��*�*��%)�%D�%D�W�%M�+��
!�X�X�e�_�N���/�"�� ���"�"�?��#�#��"�"�O�W�_�_�
��#�#�v�-��!���CO�N��(�
&� %�
�
&����D!����� �
	�!�^�^�q�0�N�-����%�%��G�

�L�L��>�L�:��L��
	�s��&E\
�4([�A)\
�[$�6\
�[6�"E$\
�$[;�+A\
�[!�\
�$[3�/\
�2[3�3\
�;	\�\
�\�\
�
	] �A]�] �] r3r�r:c���t|�g}td|j��}|j}|j}|j
}tjj|�r|j|�tjj|�r||k7r|j|�tjj|�r|j|�|D�]h}	t
j|	�D�]L}
|	|k(r8tjj||
��t�fd�|ddD��r�Atjj||
�}tjj|�r�|stjd|���tjj|�rtjd|���tjj|�rt!j"|�nt
j$|�t!j&tjj|	|
�|���O��ky)N�)r�c3�@�K�|]}|j�����y�wr�)�
startswith)r��s�ddirs  �rbr�z4InstallCommand._handle_target_dir.<locals>.<genexpr> s�����I�7H�!�1�<�<��-�7H�s����zKTarget directory %s already exists. Specify --upgrade to force replacement.z�Target directory %s already exists and is a link. pip will not automatically replace links, please remove if replacement is desired.)r rr��purelib�platlibryr�r�r��listdirr��anyr��warning�islinkr��shutil�rmtree�remove�move)
r`r3r�r:�lib_dir_list�scheme�purelib_dir�platlib_dir�data_dir�lib_dirr��target_item_dirr�s
            @rbr�z!InstallCommand._handle_target_dirs����	�:�����B�_�%9�%9�:���n�n���n�n���;�;��
�7�7�>�>�+�&�����,�
�7�7�>�>�+�&�;�+�+E�����,�
�7�7�>�>�(�#�����)�#�G��
�
�7�+���h�&��7�7�<�<��$�7�D��I�|�C�R�7H�I�I� �"$�'�'�,�,�z�4�"@���7�7�>�>�/�2�"����>�+��
!��w�w�~�~�o�6����'�,��!��w�w�}�}�_�5��
�
�o�6��	�	�/�2����B�G�G�L�L��$�7��I�9,�$rdr�c�b�	t|�S#t$rtjd�YywxYw)NzwError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new)rr�r��	exception)r`r�s  rbr�z#InstallCommand._determine_conflicts;s:��	�*�:�6�6���	����N�
��	�s�

�.�.�conflict_detailsr�c���|\}\}}|s|syg}|dk(r|jd�n|dk(sJ�|jd�|D]<}||d}||D]*}	dj|||	d��}
|j|
��,�>|D]G}||d}||D]5\}}}
d	j|||
|||dk(rd
nd��}
|j|
��7�Itjd
j	|��y)N�legacyz�pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.�
resolvelibz�pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.rz@{name} {version} requires {requirement}, which is not installed.r�)r�r��requirementzg{name} {version} requires {requirement}, but {you} have {dep_name} {dep_version} which is incompatible.�youzyou'll)r�r�r�dep_name�dep_versionr�
)r�r�r��criticalr�)r`rr��package_set�missing�conflicting�parts�project_namer��
dependencyr�rr	r�s              rbr�z$InstallCommand._warn_about_conflictsGsF��/?�+��+�g�{��{�����x�'��L�L�@�
�$�|�3�3�3��L�L�@�
�$�L�!�,�/��2�G�%�l�3�
�.��&�%�#� *�1�
�������W�%�4�$�(�L�!�,�/��2�G�.9�,�.G�*��+�s�F��&�%�#� #�%� +�"2�l�"B���
������W�%�/H�(� 	����	�	�%�(�)rd)r+N)�__name__�
__module__�__qualname__�__doc__�usagercr
rr�str�intr�r$�boolr�rrrr�r��rdrbr*r*4s���
�
0�E�
�B�y�6�y��c��y�s�y��y�v4J��4J�0=�4J�HL�4J�	
�4J�l
��1�2�
�	�/�	"�
�4*� /�4*�CF�4*�	
�4*rdr*r�r�r�r�r�r+c�T�td|||||��}|j|jgS)Nr�)r�r�r�r�r�)rr�r�)r�r�r�r�r�r�s      rbr�r�~s5���
�
�
�
���
�F�
�N�N�F�N�N�+�+rdc	�N�td�tt||���D��S)Nc3�2K�|]}t|����y�wr�r)r��ds  rbr�z)site_packages_writable.<locals>.<genexpr>�s�����L�A�	�!��L�s��r�r�)�all�setr�rs  rb�site_packages_writabler"�s)�����-�4�(�K�L���rdr6r9r3r8ric��|�|stjd�y|r8|rtd��t�rt	d��tjd�y|�J�|s|rtjd�yt
jstjd�yt||�	�rtjd
�ytjd�y)aZDetermine whether to do a user install based on the input options.

    If use_user_site is False, no additional checks are done.
    If use_user_site is True, it is checked for compatibility with other
    options.
    If use_user_site is None, the default behaviour depends on the environment,
    which is provided by the other arguments.
    z$Non-user install by explicit requestFzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z User install by explicit requestTz3Non-user install due to --prefix or --target optionz4Non-user install because user site-packages disabledrz0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable)	r��debugrr&r�site�ENABLE_USER_SITEr"�info)r6r9r3r8ris     rbr�r��s���"	�!�M����;�<�����3��
� �!�#�6��
�	���7�8��� � � ��j����J�K��� � ����K�L���9�}�E����G�H��
�K�K�	��rdr�r��using_user_sitec��g}|jd�|s,|jd�|jt|��n|jd�|dxxdz
cc<|jtjk(rUd}d}t	�s%|s#|j|d|j
�g�n|j|�|jd	�trR|jtjk(r5|jr)t|j�d
kDr|jd�dj|�j�dzS)
zrFormat an error message for an OSError

    It may occur anytime during the execution of the install command.
    z,Could not install packages due to an OSErrorz: �.r�r
z"Consider using the `--user` optionzCheck the permissionsz or z.
iz�HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths
r�)
r�r�errno�EACCESr%�extend�lowerr�ENOENT�filename�lenr��strip)r�r�r(r�user_option_part�permissions_parts      rbr�r��s��
�E�
�L�L�?�@��
���T��
���S��Z� �
���S��
�"�I���I�
�{�{�e�l�l�"�?��2��'�)�/��L�L�$��$�*�*�,��
�
�L�L�)�*�
���U��
	��K�K�5�<�<�'��N�N������#�%�
���
?�	
��7�7�5�>���!�D�(�(rd)FNNFN)NNNF)Lr+r�r�r�r�r%�optparserr�typingrr�pip._vendor.richr�pip._internal.cacher�pip._internal.clir	�pip._internal.cli.cmdoptionsr
�pip._internal.cli.req_commandrrr
�pip._internal.cli.status_codesrr�pip._internal.exceptionsrr�pip._internal.locationsr�pip._internal.metadatar�(pip._internal.models.installation_reportr�,pip._internal.operations.build.build_trackerr�pip._internal.operations.checkrr�pip._internal.reqr�pip._internal.req.req_installrr�pip._internal.utils.compatr�pip._internal.utils.filesystemr�pip._internal.utils.loggingr�pip._internal.utils.miscrr r!r"r#�pip._internal.utils.temp_dirr$�pip._internal.utils.virtualenvr%r&�pip._internal.wheel_builderr'r(rr�r*rrr�r"r�r�r�rrdrb�<module>rLs������	�
��*�!�'�*�(�;���
:�D�.�2�G�J�S�0��/�<�1���7��P�	�8�	��G	*�'�G	*�V���� �,�
�,�
�3�-�,��3�-�,��	,�

�S�M�,�
�#�Y�
,�$��#���$��4��"&� $�#��:��D�>�:��#��:���
�:���}�	:�
�:�
�
:�z6)��6)�$(�6)�;?�6)��6)rdpython3.12/site-packages/pip/_internal/commands/__pycache__/completion.cpython-312.pyc000064400000012170151732701410024543 0ustar00�

R`i���x�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZdZdd	d
dd�Z
Gd
�de�Zy)�N)�Values)�List)�Command)�SUCCESS)�get_progzD
# pip {shell} completion start{script}# pip {shell} completion end
a
        _pip_completion()
        {{
            COMPREPLY=( $( COMP_WORDS="${{COMP_WORDS[*]}}" \
                           COMP_CWORD=$COMP_CWORD \
                           PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) )
        }}
        complete -o default -F _pip_completion {prog}
    a�
        #compdef -P pip[0-9.]#
        __pip() {{
          compadd $( COMP_WORDS="$words[*]" \
                     COMP_CWORD=$((CURRENT-1)) \
                     PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null )
        }}
        if [[ $zsh_eval_context[-1] == loadautofunc ]]; then
          # autoload from fpath, call function directly
          __pip "$@"
        else
          # eval/source/. command, register function for later
          compdef __pip -P 'pip[0-9.]#'
        fi
    au
        function __fish_complete_pip
            set -lx COMP_WORDS (commandline -o) ""
            set -lx COMP_CWORD ( \
                math (contains -i -- (commandline -t) $COMP_WORDS)-1 \
            )
            set -lx PIP_AUTO_COMPLETE 1
            string split \  -- (eval $COMP_WORDS[1])
        end
        complete -fa "(__fish_complete_pip)" -c {prog}
    a�
        if ((Test-Path Function:\TabExpansion) -and -not `
            (Test-Path Function:\_pip_completeBackup)) {{
            Rename-Item Function:\TabExpansion _pip_completeBackup
        }}
        function TabExpansion($line, $lastWord) {{
            $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
            if ($lastBlock.StartsWith("{prog} ")) {{
                $Env:COMP_WORDS=$lastBlock
                $Env:COMP_CWORD=$lastBlock.Split().Length - 1
                $Env:PIP_AUTO_COMPLETE=1
                (& {prog}).Split()
                Remove-Item Env:COMP_WORDS
                Remove-Item Env:COMP_CWORD
                Remove-Item Env:PIP_AUTO_COMPLETE
            }}
            elseif (Test-Path Function:\_pip_completeBackup) {{
                # Fall back on existing tab expansion
                _pip_completeBackup $line $lastWord
            }}
        }}
    )�bash�zsh�fish�
powershellc�6�eZdZdZdZd	d�Zdedeede	fd�Z
y)
�CompletionCommandz3A helper command to be used for command completion.T�returnNc�X�|jjdddddd��|jjdd	dd
dd��|jjdd
dddd��|jjdddddd��|jjd|j�y)Nz--bashz-b�store_constr�shellzEmit completion code for bash)�action�const�dest�helpz--zshz-zr	zEmit completion code for zshz--fishz-fr
zEmit completion code for fishz--powershellz-prz#Emit completion code for powershellr)�cmd_opts�
add_option�parser�insert_option_group)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/completion.py�add_optionszCompletionCommand.add_optionsPs����
�
� � ��� ���0�
	!�	
�	
�
�
� � ��� ���/�
	!�	
�	
�
�
� � ��� ���0�
	!�	
�	
�
�
� � ��� ���6�
	!�	
�	
���'�'��4�=�=�9��options�argsc��tj�}t|�D�cgc]}d|z��	}}|j|vr{t	j
tj
|jd�jt����}ttj||j���tStjjdjdj|���tScc}w)z-Prints the completion code of the given shellz--�)�prog)�scriptrzERROR: You must pass {}
z or )�COMPLETION_SCRIPTS�keys�sortedr�textwrap�dedent�get�formatr�print�BASE_COMPLETIONr�sys�stderr�write�join)rrr�shellsr�
shell_optionsr#s       r�runzCompletionCommand.runts���#�(�(�*��39�&�>�B�>�%����>�
�B��=�=�F�"��_�_�"�&�&�w�}�}�b�9�@�@�h�j�@�Q��F�
�/�(�(��g�m�m�(�L�M��N��J�J���+�2�2�6�;�;�}�3M�N�
��N��Cs�C<)rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venvrrr�str�intr3�rrr
r
Ks/��=���":�H�6���c���s�rr
)r-r'�optparser�typingr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesr�pip._internal.utils.miscrr,r$r
r;rr�<module>rAsK��
����2�2�-���

��

��I:��z7��7rpython3.12/site-packages/pip/_internal/commands/__pycache__/hash.cpython-312.pyc000064400000005707151732701410023325 0ustar00�

R`i����ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
mZddlmZmZej$e�ZGd�d	e�Zd
ededefd
�Zy)�N)�Values)�List)�Command)�ERROR�SUCCESS)�
FAVORITE_HASH�
STRONG_HASHES)�read_chunks�write_outputc�:�eZdZdZdZdZd
d�Zdedee	de
fd	�Zy)�HashCommandz�
    Compute a hash of a local package archive.

    These can be used with --hash in a requirements file to do repeatable
    installs.
    z%prog [options] <file> ...T�returnNc
���|jjdddtdtdj	djt����|jjd|j�y)	Nz-az--algorithm�	algorithm�storez$The hash algorithm to use: one of {}z, )�dest�choices�action�default�helpr)�cmd_opts�
add_optionr	r�format�join�parser�insert_option_group)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/hash.py�add_optionszHashCommand.add_optionss_���
�
� � ����!��!�7�>�>��	�	�-�(��	!�
	
�	
���'�'��4�=�=�9��options�argsc
���|s/|jjtj�tS|j
}|D]}t
d||t||���tS)Nz%s:
--hash=%s:%s)	r�print_usage�sys�stderrrrr�
_hash_of_filer)rr!r"r�paths     r�runzHashCommand.run(sT����K�K�#�#�C�J�J�/��L��%�%�	��D��#�T�9�m�D�)�6T�
���r )rN)�__name__�
__module__�__qualname__�__doc__�usage�ignore_require_venvrrr�str�intr)�r rr
r
s7���
)�E���:�
�6�
��c��
�s�
r r
r(rrc���t|d�5}tj|�}t|�D]}|j	|��	ddd�|j�S#1swYj�SxYw)z!Return the hash digest of a file.�rbN)�open�hashlib�newr
�update�	hexdigest)r(r�archive�hash�chunks     rr'r'5s`��	
�d�D�	�W��{�{�9�%�� ��)�E��K�K���*�
��>�>���	
��>�>���s�7A�A5)r6�loggingr%�optparser�typingr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr�pip._internal.utils.hashesrr	�pip._internal.utils.miscr
r�	getLoggerr*�loggerr
r0r'r2r r�<module>rFsY����
���2�9�C�>�	��	�	�8�	$��#�'�#�L������r python3.12/site-packages/pip/_internal/commands/__pycache__/uninstall.cpython-312.pyc000064400000011215151732701420024403 0ustar00�

R`i.����ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZdd	lmZdd
lmZddlmZmZddlmZmZej4e�ZGd
�de
e�Zy)�N)�Values)�List)�canonicalize_name)�
cmdoptions)�Command)�SessionCommandMixin�warn_if_run_as_root)�SUCCESS)�InstallationError)�parse_requirements)�install_req_from_line�#install_req_from_parsed_requirement)�check_externally_managed�(protect_pip_from_modification_on_windowsc�6�eZdZdZdZd	d�Zdedeede	fd�Z
y)
�UninstallCommandaB
    Uninstall packages.

    pip is able to uninstall most installed packages. Known exceptions are:

    - Pure distutils packages installed with ``python setup.py install``, which
      leave behind no metadata to determine what files were installed.
    - Script wrappers installed by ``python setup.py develop``.
    zU
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ...�returnNc	��|jjddddgdd��|jjdd	d
dd�
�|jjtj��|jjtj��|j
j
d|j�y)Nz-rz
--requirement�requirements�append�filezjUninstall all the packages listed in the given requirements file.  This option can be used multiple times.)�dest�action�default�metavar�helpz-yz--yes�yes�
store_truez2Don't ask for confirmation of uninstall deletions.)rrrr)�cmd_opts�
add_optionr�root_user_action�override_externally_managed�parser�insert_option_group)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py�add_optionszUninstallCommand.add_options(s����
�
� � �������A�	!�	
�	
�
�
� � �����E�	!�	
�	
�
�
� � ��!<�!<�!>�?��
�
� � ��!G�!G�!I�J����'�'��4�=�=�9��options�argsc��|j|�}i}|D]T}t||j��}|jr||t	|j�<�?t
j
d|��V|jD]Q}t|||��D]>}t||j��}|js�'||t	|j�<�@�S|s&td|j�d|j�d���|js
t�td|v��|j�D]?}|j|j |j"d	kD�
�}	|	s�0|	j%��A|j&dk(r
t)�t*S)N)�isolatedzSInvalid requirement: %r ignored - the uninstall command expects named requirements.)r)�sessionz*You must give at least one requirement to z (see "pip help z")�pip)�
modifying_pipr)�auto_confirm�verbose�warn)�get_default_sessionr
�
isolated_mode�namer�logger�warningrrrrr"rr�values�	uninstallr�	verbosity�commitr!r	r
)
r%r)r*r-�reqs_to_uninstallr5�req�filename�
parsed_req�uninstall_pathsets
          r&�runzUninstallCommand.run@s����*�*�7�3�����D�'�� �.�.��C��x�x�AD�!�"3�C�H�H�"=�>����%��	�� �,�,�H�0��'�7��
�:���)>�)>����8�8�EH�%�&7����&A�B��-�!�#�<�T�Y�Y�K�H�!�Y�Y�K�r�+��
�
�2�2�$�&�0��#4�4�	
�%�+�+�-�C� #�
�
�$�[�[�����*�!.�!��!�!�(�(�*�
.��#�#�v�-��!��r()rN)�__name__�
__module__�__qualname__�__doc__�usager'rr�str�intrA�r(r&rrs1���
4�E�:�01�6�1��c��1�s�1r(r)�logging�optparser�typingr�pip._vendor.packaging.utilsr�pip._internal.clir�pip._internal.cli.base_commandr�pip._internal.cli.req_commandrr	�pip._internal.cli.status_codesr
�pip._internal.exceptionsr�pip._internal.reqr�pip._internal.req.constructorsr
r�pip._internal.utils.miscrr�	getLoggerrBr6rrIr(r&�<module>rWsR�����9�(�2�R�2�6�0���

��	�	�8�	$��X�w� 3�Xr(python3.12/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-312.pyc000064400000007672151732701420024053 0ustar00�

R`it����ddlZddlmZddlmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZmZddlmZddlmZej4e�ZGd
�de�Zy)�N)�Values)�Any�Dict�List)�default_environment)�
print_json)�__version__)�
cmdoptions)�Command)�SUCCESS)�BaseDistribution�get_environment)�stdlib_pkgs)�path_to_urlc�T�eZdZdZdZdZdd�Zdedee	de
fd	�Zd
ede
e	effd�Zy)
�InspectCommandzZ
    Inspect the content of a Python environment and produce a report in JSON format.
    Tz
      %prog [options]�returnNc�(�|jjdddd��|jjddddd�	�|jjtj��|jjd
|j�y)Nz--local�
store_trueFzSIf in a virtualenv that has global access, do not list globally-installed packages.)�action�default�helpz--user�userz,Only output packages installed in user-site.)�destrrrr)�cmd_opts�
add_optionr
�	list_path�parser�insert_option_group)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/inspect.py�add_optionszInspectCommand.add_optionss����
�
� � ����/�	!�	
�	
�
�
� � �����?�	!�	
�	
�
�
� � ��!5�!5�!7�8����'�'��4�=�=�9��options�argsc�J�tj|�t|j�j	|j
|jtt���}dt|D�cgc]}|j|���c}t�d�}t|��tScc}w)N)�
local_only�	user_only�skip�1)�version�pip_version�	installed�environment)�data)r
�check_list_path_optionr�path�iter_installed_distributions�localr�setrr	�
_dist_to_dictrrr)r r$r%�dists�dist�outputs      r!�runzInspectCommand.run0s����)�)�'�2�����-�J�J��}�}��l�l��[�!�K�
���&�?D�E�u�t�$�,�,�T�2�u�E�.�0�	
��	������Fs�(B r7c�.�|j|jd�}|j}|�|j�|d<n!|j}|�t|�ddid�|d<|j}|jr||d<|jr|j|d<|S)N)�metadata�metadata_location�
direct_url�editableT)�url�dir_info�	installer�	requested)	�
metadata_dict�
info_locationr=�to_dict�editable_project_locationrrA�installed_with_dist_inforB)r r7�resr=rFrAs      r!r5zInspectCommand._dist_to_dictAs����*�*�!%�!3�!3�
���_�_�
��!� *� 2� 2� 4�C���)-�(F�(F�%�(�4�&�'@�A�"�D�!�%��L�!��N�N�	��>�>�(�C����(�(�#�~�~�C����
r#)rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usager"rr�str�intr9r
rrr5�r#r!rrsU�����
�E�:�(�6���c���s��"�"2��t�C��H�~�r#r)�logging�optparser�typingrrr�pip._vendor.packaging.markersr�pip._vendor.richr�pipr	�pip._internal.clir
�pip._internal.cli.req_commandr�pip._internal.cli.status_codesr�pip._internal.metadatar
r�pip._internal.utils.compatr�pip._internal.utils.urlsr�	getLoggerrI�loggerrrQr#r!�<module>r`sL����"�"�=�'��(�1�2�D�2�0�	��	�	�8�	$��I�W�Ir#python3.12/site-packages/pip/_internal/commands/__pycache__/list.cpython-312.pyc000064400000036114151732701420023352 0ustar00�

R`i�0�	��ddlZddlZddlmZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZmZddlmZdd
lm Z ddl!m"Z"ddl#m$Z$m%Z%erddl&m'Z'Gd�de�Z(e	e(Z)ejTe+�Z,Gd�de�Z-dddede
eee.ee.ffd�Z/dddede.fd�Z0y)�N)�Values)�
TYPE_CHECKING�	Generator�List�Optional�Sequence�Tuple�cast��canonicalize_name)�
cmdoptions)�IndexGroupCommand)�SUCCESS)�CommandError)�
LinkCollector)�
PackageFinder)�BaseDistribution�get_environment)�SelectionPreferences)�
PipSession)�stdlib_pkgs)�tabulate�write_output)�DistributionVersionc�&�eZdZUdZeed<eed<y)�_DistWithLatestInfoz�Give the distribution object a couple of extra fields.

        These will be populated during ``get_outdated()``. This is dirty but
        makes the rest of the code much cleaner.
        �latest_version�latest_filetypeN)�__name__�
__module__�__qualname__�__doc__r�__annotations__�str����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/list.pyrrs��	�,�+��r&rc���eZdZdZdZdZdd�Zdedede	fd	�Z
ded
eede
fd�Zdd
dedd
fd�Zdd
dedd
fd�Zdd
dedd
fd�Zdd
dededfd�Zdd
deddfd�Zdeeedeeddfd�Zy)�ListCommandzt
    List installed packages, including editables.

    Packages are listed in a case-insensitive sorted order.
    Tz
      %prog [options]�returnNc��|jjddddd��|jjddddd	��|jjd
dddd��|jjd
dddd��|jjddddd��|jjtj��|jjdddd��|jjdddddd��|jjdddd� �|jjd!d"d#d$� �|jjd%dd#d&d'�(�|jjtj��tj
tj|j�}|jjd)|�|jjd)|j�y)*Nz-oz
--outdated�
store_trueFzList outdated packages)�action�default�helpz-uz
--uptodatezList uptodate packagesz-ez
--editablezList editable projects.z-lz--localzSIf in a virtualenv that has global access, do not list globally-installed packages.z--user�userz,Only output packages installed in user-site.)�destr-r.r/z--prezYInclude pre-release and development versions. By default, pip only finds stable versions.z--format�store�list_format�columns)r4�freeze�jsonz�Select the output format among: columns (default), freeze, or json. The 'freeze' format cannot be used with the --outdated option.)r-r1r.�choicesr/z--not-required�not_requiredz>List packages that are not dependencies of installed packages.)r-r1r/z--exclude-editable�store_false�include_editablez%Exclude editable package from output.z--include-editablez%Include editable package from output.T)r-r1r/r.r)	�cmd_opts�
add_optionr
�	list_path�list_exclude�make_option_group�index_group�parser�insert_option_group)�self�
index_optss  r'�add_optionszListCommand.add_options2s���
�
� � �����)�	!�	
�	
�
�
� � �����)�	!�	
�	
�
�
� � �����*�	!�	
�	
�
�
� � �����/�
	!�		
�	
�
�
� � �����?�	!�	
�	
�
�
� � ��!5�!5�!7�8��
�
� � ����2�	!�	
�	
�
�
� � �����1�Q�	!�
	
�	
�
�
� � ����Q�		!�	
�	
�
�
� � � � �#�8�		!�	
�	
�
�
� � � ��#�8��	!�	
�	
�
�
� � ��!8�!8�!:�;��1�1�*�2H�2H�$�+�+�V�
����'�'��:�6����'�'��4�=�=�9r&�options�sessionc��tj||��}td|j��}t	j||��S)zK
        Create a package finder appropriate to this list command.
        )rFF)�allow_yanked�allow_all_prereleases)�link_collector�selection_prefs)r�creater�prer)rCrFrGrKrLs     r'�_build_package_finderz!ListCommand._build_package_finder�sG��'�-�-�g�w�G��/��")�+�+�
��
�#�#�)�+�
�	
r&�argsc��|jr|jrtd��|jr|jdk(rtd��t	j
|�t
t�}|jr"|jd�|jD��t|j�j|j|j|j|j |��D�cgc]}t#d|���}}|j$r|j'||�}|jr|j)||�}n|jr|j+||�}|j-||�t.Scc}w)Nz5Options --outdated and --uptodate cannot be combined.r5z?List format 'freeze' cannot be used with the --outdated option.c3�2K�|]}t|����y�w�Nr)�.0�ns  r'�	<genexpr>z"ListCommand.run.<locals>.<genexpr>�s����G�6F��)�!�,�6F�s�)�
local_only�	user_only�editables_only�include_editables�skipr)�outdated�uptodaterr3r
�check_list_path_option�setr�excludes�updater�path�iter_installed_distributions�localr0�editabler:r
r8�get_not_required�get_outdated�get_uptodate�output_package_listingr)rCrFrPr[�d�packagess      r'�runzListCommand.run�sX������ 0� 0��V�W�W����� 3� 3�x� ?��Q��
�	�)�)�'�2��;�������K�K�G�g�6F�6F�G�G�%�W�\�\�2�O�O�"�=�=�!�,�,�&�/�/�")�":�":��P��	'
���
�&��*��	�	'
�����,�,�X�w�?�H�����(�(��7�;�H�
�
�
��(�(��7�;�H��#�#�H�g�6����1	'
s�/E7rk�_ProcessedDistsc�~�|j||�D�cgc]}|j|jkDr|��c}Scc}wrS��iter_packages_latest_infosr�version�rCrkrF�dists    r'rgzListCommand.get_outdated�sH��
�7�7��'�J�
�J���"�"�T�\�\�1�
�J�
�	
��
��":c�~�|j||�D�cgc]}|j|jk(r|��c}Scc}wrSrorrs    r'rhzListCommand.get_uptodate�sH��
�7�7��'�J�
�J���"�"�d�l�l�2�
�J�
�	
��
rtc���|D��chc]0}|j�xsdD]}t|j����2}}}t|D�chc]}|j|vs�|��c}�Scc}}wcc}w)Nr%)�iter_dependenciesr�name�list�canonical_name)rCrkrFrs�dep�dep_keys�pkgs       r'rfzListCommand.get_not_required�s��
!�
� ���.�.�0�6�B�6��
�c�h�h�'�6�
(� �	�
��H�S�H�S��0B�0B�(�0R�S�H�S�T�T��
��Ts�5A&�A,�A,)rNNc#����K�|j��5}|j�|��dddtdf��fd�}t||�D]	}|��|���	ddd�y#1swYyxYw�w)Nrsrr*c�t���j|j�}�js%|D�cgc]}|jjs|��}}�j|j��}|j
|�}|�y|j}|jjrd}nd}||_	||_
|Scc}w)N)�project_name�wheel�sdist)�find_all_candidatesrzrNrq�
is_prerelease�make_candidate_evaluator�sort_best_candidate�link�is_wheelrr)	rs�all_candidates�	candidate�	evaluator�best_candidate�remote_version�typ�finderrFs	       ��r'�latest_infoz;ListCommand.iter_packages_latest_infos.<locals>.latest_info�s����"(�!;�!;�D�<O�<O�!P���{�{�*8�&�)7�I�(�0�0�>�>�"�)7�#�&�#�;�;�!%�!4�!4�<��	�"+�!>�!>�~�!N��!�)��!/�!7�!7��!�&�&�/�/�!�C�!�C�&4��#�'*��$����)&s�B5)�_build_sessionrOr�map)rCrkrFrGr�rsr�s  `   @r'rpz&ListCommand.iter_packages_latest_infos�so������
 �
 ��
)�W��/�/���A�F�
�+�
��/�0�
�8�K��2���#��J�3�?*�
)�
)�s"�A)�6A�
A�	A)�A&�"A)c��t|d���}|jdk(r$|r"t||�\}}|j||�y|jdk(re|D]_}|jdk\r-td|j|j|j��?td|j|j��ay|jdk(rtt||��yy)	Nc��|jSrS)rz)rss r'�<lambda>z4ListCommand.output_package_listing.<locals>.<lambda>s
��T�0�0r&)�keyr4r5�z%s==%s (%s)z%s==%sr6)
�sortedr3�format_for_columns�output_package_listing_columns�verboser�raw_namerq�location�format_for_json)rCrkrF�data�headerrss      r'riz"ListCommand.output_package_listings�����0�
�����)�+��-�h��@�L�D�&��/�/��f�=�
�
 �
 �H�
,� ���?�?�a�'� �%�t�}�}�d�l�l�D�M�M��!��4�=�=�$�,�,�G�
!��
 �
 �F�
*����7�;�<�+r&r�r�c���t|�dkDr|jd|�t|�\}}t|�dkDr(|jddjd�|D���|D]
}t	|��y)Nrr�� c3�&K�|]	}d|z���y�w)�-Nr%�rT�xs  r'rVz=ListCommand.output_package_listing_columns.<locals>.<genexpr>,s����*B�E�q�3��7�E�s�)�len�insertr�joinr)rCr�r��pkg_strings�sizes�vals      r'r�z*ListCommand.output_package_listing_columns!si���t�9�q�=��K�K��6�"�%�d�^���U��t�9�q�=����q�#�(�(�*B�E�*B�"B�C��C����r&)r*N)rr r!r"�ignore_require_venv�usagerErrrrOrr$�intrlrgrhrfrrprir�r%r&r'r)r)'s�����
�E�V:�p
��
�(2�
�	�
�&'�6�'��c��'�s�'�R
�)�
�4:�
�	�
�
�)�
�4:�
�	�
�U�)�U�4:�U�	�U�$�)�$�4:�$�	�4�	5�$�L=�)�=�4:�=�	
�=�*���c��O��-1�#�Y��	
�r&r)�pkgsrmrFr*c��ddg}|j}|r|jddg�td�|D��}|r|jd�|jdk\r|jd�|jdk\r|jd	�g}|D]�}|j
t
|j�g}|r?|jt
|j��|j|j�|r|j|jxsd
�|jdk\r|j|jxsd
�|jdk\r|j|j�|j|���||fS)z_
    Convert the package data into something usable
    by output_package_listing_columns.
    �Package�Version�Latest�Typec3�4K�|]}|j���y�wrS)rer�s  r'rVz%format_for_columns.<locals>.<genexpr>?s����1�D�q��
�
�D�s�zEditable project locationr��Location�	Installer�)
r\�extend�any�appendr�r�r$rqrr�editable_project_locationr��	installer)r�rFr��running_outdated�
has_editablesr��proj�rows        r'r�r�2sA����
#�F��'�'����
�
�x��(�)��1�D�1�1�M���
�
�1�2����!���
�
�j�!����!���
�
�k�"�
�D����}�}�c�$�,�,�/�0����J�J�s�4�.�.�/�0��J�J�t�+�+�,���J�J�t�5�5�;��<��?�?�a���J�J�t�}�}�*��+��?�?�a���J�J�t�~�~�&����C��#�&��<�r&rkc��g}|D]�}|jt|j�d�}|jdk\r"|jxsd|d<|j
|d<|jr't|j�|d<|j|d<|j}|r||d<|j|���tj|�S)	N)rxrqr�r�r�r�rrr�)
r�r$rqr�r�r�r\rrr�r�r6�dumps)rkrFr�rs�infor�s      r'r�r�_s���
�D����M�M��4�<�<�(�
���?�?�a��#�}�}�2��D��� $���D������%(��)<�)<�%=�D�!�"�&*�&:�&:�D�"�#�$(�$B�$B�!�$�0I�D�,�-����D����:�:�d��r&)1r6�logging�optparser�typingrrrrrr	r
�pip._vendor.packaging.utilsr�pip._internal.clir
�pip._internal.cli.req_commandr�pip._internal.cli.status_codesr�pip._internal.exceptionsr�pip._internal.index.collectorr�"pip._internal.index.package_finderr�pip._internal.metadatarr�$pip._internal.models.selection_prefsr�pip._internal.network.sessionr�pip._internal.utils.compatr�pip._internal.utils.miscrr�pip._internal.metadata.baserrrm�	getLoggerr�loggerr)r$r�r�r%r&r'�<module>r�s������R�R�R�9�(�;�2�1�7�<�D�E�4�2�;��?��.���2�3�O�
��	�	�8�	$��H�#�H�V*�
�*�&,�*�
�4��S�	�?�D��I�%�&�*�Z�/��&��S�r&python3.12/site-packages/pip/_internal/commands/__pycache__/check.cpython-312.pyc000064400000004106151732701420023450 0ustar00�

R`i����ddlZddlmZddlmZddlmZddlmZm	Z	ddl
mZmZm
Z
ddlmZej e�ZGd�d	e�Zy)
�N)�Values)�List)�Command)�ERROR�SUCCESS)�check_package_set�!create_package_set_from_installed�#warn_legacy_versions_and_specifiers)�write_outputc�.�eZdZdZdZdedeedefd�Z	y)�CheckCommandz7Verify installed packages have compatible dependencies.z
      %prog [options]�options�args�returnc
�R�t�\}}t|�t|�\}}|D],}||j}||D]}	t	d|||	d���.|D]/}||j}||D]\}
}}t	d||||
|���1|s|s|rt
St	d�tS)Nz*%s %s requires %s, which is not installed.rz-%s %s has requirement %s, but you have %s %s.zNo broken requirements found.)r	r
r�versionrrr)
�selfrr�package_set�
parsing_probs�missing�conflicting�project_namer�
dependency�dep_name�dep_version�reqs
             ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/check.py�runzCheckCommand.runs���%F�%H�"��]�+�K�8�0��=����#�L�!�,�/�7�7�G�%�l�3�
��@� ���q�M�	�4�$�(�L�!�,�/�7�7�G�.9�,�.G�*��+�s��C� �����
�/H�(��k�]��L��8�9��N�N)
�__name__�
__module__�__qualname__�__doc__�usagerr�str�intr�rrr
r
s*��A�
�E��6���c���s�rr
)�logging�optparser�typingr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr�pip._internal.operations.checkrr	r
�pip._internal.utils.miscr�	getLoggerr �loggerr
r'rr�<module>r1sA�����2�9���
2�	��	�	�8�	$��%�7�%rpython3.12/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-312.pyc000064400000031704151732701420025246 0ustar00�

R`iW&����ddlZddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZm
Z
ddlmZmZmZmZddlmZddlmZdd	lmZmZej4e�ZGd
�de
�Zy)�N)�Values)�Any�List�Optional)�Command)�ERROR�SUCCESS)�
Configuration�Kind�get_configuration_files�kinds)�PipError)�
indent_log)�get_prog�write_outputc�>�eZdZdZdZdZdd�Zdedee	de
fd	�Zded
ede
efd�Zdedee	ddfd�Zdedee	ddfd
�Zdedee	ddfd�Zdedee	ddfd�Zdedee	ddfd�Zdeddfd�Zdd�Zdedee	ddfd�Zdee	de	de
defd�Zdd�Zdede	fd�Zy)�ConfigurationCommanda�
    Manage local and global configuration.

    Subcommands:

    - list: List the active configuration (or from the file specified)
    - edit: Edit the configuration file in an editor
    - get: Get the value associated with command.option
    - set: Set the command.option=value
    - unset: Unset the value associated with command.option
    - debug: List the configuration files and values defined under them

    Configuration keys should be dot separated command and option name,
    with the special prefix "global" affecting any command. For example,
    "pip config set global.index-url https://example.org/" would configure
    the index url for all commands, but "pip config set download.timeout 10"
    would configure a 10 second timeout only for "pip download" commands.

    If none of --user, --global and --site are passed, a virtual
    environment configuration file is used if one is active and the file
    exists. Otherwise, all modifications happen to the user file by
    default.
    Ta$
        %prog [<file-option>] list
        %prog [<file-option>] [--editor <editor-path>] edit

        %prog [<file-option>] get command.option
        %prog [<file-option>] set command.option value
        %prog [<file-option>] unset command.option
        %prog [<file-option>] debug
    �returnNc�P�|jjddddd��|jjdddd	d
��|jjdddd	d
��|jjdddd	d��|jjd|j�y)Nz--editor�editor�storez\Editor to use to edit the file. Uses VISUAL or EDITOR environment variables if not provided.)�dest�action�default�helpz--global�global_file�
store_trueFz+Use the system-wide configuration file onlyz--user�	user_filez$Use the user configuration file onlyz--site�	site_filez3Use the current environment configuration file onlyr)�cmd_opts�
add_option�parser�insert_option_group��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/configuration.py�add_optionsz ConfigurationCommand.add_options:s����
�
� � �����9�
	!�		
�	
�
�
� � �����>�	!�	
�	
�
�
� � �����7�	!�	
�	
�
�
� � �����F�	!�	
�	
���'�'��4�=�=�9��options�argsc���|j|j|j|j|j|j
d�}|r|d|vr4tjddjt|���tS|d}	|j||dv��}t|j|��|_|j j#�	||||dd�t$S#t$r2}tj|jd�tcYd}~Sd}~wwxYw#t$r2}tj|jd�tcYd}~Sd}~wwxYw)	N)�list�edit�get�set�unset�debugrzNeed an action (%s) to perform.z, )r.r/r0r-)�
need_value)�isolated�	load_only�)�list_values�open_in_editor�get_name�set_name_value�
unset_name�list_config_values�logger�error�join�sortedr�_determine_filerr*r
�
isolated_mode�
configuration�loadr	)r%r)r*�handlersrr4�es       r&�runzConfigurationCommand.run`sF���$�$��'�'��=�=��&�&��_�_��,�,�

���t�A�w�h�.��L�L�1��	�	�&��*�+�
��L��a���	��,�,��V�/N�%N�-��I�+��*�*�i�
���	
�����!�	��H�V��W�d�1�2�h�/�
���#�	��L�L������#��L��	���	��L�L������#��L��	�s<�	C*�D(�*	D%�3'D �D%� D%�(	E#�1'E�E#�E#r2c��tj|jftj|jftj
|jffD��cgc]	\}}|r|��}}}|sN|sytd�t�tj
D��rtj
StjSt|�dk(r|dStd��cc}}w)Nc3�ZK�|]#}tjj|����%y�w)N)�os�path�exists)�.0�site_config_files  r&�	<genexpr>z7ConfigurationCommand._determine_file.<locals>.<genexpr>�s'�����(M�$������/�0�(M�s�)+r5rzLNeed exactly one file to operate upon (--user, --site, --global) to perform.)r
�USERr�GLOBALr�SITEr�anyr�lenr)r%r)r2�key�value�file_optionss      r&r@z$ConfigurationCommand._determine_file�s������W�.�.�/����w�2�2�3����W�.�.�/��
��
��U�
�

��	�
������(?�(A�%�*�*�(M����z�z�!��z�z�!�
��
�!�
#���?�"��
5�
�	
��1
s�Cc��|j|dd��t|jj��D]\}}t	d||��y)Nr,r��n�%s=%r)�_get_n_argsr?rB�itemsr�r%r)r*rTrUs     r&r6z ConfigurationCommand.list_values�sE������v���+� ��!3�!3�!9�!9�!;�<�J�C����#�u�-�=r(c�z�|j|dd��}|jj|�}td|�y)Nz
get [name]r5rXz%s)r[rB�	get_valuerr]s     r&r8zConfigurationCommand.get_name�s9�����t�\�Q��7���"�"�,�,�S�1���T�5�!r(c��|j|dd��\}}|jj||�|j�y)Nzset [name] [value]�rX)r[rB�	set_value�_save_configurationr]s     r&r9z#ConfigurationCommand.set_name_value�s@���%�%�d�,@�A�%�F�
��U����$�$�S�%�0�� � �"r(c��|j|dd��}|jj|�|j�y)Nzunset [name]r5rX)r[rB�unset_valuerc)r%r)r*rTs    r&r:zConfigurationCommand.unset_name�s9�����t�^�q��9�����&�&�s�+�� � �"r(c��|j|dd��|j�t|jj	��D]j\}}td|�|D]T}t
�5tjj|�}td||�|r|j|�ddd��V�ly#1swY�cxYw)z9List config key-value pairs across different config filesr1rrX�%s:z%s, exists: %rN)r[�print_env_var_valuesr?rB�iter_config_filesrrrIrJrK�print_config_file_values)r%r)r*�variant�files�fname�file_existss       r&r;z'ConfigurationCommand.list_config_values�s�������w�!��,��!�!�#�%�T�%7�%7�%I�%I�%K�L�N�G�U����(����\�"$�'�'�.�.��"7�K� �!1�5�+�F�"��5�5�g�>�	"�\��M�"�\�s
�)AB6�6B?rkc��|jj|�j�D]%\}}t�5t	d||�ddd��'y#1swY�2xYw)z.Get key-value pairs from the file of a variantz%s: %sN)rB�get_values_in_configr\rr)r%rk�namerUs    r&rjz-ConfigurationCommand.print_config_file_values�sI���-�-�B�B�7�K�Q�Q�S�K�D�%����X�t�U�3���T���s�A�A	c���tdd�t�5t|jj	��D]%\}}d|j���}td||��'	ddd�y#1swYyxYw)z5Get key-values pairs present as environment variablesrg�env_var�PIP_rZN)rrr?rB�get_environ_vars�upper)r%rTrUrss    r&rhz)ConfigurationCommand.print_env_var_values�s\���U�I�&�
�\�$�T�%7�%7�%H�%H�%J�K�
��U� �����
�.���W�g�u�5�L��\�\�s�AA-�-A6c��|j|�}|jj�}|�td��d|vrtd|����	t	j
|�d|�d�d��y#t$r}|js||_�d}~wtj$r)}tdj|j���d}~wwxYw)Nz%Could not determine appropriate file.�"z4Can not open an editor for a file name containing "
z "T)�shellz*Editor Subprocess exited with exit code {})�_determine_editorrB�get_file_to_editr�
subprocess�
check_call�FileNotFoundError�filename�CalledProcessError�format�
returncode)r%r)r*rrmrEs      r&r7z#ConfigurationCommand.open_in_editor�s����'�'��0���"�"�3�3�5���=��B�C�C�
�E�\��G��w�O��
�		��!�!�V�H�B�u�g�Q�"7�t�D�� �	��:�:�#��
����,�,�	��<�C�C�A�L�L�Q��
��	�s$�A*�*	C�3B�C�$C�C�examplerYc��t|�|k7r&dj|t�|�}t|��|dk(r|dS|S)zAHelper to make sure the command got the right number of argumentszJGot unexpected number of arguments, expected {}. (example: "{} config {}")r5r)rSr�rr)r%r*r�rY�msgs     r&r[z ConfigurationCommand._get_n_args�sH���t�9��>�,��f�Q��
�G�,�
��3�-����6���7�N��Kr(c��	|jj�y#t$r!tj	d�td��wxYw)Nz:Unable to save configuration. Please report this as a bug.zInternal Error.)rB�save�	Exceptionr<�	exceptionrr$s r&rcz(ConfigurationCommand._save_configurationsG��	.����#�#�%���	.����L�
��,�-�-�		.�s	��*Ac���|j�|jSdtjvrtjdSdtjvrtjdStd��)N�VISUAL�EDITORz"Could not determine editor to use.)rrI�environr)r%r)s  r&rzz&ConfigurationCommand._determine_editorsX���>�>�%��>�>�!�
����
#��:�:�h�'�'�
����
#��:�:�h�'�'��?�@�@r()rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usager'rr�str�intrF�boolrrr@r6r8r9r:r;rjrhr7rr[rcrz�r(r&rrse���0��
�E�$:�L+�6�+��c��+�s�+�Z
�v�
�4�
�H�T�N�
�<.�6�.��c��.�t�.�"��"�d�3�i�"�D�"�#�f�#�D��I�#�$�#�#�&�#��S�	�#�d�#�?�&�?��S�	�?�d�?� 4��4��4�6��f��D��I��$��0��S�	��C��C��C��	.�A��A�C�Ar(r)�loggingrIr|�optparser�typingrrr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr	�pip._internal.configurationr
rrr
�pip._internal.exceptionsr�pip._internal.utils.loggingr�pip._internal.utils.miscrr�	getLoggerr�r<rr�r(r&�<module>r�sT���	���&�&�2�9���.�2�;�	��	�	�8�	$��DA�7�DAr(python3.12/site-packages/pip/_internal/commands/__pycache__/index.cpython-312.pyc000064400000015235151732701420023507 0ustar00�

R`i����ddlZddlmZddlmZmZmZmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZmZddlmZdd	lmZmZmZdd
lmZddlmZddlmZdd
lm Z ddl!m"Z"ddl#m$Z$ejJe&�Z'Gd�de�Z(y)�N)�Values)�Any�Iterable�List�Optional�Union)�
LegacyVersion�Version)�
cmdoptions)�IndexGroupCommand)�ERROR�SUCCESS)�print_dist_installation_info)�CommandError�DistributionNotFound�PipError)�
LinkCollector)�
PackageFinder)�SelectionPreferences)�TargetPython)�
PipSession)�write_outputc��eZdZdZdZdZdd�Zdedee	de
fd	�Z		dded
ede
ede
edef
d
�Zdedeeddfd�Zy)�IndexCommandz=
    Inspect information available from package indexes.
    Tz&
        %prog versions <package>
    �returnNc��tj|j�|jjtj��|jjtj
��|jjtj��|jjtj��tjtj|j�}|jjd|�|jjd|j�y)Nr)r�add_target_python_options�cmd_opts�
add_option�ignore_requires_python�pre�	no_binary�only_binary�make_option_group�index_group�parser�insert_option_group)�self�
index_optss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/index.py�add_optionszIndexCommand.add_options s����,�,�T�]�]�;��
�
� � ��!B�!B�!D�E��
�
� � ����!1�2��
�
� � ��!5�!5�!7�8��
�
� � ��!7�!7�!9�:��1�1��"�"��K�K�
�
�
	
���'�'��:�6����'�'��4�=�=�9��options�argsc�t�d|ji}tjd�|r|d|vr4tjddj	t|���tS|d}	||||dd�tS#t$r2}tj|jd�tcYd}~Sd}~wwxYw)N�versionsztpip index is currently an experimental command. It may be removed/changed in a future release without prior warning.rzNeed an action (%s) to perform.�, �)
�get_available_package_versions�logger�warning�error�join�sortedr
rr.r)r(r-r.�handlers�action�es      r*�runzIndexCommand.run0s�����;�;�
��	���
%�	
��t�A�w�h�.��L�L�1��	�	�&��*�+�
��L��a���	��H�V��W�d�1�2�h�/�
���	�	��L�L������#��L��	�s�'A<�<	B7�'B2�,B7�2B7�session�
target_pythonr c��tj||��}td|j|��}t	j|||��S)zK
        Create a package finder appropriate to the index command.
        )r-F)�allow_yanked�allow_all_prereleasesr )�link_collector�selection_prefsr>)r�createrr!r)r(r-r=r>r rBrCs       r*�_build_package_finderz"IndexCommand._build_package_finderNsM��'�-�-�g�w�G��/��")�+�+�#9�
���#�#�)�+�'�
�	
r,c��t|�dk7rtd��tj|�}|d}|j	|�5}|j||||j��}d�|j|�D�}|js	d�|D�}t|�}|stdj|���t|d�	�D�cgc]
}t|���}	}|	d}
ddd�td
j|
��tdjdj	���t!||
�ycc}w#1swY�_xYw)
Nr2z(You need to specify exactly one argumentr)r-r=r>r c3�4K�|]}|j���y�w�N)�version)�.0�	candidates  r*�	<genexpr>z>IndexCommand.get_available_package_versions.<locals>.<genexpr>vs����A�3T�i�	�!�!�3T�s�c3�:K�|]}|jr�|���y�wrH)�
is_prerelease)rJrIs  r*rLz>IndexCommand.get_available_package_versions.<locals>.<genexpr>|s�����+3��7�;P�;P�G�8�s��z%No matching distribution found for {}T)�reversez{} ({})zAvailable versions: {}r1)�lenrr�make_target_python�_build_sessionrEr �find_all_candidatesr!�setr�formatr8�strrr7r)r(r-r.r>�queryr=�finderr0�ver�formatted_versions�latests           r*r3z+IndexCommand.get_available_package_versionsgsG���t�9��>��I�J�J�"�5�5�g�>�
��Q���
�
 �
 ��
)�W��/�/���+�'.�'E�'E�	0��F�A�39�3M�3M�e�3T�A�H��;�;��+3����8�}�H��*�;�B�B�5�I���7=�X�t�6T�!U�6T�s�#�c�(�6T��!U�'��*�F�3*�6	�Y�%�%�e�V�4�5��-�4�4�T�Y�Y�?Q�5R�S�T�$�U�F�3��"V�1*�
)�s�BD?�D:�D?�:D?�?E)rN)NN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usager+rrrV�intr<rrr�boolrrErr3�r,r*rrs������
�E�:� �6���c���s��D15�15�
��
��
� ��-�	
�
!)���
�
�

�2$4�f�$4�D��I�$4�RV�$4r,r))�logging�optparser�typingrrrrr�pip._vendor.packaging.versionr	r
�pip._internal.clir�pip._internal.cli.req_commandr�pip._internal.cli.status_codesr
r�pip._internal.commands.searchr�pip._internal.exceptionsrrr�pip._internal.index.collectorr�"pip._internal.index.package_finderr�$pip._internal.models.selection_prefsr�"pip._internal.models.target_pythonr�pip._internal.network.sessionr�pip._internal.utils.miscr�	getLoggerr\r4rrdr,r*�<module>rusY����7�7�@�(�;�9�F�Q�Q�7�<�E�;�4�1�	��	�	�8�	$��u4�$�u4r,python3.12/site-packages/pip/_internal/commands/__pycache__/help.cpython-312.pyc000064400000003270151732701430023325 0ustar00�

R`il��V�ddlmZddlmZddlmZddlmZddlm	Z	Gd�de�Z
y)	�)�Values)�List)�Command)�SUCCESS)�CommandErrorc�2�eZdZdZdZdZdedeede	fd�Z
y)	�HelpCommandzShow help for commandsz
      %prog <command>T�options�args�returnc�$�ddlm}m}m}	|d}||vr@||�}d|�d�g}|r|j
d|�d��tdj|���||�}	|	jj�t
S#t$r	t
cYSwxYw)Nr)�
commands_dict�create_command�get_similar_commandszunknown command "�"zmaybe you meant "z - )�pip._internal.commandsrrr�
IndexErrorr�appendr�join�parser�
print_help)
�selfr
rrrr�cmd_name�guess�msg�commands
          ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/help.py�runzHelpCommand.runs���	
�	
�	��A�w�H��=�(�(��2�E�&�x�j��2�3�C���
�
�.�u�g�Q�7�8��u�z�z�#��/�/� ��*�����!�!�#�����	��N�	�s�A=�=B�BN)�__name__�
__module__�__qualname__�__doc__�usage�ignore_require_venvrr�str�intr��rr	r		s0�� �
�E����6���c���s�r(r	N)�optparser�typingr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesr�pip._internal.exceptionsrr	r'r(r�<module>r.s ����2�2�1� �'� r(python3.12/site-packages/pip/_internal/commands/debug.py000064400000015306151732701430017125 0ustar00import importlib.resources
import locale
import logging
import os
import sys
from optparse import Values
from types import ModuleType
from typing import Any, Dict, List, Optional

import pip._vendor
from pip._vendor.certifi import where
from pip._vendor.packaging.version import parse as parse_version

from pip._internal.cli import cmdoptions
from pip._internal.cli.base_command import Command
from pip._internal.cli.cmdoptions import make_target_python
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.configuration import Configuration
from pip._internal.metadata import get_environment
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import get_pip_version

logger = logging.getLogger(__name__)


def show_value(name: str, value: Any) -> None:
    logger.info("%s: %s", name, value)


def show_sys_implementation() -> None:
    logger.info("sys.implementation:")
    implementation_name = sys.implementation.name
    with indent_log():
        show_value("name", implementation_name)


def create_vendor_txt_map() -> Dict[str, str]:
    with importlib.resources.open_text("pip._vendor", "vendor.txt") as f:
        # Purge non version specifying lines.
        # Also, remove any space prefix or suffixes (including comments).
        lines = [
            line.strip().split(" ", 1)[0] for line in f.readlines() if "==" in line
        ]

    # Transform into "module" -> version dict.
    return dict(line.split("==", 1) for line in lines)


def get_module_from_module_name(module_name: str) -> Optional[ModuleType]:
    # Module name can be uppercase in vendor.txt for some reason...
    module_name = module_name.lower().replace("-", "_")
    # PATCH: setuptools is actually only pkg_resources.
    if module_name == "setuptools":
        module_name = "pkg_resources"

    try:
        __import__(f"pip._vendor.{module_name}", globals(), locals(), level=0)
        return getattr(pip._vendor, module_name)
    except ImportError:
        # We allow 'truststore' to fail to import due
        # to being unavailable on Python 3.9 and earlier.
        if module_name == "truststore" and sys.version_info < (3, 10):
            return None
        raise


def get_vendor_version_from_module(module_name: str) -> Optional[str]:
    module = get_module_from_module_name(module_name)
    version = getattr(module, "__version__", None)

    if module and not version:
        # Try to find version in debundled module info.
        assert module.__file__ is not None
        env = get_environment([os.path.dirname(module.__file__)])
        dist = env.get_distribution(module_name)
        if dist:
            version = str(dist.version)

    return version


def show_actual_vendor_versions(vendor_txt_versions: Dict[str, str]) -> None:
    """Log the actual version and print extra info if there is
    a conflict or if the actual version could not be imported.
    """
    for module_name, expected_version in vendor_txt_versions.items():
        extra_message = ""
        actual_version = get_vendor_version_from_module(module_name)
        if not actual_version:
            extra_message = (
                " (Unable to locate actual module version, using"
                " vendor.txt specified version)"
            )
            actual_version = expected_version
        elif parse_version(actual_version) != parse_version(expected_version):
            extra_message = (
                " (CONFLICT: vendor.txt suggests version should"
                " be {})".format(expected_version)
            )
        logger.info("%s==%s%s", module_name, actual_version, extra_message)


def show_vendor_versions() -> None:
    logger.info("vendored library versions:")

    vendor_txt_versions = create_vendor_txt_map()
    with indent_log():
        show_actual_vendor_versions(vendor_txt_versions)


def show_tags(options: Values) -> None:
    tag_limit = 10

    target_python = make_target_python(options)
    tags = target_python.get_sorted_tags()

    # Display the target options that were explicitly provided.
    formatted_target = target_python.format_given()
    suffix = ""
    if formatted_target:
        suffix = f" (target: {formatted_target})"

    msg = "Compatible tags: {}{}".format(len(tags), suffix)
    logger.info(msg)

    if options.verbose < 1 and len(tags) > tag_limit:
        tags_limited = True
        tags = tags[:tag_limit]
    else:
        tags_limited = False

    with indent_log():
        for tag in tags:
            logger.info(str(tag))

        if tags_limited:
            msg = (
                "...\n[First {tag_limit} tags shown. Pass --verbose to show all.]"
            ).format(tag_limit=tag_limit)
            logger.info(msg)


def ca_bundle_info(config: Configuration) -> str:
    levels = {key.split(".", 1)[0] for key, _ in config.items()}
    if not levels:
        return "Not specified"

    levels_that_override_global = ["install", "wheel", "download"]
    global_overriding_level = [
        level for level in levels if level in levels_that_override_global
    ]
    if not global_overriding_level:
        return "global"

    if "global" in levels:
        levels.remove("global")
    return ", ".join(levels)


class DebugCommand(Command):
    """
    Display debug information.
    """

    usage = """
      %prog <options>"""
    ignore_require_venv = True

    def add_options(self) -> None:
        cmdoptions.add_target_python_options(self.cmd_opts)
        self.parser.insert_option_group(0, self.cmd_opts)
        self.parser.config.load()

    def run(self, options: Values, args: List[str]) -> int:
        logger.warning(
            "This command is only meant for debugging. "
            "Do not use this with automation for parsing and getting these "
            "details, since the output and options of this command may "
            "change without notice."
        )
        show_value("pip version", get_pip_version())
        show_value("sys.version", sys.version)
        show_value("sys.executable", sys.executable)
        show_value("sys.getdefaultencoding", sys.getdefaultencoding())
        show_value("sys.getfilesystemencoding", sys.getfilesystemencoding())
        show_value(
            "locale.getpreferredencoding",
            locale.getpreferredencoding(),
        )
        show_value("sys.platform", sys.platform)
        show_sys_implementation()

        show_value("'cert' config value", ca_bundle_info(self.parser.config))
        show_value("REQUESTS_CA_BUNDLE", os.environ.get("REQUESTS_CA_BUNDLE"))
        show_value("CURL_CA_BUNDLE", os.environ.get("CURL_CA_BUNDLE"))
        show_value("pip._vendor.certifi.where()", where())
        show_value("pip._vendor.DEBUNDLED", pip._vendor.DEBUNDLED)

        show_vendor_versions()

        show_tags(options)

        return SUCCESS
python3.12/site-packages/pip/_internal/commands/completion.py000064400000010277151732701430020212 0ustar00import sys
import textwrap
from optparse import Values
from typing import List

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.utils.misc import get_prog

BASE_COMPLETION = """
# pip {shell} completion start{script}# pip {shell} completion end
"""

COMPLETION_SCRIPTS = {
    "bash": """
        _pip_completion()
        {{
            COMPREPLY=( $( COMP_WORDS="${{COMP_WORDS[*]}}" \\
                           COMP_CWORD=$COMP_CWORD \\
                           PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) )
        }}
        complete -o default -F _pip_completion {prog}
    """,
    "zsh": """
        #compdef -P pip[0-9.]#
        __pip() {{
          compadd $( COMP_WORDS="$words[*]" \\
                     COMP_CWORD=$((CURRENT-1)) \\
                     PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null )
        }}
        if [[ $zsh_eval_context[-1] == loadautofunc ]]; then
          # autoload from fpath, call function directly
          __pip "$@"
        else
          # eval/source/. command, register function for later
          compdef __pip -P 'pip[0-9.]#'
        fi
    """,
    "fish": """
        function __fish_complete_pip
            set -lx COMP_WORDS (commandline -o) ""
            set -lx COMP_CWORD ( \\
                math (contains -i -- (commandline -t) $COMP_WORDS)-1 \\
            )
            set -lx PIP_AUTO_COMPLETE 1
            string split \\  -- (eval $COMP_WORDS[1])
        end
        complete -fa "(__fish_complete_pip)" -c {prog}
    """,
    "powershell": """
        if ((Test-Path Function:\\TabExpansion) -and -not `
            (Test-Path Function:\\_pip_completeBackup)) {{
            Rename-Item Function:\\TabExpansion _pip_completeBackup
        }}
        function TabExpansion($line, $lastWord) {{
            $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
            if ($lastBlock.StartsWith("{prog} ")) {{
                $Env:COMP_WORDS=$lastBlock
                $Env:COMP_CWORD=$lastBlock.Split().Length - 1
                $Env:PIP_AUTO_COMPLETE=1
                (& {prog}).Split()
                Remove-Item Env:COMP_WORDS
                Remove-Item Env:COMP_CWORD
                Remove-Item Env:PIP_AUTO_COMPLETE
            }}
            elseif (Test-Path Function:\\_pip_completeBackup) {{
                # Fall back on existing tab expansion
                _pip_completeBackup $line $lastWord
            }}
        }}
    """,
}


class CompletionCommand(Command):
    """A helper command to be used for command completion."""

    ignore_require_venv = True

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "--bash",
            "-b",
            action="store_const",
            const="bash",
            dest="shell",
            help="Emit completion code for bash",
        )
        self.cmd_opts.add_option(
            "--zsh",
            "-z",
            action="store_const",
            const="zsh",
            dest="shell",
            help="Emit completion code for zsh",
        )
        self.cmd_opts.add_option(
            "--fish",
            "-f",
            action="store_const",
            const="fish",
            dest="shell",
            help="Emit completion code for fish",
        )
        self.cmd_opts.add_option(
            "--powershell",
            "-p",
            action="store_const",
            const="powershell",
            dest="shell",
            help="Emit completion code for powershell",
        )

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        """Prints the completion code of the given shell"""
        shells = COMPLETION_SCRIPTS.keys()
        shell_options = ["--" + shell for shell in sorted(shells)]
        if options.shell in shells:
            script = textwrap.dedent(
                COMPLETION_SCRIPTS.get(options.shell, "").format(prog=get_prog())
            )
            print(BASE_COMPLETION.format(script=script, shell=options.shell))
            return SUCCESS
        else:
            sys.stderr.write(
                "ERROR: You must pass {}\n".format(" or ".join(shell_options))
            )
            return SUCCESS
python3.12/site-packages/pip/_internal/commands/freeze.py000064400000006144151732701430017317 0ustar00import sys
from optparse import Values
from typing import AbstractSet, List

from pip._internal.cli import cmdoptions
from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.operations.freeze import freeze
from pip._internal.utils.compat import stdlib_pkgs


def _should_suppress_build_backends() -> bool:
    return sys.version_info < (3, 12)


def _dev_pkgs() -> AbstractSet[str]:
    pkgs = {"pip"}

    if _should_suppress_build_backends():
        pkgs |= {"setuptools", "distribute", "wheel"}

    return pkgs


class FreezeCommand(Command):
    """
    Output installed packages in requirements format.

    packages are listed in a case-insensitive sorted order.
    """

    usage = """
      %prog [options]"""
    log_streams = ("ext://sys.stderr", "ext://sys.stderr")

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "-r",
            "--requirement",
            dest="requirements",
            action="append",
            default=[],
            metavar="file",
            help=(
                "Use the order in the given requirements file and its "
                "comments when generating output. This option can be "
                "used multiple times."
            ),
        )
        self.cmd_opts.add_option(
            "-l",
            "--local",
            dest="local",
            action="store_true",
            default=False,
            help=(
                "If in a virtualenv that has global access, do not output "
                "globally-installed packages."
            ),
        )
        self.cmd_opts.add_option(
            "--user",
            dest="user",
            action="store_true",
            default=False,
            help="Only output packages installed in user-site.",
        )
        self.cmd_opts.add_option(cmdoptions.list_path())
        self.cmd_opts.add_option(
            "--all",
            dest="freeze_all",
            action="store_true",
            help=(
                "Do not skip these packages in the output:"
                " {}".format(", ".join(_dev_pkgs()))
            ),
        )
        self.cmd_opts.add_option(
            "--exclude-editable",
            dest="exclude_editable",
            action="store_true",
            help="Exclude editable package from output.",
        )
        self.cmd_opts.add_option(cmdoptions.list_exclude())

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        skip = set(stdlib_pkgs)
        if not options.freeze_all:
            skip.update(_dev_pkgs())

        if options.excludes:
            skip.update(options.excludes)

        cmdoptions.check_list_path_option(options)

        for line in freeze(
            requirement=options.requirements,
            local_only=options.local,
            user_only=options.user,
            paths=options.path,
            isolated=options.isolated_mode,
            skip=skip,
            exclude_editable=options.exclude_editable,
        ):
            sys.stdout.write(line + "\n")
        return SUCCESS
python3.12/site-packages/pip/_internal/commands/wheel.py000064400000014514151732701430017143 0ustar00import logging
import os
import shutil
from optparse import Values
from typing import List

from pip._internal.cache import WheelCache
from pip._internal.cli import cmdoptions
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.exceptions import CommandError
from pip._internal.operations.build.build_tracker import get_build_tracker
from pip._internal.req.req_install import (
    InstallRequirement,
    check_legacy_setup_py_options,
)
from pip._internal.utils.misc import ensure_dir, normalize_path
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.wheel_builder import build, should_build_for_wheel_command

logger = logging.getLogger(__name__)


class WheelCommand(RequirementCommand):
    """
    Build Wheel archives for your requirements and dependencies.

    Wheel is a built-package format, and offers the advantage of not
    recompiling your software during every install. For more details, see the
    wheel docs: https://wheel.readthedocs.io/en/latest/

    'pip wheel' uses the build system interface as described here:
    https://pip.pypa.io/en/stable/reference/build-system/

    """

    usage = """
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ..."""

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "-w",
            "--wheel-dir",
            dest="wheel_dir",
            metavar="dir",
            default=os.curdir,
            help=(
                "Build wheels into <dir>, where the default is the "
                "current working directory."
            ),
        )
        self.cmd_opts.add_option(cmdoptions.no_binary())
        self.cmd_opts.add_option(cmdoptions.only_binary())
        self.cmd_opts.add_option(cmdoptions.prefer_binary())
        self.cmd_opts.add_option(cmdoptions.no_build_isolation())
        self.cmd_opts.add_option(cmdoptions.use_pep517())
        self.cmd_opts.add_option(cmdoptions.no_use_pep517())
        self.cmd_opts.add_option(cmdoptions.check_build_deps())
        self.cmd_opts.add_option(cmdoptions.constraints())
        self.cmd_opts.add_option(cmdoptions.editable())
        self.cmd_opts.add_option(cmdoptions.requirements())
        self.cmd_opts.add_option(cmdoptions.src())
        self.cmd_opts.add_option(cmdoptions.ignore_requires_python())
        self.cmd_opts.add_option(cmdoptions.no_deps())
        self.cmd_opts.add_option(cmdoptions.progress_bar())

        self.cmd_opts.add_option(
            "--no-verify",
            dest="no_verify",
            action="store_true",
            default=False,
            help="Don't verify if built wheel is valid.",
        )

        self.cmd_opts.add_option(cmdoptions.config_settings())
        self.cmd_opts.add_option(cmdoptions.build_options())
        self.cmd_opts.add_option(cmdoptions.global_options())

        self.cmd_opts.add_option(
            "--pre",
            action="store_true",
            default=False,
            help=(
                "Include pre-release and development versions. By default, "
                "pip only finds stable versions."
            ),
        )

        self.cmd_opts.add_option(cmdoptions.require_hashes())

        index_opts = cmdoptions.make_option_group(
            cmdoptions.index_group,
            self.parser,
        )

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, self.cmd_opts)

    @with_cleanup
    def run(self, options: Values, args: List[str]) -> int:
        session = self.get_default_session(options)

        finder = self._build_package_finder(options, session)

        options.wheel_dir = normalize_path(options.wheel_dir)
        ensure_dir(options.wheel_dir)

        build_tracker = self.enter_context(get_build_tracker())

        directory = TempDirectory(
            delete=not options.no_clean,
            kind="wheel",
            globally_managed=True,
        )

        reqs = self.get_requirements(args, options, finder, session)
        check_legacy_setup_py_options(options, reqs)

        wheel_cache = WheelCache(options.cache_dir)

        preparer = self.make_requirement_preparer(
            temp_build_dir=directory,
            options=options,
            build_tracker=build_tracker,
            session=session,
            finder=finder,
            download_dir=options.wheel_dir,
            use_user_site=False,
            verbosity=self.verbosity,
        )

        resolver = self.make_resolver(
            preparer=preparer,
            finder=finder,
            options=options,
            wheel_cache=wheel_cache,
            ignore_requires_python=options.ignore_requires_python,
            use_pep517=options.use_pep517,
        )

        self.trace_basic_info(finder)

        requirement_set = resolver.resolve(reqs, check_supported_wheels=True)

        reqs_to_build: List[InstallRequirement] = []
        for req in requirement_set.requirements.values():
            if req.is_wheel:
                preparer.save_linked_requirement(req)
            elif should_build_for_wheel_command(req):
                reqs_to_build.append(req)

        preparer.prepare_linked_requirements_more(requirement_set.requirements.values())
        requirement_set.warn_legacy_versions_and_specifiers()

        # build wheels
        build_successes, build_failures = build(
            reqs_to_build,
            wheel_cache=wheel_cache,
            verify=(not options.no_verify),
            build_options=options.build_options or [],
            global_options=options.global_options or [],
        )
        for req in build_successes:
            assert req.link and req.link.is_wheel
            assert req.local_file_path
            # copy from cache to target directory
            try:
                shutil.copy(req.local_file_path, options.wheel_dir)
            except OSError as e:
                logger.warning(
                    "Building wheel for %s failed: %s",
                    req.name,
                    e,
                )
                build_failures.append(req)
        if len(build_failures) != 0:
            raise CommandError("Failed to build one or more wheels")

        return SUCCESS
python3.12/site-packages/pip/_internal/commands/hash.py000064400000003247151732701430016763 0ustar00import hashlib
import logging
import sys
from optparse import Values
from typing import List

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.utils.hashes import FAVORITE_HASH, STRONG_HASHES
from pip._internal.utils.misc import read_chunks, write_output

logger = logging.getLogger(__name__)


class HashCommand(Command):
    """
    Compute a hash of a local package archive.

    These can be used with --hash in a requirements file to do repeatable
    installs.
    """

    usage = "%prog [options] <file> ..."
    ignore_require_venv = True

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "-a",
            "--algorithm",
            dest="algorithm",
            choices=STRONG_HASHES,
            action="store",
            default=FAVORITE_HASH,
            help="The hash algorithm to use: one of {}".format(
                ", ".join(STRONG_HASHES)
            ),
        )
        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        if not args:
            self.parser.print_usage(sys.stderr)
            return ERROR

        algorithm = options.algorithm
        for path in args:
            write_output(
                "%s:\n--hash=%s:%s", path, algorithm, _hash_of_file(path, algorithm)
            )
        return SUCCESS


def _hash_of_file(path: str, algorithm: str) -> str:
    """Return the hash digest of a file."""
    with open(path, "rb") as archive:
        hash = hashlib.new(algorithm)
        for chunk in read_chunks(archive):
            hash.update(chunk)
    return hash.hexdigest()
python3.12/site-packages/pip/_internal/commands/__init__.py000064400000007452151732701430017601 0ustar00"""
Package containing all pip commands
"""

import importlib
from collections import namedtuple
from typing import Any, Dict, Optional

from pip._internal.cli.base_command import Command

CommandInfo = namedtuple("CommandInfo", "module_path, class_name, summary")

# This dictionary does a bunch of heavy lifting for help output:
# - Enables avoiding additional (costly) imports for presenting `--help`.
# - The ordering matters for help display.
#
# Even though the module path starts with the same "pip._internal.commands"
# prefix, the full path makes testing easier (specifically when modifying
# `commands_dict` in test setup / teardown).
commands_dict: Dict[str, CommandInfo] = {
    "install": CommandInfo(
        "pip._internal.commands.install",
        "InstallCommand",
        "Install packages.",
    ),
    "download": CommandInfo(
        "pip._internal.commands.download",
        "DownloadCommand",
        "Download packages.",
    ),
    "uninstall": CommandInfo(
        "pip._internal.commands.uninstall",
        "UninstallCommand",
        "Uninstall packages.",
    ),
    "freeze": CommandInfo(
        "pip._internal.commands.freeze",
        "FreezeCommand",
        "Output installed packages in requirements format.",
    ),
    "inspect": CommandInfo(
        "pip._internal.commands.inspect",
        "InspectCommand",
        "Inspect the python environment.",
    ),
    "list": CommandInfo(
        "pip._internal.commands.list",
        "ListCommand",
        "List installed packages.",
    ),
    "show": CommandInfo(
        "pip._internal.commands.show",
        "ShowCommand",
        "Show information about installed packages.",
    ),
    "check": CommandInfo(
        "pip._internal.commands.check",
        "CheckCommand",
        "Verify installed packages have compatible dependencies.",
    ),
    "config": CommandInfo(
        "pip._internal.commands.configuration",
        "ConfigurationCommand",
        "Manage local and global configuration.",
    ),
    "search": CommandInfo(
        "pip._internal.commands.search",
        "SearchCommand",
        "Search PyPI for packages.",
    ),
    "cache": CommandInfo(
        "pip._internal.commands.cache",
        "CacheCommand",
        "Inspect and manage pip's wheel cache.",
    ),
    "index": CommandInfo(
        "pip._internal.commands.index",
        "IndexCommand",
        "Inspect information available from package indexes.",
    ),
    "wheel": CommandInfo(
        "pip._internal.commands.wheel",
        "WheelCommand",
        "Build wheels from your requirements.",
    ),
    "hash": CommandInfo(
        "pip._internal.commands.hash",
        "HashCommand",
        "Compute hashes of package archives.",
    ),
    "completion": CommandInfo(
        "pip._internal.commands.completion",
        "CompletionCommand",
        "A helper command used for command completion.",
    ),
    "debug": CommandInfo(
        "pip._internal.commands.debug",
        "DebugCommand",
        "Show information useful for debugging.",
    ),
    "help": CommandInfo(
        "pip._internal.commands.help",
        "HelpCommand",
        "Show help for commands.",
    ),
}


def create_command(name: str, **kwargs: Any) -> Command:
    """
    Create an instance of the Command class with the given name.
    """
    module_path, class_name, summary = commands_dict[name]
    module = importlib.import_module(module_path)
    command_class = getattr(module, class_name)
    command = command_class(name=name, summary=summary, **kwargs)

    return command


def get_similar_commands(name: str) -> Optional[str]:
    """Command name auto-correct."""
    from difflib import get_close_matches

    name = name.lower()

    close_commands = get_close_matches(name, commands_dict.keys())

    if close_commands:
        return close_commands[0]
    else:
        return None
python3.12/site-packages/pip/_internal/commands/show.py000064400000014423151732701430017016 0ustar00import logging
from optparse import Values
from typing import Generator, Iterable, Iterator, List, NamedTuple, Optional

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.metadata import BaseDistribution, get_default_environment
from pip._internal.utils.misc import write_output

logger = logging.getLogger(__name__)


class ShowCommand(Command):
    """
    Show information about one or more installed packages.

    The output is in RFC-compliant mail header format.
    """

    usage = """
      %prog [options] <package> ..."""
    ignore_require_venv = True

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "-f",
            "--files",
            dest="files",
            action="store_true",
            default=False,
            help="Show the full list of installed files for each package.",
        )

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        if not args:
            logger.warning("ERROR: Please provide a package name or names.")
            return ERROR
        query = args

        results = search_packages_info(query)
        if not print_results(
            results, list_files=options.files, verbose=options.verbose
        ):
            return ERROR
        return SUCCESS


class _PackageInfo(NamedTuple):
    name: str
    version: str
    location: str
    editable_project_location: Optional[str]
    requires: List[str]
    required_by: List[str]
    installer: str
    metadata_version: str
    classifiers: List[str]
    summary: str
    homepage: str
    project_urls: List[str]
    author: str
    author_email: str
    license: str
    entry_points: List[str]
    files: Optional[List[str]]


def search_packages_info(query: List[str]) -> Generator[_PackageInfo, None, None]:
    """
    Gather details from installed distributions. Print distribution name,
    version, location, and installed files. Installed files requires a
    pip generated 'installed-files.txt' in the distributions '.egg-info'
    directory.
    """
    env = get_default_environment()

    installed = {dist.canonical_name: dist for dist in env.iter_all_distributions()}
    query_names = [canonicalize_name(name) for name in query]
    missing = sorted(
        [name for name, pkg in zip(query, query_names) if pkg not in installed]
    )
    if missing:
        logger.warning("Package(s) not found: %s", ", ".join(missing))

    def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]:
        return (
            dist.metadata["Name"] or "UNKNOWN"
            for dist in installed.values()
            if current_dist.canonical_name
            in {canonicalize_name(d.name) for d in dist.iter_dependencies()}
        )

    for query_name in query_names:
        try:
            dist = installed[query_name]
        except KeyError:
            continue

        requires = sorted((req.name for req in dist.iter_dependencies()), key=str.lower)
        required_by = sorted(_get_requiring_packages(dist), key=str.lower)

        try:
            entry_points_text = dist.read_text("entry_points.txt")
            entry_points = entry_points_text.splitlines(keepends=False)
        except FileNotFoundError:
            entry_points = []

        files_iter = dist.iter_declared_entries()
        if files_iter is None:
            files: Optional[List[str]] = None
        else:
            files = sorted(files_iter)

        metadata = dist.metadata

        yield _PackageInfo(
            name=dist.raw_name,
            version=str(dist.version),
            location=dist.location or "",
            editable_project_location=dist.editable_project_location,
            requires=requires,
            required_by=required_by,
            installer=dist.installer,
            metadata_version=dist.metadata_version or "",
            classifiers=metadata.get_all("Classifier", []),
            summary=metadata.get("Summary", ""),
            homepage=metadata.get("Home-page", ""),
            project_urls=metadata.get_all("Project-URL", []),
            author=metadata.get("Author", ""),
            author_email=metadata.get("Author-email", ""),
            license=metadata.get("License", ""),
            entry_points=entry_points,
            files=files,
        )


def print_results(
    distributions: Iterable[_PackageInfo],
    list_files: bool,
    verbose: bool,
) -> bool:
    """
    Print the information from installed distributions found.
    """
    results_printed = False
    for i, dist in enumerate(distributions):
        results_printed = True
        if i > 0:
            write_output("---")

        write_output("Name: %s", dist.name)
        write_output("Version: %s", dist.version)
        write_output("Summary: %s", dist.summary)
        write_output("Home-page: %s", dist.homepage)
        write_output("Author: %s", dist.author)
        write_output("Author-email: %s", dist.author_email)
        write_output("License: %s", dist.license)
        write_output("Location: %s", dist.location)
        if dist.editable_project_location is not None:
            write_output(
                "Editable project location: %s", dist.editable_project_location
            )
        write_output("Requires: %s", ", ".join(dist.requires))
        write_output("Required-by: %s", ", ".join(dist.required_by))

        if verbose:
            write_output("Metadata-Version: %s", dist.metadata_version)
            write_output("Installer: %s", dist.installer)
            write_output("Classifiers:")
            for classifier in dist.classifiers:
                write_output("  %s", classifier)
            write_output("Entry-points:")
            for entry in dist.entry_points:
                write_output("  %s", entry.strip())
            write_output("Project-URLs:")
            for project_url in dist.project_urls:
                write_output("  %s", project_url)
        if list_files:
            write_output("Files:")
            if dist.files is None:
                write_output("Cannot locate RECORD or installed-files.txt")
            else:
                for line in dist.files:
                    write_output("  %s", line.strip())
    return results_printed
python3.12/site-packages/pip/_internal/commands/uninstall.py000064400000007456151732701430020057 0ustar00import logging
from optparse import Values
from typing import List

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.cli import cmdoptions
from pip._internal.cli.base_command import Command
from pip._internal.cli.req_command import SessionCommandMixin, warn_if_run_as_root
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.exceptions import InstallationError
from pip._internal.req import parse_requirements
from pip._internal.req.constructors import (
    install_req_from_line,
    install_req_from_parsed_requirement,
)
from pip._internal.utils.misc import (
    check_externally_managed,
    protect_pip_from_modification_on_windows,
)

logger = logging.getLogger(__name__)


class UninstallCommand(Command, SessionCommandMixin):
    """
    Uninstall packages.

    pip is able to uninstall most installed packages. Known exceptions are:

    - Pure distutils packages installed with ``python setup.py install``, which
      leave behind no metadata to determine what files were installed.
    - Script wrappers installed by ``python setup.py develop``.
    """

    usage = """
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ..."""

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "-r",
            "--requirement",
            dest="requirements",
            action="append",
            default=[],
            metavar="file",
            help=(
                "Uninstall all the packages listed in the given requirements "
                "file.  This option can be used multiple times."
            ),
        )
        self.cmd_opts.add_option(
            "-y",
            "--yes",
            dest="yes",
            action="store_true",
            help="Don't ask for confirmation of uninstall deletions.",
        )
        self.cmd_opts.add_option(cmdoptions.root_user_action())
        self.cmd_opts.add_option(cmdoptions.override_externally_managed())
        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        session = self.get_default_session(options)

        reqs_to_uninstall = {}
        for name in args:
            req = install_req_from_line(
                name,
                isolated=options.isolated_mode,
            )
            if req.name:
                reqs_to_uninstall[canonicalize_name(req.name)] = req
            else:
                logger.warning(
                    "Invalid requirement: %r ignored -"
                    " the uninstall command expects named"
                    " requirements.",
                    name,
                )
        for filename in options.requirements:
            for parsed_req in parse_requirements(
                filename, options=options, session=session
            ):
                req = install_req_from_parsed_requirement(
                    parsed_req, isolated=options.isolated_mode
                )
                if req.name:
                    reqs_to_uninstall[canonicalize_name(req.name)] = req
        if not reqs_to_uninstall:
            raise InstallationError(
                f"You must give at least one requirement to {self.name} (see "
                f'"pip help {self.name}")'
            )

        if not options.override_externally_managed:
            check_externally_managed()

        protect_pip_from_modification_on_windows(
            modifying_pip="pip" in reqs_to_uninstall
        )

        for req in reqs_to_uninstall.values():
            uninstall_pathset = req.uninstall(
                auto_confirm=options.yes,
                verbose=self.verbosity > 0,
            )
            if uninstall_pathset:
                uninstall_pathset.commit()
        if options.root_user_action == "warn":
            warn_if_run_as_root()
        return SUCCESS
python3.12/site-packages/pip/_internal/commands/configuration.py000064400000023127151732701430020706 0ustar00import logging
import os
import subprocess
from optparse import Values
from typing import Any, List, Optional

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.configuration import (
    Configuration,
    Kind,
    get_configuration_files,
    kinds,
)
from pip._internal.exceptions import PipError
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import get_prog, write_output

logger = logging.getLogger(__name__)


class ConfigurationCommand(Command):
    """
    Manage local and global configuration.

    Subcommands:

    - list: List the active configuration (or from the file specified)
    - edit: Edit the configuration file in an editor
    - get: Get the value associated with command.option
    - set: Set the command.option=value
    - unset: Unset the value associated with command.option
    - debug: List the configuration files and values defined under them

    Configuration keys should be dot separated command and option name,
    with the special prefix "global" affecting any command. For example,
    "pip config set global.index-url https://example.org/" would configure
    the index url for all commands, but "pip config set download.timeout 10"
    would configure a 10 second timeout only for "pip download" commands.

    If none of --user, --global and --site are passed, a virtual
    environment configuration file is used if one is active and the file
    exists. Otherwise, all modifications happen to the user file by
    default.
    """

    ignore_require_venv = True
    usage = """
        %prog [<file-option>] list
        %prog [<file-option>] [--editor <editor-path>] edit

        %prog [<file-option>] get command.option
        %prog [<file-option>] set command.option value
        %prog [<file-option>] unset command.option
        %prog [<file-option>] debug
    """

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "--editor",
            dest="editor",
            action="store",
            default=None,
            help=(
                "Editor to use to edit the file. Uses VISUAL or EDITOR "
                "environment variables if not provided."
            ),
        )

        self.cmd_opts.add_option(
            "--global",
            dest="global_file",
            action="store_true",
            default=False,
            help="Use the system-wide configuration file only",
        )

        self.cmd_opts.add_option(
            "--user",
            dest="user_file",
            action="store_true",
            default=False,
            help="Use the user configuration file only",
        )

        self.cmd_opts.add_option(
            "--site",
            dest="site_file",
            action="store_true",
            default=False,
            help="Use the current environment configuration file only",
        )

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        handlers = {
            "list": self.list_values,
            "edit": self.open_in_editor,
            "get": self.get_name,
            "set": self.set_name_value,
            "unset": self.unset_name,
            "debug": self.list_config_values,
        }

        # Determine action
        if not args or args[0] not in handlers:
            logger.error(
                "Need an action (%s) to perform.",
                ", ".join(sorted(handlers)),
            )
            return ERROR

        action = args[0]

        # Determine which configuration files are to be loaded
        #    Depends on whether the command is modifying.
        try:
            load_only = self._determine_file(
                options, need_value=(action in ["get", "set", "unset", "edit"])
            )
        except PipError as e:
            logger.error(e.args[0])
            return ERROR

        # Load a new configuration
        self.configuration = Configuration(
            isolated=options.isolated_mode, load_only=load_only
        )
        self.configuration.load()

        # Error handling happens here, not in the action-handlers.
        try:
            handlers[action](options, args[1:])
        except PipError as e:
            logger.error(e.args[0])
            return ERROR

        return SUCCESS

    def _determine_file(self, options: Values, need_value: bool) -> Optional[Kind]:
        file_options = [
            key
            for key, value in (
                (kinds.USER, options.user_file),
                (kinds.GLOBAL, options.global_file),
                (kinds.SITE, options.site_file),
            )
            if value
        ]

        if not file_options:
            if not need_value:
                return None
            # Default to user, unless there's a site file.
            elif any(
                os.path.exists(site_config_file)
                for site_config_file in get_configuration_files()[kinds.SITE]
            ):
                return kinds.SITE
            else:
                return kinds.USER
        elif len(file_options) == 1:
            return file_options[0]

        raise PipError(
            "Need exactly one file to operate upon "
            "(--user, --site, --global) to perform."
        )

    def list_values(self, options: Values, args: List[str]) -> None:
        self._get_n_args(args, "list", n=0)

        for key, value in sorted(self.configuration.items()):
            write_output("%s=%r", key, value)

    def get_name(self, options: Values, args: List[str]) -> None:
        key = self._get_n_args(args, "get [name]", n=1)
        value = self.configuration.get_value(key)

        write_output("%s", value)

    def set_name_value(self, options: Values, args: List[str]) -> None:
        key, value = self._get_n_args(args, "set [name] [value]", n=2)
        self.configuration.set_value(key, value)

        self._save_configuration()

    def unset_name(self, options: Values, args: List[str]) -> None:
        key = self._get_n_args(args, "unset [name]", n=1)
        self.configuration.unset_value(key)

        self._save_configuration()

    def list_config_values(self, options: Values, args: List[str]) -> None:
        """List config key-value pairs across different config files"""
        self._get_n_args(args, "debug", n=0)

        self.print_env_var_values()
        # Iterate over config files and print if they exist, and the
        # key-value pairs present in them if they do
        for variant, files in sorted(self.configuration.iter_config_files()):
            write_output("%s:", variant)
            for fname in files:
                with indent_log():
                    file_exists = os.path.exists(fname)
                    write_output("%s, exists: %r", fname, file_exists)
                    if file_exists:
                        self.print_config_file_values(variant)

    def print_config_file_values(self, variant: Kind) -> None:
        """Get key-value pairs from the file of a variant"""
        for name, value in self.configuration.get_values_in_config(variant).items():
            with indent_log():
                write_output("%s: %s", name, value)

    def print_env_var_values(self) -> None:
        """Get key-values pairs present as environment variables"""
        write_output("%s:", "env_var")
        with indent_log():
            for key, value in sorted(self.configuration.get_environ_vars()):
                env_var = f"PIP_{key.upper()}"
                write_output("%s=%r", env_var, value)

    def open_in_editor(self, options: Values, args: List[str]) -> None:
        editor = self._determine_editor(options)

        fname = self.configuration.get_file_to_edit()
        if fname is None:
            raise PipError("Could not determine appropriate file.")
        elif '"' in fname:
            # This shouldn't happen, unless we see a username like that.
            # If that happens, we'd appreciate a pull request fixing this.
            raise PipError(
                f'Can not open an editor for a file name containing "\n{fname}'
            )

        try:
            subprocess.check_call(f'{editor} "{fname}"', shell=True)
        except FileNotFoundError as e:
            if not e.filename:
                e.filename = editor
            raise
        except subprocess.CalledProcessError as e:
            raise PipError(
                "Editor Subprocess exited with exit code {}".format(e.returncode)
            )

    def _get_n_args(self, args: List[str], example: str, n: int) -> Any:
        """Helper to make sure the command got the right number of arguments"""
        if len(args) != n:
            msg = (
                "Got unexpected number of arguments, expected {}. "
                '(example: "{} config {}")'
            ).format(n, get_prog(), example)
            raise PipError(msg)

        if n == 1:
            return args[0]
        else:
            return args

    def _save_configuration(self) -> None:
        # We successfully ran a modifying command. Need to save the
        # configuration.
        try:
            self.configuration.save()
        except Exception:
            logger.exception(
                "Unable to save configuration. Please report this as a bug."
            )
            raise PipError("Internal Error.")

    def _determine_editor(self, options: Values) -> str:
        if options.editor is not None:
            return options.editor
        elif "VISUAL" in os.environ:
            return os.environ["VISUAL"]
        elif "EDITOR" in os.environ:
            return os.environ["EDITOR"]
        else:
            raise PipError("Could not determine editor to use.")
python3.12/site-packages/pip/_internal/commands/check.py000064400000003366151732701440017120 0ustar00import logging
from optparse import Values
from typing import List

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.operations.check import (
    check_package_set,
    create_package_set_from_installed,
    warn_legacy_versions_and_specifiers,
)
from pip._internal.utils.misc import write_output

logger = logging.getLogger(__name__)


class CheckCommand(Command):
    """Verify installed packages have compatible dependencies."""

    usage = """
      %prog [options]"""

    def run(self, options: Values, args: List[str]) -> int:
        package_set, parsing_probs = create_package_set_from_installed()
        warn_legacy_versions_and_specifiers(package_set)
        missing, conflicting = check_package_set(package_set)

        for project_name in missing:
            version = package_set[project_name].version
            for dependency in missing[project_name]:
                write_output(
                    "%s %s requires %s, which is not installed.",
                    project_name,
                    version,
                    dependency[0],
                )

        for project_name in conflicting:
            version = package_set[project_name].version
            for dep_name, dep_version, req in conflicting[project_name]:
                write_output(
                    "%s %s has requirement %s, but you have %s %s.",
                    project_name,
                    version,
                    req,
                    dep_name,
                    dep_version,
                )

        if missing or conflicting or parsing_probs:
            return ERROR
        else:
            write_output("No broken requirements found.")
            return SUCCESS
python3.12/site-packages/pip/_internal/commands/help.py000064400000002154151732701440016765 0ustar00from optparse import Values
from typing import List

from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.exceptions import CommandError


class HelpCommand(Command):
    """Show help for commands"""

    usage = """
      %prog <command>"""
    ignore_require_venv = True

    def run(self, options: Values, args: List[str]) -> int:
        from pip._internal.commands import (
            commands_dict,
            create_command,
            get_similar_commands,
        )

        try:
            # 'pip help' with no args is handled by pip.__init__.parseopt()
            cmd_name = args[0]  # the command we need help for
        except IndexError:
            return SUCCESS

        if cmd_name not in commands_dict:
            guess = get_similar_commands(cmd_name)

            msg = [f'unknown command "{cmd_name}"']
            if guess:
                msg.append(f'maybe you meant "{guess}"')

            raise CommandError(" - ".join(msg))

        command = create_command(cmd_name)
        command.parser.print_help()

        return SUCCESS
python3.12/site-packages/pip/_internal/commands/search.py000064400000013101151732701440017274 0ustar00import logging
import shutil
import sys
import textwrap
import xmlrpc.client
from collections import OrderedDict
from optparse import Values
from typing import TYPE_CHECKING, Dict, List, Optional

from pip._vendor.packaging.version import parse as parse_version

from pip._internal.cli.base_command import Command
from pip._internal.cli.req_command import SessionCommandMixin
from pip._internal.cli.status_codes import NO_MATCHES_FOUND, SUCCESS
from pip._internal.exceptions import CommandError
from pip._internal.metadata import get_default_environment
from pip._internal.models.index import PyPI
from pip._internal.network.xmlrpc import PipXmlrpcTransport
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import write_output

if TYPE_CHECKING:
    from typing import TypedDict

    class TransformedHit(TypedDict):
        name: str
        summary: str
        versions: List[str]


logger = logging.getLogger(__name__)


class SearchCommand(Command, SessionCommandMixin):
    """Search for PyPI packages whose name or summary contains <query>."""

    usage = """
      %prog [options] <query>"""
    ignore_require_venv = True

    def add_options(self) -> None:
        self.cmd_opts.add_option(
            "-i",
            "--index",
            dest="index",
            metavar="URL",
            default=PyPI.pypi_url,
            help="Base URL of Python Package Index (default %default)",
        )

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options: Values, args: List[str]) -> int:
        if not args:
            raise CommandError("Missing required argument (search query).")
        query = args
        pypi_hits = self.search(query, options)
        hits = transform_hits(pypi_hits)

        terminal_width = None
        if sys.stdout.isatty():
            terminal_width = shutil.get_terminal_size()[0]

        print_results(hits, terminal_width=terminal_width)
        if pypi_hits:
            return SUCCESS
        return NO_MATCHES_FOUND

    def search(self, query: List[str], options: Values) -> List[Dict[str, str]]:
        index_url = options.index

        session = self.get_default_session(options)

        transport = PipXmlrpcTransport(index_url, session)
        pypi = xmlrpc.client.ServerProxy(index_url, transport)
        try:
            hits = pypi.search({"name": query, "summary": query}, "or")
        except xmlrpc.client.Fault as fault:
            message = "XMLRPC request failed [code: {code}]\n{string}".format(
                code=fault.faultCode,
                string=fault.faultString,
            )
            raise CommandError(message)
        assert isinstance(hits, list)
        return hits


def transform_hits(hits: List[Dict[str, str]]) -> List["TransformedHit"]:
    """
    The list from pypi is really a list of versions. We want a list of
    packages with the list of versions stored inline. This converts the
    list from pypi into one we can use.
    """
    packages: Dict[str, "TransformedHit"] = OrderedDict()
    for hit in hits:
        name = hit["name"]
        summary = hit["summary"]
        version = hit["version"]

        if name not in packages.keys():
            packages[name] = {
                "name": name,
                "summary": summary,
                "versions": [version],
            }
        else:
            packages[name]["versions"].append(version)

            # if this is the highest version, replace summary and score
            if version == highest_version(packages[name]["versions"]):
                packages[name]["summary"] = summary

    return list(packages.values())


def print_dist_installation_info(name: str, latest: str) -> None:
    env = get_default_environment()
    dist = env.get_distribution(name)
    if dist is not None:
        with indent_log():
            if dist.version == latest:
                write_output("INSTALLED: %s (latest)", dist.version)
            else:
                write_output("INSTALLED: %s", dist.version)
                if parse_version(latest).pre:
                    write_output(
                        "LATEST:    %s (pre-release; install"
                        " with `pip install --pre`)",
                        latest,
                    )
                else:
                    write_output("LATEST:    %s", latest)


def print_results(
    hits: List["TransformedHit"],
    name_column_width: Optional[int] = None,
    terminal_width: Optional[int] = None,
) -> None:
    if not hits:
        return
    if name_column_width is None:
        name_column_width = (
            max(
                [
                    len(hit["name"]) + len(highest_version(hit.get("versions", ["-"])))
                    for hit in hits
                ]
            )
            + 4
        )

    for hit in hits:
        name = hit["name"]
        summary = hit["summary"] or ""
        latest = highest_version(hit.get("versions", ["-"]))
        if terminal_width is not None:
            target_width = terminal_width - name_column_width - 5
            if target_width > 10:
                # wrap and indent summary to fit terminal
                summary_lines = textwrap.wrap(summary, target_width)
                summary = ("\n" + " " * (name_column_width + 3)).join(summary_lines)

        name_latest = f"{name} ({latest})"
        line = f"{name_latest:{name_column_width}} - {summary}"
        try:
            write_output(line)
            print_dist_installation_info(name, latest)
        except UnicodeEncodeError:
            pass


def highest_version(versions: List[str]) -> str:
    return max(versions, key=parse_version)
python3.12/site-packages/pip/_internal/commands/install.py000064400000070370151732701440017510 0ustar00import errno
import json
import operator
import os
import shutil
import site
from optparse import SUPPRESS_HELP, Values
from typing import List, Optional

from pip._vendor.rich import print_json

from pip._internal.cache import WheelCache
from pip._internal.cli import cmdoptions
from pip._internal.cli.cmdoptions import make_target_python
from pip._internal.cli.req_command import (
    RequirementCommand,
    warn_if_run_as_root,
    with_cleanup,
)
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.exceptions import CommandError, InstallationError
from pip._internal.locations import get_scheme
from pip._internal.metadata import get_environment
from pip._internal.models.installation_report import InstallationReport
from pip._internal.operations.build.build_tracker import get_build_tracker
from pip._internal.operations.check import ConflictDetails, check_install_conflicts
from pip._internal.req import install_given_reqs
from pip._internal.req.req_install import (
    InstallRequirement,
    check_legacy_setup_py_options,
)
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.filesystem import test_writable_dir
from pip._internal.utils.logging import getLogger
from pip._internal.utils.misc import (
    check_externally_managed,
    ensure_dir,
    get_pip_version,
    protect_pip_from_modification_on_windows,
    write_output,
)
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.utils.virtualenv import (
    running_under_virtualenv,
    virtualenv_no_global,
)
from pip._internal.wheel_builder import build, should_build_for_install_command

logger = getLogger(__name__)


class InstallCommand(RequirementCommand):
    """
    Install packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    """

    usage = """
      %prog [options] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ..."""

    def add_options(self) -> None:
        self.cmd_opts.add_option(cmdoptions.requirements())
        self.cmd_opts.add_option(cmdoptions.constraints())
        self.cmd_opts.add_option(cmdoptions.no_deps())
        self.cmd_opts.add_option(cmdoptions.pre())

        self.cmd_opts.add_option(cmdoptions.editable())
        self.cmd_opts.add_option(
            "--dry-run",
            action="store_true",
            dest="dry_run",
            default=False,
            help=(
                "Don't actually install anything, just print what would be. "
                "Can be used in combination with --ignore-installed "
                "to 'resolve' the requirements."
            ),
        )
        self.cmd_opts.add_option(
            "-t",
            "--target",
            dest="target_dir",
            metavar="dir",
            default=None,
            help=(
                "Install packages into <dir>. "
                "By default this will not replace existing files/folders in "
                "<dir>. Use --upgrade to replace existing packages in <dir> "
                "with new versions."
            ),
        )
        cmdoptions.add_target_python_options(self.cmd_opts)

        self.cmd_opts.add_option(
            "--user",
            dest="use_user_site",
            action="store_true",
            help=(
                "Install to the Python user install directory for your "
                "platform. Typically ~/.local/, or %APPDATA%\\Python on "
                "Windows. (See the Python documentation for site.USER_BASE "
                "for full details.)"
            ),
        )
        self.cmd_opts.add_option(
            "--no-user",
            dest="use_user_site",
            action="store_false",
            help=SUPPRESS_HELP,
        )
        self.cmd_opts.add_option(
            "--root",
            dest="root_path",
            metavar="dir",
            default=None,
            help="Install everything relative to this alternate root directory.",
        )
        self.cmd_opts.add_option(
            "--prefix",
            dest="prefix_path",
            metavar="dir",
            default=None,
            help=(
                "Installation prefix where lib, bin and other top-level "
                "folders are placed. Note that the resulting installation may "
                "contain scripts and other resources which reference the "
                "Python interpreter of pip, and not that of ``--prefix``. "
                "See also the ``--python`` option if the intention is to "
                "install packages into another (possibly pip-free) "
                "environment."
            ),
        )

        self.cmd_opts.add_option(cmdoptions.src())

        self.cmd_opts.add_option(
            "-U",
            "--upgrade",
            dest="upgrade",
            action="store_true",
            help=(
                "Upgrade all specified packages to the newest available "
                "version. The handling of dependencies depends on the "
                "upgrade-strategy used."
            ),
        )

        self.cmd_opts.add_option(
            "--upgrade-strategy",
            dest="upgrade_strategy",
            default="only-if-needed",
            choices=["only-if-needed", "eager"],
            help=(
                "Determines how dependency upgrading should be handled "
                "[default: %default]. "
                '"eager" - dependencies are upgraded regardless of '
                "whether the currently installed version satisfies the "
                "requirements of the upgraded package(s). "
                '"only-if-needed" -  are upgraded only when they do not '
                "satisfy the requirements of the upgraded package(s)."
            ),
        )

        self.cmd_opts.add_option(
            "--force-reinstall",
            dest="force_reinstall",
            action="store_true",
            help="Reinstall all packages even if they are already up-to-date.",
        )

        self.cmd_opts.add_option(
            "-I",
            "--ignore-installed",
            dest="ignore_installed",
            action="store_true",
            help=(
                "Ignore the installed packages, overwriting them. "
                "This can break your system if the existing package "
                "is of a different version or was installed "
                "with a different package manager!"
            ),
        )

        self.cmd_opts.add_option(cmdoptions.ignore_requires_python())
        self.cmd_opts.add_option(cmdoptions.no_build_isolation())
        self.cmd_opts.add_option(cmdoptions.use_pep517())
        self.cmd_opts.add_option(cmdoptions.no_use_pep517())
        self.cmd_opts.add_option(cmdoptions.check_build_deps())
        self.cmd_opts.add_option(cmdoptions.override_externally_managed())

        self.cmd_opts.add_option(cmdoptions.config_settings())
        self.cmd_opts.add_option(cmdoptions.global_options())

        self.cmd_opts.add_option(
            "--compile",
            action="store_true",
            dest="compile",
            default=True,
            help="Compile Python source files to bytecode",
        )

        self.cmd_opts.add_option(
            "--no-compile",
            action="store_false",
            dest="compile",
            help="Do not compile Python source files to bytecode",
        )

        self.cmd_opts.add_option(
            "--no-warn-script-location",
            action="store_false",
            dest="warn_script_location",
            default=True,
            help="Do not warn when installing scripts outside PATH",
        )
        self.cmd_opts.add_option(
            "--no-warn-conflicts",
            action="store_false",
            dest="warn_about_conflicts",
            default=True,
            help="Do not warn about broken dependencies",
        )
        self.cmd_opts.add_option(cmdoptions.no_binary())
        self.cmd_opts.add_option(cmdoptions.only_binary())
        self.cmd_opts.add_option(cmdoptions.prefer_binary())
        self.cmd_opts.add_option(cmdoptions.require_hashes())
        self.cmd_opts.add_option(cmdoptions.progress_bar())
        self.cmd_opts.add_option(cmdoptions.root_user_action())

        index_opts = cmdoptions.make_option_group(
            cmdoptions.index_group,
            self.parser,
        )

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, self.cmd_opts)

        self.cmd_opts.add_option(
            "--report",
            dest="json_report_file",
            metavar="file",
            default=None,
            help=(
                "Generate a JSON file describing what pip did to install "
                "the provided requirements. "
                "Can be used in combination with --dry-run and --ignore-installed "
                "to 'resolve' the requirements. "
                "When - is used as file name it writes to stdout. "
                "When writing to stdout, please combine with the --quiet option "
                "to avoid mixing pip logging output with JSON output."
            ),
        )

    @with_cleanup
    def run(self, options: Values, args: List[str]) -> int:
        if options.use_user_site and options.target_dir is not None:
            raise CommandError("Can not combine '--user' and '--target'")

        # Check whether the environment we're installing into is externally
        # managed, as specified in PEP 668. Specifying --root, --target, or
        # --prefix disables the check, since there's no reliable way to locate
        # the EXTERNALLY-MANAGED file for those cases. An exception is also
        # made specifically for "--dry-run --report" for convenience.
        installing_into_current_environment = (
            not (options.dry_run and options.json_report_file)
            and options.root_path is None
            and options.target_dir is None
            and options.prefix_path is None
        )
        if (
            installing_into_current_environment
            and not options.override_externally_managed
        ):
            check_externally_managed()

        upgrade_strategy = "to-satisfy-only"
        if options.upgrade:
            upgrade_strategy = options.upgrade_strategy

        cmdoptions.check_dist_restriction(options, check_target=True)

        logger.verbose("Using %s", get_pip_version())
        options.use_user_site = decide_user_install(
            options.use_user_site,
            prefix_path=options.prefix_path,
            target_dir=options.target_dir,
            root_path=options.root_path,
            isolated_mode=options.isolated_mode,
        )

        target_temp_dir: Optional[TempDirectory] = None
        target_temp_dir_path: Optional[str] = None
        if options.target_dir:
            options.ignore_installed = True
            options.target_dir = os.path.abspath(options.target_dir)
            if (
                # fmt: off
                os.path.exists(options.target_dir) and
                not os.path.isdir(options.target_dir)
                # fmt: on
            ):
                raise CommandError(
                    "Target path exists but is not a directory, will not continue."
                )

            # Create a target directory for using with the target option
            target_temp_dir = TempDirectory(kind="target")
            target_temp_dir_path = target_temp_dir.path
            self.enter_context(target_temp_dir)

        global_options = options.global_options or []

        session = self.get_default_session(options)

        target_python = make_target_python(options)
        finder = self._build_package_finder(
            options=options,
            session=session,
            target_python=target_python,
            ignore_requires_python=options.ignore_requires_python,
        )
        build_tracker = self.enter_context(get_build_tracker())

        directory = TempDirectory(
            delete=not options.no_clean,
            kind="install",
            globally_managed=True,
        )

        try:
            reqs = self.get_requirements(args, options, finder, session)
            check_legacy_setup_py_options(options, reqs)

            wheel_cache = WheelCache(options.cache_dir)

            # Only when installing is it permitted to use PEP 660.
            # In other circumstances (pip wheel, pip download) we generate
            # regular (i.e. non editable) metadata and wheels.
            for req in reqs:
                req.permit_editable_wheels = True

            preparer = self.make_requirement_preparer(
                temp_build_dir=directory,
                options=options,
                build_tracker=build_tracker,
                session=session,
                finder=finder,
                use_user_site=options.use_user_site,
                verbosity=self.verbosity,
            )
            resolver = self.make_resolver(
                preparer=preparer,
                finder=finder,
                options=options,
                wheel_cache=wheel_cache,
                use_user_site=options.use_user_site,
                ignore_installed=options.ignore_installed,
                ignore_requires_python=options.ignore_requires_python,
                force_reinstall=options.force_reinstall,
                upgrade_strategy=upgrade_strategy,
                use_pep517=options.use_pep517,
            )

            self.trace_basic_info(finder)

            requirement_set = resolver.resolve(
                reqs, check_supported_wheels=not options.target_dir
            )

            if options.json_report_file:
                report = InstallationReport(requirement_set.requirements_to_install)
                if options.json_report_file == "-":
                    print_json(data=report.to_dict())
                else:
                    with open(options.json_report_file, "w", encoding="utf-8") as f:
                        json.dump(report.to_dict(), f, indent=2, ensure_ascii=False)

            if options.dry_run:
                # In non dry-run mode, the legacy versions and specifiers check
                # will be done as part of conflict detection.
                requirement_set.warn_legacy_versions_and_specifiers()
                would_install_items = sorted(
                    (r.metadata["name"], r.metadata["version"])
                    for r in requirement_set.requirements_to_install
                )
                if would_install_items:
                    write_output(
                        "Would install %s",
                        " ".join("-".join(item) for item in would_install_items),
                    )
                return SUCCESS

            try:
                pip_req = requirement_set.get_requirement("pip")
            except KeyError:
                modifying_pip = False
            else:
                # If we're not replacing an already installed pip,
                # we're not modifying it.
                modifying_pip = pip_req.satisfied_by is None
            protect_pip_from_modification_on_windows(modifying_pip=modifying_pip)

            reqs_to_build = [
                r
                for r in requirement_set.requirements.values()
                if should_build_for_install_command(r)
            ]

            _, build_failures = build(
                reqs_to_build,
                wheel_cache=wheel_cache,
                verify=True,
                build_options=[],
                global_options=global_options,
            )

            if build_failures:
                raise InstallationError(
                    "Could not build wheels for {}, which is required to "
                    "install pyproject.toml-based projects".format(
                        ", ".join(r.name for r in build_failures)  # type: ignore
                    )
                )

            to_install = resolver.get_installation_order(requirement_set)

            # Check for conflicts in the package set we're installing.
            conflicts: Optional[ConflictDetails] = None
            should_warn_about_conflicts = (
                not options.ignore_dependencies and options.warn_about_conflicts
            )
            if should_warn_about_conflicts:
                conflicts = self._determine_conflicts(to_install)

            # Don't warn about script install locations if
            # --target or --prefix has been specified
            warn_script_location = options.warn_script_location
            if options.target_dir or options.prefix_path:
                warn_script_location = False

            installed = install_given_reqs(
                to_install,
                global_options,
                root=options.root_path,
                home=target_temp_dir_path,
                prefix=options.prefix_path,
                warn_script_location=warn_script_location,
                use_user_site=options.use_user_site,
                pycompile=options.compile,
            )

            lib_locations = get_lib_location_guesses(
                user=options.use_user_site,
                home=target_temp_dir_path,
                root=options.root_path,
                prefix=options.prefix_path,
                isolated=options.isolated_mode,
            )
            env = get_environment(lib_locations)

            installed.sort(key=operator.attrgetter("name"))
            items = []
            for result in installed:
                item = result.name
                try:
                    installed_dist = env.get_distribution(item)
                    if installed_dist is not None:
                        item = f"{item}-{installed_dist.version}"
                except Exception:
                    pass
                items.append(item)

            if conflicts is not None:
                self._warn_about_conflicts(
                    conflicts,
                    resolver_variant=self.determine_resolver_variant(options),
                )

            installed_desc = " ".join(items)
            if installed_desc:
                write_output(
                    "Successfully installed %s",
                    installed_desc,
                )
        except OSError as error:
            show_traceback = self.verbosity >= 1

            message = create_os_error_message(
                error,
                show_traceback,
                options.use_user_site,
            )
            logger.error(message, exc_info=show_traceback)

            return ERROR

        if options.target_dir:
            assert target_temp_dir
            self._handle_target_dir(
                options.target_dir, target_temp_dir, options.upgrade
            )
        if options.root_user_action == "warn":
            warn_if_run_as_root()
        return SUCCESS

    def _handle_target_dir(
        self, target_dir: str, target_temp_dir: TempDirectory, upgrade: bool
    ) -> None:
        ensure_dir(target_dir)

        # Checking both purelib and platlib directories for installed
        # packages to be moved to target directory
        lib_dir_list = []

        # Checking both purelib and platlib directories for installed
        # packages to be moved to target directory
        scheme = get_scheme("", home=target_temp_dir.path)
        purelib_dir = scheme.purelib
        platlib_dir = scheme.platlib
        data_dir = scheme.data

        if os.path.exists(purelib_dir):
            lib_dir_list.append(purelib_dir)
        if os.path.exists(platlib_dir) and platlib_dir != purelib_dir:
            lib_dir_list.append(platlib_dir)
        if os.path.exists(data_dir):
            lib_dir_list.append(data_dir)

        for lib_dir in lib_dir_list:
            for item in os.listdir(lib_dir):
                if lib_dir == data_dir:
                    ddir = os.path.join(data_dir, item)
                    if any(s.startswith(ddir) for s in lib_dir_list[:-1]):
                        continue
                target_item_dir = os.path.join(target_dir, item)
                if os.path.exists(target_item_dir):
                    if not upgrade:
                        logger.warning(
                            "Target directory %s already exists. Specify "
                            "--upgrade to force replacement.",
                            target_item_dir,
                        )
                        continue
                    if os.path.islink(target_item_dir):
                        logger.warning(
                            "Target directory %s already exists and is "
                            "a link. pip will not automatically replace "
                            "links, please remove if replacement is "
                            "desired.",
                            target_item_dir,
                        )
                        continue
                    if os.path.isdir(target_item_dir):
                        shutil.rmtree(target_item_dir)
                    else:
                        os.remove(target_item_dir)

                shutil.move(os.path.join(lib_dir, item), target_item_dir)

    def _determine_conflicts(
        self, to_install: List[InstallRequirement]
    ) -> Optional[ConflictDetails]:
        try:
            return check_install_conflicts(to_install)
        except Exception:
            logger.exception(
                "Error while checking for conflicts. Please file an issue on "
                "pip's issue tracker: https://github.com/pypa/pip/issues/new"
            )
            return None

    def _warn_about_conflicts(
        self, conflict_details: ConflictDetails, resolver_variant: str
    ) -> None:
        package_set, (missing, conflicting) = conflict_details
        if not missing and not conflicting:
            return

        parts: List[str] = []
        if resolver_variant == "legacy":
            parts.append(
                "pip's legacy dependency resolver does not consider dependency "
                "conflicts when selecting packages. This behaviour is the "
                "source of the following dependency conflicts."
            )
        else:
            assert resolver_variant == "resolvelib"
            parts.append(
                "pip's dependency resolver does not currently take into account "
                "all the packages that are installed. This behaviour is the "
                "source of the following dependency conflicts."
            )

        # NOTE: There is some duplication here, with commands/check.py
        for project_name in missing:
            version = package_set[project_name][0]
            for dependency in missing[project_name]:
                message = (
                    "{name} {version} requires {requirement}, "
                    "which is not installed."
                ).format(
                    name=project_name,
                    version=version,
                    requirement=dependency[1],
                )
                parts.append(message)

        for project_name in conflicting:
            version = package_set[project_name][0]
            for dep_name, dep_version, req in conflicting[project_name]:
                message = (
                    "{name} {version} requires {requirement}, but {you} have "
                    "{dep_name} {dep_version} which is incompatible."
                ).format(
                    name=project_name,
                    version=version,
                    requirement=req,
                    dep_name=dep_name,
                    dep_version=dep_version,
                    you=("you" if resolver_variant == "resolvelib" else "you'll"),
                )
                parts.append(message)

        logger.critical("\n".join(parts))


def get_lib_location_guesses(
    user: bool = False,
    home: Optional[str] = None,
    root: Optional[str] = None,
    isolated: bool = False,
    prefix: Optional[str] = None,
) -> List[str]:
    scheme = get_scheme(
        "",
        user=user,
        home=home,
        root=root,
        isolated=isolated,
        prefix=prefix,
    )
    return [scheme.purelib, scheme.platlib]


def site_packages_writable(root: Optional[str], isolated: bool) -> bool:
    return all(
        test_writable_dir(d)
        for d in set(get_lib_location_guesses(root=root, isolated=isolated))
    )


def decide_user_install(
    use_user_site: Optional[bool],
    prefix_path: Optional[str] = None,
    target_dir: Optional[str] = None,
    root_path: Optional[str] = None,
    isolated_mode: bool = False,
) -> bool:
    """Determine whether to do a user install based on the input options.

    If use_user_site is False, no additional checks are done.
    If use_user_site is True, it is checked for compatibility with other
    options.
    If use_user_site is None, the default behaviour depends on the environment,
    which is provided by the other arguments.
    """
    # In some cases (config from tox), use_user_site can be set to an integer
    # rather than a bool, which 'use_user_site is False' wouldn't catch.
    if (use_user_site is not None) and (not use_user_site):
        logger.debug("Non-user install by explicit request")
        return False

    if use_user_site:
        if prefix_path:
            raise CommandError(
                "Can not combine '--user' and '--prefix' as they imply "
                "different installation locations"
            )
        if virtualenv_no_global():
            raise InstallationError(
                "Can not perform a '--user' install. User site-packages "
                "are not visible in this virtualenv."
            )
        logger.debug("User install by explicit request")
        return True

    # If we are here, user installs have not been explicitly requested/avoided
    assert use_user_site is None

    # user install incompatible with --prefix/--target
    if prefix_path or target_dir:
        logger.debug("Non-user install due to --prefix or --target option")
        return False

    # If user installs are not enabled, choose a non-user install
    if not site.ENABLE_USER_SITE:
        logger.debug("Non-user install because user site-packages disabled")
        return False

    # If we have permission for a non-user install, do that,
    # otherwise do a user install.
    if site_packages_writable(root=root_path, isolated=isolated_mode):
        logger.debug("Non-user install because site-packages writeable")
        return False

    logger.info(
        "Defaulting to user installation because normal site-packages "
        "is not writeable"
    )
    return True


def create_os_error_message(
    error: OSError, show_traceback: bool, using_user_site: bool
) -> str:
    """Format an error message for an OSError

    It may occur anytime during the execution of the install command.
    """
    parts = []

    # Mention the error if we are not going to show a traceback
    parts.append("Could not install packages due to an OSError")
    if not show_traceback:
        parts.append(": ")
        parts.append(str(error))
    else:
        parts.append(".")

    # Spilt the error indication from a helper message (if any)
    parts[-1] += "\n"

    # Suggest useful actions to the user:
    #  (1) using user site-packages or (2) verifying the permissions
    if error.errno == errno.EACCES:
        user_option_part = "Consider using the `--user` option"
        permissions_part = "Check the permissions"

        if not running_under_virtualenv() and not using_user_site:
            parts.extend(
                [
                    user_option_part,
                    " or ",
                    permissions_part.lower(),
                ]
            )
        else:
            parts.append(permissions_part)
        parts.append(".\n")

    # Suggest the user to enable Long Paths if path length is
    # more than 260
    if (
        WINDOWS
        and error.errno == errno.ENOENT
        and error.filename
        and len(error.filename) > 260
    ):
        parts.append(
            "HINT: This error might have occurred since "
            "this system does not have Windows Long Path "
            "support enabled. You can find information on "
            "how to enable this at "
            "https://pip.pypa.io/warnings/enable-long-paths\n"
        )

    return "".join(parts).strip() + "\n"
python3.12/site-packages/pip/_internal/index/__pycache__/__init__.cpython-312.pyc000064400000000427151732701450023445 0ustar00�

R`i���dZy)zIndex interaction code
N)�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/index/__init__.py�<module>rs
��rpython3.12/site-packages/pip/_internal/index/__pycache__/collector.cpython-312.pyc000064400000052607151732701450023703 0ustar00�

R`ix@�	�"�dZddlZddlZddlZddlZddlZddlZddlZddl	Z
ddlZ
ddlm
Z
ddlmZddlmZmZmZmZmZmZmZmZmZmZmZddlmZddlmZddl m!Z!m"Z"dd	l#m$Z$dd
l%m&Z&ddl'm(Z(ddl)m*Z*dd
l+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4m5Z5m6Z6erddlm7Z7ne8Z7ejre:�Z;ee<e<fZ=de<dee<fd�Z>Gd�de?�Z@deddfd�ZAGd�de?�ZBde<de*ddfd�ZCde<de*defd�ZDd e=dee<fd!�ZEGd"�d#�ZFGd$�d%e7�ZGd&eGdeGfd'�ZHeHd(d)dee&fd*��ZIGd+�d)�ZJGd,�d-e
�ZK	d:d.e&d/ee<e?fd0eed1ddfd2�ZL	d;ded3eMdeJfd4�ZNd.e&de*ded)fd5�ZOGd6�d7e�ZPGd8�d9�ZQy)<zO
The main purpose of this module is to expose LinkCollector.collect_sources().
�N)�
HTMLParser)�Values)�
TYPE_CHECKING�Callable�Dict�Iterable�List�MutableMapping�
NamedTuple�Optional�Sequence�Tuple�Union)�requests)�Response)�
RetryError�SSLError)�NetworkConnectionError)�Link)�SearchScope)�
PipSession)�raise_for_status)�is_archive_file��redact_auth_from_url)�vcs�)�CandidatesFromPage�
LinkSource�build_source)�Protocol�url�returnc��tjD]6}|j�j|�s�#|t	|�dvs�4|cSy)zgLook for VCS schemes in the URL.

    Returns the matched VCS scheme, or None if there's no match.
    z+:N)r�schemes�lower�
startswith�len)r"�schemes  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/index/collector.py�_match_vcs_schemer+7s@��
�+�+���9�9�;�!�!�&�)�c�#�f�+�.>�$�.F��M���c�,��eZdZdededdf�fd�Z�xZS)�_NotAPIContent�content_type�request_descr#Nc�B��t�|�||�||_||_y�N)�super�__init__r/r0)�selfr/r0�	__class__s   �r*r4z_NotAPIContent.__init__Cs"���
����|�4�(���(��r,)�__name__�
__module__�__qualname__�strr4�
__classcell__�r6s@r*r.r.Bs"���)�S�)��)��)�)r,r.�responsec��|jjdd�}|j�}|jd�ryt	||j
j��)z�
    Check the Content-Type header to ensure the response contains a Simple
    API Response.

    Raises `_NotAPIContent` if the content type is not a valid content-type.
    �Content-Type�Unknown)z	text/htmlz#application/vnd.pypi.simple.v1+html�#application/vnd.pypi.simple.v1+jsonN)�headers�getr&r'r.�request�method)r=r/�content_type_ls   r*�_ensure_api_headerrGIs[���#�#�'�'��	�B�L�!�'�'�)�N�� � �	
��	�
��x�'7�'7�'>�'>�
?�?r,c��eZdZy)�_NotHTTPN)r7r8r9�r,r*rIrI_s��r,rI�sessionc��tjj|�\}}}}}|dvr
t��|j	|d��}t|�t
|�y)z�
    Send a HEAD request to the URL, and ensure the response contains a simple
    API Response.

    Raises `_NotHTTP` if the URL is not available for a HEAD request, or
    `_NotAPIContent` if the content type is not a valid content type.
    >�http�httpsT)�allow_redirectsN)�urllib�parse�urlsplitrI�headrrG)r"rKr)�netloc�path�query�fragment�resps        r*�_ensure_api_responserYcsV��-3�L�L�,A�,A�#�,F�)�F�F�D�%��
�&�&��j���<�<��T�<�2�D��T���t�r,c��tt|�j�r
t||��tjdt
|��|j|djgd��dd���}t|�t|�tjdt
|�|jjd	d
��|S)aYAccess an Simple API response with GET, and return the response.

    This consists of three parts:

    1. If the URL looks suspiciously like an archive, send a HEAD first to
       check the Content-Type is HTML or Simple API, to avoid downloading a
       large file. Raise `_NotHTTP` if the content type cannot be determined, or
       `_NotAPIContent` if it is not HTML or a Simple API.
    2. Actually perform the request. Raise HTTP exceptions on network failures.
    3. Check the Content-Type header to make sure we got a Simple API response,
       and raise `_NotAPIContent` otherwise.
    �rKzGetting page %sz, )rAz*application/vnd.pypi.simple.v1+html; q=0.1ztext/html; q=0.01z	max-age=0)�Acceptz
Cache-Control)rBzFetched page %s as %sr?r@)rr�filenamerY�logger�debugrrC�joinrrGrB)r"rKrXs   r*�_get_simple_responseraus����t�C�y�)�)�*��S�'�2�
�L�L�"�$8��$=�>��;�;���i�i���()�+
���D�4�T���t��
�L�L���S�!��������3���Kr,rBc��|rHd|vrDtjj�}|d|d<|jd�}|rt	|�Sy)z=Determine if we have any encoding information in our headers.r?zcontent-type�charsetN)�email�message�Message�	get_paramr:)rB�mrcs   r*�_get_encoding_from_headersri�sK���>�W�,��M�M�!�!�#��#�N�3��.���+�+�i�(����w�<��r,c�0�eZdZdd�Zdedefd�Zdefd�Zy)�CacheablePageContentr#Nc�.�|jsJ�||_yr2)�cache_link_parsing�page�r5rns  r*r4zCacheablePageContent.__init__�s���&�&�&�&���	r,�otherc��t|t|��xr-|jj|jjk(Sr2)�
isinstance�typernr")r5rps  r*�__eq__zCacheablePageContent.__eq__�s-���%��d��,�P������%�*�*�.�.�1P�Pr,c�@�t|jj�Sr2)�hashrnr"�r5s r*�__hash__zCacheablePageContent.__hash__�s���D�I�I�M�M�"�"r,)rn�IndexContentr#N)	r7r8r9r4�object�boolrt�intrxrJr,r*rkrk�s)���Q�F�Q�t�Q�#�#�#r,rkc�"�eZdZdddeefd�Zy)�
ParseLinksrnryr#c��yr2rJros  r*�__call__zParseLinks.__call__�s��r,N)r7r8r9rrr�rJr,r*r~r~�s���^�����r,r~�fnc�����tjd��dtdttf�fd���tj
��dddttf��fd��}|S)	z�
    Given a function that parses an Iterable[Link] from an IndexContent, cache the
    function's result (keyed by CacheablePageContent), unless the IndexContent
    `page` has `page.cache_link_parsing == False`.
    N)�maxsize�cacheable_pager#c�:��t�|j��Sr2)�listrn)r�r�s �r*�wrapperz*with_cached_index_content.<locals>.wrapper�s����B�~�*�*�+�,�,r,rnryc�`��|jr�t|��St�|��Sr2)rmrkr�)rnr�r�s ��r*�wrapper_wrapperz2with_cached_index_content.<locals>.wrapper_wrapper�s+����"�"��/��5�6�6��B�t�H�~�r,)�	functools�	lru_cacherkr	r�wraps)r�r�r�s` @r*�with_cached_index_contentr��sl�������&�-� 4�-��d��-�'�-��_�_�R���n���d�����
�r,rnryc#�TK�|jj�}|jd�r^tj|j
�}|j
dg�D])}tj||j�}|��&|���+yt|j�}|jxsd}|j|j
j|��|j}|jxs|}|jD]!}	tj |	||��}|��|���#y�w)z\
    Parse a Simple API's Index Content, and yield its anchor elements as Link objects.
    rA�filesNzutf-8)�page_url�base_url)r/r&r'�json�loads�contentrCr�	from_jsonr"�HTMLLinkParser�encoding�feed�decoder��anchors�from_element)
rnrF�data�file�link�parserr�r"r��anchors
          r*�parse_linksr��s������&�&�,�,�.�N�� � �!F�G��z�z�$�,�,�'���H�H�W�b�)�D��>�>�$����1�D��|���J�	*�
	�
�D�H�H�
%�F��}�}�'��H�
�K�K����#�#�H�-�.�
�(�(�C����%�#�H��.�.��� � ��#��I���<���
�	!�s�D&D(c
�F�eZdZdZ	ddededeedededdfd	�Zdefd
�Z	y)ryz5Represents one response (or page), along with its URLr�r/r�r"rmr#Nc�J�||_||_||_||_||_y)am
        :param encoding: the encoding to decode the given content.
        :param url: the URL from which the HTML was downloaded.
        :param cache_link_parsing: whether links parsed from this page's url
                                   should be cached. PyPI index urls should
                                   have this set to False, for example.
        N)r�r/r�r"rm)r5r�r/r�r"rms      r*r4zIndexContent.__init__s)�����(��� ��
����"4��r,c�,�t|j�Sr2)rr"rws r*�__str__zIndexContent.__str__s��#�D�H�H�-�-r,�T)
r7r8r9�__doc__�bytesr:rr{r4r�rJr,r*ryrysY��?�$(�
5��5��5��3�-�	5�
�5�!�
5�
�5�*.��.r,c���eZdZdZdeddf�fd�Zdedeeeeefddfd�Z	deeeeefdeefd	�Z
�xZS)
r�zf
    HTMLParser that keeps the first base HREF and a list of all anchor
    elements' attributes.
    r"r#Nc�P��t�|�d��||_d|_g|_y)NT)�convert_charrefs)r3r4r"r�r�)r5r"r6s  �r*r4zHTMLLinkParser.__init__#s(���
���$��/����'+��
�79��r,�tag�attrsc��|dk(r(|j�|j|�}|�||_yy|dk(r%|jjt	|��yy)N�base�a)r��get_hrefr��append�dict)r5r�r��hrefs    r*�handle_starttagzHTMLLinkParser.handle_starttag*sT���&�=�T�]�]�2��=�=��'�D��� $��
� �
�C�Z��L�L����U��,�r,c�*�|D]\}}|dk(s�|cSy)Nr�rJ)r5r��name�values    r*r�zHTMLLinkParser.get_href2s!�� �K�D�%��v�~���!�r,)r7r8r9r�r:r4r	rrr�r�r;r<s@r*r�r�ss����
:�C�:�D�:�-�3�-�t�E�#�x��}�:L�4M�/N�-�SW�-��d�5��h�s�m�);�#<�=��(�3�-�r,r�r��reason�meth).Nc�<�|�tj}|d||�y)Nz%Could not fetch URL %s: %s - skipping)r^r_)r�r�r�s   r*�_handle_get_simple_failr�9s��
�|��|�|���	0�$��?r,rmc��t|j�}t|j|jd||j|��S)Nr?)r�r"rm)rirBryr�r")r=rmr�s   r*�_make_index_contentr�CsE��*�(�*:�*:�;�H���������(���L�L�-��r,c��|jjdd�d}t|�}|rtj	d||�yt
jj|�\}}}}}}|dk(r�tjjt
jj|��rL|jd�s|dz
}t
jj|d�}tjd|�	t!||�	�}t#||j$�
�S#t&$rtj	d|�Yyt($r6}tj	d||j*|j,�Yd}~yd}~wt.$r}t1||�Yd}~yd}~wt2$r}t1||�Yd}~yd}~wt4$r6}d
}	|	t7|�z
}	t1||	tj8��Yd}~yd}~wt:j<$r}t1|d|���Yd}~yd}~wt:j>$rt1|d�YywxYw)N�#rrzICannot look at %s URL %s because it does not support lookup as web pages.r��/z
index.htmlz# file: URL is directory, getting %sr[)rmz`Skipping page %s because it looks like an archive, and cannot be checked by a HTTP HEAD request.z�Skipping page %s because the %s request got Content-Type: %s. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/htmlz4There was a problem confirming the ssl certificate: )r�zconnection error: z	timed out) r"�splitr+r^�warningrPrQ�urlparse�osrU�isdirrD�url2pathname�endswith�urljoinr_rar�rmrIr.r0r/rr�rrr:�infor�ConnectionError�Timeout)
r�rKr"�
vcs_schemer)�_rUrX�excr�s
          r*�_get_index_contentr�Ps��
�(�(�.�.��a�
 ��
#�C�#�3�'�J�����W���	
�
� &�|�|�4�4�S�9��F�A�t�Q��1�
���B�G�G�M�M�&�.�.�*E�*E�d�*K�L��|�|�C� ��3�J�C�
�l�l�"�"�3��5�����:�C�@�U�#�C��9��:#�4�D�<S�<S�T�T��9�
����
1��	
�8�/�
����
A�
�������
	
�	
�,��"�+���c�*�*����+���c�*�*����@�G���#�c�(�����f�6�;�;�?�?���
�#�#�B���(:�3�%�&@�A�A�
��	���3���k�2��	3�sT�9
D�H=�>H=�,E7�7H=�F�H=� F1�1H=�=,G.�.H=�H�"H=�<H=c�:�eZdZUeeeed<eeeed<y)�CollectedSources�
find_links�
index_urlsN)r7r8r9r
rr�__annotations__rJr,r*r�r��s"����*�-�.�.���*�-�.�.r,r�c
��eZdZdZdededdfd�Ze	ddedede	ddfd	��Z
edee
fd
��Zdedeefd�Zd
e
dedefd�Zy)�
LinkCollectorz�
    Responsible for collecting Link objects from all configured locations,
    making network requests as needed.

    The class's main method is its collect_sources() method.
    rK�search_scoper#Nc� �||_||_yr2)r�rK)r5rKr�s   r*r4zLinkCollector.__init__�s��
)�����r,�options�suppress_no_indexc�0�|jg|jz}|jr0|s.tj	ddjd�|D���g}|jxsg}tj|||j��}t||��}|S)z�
        :param session: The Session to use to make requests.
        :param suppress_no_index: Whether to ignore the --no-index option
            when constructing the SearchScope object.
        zIgnoring indexes: %s�,c3�2K�|]}t|����y�wr2r)�.0r"s  r*�	<genexpr>z'LinkCollector.create.<locals>.<genexpr>�s����I�j�s�-�c�2�j�s�)r�r��no_index)rKr�)
�	index_url�extra_index_urlsr�r^r_r`r�r�creater�)�clsrKr�r�r�r�r��link_collectors        r*r�zLinkCollector.create�s����'�'�(�7�+C�+C�C�
����$5��L�L�&����I�j�I�I�
��J��'�'�-�2�
�"�)�)�!�!��%�%�
��
'��%�
���r,c�.�|jjSr2)r�r�rws r*r�zLinkCollector.find_links�s��� � �+�+�+r,�locationc�0�t||j��S)z>
        Fetch an HTML page containing package links.
        r[)r�rK)r5r�s  r*�fetch_responsezLinkCollector.fetch_response�s��"�(�D�L�L�A�Ar,�project_name�candidates_from_pagec�|���tj��fd��jj|�D��j	�}tj��fd��j
D��j	�}tjtj�rwtj||�D�cgc]}|�|j�d|j����!}}t|��d|�d�g|z}tjdj|��t!t#|�t#|���Scc}w)Nc3�f�K�|](}t|��jjdd�����*y�w)F�r��page_validator�
expand_dirrmN�r rK�is_secure_origin�r��locr�r5s  ��r*r�z0LinkCollector.collect_sources.<locals>.<genexpr>�sB�����	4
�P��
��%9�#�|�|�<�<� �#(�
�
�P���.1c3�f�K�|](}t|��jjdd�����*y�w)Tr�Nr�r�s  ��r*r�z0LinkCollector.collect_sources.<locals>.<genexpr>�s@�����	5
�'��
��%9�#�|�|�<�<��#'�
�
�'�r�z* z' location(s) to search for versions of �:�
)r�r�)�collections�OrderedDictr��get_index_urls_locations�valuesr�r^�isEnabledFor�logging�DEBUG�	itertools�chainr�r(r_r`r�r�)r5r�r��index_url_sources�find_links_sources�s�liness` `    r*�collect_sourceszLinkCollector.collect_sources�s5���(�3�3�	4
��(�(�A�A�,�O�	4
�	
��&�(�	�)�4�4�	5
����	5
�	
��&�(�	����w�}�}�-�#���);�=N�O��O�A��=�Q�V�V�%7��Q�V�V�H�
�O�
���u�:�,�#�#/�.��3����E�
�L�L����5�)�*���.�/��-�.�
�	
��s�;$D9)F)r7r8r9r�rrr4�classmethodrr{r��propertyr	r:r�rrryr�rr�rrJr,r*r�r��s�������"��
�	��
#(�	����� �	�

����B�,�D��I�,��,�B�t�B���0F�B�*
��*
�1�*
�
�	*
r,r�r2r�)Rr�r��
email.messagerdr�rr�r�r��urllib.parserP�urllib.request�html.parserr�optparser�typingrrrrr	r
rrr
rr�pip._vendorr�pip._vendor.requestsr�pip._vendor.requests.exceptionsrr�pip._internal.exceptionsr�pip._internal.models.linkr�!pip._internal.models.search_scoper�pip._internal.network.sessionr�pip._internal.network.utilsr�pip._internal.utils.filetypesr�pip._internal.utils.miscr�pip._internal.vcsr�sourcesrrr r!rz�	getLoggerr7r^r:�ResponseHeadersr+�	Exceptionr.rGrIrYrarirkr~r�r�ryr�r�r{r�r�r�r�rJr,r*�<module>rs+���������	���"������!�)�@�;�*�9�4�8�9�9�!�A�A����H�	��	�	�8�	$�� ��c��*���3��8�C�=��)�Y�)�@��@�d�@�,	�y�	��c��J��4��$<�c�<�J�<�8�<�~���H�S�M��	#�	#����
�*����(��n���$�����8.�.�8�Z��>+/�@�
�@��#�y�.�!�@��8�I�&�
'�@�
�	@�48�
��
�,0�
��
�:�T�:�z�:�h�~�>V�:�z/�z�/�
g
�g
r,python3.12/site-packages/pip/_internal/index/__pycache__/sources.cpython-312.pyc000064400000023254151732701450023374 0ustar00�

R`i����ddlZddlZddlZddlZddlmZmZmZmZddl	m
Z
ddlmZddl
mZmZddlmZej$e�Zee
ZeeZeegee
fZeegefZGd�d�Zd	ed
efd�ZGd�d
e�ZGd�de�ZGd�de�ZGd�de�Z dededededed
eeeeeffd�Z!y)�N)�Callable�Iterable�Optional�Tuple)�InstallationCandidate)�Link)�path_to_url�url_to_path)�is_urlc�@�eZdZedeefd��Zdefd�Zde	fd�Z
y)�
LinkSource�returnc��t��)z,Returns the underlying link, if there's one.��NotImplementedError��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/index/sources.py�linkzLinkSource.links
��"�#�#�c��t��)z9Candidates found by parsing an archive listing HTML file.rrs r�page_candidateszLinkSource.page_candidates���!�#�#rc��t��)z,Links found by specifying archives directly.rrs r�
file_linkszLinkSource.file_linksrrN)�__name__�
__module__�__qualname__�propertyrrr�FoundCandidatesr�
FoundLinksr�rrr
r
s7��
�$�h�t�n�$��$�$��$�$�J�$rr
�file_urlrc�<�tj|d��ddk(S)NF)�strictrz	text/html)�	mimetypes�
guess_type)r#s r�
_is_html_filer(#s�������7��:�k�I�Irc�X�eZdZdZdededdfd�Zedee	fd��Z
defd�Zde
fd	�Zy)
�_FlatDirectorySourcez�Link source specified by ``--find-links=<path-to-dir>``.

    This looks the content of the directory, and returns:

    * ``page_candidates``: Links listed on each HTML file in the directory.
    * ``file_candidates``: Archives in the directory.
    �candidates_from_page�pathrNc��||_tjtjj|��|_y�N)�_candidates_from_page�pathlib�Path�osr,�realpath�_path)rr+r,s   r�__init__z_FlatDirectorySource.__init__0s+��
&:��"��\�\�"�'�'�"2�"2�4�"8�9��
rc��yr.r"rs rrz_FlatDirectorySource.link8s��rc#��K�|jj�D]D}tt|��}t	|�s�#|jt
|��Ed{����Fy7��wr.)r4�iterdirr	�strr(r/r�rr,�urls   rrz$_FlatDirectorySource.page_candidates<sS�����J�J�&�&�(�D��c�$�i�(�C� ��%���1�1�$�s�)�<�<�<�	)�
=�s�AA'�A%�A'c#�K�|jj�D]/}tt|��}t	|�r�#t|����1y�wr.)r4r8r	r9r(rr:s   rrz_FlatDirectorySource.file_linksCs?�����J�J�&�&�(�D��c�$�i�(�C��S�!���s�)�O�	)�s�AA)rrr�__doc__�CandidatesFromPager9r5rrrrr rr!rr"rrr*r*'s_���:�0�:��:�
�	:���h�t�n����=��=��J�rr*c�X�eZdZdZdededdfd�Zedeefd��Z	de
fd�Zdefd	�Z
y)
�_LocalFileSourceaC``--find-links=<path-or-url>`` or ``--[extra-]index-url=<path-or-url>``.

    If a URL is supplied, it must be a ``file:`` URL. If a path is supplied to
    the option, it is converted to a URL first. This returns:

    * ``page_candidates``: Links listed on an HTML file.
    * ``file_candidates``: The non-HTML file.
    r+rrNc� �||_||_yr.�r/�_link�rr+rs   rr5z_LocalFileSource.__init__U���
&:��"���
rc��|jSr.�rCrs rrz_LocalFileSource.link]����z�z�rc#�K�t|jj�sy|j|j�Ed{���y7��wr.)r(rCr;r/rs rrz _LocalFileSource.page_candidatesas1�����T�Z�Z�^�^�,���-�-�d�j�j�9�9�9�s�?A	�A�A	c#�hK�t|jj�ry|j��y�wr.)r(rCr;rs rrz_LocalFileSource.file_linksfs#����������(���j�j��s�02�rrrr=r>rr5rrrr rr!rr"rrr@r@Ks_����0����
�	���h�t�n����:��:�
�J�rr@c�\�eZdZdZdedededdfd�Zede	efd��Z
defd	�Zde
fd
�Zy)�_RemoteFileSourcez�``--find-links=<url>`` or ``--[extra-]index-url=<url>``.

    This returns:

    * ``page_candidates``: Links listed on an HTML file.
    * ``file_candidates``: The non-HTML file.
    r+�page_validatorrrNc�.�||_||_||_yr.)r/�_page_validatorrC)rr+rNrs    rr5z_RemoteFileSource.__init__us��&:��"�-�����
rc��|jSr.rGrs rrz_RemoteFileSource.linkrHrc#�K�|j|j�sy|j|j�Ed{���y7��wr.)rPrCr/rs rrz!_RemoteFileSource.page_candidates�s3�����#�#�D�J�J�/���-�-�d�j�j�9�9�9�s�;A�A�Ac#�(K�|j��y�wr.rGrs rrz_RemoteFileSource.file_links�s�����j�j��s�)rrrr=r>�
PageValidatorrr5rrrr rr!rr"rrrMrMlsi����0��&���	�

����h�t�n����:��:�
�J�rrMc�X�eZdZdZdededdfd�Zedeefd��Z	de
fd�Zdefd	�Z
y)
�_IndexDirectorySourcez�``--[extra-]index-url=<path-to-directory>``.

    This is treated like a remote URL; ``candidates_from_page`` contains logic
    for this by appending ``index.html`` to the link.
    r+rrNc� �||_||_yr.rBrDs   rr5z_IndexDirectorySource.__init__�rErc��|jSr.rGrs rrz_IndexDirectorySource.link�rHrc#�VK�|j|j�Ed{���y7��wr.rBrs rrz%_IndexDirectorySource.page_candidates�s�����-�-�d�j�j�9�9�9�s�)�'�)c��y)Nr"r"rs rrz _IndexDirectorySource.file_links�s��rrKr"rrrVrV�s_����0����
�	���h�t�n����:��:��J�rrV�locationr+rN�
expand_dir�cache_link_parsingc�v�d}d}tjj|�rt|�}|}n,|j	d�r|}t|�}n
t
|�r|}|�d}tj||�y|�t||t||����}||fStjj|�r/|rt||��}||fSt|t||����}||fStjj|�rt|t||����}||fStjd|�|dfS)	Nzfile:zVLocation '%s' is ignored: it is either a non-existing path or lacks a specific scheme.)NN)r])r+rNr)r+r,)r+rz?Location '%s' is ignored: it is neither a file nor a directory.)r2r,�existsr	�
startswithr
r�logger�warningrMr�isdirr*rV�isfiler@)	r[r+rNr\r]r,r;�msg�sources	         r�build_sourcerg�sM���D��C�	�w�w�~�~�h���(�#����	�	�	�W�	%����8�$��	��	���
�{�
K�	�	���s�H�%���|�.�!5�)��c�.@�A�
��
�V�}��	�w�w�}�}�T���)�%9���F��V�}��	+�%9��#�2D�E��F��V�}��	������	�!�!5��c�.@�A�
���V�}��
�N�N�I���
��;�r)"�loggingr&r2r0�typingrrrr�pip._internal.models.candidater�pip._internal.models.linkr�pip._internal.utils.urlsr	r
�pip._internal.vcsr�	getLoggerrrar r!r>�boolrTr
r9r(r*r@rMrVrgr"rr�<module>rps����	��6�6�@�*�=�$�	��	�	�8�	$���0�1��
�d�^�
��t�f�h�/D�&E�E�F���$����&�
�$�$�J�C�J�D�J�!�:�!�H�z��B�
��@�J��49��9�-�9�"�	9�
�9��
9��8�C�=�(�:�.�.�/�9rpython3.12/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-312.pyc000064400000117563151732701450024642 0ustar00�

R`i��	���dZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
mZddlmZddlmZddlmZddlmZddlmZdd	lmZmZmZmZdd
lmZm Z ddl!m"Z"ddl#m$Z$dd
l%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:ddl;m<Z<ddl=m>Z>erddl?m@Z@gd�ZAe2eB�ZCee
de
eDeEffZFe
eDeDeDeeeDeFfZG	d6de&de
eDeDeDfdeHd eHfd!�ZIGd"�d#ej��ZKGd$�d%�ZLd&e
e"d'ee6d(eEd e
e"fd)�ZMGd*�d+�ZNGd,�d-�ZOGd.�d/�ZPGd0�d1�ZQd2eEd3eEd eDfd4�ZRd2eEd3eEd eeEfd5�ZSy)7z!Routines related to PyPI, indexes�N)�
TYPE_CHECKING�	FrozenSet�Iterable�List�Optional�Set�Tuple�Union)�
specifiers)�Tag)�canonicalize_name)�_BaseVersion)�parse)�BestVersionAlreadyInstalled�DistributionNotFound�InvalidWheelFilename�UnsupportedWheel)�
LinkCollector�parse_links)�InstallationCandidate)�
FormatControl)�Link)�SearchScope)�SelectionPreferences)�TargetPython)�Wheel)�InstallRequirement)�	getLogger)�WHEEL_EXTENSION)�Hashes)�
indent_log)�build_netloc)�check_requires_python)�SUPPORTED_EXTENSIONS)�	TypeGuard)r�BestCandidateResult�
PackageFinder��link�version_info�ignore_requires_python�returnc�x�	t|j|��}|sfdjtt|��}|s#t
j
d||j|�yt
jd||j|�y#tj$r$t
jd|j|�YywxYw)aa
    Return whether the given Python version is compatible with a link's
    "Requires-Python" value.

    :param version_info: A 3-tuple of ints representing the Python
        major-minor-micro version to check.
    :param ignore_requires_python: Whether to ignore the "Requires-Python"
        value if the given Python version isn't compatible.
    )r*�.z4Link requires a different Python (%s not in: %r): %sFzBIgnoring failed Requires-Python check (%s not in: %r) for link: %sz2Ignoring invalid Requires-Python (%r) for link: %sT)
r#�requires_python�join�map�str�logger�verbose�debugr�InvalidSpecifier)r)r*r+�
is_compatible�versions     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/index/package_finder.py�_check_link_requires_pythonr:3s����-�� � �%�
�
���h�h�s�3��5�6�G�)����J���(�(��	���L�L�T���$�$��	
���3�&�&�
����@�� � ��	
�0�3
�s�B�4B9�8B9c��eZdZej�Zej�Zej�Zej�Zej�Z	ej�Z
ej�Zy)�LinkTypeN)�__name__�
__module__�__qualname__�enum�auto�	candidate�different_project�yanked�format_unsupported�format_invalid�platform_mismatch�requires_python_mismatchr(�r9r<r<bsa����	�	��I�!��	�	���
�T�Y�Y�[�F�"�������T�Y�Y�[�N�!��	�	���(�t�y�y�{�rIr<c��eZdZdZej
d�Z	ddededeede	de
d	ee
d
dfd�Zde
d
eeeffd
�Zy)�
LinkEvaluatorzD
    Responsible for evaluating links for a particular project.
    z-py([123]\.?[0-9]?)$N�project_name�canonical_name�formats�
target_python�allow_yankedr+r,c�`�|�d}||_||_||_||_||_||_y)a�
        :param project_name: The user supplied package name.
        :param canonical_name: The canonical package name.
        :param formats: The formats allowed for this package. Should be a set
            with 'binary' or 'source' or both in it.
        :param target_python: The target Python interpreter to use when
            evaluating link compatibility. This is used, for example, to
            check wheel compatibility, as well as when checking the Python
            version, e.g. the Python version embedded in a link filename
            (or egg fragment) and against an HTML link's optional PEP 503
            "data-requires-python" attribute.
        :param allow_yanked: Whether files marked as yanked (in the sense
            of PEP 592) are permitted to be candidates for install.
        :param ignore_requires_python: Whether to ignore incompatible
            PEP 503 "data-requires-python" values in HTML links. Defaults
            to False.
        NF)�
_allow_yanked�_canonical_name�_ignore_requires_python�_formats�_target_pythonrL)�selfrLrMrNrOrPr+s       r9�__init__zLinkEvaluator.__init__xs?��4"�)�%*�"�)���-���'=��$���
�+���(��rIr)c��d}|jr1|js%|jxsd}tjd|��fS|j
r|j
}|j}�nr|j�\}}|stjdfS|tvrtjd|��fSd|jvr*|tk(r!d|j��}tj|fSd|jvr|d	k(rtjd
fS|tk(r�	t|j�}t%|j&�|j(k7r"d|j�d
�}tj*|fS|j,j/�}|j1|�s7dj3|j5��}d|�d�}tj6|fS|j8}d|jvr*|tk7r!d|j��}tj|fS|st;||j(�}|s!d|j��}tj"|fS|j<j?|�}	|	rO|d|	jA�}|	jCd�}
|
|j,jDk7rtj6dfStG||j,jH|jJ��}|s#|�d|jL��}tjN|fStPjSd||�tjT|fS#t $rtj"dfcYSwxYw)a�
        Determine whether a link is a candidate for installation.

        :return: A tuple (result, detail), where *result* is an enum
            representing whether the evaluation found a candidate, or the reason
            why one is not found. If a candidate is found, *detail* will be the
            candidate's version string; if one is not found, it contains the
            reason the link fails to qualify.
        Nz<none given>zyanked for reason: z
not a filezunsupported archive format: �binaryzNo binaries permitted for �macosx10z.zipzmacosx10 onezinvalid wheel filenamezwrong project name (not �)�, znone of the wheel's tags (zB) are compatible (run pip debug --verbose to show compatible tags)�sourcezNo sources permitted for zMissing project version for �zPython version is incorrect)r*r+z Requires-Python zFound link %s, version: %s)+�	is_yankedrR�
yanked_reasonr<rD�egg_fragment�ext�splitextrEr$rUrrL�pathr�filenamerrFr
�namerSrCrV�get_unsorted_tags�	supportedr0�get_formatted_file_tagsrGr8�_extract_version_from_fragment�_py_version_re�search�start�group�
py_versionr:�py_version_inforTr/rHr3r5rB)rWr)r8�reason�egg_inforc�wheel�supported_tags�	file_tags�matchrp�supports_pythons            r9�
evaluate_linkzLinkEvaluator.evaluate_link�sE�����>�>�$�"4�"4��'�'�9�>�F��O�O�':�6�(�%C�D�D�����(�(�H��(�(�C� �M�M�O�M�H�c�� �3�3�\�B�B��.�.��/�/�2�3�%�8����t�}�}�,���1G�5�d�6G�6G�5H�I�� �3�3�V�<�<��T�Y�Y�&�3�&�=� �3�3�^�D�D��o�%��!�$�-�-�0�E�%�U�Z�Z�0�D�4H�4H�H�7��8I�8I�7J�!�L�F�$�6�6��?�?�!%�!4�!4�!F�!F�!H�����~�6�!%�	�	�%�*G�*G�*I� J�I�4�Y�K�@L�M��%�6�6��?�?��-�-���4�=�=�(�S�O�-C�0��1B�1B�0C�D�F��/�/��8�8��4���$�$��G��3�D�4E�4E�3F�G�F��+�+�V�4�4��#�#�*�*�7�3����o����
�.�G����Q��J��T�0�0�;�;�;��.�.�1���
6���,�,�<�<�#'�#?�#?�
��
��y� 1�$�2F�2F�1G�H�F��5�5�v�>�>����1�4��A��"�"�G�,�,��s,�� �/�/�0����s�L1�1M�M�N)r=r>r?�__doc__�re�compilerlr2rr�boolrrXrr	r<ryr(rIr9rKrKls���� �R�Z�Z� 7�8�N�26�#)��#)��#)��3��	#)�
$�#)��
#)�!)���#)�
�#)�J\-�$�\-�5��3��+?�\-rIrK�
candidates�hashesrLc
�L�|s+tjdt|�|�t|�Sg}g}d}|D]V}|j}|j
sn*|j
|��r|dz
}n|j|��F|j|��X|r|}nt|�}t|�t|�k(rd}	n1djt|�djd�|D���}	tjd	t|�||j|t|�|z
|	�|S)
a�
    Filter out candidates whose hashes aren't allowed, and return a new
    list of candidates.

    If at least one candidate has an allowed hash, then all candidates with
    either an allowed hash or no hash specified are returned.  Otherwise,
    the given candidates are returned.

    Including the candidates with no hash specified when there is a match
    allows a warning to be logged if there is a more preferred candidate
    with no hash specified.  Returning all candidates in the case of no
    matches lets pip report the hash of the candidate that would otherwise
    have been installed (e.g. permitting the user to more easily update
    their requirements file with the desired hash).
    zJGiven no hashes to check %s links for project %r: discarding no candidatesr)r�r_zdiscarding no candidateszdiscarding {} non-matches:
  {}z
  c3�FK�|]}t|j����y�wrz)r2r))�.0rBs  r9�	<genexpr>z*filter_unallowed_hashes.<locals>.<genexpr>5s����I�[�	��I�N�N�+�[���!zPChecked %s links for project %r against %s hashes (%s matches, %s no digest): %s)r3r5�len�listr)�has_hash�is_hash_allowed�append�formatr0�digest_count)
rr�rL�matches_or_no_digest�non_matches�match_countrBr)�filtered�discard_messages
          r9�filter_unallowed_hashesr��s,��(����
'��
�O��		
��J������K��K��	��~�~���}�}��
�
!�
!��
!�
0��1��K����y�)���#�#�I�.� ��'���
�#��
�8�}��J��'�4��<�C�C�����K�K�I�[�I�I�
��
�L�L�	)��J�������� �!�K�/��	��OrIc�*�eZdZdZ		ddededdfd�Zy)�CandidatePreferenceszk
    Encapsulates some of the preferences for filtering and sorting
    InstallationCandidate objects.
    �
prefer_binary�allow_all_prereleasesr,Nc� �||_||_y)zR
        :param allow_all_prereleases: Whether to allow all pre-releases.
        N)r�r�)rWr�r�s   r9rXzCandidatePreferences.__init__Ms��&;��"�*��rI)FF)r=r>r?r{r~rXr(rIr9r�r�Fs0���$�&+�	+��	+� $�	+�
�		+rIr�c�^�eZdZdZdeedeedeeddfd�Zdeefd�Z	deefd	�Z
y)
r&z�A collection of candidates, returned by `PackageFinder.find_best_candidate`.

    This class is only intended to be instantiated by CandidateEvaluator's
    `compute_best_candidate()` method.
    r�applicable_candidates�best_candidater,Nc�x�t|�t|�ksJ�|�|rJ�||vsJ�||_||_||_y)a
        :param candidates: A sequence of all available candidates found.
        :param applicable_candidates: The applicable candidates.
        :param best_candidate: The most preferred candidate found, or None
            if no applicable candidates were found.
        N)�set�_applicable_candidates�_candidatesr��rWrr�r�s    r9rXzBestCandidateResult.__init__`sR���(�)�S��_�<�<�<��!�,�,�,�!�%:�:�:�:�&;��#�%���,��rIc�,�t|j�S)zIterate through all candidates.)�iterr��rWs r9�iter_allzBestCandidateResult.iter_allxs���D�$�$�%�%rIc�,�t|j�S)z*Iterate through the applicable candidates.)r�r�r�s r9�iter_applicablez#BestCandidateResult.iter_applicable|s���D�/�/�0�0rI)r=r>r?r{rrrrXrr�r�r(rIr9r&r&Ysh���-��.�/�-� $�$9�:�-�!�!6�7�	-�

�-�0&�(�#8�9�&�1��*?�!@�1rIr&c��eZdZdZe					ddedeedededee	jdeed	dfd
��Z			ddede
ede	jdededeed	dfd�Zd
e
ed	e
efd�Zded	efd�Zd
e
ed	eefd�Zd
e
ed	efd�Zy)�CandidateEvaluatorzm
    Responsible for filtering and sorting candidates for installation based
    on what tags are valid.
    NrLrOr�r��	specifierr�r,c��|�
t�}|�tj�}|j�}|||||||��S)a�Create a CandidateEvaluator object.

        :param target_python: The target Python interpreter to use when
            checking compatibility. If None (the default), a TargetPython
            object will be constructed from the running Python.
        :param specifier: An optional object implementing `filter`
            (e.g. `packaging.specifiers.SpecifierSet`) to filter applicable
            versions.
        :param hashes: An optional collection of allowed hashes.
        )rLrur�r�r�r�)rr�SpecifierSet�get_sorted_tags)�clsrLrOr�r�r�r�rus        r9�createzCandidateEvaluator.create�sR��(� �(�N�M���"�/�/�1�I�&�6�6�8���%�)��'�"7��

�	
rIruc��||_||_||_||_||_||_t
|�D��cic]\}}||��
c}}|_ycc}}w)z�
        :param supported_tags: The PEP 425 tags supported by the target
            Python in order of preference (most preferred first).
        N)�_allow_all_prereleases�_hashes�_prefer_binary�
_project_name�
_specifier�_supported_tags�	enumerate�_wheel_tag_preferences)	rWrLrur�r�r�r��idx�tags	         r9rXzCandidateEvaluator.__init__�sc��'<��#����+���)���#���-���
&/�~�%>�'
�%>���c�C��H�%>�'
��#��'
s�
Arc�n�|jxsd}|j}|jd�|D�|��D�chc]
}t|���}}|D�cgc]}t|j�|vs�|��}}t||j|j��}t||j��Scc}wcc}w)zM
        Return the applicable candidates from a list of candidates.
        Nc3�FK�|]}t|j����y�wrz)r2r8)r��cs  r9r�z?CandidateEvaluator.get_applicable_candidates.<locals>.<genexpr>�s����4��A��Q�Y�Y���r�)�prereleases)rr�rL��key)
r�r��filterr2r8r�r�r��sorted�	_sort_key)	rWr�allow_prereleasesr��v�versionsr�r��filtered_applicable_candidatess	         r9�get_applicable_candidatesz,CandidateEvaluator.get_applicable_candidates�s���!�7�7�?�4���O�O�	��%�%�5��4�-�&�
�

�
��
��F�
�	�

� -7� U�J�q�#�a�i�i�.�H�:T��J�� U�)@�,��<�<��+�+�*
�&��4�$�.�.�I�I��1

�� !Vs�B-�B2�.B2rBc��|j}t|�}d}d}|j}|jr�t	|j
�}	|j
||j�}|jrd}|j�Ptjd|j�}	|	�Jd��|	j�}
t!|
d�|
df}n|}t!|j#|j$��}dt!|j&�z}||||j(||fS#t$r%tdj|j
���wxYw)a)
        Function to pass as the `key` argument to a call to sorted() to sort
        InstallationCandidates by preference.

        Returns a tuple such that tuples sorting as greater using Python's
        default comparison operator are more preferred.

        The preference is as follows:

        First and foremost, candidates with allowed (matching) hashes are
        always preferred over candidates without matching hashes. This is
        because e.g. if the only candidate with an allowed hash is yanked,
        we still want to use that candidate.

        Second, excepting hash considerations, candidates that have been
        yanked (in the sense of PEP 592) are always less preferred than
        candidates that haven't been yanked. Then:

        If not finding wheels, they are sorted by version only.
        If finding wheels, then the sort order is by version, then:
          1. existing installs
          2. wheels ordered via Wheel.support_index_min(self._supported_tags)
          3. source archives
        If prefer_binary was set, then all wheels are sorted above sources.

        Note: it was considered to embed this logic into the Link
              comparison operators, but then different sdist links
              with the same version, would have to be considered equal
        r(rzB{} is not a supported wheel for this platform. It can't be sorted.r_z^(\d+)(.*)$z!guaranteed by filename validation���)r�r�r)�is_wheelrrf�find_most_preferred_tagr��
ValueErrorrr�r��	build_tagr|rw�groups�intr�r�r`r8)
rWrB�
valid_tags�support_numr��binary_preferencer)rt�prirw�build_tag_groups�has_allowed_hash�
yank_values
             r9r�zCandidateEvaluator._sort_key�sU��<�)�)�
��*�o�� �	����~�~���=�=��$�-�-�(�E�

��1�1�"�D�$?�$?�����"�"�$%�!����*��������A���(�M�*M�M�(�#(�<�<�>� � �!1�!�!4�5�7G��7J�K�	��.�C��t�3�3�D�L�L�A�B���#�d�n�n�-�-�
���������

�	
��!�
�&�'�'-�v�e�n�n�'=���
�s�
D�.E
c�:�|syt||j��}|S)zy
        Return the best candidate per the instance's sort order, or None if
        no candidate is acceptable.
        Nr�)�maxr�)rWrr�s   r9�sort_best_candidatez&CandidateEvaluator.sort_best_candidate/s �����Z�T�^�^�<���rIc�b�|j|�}|j|�}t|||��S)zF
        Compute and return a `BestCandidateResult` instance.
        )r�r�)r�r�r&r�s    r9�compute_best_candidatez)CandidateEvaluator.compute_best_candidate<s<��!%� >� >�z� J���1�1�2G�H��"��"7�)�
�	
rI)NFFNN)FFN)r=r>r?r{�classmethodr2rrr~r�
BaseSpecifierr r�rrrXrr��CandidateSortingKeyr�r�r&r�r(rIr9r�r��si���
�15�#�&+�8<�#'�!
��!
� ��-�!
��	!
�
 $�!
��J�4�4�5�
!
��� �!
�
�!
��!
�P$�&+�#'�
��
��S�	�
��+�+�	
�
�
� $�

��� �
�
�
�4"J��.�/�"J�
�#�	$�"J�HC
�#8�C
�=P�C
�J��.�/��
�'�	(��
��.�/�
�
�
rIr�c��eZdZdZ			d/dedededeedee	deed	dfd
�Z
e	d0dededeed	dfd��Z
ed	efd
��Zed	efd��Zej$ded	dfd��Zed	eefd��Zed	eefd��Zed	eefd��Zed	efd��Zd1d�Zed	efd��Zd1d�Zd	eefd�Zded	efd�Zdee d	ee fd�Z!de de"ded	dfd �Z#d!ede d	ee$fd"�Z%d!edee d	ee$fd#�Z&d$e d!ed	ee$fd%�Z'e(jRd�&�ded	ee$fd'��Z*		d2ded(ee+jXd)ee-d	e.fd*�Z/e(jRd�&�		d2ded(ee+jXd)ee-d	e0fd+��Z1d,e2d-ed	ee$fd.�Z3y)3r'z�This finds packages.

    This is meant to match easy_install's technique for looking for
    packages, by reading pages and looking for appropriate links.
    N�link_collectorrOrP�format_control�candidate_prefsr+r,c���|�
t�}|xstt�t��}||_||_||_||_||_||_t�|_	y)a�
        This constructor is primarily meant to be used by the create() class
        method and from tests.

        :param format_control: A FormatControl object, used to control
            the selection of source packages / binary packages when consulting
            the index and links.
        :param candidate_prefs: Options to use when creating a
            CandidateEvaluator object.
        N)
r�rr�rR�_candidate_prefsrT�_link_collectorrVr��
_logged_links)rWr�rOrPr�r�r+s       r9rXzPackageFinder.__init__Usd��&�"�2�4�O�'�F�=�����+F��)��� /���'=��$�-���+���,���?B�e��rI�selection_prefsc��|�
t�}t|j|j��}|||||j|j
|j��S)afCreate a PackageFinder.

        :param selection_prefs: The candidate selection preferences, as a
            SelectionPreferences object.
        :param target_python: The target Python interpreter to use when
            checking compatibility. If None (the default), a TargetPython
            object will be constructed from the running Python.
        )r�r�)r�r�rOrPr�r+)rr�r�r�rPr�r+)r�r�r�rOr�s     r9r�zPackageFinder.create|s`��� �(�N�M�.�)�7�7�"1�"G�"G�
��
�+�)�'�(�5�5�*�9�9�#2�#I�#I�

�	
rIc��|jSrz)rVr�s r9rOzPackageFinder.target_python�s���"�"�"rIc�.�|jjSrz�r��search_scoper�s r9r�zPackageFinder.search_scope�s���#�#�0�0�0rIr�c�&�||j_yrzr�)rWr�s  r9r�zPackageFinder.search_scope�s��,8����)rIc�.�|jjSrz)r��
find_linksr�s r9r�zPackageFinder.find_links�s���#�#�.�.�.rIc�.�|jjSrz)r��
index_urlsr�s r9r�zPackageFinder.index_urls�s��� � �+�+�+rIc#�jK�|jjjD]}t|����y�wrz)r��session�pip_trusted_originsr")rW�	host_ports  r9�
trusted_hostszPackageFinder.trusted_hosts�s.�����-�-�5�5�I�I�I��	�*�*�J�s�13c�.�|jjSrz�r�r�r�s r9r�z#PackageFinder.allow_all_prereleases�s���$�$�:�:�:rIc�&�d|j_y�NTr�r�s r9�set_allow_all_prereleasesz'PackageFinder.set_allow_all_prereleases�s��6:����3rIc�.�|jjSrz�r�r�r�s r9r�zPackageFinder.prefer_binary�s���$�$�2�2�2rIc�&�d|j_yr�r�r�s r9�set_prefer_binaryzPackageFinder.set_prefer_binary�s��.2����+rIc��|jD���chc]\}}}|tjk(r|��}}}}t|�Scc}}}wrz)r�r<rHr�)rW�_�result�detail�reasonss     r9�requires_python_skipped_reasonsz-PackageFinder.requires_python_skipped_reasons�sP��&*�%7�%7�
�%7�!��6�6���:�:�:�
�%7�	�
�
�g����
s� ArLc��t|�}|jj|�}t||||j|j
|j��S)N)rLrMrNrOrPr+)r
r��get_allowed_formatsrKrVrRrT)rWrLrMrNs    r9�make_link_evaluatorz!PackageFinder.make_link_evaluator�sS��*�<�8���%�%�9�9�.�I���%�)���-�-��+�+�#'�#?�#?�

�	
rI�linksc��gg}}t�}|D]G}||vs�|j|�|jr|j|��7|j|��I||zS)z�
        Returns elements of links in order, non-egg links first, egg links
        second, while eliminating duplicates
        )r��addrbr�)rWr�eggs�no_eggs�seenr)s      r9�_sort_linkszPackageFinder._sort_links�s^��
�B�g���%���D��4��������$�$��K�K��%��N�N�4�(�
���~�rIr)rrc��|||f}||jvr3tjd||�|jj|�yy)NzSkipping link: %s: %s)r�r3r5r
)rWr)rr�entrys     r9�_log_skipped_linkzPackageFinder._log_skipped_link�sH���v�v�&����*�*�*�
�L�L�0�&�$�?����"�"�5�)�	+rI�link_evaluatorc��|j|�\}}|tjk7r|j|||�yt	|j
||��S)z�
        If the link is a candidate for install, convert it to an
        InstallationCandidate and return it. Otherwise, return None.
        N)rgr)r8)ryr<rBrrrL)rWrr)rrs     r9�get_install_candidatez#PackageFinder.get_install_candidate�sW��(�5�5�d�;�����X�'�'�'��"�"�4���8��$��,�,���
�	
rIc��g}|j|�D](}|j||�}|��|j|��*|S)zU
        Convert links that are candidates to InstallationCandidate objects.
        )rrr�)rWrrrr)rBs      r9�evaluate_linkszPackageFinder.evaluate_linkssL���
��$�$�U�+�D��2�2�>�4�H�I��$��!�!�)�,�,�
�rI�project_urlc��tjd|�|jj|�}|�gSt	t|��}t
�5|j||��}ddd�|S#1swYSxYw)Nz-Fetching project page and analyzing links: %s)r)r3r5r��fetch_responser�rr!r)rWrr�index_response�
page_links�
package_linkss      r9�process_project_urlz!PackageFinder.process_project_urls���	���;��	
��-�-�<�<�[�I���!��I��+�n�5�6�
�
�\� �/�/�� �0��M����
���s�A2�2A<)�maxsizec��|j|�}|jj|tj|j
|����}tjjd�|D��}t|�}tjjd�|D��}|j|t|d���}tjtj�rn|rlg}|D]@}	|	j j"sJ�	|j%|	j j&��Btj+ddj-|��||zS#t($r(|j%|	j j"�Y��wxYw)	aFind all available InstallationCandidate for project_name

        This checks index_urls and find_links.
        All versions found are returned as an InstallationCandidate list.

        See LinkEvaluator.evaluate_link() for details on which files
        are accepted.
        )r)rL�candidates_from_pagec3�NK�|]}|D]}|�|j�����y�wrz)�page_candidates�r��sourcesr^s   r9r�z4PackageFinder.find_all_candidates.<locals>.<genexpr>9s4����;
�,��!���!�
�"�"�$�!�
%�,���#%c3�NK�|]}|D]}|�|j�����y�wrz)�
file_linksr#s   r9r�z4PackageFinder.find_all_candidates.<locals>.<genexpr>As4����6
�,��!���!�
����!�
 �,�r%T)�reversezLocal files found: %sr])rr��collect_sources�	functools�partialr�	itertools�chain�
from_iterabler�rr�r3�isEnabledFor�logging�DEBUGr)�urlr��	file_path�	Exceptionr5r0)
rWrLr�collected_sources�page_candidates_itr"�
file_links_it�file_candidates�pathsrBs
          r9�find_all_candidatesz!PackageFinder.find_all_candidates%s`���1�1�,�?�� �0�0�@�@�%�!*�!2�!2��(�(�-�"�A�
��'�_�_�:�:�;
�,�;
�
���1�2��!���5�5�6
�,�6
�
�
��-�-���=�$�/�
��
���w�}�}�-�/��E�,�	� �~�~�)�)�)�)�5��L�L����!9�!9�:�-�
�L�L�0�$�)�)�E�2B�C���0�0��
!�5��L�L����!3�!3�4�5�s�%E�.F	�F	r�r�c��|j}tj||j|j|j
||��S)z*Create a CandidateEvaluator object to use.)rLrOr�r�r�r�)r�r�r�rVr�r�)rWrLr�r�r�s     r9�make_candidate_evaluatorz&PackageFinder.make_candidate_evaluatorZsK���/�/��!�(�(�%��-�-�)�7�7�"1�"G�"G���
)�
�	
rIc�n�|j|�}|j|||��}|j|�S)aFind matches for the given project and specifier.

        :param specifier: An optional object implementing `filter`
            (e.g. `packaging.specifiers.SpecifierSet`) to filter applicable
            versions.

        :return: A `BestCandidateResult` instance.
        )rLr�r�)r:r<r�)rWrLr�r�r�candidate_evaluators      r9�find_best_candidatez!PackageFinder.find_best_candidateksF���-�-�l�;�
�"�;�;�%���<�
��
#�9�9�*�E�ErI�req�upgradec�0���|jd��}|j|j|j|��}|j�d�|j
�|j
j�dttdtfd�}��G��Etjd|||j���td	j|���d
ttddf��fd�}|sC��A|��r"tj!d
��j�ytj!d��y|��r7tj!d�j||j#����Stj!d�||j#���t$�)z�Try to find a Link matching req

        Expects req, an InstallRequirement and upgrade, a boolean
        Returns a InstallationCandidate if found,
        Raises DistributionNotFound or BestVersionAlreadyInstalled otherwise
        F)�trust_internet)r�r�N�	cand_iterr,c
��djt|D�chc]}t|j���c}t���xsdScc}w)Nr]r��none)r0r�r2r8�
parse_version)rDr�s  r9�_format_versionsz8PackageFinder.find_requirement.<locals>._format_versions�sI���	�	��1:�;��A��Q�Y�Y���;�)�����
��<s�AzNCould not find a version that satisfies the requirement %s (from versions: %s)z%No matching distribution found for {}rBz TypeGuard[InstallationCandidate]c�.����y��y�j�kDS)NTF)r8)rBr��installed_versions ��r9�_should_install_candidatezAPackageFinder.find_requirement.<locals>._should_install_candidate�s)���!�(���%��!�)�)�,=�=�=rIzUExisting installed version (%s) satisfies requirement (most up-to-date version is %s)zLExisting installed version (%s) is most up-to-date and satisfies requirementz)Using version %s (newest of versions: %s)z=Installed version (%s) is most up-to-date (past versions: %s))r�r?rgr�r��satisfied_byr8rrr2r3�criticalr�rr�rr5r�r)	rWr@rAr��best_candidate_resultrHrKr�rJs	       @@r9�find_requirementzPackageFinder.find_requirement�s�������5��1�� $� 8� 8��H�H��m�m��!9�!
��
/�=�=��48�����'� #� 0� 0� 8� 8��
	��1F�(G�
	�C�
	��$��)?��O�O�&�� �!6�!?�!?�!A�B�	
�'�7�>�>�s�C��
�	>�� 5�6�	>�
/�	>��,�8�(��8����6�%�"�*�*�	�����,�%��
�$�^�4��L�L�;��&�&� �!6�!F�!F�!H�I�
�
"�!�	���K���2�B�B�D�E�	
�
*�)rI)NNNrz)r,N)NN)4r=r>r?r{rrr~rrr�rXr�rr��propertyrOrr��setterrr2r�r�rr�r�r�r�r�rrKrrrr<rrrrrr*�	lru_cacher:rr�r r�r<r&r?rrOr(rIr9r'r'Ns����37�:>�15�!D�%�!D�$�!D��	!D�
!��/�!D�"�"6�7�
!D�!)���!D�
�!D�N�
15�	
�%�
�.�
� ��-�	
�

�
��
�>�#�|�#��#��1�k�1��1����9��9��9��9��/�D��I�/��/��,�D��I�,��,��+�x��}�+��+��;�t�;��;�;��3�t�3��3�3���c���
��
�
�
���$���D��J�� *�d�*�H�*�c�*�d�*�
�+�
�37�
�	�'�	(�
�$�+��4<�T�N��	
�#�	$�����1>��	
�#�	$��*�Y����&�21��21��=R�8S�21�'�21�n9=�#'�	
��
��J�4�4�5�
��� �	
�

�
�"�Y����&�9=�#'�	F��F��J�4�4�5�F��� �	F�

�F�'�F�,W*�%�W*�04�W*�	�'�	(�W*rIr'�fragmentrMc�~�t|�D] \}}|dk7r�t|d|�|k(s�|cSt|�d|����)a�Find the separator's index based on the package's canonical name.

    :param fragment: A <package>+<version> filename "fragment" (stem) or
        egg fragment.
    :param canonical_name: The package's canonical name.

    This function is needed since the canonicalized name does not necessarily
    have the same length as the egg info's name part. An example::

    >>> fragment = 'foo__bar-1.0'
    >>> canonical_name = 'foo-bar'
    >>> _find_name_version_sep(fragment, canonical_name)
    8
    �-Nz does not match )r�r
r�)rSrM�ir�s    r9�_find_name_version_seprW�sS��$�(�#���1���8���X�b�q�\�*�n�<��H�	$�
��z�!1�.�1A�B�
C�CrIc�T�	t||�dz}||d}|sy|S#t$rYywxYw)z�Parse the version string from a <package>+<version> filename
    "fragment" (stem) or egg fragment.

    :param fragment: The string to parse. E.g. foo-2.1
    :param canonical_name: The canonicalized name of the package this
        belongs to.
    r_N)rWr�)rSrM�
version_startr8s    r9rkrk�sE���.�x��H�1�L�
��}�~�&�G����N������s��	'�')F)Tr{r@r*r,r0r|�typingrrrrrrr	r
�pip._vendor.packagingr�pip._vendor.packaging.tagsr�pip._vendor.packaging.utilsr
�pip._vendor.packaging.versionrrrG�pip._internal.exceptionsrrrr�pip._internal.index.collectorrr�pip._internal.models.candidater�#pip._internal.models.format_controlr�pip._internal.models.linkr�!pip._internal.models.search_scoper�$pip._internal.models.selection_prefsr�"pip._internal.models.target_pythonr�pip._internal.models.wheelr�pip._internal.reqr�pip._internal.utils._logr�pip._internal.utils.filetypesr�pip._internal.utils.hashesr �pip._internal.utils.loggingr!�pip._internal.utils.miscr"�pip._internal.utils.packagingr#�pip._internal.utils.unpackingr$�pip._vendor.typing_extensionsr%�__all__r=r3r�r2�BuildTagr�r~r:�Enumr<rKr�r�r&r�r'rWrkr(rIr9�<module>rts���'�����	�X�X�X�,�*�9�6�@���E�@�=�*�9�E�;�,�0�.�9�-�2�1�?�>��7�
C��
�8�	����r��E�#�s�(�O�+�,���C��c�<��#���P�Q��$)�,�
�,���S�#�
�&�,�!�,�
�	,�^+�t�y�y�+�M-�M-�`G��*�+�G��V��G��G�
�
� �	G�T+�+�&%1�%1�PJ
�J
�ZK*�K*�\D�S�D�#�D�#�D�4�S��#��(�SV�-�rIpython3.12/site-packages/pip/_internal/index/collector.py000064400000040170151732701450017332 0ustar00"""
The main purpose of this module is to expose LinkCollector.collect_sources().
"""

import collections
import email.message
import functools
import itertools
import json
import logging
import os
import urllib.parse
import urllib.request
from html.parser import HTMLParser
from optparse import Values
from typing import (
    TYPE_CHECKING,
    Callable,
    Dict,
    Iterable,
    List,
    MutableMapping,
    NamedTuple,
    Optional,
    Sequence,
    Tuple,
    Union,
)

from pip._vendor import requests
from pip._vendor.requests import Response
from pip._vendor.requests.exceptions import RetryError, SSLError

from pip._internal.exceptions import NetworkConnectionError
from pip._internal.models.link import Link
from pip._internal.models.search_scope import SearchScope
from pip._internal.network.session import PipSession
from pip._internal.network.utils import raise_for_status
from pip._internal.utils.filetypes import is_archive_file
from pip._internal.utils.misc import redact_auth_from_url
from pip._internal.vcs import vcs

from .sources import CandidatesFromPage, LinkSource, build_source

if TYPE_CHECKING:
    from typing import Protocol
else:
    Protocol = object

logger = logging.getLogger(__name__)

ResponseHeaders = MutableMapping[str, str]


def _match_vcs_scheme(url: str) -> Optional[str]:
    """Look for VCS schemes in the URL.

    Returns the matched VCS scheme, or None if there's no match.
    """
    for scheme in vcs.schemes:
        if url.lower().startswith(scheme) and url[len(scheme)] in "+:":
            return scheme
    return None


class _NotAPIContent(Exception):
    def __init__(self, content_type: str, request_desc: str) -> None:
        super().__init__(content_type, request_desc)
        self.content_type = content_type
        self.request_desc = request_desc


def _ensure_api_header(response: Response) -> None:
    """
    Check the Content-Type header to ensure the response contains a Simple
    API Response.

    Raises `_NotAPIContent` if the content type is not a valid content-type.
    """
    content_type = response.headers.get("Content-Type", "Unknown")

    content_type_l = content_type.lower()
    if content_type_l.startswith(
        (
            "text/html",
            "application/vnd.pypi.simple.v1+html",
            "application/vnd.pypi.simple.v1+json",
        )
    ):
        return

    raise _NotAPIContent(content_type, response.request.method)


class _NotHTTP(Exception):
    pass


def _ensure_api_response(url: str, session: PipSession) -> None:
    """
    Send a HEAD request to the URL, and ensure the response contains a simple
    API Response.

    Raises `_NotHTTP` if the URL is not available for a HEAD request, or
    `_NotAPIContent` if the content type is not a valid content type.
    """
    scheme, netloc, path, query, fragment = urllib.parse.urlsplit(url)
    if scheme not in {"http", "https"}:
        raise _NotHTTP()

    resp = session.head(url, allow_redirects=True)
    raise_for_status(resp)

    _ensure_api_header(resp)


def _get_simple_response(url: str, session: PipSession) -> Response:
    """Access an Simple API response with GET, and return the response.

    This consists of three parts:

    1. If the URL looks suspiciously like an archive, send a HEAD first to
       check the Content-Type is HTML or Simple API, to avoid downloading a
       large file. Raise `_NotHTTP` if the content type cannot be determined, or
       `_NotAPIContent` if it is not HTML or a Simple API.
    2. Actually perform the request. Raise HTTP exceptions on network failures.
    3. Check the Content-Type header to make sure we got a Simple API response,
       and raise `_NotAPIContent` otherwise.
    """
    if is_archive_file(Link(url).filename):
        _ensure_api_response(url, session=session)

    logger.debug("Getting page %s", redact_auth_from_url(url))

    resp = session.get(
        url,
        headers={
            "Accept": ", ".join(
                [
                    "application/vnd.pypi.simple.v1+json",
                    "application/vnd.pypi.simple.v1+html; q=0.1",
                    "text/html; q=0.01",
                ]
            ),
            # We don't want to blindly returned cached data for
            # /simple/, because authors generally expecting that
            # twine upload && pip install will function, but if
            # they've done a pip install in the last ~10 minutes
            # it won't. Thus by setting this to zero we will not
            # blindly use any cached data, however the benefit of
            # using max-age=0 instead of no-cache, is that we will
            # still support conditional requests, so we will still
            # minimize traffic sent in cases where the page hasn't
            # changed at all, we will just always incur the round
            # trip for the conditional GET now instead of only
            # once per 10 minutes.
            # For more information, please see pypa/pip#5670.
            "Cache-Control": "max-age=0",
        },
    )
    raise_for_status(resp)

    # The check for archives above only works if the url ends with
    # something that looks like an archive. However that is not a
    # requirement of an url. Unless we issue a HEAD request on every
    # url we cannot know ahead of time for sure if something is a
    # Simple API response or not. However we can check after we've
    # downloaded it.
    _ensure_api_header(resp)

    logger.debug(
        "Fetched page %s as %s",
        redact_auth_from_url(url),
        resp.headers.get("Content-Type", "Unknown"),
    )

    return resp


def _get_encoding_from_headers(headers: ResponseHeaders) -> Optional[str]:
    """Determine if we have any encoding information in our headers."""
    if headers and "Content-Type" in headers:
        m = email.message.Message()
        m["content-type"] = headers["Content-Type"]
        charset = m.get_param("charset")
        if charset:
            return str(charset)
    return None


class CacheablePageContent:
    def __init__(self, page: "IndexContent") -> None:
        assert page.cache_link_parsing
        self.page = page

    def __eq__(self, other: object) -> bool:
        return isinstance(other, type(self)) and self.page.url == other.page.url

    def __hash__(self) -> int:
        return hash(self.page.url)


class ParseLinks(Protocol):
    def __call__(self, page: "IndexContent") -> Iterable[Link]:
        ...


def with_cached_index_content(fn: ParseLinks) -> ParseLinks:
    """
    Given a function that parses an Iterable[Link] from an IndexContent, cache the
    function's result (keyed by CacheablePageContent), unless the IndexContent
    `page` has `page.cache_link_parsing == False`.
    """

    @functools.lru_cache(maxsize=None)
    def wrapper(cacheable_page: CacheablePageContent) -> List[Link]:
        return list(fn(cacheable_page.page))

    @functools.wraps(fn)
    def wrapper_wrapper(page: "IndexContent") -> List[Link]:
        if page.cache_link_parsing:
            return wrapper(CacheablePageContent(page))
        return list(fn(page))

    return wrapper_wrapper


@with_cached_index_content
def parse_links(page: "IndexContent") -> Iterable[Link]:
    """
    Parse a Simple API's Index Content, and yield its anchor elements as Link objects.
    """

    content_type_l = page.content_type.lower()
    if content_type_l.startswith("application/vnd.pypi.simple.v1+json"):
        data = json.loads(page.content)
        for file in data.get("files", []):
            link = Link.from_json(file, page.url)
            if link is None:
                continue
            yield link
        return

    parser = HTMLLinkParser(page.url)
    encoding = page.encoding or "utf-8"
    parser.feed(page.content.decode(encoding))

    url = page.url
    base_url = parser.base_url or url
    for anchor in parser.anchors:
        link = Link.from_element(anchor, page_url=url, base_url=base_url)
        if link is None:
            continue
        yield link


class IndexContent:
    """Represents one response (or page), along with its URL"""

    def __init__(
        self,
        content: bytes,
        content_type: str,
        encoding: Optional[str],
        url: str,
        cache_link_parsing: bool = True,
    ) -> None:
        """
        :param encoding: the encoding to decode the given content.
        :param url: the URL from which the HTML was downloaded.
        :param cache_link_parsing: whether links parsed from this page's url
                                   should be cached. PyPI index urls should
                                   have this set to False, for example.
        """
        self.content = content
        self.content_type = content_type
        self.encoding = encoding
        self.url = url
        self.cache_link_parsing = cache_link_parsing

    def __str__(self) -> str:
        return redact_auth_from_url(self.url)


class HTMLLinkParser(HTMLParser):
    """
    HTMLParser that keeps the first base HREF and a list of all anchor
    elements' attributes.
    """

    def __init__(self, url: str) -> None:
        super().__init__(convert_charrefs=True)

        self.url: str = url
        self.base_url: Optional[str] = None
        self.anchors: List[Dict[str, Optional[str]]] = []

    def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None:
        if tag == "base" and self.base_url is None:
            href = self.get_href(attrs)
            if href is not None:
                self.base_url = href
        elif tag == "a":
            self.anchors.append(dict(attrs))

    def get_href(self, attrs: List[Tuple[str, Optional[str]]]) -> Optional[str]:
        for name, value in attrs:
            if name == "href":
                return value
        return None


def _handle_get_simple_fail(
    link: Link,
    reason: Union[str, Exception],
    meth: Optional[Callable[..., None]] = None,
) -> None:
    if meth is None:
        meth = logger.debug
    meth("Could not fetch URL %s: %s - skipping", link, reason)


def _make_index_content(
    response: Response, cache_link_parsing: bool = True
) -> IndexContent:
    encoding = _get_encoding_from_headers(response.headers)
    return IndexContent(
        response.content,
        response.headers["Content-Type"],
        encoding=encoding,
        url=response.url,
        cache_link_parsing=cache_link_parsing,
    )


def _get_index_content(link: Link, *, session: PipSession) -> Optional["IndexContent"]:
    url = link.url.split("#", 1)[0]

    # Check for VCS schemes that do not support lookup as web pages.
    vcs_scheme = _match_vcs_scheme(url)
    if vcs_scheme:
        logger.warning(
            "Cannot look at %s URL %s because it does not support lookup as web pages.",
            vcs_scheme,
            link,
        )
        return None

    # Tack index.html onto file:// URLs that point to directories
    scheme, _, path, _, _, _ = urllib.parse.urlparse(url)
    if scheme == "file" and os.path.isdir(urllib.request.url2pathname(path)):
        # add trailing slash if not present so urljoin doesn't trim
        # final segment
        if not url.endswith("/"):
            url += "/"
        # TODO: In the future, it would be nice if pip supported PEP 691
        #       style responses in the file:// URLs, however there's no
        #       standard file extension for application/vnd.pypi.simple.v1+json
        #       so we'll need to come up with something on our own.
        url = urllib.parse.urljoin(url, "index.html")
        logger.debug(" file: URL is directory, getting %s", url)

    try:
        resp = _get_simple_response(url, session=session)
    except _NotHTTP:
        logger.warning(
            "Skipping page %s because it looks like an archive, and cannot "
            "be checked by a HTTP HEAD request.",
            link,
        )
    except _NotAPIContent as exc:
        logger.warning(
            "Skipping page %s because the %s request got Content-Type: %s. "
            "The only supported Content-Types are application/vnd.pypi.simple.v1+json, "
            "application/vnd.pypi.simple.v1+html, and text/html",
            link,
            exc.request_desc,
            exc.content_type,
        )
    except NetworkConnectionError as exc:
        _handle_get_simple_fail(link, exc)
    except RetryError as exc:
        _handle_get_simple_fail(link, exc)
    except SSLError as exc:
        reason = "There was a problem confirming the ssl certificate: "
        reason += str(exc)
        _handle_get_simple_fail(link, reason, meth=logger.info)
    except requests.ConnectionError as exc:
        _handle_get_simple_fail(link, f"connection error: {exc}")
    except requests.Timeout:
        _handle_get_simple_fail(link, "timed out")
    else:
        return _make_index_content(resp, cache_link_parsing=link.cache_link_parsing)
    return None


class CollectedSources(NamedTuple):
    find_links: Sequence[Optional[LinkSource]]
    index_urls: Sequence[Optional[LinkSource]]


class LinkCollector:

    """
    Responsible for collecting Link objects from all configured locations,
    making network requests as needed.

    The class's main method is its collect_sources() method.
    """

    def __init__(
        self,
        session: PipSession,
        search_scope: SearchScope,
    ) -> None:
        self.search_scope = search_scope
        self.session = session

    @classmethod
    def create(
        cls,
        session: PipSession,
        options: Values,
        suppress_no_index: bool = False,
    ) -> "LinkCollector":
        """
        :param session: The Session to use to make requests.
        :param suppress_no_index: Whether to ignore the --no-index option
            when constructing the SearchScope object.
        """
        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index and not suppress_no_index:
            logger.debug(
                "Ignoring indexes: %s",
                ",".join(redact_auth_from_url(url) for url in index_urls),
            )
            index_urls = []

        # Make sure find_links is a list before passing to create().
        find_links = options.find_links or []

        search_scope = SearchScope.create(
            find_links=find_links,
            index_urls=index_urls,
            no_index=options.no_index,
        )
        link_collector = LinkCollector(
            session=session,
            search_scope=search_scope,
        )
        return link_collector

    @property
    def find_links(self) -> List[str]:
        return self.search_scope.find_links

    def fetch_response(self, location: Link) -> Optional[IndexContent]:
        """
        Fetch an HTML page containing package links.
        """
        return _get_index_content(location, session=self.session)

    def collect_sources(
        self,
        project_name: str,
        candidates_from_page: CandidatesFromPage,
    ) -> CollectedSources:
        # The OrderedDict calls deduplicate sources by URL.
        index_url_sources = collections.OrderedDict(
            build_source(
                loc,
                candidates_from_page=candidates_from_page,
                page_validator=self.session.is_secure_origin,
                expand_dir=False,
                cache_link_parsing=False,
            )
            for loc in self.search_scope.get_index_urls_locations(project_name)
        ).values()
        find_links_sources = collections.OrderedDict(
            build_source(
                loc,
                candidates_from_page=candidates_from_page,
                page_validator=self.session.is_secure_origin,
                expand_dir=True,
                cache_link_parsing=True,
            )
            for loc in self.find_links
        ).values()

        if logger.isEnabledFor(logging.DEBUG):
            lines = [
                f"* {s.link}"
                for s in itertools.chain(find_links_sources, index_url_sources)
                if s is not None and s.link is not None
            ]
            lines = [
                f"{len(lines)} location(s) to search "
                f"for versions of {project_name}:"
            ] + lines
            logger.debug("\n".join(lines))

        return CollectedSources(
            find_links=list(find_links_sources),
            index_urls=list(index_url_sources),
        )
python3.12/site-packages/pip/_internal/index/sources.py000064400000014634151732701450017035 0ustar00import logging
import mimetypes
import os
import pathlib
from typing import Callable, Iterable, Optional, Tuple

from pip._internal.models.candidate import InstallationCandidate
from pip._internal.models.link import Link
from pip._internal.utils.urls import path_to_url, url_to_path
from pip._internal.vcs import is_url

logger = logging.getLogger(__name__)

FoundCandidates = Iterable[InstallationCandidate]
FoundLinks = Iterable[Link]
CandidatesFromPage = Callable[[Link], Iterable[InstallationCandidate]]
PageValidator = Callable[[Link], bool]


class LinkSource:
    @property
    def link(self) -> Optional[Link]:
        """Returns the underlying link, if there's one."""
        raise NotImplementedError()

    def page_candidates(self) -> FoundCandidates:
        """Candidates found by parsing an archive listing HTML file."""
        raise NotImplementedError()

    def file_links(self) -> FoundLinks:
        """Links found by specifying archives directly."""
        raise NotImplementedError()


def _is_html_file(file_url: str) -> bool:
    return mimetypes.guess_type(file_url, strict=False)[0] == "text/html"


class _FlatDirectorySource(LinkSource):
    """Link source specified by ``--find-links=<path-to-dir>``.

    This looks the content of the directory, and returns:

    * ``page_candidates``: Links listed on each HTML file in the directory.
    * ``file_candidates``: Archives in the directory.
    """

    def __init__(
        self,
        candidates_from_page: CandidatesFromPage,
        path: str,
    ) -> None:
        self._candidates_from_page = candidates_from_page
        self._path = pathlib.Path(os.path.realpath(path))

    @property
    def link(self) -> Optional[Link]:
        return None

    def page_candidates(self) -> FoundCandidates:
        for path in self._path.iterdir():
            url = path_to_url(str(path))
            if not _is_html_file(url):
                continue
            yield from self._candidates_from_page(Link(url))

    def file_links(self) -> FoundLinks:
        for path in self._path.iterdir():
            url = path_to_url(str(path))
            if _is_html_file(url):
                continue
            yield Link(url)


class _LocalFileSource(LinkSource):
    """``--find-links=<path-or-url>`` or ``--[extra-]index-url=<path-or-url>``.

    If a URL is supplied, it must be a ``file:`` URL. If a path is supplied to
    the option, it is converted to a URL first. This returns:

    * ``page_candidates``: Links listed on an HTML file.
    * ``file_candidates``: The non-HTML file.
    """

    def __init__(
        self,
        candidates_from_page: CandidatesFromPage,
        link: Link,
    ) -> None:
        self._candidates_from_page = candidates_from_page
        self._link = link

    @property
    def link(self) -> Optional[Link]:
        return self._link

    def page_candidates(self) -> FoundCandidates:
        if not _is_html_file(self._link.url):
            return
        yield from self._candidates_from_page(self._link)

    def file_links(self) -> FoundLinks:
        if _is_html_file(self._link.url):
            return
        yield self._link


class _RemoteFileSource(LinkSource):
    """``--find-links=<url>`` or ``--[extra-]index-url=<url>``.

    This returns:

    * ``page_candidates``: Links listed on an HTML file.
    * ``file_candidates``: The non-HTML file.
    """

    def __init__(
        self,
        candidates_from_page: CandidatesFromPage,
        page_validator: PageValidator,
        link: Link,
    ) -> None:
        self._candidates_from_page = candidates_from_page
        self._page_validator = page_validator
        self._link = link

    @property
    def link(self) -> Optional[Link]:
        return self._link

    def page_candidates(self) -> FoundCandidates:
        if not self._page_validator(self._link):
            return
        yield from self._candidates_from_page(self._link)

    def file_links(self) -> FoundLinks:
        yield self._link


class _IndexDirectorySource(LinkSource):
    """``--[extra-]index-url=<path-to-directory>``.

    This is treated like a remote URL; ``candidates_from_page`` contains logic
    for this by appending ``index.html`` to the link.
    """

    def __init__(
        self,
        candidates_from_page: CandidatesFromPage,
        link: Link,
    ) -> None:
        self._candidates_from_page = candidates_from_page
        self._link = link

    @property
    def link(self) -> Optional[Link]:
        return self._link

    def page_candidates(self) -> FoundCandidates:
        yield from self._candidates_from_page(self._link)

    def file_links(self) -> FoundLinks:
        return ()


def build_source(
    location: str,
    *,
    candidates_from_page: CandidatesFromPage,
    page_validator: PageValidator,
    expand_dir: bool,
    cache_link_parsing: bool,
) -> Tuple[Optional[str], Optional[LinkSource]]:
    path: Optional[str] = None
    url: Optional[str] = None
    if os.path.exists(location):  # Is a local path.
        url = path_to_url(location)
        path = location
    elif location.startswith("file:"):  # A file: URL.
        url = location
        path = url_to_path(location)
    elif is_url(location):
        url = location

    if url is None:
        msg = (
            "Location '%s' is ignored: "
            "it is either a non-existing path or lacks a specific scheme."
        )
        logger.warning(msg, location)
        return (None, None)

    if path is None:
        source: LinkSource = _RemoteFileSource(
            candidates_from_page=candidates_from_page,
            page_validator=page_validator,
            link=Link(url, cache_link_parsing=cache_link_parsing),
        )
        return (url, source)

    if os.path.isdir(path):
        if expand_dir:
            source = _FlatDirectorySource(
                candidates_from_page=candidates_from_page,
                path=path,
            )
        else:
            source = _IndexDirectorySource(
                candidates_from_page=candidates_from_page,
                link=Link(url, cache_link_parsing=cache_link_parsing),
            )
        return (url, source)
    elif os.path.isfile(path):
        source = _LocalFileSource(
            candidates_from_page=candidates_from_page,
            link=Link(url, cache_link_parsing=cache_link_parsing),
        )
        return (url, source)
    logger.warning(
        "Location '%s' is ignored: it is neither a file nor a directory.",
        location,
    )
    return (url, None)
python3.12/site-packages/pip/_internal/index/__init__.py000064400000000036151732701450017100 0ustar00"""Index interaction code
"""
python3.12/site-packages/pip/_internal/index/package_finder.py000064400000112001151732701450020257 0ustar00"""Routines related to PyPI, indexes"""

import enum
import functools
import itertools
import logging
import re
from typing import TYPE_CHECKING, FrozenSet, Iterable, List, Optional, Set, Tuple, Union

from pip._vendor.packaging import specifiers
from pip._vendor.packaging.tags import Tag
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.packaging.version import _BaseVersion
from pip._vendor.packaging.version import parse as parse_version

from pip._internal.exceptions import (
    BestVersionAlreadyInstalled,
    DistributionNotFound,
    InvalidWheelFilename,
    UnsupportedWheel,
)
from pip._internal.index.collector import LinkCollector, parse_links
from pip._internal.models.candidate import InstallationCandidate
from pip._internal.models.format_control import FormatControl
from pip._internal.models.link import Link
from pip._internal.models.search_scope import SearchScope
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.models.target_python import TargetPython
from pip._internal.models.wheel import Wheel
from pip._internal.req import InstallRequirement
from pip._internal.utils._log import getLogger
from pip._internal.utils.filetypes import WHEEL_EXTENSION
from pip._internal.utils.hashes import Hashes
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import build_netloc
from pip._internal.utils.packaging import check_requires_python
from pip._internal.utils.unpacking import SUPPORTED_EXTENSIONS

if TYPE_CHECKING:
    from pip._vendor.typing_extensions import TypeGuard

__all__ = ["FormatControl", "BestCandidateResult", "PackageFinder"]


logger = getLogger(__name__)

BuildTag = Union[Tuple[()], Tuple[int, str]]
CandidateSortingKey = Tuple[int, int, int, _BaseVersion, Optional[int], BuildTag]


def _check_link_requires_python(
    link: Link,
    version_info: Tuple[int, int, int],
    ignore_requires_python: bool = False,
) -> bool:
    """
    Return whether the given Python version is compatible with a link's
    "Requires-Python" value.

    :param version_info: A 3-tuple of ints representing the Python
        major-minor-micro version to check.
    :param ignore_requires_python: Whether to ignore the "Requires-Python"
        value if the given Python version isn't compatible.
    """
    try:
        is_compatible = check_requires_python(
            link.requires_python,
            version_info=version_info,
        )
    except specifiers.InvalidSpecifier:
        logger.debug(
            "Ignoring invalid Requires-Python (%r) for link: %s",
            link.requires_python,
            link,
        )
    else:
        if not is_compatible:
            version = ".".join(map(str, version_info))
            if not ignore_requires_python:
                logger.verbose(
                    "Link requires a different Python (%s not in: %r): %s",
                    version,
                    link.requires_python,
                    link,
                )
                return False

            logger.debug(
                "Ignoring failed Requires-Python check (%s not in: %r) for link: %s",
                version,
                link.requires_python,
                link,
            )

    return True


class LinkType(enum.Enum):
    candidate = enum.auto()
    different_project = enum.auto()
    yanked = enum.auto()
    format_unsupported = enum.auto()
    format_invalid = enum.auto()
    platform_mismatch = enum.auto()
    requires_python_mismatch = enum.auto()


class LinkEvaluator:

    """
    Responsible for evaluating links for a particular project.
    """

    _py_version_re = re.compile(r"-py([123]\.?[0-9]?)$")

    # Don't include an allow_yanked default value to make sure each call
    # site considers whether yanked releases are allowed. This also causes
    # that decision to be made explicit in the calling code, which helps
    # people when reading the code.
    def __init__(
        self,
        project_name: str,
        canonical_name: str,
        formats: FrozenSet[str],
        target_python: TargetPython,
        allow_yanked: bool,
        ignore_requires_python: Optional[bool] = None,
    ) -> None:
        """
        :param project_name: The user supplied package name.
        :param canonical_name: The canonical package name.
        :param formats: The formats allowed for this package. Should be a set
            with 'binary' or 'source' or both in it.
        :param target_python: The target Python interpreter to use when
            evaluating link compatibility. This is used, for example, to
            check wheel compatibility, as well as when checking the Python
            version, e.g. the Python version embedded in a link filename
            (or egg fragment) and against an HTML link's optional PEP 503
            "data-requires-python" attribute.
        :param allow_yanked: Whether files marked as yanked (in the sense
            of PEP 592) are permitted to be candidates for install.
        :param ignore_requires_python: Whether to ignore incompatible
            PEP 503 "data-requires-python" values in HTML links. Defaults
            to False.
        """
        if ignore_requires_python is None:
            ignore_requires_python = False

        self._allow_yanked = allow_yanked
        self._canonical_name = canonical_name
        self._ignore_requires_python = ignore_requires_python
        self._formats = formats
        self._target_python = target_python

        self.project_name = project_name

    def evaluate_link(self, link: Link) -> Tuple[LinkType, str]:
        """
        Determine whether a link is a candidate for installation.

        :return: A tuple (result, detail), where *result* is an enum
            representing whether the evaluation found a candidate, or the reason
            why one is not found. If a candidate is found, *detail* will be the
            candidate's version string; if one is not found, it contains the
            reason the link fails to qualify.
        """
        version = None
        if link.is_yanked and not self._allow_yanked:
            reason = link.yanked_reason or "<none given>"
            return (LinkType.yanked, f"yanked for reason: {reason}")

        if link.egg_fragment:
            egg_info = link.egg_fragment
            ext = link.ext
        else:
            egg_info, ext = link.splitext()
            if not ext:
                return (LinkType.format_unsupported, "not a file")
            if ext not in SUPPORTED_EXTENSIONS:
                return (
                    LinkType.format_unsupported,
                    f"unsupported archive format: {ext}",
                )
            if "binary" not in self._formats and ext == WHEEL_EXTENSION:
                reason = f"No binaries permitted for {self.project_name}"
                return (LinkType.format_unsupported, reason)
            if "macosx10" in link.path and ext == ".zip":
                return (LinkType.format_unsupported, "macosx10 one")
            if ext == WHEEL_EXTENSION:
                try:
                    wheel = Wheel(link.filename)
                except InvalidWheelFilename:
                    return (
                        LinkType.format_invalid,
                        "invalid wheel filename",
                    )
                if canonicalize_name(wheel.name) != self._canonical_name:
                    reason = f"wrong project name (not {self.project_name})"
                    return (LinkType.different_project, reason)

                supported_tags = self._target_python.get_unsorted_tags()
                if not wheel.supported(supported_tags):
                    # Include the wheel's tags in the reason string to
                    # simplify troubleshooting compatibility issues.
                    file_tags = ", ".join(wheel.get_formatted_file_tags())
                    reason = (
                        f"none of the wheel's tags ({file_tags}) are compatible "
                        f"(run pip debug --verbose to show compatible tags)"
                    )
                    return (LinkType.platform_mismatch, reason)

                version = wheel.version

        # This should be up by the self.ok_binary check, but see issue 2700.
        if "source" not in self._formats and ext != WHEEL_EXTENSION:
            reason = f"No sources permitted for {self.project_name}"
            return (LinkType.format_unsupported, reason)

        if not version:
            version = _extract_version_from_fragment(
                egg_info,
                self._canonical_name,
            )
        if not version:
            reason = f"Missing project version for {self.project_name}"
            return (LinkType.format_invalid, reason)

        match = self._py_version_re.search(version)
        if match:
            version = version[: match.start()]
            py_version = match.group(1)
            if py_version != self._target_python.py_version:
                return (
                    LinkType.platform_mismatch,
                    "Python version is incorrect",
                )

        supports_python = _check_link_requires_python(
            link,
            version_info=self._target_python.py_version_info,
            ignore_requires_python=self._ignore_requires_python,
        )
        if not supports_python:
            reason = f"{version} Requires-Python {link.requires_python}"
            return (LinkType.requires_python_mismatch, reason)

        logger.debug("Found link %s, version: %s", link, version)

        return (LinkType.candidate, version)


def filter_unallowed_hashes(
    candidates: List[InstallationCandidate],
    hashes: Optional[Hashes],
    project_name: str,
) -> List[InstallationCandidate]:
    """
    Filter out candidates whose hashes aren't allowed, and return a new
    list of candidates.

    If at least one candidate has an allowed hash, then all candidates with
    either an allowed hash or no hash specified are returned.  Otherwise,
    the given candidates are returned.

    Including the candidates with no hash specified when there is a match
    allows a warning to be logged if there is a more preferred candidate
    with no hash specified.  Returning all candidates in the case of no
    matches lets pip report the hash of the candidate that would otherwise
    have been installed (e.g. permitting the user to more easily update
    their requirements file with the desired hash).
    """
    if not hashes:
        logger.debug(
            "Given no hashes to check %s links for project %r: "
            "discarding no candidates",
            len(candidates),
            project_name,
        )
        # Make sure we're not returning back the given value.
        return list(candidates)

    matches_or_no_digest = []
    # Collect the non-matches for logging purposes.
    non_matches = []
    match_count = 0
    for candidate in candidates:
        link = candidate.link
        if not link.has_hash:
            pass
        elif link.is_hash_allowed(hashes=hashes):
            match_count += 1
        else:
            non_matches.append(candidate)
            continue

        matches_or_no_digest.append(candidate)

    if match_count:
        filtered = matches_or_no_digest
    else:
        # Make sure we're not returning back the given value.
        filtered = list(candidates)

    if len(filtered) == len(candidates):
        discard_message = "discarding no candidates"
    else:
        discard_message = "discarding {} non-matches:\n  {}".format(
            len(non_matches),
            "\n  ".join(str(candidate.link) for candidate in non_matches),
        )

    logger.debug(
        "Checked %s links for project %r against %s hashes "
        "(%s matches, %s no digest): %s",
        len(candidates),
        project_name,
        hashes.digest_count,
        match_count,
        len(matches_or_no_digest) - match_count,
        discard_message,
    )

    return filtered


class CandidatePreferences:

    """
    Encapsulates some of the preferences for filtering and sorting
    InstallationCandidate objects.
    """

    def __init__(
        self,
        prefer_binary: bool = False,
        allow_all_prereleases: bool = False,
    ) -> None:
        """
        :param allow_all_prereleases: Whether to allow all pre-releases.
        """
        self.allow_all_prereleases = allow_all_prereleases
        self.prefer_binary = prefer_binary


class BestCandidateResult:
    """A collection of candidates, returned by `PackageFinder.find_best_candidate`.

    This class is only intended to be instantiated by CandidateEvaluator's
    `compute_best_candidate()` method.
    """

    def __init__(
        self,
        candidates: List[InstallationCandidate],
        applicable_candidates: List[InstallationCandidate],
        best_candidate: Optional[InstallationCandidate],
    ) -> None:
        """
        :param candidates: A sequence of all available candidates found.
        :param applicable_candidates: The applicable candidates.
        :param best_candidate: The most preferred candidate found, or None
            if no applicable candidates were found.
        """
        assert set(applicable_candidates) <= set(candidates)

        if best_candidate is None:
            assert not applicable_candidates
        else:
            assert best_candidate in applicable_candidates

        self._applicable_candidates = applicable_candidates
        self._candidates = candidates

        self.best_candidate = best_candidate

    def iter_all(self) -> Iterable[InstallationCandidate]:
        """Iterate through all candidates."""
        return iter(self._candidates)

    def iter_applicable(self) -> Iterable[InstallationCandidate]:
        """Iterate through the applicable candidates."""
        return iter(self._applicable_candidates)


class CandidateEvaluator:

    """
    Responsible for filtering and sorting candidates for installation based
    on what tags are valid.
    """

    @classmethod
    def create(
        cls,
        project_name: str,
        target_python: Optional[TargetPython] = None,
        prefer_binary: bool = False,
        allow_all_prereleases: bool = False,
        specifier: Optional[specifiers.BaseSpecifier] = None,
        hashes: Optional[Hashes] = None,
    ) -> "CandidateEvaluator":
        """Create a CandidateEvaluator object.

        :param target_python: The target Python interpreter to use when
            checking compatibility. If None (the default), a TargetPython
            object will be constructed from the running Python.
        :param specifier: An optional object implementing `filter`
            (e.g. `packaging.specifiers.SpecifierSet`) to filter applicable
            versions.
        :param hashes: An optional collection of allowed hashes.
        """
        if target_python is None:
            target_python = TargetPython()
        if specifier is None:
            specifier = specifiers.SpecifierSet()

        supported_tags = target_python.get_sorted_tags()

        return cls(
            project_name=project_name,
            supported_tags=supported_tags,
            specifier=specifier,
            prefer_binary=prefer_binary,
            allow_all_prereleases=allow_all_prereleases,
            hashes=hashes,
        )

    def __init__(
        self,
        project_name: str,
        supported_tags: List[Tag],
        specifier: specifiers.BaseSpecifier,
        prefer_binary: bool = False,
        allow_all_prereleases: bool = False,
        hashes: Optional[Hashes] = None,
    ) -> None:
        """
        :param supported_tags: The PEP 425 tags supported by the target
            Python in order of preference (most preferred first).
        """
        self._allow_all_prereleases = allow_all_prereleases
        self._hashes = hashes
        self._prefer_binary = prefer_binary
        self._project_name = project_name
        self._specifier = specifier
        self._supported_tags = supported_tags
        # Since the index of the tag in the _supported_tags list is used
        # as a priority, precompute a map from tag to index/priority to be
        # used in wheel.find_most_preferred_tag.
        self._wheel_tag_preferences = {
            tag: idx for idx, tag in enumerate(supported_tags)
        }

    def get_applicable_candidates(
        self,
        candidates: List[InstallationCandidate],
    ) -> List[InstallationCandidate]:
        """
        Return the applicable candidates from a list of candidates.
        """
        # Using None infers from the specifier instead.
        allow_prereleases = self._allow_all_prereleases or None
        specifier = self._specifier
        versions = {
            str(v)
            for v in specifier.filter(
                # We turn the version object into a str here because otherwise
                # when we're debundled but setuptools isn't, Python will see
                # packaging.version.Version and
                # pkg_resources._vendor.packaging.version.Version as different
                # types. This way we'll use a str as a common data interchange
                # format. If we stop using the pkg_resources provided specifier
                # and start using our own, we can drop the cast to str().
                (str(c.version) for c in candidates),
                prereleases=allow_prereleases,
            )
        }

        # Again, converting version to str to deal with debundling.
        applicable_candidates = [c for c in candidates if str(c.version) in versions]

        filtered_applicable_candidates = filter_unallowed_hashes(
            candidates=applicable_candidates,
            hashes=self._hashes,
            project_name=self._project_name,
        )

        return sorted(filtered_applicable_candidates, key=self._sort_key)

    def _sort_key(self, candidate: InstallationCandidate) -> CandidateSortingKey:
        """
        Function to pass as the `key` argument to a call to sorted() to sort
        InstallationCandidates by preference.

        Returns a tuple such that tuples sorting as greater using Python's
        default comparison operator are more preferred.

        The preference is as follows:

        First and foremost, candidates with allowed (matching) hashes are
        always preferred over candidates without matching hashes. This is
        because e.g. if the only candidate with an allowed hash is yanked,
        we still want to use that candidate.

        Second, excepting hash considerations, candidates that have been
        yanked (in the sense of PEP 592) are always less preferred than
        candidates that haven't been yanked. Then:

        If not finding wheels, they are sorted by version only.
        If finding wheels, then the sort order is by version, then:
          1. existing installs
          2. wheels ordered via Wheel.support_index_min(self._supported_tags)
          3. source archives
        If prefer_binary was set, then all wheels are sorted above sources.

        Note: it was considered to embed this logic into the Link
              comparison operators, but then different sdist links
              with the same version, would have to be considered equal
        """
        valid_tags = self._supported_tags
        support_num = len(valid_tags)
        build_tag: BuildTag = ()
        binary_preference = 0
        link = candidate.link
        if link.is_wheel:
            # can raise InvalidWheelFilename
            wheel = Wheel(link.filename)
            try:
                pri = -(
                    wheel.find_most_preferred_tag(
                        valid_tags, self._wheel_tag_preferences
                    )
                )
            except ValueError:
                raise UnsupportedWheel(
                    "{} is not a supported wheel for this platform. It "
                    "can't be sorted.".format(wheel.filename)
                )
            if self._prefer_binary:
                binary_preference = 1
            if wheel.build_tag is not None:
                match = re.match(r"^(\d+)(.*)$", wheel.build_tag)
                assert match is not None, "guaranteed by filename validation"
                build_tag_groups = match.groups()
                build_tag = (int(build_tag_groups[0]), build_tag_groups[1])
        else:  # sdist
            pri = -(support_num)
        has_allowed_hash = int(link.is_hash_allowed(self._hashes))
        yank_value = -1 * int(link.is_yanked)  # -1 for yanked.
        return (
            has_allowed_hash,
            yank_value,
            binary_preference,
            candidate.version,
            pri,
            build_tag,
        )

    def sort_best_candidate(
        self,
        candidates: List[InstallationCandidate],
    ) -> Optional[InstallationCandidate]:
        """
        Return the best candidate per the instance's sort order, or None if
        no candidate is acceptable.
        """
        if not candidates:
            return None
        best_candidate = max(candidates, key=self._sort_key)
        return best_candidate

    def compute_best_candidate(
        self,
        candidates: List[InstallationCandidate],
    ) -> BestCandidateResult:
        """
        Compute and return a `BestCandidateResult` instance.
        """
        applicable_candidates = self.get_applicable_candidates(candidates)

        best_candidate = self.sort_best_candidate(applicable_candidates)

        return BestCandidateResult(
            candidates,
            applicable_candidates=applicable_candidates,
            best_candidate=best_candidate,
        )


class PackageFinder:
    """This finds packages.

    This is meant to match easy_install's technique for looking for
    packages, by reading pages and looking for appropriate links.
    """

    def __init__(
        self,
        link_collector: LinkCollector,
        target_python: TargetPython,
        allow_yanked: bool,
        format_control: Optional[FormatControl] = None,
        candidate_prefs: Optional[CandidatePreferences] = None,
        ignore_requires_python: Optional[bool] = None,
    ) -> None:
        """
        This constructor is primarily meant to be used by the create() class
        method and from tests.

        :param format_control: A FormatControl object, used to control
            the selection of source packages / binary packages when consulting
            the index and links.
        :param candidate_prefs: Options to use when creating a
            CandidateEvaluator object.
        """
        if candidate_prefs is None:
            candidate_prefs = CandidatePreferences()

        format_control = format_control or FormatControl(set(), set())

        self._allow_yanked = allow_yanked
        self._candidate_prefs = candidate_prefs
        self._ignore_requires_python = ignore_requires_python
        self._link_collector = link_collector
        self._target_python = target_python

        self.format_control = format_control

        # These are boring links that have already been logged somehow.
        self._logged_links: Set[Tuple[Link, LinkType, str]] = set()

    # Don't include an allow_yanked default value to make sure each call
    # site considers whether yanked releases are allowed. This also causes
    # that decision to be made explicit in the calling code, which helps
    # people when reading the code.
    @classmethod
    def create(
        cls,
        link_collector: LinkCollector,
        selection_prefs: SelectionPreferences,
        target_python: Optional[TargetPython] = None,
    ) -> "PackageFinder":
        """Create a PackageFinder.

        :param selection_prefs: The candidate selection preferences, as a
            SelectionPreferences object.
        :param target_python: The target Python interpreter to use when
            checking compatibility. If None (the default), a TargetPython
            object will be constructed from the running Python.
        """
        if target_python is None:
            target_python = TargetPython()

        candidate_prefs = CandidatePreferences(
            prefer_binary=selection_prefs.prefer_binary,
            allow_all_prereleases=selection_prefs.allow_all_prereleases,
        )

        return cls(
            candidate_prefs=candidate_prefs,
            link_collector=link_collector,
            target_python=target_python,
            allow_yanked=selection_prefs.allow_yanked,
            format_control=selection_prefs.format_control,
            ignore_requires_python=selection_prefs.ignore_requires_python,
        )

    @property
    def target_python(self) -> TargetPython:
        return self._target_python

    @property
    def search_scope(self) -> SearchScope:
        return self._link_collector.search_scope

    @search_scope.setter
    def search_scope(self, search_scope: SearchScope) -> None:
        self._link_collector.search_scope = search_scope

    @property
    def find_links(self) -> List[str]:
        return self._link_collector.find_links

    @property
    def index_urls(self) -> List[str]:
        return self.search_scope.index_urls

    @property
    def trusted_hosts(self) -> Iterable[str]:
        for host_port in self._link_collector.session.pip_trusted_origins:
            yield build_netloc(*host_port)

    @property
    def allow_all_prereleases(self) -> bool:
        return self._candidate_prefs.allow_all_prereleases

    def set_allow_all_prereleases(self) -> None:
        self._candidate_prefs.allow_all_prereleases = True

    @property
    def prefer_binary(self) -> bool:
        return self._candidate_prefs.prefer_binary

    def set_prefer_binary(self) -> None:
        self._candidate_prefs.prefer_binary = True

    def requires_python_skipped_reasons(self) -> List[str]:
        reasons = {
            detail
            for _, result, detail in self._logged_links
            if result == LinkType.requires_python_mismatch
        }
        return sorted(reasons)

    def make_link_evaluator(self, project_name: str) -> LinkEvaluator:
        canonical_name = canonicalize_name(project_name)
        formats = self.format_control.get_allowed_formats(canonical_name)

        return LinkEvaluator(
            project_name=project_name,
            canonical_name=canonical_name,
            formats=formats,
            target_python=self._target_python,
            allow_yanked=self._allow_yanked,
            ignore_requires_python=self._ignore_requires_python,
        )

    def _sort_links(self, links: Iterable[Link]) -> List[Link]:
        """
        Returns elements of links in order, non-egg links first, egg links
        second, while eliminating duplicates
        """
        eggs, no_eggs = [], []
        seen: Set[Link] = set()
        for link in links:
            if link not in seen:
                seen.add(link)
                if link.egg_fragment:
                    eggs.append(link)
                else:
                    no_eggs.append(link)
        return no_eggs + eggs

    def _log_skipped_link(self, link: Link, result: LinkType, detail: str) -> None:
        entry = (link, result, detail)
        if entry not in self._logged_links:
            # Put the link at the end so the reason is more visible and because
            # the link string is usually very long.
            logger.debug("Skipping link: %s: %s", detail, link)
            self._logged_links.add(entry)

    def get_install_candidate(
        self, link_evaluator: LinkEvaluator, link: Link
    ) -> Optional[InstallationCandidate]:
        """
        If the link is a candidate for install, convert it to an
        InstallationCandidate and return it. Otherwise, return None.
        """
        result, detail = link_evaluator.evaluate_link(link)
        if result != LinkType.candidate:
            self._log_skipped_link(link, result, detail)
            return None

        return InstallationCandidate(
            name=link_evaluator.project_name,
            link=link,
            version=detail,
        )

    def evaluate_links(
        self, link_evaluator: LinkEvaluator, links: Iterable[Link]
    ) -> List[InstallationCandidate]:
        """
        Convert links that are candidates to InstallationCandidate objects.
        """
        candidates = []
        for link in self._sort_links(links):
            candidate = self.get_install_candidate(link_evaluator, link)
            if candidate is not None:
                candidates.append(candidate)

        return candidates

    def process_project_url(
        self, project_url: Link, link_evaluator: LinkEvaluator
    ) -> List[InstallationCandidate]:
        logger.debug(
            "Fetching project page and analyzing links: %s",
            project_url,
        )
        index_response = self._link_collector.fetch_response(project_url)
        if index_response is None:
            return []

        page_links = list(parse_links(index_response))

        with indent_log():
            package_links = self.evaluate_links(
                link_evaluator,
                links=page_links,
            )

        return package_links

    @functools.lru_cache(maxsize=None)
    def find_all_candidates(self, project_name: str) -> List[InstallationCandidate]:
        """Find all available InstallationCandidate for project_name

        This checks index_urls and find_links.
        All versions found are returned as an InstallationCandidate list.

        See LinkEvaluator.evaluate_link() for details on which files
        are accepted.
        """
        link_evaluator = self.make_link_evaluator(project_name)

        collected_sources = self._link_collector.collect_sources(
            project_name=project_name,
            candidates_from_page=functools.partial(
                self.process_project_url,
                link_evaluator=link_evaluator,
            ),
        )

        page_candidates_it = itertools.chain.from_iterable(
            source.page_candidates()
            for sources in collected_sources
            for source in sources
            if source is not None
        )
        page_candidates = list(page_candidates_it)

        file_links_it = itertools.chain.from_iterable(
            source.file_links()
            for sources in collected_sources
            for source in sources
            if source is not None
        )
        file_candidates = self.evaluate_links(
            link_evaluator,
            sorted(file_links_it, reverse=True),
        )

        if logger.isEnabledFor(logging.DEBUG) and file_candidates:
            paths = []
            for candidate in file_candidates:
                assert candidate.link.url  # we need to have a URL
                try:
                    paths.append(candidate.link.file_path)
                except Exception:
                    paths.append(candidate.link.url)  # it's not a local file

            logger.debug("Local files found: %s", ", ".join(paths))

        # This is an intentional priority ordering
        return file_candidates + page_candidates

    def make_candidate_evaluator(
        self,
        project_name: str,
        specifier: Optional[specifiers.BaseSpecifier] = None,
        hashes: Optional[Hashes] = None,
    ) -> CandidateEvaluator:
        """Create a CandidateEvaluator object to use."""
        candidate_prefs = self._candidate_prefs
        return CandidateEvaluator.create(
            project_name=project_name,
            target_python=self._target_python,
            prefer_binary=candidate_prefs.prefer_binary,
            allow_all_prereleases=candidate_prefs.allow_all_prereleases,
            specifier=specifier,
            hashes=hashes,
        )

    @functools.lru_cache(maxsize=None)
    def find_best_candidate(
        self,
        project_name: str,
        specifier: Optional[specifiers.BaseSpecifier] = None,
        hashes: Optional[Hashes] = None,
    ) -> BestCandidateResult:
        """Find matches for the given project and specifier.

        :param specifier: An optional object implementing `filter`
            (e.g. `packaging.specifiers.SpecifierSet`) to filter applicable
            versions.

        :return: A `BestCandidateResult` instance.
        """
        candidates = self.find_all_candidates(project_name)
        candidate_evaluator = self.make_candidate_evaluator(
            project_name=project_name,
            specifier=specifier,
            hashes=hashes,
        )
        return candidate_evaluator.compute_best_candidate(candidates)

    def find_requirement(
        self, req: InstallRequirement, upgrade: bool
    ) -> Optional[InstallationCandidate]:
        """Try to find a Link matching req

        Expects req, an InstallRequirement and upgrade, a boolean
        Returns a InstallationCandidate if found,
        Raises DistributionNotFound or BestVersionAlreadyInstalled otherwise
        """
        hashes = req.hashes(trust_internet=False)
        best_candidate_result = self.find_best_candidate(
            req.name,
            specifier=req.specifier,
            hashes=hashes,
        )
        best_candidate = best_candidate_result.best_candidate

        installed_version: Optional[_BaseVersion] = None
        if req.satisfied_by is not None:
            installed_version = req.satisfied_by.version

        def _format_versions(cand_iter: Iterable[InstallationCandidate]) -> str:
            # This repeated parse_version and str() conversion is needed to
            # handle different vendoring sources from pip and pkg_resources.
            # If we stop using the pkg_resources provided specifier and start
            # using our own, we can drop the cast to str().
            return (
                ", ".join(
                    sorted(
                        {str(c.version) for c in cand_iter},
                        key=parse_version,
                    )
                )
                or "none"
            )

        if installed_version is None and best_candidate is None:
            logger.critical(
                "Could not find a version that satisfies the requirement %s "
                "(from versions: %s)",
                req,
                _format_versions(best_candidate_result.iter_all()),
            )

            raise DistributionNotFound(
                "No matching distribution found for {}".format(req)
            )

        def _should_install_candidate(
            candidate: Optional[InstallationCandidate],
        ) -> "TypeGuard[InstallationCandidate]":
            if installed_version is None:
                return True
            if best_candidate is None:
                return False
            return best_candidate.version > installed_version

        if not upgrade and installed_version is not None:
            if _should_install_candidate(best_candidate):
                logger.debug(
                    "Existing installed version (%s) satisfies requirement "
                    "(most up-to-date version is %s)",
                    installed_version,
                    best_candidate.version,
                )
            else:
                logger.debug(
                    "Existing installed version (%s) is most up-to-date and "
                    "satisfies requirement",
                    installed_version,
                )
            return None

        if _should_install_candidate(best_candidate):
            logger.debug(
                "Using version %s (newest of versions: %s)",
                best_candidate.version,
                _format_versions(best_candidate_result.iter_applicable()),
            )
            return best_candidate

        # We have an existing version, and its the best version
        logger.debug(
            "Installed version (%s) is most up-to-date (past versions: %s)",
            installed_version,
            _format_versions(best_candidate_result.iter_applicable()),
        )
        raise BestVersionAlreadyInstalled


def _find_name_version_sep(fragment: str, canonical_name: str) -> int:
    """Find the separator's index based on the package's canonical name.

    :param fragment: A <package>+<version> filename "fragment" (stem) or
        egg fragment.
    :param canonical_name: The package's canonical name.

    This function is needed since the canonicalized name does not necessarily
    have the same length as the egg info's name part. An example::

    >>> fragment = 'foo__bar-1.0'
    >>> canonical_name = 'foo-bar'
    >>> _find_name_version_sep(fragment, canonical_name)
    8
    """
    # Project name and version must be separated by one single dash. Find all
    # occurrences of dashes; if the string in front of it matches the canonical
    # name, this is the one separating the name and version parts.
    for i, c in enumerate(fragment):
        if c != "-":
            continue
        if canonicalize_name(fragment[:i]) == canonical_name:
            return i
    raise ValueError(f"{fragment} does not match {canonical_name}")


def _extract_version_from_fragment(fragment: str, canonical_name: str) -> Optional[str]:
    """Parse the version string from a <package>+<version> filename
    "fragment" (stem) or egg fragment.

    :param fragment: The string to parse. E.g. foo-2.1
    :param canonical_name: The canonicalized name of the package this
        belongs to.
    """
    try:
        version_start = _find_name_version_sep(fragment, canonical_name) + 1
    except ValueError:
        return None
    version = fragment[version_start:]
    if not version:
        return None
    return version
python3.12/site-packages/pip/_internal/self_outdated_check.py000064400000020272151732701460020216 0ustar00import datetime
import functools
import hashlib
import json
import logging
import optparse
import os.path
import sys
from dataclasses import dataclass
from typing import Any, Callable, Dict, Optional

from pip._vendor.packaging.version import parse as parse_version
from pip._vendor.rich.console import Group
from pip._vendor.rich.markup import escape
from pip._vendor.rich.text import Text

from pip._internal.index.collector import LinkCollector
from pip._internal.index.package_finder import PackageFinder
from pip._internal.metadata import get_default_environment
from pip._internal.metadata.base import DistributionVersion
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.network.session import PipSession
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.entrypoints import (
    get_best_invocation_for_this_pip,
    get_best_invocation_for_this_python,
)
from pip._internal.utils.filesystem import adjacent_tmp_file, check_path_owner, replace
from pip._internal.utils.misc import ensure_dir

_WEEK = datetime.timedelta(days=7)

logger = logging.getLogger(__name__)


def _get_statefile_name(key: str) -> str:
    key_bytes = key.encode()
    name = hashlib.sha224(key_bytes).hexdigest()
    return name


def _convert_date(isodate: str) -> datetime.datetime:
    """Convert an ISO format string to a date.

    Handles the format 2020-01-22T14:24:01Z (trailing Z)
    which is not supported by older versions of fromisoformat.
    """
    return datetime.datetime.fromisoformat(isodate.replace("Z", "+00:00"))


class SelfCheckState:
    def __init__(self, cache_dir: str) -> None:
        self._state: Dict[str, Any] = {}
        self._statefile_path = None

        # Try to load the existing state
        if cache_dir:
            self._statefile_path = os.path.join(
                cache_dir, "selfcheck", _get_statefile_name(self.key)
            )
            try:
                with open(self._statefile_path, encoding="utf-8") as statefile:
                    self._state = json.load(statefile)
            except (OSError, ValueError, KeyError):
                # Explicitly suppressing exceptions, since we don't want to
                # error out if the cache file is invalid.
                pass

    @property
    def key(self) -> str:
        return sys.prefix

    def get(self, current_time: datetime.datetime) -> Optional[str]:
        """Check if we have a not-outdated version loaded already."""
        if not self._state:
            return None

        if "last_check" not in self._state:
            return None

        if "pypi_version" not in self._state:
            return None

        # Determine if we need to refresh the state
        last_check = _convert_date(self._state["last_check"])
        time_since_last_check = current_time - last_check
        if time_since_last_check > _WEEK:
            return None

        return self._state["pypi_version"]

    def set(self, pypi_version: str, current_time: datetime.datetime) -> None:
        # If we do not have a path to cache in, don't bother saving.
        if not self._statefile_path:
            return

        # Check to make sure that we own the directory
        if not check_path_owner(os.path.dirname(self._statefile_path)):
            return

        # Now that we've ensured the directory is owned by this user, we'll go
        # ahead and make sure that all our directories are created.
        ensure_dir(os.path.dirname(self._statefile_path))

        state = {
            # Include the key so it's easy to tell which pip wrote the
            # file.
            "key": self.key,
            "last_check": current_time.isoformat(),
            "pypi_version": pypi_version,
        }

        text = json.dumps(state, sort_keys=True, separators=(",", ":"))

        with adjacent_tmp_file(self._statefile_path) as f:
            f.write(text.encode())

        try:
            # Since we have a prefix-specific state file, we can just
            # overwrite whatever is there, no need to check.
            replace(f.name, self._statefile_path)
        except OSError:
            # Best effort.
            pass


@dataclass
class UpgradePrompt:
    old: str
    new: str

    def __rich__(self) -> Group:
        if WINDOWS:
            pip_cmd = f"{get_best_invocation_for_this_python()} -m pip"
        else:
            pip_cmd = get_best_invocation_for_this_pip()

        notice = "[bold][[reset][blue]notice[reset][bold]][reset]"
        return Group(
            Text(),
            Text.from_markup(
                f"{notice} A new release of pip is available: "
                f"[red]{self.old}[reset] -> [green]{self.new}[reset]"
            ),
            Text.from_markup(
                f"{notice} To update, run: "
                f"[green]{escape(pip_cmd)} install --upgrade pip"
            ),
        )


def was_installed_by_pip(pkg: str) -> bool:
    """Checks whether pkg was installed by pip

    This is used not to display the upgrade message when pip is in fact
    installed by system package manager, such as dnf on Fedora.
    """
    dist = get_default_environment().get_distribution(pkg)
    return dist is not None and "pip" == dist.installer


def _get_current_remote_pip_version(
    session: PipSession, options: optparse.Values
) -> Optional[str]:
    # Lets use PackageFinder to see what the latest pip version is
    link_collector = LinkCollector.create(
        session,
        options=options,
        suppress_no_index=True,
    )

    # Pass allow_yanked=False so we don't suggest upgrading to a
    # yanked version.
    selection_prefs = SelectionPreferences(
        allow_yanked=False,
        allow_all_prereleases=False,  # Explicitly set to False
    )

    finder = PackageFinder.create(
        link_collector=link_collector,
        selection_prefs=selection_prefs,
    )
    best_candidate = finder.find_best_candidate("pip").best_candidate
    if best_candidate is None:
        return None

    return str(best_candidate.version)


def _self_version_check_logic(
    *,
    state: SelfCheckState,
    current_time: datetime.datetime,
    local_version: DistributionVersion,
    get_remote_version: Callable[[], Optional[str]],
) -> Optional[UpgradePrompt]:
    remote_version_str = state.get(current_time)
    if remote_version_str is None:
        remote_version_str = get_remote_version()
        if remote_version_str is None:
            logger.debug("No remote pip version found")
            return None
        state.set(remote_version_str, current_time)

    remote_version = parse_version(remote_version_str)
    logger.debug("Remote version of pip: %s", remote_version)
    logger.debug("Local version of pip:  %s", local_version)

    pip_installed_by_pip = was_installed_by_pip("pip")
    logger.debug("Was pip installed by pip? %s", pip_installed_by_pip)
    if not pip_installed_by_pip:
        return None  # Only suggest upgrade if pip is installed by pip.

    local_version_is_older = (
        local_version < remote_version
        and local_version.base_version != remote_version.base_version
    )
    if local_version_is_older:
        return UpgradePrompt(old=str(local_version), new=remote_version_str)

    return None


def pip_self_version_check(session: PipSession, options: optparse.Values) -> None:
    """Check for an update for pip.

    Limit the frequency of checks to once per week. State is stored either in
    the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix
    of the pip script path.
    """
    installed_dist = get_default_environment().get_distribution("pip")
    if not installed_dist:
        return

    try:
        upgrade_prompt = _self_version_check_logic(
            state=SelfCheckState(cache_dir=options.cache_dir),
            current_time=datetime.datetime.now(datetime.timezone.utc),
            local_version=installed_dist.version,
            get_remote_version=functools.partial(
                _get_current_remote_pip_version, session, options
            ),
        )
        if upgrade_prompt is not None:
            logger.warning("%s", upgrade_prompt, extra={"rich": True})
    except Exception:
        logger.warning("There was an error checking the latest version of pip.")
        logger.debug("See below for error", exc_info=True)
python3.12/site-packages/pip/_internal/cli/spinners.py000064400000011776151732701460016660 0ustar00import contextlib
import itertools
import logging
import sys
import time
from typing import IO, Generator, Optional

from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.logging import get_indentation

logger = logging.getLogger(__name__)


class SpinnerInterface:
    def spin(self) -> None:
        raise NotImplementedError()

    def finish(self, final_status: str) -> None:
        raise NotImplementedError()


class InteractiveSpinner(SpinnerInterface):
    def __init__(
        self,
        message: str,
        file: Optional[IO[str]] = None,
        spin_chars: str = "-\\|/",
        # Empirically, 8 updates/second looks nice
        min_update_interval_seconds: float = 0.125,
    ):
        self._message = message
        if file is None:
            file = sys.stdout
        self._file = file
        self._rate_limiter = RateLimiter(min_update_interval_seconds)
        self._finished = False

        self._spin_cycle = itertools.cycle(spin_chars)

        self._file.write(" " * get_indentation() + self._message + " ... ")
        self._width = 0

    def _write(self, status: str) -> None:
        assert not self._finished
        # Erase what we wrote before by backspacing to the beginning, writing
        # spaces to overwrite the old text, and then backspacing again
        backup = "\b" * self._width
        self._file.write(backup + " " * self._width + backup)
        # Now we have a blank slate to add our status
        self._file.write(status)
        self._width = len(status)
        self._file.flush()
        self._rate_limiter.reset()

    def spin(self) -> None:
        if self._finished:
            return
        if not self._rate_limiter.ready():
            return
        self._write(next(self._spin_cycle))

    def finish(self, final_status: str) -> None:
        if self._finished:
            return
        self._write(final_status)
        self._file.write("\n")
        self._file.flush()
        self._finished = True


# Used for dumb terminals, non-interactive installs (no tty), etc.
# We still print updates occasionally (once every 60 seconds by default) to
# act as a keep-alive for systems like Travis-CI that take lack-of-output as
# an indication that a task has frozen.
class NonInteractiveSpinner(SpinnerInterface):
    def __init__(self, message: str, min_update_interval_seconds: float = 60.0) -> None:
        self._message = message
        self._finished = False
        self._rate_limiter = RateLimiter(min_update_interval_seconds)
        self._update("started")

    def _update(self, status: str) -> None:
        assert not self._finished
        self._rate_limiter.reset()
        logger.info("%s: %s", self._message, status)

    def spin(self) -> None:
        if self._finished:
            return
        if not self._rate_limiter.ready():
            return
        self._update("still running...")

    def finish(self, final_status: str) -> None:
        if self._finished:
            return
        self._update(f"finished with status '{final_status}'")
        self._finished = True


class RateLimiter:
    def __init__(self, min_update_interval_seconds: float) -> None:
        self._min_update_interval_seconds = min_update_interval_seconds
        self._last_update: float = 0

    def ready(self) -> bool:
        now = time.time()
        delta = now - self._last_update
        return delta >= self._min_update_interval_seconds

    def reset(self) -> None:
        self._last_update = time.time()


@contextlib.contextmanager
def open_spinner(message: str) -> Generator[SpinnerInterface, None, None]:
    # Interactive spinner goes directly to sys.stdout rather than being routed
    # through the logging system, but it acts like it has level INFO,
    # i.e. it's only displayed if we're at level INFO or better.
    # Non-interactive spinner goes through the logging system, so it is always
    # in sync with logging configuration.
    if sys.stdout.isatty() and logger.getEffectiveLevel() <= logging.INFO:
        spinner: SpinnerInterface = InteractiveSpinner(message)
    else:
        spinner = NonInteractiveSpinner(message)
    try:
        with hidden_cursor(sys.stdout):
            yield spinner
    except KeyboardInterrupt:
        spinner.finish("canceled")
        raise
    except Exception:
        spinner.finish("error")
        raise
    else:
        spinner.finish("done")


HIDE_CURSOR = "\x1b[?25l"
SHOW_CURSOR = "\x1b[?25h"


@contextlib.contextmanager
def hidden_cursor(file: IO[str]) -> Generator[None, None, None]:
    # The Windows terminal does not support the hide/show cursor ANSI codes,
    # even via colorama. So don't even try.
    if WINDOWS:
        yield
    # We don't want to clutter the output with control characters if we're
    # writing to a file, or if the user is running with --quiet.
    # See https://github.com/pypa/pip/issues/3418
    elif not file.isatty() or logger.getEffectiveLevel() > logging.INFO:
        yield
    else:
        file.write(HIDE_CURSOR)
        try:
            yield
        finally:
            file.write(SHOW_CURSOR)
python3.12/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-312.pyc000064400000000505151732701460023103 0ustar00�

R`i����dZy)zGSubpackage containing all of pip's command line interface related code
N)�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/__init__.py�<module>rs
��rpython3.12/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-312.pyc000064400000044646151732701460023647 0ustar00�

R`i�G��8�dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZmZddlmZddlmZdd
lmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(m)Z)m*Z*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5m6Z6m7Z7ddl8m9Z9e	rddl:m;Z;ejxe=�Z>dedfd�Z?Gd�de�Z@Gd�d ee@�ZAe7j�e7j�e7j�gZEd&d!�ZFd"e
de
fd#�ZGGd$�d%eA�ZHy)'aContains the Command base classes that depend on PipSession.

The classes in this module are in a separate module so the commands not
needing download / PackageFinder capability don't unnecessarily import the
PackageFinder machinery and all its vendored dependencies, etc.
�N)�partial)�Values)�
TYPE_CHECKING�Any�List�Optional�Tuple)�
WheelCache)�
cmdoptions)�Command)�CommandContextMixIn)�CommandError�PreviousBuildDirError)�
LinkCollector)�
PackageFinder)�SelectionPreferences)�TargetPython)�
PipSession)�BuildTracker)�RequirementPreparer)�install_req_from_editable�install_req_from_line�#install_req_from_parsed_requirement�install_req_from_req_string)�parse_requirements)�InstallRequirement)�BaseResolver)�pip_self_version_check)�
TempDirectory�TempDirectoryTypeRegistry�
tempdir_kinds)�running_under_virtualenv)�
SSLContext�returnr#c��tjdkrtd��	ddl}	ddlm}|j|j�S#t$rt
j
d�YywxYw#t$r}td|����d}~wwxYw)N)��
z9The truststore feature is only available for Python 3.10+rz1Disabling truststore since ssl support is missing)�
truststorez'The truststore feature is unavailable: )�sys�version_infor�ssl�ImportError�logger�warning�pip._vendorr(r#�PROTOCOL_TLS_CLIENT)r+r(�es   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/req_command.py�_create_truststore_ssl_contextr32s���
���'�!��V�W�W���
J�*�� � ��!8�!8�9�9�������J�K�����J��D�Q�C�H�I�I��J�s(�A�A*�A'�&A'�*	B�3B�Bc���eZdZdZd�fd�Zededeee	fd��Z
dedefd�Z			ddedee
dee
d	edef
d
�Z�xZS)
�SessionCommandMixinzE
    A class mixin for command classes needing _build_session().
    r$c�0��t�|��d|_y�N)�super�__init__�_session)�self�	__class__s �r2r9zSessionCommandMixin.__init__Js���
����.2��
��optionsc��g}t|dd�s t|dd�}|r|j|�t|dd�}|r|j|�|xsdS)z7Return a list of index urls from user-provided options.�no_indexF�	index_urlN�extra_index_urls)�getattr�append�extend)�clsr>�
index_urls�url�urlss     r2�_get_index_urlsz#SessionCommandMixin._get_index_urlsNs_���
��w�
�E�2��'�;��5�C���!�!�#�&��w� 2�D�9������d�#��!�T�!r=c��|j�3|j|j|��|_|j�J�|jS)zGet a default-managed session.)r:�
enter_context�_build_session)r;r>s  r2�get_default_sessionz'SessionCommandMixin.get_default_session\sE���=�=� � �.�.�t�/B�/B�7�/K�L�D�M��=�=�,�,�,��}�}�r=�retries�timeout�fallback_to_certific���|j}|r!tjj|�sJ�d|jvr	t�}nd}t|r tjj|d�nd|�|n|j|j|j|�|��}|jr|j|_
|jr|j|_|js|r|�|n|j|_|j r|j |j d�|_|j$|j&_|j*|j&_|S#t$r	|s�d}Y��*wxYw)Nr(zhttp-v2)�cacherO�
trusted_hostsrG�ssl_context)�http�https)�	cache_dir�os�path�isabs�features_enabledr3�	Exceptionr�joinrOrTrJ�cert�verify�client_certrP�proxy�proxies�no_input�auth�	prompting�keyring_provider)r;r>rOrPrQrXrU�sessions        r2rMz"SessionCommandMixin._build_sessionfsE���%�%�	�����
�
�i� 8�8�8��7�3�3�3�
#�<�>���K��8A�"�'�'�,�,�y�)�4�t�&�2�G����!�/�/��+�+�G�4�#�
���<�<�$�\�\�G�N����"�.�.�G�L��?�?�g�)0�)<�g�'�/�/�G�O��=�=��
�
� ����G�O�&-�%5�%5�!5�����(/�(@�(@����%����M�
#�*��"��
#�s�
E%�%E7�6E7�r$N)NNF)�__name__�
__module__�__qualname__�__doc__r9�classmethodrrr�strrJrrN�int�boolrM�
__classcell__�r<s@r2r5r5Ds�����3��"�f�"��$�s�)�1D�"��"��6��j��"&�!%�$)�3��3��#��3��#��	3�
"�3�
�
3r=r5c� �eZdZdZdeddfd�Zy)�IndexGroupCommandz�
    Abstract base class for commands with the index_group options.

    This also corresponds to the commands that permit the pip version check.
    r>r$Nc���t|d�sJ�|js|jry|j|dt	d|j
�d��}|5t
||�ddd�y#1swYyxYw)z�
        Do the pip version check if not disabled.

        This overrides the default behavior of not doing the check.
        r@Nr�T)rOrPrQ)�hasattr�disable_pip_version_checkr@rM�minrPr)r;r>rhs   r2�handle_pip_version_checkz*IndexGroupCommand.handle_pip_version_check�sq���w�
�+�+�+��,�,��0@�0@���%�%�����7�?�?�+�
!%�&�	
���"�7�G�4��W�W�s�
A)�)A2)rjrkrlrmrr{�r=r2ruru�s���5��5�4�5r=ruc���t�ryttd�sytjdk(stjdk(rytj
�dk7rytjd�y)z�Output a warning for sudo users on Unix.

    In a virtual environment, sudo pip still writes to virtualenv.
    On Windows, users may run pip as Administrator without issues.
    This warning only applies to Unix root users outside of virtualenv.
    N�getuid�win32�cygwinrz�Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv)r"rxrYr)�platformr~r-r.r|r=r2�warn_if_run_as_rootr��sX�� �!���2�x� ���|�|�w��#�,�,�(�":��	�y�y�{�a���
�N�N�	,�r=�funcc	�|���dtddfd��dtdtdttdt
tf��fd�}|S)	zNDecorator for common logic related to managing temporary
    directories.
    �registryr$Nc�>�tD]}|j|d��y)NF)�KEEPABLE_TEMPDIR_TYPES�
set_delete)r��ts  r2�configure_tempdir_registryz0with_cleanup.<locals>.configure_tempdir_registry�s��'�A�����5�)�(r=r;r>�argsc���|j�J�|jr�|j�	�|||�S#t$r�|j��wxYwr7)�tempdir_registry�no_cleanr)r;r>r�r�r�s   ��r2�wrapperzwith_cleanup.<locals>.wrapper�sd����$�$�0�0�0����&�t�'<�'<�=�	���g�t�,�,��$�	�
'�t�'<�'<�=��	�s	�	9�A)r �RequirementCommandrrrrrp)r�r�r�s` @r2�with_cleanupr��sK���
*�-F�*�4�*�� ��+1��9=�c���	�#��� �Nr=c�h��eZdZdededdf�fd�Zededefd��Ze			dde
ded	ed
ede
ded
eededefd��Ze									ddede
dedeededededededeedeeedfdefd��Zdeedede
d
edeef
d�Zede
ddfd��Z		d ded
edeedeede
f
d�Z�xZS)!r�r��kwr$Nc�~��t�|�|i|��|jjt	j
��yr7)r8r9�cmd_opts�
add_optionrr�)r;r�r�r<s   �r2r9zRequirementCommand.__init__s0���
���$�%�"�%��
�
� � ��!4�!4�!6�7r=r>c�"�d|jvryy)zEDetermines which resolver should be used, based on the given options.zlegacy-resolver�legacy�
resolvelib)�deprecated_features_enabled�r>s r2�determine_resolver_variantz-RequirementCommand.determine_resolver_variants���� C� C�C��r=�temp_build_dir�
build_trackerrh�finder�
use_user_site�download_dir�	verbosityc	��|j}	|	�J�d}
|j|�}|dk(r&d|jv}|r=tj	d�n'd}
d}d|jvrtj	d�t|	|j||j|j|||j||j||||
��S)zQ
        Create a RequirementPreparer instance for the given parameters.
        Fr�z	fast-depsz�pip is using lazily downloaded wheels using HTTP range requests to obtain dependency information. This experimental feature is enabled through --use-feature=fast-deps and it is not ready for production.Tz;fast-deps has no effect when used with the legacy resolver.)�	build_dir�src_dirr��build_isolation�check_build_depsr�rh�progress_barr��require_hashesr��
lazy_wheelr��legacy_resolver)rZr�r\r-r.rr�r�r�r�r�)
rFr�r>r�rhr�r�r�r��temp_build_dir_pathr��resolver_variantr�s
             r2�make_requirement_preparerz,RequirementCommand.make_requirement_preparers���-�1�1��"�.�.�.����9�9�'�B���|�+�$��(@�(@�@�J�����"��#�O��J��g�6�6�6����Q��#�)��O�O�%�#�3�3�$�5�5�'�� �-�-��"�1�1�'�!��+�
�	
r=�preparer�wheel_cache�ignore_installed�ignore_requires_python�force_reinstall�upgrade_strategy�
use_pep517�py_version_info.c
��tt|j|
��}|j|�}
|
dk(rRddl}|j
jjjj||||||j||||	|��Sddl}|j
jjjj||||||j||||	|��S)zF
        Create a Resolver instance for the given parameters.
        )�isolatedr�r�rN)r�r�r��make_install_reqr��ignore_dependenciesr�r�r�r�r�)
rr�
isolated_moder��,pip._internal.resolution.resolvelib.resolver�	_internal�
resolutionr��resolver�Resolverr��(pip._internal.resolution.legacy.resolverr�)rFr�r�r>r�r�r�r�r�r�r�r�r�r��pips               r2�
make_resolverz RequirementCommand.make_resolverEs���$#�'��*�*�!�
��
�9�9�'�B���|�+�?��=�=�+�+�6�6�?�?�H�H�!��'�!1�+�$+�$?�$?�!1�'=� /�!1� /�I��
�	8��}�}�'�'�.�.�7�7�@�@���#�-�'� '� ;� ;�-�#9�+�-�+�A�
�	
r=c
�*�g}|jD]@}t|d|||��D]+}t||jd��}|j	|��-�B|D]C}	t|	d|j|jdt|dd���}|j	|��E|jD]B}	t|	d|j|jt|dd���}|j	|��D|jD]r}t||||�	�D]^}t||j|jd|jr|jjd�nd�
�}|j	|��`�ttd�|D��rd|_|s�|js�|jstd|ji}
|j r?t#d
j$dit'|
dj)|j �������t#dj$di|
����|S)zS
        Parse command-line arguments into the corresponding requirements.
        T)�
constraintr�r>rhF)r��
user_suppliedN�config_settings)�
comes_fromr�r�r�r�)r�r�r�r�)r�r>rh)r�r�r�r�c3�4K�|]}|j���y�wr7)�has_hash_options)�.0�reqs  r2�	<genexpr>z6RequirementCommand.get_requirements.<locals>.<genexpr>�s����<�|��s�#�#�|�s��namezXYou must give at least one requirement to {name} (maybe you meant "pip {name} {links}"?)� )�linkszHYou must give at least one requirement to {name} (see "pip help {name}")r|)�constraintsrrr�rDrr�rC�	editablesr�requirementsr>�get�anyr�r��
find_linksr�format�dictr^)r;r�r>r�rhr��filename�
parsed_req�
req_to_addr��optss           r2�get_requirementsz#RequirementCommand.get_requirements�s9��24���+�+�H�0�������
�A��$�2�2�"'��
�
�#�#�J�/��,��C�.��� �.�.�"�-�-�"� '��1B�D� I�
�J�
���
�+���$�$�C�2��"� �.�.�"�-�-� '��1B�D� I��J�
���
�+�%� �,�,�H�0����'��
�A��$�2�2�&�1�1�"&�!�)�)�%/�$6�$6�$:�$:�;L�$M���
��#�#�J�/��-� �<�|�<�<�%)�G�"���)�)�W�-A�-A��D�I�I�&�D��!�!�"�E�>�>D�f���t�3�8�8�G�4F�4F�+G�H����#�5�.�.4�f�=�7;�=���
�r=c�l�|j}|j�}|rtj|�yy)zE
        Trace basic information about the provided objects.
        N)�search_scope�get_formatted_locationsr-�info)r�r��	locationss   r2�trace_basic_infoz#RequirementCommand.trace_basic_info�s1���*�*�� �8�8�:�	���K�K�	�"�r=�
target_pythonc��tj||��}td|j|j|j
|��}t
j|||��S)z�
        Create a package finder appropriate to this requirement command.

        :param ignore_requires_python: Whether to ignore incompatible
            "Requires-Python" values in links. Defaults to False.
        r�T)�allow_yanked�format_control�allow_all_prereleases�
prefer_binaryr�)�link_collector�selection_prefsr�)r�createrr��prer�r)r;r>rhr�r�r�r�s       r2�_build_package_finderz(RequirementCommand._build_package_finder�s]��'�-�-�g�w�G��.��"�1�1�")�+�+�!�/�/�#9�
���#�#�)�+�'�
�	
r=)Nr)NFTFFzto-satisfy-onlyNN)NN)rjrkrlrr9�staticmethodrror�rnrrrrrqrrprr�r
r	rr�rrr�r�rr�rrrss@r2r�r�s!���8�c�8��8��8�
��F��s�����'+��4
�%�4
��4
�$�	4
�
�4
��
4
��4
��s�m�4
��4
�
�4
��4
�l�-1�#�!%�',� %� 1�%)�59�8
�%�8
��8
��	8
�
�j�)�8
��
8
��8
�!%�8
��8
��8
��T�N�8
�"�%��S��/�2�8
�
�8
��8
�tR��3�i�R��R��	R�
�R�
� �	!�
R�h�#��#�4�#��#�15�15�
��
��
� ��-�	
�
!)���
�
�

r=r�ri)Irm�loggingrYr)�	functoolsr�optparser�typingrrrrr	�pip._internal.cacher
�pip._internal.clir�pip._internal.cli.base_commandr�!pip._internal.cli.command_contextr
�pip._internal.exceptionsrr�pip._internal.index.collectorr�"pip._internal.index.package_finderr�$pip._internal.models.selection_prefsr�"pip._internal.models.target_pythonr�pip._internal.network.sessionr�,pip._internal.operations.build.build_trackerr� pip._internal.operations.preparer�pip._internal.req.constructorsrrrr�pip._internal.req.req_filer�pip._internal.req.req_installr�pip._internal.resolution.baser�!pip._internal.self_outdated_checkr�pip._internal.utils.temp_dirrr r!�pip._internal.utils.virtualenvr"r+r#�	getLoggerrjr-r3r5ru�	BUILD_ENV�EPHEM_WHEEL_CACHE�	REQ_BUILDr�r�r�r�r|r=r2�<module>rs����	�
���<�<�*�(�2�A�H�7�<�E�;�4�E�@���:�<�6�D���
D���	��	�	�8�	$��:���(>�:�$U�-�U�p 5��!4� 5�H����#�#�������<�s��s��8y
�*�y
r=python3.12/site-packages/pip/_internal/cli/__pycache__/parser.cpython-312.pyc000064400000035357151732701460022655 0ustar00�

R`i1*��(�dZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZddlmZmZddlmZmZej,e�ZGd�d	ej2�ZGd
�de�ZGd�d
ej8�ZGd�de�Zy)zBase option parser setup�N)�suppress)�Any�Dict�	Generator�List�Tuple)�
UNKNOWN_ERROR)�
Configuration�ConfigurationError)�redact_auth_from_url�	strtoboolc	����eZdZdZdededdf�fd�Zdejdefd�Z		ddejd	ed
edefd�Z
dedefd
�Zdedefd�Zdedefd�Z
dedefd�Zdededefd�Z�xZS)�PrettyHelpFormatterz4A prettier/less verbose help formatter for optparse.�args�kwargs�returnNc�r��d|d<d|d<tj�ddz
|d<t�|�|i|��y)N��max_help_position��indent_incrementr��width)�shutil�get_terminal_size�super�__init__)�selfrr�	__class__s   ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/parser.pyrzPrettyHelpFormatter.__init__sG���&(��"�#�%&��!�"� �2�2�4�Q�7�!�;��w��
���$�)�&�)��optionc�$�|j|�S�N)�_format_option_strings)rr"s  r �format_option_stringsz)PrettyHelpFormatter.format_option_stringss���*�*�6�2�2r!�mvarfmt�optsepc��g}|jr|j|jd�|jr|j|jd�t|�dkDr|j	d|�|j�rd|j�J�|jxs|jj�}|j|j|j���dj|�S)z�
        Return a comma-separated list of option strings and metavars.

        :param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
        :param mvarfmt: metavar format string
        :param optsep:  separator
        rr�)�_short_opts�append�
_long_opts�len�insert�takes_value�dest�metavar�lower�format�join)rr"r'r(�optsr2s      r r%z*PrettyHelpFormatter._format_option_stringss���������K�K��*�*�1�-�.�����K�K��)�)�!�,�-��t�9�q�=��K�K��6�"������;�;�*�*�*��n�n�;����(9�(9�(;�G��K�K����w�}�}��7�8��w�w�t�}�r!�headingc��|dk(ry|dzS)N�Optionsr*�:
�)rr7s  r �format_headingz"PrettyHelpFormatter.format_heading9s���i������r!�usagec�n�dj|jtj|�d��}|S)zz
        Ensure there is only one newline between usage and the first heading
        if there is no description.
        z
Usage: {}
�  )r4�indent_lines�textwrap�dedent)rr=�msgs   r �format_usagez PrettyHelpFormatter.format_usage>s/��
�$�$�T�%6�%6�x���u�7M�t�%T�U���
r!�descriptionc���|rkt|jd�rd}nd}|jd�}|j�}|j	tj|�d�}|�d|�d�}|Sy)N�main�Commands�Description�
r?r:r*)�hasattr�parser�lstrip�rstripr@rArB)rrE�labels   r �format_descriptionz&PrettyHelpFormatter.format_descriptionFsq����t�{�{�F�+�"��%��%�,�,�T�2�K�%�,�,�.�K��+�+�H�O�O�K�,H�$�O�K�"�G�3�{�m�2�6�K���r!�epilogc��|r|Sy)Nr*r;)rrQs  r �
format_epilogz!PrettyHelpFormatter.format_epilogXs
����M�r!�text�indentc�p�|jd�D�cgc]}||z��	}}dj|�Scc}w�NrJ)�splitr5)rrTrU�line�	new_liness     r r@z PrettyHelpFormatter.indent_lines_s:��/3�z�z�$�/?�@�/?�t�V�d�]�/?�	�@��y�y��#�#��As�3)z <{}>z, )�__name__�
__module__�__qualname__�__doc__rr�optparse�Option�strr&r%r<rDrPrSr@�
__classcell__�rs@r rrs����>�*�c�*�S�*�T�*�3�H�O�O�3��3�NR���o�o��03��GJ��	��4�c��c��
�#��#���c��c��$�C��C��$��$�c�$�c�$r!rc�@��eZdZdZdej
def�fd�Z�xZS)�UpdatingDefaultsHelpFormatterz�Custom help formatter for use in ConfigOptionParser.

    This is updates the defaults before expanding them, allowing
    them to show up correctly in the help listing.

    Also redact auth from url type options
    r"rc���d}|j��t|jt�sJ�|jj|jj�|j
�J�|jjj
|j
�}t�|�!|�}|rV|jdk(rGt|t�r|g}t|t�sg}|D]}|j|t|��}�|S)N�URL)rL�
isinstance�ConfigOptionParser�_update_defaults�defaultsr1�getr�expand_defaultr2ra�list�replacer)rr"�default_values�	help_text�valrs     �r rmz,UpdatingDefaultsHelpFormatter.expand_defaultms�������;�;�"��d�k�k�+=�>�>�>��K�K�(�(����)=�)=�>��;�;�*�*�*�!�[�[�1�1�5�5�f�k�k�B�N��G�*�6�2�	��f�n�n��5��.�#�.�"0�!1���n�d�3�!#��%��%�-�-�c�3G��3L�M�	�&��r!)	r[r\r]r^r_r`rarmrbrcs@r rereds$�����X�_�_����r!rec�h�eZdZdedededejfd�Zede	ejfd��Zy)�CustomOptionParser�idxrrrc��|j|i|��}|jj�|jj||�|S)z*Insert an OptionGroup at a given position.)�add_option_group�
option_groups�popr/)rrurr�groups     r �insert_option_groupz&CustomOptionParser.insert_option_group�sH��&��%�%�t�6�v�6������� ����!�!�#�u�-��r!c�|�|jdd}|jD]}|j|j��|S)z<Get a list of all options, including those in option groups.N)�option_listrx�extend)r�res�is   r �option_list_allz"CustomOptionParser.option_list_all�s;�����q�!���#�#�A��J�J�q�}�}�%�$��
r!N)r[r\r]�intrr_�OptionGroupr{�propertyrr`r�r;r!r rtrt�sQ��	��	�"�	�.1�	�	�	�	�	����h�o�o�!6���r!rtc����eZdZdZdd�dededededd	f
�fd
�Zdejded
edefd�Z
deeeefd	d	ffd�Z
deeefdeeeffd�Zdej fd�Zdedd	fd�Z�xZS)rizsCustom option parser which updates its defaults by checking the
    configuration files and environmental variablesF)�isolatedr�namer�rrNc�n��||_t|�|_|jsJ�t�|�|i|��yr$)r�r
�configrr)rr�r�rrrs     �r rzConfigOptionParser.__init__�s6�����	�#�H�-����y�y��y�
���$�)�&�)r!r"�keyrrc��	|j||�S#tj$r-}td|���t	j
d�Yd}~yd}~wwxYw)Nz(An error occurred during configuration: �)�check_valuer_�OptionValueError�print�sys�exit)rr"r�rr�excs     r �
check_defaultz ConfigOptionParser.check_default�sM��	��%�%�c�3�/�/���(�(�	��<�S�E�B�C��H�H�Q�K�K��	�s��A�#A�Ac#�^K�d|jdg}|D�cic]}|g��}}|jj�D]N\}}|stj	d|��|jdd�\}}||vs�9||j
||f��P|D]}||D]\}}||f���
�ycc}w�w)N�globalz:env:z7Ignoring configuration key '%s' as it's value is empty.�.r)r�r��items�logger�debugrXr,)r�override_orderr��
section_items�section_keyrr�sectionr�s        r � _get_ordered_configuration_itemsz3ConfigOptionParser._get_ordered_configuration_items�s�����#�D�I�I�w�7��"0�;
�!/��D�"�H��	�;
�!%��� 1� 1� 3��K������M����&�,�,�S�!�4�L�G�S��.�(��g�&�-�-�s�C�j�9�!4�&�G�)�'�2���S��3�h��3�&��#;
�s�B-�
B(�AB-�58B-rkc	�
�tj|j�|_t	�}|j�D�]�\}}|j
d|z�}|��|j�J�|jdvr	t|�}�nt|jdk(r~tt�5t|�}ddd�tt�5t|�}ddd�t|t�r|dk�r	|jdj||��n�|jdk(r1|j!�}|D�cgc]}|j#|||���}}n�|jd	k(r�|j$�J�|j'|j�|j)�}|j+||�}|j,xsd
}|j.xsi}	|j$||||g|��i|	��n|j#|||�}|||j<���|D]}t1|j|�||<�d|_|S#t$r$|jdj||��Y�gwxYw#1swY���xYw#1swY���xYwcc}w)z�Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists).z--N)�
store_true�store_falsezm{} is not a valid value for {} option, please specify a boolean value like yes/no, true/false or 1/0 instead.�countrz�{} is not a valid value for {} option, please instead specify either a non-negative integer or a boolean value like yes/no or false/true which is equivalent to 1/0.r,�callbackr;)r_�Valuesrk�values�setr��
get_optionr1�actionr
�
ValueError�errorr4rr�rhrXr�r��add�get_opt_string�
convert_value�
callback_args�callback_kwargs�getattr)
rrk�	late_evalr�rrr"�v�opt_strrrs
          r rjz#ConfigOptionParser._update_defaults�sA���o�o�d�m�m�4����E�	��=�=�?�H�C���_�_�T�C�Z�0�F�
�~���;�;�*�*�*��}�}� =�=��#�C�.�C����'�)��j�)�#�C�.�C�*��j�)��c�(�C�*�!�#�s�+�s�Q�w��J�J�6�7=�f�S�#�6F�	����(�*��i�i�k��CF�G�3�a�t�)�)�&�#�q�9�3��G����*�,����2�2�2��
�
�f�k�k�*� �/�/�1���*�*�7�C�8���+�+�1�r���/�/�5�2���������d�L�T�L�V�L��(�(���c�:��$'�H�V�[�[�!�a@�d�C�#�D�K�K��5�H�S�M��������M"���J�J�5�5;�V�C��5E����*�)��)�)��Hs0�:H6�%I&�I3�7J�6*I#�"I#�&I0	�3I=	c�p�|jstj|j�S	|jj�|j|jj��}|j�D]k}|j�J�|j|j�}t|t�s�=|j!�}|j#||�||j<�mtj|�S#t$r)}|jtt|��Yd}~��d}~wwxYw)z�Overriding to make updating the defaults after instantiation of
        the option parser possible, _update_defaults() does the dirty work.N)�process_default_valuesr_r�rkr��loadrr�r	rarj�copy�_get_all_optionsr1rlrhr�r�)r�errrkr"�defaultr�s      r �get_default_valuesz%ConfigOptionParser.get_default_valuess����*�*��?�?�4�=�=�1�1�	/��K�K�����(�(����);�);�)=�>���+�+�-�F��;�;�*�*�*��l�l�6�;�;�/�G��'�3�'� �/�/�1��(.�(:�(:�7�G�(L�����%�.����x�(�(��"�	/��I�I�m�S��X�.�.��	/�s�D�	D5�D0�0D5rCc�t�|jtj�|jt|�d��yrW)�print_usager��stderrr�r	)rrCs  r r�zConfigOptionParser.error$s(��������$��	�	�-�C�5���,r!)r[r\r]r^rra�boolrr_r`r�rrr�rrjr�r�r�rbrcs@r riri�s����7��	*��*��*��	*�
�*�
�
*��H�O�O��#��C��C���	�5��c��?�D�$�.�	/��8>��c�3�h��>�D��c��N�>�@)�H�O�O�)�,-��-��-r!ri)r^�loggingr_rr�rA�
contextlibr�typingrrrrr�pip._internal.cli.status_codesr	�pip._internal.configurationr
r�pip._internal.utils.miscrr
�	getLoggerr[r��IndentedHelpFormatterrre�OptionParserrtrir;r!r �<module>r�s�����
�
���4�4�8�I�D�	��	�	�8�	$��O$�(�8�8�O$�d�$7��@��.�.��,L-�+�L-r!python3.12/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc000064400000000646151732701460024052 0ustar00�

R`it���dZdZdZdZdZdZy)������N)�SUCCESS�ERROR�
UNKNOWN_ERROR�VIRTUALENV_NOT_FOUND�PREVIOUS_BUILD_DIR_ERROR�NO_MATCHES_FOUND����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/status_codes.py�<module>rs&��
��	���
������rpython3.12/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-312.pyc000064400000024373151732701460023765 0ustar00�

R`i"��l�dZddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZddlmZddlmZddlmZddlmZmZdd	lmZmZmZmZdd
lmZmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(m)Z)dd
l*m+Z+m,Z,ddl-m.Z/ddl-m0Z0m1Z1ddl2m3Z3dgZ4ejje6�Z7Gd�de�Z8y)z(Base Command class, and related routines�N)�Values)�Any�Callable�List�Optional�Tuple)�	traceback)�
cmdoptions)�CommandContextMixIn)�ConfigOptionParser�UpdatingDefaultsHelpFormatter)�ERROR�PREVIOUS_BUILD_DIR_ERROR�
UNKNOWN_ERROR�VIRTUALENV_NOT_FOUND)�
BadCommand�CommandError�DiagnosticPipError�InstallationError�NetworkConnectionError�PreviousBuildDirError�UninstallationError)�check_path_owner)�BrokenStdoutLoggingError�
setup_logging)�get_prog�normalize_path)�TempDirectoryTypeRegistry)�global_tempdir_manager�tempdir_registry)�running_under_virtualenv�Commandc	����eZdZUdZeed<dZeed<ddedededd	f�fd
�
Zdd�Z	de
dd	fd
�Zde
deede
fd�Zdeedee
eeffd�Zdeede
fd�Zdeede
fd�Z�xZS)r"��usageF�ignore_require_venv�name�summary�isolated�returnNc	���t�|��||_||_t	|j
t
��d|��t�d||j|��|_	d|_
|jj��d�}tj|j|�|_tj tj"|j�}|jj%|�|j'�y)N� F)r%�prog�	formatter�add_help_optionr'�descriptionr)z Options)�super�__init__r'r(rr%rr
�__doc__�parserr �
capitalize�optparse�OptionGroup�cmd_optsr
�make_option_group�
general_group�add_option_group�add_options)�selfr'r(r)�
optgroup_name�gen_opts�	__class__s      ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/base_command.pyr2zCommand.__init__1s����
������	����(��*�*��J�<�q���'�3�5�!������
���<@��� �9�9�/�/�1�2�(�;�
� �,�,�T�[�[�-�H��
��/�/��$�$��K�K�
��	
���$�$�X�.�����c��y�N�)r=s rAr<zCommand.add_optionsOs��rB�optionsc� �t|d�rJ�y)zf
        This is a no-op so that commands by default do not do the pip version
        check.
        �no_indexN)�hasattr)r=rFs  rA�handle_pip_version_checkz Command.handle_pip_version_checkRs���7�J�/�/�/�/rB�argsc��t�rD)�NotImplementedError)r=rFrKs   rA�runzCommand.run[s��!�!rBc�8�|jj|�SrD)r4�
parse_args�r=rKs  rArPzCommand.parse_args^s���{�{�%�%�d�+�+rBc��	|j�5|j|�cddd�tj�S#1swYnxYw	tj�y#tj�wxYwrD)�main_context�_main�logging�shutdownrQs  rA�mainzCommand.mainbs\��	��"�"�$��z�z�$�'�%�$�
����%�$��$�
�����G����s!�A#�A�	A#�A
�A#�#A9c����|jt��|_|jt��|j|�\}}|j|j
z
|_t|j|j|j���t|j�ttj�z}|r.tjddj!t#|���|j$r@dt&j(vr.tj+d�t-j.t0�|j2rdt&j(d<|j4r,dj!|j4�t&j(d	<|j6rD|j8s8t;�s.tj+d
�t-j.t<�|j>rVtA|j>�|_tC|j>�s'tjd|j>�d|_dtDd
tFfdtDd
tFff�fd�}	|jHs||jJ�}n"|jJ}tMjNd��|||�|jQ|�S#|jQ|�wxYw)N)�	verbosity�no_color�
user_log_filez/The following features are always enabled: %s. z, �_PIP_RUNNING_IN_SUBPROCESSzAThe --python option must be placed before the pip subcommand name�1�PIP_NO_INPUTr,�PIP_EXISTS_ACTIONz2Could not find an activated virtualenv (required).z�The directory '%s' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.�run_func.r*c�`���tj��dtdtf��fd��}|S)NrKr*c�4��	�|�}t|t�sJ�|S#t$rA}tj	d|ddi��tjdd��tcYd}~Sd}~wt$rE}tjt|��tjdd��tcYd}~Sd}~wttttf$rE}tjt|��tjdd��tcYd}~Sd}~wt$r=}tjd|�tjdd��tcYd}~Sd}~wt $r[t#dt$j&���t(j*kr$t-j.t$j&��tcYSt0$r5tjd	�tjdd��tcYSt2$r tjd
d��t4cYSwxYw)Nz%s�richT)�extrazException information:)�exc_infoz ERROR: Pipe to stdout was broken)�filezOperation cancelled by userz
Exception:)�
isinstance�intr�logger�error�debugrr�critical�strrrrrrrr�print�sys�stderrrU�DEBUGr	�	print_exc�KeyboardInterrupt�
BaseExceptionr)rK�status�exc�level_numberr`s   ��rA�exc_logging_wrapperzLCommand._main.<locals>.intercepts_unhandled_exc.<locals>.exc_logging_wrapper�s����-)�%�t�_�F�%�f�c�2�2�2�!�M��)�!��L�L��s�6�4�.�L�A��L�L�!9�D�L�I� �L��,�4��O�O�C��H�-��L�L�!9�D�L�I�3�3��%�'��*�	�	!��O�O�C��H�-��L�L�!9�D�L�I� �L��#�!��O�O�D�#�.��L�L�!9�D�L�I� �L��/�!��<�3�:�:�N�#�w�}�}�4�!�+�+����<� �L�(�!��O�O�$A�B��L�L�!9�D�L�I� �L�$�)��O�O�L�4�O�@�(�(�)�sc��	H�6A!�H�!H�-:B-�'H�-H�	:D	�H�	H�2E
�H�
A$H�3:H�/%H�H)�	functools�wrapsrrh)r`rxrws` �rA�intercepts_unhandled_excz/Command._main.<locals>.intercepts_unhandled_exc�s7����_�_�X�
&�.
)�3�.
)�3�.
)�'�.
)�`'�&rBT)�show_locals))�
enter_contextr rrP�verbose�quietrYrrZ�log�set�features_enabledr
�ALWAYS_ENABLED_FEATURESri�warning�join�sorted�python�os�environrlro�exitr�no_input�
exists_action�require_venvr&r!r�	cache_dirrrrrh�
debug_moderN�rich_traceback�installrJ)r=rKrF�always_enabled_featuresr{rNrws      @rArTz
Command._mainis<���!%� 2� 2�3C�3E� F���	
���1�3�4�����-�
���!���7�=�=�8���$��n�n��%�%�!�+�+�
��#&�g�&>�&>�"?�#��.�.�C
�#
��#��N�N�A��	�	�&�!8�9�:�
��>�>�:�"�*�*�L��O�O�S�
�
�H�H�U�O����),�B�J�J�~�&�� � �.1�h�h�w�7L�7L�.M�B�J�J�*�+�����(@�(@�+�-���� T�U����-�.���� .�w�/@�/@� A�G��#�G�$5�$5�6����*�
�%�%�
�%)��!�4	'��s�C�x�(�4	'�
�c�3�h�
�4	'�l	3��%�%�.�t�x�x�8���h�h���&�&�4�8��w��%��)�)�'�2��D�)�)�'�2�s
�0A	K�K)F)r*N)�__name__�
__module__�__qualname__r%rm�__annotations__r&�boolr2r<rrJrrhrNrrPrWrT�
__classcell__)r@s@rAr"r"-s�����E�3�O� %���%��S��3��$��4��<
�0��0�4�0�"�6�"��c��"�s�"�,�t�C�y�,�U�6�4��9�3D�-E�,���c���s��C3�$�s�)�C3��C3rB)9r3ryrU�logging.configr6r�ror	r�typingrrrrr�pip._vendor.richr��pip._internal.clir
�!pip._internal.cli.command_contextr�pip._internal.cli.parserrr
�pip._internal.cli.status_codesrrrr�pip._internal.exceptionsrrrrrrr�pip._internal.utils.filesystemr�pip._internal.utils.loggingrr�pip._internal.utils.miscrr�pip._internal.utils.temp_dirr�TempDirRegistryrr �pip._internal.utils.virtualenvr!�__all__�	getLoggerr�rir"rErBrA�<module>r�s���.�����	�
���7�7�8�(�A�V������<�O�=�U�Q�C��+��	��	�	�8�	$��3�!�3rBpython3.12/site-packages/pip/_internal/cli/__pycache__/spinners.cpython-312.pyc000064400000017310151732701460023207 0ustar00�

R`i���L�ddlZddlZddlZddlZddlZddlmZmZmZddl	m
Z
ddlmZeje�ZGd�d�ZGd�de�ZGd	�d
e�ZGd�d�Zej(d
edeeddffd��ZdZdZej(deededfd��Zy)�N)�IO�	Generator�Optional)�WINDOWS)�get_indentationc�$�eZdZdd�Zdeddfd�Zy)�SpinnerInterface�returnNc��t���N��NotImplementedError��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/spinners.py�spinzSpinnerInterface.spin���!�#�#��final_statusc��t��rr
�rrs  r�finishzSpinnerInterface.finishrr�r
N)�__name__�
__module__�__qualname__r�strr�rrr	r	s��$�$�3�$�4�$rr	c	�`�eZdZ			d
dedeeededefd�Zdeddfd	�Zdd
�Z	deddfd�Z
y)�InteractiveSpinnerN�message�file�
spin_chars�min_update_interval_secondsc� �||_|�tj}||_t	|�|_d|_tj|�|_	|jjdt�z|jzdz�d|_y)NF� z ... r)
�_message�sys�stdout�_file�RateLimiter�
_rate_limiter�	_finished�	itertools�cycle�_spin_cycle�writer�_width)rr!r"r#r$s     r�__init__zInteractiveSpinner.__init__su�� ��
��<��:�:�D���
�(�)D�E������$�?�?�:�6����
�
�����0�0�4�=�=�@�7�J�K���r�statusr
c�X�|jrJ�d|jz}|jj|d|jzz|z�|jj|�t	|�|_|jj�|jj�y)N�r&)r-r2r*r1�len�flushr,�reset)rr4�backups   r�_writezInteractiveSpinner._write+s����>�>�!�!�����#���
�
����#����"3�3�f�<�=��
�
���� ��&�k����
�
������� � �"rc��|jry|jj�sy|jt	|j
��yr)r-r,�readyr;�nextr0rs rrzInteractiveSpinner.spin7s8���>�>���!�!�'�'�)�����D��)�)�*�+rrc��|jry|j|�|jjd�|jj	�d|_y)N�
T)r-r;r*r1r8rs  rrzInteractiveSpinner.finish>sA���>�>�����L�!��
�
������
�
������r)Nz-\|/g�?r)rrrrrr�floatr3r;rrrrrr r sl��#'�!�-2�
����r�#�w����	�&+�
�(
#�S�
#�T�
#�,��3��4�rr c�J�eZdZddededdfd�Zdeddfd�Zdd�Zd	eddfd
�Zy)
�NonInteractiveSpinnerr!r$r
Nc�b�||_d|_t|�|_|j	d�y)NF�started)r'r-r+r,�_update)rr!r$s   rr3zNonInteractiveSpinner.__init__Ls*����
����(�)D�E������Y�rr4c��|jrJ�|jj�tj	d|j
|�y)Nz%s: %s)r-r,r9�logger�infor')rr4s  rrFzNonInteractiveSpinner._updateRs5���>�>�!�!���� � �"����H�d�m�m�V�4rc�v�|jry|jj�sy|jd�y)Nzstill running...)r-r,r=rFrs rrzNonInteractiveSpinner.spinWs.���>�>���!�!�'�'�)�����'�(rrc�V�|jry|jd|�d��d|_y)Nzfinished with status '�'T)r-rFrs  rrzNonInteractiveSpinner.finish^s)���>�>�����-�l�^�1�=�>���r)gN@r)	rrrrrAr3rFrrrrrrCrCKsH�� �� �%� �SW� �5�c�5�d�5�
)��3��4�rrCc�0�eZdZdeddfd�Zdefd�Zdd�Zy)r+r$r
Nc� �||_d|_y)Nr)�_min_update_interval_seconds�_last_update)rr$s  rr3zRateLimiter.__init__fs��,G��)�#$��rc�f�tj�}||jz
}||jk\Sr)�timerPrO)r�now�deltas   rr=zRateLimiter.readyjs.���i�i�k���d�'�'�'����9�9�9�9rc�6�tj�|_yr)rRrPrs rr9zRateLimiter.resetos�� �I�I�K��rr)rrrrAr3�boolr=r9rrrr+r+es&��%�E�%�d�%�:�t�:�
(rr+r!r
c#�K�tjj�r1tj	�t
jkrt|�}nt|�}	ttj�5|��ddd�|jd�y#1swY�xYw#t$r|jd��t$r|jd��wxYw�w)N�done�canceled�error)
r(r)�isattyrH�getEffectiveLevel�logging�INFOr rC�
hidden_cursorr�KeyboardInterrupt�	Exception)r!�spinners  r�open_spinnerrcss������z�z����v�7�7�9�W�\�\�I�$6�w�$?��'��0��
�
�3�:�:�
&��M�'�	���v��'�
&�������z�"�
������w��
��s6�AC�B"�7B�<B"�C�B�B"�"6C�Cz[?25lz[?25hr")NNNc#�(K�trd��y|j�r%tj�tj
kDrd��y|j
t�	d��|j
t�y#|j
t�wxYw�wr)	rr[rHr\r]r^r1�HIDE_CURSOR�SHOW_CURSOR)r"s rr_r_�s\�����
��[�[�]�f�6�6�8�7�<�<�G�
��
�
�;��	$���J�J�{�#��D�J�J�{�#�s�AB�A8�"B�8B�B)�
contextlibr.r]r(rR�typingrrr�pip._internal.utils.compatr�pip._internal.utils.loggingr�	getLoggerrrHr	r rCr+�contextmanagerrrcrerfr_rrr�<module>rms������
��*�*�.�7�	��	�	�8�	$��$�$�.�)�.�j�,��4(�(�����#��)�,<�d�D�,H�"I����.�������$��3��$�I�.>�$?�$��$rpython3.12/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc000064400000020446151732701460024414 0ustar00�

R`i"�	��dZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZddl
mZmZddlmZdd	�Zd
e	ededeede
efd
�Zdededeefd�Zy)zBLogic that powers autocompletion installed by ``pip completion``.
�N)�chain)�Any�Iterable�List�Optional)�create_main_parser)�
commands_dict�create_command)�get_default_environment�returnc
��dtjvrytjdj�dd}ttjd�}	||dz
}t�}t
t�}g}d}|D]
}||vs�|}n|��j|dk(rtjd�|jd�xr|d	v}|r�t�}	|j�}
|	jd
��D�cgc]:}|jj|
�r|j|ddvr|j��<}}|r'|D]
}t|��tjd�|jd�xr|dk(}
|
r1t!|d
�D]
}t|��tjd�t#|�}|j$j&D]V}|j(t*j,k7s�!||j.|j0zD�cgc]}||j2f��c}z
}�X|d|dz
D�cgc]}|jd�d��}}|D��cgc]\}}||vs�||f��}}}|D��cgc]\}}|j|�s�||f��}}}t5|||j$j&�}|rt!||�}|D�cgc]}|df��}}|D]'}|d}|dr|ddddk(r|dz
}t|��)�n|j6D�cgc]}|j8��}}|j;|j8�t=j>|�}|jd�rB|D]<}|j(t*j,k7s�!||j.|j0zz
}�>n$t5|||�}|rt
t!||��}tdjA|D�cgc]}|j|�s�|��c}��tjd�y#t$rd}Y���wxYwcc}wcc}wcc}wcc}}wcc}}wcc}wcc}wcc}w)z:Entry Point for completion of main and subcommand options.�PIP_AUTO_COMPLETEN�
COMP_WORDS��
COMP_CWORD��help�-)�show�	uninstallT)�
local_only�install�path�=r�z--� )!�os�environ�split�int�
IndexErrorr�listr	�sys�exit�
startswithr�lower�iter_installed_distributions�canonical_name�print�auto_complete_pathsr
�parser�option_list_allr�optparse�
SUPPRESS_HELP�
_long_opts�_short_opts�nargs�get_path_completion_type�
option_groups�option_list�appendr�
from_iterable�join)�cwords�cword�currentr+�subcommands�options�subcommand_name�word�should_list_installed�env�lc�dist�	installed�should_list_installablesr�
subcommand�opt�opt_str�x�	prev_opts�v�k�completion_type�paths�option�	opt_label�i�opts�flattened_optss                             ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py�autocompleterTs8���"�*�*�,��
�Z�Z��
%�
+�
+�
-�a�b�
1�F���
�
�<�(�)�E������#�� �
!�F��}�%�K��G�&*�O����;��"�O���
�"��f�$��H�H�Q�K�$+�$6�$6�s�$;� ;�!
��T
�A
��!�)�+�C�����B� �<�<��<�M��M�D��&�&�1�1�"�5��'�'�v�a�b�z�9��#�#�M�
���%�D��$�K�&�������"�"�3�'�'�H�O�y�,H�	!�$�+�G�V�<���d��=��H�H�Q�K�#�O�4�
��$�$�4�4�C��x�x�8�1�1�1��8;������8X��8X�W�W�c�i�i�(�8X����5�/5�Q����.C�D�.C��Q�W�W�S�\�!�_�.C�	�D�(/�F��f�q�!�1�I�3E�A�q�6���F�&-�G�g�d�a�����g�1F�A�q�6�g��G�2������-�-�
���'���A�E�-2�3�U�T��a�y�U�G�3��F��q�	�I��a�y�V�A�Y�r��]�d�2��S� �	��)���(.�';�';�<�';�!��
�
�';��<����F�&�&�'��,�,�T�2�����c�"�%���8�8�x�5�5�5��3�>�>�C�O�O�#C�C�K�&�
7�v�u�n�U�O��"�#6�w��#P�Q��
�c�h�h�;�H�;�a�!�,�,�w�2G��;�H�I�J��H�H�Q�K��{������4��0��
E��F��G��4��=��IsT�P�.?P"�P'�(P,�
P1�P1�%P7�?P7�;P=�Q�Q�+Q�P�Pr8r9rQc��|dks||dz
jd�sy|D]�}|jtjk(r�!t	|�jd�D]g}||dz
jd�d|k(s�!|jr,td�|jjd�D��s�Y|jccS��y)aLGet the type of path completion (``file``, ``dir``, ``path`` or None)

    :param cwords: same as the environmental variable ``COMP_WORDS``
    :param cword: same as the environmental variable ``COMP_CWORD``
    :param opts: The available options to check
    :return: path completion type (``file``, ``dir``, ``path`` or None)
    rrN�/rrc3�$K�|]}|dv���
y�w))r�file�dirN�)�.0rHs  rS�	<genexpr>z+get_path_completion_type.<locals>.<genexpr>�s����*�:P�Q�A�0�0�:P�s�)r%rr-r.�strr�metavar�any)r8r9rQrF�os     rSr2r2xs���
�q�y��u�q�y�)�4�4�S�9�����8�8�x�-�-�-���S�����$�A��e�a�i� �&�&�s�+�A�.�!�3��{�{�c�*�:=�+�+�:K�:K�C�:P�*�'��;�;�&�%���r:rLc#���K�tjj|�\}�tjj|�}tj|tj
�sytjj
����fd�tj|�D�}|D]�}tjj||�}tjj
tjj||��}|dk7r$tjj|�r|����tjj|�s��tjj|d�����y�w)atIf ``completion_type`` is ``file`` or ``path``, list all regular files
    and directories starting with ``current``; otherwise only list directories
    starting with ``current``.

    :param current: The word to be completed
    :param completion_type: path completion type(``file``, ``path`` or ``dir``)
    :return: A generator of regular files and/or directories
    Nc3��K�|]5}tjj|�j��s�2|���7y�w)N)rr�normcaser%)r[rH�filenames  �rSr\z&auto_complete_paths.<locals>.<genexpr>�s2������+�a�r�w�w�/?�/?��/B�/M�/M�h�/W��+�s�3>�>rYr)rrr�abspath�access�R_OKrd�listdirr7�isfile�isdir)	r:rL�	directory�current_path�	file_list�frF�	comp_fileres	        @rSr*r*�s�������'�'�-�-��0��I�x��7�7�?�?�9�-�L�
�9�9�\�2�7�7�+���w�w����)�H���:�:�l�+��I����g�g�l�l�<��+���G�G�$�$�R�W�W�\�\�)�Q�%?�@�	��e�#������s�(;��O�
�W�W�]�]�3�
��'�'�,�,�y�"�-�-��s�EE7�%E7)rN)�__doc__r-rr#�	itertoolsr�typingrrrr�pip._internal.cli.main_parserr�pip._internal.commandsr	r
�pip._internal.metadatarrTr]r r2r*rZrarS�<module>rws}����	�
��0�0�<�@�:�f�R���I��!��)1�#���
�c�]��0.��.�s�.�x��}�.rapython3.12/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-312.pyc000064400000003435151732701470024534 0ustar00�

R`i��P�ddlmZmZddlmZmZmZedd��ZGd�d�Zy)	�)�	ExitStack�contextmanager)�ContextManager�	Generator�TypeVar�_TT)�	covariantc�R��eZdZd�fd�Zededfd��Zdeedefd�Z	�xZ
S)�CommandContextMixIn�returnc�N��t�|��d|_t�|_y)NF)�super�__init__�_in_main_contextr�
_main_context)�self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/command_context.pyrzCommandContextMixIn.__init__s ���
���� %���&�[���)NNNc#�K�|jrJ�d|_	|j5d��ddd�d|_y#1swY�xYw#d|_wxYw�w)NTF)rr)rs r�main_contextz CommandContextMixIn.main_context
sP�����(�(�(�(� $���	*��#�#��$�%*�D�!�$�#��%*�D�!�s.�A�A�:�A�A�A�A�	A�A�context_providerc�T�|jsJ�|jj|�S)N)rr�
enter_context)rrs  rrz!CommandContextMixIn.enter_contexts)���$�$�$�$��!�!�/�/�0@�A�Ar)rN)�__name__�
__module__�__qualname__rrrrrrr�
__classcell__)rs@rrrsD���)�
�*�i�(8�9�*��*�B�n�R�.@�B�R�BrrN)	�
contextlibrr�typingrrrrr�rr�<module>r"s&��0�5�5��T�T�"��B�Brpython3.12/site-packages/pip/_internal/cli/__pycache__/main.cpython-312.pyc000064400000004451151732701470022275 0ustar00�

R`i���dZddlZddlZddlZddlZddlZddlmZmZddl	m
Z
ddlmZddl
mZddlmZddlmZej&e�Zdd	eeed
efd�Zy)
z Primary application entrypoint.
�N)�List�Optional)�autocomplete)�
parse_command)�create_command)�PipError)�deprecation�args�returnc��|�tjdd}tjdtd��tj�t�	t|�\}}	tj tj"d�t+dv�	�}|j-|�S#t$rn}tjjd|���tjjtj�tjd�Yd}~��d}~wwxYw#tj$$r }t&j)d|�Yd}~��d}~wwxYw)
N��ignorez.*pkg_resources)�action�category�modulezERROR: �z%Ignoring error %s when setting localez
--isolated)�isolated)�sys�argv�warnings�filterwarnings�DeprecationWarningr	�install_warning_loggerrrr�stderr�write�os�linesep�exit�locale�	setlocale�LC_ALL�Error�logger�debugr�main)r
�cmd_name�cmd_args�exc�e�commands      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/main.pyr%r%.s���|��x�x���|��
����"4�=N��
�&�&�(��N��*�4�0���(�A��������+��X���1I�K�G��<�<��!�!�����
�
���7�3�%��)��
�
������$�����������<�<�A����<�a�@�@��A�s1�B$� $D�$	D�-A$D�D�E�1E�E)N)�__doc__r�loggingrrr�typingrr� pip._internal.cli.autocompletionr�pip._internal.cli.main_parserr�pip._internal.commandsr�pip._internal.exceptionsr�pip._internal.utilsr	�	getLogger�__name__r#�str�intr%��r+�<module>r:sY���
��	�
��!�9�7�1�-�+�	��	�	�8�	$��<!"�x��S�	�"�!"�c�!"r9python3.12/site-packages/pip/_internal/cli/__pycache__/main_parser.cpython-312.pyc000064400000011531151732701470023646 0ustar00�

R`i�����dZddlZddlZddlZddlmZmZmZddlm	Z	ddl
mZddlm
Z
mZddlmZmZddlmZdd	lmZmZd
dgZde
fd
�Zdedeefd�Zdeedeeeeffd�Zy)z=A single place for constructing and exposing the main parser
�N)�List�Optional�Tuple)�get_runnable_pip)�
cmdoptions)�ConfigOptionParser�UpdatingDefaultsHelpFormatter)�
commands_dict�get_similar_commands)�CommandError)�get_pip_version�get_prog�create_main_parser�
parse_command�returnc��tddt�dt���}|j�t	�|_t
jtj|�}|j|�d|_
dgtj�D��cgc]\}}|d�d|j����c}}z}d	j|�|_|Scc}}w)
z1Creates and returns the main parser for pip's CLIz
%prog <command> [options]F�global)�usage�add_help_option�	formatter�name�progT��27� �
)rr	r�disable_interspersed_argsr
�versionr�make_option_group�
general_group�add_option_group�mainr
�items�summary�join�description)�parser�gen_optsr�command_infor&s     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/main_parser.pyrrs��� �+��/�1�
�
�Z��F��$�$�&�$�&�F�N��+�+�J�,D�,D�f�M�H�
���H�%��F�K��$�"/�"5�"5�"7��"7��D�,���)�1�\�)�)�*�+�"7���K����;�/�F���M��
s�C�pythonc��tjj|�rltjj|�rKdD]E}tjj	||�}tjj|�s�C|cSy|Sy)N)z
bin/pythonzScripts/python.exe)�os�path�exists�isdirr%)r+�exe�pys   r*�identify_python_interpreterr32sj��
�w�w�~�~�f��
�7�7�=�=�� �<���W�W�\�\�&�#�.���7�7�>�>�"�%��I�<���M���argsc�F�t�}|j|�\}}|jr�dtjvr�t|j�}|�t
d|j����|t�g}|j|�dtjd<d}	tj|�}|j}tj|�|j rjtj"j%|j �tj"j%tj&�tj�|r|ddk(r2t)|�dk(r$|j+�tj�|d}	|	t,vrCt/|	�}
d	|	�d
�g}|
r|j1d|
�d
��t
dj3|���|dd}|j5|	�|	|fS#tjtf$r}t
d|�d|����d}~wwxYw)
N�_PIP_RUNNING_IN_SUBPROCESSz$Could not locate Python interpreter �1rzFailed to run pip under z: �help�zunknown command "�"zmaybe you meant "z - )r�
parse_argsr+r-�environr3rr�extend�
subprocess�run�
returncode�SubprocessError�OSError�sys�exitr�stdout�write�linesep�len�
print_helpr
r�appendr%�remove)
r5r'�general_options�	args_else�interpreter�pip_cmdrA�proc�exc�cmd_name�guess�msg�cmd_argss
             r*rrEs���
�
!�F�"(�!2�!2�4�!8��O�Y����">�b�j�j�"P�1�/�2H�2H�I�����6��7M�7M�6N�O��
�

���
��	���t��47��
�
�/�0��
�	P��>�>�'�*�D����J�	���������
�
������(��
�
������$����
���1���/�C�	�N�a�4G��������
���|�H��}�$�$�X�.��"�8�*�A�.�/����J�J�*�5�'��3�4��5�:�:�c�?�+�+��A�w�H��O�O�H���X����?�*�*�G�4�	P��!9�+��b���N�O�O��	P�s�!G1�1H �
H�H )�__doc__r-r?rD�typingrrr�pip._internal.build_envr�pip._internal.clir�pip._internal.cli.parserrr	�pip._internal.commandsr
r�pip._internal.exceptionsr�pip._internal.utils.miscr
r�__all__r�strr3r�r4r*�<module>rbs����
��
�(�(�4�(�V�F�1�>���
1���.��>�����
��&A��S�	�A�e�C��c��N�&;�Ar4python3.12/site-packages/pip/_internal/cli/__pycache__/progress_bars.cpython-312.pyc000064400000005133151732701470024222 0ustar00�

R`i�����ddlZddlmZmZmZmZmZmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZddlmZeeegeefZdeedededeeddffd	�Zdd
�dedeedefd�Zy)�N)�Callable�	Generator�Iterable�Iterator�Optional�Tuple)
�	BarColumn�DownloadColumn�FileSizeColumn�Progress�ProgressColumn�
SpinnerColumn�
TextColumn�TimeElapsedColumn�TimeRemainingColumn�TransferSpeedColumn)�get_indentation�iterable�bar_type�size�returnc#��K�|dk(sJd��|s?td�}td�tdd��t�t	�t�f}n<|}td�t
�t�t	�td�t�f}t|d	d
i�}|jdt�dzz|�
�}|5|D]"}|��|j|t|����$	ddd�y#1swYyxYw�w)N�onz-This should only be used in the default mode.�infz([progress.description]{task.description}�lineg�?)�speed�eta�refresh_per_second�� �)�total)�advance)�floatrrrrrr	r
rr�add_taskr�update�len)rrrr"�columns�progress�task_id�chunks        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py�_rich_progress_barr-s������t��L�L�L����e����A�B��&��,����!���/
�����A�B��K����!��u���!�

����8�R�8�H������'8�1�'<� =�U��K�G�	��E��K��O�O�G�S��Z�O�8��
���s�B8C8�:(C,�#	C8�,C5�1C8)rc�P�|dk(rtjt||��StS)zGet an object that can be used to render the download progress.

    Returns a callable, that takes an iterable to "wrap".
    r�rr)�	functools�partialr-�iterr/s  r,�get_download_progress_rendererr3:s'���4��� � �!3�h�T�R�R���)r0�typingrrrrrr�pip._vendor.rich.progressr	r
rrr
rrrrr�pip._internal.utils.loggingr�bytes�DownloadProgressRenderer�str�intr-r3�r4r,�<module>r=s����K�K����8�#�X�e�_�$5�x���$F�G��!9��u�o�!9��!9��	!9�
�u�d�D� �!�!9�J-1�
��
�$�S�M�
��
r4python3.12/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc000064400000073422151732701470023534 0ustar00�

R`i�u��
�UdZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZddlmZmZmZmZmZddlmZddlmZdd	lmZdd
lmZmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%ddl&m'Z'ejPe)�Z*dede
de+ddfd�Z,dee+efdedefd�Z-�d$de
de.ddfd�Z/de
de+de+de+fd�Z0de
de+de+de+fd�Z1Gd�d e
�Z2ee
d!d"d#d#d$�%�Z3ed&e
fe4d'<ee
d(d)d*dd+�,�Z5ed&e
fe4d)<ee
d-d.d*dd/�,�Z6ed&e
fe4d.<ee
d0d1d2d*dd3�,�Z7ed&e
fe4d4<ee
d5d6d*d7�%�Z8ed&e
fe4d6<ee
d8d9d:�;�Z9ed&e
fe4d9<ee
d<d=d>d?dd@�,�Z:ed&e
fe4d><ee
dAdBd*ddC�,�Z;ed&e
fe4dB<ee
dDdEdFd*dG�%�Z<ed&e
fe4dF<ee
dHdIdJd?ddK�,�Z=ed&e
fe4dJ<ee
dLdMdNdOdPgdOdQ�R�Z>ed&e
fe4dM<ee2dSdTdUdVdWdWdX�Y�Z?ed&e
fe4dV<ee
dZd[d*dd\�,�Z@ed&e
fe4d[<ee
d]d^gd_�d`da�b�ZAed&e
fe4d^<ee
dcdddedfdg�h�ZBed&e
fe4dd<ee
didjdkdldm�h�ZCed&e
fe4dj<ee
dndodpdqdrdsdt�u�ZDed&e
fe4dq<de
fdv�ZEee2dwdxdWdWdy�z�ZFed&e
fe4dx<ee2d{d|dWddWd}�~�ZGed&e
fe4d|<ee
dd�d�d�d�e!j�d����ZIed&e
fe4d�<de
fd��ZJee
d�d�d*dd��,�ZKed&e
fe4d�<de
fd��ZLde
fd��ZMde
fd��ZNde
fd��ZOde
fd��ZPde
d�e+de+deddf
d��ZQee2d�d�d�d�d�dWd�e�d�eQd����ZRed&e
fe4d�<d�e
de
defd��ZSde
d�e+de+deddf
d��ZTde
d�e+de+deddf
d��ZUde
fd��ZVde
fd��ZWee
d�d�d�d�dd����ZXed&e
fe4d�<de+deeeYd&fee+ffd��ZZde
d�e+de+deddf
d��Z[ee
d�d�d�d�e[deded�����	Z\ed&e
fe4d�<ee
d�d�d�dd����Z]ed&e
fe4d�<ee
d�d�d�d�dd����Z^ed&e
fe4d�<d�eddfd��Z_de
de#fd��Z`de
fd��Zaee2d�d�ed�dWd����Zbed&e
fe4d�<de
de+de+deddf
d��Zcee
d�d�d�ecd����Zded&e
fe4d�<ee
d�d�d�d*ddĬ,�Zeed&e
fe4d�<ee
d�d�d*dȬ%�Zfed&e
fe4d�<ee
d�d�d�d�dͬ,�Zged&e
fe4d�<ee
d�d�d*ddѬ,�Zhed&e
fe4d�<de
de+de+deddf
d҄Ziee
d�d�d*ddլ,�Zjee4d�<ee
d�d�d�eide	�׫Zkee4d�<de
d�e+de+deddf
dلZlee
d�d�d�e+d�eld�dެ߫	Zmed&e
fe4d�<ee
d�d�dd�d��Zned&e
fe4d�<ee
d�d�d�dd��Zoed&e
fe4d�<ee
d�d*dd��Zped&e
fe4d�<ee
d�d*dd��Zqed&e
fe4d�<ee
d�d�d*dd�,�Zred&e
fe4d�<ee
d�d�d�d�d�gd����Zsed&e
fe4d�<de
d�e+de+deddf
d��Ztee
d�d�d�etd�d����Zued&e
fe4d�<ee
d��dd*d�d�,�Zved&e
fe4�d<ee2�ddWdWd��d���Zwed&e
fe4�d<de
ddf�d�Zxee2�d�dd��d	�d
�d���Zyed&e
fe4�d
<ee
�d�dd*d�d�,�Zzed&e
fe4�d<�dgZ{ee
�d�d�dd�g�d�dge{z�d���Z|ed&e
fe4�d<ee
�d�d�dd�g�dg�d���Z}ed&e
fe4�d<�de3e5e6e7e9e:e<e=e?e@eAeBeCeDeEeMeFeGebedere;eze|e}g�d �Z~ee+efe4�d!<�d"eIeJeKeLg�d �Zee+efe4�d#<y(%aC
shared options and groups

The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this design.
�N)�partial)�
SUPPRESS_HELP�Option�OptionGroup�OptionParser�Values)�dedent)�Any�Callable�Dict�Optional�Tuple��canonicalize_name)�ConfigOptionParser)�CommandError)�USER_CACHE_DIR�get_src_prefix)�
FormatControl)�PyPI)�TargetPython)�
STRONG_HASHES)�	strtobool�parser�option�msg�returnc��|�d|��}tjdj|j���}|j	|�y)z�
    Raise an option parsing error using parser.error().

    Args:
      parser: an OptionParser instance.
      option: an Option instance.
      msg: the error text.
    z error: � N)�textwrap�fill�join�split�error)rrrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py�raise_option_errorr&$s=���H�H�S�E�
"�C�
�-�-��������-�
.�C�
�L�L����groupc�d�t||d�}|dD]}|j|���|S)z�
    Return an OptionGroup object
    group  -- assumed to be dict with 'name' and 'options' keys
    parser -- an optparse Parser
    �name�options)r�
add_option)r(r�option_grouprs    r%�make_option_groupr.2s9���v�u�V�}�5�L��	�"�������)�#��r'Fr+�check_targetc�J�t|j|j|j|jg�}tt
�dh�}|j|k7xr
|j}|r
|rtd��|r(|js|r|jstd��yyyy)z�Function for determining if custom platform options are allowed.

    :param options: The OptionParser options.
    :param check_target: Whether or not to check if --target is being used.
    z:all:z�When restricting platform and interpreter constraints using --python-version, --platform, --abi, or --implementation, either --no-deps must be set, or --only-binary=:all: must be set and --no-binary must not be set (or must be set to :none:).zfCan not use any platform or abi specific options unless installing via '--target' or using '--dry-run'N)�any�python_version�	platforms�abis�implementationr�set�format_control�ignore_dependenciesr�dry_run�
target_dir)r+r/�dist_restriction_set�binary_only�sdist_dependencies_alloweds     r%�check_dist_restrictionr>>s�����"�"�����L�L��"�"�		
��� ����y�1�K����+�-�Q�g�6Q�6Q�2Q��� :��
�
�	
�����#7��@R�@R��A��
�AS�#7��r'�opt�valuec�@�tjj|�S�N)�os�path�
expanduser�rr?r@s   r%�_path_option_checkrGfs��
�7�7���e�$�$r'c��t|�SrBrrFs   r%�_package_name_option_checkrIjs
���U�#�#r'c�r�eZdZejdzZej
j
�Zeed<eed<y)�	PipOption)rD�package_namerLrDN)	�__name__�
__module__�__qualname__r�TYPES�TYPE_CHECKER�copyrIrG�r'r%rKrKns9���L�L�3�3�E��&�&�+�+�-�L�#=�L�� �-�L��r'rKz-hz--help�helpz
Show help.)�dest�actionrT.�help_z--debug�
debug_mode�
store_truezbLet unhandled exceptions propagate outside the main subroutine, instead of logging them to stderr.�rUrV�defaultrTz
--isolated�
isolated_modezSRun pip in an isolated mode, ignoring environment variables and user configuration.z--require-virtualenvz--require-venv�require_venvzMAllow pip to only run in a virtual environment; exit with an error otherwise.�require_virtualenvz--break-system-packages�override_externally_managedz=Allow pip to modify an EXTERNALLY-MANAGED Python installationz--python�pythonz.Run pip with the specified Python interpreter.)rUrTz-vz	--verbose�verbose�countzDGive more output. Option is additive, and can be used up to 3 times.z
--no-color�no_colorzSuppress colored output.z-Vz	--version�versionzShow version and exit.z-qz--quiet�quietz�Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).z--progress-bar�progress_bar�choice�on�offzGSpecify whether the progress bar should be used [on, off] (default: on))rU�type�choicesr[rTz--logz
--log-filez--local-log�logrDz Path to a verbose appending log.)rU�metavarrjrTz
--no-input�no_inputzDisable prompting for input.z--keyring-provider�keyring_provider)�auto�disabled�import�
subprocessrpz�Enable the credential lookup via the keyring library if user input is allowed. Specify which mechanism to use [disabled, import, subprocess]. (default: disabled))rUrkr[rTz--proxy�proxy�str�zESpecify a proxy in the form scheme://[user:passwd@]proxy.server:port.)rUrjr[rTz	--retries�retries�int�zRMaximum number of retries each connection should attempt (default %default times).z	--timeoutz--default-timeout�sec�timeout�float�z2Set the socket timeout (default %default seconds).)rmrUrjr[rTc
�,�tdddgd�gddd��S)	Nz--exists-action�
exists_actionrg)�s�i�w�b�a�appendrVzYDefault action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.)rUrjrkr[rVrmrT�rrSr'r%rr+s)����
�
�)����9��r'z--cert�certz�Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL Certificate Verification' in pip documentation for more information.)rUrjrmrTz
--client-cert�client_certzkPath to SSL client certificate, a single file containing the private key and the certificate in PEM format.)rUrjr[rmrTz-iz--index-urlz
--pypi-url�	index_url�URLz�Base URL of the Python Package Index (default %default). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.)rUrmr[rTc�$�tddddgd��S)Nz--extra-index-url�extra_index_urlsr�r�zmExtra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.�rUrmrVr[rTr�rSr'r%�extra_index_urlr�bs#����
�����
	�	r'z
--no-index�no_indexzAIgnore package index (only looking at --find-links URLs instead).c	�&�tddddgdd��S)Nz-fz--find-links�
find_linksr��urlaIf a URL or path to an html file, then parse for links to archives such as sdist (.tar.gz) or wheel (.whl) files. If a local path or file:// URL that's a directory, then look for archives in the directory listing. Links to VCS project URLs are not supported.�rUrVr[rmrTr�rSr'r%r�r�ys&�����
����7��r'c�$�tddddgd��S)Nz--trusted-host�
trusted_hostsr��HOSTNAMEz]Mark this host or host:port pair as trusted, even though it does not have valid or any HTTPS.)rUrVrmr[rTr�rSr'r%�trusted_hostr��s#����
����,�
�r'c	�&�tddddgdd��S)Nz-cz--constraint�constraintsr��filez\Constrain versions using the given constraints file. This option can be used multiple times.r�r�rSr'r%r�r��s&�����
����2�	�	r'c	�&�tddddgdd��S)Nz-rz
--requirement�requirementsr�r�zQInstall from the given requirements file. This option can be used multiple times.r�r�rSr'r%r�r��s&�����
����2�	�	r'c	�&�tddddgdd��S)Nz-ez
--editable�	editablesr�zpath/urlzkInstall a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.r�r�rSr'r%�editabler��s'�����
����
F��r'�opt_strc��tjj|�}t|j|j
|�yrB)rCrD�abspath�setattr�valuesrU)rr�r@rs    r%�_handle_srcr��s(���G�G�O�O�E�"�E��F�M�M�6�;�;��.r'z--srcz--sourcez--source-dirz--source-directory�src_dir�dir�callbackz�Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".)rUrjrmr[rVr�rT�srcr�c�.�t||j�S)zGet a format_control object.)�getattrrU)r�rs  r%�_get_format_controlr��s���6�6�;�;�'�'r'c��t|j|�}tj||j|j
�yrB)r�r�r�handle_mutual_excludes�	no_binary�only_binary�rr�r@r�existings     r%�_handle_no_binaryr��s7��#�6�=�=�&�9�H��(�(�
�������r'c��t|j|�}tj||j|j
�yrB)r�r�rr�r�r�r�s     r%�_handle_only_binaryr��s7��#�6�=�=�&�9�H��(�(�
�������r'c	�f�tt�t��}tdddtd|d��S)Nz--no-binaryr7r�ruavDo not use binary packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either ":all:" to disable all binary packages, ":none:" to empty the set (notice the colons), or one or more package names with commas between them (no colons). Note that some packages are tricky to compile and may fail to install when this option is used on them.�rUrVr�rjr[rT)rr6rr��r7s r%r�r��s7��"�3�5�#�%�0�N���
��"�
��D�
�
r'c	�f�tt�t��}tdddtd|d��S)Nz
--only-binaryr7r�ruaKDo not use source packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either ":all:" to disable all source packages, ":none:" to empty the set, or one or more package names with commas between them. Packages without binary distributions will fail to install when this option is used on them.r�)rr6rr�r�s r%r�r�s6��"�3�5�#�%�0�N���
��$�
��"�
�
r'z
--platformr3�platformr�z�Only use wheels compatible with <platform>. Defaults to the platform of the running system. Use this option multiple times to specify multiple platforms supported by the target interpreter.r�c���|sy|jd�}t|�dkDryt|�dk(r|d}t|�dkDr
|d|ddg}	td�|D��}|dfS#t$rYy	wxYw)
z�
    Convert a version string like "3", "37", or "3.7.3" into a tuple of ints.

    :return: A 2-tuple (version_info, error_msg), where `error_msg` is
        non-None if and only if there was a parsing error.
    )NN�.�)rSz'at most three version parts are allowed�rNc3�2K�|]}t|����y�wrB)rx)�.0�parts  r%�	<genexpr>z*_convert_python_version.<locals>.<genexpr>:s����9�5�4�S��Y�5�s�)rSz$each version part must be an integer)r#�len�tuple�
ValueError)r@�parts�version_infos   r%�_convert_python_versionr�$s������K�K���E�
�5�z�A�~�>�
�5�z�Q���a����u�:��>��1�X�u�Q�R�y�)�E�<��9�5�9�9��
�$�����<�;�<�s�A&�&	A2�1A2c��t|�\}}|� dj||�}t|||��||j_y)z3
    Handle a provided --python-version value.
    Nz(invalid --python-version value: {!r}: {}�rr)r��formatr&r�r2)rr�r@rr��	error_msgrs       r%�_handle_python_versionr�AsI��6�e�<��L�)���8�?�?���
��	�6�&�c�:�#/�F�M�M� r'z--python-versionr2a�    The Python interpreter version to use for wheel and "Requires-Python"
    compatibility checks. Defaults to a version derived from the running
    interpreter. The version can be specified using up to three dot-separated
    integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor
    version can also be given as a string without dots (e.g. "37" for 3.7.0).
    )rUrmrVr�rjr[rTz--implementationr5z�Only use wheels compatible with Python implementation <implementation>, e.g. 'pp', 'jy', 'cp',  or 'ip'. If not specified, then the current interpreter implementation is used.  Use 'py' to force implementation-agnostic wheels.z--abir4�abiaLOnly use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. If not specified, then the current interpreter abi tag is used. Use this option multiple times to specify multiple abis supported by the target interpreter. Generally you will need to specify --implementation, --platform, and --python-version when using this option.�cmd_optsc���|jt��|jt��|jt��|jt	��yrB)r,r3r2r5r4)r�s r%�add_target_python_optionsr��sD�����	��$�����(�)�����(�)������r'c�t�t|j|j|j|j��}|S)N)r3�py_version_infor4r5)rr3r2r4r5)r+�
target_pythons  r%�make_target_pythonr��s6�� ��#�#��.�.�
�\�\��-�-�	�M��r'c�"�tddddd��S)Nz--prefer-binary�
prefer_binaryrYFzSPrefer binary packages over source packages, even if the source packages are newer.rZr�rSr'r%r�r��s ����
���
)�
	�	r'z--cache-dir�	cache_dirzStore the cache data in <dir>.)rUr[rmrjrTc��|�	t|�d|j_y#t$r!}t||t|���Yd}~�7d}~wwxYw)z�
    Process a value provided for the --no-cache-dir option.

    This is an optparse.Option callback for the --no-cache-dir option.
    Nr�F)rr�r&rur�r�)rr?r@r�excs     r%�_handle_no_cache_dirr��sM��
��	D��e��$�F�M�M����	D��v�f�#�c�(�C�C��	D�s�!�	A�A�Az--no-cache-dirzDisable the cache.)rUrVr�rT�no_cachez	--no-depsz--no-dependenciesr8z#Don't install package dependencies.�no_depsz--ignore-requires-python�ignore_requires_pythonz'Ignore the Requires-Python information.z--no-build-isolation�build_isolation�store_falseTz�Disable isolation when building a modern source distribution. Build dependencies specified by PEP 518 must be already installed if this option is used.�no_build_isolationz--check-build-dependencies�check_build_depsz1Check the build dependencies when PEP517 is used.c��|�d}t|||��d}td�|D��s#ddj|��d�}t|||��d	|j_y)
z�
    Process a value provided for the --no-use-pep517 option.

    This is an optparse.Option callback for the no_use_pep517 option.
    Na0A value was passed for --no-use-pep517,
        probably using either the PIP_NO_USE_PEP517 environment variable
        or the "no-use-pep517" config file option. Use an appropriate value
        of the PIP_USE_PEP517 environment variable or the "use-pep517"
        config file option instead.
        r�)�
setuptools�wheelc3�ZK�|]#}tjj|����%y�wrB)�	importlib�util�	find_spec)r��packages  r%r�z(_handle_no_use_pep517.<locals>.<genexpr>s ����I��W�y�~�~�'�'��0��s�)+z2It is not possible to use --no-use-pep517 without z and z installed.F)r&�allr"r��
use_pep517)rr?r@rr�packagess      r%�_handle_no_use_pep517r�sp��
����	�6�&�c�:�'�H��I��I�I���|�|�H�-�.�k�
;�	�	�6�&�c�:� %�F�M�M�r'z--use-pep517r�z^Use PEP 517 for building source distributions (use --no-use-pep517 to force legacy behaviour).z--no-use-pep517)rUrVr�r[rT�
no_use_pep517c�d�|jd�\}}}|dk7r|jd|�d��t|j|j�}|�#i}t|j|j|�||vr3t
||t�r||j|�y|||g||<y|||<y)N�=z
Arguments to z must be of the form KEY=VAL)	�	partitionr$r�r�rUr��
isinstance�listr�)rr�r@r�key�sep�valrUs        r%�_handle_config_settingsr�8s����O�O�C�(�M�C��c�
�c�z����}�W�I�-I�J�K��6�=�=�&�+�+�.�D��|�����
�
�v�{�{�D�1�
�d�{��d�3�i��&���I���S�!��c��C�(�D��I���S�	r'z-Cz--config-settings�config_settings�settingsz�Configuration settings to be passed to the PEP 517 build backend. Settings take the form KEY=VALUE. Use multiple --config-settings options to pass multiple keys to the backend.)rUrjrVr�rmrTz--build-option�
build_optionsz9Extra arguments to be supplied to 'setup.py bdist_wheel'.)rUrmrVrTz--global-option�global_optionszcExtra global options to be supplied to the setup.py call before the install or bdist_wheel command.)rUrVrmrTz
--no-cleanz!Don't clean up build directories.)rVr[rT�no_cleanz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.�prez--disable-pip-version-check�disable_pip_version_checkz{Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.z--root-user-action�root_user_action�warn�ignorezLAction if pip is run as a root user. By default, a warning message is shown.)rUr[rkrTc��|jjsi|j_	|jdd�\}}tvr4|j	dj|djt���|jjj|g�j�y#t$r#|j	dj|��Y��wxYw)zkGiven a value spelled "algo:digest", append the digest to a list
    pointed to in a dict by the algo name.�:r�zTArguments to {} must be a hash name followed by a value, like --hash=sha256:abcde...z&Allowed hash algorithms for {} are {}.z, N)
r��hashesr#r�r$r�rr"�
setdefaultr�)rr�r@r�algo�digests      r%�_handle_merge_hashr	�s���
�=�=���!��
�
��
��{�{�3��*���f��=� ����4�;�;�����=�1�
�	
�
�M�M���#�#�D�"�-�4�4�V�<���
����
��v�g��	
�
�s�B0�0)C�Cz--hashr�stringzgVerify that the package's archive matches this hash before installing. Example: --hash=sha256:abcdef...)rUrVr�rjrT�hashz--require-hashes�require_hashesz�Require a hash to check each requirement against, for repeatable installs. This option is implied when any package in a requirements file has a --hash option.z--pathz^Restrict to the specified installation path for listing packages (can be used multiple times).)rUrjrVrT�	list_pathc�d�|jr$|js|jrtd��yy)Nz2Cannot combine '--path' with '--user' or '--local')rD�user�localr)r+s r%�check_list_path_optionr�s(���|�|��������O�P�P�*7�|r'z	--exclude�excludesr�rLz)Exclude specified package from the output)rUrVrmrjrT�list_excludez--no-python-version-warning�no_python_version_warningz>Silence deprecation warnings for upcoming unsupported Pythons.zno-binary-enable-wheel-cachez
--use-feature�features_enabled�featurez	fast-deps�
truststorez<Enable new functionality, that may be backward incompatible.)rUrmrVr[rkrT�use_new_featurez--use-deprecated�deprecated_features_enabledzlegacy-resolverzDEnable deprecated functionality, that will be removed in the future.�use_deprecated_featurezGeneral Options)r*r+�
general_groupzPackage Index Options�index_group)F)��__doc__�importlib.utilr��loggingrCr �	functoolsr�optparserrrrrr	�typingr
rrr
r�pip._vendor.packaging.utilsr�pip._internal.cli.parserr�pip._internal.exceptionsr�pip._internal.locationsrr�#pip._internal.models.format_controlr�pip._internal.models.indexr�"pip._internal.models.target_pythonr�pip._internal.utils.hashesr�pip._internal.utils.miscr�	getLoggerrM�loggerrur&r.�boolr>rGrIrKrW�__annotations__rXr\r^r_r`rarcrdrerfrlrnrortrwr{rr�r��
simple_urlr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r3rxr�r�r2r5r4r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr	rrr
rrr�ALWAYS_ENABLED_FEATURESrrrrrSr'r%�<module>r2sX
�����	���M�M��7�7�9�7�1�B�=�+�;�4�.�	��	�	�8�	$���|��V��#��$��	�T�#�s�(�^�	�5G�	�K�	�%�F�%�$�%�4�%�P%�v�%�C�%��%��%�$�v�$�C�$��$��$�.��.� '�
���	��	�
 ��x��V����%,�
�
�	���	-�
%�
�H�S�&�[�!�
�(/�
��	���	�
(�
�x��V��$�
�-4�
���	���	(�-��H�S�&�[�)��6=�
��	&��	H�6��X�c�6�k�2��!(�
��	�	9�	!����f����")�
���	��
�	O�"���#�v�+�	��#*�
��	���	#�
#��(�3��;�
��")�
���	��	!�
"���#�v�+�	�� '�
��
�	��
�	� ��x��V����'.�
��	�	�
�5�M��	R�'��h�s�F�{�#��%�
����	��	�	+�	��X�c�6�k��	�#*�
��	���	'�#��(�3��;�
��+2�
��	�8��	�+��(�3��;�'�� '�
�
�	�	��	P�
 ��x��V����")�
��	�	�
�
 �
"���#�v�+�	��")�
����	�	��	=�	"���#�v�+�	�	��v��&�
��	�	��	 ���h�s�F�{���&-�
��	�	���
5�	&��X�c�6�k�
"�	�$+�
����	���O�O�
�$�	�8�C��K� ��
��
�#*�
��	���	L�
#��(�3��;�
��
�F�
� 	�f�	�
�V�
�
�f�
��&��/��/��/�S�/�,�/�SW�/�
%�
�����	�	�����
�
>���X�c�6�k���$(��(��(�3�(�
��� ��),��6B��	����� ��),��6B��	���6��$�V��$$+�
��	����	J�$�	�8�C��K� ��  �3� �5��s�C�x��(�3�-�1O�+P� �:0��0� �0�),�0�6B�0�	�0�")0�
��	���
#�	��	�	�
�)����f��%��*)0�
��	���	*�
)����f��%�
� &�
��	����	���h�s�F�{���$ �� �� ����<��
�v�
�$+�
��	���	�	)�$�	�8�C��K� ��$��$��$�%(�$�2>�$�	�$�:#*�
��	��
!�	�
#��(�3��;�
��")�
���	���	.�"���#�v�+�	��18�
��	!��	2�1����f��-��-4�
��	���
�
	-��H�S�&�[�)�	�+2�
� �	���	<�
+��(�3��;�'�� %�� %�� %�%(� %�2>� %�	� %�F�
��	���
7�
�
�C���
��	��
"��	��
�s����� ��),��6B��	��&*1�
���	�	��
$��
,�*���#�v�+�&��(/�
��	���	D�
(�
�x��V��$��)0�
��	���
6�
)����f��%��#*�
����	,�#��(�3��;�
��%�
����
&���X�c�6�k���4;�
�!�	$���
A�
4��8�C��K�0��+2�
��	��
�X��	W�
+��(�3��;�'��=��=� �=�),�=�6B�=�	�=�0&�
��
��
�	�
?���h�s�F�{���)0�
��	���
-�
	)����f��%�	�$+�
��	�	��
-�
$�	�8�C��K� ��Q�F�Q�t�Q�
'.�
��	���	�	4�'��h�s�F�{�#��4;�
�!�	$���	I�
4��8�C��K�0��#���*1�
��	������
��	
�

H�
*���#�v�+�&�
�18�
��	&�����
�Q�1����f��-��&
�
�������
����
���������!��!���3�!�
�t�C��H�~��@
$�����	���T�#�s�(�^�r'python3.12/site-packages/pip/_internal/cli/status_codes.py000064400000000164151732701470017505 0ustar00SUCCESS = 0
ERROR = 1
UNKNOWN_ERROR = 2
VIRTUALENV_NOT_FOUND = 3
PREVIOUS_BUILD_DIR_ERROR = 4
NO_MATCHES_FOUND = 23
python3.12/site-packages/pip/_internal/cli/command_context.py000064400000001406151732701470020167 0ustar00from contextlib import ExitStack, contextmanager
from typing import ContextManager, Generator, TypeVar

_T = TypeVar("_T", covariant=True)


class CommandContextMixIn:
    def __init__(self) -> None:
        super().__init__()
        self._in_main_context = False
        self._main_context = ExitStack()

    @contextmanager
    def main_context(self) -> Generator[None, None, None]:
        assert not self._in_main_context

        self._in_main_context = True
        try:
            with self._main_context:
                yield
        finally:
            self._in_main_context = False

    def enter_context(self, context_provider: ContextManager[_T]) -> _T:
        assert self._in_main_context

        return self._main_context.enter_context(context_provider)
python3.12/site-packages/pip/_internal/cli/base_command.py000064400000021035151732701470017415 0ustar00"""Base Command class, and related routines"""

import functools
import logging
import logging.config
import optparse
import os
import sys
import traceback
from optparse import Values
from typing import Any, Callable, List, Optional, Tuple

from pip._vendor.rich import traceback as rich_traceback

from pip._internal.cli import cmdoptions
from pip._internal.cli.command_context import CommandContextMixIn
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip._internal.cli.status_codes import (
    ERROR,
    PREVIOUS_BUILD_DIR_ERROR,
    UNKNOWN_ERROR,
    VIRTUALENV_NOT_FOUND,
)
from pip._internal.exceptions import (
    BadCommand,
    CommandError,
    DiagnosticPipError,
    InstallationError,
    NetworkConnectionError,
    PreviousBuildDirError,
    UninstallationError,
)
from pip._internal.utils.filesystem import check_path_owner
from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging
from pip._internal.utils.misc import get_prog, normalize_path
from pip._internal.utils.temp_dir import TempDirectoryTypeRegistry as TempDirRegistry
from pip._internal.utils.temp_dir import global_tempdir_manager, tempdir_registry
from pip._internal.utils.virtualenv import running_under_virtualenv

__all__ = ["Command"]

logger = logging.getLogger(__name__)


class Command(CommandContextMixIn):
    usage: str = ""
    ignore_require_venv: bool = False

    def __init__(self, name: str, summary: str, isolated: bool = False) -> None:
        super().__init__()

        self.name = name
        self.summary = summary
        self.parser = ConfigOptionParser(
            usage=self.usage,
            prog=f"{get_prog()} {name}",
            formatter=UpdatingDefaultsHelpFormatter(),
            add_help_option=False,
            name=name,
            description=self.__doc__,
            isolated=isolated,
        )

        self.tempdir_registry: Optional[TempDirRegistry] = None

        # Commands should add options to this option group
        optgroup_name = f"{self.name.capitalize()} Options"
        self.cmd_opts = optparse.OptionGroup(self.parser, optgroup_name)

        # Add the general options
        gen_opts = cmdoptions.make_option_group(
            cmdoptions.general_group,
            self.parser,
        )
        self.parser.add_option_group(gen_opts)

        self.add_options()

    def add_options(self) -> None:
        pass

    def handle_pip_version_check(self, options: Values) -> None:
        """
        This is a no-op so that commands by default do not do the pip version
        check.
        """
        # Make sure we do the pip version check if the index_group options
        # are present.
        assert not hasattr(options, "no_index")

    def run(self, options: Values, args: List[str]) -> int:
        raise NotImplementedError

    def parse_args(self, args: List[str]) -> Tuple[Values, List[str]]:
        # factored out for testability
        return self.parser.parse_args(args)

    def main(self, args: List[str]) -> int:
        try:
            with self.main_context():
                return self._main(args)
        finally:
            logging.shutdown()

    def _main(self, args: List[str]) -> int:
        # We must initialize this before the tempdir manager, otherwise the
        # configuration would not be accessible by the time we clean up the
        # tempdir manager.
        self.tempdir_registry = self.enter_context(tempdir_registry())
        # Intentionally set as early as possible so globally-managed temporary
        # directories are available to the rest of the code.
        self.enter_context(global_tempdir_manager())

        options, args = self.parse_args(args)

        # Set verbosity so that it can be used elsewhere.
        self.verbosity = options.verbose - options.quiet

        level_number = setup_logging(
            verbosity=self.verbosity,
            no_color=options.no_color,
            user_log_file=options.log,
        )

        always_enabled_features = set(options.features_enabled) & set(
            cmdoptions.ALWAYS_ENABLED_FEATURES
        )
        if always_enabled_features:
            logger.warning(
                "The following features are always enabled: %s. ",
                ", ".join(sorted(always_enabled_features)),
            )

        # Make sure that the --python argument isn't specified after the
        # subcommand. We can tell, because if --python was specified,
        # we should only reach this point if we're running in the created
        # subprocess, which has the _PIP_RUNNING_IN_SUBPROCESS environment
        # variable set.
        if options.python and "_PIP_RUNNING_IN_SUBPROCESS" not in os.environ:
            logger.critical(
                "The --python option must be placed before the pip subcommand name"
            )
            sys.exit(ERROR)

        # TODO: Try to get these passing down from the command?
        #       without resorting to os.environ to hold these.
        #       This also affects isolated builds and it should.

        if options.no_input:
            os.environ["PIP_NO_INPUT"] = "1"

        if options.exists_action:
            os.environ["PIP_EXISTS_ACTION"] = " ".join(options.exists_action)

        if options.require_venv and not self.ignore_require_venv:
            # If a venv is required check if it can really be found
            if not running_under_virtualenv():
                logger.critical("Could not find an activated virtualenv (required).")
                sys.exit(VIRTUALENV_NOT_FOUND)

        if options.cache_dir:
            options.cache_dir = normalize_path(options.cache_dir)
            if not check_path_owner(options.cache_dir):
                logger.warning(
                    "The directory '%s' or its parent directory is not owned "
                    "or is not writable by the current user. The cache "
                    "has been disabled. Check the permissions and owner of "
                    "that directory. If executing pip with sudo, you should "
                    "use sudo's -H flag.",
                    options.cache_dir,
                )
                options.cache_dir = None

        def intercepts_unhandled_exc(
            run_func: Callable[..., int]
        ) -> Callable[..., int]:
            @functools.wraps(run_func)
            def exc_logging_wrapper(*args: Any) -> int:
                try:
                    status = run_func(*args)
                    assert isinstance(status, int)
                    return status
                except DiagnosticPipError as exc:
                    logger.error("%s", exc, extra={"rich": True})
                    logger.debug("Exception information:", exc_info=True)

                    return ERROR
                except PreviousBuildDirError as exc:
                    logger.critical(str(exc))
                    logger.debug("Exception information:", exc_info=True)

                    return PREVIOUS_BUILD_DIR_ERROR
                except (
                    InstallationError,
                    UninstallationError,
                    BadCommand,
                    NetworkConnectionError,
                ) as exc:
                    logger.critical(str(exc))
                    logger.debug("Exception information:", exc_info=True)

                    return ERROR
                except CommandError as exc:
                    logger.critical("%s", exc)
                    logger.debug("Exception information:", exc_info=True)

                    return ERROR
                except BrokenStdoutLoggingError:
                    # Bypass our logger and write any remaining messages to
                    # stderr because stdout no longer works.
                    print("ERROR: Pipe to stdout was broken", file=sys.stderr)
                    if level_number <= logging.DEBUG:
                        traceback.print_exc(file=sys.stderr)

                    return ERROR
                except KeyboardInterrupt:
                    logger.critical("Operation cancelled by user")
                    logger.debug("Exception information:", exc_info=True)

                    return ERROR
                except BaseException:
                    logger.critical("Exception:", exc_info=True)

                    return UNKNOWN_ERROR

            return exc_logging_wrapper

        try:
            if not options.debug_mode:
                run = intercepts_unhandled_exc(self.run)
            else:
                run = self.run
                rich_traceback.install(show_locals=True)
            return run(options, args)
        finally:
            self.handle_pip_version_check(options)
python3.12/site-packages/pip/_internal/cli/cmdoptions.py000064400000072645151732701470017201 0ustar00"""
shared options and groups

The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this design.
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import importlib.util
import logging
import os
import textwrap
from functools import partial
from optparse import SUPPRESS_HELP, Option, OptionGroup, OptionParser, Values
from textwrap import dedent
from typing import Any, Callable, Dict, Optional, Tuple

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.cli.parser import ConfigOptionParser
from pip._internal.exceptions import CommandError
from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
from pip._internal.models.format_control import FormatControl
from pip._internal.models.index import PyPI
from pip._internal.models.target_python import TargetPython
from pip._internal.utils.hashes import STRONG_HASHES
from pip._internal.utils.misc import strtobool

logger = logging.getLogger(__name__)


def raise_option_error(parser: OptionParser, option: Option, msg: str) -> None:
    """
    Raise an option parsing error using parser.error().

    Args:
      parser: an OptionParser instance.
      option: an Option instance.
      msg: the error text.
    """
    msg = f"{option} error: {msg}"
    msg = textwrap.fill(" ".join(msg.split()))
    parser.error(msg)


def make_option_group(group: Dict[str, Any], parser: ConfigOptionParser) -> OptionGroup:
    """
    Return an OptionGroup object
    group  -- assumed to be dict with 'name' and 'options' keys
    parser -- an optparse Parser
    """
    option_group = OptionGroup(parser, group["name"])
    for option in group["options"]:
        option_group.add_option(option())
    return option_group


def check_dist_restriction(options: Values, check_target: bool = False) -> None:
    """Function for determining if custom platform options are allowed.

    :param options: The OptionParser options.
    :param check_target: Whether or not to check if --target is being used.
    """
    dist_restriction_set = any(
        [
            options.python_version,
            options.platforms,
            options.abis,
            options.implementation,
        ]
    )

    binary_only = FormatControl(set(), {":all:"})
    sdist_dependencies_allowed = (
        options.format_control != binary_only and not options.ignore_dependencies
    )

    # Installations or downloads using dist restrictions must not combine
    # source distributions and dist-specific wheels, as they are not
    # guaranteed to be locally compatible.
    if dist_restriction_set and sdist_dependencies_allowed:
        raise CommandError(
            "When restricting platform and interpreter constraints using "
            "--python-version, --platform, --abi, or --implementation, "
            "either --no-deps must be set, or --only-binary=:all: must be "
            "set and --no-binary must not be set (or must be set to "
            ":none:)."
        )

    if check_target:
        if not options.dry_run and dist_restriction_set and not options.target_dir:
            raise CommandError(
                "Can not use any platform or abi specific options unless "
                "installing via '--target' or using '--dry-run'"
            )


def _path_option_check(option: Option, opt: str, value: str) -> str:
    return os.path.expanduser(value)


def _package_name_option_check(option: Option, opt: str, value: str) -> str:
    return canonicalize_name(value)


class PipOption(Option):
    TYPES = Option.TYPES + ("path", "package_name")
    TYPE_CHECKER = Option.TYPE_CHECKER.copy()
    TYPE_CHECKER["package_name"] = _package_name_option_check
    TYPE_CHECKER["path"] = _path_option_check


###########
# options #
###########

help_: Callable[..., Option] = partial(
    Option,
    "-h",
    "--help",
    dest="help",
    action="help",
    help="Show help.",
)

debug_mode: Callable[..., Option] = partial(
    Option,
    "--debug",
    dest="debug_mode",
    action="store_true",
    default=False,
    help=(
        "Let unhandled exceptions propagate outside the main subroutine, "
        "instead of logging them to stderr."
    ),
)

isolated_mode: Callable[..., Option] = partial(
    Option,
    "--isolated",
    dest="isolated_mode",
    action="store_true",
    default=False,
    help=(
        "Run pip in an isolated mode, ignoring environment variables and user "
        "configuration."
    ),
)

require_virtualenv: Callable[..., Option] = partial(
    Option,
    "--require-virtualenv",
    "--require-venv",
    dest="require_venv",
    action="store_true",
    default=False,
    help=(
        "Allow pip to only run in a virtual environment; "
        "exit with an error otherwise."
    ),
)

override_externally_managed: Callable[..., Option] = partial(
    Option,
    "--break-system-packages",
    dest="override_externally_managed",
    action="store_true",
    help="Allow pip to modify an EXTERNALLY-MANAGED Python installation",
)

python: Callable[..., Option] = partial(
    Option,
    "--python",
    dest="python",
    help="Run pip with the specified Python interpreter.",
)

verbose: Callable[..., Option] = partial(
    Option,
    "-v",
    "--verbose",
    dest="verbose",
    action="count",
    default=0,
    help="Give more output. Option is additive, and can be used up to 3 times.",
)

no_color: Callable[..., Option] = partial(
    Option,
    "--no-color",
    dest="no_color",
    action="store_true",
    default=False,
    help="Suppress colored output.",
)

version: Callable[..., Option] = partial(
    Option,
    "-V",
    "--version",
    dest="version",
    action="store_true",
    help="Show version and exit.",
)

quiet: Callable[..., Option] = partial(
    Option,
    "-q",
    "--quiet",
    dest="quiet",
    action="count",
    default=0,
    help=(
        "Give less output. Option is additive, and can be used up to 3"
        " times (corresponding to WARNING, ERROR, and CRITICAL logging"
        " levels)."
    ),
)

progress_bar: Callable[..., Option] = partial(
    Option,
    "--progress-bar",
    dest="progress_bar",
    type="choice",
    choices=["on", "off"],
    default="on",
    help="Specify whether the progress bar should be used [on, off] (default: on)",
)

log: Callable[..., Option] = partial(
    PipOption,
    "--log",
    "--log-file",
    "--local-log",
    dest="log",
    metavar="path",
    type="path",
    help="Path to a verbose appending log.",
)

no_input: Callable[..., Option] = partial(
    Option,
    # Don't ask for input
    "--no-input",
    dest="no_input",
    action="store_true",
    default=False,
    help="Disable prompting for input.",
)

keyring_provider: Callable[..., Option] = partial(
    Option,
    "--keyring-provider",
    dest="keyring_provider",
    choices=["auto", "disabled", "import", "subprocess"],
    default="auto",
    help=(
        "Enable the credential lookup via the keyring library if user input is allowed."
        " Specify which mechanism to use [disabled, import, subprocess]."
        " (default: disabled)"
    ),
)

proxy: Callable[..., Option] = partial(
    Option,
    "--proxy",
    dest="proxy",
    type="str",
    default="",
    help="Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.",
)

retries: Callable[..., Option] = partial(
    Option,
    "--retries",
    dest="retries",
    type="int",
    default=5,
    help="Maximum number of retries each connection should attempt "
    "(default %default times).",
)

timeout: Callable[..., Option] = partial(
    Option,
    "--timeout",
    "--default-timeout",
    metavar="sec",
    dest="timeout",
    type="float",
    default=15,
    help="Set the socket timeout (default %default seconds).",
)


def exists_action() -> Option:
    return Option(
        # Option when path already exist
        "--exists-action",
        dest="exists_action",
        type="choice",
        choices=["s", "i", "w", "b", "a"],
        default=[],
        action="append",
        metavar="action",
        help="Default action when a path already exists: "
        "(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.",
    )


cert: Callable[..., Option] = partial(
    PipOption,
    "--cert",
    dest="cert",
    type="path",
    metavar="path",
    help=(
        "Path to PEM-encoded CA certificate bundle. "
        "If provided, overrides the default. "
        "See 'SSL Certificate Verification' in pip documentation "
        "for more information."
    ),
)

client_cert: Callable[..., Option] = partial(
    PipOption,
    "--client-cert",
    dest="client_cert",
    type="path",
    default=None,
    metavar="path",
    help="Path to SSL client certificate, a single file containing the "
    "private key and the certificate in PEM format.",
)

index_url: Callable[..., Option] = partial(
    Option,
    "-i",
    "--index-url",
    "--pypi-url",
    dest="index_url",
    metavar="URL",
    default=PyPI.simple_url,
    help="Base URL of the Python Package Index (default %default). "
    "This should point to a repository compliant with PEP 503 "
    "(the simple repository API) or a local directory laid out "
    "in the same format.",
)


def extra_index_url() -> Option:
    return Option(
        "--extra-index-url",
        dest="extra_index_urls",
        metavar="URL",
        action="append",
        default=[],
        help="Extra URLs of package indexes to use in addition to "
        "--index-url. Should follow the same rules as "
        "--index-url.",
    )


no_index: Callable[..., Option] = partial(
    Option,
    "--no-index",
    dest="no_index",
    action="store_true",
    default=False,
    help="Ignore package index (only looking at --find-links URLs instead).",
)


def find_links() -> Option:
    return Option(
        "-f",
        "--find-links",
        dest="find_links",
        action="append",
        default=[],
        metavar="url",
        help="If a URL or path to an html file, then parse for links to "
        "archives such as sdist (.tar.gz) or wheel (.whl) files. "
        "If a local path or file:// URL that's a directory, "
        "then look for archives in the directory listing. "
        "Links to VCS project URLs are not supported.",
    )


def trusted_host() -> Option:
    return Option(
        "--trusted-host",
        dest="trusted_hosts",
        action="append",
        metavar="HOSTNAME",
        default=[],
        help="Mark this host or host:port pair as trusted, even though it "
        "does not have valid or any HTTPS.",
    )


def constraints() -> Option:
    return Option(
        "-c",
        "--constraint",
        dest="constraints",
        action="append",
        default=[],
        metavar="file",
        help="Constrain versions using the given constraints file. "
        "This option can be used multiple times.",
    )


def requirements() -> Option:
    return Option(
        "-r",
        "--requirement",
        dest="requirements",
        action="append",
        default=[],
        metavar="file",
        help="Install from the given requirements file. "
        "This option can be used multiple times.",
    )


def editable() -> Option:
    return Option(
        "-e",
        "--editable",
        dest="editables",
        action="append",
        default=[],
        metavar="path/url",
        help=(
            "Install a project in editable mode (i.e. setuptools "
            '"develop mode") from a local project path or a VCS url.'
        ),
    )


def _handle_src(option: Option, opt_str: str, value: str, parser: OptionParser) -> None:
    value = os.path.abspath(value)
    setattr(parser.values, option.dest, value)


src: Callable[..., Option] = partial(
    PipOption,
    "--src",
    "--source",
    "--source-dir",
    "--source-directory",
    dest="src_dir",
    type="path",
    metavar="dir",
    default=get_src_prefix(),
    action="callback",
    callback=_handle_src,
    help="Directory to check out editable projects into. "
    'The default in a virtualenv is "<venv path>/src". '
    'The default for global installs is "<current dir>/src".',
)


def _get_format_control(values: Values, option: Option) -> Any:
    """Get a format_control object."""
    return getattr(values, option.dest)


def _handle_no_binary(
    option: Option, opt_str: str, value: str, parser: OptionParser
) -> None:
    existing = _get_format_control(parser.values, option)
    FormatControl.handle_mutual_excludes(
        value,
        existing.no_binary,
        existing.only_binary,
    )


def _handle_only_binary(
    option: Option, opt_str: str, value: str, parser: OptionParser
) -> None:
    existing = _get_format_control(parser.values, option)
    FormatControl.handle_mutual_excludes(
        value,
        existing.only_binary,
        existing.no_binary,
    )


def no_binary() -> Option:
    format_control = FormatControl(set(), set())
    return Option(
        "--no-binary",
        dest="format_control",
        action="callback",
        callback=_handle_no_binary,
        type="str",
        default=format_control,
        help="Do not use binary packages. Can be supplied multiple times, and "
        'each time adds to the existing value. Accepts either ":all:" to '
        'disable all binary packages, ":none:" to empty the set (notice '
        "the colons), or one or more package names with commas between "
        "them (no colons). Note that some packages are tricky to compile "
        "and may fail to install when this option is used on them.",
    )


def only_binary() -> Option:
    format_control = FormatControl(set(), set())
    return Option(
        "--only-binary",
        dest="format_control",
        action="callback",
        callback=_handle_only_binary,
        type="str",
        default=format_control,
        help="Do not use source packages. Can be supplied multiple times, and "
        'each time adds to the existing value. Accepts either ":all:" to '
        'disable all source packages, ":none:" to empty the set, or one '
        "or more package names with commas between them. Packages "
        "without binary distributions will fail to install when this "
        "option is used on them.",
    )


platforms: Callable[..., Option] = partial(
    Option,
    "--platform",
    dest="platforms",
    metavar="platform",
    action="append",
    default=None,
    help=(
        "Only use wheels compatible with <platform>. Defaults to the "
        "platform of the running system. Use this option multiple times to "
        "specify multiple platforms supported by the target interpreter."
    ),
)


# This was made a separate function for unit-testing purposes.
def _convert_python_version(value: str) -> Tuple[Tuple[int, ...], Optional[str]]:
    """
    Convert a version string like "3", "37", or "3.7.3" into a tuple of ints.

    :return: A 2-tuple (version_info, error_msg), where `error_msg` is
        non-None if and only if there was a parsing error.
    """
    if not value:
        # The empty string is the same as not providing a value.
        return (None, None)

    parts = value.split(".")
    if len(parts) > 3:
        return ((), "at most three version parts are allowed")

    if len(parts) == 1:
        # Then we are in the case of "3" or "37".
        value = parts[0]
        if len(value) > 1:
            parts = [value[0], value[1:]]

    try:
        version_info = tuple(int(part) for part in parts)
    except ValueError:
        return ((), "each version part must be an integer")

    return (version_info, None)


def _handle_python_version(
    option: Option, opt_str: str, value: str, parser: OptionParser
) -> None:
    """
    Handle a provided --python-version value.
    """
    version_info, error_msg = _convert_python_version(value)
    if error_msg is not None:
        msg = "invalid --python-version value: {!r}: {}".format(
            value,
            error_msg,
        )
        raise_option_error(parser, option=option, msg=msg)

    parser.values.python_version = version_info


python_version: Callable[..., Option] = partial(
    Option,
    "--python-version",
    dest="python_version",
    metavar="python_version",
    action="callback",
    callback=_handle_python_version,
    type="str",
    default=None,
    help=dedent(
        """\
    The Python interpreter version to use for wheel and "Requires-Python"
    compatibility checks. Defaults to a version derived from the running
    interpreter. The version can be specified using up to three dot-separated
    integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor
    version can also be given as a string without dots (e.g. "37" for 3.7.0).
    """
    ),
)


implementation: Callable[..., Option] = partial(
    Option,
    "--implementation",
    dest="implementation",
    metavar="implementation",
    default=None,
    help=(
        "Only use wheels compatible with Python "
        "implementation <implementation>, e.g. 'pp', 'jy', 'cp', "
        " or 'ip'. If not specified, then the current "
        "interpreter implementation is used.  Use 'py' to force "
        "implementation-agnostic wheels."
    ),
)


abis: Callable[..., Option] = partial(
    Option,
    "--abi",
    dest="abis",
    metavar="abi",
    action="append",
    default=None,
    help=(
        "Only use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. "
        "If not specified, then the current interpreter abi tag is used. "
        "Use this option multiple times to specify multiple abis supported "
        "by the target interpreter. Generally you will need to specify "
        "--implementation, --platform, and --python-version when using this "
        "option."
    ),
)


def add_target_python_options(cmd_opts: OptionGroup) -> None:
    cmd_opts.add_option(platforms())
    cmd_opts.add_option(python_version())
    cmd_opts.add_option(implementation())
    cmd_opts.add_option(abis())


def make_target_python(options: Values) -> TargetPython:
    target_python = TargetPython(
        platforms=options.platforms,
        py_version_info=options.python_version,
        abis=options.abis,
        implementation=options.implementation,
    )

    return target_python


def prefer_binary() -> Option:
    return Option(
        "--prefer-binary",
        dest="prefer_binary",
        action="store_true",
        default=False,
        help=(
            "Prefer binary packages over source packages, even if the "
            "source packages are newer."
        ),
    )


cache_dir: Callable[..., Option] = partial(
    PipOption,
    "--cache-dir",
    dest="cache_dir",
    default=USER_CACHE_DIR,
    metavar="dir",
    type="path",
    help="Store the cache data in <dir>.",
)


def _handle_no_cache_dir(
    option: Option, opt: str, value: str, parser: OptionParser
) -> None:
    """
    Process a value provided for the --no-cache-dir option.

    This is an optparse.Option callback for the --no-cache-dir option.
    """
    # The value argument will be None if --no-cache-dir is passed via the
    # command-line, since the option doesn't accept arguments.  However,
    # the value can be non-None if the option is triggered e.g. by an
    # environment variable, like PIP_NO_CACHE_DIR=true.
    if value is not None:
        # Then parse the string value to get argument error-checking.
        try:
            strtobool(value)
        except ValueError as exc:
            raise_option_error(parser, option=option, msg=str(exc))

    # Originally, setting PIP_NO_CACHE_DIR to a value that strtobool()
    # converted to 0 (like "false" or "no") caused cache_dir to be disabled
    # rather than enabled (logic would say the latter).  Thus, we disable
    # the cache directory not just on values that parse to True, but (for
    # backwards compatibility reasons) also on values that parse to False.
    # In other words, always set it to False if the option is provided in
    # some (valid) form.
    parser.values.cache_dir = False


no_cache: Callable[..., Option] = partial(
    Option,
    "--no-cache-dir",
    dest="cache_dir",
    action="callback",
    callback=_handle_no_cache_dir,
    help="Disable the cache.",
)

no_deps: Callable[..., Option] = partial(
    Option,
    "--no-deps",
    "--no-dependencies",
    dest="ignore_dependencies",
    action="store_true",
    default=False,
    help="Don't install package dependencies.",
)

ignore_requires_python: Callable[..., Option] = partial(
    Option,
    "--ignore-requires-python",
    dest="ignore_requires_python",
    action="store_true",
    help="Ignore the Requires-Python information.",
)

no_build_isolation: Callable[..., Option] = partial(
    Option,
    "--no-build-isolation",
    dest="build_isolation",
    action="store_false",
    default=True,
    help="Disable isolation when building a modern source distribution. "
    "Build dependencies specified by PEP 518 must be already installed "
    "if this option is used.",
)

check_build_deps: Callable[..., Option] = partial(
    Option,
    "--check-build-dependencies",
    dest="check_build_deps",
    action="store_true",
    default=False,
    help="Check the build dependencies when PEP517 is used.",
)


def _handle_no_use_pep517(
    option: Option, opt: str, value: str, parser: OptionParser
) -> None:
    """
    Process a value provided for the --no-use-pep517 option.

    This is an optparse.Option callback for the no_use_pep517 option.
    """
    # Since --no-use-pep517 doesn't accept arguments, the value argument
    # will be None if --no-use-pep517 is passed via the command-line.
    # However, the value can be non-None if the option is triggered e.g.
    # by an environment variable, for example "PIP_NO_USE_PEP517=true".
    if value is not None:
        msg = """A value was passed for --no-use-pep517,
        probably using either the PIP_NO_USE_PEP517 environment variable
        or the "no-use-pep517" config file option. Use an appropriate value
        of the PIP_USE_PEP517 environment variable or the "use-pep517"
        config file option instead.
        """
        raise_option_error(parser, option=option, msg=msg)

    # If user doesn't wish to use pep517, we check if setuptools and wheel are installed
    # and raise error if it is not.
    packages = ("setuptools", "wheel")
    if not all(importlib.util.find_spec(package) for package in packages):
        msg = (
            f"It is not possible to use --no-use-pep517 "
            f"without {' and '.join(packages)} installed."
        )
        raise_option_error(parser, option=option, msg=msg)

    # Otherwise, --no-use-pep517 was passed via the command-line.
    parser.values.use_pep517 = False


use_pep517: Any = partial(
    Option,
    "--use-pep517",
    dest="use_pep517",
    action="store_true",
    default=None,
    help="Use PEP 517 for building source distributions "
    "(use --no-use-pep517 to force legacy behaviour).",
)

no_use_pep517: Any = partial(
    Option,
    "--no-use-pep517",
    dest="use_pep517",
    action="callback",
    callback=_handle_no_use_pep517,
    default=None,
    help=SUPPRESS_HELP,
)


def _handle_config_settings(
    option: Option, opt_str: str, value: str, parser: OptionParser
) -> None:
    key, sep, val = value.partition("=")
    if sep != "=":
        parser.error(f"Arguments to {opt_str} must be of the form KEY=VAL")
    dest = getattr(parser.values, option.dest)
    if dest is None:
        dest = {}
        setattr(parser.values, option.dest, dest)
    if key in dest:
        if isinstance(dest[key], list):
            dest[key].append(val)
        else:
            dest[key] = [dest[key], val]
    else:
        dest[key] = val


config_settings: Callable[..., Option] = partial(
    Option,
    "-C",
    "--config-settings",
    dest="config_settings",
    type=str,
    action="callback",
    callback=_handle_config_settings,
    metavar="settings",
    help="Configuration settings to be passed to the PEP 517 build backend. "
    "Settings take the form KEY=VALUE. Use multiple --config-settings options "
    "to pass multiple keys to the backend.",
)

build_options: Callable[..., Option] = partial(
    Option,
    "--build-option",
    dest="build_options",
    metavar="options",
    action="append",
    help="Extra arguments to be supplied to 'setup.py bdist_wheel'.",
)

global_options: Callable[..., Option] = partial(
    Option,
    "--global-option",
    dest="global_options",
    action="append",
    metavar="options",
    help="Extra global options to be supplied to the setup.py "
    "call before the install or bdist_wheel command.",
)

no_clean: Callable[..., Option] = partial(
    Option,
    "--no-clean",
    action="store_true",
    default=False,
    help="Don't clean up build directories.",
)

pre: Callable[..., Option] = partial(
    Option,
    "--pre",
    action="store_true",
    default=False,
    help="Include pre-release and development versions. By default, "
    "pip only finds stable versions.",
)

disable_pip_version_check: Callable[..., Option] = partial(
    Option,
    "--disable-pip-version-check",
    dest="disable_pip_version_check",
    action="store_true",
    default=False,
    help="Don't periodically check PyPI to determine whether a new version "
    "of pip is available for download. Implied with --no-index.",
)

root_user_action: Callable[..., Option] = partial(
    Option,
    "--root-user-action",
    dest="root_user_action",
    default="warn",
    choices=["warn", "ignore"],
    help="Action if pip is run as a root user. By default, a warning message is shown.",
)


def _handle_merge_hash(
    option: Option, opt_str: str, value: str, parser: OptionParser
) -> None:
    """Given a value spelled "algo:digest", append the digest to a list
    pointed to in a dict by the algo name."""
    if not parser.values.hashes:
        parser.values.hashes = {}
    try:
        algo, digest = value.split(":", 1)
    except ValueError:
        parser.error(
            "Arguments to {} must be a hash name "
            "followed by a value, like --hash=sha256:"
            "abcde...".format(opt_str)
        )
    if algo not in STRONG_HASHES:
        parser.error(
            "Allowed hash algorithms for {} are {}.".format(
                opt_str, ", ".join(STRONG_HASHES)
            )
        )
    parser.values.hashes.setdefault(algo, []).append(digest)


hash: Callable[..., Option] = partial(
    Option,
    "--hash",
    # Hash values eventually end up in InstallRequirement.hashes due to
    # __dict__ copying in process_line().
    dest="hashes",
    action="callback",
    callback=_handle_merge_hash,
    type="string",
    help="Verify that the package's archive matches this "
    "hash before installing. Example: --hash=sha256:abcdef...",
)


require_hashes: Callable[..., Option] = partial(
    Option,
    "--require-hashes",
    dest="require_hashes",
    action="store_true",
    default=False,
    help="Require a hash to check each requirement against, for "
    "repeatable installs. This option is implied when any package in a "
    "requirements file has a --hash option.",
)


list_path: Callable[..., Option] = partial(
    PipOption,
    "--path",
    dest="path",
    type="path",
    action="append",
    help="Restrict to the specified installation path for listing "
    "packages (can be used multiple times).",
)


def check_list_path_option(options: Values) -> None:
    if options.path and (options.user or options.local):
        raise CommandError("Cannot combine '--path' with '--user' or '--local'")


list_exclude: Callable[..., Option] = partial(
    PipOption,
    "--exclude",
    dest="excludes",
    action="append",
    metavar="package",
    type="package_name",
    help="Exclude specified package from the output",
)


no_python_version_warning: Callable[..., Option] = partial(
    Option,
    "--no-python-version-warning",
    dest="no_python_version_warning",
    action="store_true",
    default=False,
    help="Silence deprecation warnings for upcoming unsupported Pythons.",
)


# Features that are now always on. A warning is printed if they are used.
ALWAYS_ENABLED_FEATURES = [
    "no-binary-enable-wheel-cache",  # always on since 23.1
]

use_new_feature: Callable[..., Option] = partial(
    Option,
    "--use-feature",
    dest="features_enabled",
    metavar="feature",
    action="append",
    default=[],
    choices=[
        "fast-deps",
        "truststore",
    ]
    + ALWAYS_ENABLED_FEATURES,
    help="Enable new functionality, that may be backward incompatible.",
)

use_deprecated_feature: Callable[..., Option] = partial(
    Option,
    "--use-deprecated",
    dest="deprecated_features_enabled",
    metavar="feature",
    action="append",
    default=[],
    choices=[
        "legacy-resolver",
    ],
    help=("Enable deprecated functionality, that will be removed in the future."),
)


##########
# groups #
##########

general_group: Dict[str, Any] = {
    "name": "General Options",
    "options": [
        help_,
        debug_mode,
        isolated_mode,
        require_virtualenv,
        python,
        verbose,
        version,
        quiet,
        log,
        no_input,
        keyring_provider,
        proxy,
        retries,
        timeout,
        exists_action,
        trusted_host,
        cert,
        client_cert,
        cache_dir,
        no_cache,
        disable_pip_version_check,
        no_color,
        no_python_version_warning,
        use_new_feature,
        use_deprecated_feature,
    ],
}

index_group: Dict[str, Any] = {
    "name": "Package Index Options",
    "options": [
        index_url,
        extra_index_url,
        no_index,
        find_links,
    ],
}
python3.12/site-packages/pip/_internal/cli/autocompletion.py000064400000015042151732701470020050 0ustar00"""Logic that powers autocompletion installed by ``pip completion``.
"""

import optparse
import os
import sys
from itertools import chain
from typing import Any, Iterable, List, Optional

from pip._internal.cli.main_parser import create_main_parser
from pip._internal.commands import commands_dict, create_command
from pip._internal.metadata import get_default_environment


def autocomplete() -> None:
    """Entry Point for completion of main and subcommand options."""
    # Don't complete if user hasn't sourced bash_completion file.
    if "PIP_AUTO_COMPLETE" not in os.environ:
        return
    cwords = os.environ["COMP_WORDS"].split()[1:]
    cword = int(os.environ["COMP_CWORD"])
    try:
        current = cwords[cword - 1]
    except IndexError:
        current = ""

    parser = create_main_parser()
    subcommands = list(commands_dict)
    options = []

    # subcommand
    subcommand_name: Optional[str] = None
    for word in cwords:
        if word in subcommands:
            subcommand_name = word
            break
    # subcommand options
    if subcommand_name is not None:
        # special case: 'help' subcommand has no options
        if subcommand_name == "help":
            sys.exit(1)
        # special case: list locally installed dists for show and uninstall
        should_list_installed = not current.startswith("-") and subcommand_name in [
            "show",
            "uninstall",
        ]
        if should_list_installed:
            env = get_default_environment()
            lc = current.lower()
            installed = [
                dist.canonical_name
                for dist in env.iter_installed_distributions(local_only=True)
                if dist.canonical_name.startswith(lc)
                and dist.canonical_name not in cwords[1:]
            ]
            # if there are no dists installed, fall back to option completion
            if installed:
                for dist in installed:
                    print(dist)
                sys.exit(1)

        should_list_installables = (
            not current.startswith("-") and subcommand_name == "install"
        )
        if should_list_installables:
            for path in auto_complete_paths(current, "path"):
                print(path)
            sys.exit(1)

        subcommand = create_command(subcommand_name)

        for opt in subcommand.parser.option_list_all:
            if opt.help != optparse.SUPPRESS_HELP:
                options += [
                    (opt_str, opt.nargs) for opt_str in opt._long_opts + opt._short_opts
                ]

        # filter out previously specified options from available options
        prev_opts = [x.split("=")[0] for x in cwords[1 : cword - 1]]
        options = [(x, v) for (x, v) in options if x not in prev_opts]
        # filter options by current input
        options = [(k, v) for k, v in options if k.startswith(current)]
        # get completion type given cwords and available subcommand options
        completion_type = get_path_completion_type(
            cwords,
            cword,
            subcommand.parser.option_list_all,
        )
        # get completion files and directories if ``completion_type`` is
        # ``<file>``, ``<dir>`` or ``<path>``
        if completion_type:
            paths = auto_complete_paths(current, completion_type)
            options = [(path, 0) for path in paths]
        for option in options:
            opt_label = option[0]
            # append '=' to options which require args
            if option[1] and option[0][:2] == "--":
                opt_label += "="
            print(opt_label)
    else:
        # show main parser options only when necessary

        opts = [i.option_list for i in parser.option_groups]
        opts.append(parser.option_list)
        flattened_opts = chain.from_iterable(opts)
        if current.startswith("-"):
            for opt in flattened_opts:
                if opt.help != optparse.SUPPRESS_HELP:
                    subcommands += opt._long_opts + opt._short_opts
        else:
            # get completion type given cwords and all available options
            completion_type = get_path_completion_type(cwords, cword, flattened_opts)
            if completion_type:
                subcommands = list(auto_complete_paths(current, completion_type))

        print(" ".join([x for x in subcommands if x.startswith(current)]))
    sys.exit(1)


def get_path_completion_type(
    cwords: List[str], cword: int, opts: Iterable[Any]
) -> Optional[str]:
    """Get the type of path completion (``file``, ``dir``, ``path`` or None)

    :param cwords: same as the environmental variable ``COMP_WORDS``
    :param cword: same as the environmental variable ``COMP_CWORD``
    :param opts: The available options to check
    :return: path completion type (``file``, ``dir``, ``path`` or None)
    """
    if cword < 2 or not cwords[cword - 2].startswith("-"):
        return None
    for opt in opts:
        if opt.help == optparse.SUPPRESS_HELP:
            continue
        for o in str(opt).split("/"):
            if cwords[cword - 2].split("=")[0] == o:
                if not opt.metavar or any(
                    x in ("path", "file", "dir") for x in opt.metavar.split("/")
                ):
                    return opt.metavar
    return None


def auto_complete_paths(current: str, completion_type: str) -> Iterable[str]:
    """If ``completion_type`` is ``file`` or ``path``, list all regular files
    and directories starting with ``current``; otherwise only list directories
    starting with ``current``.

    :param current: The word to be completed
    :param completion_type: path completion type(``file``, ``path`` or ``dir``)
    :return: A generator of regular files and/or directories
    """
    directory, filename = os.path.split(current)
    current_path = os.path.abspath(directory)
    # Don't complete paths if they can't be accessed
    if not os.access(current_path, os.R_OK):
        return
    filename = os.path.normcase(filename)
    # list all files that start with ``filename``
    file_list = (
        x for x in os.listdir(current_path) if os.path.normcase(x).startswith(filename)
    )
    for f in file_list:
        opt = os.path.join(current_path, f)
        comp_file = os.path.normcase(os.path.join(directory, f))
        # complete regular files when there is not ``<dir>`` after option
        # complete directories when there is ``<file>``, ``<path>`` or
        # ``<dir>``after option
        if completion_type != "dir" and os.path.isfile(opt):
            yield comp_file
        elif os.path.isdir(opt):
            yield os.path.join(comp_file, "")
python3.12/site-packages/pip/_internal/cli/__init__.py000064400000000204151732701470016537 0ustar00"""Subpackage containing all of pip's command line interface related code
"""

# This file intentionally does not import submodules
python3.12/site-packages/pip/_internal/cli/req_command.py000064400000043701151732701470017276 0ustar00"""Contains the Command base classes that depend on PipSession.

The classes in this module are in a separate module so the commands not
needing download / PackageFinder capability don't unnecessarily import the
PackageFinder machinery and all its vendored dependencies, etc.
"""

import logging
import os
import sys
from functools import partial
from optparse import Values
from typing import TYPE_CHECKING, Any, List, Optional, Tuple

from pip._internal.cache import WheelCache
from pip._internal.cli import cmdoptions
from pip._internal.cli.base_command import Command
from pip._internal.cli.command_context import CommandContextMixIn
from pip._internal.exceptions import CommandError, PreviousBuildDirError
from pip._internal.index.collector import LinkCollector
from pip._internal.index.package_finder import PackageFinder
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.models.target_python import TargetPython
from pip._internal.network.session import PipSession
from pip._internal.operations.build.build_tracker import BuildTracker
from pip._internal.operations.prepare import RequirementPreparer
from pip._internal.req.constructors import (
    install_req_from_editable,
    install_req_from_line,
    install_req_from_parsed_requirement,
    install_req_from_req_string,
)
from pip._internal.req.req_file import parse_requirements
from pip._internal.req.req_install import InstallRequirement
from pip._internal.resolution.base import BaseResolver
from pip._internal.self_outdated_check import pip_self_version_check
from pip._internal.utils.temp_dir import (
    TempDirectory,
    TempDirectoryTypeRegistry,
    tempdir_kinds,
)
from pip._internal.utils.virtualenv import running_under_virtualenv

if TYPE_CHECKING:
    from ssl import SSLContext

logger = logging.getLogger(__name__)


def _create_truststore_ssl_context() -> Optional["SSLContext"]:
    if sys.version_info < (3, 10):
        raise CommandError("The truststore feature is only available for Python 3.10+")

    try:
        import ssl
    except ImportError:
        logger.warning("Disabling truststore since ssl support is missing")
        return None

    try:
        from pip._vendor import truststore
    except ImportError as e:
        raise CommandError(f"The truststore feature is unavailable: {e}")

    return truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)


class SessionCommandMixin(CommandContextMixIn):

    """
    A class mixin for command classes needing _build_session().
    """

    def __init__(self) -> None:
        super().__init__()
        self._session: Optional[PipSession] = None

    @classmethod
    def _get_index_urls(cls, options: Values) -> Optional[List[str]]:
        """Return a list of index urls from user-provided options."""
        index_urls = []
        if not getattr(options, "no_index", False):
            url = getattr(options, "index_url", None)
            if url:
                index_urls.append(url)
        urls = getattr(options, "extra_index_urls", None)
        if urls:
            index_urls.extend(urls)
        # Return None rather than an empty list
        return index_urls or None

    def get_default_session(self, options: Values) -> PipSession:
        """Get a default-managed session."""
        if self._session is None:
            self._session = self.enter_context(self._build_session(options))
            # there's no type annotation on requests.Session, so it's
            # automatically ContextManager[Any] and self._session becomes Any,
            # then https://github.com/python/mypy/issues/7696 kicks in
            assert self._session is not None
        return self._session

    def _build_session(
        self,
        options: Values,
        retries: Optional[int] = None,
        timeout: Optional[int] = None,
        fallback_to_certifi: bool = False,
    ) -> PipSession:
        cache_dir = options.cache_dir
        assert not cache_dir or os.path.isabs(cache_dir)

        if "truststore" in options.features_enabled:
            try:
                ssl_context = _create_truststore_ssl_context()
            except Exception:
                if not fallback_to_certifi:
                    raise
                ssl_context = None
        else:
            ssl_context = None

        session = PipSession(
            cache=os.path.join(cache_dir, "http-v2") if cache_dir else None,
            retries=retries if retries is not None else options.retries,
            trusted_hosts=options.trusted_hosts,
            index_urls=self._get_index_urls(options),
            ssl_context=ssl_context,
        )

        # Handle custom ca-bundles from the user
        if options.cert:
            session.verify = options.cert

        # Handle SSL client certificate
        if options.client_cert:
            session.cert = options.client_cert

        # Handle timeouts
        if options.timeout or timeout:
            session.timeout = timeout if timeout is not None else options.timeout

        # Handle configured proxies
        if options.proxy:
            session.proxies = {
                "http": options.proxy,
                "https": options.proxy,
            }

        # Determine if we can prompt the user for authentication or not
        session.auth.prompting = not options.no_input
        session.auth.keyring_provider = options.keyring_provider

        return session


class IndexGroupCommand(Command, SessionCommandMixin):

    """
    Abstract base class for commands with the index_group options.

    This also corresponds to the commands that permit the pip version check.
    """

    def handle_pip_version_check(self, options: Values) -> None:
        """
        Do the pip version check if not disabled.

        This overrides the default behavior of not doing the check.
        """
        # Make sure the index_group options are present.
        assert hasattr(options, "no_index")

        if options.disable_pip_version_check or options.no_index:
            return

        # Otherwise, check if we're using the latest version of pip available.
        session = self._build_session(
            options,
            retries=0,
            timeout=min(5, options.timeout),
            # This is set to ensure the function does not fail when truststore is
            # specified in use-feature but cannot be loaded. This usually raises a
            # CommandError and shows a nice user-facing error, but this function is not
            # called in that try-except block.
            fallback_to_certifi=True,
        )
        with session:
            pip_self_version_check(session, options)


KEEPABLE_TEMPDIR_TYPES = [
    tempdir_kinds.BUILD_ENV,
    tempdir_kinds.EPHEM_WHEEL_CACHE,
    tempdir_kinds.REQ_BUILD,
]


def warn_if_run_as_root() -> None:
    """Output a warning for sudo users on Unix.

    In a virtual environment, sudo pip still writes to virtualenv.
    On Windows, users may run pip as Administrator without issues.
    This warning only applies to Unix root users outside of virtualenv.
    """
    if running_under_virtualenv():
        return
    if not hasattr(os, "getuid"):
        return
    # On Windows, there are no "system managed" Python packages. Installing as
    # Administrator via pip is the correct way of updating system environments.
    #
    # We choose sys.platform over utils.compat.WINDOWS here to enable Mypy platform
    # checks: https://mypy.readthedocs.io/en/stable/common_issues.html
    if sys.platform == "win32" or sys.platform == "cygwin":
        return

    if os.getuid() != 0:
        return

    logger.warning(
        "Running pip as the 'root' user can result in broken permissions and "
        "conflicting behaviour with the system package manager. "
        "It is recommended to use a virtual environment instead: "
        "https://pip.pypa.io/warnings/venv"
    )


def with_cleanup(func: Any) -> Any:
    """Decorator for common logic related to managing temporary
    directories.
    """

    def configure_tempdir_registry(registry: TempDirectoryTypeRegistry) -> None:
        for t in KEEPABLE_TEMPDIR_TYPES:
            registry.set_delete(t, False)

    def wrapper(
        self: RequirementCommand, options: Values, args: List[Any]
    ) -> Optional[int]:
        assert self.tempdir_registry is not None
        if options.no_clean:
            configure_tempdir_registry(self.tempdir_registry)

        try:
            return func(self, options, args)
        except PreviousBuildDirError:
            # This kind of conflict can occur when the user passes an explicit
            # build directory with a pre-existing folder. In that case we do
            # not want to accidentally remove it.
            configure_tempdir_registry(self.tempdir_registry)
            raise

    return wrapper


class RequirementCommand(IndexGroupCommand):
    def __init__(self, *args: Any, **kw: Any) -> None:
        super().__init__(*args, **kw)

        self.cmd_opts.add_option(cmdoptions.no_clean())

    @staticmethod
    def determine_resolver_variant(options: Values) -> str:
        """Determines which resolver should be used, based on the given options."""
        if "legacy-resolver" in options.deprecated_features_enabled:
            return "legacy"

        return "resolvelib"

    @classmethod
    def make_requirement_preparer(
        cls,
        temp_build_dir: TempDirectory,
        options: Values,
        build_tracker: BuildTracker,
        session: PipSession,
        finder: PackageFinder,
        use_user_site: bool,
        download_dir: Optional[str] = None,
        verbosity: int = 0,
    ) -> RequirementPreparer:
        """
        Create a RequirementPreparer instance for the given parameters.
        """
        temp_build_dir_path = temp_build_dir.path
        assert temp_build_dir_path is not None
        legacy_resolver = False

        resolver_variant = cls.determine_resolver_variant(options)
        if resolver_variant == "resolvelib":
            lazy_wheel = "fast-deps" in options.features_enabled
            if lazy_wheel:
                logger.warning(
                    "pip is using lazily downloaded wheels using HTTP "
                    "range requests to obtain dependency information. "
                    "This experimental feature is enabled through "
                    "--use-feature=fast-deps and it is not ready for "
                    "production."
                )
        else:
            legacy_resolver = True
            lazy_wheel = False
            if "fast-deps" in options.features_enabled:
                logger.warning(
                    "fast-deps has no effect when used with the legacy resolver."
                )

        return RequirementPreparer(
            build_dir=temp_build_dir_path,
            src_dir=options.src_dir,
            download_dir=download_dir,
            build_isolation=options.build_isolation,
            check_build_deps=options.check_build_deps,
            build_tracker=build_tracker,
            session=session,
            progress_bar=options.progress_bar,
            finder=finder,
            require_hashes=options.require_hashes,
            use_user_site=use_user_site,
            lazy_wheel=lazy_wheel,
            verbosity=verbosity,
            legacy_resolver=legacy_resolver,
        )

    @classmethod
    def make_resolver(
        cls,
        preparer: RequirementPreparer,
        finder: PackageFinder,
        options: Values,
        wheel_cache: Optional[WheelCache] = None,
        use_user_site: bool = False,
        ignore_installed: bool = True,
        ignore_requires_python: bool = False,
        force_reinstall: bool = False,
        upgrade_strategy: str = "to-satisfy-only",
        use_pep517: Optional[bool] = None,
        py_version_info: Optional[Tuple[int, ...]] = None,
    ) -> BaseResolver:
        """
        Create a Resolver instance for the given parameters.
        """
        make_install_req = partial(
            install_req_from_req_string,
            isolated=options.isolated_mode,
            use_pep517=use_pep517,
        )
        resolver_variant = cls.determine_resolver_variant(options)
        # The long import name and duplicated invocation is needed to convince
        # Mypy into correctly typechecking. Otherwise it would complain the
        # "Resolver" class being redefined.
        if resolver_variant == "resolvelib":
            import pip._internal.resolution.resolvelib.resolver

            return pip._internal.resolution.resolvelib.resolver.Resolver(
                preparer=preparer,
                finder=finder,
                wheel_cache=wheel_cache,
                make_install_req=make_install_req,
                use_user_site=use_user_site,
                ignore_dependencies=options.ignore_dependencies,
                ignore_installed=ignore_installed,
                ignore_requires_python=ignore_requires_python,
                force_reinstall=force_reinstall,
                upgrade_strategy=upgrade_strategy,
                py_version_info=py_version_info,
            )
        import pip._internal.resolution.legacy.resolver

        return pip._internal.resolution.legacy.resolver.Resolver(
            preparer=preparer,
            finder=finder,
            wheel_cache=wheel_cache,
            make_install_req=make_install_req,
            use_user_site=use_user_site,
            ignore_dependencies=options.ignore_dependencies,
            ignore_installed=ignore_installed,
            ignore_requires_python=ignore_requires_python,
            force_reinstall=force_reinstall,
            upgrade_strategy=upgrade_strategy,
            py_version_info=py_version_info,
        )

    def get_requirements(
        self,
        args: List[str],
        options: Values,
        finder: PackageFinder,
        session: PipSession,
    ) -> List[InstallRequirement]:
        """
        Parse command-line arguments into the corresponding requirements.
        """
        requirements: List[InstallRequirement] = []
        for filename in options.constraints:
            for parsed_req in parse_requirements(
                filename,
                constraint=True,
                finder=finder,
                options=options,
                session=session,
            ):
                req_to_add = install_req_from_parsed_requirement(
                    parsed_req,
                    isolated=options.isolated_mode,
                    user_supplied=False,
                )
                requirements.append(req_to_add)

        for req in args:
            req_to_add = install_req_from_line(
                req,
                comes_from=None,
                isolated=options.isolated_mode,
                use_pep517=options.use_pep517,
                user_supplied=True,
                config_settings=getattr(options, "config_settings", None),
            )
            requirements.append(req_to_add)

        for req in options.editables:
            req_to_add = install_req_from_editable(
                req,
                user_supplied=True,
                isolated=options.isolated_mode,
                use_pep517=options.use_pep517,
                config_settings=getattr(options, "config_settings", None),
            )
            requirements.append(req_to_add)

        # NOTE: options.require_hashes may be set if --require-hashes is True
        for filename in options.requirements:
            for parsed_req in parse_requirements(
                filename, finder=finder, options=options, session=session
            ):
                req_to_add = install_req_from_parsed_requirement(
                    parsed_req,
                    isolated=options.isolated_mode,
                    use_pep517=options.use_pep517,
                    user_supplied=True,
                    config_settings=parsed_req.options.get("config_settings")
                    if parsed_req.options
                    else None,
                )
                requirements.append(req_to_add)

        # If any requirement has hash options, enable hash checking.
        if any(req.has_hash_options for req in requirements):
            options.require_hashes = True

        if not (args or options.editables or options.requirements):
            opts = {"name": self.name}
            if options.find_links:
                raise CommandError(
                    "You must give at least one requirement to {name} "
                    '(maybe you meant "pip {name} {links}"?)'.format(
                        **dict(opts, links=" ".join(options.find_links))
                    )
                )
            else:
                raise CommandError(
                    "You must give at least one requirement to {name} "
                    '(see "pip help {name}")'.format(**opts)
                )

        return requirements

    @staticmethod
    def trace_basic_info(finder: PackageFinder) -> None:
        """
        Trace basic information about the provided objects.
        """
        # Display where finder is looking for packages
        search_scope = finder.search_scope
        locations = search_scope.get_formatted_locations()
        if locations:
            logger.info(locations)

    def _build_package_finder(
        self,
        options: Values,
        session: PipSession,
        target_python: Optional[TargetPython] = None,
        ignore_requires_python: Optional[bool] = None,
    ) -> PackageFinder:
        """
        Create a package finder appropriate to this requirement command.

        :param ignore_requires_python: Whether to ignore incompatible
            "Requires-Python" values in links. Defaults to False.
        """
        link_collector = LinkCollector.create(session, options=options)
        selection_prefs = SelectionPreferences(
            allow_yanked=True,
            format_control=options.format_control,
            allow_all_prereleases=options.pre,
            prefer_binary=options.prefer_binary,
            ignore_requires_python=ignore_requires_python,
        )

        return PackageFinder.create(
            link_collector=link_collector,
            selection_prefs=selection_prefs,
            target_python=target_python,
        )
python3.12/site-packages/pip/_internal/cli/main.py000064400000005400151732701470015727 0ustar00"""Primary application entrypoint.
"""
import locale
import logging
import os
import sys
import warnings
from typing import List, Optional

from pip._internal.cli.autocompletion import autocomplete
from pip._internal.cli.main_parser import parse_command
from pip._internal.commands import create_command
from pip._internal.exceptions import PipError
from pip._internal.utils import deprecation

logger = logging.getLogger(__name__)


# Do not import and use main() directly! Using it directly is actively
# discouraged by pip's maintainers. The name, location and behavior of
# this function is subject to change, so calling it directly is not
# portable across different pip versions.

# In addition, running pip in-process is unsupported and unsafe. This is
# elaborated in detail at
# https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program.
# That document also provides suggestions that should work for nearly
# all users that are considering importing and using main() directly.

# However, we know that certain users will still want to invoke pip
# in-process. If you understand and accept the implications of using pip
# in an unsupported manner, the best approach is to use runpy to avoid
# depending on the exact location of this entry point.

# The following example shows how to use runpy to invoke pip in that
# case:
#
#     sys.argv = ["pip", your, args, here]
#     runpy.run_module("pip", run_name="__main__")
#
# Note that this will exit the process after running, unlike a direct
# call to main. As it is not safe to do any processing after calling
# main, this should not be an issue in practice.


def main(args: Optional[List[str]] = None) -> int:
    if args is None:
        args = sys.argv[1:]

    # Suppress the pkg_resources deprecation warning
    # Note - we use a module of .*pkg_resources to cover
    # the normal case (pip._vendor.pkg_resources) and the
    # devendored case (a bare pkg_resources)
    warnings.filterwarnings(
        action="ignore", category=DeprecationWarning, module=".*pkg_resources"
    )

    # Configure our deprecation warnings to be sent through loggers
    deprecation.install_warning_logger()

    autocomplete()

    try:
        cmd_name, cmd_args = parse_command(args)
    except PipError as exc:
        sys.stderr.write(f"ERROR: {exc}")
        sys.stderr.write(os.linesep)
        sys.exit(1)

    # Needed for locale.getpreferredencoding(False) to work
    # in pip._internal.utils.encoding.auto_decode
    try:
        locale.setlocale(locale.LC_ALL, "")
    except locale.Error as e:
        # setlocale can apparently crash if locale are uninitialized
        logger.debug("Ignoring error %s when setting locale", e)
    command = create_command(cmd_name, isolated=("--isolated" in cmd_args))

    return command.main(cmd_args)
python3.12/site-packages/pip/_internal/cli/main_parser.py000064400000010362151732701470017306 0ustar00"""A single place for constructing and exposing the main parser
"""

import os
import subprocess
import sys
from typing import List, Optional, Tuple

from pip._internal.build_env import get_runnable_pip
from pip._internal.cli import cmdoptions
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip._internal.commands import commands_dict, get_similar_commands
from pip._internal.exceptions import CommandError
from pip._internal.utils.misc import get_pip_version, get_prog

__all__ = ["create_main_parser", "parse_command"]


def create_main_parser() -> ConfigOptionParser:
    """Creates and returns the main parser for pip's CLI"""

    parser = ConfigOptionParser(
        usage="\n%prog <command> [options]",
        add_help_option=False,
        formatter=UpdatingDefaultsHelpFormatter(),
        name="global",
        prog=get_prog(),
    )
    parser.disable_interspersed_args()

    parser.version = get_pip_version()

    # add the general options
    gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, parser)
    parser.add_option_group(gen_opts)

    # so the help formatter knows
    parser.main = True  # type: ignore

    # create command listing for description
    description = [""] + [
        f"{name:27} {command_info.summary}"
        for name, command_info in commands_dict.items()
    ]
    parser.description = "\n".join(description)

    return parser


def identify_python_interpreter(python: str) -> Optional[str]:
    # If the named file exists, use it.
    # If it's a directory, assume it's a virtual environment and
    # look for the environment's Python executable.
    if os.path.exists(python):
        if os.path.isdir(python):
            # bin/python for Unix, Scripts/python.exe for Windows
            # Try both in case of odd cases like cygwin.
            for exe in ("bin/python", "Scripts/python.exe"):
                py = os.path.join(python, exe)
                if os.path.exists(py):
                    return py
        else:
            return python

    # Could not find the interpreter specified
    return None


def parse_command(args: List[str]) -> Tuple[str, List[str]]:
    parser = create_main_parser()

    # Note: parser calls disable_interspersed_args(), so the result of this
    # call is to split the initial args into the general options before the
    # subcommand and everything else.
    # For example:
    #  args: ['--timeout=5', 'install', '--user', 'INITools']
    #  general_options: ['--timeout==5']
    #  args_else: ['install', '--user', 'INITools']
    general_options, args_else = parser.parse_args(args)

    # --python
    if general_options.python and "_PIP_RUNNING_IN_SUBPROCESS" not in os.environ:
        # Re-invoke pip using the specified Python interpreter
        interpreter = identify_python_interpreter(general_options.python)
        if interpreter is None:
            raise CommandError(
                f"Could not locate Python interpreter {general_options.python}"
            )

        pip_cmd = [
            interpreter,
            get_runnable_pip(),
        ]
        pip_cmd.extend(args)

        # Set a flag so the child doesn't re-invoke itself, causing
        # an infinite loop.
        os.environ["_PIP_RUNNING_IN_SUBPROCESS"] = "1"
        returncode = 0
        try:
            proc = subprocess.run(pip_cmd)
            returncode = proc.returncode
        except (subprocess.SubprocessError, OSError) as exc:
            raise CommandError(f"Failed to run pip under {interpreter}: {exc}")
        sys.exit(returncode)

    # --version
    if general_options.version:
        sys.stdout.write(parser.version)
        sys.stdout.write(os.linesep)
        sys.exit()

    # pip || pip help -> print_help()
    if not args_else or (args_else[0] == "help" and len(args_else) == 1):
        parser.print_help()
        sys.exit()

    # the subcommand name
    cmd_name = args_else[0]

    if cmd_name not in commands_dict:
        guess = get_similar_commands(cmd_name)

        msg = [f'unknown command "{cmd_name}"']
        if guess:
            msg.append(f'maybe you meant "{guess}"')

        raise CommandError(" - ".join(msg))

    # all the args without the subcommand
    cmd_args = args[:]
    cmd_args.remove(cmd_name)

    return cmd_name, cmd_args
python3.12/site-packages/pip/_internal/cli/progress_bars.py000064400000003660151732701500017656 0ustar00import functools
from typing import Callable, Generator, Iterable, Iterator, Optional, Tuple

from pip._vendor.rich.progress import (
    BarColumn,
    DownloadColumn,
    FileSizeColumn,
    Progress,
    ProgressColumn,
    SpinnerColumn,
    TextColumn,
    TimeElapsedColumn,
    TimeRemainingColumn,
    TransferSpeedColumn,
)

from pip._internal.utils.logging import get_indentation

DownloadProgressRenderer = Callable[[Iterable[bytes]], Iterator[bytes]]


def _rich_progress_bar(
    iterable: Iterable[bytes],
    *,
    bar_type: str,
    size: int,
) -> Generator[bytes, None, None]:
    assert bar_type == "on", "This should only be used in the default mode."

    if not size:
        total = float("inf")
        columns: Tuple[ProgressColumn, ...] = (
            TextColumn("[progress.description]{task.description}"),
            SpinnerColumn("line", speed=1.5),
            FileSizeColumn(),
            TransferSpeedColumn(),
            TimeElapsedColumn(),
        )
    else:
        total = size
        columns = (
            TextColumn("[progress.description]{task.description}"),
            BarColumn(),
            DownloadColumn(),
            TransferSpeedColumn(),
            TextColumn("eta"),
            TimeRemainingColumn(),
        )

    progress = Progress(*columns, refresh_per_second=30)
    task_id = progress.add_task(" " * (get_indentation() + 2), total=total)
    with progress:
        for chunk in iterable:
            yield chunk
            progress.update(task_id, advance=len(chunk))


def get_download_progress_renderer(
    *, bar_type: str, size: Optional[int] = None
) -> DownloadProgressRenderer:
    """Get an object that can be used to render the download progress.

    Returns a callable, that takes an iterable to "wrap".
    """
    if bar_type == "on":
        return functools.partial(_rich_progress_bar, bar_type=bar_type, size=size)
    else:
        return iter  # no-op, when passed an iterator
python3.12/site-packages/pip/_internal/cli/parser.py000064400000025061151732701500016276 0ustar00"""Base option parser setup"""

import logging
import optparse
import shutil
import sys
import textwrap
from contextlib import suppress
from typing import Any, Dict, Generator, List, Tuple

from pip._internal.cli.status_codes import UNKNOWN_ERROR
from pip._internal.configuration import Configuration, ConfigurationError
from pip._internal.utils.misc import redact_auth_from_url, strtobool

logger = logging.getLogger(__name__)


class PrettyHelpFormatter(optparse.IndentedHelpFormatter):
    """A prettier/less verbose help formatter for optparse."""

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        # help position must be aligned with __init__.parseopts.description
        kwargs["max_help_position"] = 30
        kwargs["indent_increment"] = 1
        kwargs["width"] = shutil.get_terminal_size()[0] - 2
        super().__init__(*args, **kwargs)

    def format_option_strings(self, option: optparse.Option) -> str:
        return self._format_option_strings(option)

    def _format_option_strings(
        self, option: optparse.Option, mvarfmt: str = " <{}>", optsep: str = ", "
    ) -> str:
        """
        Return a comma-separated list of option strings and metavars.

        :param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
        :param mvarfmt: metavar format string
        :param optsep:  separator
        """
        opts = []

        if option._short_opts:
            opts.append(option._short_opts[0])
        if option._long_opts:
            opts.append(option._long_opts[0])
        if len(opts) > 1:
            opts.insert(1, optsep)

        if option.takes_value():
            assert option.dest is not None
            metavar = option.metavar or option.dest.lower()
            opts.append(mvarfmt.format(metavar.lower()))

        return "".join(opts)

    def format_heading(self, heading: str) -> str:
        if heading == "Options":
            return ""
        return heading + ":\n"

    def format_usage(self, usage: str) -> str:
        """
        Ensure there is only one newline between usage and the first heading
        if there is no description.
        """
        msg = "\nUsage: {}\n".format(self.indent_lines(textwrap.dedent(usage), "  "))
        return msg

    def format_description(self, description: str) -> str:
        # leave full control over description to us
        if description:
            if hasattr(self.parser, "main"):
                label = "Commands"
            else:
                label = "Description"
            # some doc strings have initial newlines, some don't
            description = description.lstrip("\n")
            # some doc strings have final newlines and spaces, some don't
            description = description.rstrip()
            # dedent, then reindent
            description = self.indent_lines(textwrap.dedent(description), "  ")
            description = f"{label}:\n{description}\n"
            return description
        else:
            return ""

    def format_epilog(self, epilog: str) -> str:
        # leave full control over epilog to us
        if epilog:
            return epilog
        else:
            return ""

    def indent_lines(self, text: str, indent: str) -> str:
        new_lines = [indent + line for line in text.split("\n")]
        return "\n".join(new_lines)


class UpdatingDefaultsHelpFormatter(PrettyHelpFormatter):
    """Custom help formatter for use in ConfigOptionParser.

    This is updates the defaults before expanding them, allowing
    them to show up correctly in the help listing.

    Also redact auth from url type options
    """

    def expand_default(self, option: optparse.Option) -> str:
        default_values = None
        if self.parser is not None:
            assert isinstance(self.parser, ConfigOptionParser)
            self.parser._update_defaults(self.parser.defaults)
            assert option.dest is not None
            default_values = self.parser.defaults.get(option.dest)
        help_text = super().expand_default(option)

        if default_values and option.metavar == "URL":
            if isinstance(default_values, str):
                default_values = [default_values]

            # If its not a list, we should abort and just return the help text
            if not isinstance(default_values, list):
                default_values = []

            for val in default_values:
                help_text = help_text.replace(val, redact_auth_from_url(val))

        return help_text


class CustomOptionParser(optparse.OptionParser):
    def insert_option_group(
        self, idx: int, *args: Any, **kwargs: Any
    ) -> optparse.OptionGroup:
        """Insert an OptionGroup at a given position."""
        group = self.add_option_group(*args, **kwargs)

        self.option_groups.pop()
        self.option_groups.insert(idx, group)

        return group

    @property
    def option_list_all(self) -> List[optparse.Option]:
        """Get a list of all options, including those in option groups."""
        res = self.option_list[:]
        for i in self.option_groups:
            res.extend(i.option_list)

        return res


class ConfigOptionParser(CustomOptionParser):
    """Custom option parser which updates its defaults by checking the
    configuration files and environmental variables"""

    def __init__(
        self,
        *args: Any,
        name: str,
        isolated: bool = False,
        **kwargs: Any,
    ) -> None:
        self.name = name
        self.config = Configuration(isolated)

        assert self.name
        super().__init__(*args, **kwargs)

    def check_default(self, option: optparse.Option, key: str, val: Any) -> Any:
        try:
            return option.check_value(key, val)
        except optparse.OptionValueError as exc:
            print(f"An error occurred during configuration: {exc}")
            sys.exit(3)

    def _get_ordered_configuration_items(
        self,
    ) -> Generator[Tuple[str, Any], None, None]:
        # Configuration gives keys in an unordered manner. Order them.
        override_order = ["global", self.name, ":env:"]

        # Pool the options into different groups
        section_items: Dict[str, List[Tuple[str, Any]]] = {
            name: [] for name in override_order
        }
        for section_key, val in self.config.items():
            # ignore empty values
            if not val:
                logger.debug(
                    "Ignoring configuration key '%s' as it's value is empty.",
                    section_key,
                )
                continue

            section, key = section_key.split(".", 1)
            if section in override_order:
                section_items[section].append((key, val))

        # Yield each group in their override order
        for section in override_order:
            for key, val in section_items[section]:
                yield key, val

    def _update_defaults(self, defaults: Dict[str, Any]) -> Dict[str, Any]:
        """Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists)."""

        # Accumulate complex default state.
        self.values = optparse.Values(self.defaults)
        late_eval = set()
        # Then set the options with those values
        for key, val in self._get_ordered_configuration_items():
            # '--' because configuration supports only long names
            option = self.get_option("--" + key)

            # Ignore options not present in this parser. E.g. non-globals put
            # in [global] by users that want them to apply to all applicable
            # commands.
            if option is None:
                continue

            assert option.dest is not None

            if option.action in ("store_true", "store_false"):
                try:
                    val = strtobool(val)
                except ValueError:
                    self.error(
                        "{} is not a valid value for {} option, "
                        "please specify a boolean value like yes/no, "
                        "true/false or 1/0 instead.".format(val, key)
                    )
            elif option.action == "count":
                with suppress(ValueError):
                    val = strtobool(val)
                with suppress(ValueError):
                    val = int(val)
                if not isinstance(val, int) or val < 0:
                    self.error(
                        "{} is not a valid value for {} option, "
                        "please instead specify either a non-negative integer "
                        "or a boolean value like yes/no or false/true "
                        "which is equivalent to 1/0.".format(val, key)
                    )
            elif option.action == "append":
                val = val.split()
                val = [self.check_default(option, key, v) for v in val]
            elif option.action == "callback":
                assert option.callback is not None
                late_eval.add(option.dest)
                opt_str = option.get_opt_string()
                val = option.convert_value(opt_str, val)
                # From take_action
                args = option.callback_args or ()
                kwargs = option.callback_kwargs or {}
                option.callback(option, opt_str, val, self, *args, **kwargs)
            else:
                val = self.check_default(option, key, val)

            defaults[option.dest] = val

        for key in late_eval:
            defaults[key] = getattr(self.values, key)
        self.values = None
        return defaults

    def get_default_values(self) -> optparse.Values:
        """Overriding to make updating the defaults after instantiation of
        the option parser possible, _update_defaults() does the dirty work."""
        if not self.process_default_values:
            # Old, pre-Optik 1.5 behaviour.
            return optparse.Values(self.defaults)

        # Load the configuration, or error out in case of an error
        try:
            self.config.load()
        except ConfigurationError as err:
            self.exit(UNKNOWN_ERROR, str(err))

        defaults = self._update_defaults(self.defaults.copy())  # ours
        for option in self._get_all_options():
            assert option.dest is not None
            default = defaults.get(option.dest)
            if isinstance(default, str):
                opt_str = option.get_opt_string()
                defaults[option.dest] = option.check_value(opt_str, default)
        return optparse.Values(defaults)

    def error(self, msg: str) -> None:
        self.print_usage(sys.stderr)
        self.exit(UNKNOWN_ERROR, f"{msg}\n")
python3.12/site-packages/pip/_internal/build_env.py000064400000024003151732701500016175 0ustar00"""Build Environment used for isolation during sdist building
"""

import logging
import os
import pathlib
import site
import sys
import textwrap
from collections import OrderedDict
from types import TracebackType
from typing import TYPE_CHECKING, Iterable, List, Optional, Set, Tuple, Type, Union

from pip._vendor.certifi import where
from pip._vendor.packaging.requirements import Requirement
from pip._vendor.packaging.version import Version

from pip import __file__ as pip_location
from pip._internal.cli.spinners import open_spinner
from pip._internal.locations import get_platlib, get_purelib, get_scheme
from pip._internal.metadata import get_default_environment, get_environment
from pip._internal.utils.subprocess import call_subprocess
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds

if TYPE_CHECKING:
    from pip._internal.index.package_finder import PackageFinder

logger = logging.getLogger(__name__)


def _dedup(a: str, b: str) -> Union[Tuple[str], Tuple[str, str]]:
    return (a, b) if a != b else (a,)


class _Prefix:
    def __init__(self, path: str) -> None:
        self.path = path
        self.setup = False
        scheme = get_scheme("", prefix=path)
        self.bin_dir = scheme.scripts
        self.lib_dirs = _dedup(scheme.purelib, scheme.platlib)


def get_runnable_pip() -> str:
    """Get a file to pass to a Python executable, to run the currently-running pip.

    This is used to run a pip subprocess, for installing requirements into the build
    environment.
    """
    source = pathlib.Path(pip_location).resolve().parent

    if not source.is_dir():
        # This would happen if someone is using pip from inside a zip file. In that
        # case, we can use that directly.
        return str(source)

    return os.fsdecode(source / "__pip-runner__.py")


def _get_system_sitepackages() -> Set[str]:
    """Get system site packages

    Usually from site.getsitepackages,
    but fallback on `get_purelib()/get_platlib()` if unavailable
    (e.g. in a virtualenv created by virtualenv<20)

    Returns normalized set of strings.
    """
    if hasattr(site, "getsitepackages"):
        system_sites = site.getsitepackages()
    else:
        # virtualenv < 20 overwrites site.py without getsitepackages
        # fallback on get_purelib/get_platlib.
        # this is known to miss things, but shouldn't in the cases
        # where getsitepackages() has been removed (inside a virtualenv)
        system_sites = [get_purelib(), get_platlib()]
    return {os.path.normcase(path) for path in system_sites}


class BuildEnvironment:
    """Creates and manages an isolated environment to install build deps"""

    def __init__(self) -> None:
        temp_dir = TempDirectory(kind=tempdir_kinds.BUILD_ENV, globally_managed=True)

        self._prefixes = OrderedDict(
            (name, _Prefix(os.path.join(temp_dir.path, name)))
            for name in ("normal", "overlay")
        )

        self._bin_dirs: List[str] = []
        self._lib_dirs: List[str] = []
        for prefix in reversed(list(self._prefixes.values())):
            self._bin_dirs.append(prefix.bin_dir)
            self._lib_dirs.extend(prefix.lib_dirs)

        # Customize site to:
        # - ensure .pth files are honored
        # - prevent access to system site packages
        system_sites = _get_system_sitepackages()

        self._site_dir = os.path.join(temp_dir.path, "site")
        if not os.path.exists(self._site_dir):
            os.mkdir(self._site_dir)
        with open(
            os.path.join(self._site_dir, "sitecustomize.py"), "w", encoding="utf-8"
        ) as fp:
            fp.write(
                textwrap.dedent(
                    """
                import os, site, sys

                # First, drop system-sites related paths.
                original_sys_path = sys.path[:]
                known_paths = set()
                for path in {system_sites!r}:
                    site.addsitedir(path, known_paths=known_paths)
                system_paths = set(
                    os.path.normcase(path)
                    for path in sys.path[len(original_sys_path):]
                )
                original_sys_path = [
                    path for path in original_sys_path
                    if os.path.normcase(path) not in system_paths
                ]
                sys.path = original_sys_path

                # Second, add lib directories.
                # ensuring .pth file are processed.
                for path in {lib_dirs!r}:
                    assert not path in sys.path
                    site.addsitedir(path)
                """
                ).format(system_sites=system_sites, lib_dirs=self._lib_dirs)
            )

    def __enter__(self) -> None:
        self._save_env = {
            name: os.environ.get(name, None)
            for name in ("PATH", "PYTHONNOUSERSITE", "PYTHONPATH")
        }

        path = self._bin_dirs[:]
        old_path = self._save_env["PATH"]
        if old_path:
            path.extend(old_path.split(os.pathsep))

        pythonpath = [self._site_dir]

        os.environ.update(
            {
                "PATH": os.pathsep.join(path),
                "PYTHONNOUSERSITE": "1",
                "PYTHONPATH": os.pathsep.join(pythonpath),
            }
        )

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        for varname, old_value in self._save_env.items():
            if old_value is None:
                os.environ.pop(varname, None)
            else:
                os.environ[varname] = old_value

    def check_requirements(
        self, reqs: Iterable[str]
    ) -> Tuple[Set[Tuple[str, str]], Set[str]]:
        """Return 2 sets:
        - conflicting requirements: set of (installed, wanted) reqs tuples
        - missing requirements: set of reqs
        """
        missing = set()
        conflicting = set()
        if reqs:
            env = (
                get_environment(self._lib_dirs)
                if hasattr(self, "_lib_dirs")
                else get_default_environment()
            )
            for req_str in reqs:
                req = Requirement(req_str)
                # We're explicitly evaluating with an empty extra value, since build
                # environments are not provided any mechanism to select specific extras.
                if req.marker is not None and not req.marker.evaluate({"extra": ""}):
                    continue
                dist = env.get_distribution(req.name)
                if not dist:
                    missing.add(req_str)
                    continue
                if isinstance(dist.version, Version):
                    installed_req_str = f"{req.name}=={dist.version}"
                else:
                    installed_req_str = f"{req.name}==={dist.version}"
                if not req.specifier.contains(dist.version, prereleases=True):
                    conflicting.add((installed_req_str, req_str))
                # FIXME: Consider direct URL?
        return conflicting, missing

    def install_requirements(
        self,
        finder: "PackageFinder",
        requirements: Iterable[str],
        prefix_as_string: str,
        *,
        kind: str,
    ) -> None:
        prefix = self._prefixes[prefix_as_string]
        assert not prefix.setup
        prefix.setup = True
        if not requirements:
            return
        self._install_requirements(
            get_runnable_pip(),
            finder,
            requirements,
            prefix,
            kind=kind,
        )

    @staticmethod
    def _install_requirements(
        pip_runnable: str,
        finder: "PackageFinder",
        requirements: Iterable[str],
        prefix: _Prefix,
        *,
        kind: str,
    ) -> None:
        args: List[str] = [
            sys.executable,
            pip_runnable,
            "install",
            "--ignore-installed",
            "--no-user",
            "--prefix",
            prefix.path,
            "--no-warn-script-location",
        ]
        if logger.getEffectiveLevel() <= logging.DEBUG:
            args.append("-v")
        for format_control in ("no_binary", "only_binary"):
            formats = getattr(finder.format_control, format_control)
            args.extend(
                (
                    "--" + format_control.replace("_", "-"),
                    ",".join(sorted(formats or {":none:"})),
                )
            )

        index_urls = finder.index_urls
        if index_urls:
            args.extend(["-i", index_urls[0]])
            for extra_index in index_urls[1:]:
                args.extend(["--extra-index-url", extra_index])
        else:
            args.append("--no-index")
        for link in finder.find_links:
            args.extend(["--find-links", link])

        for host in finder.trusted_hosts:
            args.extend(["--trusted-host", host])
        if finder.allow_all_prereleases:
            args.append("--pre")
        if finder.prefer_binary:
            args.append("--prefer-binary")
        args.append("--")
        args.extend(requirements)
        extra_environ = {"_PIP_STANDALONE_CERT": where()}
        with open_spinner(f"Installing {kind}") as spinner:
            call_subprocess(
                args,
                command_desc=f"pip subprocess to install {kind}",
                spinner=spinner,
                extra_environ=extra_environ,
            )


class NoOpBuildEnvironment(BuildEnvironment):
    """A no-op drop-in replacement for BuildEnvironment"""

    def __init__(self) -> None:
        pass

    def __enter__(self) -> None:
        pass

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        pass

    def cleanup(self) -> None:
        pass

    def install_requirements(
        self,
        finder: "PackageFinder",
        requirements: Iterable[str],
        prefix_as_string: str,
        *,
        kind: str,
    ) -> None:
        raise NotImplementedError()
python3.12/site-packages/pip/_internal/__init__.py000064400000001021151732701500015760 0ustar00from typing import List, Optional

from pip._internal.utils import _log

# init_logging() must be called before any call to logging.getLogger()
# which happens at import of most modules.
_log.init_logging()


def main(args: (Optional[List[str]]) = None) -> int:
    """This is preserved for old console scripts that may still be referencing
    it.

    For additional details, see https://github.com/pypa/pip/issues/7498.
    """
    from pip._internal.utils.entrypoints import _wrapper

    return _wrapper(args, _nowarn=True)
python3.12/site-packages/pip/_internal/req/req_uninstall.py000064400000060144151732701500017703 0ustar00import functools
import os
import sys
import sysconfig
from importlib.util import cache_from_source
from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Set, Tuple

from pip._internal.exceptions import UninstallationError
from pip._internal.locations import get_bin_prefix, get_bin_user
from pip._internal.metadata import BaseDistribution
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.egg_link import egg_link_path_from_location
from pip._internal.utils.logging import getLogger, indent_log
from pip._internal.utils.misc import ask, normalize_path, renames, rmtree
from pip._internal.utils.temp_dir import AdjacentTempDirectory, TempDirectory
from pip._internal.utils.virtualenv import running_under_virtualenv

logger = getLogger(__name__)


def _script_names(
    bin_dir: str, script_name: str, is_gui: bool
) -> Generator[str, None, None]:
    """Create the fully qualified name of the files created by
    {console,gui}_scripts for the given ``dist``.
    Returns the list of file names
    """
    exe_name = os.path.join(bin_dir, script_name)
    yield exe_name
    if not WINDOWS:
        return
    yield f"{exe_name}.exe"
    yield f"{exe_name}.exe.manifest"
    if is_gui:
        yield f"{exe_name}-script.pyw"
    else:
        yield f"{exe_name}-script.py"


def _unique(
    fn: Callable[..., Generator[Any, None, None]]
) -> Callable[..., Generator[Any, None, None]]:
    @functools.wraps(fn)
    def unique(*args: Any, **kw: Any) -> Generator[Any, None, None]:
        seen: Set[Any] = set()
        for item in fn(*args, **kw):
            if item not in seen:
                seen.add(item)
                yield item

    return unique


@_unique
def uninstallation_paths(dist: BaseDistribution) -> Generator[str, None, None]:
    """
    Yield all the uninstallation paths for dist based on RECORD-without-.py[co]

    Yield paths to all the files in RECORD. For each .py file in RECORD, add
    the .pyc and .pyo in the same directory.

    UninstallPathSet.add() takes care of the __pycache__ .py[co].

    If RECORD is not found, raises UninstallationError,
    with possible information from the INSTALLER file.

    https://packaging.python.org/specifications/recording-installed-packages/
    """
    location = dist.location
    assert location is not None, "not installed"

    entries = dist.iter_declared_entries()
    if entries is None:
        msg = "Cannot uninstall {dist}, RECORD file not found.".format(dist=dist)
        installer = dist.installer
        if not installer or installer == "pip":
            dep = "{}=={}".format(dist.raw_name, dist.version)
            msg += (
                " You might be able to recover from this via: "
                "'pip install --force-reinstall --no-deps {}'.".format(dep)
            )
        else:
            msg += " Hint: The package was installed by {}.".format(installer)
        raise UninstallationError(msg)

    for entry in entries:
        path = os.path.join(location, entry)
        yield path
        if path.endswith(".py"):
            dn, fn = os.path.split(path)
            base = fn[:-3]
            path = os.path.join(dn, base + ".pyc")
            yield path
            path = os.path.join(dn, base + ".pyo")
            yield path


def compact(paths: Iterable[str]) -> Set[str]:
    """Compact a path set to contain the minimal number of paths
    necessary to contain all paths in the set. If /a/path/ and
    /a/path/to/a/file.txt are both in the set, leave only the
    shorter path."""

    sep = os.path.sep
    short_paths: Set[str] = set()
    for path in sorted(paths, key=len):
        should_skip = any(
            path.startswith(shortpath.rstrip("*"))
            and path[len(shortpath.rstrip("*").rstrip(sep))] == sep
            for shortpath in short_paths
        )
        if not should_skip:
            short_paths.add(path)
    return short_paths


def compress_for_rename(paths: Iterable[str]) -> Set[str]:
    """Returns a set containing the paths that need to be renamed.

    This set may include directories when the original sequence of paths
    included every file on disk.
    """
    case_map = {os.path.normcase(p): p for p in paths}
    remaining = set(case_map)
    unchecked = sorted({os.path.split(p)[0] for p in case_map.values()}, key=len)
    wildcards: Set[str] = set()

    def norm_join(*a: str) -> str:
        return os.path.normcase(os.path.join(*a))

    for root in unchecked:
        if any(os.path.normcase(root).startswith(w) for w in wildcards):
            # This directory has already been handled.
            continue

        all_files: Set[str] = set()
        all_subdirs: Set[str] = set()
        for dirname, subdirs, files in os.walk(root):
            all_subdirs.update(norm_join(root, dirname, d) for d in subdirs)
            all_files.update(norm_join(root, dirname, f) for f in files)
        # If all the files we found are in our remaining set of files to
        # remove, then remove them from the latter set and add a wildcard
        # for the directory.
        if not (all_files - remaining):
            remaining.difference_update(all_files)
            wildcards.add(root + os.sep)

    return set(map(case_map.__getitem__, remaining)) | wildcards


def compress_for_output_listing(paths: Iterable[str]) -> Tuple[Set[str], Set[str]]:
    """Returns a tuple of 2 sets of which paths to display to user

    The first set contains paths that would be deleted. Files of a package
    are not added and the top-level directory of the package has a '*' added
    at the end - to signify that all it's contents are removed.

    The second set contains files that would have been skipped in the above
    folders.
    """

    will_remove = set(paths)
    will_skip = set()

    # Determine folders and files
    folders = set()
    files = set()
    for path in will_remove:
        if path.endswith(".pyc"):
            continue
        if path.endswith("__init__.py") or ".dist-info" in path:
            folders.add(os.path.dirname(path))
        files.add(path)

    # probably this one https://github.com/python/mypy/issues/390
    _normcased_files = set(map(os.path.normcase, files))  # type: ignore

    folders = compact(folders)

    # This walks the tree using os.walk to not miss extra folders
    # that might get added.
    for folder in folders:
        for dirpath, _, dirfiles in os.walk(folder):
            for fname in dirfiles:
                if fname.endswith(".pyc"):
                    continue

                file_ = os.path.join(dirpath, fname)
                if (
                    os.path.isfile(file_)
                    and os.path.normcase(file_) not in _normcased_files
                ):
                    # We are skipping this file. Add it to the set.
                    will_skip.add(file_)

    will_remove = files | {os.path.join(folder, "*") for folder in folders}

    return will_remove, will_skip


class StashedUninstallPathSet:
    """A set of file rename operations to stash files while
    tentatively uninstalling them."""

    def __init__(self) -> None:
        # Mapping from source file root to [Adjacent]TempDirectory
        # for files under that directory.
        self._save_dirs: Dict[str, TempDirectory] = {}
        # (old path, new path) tuples for each move that may need
        # to be undone.
        self._moves: List[Tuple[str, str]] = []

    def _get_directory_stash(self, path: str) -> str:
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir: TempDirectory = AdjacentTempDirectory(path)
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path

    def _get_file_stash(self, path: str) -> str:
        """Stashes a file.

        If no root has been provided, one will be created for the directory
        in the user's temp directory."""
        path = os.path.normcase(path)
        head, old_head = os.path.dirname(path), None
        save_dir = None

        while head != old_head:
            try:
                save_dir = self._save_dirs[head]
                break
            except KeyError:
                pass
            head, old_head = os.path.dirname(head), head
        else:
            # Did not find any suitable root
            head = os.path.dirname(path)
            save_dir = TempDirectory(kind="uninstall")
            self._save_dirs[head] = save_dir

        relpath = os.path.relpath(path, head)
        if relpath and relpath != os.path.curdir:
            return os.path.join(save_dir.path, relpath)
        return save_dir.path

    def stash(self, path: str) -> str:
        """Stashes the directory or file and returns its new location.
        Handle symlinks as files to avoid modifying the symlink targets.
        """
        path_is_dir = os.path.isdir(path) and not os.path.islink(path)
        if path_is_dir:
            new_path = self._get_directory_stash(path)
        else:
            new_path = self._get_file_stash(path)

        self._moves.append((path, new_path))
        if path_is_dir and os.path.isdir(new_path):
            # If we're moving a directory, we need to
            # remove the destination first or else it will be
            # moved to inside the existing directory.
            # We just created new_path ourselves, so it will
            # be removable.
            os.rmdir(new_path)
        renames(path, new_path)
        return new_path

    def commit(self) -> None:
        """Commits the uninstall by removing stashed files."""
        for save_dir in self._save_dirs.values():
            save_dir.cleanup()
        self._moves = []
        self._save_dirs = {}

    def rollback(self) -> None:
        """Undoes the uninstall by moving stashed files back."""
        for p in self._moves:
            logger.info("Moving to %s\n from %s", *p)

        for new_path, path in self._moves:
            try:
                logger.debug("Replacing %s from %s", new_path, path)
                if os.path.isfile(new_path) or os.path.islink(new_path):
                    os.unlink(new_path)
                elif os.path.isdir(new_path):
                    rmtree(new_path)
                renames(path, new_path)
            except OSError as ex:
                logger.error("Failed to restore %s", new_path)
                logger.debug("Exception: %s", ex)

        self.commit()

    @property
    def can_rollback(self) -> bool:
        return bool(self._moves)


class UninstallPathSet:
    """A set of file paths to be removed in the uninstallation of a
    requirement."""

    def __init__(self, dist: BaseDistribution) -> None:
        self._paths: Set[str] = set()
        self._refuse: Set[str] = set()
        self._pth: Dict[str, UninstallPthEntries] = {}
        self._dist = dist
        self._moved_paths = StashedUninstallPathSet()
        # Create local cache of normalize_path results. Creating an UninstallPathSet
        # can result in hundreds/thousands of redundant calls to normalize_path with
        # the same args, which hurts performance.
        self._normalize_path_cached = functools.lru_cache()(normalize_path)

    def _permitted(self, path: str) -> bool:
        """
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        """
        # aka is_local, but caching normalized sys.prefix
        if not running_under_virtualenv():
            return True
        return path.startswith(self._normalize_path_cached(sys.prefix))

    def add(self, path: str) -> None:
        head, tail = os.path.split(path)

        # we normalize the head to resolve parent directory symlinks, but not
        # the tail, since we only want to uninstall symlinks, not their targets
        path = os.path.join(self._normalize_path_cached(head), os.path.normcase(tail))

        if not os.path.exists(path):
            return
        if self._permitted(path):
            self._paths.add(path)
        else:
            self._refuse.add(path)

        # __pycache__ files can show up after 'installed-files.txt' is created,
        # due to imports
        if os.path.splitext(path)[1] == ".py":
            self.add(cache_from_source(path))

    def add_pth(self, pth_file: str, entry: str) -> None:
        pth_file = self._normalize_path_cached(pth_file)
        if self._permitted(pth_file):
            if pth_file not in self._pth:
                self._pth[pth_file] = UninstallPthEntries(pth_file)
            self._pth[pth_file].add(entry)
        else:
            self._refuse.add(pth_file)

    def remove(self, auto_confirm: bool = False, verbose: bool = False) -> None:
        """Remove paths in ``self._paths`` with confirmation (unless
        ``auto_confirm`` is True)."""

        if not self._paths:
            logger.info(
                "Can't uninstall '%s'. No files were found to uninstall.",
                self._dist.raw_name,
            )
            return

        dist_name_version = f"{self._dist.raw_name}-{self._dist.version}"
        logger.info("Uninstalling %s:", dist_name_version)

        with indent_log():
            if auto_confirm or self._allowed_to_proceed(verbose):
                moved = self._moved_paths

                for_rename = compress_for_rename(self._paths)

                for path in sorted(compact(for_rename)):
                    moved.stash(path)
                    logger.verbose("Removing file or directory %s", path)

                for pth in self._pth.values():
                    pth.remove()

                logger.info("Successfully uninstalled %s", dist_name_version)

    def _allowed_to_proceed(self, verbose: bool) -> bool:
        """Display which files would be deleted and prompt for confirmation"""

        def _display(msg: str, paths: Iterable[str]) -> None:
            if not paths:
                return

            logger.info(msg)
            with indent_log():
                for path in sorted(compact(paths)):
                    logger.info(path)

        if not verbose:
            will_remove, will_skip = compress_for_output_listing(self._paths)
        else:
            # In verbose mode, display all the files that are going to be
            # deleted.
            will_remove = set(self._paths)
            will_skip = set()

        _display("Would remove:", will_remove)
        _display("Would not remove (might be manually added):", will_skip)
        _display("Would not remove (outside of prefix):", self._refuse)
        if verbose:
            _display("Will actually move:", compress_for_rename(self._paths))

        return ask("Proceed (Y/n)? ", ("y", "n", "")) != "n"

    def rollback(self) -> None:
        """Rollback the changes previously made by remove()."""
        if not self._moved_paths.can_rollback:
            logger.error(
                "Can't roll back %s; was not uninstalled",
                self._dist.raw_name,
            )
            return
        logger.info("Rolling back uninstall of %s", self._dist.raw_name)
        self._moved_paths.rollback()
        for pth in self._pth.values():
            pth.rollback()

    def commit(self) -> None:
        """Remove temporary save dir: rollback will no longer be possible."""
        self._moved_paths.commit()

    @classmethod
    def from_dist(cls, dist: BaseDistribution) -> "UninstallPathSet":
        dist_location = dist.location
        info_location = dist.info_location
        if dist_location is None:
            logger.info(
                "Not uninstalling %s since it is not installed",
                dist.canonical_name,
            )
            return cls(dist)

        normalized_dist_location = normalize_path(dist_location)
        if not dist.local:
            logger.info(
                "Not uninstalling %s at %s, outside environment %s",
                dist.canonical_name,
                normalized_dist_location,
                sys.prefix,
            )
            return cls(dist)

        if normalized_dist_location in {
            p
            for p in {sysconfig.get_path("stdlib"), sysconfig.get_path("platstdlib")}
            if p
        }:
            logger.info(
                "Not uninstalling %s at %s, as it is in the standard library.",
                dist.canonical_name,
                normalized_dist_location,
            )
            return cls(dist)

        paths_to_remove = cls(dist)
        develop_egg_link = egg_link_path_from_location(dist.raw_name)

        # Distribution is installed with metadata in a "flat" .egg-info
        # directory. This means it is not a modern .dist-info installation, an
        # egg, or legacy editable.
        setuptools_flat_installation = (
            dist.installed_with_setuptools_egg_info
            and info_location is not None
            and os.path.exists(info_location)
            # If dist is editable and the location points to a ``.egg-info``,
            # we are in fact in the legacy editable case.
            and not info_location.endswith(f"{dist.setuptools_filename}.egg-info")
        )

        # Uninstall cases order do matter as in the case of 2 installs of the
        # same package, pip needs to uninstall the currently detected version
        if setuptools_flat_installation:
            if info_location is not None:
                paths_to_remove.add(info_location)
            installed_files = dist.iter_declared_entries()
            if installed_files is not None:
                for installed_file in installed_files:
                    paths_to_remove.add(os.path.join(dist_location, installed_file))
            # FIXME: need a test for this elif block
            # occurs with --single-version-externally-managed/--record outside
            # of pip
            elif dist.is_file("top_level.txt"):
                try:
                    namespace_packages = dist.read_text("namespace_packages.txt")
                except FileNotFoundError:
                    namespaces = []
                else:
                    namespaces = namespace_packages.splitlines(keepends=False)
                for top_level_pkg in [
                    p
                    for p in dist.read_text("top_level.txt").splitlines()
                    if p and p not in namespaces
                ]:
                    path = os.path.join(dist_location, top_level_pkg)
                    paths_to_remove.add(path)
                    paths_to_remove.add(f"{path}.py")
                    paths_to_remove.add(f"{path}.pyc")
                    paths_to_remove.add(f"{path}.pyo")

        elif dist.installed_by_distutils:
            raise UninstallationError(
                "Cannot uninstall {!r}. It is a distutils installed project "
                "and thus we cannot accurately determine which files belong "
                "to it which would lead to only a partial uninstall.".format(
                    dist.raw_name,
                )
            )

        elif dist.installed_as_egg:
            # package installed by easy_install
            # We cannot match on dist.egg_name because it can slightly vary
            # i.e. setuptools-0.6c11-py2.6.egg vs setuptools-0.6rc11-py2.6.egg
            paths_to_remove.add(dist_location)
            easy_install_egg = os.path.split(dist_location)[1]
            easy_install_pth = os.path.join(
                os.path.dirname(dist_location),
                "easy-install.pth",
            )
            paths_to_remove.add_pth(easy_install_pth, "./" + easy_install_egg)

        elif dist.installed_with_dist_info:
            for path in uninstallation_paths(dist):
                paths_to_remove.add(path)

        elif develop_egg_link:
            # PEP 660 modern editable is handled in the ``.dist-info`` case
            # above, so this only covers the setuptools-style editable.
            with open(develop_egg_link) as fh:
                link_pointer = os.path.normcase(fh.readline().strip())
                normalized_link_pointer = paths_to_remove._normalize_path_cached(
                    link_pointer
                )
            assert os.path.samefile(
                normalized_link_pointer, normalized_dist_location
            ), (
                f"Egg-link {develop_egg_link} (to {link_pointer}) does not match "
                f"installed location of {dist.raw_name} (at {dist_location})"
            )
            paths_to_remove.add(develop_egg_link)
            easy_install_pth = os.path.join(
                os.path.dirname(develop_egg_link), "easy-install.pth"
            )
            paths_to_remove.add_pth(easy_install_pth, dist_location)

        else:
            logger.debug(
                "Not sure how to uninstall: %s - Check: %s",
                dist,
                dist_location,
            )

        if dist.in_usersite:
            bin_dir = get_bin_user()
        else:
            bin_dir = get_bin_prefix()

        # find distutils scripts= scripts
        try:
            for script in dist.iter_distutils_script_names():
                paths_to_remove.add(os.path.join(bin_dir, script))
                if WINDOWS:
                    paths_to_remove.add(os.path.join(bin_dir, f"{script}.bat"))
        except (FileNotFoundError, NotADirectoryError):
            pass

        # find console_scripts and gui_scripts
        def iter_scripts_to_remove(
            dist: BaseDistribution,
            bin_dir: str,
        ) -> Generator[str, None, None]:
            for entry_point in dist.iter_entry_points():
                if entry_point.group == "console_scripts":
                    yield from _script_names(bin_dir, entry_point.name, False)
                elif entry_point.group == "gui_scripts":
                    yield from _script_names(bin_dir, entry_point.name, True)

        for s in iter_scripts_to_remove(dist, bin_dir):
            paths_to_remove.add(s)

        return paths_to_remove


class UninstallPthEntries:
    def __init__(self, pth_file: str) -> None:
        self.file = pth_file
        self.entries: Set[str] = set()
        self._saved_lines: Optional[List[bytes]] = None

    def add(self, entry: str) -> None:
        entry = os.path.normcase(entry)
        # On Windows, os.path.normcase converts the entry to use
        # backslashes.  This is correct for entries that describe absolute
        # paths outside of site-packages, but all the others use forward
        # slashes.
        # os.path.splitdrive is used instead of os.path.isabs because isabs
        # treats non-absolute paths with drive letter markings like c:foo\bar
        # as absolute paths. It also does not recognize UNC paths if they don't
        # have more than "\\sever\share". Valid examples: "\\server\share\" or
        # "\\server\share\folder".
        if WINDOWS and not os.path.splitdrive(entry)[0]:
            entry = entry.replace("\\", "/")
        self.entries.add(entry)

    def remove(self) -> None:
        logger.verbose("Removing pth entries from %s:", self.file)

        # If the file doesn't exist, log a warning and return
        if not os.path.isfile(self.file):
            logger.warning("Cannot remove entries from nonexistent file %s", self.file)
            return
        with open(self.file, "rb") as fh:
            # windows uses '\r\n' with py3k, but uses '\n' with py2.x
            lines = fh.readlines()
            self._saved_lines = lines
        if any(b"\r\n" in line for line in lines):
            endline = "\r\n"
        else:
            endline = "\n"
        # handle missing trailing newline
        if lines and not lines[-1].endswith(endline.encode("utf-8")):
            lines[-1] = lines[-1] + endline.encode("utf-8")
        for entry in self.entries:
            try:
                logger.verbose("Removing entry: %s", entry)
                lines.remove((entry + endline).encode("utf-8"))
            except ValueError:
                pass
        with open(self.file, "wb") as fh:
            fh.writelines(lines)

    def rollback(self) -> bool:
        if self._saved_lines is None:
            logger.error("Cannot roll back changes to %s, none were made", self.file)
            return False
        logger.debug("Rolling %s back to previous state", self.file)
        with open(self.file, "wb") as fh:
            fh.writelines(self._saved_lines)
        return True
python3.12/site-packages/pip/_internal/req/req_file.py000064400000042720151732701500016611 0ustar00"""
Requirements file parsing
"""

import logging
import optparse
import os
import re
import shlex
import urllib.parse
from optparse import Values
from typing import (
    TYPE_CHECKING,
    Any,
    Callable,
    Dict,
    Generator,
    Iterable,
    List,
    Optional,
    Tuple,
)

from pip._internal.cli import cmdoptions
from pip._internal.exceptions import InstallationError, RequirementsFileParseError
from pip._internal.models.search_scope import SearchScope
from pip._internal.network.session import PipSession
from pip._internal.network.utils import raise_for_status
from pip._internal.utils.encoding import auto_decode
from pip._internal.utils.urls import get_url_scheme

if TYPE_CHECKING:
    # NoReturn introduced in 3.6.2; imported only for type checking to maintain
    # pip compatibility with older patch versions of Python 3.6
    from typing import NoReturn

    from pip._internal.index.package_finder import PackageFinder

__all__ = ["parse_requirements"]

ReqFileLines = Iterable[Tuple[int, str]]

LineParser = Callable[[str], Tuple[str, Values]]

SCHEME_RE = re.compile(r"^(http|https|file):", re.I)
COMMENT_RE = re.compile(r"(^|\s+)#.*$")

# Matches environment variable-style values in '${MY_VARIABLE_1}' with the
# variable name consisting of only uppercase letters, digits or the '_'
# (underscore). This follows the POSIX standard defined in IEEE Std 1003.1,
# 2013 Edition.
ENV_VAR_RE = re.compile(r"(?P<var>\$\{(?P<name>[A-Z0-9_]+)\})")

SUPPORTED_OPTIONS: List[Callable[..., optparse.Option]] = [
    cmdoptions.index_url,
    cmdoptions.extra_index_url,
    cmdoptions.no_index,
    cmdoptions.constraints,
    cmdoptions.requirements,
    cmdoptions.editable,
    cmdoptions.find_links,
    cmdoptions.no_binary,
    cmdoptions.only_binary,
    cmdoptions.prefer_binary,
    cmdoptions.require_hashes,
    cmdoptions.pre,
    cmdoptions.trusted_host,
    cmdoptions.use_new_feature,
]

# options to be passed to requirements
SUPPORTED_OPTIONS_REQ: List[Callable[..., optparse.Option]] = [
    cmdoptions.global_options,
    cmdoptions.hash,
    cmdoptions.config_settings,
]

# the 'dest' string values
SUPPORTED_OPTIONS_REQ_DEST = [str(o().dest) for o in SUPPORTED_OPTIONS_REQ]

logger = logging.getLogger(__name__)


class ParsedRequirement:
    def __init__(
        self,
        requirement: str,
        is_editable: bool,
        comes_from: str,
        constraint: bool,
        options: Optional[Dict[str, Any]] = None,
        line_source: Optional[str] = None,
    ) -> None:
        self.requirement = requirement
        self.is_editable = is_editable
        self.comes_from = comes_from
        self.options = options
        self.constraint = constraint
        self.line_source = line_source


class ParsedLine:
    def __init__(
        self,
        filename: str,
        lineno: int,
        args: str,
        opts: Values,
        constraint: bool,
    ) -> None:
        self.filename = filename
        self.lineno = lineno
        self.opts = opts
        self.constraint = constraint

        if args:
            self.is_requirement = True
            self.is_editable = False
            self.requirement = args
        elif opts.editables:
            self.is_requirement = True
            self.is_editable = True
            # We don't support multiple -e on one line
            self.requirement = opts.editables[0]
        else:
            self.is_requirement = False


def parse_requirements(
    filename: str,
    session: PipSession,
    finder: Optional["PackageFinder"] = None,
    options: Optional[optparse.Values] = None,
    constraint: bool = False,
) -> Generator[ParsedRequirement, None, None]:
    """Parse a requirements file and yield ParsedRequirement instances.

    :param filename:    Path or url of requirements file.
    :param session:     PipSession instance.
    :param finder:      Instance of pip.index.PackageFinder.
    :param options:     cli options.
    :param constraint:  If true, parsing a constraint file rather than
        requirements file.
    """
    line_parser = get_line_parser(finder)
    parser = RequirementsFileParser(session, line_parser)

    for parsed_line in parser.parse(filename, constraint):
        parsed_req = handle_line(
            parsed_line, options=options, finder=finder, session=session
        )
        if parsed_req is not None:
            yield parsed_req


def preprocess(content: str) -> ReqFileLines:
    """Split, filter, and join lines, and return a line iterator

    :param content: the content of the requirements file
    """
    lines_enum: ReqFileLines = enumerate(content.splitlines(), start=1)
    lines_enum = join_lines(lines_enum)
    lines_enum = ignore_comments(lines_enum)
    lines_enum = expand_env_variables(lines_enum)
    return lines_enum


def handle_requirement_line(
    line: ParsedLine,
    options: Optional[optparse.Values] = None,
) -> ParsedRequirement:
    # preserve for the nested code path
    line_comes_from = "{} {} (line {})".format(
        "-c" if line.constraint else "-r",
        line.filename,
        line.lineno,
    )

    assert line.is_requirement

    if line.is_editable:
        # For editable requirements, we don't support per-requirement
        # options, so just return the parsed requirement.
        return ParsedRequirement(
            requirement=line.requirement,
            is_editable=line.is_editable,
            comes_from=line_comes_from,
            constraint=line.constraint,
        )
    else:
        # get the options that apply to requirements
        req_options = {}
        for dest in SUPPORTED_OPTIONS_REQ_DEST:
            if dest in line.opts.__dict__ and line.opts.__dict__[dest]:
                req_options[dest] = line.opts.__dict__[dest]

        line_source = f"line {line.lineno} of {line.filename}"
        return ParsedRequirement(
            requirement=line.requirement,
            is_editable=line.is_editable,
            comes_from=line_comes_from,
            constraint=line.constraint,
            options=req_options,
            line_source=line_source,
        )


def handle_option_line(
    opts: Values,
    filename: str,
    lineno: int,
    finder: Optional["PackageFinder"] = None,
    options: Optional[optparse.Values] = None,
    session: Optional[PipSession] = None,
) -> None:
    if opts.hashes:
        logger.warning(
            "%s line %s has --hash but no requirement, and will be ignored.",
            filename,
            lineno,
        )

    if options:
        # percolate options upward
        if opts.require_hashes:
            options.require_hashes = opts.require_hashes
        if opts.features_enabled:
            options.features_enabled.extend(
                f for f in opts.features_enabled if f not in options.features_enabled
            )

    # set finder options
    if finder:
        find_links = finder.find_links
        index_urls = finder.index_urls
        no_index = finder.search_scope.no_index
        if opts.no_index is True:
            no_index = True
            index_urls = []
        if opts.index_url and not no_index:
            index_urls = [opts.index_url]
        if opts.extra_index_urls and not no_index:
            index_urls.extend(opts.extra_index_urls)
        if opts.find_links:
            # FIXME: it would be nice to keep track of the source
            # of the find_links: support a find-links local path
            # relative to a requirements file.
            value = opts.find_links[0]
            req_dir = os.path.dirname(os.path.abspath(filename))
            relative_to_reqs_file = os.path.join(req_dir, value)
            if os.path.exists(relative_to_reqs_file):
                value = relative_to_reqs_file
            find_links.append(value)

        if session:
            # We need to update the auth urls in session
            session.update_index_urls(index_urls)

        search_scope = SearchScope(
            find_links=find_links,
            index_urls=index_urls,
            no_index=no_index,
        )
        finder.search_scope = search_scope

        if opts.pre:
            finder.set_allow_all_prereleases()

        if opts.prefer_binary:
            finder.set_prefer_binary()

        if session:
            for host in opts.trusted_hosts or []:
                source = f"line {lineno} of {filename}"
                session.add_trusted_host(host, source=source)


def handle_line(
    line: ParsedLine,
    options: Optional[optparse.Values] = None,
    finder: Optional["PackageFinder"] = None,
    session: Optional[PipSession] = None,
) -> Optional[ParsedRequirement]:
    """Handle a single parsed requirements line; This can result in
    creating/yielding requirements, or updating the finder.

    :param line:        The parsed line to be processed.
    :param options:     CLI options.
    :param finder:      The finder - updated by non-requirement lines.
    :param session:     The session - updated by non-requirement lines.

    Returns a ParsedRequirement object if the line is a requirement line,
    otherwise returns None.

    For lines that contain requirements, the only options that have an effect
    are from SUPPORTED_OPTIONS_REQ, and they are scoped to the
    requirement. Other options from SUPPORTED_OPTIONS may be present, but are
    ignored.

    For lines that do not contain requirements, the only options that have an
    effect are from SUPPORTED_OPTIONS. Options from SUPPORTED_OPTIONS_REQ may
    be present, but are ignored. These lines may contain multiple options
    (although our docs imply only one is supported), and all our parsed and
    affect the finder.
    """

    if line.is_requirement:
        parsed_req = handle_requirement_line(line, options)
        return parsed_req
    else:
        handle_option_line(
            line.opts,
            line.filename,
            line.lineno,
            finder,
            options,
            session,
        )
        return None


class RequirementsFileParser:
    def __init__(
        self,
        session: PipSession,
        line_parser: LineParser,
    ) -> None:
        self._session = session
        self._line_parser = line_parser

    def parse(
        self, filename: str, constraint: bool
    ) -> Generator[ParsedLine, None, None]:
        """Parse a given file, yielding parsed lines."""
        yield from self._parse_and_recurse(filename, constraint)

    def _parse_and_recurse(
        self, filename: str, constraint: bool
    ) -> Generator[ParsedLine, None, None]:
        for line in self._parse_file(filename, constraint):
            if not line.is_requirement and (
                line.opts.requirements or line.opts.constraints
            ):
                # parse a nested requirements file
                if line.opts.requirements:
                    req_path = line.opts.requirements[0]
                    nested_constraint = False
                else:
                    req_path = line.opts.constraints[0]
                    nested_constraint = True

                # original file is over http
                if SCHEME_RE.search(filename):
                    # do a url join so relative paths work
                    req_path = urllib.parse.urljoin(filename, req_path)
                # original file and nested file are paths
                elif not SCHEME_RE.search(req_path):
                    # do a join so relative paths work
                    req_path = os.path.join(
                        os.path.dirname(filename),
                        req_path,
                    )

                yield from self._parse_and_recurse(req_path, nested_constraint)
            else:
                yield line

    def _parse_file(
        self, filename: str, constraint: bool
    ) -> Generator[ParsedLine, None, None]:
        _, content = get_file_content(filename, self._session)

        lines_enum = preprocess(content)

        for line_number, line in lines_enum:
            try:
                args_str, opts = self._line_parser(line)
            except OptionParsingError as e:
                # add offending line
                msg = f"Invalid requirement: {line}\n{e.msg}"
                raise RequirementsFileParseError(msg)

            yield ParsedLine(
                filename,
                line_number,
                args_str,
                opts,
                constraint,
            )


def get_line_parser(finder: Optional["PackageFinder"]) -> LineParser:
    def parse_line(line: str) -> Tuple[str, Values]:
        # Build new parser for each line since it accumulates appendable
        # options.
        parser = build_parser()
        defaults = parser.get_default_values()
        defaults.index_url = None
        if finder:
            defaults.format_control = finder.format_control

        args_str, options_str = break_args_options(line)

        try:
            options = shlex.split(options_str)
        except ValueError as e:
            raise OptionParsingError(f"Could not split options: {options_str}") from e

        opts, _ = parser.parse_args(options, defaults)

        return args_str, opts

    return parse_line


def break_args_options(line: str) -> Tuple[str, str]:
    """Break up the line into an args and options string.  We only want to shlex
    (and then optparse) the options, not the args.  args can contain markers
    which are corrupted by shlex.
    """
    tokens = line.split(" ")
    args = []
    options = tokens[:]
    for token in tokens:
        if token.startswith("-") or token.startswith("--"):
            break
        else:
            args.append(token)
            options.pop(0)
    return " ".join(args), " ".join(options)


class OptionParsingError(Exception):
    def __init__(self, msg: str) -> None:
        self.msg = msg


def build_parser() -> optparse.OptionParser:
    """
    Return a parser for parsing requirement lines
    """
    parser = optparse.OptionParser(add_help_option=False)

    option_factories = SUPPORTED_OPTIONS + SUPPORTED_OPTIONS_REQ
    for option_factory in option_factories:
        option = option_factory()
        parser.add_option(option)

    # By default optparse sys.exits on parsing errors. We want to wrap
    # that in our own exception.
    def parser_exit(self: Any, msg: str) -> "NoReturn":
        raise OptionParsingError(msg)

    # NOTE: mypy disallows assigning to a method
    #       https://github.com/python/mypy/issues/2427
    parser.exit = parser_exit  # type: ignore

    return parser


def join_lines(lines_enum: ReqFileLines) -> ReqFileLines:
    """Joins a line ending in '\' with the previous line (except when following
    comments).  The joined line takes on the index of the first line.
    """
    primary_line_number = None
    new_line: List[str] = []
    for line_number, line in lines_enum:
        if not line.endswith("\\") or COMMENT_RE.match(line):
            if COMMENT_RE.match(line):
                # this ensures comments are always matched later
                line = " " + line
            if new_line:
                new_line.append(line)
                assert primary_line_number is not None
                yield primary_line_number, "".join(new_line)
                new_line = []
            else:
                yield line_number, line
        else:
            if not new_line:
                primary_line_number = line_number
            new_line.append(line.strip("\\"))

    # last line contains \
    if new_line:
        assert primary_line_number is not None
        yield primary_line_number, "".join(new_line)

    # TODO: handle space after '\'.


def ignore_comments(lines_enum: ReqFileLines) -> ReqFileLines:
    """
    Strips comments and filter empty lines.
    """
    for line_number, line in lines_enum:
        line = COMMENT_RE.sub("", line)
        line = line.strip()
        if line:
            yield line_number, line


def expand_env_variables(lines_enum: ReqFileLines) -> ReqFileLines:
    """Replace all environment variables that can be retrieved via `os.getenv`.

    The only allowed format for environment variables defined in the
    requirement file is `${MY_VARIABLE_1}` to ensure two things:

    1. Strings that contain a `$` aren't accidentally (partially) expanded.
    2. Ensure consistency across platforms for requirement files.

    These points are the result of a discussion on the `github pull
    request #3514 <https://github.com/pypa/pip/pull/3514>`_.

    Valid characters in variable names follow the `POSIX standard
    <http://pubs.opengroup.org/onlinepubs/9699919799/>`_ and are limited
    to uppercase letter, digits and the `_` (underscore).
    """
    for line_number, line in lines_enum:
        for env_var, var_name in ENV_VAR_RE.findall(line):
            value = os.getenv(var_name)
            if not value:
                continue

            line = line.replace(env_var, value)

        yield line_number, line


def get_file_content(url: str, session: PipSession) -> Tuple[str, str]:
    """Gets the content of a file; it may be a filename, file: URL, or
    http: URL.  Returns (location, content).  Content is unicode.
    Respects # -*- coding: declarations on the retrieved files.

    :param url:         File path or url.
    :param session:     PipSession instance.
    """
    scheme = get_url_scheme(url)

    # Pip has special support for file:// URLs (LocalFSAdapter).
    if scheme in ["http", "https", "file"]:
        resp = session.get(url)
        raise_for_status(resp)
        return resp.url, resp.text

    # Assume this is a bare path.
    try:
        with open(url, "rb") as f:
            content = auto_decode(f.read())
    except OSError as exc:
        raise InstallationError(f"Could not open requirements file: {exc}")
    return url, content
python3.12/site-packages/pip/_internal/req/__pycache__/req_file.cpython-312.pyc000064400000051366151732701500023160 0ustar00�

R`i�E���UdZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZmZmZmZmZddlmZddlmZmZddlmZddlmZdd	lmZdd
lmZddl m!Z!e
rddl	m"Z"dd
l#m$Z$dgZ%eee&e'fZ(ee'gee'effZ)ejTdejV�Z,ejTd�Z-ejTd�Z.ej^ej`ejbejdejfejhejjejlejnejpejrejtejvejxgZ=eedej|fe?d<ej�ej�ej�gZCeedej|fe?d<eCD�cgc]}e'|�j����c}ZEej�eG�ZHGd�d�ZIGd�d�ZJ			d6de'dededdeejdeKdeeIddffd �ZLd!e'de(fd"�ZM	d7d#eJdeejdeIfd$�ZN			d8d%ede'd&e&deddeejdeeddfd'�ZO			d8d#eJdeejdeddeedeeIf
d(�ZPGd)�d*�ZQdedde)fd+�ZRd#e'dee'e'ffd,�ZSGd-�d.eT�ZUdej�fd/�ZWd0e(de(fd1�ZXd0e(de(fd2�ZYd0e(de(fd3�ZZd4e'dedee'e'ffd5�Z[ycc}w)9z
Requirements file parsing
�N)�Values)	�
TYPE_CHECKING�Any�Callable�Dict�	Generator�Iterable�List�Optional�Tuple)�
cmdoptions)�InstallationError�RequirementsFileParseError)�SearchScope)�
PipSession)�raise_for_status)�auto_decode)�get_url_scheme)�NoReturn)�
PackageFinder�parse_requirementsz^(http|https|file):z(^|\s+)#.*$z#(?P<var>\$\{(?P<name>[A-Z0-9_]+)\}).�SUPPORTED_OPTIONS�SUPPORTED_OPTIONS_REQc�L�eZdZ		d
dededededeeeefdeeddfd	�Zy)�ParsedRequirementN�requirement�is_editable�
comes_from�
constraint�options�line_source�returnc�X�||_||_||_||_||_||_y�N)rrrr rr!)�selfrrrrr r!s       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/req/req_file.py�__init__zParsedRequirement.__init__Us1��'���&���$������$���&���)NN)	�__name__�
__module__�__qualname__�str�boolrrrr'�r(r&rrTsd��-1�%)�'��'��'��	'�
�'��$�s�C�x�.�)�
'��c�]�'�
�'r(rc�,�eZdZdedededededdfd�Zy)	�
ParsedLine�filename�lineno�args�optsrr"Nc���||_||_||_||_|rd|_d|_||_y|jr#d|_d|_|jd|_yd|_y)NTFr)r1r2r4r�is_requirementrr�	editables)r%r1r2r3r4rs      r&r'zParsedLine.__init__gsk��!��
������	�$����"&�D��$�D��#�D��
�^�^�"&�D��#�D��#�~�~�a�0�D��"'�D�r()r)r*r+r,�intrr-r'r.r(r&r0r0fsA��(��(��(��	(�
�(��
(�
�(r(r0r1�session�finderrr rr"c#�K�t|�}t||�}|j||�D]}t||||��}|��|���y�w)aqParse a requirements file and yield ParsedRequirement instances.

    :param filename:    Path or url of requirements file.
    :param session:     PipSession instance.
    :param finder:      Instance of pip.index.PackageFinder.
    :param options:     cli options.
    :param constraint:  If true, parsing a constraint file rather than
        requirements file.
    )r r:r9N)�get_line_parser�RequirementsFileParser�parse�handle_line)	r1r9r:r r�line_parser�parser�parsed_line�
parsed_reqs	         r&rr�sT���� "�&�)�K�
#�G�[�
9�F��|�|�H�j�9�� �����
�
��!���:�s�>A�A�contentc�~�t|j�d��}t|�}t|�}t	|�}|S)zxSplit, filter, and join lines, and return a line iterator

    :param content: the content of the requirements file
    �)�start)�	enumerate�
splitlines�
join_lines�ignore_comments�expand_env_variables)rD�
lines_enums  r&�
preprocessrN�s=��
 )��);�);�)=�Q�G�J��J�'�J� ��,�J�%�j�1�J��r(�linec�H�dj|jrdnd|j|j�}|jsJ�|j
r-t
|j|j
||j��Si}tD]Q}||jjvs�|jj|s�6|jj|||<�Sd|j�d|j��}t
|j|j
||j||��S)Nz{} {} (line {})z-cz-r)rrrr�line � of )rrrrr r!)�formatrr1r2r6rrr�SUPPORTED_OPTIONS_REQ_DESTr4�__dict__)rOr �line_comes_from�req_options�destr!s      r&�handle_requirement_linerY�s
��
(�.�.�����T��
�
�����O���������!��(�(��(�(�&����	
�	
���.�D��t�y�y�)�)�)�d�i�i�.@�.@��.F�$(�I�I�$6�$6�t�$<��D�!�/��d�k�k�]�$�t�}�}�o�>�� ��(�(��(�(�&�����#�

�	
r(r4r2c���|jrtjd||��rW|jr|j�_|jr.�jj�fd�|jD��|�r�|j}|j}|jj}|jdurd}g}|jr|s
|jg}|jr|s|j|j�|jr�|jd}	tjjtjj|��}
tjj!|
|	�}tjj#|�r|}	|j%|	�|r|j'|�t)|||��}||_|j*r|j-�|j.r|j1�|r1|j2xsgD]}
d|�d|��}|j5|
|���yyy)	Nz>%s line %s has --hash but no requirement, and will be ignored.c3�@�K�|]}|�jvs�|���y�wr$)�features_enabled)�.0�fr s  �r&�	<genexpr>z%handle_option_line.<locals>.<genexpr>�s#�����,�0�a�A�W�=U�=U�4U��0�s��Tr)�
find_links�
index_urls�no_indexrQrR)�source)�hashes�logger�warning�require_hashesr\�extendr`ra�search_scoperb�	index_url�extra_index_urls�os�path�dirname�abspath�join�exists�append�update_index_urlsr�pre�set_allow_all_prereleases�
prefer_binary�set_prefer_binary�
trusted_hosts�add_trusted_host)r4r1r2r:r r9r`rarb�value�req_dir�relative_to_reqs_fileri�hostrcs    `          r&�handle_option_liner~�s�����{�{����L���	
�����%)�%8�%8�G�"�� � ��$�$�+�+�,��0�0�,�
�
��&�&�
��&�&�
��&�&�/�/���=�=�D� ��H��J��>�>�(��.�.�)�J�� � �����d�3�3�4��?�?��O�O�A�&�E��g�g�o�o�b�g�g�o�o�h�&?�@�G�$&�G�G�L�L��%�$@�!��w�w�~�~�3�4�-�����e�$���%�%�j�1�"�!�!��
��
+����8�8��,�,�.�����$�$�&���*�*�0�b�0�� ����X�J�7���(�(��f�(�=�1��Or(c��|jrt||�}|St|j|j|j
|||�y)aHandle a single parsed requirements line; This can result in
    creating/yielding requirements, or updating the finder.

    :param line:        The parsed line to be processed.
    :param options:     CLI options.
    :param finder:      The finder - updated by non-requirement lines.
    :param session:     The session - updated by non-requirement lines.

    Returns a ParsedRequirement object if the line is a requirement line,
    otherwise returns None.

    For lines that contain requirements, the only options that have an effect
    are from SUPPORTED_OPTIONS_REQ, and they are scoped to the
    requirement. Other options from SUPPORTED_OPTIONS may be present, but are
    ignored.

    For lines that do not contain requirements, the only options that have an
    effect are from SUPPORTED_OPTIONS. Options from SUPPORTED_OPTIONS_REQ may
    be present, but are ignored. These lines may contain multiple options
    (although our docs imply only one is supported), and all our parsed and
    affect the finder.
    N)r6rYr~r4r1r2)rOr r:r9rCs     r&r?r?sJ��:���,�T�7�;�
�����I�I��M�M��K�K����
	
�r(c	��eZdZdededdfd�Zdededee	ddffd�Z
dededee	ddffd	�Zdededee	ddffd
�Zy)r=r9r@r"Nc� �||_||_yr$)�_session�_line_parser)r%r9r@s   r&r'zRequirementsFileParser.__init__Cs��
 ��
�'��r(r1rc#�DK�|j||�Ed{���y7��w)z*Parse a given file, yielding parsed lines.N)�_parse_and_recurse)r%r1rs   r&r>zRequirementsFileParser.parseKs�����*�*�8�Z�@�@�@�s� �� c#�K�|j||�D�]1}|j�s|jjs|jjr�|jjr|jjd}d}n|jjd}d}t
j
|�r!tjj||�}nRt
j
|�s=tjjtjj|�|�}|j||�Ed{�����.|����4y7��w)NrFT)�_parse_filer6r4�requirements�constraints�	SCHEME_RE�search�urllibr>�urljoinrlrmrprnr�)r%r1rrO�req_path�nested_constraints      r&r�z)RequirementsFileParser._parse_and_recurseQs�����$�$�X�z�:�D��&�&��	�	�&�&�$�)�)�*?�*?��9�9�)�)�#�y�y�5�5�a�8�H�(-�%�#�y�y�4�4�Q�7�H�(,�%��#�#�H�-�%�|�|�3�3�H�h�G�H�"�)�)�(�3�!�w�w�|�|�������1� � �H�
 �2�2�8�=N�O�O�O��
�5;�0P�s�D:E
�<E�=E
c#�K�t||j�\}}t|�}|D]+\}}	|j|�\}}	t||||	|����-y#t$r"}
d|�d|
j
��}t
|��d}
~
wwxYw�w)NzInvalid requirement: �
)�get_file_contentr�rNr��OptionParsingError�msgrr0)r%r1r�_rDrM�line_numberrO�args_strr4�er�s            r&r�z"RequirementsFileParser._parse_fileps�����&�h��
�
�>�
��7���(�
�!+��K��
6�!%�!2�!2�4�!8���$��������
�",��&�
6�-�d�V�2�a�e�e�W�=��0��5�5��
6�s(�-B�A�B�	B�!A>�>B�B)
r)r*r+r�
LineParserr'r,r-rr0r>r�r�r.r(r&r=r=Bs���(��(� �(�
�	(�A��A�)-�A�	�:�t�T�)�	*�A����)-��	�:�t�T�)�	*��>���)-��	�:�t�T�)�	*�r(r=c�F��dtdtttff�fd�}|S)NrOr"c�&��t�}|j�}d|_�	r�	j|_t	|�\}}	tj|�}|j||�\}}||fS#t$r}td|���|�d}~wwxYw)NzCould not split options: )
�build_parser�get_default_valuesrj�format_control�break_args_options�shlex�split�
ValueErrorr��
parse_args)
rOrA�defaultsr��options_strr r�r4r�r:s
         �r&�
parse_linez#get_line_parser.<locals>.parse_line�s��������,�,�.��!����&,�&;�&;�H�#� 2�4� 8���+�	W��k�k�+�.�G��#�#�G�X�6���a���~����	W�$�'@��
�%N�O�UV�V��	W�s�A3�3	B�<B�B)r,rr)r:r�s` r&r<r<�s'�������s�F�{�!3��(�r(c��|jd�}g}|dd}|D]H}|jd�s|jd�rn$|j|�|jd��Jdj	|�dj	|�fS)z�Break up the line into an args and options string.  We only want to shlex
    (and then optparse) the options, not the args.  args can contain markers
    which are corrupted by shlex.
    � N�-z--r)r��
startswithrr�poprp)rO�tokensr3r �tokens     r&r�r��s|��
�Z�Z��_�F�
�D��Q�i�G������C� �E�$4�$4�T�$:���K�K����K�K��N���8�8�D�>�3�8�8�G�,�,�,r(c��eZdZdeddfd�Zy)r�r�r"Nc��||_yr$)r��r%r�s  r&r'zOptionParsingError.__init__�s	����r()r)r*r+r,r'r.r(r&r�r��s���C��D�r(r�c��tjd��}ttz}|D]}|�}|j	|��dt
dtddfd�}||_|S)z7
    Return a parser for parsing requirement lines
    F)�add_help_optionr%r�r"rc��t|��r$)r�r�s  r&�parser_exitz!build_parser.<locals>.parser_exit�s
�� ��%�%r()�optparse�OptionParserrr�
add_optionrr,�exit)rA�option_factories�option_factory�optionr�s     r&r�r��sh���
"�
"�5�
9�F�(�+@�@��*���!�����&�!�+�&�#�&�C�&�J�&�
�F�K��Mr(rMc#�K�d}g}|D]�\}}|jd�rtj|�rPtj|�rd|z}|r-|j|�|�J�|dj	|�f��g}�u||f���||s|}|j|jd����|r|�J�|dj	|�f��yy�w)z�Joins a line ending in '' with the previous line (except when following
    comments).  The joined line takes on the index of the first line.
    N�\r��)�endswith�
COMMENT_RE�matchrrrp�strip)rM�primary_line_number�new_liner�rOs     r&rJrJ�s��������H�'���T��}�}�T�"�j�&6�&6�t�&<�����%��T�z�������%�*�6�6�6�)�2�7�7�8�+<�<�<���!�4�'�'��&1�#��O�O�D�J�J�t�,�-�(�$�"�.�.�.�!�2�7�7�8�#4�4�4��s�CCc#�~K�|D]4\}}tjd|�}|j�}|s�/||f���6y�w)z1
    Strips comments and filter empty lines.
    r�N)r��subr�)rMr�rOs   r&rKrK�s@����(���T��~�~�b�$�'���z�z�|����t�#�#�	(�s�1=�	=c#�K�|D]R\}}tj|�D]/\}}tj|�}|s�|j	||�}�1||f���Ty�w)a�Replace all environment variables that can be retrieved via `os.getenv`.

    The only allowed format for environment variables defined in the
    requirement file is `${MY_VARIABLE_1}` to ensure two things:

    1. Strings that contain a `$` aren't accidentally (partially) expanded.
    2. Ensure consistency across platforms for requirement files.

    These points are the result of a discussion on the `github pull
    request #3514 <https://github.com/pypa/pip/pull/3514>`_.

    Valid characters in variable names follow the `POSIX standard
    <http://pubs.opengroup.org/onlinepubs/9699919799/>`_ and are limited
    to uppercase letter, digits and the `_` (underscore).
    N)�
ENV_VAR_RE�findallrl�getenv�replace)rMr�rO�env_var�var_namerzs      r&rLrL�sb���� (���T�!+�!3�!3�D�!9��G�X��I�I�h�'�E����<�<���/�D�":��4���(�s�AA�urlc�D�t|�}|dvr4|j|�}t|�|j|jfS	t|d�5}t
|j��}ddd�|fS#1swY�
xYw#t$r}td|����d}~wwxYw)aGets the content of a file; it may be a filename, file: URL, or
    http: URL.  Returns (location, content).  Content is unicode.
    Respects # -*- coding: declarations on the retrieved files.

    :param url:         File path or url.
    :param session:     PipSession instance.
    )�http�https�file�rbNz"Could not open requirements file: )
r�getrr��text�openr�read�OSErrorr)r�r9�scheme�respr^rD�excs       r&r�r�s����C�
 �F��*�*��{�{�3�������x�x����"�"�L�
�#�t�_��!�!�&�&�(�+�G����<��	�_���L��"D�S�E� J�K�K��L�s0�B�A7�+B�7B�<B�	B�B�B)NNFr$)NNN)\�__doc__�loggingr�rl�rer��urllib.parser�r�typingrrrrrr	r
rr�pip._internal.clir
�pip._internal.exceptionsrr�!pip._internal.models.search_scoper�pip._internal.network.sessionr�pip._internal.network.utilsr�pip._internal.utils.encodingr�pip._internal.utils.urlsrr�"pip._internal.index.package_finderr�__all__r8r,�ReqFileLinesr��compile�Ir�r�r�rj�extra_index_urlrbr�r��editabler`�	no_binary�only_binaryrvrgrt�trusted_host�use_new_featurer�Option�__annotations__�global_options�hash�config_settingsrrXrT�	getLoggerr)rerr0r-rrNrYr~r?r=r<r��	Exceptionr�r�r�rJrKrLr�)�os0r&�<module>r�s�����	�	����
�
�
�)�R�9�4�8�4�3�� �@��
 ����c�3�h��(��
�s�e�U�3��;�/�/�
0�
��B�J�J�-�r�t�t�4�	�
�R�Z�Z��
'�
��R�Z�Z�>�
?�
�����������������������������������N�N�������;��4���h�o�o�!5�6�7��&����O�O����?��t�H�S�(�/�/�%9�:�;��6K�K�5J��c�!�#�(�(�m�5J�K��	��	�	�8�	$��'�'�$(�(�<)-�)-�����
��
�_�%���h�o�o�
&�	�
��� �$��,�-�
�6	��	��	�*.�%
�
�%
�
�h�o�o�
&�%
��%
�X)-�)-�$(�
C>�
�C>��C>�
�C>�
�_�%�	C>�
�h�o�o�
&�C>��j�
!�
C>�
�C>�P*.�(,�$(�	)�
�)�
�h�o�o�
&�)�
�_�%�)��j�
!�	)�
�� �)�XC�C�L�H�_�5��*��0-�S�-�U�3��8�_�-�"���
�h�+�+��.5�<�5�L�5�>$��$��$� �\� �l� �6�#��
��u�S�#�X����GLs�>Lpython3.12/site-packages/pip/_internal/req/__pycache__/__init__.cpython-312.pyc000064400000007257151732701510023132 0ustar00�

R`i�
���ddlZddlZddlmZmZmZmZmZddlm	Z	ddl
mZddlm
Z
ddlmZgd�Zej"e�ZGd	�d
�Zdee
deeee
fddffd
�Zdee
deedeedeedeededededeefd�Zy)�N)�	Generator�List�Optional�Sequence�Tuple)�
indent_log�)�parse_requirements)�InstallRequirement)�RequirementSet)rrr
�install_given_reqsc�(�eZdZdeddfd�Zdefd�Zy)�InstallationResult�name�returnNc��||_y)N�r)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/req/__init__.py�__init__zInstallationResult.__init__s	����	�c�"�d|j�d�S)NzInstallationResult(name=�)r)rs r�__repr__zInstallationResult.__repr__s��)�$�)�)��a�8�8r)�__name__�
__module__�__qualname__�strrr�rrrrs!���S��T��9�#�9rr�requirementsrc#�fK�|D](}|js
Jd|����|j|f���*y�w)Nz%invalid to-be-installed requirement: r)r �reqs  r�_validate_requirementsr#s9�������x�x�F�@���F�F�x��h�h��m���s�/1�global_options�root�home�prefix�warn_script_location�
use_user_site�	pycompilec���tjt|��}|r3tj	ddj|j
���g}	t�5|j�D]�\}
}|jr<tj	d|
�t�5|jd��}ddd�nd}	|j|||||||��r|jr|j�	|	j!t#|
����	ddd�|	S#1swY�hxYw#t$r r|js|j��wxYw#1swY|	SxYw)zu
    Install everything in the given list.

    (to be called after having downloaded and unpacked the packages)
    z!Installing collected packages: %sz, zAttempting uninstall: %sT)�auto_confirmN)r%r&r'r(r)r*)�collections�OrderedDictr#�logger�info�join�keysr�items�should_reinstall�	uninstall�install�install_succeeded�commit�	Exception�rollback�appendr)
r r$r%r&r'r(r)r*�
to_install�	installed�req_name�requirement�uninstalled_pathsets
             rr
r
%sJ���(�(�)?��)M�N�J�����/��I�I�j�o�o�'�(�	
�
�I�	��%/�%5�%5�%7�!�H�k��+�+����6��A��\�*5�*?�*?�T�*?�*R�'�"�\�'+�#�
1��#�#�"���!�)=�"/�'�$��'�;�+H�+H�'�.�.�0����/��9�:�7&8�
�<��5"�\���
�&�{�/L�/L�'�0�0�2��	
��'
�<��s=� AE�#D �6E�D,�;E� D)�%E�,)E�E�E")r-�logging�typingrrrrr�pip._internal.utils.loggingr�req_filer
�req_installr�req_setr�__all__�	getLoggerrr/rrr#�boolr
rrr�<module>rJs�����=�=�2�(�+�#���
��	�	�8�	$��9�9���)�*���u�S�,�,�-�t�T�9�:��7��)�*�7��S�M�7��3�-�7��3�-�	7�

�S�M�7��
7��7��7�
�
��7rpython3.12/site-packages/pip/_internal/req/__pycache__/req_uninstall.cpython-312.pyc000064400000100325151732701510024241 0ustar00�

R`id`���ddlZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZmZddlmZddlmZddlmZdd	lmZmZdd
lmZm Z m!Z!m"Z"ddl#m$Z$m%Z%ddl&m'Z'ee(�Z)d
e*de*de+de
e*ddffd�Z,dede
eddffdede
eddfffd�Z-e-dede
e*ddffd��Z.dee*dee*fd�Z/dee*dee*fd�Z0dee*deee*ee*ffd�Z1Gd�d�Z2Gd�d�Z3Gd�d �Z4y)!�N)�cache_from_source)	�Any�Callable�Dict�	Generator�Iterable�List�Optional�Set�Tuple)�UninstallationError)�get_bin_prefix�get_bin_user)�BaseDistribution)�WINDOWS)�egg_link_path_from_location)�	getLogger�
indent_log)�ask�normalize_path�renames�rmtree)�AdjacentTempDirectory�
TempDirectory)�running_under_virtualenv�bin_dir�script_name�is_gui�returnc#�K�tjj||�}|��tsy|�d���|�d���|r|�d���y|�d���y�w)z�Create the fully qualified name of the files created by
    {console,gui}_scripts for the given ``dist``.
    Returns the list of file names
    Nz.exez
.exe.manifestz-script.pywz
-script.py)�os�path�joinr)rrr�exe_names    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py�
_script_namesr&s^�����w�w�|�|�G�[�1�H�
�N���
�J�d�
��
�J�m�
$�$�
��
�+�&�&��
�*�%�%�s�AA�fn.c
�|��tj��dtdtdttddff�fd��}|S)N�args�kwrc?�p�K�t�}�|i|��D]}||vs�|j|�|���y�w�N)�set�add)r)r*�seen�itemr's    �r%�uniquez_unique.<locals>.unique+s8����������O��O�D��4��������
�$�s�6�6)�	functools�wrapsrr)r'r1s` r%�_uniquer4(sG����_�_�R���c�����3��d�?�)C�����M��distc#��K�|j}|�Jd��|j�}|��dj|��}|j}|r|dk(rEdj|j|j
�}|dj|�z
}t
|��|dj|�z
}t
|��|D]�}tjj||�}|��|jd	�s�9tjj|�\}}	|	dd
}
tjj||
dz�}|��tjj||
dz�}|����y�w)
a�
    Yield all the uninstallation paths for dist based on RECORD-without-.py[co]

    Yield paths to all the files in RECORD. For each .py file in RECORD, add
    the .pyc and .pyo in the same directory.

    UninstallPathSet.add() takes care of the __pycache__ .py[co].

    If RECORD is not found, raises UninstallationError,
    with possible information from the INSTALLER file.

    https://packaging.python.org/specifications/recording-installed-packages/
    Nz
not installedz/Cannot uninstall {dist}, RECORD file not found.)r6�pipz{}=={}zZ You might be able to recover from this via: 'pip install --force-reinstall --no-deps {}'.z' Hint: The package was installed by {}.�.py����.pyc�.pyo)�location�iter_declared_entries�format�	installer�raw_name�versionr
r!r"r#�endswith�split)r6r=�entries�msgr@�dep�entryr"�dnr'�bases           r%�uninstallation_pathsrK6sF�����}�}�H���0��0���(�(�*�G���?�F�F�D�F�Q���N�N�	��I��.��/�/�$�-�-����>�C��@�@F��s��
�C�"�#�&�&�
�<�C�C�I�N�N�C�!�#�&�&����w�w�|�|�H�e�,���
��=�=����W�W�]�]�4�(�F�B���c�r�7�D��7�7�<�<��D�6�M�2�D��J��7�7�<�<��D�6�M�2�D��J��s
�C+E&�.A8E&�pathsc�����tjj�t�}t	|t
��D]+�t
��fd�|D��}|r�|j���-|S)z�Compact a path set to contain the minimal number of paths
    necessary to contain all paths in the set. If /a/path/ and
    /a/path/to/a/file.txt are both in the set, leave only the
    shorter path.��keyc3��K�|]U}�j|jd��xr/�t|jd�j����k(���Wy�w)�*N)�
startswith�rstrip�len)�.0�	shortpathr"�seps  ��r%�	<genexpr>zcompact.<locals>.<genexpr>ksc�����
�)�	�
�O�O�I�,�,�S�1�2�
D��S��)�)�#�.�5�5�c�:�;�<��C�
D�(�s�AA)r!r"rWr-�sortedrT�anyr.)rL�short_paths�should_skipr"rWs   @@r%�compactr]bs\���
�'�'�+�+�C��E�K��u�#�&���
�)�
�
��
��O�O�D�!�'��r5c��
���|D�cic]"}tjj|�|��$}}t|�}t	|j�D�chc]$}tjj
|�d��&c}t��}t�}dtdtfd��|D]��t�fd�|D��r�t�}t�}tj��D]>\�
}}	|j�
��fd�|D��|j�
��fd�|	D���@||z
r��|j|�|j�tjz���tt|j |��|zScc}wcc}w)	z�Returns a set containing the paths that need to be renamed.

    This set may include directories when the original sequence of paths
    included every file on disk.
    rrN�arc�t�tjjtjj|��Sr,)r!r"�normcaser#)r_s r%�	norm_joinz&compress_for_rename.<locals>.norm_join�s$���w�w��������a� 0�1�1r5c3�z�K�|]2}tjj��j|����4y�wr,)r!r"rarR)rU�w�roots  �r%rXz&compress_for_rename.<locals>.<genexpr>�s,�����G�Y��r�w�w����%�0�0��3�Y�s�8;c3�2�K�|]}���|����y�wr,�)rU�d�dirnamerbres  ���r%rXz&compress_for_rename.<locals>.<genexpr>�s�����L�G�q�y��w��:�G���c3�2�K�|]}���|����y�wr,rg)rU�frirbres  ���r%rXz&compress_for_rename.<locals>.<genexpr>�s�����H�%�Q�Y�t�W�a�8�%�rj)r!r"rar-rY�valuesrDrT�strrZ�walk�update�difference_updater.rW�map�__getitem__)
rL�p�case_map�	remaining�	unchecked�	wildcards�	all_files�all_subdirs�subdirs�filesrirbres
          @@@r%�compress_for_renamer}usE���16�6��1���� � ��#�Q�&��H�6��H�
�I��X�_�_�5F�G�5F�����
�
�a�(��+�5F�G�S�Q�I��%�I�2�c�2�c�2����G�Y�G�G��!�e�	� #���')�w�w�t�}�#�G�W�e����L�G�L�L����H�%�H�H�(5��I�%��'�'�	�2��M�M�$����-�(��"�s�8�'�'��3�4�y�@�@��37��Gs�'F�)F	c�t�t|�}t�}t�}t�}|D]h}|jd�r�|jd�sd|vr.|jtjj|��|j|��jtt
tjj|��}t|�}|D]�}tj|�D]�\}}	}
|
D]�}|jd�r�tjj||�}tjj|�s�Utjj|�|vs�w|j|�������||D�chc]"}tjj|d���$c}z}||fScc}w)asReturns a tuple of 2 sets of which paths to display to user

    The first set contains paths that would be deleted. Files of a package
    are not added and the top-level directory of the package has a '*' added
    at the end - to signify that all it's contents are removed.

    The second set contains files that would have been skipped in the above
    folders.
    r;z__init__.pyz
.dist-inforQ)r-rCr.r!r"rirrrar]ror#�isfile)
rL�will_remove�	will_skip�foldersr|r"�_normcased_files�folder�dirpath�_�dirfiles�fname�file_s
             r%�compress_for_output_listingr��s_���e�*�K���I��e�G��E�E����=�=�� ���=�=��'�<�4�+?��K�K�������-�.�
�	�	�$����3�r�w�w�/�/��7�8���g��G���$&�G�G�F�O� �G�Q��!���>�>�&�)�������W�e�4���G�G�N�N�5�)����(�(��/�7G�G��M�M�%�(�"�%4���7�K�7��2�7�7�<�<���4�7�K�K�K��	�!�!��Ls�'F5c�n�eZdZdZdd�Zdedefd�Zdedefd�Zdedefd�Zdd	�Z	dd
�Z
edefd��Z
y)
�StashedUninstallPathSetzWA set of file rename operations to stash files while
    tentatively uninstalling them.rNc� �i|_g|_yr,)�
_save_dirs�_moves��selfs r%�__init__z StashedUninstallPathSet.__init__�s��57���.0��r5r"c��	t|�}||jtj
j
|�<|j
S#t$rtd��}Y�OwxYw)z�Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir.�	uninstall��kind)r�OSErrorrr�r!r"ra)r�r"�save_dirs   r%�_get_directory_stashz,StashedUninstallPathSet._get_directory_stash�sU��	7�&;�D�&A�H�3;�������(�(��.�/��}�}���	�	7�$�+�6�H�	7�s�A�A�Ac�~�tjj|�}tjj|�d}}d}||k7r	|j|}n:tjj|�}t
d��}||j|<tjj||�}|rG|tjjk7r*tjj|j|�S|jS#t
$rYnwxYwtjj|�|}}||k7r����)z�Stashes a file.

        If no root has been provided, one will be created for the directory
        in the user's temp directory.Nr�r�)
r!r"rarir��KeyErrorr�relpath�curdirr#)r�r"�head�old_headr�r�s      r%�_get_file_stashz'StashedUninstallPathSet._get_file_stash�s���
�w�w����%��������.��h�����h��
��?�?�4�0����7�7�?�?�4�(�D�$�+�6�H�$,�D�O�O�D�!��'�'�/�/�$��-���w�"�'�'�.�.�0��7�7�<�<��
�
�w�7�7��}�}����
��
���W�W�_�_�T�2�D�(�D�
�h��s�	D�	D�Dc��tjj|�xr tjj|�}|r|j	|�}n|j|�}|jj||f�|r4tjj|�rtj|�t||�|S)z�Stashes the directory or file and returns its new location.
        Handle symlinks as files to avoid modifying the symlink targets.
        )
r!r"�isdir�islinkr�r�r��append�rmdirr)r�r"�path_is_dir�new_paths    r%�stashzStashedUninstallPathSet.stash�s����g�g�m�m�D�)�F�"�'�'�.�.��2F�.F����0�0��6�H��+�+�D�1�H������D�(�+�,��2�7�7�=�=��2�
�H�H�X����h���r5c�~�|jj�D]}|j��g|_i|_y)z0Commits the uninstall by removing stashed files.N)r�rm�cleanupr�)r�r�s  r%�commitzStashedUninstallPathSet.commits3�����.�.�0�H�����1������r5c�b�|jD]}tjdg|����|jD]�\}}	tjd||�tj
j
|�stj
j|�rt	j|�n*tj
j|�rt|�t||���|j�y#t$r6}tjd|�tjd|�Yd}~��d}~wwxYw)z2Undoes the uninstall by moving stashed files back.zMoving to %s
 from %szReplacing %s from %szFailed to restore %sz
Exception: %sN)r��logger�info�debugr!r"rr��unlinkr�rrr��errorr�)r�rtr�r"�exs     r%�rollbackz StashedUninstallPathSet.rollbacks������A��K�K�0�5�1�5��#�k�k�N�H�d�	
2����3�X�t�D��7�7�>�>�(�+�r�w�w�~�~�h�/G��I�I�h�'��W�W�]�]�8�,��8�$���h�'�*�	
���
��	�
2����3�X�>����_�b�1�1��
2�s�B!C/�/	D.�8,D)�)D.c�,�t|j�Sr,)�boolr�r�s r%�can_rollbackz$StashedUninstallPathSet.can_rollback-s���D�K�K� � r5�rN)�__name__�
__module__�__qualname__�__doc__r�rnr�r�r�r�r��propertyr�r�rgr5r%r�r��sj��&�0�������C��C��6�#��#��*��&�!�d�!��!r5r�c��eZdZdZdeddfd�Zdedefd�Zdeddfd�Z	d	ed
eddfd�Z
dded
eddfd�Zd
edefd�Zdd�Z
dd�Zededdfd��Zy)�UninstallPathSetzMA set of file paths to be removed in the uninstallation of a
    requirement.r6rNc��t�|_t�|_i|_||_t�|_tj�t�|_
yr,)r-�_paths�_refuse�_pth�_distr��_moved_pathsr2�	lru_cacher�_normalize_path_cached)r�r6s  r%r�zUninstallPathSet.__init__6sG�� #����!$����46��	���
�3�5���'<�i�&9�&9�&;�N�&K��#r5r"c�t�t�sy|j|jtj��S)zs
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        T)rrRr��sys�prefix)r�r"s  r%�
_permittedzUninstallPathSet._permittedAs+��(�)�����t�:�:�3�:�:�F�G�Gr5c�0�tjj|�\}}tjj|j	|�tjj|��}tjj
|�sy|j|�r|jj|�n|jj|�tjj|�ddk(r|jt|��yy)N�r9)
r!r"rDr#r�ra�existsr�r�r.r��splitextr)r�r"r��tails    r%r.zUninstallPathSet.addLs����W�W�]�]�4�(�
��d��w�w�|�|�D�7�7��=�r�w�w�?O�?O�PT�?U�V���w�w�~�~�d�#���?�?�4� ��K�K�O�O�D�!��L�L���T�"��7�7���D�!�!�$��-��H�H�&�t�,�-�.r5�pth_filerHc��|j|�}|j|�rE||jvrt|�|j|<|j|j	|�y|j
j	|�yr,)r�r�r��UninstallPthEntriesr.r�)r�r�rHs   r%�add_pthzUninstallPathSet.add_pth_sf���.�.�x�8���?�?�8�$��t�y�y�(�&9�(�&C��	�	�(�#��I�I�h��#�#�E�*��L�L���X�&r5�auto_confirm�verbosec��|js+tjd|jj�y|jj�d|jj
��}tjd|�t
�5|s|j|�r�|j}t|j�}tt|��D])}|j|�tjd|��+|jj�D]}|j!��tjd|�ddd�y#1swYyxYw)z\Remove paths in ``self._paths`` with confirmation (unless
        ``auto_confirm`` is True).z7Can't uninstall '%s'. No files were found to uninstall.N�-zUninstalling %s:zRemoving file or directory %szSuccessfully uninstalled %s)r�r�r�r�rArBr�_allowed_to_proceedr�r}rYr]r�r�r�rm�remove)r�r�r��dist_name_version�moved�
for_renamer"�pths        r%r�zUninstallPathSet.removehs����{�{��K�K�I��
�
�#�#�
�
�#�z�z�2�2�3�1�T�Z�Z�5G�5G�4H�I�����&�(9�:�
�\��t�7�7��@��)�)��0����=�
�"�7�:�#6�7�D��K�K��%��N�N�#B�D�I�8� �9�9�+�+�-�C��J�J�L�.����9�;L�M��\�\�s
�B:E
�
Ec�L�dtdttddfd�}|st|j�\}}nt	|j�}t	�}|d|�|d|�|d|j
�|r|d	t
|j��td
d�dk7S)
z@Display which files would be deleted and prompt for confirmationrFrLrNc���|sytj|�t�5tt	|��D]}tj|��	ddd�y#1swYyxYwr,)r�r�rrYr])rFrLr"s   r%�_displayz6UninstallPathSet._allowed_to_proceed.<locals>._display�sB�����K�K�����"�7�5�>�2�D��K�K��%�3����s�/A�A%z
Would remove:z+Would not remove (might be manually added):z%Would not remove (outside of prefix):zWill actually move:zProceed (Y/n)? )�y�n�r�)rnrr�r�r-r�r}r)r�r�r�r�r�s     r%r�z$UninstallPathSet._allowed_to_proceed�s���	&�#�	&�h�s�m�	&��	&��%@����%M�"�K���d�k�k�*�K���I���+�.��>�	�J��8�$�,�,�G���*�,?����,L�M��$�n�5��<�<r5c�l�|jjs+tjd|jj
�ytj
d|jj
�|jj�|jj�D]}|j��y)z1Rollback the changes previously made by remove().z'Can't roll back %s; was not uninstalledNzRolling back uninstall of %s)
r�r�r�r�r�rAr�r�r�rm)r�r�s  r%r�zUninstallPathSet.rollback�s}��� � �-�-��L�L�9��
�
�#�#�
�
����2�D�J�J�4G�4G�H����"�"�$��9�9�#�#�%�C��L�L�N�&r5c�8�|jj�y)z?Remove temporary save dir: rollback will no longer be possible.N)r�r�r�s r%r�zUninstallPathSet.commit�s����� � �"r5c
��|j}|j}|�(tjd|j�||�St|�}|js8tjd|j|tj�||�S|tjd�tjd�hD�chc]}|r|��c}vr)tjd|j|�||�S||�}t|j�}|jxrF|duxr@tjj!|�xr|j#|j$�d��}|�r:|�|j'|�|j)�}	|	�8|	D]1}
|j'tjj+||
���3�n�|j-d��r�	|j/d�}|j1d	�
�}|j/d�j1�D�cgc]
}|r||vr|��c}D]o}
tjj+||
�}|j'|�|j'|�d��|j'|�d��|j'|�d
���q�n
|j4r$t7dj9|j���|j:r�|j'|�tjj=|�d}tjj+tjj?|�d�}|jA|d|z��nG|jBr#tE|�D]}|j'|���n|r�tG|�5}tjjI|jK�jM��}|jO|�}ddd�tjjQ|�sJd|�d�d|j�d|�d�	��|j'|�tjj+tjj?|�d�}|jA||�ntjSd||�|jTrtW�}n
tY�}	|j[�D]j}|j'tjj+||��t\s�9|j'tjj+||�d����l	dt`dtbdtdtbddffd�}|||�D]}|j'|��|Scc}w#t2$rg}Y���wxYwcc}w#1swY���xYw#t2t^f$rY�{wxYw)Nz-Not uninstalling %s since it is not installedz1Not uninstalling %s at %s, outside environment %s�stdlib�
platstdlibz<Not uninstalling %s at %s, as it is in the standard library.z	.egg-infoz
top_level.txtznamespace_packages.txtF)�keependsr9r;r<z�Cannot uninstall {!r}. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.r�zeasy-install.pthz./z	Egg-link z (to z') does not match installed location of z (at �)z)Not sure how to uninstall: %s - Check: %sz.batr6rrc3�K�|j�D]`}|jdk(r t||jd�Ed{����2|jdk(s�Bt||jd�Ed{����by7�77�	�w)N�console_scriptsF�gui_scriptsT)�iter_entry_points�groupr&�name)r6r�entry_points   r%�iter_scripts_to_removez:UninstallPathSet.from_dist.<locals>.iter_scripts_to_removeCso���� $�5�5�7���$�$�(9�9�,�W�k�6F�6F��N�N�N� �&�&�-�7�,�W�k�6F�6F��M�M�M�	 8�N��M�s(�=A;�A7�A;�A;�/A9�0A;�9A;)3r=�
info_locationr�r��canonical_namer�localr�r��	sysconfig�get_pathrrA�"installed_with_setuptools_egg_infor!r"r�rC�setuptools_filenamer.r>r#�is_file�	read_text�
splitlines�FileNotFoundError�installed_by_distutilsr
r?�installed_as_eggrDrir��installed_with_dist_inforK�openra�readline�stripr��samefiler��in_usersiterr�iter_distutils_script_namesr�NotADirectoryErrorrrnr)�clsr6�
dist_locationr��normalized_dist_locationrt�paths_to_remove�develop_egg_link�setuptools_flat_installation�installed_files�installed_file�namespace_packages�
namespaces�
top_level_pkgr"�easy_install_egg�easy_install_pth�fh�link_pointer�normalized_link_pointerr�scriptr��ss                        r%�	from_distzUninstallPathSet.from_dist�sj���
�
�
��*�*�
�� ��K�K�?��#�#�
��t�9��#1�-�#@� ��z�z��K�K�C��#�#�(��
�
�	
��t�9��#��(�(��2�I�4F�4F�|�4T�U�(
�U���
�U�(
�
�

�K�K�N��#�#�(�
�
�t�9���d�)��6�t�}�}�E��
�3�3�
S��T�)�
S������}�-�
S�
"�*�*�d�.F�.F�-G�y�+Q�R�R�
	%�(��(��#�#�M�2�"�8�8�:�O��*�&5�N�#�'�'������]�N�(S�T�'6�
���o�.�O�)-���8P�)Q�&�"4�!>�!>��!>�!N�J�"�^�^�O�<�G�G�I�&�I���Q�j�0��I�&�M�
�7�7�<�<�
�}�E�D�#�'�'��-�#�'�'�4�&���5�#�'�'�4�&��
�6�#�'�'�4�&��
�6�&��
(�
(�%�F�FL�f��M�M�G��
��
"�
"�
���
�.�!�w�w�}�}�]�;�A�>��!�w�w�|�|������
�.�"� ��
�#�#�$4�d�=M�6M�N�
�
*�
*�,�T�2���#�#�D�)�3���&�'�2�!�w�w�/�/����
�0C�0C�0E�F��*9�*P�*P� �+�'�(�
�7�7�#�#�'�)A��
��,�-�U�<�.�A)�)-����u�]�O�1�N�
��
��� 0�1�!�w�w�|�|������ 0�1�3E� ��
�#�#�$4�m�D�
�L�L�;���
����"�n�G�$�&�G�	��:�:�<���#�#�B�G�G�L�L��&�$A�B��#�'�'������W����o�(N�O�=�	N�"�	N��	N��s�D�$��
'�	N�(��g�6�A�����"�7����S(
��T)�$�!#�J�$��&�N(�'��F"�#5�6�	��	�sD�?V�V�V'�$A
V,�AV9�4V9�V$�#V$�,V6�9W�
W)FFr�)r�r�r�r�rr�rnr�r�r.r�r�r�r�r��classmethodrrgr5r%r�r�2s����	L�-�	L�$�	L�	H�s�	H�t�	H�.��.��.�&'��'�C�'�D�'�N�4�N�$�N�4�N�:=�4�=�D�=�8�#��]�-�]�2D�]��]r5r�c�@�eZdZdeddfd�Zdeddfd�Zd	d�Zdefd�Zy)
r�r�rNc�>�||_t�|_d|_yr,)�filer-rE�_saved_lines)r�r�s  r%r�zUninstallPthEntries.__init__Ts����	�!$����37��r5rHc���tjj|�}tr4tjj	|�ds|jdd�}|jj|�y)Nr�\�/)r!r"rar�
splitdrive�replacerEr.)r�rHs  r%r.zUninstallPthEntries.addYsS����� � ��'���2�7�7�-�-�e�4�Q�7��M�M�$��,�E�������r5c�4�tjd|j�tjj|j�s!tj
d|j�yt|jd�5}|j�}||_	ddd�td�D��rd}nd}|r=|dj|jd��s|d|jd�z|d<|jD]<}	tjd	|�|j||zjd���>t|jd
�5}|j!|�ddd�y#1swY��xYw#t$rY��wxYw#1swYyxYw)NzRemoving pth entries from %s:z.Cannot remove entries from nonexistent file %s�rbc3�$K�|]}d|v���
y�w)s
Nrg)rU�lines  r%rXz-UninstallPthEntries.remove.<locals>.<genexpr>ss����1�5�4�w�$��5�s�z
�
���zutf-8zRemoving entry: %s�wb)r�r�rr!r"r�warningr�	readlinesrrZrC�encoderEr��
ValueError�
writelines)r�r�lines�endlinerHs     r%r�zUninstallPthEntries.removehsA�����6��	�	�B��w�w�~�~�d�i�i�(��N�N�K�T�Y�Y�W��
�$�)�)�T�
"�b��L�L�N�E� %�D��#��1�5�1�1��G��G���r��+�+�G�N�N�7�,C�D��b�	�G�N�N�7�$;�;�E�"�I��\�\�E�
����3�U�;����e�g�o�5�5�g�>�?�"��$�)�)�T�
"�b��M�M�%� �#�
"�##�
"���
��
��
"�
"�s*�E3�9E?�F�3E<�?	F�
F�Fc�*�|j�!tjd|j�ytj	d|j�t|jd�5}|j
|j�ddd�y#1swYyxYw)Nz.Cannot roll back changes to %s, none were madeFz!Rolling %s back to previous stater+T)rr�r�rr�rr0)r�rs  r%r�zUninstallPthEntries.rollback�sj�����$��L�L�I�4�9�9�U�����8�$�)�)�D�
�$�)�)�T�
"�b��M�M�$�+�+�,�#��#��s�$B	�	Br�)	r�r�r�rnr�r.r�r�r�rgr5r%r�r�Ss9��8��8��8�

 ��
 ��
 �!�6�$�r5r�)5r2r!r�r��importlib.utilr�typingrrrrrr	r
rr�pip._internal.exceptionsr
�pip._internal.locationsrr�pip._internal.metadatar�pip._internal.utils.compatr�pip._internal.utils.egg_linkr�pip._internal.utils.loggingrr�pip._internal.utils.miscrrrr�pip._internal.utils.temp_dirrr�pip._internal.utils.virtualenvrr�r�rnr�r&r4rKr]r}r�r�r�r�rgr5r%�<module>r?sk���	�
��,�W�W�W�8�@�3�.�D�=�I�I�M�C�	�8�	��&�
�&�"�&�,0�&��s�D�$���&�&���i��T�4��0�0�1��
�c�9�S�$��_�-�-�.��	�(�/�(�I�c�4��o�4N�(�	�(�V�8�C�=��S��X��&A�x��}�A��S��A�D/"�x��}�/"��s�3�x��S��?Q�9R�/"�df!�f!�R^�^�B	7�7r5python3.12/site-packages/pip/_internal/req/__pycache__/constructors.cpython-312.pyc000064400000052163151732701510024137 0ustar00�

R`iTJ��x�dZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZddl
mZddlmZmZddlmZddlmZddlmZmZdd	lmZdd
lmZddlmZddlm Z dd
l!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*m+Z+gd�Z,ejZe.�Z/ej`jc�Z2de3dee3e	e3ffd�Z4de	e3de
e3fd�Z5dede
e3defd�Z6de3dee	e3e3e
e3ffd�Z7de3ddfd�Z8de3de3fd�Z9Gd �d!�Z:de3de:fd"�Z;	d?dd#ddd#d#d#dd$�de3d%e	ee e3fd&e	e<d'e<d(e	ee3d)e	ee3ee3fd*e<d+e<d,e<d-e	ee3ee3ee3ffde fd.�Z=d/e3de<fd0�Z>de3d/e3de	e3fd1�Z?d/e3d2e	e3de:fd3�Z@	d?dd#ddd#dd#dd4�d/e3d%e	ee3e fd&e	e<d'e<d(e	ee3d)e	ee3ee3fd*e<d2e	e3d+e<d-e	ee3ee3ee3ffde fd5�ZA				d@d6e3d%e	e d'e<d&e	e<d+e<de fd7�ZB				dAd8ed'e<d&e	e<d+e<d-e	ee3ee3ee3ffde fd9�ZCd:ed;e de fd<�ZDd;e de fd=�ZEd;e dee3de fd>�ZFy)Ba~Backing implementation for InstallRequirement's various constructors

The idea here is that these formed a major chunk of InstallRequirement's size
so, moving them and support code dedicated to them outside of that class
helps creates for better understandability for the rest of the code.

These are meant to be used elsewhere within pip to create instances of
InstallRequirement.
�N)�
Collection�Dict�List�Optional�Set�Tuple�Union)�Marker)�InvalidRequirement�Requirement)�	Specifier)�InstallationError)�PyPI�TestPyPI)�Link)�Wheel)�ParsedRequirement)�InstallRequirement)�is_archive_file)�is_installable_dir)�get_requirement)�path_to_url)�is_url�vcs)�install_req_from_editable�install_req_from_line�parse_editable�path�returnc��tjd|�}d}|r&|jd�}|jd�}||fS|}||fS)Nz^(.+)(\[[^\]]+\])$��)�re�match�group)r�m�extras�path_no_extrass    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/req/constructors.py�
_strip_extrasr*+sT��
���&��-�A�
�F���������������6�!�!����6�!�!�r'c�f�|s
t�Std|j�z�jS)N�placeholder)�setr�lowerr')r's r)�convert_extrasr07s(����u���=�6�<�<�>�9�:�A�A�Ar+�req�
new_extrasc�@�tjdt|�tj��}|�Jd|�d���|j	d�}|j	d�}|�|�Jd|�d���|rdd	jt
|��znd
}t|�|�|���S)z�
    Returns a new requirement based on the given one, with the supplied extras. If the
    given requirement already has extras those are replaced (or dropped if no new extras
    are given).
    z([\w\t .-]+)(\[[^\]]*\])?(.*))�flagszregex match on requirement z! failed, this should never happenr!�z&regex group selection for requirement z[%s]�,�)r#�	fullmatch�str�ASCIIr%�join�sortedr)r1r2r$�pre�postr's      r)�_set_requirement_extrasr?=s���&(�\�\�(��C���h�h�	&�E�	��L�	$�S�E�)J�K�L�����Q��C��+�+�a�.�D���D�,�W�	/��u�4U�V�W�,�;E�&�3�8�8�F�:�$6�7�7�2�F��#��v�h�t�f�-�.�.r+�editable_reqc��|}t|�\}}tjj|�rt	|�}|j�j
d�rMt|�j}|r)||td|j�z�jfS||t�fStD]-}|j�j
|�d��s�&|�d|��}nt|�}|js0djtj�}t!|�d|�d���|j}|st!dj#|���||t�fS)	aParses an editable requirement into:
        - a requirement name
        - an URL
        - extras
        - editable options
    Accepted requirements:
        svn+http://blahblah@rev#egg=Foobar[baz]&subdirectory=version_subdir
        .[some_extra]
    zfile:r-�:�+z, zq is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with z).zZCould not detect requirement name for '{}', please specify one with #egg=your_package_name)r*�osr�isdirrr/�
startswithr�egg_fragmentrr'r.r�is_vcsr;�all_schemesr�format)r@�url�
url_no_extrasr'�package_name�version_control�link�backendss        r)rrVsV���C�*�#�.��M�6�	�w�w�}�}�]�#�#�M�2�
�����'�'��0��M�*�7�7������
����� >�?�F�F��
� ����5�5����9�9�;�!�!�_�$5�Q�"7�8�$�%�Q�s�e�,�C���
��9�D��;�;��9�9�S�_�_�-����n��'�j��
,�
�	
��$�$�L���
*�*0�&��*>�
�	
���c�e�#�#r+�filenamec�4�t|dd��5}d�d�|D�D�}|D]_}d|vr|d|jd�}|jd�r |dd	j�t	|d
�z}t|�ddd�y	ddd�y#1swYyxYw)a Check if file is parsable as a requirements file.

    This is heavily based on ``pkg_resources.parse_requirements``, but
    simplified to just check the first meaningful line.

    :raises InvalidRequirement: If the first meaningful line cannot be parsed
        as an requirement.
    zutf-8�ignore)�encoding�errorsc3�FK�|]}|r|jd�s|���y�w)�#N)rF��.0�lines  r)�	<genexpr>z2check_first_requirement_in_file.<locals>.<genexpr>�s&����
�4���D�O�O�C�0�
�4�s�!c3�<K�|]}|j����y�w�N)�striprXs  r)r[z2check_first_requirement_in_file.<locals>.<genexpr>�s����4�!�$�����!�s�z #N�\���r7)�open�find�endswithr^�nextr)rQ�f�linesrZs    r)�check_first_requirement_in_filerg�s���
�h���	:�a�
�4�!�4�
���D��t�|��-�d�i�i��o�.���}�}�T�"��C�R�y���(�4��r�?�:������!
;�	:��
;�	:�	:�s�A+B�B�Bc���tjj|�sd|�d�Sd}	t|�|d|�d�z
}|S#t$rt
j
d|�Y|SwxYw)z�Returns helpful msg in case requirements file does not exist,
    or cannot be parsed.

    :params req: Requirements file path
    z File 'z' does not exist.z The path does exist. zThe argument you provided (zx) appears to be a requirements file. If that is the case, use the '-r' flag to install the packages specified within it.z&Cannot parse '%s' as requirements file)rDr�existsrgr�logger�debug)r1�msgs  r)�deduce_helpful_msgrm�s����7�7�>�>�#�����.�/�/�
"�C�
�'��,�	���u�1�
2�	
���J���D����=�s�C��J�D�s�?�A"�!A"c	�<�eZdZdeedeedeedeefd�Z	y)�RequirementParts�requirementrO�markersr'c�<�||_||_||_||_yr])rprOrqr')�selfrprOrqr's     r)�__init__zRequirementParts.__init__�s!��'�����	������r+N)
�__name__�
__module__�__qualname__rrrr
rr9rt�r+r)roro�s?��
��k�*�
��t�n�
��&�!�	
�
�C��
r+roc��t|�\}}}|�
	t|�}nd}t	|�}t||d|�S#t$rtd|�d���wxYw)N�Invalid requirement: '�')rrrrrro)r@�namerK�extras_overrider1rOs      r)�parse_req_from_editabler~�sr��!/��!=��D�#����	F�)4�T�):�C�����9�D��C��t�_�=�=��"�	F�#�&<�T�F�!�$D�E�E�	F�s	�:�AF)�
use_pep517�isolated�global_options�hash_options�
constraint�
user_supplied�permit_editable_wheels�config_settings�
comes_fromrr�r�r�r�r�r�r�c��t|�}
t|
j||d||
j||||||	|
j��
S)NT)r�r��editabler�rOr�rr�r�r�r�r')r~rrprOr')r@r�rr�r�r�r�r�r�r��partss           r)rr�sP��
$�L�1�E��
����#��5�
�Z�Z����%�!�'��|�|��r+r|c���tjj|vrytjj�tjj|vry|j	d�ryy)akChecks whether the string "looks like" a path on the filesystem.

    This does not check whether the target actually exists, only judge from the
    appearance.

    Returns true if any of the following conditions is true:
    * a path separator is found (either os.path.sep or os.path.altsep);
    * a dot is found (which represents the current directory).
    T�.F)rDr�sep�altseprF)r|s r)�_looks_like_pathr�sI��
�w�w�{�{�d���	�w�w�~�~�!�b�g�g�n�n��&<�����s���r+c��t|�rDtjj|�r%t	|�rt|�St
d|�d���t|�sytjj|�rt|�S|jdd�}t|�dk\rt|d�sytjd|�t|�S)	aK
    First, it checks whether a provided path is an installable directory. If it
    is, returns the path.

    If false, check if the path is an archive file (such as a .whl).
    The function checks if the path is a file. If false, if the path has
    an @, it will treat it as a PEP 440 URL requirement and return the path.
    z
Directory zC is not installable. Neither 'setup.py' nor 'pyproject.toml' found.N�@r!r"rzARequirement %r looks like a filename, but the file does not exist)
r�rDrrErrrr�isfile�split�lenrj�warning)rr|�urlreq_partss   r)�_get_url_from_pathr�s������"�'�'�-�-��"5��d�#��t�$�$� ����!*�
*�
�	
��4� ��	�w�w�~�~�d���4� � ��:�:�c�1�%�L�
�<��A��&6�|�A��&G��
�N�N�K����t��r+�line_sourcec	����t|�rd}nd}||vr6|j|d�\}}|j�}|sd}nt|�}nd}|j�}d}tj
j
tj
j|��}d}d}t|�rt|�}n't|�\}	}t|	|�}
|
�t|
�}|r�|jdk(rxtjd|j�rXtttj
j
tj
j|j
����}|j r1t#|j$�}|j&�d|j(��}n|j*}n|}t-|�}dt.dt.f�fd	��d
t.dt0f�fd�}
|�	|
|�}nd}t3||||�S)Nz; �;r!�filez\.\./z==�textrc����s|S|�d��d�S)Nz (from �)rx)r�r�s �r)�with_sourcez(parse_req_from_line.<locals>.with_sourcehs�����K���w�{�m�1�-�-r+�
req_as_stringc����	t��}|jD]/}t|�}|jd�s� d|�d�}t	|��|S#t
$rotjj�vrd}|t��z
}n!d�vrt�fd�tD��sd}nd}�d	����}|r|d
|��z
}t	|��wxYw)N�]zExtras after version 'z'.zIt looks like a path.�=c3�&�K�|]}|�v���
y�wr]rx)rY�opr�s  �r)r[zAparse_req_from_line.<locals>._parse_req_string.<locals>.<genexpr>ts�����2�.7���m�#�i�s�z,= is not a valid operator. Did you mean == ?r7zInvalid requirement: z
Hint: )r�	specifierr9rcrrrDrr�rm�any�	operators)r�r1�spec�spec_strrl�add_msgr�s`     �r)�_parse_req_stringz.parse_req_from_line.<locals>._parse_req_stringms����	1�!�-�0�C�(�
�
���t�9���$�$�S�)�2�8�*�B�?�C�+�C�0�0�	&�
�
��1"�
	)��w�w�{�{�m�+�1���-�m�<�<���
�%�c�2�.7�2�/�I����� 5�m�5F�G�H�C����'��+�+��#�C�(�(�
	)�s�A�A8C)rr�r^r
rDr�normpath�abspathrr*r��schemer#�searchrKr�is_wheelrrQr|�versionrGr0r9rro)r|r��
marker_sep�markers_as_stringrqr�rrO�extras_as_string�prK�wheelr'r�r1r�s `             @r)�parse_req_from_liner�8s����
�d�|��
��
��T��"&�*�*�Z��";����-�3�3�5�� ��G��.�/�G����:�:�<�D��M�
�7�7���B�G�G�O�O�D�1�2�D��D���
�d�|��D�z��+�D�1���� ��D�)���?���9�D���;�;�&� �R�Y�Y�x����%B���B�G�G�$4�$4�R�W�W�_�_�T�Y�Y�5O�$P�Q�R�D��=�=��$�-�-�(�E�$�z�z�l�"�U�]�]�O�<�M�!�-�-�M��
�
�,�
-�F�.�#�.�#�.�
�����:� �%6�}�%E�����C��w��7�7r+)rr�r�r�r�r�r�r�c��t||�}
t|
j||
j|
j|||||	||
j
|��S)aCreates an InstallRequirement from a name, which might be a
    requirement, directory containing 'setup.py', filename, or URL.

    :param line_source: An optional string describing where the line is from,
        for logging purposes in case of an error.
    )
rOrqrr�r�r�r�r�r'r�)r�rrprOrqr')r|r�rr�r�r�r�r�r�r�r�s           r)rr�sS��&
 ��k�2�E��
����
�Z�Z��
�
���%�!�'���|�|�#�
�
r+�
req_stringc�`�	t|�}tjt
jg}|jrK|rI|jr=|jj|vr%tdj|j|���t|||||��S#t$rtd|�d���wxYw)Nrzr{zkPackages installed from PyPI cannot depend on packages which are not also hosted on PyPI.
{} depends on {} )r�rr�)rrrr�file_storage_domainrrKrO�netlocrJr|r)r�r�r�rr�r1�domains_not_alloweds       r)�install_req_from_req_stringr��s���H��j�)��
	
� � ��$�$���
	�����O�O��O�O�"�"�&9�9� �
 � &��z���� <�
�	
������#����)�H��"8���A� F�G�G�H�s�B�B-�
parsed_reqc��|jr2t|j|j||j|||��}|St|j|j|||jr|jjdg�ng|jr|jjdi�ni|j|j||��
}|S)N)r�rr�r�r�r�r��hashes)	r�rr�r�r�r�r�r�r�)	�is_editablerrpr�r�r�options�getr�)r�r�rr�r�r1s      r)�#install_req_from_parsed_requirementr��s������'��"�"�!�,�,�!�!�,�,��'�+�
��:�J�%$��"�"�!�,�,�!���%�%��"�"�&�&�'7��<��9C�8J�8J�
�"�"�&�&�x��4�PR�!�,�,�"�.�.�'�+�!
��$�Jr+rO�ireqc
��t|j|j|j||j|j
|j|j|j|j|j��S)N)r1r�r�rOrqrr�r�r�r�r�)rr1r�r�rqrr�r�r�r�r�)rOr�s  r)�install_req_from_link_and_ireqr�sb����H�H��?�?����
�����?�?�����*�*��&�&��,�,��(�(��r+c�d�t|j�t|jt��nd||j|j
|j|j|j|j|j|jg|j|j|j��S)z�
    Creates a new InstallationRequirement using the given template but without
    any extras. Sets the original requirement as the new one's parent
    (comes_from).
    N)r1r�r�rOrqrr�r�r�r�r'r�r�r�)rr1r?r.r�rOrqrr�r�r�r�r�r�r�)r�s r)�install_req_drop_extrasr�s����8<���8L�#�D�H�H�c�e�4�RV�����
�Y�Y�����?�?�����*�*��&�&��?�?���,�,��(�(�#�:�:�!�r+c���tj|�}h|j�|�|_|j�'t|j|j�|_|Sd|_|S)z�
    Returns a copy of an installation requirement with some additional extras.
    Makes a shallow copy of the ireq object.
    N)�copyr'r1r?)r�r'�results   r)�install_req_extend_extrasr�1sg���Y�Y�t�_�F�+�d�k�k�+�F�+�F�M��8�8��	 ����&�-�-�8��J�
�M���J�
�Mr+r])NFNF)FNFN)G�__doc__r��loggingrDr#�typingrrrrrrr	�pip._vendor.packaging.markersr
�"pip._vendor.packaging.requirementsrr� pip._vendor.packaging.specifiersr
�pip._internal.exceptionsr�pip._internal.models.indexrr�pip._internal.models.linkr�pip._internal.models.wheelr�pip._internal.req.req_filer�pip._internal.req.req_installr�pip._internal.utils.filetypesr�pip._internal.utils.miscr�pip._internal.utils.packagingr�pip._internal.utils.urlsr�pip._internal.vcsrr�__all__�	getLoggerrurj�
_operators�keysr�r9r*r0r?rrgrmror~�boolrr�r�r�rr�r�r�r�r�rxr+r)�<module>r�st�����	�	�F�F�F�0�N�6�6�5�*�,�8�<�9�7�9�0�)���
��	�	�8�	$��� � �%�%�'�	�	"��	"��c�8�C�=�&8� 9�	"�B�8�C�=�B�S��X�B�/��/�#�c�(�/�{�/�24$��4$��x��}�c�3�s�8�/K�)L�4$�n�c��d��8�C��C��2��
>�#�
>�2B�
>�*<@��"&��*.�37���#(�BF������1�3�6�7�8�����	�
���T�#�Y�'�
��4��T�#�Y��/�0������!���d�3��c�4��9�n�(=�#=�>�?����@�3��4��&�S������
��DW8�c�W8���
�W8�BR�W8�x<@�"�"&��*.�37��!%��BF�"�

�"���s�$6�6�7�8�"����	"�
�"��T�#�Y�'�
"��4��T�#�Y��/�0�"��"��#��"��"��d�3��c�4��9�n�(=�#=�>�?�"��"�N04��!%��#��#��+�,�#��#����	#�
�#��
#�P�!%��BF�%�!�%��%����%��	%�
�d�3��c�4��9�n�(=�#=�>�?�%��
%�P�
��(����$�"4��9K��4�
���s�O���r+python3.12/site-packages/pip/_internal/req/__pycache__/req_set.cpython-312.pyc000064400000016140151732701510023024 0ustar00�

R`i`���ddlZddlmZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZej e�ZGd	�d
�Zy)�N)�OrderedDict)�Dict�List)�LegacySpecifier)�canonicalize_name)�
LegacyVersion)�InstallRequirement)�
deprecatedc��eZdZddeddfd�Zdefd�Zdefd�Zdeddfd�Z	deddfd	�Z
d
edefd�Zd
edefd�Ze
deefd
��Ze
deefd��Zdd�Zy)�RequirementSet�check_supported_wheels�returnNc�>�t�|_||_g|_y)zCreate a RequirementSet.N)r�requirementsr
�unnamed_requirements)�selfr
s  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/req/req_set.py�__init__zRequirementSet.__init__s��<G�=���&<��#�>@��!�c��td�|jj�D�d���}djd�|D��S)Nc3�:K�|]}|jr�|���y�w�N)�
comes_from��.0�reqs  r�	<genexpr>z)RequirementSet.__str__.<locals>.<genexpr>s����M�6�S�c�n�n�S�6�s��c�4�t|jxsd�S�N��r�name�rs r�<lambda>z(RequirementSet.__str__.<locals>.<lambda>���-�c�h�h�n�"�=r��key� c3�FK�|]}t|j����y�wr��strrrs  rrz)RequirementSet.__str__.<locals>.<genexpr>s����=����C�G�G�����!)�sortedr�values�join)rrs  r�__str__zRequirementSet.__str__s=���M�D�-�-�4�4�6�M�=�
���x�x�=��=�=�=rc���t|jj�d���}d}|j|jj
t
|�djd�|D����S)Nc�4�t|jxsd�Srr!r#s rr$z)RequirementSet.__repr__.<locals>.<lambda>"r%rr&z4<{classname} object; {count} requirement(s): {reqs}>z, c3�FK�|]}t|j����y�wrr*rs  rrz*RequirementSet.__repr__.<locals>.<genexpr>)s����@�<�C�3�s�w�w�<�<�r,)�	classname�count�reqs)r-rr.�format�	__class__�__name__�lenr/)rr�
format_strings   r�__repr__zRequirementSet.__repr__sh������$�$�&�=�
��
O�
��#�#��n�n�-�-��l�#����@�<�@�@�$�
�	
r�install_reqc�V�|jrJ�|jj|�yr)r"r�append�rr=s  r�add_unnamed_requirementz&RequirementSet.add_unnamed_requirement,s%���#�#�#�#��!�!�(�(��5rc�h�|jsJ�t|j�}||j|<yr)r"rr)rr=�project_names   r�add_named_requirementz$RequirementSet.add_named_requirement0s1�������(��)9�)9�:��*5����,�'rr"c�l�t|�}||jvxr|j|jSr)rr�
constraint�rr"rCs   r�has_requirementzRequirementSet.has_requirement6s=��(��.��
�D�-�-�-�
?��%�%�l�3�>�>�>�	
rc�n�t|�}||jvr|j|Std|����)NzNo project with the name )rr�KeyErrorrGs   r�get_requirementzRequirementSet.get_requirement>s>��(��.���4�,�,�,��$�$�\�2�2��2�4�(�;�<�<rc�b�|jt|jj��zSr)r�listrr.)rs r�all_requirementszRequirementSet.all_requirementsFs'���(�(�4��0A�0A�0H�0H�0J�+K�K�Krc�p�|jD�cgc]}|js|js|��c}Scc}w)z�Return the list of requirements that need to be installed.

        TODO remove this property together with the legacy resolver, since the new
             resolver only returns requirements that need to be installed.
        )rNrF�satisfied_byr@s  r�requirements_to_installz&RequirementSet.requirements_to_installJs@�� $�4�4�
�4���)�)�+�2J�2J�
�4�
�	
��
s�!3c
�^�|jD]�}|j�j}t|t�rtd|�d|�d�ddd��|j�j
�D];}td�|jD��s� td	|�d
|�d|�d|�d
�	ddd���=��y)Nz*pip has selected the non standard version z of zL. In the future this version will be ignored as it isn't standard compliant.zkset or update constraints to select another version or contact the package author to fix the version numberi/z24.0)�reason�replacement�issue�gone_inc3�<K�|]}t|t����y�wr)�
isinstancer)r�specs  rrzERequirementSet.warn_legacy_versions_and_specifiers.<locals>.<genexpr>is����S�]�T�z�$��8�]�s�zpip has selected r(z- which has non standard dependency specifier z . In the future this version of z0 will be ignored as it isn't standard compliant.)	rQ�get_dist�versionrXrr
�iter_dependencies�any�	specifier)rrr[�deps    r�#warn_legacy_versions_and_specifiersz2RequirementSet.warn_legacy_versions_and_specifiersWs����/�/�C��l�l�n�,�,�G��'�=�1��D�W�I�N�!�U�#B�C�
R� �"���|�|�~�7�7�9���S�S�]�]�S�S��/��u�A�g�Y�?=�=@�E�B=�=@�E�BF�G�V�$� &�
�:�!0r)T)rN)r9�
__module__�__qualname__�boolrr+r0r<r	rArDrHrK�propertyrrNrQr`�rrrrs���A�t�A�t�A�>��>�
�#�
�6�3E�6�$�6�6�1C�6��6�
�C�
�D�
�=�C�=�,>�=��L�$�'9�":�L��L��

��.@�)A�

��

� rr)�logging�collectionsr�typingrr� pip._vendor.packaging.specifiersr�pip._vendor.packaging.utilsr�pip._vendor.packaging.versionr�pip._internal.req.req_installr	�pip._internal.utils.deprecationr
�	getLoggerr9�loggerrrerr�<module>rps;���#��<�9�7�<�6�	��	�	�8�	$��h�hrpython3.12/site-packages/pip/_internal/req/__pycache__/req_install.cpython-312.pyc000064400000112534151732701510023703 0ustar00�

R`iX����ddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZmZddlmZddlmZddlmZddlmZdd	lmZdd
lmZddl m!Z!ddl"m#Z#m$Z$dd
l%m&Z&m'Z'ddl(m)Z)ddl*m+Z+m,Z,m-Z-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m6Z:ddl;m<Z=ddl>m?Z?ddl@mAZAmBZBddlCmDZDddlEmFZFddlGmHZHddlImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQddlRmSZSddlTmUZUddlVmWZWmXZXddlYmZZZdd l[m\Z\dd!l]m^Z^ej�e`�ZaGd"�d#�Zbd$ebd%ecfd&�Zdd'ed(eebd)ecd%eefd*�Zfd'ed(eebd%dfd+�Zgy),�N)�Values)�Path)�Any�
Collection�Dict�Iterable�List�Optional�Sequence�Union)�Marker)�Requirement)�SpecifierSet)�canonicalize_name)�Version)�parse)�BuildBackendHookCaller)�BuildEnvironment�NoOpBuildEnvironment)�InstallationError�PreviousBuildDirError)�
get_scheme)�BaseDistribution�get_default_environment�get_directory_distribution�get_wheel_distribution)�FilesystemWheel)�	DirectUrl)�Link)�generate_metadata)�generate_editable_metadata)�install_editable)�
install_wheel)�load_pyproject_toml�make_pyproject_path)�UninstallPathSet)�
deprecated)�Hashes)� ConfiguredBuildBackendHookCaller�ask_path_exists�
backup_dir�display_path�hide_url�is_installable_dir�redact_auth_from_requirement�redact_auth_from_url)�
safe_extra)�runner_with_spinner_message)�
TempDirectory�
tempdir_kinds)�unpack_file)�running_under_virtualenv)�vcsc ���eZdZdZ					dLdddddddd�deedeeedfded	ee	d
ee
deeded
eeedeeeeefdeeeeeeeffdede
edededdfd�Zdefd�Zdefd�Zdefd�Zedeefd��Zej*�defd��Zedefd��Zedefd��Zedefd��ZdMdeeedefd�Zedefd ��ZdNd!edefd"�Zdeefd#�Z d$ed%ed&edefd'�Z!dOd(�Z"dOd)�Z#d*eddfd+�Z$edefd,��Z%edefd-��Z&edefd.��Z'edefd/��Z(edefd0��Z)edefd1��Z*dOd2�Z+dOd3�Z,dOd4�Z-ede.fd5��Z/de0fd6�Z1dOd7�Z2		dPd8ed%ed&eddfd9�Z3d:e4ddfd;�Z5dOd<�Z6dOd=�Z7	dPd>ed?edee8fd@�Z9dAedBedCedefdD�Z:d$eeddfdE�Z;							dQd
ee<edFeedGeedHeedIed*edJeddfdK�Z=y)R�InstallRequirementz�
    Represents something that may be installed later on, may have information
    about where to fetch the relevant requirement and also contains logic for
    installing the said requirement.
    FN�)�global_options�hash_options�config_settings�
constraint�extras�
user_supplied�permit_editable_wheels�req�
comes_from�editable�link�markers�
use_pep517�isolatedr;r<r=r>r?r@rA�returnc��|�t|t�sJ|��||_||_||_||_||_d|_|j
r[|sJ�|jrKtjjtjj|j��|_|�#|r!|jrt|j�}|x|_|_d|_d|_d|_|j r1|j jr|j j|_|r||_n#|r|j*|_nt-�|_|�|r|j.}||_d|_d|_d|_d|_|r|ng|_|	r|	ni|_|
|_d|_ |
|_!||_"tG�|_$d|_%d|_&g|_'d|_(||_)d|_*d|_+y�NF),�
isinstancerrBrCr>rDrA�
source_dir�is_file�os�path�normpath�abspath�	file_path�urlrrE�
original_link�cached_wheel_source_link�
download_info�local_file_pathr?�set�markerrF�satisfied_by�should_reinstall�_temp_build_dir�install_succeededr;r<r=�preparedr@rHr�	build_env�metadata_directory�pyproject_requires�requirements_to_check�pep517_backendrG�needs_more_preparation�_archive_source)�selfrBrCrDrErFrGrHr;r<r=r>r?r@rAs               ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/req/req_install.py�__init__zInstallRequirement.__init__Hs���$�{�j��k�:�?�C�?�:����$���$��� ��
�&<��#�*.����=�=��K�4��|�|�"$�'�'�"2�"2�2�7�7�?�?�4�>�>�3R�"S����<�C�C�G�G�����=�D�)-�-��	�D�&�
9=��%�37���/3����9�9����*�*�#'�9�9�#6�#6�D� �� �D�K�
��*�*�D�K��%�D�K��?�s��j�j�G����9=���!&���8<���15���0>�n�B���,8�L�b���.�����
�+��� ��
�+?�+A���26���8<���13��"�AE���%���',��#�04���c�h�|jrSt|j�}|jr`|djt	|jj
��z
}n.|jr t	|jj
�}nd}|j�@|jj� t|jj�}nd}|d|��z
}|jrLt|jt�r
|j}n|jj�}|r	|d|�d�z
}|S)Nz from {}z<InstallRequirement>z<memory>� in z (from �))
rBr/rE�formatr0rTr[�locationr,rCrL�str�	from_path)rg�srorCs    rh�__str__zInstallRequirement.__str__�s����8�8�,�T�X�X�6�A��y�y��Z�&�&�';�D�I�I�M�M�'J�K�K��
�Y�Y�$�T�Y�Y�]�]�3�A�&�A����(�� � �)�)�5�'��(9�(9�(B�(B�C��%��
�4��z�"�"�A��?�?��$�/�/�3�/�,0�O�O�
�!�_�_�6�6�8�
���w�z�l�!�,�,���rjc�v�dj|jjt|�|j�S)Nz<{} object: {} editable={!r}>)rn�	__class__�__name__rprD�rgs rh�__repr__zInstallRequirement.__repr__�s.��.�5�5��N�N�#�#�S��Y��
�
�
�	
rjc����t|��t��}�fd�t|�D�}dj|jjdj|���S)z5An un-tested helper for getting state, for debugging.c3�H�K�|]}dj|�|����y�w)z{}={!r}N)rn)�.0�attr�
attributess  �rh�	<genexpr>z2InstallRequirement.format_debug.<locals>.<genexpr>�s$�����T�m�d��!�!�$�
�4�(8�9�m�s�"z<{name} object: {{{state}}}>z, )�name�state)�vars�sortedrnrurv�join)rg�namesr�r}s   @rh�format_debugzInstallRequirement.format_debug�sU����$�Z�
��z�"��T�f�U�m�T��-�4�4����(�(��)�)�E�"�5�
�	
rjc�H�|j�y|jjS�N)rBrrws rhrzInstallRequirement.name�s���8�8����x�x�}�}�rjc�@�|jsy|jsJ�|j5td�}|jj	|�5d|jj�vcddd�cddd�S#1swYnxYw	ddd�y#1swYyxYw)NFz1Checking if build backend supports build_editable�build_editable)rGrdr`r2�subprocess_runner�_supported_features)rg�runners  rh�supports_pyproject_editablez.InstallRequirement.supports_pyproject_editable�s��������"�"�"�"�
�^�^�0�C��F��$�$�6�6�v�>�'�4�+>�+>�+R�+R�+T�T�?�>�	�^�?�>��>�	�^�^�s#�'B�A>�+	B�>B	�B�Bc�J�|j�J�|jjSr�)rB�	specifierrws rhr�zInstallRequirement.specifier�s"���x�x�#�#�#��x�x�!�!�!rjc��|jduS)z7Whether this requirement was specified as a direct URL.N)rUrws rh�	is_directzInstallRequirement.is_direct�s���!�!��-�-rjc��|j�J�|jj}t|�dk(xr tt	|��j
dvS)z�Return whether I am pinned to an exact version.

        For example, some-package==1.2 is pinned; some-package>1.2 is not.
        �>�==�===)rBr��len�next�iter�operator)rg�
specifierss  rh�	is_pinnedzInstallRequirement.is_pinnedsL���x�x�#�#�#��X�X�'�'�
��:��!�#�X��T�*�-=�(>�(G�(G�=�(X�Xrj�extras_requestedc�N��|sd}�j�t�fd�|D��Sy)N)�c3��K�|]q}�jjd|i�xsN�jjdt|�i�xs&�jjdt|�i����sy�w)�extraN)rF�evaluater1r)r{r�rgs  �rhr~z3InstallRequirement.match_markers.<locals>.<genexpr>s�������.�E����%�%�w��&6�7�N��<�<�(�(�'�:�e�3D�)E�F�N��<�<�(�(�'�3D�U�3K�)L�M�	N�
.�s�A7A:T)rF�any)rgr�s` rh�
match_markersz InstallRequirement.match_markers
s9���� %���<�<�#���.�
��
�rjc�,�t|j�S)z�Return whether any known-good hashes are specified as options.

        These activate --require-hashes mode; hashes specified as part of a
        URL do not.

        )�boolr<rws rh�has_hash_optionsz#InstallRequirement.has_hash_optionss���D�%�%�&�&rj�trust_internetc�Z�|jj�}|r
|j}n'|jr|jr
|j
}nd}|rO|jrC|j�J�|j|jg�j|j�t|�S)a�Return a hash-comparer that considers my option- and URL-based
        hashes to be known-good.

        Hashes in URLs--ones embedded in the requirements file, not ones
        downloaded from an index server--are almost peers with ones from
        flags. They satisfy --require-hashes (whether it was implicitly or
        explicitly activated) but do not activate it. md5 and sha224 are not
        allowed in flags, which should nudge people toward good algos. We
        always OR all hashes together, even ones from URLs.

        :param trust_internet: Whether to trust URL-based (#md5=...) hashes
            downloaded from the internet, as by populate_link()

        N)r<�copyrEr�r@rU�hash�	hash_name�
setdefault�appendr()rgr��good_hashesrEs    rh�hasheszInstallRequirement.hashes(s����'�'�,�,�.����9�9�D�
�^�^�� 2� 2��%�%�D��D��D�I�I��>�>�-�-�-��"�"�4�>�>�2�6�=�=�d�i�i�H��k�"�"rjc��|j�yt|j�}|jrKt|jt�r
|j}n|jj	�}|r|d|zz
}|S)z8Format a nice indicator to show where this "comes from" Nz->)rBrprCrLrq)rgrrrCs   rhrqzInstallRequirement.from_pathCsc���8�8�������M���?�?��$�/�/�3�/�!�_�_�
�!�_�_�6�6�8�
���T�J�&�&���rj�	build_dir�
autodelete�parallel_buildsc��|�J�|j�.|jjsJ�|jjS|j�6ttj
d��|_|jjSt
|jj�}|r#|�dtj�j��}tjj|�s+tjd|�tj|�tjj!||�}|rdnd}t||tj
d��jS)NT)�kind�globally_managed�_zCreating directory %sF)rP�deleter�r�)r]rPrBr3r4�	REQ_BUILDrr�uuid�uuid4�hexrO�exists�logger�debug�makedirsr�)rgr�r�r��dir_name�actual_build_dir�
delete_args       rh�ensure_build_locationz(InstallRequirement.ensure_build_locationRs"���$�$�$����+��'�'�,�,�,�,��'�'�,�,�,��8�8��$1�"�,�,�t�$�D� ��'�'�,�,�,�*�$�(�(�-�-�8���"��1�T�Z�Z�\�%5�%5�$6�7�H��w�w�~�~�i�(��L�L�0�)�<��K�K�	�"��7�7�<�<�	�8�<��(�T�U�
��!���(�(�!�	
�
�$�	rjc�&�|j�J�|j�J�|j�J�tt	|jd�t
�rd}nd}t
dj|jd||jdg��|_y)z*Set requirement after generating metadata.Nrr�r�r��Name)rB�metadatarMrL�
parse_versionrrr�)rg�ops  rh�_set_requirementz#InstallRequirement._set_requirement}s����x�x�����}�}�(�(�(����*�*�*��m�D�M�M�)�$<�=�w�G��B��B���G�G��M�M�&�)���M�M�)�,��
�
��rjc��|j�J�t|jd�}t|jj�|k(rytjd|j||j�t
|�|_y)Nr�zeGenerating metadata for package %s produced metadata for project name %s. Fix your #egg=%s fragments.)rBrr�rr��warningr)rg�
metadata_names  rh�warn_on_mismatching_namez+InstallRequirement.warn_on_mismatching_name�sq���x�x�#�#�#�)�$�-�-��*?�@�
��T�X�X�]�]�+�}�<��	���
!�
�I�I���I�I�
	
��}�-��rj�
use_user_sitec��|j�yt�j|jj�}|sy|jjj|jd��}|sod|_|rO|jrd|_	yt�rG|jr:td|j�d|j����|jrd|_	yyyy|j rd|_	d|_y||_y)z�Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.should_reinstall appropriately.
        NT)�prereleaseszNWill not install to the user site because it will lack sys.path precedence to rl)rBr�get_distributionrr��contains�versionr[�in_usersiter\r6�in_site_packagesr�raw_namero�in_install_pathrD)rgr��
existing_dist�version_compatibles    rh�check_if_existsz"InstallRequirement.check_if_exists�s��
�8�8���/�1�B�B�4�8�8�=�=�Q�
���!�X�X�/�/�8�8��!�!��9�
��"� $�D��� �,�,�,0�D�)�-�/�M�4R�4R�+�7�7D�7M�7M�6N�O�+�4�4�5�7���
�.�.�(,��%�/�
5S�/��}�}�(,��%�%)��!�$1��!rjc�H�|jsy|jjSrK)rE�is_wheelrws rhr�zInstallRequirement.is_wheel�s���y�y���y�y�!�!�!rjc��|jduSr�)rVrws rh�is_wheel_from_cachez&InstallRequirement.is_wheel_from_cache�s���,�,�D�8�8rjc���|js
Jd|����tjj|j|jxr|jj
xsd�S)N�No source dir for r�)rMrOrPr�rE�subdirectory_fragmentrws rh�unpacked_source_directoryz,InstallRequirement.unpacked_source_directory�sQ�����;�"4�T�F� ;�;���w�w�|�|��O�O�T�Y�Y�J�4�9�9�+J�+J�P�b�
�	
rjc��|js
Jd|����tjj|jd�}|S)Nr�zsetup.py�rMrOrPr�r�)rg�setup_pys  rh�
setup_py_pathz InstallRequirement.setup_py_path�s:�����;�"4�T�F� ;�;���7�7�<�<�� >� >�
�K���rjc��|js
Jd|����tjj|jd�}|S)Nr�z	setup.cfgr�)rg�	setup_cfgs  rh�setup_cfg_pathz!InstallRequirement.setup_cfg_path�s;�����;�"4�T�F� ;�;���G�G�L�L��!?�!?��M�	��rjc�X�|js
Jd|����t|j�S)Nr�)rMr%r�rws rh�pyproject_toml_pathz&InstallRequirement.pyproject_toml_path�s,�����;�"4�T�F� ;�;��"�4�#A�#A�B�Brjc�2�t|j|j|jt	|��}|�&|j
rt
d|�d�dd��d|_yd|_|\}}}}||_||_t||j||�	�|_y)
aALoad the pyproject.toml file.

        After calling this routine, all of the attributes related to PEP 517
        processing for this requirement have been set. In particular, the
        use_pep517 attribute can be used to determine whether we should
        follow the PEP 517 or legacy (setup.py) code path.
        Nz(Config settings are ignored for project �.z?to use --use-pep517 or add a pyproject.toml file to the project�24.0)�reason�replacement�gone_inFT)�backend_path)r$rGr�r�rpr=r'rcrbr)r�rd)rg�pyproject_toml_data�requires�backend�checkr�s      rhr$z&InstallRequirement.load_pyproject_toml�s���2��O�O�T�5�5�t�7I�7I�3�t�9�
���&��#�#��E�d�V�1�M�=�#�
�$�D�O�����1D�.��'�5�,�%*��"�"*���>���*�*��%�	
��rjc��|jr�|jrt|j�sctjj|j�s9tjj|j�std|�d���yyyyy)z�Check that an editable requirement if valid for use with PEP 517/518.

        This verifies that an editable that has a pyproject.toml either supports PEP 660
        or as a setup.py or a setup.cfg
        zProject z� has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.N)	rDrGr�rOrP�isfiler�r�rrws rh�isolated_editable_sanity_checkz1InstallRequirement.isolated_editable_sanity_checks���
�M�M�����4�4�6��G�G�N�N�4�#5�#5�6��G�G�N�N�4�#6�#6�7�#��4�&�!H�I��
�8�7�7� �
rjc��|js
Jd|����|jxsd|j��}|jr�|j�J�|j
rD|jr8|j�r(t|j|j|��|_
net|j|j|��|_
n=t|j|j|j|j|��|_
|js|j!�n|j#�|j%�y)z�Ensure that project metadata is available.

        Under PEP 517 and PEP 660, call the backend hook to prepare the metadata.
        Under legacy processing, call setup.py egg-info.
        r�zfrom N)r`r��details)r`r�rMrHr�)rMrrErGrdrDrAr�r!r`rar �generate_metadata_legacyr�r�rHr�r��assert_source_matches_version)rgr�s  rh�prepare_metadataz#InstallRequirement.prepare_metadata+s�����;�"4�T�F� ;�;���)�)�2��t�y�y�k�2���?�?��&�&�2�2�2��
�
��/�/��4�4�6�*D�"�n�n� �/�/�#�+��'�+<�"�n�n� �/�/�#�+��'�'?��.�.�"�0�0��9�9�����'�D�#��y�y��!�!�#��)�)�+��*�*�,rjc�p�t|d�s|j�j|_|jS)N�	_metadata)�hasattr�get_distr�rrws rhr�zInstallRequirement.metadataWs)���t�[�)�!�]�]�_�5�5�D�N��~�~�rjc�&�|jrt|j�S|jrV|jrJ|j�J�tt
|j�t|jj��Std|�d���)NzInstallRequirement zC has no metadata directory and no wheel: can't make a distribution.)
rarrXr�rBrrrr�AssertionErrorrws rhrzInstallRequirement.get_dist^s����"�"�-�d�.E�.E�F�F�
�
!�
!�d�m�m��8�8�'�'�'�)��� 4� 4�5�!�$�(�(�-�-�0��
��!�$��()�
*�
�	
rjc�H�|js
Jd|����|jd}|jrF|jjr0||jjvrtjd||�ytj
dt|j�||�y)Nr�r�z'Requested %s, but installing version %sz;Source in %s has version %s, which satisfies requirement %s)rMr�rBr�r�r�r�r,)rgr�s  rhr�z0InstallRequirement.assert_source_matches_versionls������;�"4�T�F� ;�;���-�-�	�*���8�8����*�*�w�d�h�h�>P�>P�/P��N�N�9���
�
�L�L�M��T�_�_�-���	
rj�
parent_dirc�P�|j�|j|||��|_yy)aAEnsure that a source_dir is set.

        This will create a temporary build dir if the name of the requirement
        isn't known yet.

        :param parent_dir: The ideal pip parent_dir for the source_dir.
            Generally src_dir for editables and build_dir for sdists.
        :return: self.source_dir
        N)r�r�)rMr�)rgrr�r�s    rh�ensure_has_source_dirz(InstallRequirement.ensure_has_source_dir~s3���?�?�"�"�8�8��%� /�9��D�O�#rj�archive_sourcec�.�|j�J�||_yr�)rf)rgr
s  rh�needs_unpacked_archivez)InstallRequirement.needs_unpacked_archive�s���#�#�+�+�+�-��rjc���|j�J�|j�*tt|j�|j�yt	|j�rtd|�d|j�d���y)z6Ensure the source directory has not yet been built in.Nz%pip can't proceed with requirements 'z)' due to a pre-existing build directory (z�). This is likely due to a previous installation that failed . pip is being responsible and not assuming it can delete this. Please delete it and try again.)rMrfr5rpr.rrws rh�ensure_pristine_source_checkoutz2InstallRequirement.ensure_pristine_source_checkout�sx�����*�*�*����+���D�0�0�1�4�?�?�C�
����
0�(�7��v�>1�15���0A�B2�2��
�	1rjc���|js!tjd|j�y|jsJ�|jsJ�|jj
dk(ryt
j|jj
�}|sJd|jj����t|jj�}|j|j|d��y)Nz>Cannot update repository at %s; repository location is unknown�filezUnsupported VCS URL r)rT�	verbosity)rEr�r�rMrD�schemer7�get_backend_for_schemerTr-�obtain)rg�vcs_backend�
hidden_urls   rh�update_editablez"InstallRequirement.update_editable�s����y�y��L�L�P����
�
��}�}��}�������9�9���v�%���0�0����1A�1A�B���B�2�4�9�9�=�=�/�B�B�{��d�i�i�m�m�,�
����4�?�?�
�a��Hrj�auto_confirm�verbosec�<�|jsJ�t�j|jj�}|s!tjd|j�ytj
d|�tj|�}|j||�|S)a�
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        z#Skipping %s as it is not installed.NzFound existing installation: %s)
rBrr�rr�r��infor&�	from_dist�remove)rgrr�dist�uninstalled_pathsets     rh�	uninstallzInstallRequirement.uninstall�sy���x�x��x�&�(�9�9�$�(�(�-�-�H����N�N�@�$�)�)�L�����5�t�<�.�8�8��>���"�"�<��9�"�"rjrP�	parentdir�rootdirc���dtdtdtfd�}|j�J�tjj	||�}|||�}|jj
dz|zS)Nr�prefixrIc���|j|tjjz�s
Jd|�d|����|t	|�dzd}|jtjjd�}|S)Nzname z doesn't start with prefix r��/)�
startswithrOrP�sepr��replace)rr$s  rh�_clean_zip_namez=InstallRequirement._get_archive_name.<locals>._clean_zip_name�st���?�?�������$��
E��t�h�9�&��D�
E����F��a��)�*�D��<�<������S�1�D��Krjr&)rprBrOrPr�r)rgrPr!r"r*rs      rh�_get_archive_namez$InstallRequirement._get_archive_name�sf��	�#�	�s�	�s�	��x�x�#�#�#��w�w�|�|�I�t�,���t�W�-���x�x�}�}�s�"�T�)�)rjc�V�|jsJ�|�yd}dj|j|jd�}tj
j
||�}tj
j|�r�tdjt|��d�}|dk(rd}n�|d	k(r5tjd
t|��t	j|�nj|dk(rKt|�}tjdt|�t|��tj||�n|d
k(rt!j"d�|syt%j&|d	t$j(d��}|5tj
j+tj
j-|j.��}t	j0|�D]�\}	}
}|
D]G}|j3||	|��}
t%j4|
dz�}d|_|j9|d��I|D]H}|j3||	|��}tj
j
|	|�}|j;||��J��	ddd�tj=dt|��y#1swY�)xYw)z}Saves archive to provided build_dir.

        Used for saving downloaded VCS requirements as part of `pip download`.
        NTz	{}-{}.zipr�z8The file {} exists. (i)gnore, (w)ipe, (b)ackup, (a)bort )�i�w�b�ar-Fr.zDeleting %sr/zBacking up %s to %sr0���)�
allowZip64)r!r"r&i�r�zSaved %s)rMrnrr�rOrPr�r�r*r,r�r�rr+�shutil�move�sys�exit�zipfile�ZipFile�ZIP_DEFLATED�normcaserRr��walkr+�ZipInfo�
external_attr�writestr�writer)rgr��create_archive�archive_name�archive_path�response�	dest_file�
zip_output�dir�dirpath�dirnames�	filenames�dirname�dir_arcname�zipdir�filename�file_arcnames                 rh�archivezInstallRequirement.archive�s:��
����������"�)�)�$�)�)�T�]�]�9�5M�N���w�w�|�|�I�|�<��
�7�7�>�>�,�'�&�%�%+�V�L��,F�%G�$��H�
�3��!&���S�����}�l�<�.H�I��	�	�,�'��S��&�|�4�	����)� ��.� ��+��
���L�)�4��S����������_�_���� � ��	
�
���'�'�"�"�2�7�7�?�?�4�3Q�3Q�#R�S�C�02�����,���9�'�G�"&�"8�"8��")� #�#9�#�K�
%�_�_�[�3�->�?�F�+6�F�(��'�'���3� (�!*�H�#'�#9�#9� �")� #�$:�$�L�
 "�w�w�|�|�G�X�>�H��$�$�X�|�<�!*�1=��*	���J��\� :�;�+�Z�s
�8C>J�J(�root�homer$�warn_script_location�	pycompilec�x�|j�J�t|jj||||j|��}|jrh|j
s\t
|�|ng||||jj|j|j|j|j��	d|_
y|j
sJ�|jsJ�t|jj|j|t|j�|||jr|jnd|j ��d|_
y)N)�userrQrPrHr$)	r;r$rQr�rr�rHr`r�T)r�req_descriptionrSrR�
direct_url�	requested)rBrrrHrDr��install_editable_legacyr�r`r�r^rXr#rpr�rWr@)	rgr;rPrQr$rRr�rSrs	         rh�installzInstallRequirement.install)s���x�x�#�#�#���H�H�M�M�����]�]��

���=�=����#�1?�1K�~�QS���+��X�X�]�]�"�0�0�����.�.�*.�*H�*H�

�&*�D�"���}�}��}��#�#�#�#���H�H�M�M�� � ������M��!5�-1�^�^�t�)�)���(�(�		
�"&��rj)FNNNFr�)T)rIN)FF)NNNNTFT)>rv�
__module__�__qualname__�__doc__r
rrrpr�rr
r	rrrirsrxr��propertyr�	functools�	lru_cacher�rr�r�r�rr�r�r(r�rqr�r�r�r�r�r�r�r�r�r�r$r�r�rr�rrr�r	rrrrr&r r+rOrrZr:rjrhr9r9As�����#�$(�%)��t4�/3�7;�FJ� �"$�#�',�!t4�
�k�
"�t4��U�3�(<�#<�=�>�t4��	t4�
�t�n�t4��&�!�
t4��T�N�t4��t4�!��c��+�t4��t�C��c��N�3�4�t4�"�$�s�E�#�t�C�y�.�,A�'A�"B�C�t4��t4��3��t4��t4� !%�!t4�"
�#t4�l���0
�#�
�
	
�c�	
���h�s�m����
�Y����	U�T�	U��	U��"�<�"��"��.�4�.��.��Y�4�Y��Y��h�x��}�.E��QU��"�'�$�'��'�#�T�#�V�#�6
�8�C�=�
�)��)�*.�)�AE�)�	�)�V
�,.�$#2�T�#2�d�#2�L�"�$�"��"�
�9�T�9��9��
�3�
��
���s�����������C�S�C��C�"
�H�**-�X��#����
�*�
��*!� %�	������	�

��,.�T�.�d�.��$I�*;@�#� �#�37�#�	�"�	#�#�4*�c�*�c�*�C�*�C�*�A<��#��A<�4�A<�J37�"�"� $�%)�#��0&� ��#��/�0&��s�m�0&��s�m�	0&�
��
�0&�#�
0&��0&��0&�
�0&rjr9rBrIc��d}|jsd}n|jrd}n|jrd}|rtdddd��|S)	Nr�z3Unnamed requirements are not allowed as constraintsz4Editable requirements are not allowed as constraintszConstraints cannot have extrasaConstraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms.z+replacing the constraint with a requirementi )r�r�r��issue)rrDr?r')rB�problems  rh�check_invalid_constraint_typerd\sN���G��8�8�G��	���H��	���2����/�F���	
��Nrj�options�reqs�optionc�L�t||d�ry|D]}t||d�s�yy)NTF)�getattr)rerfrgrBs    rh�_has_optionrjxs/���w���%�����3���%���rjc��t||d�}t||d�}|s|r?tdddd��tjd�|jj�yy)	N�
build_optionsr;z2--build-option and --global-option are deprecated.iS.zto use --config-settingsr�)r�rbr�r�zTImplying --no-binary=:all: due to the presence of --build-option / --global-option. )rjr'r�r��format_control�disallow_binaries)rerf�has_build_options�has_global_optionss    rh�check_legacy_setup_py_optionsrq�si��$�G�T�?�C��$�W�d�4D�E���.��G��2��		
�	���
1�	
�	���0�0�2�/rj)hr_�loggingrOr3r5r�r7�optparser�pathlibr�typingrrrrr	r
rr�pip._vendor.packaging.markersr
�"pip._vendor.packaging.requirementsr� pip._vendor.packaging.specifiersr�pip._vendor.packaging.utilsr�pip._vendor.packaging.versionrrr��pip._vendor.pyproject_hooksr�pip._internal.build_envrr�pip._internal.exceptionsrr�pip._internal.locationsr�pip._internal.metadatarrrr�pip._internal.metadata.baser�pip._internal.models.direct_urlr�pip._internal.models.linkr�'pip._internal.operations.build.metadatar �0pip._internal.operations.build.metadata_editabler!�.pip._internal.operations.build.metadata_legacyr��0pip._internal.operations.install.editable_legacyr"rY�&pip._internal.operations.install.wheelr#�pip._internal.pyprojectr$r%�pip._internal.req.req_uninstallr&�pip._internal.utils.deprecationr'�pip._internal.utils.hashesr(�pip._internal.utils.miscr)r*r+r,r-r.r/r0�pip._internal.utils.packagingr1�pip._internal.utils.subprocessr2�pip._internal.utils.temp_dirr3r4�pip._internal.utils.unpackingr5�pip._internal.utils.virtualenvr6�pip._internal.vcsr7�	getLoggerrvr�r9rprdr�rjrqr:rjrh�<module>r�s!����	�
�
�����S�S�S�0�:�9�9�1�@�>�J�M�.���8�5�*�E�W���A�L�<�6�-�	�	�	�5�F�E�5�C�!�	��	�	�8�	$��X&�X&�v�'9��c��8���t�,>�'?����QU��3�
�3�
�!�
"�3�
�3rjpython3.12/site-packages/pip/_internal/req/constructors.py000064400000045124151732701510017575 0ustar00"""Backing implementation for InstallRequirement's various constructors

The idea here is that these formed a major chunk of InstallRequirement's size
so, moving them and support code dedicated to them outside of that class
helps creates for better understandability for the rest of the code.

These are meant to be used elsewhere within pip to create instances of
InstallRequirement.
"""

import copy
import logging
import os
import re
from typing import Collection, Dict, List, Optional, Set, Tuple, Union

from pip._vendor.packaging.markers import Marker
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement
from pip._vendor.packaging.specifiers import Specifier

from pip._internal.exceptions import InstallationError
from pip._internal.models.index import PyPI, TestPyPI
from pip._internal.models.link import Link
from pip._internal.models.wheel import Wheel
from pip._internal.req.req_file import ParsedRequirement
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils.filetypes import is_archive_file
from pip._internal.utils.misc import is_installable_dir
from pip._internal.utils.packaging import get_requirement
from pip._internal.utils.urls import path_to_url
from pip._internal.vcs import is_url, vcs

__all__ = [
    "install_req_from_editable",
    "install_req_from_line",
    "parse_editable",
]

logger = logging.getLogger(__name__)
operators = Specifier._operators.keys()


def _strip_extras(path: str) -> Tuple[str, Optional[str]]:
    m = re.match(r"^(.+)(\[[^\]]+\])$", path)
    extras = None
    if m:
        path_no_extras = m.group(1)
        extras = m.group(2)
    else:
        path_no_extras = path

    return path_no_extras, extras


def convert_extras(extras: Optional[str]) -> Set[str]:
    if not extras:
        return set()
    return get_requirement("placeholder" + extras.lower()).extras


def _set_requirement_extras(req: Requirement, new_extras: Set[str]) -> Requirement:
    """
    Returns a new requirement based on the given one, with the supplied extras. If the
    given requirement already has extras those are replaced (or dropped if no new extras
    are given).
    """
    match: Optional[re.Match[str]] = re.fullmatch(
        # see https://peps.python.org/pep-0508/#complete-grammar
        r"([\w\t .-]+)(\[[^\]]*\])?(.*)",
        str(req),
        flags=re.ASCII,
    )
    # ireq.req is a valid requirement so the regex should always match
    assert (
        match is not None
    ), f"regex match on requirement {req} failed, this should never happen"
    pre: Optional[str] = match.group(1)
    post: Optional[str] = match.group(3)
    assert (
        pre is not None and post is not None
    ), f"regex group selection for requirement {req} failed, this should never happen"
    extras: str = "[%s]" % ",".join(sorted(new_extras)) if new_extras else ""
    return Requirement(f"{pre}{extras}{post}")


def parse_editable(editable_req: str) -> Tuple[Optional[str], str, Set[str]]:
    """Parses an editable requirement into:
        - a requirement name
        - an URL
        - extras
        - editable options
    Accepted requirements:
        svn+http://blahblah@rev#egg=Foobar[baz]&subdirectory=version_subdir
        .[some_extra]
    """

    url = editable_req

    # If a file path is specified with extras, strip off the extras.
    url_no_extras, extras = _strip_extras(url)

    if os.path.isdir(url_no_extras):
        # Treating it as code that has already been checked out
        url_no_extras = path_to_url(url_no_extras)

    if url_no_extras.lower().startswith("file:"):
        package_name = Link(url_no_extras).egg_fragment
        if extras:
            return (
                package_name,
                url_no_extras,
                get_requirement("placeholder" + extras.lower()).extras,
            )
        else:
            return package_name, url_no_extras, set()

    for version_control in vcs:
        if url.lower().startswith(f"{version_control}:"):
            url = f"{version_control}+{url}"
            break

    link = Link(url)

    if not link.is_vcs:
        backends = ", ".join(vcs.all_schemes)
        raise InstallationError(
            f"{editable_req} is not a valid editable requirement. "
            f"It should either be a path to a local project or a VCS URL "
            f"(beginning with {backends})."
        )

    package_name = link.egg_fragment
    if not package_name:
        raise InstallationError(
            "Could not detect requirement name for '{}', please specify one "
            "with #egg=your_package_name".format(editable_req)
        )
    return package_name, url, set()


def check_first_requirement_in_file(filename: str) -> None:
    """Check if file is parsable as a requirements file.

    This is heavily based on ``pkg_resources.parse_requirements``, but
    simplified to just check the first meaningful line.

    :raises InvalidRequirement: If the first meaningful line cannot be parsed
        as an requirement.
    """
    with open(filename, encoding="utf-8", errors="ignore") as f:
        # Create a steppable iterator, so we can handle \-continuations.
        lines = (
            line
            for line in (line.strip() for line in f)
            if line and not line.startswith("#")  # Skip blank lines/comments.
        )

        for line in lines:
            # Drop comments -- a hash without a space may be in a URL.
            if " #" in line:
                line = line[: line.find(" #")]
            # If there is a line continuation, drop it, and append the next line.
            if line.endswith("\\"):
                line = line[:-2].strip() + next(lines, "")
            Requirement(line)
            return


def deduce_helpful_msg(req: str) -> str:
    """Returns helpful msg in case requirements file does not exist,
    or cannot be parsed.

    :params req: Requirements file path
    """
    if not os.path.exists(req):
        return f" File '{req}' does not exist."
    msg = " The path does exist. "
    # Try to parse and check if it is a requirements file.
    try:
        check_first_requirement_in_file(req)
    except InvalidRequirement:
        logger.debug("Cannot parse '%s' as requirements file", req)
    else:
        msg += (
            f"The argument you provided "
            f"({req}) appears to be a"
            f" requirements file. If that is the"
            f" case, use the '-r' flag to install"
            f" the packages specified within it."
        )
    return msg


class RequirementParts:
    def __init__(
        self,
        requirement: Optional[Requirement],
        link: Optional[Link],
        markers: Optional[Marker],
        extras: Set[str],
    ):
        self.requirement = requirement
        self.link = link
        self.markers = markers
        self.extras = extras


def parse_req_from_editable(editable_req: str) -> RequirementParts:
    name, url, extras_override = parse_editable(editable_req)

    if name is not None:
        try:
            req: Optional[Requirement] = Requirement(name)
        except InvalidRequirement:
            raise InstallationError(f"Invalid requirement: '{name}'")
    else:
        req = None

    link = Link(url)

    return RequirementParts(req, link, None, extras_override)


# ---- The actual constructors follow ----


def install_req_from_editable(
    editable_req: str,
    comes_from: Optional[Union[InstallRequirement, str]] = None,
    *,
    use_pep517: Optional[bool] = None,
    isolated: bool = False,
    global_options: Optional[List[str]] = None,
    hash_options: Optional[Dict[str, List[str]]] = None,
    constraint: bool = False,
    user_supplied: bool = False,
    permit_editable_wheels: bool = False,
    config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
) -> InstallRequirement:
    parts = parse_req_from_editable(editable_req)

    return InstallRequirement(
        parts.requirement,
        comes_from=comes_from,
        user_supplied=user_supplied,
        editable=True,
        permit_editable_wheels=permit_editable_wheels,
        link=parts.link,
        constraint=constraint,
        use_pep517=use_pep517,
        isolated=isolated,
        global_options=global_options,
        hash_options=hash_options,
        config_settings=config_settings,
        extras=parts.extras,
    )


def _looks_like_path(name: str) -> bool:
    """Checks whether the string "looks like" a path on the filesystem.

    This does not check whether the target actually exists, only judge from the
    appearance.

    Returns true if any of the following conditions is true:
    * a path separator is found (either os.path.sep or os.path.altsep);
    * a dot is found (which represents the current directory).
    """
    if os.path.sep in name:
        return True
    if os.path.altsep is not None and os.path.altsep in name:
        return True
    if name.startswith("."):
        return True
    return False


def _get_url_from_path(path: str, name: str) -> Optional[str]:
    """
    First, it checks whether a provided path is an installable directory. If it
    is, returns the path.

    If false, check if the path is an archive file (such as a .whl).
    The function checks if the path is a file. If false, if the path has
    an @, it will treat it as a PEP 440 URL requirement and return the path.
    """
    if _looks_like_path(name) and os.path.isdir(path):
        if is_installable_dir(path):
            return path_to_url(path)
        # TODO: The is_installable_dir test here might not be necessary
        #       now that it is done in load_pyproject_toml too.
        raise InstallationError(
            f"Directory {name!r} is not installable. Neither 'setup.py' "
            "nor 'pyproject.toml' found."
        )
    if not is_archive_file(path):
        return None
    if os.path.isfile(path):
        return path_to_url(path)
    urlreq_parts = name.split("@", 1)
    if len(urlreq_parts) >= 2 and not _looks_like_path(urlreq_parts[0]):
        # If the path contains '@' and the part before it does not look
        # like a path, try to treat it as a PEP 440 URL req instead.
        return None
    logger.warning(
        "Requirement %r looks like a filename, but the file does not exist",
        name,
    )
    return path_to_url(path)


def parse_req_from_line(name: str, line_source: Optional[str]) -> RequirementParts:
    if is_url(name):
        marker_sep = "; "
    else:
        marker_sep = ";"
    if marker_sep in name:
        name, markers_as_string = name.split(marker_sep, 1)
        markers_as_string = markers_as_string.strip()
        if not markers_as_string:
            markers = None
        else:
            markers = Marker(markers_as_string)
    else:
        markers = None
    name = name.strip()
    req_as_string = None
    path = os.path.normpath(os.path.abspath(name))
    link = None
    extras_as_string = None

    if is_url(name):
        link = Link(name)
    else:
        p, extras_as_string = _strip_extras(path)
        url = _get_url_from_path(p, name)
        if url is not None:
            link = Link(url)

    # it's a local file, dir, or url
    if link:
        # Handle relative file URLs
        if link.scheme == "file" and re.search(r"\.\./", link.url):
            link = Link(path_to_url(os.path.normpath(os.path.abspath(link.path))))
        # wheel file
        if link.is_wheel:
            wheel = Wheel(link.filename)  # can raise InvalidWheelFilename
            req_as_string = f"{wheel.name}=={wheel.version}"
        else:
            # set the req to the egg fragment.  when it's not there, this
            # will become an 'unnamed' requirement
            req_as_string = link.egg_fragment

    # a requirement specifier
    else:
        req_as_string = name

    extras = convert_extras(extras_as_string)

    def with_source(text: str) -> str:
        if not line_source:
            return text
        return f"{text} (from {line_source})"

    def _parse_req_string(req_as_string: str) -> Requirement:
        try:
            req = get_requirement(req_as_string)
        except InvalidRequirement:
            if os.path.sep in req_as_string:
                add_msg = "It looks like a path."
                add_msg += deduce_helpful_msg(req_as_string)
            elif "=" in req_as_string and not any(
                op in req_as_string for op in operators
            ):
                add_msg = "= is not a valid operator. Did you mean == ?"
            else:
                add_msg = ""
            msg = with_source(f"Invalid requirement: {req_as_string!r}")
            if add_msg:
                msg += f"\nHint: {add_msg}"
            raise InstallationError(msg)
        else:
            # Deprecate extras after specifiers: "name>=1.0[extras]"
            # This currently works by accident because _strip_extras() parses
            # any extras in the end of the string and those are saved in
            # RequirementParts
            for spec in req.specifier:
                spec_str = str(spec)
                if spec_str.endswith("]"):
                    msg = f"Extras after version '{spec_str}'."
                    raise InstallationError(msg)
        return req

    if req_as_string is not None:
        req: Optional[Requirement] = _parse_req_string(req_as_string)
    else:
        req = None

    return RequirementParts(req, link, markers, extras)


def install_req_from_line(
    name: str,
    comes_from: Optional[Union[str, InstallRequirement]] = None,
    *,
    use_pep517: Optional[bool] = None,
    isolated: bool = False,
    global_options: Optional[List[str]] = None,
    hash_options: Optional[Dict[str, List[str]]] = None,
    constraint: bool = False,
    line_source: Optional[str] = None,
    user_supplied: bool = False,
    config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
) -> InstallRequirement:
    """Creates an InstallRequirement from a name, which might be a
    requirement, directory containing 'setup.py', filename, or URL.

    :param line_source: An optional string describing where the line is from,
        for logging purposes in case of an error.
    """
    parts = parse_req_from_line(name, line_source)

    return InstallRequirement(
        parts.requirement,
        comes_from,
        link=parts.link,
        markers=parts.markers,
        use_pep517=use_pep517,
        isolated=isolated,
        global_options=global_options,
        hash_options=hash_options,
        config_settings=config_settings,
        constraint=constraint,
        extras=parts.extras,
        user_supplied=user_supplied,
    )


def install_req_from_req_string(
    req_string: str,
    comes_from: Optional[InstallRequirement] = None,
    isolated: bool = False,
    use_pep517: Optional[bool] = None,
    user_supplied: bool = False,
) -> InstallRequirement:
    try:
        req = get_requirement(req_string)
    except InvalidRequirement:
        raise InstallationError(f"Invalid requirement: '{req_string}'")

    domains_not_allowed = [
        PyPI.file_storage_domain,
        TestPyPI.file_storage_domain,
    ]
    if (
        req.url
        and comes_from
        and comes_from.link
        and comes_from.link.netloc in domains_not_allowed
    ):
        # Explicitly disallow pypi packages that depend on external urls
        raise InstallationError(
            "Packages installed from PyPI cannot depend on packages "
            "which are not also hosted on PyPI.\n"
            "{} depends on {} ".format(comes_from.name, req)
        )

    return InstallRequirement(
        req,
        comes_from,
        isolated=isolated,
        use_pep517=use_pep517,
        user_supplied=user_supplied,
    )


def install_req_from_parsed_requirement(
    parsed_req: ParsedRequirement,
    isolated: bool = False,
    use_pep517: Optional[bool] = None,
    user_supplied: bool = False,
    config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
) -> InstallRequirement:
    if parsed_req.is_editable:
        req = install_req_from_editable(
            parsed_req.requirement,
            comes_from=parsed_req.comes_from,
            use_pep517=use_pep517,
            constraint=parsed_req.constraint,
            isolated=isolated,
            user_supplied=user_supplied,
            config_settings=config_settings,
        )

    else:
        req = install_req_from_line(
            parsed_req.requirement,
            comes_from=parsed_req.comes_from,
            use_pep517=use_pep517,
            isolated=isolated,
            global_options=(
                parsed_req.options.get("global_options", [])
                if parsed_req.options
                else []
            ),
            hash_options=(
                parsed_req.options.get("hashes", {}) if parsed_req.options else {}
            ),
            constraint=parsed_req.constraint,
            line_source=parsed_req.line_source,
            user_supplied=user_supplied,
            config_settings=config_settings,
        )
    return req


def install_req_from_link_and_ireq(
    link: Link, ireq: InstallRequirement
) -> InstallRequirement:
    return InstallRequirement(
        req=ireq.req,
        comes_from=ireq.comes_from,
        editable=ireq.editable,
        link=link,
        markers=ireq.markers,
        use_pep517=ireq.use_pep517,
        isolated=ireq.isolated,
        global_options=ireq.global_options,
        hash_options=ireq.hash_options,
        config_settings=ireq.config_settings,
        user_supplied=ireq.user_supplied,
    )


def install_req_drop_extras(ireq: InstallRequirement) -> InstallRequirement:
    """
    Creates a new InstallationRequirement using the given template but without
    any extras. Sets the original requirement as the new one's parent
    (comes_from).
    """
    return InstallRequirement(
        req=(
            _set_requirement_extras(ireq.req, set()) if ireq.req is not None else None
        ),
        comes_from=ireq,
        editable=ireq.editable,
        link=ireq.link,
        markers=ireq.markers,
        use_pep517=ireq.use_pep517,
        isolated=ireq.isolated,
        global_options=ireq.global_options,
        hash_options=ireq.hash_options,
        constraint=ireq.constraint,
        extras=[],
        config_settings=ireq.config_settings,
        user_supplied=ireq.user_supplied,
        permit_editable_wheels=ireq.permit_editable_wheels,
    )


def install_req_extend_extras(
    ireq: InstallRequirement,
    extras: Collection[str],
) -> InstallRequirement:
    """
    Returns a copy of an installation requirement with some additional extras.
    Makes a shallow copy of the ireq object.
    """
    result = copy.copy(ireq)
    result.extras = {*ireq.extras, *extras}
    result.req = (
        _set_requirement_extras(ireq.req, result.extras)
        if ireq.req is not None
        else None
    )
    return result
python3.12/site-packages/pip/_internal/req/req_set.py000064400000011140151732701510016456 0ustar00import logging
from collections import OrderedDict
from typing import Dict, List

from pip._vendor.packaging.specifiers import LegacySpecifier
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.packaging.version import LegacyVersion

from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils.deprecation import deprecated

logger = logging.getLogger(__name__)


class RequirementSet:
    def __init__(self, check_supported_wheels: bool = True) -> None:
        """Create a RequirementSet."""

        self.requirements: Dict[str, InstallRequirement] = OrderedDict()
        self.check_supported_wheels = check_supported_wheels

        self.unnamed_requirements: List[InstallRequirement] = []

    def __str__(self) -> str:
        requirements = sorted(
            (req for req in self.requirements.values() if not req.comes_from),
            key=lambda req: canonicalize_name(req.name or ""),
        )
        return " ".join(str(req.req) for req in requirements)

    def __repr__(self) -> str:
        requirements = sorted(
            self.requirements.values(),
            key=lambda req: canonicalize_name(req.name or ""),
        )

        format_string = "<{classname} object; {count} requirement(s): {reqs}>"
        return format_string.format(
            classname=self.__class__.__name__,
            count=len(requirements),
            reqs=", ".join(str(req.req) for req in requirements),
        )

    def add_unnamed_requirement(self, install_req: InstallRequirement) -> None:
        assert not install_req.name
        self.unnamed_requirements.append(install_req)

    def add_named_requirement(self, install_req: InstallRequirement) -> None:
        assert install_req.name

        project_name = canonicalize_name(install_req.name)
        self.requirements[project_name] = install_req

    def has_requirement(self, name: str) -> bool:
        project_name = canonicalize_name(name)

        return (
            project_name in self.requirements
            and not self.requirements[project_name].constraint
        )

    def get_requirement(self, name: str) -> InstallRequirement:
        project_name = canonicalize_name(name)

        if project_name in self.requirements:
            return self.requirements[project_name]

        raise KeyError(f"No project with the name {name!r}")

    @property
    def all_requirements(self) -> List[InstallRequirement]:
        return self.unnamed_requirements + list(self.requirements.values())

    @property
    def requirements_to_install(self) -> List[InstallRequirement]:
        """Return the list of requirements that need to be installed.

        TODO remove this property together with the legacy resolver, since the new
             resolver only returns requirements that need to be installed.
        """
        return [
            install_req
            for install_req in self.all_requirements
            if not install_req.constraint and not install_req.satisfied_by
        ]

    def warn_legacy_versions_and_specifiers(self) -> None:
        for req in self.requirements_to_install:
            version = req.get_dist().version
            if isinstance(version, LegacyVersion):
                deprecated(
                    reason=(
                        f"pip has selected the non standard version {version} "
                        f"of {req}. In the future this version will be "
                        f"ignored as it isn't standard compliant."
                    ),
                    replacement=(
                        "set or update constraints to select another version "
                        "or contact the package author to fix the version number"
                    ),
                    issue=12063,
                    gone_in="24.0",
                )
            for dep in req.get_dist().iter_dependencies():
                if any(isinstance(spec, LegacySpecifier) for spec in dep.specifier):
                    deprecated(
                        reason=(
                            f"pip has selected {req} {version} which has non "
                            f"standard dependency specifier {dep}. "
                            f"In the future this version of {req} will be "
                            f"ignored as it isn't standard compliant."
                        ),
                        replacement=(
                            "set or update constraints to select another version "
                            "or contact the package author to fix the version number"
                        ),
                        issue=12063,
                        gone_in="24.0",
                    )
python3.12/site-packages/pip/_internal/req/req_install.py000064400000104530151732701510017337 0ustar00import functools
import logging
import os
import shutil
import sys
import uuid
import zipfile
from optparse import Values
from pathlib import Path
from typing import Any, Collection, Dict, Iterable, List, Optional, Sequence, Union

from pip._vendor.packaging.markers import Marker
from pip._vendor.packaging.requirements import Requirement
from pip._vendor.packaging.specifiers import SpecifierSet
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.packaging.version import Version
from pip._vendor.packaging.version import parse as parse_version
from pip._vendor.pyproject_hooks import BuildBackendHookCaller

from pip._internal.build_env import BuildEnvironment, NoOpBuildEnvironment
from pip._internal.exceptions import InstallationError, PreviousBuildDirError
from pip._internal.locations import get_scheme
from pip._internal.metadata import (
    BaseDistribution,
    get_default_environment,
    get_directory_distribution,
    get_wheel_distribution,
)
from pip._internal.metadata.base import FilesystemWheel
from pip._internal.models.direct_url import DirectUrl
from pip._internal.models.link import Link
from pip._internal.operations.build.metadata import generate_metadata
from pip._internal.operations.build.metadata_editable import generate_editable_metadata
from pip._internal.operations.build.metadata_legacy import (
    generate_metadata as generate_metadata_legacy,
)
from pip._internal.operations.install.editable_legacy import (
    install_editable as install_editable_legacy,
)
from pip._internal.operations.install.wheel import install_wheel
from pip._internal.pyproject import load_pyproject_toml, make_pyproject_path
from pip._internal.req.req_uninstall import UninstallPathSet
from pip._internal.utils.deprecation import deprecated
from pip._internal.utils.hashes import Hashes
from pip._internal.utils.misc import (
    ConfiguredBuildBackendHookCaller,
    ask_path_exists,
    backup_dir,
    display_path,
    hide_url,
    is_installable_dir,
    redact_auth_from_requirement,
    redact_auth_from_url,
)
from pip._internal.utils.packaging import safe_extra
from pip._internal.utils.subprocess import runner_with_spinner_message
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
from pip._internal.utils.unpacking import unpack_file
from pip._internal.utils.virtualenv import running_under_virtualenv
from pip._internal.vcs import vcs

logger = logging.getLogger(__name__)


class InstallRequirement:
    """
    Represents something that may be installed later on, may have information
    about where to fetch the relevant requirement and also contains logic for
    installing the said requirement.
    """

    def __init__(
        self,
        req: Optional[Requirement],
        comes_from: Optional[Union[str, "InstallRequirement"]],
        editable: bool = False,
        link: Optional[Link] = None,
        markers: Optional[Marker] = None,
        use_pep517: Optional[bool] = None,
        isolated: bool = False,
        *,
        global_options: Optional[List[str]] = None,
        hash_options: Optional[Dict[str, List[str]]] = None,
        config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
        constraint: bool = False,
        extras: Collection[str] = (),
        user_supplied: bool = False,
        permit_editable_wheels: bool = False,
    ) -> None:
        assert req is None or isinstance(req, Requirement), req
        self.req = req
        self.comes_from = comes_from
        self.constraint = constraint
        self.editable = editable
        self.permit_editable_wheels = permit_editable_wheels

        # source_dir is the local directory where the linked requirement is
        # located, or unpacked. In case unpacking is needed, creating and
        # populating source_dir is done by the RequirementPreparer. Note this
        # is not necessarily the directory where pyproject.toml or setup.py is
        # located - that one is obtained via unpacked_source_directory.
        self.source_dir: Optional[str] = None
        if self.editable:
            assert link
            if link.is_file:
                self.source_dir = os.path.normpath(os.path.abspath(link.file_path))

        # original_link is the direct URL that was provided by the user for the
        # requirement, either directly or via a constraints file.
        if link is None and req and req.url:
            # PEP 508 URL requirement
            link = Link(req.url)
        self.link = self.original_link = link

        # When this InstallRequirement is a wheel obtained from the cache of locally
        # built wheels, this is the source link corresponding to the cache entry, which
        # was used to download and build the cached wheel.
        self.cached_wheel_source_link: Optional[Link] = None

        # Information about the location of the artifact that was downloaded . This
        # property is guaranteed to be set in resolver results.
        self.download_info: Optional[DirectUrl] = None

        # Path to any downloaded or already-existing package.
        self.local_file_path: Optional[str] = None
        if self.link and self.link.is_file:
            self.local_file_path = self.link.file_path

        if extras:
            self.extras = extras
        elif req:
            self.extras = req.extras
        else:
            self.extras = set()
        if markers is None and req:
            markers = req.marker
        self.markers = markers

        # This holds the Distribution object if this requirement is already installed.
        self.satisfied_by: Optional[BaseDistribution] = None
        # Whether the installation process should try to uninstall an existing
        # distribution before installing this requirement.
        self.should_reinstall = False
        # Temporary build location
        self._temp_build_dir: Optional[TempDirectory] = None
        # Set to True after successful installation
        self.install_succeeded: Optional[bool] = None
        # Supplied options
        self.global_options = global_options if global_options else []
        self.hash_options = hash_options if hash_options else {}
        self.config_settings = config_settings
        # Set to True after successful preparation of this requirement
        self.prepared = False
        # User supplied requirement are explicitly requested for installation
        # by the user via CLI arguments or requirements files, as opposed to,
        # e.g. dependencies, extras or constraints.
        self.user_supplied = user_supplied

        self.isolated = isolated
        self.build_env: BuildEnvironment = NoOpBuildEnvironment()

        # For PEP 517, the directory where we request the project metadata
        # gets stored. We need this to pass to build_wheel, so the backend
        # can ensure that the wheel matches the metadata (see the PEP for
        # details).
        self.metadata_directory: Optional[str] = None

        # The static build requirements (from pyproject.toml)
        self.pyproject_requires: Optional[List[str]] = None

        # Build requirements that we will check are available
        self.requirements_to_check: List[str] = []

        # The PEP 517 backend we should use to build the project
        self.pep517_backend: Optional[BuildBackendHookCaller] = None

        # Are we using PEP 517 for this requirement?
        # After pyproject.toml has been loaded, the only valid values are True
        # and False. Before loading, None is valid (meaning "use the default").
        # Setting an explicit value before loading pyproject.toml is supported,
        # but after loading this flag should be treated as read only.
        self.use_pep517 = use_pep517

        # This requirement needs more preparation before it can be built
        self.needs_more_preparation = False

        # This requirement needs to be unpacked before it can be installed.
        self._archive_source: Optional[Path] = None

    def __str__(self) -> str:
        if self.req:
            s = redact_auth_from_requirement(self.req)
            if self.link:
                s += " from {}".format(redact_auth_from_url(self.link.url))
        elif self.link:
            s = redact_auth_from_url(self.link.url)
        else:
            s = "<InstallRequirement>"
        if self.satisfied_by is not None:
            if self.satisfied_by.location is not None:
                location = display_path(self.satisfied_by.location)
            else:
                location = "<memory>"
            s += f" in {location}"
        if self.comes_from:
            if isinstance(self.comes_from, str):
                comes_from: Optional[str] = self.comes_from
            else:
                comes_from = self.comes_from.from_path()
            if comes_from:
                s += f" (from {comes_from})"
        return s

    def __repr__(self) -> str:
        return "<{} object: {} editable={!r}>".format(
            self.__class__.__name__, str(self), self.editable
        )

    def format_debug(self) -> str:
        """An un-tested helper for getting state, for debugging."""
        attributes = vars(self)
        names = sorted(attributes)

        state = ("{}={!r}".format(attr, attributes[attr]) for attr in sorted(names))
        return "<{name} object: {{{state}}}>".format(
            name=self.__class__.__name__,
            state=", ".join(state),
        )

    # Things that are valid for all kinds of requirements?
    @property
    def name(self) -> Optional[str]:
        if self.req is None:
            return None
        return self.req.name

    @functools.lru_cache()  # use cached_property in python 3.8+
    def supports_pyproject_editable(self) -> bool:
        if not self.use_pep517:
            return False
        assert self.pep517_backend
        with self.build_env:
            runner = runner_with_spinner_message(
                "Checking if build backend supports build_editable"
            )
            with self.pep517_backend.subprocess_runner(runner):
                return "build_editable" in self.pep517_backend._supported_features()

    @property
    def specifier(self) -> SpecifierSet:
        assert self.req is not None
        return self.req.specifier

    @property
    def is_direct(self) -> bool:
        """Whether this requirement was specified as a direct URL."""
        return self.original_link is not None

    @property
    def is_pinned(self) -> bool:
        """Return whether I am pinned to an exact version.

        For example, some-package==1.2 is pinned; some-package>1.2 is not.
        """
        assert self.req is not None
        specifiers = self.req.specifier
        return len(specifiers) == 1 and next(iter(specifiers)).operator in {"==", "==="}

    def match_markers(self, extras_requested: Optional[Iterable[str]] = None) -> bool:
        if not extras_requested:
            # Provide an extra to safely evaluate the markers
            # without matching any extra
            extras_requested = ("",)
        if self.markers is not None:
            return any(
                self.markers.evaluate({"extra": extra})
                # TODO: Remove these two variants when packaging is upgraded to
                # support the marker comparison logic specified in PEP 685.
                or self.markers.evaluate({"extra": safe_extra(extra)})
                or self.markers.evaluate({"extra": canonicalize_name(extra)})
                for extra in extras_requested
            )
        else:
            return True

    @property
    def has_hash_options(self) -> bool:
        """Return whether any known-good hashes are specified as options.

        These activate --require-hashes mode; hashes specified as part of a
        URL do not.

        """
        return bool(self.hash_options)

    def hashes(self, trust_internet: bool = True) -> Hashes:
        """Return a hash-comparer that considers my option- and URL-based
        hashes to be known-good.

        Hashes in URLs--ones embedded in the requirements file, not ones
        downloaded from an index server--are almost peers with ones from
        flags. They satisfy --require-hashes (whether it was implicitly or
        explicitly activated) but do not activate it. md5 and sha224 are not
        allowed in flags, which should nudge people toward good algos. We
        always OR all hashes together, even ones from URLs.

        :param trust_internet: Whether to trust URL-based (#md5=...) hashes
            downloaded from the internet, as by populate_link()

        """
        good_hashes = self.hash_options.copy()
        if trust_internet:
            link = self.link
        elif self.is_direct and self.user_supplied:
            link = self.original_link
        else:
            link = None
        if link and link.hash:
            assert link.hash_name is not None
            good_hashes.setdefault(link.hash_name, []).append(link.hash)
        return Hashes(good_hashes)

    def from_path(self) -> Optional[str]:
        """Format a nice indicator to show where this "comes from" """
        if self.req is None:
            return None
        s = str(self.req)
        if self.comes_from:
            comes_from: Optional[str]
            if isinstance(self.comes_from, str):
                comes_from = self.comes_from
            else:
                comes_from = self.comes_from.from_path()
            if comes_from:
                s += "->" + comes_from
        return s

    def ensure_build_location(
        self, build_dir: str, autodelete: bool, parallel_builds: bool
    ) -> str:
        assert build_dir is not None
        if self._temp_build_dir is not None:
            assert self._temp_build_dir.path
            return self._temp_build_dir.path
        if self.req is None:
            # Some systems have /tmp as a symlink which confuses custom
            # builds (such as numpy). Thus, we ensure that the real path
            # is returned.
            self._temp_build_dir = TempDirectory(
                kind=tempdir_kinds.REQ_BUILD, globally_managed=True
            )

            return self._temp_build_dir.path

        # This is the only remaining place where we manually determine the path
        # for the temporary directory. It is only needed for editables where
        # it is the value of the --src option.

        # When parallel builds are enabled, add a UUID to the build directory
        # name so multiple builds do not interfere with each other.
        dir_name: str = canonicalize_name(self.req.name)
        if parallel_builds:
            dir_name = f"{dir_name}_{uuid.uuid4().hex}"

        # FIXME: Is there a better place to create the build_dir? (hg and bzr
        # need this)
        if not os.path.exists(build_dir):
            logger.debug("Creating directory %s", build_dir)
            os.makedirs(build_dir)
        actual_build_dir = os.path.join(build_dir, dir_name)
        # `None` indicates that we respect the globally-configured deletion
        # settings, which is what we actually want when auto-deleting.
        delete_arg = None if autodelete else False
        return TempDirectory(
            path=actual_build_dir,
            delete=delete_arg,
            kind=tempdir_kinds.REQ_BUILD,
            globally_managed=True,
        ).path

    def _set_requirement(self) -> None:
        """Set requirement after generating metadata."""
        assert self.req is None
        assert self.metadata is not None
        assert self.source_dir is not None

        # Construct a Requirement object from the generated metadata
        if isinstance(parse_version(self.metadata["Version"]), Version):
            op = "=="
        else:
            op = "==="

        self.req = Requirement(
            "".join(
                [
                    self.metadata["Name"],
                    op,
                    self.metadata["Version"],
                ]
            )
        )

    def warn_on_mismatching_name(self) -> None:
        assert self.req is not None
        metadata_name = canonicalize_name(self.metadata["Name"])
        if canonicalize_name(self.req.name) == metadata_name:
            # Everything is fine.
            return

        # If we're here, there's a mismatch. Log a warning about it.
        logger.warning(
            "Generating metadata for package %s "
            "produced metadata for project name %s. Fix your "
            "#egg=%s fragments.",
            self.name,
            metadata_name,
            self.name,
        )
        self.req = Requirement(metadata_name)

    def check_if_exists(self, use_user_site: bool) -> None:
        """Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.should_reinstall appropriately.
        """
        if self.req is None:
            return
        existing_dist = get_default_environment().get_distribution(self.req.name)
        if not existing_dist:
            return

        version_compatible = self.req.specifier.contains(
            existing_dist.version,
            prereleases=True,
        )
        if not version_compatible:
            self.satisfied_by = None
            if use_user_site:
                if existing_dist.in_usersite:
                    self.should_reinstall = True
                elif running_under_virtualenv() and existing_dist.in_site_packages:
                    raise InstallationError(
                        f"Will not install to the user site because it will "
                        f"lack sys.path precedence to {existing_dist.raw_name} "
                        f"in {existing_dist.location}"
                    )
            elif existing_dist.in_install_path:
                self.should_reinstall = True
        else:
            if self.editable:
                self.should_reinstall = True
                # when installing editables, nothing pre-existing should ever
                # satisfy
                self.satisfied_by = None
            else:
                self.satisfied_by = existing_dist

    # Things valid for wheels
    @property
    def is_wheel(self) -> bool:
        if not self.link:
            return False
        return self.link.is_wheel

    @property
    def is_wheel_from_cache(self) -> bool:
        # When True, it means that this InstallRequirement is a local wheel file in the
        # cache of locally built wheels.
        return self.cached_wheel_source_link is not None

    # Things valid for sdists
    @property
    def unpacked_source_directory(self) -> str:
        assert self.source_dir, f"No source dir for {self}"
        return os.path.join(
            self.source_dir, self.link and self.link.subdirectory_fragment or ""
        )

    @property
    def setup_py_path(self) -> str:
        assert self.source_dir, f"No source dir for {self}"
        setup_py = os.path.join(self.unpacked_source_directory, "setup.py")

        return setup_py

    @property
    def setup_cfg_path(self) -> str:
        assert self.source_dir, f"No source dir for {self}"
        setup_cfg = os.path.join(self.unpacked_source_directory, "setup.cfg")

        return setup_cfg

    @property
    def pyproject_toml_path(self) -> str:
        assert self.source_dir, f"No source dir for {self}"
        return make_pyproject_path(self.unpacked_source_directory)

    def load_pyproject_toml(self) -> None:
        """Load the pyproject.toml file.

        After calling this routine, all of the attributes related to PEP 517
        processing for this requirement have been set. In particular, the
        use_pep517 attribute can be used to determine whether we should
        follow the PEP 517 or legacy (setup.py) code path.
        """
        pyproject_toml_data = load_pyproject_toml(
            self.use_pep517, self.pyproject_toml_path, self.setup_py_path, str(self)
        )

        if pyproject_toml_data is None:
            if self.config_settings:
                deprecated(
                    reason=f"Config settings are ignored for project {self}.",
                    replacement=(
                        "to use --use-pep517 or add a "
                        "pyproject.toml file to the project"
                    ),
                    gone_in="24.0",
                )
            self.use_pep517 = False
            return

        self.use_pep517 = True
        requires, backend, check, backend_path = pyproject_toml_data
        self.requirements_to_check = check
        self.pyproject_requires = requires
        self.pep517_backend = ConfiguredBuildBackendHookCaller(
            self,
            self.unpacked_source_directory,
            backend,
            backend_path=backend_path,
        )

    def isolated_editable_sanity_check(self) -> None:
        """Check that an editable requirement if valid for use with PEP 517/518.

        This verifies that an editable that has a pyproject.toml either supports PEP 660
        or as a setup.py or a setup.cfg
        """
        if (
            self.editable
            and self.use_pep517
            and not self.supports_pyproject_editable()
            and not os.path.isfile(self.setup_py_path)
            and not os.path.isfile(self.setup_cfg_path)
        ):
            raise InstallationError(
                f"Project {self} has a 'pyproject.toml' and its build "
                f"backend is missing the 'build_editable' hook. Since it does not "
                f"have a 'setup.py' nor a 'setup.cfg', "
                f"it cannot be installed in editable mode. "
                f"Consider using a build backend that supports PEP 660."
            )

    def prepare_metadata(self) -> None:
        """Ensure that project metadata is available.

        Under PEP 517 and PEP 660, call the backend hook to prepare the metadata.
        Under legacy processing, call setup.py egg-info.
        """
        assert self.source_dir, f"No source dir for {self}"
        details = self.name or f"from {self.link}"

        if self.use_pep517:
            assert self.pep517_backend is not None
            if (
                self.editable
                and self.permit_editable_wheels
                and self.supports_pyproject_editable()
            ):
                self.metadata_directory = generate_editable_metadata(
                    build_env=self.build_env,
                    backend=self.pep517_backend,
                    details=details,
                )
            else:
                self.metadata_directory = generate_metadata(
                    build_env=self.build_env,
                    backend=self.pep517_backend,
                    details=details,
                )
        else:
            self.metadata_directory = generate_metadata_legacy(
                build_env=self.build_env,
                setup_py_path=self.setup_py_path,
                source_dir=self.unpacked_source_directory,
                isolated=self.isolated,
                details=details,
            )

        # Act on the newly generated metadata, based on the name and version.
        if not self.name:
            self._set_requirement()
        else:
            self.warn_on_mismatching_name()

        self.assert_source_matches_version()

    @property
    def metadata(self) -> Any:
        if not hasattr(self, "_metadata"):
            self._metadata = self.get_dist().metadata

        return self._metadata

    def get_dist(self) -> BaseDistribution:
        if self.metadata_directory:
            return get_directory_distribution(self.metadata_directory)
        elif self.local_file_path and self.is_wheel:
            assert self.req is not None
            return get_wheel_distribution(
                FilesystemWheel(self.local_file_path),
                canonicalize_name(self.req.name),
            )
        raise AssertionError(
            f"InstallRequirement {self} has no metadata directory and no wheel: "
            f"can't make a distribution."
        )

    def assert_source_matches_version(self) -> None:
        assert self.source_dir, f"No source dir for {self}"
        version = self.metadata["version"]
        if self.req and self.req.specifier and version not in self.req.specifier:
            logger.warning(
                "Requested %s, but installing version %s",
                self,
                version,
            )
        else:
            logger.debug(
                "Source in %s has version %s, which satisfies requirement %s",
                display_path(self.source_dir),
                version,
                self,
            )

    # For both source distributions and editables
    def ensure_has_source_dir(
        self,
        parent_dir: str,
        autodelete: bool = False,
        parallel_builds: bool = False,
    ) -> None:
        """Ensure that a source_dir is set.

        This will create a temporary build dir if the name of the requirement
        isn't known yet.

        :param parent_dir: The ideal pip parent_dir for the source_dir.
            Generally src_dir for editables and build_dir for sdists.
        :return: self.source_dir
        """
        if self.source_dir is None:
            self.source_dir = self.ensure_build_location(
                parent_dir,
                autodelete=autodelete,
                parallel_builds=parallel_builds,
            )

    def needs_unpacked_archive(self, archive_source: Path) -> None:
        assert self._archive_source is None
        self._archive_source = archive_source

    def ensure_pristine_source_checkout(self) -> None:
        """Ensure the source directory has not yet been built in."""
        assert self.source_dir is not None
        if self._archive_source is not None:
            unpack_file(str(self._archive_source), self.source_dir)
        elif is_installable_dir(self.source_dir):
            # If a checkout exists, it's unwise to keep going.
            # version inconsistencies are logged later, but do not fail
            # the installation.
            raise PreviousBuildDirError(
                f"pip can't proceed with requirements '{self}' due to a "
                f"pre-existing build directory ({self.source_dir}). This is likely "
                "due to a previous installation that failed . pip is "
                "being responsible and not assuming it can delete this. "
                "Please delete it and try again."
            )

    # For editable installations
    def update_editable(self) -> None:
        if not self.link:
            logger.debug(
                "Cannot update repository at %s; repository location is unknown",
                self.source_dir,
            )
            return
        assert self.editable
        assert self.source_dir
        if self.link.scheme == "file":
            # Static paths don't get updated
            return
        vcs_backend = vcs.get_backend_for_scheme(self.link.scheme)
        # Editable requirements are validated in Requirement constructors.
        # So here, if it's neither a path nor a valid VCS URL, it's a bug.
        assert vcs_backend, f"Unsupported VCS URL {self.link.url}"
        hidden_url = hide_url(self.link.url)
        vcs_backend.obtain(self.source_dir, url=hidden_url, verbosity=0)

    # Top-level Actions
    def uninstall(
        self, auto_confirm: bool = False, verbose: bool = False
    ) -> Optional[UninstallPathSet]:
        """
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        """
        assert self.req
        dist = get_default_environment().get_distribution(self.req.name)
        if not dist:
            logger.warning("Skipping %s as it is not installed.", self.name)
            return None
        logger.info("Found existing installation: %s", dist)

        uninstalled_pathset = UninstallPathSet.from_dist(dist)
        uninstalled_pathset.remove(auto_confirm, verbose)
        return uninstalled_pathset

    def _get_archive_name(self, path: str, parentdir: str, rootdir: str) -> str:
        def _clean_zip_name(name: str, prefix: str) -> str:
            assert name.startswith(
                prefix + os.path.sep
            ), f"name {name!r} doesn't start with prefix {prefix!r}"
            name = name[len(prefix) + 1 :]
            name = name.replace(os.path.sep, "/")
            return name

        assert self.req is not None
        path = os.path.join(parentdir, path)
        name = _clean_zip_name(path, rootdir)
        return self.req.name + "/" + name

    def archive(self, build_dir: Optional[str]) -> None:
        """Saves archive to provided build_dir.

        Used for saving downloaded VCS requirements as part of `pip download`.
        """
        assert self.source_dir
        if build_dir is None:
            return

        create_archive = True
        archive_name = "{}-{}.zip".format(self.name, self.metadata["version"])
        archive_path = os.path.join(build_dir, archive_name)

        if os.path.exists(archive_path):
            response = ask_path_exists(
                "The file {} exists. (i)gnore, (w)ipe, "
                "(b)ackup, (a)bort ".format(display_path(archive_path)),
                ("i", "w", "b", "a"),
            )
            if response == "i":
                create_archive = False
            elif response == "w":
                logger.warning("Deleting %s", display_path(archive_path))
                os.remove(archive_path)
            elif response == "b":
                dest_file = backup_dir(archive_path)
                logger.warning(
                    "Backing up %s to %s",
                    display_path(archive_path),
                    display_path(dest_file),
                )
                shutil.move(archive_path, dest_file)
            elif response == "a":
                sys.exit(-1)

        if not create_archive:
            return

        zip_output = zipfile.ZipFile(
            archive_path,
            "w",
            zipfile.ZIP_DEFLATED,
            allowZip64=True,
        )
        with zip_output:
            dir = os.path.normcase(os.path.abspath(self.unpacked_source_directory))
            for dirpath, dirnames, filenames in os.walk(dir):
                for dirname in dirnames:
                    dir_arcname = self._get_archive_name(
                        dirname,
                        parentdir=dirpath,
                        rootdir=dir,
                    )
                    zipdir = zipfile.ZipInfo(dir_arcname + "/")
                    zipdir.external_attr = 0x1ED << 16  # 0o755
                    zip_output.writestr(zipdir, "")
                for filename in filenames:
                    file_arcname = self._get_archive_name(
                        filename,
                        parentdir=dirpath,
                        rootdir=dir,
                    )
                    filename = os.path.join(dirpath, filename)
                    zip_output.write(filename, file_arcname)

        logger.info("Saved %s", display_path(archive_path))

    def install(
        self,
        global_options: Optional[Sequence[str]] = None,
        root: Optional[str] = None,
        home: Optional[str] = None,
        prefix: Optional[str] = None,
        warn_script_location: bool = True,
        use_user_site: bool = False,
        pycompile: bool = True,
    ) -> None:
        assert self.req is not None
        scheme = get_scheme(
            self.req.name,
            user=use_user_site,
            home=home,
            root=root,
            isolated=self.isolated,
            prefix=prefix,
        )

        if self.editable and not self.is_wheel:
            install_editable_legacy(
                global_options=global_options if global_options is not None else [],
                prefix=prefix,
                home=home,
                use_user_site=use_user_site,
                name=self.req.name,
                setup_py_path=self.setup_py_path,
                isolated=self.isolated,
                build_env=self.build_env,
                unpacked_source_directory=self.unpacked_source_directory,
            )
            self.install_succeeded = True
            return

        assert self.is_wheel
        assert self.local_file_path

        install_wheel(
            self.req.name,
            self.local_file_path,
            scheme=scheme,
            req_description=str(self.req),
            pycompile=pycompile,
            warn_script_location=warn_script_location,
            direct_url=self.download_info if self.is_direct else None,
            requested=self.user_supplied,
        )
        self.install_succeeded = True


def check_invalid_constraint_type(req: InstallRequirement) -> str:
    # Check for unsupported forms
    problem = ""
    if not req.name:
        problem = "Unnamed requirements are not allowed as constraints"
    elif req.editable:
        problem = "Editable requirements are not allowed as constraints"
    elif req.extras:
        problem = "Constraints cannot have extras"

    if problem:
        deprecated(
            reason=(
                "Constraints are only allowed to take the form of a package "
                "name and a version specifier. Other forms were originally "
                "permitted as an accident of the implementation, but were "
                "undocumented. The new implementation of the resolver no "
                "longer supports these forms."
            ),
            replacement="replacing the constraint with a requirement",
            # No plan yet for when the new resolver becomes default
            gone_in=None,
            issue=8210,
        )

    return problem


def _has_option(options: Values, reqs: List[InstallRequirement], option: str) -> bool:
    if getattr(options, option, None):
        return True
    for req in reqs:
        if getattr(req, option, None):
            return True
    return False


def check_legacy_setup_py_options(
    options: Values,
    reqs: List[InstallRequirement],
) -> None:
    has_build_options = _has_option(options, reqs, "build_options")
    has_global_options = _has_option(options, reqs, "global_options")
    if has_build_options or has_global_options:
        deprecated(
            reason="--build-option and --global-option are deprecated.",
            issue=11859,
            replacement="to use --config-settings",
            gone_in="24.0",
        )
        logger.warning(
            "Implying --no-binary=:all: due to the presence of "
            "--build-option / --global-option. "
        )
        options.format_control.disallow_binaries()
python3.12/site-packages/pip/_internal/req/__init__.py000064400000005262151732701510016563 0ustar00import collections
import logging
from typing import Generator, List, Optional, Sequence, Tuple

from pip._internal.utils.logging import indent_log

from .req_file import parse_requirements
from .req_install import InstallRequirement
from .req_set import RequirementSet

__all__ = [
    "RequirementSet",
    "InstallRequirement",
    "parse_requirements",
    "install_given_reqs",
]

logger = logging.getLogger(__name__)


class InstallationResult:
    def __init__(self, name: str) -> None:
        self.name = name

    def __repr__(self) -> str:
        return f"InstallationResult(name={self.name!r})"


def _validate_requirements(
    requirements: List[InstallRequirement],
) -> Generator[Tuple[str, InstallRequirement], None, None]:
    for req in requirements:
        assert req.name, f"invalid to-be-installed requirement: {req}"
        yield req.name, req


def install_given_reqs(
    requirements: List[InstallRequirement],
    global_options: Sequence[str],
    root: Optional[str],
    home: Optional[str],
    prefix: Optional[str],
    warn_script_location: bool,
    use_user_site: bool,
    pycompile: bool,
) -> List[InstallationResult]:
    """
    Install everything in the given list.

    (to be called after having downloaded and unpacked the packages)
    """
    to_install = collections.OrderedDict(_validate_requirements(requirements))

    if to_install:
        logger.info(
            "Installing collected packages: %s",
            ", ".join(to_install.keys()),
        )

    installed = []

    with indent_log():
        for req_name, requirement in to_install.items():
            if requirement.should_reinstall:
                logger.info("Attempting uninstall: %s", req_name)
                with indent_log():
                    uninstalled_pathset = requirement.uninstall(auto_confirm=True)
            else:
                uninstalled_pathset = None

            try:
                requirement.install(
                    global_options,
                    root=root,
                    home=home,
                    prefix=prefix,
                    warn_script_location=warn_script_location,
                    use_user_site=use_user_site,
                    pycompile=pycompile,
                )
            except Exception:
                # if install did not succeed, rollback previous uninstall
                if uninstalled_pathset and not requirement.install_succeeded:
                    uninstalled_pathset.rollback()
                raise
            else:
                if uninstalled_pathset and requirement.install_succeeded:
                    uninstalled_pathset.commit()

            installed.append(InstallationResult(req_name))

    return installed
python3.12/site-packages/pip/_internal/configuration.py000064400000033017151732701510017103 0ustar00"""Configuration management setup

Some terminology:
- name
  As written in config files.
- value
  Value associated with a name
- key
  Name combined with it's section (section.name)
- variant
  A single word describing where the configuration key-value pair came from
"""

import configparser
import locale
import os
import sys
from typing import Any, Dict, Iterable, List, NewType, Optional, Tuple

from pip._internal.exceptions import (
    ConfigurationError,
    ConfigurationFileCouldNotBeLoaded,
)
from pip._internal.utils import appdirs
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.logging import getLogger
from pip._internal.utils.misc import ensure_dir, enum

RawConfigParser = configparser.RawConfigParser  # Shorthand
Kind = NewType("Kind", str)

CONFIG_BASENAME = "pip.ini" if WINDOWS else "pip.conf"
ENV_NAMES_IGNORED = "version", "help"

# The kinds of configurations there are.
kinds = enum(
    USER="user",  # User Specific
    GLOBAL="global",  # System Wide
    SITE="site",  # [Virtual] Environment Specific
    ENV="env",  # from PIP_CONFIG_FILE
    ENV_VAR="env-var",  # from Environment Variables
)
OVERRIDE_ORDER = kinds.GLOBAL, kinds.USER, kinds.SITE, kinds.ENV, kinds.ENV_VAR
VALID_LOAD_ONLY = kinds.USER, kinds.GLOBAL, kinds.SITE

logger = getLogger(__name__)


# NOTE: Maybe use the optionx attribute to normalize keynames.
def _normalize_name(name: str) -> str:
    """Make a name consistent regardless of source (environment or file)"""
    name = name.lower().replace("_", "-")
    if name.startswith("--"):
        name = name[2:]  # only prefer long opts
    return name


def _disassemble_key(name: str) -> List[str]:
    if "." not in name:
        error_message = (
            "Key does not contain dot separated section and key. "
            "Perhaps you wanted to use 'global.{}' instead?"
        ).format(name)
        raise ConfigurationError(error_message)
    return name.split(".", 1)


def get_configuration_files() -> Dict[Kind, List[str]]:
    global_config_files = [
        os.path.join(path, CONFIG_BASENAME) for path in appdirs.site_config_dirs("pip")
    ]

    site_config_file = os.path.join(sys.prefix, CONFIG_BASENAME)
    legacy_config_file = os.path.join(
        os.path.expanduser("~"),
        "pip" if WINDOWS else ".pip",
        CONFIG_BASENAME,
    )
    new_config_file = os.path.join(appdirs.user_config_dir("pip"), CONFIG_BASENAME)
    return {
        kinds.GLOBAL: global_config_files,
        kinds.SITE: [site_config_file],
        kinds.USER: [legacy_config_file, new_config_file],
    }


class Configuration:
    """Handles management of configuration.

    Provides an interface to accessing and managing configuration files.

    This class converts provides an API that takes "section.key-name" style
    keys and stores the value associated with it as "key-name" under the
    section "section".

    This allows for a clean interface wherein the both the section and the
    key-name are preserved in an easy to manage form in the configuration files
    and the data stored is also nice.
    """

    def __init__(self, isolated: bool, load_only: Optional[Kind] = None) -> None:
        super().__init__()

        if load_only is not None and load_only not in VALID_LOAD_ONLY:
            raise ConfigurationError(
                "Got invalid value for load_only - should be one of {}".format(
                    ", ".join(map(repr, VALID_LOAD_ONLY))
                )
            )
        self.isolated = isolated
        self.load_only = load_only

        # Because we keep track of where we got the data from
        self._parsers: Dict[Kind, List[Tuple[str, RawConfigParser]]] = {
            variant: [] for variant in OVERRIDE_ORDER
        }
        self._config: Dict[Kind, Dict[str, Any]] = {
            variant: {} for variant in OVERRIDE_ORDER
        }
        self._modified_parsers: List[Tuple[str, RawConfigParser]] = []

    def load(self) -> None:
        """Loads configuration from configuration files and environment"""
        self._load_config_files()
        if not self.isolated:
            self._load_environment_vars()

    def get_file_to_edit(self) -> Optional[str]:
        """Returns the file with highest priority in configuration"""
        assert self.load_only is not None, "Need to be specified a file to be editing"

        try:
            return self._get_parser_to_modify()[0]
        except IndexError:
            return None

    def items(self) -> Iterable[Tuple[str, Any]]:
        """Returns key-value pairs like dict.items() representing the loaded
        configuration
        """
        return self._dictionary.items()

    def get_value(self, key: str) -> Any:
        """Get a value from the configuration."""
        orig_key = key
        key = _normalize_name(key)
        try:
            return self._dictionary[key]
        except KeyError:
            # disassembling triggers a more useful error message than simply
            # "No such key" in the case that the key isn't in the form command.option
            _disassemble_key(key)
            raise ConfigurationError(f"No such key - {orig_key}")

    def set_value(self, key: str, value: Any) -> None:
        """Modify a value in the configuration."""
        key = _normalize_name(key)
        self._ensure_have_load_only()

        assert self.load_only
        fname, parser = self._get_parser_to_modify()

        if parser is not None:
            section, name = _disassemble_key(key)

            # Modify the parser and the configuration
            if not parser.has_section(section):
                parser.add_section(section)
            parser.set(section, name, value)

        self._config[self.load_only][key] = value
        self._mark_as_modified(fname, parser)

    def unset_value(self, key: str) -> None:
        """Unset a value in the configuration."""
        orig_key = key
        key = _normalize_name(key)
        self._ensure_have_load_only()

        assert self.load_only
        if key not in self._config[self.load_only]:
            raise ConfigurationError(f"No such key - {orig_key}")

        fname, parser = self._get_parser_to_modify()

        if parser is not None:
            section, name = _disassemble_key(key)
            if not (
                parser.has_section(section) and parser.remove_option(section, name)
            ):
                # The option was not removed.
                raise ConfigurationError(
                    "Fatal Internal error [id=1]. Please report as a bug."
                )

            # The section may be empty after the option was removed.
            if not parser.items(section):
                parser.remove_section(section)
            self._mark_as_modified(fname, parser)

        del self._config[self.load_only][key]

    def save(self) -> None:
        """Save the current in-memory state."""
        self._ensure_have_load_only()

        for fname, parser in self._modified_parsers:
            logger.info("Writing to %s", fname)

            # Ensure directory exists.
            ensure_dir(os.path.dirname(fname))

            # Ensure directory's permission(need to be writeable)
            try:
                with open(fname, "w") as f:
                    parser.write(f)
            except OSError as error:
                raise ConfigurationError(
                    f"An error occurred while writing to the configuration file "
                    f"{fname}: {error}"
                )

    #
    # Private routines
    #

    def _ensure_have_load_only(self) -> None:
        if self.load_only is None:
            raise ConfigurationError("Needed a specific file to be modifying.")
        logger.debug("Will be working with %s variant only", self.load_only)

    @property
    def _dictionary(self) -> Dict[str, Any]:
        """A dictionary representing the loaded configuration."""
        # NOTE: Dictionaries are not populated if not loaded. So, conditionals
        #       are not needed here.
        retval = {}

        for variant in OVERRIDE_ORDER:
            retval.update(self._config[variant])

        return retval

    def _load_config_files(self) -> None:
        """Loads configuration from configuration files"""
        config_files = dict(self.iter_config_files())
        if config_files[kinds.ENV][0:1] == [os.devnull]:
            logger.debug(
                "Skipping loading configuration files due to "
                "environment's PIP_CONFIG_FILE being os.devnull"
            )
            return

        for variant, files in config_files.items():
            for fname in files:
                # If there's specific variant set in `load_only`, load only
                # that variant, not the others.
                if self.load_only is not None and variant != self.load_only:
                    logger.debug("Skipping file '%s' (variant: %s)", fname, variant)
                    continue

                parser = self._load_file(variant, fname)

                # Keeping track of the parsers used
                self._parsers[variant].append((fname, parser))

    def _load_file(self, variant: Kind, fname: str) -> RawConfigParser:
        logger.verbose("For variant '%s', will try loading '%s'", variant, fname)
        parser = self._construct_parser(fname)

        for section in parser.sections():
            items = parser.items(section)
            self._config[variant].update(self._normalized_keys(section, items))

        return parser

    def _construct_parser(self, fname: str) -> RawConfigParser:
        parser = configparser.RawConfigParser()
        # If there is no such file, don't bother reading it but create the
        # parser anyway, to hold the data.
        # Doing this is useful when modifying and saving files, where we don't
        # need to construct a parser.
        if os.path.exists(fname):
            locale_encoding = locale.getpreferredencoding(False)
            try:
                parser.read(fname, encoding=locale_encoding)
            except UnicodeDecodeError:
                # See https://github.com/pypa/pip/issues/4963
                raise ConfigurationFileCouldNotBeLoaded(
                    reason=f"contains invalid {locale_encoding} characters",
                    fname=fname,
                )
            except configparser.Error as error:
                # See https://github.com/pypa/pip/issues/4893
                raise ConfigurationFileCouldNotBeLoaded(error=error)
        return parser

    def _load_environment_vars(self) -> None:
        """Loads configuration from environment variables"""
        self._config[kinds.ENV_VAR].update(
            self._normalized_keys(":env:", self.get_environ_vars())
        )

    def _normalized_keys(
        self, section: str, items: Iterable[Tuple[str, Any]]
    ) -> Dict[str, Any]:
        """Normalizes items to construct a dictionary with normalized keys.

        This routine is where the names become keys and are made the same
        regardless of source - configuration files or environment.
        """
        normalized = {}
        for name, val in items:
            key = section + "." + _normalize_name(name)
            normalized[key] = val
        return normalized

    def get_environ_vars(self) -> Iterable[Tuple[str, str]]:
        """Returns a generator with all environmental vars with prefix PIP_"""
        for key, val in os.environ.items():
            if key.startswith("PIP_"):
                name = key[4:].lower()
                if name not in ENV_NAMES_IGNORED:
                    yield name, val

    # XXX: This is patched in the tests.
    def iter_config_files(self) -> Iterable[Tuple[Kind, List[str]]]:
        """Yields variant and configuration files associated with it.

        This should be treated like items of a dictionary.
        """
        # SMELL: Move the conditions out of this function

        # environment variables have the lowest priority
        config_file = os.environ.get("PIP_CONFIG_FILE", None)
        if config_file is not None:
            yield kinds.ENV, [config_file]
        else:
            yield kinds.ENV, []

        config_files = get_configuration_files()

        # at the base we have any global configuration
        yield kinds.GLOBAL, config_files[kinds.GLOBAL]

        # per-user configuration next
        should_load_user_config = not self.isolated and not (
            config_file and os.path.exists(config_file)
        )
        if should_load_user_config:
            # The legacy config file is overridden by the new config file
            yield kinds.USER, config_files[kinds.USER]

        # finally virtualenv configuration first trumping others
        yield kinds.SITE, config_files[kinds.SITE]

    def get_values_in_config(self, variant: Kind) -> Dict[str, Any]:
        """Get values present in a config file"""
        return self._config[variant]

    def _get_parser_to_modify(self) -> Tuple[str, RawConfigParser]:
        # Determine which parser to modify
        assert self.load_only
        parsers = self._parsers[self.load_only]
        if not parsers:
            # This should not happen if everything works correctly.
            raise ConfigurationError(
                "Fatal Internal error [id=2]. Please report as a bug."
            )

        # Use the highest priority parser.
        return parsers[-1]

    # XXX: This is patched in the tests.
    def _mark_as_modified(self, fname: str, parser: RawConfigParser) -> None:
        file_parser_tuple = (fname, parser)
        if file_parser_tuple not in self._modified_parsers:
            self._modified_parsers.append(file_parser_tuple)

    def __repr__(self) -> str:
        return f"{self.__class__.__name__}({self._dictionary!r})"
python3.12/site-packages/pip/_internal/main.py000064400000000524151732701510015155 0ustar00from typing import List, Optional


def main(args: Optional[List[str]] = None) -> int:
    """This is preserved for old console scripts that may still be referencing
    it.

    For additional details, see https://github.com/pypa/pip/issues/7498.
    """
    from pip._internal.utils.entrypoints import _wrapper

    return _wrapper(args)
python3.12/site-packages/pip/_internal/exceptions.py000064400000056271151732701510016424 0ustar00"""Exceptions used throughout package.

This module MUST NOT try to import from anything within `pip._internal` to
operate. This is expected to be importable from any/all files within the
subpackage and, thus, should not depend on them.
"""

import configparser
import contextlib
import locale
import logging
import pathlib
import re
import sys
from itertools import chain, groupby, repeat
from typing import TYPE_CHECKING, Dict, Iterator, List, Optional, Union

from pip._vendor.requests.models import Request, Response
from pip._vendor.rich.console import Console, ConsoleOptions, RenderResult
from pip._vendor.rich.markup import escape
from pip._vendor.rich.text import Text

if TYPE_CHECKING:
    from hashlib import _Hash
    from typing import Literal

    from pip._internal.metadata import BaseDistribution
    from pip._internal.req.req_install import InstallRequirement

logger = logging.getLogger(__name__)


#
# Scaffolding
#
def _is_kebab_case(s: str) -> bool:
    return re.match(r"^[a-z]+(-[a-z]+)*$", s) is not None


def _prefix_with_indent(
    s: Union[Text, str],
    console: Console,
    *,
    prefix: str,
    indent: str,
) -> Text:
    if isinstance(s, Text):
        text = s
    else:
        text = console.render_str(s)

    return console.render_str(prefix, overflow="ignore") + console.render_str(
        f"\n{indent}", overflow="ignore"
    ).join(text.split(allow_blank=True))


class PipError(Exception):
    """The base pip error."""


class DiagnosticPipError(PipError):
    """An error, that presents diagnostic information to the user.

    This contains a bunch of logic, to enable pretty presentation of our error
    messages. Each error gets a unique reference. Each error can also include
    additional context, a hint and/or a note -- which are presented with the
    main error message in a consistent style.

    This is adapted from the error output styling in `sphinx-theme-builder`.
    """

    reference: str

    def __init__(
        self,
        *,
        kind: 'Literal["error", "warning"]' = "error",
        reference: Optional[str] = None,
        message: Union[str, Text],
        context: Optional[Union[str, Text]],
        hint_stmt: Optional[Union[str, Text]],
        note_stmt: Optional[Union[str, Text]] = None,
        link: Optional[str] = None,
    ) -> None:
        # Ensure a proper reference is provided.
        if reference is None:
            assert hasattr(self, "reference"), "error reference not provided!"
            reference = self.reference
        assert _is_kebab_case(reference), "error reference must be kebab-case!"

        self.kind = kind
        self.reference = reference

        self.message = message
        self.context = context

        self.note_stmt = note_stmt
        self.hint_stmt = hint_stmt

        self.link = link

        super().__init__(f"<{self.__class__.__name__}: {self.reference}>")

    def __repr__(self) -> str:
        return (
            f"<{self.__class__.__name__}("
            f"reference={self.reference!r}, "
            f"message={self.message!r}, "
            f"context={self.context!r}, "
            f"note_stmt={self.note_stmt!r}, "
            f"hint_stmt={self.hint_stmt!r}"
            ")>"
        )

    def __rich_console__(
        self,
        console: Console,
        options: ConsoleOptions,
    ) -> RenderResult:
        colour = "red" if self.kind == "error" else "yellow"

        yield f"[{colour} bold]{self.kind}[/]: [bold]{self.reference}[/]"
        yield ""

        if not options.ascii_only:
            # Present the main message, with relevant context indented.
            if self.context is not None:
                yield _prefix_with_indent(
                    self.message,
                    console,
                    prefix=f"[{colour}]×[/] ",
                    indent=f"[{colour}]│[/] ",
                )
                yield _prefix_with_indent(
                    self.context,
                    console,
                    prefix=f"[{colour}]╰─>[/] ",
                    indent=f"[{colour}]   [/] ",
                )
            else:
                yield _prefix_with_indent(
                    self.message,
                    console,
                    prefix="[red]×[/] ",
                    indent="  ",
                )
        else:
            yield self.message
            if self.context is not None:
                yield ""
                yield self.context

        if self.note_stmt is not None or self.hint_stmt is not None:
            yield ""

        if self.note_stmt is not None:
            yield _prefix_with_indent(
                self.note_stmt,
                console,
                prefix="[magenta bold]note[/]: ",
                indent="      ",
            )
        if self.hint_stmt is not None:
            yield _prefix_with_indent(
                self.hint_stmt,
                console,
                prefix="[cyan bold]hint[/]: ",
                indent="      ",
            )

        if self.link is not None:
            yield ""
            yield f"Link: {self.link}"


#
# Actual Errors
#
class ConfigurationError(PipError):
    """General exception in configuration"""


class InstallationError(PipError):
    """General exception during installation"""


class UninstallationError(PipError):
    """General exception during uninstallation"""


class MissingPyProjectBuildRequires(DiagnosticPipError):
    """Raised when pyproject.toml has `build-system`, but no `build-system.requires`."""

    reference = "missing-pyproject-build-system-requires"

    def __init__(self, *, package: str) -> None:
        super().__init__(
            message=f"Can not process {escape(package)}",
            context=Text(
                "This package has an invalid pyproject.toml file.\n"
                "The [build-system] table is missing the mandatory `requires` key."
            ),
            note_stmt="This is an issue with the package mentioned above, not pip.",
            hint_stmt=Text("See PEP 518 for the detailed specification."),
        )


class InvalidPyProjectBuildRequires(DiagnosticPipError):
    """Raised when pyproject.toml an invalid `build-system.requires`."""

    reference = "invalid-pyproject-build-system-requires"

    def __init__(self, *, package: str, reason: str) -> None:
        super().__init__(
            message=f"Can not process {escape(package)}",
            context=Text(
                "This package has an invalid `build-system.requires` key in "
                f"pyproject.toml.\n{reason}"
            ),
            note_stmt="This is an issue with the package mentioned above, not pip.",
            hint_stmt=Text("See PEP 518 for the detailed specification."),
        )


class NoneMetadataError(PipError):
    """Raised when accessing a Distribution's "METADATA" or "PKG-INFO".

    This signifies an inconsistency, when the Distribution claims to have
    the metadata file (if not, raise ``FileNotFoundError`` instead), but is
    not actually able to produce its content. This may be due to permission
    errors.
    """

    def __init__(
        self,
        dist: "BaseDistribution",
        metadata_name: str,
    ) -> None:
        """
        :param dist: A Distribution object.
        :param metadata_name: The name of the metadata being accessed
            (can be "METADATA" or "PKG-INFO").
        """
        self.dist = dist
        self.metadata_name = metadata_name

    def __str__(self) -> str:
        # Use `dist` in the error message because its stringification
        # includes more information, like the version and location.
        return "None {} metadata found for distribution: {}".format(
            self.metadata_name,
            self.dist,
        )


class UserInstallationInvalid(InstallationError):
    """A --user install is requested on an environment without user site."""

    def __str__(self) -> str:
        return "User base directory is not specified"


class InvalidSchemeCombination(InstallationError):
    def __str__(self) -> str:
        before = ", ".join(str(a) for a in self.args[:-1])
        return f"Cannot set {before} and {self.args[-1]} together"


class DistributionNotFound(InstallationError):
    """Raised when a distribution cannot be found to satisfy a requirement"""


class RequirementsFileParseError(InstallationError):
    """Raised when a general error occurs parsing a requirements file line."""


class BestVersionAlreadyInstalled(PipError):
    """Raised when the most up-to-date version of a package is already
    installed."""


class BadCommand(PipError):
    """Raised when virtualenv or a command is not found"""


class CommandError(PipError):
    """Raised when there is an error in command-line arguments"""


class PreviousBuildDirError(PipError):
    """Raised when there's a previous conflicting build directory"""


class NetworkConnectionError(PipError):
    """HTTP connection error"""

    def __init__(
        self,
        error_msg: str,
        response: Optional[Response] = None,
        request: Optional[Request] = None,
    ) -> None:
        """
        Initialize NetworkConnectionError with  `request` and `response`
        objects.
        """
        self.response = response
        self.request = request
        self.error_msg = error_msg
        if (
            self.response is not None
            and not self.request
            and hasattr(response, "request")
        ):
            self.request = self.response.request
        super().__init__(error_msg, response, request)

    def __str__(self) -> str:
        return str(self.error_msg)


class InvalidWheelFilename(InstallationError):
    """Invalid wheel filename."""


class UnsupportedWheel(InstallationError):
    """Unsupported wheel."""


class InvalidWheel(InstallationError):
    """Invalid (e.g. corrupt) wheel."""

    def __init__(self, location: str, name: str):
        self.location = location
        self.name = name

    def __str__(self) -> str:
        return f"Wheel '{self.name}' located at {self.location} is invalid."


class MetadataInconsistent(InstallationError):
    """Built metadata contains inconsistent information.

    This is raised when the metadata contains values (e.g. name and version)
    that do not match the information previously obtained from sdist filename,
    user-supplied ``#egg=`` value, or an install requirement name.
    """

    def __init__(
        self, ireq: "InstallRequirement", field: str, f_val: str, m_val: str
    ) -> None:
        self.ireq = ireq
        self.field = field
        self.f_val = f_val
        self.m_val = m_val

    def __str__(self) -> str:
        return (
            f"Requested {self.ireq} has inconsistent {self.field}: "
            f"expected {self.f_val!r}, but metadata has {self.m_val!r}"
        )


class InstallationSubprocessError(DiagnosticPipError, InstallationError):
    """A subprocess call failed."""

    reference = "subprocess-exited-with-error"

    def __init__(
        self,
        *,
        command_description: str,
        exit_code: int,
        output_lines: Optional[List[str]],
    ) -> None:
        if output_lines is None:
            output_prompt = Text("See above for output.")
        else:
            output_prompt = (
                Text.from_markup(f"[red][{len(output_lines)} lines of output][/]\n")
                + Text("".join(output_lines))
                + Text.from_markup(R"[red]\[end of output][/]")
            )

        super().__init__(
            message=(
                f"[green]{escape(command_description)}[/] did not run successfully.\n"
                f"exit code: {exit_code}"
            ),
            context=output_prompt,
            hint_stmt=None,
            note_stmt=(
                "This error originates from a subprocess, and is likely not a "
                "problem with pip."
            ),
        )

        self.command_description = command_description
        self.exit_code = exit_code

    def __str__(self) -> str:
        return f"{self.command_description} exited with {self.exit_code}"


class MetadataGenerationFailed(InstallationSubprocessError, InstallationError):
    reference = "metadata-generation-failed"

    def __init__(
        self,
        *,
        package_details: str,
    ) -> None:
        super(InstallationSubprocessError, self).__init__(
            message="Encountered error while generating package metadata.",
            context=escape(package_details),
            hint_stmt="See above for details.",
            note_stmt="This is an issue with the package mentioned above, not pip.",
        )

    def __str__(self) -> str:
        return "metadata generation failed"


class HashErrors(InstallationError):
    """Multiple HashError instances rolled into one for reporting"""

    def __init__(self) -> None:
        self.errors: List["HashError"] = []

    def append(self, error: "HashError") -> None:
        self.errors.append(error)

    def __str__(self) -> str:
        lines = []
        self.errors.sort(key=lambda e: e.order)
        for cls, errors_of_cls in groupby(self.errors, lambda e: e.__class__):
            lines.append(cls.head)
            lines.extend(e.body() for e in errors_of_cls)
        if lines:
            return "\n".join(lines)
        return ""

    def __bool__(self) -> bool:
        return bool(self.errors)


class HashError(InstallationError):
    """
    A failure to verify a package against known-good hashes

    :cvar order: An int sorting hash exception classes by difficulty of
        recovery (lower being harder), so the user doesn't bother fretting
        about unpinned packages when he has deeper issues, like VCS
        dependencies, to deal with. Also keeps error reports in a
        deterministic order.
    :cvar head: A section heading for display above potentially many
        exceptions of this kind
    :ivar req: The InstallRequirement that triggered this error. This is
        pasted on after the exception is instantiated, because it's not
        typically available earlier.

    """

    req: Optional["InstallRequirement"] = None
    head = ""
    order: int = -1

    def body(self) -> str:
        """Return a summary of me for display under the heading.

        This default implementation simply prints a description of the
        triggering requirement.

        :param req: The InstallRequirement that provoked this error, with
            its link already populated by the resolver's _populate_link().

        """
        return f"    {self._requirement_name()}"

    def __str__(self) -> str:
        return f"{self.head}\n{self.body()}"

    def _requirement_name(self) -> str:
        """Return a description of the requirement that triggered me.

        This default implementation returns long description of the req, with
        line numbers

        """
        return str(self.req) if self.req else "unknown package"


class VcsHashUnsupported(HashError):
    """A hash was provided for a version-control-system-based requirement, but
    we don't have a method for hashing those."""

    order = 0
    head = (
        "Can't verify hashes for these requirements because we don't "
        "have a way to hash version control repositories:"
    )


class DirectoryUrlHashUnsupported(HashError):
    """A hash was provided for a version-control-system-based requirement, but
    we don't have a method for hashing those."""

    order = 1
    head = (
        "Can't verify hashes for these file:// requirements because they "
        "point to directories:"
    )


class HashMissing(HashError):
    """A hash was needed for a requirement but is absent."""

    order = 2
    head = (
        "Hashes are required in --require-hashes mode, but they are "
        "missing from some requirements. Here is a list of those "
        "requirements along with the hashes their downloaded archives "
        "actually had. Add lines like these to your requirements files to "
        "prevent tampering. (If you did not enable --require-hashes "
        "manually, note that it turns on automatically when any package "
        "has a hash.)"
    )

    def __init__(self, gotten_hash: str) -> None:
        """
        :param gotten_hash: The hash of the (possibly malicious) archive we
            just downloaded
        """
        self.gotten_hash = gotten_hash

    def body(self) -> str:
        # Dodge circular import.
        from pip._internal.utils.hashes import FAVORITE_HASH

        package = None
        if self.req:
            # In the case of URL-based requirements, display the original URL
            # seen in the requirements file rather than the package name,
            # so the output can be directly copied into the requirements file.
            package = (
                self.req.original_link
                if self.req.is_direct
                # In case someone feeds something downright stupid
                # to InstallRequirement's constructor.
                else getattr(self.req, "req", None)
            )
        return "    {} --hash={}:{}".format(
            package or "unknown package", FAVORITE_HASH, self.gotten_hash
        )


class HashUnpinned(HashError):
    """A requirement had a hash specified but was not pinned to a specific
    version."""

    order = 3
    head = (
        "In --require-hashes mode, all requirements must have their "
        "versions pinned with ==. These do not:"
    )


class HashMismatch(HashError):
    """
    Distribution file hash values don't match.

    :ivar package_name: The name of the package that triggered the hash
        mismatch. Feel free to write to this after the exception is raise to
        improve its error message.

    """

    order = 4
    head = (
        "THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS "
        "FILE. If you have updated the package versions, please update "
        "the hashes. Otherwise, examine the package contents carefully; "
        "someone may have tampered with them."
    )

    def __init__(self, allowed: Dict[str, List[str]], gots: Dict[str, "_Hash"]) -> None:
        """
        :param allowed: A dict of algorithm names pointing to lists of allowed
            hex digests
        :param gots: A dict of algorithm names pointing to hashes we
            actually got from the files under suspicion
        """
        self.allowed = allowed
        self.gots = gots

    def body(self) -> str:
        return "    {}:\n{}".format(self._requirement_name(), self._hash_comparison())

    def _hash_comparison(self) -> str:
        """
        Return a comparison of actual and expected hash values.

        Example::

               Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
                            or 123451234512345123451234512345123451234512345
                    Got        bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef

        """

        def hash_then_or(hash_name: str) -> "chain[str]":
            # For now, all the decent hashes have 6-char names, so we can get
            # away with hard-coding space literals.
            return chain([hash_name], repeat("    or"))

        lines: List[str] = []
        for hash_name, expecteds in self.allowed.items():
            prefix = hash_then_or(hash_name)
            lines.extend(
                ("        Expected {} {}".format(next(prefix), e)) for e in expecteds
            )
            lines.append(
                "             Got        {}\n".format(self.gots[hash_name].hexdigest())
            )
        return "\n".join(lines)


class UnsupportedPythonVersion(InstallationError):
    """Unsupported python version according to Requires-Python package
    metadata."""


class ConfigurationFileCouldNotBeLoaded(ConfigurationError):
    """When there are errors while loading a configuration file"""

    def __init__(
        self,
        reason: str = "could not be loaded",
        fname: Optional[str] = None,
        error: Optional[configparser.Error] = None,
    ) -> None:
        super().__init__(error)
        self.reason = reason
        self.fname = fname
        self.error = error

    def __str__(self) -> str:
        if self.fname is not None:
            message_part = f" in {self.fname}."
        else:
            assert self.error is not None
            message_part = f".\n{self.error}\n"
        return f"Configuration file {self.reason}{message_part}"


_DEFAULT_EXTERNALLY_MANAGED_ERROR = f"""\
The Python environment under {sys.prefix} is managed externally, and may not be
manipulated by the user. Please use specific tooling from the distributor of
the Python installation to interact with this environment instead.
"""


class ExternallyManagedEnvironment(DiagnosticPipError):
    """The current environment is externally managed.

    This is raised when the current environment is externally managed, as
    defined by `PEP 668`_. The ``EXTERNALLY-MANAGED`` configuration is checked
    and displayed when the error is bubbled up to the user.

    :param error: The error message read from ``EXTERNALLY-MANAGED``.
    """

    reference = "externally-managed-environment"

    def __init__(self, error: Optional[str]) -> None:
        if error is None:
            context = Text(_DEFAULT_EXTERNALLY_MANAGED_ERROR)
        else:
            context = Text(error)
        super().__init__(
            message="This environment is externally managed",
            context=context,
            note_stmt=(
                "If you believe this is a mistake, please contact your "
                "Python installation or OS distribution provider. "
                "You can override this, at the risk of breaking your Python "
                "installation or OS, by passing --break-system-packages."
            ),
            hint_stmt=Text("See PEP 668 for the detailed specification."),
        )

    @staticmethod
    def _iter_externally_managed_error_keys() -> Iterator[str]:
        # LC_MESSAGES is in POSIX, but not the C standard. The most common
        # platform that does not implement this category is Windows, where
        # using other categories for console message localization is equally
        # unreliable, so we fall back to the locale-less vendor message. This
        # can always be re-evaluated when a vendor proposes a new alternative.
        try:
            category = locale.LC_MESSAGES
        except AttributeError:
            lang: Optional[str] = None
        else:
            lang, _ = locale.getlocale(category)
        if lang is not None:
            yield f"Error-{lang}"
            for sep in ("-", "_"):
                before, found, _ = lang.partition(sep)
                if not found:
                    continue
                yield f"Error-{before}"
        yield "Error"

    @classmethod
    def from_config(
        cls,
        config: Union[pathlib.Path, str],
    ) -> "ExternallyManagedEnvironment":
        parser = configparser.ConfigParser(interpolation=None)
        try:
            parser.read(config, encoding="utf-8")
            section = parser["externally-managed"]
            for key in cls._iter_externally_managed_error_keys():
                with contextlib.suppress(KeyError):
                    return cls(section[key])
        except KeyError:
            pass
        except (OSError, UnicodeDecodeError, configparser.ParsingError):
            from pip._internal.utils._log import VERBOSE

            exc_info = logger.isEnabledFor(VERBOSE)
            logger.warning("Failed to read %s", config, exc_info=exc_info)
        return cls(None)
python3.12/site-packages/pip/_internal/network/download.py000064400000013720151732701510017533 0ustar00"""Download files with progress indicators.
"""
import email.message
import logging
import mimetypes
import os
from typing import Iterable, Optional, Tuple

from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response

from pip._internal.cli.progress_bars import get_download_progress_renderer
from pip._internal.exceptions import NetworkConnectionError
from pip._internal.models.index import PyPI
from pip._internal.models.link import Link
from pip._internal.network.cache import is_from_cache
from pip._internal.network.session import PipSession
from pip._internal.network.utils import HEADERS, raise_for_status, response_chunks
from pip._internal.utils.misc import format_size, redact_auth_from_url, splitext

logger = logging.getLogger(__name__)


def _get_http_response_size(resp: Response) -> Optional[int]:
    try:
        return int(resp.headers["content-length"])
    except (ValueError, KeyError, TypeError):
        return None


def _prepare_download(
    resp: Response,
    link: Link,
    progress_bar: str,
) -> Iterable[bytes]:
    total_length = _get_http_response_size(resp)

    if link.netloc == PyPI.file_storage_domain:
        url = link.show_url
    else:
        url = link.url_without_fragment

    logged_url = redact_auth_from_url(url)

    if total_length:
        logged_url = "{} ({})".format(logged_url, format_size(total_length))

    if is_from_cache(resp):
        logger.info("Using cached %s", logged_url)
    else:
        logger.info("Downloading %s", logged_url)

    if logger.getEffectiveLevel() > logging.INFO:
        show_progress = False
    elif is_from_cache(resp):
        show_progress = False
    elif not total_length:
        show_progress = True
    elif total_length > (40 * 1000):
        show_progress = True
    else:
        show_progress = False

    chunks = response_chunks(resp, CONTENT_CHUNK_SIZE)

    if not show_progress:
        return chunks

    renderer = get_download_progress_renderer(bar_type=progress_bar, size=total_length)
    return renderer(chunks)


def sanitize_content_filename(filename: str) -> str:
    """
    Sanitize the "filename" value from a Content-Disposition header.
    """
    return os.path.basename(filename)


def parse_content_disposition(content_disposition: str, default_filename: str) -> str:
    """
    Parse the "filename" value from a Content-Disposition header, and
    return the default filename if the result is empty.
    """
    m = email.message.Message()
    m["content-type"] = content_disposition
    filename = m.get_param("filename")
    if filename:
        # We need to sanitize the filename to prevent directory traversal
        # in case the filename contains ".." path parts.
        filename = sanitize_content_filename(str(filename))
    return filename or default_filename


def _get_http_response_filename(resp: Response, link: Link) -> str:
    """Get an ideal filename from the given HTTP response, falling back to
    the link filename if not provided.
    """
    filename = link.filename  # fallback
    # Have a look at the Content-Disposition header for a better guess
    content_disposition = resp.headers.get("content-disposition")
    if content_disposition:
        filename = parse_content_disposition(content_disposition, filename)
    ext: Optional[str] = splitext(filename)[1]
    if not ext:
        ext = mimetypes.guess_extension(resp.headers.get("content-type", ""))
        if ext:
            filename += ext
    if not ext and link.url != resp.url:
        ext = os.path.splitext(resp.url)[1]
        if ext:
            filename += ext
    return filename


def _http_get_download(session: PipSession, link: Link) -> Response:
    target_url = link.url.split("#", 1)[0]
    resp = session.get(target_url, headers=HEADERS, stream=True)
    raise_for_status(resp)
    return resp


class Downloader:
    def __init__(
        self,
        session: PipSession,
        progress_bar: str,
    ) -> None:
        self._session = session
        self._progress_bar = progress_bar

    def __call__(self, link: Link, location: str) -> Tuple[str, str]:
        """Download the file given by link into location."""
        try:
            resp = _http_get_download(self._session, link)
        except NetworkConnectionError as e:
            assert e.response is not None
            logger.critical(
                "HTTP error %s while getting %s", e.response.status_code, link
            )
            raise

        filename = _get_http_response_filename(resp, link)
        filepath = os.path.join(location, filename)

        chunks = _prepare_download(resp, link, self._progress_bar)
        with open(filepath, "wb") as content_file:
            for chunk in chunks:
                content_file.write(chunk)
        content_type = resp.headers.get("Content-Type", "")
        return filepath, content_type


class BatchDownloader:
    def __init__(
        self,
        session: PipSession,
        progress_bar: str,
    ) -> None:
        self._session = session
        self._progress_bar = progress_bar

    def __call__(
        self, links: Iterable[Link], location: str
    ) -> Iterable[Tuple[Link, Tuple[str, str]]]:
        """Download the files given by links into location."""
        for link in links:
            try:
                resp = _http_get_download(self._session, link)
            except NetworkConnectionError as e:
                assert e.response is not None
                logger.critical(
                    "HTTP error %s while getting %s",
                    e.response.status_code,
                    link,
                )
                raise

            filename = _get_http_response_filename(resp, link)
            filepath = os.path.join(location, filename)

            chunks = _prepare_download(resp, link, self._progress_bar)
            with open(filepath, "wb") as content_file:
                for chunk in chunks:
                    content_file.write(chunk)
            content_type = resp.headers.get("Content-Type", "")
            yield link, (filepath, content_type)
python3.12/site-packages/pip/_internal/network/cache.py000064400000007537151732701510017000 0ustar00"""HTTP cache implementation.
"""

import os
from contextlib import contextmanager
from datetime import datetime
from typing import BinaryIO, Generator, Optional, Union

from pip._vendor.cachecontrol.cache import SeparateBodyBaseCache
from pip._vendor.cachecontrol.caches import SeparateBodyFileCache
from pip._vendor.requests.models import Response

from pip._internal.utils.filesystem import adjacent_tmp_file, replace
from pip._internal.utils.misc import ensure_dir


def is_from_cache(response: Response) -> bool:
    return getattr(response, "from_cache", False)


@contextmanager
def suppressed_cache_errors() -> Generator[None, None, None]:
    """If we can't access the cache then we can just skip caching and process
    requests as if caching wasn't enabled.
    """
    try:
        yield
    except OSError:
        pass


class SafeFileCache(SeparateBodyBaseCache):
    """
    A file based cache which is safe to use even when the target directory may
    not be accessible or writable.

    There is a race condition when two processes try to write and/or read the
    same entry at the same time, since each entry consists of two separate
    files (https://github.com/psf/cachecontrol/issues/324).  We therefore have
    additional logic that makes sure that both files to be present before
    returning an entry; this fixes the read side of the race condition.

    For the write side, we assume that the server will only ever return the
    same data for the same URL, which ought to be the case for files pip is
    downloading.  PyPI does not have a mechanism to swap out a wheel for
    another wheel, for example.  If this assumption is not true, the
    CacheControl issue will need to be fixed.
    """

    def __init__(self, directory: str) -> None:
        assert directory is not None, "Cache directory must not be None."
        super().__init__()
        self.directory = directory

    def _get_cache_path(self, name: str) -> str:
        # From cachecontrol.caches.file_cache.FileCache._fn, brought into our
        # class for backwards-compatibility and to avoid using a non-public
        # method.
        hashed = SeparateBodyFileCache.encode(name)
        parts = list(hashed[:5]) + [hashed]
        return os.path.join(self.directory, *parts)

    def get(self, key: str) -> Optional[bytes]:
        # The cache entry is only valid if both metadata and body exist.
        metadata_path = self._get_cache_path(key)
        body_path = metadata_path + ".body"
        if not (os.path.exists(metadata_path) and os.path.exists(body_path)):
            return None
        with suppressed_cache_errors():
            with open(metadata_path, "rb") as f:
                return f.read()

    def _write(self, path: str, data: bytes) -> None:
        with suppressed_cache_errors():
            ensure_dir(os.path.dirname(path))

            with adjacent_tmp_file(path) as f:
                f.write(data)

            replace(f.name, path)

    def set(
        self, key: str, value: bytes, expires: Union[int, datetime, None] = None
    ) -> None:
        path = self._get_cache_path(key)
        self._write(path, value)

    def delete(self, key: str) -> None:
        path = self._get_cache_path(key)
        with suppressed_cache_errors():
            os.remove(path)
        with suppressed_cache_errors():
            os.remove(path + ".body")

    def get_body(self, key: str) -> Optional[BinaryIO]:
        # The cache entry is only valid if both metadata and body exist.
        metadata_path = self._get_cache_path(key)
        body_path = metadata_path + ".body"
        if not (os.path.exists(metadata_path) and os.path.exists(body_path)):
            return None
        with suppressed_cache_errors():
            return open(body_path, "rb")

    def set_body(self, key: str, body: bytes) -> None:
        path = self._get_cache_path(key) + ".body"
        self._write(path, body)
python3.12/site-packages/pip/_internal/network/xmlrpc.py000064400000003377151732701520017241 0ustar00"""xmlrpclib.Transport implementation
"""

import logging
import urllib.parse
import xmlrpc.client
from typing import TYPE_CHECKING, Tuple

from pip._internal.exceptions import NetworkConnectionError
from pip._internal.network.session import PipSession
from pip._internal.network.utils import raise_for_status

if TYPE_CHECKING:
    from xmlrpc.client import _HostType, _Marshallable

logger = logging.getLogger(__name__)


class PipXmlrpcTransport(xmlrpc.client.Transport):
    """Provide a `xmlrpclib.Transport` implementation via a `PipSession`
    object.
    """

    def __init__(
        self, index_url: str, session: PipSession, use_datetime: bool = False
    ) -> None:
        super().__init__(use_datetime)
        index_parts = urllib.parse.urlparse(index_url)
        self._scheme = index_parts.scheme
        self._session = session

    def request(
        self,
        host: "_HostType",
        handler: str,
        request_body: bytes,
        verbose: bool = False,
    ) -> Tuple["_Marshallable", ...]:
        assert isinstance(host, str)
        parts = (self._scheme, host, handler, None, None, None)
        url = urllib.parse.urlunparse(parts)
        try:
            headers = {"Content-Type": "text/xml"}
            response = self._session.post(
                url,
                data=request_body,
                headers=headers,
                stream=True,
            )
            raise_for_status(response)
            self.verbose = verbose
            return self.parse_response(response.raw)
        except NetworkConnectionError as exc:
            assert exc.response
            logger.critical(
                "HTTP error %s while getting %s",
                exc.response.status_code,
                url,
            )
            raise
python3.12/site-packages/pip/_internal/network/__pycache__/__init__.cpython-312.pyc000064400000000455151732701520024026 0ustar00�

R`i2���dZy)z+Contains purely network-related utilities.
N)�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/network/__init__.py�<module>rs
��rpython3.12/site-packages/pip/_internal/network/__pycache__/cache.cpython-312.pyc000064400000014542151732701520023334 0ustar00�

R`i_����dZddlZddlmZddlmZddlmZmZmZm	Z	ddl
mZddlm
Z
ddlmZdd	lmZmZdd
lmZdedefd
�Zededfd��ZGd�de�Zy)zHTTP cache implementation.
�N)�contextmanager)�datetime)�BinaryIO�	Generator�Optional�Union)�SeparateBodyBaseCache)�SeparateBodyFileCache)�Response)�adjacent_tmp_file�replace)�
ensure_dir�response�returnc��t|dd�S)N�
from_cacheF)�getattr)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/network/cache.py�
is_from_cachers���8�\�5�1�1�)NNNc#�4K�	d��y#t$rYywxYw�w)zvIf we can't access the cache then we can just skip caching and process
    requests as if caching wasn't enabled.
    N)�OSError�rr�suppressed_cache_errorsrs����

�
���
��
�s��	��	���c
����eZdZdZdeddf�fd�Zdedefd�Zdedeefd	�Z	d
ededdfd�Z
	dded
edeee
dfddfd�Zdeddfd�Zdedeefd�Zdededdfd�Z�xZS)�
SafeFileCacheaG
    A file based cache which is safe to use even when the target directory may
    not be accessible or writable.

    There is a race condition when two processes try to write and/or read the
    same entry at the same time, since each entry consists of two separate
    files (https://github.com/psf/cachecontrol/issues/324).  We therefore have
    additional logic that makes sure that both files to be present before
    returning an entry; this fixes the read side of the race condition.

    For the write side, we assume that the server will only ever return the
    same data for the same URL, which ought to be the case for files pip is
    downloading.  PyPI does not have a mechanism to swap out a wheel for
    another wheel, for example.  If this assumption is not true, the
    CacheControl issue will need to be fixed.
    �	directoryrNc�B��|�Jd��t�|��||_y)Nz!Cache directory must not be None.)�super�__init__r)�selfr�	__class__s  �rr zSafeFileCache.__init__2s'����$�I�&I�I�$�
����"��r�namec��tj|�}t|dd�|gz}tjj
|jg|���S)N�)r
�encode�list�os�path�joinr)r!r#�hashed�partss    r�_get_cache_pathzSafeFileCache._get_cache_path7sG��'�-�-�d�3���V�B�Q�Z� �F�8�+���w�w�|�|�D�N�N�3�U�3�3r�keyc�d�|j|�}|dz}tjj|�rtjj|�syt	�5t|d�5}|j
�cddd�cddd�S#1swYnxYw	ddd�y#1swYyxYw�N�.body�rb)r-r(r)�existsr�open�read)r!r.�
metadata_path�	body_path�fs     r�getzSafeFileCache.get?s���,�,�S�1�
�!�G�+�	������}�-�"�'�'�.�.��2K��
$�
&��m�T�*�a��v�v�x�+�*�'�
&�*�*��*�'�
&�
&�s$� 
B&�-B�=	B&�B	�B&�&B/r)�datac� �t�5ttjj	|��t|�5}|j
|�ddd�tj|�ddd�y#1swY�(xYw#1swYyxYw�N)	rrr(r)�dirnamer�writer
r#)r!r)r:r8s    r�_writezSafeFileCache._writeIsa��
$�
&��r�w�w���t�,�-�"�4�(�A�����
�)�
�A�F�F�D�!�
'�
&�)�(��'�
&�s"�4B�A8�B�8B	�=B�B
�value�expiresc�J�|j|�}|j||�yr<�r-r?)r!r.r@rAr)s     r�setzSafeFileCache.setRs"���#�#�C�(�����D�%� rc��|j|�}t�5tj|�ddd�t�5tj|dz�ddd�y#1swY�5xYw#1swYyxYw�Nr1)r-rr(�remove)r!r.r)s   r�deletezSafeFileCache.deleteXsV���#�#�C�(��
$�
&��I�I�d�O�'�
$�
&��I�I�d�W�n�%�'�
&�'�
&��
&�
&�s�A&�A2�&A/�2A;c��|j|�}|dz}tjj|�rtjj|�syt	�5t|d�cddd�S#1swYyxYwr0)r-r(r)r3rr4)r!r.r6r7s    r�get_bodyzSafeFileCache.get_body_sZ���,�,�S�1�
�!�G�+�	������}�-�"�'�'�.�.��2K��
$�
&��	�4�(�'�
&�
&�s� A6�6A?�bodyc�P�|j|�dz}|j||�yrFrC)r!r.rKr)s    r�set_bodyzSafeFileCache.set_bodyhs%���#�#�C�(�7�2�����D�$�rr<)�__name__�
__module__�__qualname__�__doc__�strr r-r�bytesr9r?r�intrrDrHrrJrM�
__classcell__)r"s@rrr s�����"#�#�#�$�#�
4�C�4�C�4� �s� �x��� �"�3�"�e�"��"�MQ�!��!�$�!�/4�S�(�D�5H�/I�!�	
�!�&�#�&�$�&�)�C�)�H�X�$6�)� �C� �u� �� rr)rQr(�
contextlibrr�typingrrrr�pip._vendor.cachecontrol.cacher	�pip._vendor.cachecontrol.cachesr
�pip._vendor.requests.modelsr�pip._internal.utils.filesystemrr
�pip._internal.utils.miscr�boolrrrrrr�<module>r^sm���
�%��7�7�@�A�0�E�/�2�H�2��2��
��+;�!<�
��
�J �)�J rpython3.12/site-packages/pip/_internal/network/__pycache__/download.cpython-312.pyc000064400000020630151732701520024073 0ustar00�

R`i��	��dZddlZddlZddlZddlZddlmZmZm	Z	ddl
mZmZddl
mZddlmZddlmZddlmZdd	lmZdd
lmZddlmZmZmZddlmZmZm Z ejBe"�Z#d
edee$fd�Z%d
edede&dee'fd�Z(de&de&fd�Z)de&de&de&fd�Z*d
edede&fd�Z+dededefd�Z,Gd�d�Z-Gd�d�Z.y)z)Download files with progress indicators.
�N)�Iterable�Optional�Tuple)�CONTENT_CHUNK_SIZE�Response)�get_download_progress_renderer)�NetworkConnectionError)�PyPI)�Link)�
is_from_cache)�
PipSession)�HEADERS�raise_for_status�response_chunks)�format_size�redact_auth_from_url�splitext�resp�returnc�h�	t|jd�S#tttf$rYywxYw)Nzcontent-length)�int�headers�
ValueError�KeyError�	TypeError)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/network/download.py�_get_http_response_sizers5����4�<�<� 0�1�2�2����)�,����s��1�1�link�progress_barc� �t|�}|jtjk(r
|j}n|j
}t
|�}|rdj|t|��}t|�rtjd|�ntjd|�tj�tjkDrd}nt|�rd}n|sd}n
|dkDrd}nd}t|t �}|s|St#||��}||�S)Nz{} ({})zUsing cached %szDownloading %sFTi@�)�bar_type�size)r�netlocr
�file_storage_domain�show_url�url_without_fragmentr�formatrr�logger�info�getEffectiveLevel�logging�INFOrrr)	rrr�total_length�url�
logged_url�
show_progress�chunks�renderers	         r�_prepare_downloadr3s���
+�4�0�L��{�{�d�.�.�.��m�m���'�'��%�c�*�J���%�%�j�+�l�2K�L�
��T�����%�z�2����$�j�1�
���!�G�L�L�0��
�	�t�	��
�
��
�	��	#��
��
�
�T�#5�
6�F���
�-�|�,�W�H��F����filenamec�@�tjj|�S)zJ
    Sanitize the "filename" value from a Content-Disposition header.
    )�os�path�basename)r5s r�sanitize_content_filenamer:Hs���7�7���H�%�%r4�content_disposition�default_filenamec��tjj�}||d<|jd�}|rt	t|��}|xs|S)z�
    Parse the "filename" value from a Content-Disposition header, and
    return the default filename if the result is empty.
    �content-typer5)�email�message�Message�	get_paramr:�str)r;r<�mr5s    r�parse_content_dispositionrEOsM��
	�
�
����A�+�A�n���{�{�:�&�H��-�S��]�;���'�'�'r4c��|j}|jjd�}|rt||�}t	|�d}|s6tj|jjdd��}|r||z
}|sL|j|jk7r3tjj	|j�d}|r||z
}|S)zoGet an ideal filename from the given HTTP response, falling back to
    the link filename if not provided.
    zcontent-disposition�r>�)
r5r�getrEr�	mimetypes�guess_extensionr.r7r8)rrr5r;�exts     r�_get_http_response_filenamerM^s����}�}�H��,�,�*�*�+@�A���,�-@�(�K��!�(�+�A�.�C���'�'����(8�(8���(L�M�����O�H��4�8�8�t�x�x�'��g�g���t�x�x�(��+�����O�H��Or4�sessionc��|jjdd�d}|j|td��}t	|�|S)N�#rGrT)r�stream)r.�splitrIrr)rNr�
target_urlrs    r�_http_get_downloadrTss<��������Q�'��*�J��;�;�z�7�4�;�@�D��T���Kr4c�>�eZdZdededdfd�Zdededeeeffd�Zy)	�
DownloaderrNrrNc� �||_||_y�N��_session�
_progress_bar��selfrNrs   r�__init__zDownloader.__init__{���
 ��
�)��r4r�locationc��	t|j|�}t||�}tjj||�}t|||j�}t|d�5}|D]}	|j|	��	ddd�|jj!dd�}
||
fS#t$r?}|j�J�tjd|jj|��d}~wwxYw#1swY�txYw)z.Download the file given by link into location.N�HTTP error %s while getting %s�wb�Content-TyperH�rTrZr	�responser(�critical�status_coderMr7r8�joinr3r[�open�writerrI)r]rr`r�er5�filepathr1�content_file�chunk�content_types           r�__call__zDownloader.__call__�s���	�%�d�m�m�T�:�D�/�t�T�:���7�7�<�<��(�3��"�4��t�/A�/A�B��
�(�D�
!�\����"�"�5�)� �"��|�|�'�'���;����%�%��&�	��:�:�)�)�)��O�O�0�!�*�*�2H�2H�$�
�
��	��"�
!�s#�B)�'C4�)	C1�2:C,�,C1�4C=)	�__name__�
__module__�__qualname__r
rCr^rrrq�r4rrVrVzsE��*��*��*�
�	*�&�T�&�S�&�U�3��8�_�&r4rVc�T�eZdZdededdfd�Zdeededeeeeeefffd�Z	y)	�BatchDownloaderrNrrNc� �||_||_yrXrYr\s   rr^zBatchDownloader.__init__�r_r4�linksr`c#� K�|D]�}	t|j|�}t||�}tjj||�}t|||j�}t|d�5}	|D]}
|	j|
��	ddd�|jj!dd�}|||ff����y#t$r?}|j�J�tjd|jj|��d}~wwxYw#1swY�{xYw�w)z0Download the files given by links into location.NrbrcrdrHre)r]ryr`rrrlr5rmr1rnrorps            rrqzBatchDownloader.__call__�s������D�	
�)�$�-�-��>��3�4��>�H��w�w�|�|�H�h�7�H�&�t�T�4�3E�3E�F�F��h��%��#�E� �&�&�u�-�$�&� �<�<�+�+�N�B�?�L���<�0�0�0�)��*�
��z�z�-�-�-����4��J�J�*�*���
��
��&�%�s@�D�B7�AD�.D�/D�7	C?�:C:�:C?�?D�D	�D)
rrrsrtr
rCr^rrrrqrur4rrwrw�s[��*��*��*�
�	*�1��d�^�1�/2�1�	�%��e�C��H�o�-�.�	/�1r4rw)/�__doc__�
email.messager?r+rJr7�typingrrr�pip._vendor.requests.modelsrr�pip._internal.cli.progress_barsr�pip._internal.exceptionsr	�pip._internal.models.indexr
�pip._internal.models.linkr�pip._internal.network.cacher�pip._internal.network.sessionr
�pip._internal.network.utilsrrr�pip._internal.utils.miscrrr�	getLoggerrrr(rrrC�bytesr3r:rErMrTrVrwrur4r�<module>r�s
������	�,�,�D�J�;�+�*�5�4�R�R�P�P�	��	�	�8�	$���(��x��}��'�
�'�
�'��'��e�_�	'�T&��&��&�(�3�(�#�(�RU�(��h��d��s��*�
��$��8��&�&�>!1�!1r4python3.12/site-packages/pip/_internal/network/__pycache__/session.cpython-312.pyc000064400000044570151732701520023760 0ustar00�

R`i�H����UdZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
ZddlZddlmZmZmZmZmZmZmZmZmZmZddlmZmZddlmZ ddl!m"Z"m#Z#ddl!m$Z%ddl&m'Z'm(Z(dd	l)m*Z*dd
l+m,Z,ddl-m.Z.ddl/m0Z0dd
l1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:ddl;m<Z<ddl=m>Z>m?Z?ddl@mAZAerddlBmCZCddlDmEZEej�eG�ZHeeIeIeeeJeIffZKej�de.��gd�ZMeeKeNd<dZOdePfd�ZQdeIfd�ZRGd�d e#�ZSGd!�d"�ZTGd#�d$eTe%�Z$Gd%�d&eTe �ZGd'�d(e$�ZUGd)�d*e�ZVGd+�d,ej��ZXy)-zhPipSession and supporting code, containing all pip-specific
network request configuration and behavior.
�N)
�
TYPE_CHECKING�Any�Dict�	Generator�List�Mapping�Optional�Sequence�Tuple�Union)�requests�urllib3)�CacheControlAdapter)�DEFAULT_POOLBLOCK�BaseAdapter)�HTTPAdapter)�PreparedRequest�Response)�CaseInsensitiveDict)�ConnectionPool)�InsecureRequestWarning)�__version__)�get_default_environment)�Link)�MultiDomainBasicAuth)�
SafeFileCache)�has_tls)�libc_ver)�build_url_from_netloc�parse_netloc)�url_to_path)�
SSLContext)�PoolManager�ignore)�category))�https�*r')r'�	localhostr')r'z127.0.0.0/8r')r'z::1/128r')�filer'N)�sshr'r'�SECURE_ORIGINS)�
BUILD_BUILDID�BUILD_ID�CI�	PIP_IS_CI�returnc�.�td�tD��S)z?
    Return whether it looks like pip is running under CI.
    c3�@K�|]}|tjv���y�w�N)�os�environ)�.0�names  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/network/session.py�	<genexpr>z looks_like_ci.<locals>.<genexpr>js����G�.F�d�t�r�z�z�!�.F�s�)�any�CI_ENVIRONMENT_VARIABLES��r8�
looks_like_cir>cs���G�.F�G�G�Gr=c
��dtd�tj�dtj�id�}|dddk(rtj�|dd<n�|dddk(rStj
}|jd	k(r|d
d}dj|D�cgc]
}t|���c}�|dd<nK|ddd
k(rtj�|dd<n%|dddk(rtj�|dd<tjjd�r�ddl
m}|j�|j�|j�f}tt!d�t#gd�|���}tt!d�t#ddgt%����}|r||d<|r||d<tjjd�r4tj&�drdtj&�dd�|d<tj(�r'tj(�|j+di�d<tj,�r'tj,�|j+di�d<tj.�rtj.�|d<t1�rdd
l}|j4|d<t7�j9d�}|�t|j�|d<t;j<d ��`	t?j@d d!gt>jBd"�#�}	|	jd$�r&|	jEd%�d&jG�|d'<	tK�rd(nd
|d)<tLjNjQd*�}
|
�|
|d+<d,jS|tUjV|d-d(�.��/�Scc}w#tH$rY�pwxYw)0z6
    Return a string representing the user agent.
    �pip)r7�versionr7)�	installer�python�implementationrD�CPythonrA�PyPy�finalN��.�Jython�
IronPython�linuxr)�distroc��|dS�N�r<��xs r8�<lambda>zuser_agent.<locals>.<lambda>����!�A�$r=)r7rA�idc��|dSrOr<rQs r8rSzuser_agent.<locals>.<lambda>�rTr=�lib�libcrM�darwin�macOS�system�release�cpu�openssl_version�
setuptools�setuptools_version�rustcz	--versiong�?)�stderr�timeoutsrustc � rP�
rustc_versionT�ci�PIP_USER_AGENT_USER_DATA�	user_dataz9{data[installer][name]}/{data[installer][version]} {json})�,�:)�
separators�	sort_keys)�data�json),r�platform�python_version�python_implementation�sys�pypy_version_info�releaselevel�join�str�
startswith�pip._vendorrMr7rA�codename�dict�filter�zipr�mac_verr[�
setdefaultr\�machiner�_ssl�OPENSSL_VERSIONr�get_distribution�shutil�which�
subprocess�check_output�STDOUT�split�decode�	Exceptionr>r4r5�get�formatrn�dumps)rmrsrRrM�linux_distribution�distro_infosrX�ssl�setuptools_dist�rustc_outputrhs           r8�
user_agentr�ms���
$��<��)�)�+��H�2�2�4�
��D����f�%��2�,4�,C�,C�,E��
��y�)�	
��	��	'�6�	1��1�1���)�)�W�4� 1�"�1� 5��,/�H�H�.�/�.��S��V�.�/�-
��
��y�)�
��	��	'�8�	3�,4�,C�,C�,E��
��y�)�	
��	��	'�<�	7�,4�,C�,C�,E��
��y�)�
�|�|���w�'�&�#�[�[�]�F�N�N�,<�f�o�o�>O�O��'+����-�/A�B�
�(
������U�I�&��
�3�
�
���#'�L�� ��)�D��N�
�|�|���x�(�X�-=�-=�-?��-B�")�h�6F�6F�6H��6K�L��X������08���0A�����"�%�f�-�����3;�3C�3C�3E�����"�%�i�0������&�&�(��U���y��"%�"5�"5��
��-�/�@�@��N�O��"�%(��)@�)@�%A��
!�"�
�|�|�G��(�	M�%�2�2��+�&�z�/@�/@�#��L��&�&�y�1�)5�(:�(:�4�(@��(C�(J�(J�(L��_�%�'���d�D��J��
�
���9�:�I���%��[��F�M�M�
�
�Z�Z���t�
D�N����Y
0��r�	��	�s�O
�(O�	O�Oc��eZdZ					ddededeeeeeeffdeee	fdeee	ee	e	ffdee
e	e	fdefd	�Zdd
�Z
y)
�LocalFSAdapterN�request�streamrc�verify�cert�proxiesr0c��t|j�}t�}d|_|j|_	t	j
|�}	tjj|	jd��}
tj|�dxsd}t||	j|
d��|_t|d�|_|j j"|_|S#t$$rd}d|_t'|�j(|_t-j.|j*�d	|��j1d
��|_Yd}~|Sd}~wwxYw)N��T)�usegmtrz
text/plain)zContent-TypezContent-Lengthz
Last-Modified�rbi�z: �utf8)r!�urlr�status_coder4�stat�email�utils�
formatdate�st_mtime�	mimetypes�
guess_typer�st_size�headers�open�raw�close�OSError�type�__name__�reason�io�BytesIO�encode)
�selfr�r�rcr�r�r��pathname�resp�stats�modified�content_type�excs
             r8�sendzLocalFSAdapter.send�s���w�{�{�+���z������;�;���	(��G�G�H�%�E��{�{�-�-�e�n�n�T�-�J�H�$�/�/��9�!�<�L��L�.�$0�&+�m�m�%-���D�L��H�d�+�D�H������D�J����)�	J� #�D���s�)�,�,�D�K��z�z�T�[�[�M��C�5�"9�"@�"@��"H�I�D�H�H����)	J�s�C!�!	E�*AE	�	Ec��yr3r<)r�s r8r�zLocalFSAdapter.close�s��r=)FNTNN)r0N)r��
__module__�__qualname__r�boolr	r�floatrrvrrr�r�r<r=r8r�r��s����?C�#'�6:�/3�%� �%��%��%��u�U�E�\�':� :�;�<�	%�
�d�C�i� �%��u�S�%��S��/�1�2�3�
%��'�#�s�(�+�,�%�
�%�N
r=r�c�`��eZdZdZdd�deddeddf�fd�Zefd	ed
ede	dedd
f
�fd�
Z
�xZS)�_SSLContextAdapterMixina#Mixin to add the ``ssl_context`` constructor argument to HTTP adapters.

    The additional argument is forwarded directly to the pool manager. This allows us
    to dynamically decide what SSL store to use at runtime, which is used to implement
    the optional ``truststore`` backend.
    N)�ssl_contextr�r"�kwargsr0c�2��||_t�|�di|��y)Nr<)�_ssl_context�super�__init__)r�r�r��	__class__s   �r8r�z _SSLContextAdapterMixin.__init__s���(���
���"�6�"r=�connections�maxsize�block�pool_kwargsr#c�z��|j�|jd|j�t�|�d|||d�|��S)Nr�)r�r�r�r<)r�r~r��init_poolmanager)r�r�r�r�r�r�s     �r8r�z(_SSLContextAdapterMixin.init_poolmanagersQ������(��"�"�=�$�2C�2C�D��w�'�
�#���
��	
�	
r=)r�r�r��__doc__r	rr�r�intr�r��
__classcell__�r�s@r8r�r��st����/3�#��l�+�#��	#�

�#�(�	
��
��
��	
�
�
�
�

�
r=r�c��eZdZy)rN�r�r�r�r<r=r8rr ���r=rc��eZdZy)rNr�r<r=r8rr$r�r=rc
�X��eZdZdededeeefdeeeeeeffddf
�fd�Z	�xZ
S)�InsecureHTTPAdapter�connr�r�r�r0Nc�,��t�|�||d|��y�NF)r�r�r�r��r��cert_verify�r�r�r�r�r�r�s     �r8r�zInsecureHTTPAdapter.cert_verify)����	����3�u�4��Hr=�r�r�r�rrvrr�r	rr�r�r�s@r8r�r�(�d���I��I��I��d�C�i� �	I�
�u�S�%��S��/�1�2�3�I�
�
I�Ir=r�c
�X��eZdZdededeeefdeeeeeeffddf
�fd�Z	�xZ
S)�InsecureCacheControlAdapterr�r�r�r�r0Nc�,��t�|�||d|��yr�r�r�s     �r8r�z'InsecureCacheControlAdapter.cert_verify4r�r=r�r�s@r8r�r�3r�r=r�c���eZdZUdZeeed<dddddd�dededeed	e	ed
ee
ededd
eddf�fd�Zde
eddfd�Z	ddedeede
ddfd�Zdeeddffd�Zdede
fd�Zdededed
edef
�fd�Z�xZS)�
PipSessionNrcrr<)�retries�cache�
trusted_hosts�
index_urlsr��argsr�r�r�r�r�r"r�r0c���t�|�|i|��g|_t�|jd<t|��|_tj|gd�d��}t|��}|r3tt|�||��}	tt|�|��|_
nt||�	�}	||_
|jd
|	�|jd|�|jdt!��|D]}
|j#|
d
���y)zj
        :param trusted_hosts: Domains not to emit warnings for when not using
            HTTPS.
        z
User-Agent)r�)i�i�iig�?)�total�status_forcelist�backoff_factor)�max_retries)r�r�r�)r�r�)r�r�zhttps://zhttp://zfile://T)�suppress_loggingN)r�r��pip_trusted_originsr�r�r�authr�Retryr�rrr��_trusted_host_adapterr�mountr��add_trusted_host)r�r�r�r�r�r�r�r��insecure_adapter�secure_adapter�hostr�s           �r8r�zPipSession.__init__As
���	���$�)�&�)�EG�� �&0�\����\�"�)�J�?��	��-�-��2� �
��*/�7�C���0�#�E�*�#�'��N�
*E�#�E�*�#�*�D�&�
)�W�+�V�N�)9�D�&��
�
�:�~�.��
�
�9�.�/�	
�
�
�9�n�.�/�!�D��!�!�$��!�>�"r=�new_index_urlsc�&�||j_y)zn
        :param new_index_urls: New index urls to update the authentication
            handler with.
        N)r�r�)r�r�s  r8�update_index_urlszPipSession.update_index_urls�s��
 .��	�	�r=r��sourcer�c�6�|s%d|��}|�	|d|�d�z
}tj|�t|�\}}|�td|����||f|jvr|jj||f�|j
t|d��dz|j�|j
t|�dz|j�|sS|j
t|d��d	z|j�|j
t|�d	z|j�yy)
z�
        :param host: It is okay to provide a host that has previously been
            added.
        :param source: An optional source string, for logging where the host
            string came from.
        zadding trusted host: Nz (from �)z+Trusted host URL must include a host part: �http)�scheme�/rj)	�logger�infor �
ValueErrorr��appendr�rr�)r�r�rr��msg�parsed_host�parsed_ports       r8r�zPipSession.add_trusted_host�s�� �)�$��2�C��!������*�*���K�K���#/��#5� ��[����J�4�(�S�T�T���%�T�-E�-E�E��$�$�+�+�[�+�,F�G��
�
�!�$�v�6��<�d�>X�>X�	
�	
�
�
�(��.��4�d�6P�6P�Q���J�J�%�d�6�:�S�@��*�*�
�

�J�J�,�T�2�S�8�$�:T�:T�U�
r=c#�jK�tEd{���|jD]\}}d||�dn|f���y7�$�w)Nr')r+r�)r�r��ports   r8�iter_secure_originszPipSession.iter_secure_origins�s;����!�!�!��2�2�J�D�$���T�\�c�t�<�<�3�	"�s�
3�1�%3�locationc�6�tjjt|��}|j|j
|j}}}|jdd�d}|j�D]U}|\}}}	||k7r|dk7r�	tj|xsd�}
tj|�}|
|vr�H||	k7r|	dk7r|	��Uytjd||�y#t$r-|r(|j�|j�k7r|dk7rY��Y�]wxYw)	N�+rP���r'�Tz�The repository located at %s is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host %s'.F)�urllib�parse�urlparservr�hostnamer�rsplitr�	ipaddress�
ip_address�
ip_networkr�lowerr�warning)r�r�parsed�origin_protocol�origin_host�origin_port�
secure_origin�secure_protocol�secure_host�secure_port�addr�networks            r8�is_secure_originzPipSession.is_secure_origin�s;�����&�&�s�8�}�5���M�M��O�O��K�K�'2���*�0�0��a�8��<��
"�5�5�7�M�8E�5�O�[�+��/�1�o��6L��
� �+�+�K�,=�2�>��#�.�.�{�;���w�&���{�*��3�&��+���C8�L	���
I�
��
	
���O�
� �#�)�)�+�{�/@�/@�/B�B�#�s�*���
�s�.C"�"1D�D�methodr�c���|jd|j�|jd|j�t�|�||g|��i|��S)Nrcr�)r~rcr�r�r�)r�r*r�r�r�r�s     �r8r�zPipSession.requestsH������)�T�\�\�2����)�T�\�\�2��w��v�s�<�T�<�V�<�<r=)NF)r�r�r�rcr	r��__annotations__rrvr
rr�r�r�r�r�SecureOriginrrr)rr�r�r�s@r8r�r�>s>���!�G�X�c�]�!�
�#�')�*.�.2�M?��M?��M?���}�	M?�
 ��}�M?��T�#�Y�'�
M?��l�+�M?��M?�
�M?�^.��S�	�.�d�.�QV�V��V�!)�#��V�IM�V�	
�V�B=�Y�|�T�4�/G�%H�=�
A��A�$�A�F=�c�=��=�C�=�3�=�8�=�=r=r�)Yr��email.utilsr�r�rrn�loggingr�r4ror�r�rr�urllib.parser�warnings�typingrrrrrrr	r
rrrxr
r�pip._vendor.cachecontrolr�_BaseCacheControlAdapter�pip._vendor.requests.adaptersrrr�_BaseHTTPAdapter�pip._vendor.requests.modelsrr�pip._vendor.requests.structuresr�"pip._vendor.urllib3.connectionpoolr�pip._vendor.urllib3.exceptionsrr@r�pip._internal.metadatar�pip._internal.models.linkr�pip._internal.network.authr�pip._internal.network.cacher�pip._internal.utils.compatr�pip._internal.utils.glibcr�pip._internal.utils.miscrr �pip._internal.utils.urlsr!r�r"�pip._vendor.urllib3.poolmanagerr#�	getLoggerr�rrvr�r-�filterwarningsr+r,r;r�r>r�r�r�r�r��Sessionr�r<r=r8�<module>rGsj����	�����	��
��
������*�T�H�I�A�?�=�A��:�*�;�5�/�.�H�0���;�
��	�	�8�	$���S�#�x��c�3�h��8�8�9�������+A�B�
&���\�"�
�(	��H�t�H�b�C�b�J)
�[�)
�X
�
�D	�)�+;�	�	�1�3K�	�I�+�I�I�"5�I�I=��!�!�I=r=python3.12/site-packages/pip/_internal/network/__pycache__/auth.cpython-312.pyc000064400000053022151732701520023226 0ustar00�

R`i=P���dZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZddlm
Z
ddlmZddlmZddlmZmZmZmZmZmZddlmZmZdd	lmZmZdd
lmZddl m!Z!ddl"m#Z#m$Z$m%Z%m&Z&m'Z'dd
l(m)Z)e!e*�Z+da,Gd�de�Z-Gd�de
�Z.Gd�de.�Z/Gd�de.�Z0Gd�de.�Z1e
d��de2de.fd��Z3Gd�de�Z4y)z�Network Authentication Helpers

Contains interface (MultiDomainBasicAuth) and associated glue code for
providing credentials in the context of network requests.
�N)�ABC�abstractmethod)�	lru_cache)�commonprefix)�Path)�Any�Dict�List�
NamedTuple�Optional�Tuple)�AuthBase�
HTTPBasicAuth)�Request�Response)�get_netrc_auth)�	getLogger)�ask�	ask_input�ask_password�remove_auth_from_url�split_auth_netloc_from_url)�AuthInfoFc�,�eZdZUeed<eed<eed<y)�Credentials�url�username�passwordN)�__name__�
__module__�__qualname__�str�__annotations__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/network/auth.pyrr&s��	�H��M��Mr%rc	�h�eZdZUdZeed<ededeedee	fd��Z
ededededdfd	��Zy)
�KeyRingBaseProviderzKeyring base provider interface�has_keyringrr�returnc��y�Nr$��selfrrs   r&�
get_auth_infoz!KeyRingBaseProvider.get_auth_info1���r%rNc��yr,r$�r.rrrs    r&�save_auth_infoz"KeyRingBaseProvider.save_auth_info5r0r%)rr r!�__doc__�boolr#rr"rrr/r3r$r%r&r(r(,sk��)���������
��(�8�BT������#���������r%r(c�L�eZdZdZdZdedeedeefd�Zdedededdfd	�Z	y)
�KeyRingNullProviderzKeyring null providerFrrr*c��yr,r$r-s   r&r/z!KeyRingNullProvider.get_auth_info?���r%rNc��yr,r$r2s    r&r3z"KeyRingNullProvider.save_auth_infoBr9r%)
rr r!r4r)r"rrr/r3r$r%r&r7r7:sN����K������
��(�8�BT���#�������r%r7c�T�eZdZdZdZdd�Zdedeedeefd�Z	deded	eddfd
�Z
y)�KeyRingPythonProviderz7Keyring interface which uses locally imported `keyring`Tr*Nc��ddl}||_y)Nr��keyring)r.r?s  r&�__init__zKeyRingPythonProvider.__init__Ks�����r%rrc�>�t|jd�rMtjd|�|jj	||�}|�|j
|jfSy|�8tjd|�|jj||�}|r||fSy)N�get_credentialz'Getting credentials from keyring for %sz$Getting password from keyring for %s)�hasattrr?�logger�debugrBrr�get_password)r.rr�credrs     r&r/z#KeyRingPythonProvider.get_auth_infoPs����4�<�<�!1�2��L�L�B�C�H��<�<�.�.�s�H�=�D����}�}�d�m�m�3�3�����L�L�?��E��|�|�0�0��h�?�H����)�)�r%rc�>�|jj|||�yr,)r?�set_passwordr2s    r&r3z$KeyRingPythonProvider.save_auth_infobs�����!�!�#�x��:r%)r*N)rr r!r4r)r@r"rrr/r3r$r%r&r<r<FsS��A��K��
�����
��(�8�BT��$;�#�;��;��;��;r%r<c��eZdZdZdZdeddfd�Zdedeedeefd	�Z	deded
eddfd�Z
dededeefd
�Zdeded
eddfd�Zy)�KeyRingCliProviderz�Provider which uses `keyring` cli

    Instead of calling the keyring package installed alongside pip
    we call keyring on the command line which will enable pip to
    use which ever installation of keyring is available first in
    PATH.
    T�cmdr*Nc��||_yr,r>)r.rLs  r&r@zKeyRingCliProvider.__init__qs	����r%rrc�8�|�|j||�}|�||fSyr,)�
_get_passwordr2s    r&r/z KeyRingCliProvider.get_auth_infots0�����)�)�#�x�8�H��#���)�)�r%rc�(�|j|||�Sr,)�
_set_passwordr2s    r&r3z!KeyRingCliProvider.save_auth_info}s���!�!�#�x��:�:r%�service_namec�v�|j�y|jd||g}tjj�}d|d<t	j
|tjtj|��}|jry|jjd�jtj�S)z;Mirror the implementation of keyring.get_password using cliN�get�utf-8�PYTHONIOENCODING)�stdin�stdout�env)
r?�os�environ�copy�
subprocess�run�DEVNULL�PIPE�
returncoderX�decode�strip�linesep)r.rRrrLrY�ress      r&rOz KeyRingCliProvider._get_password�s����<�<����|�|�U�L�(�;���j�j�o�o���")�����n�n���$�$��?�?��	
���>�>���z�z� � ��)�/�/��
�
�;�;r%c���|j�ytjj�}d|d<t	j
|jd||g|�tj��jd�|d��y)z;Mirror the implementation of keyring.set_password using cliNrUrV�setT)�inputrY�check)r?rZr[r\r]r^rd�encode)r.rRrrrYs     r&rQz KeyRingCliProvider._set_password�sl���<�<����j�j�o�o���")�������
�\�\�5�,��9��J�r�z�z�l�+�2�2�7�;���		
�r%)
rr r!r4r)r"r@rrr/r3rOrQr$r%r&rKrKfs�����K��C��D�������
��(�8�BT��;�#�;��;��;��;�<�#�<��<��#��<�$�#������PT�r%rK)�maxsize�providerr*c��tjd|�trd}|dvr"	t�}tjd�|S|d	v�r(tjd
�}|r�|jtjd��r�tj dt"fd
��}t%tjd��}g}|�j't(j*�D]0}t%|�}		|	j-|�s|j/|��2t(j*j3|�}tjd
|��}|r!tjd|�t5|�Stjd�t7�S#t$rY��Xt
$rP}d}|dk(r|dz}tj
||tjtj���Yd}~���d}~wwxYw#t0$rY��wxYw)NzKeyring provider requested: %s�disabled)�import�autozKeyring provider set: importz1Installed copy of keyring fails with exception %srpz3, trying to find a keyring executable as a fallback)�exc_info)r]rpr?�scriptsr*c���tjjdd�}|�	tjd�}|S|S#tt
f$rtj}Y|SwxYw)N�PATH�CS_PATH)rZr[rT�confstr�AttributeError�
ValueError�defpath��paths r&�"PATH_as_shutil_which_determines_itz@get_keyring_provider.<locals>.PATH_as_shutil_which_determines_it�s_���z�z�~�~�f�d�3���<�*�!�z�z�)�4����t���
+�J�7�*�!�z�z����
*�s�=�A �A rzz3Keyring provider set: subprocess with executable %szKeyring provider set: disabled)rD�verbose�KEYRING_DISABLEDr<�ImportError�	Exception�warning�isEnabledFor�logging�DEBUG�shutil�which�
startswith�	sysconfig�get_path�typing�
no_type_checkr"r�splitrZ�pathsep�samefile�append�FileNotFoundError�joinrKr7)
rl�impl�exc�msg�clir|rr�pathsr{�ps
          r&�get_keyring_providerr��s���
�N�N�3�X�>�����%�%�	R�(�*�D��N�N�9�:��K��)�)��l�l�9�%���3�>�>�)�"4�"4�Y�"?�@�
�
!�
!�
��
�"�
��9�-�-�i�8�9�G��E�:�<�B�B�2�:�:�N����J����:�:�g�.����T�*��	O��:�:�?�?�5�)�D��,�,�y�t�4�C���N�N�P�RU�V�%�c�*�*�
�N�N�3�4�� � ��_�	���	R�F�C��6�!��Q�Q���N�N�3��f�.A�.A�'�-�-�.P�N�Q�Q��
	R��B)����s0� F�5"G8�	G5�G5�%AG0�0G5�8	H�Hc	��eZdZ			d!dedeeededdfd�Zede	fd��Z
e
jd	eddfd
��Z
edefd��Zdeed
eedee
fd�Zdedeefd�Zddd�dededede
fd�Zdedeeeeeeffd�Zdedefd�Zdedeeeeeeffd�Zdefd�Zdededefd�Zdededdfd�Zdededdfd �Zy)"�MultiDomainBasicAuthTN�	prompting�
index_urls�keyring_providerr*c�J�||_||_||_i|_d|_yr,)r�r�r��	passwords�_credentials_to_save)r.r�r�r�s    r&r@zMultiDomainBasicAuth.__init__�s,��#���$��� 0���.0���<@��!r%c�,�t|j�Sr,)r��_keyring_provider�r.s r&r�z%MultiDomainBasicAuth.keyring_provider�s��#�D�$:�$:�;�;r%rlc��||_yr,)r�)r.rls  r&r�z%MultiDomainBasicAuth.keyring_provider�s��"*��r%c�:�|jxs|jdvS)N)rprn)r�r�r�s r&�use_keyringz MultiDomainBasicAuth.use_keyring�s��
�~�~�S��!7�!7�?S�!S�Sr%rrc���|sy	|jj||�S#t$r?}tj	dt|��datj�Yd}~yd}~wwxYw)z3Return the tuple auth for a given url from keyring.Nz*Keyring is skipped due to an exception: %sT)	r�r/r�rDr�r"r~r��cache_clear)r.rrr�s    r&�_get_keyring_authz&MultiDomainBasicAuth._get_keyring_authse����
	��(�(�6�6�s�H�E�E���	��N�N�<��C��
�
 $�� �,�,�.���	�s�!�	A)�5A$�$A)c�T��|r|jsyt|�jd�dz}tjj|��g}|jD]�}|jd�dz}tjjt|��}�|k(r|cS�j|jk7r�btjj|�}|j|���|sy|jd�fd���tjj|d�S)a�Return the original index URL matching the requested URL.

        Cached or dynamically generated credentials may work against
        the original index URL rather than just the netloc.

        The provided url should have had its username and password
        removed already. If the original index url had credentials then
        they will be included in the return value.

        Returns None if no matching index was found, or if --no-index
        was specified by the user.
        N�/Tc�d��t�j|jg�jd�S)Nr�)rr{�rfind)�	candidate�
parsed_urls �r&�<lambda>z5MultiDomainBasicAuth._get_index_url.<locals>.<lambda>@s-���,��O�O��N�N��#�
�e�C�j�#r%)�reverse�keyr)
r�r�rstrip�urllib�parse�urlsplit�netlocr��sort�
urlunsplit)r.r�
candidates�index�parsed_indexr�r�s      @r&�_get_index_urlz#MultiDomainBasicAuth._get_index_urls����$�/�/��"�3�'�.�.�s�3�c�9���\�\�*�*�3�/�
��
��_�_�E��L�L��%��+�E�!�<�<�0�0�1E�e�1L�M�L��\�)���� � �L�$7�$7�7�����-�-�e�4�I����i�(�%��������	�	
��|�|�&�&�z�!�}�5�5r%F��allow_netrc�
allow_keyring�original_urlr�r�c��t|�\}}}|\}}|�|�tjd|�|S|j|�}	|	r)t|	�}
|
r|
\}	}}tjd|	�|	r&d�!|\}}|�|�tjd|�|S|r%t	|�}
|
rtjd|�|
S|r@|j|	|�xs|j||�}|rtjd|�|S||fS)z2Find and return credentials for the specified URL.zFound credentials in url for %szFound index url %srz%Found credentials in index url for %sz!Found credentials in netrc for %sz#Found credentials in keyring for %s)rrDrEr�rr�)r.r�r�r�rr��url_user_passwordrr�	index_url�
index_info�_�index_url_user_password�
netrc_auth�kr_auths               r&�_get_new_credentialsz)MultiDomainBasicAuth._get_new_credentialsJs:��*D��*
�&��V�&�
/���(���H�$8��L�L�:�F�C�$�$��'�'��,�	��3�I�>�J��8B�5�	�1�5����1�9�=��0��3�?�!8��H�h��#��(<����D�f�M�.�.��'��5�J�����@�&�I�!�!���&�&�y�(�;�9��&�&�v�x�8�
�
����B�F�K�����!�!r%c��t|�\}}}|j|�\}}|�|�+||jvr|j|\}}|�||k(r||}}|�|�|xsd}|xsd}||f|j|<|�|�|�|�
Jd|����|||fS)a_Return the credentials to use for the provided URL.

        If allowed, netrc and keyring may be used to obtain the
        correct credentials.

        Returns (url_without_credentials, username, password). Note
        that even if the original URL contains credentials, this
        function may return a different username and password.
        �z%Could not load credentials from url: )rr�r�)	r.r�rr�r�rr�un�pws	         r&�_get_url_and_credentialsz-MultiDomainBasicAuth._get_url_and_credentials�s���4�L�A���V�Q�"�6�6�|�D���(�
��� 0�f����6N��^�^�F�+�F�B����8�r�>�%'��(����8�#7�
 �~�2�H��~�2�H�'/��%9�D�N�N�6�"��
!�h�&:�� �X�%5�		B�
3�<�.�A�	B�
7�
�H�h�&�&r%�reqc��|j|j�\}}}||_|�|�t||�|�}|jd|j�|S)N�response)r�rr�
register_hook�
handle_401)r.r�rrrs     r&�__call__zMultiDomainBasicAuth.__call__�s_��"&�"?�"?����"H���X�x������H�$8�3�-��(�3�C�8�C�	���*�d�o�o�6��
r%r�c���|jrtd|�d��nd}|sy|jr)|j||�}|r|d�|d�|d|ddfSt	d�}||dfS)	Nz	User for z: )NNFr�Fz
Password: T)r�rr�r�r)r.r�r�authrs     r&�_prompt_for_passwordz)MultiDomainBasicAuth._prompt_for_password�s���9=���9�y����3�4�D���$�����)�)�&�(�;�D���Q��+��Q��0C��A�w��Q���.�.���-����4�'�'r%c��|jr"|jr|jjsyt	dddg�dk(S)NFz#Save credentials to keyring [y/N]: �y�n)r�r�r�r)rr�s r&� _should_save_password_to_keyringz5MultiDomainBasicAuth._should_save_password_to_keyring�s;������#�#��(�(�4�4���8�3��*�E��L�Lr%�resp�kwargsc��|jdk7r|Sd\}}|jr!|j|jdd��\}}|js|s|s|St
jj|j�}d}|s!|s|j|j�\}}}d|_
|�L|�J||f|j|j<|r-|j�rt|j||��|_
|j}|jj!�t#|xsd|xsd�|j$�}|j'd|j(�|jr|j'd|j*�|j,j.|fi|��}	|	j0j3|�|	S)	N�)NNFTr�)rrrr�r�)�status_coder�r�rr�r�r��urlparser�r�r�r�r�r�content�raw�release_connr�requestr��warn_on_401�save_credentials�
connection�send�historyr�)
r.r�r�rr�parsed�saver�r��new_resps
          r&r�zMultiDomainBasicAuth.handle_401�s������s�"��K�'���(����!%�!:�!:����!�"�";�"��H�h��~�~�h�x��K����&�&�t�x�x�0������'+�'@�'@����'O�$�H�h��%)��!���H�$8�-5�x�,@�D�N�N�6�=�=�)���=�=�?�,7��
�
�%�%�-��)�
�L�L��������<�m�H�N��H�N��;�D�L�L�I�����*�d�&6�&6�7�
�$�$����j�$�*?�*?�@�(�4�?�?�'�'��6�v�6��������%��r%c�x�|jdk(r+tjd|jj�yy)z6Response callback to warn about incorrect credentials.r�z)401 Error, Credentials not correct for %sN)r�rDr�r�r)r.r�r�s   r&r�z MultiDomainBasicAuth.warn_on_401s1�����s�"��N�N�;���� � �
�#r%c�t�|jjsJd��|j}d|_|rb|jdkrR	tjd�|jj
|j|j|j�yyy#t$rtjd�YywxYw)z1Response callback to save credentials on success.z'should never reach here without keyringNi�zSaving credentials to keyringzFailed to save credentials)r�r)r�r�rD�infor3rrrr��	exception)r.r�r��credss    r&r�z%MultiDomainBasicAuth.save_credentials"s���
�!�!�-�-�	5�4�	5�-��)�)��$(��!��T�%�%��+�
?����;�<��%�%�4�4��I�I�u�~�~�u�~�~��,�5���
?�� � �!=�>�
?�s�AB�B7�6B7)TNrp)rr r!r5rr
r"r@�propertyr(r��setterr�rr�r�r�r
r�rr�r�r�rrr�r�r�r$r%r&r�r��s����*.� &�	@��@��T�#�Y�'�@��	@�

�@�"�<�"5�<��<����*��*��*��*��T�T�T��T��
�c�]���3�-��
�(�	�	�,.6�#�.6�(�3�-�.6�h!�#�7"��7"��	7"�
�7"�
�
7"�r.'��.'�	�s�H�S�M�8�C�=�0�	1�.'�`�G����"(��(�	�x��}�h�s�m�T�1�	2�(�M�$�M�=�x�=�3�=�8�=�~���C��D��?�X�?��?��?r%r�)5r4r�rZr�r]r�r��urllib.parser��abcrr�	functoolsr�os.pathr�pathlibrrr	r
rrr
�pip._vendor.requests.authrr�pip._vendor.requests.modelsrr�pip._vendor.requests.utilsr�pip._internal.utils.loggingr�pip._internal.utils.miscrrrrr� pip._internal.vcs.versioncontrolrrrDr~rr(r7r<rKr"r�r�r$r%r&�<module>rs����
�	�
���
��#�� ��?�?�=�9�5�1���6�	�8�	�����*���#��	�-�	�;�/�;�@8�,�8�v�4��:!�3�:!�+>�:!��:!�zR?�8�R?r%python3.12/site-packages/pip/_internal/network/__pycache__/xmlrpc.cpython-312.pyc000064400000005610151732701520023572 0ustar00�

R`i�����dZddlZddlZddlZddlmZmZddl	m
Z
ddlmZddl
mZerddlmZmZej"e�ZGd�d	ej(j*�Zy)
z#xmlrpclib.Transport implementation
�N)�
TYPE_CHECKING�Tuple)�NetworkConnectionError)�
PipSession)�raise_for_status)�	_HostType�
_Marshallablec�^��eZdZdZ	ddedededdf�fd�
Z	ddd	d
ededede	d
f
d�Z
�xZS)�PipXmlrpcTransportzRProvide a `xmlrpclib.Transport` implementation via a `PipSession`
    object.
    �	index_url�session�use_datetime�returnNc���t�|�|�tjj	|�}|j
|_||_y)N)�super�__init__�urllib�parse�urlparse�scheme�_scheme�_session)�selfrr
r�index_parts�	__class__s     ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/network/xmlrpc.pyrzPipXmlrpcTransport.__init__s:���	����&��l�l�+�+�I�6��"�)�)�����
��hostr�handler�request_body�verbose)r	.c��t|t�sJ�|j||dddf}tjj|�}	ddi}|jj|||d��}t|�||_	|j|j�S#t$r?}	|	jsJ�tjd|	jj |��d}	~	wwxYw)NzContent-Typeztext/xmlT)�data�headers�streamzHTTP error %s while getting %s)�
isinstance�strrrr�
urlunparser�postrr!�parse_response�rawr�response�logger�critical�status_code)
rrrr r!�parts�urlr$r,�excs
          r�requestzPipXmlrpcTransport.request s����$��$�$�$����t�W�d�D�$�?���l�l�%�%�e�,��	�%�z�2�G��}�}�)�)��!���	*��H�
�X�&�"�D�L��&�&�x�|�|�4�4��%�	��<�<��<��O�O�0����(�(��
�

��	�s�AB�	C�:C�C)F)�__name__�
__module__�__qualname__�__doc__r'r�boolr�bytesrr3�
__classcell__)rs@rrrst����
IN� �� �'1� �AE� �	
� ��������	�
��
�#�	$�
rr)r7�logging�urllib.parser�
xmlrpc.client�xmlrpc�typingrr�pip._internal.exceptionsr�pip._internal.network.sessionr�pip._internal.network.utilsrrr	�	getLoggerr4r-�client�	Transportr�rr�<module>rGsO������'�;�4�8��6�	��	�	�8�	$��)����0�0�)rpython3.12/site-packages/pip/_internal/network/__pycache__/utils.cpython-312.pyc000064400000004367151732701520023435 0ustar00�

R`i��
��UddlmZmZddlmZmZddlmZddiZee	e	fe
d<dedd	fd
�Zefdededee
d	d	ffd
�Zy	)�)�Dict�	Generator)�CONTENT_CHUNK_SIZE�Response)�NetworkConnectionErrorzAccept-Encoding�identity�HEADERS�resp�returnNc���d}t|jt�r	|jjd�}n|j}d|j
cxkrdkr"nn|j
�d|�d|j��}n6d|j
cxkrdkr!nn|j
�d	|�d|j��}|r
t||�
��y#t$r|jjd�}Y��wxYw)N�zutf-8z
iso-8859-1i�i�z Client Error: z
 for url: iXz Server Error: )�response)�
isinstance�reason�bytes�decode�UnicodeDecodeError�status_code�urlr)r
�http_error_msgrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/network/utils.py�raise_for_statusrs����N��$�+�+�u�%�
	6��[�[�'�'��0�F�����
�d���$��$���� ���x�z�$�(�(��L�	�

�� � �	&�3�	&���� ���x�z�$�(�(��L�	��$�^�d�C�C���"�	6��[�[�'�'��5�F�	6�s�C�$C*�)C*r�
chunk_sizec#�K�	|jj|d��D]}|���y#t$r&	|jj|�}|sYy|���$wxYw�w)z3Given a requests Response, provide the data chunks.F)�decode_contentN)�raw�stream�AttributeError�read)rr�chunks   r�response_chunksr!9so����#��\�\�(�(��.!�1)�
�E�4�K�5
��6����L�L�%�%�j�1�E����K�	��s%�A�&+�A�'A�A�A�A)�typingrr�pip._vendor.requests.modelsrr�pip._internal.exceptionsrr	�str�__annotations__r�intrr!��r�<module>r*sn��"�"�D�;�*-�j�9���c�3�h��9�D�8�D��D�:+=�'��'�$'�'��u�d�D� �!�'r)python3.12/site-packages/pip/_internal/network/__pycache__/lazy_wheel.cpython-312.pyc000064400000026606151732701520024440 0ustar00�

R`i����dZddgZddlmZmZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZddlmZmZdd	lmZdd
lmZmZddlmZmZmZddlmZdd
lmZm Z m!Z!Gd�de"�Z#de$de$dedefd�Z%Gd�d�Z&y)zLazy ZIP over HTTP�HTTPRangeRequestUnsupported�dist_from_wheel_url�)�bisect_left�bisect_right)�contextmanager)�NamedTemporaryFile)�Any�Dict�	Generator�List�Optional�Tuple)�
BadZipFile�ZipFile)�canonicalize_name)�CONTENT_CHUNK_SIZE�Response)�BaseDistribution�MemoryWheel�get_wheel_distribution)�
PipSession)�HEADERS�raise_for_status�response_chunksc��eZdZy)rN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/network/lazy_wheel.pyrrs��r �name�url�session�returnc��t||�5}t|j|�}t|t	|��cddd�S#1swYyxYw)aReturn a distribution object from the given wheel URL.

    This uses HTTP range requests to only fetch the portion of the wheel
    containing metadata, just enough for the object to be constructed.
    If such requests are not supported, HTTPRangeRequestUnsupported
    is raised.
    N)�LazyZipOverHTTPrr"rr)r"r#r$�zf�wheels     r!rrs@��
��g�	&�"��B�G�G�R�(��&�e�->�t�-D�E�

'�	&�	&�s�+A�Ac
��eZdZdZefdedededdfd�Ze	defd��Z
e	defd	��Zdefd
�Z
d$d�Ze	defd��Zd%d
edefd�Zdefd�Zd&dededefd�Zdefd�Zd'd
eedefd�Zdefd�Zd(d�Zdeddfd�Zededfd��Zd$d�Zefdedede eefde!fd�Z"deded ed!edee#eefddff
d"�Z$dededdfd#�Z%y))r'aFile-like object mapped to a ZIP file over HTTP.

    This uses HTTP range requests to lazily fetch the file's content,
    which is supposed to be fed to ZipFile.  If such requests are not
    supported by the server, raise HTTPRangeRequestUnsupported
    during initialization.
    r#r$�
chunk_sizer%Nc��|j|t��}t|�|jdk(sJ�|||c|_|_|_t|jd�|_	t�|_|j|j�g|_
g|_d|jjdd�vrt!d��|j#�y)N)�headers��zContent-Length�bytesz
Accept-Ranges�nonezrange request is not supported)�headrr�status_code�_session�_url�_chunk_size�intr-�_lengthr�_file�truncate�_left�_right�getr�
_check_zip)�selfr#r$r+r1s     r!�__init__zLazyZipOverHTTP.__init__1s����|�|�C��|�1��������3�&�&�&�5<�c�:�2��
�t�y�$�"2��4�<�<�(8�9�:���'�)��
��
�
�d�l�l�#� "��
�!#����$�,�,�*�*�?�F�C�C�-�.N�O�O����r c��y)z!Opening mode, which is always rb.�rbr�r>s r!�modezLazyZipOverHTTP.modeAs��r c�.�|jjS)zPath to the underlying file.)r8r"rBs r!r"zLazyZipOverHTTP.nameFs���z�z���r c��y)z9Return whether random access is supported, which is True.TrrBs r!�seekablezLazyZipOverHTTP.seekableK���r c�8�|jj�y)zClose the file.N)r8�closerBs r!rIzLazyZipOverHTTP.closeOs���
�
���r c�.�|jjS)zWhether the file is closed.)r8�closedrBs r!rKzLazyZipOverHTTP.closedSs���z�z� � � r �sizec��t||j�}|j�|j}}|dkr|nt	||z|�}td||z
�}|j||dz
�|jj|�S)z�Read up to size bytes from the object and return them.

        As a convenience, if size is unspecified or -1,
        all bytes until EOF are returned.  Fewer than
        size bytes may be returned if EOF is reached.
        r�)�maxr5�tellr7�min�	_downloadr8�read)r>rL�
download_size�start�length�stops      r!rSzLazyZipOverHTTP.readXsx���D�$�"2�"2�3�
��	�	��T�\�\�v�����v�s�5�=�+@�&�'I���A�t�m�+�,�����u�d�Q�h�'��z�z���t�$�$r c��y)z3Return whether the file is readable, which is True.TrrBs r!�readablezLazyZipOverHTTP.readablefrGr �offset�whencec�:�|jj||�S)a-Change stream position and return the new absolute position.

        Seek to offset relative position indicated by whence:
        * 0: Start of stream (the default).  pos should be >= 0;
        * 1: Current position - pos may be negative;
        * 2: End of stream - pos usually negative.
        )r8�seek)r>rZr[s   r!r]zLazyZipOverHTTP.seekjs���z�z���v�v�.�.r c�6�|jj�S)zReturn the current position.)r8rPrBs r!rPzLazyZipOverHTTP.tellts���z�z��� � r c�8�|jj|�S)z�Resize the stream to the given size in bytes.

        If size is unspecified resize to the current position.
        The current stream position isn't changed.

        Return the new file size.
        )r8r9)r>rLs  r!r9zLazyZipOverHTTP.truncatexs���z�z�"�"�4�(�(r c��y)z
Return False.FrrBs r!�writablezLazyZipOverHTTP.writable�s��r c�:�|jj�|S�N)r8�	__enter__rBs r!rdzLazyZipOverHTTP.__enter__�s���
�
�����r �excc�6�|jj|�yrc)r8�__exit__)r>res  r!rgzLazyZipOverHTTP.__exit__�s����
�
���S�!r )NNNc#�K�|j�}	d��|j|�y#|j|�wxYw�w)zyReturn a context manager keeping the position.

        At the end of the block, seek back to original position.
        N)rPr])r>�poss  r!�_stayzLazyZipOverHTTP._stay�s1�����i�i�k��	���I�I�c�N��D�I�I�c�N�s�A�*�A�=�Ac�(�|jdz
}ttd||j��D];}|j	||�|j�5	t
|�	ddd�yy#t$rYnwxYw	ddd��X#1swY�axYw)z1Check and download until the file is a valid ZIP.rNrN)r7�reversed�ranger5rRrjrr)r>�endrUs   r!r=zLazyZipOverHTTP._check_zip�s����l�l�Q����e�A�s�D�,<�,<�=�>�E��N�N�5�#�&�������D�M����?��"������
���s0�B�A/�"B�/	A;�8B�:A;�;B�B	rUrn�base_headersc��|j�}d|�d|��|d<d|d<|jj|j|d��S)z:Return HTTP response to a range request from start to end.zbytes=�-�Rangezno-cachez
Cache-ControlT)r-�stream)�copyr3r<r4)r>rUrnror-s     r!�_stream_responsez LazyZipOverHTTP._stream_response�sS���#�#�%��#�E�7�!�C�5�1����#-��� ��}�}� � ����G�D� �I�Ir �left�rightc#�:K�|j|||j||}}t|g|ddz�x}}t|g|ddz�}t	||�D]\}}	||kDr	||dz
f��|	dz}�||kr||f��|g|gc|j|||j||y�w)a/Return a generator of intervals to be fetched.

        Args:
            start (int): Start of needed interval
            end (int): End of needed interval
            left (int): Index of first overlapping downloaded data
            right (int): Index after last overlapping downloaded data
        NrN���)r:r;rQrO�zip)
r>rUrnrvrw�lslice�rslice�i�j�ks
          r!�_mergezLazyZipOverHTTP._merge�s��������D��/����T�%�1H������&��!�*�,�-�-��E��3�%�&���+�%�&�����'�D�A�q��1�u���Q��h���A��A�(�
��8��S�&�L�;@�'�C�5�7��
�
�4������D�� 7�s�BBc��|j�5t|j|�}t|j|�}|j||||�D]n\}}|j
||�}|j�|j|�t||j�D]}|jj|���p	ddd�y#1swYyxYw)z-Download bytes from start to end inclusively.N)
rjrr;rr:r�rurr]rr5r8�write)r>rUrnrvrw�response�chunks       r!rRzLazyZipOverHTTP._download�s���
�Z�Z�\��t�{�{�E�2�D� ����S�1�E�"�k�k�%��d�E�B�
��s��0�0���<���)�)�+��	�	�%� �,�X�t�7G�7G�H�E��J�J�$�$�U�+�I�	C��\�\�s�B2C
�
C)r%N)ry)rrc)r%r')&rrr�__doc__r�strrr6r?�propertyrCr"�boolrFrIrKr/rSrYr]rPr
r9rardr	rgrrrjr=rr
rrurr�rRrr r!r'r'(s����@R����!+��9<��	
�� ��c������c�����$����!��!��!�%��%�e�%��$��/�3�/��/�C�/�!�c�!�)�X�c�]�)�c�)��$���"�S�"�T�"��	�y�!1�2�	��	�
� DK�J��J�"�J�26�s�C�x�.�J�	�J�I��I�"�I�*-�I�69�I�	�5��c��?�D�$�.�	/�I�,
,�s�
,��
,��
,r r'N)'r��__all__�bisectrr�
contextlibr�tempfiler�typingr	r
rrr
r�zipfilerr�pip._vendor.packaging.utilsr�pip._vendor.requests.modelsrr�pip._internal.metadatarrr�pip._internal.network.sessionr�pip._internal.network.utilsrrr�	Exceptionrr�rr'rr r!�<module>r�sy���(�*?�
@��,�%�'�>�>�'�9�D�X�X�4�R�R�	�)�	�F�c�F��F�j�F�EU�F�"j,�j,r python3.12/site-packages/pip/_internal/network/__init__.py000064400000000062151732701520017457 0ustar00"""Contains purely network-related utilities.
"""
python3.12/site-packages/pip/_internal/network/auth.py000064400000050075151732701520016672 0ustar00"""Network Authentication Helpers

Contains interface (MultiDomainBasicAuth) and associated glue code for
providing credentials in the context of network requests.
"""
import logging
import os
import shutil
import subprocess
import sysconfig
import typing
import urllib.parse
from abc import ABC, abstractmethod
from functools import lru_cache
from os.path import commonprefix
from pathlib import Path
from typing import Any, Dict, List, NamedTuple, Optional, Tuple

from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
from pip._vendor.requests.models import Request, Response
from pip._vendor.requests.utils import get_netrc_auth

from pip._internal.utils.logging import getLogger
from pip._internal.utils.misc import (
    ask,
    ask_input,
    ask_password,
    remove_auth_from_url,
    split_auth_netloc_from_url,
)
from pip._internal.vcs.versioncontrol import AuthInfo

logger = getLogger(__name__)

KEYRING_DISABLED = False


class Credentials(NamedTuple):
    url: str
    username: str
    password: str


class KeyRingBaseProvider(ABC):
    """Keyring base provider interface"""

    has_keyring: bool

    @abstractmethod
    def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]:
        ...

    @abstractmethod
    def save_auth_info(self, url: str, username: str, password: str) -> None:
        ...


class KeyRingNullProvider(KeyRingBaseProvider):
    """Keyring null provider"""

    has_keyring = False

    def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]:
        return None

    def save_auth_info(self, url: str, username: str, password: str) -> None:
        return None


class KeyRingPythonProvider(KeyRingBaseProvider):
    """Keyring interface which uses locally imported `keyring`"""

    has_keyring = True

    def __init__(self) -> None:
        import keyring

        self.keyring = keyring

    def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]:
        # Support keyring's get_credential interface which supports getting
        # credentials without a username. This is only available for
        # keyring>=15.2.0.
        if hasattr(self.keyring, "get_credential"):
            logger.debug("Getting credentials from keyring for %s", url)
            cred = self.keyring.get_credential(url, username)
            if cred is not None:
                return cred.username, cred.password
            return None

        if username is not None:
            logger.debug("Getting password from keyring for %s", url)
            password = self.keyring.get_password(url, username)
            if password:
                return username, password
        return None

    def save_auth_info(self, url: str, username: str, password: str) -> None:
        self.keyring.set_password(url, username, password)


class KeyRingCliProvider(KeyRingBaseProvider):
    """Provider which uses `keyring` cli

    Instead of calling the keyring package installed alongside pip
    we call keyring on the command line which will enable pip to
    use which ever installation of keyring is available first in
    PATH.
    """

    has_keyring = True

    def __init__(self, cmd: str) -> None:
        self.keyring = cmd

    def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]:
        # This is the default implementation of keyring.get_credential
        # https://github.com/jaraco/keyring/blob/97689324abcf01bd1793d49063e7ca01e03d7d07/keyring/backend.py#L134-L139
        if username is not None:
            password = self._get_password(url, username)
            if password is not None:
                return username, password
        return None

    def save_auth_info(self, url: str, username: str, password: str) -> None:
        return self._set_password(url, username, password)

    def _get_password(self, service_name: str, username: str) -> Optional[str]:
        """Mirror the implementation of keyring.get_password using cli"""
        if self.keyring is None:
            return None

        cmd = [self.keyring, "get", service_name, username]
        env = os.environ.copy()
        env["PYTHONIOENCODING"] = "utf-8"
        res = subprocess.run(
            cmd,
            stdin=subprocess.DEVNULL,
            stdout=subprocess.PIPE,
            env=env,
        )
        if res.returncode:
            return None
        return res.stdout.decode("utf-8").strip(os.linesep)

    def _set_password(self, service_name: str, username: str, password: str) -> None:
        """Mirror the implementation of keyring.set_password using cli"""
        if self.keyring is None:
            return None
        env = os.environ.copy()
        env["PYTHONIOENCODING"] = "utf-8"
        subprocess.run(
            [self.keyring, "set", service_name, username],
            input=f"{password}{os.linesep}".encode("utf-8"),
            env=env,
            check=True,
        )
        return None


@lru_cache(maxsize=None)
def get_keyring_provider(provider: str) -> KeyRingBaseProvider:
    logger.verbose("Keyring provider requested: %s", provider)

    # keyring has previously failed and been disabled
    if KEYRING_DISABLED:
        provider = "disabled"
    if provider in ["import", "auto"]:
        try:
            impl = KeyRingPythonProvider()
            logger.verbose("Keyring provider set: import")
            return impl
        except ImportError:
            pass
        except Exception as exc:
            # In the event of an unexpected exception
            # we should warn the user
            msg = "Installed copy of keyring fails with exception %s"
            if provider == "auto":
                msg = msg + ", trying to find a keyring executable as a fallback"
            logger.warning(msg, exc, exc_info=logger.isEnabledFor(logging.DEBUG))
    if provider in ["subprocess", "auto"]:
        cli = shutil.which("keyring")
        if cli and cli.startswith(sysconfig.get_path("scripts")):
            # all code within this function is stolen from shutil.which implementation
            @typing.no_type_check
            def PATH_as_shutil_which_determines_it() -> str:
                path = os.environ.get("PATH", None)
                if path is None:
                    try:
                        path = os.confstr("CS_PATH")
                    except (AttributeError, ValueError):
                        # os.confstr() or CS_PATH is not available
                        path = os.defpath
                # bpo-35755: Don't use os.defpath if the PATH environment variable is
                # set to an empty string

                return path

            scripts = Path(sysconfig.get_path("scripts"))

            paths = []
            for path in PATH_as_shutil_which_determines_it().split(os.pathsep):
                p = Path(path)
                try:
                    if not p.samefile(scripts):
                        paths.append(path)
                except FileNotFoundError:
                    pass

            path = os.pathsep.join(paths)

            cli = shutil.which("keyring", path=path)

        if cli:
            logger.verbose("Keyring provider set: subprocess with executable %s", cli)
            return KeyRingCliProvider(cli)

    logger.verbose("Keyring provider set: disabled")
    return KeyRingNullProvider()


class MultiDomainBasicAuth(AuthBase):
    def __init__(
        self,
        prompting: bool = True,
        index_urls: Optional[List[str]] = None,
        keyring_provider: str = "auto",
    ) -> None:
        self.prompting = prompting
        self.index_urls = index_urls
        self.keyring_provider = keyring_provider  # type: ignore[assignment]
        self.passwords: Dict[str, AuthInfo] = {}
        # When the user is prompted to enter credentials and keyring is
        # available, we will offer to save them. If the user accepts,
        # this value is set to the credentials they entered. After the
        # request authenticates, the caller should call
        # ``save_credentials`` to save these.
        self._credentials_to_save: Optional[Credentials] = None

    @property
    def keyring_provider(self) -> KeyRingBaseProvider:
        return get_keyring_provider(self._keyring_provider)

    @keyring_provider.setter
    def keyring_provider(self, provider: str) -> None:
        # The free function get_keyring_provider has been decorated with
        # functools.cache. If an exception occurs in get_keyring_auth that
        # cache will be cleared and keyring disabled, take that into account
        # if you want to remove this indirection.
        self._keyring_provider = provider

    @property
    def use_keyring(self) -> bool:
        # We won't use keyring when --no-input is passed unless
        # a specific provider is requested because it might require
        # user interaction
        return self.prompting or self._keyring_provider not in ["auto", "disabled"]

    def _get_keyring_auth(
        self,
        url: Optional[str],
        username: Optional[str],
    ) -> Optional[AuthInfo]:
        """Return the tuple auth for a given url from keyring."""
        # Do nothing if no url was provided
        if not url:
            return None

        try:
            return self.keyring_provider.get_auth_info(url, username)
        except Exception as exc:
            logger.warning(
                "Keyring is skipped due to an exception: %s",
                str(exc),
            )
            global KEYRING_DISABLED
            KEYRING_DISABLED = True
            get_keyring_provider.cache_clear()
            return None

    def _get_index_url(self, url: str) -> Optional[str]:
        """Return the original index URL matching the requested URL.

        Cached or dynamically generated credentials may work against
        the original index URL rather than just the netloc.

        The provided url should have had its username and password
        removed already. If the original index url had credentials then
        they will be included in the return value.

        Returns None if no matching index was found, or if --no-index
        was specified by the user.
        """
        if not url or not self.index_urls:
            return None

        url = remove_auth_from_url(url).rstrip("/") + "/"
        parsed_url = urllib.parse.urlsplit(url)

        candidates = []

        for index in self.index_urls:
            index = index.rstrip("/") + "/"
            parsed_index = urllib.parse.urlsplit(remove_auth_from_url(index))
            if parsed_url == parsed_index:
                return index

            if parsed_url.netloc != parsed_index.netloc:
                continue

            candidate = urllib.parse.urlsplit(index)
            candidates.append(candidate)

        if not candidates:
            return None

        candidates.sort(
            reverse=True,
            key=lambda candidate: commonprefix(
                [
                    parsed_url.path,
                    candidate.path,
                ]
            ).rfind("/"),
        )

        return urllib.parse.urlunsplit(candidates[0])

    def _get_new_credentials(
        self,
        original_url: str,
        *,
        allow_netrc: bool = True,
        allow_keyring: bool = False,
    ) -> AuthInfo:
        """Find and return credentials for the specified URL."""
        # Split the credentials and netloc from the url.
        url, netloc, url_user_password = split_auth_netloc_from_url(
            original_url,
        )

        # Start with the credentials embedded in the url
        username, password = url_user_password
        if username is not None and password is not None:
            logger.debug("Found credentials in url for %s", netloc)
            return url_user_password

        # Find a matching index url for this request
        index_url = self._get_index_url(url)
        if index_url:
            # Split the credentials from the url.
            index_info = split_auth_netloc_from_url(index_url)
            if index_info:
                index_url, _, index_url_user_password = index_info
                logger.debug("Found index url %s", index_url)

        # If an index URL was found, try its embedded credentials
        if index_url and index_url_user_password[0] is not None:
            username, password = index_url_user_password
            if username is not None and password is not None:
                logger.debug("Found credentials in index url for %s", netloc)
                return index_url_user_password

        # Get creds from netrc if we still don't have them
        if allow_netrc:
            netrc_auth = get_netrc_auth(original_url)
            if netrc_auth:
                logger.debug("Found credentials in netrc for %s", netloc)
                return netrc_auth

        # If we don't have a password and keyring is available, use it.
        if allow_keyring:
            # The index url is more specific than the netloc, so try it first
            # fmt: off
            kr_auth = (
                self._get_keyring_auth(index_url, username) or
                self._get_keyring_auth(netloc, username)
            )
            # fmt: on
            if kr_auth:
                logger.debug("Found credentials in keyring for %s", netloc)
                return kr_auth

        return username, password

    def _get_url_and_credentials(
        self, original_url: str
    ) -> Tuple[str, Optional[str], Optional[str]]:
        """Return the credentials to use for the provided URL.

        If allowed, netrc and keyring may be used to obtain the
        correct credentials.

        Returns (url_without_credentials, username, password). Note
        that even if the original URL contains credentials, this
        function may return a different username and password.
        """
        url, netloc, _ = split_auth_netloc_from_url(original_url)

        # Try to get credentials from original url
        username, password = self._get_new_credentials(original_url)

        # If credentials not found, use any stored credentials for this netloc.
        # Do this if either the username or the password is missing.
        # This accounts for the situation in which the user has specified
        # the username in the index url, but the password comes from keyring.
        if (username is None or password is None) and netloc in self.passwords:
            un, pw = self.passwords[netloc]
            # It is possible that the cached credentials are for a different username,
            # in which case the cache should be ignored.
            if username is None or username == un:
                username, password = un, pw

        if username is not None or password is not None:
            # Convert the username and password if they're None, so that
            # this netloc will show up as "cached" in the conditional above.
            # Further, HTTPBasicAuth doesn't accept None, so it makes sense to
            # cache the value that is going to be used.
            username = username or ""
            password = password or ""

            # Store any acquired credentials.
            self.passwords[netloc] = (username, password)

        assert (
            # Credentials were found
            (username is not None and password is not None)
            # Credentials were not found
            or (username is None and password is None)
        ), f"Could not load credentials from url: {original_url}"

        return url, username, password

    def __call__(self, req: Request) -> Request:
        # Get credentials for this request
        url, username, password = self._get_url_and_credentials(req.url)

        # Set the url of the request to the url without any credentials
        req.url = url

        if username is not None and password is not None:
            # Send the basic auth with this request
            req = HTTPBasicAuth(username, password)(req)

        # Attach a hook to handle 401 responses
        req.register_hook("response", self.handle_401)

        return req

    # Factored out to allow for easy patching in tests
    def _prompt_for_password(
        self, netloc: str
    ) -> Tuple[Optional[str], Optional[str], bool]:
        username = ask_input(f"User for {netloc}: ") if self.prompting else None
        if not username:
            return None, None, False
        if self.use_keyring:
            auth = self._get_keyring_auth(netloc, username)
            if auth and auth[0] is not None and auth[1] is not None:
                return auth[0], auth[1], False
        password = ask_password("Password: ")
        return username, password, True

    # Factored out to allow for easy patching in tests
    def _should_save_password_to_keyring(self) -> bool:
        if (
            not self.prompting
            or not self.use_keyring
            or not self.keyring_provider.has_keyring
        ):
            return False
        return ask("Save credentials to keyring [y/N]: ", ["y", "n"]) == "y"

    def handle_401(self, resp: Response, **kwargs: Any) -> Response:
        # We only care about 401 responses, anything else we want to just
        #   pass through the actual response
        if resp.status_code != 401:
            return resp

        username, password = None, None

        # Query the keyring for credentials:
        if self.use_keyring:
            username, password = self._get_new_credentials(
                resp.url,
                allow_netrc=False,
                allow_keyring=True,
            )

        # We are not able to prompt the user so simply return the response
        if not self.prompting and not username and not password:
            return resp

        parsed = urllib.parse.urlparse(resp.url)

        # Prompt the user for a new username and password
        save = False
        if not username and not password:
            username, password, save = self._prompt_for_password(parsed.netloc)

        # Store the new username and password to use for future requests
        self._credentials_to_save = None
        if username is not None and password is not None:
            self.passwords[parsed.netloc] = (username, password)

            # Prompt to save the password to keyring
            if save and self._should_save_password_to_keyring():
                self._credentials_to_save = Credentials(
                    url=parsed.netloc,
                    username=username,
                    password=password,
                )

        # Consume content and release the original connection to allow our new
        #   request to reuse the same one.
        # The result of the assignment isn't used, it's just needed to consume
        # the content.
        _ = resp.content
        resp.raw.release_conn()

        # Add our new username and password to the request
        req = HTTPBasicAuth(username or "", password or "")(resp.request)
        req.register_hook("response", self.warn_on_401)

        # On successful request, save the credentials that were used to
        # keyring. (Note that if the user responded "no" above, this member
        # is not set and nothing will be saved.)
        if self._credentials_to_save:
            req.register_hook("response", self.save_credentials)

        # Send our new request
        new_resp = resp.connection.send(req, **kwargs)
        new_resp.history.append(resp)

        return new_resp

    def warn_on_401(self, resp: Response, **kwargs: Any) -> None:
        """Response callback to warn about incorrect credentials."""
        if resp.status_code == 401:
            logger.warning(
                "401 Error, Credentials not correct for %s",
                resp.request.url,
            )

    def save_credentials(self, resp: Response, **kwargs: Any) -> None:
        """Response callback to save credentials on success."""
        assert (
            self.keyring_provider.has_keyring
        ), "should never reach here without keyring"

        creds = self._credentials_to_save
        self._credentials_to_save = None
        if creds and resp.status_code < 400:
            try:
                logger.info("Saving credentials to keyring")
                self.keyring_provider.save_auth_info(
                    creds.url, creds.username, creds.password
                )
            except Exception:
                logger.exception("Failed to save credentials")
python3.12/site-packages/pip/_internal/network/session.py000064400000044257151732701520017421 0ustar00"""PipSession and supporting code, containing all pip-specific
network request configuration and behavior.
"""

import email.utils
import io
import ipaddress
import json
import logging
import mimetypes
import os
import platform
import shutil
import subprocess
import sys
import urllib.parse
import warnings
from typing import (
    TYPE_CHECKING,
    Any,
    Dict,
    Generator,
    List,
    Mapping,
    Optional,
    Sequence,
    Tuple,
    Union,
)

from pip._vendor import requests, urllib3
from pip._vendor.cachecontrol import CacheControlAdapter as _BaseCacheControlAdapter
from pip._vendor.requests.adapters import DEFAULT_POOLBLOCK, BaseAdapter
from pip._vendor.requests.adapters import HTTPAdapter as _BaseHTTPAdapter
from pip._vendor.requests.models import PreparedRequest, Response
from pip._vendor.requests.structures import CaseInsensitiveDict
from pip._vendor.urllib3.connectionpool import ConnectionPool
from pip._vendor.urllib3.exceptions import InsecureRequestWarning

from pip import __version__
from pip._internal.metadata import get_default_environment
from pip._internal.models.link import Link
from pip._internal.network.auth import MultiDomainBasicAuth
from pip._internal.network.cache import SafeFileCache

# Import ssl from compat so the initial import occurs in only one place.
from pip._internal.utils.compat import has_tls
from pip._internal.utils.glibc import libc_ver
from pip._internal.utils.misc import build_url_from_netloc, parse_netloc
from pip._internal.utils.urls import url_to_path

if TYPE_CHECKING:
    from ssl import SSLContext

    from pip._vendor.urllib3.poolmanager import PoolManager


logger = logging.getLogger(__name__)

SecureOrigin = Tuple[str, str, Optional[Union[int, str]]]


# Ignore warning raised when using --trusted-host.
warnings.filterwarnings("ignore", category=InsecureRequestWarning)


SECURE_ORIGINS: List[SecureOrigin] = [
    # protocol, hostname, port
    # Taken from Chrome's list of secure origins (See: http://bit.ly/1qrySKC)
    ("https", "*", "*"),
    ("*", "localhost", "*"),
    ("*", "127.0.0.0/8", "*"),
    ("*", "::1/128", "*"),
    ("file", "*", None),
    # ssh is always secure.
    ("ssh", "*", "*"),
]


# These are environment variables present when running under various
# CI systems.  For each variable, some CI systems that use the variable
# are indicated.  The collection was chosen so that for each of a number
# of popular systems, at least one of the environment variables is used.
# This list is used to provide some indication of and lower bound for
# CI traffic to PyPI.  Thus, it is okay if the list is not comprehensive.
# For more background, see: https://github.com/pypa/pip/issues/5499
CI_ENVIRONMENT_VARIABLES = (
    # Azure Pipelines
    "BUILD_BUILDID",
    # Jenkins
    "BUILD_ID",
    # AppVeyor, CircleCI, Codeship, Gitlab CI, Shippable, Travis CI
    "CI",
    # Explicit environment variable.
    "PIP_IS_CI",
)


def looks_like_ci() -> bool:
    """
    Return whether it looks like pip is running under CI.
    """
    # We don't use the method of checking for a tty (e.g. using isatty())
    # because some CI systems mimic a tty (e.g. Travis CI).  Thus that
    # method doesn't provide definitive information in either direction.
    return any(name in os.environ for name in CI_ENVIRONMENT_VARIABLES)


def user_agent() -> str:
    """
    Return a string representing the user agent.
    """
    data: Dict[str, Any] = {
        "installer": {"name": "pip", "version": __version__},
        "python": platform.python_version(),
        "implementation": {
            "name": platform.python_implementation(),
        },
    }

    if data["implementation"]["name"] == "CPython":
        data["implementation"]["version"] = platform.python_version()
    elif data["implementation"]["name"] == "PyPy":
        pypy_version_info = sys.pypy_version_info  # type: ignore
        if pypy_version_info.releaselevel == "final":
            pypy_version_info = pypy_version_info[:3]
        data["implementation"]["version"] = ".".join(
            [str(x) for x in pypy_version_info]
        )
    elif data["implementation"]["name"] == "Jython":
        # Complete Guess
        data["implementation"]["version"] = platform.python_version()
    elif data["implementation"]["name"] == "IronPython":
        # Complete Guess
        data["implementation"]["version"] = platform.python_version()

    if sys.platform.startswith("linux"):
        from pip._vendor import distro

        linux_distribution = distro.name(), distro.version(), distro.codename()
        distro_infos: Dict[str, Any] = dict(
            filter(
                lambda x: x[1],
                zip(["name", "version", "id"], linux_distribution),
            )
        )
        libc = dict(
            filter(
                lambda x: x[1],
                zip(["lib", "version"], libc_ver()),
            )
        )
        if libc:
            distro_infos["libc"] = libc
        if distro_infos:
            data["distro"] = distro_infos

    if sys.platform.startswith("darwin") and platform.mac_ver()[0]:
        data["distro"] = {"name": "macOS", "version": platform.mac_ver()[0]}

    if platform.system():
        data.setdefault("system", {})["name"] = platform.system()

    if platform.release():
        data.setdefault("system", {})["release"] = platform.release()

    if platform.machine():
        data["cpu"] = platform.machine()

    if has_tls():
        import _ssl as ssl

        data["openssl_version"] = ssl.OPENSSL_VERSION

    setuptools_dist = get_default_environment().get_distribution("setuptools")
    if setuptools_dist is not None:
        data["setuptools_version"] = str(setuptools_dist.version)

    if shutil.which("rustc") is not None:
        # If for any reason `rustc --version` fails, silently ignore it
        try:
            rustc_output = subprocess.check_output(
                ["rustc", "--version"], stderr=subprocess.STDOUT, timeout=0.5
            )
        except Exception:
            pass
        else:
            if rustc_output.startswith(b"rustc "):
                # The format of `rustc --version` is:
                # `b'rustc 1.52.1 (9bc8c42bb 2021-05-09)\n'`
                # We extract just the middle (1.52.1) part
                data["rustc_version"] = rustc_output.split(b" ")[1].decode()

    # Use None rather than False so as not to give the impression that
    # pip knows it is not being run under CI.  Rather, it is a null or
    # inconclusive result.  Also, we include some value rather than no
    # value to make it easier to know that the check has been run.
    data["ci"] = True if looks_like_ci() else None

    user_data = os.environ.get("PIP_USER_AGENT_USER_DATA")
    if user_data is not None:
        data["user_data"] = user_data

    return "{data[installer][name]}/{data[installer][version]} {json}".format(
        data=data,
        json=json.dumps(data, separators=(",", ":"), sort_keys=True),
    )


class LocalFSAdapter(BaseAdapter):
    def send(
        self,
        request: PreparedRequest,
        stream: bool = False,
        timeout: Optional[Union[float, Tuple[float, float]]] = None,
        verify: Union[bool, str] = True,
        cert: Optional[Union[str, Tuple[str, str]]] = None,
        proxies: Optional[Mapping[str, str]] = None,
    ) -> Response:
        pathname = url_to_path(request.url)

        resp = Response()
        resp.status_code = 200
        resp.url = request.url

        try:
            stats = os.stat(pathname)
        except OSError as exc:
            # format the exception raised as a io.BytesIO object,
            # to return a better error message:
            resp.status_code = 404
            resp.reason = type(exc).__name__
            resp.raw = io.BytesIO(f"{resp.reason}: {exc}".encode("utf8"))
        else:
            modified = email.utils.formatdate(stats.st_mtime, usegmt=True)
            content_type = mimetypes.guess_type(pathname)[0] or "text/plain"
            resp.headers = CaseInsensitiveDict(
                {
                    "Content-Type": content_type,
                    "Content-Length": stats.st_size,
                    "Last-Modified": modified,
                }
            )

            resp.raw = open(pathname, "rb")
            resp.close = resp.raw.close

        return resp

    def close(self) -> None:
        pass


class _SSLContextAdapterMixin:
    """Mixin to add the ``ssl_context`` constructor argument to HTTP adapters.

    The additional argument is forwarded directly to the pool manager. This allows us
    to dynamically decide what SSL store to use at runtime, which is used to implement
    the optional ``truststore`` backend.
    """

    def __init__(
        self,
        *,
        ssl_context: Optional["SSLContext"] = None,
        **kwargs: Any,
    ) -> None:
        self._ssl_context = ssl_context
        super().__init__(**kwargs)

    def init_poolmanager(
        self,
        connections: int,
        maxsize: int,
        block: bool = DEFAULT_POOLBLOCK,
        **pool_kwargs: Any,
    ) -> "PoolManager":
        if self._ssl_context is not None:
            pool_kwargs.setdefault("ssl_context", self._ssl_context)
        return super().init_poolmanager(  # type: ignore[misc]
            connections=connections,
            maxsize=maxsize,
            block=block,
            **pool_kwargs,
        )


class HTTPAdapter(_SSLContextAdapterMixin, _BaseHTTPAdapter):
    pass


class CacheControlAdapter(_SSLContextAdapterMixin, _BaseCacheControlAdapter):
    pass


class InsecureHTTPAdapter(HTTPAdapter):
    def cert_verify(
        self,
        conn: ConnectionPool,
        url: str,
        verify: Union[bool, str],
        cert: Optional[Union[str, Tuple[str, str]]],
    ) -> None:
        super().cert_verify(conn=conn, url=url, verify=False, cert=cert)


class InsecureCacheControlAdapter(CacheControlAdapter):
    def cert_verify(
        self,
        conn: ConnectionPool,
        url: str,
        verify: Union[bool, str],
        cert: Optional[Union[str, Tuple[str, str]]],
    ) -> None:
        super().cert_verify(conn=conn, url=url, verify=False, cert=cert)


class PipSession(requests.Session):
    timeout: Optional[int] = None

    def __init__(
        self,
        *args: Any,
        retries: int = 0,
        cache: Optional[str] = None,
        trusted_hosts: Sequence[str] = (),
        index_urls: Optional[List[str]] = None,
        ssl_context: Optional["SSLContext"] = None,
        **kwargs: Any,
    ) -> None:
        """
        :param trusted_hosts: Domains not to emit warnings for when not using
            HTTPS.
        """
        super().__init__(*args, **kwargs)

        # Namespace the attribute with "pip_" just in case to prevent
        # possible conflicts with the base class.
        self.pip_trusted_origins: List[Tuple[str, Optional[int]]] = []

        # Attach our User Agent to the request
        self.headers["User-Agent"] = user_agent()

        # Attach our Authentication handler to the session
        self.auth = MultiDomainBasicAuth(index_urls=index_urls)

        # Create our urllib3.Retry instance which will allow us to customize
        # how we handle retries.
        retries = urllib3.Retry(
            # Set the total number of retries that a particular request can
            # have.
            total=retries,
            # A 503 error from PyPI typically means that the Fastly -> Origin
            # connection got interrupted in some way. A 503 error in general
            # is typically considered a transient error so we'll go ahead and
            # retry it.
            # A 500 may indicate transient error in Amazon S3
            # A 520 or 527 - may indicate transient error in CloudFlare
            status_forcelist=[500, 503, 520, 527],
            # Add a small amount of back off between failed requests in
            # order to prevent hammering the service.
            backoff_factor=0.25,
        )  # type: ignore

        # Our Insecure HTTPAdapter disables HTTPS validation. It does not
        # support caching so we'll use it for all http:// URLs.
        # If caching is disabled, we will also use it for
        # https:// hosts that we've marked as ignoring
        # TLS errors for (trusted-hosts).
        insecure_adapter = InsecureHTTPAdapter(max_retries=retries)

        # We want to _only_ cache responses on securely fetched origins or when
        # the host is specified as trusted. We do this because
        # we can't validate the response of an insecurely/untrusted fetched
        # origin, and we don't want someone to be able to poison the cache and
        # require manual eviction from the cache to fix it.
        if cache:
            secure_adapter = CacheControlAdapter(
                cache=SafeFileCache(cache),
                max_retries=retries,
                ssl_context=ssl_context,
            )
            self._trusted_host_adapter = InsecureCacheControlAdapter(
                cache=SafeFileCache(cache),
                max_retries=retries,
            )
        else:
            secure_adapter = HTTPAdapter(max_retries=retries, ssl_context=ssl_context)
            self._trusted_host_adapter = insecure_adapter

        self.mount("https://", secure_adapter)
        self.mount("http://", insecure_adapter)

        # Enable file:// urls
        self.mount("file://", LocalFSAdapter())

        for host in trusted_hosts:
            self.add_trusted_host(host, suppress_logging=True)

    def update_index_urls(self, new_index_urls: List[str]) -> None:
        """
        :param new_index_urls: New index urls to update the authentication
            handler with.
        """
        self.auth.index_urls = new_index_urls

    def add_trusted_host(
        self, host: str, source: Optional[str] = None, suppress_logging: bool = False
    ) -> None:
        """
        :param host: It is okay to provide a host that has previously been
            added.
        :param source: An optional source string, for logging where the host
            string came from.
        """
        if not suppress_logging:
            msg = f"adding trusted host: {host!r}"
            if source is not None:
                msg += f" (from {source})"
            logger.info(msg)

        parsed_host, parsed_port = parse_netloc(host)
        if parsed_host is None:
            raise ValueError(f"Trusted host URL must include a host part: {host!r}")
        if (parsed_host, parsed_port) not in self.pip_trusted_origins:
            self.pip_trusted_origins.append((parsed_host, parsed_port))

        self.mount(
            build_url_from_netloc(host, scheme="http") + "/", self._trusted_host_adapter
        )
        self.mount(build_url_from_netloc(host) + "/", self._trusted_host_adapter)
        if not parsed_port:
            self.mount(
                build_url_from_netloc(host, scheme="http") + ":",
                self._trusted_host_adapter,
            )
            # Mount wildcard ports for the same host.
            self.mount(build_url_from_netloc(host) + ":", self._trusted_host_adapter)

    def iter_secure_origins(self) -> Generator[SecureOrigin, None, None]:
        yield from SECURE_ORIGINS
        for host, port in self.pip_trusted_origins:
            yield ("*", host, "*" if port is None else port)

    def is_secure_origin(self, location: Link) -> bool:
        # Determine if this url used a secure transport mechanism
        parsed = urllib.parse.urlparse(str(location))
        origin_protocol, origin_host, origin_port = (
            parsed.scheme,
            parsed.hostname,
            parsed.port,
        )

        # The protocol to use to see if the protocol matches.
        # Don't count the repository type as part of the protocol: in
        # cases such as "git+ssh", only use "ssh". (I.e., Only verify against
        # the last scheme.)
        origin_protocol = origin_protocol.rsplit("+", 1)[-1]

        # Determine if our origin is a secure origin by looking through our
        # hardcoded list of secure origins, as well as any additional ones
        # configured on this PackageFinder instance.
        for secure_origin in self.iter_secure_origins():
            secure_protocol, secure_host, secure_port = secure_origin
            if origin_protocol != secure_protocol and secure_protocol != "*":
                continue

            try:
                addr = ipaddress.ip_address(origin_host or "")
                network = ipaddress.ip_network(secure_host)
            except ValueError:
                # We don't have both a valid address or a valid network, so
                # we'll check this origin against hostnames.
                if (
                    origin_host
                    and origin_host.lower() != secure_host.lower()
                    and secure_host != "*"
                ):
                    continue
            else:
                # We have a valid address and network, so see if the address
                # is contained within the network.
                if addr not in network:
                    continue

            # Check to see if the port matches.
            if (
                origin_port != secure_port
                and secure_port != "*"
                and secure_port is not None
            ):
                continue

            # If we've gotten here, then this origin matches the current
            # secure origin and we should return True
            return True

        # If we've gotten to this point, then the origin isn't secure and we
        # will not accept it as a valid location to search. We will however
        # log a warning that we are ignoring it.
        logger.warning(
            "The repository located at %s is not a trusted or secure host and "
            "is being ignored. If this repository is available via HTTPS we "
            "recommend you use HTTPS instead, otherwise you may silence "
            "this warning and allow it anyway with '--trusted-host %s'.",
            origin_host,
            origin_host,
        )

        return False

    def request(self, method: str, url: str, *args: Any, **kwargs: Any) -> Response:
        # Allow setting a default timeout on a session
        kwargs.setdefault("timeout", self.timeout)
        # Allow setting a default proxies on a session
        kwargs.setdefault("proxies", self.proxies)

        # Dispatch the actual request
        return super().request(method, url, *args, **kwargs)
python3.12/site-packages/pip/_internal/network/lazy_wheel.py000064400000016726151732701520020101 0ustar00"""Lazy ZIP over HTTP"""

__all__ = ["HTTPRangeRequestUnsupported", "dist_from_wheel_url"]

from bisect import bisect_left, bisect_right
from contextlib import contextmanager
from tempfile import NamedTemporaryFile
from typing import Any, Dict, Generator, List, Optional, Tuple
from zipfile import BadZipFile, ZipFile

from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response

from pip._internal.metadata import BaseDistribution, MemoryWheel, get_wheel_distribution
from pip._internal.network.session import PipSession
from pip._internal.network.utils import HEADERS, raise_for_status, response_chunks


class HTTPRangeRequestUnsupported(Exception):
    pass


def dist_from_wheel_url(name: str, url: str, session: PipSession) -> BaseDistribution:
    """Return a distribution object from the given wheel URL.

    This uses HTTP range requests to only fetch the portion of the wheel
    containing metadata, just enough for the object to be constructed.
    If such requests are not supported, HTTPRangeRequestUnsupported
    is raised.
    """
    with LazyZipOverHTTP(url, session) as zf:
        # For read-only ZIP files, ZipFile only needs methods read,
        # seek, seekable and tell, not the whole IO protocol.
        wheel = MemoryWheel(zf.name, zf)  # type: ignore
        # After context manager exit, wheel.name
        # is an invalid file by intention.
        return get_wheel_distribution(wheel, canonicalize_name(name))


class LazyZipOverHTTP:
    """File-like object mapped to a ZIP file over HTTP.

    This uses HTTP range requests to lazily fetch the file's content,
    which is supposed to be fed to ZipFile.  If such requests are not
    supported by the server, raise HTTPRangeRequestUnsupported
    during initialization.
    """

    def __init__(
        self, url: str, session: PipSession, chunk_size: int = CONTENT_CHUNK_SIZE
    ) -> None:
        head = session.head(url, headers=HEADERS)
        raise_for_status(head)
        assert head.status_code == 200
        self._session, self._url, self._chunk_size = session, url, chunk_size
        self._length = int(head.headers["Content-Length"])
        self._file = NamedTemporaryFile()
        self.truncate(self._length)
        self._left: List[int] = []
        self._right: List[int] = []
        if "bytes" not in head.headers.get("Accept-Ranges", "none"):
            raise HTTPRangeRequestUnsupported("range request is not supported")
        self._check_zip()

    @property
    def mode(self) -> str:
        """Opening mode, which is always rb."""
        return "rb"

    @property
    def name(self) -> str:
        """Path to the underlying file."""
        return self._file.name

    def seekable(self) -> bool:
        """Return whether random access is supported, which is True."""
        return True

    def close(self) -> None:
        """Close the file."""
        self._file.close()

    @property
    def closed(self) -> bool:
        """Whether the file is closed."""
        return self._file.closed

    def read(self, size: int = -1) -> bytes:
        """Read up to size bytes from the object and return them.

        As a convenience, if size is unspecified or -1,
        all bytes until EOF are returned.  Fewer than
        size bytes may be returned if EOF is reached.
        """
        download_size = max(size, self._chunk_size)
        start, length = self.tell(), self._length
        stop = length if size < 0 else min(start + download_size, length)
        start = max(0, stop - download_size)
        self._download(start, stop - 1)
        return self._file.read(size)

    def readable(self) -> bool:
        """Return whether the file is readable, which is True."""
        return True

    def seek(self, offset: int, whence: int = 0) -> int:
        """Change stream position and return the new absolute position.

        Seek to offset relative position indicated by whence:
        * 0: Start of stream (the default).  pos should be >= 0;
        * 1: Current position - pos may be negative;
        * 2: End of stream - pos usually negative.
        """
        return self._file.seek(offset, whence)

    def tell(self) -> int:
        """Return the current position."""
        return self._file.tell()

    def truncate(self, size: Optional[int] = None) -> int:
        """Resize the stream to the given size in bytes.

        If size is unspecified resize to the current position.
        The current stream position isn't changed.

        Return the new file size.
        """
        return self._file.truncate(size)

    def writable(self) -> bool:
        """Return False."""
        return False

    def __enter__(self) -> "LazyZipOverHTTP":
        self._file.__enter__()
        return self

    def __exit__(self, *exc: Any) -> None:
        self._file.__exit__(*exc)

    @contextmanager
    def _stay(self) -> Generator[None, None, None]:
        """Return a context manager keeping the position.

        At the end of the block, seek back to original position.
        """
        pos = self.tell()
        try:
            yield
        finally:
            self.seek(pos)

    def _check_zip(self) -> None:
        """Check and download until the file is a valid ZIP."""
        end = self._length - 1
        for start in reversed(range(0, end, self._chunk_size)):
            self._download(start, end)
            with self._stay():
                try:
                    # For read-only ZIP files, ZipFile only needs
                    # methods read, seek, seekable and tell.
                    ZipFile(self)  # type: ignore
                except BadZipFile:
                    pass
                else:
                    break

    def _stream_response(
        self, start: int, end: int, base_headers: Dict[str, str] = HEADERS
    ) -> Response:
        """Return HTTP response to a range request from start to end."""
        headers = base_headers.copy()
        headers["Range"] = f"bytes={start}-{end}"
        # TODO: Get range requests to be correctly cached
        headers["Cache-Control"] = "no-cache"
        return self._session.get(self._url, headers=headers, stream=True)

    def _merge(
        self, start: int, end: int, left: int, right: int
    ) -> Generator[Tuple[int, int], None, None]:
        """Return a generator of intervals to be fetched.

        Args:
            start (int): Start of needed interval
            end (int): End of needed interval
            left (int): Index of first overlapping downloaded data
            right (int): Index after last overlapping downloaded data
        """
        lslice, rslice = self._left[left:right], self._right[left:right]
        i = start = min([start] + lslice[:1])
        end = max([end] + rslice[-1:])
        for j, k in zip(lslice, rslice):
            if j > i:
                yield i, j - 1
            i = k + 1
        if i <= end:
            yield i, end
        self._left[left:right], self._right[left:right] = [start], [end]

    def _download(self, start: int, end: int) -> None:
        """Download bytes from start to end inclusively."""
        with self._stay():
            left = bisect_left(self._right, start)
            right = bisect_right(self._left, end)
            for start, end in self._merge(start, end, left, right):
                response = self._stream_response(start, end)
                response.raise_for_status()
                self.seek(start)
                for chunk in response_chunks(response, self._chunk_size):
                    self._file.write(chunk)
python3.12/site-packages/pip/_internal/network/utils.py000064400000007751151732701520017074 0ustar00from typing import Dict, Generator

from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response

from pip._internal.exceptions import NetworkConnectionError

# The following comments and HTTP headers were originally added by
# Donald Stufft in git commit 22c562429a61bb77172039e480873fb239dd8c03.
#
# We use Accept-Encoding: identity here because requests defaults to
# accepting compressed responses. This breaks in a variety of ways
# depending on how the server is configured.
# - Some servers will notice that the file isn't a compressible file
#   and will leave the file alone and with an empty Content-Encoding
# - Some servers will notice that the file is already compressed and
#   will leave the file alone, adding a Content-Encoding: gzip header
# - Some servers won't notice anything at all and will take a file
#   that's already been compressed and compress it again, and set
#   the Content-Encoding: gzip header
# By setting this to request only the identity encoding we're hoping
# to eliminate the third case.  Hopefully there does not exist a server
# which when given a file will notice it is already compressed and that
# you're not asking for a compressed file and will then decompress it
# before sending because if that's the case I don't think it'll ever be
# possible to make this work.
HEADERS: Dict[str, str] = {"Accept-Encoding": "identity"}


def raise_for_status(resp: Response) -> None:
    http_error_msg = ""
    if isinstance(resp.reason, bytes):
        # We attempt to decode utf-8 first because some servers
        # choose to localize their reason strings. If the string
        # isn't utf-8, we fall back to iso-8859-1 for all other
        # encodings.
        try:
            reason = resp.reason.decode("utf-8")
        except UnicodeDecodeError:
            reason = resp.reason.decode("iso-8859-1")
    else:
        reason = resp.reason

    if 400 <= resp.status_code < 500:
        http_error_msg = (
            f"{resp.status_code} Client Error: {reason} for url: {resp.url}"
        )

    elif 500 <= resp.status_code < 600:
        http_error_msg = (
            f"{resp.status_code} Server Error: {reason} for url: {resp.url}"
        )

    if http_error_msg:
        raise NetworkConnectionError(http_error_msg, response=resp)


def response_chunks(
    response: Response, chunk_size: int = CONTENT_CHUNK_SIZE
) -> Generator[bytes, None, None]:
    """Given a requests Response, provide the data chunks."""
    try:
        # Special case for urllib3.
        for chunk in response.raw.stream(
            chunk_size,
            # We use decode_content=False here because we don't
            # want urllib3 to mess with the raw bytes we get
            # from the server. If we decompress inside of
            # urllib3 then we cannot verify the checksum
            # because the checksum will be of the compressed
            # file. This breakage will only occur if the
            # server adds a Content-Encoding header, which
            # depends on how the server was configured:
            # - Some servers will notice that the file isn't a
            #   compressible file and will leave the file alone
            #   and with an empty Content-Encoding
            # - Some servers will notice that the file is
            #   already compressed and will leave the file
            #   alone and will add a Content-Encoding: gzip
            #   header
            # - Some servers won't notice anything at all and
            #   will take a file that's already been compressed
            #   and compress it again and set the
            #   Content-Encoding: gzip header
            #
            # By setting this not to decode automatically we
            # hope to eliminate problems with the second case.
            decode_content=False,
        ):
            yield chunk
    except AttributeError:
        # Standard file-like object.
        while True:
            chunk = response.raw.read(chunk_size)
            if not chunk:
                break
            yield chunk
python3.12/site-packages/pip/_internal/vcs/bazaar.py000064400000006677151732701520016304 0ustar00import logging
from typing import List, Optional, Tuple

from pip._internal.utils.misc import HiddenText, display_path
from pip._internal.utils.subprocess import make_command
from pip._internal.utils.urls import path_to_url
from pip._internal.vcs.versioncontrol import (
    AuthInfo,
    RemoteNotFoundError,
    RevOptions,
    VersionControl,
    vcs,
)

logger = logging.getLogger(__name__)


class Bazaar(VersionControl):
    name = "bzr"
    dirname = ".bzr"
    repo_name = "branch"
    schemes = (
        "bzr+http",
        "bzr+https",
        "bzr+ssh",
        "bzr+sftp",
        "bzr+ftp",
        "bzr+lp",
        "bzr+file",
    )

    @staticmethod
    def get_base_rev_args(rev: str) -> List[str]:
        return ["-r", rev]

    def fetch_new(
        self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int
    ) -> None:
        rev_display = rev_options.to_display()
        logger.info(
            "Checking out %s%s to %s",
            url,
            rev_display,
            display_path(dest),
        )
        if verbosity <= 0:
            flag = "--quiet"
        elif verbosity == 1:
            flag = ""
        else:
            flag = f"-{'v'*verbosity}"
        cmd_args = make_command(
            "checkout", "--lightweight", flag, rev_options.to_args(), url, dest
        )
        self.run_command(cmd_args)

    def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        self.run_command(make_command("switch", url), cwd=dest)

    def update(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        output = self.run_command(
            make_command("info"), show_stdout=False, stdout_only=True, cwd=dest
        )
        if output.startswith("Standalone "):
            # Older versions of pip used to create standalone branches.
            # Convert the standalone branch to a checkout by calling "bzr bind".
            cmd_args = make_command("bind", "-q", url)
            self.run_command(cmd_args, cwd=dest)

        cmd_args = make_command("update", "-q", rev_options.to_args())
        self.run_command(cmd_args, cwd=dest)

    @classmethod
    def get_url_rev_and_auth(cls, url: str) -> Tuple[str, Optional[str], AuthInfo]:
        # hotfix the URL scheme after removing bzr+ from bzr+ssh:// re-add it
        url, rev, user_pass = super().get_url_rev_and_auth(url)
        if url.startswith("ssh://"):
            url = "bzr+" + url
        return url, rev, user_pass

    @classmethod
    def get_remote_url(cls, location: str) -> str:
        urls = cls.run_command(
            ["info"], show_stdout=False, stdout_only=True, cwd=location
        )
        for line in urls.splitlines():
            line = line.strip()
            for x in ("checkout of branch: ", "parent branch: "):
                if line.startswith(x):
                    repo = line.split(x)[1]
                    if cls._is_local_repository(repo):
                        return path_to_url(repo)
                    return repo
        raise RemoteNotFoundError

    @classmethod
    def get_revision(cls, location: str) -> str:
        revision = cls.run_command(
            ["revno"],
            show_stdout=False,
            stdout_only=True,
            cwd=location,
        )
        return revision.splitlines()[-1]

    @classmethod
    def is_commit_id_equal(cls, dest: str, name: Optional[str]) -> bool:
        """Always assume the versions don't match"""
        return False


vcs.register(Bazaar)
python3.12/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-312.pyc000064400000001102151732701520023116 0ustar00�

R`iT��@�ddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
y)�N)�RemoteNotFoundError�RemoteNotValidError�is_url�make_vcs_requirement_url�vcs)�pip._internal.vcs.bazaar�pip�pip._internal.vcs.git�pip._internal.vcs.mercurial�pip._internal.vcs.subversion� pip._internal.vcs.versioncontrolrrrrr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/vcs/__init__.py�<module>rs��
 ��"�#��rpython3.12/site-packages/pip/_internal/vcs/__pycache__/mercurial.cpython-312.pyc000064400000016740151732701520023360 0ustar00�

R`i~����ddlZddlZddlZddlmZmZmZddlmZm	Z	ddl
mZmZddl
mZddlmZddlmZmZmZmZej,e�ZGd�d	e�Zej4e�y)
�N)�List�Optional�Tuple)�
BadCommand�InstallationError)�
HiddenText�display_path)�make_command)�path_to_url)�
RevOptions�VersionControl�(find_path_to_project_root_from_repo_root�vcsc
�F��eZdZdZdZdZdZedede	efd��Z
ded	ed
ede
ddf
d
�Zded	ed
eddfd�Zded	ed
eddfd�Zededefd��Zededefd��Zededefd��Zededeedefd��Zededeefd��Zededeef�fd��Z�xZS)�	Mercurial�hgz.hg�clone)zhg+filezhg+httpzhg+httpszhg+sshzhg+static-http�rev�returnc��d|��gS)Nz-r=�)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/vcs/mercurial.py�get_base_rev_argszMercurial.get_base_rev_args s���c�U��}���dest�url�rev_options�	verbosityNc�4�|j�}tjd||t|��|dkrd}n|dk(rd}n
|dk(rd}nd}|j	td	d
g|�|�|����|j	tdg|�|j
����|��y)
NzCloning hg %s%s to %sr)z--quiet�r�)�	--verbose)r"z--debugrz
--noupdate�update��cwd)�
to_display�logger�infor	�run_commandr
�to_args)�selfrrrr�rev_display�flagss       r�	fetch_newzMercurial.fetch_new$s���"�,�,�.�����#������		
���>�%1�E�
�!�^��E�
�!�^�"�E�,�E�����g�|�O�e�O�S�O�$�O�P������A�E�A�;�+>�+>�+@�A��	�	
rc��tjj||jd�}t	j
�}	|j
|�|jdd|j�t|d�5}|j|�ddd�tdd|j��}|j||��y#1swY�8xYw#ttjf$r!}t j#d||�Yd}~yd}~wwxYw)	N�hgrc�paths�default�wr#�-qr$z/Could not switch Mercurial repository to %s: %s)�os�path�join�dirname�configparser�RawConfigParser�read�set�secret�open�writer
r*r)�OSError�NoSectionErrorr'�warning)	r+rrr�repo_config�config�config_file�cmd_args�excs	         r�switchzMercurial.switch<s����g�g�l�l�4����v�>���-�-�/��		1��K�K��$��J�J�w�	�3�:�:�6��k�3�'�;����[�)�(�
$�H�d�K�4G�4G�4I�J�H����X�4��0�
(�'����4�4�5�	X��N�N�L�c�SV�W�W��	X�s0�:C�;C�
C�C
�	C�D
�)D�D
c��|jddg|��tdd|j��}|j||��y)N�pullr4r$r#)r)r
r*)r+rrrrFs     rr#zMercurial.updateJsC�����&�$��T��2���$��0C�0C�0E�F������t��,r�locationc��|jddgdd|��j�}|j|�rt|�}|j�S)N�
showconfigz
paths.defaultFT��show_stdout�stdout_onlyr%)r)�strip�_is_local_repositoryr)�clsrKrs   r�get_remote_urlzMercurial.get_remote_urlOsX���o�o�
�?�+����	�
�
�%�'�	��#�#�C�(��c�"�C��y�y�{�rc�P�|jddgdd|��j�}|S)zW
        Return the repository-local changeset revision number, as an integer.
        �parentsz--template={rev}FTrN�r)rQ)rSrK�current_revisions   r�get_revisionzMercurial.get_revision[s=��
�?�?�
�*�+����	+�
�
�%�'�	� �rc�P�|jddgdd|��j�}|S)zh
        Return the changeset identification hash, as a 40-character
        hexadecimal string
        rVz--template={node}FTrNrW)rSrK�current_rev_hashs   r�get_requirement_revisionz"Mercurial.get_requirement_revisionhs=���?�?�
�+�,����	+�
�
�%�'�	� �r�namec��y)z&Always assume the versions don't matchFr)rSrr]s   r�is_commit_id_equalzMercurial.is_commit_id_equalvs��rc��|jdgdd|��j�}tjj	|�s=tjjtjj
||��}t||�S)z�
        Return the path to Python project root, relative to the repo root.
        Return None if the project root is in the repo root.
        �rootFTrN)r)rQr5r6�isabs�abspathr7r)rSrK�	repo_roots   r�get_subdirectoryzMercurial.get_subdirectory{sl���O�O�
�H�%�T�x�$�
�
�%�'�	��w�w�}�}�Y�'�����������X�y�(I�J�I�7��)�L�Lrc���t�|�|�}|r|S	|jdg|dddd��}tjj|jd��S#t$rtjd|�Yyt$rYywxYw)NraFT�raise)r%rOrP�
on_returncode�log_failed_cmdzIcould not determine if %s is under hg control because hg is not availablez
)�super�get_repository_rootr)rr'�debugrr5r6�normpath�rstrip)rSrK�loc�r�	__class__s    �rrkzMercurial.get_repository_root�s�����g�)�(�3����J�	�������!� �%�$�
 ��A�"�w�w������� 0�1�1���	��L�L�.��
�
� �	��	�s�A�B�=B�B)�__name__�
__module__�__qualname__r]r8�	repo_name�schemes�staticmethod�strrrrr�intr.rHr#�classmethodrTrYr\r�boolr_rerk�
__classcell__)rqs@rrrs�����D��G��I��G���s��t�C�y����
��
�(�
�7A�
�NQ�
�	
�
�01�3�1�Z�1�j�1�T�1�-�3�-�Z�-�j�-�T�-�
�	�c�	�c�	��	��
 �C�
 �C�
 ��
 �� �� �� �� ���c���#���4�����M��M���
�M��M��2�3�2�8�C�=�2��2rr)r9�loggingr5�typingrrr�pip._internal.exceptionsrr�pip._internal.utils.miscrr	�pip._internal.utils.subprocessr
�pip._internal.utils.urlsr� pip._internal.vcs.versioncontrolrr
rr�	getLoggerrrr'r�registerrrr�<module>r�s]����	�(�(�B�=�7�0���
��	�	�8�	$��L2��L2�^
����Y�rpython3.12/site-packages/pip/_internal/vcs/__pycache__/bazaar.cpython-312.pyc000064400000011705151732701520022631 0ustar00�

R`i�
����ddlZddlmZmZmZddlmZmZddlm	Z	ddl
mZddlm
Z
mZmZmZmZej$e�ZGd�de�Zej,e�y)	�N)�List�Optional�Tuple)�
HiddenText�display_path)�make_command)�path_to_url)�AuthInfo�RemoteNotFoundError�
RevOptions�VersionControl�vcsc
���eZdZdZdZdZdZedede	efd��Z
ded	ed
ede
ddf
d
�Zded	ed
eddfd�Zded	ed
eddfd�Zed	edeeeeeff�fd��Zededefd��Zededefd��Zededeedefd��Z�xZS)�Bazaar�bzrz.bzr�branch)zbzr+httpz	bzr+httpszbzr+sshzbzr+sftpzbzr+ftpzbzr+lpzbzr+file�rev�returnc�
�d|gS)Nz-r�)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/vcs/bazaar.py�get_base_rev_argszBazaar.get_base_rev_args s���c�{���dest�url�rev_options�	verbosityNc���|j�}tjd||t|��|dkrd}n|dk(rd}ndd|z��}t	dd	||j�||�}|j
|�y)
NzChecking out %s%s to %srz--quiet���-�v�checkoutz
--lightweight)�
to_display�logger�inforr�to_args�run_command)�selfrrrr�rev_display�flag�cmd_argss        r�	fetch_newzBazaar.fetch_new$s���"�,�,�.�����%������		
���>��D�
�!�^��D��s�9�}�o�&�D�����{�/B�/B�/D�c�4�
��	
����"rc�>�|jtd|�|��y)N�switch��cwd)r(r)r)rrrs    rr/z
Bazaar.switch9s������h��4�$��?rc��|jtd�dd|��}|jd�r tdd|�}|j||��td	d|j��}|j||��y)
Nr&FT��show_stdout�stdout_onlyr1zStandalone �bindz-qr0�update)r(r�
startswithr')r)rrr�outputr,s      rr7z
Bazaar.update<s����!�!��� �e��4�"�
�����]�+�$�F�D�#�6�H����X�4��0���$��0C�0C�0E�F������t��,rc�`��t�|�|�\}}}|jd�rd|z}|||fS)Nzssh://zbzr+)�super�get_url_rev_and_authr8)�clsrr�	user_pass�	__class__s    �rr<zBazaar.get_url_rev_and_authIs=���$�g�:�3�?���S�)��>�>�(�#��3�,�C��C��"�"r�locationc�(�|jdgdd|��}|j�D]d}|j�}dD]M}|j|�s�|j	|�d}|j|�rt
|�ccS|ccS�ft�)Nr&FTr3)zcheckout of branch: zparent branch: r)r(�
splitlines�stripr8�split�_is_local_repositoryr	r)r=r@�urls�line�x�repos      r�get_remote_urlzBazaar.get_remote_urlQs������
�H�%�T�x��
���O�O�%�D��:�:�<�D�@���?�?�1�%��:�:�a�=��+�D��/�/��5�*�4�0�0��K�A�&�"�!rc�T�|jdgdd|��}|j�dS)N�revnoFTr3���)r(rB)r=r@�revisions   r�get_revisionzBazaar.get_revision`s9���?�?�
�I����	#�
���"�"�$�R�(�(r�namec��y)z&Always assume the versions don't matchFr)r=rrPs   r�is_commit_id_equalzBazaar.is_commit_id_equaljs��r)�__name__�
__module__�__qualname__rP�dirname�	repo_name�schemes�staticmethod�strrrrr�intr-r/r7�classmethodrrr
r<rJrO�boolrR�
__classcell__)r?s@rrrsV����D��G��I��G���s��t�C�y����#��#�(�#�7A�#�NQ�#�	
�#�*@�3�@�Z�@�j�@�T�@�-�3�-�Z�-�j�-�T�-��#�s�#�u�S�(�3�-��5Q�/R�#��#��"�c�"�c�"��"��)�C�)�C�)��)���c���#���4���rr)�logging�typingrrr�pip._internal.utils.miscrr�pip._internal.utils.subprocessr�pip._internal.utils.urlsr	� pip._internal.vcs.versioncontrolr
rrr
r�	getLoggerrSr%r�registerrrr�<module>rgsT���(�(�=�7�0���
��	�	�8�	$��[�^�[�|
����V�rpython3.12/site-packages/pip/_internal/vcs/__pycache__/subversion.cpython-312.pyc000064400000030362151732701520023570 0ustar00�

R`i�-��f�ddlZddlZddlZddlmZmZmZddlmZm	Z	m
Z
mZmZddl
mZmZddlmZmZmZmZmZej,e�Zej2d�Zej2d�Zej2d�Zej2d	�ZGd
�de�Zej>e�y)�N)�List�Optional�Tuple)�
HiddenText�display_path�is_console_interactive�is_installable_dir�split_auth_from_netloc)�CommandArgs�make_command)�AuthInfo�RemoteNotFoundError�
RevOptions�VersionControl�vcsz
url="([^"]+)"zcommitted-rev="(\d+)"z\s*revision="(\d+)"z<url>(.*)</url>c���eZdZdZdZdZdZedede	fd��Z
ededeefd	��Z
ed
edefd��Zeded
edeeeeeeefff�fd��Zededeeeeeff�fd��Zedeedeedefd��Zed
edefd��Zed
edeeeeffd��Zededeede	fd��Zd%dee	ddf�fd�
Zdeedffd�Zdeedffd�Zdefd�Zdeded ed!eddf
d"�Z deded eddfd#�Z!deded eddfd$�Z"�xZ#S)&�
Subversion�svnz.svn�checkout)zsvn+sshzsvn+httpz	svn+httpszsvn+svnzsvn+file�
remote_url�returnc��y)NT�)�clsrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/vcs/subversion.py�should_add_vcs_url_prefixz$Subversion.should_add_vcs_url_prefix$s����revc�
�d|gS)Nz-rr)rs r�get_base_rev_argszSubversion.get_base_rev_args(s���c�{�r�locationc���d}tj|�D]�\}}}|j|vrg|dd�|j|j�tjj||jd�}tjj
|�s��|j|�\}}||k(r
|�J�|dz}n|r|j|�sg|dd��t||�}��t|�S)zR
        Return the maximum revision for all files under a given location
        rN�entries�/)�os�walk�dirname�remove�path�join�exists�_get_svn_url_rev�
startswith�max�str)	rr!�revision�base�dirs�_�
entries_fn�dirurl�localrevs	         r�get_revisionzSubversion.get_revision,s������W�W�X�.�M�D�$���{�{�$�&���Q����K�K����$������d�C�K�K��C�J��7�7�>�>�*�-��"�3�3�D�9��F�H��x���)�)�)���|���6�#4�#4�T�#:���Q����8�X�.�H�%/�&�8�}�r�netloc�schemec�D��|dk(rt�|�||�St|�S)z�
        This override allows the auth information to be passed to svn via the
        --username and --password options instead of via the URL.
        �ssh)�super�get_netloc_and_authr
)rr8r9�	__class__s   �rr=zSubversion.get_netloc_and_authIs+����U�?��7�.�v�v�>�>�%�f�-�-r�urlc�`��t�|�|�\}}}|jd�rd|z}|||fS)Nzssh://zsvn+)r<�get_url_rev_and_authr-)rr?r�	user_passr>s    �rrAzSubversion.get_url_rev_and_authXs=���$�g�:�3�?���S�)��>�>�(�#��3�,�C��C��"�"r�username�passwordc�.�g}|r|d|gz
}|r|d|gz
}|S)Nz
--usernamez
--passwordr)rCrD�
extra_argss   r�
make_rev_argszSubversion.make_rev_args`s3��#%�
���<��2�2�J���<��2�2�J��rc���|}t|�sN|}tjj|�}||k(rtjd|�t�t|�s�N|j|�\}}|�t�|S)NzMCould not find Python project for directory %s (tried all parent directories))r	r%r)r'�logger�warningrr,)rr!�
orig_location�
last_locationr?�_revs      r�get_remote_urlzSubversion.get_remote_urlls~��!�
�$�X�.�$�M��w�w���x�0�H��=�(����*�!��
*�)�%�X�.��(�(��2�	��T��;�%�%��
rc���ddlm}tjj	||j
d�}tjj
|�r%t|�5}|j�}ddd�nd}d}jd�s"|jd�s|jd�rwtttj|jd���}|dd=|dd	}|D�cgc]%}t|�d
kDs�|d
s�t!|d
���'c}dgz}	�n|jd�rvt"j%|�}
|
st'd|����|
j)d
�}t*j-|�D�cgc]}t!|j)d
����c}dgz}	n|	|j/dd|gdd��}t0j%|�}
|
�J�|
j)d
�}t2j-|�D�cgc]}t!|j)d
����}	}|	rt5|	�}
||
fSd}
||
fS#1swY���xYwcc}wcc}wcc}w#|$rdg}	}Y�>wxYw)Nr)�InstallationErrorr#��8�9�10z

��	z<?xmlzBadly formatted data: ��infoz--xmlFT��show_stdout�stdout_only)�pip._internal.exceptionsrPr%r)r*r'r+�open�readr-�list�mapr/�
splitlines�split�len�int�_svn_xml_url_re�search�
ValueError�group�_svn_rev_re�finditer�run_command�_svn_info_xml_url_re�_svn_info_xml_rev_rer.)rr!rP�entries_path�f�datar?r#�d�revs�match�m�xmlrs              rr,zSubversion._get_svn_url_rev�s4��>��w�w�|�|�H�c�k�k�9�E��
�7�7�>�>�,�'��l�#�q��v�v�x��$�#��D����?�?�3��4�?�?�3�#7�4�?�?�4�;P��3�s�~�~�t�z�z�*�/E�F�G�G���
�1�
��!�*�Q�-�C�'.�F�w�!�#�a�&�1�*��1��C��!��I�w�F�!��L�D�
�_�_�W�
%�#�*�*�4�0�E�� �#9�$��!B�C�C��+�+�a�.�C�-8�-A�-A�$�-G�H�-G��C�����
�O�-G�H�A�3�N�D�
%��o�o��W�h�/� %� $�&���
-�3�3�C�8���(�(�(��k�k�!�n��1E�1N�1N�s�1S�T�1S�A��A�G�G�A�J��1S��T���d�)�C��C�x���C��C�x��U$�#��G��I��"U��$�
%� �"�T��
%�sI�H>�1I�I�I�!I�,AI�!I�%I�>I�I�	I&�%I&�dest�namec��y)z&Always assume the versions don't matchFr)rrvrws   r�is_commit_id_equalzSubversion.is_commit_id_equal�s��rN�use_interactivec�V��|�
t�}||_d|_t�|��y�N)rrz�_vcs_versionr<�__init__)�selfrzr>s  �rr~zSubversion.__init__�s.����"�4�6�O�.���8<���
���r.c�.�d}|jdgdd��}|j|�sy|t|�dj�d}|j	d	�djd
�}	tt
t|��}|S#t$rYywxYw)aQuery the version of the currently installed Subversion client.

        :return: A tuple containing the parts of the version information or
            ``()`` if the version returned from ``svn`` could not be parsed.
        :raises: BadCommand: If ``svn`` is not installed.
        z
svn, version z	--versionFTrYrNr�-�.)	rkr-rcrb�	partition�tupler`rdrg)r�version_prefix�version�version_list�parsed_versions     r�call_vcs_versionzSubversion.call_vcs_version�s���)���"�"�K�=�e�QU�"�V���!�!�.�1���#�n�-�/�0�6�6�8��;���(�(��-�a�0�6�6�s�;��	�"�3�s�L�#9�:�N�����	��	�s�-B�	B�Bc�d�|j�|jS|j�}||_|S)a�Return the version of the currently installed Subversion client.

        If the version of the Subversion client has already been queried,
        a cached value will be used.

        :return: A tuple containing the parts of the version information or
            ``()`` if the version returned from ``svn`` could not be parsed.
        :raises: BadCommand: If ``svn`` is not installed.
        )r}r�)r�vcs_versions  r�get_vcs_versionzSubversion.get_vcs_version�s:�����(��$�$�$��+�+�-��'����rc�T�|jsdgS|j�}|dk\rdgSgS)aCReturn options to be used on calls to Subversion that contact the server.

        These options are applicable for the following ``svn`` subcommands used
        in this class.

            - checkout
            - switch
            - update

        :return: A list of command line arguments to pass to ``svn``.
        z--non-interactive)rW�z--force-interactive)rzr�)r�svn_versions  r�get_remote_call_optionsz"Subversion.get_remote_call_options�s>���#�#�(�(�(��*�*�,���&� �)�*�*��	r�rev_options�	verbosityc���|j�}tjd||t|��|dkrd}nd}t	d||j�|j
�||�}|j|�y)NzChecking out %s%s to %srz--quietrQr)�
to_displayrIrXrrr��to_argsrk)rrvr?r�r��rev_display�flag�cmd_argss        r�	fetch_newzSubversion.fetch_news���"�,�,�.�����%������		
���>��D��D�����(�(�*����!���

��	
����"rc�|�td|j�|j�||�}|j|�y)N�switch�rr�r�rk�rrvr?r�r�s     rr�zSubversion.switch0s=�����(�(�*����!���
��	
����"rc�z�td|j�|j�|�}|j|�y)N�updater�r�s     rr�zSubversion.update:s:�����(�(�*����!��	
��	
����"rr|)$�__name__�
__module__�__qualname__rwr'�	repo_name�schemes�classmethodr/�boolr�staticmethodrr r7rrr=r
rArrrGrNrdr,ryr~r�r�r�rr�r�r��
__classcell__)r>s@rrrsh����D��G��I�I�G���3��4������s��t�C�y������C��C����8�.��.�"%�.�	�s�E�(�3�-��#��6�7�7�	8�.��.��#�s�#�u�S�(�3�-��5Q�/R�#��#��	��3�-�	�+3�J�+?�	�	�	��	���c��c����.�/��/��h�s�m�S�6H�0I�/��/�b��c���#���4���������$���%��S��/��8��s�C�x���(���>#��#�(�#�7A�#�NQ�#�	
�#�0#�3�#�Z�#�j�#�T�#�#�3�#�Z�#�j�#�T�#rr) �loggingr%�re�typingrrr�pip._internal.utils.miscrrrr	r
�pip._internal.utils.subprocessrr� pip._internal.vcs.versioncontrolr
rrrr�	getLoggerr�rI�compilererirmrlr�registerrrr�<module>r�s����	�	�(�(���E���
��	�	�8�	$���"�*�*�_�-���b�j�j�1�2��!�r�z�z�"8�9��!�r�z�z�"4�5��c#��c#�L	
����Z�rpython3.12/site-packages/pip/_internal/vcs/__pycache__/versioncontrol.cpython-312.pyc000064400000070714151732701520024464 0ustar00�

R`iY����dZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZddlmZddlmZmZddlmZmZmZmZmZmZmZm Z ddl!m"Z"m#Z#m$Z$m%Z%ddl&m'Z'erdd	lm(Z(d
gZ)ejTe+�Z,eee-ee-fZ.de-de/fd
�Z0	d de-de-de-dee-de-f
d�Z1de-de-dee-fd�Z2Gd�de3�Z4Gd�de3�Z5Gd�d�Z6Gd�d�Z7e7�Z8Gd�d�Z9y)!z)Handles all VCS (version control) support�N)�
TYPE_CHECKING�Any�Dict�Iterable�Iterator�List�Mapping�Optional�Tuple�Type�Union)�SpinnerInterface)�
BadCommand�InstallationError)�
HiddenText�ask_path_exists�
backup_dir�display_path�hide_url�
hide_value�is_installable_dir�rmtree)�CommandArgs�call_subprocess�format_command_args�make_command)�get_url_scheme)�Literal�vcs�name�returnc�L�t|�}|�y|gd�tjzvS)z3
    Return true if the name looks like a URL.
    F)�http�https�file�ftp)rr�all_schemes)r �schemes  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/vcs/versioncontrol.py�is_urlr*9s+���D�
!�F�
�~���5����G�G�G��repo_url�rev�project_name�subdirc�R�|jdd�}|�d|�d|��}|r|d|��z
}|S)z�
    Return the URL for a VCS requirement.

    Args:
      repo_url: the remote VCS url, with any needed VCS prefix (e.g. "git+").
      project_name: the (unescaped) project name.
    �-�_�@z#egg=z&subdirectory=)�replace)r,r-r.r/�egg_project_name�reqs      r)�make_vcs_requirement_urlr7CsH��$�+�+�C��5��
�J�a��u�E�"2�!3�
4�C�
����x�(�(���Jr+�location�	repo_rootc�0�|}t|�sI|}tjj|�}||k(rtjd|�yt|�s�Itjj
||�rytjj||�S)z�
    Find the the Python project's root by searching up the filesystem from
    `location`. Return the path to project root relative to `repo_root`.
    Return None if the project root is `repo_root`, or cannot be found.
    zOCould not find a Python project for directory %s (tried all parent directories)N)r�os�path�dirname�logger�warning�samefile�relpath)r8r9�
orig_location�
last_locations    r)�(find_path_to_project_root_from_repo_rootrDUs����M� ��*� �
��7�7�?�?�8�,���}�$�
�N�N�&��
�
�!��*�
�w�w���	�8�,��
�7�7�?�?�8�Y�/�/r+c��eZdZy)�RemoteNotFoundErrorN)�__name__�
__module__�__qualname__�r+r)rFrFrs��r+rFc�$��eZdZdef�fd�Z�xZS)�RemoteNotValidError�urlc�2��t�|�|�||_y�N)�super�__init__rM)�selfrM�	__class__s  �r)rQzRemoteNotValidError.__init__ws���
�������r+)rGrHrI�strrQ�
__classcell__�rSs@r)rLrLvs����C��r+rLc	��eZdZdZ		ddeddeedeeddfd�Zdefd	�Z	e
deefd
��Zdefd�Zdefd�Z
deddfd
�Zy)�
RevOptionsz�
    Encapsulates a VCS-specific revision to install, along with any VCS
    install options.

    Instances of this class should be treated as if immutable.
    N�vc_class�VersionControlr-�
extra_argsr!c�D�|�g}||_||_||_d|_y)z�
        Args:
          vc_class: a VersionControl subclass.
          rev: the name of the revision to install.
          extra_args: a list of extra options.
        N)r[r-rY�branch_name)rRrYr-r[s    r)rQzRevOptions.__init__�s,�����J�$������ ��
�*.��r+c�P�d|jj�d|j�d�S)Nz<RevOptions z: rev=�>)rYr r-�rRs r)�__repr__zRevOptions.__repr__�s&���d�m�m�0�0�1�����|�1�E�Er+c�^�|j�|jjS|jSrO)r-rY�default_arg_revr`s r)�arg_revzRevOptions.arg_rev�s%���8�8���=�=�0�0�0��x�x�r+c��g}|j}|�||jj|�z
}||jz
}|S)z<
        Return the VCS-specific command arguments.
        )rdrY�get_base_rev_argsr[)rR�argsr-s   r)�to_argszRevOptions.to_args�sC�����l�l���?��D�M�M�3�3�C�8�8�D��������r+c�<�|jsyd|j�d�S)N�z (to revision �)�r-r`s r)�
to_displayzRevOptions.to_display�s���x�x������z��+�+r+c�P�|jj||j��S)z�
        Make a copy of the current instance, but with a new rev.

        Args:
          rev: the name of the revision for the new object.
        �r[)rY�make_rev_optionsr[)rRr-s  r)�make_newzRevOptions.make_new�s"���}�}�-�-�c�d�o�o�-�N�Nr+�NN)rGrHrI�__doc__rr
rTrrQra�propertyrdrhrmrqrJr+r)rXrX|s����"�,0�	/��'�(�/��c�]�/��[�)�	/�

�/�(F�#�F����#�����
��
�,�C�,�O�C�O�L�Or+rXc���eZdZUiZeedfed<gd�Zd�fd�Zde	efd�Z
ededfd��Z
edeefd	��Zedeefd
��Zdedddfd�Zd
eddfd�Zdededfd�Zdededfd�Zd
ededfd�Z�xZS)�
VcsSupportrZ�	_registry)�ssh�git�hg�bzr�sftp�svnr!Nc���tjjj|j�t
�|��yrO)�urllib�parse�uses_netloc�extend�schemesrPrQ)rRrSs �r)rQzVcsSupport.__init__�s,���	��� � �'�'����5�
���r+c�6�|jj�SrO)rw�__iter__r`s r)r�zVcsSupport.__iter__�s���~�~�&�&�(�(r+c�H�t|jj��SrO)�listrw�valuesr`s r)�backendszVcsSupport.backends�s���D�N�N�)�)�+�,�,r+c�T�|jD�cgc]}|j��c}Scc}wrO)r�r=)rR�backends  r)�dirnameszVcsSupport.dirnames�s"��/3�}�}�=�}�G����}�=�=��=s�%c�b�g}|jD]}|j|j��|SrO)r�r�r�)rRr�r�s   r)r'zVcsSupport.all_schemes�s*�����}�}�G��N�N�7�?�?�+�%��r+�clsc��t|d�s!tjd|j�y|j|j
vr?|�|j
|j<tj
d|j�yy)Nr zCannot register VCS %szRegistered VCS backend: %s)�hasattrr>r?rGr rw�debug)rRr�s  r)�registerzVcsSupport.register�s^���s�F�#��N�N�3�S�\�\�B���8�8�4�>�>�)�'*�u�D�N�N�3�8�8�$��L�L�5�s�x�x�@�*r+r c�<�||jvr|j|=yyrO)rw�rRr s  r)�
unregisterzVcsSupport.unregister�s���4�>�>�!����t�$�"r+r8c���i}|jj�D]<}|j|�}|s�tj	d||j
�|||<�>|syt
|t��}||S)zv
        Return a VersionControl object if a repository of that type is found
        at the given directory.
        zDetermine that %s uses VCS: %sN)�key)rwr��get_repository_rootr>r�r �max�len)rRr8�vcs_backends�vcs_backend�	repo_path�inner_most_repo_paths      r)�get_backend_for_dirzVcsSupport.get_backend_for_dir�sz��
���>�>�0�0�2�K�#�7�7��A�I����L�L�9�8�[�EU�EU�V�&1�L��#�3��� #�<�S�9���0�1�1r+r(c�f�|jj�D]}||jvs�|cSy)�9
        Return a VersionControl object or None.
        N)rwr�r�)rRr(r�s   r)�get_backend_for_schemez!VcsSupport.get_backend_for_scheme�s4�� �>�>�0�0�2�K���,�,�,�"�"�3�r+c�X�|j�}|jj|�S)r�)�lowerrw�getr�s  r)�get_backendzVcsSupport.get_backends$���z�z�|���~�~�!�!�$�'�'r+)r!N)rGrHrIrwrrT�__annotations__r�rQrr�rtrr�r�r'rr�r�r
r�r�r�rUrVs@r)rvrv�s���-/�I�t�C�)�)�*�/�8�G��)�(�3�-�)��-�$�/�0�-��-��>�$�s�)�>��>���T�#�Y����A�D�!1�2�A�t�A�%�s�%�t�%�2�C�2�H�=M�4N�2�.�S��X�>N�5O��(��(��1A�(B�(r+rvc���eZdZUdZdZdZdZeedfe	d<dZ
eedfe	d<dZeee	d<e
ded	efd
��Ze
ded	eefd��Ze
d
ed	efd��Ze
d
eded	efd��Zeded	eefd��Zdeded	efd�Ze
	d@deedeed	efd��Ze
ded	efd��Ze
deded	eeeeeeefffd��Ze
ded	eeeeeffd��Zedeedeed	efd ��Zded	eeeffd!�Z eded	efd"��Z!e
d#ed$ed	efd%��Z"deded&ed'e#d	df
d(�Z$deded&ed	dfd)�Z%deded&ed	dfd*�Z&e
ded+eed	efd,��Z'deded'e#d	dfd-�Z(deded'e#d	dfd.�Z)e
ded	efd/��Z*e
ded	efd0��Z+e
									dAd1e,eeefd2ed3eed4d5d6ee-e#d7eed8ee.ee/fd9ee0d:ed;ed	efd<��Z1e
d=ed	efd>��Z2e
ded	eefd?��Z3y)BrZrjrJ.r��
unset_environNrc�
remote_urlr!c�\�|j�j|j�d��S)z�
        Return whether the vcs prefix (e.g. "git+") should be added to a
        repository's remote url when used in a requirement.
        �:)r��
startswithr )r�r�s  r)�should_add_vcs_url_prefixz(VersionControl.should_add_vcs_url_prefixs+���#�#�%�0�0�C�H�H�:�Q��@�@�@r+r8c��y)z�
        Return the path to Python project root, relative to the repo root.
        Return None if the project root is in the repo root.
        NrJ�r�r8s  r)�get_subdirectoryzVersionControl.get_subdirectory$s��r+�repo_dirc�$�|j|�S)zR
        Return the revision string that should be used in a requirement.
        )�get_revision)r�r�s  r)�get_requirement_revisionz'VersionControl.get_requirement_revision,s��
����)�)r+r.c���|j|�}|j|�r|j�d|��}|j|�}|j	|�}t||||��}|S)aC
        Return the requirement string to use to redownload the files
        currently at the given repository directory.

        Args:
          project_name: the (unescaped) project name.

        The return value has a form similar to the following:

            {repository_url}@{revision}#egg={project_name}
        �+)r/)�get_remote_urlr�r r�r�r7)r�r�r.r,�revisionr/r6s       r)�get_src_requirementz"VersionControl.get_src_requirement3sl���%�%�h�/���(�(��2��(�(��1�X�J�/�H��/�/��9���%�%�h�/��&�x��<�PV�W���
r+r-c��t�)z�
        Return the base revision arguments for a vcs command.

        Args:
          rev: the name of a revision to install.  Cannot be None.
        ��NotImplementedErrorrls r)rfz VersionControl.get_base_rev_argsK�
��"�!r+rM�destc��y)aZ
        Return true if the commit hash checked out at dest matches
        the revision in url.

        Always return False, if the VCS does not support immutable commit
        hashes.

        This method does not check if there are local uncommitted changes
        in dest after checkout, as pip currently has no use case for that.
        FrJ)rRrMr�s   r)�is_immutable_rev_checkoutz(VersionControl.is_immutable_rev_checkoutUs��r+r[c��t|||��S)z�
        Return a RevOptions object.

        Args:
          rev: the name of a revision to install.
          extra_args: a list of extra options.
        ro)rX)r�r-r[s   r)rpzVersionControl.make_rev_optionsbs���#�s�z�:�:r+�repoc��tjj|�\}}|jtjj�xst|�S)zs
        posix absolute paths start with os.path.sep,
        win32 ones start with drive (like c:\folder)
        )r;r<�
splitdriver��sep�bool)r�r��drive�tails    r)�_is_local_repositoryz#VersionControl._is_local_repositoryos<���g�g�(�(��.���t����r�w�w�{�{�+�:�t�E�{�:r+�netlocr(c�
�|dfS)aZ
        Parse the repository URL's netloc, and return the new netloc to use
        along with auth information.

        Args:
          netloc: the original repository URL netloc.
          scheme: the repository URL's scheme without the vcs prefix.

        This is mainly for the Subversion class to override, so that auth
        information can be provided via the --username and --password options
        instead of through the URL.  For other subclasses like Git without
        such an option, auth information must stay in the URL.

        Returns: (netloc, (username, password)).
        rrrJ)r�r�r(s   r)�get_netloc_and_authz"VersionControl.get_netloc_and_authxs��&�|�#�#r+c��tjj|�\}}}}}d|vrtdj	|���|jdd�d}|j
||�\}}d}d|vr1|jdd�\}}|stdj	|���tjj||||df�}|||fS)z�
        Parse the repository URL to use, and return the URL, revision,
        and auth info to use.

        Returns: (url, rev, (username, password)).
        r�zvSorry, {!r} is a malformed VCS url. The format is <vcs>+<protocol>://<url>, e.g. svn+http://myrepo/svn/MyApp#egg=MyApp�Nr3zyThe URL {!r} has an empty revision (after @) which is not supported. Include a revision after @ or remove @ from the URL.rj)
rr��urlsplit�
ValueError�format�splitr��rsplitr�
urlunsplit)	r�rMr(r�r<�query�frag�	user_passr-s	         r)�get_url_rev_and_authz#VersionControl.get_url_rev_and_auth�s���-3�L�L�,A�,A�#�,F�)����e�T��f���=�=C�V�C�[��
����c�1�%�a�(���3�3�F�F�C���	����$�;����C��+�I�D�#��'�0�06��s����
�l�l�%�%�v�v�t�U�B�&G�H���C��"�"r+�username�passwordc��gS)zM
        Return the RevOptions "extra arguments" to use in obtain().
        rJ)r�r�s  r)�
make_rev_argszVersionControl.make_rev_args�s	���	r+c���|j|j�\}}}|\}}d}|�t|�}|j||�}|j	||��}	t|�|	fS)zq
        Return the URL and RevOptions object to use in obtain(),
        as a tuple (url, rev_options).
        Nro)r��secretrr�rpr)
rRrM�
secret_urlr-r�r��secret_passwordr�r[�rev_optionss
          r)�get_url_rev_optionsz"VersionControl.get_url_rev_options�su��
&*�%>�%>�s�z�z�%J�"�
�C��$-�!��/�)-���&�!�/�2�H��'�'��(�;�
��+�+�C�J�+�G���
�#�[�0�0r+c�^�tjj|�jd�S)zi
        Normalize a URL for comparison by unquoting it and removing any
        trailing slash.
        �/)rr��unquote�rstrip)rMs r)�
normalize_urlzVersionControl.normalize_url�s$���|�|�#�#�C�(�/�/��4�4r+�url1�url2c�H�|j|�|j|�k(S)zV
        Compare two repo URLs for identity, ignoring incidental differences.
        )r�)r�r�r�s   r)�compare_urlszVersionControl.compare_urls�s%��
� � ��&�#�*;�*;�D�*A�A�Ar+r��	verbosityc��t�)a
        Fetch a revision from a repository, in the case that this is the
        first fetch from the repository.

        Args:
          dest: the directory to fetch the repository to.
          rev_options: a RevOptions object.
          verbosity: verbosity level.
        r�)rRr�rMr�r�s     r)�	fetch_newzVersionControl.fetch_new�s
��"�!r+c��t�)z}
        Switch the repo at ``dest`` to point to ``URL``.

        Args:
          rev_options: a RevOptions object.
        r��rRr�rMr�s    r)�switchzVersionControl.switch��
��"�!r+c��t�)z�
        Update an already-existing repo to the given ``rev_options``.

        Args:
          rev_options: a RevOptions object.
        r�r�s    r)�updatezVersionControl.update�r�r+r c��t�)z�
        Return whether the id of the current commit equals the given name.

        Args:
          dest: the repository directory.
          name: a string name.
        r�)r�r�r s   r)�is_commit_id_equalz!VersionControl.is_commit_id_equal�s
��"�!r+c���|j|�\}}tjj|�s|j	||||��y|j�}|j
|��r|j|�}|j||j�r�tjd|jj�t|�|�|j||j �s?tj#dt|�|j|�|j%|||�ytj#d�ytj'd|j(|jt|�|�d}n.tj'd||j(|j�d	}tj'd
|j(|�t+dj-|d�|d
�}|dk(rt/j0d�|dk(r@tj'dt|��t3|�|j	||||��y|dk(rWt5|�}	tj'dt|�|	�t7j8||	�|j	||||��y|dk(r@tj#d|jt|�||�|j;|||�yy)a/
        Install or update in editable mode the package represented by this
        VersionControl object.

        :param dest: the repository directory in which to install or update.
        :param url: the repository URL starting with a vcs prefix.
        :param verbosity: verbosity level.
        )r�Nz)%s in %s exists, and has correct URL (%s)zUpdating %s %s%sz$Skipping because already up-to-date.z%s %s in %s exists with URL %s)z%(s)witch, (i)gnore, (w)ipe, (b)ackup )�s�i�w�bz0Directory %s already exists, and is not a %s %s.)z(i)gnore, (w)ipe, (b)ackup )r�r�r�z+The plan is to install the %s repository %szWhat to do?  {}rr��a���r�zDeleting %sr�zBacking up %s to %sr�zSwitching %s %s to %s%s)r�r;r<�existsr�rm�is_repository_directoryr�r�r�r>r��	repo_name�titlerr�r-�infor�r?r rr��sys�exitrr�shutil�mover�)
rRr�rMr�r��rev_display�existing_url�prompt�response�dest_dirs
          r)�obtainzVersionControl.obtain�sw�� �3�3�C�8���[��w�w�~�~�d�#��N�N�4��k�Y�N�G��!�,�,�.���'�'��-��.�.�t�4�L�� � ��s�z�z�:����?��N�N�(�(�*� ��&��	��.�.�t�[�_�_�E��K�K�*�$�T�*����#�	��K�K��c�;�7���K�K� F�G���N�N�0��	�	�����T�"��
�U�F��N�N�B���	�	����	
�F�F����9��I�I��	
�
#�#4�#;�#;�F�1�I�#F��q�	�R���s�?��H�H�R�L��s�?��N�N�=�,�t�*<�=��4�L��N�N�4��k�Y�N�G���s�?�!�$�'�H��N�N�0�,�t�2D�h�O��K�K��h�'��N�N�4��k�Y�N�G���s�?��K�K�)�����T�"���
�
�K�K��c�;�/�r+c��tjj|�rt|�|j	|||��y)z�
        Clean up current location and download the url repository
        (and vcs infos) into location

        :param url: the repository URL starting with a vcs prefix.
        :param verbosity: verbosity level.
        )rMr�N)r;r<r�rr
)rRr8rMr�s    r)�unpackzVersionControl.unpackVs.���7�7�>�>�(�#��8�����H�#���;r+c��t�)z�
        Return the url used at location

        Raises RemoteNotFoundError if the repository does not have a remote
        url configured.
        r�r�s  r)r�zVersionControl.get_remote_urlbr�r+c��t�)zR
        Return the current commit id of the files at the given location.
        r�r�s  r)r�zVersionControl.get_revisionls
��
"�!r+�cmd�show_stdout�cwd�
on_returncodez"Literal["raise", "warn", "ignore"]�extra_ok_returncodes�command_desc�
extra_environ�spinner�log_failed_cmd�stdout_onlyc
�2�t|jg|���}|�t|�}	t||||||||j||	|
��S#t
$r't
d|j�d|j�d���t$rt
d|j�d���wxYw)z�
        Run a VCS subcommand
        This is simply a wrapper around call_subprocess that adds the VCS
        command name, and checks that the VCS is available
        )rrrrr�rrrzCannot find command z - do you have z installed and in your PATH?zNo permission to execute z� - install it locally, globally (ask admin), or check your PATH. See possible solutions at https://pip.pypa.io/en/latest/reference/pip_freeze/#fixing-permission-denied.)rr rrr��FileNotFoundErrorr�PermissionError)r�rrrrrrrrrrs           r)�run_commandzVersionControl.run_commandss���&�3�8�8�*�c�*����.�s�3�L� 	�"����+�%9�)�+�!�/�/��-�'��
��!�	��&�s�x�x�l�/��8�8�,�:�<��
��	�
�+�C�H�H�<�8-�.��
�	�s�A�ABr<c���tjd||j|j�tj
j
tj
j||j��S)zL
        Return whether a directory path is a repository directory.
        zChecking in %s for %s (%s)...)r>r�r=r r;r<r��join)r�r<s  r)rz&VersionControl.is_repository_directory�sE��
	���4�d�C�K�K����R��w�w�~�~�b�g�g�l�l�4����=�>�>r+c�*�|j|�r|Sy)ay
        Return the "root" (top-level) directory controlled by the vcs,
        or `None` if the directory is not in any.

        It is meant to be overridden to implement smarter detection
        mechanisms for specific vcs.

        This can do more than is_repository_directory() alone. For
        example, the Git override checks that Git is actually available.
        N)rr�s  r)r�z"VersionControl.get_repository_root�s���&�&�x�0��O�r+rr)	TN�raiseNNNNTF)4rGrHrIr r=rr�rrTr�r�rcr
�classmethodr�r�r�r�r��staticmethodrrfr�rrXrpr�r��AuthInfor�rr�r�r�r��intr�r�r�r�r
rr�r�r
rr	rrrrr�rJr+r)rZrZs���
�D��G��I�!�G�U�3��8�_�!�%'�M�5��c��?�'�%)�O�X�c�]�)��A�3�A�4�A��A�������
�����*��*��*��*���3��c��c����.�"�s�"�t�C�y�"��"��S�������LP�
;��3�-�
;�4<�[�4I�
;�	�
;��
;��;��;��;��;��$��$�"%�$�	�s�E�(�3�-��#��6�7�7�	8�$��$�(�#�s�#�u�S�(�3�-��5Q�/R�#��#�:���3�-��+3�J�+?��	����
1�z�
1�e�J�
�<R�6S�
1��5�3�5�3�5��5��B��B�3�B�4�B��B�"��"�(�"�7A�"�NQ�"�	
�"�"�3�"�Z�"�j�"�T�"�"�3�"�Z�"�j�"�T�"��"�c�"��#��"�4�"��"�W0�3�W0�Z�W0�C�W0�D�W0�r
<�s�
<��
<��
<��
<��"�c�"�c�"��"��"�C�"�C�"��"��!�!�>E�8<�&*�59�.2�#�!�5�
�4��9�k�)�
*�5��5��c�]�	5�
<�5�'�x��}�5�
5��s�m�5� ���S�� 1�2�5��*�+�5��5��5�

�5��5�n�?�3�?�4�?��?��
�3�
�8�C�=�
��
r+rZrO):rs�loggingr;rr�urllib.parser�typingrrrrrrr	r
rrr
�pip._internal.cli.spinnersr�pip._internal.exceptionsrr�pip._internal.utils.miscrrrrrrrr�pip._internal.utils.subprocessrrrr�pip._internal.utils.urlsrr�__all__�	getLoggerrGr>rTr&r�r*r7rD�	ExceptionrFrLrXrvrrZrJr+r)�<module>r3sE��/��	�
�
������8�B�	�	�	���4����'��
��	�	�8�	$����#����
�-�.��H��H��H�IM������+.��8@��
����$0��0�!�0�
�c�]�0�:	�)�	��)��@O�@O�FM(�M(�`�l��o�or+python3.12/site-packages/pip/_internal/vcs/__pycache__/git.cpython-312.pyc000064400000045125151732701520022157 0ustar00�

R`i�F����ddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZddlm
Z
mZddlmZmZmZddlmZddlmZmZmZmZmZmZmZej:j<Zej:j>Zej@e!�Z"ejFd�Z$ejFd�Z%ejFd	ejL�Z'd
e(de)fd�Z*Gd
�de�Z+ejXe+�y)�N)�List�Optional�Tuple)�
BadCommand�InstallationError)�
HiddenText�display_path�hide_url)�make_command)�AuthInfo�RemoteNotFoundError�RemoteNotValidError�
RevOptions�VersionControl�(find_path_to_project_root_from_repo_root�vcsz(^git version (\d+)\.(\d+)(?:\.(\d+))?.*$z^[a-fA-F0-9]{40}$a/^
    # Optional user, e.g. 'git@'
    (\w+@)?
    # Server, e.g. 'github.com'.
    ([^/:]+):
    # The server-side path. e.g. 'user/project.git'. Must start with an
    # alphanumeric character so as not to be confusable with a Windows paths
    # like 'C:/foo/bar' or 'C:\foo\bar'.
    (\w[^:]*)
    $�sha�returnc�>�ttj|��S�N)�bool�
HASH_REGEX�match)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/vcs/git.py�looks_like_hashr7s���
� � ��%�&�&�c
���eZdZdZdZdZdZdZdZe	de
dee
fd	��Zd
e
de
de
fd�Zdeed
ffd�Zede
dee
fd��Zede
de
deee
e
ffd��Zede
de
de
fd��Zede
d
ededefd��Zede
dee
de
fd��Zde
d
edededdf
d�Zde
d
ededdfd�Zde
d
ededdfd�Zede
de
fd��Ze	d
e
de
fd��Zede
de
de
fd��Z ed&de
dee
de
fd��Z!ede
dee
fd ��Z"ed
e
dee
ee
e#ff�fd!��Z$ede
ddfd"��Z%ede
dee
f�fd#��Z&e	d$e
de
fd%��Z'�xZ(S)'�Git�gitz.git�clone)zgit+httpz	git+httpszgit+sshzgit+gitzgit+file)�GIT_DIR�
GIT_WORK_TREE�HEAD�revrc��|gSr��r$s r�get_base_rev_argszGit.get_base_rev_argsKs	���u�r�url�destc���|jt|��\}}|jsy|j||j�syt	|j||j�d�}|S)NFr)�get_url_rev_optionsr
r$�is_commit_id_equalr�get_revision_sha)�selfr)r*�_�rev_options�is_tag_or_branchs      r�is_immutable_rev_checkoutzGit.is_immutable_rev_checkoutOsi���1�1�(�3�-�@���;������&�&�t�[�_�_�=�� �� 5� 5�d�K�O�O� L�Q� O�P��#�#�#r.c���|jdgddd��}tj|�}|stj	d|�yt|j
d��t|j
d	��fS)
N�versionzgit versionFT)�command_desc�show_stdout�stdout_onlyzCan't parse git version: %sr&��)�run_command�GIT_VERSION_REGEXr�logger�warning�int�group)r/r5rs   r�get_git_versionzGit.get_git_version]sq���"�"�
�K�&���	#�
��"�'�'��0����N�N�8�'�B���E�K�K��N�#�S����Q��%8�9�9r�locationc��gd�}|j|ddd|��}|j�}|jd�r|td�dSy)zl
        Return the current branch, or None if HEAD isn't at a branch
        (e.g. detached HEAD).
        )zsymbolic-ref�-qr#�r9FT��extra_ok_returncodesr7r8�cwdzrefs/heads/N)r;�strip�
startswith�len)�clsrB�args�output�refs     r�get_current_branchzGit.get_current_branchjsZ��.������!%����!�
���l�l�n���>�>�-�(��s�=�)�+�,�,�rc��|jd|g|ddd��}i}|j�jd�D]2}|jd�}|s�	|jdd	�
�\}}|||<�4d|��}d
|��}	|j|�}
|
�|
dfS|j|	�}
|
dfS#t$rt	d|����wxYw)z�
        Return (sha_or_none, is_branch), where sha_or_none is a commit hash
        if the revision names a remote branch or tag, otherwise None.

        Args:
          dest: the repository directory.
          rev: the revision name.
        zshow-refFT�ignore)rHr7r8�
on_returncode�
�
� r:)�maxsplitzunexpected show-ref line: zrefs/remotes/origin/z
refs/tags/)r;rI�split�rstrip�
ValueError�get)rLr*r$rN�refs�line�ref_sha�ref_name�
branch_ref�tag_refrs           rr.zGit.get_revision_sha�s�����
������"�!�
�����L�L�N�(�(��.�D��;�;�t�$�D���
H�$(�J�J�s�Q�J�$?�!���%�D��N�/�,�C�5�1�
��s�e�$���h�h�z�"���?���;���h�h�w����U�|���!�
H�!�#=�d�X�!F�G�G�
H�s�B%�%B=c�f�|jd�ryt|�sy|j||�ryy)a$
        Return true if rev is a ref or is a commit that we don't have locally.

        Branches and tags are not considered in this method because they are
        assumed to be always available locally (which is a normal outcome of
        ``git clone`` and ``git fetch --tags``).
        zrefs/TF)rJr�
has_commit)rLr*r$s   r�
_should_fetchzGit._should_fetch�s2���>�>�'�"���s�#���>�>�$��$��rr1c	��|j}|�J�|j||�\}}|�%|j|�}|r	||_|Sd|_|St	|�st
j
d|�|j||�s|S|jtdd||j��|��|j|d��}|j|�}|S)z�
        Resolve a revision to a new RevOptions object with the SHA1 of the
        branch, tag, or ref if found.

        Args:
          rev_options: a RevOptions object.
        Nz:Did not find branch or tag '%s', assuming revision or ref.�fetchrD�rH�
FETCH_HEADr')�arg_revr.�make_new�branch_namerr=r>rdr;r�to_args�get_revision)rLr*r)r1r$r�	is_branchs       r�resolve_revisionzGit.resolve_revision�s����!�!�������-�-�d�C�8���Y��?�%�.�.�s�3�K�-6�c�K�#���=A�K�#����s�#��N�N�L��
�
� � ��s�+���	�����$��[�-@�-@�-B�C��	�	
�
���t���6��!�*�*�3�/���r�namec�0�|sy|j|�|k(S)z�
        Return whether the current commit hash equals the given name.

        Args:
          dest: the repository directory.
          name: a string name.
        F)rm)rLr*rps   rr-zGit.is_commit_id_equal�s ��������%��-�-r�	verbosityNc�`�|j�}tjd||t|��|dkrd}n
|dk(rd}nd}|j	�dk\r!|jt
dd	g|�|�|����n|jt
dg|�|�|����|jr�|j|||�}t|d
d�}tjd||�|�K|j||j�s�t
dd
|j��}|j||��nV|j|�|k7rBd|��}	dd|d|	g}|j||��n"|j|�}
|j|
�}tjd||j�|j!|�y)NzCloning %s%s to %sr)z--quietr9r&)z	--verbosez
--progress)r:�r z--filter=blob:nonerkzRev options %s, branch_name %s�checkoutrDrgzorigin/z-bz--trackzResolved %s to commit %s)�
to_displayr=�infor	rAr;rr$ro�getattr�debugr-rlrPrmrj�update_submodules)r/r*r)r1rr�rev_display�flagsrk�cmd_args�track_branchrs           r�	fetch_newz
Git.fetch_news���"�,�,�.�����(�#�{�L��<N�O���>�%1�E�
�!�^��E�/�E����!�W�,�
�����(�����	�
��
�
���\�'�E�E�E�3�E��E�F��?�?��/�/��c�;�G�K�!�+�}�d�C�K��L�L�9�;��T��"��.�.�t�[�_�_�E�+�"��#�+�+�-� �H�
�$�$�X�4�$�8��(�(��.�+�=�")��
�6������ ���� � ��t� �4��#�#�D�)�C�%�.�.�s�3�K����.��[�_�_�E�	
���t�$rc��|jtdd|�|��tdd|j��}|j||��|j|�y)N�configzremote.origin.urlrgrurD)r;rrlrz�r/r*r)r1r}s     r�switchz
Git.switchDs_�������#6��<��	�	
� �
�D�+�2E�2E�2G�H������t��,����t�$rc�&�|j�dk\r|jgd�|��n|jddg|��|j|||�}tddd|j	��}|j||��|j|�y)N)r9�	)rfrDz--tagsrgrfrD�resetz--hard)rAr;rorrlrzr�s     r�updatez
Git.updateNs������!�V�+����6�D��A����g�t�_�$��7��+�+�D�#�{�C�����4��9L�9L�9N�O������t��,����t�$rc�"�|jgd�ddd|��}|j�}	|d}|D]}|j	d�s�|}n|jd�d	}|j
|j��S#t$rt�wxYw)
z�
        Return URL of the first remote encountered.

        Raises RemoteNotFoundError if the repository does not have a remote
        url configured.
        )r�z--get-regexpzremote\..*\.urlrEFTrFrzremote.origin.url rVr9)r;�
splitlines�
IndexErrorr
rJrX�_git_remote_to_pip_urlrI)rLrB�stdout�remotes�found_remote�remoter)s       r�get_remote_urlzGit.get_remote_url\s������:�!%����!�
���#�#�%��	&�"�1�:�L��F�� � �!5�6�%����� � ��%�a�(���)�)�#�)�)�+�6�6���	&�%�%�	&�s�A>�>Bc��tjd|�r|Stjj	|�r#tj|�j�Stj|�}|r|jd�St|��)a8
        Convert a remote url from what git uses to what pip accepts.

        There are 3 legal forms **url** may take:

            1. A fully qualified url: ssh://git@example.com/foo/bar.git
            2. A local project.git folder: /path/to/bare/repository.git
            3. SCP shorthand for form 1: git@example.com:foo/bar.git

        Form 1 is output as-is. Form 2 must be converted to URI and form 3 must
        be converted to form 1.

        See the corresponding test test_git_remote_url_to_pip() for examples of
        sample inputs/outputs.
        z\w+://z
ssh://\1\2/\3)�rer�os�path�exists�pathlib�PurePath�as_uri�	SCP_REGEX�expandr)r)�	scp_matchs  rr�zGit._git_remote_to_pip_urlzsq��"�8�8�I�s�#��J�
�7�7�>�>�#���#�#�C�(�/�/�1�1��O�O�C�(�	���#�#�$4�5�5�!�#�&�&rc�Z�	|jdddd|zg|d��y#t$rYywxYw)zU
        Check if rev is a commit that is available in the local repository.
        �	rev-parserDz--verifyzsha^F)rH�log_failed_cmdT)r;r)rLrBr$s   rrczGit.has_commit�sG��
		��O�O��d�J����=��$�
�
���!�	��	�s��	*�*c�X�|�d}|jd|gdd|��}|j�S)Nr#r�FT�r7r8rH)r;rI)rLrBr$�current_revs    rrmzGit.get_revision�sA���;��C��o�o�
�#�����	&�
��� � �"�"rc�\�|jddgdd|��j�}tjj	|�s tjj||�}tjj
tjj|d��}t||�S)z�
        Return the path to Python project root, relative to the repo root.
        Return None if the project root is in the repo root.
        r�z	--git-dirFTr�z..)r;rIr�r��isabs�join�abspathr)rLrB�git_dir�	repo_roots    r�get_subdirectoryzGit.get_subdirectory�s����/�/�
�+�&����	"�
�
�%�'�	��w�w�}�}�W�%��g�g�l�l�8�W�5�G��G�G�O�O�B�G�G�L�L��$�$?�@�	�7��)�L�Lrc���t|�\}}}}}|jd�r�|dt|jd��}|tj
j
|�jdd�jd�z}|jd�dz}	|d|	t||	d||||f�z}d|vr>d|vsJ�|jd	d
�}t�|�-|�\}}
}|jdd�}nt�|�-|�\}}
}||
|fS)
a9
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes don't
        work with a ssh:// scheme (e.g. GitHub). But we need a scheme for
        parsing. Hence we remove it again afterwards and return it as a stub.
        �fileN�/�\�+r9z://zfile:zgit+z
git+ssh://zssh://�)�urlsplit�endswithrK�lstrip�urllib�request�url2pathname�replace�find�
urlunsplit�super�get_url_rev_and_auth)
rLr)�scheme�netlocr��query�fragment�initial_slashes�newpath�
after_plusr$�	user_pass�	__class__s
            �rr�zGit.get_url_rev_and_auth�s*���19��
�-����e�X��?�?�6�"�"�#;�c�$�+�+�c�*:�&;�%;�<�O�%����(C�(C�D�(I�(Q�(Q��c�)��f�S�k��G� ���S�)�A�-�J���*�%�
��
��$�f�g�u�h�G�)��C�����#�%�%�%��+�+�f�l�3�C�"'�'�">�s�"C��C��i��+�+�h��+�C�"'�'�">�s�"C��C��i��C��"�"rc��tjjtjj|d��sy|j	gd�|��y)Nz.gitmodules)�	submoduler�z--initz--recursiverDrg)r�r�r�r�r;)rLrBs  rrzzGit.update_submodules�s;���w�w�~�~�b�g�g�l�l�8�]�C�D�����B��	�	
rc���t�|�|�}|r|S	|jddg|dddd��}tjj|jd��S#t$rtjd|�Yyt$rYywxYw)	Nr�z--show-toplevelFT�raise)rHr7r8rSr�zKcould not determine if %s is under git control because git is not availablez
)r��get_repository_rootr;rr=ryrr�r��normpathrY)rLrB�loc�rr�s    �rr�zGit.get_repository_root�s�����g�)�(�3����J�	�����/�0��!� �%�$�
 ��A�"�w�w������� 0�1�1���	��L�L�/��
�
� �	��	�s�A�B	�>B	�B	�repo_urlc��y)zEIn either https or ssh form, requirements must be prefixed with git+.Tr&)r�s r�should_add_vcs_url_prefixzGit.should_add_vcs_url_prefixs��rr))�__name__�
__module__�__qualname__rp�dirname�	repo_name�schemes�
unset_environ�default_arg_rev�staticmethod�strrr(rr3rr?rA�classmethodrrPr.rdrrror-rr�r�r�r�rcrmr�rr�rzr�r��
__classcell__)r�s@rrr;s0����D��G��I��G�1�M��O���s��t�C�y����$�S�$��$��$�:��s�C�x��:���#��(�3�-����0�+�C�+�c�+�e�H�S�M�4�<O�6P�+��+�Z����3��4����,�+��+�'�+�6@�+�	�+��+�Z�.�c�.��#��.�4�.��.�=%��=%�(�=%�7A�=%�NQ�=%�	
�=%�~%�3�%�Z�%�j�%�T�%�%�3�%�Z�%�j�%�T�%��7�c�7�c�7��7�:�'�C�'�C�'��'�<�
�#�
�C�
�D�
��
��	#�C�	#�h�s�m�	#�s�	#��	#��M��M���
�M��M�"�#�s�#�u�S�(�3�-��5Q�/R�#��#�<�
��
��
��
��2�3�2�8�C�=�2��2�0��C��D���rr)-�logging�os.pathr�r�r��urllib.parser��urllib.request�typingrrr�pip._internal.exceptionsrr�pip._internal.utils.miscrr	r
�pip._internal.utils.subprocessr� pip._internal.vcs.versioncontrolrr
rrrrr�parser�r��	getLoggerr�r=�compiler<r�VERBOSEr�r�rrr�registerr&rr�<module>r�s������	���(�(�B�G�G�7�����<�<� � ��
�\�\�
$�
$�
�
��	�	�8�	$���B�J�J�����R�Z�Z�+�
,�
�
�B�J�J�		��J�J�
�	�'��'��'�P�.�P�f
����S�rpython3.12/site-packages/pip/_internal/vcs/__init__.py000064400000001124151732701520016561 0ustar00# Expose a limited set of classes and functions so callers outside of
# the vcs package don't need to import deeper than `pip._internal.vcs`.
# (The test directory may still need to import from a vcs sub-package.)
# Import all vcs modules to register each VCS in the VcsSupport object.
import pip._internal.vcs.bazaar
import pip._internal.vcs.git
import pip._internal.vcs.mercurial
import pip._internal.vcs.subversion  # noqa: F401
from pip._internal.vcs.versioncontrol import (  # noqa: F401
    RemoteNotFoundError,
    RemoteNotValidError,
    is_url,
    make_vcs_requirement_url,
    vcs,
)
python3.12/site-packages/pip/_internal/vcs/mercurial.py000064400000012176151732701520017016 0ustar00import configparser
import logging
import os
from typing import List, Optional, Tuple

from pip._internal.exceptions import BadCommand, InstallationError
from pip._internal.utils.misc import HiddenText, display_path
from pip._internal.utils.subprocess import make_command
from pip._internal.utils.urls import path_to_url
from pip._internal.vcs.versioncontrol import (
    RevOptions,
    VersionControl,
    find_path_to_project_root_from_repo_root,
    vcs,
)

logger = logging.getLogger(__name__)


class Mercurial(VersionControl):
    name = "hg"
    dirname = ".hg"
    repo_name = "clone"
    schemes = (
        "hg+file",
        "hg+http",
        "hg+https",
        "hg+ssh",
        "hg+static-http",
    )

    @staticmethod
    def get_base_rev_args(rev: str) -> List[str]:
        return [f"-r={rev}"]

    def fetch_new(
        self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int
    ) -> None:
        rev_display = rev_options.to_display()
        logger.info(
            "Cloning hg %s%s to %s",
            url,
            rev_display,
            display_path(dest),
        )
        if verbosity <= 0:
            flags: Tuple[str, ...] = ("--quiet",)
        elif verbosity == 1:
            flags = ()
        elif verbosity == 2:
            flags = ("--verbose",)
        else:
            flags = ("--verbose", "--debug")
        self.run_command(make_command("clone", "--noupdate", *flags, url, dest))
        self.run_command(
            make_command("update", *flags, rev_options.to_args()),
            cwd=dest,
        )

    def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        repo_config = os.path.join(dest, self.dirname, "hgrc")
        config = configparser.RawConfigParser()
        try:
            config.read(repo_config)
            config.set("paths", "default", url.secret)
            with open(repo_config, "w") as config_file:
                config.write(config_file)
        except (OSError, configparser.NoSectionError) as exc:
            logger.warning("Could not switch Mercurial repository to %s: %s", url, exc)
        else:
            cmd_args = make_command("update", "-q", rev_options.to_args())
            self.run_command(cmd_args, cwd=dest)

    def update(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        self.run_command(["pull", "-q"], cwd=dest)
        cmd_args = make_command("update", "-q", rev_options.to_args())
        self.run_command(cmd_args, cwd=dest)

    @classmethod
    def get_remote_url(cls, location: str) -> str:
        url = cls.run_command(
            ["showconfig", "paths.default"],
            show_stdout=False,
            stdout_only=True,
            cwd=location,
        ).strip()
        if cls._is_local_repository(url):
            url = path_to_url(url)
        return url.strip()

    @classmethod
    def get_revision(cls, location: str) -> str:
        """
        Return the repository-local changeset revision number, as an integer.
        """
        current_revision = cls.run_command(
            ["parents", "--template={rev}"],
            show_stdout=False,
            stdout_only=True,
            cwd=location,
        ).strip()
        return current_revision

    @classmethod
    def get_requirement_revision(cls, location: str) -> str:
        """
        Return the changeset identification hash, as a 40-character
        hexadecimal string
        """
        current_rev_hash = cls.run_command(
            ["parents", "--template={node}"],
            show_stdout=False,
            stdout_only=True,
            cwd=location,
        ).strip()
        return current_rev_hash

    @classmethod
    def is_commit_id_equal(cls, dest: str, name: Optional[str]) -> bool:
        """Always assume the versions don't match"""
        return False

    @classmethod
    def get_subdirectory(cls, location: str) -> Optional[str]:
        """
        Return the path to Python project root, relative to the repo root.
        Return None if the project root is in the repo root.
        """
        # find the repo root
        repo_root = cls.run_command(
            ["root"], show_stdout=False, stdout_only=True, cwd=location
        ).strip()
        if not os.path.isabs(repo_root):
            repo_root = os.path.abspath(os.path.join(location, repo_root))
        return find_path_to_project_root_from_repo_root(location, repo_root)

    @classmethod
    def get_repository_root(cls, location: str) -> Optional[str]:
        loc = super().get_repository_root(location)
        if loc:
            return loc
        try:
            r = cls.run_command(
                ["root"],
                cwd=location,
                show_stdout=False,
                stdout_only=True,
                on_returncode="raise",
                log_failed_cmd=False,
            )
        except BadCommand:
            logger.debug(
                "could not determine if %s is under hg control "
                "because hg is not available",
                location,
            )
            return None
        except InstallationError:
            return None
        return os.path.normpath(r.rstrip("\r\n"))


vcs.register(Mercurial)
python3.12/site-packages/pip/_internal/vcs/git.py000064400000043311151732701520015611 0ustar00import logging
import os.path
import pathlib
import re
import urllib.parse
import urllib.request
from typing import List, Optional, Tuple

from pip._internal.exceptions import BadCommand, InstallationError
from pip._internal.utils.misc import HiddenText, display_path, hide_url
from pip._internal.utils.subprocess import make_command
from pip._internal.vcs.versioncontrol import (
    AuthInfo,
    RemoteNotFoundError,
    RemoteNotValidError,
    RevOptions,
    VersionControl,
    find_path_to_project_root_from_repo_root,
    vcs,
)

urlsplit = urllib.parse.urlsplit
urlunsplit = urllib.parse.urlunsplit


logger = logging.getLogger(__name__)


GIT_VERSION_REGEX = re.compile(
    r"^git version "  # Prefix.
    r"(\d+)"  # Major.
    r"\.(\d+)"  # Dot, minor.
    r"(?:\.(\d+))?"  # Optional dot, patch.
    r".*$"  # Suffix, including any pre- and post-release segments we don't care about.
)

HASH_REGEX = re.compile("^[a-fA-F0-9]{40}$")

# SCP (Secure copy protocol) shorthand. e.g. 'git@example.com:foo/bar.git'
SCP_REGEX = re.compile(
    r"""^
    # Optional user, e.g. 'git@'
    (\w+@)?
    # Server, e.g. 'github.com'.
    ([^/:]+):
    # The server-side path. e.g. 'user/project.git'. Must start with an
    # alphanumeric character so as not to be confusable with a Windows paths
    # like 'C:/foo/bar' or 'C:\foo\bar'.
    (\w[^:]*)
    $""",
    re.VERBOSE,
)


def looks_like_hash(sha: str) -> bool:
    return bool(HASH_REGEX.match(sha))


class Git(VersionControl):
    name = "git"
    dirname = ".git"
    repo_name = "clone"
    schemes = (
        "git+http",
        "git+https",
        "git+ssh",
        "git+git",
        "git+file",
    )
    # Prevent the user's environment variables from interfering with pip:
    # https://github.com/pypa/pip/issues/1130
    unset_environ = ("GIT_DIR", "GIT_WORK_TREE")
    default_arg_rev = "HEAD"

    @staticmethod
    def get_base_rev_args(rev: str) -> List[str]:
        return [rev]

    def is_immutable_rev_checkout(self, url: str, dest: str) -> bool:
        _, rev_options = self.get_url_rev_options(hide_url(url))
        if not rev_options.rev:
            return False
        if not self.is_commit_id_equal(dest, rev_options.rev):
            # the current commit is different from rev,
            # which means rev was something else than a commit hash
            return False
        # return False in the rare case rev is both a commit hash
        # and a tag or a branch; we don't want to cache in that case
        # because that branch/tag could point to something else in the future
        is_tag_or_branch = bool(self.get_revision_sha(dest, rev_options.rev)[0])
        return not is_tag_or_branch

    def get_git_version(self) -> Tuple[int, ...]:
        version = self.run_command(
            ["version"],
            command_desc="git version",
            show_stdout=False,
            stdout_only=True,
        )
        match = GIT_VERSION_REGEX.match(version)
        if not match:
            logger.warning("Can't parse git version: %s", version)
            return ()
        return (int(match.group(1)), int(match.group(2)))

    @classmethod
    def get_current_branch(cls, location: str) -> Optional[str]:
        """
        Return the current branch, or None if HEAD isn't at a branch
        (e.g. detached HEAD).
        """
        # git-symbolic-ref exits with empty stdout if "HEAD" is a detached
        # HEAD rather than a symbolic ref.  In addition, the -q causes the
        # command to exit with status code 1 instead of 128 in this case
        # and to suppress the message to stderr.
        args = ["symbolic-ref", "-q", "HEAD"]
        output = cls.run_command(
            args,
            extra_ok_returncodes=(1,),
            show_stdout=False,
            stdout_only=True,
            cwd=location,
        )
        ref = output.strip()

        if ref.startswith("refs/heads/"):
            return ref[len("refs/heads/") :]

        return None

    @classmethod
    def get_revision_sha(cls, dest: str, rev: str) -> Tuple[Optional[str], bool]:
        """
        Return (sha_or_none, is_branch), where sha_or_none is a commit hash
        if the revision names a remote branch or tag, otherwise None.

        Args:
          dest: the repository directory.
          rev: the revision name.
        """
        # Pass rev to pre-filter the list.
        output = cls.run_command(
            ["show-ref", rev],
            cwd=dest,
            show_stdout=False,
            stdout_only=True,
            on_returncode="ignore",
        )
        refs = {}
        # NOTE: We do not use splitlines here since that would split on other
        #       unicode separators, which can be maliciously used to install a
        #       different revision.
        for line in output.strip().split("\n"):
            line = line.rstrip("\r")
            if not line:
                continue
            try:
                ref_sha, ref_name = line.split(" ", maxsplit=2)
            except ValueError:
                # Include the offending line to simplify troubleshooting if
                # this error ever occurs.
                raise ValueError(f"unexpected show-ref line: {line!r}")

            refs[ref_name] = ref_sha

        branch_ref = f"refs/remotes/origin/{rev}"
        tag_ref = f"refs/tags/{rev}"

        sha = refs.get(branch_ref)
        if sha is not None:
            return (sha, True)

        sha = refs.get(tag_ref)

        return (sha, False)

    @classmethod
    def _should_fetch(cls, dest: str, rev: str) -> bool:
        """
        Return true if rev is a ref or is a commit that we don't have locally.

        Branches and tags are not considered in this method because they are
        assumed to be always available locally (which is a normal outcome of
        ``git clone`` and ``git fetch --tags``).
        """
        if rev.startswith("refs/"):
            # Always fetch remote refs.
            return True

        if not looks_like_hash(rev):
            # Git fetch would fail with abbreviated commits.
            return False

        if cls.has_commit(dest, rev):
            # Don't fetch if we have the commit locally.
            return False

        return True

    @classmethod
    def resolve_revision(
        cls, dest: str, url: HiddenText, rev_options: RevOptions
    ) -> RevOptions:
        """
        Resolve a revision to a new RevOptions object with the SHA1 of the
        branch, tag, or ref if found.

        Args:
          rev_options: a RevOptions object.
        """
        rev = rev_options.arg_rev
        # The arg_rev property's implementation for Git ensures that the
        # rev return value is always non-None.
        assert rev is not None

        sha, is_branch = cls.get_revision_sha(dest, rev)

        if sha is not None:
            rev_options = rev_options.make_new(sha)
            rev_options.branch_name = rev if is_branch else None

            return rev_options

        # Do not show a warning for the common case of something that has
        # the form of a Git commit hash.
        if not looks_like_hash(rev):
            logger.warning(
                "Did not find branch or tag '%s', assuming revision or ref.",
                rev,
            )

        if not cls._should_fetch(dest, rev):
            return rev_options

        # fetch the requested revision
        cls.run_command(
            make_command("fetch", "-q", url, rev_options.to_args()),
            cwd=dest,
        )
        # Change the revision to the SHA of the ref we fetched
        sha = cls.get_revision(dest, rev="FETCH_HEAD")
        rev_options = rev_options.make_new(sha)

        return rev_options

    @classmethod
    def is_commit_id_equal(cls, dest: str, name: Optional[str]) -> bool:
        """
        Return whether the current commit hash equals the given name.

        Args:
          dest: the repository directory.
          name: a string name.
        """
        if not name:
            # Then avoid an unnecessary subprocess call.
            return False

        return cls.get_revision(dest) == name

    def fetch_new(
        self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int
    ) -> None:
        rev_display = rev_options.to_display()
        logger.info("Cloning %s%s to %s", url, rev_display, display_path(dest))
        if verbosity <= 0:
            flags: Tuple[str, ...] = ("--quiet",)
        elif verbosity == 1:
            flags = ()
        else:
            flags = ("--verbose", "--progress")
        if self.get_git_version() >= (2, 17):
            # Git added support for partial clone in 2.17
            # https://git-scm.com/docs/partial-clone
            # Speeds up cloning by functioning without a complete copy of repository
            self.run_command(
                make_command(
                    "clone",
                    "--filter=blob:none",
                    *flags,
                    url,
                    dest,
                )
            )
        else:
            self.run_command(make_command("clone", *flags, url, dest))

        if rev_options.rev:
            # Then a specific revision was requested.
            rev_options = self.resolve_revision(dest, url, rev_options)
            branch_name = getattr(rev_options, "branch_name", None)
            logger.debug("Rev options %s, branch_name %s", rev_options, branch_name)
            if branch_name is None:
                # Only do a checkout if the current commit id doesn't match
                # the requested revision.
                if not self.is_commit_id_equal(dest, rev_options.rev):
                    cmd_args = make_command(
                        "checkout",
                        "-q",
                        rev_options.to_args(),
                    )
                    self.run_command(cmd_args, cwd=dest)
            elif self.get_current_branch(dest) != branch_name:
                # Then a specific branch was requested, and that branch
                # is not yet checked out.
                track_branch = f"origin/{branch_name}"
                cmd_args = [
                    "checkout",
                    "-b",
                    branch_name,
                    "--track",
                    track_branch,
                ]
                self.run_command(cmd_args, cwd=dest)
        else:
            sha = self.get_revision(dest)
            rev_options = rev_options.make_new(sha)

        logger.info("Resolved %s to commit %s", url, rev_options.rev)

        #: repo may contain submodules
        self.update_submodules(dest)

    def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        self.run_command(
            make_command("config", "remote.origin.url", url),
            cwd=dest,
        )
        cmd_args = make_command("checkout", "-q", rev_options.to_args())
        self.run_command(cmd_args, cwd=dest)

        self.update_submodules(dest)

    def update(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        # First fetch changes from the default remote
        if self.get_git_version() >= (1, 9):
            # fetch tags in addition to everything else
            self.run_command(["fetch", "-q", "--tags"], cwd=dest)
        else:
            self.run_command(["fetch", "-q"], cwd=dest)
        # Then reset to wanted revision (maybe even origin/master)
        rev_options = self.resolve_revision(dest, url, rev_options)
        cmd_args = make_command("reset", "--hard", "-q", rev_options.to_args())
        self.run_command(cmd_args, cwd=dest)
        #: update submodules
        self.update_submodules(dest)

    @classmethod
    def get_remote_url(cls, location: str) -> str:
        """
        Return URL of the first remote encountered.

        Raises RemoteNotFoundError if the repository does not have a remote
        url configured.
        """
        # We need to pass 1 for extra_ok_returncodes since the command
        # exits with return code 1 if there are no matching lines.
        stdout = cls.run_command(
            ["config", "--get-regexp", r"remote\..*\.url"],
            extra_ok_returncodes=(1,),
            show_stdout=False,
            stdout_only=True,
            cwd=location,
        )
        remotes = stdout.splitlines()
        try:
            found_remote = remotes[0]
        except IndexError:
            raise RemoteNotFoundError

        for remote in remotes:
            if remote.startswith("remote.origin.url "):
                found_remote = remote
                break
        url = found_remote.split(" ")[1]
        return cls._git_remote_to_pip_url(url.strip())

    @staticmethod
    def _git_remote_to_pip_url(url: str) -> str:
        """
        Convert a remote url from what git uses to what pip accepts.

        There are 3 legal forms **url** may take:

            1. A fully qualified url: ssh://git@example.com/foo/bar.git
            2. A local project.git folder: /path/to/bare/repository.git
            3. SCP shorthand for form 1: git@example.com:foo/bar.git

        Form 1 is output as-is. Form 2 must be converted to URI and form 3 must
        be converted to form 1.

        See the corresponding test test_git_remote_url_to_pip() for examples of
        sample inputs/outputs.
        """
        if re.match(r"\w+://", url):
            # This is already valid. Pass it though as-is.
            return url
        if os.path.exists(url):
            # A local bare remote (git clone --mirror).
            # Needs a file:// prefix.
            return pathlib.PurePath(url).as_uri()
        scp_match = SCP_REGEX.match(url)
        if scp_match:
            # Add an ssh:// prefix and replace the ':' with a '/'.
            return scp_match.expand(r"ssh://\1\2/\3")
        # Otherwise, bail out.
        raise RemoteNotValidError(url)

    @classmethod
    def has_commit(cls, location: str, rev: str) -> bool:
        """
        Check if rev is a commit that is available in the local repository.
        """
        try:
            cls.run_command(
                ["rev-parse", "-q", "--verify", "sha^" + rev],
                cwd=location,
                log_failed_cmd=False,
            )
        except InstallationError:
            return False
        else:
            return True

    @classmethod
    def get_revision(cls, location: str, rev: Optional[str] = None) -> str:
        if rev is None:
            rev = "HEAD"
        current_rev = cls.run_command(
            ["rev-parse", rev],
            show_stdout=False,
            stdout_only=True,
            cwd=location,
        )
        return current_rev.strip()

    @classmethod
    def get_subdirectory(cls, location: str) -> Optional[str]:
        """
        Return the path to Python project root, relative to the repo root.
        Return None if the project root is in the repo root.
        """
        # find the repo root
        git_dir = cls.run_command(
            ["rev-parse", "--git-dir"],
            show_stdout=False,
            stdout_only=True,
            cwd=location,
        ).strip()
        if not os.path.isabs(git_dir):
            git_dir = os.path.join(location, git_dir)
        repo_root = os.path.abspath(os.path.join(git_dir, ".."))
        return find_path_to_project_root_from_repo_root(location, repo_root)

    @classmethod
    def get_url_rev_and_auth(cls, url: str) -> Tuple[str, Optional[str], AuthInfo]:
        """
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes don't
        work with a ssh:// scheme (e.g. GitHub). But we need a scheme for
        parsing. Hence we remove it again afterwards and return it as a stub.
        """
        # Works around an apparent Git bug
        # (see https://article.gmane.org/gmane.comp.version-control.git/146500)
        scheme, netloc, path, query, fragment = urlsplit(url)
        if scheme.endswith("file"):
            initial_slashes = path[: -len(path.lstrip("/"))]
            newpath = initial_slashes + urllib.request.url2pathname(path).replace(
                "\\", "/"
            ).lstrip("/")
            after_plus = scheme.find("+") + 1
            url = scheme[:after_plus] + urlunsplit(
                (scheme[after_plus:], netloc, newpath, query, fragment),
            )

        if "://" not in url:
            assert "file:" not in url
            url = url.replace("git+", "git+ssh://")
            url, rev, user_pass = super().get_url_rev_and_auth(url)
            url = url.replace("ssh://", "")
        else:
            url, rev, user_pass = super().get_url_rev_and_auth(url)

        return url, rev, user_pass

    @classmethod
    def update_submodules(cls, location: str) -> None:
        if not os.path.exists(os.path.join(location, ".gitmodules")):
            return
        cls.run_command(
            ["submodule", "update", "--init", "--recursive", "-q"],
            cwd=location,
        )

    @classmethod
    def get_repository_root(cls, location: str) -> Optional[str]:
        loc = super().get_repository_root(location)
        if loc:
            return loc
        try:
            r = cls.run_command(
                ["rev-parse", "--show-toplevel"],
                cwd=location,
                show_stdout=False,
                stdout_only=True,
                on_returncode="raise",
                log_failed_cmd=False,
            )
        except BadCommand:
            logger.debug(
                "could not determine if %s is under git control "
                "because git is not available",
                location,
            )
            return None
        except InstallationError:
            return None
        return os.path.normpath(r.rstrip("\r\n"))

    @staticmethod
    def should_add_vcs_url_prefix(repo_url: str) -> bool:
        """In either https or ssh form, requirements must be prefixed with git+."""
        return True


vcs.register(Git)
python3.12/site-packages/pip/_internal/vcs/versioncontrol.py000064400000054433151732701520020123 0ustar00"""Handles all VCS (version control) support"""

import logging
import os
import shutil
import sys
import urllib.parse
from typing import (
    TYPE_CHECKING,
    Any,
    Dict,
    Iterable,
    Iterator,
    List,
    Mapping,
    Optional,
    Tuple,
    Type,
    Union,
)

from pip._internal.cli.spinners import SpinnerInterface
from pip._internal.exceptions import BadCommand, InstallationError
from pip._internal.utils.misc import (
    HiddenText,
    ask_path_exists,
    backup_dir,
    display_path,
    hide_url,
    hide_value,
    is_installable_dir,
    rmtree,
)
from pip._internal.utils.subprocess import (
    CommandArgs,
    call_subprocess,
    format_command_args,
    make_command,
)
from pip._internal.utils.urls import get_url_scheme

if TYPE_CHECKING:
    # Literal was introduced in Python 3.8.
    #
    # TODO: Remove `if TYPE_CHECKING` when dropping support for Python 3.7.
    from typing import Literal


__all__ = ["vcs"]


logger = logging.getLogger(__name__)

AuthInfo = Tuple[Optional[str], Optional[str]]


def is_url(name: str) -> bool:
    """
    Return true if the name looks like a URL.
    """
    scheme = get_url_scheme(name)
    if scheme is None:
        return False
    return scheme in ["http", "https", "file", "ftp"] + vcs.all_schemes


def make_vcs_requirement_url(
    repo_url: str, rev: str, project_name: str, subdir: Optional[str] = None
) -> str:
    """
    Return the URL for a VCS requirement.

    Args:
      repo_url: the remote VCS url, with any needed VCS prefix (e.g. "git+").
      project_name: the (unescaped) project name.
    """
    egg_project_name = project_name.replace("-", "_")
    req = f"{repo_url}@{rev}#egg={egg_project_name}"
    if subdir:
        req += f"&subdirectory={subdir}"

    return req


def find_path_to_project_root_from_repo_root(
    location: str, repo_root: str
) -> Optional[str]:
    """
    Find the the Python project's root by searching up the filesystem from
    `location`. Return the path to project root relative to `repo_root`.
    Return None if the project root is `repo_root`, or cannot be found.
    """
    # find project root.
    orig_location = location
    while not is_installable_dir(location):
        last_location = location
        location = os.path.dirname(location)
        if location == last_location:
            # We've traversed up to the root of the filesystem without
            # finding a Python project.
            logger.warning(
                "Could not find a Python project for directory %s (tried all "
                "parent directories)",
                orig_location,
            )
            return None

    if os.path.samefile(repo_root, location):
        return None

    return os.path.relpath(location, repo_root)


class RemoteNotFoundError(Exception):
    pass


class RemoteNotValidError(Exception):
    def __init__(self, url: str):
        super().__init__(url)
        self.url = url


class RevOptions:

    """
    Encapsulates a VCS-specific revision to install, along with any VCS
    install options.

    Instances of this class should be treated as if immutable.
    """

    def __init__(
        self,
        vc_class: Type["VersionControl"],
        rev: Optional[str] = None,
        extra_args: Optional[CommandArgs] = None,
    ) -> None:
        """
        Args:
          vc_class: a VersionControl subclass.
          rev: the name of the revision to install.
          extra_args: a list of extra options.
        """
        if extra_args is None:
            extra_args = []

        self.extra_args = extra_args
        self.rev = rev
        self.vc_class = vc_class
        self.branch_name: Optional[str] = None

    def __repr__(self) -> str:
        return f"<RevOptions {self.vc_class.name}: rev={self.rev!r}>"

    @property
    def arg_rev(self) -> Optional[str]:
        if self.rev is None:
            return self.vc_class.default_arg_rev

        return self.rev

    def to_args(self) -> CommandArgs:
        """
        Return the VCS-specific command arguments.
        """
        args: CommandArgs = []
        rev = self.arg_rev
        if rev is not None:
            args += self.vc_class.get_base_rev_args(rev)
        args += self.extra_args

        return args

    def to_display(self) -> str:
        if not self.rev:
            return ""

        return f" (to revision {self.rev})"

    def make_new(self, rev: str) -> "RevOptions":
        """
        Make a copy of the current instance, but with a new rev.

        Args:
          rev: the name of the revision for the new object.
        """
        return self.vc_class.make_rev_options(rev, extra_args=self.extra_args)


class VcsSupport:
    _registry: Dict[str, "VersionControl"] = {}
    schemes = ["ssh", "git", "hg", "bzr", "sftp", "svn"]

    def __init__(self) -> None:
        # Register more schemes with urlparse for various version control
        # systems
        urllib.parse.uses_netloc.extend(self.schemes)
        super().__init__()

    def __iter__(self) -> Iterator[str]:
        return self._registry.__iter__()

    @property
    def backends(self) -> List["VersionControl"]:
        return list(self._registry.values())

    @property
    def dirnames(self) -> List[str]:
        return [backend.dirname for backend in self.backends]

    @property
    def all_schemes(self) -> List[str]:
        schemes: List[str] = []
        for backend in self.backends:
            schemes.extend(backend.schemes)
        return schemes

    def register(self, cls: Type["VersionControl"]) -> None:
        if not hasattr(cls, "name"):
            logger.warning("Cannot register VCS %s", cls.__name__)
            return
        if cls.name not in self._registry:
            self._registry[cls.name] = cls()
            logger.debug("Registered VCS backend: %s", cls.name)

    def unregister(self, name: str) -> None:
        if name in self._registry:
            del self._registry[name]

    def get_backend_for_dir(self, location: str) -> Optional["VersionControl"]:
        """
        Return a VersionControl object if a repository of that type is found
        at the given directory.
        """
        vcs_backends = {}
        for vcs_backend in self._registry.values():
            repo_path = vcs_backend.get_repository_root(location)
            if not repo_path:
                continue
            logger.debug("Determine that %s uses VCS: %s", location, vcs_backend.name)
            vcs_backends[repo_path] = vcs_backend

        if not vcs_backends:
            return None

        # Choose the VCS in the inner-most directory. Since all repository
        # roots found here would be either `location` or one of its
        # parents, the longest path should have the most path components,
        # i.e. the backend representing the inner-most repository.
        inner_most_repo_path = max(vcs_backends, key=len)
        return vcs_backends[inner_most_repo_path]

    def get_backend_for_scheme(self, scheme: str) -> Optional["VersionControl"]:
        """
        Return a VersionControl object or None.
        """
        for vcs_backend in self._registry.values():
            if scheme in vcs_backend.schemes:
                return vcs_backend
        return None

    def get_backend(self, name: str) -> Optional["VersionControl"]:
        """
        Return a VersionControl object or None.
        """
        name = name.lower()
        return self._registry.get(name)


vcs = VcsSupport()


class VersionControl:
    name = ""
    dirname = ""
    repo_name = ""
    # List of supported schemes for this Version Control
    schemes: Tuple[str, ...] = ()
    # Iterable of environment variable names to pass to call_subprocess().
    unset_environ: Tuple[str, ...] = ()
    default_arg_rev: Optional[str] = None

    @classmethod
    def should_add_vcs_url_prefix(cls, remote_url: str) -> bool:
        """
        Return whether the vcs prefix (e.g. "git+") should be added to a
        repository's remote url when used in a requirement.
        """
        return not remote_url.lower().startswith(f"{cls.name}:")

    @classmethod
    def get_subdirectory(cls, location: str) -> Optional[str]:
        """
        Return the path to Python project root, relative to the repo root.
        Return None if the project root is in the repo root.
        """
        return None

    @classmethod
    def get_requirement_revision(cls, repo_dir: str) -> str:
        """
        Return the revision string that should be used in a requirement.
        """
        return cls.get_revision(repo_dir)

    @classmethod
    def get_src_requirement(cls, repo_dir: str, project_name: str) -> str:
        """
        Return the requirement string to use to redownload the files
        currently at the given repository directory.

        Args:
          project_name: the (unescaped) project name.

        The return value has a form similar to the following:

            {repository_url}@{revision}#egg={project_name}
        """
        repo_url = cls.get_remote_url(repo_dir)

        if cls.should_add_vcs_url_prefix(repo_url):
            repo_url = f"{cls.name}+{repo_url}"

        revision = cls.get_requirement_revision(repo_dir)
        subdir = cls.get_subdirectory(repo_dir)
        req = make_vcs_requirement_url(repo_url, revision, project_name, subdir=subdir)

        return req

    @staticmethod
    def get_base_rev_args(rev: str) -> List[str]:
        """
        Return the base revision arguments for a vcs command.

        Args:
          rev: the name of a revision to install.  Cannot be None.
        """
        raise NotImplementedError

    def is_immutable_rev_checkout(self, url: str, dest: str) -> bool:
        """
        Return true if the commit hash checked out at dest matches
        the revision in url.

        Always return False, if the VCS does not support immutable commit
        hashes.

        This method does not check if there are local uncommitted changes
        in dest after checkout, as pip currently has no use case for that.
        """
        return False

    @classmethod
    def make_rev_options(
        cls, rev: Optional[str] = None, extra_args: Optional[CommandArgs] = None
    ) -> RevOptions:
        """
        Return a RevOptions object.

        Args:
          rev: the name of a revision to install.
          extra_args: a list of extra options.
        """
        return RevOptions(cls, rev, extra_args=extra_args)

    @classmethod
    def _is_local_repository(cls, repo: str) -> bool:
        """
        posix absolute paths start with os.path.sep,
        win32 ones start with drive (like c:\\folder)
        """
        drive, tail = os.path.splitdrive(repo)
        return repo.startswith(os.path.sep) or bool(drive)

    @classmethod
    def get_netloc_and_auth(
        cls, netloc: str, scheme: str
    ) -> Tuple[str, Tuple[Optional[str], Optional[str]]]:
        """
        Parse the repository URL's netloc, and return the new netloc to use
        along with auth information.

        Args:
          netloc: the original repository URL netloc.
          scheme: the repository URL's scheme without the vcs prefix.

        This is mainly for the Subversion class to override, so that auth
        information can be provided via the --username and --password options
        instead of through the URL.  For other subclasses like Git without
        such an option, auth information must stay in the URL.

        Returns: (netloc, (username, password)).
        """
        return netloc, (None, None)

    @classmethod
    def get_url_rev_and_auth(cls, url: str) -> Tuple[str, Optional[str], AuthInfo]:
        """
        Parse the repository URL to use, and return the URL, revision,
        and auth info to use.

        Returns: (url, rev, (username, password)).
        """
        scheme, netloc, path, query, frag = urllib.parse.urlsplit(url)
        if "+" not in scheme:
            raise ValueError(
                "Sorry, {!r} is a malformed VCS url. "
                "The format is <vcs>+<protocol>://<url>, "
                "e.g. svn+http://myrepo/svn/MyApp#egg=MyApp".format(url)
            )
        # Remove the vcs prefix.
        scheme = scheme.split("+", 1)[1]
        netloc, user_pass = cls.get_netloc_and_auth(netloc, scheme)
        rev = None
        if "@" in path:
            path, rev = path.rsplit("@", 1)
            if not rev:
                raise InstallationError(
                    "The URL {!r} has an empty revision (after @) "
                    "which is not supported. Include a revision after @ "
                    "or remove @ from the URL.".format(url)
                )
        url = urllib.parse.urlunsplit((scheme, netloc, path, query, ""))
        return url, rev, user_pass

    @staticmethod
    def make_rev_args(
        username: Optional[str], password: Optional[HiddenText]
    ) -> CommandArgs:
        """
        Return the RevOptions "extra arguments" to use in obtain().
        """
        return []

    def get_url_rev_options(self, url: HiddenText) -> Tuple[HiddenText, RevOptions]:
        """
        Return the URL and RevOptions object to use in obtain(),
        as a tuple (url, rev_options).
        """
        secret_url, rev, user_pass = self.get_url_rev_and_auth(url.secret)
        username, secret_password = user_pass
        password: Optional[HiddenText] = None
        if secret_password is not None:
            password = hide_value(secret_password)
        extra_args = self.make_rev_args(username, password)
        rev_options = self.make_rev_options(rev, extra_args=extra_args)

        return hide_url(secret_url), rev_options

    @staticmethod
    def normalize_url(url: str) -> str:
        """
        Normalize a URL for comparison by unquoting it and removing any
        trailing slash.
        """
        return urllib.parse.unquote(url).rstrip("/")

    @classmethod
    def compare_urls(cls, url1: str, url2: str) -> bool:
        """
        Compare two repo URLs for identity, ignoring incidental differences.
        """
        return cls.normalize_url(url1) == cls.normalize_url(url2)

    def fetch_new(
        self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int
    ) -> None:
        """
        Fetch a revision from a repository, in the case that this is the
        first fetch from the repository.

        Args:
          dest: the directory to fetch the repository to.
          rev_options: a RevOptions object.
          verbosity: verbosity level.
        """
        raise NotImplementedError

    def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        """
        Switch the repo at ``dest`` to point to ``URL``.

        Args:
          rev_options: a RevOptions object.
        """
        raise NotImplementedError

    def update(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        """
        Update an already-existing repo to the given ``rev_options``.

        Args:
          rev_options: a RevOptions object.
        """
        raise NotImplementedError

    @classmethod
    def is_commit_id_equal(cls, dest: str, name: Optional[str]) -> bool:
        """
        Return whether the id of the current commit equals the given name.

        Args:
          dest: the repository directory.
          name: a string name.
        """
        raise NotImplementedError

    def obtain(self, dest: str, url: HiddenText, verbosity: int) -> None:
        """
        Install or update in editable mode the package represented by this
        VersionControl object.

        :param dest: the repository directory in which to install or update.
        :param url: the repository URL starting with a vcs prefix.
        :param verbosity: verbosity level.
        """
        url, rev_options = self.get_url_rev_options(url)

        if not os.path.exists(dest):
            self.fetch_new(dest, url, rev_options, verbosity=verbosity)
            return

        rev_display = rev_options.to_display()
        if self.is_repository_directory(dest):
            existing_url = self.get_remote_url(dest)
            if self.compare_urls(existing_url, url.secret):
                logger.debug(
                    "%s in %s exists, and has correct URL (%s)",
                    self.repo_name.title(),
                    display_path(dest),
                    url,
                )
                if not self.is_commit_id_equal(dest, rev_options.rev):
                    logger.info(
                        "Updating %s %s%s",
                        display_path(dest),
                        self.repo_name,
                        rev_display,
                    )
                    self.update(dest, url, rev_options)
                else:
                    logger.info("Skipping because already up-to-date.")
                return

            logger.warning(
                "%s %s in %s exists with URL %s",
                self.name,
                self.repo_name,
                display_path(dest),
                existing_url,
            )
            prompt = ("(s)witch, (i)gnore, (w)ipe, (b)ackup ", ("s", "i", "w", "b"))
        else:
            logger.warning(
                "Directory %s already exists, and is not a %s %s.",
                dest,
                self.name,
                self.repo_name,
            )
            # https://github.com/python/mypy/issues/1174
            prompt = ("(i)gnore, (w)ipe, (b)ackup ", ("i", "w", "b"))  # type: ignore

        logger.warning(
            "The plan is to install the %s repository %s",
            self.name,
            url,
        )
        response = ask_path_exists("What to do?  {}".format(prompt[0]), prompt[1])

        if response == "a":
            sys.exit(-1)

        if response == "w":
            logger.warning("Deleting %s", display_path(dest))
            rmtree(dest)
            self.fetch_new(dest, url, rev_options, verbosity=verbosity)
            return

        if response == "b":
            dest_dir = backup_dir(dest)
            logger.warning("Backing up %s to %s", display_path(dest), dest_dir)
            shutil.move(dest, dest_dir)
            self.fetch_new(dest, url, rev_options, verbosity=verbosity)
            return

        # Do nothing if the response is "i".
        if response == "s":
            logger.info(
                "Switching %s %s to %s%s",
                self.repo_name,
                display_path(dest),
                url,
                rev_display,
            )
            self.switch(dest, url, rev_options)

    def unpack(self, location: str, url: HiddenText, verbosity: int) -> None:
        """
        Clean up current location and download the url repository
        (and vcs infos) into location

        :param url: the repository URL starting with a vcs prefix.
        :param verbosity: verbosity level.
        """
        if os.path.exists(location):
            rmtree(location)
        self.obtain(location, url=url, verbosity=verbosity)

    @classmethod
    def get_remote_url(cls, location: str) -> str:
        """
        Return the url used at location

        Raises RemoteNotFoundError if the repository does not have a remote
        url configured.
        """
        raise NotImplementedError

    @classmethod
    def get_revision(cls, location: str) -> str:
        """
        Return the current commit id of the files at the given location.
        """
        raise NotImplementedError

    @classmethod
    def run_command(
        cls,
        cmd: Union[List[str], CommandArgs],
        show_stdout: bool = True,
        cwd: Optional[str] = None,
        on_returncode: 'Literal["raise", "warn", "ignore"]' = "raise",
        extra_ok_returncodes: Optional[Iterable[int]] = None,
        command_desc: Optional[str] = None,
        extra_environ: Optional[Mapping[str, Any]] = None,
        spinner: Optional[SpinnerInterface] = None,
        log_failed_cmd: bool = True,
        stdout_only: bool = False,
    ) -> str:
        """
        Run a VCS subcommand
        This is simply a wrapper around call_subprocess that adds the VCS
        command name, and checks that the VCS is available
        """
        cmd = make_command(cls.name, *cmd)
        if command_desc is None:
            command_desc = format_command_args(cmd)
        try:
            return call_subprocess(
                cmd,
                show_stdout,
                cwd,
                on_returncode=on_returncode,
                extra_ok_returncodes=extra_ok_returncodes,
                command_desc=command_desc,
                extra_environ=extra_environ,
                unset_environ=cls.unset_environ,
                spinner=spinner,
                log_failed_cmd=log_failed_cmd,
                stdout_only=stdout_only,
            )
        except FileNotFoundError:
            # errno.ENOENT = no such file or directory
            # In other words, the VCS executable isn't available
            raise BadCommand(
                f"Cannot find command {cls.name!r} - do you have "
                f"{cls.name!r} installed and in your PATH?"
            )
        except PermissionError:
            # errno.EACCES = Permission denied
            # This error occurs, for instance, when the command is installed
            # only for another user. So, the current user don't have
            # permission to call the other user command.
            raise BadCommand(
                f"No permission to execute {cls.name!r} - install it "
                f"locally, globally (ask admin), or check your PATH. "
                f"See possible solutions at "
                f"https://pip.pypa.io/en/latest/reference/pip_freeze/"
                f"#fixing-permission-denied."
            )

    @classmethod
    def is_repository_directory(cls, path: str) -> bool:
        """
        Return whether a directory path is a repository directory.
        """
        logger.debug("Checking in %s for %s (%s)...", path, cls.dirname, cls.name)
        return os.path.exists(os.path.join(path, cls.dirname))

    @classmethod
    def get_repository_root(cls, location: str) -> Optional[str]:
        """
        Return the "root" (top-level) directory controlled by the vcs,
        or `None` if the directory is not in any.

        It is meant to be overridden to implement smarter detection
        mechanisms for specific vcs.

        This can do more than is_repository_directory() alone. For
        example, the Git override checks that Git is actually available.
        """
        if cls.is_repository_directory(location):
            return location
        return None
python3.12/site-packages/pip/_internal/vcs/subversion.py000064400000026721151732701520017233 0ustar00import logging
import os
import re
from typing import List, Optional, Tuple

from pip._internal.utils.misc import (
    HiddenText,
    display_path,
    is_console_interactive,
    is_installable_dir,
    split_auth_from_netloc,
)
from pip._internal.utils.subprocess import CommandArgs, make_command
from pip._internal.vcs.versioncontrol import (
    AuthInfo,
    RemoteNotFoundError,
    RevOptions,
    VersionControl,
    vcs,
)

logger = logging.getLogger(__name__)

_svn_xml_url_re = re.compile('url="([^"]+)"')
_svn_rev_re = re.compile(r'committed-rev="(\d+)"')
_svn_info_xml_rev_re = re.compile(r'\s*revision="(\d+)"')
_svn_info_xml_url_re = re.compile(r"<url>(.*)</url>")


class Subversion(VersionControl):
    name = "svn"
    dirname = ".svn"
    repo_name = "checkout"
    schemes = ("svn+ssh", "svn+http", "svn+https", "svn+svn", "svn+file")

    @classmethod
    def should_add_vcs_url_prefix(cls, remote_url: str) -> bool:
        return True

    @staticmethod
    def get_base_rev_args(rev: str) -> List[str]:
        return ["-r", rev]

    @classmethod
    def get_revision(cls, location: str) -> str:
        """
        Return the maximum revision for all files under a given location
        """
        # Note: taken from setuptools.command.egg_info
        revision = 0

        for base, dirs, _ in os.walk(location):
            if cls.dirname not in dirs:
                dirs[:] = []
                continue  # no sense walking uncontrolled subdirs
            dirs.remove(cls.dirname)
            entries_fn = os.path.join(base, cls.dirname, "entries")
            if not os.path.exists(entries_fn):
                # FIXME: should we warn?
                continue

            dirurl, localrev = cls._get_svn_url_rev(base)

            if base == location:
                assert dirurl is not None
                base = dirurl + "/"  # save the root url
            elif not dirurl or not dirurl.startswith(base):
                dirs[:] = []
                continue  # not part of the same svn tree, skip it
            revision = max(revision, localrev)
        return str(revision)

    @classmethod
    def get_netloc_and_auth(
        cls, netloc: str, scheme: str
    ) -> Tuple[str, Tuple[Optional[str], Optional[str]]]:
        """
        This override allows the auth information to be passed to svn via the
        --username and --password options instead of via the URL.
        """
        if scheme == "ssh":
            # The --username and --password options can't be used for
            # svn+ssh URLs, so keep the auth information in the URL.
            return super().get_netloc_and_auth(netloc, scheme)

        return split_auth_from_netloc(netloc)

    @classmethod
    def get_url_rev_and_auth(cls, url: str) -> Tuple[str, Optional[str], AuthInfo]:
        # hotfix the URL scheme after removing svn+ from svn+ssh:// re-add it
        url, rev, user_pass = super().get_url_rev_and_auth(url)
        if url.startswith("ssh://"):
            url = "svn+" + url
        return url, rev, user_pass

    @staticmethod
    def make_rev_args(
        username: Optional[str], password: Optional[HiddenText]
    ) -> CommandArgs:
        extra_args: CommandArgs = []
        if username:
            extra_args += ["--username", username]
        if password:
            extra_args += ["--password", password]

        return extra_args

    @classmethod
    def get_remote_url(cls, location: str) -> str:
        # In cases where the source is in a subdirectory, we have to look up in
        # the location until we find a valid project root.
        orig_location = location
        while not is_installable_dir(location):
            last_location = location
            location = os.path.dirname(location)
            if location == last_location:
                # We've traversed up to the root of the filesystem without
                # finding a Python project.
                logger.warning(
                    "Could not find Python project for directory %s (tried all "
                    "parent directories)",
                    orig_location,
                )
                raise RemoteNotFoundError

        url, _rev = cls._get_svn_url_rev(location)
        if url is None:
            raise RemoteNotFoundError

        return url

    @classmethod
    def _get_svn_url_rev(cls, location: str) -> Tuple[Optional[str], int]:
        from pip._internal.exceptions import InstallationError

        entries_path = os.path.join(location, cls.dirname, "entries")
        if os.path.exists(entries_path):
            with open(entries_path) as f:
                data = f.read()
        else:  # subversion >= 1.7 does not have the 'entries' file
            data = ""

        url = None
        if data.startswith("8") or data.startswith("9") or data.startswith("10"):
            entries = list(map(str.splitlines, data.split("\n\x0c\n")))
            del entries[0][0]  # get rid of the '8'
            url = entries[0][3]
            revs = [int(d[9]) for d in entries if len(d) > 9 and d[9]] + [0]
        elif data.startswith("<?xml"):
            match = _svn_xml_url_re.search(data)
            if not match:
                raise ValueError(f"Badly formatted data: {data!r}")
            url = match.group(1)  # get repository URL
            revs = [int(m.group(1)) for m in _svn_rev_re.finditer(data)] + [0]
        else:
            try:
                # subversion >= 1.7
                # Note that using get_remote_call_options is not necessary here
                # because `svn info` is being run against a local directory.
                # We don't need to worry about making sure interactive mode
                # is being used to prompt for passwords, because passwords
                # are only potentially needed for remote server requests.
                xml = cls.run_command(
                    ["info", "--xml", location],
                    show_stdout=False,
                    stdout_only=True,
                )
                match = _svn_info_xml_url_re.search(xml)
                assert match is not None
                url = match.group(1)
                revs = [int(m.group(1)) for m in _svn_info_xml_rev_re.finditer(xml)]
            except InstallationError:
                url, revs = None, []

        if revs:
            rev = max(revs)
        else:
            rev = 0

        return url, rev

    @classmethod
    def is_commit_id_equal(cls, dest: str, name: Optional[str]) -> bool:
        """Always assume the versions don't match"""
        return False

    def __init__(self, use_interactive: Optional[bool] = None) -> None:
        if use_interactive is None:
            use_interactive = is_console_interactive()
        self.use_interactive = use_interactive

        # This member is used to cache the fetched version of the current
        # ``svn`` client.
        # Special value definitions:
        #   None: Not evaluated yet.
        #   Empty tuple: Could not parse version.
        self._vcs_version: Optional[Tuple[int, ...]] = None

        super().__init__()

    def call_vcs_version(self) -> Tuple[int, ...]:
        """Query the version of the currently installed Subversion client.

        :return: A tuple containing the parts of the version information or
            ``()`` if the version returned from ``svn`` could not be parsed.
        :raises: BadCommand: If ``svn`` is not installed.
        """
        # Example versions:
        #   svn, version 1.10.3 (r1842928)
        #      compiled Feb 25 2019, 14:20:39 on x86_64-apple-darwin17.0.0
        #   svn, version 1.7.14 (r1542130)
        #      compiled Mar 28 2018, 08:49:13 on x86_64-pc-linux-gnu
        #   svn, version 1.12.0-SlikSvn (SlikSvn/1.12.0)
        #      compiled May 28 2019, 13:44:56 on x86_64-microsoft-windows6.2
        version_prefix = "svn, version "
        version = self.run_command(["--version"], show_stdout=False, stdout_only=True)
        if not version.startswith(version_prefix):
            return ()

        version = version[len(version_prefix) :].split()[0]
        version_list = version.partition("-")[0].split(".")
        try:
            parsed_version = tuple(map(int, version_list))
        except ValueError:
            return ()

        return parsed_version

    def get_vcs_version(self) -> Tuple[int, ...]:
        """Return the version of the currently installed Subversion client.

        If the version of the Subversion client has already been queried,
        a cached value will be used.

        :return: A tuple containing the parts of the version information or
            ``()`` if the version returned from ``svn`` could not be parsed.
        :raises: BadCommand: If ``svn`` is not installed.
        """
        if self._vcs_version is not None:
            # Use cached version, if available.
            # If parsing the version failed previously (empty tuple),
            # do not attempt to parse it again.
            return self._vcs_version

        vcs_version = self.call_vcs_version()
        self._vcs_version = vcs_version
        return vcs_version

    def get_remote_call_options(self) -> CommandArgs:
        """Return options to be used on calls to Subversion that contact the server.

        These options are applicable for the following ``svn`` subcommands used
        in this class.

            - checkout
            - switch
            - update

        :return: A list of command line arguments to pass to ``svn``.
        """
        if not self.use_interactive:
            # --non-interactive switch is available since Subversion 0.14.4.
            # Subversion < 1.8 runs in interactive mode by default.
            return ["--non-interactive"]

        svn_version = self.get_vcs_version()
        # By default, Subversion >= 1.8 runs in non-interactive mode if
        # stdin is not a TTY. Since that is how pip invokes SVN, in
        # call_subprocess(), pip must pass --force-interactive to ensure
        # the user can be prompted for a password, if required.
        #   SVN added the --force-interactive option in SVN 1.8. Since
        # e.g. RHEL/CentOS 7, which is supported until 2024, ships with
        # SVN 1.7, pip should continue to support SVN 1.7. Therefore, pip
        # can't safely add the option if the SVN version is < 1.8 (or unknown).
        if svn_version >= (1, 8):
            return ["--force-interactive"]

        return []

    def fetch_new(
        self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int
    ) -> None:
        rev_display = rev_options.to_display()
        logger.info(
            "Checking out %s%s to %s",
            url,
            rev_display,
            display_path(dest),
        )
        if verbosity <= 0:
            flag = "--quiet"
        else:
            flag = ""
        cmd_args = make_command(
            "checkout",
            flag,
            self.get_remote_call_options(),
            rev_options.to_args(),
            url,
            dest,
        )
        self.run_command(cmd_args)

    def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        cmd_args = make_command(
            "switch",
            self.get_remote_call_options(),
            rev_options.to_args(),
            url,
            dest,
        )
        self.run_command(cmd_args)

    def update(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
        cmd_args = make_command(
            "update",
            self.get_remote_call_options(),
            rev_options.to_args(),
            dest,
        )
        self.run_command(cmd_args)


vcs.register(Subversion)
python3.12/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-312.pyc000064400000013434151732701520024116 0ustar00�

R`i���H�ddlZddlZddlZddlZddlmZmZmZmZm	Z	ddl
mZddlm
Z
mZmZmZmZer	ddlmZmZneZgd�Zdefd	�ZGd
�de�Zej2d��defd
��Zdefd�Zdeeedefd�Zdede
fd�Zdedede
fd�Zde dedede
fd�Z!y)�N)�
TYPE_CHECKING�List�Optional�Type�cast)�	strtobool�)�BaseDistribution�BaseEnvironment�FilesystemWheel�MemoryWheel�Wheel)�Literal�Protocol)	r
rrr
r�get_default_environment�get_environment�get_wheel_distribution�select_backend�returnc�$�tjtt�5t	ttjd��cddd�S#1swYnxYwtjdkryddl
}t	t|jdd��S)a�Whether to use the ``importlib.metadata`` or ``pkg_resources`` backend.

    By default, pip uses ``importlib.metadata`` on Python 3.11+, and
    ``pkg_resourcess`` otherwise. This can be overridden by a couple of ways:

    * If environment variable ``_PIP_USE_IMPORTLIB_METADATA`` is set, it
      dictates whether ``importlib.metadata`` is used, regardless of Python
      version.
    * On Python 3.11+, Python distributors can patch ``importlib.metadata``
      to add a global constant ``_PIP_USE_IMPORTLIB_METADATA = False``. This
      makes pip use ``pkg_resources`` (unless the user set the aforementioned
      environment variable to *True*).
    �_PIP_USE_IMPORTLIB_METADATAN)��FrT)
�
contextlib�suppress�KeyError�
ValueError�boolr�os�environ�sys�version_info�importlib.metadata�getattr�metadata��	importlibs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/metadata/__init__.py�_should_use_importlib_metadatar)sf��
�	�	�X�z�	2��I�b�j�j�)F�G�H�I�
3�	2�	2��
���'�!�����	�*�*�,I�4�P�Q�Qs�%A�Ac�8�eZdZUded<eeed<eeed<y)�Backendz%Literal["importlib", "pkg_resources"]�NAME�Distribution�EnvironmentN)�__name__�
__module__�__qualname__�__annotations__rr
r��r(r+r+4s��
1�1��'�(�(��o�&�&r4r+)�maxsizec�n�t�rddlm}tt|�Sddlm}tt|�S)Nr	r&)�
pkg_resources)r)�r'rr+r7)r'r7s  r(rr:s(��%�'���G�Y�'�'�����'�'r4c�F�t�jj�S)a	Get the default representation for the current environment.

    This returns an Environment instance from the chosen backend. The default
    Environment instance should be built from ``sys.path`` and may use caching
    to share instance state accorss calls.
    )rr.�defaultr3r4r(rrEs����'�'�/�/�1�1r4�pathsc�H�t�jj|�S)a'Get a representation of the environment specified by ``paths``.

    This returns an Environment instance from the chosen backend based on the
    given import paths. The backend must build a fresh instance representing
    the state of installed distributions when this function is called.
    )rr.�
from_paths)r;s r(rrOs����'�'�2�2�5�9�9r4�	directoryc�H�t�jj|�S)z�Get the distribution metadata representation in the specified directory.

    This returns a Distribution instance from the chosen backend based on
    the given on-disk ``.dist-info`` directory.
    )rr-�from_directory)r>s r(�get_directory_distributionrAYs����(�(�7�7�	�B�Br4�wheel�canonical_namec�J�t�jj||�S)aGet the representation of the specified wheel's distribution metadata.

    This returns a Distribution instance from the chosen backend based on
    the given wheel's ``.dist-info`` directory.

    :param canonical_name: Normalized project name of the given wheel.
    )rr-�
from_wheel)rBrCs  r(rrbs ����(�(�3�3�E�>�J�Jr4�metadata_contents�filenamec�L�t�jj|||�S)a�Get the dist representation of the specified METADATA file contents.

    This returns a Distribution instance from the chosen backend sourced from the data
    in `metadata_contents`.

    :param metadata_contents: Contents of a METADATA file within a dist, or one served
                              via PEP 658.
    :param filename: Filename for the dist this metadata represents.
    :param canonical_name: Normalized project name of the given dist.
    )rr-�from_metadata_file_contents)rFrGrCs   r(�get_metadata_distributionrJms)����(�(�D�D�����r4)"r�	functoolsrr!�typingrrrrr�pip._internal.utils.miscr�baser
rrr
rrr�object�__all__rr)r+�	lru_cacherr�strrrAr�bytesrJr3r4r(�<module>rTs�����	�
�<�<�.�X�X��(�(��H�
��R��R�.'�h�'�����T�"�(��(�#�(�2��2�:�8�D��I�.�:�?�:�C�#�C�2B�C�K�%�K��K�AQ�K���������	r4python3.12/site-packages/pip/_internal/metadata/__pycache__/_json.cpython-312.pyc000064400000005546151732701520023474 0ustar00�

R`i#
��n�ddlmZmZmZddlmZddlmZmZm	Z	m
Z
gd�Zdedefd�Z
dedeeeffd	�Zy
)�)�Header�
decode_header�make_header)�Message)�Any�Dict�List�Union))zMetadata-VersionF)�NameF)�VersionF)�DynamicT)�PlatformT)zSupported-PlatformT)�SummaryF)�DescriptionF)zDescription-Content-TypeF)�KeywordsF)z	Home-pageF)zDownload-URLF)�AuthorF)zAuthor-emailF)�
MaintainerF)zMaintainer-emailF)�LicenseF)�
ClassifierT)z
Requires-DistT)zRequires-PythonF)zRequires-ExternalT)zProject-URLT)zProvides-ExtraT)z
Provides-DistT)zObsoletes-DistT�field�returnc�B�|j�jdd�S)N�-�_)�lower�replace)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/metadata/_json.py�	json_namer%s���;�;�=� � ��c�*�*��msgc���dtttfdtfd�}i}tD]�\}}||vr�t	|�}|r%|j|�D�cgc]
}||���}}n]||j
|��}|dk(rAd|vr-|jd�D�cgc]}|j���}}n|j�}|||<��|j�}|r||d<|Scc}wcc}w)z;Convert a Message object into a JSON-compatible dictionary.�hrc��t|t�rUg}t|�D]1\}}|dk(r	|jd�d}|j||f��3t
t|��St
|�S#t$rd}Y�AwxYw)Nzunknown-8bitzutf-8�latin1)�
isinstancerr�decode�UnicodeDecodeError�append�strr)r"�chunks�bytes�encodings    r�sanitise_headerz$msg_to_json.<locals>.sanitise_header,s����a�� ��F�#0��#3���x��~�-�,����W�-�#*���
�
�u�h�/�0�$4��{�6�*�+�+��1�v�
��.�,�#+��,�s�A1�1A?�>A?�keywords�,�description)
r
rr)�METADATA_FIELDSr�get_all�get�split�strip�get_payload)	r r-�resultr�multi�key�v�value�payloads	         r�msg_to_jsonr=)s����5����-��#�� �F�'���u����������,/�K�K��,>�,�,>�q���"�,>�
�,�$�C�G�G�E�N�3�E��j� ��%�<�05���C�0@�A�0@�1�Q�W�W�Y�0@�E�A�!�K�K�M�E���s��#(�&�o�o��G�� '��}���M��%,��Bs�C �C%N)�email.headerrrr�
email.messager�typingrrr	r
r1r)rr=�rr�<module>rBsK��<�;�!�)�)���<+�S�+�S�+�+�W�+��c�3�h��+rpython3.12/site-packages/pip/_internal/metadata/__pycache__/base.cpython-312.pyc000064400000106777151732701520023306 0ustar00�

R`i�f��Z�ddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZddlmZddlmZmZddlmZmZddlm Z m!Z!ddl"m#Z#ddl$m%Z%m&Z&m'Z'dd	l(m)Z)m*Z*m+Z+dd
l,m-Z-ddl.m/Z/ddl0m1Z1m2Z2dd
l3m4Z4ddl5m6Z6erddl	m7Z7ne8Z7ee e!fZ9ee:ejvfZ<ejze>�Z?Gd�de7�Z@dee:dfdee:dfde:fd�ZAGd�de�ZBGd�de7�ZCGd�d�ZDGd�de7�ZEGd �d!eE�ZFGd"�d#eE�ZGy)$�N)
�IO�
TYPE_CHECKING�Any�
Collection�	Container�Dict�Iterable�Iterator�List�
NamedTuple�Optional�Tuple�Union)�Requirement)�InvalidSpecifier�SpecifierSet)�NormalizedName�canonicalize_name)�
LegacyVersion�Version)�NoneMetadataError)�
get_scheme�
site_packages�	user_site)�DIRECT_URL_METADATA_NAME�	DirectUrl�DirectUrlValidationError)�stdlib_pkgs)�egg_link_path_from_sys_path)�is_local�normalize_path)�url_to_path�)�msg_to_json)�Protocolc�N�eZdZedefd��Zedefd��Zedefd��Zy)�BaseEntryPoint�returnc��t���N��NotImplementedError��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/metadata/base.py�namezBaseEntryPoint.name9���!�#�#�c��t��r*r+r-s r/�valuezBaseEntryPoint.value=r1r2c��t��r*r+r-s r/�groupzBaseEntryPoint.groupAr1r2N)�__name__�
__module__�__qualname__�property�strr0r4r6�r2r/r'r'8sQ��
�$�c�$��$��$�s�$��$��$�s�$��$r2r'�entry.�infor(c��|r-|ddk(r%|r|ddk(r|dz
}n|dd}|dd}|r	|ddk(r�%ttjg|�|����S)a�Convert a legacy installed-files.txt path into modern RECORD path.

    The legacy format stores paths relative to the info directory, while the
    modern format stores paths relative to the package root, e.g. the
    site-packages directory.

    :param entry: Path parts of the installed-files.txt entry.
    :param info: Path parts of the egg-info directory relative to package root.
    :returns: The converted entry.

    For best compatibility with symlinks, this does not use ``abspath()`` or
    ``Path.resolve()``, but tries to work with path parts:

    1. While ``entry`` starts with ``..``, remove the equal amounts of parts
       from ``info``; if ``info`` is empty, start appending ``..`` instead.
    2. Join the two directly.
    r�..���)r@Nr#�r;�pathlib�Path)r=r>s  r/�_convert_installed_files_pathrEFsm��*�E�!�H��$��t�B�x�4�'��G�O�D����9�D��a�b�	���E�!�H��$��w�|�|�*�T�*�E�*�+�+r2c�,�eZdZUeed<eed<eed<y)�
RequiresEntry�requirement�extra�markerN)r7r8r9r;�__annotations__r<r2r/rGrGds�����J��Kr2rGc	��eZdZededdfd��Zededededdfd��Zedd	d
eddfd��Zdefd�Z	defd
�Z
edeefd��Z
edeefd��Zedeefd��Zedeefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedeefd��Zedefd��Zedefd��Zedefd��Zedefd��Z edefd��Z!edefd��Z"d e#defd!�Z$de%efd"�Z&d e#defd#�Z'de(e)fd$�Z*de+jXjZfd%�Z.e/j`d&�'�de+jXjZfd(��Z1ede+jXjZfd)��Z2ede3ee4ffd*��Z5edeefd+��Z6edefd,��Z7ede8fd-��Z9d=d.e:ede(e;fd/�Z<de(efd0�Z=d1edefd2�Z>dee%efd3�Z?dee%efd4�Z@dee%efd5�ZAde%eBfd6�ZCde(efd7�ZDde(efd8�ZEd9e+jXjZdd:fd;�ZFedefd<��ZGy:)>�BaseDistribution�	directoryr(c��t��)z�Load the distribution from a metadata directory.

        :param directory: Path to a metadata directory, e.g. ``.dist-info``.
        r+)�clsrNs  r/�from_directoryzBaseDistribution.from_directoryk�
��"�#�#r2�metadata_contents�filename�project_namec��t��)a�Load the distribution from the contents of a METADATA file.

        This is used to implement PEP 658 by generating a "shallow" dist object that can
        be used for resolution without downloading or building the actual dist yet.

        :param metadata_contents: The contents of a METADATA file.
        :param filename: File name for the dist with this metadata.
        :param project_name: Name of the project this dist represents.
        r+)rPrSrTrUs    r/�from_metadata_file_contentsz,BaseDistribution.from_metadata_file_contentsss
�� "�#�#r2�wheel�Wheelr0c��t��)aLoad the distribution from a given wheel.

        :param wheel: A concrete wheel definition.
        :param name: File name of the wheel.

        :raises InvalidWheel: Whenever loading of the wheel causes a
            :py:exc:`zipfile.BadZipFile` exception to be thrown.
        :raises UnsupportedWheel: If the wheel is a valid zip, but malformed
            internally.
        r+)rPrXr0s   r/�
from_wheelzBaseDistribution.from_wheel��
��"�#�#r2c�T�|j�d|j�d|j�d�S)N� z (�))�raw_name�version�locationr-s r/�__repr__zBaseDistribution.__repr__�s'���-�-���$�,�,��r�$�-�-���B�Br2c�8�|j�d|j��S)Nr^)r`rar-s r/�__str__zBaseDistribution.__str__�s���-�-���$�,�,��0�0r2c��t��)a�Where the distribution is loaded from.

        A string value is not necessarily a filesystem path, since distributions
        can be loaded from other sources, e.g. arbitrary zip archives. ``None``
        means the distribution is created in-memory.

        Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
        this is a symbolic link, we want to preserve the relative path between
        it and files in the distribution.
        r+r-s r/rbzBaseDistribution.location�r\r2c��|j}|r&|j�rt|j�Syt	|j
�}|r|jSy)z�The project location for editable distributions.

        This is the directory where pyproject.toml or setup.py is located.
        None if the distribution is not installed in editable mode.
        N)�
direct_url�is_local_editabler"�urlrr`rb)r.rh�
egg_link_paths   r/�editable_project_locationz*BaseDistribution.editable_project_location�sR���_�_�
���+�+�-�"�:�>�>�2�2��8��
�
�F�M���}�}�$�r2c��t��)a�The distribution's "installed" location.

        This should generally be a ``site-packages`` directory. This is
        usually ``dist.location``, except for legacy develop-installed packages,
        where ``dist.location`` is the source code location, and this is where
        the ``.egg-link`` file is.

        The returned location is normalized (in particular, with symlinks removed).
        r+r-s r/�installed_locationz#BaseDistribution.installed_location��
��"�#�#r2c��t��)a/Location of the .[egg|dist]-info directory or file.

        Similarly to ``location``, a string value is not necessarily a
        filesystem path. ``None`` means the distribution is created in-memory.

        For a modern .dist-info installation on disk, this should be something
        like ``{location}/{raw_name}-{version}.dist-info``.

        Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
        this is a symbolic link, we want to preserve the relative path between
        it and other files in the distribution.
        r+r-s r/�
info_locationzBaseDistribution.info_location�s
��"�#�#r2c�f�|j}|sytj|�j�S)aWhether this distribution is installed with legacy distutils format.

        A distribution installed with "raw" distutils not patched by setuptools
        uses one single file at ``info_location`` to store metadata. We need to
        treat this specially on uninstallation.
        F)rqrCrD�is_file�r.rqs  r/�installed_by_distutilsz'BaseDistribution.installed_by_distutils�s-���*�*�
����|�|�M�*�2�2�4�4r2c�B�|j}|sy|jd�S)z�Whether this distribution is installed as an egg.

        This usually indicates the distribution was installed by (older versions
        of) easy_install.
        Fz.egg)rb�endswith�r.rbs  r/�installed_as_eggz!BaseDistribution.installed_as_egg�s$���=�=����� � ��(�(r2c��|j}|sy|jd�sytj|�j	�S)a�Whether this distribution is installed with the ``.egg-info`` format.

        This usually indicates the distribution was installed with setuptools
        with an old pip version or with ``single-version-externally-managed``.

        Note that this ensure the metadata store is a directory. distutils can
        also installs an ``.egg-info``, but as a file, not a directory. This
        property is *False* for that case. Also see ``installed_by_distutils``.
        Fz	.egg-info�rqrwrCrD�is_dirrts  r/�"installed_with_setuptools_egg_infoz3BaseDistribution.installed_with_setuptools_egg_info�s>���*�*�
����%�%�k�2���|�|�M�*�1�1�3�3r2c��|j}|sy|jd�sytj|�j	�S)aaWhether this distribution is installed with the "modern format".

        This indicates a "modern" installation, e.g. storing metadata in the
        ``.dist-info`` directory. This applies to installations made by
        setuptools (but through pip, not directly), or anything using the
        standardized build backend interface (PEP 517).
        Fz
.dist-infor{rts  r/�installed_with_dist_infoz)BaseDistribution.installed_with_dist_infos>���*�*�
����%�%�l�3���|�|�M�*�1�1�3�3r2c��t��r*r+r-s r/�canonical_namezBaseDistribution.canonical_namer1r2c��t��r*r+r-s r/razBaseDistribution.versionr1r2c�:�|jjdd�S)z�Convert a project name to its setuptools-compatible filename.

        This is a copy of ``pkg_resources.to_filename()`` for compatibility.
        �-�_)r`�replacer-s r/�setuptools_filenamez$BaseDistribution.setuptools_filenames���}�}�$�$�S�#�.�.r2c��	|jt�}	tj|�S#t$rYywxYw#t
tjtf$r0}tjdt|j|�Yd}~yd}~wwxYw)z�Obtain a DirectUrl from this distribution.

        Returns None if the distribution has no `direct_url.json` metadata,
        or if `direct_url.json` is invalid.
        NzError parsing %s for %s: %s)�	read_textr�FileNotFoundErrorr�	from_json�UnicodeDecodeError�json�JSONDecodeErrorr�logger�warningr�)r.�content�es   r/rhzBaseDistribution.direct_url%s���	��n�n�%=�>�G�
	��&�&�w�/�/��!�	��	��

�� � �$�
�	�

�N�N�-�(��#�#��	
���	�s!�-�<�	9�9�B
�&B�B
c��	|jd�}|j	�D]}|j�}|s�|cSy#tttf$rYywxYw)N�	INSTALLER�)r��OSError�
ValueErrorr�
splitlines�strip)r.�installer_text�line�cleaned_lines    r/�	installerzBaseDistribution.installer?s_��	�!�^�^�K�8�N�#�-�-�/�D��:�:�<�L��#�#�0���
��%6�7�	��	�s�?�A�Ac�$�|jd�S)N�	REQUESTED)rsr-s r/�	requestedzBaseDistribution.requestedKs���|�|�K�(�(r2c�,�t|j�Sr*)�boolrlr-s r/�editablezBaseDistribution.editableOs���D�2�2�3�3r2c�F�|j�yt|j�S)z|If distribution is installed in the current virtual environment.

        Always True if we're not in a virtualenv.
        F)rnr r-s r/�localzBaseDistribution.localSs$���"�"�*����/�/�0�0r2c�x�|j�t�y|jjtt��S�NF)rnr�
startswithr!r-s r/�in_usersitezBaseDistribution.in_usersite]s2���"�"�*�i�.?���&�&�1�1�.��2K�L�Lr2c�x�|j�t�y|jjtt��Sr�)rnrr�r!r-s r/�in_site_packagesz!BaseDistribution.in_site_packagescs2���"�"�*�m�.C���&�&�1�1�.��2O�P�Pr2�pathc��t��)z7Check whether an entry in the info directory is a file.r+�r.r�s  r/rszBaseDistribution.is_fileir1r2c��t��)z�Find distutils 'scripts' entries metadata.

        If 'scripts' is supplied in ``setup.py``, distutils records those in the
        installed distribution's ``scripts`` directory, a file for each script.
        r+r-s r/�iter_distutils_script_namesz,BaseDistribution.iter_distutils_script_namesmrRr2c��t��)z�Read a file in the info directory.

        :raise FileNotFoundError: If ``path`` does not exist in the directory.
        :raise NoneMetadataError: If ``path`` exists in the info directory, but
            cannot be read.
        r+r�s  r/r�zBaseDistribution.read_textu�
��"�#�#r2c��t��r*r+r-s r/�iter_entry_pointsz"BaseDistribution.iter_entry_points~���!�#�#r2c��t��r*r+r-s r/�_metadata_implzBaseDistribution._metadata_impl�r�r2r#)�maxsizec�H�|j�}|j|�|Sr*)r��_add_egg_info_requires)r.�metadatas  r/�_metadata_cachedz!BaseDistribution._metadata_cached�s%���&�&�(���#�#�H�-��r2c�"�|j�S)aMetadata of distribution parsed from e.g. METADATA or PKG-INFO.

        This should return an empty message if the metadata file is unavailable.

        :raises NoneMetadataError: If the metadata file is available, but does
            not contain valid metadata.
        )r�r-s r/r�zBaseDistribution.metadata�s���$�$�&�&r2c�,�t|j�S)aPEP 566 compliant JSON-serializable representation of METADATA or PKG-INFO.

        This should return an empty dict if the metadata file is unavailable.

        :raises NoneMetadataError: If the metadata file is available, but does
            not contain valid metadata.
        )r$r�r-s r/�
metadata_dictzBaseDistribution.metadata_dict�s���4�=�=�)�)r2c�8�|jjd�S)zDValue of "Metadata-Version:" in distribution metadata, if available.zMetadata-Version)r��getr-s r/�metadata_versionz!BaseDistribution.metadata_version�s���}�}� � �!3�4�4r2c�N�|jjd|j�S)z*Value of "Name:" in distribution metadata.�Name)r�r�r�r-s r/r`zBaseDistribution.raw_name�s!��
�}�}� � ���)<�)<�=�=r2c��|jjd�}|�
t�S	tt|��}|S#t$r7}d}t
j
||j|�t�cYd}~Sd}~wwxYw)z�Value of "Requires-Python:" in distribution metadata.

        If the key does not exist or contains an invalid value, an empty
        SpecifierSet should be returned.
        zRequires-PythonNz-Package %r has an invalid Requires-Python: %s)r�r�rr;rr�r�r`)r.r4�specr��messages     r/�requires_pythonz BaseDistribution.requires_python�ss���
�
�!�!�"3�4���=��>�!�	"���E�
�+�D�
���	 �	"�E�G��N�N�7�D�M�M�1�5��>�!��	"�s�?�	A?�,A:�4A?�:A?�extrasc��t��)z�Dependencies of this distribution.

        For modern .dist-info distributions, this is the collection of
        "Requires-Dist:" entries in distribution metadata.
        r+)r.r�s  r/�iter_dependenciesz"BaseDistribution.iter_dependencies�rRr2c��t��)a�Extras provided by this distribution.

        For modern .dist-info distributions, this is the collection of
        "Provides-Extra:" entries in distribution metadata.

        The return value of this function is not particularly useful other than
        display purposes due to backward compatibility issues and the extra
        names being poorly normalized prior to PEP 685. If you want to perform
        logic operations on extras, use :func:`is_extra_provided` instead.
        r+r-s r/�iter_provided_extrasz%BaseDistribution.iter_provided_extras�ror2rIc��t��)z�Check whether an extra is provided by this distribution.

        This is needed mostly for compatibility issues with pkg_resources not
        following the extra normalization rules defined in PEP 685.
        r+)r.rIs  r/�is_extra_providedz"BaseDistribution.is_extra_provided�rRr2c��	|jd�}d�tj|j	��D�S#t$rYywxYw)N�RECORDc3�^K�|]%}ttj|d�����'y�w)rNrB)�.0�rows  r/�	<genexpr>zFBaseDistribution._iter_declared_entries_from_record.<locals>.<genexpr>�s%����S�5R�c��G�L�L��Q��(�)�5R�s�+-)r�r��csv�readerr�)r.�texts  r/�"_iter_declared_entries_from_recordz3BaseDistribution._iter_declared_entries_from_record�sG��	��>�>�(�+�D�T�S�Z�Z����@Q�5R�S�S��!�	��	�s�=�	A	�A	c�R��	|jd�}d�|jd��D�}|j}|j}|�|�|S	tj|�j|���js|S�fd�|D�S#t$rYywxYw#t$r|cYSwxYw)Nzinstalled-files.txtc3�&K�|]	}|s�|���y�wr*r<)r��ps  r/r�zFBaseDistribution._iter_declared_entries_from_legacy.<locals>.<genexpr>�s����A�;�q�q��;�s��F)�keependsc3��K�|]7}ttj|�j�j����9y�wr*)rErCrD�parts)r�r��info_rels  �r/r�zFBaseDistribution._iter_declared_entries_from_legacy.<locals>.<genexpr>�s2�����
���
*�'�,�,�q�/�*?�*?����P��s�=A)
r�r�r�rbrqrCrD�relative_tor�r�)r.r��paths�rootr>r�s     @r/�"_iter_declared_entries_from_legacyz3BaseDistribution._iter_declared_entries_from_legacy�s����	��>�>�"7�8�D�B�D�O�O�U�O�;�A���}�}���!�!���<�4�<��L�	��|�|�D�)�5�5�d�;�H��~�~��L�
��
�	
��!�	��	���	��L�	�s#�B	�$B�		B�B�B&�%B&c�F�|j�xs|j�S)a�Iterate through file entries declared in this distribution.

        For modern .dist-info distributions, this is the files listed in the
        ``RECORD`` metadata file. For legacy setuptools distributions, this
        comes from ``installed-files.txt``, with entries normalized to be
        compatible with the format used by ``RECORD``.

        :return: An iterator for listed entries, or None if the distribution
            contains neither ``RECORD`` nor ``installed-files.txt``.
        )r�r�r-s r/�iter_declared_entriesz&BaseDistribution.iter_declared_entries�s&��
�3�3�5�
9��6�6�8�	
r2c#�vK�	|jd�}dx}}|j�D]}}|j�}|r|j	d�r�'|j	d�r6|jd�r%|jd�j
d�\}}}�nt|||�	����y#t$rYywxYw�w)
a�Parse a ``requires.txt`` in an egg-info directory.

        This is an INI-ish format where an egg-info stores dependencies. A
        section name describes extra other environment markers, while each entry
        is an arbitrary string (not a key-value pair) representing a dependency
        as a requirement string (no markers).

        There is a construct in ``importlib.metadata`` called ``Sectioned`` that
        does mostly the same, but the format is currently considered private.
        zrequires.txtNr��#�[�]z[]�:)rHrIrJ)r�r�r�r�r�rw�	partitionrG)r.r�rIrJr�r�s      r/�_iter_requires_txt_entriesz+BaseDistribution._iter_requires_txt_entriess�����	��n�n�^�4�G������&�&�(�D��:�:�<�D��4�?�?�3�/�����s�#��
�
�c�(:�#'�:�:�d�#3�#=�#=�c�#B� ��q�&���D��f�M�M�)��!�	��	�s(�B9�B*�BB9�*	B6�3B9�5B6�6B9c#�K�dh}|j�D]1}t|j�}||vr�|j|�|���3y�w)z'Get extras from the egg-info directory.r�N)r�rrI�add)r.�known_extrasr=rIs    r/�_iter_egg_info_extrasz&BaseDistribution._iter_egg_info_extras$sL�����t���4�4�6�E�%�e�k�k�2�E���$�����U�#��K�7�s�A	Ac#�4K�|j�D]�}t|j�}|r |jrd|j�d|�d�}n$|rd|�d�}n|jr
|j}nd}|r|j�d|�����t|j����y�w)a�Get distribution dependencies from the egg-info directory.

        To ease parsing, this converts a legacy dependency entry into a PEP 508
        requirement string. Like ``_iter_requires_txt_entries()``, there is code
        in ``importlib.metadata`` that does mostly the same, but not do exactly
        what we need.

        Namely, ``importlib.metadata`` does not normalize the extra name before
        putting it into the requirement string, which causes marker comparison
        to fail because the dist-info format do normalize. This is consistent in
        all currently available PEP 517 backends, although not standardized.
        �(z) and extra == "�"z
extra == "r�z ; N)r�rrIrJrH)r.r=rIrJs    r/�_iter_egg_info_dependenciesz,BaseDistribution._iter_egg_info_dependencies.s������4�4�6�E�%�e�k�k�2�E������U�\�\�N�*:�5�'��C���%�e�W�A�.�������������*�*�+�3�v�h�7�7��'�'�'�7�s�BBr�Nc��|jd�s|j�D]}||d<�	|jd�s|j�D]}||d<�	yy)z6Add egg-info requires.txt information to the metadata.z
Requires-DistzProvides-ExtraN)�get_allr�r�)r.r��deprIs    r/r�z'BaseDistribution._add_egg_info_requiresJs_������0��7�7�9��,/���)�:���� 0�1��3�3�5��-2��)�*�6�2r2c��t|j�}|jttd�jjd�d��S)zr
        Return True if given Distribution is installed in
        path matching distutils_scheme layout.
        r��pythonr)r!rnr�r�purelib�split)r.�	norm_paths  r/�in_install_pathz BaseDistribution.in_install_pathSsK��#�4�#:�#:�;�	��#�#�N��r�N�"�"�(�(��2�1�5�%7�8�	8r2)r<)Hr7r8r9�classmethodr;rQ�bytesrWr[rcrer:r
rbrlrnrqr�ruryr}rrr��DistributionVersionrar�rrhr�r�r�r�r�r��InfoPathrsr
r�r�r	r'r��emailr��Messager��	functools�	lru_cacher�r�rrr�r�r`rr�rrr�r�r�r�r�r�rGr�r�r�r�r�r<r2r/rMrMjs����$�s�$�/A�$��$��$� �$��$��	$�

�$��$�"�$�w�$�c�$�6H�$��$�C�#�C�1��1��$�(�3�-�$��$���8�C�=����*�
$�H�S�M�
$��
$��
$�x��}�
$��
$��
5��
5��
5��	)�$�	)��	)��4�D�4��4�"�
4�$�
4��
4��$��$��$��$�,�$��$��/�S�/��/���H�Y�/����2�	�3�	��	��)�4�)��)��4�$�4��4��1�t�1��1��M�T�M��M�
�Q�$�Q��Q�
$�H�$��$�$�X�c�]�$�$�h�$�3�$�$�8�N�#;�$�$��
�
� 5� 5�$��Y����#��%�-�-�"7�"7��$���'�%�-�-�/�/�'��'��*�t�C��H�~�*��*��5�(�3�-�5��5��>�#�>��>�������$$�
�3��$��+�AV�$�$�h�s�m�$�$�s�$�t�$�T�H�X�c�]�4K�T�
�H�X�c�]�4K�
�*
�x���
�'>�
� N�H�]�,C�N�2�x��}��(�X�c�]�(�83�u�}�}�/D�/D�3��3��8��8��8r2rMc��eZdZdZedd��Zedeeeddfd��Z	dededfd�Z
dedfd	�Zdee
fd
�Zdedddfd
edeededededee
fd�Zy)�BaseEnvironmentz6An environment containing distributions to introspect.r(c��t��r*r+)rPs r/�defaultzBaseEnvironment.defaultar1r2r�c��t��r*r+)rPr�s  r/�
from_pathszBaseEnvironment.from_pathser1r2r0rMc��t��)z�Given a requirement name, return the installed distributions.

        The name may not be normalized. The implementation must canonicalize
        it for lookup.
        r+)r.r0s  r/�get_distributionz BaseEnvironment.get_distributionirRr2c��t��)aIterate through installed distributions.

        This function should be implemented by subclass, but never called
        directly. Use the public ``iter_distribution()`` instead, which
        implements additional logic to make sure the distributions are valid.
        r+r-s r/�_iter_distributionsz#BaseEnvironment._iter_distributionsqr�r2c#�K�|j�D]d}tjd|jtj��}|s,t
j
d|j|j��a|���fy�w)zBIterate through all installed distributions without any filtering.z)^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$)�flagsz%Ignoring invalid distribution %s (%s)N)r�re�matchr��
IGNORECASEr�r�rb)r.�dist�project_name_valids   r/�iter_all_distributionsz&BaseEnvironment.iter_all_distributionszsk�����,�,�.�D�
"$���<��#�#��m�m�"��
&����;��'�'��M�M��
��J�#/�s�A9A;TF�
local_only�skip�include_editables�editables_only�	user_onlyc���|j�}|r	d�|D�}|s	d�|D�}|r	d�|D�}|r	d�|D�}�fd�|D�S)a/Return a list of installed distributions.

        This is based on ``iter_all_distributions()`` with additional filtering
        options. Note that ``iter_installed_distributions()`` without arguments
        is *not* equal to ``iter_all_distributions()``, since some of the
        configurations exclude packages by default.

        :param local_only: If True (default), only return installations
        local to the current virtualenv, if in a virtualenv.
        :param skip: An iterable of canonicalized project names to ignore;
            defaults to ``stdlib_pkgs``.
        :param include_editables: If False, don't report editables.
        :param editables_only: If True, only report editables.
        :param user_only: If True, only report installations in the user
        site directory.
        c3�:K�|]}|js�|���y�wr*)r��r��ds  r/r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s����+�R��1�7�7�!�R����c3�:K�|]}|jr�|���y�wr*�r�r s  r/r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s����2�R��q�z�z�!�R�r"c3�:K�|]}|js�|���y�wr*r$r s  r/r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s����.�R��1�:�:�!�R�r"c3�:K�|]}|js�|���y�wr*)r�r s  r/r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s����1�R��1�=�=�!�R�r"c3�@�K�|]}|j�vs�|���y�wr*)r�)r�r!rs  �r/r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s�����>�2�a��!1�!1��!=��2�s��)r)r.rrrrr�its  `    r/�iter_installed_distributionsz,BaseEnvironment.iter_installed_distributions�sR���0�
(�
(�
*���+�R�+�B� �2�R�2�B��.�R�.�B��1�R�1�B�>�2�>�>r2N)r(r)r7r8r9�__doc__r�r
r
rr;rrr
rrMrrr�rr)r<r2r/rr^s���@��$��$��$�x��S�	�2�$�7H�$��$�$�S�$�X�6H�-I�$�$�X�.@�%A�$���1A�(B��. �*�"&�$��
!?��!?���n�!?� �	!?�
�!?��
!?�
�"�	#�!?r2rc�8�eZdZUeed<dejfd�Zy)rYrbr(c��t��r*r+r-s r/�
as_zipfilezWheel.as_zipfile�r�r2N)r7r8r9r;rK�zipfile�ZipFiler-r<r2r/rYrY�s���M�$�G�O�O�$r2rYc�<�eZdZdeddfd�Zdejfd�Zy)�FilesystemWheelrbr(Nc��||_yr*)rbrxs  r/�__init__zFilesystemWheel.__init__�s	�� ��
r2c�D�tj|jd��S�NT)�
allowZip64)r.r/rbr-s r/r-zFilesystemWheel.as_zipfile�s�����t�}�}��>�>r2)r7r8r9r;r3r.r/r-r<r2r/r1r1�s%��!��!��!�?�G�O�O�?r2r1c�F�eZdZdedeeddfd�Zdejfd�Z	y)�MemoryWheelrb�streamr(Nc� �||_||_yr*)rbr9)r.rbr9s   r/r3zMemoryWheel.__init__�s�� ��
���r2c�D�tj|jd��Sr5)r.r/r9r-s r/r-zMemoryWheel.as_zipfile�s�����t�{�{�t�<�<r2)
r7r8r9r;rrr3r.r/r-r<r2r/r8r8�s0�����b��i��D��=�G�O�O�=r2r8)Hr��
email.messagerrr��loggingrCrr.�typingrrrrrrr	r
rrr
rr�"pip._vendor.packaging.requirementsr� pip._vendor.packaging.specifiersrr�pip._vendor.packaging.utilsrr�pip._vendor.packaging.versionrr�pip._internal.exceptionsr�pip._internal.locationsrrr�pip._internal.models.direct_urlrrr�pip._internal.utils.compatr�pip._internal.utils.egg_linkr�pip._internal.utils.miscr r!�pip._internal.utils.urlsr"�_jsonr$r%�objectrr;�PurePathr�	getLoggerr7r�r'rErGrMrrYr1r8r<r2r/�<module>rNs,��
������	������ ;�K�I�@�6�H�H���
3�D�=�0�����H��M�7�2�3����g�&�&�&�'��	��	�	�8�	$��$�X�$�,���c��?�,�
��S��/�,�	�,�<�J��q8�x�q8�hR?�R?�j$�H�$�?�e�?�=�%�=r2python3.12/site-packages/pip/_internal/metadata/__pycache__/pkg_resources.cpython-312.pyc000064400000036703151732701520025236 0ustar00�

R`i3'��j�ddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZddlmZmZddlmZddlmZmZmZddlmZdd	lmZm Z dd
l!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*gd
�Z+ejXe-�Z.dZ/Gd�de�Z0Gd�d�Z1Gd�de%�Z2Gd�de'�Z3y)�N)�
Collection�Iterable�Iterator�List�Mapping�
NamedTuple�Optional)�
pkg_resources)�Requirement)�NormalizedName�canonicalize_name)�parse)�InvalidWheel�NoneMetadataError�UnsupportedWheel)�egg_link_path_from_location)�display_path�normalize_path)�parse_wheel�read_wheel_metadata_file�)�BaseDistribution�BaseEntryPoint�BaseEnvironment�DistributionVersion�InfoPath�Wheel)�NAME�Distribution�Environmentr
c�,�eZdZUeed<eed<eed<y)�
EntryPoint�name�value�groupN)�__name__�
__module__�__qualname__�str�__annotations__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/metadata/pkg_resources.pyr"r""s��

�I��J��Jr,r"c��eZdZdZdeeefdeddfd�Zdedefd�Z	dedefd	�Z
dedeefd
�Zdedefd�Z
dedeefd�Zd
ededdfd�Zy)�InMemoryMetadataz�IMetadataProvider that reads metadata files from a dictionary.

    This also maps metadata decoding exceptions to our internal exception type.
    �metadata�
wheel_name�returnNc� �||_||_y�N)�	_metadata�_wheel_name)�selfr0r1s   r-�__init__zInMemoryMetadata.__init__.s��!���%��r,r#c��||jvSr4)r5�r7r#s  r-�has_metadatazInMemoryMetadata.has_metadata2s���t�~�~�%�%r,c
��	|j|j�S#t$r$}td|j�d|�d|�d���d}~wwxYw)NzError decoding metadata for z: z in z file)r5�decode�UnicodeDecodeErrorrr6)r7r#�es   r-�get_metadatazInMemoryMetadata.get_metadata5s[��	��>�>�$�'�.�.�0�0��!�	�"�.�t�/?�/?�.@��1�#�T�$��u�U��
��	�s��	A�A�Ac�J�tj|j|��Sr4)r
�yield_linesr@r:s  r-�get_metadata_linesz#InMemoryMetadata.get_metadata_lines>s���(�(��):�):�4�)@�A�Ar,c��y�NFr+r:s  r-�metadata_isdirzInMemoryMetadata.metadata_isdirAs��r,c��gSr4r+r:s  r-�metadata_listdirz!InMemoryMetadata.metadata_listdirDs���	r,�script_name�	namespacec��yr4r+)r7rIrJs   r-�
run_scriptzInMemoryMetadata.run_scriptGs��r,)r&r'r(�__doc__rr)�bytesr8�boolr;r@rrCrFrrHrLr+r,r-r/r/(s����
&���e��!4�&�#�&�$�&�&��&��&������B�s�B�x��}�B��3��4���S��T�#�Y��
�c�
�c�
�d�
r,r/c	���eZdZdejddfd�Zededefd��Z	ede
ded	edefd
��Zedededefd
��Z
edeefd��Zedeefd��Zedeefd��Zedefd��Zedefd��Zedefd��Zdedefd�Zdeefd�Zdedefd�Zdeefd�Z de!jDjFfd�Z$dde%edee&fd�Z'deefd�Z(dedefd�Z)y) r�distr2Nc��||_yr4)�_dist�r7rQs  r-r8zDistribution.__init__Ls	����
r,�	directoryc��|jtj�}tjj	|�\}}tj||�}|jd�r3t
j}tjj|�d}nW|jd�sJ�t
j}tjj|�dj	d�d}||||��}||�S)Nz	.egg-inforz
.dist-info�-)�project_namer0)�rstrip�os�sep�path�splitr
�PathMetadata�endswithr�splitext�DistInfoDistribution)	�clsrU�dist_dir�base_dir�
dist_dir_namer0�dist_cls�	dist_namerQs	         r-�from_directoryzDistribution.from_directoryOs����#�#�B�F�F�+��#%�'�'�-�-��"9���-� �-�-�h��A�����[�)�$�1�1�H����(�(��7��:�I��$�$�\�2�2�2�$�9�9�H����(�(��7��:�@�@��E�a�H�I���y�8�L���4�y�r,�metadata_contents�filenamerXc�^�d|i}tj|t||�|��}||�S)N�METADATA��locationr0rX)r
rar/)rbrirjrX�
metadata_dictrQs      r-�from_metadata_file_contentsz(Distribution.from_metadata_file_contentscs?��
�)�
�
��1�1��%�m�X�>�%�
��
�4�y�r,�wheelr#c	�,�	|j�5}t||�\}}|j�D�cic]6}|j|�d��r |j	dd�dt||���8}}ddd�tj|jt|j�|��}	||	�Scc}w#1swY�LxYw#tj$r}t|j|�|�d}~wt$r}t|�d|����d}~wwxYw)N�/r���z has an invalid wheel, rm)�
as_zipfiler�namelist�
startswithr]r�zipfile�
BadZipFilerrnrr
rar/)
rbrqr#�zf�info_dir�_r\ror?rQs
          r-�
from_wheelzDistribution.from_wheelts��	H��!�!�#�r�)�"�d�3���!�!#���
�!� -�����(��1�~�6��J�J�s�A�&�r�*�,D�R��,N�N� -��!�$��1�1��^�^�%�m�U�^�^�D��
��
�4�y���!�$�#���!�!�	<��u�~�~�t�4�!�;���	H�"�d�V�+B�1�#�#F�G�G��	H�sK�C�"B<�;B7�/B<�1C�7B<�<C�C�D�C2�2D�>D�Dc�.�|jjSr4)rSrn�r7s r-rnzDistribution.location�����z�z�"�"�"r,c��t|j�}|r
|}t|�S|jr|j}t|�Syr4)r�raw_namernr)r7�egg_linkrns   r-�installed_locationzDistribution.installed_location�sI��.�t�}�}�=����H�
�h�'�'�	�]�]��}�}�H��h�'�'�r,c�.�|jjSr4)rS�egg_infors r-�
info_locationzDistribution.info_location�r�r,c�t�	t|jjj�S#t$rYywxYwrE)rOrS�	_providerr\�AttributeErrorrs r-�installed_by_distutilsz#Distribution.installed_by_distutils�s4��
	���
�
�,�,�1�1�2�2���	��	�s�(+�	7�7c�@�t|jj�Sr4)r
rSrXrs r-�canonical_namezDistribution.canonical_name�s�� ����!8�!8�9�9r,c�@�t|jj�Sr4)�
parse_versionrS�versionrs r-r�zDistribution.version�s���T�Z�Z�/�/�0�0r,r\c�J�|jjt|��Sr4)rSr;r))r7r\s  r-�is_filezDistribution.is_file�s���z�z�&�&�s�4�y�1�1r,c#�VK�|jjd�Ed{���y7��w)N�scripts)rSrHrs r-�iter_distutils_script_namesz(Distribution.iter_distutils_script_names�s�����:�:�.�.�y�9�9�9�s�)�'�)c��t|�}|jj|�st|��|jj	|�}|�t||��|Sr4)r)rSr;�FileNotFoundErrorr@r)r7r\r#�contents    r-�	read_textzDistribution.read_text�sS���4�y���z�z�&�&�t�,�#�D�)�)��*�*�)�)�$�/���?�#�D�$�/�/��r,c#�0K�|jj�j�D]g\}}|j�D]O\}}t|�j	d�\}}}t|j
�|j
�|�����Q�iy�w)N�=)r#r$r%)rS�
get_entry_map�itemsr)�	partitionr"�strip)r7r%�entriesr#�entry_pointr|r$s       r-�iter_entry_pointszDistribution.iter_entry_points�sv����"�j�j�6�6�8�>�>�@�N�E�7�%,�]�]�_�!��k�!$�[�!1�!;�!;�C�!@���a�� �d�j�j�l�%�+�+�-�u�U�U�&5�A�s�BBc��t|jtj�rd}nd}	|j	|�}tjj�}|j|�|j�S#t
$rR|jrt|j�}nt|j�}tjd|�d}Y��wxYw)z�
        :raises NoneMetadataError: if the distribution reports `has_metadata()`
            True but `get_metadata()` returns None.
        rlzPKG-INFOzNo metadata found in %s�)�
isinstancerSr
rar�r�rnr�repr�logger�warning�email�parser�
FeedParser�feed�close)r7�
metadata_namer0�displaying_path�feed_parsers     r-�_metadata_implzDistribution._metadata_impl�s���
�d�j�j�-�"D�"D�E�&�M�&�M�	��~�~�m�4�H��l�l�-�-�/������"�� � �"�"��!�	��}�}�".�t�}�}�"=��"&�t�}�}�"5���N�N�4�o�F��H�
	�s�A;�;AC�C�extrasc��|r7td�|D��}|j|jj�}|jj	|�S)Nc3�FK�|]}tj|����y�wr4)r
�
safe_extra)�.0r?s  r-�	<genexpr>z1Distribution.iter_dependencies.<locals>.<genexpr>�s����K�F�q�}�7�7��:�F�s�!)�	frozenset�intersectionrSr��requires)r7r�s  r-�iter_dependencieszDistribution.iter_dependencies�sD����K�F�K�K�F��(�(����):�):�;�F��z�z�"�"�6�*�*r,c�.�|jjSr4)rSr�rs r-�iter_provided_extrasz!Distribution.iter_provided_extras�s���z�z� � � r,�extrac�X�tj|�|jjvSr4)r
r�rSr�)r7r�s  r-�is_extra_providedzDistribution.is_extra_provided�s"���'�'��.�$�*�*�2C�2C�C�Cr,)r+)*r&r'r(r
rr8�classmethodr)rrhrNrprr}�propertyr	rnr�r�rOr�rr�rr�rr�rr�r�rrr�r��message�Messager�rrr�r�r�r+r,r-rrKs����]�7�7��D����s��/?����&�� �����	�

���� ��u��C��4D����(�#�(�3�-�#��#��(�H�S�M�(��(��#�x��}�#��#��������:��:��:��1�,�1��1�2�H�2��2�:�X�c�]�:��h��3��V�8�N�#;�V�#��
�
� 5� 5�#�,+�
�3��+��+�AV�+�!�h�s�m�!�D�s�D�t�Dr,rc��eZdZdejddfd�Zedefd��Zede	e
edefd��Zde
efd�Zd	ede	efd
�Zd	ede	efd�Zy)r �wsr2Nc��||_yr4)�_ws)r7r�s  r-r8zEnvironment.__init__�s	����r,c�.�|tj�Sr4)r
�working_set)rbs r-�defaultzEnvironment.default�s���=�,�,�-�-r,�pathsc�8�|tj|��Sr4)r
�
WorkingSet)rbr�s  r-�
from_pathszEnvironment.from_paths�s���=�+�+�E�2�3�3r,c#�HK�|jD]}t|����y�wr4)r�rrTs  r-�_iter_distributionszEnvironment._iter_distributions�s�����H�H�D��t�$�$��s� "r#c�j�t|�}|j�D]}|j|k(s�|cSy)z�Find a distribution matching the ``name`` in the environment.

        This searches from *all* distributions available in the environment, to
        match the behavior of ``pkg_resources.get_distribution()``.
        N)r
�iter_all_distributionsr�)r7r#r�rQs    r-�_search_distributionz Environment._search_distribution�s9��+�4�0���/�/�1�D��"�"�n�4���2�r,c��|j|�}|r|S	|jj|�|j|�S#tj$rYywxYwr4)r�r��requirer
�DistributionNotFound)r7r#rQs   r-�get_distributionzEnvironment.get_distributions`���(�(��.����K�	�
�H�H���T�"��(�(��.�.���1�1�	��	�s�A�A�A)r&r'r(r
r�r8r�rr�r	rr)r�rrr�r�r�r+r,r-r r �s����=�3�3�����.��.��.��4�x��S�	�2�4��4��4�%�X�.>�%?�%�
��
��:J�1K�
�/�S�/�X�6F�-G�/r,r )4�
email.messager��email.parser�loggingrZrx�typingrrrrrrr	�pip._vendorr
�"pip._vendor.packaging.requirementsr�pip._vendor.packaging.utilsrr
�pip._vendor.packaging.versionrr��pip._internal.exceptionsrrr�pip._internal.utils.egg_linkr�pip._internal.utils.miscrr�pip._internal.utils.wheelrr�baserrrrrr�__all__�	getLoggerr&r�rr"r/rr r+r,r-�<module>r�s������	��V�V�V�%�:�I�@�V�V�D�A�K���2��	��	�	�8�	$������� 
� 
�FXD�#�XD�v0/�/�0/r,python3.12/site-packages/pip/_internal/metadata/base.py000064400000063236151732701520016735 0ustar00import csv
import email.message
import functools
import json
import logging
import pathlib
import re
import zipfile
from typing import (
    IO,
    TYPE_CHECKING,
    Any,
    Collection,
    Container,
    Dict,
    Iterable,
    Iterator,
    List,
    NamedTuple,
    Optional,
    Tuple,
    Union,
)

from pip._vendor.packaging.requirements import Requirement
from pip._vendor.packaging.specifiers import InvalidSpecifier, SpecifierSet
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from pip._vendor.packaging.version import LegacyVersion, Version

from pip._internal.exceptions import NoneMetadataError
from pip._internal.locations import get_scheme, site_packages, user_site
from pip._internal.models.direct_url import (
    DIRECT_URL_METADATA_NAME,
    DirectUrl,
    DirectUrlValidationError,
)
from pip._internal.utils.compat import stdlib_pkgs  # TODO: Move definition here.
from pip._internal.utils.egg_link import egg_link_path_from_sys_path
from pip._internal.utils.misc import is_local, normalize_path
from pip._internal.utils.urls import url_to_path

from ._json import msg_to_json

if TYPE_CHECKING:
    from typing import Protocol
else:
    Protocol = object

DistributionVersion = Union[LegacyVersion, Version]

InfoPath = Union[str, pathlib.PurePath]

logger = logging.getLogger(__name__)


class BaseEntryPoint(Protocol):
    @property
    def name(self) -> str:
        raise NotImplementedError()

    @property
    def value(self) -> str:
        raise NotImplementedError()

    @property
    def group(self) -> str:
        raise NotImplementedError()


def _convert_installed_files_path(
    entry: Tuple[str, ...],
    info: Tuple[str, ...],
) -> str:
    """Convert a legacy installed-files.txt path into modern RECORD path.

    The legacy format stores paths relative to the info directory, while the
    modern format stores paths relative to the package root, e.g. the
    site-packages directory.

    :param entry: Path parts of the installed-files.txt entry.
    :param info: Path parts of the egg-info directory relative to package root.
    :returns: The converted entry.

    For best compatibility with symlinks, this does not use ``abspath()`` or
    ``Path.resolve()``, but tries to work with path parts:

    1. While ``entry`` starts with ``..``, remove the equal amounts of parts
       from ``info``; if ``info`` is empty, start appending ``..`` instead.
    2. Join the two directly.
    """
    while entry and entry[0] == "..":
        if not info or info[-1] == "..":
            info += ("..",)
        else:
            info = info[:-1]
        entry = entry[1:]
    return str(pathlib.Path(*info, *entry))


class RequiresEntry(NamedTuple):
    requirement: str
    extra: str
    marker: str


class BaseDistribution(Protocol):
    @classmethod
    def from_directory(cls, directory: str) -> "BaseDistribution":
        """Load the distribution from a metadata directory.

        :param directory: Path to a metadata directory, e.g. ``.dist-info``.
        """
        raise NotImplementedError()

    @classmethod
    def from_metadata_file_contents(
        cls,
        metadata_contents: bytes,
        filename: str,
        project_name: str,
    ) -> "BaseDistribution":
        """Load the distribution from the contents of a METADATA file.

        This is used to implement PEP 658 by generating a "shallow" dist object that can
        be used for resolution without downloading or building the actual dist yet.

        :param metadata_contents: The contents of a METADATA file.
        :param filename: File name for the dist with this metadata.
        :param project_name: Name of the project this dist represents.
        """
        raise NotImplementedError()

    @classmethod
    def from_wheel(cls, wheel: "Wheel", name: str) -> "BaseDistribution":
        """Load the distribution from a given wheel.

        :param wheel: A concrete wheel definition.
        :param name: File name of the wheel.

        :raises InvalidWheel: Whenever loading of the wheel causes a
            :py:exc:`zipfile.BadZipFile` exception to be thrown.
        :raises UnsupportedWheel: If the wheel is a valid zip, but malformed
            internally.
        """
        raise NotImplementedError()

    def __repr__(self) -> str:
        return f"{self.raw_name} {self.version} ({self.location})"

    def __str__(self) -> str:
        return f"{self.raw_name} {self.version}"

    @property
    def location(self) -> Optional[str]:
        """Where the distribution is loaded from.

        A string value is not necessarily a filesystem path, since distributions
        can be loaded from other sources, e.g. arbitrary zip archives. ``None``
        means the distribution is created in-memory.

        Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
        this is a symbolic link, we want to preserve the relative path between
        it and files in the distribution.
        """
        raise NotImplementedError()

    @property
    def editable_project_location(self) -> Optional[str]:
        """The project location for editable distributions.

        This is the directory where pyproject.toml or setup.py is located.
        None if the distribution is not installed in editable mode.
        """
        # TODO: this property is relatively costly to compute, memoize it ?
        direct_url = self.direct_url
        if direct_url:
            if direct_url.is_local_editable():
                return url_to_path(direct_url.url)
        else:
            # Search for an .egg-link file by walking sys.path, as it was
            # done before by dist_is_editable().
            egg_link_path = egg_link_path_from_sys_path(self.raw_name)
            if egg_link_path:
                # TODO: get project location from second line of egg_link file
                #       (https://github.com/pypa/pip/issues/10243)
                return self.location
        return None

    @property
    def installed_location(self) -> Optional[str]:
        """The distribution's "installed" location.

        This should generally be a ``site-packages`` directory. This is
        usually ``dist.location``, except for legacy develop-installed packages,
        where ``dist.location`` is the source code location, and this is where
        the ``.egg-link`` file is.

        The returned location is normalized (in particular, with symlinks removed).
        """
        raise NotImplementedError()

    @property
    def info_location(self) -> Optional[str]:
        """Location of the .[egg|dist]-info directory or file.

        Similarly to ``location``, a string value is not necessarily a
        filesystem path. ``None`` means the distribution is created in-memory.

        For a modern .dist-info installation on disk, this should be something
        like ``{location}/{raw_name}-{version}.dist-info``.

        Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
        this is a symbolic link, we want to preserve the relative path between
        it and other files in the distribution.
        """
        raise NotImplementedError()

    @property
    def installed_by_distutils(self) -> bool:
        """Whether this distribution is installed with legacy distutils format.

        A distribution installed with "raw" distutils not patched by setuptools
        uses one single file at ``info_location`` to store metadata. We need to
        treat this specially on uninstallation.
        """
        info_location = self.info_location
        if not info_location:
            return False
        return pathlib.Path(info_location).is_file()

    @property
    def installed_as_egg(self) -> bool:
        """Whether this distribution is installed as an egg.

        This usually indicates the distribution was installed by (older versions
        of) easy_install.
        """
        location = self.location
        if not location:
            return False
        return location.endswith(".egg")

    @property
    def installed_with_setuptools_egg_info(self) -> bool:
        """Whether this distribution is installed with the ``.egg-info`` format.

        This usually indicates the distribution was installed with setuptools
        with an old pip version or with ``single-version-externally-managed``.

        Note that this ensure the metadata store is a directory. distutils can
        also installs an ``.egg-info``, but as a file, not a directory. This
        property is *False* for that case. Also see ``installed_by_distutils``.
        """
        info_location = self.info_location
        if not info_location:
            return False
        if not info_location.endswith(".egg-info"):
            return False
        return pathlib.Path(info_location).is_dir()

    @property
    def installed_with_dist_info(self) -> bool:
        """Whether this distribution is installed with the "modern format".

        This indicates a "modern" installation, e.g. storing metadata in the
        ``.dist-info`` directory. This applies to installations made by
        setuptools (but through pip, not directly), or anything using the
        standardized build backend interface (PEP 517).
        """
        info_location = self.info_location
        if not info_location:
            return False
        if not info_location.endswith(".dist-info"):
            return False
        return pathlib.Path(info_location).is_dir()

    @property
    def canonical_name(self) -> NormalizedName:
        raise NotImplementedError()

    @property
    def version(self) -> DistributionVersion:
        raise NotImplementedError()

    @property
    def setuptools_filename(self) -> str:
        """Convert a project name to its setuptools-compatible filename.

        This is a copy of ``pkg_resources.to_filename()`` for compatibility.
        """
        return self.raw_name.replace("-", "_")

    @property
    def direct_url(self) -> Optional[DirectUrl]:
        """Obtain a DirectUrl from this distribution.

        Returns None if the distribution has no `direct_url.json` metadata,
        or if `direct_url.json` is invalid.
        """
        try:
            content = self.read_text(DIRECT_URL_METADATA_NAME)
        except FileNotFoundError:
            return None
        try:
            return DirectUrl.from_json(content)
        except (
            UnicodeDecodeError,
            json.JSONDecodeError,
            DirectUrlValidationError,
        ) as e:
            logger.warning(
                "Error parsing %s for %s: %s",
                DIRECT_URL_METADATA_NAME,
                self.canonical_name,
                e,
            )
            return None

    @property
    def installer(self) -> str:
        try:
            installer_text = self.read_text("INSTALLER")
        except (OSError, ValueError, NoneMetadataError):
            return ""  # Fail silently if the installer file cannot be read.
        for line in installer_text.splitlines():
            cleaned_line = line.strip()
            if cleaned_line:
                return cleaned_line
        return ""

    @property
    def requested(self) -> bool:
        return self.is_file("REQUESTED")

    @property
    def editable(self) -> bool:
        return bool(self.editable_project_location)

    @property
    def local(self) -> bool:
        """If distribution is installed in the current virtual environment.

        Always True if we're not in a virtualenv.
        """
        if self.installed_location is None:
            return False
        return is_local(self.installed_location)

    @property
    def in_usersite(self) -> bool:
        if self.installed_location is None or user_site is None:
            return False
        return self.installed_location.startswith(normalize_path(user_site))

    @property
    def in_site_packages(self) -> bool:
        if self.installed_location is None or site_packages is None:
            return False
        return self.installed_location.startswith(normalize_path(site_packages))

    def is_file(self, path: InfoPath) -> bool:
        """Check whether an entry in the info directory is a file."""
        raise NotImplementedError()

    def iter_distutils_script_names(self) -> Iterator[str]:
        """Find distutils 'scripts' entries metadata.

        If 'scripts' is supplied in ``setup.py``, distutils records those in the
        installed distribution's ``scripts`` directory, a file for each script.
        """
        raise NotImplementedError()

    def read_text(self, path: InfoPath) -> str:
        """Read a file in the info directory.

        :raise FileNotFoundError: If ``path`` does not exist in the directory.
        :raise NoneMetadataError: If ``path`` exists in the info directory, but
            cannot be read.
        """
        raise NotImplementedError()

    def iter_entry_points(self) -> Iterable[BaseEntryPoint]:
        raise NotImplementedError()

    def _metadata_impl(self) -> email.message.Message:
        raise NotImplementedError()

    @functools.lru_cache(maxsize=1)
    def _metadata_cached(self) -> email.message.Message:
        # When we drop python 3.7 support, move this to the metadata property and use
        # functools.cached_property instead of lru_cache.
        metadata = self._metadata_impl()
        self._add_egg_info_requires(metadata)
        return metadata

    @property
    def metadata(self) -> email.message.Message:
        """Metadata of distribution parsed from e.g. METADATA or PKG-INFO.

        This should return an empty message if the metadata file is unavailable.

        :raises NoneMetadataError: If the metadata file is available, but does
            not contain valid metadata.
        """
        return self._metadata_cached()

    @property
    def metadata_dict(self) -> Dict[str, Any]:
        """PEP 566 compliant JSON-serializable representation of METADATA or PKG-INFO.

        This should return an empty dict if the metadata file is unavailable.

        :raises NoneMetadataError: If the metadata file is available, but does
            not contain valid metadata.
        """
        return msg_to_json(self.metadata)

    @property
    def metadata_version(self) -> Optional[str]:
        """Value of "Metadata-Version:" in distribution metadata, if available."""
        return self.metadata.get("Metadata-Version")

    @property
    def raw_name(self) -> str:
        """Value of "Name:" in distribution metadata."""
        # The metadata should NEVER be missing the Name: key, but if it somehow
        # does, fall back to the known canonical name.
        return self.metadata.get("Name", self.canonical_name)

    @property
    def requires_python(self) -> SpecifierSet:
        """Value of "Requires-Python:" in distribution metadata.

        If the key does not exist or contains an invalid value, an empty
        SpecifierSet should be returned.
        """
        value = self.metadata.get("Requires-Python")
        if value is None:
            return SpecifierSet()
        try:
            # Convert to str to satisfy the type checker; this can be a Header object.
            spec = SpecifierSet(str(value))
        except InvalidSpecifier as e:
            message = "Package %r has an invalid Requires-Python: %s"
            logger.warning(message, self.raw_name, e)
            return SpecifierSet()
        return spec

    def iter_dependencies(self, extras: Collection[str] = ()) -> Iterable[Requirement]:
        """Dependencies of this distribution.

        For modern .dist-info distributions, this is the collection of
        "Requires-Dist:" entries in distribution metadata.
        """
        raise NotImplementedError()

    def iter_provided_extras(self) -> Iterable[str]:
        """Extras provided by this distribution.

        For modern .dist-info distributions, this is the collection of
        "Provides-Extra:" entries in distribution metadata.

        The return value of this function is not particularly useful other than
        display purposes due to backward compatibility issues and the extra
        names being poorly normalized prior to PEP 685. If you want to perform
        logic operations on extras, use :func:`is_extra_provided` instead.
        """
        raise NotImplementedError()

    def is_extra_provided(self, extra: str) -> bool:
        """Check whether an extra is provided by this distribution.

        This is needed mostly for compatibility issues with pkg_resources not
        following the extra normalization rules defined in PEP 685.
        """
        raise NotImplementedError()

    def _iter_declared_entries_from_record(self) -> Optional[Iterator[str]]:
        try:
            text = self.read_text("RECORD")
        except FileNotFoundError:
            return None
        # This extra Path-str cast normalizes entries.
        return (str(pathlib.Path(row[0])) for row in csv.reader(text.splitlines()))

    def _iter_declared_entries_from_legacy(self) -> Optional[Iterator[str]]:
        try:
            text = self.read_text("installed-files.txt")
        except FileNotFoundError:
            return None
        paths = (p for p in text.splitlines(keepends=False) if p)
        root = self.location
        info = self.info_location
        if root is None or info is None:
            return paths
        try:
            info_rel = pathlib.Path(info).relative_to(root)
        except ValueError:  # info is not relative to root.
            return paths
        if not info_rel.parts:  # info *is* root.
            return paths
        return (
            _convert_installed_files_path(pathlib.Path(p).parts, info_rel.parts)
            for p in paths
        )

    def iter_declared_entries(self) -> Optional[Iterator[str]]:
        """Iterate through file entries declared in this distribution.

        For modern .dist-info distributions, this is the files listed in the
        ``RECORD`` metadata file. For legacy setuptools distributions, this
        comes from ``installed-files.txt``, with entries normalized to be
        compatible with the format used by ``RECORD``.

        :return: An iterator for listed entries, or None if the distribution
            contains neither ``RECORD`` nor ``installed-files.txt``.
        """
        return (
            self._iter_declared_entries_from_record()
            or self._iter_declared_entries_from_legacy()
        )

    def _iter_requires_txt_entries(self) -> Iterator[RequiresEntry]:
        """Parse a ``requires.txt`` in an egg-info directory.

        This is an INI-ish format where an egg-info stores dependencies. A
        section name describes extra other environment markers, while each entry
        is an arbitrary string (not a key-value pair) representing a dependency
        as a requirement string (no markers).

        There is a construct in ``importlib.metadata`` called ``Sectioned`` that
        does mostly the same, but the format is currently considered private.
        """
        try:
            content = self.read_text("requires.txt")
        except FileNotFoundError:
            return
        extra = marker = ""  # Section-less entries don't have markers.
        for line in content.splitlines():
            line = line.strip()
            if not line or line.startswith("#"):  # Comment; ignored.
                continue
            if line.startswith("[") and line.endswith("]"):  # A section header.
                extra, _, marker = line.strip("[]").partition(":")
                continue
            yield RequiresEntry(requirement=line, extra=extra, marker=marker)

    def _iter_egg_info_extras(self) -> Iterable[str]:
        """Get extras from the egg-info directory."""
        known_extras = {""}
        for entry in self._iter_requires_txt_entries():
            extra = canonicalize_name(entry.extra)
            if extra in known_extras:
                continue
            known_extras.add(extra)
            yield extra

    def _iter_egg_info_dependencies(self) -> Iterable[str]:
        """Get distribution dependencies from the egg-info directory.

        To ease parsing, this converts a legacy dependency entry into a PEP 508
        requirement string. Like ``_iter_requires_txt_entries()``, there is code
        in ``importlib.metadata`` that does mostly the same, but not do exactly
        what we need.

        Namely, ``importlib.metadata`` does not normalize the extra name before
        putting it into the requirement string, which causes marker comparison
        to fail because the dist-info format do normalize. This is consistent in
        all currently available PEP 517 backends, although not standardized.
        """
        for entry in self._iter_requires_txt_entries():
            extra = canonicalize_name(entry.extra)
            if extra and entry.marker:
                marker = f'({entry.marker}) and extra == "{extra}"'
            elif extra:
                marker = f'extra == "{extra}"'
            elif entry.marker:
                marker = entry.marker
            else:
                marker = ""
            if marker:
                yield f"{entry.requirement} ; {marker}"
            else:
                yield entry.requirement

    def _add_egg_info_requires(self, metadata: email.message.Message) -> None:
        """Add egg-info requires.txt information to the metadata."""
        if not metadata.get_all("Requires-Dist"):
            for dep in self._iter_egg_info_dependencies():
                metadata["Requires-Dist"] = dep
        if not metadata.get_all("Provides-Extra"):
            for extra in self._iter_egg_info_extras():
                metadata["Provides-Extra"] = extra

    @property
    def in_install_path(self) -> bool:
        """
        Return True if given Distribution is installed in
        path matching distutils_scheme layout.
        """
        norm_path = normalize_path(self.installed_location)
        return norm_path.startswith(normalize_path(
            get_scheme("").purelib.split('python')[0]))


class BaseEnvironment:
    """An environment containing distributions to introspect."""

    @classmethod
    def default(cls) -> "BaseEnvironment":
        raise NotImplementedError()

    @classmethod
    def from_paths(cls, paths: Optional[List[str]]) -> "BaseEnvironment":
        raise NotImplementedError()

    def get_distribution(self, name: str) -> Optional["BaseDistribution"]:
        """Given a requirement name, return the installed distributions.

        The name may not be normalized. The implementation must canonicalize
        it for lookup.
        """
        raise NotImplementedError()

    def _iter_distributions(self) -> Iterator["BaseDistribution"]:
        """Iterate through installed distributions.

        This function should be implemented by subclass, but never called
        directly. Use the public ``iter_distribution()`` instead, which
        implements additional logic to make sure the distributions are valid.
        """
        raise NotImplementedError()

    def iter_all_distributions(self) -> Iterator[BaseDistribution]:
        """Iterate through all installed distributions without any filtering."""
        for dist in self._iter_distributions():
            # Make sure the distribution actually comes from a valid Python
            # packaging distribution. Pip's AdjacentTempDirectory leaves folders
            # e.g. ``~atplotlib.dist-info`` if cleanup was interrupted. The
            # valid project name pattern is taken from PEP 508.
            project_name_valid = re.match(
                r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$",
                dist.canonical_name,
                flags=re.IGNORECASE,
            )
            if not project_name_valid:
                logger.warning(
                    "Ignoring invalid distribution %s (%s)",
                    dist.canonical_name,
                    dist.location,
                )
                continue
            yield dist

    def iter_installed_distributions(
        self,
        local_only: bool = True,
        skip: Container[str] = stdlib_pkgs,
        include_editables: bool = True,
        editables_only: bool = False,
        user_only: bool = False,
    ) -> Iterator[BaseDistribution]:
        """Return a list of installed distributions.

        This is based on ``iter_all_distributions()`` with additional filtering
        options. Note that ``iter_installed_distributions()`` without arguments
        is *not* equal to ``iter_all_distributions()``, since some of the
        configurations exclude packages by default.

        :param local_only: If True (default), only return installations
        local to the current virtualenv, if in a virtualenv.
        :param skip: An iterable of canonicalized project names to ignore;
            defaults to ``stdlib_pkgs``.
        :param include_editables: If False, don't report editables.
        :param editables_only: If True, only report editables.
        :param user_only: If True, only report installations in the user
        site directory.
        """
        it = self.iter_all_distributions()
        if local_only:
            it = (d for d in it if d.local)
        if not include_editables:
            it = (d for d in it if not d.editable)
        if editables_only:
            it = (d for d in it if d.editable)
        if user_only:
            it = (d for d in it if d.in_usersite)
        return (d for d in it if d.canonical_name not in skip)


class Wheel(Protocol):
    location: str

    def as_zipfile(self) -> zipfile.ZipFile:
        raise NotImplementedError()


class FilesystemWheel(Wheel):
    def __init__(self, location: str) -> None:
        self.location = location

    def as_zipfile(self) -> zipfile.ZipFile:
        return zipfile.ZipFile(self.location, allowZip64=True)


class MemoryWheel(Wheel):
    def __init__(self, location: str, stream: IO[bytes]) -> None:
        self.location = location
        self.stream = stream

    def as_zipfile(self) -> zipfile.ZipFile:
        return zipfile.ZipFile(self.stream, allowZip64=True)
python3.12/site-packages/pip/_internal/metadata/__init__.py000064400000010363151732701520017553 0ustar00import contextlib
import functools
import os
import sys
from typing import TYPE_CHECKING, List, Optional, Type, cast

from pip._internal.utils.misc import strtobool

from .base import BaseDistribution, BaseEnvironment, FilesystemWheel, MemoryWheel, Wheel

if TYPE_CHECKING:
    from typing import Literal, Protocol
else:
    Protocol = object

__all__ = [
    "BaseDistribution",
    "BaseEnvironment",
    "FilesystemWheel",
    "MemoryWheel",
    "Wheel",
    "get_default_environment",
    "get_environment",
    "get_wheel_distribution",
    "select_backend",
]


def _should_use_importlib_metadata() -> bool:
    """Whether to use the ``importlib.metadata`` or ``pkg_resources`` backend.

    By default, pip uses ``importlib.metadata`` on Python 3.11+, and
    ``pkg_resourcess`` otherwise. This can be overridden by a couple of ways:

    * If environment variable ``_PIP_USE_IMPORTLIB_METADATA`` is set, it
      dictates whether ``importlib.metadata`` is used, regardless of Python
      version.
    * On Python 3.11+, Python distributors can patch ``importlib.metadata``
      to add a global constant ``_PIP_USE_IMPORTLIB_METADATA = False``. This
      makes pip use ``pkg_resources`` (unless the user set the aforementioned
      environment variable to *True*).
    """
    with contextlib.suppress(KeyError, ValueError):
        return bool(strtobool(os.environ["_PIP_USE_IMPORTLIB_METADATA"]))
    if sys.version_info < (3, 11):
        return False
    import importlib.metadata

    return bool(getattr(importlib.metadata, "_PIP_USE_IMPORTLIB_METADATA", True))


class Backend(Protocol):
    NAME: 'Literal["importlib", "pkg_resources"]'
    Distribution: Type[BaseDistribution]
    Environment: Type[BaseEnvironment]


@functools.lru_cache(maxsize=None)
def select_backend() -> Backend:
    if _should_use_importlib_metadata():
        from . import importlib

        return cast(Backend, importlib)
    from . import pkg_resources

    return cast(Backend, pkg_resources)


def get_default_environment() -> BaseEnvironment:
    """Get the default representation for the current environment.

    This returns an Environment instance from the chosen backend. The default
    Environment instance should be built from ``sys.path`` and may use caching
    to share instance state accorss calls.
    """
    return select_backend().Environment.default()


def get_environment(paths: Optional[List[str]]) -> BaseEnvironment:
    """Get a representation of the environment specified by ``paths``.

    This returns an Environment instance from the chosen backend based on the
    given import paths. The backend must build a fresh instance representing
    the state of installed distributions when this function is called.
    """
    return select_backend().Environment.from_paths(paths)


def get_directory_distribution(directory: str) -> BaseDistribution:
    """Get the distribution metadata representation in the specified directory.

    This returns a Distribution instance from the chosen backend based on
    the given on-disk ``.dist-info`` directory.
    """
    return select_backend().Distribution.from_directory(directory)


def get_wheel_distribution(wheel: Wheel, canonical_name: str) -> BaseDistribution:
    """Get the representation of the specified wheel's distribution metadata.

    This returns a Distribution instance from the chosen backend based on
    the given wheel's ``.dist-info`` directory.

    :param canonical_name: Normalized project name of the given wheel.
    """
    return select_backend().Distribution.from_wheel(wheel, canonical_name)


def get_metadata_distribution(
    metadata_contents: bytes,
    filename: str,
    canonical_name: str,
) -> BaseDistribution:
    """Get the dist representation of the specified METADATA file contents.

    This returns a Distribution instance from the chosen backend sourced from the data
    in `metadata_contents`.

    :param metadata_contents: Contents of a METADATA file within a dist, or one served
                              via PEP 658.
    :param filename: Filename for the dist this metadata represents.
    :param canonical_name: Normalized project name of the given dist.
    """
    return select_backend().Distribution.from_metadata_file_contents(
        metadata_contents,
        filename,
        canonical_name,
    )
python3.12/site-packages/pip/_internal/metadata/_json.py000064400000005043151732701520017123 0ustar00# Extracted from https://github.com/pfmoore/pkg_metadata

from email.header import Header, decode_header, make_header
from email.message import Message
from typing import Any, Dict, List, Union

METADATA_FIELDS = [
    # Name, Multiple-Use
    ("Metadata-Version", False),
    ("Name", False),
    ("Version", False),
    ("Dynamic", True),
    ("Platform", True),
    ("Supported-Platform", True),
    ("Summary", False),
    ("Description", False),
    ("Description-Content-Type", False),
    ("Keywords", False),
    ("Home-page", False),
    ("Download-URL", False),
    ("Author", False),
    ("Author-email", False),
    ("Maintainer", False),
    ("Maintainer-email", False),
    ("License", False),
    ("Classifier", True),
    ("Requires-Dist", True),
    ("Requires-Python", False),
    ("Requires-External", True),
    ("Project-URL", True),
    ("Provides-Extra", True),
    ("Provides-Dist", True),
    ("Obsoletes-Dist", True),
]


def json_name(field: str) -> str:
    return field.lower().replace("-", "_")


def msg_to_json(msg: Message) -> Dict[str, Any]:
    """Convert a Message object into a JSON-compatible dictionary."""

    def sanitise_header(h: Union[Header, str]) -> str:
        if isinstance(h, Header):
            chunks = []
            for bytes, encoding in decode_header(h):
                if encoding == "unknown-8bit":
                    try:
                        # See if UTF-8 works
                        bytes.decode("utf-8")
                        encoding = "utf-8"
                    except UnicodeDecodeError:
                        # If not, latin1 at least won't fail
                        encoding = "latin1"
                chunks.append((bytes, encoding))
            return str(make_header(chunks))
        return str(h)

    result = {}
    for field, multi in METADATA_FIELDS:
        if field not in msg:
            continue
        key = json_name(field)
        if multi:
            value: Union[str, List[str]] = [
                sanitise_header(v) for v in msg.get_all(field)
            ]
        else:
            value = sanitise_header(msg.get(field))
            if key == "keywords":
                # Accept both comma-separated and space-separated
                # forms, for better compatibility with old data.
                if "," in value:
                    value = [v.strip() for v in value.split(",")]
                else:
                    value = value.split()
        result[key] = value

    payload = msg.get_payload()
    if payload:
        result["description"] = payload

    return result
python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-312.pyc000064400000000625151732701520026115 0ustar00�

R`i���(�ddlmZddlmZgd�ZdZy)�)�Distribution)�Environment)�NAMErr�	importlibN)�_distsr�_envsr�__all__r����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py�<module>r
s�� ��
1���rpython3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_compat.cpython-312.pyc000064400000006464151732701520026007 0ustar00�

R`iZ����ddlZddlmZmZmZmZGd�de�ZGd�de�Z	dejjdee	fd	�Zd
ejjde
fd�Zy)�N)�Any�Optional�Protocol�castc�T�eZdZdejj
deddfd�Zdefd�Zy)�BadMetadata�dist�reason�returnNc� �||_||_y�N�r	r
)�selfr	r
s   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py�__init__zBadMetadata.__init__s����	����c�<�d|j�d|j�d�S)NzBad metadata in z (�)r�rs r�__str__zBadMetadata.__str__
s��!�$�)�)��B�t�{�{�m�1�=�=r)	�__name__�
__module__�__qualname__�	importlib�metadata�Distribution�strrr�rrrrs5���Y�/�/�<�<����QU��>��>rrc�8�eZdZdZedefd��Zedd��Zy)�BasePatha�A protocol that various path objects conform.

    This exists because importlib.metadata uses both ``pathlib.Path`` and
    ``zipfile.Path``, and we need a common base for type hints (Union does not
    work well since ``zipfile.Path`` is too new for our linter setup).

    This does not mean to be exhaustive, but only contains things that present
    in both classes *that we need*.
    rc��t��r
��NotImplementedErrorrs r�namez
BasePath.name���!�#�#rc��t��r
r"rs r�parentzBasePath.parentr%rN)rr )rrr�__doc__�propertyrr$r'rrrr r s6����$�c�$��$��$��$rr �drc��t|dd�S)a�Find the path to the distribution's metadata directory.

    HACK: This relies on importlib.metadata's private ``_path`` attribute. Not
    all distributions exist on disk, so importlib.metadata is correct to not
    expose the attribute as public. But pip's code base is old and not as clean,
    so we do this to avoid having to rewrite too many things. Hopefully we can
    eliminate this some day.
    �_pathN)�getattr)r*s r�get_info_locationr."s���1�g�t�$�$rr	c�t�tt|�j}t|t�s
t|d���|S)z�Get the distribution's project name.

    The ``name`` attribute is only available in Python 3.10 or later. We are
    targeting exactly that, but Mypy does not know this.
    zinvalid metadata entry 'name')r
)rrr$�
isinstancerr)r	r$s  r�
get_dist_namer1.s2����T�?���D��d�C� ��$�'F�G�G��Kr)�importlib.metadatar�typingrrrr�
ValueErrorrr rrr.rr1rrr�<module>r5si���0�0�>�*�>�$�x�$�(	%��+�+�8�8�	%�X�h�=O�	%�	�	�*�*�7�7�	�C�	rpython3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_dists.cpython-312.pyc000064400000032223151732701520025642 0ustar00�

R`ii ��4�ddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZmZddlmZddlmZmZddlmZmZmZmZm Z ddl!m"Z"dd	l#m$Z$dd
l%m&Z&m'Z'ddl(m)Z)m*Z*Gd
�dejVjX�Z-Gd�de�Z,y)�N)�
Collection�Dict�Iterable�Iterator�Mapping�Optional�Sequence�cast)�Requirement)�NormalizedName�canonicalize_name)�parse)�InvalidWheel�UnsupportedWheel)�BaseDistribution�BaseEntryPoint�DistributionVersion�InfoPath�Wheel)�normalize_path)�
TempDirectory)�parse_wheel�read_wheel_metadata_file�)�BasePath�
get_dist_namec	���eZdZdZdeejefdejddfd�Ze	de
jded	eddfd
��Z
dedeejfd�Zd
edeefd�Zy)�WheelDistributiona�An ``importlib.metadata.Distribution`` read from a wheel.

    Although ``importlib.metadata.PathDistribution`` accepts ``zipfile.Path``,
    its implementation is too "lazy" for pip's needs (we can't keep the ZipFile
    handle open for the entire lifetime of the distribution object).

    This implementation eagerly reads the entire metadata directory into the
    memory instead, and operates from that.
    �files�
info_location�returnNc� �||_||_y�N)�_filesr )�selfrr s   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py�__init__zWheelDistribution.__init__/s��
���*����zf�name�locationc	���
�t||�\�
}�
fd�|j�D�}|D��cic]\}}|t||���}}}tj|�
�}	|||	�Scc}}w)Nc3��K�|]B}|j��d��r,|tj|jdd�d�f���Dy�w)�/r���N)�
startswith�pathlib�
PurePosixPath�split)�.0r*�info_dirs  �r&�	<genexpr>z1WheelDistribution.from_zipfile.<locals>.<genexpr>?sK�����
�%�����(��1�~�.��7�(�(����C��);�B�)?�@�A�%�s�AA)r�namelistrr1r2)�clsr)r*r+�_�paths�fullpath�relpathrr r5s          @r&�from_zipfilezWheelDistribution.from_zipfile7s����"�"�d�+���!�
����
�
��&+�
�%*�!��'�
�-�b�(�;�;�%*�	�
� �-�-�h��A�
��5�-�(�(��
s�A(�pathc��tjt|��|jvrt	|j�St|��r#)r1r2�strr$�iter�FileNotFoundError�r%r>s  r&�iterdirzWheelDistribution.iterdirKs7��� � ��T��+�t�{�{�:�����$�$���%�%r(�filenamec�
�	|jtj|�}	|j	d�}|S#t$rYywxYw#t
$r2}|jj}d|�d|�d|�d�}t|��d}~wwxYw)Nzutf-8zError decoding metadata for z: z in z file)	r$r1r2�KeyError�decode�UnicodeDecodeErrorr �parentr)r%rE�data�text�e�wheel�errors       r&�	read_textzWheelDistribution.read_textQs���	��;�;�w�4�4�X�>�?�D�	*��;�;�w�'�D�
����	��	��"�	*��&�&�-�-�E�2�5�'��A�3�d�8�*�E�R�E�"�5�)�)��	*�s&�"8�A�	A�A�	B�-A=�=B)�__name__�
__module__�__qualname__�__doc__rr1r2�bytesr'�classmethod�zipfile�ZipFiler@r=rrrDrrP�r(r&rr$s����+��w�,�,�e�3�4�+��,�,�+�
�	+��)��O�O�)��)��	)�

�)��)�&&�H�&��'�2G�2G�)H�&��#��(�3�-�r(rc	��eZdZdejj
deedeeddfd�Ze	de
defd��Ze	d	e
d
e
de
defd��Ze	d
ede
defd��Zedee
fd��Zedee
fd��Zedee
fd��Zdee
fd�Zedefd��Zedefd��Zdedefd�Zdee
fd�Zdede
fd�Zde e!fd�Z"de#jHjJfd�Z&de e
fd�Z'de
defd�Z(d!de)e
de e*fd �Z+y)"�Distribution�distr �installed_locationr!Nc�.�||_||_||_yr#)�_dist�_info_location�_installed_location)r%r\r r]s    r&r'zDistribution.__init__`s����
�+���#5�� r(�	directoryc��tj|�}tjjj|�}||||j�Sr#)r1�Path�	importlib�metadatar[�atrJ)r8rbr r\s    r&�from_directoryzDistribution.from_directoryjsA�����Y�/�
��!�!�.�.�1�1�-�@���4��
�(<�(<�=�=r(�metadata_contentsrE�project_namec��tjtdd��j�}|dz}|j	|�t
jjj|j�}|||jd�S)NrfT)�kind�globally_managed�METADATA)
r1rdrr>�write_bytesrerfr[rgrJ)r8rirErj�temp_dir�
metadata_pathr\s       r&�from_metadata_file_contentsz(Distribution.from_metadata_file_contentspst���<�<��z�D�A�F�F�
��!�:�-�
��!�!�"3�4��!�!�.�.�1�1�-�2F�2F�G���4��-�-�t�4�4r(rNr*c��	|j�5}tj|||j�}ddd�||jtj|j��S#1swY�:xYw#tj
$r}t
|j|�|�d}~wt$r}t|�d|����d}~wwxYw)Nz has an invalid wheel, )�
as_zipfilerr=r+rW�
BadZipFilerrr r1r2)r8rNr*r)r\rMs      r&�
from_wheelzDistribution.from_wheel�s���	H��!�!�#�r�(�5�5�b�$����O��$��4��+�+�W�-B�-B�5�>�>�-R�S�S�
$�#���!�!�	<��u�~�~�t�4�!�;���	H�"�d�V�+B�1�#�#F�G�G��	H�s9�A9�"A-�A9�-A6�2A9�9C�B#�#C�/B?�?Cc�Z�|j�yt|jj�Sr#)r`r@rJ�r%s r&r+zDistribution.location�s(�����&���4�&�&�-�-�.�.r(c�F�|j�yt|j�Sr#)r`r@rxs r&r zDistribution.info_location�s"�����&���4�&�&�'�'r(c�X�|j�ytt|j��Sr#)rarr@rxs r&r]zDistribution.installed_location�s'���#�#�+���c�$�":�":�;�<�<r(c��|j�ytjj|jj�\}}|dvry|jdd�dS)zrTry to get the name from the metadata directory name.

        This is much faster than reading metadata.
        N)z
.dist-infoz	.egg-info�-rr)r`�osr>�splitextr*r3)r%�stem�suffixs   r&�_get_dist_name_from_locationz)Distribution._get_dist_name_from_location�sY��
���&���w�w�'�'��(;�(;�(@�(@�A���f��4�4���z�z�#�q�!�!�$�$r(c�f�|j�xst|j�}t|�Sr#)r�rr_r
)r%r*s  r&�canonical_namezDistribution.canonical_name�s)���0�0�2�O�m�D�J�J�6O�� ��&�&r(c�@�t|jj�Sr#)�
parse_versionr_�versionrxs r&r�zDistribution.version�s���T�Z�Z�/�/�0�0r(r>c�N�|jjt|��duSr#)r_rPr@rCs  r&�is_filezDistribution.is_file�s ���z�z�#�#�C��I�.�d�:�:r(c#��K�t|jtj�sy|jj	d�j�D]}|j���y�w)N�scripts)�
isinstancer`r1rd�joinpathrDr*)r%�childs  r&�iter_distutils_script_namesz(Distribution.iter_distutils_script_names�sN�����$�-�-�w�|�|�<���(�(�1�1�)�<�D�D�F�E��*�*��G�s�A#A%c�h�|jjt|��}|�t|��|Sr#)r_rPr@rB)r%r>�contents   r&rPzDistribution.read_text�s/���*�*�&�&�s�4�y�1���?�#�D�)�)��r(c�.�|jjSr#)r_�entry_pointsrxs r&�iter_entry_pointszDistribution.iter_entry_points�s���z�z�&�&�&r(c�r�ttjj|jj
�Sr#)r
�email�message�Messager_rfrxs r&�_metadata_implzDistribution._metadata_impl�s%���E�M�M�)�)�4�:�:�+>�+>�?�?r(c�:�|jjdg�S)N�Provides-Extra)rf�get_allrxs r&�iter_provided_extrasz!Distribution.iter_provided_extras�s���}�}�$�$�%5�r�:�:r(�extrac�`��t�fd�|jjdg�D��S)Nc3�L�K�|]}t|�t��k(���y�wr#)r
)r4�provided_extrar�s  �r&r6z1Distribution.is_extra_provided.<locals>.<genexpr>�s)�����
�"M��
�n�-�1B�5�1I�I�"M�s�!$r�)�anyrfr�)r%r�s `r&�is_extra_providedzDistribution.is_extra_provided�s/����
�"&�-�-�"7�"7�8H�"�"M�
�
�	
r(�extrasc#�.�K�|D�cgc]}d|i��}}|jjdg�D][}t|���js����|s"�jj	ddi�r����Ct�fd�|D��s�X����]ycc}w�w)Nr�z
Requires-Dist�c3�T�K�|]}�jj|����!y�wr#)�marker�evaluate)r4�context�reqs  �r&r6z1Distribution.iter_dependencies.<locals>.<genexpr>�s!�����J��g�S�Z�Z�(�(��1��s�%()rfr�rr�r�r�)r%r�rM�contexts�
req_stringr�s     @r&�iter_dependencieszDistribution.iter_dependencies�s������DJ�-K�F�q�w��l�F��-K��-�-�/�/���D�J��j�)�C��:�:��	���
�
� 3� 3�W�b�M� B��	��J��J�J��	�E��.L�s�B�B�A5B�	B)rY),rQrRrSrerfr[rrr'rVr@rrhrUrrrrv�propertyr+r r]r�rr�rr�r�boolr�rr�rPrrr�r�r�r�r�r�r�rrr�rYr(r&r[r[_s��6�� � �-�-�6� ��)�6�%�X�.�	6�

�6��>�s�>�/?�>��>�
�5� �5��5��	5�

�5��5� �T�u�T�C�T�4D�T��T��/�(�3�-�/��/�
�(�x��}�(��(�
�=�H�S�M�=��=�

%�h�s�m�
%��'��'��'��1�,�1��1�;�H�;��;��X�c�]���h��3��'�8�N�#;�'�@��
�
� 5� 5�@�;�h�s�m�;�
�s�
�t�
�	�
�3��	��+�AV�	r(r[).�
email.messager��importlib.metadatarer}r1rW�typingrrrrrrr	r
�"pip._vendor.packaging.requirementsr�pip._vendor.packaging.utilsrr
�pip._vendor.packaging.versionrr��pip._internal.exceptionsrr�pip._internal.metadata.baserrrrr�pip._internal.utils.miscr�pip._internal.utils.temp_dirr�pip._internal.utils.wheelrr�_compatrrrfr[rrYr(r&�<module>r�sq����	���	�	�	�;�I�@�C���4�6�K�,�8�	�*�*�7�7�8�vD�#�Dr(python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_envs.cpython-312.pyc000064400000025633151732701520025476 0ustar00�

R`i ��l�ddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
mZmZddlmZmZddlmZmZddlmZddlmZddlmZdd	lmZmZmZm Z dd
l!m"Z"ejFe$�Z%de&de'fd
�Z(Gd�d�Z)ejTd��dee&ddfd��Z+Gd�de�Z,y)�N)�Iterator�List�Optional�Sequence�Set�Tuple)�NormalizedName�canonicalize_name)�BaseDistribution�BaseEnvironment)�Wheel��
deprecated)�WHEEL_EXTENSION�)�BadMetadata�BasePath�
get_dist_name�get_info_location)�Distribution�location�returnc��|jt�sytjj	|�syt
jjtjj|��sytj|�S)NF)�endswithr�os�path�isfiler
�
wheel_file_re�match�basename�zipfile�
is_zipfile�rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py�_looks_like_wheelr%s]�����_�-��
�7�7�>�>�(�#�����$�$�R�W�W�%5�%5�h�%?�@�����h�'�'�c���eZdZdZeejjee	fZ
dd�Zdede
e
fd�Zdede
efd�Zdede
efd�Zdede
efd	�Zdede
efd
�Zdede
efd�Zy)
�_DistributionFindera$Finder to locate distributions.

    The main purpose of this class is to memoize found distributions' names, so
    only one distribution is returned for each package name. At lot of pip code
    assumes this (because it is setuptools's behavior), and not doing the same
    can potentially cause a distribution in lower precedence path to override a
    higher precedence one if the caller is not careful.

    Eventually we probably want to make it possible to see lower precedence
    installations as well. It's useful feature, after all.
    rNc�"�t�|_y�N)�set�_found_names)�selfs r$�__init__z_DistributionFinder.__init__1s��14���r&rc#�K�t|�rytjj|g��D]T}t	|�}	t|�}t|�}||jvr�4|jj|�||f���Vy#t$r+}tjd||j�Yd}~��d}~wwxYw�w)z!Find distributions in a location.N)rzSkipping %s due to %s)
r%�	importlib�metadata�
distributionsrrr�logger�warning�reasonr
r,�add)r-r�dist�
info_location�raw_name�e�normalized_names       r$�
_find_implz_DistributionFinder._find_impl4s�����
�X�&���&�&�4�4�8�*�4�E�D�-�d�3�M�
�(��.��0��9�O��$�"3�"3�3�����!�!�/�2��
�%�%�F���
����6�
�q�x�x�P���
�s.�<B?�B�
>B?�	B<�!B7�2B?�7B<�<B?c#�~K�|j|�D]%\}}|�d}n|j}t|||����'y�w)ziFind distributions in a location.

        The path can be either a directory, or a ZIP archive.
        N)r<�parentr)r-rr7r8�installed_locations     r$�findz_DistributionFinder.findJsH����
$(�?�?�8�#<��D�-��$�9=�"�%2�%9�%9�"��t�]�4F�G�G�$=�s�;=c#�K�tj|�}|j�sy|j�D]�}|jdk7r�|j�5}d�|D�}t
d�|D�d�}ddd�s�Kt|j|��}|j|�D]\}}	t||	|������y#1swY�QxYw�w)a�Read location in egg-link files and return distributions in there.

        The path should be a directory; otherwise this returns nothing. This
        follows how setuptools does this for compatibility. The first non-empty
        line in the egg-link is read as a path (resolved against the egg-link's
        containing directory if relative). Distributions found at that linked
        location are returned.
        Nz	.egg-linkc3�<K�|]}|j����y�wr*)�strip��.0�lines  r$�	<genexpr>z2_DistributionFinder.find_linked.<locals>.<genexpr>fs����4�!�$�����!�s�c3�&K�|]	}|s�|���y�wr*�rDs  r$rGz2_DistributionFinder.find_linked.<locals>.<genexpr>gs����"B�E�D�T�4�E�s���)�pathlib�Path�is_dir�iterdir�suffix�open�next�str�joinpathr<r)
r-rr�child�f�lines�
target_rel�target_locationr7r8s
          r$�find_linkedz_DistributionFinder.find_linkedVs������|�|�H�%���{�{�}���\�\�^�E��|�|�{�*�������4�!�4��!�"B�E�"B�B�G�
����!�$�-�-�
�";�<�O�'+����'G�#��m�"�4���=�=�(H�$���s�AC�C	�9AC�	C	�Cc#�K�ddlm}ddlm}t	j
|�5}|D]H}|jjd�s�||j�D]}|j|�����J	ddd�y#1swYyxYw�w)Nr)�find_distributions��
pkg_resourcesz.egg)
�pip._vendor.pkg_resourcesr[�pip._internal.metadatar]r�scandir�namerrr)r-rr[�legacy�it�entryr7s       r$�_find_eggs_in_dirz%_DistributionFinder._find_eggs_in_dirnsh����@�B�
�Z�Z��
!�R����z�z�*�*�6�2��.�u�z�z�:�D� �-�-�d�3�3�;��"�
!�
!�s�"B�AA<�3	B�<B�Bc#��K�ddlm}ddlm}	t	j
|�}|||�D]}|j|����y#tj$rYywxYw�w)Nr)�find_eggs_in_zipr\)r^rgr_r]�	zipimport�zipimporter�ZipImportErrorr)r-rrgrb�importerr7s      r$�_find_eggs_in_zipz%_DistributionFinder._find_eggs_in_zipzs^����>�B�	� �,�,�X�6�H�%�X�x�8�D��%�%�d�+�+�9���'�'�	��	�s'�
A �A�"A �A�A �A�A c#��K�tjj|�r|j|�Ed{���t	j
|�r|j
|�Ed{���yy7�47��w)a�Find eggs in a location.

        This actually uses the old *pkg_resources* backend. We likely want to
        deprecate this so we can eventually remove the *pkg_resources*
        dependency entirely. Before that, this should first emit a deprecation
        warning for some versions when using the fallback since importing
        *pkg_resources* is slow for those who don't need it.
        N)rr�isdirrer!r"rl)r-rs  r$�	find_eggsz_DistributionFinder.find_eggs�s\�����7�7�=�=��"��-�-�h�7�7�7����h�'��-�-�h�7�7�7�(�
8��7�s!�4A/�A+�-A/�$A-�%A/�-A/)rN)�__name__�
__module__�__qualname__�__doc__rr0r1rrr�FoundResultr.rRrr<rr@rYrerlrorIr&r$r(r("s���
��	�*�*�7�7��(�9K�K�L�K�7�&�3�&�8�K�+@�&�,
H�S�
H�X�.>�%?�
H�>�C�>�H�5E�,F�>�0
4�#�
4�(�;K�2L�
4�
,�#�
,�(�;K�2L�
,�8�#�8�(�3C�*D�8r&r()�maxsizec�*�td|�d�ddd��y)NzLoading egg at z is deprecated.z$to use pip for package installation.z24.3i*0)r5�replacement�gone_in�issuerr#s r$�_emit_egg_deprecationrz�s��� ��
�/�:�:���	r&c��eZdZdeeddfd�Zedefd��Zede	e
edefd��Zdee
fd�Zdede	e
fd	�Zy)
�Environment�pathsrNc��||_yr*)�_paths)r-r}s  r$r.zEnvironment.__init__�s	����r&c�.�|tj�Sr*��sysr)�clss r$�defaultzEnvironment.default�s���3�8�8�}�r&c�B�|�|tj�S||�Sr*r�)r�r}s  r$�
from_pathszEnvironment.from_paths�s���=��s�x�x�=� ��5�z�r&c#�K�t�}|jD]c}|j|�Ed{���|j|�D]}t	|j
�|���|j
|�Ed{����ey7�O7�	�wr*)r(rr@rorzrrY)r-�finderrr7s    r$�_iter_distributionszEnvironment._iter_distributions�ss����$�&�����H��{�{�8�,�,�,��(�(��2��%�d�m�m�4��
�3��)�)�(�3�3�3�
$�,��

4�s"�.B�B�AB�8B�9B�Brac�N���fd�|j�D�}t|d�S)Nc3�R�K�|]}|jt��k(r|��� y�wr*)�canonical_namer
)rE�distributionras  �r$rGz/Environment.get_distribution.<locals>.<genexpr>�s-�����
� =���*�*�.?��.E�E�
� =�s�$')�iter_all_distributionsrQ)r-ra�matchess ` r$�get_distributionzEnvironment.get_distribution�s*���
� $� ;� ;� =�
��
�G�T�"�"r&)rprqrrrrRr.�classmethodrr�rrr�rrr�r�rIr&r$r|r|�s����h�s�m������������x��S�	�2������
4�X�.>�%?�4�#�S�#�X�6F�-G�#r&r|)-�	functools�importlib.metadatar0�loggingrrKr�r!rh�typingrrrrrr�pip._vendor.packaging.utilsr	r
�pip._internal.metadata.baserr�pip._internal.models.wheelr
�pip._internal.utils.deprecationr�pip._internal.utils.filetypesr�_compatrrrr�_distsr�	getLoggerrpr3rR�boolr%r(�	lru_cacherzr|rIr&r$�<module>r�s������	��
���A�A�I�I�,�6�9�L�L� �	��	�	�8�	$��(��(��(�p8�p8�f����T�"��H�S�M��d��#��#�/�#r&python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py000064400000003532151732701520021437 0ustar00import importlib.metadata
from typing import Any, Optional, Protocol, cast


class BadMetadata(ValueError):
    def __init__(self, dist: importlib.metadata.Distribution, *, reason: str) -> None:
        self.dist = dist
        self.reason = reason

    def __str__(self) -> str:
        return f"Bad metadata in {self.dist} ({self.reason})"


class BasePath(Protocol):
    """A protocol that various path objects conform.

    This exists because importlib.metadata uses both ``pathlib.Path`` and
    ``zipfile.Path``, and we need a common base for type hints (Union does not
    work well since ``zipfile.Path`` is too new for our linter setup).

    This does not mean to be exhaustive, but only contains things that present
    in both classes *that we need*.
    """

    @property
    def name(self) -> str:
        raise NotImplementedError()

    @property
    def parent(self) -> "BasePath":
        raise NotImplementedError()


def get_info_location(d: importlib.metadata.Distribution) -> Optional[BasePath]:
    """Find the path to the distribution's metadata directory.

    HACK: This relies on importlib.metadata's private ``_path`` attribute. Not
    all distributions exist on disk, so importlib.metadata is correct to not
    expose the attribute as public. But pip's code base is old and not as clean,
    so we do this to avoid having to rewrite too many things. Hopefully we can
    eliminate this some day.
    """
    return getattr(d, "_path", None)


def get_dist_name(dist: importlib.metadata.Distribution) -> str:
    """Get the distribution's project name.

    The ``name`` attribute is only available in Python 3.10 or later. We are
    targeting exactly that, but Mypy does not know this.
    """
    name = cast(Any, dist).name
    if not isinstance(name, str):
        raise BadMetadata(dist, reason="invalid metadata entry 'name'")
    return name
python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py000064400000000207151732701520021550 0ustar00from ._dists import Distribution
from ._envs import Environment

__all__ = ["NAME", "Distribution", "Environment"]

NAME = "importlib"
python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py000064400000016440151732701520021131 0ustar00import functools
import importlib.metadata
import logging
import os
import pathlib
import sys
import zipfile
import zipimport
from typing import Iterator, List, Optional, Sequence, Set, Tuple

from pip._vendor.packaging.utils import NormalizedName, canonicalize_name

from pip._internal.metadata.base import BaseDistribution, BaseEnvironment
from pip._internal.models.wheel import Wheel
from pip._internal.utils.deprecation import deprecated
from pip._internal.utils.filetypes import WHEEL_EXTENSION

from ._compat import BadMetadata, BasePath, get_dist_name, get_info_location
from ._dists import Distribution

logger = logging.getLogger(__name__)


def _looks_like_wheel(location: str) -> bool:
    if not location.endswith(WHEEL_EXTENSION):
        return False
    if not os.path.isfile(location):
        return False
    if not Wheel.wheel_file_re.match(os.path.basename(location)):
        return False
    return zipfile.is_zipfile(location)


class _DistributionFinder:
    """Finder to locate distributions.

    The main purpose of this class is to memoize found distributions' names, so
    only one distribution is returned for each package name. At lot of pip code
    assumes this (because it is setuptools's behavior), and not doing the same
    can potentially cause a distribution in lower precedence path to override a
    higher precedence one if the caller is not careful.

    Eventually we probably want to make it possible to see lower precedence
    installations as well. It's useful feature, after all.
    """

    FoundResult = Tuple[importlib.metadata.Distribution, Optional[BasePath]]

    def __init__(self) -> None:
        self._found_names: Set[NormalizedName] = set()

    def _find_impl(self, location: str) -> Iterator[FoundResult]:
        """Find distributions in a location."""
        # Skip looking inside a wheel. Since a package inside a wheel is not
        # always valid (due to .data directories etc.), its .dist-info entry
        # should not be considered an installed distribution.
        if _looks_like_wheel(location):
            return
        # To know exactly where we find a distribution, we have to feed in the
        # paths one by one, instead of dumping the list to importlib.metadata.
        for dist in importlib.metadata.distributions(path=[location]):
            info_location = get_info_location(dist)
            try:
                raw_name = get_dist_name(dist)
            except BadMetadata as e:
                logger.warning("Skipping %s due to %s", info_location, e.reason)
                continue
            normalized_name = canonicalize_name(raw_name)
            if normalized_name in self._found_names:
                continue
            self._found_names.add(normalized_name)
            yield dist, info_location

    def find(self, location: str) -> Iterator[BaseDistribution]:
        """Find distributions in a location.

        The path can be either a directory, or a ZIP archive.
        """
        for dist, info_location in self._find_impl(location):
            if info_location is None:
                installed_location: Optional[BasePath] = None
            else:
                installed_location = info_location.parent
            yield Distribution(dist, info_location, installed_location)

    def find_linked(self, location: str) -> Iterator[BaseDistribution]:
        """Read location in egg-link files and return distributions in there.

        The path should be a directory; otherwise this returns nothing. This
        follows how setuptools does this for compatibility. The first non-empty
        line in the egg-link is read as a path (resolved against the egg-link's
        containing directory if relative). Distributions found at that linked
        location are returned.
        """
        path = pathlib.Path(location)
        if not path.is_dir():
            return
        for child in path.iterdir():
            if child.suffix != ".egg-link":
                continue
            with child.open() as f:
                lines = (line.strip() for line in f)
                target_rel = next((line for line in lines if line), "")
            if not target_rel:
                continue
            target_location = str(path.joinpath(target_rel))
            for dist, info_location in self._find_impl(target_location):
                yield Distribution(dist, info_location, path)

    def _find_eggs_in_dir(self, location: str) -> Iterator[BaseDistribution]:
        from pip._vendor.pkg_resources import find_distributions

        from pip._internal.metadata import pkg_resources as legacy

        with os.scandir(location) as it:
            for entry in it:
                if not entry.name.endswith(".egg"):
                    continue
                for dist in find_distributions(entry.path):
                    yield legacy.Distribution(dist)

    def _find_eggs_in_zip(self, location: str) -> Iterator[BaseDistribution]:
        from pip._vendor.pkg_resources import find_eggs_in_zip

        from pip._internal.metadata import pkg_resources as legacy

        try:
            importer = zipimport.zipimporter(location)
        except zipimport.ZipImportError:
            return
        for dist in find_eggs_in_zip(importer, location):
            yield legacy.Distribution(dist)

    def find_eggs(self, location: str) -> Iterator[BaseDistribution]:
        """Find eggs in a location.

        This actually uses the old *pkg_resources* backend. We likely want to
        deprecate this so we can eventually remove the *pkg_resources*
        dependency entirely. Before that, this should first emit a deprecation
        warning for some versions when using the fallback since importing
        *pkg_resources* is slow for those who don't need it.
        """
        if os.path.isdir(location):
            yield from self._find_eggs_in_dir(location)
        if zipfile.is_zipfile(location):
            yield from self._find_eggs_in_zip(location)


@functools.lru_cache(maxsize=None)  # Warn a distribution exactly once.
def _emit_egg_deprecation(location: Optional[str]) -> None:
    deprecated(
        reason=f"Loading egg at {location} is deprecated.",
        replacement="to use pip for package installation.",
        gone_in="24.3",
        issue=12330,
    )


class Environment(BaseEnvironment):
    def __init__(self, paths: Sequence[str]) -> None:
        self._paths = paths

    @classmethod
    def default(cls) -> BaseEnvironment:
        return cls(sys.path)

    @classmethod
    def from_paths(cls, paths: Optional[List[str]]) -> BaseEnvironment:
        if paths is None:
            return cls(sys.path)
        return cls(paths)

    def _iter_distributions(self) -> Iterator[BaseDistribution]:
        finder = _DistributionFinder()
        for location in self._paths:
            yield from finder.find(location)
            for dist in finder.find_eggs(location):
                _emit_egg_deprecation(dist.location)
                yield dist
            # This must go last because that's how pkg_resources tie-breaks.
            yield from finder.find_linked(location)

    def get_distribution(self, name: str) -> Optional[BaseDistribution]:
        matches = (
            distribution
            for distribution in self.iter_all_distributions()
            if distribution.canonical_name == canonicalize_name(name)
        )
        return next(matches, None)
python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py000064400000020151151732701520021276 0ustar00import email.message
import importlib.metadata
import os
import pathlib
import zipfile
from typing import (
    Collection,
    Dict,
    Iterable,
    Iterator,
    Mapping,
    Optional,
    Sequence,
    cast,
)

from pip._vendor.packaging.requirements import Requirement
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from pip._vendor.packaging.version import parse as parse_version

from pip._internal.exceptions import InvalidWheel, UnsupportedWheel
from pip._internal.metadata.base import (
    BaseDistribution,
    BaseEntryPoint,
    DistributionVersion,
    InfoPath,
    Wheel,
)
from pip._internal.utils.misc import normalize_path
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.utils.wheel import parse_wheel, read_wheel_metadata_file

from ._compat import BasePath, get_dist_name


class WheelDistribution(importlib.metadata.Distribution):
    """An ``importlib.metadata.Distribution`` read from a wheel.

    Although ``importlib.metadata.PathDistribution`` accepts ``zipfile.Path``,
    its implementation is too "lazy" for pip's needs (we can't keep the ZipFile
    handle open for the entire lifetime of the distribution object).

    This implementation eagerly reads the entire metadata directory into the
    memory instead, and operates from that.
    """

    def __init__(
        self,
        files: Mapping[pathlib.PurePosixPath, bytes],
        info_location: pathlib.PurePosixPath,
    ) -> None:
        self._files = files
        self.info_location = info_location

    @classmethod
    def from_zipfile(
        cls,
        zf: zipfile.ZipFile,
        name: str,
        location: str,
    ) -> "WheelDistribution":
        info_dir, _ = parse_wheel(zf, name)
        paths = (
            (name, pathlib.PurePosixPath(name.split("/", 1)[-1]))
            for name in zf.namelist()
            if name.startswith(f"{info_dir}/")
        )
        files = {
            relpath: read_wheel_metadata_file(zf, fullpath)
            for fullpath, relpath in paths
        }
        info_location = pathlib.PurePosixPath(location, info_dir)
        return cls(files, info_location)

    def iterdir(self, path: InfoPath) -> Iterator[pathlib.PurePosixPath]:
        # Only allow iterating through the metadata directory.
        if pathlib.PurePosixPath(str(path)) in self._files:
            return iter(self._files)
        raise FileNotFoundError(path)

    def read_text(self, filename: str) -> Optional[str]:
        try:
            data = self._files[pathlib.PurePosixPath(filename)]
        except KeyError:
            return None
        try:
            text = data.decode("utf-8")
        except UnicodeDecodeError as e:
            wheel = self.info_location.parent
            error = f"Error decoding metadata for {wheel}: {e} in {filename} file"
            raise UnsupportedWheel(error)
        return text


class Distribution(BaseDistribution):
    def __init__(
        self,
        dist: importlib.metadata.Distribution,
        info_location: Optional[BasePath],
        installed_location: Optional[BasePath],
    ) -> None:
        self._dist = dist
        self._info_location = info_location
        self._installed_location = installed_location

    @classmethod
    def from_directory(cls, directory: str) -> BaseDistribution:
        info_location = pathlib.Path(directory)
        dist = importlib.metadata.Distribution.at(info_location)
        return cls(dist, info_location, info_location.parent)

    @classmethod
    def from_metadata_file_contents(
        cls,
        metadata_contents: bytes,
        filename: str,
        project_name: str,
    ) -> BaseDistribution:
        # Generate temp dir to contain the metadata file, and write the file contents.
        temp_dir = pathlib.Path(
            TempDirectory(kind="metadata", globally_managed=True).path
        )
        metadata_path = temp_dir / "METADATA"
        metadata_path.write_bytes(metadata_contents)
        # Construct dist pointing to the newly created directory.
        dist = importlib.metadata.Distribution.at(metadata_path.parent)
        return cls(dist, metadata_path.parent, None)

    @classmethod
    def from_wheel(cls, wheel: Wheel, name: str) -> BaseDistribution:
        try:
            with wheel.as_zipfile() as zf:
                dist = WheelDistribution.from_zipfile(zf, name, wheel.location)
        except zipfile.BadZipFile as e:
            raise InvalidWheel(wheel.location, name) from e
        except UnsupportedWheel as e:
            raise UnsupportedWheel(f"{name} has an invalid wheel, {e}")
        return cls(dist, dist.info_location, pathlib.PurePosixPath(wheel.location))

    @property
    def location(self) -> Optional[str]:
        if self._info_location is None:
            return None
        return str(self._info_location.parent)

    @property
    def info_location(self) -> Optional[str]:
        if self._info_location is None:
            return None
        return str(self._info_location)

    @property
    def installed_location(self) -> Optional[str]:
        if self._installed_location is None:
            return None
        return normalize_path(str(self._installed_location))

    def _get_dist_name_from_location(self) -> Optional[str]:
        """Try to get the name from the metadata directory name.

        This is much faster than reading metadata.
        """
        if self._info_location is None:
            return None
        stem, suffix = os.path.splitext(self._info_location.name)
        if suffix not in (".dist-info", ".egg-info"):
            return None
        return stem.split("-", 1)[0]

    @property
    def canonical_name(self) -> NormalizedName:
        name = self._get_dist_name_from_location() or get_dist_name(self._dist)
        return canonicalize_name(name)

    @property
    def version(self) -> DistributionVersion:
        return parse_version(self._dist.version)

    def is_file(self, path: InfoPath) -> bool:
        return self._dist.read_text(str(path)) is not None

    def iter_distutils_script_names(self) -> Iterator[str]:
        # A distutils installation is always "flat" (not in e.g. egg form), so
        # if this distribution's info location is NOT a pathlib.Path (but e.g.
        # zipfile.Path), it can never contain any distutils scripts.
        if not isinstance(self._info_location, pathlib.Path):
            return
        for child in self._info_location.joinpath("scripts").iterdir():
            yield child.name

    def read_text(self, path: InfoPath) -> str:
        content = self._dist.read_text(str(path))
        if content is None:
            raise FileNotFoundError(path)
        return content

    def iter_entry_points(self) -> Iterable[BaseEntryPoint]:
        # importlib.metadata's EntryPoint structure sasitfies BaseEntryPoint.
        return self._dist.entry_points

    def _metadata_impl(self) -> email.message.Message:
        # From Python 3.10+, importlib.metadata declares PackageMetadata as the
        # return type. This protocol is unfortunately a disaster now and misses
        # a ton of fields that we need, including get() and get_payload(). We
        # rely on the implementation that the object is actually a Message now,
        # until upstream can improve the protocol. (python/cpython#94952)
        return cast(email.message.Message, self._dist.metadata)

    def iter_provided_extras(self) -> Iterable[str]:
        return self.metadata.get_all("Provides-Extra", [])

    def is_extra_provided(self, extra: str) -> bool:
        return any(
            canonicalize_name(provided_extra) == canonicalize_name(extra)
            for provided_extra in self.metadata.get_all("Provides-Extra", [])
        )

    def iter_dependencies(self, extras: Collection[str] = ()) -> Iterable[Requirement]:
        contexts: Sequence[Dict[str, str]] = [{"extra": e} for e in extras]
        for req_string in self.metadata.get_all("Requires-Dist", []):
            req = Requirement(req_string)
            if not req.marker:
                yield req
            elif not extras and req.marker.evaluate({"extra": ""}):
                yield req
            elif any(req.marker.evaluate(context) for context in contexts):
                yield req
python3.12/site-packages/pip/_internal/metadata/pkg_resources.py000064400000023463151732701520020674 0ustar00import email.message
import email.parser
import logging
import os
import zipfile
from typing import Collection, Iterable, Iterator, List, Mapping, NamedTuple, Optional

from pip._vendor import pkg_resources
from pip._vendor.packaging.requirements import Requirement
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from pip._vendor.packaging.version import parse as parse_version

from pip._internal.exceptions import InvalidWheel, NoneMetadataError, UnsupportedWheel
from pip._internal.utils.egg_link import egg_link_path_from_location
from pip._internal.utils.misc import display_path, normalize_path
from pip._internal.utils.wheel import parse_wheel, read_wheel_metadata_file

from .base import (
    BaseDistribution,
    BaseEntryPoint,
    BaseEnvironment,
    DistributionVersion,
    InfoPath,
    Wheel,
)

__all__ = ["NAME", "Distribution", "Environment"]

logger = logging.getLogger(__name__)

NAME = "pkg_resources"


class EntryPoint(NamedTuple):
    name: str
    value: str
    group: str


class InMemoryMetadata:
    """IMetadataProvider that reads metadata files from a dictionary.

    This also maps metadata decoding exceptions to our internal exception type.
    """

    def __init__(self, metadata: Mapping[str, bytes], wheel_name: str) -> None:
        self._metadata = metadata
        self._wheel_name = wheel_name

    def has_metadata(self, name: str) -> bool:
        return name in self._metadata

    def get_metadata(self, name: str) -> str:
        try:
            return self._metadata[name].decode()
        except UnicodeDecodeError as e:
            # Augment the default error with the origin of the file.
            raise UnsupportedWheel(
                f"Error decoding metadata for {self._wheel_name}: {e} in {name} file"
            )

    def get_metadata_lines(self, name: str) -> Iterable[str]:
        return pkg_resources.yield_lines(self.get_metadata(name))

    def metadata_isdir(self, name: str) -> bool:
        return False

    def metadata_listdir(self, name: str) -> List[str]:
        return []

    def run_script(self, script_name: str, namespace: str) -> None:
        pass


class Distribution(BaseDistribution):
    def __init__(self, dist: pkg_resources.Distribution) -> None:
        self._dist = dist

    @classmethod
    def from_directory(cls, directory: str) -> BaseDistribution:
        dist_dir = directory.rstrip(os.sep)

        # Build a PathMetadata object, from path to metadata. :wink:
        base_dir, dist_dir_name = os.path.split(dist_dir)
        metadata = pkg_resources.PathMetadata(base_dir, dist_dir)

        # Determine the correct Distribution object type.
        if dist_dir.endswith(".egg-info"):
            dist_cls = pkg_resources.Distribution
            dist_name = os.path.splitext(dist_dir_name)[0]
        else:
            assert dist_dir.endswith(".dist-info")
            dist_cls = pkg_resources.DistInfoDistribution
            dist_name = os.path.splitext(dist_dir_name)[0].split("-")[0]

        dist = dist_cls(base_dir, project_name=dist_name, metadata=metadata)
        return cls(dist)

    @classmethod
    def from_metadata_file_contents(
        cls,
        metadata_contents: bytes,
        filename: str,
        project_name: str,
    ) -> BaseDistribution:
        metadata_dict = {
            "METADATA": metadata_contents,
        }
        dist = pkg_resources.DistInfoDistribution(
            location=filename,
            metadata=InMemoryMetadata(metadata_dict, filename),
            project_name=project_name,
        )
        return cls(dist)

    @classmethod
    def from_wheel(cls, wheel: Wheel, name: str) -> BaseDistribution:
        try:
            with wheel.as_zipfile() as zf:
                info_dir, _ = parse_wheel(zf, name)
                metadata_dict = {
                    path.split("/", 1)[-1]: read_wheel_metadata_file(zf, path)
                    for path in zf.namelist()
                    if path.startswith(f"{info_dir}/")
                }
        except zipfile.BadZipFile as e:
            raise InvalidWheel(wheel.location, name) from e
        except UnsupportedWheel as e:
            raise UnsupportedWheel(f"{name} has an invalid wheel, {e}")
        dist = pkg_resources.DistInfoDistribution(
            location=wheel.location,
            metadata=InMemoryMetadata(metadata_dict, wheel.location),
            project_name=name,
        )
        return cls(dist)

    @property
    def location(self) -> Optional[str]:
        return self._dist.location

    @property
    def installed_location(self) -> Optional[str]:
        egg_link = egg_link_path_from_location(self.raw_name)
        if egg_link:
            location = egg_link
        elif self.location:
            location = self.location
        else:
            return None
        return normalize_path(location)

    @property
    def info_location(self) -> Optional[str]:
        return self._dist.egg_info

    @property
    def installed_by_distutils(self) -> bool:
        # A distutils-installed distribution is provided by FileMetadata. This
        # provider has a "path" attribute not present anywhere else. Not the
        # best introspection logic, but pip has been doing this for a long time.
        try:
            return bool(self._dist._provider.path)
        except AttributeError:
            return False

    @property
    def canonical_name(self) -> NormalizedName:
        return canonicalize_name(self._dist.project_name)

    @property
    def version(self) -> DistributionVersion:
        return parse_version(self._dist.version)

    def is_file(self, path: InfoPath) -> bool:
        return self._dist.has_metadata(str(path))

    def iter_distutils_script_names(self) -> Iterator[str]:
        yield from self._dist.metadata_listdir("scripts")

    def read_text(self, path: InfoPath) -> str:
        name = str(path)
        if not self._dist.has_metadata(name):
            raise FileNotFoundError(name)
        content = self._dist.get_metadata(name)
        if content is None:
            raise NoneMetadataError(self, name)
        return content

    def iter_entry_points(self) -> Iterable[BaseEntryPoint]:
        for group, entries in self._dist.get_entry_map().items():
            for name, entry_point in entries.items():
                name, _, value = str(entry_point).partition("=")
                yield EntryPoint(name=name.strip(), value=value.strip(), group=group)

    def _metadata_impl(self) -> email.message.Message:
        """
        :raises NoneMetadataError: if the distribution reports `has_metadata()`
            True but `get_metadata()` returns None.
        """
        if isinstance(self._dist, pkg_resources.DistInfoDistribution):
            metadata_name = "METADATA"
        else:
            metadata_name = "PKG-INFO"
        try:
            metadata = self.read_text(metadata_name)
        except FileNotFoundError:
            if self.location:
                displaying_path = display_path(self.location)
            else:
                displaying_path = repr(self.location)
            logger.warning("No metadata found in %s", displaying_path)
            metadata = ""
        feed_parser = email.parser.FeedParser()
        feed_parser.feed(metadata)
        return feed_parser.close()

    def iter_dependencies(self, extras: Collection[str] = ()) -> Iterable[Requirement]:
        if extras:  # pkg_resources raises on invalid extras, so we sanitize.
            extras = frozenset(pkg_resources.safe_extra(e) for e in extras)
            extras = extras.intersection(self._dist.extras)
        return self._dist.requires(extras)

    def iter_provided_extras(self) -> Iterable[str]:
        return self._dist.extras

    def is_extra_provided(self, extra: str) -> bool:
        return pkg_resources.safe_extra(extra) in self._dist.extras


class Environment(BaseEnvironment):
    def __init__(self, ws: pkg_resources.WorkingSet) -> None:
        self._ws = ws

    @classmethod
    def default(cls) -> BaseEnvironment:
        return cls(pkg_resources.working_set)

    @classmethod
    def from_paths(cls, paths: Optional[List[str]]) -> BaseEnvironment:
        return cls(pkg_resources.WorkingSet(paths))

    def _iter_distributions(self) -> Iterator[BaseDistribution]:
        for dist in self._ws:
            yield Distribution(dist)

    def _search_distribution(self, name: str) -> Optional[BaseDistribution]:
        """Find a distribution matching the ``name`` in the environment.

        This searches from *all* distributions available in the environment, to
        match the behavior of ``pkg_resources.get_distribution()``.
        """
        canonical_name = canonicalize_name(name)
        for dist in self.iter_all_distributions():
            if dist.canonical_name == canonical_name:
                return dist
        return None

    def get_distribution(self, name: str) -> Optional[BaseDistribution]:
        # Search the distribution by looking through the working set.
        dist = self._search_distribution(name)
        if dist:
            return dist

        # If distribution could not be found, call working_set.require to
        # update the working set, and try to find the distribution again.
        # This might happen for e.g. when you install a package twice, once
        # using setup.py develop and again using setup.py install. Now when
        # running pip uninstall twice, the package gets removed from the
        # working set in the first uninstall, so we have to populate the
        # working set again so that pip knows about it and the packages gets
        # picked up and is successfully uninstalled the second time too.
        try:
            # We didn't pass in any version specifiers, so this can never
            # raise pkg_resources.VersionConflict.
            self._ws.require(name)
        except pkg_resources.DistributionNotFound:
            return None
        return self._search_distribution(name)
python3.12/site-packages/pip/_vendor/msgpack.pyi000064400000000025151732701520015505 0ustar00from msgpack import *python3.12/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-312.pyc000064400000435501151732701520024675 0ustar00�

R`i4���`�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZ	ddlZ	eddlm!Z!	ddlm"Z"m#Z#m$Z$dZ%ddlm&Z'dd	l(m)Z)m*Z*	ddl+m,Z-e-j\dd
l/m0Z0m1Z1m2Z2ddl3m4Z4ddl3m5Z5e6d
�e6d�e6d�e6d�e6d�ejndkre8d��dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIe	j�deKd��ej�dej��ZNGd�deO�ZPe5j�j�ZSiZTd�ZUd�ZVd�ZWd�ZXd�ZYd�ZZd �Z[d!�xZ\Z]d"�Z^gd#�Z_Gd$�d%e`�ZaGd&�d'ea�ZbGd(�d)eb�ZcGd*�d+ea�ZdGd,�d-ea�ZeiZfd.j�ejn�Zhd/ZidZjd0ZkdZld1Zmd2�Znd3�Zogfd4�Zpd5�Zqd6�Zrej�d7�Zsej�d8�ZterZud9�Zvd:�ZwewZxd;�Zyd<�Zzd�d=�Z{d>�Z|Gd?�d@�Z}GdA�dBe}�Z~GdC�dD�ZGdE�dFe��Z�GdG�dH�Z�e�Z�GdI�dJe8�Z�GdK�dL�Z�dM�Z�dN�Z�dO�Z�dP�Z�dQ�Z�dR�Z�dS�Z�dT�Z�d�dU�Z�GdV�dW�Z�ene�e��dX�Z�GdY�dZe��Z�Gd[�d\e��Z�e��j)�Gd]�d^e��Z�e��Z�Gd_�d`e��Z�Gda�dbe��Z�Gdc�dde��Z�ene�j4e��Gde�dfe��Z�Gdg�dhe��Z�Gdi�dje��Z�eUdki�l�dm�Z�d�dn�Z�d�do�Z�e�e�j4e��d�dp�Z�e�e�e��d�dq�Z�dr�Z�Gds�dt�Z�du�Z�dv�Z�dw�Z�dx�Z�e�edy�re�e�jTe��e�e-�jVe��eUdki�z�eUdki�{�d|�Z�d}�Z�d~�Z�d�Z�d�d��Z�d��Z�e�edy�re�e�jTe��e�e�j4e��e�e-�jVe��d��Z�e�e�e��d��Z�d��Z�ifd��Z�d��Z�d��Z�d��Z�d��Z�ej�d���jtZ�ej�d�e�jxe�jzz��jtZ�Gd��d��Z�d��Z�Gd��d��Z�Gd��d�e��Z�Gd��d�e��Z�e�e�e�d��Z�d��Z�d��Z�Gd��d�e5�j��j��Z�Gd��d�e5�j��j��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�e	�j�d�ePd���d��Z�e�eӫfd���Z�Gd��d�eիZ�e�d���Z�y#e$rddlZY��wxYw#e$re ZY��wxYw#e$rdZ%Y��wxYw#e$rdZ-Y��wxYw)�a�
Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.

This module is deprecated. Users are directed to :mod:`importlib.resources`,
:mod:`importlib.metadata` and :pypi:`packaging` instead.
�N)�get_importer)�utime)�mkdir�rename�unlinkTF)�open)�isdir�split)�yield_lines�drop_comment�join_continuation)�platformdirs)�	packagingzpip._vendor.packaging.versionz pip._vendor.packaging.specifiersz"pip._vendor.packaging.requirementszpip._vendor.packaging.markerszpip._vendor.packaging.utils)��zPython 3.5 or later is requiredzbpkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html���
stacklevelz,^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)c��eZdZdZy)�
PEP440Warningza
    Used when there is an issue with a version or specifier not complying with
    PEP 440.
    N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.pyrr�s��rrc��t�j|�tjtj	||��y�N)�globals�update�_state_vars�dict�fromkeys)�vartype�kws  r�_declare_stater(�s+���I���R�����t�}�}�R��1�2rc�~�i}t�}tj�D]\}}|d|z||�||<�|S)N�_sget_)r!r#�items��state�g�k�vs    r�__getstate__r1�sF���E��	�A��!�!�#���1�"�1�X��\�?�1�Q�4�(��a��$��Lrc�~�t�}|j�D]\}}|dt|z||||��!|S)N�_sset_)r!r+r#r,s    r�__setstate__r4�sB���	�A����
���1�$��(�[��^�
#�$�Q��!��a�0���Lrc�"�|j�Sr )�copy��vals r�
_sget_dictr9�s���8�8�:�rc�F�|j�|j|�yr )�clearr"��key�obr-s   r�
_sset_dictr?�s���H�H�J��I�I�e�rc�"�|j�Sr )r1r7s r�_sget_objectrA�s������rc�&�|j|�yr )r4r<s   r�_sset_objectrC�s���O�O�E�rc��yr r��argss r�<lambda>rG�s��rc���t�}tj|�}|�Ftjdk(r3ddjt
�dd��d|jd���}|S|S#t$rY|SwxYw)aQReturn this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of macOS that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of macOS that we are *running*.  To allow usage of packages that
    explicitly require a newer version of macOS, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    N�darwin�macosx-�.r�-r)	�get_build_platform�macosVersionString�match�sys�platform�join�_macos_vers�group�
ValueError)�plat�ms  r�get_supported_platformrX�sy����D�� � ��&�A��}�����1�	�%(�X�X�k�m�B�Q�.?�%@�!�'�'�!�*�M�D��K�4�K���	���K�	�s�1A*�*	A7�6A7)G�require�
run_script�get_provider�get_distribution�load_entry_point�
get_entry_map�get_entry_info�iter_entry_points�resource_string�resource_stream�resource_filename�resource_listdir�resource_exists�resource_isdir�declare_namespace�working_set�add_activation_listener�find_distributions�set_extraction_path�cleanup_resources�get_default_cache�Environment�
WorkingSet�ResourceManager�Distribution�Requirement�
EntryPoint�ResolutionError�VersionConflict�DistributionNotFound�UnknownExtra�ExtractionErrorr�parse_requirements�
parse_version�	safe_name�safe_version�get_platform�compatible_platformsr�split_sections�
safe_extra�to_filename�invalid_marker�evaluate_marker�ensure_directory�normalize_path�EGG_DIST�BINARY_DIST�SOURCE_DIST�
CHECKOUT_DIST�DEVELOP_DIST�IMetadataProvider�IResourceProvider�FileMetadata�PathMetadata�EggMetadata�
EmptyProvider�empty_provider�NullProvider�EggProvider�DefaultProvider�ZipProvider�register_finder�register_namespace_handler�register_loader_type�fixup_namespace_packagesr�PkgResourcesDeprecationWarning�run_main�AvailableDistributionsc��eZdZdZd�Zy)rtz.Abstract base for dependency resolution errorsc�Z�|jjt|j�zSr )�	__class__r�reprrF��selfs r�__repr__zResolutionError.__repr__'s���~�~�&�&��d�i�i��8�8rN)rrrrr�rrrrtrt$s
��8�9rrtc�@�eZdZdZdZed��Zed��Zd�Zd�Z	y)ruz�
    An already-installed version conflicts with the requested version.

    Should be initialized with the installed Distribution and the requested
    Requirement.
    z3{self.dist} is installed but {self.req} is requiredc� �|jdS�NrrEr�s r�distzVersionConflict.dist5����y�y��|�rc� �|jdS�N�rEr�s r�reqzVersionConflict.req9r�rc�J�|jjdit���S�Nr��	_template�format�localsr�s r�reportzVersionConflict.report=���$�t�~�~�$�$�0�v�x�0�0rc�:�|s|S|j|fz}t|�S)zt
        If required_by is non-empty, return a version of self that is a
        ContextualVersionConflict.
        )rF�ContextualVersionConflict)r��required_byrFs   r�with_contextzVersionConflict.with_context@s'��
��K��y�y�K�>�)��(�$�/�/rN)
rrrrr��propertyr�r�r�r�rrrruru+s?���F�I�
��������1�0rruc�>�eZdZdZej
dzZed��Zy)r�z�
    A VersionConflict that accepts a third parameter, the set of the
    requirements that required the installed Distribution.
    z by {self.required_by}c� �|jdS)NrrEr�s rr�z%ContextualVersionConflict.required_bySr�rN)rrrrrur�r�r�rrrr�r�Ks,���
 �)�)�,D�D�I�
���rr�c�P�eZdZdZdZed��Zed��Zed��Zd�Z	d�Z
y)	rvz&A requested distribution was not foundzSThe '{self.req}' distribution was not found and is required by {self.requirers_str}c� �|jdSr�rEr�s rr�zDistributionNotFound.req`r�rc� �|jdSr�rEr�s r�	requirerszDistributionNotFound.requirersdr�rc�R�|jsydj|j�S)Nzthe applicationz, )r�rRr�s r�
requirers_strz"DistributionNotFound.requirers_strhs���~�~�$��y�y����(�(rc�J�|jjdit���Sr�r�r�s rr�zDistributionNotFound.reportnr�rc�"�|j�Sr )r�r�s r�__str__zDistributionNotFound.__str__qs���{�{�}�rN)rrrrr�r�r�r�r�r�r�rrrrvrvXsU��0�	2��
���������)��)�
1�rrvc��eZdZdZy)rwz>Distribution doesn't have an "extra feature" of the given nameNrrrrrwrwus��Hrrwz{}.{}rr����c��|t|<y)aRegister `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    N)�_provider_factories)�loader_type�provider_factorys  rr�r��s��(8���$rc�F�t|t�r.tj|�xst	t|��dS	tj|}t|dd�}tt|�|�S#t$r!t|�tj|}Y�LwxYw)z?Return an IResourceProvider for the named module or requirementr�
__loader__N)
�
isinstancerrrh�findrY�strrP�modules�KeyError�
__import__�getattr�
_find_adapterr�)�moduleOrReq�module�loaders   rr[r[�s����+�{�+�����,�L���K�8H�0I�!�0L�L�*����[�)���V�\�4�
0�F�5�=�,�f�5�f�=�=��	�*��;�����[�)��*�s�A6�6'B �B c�&�|s�tj�d}|dk(rOd}tjj	|�r.ttd�rt
j|�}d|vr|d}|j|jd��|dS)Nr�z0/System/Library/CoreServices/SystemVersion.plist�	readPlist�ProductVersionrK)
rQ�mac_ver�os�path�exists�hasattr�plistlibr��appendr
)�_cache�version�plist�
plist_contents    rrSrS�s�����"�"�$�Q�'���b�=�F�E��w�w�~�~�e�$��8�[�1�$,�$6�$6�u�$=�M�'�=�8�"/�0@�"A���
�
�g�m�m�C�(�)��!�9�rc�,�ddd�j||�S)N�ppc)�PowerPC�Power_Macintosh)�get)�machines r�_macos_archr��s����7�;�;�G�W�M�Mrc�>�ddlm}|�}tjdk(rl|j	d�s[	t�}t
j�djdd�}dt|d�t|d	�t|�fzS|S#t$rY|SwxYw)
z�Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and macOS.
    r)r}rIrJ�� �_zmacosx-%d.%d-%sr�)�	sysconfigr}rPrQ�
startswithrSr��uname�replace�intr�rU)r}rVr�r�s    rrMrM�s���'��>�D�
�|�|�x�����	�(B�	�!�m�G��h�h�j��m�+�+�C��5�G�$��G�A�J���G�A�J���G�$�(��
��K��	�	�
��K�		�s�AB�	B�Bzmacosx-(\d+)\.(\d+)-(.*)zdarwin-(\d+)\.(\d+)\.(\d+)-(.*)c�J�|�|�||k(rytj|�}|�rtj|�}|sltj|�}|rTt|j	d��}|j	d��d|j	d���}|dk(r|dk\s
|dk(r|dk\ryy	|j	d�|j	d�k7s#|j	d
�|j	d
�k7ry	t|j	d��t|j	d��kDry	yy	)z�Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    Tr�rKr�z10.3�z10.4Fr)rNrO�darwinVersionStringr�rT)�provided�required�reqMac�provMac�
provDarwin�dversion�macosversions       rr~r~�s����8�+�x�8�/C�� �
%�
%�h�
/�F�
�$�*�*�8�4���-�2�2�8�<�J���z�/�/��2�3��*0�,�,�q�/�6�<�<��?�K����M�$��.��1�}�$��.����=�=���v�|�|�A��.�'�-�-��2B�f�l�l�ST�o�2U���w�}�}�Q�� �3�v�|�|�A��#7�7���rc��tjd�j}|d}|j�||d<t	|�dj||�y)z@Locate distribution `dist_spec` and run its `script_name` scriptr�rrN�rP�	_getframe�	f_globalsr;rYrZ)�	dist_spec�script_name�ns�names    rrZrZ�sK��	���q�	�	#�	#�B�
�j�>�D��H�H�J��B�z�N��I��q��$�$�[�"�5rc��t|t�rtj|�}t|t�rt	|�}t|t
�st
d|��|S)z@Return a current distribution object for a Requirement or stringz-Expected string, Requirement, or Distribution)r�r�rr�parser[rq�	TypeError�r�s rr\r\sM���$���� � ��&���$��$��D�!���d�L�)��G��N�N��Krc�8�t|�j||�S)zDReturn `name` entry point of `group` for `dist` or raise ImportError)r\r]�r�rTr	s   rr]r]s���D�!�2�2�5�$�?�?rc�6�t|�j|�S)�=Return the entry point map for `group`, or the full entry map)r\r^)r�rTs  rr^r^s���D�!�/�/��6�6rc�8�t|�j||�S�z<Return the EntryPoint object for `group`+`name`, or ``None``)r\r_rs   rr_r_ s���D�!�0�0���=�=rc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)r�c��y)z;Does the package's distribution contain the named metadata?Nr�r	s r�has_metadatazIMetadataProvider.has_metadata&��rc��y)z'The named metadata resource as a stringNrrs r�get_metadatazIMetadataProvider.get_metadata)rrc��y)z�Yield named metadata resource as list of non-blank non-comment lines

        Leading and trailing whitespace is stripped from each line, and lines
        with ``#`` as the first non-blank character are omitted.Nrrs r�get_metadata_linesz$IMetadataProvider.get_metadata_lines,rrc��y)z>Is the named metadata a directory?  (like ``os.path.isdir()``)Nrrs r�metadata_isdirz IMetadataProvider.metadata_isdir2rrc��y)z?List of metadata names in the directory (like ``os.listdir()``)Nrrs r�metadata_listdirz"IMetadataProvider.metadata_listdir5rrc��y)z=Execute the named script in the supplied namespace dictionaryNr)r�	namespaces  rrZzIMetadataProvider.run_script8rrN)	rrrrrrrr rZrrrr�r�%s%��J�6�D�M�N�Lrr�c�4�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	y)	r�z3An object that provides access to package resourcesc��y)zdReturn a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``Nr��manager�
resource_names  r�get_resource_filenamez'IResourceProvider.get_resource_filename?rrc��y)ziReturn a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``Nrr%s  r�get_resource_streamz%IResourceProvider.get_resource_streamDrrc��y)zmReturn a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``Nrr%s  r�get_resource_stringz%IResourceProvider.get_resource_stringIrrc��y)z,Does the package contain the named resource?Nr�r's r�has_resourcezIResourceProvider.has_resourceNrrc��y)z>Is the named resource a directory?  (like ``os.path.isdir()``)Nrr.s rrfz IResourceProvider.resource_isdirQrrc��y)z?List of resource names in the directory (like ``os.listdir()``)Nrr.s rrdz"IResourceProvider.resource_listdirTrrN)
rrrrr(r*r,r/rfrdrrrr�r�<s%��=�5�
5�
5�
;�M�Nrr�c��eZdZdZdd�Zed��Zed��Zd�Zd�Z	d�Z
dd	�Zd
�Zd�Z
dd�Z				dd
�Zd�Zdd�Zd�Zdd�Zd�Zd�Zd�Zy)rozDA collection of active distributions on sys.path (or a similar list)Nc��g|_i|_i|_i|_g|_|�t
j}|D]}|j|��y)z?Create working set from list of path entries (default=sys.path)N)�entries�
entry_keys�by_key�normalized_to_canonical_keys�	callbacksrPr��	add_entry)r�r4�entrys   r�__init__zWorkingSet.__init__[sJ�����������,.��)�����?��h�h�G��E��N�N�5�!�rc��|�}	ddlm}	|j|�|S#t$r|cYSwxYw#t$r|j|�cYSwxYw)z1
        Prepare the master working set.
        r)�__requires__)�__main__r=�ImportErrorrYru�_build_from_requirements)�cls�wsr=s   r�
_build_masterzWorkingSet._build_masterisb��
�U��	�-�	>��J�J�|�$��	���	��I�	���	>��/�/��=�=�	>�s�#�4�1�1�A�Ac�4�|g�}t|�}|j|t��}|D]}|j|��tj
D]"}||jvs�|j|��$|jtj
dd|S)zQ
        Build a working set from a requirement spec. Rewrites sys.path.
        N)ry�resolvern�addrPr�r4r9)rA�req_specrB�reqs�distsr�r:s       rr@z#WorkingSet._build_from_requirements}s~����W��!�(�+���
�
�4���/���D��F�F�4�L���X�X�E��B�J�J�&����U�#��
�j�j�������	rc��|jj|g�|jj|�t	|d�D]}|j||d��y)a�Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        TFN)r5�
setdefaultr4r�rjrF)r�r:r�s   rr9zWorkingSet.add_entry�sK��	
���"�"�5�"�-������E�"�&�u�d�3�D��H�H�T�5�%�(�4rc�R�|jj|j�|k(S)z9True if `dist` is the active distribution for its project)r6r�r=�r�r�s  r�__contains__zWorkingSet.__contains__�s���{�{���t�x�x�(�D�0�0rc�
�|jj|j�}|�I|jj|j�}|�"||_|jj|�}|�||vrt	||��|S)a�Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        )r6r�r=r7ru)r�r�r��
canonical_keys    rr�zWorkingSet.find�sv���{�{���s�w�w�'���<� �=�=�A�A�#�'�'�J�M��(�'����{�{���}�5�����C��!�$��,�,��rc������fd�|D�S)aYield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        c3��K�|];}|j��j�D]}���|jk(r|����=y�wr )r^�valuesr	)�.0r�r:rTr	s   ��r�	<genexpr>z/WorkingSet.iter_entry_points.<locals>.<genexpr>�sJ�����
����+�+�E�2�9�9�;���|�t�u�z�z�1�
�;�
��s�AAr�r�rTr	s ``rr`zWorkingSet.iter_entry_points�s���
��
�	
rc��tjd�j}|d}|j�||d<|j	|�dj||�y)z?Locate distribution for `requires` and run `script_name` scriptr�rrNr)r��requiresrrr	s     rrZzWorkingSet.run_script�sO��
�]�]�1�
�
'�
'���*�~��
���
���:�����X��q�!�,�,�[�"�=rc#�K�i}|jD]@}||jvr�|j|D]}||vs�d||<|j|����By�w)z�Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        r�N)r4r5r6)r��seen�itemr=s    r�__iter__zWorkingSet.__iter__�s\�������L�L�D��4�?�?�*�����t�,���d�?� !�D��I��+�+�c�*�*�-�!�s
�7A�Ac��|r|j|j||��|�|j}|jj	|g�}|jj	|jg�}|s|j
|jvry||j|j
<tjj|j
�}|j
|j|<|j
|vr|j|j
�|j
|vr|j|j
�|j|�y)aAdd `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        �r�N)
�	insert_onr4�locationr5rKr=r6r�utils�canonicalize_namer7r��
_added_new)r�r�r:�insertr��keys�keys2�normalized_names        rrFzWorkingSet.add�s�����N�N�4�<�<���N�@��=��M�M�E����)�)�%��4�����*�*�4�=�=�"�=���4�8�8�t�{�{�2�� $����D�H�H��#�/�/�;�;�D�H�H�E��=A�X�X��)�)�/�:��8�8�4���K�K����!��8�8�5� ��L�L����"�����rc	���t|�ddd�}i}i}g}t�}	tjt�}
|r�|jd�}||vr�|	j
||�s�+|j||||||
|�}|j|j�ddd�}
|j|
�|
D]/}|
|j|j�|j|	|<�1d||<|r��|S)a�List all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.

        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.

        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        Nr�rT)
�list�
_ReqExtras�collections�defaultdict�set�pop�markers_pass�
_resolve_distrX�extras�extendrF�project_name)r��requirements�env�	installer�replace_conflictingrq�	processed�best�to_activate�
req_extrasr�r�r��new_requirements�new_requirements               rrEzWorkingSet.resolves	��B�L�)�$�B�$�/���	������\�
�"�-�-�c�2����"�"�1�%�C��i����*�*�3��7���%�%��T�.��Y��[��D�
 $�}�}�S�Z�Z�8��2��>����� 0�1�$4���O�,�0�0��1A�1A�B�.1�j�j�
�?�+�$4�"�I�c�N�/�4�rc���|j|j�}|��|jj|j�}|�||vrx|rv|}	|�.|�t|j�}ntg�}tg�}	|j
||	||��x}||j<|�|j|d�}
t||
��|j|�||vr ||}t||�j|��|S)N)rw)r�r=r6rnr4ro�
best_matchrvr�rur�)r�r�ryrwrurvr�rzr�rBr��
dependent_reqs            rrpzWorkingSet._resolve_distOs����x�x���� ���<��;�;�?�?�3�7�7�+�D��|��C��4G����;��|�)�$�,�,�7��
*�"�o��'��^��'*�~�~���Y�<O�(6�(���t�C�G�G�}��<� +����T� :�I�.�s�I�>�>����t�$��s�?�'��,�M�!�$��,�9�9�-�H�H��rc�\�t|�}|j�i}i}|�t|j�}||z
}n||z}|j	g�}	tt|	j|��|D]u}
||
D]k}|j�g}	|	j|||�}
tt|	j|
��|jtj|
���u�wt|�}|j�||fS#t$r}|||<|rYd}~��Yd}~��d}~wwxYw)asFind all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            # add plugins+libs to sys.path
            map(working_set.add, distributions)
            # display errors
            print('Could not load', errors)

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        N)
ri�sortrnr4r��maprF�as_requirementrEr"r$r%rt)r��
plugin_env�full_envrv�fallback�plugin_projects�
error_info�
distributionsru�
shadow_setrsr�r��	resolveesr0s               r�find_pluginszWorkingSet.find_pluginsns,��F�z�*�������
��
����d�l�l�+�C��:��C��Z�'�C��^�^�B�'�
��S�����
&�'�+�L�"�<�0���*�*�,�-��� *� 2� 2�3��Y� G�I���Z�^�^�Y�7�8�!�(�(����y�)A�B��+1�,�0�]�+�
������j�(�(��)'��'(�J�t�$�� ����s�D�	D+�D&�&D+c�j�|jt|��}|D]}|j|��|S)a�Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        )rEryrF)r�rt�neededr�s    rrYzWorkingSet.require�s4�����0��>�?���D��H�H�T�N���
rc�|�||jvry|jj|�|sy|D]
}||��y)z�Invoke `callback` for all distributions

        If `existing=True` (default),
        call on all existing ones, as well.
        N)r8r�)r��callback�existingr�s    r�	subscribezWorkingSet.subscribe�s<���t�~�~�%�������h�'����D��T�N�rc�6�|jD]
}||��yr )r8)r�r�r�s   rrczWorkingSet._added_new�s�����H��T�N�'rc���|jdd|jj�|jj�|jj�|j
ddfSr )r4r5r6r6r7r8r�s rr1zWorkingSet.__getstate__�sU���L�L��O��O�O� � �"��K�K�����-�-�2�2�4��N�N�1��
�	
rc��|\}}}}}|dd|_|j�|_|j�|_|j�|_|dd|_yr )r4r6r5r6r7r8)r��	e_k_b_n_cr4rer6r7r8s       rr4zWorkingSet.__setstate__�sT��IR�F���v�;�Y��q�z����)�)�+����k�k�m���,H�,M�,M�,O��)�"�1���rr )NTF)NNFN)NNT�T)rrrrr;�classmethodrCr@r9rNr�r`rZr\rFrErpr�rYr�rcr1r4rrrroroXs���N�"�����&����*
)�1��0
�>�+�"�F
��!��
H�T�>O)�b� ��
�&rroc��eZdZdZdd�Zy)rjz>
    Map each requirement to the extras that demanded it.
    Nc�|���fd�|j�d�|xsdzD�}�jxst|�S)z�
        Evaluate markers for req against each extra that
        demanded it.

        Return False if the req has a marker and fails
        evaluation. Otherwise, return True.
        c3�X�K�|]!}�jjd|i����#y�w)�extraN��marker�evaluate)rTr�r�s  �rrUz*_ReqExtras.markers_pass.<locals>.<genexpr>s-�����
�@��
�J�J����%� 0�1�@�s�'*rr )r�r��any)r�r�rq�extra_evalss `  rroz_ReqExtras.markers_pass�s?���
����#�r�*�f�.?��@�
���:�:�~�1��[�!1�1rr )rrrrrorrrrjrj�s���2rrjc�j�eZdZdZde�efd�Zd�Zd�Zdd�Z	d�Z
d�Zdd	�Zdd
�Z
d�Zd�Zd
�Zy)rnz5Searchable snapshot of distributions on a search pathNc�P�i|_||_||_|j|�y)a!Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.6'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        N)�_distmaprQ�python�scan)r��search_pathrQr�s    rr;zEnvironment.__init__
s%��&��
� ��
�����	�	�+�rc��|jduxs)|jduxs|j|jk(}|xr t|j|j�S)z�Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        N)r��
py_versionr~rQ)r�r��	py_compats   r�can_addzEnvironment.can_add"sX��
�K�K�4��
.����$�&�
.����$�+�+�-�	�
�O�1�$�-�-����O�Orc�T�|j|jj|�y)z"Remove `dist` from the environmentN)r�r=�removerMs  rr�zEnvironment.remove0s���
�
�d�h�h��&�&�t�,rc�x�|�tj}|D]#}t|�D]}|j|���%y)adScan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        N)rPr�rjrF)r�r�r[r�s    rr�zEnvironment.scan4s7�����(�(�K��D�*�4�0�������1� rc�Z�|j�}|jj|g�S)aReturn a newest-to-oldest list of distributions for `project_name`

        Uses case-insensitive `project_name` comparison, assuming all the
        project's distributions use their project's name converted to all
        lowercase as their key.

        )�lowerr�r�)r�rs�distribution_keys   r�__getitem__zEnvironment.__getitem__Cs+��(�-�-�/���}�}� � �!1�2�6�6rc��|j|�rt|j�rc|jj|jg�}||vr8|j|�|j
tjd�d��yyyy)zCAdd `dist` if we ``can_add()`` it and it has not already been added�hashcmpT)r=�reverseN)	r��has_versionr�rKr=r�r��operator�
attrgetter)r�r�rIs   rrFzEnvironment.addNso���<�<���$�"2�"2�"4��M�M�,�,�T�X�X�r�:�E��5� ����T�"��
�
�x�2�2�9�=�t�
�L�!�#5�rc��	|j|�}|�|S||jD]
}||vs�|cS|j||�S#t$r|s�d}Y�BwxYw)a�Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        N)r�rur=�obtain)r�r�rhrvrwr�s      rrzEnvironment.best_matchVsq��	��#�#�C�(�D�
���K�����M�D��s�{���"��{�{�3�	�*�*���	�&���D�	�s�A�A�Ac��|�||�Sy)a�Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument.Nr)r��requirementrvs   rr�zEnvironment.obtainqs��� ��[�)�)�!rc#�^K�|jj�D]}||s�	|���y�w)z=Yield the unique project names of the available distributionsN)r�re�r�r=s  rr\zEnvironment.__iter__}s)�����=�=�%�%�'�C��C�y��	�(�s�#-�-c���t|t�r|j|�|St|t�r$|D]}||D]}|j|���|St	d|�d���)z2In-place addition of a distribution or environmentz
Can't add z to environment)r�rqrFrnr)r��other�projectr�s    r�__iadd__zEnvironment.__iadd__�sd���e�\�*��H�H�U�O���
��{�
+� ��!�'�N�D��H�H�T�N�+�!�
���U�D�E�Erc�J�|jgdd��}||fD]}||z
}�	|S)z4Add an environment or distribution to an environmentN)rQr��r�)r�r��newrus    r�__add__zEnvironment.__add__�s2���n�n�R�$�t�n�<����;�C��3�J�C���
rr �NF)rrrrrX�PY_MAJORr;r�r�r�r�rFrr�r\r�r�rrrrnrnsK��?��)?�)A�(��0P�-�
�	7�M�+�6
*��
�rrnc��eZdZdZy)rxaTAn error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    Nrrrrrxrx�s��rrxc�p�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zdd�Z
ed��Zd
�Zd�Zdd�Zy)rpz'Manage resource extraction and packagesNc��i|_yr )�cached_filesr�s rr;zResourceManager.__init__�s
����rc�6�t|�j|�S)zDoes the named resource exist?)r[r/�r��package_or_requirementr's   rrezResourceManager.resource_exists�s���2�3�@�@��O�Orc�6�t|�j|�S)z,Is the named resource an existing directory?)r[rfr�s   rrfzResourceManager.resource_isdir�s���2�3�B�B�=�Q�Qrc�8�t|�j||�S)z4Return a true filesystem path for specified resource)r[r(r�s   rrcz!ResourceManager.resource_filename�s ���2�3�I�I��-�
�	
rc�8�t|�j||�S)z9Return a readable file-like object for specified resource)r[r*r�s   rrbzResourceManager.resource_stream�� ���2�3�G�G��-�
�	
rc�8�t|�j||�S)z%Return specified resource as a string)r[r,r�s   rrazResourceManager.resource_string�r�rc�6�t|�j|�S)z1List the contents of the named resource directory)r[rdr�s   rrdz ResourceManager.resource_listdir�s���2�3�D�D�]�S�Src��tj�d}|jxs
t�}t	j
d�j
�}t|jdit����}||_
||_||_|�)z5Give an error message for problems extracting file(s)r�a
            Can't extract file(s) to egg cache

            The following error occurred while trying to extract file(s)
            to the Python egg cache:

              {old_exc}

            The Python egg cache directory is currently set to:

              {cache_path}

            Perhaps your account does not have write access to this directory?
            You can change the cache directory by setting the PYTHON_EGG_CACHE
            environment variable to point to an accessible directory.
            r)
rP�exc_info�extraction_pathrm�textwrap�dedent�lstriprxr�r�r&�
cache_path�original_error)r��old_excr��tmpl�errs     r�extraction_errorz ResourceManager.extraction_error�s~���,�,�.��#���)�)�@�->�-@�
����
�
�"�&�(�#	
�$�k�d�k�k�5�F�H�5�6�����#���$����	rc��|jxs
t�}tjj||dzg|���}	t|�|j|�d|j|<|S#t$r|j�Y�=wxYw)a�Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        z-tmpr�)
r�rmr�r�rR�_bypass_ensure_directory�	Exceptionr��_warn_unsafe_extraction_pathr�)r��archive_name�names�extract_path�target_paths     r�get_cache_pathzResourceManager.get_cache_path�s����+�+�B�/@�/B���g�g�l�l�<���1F�O��O��	$�$�[�1�	
�)�)�,�7�)*����+�&����
�	$��!�!�#�	$�s�A+�+B�Bc�d�tjdk(r#|jtjd�sytj|�j
}|tjzs|tjzr5djdit���}tj|t�yy)aN
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        �nt�windirNz�Extraction path is writable by group/others and vulnerable to attack when used with get_resource_filename ({path}). Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).r)
r�r	r��environ�stat�st_mode�S_IWOTH�S_IWGRPr�r��warnings�warn�UserWarning)r��mode�msgs   rr�z,ResourceManager._warn_unsafe_extraction_paths����7�7�d�?�4�?�?�2�:�:�h�3G�#H�
��w�w�t�}�$�$���$�,�,��$����"5��:��f�!��x�!�C�
�M�M�#�{�+�#6rc��tjdk(r<tj|�jdzdz}tj||�yy)a4Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        �posiximi�N)r�r	r�r��chmod)r��tempname�filenamer�s    r�postprocesszResourceManager.postprocess#sA���7�7�g���W�W�X�&�.�.�%�7�6�A�D��H�H�X�t�$�rc�@�|jrtd��||_y)a�Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        z5Can't change extraction path, files already extractedN)r�rUr��r�r�s  rrkz#ResourceManager.set_extraction_path7s!��&����T�U�U�#��rc��y)aB
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        Nr)r��forces  rrlz!ResourceManager.cleanup_resourcesOrr�r�F)rrrrr�r;rerfrcrbrardr�r��staticmethodr�r�rkrlrrrrprp�s]��1��O��P�R�
�
�
�T��<�2�,��,�4%�($�0
rrpc�p�tjjd�xstjd��S)z�
    Return the ``PYTHON_EGG_CACHE`` environment variable
    or a platform-relevant user cache dir for an app
    named "Python-Eggs".
    �PYTHON_EGG_CACHEzPython-Eggs)�appname)r�r�r�r�user_cache_dirrrrrmrm]s/���:�:�>�>�,�-���1L�1L��2�rc�0�tjdd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    �[^A-Za-z0-9.]+rL)�re�subrs rr{r{hs��
�6�6�"�C��.�.rc���	ttjj|��S#tjj$r,|jdd�}t
jdd|�cYSwxYw)zB
    Convert an arbitrary string to a standard version string
    r�rKrrL)r�rr��Version�InvalidVersionr�rr
)r�s rr|r|psb��6��9�$�$�,�,�W�5�6�6�����+�+�6��/�/�#�s�+���v�v�&��W�5�5�6�s�'*�AA3�2A3c���|jdd�}tj|�}|r|d}|t|�d}nd}|}dt	|���jd�}|�d|��S)aFallback when ``safe_version`` is not safe enough
    >>> parse_version(_forgiving_version('0.23ubuntu1'))
    <Version('0.23.dev0+sanitized.ubuntu1')>
    >>> parse_version(_forgiving_version('0.23-'))
    <Version('0.23.dev0+sanitized')>
    >>> parse_version(_forgiving_version('0.-_'))
    <Version('0.dev0+sanitized')>
    >>> parse_version(_forgiving_version('42.+?1'))
    <Version('42.dev0+sanitized.1')>
    >>> parse_version(_forgiving_version('hello world'))
    <Version('0.dev0+sanitized.hello.world')>
    r�rK�safeN�0z
sanitized.z.dev0+)r��_PEP440_FALLBACK�search�len�
_safe_segment�strip)r�rOr�rest�locals     r�_forgiving_versionr|sx���o�o�c�3�'�G��#�#�G�,�E���V�}���s�4�y�z�"��������t�,�-�.�4�4�S�9�E��V�6�%��!�!rc��tjdd|�}tjdd|�}tjdd|�jd�S)z/Convert an arbitrary string into a safe segmentrrLz-[^A-Za-z0-9]+z\.[^A-Za-z0-9]+rKz.-)rr
r)�segments rrr�sG���f�f�%�s�G�4�G��f�f�%�s�G�4�G�
�6�6�$�c�7�3�9�9�$�?�?rc�L�tjdd|�j�S)z�Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    z[^A-Za-z0-9.-]+r�)rr
r�)r�s rr�r��s!���6�6�#�S�%�0�6�6�8�8rc�&�|jdd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    rLr�r^rs rr�r��s��
�<�<��S�!�!rc�h�	t|�y#t$r}d|_d|_|cYd}~Sd}~wwxYw)zo
    Validate text as a PEP 508 environment marker; return an exception
    if invalid or False otherwise.
    NF)r��SyntaxErrorr��lineno)�text�es  rr�r��s9��
����
��	����
��������s��	1�,�1�1c���	tjj|�}|j�S#tjj$r}t|�|�d}~wwxYw)z�
    Evaluate a PEP 508 environment marker.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.

    This implementation uses the 'pyparsing' module.
    N)r�markers�Markerr��
InvalidMarkerr!)r#r�r�r$s    rr�r��sR��$��"�"�)�)�$�/����� � �����*�*�$��!�n�!�#��$�s�.1�A�A�Ac��eZdZdZdZdZdZd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed��Zd�Zy)r�zETry to implement resources and metadata for arbitrary PEP 302 loadersNc��t|dd�|_tjj	t|dd��|_y)Nr��__file__r�)r�r�r�r��dirname�module_path)r�r�s  rr;zNullProvider.__init__�s0���f�l�D�9����7�7�?�?�7�6�:�r�+J�K��rc�:�|j|j|�Sr )�_fnr-�r�r&r's   rr(z"NullProvider.get_resource_filename�s���x�x��(�(�-�8�8rc�L�tj|j||��Sr )�io�BytesIOr,r0s   rr*z NullProvider.get_resource_stream�s���z�z�$�2�2�7�M�J�K�Krc�X�|j|j|j|��Sr )�_getr/r-r0s   rr,z NullProvider.get_resource_string��"���y�y����$�"2�"2�M�B�C�Crc�X�|j|j|j|��Sr )�_hasr/r-�r�r's  rr/zNullProvider.has_resource�r6rc�:�|j|j|�Sr )r/�egg_info�r�r	s  r�_get_metadata_pathzNullProvider._get_metadata_path�s���x�x��
�
�t�,�,rc�v�|js|jS|j|�}|j|�Sr )r;r=r8�r�r	r�s   rrzNullProvider.has_metadata�s1���}�}��=�=� ��&�&�t�,���y�y���rc���|jsy|j|�}|j|�}	|jd�S#t$r+}|xj
dj
||�z
c_�d}~wwxYw)Nr��utf-8z in {} file at path: {})r;r=r5�decode�UnicodeDecodeError�reasonr�)r�r	r��value�excs     rrzNullProvider.get_metadata�sn���}�}���&�&�t�,���	�	�$���	��<�<��(�(��!�	�
�J�J�3�:�:�4��F�F�J���		�s�A�	A6�&A1�1A6c�6�t|j|��Sr �rrr<s  rrzNullProvider.get_metadata_lines�����4�,�,�T�2�3�3rc�X�|j|j|j|��Sr )�_isdirr/r-r9s  rrfzNullProvider.resource_isdir�s"���{�{�4�8�8�D�$4�$4�m�D�E�Erc�t�|jxr+|j|j|j|��Sr )r;rKr/r<s  rrzNullProvider.metadata_isdir�s)���}�}�K����T�X�X�d�m�m�T�-J�!K�Krc�X�|j|j|j|��Sr )�_listdirr/r-r9s  rrdzNullProvider.resource_listdirs"���}�}�T�X�X�d�&6�&6�
�F�G�Grc�t�|jr+|j|j|j|��SgSr )r;rNr/r<s  rr zNullProvider.metadata_listdirs,���=�=��=�=����$�-�-��!>�?�?��	rc�t�d|z}|j|�s#tdjd
it�����|j	|�jdd�}|jdd�}|j
|j|�}||d<tjj|�r?t|�5}|j�}ddd�t|d�}t|||�ydd	lm}	t#|�d|j%d�|f|	|<t||d�}
t|
||�y#1swY�fxYw)Nzscripts/z<Script {script!r} not found in metadata at {self.egg_info!r}z
�
�
r+�execr)�cacher)rrtr�r�rr�r/r;r�r�r�r�read�compilerS�	linecacherTrr
)r�rr"�script�script_text�script_filename�fid�source�coderT�script_codes           rrZzNullProvider.run_script	s'���k�)��� � ��(�!�U�N�U�U���h���
�
�'�'��/�7�7���E��!�)�)�$��5���(�(�4�=�=�&�9�� /�	�*��
�7�7�>�>�/�*��o�&�#������'��6�?�F�;�D���y�)�,�'��K� ���!�!�$�'��	&�E�/�"�"�+���G�K���i��3�'�&�s�8D.�.D7c��td���Nz9Can't perform this operation for unregistered loader type��NotImplementedErrorrs  rr8zNullProvider._has&���!�G�
�	
rc��td��r`rars  rrKzNullProvider._isdir+rcrc��td��r`rars  rrNzNullProvider._listdir0rcrc��|j|�|r/tjj|g|j	d����S|S)N�/)�_validate_resource_pathr�r�rRr
)r��baser's   rr/zNullProvider._fn5s;���$�$�]�3���7�7�<�<��@�}�':�':�3�'?�@�@��rc�r�tjj|jtj
�vxs,t	j|�xstj|�}|syd}tj|�r t	j|�st|��t|dddzt�y)aH
        Validate the resource paths according to the docs.
        https://setuptools.pypa.io/en/latest/pkg_resources.html#basic-resource-access

        >>> warned = getfixture('recwarn')
        >>> warnings.simplefilter('always')
        >>> vrp = NullProvider._validate_resource_path
        >>> vrp('foo/bar.txt')
        >>> bool(warned)
        False
        >>> vrp('../foo/bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('/foo/bar.txt')
        >>> bool(warned)
        True
        >>> vrp('foo/../../bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('foo/f../bar.txt')
        >>> bool(warned)
        False

        Windows path separators are straight-up disallowed.
        >>> vrp(r'\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path is not allowed.

        >>> vrp(r'C:\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path is not allowed.

        Blank values are allowed

        >>> vrp('')
        >>> bool(warned)
        False

        Non-string values are not.

        >>> vrp(None)
        Traceback (most recent call last):
        ...
        AttributeError: ...
        Nz=Use of .. or absolute path in a resource path is not allowed.r�z/ and will raise exceptions in a future release.)r�r��pardirr
�	posixpath�sep�isabs�ntpathrU�
issue_warning�DeprecationWarning)r��invalidr�s   rrhz$NullProvider._validate_resource_path;s���l
�G�G�N�N�d�j�j����7�7�
"����t�$�
"��|�|�D�!�	�
��M���<�<���i�o�o�d�&;��S�/�!�	����H�H�H��	
rc�z�t|jd�r|jj|�Std��)N�get_dataz=Can't perform this operation for loaders without 'get_data()')r�r�rtrbrs  rr5zNullProvider._get�s5���4�;�;�
�+��;�;�'�'��-�-�!�K�
�	
r)rrrr�egg_namer;r�r;r(r*r,r/r=rrrrfrrdr rZr8rKrNr/rrhr5rrrr�r��s���O��H��H�
�F�L�9�L�D�D�-���4�F�L�H��
4�:
�

�

�
��G
��G
�R
rr�c#�xK�d}||k7r/|��|}tjj|�\}}||k7r�.yy�w)z2
    yield all parents of path including path
    N)r�r�r
)r��lastr�s   r�_parentsrx�s=�����D�
�$�,��
����'�'�-�-��%���a��$�,�s�5:�:c�.��eZdZdZ�fd�Zd�Zd�Z�xZS)r�z&Provider based on a virtual filesystemc�D��t�|�|�|j�yr )�superr;�
_setup_prefix�r�r�r�s  �rr;zEggProvider.__init__�s���
���� ����rc��ttt|j��}t	|d�}|xr|j|�yyr )�filter�_is_egg_pathrxr-�next�_set_egg)r��eggs�eggs   rr|zEggProvider._setup_prefix�s;���l�H�T�-=�-=�$>�?���4�����"��
�
�c�"�"rc��tjj|�|_tjj	|d�|_||_y)N�EGG-INFO)r�r��basenamerurRr;�egg_rootrs  rr�zEggProvider._set_egg�s5�����(�(��.��
������T�:�6��
���
r)rrrrr;r|r��
__classcell__r�s@rr�r��s���0��#�rr�c�>�eZdZdZd�Zd�Zd�Zd�Zd�Ze	d��Z
y)	r�z6Provides access to package resources in the filesystemc�@�tjj|�Sr )r�r�r�rs  rr8zDefaultProvider._has�s���w�w�~�~�d�#�#rc�@�tjj|�Sr )r�r�r	rs  rrKzDefaultProvider._isdir�s���w�w�}�}�T�"�"rc�,�tj|�Sr )r��listdirrs  rrNzDefaultProvider._listdir�s���z�z�$��rc�N�t|j|j|�d�S�N�rb)rr/r-r0s   rr*z#DefaultProvider.get_resource_stream�s ���D�H�H�T�-�-�}�=�t�D�Drc�f�t|d�5}|j�cddd�S#1swYyxYwr�)rrU)r�r��streams   rr5zDefaultProvider._get�s#��
�$��
���;�;�=��
�
�s�'�0c�b�d}|D](}tt|td��}t||��*y)N)�SourceFileLoader�SourcelessFileLoader)r��importlib_machinery�typer�)rA�loader_namesr	�
loader_clss    r�	_registerzDefaultProvider._register�s2��
��!�D� �!4�d�D��J�G�J� ��S�1�!rN)rrrrr8rKrNr*r5r�r�rrrr�r��s3��@�$�#� �E�!��2��2rr�c�0�eZdZdZdZd�xZZd�Zd�Zd�Z	y)r�z.Provider that returns nothing for all requestsNc��yr�rrs  rrGzEmptyProvider.<lambda>�s��urc��y�Nr�rrs  rr5zEmptyProvider._get�s��rc��gSr rrs  rrNzEmptyProvider._listdir�s���	rc��yr rr�s rr;zEmptyProvider.__init__�s��r)
rrrrr-rKr8r5rNr;rrrr�r��s#��8��K�,�,�F�T���
rr�c�$�eZdZdZed��ZeZy)�ZipManifestsz
    zip manifest builder
    c���tj|�5��fd��j�D�}t|�cddd�S#1swYyxYw)a
        Build a dictionary similar to the zipimport directory
        caches, except instead of tuples, store ZipInfo objects.

        Use a platform-specific path separator (os.sep) for the path keys
        for compatibility with pypy on Windows.
        c3��K�|]5}|jdtj��j|�f���7y�w)rgN)r�r�rm�getinfo)rTr	�zfiles  �rrUz%ZipManifests.build.<locals>.<genexpr>�s=������
-�D��L�L��b�f�f�-��M�M�$�'��-�s�;>N)�zipfile�ZipFile�namelistr$)rAr�r+r�s   @r�buildzZipManifests.build�s@����_�_�T�
"�e��
"�N�N�,��E���;�#�
"�
"�s�$A�AN)rrrrr�r��loadrrrr�r��s"�������$�Drr�c�<�eZdZdZej
dd�Zd�Zy)�MemoizedZipManifestsz%
    Memoized zipfile manifests.
    �manifest_modzmanifest mtimec��tjj|�}tj|�j}||vs||j
|k7r&|j
|�}|j||�||<||jS)zW
        Load a manifest at path or return a suitable manifest already loaded.
        )	r�r��normpathr��st_mtime�mtimer�r��manifest)r�r�r�r�s    rr�zMemoizedZipManifests.loadsx���w�w����%������
�&�&���t��t�D�z�/�/�5�8��z�z�$�'�H��*�*�8�U�;�D��J��D�z�"�"�"rN)rrrrrk�
namedtupler�r�rrrr�r��s#���*�;�)�)�.�:J�K�L�#rr�c���eZdZdZdZe�Z�fd�Zd�Zd�Z	e
d��Zd�Ze
d��Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Z�xZS)r�z"Resource support for zips and eggsNc�|��t�|�|�|jjtj
z|_yr )r{r;r��archiver�rm�zip_prer}s  �rr;zZipProvider.__init__s*���
���� ��{�{�*�*�R�V�V�3��rc��|jtj�}||jjk(ry|j|j�r|t|j�dSt|�d|j����)Nr�� is not a subpath of )	�rstripr�rmr�r�r�r�r�AssertionError�r��fspaths  r�
_zipinfo_namezZipProvider._zipinfo_namesh�����r�v�v�&���T�[�[�(�(�(�����T�\�\�*��#�d�l�l�+�-�.�.��F�D�L�L�Q�R�Rrc��|j|z}|j|jtjz�r8|t|j�dzdj
tj�St|�d|j����)Nr�r�)r�r�r�r�rmrr
r�)r��zip_pathr�s   r�_partszZipProvider._parts(sl������(�����T�]�]�R�V�V�3�4��#�d�m�m�,�q�0�2�3�9�9�"�&�&�A�A��F�D�M�M�R�S�Src�`�|jj|jj�Sr )�_zip_manifestsr�r�r�r�s r�zipinfozZipProvider.zipinfo0s#���"�"�'�'����(;�(;�<�<rc�*�|jstd��|j|�}|j�}dj	|j|��|vr(|D]#}|j
||j|���%|j
||�S)Nz5resource_filename() only supported for .egg, not .ziprg)rurb�_resource_to_zip�_get_eager_resourcesrRr��_extract_resource�
_eager_to_zip)r�r&r'r��eagersr	s      rr(z!ZipProvider.get_resource_filename4s����}�}�%�G��
��(�(��7���*�*�,���8�8�D�K�K��)�*�f�4����&�&�w��0B�0B�4�0H�I���%�%�g�x�8�8rc�j�|j}|jdz}tj|�}||fS)N)rrr�)�	file_size�	date_time�time�mktime)�zip_stat�sizer��	timestamps    r�_get_date_and_sizezZipProvider._get_date_and_sizeAs5���!�!���&�&��3�	��K�K�	�*�	��$��rc�b�||j�vrg|j�|D]2}|j|tjj	||��}�4tjj�S|j
|j|�\}}tstd��	|j|j|j|��}|j||�r|Stdtjj|���\}}	tj||j j#|��tj$|�t'|	||f�|j)|	|�	t+|	|�|S#tj,$retjj/|�rD|j||�r|cYStj0dk(rt3|�t+|	|�|cYS�wxYw#tj,$r|j5�YSwxYw)Nz>"os.rename" and "os.unlink" are not supported on this platformz	.$extract)�dirr�)�_indexr�r�r�rRr,r�r��
WRITE_SUPPORT�IOErrorr�rur��_is_current�_mkstemp�writer�rt�closerr�r�error�isfiler	rr�)
r�r&r�r	rwr�r��	real_path�outf�tmpnams
          rr�zZipProvider._extract_resourceKs����t�{�{�}�$����
�h�/���-�-�g�r�w�w�|�|�H�d�7S�T��0��7�7�?�?�4�(�(��1�1�$�,�,�x�2H�I��	�4���S��
�!	'��.�.�t�}�}�d�k�k�(�>S�T�I����	�8�4� � �#���G�G�O�O�I�.��L�D�&�
�H�H�T�4�;�;�/�/��9�:��H�H�T�N��&�9�i�0�1�����	�2�
��v�y�)�&���#�8�8�
��7�7�>�>�)�,��'�'�	�8�<� )�(����D���y�)��v�y�1�(�(��
���x�x�	'��$�$�&���		'�sD�->H�,BH�>F�AH�H�,H�H�H�H�#H.�-H.c��|j|j|�\}}tjj	|�sytj
|�}|j|k7s|j|k7ry|jj|�}t|d�5}|j�}ddd�||k(S#1swY|k(SxYw)zK
        Return True if the file_path is current for this zip_path
        Fr�N)r�r�r�r�r�r��st_sizer�r�rtrrU)	r��	file_pathr�r�r�r��zip_contents�f�
file_contentss	         rr�zZipProvider._is_current}s����1�1�$�,�,�x�2H�I��	�4��w�w�~�~�i�(���w�w�y�!���<�<�4��4�=�=�I�#=���{�{�+�+�H�5��
�)�T�
"�a��F�F�H�M�#��}�,�,�#��}�,�,�s�B;�;Cc��|j�Bg}dD]4}|j|�s�|j|j|���6||_|jS)N)znative_libs.txtzeager_resources.txt)r�rrrr)r�r�r	s   rr�z ZipProvider._get_eager_resources�sT���;�;���F�B���$�$�T�*��M�M�$�"9�"9�$�"?�@�C�!�D�K��{�{�rc�`�	|jS#t$r�i}|jD]y}|jtj
�}|s�%tj
j
|dd�}||vr||j|d��c|j�g||<|r�U�{||_|cYSwxYw)Nr�)	�	_dirindex�AttributeErrorr�r
r�rmrRr�rn)r��indr��parts�parents     rr�zZipProvider._index�s���	��>�>�!���	��C������
�
�2�6�6�*����V�V�[�[��s���4�F���}��F��*�*�5��9�5��',�y�y�{�m��F��
�%�!�D�N��J�	�s��;B-�
AB-�B-�,B-c�h�|j|�}||jvxs||j�vSr )r�r�r�)r�r�r�s   rr8zZipProvider._has�s1���%�%�f�-���4�<�<�'�D�8�t�{�{�}�+D�Drc�D�|j|�|j�vSr )r�r�r�s  rrKzZipProvider._isdir�s���!�!�&�)�T�[�[�]�:�:rc�r�t|j�j|j|�d��Sr�)rir�r�r�r�s  rrNzZipProvider._listdir�s+���D�K�K�M�%�%�d�&8�&8��&@�"�E�F�Frc�X�|j|j|j|��Sr )r�r/r�r9s  rr�zZipProvider._eager_to_zip�s"���!�!�$�(�(�4�=�=�-�"H�I�Irc�X�|j|j|j|��Sr )r�r/r-r9s  rr�zZipProvider._resource_to_zip�s$���!�!�$�(�(�4�+;�+;�]�"K�L�Lr)rrrrr�r�r�r;r�r�r�r�r(rr�r�r�r�r�r8rKrNr�r�r�r�s@rr�r�s����,�
�F�)�+�N�4�S�T��=��=�9�����0�d-� ��"E�;�G�J�Mrr�c�4�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	y)	r�a*Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    c��||_yr �r�rs  rr;zFileMetadata.__init__�s	����	rc��|jSr r�r<s  rr=zFileMetadata._get_metadata_path�s���y�y�rc�b�|dk(xr)tjj|j�S)N�PKG-INFO)r�r�r�r<s  rrzFileMetadata.has_metadata�s#���z�!�?�b�g�g�n�n�T�Y�Y�&?�?rc���|dk7rtd��tj|jdd��5}|j	�}ddd�|j�|S#1swY�xYw)Nr�z(No metadata except PKG-INFO is availablerAr�)�encoding�errors)r�r2rr�rU�_warn_on_replacement)r�r	r��metadatas    rrzFileMetadata.get_metadata�sZ���:���E�F�F�
�W�W�T�Y�Y���
C�q��v�v�x�H�D��!�!�(�+���D�
C�s�A�A(c�t�d}||vr2d}|jdit���}tj|�yy)Nu�z2{self.path} could not be properly decoded in UTF-8r)r�r�r�r�)r�r�replacement_charr�r�s     rr�z!FileMetadata._warn_on_replacement�s;�� ���x�'�G�D��$�+�+�)���)�C��M�M�#��(rc�6�t|j|��Sr rHr<s  rrzFileMetadata.get_metadata_lines�rIrN)
rrrrr;r=rrr�rrrrr�r��s&��	���@���4rr�c��eZdZdZd�Zy)r�asMetadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir, project_name=dist_name, metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    c� �||_||_yr )r-r;)r�r�r;s   rr;zPathMetadata.__init__�s����� ��
rN�rrrrr;rrrr�r��s���&!rr�c��eZdZdZd�Zy)r�z Metadata provider for .egg filesc�$�|jtjz|_||_|j
r:tjj|j|j
�|_n|j|_|j�y)z-Create a metadata provider from a zipimporterN)
r�r�rmr�r��prefixr�rRr-r|)r��importers  rr;zEggMetadata.__init__sc�� �'�'�"�&�&�0�������?�?�!�w�w�|�|�H�,<�,<�h�o�o�N�D��'�/�/�D�����rNrrrrr�r��s
��*�	rr�r$��_distribution_findersc��|t|<y)axRegister `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example.Nr)�
importer_type�distribution_finders  rr�r�s��,?��-�(rc�L�t|�}tt|�}||||�S)z.Yield distributions accessible via `path_item`)rr�r)�	path_item�onlyr
�finders    rrjrjs(���I�&�H�
�0�(�
;�F��(�I�t�,�,rc#�K�|jjd�ryt|�}|jd�rtj||����|ry|j
d�D]�}t|�rKtjj||�}ttj|�|�}|D]}|����Y|j�jd�s�ytjj||�}ttj|��}||_tj!|||�����y�w)z@
    Find eggs in zip files; possibly multiple nested eggs.
    z.whlNr��rr�)�
.dist-info�	.egg-info)r��endswithr�rrq�
from_filenamerdr�r�r�rR�find_eggs_in_zip�	zipimport�zipimporterr�r;�
from_location)	r
rrr�subitem�subpathrIr��submetas	         rrr s������� � ��(�	��8�$�H����Z�(��(�(��X�(�F�F����,�,�R�0���� ��g�g�l�l�9�g�6�G�$�Y�%:�%:�7�%C�W�M�E����
��
�]�]�_�
%�
%�&A�
B��g�g�l�l�9�g�6�G�!�)�"7�"7��"@�A�G�&�G���,�,�Y���I�I�1�s
�CE�!A!Ec��yr�r)r
rrs   r�find_nothingr">s��
rc
#��K�t���t��rBtj�t	�t
jj�d������y�fd�t��D�}t|�D]@}t
jj�|�}t�||�}||�D]}|����By�w)z6Yield distributions accessible on a sys.path directoryr�rNc3�^�K�|]$}tjj�|����&y�wr )r�r�rR)rT�childrs  �rrUzfind_on_path.<locals>.<genexpr>Ps#�����S�;R�%�r�w�w�|�|�I�u�-�;R�s�*-)�_normalize_cached�_is_unpacked_eggrqrr�r�r�rR�safe_listdir�sorted�dist_factory)r
rrr4r:�fullpath�factoryr�s `      r�find_on_pathr-Es������!�)�,�I��	�"��(�(��!�)�R�W�W�\�\�)�Z�-P�Q�)�
�	
�	�S�<�	�;R�S�G������7�7�<�<�	�5�1���y�%��6���H�%�D��J�&�!�s�B<B?c�l�|j�}|jd�}|jd�xr=tjj	tjj||��}|xs|}|rtS|st|�rtS|s|jd�rtSt�S)z*Return a dist_factory for the given entry.rrz	.egg-link)r�rr�r�r	rR�distributions_from_metadatar�rj�resolve_egg_link�NoDists)rr:rr��is_egg_info�is_dist_info�is_metas       rr*r*Zs����K�K�M�E��.�.��-�K��>�>�,�/��B�G�G�M�M�
�����Y��&�5�L��)�\�G��	$����U�+� ������{�3����Y�rc��eZdZdZd�Zd�Zy)r1zS
    >>> bool(NoDists())
    False

    >>> list(NoDists()('anything'))
    []
    c��yr�rr�s r�__bool__zNoDists.__bool__vs��rc��td�Sr�)�iter)r�r+s  r�__call__zNoDists.__call__ys���B�x�rN)rrrrr7r:rrrr1r1ms����rr1c���	tj|�S#ttf$rYyt$rF}|j
t
jt
jt
jfvr�Yd}~yd}~wwxYw)zI
    Attempt to list contents of path, but suppress some exceptions.
    Nr)	r�r��PermissionError�NotADirectoryError�OSError�errno�ENOTDIR�EACCES�ENOENT)r�r$s  rr(r(}sk����z�z�$�����/�0�
�����
�7�7�5�=�=�%�,�,����E�E��F�
���s��A6�A6�<A1�1A6c#�xK�tjj|�}tjj|�r/t	tj
|��dk(ryt
||�}nt|�}tjj|�}tj|||t����y�w)Nr)�
precedence)r�r�r,r	rr�r�r�r�rqrr�)r��rootrr:s    rr/r/�s�����
�7�7�?�?�4� �D�	�w�w�}�}�T���r�z�z�$�� �A�%����d�+����%���G�G���T�"�E�
�
$�
$��
���	%���s�B8B:c#�K�t|�5}|D]}|j�}|s�|���	ddd�y#1swYyxYw�w)z1
    Yield non-empty lines from file at path
    N)rr)r�r��lines   r�non_empty_linesrH�s7����
�d��q��D��:�:�<�D���
��
���s�A�7�7�	A�A�Ac�h��t��}�fd�|D�}tt|�}t|d�S)za
    Given a path to an .egg-link, resolve distributions
    present in the referenced path.
    c3��K�|]A}tjjtjj��|����Cy�wr )r�r�rRr,)rT�refr�s  �rrUz#resolve_egg_link.<locals>.<genexpr>�s2������<L�S������R�W�W�_�_�T�*�C�0�<L�s�AA
r)rHr�rjr�)r��referenced_paths�resolved_paths�dist_groupss`   rr0r0�s;���
'�t�,���<L��N��(�.�9�K���R� � r�ImpImporter��_namespace_handlers)�_namespace_packagesc��|t|<y)a�Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer, path_entry, moduleName, module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    NrP)r�namespace_handlers  rr�r��s��*;��
�&rc���t|�}|�y	|j|�}|r|jnd}�ytjj|�}|�;tj|�x}tj|<g|_
t|�nt|d�st!d|��t#t$|�}|||||�}|�?|j}|j'|�t)j*|�t-|||�|S#t$rTt	j
�5t	jd�|j|�}ddd�n#1swYnxYwY��1wxYw)zEEnsure that named package includes a subpath of path_item (if needed)N�ignore�__path__�Not a package:)r�	find_specr�r�r��catch_warnings�simplefilter�find_modulerPr�r��types�
ModuleTyperW�_set_parent_nsr�rr�rQr��	importlib�
import_module�_rebuild_mod_path)	�packageNamerr
�specr�r��handlerrr�s	         r�
_handle_nsrf�s=���I�&�H����/��!�!�+�.��!%����$��
�~��
�[�[�_�_�[�
)�F�
�~�,1�,<�,<�[�,I�I�����[�)�����{�#�
�V�Z�
(��(�+�6�6��/��:�G��h�	�;��?�G����������G������,��$��V�4��N��1�7�
�
$�
$�
&��!�!�(�+��)�)�+�6�F�'�
&�
&��7�s)�D�E#�#'E�
	E#�E	�E#�"E#c�.����tjD�cgc]
}t|���c}��fd����fd�}t||��}|D�cgc]
}t|���}}t	|j
t�r||j
ddy||_ycc}wcc}w)zq
    Rebuild module.__path__ ensuring that all entries are ordered
    corresponding to their sys.path order
    c�\��	�j|�S#t$rtd�cYSwxYw)z/
        Workaround for #520 and #513.
        �inf)�indexrU�float)r:�sys_paths �r�safe_sys_path_indexz._rebuild_mod_path.<locals>.safe_sys_path_index�s0���	 ��>�>�%�(�(���	 ���<��	 �s��+�+c����|jtj�}�jd�dz}|d|}�t	tjj|���S)zR
        Return the ordinal of the path based on its position in sys.path
        rKr�N)r
r�rm�countr&rR)r��
path_parts�module_partsr��package_namerms    ��r�position_in_sys_pathz/_rebuild_mod_path.<locals>.position_in_sys_path	sX����Z�Z����'�
�#�)�)�#�.��2���>�\�M�*��"�#4�R�V�V�[�[��5G�#H�I�Ir)r=N)rPr�r&r)r�rWri)�	orig_pathrrr��prs�new_pathrmrls `    @@rrbrb�s����
/2�h�h�7�h��!�!�$�h�7�H� �J��i�%9�:�H�.6�7�h��!�!�$�h�H�7��&�/�/�4�(�%������"����58��*8s�B
�Bc��d|�d�}tj|td��tj�	|t
vr	tj�ytj}|jd�\}}}|r<t|�|t
vrt|�	tj|j}t
j!|xsdg�j#|�t
j!|g�|D]}t%||��	tj�y#t$r}td|�|�d}~wwxYw#tj�wxYw)z9Declare that package 'packageName' is a namespace packagez4Deprecated call to `pkg_resources.declare_namespace(z�)`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packagesrrNrKrX)r�r�rq�_imp�acquire_lockrR�release_lockrPr��
rpartitionrgr�r�rWr�rrKr�rf)rcr�r�r�r�r$rs       rrgrg	s8��?�{�o�N3�	3��
�M�M�#�)�a�8�������-�-��2	
����/�x�x��"�-�-�c�2����1���f�%��0�0��6�"�
A��{�{�6�*�3�3��	�&�&�v�~��r�:�A�A�+�N��&�&�{�B�7��I�
�{�I�.��	
�����"�
A�� 0�&�9�q�@��
A��	
����s7�D?�AD?�D!�9AD?�!	D<�*
D7�7D<�<D?�?Ec��tj�	tj|d�D]}t	||�}|s�t||��	tj�y#tj�wxYw)zDEnsure that previously-declared namespace packages include path_itemrN)rxryrRr�rfr�rz)rr��packagers    rr�r�D	s^�������*�.�.�v�r�:�G� ��)�4�G��(��'�:�;�
	
���������s�'A"�A"�"A8c���tjj||jd�d�}t	|�}|j
D]}t	|�|k(s�y|S)zBCompute an ns-package subpath for a filesystem or zipfile importerrKr�N)r�r�rRr
r&rW)r
rrcr�r�
normalizedr[s       r�file_ns_handlerr�P	sW���g�g�l�l�9�k�&7�&7��&<�R�&@�A�G�"�7�+�J������T�"�j�0�� �
�rc��yr r)r
rrcr�s    r�null_ns_handlerr�d	s��rc	���tjjtjjtjj	t|����S)z1Normalize a file/dir name for comparison purposes)r�r��normcase�realpathr��
_cygwin_patch�r�s rr�r�k	s:��
�7�7���B�G�G�,�,�R�W�W�-=�-=�m�H�>U�-V�W�X�Xrc�j�tjdk(rtjj	|�S|S)a
    Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
    symlink components. Using
    os.path.abspath() works around this limitation. A fix in os.getcwd()
    would probably better, in Cygwin even more so, except
    that this seems to be by design...
    �cygwin)rPrQr�r��abspathr�s rr�r�p	s'��),����(@�2�7�7�?�?�8�$�N�h�Nrc�P�	||S#t$rt|�x||<}|cYSwxYwr )r�r�)r�r��results   rr&r&{	s:����h������$2�8�$<�<��x��6��
��s��%�%c�2�t|�xst|�S)z7
    Determine if given path appears to be an egg.
    )�_is_zip_eggr'r�s rr�r��	s���t��6� 0�� 6�6rc��|j�jd�xr6tjj	|�xrtj|�S)N�.egg)r�rr�r�r�r��
is_zipfiler�s rr�r��	sC���
�
����f�%�	%��G�G�N�N�4� �	%����t�$�rc��|j�jd�xr>tjj	tjj|dd��S)z@
    Determine if given path appears to be an unpacked egg.
    r�r�r�)r�rr�r�r�rRr�s rr'r'�	sE���:�:�<� � ��(��R�W�W�^�^�
�����T�:�z�2�.�rc���|jd�}|j�}|rAdj|�}ttj
||tj
|�yy)NrK)r
rnrR�setattrrPr�)rcr�r	r�s    rr_r_�	sP�����c�"�E��9�9�;�D�����%�������F�#�T�3�;�;�{�+C�D�
rz\w+(\.\w+)*$z�
    (?P<name>[^-]+) (
        -(?P<ver>[^-]+) (
            -py(?P<pyver>[^-]+) (
                -(?P<plat>.+)
            )?
        )?
    )?
    c��eZdZdZdd�Zd�Zd�Zdd�Zd�Zdd�Z	e
jd	�Ze
dd
��Ze
d��Ze
dd��Ze
dd
��Zy)rsz3Object representing an advertised importable objectNc��t|�std|��||_||_t	|�|_t	|�|_||_y)NzInvalid module name)�MODULErUr	�module_name�tuple�attrsrqr�)r�r	r�r�rqr�s      rr;zEntryPoint.__init__�	sD���k�"��2�K�@�@���	�&����5�\��
��F�m�����	rc���|j�d|j��}|jr!|ddj|j�zz
}|jr!|ddj|j�zz
}|S)Nz = �:rKz [%s]�,)r	r�r�rRrq)r��ss  rr�zEntryPoint.__str__�	sa�����D�$4�$4�5���:�:�
��s�x�x��
�
�+�+�+�A��;�;�
��3�8�8�D�K�K�0�0�0�A��rc��dt|�zS)NzEntryPoint.parse(%r)�r�r�s rr�zEntryPoint.__repr__�	s��%��D�	�1�1rc��|r|s|rtjdtd��|r|j|i|��|j	�S)zH
        Require packages for this EntryPoint, then resolve it.
        zJParameters to load are deprecated.  Call .resolve and .require separately.rr)r�r�r�rYrE)r�rYrF�kwargss    rr�zEntryPoint.load�	sF���$�&��M�M�'�.��	
���D�L�L�$�)�&�)��|�|�~�rc���t|jdgd��}	tjt|j
|�S#t$r}tt|��|�d}~wwxYw)zD
        Resolve the entry point from its module and attrs.
        rr)�fromlist�levelN)	r�r��	functools�reducer�r�r�r?r�)r�r�rFs   rrEzEntryPoint.resolve�	sY���D�,�,�
�|�1�M��	1��#�#�G�T�Z�Z��@�@���	1��c�#�h�'�S�0��	1�s�$A�	A#�	A�A#c�"�|jr|jstd|��|jj|j�}tj||||j��}t
ttj|��y)Nz&Can't require() without a distribution)rq)	rqr�rwrXrhrErir�rF)r�rurvrHr+s     rrYzEntryPoint.require�	sg���;�;�t�y�y��G��N�N��y�y�!�!�$�+�+�.���#�#�D�#�y����#�M���S����%�
(�)rz]\s*(?P<name>.+?)\s*=\s*(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+))?\s*(?P<extras>\[.*\])?\s*$c��|jj|�}|sd}t||��|j�}|j	|d�}|dr|djd�nd}||d|d|||�S)aParse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1, extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        z9EntryPoint must be in 'name=module:attrs [extras]' formatrq�attrrKrr	r�)�patternrOrU�	groupdict�
_parse_extrasr
)rA�srcr�rWr��resrqr�s        rrzEntryPoint.parse�	s���
�K�K���c�"���M�C��S�#�&�&��k�k�m���"�"�3�x�=�1��*-�f�+��F��!�!�#�&�2���3�v�;��H�
�u�f�d�C�Crc�|�|sytjd|z�}|jr
t��|jS)Nr�x)rrr�specsrUrq)rA�extras_specr�s   rr�zEntryPoint._parse_extras
s6��������k� 1�2���9�9��,���z�z�rc���t|�std|��i}t|�D]H}|j||�}|j|vrtd||j��|||j<�J|S)zParse an entry point groupzInvalid group namezDuplicate entry point)r�rUrrr	)rArT�linesr��thisrG�eps       r�parse_groupzEntryPoint.parse_group
sp���e�}��1�5�9�9�����&�D����4��&�B��w�w�$�� �!8�%����I�I��D����M�	'�
�rc��t|t�r|j�}nt|�}i}|D]K\}}|�|s�t	d��|j�}||vrt	d|��|j
|||�||<�M|S)z!Parse a map of entry point groupsz%Entry points must be listed in groupszDuplicate group name)r�r$r+rrUrr�)rA�datar��mapsrTr�s      r�	parse_mapzEntryPoint.parse_map"
s����d�D�!��:�:�<�D�!�$�'�D��� �L�E�5��}��� �!H�I�I��K�K�M�E���}� �!7��?�?��/�/�%���=�D��K�!��r)rrNr�)NNr )rrrrr;r�r�r�rErYrrVr�r�rr�r�r�rrrrsrs�	s���=���2�
�1�*��b�j�j�	#��G��D��D�&�����
��
����rrsc��d�}t||�}tt|�d�}|jd�\}}}t	|j��xsdS)z�
    Given an iterable of lines from a Metadata file, return
    the value of the Version field, if present, or None otherwise.
    c�@�|j�jd�S)Nzversion:)r�r�)rGs r�is_version_linez+_version_from_file.<locals>.is_version_line<
s���z�z�|�&�&�z�2�2rr�r�N)rr�r9�	partitionr|r)r�r��
version_linesrGr�rEs      r�_version_from_filer�6
sP��3��?�E�2�M���]�#�R�(�D��.�.��%�K�A�q�%�����
�&�.�$�.rc���eZdZdZdZddddedefd�Zed*d��Z	d�Z
ed��Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zed��Zed��Zed��Zed��Zed��Zed��Zd�Zd+d�Zd�Zd�Zd�Zd,d�Z d�Z!d�Z"d�Z#d�Z$�fd�Z%ed*d ��Z&d!�Z'd"�Z(d*d#�Z)d$�Z*d,d%�Z+d&�Z,d'�Z-d(�Z.ed)��Z/�xZ0S)-rqz5Wrap an actual or potential sys.path entry w/metadatar�Nc��t|xsd�|_|�t|�|_||_||_||_||_|xst|_	y)N�Unknown)
r{rsr|�_versionr�rQr`rDr��	_provider)r�r`rrsr�r�rQrDs        rr;zDistribution.__init__J
sP��&�l�&?�i�@�����(��1�D�M�$��� ��
� ��
�$���!�3�^��rc�<�dgdz\}}}}tjj|�\}}	|	j�tvr=t|	j�}t|�}
|
r|
j
dddd�\}}}}|||f||||d�|��j�S)Nr�r	�ver�pyverrV)rsr�r�rQ)r�r��splitextr��_distributionImpl�EGG_NAMErT�_reload_version)rAr`r�rr'rsr�r�rQ�extrOs           rrzDistribution.from_location]
s���7;�f�q�j�3��g�z�8����(�(��2�
��#��9�9�;�+�+�#�C�I�I�K�0�C��X�&�E��>C�k�k��E�7�F�?�;��g�z�8����
�&��!��

��
��/�
�	rc��|Sr rr�s rr�zDistribution._reload_versions
s���rc��|j|j|j|j|jxsd|j
xsdfSr�)�_forgiving_parsed_versionrDr=r`r�rQr�s rr�zDistribution.hashcmpv
sD��
�*�*��O�O��H�H��M�M��O�O�!�r��M�M��R�

�	
rc�,�t|j�Sr )�hashr�r�s r�__hash__zDistribution.__hash__�
s���D�L�L�!�!rc�4�|j|jkSr �r��r�r�s  r�__lt__zDistribution.__lt__�
����|�|�e�m�m�+�+rc�4�|j|jkSr r�r�s  r�__le__zDistribution.__le__�
����|�|�u�}�}�,�,rc�4�|j|jkDSr r�r�s  r�__gt__zDistribution.__gt__�
r�rc�4�|j|jk\Sr r�r�s  r�__ge__zDistribution.__ge__�
r�rc�b�t||j�sy|j|jk(Sr�)r�r�r�r�s  r�__eq__zDistribution.__eq__�
s&���%����0���|�|�u�}�}�,�,rc��||k(Sr rr�s  r�__ne__zDistribution.__ne__�
����5�=� � rc��	|jS#t$r&|jj�x|_}|cYSwxYwr )�_keyr�rsr�r�s  rr=zDistribution.key�
s@��	��9�9����	�"�/�/�5�5�7�7�D�I���J�	�s��,=�=c��t|d�s'	t|j�|_|jS|jS#tjj
$ra}d|j�d�}t|d�r|j|��tjjt|��d|���d�d}~wwxYw)N�_parsed_versionz
(package: �)�add_noter�)	r�rzr�r�rrrsr�r�)r��ex�infos   r�parsed_versionzDistribution.parsed_version�
s����t�.�/�
V�'4�T�\�\�'B��$��#�#�#�t�#�#�#���$�$�3�3�
V�#�D�$5�$5�#6�a�8���2�z�*��K�K��%���'�'�6�6�#�b�'��!�D�6�7J�K�QU�U��
V�s�A�B>�AB9�9B>c
��	|jS#tjj$r�}t	t|j��|_djt|dg��}dt|��d|�d|j�d|j�d�	}tj|t�|jcYd}~Sd}~wwxYw)NrQ�	__notes__zg!!


            *************************************************************************
            zl

            This is a long overdue deprecation.
            For the time being, `pkg_resources` will use `z�`
            as a replacement to avoid breaking existing environments,
            but no future compatibility is guaranteed.

            If you maintain package z� you should implement
            the relevant changes to adequate the project to PEP 440 immediately.
            *************************************************************************
            

!!
            )r�rr�rrzrr�rRr�r�rsr�r�rq)r�r��notesr�s    rr�z&Distribution._forgiving_parsed_version�
s���	(��&�&�&��� � �/�/�	(�#0�1C�D�L�L�1Q�#R�D� ��I�I�g�b�+�r�:�;�E�
�
��W�I�R��w�;�<@�;O�;O�:P�Q%�&*�%6�%6�$7�8
�
�C�
�M�M�#�1�2��'�'�'��)	(�s��C�BC�;C�Cc��	|jS#t$rb}|j�}|�D|j|j�}dj|j|�}t
||�|�|cYd}~Sd}~wwxYw)Nz4Missing 'Version:' header and/or {} file at path: {})r�r��_get_version�_get_metadata_path_for_display�PKG_INFOr�rU)r�r$r�r�r�s     rr�zDistribution.version�
sw��	��=�=� ���		��'�'�)�G����:�:�4�=�=�I��M�U�U��M�M�4���!��d�+��2��N��		�s��	A9�AA4�.A9�4A9c��	|jS#t$r2|j|j��|_Y|jSwxYw)z~
        A map of extra to its list of (direct) requirements
        for this distribution, including the null extra.
        )�_Distribution__dep_mapr��_filter_extras�_build_dep_mapr�s r�_dep_mapzDistribution._dep_map�
sH��	H��>�>�!���	H�!�0�0��1D�1D�1F�G�D�N��~�~��	H�s��-A	�A	c�,�ttd|��D]{}|}|j|�}|jd�\}}}|xrt	|�xst|�}|rg}t
|�xsd}|j|g�j|��}|S)z�
        Given a mapping of extras to dependencies, strip off
        environment markers and filter out any dependencies
        not matching the markers.
        Nr�)	rirrnr�r�r�r�rKrr)�dmr��	new_extrarHr�r��fails_markers       rr�zDistribution._filter_extras�
s����&��r�*�+�E��I��6�6�%�=�D�#(�?�?�3�#7� �I�q�&�!���v�&�E�o�f�.E�*E�
����"�9�-�5��I��M�M�)�R�(�/�/��5�,��	rc��i}dD]N}t|j|��D]/\}}|j|g�jt	|���1�P|S)N)zrequires.txtzdepends.txt)r�
_get_metadatarKrrry)r�r�r	r�rHs     rr�zDistribution._build_dep_map�
sV��
��1�D�-�d�.@�.@��.F�G���t��
�
�e�R�(�/�/�0B�4�0H�I� H�2��	rc���|j}g}|j|jdd��|D] }	|j|t|���"|S#t$r}t|�d|���|�d}~wwxYw)z@List of Requirements needed for this distro if `extras` are usedNrz has no such extra feature )r�rrr�r�r�rw)r�rqr��depsr�r$s      rrXzDistribution.requiress|��
�]�]�������B�F�F�4��$�%��C�
����B�z�#��/�0�����	�
�"�9=�s�C�����
�s�A�	A6� A1�1A6c�\�	|jj|�}|S#t$rYywxYw)zK
        Return the path to the given metadata file, if available.
        z[could not detect])r�r=r�r?s   rr�z+Distribution._get_metadata_path_for_displays8��		(��>�>�4�4�T�:�D�����	(�'�	(�s��	+�+c#�dK�|j|�r|j|�D]}|���yy�wr )rr)r�r	rGs   rrzDistribution._get_metadata#s3�������T�"��/�/��5���
�6�#�s�.0c�R�|j|j�}t|�}|Sr )rr�r�)r�r�r�s   rr�zDistribution._get_version(s%���"�"�4�=�=�1��$�U�+���rc��|�tj}|j||��|tjurJt|j�|jd�D] }|tjvs�t|��"yy)z>Ensure distribution is importable on `path` (default=sys.path)Nr^�namespace_packages.txt)rPr�r_r�r`rr�rg)r�r�r��pkgs    r�activatezDistribution.activate.sh���<��8�8�D����t�W��-��3�8�8��$�T�]�]�3��)�)�*B�C���#�+�+�%�%�c�*�D�rc���t|j��dt|j��d|jxst��}|j
r|d|j
zz
}|S)z@Return what this distribution's standard .egg filename should berLz-py)r�rsr�r�r�rQ)r�r�s  rruzDistribution.egg_name9sU��
��)�)�*�����%��O�O�'�x�'�
���=�=���d�m�m�+�+�H��rc�T�|jr|�d|j�d�St|�S)Nz (r�)r`r�r�s rr�zDistribution.__repr__Es"���=�=� $�d�m�m�4�4��t�9�rc�n�	t|dd�}|xsd}|j�d|��S#t$rd}Y�$wxYw)Nr�z[unknown version]r�)r�rUrs)r�r�s  rr�zDistribution.__str__KsI��	��d�I�t�4�G��0�0���+�+�W�5�5���	��G�	�s�
&�4�4c�f�|jd�rt|��t|j|�S)zADelegate all unrecognized public attributes to .metadata providerr�)r�r�r�r�)r�r�s  r�__getattr__zDistribution.__getattr__Ss*���?�?�3�� ��&�&��t�~�~�t�,�,rc���tttt|���td�|j
j	�D��z�S)Nc3�DK�|]}|jd�r�|���y�w�r�N)r�)rTr�s  rrUz'Distribution.__dir__.<locals>.<genexpr>\s����X�#;�4�4�?�?�SV�CW�$�#;�s� � )rirmr{rq�__dir__r�)r�r�s �rrzDistribution.__dir__YsC������l�D�1�3�4��X�4�>�>�#9�#9�#;�X�X�
Y�
�	
rc�x�|jt|�tjj	|�|fi|��Sr )rr&r�r�r�)rAr�rr's    rrzDistribution.from_filename_s:�� �s� � ��h�'����)9�)9�(�)C�X�
�QS�
�	
rc��t|jtjj�r|j
�d|j��}n|j
�d|j��}tj|�S)z?Return a ``Requirement`` that matches this distribution exactlyz==z===)r�r�rr�rrsrrr)r�rds  rr�zDistribution.as_requirementes[���d�)�)�9�+<�+<�+D�+D�E�#�0�0�$�2E�2E�F�D� $� 1� 1�4�3F�3F�G�D�� � ��&�&rc�l�|j||�}|�td||f�d���|j�S)z=Return the `name` entry point of `group` or raise ImportErrorzEntry point z
 not found)r_r?r�)r�rTr	r�s    rr]zDistribution.load_entry_pointns7��
�
 �
 ���
-��
�:��U�D�M�K�L�L��w�w�y�rc��	|j}|�|j|i�S|S#t$r/tj|j	d�|�x}|_Y�MwxYw)rzentry_points.txt)�_ep_mapr�rsr�rr�)r�rT�ep_maps   rr^zDistribution.get_entry_mapusi��	��\�\�F�
���:�:�e�R�(�(��
��
�	�$.�$8�$8��"�"�#5�6��%�
�F�T�\�	�s�$�5A�Ac�B�|j|�j|�Sr)r^r�rVs   rr_zDistribution.get_entry_info�s���!�!�%�(�,�,�T�2�2rc���|xs|j}|syt|�}tjj	|�}|D�cgc]}|xrt|�xs|��}}t|�D]|\}}||k(r|rn�y||k(s�|jtk(s�+|s	|||dvry|tjur|j�|j||�|j||�nJ|tjur|j�|r|jd|�y|j|�y		|j||dz�}	||	=||	=|	}�cc}w#t$rYywxYw)a�Ensure self.location is on path

        If replace=False (default):
            - If location is already in path anywhere, do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent.
              - Else: add to the end of path.
        If replace=True:
            - If location is already on path anywhere (not eggs)
              or higher priority than its parent (eggs)
              do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent,
                removing any lower-priority entries.
              - Else: add it to the front of path.
        Nrr�)r`r&r�r�r,�	enumeraterDr�rP�check_version_conflictrdr�rjrU)
r�r��locr��nloc�bdirru�npathr[�nps
          rr_zDistribution.insert_on�sv��(�"�T�]�]���� ��%���w�w���t�$��<@�A�D�q�!�,�)�!�,�1��1�D��A� ��'�G�A�t��t�|�������$�/�/�X�"=� �T�U�1�2�Y�%6���3�8�8�#��/�/�1����A�s�#����Q��%��#(�&�s�x�x���+�+�-�����A�s�#�
����C� ���
��[�[��q�1�u�-���"�I�t�B�x�����=B��B�
��	�
�s�E�3E�	E"�!E"c
���|jdk(rytj|jd��}t	|j
�}|jd�D]�}|tjvs||vs|tvr�"|dvr�'ttj|dd�}|r6t	|�j|�s|j|j
�r�}td|�d|�d|j
�d	����y)
N�
setuptoolsrz
top_level.txt)�
pkg_resourcesr$�siter+zModule z was already imported from z, but z is being added to sys.path)r=r$r%rr�r`rPr�rRr�r�rp)r��nspr�modname�fns     rrz#Distribution.check_version_conflict�s����8�8�|�#���m�m�D�.�.�/G�H�I���T�]�]�+���)�)�/�:�G��s�{�{�*��c�>��1�1���A�A������W�-�z�4�@�B���r�"�-�-�c�2�b�m�m�D�M�M�6R���")�2�t�}�}�>�
�;rc�~�	|jy#t$rtdt|�z�Yyt$rYywxYw)NzUnbuilt egg for FT)r�rUrpr��SystemErrorr�s rr�zDistribution.has_version�sD��	��L�L���
�	��,�t�D�z�9�:���	��	�s�� <�<�<c	���d}|j�D]}|j|t||d���!|jd|j�|jdi|��S)z@Copy this distribution, substituting in any changed keyword argsz<project_name version py_version platform location precedenceNrr)r
rKr�r�r�)r�r'r�r�s    r�clonezDistribution.clone�sT��N���K�K�M�D��M�M�$���d�D� 9�:�"�
�
�
�j�$�.�.�1��t�~�~�#��#�#rc�F�|jD�cgc]}|s�|��	c}Scc}wr )r�)r��deps  rrqzDistribution.extras�s ��#�}�}�4�}����}�4�4��4s��r rr�)1rrrrr�r�r�r;r�rr�r�r�r�r�r�r�r�r�r�r=r�r�r�r�rr�r�rXr�rr�r
rur�r�rrrr�r]r^r_r_rr�r-rqr�r�s@rrqrqE
sx���?��H��������4�&����*��
��
�"�,�-�,�-�-�!������$��$��(��(�2�����	��	�����(���"�
�	+�
��6�-�
��
��
�
'��
�3�
B�H�4	�$��5��5rrqc��eZdZd�Zy)�EggInfoDistributionc�8�|j�}|r||_|S)a�
        Packages installed by distutils (e.g. numpy or scipy),
        which uses an old safe_version, and so
        their version numbers can get mangled when
        converted to filenames (e.g., 1.11.0.dev0+2329eae to
        1.11.0.dev0_2329eae). These distributions will not be
        parsed properly
        downstream by Distribution and safe_version, so
        take an extra step and try to get the version number from
        the metadata file itself instead of the filename.
        )r�r�)r��
md_versions  rr�z#EggInfoDistribution._reload_version�s!���&�&�(�
��&�D�M��rN)rrrr�rrrr1r1�s��rr1c�^�eZdZdZdZejd�Zed��Z	ed��Z
d�Zy)�DistInfoDistributionzV
    Wrap an actual or potential sys.path entry
    w/metadata, .dist-info style.
    �METADATAz([\(,])\s*(\d.*?)\s*([,\)])c���	|jS#t$r\|j|j�}tj
j
�j|�|_|jcYSwxYw)zParse and cache metadata)�	_pkg_infor�rr��email�parser�Parser�parsestr)r�rs  r�_parsed_pkg_infoz%DistInfoDistribution._parsed_pkg_infos]��	"��>�>�!���	"��(�(����7�H�"�\�\�0�0�2�;�;�H�E�D�N��>�>�!�	"�s��A"A3�2A3c�|�	|jS#t$r$|j�|_|jcYSwxYwr )�_DistInfoDistribution__dep_mapr��_compute_dependenciesr�s rr�zDistInfoDistribution._dep_map"s:��	"��>�>�!���	"�!�7�7�9�D�N��>�>�!�	"�s��*;�;c����dgix}|_g�|jjd�xsgD]}�jt	|����fd�}tjtj|d���}|dj|�|jjd�xsgD]9}t|j��}||�D�cgc]	}||vs�|��c}||<�;|Scc}w)z+Recompute this distribution's dependencies.Nz
Requires-Distc3�x�K��D]0}|jr|jjd|i�s�-|���2y�w)Nr�r�)r�r�rHs  �r�reqs_for_extrazBDistInfoDistribution._compute_dependencies.<locals>.reqs_for_extra3s3��������z�z�S�Z�Z�%8�%8�'�5�9I�%J��I��s�/:�:zProvides-Extra)r?r=�get_allrrryr]�MappingProxyTyper$r%r�r)	r�r�r�rC�commonr��s_extra�rrHs	        @rr@z*DistInfoDistribution._compute_dependencies*s����#�R�j�(��T�^����(�(�0�0��A�G�R�G�C��K�K�*�3�/�0�H�	�
�'�'��
�
�n�T�6J�(K�L��
�4�������*�*�2�2�3C�D�J��J�E� �����/�G�&4�U�&;�O�&;��q���1�&;�O�B�w�K�K��	��Ps�	C1�#C1N)rrrrr�rrV�EQEQr�r=r�r@rrrr5r5sJ���
�H��2�:�:�4�5�D�
�"��"��"��"�rr5)r�rrc��d}t�}	tj|�j|ur'|dz
}tj|�j|ur�'tj|d|dzi|��y#t$rY�&wxYw)Nr�r)r!rPrrrUr�r�)rFr'r�r.s    rrprpIs~��
�E��	�A�
��m�m�E�"�,�,��1��Q�J�E��m�m�E�"�,�,��1�
�M�M��4�U�Q�Y�4��4���
��
�s�AA1�1	A=�<A=c�b�tttttt	|����S)z�
    Yield ``Requirement`` objects for each specification in `strs`.

    `strs` must be a string, or a (possibly-nested) iterable thereof.
    )r�rrr
rr)�strss rryryVs#���{�-�c�,��D�@Q�.R�S�T�Trc��eZdZdZy)�RequirementParseErrorz,Compatibility wrapper for InvalidRequirementNrrrrrNrN_s��2rrNc�L��eZdZ�fd�Zd�Zd�Zd�Zd�Zd�Ze	d��Z
�xZS)rrc�f��tt|�|�|j|_t|j�}||j
�c|_|_|jD�cgc]}|j|jf��c}|_ttt|j ��|_|j|j"|jt%|j �|j&rt)|j&�ndf|_t-|j*�|_ycc}w)z>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!N)r{rrr;r	�unsafe_namer{r�rsr=�	specifierr�r�r�r�r�r�rq�url�	frozensetr�r��hashCmpr��_Requirement__hash)r��requirement_stringrsrdr�s    �rr;zRequirement.__init__ds����
�k�4�)�*<�=��9�9��� ����+��&2�L�4F�4F�4H�#���4�8�@D���O���t�}�}�d�l�l�3��O��
��C�
�D�K�K�8�9����H�H��H�H��N�N��d�k�k�"� $���C������
����4�<�<�(����Ps�&D.c�X�t|t�xr|j|jk(Sr )r�rrrUr�s  rr�zRequirement.__eq__us!���%��-�O�$�,�,�%�-�-�2O�Orc��||k(Sr rr�s  rr�zRequirement.__ne__xr�rc��t|t�r&|j|jk7ry|j}|jj|d��S)NFT)�prereleases)r�rqr=r�rR�contains)r�r[s  rrNzRequirement.__contains__{sD���d�L�)��x�x�4�8�8�#���<�<�D�
�~�~�&�&�t��&�>�>rc��|jSr )rVr�s rr�zRequirement.__hash__�s���{�{�rc��dt|�zS)NzRequirement.parse(%r)r�r�s rr�zRequirement.__repr__�s��&��T��2�2rc� �t|�\}|Sr )ry)r�r�s  rrzRequirement.parse�s��#�A�&����
r)rrrr;r�r�rNr�r�rrr�r�s@rrrrrcs6���)�"P�!�
?��3����rrrc�*�t|vr
|tfzS|S)zJ
    Ensure object appears in the mro even
    for old-style classes.
    )�object)�classess r�_always_objectrc�s��
�W���&��"�"��Nrc��ttjt|dt	|����}|D]
}||vs�||cSy)z2Return an adapter factory for `ob` from `registry`r�N)rc�inspect�getmror�r�)�registryr>r]�ts    rr�r��s=���7�>�>�'�"�k�4��8�*L�M�N�E�
����=��A�;��rc�p�tjj|�}tj|d��y)z1Ensure that the parent directory of `path` existsT)�exist_okN)r�r�r,�makedirs)r�r,s  rr�r��s"���g�g�o�o�d�#�G��K�K��$�'rc��tstd��t|�\}}|r(|r%t|�st	|�	t|d�yyyy#t$rYywxYw)z/Sandbox-bypassing version of ensure_directory()z*"os.mkdir" not supported on this platform.i�N)r�r�r
r	r�r�FileExistsError)r�r,r�s   rr�r��s^����B�C�C��d���G�X��8�E�'�N� ��)�	��'�5�!�%3�8�w���	��	�s�A�	A�Ac#�K�d}g}t|�D]a}|jd�r=|jd�r |s|r||f��|ddj�}g}�Et	d|��|j|��c||f��y�w)asSplit a string or iterable thereof into (section, content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    N�[�]r�r�zInvalid section heading)rr�rrrUr�)r��section�contentrGs    rrr�s������G��G��A����?�?�3���}�}�S�!��g�!�7�*�*��q��*�*�*�,���� �!:�D�A�A��N�N�4� ���7�
��s�A;A=c��tj}	tt_tj|i|��|t_S#|t_wxYwr )r�r�os_open�tempfile�mkstemp)rFr'�old_opens   rr�r��s;���w�w�H���������,��,�����(���s�#A�
ArV)�categoryr�c��||i|��|Sr r)r�rFr�s   r�_call_asiderz�s���t��v���Hrc�j��t���|d<|j�fd�t��D��y)z=Set up global resource manager (deliberately not state-saved)�_managerc3�\�K�|]#}|jd�s|t�|�f���%y�wr)r�r�)rTr	r&s  �rrUz_initialize.<locals>.<genexpr>�s1�����
� �D����s�#�
�w�w��%�&� �s�),N)rpr"r�)r.r&s @r�_initializer~�s3�����G��A�j�M��H�H�
���L�
�rc��eZdZdZy)r�z�
    Base class for warning about deprecations in ``pkg_resources``

    This class is not derived from ``DeprecationWarning``, and as such is
    visible by default.
    Nrrrrr�r��s��rr�c��tj�}td|��|j}|j}|j
}|j}|}td�|D��|d�d��g|_tt|jtj��t�jt!��y)aE
    Prepare the master working set and make the ``require()``
    API available.

    This function has explicit effects on the global state
    of pkg_resources. It is intended to be invoked once at
    the initialization of this module.

    Invocation by other packages is unsupported and done
    at their own risk.
    ra)rhc3�@K�|]}|jd�����y�w)Fr^N�r
)rTr�s  rrUz1_initialize_master_working_set.<locals>.<genexpr>
s����	?�;�4�$�-�-��-�
&�;�s�c�&�|jd��S)NTr^r�r
s rrGz0_initialize_master_working_set.<locals>.<lambda>
s��T�]�]�4�]�0rF)r�N)rorCr(rYr`r�rZr�r4rir�r9rPr�r!r"r�)rhrYr`rirZr�s      r�_initialize_master_working_setr��s����*�*�,�K��8��5��!�!�G�#�5�5��)�3�3���'�'�J��H�

�	?�;�	?�?��0����K����[�
"�
"�C�H�H�	-�.��I���V�X�rr r)�rrPr�r2r�rr]r�rr�r�r��pkgutilr�rQrkr��email.parserr9r?rur�rerorlr`rrxr?�imprm�	NameErrorr>rrrrr�rrt�os.pathr	r
�importlib.machinery�	machineryr�r� pip._internal.utils._jaraco_textrrr
�pip._vendorrrr��version_info�RuntimeErrorrYrhri�resources_streamrl�resource_dirrbrkrfrar`rdrcrerrQrRr�rqrV�Ir�RuntimeWarningrr�rrzr#r(r1r4r9r?rArC�
_sget_none�
_sset_nonerX�__all__r�rtrur�rvrwr�r�r�r�r�r�r�r�r�r[rSr�rMrNr�r}r~rZr�r\r]r^r_r�r�ror$rjrnr�rxrprmr{r|rrr�r�r�r�r�rarxr�r�r�r�r�r�r�r�rr�r�r�r�rjrr"r-r*r1r(r/rHr0r�rO�
FileFinderr�rfrbrgr�r�r�r�r�r&r�r�r'r_rOr��VERBOSE�
IGNORECASEr�rsr�rqr1r5r�rpryrt�InvalidRequirementrNrrrcr�r�r�rr��filterwarningsrzr!r~�Warningr�r�rrr�<module>r�s����&�	�	��	�����������������
��� ���
��
��(�(��M�
� ��5�� � ���%�!�
�*�+�
�-�.�
�/�0�
�*�+�
�(�)����f��
�8�
9�9�������������������������������������
�
�B���	��2�:�:�M�r�t�t�T���N���!�!�)�)�
���3�
����
��-�,�
�Z��0S��l9�i�9�0�o�0�@
��
��?��:I�?�I����7�>�>�3�+�+�,���������
���8�
>��
� N��2 �R�Z�Z� ;�<�� �b�j�j�!C�D��!��.�b6����@�
7�
>�
L�L�.N�)�N�8X&�X&�v2��2�(M�M�b%��
�l�
� n�n�d�/�	6�"�2@�9�"��$�@
�@
�F�V�\�*�&��,��(2�k�2�<����
�L�
�"����4��6#�<�#�*aM�+�aM�H�Y�*�*�K�8�&4�=�&4�R!�?�!�2�+���v�R�0�?�-�J�6�	�%�%�'7�8�����%��*�&
�
� 
� �$�
!��7�M�"��G�'�'��6��#�.�.��=��v�2�.��v�2�.�;�$"�J#�D(�V	�
��7�M�"��w�2�2�O�D��9�0�0�/�B��.�9�9�?�K���6�?�3�Y�
O�(*��7���E�
����O�	$�	*�	*���2�:�:���J�J�������%�	�A�A�H/�t5�t5�n
�,��&0�<�0�h
�$�&���
5�U�3�I�2�2�E�E�3�-�)�(�(�4�4�-�`��(�
��4������=��F�
�

��)��
���W��
�!�
�!��af��������O������M��������sH�*U6�/V�8V�V"�6	V�V�V�V�V�V�"V-�,V-python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py000064400000325464151732701520020342 0ustar00"""
Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.

This module is deprecated. Users are directed to :mod:`importlib.resources`,
:mod:`importlib.metadata` and :pypi:`packaging` instead.
"""

import sys
import os
import io
import time
import re
import types
import zipfile
import zipimport
import warnings
import stat
import functools
import pkgutil
import operator
import platform
import collections
import plistlib
import email.parser
import errno
import tempfile
import textwrap
import inspect
import ntpath
import posixpath
import importlib
from pkgutil import get_importer

try:
    import _imp
except ImportError:
    # Python 3.2 compatibility
    import imp as _imp

try:
    FileExistsError
except NameError:
    FileExistsError = OSError

# capture these to bypass sandboxing
from os import utime

try:
    from os import mkdir, rename, unlink

    WRITE_SUPPORT = True
except ImportError:
    # no write support, probably under GAE
    WRITE_SUPPORT = False

from os import open as os_open
from os.path import isdir, split

try:
    import importlib.machinery as importlib_machinery

    # access attribute to force import under delayed import mechanisms.
    importlib_machinery.__name__
except ImportError:
    importlib_machinery = None

from pip._internal.utils._jaraco_text import (
    yield_lines,
    drop_comment,
    join_continuation,
)

from pip._vendor import platformdirs
from pip._vendor import packaging

__import__('pip._vendor.packaging.version')
__import__('pip._vendor.packaging.specifiers')
__import__('pip._vendor.packaging.requirements')
__import__('pip._vendor.packaging.markers')
__import__('pip._vendor.packaging.utils')

if sys.version_info < (3, 5):
    raise RuntimeError("Python 3.5 or later is required")

# declare some globals that will be defined later to
# satisfy the linters.
require = None
working_set = None
add_activation_listener = None
resources_stream = None
cleanup_resources = None
resource_dir = None
resource_stream = None
set_extraction_path = None
resource_isdir = None
resource_string = None
iter_entry_points = None
resource_listdir = None
resource_filename = None
resource_exists = None
_distribution_finders = None
_namespace_handlers = None
_namespace_packages = None


warnings.warn(
    "pkg_resources is deprecated as an API. "
    "See https://setuptools.pypa.io/en/latest/pkg_resources.html",
    DeprecationWarning,
    stacklevel=2
)


_PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I)


class PEP440Warning(RuntimeWarning):
    """
    Used when there is an issue with a version or specifier not complying with
    PEP 440.
    """


parse_version = packaging.version.Version


_state_vars = {}


def _declare_state(vartype, **kw):
    globals().update(kw)
    _state_vars.update(dict.fromkeys(kw, vartype))


def __getstate__():
    state = {}
    g = globals()
    for k, v in _state_vars.items():
        state[k] = g['_sget_' + v](g[k])
    return state


def __setstate__(state):
    g = globals()
    for k, v in state.items():
        g['_sset_' + _state_vars[k]](k, g[k], v)
    return state


def _sget_dict(val):
    return val.copy()


def _sset_dict(key, ob, state):
    ob.clear()
    ob.update(state)


def _sget_object(val):
    return val.__getstate__()


def _sset_object(key, ob, state):
    ob.__setstate__(state)


_sget_none = _sset_none = lambda *args: None


def get_supported_platform():
    """Return this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of macOS that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of macOS that we are *running*.  To allow usage of packages that
    explicitly require a newer version of macOS, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    """
    plat = get_build_platform()
    m = macosVersionString.match(plat)
    if m is not None and sys.platform == "darwin":
        try:
            plat = 'macosx-%s-%s' % ('.'.join(_macos_vers()[:2]), m.group(3))
        except ValueError:
            # not macOS
            pass
    return plat


__all__ = [
    # Basic resource access and distribution/entry point discovery
    'require',
    'run_script',
    'get_provider',
    'get_distribution',
    'load_entry_point',
    'get_entry_map',
    'get_entry_info',
    'iter_entry_points',
    'resource_string',
    'resource_stream',
    'resource_filename',
    'resource_listdir',
    'resource_exists',
    'resource_isdir',
    # Environmental control
    'declare_namespace',
    'working_set',
    'add_activation_listener',
    'find_distributions',
    'set_extraction_path',
    'cleanup_resources',
    'get_default_cache',
    # Primary implementation classes
    'Environment',
    'WorkingSet',
    'ResourceManager',
    'Distribution',
    'Requirement',
    'EntryPoint',
    # Exceptions
    'ResolutionError',
    'VersionConflict',
    'DistributionNotFound',
    'UnknownExtra',
    'ExtractionError',
    # Warnings
    'PEP440Warning',
    # Parsing functions and string utilities
    'parse_requirements',
    'parse_version',
    'safe_name',
    'safe_version',
    'get_platform',
    'compatible_platforms',
    'yield_lines',
    'split_sections',
    'safe_extra',
    'to_filename',
    'invalid_marker',
    'evaluate_marker',
    # filesystem utilities
    'ensure_directory',
    'normalize_path',
    # Distribution "precedence" constants
    'EGG_DIST',
    'BINARY_DIST',
    'SOURCE_DIST',
    'CHECKOUT_DIST',
    'DEVELOP_DIST',
    # "Provider" interfaces, implementations, and registration/lookup APIs
    'IMetadataProvider',
    'IResourceProvider',
    'FileMetadata',
    'PathMetadata',
    'EggMetadata',
    'EmptyProvider',
    'empty_provider',
    'NullProvider',
    'EggProvider',
    'DefaultProvider',
    'ZipProvider',
    'register_finder',
    'register_namespace_handler',
    'register_loader_type',
    'fixup_namespace_packages',
    'get_importer',
    # Warnings
    'PkgResourcesDeprecationWarning',
    # Deprecated/backward compatibility only
    'run_main',
    'AvailableDistributions',
]


class ResolutionError(Exception):
    """Abstract base for dependency resolution errors"""

    def __repr__(self):
        return self.__class__.__name__ + repr(self.args)


class VersionConflict(ResolutionError):
    """
    An already-installed version conflicts with the requested version.

    Should be initialized with the installed Distribution and the requested
    Requirement.
    """

    _template = "{self.dist} is installed but {self.req} is required"

    @property
    def dist(self):
        return self.args[0]

    @property
    def req(self):
        return self.args[1]

    def report(self):
        return self._template.format(**locals())

    def with_context(self, required_by):
        """
        If required_by is non-empty, return a version of self that is a
        ContextualVersionConflict.
        """
        if not required_by:
            return self
        args = self.args + (required_by,)
        return ContextualVersionConflict(*args)


class ContextualVersionConflict(VersionConflict):
    """
    A VersionConflict that accepts a third parameter, the set of the
    requirements that required the installed Distribution.
    """

    _template = VersionConflict._template + ' by {self.required_by}'

    @property
    def required_by(self):
        return self.args[2]


class DistributionNotFound(ResolutionError):
    """A requested distribution was not found"""

    _template = (
        "The '{self.req}' distribution was not found "
        "and is required by {self.requirers_str}"
    )

    @property
    def req(self):
        return self.args[0]

    @property
    def requirers(self):
        return self.args[1]

    @property
    def requirers_str(self):
        if not self.requirers:
            return 'the application'
        return ', '.join(self.requirers)

    def report(self):
        return self._template.format(**locals())

    def __str__(self):
        return self.report()


class UnknownExtra(ResolutionError):
    """Distribution doesn't have an "extra feature" of the given name"""


_provider_factories = {}

PY_MAJOR = '{}.{}'.format(*sys.version_info)
EGG_DIST = 3
BINARY_DIST = 2
SOURCE_DIST = 1
CHECKOUT_DIST = 0
DEVELOP_DIST = -1


def register_loader_type(loader_type, provider_factory):
    """Register `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    """
    _provider_factories[loader_type] = provider_factory


def get_provider(moduleOrReq):
    """Return an IResourceProvider for the named module or requirement"""
    if isinstance(moduleOrReq, Requirement):
        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
    try:
        module = sys.modules[moduleOrReq]
    except KeyError:
        __import__(moduleOrReq)
        module = sys.modules[moduleOrReq]
    loader = getattr(module, '__loader__', None)
    return _find_adapter(_provider_factories, loader)(module)


def _macos_vers(_cache=[]):
    if not _cache:
        version = platform.mac_ver()[0]
        # fallback for MacPorts
        if version == '':
            plist = '/System/Library/CoreServices/SystemVersion.plist'
            if os.path.exists(plist):
                if hasattr(plistlib, 'readPlist'):
                    plist_content = plistlib.readPlist(plist)
                    if 'ProductVersion' in plist_content:
                        version = plist_content['ProductVersion']

        _cache.append(version.split('.'))
    return _cache[0]


def _macos_arch(machine):
    return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine)


def get_build_platform():
    """Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and macOS.
    """
    from sysconfig import get_platform

    plat = get_platform()
    if sys.platform == "darwin" and not plat.startswith('macosx-'):
        try:
            version = _macos_vers()
            machine = os.uname()[4].replace(" ", "_")
            return "macosx-%d.%d-%s" % (
                int(version[0]),
                int(version[1]),
                _macos_arch(machine),
            )
        except ValueError:
            # if someone is running a non-Mac darwin system, this will fall
            # through to the default implementation
            pass
    return plat


macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
# XXX backward compat
get_platform = get_build_platform


def compatible_platforms(provided, required):
    """Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    """
    if provided is None or required is None or provided == required:
        # easy case
        return True

    # macOS special cases
    reqMac = macosVersionString.match(required)
    if reqMac:
        provMac = macosVersionString.match(provided)

        # is this a Mac package?
        if not provMac:
            # this is backwards compatibility for packages built before
            # setuptools 0.6. All packages built after this point will
            # use the new macOS designation.
            provDarwin = darwinVersionString.match(provided)
            if provDarwin:
                dversion = int(provDarwin.group(1))
                macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2))
                if (
                    dversion == 7
                    and macosversion >= "10.3"
                    or dversion == 8
                    and macosversion >= "10.4"
                ):
                    return True
            # egg isn't macOS or legacy darwin
            return False

        # are they the same major version and machine type?
        if provMac.group(1) != reqMac.group(1) or provMac.group(3) != reqMac.group(3):
            return False

        # is the required OS major update >= the provided one?
        if int(provMac.group(2)) > int(reqMac.group(2)):
            return False

        return True

    # XXX Linux and other platforms' special cases should go here
    return False


def run_script(dist_spec, script_name):
    """Locate distribution `dist_spec` and run its `script_name` script"""
    ns = sys._getframe(1).f_globals
    name = ns['__name__']
    ns.clear()
    ns['__name__'] = name
    require(dist_spec)[0].run_script(script_name, ns)


# backward compatibility
run_main = run_script


def get_distribution(dist):
    """Return a current distribution object for a Requirement or string"""
    if isinstance(dist, str):
        dist = Requirement.parse(dist)
    if isinstance(dist, Requirement):
        dist = get_provider(dist)
    if not isinstance(dist, Distribution):
        raise TypeError("Expected string, Requirement, or Distribution", dist)
    return dist


def load_entry_point(dist, group, name):
    """Return `name` entry point of `group` for `dist` or raise ImportError"""
    return get_distribution(dist).load_entry_point(group, name)


def get_entry_map(dist, group=None):
    """Return the entry point map for `group`, or the full entry map"""
    return get_distribution(dist).get_entry_map(group)


def get_entry_info(dist, group, name):
    """Return the EntryPoint object for `group`+`name`, or ``None``"""
    return get_distribution(dist).get_entry_info(group, name)


class IMetadataProvider:
    def has_metadata(name):
        """Does the package's distribution contain the named metadata?"""

    def get_metadata(name):
        """The named metadata resource as a string"""

    def get_metadata_lines(name):
        """Yield named metadata resource as list of non-blank non-comment lines

        Leading and trailing whitespace is stripped from each line, and lines
        with ``#`` as the first non-blank character are omitted."""

    def metadata_isdir(name):
        """Is the named metadata a directory?  (like ``os.path.isdir()``)"""

    def metadata_listdir(name):
        """List of metadata names in the directory (like ``os.listdir()``)"""

    def run_script(script_name, namespace):
        """Execute the named script in the supplied namespace dictionary"""


class IResourceProvider(IMetadataProvider):
    """An object that provides access to package resources"""

    def get_resource_filename(manager, resource_name):
        """Return a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_stream(manager, resource_name):
        """Return a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_string(manager, resource_name):
        """Return a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``"""

    def has_resource(resource_name):
        """Does the package contain the named resource?"""

    def resource_isdir(resource_name):
        """Is the named resource a directory?  (like ``os.path.isdir()``)"""

    def resource_listdir(resource_name):
        """List of resource names in the directory (like ``os.listdir()``)"""


class WorkingSet:
    """A collection of active distributions on sys.path (or a similar list)"""

    def __init__(self, entries=None):
        """Create working set from list of path entries (default=sys.path)"""
        self.entries = []
        self.entry_keys = {}
        self.by_key = {}
        self.normalized_to_canonical_keys = {}
        self.callbacks = []

        if entries is None:
            entries = sys.path

        for entry in entries:
            self.add_entry(entry)

    @classmethod
    def _build_master(cls):
        """
        Prepare the master working set.
        """
        ws = cls()
        try:
            from __main__ import __requires__
        except ImportError:
            # The main program does not list any requirements
            return ws

        # ensure the requirements are met
        try:
            ws.require(__requires__)
        except VersionConflict:
            return cls._build_from_requirements(__requires__)

        return ws

    @classmethod
    def _build_from_requirements(cls, req_spec):
        """
        Build a working set from a requirement spec. Rewrites sys.path.
        """
        # try it without defaults already on sys.path
        # by starting with an empty path
        ws = cls([])
        reqs = parse_requirements(req_spec)
        dists = ws.resolve(reqs, Environment())
        for dist in dists:
            ws.add(dist)

        # add any missing entries from sys.path
        for entry in sys.path:
            if entry not in ws.entries:
                ws.add_entry(entry)

        # then copy back to sys.path
        sys.path[:] = ws.entries
        return ws

    def add_entry(self, entry):
        """Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        """
        self.entry_keys.setdefault(entry, [])
        self.entries.append(entry)
        for dist in find_distributions(entry, True):
            self.add(dist, entry, False)

    def __contains__(self, dist):
        """True if `dist` is the active distribution for its project"""
        return self.by_key.get(dist.key) == dist

    def find(self, req):
        """Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        """
        dist = self.by_key.get(req.key)

        if dist is None:
            canonical_key = self.normalized_to_canonical_keys.get(req.key)

            if canonical_key is not None:
                req.key = canonical_key
                dist = self.by_key.get(canonical_key)

        if dist is not None and dist not in req:
            # XXX add more info
            raise VersionConflict(dist, req)
        return dist

    def iter_entry_points(self, group, name=None):
        """Yield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        """
        return (
            entry
            for dist in self
            for entry in dist.get_entry_map(group).values()
            if name is None or name == entry.name
        )

    def run_script(self, requires, script_name):
        """Locate distribution for `requires` and run `script_name` script"""
        ns = sys._getframe(1).f_globals
        name = ns['__name__']
        ns.clear()
        ns['__name__'] = name
        self.require(requires)[0].run_script(script_name, ns)

    def __iter__(self):
        """Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        """
        seen = {}
        for item in self.entries:
            if item not in self.entry_keys:
                # workaround a cache issue
                continue

            for key in self.entry_keys[item]:
                if key not in seen:
                    seen[key] = 1
                    yield self.by_key[key]

    def add(self, dist, entry=None, insert=True, replace=False):
        """Add `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        """
        if insert:
            dist.insert_on(self.entries, entry, replace=replace)

        if entry is None:
            entry = dist.location
        keys = self.entry_keys.setdefault(entry, [])
        keys2 = self.entry_keys.setdefault(dist.location, [])
        if not replace and dist.key in self.by_key:
            # ignore hidden distros
            return

        self.by_key[dist.key] = dist
        normalized_name = packaging.utils.canonicalize_name(dist.key)
        self.normalized_to_canonical_keys[normalized_name] = dist.key
        if dist.key not in keys:
            keys.append(dist.key)
        if dist.key not in keys2:
            keys2.append(dist.key)
        self._added_new(dist)

    def resolve(
        self,
        requirements,
        env=None,
        installer=None,
        replace_conflicting=False,
        extras=None,
    ):
        """List all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.

        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.

        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """

        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []

        req_extras = _ReqExtras()

        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)

        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue

            if not req_extras.markers_pass(req, extras):
                continue

            dist = self._resolve_dist(
                req, best, replace_conflicting, env, installer, required_by, to_activate
            )

            # push the new requirements onto the stack
            new_requirements = dist.requires(req.extras)[::-1]
            requirements.extend(new_requirements)

            # Register the new requirements needed by req
            for new_requirement in new_requirements:
                required_by[new_requirement].add(req.project_name)
                req_extras[new_requirement] = req.extras

            processed[req] = True

        # return list of distros to activate
        return to_activate

    def _resolve_dist(
        self, req, best, replace_conflicting, env, installer, required_by, to_activate
    ):
        dist = best.get(req.key)
        if dist is None:
            # Find the best distribution and add it to the map
            dist = self.by_key.get(req.key)
            if dist is None or (dist not in req and replace_conflicting):
                ws = self
                if env is None:
                    if dist is None:
                        env = Environment(self.entries)
                    else:
                        # Use an empty environment and workingset to avoid
                        # any further conflicts with the conflicting
                        # distribution
                        env = Environment([])
                        ws = WorkingSet([])
                dist = best[req.key] = env.best_match(
                    req, ws, installer, replace_conflicting=replace_conflicting
                )
                if dist is None:
                    requirers = required_by.get(req, None)
                    raise DistributionNotFound(req, requirers)
            to_activate.append(dist)
        if dist not in req:
            # Oops, the "best" so far conflicts with a dependency
            dependent_req = required_by[req]
            raise VersionConflict(dist, req).with_context(dependent_req)
        return dist

    def find_plugins(self, plugin_env, full_env=None, installer=None, fallback=True):
        """Find all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            # add plugins+libs to sys.path
            map(working_set.add, distributions)
            # display errors
            print('Could not load', errors)

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        """

        plugin_projects = list(plugin_env)
        # scan project names in alphabetic order
        plugin_projects.sort()

        error_info = {}
        distributions = {}

        if full_env is None:
            env = Environment(self.entries)
            env += plugin_env
        else:
            env = full_env + plugin_env

        shadow_set = self.__class__([])
        # put all our entries in shadow_set
        list(map(shadow_set.add, self))

        for project_name in plugin_projects:
            for dist in plugin_env[project_name]:
                req = [dist.as_requirement()]

                try:
                    resolvees = shadow_set.resolve(req, env, installer)

                except ResolutionError as v:
                    # save error info
                    error_info[dist] = v
                    if fallback:
                        # try the next older version of project
                        continue
                    else:
                        # give up on this project, keep going
                        break

                else:
                    list(map(shadow_set.add, resolvees))
                    distributions.update(dict.fromkeys(resolvees))

                    # success, no need to try any more versions of this project
                    break

        distributions = list(distributions)
        distributions.sort()

        return distributions, error_info

    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
        needed = self.resolve(parse_requirements(requirements))

        for dist in needed:
            self.add(dist)

        return needed

    def subscribe(self, callback, existing=True):
        """Invoke `callback` for all distributions

        If `existing=True` (default),
        call on all existing ones, as well.
        """
        if callback in self.callbacks:
            return
        self.callbacks.append(callback)
        if not existing:
            return
        for dist in self:
            callback(dist)

    def _added_new(self, dist):
        for callback in self.callbacks:
            callback(dist)

    def __getstate__(self):
        return (
            self.entries[:],
            self.entry_keys.copy(),
            self.by_key.copy(),
            self.normalized_to_canonical_keys.copy(),
            self.callbacks[:],
        )

    def __setstate__(self, e_k_b_n_c):
        entries, keys, by_key, normalized_to_canonical_keys, callbacks = e_k_b_n_c
        self.entries = entries[:]
        self.entry_keys = keys.copy()
        self.by_key = by_key.copy()
        self.normalized_to_canonical_keys = normalized_to_canonical_keys.copy()
        self.callbacks = callbacks[:]


class _ReqExtras(dict):
    """
    Map each requirement to the extras that demanded it.
    """

    def markers_pass(self, req, extras=None):
        """
        Evaluate markers for req against each extra that
        demanded it.

        Return False if the req has a marker and fails
        evaluation. Otherwise, return True.
        """
        extra_evals = (
            req.marker.evaluate({'extra': extra})
            for extra in self.get(req, ()) + (extras or (None,))
        )
        return not req.marker or any(extra_evals)


class Environment:
    """Searchable snapshot of distributions on a search path"""

    def __init__(
        self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR
    ):
        """Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.6'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        """
        self._distmap = {}
        self.platform = platform
        self.python = python
        self.scan(search_path)

    def can_add(self, dist):
        """Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        """
        py_compat = (
            self.python is None
            or dist.py_version is None
            or dist.py_version == self.python
        )
        return py_compat and compatible_platforms(dist.platform, self.platform)

    def remove(self, dist):
        """Remove `dist` from the environment"""
        self._distmap[dist.key].remove(dist)

    def scan(self, search_path=None):
        """Scan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        """
        if search_path is None:
            search_path = sys.path

        for item in search_path:
            for dist in find_distributions(item):
                self.add(dist)

    def __getitem__(self, project_name):
        """Return a newest-to-oldest list of distributions for `project_name`

        Uses case-insensitive `project_name` comparison, assuming all the
        project's distributions use their project's name converted to all
        lowercase as their key.

        """
        distribution_key = project_name.lower()
        return self._distmap.get(distribution_key, [])

    def add(self, dist):
        """Add `dist` if we ``can_add()`` it and it has not already been added"""
        if self.can_add(dist) and dist.has_version():
            dists = self._distmap.setdefault(dist.key, [])
            if dist not in dists:
                dists.append(dist)
                dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)

    def best_match(self, req, working_set, installer=None, replace_conflicting=False):
        """Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        """
        try:
            dist = working_set.find(req)
        except VersionConflict:
            if not replace_conflicting:
                raise
            dist = None
        if dist is not None:
            return dist
        for dist in self[req.key]:
            if dist in req:
                return dist
        # try to download/install
        return self.obtain(req, installer)

    def obtain(self, requirement, installer=None):
        """Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument."""
        if installer is not None:
            return installer(requirement)

    def __iter__(self):
        """Yield the unique project names of the available distributions"""
        for key in self._distmap.keys():
            if self[key]:
                yield key

    def __iadd__(self, other):
        """In-place addition of a distribution or environment"""
        if isinstance(other, Distribution):
            self.add(other)
        elif isinstance(other, Environment):
            for project in other:
                for dist in other[project]:
                    self.add(dist)
        else:
            raise TypeError("Can't add %r to environment" % (other,))
        return self

    def __add__(self, other):
        """Add an environment or distribution to an environment"""
        new = self.__class__([], platform=None, python=None)
        for env in self, other:
            new += env
        return new


# XXX backward compatibility
AvailableDistributions = Environment


class ExtractionError(RuntimeError):
    """An error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    """


class ResourceManager:
    """Manage resource extraction and packages"""

    extraction_path = None

    def __init__(self):
        self.cached_files = {}

    def resource_exists(self, package_or_requirement, resource_name):
        """Does the named resource exist?"""
        return get_provider(package_or_requirement).has_resource(resource_name)

    def resource_isdir(self, package_or_requirement, resource_name):
        """Is the named resource an existing directory?"""
        return get_provider(package_or_requirement).resource_isdir(resource_name)

    def resource_filename(self, package_or_requirement, resource_name):
        """Return a true filesystem path for specified resource"""
        return get_provider(package_or_requirement).get_resource_filename(
            self, resource_name
        )

    def resource_stream(self, package_or_requirement, resource_name):
        """Return a readable file-like object for specified resource"""
        return get_provider(package_or_requirement).get_resource_stream(
            self, resource_name
        )

    def resource_string(self, package_or_requirement, resource_name):
        """Return specified resource as a string"""
        return get_provider(package_or_requirement).get_resource_string(
            self, resource_name
        )

    def resource_listdir(self, package_or_requirement, resource_name):
        """List the contents of the named resource directory"""
        return get_provider(package_or_requirement).resource_listdir(resource_name)

    def extraction_error(self):
        """Give an error message for problems extracting file(s)"""

        old_exc = sys.exc_info()[1]
        cache_path = self.extraction_path or get_default_cache()

        tmpl = textwrap.dedent(
            """
            Can't extract file(s) to egg cache

            The following error occurred while trying to extract file(s)
            to the Python egg cache:

              {old_exc}

            The Python egg cache directory is currently set to:

              {cache_path}

            Perhaps your account does not have write access to this directory?
            You can change the cache directory by setting the PYTHON_EGG_CACHE
            environment variable to point to an accessible directory.
            """
        ).lstrip()
        err = ExtractionError(tmpl.format(**locals()))
        err.manager = self
        err.cache_path = cache_path
        err.original_error = old_exc
        raise err

    def get_cache_path(self, archive_name, names=()):
        """Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        """
        extract_path = self.extraction_path or get_default_cache()
        target_path = os.path.join(extract_path, archive_name + '-tmp', *names)
        try:
            _bypass_ensure_directory(target_path)
        except Exception:
            self.extraction_error()

        self._warn_unsafe_extraction_path(extract_path)

        self.cached_files[target_path] = 1
        return target_path

    @staticmethod
    def _warn_unsafe_extraction_path(path):
        """
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        """
        if os.name == 'nt' and not path.startswith(os.environ['windir']):
            # On Windows, permissions are generally restrictive by default
            #  and temp directories are not writable by other users, so
            #  bypass the warning.
            return
        mode = os.stat(path).st_mode
        if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
            msg = (
                "Extraction path is writable by group/others "
                "and vulnerable to attack when "
                "used with get_resource_filename ({path}). "
                "Consider a more secure "
                "location (set with .set_extraction_path or the "
                "PYTHON_EGG_CACHE environment variable)."
            ).format(**locals())
            warnings.warn(msg, UserWarning)

    def postprocess(self, tempname, filename):
        """Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        """

        if os.name == 'posix':
            # Make the resource executable
            mode = ((os.stat(tempname).st_mode) | 0o555) & 0o7777
            os.chmod(tempname, mode)

    def set_extraction_path(self, path):
        """Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        """
        if self.cached_files:
            raise ValueError("Can't change extraction path, files already extracted")

        self.extraction_path = path

    def cleanup_resources(self, force=False):
        """
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        """
        # XXX


def get_default_cache():
    """
    Return the ``PYTHON_EGG_CACHE`` environment variable
    or a platform-relevant user cache dir for an app
    named "Python-Eggs".
    """
    return os.environ.get('PYTHON_EGG_CACHE') or platformdirs.user_cache_dir(
        appname='Python-Eggs'
    )


def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """
    Convert an arbitrary string to a standard version string
    """
    try:
        # normalize the version
        return str(packaging.version.Version(version))
    except packaging.version.InvalidVersion:
        version = version.replace(' ', '.')
        return re.sub('[^A-Za-z0-9.]+', '-', version)


def _forgiving_version(version):
    """Fallback when ``safe_version`` is not safe enough
    >>> parse_version(_forgiving_version('0.23ubuntu1'))
    <Version('0.23.dev0+sanitized.ubuntu1')>
    >>> parse_version(_forgiving_version('0.23-'))
    <Version('0.23.dev0+sanitized')>
    >>> parse_version(_forgiving_version('0.-_'))
    <Version('0.dev0+sanitized')>
    >>> parse_version(_forgiving_version('42.+?1'))
    <Version('42.dev0+sanitized.1')>
    >>> parse_version(_forgiving_version('hello world'))
    <Version('0.dev0+sanitized.hello.world')>
    """
    version = version.replace(' ', '.')
    match = _PEP440_FALLBACK.search(version)
    if match:
        safe = match["safe"]
        rest = version[len(safe):]
    else:
        safe = "0"
        rest = version
    local = f"sanitized.{_safe_segment(rest)}".strip(".")
    return f"{safe}.dev0+{local}"


def _safe_segment(segment):
    """Convert an arbitrary string into a safe segment"""
    segment = re.sub('[^A-Za-z0-9.]+', '-', segment)
    segment = re.sub('-[^A-Za-z0-9]+', '-', segment)
    return re.sub(r'\.[^A-Za-z0-9]+', '.', segment).strip(".-")


def safe_extra(extra):
    """Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    """
    return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower()


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-', '_')


def invalid_marker(text):
    """
    Validate text as a PEP 508 environment marker; return an exception
    if invalid or False otherwise.
    """
    try:
        evaluate_marker(text)
    except SyntaxError as e:
        e.filename = None
        e.lineno = None
        return e
    return False


def evaluate_marker(text, extra=None):
    """
    Evaluate a PEP 508 environment marker.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.

    This implementation uses the 'pyparsing' module.
    """
    try:
        marker = packaging.markers.Marker(text)
        return marker.evaluate()
    except packaging.markers.InvalidMarker as e:
        raise SyntaxError(e) from e


class NullProvider:
    """Try to implement resources and metadata for arbitrary PEP 302 loaders"""

    egg_name = None
    egg_info = None
    loader = None

    def __init__(self, module):
        self.loader = getattr(module, '__loader__', None)
        self.module_path = os.path.dirname(getattr(module, '__file__', ''))

    def get_resource_filename(self, manager, resource_name):
        return self._fn(self.module_path, resource_name)

    def get_resource_stream(self, manager, resource_name):
        return io.BytesIO(self.get_resource_string(manager, resource_name))

    def get_resource_string(self, manager, resource_name):
        return self._get(self._fn(self.module_path, resource_name))

    def has_resource(self, resource_name):
        return self._has(self._fn(self.module_path, resource_name))

    def _get_metadata_path(self, name):
        return self._fn(self.egg_info, name)

    def has_metadata(self, name):
        if not self.egg_info:
            return self.egg_info

        path = self._get_metadata_path(name)
        return self._has(path)

    def get_metadata(self, name):
        if not self.egg_info:
            return ""
        path = self._get_metadata_path(name)
        value = self._get(path)
        try:
            return value.decode('utf-8')
        except UnicodeDecodeError as exc:
            # Include the path in the error message to simplify
            # troubleshooting, and without changing the exception type.
            exc.reason += ' in {} file at path: {}'.format(name, path)
            raise

    def get_metadata_lines(self, name):
        return yield_lines(self.get_metadata(name))

    def resource_isdir(self, resource_name):
        return self._isdir(self._fn(self.module_path, resource_name))

    def metadata_isdir(self, name):
        return self.egg_info and self._isdir(self._fn(self.egg_info, name))

    def resource_listdir(self, resource_name):
        return self._listdir(self._fn(self.module_path, resource_name))

    def metadata_listdir(self, name):
        if self.egg_info:
            return self._listdir(self._fn(self.egg_info, name))
        return []

    def run_script(self, script_name, namespace):
        script = 'scripts/' + script_name
        if not self.has_metadata(script):
            raise ResolutionError(
                "Script {script!r} not found in metadata at {self.egg_info!r}".format(
                    **locals()
                ),
            )
        script_text = self.get_metadata(script).replace('\r\n', '\n')
        script_text = script_text.replace('\r', '\n')
        script_filename = self._fn(self.egg_info, script)
        namespace['__file__'] = script_filename
        if os.path.exists(script_filename):
            with open(script_filename) as fid:
                source = fid.read()
            code = compile(source, script_filename, 'exec')
            exec(code, namespace, namespace)
        else:
            from linecache import cache

            cache[script_filename] = (
                len(script_text),
                0,
                script_text.split('\n'),
                script_filename,
            )
            script_code = compile(script_text, script_filename, 'exec')
            exec(script_code, namespace, namespace)

    def _has(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _isdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _listdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _fn(self, base, resource_name):
        self._validate_resource_path(resource_name)
        if resource_name:
            return os.path.join(base, *resource_name.split('/'))
        return base

    @staticmethod
    def _validate_resource_path(path):
        """
        Validate the resource paths according to the docs.
        https://setuptools.pypa.io/en/latest/pkg_resources.html#basic-resource-access

        >>> warned = getfixture('recwarn')
        >>> warnings.simplefilter('always')
        >>> vrp = NullProvider._validate_resource_path
        >>> vrp('foo/bar.txt')
        >>> bool(warned)
        False
        >>> vrp('../foo/bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('/foo/bar.txt')
        >>> bool(warned)
        True
        >>> vrp('foo/../../bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('foo/f../bar.txt')
        >>> bool(warned)
        False

        Windows path separators are straight-up disallowed.
        >>> vrp(r'\\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path \
is not allowed.

        >>> vrp(r'C:\\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path \
is not allowed.

        Blank values are allowed

        >>> vrp('')
        >>> bool(warned)
        False

        Non-string values are not.

        >>> vrp(None)
        Traceback (most recent call last):
        ...
        AttributeError: ...
        """
        invalid = (
            os.path.pardir in path.split(posixpath.sep)
            or posixpath.isabs(path)
            or ntpath.isabs(path)
        )
        if not invalid:
            return

        msg = "Use of .. or absolute path in a resource path is not allowed."

        # Aggressively disallow Windows absolute paths
        if ntpath.isabs(path) and not posixpath.isabs(path):
            raise ValueError(msg)

        # for compatibility, warn; in future
        # raise ValueError(msg)
        issue_warning(
            msg[:-1] + " and will raise exceptions in a future release.",
            DeprecationWarning,
        )

    def _get(self, path):
        if hasattr(self.loader, 'get_data'):
            return self.loader.get_data(path)
        raise NotImplementedError(
            "Can't perform this operation for loaders without 'get_data()'"
        )


register_loader_type(object, NullProvider)


def _parents(path):
    """
    yield all parents of path including path
    """
    last = None
    while path != last:
        yield path
        last = path
        path, _ = os.path.split(path)


class EggProvider(NullProvider):
    """Provider based on a virtual filesystem"""

    def __init__(self, module):
        super().__init__(module)
        self._setup_prefix()

    def _setup_prefix(self):
        # Assume that metadata may be nested inside a "basket"
        # of multiple eggs and use module_path instead of .archive.
        eggs = filter(_is_egg_path, _parents(self.module_path))
        egg = next(eggs, None)
        egg and self._set_egg(egg)

    def _set_egg(self, path):
        self.egg_name = os.path.basename(path)
        self.egg_info = os.path.join(path, 'EGG-INFO')
        self.egg_root = path


class DefaultProvider(EggProvider):
    """Provides access to package resources in the filesystem"""

    def _has(self, path):
        return os.path.exists(path)

    def _isdir(self, path):
        return os.path.isdir(path)

    def _listdir(self, path):
        return os.listdir(path)

    def get_resource_stream(self, manager, resource_name):
        return open(self._fn(self.module_path, resource_name), 'rb')

    def _get(self, path):
        with open(path, 'rb') as stream:
            return stream.read()

    @classmethod
    def _register(cls):
        loader_names = (
            'SourceFileLoader',
            'SourcelessFileLoader',
        )
        for name in loader_names:
            loader_cls = getattr(importlib_machinery, name, type(None))
            register_loader_type(loader_cls, cls)


DefaultProvider._register()


class EmptyProvider(NullProvider):
    """Provider that returns nothing for all requests"""

    module_path = None

    _isdir = _has = lambda self, path: False

    def _get(self, path):
        return ''

    def _listdir(self, path):
        return []

    def __init__(self):
        pass


empty_provider = EmptyProvider()


class ZipManifests(dict):
    """
    zip manifest builder
    """

    @classmethod
    def build(cls, path):
        """
        Build a dictionary similar to the zipimport directory
        caches, except instead of tuples, store ZipInfo objects.

        Use a platform-specific path separator (os.sep) for the path keys
        for compatibility with pypy on Windows.
        """
        with zipfile.ZipFile(path) as zfile:
            items = (
                (
                    name.replace('/', os.sep),
                    zfile.getinfo(name),
                )
                for name in zfile.namelist()
            )
            return dict(items)

    load = build


class MemoizedZipManifests(ZipManifests):
    """
    Memoized zipfile manifests.
    """

    manifest_mod = collections.namedtuple('manifest_mod', 'manifest mtime')

    def load(self, path):
        """
        Load a manifest at path or return a suitable manifest already loaded.
        """
        path = os.path.normpath(path)
        mtime = os.stat(path).st_mtime

        if path not in self or self[path].mtime != mtime:
            manifest = self.build(path)
            self[path] = self.manifest_mod(manifest, mtime)

        return self[path].manifest


class ZipProvider(EggProvider):
    """Resource support for zips and eggs"""

    eagers = None
    _zip_manifests = MemoizedZipManifests()

    def __init__(self, module):
        super().__init__(module)
        self.zip_pre = self.loader.archive + os.sep

    def _zipinfo_name(self, fspath):
        # Convert a virtual filename (full path to file) into a zipfile subpath
        # usable with the zipimport directory cache for our target archive
        fspath = fspath.rstrip(os.sep)
        if fspath == self.loader.archive:
            return ''
        if fspath.startswith(self.zip_pre):
            return fspath[len(self.zip_pre) :]
        raise AssertionError("%s is not a subpath of %s" % (fspath, self.zip_pre))

    def _parts(self, zip_path):
        # Convert a zipfile subpath into an egg-relative path part list.
        # pseudo-fs path
        fspath = self.zip_pre + zip_path
        if fspath.startswith(self.egg_root + os.sep):
            return fspath[len(self.egg_root) + 1 :].split(os.sep)
        raise AssertionError("%s is not a subpath of %s" % (fspath, self.egg_root))

    @property
    def zipinfo(self):
        return self._zip_manifests.load(self.loader.archive)

    def get_resource_filename(self, manager, resource_name):
        if not self.egg_name:
            raise NotImplementedError(
                "resource_filename() only supported for .egg, not .zip"
            )
        # no need to lock for extraction, since we use temp names
        zip_path = self._resource_to_zip(resource_name)
        eagers = self._get_eager_resources()
        if '/'.join(self._parts(zip_path)) in eagers:
            for name in eagers:
                self._extract_resource(manager, self._eager_to_zip(name))
        return self._extract_resource(manager, zip_path)

    @staticmethod
    def _get_date_and_size(zip_stat):
        size = zip_stat.file_size
        # ymdhms+wday, yday, dst
        date_time = zip_stat.date_time + (0, 0, -1)
        # 1980 offset already done
        timestamp = time.mktime(date_time)
        return timestamp, size

    # FIXME: 'ZipProvider._extract_resource' is too complex (12)
    def _extract_resource(self, manager, zip_path):  # noqa: C901
        if zip_path in self._index():
            for name in self._index()[zip_path]:
                last = self._extract_resource(manager, os.path.join(zip_path, name))
            # return the extracted directory name
            return os.path.dirname(last)

        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])

        if not WRITE_SUPPORT:
            raise IOError(
                '"os.rename" and "os.unlink" are not supported ' 'on this platform'
            )
        try:
            real_path = manager.get_cache_path(self.egg_name, self._parts(zip_path))

            if self._is_current(real_path, zip_path):
                return real_path

            outf, tmpnam = _mkstemp(
                ".$extract",
                dir=os.path.dirname(real_path),
            )
            os.write(outf, self.loader.get_data(zip_path))
            os.close(outf)
            utime(tmpnam, (timestamp, timestamp))
            manager.postprocess(tmpnam, real_path)

            try:
                rename(tmpnam, real_path)

            except os.error:
                if os.path.isfile(real_path):
                    if self._is_current(real_path, zip_path):
                        # the file became current since it was checked above,
                        #  so proceed.
                        return real_path
                    # Windows, del old file and retry
                    elif os.name == 'nt':
                        unlink(real_path)
                        rename(tmpnam, real_path)
                        return real_path
                raise

        except os.error:
            # report a user-friendly error
            manager.extraction_error()

        return real_path

    def _is_current(self, file_path, zip_path):
        """
        Return True if the file_path is current for this zip_path
        """
        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
        if not os.path.isfile(file_path):
            return False
        stat = os.stat(file_path)
        if stat.st_size != size or stat.st_mtime != timestamp:
            return False
        # check that the contents match
        zip_contents = self.loader.get_data(zip_path)
        with open(file_path, 'rb') as f:
            file_contents = f.read()
        return zip_contents == file_contents

    def _get_eager_resources(self):
        if self.eagers is None:
            eagers = []
            for name in ('native_libs.txt', 'eager_resources.txt'):
                if self.has_metadata(name):
                    eagers.extend(self.get_metadata_lines(name))
            self.eagers = eagers
        return self.eagers

    def _index(self):
        try:
            return self._dirindex
        except AttributeError:
            ind = {}
            for path in self.zipinfo:
                parts = path.split(os.sep)
                while parts:
                    parent = os.sep.join(parts[:-1])
                    if parent in ind:
                        ind[parent].append(parts[-1])
                        break
                    else:
                        ind[parent] = [parts.pop()]
            self._dirindex = ind
            return ind

    def _has(self, fspath):
        zip_path = self._zipinfo_name(fspath)
        return zip_path in self.zipinfo or zip_path in self._index()

    def _isdir(self, fspath):
        return self._zipinfo_name(fspath) in self._index()

    def _listdir(self, fspath):
        return list(self._index().get(self._zipinfo_name(fspath), ()))

    def _eager_to_zip(self, resource_name):
        return self._zipinfo_name(self._fn(self.egg_root, resource_name))

    def _resource_to_zip(self, resource_name):
        return self._zipinfo_name(self._fn(self.module_path, resource_name))


register_loader_type(zipimport.zipimporter, ZipProvider)


class FileMetadata(EmptyProvider):
    """Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    """

    def __init__(self, path):
        self.path = path

    def _get_metadata_path(self, name):
        return self.path

    def has_metadata(self, name):
        return name == 'PKG-INFO' and os.path.isfile(self.path)

    def get_metadata(self, name):
        if name != 'PKG-INFO':
            raise KeyError("No metadata except PKG-INFO is available")

        with io.open(self.path, encoding='utf-8', errors="replace") as f:
            metadata = f.read()
        self._warn_on_replacement(metadata)
        return metadata

    def _warn_on_replacement(self, metadata):
        replacement_char = '�'
        if replacement_char in metadata:
            tmpl = "{self.path} could not be properly decoded in UTF-8"
            msg = tmpl.format(**locals())
            warnings.warn(msg)

    def get_metadata_lines(self, name):
        return yield_lines(self.get_metadata(name))


class PathMetadata(DefaultProvider):
    """Metadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir, project_name=dist_name, metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    """

    def __init__(self, path, egg_info):
        self.module_path = path
        self.egg_info = egg_info


class EggMetadata(ZipProvider):
    """Metadata provider for .egg files"""

    def __init__(self, importer):
        """Create a metadata provider from a zipimporter"""

        self.zip_pre = importer.archive + os.sep
        self.loader = importer
        if importer.prefix:
            self.module_path = os.path.join(importer.archive, importer.prefix)
        else:
            self.module_path = importer.archive
        self._setup_prefix()


_declare_state('dict', _distribution_finders={})


def register_finder(importer_type, distribution_finder):
    """Register `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example."""
    _distribution_finders[importer_type] = distribution_finder


def find_distributions(path_item, only=False):
    """Yield distributions accessible via `path_item`"""
    importer = get_importer(path_item)
    finder = _find_adapter(_distribution_finders, importer)
    return finder(importer, path_item, only)


def find_eggs_in_zip(importer, path_item, only=False):
    """
    Find eggs in zip files; possibly multiple nested eggs.
    """
    if importer.archive.endswith('.whl'):
        # wheels are not supported with this finder
        # they don't have PKG-INFO metadata, and won't ever contain eggs
        return
    metadata = EggMetadata(importer)
    if metadata.has_metadata('PKG-INFO'):
        yield Distribution.from_filename(path_item, metadata=metadata)
    if only:
        # don't yield nested distros
        return
    for subitem in metadata.resource_listdir(''):
        if _is_egg_path(subitem):
            subpath = os.path.join(path_item, subitem)
            dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath)
            for dist in dists:
                yield dist
        elif subitem.lower().endswith(('.dist-info', '.egg-info')):
            subpath = os.path.join(path_item, subitem)
            submeta = EggMetadata(zipimport.zipimporter(subpath))
            submeta.egg_info = subpath
            yield Distribution.from_location(path_item, subitem, submeta)


register_finder(zipimport.zipimporter, find_eggs_in_zip)


def find_nothing(importer, path_item, only=False):
    return ()


register_finder(object, find_nothing)


def find_on_path(importer, path_item, only=False):
    """Yield distributions accessible on a sys.path directory"""
    path_item = _normalize_cached(path_item)

    if _is_unpacked_egg(path_item):
        yield Distribution.from_filename(
            path_item,
            metadata=PathMetadata(path_item, os.path.join(path_item, 'EGG-INFO')),
        )
        return

    entries = (os.path.join(path_item, child) for child in safe_listdir(path_item))

    # scan for .egg and .egg-info in directory
    for entry in sorted(entries):
        fullpath = os.path.join(path_item, entry)
        factory = dist_factory(path_item, entry, only)
        for dist in factory(fullpath):
            yield dist


def dist_factory(path_item, entry, only):
    """Return a dist_factory for the given entry."""
    lower = entry.lower()
    is_egg_info = lower.endswith('.egg-info')
    is_dist_info = lower.endswith('.dist-info') and os.path.isdir(
        os.path.join(path_item, entry)
    )
    is_meta = is_egg_info or is_dist_info
    return (
        distributions_from_metadata
        if is_meta
        else find_distributions
        if not only and _is_egg_path(entry)
        else resolve_egg_link
        if not only and lower.endswith('.egg-link')
        else NoDists()
    )


class NoDists:
    """
    >>> bool(NoDists())
    False

    >>> list(NoDists()('anything'))
    []
    """

    def __bool__(self):
        return False

    def __call__(self, fullpath):
        return iter(())


def safe_listdir(path):
    """
    Attempt to list contents of path, but suppress some exceptions.
    """
    try:
        return os.listdir(path)
    except (PermissionError, NotADirectoryError):
        pass
    except OSError as e:
        # Ignore the directory if does not exist, not a directory or
        # permission denied
        if e.errno not in (errno.ENOTDIR, errno.EACCES, errno.ENOENT):
            raise
    return ()


def distributions_from_metadata(path):
    root = os.path.dirname(path)
    if os.path.isdir(path):
        if len(os.listdir(path)) == 0:
            # empty metadata dir; skip
            return
        metadata = PathMetadata(root, path)
    else:
        metadata = FileMetadata(path)
    entry = os.path.basename(path)
    yield Distribution.from_location(
        root,
        entry,
        metadata,
        precedence=DEVELOP_DIST,
    )


def non_empty_lines(path):
    """
    Yield non-empty lines from file at path
    """
    with open(path) as f:
        for line in f:
            line = line.strip()
            if line:
                yield line


def resolve_egg_link(path):
    """
    Given a path to an .egg-link, resolve distributions
    present in the referenced path.
    """
    referenced_paths = non_empty_lines(path)
    resolved_paths = (
        os.path.join(os.path.dirname(path), ref) for ref in referenced_paths
    )
    dist_groups = map(find_distributions, resolved_paths)
    return next(dist_groups, ())


if hasattr(pkgutil, 'ImpImporter'):
    register_finder(pkgutil.ImpImporter, find_on_path)

register_finder(importlib_machinery.FileFinder, find_on_path)

_declare_state('dict', _namespace_handlers={})
_declare_state('dict', _namespace_packages={})


def register_namespace_handler(importer_type, namespace_handler):
    """Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer, path_entry, moduleName, module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    """
    _namespace_handlers[importer_type] = namespace_handler


def _handle_ns(packageName, path_item):
    """Ensure that named package includes a subpath of path_item (if needed)"""

    importer = get_importer(path_item)
    if importer is None:
        return None

    # use find_spec (PEP 451) and fall-back to find_module (PEP 302)
    try:
        spec = importer.find_spec(packageName)
    except AttributeError:
        # capture warnings due to #1111
        with warnings.catch_warnings():
            warnings.simplefilter("ignore")
            loader = importer.find_module(packageName)
    else:
        loader = spec.loader if spec else None

    if loader is None:
        return None
    module = sys.modules.get(packageName)
    if module is None:
        module = sys.modules[packageName] = types.ModuleType(packageName)
        module.__path__ = []
        _set_parent_ns(packageName)
    elif not hasattr(module, '__path__'):
        raise TypeError("Not a package:", packageName)
    handler = _find_adapter(_namespace_handlers, importer)
    subpath = handler(importer, path_item, packageName, module)
    if subpath is not None:
        path = module.__path__
        path.append(subpath)
        importlib.import_module(packageName)
        _rebuild_mod_path(path, packageName, module)
    return subpath


def _rebuild_mod_path(orig_path, package_name, module):
    """
    Rebuild module.__path__ ensuring that all entries are ordered
    corresponding to their sys.path order
    """
    sys_path = [_normalize_cached(p) for p in sys.path]

    def safe_sys_path_index(entry):
        """
        Workaround for #520 and #513.
        """
        try:
            return sys_path.index(entry)
        except ValueError:
            return float('inf')

    def position_in_sys_path(path):
        """
        Return the ordinal of the path based on its position in sys.path
        """
        path_parts = path.split(os.sep)
        module_parts = package_name.count('.') + 1
        parts = path_parts[:-module_parts]
        return safe_sys_path_index(_normalize_cached(os.sep.join(parts)))

    new_path = sorted(orig_path, key=position_in_sys_path)
    new_path = [_normalize_cached(p) for p in new_path]

    if isinstance(module.__path__, list):
        module.__path__[:] = new_path
    else:
        module.__path__ = new_path


def declare_namespace(packageName):
    """Declare that package 'packageName' is a namespace package"""

    msg = (
        f"Deprecated call to `pkg_resources.declare_namespace({packageName!r})`.\n"
        "Implementing implicit namespace packages (as specified in PEP 420) "
        "is preferred to `pkg_resources.declare_namespace`. "
        "See https://setuptools.pypa.io/en/latest/references/"
        "keywords.html#keyword-namespace-packages"
    )
    warnings.warn(msg, DeprecationWarning, stacklevel=2)

    _imp.acquire_lock()
    try:
        if packageName in _namespace_packages:
            return

        path = sys.path
        parent, _, _ = packageName.rpartition('.')

        if parent:
            declare_namespace(parent)
            if parent not in _namespace_packages:
                __import__(parent)
            try:
                path = sys.modules[parent].__path__
            except AttributeError as e:
                raise TypeError("Not a package:", parent) from e

        # Track what packages are namespaces, so when new path items are added,
        # they can be updated
        _namespace_packages.setdefault(parent or None, []).append(packageName)
        _namespace_packages.setdefault(packageName, [])

        for path_item in path:
            # Ensure all the parent's path items are reflected in the child,
            # if they apply
            _handle_ns(packageName, path_item)

    finally:
        _imp.release_lock()


def fixup_namespace_packages(path_item, parent=None):
    """Ensure that previously-declared namespace packages include path_item"""
    _imp.acquire_lock()
    try:
        for package in _namespace_packages.get(parent, ()):
            subpath = _handle_ns(package, path_item)
            if subpath:
                fixup_namespace_packages(subpath, package)
    finally:
        _imp.release_lock()


def file_ns_handler(importer, path_item, packageName, module):
    """Compute an ns-package subpath for a filesystem or zipfile importer"""

    subpath = os.path.join(path_item, packageName.split('.')[-1])
    normalized = _normalize_cached(subpath)
    for item in module.__path__:
        if _normalize_cached(item) == normalized:
            break
    else:
        # Only return the path if it's not already there
        return subpath


if hasattr(pkgutil, 'ImpImporter'):
    register_namespace_handler(pkgutil.ImpImporter, file_ns_handler)

register_namespace_handler(zipimport.zipimporter, file_ns_handler)
register_namespace_handler(importlib_machinery.FileFinder, file_ns_handler)


def null_ns_handler(importer, path_item, packageName, module):
    return None


register_namespace_handler(object, null_ns_handler)


def normalize_path(filename):
    """Normalize a file/dir name for comparison purposes"""
    return os.path.normcase(os.path.realpath(os.path.normpath(_cygwin_patch(filename))))


def _cygwin_patch(filename):  # pragma: nocover
    """
    Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
    symlink components. Using
    os.path.abspath() works around this limitation. A fix in os.getcwd()
    would probably better, in Cygwin even more so, except
    that this seems to be by design...
    """
    return os.path.abspath(filename) if sys.platform == 'cygwin' else filename


def _normalize_cached(filename, _cache={}):
    try:
        return _cache[filename]
    except KeyError:
        _cache[filename] = result = normalize_path(filename)
        return result


def _is_egg_path(path):
    """
    Determine if given path appears to be an egg.
    """
    return _is_zip_egg(path) or _is_unpacked_egg(path)


def _is_zip_egg(path):
    return (
        path.lower().endswith('.egg')
        and os.path.isfile(path)
        and zipfile.is_zipfile(path)
    )


def _is_unpacked_egg(path):
    """
    Determine if given path appears to be an unpacked egg.
    """
    return path.lower().endswith('.egg') and os.path.isfile(
        os.path.join(path, 'EGG-INFO', 'PKG-INFO')
    )


def _set_parent_ns(packageName):
    parts = packageName.split('.')
    name = parts.pop()
    if parts:
        parent = '.'.join(parts)
        setattr(sys.modules[parent], name, sys.modules[packageName])


MODULE = re.compile(r"\w+(\.\w+)*$").match
EGG_NAME = re.compile(
    r"""
    (?P<name>[^-]+) (
        -(?P<ver>[^-]+) (
            -py(?P<pyver>[^-]+) (
                -(?P<plat>.+)
            )?
        )?
    )?
    """,
    re.VERBOSE | re.IGNORECASE,
).match


class EntryPoint:
    """Object representing an advertised importable object"""

    def __init__(self, name, module_name, attrs=(), extras=(), dist=None):
        if not MODULE(module_name):
            raise ValueError("Invalid module name", module_name)
        self.name = name
        self.module_name = module_name
        self.attrs = tuple(attrs)
        self.extras = tuple(extras)
        self.dist = dist

    def __str__(self):
        s = "%s = %s" % (self.name, self.module_name)
        if self.attrs:
            s += ':' + '.'.join(self.attrs)
        if self.extras:
            s += ' [%s]' % ','.join(self.extras)
        return s

    def __repr__(self):
        return "EntryPoint.parse(%r)" % str(self)

    def load(self, require=True, *args, **kwargs):
        """
        Require packages for this EntryPoint, then resolve it.
        """
        if not require or args or kwargs:
            warnings.warn(
                "Parameters to load are deprecated.  Call .resolve and "
                ".require separately.",
                PkgResourcesDeprecationWarning,
                stacklevel=2,
            )
        if require:
            self.require(*args, **kwargs)
        return self.resolve()

    def resolve(self):
        """
        Resolve the entry point from its module and attrs.
        """
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
        try:
            return functools.reduce(getattr, self.attrs, module)
        except AttributeError as exc:
            raise ImportError(str(exc)) from exc

    def require(self, env=None, installer=None):
        if self.extras and not self.dist:
            raise UnknownExtra("Can't require() without a distribution", self)

        # Get the requirements for this entry point with all its extras and
        # then resolve them. We have to pass `extras` along when resolving so
        # that the working set knows what extras we want. Otherwise, for
        # dist-info distributions, the working set will assume that the
        # requirements for that extra are purely optional and skip over them.
        reqs = self.dist.requires(self.extras)
        items = working_set.resolve(reqs, env, installer, extras=self.extras)
        list(map(working_set.add, items))

    pattern = re.compile(
        r'\s*'
        r'(?P<name>.+?)\s*'
        r'=\s*'
        r'(?P<module>[\w.]+)\s*'
        r'(:\s*(?P<attr>[\w.]+))?\s*'
        r'(?P<extras>\[.*\])?\s*$'
    )

    @classmethod
    def parse(cls, src, dist=None):
        """Parse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1, extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        """
        m = cls.pattern.match(src)
        if not m:
            msg = "EntryPoint must be in 'name=module:attrs [extras]' format"
            raise ValueError(msg, src)
        res = m.groupdict()
        extras = cls._parse_extras(res['extras'])
        attrs = res['attr'].split('.') if res['attr'] else ()
        return cls(res['name'], res['module'], attrs, extras, dist)

    @classmethod
    def _parse_extras(cls, extras_spec):
        if not extras_spec:
            return ()
        req = Requirement.parse('x' + extras_spec)
        if req.specs:
            raise ValueError()
        return req.extras

    @classmethod
    def parse_group(cls, group, lines, dist=None):
        """Parse an entry point group"""
        if not MODULE(group):
            raise ValueError("Invalid group name", group)
        this = {}
        for line in yield_lines(lines):
            ep = cls.parse(line, dist)
            if ep.name in this:
                raise ValueError("Duplicate entry point", group, ep.name)
            this[ep.name] = ep
        return this

    @classmethod
    def parse_map(cls, data, dist=None):
        """Parse a map of entry point groups"""
        if isinstance(data, dict):
            data = data.items()
        else:
            data = split_sections(data)
        maps = {}
        for group, lines in data:
            if group is None:
                if not lines:
                    continue
                raise ValueError("Entry points must be listed in groups")
            group = group.strip()
            if group in maps:
                raise ValueError("Duplicate group name", group)
            maps[group] = cls.parse_group(group, lines, dist)
        return maps


def _version_from_file(lines):
    """
    Given an iterable of lines from a Metadata file, return
    the value of the Version field, if present, or None otherwise.
    """

    def is_version_line(line):
        return line.lower().startswith('version:')

    version_lines = filter(is_version_line, lines)
    line = next(iter(version_lines), '')
    _, _, value = line.partition(':')
    return safe_version(value.strip()) or None


class Distribution:
    """Wrap an actual or potential sys.path entry w/metadata"""

    PKG_INFO = 'PKG-INFO'

    def __init__(
        self,
        location=None,
        metadata=None,
        project_name=None,
        version=None,
        py_version=PY_MAJOR,
        platform=None,
        precedence=EGG_DIST,
    ):
        self.project_name = safe_name(project_name or 'Unknown')
        if version is not None:
            self._version = safe_version(version)
        self.py_version = py_version
        self.platform = platform
        self.location = location
        self.precedence = precedence
        self._provider = metadata or empty_provider

    @classmethod
    def from_location(cls, location, basename, metadata=None, **kw):
        project_name, version, py_version, platform = [None] * 4
        basename, ext = os.path.splitext(basename)
        if ext.lower() in _distributionImpl:
            cls = _distributionImpl[ext.lower()]

            match = EGG_NAME(basename)
            if match:
                project_name, version, py_version, platform = match.group(
                    'name', 'ver', 'pyver', 'plat'
                )
        return cls(
            location,
            metadata,
            project_name=project_name,
            version=version,
            py_version=py_version,
            platform=platform,
            **kw,
        )._reload_version()

    def _reload_version(self):
        return self

    @property
    def hashcmp(self):
        return (
            self._forgiving_parsed_version,
            self.precedence,
            self.key,
            self.location,
            self.py_version or '',
            self.platform or '',
        )

    def __hash__(self):
        return hash(self.hashcmp)

    def __lt__(self, other):
        return self.hashcmp < other.hashcmp

    def __le__(self, other):
        return self.hashcmp <= other.hashcmp

    def __gt__(self, other):
        return self.hashcmp > other.hashcmp

    def __ge__(self, other):
        return self.hashcmp >= other.hashcmp

    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            # It's not a Distribution, so they are not equal
            return False
        return self.hashcmp == other.hashcmp

    def __ne__(self, other):
        return not self == other

    # These properties have to be lazy so that we don't have to load any
    # metadata until/unless it's actually needed.  (i.e., some distributions
    # may not know their name or version without loading PKG-INFO)

    @property
    def key(self):
        try:
            return self._key
        except AttributeError:
            self._key = key = self.project_name.lower()
            return key

    @property
    def parsed_version(self):
        if not hasattr(self, "_parsed_version"):
            try:
                self._parsed_version = parse_version(self.version)
            except packaging.version.InvalidVersion as ex:
                info = f"(package: {self.project_name})"
                if hasattr(ex, "add_note"):
                    ex.add_note(info)  # PEP 678
                    raise
                raise packaging.version.InvalidVersion(f"{str(ex)} {info}") from None

        return self._parsed_version

    @property
    def _forgiving_parsed_version(self):
        try:
            return self.parsed_version
        except packaging.version.InvalidVersion as ex:
            self._parsed_version = parse_version(_forgiving_version(self.version))

            notes = "\n".join(getattr(ex, "__notes__", []))  # PEP 678
            msg = f"""!!\n\n
            *************************************************************************
            {str(ex)}\n{notes}

            This is a long overdue deprecation.
            For the time being, `pkg_resources` will use `{self._parsed_version}`
            as a replacement to avoid breaking existing environments,
            but no future compatibility is guaranteed.

            If you maintain package {self.project_name} you should implement
            the relevant changes to adequate the project to PEP 440 immediately.
            *************************************************************************
            \n\n!!
            """
            warnings.warn(msg, DeprecationWarning)

            return self._parsed_version

    @property
    def version(self):
        try:
            return self._version
        except AttributeError as e:
            version = self._get_version()
            if version is None:
                path = self._get_metadata_path_for_display(self.PKG_INFO)
                msg = ("Missing 'Version:' header and/or {} file at path: {}").format(
                    self.PKG_INFO, path
                )
                raise ValueError(msg, self) from e

            return version

    @property
    def _dep_map(self):
        """
        A map of extra to its list of (direct) requirements
        for this distribution, including the null extra.
        """
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._filter_extras(self._build_dep_map())
        return self.__dep_map

    @staticmethod
    def _filter_extras(dm):
        """
        Given a mapping of extras to dependencies, strip off
        environment markers and filter out any dependencies
        not matching the markers.
        """
        for extra in list(filter(None, dm)):
            new_extra = extra
            reqs = dm.pop(extra)
            new_extra, _, marker = extra.partition(':')
            fails_marker = marker and (
                invalid_marker(marker) or not evaluate_marker(marker)
            )
            if fails_marker:
                reqs = []
            new_extra = safe_extra(new_extra) or None

            dm.setdefault(new_extra, []).extend(reqs)
        return dm

    def _build_dep_map(self):
        dm = {}
        for name in 'requires.txt', 'depends.txt':
            for extra, reqs in split_sections(self._get_metadata(name)):
                dm.setdefault(extra, []).extend(parse_requirements(reqs))
        return dm

    def requires(self, extras=()):
        """List of Requirements needed for this distro if `extras` are used"""
        dm = self._dep_map
        deps = []
        deps.extend(dm.get(None, ()))
        for ext in extras:
            try:
                deps.extend(dm[safe_extra(ext)])
            except KeyError as e:
                raise UnknownExtra(
                    "%s has no such extra feature %r" % (self, ext)
                ) from e
        return deps

    def _get_metadata_path_for_display(self, name):
        """
        Return the path to the given metadata file, if available.
        """
        try:
            # We need to access _get_metadata_path() on the provider object
            # directly rather than through this class's __getattr__()
            # since _get_metadata_path() is marked private.
            path = self._provider._get_metadata_path(name)

        # Handle exceptions e.g. in case the distribution's metadata
        # provider doesn't support _get_metadata_path().
        except Exception:
            return '[could not detect]'

        return path

    def _get_metadata(self, name):
        if self.has_metadata(name):
            for line in self.get_metadata_lines(name):
                yield line

    def _get_version(self):
        lines = self._get_metadata(self.PKG_INFO)
        version = _version_from_file(lines)

        return version

    def activate(self, path=None, replace=False):
        """Ensure distribution is importable on `path` (default=sys.path)"""
        if path is None:
            path = sys.path
        self.insert_on(path, replace=replace)
        if path is sys.path:
            fixup_namespace_packages(self.location)
            for pkg in self._get_metadata('namespace_packages.txt'):
                if pkg in sys.modules:
                    declare_namespace(pkg)

    def egg_name(self):
        """Return what this distribution's standard .egg filename should be"""
        filename = "%s-%s-py%s" % (
            to_filename(self.project_name),
            to_filename(self.version),
            self.py_version or PY_MAJOR,
        )

        if self.platform:
            filename += '-' + self.platform
        return filename

    def __repr__(self):
        if self.location:
            return "%s (%s)" % (self, self.location)
        else:
            return str(self)

    def __str__(self):
        try:
            version = getattr(self, 'version', None)
        except ValueError:
            version = None
        version = version or "[unknown version]"
        return "%s %s" % (self.project_name, version)

    def __getattr__(self, attr):
        """Delegate all unrecognized public attributes to .metadata provider"""
        if attr.startswith('_'):
            raise AttributeError(attr)
        return getattr(self._provider, attr)

    def __dir__(self):
        return list(
            set(super(Distribution, self).__dir__())
            | set(attr for attr in self._provider.__dir__() if not attr.startswith('_'))
        )

    @classmethod
    def from_filename(cls, filename, metadata=None, **kw):
        return cls.from_location(
            _normalize_cached(filename), os.path.basename(filename), metadata, **kw
        )

    def as_requirement(self):
        """Return a ``Requirement`` that matches this distribution exactly"""
        if isinstance(self.parsed_version, packaging.version.Version):
            spec = "%s==%s" % (self.project_name, self.parsed_version)
        else:
            spec = "%s===%s" % (self.project_name, self.parsed_version)

        return Requirement.parse(spec)

    def load_entry_point(self, group, name):
        """Return the `name` entry point of `group` or raise ImportError"""
        ep = self.get_entry_info(group, name)
        if ep is None:
            raise ImportError("Entry point %r not found" % ((group, name),))
        return ep.load()

    def get_entry_map(self, group=None):
        """Return the entry point map for `group`, or the full entry map"""
        try:
            ep_map = self._ep_map
        except AttributeError:
            ep_map = self._ep_map = EntryPoint.parse_map(
                self._get_metadata('entry_points.txt'), self
            )
        if group is not None:
            return ep_map.get(group, {})
        return ep_map

    def get_entry_info(self, group, name):
        """Return the EntryPoint object for `group`+`name`, or ``None``"""
        return self.get_entry_map(group).get(name)

    # FIXME: 'Distribution.insert_on' is too complex (13)
    def insert_on(self, path, loc=None, replace=False):  # noqa: C901
        """Ensure self.location is on path

        If replace=False (default):
            - If location is already in path anywhere, do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent.
              - Else: add to the end of path.
        If replace=True:
            - If location is already on path anywhere (not eggs)
              or higher priority than its parent (eggs)
              do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent,
                removing any lower-priority entries.
              - Else: add it to the front of path.
        """

        loc = loc or self.location
        if not loc:
            return

        nloc = _normalize_cached(loc)
        bdir = os.path.dirname(nloc)
        npath = [(p and _normalize_cached(p) or p) for p in path]

        for p, item in enumerate(npath):
            if item == nloc:
                if replace:
                    break
                else:
                    # don't modify path (even removing duplicates) if
                    # found and not replace
                    return
            elif item == bdir and self.precedence == EGG_DIST:
                # if it's an .egg, give it precedence over its directory
                # UNLESS it's already been added to sys.path and replace=False
                if (not replace) and nloc in npath[p:]:
                    return
                if path is sys.path:
                    self.check_version_conflict()
                path.insert(p, loc)
                npath.insert(p, nloc)
                break
        else:
            if path is sys.path:
                self.check_version_conflict()
            if replace:
                path.insert(0, loc)
            else:
                path.append(loc)
            return

        # p is the spot where we found or inserted loc; now remove duplicates
        while True:
            try:
                np = npath.index(nloc, p + 1)
            except ValueError:
                break
            else:
                del npath[np], path[np]
                # ha!
                p = np

        return

    def check_version_conflict(self):
        if self.key == 'setuptools':
            # ignore the inevitable setuptools self-conflicts  :(
            return

        nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
        loc = normalize_path(self.location)
        for modname in self._get_metadata('top_level.txt'):
            if (
                modname not in sys.modules
                or modname in nsp
                or modname in _namespace_packages
            ):
                continue
            if modname in ('pkg_resources', 'setuptools', 'site'):
                continue
            fn = getattr(sys.modules[modname], '__file__', None)
            if fn and (
                normalize_path(fn).startswith(loc) or fn.startswith(self.location)
            ):
                continue
            issue_warning(
                "Module %s was already imported from %s, but %s is being added"
                " to sys.path" % (modname, fn, self.location),
            )

    def has_version(self):
        try:
            self.version
        except ValueError:
            issue_warning("Unbuilt egg for " + repr(self))
            return False
        except SystemError:
            # TODO: remove this except clause when python/cpython#103632 is fixed.
            return False
        return True

    def clone(self, **kw):
        """Copy this distribution, substituting in any changed keyword args"""
        names = 'project_name version py_version platform location precedence'
        for attr in names.split():
            kw.setdefault(attr, getattr(self, attr, None))
        kw.setdefault('metadata', self._provider)
        return self.__class__(**kw)

    @property
    def extras(self):
        return [dep for dep in self._dep_map if dep]


class EggInfoDistribution(Distribution):
    def _reload_version(self):
        """
        Packages installed by distutils (e.g. numpy or scipy),
        which uses an old safe_version, and so
        their version numbers can get mangled when
        converted to filenames (e.g., 1.11.0.dev0+2329eae to
        1.11.0.dev0_2329eae). These distributions will not be
        parsed properly
        downstream by Distribution and safe_version, so
        take an extra step and try to get the version number from
        the metadata file itself instead of the filename.
        """
        md_version = self._get_version()
        if md_version:
            self._version = md_version
        return self


class DistInfoDistribution(Distribution):
    """
    Wrap an actual or potential sys.path entry
    w/metadata, .dist-info style.
    """

    PKG_INFO = 'METADATA'
    EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])")

    @property
    def _parsed_pkg_info(self):
        """Parse and cache metadata"""
        try:
            return self._pkg_info
        except AttributeError:
            metadata = self.get_metadata(self.PKG_INFO)
            self._pkg_info = email.parser.Parser().parsestr(metadata)
            return self._pkg_info

    @property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._compute_dependencies()
            return self.__dep_map

    def _compute_dependencies(self):
        """Recompute this distribution's dependencies."""
        dm = self.__dep_map = {None: []}

        reqs = []
        # Including any condition expressions
        for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
            reqs.extend(parse_requirements(req))

        def reqs_for_extra(extra):
            for req in reqs:
                if not req.marker or req.marker.evaluate({'extra': extra}):
                    yield req

        common = types.MappingProxyType(dict.fromkeys(reqs_for_extra(None)))
        dm[None].extend(common)

        for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
            s_extra = safe_extra(extra.strip())
            dm[s_extra] = [r for r in reqs_for_extra(extra) if r not in common]

        return dm


_distributionImpl = {
    '.egg': Distribution,
    '.egg-info': EggInfoDistribution,
    '.dist-info': DistInfoDistribution,
}


def issue_warning(*args, **kw):
    level = 1
    g = globals()
    try:
        # find the first stack frame that is *not* code in
        # the pkg_resources module, to use for the warning
        while sys._getframe(level).f_globals is g:
            level += 1
    except ValueError:
        pass
    warnings.warn(stacklevel=level + 1, *args, **kw)


def parse_requirements(strs):
    """
    Yield ``Requirement`` objects for each specification in `strs`.

    `strs` must be a string, or a (possibly-nested) iterable thereof.
    """
    return map(Requirement, join_continuation(map(drop_comment, yield_lines(strs))))


class RequirementParseError(packaging.requirements.InvalidRequirement):
    "Compatibility wrapper for InvalidRequirement"


class Requirement(packaging.requirements.Requirement):
    def __init__(self, requirement_string):
        """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
        super(Requirement, self).__init__(requirement_string)
        self.unsafe_name = self.name
        project_name = safe_name(self.name)
        self.project_name, self.key = project_name, project_name.lower()
        self.specs = [(spec.operator, spec.version) for spec in self.specifier]
        self.extras = tuple(map(safe_extra, self.extras))
        self.hashCmp = (
            self.key,
            self.url,
            self.specifier,
            frozenset(self.extras),
            str(self.marker) if self.marker else None,
        )
        self.__hash = hash(self.hashCmp)

    def __eq__(self, other):
        return isinstance(other, Requirement) and self.hashCmp == other.hashCmp

    def __ne__(self, other):
        return not self == other

    def __contains__(self, item):
        if isinstance(item, Distribution):
            if item.key != self.key:
                return False

            item = item.version

        # Allow prereleases always in order to match the previous behavior of
        # this method. In the future this should be smarter and follow PEP 440
        # more accurately.
        return self.specifier.contains(item, prereleases=True)

    def __hash__(self):
        return self.__hash

    def __repr__(self):
        return "Requirement.parse(%r)" % str(self)

    @staticmethod
    def parse(s):
        (req,) = parse_requirements(s)
        return req


def _always_object(classes):
    """
    Ensure object appears in the mro even
    for old-style classes.
    """
    if object not in classes:
        return classes + (object,)
    return classes


def _find_adapter(registry, ob):
    """Return an adapter factory for `ob` from `registry`"""
    types = _always_object(inspect.getmro(getattr(ob, '__class__', type(ob))))
    for t in types:
        if t in registry:
            return registry[t]


def ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    os.makedirs(dirname, exist_ok=True)


def _bypass_ensure_directory(path):
    """Sandbox-bypassing version of ensure_directory()"""
    if not WRITE_SUPPORT:
        raise IOError('"os.mkdir" not supported on this platform.')
    dirname, filename = split(path)
    if dirname and filename and not isdir(dirname):
        _bypass_ensure_directory(dirname)
        try:
            mkdir(dirname, 0o755)
        except FileExistsError:
            pass


def split_sections(s):
    """Split a string or iterable thereof into (section, content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    """
    section = None
    content = []
    for line in yield_lines(s):
        if line.startswith("["):
            if line.endswith("]"):
                if section or content:
                    yield section, content
                section = line[1:-1].strip()
                content = []
            else:
                raise ValueError("Invalid section heading", line)
        else:
            content.append(line)

    # wrap up last segment
    yield section, content


def _mkstemp(*args, **kw):
    old_open = os.open
    try:
        # temporarily bypass sandboxing
        os.open = os_open
        return tempfile.mkstemp(*args, **kw)
    finally:
        # and then put it back
        os.open = old_open


# Silence the PEP440Warning by default, so that end users don't get hit by it
# randomly just because they use pkg_resources. We want to append the rule
# because we want earlier uses of filterwarnings to take precedence over this
# one.
warnings.filterwarnings("ignore", category=PEP440Warning, append=True)


# from jaraco.functools 1.3
def _call_aside(f, *args, **kwargs):
    f(*args, **kwargs)
    return f


@_call_aside
def _initialize(g=globals()):
    "Set up global resource manager (deliberately not state-saved)"
    manager = ResourceManager()
    g['_manager'] = manager
    g.update(
        (name, getattr(manager, name))
        for name in dir(manager)
        if not name.startswith('_')
    )


class PkgResourcesDeprecationWarning(Warning):
    """
    Base class for warning about deprecations in ``pkg_resources``

    This class is not derived from ``DeprecationWarning``, and as such is
    visible by default.
    """


@_call_aside
def _initialize_master_working_set():
    """
    Prepare the master working set and make the ``require()``
    API available.

    This function has explicit effects on the global state
    of pkg_resources. It is intended to be invoked once at
    the initialization of this module.

    Invocation by other packages is unsupported and done
    at their own risk.
    """
    working_set = WorkingSet._build_master()
    _declare_state('object', working_set=working_set)

    require = working_set.require
    iter_entry_points = working_set.iter_entry_points
    add_activation_listener = working_set.subscribe
    run_script = working_set.run_script
    # backward compatibility
    run_main = run_script
    # Activate all distributions already on sys.path with replace=False and
    # ensure that all distributions added to the working set in the future
    # (e.g. by calling ``require()``) will get activated as well,
    # with higher priority (replace=True).
    tuple(dist.activate(replace=False) for dist in working_set)
    add_activation_listener(
        lambda dist: dist.activate(replace=True),
        existing=False,
    )
    working_set.entries = []
    # match order
    list(map(working_set.add_entry, sys.path))
    globals().update(locals())
python3.12/site-packages/pip/_vendor/pyproject_hooks.pyi000064400000000035151732701520017303 0ustar00from pyproject_hooks import *python3.12/site-packages/pip/_vendor/packaging/__about__.py000064400000001225151732701520017544 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

__all__ = [
    "__title__",
    "__summary__",
    "__uri__",
    "__version__",
    "__author__",
    "__email__",
    "__license__",
    "__copyright__",
]

__title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"

__version__ = "21.3"

__author__ = "Donald Stufft and individual contributors"
__email__ = "donald@stufft.io"

__license__ = "BSD-2-Clause or Apache-2.0"
__copyright__ = "2014-2019 %s" % __author__
python3.12/site-packages/pip/_vendor/packaging/version.py000064400000034217151732701520017332 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import collections
import itertools
import re
import warnings
from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union

from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType

__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"]

InfiniteTypes = Union[InfinityType, NegativeInfinityType]
PrePostDevType = Union[InfiniteTypes, Tuple[str, int]]
SubLocalType = Union[InfiniteTypes, int, str]
LocalType = Union[
    NegativeInfinityType,
    Tuple[
        Union[
            SubLocalType,
            Tuple[SubLocalType, str],
            Tuple[NegativeInfinityType, SubLocalType],
        ],
        ...,
    ],
]
CmpKey = Tuple[
    int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType
]
LegacyCmpKey = Tuple[int, Tuple[str, ...]]
VersionComparisonMethod = Callable[
    [Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool
]

_Version = collections.namedtuple(
    "_Version", ["epoch", "release", "dev", "pre", "post", "local"]
)


def parse(version: str) -> Union["LegacyVersion", "Version"]:
    """
    Parse the given version string and return either a :class:`Version` object
    or a :class:`LegacyVersion` object depending on if the given version is
    a valid PEP 440 version or a legacy version.
    """
    try:
        return Version(version)
    except InvalidVersion:
        return LegacyVersion(version)


class InvalidVersion(ValueError):
    """
    An invalid version was found, users should refer to PEP 440.
    """


class _BaseVersion:
    _key: Union[CmpKey, LegacyCmpKey]

    def __hash__(self) -> int:
        return hash(self._key)

    # Please keep the duplicated `isinstance` check
    # in the six comparisons hereunder
    # unless you find a way to avoid adding overhead function calls.
    def __lt__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key < other._key

    def __le__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key <= other._key

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key == other._key

    def __ge__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key >= other._key

    def __gt__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key > other._key

    def __ne__(self, other: object) -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key != other._key


class LegacyVersion(_BaseVersion):
    def __init__(self, version: str) -> None:
        self._version = str(version)
        self._key = _legacy_cmpkey(self._version)


    def __str__(self) -> str:
        return self._version

    def __repr__(self) -> str:
        return f"<LegacyVersion('{self}')>"

    @property
    def public(self) -> str:
        return self._version

    @property
    def base_version(self) -> str:
        return self._version

    @property
    def epoch(self) -> int:
        return -1

    @property
    def release(self) -> None:
        return None

    @property
    def pre(self) -> None:
        return None

    @property
    def post(self) -> None:
        return None

    @property
    def dev(self) -> None:
        return None

    @property
    def local(self) -> None:
        return None

    @property
    def is_prerelease(self) -> bool:
        return False

    @property
    def is_postrelease(self) -> bool:
        return False

    @property
    def is_devrelease(self) -> bool:
        return False


_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE)

_legacy_version_replacement_map = {
    "pre": "c",
    "preview": "c",
    "-": "final-",
    "rc": "c",
    "dev": "@",
}


def _parse_version_parts(s: str) -> Iterator[str]:
    for part in _legacy_version_component_re.split(s):
        part = _legacy_version_replacement_map.get(part, part)

        if not part or part == ".":
            continue

        if part[:1] in "0123456789":
            # pad for numeric comparison
            yield part.zfill(8)
        else:
            yield "*" + part

    # ensure that alpha/beta/candidate are before final
    yield "*final"


def _legacy_cmpkey(version: str) -> LegacyCmpKey:

    # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch
    # greater than or equal to 0. This will effectively put the LegacyVersion,
    # which uses the defacto standard originally implemented by setuptools,
    # as before all PEP 440 versions.
    epoch = -1

    # This scheme is taken from pkg_resources.parse_version setuptools prior to
    # it's adoption of the packaging library.
    parts: List[str] = []
    for part in _parse_version_parts(version.lower()):
        if part.startswith("*"):
            # remove "-" before a prerelease tag
            if part < "*final":
                while parts and parts[-1] == "*final-":
                    parts.pop()

            # remove trailing zeros from each series of numeric parts
            while parts and parts[-1] == "00000000":
                parts.pop()

        parts.append(part)

    return epoch, tuple(parts)


# Deliberately not anchored to the start and end of the string, to make it
# easier for 3rd party code to reuse
VERSION_PATTERN = r"""
    v?
    (?:
        (?:(?P<epoch>[0-9]+)!)?                           # epoch
        (?P<release>[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P<pre>                                          # pre-release
            [-_\.]?
            (?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P<pre_n>[0-9]+)?
        )?
        (?P<post>                                         # post release
            (?:-(?P<post_n1>[0-9]+))
            |
            (?:
                [-_\.]?
                (?P<post_l>post|rev|r)
                [-_\.]?
                (?P<post_n2>[0-9]+)?
            )
        )?
        (?P<dev>                                          # dev release
            [-_\.]?
            (?P<dev_l>dev)
            [-_\.]?
            (?P<dev_n>[0-9]+)?
        )?
    )
    (?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
"""


class Version(_BaseVersion):

    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)

    def __init__(self, version: str) -> None:

        # Validate the version and parse it into pieces
        match = self._regex.search(version)
        if not match:
            raise InvalidVersion(f"Invalid version: '{version}'")

        # Store the parsed out pieces of the version
        self._version = _Version(
            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
            release=tuple(int(i) for i in match.group("release").split(".")),
            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
            post=_parse_letter_version(
                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
            ),
            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
            local=_parse_local_version(match.group("local")),
        )

        # Generate a key which will be used for sorting
        self._key = _cmpkey(
            self._version.epoch,
            self._version.release,
            self._version.pre,
            self._version.post,
            self._version.dev,
            self._version.local,
        )

    def __repr__(self) -> str:
        return f"<Version('{self}')>"

    def __str__(self) -> str:
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        # Pre-release
        if self.pre is not None:
            parts.append("".join(str(x) for x in self.pre))

        # Post-release
        if self.post is not None:
            parts.append(f".post{self.post}")

        # Development release
        if self.dev is not None:
            parts.append(f".dev{self.dev}")

        # Local version segment
        if self.local is not None:
            parts.append(f"+{self.local}")

        return "".join(parts)

    @property
    def epoch(self) -> int:
        _epoch: int = self._version.epoch
        return _epoch

    @property
    def release(self) -> Tuple[int, ...]:
        _release: Tuple[int, ...] = self._version.release
        return _release

    @property
    def pre(self) -> Optional[Tuple[str, int]]:
        _pre: Optional[Tuple[str, int]] = self._version.pre
        return _pre

    @property
    def post(self) -> Optional[int]:
        return self._version.post[1] if self._version.post else None

    @property
    def dev(self) -> Optional[int]:
        return self._version.dev[1] if self._version.dev else None

    @property
    def local(self) -> Optional[str]:
        if self._version.local:
            return ".".join(str(x) for x in self._version.local)
        else:
            return None

    @property
    def public(self) -> str:
        return str(self).split("+", 1)[0]

    @property
    def base_version(self) -> str:
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        return "".join(parts)

    @property
    def is_prerelease(self) -> bool:
        return self.dev is not None or self.pre is not None

    @property
    def is_postrelease(self) -> bool:
        return self.post is not None

    @property
    def is_devrelease(self) -> bool:
        return self.dev is not None

    @property
    def major(self) -> int:
        return self.release[0] if len(self.release) >= 1 else 0

    @property
    def minor(self) -> int:
        return self.release[1] if len(self.release) >= 2 else 0

    @property
    def micro(self) -> int:
        return self.release[2] if len(self.release) >= 3 else 0


def _parse_letter_version(
    letter: str, number: Union[str, bytes, SupportsInt]
) -> Optional[Tuple[str, int]]:

    if letter:
        # We consider there to be an implicit 0 in a pre-release if there is
        # not a numeral associated with it.
        if number is None:
            number = 0

        # We normalize any letters to their lower case form
        letter = letter.lower()

        # We consider some words to be alternate spellings of other words and
        # in those cases we want to normalize the spellings to our preferred
        # spelling.
        if letter == "alpha":
            letter = "a"
        elif letter == "beta":
            letter = "b"
        elif letter in ["c", "pre", "preview"]:
            letter = "rc"
        elif letter in ["rev", "r"]:
            letter = "post"

        return letter, int(number)
    if not letter and number:
        # We assume if we are given a number, but we are not given a letter
        # then this is using the implicit post release syntax (e.g. 1.0-1)
        letter = "post"

        return letter, int(number)

    return None


_local_version_separators = re.compile(r"[\._-]")


def _parse_local_version(local: str) -> Optional[LocalType]:
    """
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    """
    if local is not None:
        return tuple(
            part.lower() if not part.isdigit() else int(part)
            for part in _local_version_separators.split(local)
        )
    return None


def _cmpkey(
    epoch: int,
    release: Tuple[int, ...],
    pre: Optional[Tuple[str, int]],
    post: Optional[Tuple[str, int]],
    dev: Optional[Tuple[str, int]],
    local: Optional[Tuple[SubLocalType]],
) -> CmpKey:

    # When we compare a release version, we want to compare it with all of the
    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    # leading zeros until we come to something non zero, then take the rest
    # re-reverse it back into the correct order and make it a tuple and use
    # that for our sorting key.
    _release = tuple(
        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
    )

    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    # We'll do this by abusing the pre segment, but we _only_ want to do this
    # if there is not a pre or a post segment. If we have one of those then
    # the normal sorting rules will handle this case correctly.
    if pre is None and post is None and dev is not None:
        _pre: PrePostDevType = NegativeInfinity
    # Versions without a pre-release (except as noted above) should sort after
    # those with one.
    elif pre is None:
        _pre = Infinity
    else:
        _pre = pre

    # Versions without a post segment should sort before those with one.
    if post is None:
        _post: PrePostDevType = NegativeInfinity

    else:
        _post = post

    # Versions without a development segment should sort after those with one.
    if dev is None:
        _dev: PrePostDevType = Infinity

    else:
        _dev = dev

    if local is None:
        # Versions without a local segment should sort before those with one.
        _local: LocalType = NegativeInfinity
    else:
        # Versions with a local segment need that segment parsed to implement
        # the sorting rules in PEP440.
        # - Alpha numeric segments sort before numeric segments
        # - Alpha numeric segments sort lexicographically
        # - Numeric segments sort numerically
        # - Shorter versions sort before longer versions when the prefixes
        #   match exactly
        _local = tuple(
            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
        )

    return epoch, _release, _pre, _post, _dev, _local
python3.12/site-packages/pip/_vendor/packaging/requirements.py000064400000011104151732701520020356 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import re
import string
import urllib.parse
from typing import List, Optional as TOptional, Set

from pip._vendor.pyparsing import (  # noqa
    Combine,
    Literal as L,
    Optional,
    ParseException,
    Regex,
    Word,
    ZeroOrMore,
    originalTextFor,
    stringEnd,
    stringStart,
)

from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet


class InvalidRequirement(ValueError):
    """
    An invalid requirement was found, users should refer to PEP 508.
    """


ALPHANUM = Word(string.ascii_letters + string.digits)

LBRACKET = L("[").suppress()
RBRACKET = L("]").suppress()
LPAREN = L("(").suppress()
RPAREN = L(")").suppress()
COMMA = L(",").suppress()
SEMICOLON = L(";").suppress()
AT = L("@").suppress()

PUNCTUATION = Word("-_.")
IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM)
IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END))

NAME = IDENTIFIER("name")
EXTRA = IDENTIFIER

URI = Regex(r"[^ ]+")("url")
URL = AT + URI

EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA)
EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")

VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)

VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
VERSION_MANY = Combine(
    VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False
)("_raw_spec")
_VERSION_SPEC = Optional((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)
_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or "")

VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier")
VERSION_SPEC.setParseAction(lambda s, l, t: t[1])

MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
    lambda s, l, t: Marker(s[t._original_start : t._original_end])
)
MARKER_SEPARATOR = SEMICOLON
MARKER = MARKER_SEPARATOR + MARKER_EXPR

VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
URL_AND_MARKER = URL + Optional(MARKER)

NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)

REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd
# pyparsing isn't thread safe during initialization, so we do it eagerly, see
# issue #104
REQUIREMENT.parseString("x[]")


class Requirement:
    """Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    """

    # TODO: Can we test whether something is contained within a requirement?
    #       If so how do we do that? Do we need to test against the _name_ of
    #       the thing as well as the version? What about the markers?
    # TODO: Can we normalize the name and extra name?

    def __init__(self, requirement_string: str) -> None:
        try:
            req = REQUIREMENT.parseString(requirement_string)
        except ParseException as e:
            raise InvalidRequirement(
                f'Parse error at "{ requirement_string[e.loc : e.loc + 8]!r}": {e.msg}'
            )

        self.name: str = req.name
        if req.url:
            parsed_url = urllib.parse.urlparse(req.url)
            if parsed_url.scheme == "file":
                if urllib.parse.urlunparse(parsed_url) != req.url:
                    raise InvalidRequirement("Invalid URL given")
            elif not (parsed_url.scheme and parsed_url.netloc) or (
                not parsed_url.scheme and not parsed_url.netloc
            ):
                raise InvalidRequirement(f"Invalid URL: {req.url}")
            self.url: TOptional[str] = req.url
        else:
            self.url = None
        self.extras: Set[str] = set(req.extras.asList() if req.extras else [])
        self.specifier: SpecifierSet = SpecifierSet(req.specifier)
        self.marker: TOptional[Marker] = req.marker if req.marker else None

    def __str__(self) -> str:
        parts: List[str] = [self.name]

        if self.extras:
            formatted_extras = ",".join(sorted(self.extras))
            parts.append(f"[{formatted_extras}]")

        if self.specifier:
            parts.append(str(self.specifier))

        if self.url:
            parts.append(f"@ {self.url}")
            if self.marker:
                parts.append(" ")

        if self.marker:
            parts.append(f"; {self.marker}")

        return "".join(parts)

    def __repr__(self) -> str:
        return f"<Requirement('{self}')>"
python3.12/site-packages/pip/_vendor/packaging/markers.py000064400000020447151732701520017311 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import operator
import os
import platform
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

from pip._vendor.pyparsing import (  # noqa: N817
    Forward,
    Group,
    Literal as L,
    ParseException,
    ParseResults,
    QuotedString,
    ZeroOrMore,
    stringEnd,
    stringStart,
)

from .specifiers import InvalidSpecifier, Specifier

__all__ = [
    "InvalidMarker",
    "UndefinedComparison",
    "UndefinedEnvironmentName",
    "Marker",
    "default_environment",
]

Operator = Callable[[str, str], bool]


class InvalidMarker(ValueError):
    """
    An invalid marker was found, users should refer to PEP 508.
    """


class UndefinedComparison(ValueError):
    """
    An invalid operation was attempted on a value that doesn't support it.
    """


class UndefinedEnvironmentName(ValueError):
    """
    A name was attempted to be used that does not exist inside of the
    environment.
    """


class Node:
    def __init__(self, value: Any) -> None:
        self.value = value

    def __str__(self) -> str:
        return str(self.value)

    def __repr__(self) -> str:
        return f"<{self.__class__.__name__}('{self}')>"

    def serialize(self) -> str:
        raise NotImplementedError


class Variable(Node):
    def serialize(self) -> str:
        return str(self)


class Value(Node):
    def serialize(self) -> str:
        return f'"{self}"'


class Op(Node):
    def serialize(self) -> str:
        return str(self)


VARIABLE = (
    L("implementation_version")
    | L("platform_python_implementation")
    | L("implementation_name")
    | L("python_full_version")
    | L("platform_release")
    | L("platform_version")
    | L("platform_machine")
    | L("platform_system")
    | L("python_version")
    | L("sys_platform")
    | L("os_name")
    | L("os.name")  # PEP-345
    | L("sys.platform")  # PEP-345
    | L("platform.version")  # PEP-345
    | L("platform.machine")  # PEP-345
    | L("platform.python_implementation")  # PEP-345
    | L("python_implementation")  # undocumented setuptools legacy
    | L("extra")  # PEP-508
)
ALIASES = {
    "os.name": "os_name",
    "sys.platform": "sys_platform",
    "platform.version": "platform_version",
    "platform.machine": "platform_machine",
    "platform.python_implementation": "platform_python_implementation",
    "python_implementation": "platform_python_implementation",
}
VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0])))

VERSION_CMP = (
    L("===") | L("==") | L(">=") | L("<=") | L("!=") | L("~=") | L(">") | L("<")
)

MARKER_OP = VERSION_CMP | L("not in") | L("in")
MARKER_OP.setParseAction(lambda s, l, t: Op(t[0]))

MARKER_VALUE = QuotedString("'") | QuotedString('"')
MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0]))

BOOLOP = L("and") | L("or")

MARKER_VAR = VARIABLE | MARKER_VALUE

MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR)
MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0]))

LPAREN = L("(").suppress()
RPAREN = L(")").suppress()

MARKER_EXPR = Forward()
MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN)
MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR)

MARKER = stringStart + MARKER_EXPR + stringEnd


def _coerce_parse_result(results: Union[ParseResults, List[Any]]) -> List[Any]:
    if isinstance(results, ParseResults):
        return [_coerce_parse_result(i) for i in results]
    else:
        return results


def _format_marker(
    marker: Union[List[str], Tuple[Node, ...], str], first: Optional[bool] = True
) -> str:

    assert isinstance(marker, (list, tuple, str))

    # Sometimes we have a structure like [[...]] which is a single item list
    # where the single item is itself it's own list. In that case we want skip
    # the rest of this function so that we don't get extraneous () on the
    # outside.
    if (
        isinstance(marker, list)
        and len(marker) == 1
        and isinstance(marker[0], (list, tuple))
    ):
        return _format_marker(marker[0])

    if isinstance(marker, list):
        inner = (_format_marker(m, first=False) for m in marker)
        if first:
            return " ".join(inner)
        else:
            return "(" + " ".join(inner) + ")"
    elif isinstance(marker, tuple):
        return " ".join([m.serialize() for m in marker])
    else:
        return marker


_operators: Dict[str, Operator] = {
    "in": lambda lhs, rhs: lhs in rhs,
    "not in": lambda lhs, rhs: lhs not in rhs,
    "<": operator.lt,
    "<=": operator.le,
    "==": operator.eq,
    "!=": operator.ne,
    ">=": operator.ge,
    ">": operator.gt,
}


def _eval_op(lhs: str, op: Op, rhs: str) -> bool:
    try:
        spec = Specifier("".join([op.serialize(), rhs]))
    except InvalidSpecifier:
        pass
    else:
        return spec.contains(lhs)

    oper: Optional[Operator] = _operators.get(op.serialize())
    if oper is None:
        raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.")

    return oper(lhs, rhs)


class Undefined:
    pass


_undefined = Undefined()


def _get_env(environment: Dict[str, str], name: str) -> str:
    value: Union[str, Undefined] = environment.get(name, _undefined)

    if isinstance(value, Undefined):
        raise UndefinedEnvironmentName(
            f"{name!r} does not exist in evaluation environment."
        )

    return value


def _evaluate_markers(markers: List[Any], environment: Dict[str, str]) -> bool:
    groups: List[List[bool]] = [[]]

    for marker in markers:
        assert isinstance(marker, (list, tuple, str))

        if isinstance(marker, list):
            groups[-1].append(_evaluate_markers(marker, environment))
        elif isinstance(marker, tuple):
            lhs, op, rhs = marker

            if isinstance(lhs, Variable):
                lhs_value = _get_env(environment, lhs.value)
                rhs_value = rhs.value
            else:
                lhs_value = lhs.value
                rhs_value = _get_env(environment, rhs.value)

            groups[-1].append(_eval_op(lhs_value, op, rhs_value))
        else:
            assert marker in ["and", "or"]
            if marker == "or":
                groups.append([])

    return any(all(item) for item in groups)


def format_full_version(info: "sys._version_info") -> str:
    version = "{0.major}.{0.minor}.{0.micro}".format(info)
    kind = info.releaselevel
    if kind != "final":
        version += kind[0] + str(info.serial)
    return version


def default_environment() -> Dict[str, str]:
    iver = format_full_version(sys.implementation.version)
    implementation_name = sys.implementation.name
    return {
        "implementation_name": implementation_name,
        "implementation_version": iver,
        "os_name": os.name,
        "platform_machine": platform.machine(),
        "platform_release": platform.release(),
        "platform_system": platform.system(),
        "platform_version": platform.version(),
        "python_full_version": platform.python_version(),
        "platform_python_implementation": platform.python_implementation(),
        "python_version": ".".join(platform.python_version_tuple()[:2]),
        "sys_platform": sys.platform,
    }


class Marker:
    def __init__(self, marker: str) -> None:
        try:
            self._markers = _coerce_parse_result(MARKER.parseString(marker))
        except ParseException as e:
            raise InvalidMarker(
                f"Invalid marker: {marker!r}, parse error at "
                f"{marker[e.loc : e.loc + 8]!r}"
            )

    def __str__(self) -> str:
        return _format_marker(self._markers)

    def __repr__(self) -> str:
        return f"<Marker('{self}')>"

    def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
        """Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        """
        current_environment = default_environment()
        if environment is not None:
            current_environment.update(environment)

        return _evaluate_markers(self._markers, current_environment)
python3.12/site-packages/pip/_vendor/packaging/__pycache__/__about__.cpython-312.pyc000064400000001246151732701520024110 0ustar00�

R`i���2�gd�ZdZdZdZdZdZdZdZdezZy	)
)�	__title__�__summary__�__uri__�__version__�
__author__�	__email__�__license__�
__copyright__�	packagingz"Core utilities for Python packagesz!https://github.com/pypa/packagingz21.3z)Donald Stufft and individual contributorszdonald@stufft.iozBSD-2-Clause or Apache-2.0z2014-2019 %sN)	�__all__rrrrrrrr	����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/__about__.py�<module>rs;��
	��
�	�2��
-����
8�
��	�*����+�
r
python3.12/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-312.pyc000064400000001002151732701520023727 0ustar00�

R`i���4�ddlmZmZmZmZmZmZmZmZgd�Z	y)�)�
__author__�
__copyright__�	__email__�__license__�__summary__�	__title__�__uri__�__version__)rrr	r
rrrrN)
�	__about__rrrrrrr	r
�__all__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/__init__.py�<module>rs��
	�	�	�	�rpython3.12/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-312.pyc000064400000006331151732701520024564 0ustar00�

R`i���H�Gd�d�Ze�ZGd�d�Ze�Zy)c��eZdZdefd�Zdefd�Zdedefd�Z	dedefd�Z
dedefd�Zdedefd�Zdedefd	�Z
d
eddfd�Zy
)�InfinityType�returnc��y)N�Infinity���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/_structures.py�__repr__zInfinityType.__repr__s���c�*�tt|��S�N��hash�reprrs r
�__hash__zInfinityType.__hash__
����D��J��r�otherc��y�NFr�r	rs  r
�__lt__zInfinityType.__lt__
���rc��yrrrs  r
�__le__zInfinityType.__le__rrc�.�t||j�Sr��
isinstance�	__class__rs  r
�__eq__zInfinityType.__eq__����%����0�0rc��y�NTrrs  r
�__gt__zInfinityType.__gt__���rc��yr#rrs  r
�__ge__zInfinityType.__ge__r%rr	�NegativeInfinityTypec��tSr)�NegativeInfinityrs r
�__neg__zInfinityType.__neg__s���rN)�__name__�
__module__�__qualname__�strr�intr�object�boolrrr r$r'r+rrr
rrs����#�� �#� ��F��t���F��t��1�F�1�t�1��F��t���F��t�� �f� �!7� rrc��eZdZdefd�Zdefd�Zdedefd�Z	dedefd�Z
dedefd�Zdedefd�Zdedefd	�Z
d
edefd�Zy)
r(rc��y)Nz	-Infinityrrs r
rzNegativeInfinityType.__repr__$s��rc�*�tt|��Srrrs r
rzNegativeInfinityType.__hash__'rrrc��yr#rrs  r
rzNegativeInfinityType.__lt__*r%rc��yr#rrs  r
rzNegativeInfinityType.__le__-r%rc�.�t||j�Srrrs  r
r zNegativeInfinityType.__eq__0r!rc��yrrrs  r
r$zNegativeInfinityType.__gt__3rrc��yrrrs  r
r'zNegativeInfinityType.__ge__6rrr	c��tSr)rrs r
r+zNegativeInfinityType.__neg__9s���rN)r,r-r.r/rr0rr1r2rrr r$r'rr+rrr
r(r(#s����#�� �#� ��F��t���F��t��1�F�1�t�1��F��t���F��t���f���rr(N)rrr(r*rrr
�<module>r<s-�� � �4�>����4(�)�rpython3.12/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-312.pyc000064400000046515151732701520023677 0ustar00�

R`i�8���ddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZgd�ZeeefZeee
eeffZeeeefZeee
eee
eefe
eeffdffZe
ee
edfeeeefZe
ee
edffZeeeefeeefgefZej8dgd��Zd	ed
edfd�ZGd
�de�Z Gd�d�Z!Gd�de!�Z"ejFdejH�Z%dddddd�Z&ded
eefd�Z'd	ed
efd�Z(dZ)Gd�de!�Z*dedeee+e	fd
ee
eeffd �Z,ejFd!�Z-d"ed
eefd#�Z.d$ed%e
edfd&ee
eefd'ee
eefd(ee
eefd"ee
ed
efd)�Z/y)*�N)�Callable�Iterator�List�Optional�SupportsInt�Tuple�Union�)�Infinity�InfinityType�NegativeInfinity�NegativeInfinityType)�parse�Version�
LegacyVersion�InvalidVersion�VERSION_PATTERN.�_Version)�epoch�release�dev�pre�post�local�version�return)rrc�N�	t|�S#t$rt|�cYSwxYw)z�
    Parse the given version string and return either a :class:`Version` object
    or a :class:`LegacyVersion` object depending on if the given version is
    a valid PEP 440 version or a legacy version.
    )rrr)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/version.pyrr*s,��&��w�����&��W�%�%�&�s�

�$�$c��eZdZdZy)rzF
    An invalid version was found, users should refer to PEP 440.
    N)�__name__�
__module__�__qualname__�__doc__��rrr6s��r%rc��eZdZUeeefed<defd�Zddde	fd�Z
ddde	fd�Zdede	fd�Z
ddde	fd�Zddde	fd	�Zdede	fd
�Zy)�_BaseVersion�_keyrc�,�t|j�S�N)�hashr(��selfs r�__hash__z_BaseVersion.__hash__?s���D�I�I��r%�otherc�`�t|t�stS|j|jkSr*��
isinstancer'�NotImplementedr(�r-r/s  r�__lt__z_BaseVersion.__lt__E�%���%��.�!�!��y�y�5�:�:�%�%r%c�`�t|t�stS|j|jkSr*r1r4s  r�__le__z_BaseVersion.__le__K�%���%��.�!�!��y�y�E�J�J�&�&r%c�`�t|t�stS|j|jk(Sr*r1r4s  r�__eq__z_BaseVersion.__eq__Qr9r%c�`�t|t�stS|j|jk\Sr*r1r4s  r�__ge__z_BaseVersion.__ge__Wr9r%c�`�t|t�stS|j|jkDSr*r1r4s  r�__gt__z_BaseVersion.__gt__]r6r%c�`�t|t�stS|j|jk7Sr*r1r4s  r�__ne__z_BaseVersion.__ne__cr9r%N)r r!r"r	�CmpKey�LegacyCmpKey�__annotations__�intr.�boolr5r8�objectr;r=r?rAr$r%rr'r'<s���
���$�
%�%��#��&�N�&�t�&�'�N�'�t�'�'�F�'�t�'�'�N�'�t�'�&�N�&�t�&�'�F�'�t�'r%r'c��eZdZdeddfd�Zdefd�Zdefd�Zedefd��Zedefd��Z	ede
fd	��Zedd
��Zedd��Z
edd��Zedd
��Zedd��Zedefd��Zedefd��Zedefd��Zy)rrrNc�X�t|�|_t|j�|_yr*)�str�_version�_legacy_cmpkeyr()r-rs  r�__init__zLegacyVersion.__init__ks���G���
�"�4�=�=�1��	r%c��|jSr*�rKr,s r�__str__zLegacyVersion.__str__ps���}�}�r%c��d|�d�S)Nz<LegacyVersion('�')>r$r,s r�__repr__zLegacyVersion.__repr__ss��!�$��s�+�+r%c��|jSr*rOr,s r�publiczLegacyVersion.publicv����}�}�r%c��|jSr*rOr,s r�base_versionzLegacyVersion.base_versionzrVr%c��y)N���r$r,s rrzLegacyVersion.epoch~s��r%c��yr*r$r,s rrzLegacyVersion.release����r%c��yr*r$r,s rrzLegacyVersion.pre�r\r%c��yr*r$r,s rrzLegacyVersion.post�r\r%c��yr*r$r,s rrzLegacyVersion.dev�r\r%c��yr*r$r,s rrzLegacyVersion.local�r\r%c��y�NFr$r,s r�
is_prereleasezLegacyVersion.is_prerelease����r%c��yrbr$r,s r�is_postreleasezLegacyVersion.is_postrelease�rdr%c��yrbr$r,s r�
is_devreleasezLegacyVersion.is_devrelease�rdr%)rN)r r!r"rJrMrPrS�propertyrUrXrErrrrrrrFrcrfrhr$r%rrrjs3��2��2��2�
���,�#�,���������c������s��������������������������t������������t���r%rz(\d+ | [a-z]+ | \.| -)�czfinal-�@)r�preview�-�rcr�sc#��K�tj|�D]B}tj||�}|r|dk(r�!|dddvr|j	d����<d|z���Dd��y�w)N�.r
�
0123456789��*�*final)�_legacy_version_component_re�split�_legacy_version_replacement_map�get�zfill)ro�parts  r�_parse_version_partsr|�sf����,�2�2�1�5��.�2�2�4��>���t�s�{�����8�|�#��*�*�Q�-����*��6��N�s�A A"c�B�d}g}t|j��D]s}|jd�rO|dkr%|r#|ddk(r|j�|r	|ddk(r�|r#|ddk(r|j�|r	|ddk(r�|j	|��u|t|�fS)NrZrtruz*final-�00000000)r|�lower�
startswith�pop�append�tuple)rr�partsr{s    rrLrL�s���
�E��E�$�W�]�]�_�5���?�?�3���h����b�	�Y� 6��I�I�K���b�	�Y� 6��E�"�I��3��	�	���E�"�I��3�	���T��6��%��,��r%a�
    v?
    (?:
        (?:(?P<epoch>[0-9]+)!)?                           # epoch
        (?P<release>[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P<pre>                                          # pre-release
            [-_\.]?
            (?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P<pre_n>[0-9]+)?
        )?
        (?P<post>                                         # post release
            (?:-(?P<post_n1>[0-9]+))
            |
            (?:
                [-_\.]?
                (?P<post_l>post|rev|r)
                [-_\.]?
                (?P<post_n2>[0-9]+)?
            )
        )?
        (?P<dev>                                          # dev release
            [-_\.]?
            (?P<dev_l>dev)
            [-_\.]?
            (?P<dev_n>[0-9]+)?
        )?
    )
    (?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
c���eZdZejdezdzejejz�Zde	ddfd�Z
de	fd�Zde	fd�Ze
defd	��Ze
deed
ffd��Ze
deee	effd��Ze
deefd
��Ze
deefd��Ze
dee	fd��Ze
de	fd��Ze
de	fd��Ze
defd��Ze
defd��Ze
defd��Ze
defd��Ze
defd��Ze
defd��Zy)rz^\s*z\s*$rrNc��|jj|�}|std|�d���t|j	d�rt|j	d��ndt
d�|j	d�jd�D��t|j	d�|j	d	��t|j	d
�|j	d�xs|j	d��t|j	d
�|j	d��t|j	d����|_
t|jj|jj|jj|jj|jj |jj"�|_y)NzInvalid version: '�'rrc3�2K�|]}t|����y�wr*)rE��.0�is  r�	<genexpr>z#Version.__init__.<locals>.<genexpr>
s����L�*K�Q�#�a�&�*K���rrq�pre_l�pre_n�post_l�post_n1�post_n2�dev_l�dev_nr)rrrrrr)�_regex�searchrr�grouprEr�rw�_parse_letter_version�_parse_local_versionrK�_cmpkeyrrrrrrr()r-r�matchs   rrMzVersion.__init__sR�����"�"�7�+��� �#5�g�Y�a�!@�A�A�!�/4�{�{�7�/C�#�e�k�k�'�*�+���L�%�+�+�i�*@�*F�*F�s�*K�L�L�%�e�k�k�'�&:�E�K�K��<P�Q�&����H�%�u�{�{�9�'=�'W����Y�AW��&�e�k�k�'�&:�E�K�K��<P�Q�&�u�{�{�7�';�<�	
��
���M�M����M�M�!�!��M�M����M�M����M�M����M�M���

��	r%c��d|�d�S)Nz
<Version('rRr$r,s rrSzVersion.__repr__s���D�6��%�%r%c�Z�g}|jdk7r|j|j�d��|jdjd�|jD���|j�1|jdjd�|jD���|j
�|jd|j
���|j�|jd|j���|j�|jd	|j���dj|�S)
Nr�!rqc3�2K�|]}t|����y�wr*�rJ�r��xs  rr�z"Version.__str__.<locals>.<genexpr>(�����;�l��c�!�f�l�r��c3�2K�|]}t|����y�wr*r�r�s  rr�z"Version.__str__.<locals>.<genexpr>,s���� :��A��Q���r�z.postz.dev�+)rr��joinrrrrr�r-r�s  rrPzVersion.__str__ s������:�:��?��L�L�D�J�J�<�q�)�*�	���S�X�X�;�d�l�l�;�;�<��8�8���L�L���� :���� :�:�;��9�9� ��L�L�5�����,�-��8�8���L�L�4����z�*�+��:�:�!��L�L�1�T�Z�Z�L�)�*��w�w�u�~�r%c�2�|jj}|Sr*)rKr)r-�_epochs  rrz
Version.epoch<s���m�m�)�)���
r%.c�2�|jj}|Sr*)rKr)r-�_releases  rrzVersion.releaseAs��$(�M�M�$9�$9���r%c�2�|jj}|Sr*)rKr)r-�_pres  rrzVersion.preFs��*.�-�-�*;�*;���r%c�d�|jjr|jjdSdS�Nr
)rKrr,s rrzVersion.postKs(��(,�
�
�(:�(:�t�}�}�!�!�!�$�D��Dr%c�d�|jjr|jjdSdSr�)rKrr,s rrzVersion.devOs(��'+�}�}�'8�'8�t�}�}� � ��#�B�d�Br%c��|jjr,djd�|jjD��Sy)Nrqc3�2K�|]}t|����y�wr*r�r�s  rr�z Version.local.<locals>.<genexpr>Vs����@�,?�q�C��F�,?�r�)rKrr�r,s rrz
Version.localSs1���=�=����8�8�@�D�M�M�,?�,?�@�@�@�r%c�>�t|�jdd�dS)Nr�r
r)rJrwr,s rrUzVersion.publicZs���4�y���s�A�&�q�)�)r%c���g}|jdk7r|j|j�d��|jdjd�|jD���dj|�S)Nrr�rqc3�2K�|]}t|����y�wr*r�r�s  rr�z'Version.base_version.<locals>.<genexpr>gr�r�r�)rr�r�rr�s  rrXzVersion.base_version^sZ�����:�:��?��L�L�D�J�J�<�q�)�*�	���S�X�X�;�d�l�l�;�;�<��w�w�u�~�r%c�>�|jduxs|jduSr*)rrr,s rrczVersion.is_prereleaseks���x�x�t�#�;�t�x�x�t�';�;r%c��|jduSr*)rr,s rrfzVersion.is_postreleaseos���y�y��$�$r%c��|jduSr*)rr,s rrhzVersion.is_devreleasess���x�x�t�#�#r%c�T�t|j�dk\r|jdSdS)Nr
r��lenrr,s r�majorz
Version.majorw�%��"%�d�l�l�"3�q�"8�t�|�|�A��?�a�?r%c�T�t|j�dk\r|jdSdS)N�r
rr�r,s r�minorz
Version.minor{r�r%c�T�t|j�dk\r|jdSdS)N�r�rr�r,s r�microz
Version.micror�r%) r r!r"�re�compiler�VERBOSE�
IGNORECASEr�rJrMrSrPrirErrrrrrrrrUrXrFrcrfrhr�r�r�r$r%rrr�s��
�R�Z�Z��/�1�G�;�R�Z�Z�"�-�-�=W�
X�F�
��
��
�:&�#�&����8��s�������s�C�x�������X�e�C��H�o�.�����E�h�s�m�E��E��C�X�c�]�C��C���x��}�����*��*��*��
�c�
��
��<�t�<��<��%��%��%��$�t�$��$��@�s�@��@��@�s�@��@��@�s�@��@r%r�letter�numberc��|r>|�d}|j�}|dk(rd}n|dk(rd}n
|dvrd}n|dvrd	}|t|�fS|s|rd	}|t|�fSy)
Nr�alpha�a�beta�b)rjrrlrn)�rev�rr)rrE)r�r�s  rr�r��s�����>��F������
�W���F�
�v�
��F�
�.�
.��F�
�|�
#��F��s�6�{�"�"��f����s�6�{�"�"�r%z[\._-]rc�R�|�%td�tj|�D��Sy)zR
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    Nc3�rK�|]/}|j�s|j�n
t|����1y�wr*)�isdigitrrE)r�r{s  rr�z'_parse_local_version.<locals>.<genexpr>�s/����
�>��!%����D�J�J�L�C��I�=�>�s�57)r��_local_version_separatorsrw)rs rr�r��s4��
���
�1�7�7��>�
�
�	
�r%rrrrrc��ttttjd�t|�����}|�|�	|�t
}n|�t}n|}|�t
}n|}|�t}	n|}	|�t
}
ntd�|D��}
|||||	|
fS)Nc��|dk(S)Nrr$)r�s r�<lambda>z_cmpkey.<locals>.<lambda>�s��A��Fr%c3�TK�|] }t|t�r|dfnt|f���"y�w)r�N)r2rEr
r�s  rr�z_cmpkey.<locals>.<genexpr>�s,����
�NS��z�!�S�)�Q��G�0@�!�/D�D�e�s�&()r��reversed�list�	itertools�	dropwhiler
r)rrrrrrr�r��_post�_dev�_locals           rr�r��s������i�)�)�*:�H�W�<M�N�O�P��H��{�t�|���/��

�������|� 0�����{�'�����}�,���
�NS�
�
���(�D�%��v�5�5r%)0�collectionsr�r��warnings�typingrrrrrrr	�_structuresrrr
r�__all__�
InfiniteTypesrJrE�PrePostDevType�SubLocalType�	LocalTyperBrCrF�VersionComparisonMethod�
namedtuplerr�
ValueErrorrr'rr�r�rvrxr|rLrr�bytesr�r�r�r�r$r%r�<module>r�s���
��	��P�P�P�W�W�
T���l�$8�8�9�
��}�e�C��H�o�5�6���]�C��,�-����	�
���,��#�$��&��4�5�
7�	
�
	�	
���

�	�
���s�C�x��.�.�.�)�S�
���S�%��S��/�)�*��"�
�6�<�� �%���(<�"=�>��D���"�;�!�!��C���
	&�3�	&�5�!;�<�	&��Z��+'�+'�\6�L�6�r *�r�z�z�*C�R�Z�Z�P����	�

��#���C��H�S�M��"�C��L��:��@E@�l�E@�P!��!��s�E�;�6�7�!�
�e�C��H�o��!�H'�B�J�J�y�1��	��	���(;�	�<6��<6�
�3��8�_�<6�
�%��S��/�	"�<6��5��c��?�
#�	<6�

�%��S��/�	"�<6��E�,�'�(�
<6��<6r%python3.12/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-312.pyc000064400000015517151732701520024733 0ustar00�

R`iD��8�ddlZddlZddlZddlmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZddlmZmZddlmZmZmZGd�de�Zeej:ej<z�Zed	�jA�Z!ed
�jA�Z"ed�jA�Z#ed�jA�Z$ed
�jA�Z%ed�jA�Z&ed�jA�Z'ed�Z(eee(�ezzZ)e
eee)�z�Z*e*d�Z+e*Z,ed�d�Z-e'e-zZ.e,ee%e,z�zZ/e!ee/�ze"zd�Z0eejbejdejfz�Z4eejbejdejfz�Z5e4e5zZ6e
e6ee%e6z�zd
d��d�Z7ee#e7ze$ze7z�Z8e8jsd��ee8�d�Z:e:jsd��ee��d�Zejrd��e&Z;e;ezZ<e:ee<�zZ=e.ee<�zZ>e+ee0�ze>e=zzZ?ee?zezZ@e@j�d�Gd�d�ZBy) �N)�List�Optional�Set)
�Combine�Literalr�ParseException�Regex�Word�
ZeroOrMore�originalTextFor�	stringEnd�stringStart�)�MARKER_EXPR�Marker)�LegacySpecifier�	Specifier�SpecifierSetc��eZdZdZy)�InvalidRequirementzJ
    An invalid requirement was found, users should refer to PEP 508.
    N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/requirements.pyrrs��rr�[�]�(�)�,�;�@z-_.�namez[^ ]+�url�extrasF)�
joinString�adjacent�	_raw_specc�"�|jxsdS)N�)r*��s�l�ts   r�<lambda>r1@s��Q�[�[�->�B�->r�	specifierc��|dS)Nrrr-s   rr1r1Cs��A�a�Dr�markerc�F�t||j|j�S)N)r�_original_start�
_original_endr-s   rr1r1Gs��F�1�Q�.�.����A�Brzx[]c�8�eZdZdZdeddfd�Zdefd�Zdefd�Zy)�Requirementz�Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    �requirement_string�returnNc��	tj|�}|j|_|jr�tjj|j�}|jdk(r7tjj|�|jk7rStd��|jr$|jr|js$|jstd|j����|j|_nd|_t|jr|jj!�ng�|_t#|j$�|_|j&r|j&|_yd|_y#t$r:}td||j|jdz�d|j
����d}~wwxYw)NzParse error at "�z": �filezInvalid URL givenz
Invalid URL: )�REQUIREMENT�parseStringrr�loc�msgr%r&�urllib�parse�urlparse�scheme�
urlunparse�netloc�setr'�asListrr2r4)�selfr:�req�e�
parsed_urls     r�__init__zRequirement.__init__dsV��	��)�)�*<�=�C�����	��7�7����.�.�s�w�w�7�J�� � �F�*��<�<�*�*�:�6�#�'�'�A�,�-@�A�A� �'�'�J�,=�,=��%�%�j�.?�.?�(�=����	�)B�C�C�'*�w�w�D�H��D�H� #�3�:�:�C�J�J�$5�$5�$7�2� N���'3�C�M�M�'B���7:�z�z������t����)�	�$�"�$6�q�u�u�q�u�u�q�y�$I�"L�C�PQ�PU�PU�w�W��
��	�s�E:�:	F=�5F8�8F=c�
�|jg}|jr9djt|j��}|j	d|�d��|j
r$|j	t
|j
��|jr;|j	d|j���|jr|j	d�|jr|j	d|j���dj|�S)Nr"rrz@ � z; r,)	r%r'�join�sorted�appendr2�strr&r4)rK�parts�formatted_extrass   r�__str__zRequirement.__str__}s��� �I�I�;���;�;�"�x�x��t�{�{�(;�<���L�L�1�-�.�a�0�1��>�>��L�L��T�^�^�,�-��8�8��L�L�2�d�h�h�Z��)��{�{����S�!��;�;��L�L�2�d�k�k�]�+�,��w�w�u�~�rc��d|�d�S)Nz<Requirement('z')>r)rKs r�__repr__zRequirement.__repr__�s����v�S�)�)r)rrrrrUrOrXrZrrrr9r9Ws5���L�3�L�4�L�2���(*�#�*rr9)C�re�string�urllib.parserC�typingrr�	TOptionalr�pip._vendor.pyparsingrr�Lrr	r
rrr
r�markersrr�
specifiersrrr�
ValueErrorr�
ascii_letters�digits�ALPHANUM�suppress�LBRACKET�RBRACKET�LPAREN�RPAREN�COMMA�	SEMICOLON�AT�PUNCTUATION�IDENTIFIER_END�
IDENTIFIER�NAME�EXTRA�URI�URL�EXTRAS_LIST�EXTRAS�
_regex_str�VERBOSE�
IGNORECASE�VERSION_PEP440�VERSION_LEGACY�VERSION_ONE�VERSION_MANY�
_VERSION_SPEC�setParseAction�VERSION_SPEC�MARKER_SEPARATOR�MARKER�VERSION_AND_MARKER�URL_AND_MARKER�NAMED_REQUIREMENTr?r@r9rrr�<module>r�s���

�
��3�3����)�@�@������$�$�v�}�}�4�5���S�6�?�?����S�6�?�?���	
�3����	��	
�3����	��	�#������
�c�F�O�O��	��s�V�_�_����5�k���Z��4�x�?�@��
�X�
�>� :�:�
;�
��&������e�H�o�e����3�h���j����/�/��
5�(�X�k�*�
*�X�
5�x�	@���y�+�+�R�Z�Z�"�-�-�-G�H����1�1�2�:�:��
�
�3M�N���~�-���w��*�U�[�0�1�1�c�E��
����&�<�/�&�8�L�H�I�
�
���>�?�-��}�-�k�:�����0�1�,�o�k�m�,�X�6������B����	�K�	'��!�H�V�$4�4���x��'�'���8�F�+�+�~�@R�/R�S���-�-�	�9�������;*�;*rpython3.12/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-312.pyc000064400000033423151732701520023650 0ustar00�

R`i'!�	��UddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZddlmZmZgd�ZeeegefZGd�de�ZGd	�d
e�Z Gd�de�Z!Gd
�d�Z"Gd�de"�Z#Gd�de"�Z$Gd�de"�Z%ed�ed�zed�zed�zed�zed�zed�zed�zed�zed�zed�zed �zed!�zed"�zed#�zed$�zed%�zed&�zZ&ddddddd'�Z'e&jQd(��ed)�ed*�zed+�zed,�zed-�zed.�zed/�zed0�zZ)e)ed1�zed2�zZ*e*jQd3��ed4�ed5�zZ+e+jQd6��ed7�ed8�zZ,e&e+zZ-ee-e*ze-z�Z.e.jQd9��ed:�j_�Z0ed;�j_�Z1e
�Z2e.ee0e2ze1z�zZ3e2e3ee,e2z�zzee2zezZ4d<eeeefd=eefd>�Z5	dXd?eeee
e"d@fefdAe	ed=efdB�Z6dC�dD�ejnejpejrejtejvejxdE�Z=eeefe>dF<dGedHe%dIed=efdJ�Z?GdK�dL�Z@e@�ZAdMeeefdNed=efdO�ZBdPeedMeeefd=efdQ�ZCdRdSd=efdT�ZDd=eeeffdU�ZEGdV�dW�ZFy)Y�N)�Any�Callable�Dict�List�Optional�Tuple�Union)	�Forward�Group�Literal�ParseException�ParseResults�QuotedString�
ZeroOrMore�	stringEnd�stringStart�)�InvalidSpecifier�	Specifier)�
InvalidMarker�UndefinedComparison�UndefinedEnvironmentName�Marker�default_environmentc��eZdZdZy)rzE
    An invalid marker was found, users should refer to PEP 508.
    N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/markers.pyrr$���r"rc��eZdZdZy)rzP
    An invalid operation was attempted on a value that doesn't support it.
    Nrr!r"r#rr*r$r"rc��eZdZdZy)rz\
    A name was attempted to be used that does not exist inside of the
    environment.
    Nrr!r"r#rr0s��r"rc�@�eZdZdeddfd�Zdefd�Zdefd�Zdefd�Zy)�Node�value�returnNc��||_y�N)r))�selfr)s  r#�__init__z
Node.__init__8s	����
r"c�,�t|j�Sr,)�strr)�r-s r#�__str__zNode.__str__;s���4�:�:��r"c�<�d|jj�d|�d�S)N�<z('�')>)�	__class__rr1s r#�__repr__z
Node.__repr__>s"���4�>�>�*�*�+�2�d�V�3�7�7r"c��t�r,)�NotImplementedErrorr1s r#�	serializezNode.serializeAs��!�!r")	rrrrr.r0r2r7r:r!r"r#r(r(7s9���c��d�����8�#�8�"�3�"r"r(c��eZdZdefd�Zy)�Variabler*c��t|�Sr,�r0r1s r#r:zVariable.serializeF����4�y�r"N�rrrr0r:r!r"r#r<r<E����3�r"r<c��eZdZdefd�Zy)�Valuer*c��d|�d�S)N�"r!r1s r#r:zValue.serializeKs���4�&��{�r"Nr@r!r"r#rCrCJs���3�r"rCc��eZdZdefd�Zy)�Opr*c��t|�Sr,r>r1s r#r:zOp.serializePr?r"Nr@r!r"r#rGrGOrAr"rG�implementation_version�platform_python_implementation�implementation_name�python_full_version�platform_release�platform_version�platform_machine�platform_system�python_version�sys_platform�os_name�os.name�sys.platform�platform.version�platform.machine�platform.python_implementation�python_implementation�extra)rTrUrVrWrXrYc�L�ttj|d|d��S�Nr)r<�ALIASES�get��s�l�ts   r#�<lambda>rcps������Q�q�T�1�Q�4�1H�(Ir"z===�==�>=�<=�!=z~=�>r4�not in�inc��t|d�Sr\)rGr_s   r#rcrcws���A�a�D�r"�'rEc��t|d�Sr\)rCr_s   r#rcrczs��E�!�A�$�Kr"�and�orc��t|d�Sr\)�tupler_s   r#rcrc�s��5��1��;r"�(�)�resultsr*c�b�t|t�r|D�cgc]
}t|���c}S|Scc}wr,)�
isinstancer�_coerce_parse_result)rt�is  r#rwrw�s1���'�<�(�18�9��A�$�Q�'��9�9����:s�,�marker.�firstc���t|tttf�sJ�t|t�r5t	|�dk(r't|dttf�rt|d�St|t�r3d�|D�}|rdj
|�Sddj
|�zdzSt|t�r-dj
|D�cgc]}|j���c}�S|Scc}w)Nrrc3�6K�|]}t|d�����y�w)F)rzN)�_format_marker)�.0�ms  r#�	<genexpr>z!_format_marker.<locals>.<genexpr>�s����@��A����/�/��s�� rrrs)rv�listrqr0�lenr}�joinr:)ryrz�innerrs    r#r}r}�s����f�t�U�C�0�1�1�1�	�6�4� ���K�1���v�a�y�4��-�0��f�Q�i�(�(��&�$��@��@����8�8�E�?�"�����%��(�3�.�.�	�F�E�	"��x�x��7��1������7�8�8��
��8s�C%c�
�||vSr,r!��lhs�rhss  r#rcrc�s��3�#�:r"c�
�||vSr,r!r�s  r#rcrc�s��s�#�~r")rjrir4rfrdrgrerh�
_operatorsr��opr�c	��	tdj|j�|g��}|j|�S#t$rYnwxYwt
j
|j��}|�td|�d|�d|�d���|||�S)N�z
Undefined z on z and �.)rr�r:�containsrr�r^r)r�r�r��spec�opers     r#�_eval_opr��s���"�����"�,�,�.�#�!6�7�8���}�}�S�!�!���
��
��
 *�~�~�b�l�l�n�=�D��|�!�J�r�f�D���u�S�G�1�"M�N�N���S�>�s�*=�	A	�A	c��eZdZy)�	UndefinedN)rrrr!r"r#r�r��s��r"r��environment�namec�n�|j|t�}t|t�rt	|�d���|S)Nz* does not exist in evaluation environment.)r^�
_undefinedrvr�r)r�r�r)s   r#�_get_envr��s;��#.�?�?�4��#D�E��%��#�&��h�@�A�
�	
��Lr"�markersc�"�gg}|D]�}t|tttf�sJ�t|t�r|dj	t||���Ot|t�r{|\}}}t|t�r#t||j�}|j}n"|j}t||j�}|dj	t|||����|dvsJ�|dk(s��|j	g���td�|D��S)N���)rnroroc3�2K�|]}t|����y�wr,)�all)r~�items  r#r�z$_evaluate_markers.<locals>.<genexpr>�s����,�V�T�s�4�y�V�s�)rvr�rqr0�append�_evaluate_markersr<r�r)r��any)	r�r��groupsryr�r�r��	lhs_value�	rhs_values	         r#r�r��s��� "�t�F����&�4���"4�5�5�5��f�d�#��2�J���/���D�E�
���
&�!�L�C��S��#�x�(�$�[�#�)�)�<�	��I�I�	��I�I�	�$�[�#�)�)�<�	��2�J���h�y�"�i�@�A��]�*�*�*���~��
�
�b�!�'�*�,�V�,�,�,r"�infozsys._version_infoc��dj|�}|j}|dk7r||dt|j�zz
}|S)Nz{0.major}.{0.minor}.{0.micro}�finalr)�format�releaselevelr0�serial)r��version�kinds   r#�format_full_versionr��sE��-�4�4�T�:�G����D��w���4��7�S����-�-�-���Nr"c���ttjj�}tjj}||t
jt
j�t
j�t
j�t
j�t
j�t
j�djt
j�dd�tjd�S)Nr��)rKrIrSrOrMrPrNrLrJrQrR)r��sys�implementationr�r��os�platform�machine�release�systemrQrYr��python_version_tuple)�iverrKs  r#rrs����s�1�1�9�9�:�D��,�,�1�1��2�"&��7�7�$�,�,�.�$�,�,�.�#�?�?�,�$�,�,�.�'�6�6�8�*2�*H�*H�*J��(�(�8�#@�#@�#B�2�A�#F�G�����r"c�V�eZdZdeddfd�Zdefd�Zdefd�Zd	deeeefde	fd�Z
y)
rryr*Nc
���	ttj|��|_y#t$r0}td|�d||j|jdz����d}~wwxYw)NzInvalid marker: z, parse error at �)rw�MARKER�parseString�_markersr
r�loc)r-ry�es   r#r.zMarker.__init__sc��	�0��1C�1C�F�1K�L�D�M���	��"�6�*�,=��!�%�%�!�%�%�!�)�,�/�1��
��	�s�#&�	A�+A�Ac�,�t|j�Sr,)r}r�r1s r#r2zMarker.__str__s���d�m�m�,�,r"c��d|�d�S)Nz	<Marker('r5r!r1s r#r7zMarker.__repr__ s���4�&��$�$r"r�c�h�t�}|�|j|�t|j|�S)a$Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        )r�updater�r�)r-r��current_environments   r#�evaluatezMarker.evaluate#s3��2�3���"��&�&�{�3� ����0C�D�Dr"r,)rrrr0r.r2r7rr�boolr�r!r"r#rrsP���s��t��-��-�%�#�%�
E�H�T�#�s�(�^�$<�
E��
Er"r)T)G�operatorr�r�r��typingrrrrrrr	�pip._vendor.pyparsingr
rr�Lr
rrrrr�
specifiersrr�__all__r0r��Operator�
ValueErrorrrrr(r<rCrG�VARIABLEr]�setParseAction�VERSION_CMP�	MARKER_OP�MARKER_VALUE�BOOLOP�
MARKER_VAR�MARKER_ITEM�suppress�LPAREN�RPAREN�MARKER_EXPR�MARKER_ATOMr�rwr}�lt�le�eq�ne�ge�gtr��__annotations__r�r�r�r�r�r�rrr!r"r#�<module>r�sz��
�	��
�D�D�D�
�
�
�4����S�#�J��$�%���J���*���z��"�"��t��
�D��
�������(�)�*������������	�
�������
������������	��	�l�
��	�l���������
������(�)�*� �� �!!�"��j�#�	�*�"�*�*�&F�=�
��	���I�J��e�H�q��w���4�� �1�T�7�*�Q�t�W�4�q��w�>��3��G�!�C�&�P��
�!�H�+�%��$��/�	�	���1�2��C� �<��#4�4�����7�8�	
�5��A�d�G�	��
��
$�
��J��*�Z�7�8�����6�7�	
�3����	��	
�3����	���i���E�&�;�"6��"?�@�@���{�Z���(<�=�=�=�	�{�	"�Y�	.���%��d�3�i�(?�"@��T�#�Y��NR���$�s�)�U�4��9�-�s�2�3��<D�T�N����<&�-�	���
�+�+�
�+�+�
�+�+�
�+�+�	���	#�
�D��h���	��#��2��C��D��	�	��[�
��$�s�C�x�.������-�t�C�y�-�t�C��H�~�-�$�-�6�1��c���T�#�s�(�^��$E�Er"python3.12/site-packages/pip/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc000064400000015435151732701520024406 0ustar00�

R`i�
�Z�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
mZde
ededeedffd�Zde
ede
efd	�ZGd
�de�Zdede
efd
�Zej,�dede
efd��Zdedeefd�Zedk(r�ddlZej6�Zej;d�sJd��ede�edeej>��edd��eej@ddejCdd�d��D]Z"ee"d���yy) z�PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
�N)�IO�Iterator�
NamedTuple�Optional�Tuple�f�fmt�return.c�r�tj||jtj|���S�N)�struct�unpack�read�calcsize)rr	s  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/_musllinux.py�_read_unpackedrs%���=�=��a�f�f�V�_�_�S�%9�:�;�;�c��|jd�	t|d�}|ddt	d�k7ry|jtj
d�d�	dd	d
�|d\}}}t
j|�}	t||�\}}}}}}}	t|	dz�D]�}
|j|||
zz�	|t||��\}}}
|dk7r�7|j|�tj|j|
��jd�}d
|vry|cSy#tj$rYywxYw#t$rYywxYw#tj$rYywxYw#tj$rYywxYw)z�Detect musl libc location by parsing the Python executable.

    Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
    ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
    r�16BN�sELF�HHI�)�IIIIHHH�IIIIIIII)rrr)�QQQIHHH�IIQQQQQQ)r��)rr���musl)�seekrr
�error�tupler�operator�
itemgetter�KeyError�range�os�fsdecoder�strip)r�ident�e_fmt�p_fmt�p_idx�p_get�_�e_phoff�e_phentsize�e_phnum�i�p_type�p_offset�p_filesz�interpreters               r�_parse_ld_musl_from_elfr:s����F�F�1�I���q�%�(��
�R�a�y�E�*�%�%���F�F�6�?�?�5�!�1�%�,�
2�1�
���(����u�e��#�#�U�+���4B�1�e�4L�1��7�A�q�!�[�'��7�Q�;�
��	���w��q��(�)�	�).�~�a��/G�)H�&�F�H�h��Q�;��	���x���k�k�!�&�&��"2�3�9�9�$�?����$���� ���K�<�<�����������<�<������|�|�	��	�sG�D"�D;�9E
�6E#�"D8�7D8�;	E�E�
E �E �#E:�9E:c�"�eZdZUeed<eed<y)�_MuslVersion�major�minorN)�__name__�
__module__�__qualname__�int�__annotations__�rrr<r<Gs���J��Jrr<�outputc�@�d�|j�D�D�cgc]}|s�|��	}}t|�dks|ddddk7rytjd|d�}|syt	t|j
d��t|j
d����Scc}w)	Nc3�<K�|]}|j����y�wr)r+)�.0�ns  r�	<genexpr>z&_parse_musl_version.<locals>.<genexpr>Ms����@�,?�q�����,?�s�rrrr!zVersion (\d+)\.(\d+)r)r=r>)�
splitlines�len�re�matchr<rB�group)rErI�lines�ms    r�_parse_musl_versionrRLs���@�F�,=�,=�,?�@�F�@�1�A�Q�@�E�F�
�5�z�A�~��q��"�1���/��
���(�%��(�3�A����c�!�'�'�!�*�o�S������_�E�E��

Gs
�B�B�
executablec�N�tj�5}	|jt|d��}t|�}ddd�syt
j|gtjd��}t|j�S#t$rYddd�ywxYw#1swY�_xYw)a`Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    �rbNT)�stderr�universal_newlines)�
contextlib�	ExitStack�
enter_context�open�OSErrorr:�
subprocess�run�PIPErRrV)rS�stackr�ld�procs     r�_get_musl_versionrcVs���
�	�	�	�5�	��#�#�D��T�$:�;�A�%�Q�
'��
 ����>�>�2�$�z���4�P�D��t�{�{�+�+��
�	��	
 �	�	��
 �	�s-�B�B�B�	B�
B�B�B�B$�archc#�K�ttj�}|�yt|jdd�D]}d|j
�d|�d|�����y�w)aTGenerate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    N����
musllinux_r1)rc�sysrSr(r>r=)rd�sys_muslr>s   r�
platform_tagsrjnsT����!����0�H�����x�~�~�r�2�.���8�>�>�*�!�E�7�!�D�6�:�:�/�s�AA�__main__zlinux-z	not linuxzplat:zmusl:ztags:� )�endz[.-]r1�-rrfz
      )#�__doc__rX�	functoolsr%r)rMr
r]rh�typingrrrrr�bytes�strrBrr:r<rR�	lru_cachercrjr?�	sysconfig�get_platform�plat�
startswith�printrS�sub�split�trDrr�<module>r}sv������	�	�
��
�<�<�<�b��i�<�c�<�e�C��H�o�<�.�r�%�y�.�X�c�]�.�b�:��
F��F���(>�F������,�#�,�(�<�*@�,��,�.
;��
;���
�
;� �z���!�9�!�!�#�D��?�?�8�$�1�k�1�$�	�'�4��	�'�$�S�^�^�4�5�	�'�s��
�6�2�6�6�'�3��
�
�3��0B�2�0F�G�
H��
�a�Z� �I�rpython3.12/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc000064400000075041151732701530024343 0ustar00�

R`i�u�	��ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZddlmZmZmZeeefZeeeefZede��ZeeegefZGd�d	e�ZGd
�dej>��Z Gd
�de �Z!Gd�de!�Z"dedeegefdedeegeffd�Z#Gd�de!�Z$ejJd�Z&dede
efd�Z'dedefd�Z(de
ede
edee
ee
effd�Z)Gd�de �Z*y) �N)�Callable�Dict�Iterable�Iterator�List�Optional�Pattern�Set�Tuple�TypeVar�Union�)�canonicalize_version)�
LegacyVersion�Version�parse�VersionTypeVar)�boundc��eZdZdZy)�InvalidSpecifierzH
    An invalid specifier was found, users should refer to PEP 440.
    N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/specifiers.pyrr!s��rrc	�n�eZdZejdefd��Zejdefd��Zejde	de
fd��Zejde
e
fd��Zejde
ddfd	��Zejdd
ede
e
de
fd��Zej	dd
eede
e
deefd��Zy)�
BaseSpecifier�returnc��y)z�
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        Nr��selfs r�__str__zBaseSpecifier.__str__(��rc��y)zF
        Returns a hash value for this Specifier like object.
        Nrr"s r�__hash__zBaseSpecifier.__hash__/r%r�otherc��y)zq
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        Nr�r#r(s  r�__eq__zBaseSpecifier.__eq__5r%rc��y)zg
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        Nrr"s r�prereleaseszBaseSpecifier.prereleases<r%r�valueNc��y)zd
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        Nr�r#r.s  rr-zBaseSpecifier.prereleasesCr%r�itemr-c��y)zR
        Determines if the given item is contained within this specifier.
        Nr�r#r1r-s   r�containszBaseSpecifier.containsJr%r�iterablec��y)z�
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr)r#r5r-s   r�filterzBaseSpecifier.filterPr%r�N)rrr�abc�abstractmethod�strr$�intr'�object�boolr+�abstractpropertyrr-�setterr4rrr7rrrrr's-����������	����#����
	����F��t����	����X�d�^����������$����	����S��x��~������
	���PT�� ��0��?G��~��	�.�	!���rr)�	metaclassc��eZdZUiZeeefed<eeed<ddedee	ddfd�Z
defd�Zdefd	�Ze
deeeffd
��Zdefd�Zdede	fd
�Zdedefd�Zdedefd�Ze
defd��Ze
defd��Ze
dee	fd��Zej8de	ddfd��Zdede	fd�Z	ddedee	de	fd�Z	ddee dee	dee fd�Z!y)�_IndividualSpecifier�
_operators�_regexN�specr-r c���|jj|�}|std|�d���|jd�j	�|jd�j	�f|_||_y)NzInvalid specifier: '�'�operator�version)rE�searchr�group�strip�_spec�_prereleases)r#rFr-�matchs    r�__init__z_IndividualSpecifier.__init___sm�����"�"�4�(���"�%9�$��q�#A�B�B�
�K�K�
�#�)�)�+��K�K�	�"�(�(�*�'
��
�(��rc��|j�d|j��nd}d|jj�dt	|��|�d�S)N�, prereleases=��<�(�)>)rOr-�	__class__rr;�r#�pres  r�__repr__z_IndividualSpecifier.__repr__lsU��� � �,��T�-�-�0�1��	��4�>�>�*�*�+�1�S��Y�M�#��b�A�Arc�4�dj|j�S)Nz{}{})�formatrNr"s rr$z_IndividualSpecifier.__str__us���v�}�}�d�j�j�)�)rc�P�|jdt|jd�fS)Nrr)rNrr"s r�_canonical_specz$_IndividualSpecifier._canonical_specxs#���z�z�!�}�2�4�:�:�a�=�A�A�Arc�,�t|j�Sr8)�hashr_r"s rr'z_IndividualSpecifier.__hash__|s���D�(�(�)�)rr(c���t|t�r	|jt|��}nt||j�stS|j
|j
k(S#t$r	tcYSwxYwr8)�
isinstancer;rXr�NotImplementedr_r*s  rr+z_IndividualSpecifier.__eq__sg���e�S�!�
&����s�5�z�2���E�4�>�>�2�!�!��#�#�u�'<�'<�<�<��$�
&�%�%�
&�s�A"�"A4�3A4�opc�>�t|d|j|���}|S)N�	_compare_)�getattrrD)r#re�operator_callables   r�
_get_operatorz"_IndividualSpecifier._get_operator�s+��.5��I�d�o�o�b�1�2�3�/
��!� rrJc�H�t|ttf�st|�}|Sr8)rcrrr�r#rJs  r�_coerce_versionz$_IndividualSpecifier._coerce_version�s���'�M�7�#;�<��G�n�G��rc� �|jdS)Nr�rNr"s rrIz_IndividualSpecifier.operator�����z�z�!�}�rc� �|jdS)Nrror"s rrJz_IndividualSpecifier.version�rprc��|jSr8�rOr"s rr-z _IndividualSpecifier.prereleases�s��� � � rr.c��||_yr8rsr0s  rr-z _IndividualSpecifier.prereleases��
��!��rr1c�$�|j|�Sr8�r4�r#r1s  r�__contains__z!_IndividualSpecifier.__contains__�����}�}�T�"�"rc��|�|j}|j|�}|jr|sy|j|j�}|||j
�S�NF)r-rm�
is_prereleaserjrIrJ)r#r1r-�normalized_itemris     rr4z_IndividualSpecifier.contains�s_��
���*�*�K��.�.�t�4��
�(�(���/3�.@�.@����.O�� ��$�,�,�?�?rr5c#�K�d}g}d|�|ndi}|D]Y}|j|�}|j|fi|��s�(|jr |s|js|j	|��Td}|���[|s|r|D]}|���yyy�w)NFr-T)rmr4r}r-�append)r#r5r-�yielded�found_prereleases�kwrJ�parsed_versions        rr7z_IndividualSpecifier.filter�s����������K�,C�[��
N�� �G�!�1�1�'�:�N��t�}�}�^�2�r�2�"�/�/��4�#3�#3�%�,�,�W�5�#�G�!�M� �(�,�,���
�-�-�w�s�6A?�AA?�rTNr8)"rrrrDrr;�__annotations__r	rr>rQr[r$�propertyrr_r<r'r=r+�CallableOperatorrj�UnparsedVersion�
ParsedVersionrmrIrJr-r@ryr4rrr7rrrrCrCZs���!#�J��S�#�X��#��C�L��(�S�(�H�T�N�(�d�(�B�#�B�*��*��B��s�C�x��B��B�*�#�*�	=�F�	=�t�	=�!��!�(8�!����=��
��#�����������!�X�d�^�!��!����"��"�$�"��"�#��#��#�DH�@�#�@�2:�4�.�@�	
�@�0QU�!� ��0�!�?G��~�!�	�.�	!�!rrCc�2��eZdZdZej
dezdzejejz�Zdddddd	d
�Z	dde
d
eeddf�fd�
Z
dedefd�Zdede
defd�Zdede
defd�Zdede
defd�Zdede
defd�Zdede
defd�Zdede
defd�Z�xZS)�LegacySpecifiera�
        (?P<operator>(==|!=|<=|>=|<|>))
        \s*
        (?P<version>
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        �^\s*�\s*$�equal�	not_equal�less_than_equal�greater_than_equal�	less_than�greater_than)�==�!=�<=�>=rU�>NrFr-r c�Z��t�|�||�tjdt�y)NzZCreating a LegacyVersion has been deprecated and will be removed in the next major release)�superrQ�warnings�warn�DeprecationWarning)r#rFr-rXs   �rrQzLegacySpecifier.__init__�s&���
����{�+��
�
�
0��	
rrJc�N�t|t�stt|��}|Sr8)rcrr;rls  rrmzLegacySpecifier._coerce_versions���'�=�1�#�C��L�1�G��r�prospectivec�*�||j|�k(Sr8�rm�r#r�rFs   r�_compare_equalzLegacySpecifier._compare_equal
����d�2�2�4�8�8�8rc�*�||j|�k7Sr8r�r�s   r�_compare_not_equalz"LegacySpecifier._compare_not_equal
r�rc�*�||j|�kSr8r�r�s   r�_compare_less_than_equalz(LegacySpecifier._compare_less_than_equalr�rc�*�||j|�k\Sr8r�r�s   r�_compare_greater_than_equalz+LegacySpecifier._compare_greater_than_equals���d�2�2�4�8�8�8rc�*�||j|�kSr8r�r�s   r�_compare_less_thanz"LegacySpecifier._compare_less_than����T�1�1�$�7�7�7rc�*�||j|�kDSr8r�r�s   r�_compare_greater_thanz%LegacySpecifier._compare_greater_thanr�rr�)rrr�
_regex_str�re�compile�VERBOSE�
IGNORECASErErDr;rr>rQr�rrmr�r�r�r�r�r��
__classcell__)rXs@rr�r��s!���
�J��R�Z�Z��*�,�w�6��
�
�R�]�]�8R�
S�F����"�
�
�
�J�
�S�
�H�T�N�
�d�
����=��
9�-�9�s�9�t�9�9�m�9�3�9�4�9�9�M�9��9�QU�9�9�(�9�03�9�	
�9�
8�m�8�3�8�4�8�8��8�c�8�d�8rr��fn�	Specifierr c	�l��tj��dddtdtdtf�fd��}|S)Nr#r�r�rFr c�:��t|t�sy�|||�Sr|)rcr)r#r�rFr�s   �r�wrappedz)_require_version_compare.<locals>.wrapped"s����+�w�/���$��T�*�*r)�	functools�wrapsr�r;r>)r�r�s` r�_require_version_comparer�sC����_�_�R��+�k�+�
�+�S�+�T�+��+�
�Nrc	��eZdZdZej
dezdzejejz�Zdddddd	d
dd�Z	e
d
edede
fd��Ze
d
edede
fd��Ze
d
edede
fd��Ze
d
edede
fd��Ze
d
edede
fd��Ze
d
edede
fd��Ze
d
edede
fd��Zd
edede
fd�Zede
fd��Zej2de
ddfd��Zy)r�a
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        r�r��
compatibler�r�r�r�r�r��	arbitrary)�~=r�r�r�r�rUr��===r�rFr c
���djttjtt|���dd�}|dz
}|j
d�||�xr|j
d�||�S)N�.����.*r�r�)�join�list�	itertools�	takewhile�_is_not_suffix�_version_splitrj)r#r�rF�prefixs    r�_compare_compatiblezSpecifier._compare_compatible�s{�������$�$�^�^�D�5I�J�K�C�R�P�
��
	�$���'�t�!�!�$�'��T�:�
�?W�t�?Q�?Q�RV�?W���@
�	
rc�8�|jd�rYt|j�}t|dd�}tt	|��}|dt|�}t
||�\}}||k(St|�}|jst|j�}||k(S)Nr����)�endswithr�publicr�r;�len�_pad_version�local)	r#r�rF�
split_spec�split_prospective�shortened_prospective�padded_spec�padded_prospective�spec_versions	         rr�zSpecifier._compare_equal�s����=�=���!�+�"4�"4�5�K�(��S�b�	�2�J�
!/�s�;�/?� @��
%6�6G��J��$H�!�/;��1�/�+�K�+�&��4�4�#�4�=�L�
 �%�%�%�k�&8�&8�9���,�.�.rc�(�|j||�Sr8)r�r�s   rr�zSpecifier._compare_not_equal�s���&�&�{�D�9�9�9rc�D�t|j�t|�kSr8�rr�r�s   rr�z"Specifier._compare_less_than_equal�s���{�)�)�*�g�d�m�;�;rc�D�t|j�t|�k\Sr8r�r�s   rr�z%Specifier._compare_greater_than_equal�s���{�)�)�*�g�d�m�;�;r�spec_strc��t|�}||ksy|js8|jr,t|j�t|j�k(ryy�NFT)rr}�base_version�r#r�r�rFs    rr�zSpecifier._compare_less_than�sT��
�x� ��
�T�!���!�!�k�&?�&?��{�/�/�0�G�D�<M�<M�4N�N��
rc��t|�}||kDsy|js8|jr,t|j�t|j�k(ry|j�,t|j�t|j�k(ryyr�)r�is_postreleaser�r�r�s    rr�zSpecifier._compare_greater_thans���
�x� ��
�T�!���"�"�{�'A�'A��{�/�/�0�G�D�<M�<M�4N�N�����(��{�/�/�0�G�D�<M�<M�4N�N��
rc�h�t|�j�t|�j�k(Sr8)r;�lowerr�s   r�_compare_arbitraryzSpecifier._compare_arbitrary%s&���;��%�%�'�3�t�9�?�?�+<�<�<rc��|j�|jS|j\}}|dvr1|dk(r|jd�r|dd}t|�jryy)N)r�r�r�r�r�r�r�r�TF)rOrNr�rr})r#rIrJs   rr-zSpecifier.prereleases(sl��
���(��$�$�$�
!�J�J���'��6�6��4��G�$4�$4�T�$:�!�#�2�,���W�~�+�+��rr.Nc��||_yr8rsr0s  rr-zSpecifier.prereleasesArur)rrrr�r�r�r�r�rErDr�r�r;r>r�r�r�r�r�r�r�rr�r�r-r@rrrr�r�+s���[�J�z�R�Z�Z��*�,�w�6��
�
�R�]�]�8R�
S�F�����"�
�
��	�J��
�}�
�C�
�D�
��
�*�%/�-�%/�s�%/�t�%/��%/�N�:�m�:�3�:�4�:��:��<�M�<��<�QU�<��<��<�(�<�03�<�	
�<��<���m��s��t����2����#��RV����>=�g�=�S�=�T�=���T����0���"��"�$�"��"rz^([0-9]+)((?:a|b|c|rc)[0-9]+)$rJc���g}|jd�D]J}tj|�}|r |j|j	���:|j|��L|S)Nr�)�split�
_prefix_regexrK�extend�groupsr�)rJ�resultr1rPs    rr�r�IsR���F��
�
�c�"���$�$�T�*����M�M�%�,�,�.�)��M�M�$��#��Mr�segmentc�.��t�fd�dD��S)Nc3�@�K�|]}�j|����y�wr8)�
startswith)�.0r�r�s  �r�	<genexpr>z!_is_not_suffix.<locals>.<genexpr>Us!������1P�v����6�"�1P�s�)�dev�a�b�rc�post)�any)r�s`rr�r�Ts"�����1P����r�left�rightc��gg}}|jttjd�|���|jttjd�|���|j|t	|d�d�|j|t	|d�d�|jddgt
dt	|d�t	|d�z
�z�|jddgt
dt	|d�t	|d�z
�z�ttj|��ttj|��fS)Nc�"�|j�Sr8��isdigit��xs r�<lambda>z_pad_version.<locals>.<lambda>^s
�����rc�"�|j�Sr8rrs rrz_pad_version.<locals>.<lambda>_s
��!�)�)�+rrr�0)r�r�r�r�r��insert�max�chain)r�r�
left_split�right_splits    rr�r�Zs"�� �"��J����d�9�.�.�/D�d�K�L�M����t�I�/�/�0E�u�M�N�O����d�3�z�!�}�-�/�0�1����u�S��Q��0�2�3�4����a�#���Q��K��N�(;�c�*�Q�-�>P�(P�!Q�Q�R����q�3�%�#�a��Z��]�);�c�+�a�.�>Q�)Q�"R�R�S�����*�-�.��Y�_�_�k�5R�0S�T�Trc�8�eZdZ	ddedeeddfd�Zdefd�Zdefd�Zde	fd�Z
d	edefddfd
�Zd	e
defd�Zde	fd�Zdeefd
�Zedeefd��Zej*deddfd��Zdedefd�Z	ddedeedefd�Z	ddeedeedeefd�Zy)�SpecifierSetN�
specifiersr-r c�`�|jd�D�cgc]#}|j�s�|j���%}}t�}|D]}	|jt	|���t|�|_||_	ycc}w#t
$r|jt
|��Y�bwxYw)N�,)
r�rM�set�addr�rr��	frozenset�_specsrO)r#rr-�s�split_specifiers�parsed�	specifiers       rrQzSpecifierSet.__init__ms���0:�/?�/?��/D�R�/D�!����	�A�G�G�I�/D��R�-0�E��)�I�
7��
�
�9�Y�/�0�*� ��'���(����!S��$�
7��
�
�?�9�5�6�
7�s�B�B�B�#B-�,B-c�^�|j�d|j��nd}dt|��|�d�S)NrSrTz<SpecifierSet(rW)rOr-r;rYs  rr[zSpecifierSet.__repr__�sD��� � �,��T�-�-�0�1��	� ��D�	�}�S�E��4�4rc�X�djtd�|jD���S)Nrc3�2K�|]}t|����y�wr8)r;�r�rs  rr�z'SpecifierSet.__str__.<locals>.<genexpr>�s����;�{�!�s�1�v�{�s�)r��sortedrr"s rr$zSpecifierSet.__str__�s ���x�x��;�t�{�{�;�;�<�<rc�,�t|j�Sr8)rarr"s rr'zSpecifierSet.__hash__�����D�K�K� � rr(c���t|t�rt|�}nt|t�stSt�}t	|j
|j
z�|_|j�|j�|j|_|S|j�|j�|j|_|S|j|jk(r|j|_|Std��)NzFCannot combine SpecifierSets with True and False prerelease overrides.)rcr;rrdrrrO�
ValueError)r#r(rs   r�__and__zSpecifierSet.__and__�s����e�S�!� ��'�E��E�<�0�!�!� �N�	�$�T�[�[�5�<�<�%?�@�	�����$��);�);�)G�%*�%7�%7�I�"����
�
�
*�u�/A�/A�/I�%)�%6�%6�I�"����
�
�%�"4�"4�
4�%)�%6�%6�I�"������
rc��t|ttf�rtt|��}nt|t�stS|j
|j
k(Sr8)rcr;rCrrdrr*s  rr+zSpecifierSet.__eq__�sC���e�c�#7�8�9� ��U��,�E��E�<�0�!�!��{�{�e�l�l�*�*rc�,�t|j�Sr8)r�rr"s r�__len__zSpecifierSet.__len__�s���4�;�;��rc�,�t|j�Sr8)�iterrr"s r�__iter__zSpecifierSet.__iter__�r"rc��|j�|jS|jsytd�|jD��S)Nc3�4K�|]}|j���y�wr8�r-rs  rr�z+SpecifierSet.prereleases.<locals>.<genexpr>�s����6�+�Q�1�=�=�+�s�)rOrr�r"s rr-zSpecifierSet.prereleases�s?��
���(��$�$�$�
�{�{���6�$�+�+�6�6�6rr.c��||_yr8rsr0s  rr-zSpecifierSet.prereleases�rurr1c�$�|j|�Sr8rwrxs  rryzSpecifierSet.__contains__�rzrc����t�ttf�st�����|j��s
�j
ryt
��fd�|jD��S)NFc3�D�K�|]}|j�������y�w)r.Nrw)r�rr1r-s  ��rr�z(SpecifierSet.contains.<locals>.<genexpr>�s�����R�k��1�:�:�d��:�<�k�s� )rcrrrr-r}�allrr3s ``rr4zSpecifierSet.contains�sW���
�$��� 8�9���;�D�
���*�*�K��t�1�1���R�d�k�k�R�R�Rrr5c��|�|j}|jr/|jD]}|j|t|���}� |Sg}g}|D]k}t	|t
tf�st|�}n|}t	|t
�r�8|jr|s|r�I|j|��[|j|��m|s|r|�|S|S)Nr.)
r-rr7r>rcrrrr}r�)r#r5r-rF�filteredr�r1r�s        rr7zSpecifierSet.filter�s������*�*�K�
�;�;������;�;�x�T�+�=N�;�O��$��O�
.0�H�68��
!��!�$���(@�A�%*�4�[�N�%)�N��n�m�<��"�/�/��#�)�0�0��6��O�O�D�)�#!�*� 1�k�6I�(�(��Orr�r8)rrrr;rr>rQr[r$r<r'r
r%r=r+r(rrCr+r�r-r@r�ryr4rrr7rrrrrlsP��BF�(��(�19�$��(�	
�(�05�#�5�=��=�!�#�!��U�>�3�#6�7��N��.+�F�+�t�+� �� �!�(�#7�8�!��7�X�d�^�7��7�"���"��"�$�"��"�#��#�T�#�DH�S�#�S�2:�4�.�S�	
�S�<QU�3� ��0�3�?G��~�3�	�.�	!�3rr)+r9r�r�r�r��typingrrrrrrr	r
rrr
�utilsrrJrrrr�r;r�rr>r�r$r�ABCMetarrCr�r�r�r�r�r�r�r�rrrr�<module>r9s{��
���	������(�2�2��g�}�,�-�
�����3�4���)��A���]�C�0�$�6�7���z��0�c�k�k�0�fF�=�F�R98�*�98�x	��+�}�c�2�D�8�9�	�
�{�M�3�/��5�6�	�X"�$�X"�v��
�
�<�=�
��C��D��I���C��D��U�t�C�y�U��c��U�u�T�#�Y��S�	�=Q�7R�U�$v�=�vrpython3.12/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-312.pyc000064400000013436151732701530023347 0ustar00�

R`ih�	�T�ddlZddlmZmZmZmZmZddlmZm	Z	ddl
mZmZeedee
effZede�ZGd�d	e�ZGd
�de�Zej(d�Zej(d
�Zdedefd�Zdeeefdefd�Zdedeeeeeeffd�Zdedeeeffd�Zy)�N)�	FrozenSet�NewType�Tuple�Union�cast�)�Tag�	parse_tag)�InvalidVersion�Version��NormalizedNamec��eZdZdZy)�InvalidWheelFilenamezM
    An invalid wheel filename was found, users should refer to PEP 427.
    N��__name__�
__module__�__qualname__�__doc__r
���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/utils.pyrr���rrc��eZdZdZy)�InvalidSdistFilenamez^
    An invalid sdist filename was found, users should refer to the packaging user guide.
    Nrr
rrrrrrrz[-_.]+z	(\d+)(.*)�name�returnc�j�tjd|�j�}tt|�S)N�-)�_canonicalize_regex�sub�lowerrr)r�values  r�canonicalize_namer# s*���#�#�C��.�4�4�6�E����&�&r�versionc
���t|t�r
	t|�}n|}g}|jdk7r|j|j�d��|jt
jdddjd�|jD����|j�1|jdjd�|jD���|j�|jd|j���|j�|jd	|j���|j�|jd
|j���dj|�S#t$r|cYSwxYw)z�
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    r�!z(\.0)+$��.c3�2K�|]}t|����y�w�N��str��.0�xs  r�	<genexpr>z'canonicalize_version.<locals>.<genexpr><s����0P��A��Q�����c3�2K�|]}t|����y�wr*r+r-s  rr0z'canonicalize_version.<locals>.<genexpr>@s����8�Z��S��V�Z�r1z.postz.dev�+)�
isinstancer,rr�epoch�append�rer �join�release�pre�post�dev�local)r$�parsed�partss   r�canonicalize_versionr@&s5��
�'�3��	��W�%�F�
���E��|�|�q��
������~�Q�'�(�
�L�L����
�B����0P����0P�(P�Q�R��z�z��
���R�W�W�8�V�Z�Z�8�8�9��{�{��
���u�V�[�[�M�*�+��z�z��
���t�F�J�J�<�(�)��|�|��
���q�����'�(�
�7�7�5�>���A�	��N�	�s�E!�!E/�.E/�filenamec�j�|jd�std|����|dd}|jd�}|dvrtd|����|jd|dz
�}|d}d	|vs%t	j
d
|tj��td|����t|�}t|d�}|d
k(rh|d}tj|�}|�td|�d|�d���ttt|jd��|jd�f�}nd}t|d�}	||||	fS)Nz.whlz3Invalid wheel filename (extension must be '.whl'): ���r)��z0Invalid wheel filename (wrong number of parts): �r�__z^[\w\d._]*$zInvalid project name: rrEzInvalid build number: z in '�'r
���)�endswithr�count�splitr7�match�UNICODEr#r�_build_tag_regexr�BuildTag�int�groupr
)
rA�dashesr?�	name_partrr$�
build_part�build_match�build�tagss
          r�parse_wheel_filenamerYQs`�����V�$�"�A�(��L�
�	
����}�H�
�^�^�C�
 �F�
�V��"�>�x�j�I�
�	
�
�N�N�3���
�+�E��a��I��y��B�H�H�^�Y��
�
�K�S�"�%;�H�:�#F�G�G��Y�'�D��e�A�h��G�
��{��1�X�
�&�,�,�Z�8����&�(���E�(��1�E��
��X��K�$5�$5�a�$8� 9�;�;L�;L�Q�;O�P�Q�����U�2�Y��D��'�5�$�'�'rc� �|jd�r|dtd�}n/|jd�r|dtd�}ntd|����|jd�\}}}|std|����t	|�}t|�}||fS)Nz.tar.gzz.zipz@Invalid sdist filename (extension must be '.tar.gz' or '.zip'): rzInvalid sdist filename: )rJ�lenr�
rpartitionr#r)rA�	file_stemrT�sep�version_partrr$s       r�parse_sdist_filenamer`us�������#��.��I���/�	�	�	�	�6�	"��^��F��|�,�	�"���z�
�
�	
�$-�#7�#7��#<� �I�s�L��"�%=�h�Z�#H�I�I��Y�'�D��l�#�G��'�?�r)r7�typingrrrrrrXr	r
r$rrrQr,rPr�
ValueErrorrr�compilerrOr#r@rYr`r
rr�<module>rds���

�9�9� �,���r��E�#�s�(�O�+�,���)�3�/���:���:��!�b�j�j��+���2�:�:�l�+��'�C�'�N�'�(�%����"5�(�#�(�V!(��!(�
�>�7�H�i��n�<�=�!(�H�3��5���1H�+I�rpython3.12/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-312.pyc000064400000044724151732701530023151 0ustar00�

R`iS=�
�b�UddlZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZmZej(e�Ze
eZeeefZdddd	d
d�Zeeefed<ej:d
kZGd�d�Zdedeefd�Z d4dede!deeedffd�Z"dedefd�Z#dede!fd�Z$d4dede!deefd�Z%			d5dd�deedee	edee	ede!de
ef
d �Z&de
efd!�Z'			d5dd�d"eedee	edee	ede!de
ef
d#�Z(dede
efd$�Z)			d5deed"eedee	ede
efd%�Z*efd&ed'e!defd(�Z+d)ed*edeefd+�Z,	d6d)eed&eede
efd,�Z-efd'e!de
efd-�Z.de
efd.�Z/de
efd/�Z0defd0�Z1dd�de!defd1�Z2d)edefd2�Z3dd�de!de
efd3�Z4y)7�N)�EXTENSION_SUFFIXES)
�Dict�	FrozenSet�Iterable�Iterator�List�Optional�Sequence�Tuple�Union�cast�)�
_manylinux�
_musllinux�py�cp�pp�ip�jy)�python�cpython�pypy�
ironpython�jython�INTERPRETER_SHORT_NAMESlc��eZdZdZgd�Zdedededdfd�Zedefd	��Zedefd
��Z	edefd��Z
dedefd
�Z
defd�Zdefd�Zdefd�Zy)�Tagz�
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    )�_interpreter�_abi�	_platform�_hash�interpreter�abi�platform�returnNc���|j�|_|j�|_|j�|_t	|j|j|jf�|_y�N)�lowerrrr �hashr!)�selfr"r#r$s    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/tags.py�__init__zTag.__init__4sS��'�-�-�/����I�I�K��	�'����)����4�,�,�d�i�i����H�I��
�c��|jSr')r�r*s r+r"zTag.interpreter?s��� � � r-c��|jSr')rr/s r+r#zTag.abiCs���y�y�r-c��|jSr')r r/s r+r$zTag.platformGs���~�~�r-�otherc��t|t�stS|j|jk(xrO|j|jk(xr4|j
|j
k(xr|j|jk(Sr')�
isinstancer�NotImplementedr!r rr)r*r2s  r+�__eq__z
Tag.__eq__Ksn���%��%�!�!��Z�Z�5�;�;�
&�
:����5�?�?�2�
:����e�j�j�(�
:��"�"�e�&8�&8�8�		
r-c��|jSr')r!r/s r+�__hash__zTag.__hash__Vs���z�z�r-c�R�|j�d|j�d|j��S)N�-)rrr r/s r+�__str__zTag.__str__Ys)���#�#�$�A�d�i�i�[��$�.�.�1A�B�Br-c�&�d|�dt|��d�S)N�<z @ �>)�idr/s r+�__repr__zTag.__repr__\s���4�&��B�t�H�:�Q�'�'r-)�__name__�
__module__�__qualname__�__doc__�	__slots__�strr,�propertyr"r#r$�object�boolr6�intr8r;r@�r-r+rr*s����?�I�	J�C�	J�c�	J�S�	J�T�	J��!�S�!��!���S������#����	
�F�	
�t�	
��#��C��C�(�#�(r-r�tagr%c
��t�}|jd�\}}}|jd�D]J}|jd�D]4}|jd�D]}|jt|||��� �6�Lt	|�S)z�
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    r:�.)�set�split�addr�	frozenset)rL�tags�interpreters�abis�	platformsr"r#�	platform_s        r+�	parse_tagrX`sz���5�D�$'�I�I�c�N�!�L�$�	�#�)�)�#�.���:�:�c�?�C�&�_�_�S�1�	�����[�#�y�9�:�2�#�/��T�?�r-F�name�warnc�d�tj|�}|�|rtjd|�|S)Nz>Config variable '%s' is unset, Python ABI tag may be incorrect)�	sysconfig�get_config_var�logger�debug)rYrZ�values   r+�_get_config_varraps1���$�$�T�*�E��}�����L�d�	
��Lr-�stringc�F�|jdd�jdd�S)NrN�_r:)�replace)rbs r+�_normalize_stringrfys ���>�>�#�s�#�+�+�C��5�5r-�python_versionc�>�t|�dkDxrt|�dk\S)zj
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    r)��)�len�tuple)rgs r+�
_abi3_appliesrm}s#���~���"�F�u�^�'<��'F�Fr-�
py_versionc	��t|�}g}t|dd�}dx}x}}td|�}ttd�}dt
v}	|s|�|s|	rd}|dkr@td|�}
|
s|
�d	}|d
kr?td|�}|dk(s|�,tjd
k(rd}n|r|jd|���|jddj||||���|S)Nrj��Py_DEBUG�gettotalrefcountz_d.pyd�d)ri��
WITH_PYMALLOC�m)riri�Py_UNICODE_SIZE�i���urrz"cp{version}{debug}{pymalloc}{ucs4})�versionr_�pymalloc�ucs4)
rl�_version_nodotra�hasattr�sysr�
maxunicode�append�insert�format)rnrZrUrzr_r{r|�
with_debug�has_refcount�has_ext�
with_pymalloc�unicode_sizes            r+�
_cpython_abisr��s���z�"�J�
�D��Z���^�,�G� � �E� �H�t� ��T�2�J��3� 2�3�L��,�,�G��j�(�l�g����F��'���>�
��M�1��H����*�+<�d�C�L��q� ��$����8�)C���	�	
���b��	�N�#��K�K�	�,�3�3��5�8�$�	4�	
���Kr-�rZrUrVc#��K�|stjdd}dt|dd����|�t|�dkDr
t	||�}ng}t|�}dD]}	|j
|��t|xs
t��}|D]}|D]}t�||�����t|�r�fd�|D�Ed{����fd�|D�Ed{���t|�rOt|ddz
dd�D]8}|D]1}d	jt|d
|f����t�d|����3�:yy#t$rY��wxYw7��7�p�w)
a
    Yields the tags for a CPython interpreter.

    The tags consist of:
    - cp<python_version>-<abi>-<platform>
    - cp<python_version>-abi3-<platform>
    - cp<python_version>-none-<platform>
    - cp<less than python_version>-abi3-<platform>  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    Nrjrr)�abi3�nonec3�8�K�|]}t�d|����y�w)r�N�r��.0rWr"s  �r+�	<genexpr>zcpython_tags.<locals>.<genexpr>�s�����S��I�C��V�Y�7����c3�8�K�|]}t�d|����y�w)r�Nr�r�s  �r+r�zcpython_tags.<locals>.<genexpr>�s�����O�Y�	��K���3�Y�r����zcp{version}r�rzr�)
r�version_infor}rkr��list�remove�
ValueError�
platform_tagsrrm�ranger�)	rgrUrVrZ�explicit_abir#rW�
minor_versionr"s	        @r+�cpython_tagsr��se�����,��)�)�"�1�-���~�n�R�a�&8�9�:�;�K��|��~���"� ���6�D��D���:�D�(��	��K�K��%�)��Y�1�-�/�2�I���"�I��k�3�	�2�2�#���^�$�S��S�S�S�O�Y�O�O�O��^�$�"�>�!�#4�q�#8�!�R�@�M�&�	�+�2�2�*�N�1�,=�}�+M�N�3����+�v�y�9�9�	'�A�%���	��	��	T��O�sJ�AE�D-�+AE�:D<�;E�
D>�AE�-	D9�6E�8D9�9E�>Ec#�VK�tjd�}|rt|���yy�w)N�SOABI)r\r]rf)r#s r+�_generic_abir��s)����
�
"�
"�7�
+�C�
���$�$��s�')r"c#�"K�|s)t�}t|��}dj||g�}|�
t�}t	|xs
t��}t	|�}d|vr|j
d�|D]}|D]}t|||�����y�w)z�
    Yields the tags for a generic interpreter.

    The tags consist of:
    - <interpreter>-<abi>-<platform>

    The "none" ABI will be added if it was not explicitly provided.
    r�rpNr�)�interpreter_name�interpreter_version�joinr�r�r�r�r)r"rUrVrZ�interp_name�interp_versionr#rWs        r+�generic_tagsr��s������&�(��,�$�7���g�g�{�N�;�<���|��~���Y�1�-�/�2�I���:�D�
�T�����F����"�I��k�3�	�2�2�#��s�B
Bc#��K�t|�dkDrdt|dd�����d|d����t|�dkDr.t|ddz
dd�D]}dt|d|f������yy�w)z�
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    rrNrjrr�)rkr}r�)rn�minors  r+�_py_interpreter_ranger�s������:�����>�*�R�a�.�1�2�3�3��z�!�}�o�
��
�:�����:�a�=�1�,�b�"�5�E��~�z�!�}�e�&<�=�>�?�?�6��s�A)A+c#�K�|stjdd}t|xs
t��}t	|�D]}|D]}t|d|�����|rt|dd���t	|�D]}t|dd����y�w)z�
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-<platform>
    - <interpreter>-none-any  # ... if `interpreter` is provided.
    - py*-none-any
    Nrjr��any)rr�r�r�r�r)rgr"rVrzrWs     r+�compatible_tagsr�s�������)�)�"�1�-���Y�1�-�/�2�I�(��8��"�I��g�v�y�1�1�#�9���+�v�u�-�-�(��8���'�6�5�)�)�9�s�BB�arch�is_32bitc�0�|s|S|jd�ryy)N�ppc�i386)�
startswith)r�r�s  r+�	_mac_archr�/s��������u���r-rz�cpu_archc�d�|g}|dk(r|dkrgS|jgd��nb|dk(r|dkrgS|jgd��nB|dk(r|dkDs|dkrgS|jd�n|d	k(r|d
kDrgS|jddg�|d
vr|jd�|dvr|jd�|S)N�x86_64)�
rx)�intel�fat64�fat32r�)r�r��fat�ppc64)r��r�r�)r��r�r�>�arm64r��
universal2>r�r�r�r�r��	universal)�extendr�)rzr��formatss   r+�_mac_binary_formatsr�9s����j�G��8���W���I����2�3�	�V�	��W���I����0�1�	�W�	��W���'� 1��I����w��	�U�	��W���I������'�(��&�&����|�$��>�>����{�#��Nr-c#�K�tj�\}}}|�6tdtt	t
|j
d�dd���}n|}|�t|�}n|}d|krG|dkrBt|ddd�D]/}d	|f}t||�}|D]}d
jd	||������1|dk\rBt|dd	d�D]/}	|	df}t||�}|D]}d
j|	d|������1|dk\r�|d
k(rFtddd�D]5}d	|f}t||�}|D]}d
j|d|d|����� �7ytddd�D]$}d	|f}d}d
j|d|d|�����&yy�w)aD
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    N�
MacVersionrNrj)r�r)�rrr�r�z&macosx_{major}_{minor}_{binary_format})�majorr��
binary_formatrr��rir�)r$�mac_verr
rl�maprJrPr�r�r�r�)
rzr��version_strrdr�r��compat_version�binary_formatsr��
major_versions
          r+�
mac_platformsr�Ys����� (�/�/�1��K��H����|�U�3�s�K�4E�4E�c�4J�2�A�4N�+O�%P�Q�����|���"�����'��g��/�#�7�1�:�r�2�6�M���.�N�0���F�N�!/�
�>�E�E��M��F���"0�7��'��#�7�1�:�r�2�6�M�*�A�-�N�0���F�N�!/�
�>�E�E�'�q�
�F���"0�7��'���8��!&�r�1�b�!1�
�!#�]�!2��!4�^�T�!J��%3�M�B�I�I�,�Q�/�,�Q�/�&3�J���&4�"2�"'�r�1�b�!1�
�!#�]�!2�� ,�
�>�E�E�(��+�(��+�"/�F���"2�'�s�E<E>c#�K�ttj��}|r|dk(rd}n|dk(rd}|jdd�\}}t	j
||�Ed{���t
j
|�Ed{���|��y7�&7��w)N�linux_x86_64�
linux_i686�
linux_aarch64�linux_armv7lrdr)rfr\�get_platformrPrr�r)r��linuxrdr�s    r+�_linux_platformsr��s������i�4�4�6�7�E���N�"� �E�
�o�
%�"�E��k�k�#�q�!�G�A�t��'�'��t�4�4�4��'�'��-�-�-�
�K�5��-�s$�AB
�B� B
�<B�=
B
�B
c#�JK�ttj����y�wr')rfr\r�rKr-r+�_generic_platformsr��s����
�I�2�2�4�
5�5�s�!#c��tj�dk(r
t�Stj�dk(r
t�St	�S)z;
    Provides the platform tags for this installation.
    �Darwin�Linux)r$�systemr�r�r�rKr-r+r�r��s<������H�$����	���	�g�	%��!�!�!�#�#r-c�h�tjj}tj	|�xs|S)z6
    Returns the name of the running interpreter.
    )r�implementationrYr�get)rYs r+r�r��s+�����"�"�D�"�&�&�t�,�4��4r-c�v�td|��}|r
t|�}|Sttjdd�}|S)z9
    Returns the version of the running interpreter.
    �py_version_nodotr�Nrj)rarFr}rr�)rZrzs  r+r�r��sB���0�t�<�G���g�,���N�!��!1�!1�"�1�!5�6���Nr-c�@�djtt|��S)Nrp)r�r�rFr�s r+r}r}�s��
�7�7�3�s�G�$�%�%r-c#��K�t�}|dk(rt|��Ed{���nt�Ed{���|dk(rtd��Ed{���yt�Ed{���y7�D7�37�7��w)z�
    Returns the sequence of tag triples for the running interpreter.

    The order of the sequence corresponds to priority order for the
    interpreter, from most to least important.
    rr�Nr�pp3)r")r�r�r�r�)rZr�s  r+�sys_tagsr��sf����#�$�K��d���T�*�*�*��>�!�!��d��"�u�5�5�5�"�$�$�$�	+��!��	6��$�sC�A.�A&�A.�A(�A.�
A*�A.� A,�!A.�(A.�*A.�,A.)F)NNN)NN)5�loggingr$rr\�importlib.machineryr�typingrrrrrr	r
rrr
rprr�	getLoggerrAr^rJ�
PythonVersionr�rrF�__annotations__�maxsize�_32_BIT_INTERPRETERrrXrIrarfrmr�r�r�r�r�r�r�r�r�r�r�r�r�r�r}r�rKr-r+�<module>r�sW��
��
��2����%�	��	�	�8�	$����
�
�
�3��8�_�
������+���c�3�h����k�k�W�,��3(�3(�l
�3�
�9�S�>�
� �#��T��e�C��d�N�6K��6�c�6�c�6�G�-�G�D�G�!�m�!�4�!�D��I�!�J/3�$(�)-�6:�
�6:��]�+�6:�
�8�C�=�
!�6:����
�&�6:�
�6:��c�]�
6:�r%�h�s�m�%�"&�$(�)-�3�
�3��#��3�
�8�C�=�
!�3����
�&�3�
�3��c�]�
3�<@�m�@���
�@� /3�!%�)-�*��]�+�*��#��*����
�&�*��c�]�	*�2+>��C��4��#�����s��t�C�y��BAE�E�
�j�
!�E�08��
�E�
�c�]�E�P':�
�t�
�h�s�m�
�6�H�S�M�6�	$�x��}�	$�5�#�5�).�	��	�#�	�&�M�&�c�&�#�%�d�%�x��}�%r-python3.12/site-packages/pip/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc000064400000027511151732701530024371 0ustar00�

R`i�,����UddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
Gd�d�Zdeefd�Zdefd�Zdefd�Zd	edefd
�Zej*d��Ze	eefed<Gd
�de�Zdeefd�Zdeefd�Zdeefd�Zdede
eeffd�Zej<�de
eeffd��Zded	ededefd�Z dddd�Z!ded	ede
efd�Z"y)�N)�IO�Dict�Iterator�
NamedTuple�Optional�Tuplec�h�eZdZGd�de�ZdZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
eeddfd�Zy)�_ELFFileHeaderc��eZdZdZy)�$_ELFFileHeader._InvalidELFFileHeaderz7
        An invalid ELF file header was found.
        N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/packaging/_manylinux.py�_InvalidELFFileHeaderrs��	rriFLE�����(�>l~ii�file�returnNc�f��dtdtf�fd�}|d�|_|j|jk7rtj��|d�|_|j|j|jhvrtj��|d�|_	|j|j|jhvrtj��|d�|_|d�|_
|d�|_�jd�|_|j|jk(rdnd}|j|jk(rd	nd}|j|jk(rd
nd}|j|jk(r|n|}||�|_||�|_||�|_||�|_||�|_||�|_||�|_||�|_||�|_||�|_||�|_||�|_||�|_y)N�fmtrc����	�jtj|��}tj||�}|dS#tj$rt
j
��wxYw)Nr)�read�struct�calcsize�unpack�errorr
r)r�data�resultrs   �rr#z'_ELFFileHeader.__init__.<locals>.unpack$s_���
=��y�y�����!5�6��*0�-�-��T�*B���!�9����<�<�
=�$�:�:�<�<�
=�s�:A�(A*z>I�B�z<Hz>Hz<Iz<Qz>Q)�str�int�
e_ident_magic�ELF_MAGIC_NUMBERr
r�
e_ident_class�
ELFCLASS32�
ELFCLASS64�e_ident_data�ELFDATA2LSB�ELFDATA2MSB�e_ident_version�
e_ident_osabi�e_ident_abiversionr �e_ident_pad�e_type�	e_machine�	e_version�e_entry�e_phoff�e_shoff�e_flags�e_ehsize�e_phentsize�e_phnum�e_shentsize�e_shnum�
e_shstrndx)�selfrr#�format_h�format_i�format_q�format_ps `     r�__init__z_ELFFileHeader.__init__#s����	��	��	�$�D�\�������!6�!6�6� �6�6�8�8�#�C�[������d�o�o�t���%G�G� �6�6�8�8�"�3�K������T�%5�%5�t�7G�7G�$H�H� �6�6�8�8�%�c�{���#�C�[���"(��+����9�9�Q�<����,�,��0@�0@�@�4�d���,�,��0@�0@�@�4�d���,�,��0@�0@�@�4�d��#�1�1�T�_�_�D�8�(���X�&�����)�����)����h�'����h�'����h�'����h�'����x�(��
�!�(�+����h�'���!�(�+����h�'��� ��*��r)r
rr�
ValueErrorrr,r.r/r1r2�EM_386�EM_S390�EM_ARM�	EM_X86_64�EF_ARM_ABIMASK�EF_ARM_ABI_VER5�EF_ARM_ABI_FLOAT_HARDr�bytesrIrrrr
r
se���
��
"���J��J��K��K�
�F��G�
�F��I��N� �O�&��&+�R��Y�&+�4�&+rr
rc���	ttjd�5}t|�}ddd�|S#1swYSxYw#tt
tjf$rYywxYw)N�rb)�open�sys�
executabler
�OSError�	TypeErrorr)�f�
elf_headers  r�_get_elf_headerr\Ls\���
�#�.�.�$�
'�1�'��*�J�(���	(����
�Y�� D� D�E����s#�?�2�?�<�?�?�A �A c�f�t�}|�y|j|jk(}||j|jk(z}||j
|jk(z}||j|jz|jk(z}||j|jz|jk(z}|S�NF)r\r-r.r0r1r8rMr=rOrPrQ�r[r&s  r�_is_linux_armhfr`Us���!�"�J����
�
%�
%��)>�)>�
>�F�
�j�%�%��)?�)?�?�?�F�
�j�"�"�j�&7�&7�7�7�F�
����Z�6�6�6�	�	#�	#�$�$�F�����Z�=�=�=�	�	)�	)�*�*�F��Mrc���t�}|�y|j|jk(}||j|jk(z}||j
|jk(z}|Sr^)r\r-r.r0r1r8rKr_s  r�_is_linux_i686rbhsd�� �"�J����
�
%�
%��)>�)>�
>�F�
�j�%�%��)?�)?�?�?�F�
�j�"�"�j�&7�&7�7�7�F��Mr�archc�F�|dk(r
t�S|dk(r
t�S|dvS)N�armv7l�i686>�ppc64�s390x�x86_64�aarch64�ppc64le)r`rb)rcs r�_have_compatible_abirlrs/���x��� � ��v�~�����E�E�Erc��y)N�2rrrr�<lambda>ros��Br�_LAST_GLIBC_MINORc�"�eZdZUeed<eed<y)�
_GLibCVersion�major�minorN)r
rrr*�__annotations__rrrrrrr�s���J��Jrrrc��	tjd�}|�J�|j�\}}|S#ttt
tf$rYywxYw)zJ
    Primary implementation of glibc_version_string using os.confstr.
    �CS_GNU_LIBC_VERSIONN)�os�confstr�split�AssertionError�AttributeErrorrXrJ)�version_string�_�versions   r�_glibc_version_string_confstrr��sX������$9�:���)�)�)�#�)�)�+�
��7��N��
�N�G�Z�@����s�,0�A�Ac��	ddl}	|jd�}	|j}|j|_|�}t|t�s|jd�}|S#t$rYywxYw#t$rYywxYw#t
$rYywxYw)zG
    Fallback implementation of glibc_version_string using ctypes.
    rN�ascii)�ctypes�ImportError�CDLLrX�gnu_get_libc_versionr|�c_char_p�restype�
isinstancer)�decode)r��process_namespacer��version_strs    r�_glibc_version_string_ctypesr��s�����"�"�K�K��-���0�E�E��$*�?�?�� �+�-�K��k�3�'�!�(�(��1�����G�����$�����
����s3�A �A/�A>� 	A,�+A,�/	A;�:A;�>	B
�	B
c�.�t�xs
t�S)z9Returns glibc version string, or None if not using glibc.)r�r�rrr�_glibc_version_stringr��s��(�*�L�.J�.L�Lrr�c���tjd|�}|stjd|zt�yt|j
d��t|j
d��fS)a3Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    z$(?P<major>[0-9]+)\.(?P<minor>[0-9]+)z=Expected glibc version with 2 components major.minor, got: %s����r�rsrt)�re�match�warnings�warn�RuntimeWarningr*�group)r��ms  r�_parse_glibc_versionr��s`��	���8�+�F�A���
�
�
�$�
%��	
�
��q�w�w�w�� �#�a�g�g�g�&6�"7�7�7rc�2�t�}|�yt|�S)Nr�)r�r�)r�s r�_get_glibc_versionr��s��'�)�K������,�,r�namerc���t�}||kry	ddl}t|d�r'|j	|d|d|�}|�t|�Sy|t
dd�k(r!t|d�rt|j�S|t
dd	�k(r!t|d
�rt|j�S|t
dd�k(r!t|d�rt|j�Sy#t$rYywxYw)
NFrT�manylinux_compatiblerr��manylinux1_compatible��manylinux2010_compatible��manylinux2014_compatible)
r��
_manylinuxr��hasattrr��boolrrr�r�r�)r�rcr�	sys_glibcr�r&s      r�_is_compatibler��s���"�$�I��7������z�1�2��0�0����W�Q�Z��N������<����-��1�%�%��:�6�7��
�8�8�9�9��-��2�&�&��:�9�:��
�;�;�<�<��-��2�&�&��:�9�:��
�;�;�<�<���!����s�C�	C&�%C&�
manylinux2014�
manylinux2010�
manylinux1))rr�)rr�)rr��linuxc#�K�t|�sytdd�}|dvrtdd�}tt��}|g}t|jdz
dd�D]&}t
|}|j
t||���(|D]�}|j|jk(r
|j}nd}t|j|d�D]|}t|j|�}	dj|	�}
t|
||	�r|jd|
���|	tvs�Rt|	}t|||	�s�i|jd|����~��y�w)	Nr�>rfri�rr�zmanylinux_{}_{}r�)rlrrr��rangersrp�appendrt�formatr��replace�_LEGACY_MANYLINUX_MAP)r�rc�too_old_glibc2�
current_glibc�glibc_max_list�glibc_major�glibc_minor�	glibc_max�	min_minor�
glibc_version�tag�
legacy_tags            r�
platform_tagsr�s>������%��"�1�b�)�N��!�!�&�q�!�,��!�#5�#7�8�M�#�_�N��]�0�0�1�4�a��<��'��4�����m�K��E�F�=�$�	��?�?�n�2�2�2�&�,�,�I��I� ����)�R�@�K�)�)�/�/�;�G�M�*�#�*�*�M�:�C��c�4��7��m�m�G�S�1�1�� 5�5�2�=�A�
�!�*�d�M�B��-�-���<�<�A�
$�s�DE�E�.E)#�collections�	functoolsrxr�r!rVr��typingrrrrrrr
r\r�r`rbr)rl�defaultdictrpr*rurrr�r�r�r��	lru_cacher�r�r�r�rrr�<module>r�sf����	�	�
�
��B�B�:+�:+�z��.�1�����&���F�s�F�t�F�%<�K�$;�$;�J�$G��4��S��>�G��J��
�x��}��&)�h�s�m�)�XM�x��}�M�
8�c�8�e�C��H�o�8�&�����-�E�#�s�(�O�-��-����C��-��D��8�
��
��"=��"=�C�"=�H�S�M�"=rpython3.12/site-packages/pip/_vendor/packaging/_musllinux.py000064400000010432151732701530020036 0ustar00"""PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
"""

import contextlib
import functools
import operator
import os
import re
import struct
import subprocess
import sys
from typing import IO, Iterator, NamedTuple, Optional, Tuple


def _read_unpacked(f: IO[bytes], fmt: str) -> Tuple[int, ...]:
    return struct.unpack(fmt, f.read(struct.calcsize(fmt)))


def _parse_ld_musl_from_elf(f: IO[bytes]) -> Optional[str]:
    """Detect musl libc location by parsing the Python executable.

    Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
    ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
    """
    f.seek(0)
    try:
        ident = _read_unpacked(f, "16B")
    except struct.error:
        return None
    if ident[:4] != tuple(b"\x7fELF"):  # Invalid magic, not ELF.
        return None
    f.seek(struct.calcsize("HHI"), 1)  # Skip file type, machine, and version.

    try:
        # e_fmt: Format for program header.
        # p_fmt: Format for section header.
        # p_idx: Indexes to find p_type, p_offset, and p_filesz.
        e_fmt, p_fmt, p_idx = {
            1: ("IIIIHHH", "IIIIIIII", (0, 1, 4)),  # 32-bit.
            2: ("QQQIHHH", "IIQQQQQQ", (0, 2, 5)),  # 64-bit.
        }[ident[4]]
    except KeyError:
        return None
    else:
        p_get = operator.itemgetter(*p_idx)

    # Find the interpreter section and return its content.
    try:
        _, e_phoff, _, _, _, e_phentsize, e_phnum = _read_unpacked(f, e_fmt)
    except struct.error:
        return None
    for i in range(e_phnum + 1):
        f.seek(e_phoff + e_phentsize * i)
        try:
            p_type, p_offset, p_filesz = p_get(_read_unpacked(f, p_fmt))
        except struct.error:
            return None
        if p_type != 3:  # Not PT_INTERP.
            continue
        f.seek(p_offset)
        interpreter = os.fsdecode(f.read(p_filesz)).strip("\0")
        if "musl" not in interpreter:
            return None
        return interpreter
    return None


class _MuslVersion(NamedTuple):
    major: int
    minor: int


def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
    lines = [n for n in (n.strip() for n in output.splitlines()) if n]
    if len(lines) < 2 or lines[0][:4] != "musl":
        return None
    m = re.match(r"Version (\d+)\.(\d+)", lines[1])
    if not m:
        return None
    return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2)))


@functools.lru_cache()
def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
    """Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    """
    with contextlib.ExitStack() as stack:
        try:
            f = stack.enter_context(open(executable, "rb"))
        except OSError:
            return None
        ld = _parse_ld_musl_from_elf(f)
    if not ld:
        return None
    proc = subprocess.run([ld], stderr=subprocess.PIPE, universal_newlines=True)
    return _parse_musl_version(proc.stderr)


def platform_tags(arch: str) -> Iterator[str]:
    """Generate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    """
    sys_musl = _get_musl_version(sys.executable)
    if sys_musl is None:  # Python not dynamically linked against musl.
        return
    for minor in range(sys_musl.minor, -1, -1):
        yield f"musllinux_{sys_musl.major}_{minor}_{arch}"


if __name__ == "__main__":  # pragma: no cover
    import sysconfig

    plat = sysconfig.get_platform()
    assert plat.startswith("linux-"), "not linux"

    print("plat:", plat)
    print("musl:", _get_musl_version(sys.executable))
    print("tags:", end=" ")
    for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])):
        print(t, end="\n      ")
python3.12/site-packages/pip/_vendor/packaging/_manylinux.py000064400000026340151732701530020027 0ustar00import collections
import functools
import os
import re
import struct
import sys
import warnings
from typing import IO, Dict, Iterator, NamedTuple, Optional, Tuple


# Python does not provide platform information at sufficient granularity to
# identify the architecture of the running executable in some cases, so we
# determine it dynamically by reading the information from the running
# process. This only applies on Linux, which uses the ELF format.
class _ELFFileHeader:
    # https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
    class _InvalidELFFileHeader(ValueError):
        """
        An invalid ELF file header was found.
        """

    ELF_MAGIC_NUMBER = 0x7F454C46
    ELFCLASS32 = 1
    ELFCLASS64 = 2
    ELFDATA2LSB = 1
    ELFDATA2MSB = 2
    EM_386 = 3
    EM_S390 = 22
    EM_ARM = 40
    EM_X86_64 = 62
    EF_ARM_ABIMASK = 0xFF000000
    EF_ARM_ABI_VER5 = 0x05000000
    EF_ARM_ABI_FLOAT_HARD = 0x00000400

    def __init__(self, file: IO[bytes]) -> None:
        def unpack(fmt: str) -> int:
            try:
                data = file.read(struct.calcsize(fmt))
                result: Tuple[int, ...] = struct.unpack(fmt, data)
            except struct.error:
                raise _ELFFileHeader._InvalidELFFileHeader()
            return result[0]

        self.e_ident_magic = unpack(">I")
        if self.e_ident_magic != self.ELF_MAGIC_NUMBER:
            raise _ELFFileHeader._InvalidELFFileHeader()
        self.e_ident_class = unpack("B")
        if self.e_ident_class not in {self.ELFCLASS32, self.ELFCLASS64}:
            raise _ELFFileHeader._InvalidELFFileHeader()
        self.e_ident_data = unpack("B")
        if self.e_ident_data not in {self.ELFDATA2LSB, self.ELFDATA2MSB}:
            raise _ELFFileHeader._InvalidELFFileHeader()
        self.e_ident_version = unpack("B")
        self.e_ident_osabi = unpack("B")
        self.e_ident_abiversion = unpack("B")
        self.e_ident_pad = file.read(7)
        format_h = "<H" if self.e_ident_data == self.ELFDATA2LSB else ">H"
        format_i = "<I" if self.e_ident_data == self.ELFDATA2LSB else ">I"
        format_q = "<Q" if self.e_ident_data == self.ELFDATA2LSB else ">Q"
        format_p = format_i if self.e_ident_class == self.ELFCLASS32 else format_q
        self.e_type = unpack(format_h)
        self.e_machine = unpack(format_h)
        self.e_version = unpack(format_i)
        self.e_entry = unpack(format_p)
        self.e_phoff = unpack(format_p)
        self.e_shoff = unpack(format_p)
        self.e_flags = unpack(format_i)
        self.e_ehsize = unpack(format_h)
        self.e_phentsize = unpack(format_h)
        self.e_phnum = unpack(format_h)
        self.e_shentsize = unpack(format_h)
        self.e_shnum = unpack(format_h)
        self.e_shstrndx = unpack(format_h)


def _get_elf_header() -> Optional[_ELFFileHeader]:
    try:
        with open(sys.executable, "rb") as f:
            elf_header = _ELFFileHeader(f)
    except (OSError, TypeError, _ELFFileHeader._InvalidELFFileHeader):
        return None
    return elf_header


def _is_linux_armhf() -> bool:
    # hard-float ABI can be detected from the ELF header of the running
    # process
    # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf
    elf_header = _get_elf_header()
    if elf_header is None:
        return False
    result = elf_header.e_ident_class == elf_header.ELFCLASS32
    result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB
    result &= elf_header.e_machine == elf_header.EM_ARM
    result &= (
        elf_header.e_flags & elf_header.EF_ARM_ABIMASK
    ) == elf_header.EF_ARM_ABI_VER5
    result &= (
        elf_header.e_flags & elf_header.EF_ARM_ABI_FLOAT_HARD
    ) == elf_header.EF_ARM_ABI_FLOAT_HARD
    return result


def _is_linux_i686() -> bool:
    elf_header = _get_elf_header()
    if elf_header is None:
        return False
    result = elf_header.e_ident_class == elf_header.ELFCLASS32
    result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB
    result &= elf_header.e_machine == elf_header.EM_386
    return result


def _have_compatible_abi(arch: str) -> bool:
    if arch == "armv7l":
        return _is_linux_armhf()
    if arch == "i686":
        return _is_linux_i686()
    return arch in {"x86_64", "aarch64", "ppc64", "ppc64le", "s390x"}


# If glibc ever changes its major version, we need to know what the last
# minor version was, so we can build the complete list of all versions.
# For now, guess what the highest minor version might be, assume it will
# be 50 for testing. Once this actually happens, update the dictionary
# with the actual value.
_LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50)


class _GLibCVersion(NamedTuple):
    major: int
    minor: int


def _glibc_version_string_confstr() -> Optional[str]:
    """
    Primary implementation of glibc_version_string using os.confstr.
    """
    # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely
    # to be broken or missing. This strategy is used in the standard library
    # platform module.
    # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183
    try:
        # os.confstr("CS_GNU_LIBC_VERSION") returns a string like "glibc 2.17".
        version_string = os.confstr("CS_GNU_LIBC_VERSION")
        assert version_string is not None
        _, version = version_string.split()
    except (AssertionError, AttributeError, OSError, ValueError):
        # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...
        return None
    return version


def _glibc_version_string_ctypes() -> Optional[str]:
    """
    Fallback implementation of glibc_version_string using ctypes.
    """
    try:
        import ctypes
    except ImportError:
        return None

    # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
    # manpage says, "If filename is NULL, then the returned handle is for the
    # main program". This way we can let the linker do the work to figure out
    # which libc our process is actually using.
    #
    # We must also handle the special case where the executable is not a
    # dynamically linked executable. This can occur when using musl libc,
    # for example. In this situation, dlopen() will error, leading to an
    # OSError. Interestingly, at least in the case of musl, there is no
    # errno set on the OSError. The single string argument used to construct
    # OSError comes from libc itself and is therefore not portable to
    # hard code here. In any case, failure to call dlopen() means we
    # can proceed, so we bail on our attempt.
    try:
        process_namespace = ctypes.CDLL(None)
    except OSError:
        return None

    try:
        gnu_get_libc_version = process_namespace.gnu_get_libc_version
    except AttributeError:
        # Symbol doesn't exist -> therefore, we are not linked to
        # glibc.
        return None

    # Call gnu_get_libc_version, which returns a string like "2.5"
    gnu_get_libc_version.restype = ctypes.c_char_p
    version_str: str = gnu_get_libc_version()
    # py2 / py3 compatibility:
    if not isinstance(version_str, str):
        version_str = version_str.decode("ascii")

    return version_str


def _glibc_version_string() -> Optional[str]:
    """Returns glibc version string, or None if not using glibc."""
    return _glibc_version_string_confstr() or _glibc_version_string_ctypes()


def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
    """Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    """
    m = re.match(r"(?P<major>[0-9]+)\.(?P<minor>[0-9]+)", version_str)
    if not m:
        warnings.warn(
            "Expected glibc version with 2 components major.minor,"
            " got: %s" % version_str,
            RuntimeWarning,
        )
        return -1, -1
    return int(m.group("major")), int(m.group("minor"))


@functools.lru_cache()
def _get_glibc_version() -> Tuple[int, int]:
    version_str = _glibc_version_string()
    if version_str is None:
        return (-1, -1)
    return _parse_glibc_version(version_str)


# From PEP 513, PEP 600
def _is_compatible(name: str, arch: str, version: _GLibCVersion) -> bool:
    sys_glibc = _get_glibc_version()
    if sys_glibc < version:
        return False
    # Check for presence of _manylinux module.
    try:
        import _manylinux  # noqa
    except ImportError:
        return True
    if hasattr(_manylinux, "manylinux_compatible"):
        result = _manylinux.manylinux_compatible(version[0], version[1], arch)
        if result is not None:
            return bool(result)
        return True
    if version == _GLibCVersion(2, 5):
        if hasattr(_manylinux, "manylinux1_compatible"):
            return bool(_manylinux.manylinux1_compatible)
    if version == _GLibCVersion(2, 12):
        if hasattr(_manylinux, "manylinux2010_compatible"):
            return bool(_manylinux.manylinux2010_compatible)
    if version == _GLibCVersion(2, 17):
        if hasattr(_manylinux, "manylinux2014_compatible"):
            return bool(_manylinux.manylinux2014_compatible)
    return True


_LEGACY_MANYLINUX_MAP = {
    # CentOS 7 w/ glibc 2.17 (PEP 599)
    (2, 17): "manylinux2014",
    # CentOS 6 w/ glibc 2.12 (PEP 571)
    (2, 12): "manylinux2010",
    # CentOS 5 w/ glibc 2.5 (PEP 513)
    (2, 5): "manylinux1",
}


def platform_tags(linux: str, arch: str) -> Iterator[str]:
    if not _have_compatible_abi(arch):
        return
    # Oldest glibc to be supported regardless of architecture is (2, 17).
    too_old_glibc2 = _GLibCVersion(2, 16)
    if arch in {"x86_64", "i686"}:
        # On x86/i686 also oldest glibc to be supported is (2, 5).
        too_old_glibc2 = _GLibCVersion(2, 4)
    current_glibc = _GLibCVersion(*_get_glibc_version())
    glibc_max_list = [current_glibc]
    # We can assume compatibility across glibc major versions.
    # https://sourceware.org/bugzilla/show_bug.cgi?id=24636
    #
    # Build a list of maximum glibc versions so that we can
    # output the canonical list of all glibc from current_glibc
    # down to too_old_glibc2, including all intermediary versions.
    for glibc_major in range(current_glibc.major - 1, 1, -1):
        glibc_minor = _LAST_GLIBC_MINOR[glibc_major]
        glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor))
    for glibc_max in glibc_max_list:
        if glibc_max.major == too_old_glibc2.major:
            min_minor = too_old_glibc2.minor
        else:
            # For other glibc major versions oldest supported is (x, 0).
            min_minor = -1
        for glibc_minor in range(glibc_max.minor, min_minor, -1):
            glibc_version = _GLibCVersion(glibc_max.major, glibc_minor)
            tag = "manylinux_{}_{}".format(*glibc_version)
            if _is_compatible(tag, arch, glibc_version):
                yield linux.replace("linux", tag)
            # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags.
            if glibc_version in _LEGACY_MANYLINUX_MAP:
                legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version]
                if _is_compatible(legacy_tag, arch, glibc_version):
                    yield linux.replace("linux", legacy_tag)
python3.12/site-packages/pip/_vendor/packaging/tags.py000064400000036523151732701530016606 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import logging
import platform
import sys
import sysconfig
from importlib.machinery import EXTENSION_SUFFIXES
from typing import (
    Dict,
    FrozenSet,
    Iterable,
    Iterator,
    List,
    Optional,
    Sequence,
    Tuple,
    Union,
    cast,
)

from . import _manylinux, _musllinux

logger = logging.getLogger(__name__)

PythonVersion = Sequence[int]
MacVersion = Tuple[int, int]

INTERPRETER_SHORT_NAMES: Dict[str, str] = {
    "python": "py",  # Generic.
    "cpython": "cp",
    "pypy": "pp",
    "ironpython": "ip",
    "jython": "jy",
}


_32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32


class Tag:
    """
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    """

    __slots__ = ["_interpreter", "_abi", "_platform", "_hash"]

    def __init__(self, interpreter: str, abi: str, platform: str) -> None:
        self._interpreter = interpreter.lower()
        self._abi = abi.lower()
        self._platform = platform.lower()
        # The __hash__ of every single element in a Set[Tag] will be evaluated each time
        # that a set calls its `.disjoint()` method, which may be called hundreds of
        # times when scanning a page of links for packages with tags matching that
        # Set[Tag]. Pre-computing the value here produces significant speedups for
        # downstream consumers.
        self._hash = hash((self._interpreter, self._abi, self._platform))

    @property
    def interpreter(self) -> str:
        return self._interpreter

    @property
    def abi(self) -> str:
        return self._abi

    @property
    def platform(self) -> str:
        return self._platform

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, Tag):
            return NotImplemented

        return (
            (self._hash == other._hash)  # Short-circuit ASAP for perf reasons.
            and (self._platform == other._platform)
            and (self._abi == other._abi)
            and (self._interpreter == other._interpreter)
        )

    def __hash__(self) -> int:
        return self._hash

    def __str__(self) -> str:
        return f"{self._interpreter}-{self._abi}-{self._platform}"

    def __repr__(self) -> str:
        return f"<{self} @ {id(self)}>"


def parse_tag(tag: str) -> FrozenSet[Tag]:
    """
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    """
    tags = set()
    interpreters, abis, platforms = tag.split("-")
    for interpreter in interpreters.split("."):
        for abi in abis.split("."):
            for platform_ in platforms.split("."):
                tags.add(Tag(interpreter, abi, platform_))
    return frozenset(tags)


def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]:
    value = sysconfig.get_config_var(name)
    if value is None and warn:
        logger.debug(
            "Config variable '%s' is unset, Python ABI tag may be incorrect", name
        )
    return value


def _normalize_string(string: str) -> str:
    return string.replace(".", "_").replace("-", "_")


def _abi3_applies(python_version: PythonVersion) -> bool:
    """
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    """
    return len(python_version) > 1 and tuple(python_version) >= (3, 2)


def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
    py_version = tuple(py_version)  # To allow for version comparison.
    abis = []
    version = _version_nodot(py_version[:2])
    debug = pymalloc = ucs4 = ""
    with_debug = _get_config_var("Py_DEBUG", warn)
    has_refcount = hasattr(sys, "gettotalrefcount")
    # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled
    # extension modules is the best option.
    # https://github.com/pypa/pip/issues/3383#issuecomment-173267692
    has_ext = "_d.pyd" in EXTENSION_SUFFIXES
    if with_debug or (with_debug is None and (has_refcount or has_ext)):
        debug = "d"
    if py_version < (3, 8):
        with_pymalloc = _get_config_var("WITH_PYMALLOC", warn)
        if with_pymalloc or with_pymalloc is None:
            pymalloc = "m"
        if py_version < (3, 3):
            unicode_size = _get_config_var("Py_UNICODE_SIZE", warn)
            if unicode_size == 4 or (
                unicode_size is None and sys.maxunicode == 0x10FFFF
            ):
                ucs4 = "u"
    elif debug:
        # Debug builds can also load "normal" extension modules.
        # We can also assume no UCS-4 or pymalloc requirement.
        abis.append(f"cp{version}")
    abis.insert(
        0,
        "cp{version}{debug}{pymalloc}{ucs4}".format(
            version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4
        ),
    )
    return abis


def cpython_tags(
    python_version: Optional[PythonVersion] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a CPython interpreter.

    The tags consist of:
    - cp<python_version>-<abi>-<platform>
    - cp<python_version>-abi3-<platform>
    - cp<python_version>-none-<platform>
    - cp<less than python_version>-abi3-<platform>  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    """
    if not python_version:
        python_version = sys.version_info[:2]

    interpreter = f"cp{_version_nodot(python_version[:2])}"

    if abis is None:
        if len(python_version) > 1:
            abis = _cpython_abis(python_version, warn)
        else:
            abis = []
    abis = list(abis)
    # 'abi3' and 'none' are explicitly handled later.
    for explicit_abi in ("abi3", "none"):
        try:
            abis.remove(explicit_abi)
        except ValueError:
            pass

    platforms = list(platforms or platform_tags())
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)
    if _abi3_applies(python_version):
        yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms)
    yield from (Tag(interpreter, "none", platform_) for platform_ in platforms)

    if _abi3_applies(python_version):
        for minor_version in range(python_version[1] - 1, 1, -1):
            for platform_ in platforms:
                interpreter = "cp{version}".format(
                    version=_version_nodot((python_version[0], minor_version))
                )
                yield Tag(interpreter, "abi3", platform_)


def _generic_abi() -> Iterator[str]:
    abi = sysconfig.get_config_var("SOABI")
    if abi:
        yield _normalize_string(abi)


def generic_tags(
    interpreter: Optional[str] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a generic interpreter.

    The tags consist of:
    - <interpreter>-<abi>-<platform>

    The "none" ABI will be added if it was not explicitly provided.
    """
    if not interpreter:
        interp_name = interpreter_name()
        interp_version = interpreter_version(warn=warn)
        interpreter = "".join([interp_name, interp_version])
    if abis is None:
        abis = _generic_abi()
    platforms = list(platforms or platform_tags())
    abis = list(abis)
    if "none" not in abis:
        abis.append("none")
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)


def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
    """
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    """
    if len(py_version) > 1:
        yield f"py{_version_nodot(py_version[:2])}"
    yield f"py{py_version[0]}"
    if len(py_version) > 1:
        for minor in range(py_version[1] - 1, -1, -1):
            yield f"py{_version_nodot((py_version[0], minor))}"


def compatible_tags(
    python_version: Optional[PythonVersion] = None,
    interpreter: Optional[str] = None,
    platforms: Optional[Iterable[str]] = None,
) -> Iterator[Tag]:
    """
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-<platform>
    - <interpreter>-none-any  # ... if `interpreter` is provided.
    - py*-none-any
    """
    if not python_version:
        python_version = sys.version_info[:2]
    platforms = list(platforms or platform_tags())
    for version in _py_interpreter_range(python_version):
        for platform_ in platforms:
            yield Tag(version, "none", platform_)
    if interpreter:
        yield Tag(interpreter, "none", "any")
    for version in _py_interpreter_range(python_version):
        yield Tag(version, "none", "any")


def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str:
    if not is_32bit:
        return arch

    if arch.startswith("ppc"):
        return "ppc"

    return "i386"


def _mac_binary_formats(version: MacVersion, cpu_arch: str) -> List[str]:
    formats = [cpu_arch]
    if cpu_arch == "x86_64":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat64", "fat32"])

    elif cpu_arch == "i386":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat32", "fat"])

    elif cpu_arch == "ppc64":
        # TODO: Need to care about 32-bit PPC for ppc64 through 10.2?
        if version > (10, 5) or version < (10, 4):
            return []
        formats.append("fat64")

    elif cpu_arch == "ppc":
        if version > (10, 6):
            return []
        formats.extend(["fat32", "fat"])

    if cpu_arch in {"arm64", "x86_64"}:
        formats.append("universal2")

    if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}:
        formats.append("universal")

    return formats


def mac_platforms(
    version: Optional[MacVersion] = None, arch: Optional[str] = None
) -> Iterator[str]:
    """
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    """
    version_str, _, cpu_arch = platform.mac_ver()
    if version is None:
        version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
    else:
        version = version
    if arch is None:
        arch = _mac_arch(cpu_arch)
    else:
        arch = arch

    if (10, 0) <= version and version < (11, 0):
        # Prior to Mac OS 11, each yearly release of Mac OS bumped the
        # "minor" version number.  The major version was always 10.
        for minor_version in range(version[1], -1, -1):
            compat_version = 10, minor_version
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=10, minor=minor_version, binary_format=binary_format
                )

    if version >= (11, 0):
        # Starting with Mac OS 11, each yearly release bumps the major version
        # number.   The minor versions are now the midyear updates.
        for major_version in range(version[0], 10, -1):
            compat_version = major_version, 0
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=major_version, minor=0, binary_format=binary_format
                )

    if version >= (11, 0):
        # Mac OS 11 on x86_64 is compatible with binaries from previous releases.
        # Arm64 support was introduced in 11.0, so no Arm binaries from previous
        # releases exist.
        #
        # However, the "universal2" binary format can have a
        # macOS version earlier than 11.0 when the x86_64 part of the binary supports
        # that version of macOS.
        if arch == "x86_64":
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_formats = _mac_binary_formats(compat_version, arch)
                for binary_format in binary_formats:
                    yield "macosx_{major}_{minor}_{binary_format}".format(
                        major=compat_version[0],
                        minor=compat_version[1],
                        binary_format=binary_format,
                    )
        else:
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_format = "universal2"
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=compat_version[0],
                    minor=compat_version[1],
                    binary_format=binary_format,
                )


def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]:
    linux = _normalize_string(sysconfig.get_platform())
    if is_32bit:
        if linux == "linux_x86_64":
            linux = "linux_i686"
        elif linux == "linux_aarch64":
            linux = "linux_armv7l"
    _, arch = linux.split("_", 1)
    yield from _manylinux.platform_tags(linux, arch)
    yield from _musllinux.platform_tags(arch)
    yield linux


def _generic_platforms() -> Iterator[str]:
    yield _normalize_string(sysconfig.get_platform())


def platform_tags() -> Iterator[str]:
    """
    Provides the platform tags for this installation.
    """
    if platform.system() == "Darwin":
        return mac_platforms()
    elif platform.system() == "Linux":
        return _linux_platforms()
    else:
        return _generic_platforms()


def interpreter_name() -> str:
    """
    Returns the name of the running interpreter.
    """
    name = sys.implementation.name
    return INTERPRETER_SHORT_NAMES.get(name) or name


def interpreter_version(*, warn: bool = False) -> str:
    """
    Returns the version of the running interpreter.
    """
    version = _get_config_var("py_version_nodot", warn=warn)
    if version:
        version = str(version)
    else:
        version = _version_nodot(sys.version_info[:2])
    return version


def _version_nodot(version: PythonVersion) -> str:
    return "".join(map(str, version))


def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
    """
    Returns the sequence of tag triples for the running interpreter.

    The order of the sequence corresponds to priority order for the
    interpreter, from most to least important.
    """

    interp_name = interpreter_name()
    if interp_name == "cp":
        yield from cpython_tags(warn=warn)
    else:
        yield from generic_tags()

    if interp_name == "pp":
        yield from compatible_tags(interpreter="pp3")
    else:
        yield from compatible_tags()
python3.12/site-packages/pip/_vendor/packaging/specifiers.py000064400000072636151732701530020011 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import abc
import functools
import itertools
import re
import warnings
from typing import (
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    Optional,
    Pattern,
    Set,
    Tuple,
    TypeVar,
    Union,
)

from .utils import canonicalize_version
from .version import LegacyVersion, Version, parse

ParsedVersion = Union[Version, LegacyVersion]
UnparsedVersion = Union[Version, LegacyVersion, str]
VersionTypeVar = TypeVar("VersionTypeVar", bound=UnparsedVersion)
CallableOperator = Callable[[ParsedVersion, str], bool]


class InvalidSpecifier(ValueError):
    """
    An invalid specifier was found, users should refer to PEP 440.
    """


class BaseSpecifier(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def __str__(self) -> str:
        """
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        """

    @abc.abstractmethod
    def __hash__(self) -> int:
        """
        Returns a hash value for this Specifier like object.
        """

    @abc.abstractmethod
    def __eq__(self, other: object) -> bool:
        """
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        """

    @abc.abstractproperty
    def prereleases(self) -> Optional[bool]:
        """
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        """

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        """
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        """

    @abc.abstractmethod
    def contains(self, item: str, prereleases: Optional[bool] = None) -> bool:
        """
        Determines if the given item is contained within this specifier.
        """

    @abc.abstractmethod
    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:
        """
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        """


class _IndividualSpecifier(BaseSpecifier):

    _operators: Dict[str, str] = {}
    _regex: Pattern[str]

    def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
        match = self._regex.search(spec)
        if not match:
            raise InvalidSpecifier(f"Invalid specifier: '{spec}'")

        self._spec: Tuple[str, str] = (
            match.group("operator").strip(),
            match.group("version").strip(),
        )

        # Store whether or not this Specifier should accept prereleases
        self._prereleases = prereleases

    def __repr__(self) -> str:
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f"<{self.__class__.__name__}({str(self)!r}{pre})>"

    def __str__(self) -> str:
        return "{}{}".format(*self._spec)

    @property
    def _canonical_spec(self) -> Tuple[str, str]:
        return self._spec[0], canonicalize_version(self._spec[1])

    def __hash__(self) -> int:
        return hash(self._canonical_spec)

    def __eq__(self, other: object) -> bool:
        if isinstance(other, str):
            try:
                other = self.__class__(str(other))
            except InvalidSpecifier:
                return NotImplemented
        elif not isinstance(other, self.__class__):
            return NotImplemented

        return self._canonical_spec == other._canonical_spec

    def _get_operator(self, op: str) -> CallableOperator:
        operator_callable: CallableOperator = getattr(
            self, f"_compare_{self._operators[op]}"
        )
        return operator_callable

    def _coerce_version(self, version: UnparsedVersion) -> ParsedVersion:
        if not isinstance(version, (LegacyVersion, Version)):
            version = parse(version)
        return version

    @property
    def operator(self) -> str:
        return self._spec[0]

    @property
    def version(self) -> str:
        return self._spec[1]

    @property
    def prereleases(self) -> Optional[bool]:
        return self._prereleases

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    def __contains__(self, item: str) -> bool:
        return self.contains(item)

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:

        # Determine if prereleases are to be allowed or not.
        if prereleases is None:
            prereleases = self.prereleases

        # Normalize item to a Version or LegacyVersion, this allows us to have
        # a shortcut for ``"2.0" in Specifier(">=2")
        normalized_item = self._coerce_version(item)

        # Determine if we should be supporting prereleases in this specifier
        # or not, if we do not support prereleases than we can short circuit
        # logic if this version is a prereleases.
        if normalized_item.is_prerelease and not prereleases:
            return False

        # Actually do the comparison to determine if this item is contained
        # within this Specifier or not.
        operator_callable: CallableOperator = self._get_operator(self.operator)
        return operator_callable(normalized_item, self.version)

    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:

        yielded = False
        found_prereleases = []

        kw = {"prereleases": prereleases if prereleases is not None else True}

        # Attempt to iterate over all the values in the iterable and if any of
        # them match, yield them.
        for version in iterable:
            parsed_version = self._coerce_version(version)

            if self.contains(parsed_version, **kw):
                # If our version is a prerelease, and we were not set to allow
                # prereleases, then we'll store it for later in case nothing
                # else matches this specifier.
                if parsed_version.is_prerelease and not (
                    prereleases or self.prereleases
                ):
                    found_prereleases.append(version)
                # Either this is not a prerelease, or we should have been
                # accepting prereleases from the beginning.
                else:
                    yielded = True
                    yield version

        # Now that we've iterated over everything, determine if we've yielded
        # any values, and if we have not and we have any prereleases stored up
        # then we will go ahead and yield the prereleases.
        if not yielded and found_prereleases:
            for version in found_prereleases:
                yield version


class LegacySpecifier(_IndividualSpecifier):

    _regex_str = r"""
        (?P<operator>(==|!=|<=|>=|<|>))
        \s*
        (?P<version>
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        """

    _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)

    _operators = {
        "==": "equal",
        "!=": "not_equal",
        "<=": "less_than_equal",
        ">=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
    }

    def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
        super().__init__(spec, prereleases)

        warnings.warn(
            "Creating a LegacyVersion has been deprecated and will be "
            "removed in the next major release",
            DeprecationWarning,
        )

    def _coerce_version(self, version: UnparsedVersion) -> LegacyVersion:
        if not isinstance(version, LegacyVersion):
            version = LegacyVersion(str(version))
        return version

    def _compare_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective == self._coerce_version(spec)

    def _compare_not_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective != self._coerce_version(spec)

    def _compare_less_than_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective <= self._coerce_version(spec)

    def _compare_greater_than_equal(
        self, prospective: LegacyVersion, spec: str
    ) -> bool:
        return prospective >= self._coerce_version(spec)

    def _compare_less_than(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective < self._coerce_version(spec)

    def _compare_greater_than(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective > self._coerce_version(spec)


def _require_version_compare(
    fn: Callable[["Specifier", ParsedVersion, str], bool]
) -> Callable[["Specifier", ParsedVersion, str], bool]:
    @functools.wraps(fn)
    def wrapped(self: "Specifier", prospective: ParsedVersion, spec: str) -> bool:
        if not isinstance(prospective, Version):
            return False
        return fn(self, prospective, spec)

    return wrapped


class Specifier(_IndividualSpecifier):

    _regex_str = r"""
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        """

    _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)

    _operators = {
        "~=": "compatible",
        "==": "equal",
        "!=": "not_equal",
        "<=": "less_than_equal",
        ">=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
        "===": "arbitrary",
    }

    @_require_version_compare
    def _compare_compatible(self, prospective: ParsedVersion, spec: str) -> bool:

        # Compatible releases have an equivalent combination of >= and ==. That
        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
        # implement this in terms of the other specifiers instead of
        # implementing it ourselves. The only thing we need to do is construct
        # the other specifiers.

        # We want everything but the last item in the version, but we want to
        # ignore suffix segments.
        prefix = ".".join(
            list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1]
        )

        # Add the prefix notation to the end of our string
        prefix += ".*"

        return self._get_operator(">=")(prospective, spec) and self._get_operator("==")(
            prospective, prefix
        )

    @_require_version_compare
    def _compare_equal(self, prospective: ParsedVersion, spec: str) -> bool:

        # We need special logic to handle prefix matching
        if spec.endswith(".*"):
            # In the case of prefix matching we want to ignore local segment.
            prospective = Version(prospective.public)
            # Split the spec out by dots, and pretend that there is an implicit
            # dot in between a release segment and a pre-release segment.
            split_spec = _version_split(spec[:-2])  # Remove the trailing .*

            # Split the prospective version out by dots, and pretend that there
            # is an implicit dot in between a release segment and a pre-release
            # segment.
            split_prospective = _version_split(str(prospective))

            # Shorten the prospective version to be the same length as the spec
            # so that we can determine if the specifier is a prefix of the
            # prospective version or not.
            shortened_prospective = split_prospective[: len(split_spec)]

            # Pad out our two sides with zeros so that they both equal the same
            # length.
            padded_spec, padded_prospective = _pad_version(
                split_spec, shortened_prospective
            )

            return padded_prospective == padded_spec
        else:
            # Convert our spec string into a Version
            spec_version = Version(spec)

            # If the specifier does not have a local segment, then we want to
            # act as if the prospective version also does not have a local
            # segment.
            if not spec_version.local:
                prospective = Version(prospective.public)

            return prospective == spec_version

    @_require_version_compare
    def _compare_not_equal(self, prospective: ParsedVersion, spec: str) -> bool:
        return not self._compare_equal(prospective, spec)

    @_require_version_compare
    def _compare_less_than_equal(self, prospective: ParsedVersion, spec: str) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) <= Version(spec)

    @_require_version_compare
    def _compare_greater_than_equal(
        self, prospective: ParsedVersion, spec: str
    ) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) >= Version(spec)

    @_require_version_compare
    def _compare_less_than(self, prospective: ParsedVersion, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is less than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective < spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a pre-release version, that we do not accept pre-release
        # versions for the version mentioned in the specifier (e.g. <3.1 should
        # not match 3.1.dev0, but should match 3.0.dev0).
        if not spec.is_prerelease and prospective.is_prerelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # less than the spec version *and* it's not a pre-release of the same
        # version in the spec.
        return True

    @_require_version_compare
    def _compare_greater_than(self, prospective: ParsedVersion, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is greater than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective > spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a post-release version, that we do not accept
        # post-release versions for the version mentioned in the specifier
        # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0).
        if not spec.is_postrelease and prospective.is_postrelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # Ensure that we do not allow a local version of the version mentioned
        # in the specifier, which is technically greater than, to match.
        if prospective.local is not None:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # greater than the spec version *and* it's not a pre-release of the
        # same version in the spec.
        return True

    def _compare_arbitrary(self, prospective: Version, spec: str) -> bool:
        return str(prospective).lower() == str(spec).lower()

    @property
    def prereleases(self) -> bool:

        # If there is an explicit prereleases set for this, then we'll just
        # blindly use that.
        if self._prereleases is not None:
            return self._prereleases

        # Look at all of our specifiers and determine if they are inclusive
        # operators, and if they are if they are including an explicit
        # prerelease.
        operator, version = self._spec
        if operator in ["==", ">=", "<=", "~=", "==="]:
            # The == specifier can include a trailing .*, if it does we
            # want to remove before parsing.
            if operator == "==" and version.endswith(".*"):
                version = version[:-2]

            # Parse the version, and if it is a pre-release than this
            # specifier allows pre-releases.
            if parse(version).is_prerelease:
                return True

        return False

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value


_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")


def _version_split(version: str) -> List[str]:
    result: List[str] = []
    for item in version.split("."):
        match = _prefix_regex.search(item)
        if match:
            result.extend(match.groups())
        else:
            result.append(item)
    return result


def _is_not_suffix(segment: str) -> bool:
    return not any(
        segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post")
    )


def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]:
    left_split, right_split = [], []

    # Get the release segment of our versions
    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))

    # Get the rest of our versions
    left_split.append(left[len(left_split[0]) :])
    right_split.append(right[len(right_split[0]) :])

    # Insert our padding
    left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0])))
    right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0])))

    return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split)))


class SpecifierSet(BaseSpecifier):
    def __init__(
        self, specifiers: str = "", prereleases: Optional[bool] = None
    ) -> None:

        # Split on , to break each individual specifier into it's own item, and
        # strip each item to remove leading/trailing whitespace.
        split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]

        # Parsed each individual specifier, attempting first to make it a
        # Specifier and falling back to a LegacySpecifier.
        parsed: Set[_IndividualSpecifier] = set()
        for specifier in split_specifiers:
            try:
                parsed.add(Specifier(specifier))
            except InvalidSpecifier:
                parsed.add(LegacySpecifier(specifier))

        # Turn our parsed specifiers into a frozen set and save them for later.
        self._specs = frozenset(parsed)

        # Store our prereleases value so we can use it later to determine if
        # we accept prereleases or not.
        self._prereleases = prereleases

    def __repr__(self) -> str:
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f"<SpecifierSet({str(self)!r}{pre})>"

    def __str__(self) -> str:
        return ",".join(sorted(str(s) for s in self._specs))

    def __hash__(self) -> int:
        return hash(self._specs)

    def __and__(self, other: Union["SpecifierSet", str]) -> "SpecifierSet":
        if isinstance(other, str):
            other = SpecifierSet(other)
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        specifier = SpecifierSet()
        specifier._specs = frozenset(self._specs | other._specs)

        if self._prereleases is None and other._prereleases is not None:
            specifier._prereleases = other._prereleases
        elif self._prereleases is not None and other._prereleases is None:
            specifier._prereleases = self._prereleases
        elif self._prereleases == other._prereleases:
            specifier._prereleases = self._prereleases
        else:
            raise ValueError(
                "Cannot combine SpecifierSets with True and False prerelease "
                "overrides."
            )

        return specifier

    def __eq__(self, other: object) -> bool:
        if isinstance(other, (str, _IndividualSpecifier)):
            other = SpecifierSet(str(other))
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        return self._specs == other._specs

    def __len__(self) -> int:
        return len(self._specs)

    def __iter__(self) -> Iterator[_IndividualSpecifier]:
        return iter(self._specs)

    @property
    def prereleases(self) -> Optional[bool]:

        # If we have been given an explicit prerelease modifier, then we'll
        # pass that through here.
        if self._prereleases is not None:
            return self._prereleases

        # If we don't have any specifiers, and we don't have a forced value,
        # then we'll just return None since we don't know if this should have
        # pre-releases or not.
        if not self._specs:
            return None

        # Otherwise we'll see if any of the given specifiers accept
        # prereleases, if any of them do we'll return True, otherwise False.
        return any(s.prereleases for s in self._specs)

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    def __contains__(self, item: UnparsedVersion) -> bool:
        return self.contains(item)

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:

        # Ensure that our item is a Version or LegacyVersion instance.
        if not isinstance(item, (LegacyVersion, Version)):
            item = parse(item)

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # We can determine if we're going to allow pre-releases by looking to
        # see if any of the underlying items supports them. If none of them do
        # and this item is a pre-release then we do not allow it and we can
        # short circuit that here.
        # Note: This means that 1.0.dev1 would not be contained in something
        #       like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
        if not prereleases and item.is_prerelease:
            return False

        # We simply dispatch to the underlying specs here to make sure that the
        # given version is contained within all of them.
        # Note: This use of all() here means that an empty set of specifiers
        #       will always return True, this is an explicit design decision.
        return all(s.contains(item, prereleases=prereleases) for s in self._specs)

    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # If we have any specifiers, then we want to wrap our iterable in the
        # filter method for each one, this will act as a logical AND amongst
        # each specifier.
        if self._specs:
            for spec in self._specs:
                iterable = spec.filter(iterable, prereleases=bool(prereleases))
            return iterable
        # If we do not have any specifiers, then we need to have a rough filter
        # which will filter out any pre-releases, unless there are no final
        # releases, and which will filter out LegacyVersion in general.
        else:
            filtered: List[VersionTypeVar] = []
            found_prereleases: List[VersionTypeVar] = []

            item: UnparsedVersion
            parsed_version: Union[Version, LegacyVersion]

            for item in iterable:
                # Ensure that we some kind of Version class for this item.
                if not isinstance(item, (LegacyVersion, Version)):
                    parsed_version = parse(item)
                else:
                    parsed_version = item

                # Filter out any item which is parsed as a LegacyVersion
                if isinstance(parsed_version, LegacyVersion):
                    continue

                # Store any item which is a pre-release for later unless we've
                # already found a final version or we are accepting prereleases
                if parsed_version.is_prerelease and not prereleases:
                    if not filtered:
                        found_prereleases.append(item)
                else:
                    filtered.append(item)

            # If we've found no items except for pre-releases, then we'll go
            # ahead and use the pre-releases
            if not filtered and found_prereleases and prereleases is None:
                return found_prereleases

            return filtered
python3.12/site-packages/pip/_vendor/packaging/_structures.py000064400000002627151732701530020230 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.


class InfinityType:
    def __repr__(self) -> str:
        return "Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return False

    def __le__(self, other: object) -> bool:
        return False

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return True

    def __ge__(self, other: object) -> bool:
        return True

    def __neg__(self: object) -> "NegativeInfinityType":
        return NegativeInfinity


Infinity = InfinityType()


class NegativeInfinityType:
    def __repr__(self) -> str:
        return "-Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return True

    def __le__(self, other: object) -> bool:
        return True

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return False

    def __ge__(self, other: object) -> bool:
        return False

    def __neg__(self: object) -> InfinityType:
        return Infinity


NegativeInfinity = NegativeInfinityType()
python3.12/site-packages/pip/_vendor/packaging/__init__.py000064400000000761151732701530017402 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from .__about__ import (
    __author__,
    __copyright__,
    __email__,
    __license__,
    __summary__,
    __title__,
    __uri__,
    __version__,
)

__all__ = [
    "__title__",
    "__summary__",
    "__uri__",
    "__version__",
    "__author__",
    "__email__",
    "__license__",
    "__copyright__",
]
python3.12/site-packages/pip/_vendor/packaging/py.typed000064400000000000151732701530016752 0ustar00python3.12/site-packages/pip/_vendor/packaging/utils.py000064400000010150151732701530016774 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import re
from typing import FrozenSet, NewType, Tuple, Union, cast

from .tags import Tag, parse_tag
from .version import InvalidVersion, Version

BuildTag = Union[Tuple[()], Tuple[int, str]]
NormalizedName = NewType("NormalizedName", str)


class InvalidWheelFilename(ValueError):
    """
    An invalid wheel filename was found, users should refer to PEP 427.
    """


class InvalidSdistFilename(ValueError):
    """
    An invalid sdist filename was found, users should refer to the packaging user guide.
    """


_canonicalize_regex = re.compile(r"[-_.]+")
# PEP 427: The build number must start with a digit.
_build_tag_regex = re.compile(r"(\d+)(.*)")


def canonicalize_name(name: str) -> NormalizedName:
    # This is taken from PEP 503.
    value = _canonicalize_regex.sub("-", name).lower()
    return cast(NormalizedName, value)


def canonicalize_version(version: Union[Version, str]) -> str:
    """
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    """
    if isinstance(version, str):
        try:
            parsed = Version(version)
        except InvalidVersion:
            # Legacy versions cannot be normalized
            return version
    else:
        parsed = version

    parts = []

    # Epoch
    if parsed.epoch != 0:
        parts.append(f"{parsed.epoch}!")

    # Release segment
    # NB: This strips trailing '.0's to normalize
    parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in parsed.release)))

    # Pre-release
    if parsed.pre is not None:
        parts.append("".join(str(x) for x in parsed.pre))

    # Post-release
    if parsed.post is not None:
        parts.append(f".post{parsed.post}")

    # Development release
    if parsed.dev is not None:
        parts.append(f".dev{parsed.dev}")

    # Local version segment
    if parsed.local is not None:
        parts.append(f"+{parsed.local}")

    return "".join(parts)


def parse_wheel_filename(
    filename: str,
) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
    if not filename.endswith(".whl"):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (extension must be '.whl'): {filename}"
        )

    filename = filename[:-4]
    dashes = filename.count("-")
    if dashes not in (4, 5):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (wrong number of parts): {filename}"
        )

    parts = filename.split("-", dashes - 2)
    name_part = parts[0]
    # See PEP 427 for the rules on escaping the project name
    if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None:
        raise InvalidWheelFilename(f"Invalid project name: {filename}")
    name = canonicalize_name(name_part)
    version = Version(parts[1])
    if dashes == 5:
        build_part = parts[2]
        build_match = _build_tag_regex.match(build_part)
        if build_match is None:
            raise InvalidWheelFilename(
                f"Invalid build number: {build_part} in '{filename}'"
            )
        build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
    else:
        build = ()
    tags = parse_tag(parts[-1])
    return (name, version, build, tags)


def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
    if filename.endswith(".tar.gz"):
        file_stem = filename[: -len(".tar.gz")]
    elif filename.endswith(".zip"):
        file_stem = filename[: -len(".zip")]
    else:
        raise InvalidSdistFilename(
            f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):"
            f" {filename}"
        )

    # We are requiring a PEP 440 version, which cannot contain dashes,
    # so we split on the last dash.
    name_part, sep, version_part = file_stem.rpartition("-")
    if not sep:
        raise InvalidSdistFilename(f"Invalid sdist filename: {filename}")

    name = canonicalize_name(name_part)
    version = Version(version_part)
    return (name, version)
python3.12/site-packages/pip/_vendor/resolvelib/providers.pyi000064400000002477151732701530020261 0ustar00from typing import (
    Any,
    Generic,
    Iterable,
    Iterator,
    Mapping,
    Protocol,
    Sequence,
    Union,
)

from .reporters import BaseReporter
from .resolvers import RequirementInformation
from .structs import CT, KT, RT, Matches

class Preference(Protocol):
    def __lt__(self, __other: Any) -> bool: ...

class AbstractProvider(Generic[RT, CT, KT]):
    def identify(self, requirement_or_candidate: Union[RT, CT]) -> KT: ...
    def get_preference(
        self,
        identifier: KT,
        resolutions: Mapping[KT, CT],
        candidates: Mapping[KT, Iterator[CT]],
        information: Mapping[KT, Iterator[RequirementInformation[RT, CT]]],
        backtrack_causes: Sequence[RequirementInformation[RT, CT]],
    ) -> Preference: ...
    def find_matches(
        self,
        identifier: KT,
        requirements: Mapping[KT, Iterator[RT]],
        incompatibilities: Mapping[KT, Iterator[CT]],
    ) -> Matches: ...
    def is_satisfied_by(self, requirement: RT, candidate: CT) -> bool: ...
    def get_dependencies(self, candidate: CT) -> Iterable[RT]: ...

class AbstractResolver(Generic[RT, CT, KT]):
    base_exception = Exception
    provider: AbstractProvider[RT, CT, KT]
    reporter: BaseReporter
    def __init__(
        self, provider: AbstractProvider[RT, CT, KT], reporter: BaseReporter
    ): ...
python3.12/site-packages/pip/_vendor/resolvelib/__init__.pyi000064400000001064151732701530017772 0ustar00__version__: str

from .providers import AbstractProvider as AbstractProvider
from .providers import AbstractResolver as AbstractResolver
from .reporters import BaseReporter as BaseReporter
from .resolvers import InconsistentCandidate as InconsistentCandidate
from .resolvers import RequirementsConflicted as RequirementsConflicted
from .resolvers import ResolutionError as ResolutionError
from .resolvers import ResolutionImpossible as ResolutionImpossible
from .resolvers import ResolutionTooDeep as ResolutionTooDeep
from .resolvers import Resolver as Resolver
python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-312.pyc000064400000001253151732701530024162 0ustar00�

R`i��L�gd�ZdZddlmZmZddlmZddlmZm	Z	m
Z
mZmZm
Z
y))
�__version__�AbstractProvider�AbstractResolver�BaseReporter�InconsistentCandidate�Resolver�RequirementsConflicted�ResolutionError�ResolutionImpossible�ResolutionTooDeepz1.0.1�)rr)r)rrr	r
rrN)�__all__r�	providersrr�	reportersr�	resolversrrr	r
rr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/resolvelib/__init__.py�<module>rs*������:�#���rpython3.12/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-312.pyc000064400000015364151732701530024450 0ustar00�

R`i���0�Gd�de�ZGd�de�Zy)c�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�AbstractProviderzBDelegate class to provide the required interface for the resolver.c��t�)z�Given a requirement, return an identifier for it.

        This is used to identify a requirement, e.g. whether two requirements
        should have their specifier parts merged.
        ��NotImplementedError)�self�requirement_or_candidates  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/resolvelib/providers.py�identifyzAbstractProvider.identify�
��"�!�c��t�)a�Produce a sort key for given requirement based on preference.

        The preference is defined as "I think this requirement should be
        resolved first". The lower the return value is, the more preferred
        this group of arguments is.

        :param identifier: An identifier as returned by ``identify()``. This
            identifies the dependency matches which should be returned.
        :param resolutions: Mapping of candidates currently pinned by the
            resolver. Each key is an identifier, and the value is a candidate.
            The candidate may conflict with requirements from ``information``.
        :param candidates: Mapping of each dependency's possible candidates.
            Each value is an iterator of candidates.
        :param information: Mapping of requirement information of each package.
            Each value is an iterator of *requirement information*.
        :param backtrack_causes: Sequence of requirement information that were
            the requirements that caused the resolver to most recently backtrack.

        A *requirement information* instance is a named tuple with two members:

        * ``requirement`` specifies a requirement contributing to the current
          list of candidates.
        * ``parent`` specifies the candidate that provides (depended on) the
          requirement, or ``None`` to indicate a root requirement.

        The preference could depend on various issues, including (not
        necessarily in this order):

        * Is this package pinned in the current resolution result?
        * How relaxed is the requirement? Stricter ones should probably be
          worked on first? (I don't know, actually.)
        * How many possibilities are there to satisfy this requirement? Those
          with few left should likely be worked on first, I guess?
        * Are there any known conflicts for this requirement? We should
          probably work on those with the most known conflicts.

        A sortable value should be returned (this will be used as the ``key``
        parameter of the built-in sorting function). The smaller the value is,
        the more preferred this requirement is (i.e. the sorting function
        is called with ``reverse=False``).
        r)r�
identifier�resolutions�
candidates�information�backtrack_causess      r	�get_preferencezAbstractProvider.get_preferences��b"�!rc��t�)a�Find all possible candidates that satisfy the given constraints.

        :param identifier: An identifier as returned by ``identify()``. This
            identifies the dependency matches of which should be returned.
        :param requirements: A mapping of requirements that all returned
            candidates must satisfy. Each key is an identifier, and the value
            an iterator of requirements for that dependency.
        :param incompatibilities: A mapping of known incompatibilities of
            each dependency. Each key is an identifier, and the value an
            iterator of incompatibilities known to the resolver. All
            incompatibilities *must* be excluded from the return value.

        This should try to get candidates based on the requirements' types.
        For VCS, local, and archive requirements, the one-and-only match is
        returned, and for a "named" requirement, the index(es) should be
        consulted to find concrete candidates for this requirement.

        The return value should produce candidates ordered by preference; the
        most preferred candidate should come first. The return type may be one
        of the following:

        * A callable that returns an iterator that yields candidates.
        * An collection of candidates.
        * An iterable of candidates. This will be consumed immediately into a
          list of candidates.
        r)rr�requirements�incompatibilitiess    r	�find_matcheszAbstractProvider.find_matches?s
��6"�!rc��t�)aWhether the given requirement can be satisfied by a candidate.

        The candidate is guaranteed to have been generated from the
        requirement.

        A boolean should be returned to indicate whether ``candidate`` is a
        viable solution to the requirement.
        r)r�requirement�	candidates   r	�is_satisfied_byz AbstractProvider.is_satisfied_by\s
��"�!rc��t�)z�Get dependencies of a candidate.

        This should return a collection of requirements that `candidate`
        specifies as its dependencies.
        r)rrs  r	�get_dependenciesz!AbstractProvider.get_dependenciesgrrN)	�__name__�
__module__�__qualname__�__doc__r
rrrr�rr	rrs��L�"�1"�f"�:	"�"rrc� �eZdZdZeZd�Zd�Zy)�AbstractResolverz3The thing that performs the actual resolution work.c� �||_||_y)N)�provider�reporter)rr&r's   r	�__init__zAbstractResolver.__init__us�� ��
� ��
rc��t�)a�Take a collection of constraints, spit out the resolution result.

        This returns a representation of the final resolution state, with one
        guarenteed attribute ``mapping`` that contains resolved candidates as
        values. The keys are their respective identifiers.

        :param requirements: A collection of constraints.
        :param kwargs: Additional keyword arguments that subclasses may accept.

        :raises: ``self.base_exception`` or its subclass.
        r)rr�kwargss   r	�resolvezAbstractResolver.resolveys
��"�!rN)rrr r!�	Exception�base_exceptionr(r+r"rr	r$r$ps��=��N�!�"rr$N)�objectrr$r"rr	�<module>r/s ��l"�v�l"�^"�v�"rpython3.12/site-packages/pip/_vendor/resolvelib/__pycache__/resolvers.cpython-312.pyc000064400000062511151732701540024454 0ustar00�

R`iP���ddlZddlZddlZddlmZddlmZmZmZejdddg�Z
Gd�d	e�ZGd
�de�Z
Gd�d
e�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Zejdd�ZGd�de�Zd�Zejdd�Zd�ZGd�de�Zy) �N�)�AbstractResolver)�
DirectedGraph�IteratorMapping�build_iter_view�RequirementInformation�requirement�parentc��eZdZdZy)�ResolverExceptionz�A base class for all exceptions raised by this module.

    Exceptions derived by this class should all be handled in this module. Any
    bubbling pass the resolver should be treated as a bug.
    N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.pyrr
s��rrc�$��eZdZ�fd�Zd�Z�xZS)�RequirementsConflictedc�:��tt|�|�||_y�N)�superr�__init__�	criterion)�selfr�	__class__s  �rrzRequirementsConflicted.__init__s���
�$�d�4�Y�?�"��rc��djdjd�|jj�D���S)NzRequirements conflict: {}�, c3�2K�|]}t|����y�wr��repr��.0�rs  r�	<genexpr>z1RequirementsConflicted.__str__.<locals>.<genexpr>�����I�'H�!�d�1�g�'H���)�format�joinr�iter_requirement�rs r�__str__zRequirementsConflicted.__str__s4��*�1�1��I�I�I�t�~�~�'F�'F�'H�I�I�
�	
r�r
rrrr,�
__classcell__�rs@rrrs
���#�
rrc�$��eZdZ�fd�Zd�Z�xZS)�InconsistentCandidatec�J��tt|�||�||_||_yr)rr1r�	candidater)rr3rrs   �rrzInconsistentCandidate.__init__!s#���
�#�T�3�I�y�I�"���"��rc��dj|jdjd�|jj	�D���S)Nz+Provided candidate {!r} does not satisfy {}rc3�2K�|]}t|����y�wrr r"s  rr%z0InconsistentCandidate.__str__.<locals>.<genexpr>)r&r')r(r3r)rr*r+s rr,zInconsistentCandidate.__str__&s;��<�C�C��N�N��I�I�I�t�~�~�'F�'F�'H�I�I�
�	
rr-r/s@rr1r1 s
���#�

rr1c�(�eZdZdZd�Zd�Zd�Zd�Zy)�	CriterionaQRepresentation of possible resolution results of a package.

    This holds three attributes:

    * `information` is a collection of `RequirementInformation` pairs.
      Each pair is a requirement contributing to this criterion, and the
      candidate that provides the requirement.
    * `incompatibilities` is a collection of all known not-to-work candidates
      to exclude from consideration.
    * `candidates` is a collection containing all possible candidates deducted
      from the union of contributing requirements and known incompatibilities.
      It should never be empty, except when the criterion is an attribute of a
      raised `RequirementsConflicted` (in which case it is always empty).

    .. note::
        This class is intended to be externally immutable. **Do not** mutate
        any of its attribute containers.
    c�.�||_||_||_yr��
candidates�information�incompatibilities)rr:r;r<s    rrzCriterion.__init__As��$���&���!2��rc�h�djd�|jD��}dj|�S)Nrc3�FK�|]\}}dj||����y�w)z({!r}, via={!r})N)r()r#�reqr
s   rr%z%Criterion.__repr__.<locals>.<genexpr>Gs)����!
�/���V�
�%�%�c�6�2�/�s�!z
Criterion({}))r)r;r()r�requirementss  r�__repr__zCriterion.__repr__Fs6���y�y�!
�#�/�/�!
�
���%�%�l�3�3rc�(�d�|jD�S)Nc3�4K�|]}|j���y�wr�r	�r#�is  rr%z-Criterion.iter_requirement.<locals>.<genexpr>Ns����8�'7�!��
�
�'7����r;r+s rr*zCriterion.iter_requirementMs��8�t�'7�'7�8�8rc�(�d�|jD�S)Nc3�4K�|]}|j���y�wr�r
rEs  rr%z(Criterion.iter_parent.<locals>.<genexpr>Qs����3�"2�Q����"2�rGrHr+s r�iter_parentzCriterion.iter_parentPs��3�$�"2�"2�3�3rN)r
rrrrrAr*rLrrrr7r7-s���&3�
4�9�4rr7c��eZdZy)�ResolutionErrorN)r
rrrrrrNrNTs��rrNc���eZdZ�fd�Z�xZS)�ResolutionImpossiblec�:��tt|�|�||_yr)rrPr�causes)rrRrs  �rrzResolutionImpossible.__init__Ys���
�"�D�2�6�:���r�r
rrrr.r/s@rrPrPXs
����rrPc���eZdZ�fd�Z�xZS)�ResolutionTooDeepc�:��tt|�|�||_yr)rrUr�round_count)rrWrs  �rrzResolutionTooDeep.__init__`s���
���/��<�&��rrSr/s@rrUrU_s
���'�'rrU�Statez!mapping criteria backtrack_causesc�\�eZdZdZd�Zed��Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zy
)�
Resolutionz�Stateful resolution object.

    This is designed as a one-off object that holds information to kick start
    the resolution process, and holds the results afterwards.
    c�.�||_||_g|_yr)�_p�_r�_states)r�provider�reporters   rrzResolution.__init__ps����������rc�R�	|jdS#t$rtd��wxYw)N����state)r^�
IndexError�AttributeErrorr+s rrczResolution.stateus0��	*��<�<��#�#���	*� ��)�)�	*�s��&c���|jd}t|jj�|jj�|j
dd��}|jj
|�y)z�Push a new state into history.

        This new state will be used to hold resolution results of the next
        coming round.
        rbN��mapping�criteria�backtrack_causes)r^rXrh�copyrirj�append)r�basercs   r�_push_new_statezResolution._push_new_state|s^���|�|�B�����L�L�%�%�'��]�]�'�'�)�!�2�2�1�5�
��
	
�����E�"rc
�p�|jj||��|jj|��}|j	|�}|rt|j�}ng}|jj|t|tjd�||gi�t|tjd�||i���}|r1t|j�}|jt||��n
t||�g}tt!|�||��}|j"st%|��|||<y)N)r	r
)�requirement_or_candidater*r<��
identifierr@r<r9)r]�adding_requirementr\�identify�get�listr<�find_matchesr�operator�methodcaller�
attrgetterr;rlrr7rr:r)	rrir	r
rrrr<�matchesr;s	         r�_add_to_criteriazResolution._add_to_criteria�s/�����"�"�{�6�"�J��W�W�%�%�{�%�K�
��L�L��,�	�� $�Y�%@�%@� A�� "���'�'�&�&�!�(���%�%�&8�9��k�]�+��
.���#�#�$7�8��.�/��'�
����y�4�4�5�K����5�k�6�J�K�1�+�v�F�G�K��&�w�/�#�/�
�	�
�#�#�(��3�3�(���rc
�"�|sy|j�D]t\}}t|j|jD�cgc]7}|j�'|j
j
|j�|vr|��9c}|j�||<�vycc}w)aWRemove information from parents of criteria.

        Concretely, removes all values from each criterion's ``information``
        field that have one of ``parents`` as provider of the requirement.

        :param criteria: The criteria to update.
        :param parents: Identifiers for which to remove information from all criteria.
        N)�itemsr7r:r;r
r\rtr<)rri�parents�keyrr;s      r�!_remove_information_from_criteriaz,Resolution._remove_information_from_criteria�s�����&�n�n�.�N�C��%��$�$�(1�'<�'<��'<��#�*�*�2��7�7�+�+�K�,>�,>�?�w�N�	 �'<���+�+��H�S�M�/��s�<Bc�V�|jj||jjt	|jj
t
jd��t	|jj
t
jd��|jj��S)Nr:r;)rr�resolutionsr:r;rj)	r\�get_preferencercrhrrirxrzrj)r�names  r�_get_preferencezResolution._get_preference�s����w�w�%�%���
�
�*�*�&��
�
�#�#��#�#�L�1��(��
�
�#�#��#�#�M�2��"�Z�Z�8�8�&�
�	
rc����	�jj|�t��fd�|j	�D��S#t$rYywxYw)NFc3�X�K�|]!}�jj|������#y�w�)r	r3N�r\�is_satisfied_by)r#r$�current_pinrs  ��rr%z8Resolution._is_current_pin_satisfying.<locals>.<genexpr>�s-�����
�1��
�G�G�#�#��[�#�I�1���'*)rcrh�KeyError�allr*)rr�rr�s`  @r�_is_current_pin_satisfyingz%Resolution._is_current_pin_satisfying�sU���	��*�*�,�,�T�2�K��
��/�/�1�
�
�	
���	��	�s�A�	A�Ac��|jjj�}|jj	|��D]}|j|||���|S)N�r3rK)rcrirkr\�get_dependenciesr|)rr3rir	s    r�_get_updated_criteriaz Resolution._get_updated_criteria�sQ���:�:�&�&�+�+�-���7�7�3�3�i�3�H�K��!�!�(�K�	�!�J�I��rc�����jj|}g}|jD]��	�j��}t��fd�|j�D��}|st�|���j
j����jjj|��jjj|d���jj|<gcS|S#t$rL}�j
j
|j��|j|j�Yd}~��d}~wwxYw)Nc3�X�K�|]!}�jj|������#y�wr�r�)r#r$r3rs  ��rr%z7Resolution._attempt_to_pin_criterion.<locals>.<genexpr>�s-������5�A����'�'�A��'�K�5�r�r�)rcrir:r�rr]�rejecting_candidaterrlr�r*r1�pinning�updaterh�pop)rr�rrRri�e�	satisfiedr3s`      @r�_attempt_to_pin_criterionz$Resolution._attempt_to_pin_criterion�s����J�J�'�'��-�	���"�-�-�I�
��5�5�i�@����"�3�3�5���I��+�I�y�A�A��G�G�O�O�i�O�0��J�J���&�&�x�0�
�J�J���"�"�4��.�'0�D�J�J���t�$��I�7.�>�
��9*�
����+�+�A�K�K��C��
�
�a�k�k�*���
�s�C7�7	E�AE�Ec����tjd�|D�d�|D��}|D�chc]}�jj|���}}t	�j
�dk\�r/�j
d=d}|s�	�j
j
�}|jj�\}}�jj|�D�	chc]}	�jj|	���}
}	|
j|�}|s��jj�D��cgc]\}}|t!|j"�f��c}}��j%gf���fd�}
�j'�|
�}|ryt	�j
�dk\r��/ycc}w#ttf$rt|��wxYwcc}	wcc}}w)a2Perform backjumping.

        When we enter here, the stack is like this::

            [ state Z ]
            [ state Y ]
            [ state X ]
            .... earlier states are irrelevant.

        1. No pins worked for Z, so it does not have a pin.
        2. We want to reset state Y to unpinned, and pin another candidate.
        3. State X holds what state Y was before the pin, but does not
           have the incompatibility information gathered in state Y.

        Each iteration of the loop will:

        1.  Identify Z. The incompatibility is not always caused by the latest
            state. For example, given three requirements A, B and C, with
            dependencies A1, B1 and C1, where A1 and B1 are incompatible: the
            last state might be related to C, so we want to discard the
            previous state.
        2.  Discard Z.
        3.  Discard Y but remember its incompatibility information gathered
            previously, and the failure we're dealing with right now.
        4.  Push a new state Y' based on X, and apply the incompatibility
            information from Y to Y'.
        5a. If this causes Y' to conflict, we need to backtrack again. Make Y'
            the new Z and go back to step 2.
        5b. If the incompatibilities apply cleanly, end backtracking.
        c3�NK�|]}|j��|j���y�wrrK�r#�cs  rr%z'Resolution._backjump.<locals>.<genexpr>.s����>�v�!����)=�Q�X�X�v�s�%�%c3�4K�|]}|j���y�wrrDr�s  rr%z'Resolution._backjump.<locals>.<genexpr>/s����+�F�q�Q�]�]�F�rG�rbFc�B���D�]\}}|s�
	�jj|}�jj	|t�jjt
jd��t�jjt
jd�||i���}t|�}|sy|j|j�t|t|j�|���jj|<��y#t$rY��wxYw)Nr*r<rqFr9T)rcrir�r\rwrrxryrzr�extendr<r7rvr;)�kr<rr{r:�incompatibilities_from_brokenrs     ��r�_patch_criteriaz-Resolution._backjump.<locals>._patch_criteriaQs���,I�(�A�(�,� �!�$(�J�J�$7�$7��$:�	�#�g�g�2�2�#$�%4� �J�J�/�/�$�1�1�2D�E�&�+:� �J�J�/�/�$�/�/�0C�D�� 1�2�+�
3��G�"1��!9�J�%�$�%�,�,�Y�-H�-H�I�-6�#-�$(��)>�)>�$?�*;�.�D�J�J�'�'��*�/-J�8��/$�!� �!�s�D�	D�DT)�	itertools�chainr\rt�lenr^r�rh�popitemrdr�rPr��
isdisjointrir~rvr<rlrn)rrR�incompatible_reqsr$�incompatible_deps�incompatible_state�broken_stater�r3�d�current_dependenciesr��vr��successr�s`              @r�	_backjumpzResolution._backjumps����>&�O�O�>�v�>�+�F�+�
��;L�L�:K�Q�T�W�W�-�-�a�0�:K��L��$�,�,��1�$����R� �"'��(�7�#'�<�<�#3�#3�#5�L�&2�&:�&:�&B�&B�&D�O�D�)�
"�W�W�5�5�i�@�(�@���G�G�$�$�Q�'�@�%�(�*>�)H�)H�%�*�&�"�)�")�1�1�7�7�9�-�9�D�A�q��D��,�,�-�.�9�-�)�
*�0�0�$���1D�E�
�>
� � �"�%�'�G���G�$�,�,��1�$�R��UM��#�H�-�7�.�v�6�6�7��(��-s�"F�:7F�"F;�$!G�F8c	�L�|jrtd��|jj�t	tj�ig��g|_|D]+}	|j|jj|d���-|j�t|�D�]2}|jj!|��|jjj#�D��cgc]\}}|j%||�s|��}}}|s4|jj'|j��|jcSt)|jjj+��t)|�z
}	t-||j.��}
|j1|
�}|r�|D��
cgc]}|jD]}
|
���}}}
|jj3|��|j5|�}||jj6dd|s�t|jj6��|jjj#�D��chc]\}}||	vr|j%||�s|��}}}|j9|jj|�|j�|jj;||j����5t=|��#t$r$}t|jj��d}~wwxYwcc}}wcc}
}wcc}}w)	Nzalready resolvedrgrK)�index)rc)r�)rR)r�rc)r^�RuntimeErrorr]�startingrX�collections�OrderedDictr|rcrirrPrr;rn�range�starting_roundr~r��ending�set�keys�minr�r��resolving_conflictsr�rjr��ending_roundrU)rr@�
max_roundsr$r��round_indexr�r�unsatisfied_names�satisfied_namesr��failure_causesr�rFrRr��newly_unsatisfied_namess                 r�resolvezResolution.resolve}s����<�<��1�2�2�������
�#�/�/�1��!#�
�
����A�
D��%�%�d�j�j�&9�&9�1�T�%�J��	
���� ��,�K��G�G�"�"��"�5�'+�j�j�&9�&9�&?�&?�&A�!�&A�N�C���6�6�s�I�F��&A�
�!�%������T�Z�Z��0��z�z�!�"�$�*�*�"5�"5�":�":�"<�=��!�A��O�
�(�d�.B�.B�C�D�!�;�;�D�A�N��%3�K�^��Q�]�]��!�]�!�^��K����+�+�6�+�:��.�.��0��17��
�
�+�+�A�.��.�t�z�z�/J�/J�K�K�+/�*�*�*=�*=�*C�*C�*E�+�*E���Y��o�-� �;�;�C��K��*E�(�+��6�6��J�J�'�'�)@���$�$�&��G�G� � �{�$�*�*� �E�c-�f �
�+�+��w*�
D�*�1�;�;�+B�+B�C�C��
D��!��*L��+s*�(K$�*L�)L�"L �$	L�-L�LN)r
rrrr�propertyrcrnr|r�r�r�r�r�r�r�rrrrZrZisR����
�*��*�#�%)�N�2

�
��#�Jm�^L,rrZc���||vry||vry||j�D]I}	|t|�}||vr|j|�yt	||||�s�8|j|�yy#t$rY�XwxYw)NTF)rL�idr��add�_has_route_to_root)rir��all_keys�	connected�p�pkeys      rr�r��s���
�i���
�(���
�c�]�
&�
&�
(��	��B�q�E�?�D��9���M�M�#����h��h�	�B��M�M�#���)����	��	�s�A+�+	A7�6A7�Resultzmapping graph criteriac��|j}|j�D��cic]\}}t|�|��}}}d|td�<t�}|j	d�dh}|j
j�D]~\}}t
|j
|||�s�||vr|j	|�|j�D]8}		|t|	�}
|
|vr|j	|
�|j|
|��:��t|j�D��cic]
\}}||vs�||��c}}||j
��Scc}}w#t$rY��wxYwcc}}w)N)rh�graphri)rhr~r�rr�rir�rLr��connectr�)rcrhr�r�r�r�r�r�rr�r�s           r�
_build_resultr��s@���m�m�G�%,�]�]�_�5�_�T�Q���1��q��_�H�5��H�R��X���O�E�	�I�I�d�O���I��.�.�.�.�0���Y�!�%�.�.�#�x��K���e���I�I�c�N��&�&�(�A�
���1�����5� ��	�	�$���M�M�$��$�)�1��")�-�-�/�D�/�$�!�Q�Q�)�^��A��/�D��������+6���
��
��Es#�D?�E�E
�%E
�	E�Ec��eZdZdZeZdd�Zy)�Resolverz3The thing that performs the actual resolution work.c�~�t|j|j�}|j||��}t	|�S)aTake a collection of constraints, spit out the resolution result.

        The return value is a representation to the final resolution result. It
        is a tuple subclass with three public members:

        * `mapping`: A dict of resolved candidates. Each key is an identifier
            of a requirement (as returned by the provider's `identify` method),
            and the value is the resolved candidate.
        * `graph`: A `DirectedGraph` instance representing the dependency tree.
            The vertices are keys of `mapping`, and each edge represents *why*
            a particular package is included. A special vertex `None` is
            included to represent parents of user-supplied requirements.
        * `criteria`: A dict of "criteria" that hold detailed information on
            how edges in the graph are derived. Each key is an identifier of a
            requirement, and the value is a `Criterion` instance.

        The following exceptions may be raised if a resolution cannot be found:

        * `ResolutionImpossible`: A resolution cannot be found for the given
            combination of requirements. The `causes` attribute of the
            exception is a list of (requirement, parent), giving the
            requirements that could not be satisfied.
        * `ResolutionTooDeep`: The dependency tree is too deeply nested and
            the resolver gave up. This is usually caused by a circular
            dependency, but you can try to resolve this by increasing the
            `max_rounds` argument.
        )r�)rZr_r`r�r�)rr@r��
resolutionrcs     rr�zResolver.resolves8��8 ��
�
�t�}�}�=�
��"�"�<�J�"�G���U�#�#rN)�d)r
rrrr�base_exceptionr�rrrr�r�s��=�&�N�$rr�)r�r�rx�	providersr�structsrrr�
namedtupler�	Exceptionrrr1�objectr7rNrPrUrXrZr�r�r�r�rrr�<module>r�s������'�D�D�/��/�/��}�h�7���
�	��
�.�
�

�-�

�$4��$4�N	�'�	��?��'��'�	����w�(K�L��`,��`,�F�&
 ��	�	��*B�	C���<#$��#$rpython3.12/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-312.pyc000064400000005217151732701540024455 0ustar00�

R`iA���Gd�de�Zy)c�@�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)�BaseReporterz?Delegate class to provider progress reporting for the resolver.c��y)z-Called before the resolution actually starts.N�)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/resolvelib/reporters.py�startingzBaseReporter.starting���c��y)zYCalled before each round of resolution starts.

        The index is zero-based.
        Nr)r�indexs  r�starting_roundzBaseReporter.starting_roundr	r
c��y)z�Called before each round of resolution ends.

        This is NOT called if the resolution ends at this round. Use `ending`
        if you want to report finalization. The index is zero-based.
        Nr)rr�states   r�ending_roundzBaseReporter.ending_round
r	r
c��y)z/Called before the resolution ends successfully.Nr)rrs  r�endingzBaseReporter.endingr	r
c��y)a�Called when adding a new requirement into the resolve criteria.

        :param requirement: The additional requirement to be applied to filter
            the available candidaites.
        :param parent: The candidate that requires ``requirement`` as a
            dependency, or None if ``requirement`` is one of the root
            requirements passed in from ``Resolver.resolve()``.
        Nr)r�requirement�parents   r�adding_requirementzBaseReporter.adding_requirementr	r
c��y)z�Called when starting to attempt requirement conflict resolution.

        :param causes: The information on the collision that caused the backtracking.
        Nr)r�causess  r�resolving_conflictsz BaseReporter.resolving_conflicts!r	r
c��y)z6Called when rejecting a candidate during backtracking.Nr)r�	criterion�	candidates   r�rejecting_candidatez BaseReporter.rejecting_candidate'r	r
c��y)z9Called when adding a candidate to the potential solution.Nr)rrs  r�pinningzBaseReporter.pinning*r	r
N)�__name__�
__module__�__qualname__�__doc__rr
rrrrrrrr
rrrs/��I�<���>���E�Hr
rN)�objectrrr
r�<module>r%s��*H�6�*Hr
python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-312.pyc000064400000024465151732701540024145 0ustar00�

R`ic���ddlZddlmZGd�de�ZGd�dej
�ZGd�d	e�ZGd
�de�Zd�Z	y)
�N�)�collections_abcc�X�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zy)�
DirectedGraphz&A graph structure with directed edges.c�>�t�|_i|_i|_y�N)�set�	_vertices�	_forwards�
_backwards��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/resolvelib/structs.py�__init__zDirectedGraph.__init__	s������������c�,�t|j�Sr)�iterr
r
s r�__iter__zDirectedGraph.__iter__����D�N�N�#�#rc�,�t|j�Sr)�lenr
r
s r�__len__zDirectedGraph.__len__s���4�>�>�"�"rc��||jvSr)r
�r�keys  r�__contains__zDirectedGraph.__contains__s���d�n�n�$�$rc�V�t�}t|j�|_|jj	�D��cic]\}}|t|���c}}|_|j
j	�D��cic]\}}|t|���c}}|_|Scc}}wcc}}w)z$Return a shallow copy of this graph.)rr	r
r�itemsr)r�other�k�vs    r�copyzDirectedGraph.copys�������d�n�n�-���15���1E�1E�1G�H�1G���A�1�c�!�f�9�1G�H���26�/�/�2G�2G�2I�J�2I�$�!�Q�A�s�1�v�I�2I�J������I��Js�B�>B%c���||jvrtd��|jj|�t�|j|<t�|j
|<y)zAdd a new vertex to the graph.z
vertex existsN)r
�
ValueError�addr	rrrs  rr%zDirectedGraph.addsK���$�.�.� ��_�-�-������3��!�e����s��"�u�����rc�2�|jj|�|jj|�D] }|j|j|��"|jj|�D] }|j|j|��"y)zCRemove a vertex from the graph, disconnecting all edges from/to it.N)r
�remover�popr)rr�f�ts    rr'zDirectedGraph.remove'st�������c�"����#�#�C�(�A��O�O�A��%�%�c�*�)����$�$�S�)�A��N�N�1��$�$�S�)�*rc�J�||j|vxr||j|vSr)rr�rr)r*s   r�	connectedzDirectedGraph.connected/s)���D�O�O�A�&�&�A�1����q�0A�+A�Arc��||jvrt|��|j|j|�|j|j|�y)zgConnect two existing vertices.

        Nothing happens if the vertices are already connected.
        N)r
�KeyErrorrr%rr,s   r�connectzDirectedGraph.connect2sH��

�D�N�N�"��1�+�����q����a� ��������q�!rc#�jK�|jj�D]\}}|D]}||f���
�y�wr)rr)rr)�childrenr*s    r�
iter_edgeszDirectedGraph.iter_edges<s4�����>�>�/�/�1�K�A�x�����d�
��2�s�13c�2�t|j|�Sr)rrrs  r�
iter_childrenzDirectedGraph.iter_childrenAs���D�N�N�3�'�(�(rc�2�t|j|�Sr)rrrs  r�iter_parentszDirectedGraph.iter_parentsDs���D�O�O�C�(�)�)rN)�__name__�
__module__�__qualname__�__doc__rrrrr"r%r'r-r0r3r5r7�rrrrsB��0��
$�#�%��%�*�B�"��
)�*rrc�<�eZdZd	d�Zd�Zd�ZeZd�Zd�Zd�Z	d�Z
y)
�IteratorMappingNc�6�||_||_|xsi|_yr)�_mapping�	_accessor�_appends)r�mapping�accessor�appendss    rrzIteratorMapping.__init__Is����
�!����
�2��
rc�d�dj|j|j|j�S)Nz!IteratorMapping({!r}, {!r}, {!r}))�formatr@rArBr
s r�__repr__zIteratorMapping.__repr__Ns*��2�9�9��M�M��N�N��M�M�
�	
rc�H�t|jxs|j�Sr)�boolr@rBr
s r�__bool__zIteratorMapping.__bool__Us���D�M�M�2�T�]�]�3�3rc�>�||jvxs||jvSr)r@rBrs  rrzIteratorMapping.__contains__Zs���d�m�m�#�;�s�d�m�m�';�;rc���	|j|}t	j
|j
|�|jj|d��S#t$rt|j|�cYSwxYw)Nr<)r@r/rrB�	itertools�chainrA�get)rr r!s   r�__getitem__zIteratorMapping.__getitem__]sg��	*��
�
�a� �A����t�~�~�a�0�$�-�-�2C�2C�A�r�2J�K�K���	*���
�
�a�(�)�)�	*�s�A�!A4�3A4c�n���fd��jD�}tj�j|�S)Nc3�@�K�|]}|�jvs�|���y�wr�r@��.0r rs  �r�	<genexpr>z+IteratorMapping.__iter__.<locals>.<genexpr>es�����C�=�a�A�T�]�]�,B��=����)rBrNrOr@�r�mores` rrzIteratorMapping.__iter__ds&���C�4�=�=�C�����t�}�}�d�3�3rc�p��t�fd��jD��}t�j�|zS)Nc3�@�K�|]}|�jvs�d���y�w)rNrTrUs  �rrWz*IteratorMapping.__len__.<locals>.<genexpr>is�����F�m��q��
�
�/E�1�m�rX)�sumrBrr@rYs` rrzIteratorMapping.__len__hs+����F�d�m�m�F�F���4�=�=�!�D�(�(rr)r8r9r:rrHrK�__nonzero__rrQrrr<rrr>r>Hs-��&�

�4��K�<�L�4�)rr>c�,�eZdZdZd�Zd�Zd�ZeZd�Zy)�_FactoryIterableViewa:Wrap an iterator factory returned by `find_matches()`.

    Calling `iter()` on this class would invoke the underlying iterator
    factory, making it a "collection with ordering" that can be iterated
    through multiple times, but lacks random access methods presented in
    built-in Python sequence types.
    c� �||_d|_yr)�_factory�	_iterable)r�factorys  rrz_FactoryIterableView.__init__vs����
���rc�^�djt|�jt|��S�Nz{}({}))rG�typer8�listr
s rrHz_FactoryIterableView.__repr__zs!�����t�D�z�2�2�D��J�?�?rc�L�	tt|��y#t$rYywxYw)NFT)�nextr�
StopIterationr
s rrKz_FactoryIterableView.__bool__}s,��	���d������	��	�s��	#�#c��|j�|j�n|j}tj|�\|_}|Sr)rcrbrN�tee)r�iterable�currents   rrz_FactoryIterableView.__iter__�s;��#�~�~�5�D�M�M�O�4�>�>�	�#,�-�-��"9������rN�	r8r9r:r;rrHrKr^rr<rrr`r`ms#����@���K�rr`c�,�eZdZdZd�Zd�Zd�ZeZd�Zy)�_SequenceIterableViewz�Wrap an iterable returned by find_matches().

    This is essentially just a proxy to the underlying sequence that provides
    the same interface as `_FactoryIterableView`.
    c��||_yr)�	_sequence)r�sequences  rrz_SequenceIterableView.__init__�s	��!��rc�`�djt|�j|j�Srf)rGrgr8rtr
s rrHz_SequenceIterableView.__repr__�s!�����t�D�z�2�2�D�N�N�C�Crc�,�t|j�Sr)rJrtr
s rrKz_SequenceIterableView.__bool__�rrc�,�t|j�Sr)rrtr
s rrz_SequenceIterableView.__iter__�rrNrpr<rrrrrr�s#���"�D�$��K�$rrrc��t|�rt|�St|tj�st|�}t
|�S)zCBuild an iterable view from the value returned by `find_matches()`.)�callabler`�
isinstancer�Sequencerhrr)�matchess r�build_iter_viewr~�s9�����#�G�,�,��g��7�7�8��w�-�� ��)�)r)
rN�compatr�objectr�Mappingr>r`rrr~r<rr�<module>r�sI���#�?*�F�?*�D")�o�-�-�")�J�6��B$�F�$�,*rpython3.12/site-packages/pip/_vendor/resolvelib/providers.py000064400000013357151732701540020110 0ustar00class AbstractProvider(object):
    """Delegate class to provide the required interface for the resolver."""

    def identify(self, requirement_or_candidate):
        """Given a requirement, return an identifier for it.

        This is used to identify a requirement, e.g. whether two requirements
        should have their specifier parts merged.
        """
        raise NotImplementedError

    def get_preference(
        self,
        identifier,
        resolutions,
        candidates,
        information,
        backtrack_causes,
    ):
        """Produce a sort key for given requirement based on preference.

        The preference is defined as "I think this requirement should be
        resolved first". The lower the return value is, the more preferred
        this group of arguments is.

        :param identifier: An identifier as returned by ``identify()``. This
            identifies the dependency matches which should be returned.
        :param resolutions: Mapping of candidates currently pinned by the
            resolver. Each key is an identifier, and the value is a candidate.
            The candidate may conflict with requirements from ``information``.
        :param candidates: Mapping of each dependency's possible candidates.
            Each value is an iterator of candidates.
        :param information: Mapping of requirement information of each package.
            Each value is an iterator of *requirement information*.
        :param backtrack_causes: Sequence of requirement information that were
            the requirements that caused the resolver to most recently backtrack.

        A *requirement information* instance is a named tuple with two members:

        * ``requirement`` specifies a requirement contributing to the current
          list of candidates.
        * ``parent`` specifies the candidate that provides (depended on) the
          requirement, or ``None`` to indicate a root requirement.

        The preference could depend on various issues, including (not
        necessarily in this order):

        * Is this package pinned in the current resolution result?
        * How relaxed is the requirement? Stricter ones should probably be
          worked on first? (I don't know, actually.)
        * How many possibilities are there to satisfy this requirement? Those
          with few left should likely be worked on first, I guess?
        * Are there any known conflicts for this requirement? We should
          probably work on those with the most known conflicts.

        A sortable value should be returned (this will be used as the ``key``
        parameter of the built-in sorting function). The smaller the value is,
        the more preferred this requirement is (i.e. the sorting function
        is called with ``reverse=False``).
        """
        raise NotImplementedError

    def find_matches(self, identifier, requirements, incompatibilities):
        """Find all possible candidates that satisfy the given constraints.

        :param identifier: An identifier as returned by ``identify()``. This
            identifies the dependency matches of which should be returned.
        :param requirements: A mapping of requirements that all returned
            candidates must satisfy. Each key is an identifier, and the value
            an iterator of requirements for that dependency.
        :param incompatibilities: A mapping of known incompatibilities of
            each dependency. Each key is an identifier, and the value an
            iterator of incompatibilities known to the resolver. All
            incompatibilities *must* be excluded from the return value.

        This should try to get candidates based on the requirements' types.
        For VCS, local, and archive requirements, the one-and-only match is
        returned, and for a "named" requirement, the index(es) should be
        consulted to find concrete candidates for this requirement.

        The return value should produce candidates ordered by preference; the
        most preferred candidate should come first. The return type may be one
        of the following:

        * A callable that returns an iterator that yields candidates.
        * An collection of candidates.
        * An iterable of candidates. This will be consumed immediately into a
          list of candidates.
        """
        raise NotImplementedError

    def is_satisfied_by(self, requirement, candidate):
        """Whether the given requirement can be satisfied by a candidate.

        The candidate is guaranteed to have been generated from the
        requirement.

        A boolean should be returned to indicate whether ``candidate`` is a
        viable solution to the requirement.
        """
        raise NotImplementedError

    def get_dependencies(self, candidate):
        """Get dependencies of a candidate.

        This should return a collection of requirements that `candidate`
        specifies as its dependencies.
        """
        raise NotImplementedError


class AbstractResolver(object):
    """The thing that performs the actual resolution work."""

    base_exception = Exception

    def __init__(self, provider, reporter):
        self.provider = provider
        self.reporter = reporter

    def resolve(self, requirements, **kwargs):
        """Take a collection of constraints, spit out the resolution result.

        This returns a representation of the final resolution state, with one
        guarenteed attribute ``mapping`` that contains resolved candidates as
        values. The keys are their respective identifiers.

        :param requirements: A collection of constraints.
        :param kwargs: Additional keyword arguments that subclasses may accept.

        :raises: ``self.base_exception`` or its subclass.
        """
        raise NotImplementedError
python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py000064400000050037151732701550020114 0ustar00import collections
import itertools
import operator

from .providers import AbstractResolver
from .structs import DirectedGraph, IteratorMapping, build_iter_view

RequirementInformation = collections.namedtuple(
    "RequirementInformation", ["requirement", "parent"]
)


class ResolverException(Exception):
    """A base class for all exceptions raised by this module.

    Exceptions derived by this class should all be handled in this module. Any
    bubbling pass the resolver should be treated as a bug.
    """


class RequirementsConflicted(ResolverException):
    def __init__(self, criterion):
        super(RequirementsConflicted, self).__init__(criterion)
        self.criterion = criterion

    def __str__(self):
        return "Requirements conflict: {}".format(
            ", ".join(repr(r) for r in self.criterion.iter_requirement()),
        )


class InconsistentCandidate(ResolverException):
    def __init__(self, candidate, criterion):
        super(InconsistentCandidate, self).__init__(candidate, criterion)
        self.candidate = candidate
        self.criterion = criterion

    def __str__(self):
        return "Provided candidate {!r} does not satisfy {}".format(
            self.candidate,
            ", ".join(repr(r) for r in self.criterion.iter_requirement()),
        )


class Criterion(object):
    """Representation of possible resolution results of a package.

    This holds three attributes:

    * `information` is a collection of `RequirementInformation` pairs.
      Each pair is a requirement contributing to this criterion, and the
      candidate that provides the requirement.
    * `incompatibilities` is a collection of all known not-to-work candidates
      to exclude from consideration.
    * `candidates` is a collection containing all possible candidates deducted
      from the union of contributing requirements and known incompatibilities.
      It should never be empty, except when the criterion is an attribute of a
      raised `RequirementsConflicted` (in which case it is always empty).

    .. note::
        This class is intended to be externally immutable. **Do not** mutate
        any of its attribute containers.
    """

    def __init__(self, candidates, information, incompatibilities):
        self.candidates = candidates
        self.information = information
        self.incompatibilities = incompatibilities

    def __repr__(self):
        requirements = ", ".join(
            "({!r}, via={!r})".format(req, parent)
            for req, parent in self.information
        )
        return "Criterion({})".format(requirements)

    def iter_requirement(self):
        return (i.requirement for i in self.information)

    def iter_parent(self):
        return (i.parent for i in self.information)


class ResolutionError(ResolverException):
    pass


class ResolutionImpossible(ResolutionError):
    def __init__(self, causes):
        super(ResolutionImpossible, self).__init__(causes)
        # causes is a list of RequirementInformation objects
        self.causes = causes


class ResolutionTooDeep(ResolutionError):
    def __init__(self, round_count):
        super(ResolutionTooDeep, self).__init__(round_count)
        self.round_count = round_count


# Resolution state in a round.
State = collections.namedtuple("State", "mapping criteria backtrack_causes")


class Resolution(object):
    """Stateful resolution object.

    This is designed as a one-off object that holds information to kick start
    the resolution process, and holds the results afterwards.
    """

    def __init__(self, provider, reporter):
        self._p = provider
        self._r = reporter
        self._states = []

    @property
    def state(self):
        try:
            return self._states[-1]
        except IndexError:
            raise AttributeError("state")

    def _push_new_state(self):
        """Push a new state into history.

        This new state will be used to hold resolution results of the next
        coming round.
        """
        base = self._states[-1]
        state = State(
            mapping=base.mapping.copy(),
            criteria=base.criteria.copy(),
            backtrack_causes=base.backtrack_causes[:],
        )
        self._states.append(state)

    def _add_to_criteria(self, criteria, requirement, parent):
        self._r.adding_requirement(requirement=requirement, parent=parent)

        identifier = self._p.identify(requirement_or_candidate=requirement)
        criterion = criteria.get(identifier)
        if criterion:
            incompatibilities = list(criterion.incompatibilities)
        else:
            incompatibilities = []

        matches = self._p.find_matches(
            identifier=identifier,
            requirements=IteratorMapping(
                criteria,
                operator.methodcaller("iter_requirement"),
                {identifier: [requirement]},
            ),
            incompatibilities=IteratorMapping(
                criteria,
                operator.attrgetter("incompatibilities"),
                {identifier: incompatibilities},
            ),
        )

        if criterion:
            information = list(criterion.information)
            information.append(RequirementInformation(requirement, parent))
        else:
            information = [RequirementInformation(requirement, parent)]

        criterion = Criterion(
            candidates=build_iter_view(matches),
            information=information,
            incompatibilities=incompatibilities,
        )
        if not criterion.candidates:
            raise RequirementsConflicted(criterion)
        criteria[identifier] = criterion

    def _remove_information_from_criteria(self, criteria, parents):
        """Remove information from parents of criteria.

        Concretely, removes all values from each criterion's ``information``
        field that have one of ``parents`` as provider of the requirement.

        :param criteria: The criteria to update.
        :param parents: Identifiers for which to remove information from all criteria.
        """
        if not parents:
            return
        for key, criterion in criteria.items():
            criteria[key] = Criterion(
                criterion.candidates,
                [
                    information
                    for information in criterion.information
                    if (
                        information.parent is None
                        or self._p.identify(information.parent) not in parents
                    )
                ],
                criterion.incompatibilities,
            )

    def _get_preference(self, name):
        return self._p.get_preference(
            identifier=name,
            resolutions=self.state.mapping,
            candidates=IteratorMapping(
                self.state.criteria,
                operator.attrgetter("candidates"),
            ),
            information=IteratorMapping(
                self.state.criteria,
                operator.attrgetter("information"),
            ),
            backtrack_causes=self.state.backtrack_causes,
        )

    def _is_current_pin_satisfying(self, name, criterion):
        try:
            current_pin = self.state.mapping[name]
        except KeyError:
            return False
        return all(
            self._p.is_satisfied_by(requirement=r, candidate=current_pin)
            for r in criterion.iter_requirement()
        )

    def _get_updated_criteria(self, candidate):
        criteria = self.state.criteria.copy()
        for requirement in self._p.get_dependencies(candidate=candidate):
            self._add_to_criteria(criteria, requirement, parent=candidate)
        return criteria

    def _attempt_to_pin_criterion(self, name):
        criterion = self.state.criteria[name]

        causes = []
        for candidate in criterion.candidates:
            try:
                criteria = self._get_updated_criteria(candidate)
            except RequirementsConflicted as e:
                self._r.rejecting_candidate(e.criterion, candidate)
                causes.append(e.criterion)
                continue

            # Check the newly-pinned candidate actually works. This should
            # always pass under normal circumstances, but in the case of a
            # faulty provider, we will raise an error to notify the implementer
            # to fix find_matches() and/or is_satisfied_by().
            satisfied = all(
                self._p.is_satisfied_by(requirement=r, candidate=candidate)
                for r in criterion.iter_requirement()
            )
            if not satisfied:
                raise InconsistentCandidate(candidate, criterion)

            self._r.pinning(candidate=candidate)
            self.state.criteria.update(criteria)

            # Put newly-pinned candidate at the end. This is essential because
            # backtracking looks at this mapping to get the last pin.
            self.state.mapping.pop(name, None)
            self.state.mapping[name] = candidate

            return []

        # All candidates tried, nothing works. This criterion is a dead
        # end, signal for backtracking.
        return causes

    def _backjump(self, causes):
        """Perform backjumping.

        When we enter here, the stack is like this::

            [ state Z ]
            [ state Y ]
            [ state X ]
            .... earlier states are irrelevant.

        1. No pins worked for Z, so it does not have a pin.
        2. We want to reset state Y to unpinned, and pin another candidate.
        3. State X holds what state Y was before the pin, but does not
           have the incompatibility information gathered in state Y.

        Each iteration of the loop will:

        1.  Identify Z. The incompatibility is not always caused by the latest
            state. For example, given three requirements A, B and C, with
            dependencies A1, B1 and C1, where A1 and B1 are incompatible: the
            last state might be related to C, so we want to discard the
            previous state.
        2.  Discard Z.
        3.  Discard Y but remember its incompatibility information gathered
            previously, and the failure we're dealing with right now.
        4.  Push a new state Y' based on X, and apply the incompatibility
            information from Y to Y'.
        5a. If this causes Y' to conflict, we need to backtrack again. Make Y'
            the new Z and go back to step 2.
        5b. If the incompatibilities apply cleanly, end backtracking.
        """
        incompatible_reqs = itertools.chain(
            (c.parent for c in causes if c.parent is not None),
            (c.requirement for c in causes),
        )
        incompatible_deps = {self._p.identify(r) for r in incompatible_reqs}
        while len(self._states) >= 3:
            # Remove the state that triggered backtracking.
            del self._states[-1]

            # Ensure to backtrack to a state that caused the incompatibility
            incompatible_state = False
            while not incompatible_state:
                # Retrieve the last candidate pin and known incompatibilities.
                try:
                    broken_state = self._states.pop()
                    name, candidate = broken_state.mapping.popitem()
                except (IndexError, KeyError):
                    raise ResolutionImpossible(causes)
                current_dependencies = {
                    self._p.identify(d)
                    for d in self._p.get_dependencies(candidate)
                }
                incompatible_state = not current_dependencies.isdisjoint(
                    incompatible_deps
                )

            incompatibilities_from_broken = [
                (k, list(v.incompatibilities))
                for k, v in broken_state.criteria.items()
            ]

            # Also mark the newly known incompatibility.
            incompatibilities_from_broken.append((name, [candidate]))

            # Create a new state from the last known-to-work one, and apply
            # the previously gathered incompatibility information.
            def _patch_criteria():
                for k, incompatibilities in incompatibilities_from_broken:
                    if not incompatibilities:
                        continue
                    try:
                        criterion = self.state.criteria[k]
                    except KeyError:
                        continue
                    matches = self._p.find_matches(
                        identifier=k,
                        requirements=IteratorMapping(
                            self.state.criteria,
                            operator.methodcaller("iter_requirement"),
                        ),
                        incompatibilities=IteratorMapping(
                            self.state.criteria,
                            operator.attrgetter("incompatibilities"),
                            {k: incompatibilities},
                        ),
                    )
                    candidates = build_iter_view(matches)
                    if not candidates:
                        return False
                    incompatibilities.extend(criterion.incompatibilities)
                    self.state.criteria[k] = Criterion(
                        candidates=candidates,
                        information=list(criterion.information),
                        incompatibilities=incompatibilities,
                    )
                return True

            self._push_new_state()
            success = _patch_criteria()

            # It works! Let's work on this new state.
            if success:
                return True

            # State does not work after applying known incompatibilities.
            # Try the still previous state.

        # No way to backtrack anymore.
        return False

    def resolve(self, requirements, max_rounds):
        if self._states:
            raise RuntimeError("already resolved")

        self._r.starting()

        # Initialize the root state.
        self._states = [
            State(
                mapping=collections.OrderedDict(),
                criteria={},
                backtrack_causes=[],
            )
        ]
        for r in requirements:
            try:
                self._add_to_criteria(self.state.criteria, r, parent=None)
            except RequirementsConflicted as e:
                raise ResolutionImpossible(e.criterion.information)

        # The root state is saved as a sentinel so the first ever pin can have
        # something to backtrack to if it fails. The root state is basically
        # pinning the virtual "root" package in the graph.
        self._push_new_state()

        for round_index in range(max_rounds):
            self._r.starting_round(index=round_index)

            unsatisfied_names = [
                key
                for key, criterion in self.state.criteria.items()
                if not self._is_current_pin_satisfying(key, criterion)
            ]

            # All criteria are accounted for. Nothing more to pin, we are done!
            if not unsatisfied_names:
                self._r.ending(state=self.state)
                return self.state

            # keep track of satisfied names to calculate diff after pinning
            satisfied_names = set(self.state.criteria.keys()) - set(
                unsatisfied_names
            )

            # Choose the most preferred unpinned criterion to try.
            name = min(unsatisfied_names, key=self._get_preference)
            failure_causes = self._attempt_to_pin_criterion(name)

            if failure_causes:
                causes = [i for c in failure_causes for i in c.information]
                # Backjump if pinning fails. The backjump process puts us in
                # an unpinned state, so we can work on it in the next round.
                self._r.resolving_conflicts(causes=causes)
                success = self._backjump(causes)
                self.state.backtrack_causes[:] = causes

                # Dead ends everywhere. Give up.
                if not success:
                    raise ResolutionImpossible(self.state.backtrack_causes)
            else:
                # discard as information sources any invalidated names
                # (unsatisfied names that were previously satisfied)
                newly_unsatisfied_names = {
                    key
                    for key, criterion in self.state.criteria.items()
                    if key in satisfied_names
                    and not self._is_current_pin_satisfying(key, criterion)
                }
                self._remove_information_from_criteria(
                    self.state.criteria, newly_unsatisfied_names
                )
                # Pinning was successful. Push a new state to do another pin.
                self._push_new_state()

            self._r.ending_round(index=round_index, state=self.state)

        raise ResolutionTooDeep(max_rounds)


def _has_route_to_root(criteria, key, all_keys, connected):
    if key in connected:
        return True
    if key not in criteria:
        return False
    for p in criteria[key].iter_parent():
        try:
            pkey = all_keys[id(p)]
        except KeyError:
            continue
        if pkey in connected:
            connected.add(key)
            return True
        if _has_route_to_root(criteria, pkey, all_keys, connected):
            connected.add(key)
            return True
    return False


Result = collections.namedtuple("Result", "mapping graph criteria")


def _build_result(state):
    mapping = state.mapping
    all_keys = {id(v): k for k, v in mapping.items()}
    all_keys[id(None)] = None

    graph = DirectedGraph()
    graph.add(None)  # Sentinel as root dependencies' parent.

    connected = {None}
    for key, criterion in state.criteria.items():
        if not _has_route_to_root(state.criteria, key, all_keys, connected):
            continue
        if key not in graph:
            graph.add(key)
        for p in criterion.iter_parent():
            try:
                pkey = all_keys[id(p)]
            except KeyError:
                continue
            if pkey not in graph:
                graph.add(pkey)
            graph.connect(pkey, key)

    return Result(
        mapping={k: v for k, v in mapping.items() if k in connected},
        graph=graph,
        criteria=state.criteria,
    )


class Resolver(AbstractResolver):
    """The thing that performs the actual resolution work."""

    base_exception = ResolverException

    def resolve(self, requirements, max_rounds=100):
        """Take a collection of constraints, spit out the resolution result.

        The return value is a representation to the final resolution result. It
        is a tuple subclass with three public members:

        * `mapping`: A dict of resolved candidates. Each key is an identifier
            of a requirement (as returned by the provider's `identify` method),
            and the value is the resolved candidate.
        * `graph`: A `DirectedGraph` instance representing the dependency tree.
            The vertices are keys of `mapping`, and each edge represents *why*
            a particular package is included. A special vertex `None` is
            included to represent parents of user-supplied requirements.
        * `criteria`: A dict of "criteria" that hold detailed information on
            how edges in the graph are derived. Each key is an identifier of a
            requirement, and the value is a `Criterion` instance.

        The following exceptions may be raised if a resolution cannot be found:

        * `ResolutionImpossible`: A resolution cannot be found for the given
            combination of requirements. The `causes` attribute of the
            exception is a list of (requirement, parent), giving the
            requirements that could not be satisfied.
        * `ResolutionTooDeep`: The dependency tree is too deeply nested and
            the resolver gave up. This is usually caused by a circular
            dependency, but you can try to resolve this by increasing the
            `max_rounds` argument.
        """
        resolution = Resolution(self.provider, self.reporter)
        state = resolution.resolve(requirements, max_rounds=max_rounds)
        return _build_result(state)
python3.12/site-packages/pip/_vendor/resolvelib/structs.pyi000064400000002141151732701550017741 0ustar00from abc import ABCMeta
from typing import (
    Callable,
    Container,
    Generic,
    Iterable,
    Iterator,
    Mapping,
    Tuple,
    TypeVar,
    Union,
)

KT = TypeVar("KT")  # Identifier.
RT = TypeVar("RT")  # Requirement.
CT = TypeVar("CT")  # Candidate.
_T = TypeVar("_T")

Matches = Union[Iterable[CT], Callable[[], Iterable[CT]]]

class IteratorMapping(Mapping[KT, _T], metaclass=ABCMeta):
    pass

class IterableView(Container[CT], Iterable[CT], metaclass=ABCMeta):
    pass

class DirectedGraph(Generic[KT]):
    def __iter__(self) -> Iterator[KT]: ...
    def __len__(self) -> int: ...
    def __contains__(self, key: KT) -> bool: ...
    def copy(self) -> "DirectedGraph[KT]": ...
    def add(self, key: KT) -> None: ...
    def remove(self, key: KT) -> None: ...
    def connected(self, f: KT, t: KT) -> bool: ...
    def connect(self, f: KT, t: KT) -> None: ...
    def iter_edges(self) -> Iterable[Tuple[KT, KT]]: ...
    def iter_children(self, key: KT) -> Iterable[KT]: ...
    def iter_parents(self, key: KT) -> Iterable[KT]: ...

def build_iter_view(matches: Matches) -> IterableView[CT]: ...
python3.12/site-packages/pip/_vendor/resolvelib/resolvers.pyi000064400000004672151732701560020272 0ustar00from typing import (
    Collection,
    Generic,
    Iterable,
    Iterator,
    List,
    Mapping,
    Optional,
)

from .providers import AbstractProvider, AbstractResolver
from .structs import CT, KT, RT, DirectedGraph, IterableView

# This should be a NamedTuple, but Python 3.6 has a bug that prevents it.
# https://stackoverflow.com/a/50531189/1376863
class RequirementInformation(tuple, Generic[RT, CT]):
    requirement: RT
    parent: Optional[CT]

class Criterion(Generic[RT, CT, KT]):
    candidates: IterableView[CT]
    information: Collection[RequirementInformation[RT, CT]]
    incompatibilities: List[CT]
    @classmethod
    def from_requirement(
        cls,
        provider: AbstractProvider[RT, CT, KT],
        requirement: RT,
        parent: Optional[CT],
    ) -> Criterion[RT, CT, KT]: ...
    def iter_requirement(self) -> Iterator[RT]: ...
    def iter_parent(self) -> Iterator[Optional[CT]]: ...
    def merged_with(
        self,
        provider: AbstractProvider[RT, CT, KT],
        requirement: RT,
        parent: Optional[CT],
    ) -> Criterion[RT, CT, KT]: ...
    def excluded_of(self, candidates: List[CT]) -> Criterion[RT, CT, KT]: ...

class ResolverException(Exception): ...

class RequirementsConflicted(ResolverException, Generic[RT, CT, KT]):
    criterion: Criterion[RT, CT, KT]

class ResolutionError(ResolverException): ...

class InconsistentCandidate(ResolverException, Generic[RT, CT, KT]):
    candidate: CT
    criterion: Criterion[RT, CT, KT]

class ResolutionImpossible(ResolutionError, Generic[RT, CT]):
    causes: List[RequirementInformation[RT, CT]]

class ResolutionTooDeep(ResolutionError):
    round_count: int

# This should be a NamedTuple, but Python 3.6 has a bug that prevents it.
# https://stackoverflow.com/a/50531189/1376863
class State(tuple, Generic[RT, CT, KT]):
    mapping: Mapping[KT, CT]
    criteria: Mapping[KT, Criterion[RT, CT, KT]]
    backtrack_causes: Collection[RequirementInformation[RT, CT]]

class Resolution(Generic[RT, CT, KT]):
    def resolve(
        self, requirements: Iterable[RT], max_rounds: int
    ) -> State[RT, CT, KT]: ...

class Result(Generic[RT, CT, KT]):
    mapping: Mapping[KT, CT]
    graph: DirectedGraph[Optional[KT]]
    criteria: Mapping[KT, Criterion[RT, CT, KT]]

class Resolver(AbstractResolver, Generic[RT, CT, KT]):
    base_exception = ResolverException
    def resolve(
        self, requirements: Iterable[RT], max_rounds: int = 100
    ) -> Result[RT, CT, KT]: ...
python3.12/site-packages/pip/_vendor/resolvelib/reporters.py000064400000003101151732701560020104 0ustar00class BaseReporter(object):
    """Delegate class to provider progress reporting for the resolver."""

    def starting(self):
        """Called before the resolution actually starts."""

    def starting_round(self, index):
        """Called before each round of resolution starts.

        The index is zero-based.
        """

    def ending_round(self, index, state):
        """Called before each round of resolution ends.

        This is NOT called if the resolution ends at this round. Use `ending`
        if you want to report finalization. The index is zero-based.
        """

    def ending(self, state):
        """Called before the resolution ends successfully."""

    def adding_requirement(self, requirement, parent):
        """Called when adding a new requirement into the resolve criteria.

        :param requirement: The additional requirement to be applied to filter
            the available candidaites.
        :param parent: The candidate that requires ``requirement`` as a
            dependency, or None if ``requirement`` is one of the root
            requirements passed in from ``Resolver.resolve()``.
        """

    def resolving_conflicts(self, causes):
        """Called when starting to attempt requirement conflict resolution.

        :param causes: The information on the collision that caused the backtracking.
        """

    def rejecting_candidate(self, criterion, candidate):
        """Called when rejecting a candidate during backtracking."""

    def pinning(self, candidate):
        """Called when adding a candidate to the potential solution."""
python3.12/site-packages/pip/_vendor/resolvelib/__init__.py000064400000001031151732701560017616 0ustar00__all__ = [
    "__version__",
    "AbstractProvider",
    "AbstractResolver",
    "BaseReporter",
    "InconsistentCandidate",
    "Resolver",
    "RequirementsConflicted",
    "ResolutionError",
    "ResolutionImpossible",
    "ResolutionTooDeep",
]

__version__ = "1.0.1"


from .providers import AbstractProvider, AbstractResolver
from .reporters import BaseReporter
from .resolvers import (
    InconsistentCandidate,
    RequirementsConflicted,
    ResolutionError,
    ResolutionImpossible,
    ResolutionTooDeep,
    Resolver,
)
python3.12/site-packages/pip/_vendor/resolvelib/compat/collections_abc.pyi000064400000000056151732701570022645 0ustar00from collections.abc import Mapping, Sequence
python3.12/site-packages/pip/_vendor/resolvelib/compat/__pycache__/__init__.cpython-312.pyc000064400000000371151732701570025451 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__init__.py�<module>rs�rpython3.12/site-packages/pip/_vendor/resolvelib/compat/__pycache__/collections_abc.cpython-312.pyc000064400000000725151732701600027032 0ustar00�

R`i���D�ddgZ	ddlmZmZy#e$rddlmZmZYywxYw)�Mapping�Sequence�)rrN)�__all__�collections.abcrr�ImportError�collections����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py�<module>rs/���j�
!��.�1�1���.�-�-�.�s��
�python3.12/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py000064400000000234151732701600022464 0ustar00__all__ = ["Mapping", "Sequence"]

try:
    from collections.abc import Mapping, Sequence
except ImportError:
    from collections import Mapping, Sequence
python3.12/site-packages/pip/_vendor/resolvelib/compat/__init__.py000064400000000000151732701600021067 0ustar00python3.12/site-packages/pip/_vendor/resolvelib/reporters.pyi000064400000000767151732701600020267 0ustar00from typing import Any

class BaseReporter:
    def starting(self) -> Any: ...
    def starting_round(self, index: int) -> Any: ...
    def ending_round(self, index: int, state: Any) -> Any: ...
    def ending(self, state: Any) -> Any: ...
    def adding_requirement(self, requirement: Any, parent: Any) -> Any: ...
    def rejecting_candidate(self, criterion: Any, candidate: Any) -> Any: ...
    def resolving_conflicts(self, causes: Any) -> Any: ...
    def pinning(self, candidate: Any) -> Any: ...
python3.12/site-packages/pip/_vendor/resolvelib/py.typed000064400000000000151732701600017172 0ustar00python3.12/site-packages/pip/_vendor/resolvelib/structs.py000064400000011543151732701600017572 0ustar00import itertools

from .compat import collections_abc


class DirectedGraph(object):
    """A graph structure with directed edges."""

    def __init__(self):
        self._vertices = set()
        self._forwards = {}  # <key> -> Set[<key>]
        self._backwards = {}  # <key> -> Set[<key>]

    def __iter__(self):
        return iter(self._vertices)

    def __len__(self):
        return len(self._vertices)

    def __contains__(self, key):
        return key in self._vertices

    def copy(self):
        """Return a shallow copy of this graph."""
        other = DirectedGraph()
        other._vertices = set(self._vertices)
        other._forwards = {k: set(v) for k, v in self._forwards.items()}
        other._backwards = {k: set(v) for k, v in self._backwards.items()}
        return other

    def add(self, key):
        """Add a new vertex to the graph."""
        if key in self._vertices:
            raise ValueError("vertex exists")
        self._vertices.add(key)
        self._forwards[key] = set()
        self._backwards[key] = set()

    def remove(self, key):
        """Remove a vertex from the graph, disconnecting all edges from/to it."""
        self._vertices.remove(key)
        for f in self._forwards.pop(key):
            self._backwards[f].remove(key)
        for t in self._backwards.pop(key):
            self._forwards[t].remove(key)

    def connected(self, f, t):
        return f in self._backwards[t] and t in self._forwards[f]

    def connect(self, f, t):
        """Connect two existing vertices.

        Nothing happens if the vertices are already connected.
        """
        if t not in self._vertices:
            raise KeyError(t)
        self._forwards[f].add(t)
        self._backwards[t].add(f)

    def iter_edges(self):
        for f, children in self._forwards.items():
            for t in children:
                yield f, t

    def iter_children(self, key):
        return iter(self._forwards[key])

    def iter_parents(self, key):
        return iter(self._backwards[key])


class IteratorMapping(collections_abc.Mapping):
    def __init__(self, mapping, accessor, appends=None):
        self._mapping = mapping
        self._accessor = accessor
        self._appends = appends or {}

    def __repr__(self):
        return "IteratorMapping({!r}, {!r}, {!r})".format(
            self._mapping,
            self._accessor,
            self._appends,
        )

    def __bool__(self):
        return bool(self._mapping or self._appends)

    __nonzero__ = __bool__  # XXX: Python 2.

    def __contains__(self, key):
        return key in self._mapping or key in self._appends

    def __getitem__(self, k):
        try:
            v = self._mapping[k]
        except KeyError:
            return iter(self._appends[k])
        return itertools.chain(self._accessor(v), self._appends.get(k, ()))

    def __iter__(self):
        more = (k for k in self._appends if k not in self._mapping)
        return itertools.chain(self._mapping, more)

    def __len__(self):
        more = sum(1 for k in self._appends if k not in self._mapping)
        return len(self._mapping) + more


class _FactoryIterableView(object):
    """Wrap an iterator factory returned by `find_matches()`.

    Calling `iter()` on this class would invoke the underlying iterator
    factory, making it a "collection with ordering" that can be iterated
    through multiple times, but lacks random access methods presented in
    built-in Python sequence types.
    """

    def __init__(self, factory):
        self._factory = factory
        self._iterable = None

    def __repr__(self):
        return "{}({})".format(type(self).__name__, list(self))

    def __bool__(self):
        try:
            next(iter(self))
        except StopIteration:
            return False
        return True

    __nonzero__ = __bool__  # XXX: Python 2.

    def __iter__(self):
        iterable = (
            self._factory() if self._iterable is None else self._iterable
        )
        self._iterable, current = itertools.tee(iterable)
        return current


class _SequenceIterableView(object):
    """Wrap an iterable returned by find_matches().

    This is essentially just a proxy to the underlying sequence that provides
    the same interface as `_FactoryIterableView`.
    """

    def __init__(self, sequence):
        self._sequence = sequence

    def __repr__(self):
        return "{}({})".format(type(self).__name__, self._sequence)

    def __bool__(self):
        return bool(self._sequence)

    __nonzero__ = __bool__  # XXX: Python 2.

    def __iter__(self):
        return iter(self._sequence)


def build_iter_view(matches):
    """Build an iterable view from the value returned by `find_matches()`."""
    if callable(matches):
        return _FactoryIterableView(matches)
    if not isinstance(matches, collections_abc.Sequence):
        matches = list(matches)
    return _SequenceIterableView(matches)
python3.12/site-packages/pip/_vendor/distlib/compat.py000064400000120453151732701600016633 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2017 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import absolute_import

import os
import re
import sys

try:
    import ssl
except ImportError:  # pragma: no cover
    ssl = None

if sys.version_info[0] < 3:  # pragma: no cover
    from StringIO import StringIO
    string_types = basestring,
    text_type = unicode
    from types import FileType as file_type
    import __builtin__ as builtins
    import ConfigParser as configparser
    from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
    from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
                        pathname2url, ContentTooShortError, splittype)

    def quote(s):
        if isinstance(s, unicode):
            s = s.encode('utf-8')
        return _quote(s)

    import urllib2
    from urllib2 import (Request, urlopen, URLError, HTTPError,
                         HTTPBasicAuthHandler, HTTPPasswordMgr,
                         HTTPHandler, HTTPRedirectHandler,
                         build_opener)
    if ssl:
        from urllib2 import HTTPSHandler
    import httplib
    import xmlrpclib
    import Queue as queue
    from HTMLParser import HTMLParser
    import htmlentitydefs
    raw_input = raw_input
    from itertools import ifilter as filter
    from itertools import ifilterfalse as filterfalse

    # Leaving this around for now, in case it needs resurrecting in some way
    # _userprog = None
    # def splituser(host):
        # """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'."""
        # global _userprog
        # if _userprog is None:
            # import re
            # _userprog = re.compile('^(.*)@(.*)$')

        # match = _userprog.match(host)
        # if match: return match.group(1, 2)
        # return None, host

else:  # pragma: no cover
    from io import StringIO
    string_types = str,
    text_type = str
    from io import TextIOWrapper as file_type
    import builtins
    import configparser
    import shutil
    from urllib.parse import (urlparse, urlunparse, urljoin, quote,
                              unquote, urlsplit, urlunsplit, splittype)
    from urllib.request import (urlopen, urlretrieve, Request, url2pathname,
                                pathname2url,
                                HTTPBasicAuthHandler, HTTPPasswordMgr,
                                HTTPHandler, HTTPRedirectHandler,
                                build_opener)
    if ssl:
        from urllib.request import HTTPSHandler
    from urllib.error import HTTPError, URLError, ContentTooShortError
    import http.client as httplib
    import urllib.request as urllib2
    import xmlrpc.client as xmlrpclib
    import queue
    from html.parser import HTMLParser
    import html.entities as htmlentitydefs
    raw_input = input
    from itertools import filterfalse
    filter = filter


try:
    from ssl import match_hostname, CertificateError
except ImportError: # pragma: no cover
    class CertificateError(ValueError):
        pass


    def _dnsname_match(dn, hostname, max_wildcards=1):
        """Matching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        """
        pats = []
        if not dn:
            return False

        parts = dn.split('.')
        leftmost, remainder = parts[0], parts[1:]

        wildcards = leftmost.count('*')
        if wildcards > max_wildcards:
            # Issue #17980: avoid denials of service by refusing more
            # than one wildcard per fragment.  A survey of established
            # policy among SSL implementations showed it to be a
            # reasonable choice.
            raise CertificateError(
                "too many wildcards in certificate DNS name: " + repr(dn))

        # speed up common case w/o wildcards
        if not wildcards:
            return dn.lower() == hostname.lower()

        # RFC 6125, section 6.4.3, subitem 1.
        # The client SHOULD NOT attempt to match a presented identifier in which
        # the wildcard character comprises a label other than the left-most label.
        if leftmost == '*':
            # When '*' is a fragment by itself, it matches a non-empty dotless
            # fragment.
            pats.append('[^.]+')
        elif leftmost.startswith('xn--') or hostname.startswith('xn--'):
            # RFC 6125, section 6.4.3, subitem 3.
            # The client SHOULD NOT attempt to match a presented identifier
            # where the wildcard character is embedded within an A-label or
            # U-label of an internationalized domain name.
            pats.append(re.escape(leftmost))
        else:
            # Otherwise, '*' matches any dotless string, e.g. www*
            pats.append(re.escape(leftmost).replace(r'\*', '[^.]*'))

        # add the remaining fragments, ignore any wildcards
        for frag in remainder:
            pats.append(re.escape(frag))

        pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)
        return pat.match(hostname)


    def match_hostname(cert, hostname):
        """Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
        rules are followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        """
        if not cert:
            raise ValueError("empty or no certificate, match_hostname needs a "
                             "SSL socket or SSL context with either "
                             "CERT_OPTIONAL or CERT_REQUIRED")
        dnsnames = []
        san = cert.get('subjectAltName', ())
        for key, value in san:
            if key == 'DNS':
                if _dnsname_match(value, hostname):
                    return
                dnsnames.append(value)
        if not dnsnames:
            # The subject is only checked when there is no dNSName entry
            # in subjectAltName
            for sub in cert.get('subject', ()):
                for key, value in sub:
                    # XXX according to RFC 2818, the most specific Common Name
                    # must be used.
                    if key == 'commonName':
                        if _dnsname_match(value, hostname):
                            return
                        dnsnames.append(value)
        if len(dnsnames) > 1:
            raise CertificateError("hostname %r "
                "doesn't match either of %s"
                % (hostname, ', '.join(map(repr, dnsnames))))
        elif len(dnsnames) == 1:
            raise CertificateError("hostname %r "
                "doesn't match %r"
                % (hostname, dnsnames[0]))
        else:
            raise CertificateError("no appropriate commonName or "
                "subjectAltName fields were found")


try:
    from types import SimpleNamespace as Container
except ImportError:  # pragma: no cover
    class Container(object):
        """
        A generic container for when multiple values need to be returned
        """
        def __init__(self, **kwargs):
            self.__dict__.update(kwargs)


try:
    from shutil import which
except ImportError:  # pragma: no cover
    # Implementation from Python 3.3
    def which(cmd, mode=os.F_OK | os.X_OK, path=None):
        """Given a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.

        """
        # Check that a given file can be accessed with the correct mode.
        # Additionally check that `file` is not a directory, as on Windows
        # directories pass the os.access check.
        def _access_check(fn, mode):
            return (os.path.exists(fn) and os.access(fn, mode)
                    and not os.path.isdir(fn))

        # If we're given a path with a directory part, look it up directly rather
        # than referring to PATH directories. This includes checking relative to the
        # current directory, e.g. ./script
        if os.path.dirname(cmd):
            if _access_check(cmd, mode):
                return cmd
            return None

        if path is None:
            path = os.environ.get("PATH", os.defpath)
        if not path:
            return None
        path = path.split(os.pathsep)

        if sys.platform == "win32":
            # The current directory takes precedence on Windows.
            if not os.curdir in path:
                path.insert(0, os.curdir)

            # PATHEXT is necessary to check on Windows.
            pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
            # See if the given file matches any of the expected path extensions.
            # This will allow us to short circuit when given "python.exe".
            # If it does match, only test that one, otherwise we have to try
            # others.
            if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
                files = [cmd]
            else:
                files = [cmd + ext for ext in pathext]
        else:
            # On other platforms you don't have things like PATHEXT to tell you
            # what file suffixes are executable, so just pass on cmd as-is.
            files = [cmd]

        seen = set()
        for dir in path:
            normdir = os.path.normcase(dir)
            if not normdir in seen:
                seen.add(normdir)
                for thefile in files:
                    name = os.path.join(dir, thefile)
                    if _access_check(name, mode):
                        return name
        return None


# ZipFile is a context manager in 2.7, but not in 2.6

from zipfile import ZipFile as BaseZipFile

if hasattr(BaseZipFile, '__enter__'):  # pragma: no cover
    ZipFile = BaseZipFile
else:  # pragma: no cover
    from zipfile import ZipExtFile as BaseZipExtFile

    class ZipExtFile(BaseZipExtFile):
        def __init__(self, base):
            self.__dict__.update(base.__dict__)

        def __enter__(self):
            return self

        def __exit__(self, *exc_info):
            self.close()
            # return None, so if an exception occurred, it will propagate

    class ZipFile(BaseZipFile):
        def __enter__(self):
            return self

        def __exit__(self, *exc_info):
            self.close()
            # return None, so if an exception occurred, it will propagate

        def open(self, *args, **kwargs):
            base = BaseZipFile.open(self, *args, **kwargs)
            return ZipExtFile(base)

try:
    from platform import python_implementation
except ImportError: # pragma: no cover
    def python_implementation():
        """Return a string identifying the Python implementation."""
        if 'PyPy' in sys.version:
            return 'PyPy'
        if os.name == 'java':
            return 'Jython'
        if sys.version.startswith('IronPython'):
            return 'IronPython'
        return 'CPython'

import shutil
import sysconfig

try:
    callable = callable
except NameError:   # pragma: no cover
    from collections.abc import Callable

    def callable(obj):
        return isinstance(obj, Callable)


try:
    fsencode = os.fsencode
    fsdecode = os.fsdecode
except AttributeError:  # pragma: no cover
    # Issue #99: on some systems (e.g. containerised),
    # sys.getfilesystemencoding() returns None, and we need a real value,
    # so fall back to utf-8. From the CPython 2.7 docs relating to Unix and
    # sys.getfilesystemencoding(): the return value is "the user’s preference
    # according to the result of nl_langinfo(CODESET), or None if the
    # nl_langinfo(CODESET) failed."
    _fsencoding = sys.getfilesystemencoding() or 'utf-8'
    if _fsencoding == 'mbcs':
        _fserrors = 'strict'
    else:
        _fserrors = 'surrogateescape'

    def fsencode(filename):
        if isinstance(filename, bytes):
            return filename
        elif isinstance(filename, text_type):
            return filename.encode(_fsencoding, _fserrors)
        else:
            raise TypeError("expect bytes or str, not %s" %
                            type(filename).__name__)

    def fsdecode(filename):
        if isinstance(filename, text_type):
            return filename
        elif isinstance(filename, bytes):
            return filename.decode(_fsencoding, _fserrors)
        else:
            raise TypeError("expect bytes or str, not %s" %
                            type(filename).__name__)

try:
    from tokenize import detect_encoding
except ImportError: # pragma: no cover
    from codecs import BOM_UTF8, lookup
    import re

    cookie_re = re.compile(r"coding[:=]\s*([-\w.]+)")

    def _get_normal_name(orig_enc):
        """Imitates get_normal_name in tokenizer.c."""
        # Only care about the first 12 characters.
        enc = orig_enc[:12].lower().replace("_", "-")
        if enc == "utf-8" or enc.startswith("utf-8-"):
            return "utf-8"
        if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \
           enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")):
            return "iso-8859-1"
        return orig_enc

    def detect_encoding(readline):
        """
        The detect_encoding() function is used to detect the encoding that should
        be used to decode a Python source file.  It requires one argument, readline,
        in the same way as the tokenize() generator.

        It will call readline a maximum of twice, and return the encoding used
        (as a string) and a list of any lines (left as bytes) it has read in.

        It detects the encoding from the presence of a utf-8 bom or an encoding
        cookie as specified in pep-0263.  If both a bom and a cookie are present,
        but disagree, a SyntaxError will be raised.  If the encoding cookie is an
        invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
        'utf-8-sig' is returned.

        If no encoding is specified, then the default of 'utf-8' will be returned.
        """
        try:
            filename = readline.__self__.name
        except AttributeError:
            filename = None
        bom_found = False
        encoding = None
        default = 'utf-8'
        def read_or_stop():
            try:
                return readline()
            except StopIteration:
                return b''

        def find_cookie(line):
            try:
                # Decode as UTF-8. Either the line is an encoding declaration,
                # in which case it should be pure ASCII, or it must be UTF-8
                # per default encoding.
                line_string = line.decode('utf-8')
            except UnicodeDecodeError:
                msg = "invalid or missing encoding declaration"
                if filename is not None:
                    msg = '{} for {!r}'.format(msg, filename)
                raise SyntaxError(msg)

            matches = cookie_re.findall(line_string)
            if not matches:
                return None
            encoding = _get_normal_name(matches[0])
            try:
                codec = lookup(encoding)
            except LookupError:
                # This behaviour mimics the Python interpreter
                if filename is None:
                    msg = "unknown encoding: " + encoding
                else:
                    msg = "unknown encoding for {!r}: {}".format(filename,
                            encoding)
                raise SyntaxError(msg)

            if bom_found:
                if codec.name != 'utf-8':
                    # This behaviour mimics the Python interpreter
                    if filename is None:
                        msg = 'encoding problem: utf-8'
                    else:
                        msg = 'encoding problem for {!r}: utf-8'.format(filename)
                    raise SyntaxError(msg)
                encoding += '-sig'
            return encoding

        first = read_or_stop()
        if first.startswith(BOM_UTF8):
            bom_found = True
            first = first[3:]
            default = 'utf-8-sig'
        if not first:
            return default, []

        encoding = find_cookie(first)
        if encoding:
            return encoding, [first]

        second = read_or_stop()
        if not second:
            return default, [first]

        encoding = find_cookie(second)
        if encoding:
            return encoding, [first, second]

        return default, [first, second]

# For converting & <-> &amp; etc.
try:
    from html import escape
except ImportError:
    from cgi import escape
if sys.version_info[:2] < (3, 4):
    unescape = HTMLParser().unescape
else:
    from html import unescape

try:
    from collections import ChainMap
except ImportError: # pragma: no cover
    from collections import MutableMapping

    try:
        from reprlib import recursive_repr as _recursive_repr
    except ImportError:
        def _recursive_repr(fillvalue='...'):
            '''
            Decorator to make a repr function return fillvalue for a recursive
            call
            '''

            def decorating_function(user_function):
                repr_running = set()

                def wrapper(self):
                    key = id(self), get_ident()
                    if key in repr_running:
                        return fillvalue
                    repr_running.add(key)
                    try:
                        result = user_function(self)
                    finally:
                        repr_running.discard(key)
                    return result

                # Can't use functools.wraps() here because of bootstrap issues
                wrapper.__module__ = getattr(user_function, '__module__')
                wrapper.__doc__ = getattr(user_function, '__doc__')
                wrapper.__name__ = getattr(user_function, '__name__')
                wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
                return wrapper

            return decorating_function

    class ChainMap(MutableMapping):
        ''' A ChainMap groups multiple dicts (or other mappings) together
        to create a single, updateable view.

        The underlying mappings are stored in a list.  That list is public and can
        accessed or updated using the *maps* attribute.  There is no other state.

        Lookups search the underlying mappings successively until a key is found.
        In contrast, writes, updates, and deletions only operate on the first
        mapping.

        '''

        def __init__(self, *maps):
            '''Initialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            '''
            self.maps = list(maps) or [{}]          # always at least one map

        def __missing__(self, key):
            raise KeyError(key)

        def __getitem__(self, key):
            for mapping in self.maps:
                try:
                    return mapping[key]             # can't use 'key in mapping' with defaultdict
                except KeyError:
                    pass
            return self.__missing__(key)            # support subclasses that define __missing__

        def get(self, key, default=None):
            return self[key] if key in self else default

        def __len__(self):
            return len(set().union(*self.maps))     # reuses stored hash values if possible

        def __iter__(self):
            return iter(set().union(*self.maps))

        def __contains__(self, key):
            return any(key in m for m in self.maps)

        def __bool__(self):
            return any(self.maps)

        @_recursive_repr()
        def __repr__(self):
            return '{0.__class__.__name__}({1})'.format(
                self, ', '.join(map(repr, self.maps)))

        @classmethod
        def fromkeys(cls, iterable, *args):
            'Create a ChainMap with a single dict created from the iterable.'
            return cls(dict.fromkeys(iterable, *args))

        def copy(self):
            'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]'
            return self.__class__(self.maps[0].copy(), *self.maps[1:])

        __copy__ = copy

        def new_child(self):                        # like Django's Context.push()
            'New ChainMap with a new dict followed by all previous maps.'
            return self.__class__({}, *self.maps)

        @property
        def parents(self):                          # like Django's Context.pop()
            'New ChainMap from maps[1:].'
            return self.__class__(*self.maps[1:])

        def __setitem__(self, key, value):
            self.maps[0][key] = value

        def __delitem__(self, key):
            try:
                del self.maps[0][key]
            except KeyError:
                raise KeyError('Key not found in the first mapping: {!r}'.format(key))

        def popitem(self):
            'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.'
            try:
                return self.maps[0].popitem()
            except KeyError:
                raise KeyError('No keys found in the first mapping.')

        def pop(self, key, *args):
            'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].'
            try:
                return self.maps[0].pop(key, *args)
            except KeyError:
                raise KeyError('Key not found in the first mapping: {!r}'.format(key))

        def clear(self):
            'Clear maps[0], leaving maps[1:] intact.'
            self.maps[0].clear()

try:
    from importlib.util import cache_from_source  # Python >= 3.4
except ImportError:  # pragma: no cover
    def cache_from_source(path, debug_override=None):
        assert path.endswith('.py')
        if debug_override is None:
            debug_override = __debug__
        if debug_override:
            suffix = 'c'
        else:
            suffix = 'o'
        return path + suffix

try:
    from collections import OrderedDict
except ImportError: # pragma: no cover
## {{{ http://code.activestate.com/recipes/576693/ (r9)
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
    try:
        from thread import get_ident as _get_ident
    except ImportError:
        from dummy_thread import get_ident as _get_ident

    try:
        from _abcoll import KeysView, ValuesView, ItemsView
    except ImportError:
        pass


    class OrderedDict(dict):
        'Dictionary that remembers insertion order'
        # An inherited dict maps keys to values.
        # The inherited dict provides __getitem__, __len__, __contains__, and get.
        # The remaining methods are order-aware.
        # Big-O running times for all methods are the same as for regular dictionaries.

        # The internal self.__map dictionary maps keys to links in a doubly linked list.
        # The circular doubly linked list starts and ends with a sentinel element.
        # The sentinel element never gets deleted (this simplifies the algorithm).
        # Each link is stored as a list of length three:  [PREV, NEXT, KEY].

        def __init__(self, *args, **kwds):
            '''Initialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            '''
            if len(args) > 1:
                raise TypeError('expected at most 1 arguments, got %d' % len(args))
            try:
                self.__root
            except AttributeError:
                self.__root = root = []                     # sentinel node
                root[:] = [root, root, None]
                self.__map = {}
            self.__update(*args, **kwds)

        def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
            'od.__setitem__(i, y) <==> od[i]=y'
            # Setting a new item creates a new link which goes at the end of the linked
            # list, and the inherited dictionary is updated with the new key/value pair.
            if key not in self:
                root = self.__root
                last = root[0]
                last[1] = root[0] = self.__map[key] = [last, root, key]
            dict_setitem(self, key, value)

        def __delitem__(self, key, dict_delitem=dict.__delitem__):
            'od.__delitem__(y) <==> del od[y]'
            # Deleting an existing item uses self.__map to find the link which is
            # then removed by updating the links in the predecessor and successor nodes.
            dict_delitem(self, key)
            link_prev, link_next, key = self.__map.pop(key)
            link_prev[1] = link_next
            link_next[0] = link_prev

        def __iter__(self):
            'od.__iter__() <==> iter(od)'
            root = self.__root
            curr = root[1]
            while curr is not root:
                yield curr[2]
                curr = curr[1]

        def __reversed__(self):
            'od.__reversed__() <==> reversed(od)'
            root = self.__root
            curr = root[0]
            while curr is not root:
                yield curr[2]
                curr = curr[0]

        def clear(self):
            'od.clear() -> None.  Remove all items from od.'
            try:
                for node in self.__map.itervalues():
                    del node[:]
                root = self.__root
                root[:] = [root, root, None]
                self.__map.clear()
            except AttributeError:
                pass
            dict.clear(self)

        def popitem(self, last=True):
            '''od.popitem() -> (k, v), return and remove a (key, value) pair.
            Pairs are returned in LIFO order if last is true or FIFO order if false.

            '''
            if not self:
                raise KeyError('dictionary is empty')
            root = self.__root
            if last:
                link = root[0]
                link_prev = link[0]
                link_prev[1] = root
                root[0] = link_prev
            else:
                link = root[1]
                link_next = link[1]
                root[1] = link_next
                link_next[0] = root
            key = link[2]
            del self.__map[key]
            value = dict.pop(self, key)
            return key, value

        # -- the following methods do not depend on the internal structure --

        def keys(self):
            'od.keys() -> list of keys in od'
            return list(self)

        def values(self):
            'od.values() -> list of values in od'
            return [self[key] for key in self]

        def items(self):
            'od.items() -> list of (key, value) pairs in od'
            return [(key, self[key]) for key in self]

        def iterkeys(self):
            'od.iterkeys() -> an iterator over the keys in od'
            return iter(self)

        def itervalues(self):
            'od.itervalues -> an iterator over the values in od'
            for k in self:
                yield self[k]

        def iteritems(self):
            'od.iteritems -> an iterator over the (key, value) items in od'
            for k in self:
                yield (k, self[k])

        def update(*args, **kwds):
            '''od.update(E, **F) -> None.  Update od from dict/iterable E and F.

            If E is a dict instance, does:           for k in E: od[k] = E[k]
            If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
            Or if E is an iterable of items, does:   for k, v in E: od[k] = v
            In either case, this is followed by:     for k, v in F.items(): od[k] = v

            '''
            if len(args) > 2:
                raise TypeError('update() takes at most 2 positional '
                                'arguments (%d given)' % (len(args),))
            elif not args:
                raise TypeError('update() takes at least 1 argument (0 given)')
            self = args[0]
            # Make progressively weaker assumptions about "other"
            other = ()
            if len(args) == 2:
                other = args[1]
            if isinstance(other, dict):
                for key in other:
                    self[key] = other[key]
            elif hasattr(other, 'keys'):
                for key in other.keys():
                    self[key] = other[key]
            else:
                for key, value in other:
                    self[key] = value
            for key, value in kwds.items():
                self[key] = value

        __update = update  # let subclasses override update without breaking __init__

        __marker = object()

        def pop(self, key, default=__marker):
            '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
            If key is not found, d is returned if given, otherwise KeyError is raised.

            '''
            if key in self:
                result = self[key]
                del self[key]
                return result
            if default is self.__marker:
                raise KeyError(key)
            return default

        def setdefault(self, key, default=None):
            'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
            if key in self:
                return self[key]
            self[key] = default
            return default

        def __repr__(self, _repr_running=None):
            'od.__repr__() <==> repr(od)'
            if not _repr_running: _repr_running = {}
            call_key = id(self), _get_ident()
            if call_key in _repr_running:
                return '...'
            _repr_running[call_key] = 1
            try:
                if not self:
                    return '%s()' % (self.__class__.__name__,)
                return '%s(%r)' % (self.__class__.__name__, self.items())
            finally:
                del _repr_running[call_key]

        def __reduce__(self):
            'Return state information for pickling'
            items = [[k, self[k]] for k in self]
            inst_dict = vars(self).copy()
            for k in vars(OrderedDict()):
                inst_dict.pop(k, None)
            if inst_dict:
                return (self.__class__, (items,), inst_dict)
            return self.__class__, (items,)

        def copy(self):
            'od.copy() -> a shallow copy of od'
            return self.__class__(self)

        @classmethod
        def fromkeys(cls, iterable, value=None):
            '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            '''
            d = cls()
            for key in iterable:
                d[key] = value
            return d

        def __eq__(self, other):
            '''od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            '''
            if isinstance(other, OrderedDict):
                return len(self)==len(other) and self.items() == other.items()
            return dict.__eq__(self, other)

        def __ne__(self, other):
            return not self == other

        # -- the following methods are only used in Python 2.7 --

        def viewkeys(self):
            "od.viewkeys() -> a set-like object providing a view on od's keys"
            return KeysView(self)

        def viewvalues(self):
            "od.viewvalues() -> an object providing a view on od's values"
            return ValuesView(self)

        def viewitems(self):
            "od.viewitems() -> a set-like object providing a view on od's items"
            return ItemsView(self)

try:
    from logging.config import BaseConfigurator, valid_ident
except ImportError: # pragma: no cover
    IDENTIFIER = re.compile('^[a-z_][a-z0-9_]*$', re.I)


    def valid_ident(s):
        m = IDENTIFIER.match(s)
        if not m:
            raise ValueError('Not a valid Python identifier: %r' % s)
        return True


    # The ConvertingXXX classes are wrappers around standard Python containers,
    # and they serve to convert any suitable values in the container. The
    # conversion converts base dicts, lists and tuples to their wrapped
    # equivalents, whereas strings which match a conversion format are converted
    # appropriately.
    #
    # Each wrapper should have a configurator attribute holding the actual
    # configurator to use for conversion.

    class ConvertingDict(dict):
        """A converting dictionary wrapper."""

        def __getitem__(self, key):
            value = dict.__getitem__(self, key)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

        def get(self, key, default=None):
            value = dict.get(self, key, default)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

    def pop(self, key, default=None):
        value = dict.pop(self, key, default)
        result = self.configurator.convert(value)
        if value is not result:
            if type(result) in (ConvertingDict, ConvertingList,
                                ConvertingTuple):
                result.parent = self
                result.key = key
        return result

    class ConvertingList(list):
        """A converting list wrapper."""
        def __getitem__(self, key):
            value = list.__getitem__(self, key)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

        def pop(self, idx=-1):
            value = list.pop(self, idx)
            result = self.configurator.convert(value)
            if value is not result:
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
            return result

    class ConvertingTuple(tuple):
        """A converting tuple wrapper."""
        def __getitem__(self, key):
            value = tuple.__getitem__(self, key)
            result = self.configurator.convert(value)
            if value is not result:
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

    class BaseConfigurator(object):
        """
        The configurator base class which defines some useful defaults.
        """

        CONVERT_PATTERN = re.compile(r'^(?P<prefix>[a-z]+)://(?P<suffix>.*)$')

        WORD_PATTERN = re.compile(r'^\s*(\w+)\s*')
        DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*')
        INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*')
        DIGIT_PATTERN = re.compile(r'^\d+$')

        value_converters = {
            'ext' : 'ext_convert',
            'cfg' : 'cfg_convert',
        }

        # We might want to use a different one, e.g. importlib
        importer = staticmethod(__import__)

        def __init__(self, config):
            self.config = ConvertingDict(config)
            self.config.configurator = self

        def resolve(self, s):
            """
            Resolve strings to objects using standard import and attribute
            syntax.
            """
            name = s.split('.')
            used = name.pop(0)
            try:
                found = self.importer(used)
                for frag in name:
                    used += '.' + frag
                    try:
                        found = getattr(found, frag)
                    except AttributeError:
                        self.importer(used)
                        found = getattr(found, frag)
                return found
            except ImportError:
                e, tb = sys.exc_info()[1:]
                v = ValueError('Cannot resolve %r: %s' % (s, e))
                v.__cause__, v.__traceback__ = e, tb
                raise v

        def ext_convert(self, value):
            """Default converter for the ext:// protocol."""
            return self.resolve(value)

        def cfg_convert(self, value):
            """Default converter for the cfg:// protocol."""
            rest = value
            m = self.WORD_PATTERN.match(rest)
            if m is None:
                raise ValueError("Unable to convert %r" % value)
            else:
                rest = rest[m.end():]
                d = self.config[m.groups()[0]]
                #print d, rest
                while rest:
                    m = self.DOT_PATTERN.match(rest)
                    if m:
                        d = d[m.groups()[0]]
                    else:
                        m = self.INDEX_PATTERN.match(rest)
                        if m:
                            idx = m.groups()[0]
                            if not self.DIGIT_PATTERN.match(idx):
                                d = d[idx]
                            else:
                                try:
                                    n = int(idx) # try as number first (most likely)
                                    d = d[n]
                                except TypeError:
                                    d = d[idx]
                    if m:
                        rest = rest[m.end():]
                    else:
                        raise ValueError('Unable to convert '
                                         '%r at %r' % (value, rest))
            #rest should be empty
            return d

        def convert(self, value):
            """
            Convert values to an appropriate type. dicts, lists and tuples are
            replaced by their converting alternatives. Strings are checked to
            see if they have a conversion format and are converted if they do.
            """
            if not isinstance(value, ConvertingDict) and isinstance(value, dict):
                value = ConvertingDict(value)
                value.configurator = self
            elif not isinstance(value, ConvertingList) and isinstance(value, list):
                value = ConvertingList(value)
                value.configurator = self
            elif not isinstance(value, ConvertingTuple) and\
                     isinstance(value, tuple):
                value = ConvertingTuple(value)
                value.configurator = self
            elif isinstance(value, string_types):
                m = self.CONVERT_PATTERN.match(value)
                if m:
                    d = m.groupdict()
                    prefix = d['prefix']
                    converter = self.value_converters.get(prefix, None)
                    if converter:
                        suffix = d['suffix']
                        converter = getattr(self, converter)
                        value = converter(suffix)
            return value

        def configure_custom(self, config):
            """Configure an object with a user-supplied factory."""
            c = config.pop('()')
            if not callable(c):
                c = self.resolve(c)
            props = config.pop('.', None)
            # Check for valid identifiers
            kwargs = dict([(k, config[k]) for k in config if valid_ident(k)])
            result = c(**kwargs)
            if props:
                for name, value in props.items():
                    setattr(result, name, value)
            return result

        def as_tuple(self, value):
            """Utility function which converts lists to tuples."""
            if isinstance(value, list):
                value = tuple(value)
            return value
python3.12/site-packages/pip/_vendor/distlib/version.py000064400000055731151732701610017044 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2017 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-440,
setuptools-compatible and semantic versioning.
"""

import logging
import re

from .compat import string_types
from .util import parse_requirement

__all__ = ['NormalizedVersion', 'NormalizedMatcher',
           'LegacyVersion', 'LegacyMatcher',
           'SemanticVersion', 'SemanticMatcher',
           'UnsupportedVersionError', 'get_scheme']

logger = logging.getLogger(__name__)


class UnsupportedVersionError(ValueError):
    """This is an unsupported version."""
    pass


class Version(object):
    def __init__(self, s):
        self._string = s = s.strip()
        self._parts = parts = self.parse(s)
        assert isinstance(parts, tuple)
        assert len(parts) > 0

    def parse(self, s):
        raise NotImplementedError('please implement in a subclass')

    def _check_compatible(self, other):
        if type(self) != type(other):
            raise TypeError('cannot compare %r and %r' % (self, other))

    def __eq__(self, other):
        self._check_compatible(other)
        return self._parts == other._parts

    def __ne__(self, other):
        return not self.__eq__(other)

    def __lt__(self, other):
        self._check_compatible(other)
        return self._parts < other._parts

    def __gt__(self, other):
        return not (self.__lt__(other) or self.__eq__(other))

    def __le__(self, other):
        return self.__lt__(other) or self.__eq__(other)

    def __ge__(self, other):
        return self.__gt__(other) or self.__eq__(other)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    def __hash__(self):
        return hash(self._parts)

    def __repr__(self):
        return "%s('%s')" % (self.__class__.__name__, self._string)

    def __str__(self):
        return self._string

    @property
    def is_prerelease(self):
        raise NotImplementedError('Please implement in subclasses.')


class Matcher(object):
    version_class = None

    # value is either a callable or the name of a method
    _operators = {
        '<': lambda v, c, p: v < c,
        '>': lambda v, c, p: v > c,
        '<=': lambda v, c, p: v == c or v < c,
        '>=': lambda v, c, p: v == c or v > c,
        '==': lambda v, c, p: v == c,
        '===': lambda v, c, p: v == c,
        # by default, compatible => >=.
        '~=': lambda v, c, p: v == c or v > c,
        '!=': lambda v, c, p: v != c,
    }

    # this is a method only to support alternative implementations
    # via overriding
    def parse_requirement(self, s):
        return parse_requirement(s)

    def __init__(self, s):
        if self.version_class is None:
            raise ValueError('Please specify a version class')
        self._string = s = s.strip()
        r = self.parse_requirement(s)
        if not r:
            raise ValueError('Not valid: %r' % s)
        self.name = r.name
        self.key = self.name.lower()    # for case-insensitive comparisons
        clist = []
        if r.constraints:
            # import pdb; pdb.set_trace()
            for op, s in r.constraints:
                if s.endswith('.*'):
                    if op not in ('==', '!='):
                        raise ValueError('\'.*\' not allowed for '
                                         '%r constraints' % op)
                    # Could be a partial version (e.g. for '2.*') which
                    # won't parse as a version, so keep it as a string
                    vn, prefix = s[:-2], True
                    # Just to check that vn is a valid version
                    self.version_class(vn)
                else:
                    # Should parse as a version, so we can create an
                    # instance for the comparison
                    vn, prefix = self.version_class(s), False
                clist.append((op, vn, prefix))
        self._parts = tuple(clist)

    def match(self, version):
        """
        Check if the provided version matches the constraints.

        :param version: The version to match against this instance.
        :type version: String or :class:`Version` instance.
        """
        if isinstance(version, string_types):
            version = self.version_class(version)
        for operator, constraint, prefix in self._parts:
            f = self._operators.get(operator)
            if isinstance(f, string_types):
                f = getattr(self, f)
            if not f:
                msg = ('%r not implemented '
                       'for %s' % (operator, self.__class__.__name__))
                raise NotImplementedError(msg)
            if not f(version, constraint, prefix):
                return False
        return True

    @property
    def exact_version(self):
        result = None
        if len(self._parts) == 1 and self._parts[0][0] in ('==', '==='):
            result = self._parts[0][1]
        return result

    def _check_compatible(self, other):
        if type(self) != type(other) or self.name != other.name:
            raise TypeError('cannot compare %s and %s' % (self, other))

    def __eq__(self, other):
        self._check_compatible(other)
        return self.key == other.key and self._parts == other._parts

    def __ne__(self, other):
        return not self.__eq__(other)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    def __hash__(self):
        return hash(self.key) + hash(self._parts)

    def __repr__(self):
        return "%s(%r)" % (self.__class__.__name__, self._string)

    def __str__(self):
        return self._string


PEP440_VERSION_RE = re.compile(r'^v?(\d+!)?(\d+(\.\d+)*)((a|b|c|rc)(\d+))?'
                               r'(\.(post)(\d+))?(\.(dev)(\d+))?'
                               r'(\+([a-zA-Z\d]+(\.[a-zA-Z\d]+)?))?$')


def _pep_440_key(s):
    s = s.strip()
    m = PEP440_VERSION_RE.match(s)
    if not m:
        raise UnsupportedVersionError('Not a valid version: %s' % s)
    groups = m.groups()
    nums = tuple(int(v) for v in groups[1].split('.'))
    while len(nums) > 1 and nums[-1] == 0:
        nums = nums[:-1]

    if not groups[0]:
        epoch = 0
    else:
        epoch = int(groups[0][:-1])
    pre = groups[4:6]
    post = groups[7:9]
    dev = groups[10:12]
    local = groups[13]
    if pre == (None, None):
        pre = ()
    else:
        pre = pre[0], int(pre[1])
    if post == (None, None):
        post = ()
    else:
        post = post[0], int(post[1])
    if dev == (None, None):
        dev = ()
    else:
        dev = dev[0], int(dev[1])
    if local is None:
        local = ()
    else:
        parts = []
        for part in local.split('.'):
            # to ensure that numeric compares as > lexicographic, avoid
            # comparing them directly, but encode a tuple which ensures
            # correct sorting
            if part.isdigit():
                part = (1, int(part))
            else:
                part = (0, part)
            parts.append(part)
        local = tuple(parts)
    if not pre:
        # either before pre-release, or final release and after
        if not post and dev:
            # before pre-release
            pre = ('a', -1)     # to sort before a0
        else:
            pre = ('z',)        # to sort after all pre-releases
    # now look at the state of post and dev.
    if not post:
        post = ('_',)   # sort before 'a'
    if not dev:
        dev = ('final',)

    #print('%s -> %s' % (s, m.groups()))
    return epoch, nums, pre, post, dev, local


_normalized_key = _pep_440_key


class NormalizedVersion(Version):
    """A rational version.

    Good:
        1.2         # equivalent to "1.2.0"
        1.2.0
        1.2a1
        1.2.3a2
        1.2.3b1
        1.2.3c1
        1.2.3.4
        TODO: fill this out

    Bad:
        1           # minimum two numbers
        1.2a        # release level must have a release serial
        1.2.3b
    """
    def parse(self, s):
        result = _normalized_key(s)
        # _normalized_key loses trailing zeroes in the release
        # clause, since that's needed to ensure that X.Y == X.Y.0 == X.Y.0.0
        # However, PEP 440 prefix matching needs it: for example,
        # (~= 1.4.5.0) matches differently to (~= 1.4.5.0.0).
        m = PEP440_VERSION_RE.match(s)      # must succeed
        groups = m.groups()
        self._release_clause = tuple(int(v) for v in groups[1].split('.'))
        return result

    PREREL_TAGS = set(['a', 'b', 'c', 'rc', 'dev'])

    @property
    def is_prerelease(self):
        return any(t[0] in self.PREREL_TAGS for t in self._parts if t)


def _match_prefix(x, y):
    x = str(x)
    y = str(y)
    if x == y:
        return True
    if not x.startswith(y):
        return False
    n = len(y)
    return x[n] == '.'


class NormalizedMatcher(Matcher):
    version_class = NormalizedVersion

    # value is either a callable or the name of a method
    _operators = {
        '~=': '_match_compatible',
        '<': '_match_lt',
        '>': '_match_gt',
        '<=': '_match_le',
        '>=': '_match_ge',
        '==': '_match_eq',
        '===': '_match_arbitrary',
        '!=': '_match_ne',
    }

    def _adjust_local(self, version, constraint, prefix):
        if prefix:
            strip_local = '+' not in constraint and version._parts[-1]
        else:
            # both constraint and version are
            # NormalizedVersion instances.
            # If constraint does not have a local component,
            # ensure the version doesn't, either.
            strip_local = not constraint._parts[-1] and version._parts[-1]
        if strip_local:
            s = version._string.split('+', 1)[0]
            version = self.version_class(s)
        return version, constraint

    def _match_lt(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version >= constraint:
            return False
        release_clause = constraint._release_clause
        pfx = '.'.join([str(i) for i in release_clause])
        return not _match_prefix(version, pfx)

    def _match_gt(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version <= constraint:
            return False
        release_clause = constraint._release_clause
        pfx = '.'.join([str(i) for i in release_clause])
        return not _match_prefix(version, pfx)

    def _match_le(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        return version <= constraint

    def _match_ge(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        return version >= constraint

    def _match_eq(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if not prefix:
            result = (version == constraint)
        else:
            result = _match_prefix(version, constraint)
        return result

    def _match_arbitrary(self, version, constraint, prefix):
        return str(version) == str(constraint)

    def _match_ne(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if not prefix:
            result = (version != constraint)
        else:
            result = not _match_prefix(version, constraint)
        return result

    def _match_compatible(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version == constraint:
            return True
        if version < constraint:
            return False
#        if not prefix:
#            return True
        release_clause = constraint._release_clause
        if len(release_clause) > 1:
            release_clause = release_clause[:-1]
        pfx = '.'.join([str(i) for i in release_clause])
        return _match_prefix(version, pfx)

_REPLACEMENTS = (
    (re.compile('[.+-]$'), ''),                     # remove trailing puncts
    (re.compile(r'^[.](\d)'), r'0.\1'),             # .N -> 0.N at start
    (re.compile('^[.-]'), ''),                      # remove leading puncts
    (re.compile(r'^\((.*)\)$'), r'\1'),             # remove parentheses
    (re.compile(r'^v(ersion)?\s*(\d+)'), r'\2'),    # remove leading v(ersion)
    (re.compile(r'^r(ev)?\s*(\d+)'), r'\2'),        # remove leading v(ersion)
    (re.compile('[.]{2,}'), '.'),                   # multiple runs of '.'
    (re.compile(r'\b(alfa|apha)\b'), 'alpha'),      # misspelt alpha
    (re.compile(r'\b(pre-alpha|prealpha)\b'),
                'pre.alpha'),                       # standardise
    (re.compile(r'\(beta\)$'), 'beta'),             # remove parentheses
)

_SUFFIX_REPLACEMENTS = (
    (re.compile('^[:~._+-]+'), ''),                   # remove leading puncts
    (re.compile('[,*")([\\]]'), ''),                  # remove unwanted chars
    (re.compile('[~:+_ -]'), '.'),                    # replace illegal chars
    (re.compile('[.]{2,}'), '.'),                   # multiple runs of '.'
    (re.compile(r'\.$'), ''),                       # trailing '.'
)

_NUMERIC_PREFIX = re.compile(r'(\d+(\.\d+)*)')


def _suggest_semantic_version(s):
    """
    Try to suggest a semantic form for a version for which
    _suggest_normalized_version couldn't come up with anything.
    """
    result = s.strip().lower()
    for pat, repl in _REPLACEMENTS:
        result = pat.sub(repl, result)
    if not result:
        result = '0.0.0'

    # Now look for numeric prefix, and separate it out from
    # the rest.
    #import pdb; pdb.set_trace()
    m = _NUMERIC_PREFIX.match(result)
    if not m:
        prefix = '0.0.0'
        suffix = result
    else:
        prefix = m.groups()[0].split('.')
        prefix = [int(i) for i in prefix]
        while len(prefix) < 3:
            prefix.append(0)
        if len(prefix) == 3:
            suffix = result[m.end():]
        else:
            suffix = '.'.join([str(i) for i in prefix[3:]]) + result[m.end():]
            prefix = prefix[:3]
        prefix = '.'.join([str(i) for i in prefix])
        suffix = suffix.strip()
    if suffix:
        #import pdb; pdb.set_trace()
        # massage the suffix.
        for pat, repl in _SUFFIX_REPLACEMENTS:
            suffix = pat.sub(repl, suffix)

    if not suffix:
        result = prefix
    else:
        sep = '-' if 'dev' in suffix else '+'
        result = prefix + sep + suffix
    if not is_semver(result):
        result = None
    return result


def _suggest_normalized_version(s):
    """Suggest a normalized version close to the given version string.

    If you have a version string that isn't rational (i.e. NormalizedVersion
    doesn't like it) then you might be able to get an equivalent (or close)
    rational version from this function.

    This does a number of simple normalizations to the given string, based
    on observation of versions currently in use on PyPI. Given a dump of
    those version during PyCon 2009, 4287 of them:
    - 2312 (53.93%) match NormalizedVersion without change
      with the automatic suggestion
    - 3474 (81.04%) match when using this suggestion method

    @param s {str} An irrational version string.
    @returns A rational version string, or None, if couldn't determine one.
    """
    try:
        _normalized_key(s)
        return s   # already rational
    except UnsupportedVersionError:
        pass

    rs = s.lower()

    # part of this could use maketrans
    for orig, repl in (('-alpha', 'a'), ('-beta', 'b'), ('alpha', 'a'),
                       ('beta', 'b'), ('rc', 'c'), ('-final', ''),
                       ('-pre', 'c'),
                       ('-release', ''), ('.release', ''), ('-stable', ''),
                       ('+', '.'), ('_', '.'), (' ', ''), ('.final', ''),
                       ('final', '')):
        rs = rs.replace(orig, repl)

    # if something ends with dev or pre, we add a 0
    rs = re.sub(r"pre$", r"pre0", rs)
    rs = re.sub(r"dev$", r"dev0", rs)

    # if we have something like "b-2" or "a.2" at the end of the
    # version, that is probably beta, alpha, etc
    # let's remove the dash or dot
    rs = re.sub(r"([abc]|rc)[\-\.](\d+)$", r"\1\2", rs)

    # 1.0-dev-r371 -> 1.0.dev371
    # 0.1-dev-r79 -> 0.1.dev79
    rs = re.sub(r"[\-\.](dev)[\-\.]?r?(\d+)$", r".\1\2", rs)

    # Clean: 2.0.a.3, 2.0.b1, 0.9.0~c1
    rs = re.sub(r"[.~]?([abc])\.?", r"\1", rs)

    # Clean: v0.3, v1.0
    if rs.startswith('v'):
        rs = rs[1:]

    # Clean leading '0's on numbers.
    #TODO: unintended side-effect on, e.g., "2003.05.09"
    # PyPI stats: 77 (~2%) better
    rs = re.sub(r"\b0+(\d+)(?!\d)", r"\1", rs)

    # Clean a/b/c with no version. E.g. "1.0a" -> "1.0a0". Setuptools infers
    # zero.
    # PyPI stats: 245 (7.56%) better
    rs = re.sub(r"(\d+[abc])$", r"\g<1>0", rs)

    # the 'dev-rNNN' tag is a dev tag
    rs = re.sub(r"\.?(dev-r|dev\.r)\.?(\d+)$", r".dev\2", rs)

    # clean the - when used as a pre delimiter
    rs = re.sub(r"-(a|b|c)(\d+)$", r"\1\2", rs)

    # a terminal "dev" or "devel" can be changed into ".dev0"
    rs = re.sub(r"[\.\-](dev|devel)$", r".dev0", rs)

    # a terminal "dev" can be changed into ".dev0"
    rs = re.sub(r"(?![\.\-])dev$", r".dev0", rs)

    # a terminal "final" or "stable" can be removed
    rs = re.sub(r"(final|stable)$", "", rs)

    # The 'r' and the '-' tags are post release tags
    #   0.4a1.r10       ->  0.4a1.post10
    #   0.9.33-17222    ->  0.9.33.post17222
    #   0.9.33-r17222   ->  0.9.33.post17222
    rs = re.sub(r"\.?(r|-|-r)\.?(\d+)$", r".post\2", rs)

    # Clean 'r' instead of 'dev' usage:
    #   0.9.33+r17222   ->  0.9.33.dev17222
    #   1.0dev123       ->  1.0.dev123
    #   1.0.git123      ->  1.0.dev123
    #   1.0.bzr123      ->  1.0.dev123
    #   0.1a0dev.123    ->  0.1a0.dev123
    # PyPI stats:  ~150 (~4%) better
    rs = re.sub(r"\.?(dev|git|bzr)\.?(\d+)$", r".dev\2", rs)

    # Clean '.pre' (normalized from '-pre' above) instead of 'c' usage:
    #   0.2.pre1        ->  0.2c1
    #   0.2-c1         ->  0.2c1
    #   1.0preview123   ->  1.0c123
    # PyPI stats: ~21 (0.62%) better
    rs = re.sub(r"\.?(pre|preview|-c)(\d+)$", r"c\g<2>", rs)

    # Tcl/Tk uses "px" for their post release markers
    rs = re.sub(r"p(\d+)$", r".post\1", rs)

    try:
        _normalized_key(rs)
    except UnsupportedVersionError:
        rs = None
    return rs

#
#   Legacy version processing (distribute-compatible)
#

_VERSION_PART = re.compile(r'([a-z]+|\d+|[\.-])', re.I)
_VERSION_REPLACE = {
    'pre': 'c',
    'preview': 'c',
    '-': 'final-',
    'rc': 'c',
    'dev': '@',
    '': None,
    '.': None,
}


def _legacy_key(s):
    def get_parts(s):
        result = []
        for p in _VERSION_PART.split(s.lower()):
            p = _VERSION_REPLACE.get(p, p)
            if p:
                if '0' <= p[:1] <= '9':
                    p = p.zfill(8)
                else:
                    p = '*' + p
                result.append(p)
        result.append('*final')
        return result

    result = []
    for p in get_parts(s):
        if p.startswith('*'):
            if p < '*final':
                while result and result[-1] == '*final-':
                    result.pop()
            while result and result[-1] == '00000000':
                result.pop()
        result.append(p)
    return tuple(result)


class LegacyVersion(Version):
    def parse(self, s):
        return _legacy_key(s)

    @property
    def is_prerelease(self):
        result = False
        for x in self._parts:
            if (isinstance(x, string_types) and x.startswith('*') and
                x < '*final'):
                result = True
                break
        return result


class LegacyMatcher(Matcher):
    version_class = LegacyVersion

    _operators = dict(Matcher._operators)
    _operators['~='] = '_match_compatible'

    numeric_re = re.compile(r'^(\d+(\.\d+)*)')

    def _match_compatible(self, version, constraint, prefix):
        if version < constraint:
            return False
        m = self.numeric_re.match(str(constraint))
        if not m:
            logger.warning('Cannot compute compatible match for version %s '
                           ' and constraint %s', version, constraint)
            return True
        s = m.groups()[0]
        if '.' in s:
            s = s.rsplit('.', 1)[0]
        return _match_prefix(version, s)

#
#   Semantic versioning
#

_SEMVER_RE = re.compile(r'^(\d+)\.(\d+)\.(\d+)'
                        r'(-[a-z0-9]+(\.[a-z0-9-]+)*)?'
                        r'(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$', re.I)


def is_semver(s):
    return _SEMVER_RE.match(s)


def _semantic_key(s):
    def make_tuple(s, absent):
        if s is None:
            result = (absent,)
        else:
            parts = s[1:].split('.')
            # We can't compare ints and strings on Python 3, so fudge it
            # by zero-filling numeric values so simulate a numeric comparison
            result = tuple([p.zfill(8) if p.isdigit() else p for p in parts])
        return result

    m = is_semver(s)
    if not m:
        raise UnsupportedVersionError(s)
    groups = m.groups()
    major, minor, patch = [int(i) for i in groups[:3]]
    # choose the '|' and '*' so that versions sort correctly
    pre, build = make_tuple(groups[3], '|'), make_tuple(groups[5], '*')
    return (major, minor, patch), pre, build


class SemanticVersion(Version):
    def parse(self, s):
        return _semantic_key(s)

    @property
    def is_prerelease(self):
        return self._parts[1][0] != '|'


class SemanticMatcher(Matcher):
    version_class = SemanticVersion


class VersionScheme(object):
    def __init__(self, key, matcher, suggester=None):
        self.key = key
        self.matcher = matcher
        self.suggester = suggester

    def is_valid_version(self, s):
        try:
            self.matcher.version_class(s)
            result = True
        except UnsupportedVersionError:
            result = False
        return result

    def is_valid_matcher(self, s):
        try:
            self.matcher(s)
            result = True
        except UnsupportedVersionError:
            result = False
        return result

    def is_valid_constraint_list(self, s):
        """
        Used for processing some metadata fields
        """
        # See issue #140. Be tolerant of a single trailing comma.
        if s.endswith(','):
            s = s[:-1]
        return self.is_valid_matcher('dummy_name (%s)' % s)

    def suggest(self, s):
        if self.suggester is None:
            result = None
        else:
            result = self.suggester(s)
        return result

_SCHEMES = {
    'normalized': VersionScheme(_normalized_key, NormalizedMatcher,
                                _suggest_normalized_version),
    'legacy': VersionScheme(_legacy_key, LegacyMatcher, lambda self, s: s),
    'semantic': VersionScheme(_semantic_key, SemanticMatcher,
                              _suggest_semantic_version),
}

_SCHEMES['default'] = _SCHEMES['normalized']


def get_scheme(name):
    if name not in _SCHEMES:
        raise ValueError('unknown scheme name: %r' % name)
    return _SCHEMES[name]
python3.12/site-packages/pip/_vendor/distlib/scripts.py000064400000043266151732701610017046 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2015 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from io import BytesIO
import logging
import os
import re
import struct
import sys
import time
from zipfile import ZipInfo

from .compat import sysconfig, detect_encoding, ZipFile
from .resources import finder
from .util import (FileOperator, get_export_entry, convert_path,
                   get_executable, get_platform, in_venv)

logger = logging.getLogger(__name__)

_DEFAULT_MANIFEST = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
 processorArchitecture="X86"
 name="%s"
 type="win32"/>

 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
 <requestedPrivileges>
 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
 </requestedPrivileges>
 </security>
 </trustInfo>
</assembly>'''.strip()

# check if Python is called on the first line with this expression
FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$')
SCRIPT_TEMPLATE = r'''# -*- coding: utf-8 -*-
import re
import sys
from %(module)s import %(import_name)s
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
'''


def enquote_executable(executable):
    if ' ' in executable:
        # make sure we quote only the executable in case of env
        # for example /usr/bin/env "/dir with spaces/bin/jython"
        # instead of "/usr/bin/env /dir with spaces/bin/jython"
        # otherwise whole
        if executable.startswith('/usr/bin/env '):
            env, _executable = executable.split(' ', 1)
            if ' ' in _executable and not _executable.startswith('"'):
                executable = '%s "%s"' % (env, _executable)
        else:
            if not executable.startswith('"'):
                executable = '"%s"' % executable
    return executable

# Keep the old name around (for now), as there is at least one project using it!
_enquote_executable = enquote_executable

class ScriptMaker(object):
    """
    A class to copy or create scripts from source scripts or callable
    specifications.
    """
    script_template = SCRIPT_TEMPLATE

    executable = None  # for shebangs

    def __init__(self, source_dir, target_dir, add_launchers=True,
                 dry_run=False, fileop=None):
        self.source_dir = source_dir
        self.target_dir = target_dir
        self.add_launchers = add_launchers
        self.force = False
        self.clobber = False
        # It only makes sense to set mode bits on POSIX.
        self.set_mode = (os.name == 'posix') or (os.name == 'java' and
                                                 os._name == 'posix')
        self.variants = set(('', 'X.Y'))
        self._fileop = fileop or FileOperator(dry_run)

        self._is_nt = os.name == 'nt' or (
            os.name == 'java' and os._name == 'nt')
        self.version_info = sys.version_info

    def _get_alternate_executable(self, executable, options):
        if options.get('gui', False) and self._is_nt:  # pragma: no cover
            dn, fn = os.path.split(executable)
            fn = fn.replace('python', 'pythonw')
            executable = os.path.join(dn, fn)
        return executable

    if sys.platform.startswith('java'):  # pragma: no cover
        def _is_shell(self, executable):
            """
            Determine if the specified executable is a script
            (contains a #! line)
            """
            try:
                with open(executable) as fp:
                    return fp.read(2) == '#!'
            except (OSError, IOError):
                logger.warning('Failed to open %s', executable)
                return False

        def _fix_jython_executable(self, executable):
            if self._is_shell(executable):
                # Workaround for Jython is not needed on Linux systems.
                import java

                if java.lang.System.getProperty('os.name') == 'Linux':
                    return executable
            elif executable.lower().endswith('jython.exe'):
                # Use wrapper exe for Jython on Windows
                return executable
            return '/usr/bin/env %s' % executable

    def _build_shebang(self, executable, post_interp):
        """
        Build a shebang line. In the simple case (on Windows, or a shebang line
        which is not too long or contains spaces) use a simple formulation for
        the shebang. Otherwise, use /bin/sh as the executable, with a contrived
        shebang which allows the script to run either under Python or sh, using
        suitable quoting. Thanks to Harald Nordgren for his input.

        See also: http://www.in-ulm.de/~mascheck/various/shebang/#length
                  https://hg.mozilla.org/mozilla-central/file/tip/mach
        """
        if os.name != 'posix':
            simple_shebang = True
        else:
            # Add 3 for '#!' prefix and newline suffix.
            shebang_length = len(executable) + len(post_interp) + 3
            if sys.platform == 'darwin':
                max_shebang_length = 512
            else:
                max_shebang_length = 127
            simple_shebang = ((b' ' not in executable) and
                              (shebang_length <= max_shebang_length))

        if simple_shebang:
            result = b'#!' + executable + post_interp + b'\n'
        else:
            result = b'#!/bin/sh\n'
            result += b"'''exec' " + executable + post_interp + b' "$0" "$@"\n'
            result += b"' '''"
        return result

    def _get_shebang(self, encoding, post_interp=b'', options=None):
        enquote = True
        if self.executable:
            executable = self.executable
            enquote = False     # assume this will be taken care of
        elif not sysconfig.is_python_build():
            executable = get_executable()
        elif in_venv():  # pragma: no cover
            executable = os.path.join(sysconfig.get_path('scripts'),
                            'python%s' % sysconfig.get_config_var('EXE'))
        else:  # pragma: no cover
            executable = os.path.join(
                sysconfig.get_config_var('BINDIR'),
               'python%s%s' % (sysconfig.get_config_var('VERSION'),
                               sysconfig.get_config_var('EXE')))
            if not os.path.isfile(executable):
                # for Python builds from source on Windows, no Python executables with
                # a version suffix are created, so we use python.exe
                executable = os.path.join(sysconfig.get_config_var('BINDIR'),
                                'python%s' % (sysconfig.get_config_var('EXE')))
        if options:
            executable = self._get_alternate_executable(executable, options)

        if sys.platform.startswith('java'):  # pragma: no cover
            executable = self._fix_jython_executable(executable)

        # Normalise case for Windows - COMMENTED OUT
        # executable = os.path.normcase(executable)
        # N.B. The normalising operation above has been commented out: See
        # issue #124. Although paths in Windows are generally case-insensitive,
        # they aren't always. For example, a path containing a ẞ (which is a
        # LATIN CAPITAL LETTER SHARP S - U+1E9E) is normcased to ß (which is a
        # LATIN SMALL LETTER SHARP S' - U+00DF). The two are not considered by
        # Windows as equivalent in path names.

        # If the user didn't specify an executable, it may be necessary to
        # cater for executable paths with spaces (not uncommon on Windows)
        if enquote:
            executable = enquote_executable(executable)
        # Issue #51: don't use fsencode, since we later try to
        # check that the shebang is decodable using utf-8.
        executable = executable.encode('utf-8')
        # in case of IronPython, play safe and enable frames support
        if (sys.platform == 'cli' and '-X:Frames' not in post_interp
            and '-X:FullFrames' not in post_interp):  # pragma: no cover
            post_interp += b' -X:Frames'
        shebang = self._build_shebang(executable, post_interp)
        # Python parser starts to read a script using UTF-8 until
        # it gets a #coding:xxx cookie. The shebang has to be the
        # first line of a file, the #coding:xxx cookie cannot be
        # written before. So the shebang has to be decodable from
        # UTF-8.
        try:
            shebang.decode('utf-8')
        except UnicodeDecodeError:  # pragma: no cover
            raise ValueError(
                'The shebang (%r) is not decodable from utf-8' % shebang)
        # If the script is encoded to a custom encoding (use a
        # #coding:xxx cookie), the shebang has to be decodable from
        # the script encoding too.
        if encoding != 'utf-8':
            try:
                shebang.decode(encoding)
            except UnicodeDecodeError:  # pragma: no cover
                raise ValueError(
                    'The shebang (%r) is not decodable '
                    'from the script encoding (%r)' % (shebang, encoding))
        return shebang

    def _get_script_text(self, entry):
        return self.script_template % dict(module=entry.prefix,
                                           import_name=entry.suffix.split('.')[0],
                                           func=entry.suffix)

    manifest = _DEFAULT_MANIFEST

    def get_manifest(self, exename):
        base = os.path.basename(exename)
        return self.manifest % base

    def _write_script(self, names, shebang, script_bytes, filenames, ext):
        use_launcher = self.add_launchers and self._is_nt
        linesep = os.linesep.encode('utf-8')
        if not shebang.endswith(linesep):
            shebang += linesep
        if not use_launcher:
            script_bytes = shebang + script_bytes
        else:  # pragma: no cover
            if ext == 'py':
                launcher = self._get_launcher('t')
            else:
                launcher = self._get_launcher('w')
            stream = BytesIO()
            with ZipFile(stream, 'w') as zf:
                source_date_epoch = os.environ.get('SOURCE_DATE_EPOCH')
                if source_date_epoch:
                    date_time = time.gmtime(int(source_date_epoch))[:6]
                    zinfo = ZipInfo(filename='__main__.py', date_time=date_time)
                    zf.writestr(zinfo, script_bytes)
                else:
                    zf.writestr('__main__.py', script_bytes)
            zip_data = stream.getvalue()
            script_bytes = launcher + shebang + zip_data
        for name in names:
            outname = os.path.join(self.target_dir, name)
            if use_launcher:  # pragma: no cover
                n, e = os.path.splitext(outname)
                if e.startswith('.py'):
                    outname = n
                outname = '%s.exe' % outname
                try:
                    self._fileop.write_binary_file(outname, script_bytes)
                except Exception:
                    # Failed writing an executable - it might be in use.
                    logger.warning('Failed to write executable - trying to '
                                   'use .deleteme logic')
                    dfname = '%s.deleteme' % outname
                    if os.path.exists(dfname):
                        os.remove(dfname)       # Not allowed to fail here
                    os.rename(outname, dfname)  # nor here
                    self._fileop.write_binary_file(outname, script_bytes)
                    logger.debug('Able to replace executable using '
                                 '.deleteme logic')
                    try:
                        os.remove(dfname)
                    except Exception:
                        pass    # still in use - ignore error
            else:
                if self._is_nt and not outname.endswith('.' + ext):  # pragma: no cover
                    outname = '%s.%s' % (outname, ext)
                if os.path.exists(outname) and not self.clobber:
                    logger.warning('Skipping existing file %s', outname)
                    continue
                self._fileop.write_binary_file(outname, script_bytes)
                if self.set_mode:
                    self._fileop.set_executable_mode([outname])
            filenames.append(outname)

    variant_separator = '-'

    def get_script_filenames(self, name):
        result = set()
        if '' in self.variants:
            result.add(name)
        if 'X' in self.variants:
            result.add('%s%s' % (name, self.version_info[0]))
        if 'X.Y' in self.variants:
            result.add('%s%s%s.%s' % (name, self.variant_separator,
                                      self.version_info[0], self.version_info[1]))
        return result

    def _make_script(self, entry, filenames, options=None):
        post_interp = b''
        if options:
            args = options.get('interpreter_args', [])
            if args:
                args = ' %s' % ' '.join(args)
                post_interp = args.encode('utf-8')
        shebang = self._get_shebang('utf-8', post_interp, options=options)
        script = self._get_script_text(entry).encode('utf-8')
        scriptnames = self.get_script_filenames(entry.name)
        if options and options.get('gui', False):
            ext = 'pyw'
        else:
            ext = 'py'
        self._write_script(scriptnames, shebang, script, filenames, ext)

    def _copy_script(self, script, filenames):
        adjust = False
        script = os.path.join(self.source_dir, convert_path(script))
        outname = os.path.join(self.target_dir, os.path.basename(script))
        if not self.force and not self._fileop.newer(script, outname):
            logger.debug('not copying %s (up-to-date)', script)
            return

        # Always open the file, but ignore failures in dry-run mode --
        # that way, we'll get accurate feedback if we can read the
        # script.
        try:
            f = open(script, 'rb')
        except IOError:  # pragma: no cover
            if not self.dry_run:
                raise
            f = None
        else:
            first_line = f.readline()
            if not first_line:  # pragma: no cover
                logger.warning('%s is an empty file (skipping)', script)
                return

            match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n'))
            if match:
                adjust = True
                post_interp = match.group(1) or b''

        if not adjust:
            if f:
                f.close()
            self._fileop.copy_file(script, outname)
            if self.set_mode:
                self._fileop.set_executable_mode([outname])
            filenames.append(outname)
        else:
            logger.info('copying and adjusting %s -> %s', script,
                        self.target_dir)
            if not self._fileop.dry_run:
                encoding, lines = detect_encoding(f.readline)
                f.seek(0)
                shebang = self._get_shebang(encoding, post_interp)
                if b'pythonw' in first_line:  # pragma: no cover
                    ext = 'pyw'
                else:
                    ext = 'py'
                n = os.path.basename(outname)
                self._write_script([n], shebang, f.read(), filenames, ext)
            if f:
                f.close()

    @property
    def dry_run(self):
        return self._fileop.dry_run

    @dry_run.setter
    def dry_run(self, value):
        self._fileop.dry_run = value

    if os.name == 'nt' or (os.name == 'java' and os._name == 'nt'):  # pragma: no cover
        # Executable launcher support.
        # Launchers are from https://bitbucket.org/vinay.sajip/simple_launcher/

        def _get_launcher(self, kind):
            if struct.calcsize('P') == 8:   # 64-bit
                bits = '64'
            else:
                bits = '32'
            platform_suffix = '-arm' if get_platform() == 'win-arm64' else ''
            name = '%s%s%s.exe' % (kind, bits, platform_suffix)
            # Issue 31: don't hardcode an absolute package name, but
            # determine it relative to the current package
            distlib_package = __name__.rsplit('.', 1)[0]
            resource = finder(distlib_package).find(name)
            if not resource:
                msg = ('Unable to find resource %s in package %s' % (name,
                       distlib_package))
                raise ValueError(msg)
            return resource.bytes

    # Public API follows

    def make(self, specification, options=None):
        """
        Make a script.

        :param specification: The specification, which is either a valid export
                              entry specification (to make a script from a
                              callable) or a filename (to make a script by
                              copying from a source location).
        :param options: A dictionary of options controlling script generation.
        :return: A list of all absolute pathnames written to.
        """
        filenames = []
        entry = get_export_entry(specification)
        if entry is None:
            self._copy_script(specification, filenames)
        else:
            self._make_script(entry, filenames, options=options)
        return filenames

    def make_multiple(self, specifications, options=None):
        """
        Take a list of specifications and make scripts from them,
        :param specifications: A list of specifications.
        :return: A list of all absolute pathnames written to,
        """
        filenames = []
        for specification in specifications:
            filenames.extend(self.make(specification, options))
        return filenames
python3.12/site-packages/pip/_vendor/distlib/resources.py000064400000025104151732701610017360 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2017 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals

import bisect
import io
import logging
import os
import pkgutil
import sys
import types
import zipimport

from . import DistlibException
from .util import cached_property, get_cache_base, Cache

logger = logging.getLogger(__name__)


cache = None    # created when needed


class ResourceCache(Cache):
    def __init__(self, base=None):
        if base is None:
            # Use native string to avoid issues on 2.x: see Python #20140.
            base = os.path.join(get_cache_base(), str('resource-cache'))
        super(ResourceCache, self).__init__(base)

    def is_stale(self, resource, path):
        """
        Is the cache stale for the given resource?

        :param resource: The :class:`Resource` being cached.
        :param path: The path of the resource in the cache.
        :return: True if the cache is stale.
        """
        # Cache invalidation is a hard problem :-)
        return True

    def get(self, resource):
        """
        Get a resource into the cache,

        :param resource: A :class:`Resource` instance.
        :return: The pathname of the resource in the cache.
        """
        prefix, path = resource.finder.get_cache_info(resource)
        if prefix is None:
            result = path
        else:
            result = os.path.join(self.base, self.prefix_to_dir(prefix), path)
            dirname = os.path.dirname(result)
            if not os.path.isdir(dirname):
                os.makedirs(dirname)
            if not os.path.exists(result):
                stale = True
            else:
                stale = self.is_stale(resource, path)
            if stale:
                # write the bytes of the resource to the cache location
                with open(result, 'wb') as f:
                    f.write(resource.bytes)
        return result


class ResourceBase(object):
    def __init__(self, finder, name):
        self.finder = finder
        self.name = name


class Resource(ResourceBase):
    """
    A class representing an in-package resource, such as a data file. This is
    not normally instantiated by user code, but rather by a
    :class:`ResourceFinder` which manages the resource.
    """
    is_container = False        # Backwards compatibility

    def as_stream(self):
        """
        Get the resource as a stream.

        This is not a property to make it obvious that it returns a new stream
        each time.
        """
        return self.finder.get_stream(self)

    @cached_property
    def file_path(self):
        global cache
        if cache is None:
            cache = ResourceCache()
        return cache.get(self)

    @cached_property
    def bytes(self):
        return self.finder.get_bytes(self)

    @cached_property
    def size(self):
        return self.finder.get_size(self)


class ResourceContainer(ResourceBase):
    is_container = True     # Backwards compatibility

    @cached_property
    def resources(self):
        return self.finder.get_resources(self)


class ResourceFinder(object):
    """
    Resource finder for file system resources.
    """

    if sys.platform.startswith('java'):
        skipped_extensions = ('.pyc', '.pyo', '.class')
    else:
        skipped_extensions = ('.pyc', '.pyo')

    def __init__(self, module):
        self.module = module
        self.loader = getattr(module, '__loader__', None)
        self.base = os.path.dirname(getattr(module, '__file__', ''))

    def _adjust_path(self, path):
        return os.path.realpath(path)

    def _make_path(self, resource_name):
        # Issue #50: need to preserve type of path on Python 2.x
        # like os.path._get_sep
        if isinstance(resource_name, bytes):    # should only happen on 2.x
            sep = b'/'
        else:
            sep = '/'
        parts = resource_name.split(sep)
        parts.insert(0, self.base)
        result = os.path.join(*parts)
        return self._adjust_path(result)

    def _find(self, path):
        return os.path.exists(path)

    def get_cache_info(self, resource):
        return None, resource.path

    def find(self, resource_name):
        path = self._make_path(resource_name)
        if not self._find(path):
            result = None
        else:
            if self._is_directory(path):
                result = ResourceContainer(self, resource_name)
            else:
                result = Resource(self, resource_name)
            result.path = path
        return result

    def get_stream(self, resource):
        return open(resource.path, 'rb')

    def get_bytes(self, resource):
        with open(resource.path, 'rb') as f:
            return f.read()

    def get_size(self, resource):
        return os.path.getsize(resource.path)

    def get_resources(self, resource):
        def allowed(f):
            return (f != '__pycache__' and not
                    f.endswith(self.skipped_extensions))
        return set([f for f in os.listdir(resource.path) if allowed(f)])

    def is_container(self, resource):
        return self._is_directory(resource.path)

    _is_directory = staticmethod(os.path.isdir)

    def iterator(self, resource_name):
        resource = self.find(resource_name)
        if resource is not None:
            todo = [resource]
            while todo:
                resource = todo.pop(0)
                yield resource
                if resource.is_container:
                    rname = resource.name
                    for name in resource.resources:
                        if not rname:
                            new_name = name
                        else:
                            new_name = '/'.join([rname, name])
                        child = self.find(new_name)
                        if child.is_container:
                            todo.append(child)
                        else:
                            yield child


class ZipResourceFinder(ResourceFinder):
    """
    Resource finder for resources in .zip files.
    """
    def __init__(self, module):
        super(ZipResourceFinder, self).__init__(module)
        archive = self.loader.archive
        self.prefix_len = 1 + len(archive)
        # PyPy doesn't have a _files attr on zipimporter, and you can't set one
        if hasattr(self.loader, '_files'):
            self._files = self.loader._files
        else:
            self._files = zipimport._zip_directory_cache[archive]
        self.index = sorted(self._files)

    def _adjust_path(self, path):
        return path

    def _find(self, path):
        path = path[self.prefix_len:]
        if path in self._files:
            result = True
        else:
            if path and path[-1] != os.sep:
                path = path + os.sep
            i = bisect.bisect(self.index, path)
            try:
                result = self.index[i].startswith(path)
            except IndexError:
                result = False
        if not result:
            logger.debug('_find failed: %r %r', path, self.loader.prefix)
        else:
            logger.debug('_find worked: %r %r', path, self.loader.prefix)
        return result

    def get_cache_info(self, resource):
        prefix = self.loader.archive
        path = resource.path[1 + len(prefix):]
        return prefix, path

    def get_bytes(self, resource):
        return self.loader.get_data(resource.path)

    def get_stream(self, resource):
        return io.BytesIO(self.get_bytes(resource))

    def get_size(self, resource):
        path = resource.path[self.prefix_len:]
        return self._files[path][3]

    def get_resources(self, resource):
        path = resource.path[self.prefix_len:]
        if path and path[-1] != os.sep:
            path += os.sep
        plen = len(path)
        result = set()
        i = bisect.bisect(self.index, path)
        while i < len(self.index):
            if not self.index[i].startswith(path):
                break
            s = self.index[i][plen:]
            result.add(s.split(os.sep, 1)[0])   # only immediate children
            i += 1
        return result

    def _is_directory(self, path):
        path = path[self.prefix_len:]
        if path and path[-1] != os.sep:
            path += os.sep
        i = bisect.bisect(self.index, path)
        try:
            result = self.index[i].startswith(path)
        except IndexError:
            result = False
        return result


_finder_registry = {
    type(None): ResourceFinder,
    zipimport.zipimporter: ZipResourceFinder
}

try:
    # In Python 3.6, _frozen_importlib -> _frozen_importlib_external
    try:
        import _frozen_importlib_external as _fi
    except ImportError:
        import _frozen_importlib as _fi
    _finder_registry[_fi.SourceFileLoader] = ResourceFinder
    _finder_registry[_fi.FileFinder] = ResourceFinder
    # See issue #146
    _finder_registry[_fi.SourcelessFileLoader] = ResourceFinder
    del _fi
except (ImportError, AttributeError):
    pass


def register_finder(loader, finder_maker):
    _finder_registry[type(loader)] = finder_maker


_finder_cache = {}


def finder(package):
    """
    Return a resource finder for a package.
    :param package: The name of the package.
    :return: A :class:`ResourceFinder` instance for the package.
    """
    if package in _finder_cache:
        result = _finder_cache[package]
    else:
        if package not in sys.modules:
            __import__(package)
        module = sys.modules[package]
        path = getattr(module, '__path__', None)
        if path is None:
            raise DistlibException('You cannot get a finder for a module, '
                                   'only for a package')
        loader = getattr(module, '__loader__', None)
        finder_maker = _finder_registry.get(type(loader))
        if finder_maker is None:
            raise DistlibException('Unable to locate finder for %r' % package)
        result = finder_maker(module)
        _finder_cache[package] = result
    return result


_dummy_module = types.ModuleType(str('__dummy__'))


def finder_for_path(path):
    """
    Return a resource finder for a path, which should represent a container.

    :param path: The path.
    :return: A :class:`ResourceFinder` instance for the path.
    """
    result = None
    # calls any path hooks, gets importer into cache
    pkgutil.get_importer(path)
    loader = sys.path_importer_cache.get(path)
    finder = _finder_registry.get(type(loader))
    if finder:
        module = _dummy_module
        module.__file__ = os.path.join(path, '')
        module.__loader__ = loader
        result = finder(module)
    return result
python3.12/site-packages/pip/_vendor/distlib/index.py000064400000050542151732701620016462 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import hashlib
import logging
import os
import shutil
import subprocess
import tempfile
try:
    from threading import Thread
except ImportError:  # pragma: no cover
    from dummy_threading import Thread

from . import DistlibException
from .compat import (HTTPBasicAuthHandler, Request, HTTPPasswordMgr,
                     urlparse, build_opener, string_types)
from .util import zip_dir, ServerProxy

logger = logging.getLogger(__name__)

DEFAULT_INDEX = 'https://pypi.org/pypi'
DEFAULT_REALM = 'pypi'

class PackageIndex(object):
    """
    This class represents a package index compatible with PyPI, the Python
    Package Index.
    """

    boundary = b'----------ThIs_Is_tHe_distlib_index_bouNdaRY_$'

    def __init__(self, url=None):
        """
        Initialise an instance.

        :param url: The URL of the index. If not specified, the URL for PyPI is
                    used.
        """
        self.url = url or DEFAULT_INDEX
        self.read_configuration()
        scheme, netloc, path, params, query, frag = urlparse(self.url)
        if params or query or frag or scheme not in ('http', 'https'):
            raise DistlibException('invalid repository: %s' % self.url)
        self.password_handler = None
        self.ssl_verifier = None
        self.gpg = None
        self.gpg_home = None
        with open(os.devnull, 'w') as sink:
            # Use gpg by default rather than gpg2, as gpg2 insists on
            # prompting for passwords
            for s in ('gpg', 'gpg2'):
                try:
                    rc = subprocess.check_call([s, '--version'], stdout=sink,
                                               stderr=sink)
                    if rc == 0:
                        self.gpg = s
                        break
                except OSError:
                    pass

    def _get_pypirc_command(self):
        """
        Get the distutils command for interacting with PyPI configurations.
        :return: the command.
        """
        from .util import _get_pypirc_command as cmd
        return cmd()

    def read_configuration(self):
        """
        Read the PyPI access configuration as supported by distutils. This populates
        ``username``, ``password``, ``realm`` and ``url`` attributes from the
        configuration.
        """
        from .util import _load_pypirc
        cfg = _load_pypirc(self)
        self.username = cfg.get('username')
        self.password = cfg.get('password')
        self.realm = cfg.get('realm', 'pypi')
        self.url = cfg.get('repository', self.url)

    def save_configuration(self):
        """
        Save the PyPI access configuration. You must have set ``username`` and
        ``password`` attributes before calling this method.
        """
        self.check_credentials()
        from .util import _store_pypirc
        _store_pypirc(self)

    def check_credentials(self):
        """
        Check that ``username`` and ``password`` have been set, and raise an
        exception if not.
        """
        if self.username is None or self.password is None:
            raise DistlibException('username and password must be set')
        pm = HTTPPasswordMgr()
        _, netloc, _, _, _, _ = urlparse(self.url)
        pm.add_password(self.realm, netloc, self.username, self.password)
        self.password_handler = HTTPBasicAuthHandler(pm)

    def register(self, metadata):  # pragma: no cover
        """
        Register a distribution on PyPI, using the provided metadata.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the distribution to be
                         registered.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        metadata.validate()
        d = metadata.todict()
        d[':action'] = 'verify'
        request = self.encode_request(d.items(), [])
        response = self.send_request(request)
        d[':action'] = 'submit'
        request = self.encode_request(d.items(), [])
        return self.send_request(request)

    def _reader(self, name, stream, outbuf):
        """
        Thread runner for reading lines of from a subprocess into a buffer.

        :param name: The logical name of the stream (used for logging only).
        :param stream: The stream to read from. This will typically a pipe
                       connected to the output stream of a subprocess.
        :param outbuf: The list to append the read lines to.
        """
        while True:
            s = stream.readline()
            if not s:
                break
            s = s.decode('utf-8').rstrip()
            outbuf.append(s)
            logger.debug('%s: %s' % (name, s))
        stream.close()

    def get_sign_command(self, filename, signer, sign_password, keystore=None):  # pragma: no cover
        """
        Return a suitable command for signing a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param keystore: The path to a directory which contains the keys
                         used in verification. If not specified, the
                         instance's ``gpg_home`` attribute is used instead.
        :return: The signing command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        """
        cmd = [self.gpg, '--status-fd', '2', '--no-tty']
        if keystore is None:
            keystore = self.gpg_home
        if keystore:
            cmd.extend(['--homedir', keystore])
        if sign_password is not None:
            cmd.extend(['--batch', '--passphrase-fd', '0'])
        td = tempfile.mkdtemp()
        sf = os.path.join(td, os.path.basename(filename) + '.asc')
        cmd.extend(['--detach-sign', '--armor', '--local-user',
                    signer, '--output', sf, filename])
        logger.debug('invoking: %s', ' '.join(cmd))
        return cmd, sf

    def run_command(self, cmd, input_data=None):
        """
        Run a command in a child process , passing it any input data specified.

        :param cmd: The command to run.
        :param input_data: If specified, this must be a byte string containing
                           data to be sent to the child process.
        :return: A tuple consisting of the subprocess' exit code, a list of
                 lines read from the subprocess' ``stdout``, and a list of
                 lines read from the subprocess' ``stderr``.
        """
        kwargs = {
            'stdout': subprocess.PIPE,
            'stderr': subprocess.PIPE,
        }
        if input_data is not None:
            kwargs['stdin'] = subprocess.PIPE
        stdout = []
        stderr = []
        p = subprocess.Popen(cmd, **kwargs)
        # We don't use communicate() here because we may need to
        # get clever with interacting with the command
        t1 = Thread(target=self._reader, args=('stdout', p.stdout, stdout))
        t1.start()
        t2 = Thread(target=self._reader, args=('stderr', p.stderr, stderr))
        t2.start()
        if input_data is not None:
            p.stdin.write(input_data)
            p.stdin.close()

        p.wait()
        t1.join()
        t2.join()
        return p.returncode, stdout, stderr

    def sign_file(self, filename, signer, sign_password, keystore=None):  # pragma: no cover
        """
        Sign a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param keystore: The path to a directory which contains the keys
                         used in signing. If not specified, the instance's
                         ``gpg_home`` attribute is used instead.
        :return: The absolute pathname of the file where the signature is
                 stored.
        """
        cmd, sig_file = self.get_sign_command(filename, signer, sign_password,
                                              keystore)
        rc, stdout, stderr = self.run_command(cmd,
                                              sign_password.encode('utf-8'))
        if rc != 0:
            raise DistlibException('sign command failed with error '
                                   'code %s' % rc)
        return sig_file

    def upload_file(self, metadata, filename, signer=None, sign_password=None,
                    filetype='sdist', pyversion='source', keystore=None):
        """
        Upload a release file to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the file to be uploaded.
        :param filename: The pathname of the file to be uploaded.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param filetype: The type of the file being uploaded. This is the
                        distutils command which produced that file, e.g.
                        ``sdist`` or ``bdist_wheel``.
        :param pyversion: The version of Python which the release relates
                          to. For code compatible with any Python, this would
                          be ``source``, otherwise it would be e.g. ``3.2``.
        :param keystore: The path to a directory which contains the keys
                         used in signing. If not specified, the instance's
                         ``gpg_home`` attribute is used instead.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        if not os.path.exists(filename):
            raise DistlibException('not found: %s' % filename)
        metadata.validate()
        d = metadata.todict()
        sig_file = None
        if signer:
            if not self.gpg:
                logger.warning('no signing program available - not signed')
            else:
                sig_file = self.sign_file(filename, signer, sign_password,
                                          keystore)
        with open(filename, 'rb') as f:
            file_data = f.read()
        md5_digest = hashlib.md5(file_data).hexdigest()
        sha256_digest = hashlib.sha256(file_data).hexdigest()
        d.update({
            ':action': 'file_upload',
            'protocol_version': '1',
            'filetype': filetype,
            'pyversion': pyversion,
            'md5_digest': md5_digest,
            'sha256_digest': sha256_digest,
        })
        files = [('content', os.path.basename(filename), file_data)]
        if sig_file:
            with open(sig_file, 'rb') as f:
                sig_data = f.read()
            files.append(('gpg_signature', os.path.basename(sig_file),
                         sig_data))
            shutil.rmtree(os.path.dirname(sig_file))
        request = self.encode_request(d.items(), files)
        return self.send_request(request)

    def upload_documentation(self, metadata, doc_dir):  # pragma: no cover
        """
        Upload documentation to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the documentation to be
                         uploaded.
        :param doc_dir: The pathname of the directory which contains the
                        documentation. This should be the directory that
                        contains the ``index.html`` for the documentation.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        if not os.path.isdir(doc_dir):
            raise DistlibException('not a directory: %r' % doc_dir)
        fn = os.path.join(doc_dir, 'index.html')
        if not os.path.exists(fn):
            raise DistlibException('not found: %r' % fn)
        metadata.validate()
        name, version = metadata.name, metadata.version
        zip_data = zip_dir(doc_dir).getvalue()
        fields = [(':action', 'doc_upload'),
                  ('name', name), ('version', version)]
        files = [('content', name, zip_data)]
        request = self.encode_request(fields, files)
        return self.send_request(request)

    def get_verify_command(self, signature_filename, data_filename,
                           keystore=None):
        """
        Return a suitable command for verifying a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :param keystore: The path to a directory which contains the keys
                         used in verification. If not specified, the
                         instance's ``gpg_home`` attribute is used instead.
        :return: The verifying command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        """
        cmd = [self.gpg, '--status-fd', '2', '--no-tty']
        if keystore is None:
            keystore = self.gpg_home
        if keystore:
            cmd.extend(['--homedir', keystore])
        cmd.extend(['--verify', signature_filename, data_filename])
        logger.debug('invoking: %s', ' '.join(cmd))
        return cmd

    def verify_signature(self, signature_filename, data_filename,
                         keystore=None):
        """
        Verify a signature for a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :param keystore: The path to a directory which contains the keys
                         used in verification. If not specified, the
                         instance's ``gpg_home`` attribute is used instead.
        :return: True if the signature was verified, else False.
        """
        if not self.gpg:
            raise DistlibException('verification unavailable because gpg '
                                   'unavailable')
        cmd = self.get_verify_command(signature_filename, data_filename,
                                      keystore)
        rc, stdout, stderr = self.run_command(cmd)
        if rc not in (0, 1):
            raise DistlibException('verify command failed with error '
                             'code %s' % rc)
        return rc == 0

    def download_file(self, url, destfile, digest=None, reporthook=None):
        """
        This is a convenience method for downloading a file from an URL.
        Normally, this will be a file from the index, though currently
        no check is made for this (i.e. a file can be downloaded from
        anywhere).

        The method is just like the :func:`urlretrieve` function in the
        standard library, except that it allows digest computation to be
        done during download and checking that the downloaded data
        matched any expected value.

        :param url: The URL of the file to be downloaded (assumed to be
                    available via an HTTP GET request).
        :param destfile: The pathname where the downloaded file is to be
                         saved.
        :param digest: If specified, this must be a (hasher, value)
                       tuple, where hasher is the algorithm used (e.g.
                       ``'md5'``) and ``value`` is the expected value.
        :param reporthook: The same as for :func:`urlretrieve` in the
                           standard library.
        """
        if digest is None:
            digester = None
            logger.debug('No digest specified')
        else:
            if isinstance(digest, (list, tuple)):
                hasher, digest = digest
            else:
                hasher = 'md5'
            digester = getattr(hashlib, hasher)()
            logger.debug('Digest specified: %s' % digest)
        # The following code is equivalent to urlretrieve.
        # We need to do it this way so that we can compute the
        # digest of the file as we go.
        with open(destfile, 'wb') as dfp:
            # addinfourl is not a context manager on 2.x
            # so we have to use try/finally
            sfp = self.send_request(Request(url))
            try:
                headers = sfp.info()
                blocksize = 8192
                size = -1
                read = 0
                blocknum = 0
                if "content-length" in headers:
                    size = int(headers["Content-Length"])
                if reporthook:
                    reporthook(blocknum, blocksize, size)
                while True:
                    block = sfp.read(blocksize)
                    if not block:
                        break
                    read += len(block)
                    dfp.write(block)
                    if digester:
                        digester.update(block)
                    blocknum += 1
                    if reporthook:
                        reporthook(blocknum, blocksize, size)
            finally:
                sfp.close()

        # check that we got the whole file, if we can
        if size >= 0 and read < size:
            raise DistlibException(
                'retrieval incomplete: got only %d out of %d bytes'
                % (read, size))
        # if we have a digest, it must match.
        if digester:
            actual = digester.hexdigest()
            if digest != actual:
                raise DistlibException('%s digest mismatch for %s: expected '
                                       '%s, got %s' % (hasher, destfile,
                                                       digest, actual))
            logger.debug('Digest verified: %s', digest)

    def send_request(self, req):
        """
        Send a standard library :class:`Request` to PyPI and return its
        response.

        :param req: The request to send.
        :return: The HTTP response from PyPI (a standard library HTTPResponse).
        """
        handlers = []
        if self.password_handler:
            handlers.append(self.password_handler)
        if self.ssl_verifier:
            handlers.append(self.ssl_verifier)
        opener = build_opener(*handlers)
        return opener.open(req)

    def encode_request(self, fields, files):
        """
        Encode fields and files for posting to an HTTP server.

        :param fields: The fields to send as a list of (fieldname, value)
                       tuples.
        :param files: The files to send as a list of (fieldname, filename,
                      file_bytes) tuple.
        """
        # Adapted from packaging, which in turn was adapted from
        # http://code.activestate.com/recipes/146306

        parts = []
        boundary = self.boundary
        for k, values in fields:
            if not isinstance(values, (list, tuple)):
                values = [values]

            for v in values:
                parts.extend((
                    b'--' + boundary,
                    ('Content-Disposition: form-data; name="%s"' %
                     k).encode('utf-8'),
                    b'',
                    v.encode('utf-8')))
        for key, filename, value in files:
            parts.extend((
                b'--' + boundary,
                ('Content-Disposition: form-data; name="%s"; filename="%s"' %
                 (key, filename)).encode('utf-8'),
                b'',
                value))

        parts.extend((b'--' + boundary + b'--', b''))

        body = b'\r\n'.join(parts)
        ct = b'multipart/form-data; boundary=' + boundary
        headers = {
            'Content-type': ct,
            'Content-length': str(len(body))
        }
        return Request(self.url, body, headers)

    def search(self, terms, operator=None):  # pragma: no cover
        if isinstance(terms, string_types):
            terms = {'name': terms}
        rpc_proxy = ServerProxy(self.url, timeout=3.0)
        try:
            return rpc_proxy.search(terms, operator or 'and')
        finally:
            rpc_proxy('close')()
python3.12/site-packages/pip/_vendor/distlib/database.py000064400000144761151732701620017126 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2017 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""PEP 376 implementation."""

from __future__ import unicode_literals

import base64
import codecs
import contextlib
import hashlib
import logging
import os
import posixpath
import sys
import zipimport

from . import DistlibException, resources
from .compat import StringIO
from .version import get_scheme, UnsupportedVersionError
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (parse_requirement, cached_property, parse_name_and_version,
                   read_exports, write_exports, CSVReader, CSVWriter)


__all__ = ['Distribution', 'BaseInstalledDistribution',
           'InstalledDistribution', 'EggInfoDistribution',
           'DistributionPath']


logger = logging.getLogger(__name__)

EXPORTS_FILENAME = 'pydist-exports.json'
COMMANDS_FILENAME = 'pydist-commands.json'

DIST_FILES = ('INSTALLER', METADATA_FILENAME, 'RECORD', 'REQUESTED',
              'RESOURCES', EXPORTS_FILENAME, 'SHARED')

DISTINFO_EXT = '.dist-info'


class _Cache(object):
    """
    A simple cache mapping names and .dist-info paths to distributions
    """
    def __init__(self):
        """
        Initialise an instance. There is normally one for each DistributionPath.
        """
        self.name = {}
        self.path = {}
        self.generated = False

    def clear(self):
        """
        Clear the cache, setting it to its initial state.
        """
        self.name.clear()
        self.path.clear()
        self.generated = False

    def add(self, dist):
        """
        Add a distribution to the cache.
        :param dist: The distribution to add.
        """
        if dist.path not in self.path:
            self.path[dist.path] = dist
            self.name.setdefault(dist.key, []).append(dist)


class DistributionPath(object):
    """
    Represents a set of distributions installed on a path (typically sys.path).
    """
    def __init__(self, path=None, include_egg=False):
        """
        Create an instance from a path, optionally including legacy (distutils/
        setuptools/distribute) distributions.
        :param path: The path to use, as a list of directories. If not specified,
                     sys.path is used.
        :param include_egg: If True, this instance will look for and return legacy
                            distributions as well as those based on PEP 376.
        """
        if path is None:
            path = sys.path
        self.path = path
        self._include_dist = True
        self._include_egg = include_egg

        self._cache = _Cache()
        self._cache_egg = _Cache()
        self._cache_enabled = True
        self._scheme = get_scheme('default')

    def _get_cache_enabled(self):
        return self._cache_enabled

    def _set_cache_enabled(self, value):
        self._cache_enabled = value

    cache_enabled = property(_get_cache_enabled, _set_cache_enabled)

    def clear_cache(self):
        """
        Clears the internal cache.
        """
        self._cache.clear()
        self._cache_egg.clear()


    def _yield_distributions(self):
        """
        Yield .dist-info and/or .egg(-info) distributions.
        """
        # We need to check if we've seen some resources already, because on
        # some Linux systems (e.g. some Debian/Ubuntu variants) there are
        # symlinks which alias other files in the environment.
        seen = set()
        for path in self.path:
            finder = resources.finder_for_path(path)
            if finder is None:
                continue
            r = finder.find('')
            if not r or not r.is_container:
                continue
            rset = sorted(r.resources)
            for entry in rset:
                r = finder.find(entry)
                if not r or r.path in seen:
                    continue
                try:
                    if self._include_dist and entry.endswith(DISTINFO_EXT):
                        possible_filenames = [METADATA_FILENAME,
                                              WHEEL_METADATA_FILENAME,
                                              LEGACY_METADATA_FILENAME]
                        for metadata_filename in possible_filenames:
                            metadata_path = posixpath.join(entry, metadata_filename)
                            pydist = finder.find(metadata_path)
                            if pydist:
                                break
                        else:
                            continue

                        with contextlib.closing(pydist.as_stream()) as stream:
                            metadata = Metadata(fileobj=stream, scheme='legacy')
                        logger.debug('Found %s', r.path)
                        seen.add(r.path)
                        yield new_dist_class(r.path, metadata=metadata,
                                             env=self)
                    elif self._include_egg and entry.endswith(('.egg-info',
                                                              '.egg')):
                        logger.debug('Found %s', r.path)
                        seen.add(r.path)
                        yield old_dist_class(r.path, self)
                except Exception as e:
                    msg = 'Unable to read distribution at %s, perhaps due to bad metadata: %s'
                    logger.warning(msg, r.path, e)
                    import warnings
                    warnings.warn(msg % (r.path, e), stacklevel=2)

    def _generate_cache(self):
        """
        Scan the path for distributions and populate the cache with
        those that are found.
        """
        gen_dist = not self._cache.generated
        gen_egg = self._include_egg and not self._cache_egg.generated
        if gen_dist or gen_egg:
            for dist in self._yield_distributions():
                if isinstance(dist, InstalledDistribution):
                    self._cache.add(dist)
                else:
                    self._cache_egg.add(dist)

            if gen_dist:
                self._cache.generated = True
            if gen_egg:
                self._cache_egg.generated = True

    @classmethod
    def distinfo_dirname(cls, name, version):
        """
        The *name* and *version* parameters are converted into their
        filename-escaped form, i.e. any ``'-'`` characters are replaced
        with ``'_'`` other than the one in ``'dist-info'`` and the one
        separating the name from the version number.

        :parameter name: is converted to a standard distribution name by replacing
                         any runs of non- alphanumeric characters with a single
                         ``'-'``.
        :type name: string
        :parameter version: is converted to a standard version string. Spaces
                            become dots, and all other non-alphanumeric characters
                            (except dots) become dashes, with runs of multiple
                            dashes condensed to a single dash.
        :type version: string
        :returns: directory name
        :rtype: string"""
        name = name.replace('-', '_')
        return '-'.join([name, version]) + DISTINFO_EXT

    def get_distributions(self):
        """
        Provides an iterator that looks for distributions and returns
        :class:`InstalledDistribution` or
        :class:`EggInfoDistribution` instances for each one of them.

        :rtype: iterator of :class:`InstalledDistribution` and
                :class:`EggInfoDistribution` instances
        """
        if not self._cache_enabled:
            for dist in self._yield_distributions():
                yield dist
        else:
            self._generate_cache()

            for dist in self._cache.path.values():
                yield dist

            if self._include_egg:
                for dist in self._cache_egg.path.values():
                    yield dist

    def get_distribution(self, name):
        """
        Looks for a named distribution on the path.

        This function only returns the first result found, as no more than one
        value is expected. If nothing is found, ``None`` is returned.

        :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
                or ``None``
        """
        result = None
        name = name.lower()
        if not self._cache_enabled:
            for dist in self._yield_distributions():
                if dist.key == name:
                    result = dist
                    break
        else:
            self._generate_cache()

            if name in self._cache.name:
                result = self._cache.name[name][0]
            elif self._include_egg and name in self._cache_egg.name:
                result = self._cache_egg.name[name][0]
        return result

    def provides_distribution(self, name, version=None):
        """
        Iterates over all distributions to find which distributions provide *name*.
        If a *version* is provided, it will be used to filter the results.

        This function only returns the first result found, since no more than
        one values are expected. If the directory is not found, returns ``None``.

        :parameter version: a version specifier that indicates the version
                            required, conforming to the format in ``PEP-345``

        :type name: string
        :type version: string
        """
        matcher = None
        if version is not None:
            try:
                matcher = self._scheme.matcher('%s (%s)' % (name, version))
            except ValueError:
                raise DistlibException('invalid name or version: %r, %r' %
                                      (name, version))

        for dist in self.get_distributions():
            # We hit a problem on Travis where enum34 was installed and doesn't
            # have a provides attribute ...
            if not hasattr(dist, 'provides'):
                logger.debug('No "provides": %s', dist)
            else:
                provided = dist.provides

                for p in provided:
                    p_name, p_ver = parse_name_and_version(p)
                    if matcher is None:
                        if p_name == name:
                            yield dist
                            break
                    else:
                        if p_name == name and matcher.match(p_ver):
                            yield dist
                            break

    def get_file_path(self, name, relative_path):
        """
        Return the path to a resource file.
        """
        dist = self.get_distribution(name)
        if dist is None:
            raise LookupError('no distribution named %r found' % name)
        return dist.get_resource_path(relative_path)

    def get_exported_entries(self, category, name=None):
        """
        Return all of the exported entries in a particular category.

        :param category: The category to search for entries.
        :param name: If specified, only entries with that name are returned.
        """
        for dist in self.get_distributions():
            r = dist.exports
            if category in r:
                d = r[category]
                if name is not None:
                    if name in d:
                        yield d[name]
                else:
                    for v in d.values():
                        yield v


class Distribution(object):
    """
    A base class for distributions, whether installed or from indexes.
    Either way, it must have some metadata, so that's all that's needed
    for construction.
    """

    build_time_dependency = False
    """
    Set to True if it's known to be only a build-time dependency (i.e.
    not needed after installation).
    """

    requested = False
    """A boolean that indicates whether the ``REQUESTED`` metadata file is
    present (in other words, whether the package was installed by user
    request or it was installed as a dependency)."""

    def __init__(self, metadata):
        """
        Initialise an instance.
        :param metadata: The instance of :class:`Metadata` describing this
        distribution.
        """
        self.metadata = metadata
        self.name = metadata.name
        self.key = self.name.lower()    # for case-insensitive comparisons
        self.version = metadata.version
        self.locator = None
        self.digest = None
        self.extras = None      # additional features requested
        self.context = None     # environment marker overrides
        self.download_urls = set()
        self.digests = {}

    @property
    def source_url(self):
        """
        The source archive download URL for this distribution.
        """
        return self.metadata.source_url

    download_url = source_url   # Backward compatibility

    @property
    def name_and_version(self):
        """
        A utility property which displays the name and version in parentheses.
        """
        return '%s (%s)' % (self.name, self.version)

    @property
    def provides(self):
        """
        A set of distribution names and versions provided by this distribution.
        :return: A set of "name (version)" strings.
        """
        plist = self.metadata.provides
        s = '%s (%s)' % (self.name, self.version)
        if s not in plist:
            plist.append(s)
        return plist

    def _get_requirements(self, req_attr):
        md = self.metadata
        reqts = getattr(md, req_attr)
        logger.debug('%s: got requirements %r from metadata: %r', self.name, req_attr,
                     reqts)
        return set(md.get_requirements(reqts, extras=self.extras,
                                       env=self.context))

    @property
    def run_requires(self):
        return self._get_requirements('run_requires')

    @property
    def meta_requires(self):
        return self._get_requirements('meta_requires')

    @property
    def build_requires(self):
        return self._get_requirements('build_requires')

    @property
    def test_requires(self):
        return self._get_requirements('test_requires')

    @property
    def dev_requires(self):
        return self._get_requirements('dev_requires')

    def matches_requirement(self, req):
        """
        Say if this instance matches (fulfills) a requirement.
        :param req: The requirement to match.
        :rtype req: str
        :return: True if it matches, else False.
        """
        # Requirement may contain extras - parse to lose those
        # from what's passed to the matcher
        r = parse_requirement(req)
        scheme = get_scheme(self.metadata.scheme)
        try:
            matcher = scheme.matcher(r.requirement)
        except UnsupportedVersionError:
            # XXX compat-mode if cannot read the version
            logger.warning('could not read version %r - using name only',
                           req)
            name = req.split()[0]
            matcher = scheme.matcher(name)

        name = matcher.key   # case-insensitive

        result = False
        for p in self.provides:
            p_name, p_ver = parse_name_and_version(p)
            if p_name != name:
                continue
            try:
                result = matcher.match(p_ver)
                break
            except UnsupportedVersionError:
                pass
        return result

    def __repr__(self):
        """
        Return a textual representation of this instance,
        """
        if self.source_url:
            suffix = ' [%s]' % self.source_url
        else:
            suffix = ''
        return '<Distribution %s (%s)%s>' % (self.name, self.version, suffix)

    def __eq__(self, other):
        """
        See if this distribution is the same as another.
        :param other: The distribution to compare with. To be equal to one
                      another. distributions must have the same type, name,
                      version and source_url.
        :return: True if it is the same, else False.
        """
        if type(other) is not type(self):
            result = False
        else:
            result = (self.name == other.name and
                      self.version == other.version and
                      self.source_url == other.source_url)
        return result

    def __hash__(self):
        """
        Compute hash in a way which matches the equality test.
        """
        return hash(self.name) + hash(self.version) + hash(self.source_url)


class BaseInstalledDistribution(Distribution):
    """
    This is the base class for installed distributions (whether PEP 376 or
    legacy).
    """

    hasher = None

    def __init__(self, metadata, path, env=None):
        """
        Initialise an instance.
        :param metadata: An instance of :class:`Metadata` which describes the
                         distribution. This will normally have been initialised
                         from a metadata file in the ``path``.
        :param path:     The path of the ``.dist-info`` or ``.egg-info``
                         directory for the distribution.
        :param env:      This is normally the :class:`DistributionPath`
                         instance where this distribution was found.
        """
        super(BaseInstalledDistribution, self).__init__(metadata)
        self.path = path
        self.dist_path = env

    def get_hash(self, data, hasher=None):
        """
        Get the hash of some data, using a particular hash algorithm, if
        specified.

        :param data: The data to be hashed.
        :type data: bytes
        :param hasher: The name of a hash implementation, supported by hashlib,
                       or ``None``. Examples of valid values are ``'sha1'``,
                       ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
                       ``'sha512'``. If no hasher is specified, the ``hasher``
                       attribute of the :class:`InstalledDistribution` instance
                       is used. If the hasher is determined to be ``None``, MD5
                       is used as the hashing algorithm.
        :returns: The hash of the data. If a hasher was explicitly specified,
                  the returned hash will be prefixed with the specified hasher
                  followed by '='.
        :rtype: str
        """
        if hasher is None:
            hasher = self.hasher
        if hasher is None:
            hasher = hashlib.md5
            prefix = ''
        else:
            hasher = getattr(hashlib, hasher)
            prefix = '%s=' % self.hasher
        digest = hasher(data).digest()
        digest = base64.urlsafe_b64encode(digest).rstrip(b'=').decode('ascii')
        return '%s%s' % (prefix, digest)


class InstalledDistribution(BaseInstalledDistribution):
    """
    Created with the *path* of the ``.dist-info`` directory provided to the
    constructor. It reads the metadata contained in ``pydist.json`` when it is
    instantiated., or uses a passed in Metadata instance (useful for when
    dry-run mode is being used).
    """

    hasher = 'sha256'

    def __init__(self, path, metadata=None, env=None):
        self.modules = []
        self.finder = finder = resources.finder_for_path(path)
        if finder is None:
            raise ValueError('finder unavailable for %s' % path)
        if env and env._cache_enabled and path in env._cache.path:
            metadata = env._cache.path[path].metadata
        elif metadata is None:
            r = finder.find(METADATA_FILENAME)
            # Temporary - for Wheel 0.23 support
            if r is None:
                r = finder.find(WHEEL_METADATA_FILENAME)
            # Temporary - for legacy support
            if r is None:
                r = finder.find(LEGACY_METADATA_FILENAME)
            if r is None:
                raise ValueError('no %s found in %s' % (METADATA_FILENAME,
                                                        path))
            with contextlib.closing(r.as_stream()) as stream:
                metadata = Metadata(fileobj=stream, scheme='legacy')

        super(InstalledDistribution, self).__init__(metadata, path, env)

        if env and env._cache_enabled:
            env._cache.add(self)

        r = finder.find('REQUESTED')
        self.requested = r is not None
        p  = os.path.join(path, 'top_level.txt')
        if os.path.exists(p):
            with open(p, 'rb') as f:
                data = f.read().decode('utf-8')
            self.modules = data.splitlines()

    def __repr__(self):
        return '<InstalledDistribution %r %s at %r>' % (
            self.name, self.version, self.path)

    def __str__(self):
        return "%s %s" % (self.name, self.version)

    def _get_records(self):
        """
        Get the list of installed files for the distribution
        :return: A list of tuples of path, hash and size. Note that hash and
                 size might be ``None`` for some entries. The path is exactly
                 as stored in the file (which is as in PEP 376).
        """
        results = []
        r = self.get_distinfo_resource('RECORD')
        with contextlib.closing(r.as_stream()) as stream:
            with CSVReader(stream=stream) as record_reader:
                # Base location is parent dir of .dist-info dir
                #base_location = os.path.dirname(self.path)
                #base_location = os.path.abspath(base_location)
                for row in record_reader:
                    missing = [None for i in range(len(row), 3)]
                    path, checksum, size = row + missing
                    #if not os.path.isabs(path):
                    #    path = path.replace('/', os.sep)
                    #    path = os.path.join(base_location, path)
                    results.append((path, checksum, size))
        return results

    @cached_property
    def exports(self):
        """
        Return the information exported by this distribution.
        :return: A dictionary of exports, mapping an export category to a dict
                 of :class:`ExportEntry` instances describing the individual
                 export entries, and keyed by name.
        """
        result = {}
        r = self.get_distinfo_resource(EXPORTS_FILENAME)
        if r:
            result = self.read_exports()
        return result

    def read_exports(self):
        """
        Read exports data from a file in .ini format.

        :return: A dictionary of exports, mapping an export category to a list
                 of :class:`ExportEntry` instances describing the individual
                 export entries.
        """
        result = {}
        r = self.get_distinfo_resource(EXPORTS_FILENAME)
        if r:
            with contextlib.closing(r.as_stream()) as stream:
                result = read_exports(stream)
        return result

    def write_exports(self, exports):
        """
        Write a dictionary of exports to a file in .ini format.
        :param exports: A dictionary of exports, mapping an export category to
                        a list of :class:`ExportEntry` instances describing the
                        individual export entries.
        """
        rf = self.get_distinfo_file(EXPORTS_FILENAME)
        with open(rf, 'w') as f:
            write_exports(exports, f)

    def get_resource_path(self, relative_path):
        """
        NOTE: This API may change in the future.

        Return the absolute path to a resource file with the given relative
        path.

        :param relative_path: The path, relative to .dist-info, of the resource
                              of interest.
        :return: The absolute path where the resource is to be found.
        """
        r = self.get_distinfo_resource('RESOURCES')
        with contextlib.closing(r.as_stream()) as stream:
            with CSVReader(stream=stream) as resources_reader:
                for relative, destination in resources_reader:
                    if relative == relative_path:
                        return destination
        raise KeyError('no resource file with relative path %r '
                       'is installed' % relative_path)

    def list_installed_files(self):
        """
        Iterates over the ``RECORD`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: iterator of (path, hash, size)
        """
        for result in self._get_records():
            yield result

    def write_installed_files(self, paths, prefix, dry_run=False):
        """
        Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
        existing ``RECORD`` file is silently overwritten.

        prefix is used to determine when to write absolute paths.
        """
        prefix = os.path.join(prefix, '')
        base = os.path.dirname(self.path)
        base_under_prefix = base.startswith(prefix)
        base = os.path.join(base, '')
        record_path = self.get_distinfo_file('RECORD')
        logger.info('creating %s', record_path)
        if dry_run:
            return None
        with CSVWriter(record_path) as writer:
            for path in paths:
                if os.path.isdir(path) or path.endswith(('.pyc', '.pyo')):
                    # do not put size and hash, as in PEP-376
                    hash_value = size = ''
                else:
                    size = '%d' % os.path.getsize(path)
                    with open(path, 'rb') as fp:
                        hash_value = self.get_hash(fp.read())
                if path.startswith(base) or (base_under_prefix and
                                             path.startswith(prefix)):
                    path = os.path.relpath(path, base)
                writer.writerow((path, hash_value, size))

            # add the RECORD file itself
            if record_path.startswith(base):
                record_path = os.path.relpath(record_path, base)
            writer.writerow((record_path, '', ''))
        return record_path

    def check_installed_files(self):
        """
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        """
        mismatches = []
        base = os.path.dirname(self.path)
        record_path = self.get_distinfo_file('RECORD')
        for path, hash_value, size in self.list_installed_files():
            if not os.path.isabs(path):
                path = os.path.join(base, path)
            if path == record_path:
                continue
            if not os.path.exists(path):
                mismatches.append((path, 'exists', True, False))
            elif os.path.isfile(path):
                actual_size = str(os.path.getsize(path))
                if size and actual_size != size:
                    mismatches.append((path, 'size', size, actual_size))
                elif hash_value:
                    if '=' in hash_value:
                        hasher = hash_value.split('=', 1)[0]
                    else:
                        hasher = None

                    with open(path, 'rb') as f:
                        actual_hash = self.get_hash(f.read(), hasher)
                        if actual_hash != hash_value:
                            mismatches.append((path, 'hash', hash_value, actual_hash))
        return mismatches

    @cached_property
    def shared_locations(self):
        """
        A dictionary of shared locations whose keys are in the set 'prefix',
        'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
        The corresponding value is the absolute path of that category for
        this distribution, and takes into account any paths selected by the
        user at installation time (e.g. via command-line arguments). In the
        case of the 'namespace' key, this would be a list of absolute paths
        for the roots of namespace packages in this distribution.

        The first time this property is accessed, the relevant information is
        read from the SHARED file in the .dist-info directory.
        """
        result = {}
        shared_path = os.path.join(self.path, 'SHARED')
        if os.path.isfile(shared_path):
            with codecs.open(shared_path, 'r', encoding='utf-8') as f:
                lines = f.read().splitlines()
            for line in lines:
                key, value = line.split('=', 1)
                if key == 'namespace':
                    result.setdefault(key, []).append(value)
                else:
                    result[key] = value
        return result

    def write_shared_locations(self, paths, dry_run=False):
        """
        Write shared location information to the SHARED file in .dist-info.
        :param paths: A dictionary as described in the documentation for
        :meth:`shared_locations`.
        :param dry_run: If True, the action is logged but no file is actually
                        written.
        :return: The path of the file written to.
        """
        shared_path = os.path.join(self.path, 'SHARED')
        logger.info('creating %s', shared_path)
        if dry_run:
            return None
        lines = []
        for key in ('prefix', 'lib', 'headers', 'scripts', 'data'):
            path = paths[key]
            if os.path.isdir(paths[key]):
                lines.append('%s=%s' % (key,  path))
        for ns in paths.get('namespace', ()):
            lines.append('namespace=%s' % ns)

        with codecs.open(shared_path, 'w', encoding='utf-8') as f:
            f.write('\n'.join(lines))
        return shared_path

    def get_distinfo_resource(self, path):
        if path not in DIST_FILES:
            raise DistlibException('invalid path for a dist-info file: '
                                   '%r at %r' % (path, self.path))
        finder = resources.finder_for_path(self.path)
        if finder is None:
            raise DistlibException('Unable to get a finder for %s' % self.path)
        return finder.find(path)

    def get_distinfo_file(self, path):
        """
        Returns a path located under the ``.dist-info`` directory. Returns a
        string representing the path.

        :parameter path: a ``'/'``-separated path relative to the
                         ``.dist-info`` directory or an absolute path;
                         If *path* is an absolute path and doesn't start
                         with the ``.dist-info`` directory path,
                         a :class:`DistlibException` is raised
        :type path: str
        :rtype: str
        """
        # Check if it is an absolute path  # XXX use relpath, add tests
        if path.find(os.sep) >= 0:
            # it's an absolute path?
            distinfo_dirname, path = path.split(os.sep)[-2:]
            if distinfo_dirname != self.path.split(os.sep)[-1]:
                raise DistlibException(
                    'dist-info file %r does not belong to the %r %s '
                    'distribution' % (path, self.name, self.version))

        # The file must be relative
        if path not in DIST_FILES:
            raise DistlibException('invalid path for a dist-info file: '
                                   '%r at %r' % (path, self.path))

        return os.path.join(self.path, path)

    def list_distinfo_files(self):
        """
        Iterates over the ``RECORD`` entries and returns paths for each line if
        the path is pointing to a file located in the ``.dist-info`` directory
        or one of its subdirectories.

        :returns: iterator of paths
        """
        base = os.path.dirname(self.path)
        for path, checksum, size in self._get_records():
            # XXX add separator or use real relpath algo
            if not os.path.isabs(path):
                path = os.path.join(base, path)
            if path.startswith(self.path):
                yield path

    def __eq__(self, other):
        return (isinstance(other, InstalledDistribution) and
                self.path == other.path)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    __hash__ = object.__hash__


class EggInfoDistribution(BaseInstalledDistribution):
    """Created with the *path* of the ``.egg-info`` directory or file provided
    to the constructor. It reads the metadata contained in the file itself, or
    if the given path happens to be a directory, the metadata is read from the
    file ``PKG-INFO`` under that directory."""

    requested = True    # as we have no way of knowing, assume it was
    shared_locations = {}

    def __init__(self, path, env=None):
        def set_name_and_version(s, n, v):
            s.name = n
            s.key = n.lower()   # for case-insensitive comparisons
            s.version = v

        self.path = path
        self.dist_path = env
        if env and env._cache_enabled and path in env._cache_egg.path:
            metadata = env._cache_egg.path[path].metadata
            set_name_and_version(self, metadata.name, metadata.version)
        else:
            metadata = self._get_metadata(path)

            # Need to be set before caching
            set_name_and_version(self, metadata.name, metadata.version)

            if env and env._cache_enabled:
                env._cache_egg.add(self)
        super(EggInfoDistribution, self).__init__(metadata, path, env)

    def _get_metadata(self, path):
        requires = None

        def parse_requires_data(data):
            """Create a list of dependencies from a requires.txt file.

            *data*: the contents of a setuptools-produced requires.txt file.
            """
            reqs = []
            lines = data.splitlines()
            for line in lines:
                line = line.strip()
                if line.startswith('['):
                    logger.warning('Unexpected line: quitting requirement scan: %r',
                                   line)
                    break
                r = parse_requirement(line)
                if not r:
                    logger.warning('Not recognised as a requirement: %r', line)
                    continue
                if r.extras:
                    logger.warning('extra requirements in requires.txt are '
                                   'not supported')
                if not r.constraints:
                    reqs.append(r.name)
                else:
                    cons = ', '.join('%s%s' % c for c in r.constraints)
                    reqs.append('%s (%s)' % (r.name, cons))
            return reqs

        def parse_requires_path(req_path):
            """Create a list of dependencies from a requires.txt file.

            *req_path*: the path to a setuptools-produced requires.txt file.
            """

            reqs = []
            try:
                with codecs.open(req_path, 'r', 'utf-8') as fp:
                    reqs = parse_requires_data(fp.read())
            except IOError:
                pass
            return reqs

        tl_path = tl_data = None
        if path.endswith('.egg'):
            if os.path.isdir(path):
                p = os.path.join(path, 'EGG-INFO')
                meta_path = os.path.join(p, 'PKG-INFO')
                metadata = Metadata(path=meta_path, scheme='legacy')
                req_path = os.path.join(p, 'requires.txt')
                tl_path = os.path.join(p, 'top_level.txt')
                requires = parse_requires_path(req_path)
            else:
                # FIXME handle the case where zipfile is not available
                zipf = zipimport.zipimporter(path)
                fileobj = StringIO(
                    zipf.get_data('EGG-INFO/PKG-INFO').decode('utf8'))
                metadata = Metadata(fileobj=fileobj, scheme='legacy')
                try:
                    data = zipf.get_data('EGG-INFO/requires.txt')
                    tl_data = zipf.get_data('EGG-INFO/top_level.txt').decode('utf-8')
                    requires = parse_requires_data(data.decode('utf-8'))
                except IOError:
                    requires = None
        elif path.endswith('.egg-info'):
            if os.path.isdir(path):
                req_path = os.path.join(path, 'requires.txt')
                requires = parse_requires_path(req_path)
                path = os.path.join(path, 'PKG-INFO')
                tl_path = os.path.join(path, 'top_level.txt')
            metadata = Metadata(path=path, scheme='legacy')
        else:
            raise DistlibException('path must end with .egg-info or .egg, '
                                   'got %r' % path)

        if requires:
            metadata.add_requirements(requires)
        # look for top-level modules in top_level.txt, if present
        if tl_data is None:
            if tl_path is not None and os.path.exists(tl_path):
                with open(tl_path, 'rb') as f:
                    tl_data = f.read().decode('utf-8')
        if not tl_data:
            tl_data = []
        else:
            tl_data = tl_data.splitlines()
        self.modules = tl_data
        return metadata

    def __repr__(self):
        return '<EggInfoDistribution %r %s at %r>' % (
            self.name, self.version, self.path)

    def __str__(self):
        return "%s %s" % (self.name, self.version)

    def check_installed_files(self):
        """
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        """
        mismatches = []
        record_path = os.path.join(self.path, 'installed-files.txt')
        if os.path.exists(record_path):
            for path, _, _ in self.list_installed_files():
                if path == record_path:
                    continue
                if not os.path.exists(path):
                    mismatches.append((path, 'exists', True, False))
        return mismatches

    def list_installed_files(self):
        """
        Iterates over the ``installed-files.txt`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: a list of (path, hash, size)
        """

        def _md5(path):
            f = open(path, 'rb')
            try:
                content = f.read()
            finally:
                f.close()
            return hashlib.md5(content).hexdigest()

        def _size(path):
            return os.stat(path).st_size

        record_path = os.path.join(self.path, 'installed-files.txt')
        result = []
        if os.path.exists(record_path):
            with codecs.open(record_path, 'r', encoding='utf-8') as f:
                for line in f:
                    line = line.strip()
                    p = os.path.normpath(os.path.join(self.path, line))
                    # "./" is present as a marker between installed files
                    # and installation metadata files
                    if not os.path.exists(p):
                        logger.warning('Non-existent file: %s', p)
                        if p.endswith(('.pyc', '.pyo')):
                            continue
                        #otherwise fall through and fail
                    if not os.path.isdir(p):
                        result.append((p, _md5(p), _size(p)))
            result.append((record_path, None, None))
        return result

    def list_distinfo_files(self, absolute=False):
        """
        Iterates over the ``installed-files.txt`` entries and returns paths for
        each line if the path is pointing to a file located in the
        ``.egg-info`` directory or one of its subdirectories.

        :parameter absolute: If *absolute* is ``True``, each returned path is
                          transformed into a local absolute path. Otherwise the
                          raw value from ``installed-files.txt`` is returned.
        :type absolute: boolean
        :returns: iterator of paths
        """
        record_path = os.path.join(self.path, 'installed-files.txt')
        if os.path.exists(record_path):
            skip = True
            with codecs.open(record_path, 'r', encoding='utf-8') as f:
                for line in f:
                    line = line.strip()
                    if line == './':
                        skip = False
                        continue
                    if not skip:
                        p = os.path.normpath(os.path.join(self.path, line))
                        if p.startswith(self.path):
                            if absolute:
                                yield p
                            else:
                                yield line

    def __eq__(self, other):
        return (isinstance(other, EggInfoDistribution) and
                self.path == other.path)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    __hash__ = object.__hash__

new_dist_class = InstalledDistribution
old_dist_class = EggInfoDistribution


class DependencyGraph(object):
    """
    Represents a dependency graph between distributions.

    The dependency relationships are stored in an ``adjacency_list`` that maps
    distributions to a list of ``(other, label)`` tuples where  ``other``
    is a distribution and the edge is labeled with ``label`` (i.e. the version
    specifier, if such was provided). Also, for more efficient traversal, for
    every distribution ``x``, a list of predecessors is kept in
    ``reverse_list[x]``. An edge from distribution ``a`` to
    distribution ``b`` means that ``a`` depends on ``b``. If any missing
    dependencies are found, they are stored in ``missing``, which is a
    dictionary that maps distributions to a list of requirements that were not
    provided by any other distributions.
    """

    def __init__(self):
        self.adjacency_list = {}
        self.reverse_list = {}
        self.missing = {}

    def add_distribution(self, distribution):
        """Add the *distribution* to the graph.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        """
        self.adjacency_list[distribution] = []
        self.reverse_list[distribution] = []
        #self.missing[distribution] = []

    def add_edge(self, x, y, label=None):
        """Add an edge from distribution *x* to distribution *y* with the given
        *label*.

        :type x: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type y: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type label: ``str`` or ``None``
        """
        self.adjacency_list[x].append((y, label))
        # multiple edges are allowed, so be careful
        if x not in self.reverse_list[y]:
            self.reverse_list[y].append(x)

    def add_missing(self, distribution, requirement):
        """
        Add a missing *requirement* for the given *distribution*.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        :type requirement: ``str``
        """
        logger.debug('%s missing %r', distribution, requirement)
        self.missing.setdefault(distribution, []).append(requirement)

    def _repr_dist(self, dist):
        return '%s %s' % (dist.name, dist.version)

    def repr_node(self, dist, level=1):
        """Prints only a subgraph"""
        output = [self._repr_dist(dist)]
        for other, label in self.adjacency_list[dist]:
            dist = self._repr_dist(other)
            if label is not None:
                dist = '%s [%s]' % (dist, label)
            output.append('    ' * level + str(dist))
            suboutput = self.repr_node(other, level + 1)
            subs = suboutput.split('\n')
            output.extend(subs[1:])
        return '\n'.join(output)

    def to_dot(self, f, skip_disconnected=True):
        """Writes a DOT output for the graph to the provided file *f*.

        If *skip_disconnected* is set to ``True``, then all distributions
        that are not dependent on any other distribution are skipped.

        :type f: has to support ``file``-like operations
        :type skip_disconnected: ``bool``
        """
        disconnected = []

        f.write("digraph dependencies {\n")
        for dist, adjs in self.adjacency_list.items():
            if len(adjs) == 0 and not skip_disconnected:
                disconnected.append(dist)
            for other, label in adjs:
                if not label is None:
                    f.write('"%s" -> "%s" [label="%s"]\n' %
                            (dist.name, other.name, label))
                else:
                    f.write('"%s" -> "%s"\n' % (dist.name, other.name))
        if not skip_disconnected and len(disconnected) > 0:
            f.write('subgraph disconnected {\n')
            f.write('label = "Disconnected"\n')
            f.write('bgcolor = red\n')

            for dist in disconnected:
                f.write('"%s"' % dist.name)
                f.write('\n')
            f.write('}\n')
        f.write('}\n')

    def topological_sort(self):
        """
        Perform a topological sort of the graph.
        :return: A tuple, the first element of which is a topologically sorted
                 list of distributions, and the second element of which is a
                 list of distributions that cannot be sorted because they have
                 circular dependencies and so form a cycle.
        """
        result = []
        # Make a shallow copy of the adjacency list
        alist = {}
        for k, v in self.adjacency_list.items():
            alist[k] = v[:]
        while True:
            # See what we can remove in this run
            to_remove = []
            for k, v in list(alist.items())[:]:
                if not v:
                    to_remove.append(k)
                    del alist[k]
            if not to_remove:
                # What's left in alist (if anything) is a cycle.
                break
            # Remove from the adjacency list of others
            for k, v in alist.items():
                alist[k] = [(d, r) for d, r in v if d not in to_remove]
            logger.debug('Moving to result: %s',
                         ['%s (%s)' % (d.name, d.version) for d in to_remove])
            result.extend(to_remove)
        return result, list(alist.keys())

    def __repr__(self):
        """Representation of the graph"""
        output = []
        for dist, adjs in self.adjacency_list.items():
            output.append(self.repr_node(dist))
        return '\n'.join(output)


def make_graph(dists, scheme='default'):
    """Makes a dependency graph from the given distributions.

    :parameter dists: a list of distributions
    :type dists: list of :class:`distutils2.database.InstalledDistribution` and
                 :class:`distutils2.database.EggInfoDistribution` instances
    :rtype: a :class:`DependencyGraph` instance
    """
    scheme = get_scheme(scheme)
    graph = DependencyGraph()
    provided = {}  # maps names to lists of (version, dist) tuples

    # first, build the graph and find out what's provided
    for dist in dists:
        graph.add_distribution(dist)

        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Add to provided: %s, %s, %s', name, version, dist)
            provided.setdefault(name, []).append((version, dist))

    # now make the edges
    for dist in dists:
        requires = (dist.run_requires | dist.meta_requires |
                    dist.build_requires | dist.dev_requires)
        for req in requires:
            try:
                matcher = scheme.matcher(req)
            except UnsupportedVersionError:
                # XXX compat-mode if cannot read the version
                logger.warning('could not read version %r - using name only',
                               req)
                name = req.split()[0]
                matcher = scheme.matcher(name)

            name = matcher.key   # case-insensitive

            matched = False
            if name in provided:
                for version, provider in provided[name]:
                    try:
                        match = matcher.match(version)
                    except UnsupportedVersionError:
                        match = False

                    if match:
                        graph.add_edge(dist, provider, req)
                        matched = True
                        break
            if not matched:
                graph.add_missing(dist, req)
    return graph


def get_dependent_dists(dists, dist):
    """Recursively generate a list of distributions from *dists* that are
    dependent on *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    """
    if dist not in dists:
        raise DistlibException('given distribution %r is not a member '
                               'of the list' % dist.name)
    graph = make_graph(dists)

    dep = [dist]  # dependent distributions
    todo = graph.reverse_list[dist]  # list of nodes we should inspect

    while todo:
        d = todo.pop()
        dep.append(d)
        for succ in graph.reverse_list[d]:
            if succ not in dep:
                todo.append(succ)

    dep.pop(0)  # remove dist from dep, was there to prevent infinite loops
    return dep


def get_required_dists(dists, dist):
    """Recursively generate a list of distributions from *dists* that are
    required by *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
                 in finding the dependencies.
    """
    if dist not in dists:
        raise DistlibException('given distribution %r is not a member '
                               'of the list' % dist.name)
    graph = make_graph(dists)

    req = set()  # required distributions
    todo = graph.adjacency_list[dist]  # list of nodes we should inspect
    seen = set(t[0] for t in todo) # already added to todo

    while todo:
        d = todo.pop()[0]
        req.add(d)
        pred_list = graph.adjacency_list[d]
        for pred in pred_list:
            d = pred[0]
            if d not in req and d not in seen:
                seen.add(d)
                todo.append(pred)
    return req


def make_dist(name, version, **kwargs):
    """
    A convenience method for making a dist given just a name and version.
    """
    summary = kwargs.pop('summary', 'Placeholder for summary')
    md = Metadata(**kwargs)
    md.name = name
    md.version = version
    md.summary = summary or 'Placeholder for summary'
    return Distribution(md)
python3.12/site-packages/pip/_vendor/distlib/metadata.py000064400000115571151732701620017137 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Implementation of the Metadata for Python packages PEPs.

Supports all metadata formats (1.0, 1.1, 1.2, 1.3/2.1 and 2.2).
"""
from __future__ import unicode_literals

import codecs
from email import message_from_file
import json
import logging
import re


from . import DistlibException, __version__
from .compat import StringIO, string_types, text_type
from .markers import interpret
from .util import extract_by_key, get_extras
from .version import get_scheme, PEP440_VERSION_RE

logger = logging.getLogger(__name__)


class MetadataMissingError(DistlibException):
    """A required metadata is missing"""


class MetadataConflictError(DistlibException):
    """Attempt to read or write metadata fields that are conflictual."""


class MetadataUnrecognizedVersionError(DistlibException):
    """Unknown metadata version number."""


class MetadataInvalidError(DistlibException):
    """A metadata value is invalid"""

# public API of this module
__all__ = ['Metadata', 'PKG_INFO_ENCODING', 'PKG_INFO_PREFERRED_VERSION']

# Encoding used for the PKG-INFO files
PKG_INFO_ENCODING = 'utf-8'

# preferred version. Hopefully will be changed
# to 1.2 once PEP 345 is supported everywhere
PKG_INFO_PREFERRED_VERSION = '1.1'

_LINE_PREFIX_1_2 = re.compile('\n       \\|')
_LINE_PREFIX_PRE_1_2 = re.compile('\n        ')
_241_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'License')

_314_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'License', 'Classifier', 'Download-URL', 'Obsoletes',
               'Provides', 'Requires')

_314_MARKERS = ('Obsoletes', 'Provides', 'Requires', 'Classifier',
                'Download-URL')

_345_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'Maintainer', 'Maintainer-email', 'License',
               'Classifier', 'Download-URL', 'Obsoletes-Dist',
               'Project-URL', 'Provides-Dist', 'Requires-Dist',
               'Requires-Python', 'Requires-External')

_345_MARKERS = ('Provides-Dist', 'Requires-Dist', 'Requires-Python',
                'Obsoletes-Dist', 'Requires-External', 'Maintainer',
                'Maintainer-email', 'Project-URL')

_426_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'Maintainer', 'Maintainer-email', 'License',
               'Classifier', 'Download-URL', 'Obsoletes-Dist',
               'Project-URL', 'Provides-Dist', 'Requires-Dist',
               'Requires-Python', 'Requires-External', 'Private-Version',
               'Obsoleted-By', 'Setup-Requires-Dist', 'Extension',
               'Provides-Extra')

_426_MARKERS = ('Private-Version', 'Provides-Extra', 'Obsoleted-By',
                'Setup-Requires-Dist', 'Extension')

# See issue #106: Sometimes 'Requires' and 'Provides' occur wrongly in
# the metadata. Include them in the tuple literal below to allow them
# (for now).
# Ditto for Obsoletes - see issue #140.
_566_FIELDS = _426_FIELDS + ('Description-Content-Type',
                             'Requires', 'Provides', 'Obsoletes')

_566_MARKERS = ('Description-Content-Type',)

_643_MARKERS = ('Dynamic', 'License-File')

_643_FIELDS = _566_FIELDS + _643_MARKERS

_ALL_FIELDS = set()
_ALL_FIELDS.update(_241_FIELDS)
_ALL_FIELDS.update(_314_FIELDS)
_ALL_FIELDS.update(_345_FIELDS)
_ALL_FIELDS.update(_426_FIELDS)
_ALL_FIELDS.update(_566_FIELDS)
_ALL_FIELDS.update(_643_FIELDS)

EXTRA_RE = re.compile(r'''extra\s*==\s*("([^"]+)"|'([^']+)')''')


def _version2fieldlist(version):
    if version == '1.0':
        return _241_FIELDS
    elif version == '1.1':
        return _314_FIELDS
    elif version == '1.2':
        return _345_FIELDS
    elif version in ('1.3', '2.1'):
        # avoid adding field names if already there
        return _345_FIELDS + tuple(f for f in _566_FIELDS if f not in _345_FIELDS)
    elif version == '2.0':
        raise ValueError('Metadata 2.0 is withdrawn and not supported')
        # return _426_FIELDS
    elif version == '2.2':
        return _643_FIELDS
    raise MetadataUnrecognizedVersionError(version)


def _best_version(fields):
    """Detect the best version depending on the fields used."""
    def _has_marker(keys, markers):
        for marker in markers:
            if marker in keys:
                return True
        return False

    keys = []
    for key, value in fields.items():
        if value in ([], 'UNKNOWN', None):
            continue
        keys.append(key)

    possible_versions = ['1.0', '1.1', '1.2', '1.3', '2.1', '2.2']  # 2.0 removed

    # first let's try to see if a field is not part of one of the version
    for key in keys:
        if key not in _241_FIELDS and '1.0' in possible_versions:
            possible_versions.remove('1.0')
            logger.debug('Removed 1.0 due to %s', key)
        if key not in _314_FIELDS and '1.1' in possible_versions:
            possible_versions.remove('1.1')
            logger.debug('Removed 1.1 due to %s', key)
        if key not in _345_FIELDS and '1.2' in possible_versions:
            possible_versions.remove('1.2')
            logger.debug('Removed 1.2 due to %s', key)
        if key not in _566_FIELDS and '1.3' in possible_versions:
            possible_versions.remove('1.3')
            logger.debug('Removed 1.3 due to %s', key)
        if key not in _566_FIELDS and '2.1' in possible_versions:
            if key != 'Description':  # In 2.1, description allowed after headers
                possible_versions.remove('2.1')
                logger.debug('Removed 2.1 due to %s', key)
        if key not in _643_FIELDS and '2.2' in possible_versions:
            possible_versions.remove('2.2')
            logger.debug('Removed 2.2 due to %s', key)
        # if key not in _426_FIELDS and '2.0' in possible_versions:
            # possible_versions.remove('2.0')
            # logger.debug('Removed 2.0 due to %s', key)

    # possible_version contains qualified versions
    if len(possible_versions) == 1:
        return possible_versions[0]   # found !
    elif len(possible_versions) == 0:
        logger.debug('Out of options - unknown metadata set: %s', fields)
        raise MetadataConflictError('Unknown metadata set')

    # let's see if one unique marker is found
    is_1_1 = '1.1' in possible_versions and _has_marker(keys, _314_MARKERS)
    is_1_2 = '1.2' in possible_versions and _has_marker(keys, _345_MARKERS)
    is_2_1 = '2.1' in possible_versions and _has_marker(keys, _566_MARKERS)
    # is_2_0 = '2.0' in possible_versions and _has_marker(keys, _426_MARKERS)
    is_2_2 = '2.2' in possible_versions and _has_marker(keys, _643_MARKERS)
    if int(is_1_1) + int(is_1_2) + int(is_2_1) + int(is_2_2) > 1:
        raise MetadataConflictError('You used incompatible 1.1/1.2/2.1/2.2 fields')

    # we have the choice, 1.0, or 1.2, 2.1 or 2.2
    #   - 1.0 has a broken Summary field but works with all tools
    #   - 1.1 is to avoid
    #   - 1.2 fixes Summary but has little adoption
    #   - 2.1 adds more features
    #   - 2.2 is the latest
    if not is_1_1 and not is_1_2 and not is_2_1 and not is_2_2:
        # we couldn't find any specific marker
        if PKG_INFO_PREFERRED_VERSION in possible_versions:
            return PKG_INFO_PREFERRED_VERSION
    if is_1_1:
        return '1.1'
    if is_1_2:
        return '1.2'
    if is_2_1:
        return '2.1'
    # if is_2_2:
        # return '2.2'

    return '2.2'

# This follows the rules about transforming keys as described in
# https://www.python.org/dev/peps/pep-0566/#id17
_ATTR2FIELD = {
    name.lower().replace("-", "_"): name for name in _ALL_FIELDS
}
_FIELD2ATTR = {field: attr for attr, field in _ATTR2FIELD.items()}

_PREDICATE_FIELDS = ('Requires-Dist', 'Obsoletes-Dist', 'Provides-Dist')
_VERSIONS_FIELDS = ('Requires-Python',)
_VERSION_FIELDS = ('Version',)
_LISTFIELDS = ('Platform', 'Classifier', 'Obsoletes',
               'Requires', 'Provides', 'Obsoletes-Dist',
               'Provides-Dist', 'Requires-Dist', 'Requires-External',
               'Project-URL', 'Supported-Platform', 'Setup-Requires-Dist',
               'Provides-Extra', 'Extension', 'License-File')
_LISTTUPLEFIELDS = ('Project-URL',)

_ELEMENTSFIELD = ('Keywords',)

_UNICODEFIELDS = ('Author', 'Maintainer', 'Summary', 'Description')

_MISSING = object()

_FILESAFE = re.compile('[^A-Za-z0-9.]+')


def _get_name_and_version(name, version, for_filename=False):
    """Return the distribution name with version.

    If for_filename is true, return a filename-escaped form."""
    if for_filename:
        # For both name and version any runs of non-alphanumeric or '.'
        # characters are replaced with a single '-'.  Additionally any
        # spaces in the version string become '.'
        name = _FILESAFE.sub('-', name)
        version = _FILESAFE.sub('-', version.replace(' ', '.'))
    return '%s-%s' % (name, version)


class LegacyMetadata(object):
    """The legacy metadata of a release.

    Supports versions 1.0, 1.1, 1.2, 2.0 and 1.3/2.1 (auto-detected). You can
    instantiate the class with one of these arguments (or none):
    - *path*, the path to a metadata file
    - *fileobj* give a file-like object with metadata as content
    - *mapping* is a dict-like object
    - *scheme* is a version scheme name
    """
    # TODO document the mapping API and UNKNOWN default key

    def __init__(self, path=None, fileobj=None, mapping=None,
                 scheme='default'):
        if [path, fileobj, mapping].count(None) < 2:
            raise TypeError('path, fileobj and mapping are exclusive')
        self._fields = {}
        self.requires_files = []
        self._dependencies = None
        self.scheme = scheme
        if path is not None:
            self.read(path)
        elif fileobj is not None:
            self.read_file(fileobj)
        elif mapping is not None:
            self.update(mapping)
            self.set_metadata_version()

    def set_metadata_version(self):
        self._fields['Metadata-Version'] = _best_version(self._fields)

    def _write_field(self, fileobj, name, value):
        fileobj.write('%s: %s\n' % (name, value))

    def __getitem__(self, name):
        return self.get(name)

    def __setitem__(self, name, value):
        return self.set(name, value)

    def __delitem__(self, name):
        field_name = self._convert_name(name)
        try:
            del self._fields[field_name]
        except KeyError:
            raise KeyError(name)

    def __contains__(self, name):
        return (name in self._fields or
                self._convert_name(name) in self._fields)

    def _convert_name(self, name):
        if name in _ALL_FIELDS:
            return name
        name = name.replace('-', '_').lower()
        return _ATTR2FIELD.get(name, name)

    def _default_value(self, name):
        if name in _LISTFIELDS or name in _ELEMENTSFIELD:
            return []
        return 'UNKNOWN'

    def _remove_line_prefix(self, value):
        if self.metadata_version in ('1.0', '1.1'):
            return _LINE_PREFIX_PRE_1_2.sub('\n', value)
        else:
            return _LINE_PREFIX_1_2.sub('\n', value)

    def __getattr__(self, name):
        if name in _ATTR2FIELD:
            return self[name]
        raise AttributeError(name)

    #
    # Public API
    #

#    dependencies = property(_get_dependencies, _set_dependencies)

    def get_fullname(self, filesafe=False):
        """Return the distribution name with version.

        If filesafe is true, return a filename-escaped form."""
        return _get_name_and_version(self['Name'], self['Version'], filesafe)

    def is_field(self, name):
        """return True if name is a valid metadata key"""
        name = self._convert_name(name)
        return name in _ALL_FIELDS

    def is_multi_field(self, name):
        name = self._convert_name(name)
        return name in _LISTFIELDS

    def read(self, filepath):
        """Read the metadata values from a file path."""
        fp = codecs.open(filepath, 'r', encoding='utf-8')
        try:
            self.read_file(fp)
        finally:
            fp.close()

    def read_file(self, fileob):
        """Read the metadata values from a file object."""
        msg = message_from_file(fileob)
        self._fields['Metadata-Version'] = msg['metadata-version']

        # When reading, get all the fields we can
        for field in _ALL_FIELDS:
            if field not in msg:
                continue
            if field in _LISTFIELDS:
                # we can have multiple lines
                values = msg.get_all(field)
                if field in _LISTTUPLEFIELDS and values is not None:
                    values = [tuple(value.split(',')) for value in values]
                self.set(field, values)
            else:
                # single line
                value = msg[field]
                if value is not None and value != 'UNKNOWN':
                    self.set(field, value)

        # PEP 566 specifies that the body be used for the description, if
        # available
        body = msg.get_payload()
        self["Description"] = body if body else self["Description"]
        # logger.debug('Attempting to set metadata for %s', self)
        # self.set_metadata_version()

    def write(self, filepath, skip_unknown=False):
        """Write the metadata fields to filepath."""
        fp = codecs.open(filepath, 'w', encoding='utf-8')
        try:
            self.write_file(fp, skip_unknown)
        finally:
            fp.close()

    def write_file(self, fileobject, skip_unknown=False):
        """Write the PKG-INFO format data to a file object."""
        self.set_metadata_version()

        for field in _version2fieldlist(self['Metadata-Version']):
            values = self.get(field)
            if skip_unknown and values in ('UNKNOWN', [], ['UNKNOWN']):
                continue
            if field in _ELEMENTSFIELD:
                self._write_field(fileobject, field, ','.join(values))
                continue
            if field not in _LISTFIELDS:
                if field == 'Description':
                    if self.metadata_version in ('1.0', '1.1'):
                        values = values.replace('\n', '\n        ')
                    else:
                        values = values.replace('\n', '\n       |')
                values = [values]

            if field in _LISTTUPLEFIELDS:
                values = [','.join(value) for value in values]

            for value in values:
                self._write_field(fileobject, field, value)

    def update(self, other=None, **kwargs):
        """Set metadata values from the given iterable `other` and kwargs.

        Behavior is like `dict.update`: If `other` has a ``keys`` method,
        they are looped over and ``self[key]`` is assigned ``other[key]``.
        Else, ``other`` is an iterable of ``(key, value)`` iterables.

        Keys that don't match a metadata field or that have an empty value are
        dropped.
        """
        def _set(key, value):
            if key in _ATTR2FIELD and value:
                self.set(self._convert_name(key), value)

        if not other:
            # other is None or empty container
            pass
        elif hasattr(other, 'keys'):
            for k in other.keys():
                _set(k, other[k])
        else:
            for k, v in other:
                _set(k, v)

        if kwargs:
            for k, v in kwargs.items():
                _set(k, v)

    def set(self, name, value):
        """Control then set a metadata field."""
        name = self._convert_name(name)

        if ((name in _ELEMENTSFIELD or name == 'Platform') and
            not isinstance(value, (list, tuple))):
            if isinstance(value, string_types):
                value = [v.strip() for v in value.split(',')]
            else:
                value = []
        elif (name in _LISTFIELDS and
              not isinstance(value, (list, tuple))):
            if isinstance(value, string_types):
                value = [value]
            else:
                value = []

        if logger.isEnabledFor(logging.WARNING):
            project_name = self['Name']

            scheme = get_scheme(self.scheme)
            if name in _PREDICATE_FIELDS and value is not None:
                for v in value:
                    # check that the values are valid
                    if not scheme.is_valid_matcher(v.split(';')[0]):
                        logger.warning(
                            "'%s': '%s' is not valid (field '%s')",
                            project_name, v, name)
            # FIXME this rejects UNKNOWN, is that right?
            elif name in _VERSIONS_FIELDS and value is not None:
                if not scheme.is_valid_constraint_list(value):
                    logger.warning("'%s': '%s' is not a valid version (field '%s')",
                                   project_name, value, name)
            elif name in _VERSION_FIELDS and value is not None:
                if not scheme.is_valid_version(value):
                    logger.warning("'%s': '%s' is not a valid version (field '%s')",
                                   project_name, value, name)

        if name in _UNICODEFIELDS:
            if name == 'Description':
                value = self._remove_line_prefix(value)

        self._fields[name] = value

    def get(self, name, default=_MISSING):
        """Get a metadata field."""
        name = self._convert_name(name)
        if name not in self._fields:
            if default is _MISSING:
                default = self._default_value(name)
            return default
        if name in _UNICODEFIELDS:
            value = self._fields[name]
            return value
        elif name in _LISTFIELDS:
            value = self._fields[name]
            if value is None:
                return []
            res = []
            for val in value:
                if name not in _LISTTUPLEFIELDS:
                    res.append(val)
                else:
                    # That's for Project-URL
                    res.append((val[0], val[1]))
            return res

        elif name in _ELEMENTSFIELD:
            value = self._fields[name]
            if isinstance(value, string_types):
                return value.split(',')
        return self._fields[name]

    def check(self, strict=False):
        """Check if the metadata is compliant. If strict is True then raise if
        no Name or Version are provided"""
        self.set_metadata_version()

        # XXX should check the versions (if the file was loaded)
        missing, warnings = [], []

        for attr in ('Name', 'Version'):  # required by PEP 345
            if attr not in self:
                missing.append(attr)

        if strict and missing != []:
            msg = 'missing required metadata: %s' % ', '.join(missing)
            raise MetadataMissingError(msg)

        for attr in ('Home-page', 'Author'):
            if attr not in self:
                missing.append(attr)

        # checking metadata 1.2 (XXX needs to check 1.1, 1.0)
        if self['Metadata-Version'] != '1.2':
            return missing, warnings

        scheme = get_scheme(self.scheme)

        def are_valid_constraints(value):
            for v in value:
                if not scheme.is_valid_matcher(v.split(';')[0]):
                    return False
            return True

        for fields, controller in ((_PREDICATE_FIELDS, are_valid_constraints),
                                   (_VERSIONS_FIELDS,
                                    scheme.is_valid_constraint_list),
                                   (_VERSION_FIELDS,
                                    scheme.is_valid_version)):
            for field in fields:
                value = self.get(field, None)
                if value is not None and not controller(value):
                    warnings.append("Wrong value for '%s': %s" % (field, value))

        return missing, warnings

    def todict(self, skip_missing=False):
        """Return fields as a dict.

        Field names will be converted to use the underscore-lowercase style
        instead of hyphen-mixed case (i.e. home_page instead of Home-page).
        This is as per https://www.python.org/dev/peps/pep-0566/#id17.
        """
        self.set_metadata_version()

        fields = _version2fieldlist(self['Metadata-Version'])

        data = {}

        for field_name in fields:
            if not skip_missing or field_name in self._fields:
                key = _FIELD2ATTR[field_name]
                if key != 'project_url':
                    data[key] = self[field_name]
                else:
                    data[key] = [','.join(u) for u in self[field_name]]

        return data

    def add_requirements(self, requirements):
        if self['Metadata-Version'] == '1.1':
            # we can't have 1.1 metadata *and* Setuptools requires
            for field in ('Obsoletes', 'Requires', 'Provides'):
                if field in self:
                    del self[field]
        self['Requires-Dist'] += requirements

    # Mapping API
    # TODO could add iter* variants

    def keys(self):
        return list(_version2fieldlist(self['Metadata-Version']))

    def __iter__(self):
        for key in self.keys():
            yield key

    def values(self):
        return [self[key] for key in self.keys()]

    def items(self):
        return [(key, self[key]) for key in self.keys()]

    def __repr__(self):
        return '<%s %s %s>' % (self.__class__.__name__, self.name,
                               self.version)


METADATA_FILENAME = 'pydist.json'
WHEEL_METADATA_FILENAME = 'metadata.json'
LEGACY_METADATA_FILENAME = 'METADATA'


class Metadata(object):
    """
    The metadata of a release. This implementation uses 2.1
    metadata where possible. If not possible, it wraps a LegacyMetadata
    instance which handles the key-value metadata format.
    """

    METADATA_VERSION_MATCHER = re.compile(r'^\d+(\.\d+)*$')

    NAME_MATCHER = re.compile('^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$', re.I)

    FIELDNAME_MATCHER = re.compile('^[A-Z]([0-9A-Z-]*[0-9A-Z])?$', re.I)

    VERSION_MATCHER = PEP440_VERSION_RE

    SUMMARY_MATCHER = re.compile('.{1,2047}')

    METADATA_VERSION = '2.0'

    GENERATOR = 'distlib (%s)' % __version__

    MANDATORY_KEYS = {
        'name': (),
        'version': (),
        'summary': ('legacy',),
    }

    INDEX_KEYS = ('name version license summary description author '
                  'author_email keywords platform home_page classifiers '
                  'download_url')

    DEPENDENCY_KEYS = ('extras run_requires test_requires build_requires '
                       'dev_requires provides meta_requires obsoleted_by '
                       'supports_environments')

    SYNTAX_VALIDATORS = {
        'metadata_version': (METADATA_VERSION_MATCHER, ()),
        'name': (NAME_MATCHER, ('legacy',)),
        'version': (VERSION_MATCHER, ('legacy',)),
        'summary': (SUMMARY_MATCHER, ('legacy',)),
        'dynamic': (FIELDNAME_MATCHER, ('legacy',)),
    }

    __slots__ = ('_legacy', '_data', 'scheme')

    def __init__(self, path=None, fileobj=None, mapping=None,
                 scheme='default'):
        if [path, fileobj, mapping].count(None) < 2:
            raise TypeError('path, fileobj and mapping are exclusive')
        self._legacy = None
        self._data = None
        self.scheme = scheme
        #import pdb; pdb.set_trace()
        if mapping is not None:
            try:
                self._validate_mapping(mapping, scheme)
                self._data = mapping
            except MetadataUnrecognizedVersionError:
                self._legacy = LegacyMetadata(mapping=mapping, scheme=scheme)
                self.validate()
        else:
            data = None
            if path:
                with open(path, 'rb') as f:
                    data = f.read()
            elif fileobj:
                data = fileobj.read()
            if data is None:
                # Initialised with no args - to be added
                self._data = {
                    'metadata_version': self.METADATA_VERSION,
                    'generator': self.GENERATOR,
                }
            else:
                if not isinstance(data, text_type):
                    data = data.decode('utf-8')
                try:
                    self._data = json.loads(data)
                    self._validate_mapping(self._data, scheme)
                except ValueError:
                    # Note: MetadataUnrecognizedVersionError does not
                    # inherit from ValueError (it's a DistlibException,
                    # which should not inherit from ValueError).
                    # The ValueError comes from the json.load - if that
                    # succeeds and we get a validation error, we want
                    # that to propagate
                    self._legacy = LegacyMetadata(fileobj=StringIO(data),
                                                  scheme=scheme)
                    self.validate()

    common_keys = set(('name', 'version', 'license', 'keywords', 'summary'))

    none_list = (None, list)
    none_dict = (None, dict)

    mapped_keys = {
        'run_requires': ('Requires-Dist', list),
        'build_requires': ('Setup-Requires-Dist', list),
        'dev_requires': none_list,
        'test_requires': none_list,
        'meta_requires': none_list,
        'extras': ('Provides-Extra', list),
        'modules': none_list,
        'namespaces': none_list,
        'exports': none_dict,
        'commands': none_dict,
        'classifiers': ('Classifier', list),
        'source_url': ('Download-URL', None),
        'metadata_version': ('Metadata-Version', None),
    }

    del none_list, none_dict

    def __getattribute__(self, key):
        common = object.__getattribute__(self, 'common_keys')
        mapped = object.__getattribute__(self, 'mapped_keys')
        if key in mapped:
            lk, maker = mapped[key]
            if self._legacy:
                if lk is None:
                    result = None if maker is None else maker()
                else:
                    result = self._legacy.get(lk)
            else:
                value = None if maker is None else maker()
                if key not in ('commands', 'exports', 'modules', 'namespaces',
                               'classifiers'):
                    result = self._data.get(key, value)
                else:
                    # special cases for PEP 459
                    sentinel = object()
                    result = sentinel
                    d = self._data.get('extensions')
                    if d:
                        if key == 'commands':
                            result = d.get('python.commands', value)
                        elif key == 'classifiers':
                            d = d.get('python.details')
                            if d:
                                result = d.get(key, value)
                        else:
                            d = d.get('python.exports')
                            if not d:
                                d = self._data.get('python.exports')
                            if d:
                                result = d.get(key, value)
                    if result is sentinel:
                        result = value
        elif key not in common:
            result = object.__getattribute__(self, key)
        elif self._legacy:
            result = self._legacy.get(key)
        else:
            result = self._data.get(key)
        return result

    def _validate_value(self, key, value, scheme=None):
        if key in self.SYNTAX_VALIDATORS:
            pattern, exclusions = self.SYNTAX_VALIDATORS[key]
            if (scheme or self.scheme) not in exclusions:
                m = pattern.match(value)
                if not m:
                    raise MetadataInvalidError("'%s' is an invalid value for "
                                               "the '%s' property" % (value,
                                                                    key))

    def __setattr__(self, key, value):
        self._validate_value(key, value)
        common = object.__getattribute__(self, 'common_keys')
        mapped = object.__getattribute__(self, 'mapped_keys')
        if key in mapped:
            lk, _ = mapped[key]
            if self._legacy:
                if lk is None:
                    raise NotImplementedError
                self._legacy[lk] = value
            elif key not in ('commands', 'exports', 'modules', 'namespaces',
                             'classifiers'):
                self._data[key] = value
            else:
                # special cases for PEP 459
                d = self._data.setdefault('extensions', {})
                if key == 'commands':
                    d['python.commands'] = value
                elif key == 'classifiers':
                    d = d.setdefault('python.details', {})
                    d[key] = value
                else:
                    d = d.setdefault('python.exports', {})
                    d[key] = value
        elif key not in common:
            object.__setattr__(self, key, value)
        else:
            if key == 'keywords':
                if isinstance(value, string_types):
                    value = value.strip()
                    if value:
                        value = value.split()
                    else:
                        value = []
            if self._legacy:
                self._legacy[key] = value
            else:
                self._data[key] = value

    @property
    def name_and_version(self):
        return _get_name_and_version(self.name, self.version, True)

    @property
    def provides(self):
        if self._legacy:
            result = self._legacy['Provides-Dist']
        else:
            result = self._data.setdefault('provides', [])
        s = '%s (%s)' % (self.name, self.version)
        if s not in result:
            result.append(s)
        return result

    @provides.setter
    def provides(self, value):
        if self._legacy:
            self._legacy['Provides-Dist'] = value
        else:
            self._data['provides'] = value

    def get_requirements(self, reqts, extras=None, env=None):
        """
        Base method to get dependencies, given a set of extras
        to satisfy and an optional environment context.
        :param reqts: A list of sometimes-wanted dependencies,
                      perhaps dependent on extras and environment.
        :param extras: A list of optional components being requested.
        :param env: An optional environment for marker evaluation.
        """
        if self._legacy:
            result = reqts
        else:
            result = []
            extras = get_extras(extras or [], self.extras)
            for d in reqts:
                if 'extra' not in d and 'environment' not in d:
                    # unconditional
                    include = True
                else:
                    if 'extra' not in d:
                        # Not extra-dependent - only environment-dependent
                        include = True
                    else:
                        include = d.get('extra') in extras
                    if include:
                        # Not excluded because of extras, check environment
                        marker = d.get('environment')
                        if marker:
                            include = interpret(marker, env)
                if include:
                    result.extend(d['requires'])
            for key in ('build', 'dev', 'test'):
                e = ':%s:' % key
                if e in extras:
                    extras.remove(e)
                    # A recursive call, but it should terminate since 'test'
                    # has been removed from the extras
                    reqts = self._data.get('%s_requires' % key, [])
                    result.extend(self.get_requirements(reqts, extras=extras,
                                                        env=env))
        return result

    @property
    def dictionary(self):
        if self._legacy:
            return self._from_legacy()
        return self._data

    @property
    def dependencies(self):
        if self._legacy:
            raise NotImplementedError
        else:
            return extract_by_key(self._data, self.DEPENDENCY_KEYS)

    @dependencies.setter
    def dependencies(self, value):
        if self._legacy:
            raise NotImplementedError
        else:
            self._data.update(value)

    def _validate_mapping(self, mapping, scheme):
        if mapping.get('metadata_version') != self.METADATA_VERSION:
            raise MetadataUnrecognizedVersionError()
        missing = []
        for key, exclusions in self.MANDATORY_KEYS.items():
            if key not in mapping:
                if scheme not in exclusions:
                    missing.append(key)
        if missing:
            msg = 'Missing metadata items: %s' % ', '.join(missing)
            raise MetadataMissingError(msg)
        for k, v in mapping.items():
            self._validate_value(k, v, scheme)

    def validate(self):
        if self._legacy:
            missing, warnings = self._legacy.check(True)
            if missing or warnings:
                logger.warning('Metadata: missing: %s, warnings: %s',
                               missing, warnings)
        else:
            self._validate_mapping(self._data, self.scheme)

    def todict(self):
        if self._legacy:
            return self._legacy.todict(True)
        else:
            result = extract_by_key(self._data, self.INDEX_KEYS)
            return result

    def _from_legacy(self):
        assert self._legacy and not self._data
        result = {
            'metadata_version': self.METADATA_VERSION,
            'generator': self.GENERATOR,
        }
        lmd = self._legacy.todict(True)     # skip missing ones
        for k in ('name', 'version', 'license', 'summary', 'description',
                  'classifier'):
            if k in lmd:
                if k == 'classifier':
                    nk = 'classifiers'
                else:
                    nk = k
                result[nk] = lmd[k]
        kw = lmd.get('Keywords', [])
        if kw == ['']:
            kw = []
        result['keywords'] = kw
        keys = (('requires_dist', 'run_requires'),
                ('setup_requires_dist', 'build_requires'))
        for ok, nk in keys:
            if ok in lmd and lmd[ok]:
                result[nk] = [{'requires': lmd[ok]}]
        result['provides'] = self.provides
        author = {}
        maintainer = {}
        return result

    LEGACY_MAPPING = {
        'name': 'Name',
        'version': 'Version',
        ('extensions', 'python.details', 'license'): 'License',
        'summary': 'Summary',
        'description': 'Description',
        ('extensions', 'python.project', 'project_urls', 'Home'): 'Home-page',
        ('extensions', 'python.project', 'contacts', 0, 'name'): 'Author',
        ('extensions', 'python.project', 'contacts', 0, 'email'): 'Author-email',
        'source_url': 'Download-URL',
        ('extensions', 'python.details', 'classifiers'): 'Classifier',
    }

    def _to_legacy(self):
        def process_entries(entries):
            reqts = set()
            for e in entries:
                extra = e.get('extra')
                env = e.get('environment')
                rlist = e['requires']
                for r in rlist:
                    if not env and not extra:
                        reqts.add(r)
                    else:
                        marker = ''
                        if extra:
                            marker = 'extra == "%s"' % extra
                        if env:
                            if marker:
                                marker = '(%s) and %s' % (env, marker)
                            else:
                                marker = env
                        reqts.add(';'.join((r, marker)))
            return reqts

        assert self._data and not self._legacy
        result = LegacyMetadata()
        nmd = self._data
        # import pdb; pdb.set_trace()
        for nk, ok in self.LEGACY_MAPPING.items():
            if not isinstance(nk, tuple):
                if nk in nmd:
                    result[ok] = nmd[nk]
            else:
                d = nmd
                found = True
                for k in nk:
                    try:
                        d = d[k]
                    except (KeyError, IndexError):
                        found = False
                        break
                if found:
                    result[ok] = d
        r1 = process_entries(self.run_requires + self.meta_requires)
        r2 = process_entries(self.build_requires + self.dev_requires)
        if self.extras:
            result['Provides-Extra'] = sorted(self.extras)
        result['Requires-Dist'] = sorted(r1)
        result['Setup-Requires-Dist'] = sorted(r2)
        # TODO: any other fields wanted
        return result

    def write(self, path=None, fileobj=None, legacy=False, skip_unknown=True):
        if [path, fileobj].count(None) != 1:
            raise ValueError('Exactly one of path and fileobj is needed')
        self.validate()
        if legacy:
            if self._legacy:
                legacy_md = self._legacy
            else:
                legacy_md = self._to_legacy()
            if path:
                legacy_md.write(path, skip_unknown=skip_unknown)
            else:
                legacy_md.write_file(fileobj, skip_unknown=skip_unknown)
        else:
            if self._legacy:
                d = self._from_legacy()
            else:
                d = self._data
            if fileobj:
                json.dump(d, fileobj, ensure_ascii=True, indent=2,
                          sort_keys=True)
            else:
                with codecs.open(path, 'w', 'utf-8') as f:
                    json.dump(d, f, ensure_ascii=True, indent=2,
                              sort_keys=True)

    def add_requirements(self, requirements):
        if self._legacy:
            self._legacy.add_requirements(requirements)
        else:
            run_requires = self._data.setdefault('run_requires', [])
            always = None
            for entry in run_requires:
                if 'environment' not in entry and 'extra' not in entry:
                    always = entry
                    break
            if always is None:
                always = { 'requires': requirements }
                run_requires.insert(0, always)
            else:
                rset = set(always['requires']) | set(requirements)
                always['requires'] = sorted(rset)

    def __repr__(self):
        name = self.name or '(no name)'
        version = self.version or 'no version'
        return '<%s %s %s (%s)>' % (self.__class__.__name__,
                                    self.metadata_version, name, version)
python3.12/site-packages/pip/_vendor/distlib/markers.py000064400000011702151732701630017013 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2017 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Parser for the environment markers micro-language defined in PEP 508.
"""

# Note: In PEP 345, the micro-language was Python compatible, so the ast
# module could be used to parse it. However, PEP 508 introduced operators such
# as ~= and === which aren't in Python, necessitating a different approach.

import os
import re
import sys
import platform

from .compat import string_types
from .util import in_venv, parse_marker
from .version import NormalizedVersion as NV

__all__ = ['interpret']

_VERSION_PATTERN = re.compile(r'((\d+(\.\d+)*\w*)|\'(\d+(\.\d+)*\w*)\'|\"(\d+(\.\d+)*\w*)\")')

def _is_literal(o):
    if not isinstance(o, string_types) or not o:
        return False
    return o[0] in '\'"'

def _get_versions(s):
    result = []
    for m in _VERSION_PATTERN.finditer(s):
        result.append(NV(m.groups()[0]))
    return set(result)

class Evaluator(object):
    """
    This class is used to evaluate marker expessions.
    """

    operations = {
        '==': lambda x, y: x == y,
        '===': lambda x, y: x == y,
        '~=': lambda x, y: x == y or x > y,
        '!=': lambda x, y: x != y,
        '<':  lambda x, y: x < y,
        '<=':  lambda x, y: x == y or x < y,
        '>':  lambda x, y: x > y,
        '>=':  lambda x, y: x == y or x > y,
        'and': lambda x, y: x and y,
        'or': lambda x, y: x or y,
        'in': lambda x, y: x in y,
        'not in': lambda x, y: x not in y,
    }

    def evaluate(self, expr, context):
        """
        Evaluate a marker expression returned by the :func:`parse_requirement`
        function in the specified context.
        """
        if isinstance(expr, string_types):
            if expr[0] in '\'"':
                result = expr[1:-1]
            else:
                if expr not in context:
                    raise SyntaxError('unknown variable: %s' % expr)
                result = context[expr]
        else:
            assert isinstance(expr, dict)
            op = expr['op']
            if op not in self.operations:
                raise NotImplementedError('op not implemented: %s' % op)
            elhs = expr['lhs']
            erhs = expr['rhs']
            if _is_literal(expr['lhs']) and _is_literal(expr['rhs']):
                raise SyntaxError('invalid comparison: %s %s %s' % (elhs, op, erhs))

            lhs = self.evaluate(elhs, context)
            rhs = self.evaluate(erhs, context)
            if ((elhs == 'python_version' or erhs == 'python_version') and
                op in ('<', '<=', '>', '>=', '===', '==', '!=', '~=')):
                lhs = NV(lhs)
                rhs = NV(rhs)
            elif elhs == 'python_version' and op in ('in', 'not in'):
                lhs = NV(lhs)
                rhs = _get_versions(rhs)
            result = self.operations[op](lhs, rhs)
        return result

_DIGITS = re.compile(r'\d+\.\d+')

def default_context():
    def format_full_version(info):
        version = '%s.%s.%s' % (info.major, info.minor, info.micro)
        kind = info.releaselevel
        if kind != 'final':
            version += kind[0] + str(info.serial)
        return version

    if hasattr(sys, 'implementation'):
        implementation_version = format_full_version(sys.implementation.version)
        implementation_name = sys.implementation.name
    else:
        implementation_version = '0'
        implementation_name = ''

    ppv = platform.python_version()
    m = _DIGITS.match(ppv)
    pv = m.group(0)
    result = {
        'implementation_name': implementation_name,
        'implementation_version': implementation_version,
        'os_name': os.name,
        'platform_machine': platform.machine(),
        'platform_python_implementation': platform.python_implementation(),
        'platform_release': platform.release(),
        'platform_system': platform.system(),
        'platform_version': platform.version(),
        'platform_in_venv': str(in_venv()),
        'python_full_version': ppv,
        'python_version': pv,
        'sys_platform': sys.platform,
    }
    return result

DEFAULT_CONTEXT = default_context()
del default_context

evaluator = Evaluator()

def interpret(marker, execution_context=None):
    """
    Interpret a marker and return a result depending on environment.

    :param marker: The marker to interpret.
    :type marker: str
    :param execution_context: The context used for name lookup.
    :type execution_context: mapping
    """
    try:
        expr, rest = parse_marker(marker)
    except Exception as e:
        raise SyntaxError('Unable to interpret marker syntax: %s: %s' % (marker, e))
    if rest and rest[0] != '#':
        raise SyntaxError('unexpected trailing data in marker: %s: %s' % (marker, rest))
    context = dict(DEFAULT_CONTEXT)
    if execution_context:
        context.update(execution_context)
    return evaluator.evaluate(expr, context)
python3.12/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-312.pyc000064400000002441151732701630023447 0ustar00�

R`iE����ddlZdZGd�de�Z	ddlmZeje�Z	e	je��y#e$rGd�dej�ZY�EwxYw)�Nz0.3.6c��eZdZy)�DistlibExceptionN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/__init__.pyrrs��r	r)�NullHandlerc��eZdZd�Zd�Zd�Zy)rc��y�Nr��self�records  r
�handlezNullHandler.handles��$r	c��yrrrs  r
�emitzNullHandler.emits��r	c��d|_yr)�lock)rs r
�
createLockzNullHandler.createLocks��$�d�ir	N)rrrrrrrr	r
rrs��&�$�.r	r)�logging�__version__�	Exceptionrr�ImportError�Handler�	getLoggerr�logger�
addHandlerrr	r
�<module>r sh�����	�y�	�/�#�
��	�	�8�	$�����+�-� ���/�/�g�o�o�/�/�s�A�A�Apython3.12/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-312.pyc000064400000130717151732701630023203 0ustar00�

R`i+�����ddlmZddlZddlZddlZ	ddlZejddkr�ddlmZe	fZ
eZddl
mZddlZddlZddlmZmZmZmZmZddlmZmZmZmZmZm Z m!Z!d�Zddl"Z"dd	l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+erdd
l"m,Z,ddl-Z-ddl.Z.ddl/Z0ddl1m1Z1ddl2Z2e3Z3ddl4m5Z6dd
l4m7Z8n�ddl9mZe:fZ
e:Zddl9m;ZddlZddlZddl<Z<ddl=mZmZmZmZmZmZmZm!Z!ddl>m$Z$mZm#Z#mZmZm'Z'm(Z(m)Z)m*Z*m+Z+erdd
l>m,Z,ddl?m&Z&m%Z%m Z ddl@mAZ-ddl>mBZ"ddlCmAZ.ddl0Z0ddlDm1Z1ddlEmFZ2eGZ3ddl4m8Z8e6Z6	ddlmHZHmIZI	ddl
mLZM	ddl<mOZOddlRmSZTeUeTd�reTZSnddlRmVZWGd �d!eW�ZVGd"�d#eT�ZS	dd$lXmYZYddl<Z<ddlZZZ	e[Z[	ej�Z_ej�Z`	dd.lemfZf	dd3lmmnZnejdd4d5kre1�j�Zpndd6lmmpZp	dd7lqmrZr	dd=lwmxZx	dd?lqmyZy	ddDl�m�Z�m�Z�y#e$rdZY���wxYw#e$rGd�deJ�ZIdPd�ZKd�ZHY��wxYw#e$rGd�deN�ZMY��wxYw#e$r!ej�ej�zdfd�ZOY��wxYw#e$rd%�ZYY��wxYw#e\$rdd&l]m^Z^d'�Z[Y��wxYw#ea$r)ej��xsd(Zcecd)k(rd*Zdnd+Zdd,�Z_d-�Z`Y��wxYw#e$r(dd/lgmhZhmiZiddlZej�d0�Zkd1�Zld2�ZfY��9wxYw#e$r
dd3lomnZnY��DwxYw#e$r,dd8lqmsZs	dd9ltmuZvn#e$rdQd:�ZvYnwxYwGd;�d<es�ZrY��GwxYw#e$rdRd>�ZxY��PwxYw#e$r?	dd@lzm{Z|n#e$r	dd@l}m{Z|YnwxYw	ddAl~mZm�Z�m�Z�n#e$rYnwxYwGdB�dCe��ZyY���wxYw#e$rTej�dEe�j�Z�dF�Z�GdG�dHe��Z�dRdI�Z�GdJ�dKe��Z�GdL�dMe��Z�GdN�dOeN�Z�YywxYw)S�)�absolute_importN�)�StringIO)�FileType)�urlparse�
urlunparse�urljoin�urlsplit�
urlunsplit)�urlretrieve�quote�unquote�url2pathname�pathname2url�ContentTooShortError�	splittypec�Z�t|t�r|jd�}t|�S)N�utf-8)�
isinstance�unicode�encode�_quote)�ss ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/compat.pyr
r
s$���a��!�����!�A��a�y��)	�Request�urlopen�URLError�	HTTPError�HTTPBasicAuthHandler�HTTPPasswordMgr�HTTPHandler�HTTPRedirectHandler�build_opener)�HTTPSHandler)�
HTMLParser)�ifilter)�ifilterfalse)�
TextIOWrapper)rrr	r
rr
rr)
rrrrrr r!r"r#r$)rrr)�filterfalse)�match_hostname�CertificateErrorc��eZdZy)r,N)�__name__�
__module__�__qualname__�rrr,r,_s��rr,c���g}|sy|jd�}|d|dd}}|jd�}||kDrtdt|�z��|s!|j	�|j	�k(S|dk(r|jd�n{|j
d	�s|j
d	�r%|jtj|��n4|jtj|�jd
d��|D]&}|jtj|���(tjdd
j|�zdztj�}	|	j|�S)zpMatching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        F�.r�N�*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)�split�countr,�repr�lower�append�
startswith�re�escape�replace�compile�join�
IGNORECASE�match)
�dn�hostname�
max_wildcards�pats�parts�leftmost�	remainder�	wildcards�frag�pats
          r�_dnsname_matchrMcsD��
��������
��#�A�h��a�b�	�)���N�N�3�'�	��}�$�
#�>��b��I�K�
K���8�8�:����!1�1�1�
�s�?�
�K�K�� �
�
 �
 ��
(�H�,?�,?��,G�

�K�K��	�	�(�+�,�
�K�K��	�	�(�+�3�3�E�7�C�D��D��K�K��	�	�$��(���j�j�����D�!1�1�E�9�2�=�=�I���y�y��"�"rc��|std��g}|jdd�}|D]*\}}|dk(s�t||�ry|j|��,|sG|jdd�D]2}|D]+\}}|dk(s�t||�ry|j|��-�4t	|�dkDr.td	|�d
dj
tt|������t	|�dk(rtd	|�d|d
����td��)a=Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
        rules are followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        ztempty or no certificate, match_hostname needs a SSL socket or SSL context with either CERT_OPTIONAL or CERT_REQUIRED�subjectAltNamer1�DNSN�subject�
commonNamer4z	hostname z doesn't match either of �, z doesn't match rz=no appropriate commonName or subjectAltName fields were found)	�
ValueError�getrMr:�lenr,r@�mapr8)�certrD�dnsnames�san�key�value�subs       rr+r+�s����>�?�
?����h�h�'��,���J�C���e�|�!�%��2������&�	�
��x�x�	�2�.��"%�J�C���l�*�)�%��:�"� ����.�
#&�/��x�=�1��"��T�Y�Y�s�4��':�;�$=�>�
>���]�a�
�"��X�a�[�$*�+�
+�#�$3�4�
4r)�SimpleNamespacec��eZdZdZd�Zy)�	ContainerzR
        A generic container for when multiple values need to be returned
        c�:�|jj|�y�N��__dict__�update)�self�kwargss  r�__init__zContainer.__init__�s���M�M� � ��(rN)r.r/r0�__doc__rhr1rrr`r`�s��	�	)rr`)�whichc�h��d�}tjj��r|�|�r�Sy|�.tjj	dtj
�}|sy|j
tj�}tjdk(r�tj|vr |jdtj�tjj	dd�j
tj�}t�fd�|D��r�g}n|D�cgc]}�|z��	}}n�g}t�}|D]m}tjj|�}	|	|vs�'|j|	�|D]1}
tjj!||
�}|||�s�-|ccS�oycc}w)	aKGiven a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.

        c��tjj|�xr8tj||�xr tjj	|�Srb)�os�path�exists�access�isdir)�fn�modes  r�
_access_checkzwhich.<locals>._access_check�sA���G�G�N�N�2�&�.�2�9�9�R��+>�.��G�G�M�M�"�-�-�
/rN�PATH�win32r�PATHEXT�c3�x�K�|]1}�j�j|j�����3y�wrb)r9�endswith)�.0�ext�cmds  �r�	<genexpr>zwhich.<locals>.<genexpr>�s)�����H���3�9�9�;�'�'��	�	��4��s�7:)rmrn�dirname�environrU�defpathr6�pathsep�sys�platform�curdir�insert�any�set�normcase�addr@)r}rsrnrt�pathext�filesr|�seen�dir�normdir�thefile�names`           rrjrj�sW���	/��7�7�?�?�3���S�$�'��
���<��:�:�>�>�&�"�*�*�5�D����z�z�"�*�*�%���<�<�7�"��9�9��$����A�r�y�y�)��j�j�n�n�Y��3�9�9�"�*�*�E�G�
�H��H�H����.5�6�g�s��s��g��6��E�E��u���C��g�g�&�&�s�+�G��d�?�����!�$�G��7�7�<�<��W�5�D�$�T�4�0�#�� %�	���7s� F/)�ZipFile�	__enter__)�
ZipExtFilec��eZdZd�Zd�Zd�Zy)r�c�N�|jj|j�yrbrc)rf�bases  rrhzZipExtFile.__init__s���M�M� � ����/rc��|Srbr1�rfs rr�zZipExtFile.__enter__����Krc�$�|j�yrb��close�rf�exc_infos  r�__exit__zZipExtFile.__exit__����J�J�LrN)r.r/r0rhr�r�r1rrr�r�s��	0�	�	rr�c��eZdZd�Zd�Zd�Zy)r�c��|Srbr1r�s rr�zZipFile.__enter__#r�rc�$�|j�yrbr�r�s  rr�zZipFile.__exit__&r�rc�J�tj|g|��i|��}t|�Srb)�BaseZipFile�openr�)rf�argsrgr�s    rr�zZipFile.open*s'���#�#�D�:�4�:�6�:�D��d�#�#rN)r.r/r0r�r�r�r1rrr�r�"s��	�	�	$rr�)�python_implementationc��dtjvrytjdk(rytjj	d�ryy)z6Return a string identifying the Python implementation.�PyPy�java�Jython�
IronPython�CPython)r��versionrmr�r;r1rrr�r�1s8���S�[�[� ��
�7�7�f����;�;�!�!�,�/��r)�Callablec�"�t|t�Srb)rr�)�objs r�callabler�Cs���#�x�(�(rr�mbcs�strict�surrogateescapec��t|t�r|St|t�r|jtt
�St
dt|�jz���Nzexpect bytes or str, not %s)	r�bytes�	text_typer�_fsencoding�	_fserrors�	TypeError�typer.��filenames r�fsencoder�WsN���h��&��O�
��)�
,��?�?�;�	�:�:��9� ��N�3�3�4�5�
5rc��t|t�r|St|t�r|jtt
�St
dt|�jz��r�)	rr�r��decoder�r�r�r�r.r�s r�fsdecoder�`sN���h�	�*��O�
��%�
(��?�?�;�	�:�:��9� ��N�3�3�4�5�
5r)�detect_encoding)�BOM_UTF8�lookupzcoding[:=]\s*([-\w.]+)c��|ddj�jdd�}|dk(s|jd�ry|dvs|jd�ry	|S)
z(Imitates get_normal_name in tokenizer.c.N��_�-rzutf-8-)zlatin-1�
iso-8859-1ziso-latin-1)zlatin-1-ziso-8859-1-ziso-latin-1-r�)r9r>r;)�orig_enc�encs  r�_get_normal_namer�qsX���s��m�!�!�#�+�+�C��5���'�>�S�^�^�H�5���:�:��>�>�E�F���rc�6����	�jj�d�d}d}�fd�}��fd�}|�}|jt�r	d�|dd}d}|s|gfS||�}|r||gfS|�}|s||gfS||�}|r|||gfS|||gfS#t$rd�Y�|wxYw)	a?
        The detect_encoding() function is used to detect the encoding that should
        be used to decode a Python source file.  It requires one argument, readline,
        in the same way as the tokenize() generator.

        It will call readline a maximum of twice, and return the encoding used
        (as a string) and a list of any lines (left as bytes) it has read in.

        It detects the encoding from the presence of a utf-8 bom or an encoding
        cookie as specified in pep-0263.  If both a bom and a cookie are present,
        but disagree, a SyntaxError will be raised.  If the encoding cookie is an
        invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
        'utf-8-sig' is returned.

        If no encoding is specified, then the default of 'utf-8' will be returned.
        NFrc�2��	��S#t$rYywxYw)Nr)�
StopIteration)�readlines�r�read_or_stopz%detect_encoding.<locals>.read_or_stop�s"���
��z�!�� �
��
�s�
�	�c����	|jd�}tj|�}|syt
|d�}	t|�}�r?|jdk7r+��
d}t|��dj��}t|��|d	z
}|S#t$r"d}��dj|��}t|��wxYw#t$r0��d|z}t|��dj�|�}t|��wxYw)
Nrz'invalid or missing encoding declarationz{} for {!r}rzunknown encoding: zunknown encoding for {!r}: {}zencoding problem: utf-8z encoding problem for {!r}: utf-8z-sig)
r��UnicodeDecodeError�format�SyntaxError�	cookie_re�findallr�r��LookupErrorr�)�line�line_string�msg�matches�encoding�codec�	bom_foundr�s      ��r�find_cookiez$detect_encoding.<locals>.find_cookie�s+���	
'�#�k�k�'�2�� �'�'��4�G���'���
�3�H�	
'��x�(����:�:��(��'�7��&�c�*�*�A�G�G��Q��%�c�*�*��F�"���O��=&�
'�?���'�'�.�.�s�H�=�C�!�#�&�&�	
'���
'��#�.��9�C�"�#�&�&�:�@�@��$�&�C�!�#�&�&�
'�s�B	�B7�	+B4�79C0Trz	utf-8-sig)�__self__r��AttributeErrorr;r�)	r�r��defaultr�r��first�secondr�r�s	`      @@rr�r�|s����"	��(�(�-�-�H��	�����	�$	�L������H�%��I��!�"�I�E�!�G���B�;���u�%����e�W�$�$������U�G�#�#��v�&����e�V�_�,�,�����'�'��K�	��H�	�s�B
�
B�B)r=�)r�)�unescape)�ChainMap)�MutableMapping)�recursive_reprc����fd�}|S)zm
            Decorator to make a repr function return fillvalue for a recursive
            call
            c�����t�����fd�}t�d�|_t�d�|_t�d�|_t�di�|_|S)Nc���t|�t�f}|�vr�S�j|�	�|�}�j|�|S#�j|�wxYwrb)�id�	get_identr��discard)rfr[�result�	fillvalue�repr_running�
user_functions   ���r�wrapperz=_recursive_repr.<locals>.decorating_function.<locals>.wrapper�sc����T�(�I�K�/�C��l�*�(�(� �$�$�S�)�2�!.�t�!4��$�,�,�S�1�!�M��%�,�,�S�1�s�A
�
Ar/rir.�__annotations__)r��getattrr/rir.r�)r�r�r�r�s` @�r�decorating_functionz,_recursive_repr.<locals>.decorating_function�sU���"�u��	"�&-�]�L�%I��"�")�-��"C���#*�=�*�#E�� �*1�-�AR�TV�*W��'��rr1)r�r�s` r�_recursive_reprr��s���
�*'�&rc��eZdZdZd�Zd�Zd�Zdd�Zd�Zd�Z	d	�Z
d
�Ze�d��Z
ed��Zd
�ZeZd�Zed��Zd�Zd�Zd�Zd�Zd�Zy)r�a� A ChainMap groups multiple dicts (or other mappings) together
        to create a single, updateable view.

        The underlying mappings are stored in a list.  That list is public and can
        accessed or updated using the *maps* attribute.  There is no other state.

        Lookups search the underlying mappings successively until a key is found.
        In contrast, writes, updates, and deletions only operate on the first
        mapping.

        c�.�t|�xsig|_y)z�Initialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            N)�list�maps)rfrs  rrhzChainMap.__init__s��
�T�
�*�r�d�D�Irc��t|��rb)�KeyError�rfr[s  r�__missing__zChainMap.__missing__s���3�-�rc�r�|jD]	}	||cS|j|�S#t$rY�(wxYwrb)rrr)rfr[�mappings   r�__getitem__zChainMap.__getitem__sF���9�9���"�3�<�'�%�
�#�#�C�(�(�� ����s�*�	6�6Nc��||vr||S|Srbr1�rfr[r�s   rrUzChainMap.get$s�� #�t��4��9�8��8rc�V�tt�j|j��Srb)rVr��unionrr�s r�__len__zChainMap.__len__'s���{�s�u�{�{�D�I�I�.�/�/rc�V�tt�j|j��Srb)�iterr�r
rr�s r�__iter__zChainMap.__iter__*s��������T�Y�Y�/�0�0rc�@��t�fd�|jD��S)Nc3�&�K�|]}�|v���
y�wrbr1)r{�mr[s  �rr~z(ChainMap.__contains__.<locals>.<genexpr>.s�����3��A�s�a�x��s��r�rrs `r�__contains__zChainMap.__contains__-s����3����3�3�3rc�,�t|j�Srbrr�s r�__bool__zChainMap.__bool__0s���t�y�y�>�!rc	�t�dj|djtt|j���S)Nz{0.__class__.__name__}({1})rS)r�r@rWr8rr�s r�__repr__zChainMap.__repr__3s.��0�7�7��d�i�i��D�$�)�)� 4�5�7�
7rc�:�|tj|g|����S)z?Create a ChainMap with a single dict created from the iterable.)�dict�fromkeys)�cls�iterabler�s   rrzChainMap.fromkeys8s���t�}�}�X�5��5�6�6rc�x�|j|jdj�g|jdd���S)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]rr4N)�	__class__r�copyr�s rr"z
ChainMap.copy=s3��!�4�>�>�$�)�)�A�,�"3�"3�"5�F��	�	�!�"�
�F�Frc�<�|jig|j���S)z;New ChainMap with a new dict followed by all previous maps.�r!rr�s r�	new_childzChainMap.new_childCs��!�4�>�>�"�1�t�y�y�1�1rc�:�|j|jdd�S)zNew ChainMap from maps[1:].r4Nr$r�s r�parentszChainMap.parentsGs��"�4�>�>�4�9�9�Q�R�=�1�1rc�(�||jd|<y)Nr)r)rfr[r\s   r�__setitem__zChainMap.__setitem__Ls�� %�D�I�I�a�L��rc�t�	|jd|=y#t$rtdj|���wxYw)Nr�(Key not found in the first mapping: {!r})rrr�rs  r�__delitem__zChainMap.__delitem__OsA��
W��I�I�a�L��%���
W��I�P�P�QT�U�V�V�
W�s��$7c�n�	|jdj�S#t$rtd��wxYw)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.rz#No keys found in the first mapping.)r�popitemrr�s rr.zChainMap.popitemUs<��
F��y�y��|�+�+�-�-���
F��D�E�E�
F�s��4c��	|jdj|g|���S#t$rtdj|���wxYw)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].rr+)r�poprr�)rfr[r�s   rr0zChainMap.pop\sQ��
W�'�t�y�y��|�'�'��3�d�3�3���
W��I�P�P�QT�U�V�V�
W�s	�"�$Ac�>�|jdj�y)z'Clear maps[0], leaving maps[1:] intact.rN)r�clearr�s rr2zChainMap.clearcs���I�I�a�L��� rrb)r.r/r0rirhrr	rUrrrrr�r�classmethodrr"�__copy__r%�propertyr'r)r,r.r0r2r1rrr�r�s���
	�	+�	 �	)�	9�	0�	1�	4�	"�
�	�	7�
�	7�
�	7�
�	7�	G���	2�
�	2�
�	2�	&�	W�	F�	W�	!rr�)�cache_from_sourcec�P�|jd�sJ�|�d}|rd}||zSd}||zS)Nz.pyT�c�o)rz)rn�debug_override�suffixs   rr6r6jsD���}�}�U�#�#�#��!�&�N���F��f�}���F��f�}�r)�OrderedDict)r�)�KeysView�
ValuesView�	ItemsViewc��eZdZdZd�Zejfd�Zejfd�Zd�Zd�Z	d�Z
dd�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�ZeZe�Zefd�Zdd�Zdd�Zd�Zd�Zedd��Zd�Zd�Zd�Zd�Z d�Z!y)r<z)Dictionary that remembers insertion orderc���t|�dkDrtdt|�z��	|j|j
|i|��y#t$rgx|_}||dg|ddi|_Y�6wxYw)z�Initialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            r4z$expected at most 1 arguments, got %dN)rVr��_OrderedDict__rootr��_OrderedDict__map�_OrderedDict__update)rfr��kwds�roots    rrhzOrderedDict.__init__�sy���4�y�1�}�� F��T�� R�S�S�
 ����

�D�M�M�4�(�4�(��	"�
 �%'�'���d���t�,��Q����
�
 �s�A�!A*�)A*c�z�||vr-|j}|d}|||gx|d<x|d<|j|<||||�y)z!od.__setitem__(i, y) <==> od[i]=yrr4N)rBrC)rfr[r\�dict_setitemrF�lasts      rr)zOrderedDict.__setitem__�sO���$���{�{���A�w��7;�T�3�6G�G��Q��G�$�q�'�D�J�J�s�O���s�E�*rc�h�|||�|jj|�\}}}||d<||d<y)z od.__delitem__(y) <==> del od[y]r4rN)rCr0)rfr[�dict_delitem�	link_prev�	link_nexts     rr,zOrderedDict.__delitem__�s9��
��s�#�(,�
�
���s�(;�%�I�y�#�$�I�a�L�$�I�a�Lrc#�ZK�|j}|d}||ur|d��|d}||ur�yy�w)zod.__iter__() <==> iter(od)r4r�N�rB�rfrF�currs   rrzOrderedDict.__iter__��<�����;�;�D���7�D��d�"��1�g�
��A�w���d�"���&+�+c#�ZK�|j}|d}||ur|d��|d}||ur�yy�w)z#od.__reversed__() <==> reversed(od)rr�NrOrPs   r�__reversed__zOrderedDict.__reversed__�rRrSc���	|jj�D]}|dd�=�	|j}||dg|dd|jj�t
j|�y#t$rY�!wxYw)z.od.clear() -> None.  Remove all items from od.N)rC�
itervaluesrBr2r�r)rf�noderFs   rr2zOrderedDict.clear�sp��
� �J�J�1�1�3�D��Q��4��{�{����t�,��Q���
�
� � �"�
�J�J�t���"�
��
�s�AA*�*	A6�5A6c���|std��|j}|r|d}|d}||d<||d<n|d}|d}||d<||d<|d}|j|=tj	||�}||fS)z�od.popitem() -> (k, v), return and remove a (key, value) pair.
            Pairs are returned in LIFO order if last is true or FIFO order if false.

            zdictionary is emptyrr4r�)rrBrCrr0)rfrIrF�linkrLrMr[r\s        rr.zOrderedDict.popitem�s���
��4�5�5��;�;�D���A�w�� ��G�	�#�	�!��#��Q���A�w�� ��G�	�#��Q��#�	�!���q�'�C��
�
�3���H�H�T�3�'�E���:�rc��t|�S)zod.keys() -> list of keys in od)rr�s r�keyszOrderedDict.keys������:�rc�2�|D�cgc]}||��	c}Scc}w)z#od.values() -> list of values in odr1rs  r�valueszOrderedDict.values�s��)-�.��#�D��I��.�.��.s�c�6�|D�cgc]	}|||f��c}Scc}w)z.od.items() -> list of (key, value) pairs in odr1rs  r�itemszOrderedDict.items�s#��04�5���S�$�s�)�$��5�5��5s�c��t|�S)z0od.iterkeys() -> an iterator over the keys in od)rr�s r�iterkeyszOrderedDict.iterkeys�r]rc#�(K�|D]	}||���y�w)z2od.itervalues -> an iterator over the values in odNr1�rf�ks  rrWzOrderedDict.itervalues�s�������1�g�
��s�c#�,K�|D]}|||f���
y�w)z=od.iteritems -> an iterator over the (key, value) items in odNr1res  r�	iteritemszOrderedDict.iteritems�s�������$�q�'�l�"��s�c��t|�dkDrtdt|�fz��|std��|d}d}t|�dk(r|d}t|t�r|D]
}||||<�n9t	|d�r|j�D]
}||||<�n|D]
\}}|||<�|j
�D]
\}}|||<�y)	a�od.update(E, **F) -> None.  Update od from dict/iterable E and F.

            If E is a dict instance, does:           for k in E: od[k] = E[k]
            If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
            Or if E is an iterable of items, does:   for k, v in E: od[k] = v
            In either case, this is followed by:     for k, v in F.items(): od[k] = v

            r�z8update() takes at most 2 positional arguments (%d given)z,update() takes at least 1 argument (0 given)rr1r4r\N)rVr�rr�hasattrr\ra)r�rErf�otherr[r\s      rrezOrderedDict.updates����4�y�1�}��!7�:=�d�)��!F�G�G��� N�O�O���7�D��E��4�y�A�~��Q����%��&� �C� %�c�
�D��I�!����'� �:�:�<�C� %�c�
�D��I�(�#(�J�C�� %�D��I�#(�"�j�j�l�
��U�!��S�	�+rc�T�||vr
||}||=|S||jurt|��|S)z�od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
            If key is not found, d is returned if given, otherwise KeyError is raised.

            )�_OrderedDict__markerr)rfr[r�r�s    rr0zOrderedDict.pop&s;��
�d�{��c�����I��
��$�-�-�'��s�m�#��NrNc�"�||vr||S|||<|S)zDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in odr1rs   r�
setdefaultzOrderedDict.setdefault3s!���d�{��C�y� ��D��I��Nrc���|si}t|�t�f}||vryd||<	|s|jj�d�||=S|jj�d|j	��d�||=S#||=wxYw)zod.__repr__() <==> repr(od)�...r4�()�(�))r��
_get_identr!r.ra)rf�
_repr_running�call_keys   rrzOrderedDict.__repr__:s{�� �"�-��$�x���-�H��=�(��&'�M�(�#�
,��%)�^�^�%<�%<�>�"�(�+�$(�>�>�#:�#:�D�J�J�L�I�!�(�+��M�(�+�s�A0�)A0�0A5c��|D�cgc]	}|||g��}}t|�j�}tt��D]}|j|d��|r|j|f|fS|j|ffScc}w)z%Return state information for picklingN)�varsr"r<r0r!)rfrfra�	inst_dicts    r�
__reduce__zOrderedDict.__reduce__Hsy��+/�0�4�a�a��a��\�4�E�0��T�
���)�I��+�-�(���
�
�a��&�)�������)�<�<��>�>�E�8�+�+��
1s�A9c�$�|j|�S)z!od.copy() -> a shallow copy of od)r!r�s rr"zOrderedDict.copyRs���>�>�$�'�'rc�,�|�}|D]}|||<�	|S)z�OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            r1)rrr\�dr[s     rrzOrderedDict.fromkeysVs#����A�����#�� ��Hrc���t|t�r:t|�t|�k(xr!|j�|j�k(Stj||�S)z�od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            )rr<rVrar�__eq__�rfrks  rr�zOrderedDict.__eq__asH��
�%��-��4�y�#�e�*�,�N���������1N�N��;�;�t�U�+�+rc��||k(Srbr1r�s  r�__ne__zOrderedDict.__ne__js���u�}�$�$rc��t|�S)z@od.viewkeys() -> a set-like object providing a view on od's keys)r=r�s r�viewkeyszOrderedDict.viewkeysos���D�>�!rc��t|�S)z<od.viewvalues() -> an object providing a view on od's values)r>r�s r�
viewvalueszOrderedDict.viewvaluesss
���d�#�#rc��t|�S)zBod.viewitems() -> a set-like object providing a view on od's items)r?r�s r�	viewitemszOrderedDict.viewitemsws���T�?�"r)Trb)"r.r/r0rirhrr)r,rrUr2r.r\r_rarcrWrhrerD�objectrmr0rorr{r"r3rr�r�r�r�r�r1rrr<r<�s���3�	)� 8<�7G�7G�	+�15�0@�0@�	%�	�	�
	�	�2	�	/�	6�	�	�
	#�
	"�>���8��#+�	�	�	,�	,�	(�
�	�
�	�	,�	%�
	"�	$�	#rr<)�BaseConfigurator�valid_identz^[a-z_][a-z0-9_]*$c�N�tj|�}|std|z��y)Nz!Not a valid Python identifier: %rT)�
IDENTIFIERrBrT)rrs  rr�r��s)�����Q�����@�1�D�E�E�rc��eZdZdZd�Zdd�Zy)�ConvertingDictz A converting dictionary wrapper.c���tj||�}|jj|�}||ur/|||<t	|�t
ttfvr||_||_	|Srb)
rr	�configurator�convertr�r��ConvertingList�ConvertingTuple�parentr[�rfr[r\r�s    rr	zConvertingDict.__getitem__��f���$�$�T�3�/�E��&�&�.�.�u�5�F��F�"�"��S�	���<�N�N�$3�$5�5�$(�F�M�!$�F�J��MrNc���tj|||�}|jj|�}||ur/|||<t	|�t
ttfvr||_||_	|Srb)
rrUr�r�r�r�r�r�r�r[�rfr[r�r\r�s     rrUzConvertingDict.get�sf���H�H�T�3��0�E��&�&�.�.�u�5�F��F�"�"��S�	���<�N�N�$3�$5�5�$(�F�M�!$�F�J��Mrrb)r.r/r0rir	rUr1rrr�r��s��.�
	�
	rr�c���tj|||�}|jj|�}||ur*t	|�t
ttfvr||_||_	|Srb)
rr0r�r�r�r�r�r�r�r[r�s     rr0r0�s]������s�G�,���"�"�*�*�5�1������F�|��� /� 1�1� $��
� ��
��
rc��eZdZdZd�Zdd�Zy)r�zA converting list wrapper.c���tj||�}|jj|�}||ur/|||<t	|�t
ttfvr||_||_	|Srb)
rr	r�r�r�r�r�r�r�r[r�s    rr	zConvertingList.__getitem__�r�rc��tj||�}|jj|�}||ur#t	|�t
ttfvr||_|Srb)	rr0r�r�r�r�r�r�r�)rf�idxr\r�s    rr0zConvertingList.pop�sT���H�H�T�3�'�E��&�&�.�.�u�5�F��F�"���<�N�N�$3�$5�5�$(�F�M��MrN)���)r.r/r0rir	r0r1rrr�r��s��(�
	�	rr�c��eZdZdZd�Zy)r�zA converting tuple wrapper.c���tj||�}|jj|�}||ur*t	|�t
ttfvr||_||_	|Srb)
�tupler	r�r�r�r�r�r�r�r[r�s    rr	zConvertingTuple.__getitem__�s]���%�%�d�C�0�E��&�&�.�.�u�5�F��F�"���<�N�N�$3�$5�5�$(�F�M�!$�F�J��MrN)r.r/r0rir	r1rrr�r��s
��)�	rr�c��eZdZdZej
d�Zej
d�Zej
d�Zej
d�Z	ej
d�Z
ddd	�Zee
�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zy)r�zQ
        The configurator base class which defines some useful defaults.
        z%^(?P<prefix>[a-z]+)://(?P<suffix>.*)$z^\s*(\w+)\s*z^\.\s*(\w+)\s*z^\[\s*(\w+)\s*\]\s*z^\d+$�ext_convert�cfg_convert)r|�cfgc�F�t|�|_||j_yrb)r��configr�)rfr�s  rrhzBaseConfigurator.__init__�s��(��0�D�K�'+�D�K�K�$rc��|jd�}|jd�}	|j|�}|D]}|d|zz
}	t||�}�|S#t$r |j|�t||�}Y�DwxYw#t
$r=t
j�dd\}}td|�d|���}||c|_	|_
|�wxYw)zl
            Resolve strings to objects using standard import and attribute
            syntax.
            r3rr4NzCannot resolve z: )r6r0�importerr�r��ImportErrorr�r�rT�	__cause__�
__traceback__)	rfrr��used�foundrK�e�tb�vs	         r�resolvezBaseConfigurator.resolve�s���
�7�7�3�<�D��8�8�A�;�D�
��
�
�d�+�� �D��C�$�J�&�D�5� '��t� 4��!����*�5��
�
�d�+� '��t� 4��5���
�����q�r�*���2��!�Q�?�@��/0�"�,���Q�_���	
�s0�A?�A�A?�&A<�9A?�;A<�<A?�?ACc�$�|j|�S)z*Default converter for the ext:// protocol.)r��rfr\s  rr�zBaseConfigurator.ext_converts���<�<��&�&rc�r�|}|jj|�}|�td|z��||j�d}|j|j�d}|r�|jj|�}|r||j�d}nb|jj|�}|rE|j�d}|jj|�s||}n	t|�}||}|r||j�d}ntd|�d|����|r��|S#t$r||}Y�<wxYw)z*Default converter for the cfg:// protocol.NzUnable to convert %rrzUnable to convert z at )�WORD_PATTERNrBrT�endr��groups�DOT_PATTERN�
INDEX_PATTERN�
DIGIT_PATTERN�intr�)rfr\�restrr~r��ns       rr�zBaseConfigurator.cfg_converts>���D��!�!�'�'��-�A��y� �!7�%�!?�@�@��A�E�E�G�H�~���K�K����
�1�
�.����(�(�.�.�t�4�A���a�h�h�j��m�,�� �.�.�4�4�T�:���"#�(�(�*�Q�-�C�#'�#5�#5�#;�#;�C�#@�$%�c�F��!/�(+�C��A�()�!��A��#�A�E�E�G�H�~��(�7<�d�*D�E�E�'�,�H��(1�!/�()�#��A�!/�s�)D%�%D6�5D6c�0�t|t�s$t|t�rt|�}||_|St|t�s$t|t
�rt	|�}||_|St|t�s$t|t�rt
|�}||_|St|t�ri|jj|�}|rL|j�}|d}|jj|d�}|r|d}t||�}||�}|S)z�
            Convert values to an appropriate type. dicts, lists and tuples are
            replaced by their converting alternatives. Strings are checked to
            see if they have a conversion format and are converted if they do.
            �prefixNr;)rr�rr�r�rr�r��string_types�CONVERT_PATTERNrB�	groupdict�value_convertersrUr�)rfr\rr~r��	converterr;s       rr�zBaseConfigurator.convert.s���e�^�4��E�4�9P�&�u�-��%)��"�$�L�# ��~�6�:�e�T�;R�&�u�-��%)��"��L� ���7���u�-�'��.��%)��"��L��E�<�0��(�(�.�.�u�5������
�A��x�[�F� $� 5� 5� 9� 9�&�$� G�I� �!"�8���$+�D�)�$<�	� )�&� 1���Lrc�@�|jd�}t|�s|j|�}|jdd�}t|D�cgc]}t	|�s�|||f��c}�}|di|��}|r%|j�D]\}}t
|||��|Scc}w)z1Configure an object with a user-supplied factory.rrr3Nr1)r0r�r�rr�ra�setattr)	rfr�r8�propsrfrgr�r�r\s	         r�configure_customz!BaseConfigurator.configure_customJs����
�
�4� �A��A�;��L�L��O���J�J�s�D�)�E��6�L�6�a�[��^�A�v�a�y�>�6�L�M�F��[��[�F��#(�;�;�=�K�D�%��F�D�%�0�$1��M��Ms�	B�	Bc�<�t|t�rt|�}|S)z0Utility function which converts lists to tuples.)rrr�r�s  r�as_tuplezBaseConfigurator.as_tupleXs���%��&��e����LrN)r.r/r0rir<r?r�r�r�r�r�r��staticmethod�
__import__r�rhr�r�r�r�r�r�r1rrr�r��s���	�%�"�*�*�%M�N��!�r�z�z�/�2�� �b�j�j�!2�3��"��
�
�#9�:�
�"��
�
�8�,�
�"�!�
�� �
�+��	,�	�.	'� 	�D	�8	�	rr�)r4)rqrb)��
__future__rrmr<r��sslr��version_infor�
basestringr�rr��typesr�	file_type�__builtin__�builtins�ConfigParser�configparserrrr	r
r�urllibrr
rrrrrr�urllib2rrrrr r!r"r#r$r%�httplib�	xmlrpclib�Queue�queuer&�htmlentitydefs�	raw_input�	itertoolsr'�filterr(r*�io�strr)�shutil�urllib.parse�urllib.request�urllib.error�http.client�client�request�
xmlrpc.client�html.parser�
html.entities�entities�inputr+r,rTrMr^r`r�rj�F_OK�X_OK�zipfiler�r�rjr��BaseZipExtFiler�r��	sysconfigr��	NameError�collections.abcr�r�r�r��getfilesystemencodingr�r��tokenizer��codecsr�r�r?r�r��htmlr=�cgir��collectionsr�r��reprlibr�r��importlib.utilr6r<�threadr�ru�dummy_thread�_abcollr=r>r?r�logging.configr�r��Ir�r�r0rr�r�r�r1rr�<module>rs;��'�	�	�
������A����!��;�L��I�+�"�'�L�L�G�G�G��
�'�'�'��(����%���I�+�5� ��4�L��I�-����H�H�H�.�.�.�
�/�F�F�!�$�%��&�*��I�%�
�F�a4�4�F)�2�@��H+�
�;��$��G�4��^��
$�+�
$��.���)��H� 5��{�{�H��{�{�H�@k(�(�Z�����B�Q��&� ��|�$�$�H��E!�$�L�0�E#�'�La�<�<��[��
�C���^�_4�
�:�
�/#�d(4�o_4��H�)�)�F�)�)���>����"�'�'�)��<�>��F�	��	�� �)�(�)�)���5�,�#�+�+�-�8��K��f���	�%�	�5�5�-5��B�i(�'�
���
�
�4�5�I�	�X(�#i(��\�������C!�*�'�=���'�	'�'��<`!�>�`!�GC!��N�	��	���C#�9�2���9�8�9��
�;�;���
��
��t#�d�t#�C#��N�_�����0�"�$�$�7�J�� ���6����.
�%�
�C�6�C�y_�sV�G;�5H	�>H&�H<�:I%�	I3�J�%J8�,K(�K:�$L.�+L>�2N�;H�H�	H#�"H#�&H9�8H9�<"I"�!I"�%I0�/I0�3J�J�*J5�4J5�8)K%�$K%�(K7�6K7�:L+�L
�L+�
	L�L+�L�L+�*L+�.	L;�:L;�>N�M�
N�M�N�M�N�
M(�'N�(M0�-N�/M0�0N�N�AO�Opython3.12/site-packages/pip/_vendor/distlib/__pycache__/manifest.cpython-312.pyc000064400000035437151732701630023531 0ustar00�

R`i�9��@�dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZdgZeje�Zej dej"�Zej d	ej"ej&z�Zej*dd
ZGd�de�Zy)zu
Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.
�N�)�DistlibException)�fsdecode)�convert_path�Manifestz\\w*
z#.*?(?=
)|
(?=$)�c�n�eZdZdZdd�Zd�Zd�Zd�Zdd�Zd�Z	d	�Z
d
�Z		dd�Z		dd�Z
		dd
�Zd�Zy)rz~A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    Nc�"�tjjtjj|xstj���|_|j
tjz|_d|_t�|_
y)zd
        Initialise an instance.

        :param base: The base directory to explore under.
        N)�os�path�abspath�normpath�getcwd�base�sep�prefix�allfiles�set�files)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/manifest.py�__init__zManifest.__init__*sV���G�G�O�O�B�G�G�$4�$4�T�5H�R�Y�Y�[�$I�J��	��i�i�"�&�&�(�����
��U��
�c���ddlm}m}m}gx|_}|j
}|g}|j}|j}|r�|�}tj|�}	|	D]�}
tjj||
�}tj|�}|j}
||
�r|jt|���g||
�s�p||
�r�y||���|r��yy)zmFind all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        r)�S_ISREG�S_ISDIR�S_ISLNKN)�statrrrrr�pop�appendr�listdirr�join�st_moder)rrrrr�root�stackr�push�names�name�fullnamer�modes              r�findallzManifest.findall9s���	3�2�#%�%��
���y�y������i�i���|�|����5�D��J�J�t�$�E����7�7�<�<��d�3���w�w�x�(���|�|���4�=��O�O�H�X�$6�7��T�]�7�4�=���N��	rc��|j|j�s*tjj	|j
|�}|jjtjj|��y)zz
        Add a file to the manifest.

        :param item: The pathname to add. This can be relative to the base.
        N)	�
startswithrrrr"rr�addr)r�items  rr.zManifest.addTsK�����t�{�{�+��7�7�<�<��	�	�4�0�D��
�
���r�w�w�'�'��-�.rc�4�|D]}|j|��y)z�
        Add a list of files to the manifest.

        :param items: The pathnames to add. These can be relative to the base.
        N)r.)r�itemsr/s   r�add_manyzManifest.add_many^s���D��H�H�T�N�rc�6�����fd��t�j�}|r<t�}|D](}�|tjj	|���*||z}td�|D��D�cgc]}tjj|��� c}Scc}w)z8
        Return sorted files in directory order
        c����|j|�tjd|�|�jk7r2tj
j
|�\}}|dvsJ��||�yy)Nzadd_dir added %s)��/)r.�logger�debugrrr�split)�dirs�d�parent�_�add_dirrs    ��rr>z Manifest.sorted.<locals>.add_dirls[����H�H�Q�K��L�L�+�Q�/��D�I�I�~��G�G�M�M�!�,�	����Y�.�.�.���f�%�rc3�ZK�|]#}tjj|����%y�w�N)rrr9)�.0rs  r�	<genexpr>z"Manifest.sorted.<locals>.<genexpr>{s����>�v�t�r�w�w�}�}�T�*�v�s�)+)rrrr�dirname�sortedr")r�wantdirs�resultr:�f�
path_tupler>s`     @rrDzManifest.sortedgs����
	&��T�Z�Z�����5�D�����b�g�g�o�o�a�0�1���d�N�F��>�v�>�>�@�>�/9������j�)�>�@�	@��@s�0#Bc�0�t�|_g|_y)zClear all collected files.N)rrr)rs r�clearzManifest.clear}s���U��
���
rc��|j|�\}}}}|dk(r2|D],}|j|d��r�tjd|��.y|dk(r|D]}|j	|d��}�y|dk(r2|D],}|j|d��r�tjd|��.y|d	k(r|D]}|j	|d��}�y|d
k(r3|D]-}|j||��r�tjd||��/y|d
k(r|D]}|j	||��}�y|dk(r+|jd|��stjd|�yy|dk(r+|j	d|��stjd|�yytd|z��)av
        Process a directive which either adds some files from ``allfiles`` to
        ``files``, or removes some files from ``files``.

        :param directive: The directive to process. This should be in a format
                     compatible with distutils ``MANIFEST.in`` files:

                     http://docs.python.org/distutils/sourcedist.html#commands
        �includeT)�anchorzno files found matching %r�exclude�global-includeFz3no files found matching %r anywhere in distribution�global-exclude�recursive-include)rz-no files found matching %r under directory %r�recursive-exclude�graftNz no directories found matching %r�prunez4no previously-included directories found matching %rzinvalid action %r)�_parse_directive�_include_patternr7�warning�_exclude_patternr)r�	directive�action�patterns�thedir�
dirpattern�pattern�founds        r�process_directivezManifest.process_directive�s���04�/D�/D�Y�/O�,���&�*�
�Y��#���,�,�W�T�,�B��N�N�#?��I�$��y�
 �#���-�-�g�d�-�C��$��'�
'�#���,�,�W�U�,�C��N�N�$>�?F�H�$�
�'�
'�#���-�-�g�e�-�D��$��*�
*�#���,�,�W�V�,�D��N�N�$8�9@�&�J�$�
�*�
*�#���-�-�g�f�-�E��$��w�
��(�(��j�(�A����A�)�+�B��w�
��(�(��j�(�A���� -�.8�:�B�#�#�f�,�.�
.rc�,�|j�}t|�dk(r|ddvr|jdd�|d}dx}x}}|dvr8t|�dkrtd|z��|ddD�cgc]
}t	|���}}n�|d	vrFt|�d
krtd|z��t	|d�}|ddD�cgc]
}t	|���}}n=|dvr+t|�dk7rtd
|z��t	|d�}ntd|z��||||fScc}wcc}w)z�
        Validate a directive.
        :param directive: The directive to validate.
        :return: A tuple of action, patterns, thedir, dir_patterns
        rr)rLrNrOrPrQrRrSrTrLN)rLrNrOrPrz$%r expects <pattern1> <pattern2> ...)rQrR�z*%r expects <dir> <pattern1> <pattern2> ...)rSrTz!%r expects a single <dir_pattern>zunknown action %r)r9�len�insertrr)rrY�wordsrZr[r\�dir_pattern�words        rrUzManifest._parse_directive�sh�����!���u�:��?�u�Q�x�0B� B�
�L�L��I�&��q���*.�.��.�6�K��:�:��5�z�A�~�&�:�V�C�E�E�8=�Q�R�y�A�y�t��T�*�y�H�A�
�A�
A��5�z�A�~�&�@�6�I�K�K�"�%��(�+�F�7<�Q�R�y�A�y�t��T�*�y�H�A�
�)�
)��5�z�Q��&�7�&�@�B�B�'�u�Q�x�0�K�#�#6��#?�@�@��x���4�4��)B��Bs�*D�4Dc���d}|j||||�}|j�|j�|jD]1}|j|�s�|jj|�d}�3|S)a�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found.
        FT)�_translate_patternrr+�searchrr.)rr^rMr�is_regexr_�
pattern_rer(s        rrVzManifest._include_patternsl��8���,�,�W�f�f�h�O�
��=�=� ��L�L�N��M�M�D�� � ��&��
�
���t�$���"��rc���d}|j||||�}t|j�D]1}|j|�s�|jj	|�d}�3|S)atRemove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return True if files are
        found.

        This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
        packaging source distributions
        FT)ri�listrrj�remove)rr^rMrrkr_rlrGs        rrXzManifest._exclude_pattern)s^�����,�,�W�f�f�h�O�
��d�j�j�!�A�� � ��#��
�
�!�!�!�$���"��rc�J�|r't|t�rtj|�S|StdkDr$|jd�j
d�\}}}|r>|j|�}tdkDr&|j�r|j�sJ�d}tjtjj|jd��}	|��tdkr0|jd�}
|j|�dt|
�}nX|j|�}|j�r|j�sJ�|t|�t|�t|�z
}tj}tjdk(rd}tdkrd|	z|j|d|zf�z}n[|t�t|�t�z
}|�|	�|�|�d|�|��}n(|r&tdkr	d|	z|z}n�|	�|t|�d��}tj|�S)	aTranslate a shell-like wildcard pattern to a compiled regular
        expression.

        Return the compiled regex.  If 'is_regex' true,
        then 'pattern' is directly compiled to a regex (if it's a string)
        or just returned as-is (assumes it's a regex object).
        )rbrr=r5N�\z\\�^z.*)�
isinstance�str�re�compile�_PYTHON_VERSION�_glob_to_re�	partitionr-�endswith�escaperrr"rrcr)
rr^rMrrk�startr=�endrlr�
empty_pattern�	prefix_rers
             rrizManifest._translate_pattern=s�����'�3�'��z�z�'�*�*����V�#� �,�,�S�1�;�;�C�@�M�E�1�c���)�)�'�2�J���'�!�,�,�U�3�
�8K�8K�C�8P�P�P��J��y�y������d�i�i��4�5�����&�(� $� 0� 0�� 4�
� �,�,�V�4�5I�s�=�7I�6I�J�	� �,�,�V�4�	� �+�+�E�2�y�7I�7I�#�7N�N�N�%�c�%�j�#�i�.�3�s�8�2K�L�	��&�&�C��v�v��~����&�(� �4�Z�#�(�(�I�48�:�4E�4G�+H�H�
�(��E�
�C�
�O�c�#�h�4N�O�
�27��y�#�2<�c�C�
��"�f�,�!$�t��j�!8�J�.3�T�:�c�%�j�k�;R�!S�J��z�z�*�%�%rc��tj|�}tj}tjdk(rd}d|z}t	j
d||�}|S)z�Translate a shell-like glob pattern to a regular expression.

        Return a string containing the regex.  Differs from
        'fnmatch.translate()' in that '*' does not match "special characters"
        (which are platform-specific).
        rqz\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translaterrru�sub)rr^rlr�escapeds     rrxzManifest._glob_to_retsT���&�&�w�/�
��f�f��
�6�6�T�>��C��s�"���V�V�1�7�J�G�
��rr@)F)TNF)�__name__�
__module__�__qualname__�__doc__rr+r.r2rDrJr`rUrVrXrirx�rrrr%sd���	�#�6/��@�,�
I.�^-5�^=A�"'�'�R=A�"'��(?C�$)�5&�nr)r�r��loggingrru�sysr5r�compatr�utilr�__all__�	getLoggerr�r7rv�M�_COLLAPSE_PATTERN�S�_COMMENTED_LINE�version_inforw�objectrr�rr�<module>r�s����
��	�	�
�����,��	��	�	�8�	$���B�J�J�z�2�4�4�0���"�*�*�1�2�4�4�"�$�$�;�?���"�"�2�A�&��d�v�drpython3.12/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc000064400000046232151732701630023405 0ustar00�

R`i�F���ddlmZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
ddlmZddlmZmZmZmZmZmZej.e�Zdj5�Zej8d	�Zd
Zd�ZeZ Gd�d
e!�Z"y)�)�BytesION)�ZipInfo�)�	sysconfig�detect_encoding�ZipFile)�finder)�FileOperator�get_export_entry�convert_path�get_executable�get_platform�in_venva�
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
 processorArchitecture="X86"
 name="%s"
 type="win32"/>

 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
 <requestedPrivileges>
 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
 </requestedPrivileges>
 </security>
 </trustInfo>
</assembly>s^#!.*pythonw?[0-9.]*([ 	].*)?$z�# -*- coding: utf-8 -*-
import re
import sys
from %(module)s import %(import_name)s
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
c���d|vr[|jd�r4|jdd�\}}d|vr|jd�s|�d|�d�}|S|jd�sd|z}|S)N� z
/usr/bin/env r�"z "z"%s")�
startswith�split)�
executable�env�_executables   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/scripts.py�enquote_executabler5sx��
�j��
� � ��1�)�/�/��Q�7��C���k�!�+�*@�*@��*E�*-�{�;�
����(�(��-�#�j�0�
���c�L�eZdZdZeZdZ		dd�Zd�Ze	jjd�rd�Zd�Z
d�Zdd	�Zd
�ZeZd�Zd�Zd
Zd�Zdd�Zd�Zed��Zej6d��Zej:dk(sej:dk(rej<dk(rd�Zdd�Z dd�Z!y)�ScriptMakerz_
    A class to copy or create scripts from source scripts or callable
    specifications.
    Nc���||_||_||_d|_d|_t
jdk(xs(t
jdk(xrt
jdk(|_td�|_
|xst|�|_t
jdk(xs(t
jdk(xrt
jdk(|_
tj|_y)NF�posix�java)��X.Y�nt)�
source_dir�
target_dir�
add_launchers�force�clobber�os�name�_name�set_mode�set�variantsr
�_fileop�_is_nt�sys�version_info)�selfr#r$r%�dry_run�fileops      r�__init__zScriptMaker.__init__Ps���$���$���*�����
�������G�+�F����F�1B�2E�13���W�1D�	
�
��K�(��
��6��g�!6����g�g��o�4��G�G�v��2�"�(�(�d�"2�	
���,�,��rc���|jdd�r`|jrTtjj	|�\}}|jdd�}tjj
||�}|S)N�guiF�python�pythonw)�getr/r(�pathr�replace�join)r2r�options�dn�fns     r�_get_alternate_executablez%ScriptMaker._get_alternate_executableasV���;�;�u�e�$�����W�W�]�]�:�.�F�B�����H�i�0�B������b�"�-�J��rrc���	t|�5}|jd�dk(cddd�S#1swYyxYw#ttf$rtjd|�YywxYw)zl
            Determine if the specified executable is a script
            (contains a #! line)
            �z#!NzFailed to open %sF)�open�read�OSError�IOError�logger�warning)r2r�fps   r�	_is_shellzScriptMaker._is_shellisR��

��*�%���7�7�1�:��-�&�%�%���W�%�
����2�J�?��
�s#�7�+�	7�4�7�7�%A�Ac���|j|�r3ddl}|jjj	d�dk(r|Sd|zS|j�j
d�r|Sd|zS)Nrzos.name�Linuxz
jython.exez/usr/bin/env %s)rKr�lang�System�getProperty�lower�endswith)r2rrs   r�_fix_jython_executablez"ScriptMaker._fix_jython_executableusk���~�~�j�)���9�9�#�#�/�/�	�:�g�E�%�%�%�z�1�1��!�!�#�,�,�\�:�!�!�$�z�1�1rc���tjdk7rd}n=t|�t|�zdz}tjdk(rd}nd}d|vxr||k}|r
d|z|zd	z}|Sd
}|d|z|zdzz
}|d
z
}|S)a
        Build a shebang line. In the simple case (on Windows, or a shebang line
        which is not too long or contains spaces) use a simple formulation for
        the shebang. Otherwise, use /bin/sh as the executable, with a contrived
        shebang which allows the script to run either under Python or sh, using
        suitable quoting. Thanks to Harald Nordgren for his input.

        See also: http://www.in-ulm.de/~mascheck/various/shebang/#length
                  https://hg.mozilla.org/mozilla-central/file/tip/mach
        rT��darwini�� s#!�
s
#!/bin/sh
s	'''exec' s "$0" "$@"
s' ''')r(r)�lenr0�platform)r2r�post_interp�simple_shebang�shebang_length�max_shebang_length�results       r�_build_shebangzScriptMaker._build_shebang�s����7�7�g��!�N�!��_�s�;�/?�?�!�C�N��|�|�x�'�%(�"�%(�"�#�:�5�E�-�1C�C�
���Z�'�+�5��=�F�
�
�$�F��l�Z�/�+�=��O�O�F��h��F��
rc��d}|jr|j}d}�n:tj�st�}�nt	�rJt
jjtjd�dtjd�z�}n�t
jjtjd�dtjd��tjd����}t
jj|�sIt
jjtjd�dtjd�z�}|r|j||�}tjjd	�r|j|�}|rt!|�}|j#d
�}tjdk(r
d|vr	d
|vr|dz
}|j%||�}	|j'd
�|d
k7r	|j'|�|S|S#t($rt+d|z��wxYw#t($rt+d|�d|�d���wxYw)NTF�scriptszpython%s�EXE�BINDIRr8�VERSIONr�utf-8�cliz	-X:Framesz
-X:FullFramess
 -X:Framesz,The shebang (%r) is not decodable from utf-8z
The shebang (z-) is not decodable from the script encoding (�))rr�is_python_buildr
rr(r;r=�get_path�get_config_var�isfilerAr0r[rrSr�encodera�decode�UnicodeDecodeError�
ValueError)r2�encodingr\r>�enquoter�shebangs       r�_get_shebangzScriptMaker._get_shebang�s�����?�?����J��G��*�*�,�'�)�J�
�Y������i�&8�&8��&C�&��)A�)A�%�)H�H�J�J�������(�(��2�(�7�7�	�B�(�7�7��>�@�A�J��7�7�>�>�*�-� �W�W�\�\�)�*B�*B�8�*L� *�i�.F�.F�u�.M� N�P�
���7�7�
�G�L�J��<�<�"�"�6�*��4�4�Z�@�J��+�J�7�J� �&�&�w�/�
��L�L�E�!�k��&D��{�2��=�(�K��%�%�j�+�>��	J��N�N�7�#��w��
K����x�(�
��w���"�	J��>��H�J�
J�	J��&�
K� �7>��J�K�K�
K�s�.H�H5�H2�5Ic��|jt|j|jj	d�d|j��zS)N�.r)�module�import_name�func)�script_template�dict�prefix�suffixr)r2�entrys  r�_get_script_textzScriptMaker._get_script_text�s@���#�#�d�%�,�,�7<�|�|�7I�7I�#�7N�q�7Q�05���'>�>�	>rc�^�tjj|�}|j|zS�N)r(r;�basename�manifest)r2�exename�bases   r�get_manifestzScriptMaker.get_manifest�s%���w�w����(���}�}�t�#�#rc��|jxr|j}tjj	d�}|j|�s||z
}|s||z}n�|dk(r|j
d�}n|j
d�}t�}	t|	d�5}
tjjd�}|rAtjt|��dd}td|��}
|
j|
|�n|
jd|�ddd�|	j!�}||z|z}|D�]E}tj"j%|j&|�}|rXtj"j)|�\}}|j+d	�r|}d
|z}	|j,j/||�n�|jr|jd|z�s|�d|��}tj"j7|�r#|j>st2j5d|���|j,j/||�|j@r|j,jC|g�|jE|���Hy#1swY��nxYw#t0$r�t2j5d�d|z}tj"j7|�rtj8|�tj:||�|j,j/||�t2j=d
�	tj8|�n#t0$rYnwxYwY��wxYw)Nrg�py�t�w�SOURCE_DATE_EPOCH�z__main__.py)�filename�	date_timez.pyz%s.exez:Failed to write executable - trying to use .deleteme logicz%s.deletemez0Able to replace executable using .deleteme logicrwzSkipping existing file %s)#r%r/r(�lineseprnrR�
_get_launcherrr�environr:�time�gmtime�intr�writestr�getvaluer;r=r$�splitextrr.�write_binary_file�	ExceptionrHrI�exists�remove�rename�debugr'r+�set_executable_mode�append)r2�namesrt�script_bytes�	filenames�ext�use_launcherr��launcher�stream�zf�source_date_epochr��zinfo�zip_datar)�outname�n�e�dfnames                    r�
_write_scriptzScriptMaker._write_script�s����)�)�9�d�k�k���*�*�#�#�G�,������(��w��G��"�\�1�L��d�{��-�-�c�2���-�-�c�2���Y�F����%��$&�J�J�N�N�3F�$G�!�$� $���C�0A�,B� C�B�Q� G�I�#�]�i�P�E��K�K��|�4��K�K�
�|�<�&����(�H�#�g�-��8�L��D��g�g�l�l�4�?�?�D�9�G���w�w�'�'��0���1��<�<��&��G�"�W�,����L�L�2�2�7�L�I�"�;�;�w�'7�'7��c�	�'B�)0�#�6�G��7�7�>�>�'�*�4�<�<��N�N�#>��H�����.�.�w��E��=�=��L�L�4�4�g�Y�?����W�%�C�&�%��&!���N�N�$9�:�*�W�4�F��w�w�~�~�f�-��	�	�&�)��I�I�g�v�.��L�L�2�2�7�L�I��L�L�"3�4���	�	�&�)��$������sD�A5I7�J�7J�BM�#L9�8M�9	M�M�M�M�
M�-c�P�t�}d|jvr|j|�d|jvr"|j|�|jd���d|jvr>|j|�|j�|jd�d|jd���|S)Nr �Xrr!rwr)r,r-�addr1�variant_separator)r2r)r`s   r�get_script_filenamesz ScriptMaker.get_script_filenames,s������
������J�J�t���$�-�-���J�J��t�'8�'8��';�<�=��D�M�M�!��J�J�d�D�,B�,B�&*�&7�&7��&:�D�<M�<M�a�<P�R�
S��
rc�x�d}|r9|jdg�}|r%ddj|�z}|jd�}|jd||��}|j	|�jd�}|j|j�}|r|jdd�rd	}	nd
}	|j|||||	�y)Nr�interpreter_argsz %srrg�r>r7F�pywr�)r:r=rnrur�r�r)r�)
r2rr�r>r\�argsrt�script�scriptnamesr�s
          r�_make_scriptzScriptMaker._make_script7s�������;�;�1�2�6�D���s�x�x��~�-��"�k�k�'�2���#�#�G�[�'�#�J���&�&�u�-�4�4�W�=���/�/��
�
�;���w�{�{�5�%�0��C��C����;����C�Hrc��d}tjj|jt	|��}tjj|j
tjj
|��}|js3|jj||�stjd|�y	t|d�}|j�}|stjd|�ytj!|j#dd��}|rd}|j%d�xsd	}	|sh|r|j+�|jj-||�|j.r|jj1|g�|j3|�ytj5d
||j
�|jj(s�t7|j�\}	}
|j9d�|j;|	�}dvrd
}nd}tjj
|�}
|j=|
g||j?�||�|r|j+�yy#t&$r|j(s�d}Y��WwxYw)NFznot copying %s (up-to-date)�rbz%s is an empty file (skipping)s
rYTrrzcopying and adjusting %s -> %srspythonwr�r�) r(r;r=r#rr$r�r&r.�newerrHr�rD�readlinerI�
FIRST_LINE_RE�matchr<�grouprGr3�close�	copy_filer+r�r��infor�seekrur�rE)r2r�r��adjustr��f�
first_liner�r\rr�linesrtr�r�s              r�_copy_scriptzScriptMaker._copy_scriptGs����������d�o�o�|�F�/C�D���'�'�,�,�t������0@�0@��0H�I���z�z�$�,�,�"4�"4�V�W�"E��L�L�6��?��
	4��V�T�"�A�����J�����?��H��!�'�'�
�(:�(:�7�E�(J�K�E����#�k�k�!�n�3��������	��L�L�"�"�6�7�3��}�}����0�0�'��;����W�%��K�K�8�&����
)��<�<�'�'�"1�!�*�*�"=���%����q�	��+�+�H�k�B����+��C��C��G�G�$�$�W�-���"�"�A�3������9�c�J�����	���G�	��<�<���A�	�s�=I-�-J	�J	c�.�|jjSr��r.r3)r2s rr3zScriptMaker.dry_runzs���|�|�#�#�#rc�&�||j_yr�r�)r2�values  rr3zScriptMaker.dry_run~s��$����rr"c��tjd�dk(rd}nd}t�dk(rdnd}|�|�|�d�}tj	d	d
�d}t|�j
|�}|sd|�d
|��}t|��|jS)N�P��64�32z	win-arm64z-armr z.exerwrrzUnable to find resource z in package )	�struct�calcsizer�__name__�rsplitr	�findrq�bytes)r2�kind�bits�platform_suffixr)�distlib_package�resource�msgs        rr�zScriptMaker._get_launcher�s������s�#�q�(�����(4��+�(E�f�2�O�#'���?�D�'�o�o�c�1�5�a�8�O��o�.�3�3�D�9�H��EI�&�(�� ��o�%��>�>�!rc�t�g}t|�}|�|j||�|S|j|||��|S)a�
        Make a script.

        :param specification: The specification, which is either a valid export
                              entry specification (to make a script from a
                              callable) or a filename (to make a script by
                              copying from a source location).
        :param options: A dictionary of options controlling script generation.
        :return: A list of all absolute pathnames written to.
        r�)rr�r�)r2�
specificationr>r�rs     r�makezScriptMaker.make�sM���	� ��/���=����m�Y�7���
���e�Y���@��rc�Z�g}|D]#}|j|j||���%|S)z�
        Take a list of specifications and make scripts from them,
        :param specifications: A list of specifications.
        :return: A list of all absolute pathnames written to,
        )�extendr�)r2�specificationsr>r�r�s     r�
make_multiplezScriptMaker.make_multiple�s2���	�+�M����T�Y�Y�}�g�>�?�,��r)TFN)rNr�)"r��
__module__�__qualname__�__doc__�SCRIPT_TEMPLATEr{rr5rAr0r[rrKrSrarur��_DEFAULT_MANIFESTr�r�r�r�r�r�r��propertyr3�setterr(r)r*r�r�r��rrrrGs����&�O��J�=A�'+�-�"��|�|���v�&�
	�
	2��>C�J>�
!�H�$�8&�t��	�I� 1�f�$��$�
�^�^�%��%�
�w�w�$��2�7�7�f�,����T�1A�	"�&�&	rr)#�ior�loggingr(�rer�r0r��zipfiler�compatrrr�	resourcesr	�utilr
rrr
rr�	getLoggerr�rH�stripr��compiler�r�r�_enquote_executable�objectrr�rr�<module>r�s�����	�	�
�
���7�7��:�:�
��	�	�8�	$��� �u�w�!�&��
�
�=�>�
���
� )��n�&�nrpython3.12/site-packages/pip/_vendor/distlib/__pycache__/wheel.cpython-312.pyc000064400000145740151732701630023026 0ustar00�

R`iz�����ddlmZddlZddlZddlZddlmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlmZmZddlmZmZmZmZmZddlmZddlmZmZmZm Z dd	l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+dd
l,m-Z-m.Z.e	j^e0�Z1da2e3ed�rdZ4n2ejjjmd
�rdZ4nejjdk(rdZ4ndZ4ejnd�Z8e8sdejrddzZ8de8zZ:e4e8zZ;e+�jydd�jydd�Z=ejnd�Z>e>r6e>jmd�r%e>jydd�jd�dZ>nd�Z@e@�Z>[@ej�dej�ej�z�ZDej�dej�ej�z�ZEej�d�ZFej�d�ZGd ZHd!ZIe
j�d"k(rd#�ZKnd$�ZKejrdd%krddlLZLn
dZLddlMZNddlOZNd&�ZPd'�ZQGd(�d)eR�ZSeS�ZTGd*�d+eR�ZUd,�ZVd-�ZWeW�ZX[Wd/d.�ZYy)0�)�unicode_literalsN)�message_from_file�)�__version__�DistlibException)�	sysconfig�ZipFile�fsdecode�	text_type�filter)�InstalledDistribution)�Metadata�METADATA_FILENAME�WHEEL_METADATA_FILENAME�LEGACY_METADATA_FILENAME)
�FileOperator�convert_path�	CSVReader�	CSVWriter�Cache�cached_property�get_cache_base�read_exports�tempdir�get_platform)�NormalizedVersion�UnsupportedVersionError�pypy_version_info�pp�java�jy�cli�ip�cp�py_version_nodotz%s%s��py�-�_�.�SOABIzcpython-c��dtg}tjd�r|jd�tdk(r�t
jdd}|dkrqtjd�}|�d}|r|jd�|d	kr@tjd
�}|dk(s|�$t
jdk(r|jd
�dj|�S)Nr$�Py_DEBUG�dr&)���
WITH_PYMALLOCT�m)r/r/�Py_UNICODE_SIZE�i���u�)	�
VER_SUFFIXr�get_config_var�append�
IMP_PREFIX�sys�version_info�
maxunicode�join)�parts�vi�wpm�uss    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/wheel.py�_derive_abirD;s����z�"���#�#�J�/��L�L�������!�!�"�1�%�B��F�{��.�.��?���;��C���L�L��%���;�"�1�1�2C�D�B��Q�w�2�:�#�.�.�H�2L����S�)��w�w�u�~��zz
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?
-(?P<py>\w+\d+(\.\w+\d+)*)
-(?P<bi>\w+)
-(?P<ar>\w+(\.\w+)*)
\.whl$
z7
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?$
s
\s*#![^\r\n]*s^(\s*#!("[^"]+"|\S+))\s+(.*)$s#!pythons	#!pythonw�/c��|S�N���os rC�<lambda>rLes��rEc�B�|jtjd�S)NrF)�replace�os�seprJs rCrLrLgs�����2�6�6�3�/rEr/c��tr%tj�D�cgc]}|d��	c}StjjScc}w)Nr)�imp�get_suffixes�	importlib�	machinery�EXTENSION_SUFFIXES)�ss rC�
_get_suffixesrXps@��
�!�.�.�0�1�0���!��0�1�1��"�"�5�5�5��2s�Ac��trtj||�Stjj	||�}tjj|�}|tj|<|jj|�|SrH)
rR�load_dynamicrT�util�spec_from_file_location�module_from_specr;�modules�loader�exec_module)�name�path�spec�modules    rC�
_load_dynamicrevsg��
�����d�+�+��~�~�5�5�d�D�A�����0�0��6��"����D��������'��
rEc�,�eZdZd�Zd�Zd�Zdd�Zd�Zy)�Mounterc� �i|_i|_yrH)�
impure_wheels�libs��selfs rC�__init__zMounter.__init__�s�������	rEc�X�||j|<|jj|�yrH)rirj�update)rl�pathname�
extensionss   rC�addzMounter.add�s$��'1����8�$��	�	����$rEc��|jj|�}|D]!\}}||jvs�|j|=�#yrH)ri�poprj)rlrprq�k�vs     rC�removezMounter.remove�s<���'�'�+�+�H�5�
��D�A�q��D�I�I�~��I�I�a�L�rENc�.�||jvr|}|Sd}|SrH)rj)rl�fullnamerb�results    rC�find_modulezMounter.find_module�s&���t�y�y� ��F��
��F��
rEc� �|tjvrtj|}|S||jvrtd|z��t	||j|�}||_|j
dd�}t|�dkDr
|d|_|S)Nzunable to find extension for %sr*rr)	r;r^rj�ImportErrorre�
__loader__�rsplit�len�__package__)rlryrzr?s    rC�load_modulezMounter.load_module�s����s�{�{�"��[�[��*�F��
��t�y�y�(�!�"C�h�"N�O�O�"�8�T�Y�Y�x�-@�A�F� $�F���O�O�C��+�E��5�z�A�~�%*�1�X��"��
rErH)�__name__�
__module__�__qualname__rmrrrwr{r�rIrErCrgrg�s���%�!��rErgc���eZdZdZdZdZdd�Zed��Zed��Z	ed��Z
ed	��Zd
�Z
ed��Zd�Zdd
�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zdd�Zy) �Wheelz@
    Class to build and install from Wheel files (PEP 427).
    )rr�sha256Nc��||_||_d|_tg|_dg|_dg|_tj�|_	|� d|_
d|_|j|_
ytj|�}|rQ|j!d�}|d|_
|dj#d	d
�|_|d|_|j|_
ytj$j'|�\}}t(j|�}|st+d|z��|r$tj$j-|�|_	||_
|j!d�}|d|_
|d|_|d|_|d
j'd�|_|dj'd�|_|dj'd�|_y)zB
        Initialise an instance using a (valid) filename.
        r6�none�anyN�dummyz0.1�nm�vnr)r(�bnzInvalid name or filename: %rr'r*�bi�ar)�sign�
should_verify�buildver�PYVER�pyver�abi�archrO�getcwd�dirnamera�version�filename�	_filename�NAME_VERSION_RE�match�	groupdictrNrb�split�FILENAME_REr�abspath)rlr�r��verifyr2�infor�s       rCrmzWheel.__init__�s�����	�#�����
��W��
��8����G��	��y�y�{������D�I� �D�L�!�]�]�D�N��%�%�h�/�A���{�{�2��� ��J��	�#�D�z�1�1�#�s�;��� $�T�
��
�!%�����$&�G�G�M�M�(�$;�!����%�%�h�/���*�,:�<D�,E�F�F��#%�7�7�?�?�7�#;�D�L�!)����{�{�2��� ��J��	�#�D�z��� $�T�
��
�!�$�Z�-�-�c�2��
���:�+�+�C�0��� ��J�,�,�S�1��	rEc�R�|jrd|jz}nd}dj|j�}dj|j�}dj|j�}|j
j
dd�}|j�d|�|�d|�d|�d|�d�S)zJ
        Build and return a filename from the various components.
        r(r6r*r)�.whl)r�r>r�r�r�r�rNra)rlr�r�r�r�r�s      rCr�zWheel.filename�s���
�=�=��T�]�]�*�H��H�������$���h�h�t�x�x� ���x�x��	�	�"���,�,�&�&�s�C�0��)-���G�X�).��T�;�	;rEc��tjj|j|j�}tjj|�SrH)rOrbr>r�r��isfile)rlrbs  rC�existszWheel.exists�s1���w�w�|�|�D�L�L�$�-�-�8���w�w�~�~�d�#�#rEc#�K�|jD]+}|jD]}|jD]	}|||f�����-y�wrH)r�r�r�)rlr�r�r�s    rC�tagsz
Wheel.tags�s=�����Z�Z�E��x�x�� �I�I�D���d�*�*�&� � �s�<>c	��tjj|j|j�}|j
�d|j��}d|z}tjd�}t|d�5}|j|�}|djdd�}t|D�cgc]
}t|���c}�}	ttg}
d}|
D]U}	t!j||�}
|j#|
�5}||�}t%|��}|r	ddd�n	ddd��W|st)d	d
j|
�z��	ddd�|Scc}w#1swY�:xYw#t&$rY��wxYw#1swYSxYw)Nr(�%s.dist-info�utf-8�r�
Wheel-Versionr*r)�fileobjz8Invalid wheel, because metadata is missing: looked in %sz, )rOrbr>r�r�rar��codecs�	getreaderr	�get_wheel_metadatar��tuple�intrr�	posixpath�openr�KeyError�
ValueError)rlrp�name_ver�info_dir�wrapper�zf�wheel_metadata�wv�i�file_version�fnsrz�fn�metadata_filename�bf�wfs                rC�metadatazWheel.metadata�sp���7�7�<�<����d�m�m�<��"�i�i����6��!�H�,���"�"�7�+��
�X�s�
#�r�!�4�4�R�8�N���0�6�6�s�A�>�B� �"�!5�"�Q�#�a�&�"�!5�6�L�+�,D�E�C��F����(1���x��(D�%����!2�3�r�$�R�[��!)�"�!5��!�!�	4�3�"�4���� �"9�;?�9�9�S�>�"J�K�K��+$�0�
��+"6�4�3��
 �����'$�0�
�sf�60E1�&E
�8E1�'E"�:E�E"�E1�E"�%!E1�E1�E�E"�"	E.�+E1�-E.�.E1�1E;c�0�|j�d|j��}d|z}tj|d�}|j	|�5}tjd�|�}t|�}ddd�t|�S#1swYt�SxYw)Nr(r��WHEELr�)	rar�r�r>r�r�r�r�dict)rlr�r�r�r�r�r��messages        rCr�zWheel.get_wheel_metadatas���"�i�i����6��!�H�,��%�N�N�8�W�=��
�W�W�&�
'�2�*��!�!�'�*�2�.�B�'��+�G�(��G�}��(��G�}��s�'B�Bc���tjj|j|j�}t|d�5}|j
|�}ddd�|S#1swYSxYw)Nr�)rOrbr>r�r�r	r�)rlrpr�rzs    rCr�z
Wheel.infosO���7�7�<�<����d�m�m�<��
�X�s�
#�r��,�,�R�0�F�$��
�$��
�s�A�A'c��tj|�}|ru|j�}|d|||d}}d|j�vrt}nt
}tj|�}|rd|j�dz}nd}||z}||z}|S|jd�}|jd�}	|dks||	kDrd}
n|||dzd	k(rd	}
nd}
t
|
z|z}|S)
Nspythonw� ���rE�
�
rr&s
)	�
SHEBANG_REr��end�lower�SHEBANG_PYTHONW�SHEBANG_PYTHON�SHEBANG_DETAIL_RE�groups�find)rl�datar2r��shebang�data_after_shebang�shebang_python�args�cr�lf�terms           rC�process_shebangzWheel.process_shebang%s������T�"����%�%�'�C�*.�t��*�d�3�4�j�'�G��W�]�]�_�,�!0��!/��!�'�'��0�A���a�h�h�j��n�,����$�t�+�G��/�/�D������5�!�B����5�!�B��A�v��b������2��6�?�g�-�"�D� �D�!�D�(�4�/�D��rEc��|�|j}	tt|�}||�j�}t
j|�jd�jd�}||fS#t$rt	d|z��wxYw)NzUnsupported hash algorithm: %r�=�ascii)
�	hash_kind�getattr�hashlib�AttributeErrorr�digest�base64�urlsafe_b64encode�rstrip�decode)rlr�r��hasherrzs     rC�get_hashzWheel.get_hashCs��������I�	Q��W�i�0�F����$�$�&���)�)�&�1�8�8��>�E�E�g�N���&� � ��	�	Q�"�#C�i�#O�P�P�	Q�s�A-�-Bc��t|�}|j|ddf�t|�5}|D]}|j|��	ddd�y#1swYyxYw)Nr6)�listr9r�writerow)rl�records�record_path�archive_record_path�writer�rows      rC�write_recordzWheel.write_recordNsK���w�-�����+�R��4�5�
�{�
#�v�������$��$�
#�
#�s�A�Ac�(�g}|\}}tt|j�}|D]q\}}	t|	d�5}
|
j	�}ddd�d|j�z}tjj|	�}
|j|||
f��stjj|d�}	ttjj|d��}|j||	|�|j||	f�y#1swY��xYw)N�rbz%s=%s�RECORD)
r�r�r�r��readr�rOrb�getsizer9r>�to_posixr�)rlr��libdir�
archive_pathsr��distinfor�r��ap�p�fr�r��sizes              rC�
write_recordszWheel.write_recordsUs�����!���(���$�.�.�1��"�E�B���a���!��v�v�x����t�}�}�T�2�2�F��7�7�?�?�1�%�D��N�N�B���-�.�#�
�G�G�L�L��8�,��
�b�g�g�l�l�8�X�6�
7�����'�1�b�)����b�!�W�%���s�D�D	c���t|dtj�5}|D].\}}tj	d||�|j||��0	ddd�y#1swYyxYw)N�wzWrote %s to %s in wheel)r	�zipfile�ZIP_DEFLATED�logger�debug�write)rlrprr�rrs      rC�	build_zipzWheel.build_zipesN��
�X�s�G�$8�$8�
9�R�&���A����6��2�>�����B��'�:�
9�
9�s�4A�A#c
�
��|�i}tt�fd�d��d}|dk(rd}tg}tg}tg}nd}t
g}dg}d	g}|j
d
|�|_|j
d|�|_|j
d|�|_	�|}	|j�d
|j��}
d|
z}d|
z}g}
dD�]N}|�vr�	�|}tjj|�s�.tj|�D�]\}}}|D]�}t!tjj#||��}tjj%||�}t'tjj#|||��}|
j)||f�|dk(s��|j+d�r��t-|d�5}|j/�}ddd�|j1�}t-|d�5}|j3|�ddd�������Q|	}d}tj|�D]�\}}}||k(r]t5|�D]F\}}t!|�}|j+d�s�#tjj#||�}||=n|sJd��|D]y}t!|�j+d�r�tjj#||�}t'tjj%||��}|
j)||f��{��tj6|�}|D]l}|dvs�t!tjj#||��}t'tjj#||��}|
j)||f��nd|xs|j8zdt:zd|zg}|j<D] \}}}|j)d|�d
|�d
|����"tjj#|d�}t-|d�5}|j3dj#|��ddd�t'tjj#|d��}|
j)||f�d �} t?|
| �!�}
|jA||f|	|
�tjj#|jB|jD�}!|jG|!|
�|!S#1swY��xYw#1swY���xYw#1swY��xYw)"z�
        Build a wheel from files in specified paths, and use any specified tags
        when determining the name of the wheel.
        Nc���|�vSrHrI)rK�pathss �rCrLzWheel.build.<locals>.<lambda>ss	���q�E�zrE)�purelib�platlibrr�false�truer�r�r�r�r�r(�%s.datar�)r��headers�scriptsr�.exer��wb�
.dist-infoz(.dist-info directory expected, not found)z.pycz.pyo)r��	INSTALLER�SHAREDr�zWheel-Version: %d.%dzGenerator: distlib %szRoot-Is-Purelib: %szTag: r�r�
c�H�|d}|jd�}d|vr|dz
}||fS)NrrFri')�count)�tr�ns   rC�sorterzWheel.build.<locals>.sorter�s2���1��B�����
�A��r�!��U�
���r�7�NrE)�key)$r�r�IMPVER�ABI�ARCHr��getr�r�r�rar�rOrb�isdir�walkr
r>�relpathrr9�endswithr�r�r�r�	enumerate�listdir�
wheel_versionrr��sortedr	r�r�r)"rlrr�r2�libkey�is_pure�
default_pyver�default_abi�default_archrr��data_dirr�rr'rb�root�dirs�filesr�r�rprrr�rr��dnr�r�r�r�r&rps" `                                rC�buildzWheel.buildksO���
�<��D��f�1�3I�J�K�A�N���Y���G�#�H�M��%�K� �6�L��G�"�G�M�!�(�K�!�7�L��X�X�g�}�5��
��8�8�E�;�/����H�H�V�\�2��	��v���"�i�i����6���x�'��!�H�,���
�2�C��%�����:�D��w�w�}�}�T�"�)+�����%�D�$��#��$�R�W�W�\�\�$��%;�<���W�W�_�_�Q��5��%�b�g�g�l�l�8�S�"�&E�F��%�,�,�b�!�W�5��)�+�A�J�J�v�4F�!%�a���!�'(�v�v�x��"/�#'�#7�#7��#=�D�!%�a���!� !����
�"/��$�*7�2�(����!#������D�$���t�|�'�t�_�E�A�r�!�"��B��{�{�<�0�#%�7�7�<�<��b�#9�� ��G��-� �K�!K�K�x����B�<�(�(�)9�:���G�G�L�L��r�*���b�g�g�o�o�a��6�7���$�$�b�!�W�-�
�"/�*�
�
�8�$���B��C�C��R�W�W�\�\�(�B�7�8���b�g�g�l�l�8�R�8�9���$�$�b�!�W�-�	�
#�m�&I�t�7I�7I�J�#�k�1�!�G�+�
��
!%�	�	��E�3���!�!�U�C��"F�G�!*��G�G�L�L��7�+��
�!�S�\�Q�
�G�G�D�I�I�n�-�.��
�b�g�g�l�l�8�W�5�
6�����b�!�W�%�	��}�&�9�
�	
���H�h�/���G��7�7�<�<����d�m�m�<�����x��/���K"/���"/���V�\�s$�:S'	�0S4	�!T�'S1
�4S>
�T
c�$�|jd�S)zl
        Determine whether an archive entry should be skipped when verifying
        or installing.
        )rFz/RECORD.jws)r/)rl�arcnames  rC�
skip_entryzWheel.skip_entry�s����� 4�5�5rEc	��|j}|jd�}|jdd�}|jdd�}tjj	|j
|j�}|j�d|j��}	d|	z}
d|	z}tj|t�}tj|d�}
tj|d	�}tjd
�}t|d�5}|j|
�5}||�}t|�}ddd�d
j!dd�}t#|D�cgc]
}t%|���c}�}||j&k7r|r||j&|�|ddk(r|d}n|d}i}|j|�5}t)|��5}|D]}|d}|||<�	ddd�ddd�tj|
d�}tj|d�}tj|
dd�}t+|��} d| _t.j0}!g}"t3j4�}#|#|_d|_	|j;�D�]�}$|$j}%t=|%t>�r|%}&n|%jAd
�}&|jC|&�r�F||&}|dr)tE|$jF�|dk7rtId|&z��|drj|dj!dd�\}'}(|j|%�5}|jK�})ddd�|jM)|'�\}*}+|+|(k7rtId|%z��|r+|&jO||f�rtPjSd|&���|&jO|�xr|&jUd�},|&jO|�rC|&j!d d�\}*}-}.tjj	||-tW|.��}/n1|&|
|fvr���tjj	|tW|&��}/|,�s	|j|%�5}| jY||/�ddd�tjd!k(r&tjZ|/|$j\d"z	d#z�|"j_|/�|sS|drNt|/d$�5}|jK�})|jM|)'�\}*}0|0+k7rtId%|/z��	ddd�|!s���|/jUd&�s���	| ja|/|�'�}1|"j_|1����tjjgtW|%��}2tjj	|#|2�}3|j|%�5}| jY||3�ddd�tjj!|/�\}4}2|4|_|ji|2�}5| jk|5�|"jm|5����|rtPjSd*�d}6�n�d}7|jnd
}|d+k(r�tj|d,�}8	|j|8�5}tq|�}9ddd�i}7d-D]�}:d.|:z};|;9vs�
ix|7d/|:z<}<|9|;js�D]Y}=|=jt�d0|=jv��}>|=jxr!|>d1d2j	|=jx�zz
}>|>|<|=j<�[��nZ	|j|�5}||�}t{j||�jd4�}7|7r|7jd5�}7ddd�|7r�|7jd7i�}?|7jd8i�}@|?s@r�|jdd�}Atjj|A�st�d9��A|_|?j��D].\};}=|;�d:|=��}B|ji|B�}5| jk|5��0@rFd;di}C@j��D]/\};}=|;�d:|=��}B|ji|BC�}5| jk|5��1tjj	||�}t�|�}6t�|�}|d=|d=||d<<|6j�||�}|r|"j_|�|6j�|"|d=|�|6t�j�|#�cddd�S#1swY���xYwcc}w#1swY��DxYw#1swY��IxYw#1swY���xYw#1swY���xYw#1swY��GxYw#tb$rtPjed(d�)�Y���wxYw#1swY���xYw#1swY��
xYw#tb$rtPjed3�Y��GwxYw#1swY��UxYw#tb$rtPjed6�Y��ywxYw#tb$r'tPj�d>�| j���wxYw#t�j�|#�wxYw#1swYyxYw)?a~
        Install a wheel to the specified paths. If kwarg ``warner`` is
        specified, it should be a callable, which will be called with two
        tuples indicating the wheel version of this software and the wheel
        version in the file, if there is a discrepancy in the versions.
        This can be used to issue any warnings to raise any exceptions.
        If kwarg ``lib_only`` is True, only the purelib/platlib files are
        installed, and the headers, scripts, data and dist-info metadata are
        not written. If kwarg ``bytecode_hashed_invalidation`` is True, written
        bytecode will try to use file-hash based invalidation (PEP-552) on
        supported interpreter versions (CPython 2.7+).

        The return value is a :class:`InstalledDistribution` instance unless
        ``options.lib_only`` is True, in which case the return value is ``None``.
        �warner�lib_onlyF�bytecode_hashed_invalidationr(rr�r�r�r�r�Nr�r*rzRoot-Is-Purelibrrr��streamrr6r)�dry_runTr&�size mismatch for %s�=�digest mismatch for %szlib_only: skipping %srrF�posix�i�r�zdigest mismatch on write for %sz.py)�hashed_invalidationzByte-compilation failed)�exc_infozlib_only: returning Nonez1.0zentry_points.txt)�console�guiz
%s_scriptszwrap_%s�:z [%s]�,zAUnable to read legacy script metadata, so cannot generate scriptsrqzpython.commandsz8Unable to read JSON metadata, so cannot generate scripts�wrap_console�wrap_guizValid script path not specifiedz = rR�lib�prefixzinstallation failed.)JrIr+rOrbr>r�r�rar�r�rr�r�r	r�rr�r�r�r2rr�recordr;�dont_write_bytecode�tempfile�mkdtemp�
source_dir�
target_dir�infolist�
isinstancerr�rB�str�	file_sizerr�r��
startswithrrr/r�copy_stream�chmod�
external_attrr9�byte_compile�	Exception�warning�basename�make�set_executable_mode�extendr�r�valuesrX�suffix�flags�json�loadr,r��itemsr
r��write_shared_locations�write_installed_files�shutil�rmtree�	exception�rollback)Drlr�maker�kwargsrIrDrE�bc_hashed_invalidationrpr�r9r��
metadata_name�wheel_metadata_name�record_namer�r��bwfr�r�r�r�r�rr�r��readerr�r�data_pfx�info_pfx�
script_pfx�fileop�bc�outfiles�workdir�zinforA�	u_arcname�kind�valuer�r)r��	is_script�wherer=�outfile�	newdigest�pycr��worknamer>�	filenames�dist�commands�ep�epdatar'rur.rvrW�console_scripts�gui_scripts�
script_dir�script�optionssD                                                                    rC�installz
Wheel.install�s[	��"�-�-�����H�%���:�:�j�%�0��!'���,J�E�!R���7�7�<�<����d�m�m�<��"�i�i����6���x�'��!�H�,��!���x�1I�J�
�'�n�n�X�w�?���n�n�X�x�8���"�"�7�+��
�X�s�
#�r����,�-���S�\��+�B�/��.���)�/�/��Q�7�B� �"�!5�"�Q�#�a�&�"�!5�6�L��� 2� 2�2���t�)�)�<�8��(�)�V�3��y�)���y�)���G�����%���b�)�V�%����F��%(���
� &�*�&�!�~�~�h��3�H� �~�~�h��3�H�"����)�R�@�J�"�'�2�F� �F�M��,�,�,�B��H��&�&�(�G� '�E��#�E��a
'��[�[�]�E�#�n�n�G�!�'�9�5�$+�	�$+�N�N�7�$;�	����y�1� �!�)�,�C��1�v�#�e�o�o�"6�#�a�&�"@�.�04�6?�0@�A�A��1�v�&)�!�f�l�l�3��&:���e��W�W�W�-��#%�7�7�9�D�.�$(�M�M�$��$=�	��6�!�U�?�"2�48�:A�4B�#C�C� �I�$8�$8�(�H�9M�$N����%<�i�H� �!*�!5�!5�j�!A�"D�)2�);�);�F�)C�%C��!�+�+�H�5�'0���s�A�'>���5�"�"$�'�'�,�,�u�U�|�\�"�=M�"N��%�)<�k�(J�J�$�"$�'�'�,�,�v�|�I�7N�"O��$��W�W�W�-��"�.�.�r�7�;�.��7�7�g�-��H�H�W�u�/B�/B�b�/H�E�.Q�R� ����0�&�3�q�6�!%�g�t�!4��')�w�w�y��/3�}�}�T�4�/H���9�#,��#6�*:�<@�BI�<J�+K�%K�$7�"5��'�"2�"2�5�"9�>�&,�&9�&9�'�Nd�':�'f�� (���� 4� �W�W�-�-�l�7�.C�D��#%�7�7�<�<���#<���W�W�W�-��"�.�.�r�8�<�.�"$�����w�!7���B�+-��(�$)�J�J�r�N�	��2�2�9�=� ���	�2�W+�Z��L�L�!;�<��D� $�H�#'�9�9�_�#=�L�#�u�,�&�^�^�H�6H�I��6�!#������)5�c�):��"-�')�H�'9��$0�3�$6��#$��;�DF�$F�H�Y��_�$=��-3�A�Y�-=�-=�-?��78�x�x����,J��+,�7�7�,-��3�8�8�A�G�G�;L�1L�,L�A�45��!�&�&�	�	.@�	(:�F�!#����!7�3�%,�S�\��+/�9�9�R�=�+<�+<�\�+J��#+�/7�|�|�<M�/N�H�	"8� �*2�,�,�~�r�*J��&.�l�l�:�r�&B��*�k�).���9�b�)A�J�#%�7�7�=�=��#<�&0�2=�'>�!>�/9�E�,�(7�(=�(=�(?���1�67��);��,1�J�J�v�,>�	� &� :� :�9� E�)@�
 +�+0�$�.��,7�,=�,=�,?�D�A�q�:;�Q�-?�F�05�
�
�6�7�0K�I�$*�$>�$>�y�$I�-@�
�����V�X�6�A�0��3�D�!��K�E��i�(��i�(�#)�E�%�L��3�3�E�7�C�A�� ����*��.�.�x��x��/6�8���
�
�g�&�U$�
#�-�-��"6�*�)��&�%��R.�-��,.�-��"5�!4��$-�>�!'���/H�8<�!/�!>�>��.�-��0"-��� )�6�"�N�N�,5�6�6��"8�!7��
 )�F�"�N�N�,E�F�F��P�
�� � �!7�8����!��
��
�
�
�g�&��U$�
#�s��h9�d�(&h9�d
� Ah9�1
d �>d�d �Bh9�-B7g,�$d-�5Dg,�d:�#A%g,�9e�
g,�g,�"$e�Ag,�!e;�4B.g,�#f�4f�f�A;f�g,�g�'Af:�'g�/E3g,�"h9�d	�
h9�d�d � d*	�%h9�-d7�2g,�:e�?g,�e�g,� e8�4g,�7e8�8g,�;f�g,�f	�
f�f7�3g,�6f7�7g,�:g	�?g�g)�%g,�(g)�)g,�,0h�h�h6�6h9�9ic��t�Qtjjt	�td�dtjddz�}t|�atS)Nzdylib-cachez%s.%sr&)	�cacherOrbr>rrar;r<r)rl�bases  rC�_get_dylib_cachezWheel._get_dylib_cache�sI���=��7�7�<�<�� 0�#�m�2D� '�#�*:�*:�2�A�*>� >�@�D��$�K�E��rEc	���tjj|j|j�}|j
�d|j��}d|z}tj|d�}tjd�}g}t|d�5}	|j|�5}||�}	tj|	�}
|j�}|j|�}tjj|j |�}
tjj#|
�stj$|
�|
j'�D]�\}}tjj|
t)|��}tjj+|�sd}nptj,|�j.}t0j0j3|�}|j5|�}t1j0|j6�}||kD}|r|j9||
�|j;||f���	ddd�ddd�|S#1swY�xYw#t<$rY�!wxYw#1swY|SxYw)Nr(r��
EXTENSIONSr�r�T)rOrbr>r�r�rar�r�r�r�r	r�rqrrr��
prefix_to_dirr�r,�makedirsrsrr��stat�st_mtime�datetime�
fromtimestamp�getinfo�	date_time�extractr9r�)rlrpr�r�rAr�rzr�r�r�rqr�rX�
cache_baserar.�destr��	file_timer��
wheel_times                     rC�_get_extensionszWheel._get_extensions�s����7�7�<�<����d�m�m�<��"�i�i����6��!�H�,���.�.��<�8���"�"�7�+����
�X�s�
#�r�
��W�W�W�%�� ���B�!%���2��J� �1�1�3�E�"�0�0��:�F�!#�����e�j�j�&�!A�J��7�7�=�=��4����J�/�)3�)9�)9�);�
��g�!�w�w�|�|�J��W�8M�N��!�w�w�~�~�d�3�&*�G�(*����
�(>�(>�I�(0�(9�(9�(G�(G�	�(R�I�#%�:�:�g�#6�D�)1�):�):�D�N�N�)K�J�&0�9�&<�G�"��J�J�w�
�;��
�
�t�T�l�3�*<�&�$�2�
�/&�%��*�
��
��/$�2�
�sC�I&�I�!FI�9I�I	�I�	I#� I&�"I#�#I&�&I0c��t|�S)zM
        Determine if a wheel is compatible with the running system.
        )�
is_compatiblerks rCr�zWheel.is_compatibles���T�"�"rEc��y)zP
        Determine if a wheel is asserted as mountable by its metadata.
        TrIrks rC�is_mountablezWheel.is_mountable
s��rEc��tjjtjj|j|j
��}|j
�sd|z}t|��|j�sd|z}t|��|tjvrtjd|�y|r tjj|�n tjjd|�|j�}|rPttj vr#tj jt�tj#||�yy)Nz)Wheel %s not compatible with this Python.z$Wheel %s is marked as not mountable.z%s already in pathr)rOrbr�r>r�r�r�rr�r;rrr9�insertr��_hook�	meta_pathrr)rlr9rp�msgrqs     rC�mountzWheel.mounts����7�7�?�?�2�7�7�<�<����d�m�m�#L�M���!�!�#�=��H�C�"�3�'�'�� � �"�8�8�C�C�"�3�'�'��s�x�x���L�L�-�x�8��������)�������8�,��-�-�/�J����
�
�-��M�M�(�(��/��	�	�(�J�/�rEc��tjjtjj|j|j
��}|tjvrtjd|�ytjj|�|tjvrtj|�tjs;ttjvr$tjjt�yyy)Nz%s not in path)
rOrbr�r>r�r�r;rrrwr�rir�)rlrps  rC�unmountz
Wheel.unmount(s����7�7�?�?�2�7�7�<�<����d�m�m�#L�M���3�8�8�#��L�L�)�8�4��H�H�O�O�H�%��5�.�.�.����X�&��&�&��C�M�M�)��M�M�(�(��/�*�'rEc	��tjj|j|j�}|j
�d|j��}d|z}d|z}tj|t�}tj|d�}tj|d�}tjd�}t|d�5}	|	j|�5}
||
�}t|�}ddd�djd	d
�}
t|
D�cgc]
}t!|���c}�}i}|	j|�5}t#|��5}|D]}|d}|||<�	ddd�ddd�|	j%�D�]
}|j}t'|t(�r|}n|j+d�}|jd
�}d|vrt-d|z��|j/|�r�i||}|dr)t1|j2�|dk7rt-d|z��|d
s��|d
jdd
�\}}|	j|�5}|j5�}ddd�|j7|�\}}||k7s��t-d|z��	ddd�y#1swY���xYwcc}w#1swY��LxYw#1swY��QxYw#1swY�ixYw#1swYyxYw)Nr(rr�r�r�r�r�r�r*rrGrrF�..�invalid entry in wheel: %rr&rJrKrL)rOrbr>r�r�rar�r�rr�r�r	r�rr�r�r�rr_r`rr�rrBrarbr�r�)rlrpr�r9r�r}r~rr�r�r�r�r�r�r�r�r�r�r�r�rr�rAr�r�r�r�r)r�s                             rCr�zWheel.verify4s����7�7�<�<����d�m�m�<��"�i�i����6���x�'��!�H�,��!���x�1I�J�
�'�n�n�X�w�?���n�n�X�x�8���"�"�7�+��
�X�s�
#�r����,�-���S�\��+�B�/��.���)�/�/��Q�7�B� �"�!5�"�Q�#�a�&�"�!5�6�L��G�����%���b�)�V�%����F��%(���
� &�*�&�������.�.���g�y�1� '�I� '���w� 7�I��O�O�C�(���1�9�*�,7�9B�,C�D�D��?�?�9�-���i�(���q�6�c�%�/�/�2�c�!�f�<�*�,0�2;�,<�=�=��q�6�"%�a�&�,�,�s�A�"6�K�D�%�����)�R�!�w�w�y��*� $�
�
�d�D� 9�I�A�v����.�04�6=�0>�?�?�5'�$�
#�-�-��"6�
*�)��&�%��8*�)��K$�
#�s��K	�J�'&K	�
J
�K	�9
J0�J#�J0�!B9K	�)K	�J=�"K	�8K	�J	�
K	�#J-�(J0�0J:	�5K	�=K�K	�	Kc	��d�}d�}tjj|j|j�}|j
�d|j��}d|z}tj|d�}	t�5}
t|d�5}i}|j�D]�}
|
j}t|t�r|}n|jd�}||	k(r�9d|vrtd	|z��|j|
|
�tjj|
t!|��}|||<��	d
d
d
�||�\}}||fi|��}|�r |||�\}}|r||k(r	|||�|�1t#j$dd|
�
�\}}tj&|�nWtjj)|�std|z��tjj||j�}t+|j-��}tjj|
|�}||f}|j/||
|�|j1||�|�t3j4||�d
d
d
�|S#1swY��LxYw#1swYSxYw)a�
        Update the contents of a wheel in a generic way. The modifier should
        be a callable which expects a dictionary argument: its keys are
        archive-entry paths, and its values are absolute filesystem paths
        where the contents the corresponding archive entries can be found. The
        modifier is free to change the contents of the files pointed to, add
        new entries and remove entries, before returning. This method will
        extract the entire contents of the wheel to a temporary location, call
        the modifier, and then use the passed (and possibly updated)
        dictionary to write a new wheel. If ``dest_dir`` is specified, the new
        wheel is written there -- otherwise, the original wheel is overwritten.

        The modifier should return True if it updated the wheel, else False.
        This method returns the same value the modifier returns.
        c�x�dx}}|�dt��}||vrd|z}||vr||}t|��j}||fS)NrFz%s/PKG-INFO�rb)rrr�)�path_mapr�r�rbr's     rC�get_versionz!Wheel.update.<locals>.get_version}sS��!�!�G�d�%�'?�@�C��(�"�#�h�.���h����}��"��-�5�5���D�=� rEc�
�d}	t|�}|jd�}|dkrd|z}nZ||dzdjd�D�cgc]
}t|���}}|dxxdz
cc<|d|�ddj	d�|D����}|rSt|�
�}||_	|jt�}|j||��tjd||�yycc}w#t
$rtjd	|�Y�|wxYw)
Nr(rz%s+1rr*r��+c3�2K�|]}t|����y�wrH)ra)�.0r�s  rC�	<genexpr>z7Wheel.update.<locals>.update_version.<locals>.<genexpr>�s����1H�%�Q�#�a�&�%�s�z0Cannot update non-compliant (PEP-440) version %rr�)rb�legacyzVersion updated from %r to %r)
rr�r�r�r>rrrrr�r/rr)	r�rb�updatedrvr�rWr?�mdr�s	         rC�update_versionz$Wheel.update.<locals>.update_version�s
���G�
4�%�g�.���L�L��%���q�5�$�w�.�G�-4�Q��U�V�_�-B�-B�3�-G�H�-G��S��V�-G�E�H��"�I��N�I�)0��!��),���1H�%�1H�)H�J�G�
��4�(��$��
����'?�@�����d�6��2����<�g�$�&���I��+�
4����*�+2�4�
4�s$�AC �C�/C �C � D�Dr(r�r�r�r�r�r�Nr�z
wheel-update-)rorX�dirzNot a directory: %r)rOrbr>r�r�rar�r�rr	r_r`rr�rr�rr[�mkstemp�closer,r�rsr	rrv�copyfile)rl�modifier�dest_dirr{r�r�rpr�r�rr�r�r�r�rAr�rb�original_versionr)�modified�current_version�fd�newpathrrr�s                          rCrozWheel.updatelsH��"	!�	&�.�7�7�<�<����d�m�m�<��"�i�i����6��!�H�,���n�n�X�x�8��
�Y�'���3�'�2����[�[�]�E�#�n�n�G�!�'�9�5�$+�	�$+�N�N�7�$;�	� �K�/� ��y�(�.�0;�=F�0G�H�H��J�J�u�g�.��7�7�<�<���i�1H�I�D�*.�H�Y�'�+�(�$#.�h��"A���a���3�F�3�H��(3�H�h�(G�%���"��;K�(K�"�?�D�9��#�"*�"2�"2�&�:I�7>�#@�K�B���H�H�R�L��7�7�=�=��2�.�/D�x�/O�P�P� �g�g�l�l�8�T�]�]�C�G� $�X�^�^�%5� 6�
��7�7�<�<���:����)���"�"�4��-�@����w�
�6��#��O�O�G�X�6�Y�Z��Y(�'���Z��s&�;
J�B I3�)EJ�3I=	�8J�J
)NFFrH)NN)F)r�r�r��__doc__r2r�rm�propertyr�r�r�rr�r�r�r�r�r�r	rr?rBr�r�r�r�r�r�r�r�rorIrErCr�r��s�����M��I�'2�R�;��;� �$��$��+��+�����>������<	!�%�&�  �r�h6� k'�Z� �D#��0�*
0�6?�pcrEr�c���ddl}|j�}g}|ddk(rP|djd�D].}|j|j	�rt|�nd��0t
|�}|S)Nr�glibcrr*)�platform�libc_verr�r9�isdigitr�r�)r��verrzrWs    rC�_get_glibc_versionr��sc���
�
�
�
�C�
�F�
�1�v����Q����c�"�A��M�M�A�I�I�K�#�a�&�Q�7�#��v����MrEc�b�tg}td}ttjddz
dd�D]-}|j	dj|t
|�g���/g}t�D]8}|jd�s�|j	|jdd�d��:|j�tdk7r|jdt�|j	d�g}tg}tjd	k(r�tj d
t�}|r�|j#�\}}}}	t%|�}|	g}
|	dvr|
j	d�|	d
vr|
j	d�|	dvr|
j	d�|	dvr|
j	d�|	dvr|
j	d�|dk\r:|
D]*}|�d|�d|�d|��}|tk7s�|j	|��,|dz}|dk\r�:|D�]`}
|D�]W}	|j	djt&|df�|
|	f�|
dk7s�6tjjd�s�V|	j)dd�}	t+�}t-|�dk(s��|dk\r/|j	djt&|df�|
d|	zf�|dk\r/|j	djt&|df�|
d|	zf�|dk\r/|j	djt&|df�|
d|	zf�|j	djt&|df�|
d|d�d|d�d|	��f���Z��ct/|�D]`\}}|j	djt&|f�ddf�|dk(s�5|j	djt&|df�ddf��bt/|�D]X\}}|j	djd |f�ddf�|dk(s�1|j	djd |df�ddf��Zt1|�S)!zG
    Return (pyver, abi, arch) tuples compatible with this Python.
    rrr�r6z.abir*r&r��darwinz(\w+)_(\d+)_(\d+)_(\w+)$)�i386�ppc�fat)r�r��x86_64�fat3)�ppc64r��fat64)r�r��intel)r�r�r�r�r��	universalr)�linux�linux_)r&�z
manylinux1_%s)r&�zmanylinux2010_%s)r&�zmanylinux2014_%s�
manylinux_r�r')r7�ranger;r<r9r>rarXrcr��sortr)r�r*r��rer�r�r�r:rNr�r�r0�set)�versions�major�minor�abisrorz�archesr2rar��matchesr�rWr�r?r�r�s                 rC�compatible_tagsr��s����|�H��q�M�E��s�'�'��*�Q�.��R�8����������E�
� 3�4�5�9��D��/�����V�$��K�K����S�!�,�Q�/�0�"�	�I�I�K�
�f�}����A�s���K�K���
�F��V�F�
�|�|�x���H�H�0�$�7���'(�x�x�z�$�D�%�����J�E��f�G���&����u�%��0�0����v�&��*�*����w�'��)�)����w�'��B�B����{�+��1�*�$�E�)-�u�e�U�C�A��D�y��
�
�a�(�%���
���1�*����D��M�M�2�7�7�J����#<�=�s�D�I�J��f�}����!8�!8��!A��|�|�H�b�1��*�,���u�:��?�����
�
�r�w�w�
�H�Q�K�/H�'I�3�'6��'=�'?�@���'��
�
�r�w�w�
�H�Q�K�/H�'I�3�'9�D�'@�'B�C���'��
�
�r�w�w�
�H�Q�K�/H�'I�3�'9�D�'@�'B�C��M�M�2�7�7�J����+D�#E�s�;@��8�U�1�X�;?�$A�#B�C�!��, ��)�
��7��
�
�r�w�w�
�G�4�5�v�u�E�F���6��M�M�2�7�7�J���
�#;�<�f�e�L�M�*� ��)�
��7��
�
�r�w�w��g��/���?�@���6��M�M�2�7�7�D�'�!�*�#5�6���F�G�*�
�v�;�rEc���t|t�st|�}d}|�t}|D]7\}}}||jvs�||jvs�%||j
vs�4d}|S|S)NFT)r`r��COMPATIBLE_TAGSr�r�r�)�wheelr�rzr�r�r�s      rCr�r�0sj���e�U�#��e���
�F��|������S�$��%�+�+��#����"2�t�u�z�z�7I��F���M�	��MrErH)Z�
__future__rr�r�r��emailrr�rq�loggingrOr�r�rvr;r[rr6rr�compatrr	r
rr�databaser
r�rrrrr[rrrrrrrrrrr�rr�	getLoggerr�rr��hasattrr:r�rcr8r7r<r�r(rNr*r)r�rD�compile�
IGNORECASE�VERBOSEr�r�r�r�r�r�rPrrR�importlib.machineryrT�importlib.utilrXre�objectrgr�r�r�r�rr�rIrErC�<module>rsh��(�
�
��#����	��	�
�
���+�C�C�+�1�1�!�!�!�@�	��	�	�8�	$����
�3�#�$��J��\�\���V�$��J��\�\�U���J��J�
%�Y�
%�
%�&8�
9�
���#�*�*�2�A�.�.�J��z���	�j�	 ���~���c�3�'�/�/��S�9���i���w�'���3�>�>�*�%�

�+�+�j�$�
'�
-�
-�c�
2�1�
5�C��"�-�C���b�j�j���]�]�R�Z�Z��!���"�*�*���]�]�R�Z�Z��	!���R�Z�Z�)�
*�
��B�J�J�@�A�������6�6�S�=��H�/�H����A�����
�C���6�	�!�f�!�F	�	��h�F�h�T�M�`"�#���
rEpython3.12/site-packages/pip/_vendor/distlib/__pycache__/database.cpython-312.pyc000064400000200213151732701630023451 0ustar00�

R`i������dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
mZddlmZddlmZmZddlmZmZmZmZdd	lmZmZmZmZmZmZm Z gd
�Z!ejDe#�Z$dZ%dZ&d
eddde%dfZ'dZ(Gd�de)�Z*Gd�de)�Z+Gd�de)�Z,Gd�de,�Z-Gd�de-�Z.Gd�de-�Z/e.Z0e/Z1Gd�d e)�Z2d%d!�Z3d"�Z4d#�Z5d$�Z6y)&zPEP 376 implementation.�)�unicode_literalsN�)�DistlibException�	resources)�StringIO)�
get_scheme�UnsupportedVersionError)�Metadata�METADATA_FILENAME�WHEEL_METADATA_FILENAME�LEGACY_METADATA_FILENAME)�parse_requirement�cached_property�parse_name_and_version�read_exports�
write_exports�	CSVReader�	CSVWriter)�Distribution�BaseInstalledDistribution�InstalledDistribution�EggInfoDistribution�DistributionPathzpydist-exports.jsonzpydist-commands.json�	INSTALLER�RECORD�	REQUESTED�	RESOURCES�SHAREDz
.dist-infoc�"�eZdZdZd�Zd�Zd�Zy)�_CachezL
    A simple cache mapping names and .dist-info paths to distributions
    c�.�i|_i|_d|_y)zZ
        Initialise an instance. There is normally one for each DistributionPath.
        FN)�name�path�	generated��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/database.py�__init__z_Cache.__init__1s����	���	����c�z�|jj�|jj�d|_y)zC
        Clear the cache, setting it to its initial state.
        FN)r"�clearr#r$r%s r'r+z_Cache.clear9s'��	
�	�	�����	�	������r)c���|j|jvrO||j|j<|jj|jg�j	|�yy)z`
        Add a distribution to the cache.
        :param dist: The distribution to add.
        N)r#r"�
setdefault�key�append�r&�dists  r'�addz
_Cache.addAsN��
�9�9�D�I�I�%�#'�D�I�I�d�i�i� ��I�I� � ����2�.�5�5�d�;�&r)N)�__name__�
__module__�__qualname__�__doc__r(r+r2�r)r'r r -s�����<r)r c�z�eZdZdZdd�Zd�Zd�Zeee�Zd�Z	d�Z
d�Zed	��Z
d
�Zd�Zdd�Zd
�Zdd�Zy)rzU
    Represents a set of distributions installed on a path (typically sys.path).
    Nc��|�tj}||_d|_||_t	�|_t	�|_d|_td�|_	y)a�
        Create an instance from a path, optionally including legacy (distutils/
        setuptools/distribute) distributions.
        :param path: The path to use, as a list of directories. If not specified,
                     sys.path is used.
        :param include_egg: If True, this instance will look for and return legacy
                            distributions as well as those based on PEP 376.
        NT�default)
�sysr#�
_include_dist�_include_eggr �_cache�
_cache_egg�_cache_enabledr�_scheme)r&r#�include_eggs   r'r(zDistributionPath.__init__OsO���<��8�8�D���	�!���'����h��� �(���"���!�)�,��r)c��|jS�N�r@r%s r'�_get_cache_enabledz#DistributionPath._get_cache_enabledcs���"�"�"r)c��||_yrDrE)r&�values  r'�_set_cache_enabledz#DistributionPath._set_cache_enabledfs
��#��r)c�l�|jj�|jj�y)z,
        Clears the internal cache.
        N)r>r+r?r%s r'�clear_cachezDistributionPath.clear_cacheks$��	
�����������r)c#��K�t�}|jD�]�}tj|�}|��|j	d�}|r|j
s�<t
|j�}|D�]�}|j	|�}|r|j|vr�&	|jr�|jt�r�tttg}|D]-}tj||�}	|j	|	�}
|
s�-n��tj |
j#��5}t%|d��}ddd�t&j)d|j�|j+|j�t-|j|����np|j.rd|jd�rSt&j)d|j�|j+|j�t1|j|���������y#1swY��xYw#t2$rT}
d}t&j5||j|
�d	dl}|j9||j|
fzd
��Yd}
~
���d}
~
wwxYw�w)zD
        Yield .dist-info and/or .egg(-info) distributions.
        N��legacy��fileobj�schemezFound %s)�metadata�env)�	.egg-info�.eggzBUnable to read distribution at %s, perhaps due to bad metadata: %sr�)�
stacklevel)�setr#r�finder_for_path�find�is_container�sortedr<�endswith�DISTINFO_EXTrrr
�	posixpath�join�
contextlib�closing�	as_streamr
�logger�debugr2�new_dist_classr=�old_dist_class�	Exception�warning�warnings�warn)r&�seenr#�finder�r�rset�entry�possible_filenames�metadata_filename�
metadata_path�pydist�streamrR�e�msgrjs                r'�_yield_distributionsz%DistributionPath._yield_distributionsss������u���I�I�D��.�.�t�4�F��~�����B��A��A�N�N���!�+�+�&�D����K�K��&���A�F�F�d�N��C��)�)�e�n�n�\�.J�.?�.E�.F�.H�*�2D�-�,5�N�N�5�BS�,T�M�%+�[�[��%?�F�%� %�	2D�%�'�/�/��0@�0@�0B�C�v�'/��x�'P�H�D����Z����8�������(�,�Q�V�V�h�15�7�7��*�*�u�~�~�?F�0G����Z����8�������(�,�Q�V�V�T�:�:��7��2D�C��!�C�^�C��N�N�3�����2�#��M�M�#������"3��M�B�B��	C�s]�BI*�A H
�4H
�7I*�8#H
�G>�)CH
�7I*�>H�H
�
	I'�A	I"�I*�"I'�'I*c��|jj}|jxr|jj}|s|r�|j	�D]I}t|t�r|jj|��/|jj|��K|rd|j_|rd|j_yyy)zk
        Scan the path for distributions and populate the cache with
        those that are found.
        TN)r>r$r=r?rx�
isinstancerr2)r&�gen_dist�gen_eggr1s    r'�_generate_cachez DistributionPath._generate_cache�s���
�{�{�,�,�,���#�#�E�D�O�O�,E�,E�(E���w��1�1�3���d�$9�:��K�K�O�O�D�)��O�O�'�'��-�	4��(,����%��,0����)��r)c�Z�|jdd�}dj||g�tzS)ao
        The *name* and *version* parameters are converted into their
        filename-escaped form, i.e. any ``'-'`` characters are replaced
        with ``'_'`` other than the one in ``'dist-info'`` and the one
        separating the name from the version number.

        :parameter name: is converted to a standard distribution name by replacing
                         any runs of non- alphanumeric characters with a single
                         ``'-'``.
        :type name: string
        :parameter version: is converted to a standard version string. Spaces
                            become dots, and all other non-alphanumeric characters
                            (except dots) become dashes, with runs of multiple
                            dashes condensed to a single dash.
        :type version: string
        :returns: directory name
        :rtype: string�-�_)�replacer`r^)�clsr"�versions   r'�distinfo_dirnamez!DistributionPath.distinfo_dirname�s,��&�|�|�C��%���x�x��w��(�<�7�7r)c#�FK�|js|j�D]}|���y|j�|jjj�D]}|���|jr.|jjj�D]}|���yy�w)a5
        Provides an iterator that looks for distributions and returns
        :class:`InstalledDistribution` or
        :class:`EggInfoDistribution` instances for each one of them.

        :rtype: iterator of :class:`InstalledDistribution` and
                :class:`EggInfoDistribution` instances
        N)r@rxr}r>r#�valuesr=r?r0s  r'�get_distributionsz"DistributionPath.get_distributions�s������"�"��1�1�3���
�4�
� � �"����(�(�/�/�1���
�2�� � � �O�O�0�0�7�7�9�D��J�:�!�s�BB!c��d}|j�}|js+|j�D]}|j|k(s�|}|S|S|j	�||j
jvr|j
j|d}|S|jr4||jjvr|jj|d}|S)a=
        Looks for a named distribution on the path.

        This function only returns the first result found, as no more than one
        value is expected. If nothing is found, ``None`` is returned.

        :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
                or ``None``
        Nr)	�lowerr@rxr.r}r>r"r=r?)r&r"�resultr1s    r'�get_distributionz!DistributionPath.get_distribution�s������z�z�|���"�"��1�1�3���8�8�t�#�!�F���
�4��
�

� � �"��t�{�{�'�'�'����)�)�$�/��2���
��"�"�t�t���/C�/C�'C����-�-�d�3�A�6���
r)c#�K�d}|�"	|jj|�d|�d��}|j	�D]q}t|d�stjd|��&|j}|D];}t|�\}}|�||k(s�|���S||k(s�%|j|�s�7|���q�sy#t$rtd|�d|����wxYw�w)a
        Iterates over all distributions to find which distributions provide *name*.
        If a *version* is provided, it will be used to filter the results.

        This function only returns the first result found, since no more than
        one values are expected. If the directory is not found, returns ``None``.

        :parameter version: a version specifier that indicates the version
                            required, conforming to the format in ``PEP-345``

        :type name: string
        :type version: string
        N� (�)zinvalid name or version: �, �provideszNo "provides": %s)rA�matcher�
ValueErrorrr��hasattrrdrer�r�match)	r&r"r�r�r1�provided�p�p_name�p_vers	         r'�provides_distributionz&DistributionPath.provides_distribution�s���������
7��,�,�.�.�D�'�/J�K��
�*�*�,�D��4��,����0�$�7��=�=��!�A�$:�1�$=�M�F�E���!�T�>�"&�J�!�!�T�>�g�m�m�E�.B�"&�J�!�"�-��	�
7�&�'+�W�(6�7�7�
7�s.�C�!B.�AC�C�C�$
C�.C	�	Cc�f�|j|�}|�td|z��|j|�S)z5
        Return the path to a resource file.
        zno distribution named %r found)r��LookupError�get_resource_path)r&r"�
relative_pathr1s    r'�
get_file_pathzDistributionPath.get_file_path's;���$�$�T�*���<��>��E�F�F��%�%�m�4�4r)c#�K�|j�D]@}|j}||vs�||}|�
||vs� ||���(|j�D]}|����By�w)z�
        Return all of the exported entries in a particular category.

        :param category: The category to search for entries.
        :param name: If specified, only entries with that name are returned.
        N)r��exportsr�)r&�categoryr"r1rn�d�vs       r'�get_exported_entriesz%DistributionPath.get_exported_entries0s_�����*�*�,�D����A��1�}��h�K���#��q�y���g�
��X�X�Z����(�-�s�$A�A�$A)NFrD)r3r4r5r6r(rFrI�property�
cache_enabledrKrxr}�classmethodr�r�r�r�r�r�r7r)r'rrKse���-�(#�$��/�1C�D�M� �0C�d1�&�8��8�*�,�4'"�R5� r)rc���eZdZdZdZ	dZ	d�Zed��ZeZ	ed��Z
ed��Zd�Zed��Z
ed	��Zed
��Zed��Zed��Zd
�Zd�Zd�Zd�Zy)rz�
    A base class for distributions, whether installed or from indexes.
    Either way, it must have some metadata, so that's all that's needed
    for construction.
    Fc��||_|j|_|jj�|_|j|_d|_d|_d|_d|_t�|_
i|_y)z�
        Initialise an instance.
        :param metadata: The instance of :class:`Metadata` describing this
        distribution.
        N)rRr"r�r.r��locator�digest�extras�contextrX�
download_urls�digests)r&rRs  r'r(zDistribution.__init__Usb��!��
��M�M��	��9�9�?�?�$����'�'��������������� �U�����r)c�.�|jjS)zH
        The source archive download URL for this distribution.
        )rR�
source_urlr%s r'r�zDistribution.source_urlfs��
�}�}�'�'�'r)c�:�|j�d|j�d�S)zX
        A utility property which displays the name and version in parentheses.
        r�r��r"r�r%s r'�name_and_versionzDistribution.name_and_versionos��
!�I�I�t�|�|�4�4r)c��|jj}|j�d|j�d�}||vr|j	|�|S)z�
        A set of distribution names and versions provided by this distribution.
        :return: A set of "name (version)" strings.
        r�r�)rRr�r"r�r/)r&�plist�ss   r'r�zDistribution.providesvs<���
�
�&�&�����D�L�L�1���E�>��L�L��O��r)c���|j}t||�}tjd|j||�t|j
||j|j���S)Nz)%s: got requirements %r from metadata: %r)r�rS)	rR�getattrrdrer"rX�get_requirementsr�r�)r&�req_attr�md�reqtss    r'�_get_requirementszDistribution._get_requirements�s_��
�]�]����H�%�����@�$�)�)�X��	��2�&�&�u�T�[�[�+/�<�<�'�9�:�	:r)c�$�|jd�S)N�run_requires�r�r%s r'r�zDistribution.run_requires�����%�%�n�5�5r)c�$�|jd�S)N�
meta_requiresr�r%s r'r�zDistribution.meta_requires�����%�%�o�6�6r)c�$�|jd�S)N�build_requiresr�r%s r'r�zDistribution.build_requires�s���%�%�&6�7�7r)c�$�|jd�S)N�
test_requiresr�r%s r'r�zDistribution.test_requires�r�r)c�$�|jd�S)N�dev_requiresr�r%s r'r�zDistribution.dev_requires�r�r)c���t|�}t|jj�}	|j	|j
�}|j}d}|jD]*}t|�\}}	||k7r�	|j|	�}|S|S#t$r=tjd|�|j�d}|j	|�}Y��wxYw#t$rY��wxYw)z�
        Say if this instance matches (fulfills) a requirement.
        :param req: The requirement to match.
        :rtype req: str
        :return: True if it matches, else False.
        �+could not read version %r - using name onlyrF)rrrRrQr��requirementr	rdri�splitr.r�rr�)
r&�reqrnrQr�r"r�r�r�r�s
          r'�matches_requirementz Distribution.matches_requirement�s���
�c�"���D�M�M�0�0�1��	+��n�n�Q�]�]�3�G��{�{�������A�2�1�5�M�F�E���~��
� ���u�-����
���
��''�	+��N�N�H��
 ��9�9�;�q�>�D��n�n�T�*�G�	+��"+�
��
�s$�B�9C�AC�C�	C%�$C%c�~�|jrd|jz}nd}d|j�d|j�d|�d�S)zC
        Return a textual representation of this instance,
        z [%s]rMz<Distribution r�r��>)r�r"r�)r&�suffixs  r'�__repr__zDistribution.__repr__�s4���?�?��t���.�F��F��-1�Y�Y����f�M�Mr)c���t|�t|�urd}|S|j|jk(xr4|j|jk(xr|j|jk(}|S)a<
        See if this distribution is the same as another.
        :param other: The distribution to compare with. To be equal to one
                      another. distributions must have the same type, name,
                      version and source_url.
        :return: True if it is the same, else False.
        F)�typer"r�r�)r&�otherr�s   r'�__eq__zDistribution.__eq__�sj����;�d�4�j�(��F�
�
��i�i�5�:�:�-�:��l�l�e�m�m�3�:��o�o��)9�)9�9�
��
r)c��t|j�t|j�zt|j�zS)zH
        Compute hash in a way which matches the equality test.
        )�hashr"r�r�r%s r'�__hash__zDistribution.__hash__�s.���D�I�I���d�l�l�!3�3�d�4�?�?�6K�K�Kr)N)r3r4r5r6�build_time_dependency�	requestedr(r�r��download_urlr�r�r�r�r�r�r�r�r�r�r�r�r7r)r'rrCs����"���
�I�5��"�(��(��L�
�5��5��	��	�:��6��6��7��7��8��8��7��7��6��6� �DN�� Lr)rc�0��eZdZdZdZd�fd�	Zdd�Z�xZS)rz]
    This is the base class for installed distributions (whether PEP 376 or
    legacy).
    Nc�H��tt|�|�||_||_y)a
        Initialise an instance.
        :param metadata: An instance of :class:`Metadata` which describes the
                         distribution. This will normally have been initialised
                         from a metadata file in the ``path``.
        :param path:     The path of the ``.dist-info`` or ``.egg-info``
                         directory for the distribution.
        :param env:      This is normally the :class:`DistributionPath`
                         instance where this distribution was found.
        N)�superrr(r#�	dist_path)r&rRr#rS�	__class__s    �r'r(z"BaseInstalledDistribution.__init__�s#���	�'��7��A���	���r)c�$�|�|j}|�tj}d}ntt|�}d|jz}||�j	�}tj|�jd�jd�}|�|��S)a�
        Get the hash of some data, using a particular hash algorithm, if
        specified.

        :param data: The data to be hashed.
        :type data: bytes
        :param hasher: The name of a hash implementation, supported by hashlib,
                       or ``None``. Examples of valid values are ``'sha1'``,
                       ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
                       ``'sha512'``. If no hasher is specified, the ``hasher``
                       attribute of the :class:`InstalledDistribution` instance
                       is used. If the hasher is determined to be ``None``, MD5
                       is used as the hashing algorithm.
        :returns: The hash of the data. If a hasher was explicitly specified,
                  the returned hash will be prefixed with the specified hasher
                  followed by '='.
        :rtype: str
        rMz%s=�=�ascii)	�hasher�hashlib�md5r�r��base64�urlsafe_b64encode�rstrip�decode)r&�datar��prefixr�s     r'�get_hashz"BaseInstalledDistribution.get_hash�s���&�>��[�[�F��>��[�[�F��F��W�f�-�F��T�[�[�(�F����$�$�&���)�)�&�1�8�8��>�E�E�g�N����(�(r)rD)r3r4r5r6r�r(r��
__classcell__�r�s@r'rr�s����
�F�
�)r)rc���eZdZdZdZd�fd�	Zd�Zd�Zd�Ze	d��Z
d�Zd	�Zd
�Z
d�Zdd�Zd
�Ze	d��Zdd�Zd�Zd�Zd�Zd�Zej0Z�xZS)ra
    Created with the *path* of the ``.dist-info`` directory provided to the
    constructor. It reads the metadata contained in ``pydist.json`` when it is
    instantiated., or uses a passed in Metadata instance (useful for when
    dry-run mode is being used).
    �sha256c���g|_tj|�x|_}|�t	d|z��|rH|j
r<||jjvr$|jj|j}n�|��|jt�}|�|jt�}|�|jt�}|�t	dt�d|����tj|j��5}t!|d��}ddd�t"t$|�O|||�|r'|j
r|jj)|�|jd�}|du|_t,jj/|d�}t,jj1|�rJt3|d�5}|j5�j7d	�}	ddd�	j9�|_yy#1swY��xYw#1swY�,xYw)
Nzfinder unavailable for %szno z
 found in rNrOr�
top_level.txt�rb�utf-8)�modulesrrYrmr�r@r>r#rRrZrrr
rarbrcr
r�rr(r2r��osr`�exists�open�readr��
splitlines)r&r#rRrSrmrnrur��fr�r�s          �r'r(zInstalledDistribution.__init__"s�������(�8�8��>�>���f��>��8�4�?�@�@��3�%�%�$�#�*�*�/�/�*A��z�z���t�,�5�5�H�
�
����-�.�A��y��K�K� 7�8���y��K�K� 8�9���y� �8I�8<�">�?�?��#�#�A�K�K�M�2�f�#�F�8�D��3�	�#�T�3�H�d�C�H��3�%�%��J�J�N�N�4� ��K�K��$���$����
�W�W�\�\�$��
0��
�7�7�>�>�!���a���!��v�v�x���w�/����?�?�,�D�L��3�2����s�>G6�7 H�6G?�Hc�V�d|j�d|j�d|j�d�S)Nz<InstalledDistribution � � at r��r"r�r#r%s r'r�zInstalledDistribution.__repr__D����I�I�t�|�|�T�Y�Y�0�	0r)c�8�|j�d|j��S�Nrr�r%s r'�__str__zInstalledDistribution.__str__H����)�)�T�\�\�2�2r)c�x�g}|jd�}tj|j��5}t	|��5}|D]A}tt
|�d�D�cgc]}d��}}||z\}}	}
|j||	|
f��C	ddd�ddd�|Scc}w#1swY�xYw#1swY|SxYw)a"
        Get the list of installed files for the distribution
        :return: A list of tuples of path, hash and size. Note that hash and
                 size might be ``None`` for some entries. The path is exactly
                 as stored in the file (which is as in PEP 376).
        r�ru�N)�get_distinfo_resourcerarbrcr�range�lenr/)r&�resultsrnru�
record_reader�row�i�missingr#�checksum�sizes           r'�_get_recordsz"InstalledDistribution._get_recordsKs������&�&�x�0��
�
�
����
�
.�&��&�)�]�)�C�-2�3�s�8�Q�-?�@�-?��t�-?�G�@�+.��=�(�D�(�D��N�N�D�(�D�#9�:�
)�	*�/����
A�*�)��/���s5�
B/�B#�!	B
�*!B#�B/�B#�#B,	�(B/�/B9c�X�i}|jt�}|r|j�}|S)a
        Return the information exported by this distribution.
        :return: A dictionary of exports, mapping an export category to a dict
                 of :class:`ExportEntry` instances describing the individual
                 export entries, and keyed by name.
        )r
�EXPORTS_FILENAMEr)r&r�rns   r'r�zInstalledDistribution.exportsbs0�����&�&�'7�8����&�&�(�F��
r)c���i}|jt�}|r9tj|j	��5}t|�}ddd�|S|S#1swY|SxYw)z�
        Read exports data from a file in .ini format.

        :return: A dictionary of exports, mapping an export category to a list
                 of :class:`ExportEntry` instances describing the individual
                 export entries.
        N)r
rrarbrcr)r&r�rnrus    r'rz"InstalledDistribution.read_exportspsV�����&�&�'7�8����#�#�A�K�K�M�2�f�%�f�-��3��
�v�
�3��
�s�A�Ac��|jt�}t|d�5}t||�ddd�y#1swYyxYw)a
        Write a dictionary of exports to a file in .ini format.
        :param exports: A dictionary of exports, mapping an export category to
                        a list of :class:`ExportEntry` instances describing the
                        individual export entries.
        �wN)�get_distinfo_filerr�r)r&r��rfrs    r'rz#InstalledDistribution.write_exportss4���
#�
#�$4�
5��
�"�c�]�a��'�1�%��]�]�s	�
8�Ac�>�|jd�}tj|j��5}t	|��5}|D] \}}||k(s�|ccddd�cddd�S	ddd�ddd�td|z��#1swY�xYw#1swY�#xYw)aW
        NOTE: This API may change in the future.

        Return the absolute path to a resource file with the given relative
        path.

        :param relative_path: The path, relative to .dist-info, of the resource
                              of interest.
        :return: The absolute path where the resource is to be found.
        rrNz3no resource file with relative path %r is installed)r
rarbrcr�KeyError)r&r�rnru�resources_reader�relative�destinations       r'r�z'InstalledDistribution.get_resource_path�s���
�&�&�{�3��
�
�
����
�
.�&��&�)�-=�-=�)�H�k��=�0�*�*�*�)�/�
.�-=�*�/�
�&�(5�6�7�	7�	*�)��/�
.�s5�
B�B�B�	B�'B�)B�B	�B�Bc#�>K�|j�D]}|���y�w)z�
        Iterates over the ``RECORD`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: iterator of (path, hash, size)
        N)r)r&r�s  r'�list_installed_filesz*InstalledDistribution.list_installed_files�s �����'�'�)�F��L�*�s�c��tjj|d�}tjj|j�}|j	|�}tjj|d�}|jd�}tjd|�|ryt|�5}|D]�}tjj|�s|jd�rdx}	}
nVdtjj|�z}
t|d�5}|j|j��}	ddd�|j	|�s|r1|j	|�r tjj||�}|j!|	|
f���|j	|�r tjj||�}|j!|ddf�ddd�|S#1swY��xYw#1swY|SxYw)z�
        Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
        existing ``RECORD`` file is silently overwritten.

        prefix is used to determine when to write absolute paths.
        rMr�creating %sN�z.pycz.pyoz%dr�)r�r#r`�dirname�
startswithrrd�infor�isdirr]�getsizer�r�r��relpath�writerow)r&�pathsr��dry_run�base�base_under_prefix�record_path�writerr#�
hash_valuer�fps            r'�write_installed_filesz+InstalledDistribution.write_installed_files�s��������f�b�)���w�w���t�y�y�)�� �O�O�F�3���w�w�|�|�D�"�%���,�,�X�6�����M�;�/���
�{�
#�v����7�7�=�=��&�$�-�-�8H�*I�(*�*�J���"�'�'�/�/�$�"7�7�D��d�D�)�R�%)�]�]�2�7�7�9�%=�
�*��?�?�4�(�->�-1�_�_�V�-D��7�7�?�?�4��6�D�����z�4� 8�9���%�%�d�+� �g�g�o�o�k�4�@���O�O�[�"�b�1�2�#$�$��*�)��$�$��s&�0A)G6� G*�9B'G6�*G3�/G6�6Hc�h�g}tjj|j�}|jd�}|j	�D�]T\}}}tjj|�s tjj
||�}||k(r�Mtjj|�s|j|dddf���tjj|�s��ttjj|��}|r||k7r|j|d||f���|s��d|vr|jdd�d}nd	}t|d
�5}	|j|	j�|�}
|
|k7r|j|d||
f�d	d	d	���W|S#1swY��dxYw)�
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        rr�TFr�=rrNr�r�)r�r#r)rr%�isabsr`r�r/�isfile�strr-r�r�r�r�)r&�
mismatchesr2r4r#r6r�actual_sizer�r�actual_hashs           r'�check_installed_filesz+InstalledDistribution.check_installed_files�si���
��w�w���t�y�y�)���,�,�X�6��&*�&?�&?�&A�"�D�*�d��7�7�=�=��&��w�w�|�|�D�$�/���{�"���7�7�>�>�$�'��!�!�4��4��"?�@�������%�!�"�'�'�/�/�$�"7�8���K�4�/��%�%�t�V�T�;�&G�H���j�(�!+�!1�!1�#�q�!9�!�!<��!%���d�D�)�Q�&*�m�m�A�F�F�H�f�&E��&�*�4�&�-�-�t�V�Z��.U�V�*�)�#'B�*��	*�)�s�;F'�'F1	c���i}tjj|jd�}tjj|�r�t	j
|dd��5}|j
�j�}ddd�D]C}|jdd�\}}|dk(r"|j|g�j|��?|||<�E|S#1swY�SxYw)	a�
        A dictionary of shared locations whose keys are in the set 'prefix',
        'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
        The corresponding value is the absolute path of that category for
        this distribution, and takes into account any paths selected by the
        user at installation time (e.g. via command-line arguments). In the
        case of the 'namespace' key, this would be a list of absolute paths
        for the roots of namespace packages in this distribution.

        The first time this property is accessed, the relevant information is
        read from the SHARED file in the .dist-info directory.
        rrnr���encodingNr;r�	namespace)r�r#r`r=�codecsr�r�r�r�r-r/)r&r��shared_pathr�lines�liner.rHs        r'�shared_locationsz&InstalledDistribution.shared_locations�s������g�g�l�l�4�9�9�h�7��
�7�7�>�>�+�&����[�#��@�A�����+�+�-��A���!�Z�Z��Q�/�
��U��+�%��%�%�c�2�.�5�5�e�<�"'�F�3�K���
�A�@�s�$C�Cc��tjj|jd�}tj	d|�|ryg}dD]@}||}tjj||�s�+|j
|�d|����B|jdd�D]}|j
d|z��tj|d	d
��5}|jdj|��ddd�|S#1swY|SxYw)
aa
        Write shared location information to the SHARED file in .dist-info.
        :param paths: A dictionary as described in the documentation for
        :meth:`shared_locations`.
        :param dry_run: If True, the action is logged but no file is actually
                        written.
        :return: The path of the file written to.
        rr'N)r��lib�headers�scriptsr�r;rFr7znamespace=%srr�rD�
)r�r#r`rdr+r,r/�getrGr��write)	r&r0r1rHrIr.r#�nsrs	         r'�write_shared_locationsz,InstalledDistribution.write_shared_locations	s����g�g�l�l�4�9�9�h�7�����M�;�/�����B�C���:�D��w�w�}�}�U�3�Z�(�����d�3�4�C��)�)�K��,�B��L�L��"�,�-�-��[�[��c�G�
<��
�G�G�D�I�I�e�$�%�=���=���s�!C9�9Dc���|tvrtd|�d|j����tj|j�}|�td|jz��|j|�S)N�#invalid path for a dist-info file: rzUnable to get a finder for %s)�
DIST_FILESrr#rrYrZ)r&r#rms   r'r
z+InstalledDistribution.get_distinfo_resource"se���z�!�"�15�t�y�y�$B�C�
C��*�*�4�9�9�5���>�"�#B�T�Y�Y�#N�O�O��{�{�4� � r)c	���|jtj�dk\r}|jtj�dd\}}||jjtj�dk7r)td|�d|j�d|j�d���|tvrtd	|�d
|j����tjj|j|�S)a�
        Returns a path located under the ``.dist-info`` directory. Returns a
        string representing the path.

        :parameter path: a ``'/'``-separated path relative to the
                         ``.dist-info`` directory or an absolute path;
                         If *path* is an absolute path and doesn't start
                         with the ``.dist-info`` directory path,
                         a :class:`DistlibException` is raised
        :type path: str
        :rtype: str
        r���N���zdist-info file z does not belong to the rz
 distributionrVr)
rZr��sepr�r#rr"r�rWr`)r&r#r�s   r'rz'InstalledDistribution.get_distinfo_file+s����9�9�R�V�V���!�%)�Z�Z����%7���%<�"��d��4�9�9�?�?�2�6�6�#:�2�#>�>�&�&*�D�I�I�t�|�|�E�F�F�
�z�!�"�15�t�y�y�$B�C�
C��w�w�|�|�D�I�I�t�,�,r)c#�NK�tjj|j�}|j�D]e\}}}tjj	|�s tjj||�}|j
|j�s�b|���gy�w)z�
        Iterates over the ``RECORD`` entries and returns paths for each line if
        the path is pointing to a file located in the ``.dist-info`` directory
        or one of its subdirectories.

        :returns: iterator of paths
        N)r�r#r)rr<r`r*)r&r2r#rrs     r'�list_distinfo_filesz)InstalledDistribution.list_distinfo_filesHsq�����w�w���t�y�y�)��$(�$5�$5�$7� �D�(�D��7�7�=�=��&��w�w�|�|�D�$�/�����t�y�y�)��
�%8�s�BB%�B%c�X�t|t�xr|j|jk(SrD)rzrr#�r&r�s  r'r�zInstalledDistribution.__eq__Xs'���5�"7�8�(��	�	�U�Z�Z�'�	)r))NN�F)r3r4r5r6r�r(r�rrrr�rrr�r%r8rBrKrTr
rr]r��objectr�r�r�s@r'rrs������F� -�D0�3��.����
�	&�7�(�!�F!�F����4�2!�-�:� )�
���Hr)rc�p��eZdZdZdZiZd�fd�	Zd�Zd�Zd�Z	d�Z
d�Zdd	�Zd
�Z
ejZ�xZS)
raCreated with the *path* of the ``.egg-info`` directory or file provided
    to the constructor. It reads the metadata contained in the file itself, or
    if the given path happens to be a directory, the metadata is read from the
    file ``PKG-INFO`` under that directory.Tc����d�}||_||_|rf|jrZ||jjvrB|jj|j}|||j
|j�nX|j|�}|||j
|j�|r'|jr|jj|�tt|�/|||�y)Nc�J�||_|j�|_||_yrD)r"r�r.r�)r��nr�s   r'�set_name_and_versionz:EggInfoDistribution.__init__.<locals>.set_name_and_versionjs���A�F��G�G�I�A�E��A�Ir))r#r�r@r?rRr"r��
_get_metadatar2r�rr()r&r#rSrfrRr�s     �r'r(zEggInfoDistribution.__init__is����	�
��	�����3�%�%�$�#�.�.�2E�2E�*E��~�~�*�*�4�0�9�9�H� ��x�}�}�h�6F�6F�G��)�)�$�/�H�
!��x�}�}�h�6F�6F�G��s�)�)����"�"�4�(�
�!�4�1�(�D�#�Fr)c���d}d���fd�}dx}}|jd��rKtjj|�r�tjj	|d�}tjj	|d�}t|d��}tjj	|d�}	tjj	|d	�}||	�}�nIt
j|�}
t|
jd
�jd��}t|d��}	|
jd
�}|
jd�jd�}�|jd��}n�|jd�r�tjj|�rhtjj	|d�}	||	�}tjj	|d�}tjj	|d	�}t|d��}ntd|z��|r|j|�|�U|�Stjj|�r4t|d�5}
|
j!�jd�}ddd�|sg}n|j#�}||_|S#t$rd}Y��wxYw#1swY�8xYw)Nc��g}|j�}|D]�}|j�}|jd�rtj	d|�|St|�}|stj	d|��a|jrtj	d�|js|j|j���djd�|jD��}|j|j�d|�d����|S)	z�Create a list of dependencies from a requires.txt file.

            *data*: the contents of a setuptools-produced requires.txt file.
            �[z.Unexpected line: quitting requirement scan: %rz#Not recognised as a requirement: %rz4extra requirements in requires.txt are not supportedr�c3�&K�|]	}d|z���y�w)z%s%sNr7)�.0�cs  r'�	<genexpr>zQEggInfoDistribution._get_metadata.<locals>.parse_requires_data.<locals>.<genexpr>�s����$G��A�V�a�Z����r�r�)r��stripr*rdrirr��constraintsr/r"r`)r��reqsrIrJrn�conss      r'�parse_requires_dataz>EggInfoDistribution._get_metadata.<locals>.parse_requires_data�s���
�D��O�O�%�E����z�z�|���?�?�3�'��N�N�#S�#'�)���K�&�d�+����N�N�#H�$�O���8�8��N�N�$3�4��}�}��K�K����'��9�9�$G����$G�G�D��K�K�Q�V�V�T� :�;�#�$�Kr)c���g}	tj|dd�5}�|j��}ddd�|S#1swY|SxYw#t$rY|SwxYw)z�Create a list of dependencies from a requires.txt file.

            *req_path*: the path to a setuptools-produced requires.txt file.
            rnr�N)rGr�r��IOError)�req_pathrrr7rts   �r'�parse_requires_pathz>EggInfoDistribution._get_metadata.<locals>.parse_requires_path�sb����D�
��[�[��3��8�B�.�r�w�w�y�9�D�9��K�	9��K���
���K�
�s+�A
�=�A
�A�A
�A
�
	A�ArUzEGG-INFOzPKG-INFOrN)r#rQzrequires.txtr�zEGG-INFO/PKG-INFO�utf8rOzEGG-INFO/requires.txtzEGG-INFO/top_level.txtr�rTz,path must end with .egg-info or .egg, got %rr�)r]r�r#r,r`r
�	zipimport�zipimporterr�get_datar�rvr�add_requirementsr�r�r�r�r�)r&r#�requiresrx�tl_path�tl_datar��	meta_pathrRrw�zipfrPr�rrts              @r'rgz!EggInfoDistribution._get_metadata~s?�����	�6	�!� ��'��=�=�� ��w�w�}�}�T�"��G�G�L�L��z�2���G�G�L�L��J�7�	�#��8�D���7�7�<�<��>�:���'�'�,�,�q�/�:��.�x�8��!�,�,�T�2��"��M�M�"5�6�=�=�f�E�G��#�G�H�E��$��=�=�)@�A�D�"�m�m�,D�E�L�L�W�U�G�2�4�;�;�w�3G�H�H��]�]�;�
'��w�w�}�}�T�"��7�7�<�<��n�=��.�x�8���w�w�|�|�D�*�5���'�'�,�,�t�_�=���T�(�;�H�"�$,�.2�$3�4�
4���%�%�h�/��?��"�r�w�w�~�~�g�'>��'�4�(�A��f�f�h�o�o�g�6�G�)���G��(�(�*�G�������3�$�#�H�$��$)�(�s�$AJ)�# J:�)J7�6J7�:Kc�V�d|j�d|j�d|j�d�S)Nz<EggInfoDistribution rrr�rr%s r'r�zEggInfoDistribution.__repr__�rr)c�8�|j�d|j��Srr�r%s r'rzEggInfoDistribution.__str__�r	r)c�D�g}tjj|jd�}tjj|�rT|j	�D]A\}}}||k(r�
tjj|�r�-|j|dddf��C|S)r:�installed-files.txtr�TF)r�r#r`r�r%r/)r&r?r4r#r�s     r'rBz)EggInfoDistribution.check_installed_files�s����
��g�g�l�l�4�9�9�.C�D��
�7�7�>�>�+�&�"�7�7�9�
��a���;�&���w�w�~�~�d�+��%�%�t�X�t�U�&C�D�	:�
�r)c	��d�}d�}tjj|jd�}g}tjj|��rt	j
|dd��5}|D]�}|j
�}tjjtjj|j|��}tjj|�s(tjd|�|jd�r��tjj|�r��|j|||�||�f���	d	d	d	�|j|d	d	f�|S#1swY�xYw)
z�
        Iterates over the ``installed-files.txt`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: a list of (path, hash, size)
        c���t|d�}	|j�}|j�tj|�j�S#|j�wxYw)Nr�)r�r��closer�r��	hexdigest)r#r�contents   r'�_md5z6EggInfoDistribution.list_installed_files.<locals>._md5�sL���T�4� �A�
��&�&�(�����	��;�;�w�'�1�1�3�3�����	�s�A�A#c�@�tj|�jSrD)r��stat�st_size)r#s r'�_sizez7EggInfoDistribution.list_installed_files.<locals>._sizes���7�7�4�=�(�(�(r)r�rnr�rDzNon-existent file: %sr(N)
r�r#r`r�rGr�rp�normpathrdrir]r,r/)r&r�r�r4r�rrJr�s        r'r%z(EggInfoDistribution.list_installed_files�s��	4�	)��g�g�l�l�4�9�9�.C�D����
�7�7�>�>�+�&����[�#��@�A��D��:�:�<�D����(�(������d�i�i��)F�G�A��7�7�>�>�!�,����'>��B��:�:�&6�7�$��7�7�=�=��+��
�
�q�$�q�'�5��8�&<�=��A�
�M�M�;��d�3�4��
�A�@�s�+CE0�/"E0�0E9c#� K�tjj|jd�}tjj|�r�d}t	j
|dd��5}|D]�}|j
�}|dk(rd}�|r�tjjtjj|j|��}|j|j�s��|r|����|����	ddd�yy#1swYyxYw�w)	a
        Iterates over the ``installed-files.txt`` entries and returns paths for
        each line if the path is pointing to a file located in the
        ``.egg-info`` directory or one of its subdirectories.

        :parameter absolute: If *absolute* is ``True``, each returned path is
                          transformed into a local absolute path. Otherwise the
                          raw value from ``installed-files.txt`` is returned.
        :type absolute: boolean
        :returns: iterator of paths
        r�Trnr�rDz./FN)	r�r#r`r�rGr�rpr�r*)r&�absoluter4�skiprrJr�s       r'r]z'EggInfoDistribution.list_distinfo_filess������g�g�l�l�4�9�9�.C�D��
�7�7�>�>�+�&��D����[�#��@�A��D��:�:�<�D��t�|�$�� ���G�G�,�,�R�W�W�\�\�$�)�)�T�-J�K���<�<��	�	�2�'�&'��&*�
��A�@�'�@�@�s+�A$D�& D�A"D�*
D�8
D�D�Dc�X�t|t�xr|j|jk(SrD)rzrr#r_s  r'r�zEggInfoDistribution.__eq__5s'���5�"5�6�(��	�	�U�Z�Z�'�	)r)rDr`)r3r4r5r6r�rKr(rgr�rrBr%r]r�rar�r�r�s@r'rr`sL���/�
�I���G�*X�t0�3��&$�L+�:)�
���Hr)rc�L�eZdZdZd�Zd�Zdd�Zd�Zd�Zd
d�Z	dd	�Z
d
�Zd�Zy)�DependencyGrapha�
    Represents a dependency graph between distributions.

    The dependency relationships are stored in an ``adjacency_list`` that maps
    distributions to a list of ``(other, label)`` tuples where  ``other``
    is a distribution and the edge is labeled with ``label`` (i.e. the version
    specifier, if such was provided). Also, for more efficient traversal, for
    every distribution ``x``, a list of predecessors is kept in
    ``reverse_list[x]``. An edge from distribution ``a`` to
    distribution ``b`` means that ``a`` depends on ``b``. If any missing
    dependencies are found, they are stored in ``missing``, which is a
    dictionary that maps distributions to a list of requirements that were not
    provided by any other distributions.
    c�.�i|_i|_i|_yrD)�adjacency_list�reverse_listrr%s r'r(zDependencyGraph.__init__Ps�� ��������r)c�@�g|j|<g|j|<y)z�Add the *distribution* to the graph.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        N)r�r�)r&�distributions  r'�add_distributionz DependencyGraph.add_distributionUs$��-/����L�)�*,����,�'r)Nc��|j|j||f�||j|vr|j|j|�yy)a�Add an edge from distribution *x* to distribution *y* with the given
        *label*.

        :type x: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type y: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type label: ``str`` or ``None``
        N)r�r/r�)r&�x�y�labels    r'�add_edgezDependencyGraph.add_edge_sR��	
���A��%�%�q�%�j�1��D�%�%�a�(�(����a� �'�'��*�)r)c��tjd||�|jj|g�j	|�y)a
        Add a missing *requirement* for the given *distribution*.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        :type requirement: ``str``
        z
%s missing %rN)rdrerr-r/)r&r�r�s   r'�add_missingzDependencyGraph.add_missingns3��	���_�l�K�@�������b�1�8�8��Er)c�8�|j�d|j��Srr�r0s  r'�
_repr_distzDependencyGraph._repr_distyr	r)c�`�|j|�g}|j|D]z\}}|j|�}|�|�d|�d�}|jd|zt|�z�|j	||dz�}|jd�}|j
|dd��|dj|�S)zPrints only a subgraphNz [�]z    rrP)r�r�r/r>�	repr_noder��extendr`)r&r1�level�outputr�r��	suboutput�subss        r'r�zDependencyGraph.repr_node|s����/�/�$�'�(�� �/�/��5�L�E�5��?�?�5�)�D�� �$(�%�0���M�M�&�5�.�3�t�9�4�5����u�e�a�i�8�I��?�?�4�(�D��M�M�$�q�r�(�#�6��y�y�� � r)c��g}|jd�|jj�D]�\}}t|�dk(r|s|j	|�|D]c\}}|�0|jd|j
�d|j
�d|�d���8|jd|j
�d|j
�d���e��|s�t|�dkDrz|jd	�|jd
�|jd�|D]1}|jd|j
z�|jd
��3|jd�|jd�y)a9Writes a DOT output for the graph to the provided file *f*.

        If *skip_disconnected* is set to ``True``, then all distributions
        that are not dependent on any other distribution are skipped.

        :type f: has to support ``file``-like operations
        :type skip_disconnected: ``bool``
        zdigraph dependencies {
rN�"z" -> "z
" [label="z"]
z"
zsubgraph disconnected {
zlabel = "Disconnected"
zbgcolor = red
z"%s"rPz}
)rRr��itemsrr/r")r&r�skip_disconnected�disconnectedr1�adjsr�r�s        r'�to_dotzDependencyGraph.to_dot�s����	���*�+��-�-�3�3�5�J�D�$��4�y�A�~�&7��#�#�D�)� $���u��}��G�G�!�Y�Y��
�
�E�;�<��G�G��	�	�5�:�:�F�G�!%�6�!�S��%6��%:�
�G�G�/�0�
�G�G�.�/�
�G�G�%�&�$���������*�+�����
�%�
�G�G�E�N�	����r)c
�:�g}i}|jj�D]
\}}|dd||<�	g}t|j��ddD]\}}|r�	|j|�||=�|sn�|j�D]$\}}|D��cgc]\}}||vs�||f��c}}||<�&tjd|D�cgc]}|j�d|j�d��� c}�|j|���|t|j��fScc}}wcc}w)aa
        Perform a topological sort of the graph.
        :return: A tuple, the first element of which is a topologically sorted
                 list of distributions, and the second element of which is a
                 list of distributions that cannot be sorted because they have
                 circular dependencies and so form a cycle.
        NzMoving to result: %sr�r�)
r�r��listr/rdrer"r�r��keys)r&r��alist�kr��	to_remover�rns        r'�topological_sortz DependencyGraph.topological_sort�s�������'�'�-�-�/�D�A�q���t�E�!�H�0���I��U�[�[�]�+�A�.���1���$�$�Q�'��a��/������
���1�/0�G�q�t�q�!�A�Y�4F�Q��F�q�G��a��&��L�L�/�CL�M�9�a�q�v�v�q�y�y�9�9�M�
O��M�M�)�$�� �t�E�J�J�L�)�)�)��	H��Ms�D�D�;#D
c��g}|jj�D]%\}}|j|j|���'dj	|�S)zRepresentation of the graphrP)r�r�r/r�r`)r&r�r1r�s    r'r�zDependencyGraph.__repr__�sH�����-�-�3�3�5�J�D�$��M�M�$�.�.��.�/�6��y�y�� � r)rD)r)T)
r3r4r5r6r(r�r�r�r�r�r�r�r�r7r)r'r�r�@s6��
��
-�
+�	F�3�!��@*�>!r)r�c�0�t|�}t�}i}|D]m}|j|�|jD]K}t	|�\}}t
j
d|||�|j|g�j||f��M�o|D]�}|j|jz|jz|jz}|D]s}		|j|	�}
|
j"}d}||vr8||D]0\}}	|
j%|�}
|
s�|j'|||	�d}n|r�b|j)||	��u��|S#t$r=t
jd|	�|	j!�d}|j|�}
Y��wxYw#t$rd}
Y��wxYw)a6Makes a dependency graph from the given distributions.

    :parameter dists: a list of distributions
    :type dists: list of :class:`distutils2.database.InstalledDistribution` and
                 :class:`distutils2.database.EggInfoDistribution` instances
    :rtype: a :class:`DependencyGraph` instance
    zAdd to provided: %s, %s, %sr�rFT)rr�r�r�rrdrer-r/r�r�r�r�r�r	rir�r.r�r�r�)�distsrQ�graphr�r1r�r"r�r~r�r��matched�providerr�s              r'�
make_graphr��s�����
�F���E��H���
���t�$����A�2�1�5�M�D�'��L�L�6��g�t�L�����b�)�0�0�'�4��A������%�%��(:�(:�:��'�'�(�*.�*;�*;�<���C�
/� �.�.��-���;�;�D��G��x��)1�$��%�G�X�&� '�
�
�g� 6������t�X�s�;�"&���*8���!�!�$��,�3��:�L��/+�
/����L�"�$��y�y�{�1�~�� �.�.��.��
/��3�&� %��&�s%�D>�7F�>AF�F�F	�F	c�:�||vrtd|jz��t|�}|g}|j|}|rN|j	�}|j|�|j|D]}||vs�|j|��|r�N|j	d�|S)z�Recursively generate a list of distributions from *dists* that are
    dependent on *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    �1given distribution %r is not a member of the listr)rr"r�r��popr/)r�r1r��dep�todor��succs       r'�get_dependent_distsr�s����5��� -�/3�y�y� 9�:�	:��u��E��&�C����d�#�D�
��H�H�J���
�
�1�
��&�&�q�)�D��3�����D�!�*���G�G�A�J��Jr)c��||vrtd|jz��t|�}t�}|j|}td�|D��}|rn|j�d}|j
|�|j|}|D]3}|d}||vs�
||vs�|j
|�|j|��5|r�n|S)aRecursively generate a list of distributions from *dists* that are
    required by *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
                 in finding the dependencies.
    r�c3�&K�|]	}|d���y�w)rNr7)rl�ts  r'rnz%get_required_dists.<locals>.<genexpr>/s����"�T��q��t�T�ror)rr"r�rXr�r�r2r/)	r�r1r�r�r�rlr��	pred_list�preds	         r'�get_required_distsr� s����5��� -�/3�y�y� 9�:�	:��u��E�

�%�C�����%�D��"�T�"�"�D�
��H�H�J�q�M������
��(�(��+�	��D��Q��A���|���
���������D�!�	�	��Jr)c��|jdd�}tdi|��}||_||_|xsd|_t|�S)zO
    A convenience method for making a dist given just a name and version.
    �summaryzPlaceholder for summaryr7)r�r
r"r�r�r)r"r��kwargsr�r�s     r'�	make_distr�=sH���j�j��$=�>�G�	�	�F�	�B��B�G��B�J��5�5�B�J����r))r:)7r6�
__future__rr�rGrar��loggingr�r_r;rzrMrr�compatrr�rr	rRr
rrr
�utilrrrrrrr�__all__�	getLoggerr3rdr�COMMANDS_FILENAMErWr^rar rrrrrrfrgr�r�r�r�r�r7r)r'�<module>r�s���'�
�
����	��
��)��8�1�1�F�F�F���

��	�	�8�	$��(��*���,�h���+�X�7�
���<�V�<�<u �v�u �p[L�6�[L�|4)��4)�nE�5�E�P
Z�3�Z�x'��$��M!�f�M!�`3�l�4�:	r)python3.12/site-packages/pip/_vendor/distlib/__pycache__/resources.cpython-312.pyc000064400000041720151732701630023725 0ustar00�

R`iD*��.�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZmZej e�ZdaGd�de�ZGd�d	e�ZGd
�de�ZGd�d
e�ZGd�de�ZGd�de�Zed�ee	j8eiZ		ddlZeeejD<eeejF<eeejH<[d�Z&iZ'd�Z(ejRe*d��Z+d�Z,y#e $rddl!ZY�]wxYw#e e%f$rY�<wxYw)�)�unicode_literalsN�)�DistlibException)�cached_property�get_cache_base�Cachec�,��eZdZd�fd�	Zd�Zd�Z�xZS)�
ResourceCachec���|�1tjjt�t	d��}t
t|�|�y)Nzresource-cache)�os�path�joinr�str�superr
�__init__)�self�base�	__class__s  ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/resources.pyrzResourceCache.__init__s4����<��7�7�<�<�� 0�#�6F�2G�H�D�
�m�T�+�D�1�c��y)z�
        Is the cache stale for the given resource?

        :param resource: The :class:`Resource` being cached.
        :param path: The path of the resource in the cache.
        :return: True if the cache is stale.
        T��r�resourcer
s   r�is_stalezResourceCache.is_stale"s��rc�R�|jj|�\}}|�|}|Stjj	|j
|j
|�|�}tjj|�}tjj|�stj|�tjj|�sd}n|j||�}|r2t|d�5}|j|j�ddd�|S|S#1swY|SxYw)z�
        Get a resource into the cache,

        :param resource: A :class:`Resource` instance.
        :return: The pathname of the resource in the cache.
        NT�wb)�finder�get_cache_inforr
rr�
prefix_to_dir�dirname�isdir�makedirs�existsr�open�write�bytes)rr�prefixr
�resultr!�stale�fs        r�getzResourceCache.get-s��� ���5�5�h�?�����>��F��
��W�W�\�\�$�)�)�T�-?�-?��-G��N�F��g�g�o�o�f�-�G��7�7�=�=��)����G�$��7�7�>�>�&�)����
�
�h��5����&�$�'�1��G�G�H�N�N�+�(��
�v�
�(��
�s�4D�D&�N)�__name__�
__module__�__qualname__rrr,�
__classcell__�rs@rr
r
s���2�	�rr
c��eZdZd�Zy)�ResourceBasec� �||_||_yr-)r�name)rrr6s   rrzResourceBase.__init__Hs�������	rN)r.r/r0rrrrr4r4Gs��rr4c�J�eZdZdZdZd�Zed��Zed��Zed��Z	y)�Resourcez�
    A class representing an in-package resource, such as a data file. This is
    not normally instantiated by user code, but rather by a
    :class:`ResourceFinder` which manages the resource.
    Fc�8�|jj|�S)z�
        Get the resource as a stream.

        This is not a property to make it obvious that it returns a new stream
        each time.
        )r�
get_stream�rs r�	as_streamzResource.as_streamUs���{�{�%�%�d�+�+rc�L�t�
t�atj|�Sr-)�cacher
r,r;s r�	file_pathzResource.file_path^s���=�!�O�E��y�y���rc�8�|jj|�Sr-)r�	get_bytesr;s rr'zResource.byteses���{�{�$�$�T�*�*rc�8�|jj|�Sr-)r�get_sizer;s r�sizez
Resource.sizeis���{�{�#�#�D�)�)rN)
r.r/r0�__doc__�is_containerr<rr?r'rDrrrr8r8MsO���
�L�,������+��+��*��*rr8c� �eZdZdZed��Zy)�ResourceContainerTc�8�|jj|�Sr-)r�
get_resourcesr;s r�	resourceszResourceContainer.resourcesqs���{�{�(�(��.�.rN)r.r/r0rFrrKrrrrHrHns���L��/��/rrHc���eZdZdZej
j
d�rdZndZd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zeej*j,�Zd�Zy)�ResourceFinderz4
    Resource finder for file system resources.
    �java)�.pyc�.pyoz.class)rOrPc��||_t|dd�|_tjjt|dd��|_y)N�
__loader__�__file__�)�module�getattr�loaderrr
r!r)rrUs  rrzResourceFinder.__init__�s6������f�l�D�9����G�G�O�O�G�F�J��$C�D��	rc�@�tjj|�Sr-)rr
�realpath�rr
s  r�_adjust_pathzResourceFinder._adjust_path�s���w�w����%�%rc���t|t�rd}nd}|j|�}|jd|j�tjj|�}|j|�S)N�/�/r)	�
isinstancer'�split�insertrrr
rr[)r�
resource_name�sep�partsr)s     r�
_make_pathzResourceFinder._make_path�s]���m�U�+��C��C��#�#�C�(��
���Q��	�	�"������u�%��� � ��(�(rc�@�tjj|�Sr-)rr
r$rZs  r�_findzResourceFinder._find�s���w�w�~�~�d�#�#rc��d|jfSr-)r
�rrs  rrzResourceFinder.get_cache_info�s���X�]�]�"�"rc��|j|�}|j|�sd}|S|j|�r
t||�}nt	||�}||_|Sr-)rerg�
_is_directoryrHr8r
)rrbr
r)s    r�findzResourceFinder.find�s\�����}�-���z�z�$���F��
��!�!�$�'�*�4��?��!�$�
�6���F�K��
rc�.�t|jd�S�N�rb)r%r
ris  rr:zResourceFinder.get_stream�s���H�M�M�4�(�(rc�z�t|jd�5}|j�cddd�S#1swYyxYwrn)r%r
�read)rrr+s   rrAzResourceFinder.get_bytes�s'��
�(�-�-��
&�!��6�6�8�'�
&�
&�s�1�:c�T�tjj|j�Sr-)rr
�getsizeris  rrCzResourceFinder.get_size�s���w�w���x�}�}�-�-rc����fd�}ttj|j�D�cgc]
}||�s�|��c}�Scc}w)Nc�J��|dk7xr|j�j�S)N�__pycache__)�endswith�skipped_extensions)r+rs �r�allowedz-ResourceFinder.get_resources.<locals>.allowed�s,�����&�8��J�J�t�6�6�7�,8�
9r)�setr�listdirr
)rrryr+s`   rrJzResourceFinder.get_resources�s<���	9��r�z�z�(�-�-�8�G�8�!�G�A�J�A�8�G�H�H��Gs
�
A�Ac�8�|j|j�Sr-)rkr
ris  rrFzResourceFinder.is_container�s���!�!�(�-�-�0�0rc#�XK�|j|�}|��|g}|r�|jd�}|��|jrh|j}|jD]M}|s|}ndj||g�}|j|�}|jr|j
|��J|���O|r��yyy�w)Nrr^)rl�poprFr6rKr�append)rrbr�todo�rnamer6�new_name�childs        r�iteratorzResourceFinder.iterator�s������9�9�]�+�����:�D���8�8�A�;�����(�(�$�M�M�E� (� 2� 2��$�'+�H�'*�x�x���
�'>�H� $�	�	�(� 3�� �-�-� �K�K��.�"'�K�!3�� �s�B$B*�'B*N)r.r/r0rE�sys�platform�
startswithrxrr[rergrrlr:rArCrJrF�staticmethodrr
r"rkr�rrrrMrMvsy����|�|���v�&�7��-��E�
&�
)�$�#�
�)��.�I�1�!������/�M�(rrMc�R��eZdZdZ�fd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Z�xZ
S)�ZipResourceFinderz6
    Resource finder for resources in .zip files.
    c�F��tt|�|�|jj}dt|�z|_t|jd�r|jj|_ntj||_t|j�|_y)Nr�_files)
rr�rrW�archive�len�
prefix_len�hasattrr��	zipimport�_zip_directory_cache�sorted�index)rrUr�rs   �rrzZipResourceFinder.__init__�ss���
���/��7��+�+�%�%���c�'�l�*����4�;�;��)��+�+�,�,�D�K�#�8�8��A�D�K��D�K�K�(��
rc��|Sr-rrZs  rr[zZipResourceFinder._adjust_path�s���rc���||jd}||jvrd}nj|r)|dtjk7r|tjz}t	j|j
|�}	|j
|j
|�}|s-tjd||jj�|Stjd||jj�|S#t$rd}Y�iwxYw)NT���Fz_find failed: %r %rz_find worked: %r %r)r�r�rrc�bisectr�r��
IndexError�logger�debugrWr()rr
r)�is    rrgzZipResourceFinder._find�s����D�O�O�$�%���4�;�;���F���R��B�F�F�*��b�f�f�}���
�
�d�j�j�$�/�A�
����A��1�1�$�7����L�L�.��d�k�k�6H�6H�I��
�
�L�L�.��d�k�k�6H�6H�I��
��
�
���
�s�-C'�'C5�4C5c�l�|jj}|jdt|�zd}||fS)Nr)rWr�r
r�)rrr(r
s    rrz ZipResourceFinder.get_cache_info�s4�����$�$���}�}�Q��V��_�-�.���t�|�rc�L�|jj|j�Sr-)rW�get_datar
ris  rrAzZipResourceFinder.get_bytes�s���{�{�#�#�H�M�M�2�2rc�J�tj|j|��Sr-)�io�BytesIOrAris  rr:zZipResourceFinder.get_stream�s���z�z�$�.�.��2�3�3rc�X�|j|jd}|j|dS)N�)r
r�r�rs   rrCzZipResourceFinder.get_size�s+���}�}�T�_�_�-�.���{�{�4� ��#�#rc�.�|j|jd}|r)|dtjk7r|tjz
}t	|�}t�}t
j|j|�}|t	|j�kr�|j|j|�s	|S|j||d}|j|jtjd�d�|dz
}|t	|j�kr��|S)Nr�rr)r
r�rrcr�rzr�r�r��addr`)rrr
�plenr)r��ss       rrJzZipResourceFinder.get_resourcess����}�}�T�_�_�-�.���D��H����&��B�F�F�N�D��4�y������M�M�$�*�*�d�+���#�d�j�j�/�!��:�:�a�=�+�+�D�1���
��
�
�1�
�d�e�$�A��J�J�q�w�w�r�v�v�q�)�!�,�-�
��F�A��#�d�j�j�/�!��
rc��||jd}|r)|dtjk7r|tjz
}tj|j|�}	|j|j|�}|S#t$rd}Y|SwxYw)Nr�F)r�rrcr�r�r�r�)rr
r�r)s    rrkzZipResourceFinder._is_directorys����D�O�O�$�%���D��H����&��B�F�F�N�D��M�M�$�*�*�d�+��	��Z�Z��]�-�-�d�3�F��
���	��F��
�	�s�A<�<B�
B)r.r/r0rErr[rgrrAr:rCrJrkr1r2s@rr�r��s5����	)���$�
3�4�$�
�	rr�c�(�|tt|�<yr-)�_finder_registry�type)rW�finder_makers  r�register_finderr�2s��%1��T�&�\�"rc�X�|tvrt|}|S|tjvrt|�tj|}t	|dd�}|�td��t	|dd�}tjt|��}|�td|z��||�}|t|<|S)z�
    Return a resource finder for a package.
    :param package: The name of the package.
    :return: A :class:`ResourceFinder` instance for the package.
    �__path__Nz8You cannot get a finder for a module, only for a packagerRzUnable to locate finder for %r)	�
_finder_cacher��modules�
__import__rVrr�r,r�)�packager)rUr
rWr�s      rrr9s����-���w�'���M��#�+�+�%��w�����W�%���v�z�4�0���<�"�$8�9�
9����t�4��'�+�+�D��L�9����"�#C�g�#M�N�N��f�%��!'�
�g���Mr�	__dummy__c�&�d}tj|�tjj	|�}t
j	t
|��}|r:t}tjj|d�|_||_||�}|S)z�
    Return a resource finder for a path, which should represent a container.

    :param path: The path.
    :return: A :class:`ResourceFinder` instance for the path.
    NrT)
�pkgutil�get_importerr��path_importer_cacher,r�r��
_dummy_modulerr
rrSrR)r
r)rWrrUs     r�finder_for_pathr�Usu���F������
�
$�
$�
(�
(��
.�F�
�
!�
!�$�v�,�
/�F�
����'�'�,�,�t�R�0���"��������Mr)-�
__future__rr�r��loggingrr�r��typesr�rTr�utilrrr�	getLoggerr.r�r>r
�objectr4r8rHrMr�r��zipimporterr��_frozen_importlib_external�_fi�ImportError�_frozen_importlib�SourceFileLoader�
FileFinder�SourcelessFileLoader�AttributeErrorr�r�r�
ModuleTyperr�r�rrr�<module>r�sR��(�
�	��	��
����8�8�	��	�	�8�	$��	
��)�E�)�X�6��*�|�*�B/��/�W(�V�W(�tK��K�^	��J��
���,���
	�(�0�.<��S�)�)�*�'5��S�^�^�$�1?��S�-�-�.��
2��
��2!�� � ��[�!1�2�
���]�(�'�(��	�^�$�	��	�s0�%C;�).D
�;	D�D
�D�D
�
D�Dpython3.12/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-312.pyc000064400000252606151732701630022677 0ustar00�

R`i���*�ddlZddlmZddlZddlZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZ	ddlZddlZddlZddlZddlZddlZ	ddlZddlZddlmZddlmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0e
jbe2�Z3e
jhd�Z5e
jhd�Z6e
jhd	�Z7e
jhd
�Z8e
jhd�Z9e
jhd�Z:e
jhd
�Z;e
jhd�Z<d�Z=d�Z>d�Z?d�Z@d�ZAdid�ZBd�ZCd�ZDd�ZEej�d��ZGej�d��ZHej�djd��ZIGd�deJ�ZKd�ZLGd�deJ�ZMd �ZNGd!�d"eJ�ZOe
jhd#e
j��ZQd$�ZRdkd%�ZSd&�ZTd'�ZUd(�ZVd)�ZWd*�ZXe
jhd+e
j��ZZe
jhd,�Z[dkd-�Z\e
jhd.�Z]d/�Z^d0�Z_d1�Z`d2Zad3�Zbd4�ZcGd5�d6eJ�ZdGd7�d8eJ�ZeGd9�d:eJ�Zfd;Zgdld<�Zhd=�Zid>ZjGd?�d@eJ�Zke
jhdA�Zle
jhdB�Zme
jhdC�ZndD�ZdE�Zoer6ddFlmpZqmrZrmsZsGdG�dHe$j��ZtGdI�dJeq�ZpGdK�dLepe'�ZuGdM�dNe%j��ZverGdO�dPe%j��ZwGdQ�dRe%j��ZxdS�ZyGdT�dUeJ�ZzGdV�dWez�Z{GdX�dYez�Z|GdZ�d[e(�Z}Gd\�d]eJ�Z~d^�ZGd_�d`eJ�Z�da�Z�db�Z�dc�Z�dddedfdg�Z�dh�Z�y#e$rdZY��GwxYw#e$rddlZY��>wxYw)m�N)�deque)�iglob�)�DistlibException)�string_types�	text_type�shutil�	raw_input�StringIO�cache_from_source�urlopen�urljoin�httplib�	xmlrpclib�	splittype�HTTPHandler�BaseConfigurator�valid_ident�	Container�configparser�URLError�ZipFile�fsdecode�unquote�urlparsez^([\w\.-]+)\s*z^([\w\.*+-]+)\s*z^(<=?|>=?|={2,3}|[~!]=)\s*z*^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*z^or\b\s*z	^and\b\s*z(\S+)\s*z(([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)c�@�����d����fd���fd���fd���|�S)ae
    Parse a marker string and return a dictionary containing a marker expression.

    The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
    the expression grammar, or strings. A string contained in quotes is to be
    interpreted as a literal string, and a string not contained in quotes is a
    variable (such as os_name).
    c��tj|�}|r*|j�d}||j�d}||fS|st	d��|d}|dvrt	d|z��dj|d�}|dd}|g}|r�|d|k(rn�|d|k(r|j
|�|dd}nZtj|�}|st	d|z��|j
|j�d�||j�d}|r��dj|�}t	d|z��|j
|�dj|�}|ddj�}||fS)	Nrzunexpected end of inputz'"zinvalid expression: %s�rzerror in string literal: %szunterminated string: %s)
�
IDENTIFIER�match�groups�end�SyntaxError�replace�append�STRING_CHUNK�join�lstrip)�	remaining�m�result�q�oq�parts�ss       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/util.py�
marker_varz parse_marker.<locals>.marker_varAst�����Y�'����X�X�Z��]�F�!�!�%�%�'�(�+�I�:�y� � �9��7�8�8��!��A���~�!�":�Y�"F�G�G����q�"�%�B�!�!�"�
�I��C�E���Q�<�1�$���q�\�R�'��L�L��$� )�!�"�
�I�$�*�*�9�5�A��)�*G�)�*S�T�T��L�L�����A��/� )�!�%�%�'�(� 3�I���G�G�E�N��!�";�a�"?�@�@��L�L��O��W�W�U�^�F�!�!�"�
�,�,�.�I��y� � �c�t��|rQ|ddk(rI�|ddj��\}}|ddk7rtd|z��|ddj�}||fS�|�\}}|rRtj|�}|sn:|j	�d}||j�d}�|�\}}|||d�}|r�R|}||fS)Nr�(r�)�unterminated parenthesis: %s��op�lhs�rhs)r(r#�	MARKER_OPr r!r")r)r+r9r*r8r:�markerr1s      ��r0�marker_exprz!parse_marker.<locals>.marker_expres������1���,� &�y���}�';�';�'=� >��F�I���|�s�"�!�"@�9�"L�M�M�!�!�"�
�,�,�.�I��y� � �(�	�2�N�C����O�O�I�.�����X�X�Z��]��%�a�e�e�g�h�/�	�!+�I�!6���Y���C�8����F��y� � r2c����|�\}}|rCtj|�}|s	||fS||j�d}�|�\}}d||d�}|r�C||fS)N�andr7)�ANDr r")r)r9r*r:r=s    �r0�
marker_andz parse_marker.<locals>.marker_andxss���$�Y�/���Y���	�	�)�$�A����I�~��"�!�%�%�'�(�+�I�(��3�N�C���s�3�7�C�
��I�~�r2c����|�\}}|rCtj|�}|s	||fS||j�d}�|�\}}d||d�}|r�C||fS)N�orr7)�ORr r")r)r9r*r:rAs    �r0r<zparse_marker.<locals>.marker�ss���#�I�.���Y������#�A����I�~��"�!�%�%�'�(�+�I�'�	�2�N�C���c�#�6�C�
��I�~�r2�)�
marker_stringr<rAr=r1s @@@@r0�parse_markerrG8s%���"!�H!�&	�	��-� � r2c	���|j�}|r|jd�rytj|�}|st	d|z��|j�d}||j
�d}dx}x}x}}|r�|ddk(r�|jdd�}|dkrt	d|z��|d|}	||dzdj�}g}|	r�tj|	�}|st	d	|	z��|j|j�d�|	|j
�d}	|	sn,|	dd
k7rt	d|	z��|	ddj�}	|	r��|sd}|�r�|ddk(r�|ddj�}tj|�}|st	d
|z��|j�d}t|�}
|
jr|
jst	d|z��||j
�dj�}n�d�}|ddk7r||�\}}n�|jdd�}|dkrt	d|z��|d|}	||dzdj�}tj|	�r||	�\}}nntj|	�}|st	d|	z��|j�d}
|	|j
�dj�}	|	rt	d|	z��d|
fg}|r7|ddk7rt	d|z��|ddj�}t!|�\}}|r|ddk7rt	d|z��|s|}n'|�ddj#|D�cgc]}d|z��	c}���}t%||||||��Scc}w)z�
    Parse a requirement passed in as a string. Return a Container
    whose attributes contain the various parts of the requirement.
    �#Nzname expected: %sr�[�]rzunterminated extra: %szmalformed extra: %s�,zcomma expected in extras: %s�@zinvalid URI: %szInvalid URL: %sc���tj|�}d}|r�g}	|j�d}||j�d}tj|�}|std|z��|j�d}|j
||f�||j�d}|r|ddk7rn<|ddj�}|sn&tj|�}|std|z����|sd}||fS)z|
                Return a list of operator, version tuples if any are
                specified, else None.
                Nrzinvalid version: %srLr�invalid constraint: %s)�
COMPARE_OPr r!r"�VERSION_IDENTIFIERr#r%r()�
ver_remainingr*�versionsr8�vs     r0�get_versionsz'parse_requirement.<locals>.get_versions�s��
�$�$�]�3�����!�H���X�X�Z��]��(5�a�e�e�g�h�(?�
�.�4�4�]�C�� �"-�.C�m�.S�"T�T��H�H�J�q�M�� ����Q��0�(5�a�e�e�g�h�(?�
�,�
�a�0@�C�0G�!�(5�a�b�(9�(@�(@�(B�
� -�!�&�,�,�]�;�� �"-�.F��.V�"W�W�%�&$�#'����.�.r2r4r5r6rOz~=�;zinvalid requirement: %szunexpected trailing data: %s� �, z%s %s)�name�extras�constraintsr<�url�requirement)�strip�
startswithrr r#r!r"�findr(r%�	NON_SPACEr�scheme�netlocrPrQrGr'r)�reqr)r*�distnamerZ�	mark_exprrS�uri�ir/�trU�_rT�rs�cons                r0�parse_requirementrm�s���
�	�	��I��	�,�,�S�1������#�A���-�	�9�:�:��x�x�z�!�}�H��!�%�%�'�(�#�I�*.�.�F�.�Y�.��C��Y�q�\�S�(��N�N�3��"���q�5��6��B�C�C��a��N���a�!�e�f�%�,�,�.�	����� � ��#�A��!�"7�!�";�<�<��M�M�!�(�(�*�Q�-�(��!�%�%�'�(��A�����t�s�{�!�"@�1�"D�E�E��!�"�����A����F���Q�<�3��!�!�"�
�,�,�.�I����	�*�A��!�"3�i�"?�@�@��(�(�*�Q�-�C���
�A�
�H�H����!�"3�c�"9�:�:�!�!�%�%�'�(�+�2�2�4�I�
/�@��|�s�"�&2�9�&=�#��)��N�N�3��*���q�5�%�&D�y�&P�Q�Q��a��N��%�a�!�e�f�-�4�4�6�	��#�#�A�&�".�q�/�K�H�a�*�0�0��3�A��)�*B�Q�*F�G�G����
�1�
�A��!�%�%�'�(��*�*�,�A��)�*B�Q�*F�G�G�!%�q�	�{�H���Q�<�3���7�)�C�D�D��a�b�M�(�(�*�	�+�I�6��	�9��Y�q�\�S�(��8�9�D�E�E��
�� �$�)�)�h�,O�h�s�W�s�]�h�,O�"P�
Q���(�6�x�%�3�B�@�@��-Ps�
M0c��d�}i}|D]�\}}}tjj||�}t|�D]�}tjj||�}	t|	�D]m}
|||
�}|�|j	|d��!|||
�}|jtjjd�jd�}
|
dz|z||<�o����|S)z%Find destinations for resources filesc�
�|jtjjd�}|jtjjd�}|j	|�sJ�|t|�dj
d�S�N�/)r$�os�path�sepr_�lenr()�rootrss  r0�get_rel_pathz)get_resources_dests.<locals>.get_rel_paths`���|�|�B�G�G�K�K��-���|�|�B�G�G�K�K��-�����t�$�$�$��C��I�J��&�&�s�+�+r2Nrq)rrrsr'r�popr$rt�rstrip)�resources_root�rulesrw�destinations�base�suffix�dest�prefix�abs_base�abs_glob�abs_path�
resource_file�rel_path�rel_dests              r0�get_resources_destsr�s���,��L�#���f�d������n�d�3���f�
�H��w�w�|�|�H�f�5�H�!�(�O�� ,�^�X� F�
��<� �$�$�]�D�9�+�H�h�?�H�#�|�|�B�G�G�K�K��=�D�D�S�I�H�2:�S�.�8�2K�L��/�,�&�$��r2c��ttd�rd}|Stjttdtj�k7}|S)N�real_prefixT�base_prefix)�hasattr�sysr��getattr�r+s r0�in_venvr�(s:���s�M�"����M����w�s�M�3�:�:�F�F���Mr2c�\�tj}t|t�st	|�}|S�N)r��
executable�
isinstancerrr�s r0�get_executabler�2s&���^�^�F��f�i�(��&�!���Mr2c�|�|}	t|�}|}|s|r|}|r$|dj�}||vr	|S|rd|||fz}�:)Nrz	%c: %s
%s)r
�lower)�prompt�
allowed_chars�error_prompt�default�pr/�cs       r0�proceedr�Dsa���A�
��a�L�����W��A���!��
�
��A��M�!��
�H�� �A�|�V�#<�<��r2c�r�t|t�r|j�}i}|D]}||vs�||||<�|Sr�)r�r�split)�d�keysr+�keys    r0�extract_by_keyr�TsA���$��%��z�z�|��
�F����!�8��C�&�F�3�K���Mr2c�H�tjddk\rtjd�|�}|j	�}t|�}	t
j|�}|ddd}|j�D]8\}}|j�D] \}}|�d|��}t|�}	|	�J�|	||<�"�:|S#t$r|jdd�YnwxYwd�}
tj�}	|
||�nR#tj$r<|j�t!j"|�}t|�}|
||�YnwxYwi}|j%�D]=}ix||<}|j|�D] \}
}|
�d|��}t|�}	|	�J�|	||
<�"�?|S)	Nr��utf-8�
extensionszpython.exports�exports� = c�b�t|d�r|j|�y|j|�y)N�	read_file)r�r��readfp)�cp�streams  r0�read_streamz!read_exports.<locals>.read_streamqs$���2�{�#��L�L�� ��I�I�f�r2)r��version_info�codecs�	getreader�readr�json�load�items�get_export_entry�	Exception�seekr�ConfigParser�MissingSectionHeaderError�close�textwrap�dedent�sections)r��data�jdatar+�group�entries�krTr/�entryr�r�r�rY�values               r0�read_exportsr�]s���
�����a��*��!�!�'�*�6�2���;�;�=�D�
�d�^�F���	�	�&�!���|�$�%5�6�y�A��$�l�l�n�N�E�7��
�
����1�!"�A�&��(��+���(�(�(�"���
�	(�-��
�������A�q�����
�	"�	"�	$�B� ��B�����1�1� ��������t�$���$����B���	 ���F��{�{�}�� "�"��s��g��8�8�C�=�K�D�%�!�5�)�A�$�Q�'�E��$�$�$�!�G�D�M�)���Ms&�A,B;�;C�C�4	C>�>AE
�E
c�(�tjddk\rtjd�|�}t	j
�}|j
�D]�\}}|j|�|j�D]�}|j�
|j}n|j�d|j��}|jr!|�ddj|j��d�}|j||j|�����|j|�y)Nrr�r��:z [rXrK)r�r�r��	getwriterrr�r��add_section�valuesr~r��flagsr'�setrY�write)r�r�r�r�rTr�r/s       r0�
write_exportsr��s���
�����a��*��!�!�'�*�6�2��	�	"�	"�	$�B��
�
����1�
���q���X�X�Z�E��|�|�#��L�L��$�|�|�U�\�\�:���{�{�!"�D�I�I�e�k�k�$:�;���F�F�1�e�j�j�!�$� � ��H�H�V�r2c#�K�tj�}	|��tj|�y#tj|�wxYw�wr�)�tempfile�mkdtempr	�rmtree)�tds r0�tempdirr��s6����	�	�	�	�B�����
�
�b����
�
�b��s�A�2�A�A	�	Ac#��K�tj�}	tj|�d��tj|�y#tj|�wxYw�wr�)rr�getcwd�chdir)r��cwds  r0r�r��s:����
�)�)�+�C��
�����
�
����
������
���A!�A�A!�A�A!c#��K�tj�}	tj|�d��tj|�y#tj|�wxYw�wr�)�socket�getdefaulttimeout�setdefaulttimeout)�seconds�ctos  r0�socket_timeoutr��sF����
�
"�
"�
$�C�&�� � ��)�
�� � ��%��� � ��%�r�c��eZdZd�Zdd�Zy)�cached_propertyc��||_yr�)�func)�selfr�s  r0�__init__zcached_property.__init__�s	����	r2Nc��|�|S|j|�}tj||jj|�|Sr�)r��object�__setattr__�__name__)r��obj�clsr�s    r0�__get__zcached_property.__get__�s:���;��K��	�	�#������3��	�	� 2� 2�E�:��r2r�)r��
__module__�__qualname__r�r�rEr2r0r�r��s���
r2r�c��tjdk(r|S|s|S|ddk(rtd|z��|ddk(rtd|z��|jd�}tj|vr2|jtj�tj|vr�2|stjStjj|�S)a�Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rqrzpath '%s' cannot be absolute���zpath '%s' cannot end with '/')rrrt�
ValueErrorr��curdir�removersr')�pathname�pathss  r0�convert_pathr��s���
�v�v��}��������{�c���7�(�B�C�C���|�s���8�8�C�D�D��N�N�3��E�
�)�)�u�
�
���R�Y�Y��
�)�)�u�
���y�y��
�7�7�<�<���r2c�t�eZdZdd�Zd�Zd�Zd�Zdd�Zdd�Zd�Z	d	�Z
d
�Zd�Zd�Z
dd
�Zd�Zd�Zd�Zd�Zy)�FileOperatorc�P�||_t�|_|j�yr�)�dry_runr��ensured�_init_record)r�r�s  r0r�zFileOperator.__init__�s������u������r2c�N�d|_t�|_t�|_y�NF)�recordr��
files_written�dirs_created�r�s r0r�zFileOperator._init_record�s����� �U����E��r2c�T�|jr|jj|�yyr�)rr�add)r�rss  r0�record_as_writtenzFileOperator.record_as_written�s"���;�;����"�"�4�(�r2c�T�tjj|�s+tdtjj	|�z��tjj|�sytj
|�jtj
|�jkDS)a�Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        zfile '%r' does not existT)rrrs�existsr�abspath�stat�st_mtime)r��source�targets   r0�newerzFileOperator.newer�ss���w�w�~�~�f�%�"�#=�#%�7�7�?�?�6�#:�$;�<�
<��w�w�~�~�f�%���w�w�v��'�'�"�'�'�&�/�*B�*B�B�Br2c���|jtjj|��tjd||�|js�d}|rhtjj|�rd|z}nCtjj|�r$tjj|�sd|z}|rt|dz��tj||�|j|�y)z8Copy a file respecting dry-run and force flags.
        zCopying %s to %sNz%s is a symlinkz%s is a non-regular filez which would be overwritten)�
ensure_dirrrrs�dirname�logger�infor��islinkr
�isfiler�r	�copyfiler)r��infile�outfile�check�msgs     r0�	copy_filezFileOperator.copy_files���	
���������0�1����&���8��|�|��C���7�7�>�>�'�*�+�g�5�C��W�W�^�^�G�,�R�W�W�^�^�G�5L�4�w�>�C�� ��'D�!D�E�E��O�O�F�G�,����w�'r2Nc���tjj|�rJ�|jtjj	|��t
j
d||�|jsN|�
t|d�}ntj|d|��}	tj||�|j�|j|�y#|j�wxYw)NzCopying stream %s to %s�wb�w��encoding)rrrs�isdirrrrrr��openr�r	�copyfileobjr�r)r��instreamrr"�	outstreams     r0�copy_streamzFileOperator.copy_streams����7�7�=�=��)�)�)����������0�1����-�x��A��|�|��� ��$�/�	�"�K�K���x�H�	�
"��"�"�8�Y�7����!����w�'�����!�s�C�C%c�f�|jtjj|��|jsZtjj|�rtj|�t|d�5}|j|�ddd�|j|�y#1swY�xYw)Nr)
rrrrsrr�r
r�r$r�r)r�rsr��fs    r0�write_binary_filezFileOperator.write_binary_file'sp�����������-�.��|�|��w�w�~�~�d�#��	�	�$���d�D�!�Q�����
�"����t�$�"�!�s�;B'�'B0c�F�|j||j|��yr�)r+�encode)r�rsr�r"s    r0�write_text_filezFileOperator.write_text_file0s�����t�T�[�[��%:�;r2c�r�tjdk(s&tjdk(r�tjdk(r}|D]w}|jrtjd|��&tj|�j|z|z}tjd||�tj||��yyyy)N�posix�javazchanging mode of %szchanging mode of %s to %o)	rrrY�_namer�rrr�st_mode�chmod)r��bits�mask�filesr*�modes      r0�set_modezFileOperator.set_mode3s���
�7�7�g��"�'�'�V�"3����G�8K����<�<��K�K� 5�q�9��G�G�A�J�.�.��5��=�D��K�K� ;�Q��E��H�H�Q��%�
�9L�"3r2c�(�|jdd|�S)Nimi�)r9)r/r*s  r0�<lambda>zFileOperator.<lambda>?s��q�z�z�%���'Cr2c��tjj|�}||jvr�tjj	|�s�|jj|�tjj
|�\}}|j|�tjd|z�|jstj|�|jr|jj|�yyyy)NzCreating %s)rrrsrr�r
rr�rrrr��mkdirrr)r�rsr�r*s    r0rzFileOperator.ensure_dirAs����w�w���t�$���t�|�|�#�B�G�G�N�N�4�,@��L�L���T�"��7�7�=�=��&�D�A�q��O�O�A���K�K�
��,�-��<�<�������{�{��!�!�%�%�d�+��-A�#r2c��t||�}tjd||�|js�|s|j	||�r&|sd}n!|j|�sJ�|t
|�d}i}|r-ttd�rtjj|d<tj||dfi|��|j|�|S)NzByte-compiling %s to %s�PycInvalidationMode�invalidation_modeT)
rrrr�rr_rur��
py_compiler?�CHECKED_HASH�compiler)	r�rs�optimize�forcer��hashed_invalidation�dpath�diagpath�compile_kwargss	         r0�byte_compilezFileOperator.byte_compileMs���!�$�H��5�����-�t�U�;��|�|���
�
�4��/��#�H��?�?�6�2�2�2�#�C��K�L�1�H��N�"�w�z�;P�'Q�6@�6T�6T�6a�6a��2�3����t�U�H�d�M�n�M����u�%��r2c���tjj|��rAtjj|�r�tjj	|�sot
j
d|�|jstj|�|jr+||jvr|jj|�yyytjj	|�rd}nd}t
j
d||�|jstj|�|jr+||jvr|jj|�yyyy)NzRemoving directory tree at %s�link�filezRemoving %s %s)rrrsr
r#rr�debugr�r	r�rrr�r)r�rsr/s   r0�ensure_removedzFileOperator.ensure_removed^s���
�7�7�>�>�$���w�w�}�}�T�"�2�7�7�>�>�$�+?����<�d�C��|�|��M�M�$�'��;�;��t�0�0�0��)�)�0�0��6�1���7�7�>�>�$�'��A��A����-�q�$�7��|�|��I�I�d�O��;�;��t�1�1�1��*�*�1�1�$�7�2��! r2c���d}|srtjj|�r'tj|tj�}	|Stjj|�}||k(r	|S|}|s�r|Sr)rrrsr
�access�W_OKr)r�rsr+�parents    r0�is_writablezFileOperator.is_writablessn������w�w�~�~�d�#����4����1���
�
�	�W�W�_�_�T�*�F���~���
��D���
r2c�r�|jsJ�|j|jf}|j�|S)zV
        Commit recorded changes, turn off recording, return
        changes.
        )rrrr�)r�r+s  r0�commitzFileOperator.commits7��
�{�{��{��#�#�T�%6�%6�6�������
r2c���|js�t|j�D]7}tjj|�s�#tj|��9t|jd��}|D]n}tj|�}|r@|dgk(sJ�tjj||d�}tj|�tj|��p|j�y)NT)�reverse�__pycache__r)
r��listrrrrsr
r��sortedr�listdirr'�rmdirr�)r�r*�dirsr��flist�sds      r0�rollbackzFileOperator.rollback�s����|�|��$�,�,�-���7�7�>�>�!�$��I�I�a�L�.��$�+�+�T�:�D����
�
�1�
��� �]�O�3�3�3������a��q��2�B��H�H�R�L������
�	
���r2�F�Tr�)FFNF)r�r�r�r�r�rrrr(r+r.r9�set_executable_moderrJrOrTrVrarEr2r0r�r��sW���
"�
)�C�((�"
(�%�<�
&�D��
,��"8�*
��r2r�c���|tjvrtj|}nt|�}|�|}|S|jd�}t	||jd��}|D]}t	||�}�|S)N�.r)r��modules�
__import__r�r�rx)�module_name�dotted_path�modr+r.r�s      r0�resolverl�sy���c�k�k�!��k�k�+�&����%�������M�	�!�!�#�&����e�i�i��l�+���A��V�Q�'�F���Mr2c�F�eZdZd�Zed��Zd�Zd�ZejZ	y)�ExportEntryc�<�||_||_||_||_yr��rYr�r~r�)r�rYr�r~r�s     r0r�zExportEntry.__init__�s����	���������
r2c�B�t|j|j�Sr�)rlr�r~rs r0r�zExportEntry.value�s���t�{�{�D�K�K�0�0r2c	�p�d|j�d|j�d|j�d|j�d�	S)Nz
<ExportEntry r�r�rW�>rprs r0�__repr__zExportEntry.__repr__�s(��04�	�	�4�;�;�04���T�Z�Z�I�	Ir2c��t|t�sd}|S|j|jk(xrO|j|jk(xr4|j|jk(xr|j
|j
k(}|Sr)r�rnrYr�r~r�)r��otherr+s   r0�__eq__zExportEntry.__eq__�sw���%��-��F��
�	�i�i�5�:�:�-�0��k�k�U�\�\�1�0��k�k�U�\�\�1�0��j�j�E�K�K�/�
��
r2N)
r�r�r�r�r�r�rtrwr��__hash__rEr2r0rnrn�s1����1��1�I�����Hr2rnz�(?P<name>(\w|[-.+])+)
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      c���tj|�}|sd}d|vsd|vrtd|z��|S|j�}|d}|d}|j	d�}|dk(r|d}}n'|dk7rtd|z��|jd�\}}|d	}	|	�d|vsd|vrtd|z��g}	n,|	jd
�D�
cgc]}
|
j
���}	}
t||||	�}|Scc}
w)NrJrKzInvalid specification '%s'rY�callabler�rrr�rL)�ENTRY_RE�searchr�	groupdict�countr�r^rn)�
specificationr*r+r�rYrs�colonsr�r~r�r*s           r0r�r��s1�����
�&�A�����-��3�-�#7�"�$*�,9�$:�;�
;�.�M�)
�K�K�M����y����}�����C����Q�;�!�4�F�F���{�&�(.�0=�(>�?�?�!�Z�Z��_�N�F�F��'�
���=��m�#�s�m�';�&�(.�0=�(>�?�?��E�(-���C�(8�9�(8�1�Q�W�W�Y�(8�E�9��T�6�6�5�9���M��:s�C*c��|�d}tjdk(r2dtjvr tjj	d�}ntjjd�}tjj
|�r=tj|tj�}|s/tjd|�n	tj|�d}|s*tj�}tjd|�tjj||�S#t$rtjd|d�	�d
}Y�qwxYw)a�
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    z.distlib�nt�LOCALAPPDATAz
$localappdata�~z(Directory exists but is not writable: %sTzUnable to create %s)�exc_infoFz#Default location unusable, using %s)rrrY�environrs�
expandvars�
expanduserr#rQrRr�warning�makedirs�OSErrorr�r�r')r~r+�usables   r0�get_cache_baser��s����~���	�w�w�$��>�R�Z�Z�7����#�#�O�4�����#�#�C�(��
�w�w�}�}�V�����6�2�7�7�+����N�N�E�v�N�	��K�K����F���!�!�#�����<�f�E�
�7�7�<�<���'�'��
�	��N�N�0�&�4�N�H��F�	�s�D)�)#E�Ec��tjjtjj|��\}}|r|j	dd�}|j	tj
d�}||zdzS)a
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    r�z---z--z.cache)rrrs�
splitdriverr$rt)rsr�r�s   r0�path_to_cache_dirr�s_���7�7���b�g�g�o�o�d�3�4�D�A�q��
�I�I�c�5�!��	�	�	�"�&�&�$��A��q�5�8��r2c�2�|jd�s|dzS|Srp)�endswith)r/s r0�ensure_slashr�$s���:�:�c�?��3�w���Hr2c��dx}}d|vr1|jdd�\}}d|vr|}n|jdd�\}}|rt|�}|rt|�}|||fS)NrMrr�)�rsplitr�r)rc�username�passwordr�s    r0�parse_credentialsr�*sp����H�x�
�f�}����s�A�.�����f���H�!'���c�1�!5��H�h���8�$����8�$���X�v�%�%r2c�Z�tjd�}tj|�|S)N�)rr�umaskr�s r0�get_process_umaskr�9s ��
�X�X�d�^�F��H�H�V���Mr2c�d�d}d}t|�D]\}}t|t�r�d}n|�J�|S)NTF)�	enumerater�r)�seqr+rhr/s    r0�is_string_sequencer�>sA��
�F��A��#����1��!�\�*��F���
�=��=��Mr2z3([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-([a-z0-9_.+-]+)z
-py(\d\.?\d?)c��d}d}t|�jdd�}tj|�}|r$|j	d�}|d|j�}|rft
|�t
|�dzkDrLtjtj|�dz|�}|r|j�}|d|||dzd|f}|�:tj|�}|r#|j	d�|j	d�|f}|S)zw
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    NrW�-rz\br�)rr$�PYTHON_VERSIONr|r��startru�rer �escaper"�PROJECT_NAME_AND_VERSION)�filename�project_namer+�pyverr*�ns      r0�split_filenamer�Ms����F��E��x� �(�(��c�2�H����h�'�A������
���J�Q�W�W�Y�'����H�
��L�(9�A�(=�=��H�H�R�Y�Y�|�,�u�4�h�?�������A��b�q�\�8�A��E�F�#3�U�:�F�
�~�$�*�*�8�4����W�W�Q�Z������U�2�F��Mr2z-(?P<name>[\w .-]+)\s*\(\s*(?P<ver>[^\s)]+)\)$c��tj|�}|std|z��|j�}|dj	�j�|dfS)z�
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    z$Ill-formed name/version string: '%s'rY�ver)�NAME_VERSION_REr rr}r^r�)r�r*r�s   r0�parse_name_and_versionr�isV��	���a� �A���G�!�K�L�L�	���
�A��V�9�?�?��"�"�$�a��h�.�.r2c��t�}t|xsg�}t|xsg�}d|vr|jd�||z}|D]�}|dk(r|j|��|jd�r8|dd}||vrtjd|z�||vs�Q|j|��c||vrtjd|z�|j|���|S)N�*r�rzundeclared extra: %s)r�r�rr_rr�)�	requested�	availabler+�r�unwanteds     r0�
get_extrasr�xs���
�U�F��I�O��$�I��I�O��$�I�
�i��������)���
����8��J�J�q�M�
�\�\�#�
����u�H��y�(����5��@�A��6�!��
�
�h�'��	�!����5��9�:��J�J�q�M���Mr2c�t�i}	t|�}|j�}|jd�}|jd�stjd|�|St
jd�|�}tj|�}	|S#t$r"}tjd||�Yd}~|Sd}~wwxYw)NzContent-Typezapplication/jsonz(Unexpected response for JSON request: %sr�z&Failed to get external data for %s: %s)r
r�getr_rrNr�r�r�r�r��	exception)r\r+�resp�headers�ct�reader�es       r0�_get_external_datar��s���
�F�K��s�|���)�)�+��
�[�[��
(���}�}�/�0��L�L�C�R�H��M�
/�V�%�%�g�.�t�4�F��Y�Y�v�&�F��M���K����A�3��J�J��M��K�s�AB�0B�	B7�B2�2B7z'https://www.red-dove.com/pypi/projects/c�n�|dj��d|�d�}tt|�}t|�}|S)Nrrqz
/project.json��upperr�_external_data_base_urlr�)rYr\r+s   r0�get_project_datar��s2��"&�q�'�-�-�/�4�
8�C�
�)�3�
/�C�
��
$�F��Mr2c�p�|dj��d|�d|�d�}tt|�}t|�S)Nrrqz	/package-z.jsonr�)rY�versionr\s   r0�get_package_datar��s0��%)�!�W�]�]�_�d�G�
D�C�
�)�3�
/�C��c�"�"r2c�"�eZdZdZd�Zd�Zd�Zy)�Cachez�
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    c�d�tjj|�stj|�tj|�j
dzdk7rtjd|�tjjtjj|��|_
y)zu
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        �?rzDirectory '%s' is not privateN)rrrsr#r�rr3rr�r�normpathr})r�r}s  r0r�zCache.__init__�sm���w�w�}�}�T�"��K�K����G�G�D�M�!�!�D�(�Q�.��N�N�<�d�C��G�G�O�O�B�G�G�$4�$4�T�$:�;��	r2c��t|�S)zN
        Converts a resource prefix to a directory name in the cache.
        )r�)r�r�s  r0�
prefix_to_dirzCache.prefix_to_dir�s��!��(�(r2c��g}tj|j�D]�}tjj	|j|�}	tjj|�stjj
|�rtj|�n4tjj|�rtj|���|S#t$r|j|�Y��wxYw)z"
        Clear the cache.
        )
rrr\r}rsr'rrr�r#r	r�r�r%)r��not_removed�fns   r0�clearzCache.clear�s������*�*�T�Y�Y�'�B������d�i�i��,�B�
'��7�7�>�>�"�%�������);��I�I�b�M��W�W�]�]�2�&��M�M�"�%��
(�����
'��"�"�2�&�
'�s�BC�C9�8C9N)r�r�r��__doc__r�r�r�rEr2r0r�r��s���<�)�r2r�c�0�eZdZdZd�Zdd�Zd�Zd�Zd�Zy)	�
EventMixinz1
    A very simple publish/subscribe system.
    c��i|_yr�)�_subscribersrs r0r�zEventMixin.__init__�s
����r2c��|j}||vrt|g�||<y||}|r|j|�y|j|�y)a`
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        N)r�rr%�
appendleft)r��event�
subscriberr%�subs�sqs      r0rzEventMixin.add�sK��� � ��������-�D��K��e��B���	�	�*�%��
�
�j�)r2c�h�|j}||vrtd|z��||j|�y)z�
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        zNo subscribers: %rN)r�r�r�)r�r�r�r�s    r0r�zEventMixin.remove�s:��� � ������1�E�9�:�:��U����:�&r2c�L�t|jj|d��S)z�
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        rE)�iterr�r�)r�r�s  r0�get_subscriberszEventMixin.get_subscriberss"��
�D�%�%�)�)�%��4�5�5r2c���g}|j|�D] }	||g|��i|��}|j	|��"tjd||||�|S#t$rtjd�d}Y�PwxYw)a^
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        z"Exception during event publicationNz/publish %s: args = %s, kwargs = %s, result = %s)r�r�rr�r%rN)r�r��args�kwargsr+r�r�s       r0�publishzEventMixin.publish
s������.�.�u�5�J�
�"�5�:�4�:�6�:��
�M�M�%� �
6�	���F��D�&�&�	2��
��
�
�� � �!E�F���
�s�A� A5�4A5Nrc)	r�r�r�r�r�rr�r�r�rEr2r0r�r��s ����*�(
'�6�r2r�c�X�eZdZd�Zd�Zdd�Zd�Zd�Zd�Zd�Z	e
d��Ze
d	��Zy
)�	Sequencerc�>�i|_i|_t�|_yr�)�_preds�_succsr��_nodesrs r0r�zSequencer.__init__(s���������e��r2c�:�|jj|�yr�)r�r)r��nodes  r0�add_nodezSequencer.add_node-s��������r2c�8�||jvr|jj|�|r�t|jj	|d��D]}|j||��t|j
j	|d��D]}|j||��t
|jj��D]\}}|r�	|j|=�t
|j
j��D]\}}|r�	|j
|=�yy)NrE)r�r�r�r�r�r�rZr�)r�r��edgesr�r/r�rTs       r0�remove_nodezSequencer.remove_node0s����4�;�;���K�K���t�$���������r�2�3�����A�t�$�4��������r�2�3�����D�!�$�4��T�[�[�.�.�0�1���1�����A��2��T�[�[�.�.�0�1���1�����A��2�r2c���||k7sJ�|jj|t��j|�|jj|t��j|�yr�)r��
setdefaultr�rr�)r��pred�succs   r0rz
Sequencer.add@sP���t�|��|������t�S�U�+�/�/��5������t�S�U�+�/�/��5r2c��||k7sJ�	|j|}|j|}	|j	|�|j	|�y#t$rtd|z��wxYw#t$rt|�d|����wxYw)Nz%r not a successor of anythingz not a successor of )r�r��KeyErrorr�r�)r�r�r��preds�succss     r0r�zSequencer.removeEs����t�|��|�	F��K�K��%�E��K�K��%�E�	H��L�L����L�L����	�	F��=��D�E�E�	F��
�	H��4��F�G�G�	H�s�A�"A&�A#�&Bc�^�||jvxs||jvxs||jvSr�)r�r�r�)r��steps  r0�is_stepzSequencer.is_stepRs4������#�$�t�t�{�{�':�$�����#�	%r2c��|j|�std|z��g}g}t�}|j|�|r�|j	d�}||vr(||k7rr|j|�|j|�nO|j
|�|j|�|jj|d�}|j|�|r��t|�S)NzUnknown: %rrrE)r�r�r�r%rxr�rr�r��extend�reversed)r��finalr+�todo�seenr�r�s       r0�	get_stepszSequencer.get_stepsVs����|�|�E�"��]�U�2�3�3������u�����E����8�8�A�;�D��t�|��5�=��M�M�$�'��M�M�$�'�������
�
�d�#�������b�1�����E�"�� ���r2c���������dg�g�i�i�g�|j��������fd���D]}|�vs��|���S)Nrc����d�|<�d�|<�dxxdz
cc<�
j|�	�|}|D]>}|�vr�|�t�|�|��|<�%|�
vs�*t�|�|��|<�@�|�|k(rHg}	�
j�}|j|�||k(rn�(t	|�}�	j|�yy#t$rg}Y��wxYw�Nrr)r%r��minrx�tuple)r��
successors�	successor�connected_component�	component�graph�index�
index_counter�lowlinksr+�stack�
strongconnects     �������r0rz3Sequencer.strong_connections.<locals>.strongconnectzs���'��*�E�$�K�*�1�-�H�T�N��!���!���L�L���
 �"�4�[�
�(�	��H�,�!�)�,�%(��$����8K�%L�H�T�N��%�'�&)��$���i�8H�%I�H�T�N�(���~��t��,�&(�#�� %�	�	��I�'�.�.�y�9� �D�(�%��"�"5�6�	��
�
�i�(�-���
 ��
�
 �s�C
�
C�C)r�)	r�r�rrrrr+rrs	  @@@@@@@r0�strong_connectionszSequencer.strong_connectionsosW�����
������������� 	)� 	)�D�D��8�#��d�#���
r2c	��dg}|jD]0}|j|}|D]}|jd|�d|�d����2|jD]}|jd|z��|jd�dj|�S)Nzdigraph G {z  z -> rVz  %s;�}�
)r�r%r�r')r�r+r�r�r�r�s      r0�dotz
Sequencer.dot�s{������K�K�D��K�K��%�E����
�
�t�T�:�;�� ��K�K�D��M�M�'�D�.�)� ��
�
�c���y�y�� � r2Nrb)
r�r�r�r�r�r�rr�r�r�propertyrrrEr2r0r�r�'sO���
�'� 6�
H�%� �2�0��0�d�	!��	!r2r�)�.tar.gz�.tar.bz2�.tar�.zip�.tgz�.tbz�.whlc�\��
���
fd�}tjj���t���
d}|�d|j	d�rd}nP|j	d�rd}d}n:|j	d�rd}d	}n$|j	d
�rd}d}ntd
|z��	|dk(r.t
|d�}|rW|j�}|D]
}||��n7tj|�}|r|j�}|D]
}||��|dk7rftjddkrP|j�D]=}	t|	jt �r�|	jj#d�|	_�?|j%��|r|j'�yy#|r|j'�wwxYw)Nc�,��t|t�s|jd�}tjjtjj
�|��}|j��r|�tjk7rtd|z��y)Nr�zpath outside destination: %r)
r�r�decoderrrsrr'r_rtr�)rsr��dest_dir�plens  ��r0�
check_pathzunarchive.<locals>.check_path�sm����$�	�*��;�;�w�'�D��G�G�O�O�B�G�G�L�L��4�8�9���|�|�H�%��4��B�F�F�):��;�a�?�@�@�*;r2)rr �zip)rr�tgzzr:gz)rr�tbzzr:bz2r�tarr�zUnknown format for %rrr�r�)rrrsrrur�r�r�namelist�tarfiler$�getnamesr�r��
getmembersr�rYrr#�
extractallr�)�archive_filenamer$�formatrr&�archiver8�namesrY�tarinfor%s `        @r0�	unarchiver5�s����A��w�w���x�(�H��x�=�D��G�
�~��$�$�%5�6��F�
�
&�
&�':�
;��F��D�
�
&�
&�';�
<��F��D�
�
&�
&�v�
.��F��D��4�7G�G�H�H���U�?��.��4�G���(�(�*��!�D��t�$�"��l�l�#3�T�:�G���(�(�*��!�D��t�$�"��U�?�s�/�/��2�Q�6�
#�-�-�/��!�'�,�,�	�:�#*�<�<�#6�#6�w�#?�G�L�0�	���8�$���M�M�O���7��M�M�O��s�B2F�3F�F+c��tj�}t|�}t|d�5}t	j
|�D]d\}}}|D]Y}tjj||�}||d}	tjj|	|�}
|j||
��[�f	ddd�|S#1swY|SxYw)z*zip a directory tree into a BytesIO objectr N)	�io�BytesIOrurrr�walkrsr'r�)�	directoryr+�dlen�zfrvr^r7rY�full�relrs           r0�zip_dirr?�s���
�Z�Z�\�F��y�>�D�	���	��!#����!3��D�$�����w�w�|�|�D�$�/���4�5�k���w�w�|�|�C��.������t�$�	�"4�
��M�
��M�s�A=B4�4B>)r�K�M�G�T�Pc�v�eZdZdZd
d�Zd�Zd�Zd�Zd�Ze	d��Z
e	d��Zd	�Ze	d
��Z
e	d��Zy)�Progress�UNKNOWNc�j�|�||k\sJ�|x|_|_||_d|_d|_d|_y)NrF)r�cur�max�started�elapsed�done)r��minval�maxvals   r0r�zProgress.__init__s>���~��6�!1�1�1�$�$���4�8������������	r2c���|j|ksJ�|j�||jksJ�||_tj�}|j�||_y||jz
|_yr�)rrJrI�timerKrL)r��curval�nows   r0�updatezProgress.update
sb���x�x�6�!�!�!��x�x��6�T�X�X�#5�5�5�����i�i�k���<�<���D�L�����-�D�Lr2c�N�|dk\sJ�|j|j|z�y)Nr)rTrI)r��incrs  r0�	incrementzProgress.increments"���q�y��y����D�H�H�t�O�$r2c�<�|j|j�|Sr�)rTrrs r0r�zProgress.starts�����D�H�H���r2c�`�|j�|j|j�d|_y�NT)rJrTrMrs r0�stopz
Progress.stops#���8�8���K�K����!���	r2c�J�|j�|jS|jSr�)rJ�unknownrs r0�maximumzProgress.maximum!s��#�x�x�/�t�|�|�=�T�X�X�=r2c��|jrd}|S|j�d}|Sd|j|jz
z|j|jz
z}d|z}|S)Nz100 %z ?? %gY@z%3d %%)rMrJrIr)r�r+rTs   r0�
percentagezProgress.percentage%sf���9�9��F��
��X�X�
��F��
�����D�H�H�,�-����D�H�H�1D�E�A���\�F��
r2c��|dkr|j�|j|jk(rd}|Stjdtj
|��}|S)Nrz??:??:??z%H:%M:%S)rJrIrrQ�strftime�gmtime)r��durationr+s   r0�format_durationzProgress.format_duration0sM����M�t�x�x�/�4�8�8�t�x�x�3G��F�
�
��]�]�:�t�{�{�8�/D�E�F��
r2c�|�|jrd}|j}n�d}|j�d}n{|jdk(s|j|jk(rd}nPt|j|jz
�}||j|jz
z}|dz
|jz}|�d|j
|���S)N�DonezETA r�rrz: )rMrLrJrIr�floatre)r�r�ris   r0�ETAzProgress.ETA9s����9�9��F����A��F��x�x��������"�t�x�x�4�8�8�';����$�(�(�T�X�X�-�.���T�X�X����(�(����U�d�l�l�*��!�4�#7�#7��#:�;�;r2c��|jdk(rd}n&|j|jz
|jz}tD]}|dkrn|dz}�d|fzS)Nrgi�g@�@z%d %sB/s)rLrIr�UNITS)r�r+�units   r0�speedzProgress.speedLs]���<�<�1���F��h�h����)�T�\�\�9�F��D���}���f��F���V�T�N�*�*r2N)r�d)r�r�r�r]r�rTrWr�r[rr^r`rerirmrEr2r0rFrF�su���G��.�%���
�>��>�������<��<�$�	+��	+r2rFz\{([^}]*)\}z[^/\\,{]\*\*|\*\*[^/\\,}]z^[^{]*\}|\{[^}]*$c��tj|�rd}t||z��tj|�rd}t||z��t	|�S)zAExtended globbing function that supports ** and {opt1,opt2,opt3}.z7invalid glob %r: recursive glob "**" must be used alonez2invalid glob %r: mismatching set marker '{' or '}')�_CHECK_RECURSIVE_GLOBr|r��_CHECK_MISMATCH_SET�_iglob)�	path_globrs  r0rrasQ���#�#�I�.�K����y��)�)��!�!�)�,�F����y��)�)��)��r2c#�K�tj|d�}t|�dkDrXt|�dk(sJ|��|\}}}|jd�D](}tdj	|||f��D]}|����*yd|vrt|�D]}|���y|jdd�\}}|dk(rd}|dk(rd}n"|j
d�}|j
d	�}tj|�D]W\}}}	tjj|�}ttjj	||��D]}
|
����Yy�w)
Nrr�rLrz**rfr�rq�\)�	RICH_GLOBr�rurrr'�	std_iglobr(rrr9rsr�)rs�rich_path_globr�r�r~�itemrs�radical�dirr7r�s           r0rrrrls8�����_�_�Y��2�N�
�>��Q���>�"�a�'�7��7�'�,����V��I�I�c�N�D��r�w�w���f�'=�>�?���
�@�#��y� �!�)�,���
�-�(�o�o�d�A�6�O�F�G���|����"�}���"�.�.��-��!�.�.��.��$&�G�G�F�O� ��c�5��w�w�'�'��-�� ������d�G�!<�=�B��H�>�%4�s�EE)�HTTPSHandler�match_hostname�CertificateErrorc��eZdZdZdZd�Zy)�HTTPSConnectionNTc�*�tj|j|jf|j�}t|dd�r||_|j�tjtj�}ttd�r#|xjtjzc_|jr&|j|j|j �i}|j"rQtj$|_|j)|j"��ttdd�r|j|d<|j*|fi|��|_|j"r]|j,rP	t/|jj1�|j�t2j5d|j�yyy#t6$rE|jj9tj:�|jj=��wxYw)N�_tunnel_hostF�OP_NO_SSLv2)�cafile�HAS_SNI�server_hostnamezHost verified: %s)r��create_connection�host�port�timeoutr��sock�_tunnel�ssl�
SSLContext�PROTOCOL_SSLv23r��optionsr��	cert_file�load_cert_chain�key_file�ca_certs�
CERT_REQUIRED�verify_mode�load_verify_locations�wrap_socket�check_domainr}�getpeercertrrNr~�shutdown�	SHUT_RDWRr�)r�r��contextr�s    r0�connectzHTTPSConnection.connect�sv���+�+�T�Y�Y��	�	�,B�D�L�L�Q�D��t�^�U�3� ��	������n�n�S�%8�%8�9�G��s�M�*����3�?�?�2���~�~��'�'�����
�
�F��F��}�}�&)�&7�&7��#��-�-�T�]�]�-�C��3�	�5�1�04�	�	�F�,�-�+��+�+�D�;�F�;�D�I��}�}��!2�!2��"�4�9�9�#8�#8�#:�D�I�I�F��L�L�!4�d�i�i�@�"3�}��(���I�I�&�&�v�'7�'7�8��I�I�O�O�%���s�3AG�AH)r�r�r�r�r�r�rEr2r0r�r��s������	r2r�c� �eZdZdd�Zd�Zd�Zy)r|c�J�tj|�||_||_yr�)�BaseHTTPSHandlerr�r�r�)r�r�r�s   r0r�zHTTPSHandler.__init__�s���%�%�d�+�$�D�M� ,�D�r2c�x�t|i|��}|jr"|j|_|j|_|S)a
            This is called to create a connection instance. Normally you'd
            pass a connection class to do_open, but it doesn't actually check for
            a class, and just expects a callable. As long as we behave just as a
            constructor would have, we should be OK. If it ever changes so that
            we *must* pass a class, we'll create an UnsafeHTTPSConnection class
            which just sets check_domain to False in the class definition, and
            choose which one to pass to do_open.
            )r�r�r�)r�r�r�r+s    r0�_conn_makerzHTTPSHandler._conn_maker�s8��%�d�5�f�5�F��}�}�"&�-�-���&*�&7�&7��#��Mr2c��	|j|j|�S#t$r5}dt|j�vrtd|jz���d}~wwxYw)Nzcertificate verify failedz*Unable to verify server certificate for %s)�do_openr�r�str�reasonr~r�)r�rdr�s   r0�
https_openzHTTPSHandler.https_open�sc��
��|�|�D�$4�$4�c�:�:���
�.�#�a�h�h�-�?�*�,4�69�h�h�,?�@�@���
�s��	A�0A�ANrc)r�r�r�r�r�r�rEr2r0r|r|�s��	-�
	� 	r2r|c��eZdZd�Zy)�HTTPSOnlyHandlerc��td|z��)NzAUnexpected HTTP request on what should be a secure connection: %s)r)r�rds  r0�	http_openzHTTPSOnlyHandler.http_open�s���,�.1�2�3�
3r2N)r�r�r�r�rEr2r0r�r��s��	3r2r�c��eZdZdd�Zd�Zy)�	Transportc�R�||_tjj||�yr�)r�rr�r��r�r��use_datetimes   r0r�zTransport.__init__�s��������$�$�T�<�8r2c���|j|�\}}}|jr||jdk7r#||_|tj|�f|_|jdSr)�
get_host_info�_connection�_extra_headersr�HTTPConnection)r�r��h�eh�x509s     r0�make_connectionzTransport.make_connection�sd���(�(��.���2�t����4�4�+;�+;�A�+>�#>�"$�D��#�W�%;�%;�A�%>�>�D������"�"r2N�r�r�r�r�r�r�rEr2r0r�r��s��9�#r2r�c��eZdZdd�Zd�Zy)�
SafeTransportc�R�||_tjj||�yr�)r�rr�r�r�s   r0r�zSafeTransport.__init__�s��"�D�L��#�#�,�,�T�<�@r2c��|j|�\}}}|si}|j|d<|jr||jdk7r%||_|t	j
|dfi|��f|_|jdS)Nr�rr)r�r�r�r�rr�)r�r�r�r�r�s     r0r�zSafeTransport.make_connection�s��� �.�.�t�4�M�A�r�6���� $���F�9���#�#�t�t�/?�/?��/B�'B�&(��#�#'��)@�)@��D�*K�CI�*K�$K�� ��#�#�A�&�&r2Nr�r�rEr2r0r�r��s
��	A�		'r2r�c��eZdZd�Zy)�ServerProxyc��|jdd�x|_}|�Ht|�d}|jdd�}|dk(rt}nt
}|||��x|d<}||_tjj||fi|��y)Nr�rr��https)r��	transport)
rxr�rr�r�r�r�rr�r�)r�rgr�r�rbr��tclsris        r0r�zServerProxy.__init__s���!'���I�t�!<�<���w����c�]�1�%�F�!�:�:�n�a�8�L��� �$�� ��&*�7��&N�N�F�;��!��D�N����&�&�t�S�;�F�;r2N)r�r�r�r�rEr2r0r�r�s��<r2r�c�h�tjddkr|dz
}n
d|d<d|d<t||fi|��S)Nrr��br�newliner�r")r�r�r$)r�r8r�s   r0�	_csv_openr�sF��
�����Q��������y��%��z����D�#�F�#�#r2c�H�eZdZed�ed�ed�d�Zd�Zd�Zy)�CSVBaserL�"r)�	delimiter�	quotechar�lineterminatorc��|Sr�rErs r0�	__enter__zCSVBase.__enter__(����r2c�8�|jj�yr�)r�r�)r�r�s  r0�__exit__zCSVBase.__exit__+s�������r2N)r�r�r�r��defaultsr�r�rEr2r0r�r�!s(����X���X��d�)��H��r2r�c�"�eZdZd�Zd�Zd�ZeZy)�	CSVReaderc��d|vr>|d}tjddk\rtjd�|�}||_nt|dd�|_t
j|jfi|j��|_y)Nr�rr�r�rsr�)	r�r�r�r�r�r��csvr�r�)r�r�r�s   r0r�zCSVReader.__init__0st���v���H�%�F�����"�a�'�2��)�)�'�2�6�:�� �D�K�#�F�6�N�C�8�D�K��j�j����>��
�
�>��r2c��|Sr�rErs r0�__iter__zCSVReader.__iter__;r�r2c���t|j�}tjddkr8t	|�D]*\}}t|t�r�|jd�||<�,|S�Nrr�r�)�nextr�r�r�r�r�rr#)r�r+rhrys    r0r�zCSVReader.next>sY���d�k�k�"�����A���"�$�V�,���4�!�$�	�2� $���G� 4�F�1�I�-��
r2N)r�r�r�r�r�r��__next__rEr2r0r�r�/s��	?����Hr2r�c��eZdZd�Zd�Zy)�	CSVWriterc��t|d�|_tj|jfi|j��|_y)Nr )r�r�r��writerr�)r�r�r�s   r0r�zCSVWriter.__init__Is-����C�(����j�j����>��
�
�>��r2c���tjddkr=g}|D]4}t|t�r|j	d�}|j|��6|}|jj|�yr�)r�r�r�rr-r%r��writerow)r��rowr�rys    r0r�zCSVWriter.writerowMs`�����A���"��A����d�I�.��;�;�w�/�D��������C������S�!r2N)r�r�r�r�r�rEr2r0r�r�Hs��?�"r2r�c�`��eZdZeej
�Zded<d�fd�	Zd�Zd�Zd�Z	�xZ
S)�Configurator�inc_convert�incc�f��tt|�|�|xstj�|_yr�)�superr�r�rrr�r})r��configr}�	__class__s   �r0r�zConfigurator.__init__`s$���
�l�D�*�6�2��'�B�I�I�K��	r2c�������fd��|jd�}t|�s�j|�}|jdd�}|jdd�}|rt|D�cgc]
}�|���c}�}|D�cgc]}t	|�s�|�||�f��}}t|�}||i|��}	|r+|j
�D]\}
}t|	|
�|���|	Scc}wcc}w)Nc�.��t|ttf�r't|�|D�cgc]
}�|���c}�}|St|t�r0d|vr�j|�}|Si}|D]}�||�||<�|S�j
|�}|Scc}w�N�())r�rZr	�type�dict�configure_custom�convert)�orhr+r�r�r�s    ��r0r�z.Configurator.configure_custom.<locals>.convertes�����!�d�E�]�+� ��a��a�!8�a��'�!�*�a�!8�9���M��A�t�$��1�9�!�2�2�1�5�F��M� �F���$+�A�a�D�M��q�	���M����a����M��"9s�Br�rfz[]rE)rxrzrlr	rr�r��setattr)
r�r�r��propsr�r�r�r�r�r+r�rTr�s
`           @r0r�zConfigurator.configure_customds����	�
�J�J�t�����{����Q��A��
�
�3��%���z�z�$��#����d�3�d��'�!�*�d�3�4�D�28�K�&�Q�K��N�!�W�V�A�Y�'�(�&��K��e����D�#�F�#������
���1����7�1�:�.�&��
��4��Ks�%C#�?C(�C(c��|j|}t|t�r$d|vr |j|�x|j|<}|Sr�)r�r�r�r�)r�r�r+s   r0�__getitem__zConfigurator.__getitem__�sC�����S�!���f�d�#����(,�(=�(=�f�(E�E�D�K�K���v��
r2c��tjj|�s*tjj|j|�}tj|dd��5}tj|�}ddd�|S#1swYSxYw)z*Default converter for the inc:// protocol.r�r�r!N)	rrrs�isabsr'r}r�r$r�r�)r�r�r*r+s    r0r�zConfigurator.inc_convert�s^���w�w�}�}�U�#��G�G�L�L����E�2�E�
�[�[���g�
6�!��Y�Y�q�\�F�7��
�7��
�s�"B�Br�)r�r�r�r�r�value_convertersr�r�r�r��
__classcell__)r�s@r0r�r�[s4����,�=�=�>��+��U��(��>�r2r�c�$�eZdZdZdd�Zd�Zd�Zy)�SubprocessMixinzC
    Mixin for running subprocesses and capturing their output
    Nc� �||_||_yr�)�verbose�progress)r�rrs   r0r�zSubprocessMixin.__init__�s����� ��
r2c�r�|j}|j}	|j�}|sn{|�
|||�nn|s tjjd�n.tjj|j
d��tjj���|j�y)z�
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        Nrfr�)	rr�readliner��stderrr�r#�flushr�)r�r�r�rrr/s      r0r�zSubprocessMixin.reader�s���
�=�=���,�,������!�A����#���G�$���J�J�$�$�S�)��J�J�$�$�Q�X�X�g�%6�7��
�
� � �"��	���r2c�Z�tj|ftjtjd�|��}tj|j
|jdf��}|j�tj|j
|jdf��}|j�|j�|j�|j�|j�|jdd�|S|jrtjjd�|S)N)�stdoutrr)rr�rzdone.�mainzdone.
)�
subprocess�Popen�PIPE�	threading�Threadr�rr�r�waitr'rrr�r�)r��cmdr�r��t1�t2s      r0�run_commandzSubprocessMixin.run_command�s������S�
?����$.�O�O�
?�7=�
?��
�
�
�T�[�[����(�7K�
L��
���
�
�
�
�T�[�[����(�7K�
L��
���
�	����
���	�
���	��=�=�$��M�M�'�6�*����\�\��J�J���Y�'��r2)FN)r�r�r�r�r�r�rrEr2r0rr�s���!��*r2rc�L�tjdd|�j�S)z,Normalize a python package name a la PEP 503z[-_.]+r�)r��subr�)rYs r0�normalize_namer�s ���6�6�(�C��&�,�,�.�.r2c�(�eZdZdZdZdd�Zd�Zd�Zy)�
PyPIRCFilezhttps://upload.pypi.org/legacy/�pypiNc��|�=tjjtjjd�d�}||_||_y)Nr�z.pypirc)rrrsr'r�r�r\)r�r�r\s   r0r�zPyPIRCFile.__init__�s8��
�:������b�g�g�0�0��5�y�A�B���
���r2c��i}tjj|j��r�|jxs|j
}t
j�}|j|j�|j�}d|v�r|jdd�}|jd�D�cgc]%}|j�dk7r|j���'}}|gk(r	d|vr�dg}|S|D]�}d|i}|j|d�|d<d|j
fd	|jfd
fD]2\}}	|j||�r|j||�||<�.|	||<�4|dk(r ||j
dfvr|j
|d<��|d|k7s��|d|k7s��i}��|Sd|vred}|j|d�r|j|d�}n|j
}|j|d�|j|d�|||jd
�}|Scc}w)N�	distutilsz
index-serversrrr�serverr��
repository�realm)r�Nzserver-loginr�)r�r�r!r r")rrrsr
r�r\�DEFAULT_REPOSITORYr�RawConfigParserr�r�r�r�r^�
DEFAULT_REALM�
has_option)
r�r+r!r�r��
index_serversr �_serversr�r�s
          r0r�zPyPIRCFile.read�s.����
�7�7�>�>�$�-�-�(����<�T�%<�%<�J�!�1�1�3�F��K�K��
�
�&����(�H��h�&� &�
�
�;�� H�
�)�/�/��5�5�5�06�%�|�|�~��3�#�L�L�N�5��5��r�>���)�$*�8��L�
�I#+��"*�F�!3��-3�Z�Z��
�-K��z�*�/;�D�<S�<S�-T�.5�t�7I�7I�-J�-?�-A�L�C�� &�0�0���=�.4�j�j���.E��s��.5��s��
-A�#�f�,�&�4�+B�+B�F�*K�K�37�3J�3J�F�<�0�$�X�.�*�<�$�\�2�j�@�%'�F�+#+�H�
� �8�+�'���$�$�V�\�:�!'���F�L�!A�J�!%�!8�!8�J� &�
�
�6�:� >� &�
�
�6�:� >�",�$�!�/�/����
��Y5s�0*Hc�Z�tj�}|j}|j|�|j	d�s|jd�|j
dd|�|j
dd|�t|d�5}|j|�ddd�y#1swYyxYw)Nrr�r�r )	rr$r�r��has_sectionr�r�r$r�)r�r�r�r�r�r*s      r0rTzPyPIRCFile.updates����-�-�/��
�]�]�����B���!�!�&�)����v�&��
�
�6�:�x�0��
�
�6�:�x�0�
�"�c�]�a��L�L��O��]�]�s�B!�!B*�NN)r�r�r�r#r%r�r�rTrEr2r0rr�s��:���M��8�t
r2rc�J�t|j��j�S)zG
    Read the PyPI access configuration as supported by distutils.
    )r\)rr\r��rs r0�_load_pypircr. s���%�)�)�$�)�)�+�+r2c�`�t�j|j|j�yr�)rrTr�r�r-s r0�
_store_pypircr0&s���L���������7r2c��tjdk(rsdtjj	�vrydtjj	�vrydtjj	�vrytj
SdtjvrtjdStjd	k7sttd
�stj
Stj�\}}}}}|j	�jdd�}|jd
d�jdd�}|dddk(r|�d|��S|dddk(rB|ddk\r�d}dt|d�dz
|ddfz}ddd�}|d|tjzz
}n�|dddk(r
ddlm
}|�S|dd d!k(rJd!}tjd"tj �}|j#|�}|rQ|j%�}n@|dd d#k(r8ddl}	ddl}
|	j+|
j,j/�|||�\}}}|�d|�d|��S)$a�Return a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
    distributions.  Typically includes the OS name and version and the
    architecture (as supplied by 'os.uname()'), although the exact information
    included depends on the OS; eg. on Linux, the kernel version isn't
    particularly important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.

    r��amd64�	win-amd64z(arm)�	win-arm32z(arm64)z	win-arm64�_PYTHON_HOST_PLATFORMr0�unamerqrrWrjr�N��linux�sunosr�5�solarisz%d.%sr���32bit�64bit)i���l����z.%s�aix)�aix_platform��cygwinz[\d.]+�darwin)rrrYr�r�r��platformr�r�r6r$�int�maxsize�_aix_supportr@r�rC�ASCIIr r��_osx_support�distutils.sysconfig�get_platform_osx�	sysconfig�get_config_vars)�osnamer��releaser��machine�bitnessr@�rel_rer*rIrs           r0�get_host_platformrS.s��(
�w�w�$���c�k�k�'�'�)�)���c�k�k�'�'�)�)������)�)�+�+���|�|���"�*�*�,��z�z�1�2�2�	�w�w�'����W�!5��|�|��13���
�-�V�T�7�G�W��\�\�^�
#�
#�C��
,�F��o�o�c�3�'�/�/��S�9�G�
�b�q�z�W��"�7�+�+�	����w�	��1�:����F���W�Q�Z��1�!4�g�a�b�k� B�B�G�#*�w�G�G��u�w�s�{�{�3�3�3�G�	����u�	�-��~��	����x�	������Y����1���L�L��!����g�g�i�G�	����x�	�0�#/�#@�#@�(1�(;�(;�(K�(K�(M�(.���$B� ���� ��'�2�2r2�win32r3r4)�x86�x64�armc��tjdk7r
t�Stjj	d�}|t
vr
t�St
|S)Nr��VSCMD_ARG_TGT_ARCH)rrrYrSr�r��_TARGET_TO_PLAT)�cross_compilation_targets r0�get_platformr\�sG��	�w�w�$�� �"�"�!�z�z�~�~�.B�C����6� �"�"��3�4�4r2r+)�r�rZ)�r��collectionsr�
contextlibr��globrrwr7r��loggingrrrAr�r�r��ImportErrorr
r�r,r�r�r�dummy_threadingrQrr�compatrrr	r
rrr
rrrrrrrrrrrrrr�	getLoggerr�rrCrrQrPr;rDr@rar&rGrmr�r�r�r�r�r�r��contextmanagerr�r�r�r�r�r�r�rlrn�VERBOSEr{r�r�r�r�r�r�r��Ir�r�r�r�r�r�r�r�r�r�r�r�r��ARCHIVE_EXTENSIONSr5r?rkrFrvrprqrrr|r�r}r~r�r�r�r�r�r�r�r�r�r�rrrr.r0rSrZr\rEr2r0�<module>rjs)��
���
�#�	���	��	�
����
����(����(�(�(�(�(�(�
��	�	�8�	$���R�Z�Z�)�
*�
��R�Z�Z� 3�4��
�R�Z�Z�5�
6�
��B�J�J�D�E�	��R�Z�Z�����b�j�j�����B�J�J�{�#�	��r�z�z�E�F��V!�rz@�z�4��$

� �,�^�&���������������&��&��f�� �6u�6�u�n��&��8�2�:�:���:�:�'��
�>&(�R�"
�&��
�&�2�:�:�'8�9;���?������,�-���2�"�*�*�9�:��
/��2�(D���#�)�F�)�XC��C�PE!��E!�V.��3�l�"	$��W+�v�W+�z
�B�J�J�~�&�	�"��
�
�#?�@�� �b�j�j�!5�6����6�+�+��'�1�1��B�'��R3�<��3�
#�	�#�#�
#��'�	�/�/�'�"<�)�'�'�<�,$��f�����2
"��
"�&4�#�4�n+�f�+�\/�O��O�b,�8�N3�d
�����5��g;��
�C����(�'�(�s#�M7�N�7N�N�	N�Npython3.12/site-packages/pip/_vendor/distlib/__pycache__/version.cpython-312.pyc000064400000072751151732701630023410 0ustar00�

R`i�[����dZddlZddlZddlmZddlmZgd�Zeje	�Z
Gd�de�ZGd	�d
e
�ZGd�de
�Zej d
�Zd�ZeZGd�de�Zd�ZGd�de�Zej d�dfej d�dfej d�dfej d�dfej d�dfej d�dfej d�dfej d �d!fej d"�d#fej d$�d%ff
Zej d&�dfej d'�dfej d(�dfej d�dfej d)�dffZej d*�Zd+�Zd,�Zej d-ej8�Zd.d.d/d.d0ddd1�Zd2�ZGd3�d4e�Z Gd5�d6e�Z!ej d7ej8�Z"d8�Z#d9�Z$Gd:�d;e�Z%Gd<�d=e�Z&Gd>�d?e
�Z'e'eee�e'ee!d@��e'e$e&e�dA�Z(e(dBe(dC<dD�Z)y)Ez~
Implementation of a flexible versioning scheme providing support for PEP-440,
setuptools-compatible and semantic versioning.
�N�)�string_types��parse_requirement)�NormalizedVersion�NormalizedMatcher�
LegacyVersion�
LegacyMatcher�SemanticVersion�SemanticMatcher�UnsupportedVersionError�
get_schemec��eZdZdZy)r
zThis is an unsupported version.N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/version.pyr
r
s��)�rr
c�d�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zed
��Zy)�Versionc��|j�x|_}|j|�x|_}t	|t
�sJ�t
|�dkDsJ�y)Nr)�strip�_string�parse�_parts�
isinstance�tuple�len)�self�s�partss   r�__init__zVersion.__init__sH���7�7�9�$���q�"�j�j��m�+���e��%��'�'�'��5�z�A�~��~rc��td��)Nzplease implement in a subclass��NotImplementedError�r!r"s  rrz
Version.parse%s��!�"B�C�Crc�T�t|�t|�k7rtd|�d|����y�Nzcannot compare z and )�type�	TypeError�r!�others  r�_check_compatiblezVersion._check_compatible(s'����:��e��$��$��F�G�G�%rc�V�|j|�|j|jk(S�N�r/rr-s  r�__eq__zVersion.__eq__,s#�����u�%��{�{�e�l�l�*�*rc�&�|j|�Sr1�r3r-s  r�__ne__zVersion.__ne__0����;�;�u�%�%�%rc�V�|j|�|j|jkSr1r2r-s  r�__lt__zVersion.__lt__3s#�����u�%��{�{�U�\�\�)�)rc�L�|j|�xs|j|�Sr1�r9r3r-s  r�__gt__zVersion.__gt__7s"���K�K��&�<�$�+�+�e�*<�=�=rc�J�|j|�xs|j|�Sr1r;r-s  r�__le__zVersion.__le__:����{�{�5�!�7�T�[�[��%7�7rc�J�|j|�xs|j|�Sr1)r<r3r-s  r�__ge__zVersion.__ge__=r?rc�,�t|j�Sr1)�hashr�r!s r�__hash__zVersion.__hash__As���D�K�K� � rc�N�|jj�d|j�d�S)Nz('z')��	__class__rrrDs r�__repr__zVersion.__repr__Ds��!�^�^�4�4�d�l�l�C�Crc��|jSr1�rrDs r�__str__zVersion.__str__G����|�|�rc��td��)NzPlease implement in subclasses.r&rDs r�
is_prereleasezVersion.is_prereleaseJs��!�"C�D�DrN)rrrr$rr/r3r6r9r<r>rArErIrL�propertyrOrrrrrsW���D�H�+�&�*�>�8�8�!�D���E��Errc	�|�eZdZdZd�d�d�d�d�d�d�d	�d
�Zd�Zd�Zd
�Zed��Z	d�Z
d�Zd�Zd�Z
d�Zd�Zy)�MatcherNc��||kSr1r��v�c�ps   r�<lambda>zMatcher.<lambda>T���Q��Urc��||kDSr1rrTs   rrXzMatcher.<lambda>UrYrc��||k(xs||kSr1rrTs   rrXzMatcher.<lambda>V���a�1�f�o��A��orc��||k(xs||kDSr1rrTs   rrXzMatcher.<lambda>Wr\rc��||k(Sr1rrTs   rrXzMatcher.<lambda>X���a�1�frc��||k(Sr1rrTs   rrXzMatcher.<lambda>Ys��q�A�vrc��||k(xs||kDSr1rrTs   rrXzMatcher.<lambda>[r\rc��||k7Sr1rrTs   rrXzMatcher.<lambda>\r_r)�<�>�<=�>=�==�===�~=�!=c��t|�Sr1rr(s  rrzMatcher.parse_requirementas
�� ��#�#rc�,�|j�td��|j�x|_}|j	|�}|std|z��|j
|_|j
j
�|_g}|jrw|jD]h\}}|jd�r+|dvrtd|z��|ddd}}|j|�n|j|�d}}|j|||f��jt|�|_y)	NzPlease specify a version classz
Not valid: %rz.*)rgrjz#'.*' not allowed for %r constraints���TF)
�
version_class�
ValueErrorrrr�name�lower�key�constraints�endswith�appendrr)r!r"�r�clist�op�vn�prefixs       rr$zMatcher.__init__ds�����%��=�>�>��7�7�9�$���q��"�"�1�%����_�q�0�1�1��F�F��	��9�9�?�?�$������=�=������A��:�:�d�#���-�(�*:�<>�*?�@�@�"#�3�B����B��&�&�r�*�"&�!3�!3�A�!6���B����b�"�f�-�.�'��E�l��rc�F�t|t�r|j|�}|jD]q\}}}|jj|�}t|t�rt
||�}|s&|�d|jj��}t|��||||�r�qyy)z�
        Check if the provided version matches the constraints.

        :param version: The version to match against this instance.
        :type version: String or :class:`Version` instance.
        z not implemented for FT)
rrrnr�
_operators�get�getattrrHrr')r!�version�operator�
constraintrz�f�msgs       r�matchz
Matcher.match�s����g�|�,��(�(��1�G�,0�K�K�(�H�j�&����#�#�H�-�A��!�\�*��D�!�$���#+�T�^�^�-D�-D�F��)�#�.�.��W�j�&�1��-8�rc��d}t|j�dk(r&|jdddvr|jdd}|S)Nrr)rgrh)r r)r!�results  r�
exact_versionzMatcher.exact_version�sC�����t�{�{��q� �T�[�[��^�A�%6�-�%G��[�[��^�A�&�F��
rc��t|�t|�k7s|j|jk7rtd|�d|����yr*)r+rpr,r-s  rr/zMatcher._check_compatible�s7����:��e��$��	�	�U�Z�Z�(?��$��F�G�G�)@rc��|j|�|j|jk(xr|j|jk(Sr1)r/rrrr-s  rr3zMatcher.__eq__�s5�����u�%��x�x�5�9�9�$�D�������)D�Drc�&�|j|�Sr1r5r-s  rr6zMatcher.__ne__�r7rc�X�t|j�t|j�zSr1)rCrrrrDs rrEzMatcher.__hash__�s���D�H�H�~��T�[�[� 1�1�1rc�N�|jj�d|j�d�S)N�(�)rGrDs rrIzMatcher.__repr__�s���>�>�2�2�D�L�L�A�Arc��|jSr1rKrDs rrLzMatcher.__str__�rMr)rrrrnr|rr$r�rPr�r/r3r6rErIrLrrrrRrROsl���M�#�
"�-�-�$�%�-�$�
�J�$�#�:�*����H�E�&�2�B�rrRzk^v?(\d+!)?(\d+(\.\d+)*)((a|b|c|rc)(\d+))?(\.(post)(\d+))?(\.(dev)(\d+))?(\+([a-zA-Z\d]+(\.[a-zA-Z\d]+)?))?$c� �|j�}tj|�}|std|z��|j	�}td�|dj
d�D��}t|�dkDr$|ddk(r|dd}t|�dkDr	|ddk(r�|dsd}nt|ddd�}|dd}|d	d
}|dd}|d
}|dk(rd}n|dt|d�f}|dk(rd}n|dt|d�f}|dk(rd}n|dt|d�f}|�d}nVg}	|j
d�D]5}
|
j�rdt|
�f}
nd|
f}
|	j|
��7t|	�}|s	|s|rd}nd}|sd}|sd}||||||fS)NzNot a valid version: %sc3�2K�|]}t|����y�wr1��int��.0rUs  r�	<genexpr>z_pep_440_key.<locals>.<genexpr>�s����6�!5�A��Q��!5���r�.���r����	�
��
)NNr)�ar�)�z)�_)�final)r�PEP440_VERSION_REr�r
�groupsr�splitr r��isdigitru)r"�mr��nums�epoch�pre�post�dev�localr#�parts           r�_pep_440_keyr��s���	���	�A�����"�A��%�&?�!�&C�D�D�
�X�X�Z�F��6�������!5�6�6�D�

�d�)�a�-�D��H��M��C�R�y���d�)�a�-�D��H��M��!�9����F�1�I�c�r�N�#��
��1�+�C��!�A�;�D�
��B�-�C��2�J�E�
�l�����!�f�c�#�a�&�k�!���|�����A�w��D��G��$��
�l�����!�f�c�#�a�&�k�!���}������K�K��$�D��|�|�~��3�t�9�~���4�y���L�L���%��e�������C��C��������$��T�3��-�-rc�:�eZdZdZd�Zegd��Zed��Zy)raIA rational version.

    Good:
        1.2         # equivalent to "1.2.0"
        1.2.0
        1.2a1
        1.2.3a2
        1.2.3b1
        1.2.3c1
        1.2.3.4
        TODO: fill this out

    Bad:
        1           # minimum two numbers
        1.2a        # release level must have a release serial
        1.2.3b
    c��t|�}tj|�}|j�}t	d�|djd�D��|_|S)Nc3�2K�|]}t|����y�wr1r�r�s  rr�z*NormalizedVersion.parse.<locals>.<genexpr>s����$J�5I��S��V�5I�r�rr�)�_normalized_keyr�r�r�rr��_release_clause)r!r"r�r�r�s     rrzNormalizedVersion.parse
sN�� ��#��

�#�#�A�&�������$�$J�V�A�Y�_�_�S�5I�$J�J����
r)r��brV�rcr�c�@��t�fd��jD��S)Nc3�F�K�|]}|s�|d�jv���y�w)rN)�PREREL_TAGS)r��tr!s  �rr�z2NormalizedVersion.is_prerelease.<locals>.<genexpr>s#�����F�[��A�1�Q�4�4�+�+�+�[�s�!�!)�anyrrDs`rrOzNormalizedVersion.is_prereleases����F�T�[�[�F�F�FrN)	rrrrr�setr�rPrOrrrrr�s-���"	��2�3�K�
�G��Grrc��t|�}t|�}||k(ry|j|�syt|�}||dk(S)NTFr�)�str�
startswithr )�x�y�ns   r�
_match_prefixr�sC���A��A��A��A��A�v���<�<��?���A��A��Q�4�3�;�rc	�\�eZdZeZddddddddd	�Zd
�Zd�Zd�Zd
�Z	d�Z
d�Zd�Zd�Z
d�Zy)r�_match_compatible�	_match_lt�	_match_gt�	_match_le�	_match_ge�	_match_eq�_match_arbitrary�	_match_ne)rircrdrerfrgrhrjc���|rd|vxr|jd}n!|jdxr|jd}|r0|jjdd�d}|j|�}||fS)N�+r�rr)rrr�rn)r!rr�rz�strip_localr"s      r�
_adjust_localzNormalizedMatcher._adjust_local6sy����Z�/�F�G�N�N�2�4F�K�)�/�/��3�3�J����r�8J�K�����%�%�c�1�-�a�0�A��(�(��+�G��
�"�"rc���|j|||�\}}||k\ry|j}dj|D�cgc]
}t|���c}�}t	||�Scc}w�NFr��r�r��joinr�r��r!rr�rz�release_clause�i�pfxs       rr�zNormalizedMatcher._match_ltD�g��"�0�0��*�f�M�����j� ��#�3�3���h�h��7��1��A���7�8�� ��#�.�.�.��8��Ac���|j|||�\}}||kry|j}dj|D�cgc]
}t|���c}�}t	||�Scc}wr�r�r�s       rr�zNormalizedMatcher._match_gtLr�r�c�8�|j|||�\}}||kSr1�r��r!rr�rzs    rr�zNormalizedMatcher._match_leT�&��"�0�0��*�f�M�����*�$�$rc�8�|j|||�\}}||k\Sr1r�r�s    rr�zNormalizedMatcher._match_geXr�rc�\�|j|||�\}}|s||k(}|St||�}|Sr1�r�r��r!rr�rzr�s     rr�zNormalizedMatcher._match_eq\sB��"�0�0��*�f�M�������+�F��
�#�7�J�7�F��
rc�0�t|�t|�k(Sr1)r�r�s    rr�z"NormalizedMatcher._match_arbitraryds���7�|�s�:��.�.rc�^�|j|||�\}}|s||k7}|St||�}|Sr1r�r�s     rr�zNormalizedMatcher._match_negsE��"�0�0��*�f�M�������+�F��
�'�w�
�;�;�F��
rc��|j|||�\}}||k(ry||kry|j}t|�dkDr|dd}dj|D�cgc]
}t	|���c}�}t||�Scc}w)NTFrr�r�)r�r�r r�r�r�r�s       rr�z#NormalizedMatcher._match_compatibleos���"�0�0��*�f�M�����j� ���Z���$�3�3���~���"�+�C�R�0�N��h�h��7��1��A���7�8���W�c�*�*��8s�A6N)rrrrrnr|r�r�r�r�r�r�r�r�r�rrrrr'sU��%�M�"�
�
����!��	�J�#�/�/�%�%��/��+rrz[.+-]$�z^[.](\d)z0.\1z^[.-]z
^\((.*)\)$�\1z^v(ersion)?\s*(\d+)z\2z^r(ev)?\s*(\d+)z[.]{2,}r�z\b(alfa|apha)\b�alphaz\b(pre-alpha|prealpha)\bz	pre.alphaz	\(beta\)$�betaz
^[:~._+-]+z
[,*")([\]]z[~:+_ -]z\.$z
(\d+(\.\d+)*)c�v�|j�j�}tD]\}}|j||�}�|sd}tj|�}|sd}|}�n|j
�djd�}|D�cgc]
}t|���}}t|�dkr |jd�t|�dkr� t|�dk(r||j�d}nDdj|ddD�cgc]
}t|���c}�||j�dz}|dd}dj|D�cgc]
}t|���c}�}|j�}|r tD]\}}|j||�}�|s|}nd|vrdnd}||z|z}t|�sd}|Scc}wcc}wcc}w)	z�
    Try to suggest a semantic form for a version for which
    _suggest_normalized_version couldn't come up with anything.
    z0.0.0rr��Nr��-r�)rrq�
_REPLACEMENTS�sub�_NUMERIC_PREFIXr�r�r�r�r ru�endr�r��_SUFFIX_REPLACEMENTS�	is_semver)	r"r��pat�replr�rz�suffixr��seps	         r�_suggest_semantic_versionr��s���
�W�W�Y�_�_�
�F�"�	��T�����v�&��#����
	���f�%�A����������A��$�$�S�)��"(�)�&�Q�#�a�&�&��)��&�k�A�o��M�M�!���&�k�A�o��v�;�!���A�E�E�G�H�%�F��X�X�v�a�b�z�:�z�!�s�1�v�z�:�;�f�Q�U�U�W�X�>N�N�F��B�Q�Z�F����6�2�6�a�3�q�6�6�2�3�������
�.�I�C���W�W�T�6�*�F�.�����f�_�c�#���#���&���V�����M��/*��;��2s�F,�<F1�=F6c���	t|�|S#t$rYnwxYw|j�}dD]\}}|j||�}�t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd	|�}t	j
d
d|�}|j
d�r|d
d}t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd|�}t	j
dd |�}	t|�|S#t$rd}Y|SwxYw)!a�Suggest a normalized version close to the given version string.

    If you have a version string that isn't rational (i.e. NormalizedVersion
    doesn't like it) then you might be able to get an equivalent (or close)
    rational version from this function.

    This does a number of simple normalizations to the given string, based
    on observation of versions currently in use on PyPI. Given a dump of
    those version during PyCon 2009, 4287 of them:
    - 2312 (53.93%) match NormalizedVersion without change
      with the automatic suggestion
    - 3474 (81.04%) match when using this suggestion method

    @param s {str} An irrational version string.
    @returns A rational version string, or None, if couldn't determine one.
    ))z-alphar�)z-betar�)r�r�)r�r�)r�rV)z-finalr�)z-prerV)z-releaser�)z.releaser�)z-stabler�)r�r�)r�r�)� r�)z.finalr�)r�r�zpre$�pre0zdev$�dev0z([abc]|rc)[\-\.](\d+)$z\1\2z[\-\.](dev)[\-\.]?r?(\d+)$z.\1\2z[.~]?([abc])\.?r�rUrNz\b0+(\d+)(?!\d)z(\d+[abc])$z\g<1>0z\.?(dev-r|dev\.r)\.?(\d+)$z.dev\2z-(a|b|c)(\d+)$z[\.\-](dev|devel)$z.dev0z(?![\.\-])dev$z(final|stable)$r�z\.?(r|-|-r)\.?(\d+)$z.post\2z\.?(dev|git|bzr)\.?(\d+)$z\.?(pre|preview|-c)(\d+)$zc\g<2>zp(\d+)$z.post\1)r�r
rq�replace�rer�r�)r"�rs�origr�s    r�_suggest_normalized_versionr�s���"
�������"�
��
��
����B�&�
��d��Z�Z��d�
#��
&�
�����"�	%�B�	�����"�	%�B�

���)�7�B�	7�B�
���-�x��	<�B�
���"�E�2�	.�B�
�}�}�S��
���V��

���"�E�2�	.�B�

����	�2�	.�B�
���-�y�"�	=�B�
���!�7�B�	/�B�
���%�x��	4�B�
���!�8�R�	0�B�
���"�B��	+�B�
���'��R�	8�B�
���,�i��	<�B�
���,�i��	<�B�
���
�J��	+�B������I��#��
��
�I��s��	��G�G-�,G-z([a-z]+|\d+|[\.-])rVzfinal-�@)r��previewr�r�r�r�r�c��d�}g}||�D]s}|jd�rO|dkr%|r#|ddk(r|j�|r	|ddk(r�|r#|ddk(r|j�|r	|ddk(r�|j|��ut|�S)Nc� �g}tj|j��D]T}tj	||�}|s�d|ddcxkrdkrnn|jd�}nd|z}|j
|��V|j
d�|S)N�0r�9��*�*final)�
_VERSION_PARTr�rq�_VERSION_REPLACEr}�zfillru)r"r�rWs   r�	get_partsz_legacy_key.<locals>.get_partsCs�����$�$�Q�W�W�Y�/�A� �$�$�Q��*�A���!�B�Q�%�&�3�&�����
�A��a��A��
�
�a� �0�	�
�
�h���
rrrr�z*final-�00000000)r��poprur)r"rr�rWs    r�_legacy_keyrBs�����F�
�q�\���<�<����8�|�����y�!8��J�J�L�����y�!8��V�B�Z�:�5��
�
���V�B�Z�:�5��
�
�a�����=�rc�"�eZdZd�Zed��Zy)r	c��t|�Sr1)rr(s  rrzLegacyVersion.parse]s���1�~�rc��d}|jD]/}t|t�s�|jd�s�&|dks�,d}|S|S)NFrrT)rrrr�)r!r�r�s   rrOzLegacyVersion.is_prerelease`sE�������A��1�l�+����S�0A��H������
��
�
rN�rrrrrPrOrrrr	r	\s������rr	c�h�eZdZeZeej�Zded<ejd�Z
d�Zy)r
r�riz^(\d+(\.\d+)*)c��||kry|jjt|��}|stj	d||�y|j�d}d|vr|j
dd�d}t||�S)NFzACannot compute compatible match for version %s  and constraint %sTrr�r)�
numeric_rer�r��logger�warningr��rsplitr�)r!rr�rzr�r"s      rr�zLegacyMatcher._match_compatiblessz���Z����O�O�!�!�#�j�/�2����N�N�0�18�*�
F��
�H�H�J�q�M���!�8�����a� ��#�A��W�a�(�(rN)rrrr	rn�dictrRr|r�compilerr�rrrr
r
ks7��!�M��g�(�(�)�J�*�J�t������-�.�J�)rr
zN^(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+(\.[a-z0-9-]+)*)?(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$c�,�tj|�Sr1)�
_SEMVER_REr�)r"s rr�r��s�����A��rc���d�}t|�}|st|��|j�}|ddD�cgc]
}t|���c}\}}}||dd�||dd�}	}|||f||	fScc}w)Nc��|�|f}|S|ddjd�}t|D�cgc]%}|j�r|jd�n|��'c}�}|Scc}w)Nrr�r
)r�rr�r)r"�absentr�r#rWs     r�
make_tuplez!_semantic_key.<locals>.make_tuple�sf���9��Y�F��
�	�a�b�E�K�K��$�E��e�L�e��!�)�)�+�A�G�G�A�J�1�<�e�L�M�F��
��Ms�*Ar��|�r)r�r
r�r�)
r"r%r�r�r��major�minor�patchr��builds
          r�
_semantic_keyr,�s����	�!��A��%�a�(�(�
�X�X�Z�F�+1�"�1�:�6�:�a�3�q�6�:�6��E�5�%��F�1�I�s�+�Z��q�	�3�-G��C��5�%� �#�u�,�,��7s�A,c�"�eZdZd�Zed��Zy)rc��t|�Sr1)r,r(s  rrzSemanticVersion.parse�s
���Q��rc�,�|jdddk7S)Nrrr&)rrDs rrOzSemanticVersion.is_prerelease�s���{�{�1�~�a� �C�'�'rNrrrrrr�s�� ��(��(rrc��eZdZeZy)rN)rrrrrnrrrrr�s��#�Mrrc�,�eZdZdd�Zd�Zd�Zd�Zd�Zy)�
VersionSchemeNc�.�||_||_||_yr1)rr�matcher�	suggester)r!rrr4r5s    rr$zVersionScheme.__init__�s��������"��rc�f�	|jj|�d}|S#t$rd}Y|SwxYw�NTF)r4rnr
�r!r"r�s   r�is_valid_versionzVersionScheme.is_valid_version�s@��	��L�L�&�&�q�)��F��
��'�	��F��
�	�s�!�0�0c�R�	|j|�d}|S#t$rd}Y|SwxYwr7)r4r
r8s   r�is_valid_matcherzVersionScheme.is_valid_matcher�s9��	��L�L��O��F��
��'�	��F��
�	�s��&�&c�V�|jd�r|dd}|jd|z�S)z:
        Used for processing some metadata fields
        �,Nr�zdummy_name (%s))rtr;r(s  r�is_valid_constraint_listz&VersionScheme.is_valid_constraint_list�s1��

�:�:�c�?��#�2��A��$�$�%6��%:�;�;rc�H�|j�d}|S|j|�}|Sr1)r5r8s   r�suggestzVersionScheme.suggest�s-���>�>�!��F��
��^�^�A�&�F��
rr1)rrrr$r9r;r>r@rrrr2r2�s��#�
��<�rr2c��|Sr1rr(s  rrXrX�s��r)�
normalized�legacy�semanticrB�defaultc�@�|tvrtd|z��t|S)Nzunknown scheme name: %r)�_SCHEMESro)rps rrr�s%���8���2�T�9�:�:��D�>�r)*r�loggingr�compatr�utilr�__all__�	getLoggerrrror
�objectrrRrr�r�r�rr�rr�r�r�r�r�Ir
rrr	r
r!r�r,rrr2rGrrrr�<module>rOs����
�	� �#�4��

��	�	�8�	$��	�j�	�
.E�f�.E�ba�f�a�H�B�J�J� F�G��
:.�z��!G��!G�H�T+��T+�n�R�Z�Z���2���R�Z�Z���g�&��R�Z�Z���"���R�Z�Z�
���&��R�Z�Z�&�'��/��R�Z�Z�"�#�U�+��R�Z�Z�	��C� ��R�Z�Z�"�#�W�-��R�Z�Z�+�,����R�Z�Z���v�&��
��R�Z�Z���r�"��R�Z�Z�
���#��R�Z�Z�
��S�!��R�Z�Z�	��C� ��R�Z�Z��������"�*�*�-�.��+�\l�d��
�
�0�"�$�$�7�
���	�

���	
����4�G��)�G�)�2�R�Z�Z�:�;=�4�4�A�
�
�-�*(�g�(�$�g�$�$�F�$�N ��1B� ;�=��K��8I�J��m�_�7�9�	���|�,����rpython3.12/site-packages/pip/_vendor/distlib/__pycache__/metadata.cpython-312.pyc000064400000121054151732701630023472 0ustar00�

R`iy�����dZddlmZddlZddlmZddlZddlZddlZddl	m
Z
mZddlm
Z
mZmZddlmZdd	lmZmZdd
lmZmZej0e�ZGd�de
�ZGd
�de
�ZGd�de
�ZGd�de
�Zgd�ZdZ dZ!ejDd�Z#ejDd�Z$dZ%dZ&dZ'dZ(dZ)dZ*dZ+e*dzZ,d Z-d!Z.e,e.zZ/e0�Z1e1jee%�e1jee&�e1jee(�e1jee*�e1jee,�e1jee/�ejDd"�Z3d#�Z4d$�Z5e1D�cic]#}|jm�jod%d&�|��%c}Z8e8js�D��cic]\}}||��
c}}Z:d'Z;d(Z<d)Z=d*Z>d+Z?d,Z@d-ZAeB�ZCejDd.�ZDd7d/�ZEGd0�d1eB�ZFd2ZGd3ZHd4ZIGd5�d6eB�ZJycc}wcc}}w)8zzImplementation of the Metadata for Python packages PEPs.

Supports all metadata formats (1.0, 1.1, 1.2, 1.3/2.1 and 2.2).
�)�unicode_literalsN)�message_from_file�)�DistlibException�__version__)�StringIO�string_types�	text_type)�	interpret)�extract_by_key�
get_extras)�
get_scheme�PEP440_VERSION_REc��eZdZdZy)�MetadataMissingErrorzA required metadata is missingN��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/metadata.pyrrs��(rrc��eZdZdZy)�MetadataConflictErrorz>Attempt to read or write metadata fields that are conflictual.Nrrrrrr s��Hrrc��eZdZdZy)� MetadataUnrecognizedVersionErrorz Unknown metadata version number.Nrrrrrr$s��*rrc��eZdZdZy)�MetadataInvalidErrorzA metadata value is invalidNrrrrrr(s��%rr)�Metadata�PKG_INFO_ENCODING�PKG_INFO_PREFERRED_VERSION�utf-8�1.1z

       \|�	
        )�Metadata-Version�Name�Version�Platform�Summary�Description�Keywords�	Home-page�Author�Author-email�License)r&r'r(r)�Supported-Platformr*r+r,r-r.r/r0�
Classifier�Download-URL�	Obsoletes�Provides�Requires)r4r5r6r2r3)r&r'r(r)r1r*r+r,r-r.r/�
Maintainer�Maintainer-emailr0r2r3�Obsoletes-Dist�Project-URL�
Provides-Dist�
Requires-Dist�Requires-Python�Requires-External)r;r<r=r9r>r7r8r:)r&r'r(r)r1r*r+r,r-r.r/r7r8r0r2r3r9r:r;r<r=r>�Private-Version�Obsoleted-By�Setup-Requires-Dist�	Extension�Provides-Extra)r?rCr@rArB)�Description-Content-Typer6r5r4)rD)�Dynamic�License-Filez"extra\s*==\s*("([^"]+)"|'([^']+)')c���|dk(rtS|dk(rtS|dk(rtS|dvrttd�tD��zS|dk(rtd��|dk(rtSt|��)	N�1.0r$�1.2)�1.3�2.1c3�2K�|]}|tvs�|���y�w�N)�_345_FIELDS)�.0�fs  r�	<genexpr>z%_version2fieldlist.<locals>.<genexpr>s����"R�k��Q�k�=Q�1�k�s�
��2.0z+Metadata 2.0 is withdrawn and not supported�2.2)�_241_FIELDS�_314_FIELDSrN�tuple�_566_FIELDS�
ValueError�_643_FIELDSr)�versions r�_version2fieldlistr[vsw���%����	�E�	���	�E�	���	�N�	"��U�"R�k�"R�R�R�R�	�E�	��F�G�G�	�E�	���
*�7�
3�3rc���d�}g}|j�D]\}}|gddfvr�|j|�� gd�}|D�]>}|tvr+d|vr'|jd�tjd|�|tvr+d|vr'|jd�tjd|�|tvr+d	|vr'|jd	�tjd
|�|tvr+d|vr'|jd�tjd|�|tvr0d
|vr,|dk7r'|jd
�tjd|�|tvs��d|vs��|jd�tjd|���At|�dk(r|dSt|�dk(r!tjd|�td��d|vxr
||t�}d	|vxr
||t�}d
|vxr
||t�}d|vxr
||t�}	t!|�t!|�zt!|�zt!|	�zdkDrtd��|s|s|s|	st"|vrt"S|ry|ry	|ry
y)z5Detect the best version depending on the fields used.c��|D]}||vs�yy)NTFr)�keys�markers�markers   r�_has_markerz"_best_version.<locals>._has_marker�s���F���~���r�UNKNOWNN)rHr$rIrJrKrSrHzRemoved 1.0 due to %sr$zRemoved 1.1 due to %srIzRemoved 1.2 due to %srJzRemoved 1.3 due to %srKr+zRemoved 2.1 due to %srSzRemoved 2.2 due to %srrz)Out of options - unknown metadata set: %szUnknown metadata setz,You used incompatible 1.1/1.2/2.1/2.2 fields)�items�appendrT�remove�logger�debugrUrNrWrY�lenr�_314_MARKERS�_345_MARKERS�_566_MARKERS�_643_MARKERS�intr")
�fieldsrar^�key�value�possible_versions�is_1_1�is_1_2�is_2_1�is_2_2s
          r�
_best_versionrv�sq����D��l�l�n�
��U��R��D�)�)�����C��%�
C�����k�!�e�/@�&@��$�$�U�+��L�L�0�#�6��k�!�e�/@�&@��$�$�U�+��L�L�0�#�6��k�!�e�/@�&@��$�$�U�+��L�L�0�#�6��k�!�e�/@�&@��$�$�U�+��L�L�0�#�6��k�!�e�/@�&@��m�#�!�(�(��/����4�c�:��k�!�e�/@�&@��$�$�U�+��L�L�0�#�6�'�2����"� ��#�#�	�
�	�1�	$����@�&�I�#�$:�;�;��'�
'�
K�K��l�,K�F�
�'�
'�
K�K��l�,K�F�
�'�
'�
K�K��l�,K�F�
�'�
'�
K�K��l�,K�F�
�6�{�S��[� �3�v�;�.��V��<�q�@�#�$R�S�S��&���%�):�:�-�-�
��
��
��r�-�_)r<r9r;)r=)r()r)r2r4r6r5r9r;r<r>r:r1rArCrBrF)r:)r,)r.r7r*r+z[^A-Za-z0-9.]+c��|r<tjd|�}tjd|jdd��}|�d|��S)zhReturn the distribution name with version.

    If for_filename is true, return a filename-escaped form.rw� �.)�	_FILESAFE�sub�replace)�namerZ�for_filenames   r�_get_name_and_versionr��s?����}�}�S�$�'���-�-��W�_�_�S�#�%>�?���G�$�$rc���eZdZdZ		d d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd!d�Zd�Zd�Zd�Zd�Zd!d�Zd!d�Zd"d�Zd�Zefd�Zd!d�Zd!d�Zd�Zd�Zd�Zd�Zd�Z d�Z!y)#�LegacyMetadataaoThe legacy metadata of a release.

    Supports versions 1.0, 1.1, 1.2, 2.0 and 1.3/2.1 (auto-detected). You can
    instantiate the class with one of these arguments (or none):
    - *path*, the path to a metadata file
    - *fileobj* give a file-like object with metadata as content
    - *mapping* is a dict-like object
    - *scheme* is a version scheme name
    Nc��|||gjd�dkrtd��i|_g|_d|_||_|�|j
|�y|�|j|�y|�"|j|�|j�yy)N��'path, fileobj and mapping are exclusive)
�count�	TypeError�_fields�requires_files�
_dependencies�scheme�read�	read_file�update�set_metadata_version)�self�path�fileobj�mappingr�s     r�__init__zLegacyMetadata.__init__	s����'�7�#�)�)�$�/�!�3��E�F�F���� ���!���������I�I�d�O�
�
 ��N�N�7�#�
�
 ��K�K�� ��%�%�'�!rc�H�t|j�|jd<y�Nr&)rvr��r�s rr�z#LegacyMetadata.set_metadata_versions��+8����+F����'�(rc�2�|j|�d|�d��y)Nz: �
)�write)r�r�rrps    r�_write_fieldzLegacyMetadata._write_fields���
�
�D�%�0�1rc�$�|j|�SrM)�get�r�rs  r�__getitem__zLegacyMetadata.__getitem__s���x�x��~�rc�&�|j||�SrM)�set)r�rrps   r�__setitem__zLegacyMetadata.__setitem__"s���x�x��e�$�$rc�r�|j|�}	|j|=y#t$rt|��wxYwrM)�
_convert_namer��KeyError)r�r�
field_names   r�__delitem__zLegacyMetadata.__delitem__%s<���'�'��-�
�	!����Z�(���	!��4�.� �	!�s�
!�6c�\�||jvxs|j|�|jvSrM)r�r�r�s  r�__contains__zLegacyMetadata.__contains__,s/������$�9��"�"�4�(�D�L�L�8�	:rc��|tvr|S|jdd�j�}tj	||�S)Nrwrx)�_ALL_FIELDSr~�lower�_ATTR2FIELDr�r�s  rr�zLegacyMetadata._convert_name0s9���;���K��|�|�C��%�+�+�-�����t�T�*�*rc�(�|tvs|tvrgSy)Nrb)�_LISTFIELDS�_ELEMENTSFIELDr�s  r�_default_valuezLegacyMetadata._default_value6s���;��$�.�"8��I�rc�v�|jdvrtjd|�Stjd|�S)N�rHr$r�)�metadata_version�_LINE_PREFIX_PRE_1_2r}�_LINE_PREFIX_1_2�r�rps  r�_remove_line_prefixz"LegacyMetadata._remove_line_prefix;s6��� � �N�2�'�+�+�D�%�8�8�#�'�'��e�4�4rc�2�|tvr||St|��rM)r��AttributeErrorr�s  r�__getattr__zLegacyMetadata.__getattr__As���;����:���T�"�"rc�(�t|d|d|�S)zhReturn the distribution name with version.

        If filesafe is true, return a filename-escaped form.r'r()r�)r��filesafes  r�get_fullnamezLegacyMetadata.get_fullnameLs��%�T�&�\�4�	�?�H�M�Mrc�4�|j|�}|tvS)z+return True if name is a valid metadata key)r�r�r�s  r�is_fieldzLegacyMetadata.is_fieldRs���!�!�$�'���{�"�"rc�4�|j|�}|tvSrM)r�r�r�s  r�is_multi_fieldzLegacyMetadata.is_multi_fieldWs���!�!�$�'���{�"�"rc��tj|dd��}	|j|�|j�y#|j�wxYw)z*Read the metadata values from a file path.�rr#��encodingN)�codecs�openr��close)r��filepath�fps   rr�zLegacyMetadata.read[s8��
�[�[��3��
9��	��N�N�2���H�H�J��B�H�H�J�s	�<�Ac	��t|�}|d|jd<tD]�}||vr�|tvrU|j	|�}|t
vr)|�'|D�cgc]}t
|jd����}}|j||��e||}|��m|dk7s�s|j||���|j�}|r||d<y|d|d<ycc}w)z,Read the metadata values from a file object.zmetadata-versionr&N�,rbr+)
rr�r�r��get_all�_LISTTUPLEFIELDSrV�splitr��get_payload)r��fileob�msg�field�valuesrp�bodys       rr�zLegacyMetadata.read_filecs�����'��+.�/A�+B����'�(�!�E��C�����#����U�+���,�,��1C�CI�J�6�%�e�E�K�K��$4�5�6�F�J������'��E�
���$��)�);��H�H�U�E�*�!�"��� ��&*�d��]���]�0C��]���Ks�!Cc��tj|dd��}	|j||�|j�y#|j�wxYw)z&Write the metadata fields to filepath.�wr#r�N)r�r��
write_filer�)r�r��skip_unknownr�s    rr�zLegacyMetadata.writes:��
�[�[��3��
9��	��O�O�B��-��H�H�J��B�H�H�J�s	�=�Ac���|j�t|d�D]�}|j|�}|r	|dgdgfvr�|tvr#|j	||dj|���J|tvr;|dk(r3|jdvr|jdd�}n|jdd�}|g}|tvr|D�cgc]}dj|���}}|D]}|j	|||����y	cc}w)
z0Write the PKG-INFO format data to a file object.r&rbr�r+r�r�r%z	
       |N)
r�r[r�r�r��joinr�r�r~r�)r��
fileobjectr�r�r�rps      rr�zLegacyMetadata.write_file�s����!�!�#�'��-?�(@�A�E��X�X�e�_�F���9�b�9�+�*F� F����&��!�!�*�e�S�X�X�f�5E�F���K�'��M�)��,�,��>�!'����l�!C��!'����l�!C�� ����(�(�7=�>�v�e�#�(�(�5�/�v��>����!�!�*�e�U�;� �%B�� ?s�8C/c�����fd�}|snAt|d�r"|j�D]}||||��n|D]\}}|||��|r"|j�D]\}}|||��yy)a�Set metadata values from the given iterable `other` and kwargs.

        Behavior is like `dict.update`: If `other` has a ``keys`` method,
        they are looped over and ``self[key]`` is assigned ``other[key]``.
        Else, ``other`` is an iterable of ``(key, value)`` iterables.

        Keys that don't match a metadata field or that have an empty value are
        dropped.
        c�`��|tvr%|r"�j�j|�|�yyyrM)r�r�r�)rorpr�s  �r�_setz#LegacyMetadata.update.<locals>._set�s.����k�!�e�����+�+�C�0�%�8�',�!rr^N)�hasattrr^rc)r��other�kwargsr��k�vs`     rr�zLegacyMetadata.update�sx���	9���
�U�F�
#��Z�Z�\���Q��a��!�"����1��Q��
���������1��Q��
�'�rc��|j|�}|tvs|dk(rVt|ttf�s@t|t
�r-|j
d�D�cgc]}|j���}}n7g}n4|tvr,t|ttf�st|t
�r|g}ng}tjtj�r�|d}t|j�}|tvrF|�D|D]>}|j!|j
d�d�r�'tj#d|||��@ng|t$vr,|�*|j'|�sLtj#d|||�n3|t(vr+|�)|j+|�stj#d|||�|t,vr|d	k(r|j/|�}||j0|<ycc}w)
z"Control then set a metadata field.r)r�r'N�;rz$'%s': '%s' is not valid (field '%s')z.'%s': '%s' is not a valid version (field '%s')r+)r�r��
isinstance�listrVr	r��stripr�rf�isEnabledFor�logging�WARNINGrr��_PREDICATE_FIELDS�is_valid_matcher�warning�_VERSIONS_FIELDS�is_valid_constraint_list�_VERSION_FIELDS�is_valid_version�_UNICODEFIELDSr�r�)r�rrpr��project_namer�s      rr�zLegacyMetadata.set�s����!�!�$�'��
�^�
#�t�z�'9��5�4��-�0��%��.�,1�K�K��,<�=�,<�q�����,<��=����k�!��U�T�5�M�2��%��.���������w���/���<�L�����,�F��(�(�U�->��A�!�2�2�1�7�7�3�<��?�C����B�(�!�T�3���)�)�e�.?��6�6�u�=��N�N�#S�#/���>���(�U�->��.�.�u�5��N�N�#S�#/���>��>�!��}�$��0�0��7��"����T���G>s�G	c���|j|�}||jvr|tur|j|�}|S|tvr|j|}|S|t
vrQ|j|}|�gSg}|D]5}|tvr|j|��|j|d|df��7|S|tvr0|j|}t|t�r|jd�S|j|S)zGet a metadata field.rrr�)r�r��_MISSINGr�r�r�r�rdr�r�r	r�)r�r�defaultrp�res�vals      rr�zLegacyMetadata.get�s����!�!�$�'���t�|�|�#��(�"��-�-�d�3���N��>�!��L�L��&�E��L�
�[�
 ��L�L��&�E��}��	��C����/�/��J�J�s�O��J�J��A���A��/�0���J�
�^�
#��L�L��&�E��%��.��{�{�3�'�'��|�|�D�!�!rc���|j�gg}}dD]}||vs�|j|��|r$|gk7rddj|�z}t|��dD]}||vs�|j|��|ddk7r||fSt	|j
���fd�}t|ft�jft�jffD]A\}}|D]7}	|j|	d�}
|
��||
�r�!|jd	|	�d
|
����9�C||fS)zkCheck if the metadata is compliant. If strict is True then raise if
        no Name or Version are provided)r'r(zmissing required metadata: %s�, )r-r.r&rIc�^��|D]'}�j|jd�d�r�'yy)Nr�rFT)r�r�)rpr�r�s  �r�are_valid_constraintsz3LegacyMetadata.check.<locals>.are_valid_constraintss/������.�.�q�w�w�s�|�A��?� ��rNzWrong value for 'z': )r�rdr�rrr�r�r�r�r�r�r�)r��strict�missing�warnings�attrr�rrn�
controllerr�rpr�s           @r�checkzLegacyMetadata.checks5���	
�!�!�#�����'�D��4�����t�$�(��g��m�1�D�I�I�g�4F�F�C�&�s�+�+�+�D��4�����t�$�,�
�"�#�u�,��H�$�$��D�K�K�(��	�%6�7L�#M�$4�$*�$C�$C�$E�$3�$*�$;�$;�$=�#>��F�J�
 �������-���$�Z��->��O�O�%��$O�P� �#>��� � rc��|j�t|d�}i}|D]O}|r||jvs�t|}|dk7r	||||<�+||D�cgc]}dj	|���c}||<�Q|Scc}w)aReturn fields as a dict.

        Field names will be converted to use the underscore-lowercase style
        instead of hyphen-mixed case (i.e. home_page instead of Home-page).
        This is as per https://www.python.org/dev/peps/pep-0566/#id17.
        r&�project_urlr�)r�r[r��_FIELD2ATTRr�)r��skip_missingrn�datar�ro�us       r�todictzLegacyMetadata.todict1s���	
�!�!�#�#�D�);�$<�=���� �J��:����#=�!�*�-���-�'� $�Z� 0�D��I�6:�:�6F� G�6F�����!��6F� G�D��I�
!����!Hs�A7c�L�|ddk(rdD]
}||vs�||=�|dxx|z
cc<y)Nr&r$)r4r6r5r<r)r��requirementsr�s   r�add_requirementszLegacyMetadata.add_requirementsHs:���"�#�u�,�>���D�=��U��?�	
�_���-�rc�0�tt|d��Sr�)r�r[r�s rr^zLegacyMetadata.keysSs���&�t�,>�'?�@�A�Arc#�>K�|j�D]}|���y�wrM�r^�r�ros  r�__iter__zLegacyMetadata.__iter__Vs�����9�9�;�C��I��s�c�N�|j�D�cgc]}||��	c}Scc}wrMrrs  rr�zLegacyMetadata.valuesZs$��%)�Y�Y�[�1�[�c��S�	�[�1�1��1s�"c�R�|j�D�cgc]	}|||f��c}Scc}wrMrrs  rrczLegacyMetadata.items]s)��,0�I�I�K�8�K�S��d�3�i� �K�8�8��8s�$c�j�d|jj�d|j�d|j�d�S)N�<rz�>)�	__class__rrrZr�s r�__repr__zLegacyMetadata.__repr__`s&��#�~�~�6�6��	�	�#�|�|�-�	-r�NNNr��FrM)"rrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rr^rr�rcrrrrr�r��s����9=�!�(� G�2��%�!�:�+��
5�#�N�#�
#��D�8�<�2�8*#�X!)�"�:*!�X�..�B��2�9�-rr�zpydist.jsonz
metadata.json�METADATAc�j�eZdZdZej
d�Zej
dej�Zej
dej�Z	e
Zej
d�ZdZ
dezZddd	d
�ZdZdZedfed	fed	fed	fe	d	fd
�ZdZ		d5d�Zed�ZdefZdefZdefdefeeedefeeeedefddd�
Z[[d�Zd6d�Zd�Ze d��Z!e d��Z"e"jFd��Z"d7d�Z$e d ��Z%e d!��Z&e&jFd"��Z&d#�Z'd$�Z(d%�Z)d&�Z*d'd(d)d*d+d,d-d.d/dd0�
Z+d1�Z,d8d2�Z-d3�Z.d4�Z/y)9r z�
    The metadata of a release. This implementation uses 2.1
    metadata where possible. If not possible, it wraps a LegacyMetadata
    instance which handles the key-value metadata format.
    z
^\d+(\.\d+)*$z!^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$z^[A-Z]([0-9A-Z-]*[0-9A-Z])?$z	.{1,2047}rRzdistlib (%s)r)�legacy)rrZ�summaryzqname version license summary description author author_email keywords platform home_page classifiers download_urlzwextras run_requires test_requires build_requires dev_requires provides meta_requires obsoleted_by supports_environments)r�rrZr"�dynamic)�_legacy�_datar�Nc��|||gjd�dkrtd��d|_d|_||_|�	|j||�||_yd}|r&t|d�5}|j�}ddd�n|r|j�}|�|j|jd�|_yt|t�s|jd�}	t!j"|�|_|j|j|�y#t$r%t||��|_|j�YywxYw#1swY��xYw#t$$r.tt'|�|��|_|j�YywxYw)Nr�r�)r�r��rb�r��	generatorr#)r�r�)r�r�r$r%r��_validate_mappingrr��validater�r��METADATA_VERSION�	GENERATORr�r
�decode�json�loadsrXr)r�r�r�r�r�rrPs       rr�zMetadata.__init__�s[���'�7�#�)�)�$�/�!�3��E�F�F������
������
 ��&�&�w��7�$��
�
�D���$��%���6�6�8�D�&�%���|�|�~���|�)-�(=�(=�!%�����
�
"�$�	�2��;�;�w�/�D�$�!%���D�!1�D�J��*�*�4�:�:�v�>��+4�
 �-�g�f�M����
�
��
 ��&�%�� "�	$�$2�(�4�.�9?�$A�D�L��M�M�O�	$�s/�D�%D<�6E�+D9�8D9�<E�4E?�>E?)rrZ�license�keywordsr"r<rArCr2)r3N)r&N)
�run_requires�build_requires�dev_requires�
test_requires�
meta_requires�extras�modules�
namespaces�exports�commands�classifiers�
source_urlr�c�n�tj|d�}tj|d�}||v�r#||\}}|jr,|�
|�dn|�}|S|jj|�}|S|�dn|�}|dvr|jj||�}|St�}|}|jjd�}	|	r�|dk(r|	jd|�}nm|dk(r&|	jd�}	|	rU|	j||�}nB|	jd	�}	|	s|jjd	�}	|	r|	j||�}||ur|}|S||vrtj||�}|S|jr|jj|�}|S|jj|�}|S)
N�common_keys�mapped_keys�r<r;r9r:r=�
extensionsr<�python.commandsr=�python.details�python.exports)�object�__getattribute__r$r�r%)
r�ro�common�mapped�lk�maker�resultrp�sentinel�ds
          rrHzMetadata.__getattribute__�s����(�(��}�=���(�(��}�=���&�=��s��I�B���|�|��:�%*�]�T���F�D�
�A"�\�\�-�-�b�1�F�@�
�=!&�
��5�7���.�.�!�Z�Z�^�^�C��7�F�6�
�1 &�x�H�%�F��
�
���|�4�A���*�,�%&�U�U�+<�e�%D�F� �M�1� !���&6� 7�A� �)*���s�E�):�� !���&6� 7�A�#$�$(�J�J�N�N�3C�$D�� �)*���s�E�):����)�!&���
�
��
��,�,�T�3�7�F�
�
�	�\�\��\�\�%�%�c�*�F��
��Z�Z�^�^�C�(�F��
rc��||jvrK|j|\}}|xs|j|vr&|j|�}|std|�d|�d���yyy)N�'z' is an invalid value for the 'z
' property)�SYNTAX_VALIDATORSr��matchr)r�rorpr��pattern�
exclusions�ms       r�_validate_valuezMetadata._validate_valuesq���$�(�(�(�"&�"8�"8��"=��G�Z��%�$�+�+�j�8��M�M�%�(���.�FK�DG�0I�J�J��9�)rc���|j||�tj|d�}tj|d�}||vr�||\}}|jr|�t�||j|<y|dvr||j
|<y|j
j
di�}|dk(r||d<y|dk(r|j
di�}|||<y|j
d	i�}|||<y||vrtj|||�y|d
k(r5t|t�r%|j�}|r|j�}ng}|jr||j|<y||j
|<y)Nr@rArBrCr<rDr=rErFr2)rWrGrHr$�NotImplementedErrorr%�
setdefault�__setattr__r�r	r�r�)r�rorprIrJrKrxrOs        rr[zMetadata.__setattr__sW�����S�%�(��(�(��}�=���(�(��}�=���&�=��3�K�E�B���|�|��:�-�-�#(����R� ��,�,�"'��
�
�3���J�J�)�)�,��;���*�$�+0�A�'�(��M�)����%5�r�:�A�"�A�c�F����%5�r�:�A�"�A�c�F�
��
����t�S�%�0��j� ��e�\�2�!�K�K�M�E�� %���
�� "���|�|�$)����S�!�"'��
�
�3�rc�D�t|j|jd�S�NT)r�rrZr�s r�name_and_versionzMetadata.name_and_version7s��$�T�Y�Y����d�C�Crc���|jr|jd}n|jjdg�}|j�d|j�d�}||vr|j|�|S)Nr;�provides� (�))r$r%rZrrZrd)r�rM�ss   rr`zMetadata.provides;sW���<�<��\�\�/�2�F��Z�Z�*�*�:�r�:�F����D�L�L�1���F�?��M�M�!���
rc�Z�|jr||jd<y||jd<y)Nr;r`)r$r%r�s  rr`zMetadata.providesFs%���<�<�,1�D�L�L��)�%*�D�J�J�z�"rc���|jr|}|Sg}t|xsg|j�}|D]_}d|vrd|vrd}n;d|vrd}n|jd�|v}|r|jd�}|rt	||�}|s�L|j|d��adD]_}d|z}	|	|vs�
|j
|	�|jjd|zg�}|j|j|||����a|S)	a�
        Base method to get dependencies, given a set of extras
        to satisfy and an optional environment context.
        :param reqts: A list of sometimes-wanted dependencies,
                      perhaps dependent on extras and environment.
        :param extras: A list of optional components being requested.
        :param env: An optional environment for marker evaluation.
        �extra�environmentT�requires)�build�dev�testz:%s:z%s_requires)r8�env)	r$r
r8r�r�extendrer%�get_requirements)
r��reqtsr8rlrMrO�includer`ro�es
          rrnzMetadata.get_requirementsMs���<�<��F�<�
�9�F����"�d�k�k�:�F����!�#�
�Q�(>�"�G��a�'�"&��"#�%�%��.�F�":���!"���}�!5��!�&/���&<�G���M�M�!�J�-�0�!�"0���S�L����;��M�M�!�$�!�J�J�N�N�=�3�+>��C�E��M�M�$�"7�"7��f�<?�#8�#A�B�0��
rc�R�|jr|j�S|jSrM)r$�_from_legacyr%r�s r�
dictionaryzMetadata.dictionaryws"���<�<��$�$�&�&��z�z�rc�f�|jrt�t|j|j�SrM)r$rYrr%�DEPENDENCY_KEYSr�s r�dependencieszMetadata.dependencies}s&���<�<�%�%�!�$�*�*�d�.B�.B�C�Crc�^�|jrt�|jj|�yrM)r$rYr%r�r�s  rrwzMetadata.dependencies�s!���<�<�%�%��J�J���e�$rc�j�|jd�|jk7r
t��g}|jj	�D] \}}||vs�||vs�|j|��"|rddj
|�z}t|��|j	�D]\}}|j|||��y)Nr�zMissing metadata items: %sr�)	r�r,r�MANDATORY_KEYSrcrdr�rrW)	r�r�r�rrorUr�r�r�s	         rr*zMetadata._validate_mapping�s����;�;�)�*�d�.C�.C�C�2�4�4���#�2�2�8�8�:�O�C���'�!���+��N�N�3�'� ;��.����7�1C�C�C�&�s�+�+��M�M�O�D�A�q�� � ��A�v�.�$rc���|jr;|jjd�\}}|s|rtjd||�yy|j	|j
|j�y)NTz#Metadata: missing: %s, warnings: %s)r$rrfr�r*r%r�)r�rrs   rr+zMetadata.validate�sZ���<�<� $��� 2� 2�4� 8��G�X��(����D�&��2�#�
�"�"�4�:�:�t�{�{�;rc��|jr|jjd�St|j|j�}|Sr])r$r
rr%�
INDEX_KEYS)r�rMs  rr
zMetadata.todict�s7���<�<��<�<�&�&�t�,�,�#�D�J�J����@�F��Mrc��|jr|jrJ�|j|jd�}|jj	d�}dD]}||vs�|dk(rd}n|}||||<�|jdg�}|dgk(rg}||d<d	}|D]\}}||vs�||s�d
||ig||<�|j|d<i}i}	|S)Nr(T)rrZr1r"�description�
classifierr�r=r,�r2))�
requires_distr3)�setup_requires_distr4rhr`)r$r%r,r-r
r�r`)
r�rM�lmdr��nk�kwr^�ok�author�
maintainers
          rrszMetadata._from_legacy�s����|�|�D�J�J�.�.� $� 5� 5����
���l�l�!�!�$�'�� �A��C�x���$�&�B��B� ��V��r�
� ��W�W�Z��
$��
�"��:��B���z��;���F�B���S�y�S��W�)�3�r�7�3�4��r�
��"�]�]��z�����
��
rr'r(r0r*r+r-r.r/r3)
rrZ)rCrEr1r"r)rC�python.project�project_urls�Home)rCr��contactsrr)rCr�r�r�emailr>)rCrEr=c�J�d�}|jr|jrJ�t�}|j}|jj	�D]<\}}t|t�s||vs�||||<�$|}d}|D]}	||}�
|s�8|||<�>||j|jz�}	||j|jz�}
|jrt|j�|d<t|	�|d<t|
�|d<|S#ttf$rd}Y��wxYw)Nc�$�t�}|D]�}|jd�}|jd�}|d}|D]R}|s|s|j|��d}|rd|z}|r
|r	d|�d|��}n|}|jdj||f���T��|S)	Nrfrgrhr�z
extra == "%s"�(z) and r�)r�r��addr�)�entriesrorqrfrl�rlistr�r`s        r�process_entriesz,Metadata._to_legacy.<locals>.process_entries�s����E�E������g����e�e�M�*���*�
���A��u��	�	�!��!#�� �%4�u�%<�F��%�:=�v�)F��),���	�	�#�(�(�A�v�;�"7�8��	�"�LrTFrCr<rA)r%r$r��LEGACY_MAPPINGrcr�rVr��
IndexErrorr3r7r4r5r8�sorted)r�r�rM�nmdr�r�rO�foundr��r1�r2s           r�
_to_legacyzMetadata._to_legacy�s+��	�*�z�z�$�,�,�.�.��!���j�j���)�)�/�/�1�F�B���b�%�(���9�!$�R��F�2�J������A���a�D����!"�F�2�J�2��T�.�.��1C�1C�C�
D��
�T�0�0�4�3D�3D�D�
E���;�;�'-�d�k�k�':�F�#�$�"(��*����(.�r�
��$�%��
��%�j�1�� %����s�<D
�
D"�!D"c�(�||gjd�dk7rtd��|j�|rS|jr
|j}n|j	�}|r|j||��y|j
||��y|jr|j�}n|j}|rtj||ddd��ytj|dd�5}tj||ddd��ddd�y#1swYyxYw)	Nrz)Exactly one of path and fileobj is needed)r�Tr�)�ensure_ascii�indent�	sort_keysr�r#)
r�rXr+r$r�r�r�rsr%r/�dumpr�r�)r�r�r�r!r��	legacy_mdrOrPs        rr�zMetadata.writes����'�?� � ��&�!�+��H�I�I��
�
����|�|� �L�L�	� �O�O�-�	������<��@��$�$�W�<�$�H��|�|��%�%�'���J�J����	�	�!�W�4��$(�*��[�[��s�G�4���I�I�a���a�(,�.�5�4�4�s�$D�Dc�:�|jr|jj|�y|jjdg�}d}|D]}d|vs�d|vs�
|}n|�d|i}|j	d|�yt|d�t|�z}t
|�|d<y)Nr3rgrfrhr)r$rr%rZ�insertr�r�)r�rr3�always�entry�rsets      rrzMetadata.add_requirementss����<�<��L�L�)�)�,�7��:�:�0�0���D�L��F�%�� ��-�'��2F�"�F��&��~�%�|�5���#�#�A�v�.��6�*�-�.��\�1B�B��%+�D�\��z�"rc	��|jxsd}|jxsd}d|jj�d|j�d|�d|�d�	S)Nz	(no name)z
no versionrrzraz)>)rrZrrr�)r�rrZs   rrzMetadata.__repr__0sD���y�y�'�K���,�,�.�,��$(�N�N�$;�$;�$(�$9�$9�4��J�	JrrrM)NN)NNFT)0rrrr�re�compile�METADATA_VERSION_MATCHER�I�NAME_MATCHER�FIELDNAME_MATCHERr�VERSION_MATCHER�SUMMARY_MATCHERr,rr-rzr}rvrR�	__slots__r�r�r@r��	none_list�dict�	none_dictrArHrWr[�propertyr^r`�setterrnrtrwr*r+r
rsr�r�r�rrrrrr r js-��� *�r�z�z�*:�;���2�:�:�A�2�4�4�H�L�"��
�
�#A�2�4�4�H��'�O� �b�j�j��-�O�����,�I�����N�!�J�/�O�
6�r�:��{�+�#�[�1�#�[�1�%�{�3���/�I�8<�!�+$�Z�K�L�K��t��I��t��I�)�$�/�0�$�7�!�"�"�#�T�*�����$�d�+�,�6��K� 	�9�)�VJ�%(�N�D��D������_�_�+��+�(�T����
�D��D����%��%�/�<���<��5>��$�BM�AI�BP�$�9E��N�0�d.�42�"Jrr r)Kr�
__future__rr�r�rr/r�r�r�rr�compatrr	r
r_r�utilrr
rZrr�	getLoggerrrfrrrr�__all__r!r"r�r�r�rTrUrirNrj�_426_FIELDS�_426_MARKERSrWrkrlrYr�r�r��EXTRA_REr[rvr�r~r�rcr	r�r�r�r�r�r�r�rGr�r|r�r��METADATA_FILENAME�WHEEL_METADATA_FILENAME�LEGACY_METADATA_FILENAMEr )rrr�s000r�<module>r�si���(�
�#���	�,�5�5��,�2�	��	�	�8�	$��)�+�)�I�,�I�+�'7�+�&�+�&�J����#���2�:�:�n�-��!�r�z�z�,�/����
'�� ��7��3��!��4���B�B��-��*���L�(���e�����;�����;�����;�����;�����;�����;���2�:�:�?�@��4�$L�b6A��5@�T�D�J�J�L����c�"�D�(�[���/:�.?�.?�.A�B�.A�{�t�U�u�d�{�.A�B��H��'����>��
$����C���8���B�J�J�'�(�	�
%�e-�V�e-�P"��)��%��JJ�v�JJ��e��Cs�(G-�
G2python3.12/site-packages/pip/_vendor/distlib/__pycache__/markers.cpython-312.pyc000064400000016510151732701630023356 0ustar00�

R`i�����dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZdgZ
ejd�Zd	�Zd
�ZGd�de�Zejd
�Zd�Ze�Z[e�Zdd�Zy)zG
Parser for the environment markers micro-language defined in PEP 508.
�N�)�string_types)�in_venv�parse_marker)�NormalizedVersion�	interpretz<((\d+(\.\d+)*\w*)|\'(\d+(\.\d+)*\w*)\'|\"(\d+(\.\d+)*\w*)\")c�6�t|t�r|sy|ddvS)NFr�'")�
isinstancer)�os ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/markers.py�_is_literalrs���a��&�a���Q�4�5�=��c��g}tj|�D]-}|jt|j	�d���/t|�S)Nr)�_VERSION_PATTERN�finditer�append�NV�groups�set)�s�result�ms   r
�
_get_versionsr!sA��
�F�
�
&�
&�q�
)���
�
�b�����A��'�(�*��v�;�rc
�L�eZdZdZd�d�d�d�d�d�d�d	�d
�d�d�d
�d�Zd�Zy)�	Evaluatorz;
    This class is used to evaluate marker expessions.
    c��||k(S�N���x�ys  r
�<lambda>zEvaluator.<lambda>-���1��6rc��||k(Srrr s  r
r#zEvaluator.<lambda>.s��A��Frc��||k(xs||kDSrrr s  r
r#zEvaluator.<lambda>/s��1��6�?�Q��U�?rc��||k7Srrr s  r
r#zEvaluator.<lambda>0r$rc��||kSrrr s  r
r#zEvaluator.<lambda>1���1�q�5rc��||k(xs||kSrrr s  r
r#zEvaluator.<lambda>2���A��F�O�a�!�e�Orc��||kDSrrr s  r
r#zEvaluator.<lambda>3r)rc��||k(xs||kDSrrr s  r
r#zEvaluator.<lambda>4r+rc��|xr|Srrr s  r
r#zEvaluator.<lambda>5s
��A�G�!�Grc��|xs|Srrr s  r
r#zEvaluator.<lambda>6s
��1�6��6rc�
�||vSrrr s  r
r#zEvaluator.<lambda>7s��1��6rc�
�||vSrrr s  r
r#zEvaluator.<lambda>8s��q��zr)�==�===�~=�!=�<�<=�>�>=�and�or�in�not inc�J�t|t�r'|ddvr|dd}|S||vrtd|z��||}|St|t�sJ�|d}||jvrtd|z��|d}|d	}t
|d�r"t
|d	�rtd
|�d|�d|����|j||�}|j||�}|dk(s|dk(r|d
vrt|�}t|�}n|dk(r|dvrt|�}t|�}|j|||�}|S)z�
        Evaluate a marker expression returned by the :func:`parse_requirement`
        function in the specified context.
        rr
r���zunknown variable: %s�opzop not implemented: %s�lhs�rhszinvalid comparison: � �python_version)r6r7r8r9r3r2r5r4)r<r=)
rr�SyntaxError�dict�
operations�NotImplementedErrorr�evaluaterr)	�self�expr�contextrr@�elhs�erhsrArBs	         r
rIzEvaluator.evaluate;sV��
�d�L�)��A�w�%���a����2�
�/�w�&�%�&<�t�&C�D�D� ����*�
�'�d�D�)�)�)��d��B�����(�)�*B�R�*G�H�H���;�D���;�D��4��;�'�K��U��,D�!�D�"�d�"S�T�T��-�-��g�.�C��-�-��g�.�C��)�)�T�5E�-E��E�E���g����g���)�)�b�4D�.D���g��#�C�(��(�T�_�_�R�(��c�2�F��
rN)�__name__�
__module__�__qualname__�__doc__rGrIrrr
rr's9���
"�"�*�!� �+� �+�#�!�!�)�
�J� rrz\d+\.\d+c
�J�d�}ttd�r;|tjj�}tjj}nd}d}tj�}tj|�}|jd�}||tjtj�tj�tj�tj�tj�tt!��||tj
d�}|S)Nc��|j�d|j�d|j��}|j}|dk7r||dt	|j
�zz
}|S)N�.�finalr)�major�minor�micro�releaselevel�str�serial)�info�version�kinds   r
�format_full_versionz,default_context.<locals>.format_full_version`sM�� $�
�
�D�J�J��
�
�C��� � ���7�?��t�A�w��T�[�[�!1�1�1�G��r�implementation�0�r)�implementation_name�implementation_version�os_name�platform_machine�platform_python_implementation�platform_release�platform_system�platform_version�platform_in_venv�python_full_versionrD�sys_platform)�hasattr�sysrar^�name�platformrD�_DIGITS�match�group�os�machine�python_implementation�release�systemr[r)r`rerd�ppvr�pvrs       r
�default_contextr}_s�����s�$�%�!4�S�5G�5G�5O�5O�!P��!�0�0�5�5��!$�� ��
�
!�
!�
#�C��
�
�c��A�	
�����B�2�"8��7�7�$�,�,�.�*2�*H�*H�*J�$�,�,�.�#�?�?�,�$�,�,�.���	�N�"�����
�F��Mrc�
�	t|�\}}|r|ddk7rtd|�d|����tt�}|r|j|�tj||�S#t$r}td|�d|����d}~wwxYw)z�
    Interpret a marker and return a result depending on environment.

    :param marker: The marker to interpret.
    :type marker: str
    :param execution_context: The context used for name lookup.
    :type execution_context: mapping
    z#Unable to interpret marker syntax: z: Nr�#z$unexpected trailing data in marker: )r�	ExceptionrErF�DEFAULT_CONTEXT�update�	evaluatorrI)�marker�execution_contextrK�rest�erLs      r
rr�s���U�!�&�)�
��d���Q��3���&�RV�W�X�X��?�#�G�����(�)����d�G�,�,���U���QR�S�T�T��U�s�A#�#	B�,A=�=Br)rRrv�rerprr�compatr�utilrrr^rr�__all__�compilerrr�objectrrsr}r�r�rrrr
�<module>r�s����
�	�
�� �'�,��-���2�:�:�]�^���
�4��4�l�"�*�*�[�
!�� �D"�#����K�	�-rpython3.12/site-packages/pip/_vendor/distlib/__pycache__/index.cpython-312.pyc000064400000057501151732701630023026 0ustar00�

R`ibQ����ddlZddlZddlZddlZddlZddlZ	ddlmZddl
mZddlm
Z
mZmZmZmZmZddlmZmZej,e�ZdZdZGd	�d
e�Zy#e$r	ddl	mZY�MwxYw)�N)�Thread�)�DistlibException)�HTTPBasicAuthHandler�Request�HTTPPasswordMgr�urlparse�build_opener�string_types)�zip_dir�ServerProxyzhttps://pypi.org/pypi�pypic��eZdZdZdZdd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zdd�Zdd�Z
dd
�Z		dd�Zd�Z	dd�Z	dd�Zdd�Zd�Zd�Zdd�Zy)�PackageIndexzc
    This class represents a package index compatible with PyPI, the Python
    Package Index.
    s.----------ThIs_Is_tHe_distlib_index_bouNdaRY_$Nc���|xst|_|j�t|j�\}}}}}}|s|s|s|dvrt	d|jz��d|_d|_d|_d|_ttjd�5}dD]+}		tj|	dg||��}
|
dk(r	|	|_n�-ddd�y#t$rY�BwxYw#1swYyxYw)	z�
        Initialise an instance.

        :param url: The URL of the index. If not specified, the URL for PyPI is
                    used.
        )�http�httpszinvalid repository: %sN�w)�gpg�gpg2z	--version��stdout�stderrr)�
DEFAULT_INDEX�url�read_configurationr	r�password_handler�ssl_verifierr�gpg_home�open�os�devnull�
subprocess�
check_call�OSError)�selfr�scheme�netloc�path�params�query�frag�sink�s�rcs           ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/index.py�__init__zPackageIndex.__init__$s����'�-������!�4<�T�X�X�4F�1����f�e�T��U�d�f�4E�&E�"�#;�d�h�h�#F�G�G� $��� ��������
�
�"�*�*�c�
"�d�%���#�.�.��;�/?��6:�<�B��Q�w�#$�����	%�#�
"�������#�
"�s0�C�&C�C�	C�C�C�C�C&c��ddlm}|�S)zs
        Get the distutils command for interacting with PyPI configurations.
        :return: the command.
        r)�_get_pypirc_command)�utilr3)r&�cmds  r0r3z PackageIndex._get_pypirc_commandAs��
	5��u��c���ddlm}||�}|jd�|_|jd�|_|jdd�|_|jd|j�|_y)	z�
        Read the PyPI access configuration as supported by distutils. This populates
        ``username``, ``password``, ``realm`` and ``url`` attributes from the
        configuration.
        r)�_load_pypirc�username�password�realmr�
repositoryN)r4r8�getr9r:r;r)r&r8�cfgs   r0rzPackageIndex.read_configurationIsY��	'��4� �����
�+��
����
�+��
��W�W�W�f�-��
��7�7�<����2��r6c�@�|j�ddlm}||�y)z�
        Save the PyPI access configuration. You must have set ``username`` and
        ``password`` attributes before calling this method.
        r)�
_store_pypircN)�check_credentialsr4r@)r&r@s  r0�save_configurationzPackageIndex.save_configurationVs��
	
��� �'��d�r6c��|j�|j�td��t�}t	|j
�\}}}}}}|j
|j||j|j�t|�|_	y)zp
        Check that ``username`` and ``password`` have been set, and raise an
        exception if not.
        Nz!username and password must be set)
r9r:rrr	r�add_passwordr;rr)r&�pm�_r(s    r0rAzPackageIndex.check_credentials_sq��
�=�=� �D�M�M�$9�"�#F�G�G�
�
�� (���� 2���6�1�a��A�
����
�
�F�D�M�M�4�=�=�I� 4�R� 8��r6c�:�|j�|j�|j�}d|d<|j|j	�g�}|j|�}d|d<|j|j	�g�}|j|�S)aq
        Register a distribution on PyPI, using the provided metadata.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the distribution to be
                         registered.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        �verify�:action�submit)rA�validate�todict�encode_request�items�send_request)r&�metadata�d�request�responses     r0�registerzPackageIndex.registerks���	
��� ������O�O�����)���%�%�a�g�g�i��4���$�$�W�-����)���%�%�a�g�g�i��4��� � ��)�)r6c���	|j�}|snK|jd�j�}|j|�tj|�d|����^|j
�y)ar
        Thread runner for reading lines of from a subprocess into a buffer.

        :param name: The logical name of the stream (used for logging only).
        :param stream: The stream to read from. This will typically a pipe
                       connected to the output stream of a subprocess.
        :param outbuf: The list to append the read lines to.
        �utf-8z: N)�readline�decode�rstrip�append�logger�debug�close)r&�name�stream�outbufr.s     r0�_readerzPackageIndex._readers]������!�A�������!�(�(�*�A��M�M�!���L�L�T�1�-�.�
�	���r6c	��|jdddg}|�|j}|r|jd|g�|�|jgd��tj�}t
jj|t
jj|�dz�}|jddd	|d
||g�tjddj|��||fS)
a�
        Return a suitable command for signing a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param keystore: The path to a directory which contains the keys
                         used in verification. If not specified, the
                         instance's ``gpg_home`` attribute is used instead.
        :return: The signing command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        �--status-fd�2�--no-tty�	--homedir)z--batchz--passphrase-fd�0z.ascz
--detach-signz--armorz--local-userz--output�invoking: %s� )rr�extend�tempfile�mkdtempr!r)�join�basenamer[r\)r&�filename�signer�
sign_password�keystorer5�td�sfs        r0�get_sign_commandzPackageIndex.get_sign_command�s����x�x���Z�8�����}�}�H���J�J��X�.�/��$��J�J�:�;�
�
�
�
��
�W�W�\�\�"�b�g�g�.�.�x�8�6�A�
B���
�
�O�Y���J��H�6�	7����^�S�X�X�c�]�3��B�w�r6c�^�tjtjd�}|�tj|d<g}g}tj|fi|��}t|jd|j
|f��}|j
�t|jd|j|f��}|j
�|�5|jj|�|jj�|j�|j�|j�|j||fS)a�
        Run a command in a child process , passing it any input data specified.

        :param cmd: The command to run.
        :param input_data: If specified, this must be a byte string containing
                           data to be sent to the child process.
        :return: A tuple consisting of the subprocess' exit code, a list of
                 lines read from the subprocess' ``stdout``, and a list of
                 lines read from the subprocess' ``stderr``.
        r�stdinr)�target�argsr)r#�PIPE�Popenrrar�startrrw�writer]�waitrm�
returncode)	r&r5�
input_data�kwargsrr�p�t1�t2s	         r0�run_commandzPackageIndex.run_command�s���!�o�o� �o�o�
���!�(�o�o�F�7�O��������S�+�F�+���4�<�<�x����6�.J�
K��
���
�
�4�<�<�x����6�.J�
K��
���
��!�
�G�G�M�M�*�%�
�G�G�M�M�O�	����
���	�
���	��|�|�V�V�+�+r6c��|j||||�\}}|j||jd��\}}}	|dk7rtd|z��|S)aR
        Sign a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param keystore: The path to a directory which contains the keys
                         used in signing. If not specified, the instance's
                         ``gpg_home`` attribute is used instead.
        :return: The absolute pathname of the file where the signature is
                 stored.
        rVrz&sign command failed with error code %s)rur��encoder)
r&rorprqrrr5�sig_filer/rrs
          r0�	sign_filezPackageIndex.sign_file�so���-�-�h��
�.6�8�
��X�!�-�-�c�.;�.B�.B�7�.K�M���F�F�
��7�"�$-�/1�$2�3�
3��r6c	�$�|j�tjj|�st	d|z��|j�|j
�}d}	|r6|jstjd�n|j||||�}	t|d�5}
|
j�}ddd�tj�j�}tj |�j�}
|j#dd||||
d��dtjj%|�|fg}|	r�t|	d�5}
|
j�}ddd�|j'd	tjj%|	�f�t)j*tjj-|	��|j/|j1�|�}|j3|�S#1swY��FxYw#1swY��xYw)
a�
        Upload a release file to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the file to be uploaded.
        :param filename: The pathname of the file to be uploaded.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param filetype: The type of the file being uploaded. This is the
                        distutils command which produced that file, e.g.
                        ``sdist`` or ``bdist_wheel``.
        :param pyversion: The version of Python which the release relates
                          to. For code compatible with any Python, this would
                          be ``source``, otherwise it would be e.g. ``3.2``.
        :param keystore: The path to a directory which contains the keys
                         used in signing. If not specified, the instance's
                         ``gpg_home`` attribute is used instead.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        z
not found: %sNz)no signing program available - not signed�rb�file_upload�1)rI�protocol_version�filetype�	pyversion�
md5_digest�
sha256_digest�content�
gpg_signature)rAr!r)�existsrrKrLrr[�warningr�r �read�hashlib�md5�	hexdigest�sha256�updaternrZ�shutil�rmtree�dirnamerMrNrO)r&rProrprqr�r�rrrQr��f�	file_datar�r��files�sig_datarRs                 r0�upload_filezPackageIndex.upload_file�s���.	
��� ��w�w�~�~�h�'�"�?�X�#=�>�>������O�O�������8�8����J�K��>�>�(�F�M�*2�4��
�(�D�
!�Q�����I�"��[�[��+�5�5�7�
����y�1�;�;�=�
�	���$� #� �"�$�*�

�	��R�W�W�-�-�h�7��C�D����h��%���6�6�8��&��L�L�/�2�7�7�+;�+;�H�+E�!�#�
$��M�M�"�'�'�/�/�(�3�4��%�%�a�g�g�i��7��� � ��)�)�)"�
!��&�%�s�$G9�H�9H�Hc��|j�tjj|�st	d|z��tjj|d�}tjj
|�st	d|z��|j�|j|j}}t|�j�}dd|fd|fg}d||fg}|j||�}	|j|	�S)a2
        Upload documentation to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the documentation to be
                         uploaded.
        :param doc_dir: The pathname of the directory which contains the
                        documentation. This should be the directory that
                        contains the ``index.html`` for the documentation.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        znot a directory: %rz
index.htmlz
not found: %r)rI�
doc_uploadr^�versionr�)rAr!r)�isdirrrmr�rKr^r�r�getvaluerMrO)
r&rP�doc_dir�fnr^r��zip_data�fieldsr�rRs
          r0�upload_documentationz!PackageIndex.upload_documentation s���	
��� ��w�w�}�}�W�%�"�#8�7�#B�C�C�
�W�W�\�\�'�<�
0���w�w�~�~�b�!�"�?�R�#7�8�8����� �
�
�x�'7�'7�g���7�#�,�,�.��+��4�.�9�g�"6�8���T�8�,�-���%�%�f�e�4��� � ��)�)r6c���|jdddg}|�|j}|r|jd|g�|jd||g�tj	ddj|��|S)a|
        Return a suitable command for verifying a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :param keystore: The path to a directory which contains the keys
                         used in verification. If not specified, the
                         instance's ``gpg_home`` attribute is used instead.
        :return: The verifying command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        rcrdrerfz--verifyrhri)rrrjr[r\rm)r&�signature_filename�
data_filenamerrr5s     r0�get_verify_commandzPackageIndex.get_verify_command<sh���x�x���Z�8�����}�}�H���J�J��X�.�/��
�
�J� 2�M�B�C����^�S�X�X�c�]�3��
r6c��|jstd��|j|||�}|j|�\}}}|dvrtd|z��|dk(S)a6
        Verify a signature for a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :param keystore: The path to a directory which contains the keys
                         used in verification. If not specified, the
                         instance's ``gpg_home`` attribute is used instead.
        :return: True if the signature was verified, else False.
        z0verification unavailable because gpg unavailable)rrz(verify command failed with error code %sr)rrr�r�)r&r�r�rrr5r/rrs        r0�verify_signaturezPackageIndex.verify_signatureTsw���x�x�"�$1�2�
2��%�%�&8�-�&.�0��!�-�-�c�2���F�F�
�V��"�$'�)+�$,�-�
-��Q�w�r6c	�n�|�d}tjd�nKt|ttf�r|\}}nd}tt|��}tjd|z�t|d�5}|jt|��}	|j�}	d}
d}d}d}
d	|	vrt|	d
�}|r
||
|
|�	|j|
�}|snD|t|�z
}|j|�|r|j|�|
dz
}
|r
||
|
|��X	|j!�	ddd�dk\r|krt#d||fz��|rB|j%�}||k7rt#�d
|�d|�d|����tjd|�yy#|j!�wxYw#1swY�}xYw)a
        This is a convenience method for downloading a file from an URL.
        Normally, this will be a file from the index, though currently
        no check is made for this (i.e. a file can be downloaded from
        anywhere).

        The method is just like the :func:`urlretrieve` function in the
        standard library, except that it allows digest computation to be
        done during download and checking that the downloaded data
        matched any expected value.

        :param url: The URL of the file to be downloaded (assumed to be
                    available via an HTTP GET request).
        :param destfile: The pathname where the downloaded file is to be
                         saved.
        :param digest: If specified, this must be a (hasher, value)
                       tuple, where hasher is the algorithm used (e.g.
                       ``'md5'``) and ``value`` is the expected value.
        :param reporthook: The same as for :func:`urlretrieve` in the
                           standard library.
        NzNo digest specifiedr�zDigest specified: %s�wbi ���rzcontent-lengthzContent-Lengthrz1retrieval incomplete: got only %d out of %d bytesz digest mismatch for z: expected z, got zDigest verified: %s)r[r\�
isinstance�list�tuple�getattrr�r rOr�info�intr��lenr}r�r]rr�)r&r�destfile�digest�
reporthook�digester�hasher�dfp�sfp�headers�	blocksize�sizer��blocknum�block�actuals                r0�
download_filezPackageIndex.download_filems���,�>��H��L�L�.�/��&�4��-�0�!'������/�w�w��/�1�H��L�L�/�&�8�9��(�D�
!�S��#�#�G�C�L�1�C�
��(�(�*�� �	�������#�w�.��w�'7�8�9�D���x��D�9���H�H�Y�/�E� ���C��J�&�D��I�I�e�$�� ����.���M�H�!�"�8�Y��=����	�	��5"�:�1�9����"�C���,�� �
 ���'�'�)�F����&�7=�x�7=�v�(G�H�H�
�L�L�.��7�
���	�	���5"�
!�s%�2F+�BF�F+�F(�(F+�+F4c���g}|jr|j|j�|jr|j|j�t|�}|j	|�S)z�
        Send a standard library :class:`Request` to PyPI and return its
        response.

        :param req: The request to send.
        :return: The HTTP response from PyPI (a standard library HTTPResponse).
        )rrZrr
r )r&�req�handlers�openers    r0rOzPackageIndex.send_request�sX����� � ��O�O�D�1�1�2�����O�O�D�-�-�.��x�(���{�{�3��r6c
��g}|j}|D]^\}}t|ttf�s|g}|D];}|j	d|zd|zjd�d|jd�f��=�`|D]4\}}	}
|j	d|zd|�d|	�d�jd�d|
f��6|j	d|zdzdf�dj
|�}d	|z}|tt|��d
�}
t|j||
�S)a&
        Encode fields and files for posting to an HTTP server.

        :param fields: The fields to send as a list of (fieldname, value)
                       tuples.
        :param files: The files to send as a list of (fieldname, filename,
                      file_bytes) tuple.
        s--z)Content-Disposition: form-data; name="%s"rVr6z&Content-Disposition: form-data; name="z
"; filename="�"s
smultipart/form-data; boundary=)zContent-typezContent-length)�boundaryr�r�r�rjr�rm�strr�rr)r&r�r��partsr��k�values�v�keyro�value�body�ctr�s              r0rMzPackageIndex.encode_request�s�����=�=���I�A�v��f�t�U�m�4� ���������H�$�@�����w����H�H�W�%�'�(��	 �%*� �C��5��L�L��� ��x�!�"(�&��/����
�%*�	���e�h�&��.��4�5��|�|�E�"��
.��
9���!�#�d�)�n�
���t�x�x��w�/�/r6c���t|t�rd|i}t|jd��}	|j	||xsd�|d��S#|d��wxYw)Nr^g@)�timeout�andr])r�rr
r�search)r&�terms�operator�	rpc_proxys    r0r�zPackageIndex.search�s[���e�\�*��U�O�E�����#�6�	�	!��#�#�E�8�+<�u�=��I�g�� ���I�g�� �s�A�A)N)NN�sdist�sourceN)NN)�__name__�
__module__�__qualname__�__doc__r�r1r3rrBrArTrarur�r�r�r�r�r�r�rOrMr��r6r0rrs����
A�H��:�3��
9�*�(�$�8!,�F�.JN�CG�7*�r*�:%)��2#'��2K8�Z � )0�V!r6r)r��loggingr!r�r#rk�	threadingr�ImportError�dummy_threading�r�compatrrrr	r
rr4rr
�	getLoggerr�r[r�
DEFAULT_REALM�objectrr�r6r0�<module>r�sq����	�
���'� ��;�;�&�	��	�	�8�	$��'�
��
�`!�6�`!���'�&�'�s�A � A.�-A.python3.12/site-packages/pip/_vendor/distlib/__pycache__/locators.cpython-312.pyc000064400000165200151732701630023541 0ustar00�

R`i���
�ddlZddlmZddlZddlZddlZddlZddlZ	ddlZddlZddlm
Z
ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZm Z m!Z!ddl"m#Z#m$Z$ddl%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-dd	l.m/Z/m0Z0dd
l1m2Z2m3Z3ejhe5�Z6ejnd�Z8ejndejr�Z:ejnd
�Z;dZ<d+d�Z=Gd�de�Z>Gd�de?�Z@Gd�de@�ZAGd�de@�ZBGd�de?�ZCGd�de@�ZDGd�de@�ZEGd�de@�ZFGd �d!e@�ZGGd"�d#e@�ZHeHeDd$d%�&�d'�(�ZIeIj�ZJGd)�d*e?�ZKy#e	$rddl
ZY��]wxYw),�N)�BytesIO�)�DistlibException)�urljoin�urlparse�
urlunparse�url2pathname�pathname2url�queue�quote�unescape�build_opener�HTTPRedirectHandler�	text_type�Request�	HTTPError�URLError)�Distribution�DistributionPath�	make_dist)�Metadata�MetadataInvalidError)�cached_property�ensure_slash�split_filename�get_project_data�parse_requirement�parse_name_and_version�ServerProxy�normalize_name)�
get_scheme�UnsupportedVersionError)�Wheel�
is_compatiblez^(\w+)=([a-f0-9]+)z;\s*charset\s*=\s*(.*)\s*$ztext/html|application/x(ht)?mlzhttps://pypi.org/pypic��|�t}t|d��}	|j�|d��S#|d��wxYw)z�
    Return all distribution names known by an index.
    :param url: The URL of the index.
    :return: A list of all known distribution names.
    �@��timeout�close)�
DEFAULT_INDEXr�
list_packages)�url�clients  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distlib/locators.py�get_all_distribution_namesr/)sD���{���
��c�
*�F���#�#�%���w������w���s	�4�Ac�"�eZdZdZd�ZexZxZZy)�RedirectHandlerzE
    A class to work around a bug in some Python 3.2.x releases.
    c��d}dD]
}||vs�||}n|�yt|�}|jdk(r>t|j�|�}t	|d�r|j|�n||<t
j||||||�S)N)�location�uri��replace_header)r�schemer�get_full_url�hasattrr6�BaseRedirectHandler�http_error_302)	�self�req�fp�code�msg�headers�newurl�key�urlpartss	         r.r;zRedirectHandler.http_error_302@s�����&�C��g�~� �����'��>���F�#���?�?�b� ��S�-�-�/��8�F��w� 0�1��&�&�s�F�3�%����"�1�1�$��R��s�29�;�	;�N)�__name__�
__module__�__qualname__�__doc__r;�http_error_301�http_error_303�http_error_307�rEr.r1r17s���;�(8F�E�N�E�^�nrEr1c��eZdZdZdZdZdZdZedzZdd�Z	d�Z
d	�Zd
�Zd�Z
d�Zee
e�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zy)�LocatorzG
    A base class for locators - things that locate distributions.
    )z.tar.gzz.tar.bz2z.tarz.zipz.tgzz.tbz)z.eggz.exe�.whl)z.pdfN)rPc��i|_||_tt��|_d|_t
j�|_y)a^
        Initialise an instance.
        :param scheme: Because locators look for most recent versions, they
                       need to know the version scheme to use. This specifies
                       the current PEP-recommended scheme - use ``'legacy'``
                       if you need to support existing distributions on PyPI.
        N)	�_cacher7rr1�opener�matcherr�Queue�errors)r<r7s  r.�__init__zLocator.__init__fs9��������#�?�#4�5�������k�k�m��rEc�@�g}|jj�sb	|jjd�}|j|�|jj�|jj�s�b|S#|jj$rY��wxYw)z8
        Return any errors which have occurred.
        F)rV�empty�get�append�Empty�	task_done)r<�result�es   r.�
get_errorszLocator.get_errorsys������+�+�#�#�%�
��K�K�O�O�E�*���
�
�a� �
�K�K�!�!�#�
�+�+�#�#�%��
���;�;�$�$�
��
�s�,B�B�Bc�$�|j�y)z>
        Clear any errors which may have been logged.
        N)r`�r<s r.�clear_errorszLocator.clear_errors�s��
	
���rEc�8�|jj�y�N)rR�clearrbs r.�clear_cachezLocator.clear_cache�s�������rEc��|jSre��_schemerbs r.�_get_schemezLocator._get_scheme�s���|�|�rEc��||_yreri)r<�values  r.�_set_schemezLocator._set_scheme�s	����rEc��td��)a=
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This should be implemented in subclasses.

        If called from a locate() request, self.matcher will be set to a
        matcher for the requirement to satisfy, otherwise it will be None.
        � Please implement in the subclass��NotImplementedError)r<�names  r.�_get_projectzLocator._get_project�s��"�"D�E�ErEc��td��)�J
        Return all the distribution names known to this locator.
        rprqrbs r.�get_distribution_nameszLocator.get_distribution_names�s��"�"D�E�ErEc���|j�|j|�}|S||jvr|j|}|S|j�|j|�}||j|<|S)z�
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This calls _get_project to do all the work, and just implements a caching layer on top.
        )rRrtrc)r<rsr^s   r.�get_projectzLocator.get_project�sy���;�;���&�&�t�,�F��
�
�T�[�[�
 ��[�[��&�F�
�
�
�����&�&�t�,�F� &�D�K�K����
rEc�6�t|�}tj|j�}d}|j	d�}|j	|j
�}|rt
t|�|j�}|jdk(d|jv||||fS)zu
        Give an url a score which can be used to choose preferred URLs
        for a given project release.
        TrP�httpszpypi.org)r�	posixpath�basename�path�endswith�downloadable_extensionsr$r#�
wheel_tagsr7�netloc)r<r,�tr}�
compatible�is_wheel�is_downloadables       r.�	score_urlzLocator.score_url�s���

�S�M���%�%�a�f�f�-���
��$�$�V�,��"�+�+�D�,H�,H�I���&�u�X�����H�J����G�#�Z�1�8�8�%;���:�x�A�	ArEc���|}|r^|j|�}|j|�}||kDr|}||k7rtjd||�|Stjd||�|S)a{
        Choose one of two URLs where both are candidates for distribution
        archives for the same version of a distribution (for example,
        .tar.gz vs. zip).

        The current implementation favours https:// URLs over http://, archives
        from PyPI over those from other locations, wheel compatibility (if a
        wheel) and then the archive name.
        zNot replacing %r with %rzReplacing %r with %r)r��logger�debug)r<�url1�url2r^�s1�s2s      r.�
prefer_urlzLocator.prefer_url�sk���������%�B�����%�B��B�w�����~����7��t�D��
����3�T�4�@��
rEc��t||�S)zZ
        Attempt to split a filename in project name, version and Python version.
        )r)r<�filename�project_names   r.rzLocator.split_filename�s���h��5�5rEc��d�}d}t|�\}}}}}	}
|
j�jd�rtj	d||
�t
j
|
�}|r|j�\}}
nd\}}
|}|r
|ddk(r|dd}|jd�r�	t|�}t||j�stj	d	|�n�|�d
}n||j|�}|rw|j|j|jt|||||	df�dj!|j"D�cgc]}d
j!t%|dd����!c}�d�}n�|j|j*�stj	d|�n�t-j.|�x}}|j*D]}}|j|�s�|dt1|�}|j3||�}|stj	d|�n.|\}}}|r	|||�r|||t|||||	df�d�}|r||d<n|r
|r|
|d|z<|Scc}w#t&$r }tj)d|�Yd}~�7d}~wwxYw)a
        See if a URL is a candidate for a download URL for a project (the URL
        has typically been scraped from an HTML page).

        If it is, a dictionary is returned with keys "name", "version",
        "filename" and "url"; otherwise, None is returned.
        c�0�t|�t|�k(Sre)r )�name1�name2s  r.�same_projectz:Locator.convert_url_to_download_info.<locals>.same_project�s��!�%�(�N�5�,A�A�ArENzegg=z %s: version hint in fragment: %r)NN����/rPzWheel not compatible: %sTr5z, �.�)rs�versionr�r,�python-versionzinvalid path for wheel: %szNot downloadable: %sz No match for project/version: %s)rsr�r�r,r��	%s_digest)r�lower�
startswithr�r��HASHER_HASH�match�groupsrr#r$r�rsr�r�r�join�pyver�list�	Exception�warningr�r|r}�lenr)r<r,r�r�r^r7r�r~�params�query�frag�m�algo�digest�origpath�wheel�include�vr_r��extr�rsr�r�s                         r.�convert_url_to_download_infoz$Locator.convert_url_to_download_info�s���	B���4<�S�M�1����f�e�T��:�:�<�"�"�6�*��L�L�;�%�t�
-����d�#����8�8�:�L�D�&�%�L�D�&����D��H��O����9�D��=�=�� �
C��d���$�U�D�O�O�<��L�L�!;�T�B�#�+�"&��".�u�z�z�<�"H���$)�J�J�',�}�}�(-���#-�v�v�x�/5�u�b�/B�$C�.2�i�i�@E��� L��1����$�q���u�+�!6�� L�/N�
"������t�;�;�<��L�L�/��6�'�0�0��6�6�D�8��3�3���=�=��%��
�#�c�(��+�D��+�+�D�,�?�A�����%G��N�/0�,��g�u�+�|�L�$�/O�(,�+2�,4�'1�6�6�8�39�5�"�3F�(G�	&�F� %�;@��'7� 8��'4�(�d�)/�F�;��%�&��
��=!M���
C����;�T�B�B��
C�s+�!BI�=$I�!	I�I�	I<�I7�7I<c�|�d}d|vr|d}dD]}||vs�|||f}n|sdD]}d|z}||vs�
|||f}|S|S)z�
        Get a digest from a dictionary by looking at a "digests" dictionary
        or keys of the form 'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
        N�digests)�sha256�md5r�rM)r<�infor^r�r�rCs      r.�_get_digestzLocator._get_digest1sy��������9�o�G�)���7�?�"�G�D�M�2�F��*��)��!�D�(���$�;�"�D��I�.�F���
�*�
�
rEc���|jd�}|jd�}||vr||}|j}n$t|||j��}|j}|j	|�x|_}|d}||d|<|j|dk7rM|j|j|�|_|dj|t��j|�||_|||<y)z�
        Update a result dictionary (the final result from _get_project) with a
        dictionary for a specific version, which typically holds information
        gleaned from a filename or URL for an archive for the distribution.
        rsr��r7r,r��urlsN)�pop�metadatarr7r�r��
source_urlr��
setdefault�set�add�locator)	r<r^r�rsr��dist�mdr�r,s	         r.�_update_version_datazLocator._update_version_dataHs����x�x�����(�(�9�%���f���'�?�D����B��T�7�4�;�;�?�D����B�#�/�/��5�5���f��5�k��!'��y��#��
�=�=�D��K�'� �O�O�B�M�M�3�?�B�M��6�N�%�%�g�s�u�5�9�9�#�>������w�rEc���d}t|�}|�td|z��t|j�}|j	|j
�x|_}tjd|t|�j�|j|j�}t|�dkDr�g}|j}	|D]?}
|
dvr�	|j|
�sn%|s|	|
�js|j!|
��At|�dkDrt'||j(��}|r tjd	|�|d
}||}|r�|j*r|j*|_|j-di�j-t/��|_i}|j-di�}
|j0D]}||
vs�|
|||<�||_d|_|S#t"$rtj%d||
�Y��<wxYw)
a
        Find the most recent distribution which matches the given
        requirement.

        :param requirement: A requirement of the form 'foo (1.0)' or perhaps
                            'foo (>= 1.0, < 2.0, != 1.3)'
        :param prereleases: If ``True``, allow pre-release versions
                            to be located. Otherwise, pre-release versions
                            are not returned.
        :return: A :class:`Distribution` instance, or ``None`` if no such
                 distribution could be located.
        NzNot a valid requirement: %rzmatcher: %s (%s)r��r�r�zerror matching %s with %rr)rCzsorted list: %sr�r�r�)rrr!r7rT�requirementr�r��typerFryrsr��
version_classr��
is_prereleaser[r�r��sortedrC�extrasrZr��
download_urlsr�)r<r��prereleasesr^�rr7rT�versions�slist�vcls�kr��d�sdr,s               r.�locatezLocator.locate_s������k�*���9�"�#@�;�#N�O�O��D�K�K�(��!'����
�
�!>�>���w����'��$�w�-�2H�2H�I��#�#�A�F�F�+���x�=�1���E��(�(�D����+�+���"�=�=��+��&�d�1�g�.C�.C�!�L�L��O����5�z�A�~��u�&�*�*�5������.��6���)��!�'�*����x�x� !����
�#+�<�<���#;�#?�#?����#O�F� ��A����i��,�B��+�+���"�9���W�A�c�F�,��F�N�����
��)!���N�N�#>���K���s�7G� G5�4G5)�default)F)rFrGrHrI�source_extensions�binary_extensions�excluded_extensionsr�r�rWr`rcrgrkrn�propertyr7rtrwryr�r�rr�r�r�r�rMrEr.rOrOVs����P��0��#���J�/�)�;��$�&������k�;�
/�F�
F�F��"
A��,6�H�T�.�.9rErOc�.��eZdZdZ�fd�Zd�Zd�Z�xZS)�PyPIRPCLocatorz�
    This locator uses XML-RPC to locate distributions. It therefore
    cannot be used with simple mirrors (that only mirror file content).
    c�^��tt|�
di|��||_t	|d��|_y)z�
        Initialise an instance.

        :param url: The URL to use for XML-RPC.
        :param kwargs: Passed to the superclass constructor.
        r&r'NrM)�superr�rW�base_urlrr-�r<r,�kwargs�	__class__s   �r.rWzPyPIRPCLocator.__init__�s,���	�n�d�,�6�v�6���
�!�#�s�3��rEc�H�t|jj��S�rv)r�r-r+rbs r.rwz%PyPIRPCLocator.get_distribution_names�s���4�;�;�,�,�.�/�/rEc���iid�}|jj|d�}|D�]8}|jj||�}|jj||�}t	|j
��}|d|_|d|_|jd�|_	|jdg�|_
|jd�|_t|�}|s��|d	}	|	d
|_
|j|	�|_||_|||<|D]L}	|	d
}
|j|	�}|dj#|t%��j'|
�||d|
<�N��;|S)
Nr�Tr�rsr��license�keywords�summaryrr,r�r�)r-�package_releases�release_urls�release_datarr7rsr�rZr�r�r�rr�r�r�r�r�r�r�)r<rsr^r�r�r��datar�r�r�r,r�s            r.rtzPyPIRPCLocator._get_project�sP����,���;�;�/�/��d�;���A��;�;�+�+�D�!�4�D��;�;�+�+�D�!�4�D��t�{�{�3�H� ��L�H�M�#�I��H��#�x�x�	�2�H�� $����R� 8�H��#�x�x�	�2�H����)�D���A�w��&*�5�k��#�"�.�.�t�4���#��� ��q�	� �D��u�+�C�!�-�-�d�3�F��6�N�-�-�a���7�;�;�C�@�-3�F�9�%�c�*�	!�!�*�
rE�rFrGrHrIrWrwrt�
__classcell__�r�s@r.r�r��s����	4�0�rEr�c�.��eZdZdZ�fd�Zd�Zd�Z�xZS)�PyPIJSONLocatorzw
    This locator uses PyPI's JSON interface. It's very limited in functionality
    and probably not worth using.
    c�L��tt|�
di|��t|�|_y)NrM)r�r�rWrr�r�s   �r.rWzPyPIJSONLocator.__init__�s!���
�o�t�-�7��7�$�S�)��
rEc��td���rvzNot available from this locatorrqrbs r.rwz&PyPIJSONLocator.get_distribution_names����"�"C�D�DrEc���iid�}t|jdt|�z�}	|jj	|�}|j�j
�}tj|�}t|j��}|d}|d|_|d|_|jd�|_|jdg�|_|jd	�|_t#|�}||_|d
}	|||j<|d
D]�}
|
d}|j&j)|�|j+|
�|j,|<|d
j/|jt1��j)|�|j+|
�|d|<��|d
j3�D]�\}}||jk(r�t|j��}
|j|
_||
_t#|
�}||_|||<|D]�}
|
d}|j&j)|�|j+|
�|j,|<|d
j/|t1��j)|�|j+|
�|d|<����	|S#t4$rE}|j6j9t;|��t<j?d|�Yd}~|Sd}~wwxYw)Nr�z%s/jsonr�r�rsr�r�r�r�r�r,r��releaseszJSON fetch failed: %s) rr�rrS�open�read�decode�json�loadsrr7rsr�rZr�r�r�rr�r�r�r�r�r�r��itemsr�rV�putrr��	exception)r<rsr^r,�respr�r�r�r�r�r�r��infos�omd�odistr_s                r.rtzPyPIJSONLocator._get_project�s�����,���d�m�m�Y��t��%<�=��/	9��;�;�#�#�C�(�D��9�9�;�%�%�'�D��
�
�4� �A�����-�B��V�9�D��6�l�B�G��i��B�J����)�,�B�J��(�(�:�r�2�B�K����)�,�B�J���#�D��D�L��V�9�D�!%�F�2�:�:���&�	���5�k���"�"�&�&�s�+�$(�$4�$4�T�$:����S�!��v��)�)�"�*�*�c�e�<�@�@��E�)-�)9�)9�$�)?��y�!�#�&�"�#$�J�-�"5�"5�"7�����b�j�j�(���d�k�k�2���7�7���%���$�S�)�� $��
�"'��w��!�D��u�+�C��'�'�+�+�C�0�)-�)9�)9�$�)?�E�M�M�#�&��6�N�-�-�g�s�u�=�A�A�#�F�-1�-=�-=�d�-C�F�9�%�c�*�"�#8�4�
���	9��K�K�O�O�I�a�L�)����4�a�8�8��
��	9�s�I3J�	K-�(:K(�(K-r�r�s@r.r�r��s����*�E�3rEr�c�"�eZdZdZej
dejejzejz�Z	ej
dejejz�Z
d�Zej
dej�Ze
d��Zy)�Pagez4
    This class represents a scraped HTML page.
    z�
(rel\s*=\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\s
]*))\s+)?
href\s*=\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\s
]*))
(\s+rel\s*=\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\s
]*)))?
z!<base\s+href\s*=\s*['"]?([^'">]+)c��||_|x|_|_|jj	|j�}|r|jd�|_yy)zk
        Initialise an instance with the Unicode page contents and the URL they
        came from.
        rN)r�r�r,�_base�search�group)r<r�r,r�s    r.rWz
Page.__init__ sH��
��	�#&�&��
����J�J���d�i�i�(����G�G�A�J�D�M�
rEz[^a-z0-9$&+,/:;=?@.#%_\\|-]c���d�}t�}|jj|j�D]�}|j	d�}|dxs!|dxs|dxs|dxs|dxs|d}|d	xs|d
xs|d}t|j|�}t|�}|jjd�|�}|j||f���t|d
�d��}|S)z�
        Return the URLs of all the links on a page together with information
        about their "rel" attribute, for determining which ones to treat as
        downloads and which ones to queue for further scraping.
        c�Z�t|�\}}}}}}t||t|�|||f�S)zTidy up an URL.)rrr)r,r7r�r~r�r�r�s       r.�cleanzPage.links.<locals>.clean4s;��8@��
�5�F�F�D�&�%���v�v�u�T�{�%�u�d�4�5�
5rEr5�rel1�rel2�rel3�rel4�rel5�rel6r�r��url3c�<�dt|jd��zS)Nz%%%2xr)�ordr)r�s r.�<lambda>zPage.links.<locals>.<lambda>Bs��w��Q�W�W�Q�Z��/HrEc��|dS)NrrM)r�s r.rzPage.links.<locals>.<lambda>Fs��a��drET)rC�reverse)r��_href�finditerr��	groupdictrr�r
�	_clean_re�subr�r�)r<rr^r�r��relr,s       r.�linksz
Page.links-s���	5�����Z�Z�(�(����3�E�����#�A��V�9�7��&�	�7�Q�v�Y�7��V�9�7� !�&�	�7�-.�v�Y�
��F�)�5�q��y�5�A�f�I�C��$�-�-��-�C��3�-�C��.�.�$�$�%H�#�N�C��J�J��S�z�"�4���N�D�A���
rEN)rFrGrHrI�re�compile�I�S�XrrrWr!rr$rMrEr.r
r
s����
�B�J�J���T�T�B�D�D�[�2�4�4��	
�E�

�B�J�J�?��������M�E�	'���
�
�9�2�4�4�@�I����rEr
c����eZdZdZej
d�d�d�Zd�fd�	Zd�Zd�Z	d�Z
ejd	ej�Zd
�Zd�Zd�Zd
�Zd�Zejd�Zd�Z�xZS)�SimpleScrapingLocatorz�
    A locator which scrapes HTML pages to locate downloads for a distribution.
    This runs multiple threads to do the I/O; performance is at least as good
    as pip's PackageFinder, which works in an analogous fashion.
    c�\�tjt|���j�S)N)�fileobj)�gzip�GzipFilerr���bs r.rzSimpleScrapingLocator.<lambda>Ts��$�-�-���
�;�@�@�BrEc��|SrerMr0s r.rzSimpleScrapingLocator.<lambda>Us��!rE)�deflater.�nonec�d��tt|�
di|��t|�|_||_i|_t�|_tj�|_t�|_d|_
||_tj �|_tj �|_d|_y)a�
        Initialise an instance.
        :param url: The root URL to use for scraping.
        :param timeout: The timeout, in seconds, to be applied to requests.
                        This defaults to ``None`` (no timeout specified).
        :param num_workers: The number of worker threads you want to do I/O,
                            This defaults to 10.
        :param kwargs: Passed to the superclass.
        FNrM)r�r+rWrr�r(�_page_cacher��_seenrrU�	_to_fetch�
_bad_hosts�skip_externals�num_workers�	threading�RLock�_lock�_gplock�platform_check)r<r,r(r;r�r�s     �r.rWzSimpleScrapingLocator.__init__Xs����	�#�T�3�=�f�=�$�S�)��
��������U��
��������%���#���&����_�_�&��
�
!���(���#��rEc���g|_t|j�D]T}tj|j
��}d|_|j�|jj|��Vy)z�
        Threads are created only when get_project is called, and terminate
        before it returns. They are there primarily to parallelise I/O (i.e.
        fetching web pages).
        )�targetTN)	�_threads�ranger;r<�Thread�_fetch�daemon�startr[)r<�ir�s   r.�_prepare_threadsz&SimpleScrapingLocator._prepare_threadsssV����
��t�'�'�(�A�� � ����4�A��A�H�
�G�G�I��M�M� � ��#�	)rEc��|jD]}|jjd��|jD]}|j��g|_y)zu
        Tell all the threads to terminate (by sending a sentinel value) and
        wait for them to do so.
        N)rCr8rr�)r<r�s  r.�
_wait_threadsz#SimpleScrapingLocator._wait_threads�sB�����A��N�N���t�$�����A�
�F�F�H����
rEc�"�iid�}|j5||_||_t|jdt|�z�}|jj�|jj�|j�	tjd|�|jj|�|jj�|j�|`ddd�|S#|j�wxYw#1swY|SxYw)Nr�z%s/zQueueing %s)r?r^r�rr�rr7rfr6rJr�r�r8rr�rL)r<rsr^r,s    r.rtz"SimpleScrapingLocator._get_project�s�����,��
�\�\� �D�K� $�D���$�-�-���t��)<�=�C��J�J�������"�"�$��!�!�#�
%����]�C�0����"�"�3�'����#�#�%��"�"�$�����
���"�"�$����
�s%�A5D�AC/�D�/D�D�Dz<\b(linux_(i\d86|x86_64|arm\w+)|win(32|_amd64)|macosx_?\d+)\bc�8�|jj|�S)zD
        Does an URL refer to a platform-specific download?
        )�platform_dependentr
)r<r,s  r.�_is_platform_dependentz,SimpleScrapingLocator._is_platform_dependent�s���&�&�-�-�c�2�2rEc�0�|jr|j|�rd}n|j||j�}tjd||�|r3|j5|j|j|�ddd�|S|S#1swY|SxYw)a%
        See if an URL is a suitable download for a project.

        If it is, register information in the result dictionary (for
        _get_project) about the specific version it's for.

        Note that the return value isn't actually used other than as a boolean
        value.
        Nzprocess_download: %s -> %s)	r@rPr�r�r�r�r>r�r^)r<r,r�s   r.�_process_downloadz'SimpleScrapingLocator._process_download�s�����4�#>�#>�s�#C��D��4�4�S�$�:K�:K�L�D����1�3��=������)�)�$�+�+�t�<����t�����s�"B�Bc��t|�\}}}}}}|j|j|jz|jz�rd}n�|j
r|j
|j�sd}nm|j
|j�sd}nO|dvrd}nH|dvrd}nA|j|�rd}n-|jdd�d}	|	j�dk(rd}nd}tjd	||||�|S)
z�
        Determine whether a link URL from a referring page and with a
        particular "rel" attribute should be queued for scraping.
        F)�homepage�download)�httpr{�ftp�:rr�	localhostTz#should_queue: %s (%s) from %s -> %s)
rrr�r�r�r:r�r�rP�splitr�r�r�)
r<�link�referrerr#r7r�r~�_r^�hosts
          r.�
_should_queuez#SimpleScrapingLocator._should_queue�s���
)1���%����a��A��=�=��/�/�$�2H�2H�H��1�1�2�3��F�
�
 �
 �������)G��F��$�$�T�]�]�3��F�
�0�
0��F�
�3�
3��F�
�
(�
(��
.��F��<�<��Q�'��*�D��z�z�|�{�*��������:�D�#��v�	'��
rEc���	|jj�}	|r�|j|�}|�	|jj��M|jD]�\}}||j
vs�	|j
j
|�|j|�sE|j|||�r2tjd||�|jj|���|jj�|sy��#t$rY��wxYw#t$r.}|jjt|��Yd}~�_d}~wwxYw#|jj�wxYw)z�
        Get a URL to fetch from the work queue, get the HTML page, examine its
        links for download candidates and candidates for further scraping.

        This is a handy method to run in a thread.
        NzQueueing %s from %s)r8rZ�get_pager]r$r7r�rRr_r�r�rrr�rVr)r<r,�pager[r#r_s      r.rFzSimpleScrapingLocator._fetch�s,����.�.�$�$�&�C�
+���=�=��-�D��|� ����(�(�*�&*�Z�Z�	��c��t�z�z�1�%� $�
�
���t� 4�(,�(>�(>�t�(D�$(�$6�$6�t�S�#�$F�$*�L�L�1F��c�$R�$(�N�N�$6�$6�t�$<��&0����(�(�*���1��$8�%� $�%���
.������	�!��-�-��
.�����(�(�*�sT�D� D�0A1D�!D�	D
�
D�D
�
D�	E�$E�=E
�E�E
�
E&c�$�t|�\}}}}}}|dk(r=tjjt	|��rtt
|�d�}||jvr(|j|}tjd||�|S|jdd�d}d}||jvrtjd||�|St|d	d
i��}	tjd|�|jj||j�
�}	tjd|�|	j!�}
|
j#dd�}t$j'|�r�|	j)�}|	j+�}
|
j#d�}|r|j,|}||
�}
d}t.j1|�}|r|j3d�}	|
j5|�}
t9|
|�}||j|<||j|<|S#t6$r|
j5d�}
Y�HwxYw#t:$r0}|j<dk7rtj?d||�Yd}~�ed}~wt@$r^}tj?d||�|jB5|jjE|�ddd�n#1swYnxYwYd}~��d}~wtF$r!}tj?d||�Yd}~��d}~wwxYw#||j|<wxYw)a
        Get the HTML for an URL, possibly from an in-memory cache.

        XXX TODO Note: this cache is never actually cleared. It's assumed that
        the data won't get stale over the lifetime of a locator instance (not
        necessarily true for the default_locator).
        �filez
index.htmlzReturning %s from cache: %srXrrNzSkipping %s due to bad host %szAccept-encoding�identity)rAzFetching %sr'z
Fetched %szContent-Typer5zContent-Encodingzutf-8zlatin-1i�zFetch failed: %s: %s)$r�osr~�isdirr	rrr6r�r�rZr9rrSr�r(r�rZ�HTML_CONTENT_TYPEr��geturlr��decoders�CHARSETr
rr��UnicodeErrorr
rr?rrr>r�r�)r<r,r7r�r~r]r^r^r=rrA�content_type�	final_urlr��encoding�decoderr�r_s                  r.razSimpleScrapingLocator.get_page�s���)1��
�%����a��A��V�����
�
�l�4�.@� A��,�s�+�\�:�C��$�"�"�"��%�%�c�*�F��L�L�6��V�D�T�
�Q�<�<��Q�'��*�D��F��t���&����=�s�D�I�J�
�G�c�,=�z�+J�K��!3��L�L���4��;�;�+�+�C����+�F�D��L�L��s�3�"�i�i�k�G�#*�;�;�~�r�#B�L�(�.�.�|�<�$(�K�K�M�	�#�y�y�{��#*�;�;�/A�#B��#�&*�m�m�H�&=�G�#*�4�=�D�#*��#�N�N�<�8���'(�w�w�q�z�H�:�#'�;�;�x�#8�D�"&�d�I�!6��6<��(�(��3�-3�D�$�$�S�)��
�� ,�:�#'�;�;�y�#9�D�:��!�I��v�v��}��(�(�)?��a�H����2��$�$�%;�S�!�D�������+�+�D�1�$����� �E��$�$�%;�S�!�D�D��E��-3�D�$�$�S�)�s��C>H5�H�)H5�H2�/H5�1H2�2H5�5	K;�>&I)�$K>�)K;�5#K�J=�4	K�=K	�K�	K>�K;�K6�1K>�6K;�;K>�>Lz<a href=[^>]*>([^<]+)<c��t�}|j|j�}|std|jz��|jj|j�D]"}|j|jd���$|S)rvzUnable to get %sr)	r�rar�r�_distname_rerr�r�r)r<r^rbr�s    r.rwz,SimpleScrapingLocator.get_distribution_names7sm������}�}�T�]�]�+���"�#5��
�
�#E�F�F��&�&�/�/��	�	�:�E��J�J�u�{�{�1�~�&�;��
rE)N�
)rFrGrHrI�zlib�
decompressrjrWrJrLrtr%r&r'rOrPrRr_rFrarrrwr�r�s@r.r+r+Js������?�?�B���H�$�6$���$$����%E�FH�d�d�L��3��(�:�B9�v�2�:�:�6�7�L�
rEr+c�4��eZdZdZ�fd�Zd�Zd�Zd�Z�xZS)�DirectoryLocatorz?
    This class locates distributions in a directory tree.
    c���|jdd�|_tt|�di|��t
jj|�}t
jj|�std|z��||_
y)a�
        Initialise an instance.
        :param path: The root of the directory tree to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * recursive - if True (the default), subdirectories are
                         recursed into. If False, only the top-level directory
                         is searched,
        �	recursiveTzNot a directory: %rNrM)r�ryr�rwrWrfr~�abspathrgr�base_dir)r<r~r�r�s   �r.rWzDirectoryLocator.__init__Hsd��� ���K��6���
���.�8��8��w�w���t�$���w�w�}�}�T�"�"�#8�4�#?�@�@���
rEc�8�|j|j�S)z�
        Should a filename be considered as a candidate for a distribution
        archive? As well as the filename, the directory which contains it
        is provided, though not used by the current implementation.
        )rr�)r<r��parents   r.�should_includezDirectoryLocator.should_includeYs��� � ��!=�!=�>�>rEc��iid�}tj|j�D]�\}}}|D]�}|j||�s�tjj||�}t
ddttjj|��dddf�}|j||�}|s��|j||���|jr��|S|S)Nr�rdr5)rf�walkr{r~r~r�rr
rzr�r�ry)	r<rsr^�root�dirs�files�fnr,r�s	         r.rtzDirectoryLocator._get_projectas�����,��!#������!7��D�$�����&�&�r�4�0������d�B�/�B�$�f�b�&2�2�7�7�?�?�2�3F�&G�&(�"�b�&2�3�C� �<�<�S�$�G�D���1�1�&�$�?���>�>���
�"8��
rEc��t�}tj|j�D]�\}}}|D]�}|j	||�s�tj
j
||�}tddttj
j|��dddf�}|j|d�}|s��|j|d���|jr��|S|S)rvrdr5Nrs)
r�rfr�r{r~r~r�rr
rzr�r�ry)r<r^r�r�r�r�r,r�s        r.rwz'DirectoryLocator.get_distribution_namesqs������!#������!7��D�$�����&�&�r�4�0������d�B�/�B�$�f�b�&2�2�7�7�?�?�2�3F�&G�&(�"�b�&2�3�C� �<�<�S�$�G�D���
�
�4��<�0���>�>���
�"8��
rE)	rFrGrHrIrWr~rtrwr�r�s@r.rwrwCs�����"?�� rErwc��eZdZdZd�Zd�Zy)�JSONLocatora
    This locator uses special extended metadata (not available on PyPI) and is
    the basis of performant dependency resolution in distlib. Other locators
    require archive downloads before dependencies can be determined! As you
    might imagine, that can be slow.
    c��td��r�rqrbs r.rwz"JSONLocator.get_distribution_names�r�rEc	��iid�}t|�}|r�|jdg�D]�}|ddk7s|ddk7r�t|d|d|jd	d
�|j��}|j}|d|_d
|vr|d
rd|d
f|_|jdi�|_|jdi�|_|||j<|dj|jt��j|d���|S)Nr�r��ptype�sdist�	pyversion�sourcersr�r�zPlaceholder for summary)r�r7r,r�r��requirements�exportsr�)
rrZrr7r�r�r��dependenciesr�r�r�r�r�)r<rsr^r�r�r�r�s       r.rtzJSONLocator._get_project�s����,����%�������"�-����=�G�+�t�K�/@�H�/L��!��f��t�I��)-���)�2K�*M�(,���5���]�]�� $�U���
��t�#��X��#(�$�x�.�"9�D�K�"&�(�(�>�2�">���#�x�x�	�2�6���'+��t�|�|�$��v��)�)�$�,�,���>�B�B�4��;�O�%.�&�
rEN)rFrGrHrIrwrtrMrEr.r�r��s���E�rEr�c�(��eZdZdZ�fd�Zd�Z�xZS)�DistPathLocatorz�
    This locator finds installed distributions in a path. It can be useful for
    adding to an :class:`AggregatingLocator`.
    c�^��tt|�
di|��t|t�sJ�||_y)zs
        Initialise an instance.

        :param distpath: A :class:`DistributionPath` instance to search.
        NrM)r�r�rW�
isinstancer�distpath)r<r�r�r�s   �r.rWzDistPathLocator.__init__�s/���	�o�t�-�7��7��(�$4�5�5�5� ��
rEc	���|jj|�}|�iid�}|S|j|d|jt|jg�id|jtdg�ii}|S)Nr�r�r�)r��get_distributionr�r�r�)r<rsr�r^s    r.rtzDistPathLocator._get_project�ss���}�}�-�-�d�3���<� �R�0�F��
�	���d�����s�D�O�O�+<�'=�>��D�L�L�#�t�f�+�6��F�
�
rE)rFrGrHrIrWrtr�r�s@r.r�r��s����!�
rEr�c�x��eZdZdZ�fd�Z�fd�Zd�Zeejje�Z	d�Zd�Z�xZ
S)�AggregatingLocatorzI
    This class allows you to chain and/or merge a list of locators.
    c�h��|jdd�|_||_tt|�di|��y)a�
        Initialise an instance.

        :param locators: The list of locators to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * merge - if False (the default), the first successful
                         search from any of the locators is returned. If True,
                         the results from all locators are merged (this can be
                         slow).
        �mergeFNrM)r�r��locatorsr�r�rW)r<r�r�r�s   �r.rWzAggregatingLocator.__init__�s1����Z�Z���/��
� ��
�
� �$�0�:�6�:rEc�l��tt|��|jD]}|j��yre)r�r�rgr�)r<r�r�s  �r.rgzAggregatingLocator.clear_cache�s+���
� �$�3�5��}�}�G����!�%rEc�B�||_|jD]	}||_�yre)rjr�r7)r<rmr�s   r.rnzAggregatingLocator._set_scheme�s������}�}�G�"�G�N�%rEc�0�i}|jD�]}|j|�}|s�|jr�|jdi�}|jdi�}|j	|�|jd�}|r1|r/|j�D]\}}	||vr||xx|	zcc<�|	||<�|jd�}
|s��|
s��|
j	|���|j�d}n(d}|D]!}|jj|�s�d}n|s��|}|S|S)Nr�r�TF)r�ryr�rZ�updaterrTr�)r<rsr^r�r�r�r��dfr�r��dd�founds            r.rtzAggregatingLocator._get_project�s�����}�}�G��#�#�D�)�A���:�:�"�J�J�v�r�2�E�$�j�j��B�7�G��M�M�!�$����F�+�B���$)�K�K�M�D�A�q� �B�w� "�1���
��()��1��	%2�
 ���I�.�B��2��	�	�'�*��|�|�+� $�� %��!"�A�#�|�|�1�1�!�4�(,�� %�"#��!"����
�Q%�P�
rEc��t�}|jD]}	||j�z}�|S#t$rY�&wxYwr�)r�r�rwrr)r<r^r�s   r.rwz)AggregatingLocator.get_distribution_namessL������}�}�G�
��'�8�8�:�:��%�
�
��'�
��
�s�2�	>�>)rFrGrHrIrWrgrnr�rOr7�fgetrtrwr�r�s@r.r�r��s:����;� "�
#�
�g�n�n�)�)�;�
7�F�*�X
rEr�zhttps://pypi.org/simple/r&r'�legacyr�c�>�eZdZdZd
d�Zd�Zd�Zd�Zd�Zd�Z	dd	�Z
y)�DependencyFinderz0
    Locate dependencies for distributions.
    Nc�j�|xst|_t|jj�|_y)zf
        Initialise an instance, using the specified locator
        to locate distributions.
        N)�default_locatorr�r!r7)r<r�s  r.rWzDependencyFinder.__init__/s&��
�1�/��� ����!4�!4�5��rEc�t�tjd|�|j}||j|<||j||j
f<|jD]]}t|�\}}tjd|||�|jj|t��j||f��_y)z�
        Add a distribution to the finder. This will update internal information
        about who provides what.
        :param dist: The distribution to add.
        zadding distribution %szAdd to provided: %s, %s, %sN)r�r�rC�
dists_by_name�distsr��providesr�providedr�r�r�)r<r�rs�pr�s     r.�add_distributionz!DependencyFinder.add_distribution7s���	���-�t�4��x�x��#'����4� �+/��
�
�D�$�,�,�'�(����A�2�1�5�M�D�'��L�L�6��g�t�L��M�M�$�$�T�3�5�1�5�5�w��o�F�rEc�f�tjd|�|j}|j|=|j||j
f=|jD]Z}t|�\}}tjd|||�|j|}|j||f�|r�N|j|=�\y)z�
        Remove a distribution from the finder. This will update internal
        information about who provides what.
        :param dist: The distribution to remove.
        zremoving distribution %sz Remove from provided: %s, %s, %sN)
r�r�rCr�r�r�r�rr��remove)r<r�rsr�r��ss      r.�remove_distributionz$DependencyFinder.remove_distributionFs���	���/��6��x�x�����t�$��J�J��d�l�l�+�,����A�2�1�5�M�D�'��L�L�;�T�7�D�Q��
�
�d�#�A�
�H�H�g�t�_�%���M�M�$�'�
rEc��	|jj|�}|S#t$r2|j�d}|jj|�}Y|SwxYw)z�
        Get a version matcher for a requirement.
        :param reqt: The requirement
        :type reqt: str
        :return: A version matcher (an instance of
                 :class:`distlib.version.Matcher`).
        r)r7rTr"rZ)r<�reqtrTrss    r.�get_matcherzDependencyFinder.get_matcherXs[��	0��k�k�)�)�$�/�G�
���	'�	0��:�:�<��?�D��k�k�)�)�$�/�G���		0�s��7A�Ac��|j|�}|j}t�}|j}||vr5||D]-\}}	|j	|�}|s�|j
|�|S|S#t
$rd}Y�'wxYw)z�
        Find the distributions which can fulfill a requirement.

        :param reqt: The requirement.
         :type reqt: str
        :return: A set of distribution which can fulfill the requirement.
        F)r�rCr�r�r�r"r�)	r<r�rTrsr^r�r��providerr�s	         r.�find_providerszDependencyFinder.find_providershs����"�"�4�(���{�{������=�=���8��%-�d�^�!���"�#�M�M�'�2�E���J�J�x�(���
�&4��
��
/�"�!�E�"�s�A/�/A=�<A=c���|j|}t�}|D]@}|j|�}|j|j�r�0|j|��B|r"|jd||t
|�f�d}|S|j|�|j|=|D]5}|jj|t��j|��7|j|�d}|S)a�
        Attempt to replace one provider with another. This is typically used
        when resolving dependencies from multiple sources, e.g. A requires
        (B >= 1.0) while C requires (B >= 1.1).

        For successful replacement, ``provider`` must meet all the requirements
        which ``other`` fulfills.

        :param provider: The provider we are trying to replace with.
        :param other: The provider we're trying to replace.
        :param problems: If False is returned, this will contain what
                         problems prevented replacement. This is currently
                         a tuple of the literal string 'cantreplace',
                         ``provider``, ``other``  and the set of requirements
                         that ``provider`` couldn't fulfill.
        :return: True if we can replace ``other`` with ``provider``, else
                 False.
        �cantreplaceFT)
�reqtsr�r�r�r�r��	frozensetr�r�r�)	r<r��other�problems�rlist�	unmatchedr�rTr^s	         r.�try_to_replacezDependencyFinder.try_to_replace�s���&�
�
�5�!���E�	��A��&�&�q�)�G��=�=��!1�!1�2��
�
�a� ����L�L�-��5�#�I�.�0�
1��F��
�

�$�$�U�+��
�
�5�!����
�
�%�%�h���6�:�:�1�=���!�!�(�+��F��
rEc��i|_i|_i|_i|_t	|xsg�}d|vr!|jd�|t	gd��z}t
|t�r|x}}tjd|�nE|jj||��x}}|�td|z��tjd|�d|_
t	�}t	|g�}t	|g�}|�rd|j�}|j}	|	|jvr|j!|�n'|j|	}
|
|k7r|j#||
|�|j$|j&z}|j(}t	�}
|r'||vr#dD]}d	|z}||vs�
|
t+|d
|z�z}
� ||z|
z}|D�]�}|j-|�}|�stjd|�|jj||��}|�|s|jj|d��}|�*tjd|�|j/d
|f�n�|j|j0}}||f|jvr|j/|�|j/|�||vr5||vr1|j/|�tjd|j2�|D]x}|j}	|	|jvr4|jj5|t	��j/|��Q|j|	}
|
|k7s�f|j#||
|��z���|r��dt	|jj7��}|D]8}||v|_|j8s�tjd|j2��:tjd|�||fS)a�
        Find a distribution and all distributions it depends on.

        :param requirement: The requirement specifying the distribution to
                            find, or a Distribution instance.
        :param meta_extras: A list of meta extras such as :test:, :build: and
                            so on.
        :param prereleases: If ``True``, allow pre-release versions to be
                            returned - otherwise, don't return prereleases
                            unless they're all that's available.

        Return a set of :class:`Distribution` instances and a set of
        problems.

        The distributions returned should be such that they have the
        :attr:`required` attribute set to ``True`` if they were
        from the ``requirement`` passed to ``find()``, and they have the
        :attr:`build_time_dependency` attribute set to ``True`` unless they
        are post-installation dependencies of the ``requirement``.

        The problems should be a tuple consisting of the string
        ``'unsatisfied'`` and the requirement which couldn't be satisfied
        by any distribution known to the locator.
        z:*:)z:test:z:build:z:dev:zpassed %s as requirement)r�zUnable to locate %rz
located %sT)�test�build�devz:%s:z%s_requireszNo providers found for %rzCannot satisfy %r�unsatisfiedzAdding %s to install_distsz#%s is a build-time dependency only.zfind done for %s)r�r�r�r�r�r�r�rr�r�r�r�r�	requestedr�rCr�r��run_requires�
meta_requires�build_requires�getattrr�r�r��name_and_versionr��values�build_time_dependency)r<r��meta_extrasr�r�rr��todo�
install_distsrsr��ireqts�sreqts�ereqtsrCr_�	all_reqtsr��	providersr��nr�r�r�s                        r.�findzDependencyFinder.find�s���4��
���
������
��+�+��,���K�����u�%��3�=�>�>�K��k�<�0�&�&�D�5��L�L�3�U�;��<�<�.�.�{�;F�/�H�
H�D�5��|�&�'<�{�'J�K�K��L�L��u�-�����5���D�6�{���U�G��
���8�8�:�D��8�8�D��4�-�-�-��%�%�d�+��*�*�4�0���D�=��'�'��e�X�>��&�&��);�);�;�F��(�(�F��U�F��t�}�4�3�C����A��K�'��'�$�
��0C�"D�D��4����&�0�I��� �/�/��2�	� ��L�L�!<�a�@�#�|�|�2�2�1�+�2�N�H� �'��#'�<�<�#6�#6�q�d�#6�#K���'����%8�!�<� ���m�Q�%7�8�'�|�|�X�-=�-=�1���q�6����3� �H�H�X�.�!�
�
�h�/���;�4�=�+@�)�-�-�h�7�"�L�L�)E�)1�)B�)B�D�"�A��5�5�D��4�#5�#5�5��
�
�-�-�a���7�;�;�A�>� $� 2� 2�4� 8�� �A�:� �/�/��5�(�C�#�+�)�f�D�J�J�%�%�'�(���D�)-�]�)B�D�&��)�)����B�!�2�2�4��
	���'��/��h��rEre)NF)rFrGrHrIrWr�r�r�r�r�r�rMrEr.r�r�*s-���6�
G�(�$� �0&�PlrEr�re)Lr.�iorr�loggingrfr|r%r<�ImportError�dummy_threadingrtr5r�compatrrrr	r
rrr
rrr:rrrr�databaserrrr�rr�utilrrrrrrrr r�r!r"r�r#r$�	getLoggerrFr�r&r�r'rkrhr*r/r1�objectrOr�r�r
r+rwr�r�r�r�r�r�rMrEr.�<module>r�s�������	��	�(����3�3�3�3�@�?�4�#�#�#�9�'�	��	�	�8�	$���b�j�j�.�/��
�"�*�*�2�B�D�D�
9���B�J�J�?�@��'�
��F�)�F�>B�f�B�J
.�W�.�`B�g�B�J7�6�7�tw�G�w�r?�w�?�B$�'�$�L�g��8V��V�v%�)�*D�25�7�#�	%��
�	�	��j�v�j��s �(�'�(�s�E5�5	F�Fpython3.12/site-packages/pip/_vendor/distlib/wheel.py000064400000125572151732701640016467 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2020 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals

import base64
import codecs
import datetime
from email import message_from_file
import hashlib
import json
import logging
import os
import posixpath
import re
import shutil
import sys
import tempfile
import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir,
                   get_platform)
from .version import NormalizedVersion, UnsupportedVersionError

logger = logging.getLogger(__name__)

cache = None    # created when needed

if hasattr(sys, 'pypy_version_info'):  # pragma: no cover
    IMP_PREFIX = 'pp'
elif sys.platform.startswith('java'):  # pragma: no cover
    IMP_PREFIX = 'jy'
elif sys.platform == 'cli':  # pragma: no cover
    IMP_PREFIX = 'ip'
else:
    IMP_PREFIX = 'cp'

VER_SUFFIX = sysconfig.get_config_var('py_version_nodot')
if not VER_SUFFIX:   # pragma: no cover
    VER_SUFFIX = '%s%s' % sys.version_info[:2]
PYVER = 'py' + VER_SUFFIX
IMPVER = IMP_PREFIX + VER_SUFFIX

ARCH = get_platform().replace('-', '_').replace('.', '_')

ABI = sysconfig.get_config_var('SOABI')
if ABI and ABI.startswith('cpython-'):
    ABI = ABI.replace('cpython-', 'cp').split('-')[0]
else:
    def _derive_abi():
        parts = ['cp', VER_SUFFIX]
        if sysconfig.get_config_var('Py_DEBUG'):
            parts.append('d')
        if IMP_PREFIX == 'cp':
            vi = sys.version_info[:2]
            if vi < (3, 8):
                wpm = sysconfig.get_config_var('WITH_PYMALLOC')
                if wpm is None:
                    wpm = True
                if wpm:
                    parts.append('m')
                if vi < (3, 3):
                    us = sysconfig.get_config_var('Py_UNICODE_SIZE')
                    if us == 4 or (us is None and sys.maxunicode == 0x10FFFF):
                        parts.append('u')
        return ''.join(parts)
    ABI = _derive_abi()
    del _derive_abi

FILENAME_RE = re.compile(r'''
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?
-(?P<py>\w+\d+(\.\w+\d+)*)
-(?P<bi>\w+)
-(?P<ar>\w+(\.\w+)*)
\.whl$
''', re.IGNORECASE | re.VERBOSE)

NAME_VERSION_RE = re.compile(r'''
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?$
''', re.IGNORECASE | re.VERBOSE)

SHEBANG_RE = re.compile(br'\s*#![^\r\n]*')
SHEBANG_DETAIL_RE = re.compile(br'^(\s*#!("[^"]+"|\S+))\s+(.*)$')
SHEBANG_PYTHON = b'#!python'
SHEBANG_PYTHONW = b'#!pythonw'

if os.sep == '/':
    to_posix = lambda o: o
else:
    to_posix = lambda o: o.replace(os.sep, '/')

if sys.version_info[0] < 3:
    import imp
else:
    imp = None
    import importlib.machinery
    import importlib.util

def _get_suffixes():
    if imp:
        return [s[0] for s in imp.get_suffixes()]
    else:
        return importlib.machinery.EXTENSION_SUFFIXES

def _load_dynamic(name, path):
    # https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
    if imp:
        return imp.load_dynamic(name, path)
    else:
        spec = importlib.util.spec_from_file_location(name, path)
        module = importlib.util.module_from_spec(spec)
        sys.modules[name] = module
        spec.loader.exec_module(module)
        return module

class Mounter(object):
    def __init__(self):
        self.impure_wheels = {}
        self.libs = {}

    def add(self, pathname, extensions):
        self.impure_wheels[pathname] = extensions
        self.libs.update(extensions)

    def remove(self, pathname):
        extensions = self.impure_wheels.pop(pathname)
        for k, v in extensions:
            if k in self.libs:
                del self.libs[k]

    def find_module(self, fullname, path=None):
        if fullname in self.libs:
            result = self
        else:
            result = None
        return result

    def load_module(self, fullname):
        if fullname in sys.modules:
            result = sys.modules[fullname]
        else:
            if fullname not in self.libs:
                raise ImportError('unable to find extension for %s' % fullname)
            result = _load_dynamic(fullname, self.libs[fullname])
            result.__loader__ = self
            parts = fullname.rsplit('.', 1)
            if len(parts) > 1:
                result.__package__ = parts[0]
        return result

_hook = Mounter()


class Wheel(object):
    """
    Class to build and install from Wheel files (PEP 427).
    """

    wheel_version = (1, 1)
    hash_kind = 'sha256'

    def __init__(self, filename=None, sign=False, verify=False):
        """
        Initialise an instance using a (valid) filename.
        """
        self.sign = sign
        self.should_verify = verify
        self.buildver = ''
        self.pyver = [PYVER]
        self.abi = ['none']
        self.arch = ['any']
        self.dirname = os.getcwd()
        if filename is None:
            self.name = 'dummy'
            self.version = '0.1'
            self._filename = self.filename
        else:
            m = NAME_VERSION_RE.match(filename)
            if m:
                info = m.groupdict('')
                self.name = info['nm']
                # Reinstate the local version separator
                self.version = info['vn'].replace('_', '-')
                self.buildver = info['bn']
                self._filename = self.filename
            else:
                dirname, filename = os.path.split(filename)
                m = FILENAME_RE.match(filename)
                if not m:
                    raise DistlibException('Invalid name or '
                                           'filename: %r' % filename)
                if dirname:
                    self.dirname = os.path.abspath(dirname)
                self._filename = filename
                info = m.groupdict('')
                self.name = info['nm']
                self.version = info['vn']
                self.buildver = info['bn']
                self.pyver = info['py'].split('.')
                self.abi = info['bi'].split('.')
                self.arch = info['ar'].split('.')

    @property
    def filename(self):
        """
        Build and return a filename from the various components.
        """
        if self.buildver:
            buildver = '-' + self.buildver
        else:
            buildver = ''
        pyver = '.'.join(self.pyver)
        abi = '.'.join(self.abi)
        arch = '.'.join(self.arch)
        # replace - with _ as a local version separator
        version = self.version.replace('-', '_')
        return '%s-%s%s-%s-%s-%s.whl' % (self.name, version, buildver,
                                         pyver, abi, arch)

    @property
    def exists(self):
        path = os.path.join(self.dirname, self.filename)
        return os.path.isfile(path)

    @property
    def tags(self):
        for pyver in self.pyver:
            for abi in self.abi:
                for arch in self.arch:
                    yield pyver, abi, arch

    @cached_property
    def metadata(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        wrapper = codecs.getreader('utf-8')
        with ZipFile(pathname, 'r') as zf:
            wheel_metadata = self.get_wheel_metadata(zf)
            wv = wheel_metadata['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            # if file_version < (1, 1):
                # fns = [WHEEL_METADATA_FILENAME, METADATA_FILENAME,
                       # LEGACY_METADATA_FILENAME]
            # else:
                # fns = [WHEEL_METADATA_FILENAME, METADATA_FILENAME]
            fns = [WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME]
            result = None
            for fn in fns:
                try:
                    metadata_filename = posixpath.join(info_dir, fn)
                    with zf.open(metadata_filename) as bf:
                        wf = wrapper(bf)
                        result = Metadata(fileobj=wf)
                        if result:
                            break
                except KeyError:
                    pass
            if not result:
                raise ValueError('Invalid wheel, because metadata is '
                                 'missing: looked in %s' % ', '.join(fns))
        return result

    def get_wheel_metadata(self, zf):
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        metadata_filename = posixpath.join(info_dir, 'WHEEL')
        with zf.open(metadata_filename) as bf:
            wf = codecs.getreader('utf-8')(bf)
            message = message_from_file(wf)
        return dict(message)

    @cached_property
    def info(self):
        pathname = os.path.join(self.dirname, self.filename)
        with ZipFile(pathname, 'r') as zf:
            result = self.get_wheel_metadata(zf)
        return result

    def process_shebang(self, data):
        m = SHEBANG_RE.match(data)
        if m:
            end = m.end()
            shebang, data_after_shebang = data[:end], data[end:]
            # Preserve any arguments after the interpreter
            if b'pythonw' in shebang.lower():
                shebang_python = SHEBANG_PYTHONW
            else:
                shebang_python = SHEBANG_PYTHON
            m = SHEBANG_DETAIL_RE.match(shebang)
            if m:
                args = b' ' + m.groups()[-1]
            else:
                args = b''
            shebang = shebang_python + args
            data = shebang + data_after_shebang
        else:
            cr = data.find(b'\r')
            lf = data.find(b'\n')
            if cr < 0 or cr > lf:
                term = b'\n'
            else:
                if data[cr:cr + 2] == b'\r\n':
                    term = b'\r\n'
                else:
                    term = b'\r'
            data = SHEBANG_PYTHON + term + data
        return data

    def get_hash(self, data, hash_kind=None):
        if hash_kind is None:
            hash_kind = self.hash_kind
        try:
            hasher = getattr(hashlib, hash_kind)
        except AttributeError:
            raise DistlibException('Unsupported hash algorithm: %r' % hash_kind)
        result = hasher(data).digest()
        result = base64.urlsafe_b64encode(result).rstrip(b'=').decode('ascii')
        return hash_kind, result

    def write_record(self, records, record_path, archive_record_path):
        records = list(records) # make a copy, as mutated
        records.append((archive_record_path, '', ''))
        with CSVWriter(record_path) as writer:
            for row in records:
                writer.writerow(row)

    def write_records(self, info, libdir, archive_paths):
        records = []
        distinfo, info_dir = info
        hasher = getattr(hashlib, self.hash_kind)
        for ap, p in archive_paths:
            with open(p, 'rb') as f:
                data = f.read()
            digest = '%s=%s' % self.get_hash(data)
            size = os.path.getsize(p)
            records.append((ap, digest, size))

        p = os.path.join(distinfo, 'RECORD')
        ap = to_posix(os.path.join(info_dir, 'RECORD'))
        self.write_record(records, p, ap)
        archive_paths.append((ap, p))

    def build_zip(self, pathname, archive_paths):
        with ZipFile(pathname, 'w', zipfile.ZIP_DEFLATED) as zf:
            for ap, p in archive_paths:
                logger.debug('Wrote %s to %s in wheel', p, ap)
                zf.write(p, ap)

    def build(self, paths, tags=None, wheel_version=None):
        """
        Build a wheel from files in specified paths, and use any specified tags
        when determining the name of the wheel.
        """
        if tags is None:
            tags = {}

        libkey = list(filter(lambda o: o in paths, ('purelib', 'platlib')))[0]
        if libkey == 'platlib':
            is_pure = 'false'
            default_pyver = [IMPVER]
            default_abi = [ABI]
            default_arch = [ARCH]
        else:
            is_pure = 'true'
            default_pyver = [PYVER]
            default_abi = ['none']
            default_arch = ['any']

        self.pyver = tags.get('pyver', default_pyver)
        self.abi = tags.get('abi', default_abi)
        self.arch = tags.get('arch', default_arch)

        libdir = paths[libkey]

        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        archive_paths = []

        # First, stuff which is not in site-packages
        for key in ('data', 'headers', 'scripts'):
            if key not in paths:
                continue
            path = paths[key]
            if os.path.isdir(path):
                for root, dirs, files in os.walk(path):
                    for fn in files:
                        p = fsdecode(os.path.join(root, fn))
                        rp = os.path.relpath(p, path)
                        ap = to_posix(os.path.join(data_dir, key, rp))
                        archive_paths.append((ap, p))
                        if key == 'scripts' and not p.endswith('.exe'):
                            with open(p, 'rb') as f:
                                data = f.read()
                            data = self.process_shebang(data)
                            with open(p, 'wb') as f:
                                f.write(data)

        # Now, stuff which is in site-packages, other than the
        # distinfo stuff.
        path = libdir
        distinfo = None
        for root, dirs, files in os.walk(path):
            if root == path:
                # At the top level only, save distinfo for later
                # and skip it for now
                for i, dn in enumerate(dirs):
                    dn = fsdecode(dn)
                    if dn.endswith('.dist-info'):
                        distinfo = os.path.join(root, dn)
                        del dirs[i]
                        break
                assert distinfo, '.dist-info directory expected, not found'

            for fn in files:
                # comment out next suite to leave .pyc files in
                if fsdecode(fn).endswith(('.pyc', '.pyo')):
                    continue
                p = os.path.join(root, fn)
                rp = to_posix(os.path.relpath(p, path))
                archive_paths.append((rp, p))

        # Now distinfo. Assumed to be flat, i.e. os.listdir is enough.
        files = os.listdir(distinfo)
        for fn in files:
            if fn not in ('RECORD', 'INSTALLER', 'SHARED', 'WHEEL'):
                p = fsdecode(os.path.join(distinfo, fn))
                ap = to_posix(os.path.join(info_dir, fn))
                archive_paths.append((ap, p))

        wheel_metadata = [
            'Wheel-Version: %d.%d' % (wheel_version or self.wheel_version),
            'Generator: distlib %s' % __version__,
            'Root-Is-Purelib: %s' % is_pure,
        ]
        for pyver, abi, arch in self.tags:
            wheel_metadata.append('Tag: %s-%s-%s' % (pyver, abi, arch))
        p = os.path.join(distinfo, 'WHEEL')
        with open(p, 'w') as f:
            f.write('\n'.join(wheel_metadata))
        ap = to_posix(os.path.join(info_dir, 'WHEEL'))
        archive_paths.append((ap, p))

        # sort the entries by archive path. Not needed by any spec, but it
        # keeps the archive listing and RECORD tidier than they would otherwise
        # be. Use the number of path segments to keep directory entries together,
        # and keep the dist-info stuff at the end.
        def sorter(t):
            ap = t[0]
            n = ap.count('/')
            if '.dist-info' in ap:
                n += 10000
            return (n, ap)
        archive_paths = sorted(archive_paths, key=sorter)

        # Now, at last, RECORD.
        # Paths in here are archive paths - nothing else makes sense.
        self.write_records((distinfo, info_dir), libdir, archive_paths)
        # Now, ready to build the zip file
        pathname = os.path.join(self.dirname, self.filename)
        self.build_zip(pathname, archive_paths)
        return pathname

    def skip_entry(self, arcname):
        """
        Determine whether an archive entry should be skipped when verifying
        or installing.
        """
        # The signature file won't be in RECORD,
        # and we  don't currently don't do anything with it
        # We also skip directories, as they won't be in RECORD
        # either. See:
        #
        # https://github.com/pypa/wheel/issues/294
        # https://github.com/pypa/wheel/issues/287
        # https://github.com/pypa/wheel/pull/289
        #
        return arcname.endswith(('/', '/RECORD.jws'))

    def install(self, paths, maker, **kwargs):
        """
        Install a wheel to the specified paths. If kwarg ``warner`` is
        specified, it should be a callable, which will be called with two
        tuples indicating the wheel version of this software and the wheel
        version in the file, if there is a discrepancy in the versions.
        This can be used to issue any warnings to raise any exceptions.
        If kwarg ``lib_only`` is True, only the purelib/platlib files are
        installed, and the headers, scripts, data and dist-info metadata are
        not written. If kwarg ``bytecode_hashed_invalidation`` is True, written
        bytecode will try to use file-hash based invalidation (PEP-552) on
        supported interpreter versions (CPython 2.7+).

        The return value is a :class:`InstalledDistribution` instance unless
        ``options.lib_only`` is True, in which case the return value is ``None``.
        """

        dry_run = maker.dry_run
        warner = kwargs.get('warner')
        lib_only = kwargs.get('lib_only', False)
        bc_hashed_invalidation = kwargs.get('bytecode_hashed_invalidation', False)

        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        metadata_name = posixpath.join(info_dir, LEGACY_METADATA_FILENAME)
        wheel_metadata_name = posixpath.join(info_dir, 'WHEEL')
        record_name = posixpath.join(info_dir, 'RECORD')

        wrapper = codecs.getreader('utf-8')

        with ZipFile(pathname, 'r') as zf:
            with zf.open(wheel_metadata_name) as bwf:
                wf = wrapper(bwf)
                message = message_from_file(wf)
            wv = message['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            if (file_version != self.wheel_version) and warner:
                warner(self.wheel_version, file_version)

            if message['Root-Is-Purelib'] == 'true':
                libdir = paths['purelib']
            else:
                libdir = paths['platlib']

            records = {}
            with zf.open(record_name) as bf:
                with CSVReader(stream=bf) as reader:
                    for row in reader:
                        p = row[0]
                        records[p] = row

            data_pfx = posixpath.join(data_dir, '')
            info_pfx = posixpath.join(info_dir, '')
            script_pfx = posixpath.join(data_dir, 'scripts', '')

            # make a new instance rather than a copy of maker's,
            # as we mutate it
            fileop = FileOperator(dry_run=dry_run)
            fileop.record = True    # so we can rollback if needed

            bc = not sys.dont_write_bytecode    # Double negatives. Lovely!

            outfiles = []   # for RECORD writing

            # for script copying/shebang processing
            workdir = tempfile.mkdtemp()
            # set target dir later
            # we default add_launchers to False, as the
            # Python Launcher should be used instead
            maker.source_dir = workdir
            maker.target_dir = None
            try:
                for zinfo in zf.infolist():
                    arcname = zinfo.filename
                    if isinstance(arcname, text_type):
                        u_arcname = arcname
                    else:
                        u_arcname = arcname.decode('utf-8')
                    if self.skip_entry(u_arcname):
                        continue
                    row = records[u_arcname]
                    if row[2] and str(zinfo.file_size) != row[2]:
                        raise DistlibException('size mismatch for '
                                               '%s' % u_arcname)
                    if row[1]:
                        kind, value = row[1].split('=', 1)
                        with zf.open(arcname) as bf:
                            data = bf.read()
                        _, digest = self.get_hash(data, kind)
                        if digest != value:
                            raise DistlibException('digest mismatch for '
                                                   '%s' % arcname)

                    if lib_only and u_arcname.startswith((info_pfx, data_pfx)):
                        logger.debug('lib_only: skipping %s', u_arcname)
                        continue
                    is_script = (u_arcname.startswith(script_pfx)
                                 and not u_arcname.endswith('.exe'))

                    if u_arcname.startswith(data_pfx):
                        _, where, rp = u_arcname.split('/', 2)
                        outfile = os.path.join(paths[where], convert_path(rp))
                    else:
                        # meant for site-packages.
                        if u_arcname in (wheel_metadata_name, record_name):
                            continue
                        outfile = os.path.join(libdir, convert_path(u_arcname))
                    if not is_script:
                        with zf.open(arcname) as bf:
                            fileop.copy_stream(bf, outfile)
                        # Issue #147: permission bits aren't preserved. Using
                        # zf.extract(zinfo, libdir) should have worked, but didn't,
                        # see https://www.thetopsites.net/article/53834422.shtml
                        # So ... manually preserve permission bits as given in zinfo
                        if os.name == 'posix':
                            # just set the normal permission bits
                            os.chmod(outfile, (zinfo.external_attr >> 16) & 0x1FF)
                        outfiles.append(outfile)
                        # Double check the digest of the written file
                        if not dry_run and row[1]:
                            with open(outfile, 'rb') as bf:
                                data = bf.read()
                                _, newdigest = self.get_hash(data, kind)
                                if newdigest != digest:
                                    raise DistlibException('digest mismatch '
                                                           'on write for '
                                                           '%s' % outfile)
                        if bc and outfile.endswith('.py'):
                            try:
                                pyc = fileop.byte_compile(outfile,
                                                          hashed_invalidation=bc_hashed_invalidation)
                                outfiles.append(pyc)
                            except Exception:
                                # Don't give up if byte-compilation fails,
                                # but log it and perhaps warn the user
                                logger.warning('Byte-compilation failed',
                                               exc_info=True)
                    else:
                        fn = os.path.basename(convert_path(arcname))
                        workname = os.path.join(workdir, fn)
                        with zf.open(arcname) as bf:
                            fileop.copy_stream(bf, workname)

                        dn, fn = os.path.split(outfile)
                        maker.target_dir = dn
                        filenames = maker.make(fn)
                        fileop.set_executable_mode(filenames)
                        outfiles.extend(filenames)

                if lib_only:
                    logger.debug('lib_only: returning None')
                    dist = None
                else:
                    # Generate scripts

                    # Try to get pydist.json so we can see if there are
                    # any commands to generate. If this fails (e.g. because
                    # of a legacy wheel), log a warning but don't give up.
                    commands = None
                    file_version = self.info['Wheel-Version']
                    if file_version == '1.0':
                        # Use legacy info
                        ep = posixpath.join(info_dir, 'entry_points.txt')
                        try:
                            with zf.open(ep) as bwf:
                                epdata = read_exports(bwf)
                            commands = {}
                            for key in ('console', 'gui'):
                                k = '%s_scripts' % key
                                if k in epdata:
                                    commands['wrap_%s' % key] = d = {}
                                    for v in epdata[k].values():
                                        s = '%s:%s' % (v.prefix, v.suffix)
                                        if v.flags:
                                            s += ' [%s]' % ','.join(v.flags)
                                        d[v.name] = s
                        except Exception:
                            logger.warning('Unable to read legacy script '
                                           'metadata, so cannot generate '
                                           'scripts')
                    else:
                        try:
                            with zf.open(metadata_name) as bwf:
                                wf = wrapper(bwf)
                                commands = json.load(wf).get('extensions')
                                if commands:
                                    commands = commands.get('python.commands')
                        except Exception:
                            logger.warning('Unable to read JSON metadata, so '
                                           'cannot generate scripts')
                    if commands:
                        console_scripts = commands.get('wrap_console', {})
                        gui_scripts = commands.get('wrap_gui', {})
                        if console_scripts or gui_scripts:
                            script_dir = paths.get('scripts', '')
                            if not os.path.isdir(script_dir):
                                raise ValueError('Valid script path not '
                                                 'specified')
                            maker.target_dir = script_dir
                            for k, v in console_scripts.items():
                                script = '%s = %s' % (k, v)
                                filenames = maker.make(script)
                                fileop.set_executable_mode(filenames)

                            if gui_scripts:
                                options = {'gui': True }
                                for k, v in gui_scripts.items():
                                    script = '%s = %s' % (k, v)
                                    filenames = maker.make(script, options)
                                    fileop.set_executable_mode(filenames)

                    p = os.path.join(libdir, info_dir)
                    dist = InstalledDistribution(p)

                    # Write SHARED
                    paths = dict(paths)     # don't change passed in dict
                    del paths['purelib']
                    del paths['platlib']
                    paths['lib'] = libdir
                    p = dist.write_shared_locations(paths, dry_run)
                    if p:
                        outfiles.append(p)

                    # Write RECORD
                    dist.write_installed_files(outfiles, paths['prefix'],
                                               dry_run)
                return dist
            except Exception:  # pragma: no cover
                logger.exception('installation failed.')
                fileop.rollback()
                raise
            finally:
                shutil.rmtree(workdir)

    def _get_dylib_cache(self):
        global cache
        if cache is None:
            # Use native string to avoid issues on 2.x: see Python #20140.
            base = os.path.join(get_cache_base(), str('dylib-cache'),
                                '%s.%s' % sys.version_info[:2])
            cache = Cache(base)
        return cache

    def _get_extensions(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        arcname = posixpath.join(info_dir, 'EXTENSIONS')
        wrapper = codecs.getreader('utf-8')
        result = []
        with ZipFile(pathname, 'r') as zf:
            try:
                with zf.open(arcname) as bf:
                    wf = wrapper(bf)
                    extensions = json.load(wf)
                    cache = self._get_dylib_cache()
                    prefix = cache.prefix_to_dir(pathname)
                    cache_base = os.path.join(cache.base, prefix)
                    if not os.path.isdir(cache_base):
                        os.makedirs(cache_base)
                    for name, relpath in extensions.items():
                        dest = os.path.join(cache_base, convert_path(relpath))
                        if not os.path.exists(dest):
                            extract = True
                        else:
                            file_time = os.stat(dest).st_mtime
                            file_time = datetime.datetime.fromtimestamp(file_time)
                            info = zf.getinfo(relpath)
                            wheel_time = datetime.datetime(*info.date_time)
                            extract = wheel_time > file_time
                        if extract:
                            zf.extract(relpath, cache_base)
                        result.append((name, dest))
            except KeyError:
                pass
        return result

    def is_compatible(self):
        """
        Determine if a wheel is compatible with the running system.
        """
        return is_compatible(self)

    def is_mountable(self):
        """
        Determine if a wheel is asserted as mountable by its metadata.
        """
        return True # for now - metadata details TBD

    def mount(self, append=False):
        pathname = os.path.abspath(os.path.join(self.dirname, self.filename))
        if not self.is_compatible():
            msg = 'Wheel %s not compatible with this Python.' % pathname
            raise DistlibException(msg)
        if not self.is_mountable():
            msg = 'Wheel %s is marked as not mountable.' % pathname
            raise DistlibException(msg)
        if pathname in sys.path:
            logger.debug('%s already in path', pathname)
        else:
            if append:
                sys.path.append(pathname)
            else:
                sys.path.insert(0, pathname)
            extensions = self._get_extensions()
            if extensions:
                if _hook not in sys.meta_path:
                    sys.meta_path.append(_hook)
                _hook.add(pathname, extensions)

    def unmount(self):
        pathname = os.path.abspath(os.path.join(self.dirname, self.filename))
        if pathname not in sys.path:
            logger.debug('%s not in path', pathname)
        else:
            sys.path.remove(pathname)
            if pathname in _hook.impure_wheels:
                _hook.remove(pathname)
            if not _hook.impure_wheels:
                if _hook in sys.meta_path:
                    sys.meta_path.remove(_hook)

    def verify(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        metadata_name = posixpath.join(info_dir, LEGACY_METADATA_FILENAME)
        wheel_metadata_name = posixpath.join(info_dir, 'WHEEL')
        record_name = posixpath.join(info_dir, 'RECORD')

        wrapper = codecs.getreader('utf-8')

        with ZipFile(pathname, 'r') as zf:
            with zf.open(wheel_metadata_name) as bwf:
                wf = wrapper(bwf)
                message = message_from_file(wf)
            wv = message['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            # TODO version verification

            records = {}
            with zf.open(record_name) as bf:
                with CSVReader(stream=bf) as reader:
                    for row in reader:
                        p = row[0]
                        records[p] = row

            for zinfo in zf.infolist():
                arcname = zinfo.filename
                if isinstance(arcname, text_type):
                    u_arcname = arcname
                else:
                    u_arcname = arcname.decode('utf-8')
                # See issue #115: some wheels have .. in their entries, but
                # in the filename ... e.g. __main__..py ! So the check is
                # updated to look for .. in the directory portions
                p = u_arcname.split('/')
                if '..' in p:
                    raise DistlibException('invalid entry in '
                                           'wheel: %r' % u_arcname)

                if self.skip_entry(u_arcname):
                    continue
                row = records[u_arcname]
                if row[2] and str(zinfo.file_size) != row[2]:
                    raise DistlibException('size mismatch for '
                                           '%s' % u_arcname)
                if row[1]:
                    kind, value = row[1].split('=', 1)
                    with zf.open(arcname) as bf:
                        data = bf.read()
                    _, digest = self.get_hash(data, kind)
                    if digest != value:
                        raise DistlibException('digest mismatch for '
                                               '%s' % arcname)

    def update(self, modifier, dest_dir=None, **kwargs):
        """
        Update the contents of a wheel in a generic way. The modifier should
        be a callable which expects a dictionary argument: its keys are
        archive-entry paths, and its values are absolute filesystem paths
        where the contents the corresponding archive entries can be found. The
        modifier is free to change the contents of the files pointed to, add
        new entries and remove entries, before returning. This method will
        extract the entire contents of the wheel to a temporary location, call
        the modifier, and then use the passed (and possibly updated)
        dictionary to write a new wheel. If ``dest_dir`` is specified, the new
        wheel is written there -- otherwise, the original wheel is overwritten.

        The modifier should return True if it updated the wheel, else False.
        This method returns the same value the modifier returns.
        """

        def get_version(path_map, info_dir):
            version = path = None
            key = '%s/%s' % (info_dir, LEGACY_METADATA_FILENAME)
            if key not in path_map:
                key = '%s/PKG-INFO' % info_dir
            if key in path_map:
                path = path_map[key]
                version = Metadata(path=path).version
            return version, path

        def update_version(version, path):
            updated = None
            try:
                v = NormalizedVersion(version)
                i = version.find('-')
                if i < 0:
                    updated = '%s+1' % version
                else:
                    parts = [int(s) for s in version[i + 1:].split('.')]
                    parts[-1] += 1
                    updated = '%s+%s' % (version[:i],
                                         '.'.join(str(i) for i in parts))
            except UnsupportedVersionError:
                logger.debug('Cannot update non-compliant (PEP-440) '
                             'version %r', version)
            if updated:
                md = Metadata(path=path)
                md.version = updated
                legacy = path.endswith(LEGACY_METADATA_FILENAME)
                md.write(path=path, legacy=legacy)
                logger.debug('Version updated from %r to %r', version,
                             updated)

        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        record_name = posixpath.join(info_dir, 'RECORD')
        with tempdir() as workdir:
            with ZipFile(pathname, 'r') as zf:
                path_map = {}
                for zinfo in zf.infolist():
                    arcname = zinfo.filename
                    if isinstance(arcname, text_type):
                        u_arcname = arcname
                    else:
                        u_arcname = arcname.decode('utf-8')
                    if u_arcname == record_name:
                        continue
                    if '..' in u_arcname:
                        raise DistlibException('invalid entry in '
                                               'wheel: %r' % u_arcname)
                    zf.extract(zinfo, workdir)
                    path = os.path.join(workdir, convert_path(u_arcname))
                    path_map[u_arcname] = path

            # Remember the version.
            original_version, _ = get_version(path_map, info_dir)
            # Files extracted. Call the modifier.
            modified = modifier(path_map, **kwargs)
            if modified:
                # Something changed - need to build a new wheel.
                current_version, path = get_version(path_map, info_dir)
                if current_version and (current_version == original_version):
                    # Add or update local version to signify changes.
                    update_version(current_version, path)
                # Decide where the new wheel goes.
                if dest_dir is None:
                    fd, newpath = tempfile.mkstemp(suffix='.whl',
                                                   prefix='wheel-update-',
                                                   dir=workdir)
                    os.close(fd)
                else:
                    if not os.path.isdir(dest_dir):
                        raise DistlibException('Not a directory: %r' % dest_dir)
                    newpath = os.path.join(dest_dir, self.filename)
                archive_paths = list(path_map.items())
                distinfo = os.path.join(workdir, info_dir)
                info = distinfo, info_dir
                self.write_records(info, workdir, archive_paths)
                self.build_zip(newpath, archive_paths)
                if dest_dir is None:
                    shutil.copyfile(newpath, pathname)
        return modified

def _get_glibc_version():
    import platform
    ver = platform.libc_ver()
    result = []
    if ver[0] == 'glibc':
        for s in ver[1].split('.'):
            result.append(int(s) if s.isdigit() else 0)
        result = tuple(result)
    return result

def compatible_tags():
    """
    Return (pyver, abi, arch) tuples compatible with this Python.
    """
    versions = [VER_SUFFIX]
    major = VER_SUFFIX[0]
    for minor in range(sys.version_info[1] - 1, - 1, -1):
        versions.append(''.join([major, str(minor)]))

    abis = []
    for suffix in _get_suffixes():
        if suffix.startswith('.abi'):
            abis.append(suffix.split('.', 2)[1])
    abis.sort()
    if ABI != 'none':
        abis.insert(0, ABI)
    abis.append('none')
    result = []

    arches = [ARCH]
    if sys.platform == 'darwin':
        m = re.match(r'(\w+)_(\d+)_(\d+)_(\w+)$', ARCH)
        if m:
            name, major, minor, arch = m.groups()
            minor = int(minor)
            matches = [arch]
            if arch in ('i386', 'ppc'):
                matches.append('fat')
            if arch in ('i386', 'ppc', 'x86_64'):
                matches.append('fat3')
            if arch in ('ppc64', 'x86_64'):
                matches.append('fat64')
            if arch in ('i386', 'x86_64'):
                matches.append('intel')
            if arch in ('i386', 'x86_64', 'intel', 'ppc', 'ppc64'):
                matches.append('universal')
            while minor >= 0:
                for match in matches:
                    s = '%s_%s_%s_%s' % (name, major, minor, match)
                    if s != ARCH:   # already there
                        arches.append(s)
                minor -= 1

    # Most specific - our Python version, ABI and arch
    for abi in abis:
        for arch in arches:
            result.append((''.join((IMP_PREFIX, versions[0])), abi, arch))
            # manylinux
            if abi != 'none' and sys.platform.startswith('linux'):
                arch = arch.replace('linux_', '')
                parts = _get_glibc_version()
                if len(parts) == 2:
                    if parts >= (2, 5):
                        result.append((''.join((IMP_PREFIX, versions[0])), abi,
                                       'manylinux1_%s' % arch))
                    if parts >= (2, 12):
                        result.append((''.join((IMP_PREFIX, versions[0])), abi,
                                       'manylinux2010_%s' % arch))
                    if parts >= (2, 17):
                        result.append((''.join((IMP_PREFIX, versions[0])), abi,
                                       'manylinux2014_%s' % arch))
                    result.append((''.join((IMP_PREFIX, versions[0])), abi,
                                   'manylinux_%s_%s_%s' % (parts[0], parts[1],
                                                           arch)))

    # where no ABI / arch dependency, but IMP_PREFIX dependency
    for i, version in enumerate(versions):
        result.append((''.join((IMP_PREFIX, version)), 'none', 'any'))
        if i == 0:
            result.append((''.join((IMP_PREFIX, version[0])), 'none', 'any'))

    # no IMP_PREFIX, ABI or arch dependency
    for i, version in enumerate(versions):
        result.append((''.join(('py', version)), 'none', 'any'))
        if i == 0:
            result.append((''.join(('py', version[0])), 'none', 'any'))

    return set(result)


COMPATIBLE_TAGS = compatible_tags()

del compatible_tags


def is_compatible(wheel, tags=None):
    if not isinstance(wheel, Wheel):
        wheel = Wheel(wheel)    # assume it's a filename
    result = False
    if tags is None:
        tags = COMPATIBLE_TAGS
    for ver, abi, arch in tags:
        if ver in wheel.pyver and abi in wheel.abi and arch in wheel.arch:
            result = True
            break
    return result
python3.12/site-packages/pip/_vendor/distlib/__init__.py000064400000001105151732701640017103 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2022 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import logging

__version__ = '0.3.6'

class DistlibException(Exception):
    pass

try:
    from logging import NullHandler
except ImportError: # pragma: no cover
    class NullHandler(logging.Handler):
        def handle(self, record): pass
        def emit(self, record): pass
        def createLock(self): self.lock = None

logger = logging.getLogger(__name__)
logger.addHandler(NullHandler())
python3.12/site-packages/pip/_vendor/distlib/locators.py000064400000145427151732701640017212 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2015 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#

import gzip
from io import BytesIO
import json
import logging
import os
import posixpath
import re
try:
    import threading
except ImportError:  # pragma: no cover
    import dummy_threading as threading
import zlib

from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
                     queue, quote, unescape, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, ensure_slash, split_filename, get_project_data,
                   parse_requirement, parse_name_and_version, ServerProxy,
                   normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

logger = logging.getLogger(__name__)

HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)')
CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I)
HTML_CONTENT_TYPE = re.compile('text/html|application/x(ht)?ml')
DEFAULT_INDEX = 'https://pypi.org/pypi'

def get_all_distribution_names(url=None):
    """
    Return all distribution names known by an index.
    :param url: The URL of the index.
    :return: A list of all known distribution names.
    """
    if url is None:
        url = DEFAULT_INDEX
    client = ServerProxy(url, timeout=3.0)
    try:
        return client.list_packages()
    finally:
        client('close')()

class RedirectHandler(BaseRedirectHandler):
    """
    A class to work around a bug in some Python 3.2.x releases.
    """
    # There's a bug in the base version for some 3.2.x
    # (e.g. 3.2.2 on Ubuntu Oneiric). If a Location header
    # returns e.g. /abc, it bails because it says the scheme ''
    # is bogus, when actually it should use the request's
    # URL for the scheme. See Python issue #13696.
    def http_error_302(self, req, fp, code, msg, headers):
        # Some servers (incorrectly) return multiple Location headers
        # (so probably same goes for URI).  Use first header.
        newurl = None
        for key in ('location', 'uri'):
            if key in headers:
                newurl = headers[key]
                break
        if newurl is None:  # pragma: no cover
            return
        urlparts = urlparse(newurl)
        if urlparts.scheme == '':
            newurl = urljoin(req.get_full_url(), newurl)
            if hasattr(headers, 'replace_header'):
                headers.replace_header(key, newurl)
            else:
                headers[key] = newurl
        return BaseRedirectHandler.http_error_302(self, req, fp, code, msg,
                                                  headers)

    http_error_301 = http_error_303 = http_error_307 = http_error_302

class Locator(object):
    """
    A base class for locators - things that locate distributions.
    """
    source_extensions = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz')
    binary_extensions = ('.egg', '.exe', '.whl')
    excluded_extensions = ('.pdf',)

    # A list of tags indicating which wheels you want to match. The default
    # value of None matches against the tags compatible with the running
    # Python. If you want to match other values, set wheel_tags on a locator
    # instance to a list of tuples (pyver, abi, arch) which you want to match.
    wheel_tags = None

    downloadable_extensions = source_extensions + ('.whl',)

    def __init__(self, scheme='default'):
        """
        Initialise an instance.
        :param scheme: Because locators look for most recent versions, they
                       need to know the version scheme to use. This specifies
                       the current PEP-recommended scheme - use ``'legacy'``
                       if you need to support existing distributions on PyPI.
        """
        self._cache = {}
        self.scheme = scheme
        # Because of bugs in some of the handlers on some of the platforms,
        # we use our own opener rather than just using urlopen.
        self.opener = build_opener(RedirectHandler())
        # If get_project() is called from locate(), the matcher instance
        # is set from the requirement passed to locate(). See issue #18 for
        # why this can be useful to know.
        self.matcher = None
        self.errors = queue.Queue()

    def get_errors(self):
        """
        Return any errors which have occurred.
        """
        result = []
        while not self.errors.empty():  # pragma: no cover
            try:
                e = self.errors.get(False)
                result.append(e)
            except self.errors.Empty:
                continue
            self.errors.task_done()
        return result

    def clear_errors(self):
        """
        Clear any errors which may have been logged.
        """
        # Just get the errors and throw them away
        self.get_errors()

    def clear_cache(self):
        self._cache.clear()

    def _get_scheme(self):
        return self._scheme

    def _set_scheme(self, value):
        self._scheme = value

    scheme = property(_get_scheme, _set_scheme)

    def _get_project(self, name):
        """
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This should be implemented in subclasses.

        If called from a locate() request, self.matcher will be set to a
        matcher for the requirement to satisfy, otherwise it will be None.
        """
        raise NotImplementedError('Please implement in the subclass')

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Please implement in the subclass')

    def get_project(self, name):
        """
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This calls _get_project to do all the work, and just implements a caching layer on top.
        """
        if self._cache is None:  # pragma: no cover
            result = self._get_project(name)
        elif name in self._cache:
            result = self._cache[name]
        else:
            self.clear_errors()
            result = self._get_project(name)
            self._cache[name] = result
        return result

    def score_url(self, url):
        """
        Give an url a score which can be used to choose preferred URLs
        for a given project release.
        """
        t = urlparse(url)
        basename = posixpath.basename(t.path)
        compatible = True
        is_wheel = basename.endswith('.whl')
        is_downloadable = basename.endswith(self.downloadable_extensions)
        if is_wheel:
            compatible = is_compatible(Wheel(basename), self.wheel_tags)
        return (t.scheme == 'https', 'pypi.org' in t.netloc,
                is_downloadable, is_wheel, compatible, basename)

    def prefer_url(self, url1, url2):
        """
        Choose one of two URLs where both are candidates for distribution
        archives for the same version of a distribution (for example,
        .tar.gz vs. zip).

        The current implementation favours https:// URLs over http://, archives
        from PyPI over those from other locations, wheel compatibility (if a
        wheel) and then the archive name.
        """
        result = url2
        if url1:
            s1 = self.score_url(url1)
            s2 = self.score_url(url2)
            if s1 > s2:
                result = url1
            if result != url2:
                logger.debug('Not replacing %r with %r', url1, url2)
            else:
                logger.debug('Replacing %r with %r', url1, url2)
        return result

    def split_filename(self, filename, project_name):
        """
        Attempt to split a filename in project name, version and Python version.
        """
        return split_filename(filename, project_name)

    def convert_url_to_download_info(self, url, project_name):
        """
        See if a URL is a candidate for a download URL for a project (the URL
        has typically been scraped from an HTML page).

        If it is, a dictionary is returned with keys "name", "version",
        "filename" and "url"; otherwise, None is returned.
        """
        def same_project(name1, name2):
            return normalize_name(name1) == normalize_name(name2)

        result = None
        scheme, netloc, path, params, query, frag = urlparse(url)
        if frag.lower().startswith('egg='):  # pragma: no cover
            logger.debug('%s: version hint in fragment: %r',
                         project_name, frag)
        m = HASHER_HASH.match(frag)
        if m:
            algo, digest = m.groups()
        else:
            algo, digest = None, None
        origpath = path
        if path and path[-1] == '/':  # pragma: no cover
            path = path[:-1]
        if path.endswith('.whl'):
            try:
                wheel = Wheel(path)
                if not is_compatible(wheel, self.wheel_tags):
                    logger.debug('Wheel not compatible: %s', path)
                else:
                    if project_name is None:
                        include = True
                    else:
                        include = same_project(wheel.name, project_name)
                    if include:
                        result = {
                            'name': wheel.name,
                            'version': wheel.version,
                            'filename': wheel.filename,
                            'url': urlunparse((scheme, netloc, origpath,
                                               params, query, '')),
                            'python-version': ', '.join(
                                ['.'.join(list(v[2:])) for v in wheel.pyver]),
                        }
            except Exception as e:  # pragma: no cover
                logger.warning('invalid path for wheel: %s', path)
        elif not path.endswith(self.downloadable_extensions):  # pragma: no cover
            logger.debug('Not downloadable: %s', path)
        else:  # downloadable extension
            path = filename = posixpath.basename(path)
            for ext in self.downloadable_extensions:
                if path.endswith(ext):
                    path = path[:-len(ext)]
                    t = self.split_filename(path, project_name)
                    if not t:  # pragma: no cover
                        logger.debug('No match for project/version: %s', path)
                    else:
                        name, version, pyver = t
                        if not project_name or same_project(project_name, name):
                            result = {
                                'name': name,
                                'version': version,
                                'filename': filename,
                                'url': urlunparse((scheme, netloc, origpath,
                                                   params, query, '')),
                                #'packagetype': 'sdist',
                            }
                            if pyver:  # pragma: no cover
                                result['python-version'] = pyver
                    break
        if result and algo:
            result['%s_digest' % algo] = digest
        return result

    def _get_digest(self, info):
        """
        Get a digest from a dictionary by looking at a "digests" dictionary
        or keys of the form 'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
        """
        result = None
        if 'digests' in info:
            digests = info['digests']
            for algo in ('sha256', 'md5'):
                if algo in digests:
                    result = (algo, digests[algo])
                    break
        if not result:
            for algo in ('sha256', 'md5'):
                key = '%s_digest' % algo
                if key in info:
                    result = (algo, info[key])
                    break
        return result

    def _update_version_data(self, result, info):
        """
        Update a result dictionary (the final result from _get_project) with a
        dictionary for a specific version, which typically holds information
        gleaned from a filename or URL for an archive for the distribution.
        """
        name = info.pop('name')
        version = info.pop('version')
        if version in result:
            dist = result[version]
            md = dist.metadata
        else:
            dist = make_dist(name, version, scheme=self.scheme)
            md = dist.metadata
        dist.digest = digest = self._get_digest(info)
        url = info['url']
        result['digests'][url] = digest
        if md.source_url != info['url']:
            md.source_url = self.prefer_url(md.source_url, url)
            result['urls'].setdefault(version, set()).add(url)
        dist.locator = self
        result[version] = dist

    def locate(self, requirement, prereleases=False):
        """
        Find the most recent distribution which matches the given
        requirement.

        :param requirement: A requirement of the form 'foo (1.0)' or perhaps
                            'foo (>= 1.0, < 2.0, != 1.3)'
        :param prereleases: If ``True``, allow pre-release versions
                            to be located. Otherwise, pre-release versions
                            are not returned.
        :return: A :class:`Distribution` instance, or ``None`` if no such
                 distribution could be located.
        """
        result = None
        r = parse_requirement(requirement)
        if r is None:  # pragma: no cover
            raise DistlibException('Not a valid requirement: %r' % requirement)
        scheme = get_scheme(self.scheme)
        self.matcher = matcher = scheme.matcher(r.requirement)
        logger.debug('matcher: %s (%s)', matcher, type(matcher).__name__)
        versions = self.get_project(r.name)
        if len(versions) > 2:   # urls and digests keys are present
            # sometimes, versions are invalid
            slist = []
            vcls = matcher.version_class
            for k in versions:
                if k in ('urls', 'digests'):
                    continue
                try:
                    if not matcher.match(k):
                        pass  # logger.debug('%s did not match %r', matcher, k)
                    else:
                        if prereleases or not vcls(k).is_prerelease:
                            slist.append(k)
                        # else:
                            # logger.debug('skipping pre-release '
                                         # 'version %s of %s', k, matcher.name)
                except Exception:  # pragma: no cover
                    logger.warning('error matching %s with %r', matcher, k)
                    pass # slist.append(k)
            if len(slist) > 1:
                slist = sorted(slist, key=scheme.key)
            if slist:
                logger.debug('sorted list: %s', slist)
                version = slist[-1]
                result = versions[version]
        if result:
            if r.extras:
                result.extras = r.extras
            result.download_urls = versions.get('urls', {}).get(version, set())
            d = {}
            sd = versions.get('digests', {})
            for url in result.download_urls:
                if url in sd:  # pragma: no cover
                    d[url] = sd[url]
            result.digests = d
        self.matcher = None
        return result


class PyPIRPCLocator(Locator):
    """
    This locator uses XML-RPC to locate distributions. It therefore
    cannot be used with simple mirrors (that only mirror file content).
    """
    def __init__(self, url, **kwargs):
        """
        Initialise an instance.

        :param url: The URL to use for XML-RPC.
        :param kwargs: Passed to the superclass constructor.
        """
        super(PyPIRPCLocator, self).__init__(**kwargs)
        self.base_url = url
        self.client = ServerProxy(url, timeout=3.0)

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        return set(self.client.list_packages())

    def _get_project(self, name):
        result = {'urls': {}, 'digests': {}}
        versions = self.client.package_releases(name, True)
        for v in versions:
            urls = self.client.release_urls(name, v)
            data = self.client.release_data(name, v)
            metadata = Metadata(scheme=self.scheme)
            metadata.name = data['name']
            metadata.version = data['version']
            metadata.license = data.get('license')
            metadata.keywords = data.get('keywords', [])
            metadata.summary = data.get('summary')
            dist = Distribution(metadata)
            if urls:
                info = urls[0]
                metadata.source_url = info['url']
                dist.digest = self._get_digest(info)
                dist.locator = self
                result[v] = dist
                for info in urls:
                    url = info['url']
                    digest = self._get_digest(info)
                    result['urls'].setdefault(v, set()).add(url)
                    result['digests'][url] = digest
        return result

class PyPIJSONLocator(Locator):
    """
    This locator uses PyPI's JSON interface. It's very limited in functionality
    and probably not worth using.
    """
    def __init__(self, url, **kwargs):
        super(PyPIJSONLocator, self).__init__(**kwargs)
        self.base_url = ensure_slash(url)

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Not available from this locator')

    def _get_project(self, name):
        result = {'urls': {}, 'digests': {}}
        url = urljoin(self.base_url, '%s/json' % quote(name))
        try:
            resp = self.opener.open(url)
            data = resp.read().decode() # for now
            d = json.loads(data)
            md = Metadata(scheme=self.scheme)
            data = d['info']
            md.name = data['name']
            md.version = data['version']
            md.license = data.get('license')
            md.keywords = data.get('keywords', [])
            md.summary = data.get('summary')
            dist = Distribution(md)
            dist.locator = self
            urls = d['urls']
            result[md.version] = dist
            for info in d['urls']:
                url = info['url']
                dist.download_urls.add(url)
                dist.digests[url] = self._get_digest(info)
                result['urls'].setdefault(md.version, set()).add(url)
                result['digests'][url] = self._get_digest(info)
            # Now get other releases
            for version, infos in d['releases'].items():
                if version == md.version:
                    continue    # already done
                omd = Metadata(scheme=self.scheme)
                omd.name = md.name
                omd.version = version
                odist = Distribution(omd)
                odist.locator = self
                result[version] = odist
                for info in infos:
                    url = info['url']
                    odist.download_urls.add(url)
                    odist.digests[url] = self._get_digest(info)
                    result['urls'].setdefault(version, set()).add(url)
                    result['digests'][url] = self._get_digest(info)
#            for info in urls:
#                md.source_url = info['url']
#                dist.digest = self._get_digest(info)
#                dist.locator = self
#                for info in urls:
#                    url = info['url']
#                    result['urls'].setdefault(md.version, set()).add(url)
#                    result['digests'][url] = self._get_digest(info)
        except Exception as e:
            self.errors.put(text_type(e))
            logger.exception('JSON fetch failed: %s', e)
        return result


class Page(object):
    """
    This class represents a scraped HTML page.
    """
    # The following slightly hairy-looking regex just looks for the contents of
    # an anchor link, which has an attribute "href" either immediately preceded
    # or immediately followed by a "rel" attribute. The attribute values can be
    # declared with double quotes, single quotes or no quotes - which leads to
    # the length of the expression.
    _href = re.compile("""
(rel\\s*=\\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\\s\n]*))\\s+)?
href\\s*=\\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\\s\n]*))
(\\s+rel\\s*=\\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\\s\n]*)))?
""", re.I | re.S | re.X)
    _base = re.compile(r"""<base\s+href\s*=\s*['"]?([^'">]+)""", re.I | re.S)

    def __init__(self, data, url):
        """
        Initialise an instance with the Unicode page contents and the URL they
        came from.
        """
        self.data = data
        self.base_url = self.url = url
        m = self._base.search(self.data)
        if m:
            self.base_url = m.group(1)

    _clean_re = re.compile(r'[^a-z0-9$&+,/:;=?@.#%_\\|-]', re.I)

    @cached_property
    def links(self):
        """
        Return the URLs of all the links on a page together with information
        about their "rel" attribute, for determining which ones to treat as
        downloads and which ones to queue for further scraping.
        """
        def clean(url):
            "Tidy up an URL."
            scheme, netloc, path, params, query, frag = urlparse(url)
            return urlunparse((scheme, netloc, quote(path),
                               params, query, frag))

        result = set()
        for match in self._href.finditer(self.data):
            d = match.groupdict('')
            rel = (d['rel1'] or d['rel2'] or d['rel3'] or
                   d['rel4'] or d['rel5'] or d['rel6'])
            url = d['url1'] or d['url2'] or d['url3']
            url = urljoin(self.base_url, url)
            url = unescape(url)
            url = self._clean_re.sub(lambda m: '%%%2x' % ord(m.group(0)), url)
            result.add((url, rel))
        # We sort the result, hoping to bring the most recent versions
        # to the front
        result = sorted(result, key=lambda t: t[0], reverse=True)
        return result


class SimpleScrapingLocator(Locator):
    """
    A locator which scrapes HTML pages to locate downloads for a distribution.
    This runs multiple threads to do the I/O; performance is at least as good
    as pip's PackageFinder, which works in an analogous fashion.
    """

    # These are used to deal with various Content-Encoding schemes.
    decoders = {
        'deflate': zlib.decompress,
        'gzip': lambda b: gzip.GzipFile(fileobj=BytesIO(b)).read(),
        'none': lambda b: b,
    }

    def __init__(self, url, timeout=None, num_workers=10, **kwargs):
        """
        Initialise an instance.
        :param url: The root URL to use for scraping.
        :param timeout: The timeout, in seconds, to be applied to requests.
                        This defaults to ``None`` (no timeout specified).
        :param num_workers: The number of worker threads you want to do I/O,
                            This defaults to 10.
        :param kwargs: Passed to the superclass.
        """
        super(SimpleScrapingLocator, self).__init__(**kwargs)
        self.base_url = ensure_slash(url)
        self.timeout = timeout
        self._page_cache = {}
        self._seen = set()
        self._to_fetch = queue.Queue()
        self._bad_hosts = set()
        self.skip_externals = False
        self.num_workers = num_workers
        self._lock = threading.RLock()
        # See issue #45: we need to be resilient when the locator is used
        # in a thread, e.g. with concurrent.futures. We can't use self._lock
        # as it is for coordinating our internal threads - the ones created
        # in _prepare_threads.
        self._gplock = threading.RLock()
        self.platform_check = False  # See issue #112

    def _prepare_threads(self):
        """
        Threads are created only when get_project is called, and terminate
        before it returns. They are there primarily to parallelise I/O (i.e.
        fetching web pages).
        """
        self._threads = []
        for i in range(self.num_workers):
            t = threading.Thread(target=self._fetch)
            t.daemon = True
            t.start()
            self._threads.append(t)

    def _wait_threads(self):
        """
        Tell all the threads to terminate (by sending a sentinel value) and
        wait for them to do so.
        """
        # Note that you need two loops, since you can't say which
        # thread will get each sentinel
        for t in self._threads:
            self._to_fetch.put(None)    # sentinel
        for t in self._threads:
            t.join()
        self._threads = []

    def _get_project(self, name):
        result = {'urls': {}, 'digests': {}}
        with self._gplock:
            self.result = result
            self.project_name = name
            url = urljoin(self.base_url, '%s/' % quote(name))
            self._seen.clear()
            self._page_cache.clear()
            self._prepare_threads()
            try:
                logger.debug('Queueing %s', url)
                self._to_fetch.put(url)
                self._to_fetch.join()
            finally:
                self._wait_threads()
            del self.result
        return result

    platform_dependent = re.compile(r'\b(linux_(i\d86|x86_64|arm\w+)|'
                                    r'win(32|_amd64)|macosx_?\d+)\b', re.I)

    def _is_platform_dependent(self, url):
        """
        Does an URL refer to a platform-specific download?
        """
        return self.platform_dependent.search(url)

    def _process_download(self, url):
        """
        See if an URL is a suitable download for a project.

        If it is, register information in the result dictionary (for
        _get_project) about the specific version it's for.

        Note that the return value isn't actually used other than as a boolean
        value.
        """
        if self.platform_check and self._is_platform_dependent(url):
            info = None
        else:
            info = self.convert_url_to_download_info(url, self.project_name)
        logger.debug('process_download: %s -> %s', url, info)
        if info:
            with self._lock:    # needed because self.result is shared
                self._update_version_data(self.result, info)
        return info

    def _should_queue(self, link, referrer, rel):
        """
        Determine whether a link URL from a referring page and with a
        particular "rel" attribute should be queued for scraping.
        """
        scheme, netloc, path, _, _, _ = urlparse(link)
        if path.endswith(self.source_extensions + self.binary_extensions +
                         self.excluded_extensions):
            result = False
        elif self.skip_externals and not link.startswith(self.base_url):
            result = False
        elif not referrer.startswith(self.base_url):
            result = False
        elif rel not in ('homepage', 'download'):
            result = False
        elif scheme not in ('http', 'https', 'ftp'):
            result = False
        elif self._is_platform_dependent(link):
            result = False
        else:
            host = netloc.split(':', 1)[0]
            if host.lower() == 'localhost':
                result = False
            else:
                result = True
        logger.debug('should_queue: %s (%s) from %s -> %s', link, rel,
                     referrer, result)
        return result

    def _fetch(self):
        """
        Get a URL to fetch from the work queue, get the HTML page, examine its
        links for download candidates and candidates for further scraping.

        This is a handy method to run in a thread.
        """
        while True:
            url = self._to_fetch.get()
            try:
                if url:
                    page = self.get_page(url)
                    if page is None:    # e.g. after an error
                        continue
                    for link, rel in page.links:
                        if link not in self._seen:
                            try:
                                self._seen.add(link)
                                if (not self._process_download(link) and
                                    self._should_queue(link, url, rel)):
                                    logger.debug('Queueing %s from %s', link, url)
                                    self._to_fetch.put(link)
                            except MetadataInvalidError:  # e.g. invalid versions
                                pass
            except Exception as e:  # pragma: no cover
                self.errors.put(text_type(e))
            finally:
                # always do this, to avoid hangs :-)
                self._to_fetch.task_done()
            if not url:
                #logger.debug('Sentinel seen, quitting.')
                break

    def get_page(self, url):
        """
        Get the HTML for an URL, possibly from an in-memory cache.

        XXX TODO Note: this cache is never actually cleared. It's assumed that
        the data won't get stale over the lifetime of a locator instance (not
        necessarily true for the default_locator).
        """
        # http://peak.telecommunity.com/DevCenter/EasyInstall#package-index-api
        scheme, netloc, path, _, _, _ = urlparse(url)
        if scheme == 'file' and os.path.isdir(url2pathname(path)):
            url = urljoin(ensure_slash(url), 'index.html')

        if url in self._page_cache:
            result = self._page_cache[url]
            logger.debug('Returning %s from cache: %s', url, result)
        else:
            host = netloc.split(':', 1)[0]
            result = None
            if host in self._bad_hosts:
                logger.debug('Skipping %s due to bad host %s', url, host)
            else:
                req = Request(url, headers={'Accept-encoding': 'identity'})
                try:
                    logger.debug('Fetching %s', url)
                    resp = self.opener.open(req, timeout=self.timeout)
                    logger.debug('Fetched %s', url)
                    headers = resp.info()
                    content_type = headers.get('Content-Type', '')
                    if HTML_CONTENT_TYPE.match(content_type):
                        final_url = resp.geturl()
                        data = resp.read()
                        encoding = headers.get('Content-Encoding')
                        if encoding:
                            decoder = self.decoders[encoding]   # fail if not found
                            data = decoder(data)
                        encoding = 'utf-8'
                        m = CHARSET.search(content_type)
                        if m:
                            encoding = m.group(1)
                        try:
                            data = data.decode(encoding)
                        except UnicodeError:  # pragma: no cover
                            data = data.decode('latin-1')    # fallback
                        result = Page(data, final_url)
                        self._page_cache[final_url] = result
                except HTTPError as e:
                    if e.code != 404:
                        logger.exception('Fetch failed: %s: %s', url, e)
                except URLError as e:  # pragma: no cover
                    logger.exception('Fetch failed: %s: %s', url, e)
                    with self._lock:
                        self._bad_hosts.add(host)
                except Exception as e:  # pragma: no cover
                    logger.exception('Fetch failed: %s: %s', url, e)
                finally:
                    self._page_cache[url] = result   # even if None (failure)
        return result

    _distname_re = re.compile('<a href=[^>]*>([^<]+)<')

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        page = self.get_page(self.base_url)
        if not page:
            raise DistlibException('Unable to get %s' % self.base_url)
        for match in self._distname_re.finditer(page.data):
            result.add(match.group(1))
        return result

class DirectoryLocator(Locator):
    """
    This class locates distributions in a directory tree.
    """

    def __init__(self, path, **kwargs):
        """
        Initialise an instance.
        :param path: The root of the directory tree to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * recursive - if True (the default), subdirectories are
                         recursed into. If False, only the top-level directory
                         is searched,
        """
        self.recursive = kwargs.pop('recursive', True)
        super(DirectoryLocator, self).__init__(**kwargs)
        path = os.path.abspath(path)
        if not os.path.isdir(path):  # pragma: no cover
            raise DistlibException('Not a directory: %r' % path)
        self.base_dir = path

    def should_include(self, filename, parent):
        """
        Should a filename be considered as a candidate for a distribution
        archive? As well as the filename, the directory which contains it
        is provided, though not used by the current implementation.
        """
        return filename.endswith(self.downloadable_extensions)

    def _get_project(self, name):
        result = {'urls': {}, 'digests': {}}
        for root, dirs, files in os.walk(self.base_dir):
            for fn in files:
                if self.should_include(fn, root):
                    fn = os.path.join(root, fn)
                    url = urlunparse(('file', '',
                                      pathname2url(os.path.abspath(fn)),
                                      '', '', ''))
                    info = self.convert_url_to_download_info(url, name)
                    if info:
                        self._update_version_data(result, info)
            if not self.recursive:
                break
        return result

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        for root, dirs, files in os.walk(self.base_dir):
            for fn in files:
                if self.should_include(fn, root):
                    fn = os.path.join(root, fn)
                    url = urlunparse(('file', '',
                                      pathname2url(os.path.abspath(fn)),
                                      '', '', ''))
                    info = self.convert_url_to_download_info(url, None)
                    if info:
                        result.add(info['name'])
            if not self.recursive:
                break
        return result

class JSONLocator(Locator):
    """
    This locator uses special extended metadata (not available on PyPI) and is
    the basis of performant dependency resolution in distlib. Other locators
    require archive downloads before dependencies can be determined! As you
    might imagine, that can be slow.
    """
    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Not available from this locator')

    def _get_project(self, name):
        result = {'urls': {}, 'digests': {}}
        data = get_project_data(name)
        if data:
            for info in data.get('files', []):
                if info['ptype'] != 'sdist' or info['pyversion'] != 'source':
                    continue
                # We don't store summary in project metadata as it makes
                # the data bigger for no benefit during dependency
                # resolution
                dist = make_dist(data['name'], info['version'],
                                 summary=data.get('summary',
                                                  'Placeholder for summary'),
                                 scheme=self.scheme)
                md = dist.metadata
                md.source_url = info['url']
                # TODO SHA256 digest
                if 'digest' in info and info['digest']:
                    dist.digest = ('md5', info['digest'])
                md.dependencies = info.get('requirements', {})
                dist.exports = info.get('exports', {})
                result[dist.version] = dist
                result['urls'].setdefault(dist.version, set()).add(info['url'])
        return result

class DistPathLocator(Locator):
    """
    This locator finds installed distributions in a path. It can be useful for
    adding to an :class:`AggregatingLocator`.
    """
    def __init__(self, distpath, **kwargs):
        """
        Initialise an instance.

        :param distpath: A :class:`DistributionPath` instance to search.
        """
        super(DistPathLocator, self).__init__(**kwargs)
        assert isinstance(distpath, DistributionPath)
        self.distpath = distpath

    def _get_project(self, name):
        dist = self.distpath.get_distribution(name)
        if dist is None:
            result = {'urls': {}, 'digests': {}}
        else:
            result = {
                dist.version: dist,
                'urls': {dist.version: set([dist.source_url])},
                'digests': {dist.version: set([None])}
            }
        return result


class AggregatingLocator(Locator):
    """
    This class allows you to chain and/or merge a list of locators.
    """
    def __init__(self, *locators, **kwargs):
        """
        Initialise an instance.

        :param locators: The list of locators to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * merge - if False (the default), the first successful
                         search from any of the locators is returned. If True,
                         the results from all locators are merged (this can be
                         slow).
        """
        self.merge = kwargs.pop('merge', False)
        self.locators = locators
        super(AggregatingLocator, self).__init__(**kwargs)

    def clear_cache(self):
        super(AggregatingLocator, self).clear_cache()
        for locator in self.locators:
            locator.clear_cache()

    def _set_scheme(self, value):
        self._scheme = value
        for locator in self.locators:
            locator.scheme = value

    scheme = property(Locator.scheme.fget, _set_scheme)

    def _get_project(self, name):
        result = {}
        for locator in self.locators:
            d = locator.get_project(name)
            if d:
                if self.merge:
                    files = result.get('urls', {})
                    digests = result.get('digests', {})
                    # next line could overwrite result['urls'], result['digests']
                    result.update(d)
                    df = result.get('urls')
                    if files and df:
                        for k, v in files.items():
                            if k in df:
                                df[k] |= v
                            else:
                                df[k] = v
                    dd = result.get('digests')
                    if digests and dd:
                        dd.update(digests)
                else:
                    # See issue #18. If any dists are found and we're looking
                    # for specific constraints, we only return something if
                    # a match is found. For example, if a DirectoryLocator
                    # returns just foo (1.0) while we're looking for
                    # foo (>= 2.0), we'll pretend there was nothing there so
                    # that subsequent locators can be queried. Otherwise we
                    # would just return foo (1.0) which would then lead to a
                    # failure to find foo (>= 2.0), because other locators
                    # weren't searched. Note that this only matters when
                    # merge=False.
                    if self.matcher is None:
                        found = True
                    else:
                        found = False
                        for k in d:
                            if self.matcher.match(k):
                                found = True
                                break
                    if found:
                        result = d
                        break
        return result

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        for locator in self.locators:
            try:
                result |= locator.get_distribution_names()
            except NotImplementedError:
                pass
        return result


# We use a legacy scheme simply because most of the dists on PyPI use legacy
# versions which don't conform to PEP 440.
default_locator = AggregatingLocator(
                    # JSONLocator(), # don't use as PEP 426 is withdrawn
                    SimpleScrapingLocator('https://pypi.org/simple/',
                                          timeout=3.0),
                    scheme='legacy')

locate = default_locator.locate


class DependencyFinder(object):
    """
    Locate dependencies for distributions.
    """

    def __init__(self, locator=None):
        """
        Initialise an instance, using the specified locator
        to locate distributions.
        """
        self.locator = locator or default_locator
        self.scheme = get_scheme(self.locator.scheme)

    def add_distribution(self, dist):
        """
        Add a distribution to the finder. This will update internal information
        about who provides what.
        :param dist: The distribution to add.
        """
        logger.debug('adding distribution %s', dist)
        name = dist.key
        self.dists_by_name[name] = dist
        self.dists[(name, dist.version)] = dist
        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Add to provided: %s, %s, %s', name, version, dist)
            self.provided.setdefault(name, set()).add((version, dist))

    def remove_distribution(self, dist):
        """
        Remove a distribution from the finder. This will update internal
        information about who provides what.
        :param dist: The distribution to remove.
        """
        logger.debug('removing distribution %s', dist)
        name = dist.key
        del self.dists_by_name[name]
        del self.dists[(name, dist.version)]
        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Remove from provided: %s, %s, %s', name, version, dist)
            s = self.provided[name]
            s.remove((version, dist))
            if not s:
                del self.provided[name]

    def get_matcher(self, reqt):
        """
        Get a version matcher for a requirement.
        :param reqt: The requirement
        :type reqt: str
        :return: A version matcher (an instance of
                 :class:`distlib.version.Matcher`).
        """
        try:
            matcher = self.scheme.matcher(reqt)
        except UnsupportedVersionError:  # pragma: no cover
            # XXX compat-mode if cannot read the version
            name = reqt.split()[0]
            matcher = self.scheme.matcher(name)
        return matcher

    def find_providers(self, reqt):
        """
        Find the distributions which can fulfill a requirement.

        :param reqt: The requirement.
         :type reqt: str
        :return: A set of distribution which can fulfill the requirement.
        """
        matcher = self.get_matcher(reqt)
        name = matcher.key   # case-insensitive
        result = set()
        provided = self.provided
        if name in provided:
            for version, provider in provided[name]:
                try:
                    match = matcher.match(version)
                except UnsupportedVersionError:
                    match = False

                if match:
                    result.add(provider)
                    break
        return result

    def try_to_replace(self, provider, other, problems):
        """
        Attempt to replace one provider with another. This is typically used
        when resolving dependencies from multiple sources, e.g. A requires
        (B >= 1.0) while C requires (B >= 1.1).

        For successful replacement, ``provider`` must meet all the requirements
        which ``other`` fulfills.

        :param provider: The provider we are trying to replace with.
        :param other: The provider we're trying to replace.
        :param problems: If False is returned, this will contain what
                         problems prevented replacement. This is currently
                         a tuple of the literal string 'cantreplace',
                         ``provider``, ``other``  and the set of requirements
                         that ``provider`` couldn't fulfill.
        :return: True if we can replace ``other`` with ``provider``, else
                 False.
        """
        rlist = self.reqts[other]
        unmatched = set()
        for s in rlist:
            matcher = self.get_matcher(s)
            if not matcher.match(provider.version):
                unmatched.add(s)
        if unmatched:
            # can't replace other with provider
            problems.add(('cantreplace', provider, other,
                          frozenset(unmatched)))
            result = False
        else:
            # can replace other with provider
            self.remove_distribution(other)
            del self.reqts[other]
            for s in rlist:
                self.reqts.setdefault(provider, set()).add(s)
            self.add_distribution(provider)
            result = True
        return result

    def find(self, requirement, meta_extras=None, prereleases=False):
        """
        Find a distribution and all distributions it depends on.

        :param requirement: The requirement specifying the distribution to
                            find, or a Distribution instance.
        :param meta_extras: A list of meta extras such as :test:, :build: and
                            so on.
        :param prereleases: If ``True``, allow pre-release versions to be
                            returned - otherwise, don't return prereleases
                            unless they're all that's available.

        Return a set of :class:`Distribution` instances and a set of
        problems.

        The distributions returned should be such that they have the
        :attr:`required` attribute set to ``True`` if they were
        from the ``requirement`` passed to ``find()``, and they have the
        :attr:`build_time_dependency` attribute set to ``True`` unless they
        are post-installation dependencies of the ``requirement``.

        The problems should be a tuple consisting of the string
        ``'unsatisfied'`` and the requirement which couldn't be satisfied
        by any distribution known to the locator.
        """

        self.provided = {}
        self.dists = {}
        self.dists_by_name = {}
        self.reqts = {}

        meta_extras = set(meta_extras or [])
        if ':*:' in meta_extras:
            meta_extras.remove(':*:')
            # :meta: and :run: are implicitly included
            meta_extras |= set([':test:', ':build:', ':dev:'])

        if isinstance(requirement, Distribution):
            dist = odist = requirement
            logger.debug('passed %s as requirement', odist)
        else:
            dist = odist = self.locator.locate(requirement,
                                               prereleases=prereleases)
            if dist is None:
                raise DistlibException('Unable to locate %r' % requirement)
            logger.debug('located %s', odist)
        dist.requested = True
        problems = set()
        todo = set([dist])
        install_dists = set([odist])
        while todo:
            dist = todo.pop()
            name = dist.key     # case-insensitive
            if name not in self.dists_by_name:
                self.add_distribution(dist)
            else:
                #import pdb; pdb.set_trace()
                other = self.dists_by_name[name]
                if other != dist:
                    self.try_to_replace(dist, other, problems)

            ireqts = dist.run_requires | dist.meta_requires
            sreqts = dist.build_requires
            ereqts = set()
            if meta_extras and dist in install_dists:
                for key in ('test', 'build', 'dev'):
                    e = ':%s:' % key
                    if e in meta_extras:
                        ereqts |= getattr(dist, '%s_requires' % key)
            all_reqts = ireqts | sreqts | ereqts
            for r in all_reqts:
                providers = self.find_providers(r)
                if not providers:
                    logger.debug('No providers found for %r', r)
                    provider = self.locator.locate(r, prereleases=prereleases)
                    # If no provider is found and we didn't consider
                    # prereleases, consider them now.
                    if provider is None and not prereleases:
                        provider = self.locator.locate(r, prereleases=True)
                    if provider is None:
                        logger.debug('Cannot satisfy %r', r)
                        problems.add(('unsatisfied', r))
                    else:
                        n, v = provider.key, provider.version
                        if (n, v) not in self.dists:
                            todo.add(provider)
                        providers.add(provider)
                        if r in ireqts and dist in install_dists:
                            install_dists.add(provider)
                            logger.debug('Adding %s to install_dists',
                                         provider.name_and_version)
                for p in providers:
                    name = p.key
                    if name not in self.dists_by_name:
                        self.reqts.setdefault(p, set()).add(r)
                    else:
                        other = self.dists_by_name[name]
                        if other != p:
                            # see if other can be replaced by p
                            self.try_to_replace(p, other, problems)

        dists = set(self.dists.values())
        for dist in dists:
            dist.build_time_dependency = dist not in install_dists
            if dist.build_time_dependency:
                logger.debug('%s is a build-time dependency only.',
                             dist.name_and_version)
        logger.debug('find done for %s', odist)
        return dists, problems
python3.12/site-packages/pip/_vendor/distlib/manifest.py000064400000034733151732701640017167 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.
"""
import fnmatch
import logging
import os
import re
import sys

from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']

logger = logging.getLogger(__name__)

# a \ followed by some spaces + EOL
_COLLAPSE_PATTERN = re.compile('\\\\w*\n', re.M)
_COMMENTED_LINE = re.compile('#.*?(?=\n)|\n(?=$)', re.M | re.S)

#
# Due to the different results returned by fnmatch.translate, we need
# to do slightly different processing for Python 2.7 and 3.2 ... this needed
# to be brought in for Python 3.6 onwards.
#
_PYTHON_VERSION = sys.version_info[:2]

class Manifest(object):
    """A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    """

    def __init__(self, base=None):
        """
        Initialise an instance.

        :param base: The base directory to explore under.
        """
        self.base = os.path.abspath(os.path.normpath(base or os.getcwd()))
        self.prefix = self.base + os.sep
        self.allfiles = None
        self.files = set()

    #
    # Public API
    #

    def findall(self):
        """Find all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        """
        from stat import S_ISREG, S_ISDIR, S_ISLNK

        self.allfiles = allfiles = []
        root = self.base
        stack = [root]
        pop = stack.pop
        push = stack.append

        while stack:
            root = pop()
            names = os.listdir(root)

            for name in names:
                fullname = os.path.join(root, name)

                # Avoid excess stat calls -- just one will do, thank you!
                stat = os.stat(fullname)
                mode = stat.st_mode
                if S_ISREG(mode):
                    allfiles.append(fsdecode(fullname))
                elif S_ISDIR(mode) and not S_ISLNK(mode):
                    push(fullname)

    def add(self, item):
        """
        Add a file to the manifest.

        :param item: The pathname to add. This can be relative to the base.
        """
        if not item.startswith(self.prefix):
            item = os.path.join(self.base, item)
        self.files.add(os.path.normpath(item))

    def add_many(self, items):
        """
        Add a list of files to the manifest.

        :param items: The pathnames to add. These can be relative to the base.
        """
        for item in items:
            self.add(item)

    def sorted(self, wantdirs=False):
        """
        Return sorted files in directory order
        """

        def add_dir(dirs, d):
            dirs.add(d)
            logger.debug('add_dir added %s', d)
            if d != self.base:
                parent, _ = os.path.split(d)
                assert parent not in ('', '/')
                add_dir(dirs, parent)

        result = set(self.files)    # make a copy!
        if wantdirs:
            dirs = set()
            for f in result:
                add_dir(dirs, os.path.dirname(f))
            result |= dirs
        return [os.path.join(*path_tuple) for path_tuple in
                sorted(os.path.split(path) for path in result)]

    def clear(self):
        """Clear all collected files."""
        self.files = set()
        self.allfiles = []

    def process_directive(self, directive):
        """
        Process a directive which either adds some files from ``allfiles`` to
        ``files``, or removes some files from ``files``.

        :param directive: The directive to process. This should be in a format
                     compatible with distutils ``MANIFEST.in`` files:

                     http://docs.python.org/distutils/sourcedist.html#commands
        """
        # Parse the line: split it up, make sure the right number of words
        # is there, and return the relevant words.  'action' is always
        # defined: it's the first word of the line.  Which of the other
        # three are defined depends on the action; it'll be either
        # patterns, (dir and patterns), or (dirpattern).
        action, patterns, thedir, dirpattern = self._parse_directive(directive)

        # OK, now we know that the action is valid and we have the
        # right number of words on the line for that action -- so we
        # can proceed with minimal error-checking.
        if action == 'include':
            for pattern in patterns:
                if not self._include_pattern(pattern, anchor=True):
                    logger.warning('no files found matching %r', pattern)

        elif action == 'exclude':
            for pattern in patterns:
                found = self._exclude_pattern(pattern, anchor=True)
                #if not found:
                #    logger.warning('no previously-included files '
                #                   'found matching %r', pattern)

        elif action == 'global-include':
            for pattern in patterns:
                if not self._include_pattern(pattern, anchor=False):
                    logger.warning('no files found matching %r '
                                   'anywhere in distribution', pattern)

        elif action == 'global-exclude':
            for pattern in patterns:
                found = self._exclude_pattern(pattern, anchor=False)
                #if not found:
                #    logger.warning('no previously-included files '
                #                   'matching %r found anywhere in '
                #                   'distribution', pattern)

        elif action == 'recursive-include':
            for pattern in patterns:
                if not self._include_pattern(pattern, prefix=thedir):
                    logger.warning('no files found matching %r '
                                   'under directory %r', pattern, thedir)

        elif action == 'recursive-exclude':
            for pattern in patterns:
                found = self._exclude_pattern(pattern, prefix=thedir)
                #if not found:
                #    logger.warning('no previously-included files '
                #                   'matching %r found under directory %r',
                #                   pattern, thedir)

        elif action == 'graft':
            if not self._include_pattern(None, prefix=dirpattern):
                logger.warning('no directories found matching %r',
                               dirpattern)

        elif action == 'prune':
            if not self._exclude_pattern(None, prefix=dirpattern):
                logger.warning('no previously-included directories found '
                               'matching %r', dirpattern)
        else:   # pragma: no cover
            # This should never happen, as it should be caught in
            # _parse_template_line
            raise DistlibException(
                'invalid action %r' % action)

    #
    # Private API
    #

    def _parse_directive(self, directive):
        """
        Validate a directive.
        :param directive: The directive to validate.
        :return: A tuple of action, patterns, thedir, dir_patterns
        """
        words = directive.split()
        if len(words) == 1 and words[0] not in ('include', 'exclude',
                                                'global-include',
                                                'global-exclude',
                                                'recursive-include',
                                                'recursive-exclude',
                                                'graft', 'prune'):
            # no action given, let's use the default 'include'
            words.insert(0, 'include')

        action = words[0]
        patterns = thedir = dir_pattern = None

        if action in ('include', 'exclude',
                      'global-include', 'global-exclude'):
            if len(words) < 2:
                raise DistlibException(
                    '%r expects <pattern1> <pattern2> ...' % action)

            patterns = [convert_path(word) for word in words[1:]]

        elif action in ('recursive-include', 'recursive-exclude'):
            if len(words) < 3:
                raise DistlibException(
                    '%r expects <dir> <pattern1> <pattern2> ...' % action)

            thedir = convert_path(words[1])
            patterns = [convert_path(word) for word in words[2:]]

        elif action in ('graft', 'prune'):
            if len(words) != 2:
                raise DistlibException(
                    '%r expects a single <dir_pattern>' % action)

            dir_pattern = convert_path(words[1])

        else:
            raise DistlibException('unknown action %r' % action)

        return action, patterns, thedir, dir_pattern

    def _include_pattern(self, pattern, anchor=True, prefix=None,
                         is_regex=False):
        """Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found.
        """
        # XXX docstring lying about what the special chars are?
        found = False
        pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)

        # delayed loading of allfiles list
        if self.allfiles is None:
            self.findall()

        for name in self.allfiles:
            if pattern_re.search(name):
                self.files.add(name)
                found = True
        return found

    def _exclude_pattern(self, pattern, anchor=True, prefix=None,
                         is_regex=False):
        """Remove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return True if files are
        found.

        This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
        packaging source distributions
        """
        found = False
        pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)
        for f in list(self.files):
            if pattern_re.search(f):
                self.files.remove(f)
                found = True
        return found

    def _translate_pattern(self, pattern, anchor=True, prefix=None,
                           is_regex=False):
        """Translate a shell-like wildcard pattern to a compiled regular
        expression.

        Return the compiled regex.  If 'is_regex' true,
        then 'pattern' is directly compiled to a regex (if it's a string)
        or just returned as-is (assumes it's a regex object).
        """
        if is_regex:
            if isinstance(pattern, str):
                return re.compile(pattern)
            else:
                return pattern

        if _PYTHON_VERSION > (3, 2):
            # ditch start and end characters
            start, _, end = self._glob_to_re('_').partition('_')

        if pattern:
            pattern_re = self._glob_to_re(pattern)
            if _PYTHON_VERSION > (3, 2):
                assert pattern_re.startswith(start) and pattern_re.endswith(end)
        else:
            pattern_re = ''

        base = re.escape(os.path.join(self.base, ''))
        if prefix is not None:
            # ditch end of pattern character
            if _PYTHON_VERSION <= (3, 2):
                empty_pattern = self._glob_to_re('')
                prefix_re = self._glob_to_re(prefix)[:-len(empty_pattern)]
            else:
                prefix_re = self._glob_to_re(prefix)
                assert prefix_re.startswith(start) and prefix_re.endswith(end)
                prefix_re = prefix_re[len(start): len(prefix_re) - len(end)]
            sep = os.sep
            if os.sep == '\\':
                sep = r'\\'
            if _PYTHON_VERSION <= (3, 2):
                pattern_re = '^' + base + sep.join((prefix_re,
                                                    '.*' + pattern_re))
            else:
                pattern_re = pattern_re[len(start): len(pattern_re) - len(end)]
                pattern_re = r'%s%s%s%s.*%s%s' % (start, base, prefix_re, sep,
                                                  pattern_re, end)
        else:  # no prefix -- respect anchor flag
            if anchor:
                if _PYTHON_VERSION <= (3, 2):
                    pattern_re = '^' + base + pattern_re
                else:
                    pattern_re = r'%s%s%s' % (start, base, pattern_re[len(start):])

        return re.compile(pattern_re)

    def _glob_to_re(self, pattern):
        """Translate a shell-like glob pattern to a regular expression.

        Return a string containing the regex.  Differs from
        'fnmatch.translate()' in that '*' does not match "special characters"
        (which are platform-specific).
        """
        pattern_re = fnmatch.translate(pattern)

        # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
        # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
        # and by extension they shouldn't match such "special characters" under
        # any OS.  So change all non-escaped dots in the RE to match any
        # character except the special characters (currently: just os.sep).
        sep = os.sep
        if os.sep == '\\':
            # we're using a regex to manipulate a regex, so we need
            # to escape the backslash twice
            sep = r'\\\\'
        escaped = r'\1[^%s]' % sep
        pattern_re = re.sub(r'((?<!\\)(\\\\)*)\.', escaped, pattern_re)
        return pattern_re
python3.12/site-packages/pip/_vendor/distlib/util.py000064400000201326151732701640016330 0ustar00#
# Copyright (C) 2012-2021 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import codecs
from collections import deque
import contextlib
import csv
from glob import iglob as std_iglob
import io
import json
import logging
import os
import py_compile
import re
import socket
try:
    import ssl
except ImportError:  # pragma: no cover
    ssl = None
import subprocess
import sys
import tarfile
import tempfile
import textwrap

try:
    import threading
except ImportError:  # pragma: no cover
    import dummy_threading as threading
import time

from . import DistlibException
from .compat import (string_types, text_type, shutil, raw_input, StringIO,
                     cache_from_source, urlopen, urljoin, httplib, xmlrpclib,
                     splittype, HTTPHandler, BaseConfigurator, valid_ident,
                     Container, configparser, URLError, ZipFile, fsdecode,
                     unquote, urlparse)

logger = logging.getLogger(__name__)

#
# Requirement parsing code as per PEP 508
#

IDENTIFIER = re.compile(r'^([\w\.-]+)\s*')
VERSION_IDENTIFIER = re.compile(r'^([\w\.*+-]+)\s*')
COMPARE_OP = re.compile(r'^(<=?|>=?|={2,3}|[~!]=)\s*')
MARKER_OP = re.compile(r'^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*')
OR = re.compile(r'^or\b\s*')
AND = re.compile(r'^and\b\s*')
NON_SPACE = re.compile(r'(\S+)\s*')
STRING_CHUNK = re.compile(r'([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)')


def parse_marker(marker_string):
    """
    Parse a marker string and return a dictionary containing a marker expression.

    The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
    the expression grammar, or strings. A string contained in quotes is to be
    interpreted as a literal string, and a string not contained in quotes is a
    variable (such as os_name).
    """
    def marker_var(remaining):
        # either identifier, or literal string
        m = IDENTIFIER.match(remaining)
        if m:
            result = m.groups()[0]
            remaining = remaining[m.end():]
        elif not remaining:
            raise SyntaxError('unexpected end of input')
        else:
            q = remaining[0]
            if q not in '\'"':
                raise SyntaxError('invalid expression: %s' % remaining)
            oq = '\'"'.replace(q, '')
            remaining = remaining[1:]
            parts = [q]
            while remaining:
                # either a string chunk, or oq, or q to terminate
                if remaining[0] == q:
                    break
                elif remaining[0] == oq:
                    parts.append(oq)
                    remaining = remaining[1:]
                else:
                    m = STRING_CHUNK.match(remaining)
                    if not m:
                        raise SyntaxError('error in string literal: %s' % remaining)
                    parts.append(m.groups()[0])
                    remaining = remaining[m.end():]
            else:
                s = ''.join(parts)
                raise SyntaxError('unterminated string: %s' % s)
            parts.append(q)
            result = ''.join(parts)
            remaining = remaining[1:].lstrip() # skip past closing quote
        return result, remaining

    def marker_expr(remaining):
        if remaining and remaining[0] == '(':
            result, remaining = marker(remaining[1:].lstrip())
            if remaining[0] != ')':
                raise SyntaxError('unterminated parenthesis: %s' % remaining)
            remaining = remaining[1:].lstrip()
        else:
            lhs, remaining = marker_var(remaining)
            while remaining:
                m = MARKER_OP.match(remaining)
                if not m:
                    break
                op = m.groups()[0]
                remaining = remaining[m.end():]
                rhs, remaining = marker_var(remaining)
                lhs = {'op': op, 'lhs': lhs, 'rhs': rhs}
            result = lhs
        return result, remaining

    def marker_and(remaining):
        lhs, remaining = marker_expr(remaining)
        while remaining:
            m = AND.match(remaining)
            if not m:
                break
            remaining = remaining[m.end():]
            rhs, remaining = marker_expr(remaining)
            lhs = {'op': 'and', 'lhs': lhs, 'rhs': rhs}
        return lhs, remaining

    def marker(remaining):
        lhs, remaining = marker_and(remaining)
        while remaining:
            m = OR.match(remaining)
            if not m:
                break
            remaining = remaining[m.end():]
            rhs, remaining = marker_and(remaining)
            lhs = {'op': 'or', 'lhs': lhs, 'rhs': rhs}
        return lhs, remaining

    return marker(marker_string)


def parse_requirement(req):
    """
    Parse a requirement passed in as a string. Return a Container
    whose attributes contain the various parts of the requirement.
    """
    remaining = req.strip()
    if not remaining or remaining.startswith('#'):
        return None
    m = IDENTIFIER.match(remaining)
    if not m:
        raise SyntaxError('name expected: %s' % remaining)
    distname = m.groups()[0]
    remaining = remaining[m.end():]
    extras = mark_expr = versions = uri = None
    if remaining and remaining[0] == '[':
        i = remaining.find(']', 1)
        if i < 0:
            raise SyntaxError('unterminated extra: %s' % remaining)
        s = remaining[1:i]
        remaining = remaining[i + 1:].lstrip()
        extras = []
        while s:
            m = IDENTIFIER.match(s)
            if not m:
                raise SyntaxError('malformed extra: %s' % s)
            extras.append(m.groups()[0])
            s = s[m.end():]
            if not s:
                break
            if s[0] != ',':
                raise SyntaxError('comma expected in extras: %s' % s)
            s = s[1:].lstrip()
        if not extras:
            extras = None
    if remaining:
        if remaining[0] == '@':
            # it's a URI
            remaining = remaining[1:].lstrip()
            m = NON_SPACE.match(remaining)
            if not m:
                raise SyntaxError('invalid URI: %s' % remaining)
            uri = m.groups()[0]
            t = urlparse(uri)
            # there are issues with Python and URL parsing, so this test
            # is a bit crude. See bpo-20271, bpo-23505. Python doesn't
            # always parse invalid URLs correctly - it should raise
            # exceptions for malformed URLs
            if not (t.scheme and t.netloc):
                raise SyntaxError('Invalid URL: %s' % uri)
            remaining = remaining[m.end():].lstrip()
        else:

            def get_versions(ver_remaining):
                """
                Return a list of operator, version tuples if any are
                specified, else None.
                """
                m = COMPARE_OP.match(ver_remaining)
                versions = None
                if m:
                    versions = []
                    while True:
                        op = m.groups()[0]
                        ver_remaining = ver_remaining[m.end():]
                        m = VERSION_IDENTIFIER.match(ver_remaining)
                        if not m:
                            raise SyntaxError('invalid version: %s' % ver_remaining)
                        v = m.groups()[0]
                        versions.append((op, v))
                        ver_remaining = ver_remaining[m.end():]
                        if not ver_remaining or ver_remaining[0] != ',':
                            break
                        ver_remaining = ver_remaining[1:].lstrip()
                        # Some packages have a trailing comma which would break things
                        # See issue #148
                        if not ver_remaining:
                            break
                        m = COMPARE_OP.match(ver_remaining)
                        if not m:
                            raise SyntaxError('invalid constraint: %s' % ver_remaining)
                    if not versions:
                        versions = None
                return versions, ver_remaining

            if remaining[0] != '(':
                versions, remaining = get_versions(remaining)
            else:
                i = remaining.find(')', 1)
                if i < 0:
                    raise SyntaxError('unterminated parenthesis: %s' % remaining)
                s = remaining[1:i]
                remaining = remaining[i + 1:].lstrip()
                # As a special diversion from PEP 508, allow a version number
                # a.b.c in parentheses as a synonym for ~= a.b.c (because this
                # is allowed in earlier PEPs)
                if COMPARE_OP.match(s):
                    versions, _ = get_versions(s)
                else:
                    m = VERSION_IDENTIFIER.match(s)
                    if not m:
                        raise SyntaxError('invalid constraint: %s' % s)
                    v = m.groups()[0]
                    s = s[m.end():].lstrip()
                    if s:
                        raise SyntaxError('invalid constraint: %s' % s)
                    versions = [('~=', v)]

    if remaining:
        if remaining[0] != ';':
            raise SyntaxError('invalid requirement: %s' % remaining)
        remaining = remaining[1:].lstrip()

        mark_expr, remaining = parse_marker(remaining)

    if remaining and remaining[0] != '#':
        raise SyntaxError('unexpected trailing data: %s' % remaining)

    if not versions:
        rs = distname
    else:
        rs = '%s %s' % (distname, ', '.join(['%s %s' % con for con in versions]))
    return Container(name=distname, extras=extras, constraints=versions,
                     marker=mark_expr, url=uri, requirement=rs)


def get_resources_dests(resources_root, rules):
    """Find destinations for resources files"""

    def get_rel_path(root, path):
        # normalizes and returns a lstripped-/-separated path
        root = root.replace(os.path.sep, '/')
        path = path.replace(os.path.sep, '/')
        assert path.startswith(root)
        return path[len(root):].lstrip('/')

    destinations = {}
    for base, suffix, dest in rules:
        prefix = os.path.join(resources_root, base)
        for abs_base in iglob(prefix):
            abs_glob = os.path.join(abs_base, suffix)
            for abs_path in iglob(abs_glob):
                resource_file = get_rel_path(resources_root, abs_path)
                if dest is None:  # remove the entry if it was here
                    destinations.pop(resource_file, None)
                else:
                    rel_path = get_rel_path(abs_base, abs_path)
                    rel_dest = dest.replace(os.path.sep, '/').rstrip('/')
                    destinations[resource_file] = rel_dest + '/' + rel_path
    return destinations


def in_venv():
    if hasattr(sys, 'real_prefix'):
        # virtualenv venvs
        result = True
    else:
        # PEP 405 venvs
        result = sys.prefix != getattr(sys, 'base_prefix', sys.prefix)
    return result


def get_executable():
# The __PYVENV_LAUNCHER__ dance is apparently no longer needed, as
# changes to the stub launcher mean that sys.executable always points
# to the stub on OS X
#    if sys.platform == 'darwin' and ('__PYVENV_LAUNCHER__'
#                                     in os.environ):
#        result =  os.environ['__PYVENV_LAUNCHER__']
#    else:
#        result = sys.executable
#    return result
    # Avoid normcasing: see issue #143
    # result = os.path.normcase(sys.executable)
    result = sys.executable
    if not isinstance(result, text_type):
        result = fsdecode(result)
    return result


def proceed(prompt, allowed_chars, error_prompt=None, default=None):
    p = prompt
    while True:
        s = raw_input(p)
        p = prompt
        if not s and default:
            s = default
        if s:
            c = s[0].lower()
            if c in allowed_chars:
                break
            if error_prompt:
                p = '%c: %s\n%s' % (c, error_prompt, prompt)
    return c


def extract_by_key(d, keys):
    if isinstance(keys, string_types):
        keys = keys.split()
    result = {}
    for key in keys:
        if key in d:
            result[key] = d[key]
    return result

def read_exports(stream):
    if sys.version_info[0] >= 3:
        # needs to be a text stream
        stream = codecs.getreader('utf-8')(stream)
    # Try to load as JSON, falling back on legacy format
    data = stream.read()
    stream = StringIO(data)
    try:
        jdata = json.load(stream)
        result = jdata['extensions']['python.exports']['exports']
        for group, entries in result.items():
            for k, v in entries.items():
                s = '%s = %s' % (k, v)
                entry = get_export_entry(s)
                assert entry is not None
                entries[k] = entry
        return result
    except Exception:
        stream.seek(0, 0)

    def read_stream(cp, stream):
        if hasattr(cp, 'read_file'):
            cp.read_file(stream)
        else:
            cp.readfp(stream)

    cp = configparser.ConfigParser()
    try:
        read_stream(cp, stream)
    except configparser.MissingSectionHeaderError:
        stream.close()
        data = textwrap.dedent(data)
        stream = StringIO(data)
        read_stream(cp, stream)

    result = {}
    for key in cp.sections():
        result[key] = entries = {}
        for name, value in cp.items(key):
            s = '%s = %s' % (name, value)
            entry = get_export_entry(s)
            assert entry is not None
            #entry.dist = self
            entries[name] = entry
    return result


def write_exports(exports, stream):
    if sys.version_info[0] >= 3:
        # needs to be a text stream
        stream = codecs.getwriter('utf-8')(stream)
    cp = configparser.ConfigParser()
    for k, v in exports.items():
        # TODO check k, v for valid values
        cp.add_section(k)
        for entry in v.values():
            if entry.suffix is None:
                s = entry.prefix
            else:
                s = '%s:%s' % (entry.prefix, entry.suffix)
            if entry.flags:
                s = '%s [%s]' % (s, ', '.join(entry.flags))
            cp.set(k, entry.name, s)
    cp.write(stream)


@contextlib.contextmanager
def tempdir():
    td = tempfile.mkdtemp()
    try:
        yield td
    finally:
        shutil.rmtree(td)

@contextlib.contextmanager
def chdir(d):
    cwd = os.getcwd()
    try:
        os.chdir(d)
        yield
    finally:
        os.chdir(cwd)


@contextlib.contextmanager
def socket_timeout(seconds=15):
    cto = socket.getdefaulttimeout()
    try:
        socket.setdefaulttimeout(seconds)
        yield
    finally:
        socket.setdefaulttimeout(cto)


class cached_property(object):
    def __init__(self, func):
        self.func = func
        #for attr in ('__name__', '__module__', '__doc__'):
        #    setattr(self, attr, getattr(func, attr, None))

    def __get__(self, obj, cls=None):
        if obj is None:
            return self
        value = self.func(obj)
        object.__setattr__(obj, self.func.__name__, value)
        #obj.__dict__[self.func.__name__] = value = self.func(obj)
        return value

def convert_path(pathname):
    """Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    """
    if os.sep == '/':
        return pathname
    if not pathname:
        return pathname
    if pathname[0] == '/':
        raise ValueError("path '%s' cannot be absolute" % pathname)
    if pathname[-1] == '/':
        raise ValueError("path '%s' cannot end with '/'" % pathname)

    paths = pathname.split('/')
    while os.curdir in paths:
        paths.remove(os.curdir)
    if not paths:
        return os.curdir
    return os.path.join(*paths)


class FileOperator(object):
    def __init__(self, dry_run=False):
        self.dry_run = dry_run
        self.ensured = set()
        self._init_record()

    def _init_record(self):
        self.record = False
        self.files_written = set()
        self.dirs_created = set()

    def record_as_written(self, path):
        if self.record:
            self.files_written.add(path)

    def newer(self, source, target):
        """Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        """
        if not os.path.exists(source):
            raise DistlibException("file '%r' does not exist" %
                                   os.path.abspath(source))
        if not os.path.exists(target):
            return True

        return os.stat(source).st_mtime > os.stat(target).st_mtime

    def copy_file(self, infile, outfile, check=True):
        """Copy a file respecting dry-run and force flags.
        """
        self.ensure_dir(os.path.dirname(outfile))
        logger.info('Copying %s to %s', infile, outfile)
        if not self.dry_run:
            msg = None
            if check:
                if os.path.islink(outfile):
                    msg = '%s is a symlink' % outfile
                elif os.path.exists(outfile) and not os.path.isfile(outfile):
                    msg = '%s is a non-regular file' % outfile
            if msg:
                raise ValueError(msg + ' which would be overwritten')
            shutil.copyfile(infile, outfile)
        self.record_as_written(outfile)

    def copy_stream(self, instream, outfile, encoding=None):
        assert not os.path.isdir(outfile)
        self.ensure_dir(os.path.dirname(outfile))
        logger.info('Copying stream %s to %s', instream, outfile)
        if not self.dry_run:
            if encoding is None:
                outstream = open(outfile, 'wb')
            else:
                outstream = codecs.open(outfile, 'w', encoding=encoding)
            try:
                shutil.copyfileobj(instream, outstream)
            finally:
                outstream.close()
        self.record_as_written(outfile)

    def write_binary_file(self, path, data):
        self.ensure_dir(os.path.dirname(path))
        if not self.dry_run:
            if os.path.exists(path):
                os.remove(path)
            with open(path, 'wb') as f:
                f.write(data)
        self.record_as_written(path)

    def write_text_file(self, path, data, encoding):
        self.write_binary_file(path, data.encode(encoding))

    def set_mode(self, bits, mask, files):
        if os.name == 'posix' or (os.name == 'java' and os._name == 'posix'):
            # Set the executable bits (owner, group, and world) on
            # all the files specified.
            for f in files:
                if self.dry_run:
                    logger.info("changing mode of %s", f)
                else:
                    mode = (os.stat(f).st_mode | bits) & mask
                    logger.info("changing mode of %s to %o", f, mode)
                    os.chmod(f, mode)

    set_executable_mode = lambda s, f: s.set_mode(0o555, 0o7777, f)

    def ensure_dir(self, path):
        path = os.path.abspath(path)
        if path not in self.ensured and not os.path.exists(path):
            self.ensured.add(path)
            d, f = os.path.split(path)
            self.ensure_dir(d)
            logger.info('Creating %s' % path)
            if not self.dry_run:
                os.mkdir(path)
            if self.record:
                self.dirs_created.add(path)

    def byte_compile(self, path, optimize=False, force=False, prefix=None, hashed_invalidation=False):
        dpath = cache_from_source(path, not optimize)
        logger.info('Byte-compiling %s to %s', path, dpath)
        if not self.dry_run:
            if force or self.newer(path, dpath):
                if not prefix:
                    diagpath = None
                else:
                    assert path.startswith(prefix)
                    diagpath = path[len(prefix):]
            compile_kwargs = {}
            if hashed_invalidation and hasattr(py_compile, 'PycInvalidationMode'):
                compile_kwargs['invalidation_mode'] = py_compile.PycInvalidationMode.CHECKED_HASH
            py_compile.compile(path, dpath, diagpath, True, **compile_kwargs)     # raise error
        self.record_as_written(dpath)
        return dpath

    def ensure_removed(self, path):
        if os.path.exists(path):
            if os.path.isdir(path) and not os.path.islink(path):
                logger.debug('Removing directory tree at %s', path)
                if not self.dry_run:
                    shutil.rmtree(path)
                if self.record:
                    if path in self.dirs_created:
                        self.dirs_created.remove(path)
            else:
                if os.path.islink(path):
                    s = 'link'
                else:
                    s = 'file'
                logger.debug('Removing %s %s', s, path)
                if not self.dry_run:
                    os.remove(path)
                if self.record:
                    if path in self.files_written:
                        self.files_written.remove(path)

    def is_writable(self, path):
        result = False
        while not result:
            if os.path.exists(path):
                result = os.access(path, os.W_OK)
                break
            parent = os.path.dirname(path)
            if parent == path:
                break
            path = parent
        return result

    def commit(self):
        """
        Commit recorded changes, turn off recording, return
        changes.
        """
        assert self.record
        result = self.files_written, self.dirs_created
        self._init_record()
        return result

    def rollback(self):
        if not self.dry_run:
            for f in list(self.files_written):
                if os.path.exists(f):
                    os.remove(f)
            # dirs should all be empty now, except perhaps for
            # __pycache__ subdirs
            # reverse so that subdirs appear before their parents
            dirs = sorted(self.dirs_created, reverse=True)
            for d in dirs:
                flist = os.listdir(d)
                if flist:
                    assert flist == ['__pycache__']
                    sd = os.path.join(d, flist[0])
                    os.rmdir(sd)
                os.rmdir(d)     # should fail if non-empty
        self._init_record()

def resolve(module_name, dotted_path):
    if module_name in sys.modules:
        mod = sys.modules[module_name]
    else:
        mod = __import__(module_name)
    if dotted_path is None:
        result = mod
    else:
        parts = dotted_path.split('.')
        result = getattr(mod, parts.pop(0))
        for p in parts:
            result = getattr(result, p)
    return result


class ExportEntry(object):
    def __init__(self, name, prefix, suffix, flags):
        self.name = name
        self.prefix = prefix
        self.suffix = suffix
        self.flags = flags

    @cached_property
    def value(self):
        return resolve(self.prefix, self.suffix)

    def __repr__(self):  # pragma: no cover
        return '<ExportEntry %s = %s:%s %s>' % (self.name, self.prefix,
                                                self.suffix, self.flags)

    def __eq__(self, other):
        if not isinstance(other, ExportEntry):
            result = False
        else:
            result = (self.name == other.name and
                      self.prefix == other.prefix and
                      self.suffix == other.suffix and
                      self.flags == other.flags)
        return result

    __hash__ = object.__hash__


ENTRY_RE = re.compile(r'''(?P<name>(\w|[-.+])+)
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      ''', re.VERBOSE)

def get_export_entry(specification):
    m = ENTRY_RE.search(specification)
    if not m:
        result = None
        if '[' in specification or ']' in specification:
            raise DistlibException("Invalid specification "
                                   "'%s'" % specification)
    else:
        d = m.groupdict()
        name = d['name']
        path = d['callable']
        colons = path.count(':')
        if colons == 0:
            prefix, suffix = path, None
        else:
            if colons != 1:
                raise DistlibException("Invalid specification "
                                       "'%s'" % specification)
            prefix, suffix = path.split(':')
        flags = d['flags']
        if flags is None:
            if '[' in specification or ']' in specification:
                raise DistlibException("Invalid specification "
                                       "'%s'" % specification)
            flags = []
        else:
            flags = [f.strip() for f in flags.split(',')]
        result = ExportEntry(name, prefix, suffix, flags)
    return result


def get_cache_base(suffix=None):
    """
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    """
    if suffix is None:
        suffix = '.distlib'
    if os.name == 'nt' and 'LOCALAPPDATA' in os.environ:
        result = os.path.expandvars('$localappdata')
    else:
        # Assume posix, or old Windows
        result = os.path.expanduser('~')
    # we use 'isdir' instead of 'exists', because we want to
    # fail if there's a file with that name
    if os.path.isdir(result):
        usable = os.access(result, os.W_OK)
        if not usable:
            logger.warning('Directory exists but is not writable: %s', result)
    else:
        try:
            os.makedirs(result)
            usable = True
        except OSError:
            logger.warning('Unable to create %s', result, exc_info=True)
            usable = False
    if not usable:
        result = tempfile.mkdtemp()
        logger.warning('Default location unusable, using %s', result)
    return os.path.join(result, suffix)


def path_to_cache_dir(path):
    """
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    """
    d, p = os.path.splitdrive(os.path.abspath(path))
    if d:
        d = d.replace(':', '---')
    p = p.replace(os.sep, '--')
    return d + p + '.cache'


def ensure_slash(s):
    if not s.endswith('/'):
        return s + '/'
    return s


def parse_credentials(netloc):
    username = password = None
    if '@' in netloc:
        prefix, netloc = netloc.rsplit('@', 1)
        if ':' not in prefix:
            username = prefix
        else:
            username, password = prefix.split(':', 1)
    if username:
        username = unquote(username)
    if password:
        password = unquote(password)
    return username, password, netloc


def get_process_umask():
    result = os.umask(0o22)
    os.umask(result)
    return result

def is_string_sequence(seq):
    result = True
    i = None
    for i, s in enumerate(seq):
        if not isinstance(s, string_types):
            result = False
            break
    assert i is not None
    return result

PROJECT_NAME_AND_VERSION = re.compile('([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-'
                                      '([a-z0-9_.+-]+)', re.I)
PYTHON_VERSION = re.compile(r'-py(\d\.?\d?)')


def split_filename(filename, project_name=None):
    """
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    """
    result = None
    pyver = None
    filename = unquote(filename).replace(' ', '-')
    m = PYTHON_VERSION.search(filename)
    if m:
        pyver = m.group(1)
        filename = filename[:m.start()]
    if project_name and len(filename) > len(project_name) + 1:
        m = re.match(re.escape(project_name) + r'\b', filename)
        if m:
            n = m.end()
            result = filename[:n], filename[n + 1:], pyver
    if result is None:
        m = PROJECT_NAME_AND_VERSION.match(filename)
        if m:
            result = m.group(1), m.group(3), pyver
    return result

# Allow spaces in name because of legacy dists like "Twisted Core"
NAME_VERSION_RE = re.compile(r'(?P<name>[\w .-]+)\s*'
                             r'\(\s*(?P<ver>[^\s)]+)\)$')

def parse_name_and_version(p):
    """
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    """
    m = NAME_VERSION_RE.match(p)
    if not m:
        raise DistlibException('Ill-formed name/version string: \'%s\'' % p)
    d = m.groupdict()
    return d['name'].strip().lower(), d['ver']

def get_extras(requested, available):
    result = set()
    requested = set(requested or [])
    available = set(available or [])
    if '*' in requested:
        requested.remove('*')
        result |= available
    for r in requested:
        if r == '-':
            result.add(r)
        elif r.startswith('-'):
            unwanted = r[1:]
            if unwanted not in available:
                logger.warning('undeclared extra: %s' % unwanted)
            if unwanted in result:
                result.remove(unwanted)
        else:
            if r not in available:
                logger.warning('undeclared extra: %s' % r)
            result.add(r)
    return result
#
# Extended metadata functionality
#

def _get_external_data(url):
    result = {}
    try:
        # urlopen might fail if it runs into redirections,
        # because of Python issue #13696. Fixed in locators
        # using a custom redirect handler.
        resp = urlopen(url)
        headers = resp.info()
        ct = headers.get('Content-Type')
        if not ct.startswith('application/json'):
            logger.debug('Unexpected response for JSON request: %s', ct)
        else:
            reader = codecs.getreader('utf-8')(resp)
            #data = reader.read().decode('utf-8')
            #result = json.loads(data)
            result = json.load(reader)
    except Exception as e:
        logger.exception('Failed to get external data for %s: %s', url, e)
    return result

_external_data_base_url = 'https://www.red-dove.com/pypi/projects/'

def get_project_data(name):
    url = '%s/%s/project.json' % (name[0].upper(), name)
    url = urljoin(_external_data_base_url, url)
    result = _get_external_data(url)
    return result

def get_package_data(name, version):
    url = '%s/%s/package-%s.json' % (name[0].upper(), name, version)
    url = urljoin(_external_data_base_url, url)
    return _get_external_data(url)


class Cache(object):
    """
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    """

    def __init__(self, base):
        """
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        """
        # we use 'isdir' instead of 'exists', because we want to
        # fail if there's a file with that name
        if not os.path.isdir(base):  # pragma: no cover
            os.makedirs(base)
        if (os.stat(base).st_mode & 0o77) != 0:
            logger.warning('Directory \'%s\' is not private', base)
        self.base = os.path.abspath(os.path.normpath(base))

    def prefix_to_dir(self, prefix):
        """
        Converts a resource prefix to a directory name in the cache.
        """
        return path_to_cache_dir(prefix)

    def clear(self):
        """
        Clear the cache.
        """
        not_removed = []
        for fn in os.listdir(self.base):
            fn = os.path.join(self.base, fn)
            try:
                if os.path.islink(fn) or os.path.isfile(fn):
                    os.remove(fn)
                elif os.path.isdir(fn):
                    shutil.rmtree(fn)
            except Exception:
                not_removed.append(fn)
        return not_removed


class EventMixin(object):
    """
    A very simple publish/subscribe system.
    """
    def __init__(self):
        self._subscribers = {}

    def add(self, event, subscriber, append=True):
        """
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        """
        subs = self._subscribers
        if event not in subs:
            subs[event] = deque([subscriber])
        else:
            sq = subs[event]
            if append:
                sq.append(subscriber)
            else:
                sq.appendleft(subscriber)

    def remove(self, event, subscriber):
        """
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        """
        subs = self._subscribers
        if event not in subs:
            raise ValueError('No subscribers: %r' % event)
        subs[event].remove(subscriber)

    def get_subscribers(self, event):
        """
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        """
        return iter(self._subscribers.get(event, ()))

    def publish(self, event, *args, **kwargs):
        """
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        """
        result = []
        for subscriber in self.get_subscribers(event):
            try:
                value = subscriber(event, *args, **kwargs)
            except Exception:
                logger.exception('Exception during event publication')
                value = None
            result.append(value)
        logger.debug('publish %s: args = %s, kwargs = %s, result = %s',
                     event, args, kwargs, result)
        return result

#
# Simple sequencing
#
class Sequencer(object):
    def __init__(self):
        self._preds = {}
        self._succs = {}
        self._nodes = set()     # nodes with no preds/succs

    def add_node(self, node):
        self._nodes.add(node)

    def remove_node(self, node, edges=False):
        if node in self._nodes:
            self._nodes.remove(node)
        if edges:
            for p in set(self._preds.get(node, ())):
                self.remove(p, node)
            for s in set(self._succs.get(node, ())):
                self.remove(node, s)
            # Remove empties
            for k, v in list(self._preds.items()):
                if not v:
                    del self._preds[k]
            for k, v in list(self._succs.items()):
                if not v:
                    del self._succs[k]

    def add(self, pred, succ):
        assert pred != succ
        self._preds.setdefault(succ, set()).add(pred)
        self._succs.setdefault(pred, set()).add(succ)

    def remove(self, pred, succ):
        assert pred != succ
        try:
            preds = self._preds[succ]
            succs = self._succs[pred]
        except KeyError:  # pragma: no cover
            raise ValueError('%r not a successor of anything' % succ)
        try:
            preds.remove(pred)
            succs.remove(succ)
        except KeyError:  # pragma: no cover
            raise ValueError('%r not a successor of %r' % (succ, pred))

    def is_step(self, step):
        return (step in self._preds or step in self._succs or
                step in self._nodes)

    def get_steps(self, final):
        if not self.is_step(final):
            raise ValueError('Unknown: %r' % final)
        result = []
        todo = []
        seen = set()
        todo.append(final)
        while todo:
            step = todo.pop(0)
            if step in seen:
                # if a step was already seen,
                # move it to the end (so it will appear earlier
                # when reversed on return) ... but not for the
                # final step, as that would be confusing for
                # users
                if step != final:
                    result.remove(step)
                    result.append(step)
            else:
                seen.add(step)
                result.append(step)
                preds = self._preds.get(step, ())
                todo.extend(preds)
        return reversed(result)

    @property
    def strong_connections(self):
        #http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
        index_counter = [0]
        stack = []
        lowlinks = {}
        index = {}
        result = []

        graph = self._succs

        def strongconnect(node):
            # set the depth index for this node to the smallest unused index
            index[node] = index_counter[0]
            lowlinks[node] = index_counter[0]
            index_counter[0] += 1
            stack.append(node)

            # Consider successors
            try:
                successors = graph[node]
            except Exception:
                successors = []
            for successor in successors:
                if successor not in lowlinks:
                    # Successor has not yet been visited
                    strongconnect(successor)
                    lowlinks[node] = min(lowlinks[node],lowlinks[successor])
                elif successor in stack:
                    # the successor is in the stack and hence in the current
                    # strongly connected component (SCC)
                    lowlinks[node] = min(lowlinks[node],index[successor])

            # If `node` is a root node, pop the stack and generate an SCC
            if lowlinks[node] == index[node]:
                connected_component = []

                while True:
                    successor = stack.pop()
                    connected_component.append(successor)
                    if successor == node: break
                component = tuple(connected_component)
                # storing the result
                result.append(component)

        for node in graph:
            if node not in lowlinks:
                strongconnect(node)

        return result

    @property
    def dot(self):
        result = ['digraph G {']
        for succ in self._preds:
            preds = self._preds[succ]
            for pred in preds:
                result.append('  %s -> %s;' % (pred, succ))
        for node in self._nodes:
            result.append('  %s;' % node)
        result.append('}')
        return '\n'.join(result)

#
# Unarchiving functionality for zip, tar, tgz, tbz, whl
#

ARCHIVE_EXTENSIONS = ('.tar.gz', '.tar.bz2', '.tar', '.zip',
                      '.tgz', '.tbz', '.whl')

def unarchive(archive_filename, dest_dir, format=None, check=True):

    def check_path(path):
        if not isinstance(path, text_type):
            path = path.decode('utf-8')
        p = os.path.abspath(os.path.join(dest_dir, path))
        if not p.startswith(dest_dir) or p[plen] != os.sep:
            raise ValueError('path outside destination: %r' % p)

    dest_dir = os.path.abspath(dest_dir)
    plen = len(dest_dir)
    archive = None
    if format is None:
        if archive_filename.endswith(('.zip', '.whl')):
            format = 'zip'
        elif archive_filename.endswith(('.tar.gz', '.tgz')):
            format = 'tgz'
            mode = 'r:gz'
        elif archive_filename.endswith(('.tar.bz2', '.tbz')):
            format = 'tbz'
            mode = 'r:bz2'
        elif archive_filename.endswith('.tar'):
            format = 'tar'
            mode = 'r'
        else:  # pragma: no cover
            raise ValueError('Unknown format for %r' % archive_filename)
    try:
        if format == 'zip':
            archive = ZipFile(archive_filename, 'r')
            if check:
                names = archive.namelist()
                for name in names:
                    check_path(name)
        else:
            archive = tarfile.open(archive_filename, mode)
            if check:
                names = archive.getnames()
                for name in names:
                    check_path(name)
        if format != 'zip' and sys.version_info[0] < 3:
            # See Python issue 17153. If the dest path contains Unicode,
            # tarfile extraction fails on Python 2.x if a member path name
            # contains non-ASCII characters - it leads to an implicit
            # bytes -> unicode conversion using ASCII to decode.
            for tarinfo in archive.getmembers():
                if not isinstance(tarinfo.name, text_type):
                    tarinfo.name = tarinfo.name.decode('utf-8')
        archive.extractall(dest_dir)

    finally:
        if archive:
            archive.close()


def zip_dir(directory):
    """zip a directory tree into a BytesIO object"""
    result = io.BytesIO()
    dlen = len(directory)
    with ZipFile(result, "w") as zf:
        for root, dirs, files in os.walk(directory):
            for name in files:
                full = os.path.join(root, name)
                rel = root[dlen:]
                dest = os.path.join(rel, name)
                zf.write(full, dest)
    return result

#
# Simple progress bar
#

UNITS = ('', 'K', 'M', 'G','T','P')


class Progress(object):
    unknown = 'UNKNOWN'

    def __init__(self, minval=0, maxval=100):
        assert maxval is None or maxval >= minval
        self.min = self.cur = minval
        self.max = maxval
        self.started = None
        self.elapsed = 0
        self.done = False

    def update(self, curval):
        assert self.min <= curval
        assert self.max is None or curval <= self.max
        self.cur = curval
        now = time.time()
        if self.started is None:
            self.started = now
        else:
            self.elapsed = now - self.started

    def increment(self, incr):
        assert incr >= 0
        self.update(self.cur + incr)

    def start(self):
        self.update(self.min)
        return self

    def stop(self):
        if self.max is not None:
            self.update(self.max)
        self.done = True

    @property
    def maximum(self):
        return self.unknown if self.max is None else self.max

    @property
    def percentage(self):
        if self.done:
            result = '100 %'
        elif self.max is None:
            result = ' ?? %'
        else:
            v = 100.0 * (self.cur - self.min) / (self.max - self.min)
            result = '%3d %%' % v
        return result

    def format_duration(self, duration):
        if (duration <= 0) and self.max is None or self.cur == self.min:
            result = '??:??:??'
        #elif duration < 1:
        #    result = '--:--:--'
        else:
            result = time.strftime('%H:%M:%S', time.gmtime(duration))
        return result

    @property
    def ETA(self):
        if self.done:
            prefix = 'Done'
            t = self.elapsed
            #import pdb; pdb.set_trace()
        else:
            prefix = 'ETA '
            if self.max is None:
                t = -1
            elif self.elapsed == 0 or (self.cur == self.min):
                t = 0
            else:
                #import pdb; pdb.set_trace()
                t = float(self.max - self.min)
                t /= self.cur - self.min
                t = (t - 1) * self.elapsed
        return '%s: %s' % (prefix, self.format_duration(t))

    @property
    def speed(self):
        if self.elapsed == 0:
            result = 0.0
        else:
            result = (self.cur - self.min) / self.elapsed
        for unit in UNITS:
            if result < 1000:
                break
            result /= 1000.0
        return '%d %sB/s' % (result, unit)

#
# Glob functionality
#

RICH_GLOB = re.compile(r'\{([^}]*)\}')
_CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]')
_CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$')


def iglob(path_glob):
    """Extended globbing function that supports ** and {opt1,opt2,opt3}."""
    if _CHECK_RECURSIVE_GLOB.search(path_glob):
        msg = """invalid glob %r: recursive glob "**" must be used alone"""
        raise ValueError(msg % path_glob)
    if _CHECK_MISMATCH_SET.search(path_glob):
        msg = """invalid glob %r: mismatching set marker '{' or '}'"""
        raise ValueError(msg % path_glob)
    return _iglob(path_glob)


def _iglob(path_glob):
    rich_path_glob = RICH_GLOB.split(path_glob, 1)
    if len(rich_path_glob) > 1:
        assert len(rich_path_glob) == 3, rich_path_glob
        prefix, set, suffix = rich_path_glob
        for item in set.split(','):
            for path in _iglob(''.join((prefix, item, suffix))):
                yield path
    else:
        if '**' not in path_glob:
            for item in std_iglob(path_glob):
                yield item
        else:
            prefix, radical = path_glob.split('**', 1)
            if prefix == '':
                prefix = '.'
            if radical == '':
                radical = '*'
            else:
                # we support both
                radical = radical.lstrip('/')
                radical = radical.lstrip('\\')
            for path, dir, files in os.walk(prefix):
                path = os.path.normpath(path)
                for fn in _iglob(os.path.join(path, radical)):
                    yield fn

if ssl:
    from .compat import (HTTPSHandler as BaseHTTPSHandler, match_hostname,
                         CertificateError)


#
# HTTPSConnection which verifies certificates/matches domains
#

    class HTTPSConnection(httplib.HTTPSConnection):
        ca_certs = None # set this to the path to the certs file (.pem)
        check_domain = True # only used if ca_certs is not None

        # noinspection PyPropertyAccess
        def connect(self):
            sock = socket.create_connection((self.host, self.port), self.timeout)
            if getattr(self, '_tunnel_host', False):
                self.sock = sock
                self._tunnel()

            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            if hasattr(ssl, 'OP_NO_SSLv2'):
                context.options |= ssl.OP_NO_SSLv2
            if self.cert_file:
                context.load_cert_chain(self.cert_file, self.key_file)
            kwargs = {}
            if self.ca_certs:
                context.verify_mode = ssl.CERT_REQUIRED
                context.load_verify_locations(cafile=self.ca_certs)
                if getattr(ssl, 'HAS_SNI', False):
                    kwargs['server_hostname'] = self.host

            self.sock = context.wrap_socket(sock, **kwargs)
            if self.ca_certs and self.check_domain:
                try:
                    match_hostname(self.sock.getpeercert(), self.host)
                    logger.debug('Host verified: %s', self.host)
                except CertificateError:  # pragma: no cover
                    self.sock.shutdown(socket.SHUT_RDWR)
                    self.sock.close()
                    raise

    class HTTPSHandler(BaseHTTPSHandler):
        def __init__(self, ca_certs, check_domain=True):
            BaseHTTPSHandler.__init__(self)
            self.ca_certs = ca_certs
            self.check_domain = check_domain

        def _conn_maker(self, *args, **kwargs):
            """
            This is called to create a connection instance. Normally you'd
            pass a connection class to do_open, but it doesn't actually check for
            a class, and just expects a callable. As long as we behave just as a
            constructor would have, we should be OK. If it ever changes so that
            we *must* pass a class, we'll create an UnsafeHTTPSConnection class
            which just sets check_domain to False in the class definition, and
            choose which one to pass to do_open.
            """
            result = HTTPSConnection(*args, **kwargs)
            if self.ca_certs:
                result.ca_certs = self.ca_certs
                result.check_domain = self.check_domain
            return result

        def https_open(self, req):
            try:
                return self.do_open(self._conn_maker, req)
            except URLError as e:
                if 'certificate verify failed' in str(e.reason):
                    raise CertificateError('Unable to verify server certificate '
                                           'for %s' % req.host)
                else:
                    raise

    #
    # To prevent against mixing HTTP traffic with HTTPS (examples: A Man-In-The-
    # Middle proxy using HTTP listens on port 443, or an index mistakenly serves
    # HTML containing a http://xyz link when it should be https://xyz),
    # you can use the following handler class, which does not allow HTTP traffic.
    #
    # It works by inheriting from HTTPHandler - so build_opener won't add a
    # handler for HTTP itself.
    #
    class HTTPSOnlyHandler(HTTPSHandler, HTTPHandler):
        def http_open(self, req):
            raise URLError('Unexpected HTTP request on what should be a secure '
                           'connection: %s' % req)

#
# XML-RPC with timeouts
#
class Transport(xmlrpclib.Transport):
    def __init__(self, timeout, use_datetime=0):
        self.timeout = timeout
        xmlrpclib.Transport.__init__(self, use_datetime)

    def make_connection(self, host):
        h, eh, x509 = self.get_host_info(host)
        if not self._connection or host != self._connection[0]:
            self._extra_headers = eh
            self._connection = host, httplib.HTTPConnection(h)
        return self._connection[1]

if ssl:
    class SafeTransport(xmlrpclib.SafeTransport):
        def __init__(self, timeout, use_datetime=0):
            self.timeout = timeout
            xmlrpclib.SafeTransport.__init__(self, use_datetime)

        def make_connection(self, host):
            h, eh, kwargs = self.get_host_info(host)
            if not kwargs:
                kwargs = {}
            kwargs['timeout'] = self.timeout
            if not self._connection or host != self._connection[0]:
                self._extra_headers = eh
                self._connection = host, httplib.HTTPSConnection(h, None,
                                                                 **kwargs)
            return self._connection[1]


class ServerProxy(xmlrpclib.ServerProxy):
    def __init__(self, uri, **kwargs):
        self.timeout = timeout = kwargs.pop('timeout', None)
        # The above classes only come into play if a timeout
        # is specified
        if timeout is not None:
            # scheme = splittype(uri)  # deprecated as of Python 3.8
            scheme = urlparse(uri)[0]
            use_datetime = kwargs.get('use_datetime', 0)
            if scheme == 'https':
                tcls = SafeTransport
            else:
                tcls = Transport
            kwargs['transport'] = t = tcls(timeout, use_datetime=use_datetime)
            self.transport = t
        xmlrpclib.ServerProxy.__init__(self, uri, **kwargs)

#
# CSV functionality. This is provided because on 2.x, the csv module can't
# handle Unicode. However, we need to deal with Unicode in e.g. RECORD files.
#

def _csv_open(fn, mode, **kwargs):
    if sys.version_info[0] < 3:
        mode += 'b'
    else:
        kwargs['newline'] = ''
        # Python 3 determines encoding from locale. Force 'utf-8'
        # file encoding to match other forced utf-8 encoding
        kwargs['encoding'] = 'utf-8'
    return open(fn, mode, **kwargs)


class CSVBase(object):
    defaults = {
        'delimiter': str(','),      # The strs are used because we need native
        'quotechar': str('"'),      # str in the csv API (2.x won't take
        'lineterminator': str('\n') # Unicode)
    }

    def __enter__(self):
        return self

    def __exit__(self, *exc_info):
        self.stream.close()


class CSVReader(CSVBase):
    def __init__(self, **kwargs):
        if 'stream' in kwargs:
            stream = kwargs['stream']
            if sys.version_info[0] >= 3:
                # needs to be a text stream
                stream = codecs.getreader('utf-8')(stream)
            self.stream = stream
        else:
            self.stream = _csv_open(kwargs['path'], 'r')
        self.reader = csv.reader(self.stream, **self.defaults)

    def __iter__(self):
        return self

    def next(self):
        result = next(self.reader)
        if sys.version_info[0] < 3:
            for i, item in enumerate(result):
                if not isinstance(item, text_type):
                    result[i] = item.decode('utf-8')
        return result

    __next__ = next

class CSVWriter(CSVBase):
    def __init__(self, fn, **kwargs):
        self.stream = _csv_open(fn, 'w')
        self.writer = csv.writer(self.stream, **self.defaults)

    def writerow(self, row):
        if sys.version_info[0] < 3:
            r = []
            for item in row:
                if isinstance(item, text_type):
                    item = item.encode('utf-8')
                r.append(item)
            row = r
        self.writer.writerow(row)

#
#   Configurator functionality
#

class Configurator(BaseConfigurator):

    value_converters = dict(BaseConfigurator.value_converters)
    value_converters['inc'] = 'inc_convert'

    def __init__(self, config, base=None):
        super(Configurator, self).__init__(config)
        self.base = base or os.getcwd()

    def configure_custom(self, config):
        def convert(o):
            if isinstance(o, (list, tuple)):
                result = type(o)([convert(i) for i in o])
            elif isinstance(o, dict):
                if '()' in o:
                    result = self.configure_custom(o)
                else:
                    result = {}
                    for k in o:
                        result[k] = convert(o[k])
            else:
                result = self.convert(o)
            return result

        c = config.pop('()')
        if not callable(c):
            c = self.resolve(c)
        props = config.pop('.', None)
        # Check for valid identifiers
        args = config.pop('[]', ())
        if args:
            args = tuple([convert(o) for o in args])
        items = [(k, convert(config[k])) for k in config if valid_ident(k)]
        kwargs = dict(items)
        result = c(*args, **kwargs)
        if props:
            for n, v in props.items():
                setattr(result, n, convert(v))
        return result

    def __getitem__(self, key):
        result = self.config[key]
        if isinstance(result, dict) and '()' in result:
            self.config[key] = result = self.configure_custom(result)
        return result

    def inc_convert(self, value):
        """Default converter for the inc:// protocol."""
        if not os.path.isabs(value):
            value = os.path.join(self.base, value)
        with codecs.open(value, 'r', encoding='utf-8') as f:
            result = json.load(f)
        return result


class SubprocessMixin(object):
    """
    Mixin for running subprocesses and capturing their output
    """
    def __init__(self, verbose=False, progress=None):
        self.verbose = verbose
        self.progress = progress

    def reader(self, stream, context):
        """
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        """
        progress = self.progress
        verbose = self.verbose
        while True:
            s = stream.readline()
            if not s:
                break
            if progress is not None:
                progress(s, context)
            else:
                if not verbose:
                    sys.stderr.write('.')
                else:
                    sys.stderr.write(s.decode('utf-8'))
                sys.stderr.flush()
        stream.close()

    def run_command(self, cmd, **kwargs):
        p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE, **kwargs)
        t1 = threading.Thread(target=self.reader, args=(p.stdout, 'stdout'))
        t1.start()
        t2 = threading.Thread(target=self.reader, args=(p.stderr, 'stderr'))
        t2.start()
        p.wait()
        t1.join()
        t2.join()
        if self.progress is not None:
            self.progress('done.', 'main')
        elif self.verbose:
            sys.stderr.write('done.\n')
        return p


def normalize_name(name):
    """Normalize a python package name a la PEP 503"""
    # https://www.python.org/dev/peps/pep-0503/#normalized-names
    return re.sub('[-_.]+', '-', name).lower()

# def _get_pypirc_command():
    # """
    # Get the distutils command for interacting with PyPI configurations.
    # :return: the command.
    # """
    # from distutils.core import Distribution
    # from distutils.config import PyPIRCCommand
    # d = Distribution()
    # return PyPIRCCommand(d)

class PyPIRCFile(object):

    DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/'
    DEFAULT_REALM = 'pypi'

    def __init__(self, fn=None, url=None):
        if fn is None:
            fn = os.path.join(os.path.expanduser('~'), '.pypirc')
        self.filename = fn
        self.url = url

    def read(self):
        result = {}

        if os.path.exists(self.filename):
            repository = self.url or self.DEFAULT_REPOSITORY

            config = configparser.RawConfigParser()
            config.read(self.filename)
            sections = config.sections()
            if 'distutils' in sections:
                # let's get the list of servers
                index_servers = config.get('distutils', 'index-servers')
                _servers = [server.strip() for server in
                            index_servers.split('\n')
                            if server.strip() != '']
                if _servers == []:
                    # nothing set, let's try to get the default pypi
                    if 'pypi' in sections:
                        _servers = ['pypi']
                else:
                    for server in _servers:
                        result = {'server': server}
                        result['username'] = config.get(server, 'username')

                        # optional params
                        for key, default in (('repository', self.DEFAULT_REPOSITORY),
                                             ('realm', self.DEFAULT_REALM),
                                             ('password', None)):
                            if config.has_option(server, key):
                                result[key] = config.get(server, key)
                            else:
                                result[key] = default

                        # work around people having "repository" for the "pypi"
                        # section of their config set to the HTTP (rather than
                        # HTTPS) URL
                        if (server == 'pypi' and
                            repository in (self.DEFAULT_REPOSITORY, 'pypi')):
                            result['repository'] = self.DEFAULT_REPOSITORY
                        elif (result['server'] != repository and
                              result['repository'] != repository):
                            result = {}
            elif 'server-login' in sections:
                # old format
                server = 'server-login'
                if config.has_option(server, 'repository'):
                    repository = config.get(server, 'repository')
                else:
                    repository = self.DEFAULT_REPOSITORY
                result = {
                    'username': config.get(server, 'username'),
                    'password': config.get(server, 'password'),
                    'repository': repository,
                    'server': server,
                    'realm': self.DEFAULT_REALM
                }
        return result

    def update(self, username, password):
        # import pdb; pdb.set_trace()
        config = configparser.RawConfigParser()
        fn = self.filename
        config.read(fn)
        if not config.has_section('pypi'):
            config.add_section('pypi')
        config.set('pypi', 'username', username)
        config.set('pypi', 'password', password)
        with open(fn, 'w') as f:
            config.write(f)

def _load_pypirc(index):
    """
    Read the PyPI access configuration as supported by distutils.
    """
    return PyPIRCFile(url=index.url).read()

def _store_pypirc(index):
    PyPIRCFile().update(index.username, index.password)

#
# get_platform()/get_host_platform() copied from Python 3.10.a0 source, with some minor
# tweaks
#

def get_host_platform():
    """Return a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
    distributions.  Typically includes the OS name and version and the
    architecture (as supplied by 'os.uname()'), although the exact information
    included depends on the OS; eg. on Linux, the kernel version isn't
    particularly important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.

    """
    if os.name == 'nt':
        if 'amd64' in sys.version.lower():
            return 'win-amd64'
        if '(arm)' in sys.version.lower():
            return 'win-arm32'
        if '(arm64)' in sys.version.lower():
            return 'win-arm64'
        return sys.platform

    # Set for cross builds explicitly
    if "_PYTHON_HOST_PLATFORM" in os.environ:
        return os.environ["_PYTHON_HOST_PLATFORM"]

    if os.name != 'posix' or not hasattr(os, 'uname'):
        # XXX what about the architecture? NT is Intel or Alpha,
        # Mac OS is M68k or PPC, etc.
        return sys.platform

    # Try to distinguish various flavours of Unix

    (osname, host, release, version, machine) = os.uname()

    # Convert the OS name to lowercase, remove '/' characters, and translate
    # spaces (for "Power Macintosh")
    osname = osname.lower().replace('/', '')
    machine = machine.replace(' ', '_').replace('/', '-')

    if osname[:5] == 'linux':
        # At least on Linux/Intel, 'machine' is the processor --
        # i386, etc.
        # XXX what about Alpha, SPARC, etc?
        return  "%s-%s" % (osname, machine)

    elif osname[:5] == 'sunos':
        if release[0] >= '5':           # SunOS 5 == Solaris 2
            osname = 'solaris'
            release = '%d.%s' % (int(release[0]) - 3, release[2:])
            # We can't use 'platform.architecture()[0]' because a
            # bootstrap problem. We use a dict to get an error
            # if some suspicious happens.
            bitness = {2147483647:'32bit', 9223372036854775807:'64bit'}
            machine += '.%s' % bitness[sys.maxsize]
        # fall through to standard osname-release-machine representation
    elif osname[:3] == 'aix':
        from _aix_support import aix_platform
        return aix_platform()
    elif osname[:6] == 'cygwin':
        osname = 'cygwin'
        rel_re = re.compile (r'[\d.]+', re.ASCII)
        m = rel_re.match(release)
        if m:
            release = m.group()
    elif osname[:6] == 'darwin':
        import _osx_support, distutils.sysconfig
        osname, release, machine = _osx_support.get_platform_osx(
                                        distutils.sysconfig.get_config_vars(),
                                        osname, release, machine)

    return '%s-%s-%s' % (osname, release, machine)


_TARGET_TO_PLAT = {
    'x86' : 'win32',
    'x64' : 'win-amd64',
    'arm' : 'win-arm32',
}


def get_platform():
    if os.name != 'nt':
        return get_host_platform()
    cross_compilation_target = os.environ.get('VSCMD_ARG_TGT_ARCH')
    if cross_compilation_target not in _TARGET_TO_PLAT:
        return get_host_platform()
    return _TARGET_TO_PLAT[cross_compilation_target]
python3.12/site-packages/pip/_vendor/tomli/_parser.py000064400000054151151732701640016502 0ustar00# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

from __future__ import annotations

from collections.abc import Iterable
import string
from types import MappingProxyType
from typing import Any, BinaryIO, NamedTuple

from ._re import (
    RE_DATETIME,
    RE_LOCALTIME,
    RE_NUMBER,
    match_to_datetime,
    match_to_localtime,
    match_to_number,
)
from ._types import Key, ParseFloat, Pos

ASCII_CTRL = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))

# Neither of these sets include quotation mark or backslash. They are
# currently handled as separate cases in the parser functions.
ILLEGAL_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t")
ILLEGAL_MULTILINE_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t\n")

ILLEGAL_LITERAL_STR_CHARS = ILLEGAL_BASIC_STR_CHARS
ILLEGAL_MULTILINE_LITERAL_STR_CHARS = ILLEGAL_MULTILINE_BASIC_STR_CHARS

ILLEGAL_COMMENT_CHARS = ILLEGAL_BASIC_STR_CHARS

TOML_WS = frozenset(" \t")
TOML_WS_AND_NEWLINE = TOML_WS | frozenset("\n")
BARE_KEY_CHARS = frozenset(string.ascii_letters + string.digits + "-_")
KEY_INITIAL_CHARS = BARE_KEY_CHARS | frozenset("\"'")
HEXDIGIT_CHARS = frozenset(string.hexdigits)

BASIC_STR_ESCAPE_REPLACEMENTS = MappingProxyType(
    {
        "\\b": "\u0008",  # backspace
        "\\t": "\u0009",  # tab
        "\\n": "\u000A",  # linefeed
        "\\f": "\u000C",  # form feed
        "\\r": "\u000D",  # carriage return
        '\\"': "\u0022",  # quote
        "\\\\": "\u005C",  # backslash
    }
)


class TOMLDecodeError(ValueError):
    """An error raised if a document is not valid TOML."""


def load(__fp: BinaryIO, *, parse_float: ParseFloat = float) -> dict[str, Any]:
    """Parse TOML from a binary file object."""
    b = __fp.read()
    try:
        s = b.decode()
    except AttributeError:
        raise TypeError(
            "File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
        ) from None
    return loads(s, parse_float=parse_float)


def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]:  # noqa: C901
    """Parse TOML from a string."""

    # The spec allows converting "\r\n" to "\n", even in string
    # literals. Let's do so to simplify parsing.
    src = __s.replace("\r\n", "\n")
    pos = 0
    out = Output(NestedDict(), Flags())
    header: Key = ()
    parse_float = make_safe_parse_float(parse_float)

    # Parse one statement at a time
    # (typically means one line in TOML source)
    while True:
        # 1. Skip line leading whitespace
        pos = skip_chars(src, pos, TOML_WS)

        # 2. Parse rules. Expect one of the following:
        #    - end of file
        #    - end of line
        #    - comment
        #    - key/value pair
        #    - append dict to list (and move to its namespace)
        #    - create dict (and move to its namespace)
        # Skip trailing whitespace when applicable.
        try:
            char = src[pos]
        except IndexError:
            break
        if char == "\n":
            pos += 1
            continue
        if char in KEY_INITIAL_CHARS:
            pos = key_value_rule(src, pos, out, header, parse_float)
            pos = skip_chars(src, pos, TOML_WS)
        elif char == "[":
            try:
                second_char: str | None = src[pos + 1]
            except IndexError:
                second_char = None
            out.flags.finalize_pending()
            if second_char == "[":
                pos, header = create_list_rule(src, pos, out)
            else:
                pos, header = create_dict_rule(src, pos, out)
            pos = skip_chars(src, pos, TOML_WS)
        elif char != "#":
            raise suffixed_err(src, pos, "Invalid statement")

        # 3. Skip comment
        pos = skip_comment(src, pos)

        # 4. Expect end of line or end of file
        try:
            char = src[pos]
        except IndexError:
            break
        if char != "\n":
            raise suffixed_err(
                src, pos, "Expected newline or end of document after a statement"
            )
        pos += 1

    return out.data.dict


class Flags:
    """Flags that map to parsed keys/namespaces."""

    # Marks an immutable namespace (inline array or inline table).
    FROZEN = 0
    # Marks a nest that has been explicitly created and can no longer
    # be opened using the "[table]" syntax.
    EXPLICIT_NEST = 1

    def __init__(self) -> None:
        self._flags: dict[str, dict] = {}
        self._pending_flags: set[tuple[Key, int]] = set()

    def add_pending(self, key: Key, flag: int) -> None:
        self._pending_flags.add((key, flag))

    def finalize_pending(self) -> None:
        for key, flag in self._pending_flags:
            self.set(key, flag, recursive=False)
        self._pending_flags.clear()

    def unset_all(self, key: Key) -> None:
        cont = self._flags
        for k in key[:-1]:
            if k not in cont:
                return
            cont = cont[k]["nested"]
        cont.pop(key[-1], None)

    def set(self, key: Key, flag: int, *, recursive: bool) -> None:  # noqa: A003
        cont = self._flags
        key_parent, key_stem = key[:-1], key[-1]
        for k in key_parent:
            if k not in cont:
                cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
            cont = cont[k]["nested"]
        if key_stem not in cont:
            cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
        cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)

    def is_(self, key: Key, flag: int) -> bool:
        if not key:
            return False  # document root has no flags
        cont = self._flags
        for k in key[:-1]:
            if k not in cont:
                return False
            inner_cont = cont[k]
            if flag in inner_cont["recursive_flags"]:
                return True
            cont = inner_cont["nested"]
        key_stem = key[-1]
        if key_stem in cont:
            cont = cont[key_stem]
            return flag in cont["flags"] or flag in cont["recursive_flags"]
        return False


class NestedDict:
    def __init__(self) -> None:
        # The parsed content of the TOML document
        self.dict: dict[str, Any] = {}

    def get_or_create_nest(
        self,
        key: Key,
        *,
        access_lists: bool = True,
    ) -> dict:
        cont: Any = self.dict
        for k in key:
            if k not in cont:
                cont[k] = {}
            cont = cont[k]
            if access_lists and isinstance(cont, list):
                cont = cont[-1]
            if not isinstance(cont, dict):
                raise KeyError("There is no nest behind this key")
        return cont

    def append_nest_to_list(self, key: Key) -> None:
        cont = self.get_or_create_nest(key[:-1])
        last_key = key[-1]
        if last_key in cont:
            list_ = cont[last_key]
            if not isinstance(list_, list):
                raise KeyError("An object other than list found behind this key")
            list_.append({})
        else:
            cont[last_key] = [{}]


class Output(NamedTuple):
    data: NestedDict
    flags: Flags


def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
    try:
        while src[pos] in chars:
            pos += 1
    except IndexError:
        pass
    return pos


def skip_until(
    src: str,
    pos: Pos,
    expect: str,
    *,
    error_on: frozenset[str],
    error_on_eof: bool,
) -> Pos:
    try:
        new_pos = src.index(expect, pos)
    except ValueError:
        new_pos = len(src)
        if error_on_eof:
            raise suffixed_err(src, new_pos, f"Expected {expect!r}") from None

    if not error_on.isdisjoint(src[pos:new_pos]):
        while src[pos] not in error_on:
            pos += 1
        raise suffixed_err(src, pos, f"Found invalid character {src[pos]!r}")
    return new_pos


def skip_comment(src: str, pos: Pos) -> Pos:
    try:
        char: str | None = src[pos]
    except IndexError:
        char = None
    if char == "#":
        return skip_until(
            src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
        )
    return pos


def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
    while True:
        pos_before_skip = pos
        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
        pos = skip_comment(src, pos)
        if pos == pos_before_skip:
            return pos


def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
    pos += 1  # Skip "["
    pos = skip_chars(src, pos, TOML_WS)
    pos, key = parse_key(src, pos)

    if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
        raise suffixed_err(src, pos, f"Cannot declare {key} twice")
    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
    try:
        out.data.get_or_create_nest(key)
    except KeyError:
        raise suffixed_err(src, pos, "Cannot overwrite a value") from None

    if not src.startswith("]", pos):
        raise suffixed_err(src, pos, "Expected ']' at the end of a table declaration")
    return pos + 1, key


def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
    pos += 2  # Skip "[["
    pos = skip_chars(src, pos, TOML_WS)
    pos, key = parse_key(src, pos)

    if out.flags.is_(key, Flags.FROZEN):
        raise suffixed_err(src, pos, f"Cannot mutate immutable namespace {key}")
    # Free the namespace now that it points to another empty list item...
    out.flags.unset_all(key)
    # ...but this key precisely is still prohibited from table declaration
    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
    try:
        out.data.append_nest_to_list(key)
    except KeyError:
        raise suffixed_err(src, pos, "Cannot overwrite a value") from None

    if not src.startswith("]]", pos):
        raise suffixed_err(src, pos, "Expected ']]' at the end of an array declaration")
    return pos + 2, key


def key_value_rule(
    src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
) -> Pos:
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
    key_parent, key_stem = key[:-1], key[-1]
    abs_key_parent = header + key_parent

    relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
    for cont_key in relative_path_cont_keys:
        # Check that dotted key syntax does not redefine an existing table
        if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
            raise suffixed_err(src, pos, f"Cannot redefine namespace {cont_key}")
        # Containers in the relative path can't be opened with the table syntax or
        # dotted key/value syntax in following table sections.
        out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)

    if out.flags.is_(abs_key_parent, Flags.FROZEN):
        raise suffixed_err(
            src, pos, f"Cannot mutate immutable namespace {abs_key_parent}"
        )

    try:
        nest = out.data.get_or_create_nest(abs_key_parent)
    except KeyError:
        raise suffixed_err(src, pos, "Cannot overwrite a value") from None
    if key_stem in nest:
        raise suffixed_err(src, pos, "Cannot overwrite a value")
    # Mark inline table and array namespaces recursively immutable
    if isinstance(value, (dict, list)):
        out.flags.set(header + key, Flags.FROZEN, recursive=True)
    nest[key_stem] = value
    return pos


def parse_key_value_pair(
    src: str, pos: Pos, parse_float: ParseFloat
) -> tuple[Pos, Key, Any]:
    pos, key = parse_key(src, pos)
    try:
        char: str | None = src[pos]
    except IndexError:
        char = None
    if char != "=":
        raise suffixed_err(src, pos, "Expected '=' after a key in a key/value pair")
    pos += 1
    pos = skip_chars(src, pos, TOML_WS)
    pos, value = parse_value(src, pos, parse_float)
    return pos, key, value


def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
    pos, key_part = parse_key_part(src, pos)
    key: Key = (key_part,)
    pos = skip_chars(src, pos, TOML_WS)
    while True:
        try:
            char: str | None = src[pos]
        except IndexError:
            char = None
        if char != ".":
            return pos, key
        pos += 1
        pos = skip_chars(src, pos, TOML_WS)
        pos, key_part = parse_key_part(src, pos)
        key += (key_part,)
        pos = skip_chars(src, pos, TOML_WS)


def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
    try:
        char: str | None = src[pos]
    except IndexError:
        char = None
    if char in BARE_KEY_CHARS:
        start_pos = pos
        pos = skip_chars(src, pos, BARE_KEY_CHARS)
        return pos, src[start_pos:pos]
    if char == "'":
        return parse_literal_str(src, pos)
    if char == '"':
        return parse_one_line_basic_str(src, pos)
    raise suffixed_err(src, pos, "Invalid initial character for a key part")


def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
    pos += 1
    return parse_basic_str(src, pos, multiline=False)


def parse_array(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, list]:
    pos += 1
    array: list = []

    pos = skip_comments_and_array_ws(src, pos)
    if src.startswith("]", pos):
        return pos + 1, array
    while True:
        pos, val = parse_value(src, pos, parse_float)
        array.append(val)
        pos = skip_comments_and_array_ws(src, pos)

        c = src[pos : pos + 1]
        if c == "]":
            return pos + 1, array
        if c != ",":
            raise suffixed_err(src, pos, "Unclosed array")
        pos += 1

        pos = skip_comments_and_array_ws(src, pos)
        if src.startswith("]", pos):
            return pos + 1, array


def parse_inline_table(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, dict]:
    pos += 1
    nested_dict = NestedDict()
    flags = Flags()

    pos = skip_chars(src, pos, TOML_WS)
    if src.startswith("}", pos):
        return pos + 1, nested_dict.dict
    while True:
        pos, key, value = parse_key_value_pair(src, pos, parse_float)
        key_parent, key_stem = key[:-1], key[-1]
        if flags.is_(key, Flags.FROZEN):
            raise suffixed_err(src, pos, f"Cannot mutate immutable namespace {key}")
        try:
            nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
        except KeyError:
            raise suffixed_err(src, pos, "Cannot overwrite a value") from None
        if key_stem in nest:
            raise suffixed_err(src, pos, f"Duplicate inline table key {key_stem!r}")
        nest[key_stem] = value
        pos = skip_chars(src, pos, TOML_WS)
        c = src[pos : pos + 1]
        if c == "}":
            return pos + 1, nested_dict.dict
        if c != ",":
            raise suffixed_err(src, pos, "Unclosed inline table")
        if isinstance(value, (dict, list)):
            flags.set(key, Flags.FROZEN, recursive=True)
        pos += 1
        pos = skip_chars(src, pos, TOML_WS)


def parse_basic_str_escape(
    src: str, pos: Pos, *, multiline: bool = False
) -> tuple[Pos, str]:
    escape_id = src[pos : pos + 2]
    pos += 2
    if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
        # Skip whitespace until next non-whitespace character or end of
        # the doc. Error if non-whitespace is found before newline.
        if escape_id != "\\\n":
            pos = skip_chars(src, pos, TOML_WS)
            try:
                char = src[pos]
            except IndexError:
                return pos, ""
            if char != "\n":
                raise suffixed_err(src, pos, "Unescaped '\\' in a string")
            pos += 1
        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
        return pos, ""
    if escape_id == "\\u":
        return parse_hex_char(src, pos, 4)
    if escape_id == "\\U":
        return parse_hex_char(src, pos, 8)
    try:
        return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
    except KeyError:
        raise suffixed_err(src, pos, "Unescaped '\\' in a string") from None


def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
    return parse_basic_str_escape(src, pos, multiline=True)


def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
    hex_str = src[pos : pos + hex_len]
    if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
        raise suffixed_err(src, pos, "Invalid hex value")
    pos += hex_len
    hex_int = int(hex_str, 16)
    if not is_unicode_scalar_value(hex_int):
        raise suffixed_err(src, pos, "Escaped character is not a Unicode scalar value")
    return pos, chr(hex_int)


def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
    pos += 1  # Skip starting apostrophe
    start_pos = pos
    pos = skip_until(
        src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
    )
    return pos + 1, src[start_pos:pos]  # Skip ending apostrophe


def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
    pos += 3
    if src.startswith("\n", pos):
        pos += 1

    if literal:
        delim = "'"
        end_pos = skip_until(
            src,
            pos,
            "'''",
            error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
            error_on_eof=True,
        )
        result = src[pos:end_pos]
        pos = end_pos + 3
    else:
        delim = '"'
        pos, result = parse_basic_str(src, pos, multiline=True)

    # Add at maximum two extra apostrophes/quotes if the end sequence
    # is 4 or 5 chars long instead of just 3.
    if not src.startswith(delim, pos):
        return pos, result
    pos += 1
    if not src.startswith(delim, pos):
        return pos, result + delim
    pos += 1
    return pos, result + (delim * 2)


def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
    if multiline:
        error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
        parse_escapes = parse_basic_str_escape_multiline
    else:
        error_on = ILLEGAL_BASIC_STR_CHARS
        parse_escapes = parse_basic_str_escape
    result = ""
    start_pos = pos
    while True:
        try:
            char = src[pos]
        except IndexError:
            raise suffixed_err(src, pos, "Unterminated string") from None
        if char == '"':
            if not multiline:
                return pos + 1, result + src[start_pos:pos]
            if src.startswith('"""', pos):
                return pos + 3, result + src[start_pos:pos]
            pos += 1
            continue
        if char == "\\":
            result += src[start_pos:pos]
            pos, parsed_escape = parse_escapes(src, pos)
            result += parsed_escape
            start_pos = pos
            continue
        if char in error_on:
            raise suffixed_err(src, pos, f"Illegal character {char!r}")
        pos += 1


def parse_value(  # noqa: C901
    src: str, pos: Pos, parse_float: ParseFloat
) -> tuple[Pos, Any]:
    try:
        char: str | None = src[pos]
    except IndexError:
        char = None

    # IMPORTANT: order conditions based on speed of checking and likelihood

    # Basic strings
    if char == '"':
        if src.startswith('"""', pos):
            return parse_multiline_str(src, pos, literal=False)
        return parse_one_line_basic_str(src, pos)

    # Literal strings
    if char == "'":
        if src.startswith("'''", pos):
            return parse_multiline_str(src, pos, literal=True)
        return parse_literal_str(src, pos)

    # Booleans
    if char == "t":
        if src.startswith("true", pos):
            return pos + 4, True
    if char == "f":
        if src.startswith("false", pos):
            return pos + 5, False

    # Arrays
    if char == "[":
        return parse_array(src, pos, parse_float)

    # Inline tables
    if char == "{":
        return parse_inline_table(src, pos, parse_float)

    # Dates and times
    datetime_match = RE_DATETIME.match(src, pos)
    if datetime_match:
        try:
            datetime_obj = match_to_datetime(datetime_match)
        except ValueError as e:
            raise suffixed_err(src, pos, "Invalid date or datetime") from e
        return datetime_match.end(), datetime_obj
    localtime_match = RE_LOCALTIME.match(src, pos)
    if localtime_match:
        return localtime_match.end(), match_to_localtime(localtime_match)

    # Integers and "normal" floats.
    # The regex will greedily match any type starting with a decimal
    # char, so needs to be located after handling of dates and times.
    number_match = RE_NUMBER.match(src, pos)
    if number_match:
        return number_match.end(), match_to_number(number_match, parse_float)

    # Special floats
    first_three = src[pos : pos + 3]
    if first_three in {"inf", "nan"}:
        return pos + 3, parse_float(first_three)
    first_four = src[pos : pos + 4]
    if first_four in {"-inf", "+inf", "-nan", "+nan"}:
        return pos + 4, parse_float(first_four)

    raise suffixed_err(src, pos, "Invalid value")


def suffixed_err(src: str, pos: Pos, msg: str) -> TOMLDecodeError:
    """Return a `TOMLDecodeError` where error message is suffixed with
    coordinates in source."""

    def coord_repr(src: str, pos: Pos) -> str:
        if pos >= len(src):
            return "end of document"
        line = src.count("\n", 0, pos) + 1
        if line == 1:
            column = pos + 1
        else:
            column = pos - src.rindex("\n", 0, pos)
        return f"line {line}, column {column}"

    return TOMLDecodeError(f"{msg} (at {coord_repr(src, pos)})")


def is_unicode_scalar_value(codepoint: int) -> bool:
    return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)


def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
    """A decorator to make `parse_float` safe.

    `parse_float` must not return dicts or lists, because these types
    would be mixed with parsed TOML tables and arrays, thus confusing
    the parser. The returned decorated callable raises `ValueError`
    instead of returning illegal types.
    """
    # The default `float` callable never returns illegal types. Optimize it.
    if parse_float is float:  # type: ignore[comparison-overlap]
        return float

    def safe_parse_float(float_str: str) -> Any:
        float_value = parse_float(float_str)
        if isinstance(float_value, (dict, list)):
            raise ValueError("parse_float must not return dicts or lists")
        return float_value

    return safe_parse_float
python3.12/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-312.pyc000064400000000637151732701640022713 0ustar00�

R`i���:�ddlmZmZmZeegefZeedfZeZy)�)�Any�Callable�Tuple.N)	�typingrrr�str�
ParseFloat�Key�int�Pos����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tomli/_types.py�<module>rs1��
(�'��s�e�S�j�
!�
��C��H�o��	�r
python3.12/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-312.pyc000064400000000661151732701640023144 0ustar00�

R`i���.�dZdZddlmZmZmZee_y))�loads�load�TOMLDecodeErrorz2.0.1�)rrrN)�__all__�__version__�_parserrrr�__name__�
__module__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tomli/__init__.py�<module>rs!��
/����1�1�&��rpython3.12/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-312.pyc000064400000064504151732701640023046 0ustar00�

R`iiX�
�H�ddlmZddlmZddlZddlmZddlmZm	Z	m
Z
ddlmZm
Z
mZmZmZmZddlmZmZmZed	�ed
�D��eed��zZeed�z
Zeed
�z
ZeZeZeZed�Zeed�zZ eejBejDzdz�Z#e#ed�zZ$eejJ�Z&edddddddd��Z'Gd�de(�Z)e*d�d<d�Z+e*d�d=d�Z,Gd�d�Z-Gd�d �Z.Gd!�d"e
�Z/d>d#�Z0												d?d$�Z1d@d%�Z2d@d&�Z3dAd'�Z4dAd(�Z5												dBd)�Z6								dCd*�Z7dDd+�Z8dEd,�Z9dEd-�Z:dFd.�Z;dGd/�Z<d0d1�							dHd2�Z=dEd3�Z>dId4�Z?dEd5�Z@dJd6�ZAdHd7�ZB								dKd8�ZCdLd9�ZDdMd:�ZEdNd;�ZFy)O�)�annotations)�IterableN)�MappingProxyType)�Any�BinaryIO�
NamedTuple�)�RE_DATETIME�RE_LOCALTIME�	RE_NUMBER�match_to_datetime�match_to_localtime�match_to_number)�Key�
ParseFloat�Posc#�2K�|]}t|����y�w�N)�chr)�.0�is  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tomli/_parser.py�	<genexpr>rs����1�y�!�s�1�v�y�s�� ��	z	
z 	�
z-_z"'���
�"�\)z\bz\tz\nz\fz\rz\"z\\c��eZdZdZy)�TOMLDecodeErrorz0An error raised if a document is not valid TOML.N)�__name__�
__module__�__qualname__�__doc__��rr$r$5s��:r*r$��parse_floatc��|j�}	|j�}t	||��S#t$r
td�d�wxYw)z%Parse TOML from a binary file object.zEFile must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`Nr+)�read�decode�AttributeError�	TypeError�loads)�__fpr,�b�ss    r�loadr69sP���	�	��A��
�H�H�J��
���,�,��	���S�
��	��s	�/�Ac��|jdd�}d}tt�t��}d}t	|�}	t||t�}	||}|dk(r|dz
}�#|tvr!t|||||�}t||t�}nr|dk(r[	||dz}|jj�|dk(rt|||�\}}nt|||�\}}t||t�}n|dk7r
t||d	��t||�}	||}|dk7r
t||d
��|dz
}��#t$rY|j j"SwxYw#t$rd}Y��wxYw#t$rY|j j"SwxYw)zParse TOML from a string.z
rrr)r	�[N�#zInvalid statementz5Expected newline or end of document after a statement)�replace�Output�
NestedDict�Flags�make_safe_parse_float�
skip_chars�TOML_WS�
IndexError�KEY_INITIAL_CHARS�key_value_rule�flags�finalize_pending�create_list_rule�create_dict_rule�suffixed_err�skip_comment�data�dict)�__sr,�src�pos�out�header�char�second_chars        rr2r2Es���
�+�+�f�d�
#�C�
�C�
���u�w�
'�C��F�'��4�K����c�7�+��	��s�8�D��4�<��1�H�C���$�$� ��c�3���D�C��S�#�w�/�C�
�S�[�
#�*-�c�A�g�,��
�I�I�&�&�(��c�!�.�s�C��=���V�.�s�C��=���V��S�#�w�/�C�
�S�[��s�C�)<�=�=��3��$��	��s�8�D��4�<���S�Q��
�	�q���a���	��F�8�8�=�=��I	���
#�"��
#��"�	���8�8�=�=��	�s6�D&�E
�	E�&	E�E�
E�E�	E<�;E<c�H�eZdZdZdZdZdd�Zdd�Zdd�Zd
d�Z	dd�Z
dd	�Zy
)r=z)Flags that map to parsed keys/namespaces.rr	c�0�i|_t�|_yr)�_flags�set�_pending_flags��selfs r�__init__zFlags.__init__�s��')���47�E��r*c�>�|jj||f�yr)rW�add�rY�key�flags   r�add_pendingzFlags.add_pending�s��������d��,r*c��|jD]\}}|j||d���|jj�y)NF��	recursive)rWrV�clearr]s   rrEzFlags.finalize_pending�s:���,�,�I�C���H�H�S�$�%�H�0�-����!�!�#r*c�v�|j}|ddD]}||vry||d}�|j|dd�y)N����nested)rU�pop)rYr^�cont�ks    r�	unset_allzFlags.unset_all�sG���{�{���S�b��A���}����7�8�$�D��	
����R��$�r*c��|j}|dd|d}}|D]'}||vrt�t�id�||<||d}�)||vrt�t�id�||<|||rdndj|�y)Nrf)rD�recursive_flagsrgrgrmrD)rUrVr\)rYr^r_rcri�
key_parent�key_stemrjs        rrVz	Flags.set�s����{�{��"�3�B�x��R��H�
��A���}�$'�E�c�e�r�R��Q����7�8�$�D���4��'*�u���RT�U�D��N��X��I�(�7�C�G�G��Mr*c��|sy|j}|ddD]}||vry||}||dvry|d}�|d}||vr||}||dvxs||dvSy)NFrfrmTrgrD)rU)rYr^r_rirj�
inner_contros       r�is_z	Flags.is_�s������{�{���S�b��A���}���a��J��z�"3�4�4���h�'�D�
��r�7���t����>�D��4��=�(�K�D�D�9J�4K�,K�K�r*N��return�None)r^rr_�intrtru�r^rrtru)r^rr_rvrc�boolrtru)r^rr_rvrtrx)r%r&r'r(�FROZEN�
EXPLICIT_NESTrZr`rErkrVrrr)r*rr=r=�s2��3��F��M�:�-�$�
 �	N�r*r=c�4�eZdZdd�Zdd�					dd�Zd	d�Zy)
r<c��i|_yr)rKrXs rrZzNestedDict.__init__�s	��$&��	r*T��access_listsc��|j}|D]B}||vri||<||}|rt|t�r|d}t|t�r�9td��|S)Nrfz There is no nest behind this key)rK�
isinstance�list�KeyError)rYr^r~rirjs     r�get_or_create_nestzNestedDict.get_or_create_nest�sb���I�I���A���}���Q����7�D��
�4�� 6��B�x���d�D�)��A�B�B���r*c��|j|dd�}|d}||vr2||}t|t�std��|j	i�yig||<y)Nrfz/An object other than list found behind this key)r�r�r�r��append)rYr^ri�last_key�list_s     r�append_nest_to_listzNestedDict.append_nest_to_list�s_���&�&�s�3�B�x�0���r�7���t����N�E��e�T�*��P�Q�Q��L�L��� �T�D��Nr*Nrs)r^rr~rxrtrKrw)r%r&r'rZr�r�r)r*rr<r<�s2��'�"�	�
���	�

��"	"r*r<c�"�eZdZUded<ded<y)r;r<rJr=rDN)r%r&r'�__annotations__r)r*rr;r;�s
��
���Lr*r;c�P�	|||vr
|dz
}|||vr�
|S#t$rY|SwxYw)Nr	)rA)rMrN�charss   rr?r?�sJ��
��#�h�%���1�H�C��#�h�%���J���
���J�
�s��	%�%c��	|j||�}|j	|||�s'|||vr
|dz
}|||vr�
t||d||����|S#t$r!t|�}|rt||d|���d�Y�fwxYw)Nz	Expected r	zFound invalid character )�index�
ValueError�lenrH�
isdisjoint)rMrN�expect�error_on�error_on_eof�new_poss      r�
skip_untilr��s���O��)�)�F�C�(�����s�3�w�/�0��#�h�h�&��1�H�C��#�h�h�&��3��'?��C��|�%L�M�M��N���O��c�(����s�G�y��
�-C�D�$�N��O�s�A�'A;�:A;c�l�	||}|dk(rt||dzdtd��S|S#t$rd}Y�+wxYw)Nr9r	rF�r�r�)rAr��ILLEGAL_COMMENT_CHARS)rMrNrQs   rrIrIsS����s�8���s�{����q��$�)>�U�
�	
��J��
�����s�%�3�3c�R�	|}t||t�}t||�}||k(r|S�'r)r?�TOML_WS_AND_NEWLINErI)rMrN�pos_before_skips   r�skip_comments_and_array_wsr�s7��
�����c�#6�7���3��$���/�!��J�r*c�(�|dz
}t||t�}t||�\}}|jj	|t
j�s*|jj	|t
j�rt||d|�d���|jj|t
jd��	|jj|�|jd|�s
t||d��|dz|fS#t$rt||d�d�wxYw)	Nr	zCannot declare z twiceFrb�Cannot overwrite a value�]z.Expected ']' at the end of a table declaration)r?r@�	parse_keyrDrrr=rzryrHrVrJr�r��
startswith�rMrNrOr^s    rrGrGs����1�H�C�
�S�#�w�
'�C���c�"�H�C��
�y�y�}�}�S�%�-�-�.�#�)�)�-�-��U�\�\�2R��3���s�e�6�%B�C�C��I�I�M�M�#�u�*�*�e�M�<�K����#�#�C�(��>�>�#�s�#��3��%U�V�V���7�C�<����K��3��%?�@�d�J�K�s�8C9�9Dc��|dz
}t||t�}t||�\}}|jj	|t
j�rt||d|����|jj|�|jj|t
jd��	|jj|�|jd|�s
t||d��|dz|fS#t$rt||d�d�wxYw)N��"Cannot mutate immutable namespace Frbr�z]]z0Expected ']]' at the end of an array declaration)r?r@r�rDrrr=ryrHrkrVrzrJr�r�r�r�s    rrFrF.s����1�H�C�
�S�#�w�
'�C���c�"�H�C��
�y�y�}�}�S�%�,�,�'��3��'I�#��%O�P�P��I�I������I�I�M�M�#�u�*�*�e�M�<�K����$�$�S�)��>�>�$��$��3��%W�X�X���7�C�<����K��3��%?�@�d�J�K�s�(C)�)Dc����t|||�\}�}�dd�d}}�|z}��fd�tdt���D�}	|	D]f}
|jj	|
t
j�rt||d|
����|jj|
t
j��h|jj	|t
j�rt||d|����	|jj|�}||vr
t||d��t|ttf�r/|jj!��zt
jd��|||<|S#t$rt||d�d�wxYw)	Nrfc3�.�K�|]}��d|z���y�wrr))rrrPr^s  ��rrz!key_value_rule.<locals>.<genexpr>Js�����L�9K�A�v��B�Q��/�9K�s�r	zCannot redefine namespace r�r�Trb)�parse_key_value_pair�ranger�rDrrr=rzrHr`ryrJr�r�r�rKr�rV)
rMrNrOrPr,�valuernro�abs_key_parent�relative_path_cont_keys�cont_key�nestr^s
   `        @rrCrCCsi���+�3��[�A�O�C��e��s��8�S��W��J��j�(�N�L��q�#�c�(�9K�L��+���9�9�=�=��5�#6�#6�7��s�C�+E�h�Z�)P�Q�Q�	�	�	���h��(;�(;�<�
,��y�y�}�}�^�U�\�\�2����:�>�:J�K�
�	
�K��x�x�*�*�>�:���4���3��%?�@�@��%�$���&��	�	�
�
�f�s�l�E�L�L�D�
�A��D��N��J���K��3��%?�@�d�J�K�s�(E � E8c���t||�\}}	||}|dk7r
t||d��|dz
}t||t�}t|||�\}}|||fS#t$rd}Y�JwxYw)N�=z,Expected '=' after a key in a key/value pairr	)r�rArHr?r@�parse_value)rMrNr,r^rQr�s      rr�r�es�����c�"�H�C����s�8���s�{��3��%S�T�T��1�H�C�
�S�#�w�
'�C��S�#�{�3�J�C����U�?��������s�A�A!� A!c��t||�\}}|f}t||t�}		||}|dk7r||fS|dz
}t||t�}t||�\}}||fz
}t||t�}�L#t$rd}Y�SwxYw)N�.r	)�parse_key_partr?r@rA)rMrN�key_partr^rQs     rr�r�us���"�3��,�M�C���{�C�
�S�#�w�
'�C�
�	�"�3�x�D��3�;���8�O��q�����c�7�+��&�s�C�0�
��X���{�����c�7�+�����	��D�	�s�A1�1A?�>A?c���	||}|tvr|}t||t�}||||fS|dk(rt||�S|dk(rt	||�St||d��#t$rd}Y�^wxYw)N�'r!z(Invalid initial character for a key part)rA�BARE_KEY_CHARSr?�parse_literal_str�parse_one_line_basic_strrH)rMrNrQ�	start_poss    rr�r��s�����s�8���~���	���c�>�2���C�	�#�&�&�&��s�{� ��c�*�*��s�{�'��S�1�1�
�s�C�!K�
L�L�������s�A�A&�%A&c�(�|dz
}t||d��S)Nr	F��	multiline)�parse_basic_str�rMrNs  rr�r��s���1�H�C��3��u�5�5r*c�X�|dz
}g}t||�}|jd|�r|dz|fS	t|||�\}}|j|�t||�}|||dz}|dk(r|dz|fS|dk7r
t	||d��|dz
}t||�}|jd|�r|dz|fS�~)Nr	r��,zUnclosed array)r�r�r�r�rH)rMrNr,�array�val�cs      r�parse_arrayr��s����1�H�C��E�
$�S�#�
.�C�
�~�~�c�3���Q�w��~��
��s�C��5���S�
���S��(��c�2����c�A�g�����8���7�E�>�!���8��s�C�)9�:�:��q���(��c�2���>�>�#�s�#���7�E�>�!�r*c���|dz
}t�}t�}t||t�}|j	d|�r|dz|j
fS	t
|||�\}}}|dd|d}}|j|tj�rt||d|����	|j|d��}	||	vrt||d	|����||	|<t||t�}|||dz}
|
dk(r|dz|j
fS|
d
k7r
t||d��t|t
tf�r"|j|tjd��|dz
}t||t�}��	#t$rt||d�d�wxYw)
Nr	�}Trfr�Fr}r�zDuplicate inline table key r�zUnclosed inline tablerb)r<r=r?r@r�rKr�rrryrHr�r�r�r�rV)rMrNr,�nested_dictrDr^r�rnror�r�s           r�parse_inline_tabler��s����1�H�C��,�K��G�E�
�S�#�w�
'�C�
�~�~�c�3���Q�w��(�(�(�(�
�.�s�C��E���S�%�"�3�B�x��R��H�
��9�9�S�%�,�,�'��s�C�+M�c�U�)S�T�T�	O��1�1�*�5�1�Q�D��t���s�C�+F�x�l�)S�T�T���X����c�7�+����c�A�g�����8���7�K�,�,�,�,���8��s�C�)@�A�A��e�d�D�\�*��I�I�c�5�<�<�4�I�8��q�����c�7�+��+���	O��s�C�)C�D�$�N�	O�s�E�E0Fr�c�t�|||dz}|dz
}|rL|dvrH|dk7r.t||t�}	||}|dk7r
t||d��|dz
}t||t�}|dfS|dk(r
t||d	�S|d
k(r
t||d�S	|t|fS#t$r|dfcYSwxYw#t$rt||d�d�wxYw)Nr�>�\	�\ �\
r��rzUnescaped '\' in a stringr	z\u�z\U�)r?r@rArHr��parse_hex_char�BASIC_STR_ESCAPE_REPLACEMENTSr�)rMrNr��	escape_idrQs     r�parse_basic_str_escaper��s���C�#��'�"�I��1�H�C��Y�"9�9�����S�#�w�/�C�
��3�x���t�|�"�3��-I�J�J��1�H�C���c�#6�7���B�w���E���c�3��*�*��E���c�3��*�*�M��1�)�<�<�<���
��B�w��
���M��3��%A�B��L�M�s�B�
B�
B�B�B7c��t||d��S)NTr�)r�r�s  r� parse_basic_str_escape_multiliner��s��!�#�s�d�;�;r*c���||||z}t|�|k7stj|�s
t||d��||z
}t	|d�}t|�s
t||d��|t
|�fS)NzInvalid hex value�z/Escaped character is not a Unicode scalar value)r��HEXDIGIT_CHARS�
issupersetrHrv�is_unicode_scalar_valuer)rMrN�hex_len�hex_str�hex_ints     rr�r��sw���#��g�
�&�G�
�7�|�w��n�&?�&?��&H��3��%8�9�9��7�N�C��'�2��G�"�7�+��3��%V�W�W���G���r*c�L�|dz
}|}t||dtd��}|dz|||fS)Nr	r�Tr�)r��ILLEGAL_LITERAL_STR_CHARS)rMrNr�s   rr�r�s>���1�H�C��I�
��S�#� 9���C���7�C�	�#�&�&�&r*c�,�|dz
}|jd|�r|dz
}|r!d}t||dtd��}|||}|dz}nd}t||d�	�\}}|j||�s||fS|dz
}|j||�s|||zfS|dz
}|||d
zzfS)N�rr	r��'''Tr�r!r�r�)r�r��#ILLEGAL_MULTILINE_LITERAL_STR_CHARSr�)rMrN�literal�delim�end_pos�results      r�parse_multiline_strr�	s����1�H�C�
�~�~�d�C� ��q����������8��
���S��!����k����%�c�3�$�?���V��>�>�%��%��F�{���1�H�C��>�>�%��%��F�U�N�"�"��1�H�C���%�!�)�$�$�$r*c�l�|r
t}t}nt}t}d}|}		||}|dk(r4|s
|dz||||zfS|j
d|�r
|dz||||zfS|dz
}�@|dk(r||||z
}|||�\}}||z
}|}�a||vrt||d|����|dz
}�z#t$rt||d�d�wxYw)	Nr�zUnterminated stringr!r	�"""r�r"zIllegal character )�!ILLEGAL_MULTILINE_BASIC_STR_CHARSr��ILLEGAL_BASIC_STR_CHARSr�rArHr�)	rMrNr�r��
parse_escapesr�r�rQ�
parsed_escapes	         rr�r�(s���4��8�
�*��.�
�
�F��I�
�	J��s�8�D��3�;���Q�w���Y�s�);� ;�;�;��~�~�e�S�)��Q�w���Y�s�);� ;�;�;��1�H�C���4�<��c�)�C�(�(�F�!.�s�C�!8��C���m�#�F��I���8���s�C�+=�d�X�)F�G�G��q���)���	J��s�C�)>�?�T�I�	J�s�B�B3c��	||}|dk(r,|jd|�rt||d��St||�S|dk(r,|jd|�rt||d��St	||�S|dk(r|jd	|�r|d
zdfS|dk(r|jd|�r|d
zdfS|dk(r
t|||�S|dk(r
t
|||�Stj||�}|r	t|�}|j�|fStj||�}|r|j�t|�fStj||�}|r|j�t!||�fS|||dz}	|	dvr
|dz||	�fS|||d
z}
|
dvr
|d
z||
�fSt||d��#t$rd}Y���wxYw#t$r}t||d�|�d}~wwxYw)Nr!r�F)r�r�r�T�t�truer��f�false�r8�{zInvalid date or datetimer�>�inf�nan>�+inf�+nan�-inf�-nanz
Invalid value)rAr�r�r�r�r�r�r
�matchr
r�rH�endrrrr)rMrNr,rQ�datetime_match�datetime_obj�e�localtime_match�number_match�first_three�
first_fours           rr�r�Hs1����s�8���s�{��>�>�%��%�&�s�C��?�?�'��S�1�1��s�{��>�>�%��%�&�s�C��>�>� ��c�*�*��s�{��>�>�&�#�&���7�D�=� ��s�{��>�>�'�3�'���7�E�>�!��s�{��3��[�1�1��s�{�!�#�s�K�8�8�!�&�&�s�C�0�N��	L�,�^�<�L��!�!�#�\�1�1�"�(�(��c�2�O���"�"�$�&8��&I�I�I�
�?�?�3��,�L�����!�?�<��#M�M�M��c�C�!�G�$�K��n�$��Q�w��K�0�0�0��S�3��7�#�J��5�5��Q�w��J�/�/�/�
�s�C��
1�1��y������L�	L��s�C�)C�D�!�K��	L�s)�F%�"F7�%F4�3F4�7	G�G�Gc�:�dd�}t|�d|||��d��S)zZReturn a `TOMLDecodeError` where error message is suffixed with
    coordinates in source.c��|t|�k\ry|jdd|�dz}|dk(r|dz}n||jdd|�z
}d|�d|��S)Nzend of documentrrr	zline z	, column )r��count�rindex)rMrN�line�columns    r�
coord_reprz suffixed_err.<locals>.coord_repr�sa���#�c�(�?�$��y�y��q�#�&��*���1�9��1�W�F��3�:�:�d�A�s�3�3�F��t�f�I�f�X�.�.r*z (at �))rM�strrNrrtr)r$)rMrN�msgrs    rrHrH�s)��/��c�U�%�
�3��(<�'=�Q�?�@�@r*c�F�d|cxkxrdkncxsd|cxkxrdkScS)Nri��i�i��r))�	codepoints rr�r��s'��
��#�e�#�G��)�)F�w�)F�G�)F�Gr*c�0���turtSd�fd�}|S)a%A decorator to make `parse_float` safe.

    `parse_float` must not return dicts or lists, because these types
    would be mixed with parsed TOML tables and arrays, thus confusing
    the parser. The returned decorated callable raises `ValueError`
    instead of returning illegal types.
    c�Z���|�}t|ttf�rtd��|S)Nz*parse_float must not return dicts or lists)r�rKr�r�)�	float_str�float_valuer,s  �r�safe_parse_floatz/make_safe_parse_float.<locals>.safe_parse_float�s-���!�)�,���k�D�$�<�0��I�J�J��r*)rrrtr)�float)r,rs` rr>r>�s����e������r*)r3rr,rrt�dict[str, Any])rLrr,rrtr)rMrrNrr�z
Iterable[str]rtr)rMrrNrr�rr�zfrozenset[str]r�rxrtr)rMrrNrrtr)rMrrNrrOr;rt�tuple[Pos, Key])rMrrNrrOr;rPrr,rrtr)rMrrNrr,rrtztuple[Pos, Key, Any])rMrrNrrtr)rMrrNrrt�tuple[Pos, str])rMrrNrr,rrtztuple[Pos, list])rMrrNrr,rrtztuple[Pos, dict])rMrrNrr�rxrtr)rMrrNrr�rvrtr)rMrrNrr�rxrtr)rMrrNrr,rrtztuple[Pos, Any])rMrrNrrrrtr$)rrvrtrx)r,rrtr)G�
__future__r�collections.abcr�string�typesr�typingrrr�_rer
rrr
rr�_typesrrr�	frozensetr�r�
ASCII_CTRLr�r�r�r�r�r@r��
ascii_letters�digitsr�rB�	hexdigitsr�r�r�r$rr6r2r=r<r;r?r�rIr�rGrFrCr�r�r�r�r�r�r�r�r�r�r�r�r�rHr�r>r)r*r�<module>r)s���
#�$�
�"�,�,���)�(�
�1�u�R�y�1�
1�I�c�#�h�4G�
G�
�%�y���6��$.��6�1B�$B�!�3��&G�#�/��
�E�
���	�$��/���6�/�/�&�-�-�?�$�F�G��"�Y�u�%5�5���6�+�+�,�� 0���������
!��;�j�;�7<�	-�27�?�D7�7�t"�"�D�Z��
��	��	��
��
���
�	��,	���$�*�	����#��-0��?I����D
�	�
��
�%/�
��
� ,�$
M� 6�
"�0,�B.3�M�	�M��M�&*�M��M�:<��'�%�>�@A2�	�A2��A2�%/�A2��A2�HA�"H�r*python3.12/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-312.pyc000064400000007565151732701640022164 0ustar00�

R`i��<�ddlmZddlmZmZmZmZmZmZddlm	Z	ddl
Z
ddlmZddl
mZdZe
j d	e
j"�
�Ze
j e�Ze
j de�d�e
j"�
�Zdd
�Ze	d��dd��Zdd�Zdd�Zy)�)�annotations)�date�datetime�time�	timedelta�timezone�tzinfo)�	lru_cacheN)�Any�)�
ParseFloatzE([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.([0-9]{1,6})[0-9]*)?a`
0
(?:
    x[0-9A-Fa-f](?:_?[0-9A-Fa-f])*   # hex
    |
    b[01](?:_?[01])*                 # bin
    |
    o[0-7](?:_?[0-7])*               # oct
)
|
[+-]?(?:0|[1-9](?:_?[0-9])*)         # dec, integer part
(?P<floatpart>
    (?:\.[0-9](?:_?[0-9])*)?         # optional fractional part
    (?:[eE][+-]?[0-9](?:_?[0-9])*)?  # optional exponent part
)
)�flagsz`
([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])  # date, e.g. 1988-10-27
(?:
    [Tt ]
    zR
    (?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))?  # optional time offset
)?
c��|j�\}}}}}}}}}	}
}t|�t|�t|�}}
}|�
t||
|�St|�t|�t|�}}}|rt|jdd��nd}|	rt	|
||	�}n|rt
j}nd}t||
||||||��S)z�Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.

    Raises ValueError if the match does not correspond to a valid date
    or datetime.
    N��0r)r	)�groups�intr�ljust�	cached_tzr�utcr)�match�year_str�	month_str�day_str�hour_str�
minute_str�sec_str�
micros_str�	zulu_time�offset_sign_str�offset_hour_str�offset_minute_str�year�month�day�hour�minute�sec�micros�tzs                    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tomli/_re.py�match_to_datetimer,4s���$	�����������������8�}�c�)�n�c�'�l��%�D����D�%��%�%��H�
�s�:���G��#�&�D�.8�S��!�!�!�S�)�
*�a�F��%��.��
��
�
�\�\��
���D�%��d�F�C���K�K�)�maxsizec	�p�|dk(rdnd}tt|t|�z|t|�z���S)N�+r���)�hours�minutes)rrr)rr�sign_str�signs    r+rrWs<���C��1�R�D�����X��&��3�z�?�*�	
��r-c��|j�\}}}}|rt|jdd��nd}tt|�t|�t|�|�S)Nrrr)rrrr)rrrrrr)s      r+�match_to_localtimer7bsN��05����-�H�j�'�:�.8�S��!�!�!�S�)�
*�a�F���H�
�s�:���G��f�E�Er-c��|jd�r||j��St|j�d�S)N�	floatpartr)�groupr)r�parse_floats  r+�match_to_numberr<hs2���{�{�;���5�;�;�=�)�)��u�{�{�}�a� � r-)r�re.Match�returnzdatetime | date)r�strrr?r4r?r>r)rr=r>r)rr=r;r
r>r)�
__future__rrrrrrr	�	functoolsr
�re�typingr�_typesr
�_TIME_RE_STR�compile�VERBOSE�	RE_NUMBER�RE_LOCALTIME�RE_DATETIMEr,rr7r<�r-r+�<module>rLs���
#�F�F��	���
X���B�J�J�� 
�*�*�#
�	�&�r�z�z�,�'���b�j�j�
��N��	�
�*�*�
�� L�F�4�����F�!r-python3.12/site-packages/pip/_vendor/tomli/_re.py000064400000005577151732701640015624 0ustar00# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

from __future__ import annotations

from datetime import date, datetime, time, timedelta, timezone, tzinfo
from functools import lru_cache
import re
from typing import Any

from ._types import ParseFloat

# E.g.
# - 00:32:00.999999
# - 00:32:00
_TIME_RE_STR = r"([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.([0-9]{1,6})[0-9]*)?"

RE_NUMBER = re.compile(
    r"""
0
(?:
    x[0-9A-Fa-f](?:_?[0-9A-Fa-f])*   # hex
    |
    b[01](?:_?[01])*                 # bin
    |
    o[0-7](?:_?[0-7])*               # oct
)
|
[+-]?(?:0|[1-9](?:_?[0-9])*)         # dec, integer part
(?P<floatpart>
    (?:\.[0-9](?:_?[0-9])*)?         # optional fractional part
    (?:[eE][+-]?[0-9](?:_?[0-9])*)?  # optional exponent part
)
""",
    flags=re.VERBOSE,
)
RE_LOCALTIME = re.compile(_TIME_RE_STR)
RE_DATETIME = re.compile(
    rf"""
([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])  # date, e.g. 1988-10-27
(?:
    [Tt ]
    {_TIME_RE_STR}
    (?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))?  # optional time offset
)?
""",
    flags=re.VERBOSE,
)


def match_to_datetime(match: re.Match) -> datetime | date:
    """Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.

    Raises ValueError if the match does not correspond to a valid date
    or datetime.
    """
    (
        year_str,
        month_str,
        day_str,
        hour_str,
        minute_str,
        sec_str,
        micros_str,
        zulu_time,
        offset_sign_str,
        offset_hour_str,
        offset_minute_str,
    ) = match.groups()
    year, month, day = int(year_str), int(month_str), int(day_str)
    if hour_str is None:
        return date(year, month, day)
    hour, minute, sec = int(hour_str), int(minute_str), int(sec_str)
    micros = int(micros_str.ljust(6, "0")) if micros_str else 0
    if offset_sign_str:
        tz: tzinfo | None = cached_tz(
            offset_hour_str, offset_minute_str, offset_sign_str
        )
    elif zulu_time:
        tz = timezone.utc
    else:  # local date-time
        tz = None
    return datetime(year, month, day, hour, minute, sec, micros, tzinfo=tz)


@lru_cache(maxsize=None)
def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
    sign = 1 if sign_str == "+" else -1
    return timezone(
        timedelta(
            hours=sign * int(hour_str),
            minutes=sign * int(minute_str),
        )
    )


def match_to_localtime(match: re.Match) -> time:
    hour_str, minute_str, sec_str, micros_str = match.groups()
    micros = int(micros_str.ljust(6, "0")) if micros_str else 0
    return time(int(hour_str), int(minute_str), int(sec_str), micros)


def match_to_number(match: re.Match, parse_float: ParseFloat) -> Any:
    if match.group("floatpart"):
        return parse_float(match.group())
    return int(match.group(), 0)
python3.12/site-packages/pip/_vendor/tomli/__init__.py000064400000000614151732701640016601 0ustar00# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

__all__ = ("loads", "load", "TOMLDecodeError")
__version__ = "2.0.1"  # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT

from ._parser import TOMLDecodeError, load, loads

# Pretend this exception was created here.
TOMLDecodeError.__module__ = __name__
python3.12/site-packages/pip/_vendor/tomli/py.typed000064400000000032151732701640016161 0ustar00# Marker file for PEP 561
python3.12/site-packages/pip/_vendor/tomli/_types.py000064400000000376151732701640016352 0ustar00# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

from typing import Any, Callable, Tuple

# Type annotations
ParseFloat = Callable[[str], Any]
Key = Tuple[str, ...]
Pos = int
python3.12/site-packages/pip/_vendor/__pycache__/__init__.cpython-312.pyc000064400000011204151732701640022013 0ustar00�

R`i�����dZddlmZddlZddlZddlZdZejjejje��Zd�Z
e�r'ejejjed��ejzejdde
d�e
d�e
d	�e
d
�e
d�e
d�e
d
�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d�e
d �e
d!�e
d"�e
d#�e
d$�e
d%�e
d&�e
d'�e
d(�e
d)�e
d*�e
d+�e
d,�e
d-�e
d.�e
d/�e
d0�e
d1�e
d2�e
d3�e
d4�e
d5�e
d6�e
d7�e
d8�e
d9�e
d:�e
d;�e
d<�e
d=�e
d>�e
d?�e
d@�e
dA�e
dB�yy)Cz�
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.

Files inside of pip._vendor should be considered immutable and should only be
updated to versions from upstream.
�)�absolute_importNFc�^�djt|�}	t|t�t	�d��t
j|t
j|<|jdd�\}}tt
j||t
j|�y#t$rYywxYw)Nz{0}.{1}r)�level�.�)
�format�__name__�
__import__�globals�locals�sys�modules�rsplit�setattr�ImportError)�
modulename�
vendored_name�base�heads    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/__init__.py�vendoredrs����$�$�X�z�:�M�B��:�w�y�&�(�!�<�&)�[�[��%<����M�"�"�)�)�#�q�1�
��d�����D�!�4����Z�)@�A���	
�	
�	
�s�B � 	B,�+B,z*.whl�cachecontrol�certifi�colorama�distlib�distro�sixz	six.moveszsix.moves.urllibzsix.moves.urllib.parse�	packagingzpackaging.versionzpackaging.specifiers�pep517�
pkg_resources�platformdirs�progress�requestszrequests.exceptionszrequests.packageszrequests.packages.urllib3z&requests.packages.urllib3._collectionsz$requests.packages.urllib3.connectionz(requests.packages.urllib3.connectionpoolz!requests.packages.urllib3.contribz*requests.packages.urllib3.contrib.ntlmpoolz+requests.packages.urllib3.contrib.pyopensslz$requests.packages.urllib3.exceptionsz requests.packages.urllib3.fieldsz"requests.packages.urllib3.filepostz"requests.packages.urllib3.packagesz/requests.packages.urllib3.packages.ordered_dictz&requests.packages.urllib3.packages.sixz5requests.packages.urllib3.packages.ssl_match_hostnamezErequests.packages.urllib3.packages.ssl_match_hostname._implementationz%requests.packages.urllib3.poolmanagerz!requests.packages.urllib3.requestz"requests.packages.urllib3.responsezrequests.packages.urllib3.utilz)requests.packages.urllib3.util.connectionz&requests.packages.urllib3.util.requestz'requests.packages.urllib3.util.responsez$requests.packages.urllib3.util.retryz#requests.packages.urllib3.util.ssl_z&requests.packages.urllib3.util.timeoutz"requests.packages.urllib3.util.url�
resolvelib�richzrich.consolezrich.highlighterzrich.loggingzrich.markupz
rich.progresszrich.segmentz
rich.stylez	rich.textzrich.traceback�tenacity�tomli�
truststore�urllib3)�__doc__�
__future__r�glob�os.path�osr
�	DEBUNDLED�path�abspath�dirname�__file__�	WHEEL_DIRr�join��r�<module>r8s����'���
�

�	�
�G�G�O�O�B�G�G�O�O�H�5�6�	�B�4
��$�)�)�B�G�G�L�L��G�<�=����H�C�H�H�Q�K�
�^���Y���Z���Y���X���U�O��[���
� ��
%�&��[���
 �!��
#�$��X���_���^���Z���Z���
"�#��
 �!��
(�)��
5�6��
3�4��
7�8��
0�1��
9�:��
:�;��
3�4��
/�0��
1�2��
1�2��
>�?��
5�6��
D�E��� ��
4�5��
0�1��
1�2��
-�.��
8�9��
5�6��
6�7��
3�4��
2�3��
5�6��
1�2��\���V���^���
� ��^���]���_���^���\���[���
���Z���W���\���Y��E
r7python3.12/site-packages/pip/_vendor/__pycache__/six.cpython-312.pyc000064400000120445151732701640021067 0ustar00�

R`i����N�dZddlmZddlZddlZddlZddlZddlZdZdZ	ejddk(Zejddk(Zejdddk\Z
erefZefZefZeZeZej.Zn_efZeefZeej6fZeZeZej:j=d	�r	ed
�Zn"Gd�de�Z 	e!e ��ed
�Z[ e
rddl#m$Z$ndZ$d�Z%d�Z&Gd�de�Z'Gd�de'�Z(Gd�dejR�Z*Gd�de'�Z+Gd�de�Z,e,e-�Z.Gd�de*�Z/ge+dddd��e+d d!d"d#d ��e+d$d!d!d%d$��e+d&d'd"d(d&��e+d)d'd*��e+d+d!d"d,d+��e+d-d.d.d/d-��e+d0d.d.d-d0��e+d1d2d3��e+d4d'd"d5d4��e+d6d'e
rd7nd8d9��e+d:d'd;��e+d<d=d>d?��e+ddd��e+d@d@dA��e+dBdBdA��e+dCdCdA��e+d5d'd"d5d4��e+dDd!d"dEdD��e+dFd!d!dGdF��e(d"d'��e(dHdI��e(dJdAejdKk\rdLndA��e(dMdN��e(dOdPdQ��e(dRdSdT��e(dUdVejdWkrdUndX��e(dYdZd[��e(d\d]d^��e(d_d`da��e(dbdcdd��e(dedfdg��e(dhdidj��e(dkdldm��e(dndodp��e(dqdrds��e(dtdudv��e(dwdwdx��e(dydydx��e(dzdzdx��e(d{d{d|��e(d}d~��e(dd���e(d�d���e(dXd�dX��e(d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�e-d�zd���e(d�e-d�zd���e(d�e-d�ze-d�z��e(d�d�d���e(d�d�d���e(d�d�d���Z0ej:d�k(r
e0e(d�d��gz
Z0e0D]?Z1e2e/e1jfe1�e4e1e(�s�!e.jke1d�e1jfz��A[1e0e/_0e/e-d�z�Z6e.jke6dīGdńd�e*�Z7e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d?d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d�d�dԫe+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��gZ8e8D]Z1e2e7e1jfe1��[1e8e7_0e.jke7e-d�z�d�d�Gd�d�e*�Z9e+d�d�d��e+d�d�d��e+d�d�d��gZ:e:D]Z1e2e9e1jfe1��[1e:e9_0e.jke9e-d�z�d�d�Gd�d�e*�Z;ge+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�d	d�d��e+�d
d�d��e+�dd�d��e+�dd�d��e+�d
d�d��e+�dd�d��e+�dd�d��Z<e<D]Z1e2e;e1jfe1��[1e<e;_0e.jke;e-�dz��d�d�G�d��de*�Z=e+�dd��d�e+�dd��d�e+�dd��d�e+�dd��d�gZ>e>D]Z1e2e=e1jfe1��[1e>e=_0e.jke=e-�dz��d�d�G�d��de*�Z?e+�dd�d��gZ@e@D]Z1e2e?e1jfe1��[1e@e?_0e.jke?e-�d z��d!�d"�G�d#��d$ejR�ZAe.jkeAe-d�z��d%��d&�ZB�d'�ZCer�d(ZD�d)ZE�d*ZF�d+ZG�d,ZH�d-ZIn�d.ZD�d/ZE�d0ZF�d1ZG�d2ZH�d3ZI	eJZKeKZJ	eMZMer�d6�ZNej�ZP�d7�ZQeZRn�d8�ZN�d9�ZP�d:�ZQG�d;��d<e�ZReMZMe%eN�d=�ej�eD�ZTej�eE�ZUej�eF�ZVej�eG�ZWej�eH�ZXej�eI�ZYerJ�d>�ZZ�d?�Z[�d@�Z\�dA�Z]ej��dB�Z_ej��dC�Z`ej��dD�ZanI�dE�ZZ�dF�Z[�dG�Z\�dH�Z]ej��dI�Z_ej��dJ�Z`ej��dK�Zae%eZ�dL�e%e[�dM�e%e\�dN�e%e]�dO�er��dP�Zb�dQ�ZcedZeddlfZfefj��dR�j�Zi[fej�d�Zkej�ZmenZoddlpZpepj�Zqepj�Zr[p�dSZsej�dT�dTkr
�dUZt�dVZu�dWZvnY�dXZt�dYZu�dZZvnO�d[�Zb�d\�ZceeZeedZi�d]�Zk�d^�Zmej�ej�ey�ZoddlqZqeqj�xZqZr�d_Zs�dUZt�dVZu�dWZve%eb�d`�e%ec�da��db�Zz�dc�Z{�dd�Z|�de�Z}ere~e6j��df�Z��dz�dg�Z�n�d{�dh�Z�e��di�ejdd�djkDr
e��dk�n�dl�Z�e~e6j��dmd�Z�e���dn�Z�ejdddKkre�Z��do�Z�e%e��dp�ejdddkrse�j
e�jf�dq�Z�e�jje�_e�j
e�jf�dr�Z�e�jje�_n
e�jZ��ds�Z��dt�Z��d|�du�Z��d|�dv�Z��d|�dw�Z��dx�Z�gZ�e-Z�e���j'�dy��ge�_�e�j,rRe�e�j,�D]:\Z�Z�ee��jZdk(s�e�jfe-k(s�,e�j,e�=n[�[�e�j,�j5e.�y#e"$red
�ZY���wxYw#eL$r�d4�ZKY��owxYw#eL$r�d5�ZMY��zwxYw(}z6Utilities for writing code that runs on Python 2 and 3�)�absolute_importNz'Benjamin Peterson <benjamin@python.org>z1.16.0��)r��javai���c��eZdZd�Zy)�Xc��y)Nl���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/six.py�__len__z	X.__len__>s���N)�__name__�
__module__�__qualname__rrrrr	r	<s��
rr	l����)�spec_from_loaderc��||_y)z Add documentation to a function.N)�__doc__)�func�docs  r�_add_docrPs	���D�Lrc�>�t|�tj|S)z7Import module, returning the module after the last dot.)�
__import__�sys�modules��names r�_import_moduler Us���t���;�;�t��rc��eZdZd�Zd�Zy)�
_LazyDescrc��||_y�Nr)r
rs  r�__init__z_LazyDescr.__init__]s	����	rc��|j�}t||j|�	t|j|j�|S#t
$rY|SwxYwr$)�_resolve�setattrr�delattr�	__class__�AttributeError)r
�obj�tp�results    r�__get__z_LazyDescr.__get__`sV���������T�Y�Y��'�	�
�C�M�M�4�9�9�-��
���	���
�	�s� A�	A�AN)rrrr%r/rrrr"r"[s���	rr"c�,��eZdZd�fd�	Zd�Zd�Z�xZS)�MovedModulec�^��tt|�|�tr|�|}||_y||_yr$)�superr1r%�PY3�mod)r
r�old�newr*s    �rr%zMovedModule.__init__ns-���
�k�4�)�$�/���{����D�H��D�Hrc�,�t|j�Sr$)r r5rs rr'zMovedModule._resolvews���d�h�h�'�'rc�X�|j�}t||�}t|||�|Sr$)r'�getattrr()r
�attr�_module�values    r�__getattr__zMovedModule.__getattr__zs*���-�-�/�����&����d�E�"��rr$)rrrr%r'r>�
__classcell__�r*s@rr1r1ls����(�rr1c�(��eZdZ�fd�Zd�ZgZ�xZS)�_LazyModulec�b��tt|�|�|jj|_yr$)r3rBr%r*r)r
rr*s  �rr%z_LazyModule.__init__�s#���
�k�4�)�$�/��~�~�-�-��rc�f�ddg}||jD�cgc]}|j��c}z
}|Scc}w)Nrr)�_moved_attributesr)r
�attrsr;s   r�__dir__z_LazyModule.__dir__�s<���J�'��
��(>�(>�?�(>��$�)�)�(>�?�?�����@s�.)rrrr%rGrEr?r@s@rrBrB�s���.���rrBc�&��eZdZd�fd�	Zd�Z�xZS)�MovedAttributec���tt|�|�tr#|�|}||_|�|�
|}||_y|}||_y||_|�|}||_yr$)r3rIr%r4r5r;)r
r�old_mod�new_mod�old_attr�new_attrr*s      �rr%zMovedAttribute.__init__�sg���
�n�d�,�T�2�������D�H����#�#�H�!�D�I� (�H� �D�I��D�H����� �D�Irc�X�t|j�}t||j�Sr$)r r5r:r;�r
�modules  rr'zMovedAttribute._resolve�s!������)���v�t�y�y�)�)r�NN)rrrr%r'r?r@s@rrIrI�s
���!�$*rrIc�Z�eZdZdZd�Zd�Zd�Zdd�Zdd�Zd�Z	d	�Z
d
�Zd�ZeZ
d�Zd
�Zy)�_SixMetaPathImporterz�
    A meta path importer to import six.moves and its submodules.

    This class implements a PEP302 finder and loader. It should be compatible
    with Python 2.5 and all existing versions of Python3
    c� �||_i|_yr$)r�
known_modules)r
�six_module_names  rr%z_SixMetaPathImporter.__init__�s��#��	���rc�P�|D]!}||j|jdz|z<�#y�N�.�rVr)r
r5�	fullnames�fullnames    r�_add_modulez _SixMetaPathImporter._add_module�s)��!�H�=@�D���t�y�y�3���9�:�"rc�@�|j|jdz|zSrYr[�r
r]s  r�_get_modulez _SixMetaPathImporter._get_module�s ���!�!�$�)�)�c�/�H�"<�=�=rNc�$�||jvr|Syr$)rV)r
r]�paths   r�find_modulez _SixMetaPathImporter.find_module�s���t�)�)�)��K�rc�8�||jvrt||�Syr$)rVr)r
r]rc�targets    r�	find_specz_SixMetaPathImporter.find_spec�s ���t�)�)�)�#�H�d�3�3�rc�X�	|j|S#t$rtd|z��wxYw)Nz!This loader does not know module )rV�KeyError�ImportErrorr`s  r�__get_modulez!_SixMetaPathImporter.__get_module�s;��	N��%�%�h�/�/���	N��A�H�L�M�M�	N�s��)c���	tj|S#t$rYnwxYw|j|�}t	|t
�r|j
�}n||_|tj|<|Sr$)rrri� _SixMetaPathImporter__get_module�
isinstancer1r'�
__loader__)r
r]r5s   r�load_modulez _SixMetaPathImporter.load_module�sg��	��;�;�x�(�(���	��	������)���c�;�'��,�,�.�C�!�C�N� #����H���
s��	!�!c�8�t|j|�d�S)z�
        Return true, if the named module is a package.

        We need this method to get correct spec objects with
        Python 3.4 (see PEP451)
        �__path__)�hasattrrmr`s  r�
is_packagez_SixMetaPathImporter.is_package�s���t�(�(��2�J�?�?rc�&�|j|�y)z;Return None

        Required, if is_package is implementedN)rmr`s  r�get_codez_SixMetaPathImporter.get_code�s��	
���(�#�rc�8�|j|j�Sr$)rpr)r
�specs  r�
create_modulez"_SixMetaPathImporter.create_module�s������	�	�*�*rc��yr$rrPs  r�exec_modulez _SixMetaPathImporter.exec_module�s��rr$)rrrrr%r^rardrgrmrprtrv�
get_sourceryr{rrrrTrT�sH��� �A�>��
�
N��@���J�+�
rrTc��eZdZdZgZy)�_MovedItemszLazy loading of moved objectsN)rrrrrrrrrr~r~�s
��'��Hrr~�	cStringIO�io�StringIO�filter�	itertools�builtins�ifilter�filterfalse�ifilterfalse�input�__builtin__�	raw_input�internr�map�imap�getcwd�os�getcwdu�getcwdb�	getoutput�commands�
subprocess�range�xrange�
reload_module�	importlib�imp�reload�reduce�	functools�shlex_quote�pipes�shlex�quote�UserDict�collections�UserList�
UserString�zip�izip�zip_longest�izip_longest�configparser�ConfigParser�collections_abc)rrzcollections.abc�copyreg�copy_reg�dbm_gnu�gdbmzdbm.gnu�dbm_ndbm�dbmzdbm.ndbm�
_dummy_thread�dummy_thread)r�	�_thread�http_cookiejar�	cookielibzhttp.cookiejar�http_cookies�Cookiezhttp.cookies�
html_entities�htmlentitydefsz
html.entities�html_parser�
HTMLParserzhtml.parser�http_client�httplibzhttp.client�email_mime_basezemail.MIMEBasezemail.mime.base�email_mime_imagezemail.MIMEImagezemail.mime.image�email_mime_multipartzemail.MIMEMultipartzemail.mime.multipart�email_mime_nonmultipartzemail.MIMENonMultipartzemail.mime.nonmultipart�email_mime_textzemail.MIMETextzemail.mime.text�BaseHTTPServerzhttp.server�
CGIHTTPServer�SimpleHTTPServer�cPickle�pickle�queue�Queue�reprlib�repr�socketserver�SocketServer�thread�tkinter�Tkinter�tkinter_dialog�Dialogztkinter.dialog�tkinter_filedialog�
FileDialogztkinter.filedialog�tkinter_scrolledtext�ScrolledTextztkinter.scrolledtext�tkinter_simpledialog�SimpleDialogztkinter.simpledialog�tkinter_tix�Tixztkinter.tix�tkinter_ttk�ttkztkinter.ttk�tkinter_constants�Tkconstantsztkinter.constants�tkinter_dnd�Tkdndztkinter.dnd�tkinter_colorchooser�tkColorChooserztkinter.colorchooser�tkinter_commondialog�tkCommonDialogztkinter.commondialog�tkinter_tkfiledialog�tkFileDialog�tkinter_font�tkFontztkinter.font�tkinter_messagebox�tkMessageBoxztkinter.messagebox�tkinter_tksimpledialog�tkSimpleDialog�urllib_parsez.moves.urllib_parsezurllib.parse�urllib_errorz.moves.urllib_errorzurllib.error�urllibz
.moves.urllib�urllib_robotparser�robotparserzurllib.robotparser�
xmlrpc_client�	xmlrpclibz
xmlrpc.client�
xmlrpc_server�SimpleXMLRPCServerz
xmlrpc.server�win32�winreg�_winregzmoves.z.moves�movesc��eZdZdZy)�Module_six_moves_urllib_parsez7Lazy loading of moved objects in six.moves.urllib_parseN�rrrrrrrr�r�T���Arr��ParseResult�urlparse�SplitResult�parse_qs�	parse_qsl�	urldefrag�urljoin�urlsplit�
urlunparse�
urlunsplit�
quote_plus�unquote�unquote_plus�unquote_to_bytes�	urlencode�
splitquery�splittag�	splituser�
splitvalue�
uses_fragment�uses_netloc�uses_params�
uses_query�
uses_relative�moves.urllib_parsezmoves.urllib.parsec��eZdZdZy)�Module_six_moves_urllib_errorz7Lazy loading of moved objects in six.moves.urllib_errorNr�rrrrr~r�rr�URLError�urllib2�	HTTPError�ContentTooShortErrorz.moves.urllib.error�moves.urllib_errorzmoves.urllib.errorc��eZdZdZy)�Module_six_moves_urllib_requestz9Lazy loading of moved objects in six.moves.urllib_requestNr�rrrr!r!�s��Crr!�urlopenzurllib.request�install_opener�build_opener�pathname2url�url2pathname�
getproxies�Request�OpenerDirector�HTTPDefaultErrorHandler�HTTPRedirectHandler�HTTPCookieProcessor�ProxyHandler�BaseHandler�HTTPPasswordMgr�HTTPPasswordMgrWithDefaultRealm�AbstractBasicAuthHandler�HTTPBasicAuthHandler�ProxyBasicAuthHandler�AbstractDigestAuthHandler�HTTPDigestAuthHandler�ProxyDigestAuthHandler�HTTPHandler�HTTPSHandler�FileHandler�
FTPHandler�CacheFTPHandler�UnknownHandler�HTTPErrorProcessor�urlretrieve�
urlcleanup�	URLopener�FancyURLopener�proxy_bypass�parse_http_list�parse_keqv_listz.moves.urllib.request�moves.urllib_requestzmoves.urllib.requestc��eZdZdZy)� Module_six_moves_urllib_responsez:Lazy loading of moved objects in six.moves.urllib_responseNr�rrrrGrG�s��DrrG�addbasezurllib.response�addclosehook�addinfo�
addinfourlz.moves.urllib.response�moves.urllib_responsezmoves.urllib.responsec��eZdZdZy)�#Module_six_moves_urllib_robotparserz=Lazy loading of moved objects in six.moves.urllib_robotparserNr�rrrrNrN�s��GrrN�RobotFileParserz.moves.urllib.robotparser�moves.urllib_robotparserzmoves.urllib.robotparserc���eZdZdZgZej
d�Zej
d�Zej
d�Z	ej
d�Z
ej
d�Zd�Zy)	�Module_six_moves_urllibzICreate a six.moves.urllib namespace that resembles the Python 3 namespacerrrErLrPc�
�gd�S)N)�parse�error�request�responser�rrs rrGzModule_six_moves_urllib.__dir__�s��G�GrN)
rrrrrr�	_importerrarTrUrVrWr�rGrrrrRrR�se��S��H��!�!�"6�7�E��!�!�"6�7�E��#�#�$:�;�G��$�$�%<�=�H��'�'�(B�C�K�HrrRzmoves.urllibc�:�tt|j|�y)zAdd an item to six.moves.N)r(r~r)�moves r�add_mover[�s���K����D�)rc��	tt|�y#t$r0	tj|=Yy#t
$rtd|����wxYwwxYw)zRemove item from six.moves.zno such move, N)r)r~r+r��__dict__rirs r�remove_mover^sN��?���T�"���?�	?����t�$���	?� �t�!=�>�>�	?��?�s��	A�0�A�A�__func__�__self__�__closure__�__code__�__defaults__�__globals__�im_func�im_self�func_closure�	func_code�
func_defaults�func_globalsc�"�|j�Sr$)�next)�its r�advance_iteratorrn#s���w�w�y�rc�L�td�t|�jD��S)Nc3�8K�|]}d|jv���y�w)�__call__N)r])�.0�klasss  r�	<genexpr>zcallable.<locals>.<genexpr>,s����O�=N�E�:����/�=N�s�)�any�type�__mro__)r,s r�callablerx+s���O�T�#�Y�=N�=N�O�O�Orc��|Sr$r��unbounds r�get_unbound_functionr|0s���rc��|Sr$r�r�clss  r�create_unbound_methodr�5s���rc��|jSr$)rerzs rr|r|:s�����rc�D�tj|||j�Sr$)�types�
MethodTyper*)rr,s  r�create_bound_methodr�=s������c�3�=�=�9�9rc�0�tj|d|�Sr$)r�r�r~s  rr�r�@s������d�C�0�0rc��eZdZd�Zy)�Iteratorc�6�t|�j|�Sr$)rv�__next__rs rrlz
Iterator.nextEs����:�&�&�t�,�,rN)rrrrlrrrr�r�Cs��	-rr�z3Get the function out of a possibly unbound functionc�8�t|jdi|���S�Nr)�iter�keys��d�kws  r�iterkeysr�Vs���F�A�F�F�L�R�L�!�!rc�8�t|jdi|���Sr�)r��valuesr�s  r�
itervaluesr�Ys���H�A�H�H�N�r�N�#�#rc�8�t|jdi|���Sr�)r��itemsr�s  r�	iteritemsr�\����G�A�G�G�M�b�M�"�"rc�8�t|jdi|���Sr�)r��listsr�s  r�	iterlistsr�_r�rr�r�r�c�&�|jdi|��Sr�)r�r�s  rr�r�hs���q�z�z��B��rc�&�|jdi|��Sr�)r�r�s  rr�r�ks���q�|�|�!�b�!�!rc�&�|jdi|��Sr�)r�r�s  rr�r�n����q�{�{� �R� � rc�&�|jdi|��Sr�)r�r�s  rr�r�qr�r�viewkeys�
viewvalues�	viewitemsz1Return an iterator over the keys of a dictionary.z3Return an iterator over the values of a dictionary.z?Return an iterator over the (key, value) pairs of a dictionary.zBReturn an iterator over the (key, [values]) pairs of a dictionary.c�$�|jd�S)Nzlatin-1)�encode��ss r�br��s���x�x�	�"�"rc��|Sr$rr�s r�ur������rz>B�assertCountEqual��assertRaisesRegexp�assertRegexpMatches�assertNotRegexpMatches�assertRaisesRegex�assertRegex�assertNotRegexc��|Sr$rr�s rr�r��r�rc�:�t|jdd�d�S)Nz\\z\\\\�unicode_escape)�unicode�replacer�s rr�r��s���q�y�y���0�2B�C�Crc��t|d�S)Nr��ord)�bss r�byte2intr��s���2�a�5�z�rc��t||�Sr$r�)�buf�is  r�
indexbytesr��s���3�q�6�{�r�assertItemsEqualzByte literalzText literalc�.�t|t�|i|��Sr$)r:�_assertCountEqual�r
�args�kwargss   rr�r��s��+�7�4�*�+�T�<�V�<�<rc�.�t|t�|i|��Sr$)r:�_assertRaisesRegexr�s   rr�r��s��,�7�4�+�,�d�=�f�=�=rc�.�t|t�|i|��Sr$)r:�_assertRegexr�s   rr�r��s��&�7�4��&��7��7�7rc�.�t|t�|i|��Sr$)r:�_assertNotRegexr�s   rr�r��s��)�7�4��)�4�:�6�:�:r�execc�j�	|�|�}|j|ur|j|��|�#d}d}wxYwr$)�
__traceback__�with_traceback)r-r=�tbs   r�reraiser��sC��	��}�����"�"�"�,��*�*�2�.�.��K���E��B�s�*,�2c��|�1tjd�}|j}|�|j}~n|�|}t	d�y)zExecute code in a namespace.Nr�zexec _code_ in _globs_, _locs_)r�	_getframe�	f_globals�f_localsr�)�_code_�_globs_�_locs_�frames    r�exec_r��sB���?��M�M�!�$�E��o�o�G��~������
�^��F��
1�2rzedef reraise(tp, value, tb=None):
    try:
        raise tp, value, tb
    finally:
        tb = None
)rzrdef raise_from(value, from_value):
    try:
        raise value from from_value
    finally:
        value = None
c��|�r$r)r=�
from_values  r�
raise_fromr��s���r�printc�Z�
�|jdtj��
�
�y�
fd�}d}|jdd�}|�.t|t�rd}nt|t
�st
d��|jdd�}|�.t|t�rd}nt|t
�st
d	��|rt
d
��|s|D]}t|t�s�d}n|rt	d�}t	d�}nd}d}|�|}|�|}t|�D]\}	}|	r||�||��||�y)
z4The new-style print function for Python 2.4 and 2.5.�fileNc���t|t�st|�}t�t�rIt|t�r9�j
�-t
�dd�}|�d}|j�j
|�}�j|�y)N�errors�strict)	rn�
basestring�strr�r��encodingr:r��write)�datar��fps  �rr�zprint_.<locals>.write�sk����d�J�/��4�y���2�t�$��t�W�-��K�K�+� ��X�t�4���>�%�F��{�{�2�;�;��7���H�H�T�NrF�sepTzsep must be None or a string�endzend must be None or a stringz$invalid keyword arguments to print()�
� )�popr�stdoutrnr�r��	TypeError�	enumerate)r�r�r��want_unicoder�r��arg�newline�spacer�r�s          @r�print_r��s.���
�Z�Z���
�
�
+��
�:��	����j�j���%���?��#�w�'�#����S�)�� >�?�?��j�j���%���?��#�w�'�#����S�)�� >�?�?���B�C�C�����c�7�+�#'�L�����d�m�G��C�L�E��G��E��;��C��;��C���o�F�A�s���c�
��#�J�&�	�c�
rc��|jdtj�}|jdd�}t	|i|��|r|�|j�yyy)Nr��flushF)�getrr�r��_printr�)r�r�r�r�s    rr�r�/sJ��
�Z�Z���
�
�
+���
�
�7�E�*��������R�^��H�H�J�$�5rzReraise an exception.c���|D]}	t||�}t|||��|D](}t||�jt||i���*||_|S#t$rY�`wxYwr$)r:r(r+�update�__wrapped__)�wrapper�wrapped�assigned�updatedr;r=s      r�_update_wrapperr>sx���D�
.����.�����u�-�
��D��G�T�"�)�)�'�'�4��*D�E��%������"�
��
�s�A�	A$�#A$c�<�tjt|||��S)N�rrr)r��partialrrs   r�wrapsr	Ns ��� � ��'�*2�G�E�	Erc�Z���G��fd�dt�}tj|ddi�S)z%Create a base class with a metaclass.c�0��eZdZ��fd�Ze��fd��Zy)�!with_metaclass.<locals>.metaclassc���tjdddk\rtj��}|�ur�|d<n�}�|||�S)Nr)r��__orig_bases__)r�version_infor��
resolve_bases)rr�
this_basesr��resolved_bases�bases�metas     ��r�__new__z)with_metaclass.<locals>.metaclass.__new___sQ��������#�v�-�"'�!4�!4�U�!;��!��.�*/�A�&�'�!&����n�a�0�0rc�(���j|��Sr$)�__prepare__)rrrrrs   ��rrz-with_metaclass.<locals>.metaclass.__prepare__js����#�#�D�%�0�0rN)rrrr�classmethodr)rrs��r�	metaclassr]s���		1�
�	1�
�	1rr�temporary_classr)rvr)rrrs`` r�with_metaclassrXs'���
1�D�1� �<�<�	�#4�b�"�=�=rc����fd�}|S)z6Class decorator for creating a class with a metaclass.c�n��|jj�}|jd�}|�+t|t�r|g}|D]}|j|��|jdd�|jdd�t
|d�r|j|d<�|j|j|�S)N�	__slots__r]�__weakref__r)
r]�copyr�rnr�r�rsrr�	__bases__)r�	orig_vars�slots�	slots_varrs    �rrzadd_metaclass.<locals>.wrapperrs�����L�L�%�%�'�	��
�
�k�*�����%��%����"�	��
�
�i�(�#��
�
�j�$�'��
�
�m�T�*��3��'�(+�(8�(8�I�n�%�����s�}�}�i�@�@rr)rrs` r�
add_metaclassr&ps���A��Nrc��t|t�r|St|t�r|j||�St	dt|�z��)z�Coerce **s** to six.binary_type.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> encoded to `bytes`
      - `bytes` -> `bytes`
    �not expecting type '%s')rn�binary_type�	text_typer�r�rv�r�r�r�s   r�
ensure_binaryr,�sC���!�[�!����!�Y���x�x��&�)�)�
�-��Q��7�
8�8rc�&�t|�tur|Str"t|t�r|j||�Str"t|t�r|j||�St|ttf�stdt|�z��|S)z�Coerce *s* to `str`.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    r()
rvr��PY2rnr*r�r4r)�decoder�r+s   r�
ensure_strr0�sw���A�w�#�~���
�z�!�Y�'��x�x��&�)�)�	��A�{�+��x�x��&�)�)�
��I�{�3�
4��1�D��G�;�<�<��Hrc��t|t�r|j||�St|t�r|St	dt|�z��)z�Coerce *s* to six.text_type.

    For Python 2:
      - `unicode` -> `unicode`
      - `str` -> `unicode`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    r()rnr)r/r*r�rvr+s   r�ensure_textr2�sC���!�[�!��x�x��&�)�)�	�A�y�	!����1�D��G�;�<�<rc��tr?d|jvrtd|jz��|j|_d�|_|S)a
    A class decorator that defines __unicode__ and __str__ methods under Python 2.
    Under Python 3 it does nothing.

    To support Python 2 and 3 with a single code base, define a __str__ method
    returning text and apply this decorator to the class.
    �__str__zY@python_2_unicode_compatible cannot be applied to %s because it doesn't define __str__().c�@�|j�jd�S)N�utf-8)�__unicode__r�rs r�<lambda>z-python_2_unicode_compatible.<locals>.<lambda>�s��T�%5�%5�%7�%>�%>�w�%Gr)r.r]�
ValueErrorrr4r7)rss r�python_2_unicode_compatibler:�sL����E�N�N�*��J�"�^�^�,�-�
-�"�M�M���G��
��Lr�__spec__r$rR)r6r�)�r�
__future__rr�r��operatorrr��
__author__�__version__rr.r4�PY34r��string_types�int�
integer_typesrv�class_typesr*�bytesr)�maxsize�MAXSIZEr��long�	ClassTyper��platform�
startswith�objectr	�len�
OverflowError�importlib.utilrrr r"r1�
ModuleTyperBrIrTrrXr~rEr;r(rrnr^r�r��_urllib_parse_moved_attributesr�_urllib_error_moved_attributesr!� _urllib_request_moved_attributesrG�!_urllib_response_moved_attributesrN�$_urllib_robotparser_moved_attributesrRr[r^�
_meth_func�
_meth_self�
_func_closure�
_func_code�_func_defaults�
_func_globalsrlrn�	NameErrorrxr|r�r�r�r��
attrgetter�get_method_function�get_method_self�get_function_closure�get_function_code�get_function_defaults�get_function_globalsr�r�r�r��methodcallerr�r�r�r�r��chr�unichr�struct�Struct�pack�int2byte�
itemgetterr��getitemr�r��	iterbytesr�r��BytesIOr�r�r�r�rr�r�r�r�r�r�r:r�r�r�r�r�r��WRAPPER_ASSIGNMENTS�WRAPPER_UPDATESr�update_wrapperr	rr&r,r0r2r:rr�__package__�globalsr�r;�submodule_search_locations�	meta_pathr�r��importer�appendrrr�<module>rxs���*=�&����
��
6�
���
���q��Q���	���q��Q���
����!���&����4�L��D�M��%�K��I��K��k�k�G��;�L��$�K�M�����)�K��I��K�
�|�|���v�&��m�$��	��	�	)����H��-�(�G�
��/����
����"�*��*�%�"�"��*�Z�*�2G
�6�G
�R
!��*�	��+��F��;��T�:�>�F��8�[�*�i��J�F��=�+�{�N�M�Z�F��7�M�:�{�G�L�	F�
�8�]�E�2�F��5�+�z�6�5�A�
F��8�T�4��H�=�F��9�d�D�(�I�>�F��;�
�L�9�F��7�M�:�x��I�F��?�M�$�;�E�S[�\�F��8�]�K�8�F��=�'�7�G�<�F��:�z�4�0�F��:�z�=�9�F� �:�z�=�9�!F�"�<��}�=�#F�$�8�]�J��'�J�%F�&�5�+�z�6�5�A�'F�(�=�+�{�N�M�Z�)F�*�
�M�*�+F�,���/�-F�.�!�=�s�GW�GW�[a�Ga�2C�gt�u�/F�0�	�:�&�1F�2�	�6�9�-�3F�4�
�E�:�.�5F�6���C�DT�DT�W]�D]��cl�m�7F�8� �+�/?�@�9F�:���.�9�;F�<��!1�?�C�=F�>�
�|�]�;�?F�@�
�y�-�8�AF�B�!�#3�5F�G�CF�D�"�$5�7I�J�EF�F�&�(=�?U�V�GF�H�)�+C�E^�_�IF�J�!�#3�5F�G�KF�L� �"2�M�B�MF�N���-�@�OF�P�"�$6�
�F�QF�R�	�9�h�/�SF�T���!�UF�V�	�6�"�WF�X���/�YF�Z�	�8�Y�/�[F�\�	�9�%�]F�^� �(�,<�=�_F�`�$�l�4H�I�aF�b�&��8N�O�cF�d�&��8N�O�eF�f�
�u�m�4�gF�h�
�u�m�4�iF�j�#�]�4G�H�kF�l�
�w�
�6�mF�n�&�(8�&�(�oF�r�&�(8�&�(�sF�v�&��8L�M�wF�x���.�9�yF�z�$�n�6J�K�{F�|�(�*:�&�(�}F�@���+@� @�.�Q�AF�B���+@� @�.�Q�CF�D��(�_�4�h��6P�Q�EF�F�$�m�5I�J�GF�H���o�>�IF�J��!5��G�KF��P�<�<�7����H�i�(����
�D��K����D�)��$��$����d�H�t�y�y�$8�9�
�	� 1����H�x�'�(��	���e�W�%�B�K�B��=�*�n�=��=�*�n�=��:�z�>�:��;�
�N�;��;�
�N�;��9�j�.�9��:�z�>�:��:�z�>�:��<��^�<��<��^�<��7�H�n�5��<��>�:��9�h��7��>�8�^�<��%�x���L^�_��;��.�9��<��>�:��:�x��8��;��.�9��<��>�:��?�J��?��=�*�n�=��=�*�n�=��<��^�<��?�J��?�3"��6
+�D��)�4�9�9�d�;�
+��2P��/�	���3�H�?T�4T�U�*�,@�B�B�K�B��:�y�.�9��;�	�>�:��)�8�^�D�"��

+�D��)�4�9�9�d�;�
+��2P��/�	���3�H�?T�4T�U�*�,@�B�D�k�D�
$$��9�i�)9�:�$$��#�Y�0@�A�$$��>�9�.>�?�$$��>�8�-=�>�	$$�
�>�8�-=�>�$$��<��+;�<�
$$��9�i�)9�:�$$��#�Y�0@�A�$$��,�i�9I�J�$$��(�)�5E�F�$$��(�)�5E�F�$$��>�9�.>�?�$$��=�)�-=�>�$$��$�i�1A�B�$$��4�i�AQ�R�$$� �-�y�:J�K�!$$�"�)�9�6F�G�#$$�$�*�I�7G�H�%$$�&�.�	�;K�L�'$$�(�*�I�7G�H�)$$�*�+�Y�8H�I�+$$�,�=�)�-=�>�-$$�.�>�9�.>�?�/$$�0�=�)�-=�>�1$$�2�<��,<�=�3$$�4�$�i�1A�B�5$$�6�#�Y�0@�A�7$$�8�'��4D�E�9$$�:�=�(�,<�=�;$$�<�<��+;�<�=$$�>�;��*:�;�?$$�@�#�X�/?�@�A$$�B�>�8�-=�>�C$$�D�$�i�1A�B�E$$�F�$�i�1A�B�G$$� �J
-�D��+�T�Y�Y��=�
-��4T��1�	���5�h�AX�6X�Y�,�.D�F�E�{�E��9�h�(9�:��>�8�->�?��9�h�(9�:��<��+<�=�	%�!�
.�D��,�d�i�i��>�
.��5V� �2�	���6�x�BZ�7Z�[�-�/F�H�H�+�H��$�m�5I�J�(�$�
1�D��/����D�A�
1��8\�#�5�	���9�(�E`�:`�a�0�2L�N�H�e�.�.�H�
���-�h��.H�I�$�&�*�
?���J��J�!�M��J�#�N�!�M��J��J�"�M��J�$�N�"�M������P��H��� �*�*����H��:�1�-�6�-�
�H��	�	B�D�*�h�)�)�*�5��%�(�%�%�j�1��*�x�*�*�=�9��'�H�'�'�
�3��+��+�+�N�;��*�x�*�*�=�9���"�$�#�#�%�x�$�$�V�,�H�&��&�&�x�0�J�%��%�%�g�.�I� �"�!�!�%�x�$�$�Z�0�H�&��&�&�|�4�J�%��%�%�k�2�I���F�G���J�K���	J�L���	M�O��#��
�F���v�}�}�T�"�'�'�H��"�x�"�"�1�%�H��!�!�J��I�
��{�{�H��j�j�G�
�*��
�����a��1��,��2��0��$��*���D�
�F��H���!�	�!�!�)�.�.�#�6�I��!�*�*�*�H�w�*��-��(�L�.�O���������=�>�8�;���E�N�N�F�+�E�	�
3�
������B�Q��$��	����
�����$�	/��	�>�4�j���B�Q��&� �
�F��	��-�.����A�a��6�!�"+�!>�!>� )� 9� 9�
�(�6�6�>�>�O�� )� =� =��/�/�E��O�O�+�+�E�M�
�O�O�E�>�0�$9�$
�.=�&�*����
�9�=�=���(�*,�H�'��=�=� ����/���8�

��N�#�#�'=�=��
�
��)��
�
�a� ��0�	
�8��
�
���Y���I�	)��-�(�G�	)��@������P�P�P�s6�<
u3�"v�'v�3
v�v�	v�v�	v$�#v$python3.12/site-packages/pip/_vendor/__pycache__/typing_extensions.cpython-312.pyc000064400000356271151732701640024065 0ustar00�

R`i����ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
gd�ZdZe
ZGd�d�Ze�Zefd�Zej$dk\rd�Znej$d	k\rd
�Znd�Zd�d�Ze	j*Ze	j,d
�Ze	j,d�Ze	j,d�Ze	j,dd��Ze	j,dd��Zej$dk\rddl	mZnGd�de
�ZGd�de��Ze	j<ZGd�de	j>d��Z e!e	d�rej$ddd k\r
e	jDZ"nGd!�d"e d��Z#e#dd#�$�Z"ej$dk\r
e	jHZ$nd%�Z$d&�Z%ej$d'k\r
e	jLZ&n3d(�Z'd)�Z(Gd*�d+e	jRd��Z*Gd,�d-e d��Z+e+d.�$�Z&e	jXZ,e!e	d/�r%e	jZZ-e	j\Z.e	j^Z/n6ej`ejbej`e2��Z3d0�Z-d1�Z.d2�Z/e	jhZ4e	jjZ5e	jlZ6e	jnZ7e	jpZ8e	jrZ9e	jtZ:e	jvZ;e	jxZ<e!e	d3�r
e	jzZ=ne	j|ejzeef�Z=e	j~Z?e	j�Z@e	j�ZAe	j�ZBe	j�ZCgd4�d5d6gd7gd8�ZDhd9�ZEej$d:kreEhd;�zZEej$d	k\reEj�d<�ej$d=k\reEj�d>�eGeE�ZEd?�ZHd@�ZId�dA�ZJej$d=k\r
e	j�ZKnd�dB�ZLdC�ZMej$d:k\re	j�ZNe
eN�ZOneZNej�ZOGdD�dEeO�ZQeRdF��ZSej$d:k\rGdG�dHe	j�eQ��ZKnGdI�dHeQ��ZKej$d:k\r
e	j�ZUndJ�ZUeUZVej$d=k\rUe	j�ZWe	j�ZXe	j�ZYe	j�ZZe	j�Z[e	j�Z\e	j�Z]nveUGdK�dLeK��ZWeUGdM�dNeK��ZXeUGdO�dPeK��ZYeUGdQ�dReK��ZZeUGdS�dTeK��Z[eUGdU�dVeKe��Z\eUGdW�dXeKe��Z]dY�Z^ej$dZk\r%e	j�Z_e	j�Z`e	j�Zan�d[ej�e	j��j�vZeej$d:k\rdHZfnd\ZfGd]�d^e
�Z`e
j�e`d_d`i�Zhe^da��efddb�dc��Z_e!e	d^�re	j�e`fZine`fZidd�Zae!e	de�r
e	j�Zjndf�Zje!e	dg�r
e	j�Zkndh�Zld�dj�Zke!e	dk�re	j�Zme	j�Znn!Gdl�dme	jRd��ZnGdn�dk�Zmej$dddk\re	j�Zoe	j�Zpn	ddol	mqZq	ddpl	msZtdq�Zodr�Zpe!e	ds�r
e	j�Zun%ej$ddd	k\r	e dt��Zun
e dsdu�$�Zudv�Zvdw�ZwGdx�dy�ZxGdz�d{e
�ZyGd|�d}ey��Ze!e	d~�re	j�Zze	j�Z{n Gd�d��Z|Gd��d~e|�ZzGd��d�e|�Z{e!e	d��r
Gd��d�ey��Z}nGd��d�e~ex�Z}e!e	d��sGd��d�e~�Ze	�jd���Z�e!e	d��re	�jZ�e	j�Zn2ej$ddd	k\r	e d���Z�nGd��d�e d��Z�e�d�d��$�Z�e!e	d��re	�jZ�n2ej$ddd	k\r	e d���Z�nGd��d�e d��Z�e�d�d��$�Z�Gd��d�e	�jd��Ze!e	d��re	�jZ�ned���Z�e!e	d��re	�jZ�ned���Z�e!e	d��re	�jZ�ned���Z�e!e	dg�re	�jZ�e	�jZ�nDej$ddd	k\re d���Z�e d���Z�n!Gd��d�e d��Z�e�dgd��$�Z�e�d�d��$�Z�d�Z�ej$d=k\re	�jZ�d��Z�nsej$ddd	k\r0Gd��d�e d��Z�Gd��d�e	jRd��Z�e�d���Z�d��Z�n1Gd��d�e	jRd��Z�Gd��d�e d��Z�e�d�e��$�Z�d��Z�e!e	d��r
Gd��d�ey��Z�nGd��d�ex�Z�e!e	d��re	�j(Z�nd�ed�efd��Z�e!e	d��re	�j*Z�nd�e�d�e�fd��Z�ej$d=k\re	�j,Z�n�ddididid`d��d�e�d�e�d�e�d�e�d�e	�j0e	�j2e	jhe	j8e	�j4d�e	j8ffd�fd�e	j8d�e	�j4egeffd„Z�e!e	dëre	�j6Z�n6e	j,d�e	�j4d�e	j8f�ūZ�d�e�d�e�fdƄZ�e!e	dǫre	�j:Z�nNe	j,dȫZ�e�d�dʜd�e�d�e	�jBe	jhe�d�e�d�e	�j4e�ge�ffd΄Z�e!e	d��see	_ee	_ej$dZk\re	�jHZ�n�d�dτZ�e	�jLZ�eGhdУ�Z�Gdфd�e
�Z�e
j�e�d�d`i�Z�dԄZ�e^e��efdՄ�Z�ej$d:k\r0d�Z�e�e�e�j\�re�e�_�ne�e��j`_�e!ejd7�rej�jbZ�nLGdׄd7e�jd�Z�e��jge��e��jge��e��jge��e!edثre�jnZ�ndلZ�ej$dk\re	�jpZ�n
Gdڄd۫Z�e!e	dܫre	�jrZ�n
d݄Z�GdބdܫZ�e!e	d߫re	�jvZ�e	�jxZ�nd�e
d�e�fd�Z�d�e
d�e	�jze�fd�Z�e	�j|Z�e	�j~Z�e	�j�Z�e	�j4Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�jzZ�e	�j�Z�e	j�ZTe	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�jBZ�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j0Z�e	�j2Z�e	�j�Z�e	�j�Z�e	�j�Z�e	�j�Z�y#er$re	jRZqY���wxYw#er$re	jRZtY���wxYw)��N)i�Any�ClassVar�Concatenate�Final�
LiteralString�	ParamSpec�
ParamSpecArgs�ParamSpecKwargs�Self�Type�TypeVar�TypeVarTuple�Unpack�	Awaitable�
AsyncIterator�
AsyncIterable�	Coroutine�AsyncGenerator�AsyncContextManager�Buffer�ChainMap�ContextManager�Counter�Deque�DefaultDict�
NamedTuple�OrderedDict�	TypedDict�SupportsAbs�
SupportsBytes�SupportsComplex�
SupportsFloat�
SupportsIndex�SupportsInt�
SupportsRound�	Annotated�assert_never�assert_type�clear_overloads�dataclass_transform�
deprecated�
get_overloads�final�get_args�
get_origin�get_original_bases�get_protocol_members�get_type_hints�IntVar�is_protocol�is_typeddict�Literal�NewType�overload�override�Protocol�reveal_type�runtime�runtime_checkable�Text�	TypeAlias�
TypeAliasType�	TypeGuard�
TYPE_CHECKING�Never�NoReturn�Required�NotRequired�AbstractSet�AnyStr�BinaryIO�Callable�
Collection�	Container�Dict�
ForwardRef�	FrozenSet�	Generator�Generic�Hashable�IO�	ItemsView�Iterable�Iterator�KeysView�List�Mapping�MappingView�Match�MutableMapping�MutableSequence�
MutableSet�Optional�Pattern�
Reversible�Sequence�Set�Sized�TextIO�Tuple�Union�
ValuesView�cast�
no_type_check�no_type_check_decoratorTc��eZdZd�Zy)�	_Sentinelc��y)Nz
<sentinel>���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/typing_extensions.py�__repr__z_Sentinel.__repr__�s���N��__name__�
__module__�__qualname__rsrortrrrmrm�s��rtrmc
��|st|�d���|tur;t|d�r|jst|�d���t	|j�}t	|�}||k7rot|d�rE|jD�cgc]}t|�r�|��}}t
d�|D��}|dkDr	|||z
k\rytd||kDrdnd�d	|�d
|�d|����ycc}w)z�Check correct count for parameters of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
    z is not a generic class�__parameters__c3�<K�|]}t|t����y�w�N)�
isinstancer��.0�ps  rr�	<genexpr>z!_check_generic.<locals>.<genexpr>�s����P�Z��
�1�l� ;�Z���rNzToo �many�fewz parameters for z	; actual z, expected )�	TypeError�_marker�hasattrrz�len�
_is_unpack�sum)�cls�
parameters�elen�alenr��
num_tv_tupless      rr�_check_genericr��s�����3�%�6�7�8�8��w���s�,�-�S�5G�5G��s�e�#:�;�<�<��3�%�%�&���z�?�D��t�|��3�(�)�%(�%7�%7�M�%7��z�!�}�!�%7�J�M��P�Z�P�P�M���!���}�0D�(D���$����v�%�@�@P�QT�PU�V#�#'�&��D�6�;�<�	<�
��Ms�>C�C���
c�t�t|tjtjtj
f�Sr|)r}�typing�
_GenericAlias�_types�GenericAlias�	UnionType��ts rr�_should_collect_from_parametersr��s-���
��$�$�f�&9�&9�6�;K�;K�L�
�	
rt�r��	c�V�t|tjtjf�Sr|)r}r�r�r�r�r�s rrr�r��s ���!�f�2�2�F�4G�4G�H�I�Irtc�T�t|tj�xr
|jSr|)r}r�r��_specialr�s rrr�r��s ���!�V�1�1�2�E�1�:�:�~�Ertc�$�|�tj}g}|D]h}t||�r ||vrt|�s|j	|�t|�s�;|j
|jD�cgc]	}||vs�|��c}��jt|�Scc}w)z�Collect all type variable contained in types in order of
    first appearance (lexicographic order). For example::

        _collect_type_vars((T, List[S, T])) == (T, S)
    )	r�r
r}r��appendr��extendrz�tuple)�types�
typevar_types�tvarsr�s    rr�_collect_type_varsr��s��������
��E�
���q�-�(�
�U�N��1�
��L�L��O�*�1�-��L�L�Q�%5�%5�H�%5���%��!�%5�H�I����<���Is�+	B
�5B
�T�KT�VT�T_co)�	covariant�T_contra)�
contravariant)r��)rc�(��eZdZ�fd�Z�fd�Z�xZS)�_AnyMetac�H��|turtd��t�|�
|�S)Nz6typing_extensions.Any cannot be used with isinstance())rr��super�__instancecheck__)rq�obj�	__class__s  �rrr�z_AnyMeta.__instancecheck__�s&����s�{�� X�Y�Y��7�,�S�1�1rtc�2��|turyt�|�	�S)Nztyping_extensions.Any)rr�rs)rqr�s �rrrsz_AnyMeta.__repr__�s����s�{�.��7�#�%�%rt)rvrwrxr�rs�
__classcell__�r�s@rrr�r��s���	2�
	&�	&rtr�c�"��eZdZdZ�fd�Z�xZS)raqSpecial type indicating an unconstrained type.
        - Any is compatible with every type.
        - Any assumed to have all methods.
        - All values assumed to be instances of Any.
        Note that all the above statements are true from the point of view of
        static type checkers. At runtime, Any should not be used with instance
        checks.
        c�P��|turtd��t�|�|g|��i|��S)NzAny cannot be instantiated)rr�r��__new__�r��args�kwargsr�s   �rrr�zAny.__new__�s/����c�z�� <�=�=��7�?�3�8��8��8�8rt)rvrwrx�__doc__r�r�r�s@rrrr�s���	�	9�	9rtr)�	metaclassc��eZdZd�Zy)�_ExtensionsSpecialFormc� �d|jzS�Nztyping_extensions.��_namerps rrrsz_ExtensionsSpecialForm.__repr__�s��#�d�j�j�0�0rtNrurortrrr�r��s��1rtr�)�_rootr�)r��c��eZdZd�Zy)�
_FinalFormc�v�tj||j�d��}tj||f�S�N� accepts only a single type.�r��_type_checkr�r��rqr��items   rr�__getitem__z_FinalForm.__getitem__�9���%�%�j�)-����4P�&Q�S�D��'�'��t�g�6�6rtN�rvrwrxr�rortrrr�r����	7rtr�aWA special typing construct to indicate that a name
                       cannot be re-assigned or overridden in a subclass.
                       For example:

                           MAX_SIZE: Final = 9000
                           MAX_SIZE += 1  # Error reported by type checker

                           class Connection:
                               TIMEOUT: Final[int] = 10
                           class FastConnector(Connection):
                               TIMEOUT = 1  # Error reported by type checker

                       There is no runtime checking of these properties.)�docc�B�	d|_|S#ttf$rY|SwxYw)a�This decorator can be used to indicate to type checkers that
        the decorated method cannot be overridden, and decorated class
        cannot be subclassed. For example:

            class Base:
                @final
                def done(self) -> None:
                    ...
            class Sub(Base):
                def done(self) -> None:  # Error reported by type checker
                    ...
            @final
            class Leaf:
                ...
            class Other(Leaf):  # Error reported by type checker
                ...

        There is no runtime checking of these properties. The decorator
        sets the ``__final__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.
        T)�	__final__�AttributeErrorr�)�fs rrr-r-s5��,	��A�K�����	�*�	�
���	�����c�,�tj|�Sr|)r�r
)�names rrr3r3<s���>�>�$��rt)r�r��c��g}|D]?}t|t�r|j|j��/|j	|��At|�S)zJAn internal helper for Literal creation: flatten Literals among parameters)r}�_LiteralGenericAliasr��__args__r�r�)r��paramsr�s   rr�_flatten_literal_paramsr�DsD�����A��!�1�2��
�
�a�j�j�)��
�
�a� �	�
�V�}�rtc#�8K�|D]}|t|�f���y�wr|)�type)r�r�s  rr�_value_and_type_iterr�Ns�����A��T�!�W�*���s�c��eZdZd�Zd�Zy)r�c��t|t�stStt	|j
��}tt	|j
��}||k(Sr|)r}r��NotImplemented�setr�r�)rq�other�these_args_deduped�other_args_dedupeds    rr�__eq__z_LiteralGenericAlias.__eq__SsI���e�%9�:�%�%�!$�%9�$�-�-�%H�!I��!$�%9�%�.�.�%I�!J��%�);�;�;rtc�P�ttt|j���Sr|)�hash�	frozensetr�r�rps rr�__hash__z_LiteralGenericAlias.__hash__Zs���	�"6�t�}�}�"E�F�G�GrtN)rvrwrxr�r�rortrrr�r�Rs
��	<�	Hrtr�c��eZdZdefd�Zd�Zy)�_LiteralFormr�c�.�d|_|x|_|_y)Nr6)r��_docr�)rqr�s  rr�__init__z_LiteralForm.__init__^s��"�D�J�'*�*�D�I��rtc�r�t|t�s|f}t|�}tt	|��}	t|�}t
|�t
|�krHg}|D],}||vs�|j|d�|j|��.|rJ|��t|�}	t||�S#t$rY�wxYw)Nr)r}r�r��listr�r�r�r��remover�r�)rqr��val_type_pairs�
deduped_pairs�new_parameters�pairs      rrr�z_LiteralForm.__getitem__bs����j�%�0�(�]�
�0��<�J�!�"6�z�"B�C�N�
7� #�N� 3�
��}�%��N�(;�;�%'�N� .���=�0�*�1�1�$�q�'�:�)�0�0��6�!/� -�;�m�;�,�!&�~�!6�J�'��j�9�9���
��
�s�B*�*	B6�5B6N)rvrwrx�strr�r�rortrrr�r�]s��	+��	+�	:rtr�a�                           A type that can be used to indicate to type checkers
                           that the corresponding value has a value literally equivalent
                           to the provided parameter. For example:

                               var: Literal[4] = 4

                           The type checker understands that 'var' is literally equal to
                           the value 4 and no other value.

                           Literal[...] cannot be subclassed. There is no runtime
                           checking verifying that the parameter is actually a value
                           instead of a type.r,c��t|d|�}	|t|j|j|jj
<tS#t$rYtSwxYw)a�Decorator for overloaded functions/methods.

        In a stub file, place two or more stub definitions for the same
        function in a row, each decorated with @overload.  For example:

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...

        In a non-stub file (i.e. a regular .py file), do the same but
        follow it with an implementation.  The implementation should *not*
        be decorated with @overload.  For example:

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...
        def utf8(value):
            # implementation goes here

        The overloads for a function can be retrieved at runtime using the
        get_overloads() function.
        �__func__)�getattr�_overload_registryrwrx�__code__�co_firstlinenor��_overload_dummy)�funcr�s  rrr8r8�sg��<
�D�*�d�+��	��
�q�|�|�,�Q�^�^�<��
�
�)�)�
�����	����	�s�7A�	A�Ac���t|d|�}|jtvrgSt|j}|j|vrgSt	||jj��S)z6Return all defined overloads for *func* as a sequence.r)rrwrrxr��values)rr��mod_dicts   rrr,r,�s`��
�D�*�d�+���<�<�1�1��I�%�a�l�l�3���>�>��)��I��H�Q�^�^�,�3�3�5�6�6rtc�,�tj�y)z$Clear all overloads in the registry.N)r�clearrortrrr)r)�s��� � �"rtr)rJrrUrVrrRrdrLrKrar�AbstractContextManager�AbstractAsyncContextManagerr)zcollections.abc�
contextlib�typing_extensions>r�r��__dict__r��	__slots__rw�__weakref__�_is_protocol�__orig_bases__�__orig_class__rz�__annotations__�__subclasshook__�__protocol_attrs__�__abstractmethods__�_is_runtime_protocol�_MutableMapping__marker�__callable_proto_members_only__)r��>�_gorgr��	__extra__�
__origin__�
__tree_hash__�__next_in_mro__�__class_getitem__)r���__type_params__c��t�}|jddD]`}|jdvr�t|di�}g|j�|��D].}|jd�r�|tvs�|j|��0�b|S)N���>rQr:r�_abc_)r��__mro__rvrr�
startswith�_EXCLUDED_ATTRS�add)r��attrs�base�annotations�attrs     rr�_get_protocol_attrsr6sz���E�E����C�R� ���=�=�3�3���d�$5�r�:��2�d�m�m�2�k�2�D��O�O�G�,��_�1L��	�	�$��3�	!��Lrtc	�B��g}d|jvr�t|j�}d}|jD]o}t|tj
�s�|jtjtfvs�A|jj}|�td��|j}�q|�|}ndt|�}t|��|�ksGdj�fd�|D��}djd�|D��}td|�d�d	|�d
���|}t|�|_y)z�Helper function used in Protocol.__init_subclass__ and _TypedDictMeta.__new__.

    The contents of this function are very similar
    to logic found in typing.Generic.__init_subclass__
    on the CPython main branch.
    rNzECannot inherit from Generic[...] and/or Protocol[...] multiple types.�, c3�>�K�|]}|�vs�t|����y�wr|�r)rr��gvarsets  �rrr�z+_maybe_adjust_parameters.<locals>.<genexpr>:s�����"M�5�a�A�W�<L�3�q�6�5�s�	�c3�2K�|]}t|����y�wr|r:)r�gs  rrr�z+_maybe_adjust_parameters.<locals>.<genexpr>;s����"9�5�a�3�q�6�5���zSome type variables (z) are not listed in �[�])rr�rr}r�r�r%rQr:rvr�rzr��joinr�)	r�r��gvarsr3�the_base�tvarset�s_vars�s_argsr;s	        @rr�_maybe_adjust_parametersrGs'���
�E��3�<�<�'�"�3�#5�#5�6�����&�&�D��4��!5�!5�6��O�O�����'A�A��?�?�3�3���$�#�@�A�A��+�+��'��=��E��%�j�G��%�j�G��g�%����"M�5�"M�M�����"9�5�"9�9���"7��x�@2�2:��1�V�H�A�!G�H�H��E��u��C�rtc��	tj|�jjdd�S#tt
f$rYywxYw)Nrv�__main__)�sys�	_getframe�	f_globals�getr��
ValueError��depths rr�_callerrQBs@����}�}�U�#�-�-�1�1�*�j�I�I���J�'����s�.1�A�Ac��t|�dvS)z�Allow instance and class checks for special stdlib modules.
        The abc and functools modules indiscriminately call isinstance() and
        issubclass() on the whole MRO of a user class, which may contain protocols.
        >N�abc�	functools)rQrOs rr�_allow_reckless_class_checksrUNs��
�u�~�!;�;�;rtc�D�t|�jrtd��y)Nz Protocols cannot be instantiated)r�rr��rqr�r�s   rr�_no_initrXUs ����:�"�"��>�?�?�#rtc�6�eZdZd�Zd�Zd�Zd�Zd�Zdefd�Z	y)	�
_ProtocolMetac��|dk(rt|�dkrn�ttht|�zrp|D]k}|tt
jtthvr�&|jtj|jg�vr�St|�r�_td|����tjj||||fi|��S)Nr:r�z5Protocols can only inherit from other protocols, got )r�r:�_typing_Protocolr��objectr�rQrv�_PROTO_ALLOWLISTrMrwr4r�rS�ABCMetar�)�mclsr��bases�	namespacer�r3s      rrr�z_ProtocolMeta.__new__js����z�!�c�%�j�1�n���,�-��E�
�:�!�D�������CS� T�T��=�=�,<�,@�,@����RT�,U�U�&�t�,�'�#�#'�(�,���
"��;�;�&�&�t�T�5�)�N�v�N�Nrtc����tjj�g|��i|��t�dd�r4t	���_t
�fd��j
D���_yy)NrFc3�J�K�|]}tt�|d�����y�wr|)�callabler)rr5r�s  �rrr�z)_ProtocolMeta.__init__.<locals>.<genexpr>�s$�����:�CY�4�H�W�S�$��5�6�CY��� #)rSr_r�rr6r�allr!�r�r�r�s`  rrr�z_ProtocolMeta.__init__zs_����K�K� � ��6�t�6�v�6��s�N�E�2�)<�S�)A��&�7:�:�CF�CY�CY�:�7��3�	3rtc��|turtj||�St|dd�rut	�skt|t�st
d��|js,|jjd�turt
d��t|dd�st
d��tjj||�S)NrFz"issubclass() arg 1 must be a classrz<Protocols with non-method members don't support issubclass()r�LInstance and class checks can only be used with @runtime_checkable protocols)
r:r��__subclasscheck__rrUr}r�r!rrM�_proto_hookrSr_�r�r�s  rrrkz_ProtocolMeta.__subclasscheck__�s����h���-�-�c�5�9�9���^�U�3�4�6�!�%��.�#�$H�I�I��;�;����(�(�);�<��K�#�V����s�$:�E�B�#�7����;�;�0�0��e�<�<rtc���|turtj||�St|dd�s tj
j||�St|dd�st
�std��tj
j||�ry|jD]4}	tj||�}|��tt||d��s�4yy#t$rYywxYw)NrFrrjT)
r:r�r�rrSr_rUr�r�inspect�getattr_staticr�re)r��instancer5�vals    rrr�z_ProtocolMeta.__instancecheck__�s����h���-�-�c�8�<�<��3���6��{�{�4�4�S�(�C�C��C�!7��?�0�2��!@�A�A��{�{�,�,�S�(�;���.�.���!�0�0��4�@�C��;�8�G�C��t�,D�#E���/���&�����s�C�	C �C c��tjj||�dury|tuxr|t	t
dt
��uS)NTr:)rSr_r�r:rr�r]rms  rrr�z_ProtocolMeta.__eq__�sA���{�{�!�!�#�u�-��5���x��R�E�W�V�Z���-R�$R�
rt�returnc�,�tj|�Sr|)r�r��r�s rrr�z_ProtocolMeta.__hash__�s���=�=��%�%rtN)
rvrwrxr�r�rkr�r��intr�rortrrrZrZcs(��	O� 	�	=�0	�>	�	&�S�	&rtrZc�t�|jjdd�stS|jD]�}|jD]o}||jvr|j|�
tccS�;t|di�}t
|tjj�s�^||vs�ct|�s�o��tcSy)NrFrT)rrMr�rr.rr}�collectionsrSrYr4)r�r�r5r3r4s     rrrlrl�s����|�|�����6�!�!��*�*�D��
�
���4�=�=�(��}�}�T�*�2�-�-��&�d�,=�r�B���{�K�O�O�,C�,C�D���+�#�E�*��&� &�%�#+�$rtc�V��eZdZejj
ZdZdZdZ�fd�Z	�xZ
S)r:roTFc�:��t�|�|i|��|jjdd�s!t	d�|j
D��|_d|jvrt|_|jr)|jtjurt|_	yyy)NrFc3�,K�|]}|tu���y�wr|�r:�r�bs  rrr�z-Protocol.__init_subclass__.<locals>.<genexpr>������*P�-�Q�1��=�-���r)r��__init_subclass__rrM�any�	__bases__rrlrr�r:rXr�s   �rrr�zProtocol.__init_subclass__�s������)�4�:�6�:��|�|�'�'���>�'*�*P�#�-�-�*P�'P�C�$�&�S�\�\�9�+6�C�(��#�#�����8I�8I�(I�#+�C�L�)J�#rt)rvrwrxr�r:r�rrrr�r�r�s@rrr:r:�s,����o�o�-�-�G��I��L�#(� �

,�

,rtr:c�X��eZdZdZdZdZdZ�fd�Zejd��Z
d�Z�xZS)r:aBase class for protocol classes. Protocol classes are defined as::

                class Proto(Protocol):
                    def meth(self) -> int:
                        ...

            Such classes are primarily used with static type checkers that recognize
            structural subtyping (static duck-typing), for example::

                class C:
                    def meth(self) -> int:
                        return 0

                def func(x: Proto) -> int:
                    return x.meth()

                func(C())  # Passes static type check

            See PEP 544 for details. Protocol classes decorated with
            @typing_extensions.runtime_checkable act
            as simple-minded runtime-checkable protocols that check
            only the presence of given attributes, ignoring their type signatures.

            Protocol classes can be generic, they are defined as::

                class GenProto(Protocol[T]):
                    def meth(self) -> T:
                        ...
            roTFc�H��|turtd��t�|�
|�S)NzIType Protocol cannot be instantiated; it can only be used as a base class)r:r�r�r�)r�r��kwdsr�s   �rrr�zProtocol.__new__ s.����(�?�#�%J�K�K��w��s�+�+rtc�X��t|t�s|f}|s+|tjurt	d|j
�d���d�t�fd�|D��}|tur�td�|D��sYd}t||tj�r#|dz
}t||tj�r�#t	d|dz�d	||����tt|��t|�k7r+t	d
��t||t|j��tj||�S)NzParameter list to z[...] cannot be emptyz*Parameters to generic types must be types.c3�J�K�|]}tj|�����y�wr|�r�r��rr��msgs  �rrr�z-Protocol.__class_getitem__.<locals>.<genexpr>.s�����J�6�a�v�1�1�!�S�9�6�rfc3�PK�|]}t|tj���� y�wr|)r}r�r
r~s  rrr�z-Protocol.__class_getitem__.<locals>.<genexpr>1s����M�f��z�!�V�^�^�<�f���$&rr�zBParameters to Protocol[...] must all be type variables. Parameter z is z.Parameters to Protocol[...] must all be unique)r}r�r�rfr�rxr:rgr
r�r�r�rzr�)r�r��ir�s   @rrr(zProtocol.__class_getitem__&s%���!�&�%�0�$�Y�F��#�V�\�\�"9�#�,�S�-=�-=�,>�>S�T�V�V�B���J�6�J�J���(�?��M�f�M�M���(����F�N�N�C���F�A�)����F�N�N�C�'�*�*+�a�%���V�A�Y�K�A�B�B��3�v�;�'�3�v�;�6�'�L�N�N�#�3���C�4F�4F�0G�H��+�+�C��8�8rtc���d|jvrtj|jv}ntj|jv}|rtd��t
|�|jjdd�s!td�|jD��|_	d|jvrt|_|jr)|jtjurt|_yyy)Nrz!Cannot inherit from plain Genericrc3�,K�|]}|tu���y�wr|r}r~s  rrr�z-Protocol.__init_subclass__.<locals>.<genexpr>Kr�r�r)rr�rQrr�r�rGrMr�rrlrr�r:rX)r�r�r��errors    rrr�zProtocol.__init_subclass__@s���#�s�|�|�3�"�N�N�c�.@�.@�@�E�"�N�N�c�m�m�;�E��#�$G�H�H�(��-��|�|�'�'���=�'*�*P�#�-�-�*P�'P�C�$�&�S�\�\�9�+6�C�(��#�#�����8I�8I�(I�#+�C�L�)J�#rt)
rvrwrxr�rrrr�r��	_tp_cacher(r�r�r�s@rrr:r:�s>���
�:�I��L�#(� �
,��
�
�
9��
9�2
,rtc��t|t�st|tj�r
t|dd�st
d|����d|_|S)a4Mark a protocol class as a runtime protocol, so that it
        can be used with isinstance() and issubclass(). Raise TypeError
        if applied to a non-protocol class.

        This allows a simple-minded structural check very similar to the
        one-offs in collections.abc such as Hashable.
        rFz@@runtime_checkable can be only applied to protocol classes, got T)r}rZ�
issubclassr�rQrr�rrvs rrr=r=YsP����]�
+�z�#�v�~�~�/N���^�U�3��$�$'�7�,�-�
-�#'�� ��
rtc�>�eZdZdZdZejdefd��Zy)r$z(An ABC with one abstract method __int__.rortc��yr|rorps rr�__int__zSupportsInt.__int__~���rtN)	rvrwrxr�rrS�abstractmethodrwr�rortrrr$r$ys)��6��	�	�	�	�	�S�	�
�	rtr$c�>�eZdZdZdZejdefd��Zy)r"z*An ABC with one abstract method __float__.rortc��yr|rorps rr�	__float__zSupportsFloat.__float__�r�rtN)	rvrwrxr�rrSr��floatr�rortrrr"r"��)��8��	�	�	�	�	�u�	�
�	rtr"c�>�eZdZdZdZejdefd��Zy)r!z,An ABC with one abstract method __complex__.rortc��yr|rorps rr�__complex__zSupportsComplex.__complex__�r�rtN)	rvrwrxr�rrSr��complexr�rortrrr!r!�s)��:��	�	�	�	�	��	�
�	rtr!c�>�eZdZdZdZejdefd��Zy)r z*An ABC with one abstract method __bytes__.rortc��yr|rorps rr�	__bytes__zSupportsBytes.__bytes__�r�rtN)	rvrwrxr�rrSr��bytesr�rortrrr r �r�rtr c�:�eZdZdZej
defd��Zy)r#rortc��yr|rorps rr�	__index__zSupportsIndex.__index__�r�rtN)rvrwrxrrSr�rwr�rortrrr#r#�s&���	�	�	�	�	�s�	�
�	rtr#c�>�eZdZdZdZejdefd��Zy)rz_
        An ABC with one abstract method __abs__ that is covariant in its return type.
        rortc��yr|rorps rr�__abs__zSupportsAbs.__abs__�r�rtN)	rvrwrxr�rrSr�r�r�rortrrrr�s-��	��	�	�	�	�	�T�	�
�	rtrc�D�eZdZdZdZejddedefd��Z	y)r%za
        An ABC with one abstract method __round__ that is covariant in its return type.
        ro�ndigitsrtc��yr|ro)rqr�s  rr�	__round__zSupportsRound.__round__�r�rtN)r)
rvrwrxr�rrSr�rwr�r�rortrrr%r%�s4��	��	�	�	�	�	�S�	��	�
�	rtr%c����fd�}|S)Nc���tjjdk(r\tjdkrIt	|�t	��d�}t|jd|�}tj|�|�S�|_	|S)N�pypyr�)�__call__�__mro_entries__ro)
rJ�implementationr��version_info�staticmethodr�rvrT�update_wrapperr�)r�cls_dictr��mro_entriess   �rr�innerz#_ensure_subclassable.<locals>.inner�sq������"�"�f�,��1A�1A�F�1J�(��.�#/��#<��H��T�]�]�B��1�A��+�+�A�C��6�6�#.�D� ��Krtro)r�r�s` rr�_ensure_subclassabler��s���
��Lrt)r��
�module�	_Protocolc�"�eZdZdd�ZeZd�ZeZy)�_TypedDictMetac
���|D]1}t|�tus�|tjus�(t	d��td�|D��rtjf}nd}tj
ttg|�t��|�}||_	|jtk(r||_
t|d�s||_i}|jdi�}	d}
trD|	j�D��cic](\}}|tj ||
|j"����*}	}}n7|	j�D��cic]\}}|tj ||
���}	}}t%�}
t%�}|D]�}|j'|j(jdi��|
j'|j(jdd��|j'|j(jd	d����|j'|	�|	j�D]�\}}t+|�}|t,urt/|�}|r|d
}t+|�}|t0ur|
j3|��P|t4ur|j3|��j|r|
j3|��~|j3|���||_t9|
�|_t9|�|_t|d�s||_|Scc}}wcc}}w)aICreate new typed dict class object.

            This method is called when TypedDict is subclassed,
            or when TypedDict is instantiated. This way
            TypedDict supports all three syntax forms described in its docstring.
            Subclasses and instances of TypedDict return actual dictionaries.
            zHcannot inherit from both a TypedDict type and a non-TypedDict base classc3�PK�|]}t|tj���� y�wr|)r�r�rQr~s  rrr�z)_TypedDictMeta.__new__.<locals>.<genexpr>�s����@�%�Q�:�a����0�%�r�rorrz?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type�r��__required_keys__�__optional_keys__r�	__total__) r�r�r�rQr�r�r��
_fake_name�dictrvrxr�rrM�
_TAKES_MODULE�itemsr�rwr��updaterr/r&r.rEr1rFrr�r�r�r�)r�r�ra�ns�totalr3�generic_base�tp_dictr4�own_annotationsr��n�tp�
required_keys�
optional_keys�annotation_key�annotation_type�annotation_origin�annotation_argss                   rrr�z_TypedDictMeta.__new__�s�������:�^�3��F�N�N�8R�#�%E�F�F��
�@�%�@�@� &���0��!���l�l�>�:�?T��?T�t�?T�VX�Y�G�#�G���#�#�z�1�'+��$��7�$4�5�).��&��K� �f�f�%6��;�O�S�C��"1�!6�!6�!8�#�!8���2��v�)�)�"�c�'�:L�:L�M�M�!8� �#�"1�!6�!6�!8�#�!8���2��v�)�)�"�c�2�2�!8� �#� �E�M��E�M����"�"�4�=�=�#4�#4�5F��#K�L��$�$�T�]�]�%6�%6�7J�B�%O�P��$�$�T�]�]�%6�%6�7J�B�%O�P��

����/�3B�3H�3H�3J�/���$.��$?�!�$�	�1�&.��&?�O�&�*9�!�*<��,6��,G�)�$��0�!�%�%�n�5�&�+�5�!�%�%�n�5��!�%�%�n�5�!�%�%�n�5�4K�"'2�G�#�(1�-�(@�G�%�(1�-�(@�G�%��7�K�0�$)��!��N��Q#��
#s�)-K�-!K!c��td��)Nz4TypedDict does not support instance and class checks�r�rms  rrrkz _TypedDictMeta.__subclasscheck__/s���R�S�SrtN)T)rvrwrxr�r�r�rkr�rortrrr�r��s��H	�T��	T�.�rtr�rroc��tfSr|)�
_TypedDict�ras rr�<lambda>r�7s���
rt�r�c�b�|tus|�@|turd}nd}d|�d|�d�}|�d�|zdz}tj|td�	�|}n
|rt	d
��|rtjdtd�	�dt|�i}t
�}|�||d
<t|d||��}	tf|	_	|	S)aqA simple typed namespace. At runtime it is equivalent to a plain dict.

        TypedDict creates a dictionary type such that a type checker will expect all
        instances to have a certain set of keys, where each key is
        associated with a value of a consistent type. This expectation
        is not checked at runtime.

        Usage::

            class Point2D(TypedDict):
                x: int
                y: int
                label: str

            a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
            b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

            assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

        The type info can be accessed via the Point2D.__annotations__ dict, and
        the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
        TypedDict supports an additional equivalent form::

            Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

        By default, all keys must be present in a TypedDict. It is possible
        to override this by specifying totality::

            class Point2D(TypedDict, total=False):
                x: int
                y: int

        This means that a Point2D TypedDict can have any of the keys omitted. A type
        checker is only expected to support a literal False or True as the value of
        the total argument. True is the default, and makes all items defined in the
        class body be required.

        The Required and NotRequired special forms can also be used to mark
        individual keys as being required or not required::

            class Point2D(TypedDict):
                x: int  # the "x" key must always be present (Required is the default)
                y: NotRequired[int]  # the "y" key can be omitted

        See PEP 655 for more details on Required and NotRequired.
        �2Failing to pass a value for the 'fields' parameter�(Passing `None` as the 'fields' parameter�`z
 = TypedDict(z, {})`z� is deprecated and will be disallowed in Python 3.15. To create a TypedDict class with 0 fields using the functional syntax, pass an empty dictionary, e.g. �.r���
stacklevelz@TypedDict takes either a dict or keyword arguments, but not bothz�The kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers.rrwror�)
r��warnings�warn�DeprecationWarningr�r�rQr�rr)
�
__typename�__fieldsr�r��deprecated_thing�example�deprecation_msgr�r��tds
          rrrr7s���`�w��(�"2��7�"�#W� �#M� ��*��]�:�.��I�G�#�$�%O�O��	��	�O�

�M�M�/�+=�!�L��H�
��,�-�
-���M�M�;�#��
� ��h��
0�������%�B�|��
�J��B�e�
<��&�L����	rtc�h�ttd�r|tjuryt|t�S)aCheck if an annotation is a TypedDict class

        For example::
            class Film(TypedDict):
                title: str
                year: int

            is_typeddict(Film)  # => True
            is_typeddict(Union[list, str])  # => False
        rF)r�r�rr}�_TYPEDDICT_TYPES�r�s rrr5r5�s,���6�;�'�B�&�2B�2B�,B���"�.�/�/rtr(c��|S)a�Assert (to the type checker) that the value is of the given type.

        When the type checker encounters a call to assert_type(), it
        emits an error if the value is not of the specified type::

            def greet(name: str) -> None:
                assert_type(name, str)  # ok
                assert_type(name, int)  # type checker error

        At runtime this returns the first argument unchanged and otherwise
        does nothing.
        ro)�__val�__typs  rrr(r(�s	���rtrEc�\�t|t�rt|j�St	|d�r0|jt
tfvrt|jd�St|tj�r>td�|jD��}||jk(r|S|j|�St	td�rgt|tj�rMtd�|jD��}||jk(r|Stj|j|�St	td�rkt|tj�rQtd�|jD��}||jk(r|Stj t"j$|�S|S)z=Strips Annotated, Required and NotRequired from a given type.r%rc3�2K�|]}t|����y�wr|��
_strip_extras�r�as  rrr�z _strip_extras.<locals>.<genexpr>������!G�J�q�-��"2�J�r>r�c3�2K�|]}t|����y�wr|r�r�s  rrr�z _strip_extras.<locals>.<genexpr>�r�r>r�c3�2K�|]}t|����y�wr|r�r�s  rrr�z _strip_extras.<locals>.<genexpr>�r�r>)r}�_AnnotatedAliasr�r%r�rErFr�r�r�r��	copy_withr�r�r�rT�reduce�operator�or_)r��
stripped_argss  rrr�r��s;���a��)� ����.�.��1�l�#�����;�8O�(O� ����A��/�/��a��-�-�.�!�!G�A�J�J�!G�G�M���
�
�*����;�;�}�-�-��6�>�*�z�!�V�=P�=P�/Q�!�!G�A�J�J�!G�G�M���
�
�*����&�&�q�|�|�]�C�C��6�;�'�J�q�&�:J�:J�,K�!�!G�A�J�J�!G�G�M���
�
�*����#�#�H�L�L�-�@�@��rtFc���ttd�rtj|||d��}ntj|||��}|r|S|j�D��cic]\}}|t	|���c}}Scc}}w)a�Return type hints for an object.

        This is often the same as obj.__annotations__, but it handles
        forward references encoded as string literals, adds Optional[t] if a
        default value equal to None is set and recursively replaces all
        'Annotated[T, ...]', 'Required[T]' or 'NotRequired[T]' with 'T'
        (unless 'include_extras=True').

        The argument may be a module, class, method, or function. The annotations
        are returned as a dictionary. For classes, annotations include also
        inherited members.

        TypeError is raised if the argument is not of a type that can contain
        annotations, and an empty dictionary is returned if no annotations are
        present.

        BEWARE -- the behavior of globalns and localns is counterintuitive
        (unless you are familiar with how eval() and exec() work).  The
        search order is locals first, then globals.

        - If no dict arguments are passed, an attempt is made to use the
          globals from obj (or the respective module's globals for classes),
          and these are also used as the locals.  If the object does not appear
          to have globals, an empty dictionary is used.

        - If one dict argument is passed, it is used for both globals and
          locals.

        - If two dict arguments are passed, they specify globals and
          locals, respectively.
        r&T)�globalns�localns�include_extras)r	r
)r�r�r2r�r�)r�r	r
r�hint�kr�s       rrr2r2�sr��@�6�;�'��(�(��h����D��(�(��x��Q�D���K�04�
�
��=����1��=��#�#��=�=��=s�A4r&c�@��eZdZdZ�fd�Zd�Zd�Zd�Zd�Zd�Z	�xZ
S)raKRuntime representation of an annotated type.

        At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
        with extra annotations. The alias behaves like a normal typing alias,
        instantiating is the same as instantiating the underlying type, binding
        it to types is also the same.
        c���t|t�r|j|z}|j}t�|�||�||_yr|)r}r�__metadata__r%r�r�)rq�origin�metadatar�s   �rrr�z_AnnotatedAlias.__init__s?����&�/�2�!�.�.��9���*�*���G��V�V�,� (�D�rtc�X�t|�dk(sJ�|d}t||j�S)Nr�r)r�rr)rqr��new_types   rrrz_AnnotatedAlias.copy_withs0���v�;�!�#�#�#��a�y�H�"�8�T�->�->�?�?rtc��dtj|j��ddjd�|jD���d�S)Nztyping_extensions.Annotated[r8c3�2K�|]}t|����y�wr|)�reprr�s  rrr�z+_AnnotatedAlias.__repr__.<locals>.<genexpr>s���� D�2C�Q��a��2C�r>r@)r��
_type_reprr%rArrps rrrsz_AnnotatedAlias.__repr__sE��2�6�3D�3D�T�_�_�3U�2V�VX��y�y� D�$�2C�2C� D�D�E�Q�H�
Irtc�b�tjt|jf|jzffSr|)r�getitemr&r%rrps rr�
__reduce__z_AnnotatedAlias.__reduce__s1���#�#��D�O�O�-��0A�0A�A�&��
rtc��t|t�stS|j|jk7ry|j|jk(S)NF)r}rr�r%r�rqr�s  rrr�z_AnnotatedAlias.__eq__!s>���e�_�5�%�%����%�"2�"2�2���$�$��(:�(:�:�:rtc�D�t|j|jf�Sr|)r�r%rrps rrr�z_AnnotatedAlias.__hash__(s������$�*;�*;�<�=�=rt)rvrwrxr�r�rrsrr�r�r�r�s@rrrrs(���	�	)�	@�
	I�	�
	;�	>rtrc�D�eZdZdZdZd�Zejd��Zd�Z	y)r&a�Add context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to the
        hypothetical runtime_check module that this type is an unsigned int.
        Every other consumer of this type can ignore this metadata and treat
        this type as int.

        The first argument to Annotated must be a valid type (and will be in
        the __origin__ field), the remaining arguments are kept as a tuple in
        the __extra__ field.

        Details:

        - It's an error to call `Annotated` with less than two arguments.
        - Nested Annotated are flattened::

            Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

        - Instantiating an annotated type is equivalent to instantiating the
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can be used as a generic type alias::

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
        roc��td��)Nz&Type Annotated cannot be instantiated.r�rhs   rrr�zAnnotated.__new__N����D�E�Ertc��t|t�rt|�dkrtd��tt
f}t
|d�|vr|d}nd}tj|d|�}t|dd�}t||�S)Nr�zUAnnotated[...] should be used with at least two arguments (a type and an annotation).rz$Annotated[t, ...]: t must be a type.r�)
r}r�r�r�rrr/r�r�r)r�r��allowed_special_formsrr�rs      rrr(zAnnotated.__class_getitem__Qs����f�e�,��F��a���!/�0�0�&.�u�$5�!��&��)�$�(=�=�����<���+�+�F�1�I�s�;���V�A�B�Z�(�H�"�6�8�4�4rtc�4�td|j�d���)N�Cannot subclass z
.Annotated)r�rwrhs   rrr�zAnnotated.__init_subclass__`s ���"�3�>�>�"2�*�=��
rtN)
rvrwrxr�rr�r�r�r(r�rortrrr&r&+s4��	�@�	�	F�
�	�	�	5�
�	5�	rt)�_BaseGenericAlias)r�c���t|t�rtSt|tjt
tttf�r|jS|tjurtjSy)a6Get the unsubscripted version of a type.

        This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
        and Annotated. Return None for unsupported types. Examples::

            get_origin(Literal[42]) is Literal
            get_origin(int) is None
            get_origin(ClassVar[int]) is ClassVar
            get_origin(Generic) is Generic
            get_origin(Generic[T]) is Generic
            get_origin(Union[T, int]) is Union
            get_origin(List[Tuple[T, T]][int]) == list
            get_origin(P.args) is P
        N)r}rr&r�r��_typing_GenericAliasr&r	r
r%rQr�s rrr/r/xsY���b�/�*����b�6�/�/�1E�GX�(�/�;�<��=�=� �
������>�>�!�rtc�V�t|t�r|jf|jzSt|tj
tf�r_t|dd�ry|j}t|�tjjur|dturt|dd�|df}|Sy)a�Get type arguments with all substitutions performed.

        For unions, basic simplifications used by Union constructor are performed.
        Examples::
            get_args(Dict[str, int]) == (str, int)
            get_args(int) == ()
            get_args(Union[int, Union[T, int], str][int]) == (int, str)
            get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
            get_args(Callable[[], T][int]) == ([], int)
        r�FrorNr,)r}rr%rr�r�r(rr�r/ryrSrJ�Ellipsisr�)r��ress  rrr.r.�s����b�/�*��M�M�#�b�o�o�5�5��b�6�/�/�1E�F�G��r�:�u�-���+�+�C��"�~����!9�!9�9�c�!�f�H�>T��C���H�~�s�2�w�/���J�rtr?c��t|�d���)a&Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example above.
        � is not subscriptabler��rqr�s  rrr?r?�s���4�&� 5�6�7�7rta%Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example
        above.c��t|ttf�rtd�|D��|_y|tk7rtj|d�|_yd|_y)Nc3�HK�|]}tj|d����y�w)�Default must be a typeNr�)r�ds  rrr�z_set_default.<locals>.<genexpr>�s&����(:�18�A�)/�(:�(:�1�>V�(W�18�s� "r1)r}r�r��__default__r�r�r�)�
type_param�defaults  rr�_set_defaultr6�sP���'�E�4�=�)�!&�(:�18�(:�";�
��	�G�	�!'�!3�!3�G�=U�!V�
��!%�
�rtc�6�td��}|dk7r||_yy)Nr�rOr)rQrw)�typevarlike�def_mods  rr�_set_moduler:�s"���A��G��%�%�!(���&rtc��eZdZdZdZeZy)�
_DefaultMixinzMixin for TypeVarLike defaults.roN)rvrwrxr�rr6r�rortrrr<r<�s��)��I��Hrtr<c��eZdZdedefd�Zy)�_TypeVarLikeMeta�_TypeVarLikeMeta__instancertc�.�t||j�Sr|)r}�_backported_typevarlike)r�r?s  rrr�z"_TypeVarLikeMeta.__instancecheck__�s���*�c�&A�&A�B�BrtN)rvrwrxr�boolr�rortrrr>r>�s��C�3�C�4�Crtr>c�D�eZdZdZej
Zdddedd�d�Zdd�Z	y)r
zType variable.NF)�boundr�r�r5�infer_variancec���ttd�rtj|g|��||||d��}n3tj|g|��|||d��}|r|s|rtd��||_t||�t
|�|S)Nr@�rDr�r�rE�rDr�r�z1Variance cannot be specified with infer_variance.)r�r�r
rN�__infer_variance__r6r:)	r�r�rDr�r�r5rE�constraints�typevars	         rrr�zTypeVar.__new__�s����6�?�+��n�n�T�D�K�D�u�/8�
�4B�D�G��n�n�T�W�K�W�u�/8�
�W�G��9�
� �!T�U�U�)7�G�&��W�g�&��G���rtc�(�tdt�d���)N�type 'z(.TypeVar' is not an acceptable base type�r�rvrvs rrr�zTypeVar.__init_subclass__s���&��
�*R�S�T�Trt�rtN)
rvrwrxr�r�r
rAr�r�r�rortrrr
r
�s'���$�n�n��/3��u����$Urtr
r	c� �eZdZdZdZd�Zd�Zy)�
_Immutablez3Mixin to indicate that object should not be copied.roc��|Sr|rorps rr�__copy__z_Immutable.__copy__����Krtc��|Sr|ro)rq�memos  rr�__deepcopy__z_Immutable.__deepcopy__rTrtN)rvrwrxr�rrSrWrortrrrQrQ
s��A��	�	�	rtrQc�"�eZdZdZd�Zd�Zd�Zy)r	aQThe args for a ParamSpec object.

        Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.

        ParamSpecArgs objects have a reference back to their ParamSpec:

        P.args.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        c��||_yr|�r%�rqrs  rrr�zParamSpecArgs.__init__ �	��$�D�Ortc�4�|jj�d�S)Nz.args�r%rvrps rrrszParamSpecArgs.__repr__#s���o�o�.�.�/�u�5�5rtc�`�t|t�stS|j|jk(Sr|)r}r	r�r%rs  rrr�zParamSpecArgs.__eq__&s'���e�]�3�%�%��?�?�e�&6�&6�6�6rtN�rvrwrxr�r�rsr�rortrrr	r	s��
	�	%�	6�	7rtc�"�eZdZdZd�Zd�Zd�Zy)r
a[The kwargs for a ParamSpec object.

        Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.

        ParamSpecKwargs objects have a reference back to their ParamSpec:

        P.kwargs.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        c��||_yr|rZr[s  rrr�zParamSpecKwargs.__init__7r\rtc�4�|jj�d�S)Nz.kwargsr^rps rrrszParamSpecKwargs.__repr__:s���o�o�.�.�/�w�7�7rtc�`�t|t�stS|j|jk(Sr|)r}r
r�r%rs  rrr�zParamSpecKwargs.__eq__=s'���e�_�5�%�%��?�?�e�&6�&6�6�6rtNr`rortrrr
r
+s��
	�	%�	8�	7rtr
rc�D�eZdZdZej
Zdddded�d�Zdd�Z	y)rzParameter specification.NF�rDr�r�rEr5c���ttd�rtj|||||��}n tj||||��}||_t	||�t|�|S)Nr@rGrH)r�r�rrIr6r:)r�r�rDr�r�rEr5�	paramspecs        rrr�zParamSpec.__new__Ksk���v��/�"�,�,�T��7@�;H�<J�L�	�
#�,�,�T��7@�;H�J�	�0>�	�,���G�,��	�"��rtc�(�tdt�d���)NrMz*.ParamSpec' is not an acceptable base typerNrvs rrr�zParamSpec.__init_subclass__^s���f�X�J�.X�Y�Z�ZrtrO)
rvrwrxr�r�rrAr�r�r�rortrrrrFs)��&�"(�"2�"2��(,�#�5�#(�'�	�&	[rtc���eZdZdZej
Zed��Zed��Z	dddde
d��fd�
Zd�Zd	�Z
d
�Zd�Zd�Z�xZS)
ra'Parameter specification variable.

        Usage::

           P = ParamSpec('P')

        Parameter specification variables exist primarily for the benefit of static
        type checkers.  They are used to forward the parameter types of one
        callable to another callable, a pattern commonly found in higher order
        functions and decorators.  They are only valid when used in ``Concatenate``,
        or s the first argument to ``Callable``. In Python 3.10 and higher,
        they are also supported in user-defined Generics at runtime.
        See class Generic for more information on generic types.  An
        example for annotating a decorator::

           T = TypeVar('T')
           P = ParamSpec('P')

           def add_logging(f: Callable[P, T]) -> Callable[P, T]:
               '''A type-safe decorator to add logging to a function.'''
               def inner(*args: P.args, **kwargs: P.kwargs) -> T:
                   logging.info(f'{f.__name__} was called')
                   return f(*args, **kwargs)
               return inner

           @add_logging
           def add_two(x: float, y: float) -> float:
               '''Add two numbers together.'''
               return x + y

        Parameter specification variables defined with covariant=True or
        contravariant=True can be used to declare covariant or contravariant
        generic types.  These keyword arguments are valid, but their actual semantics
        are yet to be decided.  See PEP 612 for details.

        Parameter specification variables can be introspected. e.g.:

           P.__name__ == 'T'
           P.__bound__ == None
           P.__covariant__ == False
           P.__contravariant__ == False

        Note that only parameter specification variables defined in global scope can
        be pickled.
        c��t|�Sr|)r	rps rrr�zParamSpec.args�s
�� ��&�&rtc��t|�Sr|)r
rps rrr�zParamSpec.kwargs�s
��"�4�(�(rtNFrfc�8��t�|�|g�||_t|�|_t|�|_t|�|_|rtj|d�|_	nd|_	tj||�t�}|dk7r||_yy)NzBound must be a type.r)
r�r�rvrB�
__covariant__�__contravariant__rIr�r��	__bound__r<rQrw)	rqr�rDr�r�rEr5r9r�s	        �rrr�zParamSpec.__init__�s�����G��d�V�$� �D�M�!%�i��D��%)�-�%8�D�"�&*�>�&:�D�#��!'�!3�!3�E�;R�!S���!%����"�"�4��1��i�G��-�-�")���.rtc�~�|jrd}n |jrd}n|jrd}nd}||jzS)N��+�-�~)rIrnrorv)rq�prefixs  rrrszParamSpec.__repr__�s@���&�&����#�#����'�'������D�M�M�)�)rtc�,�tj|�Sr|�r]r�rps rrr�zParamSpec.__hash__�����?�?�4�(�(rtc�
�||uSr|rors  rrr�zParamSpec.__eq__�����5�=� rtc��|jSr|�rvrps rrrzParamSpec.__reduce__�����=�=� rtc��yr|rorWs   rrr�zParamSpec.__call__����rt)rvrwrxr�r�r
r��propertyr�r�r�r�rsr�r�rr�r�r�s@rrrresf���,	�^�N�N�	�	�	'�
�	'�
�	)�
�	)�+/�%�u�$)�7�	*�$		*�	)�	!�	!�	rtrc�\��eZdZejZdZ�fd�Zd�Zd�Z	d�Z
ed��Z�xZ
S)�_ConcatenateGenericAliasFc�@��t�|�|�||_||_yr|)r�r�r%r�)rqrr�r�s   �rrr�z!_ConcatenateGenericAlias.__init__�s����G��T�"�$�D�O� �D�Mrtc���tj��|j��ddj�fd�|jD���d�S)Nr?r8c3�.�K�|]}�|����y�wr|ro)r�argrs  �rrr�z4_ConcatenateGenericAlias.__repr__.<locals>.<genexpr>�s�����!K�]�c�*�S�/�]�s�r@)r�rr%rAr�)rqrs @rrrsz!_ConcatenateGenericAlias.__repr__�sF����*�*�J�!�$�/�/�2�3���	�	�!K�T�]�]�!K�K�L�A�O�
Prtc�D�t|j|jf�Sr|)r�r%r�rps rrr�z!_ConcatenateGenericAlias.__hash__�s������$�-�-�8�9�9rtc��yr|rorWs   rrr�z!_ConcatenateGenericAlias.__call__�r�rtc�:�td�|jD��S)Nc3�bK�|]'}t|tjtf�s�$|���)y�wr|)r}r�r
r)rr�s  rrr�z:_ConcatenateGenericAlias.__parameters__.<locals>.<genexpr>�s&�����*�r�j��f�n�n�i�=X�.Y��]�s�%/�/)r�r�rps rrrzz'_ConcatenateGenericAlias.__parameters__�s ����!�]�]���
rt)rvrwrxr�r�r�r�r�rsr�r�r�rzr�r�s@rrr�r��s@����(�(�	���	!�
	P�
	:�	�
�	�
�	rtr�c����|dk(rtd��t|t�s|f}t|dt�std��d�t�fd�|D��}t	||�S)Nroz&Cannot take a Concatenate of no types.r,zAThe last parameter to Concatenate should be a ParamSpec variable.z/Concatenate[arg, ...]: each arg must be a type.c3�J�K�|]}tj|�����y�wr|r�r�s  �rrr�z'_concatenate_getitem.<locals>.<genexpr>�s�����F�:�a�v�)�)�!�S�1�:�rf)r�r}r�rr�)rqr�r�s  @rr�_concatenate_getitemr��sj����R���@�A�A��j�%�(� �]�
��j��n�i�0��.�/�	/�
;�C��F�:�F�F�J�#�D�*�5�5rtc��t||�S)�&Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        �r�r.s  rrrrs��$�D�*�5�5rtc��eZdZd�Zy)�_ConcatenateFormc��t||�Sr|r�r.s  rrr�z_ConcatenateForm.__getitem__s��'��j�9�9rtNr�rortrrr�r�s��	:rtr�r�rAc�b�tj||�d��}tj||f�S)�	Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        r�)r�r�r�r�s   rrrArA's4��X�!�!�*���6R�.S�T���#�#�D�4�'�2�2rtc��eZdZd�Zy)�_TypeGuardFormc�v�tj||j�d��}tj||f�S)Nz accepts only a single typer�r�s   rrr�z_TypeGuardForm.__getitem__Xs9���%�%�j�)-����4O�&P�R�D��'�'��t�g�6�6rtNr�rortrrr�r�Wr�rtr�r�c�p�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ejd��Zy
)�_SpecialForm)r�r��_getitemc�V�||_|j|_|j|_yr|)r�rvr�r�)rqrs  rrr�z_SpecialForm.__init__�s!����
��%�%��
�����rtc�8�|dvr|jSt|��)N>rvrx)r�r�)rqr�s  rr�__getattr__z_SpecialForm.__getattr__�s ���/�/��:�:���T�"�"rtc��td|����)Nr%r�)rqras  rrr�z_SpecialForm.__mro_entries__�s���*�4�(�3�4�4rtc� �d|j��Sr�r�rps rrrsz_SpecialForm.__repr__�s��#�D�J�J�<�0�0rtc��|jSr|r�rps rrrz_SpecialForm.__reduce__�s���z�z�rtc��td|����)NzCannot instantiate r��rqr�r�s   rrr�z_SpecialForm.__call__�s���-�d�X�6�7�7rtc�,�tj||fSr|�r�rgrs  rr�__or__z_SpecialForm.__or__�s���|�|�D�%�K�(�(rtc�,�tj||fSr|r�rs  rr�__ror__z_SpecialForm.__ror__�s���|�|�E�4�K�(�(rtc��t|�d���)Nz! cannot be used with isinstance()r��rqr�s  rrr�z_SpecialForm.__instancecheck__�����4�&� A�B�C�Crtc��t|�d���)Nz! cannot be used with issubclass()r�)rqr�s  rrrkz_SpecialForm.__subclasscheck__�r�rtc�&�|j||�Sr|)r�r.s  rrr�z_SpecialForm.__getitem__�s���}�}�T�:�.�.rtN)rvrwrxrr�r�r�rsrr�r�r�r�rkr�r�r�rortrrr�r��sU��0�I�'�
#�5�1��8�)�)�D�D����/��/rtr�rc��t|�d���)aPRepresents an arbitrary literal string.

        Example::

          from pip._vendor.typing_extensions import LiteralString

          def query(sql: LiteralString) -> ...:
              ...

          query("SELECT * FROM table")  # ok
          query(f"SELECT * FROM {input()}")  # not ok

        See PEP 675 for details.

        r-r��rqr�s  rrrr�s��"�4�&� 5�6�7�7rtrc��t|�d���)z�Used to spell the type of "self" in classes.

        Example::

          from typing import Self

          class ReturnsSelf:
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        r-r�r�s  rrrr�s���4�&� 5�6�7�7rtrCc��t|�d���)a�The bottom type, a type that has no members.

        This can be used to define a function that should never be
        called, or a function that never returns::

            from pip._vendor.typing_extensions import Never

            def never_call_me(arg: Never) -> None:
                pass

            def int_or_str(arg: int | str) -> None:
                never_call_me(arg)  # type checker error
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                    case _:
                        never_call_me(arg)  # ok, arg is of type Never

        r-r�r�s  rrrCrC�s��0�4�&� 5�6�7�7rtc�v�tj||j�d��}tj||f�S)��A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        r�r�r�s   rrrErEs7��"�!�!�*�����<X�.Y�Z���#�#�D�4�'�2�2rtc�v�tj||j�d��}tj||f�S)�`A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        r�r�r�s   rrrFrFs7���!�!�*�����<X�.Y�Z���#�#�D�4�'�2�2rtc��eZdZd�Zy)�
_RequiredFormc�v�tj||j�d��}tj||f�Sr�r�r�s   rrr�z_RequiredForm.__getitem__,r�rtNr�rortrrr�r�+r�rtr�r�rFr�a�Type unpack operator.

The type unpack operator takes the child types from some container type,
such as `tuple[int, str]` or a `TypeVarTuple`, and 'pulls them out'. For
example:

  # For some generic class `Foo`:
  Foo[Unpack[tuple[int, str]]]  # Equivalent to Foo[int, str]

  Ts = TypeVarTuple('Ts')
  # Specifies that `Bar` is generic in an arbitrary number of types.
  # (Think of `Ts` as a tuple of an arbitrary number of individual
  #  `TypeVar`s, which the `Unpack` is 'pulling out' directly into the
  #  `Generic[]`.)
  class Bar(Generic[Unpack[Ts]]): ...
  Bar[int]  # Valid
  Bar[int, str]  # Also valid

From Python 3.11, this can also be done using the `*` operator:

    Foo[*tuple[int, str]]
    class Bar(Generic[*Ts]): ...

The operator can also be used along with a `TypedDict` to annotate
`**kwargs` in a function signature. For instance:

  class Movie(TypedDict):
    name: str
    year: int

  # This function expects two keyword arguments - *name* of type `str` and
  # *year* of type `int`.
  def foo(**kwargs: Unpack[Movie]): ...

Note that there is only some runtime checking of this operator. Not
everything the runtime allows may be accepted by static type checkers.

For more information, see PEP 646 and PEP 692.
c�$�t|�tuSr|)r/r�r�s rrr�r�s���#��&�(�(rtc���eZdZ�fd�Z�xZS)�_UnpackSpecialFormc�:��t�|�|�t|_yr|)r�r��_UNPACK_DOCr�)rqrr�s  �rrr�z_UnpackSpecialForm.__init__�s����G��W�%�&�D�Lrt)rvrwrxr�r�r�s@rrr�r��s
���	'�	'rtr�c�$�eZdZejZy��_UnpackAliasN�rvrwrxr�r
r�rortrrr�r������N�N�	rtr�c�b�tj||j�d��}t||f�Sr��r�r�r�r�r�s   rrrr�s/���!�!�*�����<X�.Y�Z���D�4�'�*�*rtc�"�t|t�Sr|�r}r�r�s rrr�r������#�|�,�,rtc�$�eZdZejZyr�r�rortrrr�r��r�rtc��eZdZd�Zy)�_UnpackFormc�b�tj||j�d��}t||f�Sr�r�r�s   rrr�z_UnpackForm.__getitem__�s3���%�%�j�)-����4P�&Q�S�D���t�g�.�.rtNr�rortrrr�r��s��	/rtr�rc�"�t|t�Sr|r�r�s rrr�r��r�rtrc�:�eZdZdZej
Zed�d�Zd�Z	y)rzType variable tuple.�r5c�^�tj|�}t||�t|�|Sr|)r�rr6r:)r�r�r5�tvts    rrr�zTypeVarTuple.__new__�s)���%�%�d�+�C���g�&�����Jrtc��td��)N�&Cannot subclass special typing classesr�r�s   rrr�zTypeVarTuple.__init_subclass__�r!rtN)
rvrwrxr�r�rrAr�r�r�rortrrrr�s��"�"(�"5�"5��*1�	�	Frtc�X�eZdZdZej
Zd�Zed�d�Z	d�Z
d�Zd�Zd�Z
d	�Zy
)ra�Type variable tuple.

        Usage::

            Ts = TypeVarTuple('Ts')

        In the same way that a normal type variable is a stand-in for a single
        type such as ``int``, a type variable *tuple* is a stand-in for a *tuple*
        type such as ``Tuple[int, str]``.

        Type variable tuples can be used in ``Generic`` declarations.
        Consider the following example::

            class Array(Generic[*Ts]): ...

        The ``Ts`` type variable tuple here behaves like ``tuple[T1, T2]``,
        where ``T1`` and ``T2`` are type variables. To use these type variables
        as type parameters of ``Array``, we must *unpack* the type variable tuple using
        the star operator: ``*Ts``. The signature of ``Array`` then behaves
        as if we had simply written ``class Array(Generic[T1, T2]): ...``.
        In contrast to ``Generic[T1, T2]``, however, ``Generic[*Shape]`` allows
        us to parameterise the class with an *arbitrary* number of type parameters.

        Type variable tuples can be used anywhere a normal ``TypeVar`` can.
        This includes class definitions, as shown above, as well as function
        signatures and variable annotations::

            class Array(Generic[*Ts]):

                def __init__(self, shape: Tuple[*Ts]):
                    self._shape: Tuple[*Ts] = shape

                def get_shape(self) -> Tuple[*Ts]:
                    return self._shape

            shape = (Height(480), Width(640))
            x: Array[Height, Width] = Array(shape)
            y = abs(x)  # Inferred type is Array[Height, Width]
            z = x + x   #        ...    is Array[Height, Width]
            x.get_shape()  #     ...    is tuple[Height, Width]

        c#�(K�|j��y�wr|)�__unpacked__rps rr�__iter__zTypeVarTuple.__iter__�s�����#�#�#�s�r�c��||_tj||�t�}|dk7r||_t
||_y)Nr)rvr<r�rQrwrr�)rqr�r5r9s    rrr�zTypeVarTuple.__init__�s>�� �D�M��"�"�4��1��i�G��-�-�")��� &�t��D�rtc��|jSr|r}rps rrrszTypeVarTuple.__repr__�r~rtc�,�tj|�Sr|rxrps rrr�zTypeVarTuple.__hash__�ryrtc�
�||uSr|rors  rrr�zTypeVarTuple.__eq__�r{rtc��|jSr|r}rps rrrzTypeVarTuple.__reduce__�r~rtc�"�d|vrtd��y)Nr�r�r�r�s   rrr�zTypeVarTuple.__init_subclass__�s���d�"�� H�I�I�#rtN)rvrwrxr�r�r
r�r�r�r�rsr�r�rr�rortrrrr�s<��)	�X�N�N�	�	$�-4�		-�	!�	)�	!�	!�	Jrtr;�__objrtc�h�tdt|�j��tj��|S)a�Reveal the inferred type of a variable.

        When a static type checker encounters a call to ``reveal_type()``,
        it will emit the inferred type of the argument::

            x: int = 1
            reveal_type(x)

        Running a static type checker (e.g., ``mypy``) on this example
        will produce output similar to 'Revealed type is "builtins.int"'.

        At runtime, the function prints the runtime type of the
        argument and returns it unchanged.

        zRuntime type is )�file)�printr�rvrJ�stderr)r�s rrr;r;	s*�� 	� ��e��!5�!5� 8�9��
�
�K��rtr'�__argc��td��)a1Assert to the type checker that a line of code is unreachable.

        Example::

            def int_or_str(arg: int | str) -> None:
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                    case _:
                        assert_never(arg)

        If a type checker finds that a call to assert_never() is
        reachable, it will emit an error.

        At runtime, this throws an exception when called.

        zExpected code to be unreachable)�AssertionError�r�s rrr'r'	s��(�>�?�?rt)�
eq_default�
order_default�kw_only_default�frozen_default�field_specifiersr�r�r�r�r�.r�c�&�������������fd�}|S)a�Decorator that marks a function, class, or metaclass as providing
        dataclass-like behavior.

        Example:

            from pip._vendor.typing_extensions import dataclass_transform

            _T = TypeVar("_T")

            # Used on a decorator function
            @dataclass_transform()
            def create_model(cls: type[_T]) -> type[_T]:
                ...
                return cls

            @create_model
            class CustomerModel:
                id: int
                name: str

            # Used on a base class
            @dataclass_transform()
            class ModelBase: ...

            class CustomerModel(ModelBase):
                id: int
                name: str

            # Used on a metaclass
            @dataclass_transform()
            class ModelMeta(type): ...

            class ModelBase(metaclass=ModelMeta): ...

            class CustomerModel(ModelBase):
                id: int
                name: str

        Each of the ``CustomerModel`` classes defined in this example will now
        behave similarly to a dataclass created with the ``@dataclasses.dataclass``
        decorator. For example, the type checker will synthesize an ``__init__``
        method.

        The arguments to this decorator can be used to customize this behavior:
        - ``eq_default`` indicates whether the ``eq`` parameter is assumed to be
          True or False if it is omitted by the caller.
        - ``order_default`` indicates whether the ``order`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``kw_only_default`` indicates whether the ``kw_only`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``frozen_default`` indicates whether the ``frozen`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``field_specifiers`` specifies a static list of supported classes
          or functions that describe fields, similar to ``dataclasses.field()``.

        At runtime, this decorator records its arguments in the
        ``__dataclass_transform__`` attribute on the decorated object.

        See PEP 681 for details.

        c�$��������d�|_|S)N)r�r�r�r�r�r�)�__dataclass_transform__)�	cls_or_fnr�r�r�r�r�r�s ������rr�	decoratorz&dataclass_transform.<locals>.decorator�	s'���(�!.�#2�"0�$4� �
1�I�-��rtro)r�r�r�r�r�r�r�s`````` rrr*r*8	s���R		�		��rtr9�_F)rDc�B�	d|_|S#ttf$rY|SwxYw)aLIndicate that a method is intended to override a method in a base class.

        Usage:

            class Base:
                def method(self) -> None: ...
                    pass

            class Child(Base):
                @override
                def method(self) -> None:
                    super().method()

        When this decorator is applied to a method, the type checker will
        validate that it overrides a method with the same name on a base class.
        This helps prevent bugs that may occur when a base class is changed
        without an equivalent change to a child class.

        There is no runtime checking of these properties. The decorator
        sets the ``__override__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.

        See PEP 698 for details.

        T)�__override__r�r�r�s rrr9r9�	s6��4	�!%�E������	�*�	�
���	�r�r+�_Tr���categoryr��__msgr�r�c�4����dtdtf���fd�}|S)a�Indicate that a class, function or overload is deprecated.

        Usage:

            @deprecated("Use B instead")
            class A:
                pass

            @deprecated("Use g instead")
            def f():
                pass

            @overload
            @deprecated("int support is deprecated")
            def g(x: int) -> int: ...
            @overload
            def g(x: str) -> int: ...

        When this decorator is applied to an object, the type checker
        will generate a diagnostic on usage of the deprecated object.

        The warning specified by ``category`` will be emitted on use
        of deprecated objects. For functions, that happens on calls;
        for classes, on instantiation. If the ``category`` is ``None``,
        no warning is emitted. The ``stacklevel`` determines where the
        warning is emitted. If it is ``1`` (the default), the warning
        is emitted at the direct caller of the deprecated object; if it
        is higher, it is emitted further up the stack.

        The decorator sets the ``__deprecated__``
        attribute on the decorated object to the deprecation message
        passed to the decorator. If applied to an overload, the decorator
        must be after the ``@overload`` decorator for the attribute to
        exist on the overload as returned by ``get_overloads()``.

        See PEP 702 for details.

        r�rtc��������	��_�St�t�ri�j��jt
ju�t
j�������fd��}t|��_�x�_|_�St��r0t
j������fd��}�x�_|_|Std�����)Nc����tj���dz���tjur�|g|��i|��S�s|s|rt	|j
�d����|�S)Nr�r�z() takes no arguments)r�r�r]r�r�rv)r�r�r�r�r��has_init�original_newr�s   �����rrr�z.deprecated.<locals>.decorator.<locals>.__new__�	sb����M�M�%�(�z�TU�~�V�#�6�>�>�9�+�C�A�$�A�&�A�A�%�4�6�'�3�<�<�.�8M�(N�O�O�+�C�0�0rtc�J��tj���dz���|i|��S)Nr�r�)r�r�)r�r�r�r�r�r�s  ����rr�wrapperz.deprecated.<locals>.decorator.<locals>.wrapper�	s(����M�M�%�(�z�TU�~�V� �$�1�&�1�1rtzY@deprecated decorator with non-None category must be applied to a class or callable, not )�__deprecated__r}r�r�r�r]rT�wrapsr�rer�)r�r�r�r�r�r�r�r�s`  @@���rrr�zdeprecated.<locals>.decorator�	s������',��$����E�4�(�$�}�}�� �>�>����@������.�1�/�1�!-�W� 5��
�@E�E��$�w�'=����%������'�2�(�2�AF�E��$�w�'=����0�05�y�:��rt)r�)r�r�r�r�s``` rrr+r+�	s ���X"	�R�"	�B�"	�H�rtc�6�|D��cgc]\}}|��	}}}|D��cic] \}}|tj|d|�d����"}}}tj||||��}|x|_|j
_tjdkr||_|Scc}}wcc}}w)Nzfield z annotation must be a type��defaultsr�r�)	r�r�ry�
namedtuplerr�rJr��_field_types)	r�r�r�rr�r��fieldsr4�nm_tpls	         rr�
_make_nmtupler	#
s��� %�&����1�!���&�#(�*�#(�4�1�a��&�,�,�Q�&���;U�0V�W�W�#(�	�*��'�'��f�19�&�J��BM�M������!?����f�$�"-�F���
��'��*s
�B�%B>rvrwrc��eZdZd�Zy)�_NamedTupleMetac��t|vsJ�|D](}|tus�|tjus�td��t	d�|D��}|jdi�}g}|D]M}||vr|j
|��|s�td|�dt|�dkDrdnd�d	d
j|�����t||j�|D�cgc]}||��	c}|d��}	||	_tj|vrcttd
�rttj�|	_n4tjjj }
t|
�|	_|D]@}|t"vrt%d|z��|t&vs�"||	j(vs�1t+|	|||��Btj|vr|	j-�|	Scc}w)Nz3can only inherit from a NamedTuple type and Genericc3�<K�|]}|turtn|���y�wr|)�_NamedTupler�)rr3s  rrr�z*_NamedTupleMeta.__new__.<locals>.<genexpr>:
s����S�U�T�4�;�#6�%�D�@�U�r�rzNon-default namedtuple field z cannot follow default fieldr��srr� r8rwr�_generic_class_getitemz&Cannot overwrite NamedTuple attribute )rr�rQr�r�rMr�r�rAr	r�r�r��classmethodrr(r�_prohibited_namedtuple_fieldsr��_special_namedtuple_fields�_fields�setattrr�)r��typenamerar�r3r��
default_names�
field_namer�r�
class_getitem�keys            rrr�z_NamedTupleMeta.__new__4
s����%�'�'�'����{�*�t�6�>�>�/I�#�M�O�O���S�U�S�S�E��F�F�,�b�1�E��M�#�
���#�!�(�(��4�"�#�&C�J�<�PB�.1�-�.@�1�.D�s�"�&M�Q�'+�y�y��'?�&@�%B�C�C�	$�#��%�+�+�-�)6�7��A�"�Q�%��7��,�'��F�
 %�F���~�~��&��6�#;�<�/:�6�;X�;X�/Y�F�,�$*�N�N�$D�$D�$M�$M�M�/:�=�/I�F�,����7�7�(�)Q�TW�)W�X�X�� :�:�s�&�.�.�?X��F�C��C��1�	�
�~�~��&��(�(�*��M��%8s�	GN)rvrwrxr�rortrrrr3
s��%	rtrrc�$�t|vsJ�tfSr|)rrr�s rr�_namedtuple_mro_entriesr]
s���U�"�"�"��~�rtc�~�|tur|rd}d}nDd}d|�d|�d�}d|zdz}n0|�!|rtd	��d
}d|�d|�d�}d|zdz}n
|rtd��|tus|�=tjj	d�
�t
d��|j
�}t||t���}tf|_
|S)aoTyped version of namedtuple.

        Usage::

            class Employee(NamedTuple):
                name: str
                id: int

        This is equivalent to::

            Employee = collections.namedtuple('Employee', ['name', 'id'])

        The resulting class has an extra __annotations__ attribute, giving a
        dict that maps field names to types.  (The field names are also in
        the _fields attribute, which is part of the namedtuple API.)
        An alternative equivalent functional syntax is also accepted::

            Employee = NamedTuple('Employee', [('name', str), ('id', int)])
        z3Creating NamedTuple classes using keyword argumentszq{name} is deprecated and will be disallowed in Python {remove}. Use the class-based or functional syntax instead.r�r�z = NamedTuple(z, [])`z�{name} is deprecated and will be disallowed in Python {remove}. To create a NamedTuple class with 0 fields using the functional syntax, pass an empty list, e.g. r�z\Cannot pass `None` as the 'fields' parameter and also specify fields using keyword argumentsr�zIEither list of fields or keywords can be provided to NamedTuple, not bothz3.15)r�r�r�r�r�)r�r�r�r��formatr�r�r	rQrr)r�r�r�r�r�r��nts       rrrra
s'��*�w���#X� �H� �
$X� ��j�\��
�~�V�L��0��#�
"�#"���
���F���
$N� ��j�\��
�~�V�L��0��#�
"�#"����G�H�
H��w��(�"2��M�M��&�&�,<�V�&�L�"��
�
�|�|�~�H�
�:�x��	�
B��'�M����	rtz$(typename, fields=None, /, **kwargs)c��eZdZdZy)ra�Base class for classes that implement the buffer protocol.

        The buffer protocol allows Python objects to expose a low-level
        memory buffer interface. Before Python 3.12, it is not possible
        to implement the buffer protocol in pure Python code, or even
        to check whether a class implements the buffer protocol. In
        Python 3.12 and higher, the ``__buffer__`` method allows access
        to the buffer protocol from Python code, and the
        ``collections.abc.Buffer`` ABC allows checking whether a class
        implements the buffer protocol.

        To indicate support for the buffer protocol in earlier versions,
        inherit from this ABC, either in a stub file or at runtime,
        or use ABC registration. This ABC provides no methods, because
        there is no Python-accessible methods shared by pre-3.12 buffer
        classes. It is useful primarily for static checks.

        N)rvrwrxr�rortrrrr�
s��	rtr0c��	|jS#t$r?	|jcYS#t$r#tdt	|�j
���d�wxYwwxYw)a(Return the class's "original" bases prior to modification by `__mro_entries__`.

        Examples::

            from typing import TypeVar, Generic
            from pip._vendor.typing_extensions import NamedTuple, TypedDict

            T = TypeVar("T")
            class Foo(Generic[T]): ...
            class Bar(Foo[int], float): ...
            class Baz(list[str]): ...
            Eggs = NamedTuple("Eggs", [("a", int), ("b", str)])
            Spam = TypedDict("Spam", {"a": int, "b": str})

            assert get_original_bases(Bar) == (Foo[int], float)
            assert get_original_bases(Baz) == (list[str],)
            assert get_original_bases(Eggs) == (NamedTuple,)
            assert get_original_bases(Spam) == (TypedDict,)
            assert get_original_bases(int) == (object,)
        z"Expected an instance of type, not N)rr�r�r�r�rv)�__clss rrr0r0�
se��*	��'�'�'���	�
����&��!�
��8��e��9M�9M�8P�Q����
��	�s��	A�&�A�,A�Ac�Z�eZdZdZd�Zd�Zd�Zd�Zd�Ze	jdk\rd�Zd	�Zy
y
)r7aLNewType creates simple unique types with almost zero
        runtime overhead. NewType(name, tp) is considered a subtype of tp
        by static type checkers. At runtime, NewType(name, tp) returns
        a dummy callable that simply returns its argument. Usage::
            UserId = NewType('UserId', int)
            def name_by_id(user_id: UserId) -> str:
                ...
            UserId('user')          # Fails type check
            name_by_id(42)          # Fails type check
            name_by_id(UserId(42))  # OK
            num = UserId(5) + 1     # type: int
        c��|Sr|ror�s  rrr�zNewType.__call__s���Jrtc��||_d|vr|jd�d}||_||_t	�}|dk7r||_yy)Nr�r,r)rx�
rpartitionrv�
__supertype__rQrw)rqr�r�r9s    rrr�zNewType.__init__sO�� $�D���d�{����s�+�B�/�� �D�M�!#�D���i�G��-�-�")���.rtc�:��|j�G�fd�d�}|fS)Nc���eZdZ�fd�Zy)�&NewType.__mro_entries__.<locals>.Dummyc	�F��|j}td|�d|�d��d���)NzGCannot subclass an instance of NewType. Perhaps you were looking for: `z = NewType(r8z)`)rvr�)r��subcls_name�
supercls_names  �rrr�z8NewType.__mro_entries__.<locals>.Dummy.__init_subclass__s8���"%�,�,�K�#��'�=��K�?�"�]�O�SU�W��rtN)rvrwrxr�)r.s�rr�Dummyr+s���rtr/r})rqrar/r.s   @rrr�zNewType.__mro_entries__s!���!�M�M�M�
�
��8�Ortc�8�|j�d|j��S)Nr�)rwrxrps rrrszNewType.__repr__s���o�o�&�a��(9�(9�':�;�;rtc��|jSr|)rxrps rrrzNewType.__reduce__"s���$�$�$rtr�c�,�tj||fSr|r�rs  rrr�zNewType.__or__)s���|�|�D�%�K�0�0rtc�,�tj||fSr|r�rs  rrr�zNewType.__ror__,s���|�|�E�4�K�0�0rtN)
rvrwrxr�r�r�r�rsrrJr�r�r�rortrrr7r7�
s?��	�	�	*�	� 	<�	%����w�&�
1�
1�'rtr7r@c�v�|duxs4t|ttjtjt
f�S)z:Corresponds to is_unionable() in unionobject.c in CPython.N)r}r�r�r�r�r@r�s rr�
_is_unionabler53s9���d�{��j����������	/
��	rtc���eZdZdZdd�defd�Zdededd	f�fd
�Zdedefd�Z	dedefd�Z
defd
�Zd�Zd�Z
d�Zd�Zej"dk\r
d�Zd�Z�xZS�xZS)r@a�Create named, parameterized type aliases.

        This provides a backport of the new `type` statement in Python 3.12:

            type ListOrSet[T] = list[T] | set[T]

        is equivalent to:

            T = TypeVar("T")
            ListOrSet = TypeAliasType("ListOrSet", list[T] | set[T], type_params=(T,))

        The name ListOrSet can then be used as an alias for the type it refers to.

        The type_params argument should contain all the type parameters used
        in the value of the type alias. If the alias is not generic, this
        argument is omitted.

        Static type checkers should only support type aliases declared using
        TypeAliasType that follow these rules:

        - The first argument (the name) must be a string literal.
        - The TypeAliasType instance must be immediately assigned to a variable
          of the same name. (For example, 'X = TypeAliasType("Y", int)' is invalid,
          as is 'X, Y = TypeAliasType("X", int), TypeAliasType("Y", int)').

        ro)�type_paramsr�c�(�t|t�std��||_||_g}|D]5}t|t
�r|j
|��%|j|��7t|�|_	t�}|dk7r||_||_y)Nz#TypeAliasType name must be a stringr)
r}rr��	__value__r*rr�r�r�rzrQrwrv)rqr��valuer7r�r4r9s       rrr�zTypeAliasType.__init__Xs����d�C�(�� E�F�F�"�D�N�#.�D� ��J�)�
��j�,�7��%�%�j�1��%�%�j�1�	*�
#(�
�"3�D���i�G��-�-�")��� �D�Mrt�_TypeAliasType__name�_TypeAliasType__valuertNc�`��t|d�r|j|�t�|�
||�y)Nrv)r��_raise_attribute_errorr��__setattr__)rqr;r<r�s   �rrr?zTypeAliasType.__setattr__ks*����t�Z�(��+�+�F�3��G����0rtc�&�|j|�yr|)r>)rqr;s  rr�__delattr__zTypeAliasType.__delattr__ps���'�'��/rtc�f�|dk(rtd��|dvrtd|�d���td|�d���)Nrvzreadonly attribute>r9rwrzr*zattribute 'z3' of 'typing.TypeAliasType' objects is not writablez0'typing.TypeAliasType' object has no attribute '�')r�)rqr�s  rrr>z$TypeAliasType._raise_attribute_errorssX���z�!�$�%9�:�:��Y�Y�$�!�$��(&�&���
%�F�t�f�A�N��rtc��|jSr|r}rps rrrszTypeAliasType.__repr__�r~rtc	���t|t�s|f}|D�cgc]&}tj|d|j�d����(}}tj
|t|��Scc}w)Nz
Subscripting z requires a type.)r}r�r�r�rvr�r�s   rrr�zTypeAliasType.__getitem__�sv���j�%�0�(�]�
�
'�	�'�D��"�"��M�$�-�-��8I�J��'�	
���'�'��e�J�.?�@�@��
s�+A$c��|jSr|r}rps rrrzTypeAliasType.__reduce__�r~rtc��td��)NzEtype 'typing_extensions.TypeAliasType' is not an acceptable base typer�rhs   rrr�zTypeAliasType.__init_subclass__�s���W��
rtc��td��)NzType alias is not callabler�rps rrr�zTypeAliasType.__call__�s���8�9�9rtr�c�N�t|�stStj||fSr|�r5r�r�rg)rq�rights  rrr�zTypeAliasType.__or__�s%��%�U�+�)�)��|�|�D�%�K�0�0rtc�N�t|�stStj||fSr|rJ)rq�lefts  rrr�zTypeAliasType.__ror__�s#��$�T�*�)�)��|�|�D�$�J�/�/rt)rvrwrxr�rr�r]r?rCrAr>rsr�rr�r�rJr�r�r�r�r�s@rrr@r@<s����	�6=?�	!��	!�&	1�c�	1�F�	1�t�	1�
	0�c�	0�e�	0�	�s�	�u�	�	!�c�	!�		A�	!�	�	:����w�&�
1�
0�'rtr4�__tpc��t|t�xr4t|dd�xr%|tuxr|ttdt��uS)aZReturn True if the given type is a Protocol.

        Example::

            >>> from typing_extensions import Protocol, is_protocol
            >>> class P(Protocol):
            ...     def a(self) -> str: ...
            ...     b: int
            >>> is_protocol(P)
            True
            >>> is_protocol(int)
            False
        rFr:)r}r�rr:r�r]�rNs rrr4r4�sN��
�t�T�"�
B���n�e�4�
B��H�$�
B��G�F�J���A�A�		
rtc��t|�st|�d���t|d�rt|j�Stt|��S)a�Return the set of members defined in a Protocol.

        Example::

            >>> from typing_extensions import Protocol, get_protocol_members
            >>> class P(Protocol):
            ...     def a(self) -> str: ...
            ...     b: int
            >>> get_protocol_members(P)
            frozenset({'a', 'b'})

        Raise a TypeError for arguments that are not Protocols.
        z is not a Protocolr)r4r�r�r�rr6rPs rrr1r1�sL���4� ��t�h�&8�9�:�:��4�-�.��T�4�4�5�5��,�T�2�3�3rtr|)r�)r�)NNF)ro)�rSry�collections.abcrTrorrJr�r�r�r��__all__�PEP_560r��GenericMetarmr�r�r�r�r�rDr
r�r�r�r�r�rr�rr�r�r�rr�r-r3r6r�r�r�r�r�r
r8r,r)�defaultdict�partialr�rrrrrrrrrrr�_aliasrrrr>rBr^r0r1r�r6rGrQr:rUrXr\�_ProtocolMetaBaser_rZrrlrQr=r<r$r"r!r r#rr%r�rr�r5�	signaturer�r�r�r�r�r�r�r(r2r�r&rr/r.r&�ImportErrorr�r(r?r6r:r<r>r	r
rQrr�r�r�r�rr�rAr��_FinalrrrCrErFr�r�rr�r�r�r�rr;r'r*rBrfrgrJr9r�r+r�r�rr_�Warningrwrr	�_prohibitedrrrrr�_new_signaturer}�FunctionType�__text_signature__r�r�ABC�register�
memoryview�	bytearrayr�r0r7r@r5r4r1rOrGrHrIrKrLrMrNrPrRrSrTrUrVrWrXrYrZr[r\r]r^r`rarbrcrdrerhrirjrkrortrr�<module>rfs���
������
��
��u��p������
�+��*1�<�*���w��
�	�����J�F��*�?�?���F�N�N�3����V�^�^�D����V�^�^�D����v�~�~�f��-���6�>�>�*�D�9�����w���	&�4�	&�9��9��?�?��1�V�0�0��1��6�7��� 0� 0��!� 4�� >��L�L�E�7�+�4�7�
�w�L�

M�E����w���L�L�E�
�@ �
���z�!��n�n�G���	H�v�3�3�4�	H�:�-�T�:�<� 1�2�G��(�(���6�?�#����H��(�(�M��,�,�O�1��0�0��	���+�1�1�4�8���&�P	7�#��{�{��
���	����	��$�$�
��$�$�
������&�&���0�0��� � ���6�=�!��$�$�K� �&�-�-�� 7� 7�"�b��B�K�
�.�.���?�?���&�&��
�{�{���$�$�
��,�-J�K�"��
�������f�����O�
���v�����+�,����w�����)�*��O�,��	�%&�P����w�����H�<�@����6�!�"�?�?�� �!1�2��"���K�K��f&�)�f&�P����0���6�!�	,�v�~�~��	,�,X	,��X	,�v���v���0�0���&�����w���$�$�K��(�(�M��,�,�O��(�(�M��(�(�M��$�$�K��(�(�M���h������������(������������������h�t�n����������������w��� � �I��*�*�N��&�&�L�� 1�� 1� 1�&�2D�2D� E� P� P�P�M�
���6�!��
� �
�Q.��Q.�f���n�k�2�r�B�J��5�6�'.�Q��Q�7�Q�f�v�'�(�"�1�1�>�B��*�,��0�"�6�=�!��$�$�K�
� �6�:���*�*�N��0(>�X�6�;��� � �I��,�,�O�%>�&�.�.�d�%>�N8�8�z���B�Q��7�"��"�"�J����H�1�,�4�?��0�0�6�;��� � �I����b�q��V�#��8��8�'��	
��I�&�)���C�t�C�U�(�U�8�6�?�#��(�(�M��,�,�O���7�
�7�.7�*�7�0�6�;��[�.�[�>b�D�-�b�L�v�}�%��4��B���
6��
6��6�=�!��$�$�K�%�>�>�����b�q��V�#��6��6�:�1��:�#��	
�
�K��6�;��� � �I����b�q��V�#��,3��,3�^7�/�t�7���)
�+
�I�^(/�6�=�=��(/�V�6�?�#��(�(�M��8��8�&�6�6���;�;�D��8��8�"�6�7���L�L�E��8��8�4�6�:�����H��$�$�K����b�q��V�#��3��3�&�3��3�"7�.�d�7���
�
�H�" ��
�

�K� '��T���w��
�]�]�F�)�	���b�q��V�#�'�3�4�'�
#�v�+�+�4�#��+��+�-�#�v�+�+�4�#�/�,�D�/���{�
3�F�-��6�>�"�F�!1�F�KJ�}�KJ�\�6�=�!��$�$�K��1����(�6�>�"��&�&�L�@�E�@�e�@�.���w�� �4�4�� �#� %�$�
�S��S��S��	S�
�S�!�,�,��L�L����V�Z�Z�0�&�/�/�#�v�z�z�/�2R�R�S��
�
�
S��*�*�S�
���!��a��	 �S�l�6�:�����H�	�����F�O�O�C����O�$D�	E�B�!��!�r�!�H�6�<� ��"�"�J�	�����	�B�
;M��	P��P��/�/�&�+�+�g�"6�7�P��	P�

���"��r��	"�P�t�v�~�&� 2�F��*�F�����w���"�"�J��%+�$6�$6�!�!*�+X�!Y��&�$�&�P�,�,���b�"�E�K���1�2�(/�?�3�?�H���6�!�?���j�&�"5�"5�6�,:�J�)�5C�J���2��;�?�?�H�%�
�_�_�
#�
#�F������*�O�O�J��
�O�O�I��
�O�O�E���6�'�(��2�2���D���w���n�n�G�91�91�x�6�?�#��(�(�M��k0�k0�\�6�=�!��$�$�K�!�6�6��
�$�
�4�
�*4�4�4�F�,<�,<�S�,A�4�2� � ��	�����?�?���?�?��
�
�
�
����	�
�{�{��
�
�
�
����	����	�
�.�.���?�?���Y�Y�����	��?�?���?�?���?�?��
�{�{��
�.�.��� � �������&�&���(�(��
�
�
�
��?�?��
�.�.��
�
�
�
��?�?���j�j������	������������
�
�
�
�
�{�{���$�$�
� �8�8���a4�1�"�0�0��1��
�4�%�3�3��4�s$�!|#�(|;�#|8�7|8�;}�}python3.12/site-packages/pip/_vendor/msgpack/__pycache__/ext.cpython-312.pyc000064400000021014151732701640022501 0ustar00�

R`i���$�ddlmZddlZddlZddlZej
ddk(ZereefZ	dZ
neZ		ejjZ
Gd�dedd��ZGd�de�Zy#e
$r%ejejd��Z
Y�GwxYw)	�)�
namedtupleN�c�"��eZdZdZ�fd�Z�xZS)�ExtTypez'ExtType represents ext type in msgpack.c����t|t�std��t|t�std��d|cxkrdkst	d��t	d��t
t|�|||�S)Nzcode must be intzdata must be bytesr�zcode must be 0~127)�
isinstance�int�	TypeError�bytes�
ValueError�superr�__new__)�cls�code�data�	__class__s   ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.pyrzExtType.__new__so����$��$��.�/�/��$��&��0�1�1��D��C���1�2�2� ��1�2�2��W�c�*�3��d�;�;�)�__name__�
__module__�__qualname__�__doc__r�
__classcell__)rs@rrrs���1�<�<rrz	code datac��eZdZdZddgZdd�Zd�Zd�Zd�Zd�Z	e
d	��Zd
�Ze
d��Z
d�Ze
d
��Zd�Zd�Ze
d��Zy)�	TimestampaRTimestamp represents the Timestamp extension type in msgpack.

    When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`. When using pure-Python
    msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and unpack `Timestamp`.

    This class is immutable: Do not override seconds and nanoseconds.
    �seconds�nanosecondsc���t|t�std��t|t�std��d|cxkrdkstd��td��||_||_y)a�Initialize a Timestamp object.

        :param int seconds:
            Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds).
            May be negative.

        :param int nanoseconds:
            Number of nanoseconds to add to `seconds` to get fractional time.
            Maximum is 999_999_999.  Default is 0.

        Note: Negative times (before the UNIX epoch) are represented as negative seconds + positive ns.
        zseconds must be an integerznanoseconds must be an integerr�ʚ;z?nanoseconds must be a non-negative integer less than 999999999.N)r	�	int_typesrr
rr)�selfrrs   r�__init__zTimestamp.__init__-ss���'�9�-��8�9�9��+�y�1��<�=�=��[�(�5�(��Q��
�)��Q��
����&��rc�N�dj|j|j�S)z#String representation of Timestamp.z'Timestamp(seconds={0}, nanoseconds={1}))�formatrr�r"s r�__repr__zTimestamp.__repr__Es$��8�?�?��L�L�$�*�*�
�	
rc��t|�|jur4|j|jk(xr|j|jk(Sy)z0Check for equality with another Timestamp objectF)�typerrr�r"�others  r�__eq__zTimestamp.__eq__KsB����;�$�.�.�(�����
�
�-�W�$�2B�2B�e�FW�FW�2W�
�rc�&�|j|�S)z(not-equals method (see :func:`__eq__()`))r,r*s  r�__ne__zTimestamp.__ne__Ss���;�;�u�%�%�%rc�D�t|j|jf�S)N)�hashrrr&s r�__hash__zTimestamp.__hash__Ws���T�\�\�4�#3�#3�4�5�5rc�8�t|�dk(rtjd|�d}d}net|�dk(r$tjd|�d}|dz}|dz	}n3t|�dk(rtjd	|�\}}ntd
��t	||�S)aUnpack bytes into a `Timestamp` object.

        Used for pure-Python msgpack unpacking.

        :param b: Payload from msgpack ext message with code -1
        :type b: bytes

        :returns: Timestamp object unpacked from msgpack ext payload
        :rtype: Timestamp
        ��!Lr��!Ql���"��!IqzFTimestamp type can only be created from 32, 64, or 96-bit byte objects)�len�struct�unpackr
r)�brr�data64s    r�
from_byteszTimestamp.from_bytesZs����q�6�Q�;��m�m�D�!�,�Q�/�G��K�
��V�q�[��]�]�4��+�A�.�F��1�1�G� �B�,�K�
��V�r�\�#)�=�=���#:� �K���X��
���+�.�.rc�(�|jdz	dk(rT|jdz|jz}|dzdk(rtjd|�}|Stjd|�}|Stjd|j|j�}|S)z�Pack this Timestamp object into bytes.

        Used for pure-Python msgpack packing.

        :returns data: Payload for EXT message with code -1 (timestamp type)
        :rtype: bytes
        r7rl��r4r6r9)rrr;�pack)r"r>rs   r�to_byteszTimestamp.to_bytesus���
�L�L�B��1�$��%�%��+�d�l�l�:�F��*�*�a�/��{�{�4��0����	�{�{�4��0�����;�;�u�d�&6�&6����E�D��rc�X�t|dz�}t|dzdz�}t||�S)z�Create a Timestamp from posix timestamp in seconds.

        :param unix_float: Posix timestamp in seconds.
        :type unix_float: int or float.
        �r )r
r)�unix_secrrs   r�	from_unixzTimestamp.from_unix�s2���h�!�m�$���8�a�<�5�0�1����+�.�.rc�:�|j|jdzzS)znGet the timestamp as a floating-point value.

        :returns: posix timestamp
        :rtype: float
        ge��A�rrr&s r�to_unixzTimestamp.to_unix�s���|�|�d�.�.��4�4�4rc�&�tt|d��S)z�Create a Timestamp from posix timestamp in nanoseconds.

        :param int unix_ns: Posix timestamp in nanoseconds.
        :rtype: Timestamp
        r )r�divmod)�unix_nss r�from_unix_nanozTimestamp.from_unix_nano�s���&��%�0�1�1rc�:�|jdz|jzS)z~Get the timestamp as a unixtime in nanoseconds.

        :returns: posix timestamp in nanoseconds
        :rtype: int
        r rHr&s r�to_unix_nanozTimestamp.to_unix_nano�s���|�|�e�#�d�&6�&6�6�6rc��tjjdt�tj|j	���zS)zlGet the timestamp as a UTC datetime.

        Python 2 is not supported.

        :rtype: datetime.
        r)r)�datetime�
fromtimestamp�_utc�	timedeltarIr&s r�to_datetimezTimestamp.to_datetime�s:��� � �.�.�q�$�7�(�:L�:L��L�L�N�;
�
�	
rc�H�tj|j��S)zuCreate a Timestamp from datetime with tzinfo.

        Python 2 is not supported.

        :rtype: Timestamp
        )rrF�	timestamp)�dts r�
from_datetimezTimestamp.from_datetime�s���"�"�2�<�<�>�2�2rN)r)rrrr�	__slots__r#r'r,r.r1�staticmethodr?rBrFrIrMrOrUrY�rrrr"s�����M�*�I�'�0
��&�6��/��/�4�*�/��/�5��2��2�7�	
��3��3rr)�collectionsrrQ�sysr;�version_info�PY2r
�longr!rS�timezone�utc�AttributeErrorrTr�objectrr\rr�<module>rfs���"��
�
�
���q��Q�����d��I��D��I�8�� � �$�$��

<�j��K�0�
<�_3��_3��#�8� �x� � �!3��!3�!3�A�!6�7��8�s�A%�%'B�Bpython3.12/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-312.pyc000064400000003527151732701640023451 0ustar00�

R`il���ddl�ddlmZmZddlZddlZdZdZejjd�sejddk(rdd	lmZm
Z
mZn	dd	lmZm
Z
mZd
�Zd�Zd�ZeZe
ZeZeZy#e$r
dd	lmZm
Z
mZY�#wxYw)
�)�*)�ExtType�	Timestamp�N)rr�z1.0.5�MSGPACK_PUREPYTHON�)�Packer�unpackb�Unpackerc�Z�tdi|��}|j|j|��y)zX
    Pack object `o` and write it to `stream`

    See :class:`Packer` for options.
    N�)r
�write�pack)�o�stream�kwargs�packers    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.pyrrs%���
�f�
�F�
�L�L����Q�� �c�6�tdi|��j|�S)zW
    Pack object `o` and return packed bytes

    See :class:`Packer` for options.
    r)r
r)rrs  r�packbr s����F�� � ��#�#rc�:�|j�}t|fi|��S)z�
    Unpack an object from `stream`.

    Raises `ExtraData` when `stream` contains extra bytes.
    See :class:`Unpacker` for options.
    )�readr)rr�datas   r�unpackr)s���;�;�=�D��4�"�6�"�"r)�
exceptions�extrr�os�sys�version�__version__�environ�get�version_info�fallbackr
rr�	_cmsgpack�ImportErrorrrr�load�loads�dump�dumpsrrr�<module>r-s����#�	�
������:�:�>�>�&�'�3�+;�+;�A�+>�!�+C�3�3�8�8�8�
!�$�#�������
���O�8�7�7�8�s�
A/�/B�Bpython3.12/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-312.pyc000064400000004031151732701640024062 0ustar00�

R`i9���Gd�de�ZGd�de�ZGd�de�ZGd�dee�ZGd�d	ee�ZeZGd
�de�ZeZ	eZ
eZy)
c��eZdZdZy)�UnpackExceptionz�Base class for some exceptions raised while unpacking.

    NOTE: unpack may raise exception other than subclass of
    UnpackException.  If you want to catch all error, catch
    Exception instead.
    N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.pyrrs��r
rc��eZdZy)�
BufferFullN�rrrr	r
rr
r

���r
r
c��eZdZy)�	OutOfDataNrr	r
rrrrr
rc��eZdZdZy)�FormatErrorzInvalid msgpack formatNrr	r
rrrs�� r
rc��eZdZdZy)�
StackErrorz
Too nestedNrr	r
rrrs��r
rc��eZdZdZd�Zd�Zy)�	ExtraDataz�ExtraData is raised when there is trailing data.

    This exception is raised while only one-shot (not streaming)
    unpack.
    c� �||_||_y)N)�unpacked�extra)�selfrrs   r�__init__zExtraData.__init__%s�� ��
���
r
c��y)Nzunpack(b) received extra data.r	)rs r�__str__zExtraData.__str__)s��/r
N)rrrrrrr	r
rrrs����0r
rN)
�	Exceptionrr
r�
ValueErrorrr�UnpackValueErrorr�
PackException�PackValueError�
OverflowError�PackOverflowErrorr	r
r�<module>r&sl���i��	��	�	��	�!�*�o�!���_��
��0� �0� �
���!�r
python3.12/site-packages/pip/_vendor/msgpack/__pycache__/fallback.cpython-312.pyc000064400000125110151732701650023443 0ustar00�

R`i����dZddlmZddlZddlZej
ddk(ZereefZ	d�Z
n	eZ	eZe
Zd�Z
ej
dkreZd�Znd	�Zeed
�rddlmZ	ddlmZdZGd�de�ZndZddlmZd�ZddlmZm Z m!Z!m"Z"m#Z#ddl$m%Z%m&Z&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1e2e3fd�Z4d�Z5d�Z6ej
dkrdLd�Z7nejpZ7d Z9id!de9e/f�d"dd#e/f�d$dd%e/f�d&dd'e0f�d(dd)e0f�d*dd+e0f�d,d-�d.d/�d0de9f�d1d2�d3d4�d5d6�d7d8�d9d:�d;d<�d=d>�d?dd@e0f�ddAe0fddBe0fdCdDe0fdEdFe0fde9e.fdd#e.fdd%e.fdd#e,fdd%e,fdd#e-fdd%e-fdG��Z:GdH�dIe�Z;GdJ�dKe�Z<y#e$r
dd
lmZY��wxYw)Mz.Fallback pure Python implementation of msgpack�)�datetimeN�c�"�|j�S�N)�	iteritems��ds ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py�dict_iteritemsrs���{�{�}��c�"�|j�Sr)�itemsrs r
rrs���w�w�y�r)��c��t|j�dk(xr=t|jdt�xr|jdj	d�S)N�rz maximum recursion depth exceeded)�len�args�
isinstance�str�
startswith��es r
�_is_recursionerrorrsL������K�1��
I��1�6�6�!�9�c�*�
I����q�	�$�$�%G�H�	
rc��y)NT�rs r
rr$s��r�pypy_version_info)�newlist_hint)�BytesBuilder)�
StringBuilderTc� �eZdZdd�Zd�Zd�Zy)�StringIOc��|r5tt|��|_|jj|�yt�|_yr)r r�builder�append��self�ss  r
�__init__zStringIO.__init__4s0���,�S��V�4������#�#�A�&�,���rc��t|t�r|j�}nt|t�rt	|�}|j
j
|�yr)r�
memoryview�tobytes�	bytearray�bytesr$r%r&s  r
�writezStringIO.write;s<���!�Z�(��I�I�K���A�y�)��!�H���L�L����"rc�6�|jj�Sr)r$�build�r's r
�getvaluezStringIO.getvalueBs���<�<�%�%�'�'rN)r)�__name__�
__module__�__qualname__r)r/r3rrr
r"r"3s��	/�	#�	(rr"F)�BytesIOc��gSrr)�sizes r
�<lambda>r:Is��rr)�
BufferFull�	OutOfData�	ExtraData�FormatError�
StackError)�ExtType�	Timestampr�ri�c�>�||�|ur
||�|vS||�|uSrr)�obj�t�type�tuples    r
�_check_type_strictrH`s*���A�w�%���C�y�A�~���C�y�A�~�rc�P�t|�}|jdk7rtd��|S)Nrz$cannot unpack from multi-byte object)r+�itemsize�
ValueError)rD�views  r
�_get_data_from_bufferrMgs(���c�?�D��}�}����?�@�@��Krc�6�tddt|�i|��}|j|�	|j�}|j�rt||j���|S#t$rtd��t$r}t|�rt��d}~wwxYw)aw
    Unpack an object from `packed`.

    Raises ``ExtraData`` when *packed* contains extra bytes.
    Raises ``ValueError`` when *packed* is incomplete.
    Raises ``FormatError`` when *packed* is not valid msgpack.
    Raises ``StackError`` when *packed* contains too nested.
    Other exceptions can be raised during unpacking.

    See :class:`Unpacker` for options.
    N�max_buffer_sizezUnpack failed: incomplete inputr)�Unpackerr�feed�_unpackr<rK�RecursionErrorrr?�_got_extradatar=�_get_extradata)�packed�kwargs�unpacker�retrs     r
�unpackbrZns����D�c�&�k�D�V�D�H��M�M�&������ ����� ���X�4�4�6�7�7��J���<��:�;�;����a� ���
���s�A%�%B�B�B)r��c�B�tj|t|�|�S)z0Explicit type cast for legacy struct.unpack_from)�struct�unpack_fromr.)�f�b�os   r
�_unpack_fromrc�s���!�!�!�U�1�X�q�1�1r������>H���>I���Bb��z>Hb��z>Ib��)rBz>f��)�z>d����)rrg��)rBri��)rpz>Q��)rra��)rz>h��)rBz>i��)rpz>q���b1s�b2s�b4srp�b8s��b16s)����������������������c��eZdZdZdddddddddddedddddfd�Zd	�Zd
�Zd�Zd�Z	d
�Z
dd�Zdd�Zd�Z
efd�Zd�Zd�ZeZd�Zd�Zd�Zd�Zd�Zy)rPa�Streaming unpacker.

    Arguments:

    :param file_like:
        File-like object having `.read(n)` method.
        If specified, unpacker reads serialized data from it and :meth:`feed()` is not usable.

    :param int read_size:
        Used as `file_like.read(read_size)`. (default: `min(16*1024, max_buffer_size)`)

    :param bool use_list:
        If true, unpack msgpack array to Python list.
        Otherwise, unpack to Python tuple. (default: True)

    :param bool raw:
        If true, unpack msgpack raw to Python bytes.
        Otherwise, unpack to Python str by decoding with UTF-8 encoding (default).

    :param int timestamp:
        Control how timestamp type is unpacked:

            0 - Timestamp
            1 - float  (Seconds from the EPOCH)
            2 - int  (Nanoseconds from the EPOCH)
            3 - datetime.datetime  (UTC).  Python 2 is not supported.

    :param bool strict_map_key:
        If true (default), only str or bytes are accepted for map (dict) keys.

    :param callable object_hook:
        When specified, it should be callable.
        Unpacker calls it with a dict argument after unpacking msgpack map.
        (See also simplejson)

    :param callable object_pairs_hook:
        When specified, it should be callable.
        Unpacker calls it with a list of key-value pairs after unpacking msgpack map.
        (See also simplejson)

    :param str unicode_errors:
        The error handler for decoding unicode. (default: 'strict')
        This option should be used only when you have msgpack data which
        contains invalid UTF-8 string.

    :param int max_buffer_size:
        Limits size of data waiting unpacked.  0 means 2**32-1.
        The default value is 100*1024*1024 (100MiB).
        Raises `BufferFull` exception when it is insufficient.
        You should set this parameter when unpacking data from untrusted source.

    :param int max_str_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max length of str. (default: max_buffer_size)

    :param int max_bin_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max length of bin. (default: max_buffer_size)

    :param int max_array_len:
        Limits max length of array.
        (default: max_buffer_size)

    :param int max_map_len:
        Limits max length of map.
        (default: max_buffer_size//2)

    :param int max_ext_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max size of ext type.  (default: max_buffer_size)

    Example of streaming deserialize from file-like object::

        unpacker = Unpacker(file_like)
        for o in unpacker:
            process(o)

    Example of streaming deserialize from socket::

        unpacker = Unpacker()
        while True:
            buf = sock.recv(1024**2)
            if not buf:
                break
            unpacker.feed(buf)
            for o in unpacker:
                process(o)

    Raises ``ExtraData`` when *packed* contains extra bytes.
    Raises ``OutOfData`` when *packed* is incomplete.
    Raises ``FormatError`` when *packed* is not valid msgpack.
    Raises ``StackError`` when *packed* contains too nested.
    Other exceptions can be raised during unpacking.
    NrTFi@���c��|
�d}
|�d|_n.t|j�std��||_d|_t�|_d|_d|_|sd}|
dk(r|}
|dk(r|}|dk(r|}|dk(r|dz}|dk(r|}||_	||jkDrtd	��|xst|jd
�|_t|�|_t|�|_|
|_||_d|cxkrdkstd��td��||_|	|_||_||_||_|
|_||_||_||_||_d|_|	�t|	�std
��|�t|�std��|�t|�std��|�
|�td��t|�std��y)N�strictTz!`file_like.read` must be callableFri���r�rz.read_size must be smaller than max_buffer_sizei@rztimestamp must be 0..3z`list_hook` is not callablez`object_hook` is not callablez#`object_pairs_hook` is not callablez8object_pairs_hook and object_hook are mutually exclusivez`ext_hook` is not callable)�_feeding�callable�read�	TypeError�	file_liker-�_buffer�_buff_i�_buf_checkpoint�_max_buffer_sizerK�min�
_read_size�bool�_raw�_strict_map_key�_unicode_errors�	_use_list�
_timestamp�
_list_hook�_object_hook�_object_pairs_hook�	_ext_hook�_max_str_len�_max_bin_len�_max_array_len�_max_map_len�_max_ext_len�_stream_offset)r'r��	read_size�use_list�raw�	timestamp�strict_map_key�object_hook�object_pairs_hook�	list_hook�unicode_errorsrO�ext_hook�max_str_len�max_bin_len�
max_array_len�max_map_len�max_ext_lens                  r
r)zUnpacker.__init__s��(�!�%�N��� �D�M��I�N�N�+�� C�D�D�&�D�N�!�D�M�!�{������ !����'�O��"��)�K��"��)�K��B��+�M��"��)�Q�.�K��"��)�K� /����t�,�,�,��M�N�N�#�L�s�4�+@�+@�)�'L�����I��	�#�N�3���-���!����Y�#�!�#��5�6�6�$��5�6�6�#���#���'���"3���!���'���'���+���'���'������� ��)�)<��9�:�:��"�8�K�+@��;�<�<��(��:K�1L��A�B�B��"�'8�'D��M��
���!��8�9�9�"rc��|jsJ�t|�}t|j�|jz
t|�z|j
kDrt�|jdkDr?|jd|j�=|xj|jzc_d|_|jj|�y�Nr)	r�rMrr�r�r�r;r��extend)r'�
next_bytesrLs   r
rQz
Unpacker.feedps����}�}��}�$�Z�0���t�|�|��t�|�|�+�c�$�i�7�$�:O�:O�O������!�#����3�t�3�3�3�4��L�L�D�0�0�0�L�#$�D� �	
�����D�!rc�~�|xj|j|jz
z
c_|j|_y)z)Gets rid of the used parts of the buffer.N)r�r�r�r2s r
�_consumezUnpacker._consumes.�����t�|�|�d�.B�.B�B�B��#�|�|��rc�F�|jt|j�kSr)r�rr�r2s r
rTzUnpacker._got_extradata�s���|�|�c�$�,�,�/�/�/rc�4�|j|jdSr)r�r�r2s r
rUzUnpacker._get_extradata�s���|�|�D�L�L�N�+�+rc�L�|j|d��}|j�|S)NF��raise_outofdata)�_readr��r'�nrYs   r
�
read_byteszUnpacker.read_bytes�s"���j�j��E�j�2���
�
���
rc��|j||��|j}|j|||z}|t|�z|_|S)Nr�)�_reserver�r�r)r'r�r��irYs     r
r�zUnpacker._read�sC���
�
�a��
�9��L�L���l�l�1�q�1�u�%���3�s�8�|����
rc���t|j�|jz
|z
}|dk\ry|jr|j|_t
�|jdkDr?|jd|j�=|xj|jzc_d|_|}|t|j�z|jkDrt�|dkDrot|j|�}|jj|�}|sn;t|t�sJ�|xj|z
c_|t|�z}|dkDr�ot|j�||jzkr|r
d|_t
�yyr�)rr�r�r�r�r<r�r;�maxr�r�r�rr.)r'r�r��remain_bytes�
to_read_bytes�	read_datas      r
r�zUnpacker._reserve�sN���4�<�<�(�4�<�<�7�!�;���1����=�=��/�/�D�L��O����!�#����3�t�3�3�3�4��L�L�D�0�0�0�L�#$�D� �%�}���#�d�l�l�+�+�d�.C�.C�C����Q�������>�M����+�+�M�:�I����i��/�/�/��L�L�I�%�L��C�	�N�*�L��Q���t�|�|��q�4�<�<�/�/�O��D�L��O�5D�/rc��t}d}d}|jd�|j|j}|xjdz
c_|dzdk(r|}�n}|dzdk(r
d|dzz
}�nk|dzdk(rH|dz}t}||j
kDrt
|�d	|j
�d
���|j|�}�n|dzdk(r6|d
z}t}||jkD�r�t
|�d|j�d
���|dzdk(r6|d
z}t}||jkD�r�t
|�d|j�d
���|dk(rd}�n�|dk(rd}�n�|dk(rd}�n�d|cxkrdkr�nn�t|\}}}|j|�t|�dkDr%t||j|j�d}n|j|j}|xj|z
c_||jkDrt
|�d|j�d
���|j|�}�n�d|cxkrdkr�nn�t|\}}}|j|�t||j|j�\}}|xj|z
c_||j kDrt
|�d|j �d
���|j|�}�nd|cxkrdkr�nn�t|\}}|j|�t|�dkDr%t||j|j�d}n|j|j}|xj|z
c_�n�d|cxkrdkr�nn�t|\}}}|j |krt
|�d|j �d
���|j|dz�t||j|j�\}}|xj|dzz
c_�n�d|cxkrd kr�nn�t|\}}}|j|�t|�dkDr$t||j|j�\}n|j|j}|xj|z
c_||j
kDrt
|�d	|j
�d
���|j|�}�n*d!|cxkrd"kr�nn�t|\}}}|j|�t||j|j�\}|xj|z
c_||jkDr�t
|�d|j�d
���d#|cxkrd$kr�nn�t|\}}}|j|�t||j|j�\}|xj|z
c_||jkDr)t
|�d|j�d
���t#d%|z��|||fS)&Nrr���r����z exceeds max_str_len(�)����z exceeds max_array_len(z exceeds max_map_len(���F��Trerhz exceeds max_bin_len(rjrmz exceeds max_ext_len(rnrxryr�r�r�r�r�r�r�zUnknown header: 0x%x)�TYPE_IMMEDIATEr�r�r��TYPE_RAWr�rKr��
TYPE_ARRAYr��TYPE_MAPr��_MSGPACK_HEADERSrrcr�r�r>)r'�typr�rDrar9�fmt�Ls        r
�_read_headerzUnpacker._read_header�s����
�����
�
�a���L�L����&���������z�>�Q���C�
��^�z�
)���D��/�C�
��^�z�
)��J��A��C��4�$�$�$� ��D�DU�DU�!V�W�W��*�*�Q�-�C�
��^�z�
)��J��A��C��4�&�&�&� �67��9L�9L�M�����^�z�
)��J��A��C��4�$�$�$� ��D�DU�DU�!V�W�W�
�$�Y��C�
�$�Y��C�
�$�Y��C�
�Q�
�$�
�-�a�0�N�D�#�s��M�M�$���3�x�!�|� ��d�l�l�D�L�L�A�!�D���L�L����.���L�L�D� �L��4�$�$�$� ��D�DU�DU�!V�W�W��*�*�Q�-�C�
�Q�
�$�
�-�a�0�N�D�#�s��M�M�$����T�\�\�4�<�<�@�D�A�q��L�L�D� �L��4�$�$�$� ��D�DU�DU�!V�W�W��*�*�Q�-�C�
�Q�
�$�
�(��+�I�D�#��M�M�$���3�x�!�|�"�3����d�l�l�C�A�F���l�l�4�<�<�0���L�L�D� �L�
�Q�
�$�
�-�a�0�N�D�#�s�� � �4�'� �48�$�:K�:K�L���
�M�M�$��(�#�!�#�t�|�|�T�\�\�B�F�A�s��L�L�D�1�H�$�L�
�Q�
�$�
�-�a�0�N�D�#�s��M�M�$���3�x�!�|�#�C����t�|�|�D����L�L����.���L�L�D� �L��4�$�$�$� ��D�DU�DU�!V�W�W��*�*�Q�-�C�
�Q�
�$�
�-�a�0�N�D�#�s��M�M�$����T�\�\�4�<�<�@�D�Q��L�L�D� �L��4�&�&�&� �67��9L�9L�M����Q�
�$�
�-�a�0�N�D�#�s��M�M�$����T�\�\�4�<�<�@�D�Q��L�L�D� �L��4�$�$�$� ��D�DU�DU�!V�W�W��4�q�8�9�9��A�s�{�rc	����j�\}}}|tk(r|tk7rtd��|S|tk(r|t
k7rtd��|S|tk(r�|tk(r&t|�D]}�jt��yt|�}t|�D]&}|j�jt���(�j��j|�}�jr|St|�S|t
k(�rB|tk(r;t|�D],}�jt��jt��.y�j�%�j�fd�t|�D��}|Si}t|�D]�}�jt�}�j r7t#|�t$t&fvr tdt)t#|��z��t*s&t#|�t(urt-j.|�}�jt�||<���j0��j1|�}|S|tk(ry|t2k(r7�j4r
t'|�}|S|j7d�j8�}|S|t:k(rt'|�S|t<k(r�|dk(r}t?j@t'|��}	�jBdk(r|	jE�S�jBdk(r|	jG�S�jBd	k(r|	jI�S|	S�jK|t'|��S|tLk(sJ�|S)
NzExpected arrayzExpected mapc3�r�K�|].}�jt��jt�f���0y�wr)rR�EX_CONSTRUCT)�.0�_r's  �r
�	<genexpr>z#Unpacker._unpack.<locals>.<genexpr>@s0�����.�&���\�\�,�/����l�1K�L�&�s�47z%s is not allowed for map key�utf_8r�rrr)'r��EX_READ_ARRAY_HEADERr�rK�EX_READ_MAP_HEADERr��EX_SKIP�xrangerRrr%r�r�r�rGr�r�rF�unicoder.r�PY2�sys�internr�r�r��decoder��TYPE_BIN�TYPE_EXTrA�
from_bytesr��to_unix�to_unix_nano�to_datetimer�r�)
r'�executer�r�rDr�rYr��key�tss
`         r
rRzUnpacker._unpacks�����'�'�)���Q���*�*��j� � �!1�2�2��H��(�(��h�� ��0�0��H��*���'�!����A��L�L��)�#���q�/�C��A�Y���
�
�4�<�<��5�6�����*��o�o�c�*���.�.�3�8�e�C�j�8��(�?��'�!����A��L�L��)��L�L��)�#���&�&�2��-�-�.�#�A�Y�.���"�J������A��,�,�|�4�C��+�+��S�	�'�5�AQ�0Q�(�;�c�$�s�)�n�L����4��9��#3�!�j�j��o��#�|�|�L�9�C��H�#��$�$�0��+�+�C�0�C��J��g����(�?��y�y��C�j���J��j�j��$�*>�*>�?���J��(�?���:���(�?��B�w��)�)�%��*�5���?�?�a�'��:�:�<�'��_�_��)��?�?�,�,��_�_��)��>�>�+�+��I��~�~�a��s��4�4��n�$�$�$��
rc��|Srrr2s r
�__iter__zUnpacker.__iter__ls���rc��	|jt�}|j�|S#t$r|j�t�t
$rt�wxYwr)rRr�r�r<�
StopIterationrSr?�r'rYs  r
�__next__zUnpacker.__next__osO��	��,�,�|�,�C��M�M�O��J���	 ��M�M�O����	���	�s	�&)�.Ac�N�|jt�|j�yr)rRr�r�r2s r
�skipz
Unpacker.skip|s�����W���
�
�rc�x�	|jt�}|j	�|S#t$rt�wxYwr)rRr�rSr?r�rs  r
�unpackzUnpacker.unpack�s<��	��,�,�|�,�C�	
�
�
���
���	���	�s�)�9c�P�|jt�}|j�|Sr)rRr�r�rs  r
�read_array_headerzUnpacker.read_array_header�s���l�l�/�0���
�
���
rc�P�|jt�}|j�|Sr)rRr�r�rs  r
�read_map_headerzUnpacker.read_map_header�s���l�l�-�.���
�
���
rc��|jSr)r�r2s r
�tellz
Unpacker.tell�s���"�"�"r)T)r4r5r6�__doc__r@r)rQr�rTrUr�r�r�r�r�rRrr�nextrrr
rrrrr
rPrP�s���]�B����������)�������%[:�z
"�,�
0�,��
� �Dd�L+�K�Z�	��D����
�
#rrPc��eZdZdZ							dd�Zeeefd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zefd�Zd
�Zd�Zd�Zd�Zd�Zy)�Packera8	
    MessagePack Packer

    Usage::

        packer = Packer()
        astream.write(packer.pack(a))
        astream.write(packer.pack(b))

    Packer's constructor has some keyword arguments:

    :param callable default:
        Convert user type to builtin type that Packer supports.
        See also simplejson's document.

    :param bool use_single_float:
        Use single precision float type for float. (default: False)

    :param bool autoreset:
        Reset buffer after each pack and return its content as `bytes`. (default: True).
        If set this to false, use `bytes()` to get content and `.reset()` to clear buffer.

    :param bool use_bin_type:
        Use bin type introduced in msgpack spec 2.0 for bytes.
        It also enables str8 type for unicode. (default: True)

    :param bool strict_types:
        If set to true, types will be checked to be exact. Derived classes
        from serializable types will not be serialized and will be
        treated as unsupported type and forwarded to default.
        Additionally tuples will not be serialized as lists.
        This is useful when trying to implement accurate serialization
        for python types.

    :param bool datetime:
        If set to true, datetime with tzinfo is packed into Timestamp type.
        Note that the tzinfo is stripped in the timestamp.
        You can get UTC datetime with `timestamp=3` option of the Unpacker.
        (Python 2 is not supported).

    :param str unicode_errors:
        The error handler for encoding unicode. (default: 'strict')
        DO NOT USE THIS!!  This option is kept for very specific usage.

    Example of streaming deserialize from file-like object::

        unpacker = Unpacker(file_like)
        for o in unpacker:
            process(o)

    Example of streaming deserialize from socket::

        unpacker = Unpacker()
        while True:
            buf = sock.recv(1024**2)
            if not buf:
                break
            unpacker.feed(buf)
            for o in unpacker:
                process(o)

    Raises ``ExtraData`` when *packed* contains extra bytes.
    Raises ``OutOfData`` when *packed* is incomplete.
    Raises ``FormatError`` when *packed* is not valid msgpack.
    Raises ``StackError`` when *packed* contains too nested.
    Other exceptions can be raised during unpacking.
    Nc���||_||_||_||_t	�|_tr
|rtd��t|�|_	|xsd|_
|�t|�std��||_
y)Nz%datetime is not supported in Python 2r�zdefault must be callable)�
_strict_types�
_use_float�
_autoreset�
_use_bin_typer"r�r�rKr��	_datetimer�r�r��_default)r'�default�use_single_float�	autoreset�use_bin_type�strict_typesrr�s        r
r)zPacker.__init__�su��*���*���#���)����z����8��D�E�E��h����-�9�������G�$�� :�;�;���
rc��d}|jr	|}t}nttf}	|dkrtd��|�|jjd�S||t�r8|r|jjd�S|jjd�S||t��r�d|cxkrdkr2nn/|jjtjd	|��Sd
|cxkrdkr2nn/|jjtjd|��Sd|cxkrdkr3nn0|jjtjd
d|��Sd|cxkrdkr3nn0|jjtjdd|��Sd|cxkrdkr3nn0|jjtjdd|��Sd|cxkrdkr3nn0|jjtjdd|��Sd|cxkrdkr3nn0|jjtjdd|��Sd|cxkrdkr3nn0|jjtjdd|��Sd|cxkrdkr3nn0|jjtjdd |��Sd!|cxkrdkr3nn0|jjtjd"d#|��S|s!|j�|j|�}d}��td$��||ttf�r]t|�}|d%k\r!td&t|�j z��|j#|�|jj|�S||t$�rc|j'd'|j(�}t|�}|d%k\rtd(��|j+|�|jj|�S||t,�rH|j.}|d%k\rtd)��|j#|�|jj|�S||t0�rl|j2r0|jjtjd*d+|��S|jjtjd,d-|��S||t4t6f��r�||t6�rd.}|j9�}	n|j:}|j<}	t?|t@�sJ�t?|	t�sJ�t|	�}
|
d/k(r|jjd0��n |
d1k(r|jjd2�n�|
d3k(r|jjd4�n�|
d5k(r|jjd6�n�|
d7k(r|jjd8�n�|
dkr1|jjtjd9d:|
��nf|
dkr1|jjtjdd;|
��n0|jjtjdd<|
��|jjtjd|��|jj|	�y|||�rEt|�}|jC|�tE|�D]}|jG|||d/z
��y||tH�r(|jKt|�tM|�|d/z
�S|jNr2||tP�r%|jR�t7jT|�}d/}���|s!|j�|j|�}d/}���|jNr||tP�rtd=|�d>���tWd=|����)?NFTrzrecursion limit exceeded������r��Bi��rar��BBrqi����z>Bbru��>BHrri���z>Bhrv����>BIrsi�z>Birwl����z>BQrtl����z>BqrxzInteger value out of range�z%s is too largezutf-8zString is too largezMemoryview is too largez>Bfrnz>Bdror�r��r��rB��rp��r~��>BBrjrlrmzCannot serialize z where tzinfo=None),r�listrGrKr�r/r��	int_typesr^�packr�
OverflowErrorr.r-rrFr4�_pack_bin_headerr��encoder��_pack_raw_headerr+�nbytes�floatrr@rA�to_bytes�code�datar�int�_pack_array_headerr��_pack�dict�_pack_map_pairsrr�	_DateTime�tzinfo�
from_datetimer�)r'rD�
nest_limit�check�check_type_strict�default_used�
list_typesr�r:r;r�r�s            r
r>zPacker._pack�sg�������%�E��J����J���A�~� �!;�<�<��{��|�|�)�)�'�2�2��S�$����<�<�-�-�g�6�6��|�|�)�)�'�2�2��S�)�$���?�d�?��<�<�-�-�f�k�k�#�s�.C�D�D��C�#�!�#��<�<�-�-�f�k�k�#�s�.C�D�D��3�&�$�&��<�<�-�-�f�k�k�$��c�.J�K�K��C�#�!�#��<�<�-�-�f�k�k�%��s�.K�L�L��#�'��'��<�<�-�-�f�k�k�%��s�.K�L�L��c�)�E�)��<�<�-�-�f�k�k�%��s�.K�L�L��C�-�:�-��<�<�-�-�f�k�k�%��s�.K�L�L��#�/��/��<�<�-�-�f�k�k�%��s�.K�L�L���9�'9�9��<�<�-�-�f�k�k�%��s�.K�L�L�&�#�;��;��<�<�-�-�f�k�k�%��s�.K�L�L�#��
�
�(A��-�-��,�C�#'�L��#�$@�A�A��S�5�)�,�-���H����:�$�%6��c��9K�9K�%K�L�L��%�%�a�(��|�|�)�)�#�.�.��S�'�"��j�j��$�*>�*>�?����H����:�$�%:�;�;��%�%�a�(��|�|�)�)�#�.�.��S�*�%��J�J����:�$�%>�?�?��%�%�a�(��|�|�)�)�#�.�.��S�%� ��?�?��<�<�-�-�f�k�k�%��s�.K�L�L��|�|�)�)�&�+�+�e�T�3�*G�H�H��S�7�I�.�/���i�(��D��<�<�>�D��8�8�D��8�8�D�!�$��,�,�,�!�$��.�.�.���I����6��L�L�&�&�w�/��!�V��L�L�&�&�w�/��!�V��L�L�&�&�w�/��!�V��L�L�&�&�w�/��"�W��L�L�&�&�w�/��$�Y��L�L�&�&�v�{�{�5�$��'B�C��&�[��L�L�&�&�v�{�{�5�$��'B�C��L�L�&�&�v�{�{�5�$��'B�C����"�"�6�;�;�s�D�#9�:����"�"�4�(���S�*�%���H���'�'��*����A��J�J�s�1�v�z�A�~�6�#���S�$���+�+���H�n�S�1�:��>����~�~�%��Y�"7�C�J�J�<R��-�-�c�2�� ����D�M�M�$=��m�m�C�(�� ����~�~�%��Y�"7� �C�!Q�R�R��S�:�;�;rc��	|j|�|jr+|jj	�}t�|_|Sy#t�|_�xYwr)r>r"r�rr3)r'rDrYs   r
r2zPacker.packqsS��	��J�J�s�O��?�?��,�,�'�'�)�C�#�:�D�L��J���	�#�:�D�L��s�A�Ac��|jt|�|�|jr+|jj	�}t�|_|Syr)r@rrr�r3r")r'�pairsrYs   r
�pack_map_pairszPacker.pack_map_pairs|sB�����S��Z��/��?�?��,�,�'�'�)�C�#�:�D�L��J�rc��|dk\rt�|j|�|jr+|jj	�}t�|_|Sy�Nr))rKr=rr�r3r"r�s   r
�pack_array_headerzPacker.pack_array_header�sI����:�������"��?�?��,�,�'�'�)�C�#�:�D�L��J�rc��|dk\rt�|j|�|jr+|jj	�}t�|_|SyrN)rK�_pack_map_headerrr�r3r"r�s   r
�pack_map_headerzPacker.pack_map_header�sI����:������a� ��?�?��,�,�'�'�)�C�#�:�D�L��J�rc��t|t�std��d|cxkrdkstd��td��t|t�std��t|�}|dkDrtd��|dk(r|jjd	��n'|d
k(r|jjd��n|dk(r|jjd
�n�|dk(r|jjd�n�|dk(r|jjd�n�|dkr3|jjdtjd|�z�nj|dkr3|jjdtjd|�z�n2|jjdtjd|�z�|jjtjd|��|jj|�y)Nztypecode must have int type.r�ztypecode should be 0-127zdata must have bytes typer'zToo large datarr*rr+rBr,rpr-r~r.r���r#r%��rg��ri)
rr<r�rKr.rr�r/r^r2)r'�typecoder;r�s    r
�
pack_ext_typezPacker.pack_ext_type�s����(�C�(��:�;�;��H�#��#��7�8�8�$��7�8�8��$��&��7�8�8���I���z�>��-�.�.���6��L�L���w�'�
�!�V��L�L���w�'�
�!�V��L�L���w�'�
�!�V��L�L���w�'�
�"�W��L�L���w�'�
�$�Y��L�L���w����S�!�)<�<�=�
�&�[��L�L���w����T�1�)=�=�>��L�L���w����T�1�)=�=�>������6�;�;�s�H�5�6������4� rc�Z�|dkr2|jjtjdd|z��S|dkr0|jjtjdd|��S|dkr0|jjtjdd	|��St	d
��)Nr�r#r�r%r&r�r'r(r�zArray is too large�r�r/r^r2rK�r'r�s  r
r=zPacker._pack_array_header�s�����9��<�<�%�%�f�k�k�#�t�a�x�&@�A�A���;��<�<�%�%�f�k�k�%��q�&A�B�B��
�?��<�<�%�%�f�k�k�%��q�&A�B�B��-�.�.rc�Z�|dkr2|jjtjdd|z��S|dkr0|jjtjdd|��S|dkr0|jjtjdd	|��St	d
��)Nr�r#r�r%r&r�r'r(r�zDict is too larger[r\s  r
rQzPacker._pack_map_header�s�����9��<�<�%�%�f�k�k�#�t�a�x�&@�A�A���;��<�<�%�%�f�k�k�%��q�&A�B�B��
�?��<�<�%�%�f�k�k�%��q�&A�B�B��,�-�-rc��|j|�|D]/\}}|j||dz
�|j||dz
��1y)Nr)rQr>)r'r�rKrD�k�vs      r
r@zPacker._pack_map_pairs�sB�����a� ��F�Q���J�J�q�*�q�.�)��J�J�q�*�q�.�)�rc���|dkr3|jjtjdd|z��y|jr6|dkr1|jjtjdd|��y|dkr1|jjtjdd	|��y|d
kr1|jjtjdd|��ytd
��)Nr�r#r�r�r/r�r%r&r�r'r(r�zRaw is too large)r�r/r^r2rrKr\s  r
r6zPacker._pack_raw_header�s�����9��L�L���v�{�{�3��q��9�:�
�
�
�A��I��L�L���v�{�{�5�$��:�;�
�&�[��L�L���v�{�{�5�$��:�;�
�*�_��L�L���v�{�{�5�$��:�;��/�0�0rc��|js|j|�S|dkr0|jjt	j
dd|��S|dkr0|jjt	j
dd|��S|dkr0|jjt	j
dd	|��St
d
��)Nr�r/rer%r&rfr'r(rhzBin is too large)rr6r�r/r^r2rKr\s  r
r4zPacker._pack_bin_header�s����!�!��(�(��+�+�
�$�Y��<�<�%�%�f�k�k�%��q�&A�B�B�
�&�[��<�<�%�%�f�k�k�%��q�&A�B�B�
�*�_��<�<�%�%�f�k�k�%��q�&A�B�B��/�0�0rc�6�|jj�S)z/Return internal buffer contents as bytes object)r�r3r2s r
r.zPacker.bytes�s���|�|�$�$�&�&rc�"�t�|_y)zYReset internal buffer.

        This method is useful only when autoreset=False.
        N)r"r�r2s r
�resetzPacker.reset�s
��
 �z��rc��tstrt|j��S|jj�S)zReturn view of internal buffer.)�USING_STRINGBUILDERr�r+r.r��	getbufferr2s r
rhzPacker.getbuffer�s+���#��d�j�j�l�+�+��<�<�)�)�+�+r)NFTTFFN)r4r5r6rr)�DEFAULT_RECURSE_LIMITrrHr>r2rLrOrRrYr=rQr@r6r4r.rerhrrr
rr�s~��B�L������� �6)��,�|<�|	����!�:/�.�4I�*�
1�
1�'�"�,rr)r)=rrrAr�r^�version_infor�r<�longr1rrr��ranger��RuntimeErrorrSr�hasattr�__pypy__r�__pypy__.buildersrr �ImportErrorrg�objectr"�ior7�
exceptionsr;r<r=r>r?�extr@rAr�r�r�r�r�r�r�r�r�r�rirFrGrHrMrZrcr_�_NO_FORMAT_USEDr�rPrrrr
�<module>rws���4�*�
�
�
���q��Q�����d��I���I��G�
�F�����f��!�N�
���3�#�$�&�4�C���(�6�(�& ��&�"�L�R�Q�#�����������
�
�����������%)�����6���i��2�
�%�%�L�����1�o�x�
(���1�d�H�
��	�1�d�H�
��	�1�d�H�
�	�
	�1�e�X�
��	�1�e�X�
�
�	�)��	�)��	�1�o�
��	�)��	�)��	�)��	�(��	�)��	�)�� 	�)�!�"	�1�e�X�
�#�$
�e�X�
��e�X�
��e�X�
�
�v�x�
 ��o�x�
(��d�H�
��d�H�
��d�J�
��d�J�
��d�H�
��d�H�
�9��@`#�v�`#�F\,�V�\,��O�4�3�3�4�s�E)�)E8�7E8python3.12/site-packages/pip/_vendor/msgpack/ext.py000064400000013677151732701650016161 0ustar00# coding: utf-8
from collections import namedtuple
import datetime
import sys
import struct


PY2 = sys.version_info[0] == 2

if PY2:
    int_types = (int, long)
    _utc = None
else:
    int_types = int
    try:
        _utc = datetime.timezone.utc
    except AttributeError:
        _utc = datetime.timezone(datetime.timedelta(0))


class ExtType(namedtuple("ExtType", "code data")):
    """ExtType represents ext type in msgpack."""

    def __new__(cls, code, data):
        if not isinstance(code, int):
            raise TypeError("code must be int")
        if not isinstance(data, bytes):
            raise TypeError("data must be bytes")
        if not 0 <= code <= 127:
            raise ValueError("code must be 0~127")
        return super(ExtType, cls).__new__(cls, code, data)


class Timestamp(object):
    """Timestamp represents the Timestamp extension type in msgpack.

    When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`. When using pure-Python
    msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and unpack `Timestamp`.

    This class is immutable: Do not override seconds and nanoseconds.
    """

    __slots__ = ["seconds", "nanoseconds"]

    def __init__(self, seconds, nanoseconds=0):
        """Initialize a Timestamp object.

        :param int seconds:
            Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds).
            May be negative.

        :param int nanoseconds:
            Number of nanoseconds to add to `seconds` to get fractional time.
            Maximum is 999_999_999.  Default is 0.

        Note: Negative times (before the UNIX epoch) are represented as negative seconds + positive ns.
        """
        if not isinstance(seconds, int_types):
            raise TypeError("seconds must be an integer")
        if not isinstance(nanoseconds, int_types):
            raise TypeError("nanoseconds must be an integer")
        if not (0 <= nanoseconds < 10**9):
            raise ValueError(
                "nanoseconds must be a non-negative integer less than 999999999."
            )
        self.seconds = seconds
        self.nanoseconds = nanoseconds

    def __repr__(self):
        """String representation of Timestamp."""
        return "Timestamp(seconds={0}, nanoseconds={1})".format(
            self.seconds, self.nanoseconds
        )

    def __eq__(self, other):
        """Check for equality with another Timestamp object"""
        if type(other) is self.__class__:
            return (
                self.seconds == other.seconds and self.nanoseconds == other.nanoseconds
            )
        return False

    def __ne__(self, other):
        """not-equals method (see :func:`__eq__()`)"""
        return not self.__eq__(other)

    def __hash__(self):
        return hash((self.seconds, self.nanoseconds))

    @staticmethod
    def from_bytes(b):
        """Unpack bytes into a `Timestamp` object.

        Used for pure-Python msgpack unpacking.

        :param b: Payload from msgpack ext message with code -1
        :type b: bytes

        :returns: Timestamp object unpacked from msgpack ext payload
        :rtype: Timestamp
        """
        if len(b) == 4:
            seconds = struct.unpack("!L", b)[0]
            nanoseconds = 0
        elif len(b) == 8:
            data64 = struct.unpack("!Q", b)[0]
            seconds = data64 & 0x00000003FFFFFFFF
            nanoseconds = data64 >> 34
        elif len(b) == 12:
            nanoseconds, seconds = struct.unpack("!Iq", b)
        else:
            raise ValueError(
                "Timestamp type can only be created from 32, 64, or 96-bit byte objects"
            )
        return Timestamp(seconds, nanoseconds)

    def to_bytes(self):
        """Pack this Timestamp object into bytes.

        Used for pure-Python msgpack packing.

        :returns data: Payload for EXT message with code -1 (timestamp type)
        :rtype: bytes
        """
        if (self.seconds >> 34) == 0:  # seconds is non-negative and fits in 34 bits
            data64 = self.nanoseconds << 34 | self.seconds
            if data64 & 0xFFFFFFFF00000000 == 0:
                # nanoseconds is zero and seconds < 2**32, so timestamp 32
                data = struct.pack("!L", data64)
            else:
                # timestamp 64
                data = struct.pack("!Q", data64)
        else:
            # timestamp 96
            data = struct.pack("!Iq", self.nanoseconds, self.seconds)
        return data

    @staticmethod
    def from_unix(unix_sec):
        """Create a Timestamp from posix timestamp in seconds.

        :param unix_float: Posix timestamp in seconds.
        :type unix_float: int or float.
        """
        seconds = int(unix_sec // 1)
        nanoseconds = int((unix_sec % 1) * 10**9)
        return Timestamp(seconds, nanoseconds)

    def to_unix(self):
        """Get the timestamp as a floating-point value.

        :returns: posix timestamp
        :rtype: float
        """
        return self.seconds + self.nanoseconds / 1e9

    @staticmethod
    def from_unix_nano(unix_ns):
        """Create a Timestamp from posix timestamp in nanoseconds.

        :param int unix_ns: Posix timestamp in nanoseconds.
        :rtype: Timestamp
        """
        return Timestamp(*divmod(unix_ns, 10**9))

    def to_unix_nano(self):
        """Get the timestamp as a unixtime in nanoseconds.

        :returns: posix timestamp in nanoseconds
        :rtype: int
        """
        return self.seconds * 10**9 + self.nanoseconds

    def to_datetime(self):
        """Get the timestamp as a UTC datetime.

        Python 2 is not supported.

        :rtype: datetime.
        """
        return datetime.datetime.fromtimestamp(0, _utc) + datetime.timedelta(
            seconds=self.to_unix()
        )

    @staticmethod
    def from_datetime(dt):
        """Create a Timestamp from datetime with tzinfo.

        Python 2 is not supported.

        :rtype: Timestamp
        """
        return Timestamp.from_unix(dt.timestamp())
python3.12/site-packages/pip/_vendor/msgpack/fallback.py000064400000103360151732701650017105 0ustar00"""Fallback pure Python implementation of msgpack"""
from datetime import datetime as _DateTime
import sys
import struct


PY2 = sys.version_info[0] == 2
if PY2:
    int_types = (int, long)

    def dict_iteritems(d):
        return d.iteritems()

else:
    int_types = int
    unicode = str
    xrange = range

    def dict_iteritems(d):
        return d.items()


if sys.version_info < (3, 5):
    # Ugly hack...
    RecursionError = RuntimeError

    def _is_recursionerror(e):
        return (
            len(e.args) == 1
            and isinstance(e.args[0], str)
            and e.args[0].startswith("maximum recursion depth exceeded")
        )

else:

    def _is_recursionerror(e):
        return True


if hasattr(sys, "pypy_version_info"):
    # StringIO is slow on PyPy, StringIO is faster.  However: PyPy's own
    # StringBuilder is fastest.
    from __pypy__ import newlist_hint

    try:
        from __pypy__.builders import BytesBuilder as StringBuilder
    except ImportError:
        from __pypy__.builders import StringBuilder
    USING_STRINGBUILDER = True

    class StringIO(object):
        def __init__(self, s=b""):
            if s:
                self.builder = StringBuilder(len(s))
                self.builder.append(s)
            else:
                self.builder = StringBuilder()

        def write(self, s):
            if isinstance(s, memoryview):
                s = s.tobytes()
            elif isinstance(s, bytearray):
                s = bytes(s)
            self.builder.append(s)

        def getvalue(self):
            return self.builder.build()

else:
    USING_STRINGBUILDER = False
    from io import BytesIO as StringIO

    newlist_hint = lambda size: []


from .exceptions import BufferFull, OutOfData, ExtraData, FormatError, StackError

from .ext import ExtType, Timestamp


EX_SKIP = 0
EX_CONSTRUCT = 1
EX_READ_ARRAY_HEADER = 2
EX_READ_MAP_HEADER = 3

TYPE_IMMEDIATE = 0
TYPE_ARRAY = 1
TYPE_MAP = 2
TYPE_RAW = 3
TYPE_BIN = 4
TYPE_EXT = 5

DEFAULT_RECURSE_LIMIT = 511


def _check_type_strict(obj, t, type=type, tuple=tuple):
    if type(t) is tuple:
        return type(obj) in t
    else:
        return type(obj) is t


def _get_data_from_buffer(obj):
    view = memoryview(obj)
    if view.itemsize != 1:
        raise ValueError("cannot unpack from multi-byte object")
    return view


def unpackb(packed, **kwargs):
    """
    Unpack an object from `packed`.

    Raises ``ExtraData`` when *packed* contains extra bytes.
    Raises ``ValueError`` when *packed* is incomplete.
    Raises ``FormatError`` when *packed* is not valid msgpack.
    Raises ``StackError`` when *packed* contains too nested.
    Other exceptions can be raised during unpacking.

    See :class:`Unpacker` for options.
    """
    unpacker = Unpacker(None, max_buffer_size=len(packed), **kwargs)
    unpacker.feed(packed)
    try:
        ret = unpacker._unpack()
    except OutOfData:
        raise ValueError("Unpack failed: incomplete input")
    except RecursionError as e:
        if _is_recursionerror(e):
            raise StackError
        raise
    if unpacker._got_extradata():
        raise ExtraData(ret, unpacker._get_extradata())
    return ret


if sys.version_info < (2, 7, 6):

    def _unpack_from(f, b, o=0):
        """Explicit type cast for legacy struct.unpack_from"""
        return struct.unpack_from(f, bytes(b), o)

else:
    _unpack_from = struct.unpack_from

_NO_FORMAT_USED = ""
_MSGPACK_HEADERS = {
    0xC4: (1, _NO_FORMAT_USED, TYPE_BIN),
    0xC5: (2, ">H", TYPE_BIN),
    0xC6: (4, ">I", TYPE_BIN),
    0xC7: (2, "Bb", TYPE_EXT),
    0xC8: (3, ">Hb", TYPE_EXT),
    0xC9: (5, ">Ib", TYPE_EXT),
    0xCA: (4, ">f"),
    0xCB: (8, ">d"),
    0xCC: (1, _NO_FORMAT_USED),
    0xCD: (2, ">H"),
    0xCE: (4, ">I"),
    0xCF: (8, ">Q"),
    0xD0: (1, "b"),
    0xD1: (2, ">h"),
    0xD2: (4, ">i"),
    0xD3: (8, ">q"),
    0xD4: (1, "b1s", TYPE_EXT),
    0xD5: (2, "b2s", TYPE_EXT),
    0xD6: (4, "b4s", TYPE_EXT),
    0xD7: (8, "b8s", TYPE_EXT),
    0xD8: (16, "b16s", TYPE_EXT),
    0xD9: (1, _NO_FORMAT_USED, TYPE_RAW),
    0xDA: (2, ">H", TYPE_RAW),
    0xDB: (4, ">I", TYPE_RAW),
    0xDC: (2, ">H", TYPE_ARRAY),
    0xDD: (4, ">I", TYPE_ARRAY),
    0xDE: (2, ">H", TYPE_MAP),
    0xDF: (4, ">I", TYPE_MAP),
}


class Unpacker(object):
    """Streaming unpacker.

    Arguments:

    :param file_like:
        File-like object having `.read(n)` method.
        If specified, unpacker reads serialized data from it and :meth:`feed()` is not usable.

    :param int read_size:
        Used as `file_like.read(read_size)`. (default: `min(16*1024, max_buffer_size)`)

    :param bool use_list:
        If true, unpack msgpack array to Python list.
        Otherwise, unpack to Python tuple. (default: True)

    :param bool raw:
        If true, unpack msgpack raw to Python bytes.
        Otherwise, unpack to Python str by decoding with UTF-8 encoding (default).

    :param int timestamp:
        Control how timestamp type is unpacked:

            0 - Timestamp
            1 - float  (Seconds from the EPOCH)
            2 - int  (Nanoseconds from the EPOCH)
            3 - datetime.datetime  (UTC).  Python 2 is not supported.

    :param bool strict_map_key:
        If true (default), only str or bytes are accepted for map (dict) keys.

    :param callable object_hook:
        When specified, it should be callable.
        Unpacker calls it with a dict argument after unpacking msgpack map.
        (See also simplejson)

    :param callable object_pairs_hook:
        When specified, it should be callable.
        Unpacker calls it with a list of key-value pairs after unpacking msgpack map.
        (See also simplejson)

    :param str unicode_errors:
        The error handler for decoding unicode. (default: 'strict')
        This option should be used only when you have msgpack data which
        contains invalid UTF-8 string.

    :param int max_buffer_size:
        Limits size of data waiting unpacked.  0 means 2**32-1.
        The default value is 100*1024*1024 (100MiB).
        Raises `BufferFull` exception when it is insufficient.
        You should set this parameter when unpacking data from untrusted source.

    :param int max_str_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max length of str. (default: max_buffer_size)

    :param int max_bin_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max length of bin. (default: max_buffer_size)

    :param int max_array_len:
        Limits max length of array.
        (default: max_buffer_size)

    :param int max_map_len:
        Limits max length of map.
        (default: max_buffer_size//2)

    :param int max_ext_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max size of ext type.  (default: max_buffer_size)

    Example of streaming deserialize from file-like object::

        unpacker = Unpacker(file_like)
        for o in unpacker:
            process(o)

    Example of streaming deserialize from socket::

        unpacker = Unpacker()
        while True:
            buf = sock.recv(1024**2)
            if not buf:
                break
            unpacker.feed(buf)
            for o in unpacker:
                process(o)

    Raises ``ExtraData`` when *packed* contains extra bytes.
    Raises ``OutOfData`` when *packed* is incomplete.
    Raises ``FormatError`` when *packed* is not valid msgpack.
    Raises ``StackError`` when *packed* contains too nested.
    Other exceptions can be raised during unpacking.
    """

    def __init__(
        self,
        file_like=None,
        read_size=0,
        use_list=True,
        raw=False,
        timestamp=0,
        strict_map_key=True,
        object_hook=None,
        object_pairs_hook=None,
        list_hook=None,
        unicode_errors=None,
        max_buffer_size=100 * 1024 * 1024,
        ext_hook=ExtType,
        max_str_len=-1,
        max_bin_len=-1,
        max_array_len=-1,
        max_map_len=-1,
        max_ext_len=-1,
    ):
        if unicode_errors is None:
            unicode_errors = "strict"

        if file_like is None:
            self._feeding = True
        else:
            if not callable(file_like.read):
                raise TypeError("`file_like.read` must be callable")
            self.file_like = file_like
            self._feeding = False

        #: array of bytes fed.
        self._buffer = bytearray()
        #: Which position we currently reads
        self._buff_i = 0

        # When Unpacker is used as an iterable, between the calls to next(),
        # the buffer is not "consumed" completely, for efficiency sake.
        # Instead, it is done sloppily.  To make sure we raise BufferFull at
        # the correct moments, we have to keep track of how sloppy we were.
        # Furthermore, when the buffer is incomplete (that is: in the case
        # we raise an OutOfData) we need to rollback the buffer to the correct
        # state, which _buf_checkpoint records.
        self._buf_checkpoint = 0

        if not max_buffer_size:
            max_buffer_size = 2**31 - 1
        if max_str_len == -1:
            max_str_len = max_buffer_size
        if max_bin_len == -1:
            max_bin_len = max_buffer_size
        if max_array_len == -1:
            max_array_len = max_buffer_size
        if max_map_len == -1:
            max_map_len = max_buffer_size // 2
        if max_ext_len == -1:
            max_ext_len = max_buffer_size

        self._max_buffer_size = max_buffer_size
        if read_size > self._max_buffer_size:
            raise ValueError("read_size must be smaller than max_buffer_size")
        self._read_size = read_size or min(self._max_buffer_size, 16 * 1024)
        self._raw = bool(raw)
        self._strict_map_key = bool(strict_map_key)
        self._unicode_errors = unicode_errors
        self._use_list = use_list
        if not (0 <= timestamp <= 3):
            raise ValueError("timestamp must be 0..3")
        self._timestamp = timestamp
        self._list_hook = list_hook
        self._object_hook = object_hook
        self._object_pairs_hook = object_pairs_hook
        self._ext_hook = ext_hook
        self._max_str_len = max_str_len
        self._max_bin_len = max_bin_len
        self._max_array_len = max_array_len
        self._max_map_len = max_map_len
        self._max_ext_len = max_ext_len
        self._stream_offset = 0

        if list_hook is not None and not callable(list_hook):
            raise TypeError("`list_hook` is not callable")
        if object_hook is not None and not callable(object_hook):
            raise TypeError("`object_hook` is not callable")
        if object_pairs_hook is not None and not callable(object_pairs_hook):
            raise TypeError("`object_pairs_hook` is not callable")
        if object_hook is not None and object_pairs_hook is not None:
            raise TypeError(
                "object_pairs_hook and object_hook are mutually " "exclusive"
            )
        if not callable(ext_hook):
            raise TypeError("`ext_hook` is not callable")

    def feed(self, next_bytes):
        assert self._feeding
        view = _get_data_from_buffer(next_bytes)
        if len(self._buffer) - self._buff_i + len(view) > self._max_buffer_size:
            raise BufferFull

        # Strip buffer before checkpoint before reading file.
        if self._buf_checkpoint > 0:
            del self._buffer[: self._buf_checkpoint]
            self._buff_i -= self._buf_checkpoint
            self._buf_checkpoint = 0

        # Use extend here: INPLACE_ADD += doesn't reliably typecast memoryview in jython
        self._buffer.extend(view)

    def _consume(self):
        """Gets rid of the used parts of the buffer."""
        self._stream_offset += self._buff_i - self._buf_checkpoint
        self._buf_checkpoint = self._buff_i

    def _got_extradata(self):
        return self._buff_i < len(self._buffer)

    def _get_extradata(self):
        return self._buffer[self._buff_i :]

    def read_bytes(self, n):
        ret = self._read(n, raise_outofdata=False)
        self._consume()
        return ret

    def _read(self, n, raise_outofdata=True):
        # (int) -> bytearray
        self._reserve(n, raise_outofdata=raise_outofdata)
        i = self._buff_i
        ret = self._buffer[i : i + n]
        self._buff_i = i + len(ret)
        return ret

    def _reserve(self, n, raise_outofdata=True):
        remain_bytes = len(self._buffer) - self._buff_i - n

        # Fast path: buffer has n bytes already
        if remain_bytes >= 0:
            return

        if self._feeding:
            self._buff_i = self._buf_checkpoint
            raise OutOfData

        # Strip buffer before checkpoint before reading file.
        if self._buf_checkpoint > 0:
            del self._buffer[: self._buf_checkpoint]
            self._buff_i -= self._buf_checkpoint
            self._buf_checkpoint = 0

        # Read from file
        remain_bytes = -remain_bytes
        if remain_bytes + len(self._buffer) > self._max_buffer_size:
            raise BufferFull
        while remain_bytes > 0:
            to_read_bytes = max(self._read_size, remain_bytes)
            read_data = self.file_like.read(to_read_bytes)
            if not read_data:
                break
            assert isinstance(read_data, bytes)
            self._buffer += read_data
            remain_bytes -= len(read_data)

        if len(self._buffer) < n + self._buff_i and raise_outofdata:
            self._buff_i = 0  # rollback
            raise OutOfData

    def _read_header(self):
        typ = TYPE_IMMEDIATE
        n = 0
        obj = None
        self._reserve(1)
        b = self._buffer[self._buff_i]
        self._buff_i += 1
        if b & 0b10000000 == 0:
            obj = b
        elif b & 0b11100000 == 0b11100000:
            obj = -1 - (b ^ 0xFF)
        elif b & 0b11100000 == 0b10100000:
            n = b & 0b00011111
            typ = TYPE_RAW
            if n > self._max_str_len:
                raise ValueError("%s exceeds max_str_len(%s)" % (n, self._max_str_len))
            obj = self._read(n)
        elif b & 0b11110000 == 0b10010000:
            n = b & 0b00001111
            typ = TYPE_ARRAY
            if n > self._max_array_len:
                raise ValueError(
                    "%s exceeds max_array_len(%s)" % (n, self._max_array_len)
                )
        elif b & 0b11110000 == 0b10000000:
            n = b & 0b00001111
            typ = TYPE_MAP
            if n > self._max_map_len:
                raise ValueError("%s exceeds max_map_len(%s)" % (n, self._max_map_len))
        elif b == 0xC0:
            obj = None
        elif b == 0xC2:
            obj = False
        elif b == 0xC3:
            obj = True
        elif 0xC4 <= b <= 0xC6:
            size, fmt, typ = _MSGPACK_HEADERS[b]
            self._reserve(size)
            if len(fmt) > 0:
                n = _unpack_from(fmt, self._buffer, self._buff_i)[0]
            else:
                n = self._buffer[self._buff_i]
            self._buff_i += size
            if n > self._max_bin_len:
                raise ValueError("%s exceeds max_bin_len(%s)" % (n, self._max_bin_len))
            obj = self._read(n)
        elif 0xC7 <= b <= 0xC9:
            size, fmt, typ = _MSGPACK_HEADERS[b]
            self._reserve(size)
            L, n = _unpack_from(fmt, self._buffer, self._buff_i)
            self._buff_i += size
            if L > self._max_ext_len:
                raise ValueError("%s exceeds max_ext_len(%s)" % (L, self._max_ext_len))
            obj = self._read(L)
        elif 0xCA <= b <= 0xD3:
            size, fmt = _MSGPACK_HEADERS[b]
            self._reserve(size)
            if len(fmt) > 0:
                obj = _unpack_from(fmt, self._buffer, self._buff_i)[0]
            else:
                obj = self._buffer[self._buff_i]
            self._buff_i += size
        elif 0xD4 <= b <= 0xD8:
            size, fmt, typ = _MSGPACK_HEADERS[b]
            if self._max_ext_len < size:
                raise ValueError(
                    "%s exceeds max_ext_len(%s)" % (size, self._max_ext_len)
                )
            self._reserve(size + 1)
            n, obj = _unpack_from(fmt, self._buffer, self._buff_i)
            self._buff_i += size + 1
        elif 0xD9 <= b <= 0xDB:
            size, fmt, typ = _MSGPACK_HEADERS[b]
            self._reserve(size)
            if len(fmt) > 0:
                (n,) = _unpack_from(fmt, self._buffer, self._buff_i)
            else:
                n = self._buffer[self._buff_i]
            self._buff_i += size
            if n > self._max_str_len:
                raise ValueError("%s exceeds max_str_len(%s)" % (n, self._max_str_len))
            obj = self._read(n)
        elif 0xDC <= b <= 0xDD:
            size, fmt, typ = _MSGPACK_HEADERS[b]
            self._reserve(size)
            (n,) = _unpack_from(fmt, self._buffer, self._buff_i)
            self._buff_i += size
            if n > self._max_array_len:
                raise ValueError(
                    "%s exceeds max_array_len(%s)" % (n, self._max_array_len)
                )
        elif 0xDE <= b <= 0xDF:
            size, fmt, typ = _MSGPACK_HEADERS[b]
            self._reserve(size)
            (n,) = _unpack_from(fmt, self._buffer, self._buff_i)
            self._buff_i += size
            if n > self._max_map_len:
                raise ValueError("%s exceeds max_map_len(%s)" % (n, self._max_map_len))
        else:
            raise FormatError("Unknown header: 0x%x" % b)
        return typ, n, obj

    def _unpack(self, execute=EX_CONSTRUCT):
        typ, n, obj = self._read_header()

        if execute == EX_READ_ARRAY_HEADER:
            if typ != TYPE_ARRAY:
                raise ValueError("Expected array")
            return n
        if execute == EX_READ_MAP_HEADER:
            if typ != TYPE_MAP:
                raise ValueError("Expected map")
            return n
        # TODO should we eliminate the recursion?
        if typ == TYPE_ARRAY:
            if execute == EX_SKIP:
                for i in xrange(n):
                    # TODO check whether we need to call `list_hook`
                    self._unpack(EX_SKIP)
                return
            ret = newlist_hint(n)
            for i in xrange(n):
                ret.append(self._unpack(EX_CONSTRUCT))
            if self._list_hook is not None:
                ret = self._list_hook(ret)
            # TODO is the interaction between `list_hook` and `use_list` ok?
            return ret if self._use_list else tuple(ret)
        if typ == TYPE_MAP:
            if execute == EX_SKIP:
                for i in xrange(n):
                    # TODO check whether we need to call hooks
                    self._unpack(EX_SKIP)
                    self._unpack(EX_SKIP)
                return
            if self._object_pairs_hook is not None:
                ret = self._object_pairs_hook(
                    (self._unpack(EX_CONSTRUCT), self._unpack(EX_CONSTRUCT))
                    for _ in xrange(n)
                )
            else:
                ret = {}
                for _ in xrange(n):
                    key = self._unpack(EX_CONSTRUCT)
                    if self._strict_map_key and type(key) not in (unicode, bytes):
                        raise ValueError(
                            "%s is not allowed for map key" % str(type(key))
                        )
                    if not PY2 and type(key) is str:
                        key = sys.intern(key)
                    ret[key] = self._unpack(EX_CONSTRUCT)
                if self._object_hook is not None:
                    ret = self._object_hook(ret)
            return ret
        if execute == EX_SKIP:
            return
        if typ == TYPE_RAW:
            if self._raw:
                obj = bytes(obj)
            else:
                obj = obj.decode("utf_8", self._unicode_errors)
            return obj
        if typ == TYPE_BIN:
            return bytes(obj)
        if typ == TYPE_EXT:
            if n == -1:  # timestamp
                ts = Timestamp.from_bytes(bytes(obj))
                if self._timestamp == 1:
                    return ts.to_unix()
                elif self._timestamp == 2:
                    return ts.to_unix_nano()
                elif self._timestamp == 3:
                    return ts.to_datetime()
                else:
                    return ts
            else:
                return self._ext_hook(n, bytes(obj))
        assert typ == TYPE_IMMEDIATE
        return obj

    def __iter__(self):
        return self

    def __next__(self):
        try:
            ret = self._unpack(EX_CONSTRUCT)
            self._consume()
            return ret
        except OutOfData:
            self._consume()
            raise StopIteration
        except RecursionError:
            raise StackError

    next = __next__

    def skip(self):
        self._unpack(EX_SKIP)
        self._consume()

    def unpack(self):
        try:
            ret = self._unpack(EX_CONSTRUCT)
        except RecursionError:
            raise StackError
        self._consume()
        return ret

    def read_array_header(self):
        ret = self._unpack(EX_READ_ARRAY_HEADER)
        self._consume()
        return ret

    def read_map_header(self):
        ret = self._unpack(EX_READ_MAP_HEADER)
        self._consume()
        return ret

    def tell(self):
        return self._stream_offset


class Packer(object):
    """
    MessagePack Packer

    Usage::

        packer = Packer()
        astream.write(packer.pack(a))
        astream.write(packer.pack(b))

    Packer's constructor has some keyword arguments:

    :param callable default:
        Convert user type to builtin type that Packer supports.
        See also simplejson's document.

    :param bool use_single_float:
        Use single precision float type for float. (default: False)

    :param bool autoreset:
        Reset buffer after each pack and return its content as `bytes`. (default: True).
        If set this to false, use `bytes()` to get content and `.reset()` to clear buffer.

    :param bool use_bin_type:
        Use bin type introduced in msgpack spec 2.0 for bytes.
        It also enables str8 type for unicode. (default: True)

    :param bool strict_types:
        If set to true, types will be checked to be exact. Derived classes
        from serializable types will not be serialized and will be
        treated as unsupported type and forwarded to default.
        Additionally tuples will not be serialized as lists.
        This is useful when trying to implement accurate serialization
        for python types.

    :param bool datetime:
        If set to true, datetime with tzinfo is packed into Timestamp type.
        Note that the tzinfo is stripped in the timestamp.
        You can get UTC datetime with `timestamp=3` option of the Unpacker.
        (Python 2 is not supported).

    :param str unicode_errors:
        The error handler for encoding unicode. (default: 'strict')
        DO NOT USE THIS!!  This option is kept for very specific usage.

    Example of streaming deserialize from file-like object::

        unpacker = Unpacker(file_like)
        for o in unpacker:
            process(o)

    Example of streaming deserialize from socket::

        unpacker = Unpacker()
        while True:
            buf = sock.recv(1024**2)
            if not buf:
                break
            unpacker.feed(buf)
            for o in unpacker:
                process(o)

    Raises ``ExtraData`` when *packed* contains extra bytes.
    Raises ``OutOfData`` when *packed* is incomplete.
    Raises ``FormatError`` when *packed* is not valid msgpack.
    Raises ``StackError`` when *packed* contains too nested.
    Other exceptions can be raised during unpacking.
    """

    def __init__(
        self,
        default=None,
        use_single_float=False,
        autoreset=True,
        use_bin_type=True,
        strict_types=False,
        datetime=False,
        unicode_errors=None,
    ):
        self._strict_types = strict_types
        self._use_float = use_single_float
        self._autoreset = autoreset
        self._use_bin_type = use_bin_type
        self._buffer = StringIO()
        if PY2 and datetime:
            raise ValueError("datetime is not supported in Python 2")
        self._datetime = bool(datetime)
        self._unicode_errors = unicode_errors or "strict"
        if default is not None:
            if not callable(default):
                raise TypeError("default must be callable")
        self._default = default

    def _pack(
        self,
        obj,
        nest_limit=DEFAULT_RECURSE_LIMIT,
        check=isinstance,
        check_type_strict=_check_type_strict,
    ):
        default_used = False
        if self._strict_types:
            check = check_type_strict
            list_types = list
        else:
            list_types = (list, tuple)
        while True:
            if nest_limit < 0:
                raise ValueError("recursion limit exceeded")
            if obj is None:
                return self._buffer.write(b"\xc0")
            if check(obj, bool):
                if obj:
                    return self._buffer.write(b"\xc3")
                return self._buffer.write(b"\xc2")
            if check(obj, int_types):
                if 0 <= obj < 0x80:
                    return self._buffer.write(struct.pack("B", obj))
                if -0x20 <= obj < 0:
                    return self._buffer.write(struct.pack("b", obj))
                if 0x80 <= obj <= 0xFF:
                    return self._buffer.write(struct.pack("BB", 0xCC, obj))
                if -0x80 <= obj < 0:
                    return self._buffer.write(struct.pack(">Bb", 0xD0, obj))
                if 0xFF < obj <= 0xFFFF:
                    return self._buffer.write(struct.pack(">BH", 0xCD, obj))
                if -0x8000 <= obj < -0x80:
                    return self._buffer.write(struct.pack(">Bh", 0xD1, obj))
                if 0xFFFF < obj <= 0xFFFFFFFF:
                    return self._buffer.write(struct.pack(">BI", 0xCE, obj))
                if -0x80000000 <= obj < -0x8000:
                    return self._buffer.write(struct.pack(">Bi", 0xD2, obj))
                if 0xFFFFFFFF < obj <= 0xFFFFFFFFFFFFFFFF:
                    return self._buffer.write(struct.pack(">BQ", 0xCF, obj))
                if -0x8000000000000000 <= obj < -0x80000000:
                    return self._buffer.write(struct.pack(">Bq", 0xD3, obj))
                if not default_used and self._default is not None:
                    obj = self._default(obj)
                    default_used = True
                    continue
                raise OverflowError("Integer value out of range")
            if check(obj, (bytes, bytearray)):
                n = len(obj)
                if n >= 2**32:
                    raise ValueError("%s is too large" % type(obj).__name__)
                self._pack_bin_header(n)
                return self._buffer.write(obj)
            if check(obj, unicode):
                obj = obj.encode("utf-8", self._unicode_errors)
                n = len(obj)
                if n >= 2**32:
                    raise ValueError("String is too large")
                self._pack_raw_header(n)
                return self._buffer.write(obj)
            if check(obj, memoryview):
                n = obj.nbytes
                if n >= 2**32:
                    raise ValueError("Memoryview is too large")
                self._pack_bin_header(n)
                return self._buffer.write(obj)
            if check(obj, float):
                if self._use_float:
                    return self._buffer.write(struct.pack(">Bf", 0xCA, obj))
                return self._buffer.write(struct.pack(">Bd", 0xCB, obj))
            if check(obj, (ExtType, Timestamp)):
                if check(obj, Timestamp):
                    code = -1
                    data = obj.to_bytes()
                else:
                    code = obj.code
                    data = obj.data
                assert isinstance(code, int)
                assert isinstance(data, bytes)
                L = len(data)
                if L == 1:
                    self._buffer.write(b"\xd4")
                elif L == 2:
                    self._buffer.write(b"\xd5")
                elif L == 4:
                    self._buffer.write(b"\xd6")
                elif L == 8:
                    self._buffer.write(b"\xd7")
                elif L == 16:
                    self._buffer.write(b"\xd8")
                elif L <= 0xFF:
                    self._buffer.write(struct.pack(">BB", 0xC7, L))
                elif L <= 0xFFFF:
                    self._buffer.write(struct.pack(">BH", 0xC8, L))
                else:
                    self._buffer.write(struct.pack(">BI", 0xC9, L))
                self._buffer.write(struct.pack("b", code))
                self._buffer.write(data)
                return
            if check(obj, list_types):
                n = len(obj)
                self._pack_array_header(n)
                for i in xrange(n):
                    self._pack(obj[i], nest_limit - 1)
                return
            if check(obj, dict):
                return self._pack_map_pairs(
                    len(obj), dict_iteritems(obj), nest_limit - 1
                )

            if self._datetime and check(obj, _DateTime) and obj.tzinfo is not None:
                obj = Timestamp.from_datetime(obj)
                default_used = 1
                continue

            if not default_used and self._default is not None:
                obj = self._default(obj)
                default_used = 1
                continue

            if self._datetime and check(obj, _DateTime):
                raise ValueError("Cannot serialize %r where tzinfo=None" % (obj,))

            raise TypeError("Cannot serialize %r" % (obj,))

    def pack(self, obj):
        try:
            self._pack(obj)
        except:
            self._buffer = StringIO()  # force reset
            raise
        if self._autoreset:
            ret = self._buffer.getvalue()
            self._buffer = StringIO()
            return ret

    def pack_map_pairs(self, pairs):
        self._pack_map_pairs(len(pairs), pairs)
        if self._autoreset:
            ret = self._buffer.getvalue()
            self._buffer = StringIO()
            return ret

    def pack_array_header(self, n):
        if n >= 2**32:
            raise ValueError
        self._pack_array_header(n)
        if self._autoreset:
            ret = self._buffer.getvalue()
            self._buffer = StringIO()
            return ret

    def pack_map_header(self, n):
        if n >= 2**32:
            raise ValueError
        self._pack_map_header(n)
        if self._autoreset:
            ret = self._buffer.getvalue()
            self._buffer = StringIO()
            return ret

    def pack_ext_type(self, typecode, data):
        if not isinstance(typecode, int):
            raise TypeError("typecode must have int type.")
        if not 0 <= typecode <= 127:
            raise ValueError("typecode should be 0-127")
        if not isinstance(data, bytes):
            raise TypeError("data must have bytes type")
        L = len(data)
        if L > 0xFFFFFFFF:
            raise ValueError("Too large data")
        if L == 1:
            self._buffer.write(b"\xd4")
        elif L == 2:
            self._buffer.write(b"\xd5")
        elif L == 4:
            self._buffer.write(b"\xd6")
        elif L == 8:
            self._buffer.write(b"\xd7")
        elif L == 16:
            self._buffer.write(b"\xd8")
        elif L <= 0xFF:
            self._buffer.write(b"\xc7" + struct.pack("B", L))
        elif L <= 0xFFFF:
            self._buffer.write(b"\xc8" + struct.pack(">H", L))
        else:
            self._buffer.write(b"\xc9" + struct.pack(">I", L))
        self._buffer.write(struct.pack("B", typecode))
        self._buffer.write(data)

    def _pack_array_header(self, n):
        if n <= 0x0F:
            return self._buffer.write(struct.pack("B", 0x90 + n))
        if n <= 0xFFFF:
            return self._buffer.write(struct.pack(">BH", 0xDC, n))
        if n <= 0xFFFFFFFF:
            return self._buffer.write(struct.pack(">BI", 0xDD, n))
        raise ValueError("Array is too large")

    def _pack_map_header(self, n):
        if n <= 0x0F:
            return self._buffer.write(struct.pack("B", 0x80 + n))
        if n <= 0xFFFF:
            return self._buffer.write(struct.pack(">BH", 0xDE, n))
        if n <= 0xFFFFFFFF:
            return self._buffer.write(struct.pack(">BI", 0xDF, n))
        raise ValueError("Dict is too large")

    def _pack_map_pairs(self, n, pairs, nest_limit=DEFAULT_RECURSE_LIMIT):
        self._pack_map_header(n)
        for (k, v) in pairs:
            self._pack(k, nest_limit - 1)
            self._pack(v, nest_limit - 1)

    def _pack_raw_header(self, n):
        if n <= 0x1F:
            self._buffer.write(struct.pack("B", 0xA0 + n))
        elif self._use_bin_type and n <= 0xFF:
            self._buffer.write(struct.pack(">BB", 0xD9, n))
        elif n <= 0xFFFF:
            self._buffer.write(struct.pack(">BH", 0xDA, n))
        elif n <= 0xFFFFFFFF:
            self._buffer.write(struct.pack(">BI", 0xDB, n))
        else:
            raise ValueError("Raw is too large")

    def _pack_bin_header(self, n):
        if not self._use_bin_type:
            return self._pack_raw_header(n)
        elif n <= 0xFF:
            return self._buffer.write(struct.pack(">BB", 0xC4, n))
        elif n <= 0xFFFF:
            return self._buffer.write(struct.pack(">BH", 0xC5, n))
        elif n <= 0xFFFFFFFF:
            return self._buffer.write(struct.pack(">BI", 0xC6, n))
        else:
            raise ValueError("Bin is too large")

    def bytes(self):
        """Return internal buffer contents as bytes object"""
        return self._buffer.getvalue()

    def reset(self):
        """Reset internal buffer.

        This method is useful only when autoreset=False.
        """
        self._buffer = StringIO()

    def getbuffer(self):
        """Return view of internal buffer."""
        if USING_STRINGBUILDER or PY2:
            return memoryview(self.bytes())
        else:
            return self._buffer.getbuffer()
python3.12/site-packages/pip/_vendor/msgpack/__init__.py000064400000002154151732701650017104 0ustar00# coding: utf-8
from .exceptions import *
from .ext import ExtType, Timestamp

import os
import sys


version = (1, 0, 5)
__version__ = "1.0.5"


if os.environ.get("MSGPACK_PUREPYTHON") or sys.version_info[0] == 2:
    from .fallback import Packer, unpackb, Unpacker
else:
    try:
        from ._cmsgpack import Packer, unpackb, Unpacker
    except ImportError:
        from .fallback import Packer, unpackb, Unpacker


def pack(o, stream, **kwargs):
    """
    Pack object `o` and write it to `stream`

    See :class:`Packer` for options.
    """
    packer = Packer(**kwargs)
    stream.write(packer.pack(o))


def packb(o, **kwargs):
    """
    Pack object `o` and return packed bytes

    See :class:`Packer` for options.
    """
    return Packer(**kwargs).pack(o)


def unpack(stream, **kwargs):
    """
    Unpack an object from `stream`.

    Raises `ExtraData` when `stream` contains extra bytes.
    See :class:`Unpacker` for options.
    """
    data = stream.read()
    return unpackb(data, **kwargs)


# alias for compatibility to simplejson/marshal/pickle.
load = unpack
loads = unpackb

dump = pack
dumps = packb
python3.12/site-packages/pip/_vendor/msgpack/exceptions.py000064400000002071151732701650017524 0ustar00class UnpackException(Exception):
    """Base class for some exceptions raised while unpacking.

    NOTE: unpack may raise exception other than subclass of
    UnpackException.  If you want to catch all error, catch
    Exception instead.
    """


class BufferFull(UnpackException):
    pass


class OutOfData(UnpackException):
    pass


class FormatError(ValueError, UnpackException):
    """Invalid msgpack format"""


class StackError(ValueError, UnpackException):
    """Too nested"""


# Deprecated.  Use ValueError instead
UnpackValueError = ValueError


class ExtraData(UnpackValueError):
    """ExtraData is raised when there is trailing data.

    This exception is raised while only one-shot (not streaming)
    unpack.
    """

    def __init__(self, unpacked, extra):
        self.unpacked = unpacked
        self.extra = extra

    def __str__(self):
        return "unpack(b) received extra data."


# Deprecated.  Use Exception instead to catch all exception during packing.
PackException = Exception
PackValueError = ValueError
PackOverflowError = OverflowError
python3.12/site-packages/pip/_vendor/colorama.pyi000064400000000026151732701650015662 0ustar00from colorama import *python3.12/site-packages/pip/_vendor/six.py000064400000103365151732701650014531 0ustar00# Copyright (c) 2010-2020 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""Utilities for writing code that runs on Python 2 and 3"""

from __future__ import absolute_import

import functools
import itertools
import operator
import sys
import types

__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.16.0"


# Useful for very coarse version differentiation.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
PY34 = sys.version_info[0:2] >= (3, 4)

if PY3:
    string_types = str,
    integer_types = int,
    class_types = type,
    text_type = str
    binary_type = bytes

    MAXSIZE = sys.maxsize
else:
    string_types = basestring,
    integer_types = (int, long)
    class_types = (type, types.ClassType)
    text_type = unicode
    binary_type = str

    if sys.platform.startswith("java"):
        # Jython always uses 32 bits.
        MAXSIZE = int((1 << 31) - 1)
    else:
        # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
        class X(object):

            def __len__(self):
                return 1 << 31
        try:
            len(X())
        except OverflowError:
            # 32-bit
            MAXSIZE = int((1 << 31) - 1)
        else:
            # 64-bit
            MAXSIZE = int((1 << 63) - 1)
        del X

if PY34:
    from importlib.util import spec_from_loader
else:
    spec_from_loader = None


def _add_doc(func, doc):
    """Add documentation to a function."""
    func.__doc__ = doc


def _import_module(name):
    """Import module, returning the module after the last dot."""
    __import__(name)
    return sys.modules[name]


class _LazyDescr(object):

    def __init__(self, name):
        self.name = name

    def __get__(self, obj, tp):
        result = self._resolve()
        setattr(obj, self.name, result)  # Invokes __set__.
        try:
            # This is a bit ugly, but it avoids running this again by
            # removing this descriptor.
            delattr(obj.__class__, self.name)
        except AttributeError:
            pass
        return result


class MovedModule(_LazyDescr):

    def __init__(self, name, old, new=None):
        super(MovedModule, self).__init__(name)
        if PY3:
            if new is None:
                new = name
            self.mod = new
        else:
            self.mod = old

    def _resolve(self):
        return _import_module(self.mod)

    def __getattr__(self, attr):
        _module = self._resolve()
        value = getattr(_module, attr)
        setattr(self, attr, value)
        return value


class _LazyModule(types.ModuleType):

    def __init__(self, name):
        super(_LazyModule, self).__init__(name)
        self.__doc__ = self.__class__.__doc__

    def __dir__(self):
        attrs = ["__doc__", "__name__"]
        attrs += [attr.name for attr in self._moved_attributes]
        return attrs

    # Subclasses should override this
    _moved_attributes = []


class MovedAttribute(_LazyDescr):

    def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
        super(MovedAttribute, self).__init__(name)
        if PY3:
            if new_mod is None:
                new_mod = name
            self.mod = new_mod
            if new_attr is None:
                if old_attr is None:
                    new_attr = name
                else:
                    new_attr = old_attr
            self.attr = new_attr
        else:
            self.mod = old_mod
            if old_attr is None:
                old_attr = name
            self.attr = old_attr

    def _resolve(self):
        module = _import_module(self.mod)
        return getattr(module, self.attr)


class _SixMetaPathImporter(object):

    """
    A meta path importer to import six.moves and its submodules.

    This class implements a PEP302 finder and loader. It should be compatible
    with Python 2.5 and all existing versions of Python3
    """

    def __init__(self, six_module_name):
        self.name = six_module_name
        self.known_modules = {}

    def _add_module(self, mod, *fullnames):
        for fullname in fullnames:
            self.known_modules[self.name + "." + fullname] = mod

    def _get_module(self, fullname):
        return self.known_modules[self.name + "." + fullname]

    def find_module(self, fullname, path=None):
        if fullname in self.known_modules:
            return self
        return None

    def find_spec(self, fullname, path, target=None):
        if fullname in self.known_modules:
            return spec_from_loader(fullname, self)
        return None

    def __get_module(self, fullname):
        try:
            return self.known_modules[fullname]
        except KeyError:
            raise ImportError("This loader does not know module " + fullname)

    def load_module(self, fullname):
        try:
            # in case of a reload
            return sys.modules[fullname]
        except KeyError:
            pass
        mod = self.__get_module(fullname)
        if isinstance(mod, MovedModule):
            mod = mod._resolve()
        else:
            mod.__loader__ = self
        sys.modules[fullname] = mod
        return mod

    def is_package(self, fullname):
        """
        Return true, if the named module is a package.

        We need this method to get correct spec objects with
        Python 3.4 (see PEP451)
        """
        return hasattr(self.__get_module(fullname), "__path__")

    def get_code(self, fullname):
        """Return None

        Required, if is_package is implemented"""
        self.__get_module(fullname)  # eventually raises ImportError
        return None
    get_source = get_code  # same as get_code

    def create_module(self, spec):
        return self.load_module(spec.name)

    def exec_module(self, module):
        pass

_importer = _SixMetaPathImporter(__name__)


class _MovedItems(_LazyModule):

    """Lazy loading of moved objects"""
    __path__ = []  # mark as package


_moved_attributes = [
    MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
    MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
    MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"),
    MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
    MovedAttribute("intern", "__builtin__", "sys"),
    MovedAttribute("map", "itertools", "builtins", "imap", "map"),
    MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
    MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
    MovedAttribute("getoutput", "commands", "subprocess"),
    MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"),
    MovedAttribute("reduce", "__builtin__", "functools"),
    MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
    MovedAttribute("StringIO", "StringIO", "io"),
    MovedAttribute("UserDict", "UserDict", "collections"),
    MovedAttribute("UserList", "UserList", "collections"),
    MovedAttribute("UserString", "UserString", "collections"),
    MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
    MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),
    MovedModule("builtins", "__builtin__"),
    MovedModule("configparser", "ConfigParser"),
    MovedModule("collections_abc", "collections", "collections.abc" if sys.version_info >= (3, 3) else "collections"),
    MovedModule("copyreg", "copy_reg"),
    MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
    MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),
    MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread" if sys.version_info < (3, 9) else "_thread"),
    MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
    MovedModule("http_cookies", "Cookie", "http.cookies"),
    MovedModule("html_entities", "htmlentitydefs", "html.entities"),
    MovedModule("html_parser", "HTMLParser", "html.parser"),
    MovedModule("http_client", "httplib", "http.client"),
    MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
    MovedModule("email_mime_image", "email.MIMEImage", "email.mime.image"),
    MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
    MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"),
    MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
    MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
    MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
    MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
    MovedModule("cPickle", "cPickle", "pickle"),
    MovedModule("queue", "Queue"),
    MovedModule("reprlib", "repr"),
    MovedModule("socketserver", "SocketServer"),
    MovedModule("_thread", "thread", "_thread"),
    MovedModule("tkinter", "Tkinter"),
    MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
    MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
    MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
    MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
    MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
    MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
    MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
    MovedModule("tkinter_colorchooser", "tkColorChooser",
                "tkinter.colorchooser"),
    MovedModule("tkinter_commondialog", "tkCommonDialog",
                "tkinter.commondialog"),
    MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_font", "tkFont", "tkinter.font"),
    MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
    MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
                "tkinter.simpledialog"),
    MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
    MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
    MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
    MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
    MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
    MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
]
# Add windows specific modules.
if sys.platform == "win32":
    _moved_attributes += [
        MovedModule("winreg", "_winreg"),
    ]

for attr in _moved_attributes:
    setattr(_MovedItems, attr.name, attr)
    if isinstance(attr, MovedModule):
        _importer._add_module(attr, "moves." + attr.name)
del attr

_MovedItems._moved_attributes = _moved_attributes

moves = _MovedItems(__name__ + ".moves")
_importer._add_module(moves, "moves")


class Module_six_moves_urllib_parse(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_parse"""


_urllib_parse_moved_attributes = [
    MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
    MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
    MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
    MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
    MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
    MovedAttribute("urljoin", "urlparse", "urllib.parse"),
    MovedAttribute("urlparse", "urlparse", "urllib.parse"),
    MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
    MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
    MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
    MovedAttribute("quote", "urllib", "urllib.parse"),
    MovedAttribute("quote_plus", "urllib", "urllib.parse"),
    MovedAttribute("unquote", "urllib", "urllib.parse"),
    MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
    MovedAttribute("unquote_to_bytes", "urllib", "urllib.parse", "unquote", "unquote_to_bytes"),
    MovedAttribute("urlencode", "urllib", "urllib.parse"),
    MovedAttribute("splitquery", "urllib", "urllib.parse"),
    MovedAttribute("splittag", "urllib", "urllib.parse"),
    MovedAttribute("splituser", "urllib", "urllib.parse"),
    MovedAttribute("splitvalue", "urllib", "urllib.parse"),
    MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
    MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
    MovedAttribute("uses_params", "urlparse", "urllib.parse"),
    MovedAttribute("uses_query", "urlparse", "urllib.parse"),
    MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
]
for attr in _urllib_parse_moved_attributes:
    setattr(Module_six_moves_urllib_parse, attr.name, attr)
del attr

Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes

_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"),
                      "moves.urllib_parse", "moves.urllib.parse")


class Module_six_moves_urllib_error(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_error"""


_urllib_error_moved_attributes = [
    MovedAttribute("URLError", "urllib2", "urllib.error"),
    MovedAttribute("HTTPError", "urllib2", "urllib.error"),
    MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
]
for attr in _urllib_error_moved_attributes:
    setattr(Module_six_moves_urllib_error, attr.name, attr)
del attr

Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes

_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"),
                      "moves.urllib_error", "moves.urllib.error")


class Module_six_moves_urllib_request(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_request"""


_urllib_request_moved_attributes = [
    MovedAttribute("urlopen", "urllib2", "urllib.request"),
    MovedAttribute("install_opener", "urllib2", "urllib.request"),
    MovedAttribute("build_opener", "urllib2", "urllib.request"),
    MovedAttribute("pathname2url", "urllib", "urllib.request"),
    MovedAttribute("url2pathname", "urllib", "urllib.request"),
    MovedAttribute("getproxies", "urllib", "urllib.request"),
    MovedAttribute("Request", "urllib2", "urllib.request"),
    MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
    MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
    MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
    MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
    MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
    MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
    MovedAttribute("FileHandler", "urllib2", "urllib.request"),
    MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
    MovedAttribute("urlretrieve", "urllib", "urllib.request"),
    MovedAttribute("urlcleanup", "urllib", "urllib.request"),
    MovedAttribute("URLopener", "urllib", "urllib.request"),
    MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
    MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
    MovedAttribute("parse_http_list", "urllib2", "urllib.request"),
    MovedAttribute("parse_keqv_list", "urllib2", "urllib.request"),
]
for attr in _urllib_request_moved_attributes:
    setattr(Module_six_moves_urllib_request, attr.name, attr)
del attr

Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes

_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"),
                      "moves.urllib_request", "moves.urllib.request")


class Module_six_moves_urllib_response(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_response"""


_urllib_response_moved_attributes = [
    MovedAttribute("addbase", "urllib", "urllib.response"),
    MovedAttribute("addclosehook", "urllib", "urllib.response"),
    MovedAttribute("addinfo", "urllib", "urllib.response"),
    MovedAttribute("addinfourl", "urllib", "urllib.response"),
]
for attr in _urllib_response_moved_attributes:
    setattr(Module_six_moves_urllib_response, attr.name, attr)
del attr

Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes

_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"),
                      "moves.urllib_response", "moves.urllib.response")


class Module_six_moves_urllib_robotparser(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_robotparser"""


_urllib_robotparser_moved_attributes = [
    MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
]
for attr in _urllib_robotparser_moved_attributes:
    setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
del attr

Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes

_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"),
                      "moves.urllib_robotparser", "moves.urllib.robotparser")


class Module_six_moves_urllib(types.ModuleType):

    """Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
    __path__ = []  # mark as package
    parse = _importer._get_module("moves.urllib_parse")
    error = _importer._get_module("moves.urllib_error")
    request = _importer._get_module("moves.urllib_request")
    response = _importer._get_module("moves.urllib_response")
    robotparser = _importer._get_module("moves.urllib_robotparser")

    def __dir__(self):
        return ['parse', 'error', 'request', 'response', 'robotparser']

_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"),
                      "moves.urllib")


def add_move(move):
    """Add an item to six.moves."""
    setattr(_MovedItems, move.name, move)


def remove_move(name):
    """Remove item from six.moves."""
    try:
        delattr(_MovedItems, name)
    except AttributeError:
        try:
            del moves.__dict__[name]
        except KeyError:
            raise AttributeError("no such move, %r" % (name,))


if PY3:
    _meth_func = "__func__"
    _meth_self = "__self__"

    _func_closure = "__closure__"
    _func_code = "__code__"
    _func_defaults = "__defaults__"
    _func_globals = "__globals__"
else:
    _meth_func = "im_func"
    _meth_self = "im_self"

    _func_closure = "func_closure"
    _func_code = "func_code"
    _func_defaults = "func_defaults"
    _func_globals = "func_globals"


try:
    advance_iterator = next
except NameError:
    def advance_iterator(it):
        return it.next()
next = advance_iterator


try:
    callable = callable
except NameError:
    def callable(obj):
        return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)


if PY3:
    def get_unbound_function(unbound):
        return unbound

    create_bound_method = types.MethodType

    def create_unbound_method(func, cls):
        return func

    Iterator = object
else:
    def get_unbound_function(unbound):
        return unbound.im_func

    def create_bound_method(func, obj):
        return types.MethodType(func, obj, obj.__class__)

    def create_unbound_method(func, cls):
        return types.MethodType(func, None, cls)

    class Iterator(object):

        def next(self):
            return type(self).__next__(self)

    callable = callable
_add_doc(get_unbound_function,
         """Get the function out of a possibly unbound function""")


get_method_function = operator.attrgetter(_meth_func)
get_method_self = operator.attrgetter(_meth_self)
get_function_closure = operator.attrgetter(_func_closure)
get_function_code = operator.attrgetter(_func_code)
get_function_defaults = operator.attrgetter(_func_defaults)
get_function_globals = operator.attrgetter(_func_globals)


if PY3:
    def iterkeys(d, **kw):
        return iter(d.keys(**kw))

    def itervalues(d, **kw):
        return iter(d.values(**kw))

    def iteritems(d, **kw):
        return iter(d.items(**kw))

    def iterlists(d, **kw):
        return iter(d.lists(**kw))

    viewkeys = operator.methodcaller("keys")

    viewvalues = operator.methodcaller("values")

    viewitems = operator.methodcaller("items")
else:
    def iterkeys(d, **kw):
        return d.iterkeys(**kw)

    def itervalues(d, **kw):
        return d.itervalues(**kw)

    def iteritems(d, **kw):
        return d.iteritems(**kw)

    def iterlists(d, **kw):
        return d.iterlists(**kw)

    viewkeys = operator.methodcaller("viewkeys")

    viewvalues = operator.methodcaller("viewvalues")

    viewitems = operator.methodcaller("viewitems")

_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.")
_add_doc(itervalues, "Return an iterator over the values of a dictionary.")
_add_doc(iteritems,
         "Return an iterator over the (key, value) pairs of a dictionary.")
_add_doc(iterlists,
         "Return an iterator over the (key, [values]) pairs of a dictionary.")


if PY3:
    def b(s):
        return s.encode("latin-1")

    def u(s):
        return s
    unichr = chr
    import struct
    int2byte = struct.Struct(">B").pack
    del struct
    byte2int = operator.itemgetter(0)
    indexbytes = operator.getitem
    iterbytes = iter
    import io
    StringIO = io.StringIO
    BytesIO = io.BytesIO
    del io
    _assertCountEqual = "assertCountEqual"
    if sys.version_info[1] <= 1:
        _assertRaisesRegex = "assertRaisesRegexp"
        _assertRegex = "assertRegexpMatches"
        _assertNotRegex = "assertNotRegexpMatches"
    else:
        _assertRaisesRegex = "assertRaisesRegex"
        _assertRegex = "assertRegex"
        _assertNotRegex = "assertNotRegex"
else:
    def b(s):
        return s
    # Workaround for standalone backslash

    def u(s):
        return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
    unichr = unichr
    int2byte = chr

    def byte2int(bs):
        return ord(bs[0])

    def indexbytes(buf, i):
        return ord(buf[i])
    iterbytes = functools.partial(itertools.imap, ord)
    import StringIO
    StringIO = BytesIO = StringIO.StringIO
    _assertCountEqual = "assertItemsEqual"
    _assertRaisesRegex = "assertRaisesRegexp"
    _assertRegex = "assertRegexpMatches"
    _assertNotRegex = "assertNotRegexpMatches"
_add_doc(b, """Byte literal""")
_add_doc(u, """Text literal""")


def assertCountEqual(self, *args, **kwargs):
    return getattr(self, _assertCountEqual)(*args, **kwargs)


def assertRaisesRegex(self, *args, **kwargs):
    return getattr(self, _assertRaisesRegex)(*args, **kwargs)


def assertRegex(self, *args, **kwargs):
    return getattr(self, _assertRegex)(*args, **kwargs)


def assertNotRegex(self, *args, **kwargs):
    return getattr(self, _assertNotRegex)(*args, **kwargs)


if PY3:
    exec_ = getattr(moves.builtins, "exec")

    def reraise(tp, value, tb=None):
        try:
            if value is None:
                value = tp()
            if value.__traceback__ is not tb:
                raise value.with_traceback(tb)
            raise value
        finally:
            value = None
            tb = None

else:
    def exec_(_code_, _globs_=None, _locs_=None):
        """Execute code in a namespace."""
        if _globs_ is None:
            frame = sys._getframe(1)
            _globs_ = frame.f_globals
            if _locs_ is None:
                _locs_ = frame.f_locals
            del frame
        elif _locs_ is None:
            _locs_ = _globs_
        exec("""exec _code_ in _globs_, _locs_""")

    exec_("""def reraise(tp, value, tb=None):
    try:
        raise tp, value, tb
    finally:
        tb = None
""")


if sys.version_info[:2] > (3,):
    exec_("""def raise_from(value, from_value):
    try:
        raise value from from_value
    finally:
        value = None
""")
else:
    def raise_from(value, from_value):
        raise value


print_ = getattr(moves.builtins, "print", None)
if print_ is None:
    def print_(*args, **kwargs):
        """The new-style print function for Python 2.4 and 2.5."""
        fp = kwargs.pop("file", sys.stdout)
        if fp is None:
            return

        def write(data):
            if not isinstance(data, basestring):
                data = str(data)
            # If the file has an encoding, encode unicode with it.
            if (isinstance(fp, file) and
                    isinstance(data, unicode) and
                    fp.encoding is not None):
                errors = getattr(fp, "errors", None)
                if errors is None:
                    errors = "strict"
                data = data.encode(fp.encoding, errors)
            fp.write(data)
        want_unicode = False
        sep = kwargs.pop("sep", None)
        if sep is not None:
            if isinstance(sep, unicode):
                want_unicode = True
            elif not isinstance(sep, str):
                raise TypeError("sep must be None or a string")
        end = kwargs.pop("end", None)
        if end is not None:
            if isinstance(end, unicode):
                want_unicode = True
            elif not isinstance(end, str):
                raise TypeError("end must be None or a string")
        if kwargs:
            raise TypeError("invalid keyword arguments to print()")
        if not want_unicode:
            for arg in args:
                if isinstance(arg, unicode):
                    want_unicode = True
                    break
        if want_unicode:
            newline = unicode("\n")
            space = unicode(" ")
        else:
            newline = "\n"
            space = " "
        if sep is None:
            sep = space
        if end is None:
            end = newline
        for i, arg in enumerate(args):
            if i:
                write(sep)
            write(arg)
        write(end)
if sys.version_info[:2] < (3, 3):
    _print = print_

    def print_(*args, **kwargs):
        fp = kwargs.get("file", sys.stdout)
        flush = kwargs.pop("flush", False)
        _print(*args, **kwargs)
        if flush and fp is not None:
            fp.flush()

_add_doc(reraise, """Reraise an exception.""")

if sys.version_info[0:2] < (3, 4):
    # This does exactly the same what the :func:`py3:functools.update_wrapper`
    # function does on Python versions after 3.2. It sets the ``__wrapped__``
    # attribute on ``wrapper`` object and it doesn't raise an error if any of
    # the attributes mentioned in ``assigned`` and ``updated`` are missing on
    # ``wrapped`` object.
    def _update_wrapper(wrapper, wrapped,
                        assigned=functools.WRAPPER_ASSIGNMENTS,
                        updated=functools.WRAPPER_UPDATES):
        for attr in assigned:
            try:
                value = getattr(wrapped, attr)
            except AttributeError:
                continue
            else:
                setattr(wrapper, attr, value)
        for attr in updated:
            getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
        wrapper.__wrapped__ = wrapped
        return wrapper
    _update_wrapper.__doc__ = functools.update_wrapper.__doc__

    def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS,
              updated=functools.WRAPPER_UPDATES):
        return functools.partial(_update_wrapper, wrapped=wrapped,
                                 assigned=assigned, updated=updated)
    wraps.__doc__ = functools.wraps.__doc__

else:
    wraps = functools.wraps


def with_metaclass(meta, *bases):
    """Create a base class with a metaclass."""
    # This requires a bit of explanation: the basic idea is to make a dummy
    # metaclass for one level of class instantiation that replaces itself with
    # the actual metaclass.
    class metaclass(type):

        def __new__(cls, name, this_bases, d):
            if sys.version_info[:2] >= (3, 7):
                # This version introduced PEP 560 that requires a bit
                # of extra care (we mimic what is done by __build_class__).
                resolved_bases = types.resolve_bases(bases)
                if resolved_bases is not bases:
                    d['__orig_bases__'] = bases
            else:
                resolved_bases = bases
            return meta(name, resolved_bases, d)

        @classmethod
        def __prepare__(cls, name, this_bases):
            return meta.__prepare__(name, bases)
    return type.__new__(metaclass, 'temporary_class', (), {})


def add_metaclass(metaclass):
    """Class decorator for creating a class with a metaclass."""
    def wrapper(cls):
        orig_vars = cls.__dict__.copy()
        slots = orig_vars.get('__slots__')
        if slots is not None:
            if isinstance(slots, str):
                slots = [slots]
            for slots_var in slots:
                orig_vars.pop(slots_var)
        orig_vars.pop('__dict__', None)
        orig_vars.pop('__weakref__', None)
        if hasattr(cls, '__qualname__'):
            orig_vars['__qualname__'] = cls.__qualname__
        return metaclass(cls.__name__, cls.__bases__, orig_vars)
    return wrapper


def ensure_binary(s, encoding='utf-8', errors='strict'):
    """Coerce **s** to six.binary_type.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> encoded to `bytes`
      - `bytes` -> `bytes`
    """
    if isinstance(s, binary_type):
        return s
    if isinstance(s, text_type):
        return s.encode(encoding, errors)
    raise TypeError("not expecting type '%s'" % type(s))


def ensure_str(s, encoding='utf-8', errors='strict'):
    """Coerce *s* to `str`.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    """
    # Optimization: Fast return for the common case.
    if type(s) is str:
        return s
    if PY2 and isinstance(s, text_type):
        return s.encode(encoding, errors)
    elif PY3 and isinstance(s, binary_type):
        return s.decode(encoding, errors)
    elif not isinstance(s, (text_type, binary_type)):
        raise TypeError("not expecting type '%s'" % type(s))
    return s


def ensure_text(s, encoding='utf-8', errors='strict'):
    """Coerce *s* to six.text_type.

    For Python 2:
      - `unicode` -> `unicode`
      - `str` -> `unicode`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    """
    if isinstance(s, binary_type):
        return s.decode(encoding, errors)
    elif isinstance(s, text_type):
        return s
    else:
        raise TypeError("not expecting type '%s'" % type(s))


def python_2_unicode_compatible(klass):
    """
    A class decorator that defines __unicode__ and __str__ methods under Python 2.
    Under Python 3 it does nothing.

    To support Python 2 and 3 with a single code base, define a __str__ method
    returning text and apply this decorator to the class.
    """
    if PY2:
        if '__str__' not in klass.__dict__:
            raise ValueError("@python_2_unicode_compatible cannot be applied "
                             "to %s because it doesn't define __str__()." %
                             klass.__name__)
        klass.__unicode__ = klass.__str__
        klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
    return klass


# Complete the moves implementation.
# This code is at the end of this module to speed up module loading.
# Turn this module into a package.
__path__ = []  # required for PEP 302 and PEP 451
__package__ = __name__  # see PEP 366 @ReservedAssignment
if globals().get("__spec__") is not None:
    __spec__.submodule_search_locations = []  # PEP 451 @UndefinedVariable
# Remove other six meta path importers, since they cause problems. This can
# happen if six is removed from sys.modules and then reloaded. (Setuptools does
# this for some reason.)
if sys.meta_path:
    for i, importer in enumerate(sys.meta_path):
        # Here's some real nastiness: Another "instance" of the six module might
        # be floating around. Therefore, we can't use isinstance() to check for
        # the six meta path importer, since the other six instance will have
        # inserted an importer with different class.
        if (type(importer).__name__ == "_SixMetaPathImporter" and
                importer.name == __name__):
            del sys.meta_path[i]
            break
    del i, importer
# Finally, add the importer to the meta path import hook.
sys.meta_path.append(_importer)
python3.12/site-packages/pip/_vendor/rich/errors.py000064400000001202151732701650016152 0ustar00class ConsoleError(Exception):
    """An error in console operation."""


class StyleError(Exception):
    """An error in styles."""


class StyleSyntaxError(ConsoleError):
    """Style was badly formatted."""


class MissingStyle(StyleError):
    """No such style."""


class StyleStackError(ConsoleError):
    """Style stack is invalid."""


class NotRenderableError(ConsoleError):
    """Object is not renderable."""


class MarkupError(ConsoleError):
    """Markup was badly formatted."""


class LiveError(ConsoleError):
    """Error related to Live display."""


class NoAltScreen(ConsoleError):
    """Alt screen mode was required."""
python3.12/site-packages/pip/_vendor/rich/_win32_console.py000064400000054444151732701650017501 0ustar00"""Light wrapper around the Win32 Console API - this module should only be imported on Windows

The API that this module wraps is documented at https://docs.microsoft.com/en-us/windows/console/console-functions
"""
import ctypes
import sys
from typing import Any

windll: Any = None
if sys.platform == "win32":
    windll = ctypes.LibraryLoader(ctypes.WinDLL)
else:
    raise ImportError(f"{__name__} can only be imported on Windows")

import time
from ctypes import Structure, byref, wintypes
from typing import IO, NamedTuple, Type, cast

from pip._vendor.rich.color import ColorSystem
from pip._vendor.rich.style import Style

STDOUT = -11
ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4

COORD = wintypes._COORD


class LegacyWindowsError(Exception):
    pass


class WindowsCoordinates(NamedTuple):
    """Coordinates in the Windows Console API are (y, x), not (x, y).
    This class is intended to prevent that confusion.
    Rows and columns are indexed from 0.
    This class can be used in place of wintypes._COORD in arguments and argtypes.
    """

    row: int
    col: int

    @classmethod
    def from_param(cls, value: "WindowsCoordinates") -> COORD:
        """Converts a WindowsCoordinates into a wintypes _COORD structure.
        This classmethod is internally called by ctypes to perform the conversion.

        Args:
            value (WindowsCoordinates): The input coordinates to convert.

        Returns:
            wintypes._COORD: The converted coordinates struct.
        """
        return COORD(value.col, value.row)


class CONSOLE_SCREEN_BUFFER_INFO(Structure):
    _fields_ = [
        ("dwSize", COORD),
        ("dwCursorPosition", COORD),
        ("wAttributes", wintypes.WORD),
        ("srWindow", wintypes.SMALL_RECT),
        ("dwMaximumWindowSize", COORD),
    ]


class CONSOLE_CURSOR_INFO(ctypes.Structure):
    _fields_ = [("dwSize", wintypes.DWORD), ("bVisible", wintypes.BOOL)]


_GetStdHandle = windll.kernel32.GetStdHandle
_GetStdHandle.argtypes = [
    wintypes.DWORD,
]
_GetStdHandle.restype = wintypes.HANDLE


def GetStdHandle(handle: int = STDOUT) -> wintypes.HANDLE:
    """Retrieves a handle to the specified standard device (standard input, standard output, or standard error).

    Args:
        handle (int): Integer identifier for the handle. Defaults to -11 (stdout).

    Returns:
        wintypes.HANDLE: The handle
    """
    return cast(wintypes.HANDLE, _GetStdHandle(handle))


_GetConsoleMode = windll.kernel32.GetConsoleMode
_GetConsoleMode.argtypes = [wintypes.HANDLE, wintypes.LPDWORD]
_GetConsoleMode.restype = wintypes.BOOL


def GetConsoleMode(std_handle: wintypes.HANDLE) -> int:
    """Retrieves the current input mode of a console's input buffer
    or the current output mode of a console screen buffer.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.

    Raises:
        LegacyWindowsError: If any error occurs while calling the Windows console API.

    Returns:
        int: Value representing the current console mode as documented at
            https://docs.microsoft.com/en-us/windows/console/getconsolemode#parameters
    """

    console_mode = wintypes.DWORD()
    success = bool(_GetConsoleMode(std_handle, console_mode))
    if not success:
        raise LegacyWindowsError("Unable to get legacy Windows Console Mode")
    return console_mode.value


_FillConsoleOutputCharacterW = windll.kernel32.FillConsoleOutputCharacterW
_FillConsoleOutputCharacterW.argtypes = [
    wintypes.HANDLE,
    ctypes.c_char,
    wintypes.DWORD,
    cast(Type[COORD], WindowsCoordinates),
    ctypes.POINTER(wintypes.DWORD),
]
_FillConsoleOutputCharacterW.restype = wintypes.BOOL


def FillConsoleOutputCharacter(
    std_handle: wintypes.HANDLE,
    char: str,
    length: int,
    start: WindowsCoordinates,
) -> int:
    """Writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        char (str): The character to write. Must be a string of length 1.
        length (int): The number of times to write the character.
        start (WindowsCoordinates): The coordinates to start writing at.

    Returns:
        int: The number of characters written.
    """
    character = ctypes.c_char(char.encode())
    num_characters = wintypes.DWORD(length)
    num_written = wintypes.DWORD(0)
    _FillConsoleOutputCharacterW(
        std_handle,
        character,
        num_characters,
        start,
        byref(num_written),
    )
    return num_written.value


_FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute
_FillConsoleOutputAttribute.argtypes = [
    wintypes.HANDLE,
    wintypes.WORD,
    wintypes.DWORD,
    cast(Type[COORD], WindowsCoordinates),
    ctypes.POINTER(wintypes.DWORD),
]
_FillConsoleOutputAttribute.restype = wintypes.BOOL


def FillConsoleOutputAttribute(
    std_handle: wintypes.HANDLE,
    attributes: int,
    length: int,
    start: WindowsCoordinates,
) -> int:
    """Sets the character attributes for a specified number of character cells,
    beginning at the specified coordinates in a screen buffer.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        attributes (int): Integer value representing the foreground and background colours of the cells.
        length (int): The number of cells to set the output attribute of.
        start (WindowsCoordinates): The coordinates of the first cell whose attributes are to be set.

    Returns:
        int: The number of cells whose attributes were actually set.
    """
    num_cells = wintypes.DWORD(length)
    style_attrs = wintypes.WORD(attributes)
    num_written = wintypes.DWORD(0)
    _FillConsoleOutputAttribute(
        std_handle, style_attrs, num_cells, start, byref(num_written)
    )
    return num_written.value


_SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute
_SetConsoleTextAttribute.argtypes = [
    wintypes.HANDLE,
    wintypes.WORD,
]
_SetConsoleTextAttribute.restype = wintypes.BOOL


def SetConsoleTextAttribute(
    std_handle: wintypes.HANDLE, attributes: wintypes.WORD
) -> bool:
    """Set the colour attributes for all text written after this function is called.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        attributes (int): Integer value representing the foreground and background colours.


    Returns:
        bool: True if the attribute was set successfully, otherwise False.
    """
    return bool(_SetConsoleTextAttribute(std_handle, attributes))


_GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo
_GetConsoleScreenBufferInfo.argtypes = [
    wintypes.HANDLE,
    ctypes.POINTER(CONSOLE_SCREEN_BUFFER_INFO),
]
_GetConsoleScreenBufferInfo.restype = wintypes.BOOL


def GetConsoleScreenBufferInfo(
    std_handle: wintypes.HANDLE,
) -> CONSOLE_SCREEN_BUFFER_INFO:
    """Retrieves information about the specified console screen buffer.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.

    Returns:
        CONSOLE_SCREEN_BUFFER_INFO: A CONSOLE_SCREEN_BUFFER_INFO ctype struct contain information about
            screen size, cursor position, colour attributes, and more."""
    console_screen_buffer_info = CONSOLE_SCREEN_BUFFER_INFO()
    _GetConsoleScreenBufferInfo(std_handle, byref(console_screen_buffer_info))
    return console_screen_buffer_info


_SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition
_SetConsoleCursorPosition.argtypes = [
    wintypes.HANDLE,
    cast(Type[COORD], WindowsCoordinates),
]
_SetConsoleCursorPosition.restype = wintypes.BOOL


def SetConsoleCursorPosition(
    std_handle: wintypes.HANDLE, coords: WindowsCoordinates
) -> bool:
    """Set the position of the cursor in the console screen

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        coords (WindowsCoordinates): The coordinates to move the cursor to.

    Returns:
        bool: True if the function succeeds, otherwise False.
    """
    return bool(_SetConsoleCursorPosition(std_handle, coords))


_GetConsoleCursorInfo = windll.kernel32.GetConsoleCursorInfo
_GetConsoleCursorInfo.argtypes = [
    wintypes.HANDLE,
    ctypes.POINTER(CONSOLE_CURSOR_INFO),
]
_GetConsoleCursorInfo.restype = wintypes.BOOL


def GetConsoleCursorInfo(
    std_handle: wintypes.HANDLE, cursor_info: CONSOLE_CURSOR_INFO
) -> bool:
    """Get the cursor info - used to get cursor visibility and width

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct that receives information
            about the console's cursor.

    Returns:
          bool: True if the function succeeds, otherwise False.
    """
    return bool(_GetConsoleCursorInfo(std_handle, byref(cursor_info)))


_SetConsoleCursorInfo = windll.kernel32.SetConsoleCursorInfo
_SetConsoleCursorInfo.argtypes = [
    wintypes.HANDLE,
    ctypes.POINTER(CONSOLE_CURSOR_INFO),
]
_SetConsoleCursorInfo.restype = wintypes.BOOL


def SetConsoleCursorInfo(
    std_handle: wintypes.HANDLE, cursor_info: CONSOLE_CURSOR_INFO
) -> bool:
    """Set the cursor info - used for adjusting cursor visibility and width

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct containing the new cursor info.

    Returns:
          bool: True if the function succeeds, otherwise False.
    """
    return bool(_SetConsoleCursorInfo(std_handle, byref(cursor_info)))


_SetConsoleTitle = windll.kernel32.SetConsoleTitleW
_SetConsoleTitle.argtypes = [wintypes.LPCWSTR]
_SetConsoleTitle.restype = wintypes.BOOL


def SetConsoleTitle(title: str) -> bool:
    """Sets the title of the current console window

    Args:
        title (str): The new title of the console window.

    Returns:
        bool: True if the function succeeds, otherwise False.
    """
    return bool(_SetConsoleTitle(title))


class LegacyWindowsTerm:
    """This class allows interaction with the legacy Windows Console API. It should only be used in the context
    of environments where virtual terminal processing is not available. However, if it is used in a Windows environment,
    the entire API should work.

    Args:
        file (IO[str]): The file which the Windows Console API HANDLE is retrieved from, defaults to sys.stdout.
    """

    BRIGHT_BIT = 8

    # Indices are ANSI color numbers, values are the corresponding Windows Console API color numbers
    ANSI_TO_WINDOWS = [
        0,  # black                      The Windows colours are defined in wincon.h as follows:
        4,  # red                         define FOREGROUND_BLUE            0x0001 -- 0000 0001
        2,  # green                       define FOREGROUND_GREEN           0x0002 -- 0000 0010
        6,  # yellow                      define FOREGROUND_RED             0x0004 -- 0000 0100
        1,  # blue                        define FOREGROUND_INTENSITY       0x0008 -- 0000 1000
        5,  # magenta                     define BACKGROUND_BLUE            0x0010 -- 0001 0000
        3,  # cyan                        define BACKGROUND_GREEN           0x0020 -- 0010 0000
        7,  # white                       define BACKGROUND_RED             0x0040 -- 0100 0000
        8,  # bright black (grey)         define BACKGROUND_INTENSITY       0x0080 -- 1000 0000
        12,  # bright red
        10,  # bright green
        14,  # bright yellow
        9,  # bright blue
        13,  # bright magenta
        11,  # bright cyan
        15,  # bright white
    ]

    def __init__(self, file: "IO[str]") -> None:
        handle = GetStdHandle(STDOUT)
        self._handle = handle
        default_text = GetConsoleScreenBufferInfo(handle).wAttributes
        self._default_text = default_text

        self._default_fore = default_text & 7
        self._default_back = (default_text >> 4) & 7
        self._default_attrs = self._default_fore | (self._default_back << 4)

        self._file = file
        self.write = file.write
        self.flush = file.flush

    @property
    def cursor_position(self) -> WindowsCoordinates:
        """Returns the current position of the cursor (0-based)

        Returns:
            WindowsCoordinates: The current cursor position.
        """
        coord: COORD = GetConsoleScreenBufferInfo(self._handle).dwCursorPosition
        return WindowsCoordinates(row=cast(int, coord.Y), col=cast(int, coord.X))

    @property
    def screen_size(self) -> WindowsCoordinates:
        """Returns the current size of the console screen buffer, in character columns and rows

        Returns:
            WindowsCoordinates: The width and height of the screen as WindowsCoordinates.
        """
        screen_size: COORD = GetConsoleScreenBufferInfo(self._handle).dwSize
        return WindowsCoordinates(
            row=cast(int, screen_size.Y), col=cast(int, screen_size.X)
        )

    def write_text(self, text: str) -> None:
        """Write text directly to the terminal without any modification of styles

        Args:
            text (str): The text to write to the console
        """
        self.write(text)
        self.flush()

    def write_styled(self, text: str, style: Style) -> None:
        """Write styled text to the terminal.

        Args:
            text (str): The text to write
            style (Style): The style of the text
        """
        color = style.color
        bgcolor = style.bgcolor
        if style.reverse:
            color, bgcolor = bgcolor, color

        if color:
            fore = color.downgrade(ColorSystem.WINDOWS).number
            fore = fore if fore is not None else 7  # Default to ANSI 7: White
            if style.bold:
                fore = fore | self.BRIGHT_BIT
            if style.dim:
                fore = fore & ~self.BRIGHT_BIT
            fore = self.ANSI_TO_WINDOWS[fore]
        else:
            fore = self._default_fore

        if bgcolor:
            back = bgcolor.downgrade(ColorSystem.WINDOWS).number
            back = back if back is not None else 0  # Default to ANSI 0: Black
            back = self.ANSI_TO_WINDOWS[back]
        else:
            back = self._default_back

        assert fore is not None
        assert back is not None

        SetConsoleTextAttribute(
            self._handle, attributes=ctypes.c_ushort(fore | (back << 4))
        )
        self.write_text(text)
        SetConsoleTextAttribute(self._handle, attributes=self._default_text)

    def move_cursor_to(self, new_position: WindowsCoordinates) -> None:
        """Set the position of the cursor

        Args:
            new_position (WindowsCoordinates): The WindowsCoordinates representing the new position of the cursor.
        """
        if new_position.col < 0 or new_position.row < 0:
            return
        SetConsoleCursorPosition(self._handle, coords=new_position)

    def erase_line(self) -> None:
        """Erase all content on the line the cursor is currently located at"""
        screen_size = self.screen_size
        cursor_position = self.cursor_position
        cells_to_erase = screen_size.col
        start_coordinates = WindowsCoordinates(row=cursor_position.row, col=0)
        FillConsoleOutputCharacter(
            self._handle, " ", length=cells_to_erase, start=start_coordinates
        )
        FillConsoleOutputAttribute(
            self._handle,
            self._default_attrs,
            length=cells_to_erase,
            start=start_coordinates,
        )

    def erase_end_of_line(self) -> None:
        """Erase all content from the cursor position to the end of that line"""
        cursor_position = self.cursor_position
        cells_to_erase = self.screen_size.col - cursor_position.col
        FillConsoleOutputCharacter(
            self._handle, " ", length=cells_to_erase, start=cursor_position
        )
        FillConsoleOutputAttribute(
            self._handle,
            self._default_attrs,
            length=cells_to_erase,
            start=cursor_position,
        )

    def erase_start_of_line(self) -> None:
        """Erase all content from the cursor position to the start of that line"""
        row, col = self.cursor_position
        start = WindowsCoordinates(row, 0)
        FillConsoleOutputCharacter(self._handle, " ", length=col, start=start)
        FillConsoleOutputAttribute(
            self._handle, self._default_attrs, length=col, start=start
        )

    def move_cursor_up(self) -> None:
        """Move the cursor up a single cell"""
        cursor_position = self.cursor_position
        SetConsoleCursorPosition(
            self._handle,
            coords=WindowsCoordinates(
                row=cursor_position.row - 1, col=cursor_position.col
            ),
        )

    def move_cursor_down(self) -> None:
        """Move the cursor down a single cell"""
        cursor_position = self.cursor_position
        SetConsoleCursorPosition(
            self._handle,
            coords=WindowsCoordinates(
                row=cursor_position.row + 1,
                col=cursor_position.col,
            ),
        )

    def move_cursor_forward(self) -> None:
        """Move the cursor forward a single cell. Wrap to the next line if required."""
        row, col = self.cursor_position
        if col == self.screen_size.col - 1:
            row += 1
            col = 0
        else:
            col += 1
        SetConsoleCursorPosition(
            self._handle, coords=WindowsCoordinates(row=row, col=col)
        )

    def move_cursor_to_column(self, column: int) -> None:
        """Move cursor to the column specified by the zero-based column index, staying on the same row

        Args:
            column (int): The zero-based column index to move the cursor to.
        """
        row, _ = self.cursor_position
        SetConsoleCursorPosition(self._handle, coords=WindowsCoordinates(row, column))

    def move_cursor_backward(self) -> None:
        """Move the cursor backward a single cell. Wrap to the previous line if required."""
        row, col = self.cursor_position
        if col == 0:
            row -= 1
            col = self.screen_size.col - 1
        else:
            col -= 1
        SetConsoleCursorPosition(
            self._handle, coords=WindowsCoordinates(row=row, col=col)
        )

    def hide_cursor(self) -> None:
        """Hide the cursor"""
        current_cursor_size = self._get_cursor_size()
        invisible_cursor = CONSOLE_CURSOR_INFO(dwSize=current_cursor_size, bVisible=0)
        SetConsoleCursorInfo(self._handle, cursor_info=invisible_cursor)

    def show_cursor(self) -> None:
        """Show the cursor"""
        current_cursor_size = self._get_cursor_size()
        visible_cursor = CONSOLE_CURSOR_INFO(dwSize=current_cursor_size, bVisible=1)
        SetConsoleCursorInfo(self._handle, cursor_info=visible_cursor)

    def set_title(self, title: str) -> None:
        """Set the title of the terminal window

        Args:
            title (str): The new title of the console window
        """
        assert len(title) < 255, "Console title must be less than 255 characters"
        SetConsoleTitle(title)

    def _get_cursor_size(self) -> int:
        """Get the percentage of the character cell that is filled by the cursor"""
        cursor_info = CONSOLE_CURSOR_INFO()
        GetConsoleCursorInfo(self._handle, cursor_info=cursor_info)
        return int(cursor_info.dwSize)


if __name__ == "__main__":
    handle = GetStdHandle()

    from pip._vendor.rich.console import Console

    console = Console()

    term = LegacyWindowsTerm(sys.stdout)
    term.set_title("Win32 Console Examples")

    style = Style(color="black", bgcolor="red")

    heading = Style.parse("black on green")

    # Check colour output
    console.rule("Checking colour output")
    console.print("[on red]on red!")
    console.print("[blue]blue!")
    console.print("[yellow]yellow!")
    console.print("[bold yellow]bold yellow!")
    console.print("[bright_yellow]bright_yellow!")
    console.print("[dim bright_yellow]dim bright_yellow!")
    console.print("[italic cyan]italic cyan!")
    console.print("[bold white on blue]bold white on blue!")
    console.print("[reverse bold white on blue]reverse bold white on blue!")
    console.print("[bold black on cyan]bold black on cyan!")
    console.print("[black on green]black on green!")
    console.print("[blue on green]blue on green!")
    console.print("[white on black]white on black!")
    console.print("[black on white]black on white!")
    console.print("[#1BB152 on #DA812D]#1BB152 on #DA812D!")

    # Check cursor movement
    console.rule("Checking cursor movement")
    console.print()
    term.move_cursor_backward()
    term.move_cursor_backward()
    term.write_text("went back and wrapped to prev line")
    time.sleep(1)
    term.move_cursor_up()
    term.write_text("we go up")
    time.sleep(1)
    term.move_cursor_down()
    term.write_text("and down")
    time.sleep(1)
    term.move_cursor_up()
    term.move_cursor_backward()
    term.move_cursor_backward()
    term.write_text("we went up and back 2")
    time.sleep(1)
    term.move_cursor_down()
    term.move_cursor_backward()
    term.move_cursor_backward()
    term.write_text("we went down and back 2")
    time.sleep(1)

    # Check erasing of lines
    term.hide_cursor()
    console.print()
    console.rule("Checking line erasing")
    console.print("\n...Deleting to the start of the line...")
    term.write_text("The red arrow shows the cursor location, and direction of erase")
    time.sleep(1)
    term.move_cursor_to_column(16)
    term.write_styled("<", Style.parse("black on red"))
    term.move_cursor_backward()
    time.sleep(1)
    term.erase_start_of_line()
    time.sleep(1)

    console.print("\n\n...And to the end of the line...")
    term.write_text("The red arrow shows the cursor location, and direction of erase")
    time.sleep(1)

    term.move_cursor_to_column(16)
    term.write_styled(">", Style.parse("black on red"))
    time.sleep(1)
    term.erase_end_of_line()
    time.sleep(1)

    console.print("\n\n...Now the whole line will be erased...")
    term.write_styled("I'm going to disappear!", style=Style.parse("black on cyan"))
    time.sleep(1)
    term.erase_line()

    term.show_cursor()
    print("\n")
python3.12/site-packages/pip/_vendor/rich/_extension.py000064400000000411151732701650017012 0ustar00from typing import Any


def load_ipython_extension(ip: Any) -> None:  # pragma: no cover
    # prevent circular import
    from pip._vendor.rich.pretty import install
    from pip._vendor.rich.traceback import install as tr_install

    install()
    tr_install()
python3.12/site-packages/pip/_vendor/rich/bar.py000064400000006300151732701660015407 0ustar00from typing import Optional, Union

from .color import Color
from .console import Console, ConsoleOptions, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment
from .style import Style

# There are left-aligned characters for 1/8 to 7/8, but
# the right-aligned characters exist only for 1/8 and 4/8.
BEGIN_BLOCK_ELEMENTS = ["█", "█", "█", "▐", "▐", "▐", "▕", "▕"]
END_BLOCK_ELEMENTS = [" ", "▏", "▎", "▍", "▌", "▋", "▊", "▉"]
FULL_BLOCK = "█"


class Bar(JupyterMixin):
    """Renders a solid block bar.

    Args:
        size (float): Value for the end of the bar.
        begin (float): Begin point (between 0 and size, inclusive).
        end (float): End point (between 0 and size, inclusive).
        width (int, optional): Width of the bar, or ``None`` for maximum width. Defaults to None.
        color (Union[Color, str], optional): Color of the bar. Defaults to "default".
        bgcolor (Union[Color, str], optional): Color of bar background. Defaults to "default".
    """

    def __init__(
        self,
        size: float,
        begin: float,
        end: float,
        *,
        width: Optional[int] = None,
        color: Union[Color, str] = "default",
        bgcolor: Union[Color, str] = "default",
    ):
        self.size = size
        self.begin = max(begin, 0)
        self.end = min(end, size)
        self.width = width
        self.style = Style(color=color, bgcolor=bgcolor)

    def __repr__(self) -> str:
        return f"Bar({self.size}, {self.begin}, {self.end})"

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:

        width = min(
            self.width if self.width is not None else options.max_width,
            options.max_width,
        )

        if self.begin >= self.end:
            yield Segment(" " * width, self.style)
            yield Segment.line()
            return

        prefix_complete_eights = int(width * 8 * self.begin / self.size)
        prefix_bar_count = prefix_complete_eights // 8
        prefix_eights_count = prefix_complete_eights % 8

        body_complete_eights = int(width * 8 * self.end / self.size)
        body_bar_count = body_complete_eights // 8
        body_eights_count = body_complete_eights % 8

        # When start and end fall into the same cell, we ideally should render
        # a symbol that's "center-aligned", but there is no good symbol in Unicode.
        # In this case, we fall back to right-aligned block symbol for simplicity.

        prefix = " " * prefix_bar_count
        if prefix_eights_count:
            prefix += BEGIN_BLOCK_ELEMENTS[prefix_eights_count]

        body = FULL_BLOCK * body_bar_count
        if body_eights_count:
            body += END_BLOCK_ELEMENTS[body_eights_count]

        suffix = " " * (width - len(body))

        yield Segment(prefix + body[len(prefix) :] + suffix, self.style)
        yield Segment.line()

    def __rich_measure__(
        self, console: Console, options: ConsoleOptions
    ) -> Measurement:
        return (
            Measurement(self.width, self.width)
            if self.width is not None
            else Measurement(4, options.max_width)
        )
python3.12/site-packages/pip/_vendor/rich/_inspect.py000064400000022737151732701660016463 0ustar00from __future__ import absolute_import

import inspect
from inspect import cleandoc, getdoc, getfile, isclass, ismodule, signature
from typing import Any, Collection, Iterable, Optional, Tuple, Type, Union

from .console import Group, RenderableType
from .control import escape_control_codes
from .highlighter import ReprHighlighter
from .jupyter import JupyterMixin
from .panel import Panel
from .pretty import Pretty
from .table import Table
from .text import Text, TextType


def _first_paragraph(doc: str) -> str:
    """Get the first paragraph from a docstring."""
    paragraph, _, _ = doc.partition("\n\n")
    return paragraph


class Inspect(JupyterMixin):
    """A renderable to inspect any Python Object.

    Args:
        obj (Any): An object to inspect.
        title (str, optional): Title to display over inspect result, or None use type. Defaults to None.
        help (bool, optional): Show full help text rather than just first paragraph. Defaults to False.
        methods (bool, optional): Enable inspection of callables. Defaults to False.
        docs (bool, optional): Also render doc strings. Defaults to True.
        private (bool, optional): Show private attributes (beginning with underscore). Defaults to False.
        dunder (bool, optional): Show attributes starting with double underscore. Defaults to False.
        sort (bool, optional): Sort attributes alphabetically. Defaults to True.
        all (bool, optional): Show all attributes. Defaults to False.
        value (bool, optional): Pretty print value of object. Defaults to True.
    """

    def __init__(
        self,
        obj: Any,
        *,
        title: Optional[TextType] = None,
        help: bool = False,
        methods: bool = False,
        docs: bool = True,
        private: bool = False,
        dunder: bool = False,
        sort: bool = True,
        all: bool = True,
        value: bool = True,
    ) -> None:
        self.highlighter = ReprHighlighter()
        self.obj = obj
        self.title = title or self._make_title(obj)
        if all:
            methods = private = dunder = True
        self.help = help
        self.methods = methods
        self.docs = docs or help
        self.private = private or dunder
        self.dunder = dunder
        self.sort = sort
        self.value = value

    def _make_title(self, obj: Any) -> Text:
        """Make a default title."""
        title_str = (
            str(obj)
            if (isclass(obj) or callable(obj) or ismodule(obj))
            else str(type(obj))
        )
        title_text = self.highlighter(title_str)
        return title_text

    def __rich__(self) -> Panel:
        return Panel.fit(
            Group(*self._render()),
            title=self.title,
            border_style="scope.border",
            padding=(0, 1),
        )

    def _get_signature(self, name: str, obj: Any) -> Optional[Text]:
        """Get a signature for a callable."""
        try:
            _signature = str(signature(obj)) + ":"
        except ValueError:
            _signature = "(...)"
        except TypeError:
            return None

        source_filename: Optional[str] = None
        try:
            source_filename = getfile(obj)
        except (OSError, TypeError):
            # OSError is raised if obj has no source file, e.g. when defined in REPL.
            pass

        callable_name = Text(name, style="inspect.callable")
        if source_filename:
            callable_name.stylize(f"link file://{source_filename}")
        signature_text = self.highlighter(_signature)

        qualname = name or getattr(obj, "__qualname__", name)

        # If obj is a module, there may be classes (which are callable) to display
        if inspect.isclass(obj):
            prefix = "class"
        elif inspect.iscoroutinefunction(obj):
            prefix = "async def"
        else:
            prefix = "def"

        qual_signature = Text.assemble(
            (f"{prefix} ", f"inspect.{prefix.replace(' ', '_')}"),
            (qualname, "inspect.callable"),
            signature_text,
        )

        return qual_signature

    def _render(self) -> Iterable[RenderableType]:
        """Render object."""

        def sort_items(item: Tuple[str, Any]) -> Tuple[bool, str]:
            key, (_error, value) = item
            return (callable(value), key.strip("_").lower())

        def safe_getattr(attr_name: str) -> Tuple[Any, Any]:
            """Get attribute or any exception."""
            try:
                return (None, getattr(obj, attr_name))
            except Exception as error:
                return (error, None)

        obj = self.obj
        keys = dir(obj)
        total_items = len(keys)
        if not self.dunder:
            keys = [key for key in keys if not key.startswith("__")]
        if not self.private:
            keys = [key for key in keys if not key.startswith("_")]
        not_shown_count = total_items - len(keys)
        items = [(key, safe_getattr(key)) for key in keys]
        if self.sort:
            items.sort(key=sort_items)

        items_table = Table.grid(padding=(0, 1), expand=False)
        items_table.add_column(justify="right")
        add_row = items_table.add_row
        highlighter = self.highlighter

        if callable(obj):
            signature = self._get_signature("", obj)
            if signature is not None:
                yield signature
                yield ""

        if self.docs:
            _doc = self._get_formatted_doc(obj)
            if _doc is not None:
                doc_text = Text(_doc, style="inspect.help")
                doc_text = highlighter(doc_text)
                yield doc_text
                yield ""

        if self.value and not (isclass(obj) or callable(obj) or ismodule(obj)):
            yield Panel(
                Pretty(obj, indent_guides=True, max_length=10, max_string=60),
                border_style="inspect.value.border",
            )
            yield ""

        for key, (error, value) in items:
            key_text = Text.assemble(
                (
                    key,
                    "inspect.attr.dunder" if key.startswith("__") else "inspect.attr",
                ),
                (" =", "inspect.equals"),
            )
            if error is not None:
                warning = key_text.copy()
                warning.stylize("inspect.error")
                add_row(warning, highlighter(repr(error)))
                continue

            if callable(value):
                if not self.methods:
                    continue

                _signature_text = self._get_signature(key, value)
                if _signature_text is None:
                    add_row(key_text, Pretty(value, highlighter=highlighter))
                else:
                    if self.docs:
                        docs = self._get_formatted_doc(value)
                        if docs is not None:
                            _signature_text.append("\n" if "\n" in docs else " ")
                            doc = highlighter(docs)
                            doc.stylize("inspect.doc")
                            _signature_text.append(doc)

                    add_row(key_text, _signature_text)
            else:
                add_row(key_text, Pretty(value, highlighter=highlighter))
        if items_table.row_count:
            yield items_table
        elif not_shown_count:
            yield Text.from_markup(
                f"[b cyan]{not_shown_count}[/][i] attribute(s) not shown.[/i] "
                f"Run [b][magenta]inspect[/]([not b]inspect[/])[/b] for options."
            )

    def _get_formatted_doc(self, object_: Any) -> Optional[str]:
        """
        Extract the docstring of an object, process it and returns it.
        The processing consists in cleaning up the doctring's indentation,
        taking only its 1st paragraph if `self.help` is not True,
        and escape its control codes.

        Args:
            object_ (Any): the object to get the docstring from.

        Returns:
            Optional[str]: the processed docstring, or None if no docstring was found.
        """
        docs = getdoc(object_)
        if docs is None:
            return None
        docs = cleandoc(docs).strip()
        if not self.help:
            docs = _first_paragraph(docs)
        return escape_control_codes(docs)


def get_object_types_mro(obj: Union[object, Type[Any]]) -> Tuple[type, ...]:
    """Returns the MRO of an object's class, or of the object itself if it's a class."""
    if not hasattr(obj, "__mro__"):
        # N.B. we cannot use `if type(obj) is type` here because it doesn't work with
        # some types of classes, such as the ones that use abc.ABCMeta.
        obj = type(obj)
    return getattr(obj, "__mro__", ())


def get_object_types_mro_as_strings(obj: object) -> Collection[str]:
    """
    Returns the MRO of an object's class as full qualified names, or of the object itself if it's a class.

    Examples:
        `object_types_mro_as_strings(JSONDecoder)` will return `['json.decoder.JSONDecoder', 'builtins.object']`
    """
    return [
        f'{getattr(type_, "__module__", "")}.{getattr(type_, "__qualname__", "")}'
        for type_ in get_object_types_mro(obj)
    ]


def is_object_one_of_types(
    obj: object, fully_qualified_types_names: Collection[str]
) -> bool:
    """
    Returns `True` if the given object's class (or the object itself, if it's a class) has one of the
    fully qualified names in its MRO.
    """
    for type_name in get_object_types_mro_as_strings(obj):
        if type_name in fully_qualified_types_names:
            return True
    return False
python3.12/site-packages/pip/_vendor/rich/spinner.py000064400000010363151732701660016325 0ustar00from typing import cast, List, Optional, TYPE_CHECKING, Union

from ._spinners import SPINNERS
from .measure import Measurement
from .table import Table
from .text import Text

if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderResult, RenderableType
    from .style import StyleType


class Spinner:
    """A spinner animation.

    Args:
        name (str): Name of spinner (run python -m rich.spinner).
        text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
        style (StyleType, optional): Style for spinner animation. Defaults to None.
        speed (float, optional): Speed factor for animation. Defaults to 1.0.

    Raises:
        KeyError: If name isn't one of the supported spinner animations.
    """

    def __init__(
        self,
        name: str,
        text: "RenderableType" = "",
        *,
        style: Optional["StyleType"] = None,
        speed: float = 1.0,
    ) -> None:
        try:
            spinner = SPINNERS[name]
        except KeyError:
            raise KeyError(f"no spinner called {name!r}")
        self.text: "Union[RenderableType, Text]" = (
            Text.from_markup(text) if isinstance(text, str) else text
        )
        self.frames = cast(List[str], spinner["frames"])[:]
        self.interval = cast(float, spinner["interval"])
        self.start_time: Optional[float] = None
        self.style = style
        self.speed = speed
        self.frame_no_offset: float = 0.0
        self._update_speed = 0.0

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        yield self.render(console.get_time())

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> Measurement:
        text = self.render(0)
        return Measurement.get(console, options, text)

    def render(self, time: float) -> "RenderableType":
        """Render the spinner for a given time.

        Args:
            time (float): Time in seconds.

        Returns:
            RenderableType: A renderable containing animation frame.
        """
        if self.start_time is None:
            self.start_time = time

        frame_no = ((time - self.start_time) * self.speed) / (
            self.interval / 1000.0
        ) + self.frame_no_offset
        frame = Text(
            self.frames[int(frame_no) % len(self.frames)], style=self.style or ""
        )

        if self._update_speed:
            self.frame_no_offset = frame_no
            self.start_time = time
            self.speed = self._update_speed
            self._update_speed = 0.0

        if not self.text:
            return frame
        elif isinstance(self.text, (str, Text)):
            return Text.assemble(frame, " ", self.text)
        else:
            table = Table.grid(padding=1)
            table.add_row(frame, self.text)
            return table

    def update(
        self,
        *,
        text: "RenderableType" = "",
        style: Optional["StyleType"] = None,
        speed: Optional[float] = None,
    ) -> None:
        """Updates attributes of a spinner after it has been started.

        Args:
            text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
            style (StyleType, optional): Style for spinner animation. Defaults to None.
            speed (float, optional): Speed factor for animation. Defaults to None.
        """
        if text:
            self.text = Text.from_markup(text) if isinstance(text, str) else text
        if style:
            self.style = style
        if speed:
            self._update_speed = speed


if __name__ == "__main__":  # pragma: no cover
    from time import sleep

    from .columns import Columns
    from .panel import Panel
    from .live import Live

    all_spinners = Columns(
        [
            Spinner(spinner_name, text=Text(repr(spinner_name), style="green"))
            for spinner_name in sorted(SPINNERS.keys())
        ],
        column_first=True,
        expand=True,
    )

    with Live(
        Panel(all_spinners, title="Spinners", border_style="blue"),
        refresh_per_second=20,
    ) as live:
        while True:
            sleep(0.1)
python3.12/site-packages/pip/_vendor/rich/markup.py000064400000020006151732701660016141 0ustar00import re
from ast import literal_eval
from operator import attrgetter
from typing import Callable, Iterable, List, Match, NamedTuple, Optional, Tuple, Union

from ._emoji_replace import _emoji_replace
from .emoji import EmojiVariant
from .errors import MarkupError
from .style import Style
from .text import Span, Text

RE_TAGS = re.compile(
    r"""((\\*)\[([a-z#/@][^[]*?)])""",
    re.VERBOSE,
)

RE_HANDLER = re.compile(r"^([\w.]*?)(\(.*?\))?$")


class Tag(NamedTuple):
    """A tag in console markup."""

    name: str
    """The tag name. e.g. 'bold'."""
    parameters: Optional[str]
    """Any additional parameters after the name."""

    def __str__(self) -> str:
        return (
            self.name if self.parameters is None else f"{self.name} {self.parameters}"
        )

    @property
    def markup(self) -> str:
        """Get the string representation of this tag."""
        return (
            f"[{self.name}]"
            if self.parameters is None
            else f"[{self.name}={self.parameters}]"
        )


_ReStringMatch = Match[str]  # regex match object
_ReSubCallable = Callable[[_ReStringMatch], str]  # Callable invoked by re.sub
_EscapeSubMethod = Callable[[_ReSubCallable, str], str]  # Sub method of a compiled re


def escape(
    markup: str,
    _escape: _EscapeSubMethod = re.compile(r"(\\*)(\[[a-z#/@][^[]*?])").sub,
) -> str:
    """Escapes text so that it won't be interpreted as markup.

    Args:
        markup (str): Content to be inserted in to markup.

    Returns:
        str: Markup with square brackets escaped.
    """

    def escape_backslashes(match: Match[str]) -> str:
        """Called by re.sub replace matches."""
        backslashes, text = match.groups()
        return f"{backslashes}{backslashes}\\{text}"

    markup = _escape(escape_backslashes, markup)
    return markup


def _parse(markup: str) -> Iterable[Tuple[int, Optional[str], Optional[Tag]]]:
    """Parse markup in to an iterable of tuples of (position, text, tag).

    Args:
        markup (str): A string containing console markup

    """
    position = 0
    _divmod = divmod
    _Tag = Tag
    for match in RE_TAGS.finditer(markup):
        full_text, escapes, tag_text = match.groups()
        start, end = match.span()
        if start > position:
            yield start, markup[position:start], None
        if escapes:
            backslashes, escaped = _divmod(len(escapes), 2)
            if backslashes:
                # Literal backslashes
                yield start, "\\" * backslashes, None
                start += backslashes * 2
            if escaped:
                # Escape of tag
                yield start, full_text[len(escapes) :], None
                position = end
                continue
        text, equals, parameters = tag_text.partition("=")
        yield start, None, _Tag(text, parameters if equals else None)
        position = end
    if position < len(markup):
        yield position, markup[position:], None


def render(
    markup: str,
    style: Union[str, Style] = "",
    emoji: bool = True,
    emoji_variant: Optional[EmojiVariant] = None,
) -> Text:
    """Render console markup in to a Text instance.

    Args:
        markup (str): A string containing console markup.
        emoji (bool, optional): Also render emoji code. Defaults to True.

    Raises:
        MarkupError: If there is a syntax error in the markup.

    Returns:
        Text: A test instance.
    """
    emoji_replace = _emoji_replace
    if "[" not in markup:
        return Text(
            emoji_replace(markup, default_variant=emoji_variant) if emoji else markup,
            style=style,
        )
    text = Text(style=style)
    append = text.append
    normalize = Style.normalize

    style_stack: List[Tuple[int, Tag]] = []
    pop = style_stack.pop

    spans: List[Span] = []
    append_span = spans.append

    _Span = Span
    _Tag = Tag

    def pop_style(style_name: str) -> Tuple[int, Tag]:
        """Pop tag matching given style name."""
        for index, (_, tag) in enumerate(reversed(style_stack), 1):
            if tag.name == style_name:
                return pop(-index)
        raise KeyError(style_name)

    for position, plain_text, tag in _parse(markup):
        if plain_text is not None:
            # Handle open brace escapes, where the brace is not part of a tag.
            plain_text = plain_text.replace("\\[", "[")
            append(emoji_replace(plain_text) if emoji else plain_text)
        elif tag is not None:
            if tag.name.startswith("/"):  # Closing tag
                style_name = tag.name[1:].strip()

                if style_name:  # explicit close
                    style_name = normalize(style_name)
                    try:
                        start, open_tag = pop_style(style_name)
                    except KeyError:
                        raise MarkupError(
                            f"closing tag '{tag.markup}' at position {position} doesn't match any open tag"
                        ) from None
                else:  # implicit close
                    try:
                        start, open_tag = pop()
                    except IndexError:
                        raise MarkupError(
                            f"closing tag '[/]' at position {position} has nothing to close"
                        ) from None

                if open_tag.name.startswith("@"):
                    if open_tag.parameters:
                        handler_name = ""
                        parameters = open_tag.parameters.strip()
                        handler_match = RE_HANDLER.match(parameters)
                        if handler_match is not None:
                            handler_name, match_parameters = handler_match.groups()
                            parameters = (
                                "()" if match_parameters is None else match_parameters
                            )

                        try:
                            meta_params = literal_eval(parameters)
                        except SyntaxError as error:
                            raise MarkupError(
                                f"error parsing {parameters!r} in {open_tag.parameters!r}; {error.msg}"
                            )
                        except Exception as error:
                            raise MarkupError(
                                f"error parsing {open_tag.parameters!r}; {error}"
                            ) from None

                        if handler_name:
                            meta_params = (
                                handler_name,
                                meta_params
                                if isinstance(meta_params, tuple)
                                else (meta_params,),
                            )

                    else:
                        meta_params = ()

                    append_span(
                        _Span(
                            start, len(text), Style(meta={open_tag.name: meta_params})
                        )
                    )
                else:
                    append_span(_Span(start, len(text), str(open_tag)))

            else:  # Opening tag
                normalized_tag = _Tag(normalize(tag.name), tag.parameters)
                style_stack.append((len(text), normalized_tag))

    text_length = len(text)
    while style_stack:
        start, tag = style_stack.pop()
        style = str(tag)
        if style:
            append_span(_Span(start, text_length, style))

    text.spans = sorted(spans[::-1], key=attrgetter("start"))
    return text


if __name__ == "__main__":  # pragma: no cover

    MARKUP = [
        "[red]Hello World[/red]",
        "[magenta]Hello [b]World[/b]",
        "[bold]Bold[italic] bold and italic [/bold]italic[/italic]",
        "Click [link=https://www.willmcgugan.com]here[/link] to visit my Blog",
        ":warning-emoji: [bold red blink] DANGER![/]",
    ]

    from pip._vendor.rich import print
    from pip._vendor.rich.table import Table

    grid = Table("Markup", "Result", padding=(0, 1))

    for markup in MARKUP:
        grid.add_row(Text(markup), markup)

    print(grid)
python3.12/site-packages/pip/_vendor/rich/jupyter.py000064400000006264151732701670016357 0ustar00from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Sequence

if TYPE_CHECKING:
    from pip._vendor.rich.console import ConsoleRenderable

from . import get_console
from .segment import Segment
from .terminal_theme import DEFAULT_TERMINAL_THEME

if TYPE_CHECKING:
    from pip._vendor.rich.console import ConsoleRenderable

JUPYTER_HTML_FORMAT = """\
<pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace">{code}</pre>
"""


class JupyterRenderable:
    """A shim to write html to Jupyter notebook."""

    def __init__(self, html: str, text: str) -> None:
        self.html = html
        self.text = text

    def _repr_mimebundle_(
        self, include: Sequence[str], exclude: Sequence[str], **kwargs: Any
    ) -> Dict[str, str]:
        data = {"text/plain": self.text, "text/html": self.html}
        if include:
            data = {k: v for (k, v) in data.items() if k in include}
        if exclude:
            data = {k: v for (k, v) in data.items() if k not in exclude}
        return data


class JupyterMixin:
    """Add to an Rich renderable to make it render in Jupyter notebook."""

    __slots__ = ()

    def _repr_mimebundle_(
        self: "ConsoleRenderable",
        include: Sequence[str],
        exclude: Sequence[str],
        **kwargs: Any,
    ) -> Dict[str, str]:
        console = get_console()
        segments = list(console.render(self, console.options))
        html = _render_segments(segments)
        text = console._render_buffer(segments)
        data = {"text/plain": text, "text/html": html}
        if include:
            data = {k: v for (k, v) in data.items() if k in include}
        if exclude:
            data = {k: v for (k, v) in data.items() if k not in exclude}
        return data


def _render_segments(segments: Iterable[Segment]) -> str:
    def escape(text: str) -> str:
        """Escape html."""
        return text.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")

    fragments: List[str] = []
    append_fragment = fragments.append
    theme = DEFAULT_TERMINAL_THEME
    for text, style, control in Segment.simplify(segments):
        if control:
            continue
        text = escape(text)
        if style:
            rule = style.get_html_style(theme)
            text = f'<span style="{rule}">{text}</span>' if rule else text
            if style.link:
                text = f'<a href="{style.link}" target="_blank">{text}</a>'
        append_fragment(text)

    code = "".join(fragments)
    html = JUPYTER_HTML_FORMAT.format(code=code)

    return html


def display(segments: Iterable[Segment], text: str) -> None:
    """Render segments to Jupyter."""
    html = _render_segments(segments)
    jupyter_renderable = JupyterRenderable(html, text)
    try:
        from IPython.display import display as ipython_display

        ipython_display(jupyter_renderable)
    except ModuleNotFoundError:
        # Handle the case where the Console has force_jupyter=True,
        # but IPython is not installed.
        pass


def print(*args: Any, **kwargs: Any) -> None:
    """Proxy for Console print."""
    console = get_console()
    return console.print(*args, **kwargs)
python3.12/site-packages/pip/_vendor/rich/filesize.py000064400000004714151732701670016465 0ustar00# coding: utf-8
"""Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2

The functions declared in this module should cover the different
use cases needed to generate a string representation of a file size
using several different units. Since there are many standards regarding
file size units, three different functions have been implemented.

See Also:
    * `Wikipedia: Binary prefix <https://en.wikipedia.org/wiki/Binary_prefix>`_

"""

__all__ = ["decimal"]

from typing import Iterable, List, Optional, Tuple


def _to_str(
    size: int,
    suffixes: Iterable[str],
    base: int,
    *,
    precision: Optional[int] = 1,
    separator: Optional[str] = " ",
) -> str:
    if size == 1:
        return "1 byte"
    elif size < base:
        return "{:,} bytes".format(size)

    for i, suffix in enumerate(suffixes, 2):  # noqa: B007
        unit = base**i
        if size < unit:
            break
    return "{:,.{precision}f}{separator}{}".format(
        (base * size / unit),
        suffix,
        precision=precision,
        separator=separator,
    )


def pick_unit_and_suffix(size: int, suffixes: List[str], base: int) -> Tuple[int, str]:
    """Pick a suffix and base for the given size."""
    for i, suffix in enumerate(suffixes):
        unit = base**i
        if size < unit * base:
            break
    return unit, suffix


def decimal(
    size: int,
    *,
    precision: Optional[int] = 1,
    separator: Optional[str] = " ",
) -> str:
    """Convert a filesize in to a string (powers of 1000, SI prefixes).

    In this convention, ``1000 B = 1 kB``.

    This is typically the format used to advertise the storage
    capacity of USB flash drives and the like (*256 MB* meaning
    actually a storage capacity of more than *256 000 000 B*),
    or used by **Mac OS X** since v10.6 to report file sizes.

    Arguments:
        int (size): A file size.
        int (precision): The number of decimal places to include (default = 1).
        str (separator): The string to separate the value from the units (default = " ").

    Returns:
        `str`: A string containing a abbreviated file size and units.

    Example:
        >>> filesize.decimal(30000)
        '30.0 kB'
        >>> filesize.decimal(30000, precision=2, separator="")
        '30.00kB'

    """
    return _to_str(
        size,
        ("kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"),
        1000,
        precision=precision,
        separator=separator,
    )
python3.12/site-packages/pip/_vendor/rich/console.py000064400000301622151732701670016313 0ustar00import inspect
import os
import platform
import sys
import threading
import zlib
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from datetime import datetime
from functools import wraps
from getpass import getpass
from html import escape
from inspect import isclass
from itertools import islice
from math import ceil
from time import monotonic
from types import FrameType, ModuleType, TracebackType
from typing import (
    IO,
    TYPE_CHECKING,
    Any,
    Callable,
    Dict,
    Iterable,
    List,
    Mapping,
    NamedTuple,
    Optional,
    TextIO,
    Tuple,
    Type,
    Union,
    cast,
)

from pip._vendor.rich._null_file import NULL_FILE

if sys.version_info >= (3, 8):
    from typing import Literal, Protocol, runtime_checkable
else:
    from pip._vendor.typing_extensions import (
        Literal,
        Protocol,
        runtime_checkable,
    )  # pragma: no cover

from . import errors, themes
from ._emoji_replace import _emoji_replace
from ._export_format import CONSOLE_HTML_FORMAT, CONSOLE_SVG_FORMAT
from ._fileno import get_fileno
from ._log_render import FormatTimeCallable, LogRender
from .align import Align, AlignMethod
from .color import ColorSystem, blend_rgb
from .control import Control
from .emoji import EmojiVariant
from .highlighter import NullHighlighter, ReprHighlighter
from .markup import render as render_markup
from .measure import Measurement, measure_renderables
from .pager import Pager, SystemPager
from .pretty import Pretty, is_expandable
from .protocol import rich_cast
from .region import Region
from .scope import render_scope
from .screen import Screen
from .segment import Segment
from .style import Style, StyleType
from .styled import Styled
from .terminal_theme import DEFAULT_TERMINAL_THEME, SVG_EXPORT_THEME, TerminalTheme
from .text import Text, TextType
from .theme import Theme, ThemeStack

if TYPE_CHECKING:
    from ._windows import WindowsConsoleFeatures
    from .live import Live
    from .status import Status

JUPYTER_DEFAULT_COLUMNS = 115
JUPYTER_DEFAULT_LINES = 100
WINDOWS = platform.system() == "Windows"

HighlighterType = Callable[[Union[str, "Text"]], "Text"]
JustifyMethod = Literal["default", "left", "center", "right", "full"]
OverflowMethod = Literal["fold", "crop", "ellipsis", "ignore"]


class NoChange:
    pass


NO_CHANGE = NoChange()

try:
    _STDIN_FILENO = sys.__stdin__.fileno()
except Exception:
    _STDIN_FILENO = 0
try:
    _STDOUT_FILENO = sys.__stdout__.fileno()
except Exception:
    _STDOUT_FILENO = 1
try:
    _STDERR_FILENO = sys.__stderr__.fileno()
except Exception:
    _STDERR_FILENO = 2

_STD_STREAMS = (_STDIN_FILENO, _STDOUT_FILENO, _STDERR_FILENO)
_STD_STREAMS_OUTPUT = (_STDOUT_FILENO, _STDERR_FILENO)


_TERM_COLORS = {
    "kitty": ColorSystem.EIGHT_BIT,
    "256color": ColorSystem.EIGHT_BIT,
    "16color": ColorSystem.STANDARD,
}


class ConsoleDimensions(NamedTuple):
    """Size of the terminal."""

    width: int
    """The width of the console in 'cells'."""
    height: int
    """The height of the console in lines."""


@dataclass
class ConsoleOptions:
    """Options for __rich_console__ method."""

    size: ConsoleDimensions
    """Size of console."""
    legacy_windows: bool
    """legacy_windows: flag for legacy windows."""
    min_width: int
    """Minimum width of renderable."""
    max_width: int
    """Maximum width of renderable."""
    is_terminal: bool
    """True if the target is a terminal, otherwise False."""
    encoding: str
    """Encoding of terminal."""
    max_height: int
    """Height of container (starts as terminal)"""
    justify: Optional[JustifyMethod] = None
    """Justify value override for renderable."""
    overflow: Optional[OverflowMethod] = None
    """Overflow value override for renderable."""
    no_wrap: Optional[bool] = False
    """Disable wrapping for text."""
    highlight: Optional[bool] = None
    """Highlight override for render_str."""
    markup: Optional[bool] = None
    """Enable markup when rendering strings."""
    height: Optional[int] = None

    @property
    def ascii_only(self) -> bool:
        """Check if renderables should use ascii only."""
        return not self.encoding.startswith("utf")

    def copy(self) -> "ConsoleOptions":
        """Return a copy of the options.

        Returns:
            ConsoleOptions: a copy of self.
        """
        options: ConsoleOptions = ConsoleOptions.__new__(ConsoleOptions)
        options.__dict__ = self.__dict__.copy()
        return options

    def update(
        self,
        *,
        width: Union[int, NoChange] = NO_CHANGE,
        min_width: Union[int, NoChange] = NO_CHANGE,
        max_width: Union[int, NoChange] = NO_CHANGE,
        justify: Union[Optional[JustifyMethod], NoChange] = NO_CHANGE,
        overflow: Union[Optional[OverflowMethod], NoChange] = NO_CHANGE,
        no_wrap: Union[Optional[bool], NoChange] = NO_CHANGE,
        highlight: Union[Optional[bool], NoChange] = NO_CHANGE,
        markup: Union[Optional[bool], NoChange] = NO_CHANGE,
        height: Union[Optional[int], NoChange] = NO_CHANGE,
    ) -> "ConsoleOptions":
        """Update values, return a copy."""
        options = self.copy()
        if not isinstance(width, NoChange):
            options.min_width = options.max_width = max(0, width)
        if not isinstance(min_width, NoChange):
            options.min_width = min_width
        if not isinstance(max_width, NoChange):
            options.max_width = max_width
        if not isinstance(justify, NoChange):
            options.justify = justify
        if not isinstance(overflow, NoChange):
            options.overflow = overflow
        if not isinstance(no_wrap, NoChange):
            options.no_wrap = no_wrap
        if not isinstance(highlight, NoChange):
            options.highlight = highlight
        if not isinstance(markup, NoChange):
            options.markup = markup
        if not isinstance(height, NoChange):
            if height is not None:
                options.max_height = height
            options.height = None if height is None else max(0, height)
        return options

    def update_width(self, width: int) -> "ConsoleOptions":
        """Update just the width, return a copy.

        Args:
            width (int): New width (sets both min_width and max_width)

        Returns:
            ~ConsoleOptions: New console options instance.
        """
        options = self.copy()
        options.min_width = options.max_width = max(0, width)
        return options

    def update_height(self, height: int) -> "ConsoleOptions":
        """Update the height, and return a copy.

        Args:
            height (int): New height

        Returns:
            ~ConsoleOptions: New Console options instance.
        """
        options = self.copy()
        options.max_height = options.height = height
        return options

    def reset_height(self) -> "ConsoleOptions":
        """Return a copy of the options with height set to ``None``.

        Returns:
            ~ConsoleOptions: New console options instance.
        """
        options = self.copy()
        options.height = None
        return options

    def update_dimensions(self, width: int, height: int) -> "ConsoleOptions":
        """Update the width and height, and return a copy.

        Args:
            width (int): New width (sets both min_width and max_width).
            height (int): New height.

        Returns:
            ~ConsoleOptions: New console options instance.
        """
        options = self.copy()
        options.min_width = options.max_width = max(0, width)
        options.height = options.max_height = height
        return options


@runtime_checkable
class RichCast(Protocol):
    """An object that may be 'cast' to a console renderable."""

    def __rich__(
        self,
    ) -> Union["ConsoleRenderable", "RichCast", str]:  # pragma: no cover
        ...


@runtime_checkable
class ConsoleRenderable(Protocol):
    """An object that supports the console protocol."""

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":  # pragma: no cover
        ...


# A type that may be rendered by Console.
RenderableType = Union[ConsoleRenderable, RichCast, str]

# The result of calling a __rich_console__ method.
RenderResult = Iterable[Union[RenderableType, Segment]]

_null_highlighter = NullHighlighter()


class CaptureError(Exception):
    """An error in the Capture context manager."""


class NewLine:
    """A renderable to generate new line(s)"""

    def __init__(self, count: int = 1) -> None:
        self.count = count

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> Iterable[Segment]:
        yield Segment("\n" * self.count)


class ScreenUpdate:
    """Render a list of lines at a given offset."""

    def __init__(self, lines: List[List[Segment]], x: int, y: int) -> None:
        self._lines = lines
        self.x = x
        self.y = y

    def __rich_console__(
        self, console: "Console", options: ConsoleOptions
    ) -> RenderResult:
        x = self.x
        move_to = Control.move_to
        for offset, line in enumerate(self._lines, self.y):
            yield move_to(x, offset)
            yield from line


class Capture:
    """Context manager to capture the result of printing to the console.
    See :meth:`~rich.console.Console.capture` for how to use.

    Args:
        console (Console): A console instance to capture output.
    """

    def __init__(self, console: "Console") -> None:
        self._console = console
        self._result: Optional[str] = None

    def __enter__(self) -> "Capture":
        self._console.begin_capture()
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self._result = self._console.end_capture()

    def get(self) -> str:
        """Get the result of the capture."""
        if self._result is None:
            raise CaptureError(
                "Capture result is not available until context manager exits."
            )
        return self._result


class ThemeContext:
    """A context manager to use a temporary theme. See :meth:`~rich.console.Console.use_theme` for usage."""

    def __init__(self, console: "Console", theme: Theme, inherit: bool = True) -> None:
        self.console = console
        self.theme = theme
        self.inherit = inherit

    def __enter__(self) -> "ThemeContext":
        self.console.push_theme(self.theme)
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self.console.pop_theme()


class PagerContext:
    """A context manager that 'pages' content. See :meth:`~rich.console.Console.pager` for usage."""

    def __init__(
        self,
        console: "Console",
        pager: Optional[Pager] = None,
        styles: bool = False,
        links: bool = False,
    ) -> None:
        self._console = console
        self.pager = SystemPager() if pager is None else pager
        self.styles = styles
        self.links = links

    def __enter__(self) -> "PagerContext":
        self._console._enter_buffer()
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        if exc_type is None:
            with self._console._lock:
                buffer: List[Segment] = self._console._buffer[:]
                del self._console._buffer[:]
                segments: Iterable[Segment] = buffer
                if not self.styles:
                    segments = Segment.strip_styles(segments)
                elif not self.links:
                    segments = Segment.strip_links(segments)
                content = self._console._render_buffer(segments)
            self.pager.show(content)
        self._console._exit_buffer()


class ScreenContext:
    """A context manager that enables an alternative screen. See :meth:`~rich.console.Console.screen` for usage."""

    def __init__(
        self, console: "Console", hide_cursor: bool, style: StyleType = ""
    ) -> None:
        self.console = console
        self.hide_cursor = hide_cursor
        self.screen = Screen(style=style)
        self._changed = False

    def update(
        self, *renderables: RenderableType, style: Optional[StyleType] = None
    ) -> None:
        """Update the screen.

        Args:
            renderable (RenderableType, optional): Optional renderable to replace current renderable,
                or None for no change. Defaults to None.
            style: (Style, optional): Replacement style, or None for no change. Defaults to None.
        """
        if renderables:
            self.screen.renderable = (
                Group(*renderables) if len(renderables) > 1 else renderables[0]
            )
        if style is not None:
            self.screen.style = style
        self.console.print(self.screen, end="")

    def __enter__(self) -> "ScreenContext":
        self._changed = self.console.set_alt_screen(True)
        if self._changed and self.hide_cursor:
            self.console.show_cursor(False)
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        if self._changed:
            self.console.set_alt_screen(False)
            if self.hide_cursor:
                self.console.show_cursor(True)


class Group:
    """Takes a group of renderables and returns a renderable object that renders the group.

    Args:
        renderables (Iterable[RenderableType]): An iterable of renderable objects.
        fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.
    """

    def __init__(self, *renderables: "RenderableType", fit: bool = True) -> None:
        self._renderables = renderables
        self.fit = fit
        self._render: Optional[List[RenderableType]] = None

    @property
    def renderables(self) -> List["RenderableType"]:
        if self._render is None:
            self._render = list(self._renderables)
        return self._render

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "Measurement":
        if self.fit:
            return measure_renderables(console, options, self.renderables)
        else:
            return Measurement(options.max_width, options.max_width)

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> RenderResult:
        yield from self.renderables


def group(fit: bool = True) -> Callable[..., Callable[..., Group]]:
    """A decorator that turns an iterable of renderables in to a group.

    Args:
        fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.
    """

    def decorator(
        method: Callable[..., Iterable[RenderableType]]
    ) -> Callable[..., Group]:
        """Convert a method that returns an iterable of renderables in to a Group."""

        @wraps(method)
        def _replace(*args: Any, **kwargs: Any) -> Group:
            renderables = method(*args, **kwargs)
            return Group(*renderables, fit=fit)

        return _replace

    return decorator


def _is_jupyter() -> bool:  # pragma: no cover
    """Check if we're running in a Jupyter notebook."""
    try:
        get_ipython  # type: ignore[name-defined]
    except NameError:
        return False
    ipython = get_ipython()  # type: ignore[name-defined]
    shell = ipython.__class__.__name__
    if (
        "google.colab" in str(ipython.__class__)
        or os.getenv("DATABRICKS_RUNTIME_VERSION")
        or shell == "ZMQInteractiveShell"
    ):
        return True  # Jupyter notebook or qtconsole
    elif shell == "TerminalInteractiveShell":
        return False  # Terminal running IPython
    else:
        return False  # Other type (?)


COLOR_SYSTEMS = {
    "standard": ColorSystem.STANDARD,
    "256": ColorSystem.EIGHT_BIT,
    "truecolor": ColorSystem.TRUECOLOR,
    "windows": ColorSystem.WINDOWS,
}

_COLOR_SYSTEMS_NAMES = {system: name for name, system in COLOR_SYSTEMS.items()}


@dataclass
class ConsoleThreadLocals(threading.local):
    """Thread local values for Console context."""

    theme_stack: ThemeStack
    buffer: List[Segment] = field(default_factory=list)
    buffer_index: int = 0


class RenderHook(ABC):
    """Provides hooks in to the render process."""

    @abstractmethod
    def process_renderables(
        self, renderables: List[ConsoleRenderable]
    ) -> List[ConsoleRenderable]:
        """Called with a list of objects to render.

        This method can return a new list of renderables, or modify and return the same list.

        Args:
            renderables (List[ConsoleRenderable]): A number of renderable objects.

        Returns:
            List[ConsoleRenderable]: A replacement list of renderables.
        """


_windows_console_features: Optional["WindowsConsoleFeatures"] = None


def get_windows_console_features() -> "WindowsConsoleFeatures":  # pragma: no cover
    global _windows_console_features
    if _windows_console_features is not None:
        return _windows_console_features
    from ._windows import get_windows_console_features

    _windows_console_features = get_windows_console_features()
    return _windows_console_features


def detect_legacy_windows() -> bool:
    """Detect legacy Windows."""
    return WINDOWS and not get_windows_console_features().vt


class Console:
    """A high level console interface.

    Args:
        color_system (str, optional): The color system supported by your terminal,
            either ``"standard"``, ``"256"`` or ``"truecolor"``. Leave as ``"auto"`` to autodetect.
        force_terminal (Optional[bool], optional): Enable/disable terminal control codes, or None to auto-detect terminal. Defaults to None.
        force_jupyter (Optional[bool], optional): Enable/disable Jupyter rendering, or None to auto-detect Jupyter. Defaults to None.
        force_interactive (Optional[bool], optional): Enable/disable interactive mode, or None to auto detect. Defaults to None.
        soft_wrap (Optional[bool], optional): Set soft wrap default on print method. Defaults to False.
        theme (Theme, optional): An optional style theme object, or ``None`` for default theme.
        stderr (bool, optional): Use stderr rather than stdout if ``file`` is not specified. Defaults to False.
        file (IO, optional): A file object where the console should write to. Defaults to stdout.
        quiet (bool, Optional): Boolean to suppress all output. Defaults to False.
        width (int, optional): The width of the terminal. Leave as default to auto-detect width.
        height (int, optional): The height of the terminal. Leave as default to auto-detect height.
        style (StyleType, optional): Style to apply to all output, or None for no style. Defaults to None.
        no_color (Optional[bool], optional): Enabled no color mode, or None to auto detect. Defaults to None.
        tab_size (int, optional): Number of spaces used to replace a tab character. Defaults to 8.
        record (bool, optional): Boolean to enable recording of terminal output,
            required to call :meth:`export_html`, :meth:`export_svg`, and :meth:`export_text`. Defaults to False.
        markup (bool, optional): Boolean to enable :ref:`console_markup`. Defaults to True.
        emoji (bool, optional): Enable emoji code. Defaults to True.
        emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.
        highlight (bool, optional): Enable automatic highlighting. Defaults to True.
        log_time (bool, optional): Boolean to enable logging of time by :meth:`log` methods. Defaults to True.
        log_path (bool, optional): Boolean to enable the logging of the caller by :meth:`log`. Defaults to True.
        log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%X] ".
        highlighter (HighlighterType, optional): Default highlighter.
        legacy_windows (bool, optional): Enable legacy Windows mode, or ``None`` to auto detect. Defaults to ``None``.
        safe_box (bool, optional): Restrict box options that don't render on legacy Windows.
        get_datetime (Callable[[], datetime], optional): Callable that gets the current time as a datetime.datetime object (used by Console.log),
            or None for datetime.now.
        get_time (Callable[[], time], optional): Callable that gets the current time in seconds, default uses time.monotonic.
    """

    _environ: Mapping[str, str] = os.environ

    def __init__(
        self,
        *,
        color_system: Optional[
            Literal["auto", "standard", "256", "truecolor", "windows"]
        ] = "auto",
        force_terminal: Optional[bool] = None,
        force_jupyter: Optional[bool] = None,
        force_interactive: Optional[bool] = None,
        soft_wrap: bool = False,
        theme: Optional[Theme] = None,
        stderr: bool = False,
        file: Optional[IO[str]] = None,
        quiet: bool = False,
        width: Optional[int] = None,
        height: Optional[int] = None,
        style: Optional[StyleType] = None,
        no_color: Optional[bool] = None,
        tab_size: int = 8,
        record: bool = False,
        markup: bool = True,
        emoji: bool = True,
        emoji_variant: Optional[EmojiVariant] = None,
        highlight: bool = True,
        log_time: bool = True,
        log_path: bool = True,
        log_time_format: Union[str, FormatTimeCallable] = "[%X]",
        highlighter: Optional["HighlighterType"] = ReprHighlighter(),
        legacy_windows: Optional[bool] = None,
        safe_box: bool = True,
        get_datetime: Optional[Callable[[], datetime]] = None,
        get_time: Optional[Callable[[], float]] = None,
        _environ: Optional[Mapping[str, str]] = None,
    ):
        # Copy of os.environ allows us to replace it for testing
        if _environ is not None:
            self._environ = _environ

        self.is_jupyter = _is_jupyter() if force_jupyter is None else force_jupyter
        if self.is_jupyter:
            if width is None:
                jupyter_columns = self._environ.get("JUPYTER_COLUMNS")
                if jupyter_columns is not None and jupyter_columns.isdigit():
                    width = int(jupyter_columns)
                else:
                    width = JUPYTER_DEFAULT_COLUMNS
            if height is None:
                jupyter_lines = self._environ.get("JUPYTER_LINES")
                if jupyter_lines is not None and jupyter_lines.isdigit():
                    height = int(jupyter_lines)
                else:
                    height = JUPYTER_DEFAULT_LINES

        self.tab_size = tab_size
        self.record = record
        self._markup = markup
        self._emoji = emoji
        self._emoji_variant: Optional[EmojiVariant] = emoji_variant
        self._highlight = highlight
        self.legacy_windows: bool = (
            (detect_legacy_windows() and not self.is_jupyter)
            if legacy_windows is None
            else legacy_windows
        )

        if width is None:
            columns = self._environ.get("COLUMNS")
            if columns is not None and columns.isdigit():
                width = int(columns) - self.legacy_windows
        if height is None:
            lines = self._environ.get("LINES")
            if lines is not None and lines.isdigit():
                height = int(lines)

        self.soft_wrap = soft_wrap
        self._width = width
        self._height = height

        self._color_system: Optional[ColorSystem]

        self._force_terminal = None
        if force_terminal is not None:
            self._force_terminal = force_terminal

        self._file = file
        self.quiet = quiet
        self.stderr = stderr

        if color_system is None:
            self._color_system = None
        elif color_system == "auto":
            self._color_system = self._detect_color_system()
        else:
            self._color_system = COLOR_SYSTEMS[color_system]

        self._lock = threading.RLock()
        self._log_render = LogRender(
            show_time=log_time,
            show_path=log_path,
            time_format=log_time_format,
        )
        self.highlighter: HighlighterType = highlighter or _null_highlighter
        self.safe_box = safe_box
        self.get_datetime = get_datetime or datetime.now
        self.get_time = get_time or monotonic
        self.style = style
        self.no_color = (
            no_color if no_color is not None else "NO_COLOR" in self._environ
        )
        self.is_interactive = (
            (self.is_terminal and not self.is_dumb_terminal)
            if force_interactive is None
            else force_interactive
        )

        self._record_buffer_lock = threading.RLock()
        self._thread_locals = ConsoleThreadLocals(
            theme_stack=ThemeStack(themes.DEFAULT if theme is None else theme)
        )
        self._record_buffer: List[Segment] = []
        self._render_hooks: List[RenderHook] = []
        self._live: Optional["Live"] = None
        self._is_alt_screen = False

    def __repr__(self) -> str:
        return f"<console width={self.width} {self._color_system!s}>"

    @property
    def file(self) -> IO[str]:
        """Get the file object to write to."""
        file = self._file or (sys.stderr if self.stderr else sys.stdout)
        file = getattr(file, "rich_proxied_file", file)
        if file is None:
            file = NULL_FILE
        return file

    @file.setter
    def file(self, new_file: IO[str]) -> None:
        """Set a new file object."""
        self._file = new_file

    @property
    def _buffer(self) -> List[Segment]:
        """Get a thread local buffer."""
        return self._thread_locals.buffer

    @property
    def _buffer_index(self) -> int:
        """Get a thread local buffer."""
        return self._thread_locals.buffer_index

    @_buffer_index.setter
    def _buffer_index(self, value: int) -> None:
        self._thread_locals.buffer_index = value

    @property
    def _theme_stack(self) -> ThemeStack:
        """Get the thread local theme stack."""
        return self._thread_locals.theme_stack

    def _detect_color_system(self) -> Optional[ColorSystem]:
        """Detect color system from env vars."""
        if self.is_jupyter:
            return ColorSystem.TRUECOLOR
        if not self.is_terminal or self.is_dumb_terminal:
            return None
        if WINDOWS:  # pragma: no cover
            if self.legacy_windows:  # pragma: no cover
                return ColorSystem.WINDOWS
            windows_console_features = get_windows_console_features()
            return (
                ColorSystem.TRUECOLOR
                if windows_console_features.truecolor
                else ColorSystem.EIGHT_BIT
            )
        else:
            color_term = self._environ.get("COLORTERM", "").strip().lower()
            if color_term in ("truecolor", "24bit"):
                return ColorSystem.TRUECOLOR
            term = self._environ.get("TERM", "").strip().lower()
            _term_name, _hyphen, colors = term.rpartition("-")
            color_system = _TERM_COLORS.get(colors, ColorSystem.STANDARD)
            return color_system

    def _enter_buffer(self) -> None:
        """Enter in to a buffer context, and buffer all output."""
        self._buffer_index += 1

    def _exit_buffer(self) -> None:
        """Leave buffer context, and render content if required."""
        self._buffer_index -= 1
        self._check_buffer()

    def set_live(self, live: "Live") -> None:
        """Set Live instance. Used by Live context manager.

        Args:
            live (Live): Live instance using this Console.

        Raises:
            errors.LiveError: If this Console has a Live context currently active.
        """
        with self._lock:
            if self._live is not None:
                raise errors.LiveError("Only one live display may be active at once")
            self._live = live

    def clear_live(self) -> None:
        """Clear the Live instance."""
        with self._lock:
            self._live = None

    def push_render_hook(self, hook: RenderHook) -> None:
        """Add a new render hook to the stack.

        Args:
            hook (RenderHook): Render hook instance.
        """
        with self._lock:
            self._render_hooks.append(hook)

    def pop_render_hook(self) -> None:
        """Pop the last renderhook from the stack."""
        with self._lock:
            self._render_hooks.pop()

    def __enter__(self) -> "Console":
        """Own context manager to enter buffer context."""
        self._enter_buffer()
        return self

    def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
        """Exit buffer context."""
        self._exit_buffer()

    def begin_capture(self) -> None:
        """Begin capturing console output. Call :meth:`end_capture` to exit capture mode and return output."""
        self._enter_buffer()

    def end_capture(self) -> str:
        """End capture mode and return captured string.

        Returns:
            str: Console output.
        """
        render_result = self._render_buffer(self._buffer)
        del self._buffer[:]
        self._exit_buffer()
        return render_result

    def push_theme(self, theme: Theme, *, inherit: bool = True) -> None:
        """Push a new theme on to the top of the stack, replacing the styles from the previous theme.
        Generally speaking, you should call :meth:`~rich.console.Console.use_theme` to get a context manager, rather
        than calling this method directly.

        Args:
            theme (Theme): A theme instance.
            inherit (bool, optional): Inherit existing styles. Defaults to True.
        """
        self._theme_stack.push_theme(theme, inherit=inherit)

    def pop_theme(self) -> None:
        """Remove theme from top of stack, restoring previous theme."""
        self._theme_stack.pop_theme()

    def use_theme(self, theme: Theme, *, inherit: bool = True) -> ThemeContext:
        """Use a different theme for the duration of the context manager.

        Args:
            theme (Theme): Theme instance to user.
            inherit (bool, optional): Inherit existing console styles. Defaults to True.

        Returns:
            ThemeContext: [description]
        """
        return ThemeContext(self, theme, inherit)

    @property
    def color_system(self) -> Optional[str]:
        """Get color system string.

        Returns:
            Optional[str]: "standard", "256" or "truecolor".
        """

        if self._color_system is not None:
            return _COLOR_SYSTEMS_NAMES[self._color_system]
        else:
            return None

    @property
    def encoding(self) -> str:
        """Get the encoding of the console file, e.g. ``"utf-8"``.

        Returns:
            str: A standard encoding string.
        """
        return (getattr(self.file, "encoding", "utf-8") or "utf-8").lower()

    @property
    def is_terminal(self) -> bool:
        """Check if the console is writing to a terminal.

        Returns:
            bool: True if the console writing to a device capable of
            understanding terminal codes, otherwise False.
        """
        if self._force_terminal is not None:
            return self._force_terminal

        if hasattr(sys.stdin, "__module__") and sys.stdin.__module__.startswith(
            "idlelib"
        ):
            # Return False for Idle which claims to be a tty but can't handle ansi codes
            return False

        if self.is_jupyter:
            # return False for Jupyter, which may have FORCE_COLOR set
            return False

        # If FORCE_COLOR env var has any value at all, we assume a terminal.
        force_color = self._environ.get("FORCE_COLOR")
        if force_color is not None:
            self._force_terminal = True
            return True

        isatty: Optional[Callable[[], bool]] = getattr(self.file, "isatty", None)
        try:
            return False if isatty is None else isatty()
        except ValueError:
            # in some situation (at the end of a pytest run for example) isatty() can raise
            # ValueError: I/O operation on closed file
            # return False because we aren't in a terminal anymore
            return False

    @property
    def is_dumb_terminal(self) -> bool:
        """Detect dumb terminal.

        Returns:
            bool: True if writing to a dumb terminal, otherwise False.

        """
        _term = self._environ.get("TERM", "")
        is_dumb = _term.lower() in ("dumb", "unknown")
        return self.is_terminal and is_dumb

    @property
    def options(self) -> ConsoleOptions:
        """Get default console options."""
        return ConsoleOptions(
            max_height=self.size.height,
            size=self.size,
            legacy_windows=self.legacy_windows,
            min_width=1,
            max_width=self.width,
            encoding=self.encoding,
            is_terminal=self.is_terminal,
        )

    @property
    def size(self) -> ConsoleDimensions:
        """Get the size of the console.

        Returns:
            ConsoleDimensions: A named tuple containing the dimensions.
        """

        if self._width is not None and self._height is not None:
            return ConsoleDimensions(self._width - self.legacy_windows, self._height)

        if self.is_dumb_terminal:
            return ConsoleDimensions(80, 25)

        width: Optional[int] = None
        height: Optional[int] = None

        if WINDOWS:  # pragma: no cover
            try:
                width, height = os.get_terminal_size()
            except (AttributeError, ValueError, OSError):  # Probably not a terminal
                pass
        else:
            for file_descriptor in _STD_STREAMS:
                try:
                    width, height = os.get_terminal_size(file_descriptor)
                except (AttributeError, ValueError, OSError):
                    pass
                else:
                    break

        columns = self._environ.get("COLUMNS")
        if columns is not None and columns.isdigit():
            width = int(columns)
        lines = self._environ.get("LINES")
        if lines is not None and lines.isdigit():
            height = int(lines)

        # get_terminal_size can report 0, 0 if run from pseudo-terminal
        width = width or 80
        height = height or 25
        return ConsoleDimensions(
            width - self.legacy_windows if self._width is None else self._width,
            height if self._height is None else self._height,
        )

    @size.setter
    def size(self, new_size: Tuple[int, int]) -> None:
        """Set a new size for the terminal.

        Args:
            new_size (Tuple[int, int]): New width and height.
        """
        width, height = new_size
        self._width = width
        self._height = height

    @property
    def width(self) -> int:
        """Get the width of the console.

        Returns:
            int: The width (in characters) of the console.
        """
        return self.size.width

    @width.setter
    def width(self, width: int) -> None:
        """Set width.

        Args:
            width (int): New width.
        """
        self._width = width

    @property
    def height(self) -> int:
        """Get the height of the console.

        Returns:
            int: The height (in lines) of the console.
        """
        return self.size.height

    @height.setter
    def height(self, height: int) -> None:
        """Set height.

        Args:
            height (int): new height.
        """
        self._height = height

    def bell(self) -> None:
        """Play a 'bell' sound (if supported by the terminal)."""
        self.control(Control.bell())

    def capture(self) -> Capture:
        """A context manager to *capture* the result of print() or log() in a string,
        rather than writing it to the console.

        Example:
            >>> from rich.console import Console
            >>> console = Console()
            >>> with console.capture() as capture:
            ...     console.print("[bold magenta]Hello World[/]")
            >>> print(capture.get())

        Returns:
            Capture: Context manager with disables writing to the terminal.
        """
        capture = Capture(self)
        return capture

    def pager(
        self, pager: Optional[Pager] = None, styles: bool = False, links: bool = False
    ) -> PagerContext:
        """A context manager to display anything printed within a "pager". The pager application
        is defined by the system and will typically support at least pressing a key to scroll.

        Args:
            pager (Pager, optional): A pager object, or None to use :class:`~rich.pager.SystemPager`. Defaults to None.
            styles (bool, optional): Show styles in pager. Defaults to False.
            links (bool, optional): Show links in pager. Defaults to False.

        Example:
            >>> from rich.console import Console
            >>> from rich.__main__ import make_test_card
            >>> console = Console()
            >>> with console.pager():
                    console.print(make_test_card())

        Returns:
            PagerContext: A context manager.
        """
        return PagerContext(self, pager=pager, styles=styles, links=links)

    def line(self, count: int = 1) -> None:
        """Write new line(s).

        Args:
            count (int, optional): Number of new lines. Defaults to 1.
        """

        assert count >= 0, "count must be >= 0"
        self.print(NewLine(count))

    def clear(self, home: bool = True) -> None:
        """Clear the screen.

        Args:
            home (bool, optional): Also move the cursor to 'home' position. Defaults to True.
        """
        if home:
            self.control(Control.clear(), Control.home())
        else:
            self.control(Control.clear())

    def status(
        self,
        status: RenderableType,
        *,
        spinner: str = "dots",
        spinner_style: StyleType = "status.spinner",
        speed: float = 1.0,
        refresh_per_second: float = 12.5,
    ) -> "Status":
        """Display a status and spinner.

        Args:
            status (RenderableType): A status renderable (str or Text typically).
            spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
            spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
            speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
            refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.

        Returns:
            Status: A Status object that may be used as a context manager.
        """
        from .status import Status

        status_renderable = Status(
            status,
            console=self,
            spinner=spinner,
            spinner_style=spinner_style,
            speed=speed,
            refresh_per_second=refresh_per_second,
        )
        return status_renderable

    def show_cursor(self, show: bool = True) -> bool:
        """Show or hide the cursor.

        Args:
            show (bool, optional): Set visibility of the cursor.
        """
        if self.is_terminal:
            self.control(Control.show_cursor(show))
            return True
        return False

    def set_alt_screen(self, enable: bool = True) -> bool:
        """Enables alternative screen mode.

        Note, if you enable this mode, you should ensure that is disabled before
        the application exits. See :meth:`~rich.Console.screen` for a context manager
        that handles this for you.

        Args:
            enable (bool, optional): Enable (True) or disable (False) alternate screen. Defaults to True.

        Returns:
            bool: True if the control codes were written.

        """
        changed = False
        if self.is_terminal and not self.legacy_windows:
            self.control(Control.alt_screen(enable))
            changed = True
            self._is_alt_screen = enable
        return changed

    @property
    def is_alt_screen(self) -> bool:
        """Check if the alt screen was enabled.

        Returns:
            bool: True if the alt screen was enabled, otherwise False.
        """
        return self._is_alt_screen

    def set_window_title(self, title: str) -> bool:
        """Set the title of the console terminal window.

        Warning: There is no means within Rich of "resetting" the window title to its
        previous value, meaning the title you set will persist even after your application
        exits.

        ``fish`` shell resets the window title before and after each command by default,
        negating this issue. Windows Terminal and command prompt will also reset the title for you.
        Most other shells and terminals, however, do not do this.

        Some terminals may require configuration changes before you can set the title.
        Some terminals may not support setting the title at all.

        Other software (including the terminal itself, the shell, custom prompts, plugins, etc.)
        may also set the terminal window title. This could result in whatever value you write
        using this method being overwritten.

        Args:
            title (str): The new title of the terminal window.

        Returns:
            bool: True if the control code to change the terminal title was
                written, otherwise False. Note that a return value of True
                does not guarantee that the window title has actually changed,
                since the feature may be unsupported/disabled in some terminals.
        """
        if self.is_terminal:
            self.control(Control.title(title))
            return True
        return False

    def screen(
        self, hide_cursor: bool = True, style: Optional[StyleType] = None
    ) -> "ScreenContext":
        """Context manager to enable and disable 'alternative screen' mode.

        Args:
            hide_cursor (bool, optional): Also hide the cursor. Defaults to False.
            style (Style, optional): Optional style for screen. Defaults to None.

        Returns:
            ~ScreenContext: Context which enables alternate screen on enter, and disables it on exit.
        """
        return ScreenContext(self, hide_cursor=hide_cursor, style=style or "")

    def measure(
        self, renderable: RenderableType, *, options: Optional[ConsoleOptions] = None
    ) -> Measurement:
        """Measure a renderable. Returns a :class:`~rich.measure.Measurement` object which contains
        information regarding the number of characters required to print the renderable.

        Args:
            renderable (RenderableType): Any renderable or string.
            options (Optional[ConsoleOptions], optional): Options to use when measuring, or None
                to use default options. Defaults to None.

        Returns:
            Measurement: A measurement of the renderable.
        """
        measurement = Measurement.get(self, options or self.options, renderable)
        return measurement

    def render(
        self, renderable: RenderableType, options: Optional[ConsoleOptions] = None
    ) -> Iterable[Segment]:
        """Render an object in to an iterable of `Segment` instances.

        This method contains the logic for rendering objects with the console protocol.
        You are unlikely to need to use it directly, unless you are extending the library.

        Args:
            renderable (RenderableType): An object supporting the console protocol, or
                an object that may be converted to a string.
            options (ConsoleOptions, optional): An options object, or None to use self.options. Defaults to None.

        Returns:
            Iterable[Segment]: An iterable of segments that may be rendered.
        """

        _options = options or self.options
        if _options.max_width < 1:
            # No space to render anything. This prevents potential recursion errors.
            return
        render_iterable: RenderResult

        renderable = rich_cast(renderable)
        if hasattr(renderable, "__rich_console__") and not isclass(renderable):
            render_iterable = renderable.__rich_console__(self, _options)  # type: ignore[union-attr]
        elif isinstance(renderable, str):
            text_renderable = self.render_str(
                renderable, highlight=_options.highlight, markup=_options.markup
            )
            render_iterable = text_renderable.__rich_console__(self, _options)
        else:
            raise errors.NotRenderableError(
                f"Unable to render {renderable!r}; "
                "A str, Segment or object with __rich_console__ method is required"
            )

        try:
            iter_render = iter(render_iterable)
        except TypeError:
            raise errors.NotRenderableError(
                f"object {render_iterable!r} is not renderable"
            )
        _Segment = Segment
        _options = _options.reset_height()
        for render_output in iter_render:
            if isinstance(render_output, _Segment):
                yield render_output
            else:
                yield from self.render(render_output, _options)

    def render_lines(
        self,
        renderable: RenderableType,
        options: Optional[ConsoleOptions] = None,
        *,
        style: Optional[Style] = None,
        pad: bool = True,
        new_lines: bool = False,
    ) -> List[List[Segment]]:
        """Render objects in to a list of lines.

        The output of render_lines is useful when further formatting of rendered console text
        is required, such as the Panel class which draws a border around any renderable object.

        Args:
            renderable (RenderableType): Any object renderable in the console.
            options (Optional[ConsoleOptions], optional): Console options, or None to use self.options. Default to ``None``.
            style (Style, optional): Optional style to apply to renderables. Defaults to ``None``.
            pad (bool, optional): Pad lines shorter than render width. Defaults to ``True``.
            new_lines (bool, optional): Include "\n" characters at end of lines.

        Returns:
            List[List[Segment]]: A list of lines, where a line is a list of Segment objects.
        """
        with self._lock:
            render_options = options or self.options
            _rendered = self.render(renderable, render_options)
            if style:
                _rendered = Segment.apply_style(_rendered, style)

            render_height = render_options.height
            if render_height is not None:
                render_height = max(0, render_height)

            lines = list(
                islice(
                    Segment.split_and_crop_lines(
                        _rendered,
                        render_options.max_width,
                        include_new_lines=new_lines,
                        pad=pad,
                        style=style,
                    ),
                    None,
                    render_height,
                )
            )
            if render_options.height is not None:
                extra_lines = render_options.height - len(lines)
                if extra_lines > 0:
                    pad_line = [
                        [Segment(" " * render_options.max_width, style), Segment("\n")]
                        if new_lines
                        else [Segment(" " * render_options.max_width, style)]
                    ]
                    lines.extend(pad_line * extra_lines)

            return lines

    def render_str(
        self,
        text: str,
        *,
        style: Union[str, Style] = "",
        justify: Optional[JustifyMethod] = None,
        overflow: Optional[OverflowMethod] = None,
        emoji: Optional[bool] = None,
        markup: Optional[bool] = None,
        highlight: Optional[bool] = None,
        highlighter: Optional[HighlighterType] = None,
    ) -> "Text":
        """Convert a string to a Text instance. This is called automatically if
        you print or log a string.

        Args:
            text (str): Text to render.
            style (Union[str, Style], optional): Style to apply to rendered text.
            justify (str, optional): Justify method: "default", "left", "center", "full", or "right". Defaults to ``None``.
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to ``None``.
            emoji (Optional[bool], optional): Enable emoji, or ``None`` to use Console default.
            markup (Optional[bool], optional): Enable markup, or ``None`` to use Console default.
            highlight (Optional[bool], optional): Enable highlighting, or ``None`` to use Console default.
            highlighter (HighlighterType, optional): Optional highlighter to apply.
        Returns:
            ConsoleRenderable: Renderable object.

        """
        emoji_enabled = emoji or (emoji is None and self._emoji)
        markup_enabled = markup or (markup is None and self._markup)
        highlight_enabled = highlight or (highlight is None and self._highlight)

        if markup_enabled:
            rich_text = render_markup(
                text,
                style=style,
                emoji=emoji_enabled,
                emoji_variant=self._emoji_variant,
            )
            rich_text.justify = justify
            rich_text.overflow = overflow
        else:
            rich_text = Text(
                _emoji_replace(text, default_variant=self._emoji_variant)
                if emoji_enabled
                else text,
                justify=justify,
                overflow=overflow,
                style=style,
            )

        _highlighter = (highlighter or self.highlighter) if highlight_enabled else None
        if _highlighter is not None:
            highlight_text = _highlighter(str(rich_text))
            highlight_text.copy_styles(rich_text)
            return highlight_text

        return rich_text

    def get_style(
        self, name: Union[str, Style], *, default: Optional[Union[Style, str]] = None
    ) -> Style:
        """Get a Style instance by its theme name or parse a definition.

        Args:
            name (str): The name of a style or a style definition.

        Returns:
            Style: A Style object.

        Raises:
            MissingStyle: If no style could be parsed from name.

        """
        if isinstance(name, Style):
            return name

        try:
            style = self._theme_stack.get(name)
            if style is None:
                style = Style.parse(name)
            return style.copy() if style.link else style
        except errors.StyleSyntaxError as error:
            if default is not None:
                return self.get_style(default)
            raise errors.MissingStyle(
                f"Failed to get style {name!r}; {error}"
            ) from None

    def _collect_renderables(
        self,
        objects: Iterable[Any],
        sep: str,
        end: str,
        *,
        justify: Optional[JustifyMethod] = None,
        emoji: Optional[bool] = None,
        markup: Optional[bool] = None,
        highlight: Optional[bool] = None,
    ) -> List[ConsoleRenderable]:
        """Combine a number of renderables and text into one renderable.

        Args:
            objects (Iterable[Any]): Anything that Rich can render.
            sep (str): String to write between print data.
            end (str): String to write at end of print data.
            justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``.
            emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default.
            markup (Optional[bool], optional): Enable markup, or ``None`` to use console default.
            highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default.

        Returns:
            List[ConsoleRenderable]: A list of things to render.
        """
        renderables: List[ConsoleRenderable] = []
        _append = renderables.append
        text: List[Text] = []
        append_text = text.append

        append = _append
        if justify in ("left", "center", "right"):

            def align_append(renderable: RenderableType) -> None:
                _append(Align(renderable, cast(AlignMethod, justify)))

            append = align_append

        _highlighter: HighlighterType = _null_highlighter
        if highlight or (highlight is None and self._highlight):
            _highlighter = self.highlighter

        def check_text() -> None:
            if text:
                sep_text = Text(sep, justify=justify, end=end)
                append(sep_text.join(text))
                text.clear()

        for renderable in objects:
            renderable = rich_cast(renderable)
            if isinstance(renderable, str):
                append_text(
                    self.render_str(
                        renderable, emoji=emoji, markup=markup, highlighter=_highlighter
                    )
                )
            elif isinstance(renderable, Text):
                append_text(renderable)
            elif isinstance(renderable, ConsoleRenderable):
                check_text()
                append(renderable)
            elif is_expandable(renderable):
                check_text()
                append(Pretty(renderable, highlighter=_highlighter))
            else:
                append_text(_highlighter(str(renderable)))

        check_text()

        if self.style is not None:
            style = self.get_style(self.style)
            renderables = [Styled(renderable, style) for renderable in renderables]

        return renderables

    def rule(
        self,
        title: TextType = "",
        *,
        characters: str = "─",
        style: Union[str, Style] = "rule.line",
        align: AlignMethod = "center",
    ) -> None:
        """Draw a line with optional centered title.

        Args:
            title (str, optional): Text to render over the rule. Defaults to "".
            characters (str, optional): Character(s) to form the line. Defaults to "─".
            style (str, optional): Style of line. Defaults to "rule.line".
            align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center".
        """
        from .rule import Rule

        rule = Rule(title=title, characters=characters, style=style, align=align)
        self.print(rule)

    def control(self, *control: Control) -> None:
        """Insert non-printing control codes.

        Args:
            control_codes (str): Control codes, such as those that may move the cursor.
        """
        if not self.is_dumb_terminal:
            with self:
                self._buffer.extend(_control.segment for _control in control)

    def out(
        self,
        *objects: Any,
        sep: str = " ",
        end: str = "\n",
        style: Optional[Union[str, Style]] = None,
        highlight: Optional[bool] = None,
    ) -> None:
        """Output to the terminal. This is a low-level way of writing to the terminal which unlike
        :meth:`~rich.console.Console.print` won't pretty print, wrap text, or apply markup, but will
        optionally apply highlighting and a basic style.

        Args:
            sep (str, optional): String to write between print data. Defaults to " ".
            end (str, optional): String to write at end of print data. Defaults to "\\\\n".
            style (Union[str, Style], optional): A style to apply to output. Defaults to None.
            highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use
                console default. Defaults to ``None``.
        """
        raw_output: str = sep.join(str(_object) for _object in objects)
        self.print(
            raw_output,
            style=style,
            highlight=highlight,
            emoji=False,
            markup=False,
            no_wrap=True,
            overflow="ignore",
            crop=False,
            end=end,
        )

    def print(
        self,
        *objects: Any,
        sep: str = " ",
        end: str = "\n",
        style: Optional[Union[str, Style]] = None,
        justify: Optional[JustifyMethod] = None,
        overflow: Optional[OverflowMethod] = None,
        no_wrap: Optional[bool] = None,
        emoji: Optional[bool] = None,
        markup: Optional[bool] = None,
        highlight: Optional[bool] = None,
        width: Optional[int] = None,
        height: Optional[int] = None,
        crop: bool = True,
        soft_wrap: Optional[bool] = None,
        new_line_start: bool = False,
    ) -> None:
        """Print to the console.

        Args:
            objects (positional args): Objects to log to the terminal.
            sep (str, optional): String to write between print data. Defaults to " ".
            end (str, optional): String to write at end of print data. Defaults to "\\\\n".
            style (Union[str, Style], optional): A style to apply to output. Defaults to None.
            justify (str, optional): Justify method: "default", "left", "right", "center", or "full". Defaults to ``None``.
            overflow (str, optional): Overflow method: "ignore", "crop", "fold", or "ellipsis". Defaults to None.
            no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to None.
            emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to ``None``.
            markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to ``None``.
            highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to ``None``.
            width (Optional[int], optional): Width of output, or ``None`` to auto-detect. Defaults to ``None``.
            crop (Optional[bool], optional): Crop output to width of terminal. Defaults to True.
            soft_wrap (bool, optional): Enable soft wrap mode which disables word wrapping and cropping of text or ``None`` for
                Console default. Defaults to ``None``.
            new_line_start (bool, False): Insert a new line at the start if the output contains more than one line. Defaults to ``False``.
        """
        if not objects:
            objects = (NewLine(),)

        if soft_wrap is None:
            soft_wrap = self.soft_wrap
        if soft_wrap:
            if no_wrap is None:
                no_wrap = True
            if overflow is None:
                overflow = "ignore"
            crop = False
        render_hooks = self._render_hooks[:]
        with self:
            renderables = self._collect_renderables(
                objects,
                sep,
                end,
                justify=justify,
                emoji=emoji,
                markup=markup,
                highlight=highlight,
            )
            for hook in render_hooks:
                renderables = hook.process_renderables(renderables)
            render_options = self.options.update(
                justify=justify,
                overflow=overflow,
                width=min(width, self.width) if width is not None else NO_CHANGE,
                height=height,
                no_wrap=no_wrap,
                markup=markup,
                highlight=highlight,
            )

            new_segments: List[Segment] = []
            extend = new_segments.extend
            render = self.render
            if style is None:
                for renderable in renderables:
                    extend(render(renderable, render_options))
            else:
                for renderable in renderables:
                    extend(
                        Segment.apply_style(
                            render(renderable, render_options), self.get_style(style)
                        )
                    )
            if new_line_start:
                if (
                    len("".join(segment.text for segment in new_segments).splitlines())
                    > 1
                ):
                    new_segments.insert(0, Segment.line())
            if crop:
                buffer_extend = self._buffer.extend
                for line in Segment.split_and_crop_lines(
                    new_segments, self.width, pad=False
                ):
                    buffer_extend(line)
            else:
                self._buffer.extend(new_segments)

    def print_json(
        self,
        json: Optional[str] = None,
        *,
        data: Any = None,
        indent: Union[None, int, str] = 2,
        highlight: bool = True,
        skip_keys: bool = False,
        ensure_ascii: bool = False,
        check_circular: bool = True,
        allow_nan: bool = True,
        default: Optional[Callable[[Any], Any]] = None,
        sort_keys: bool = False,
    ) -> None:
        """Pretty prints JSON. Output will be valid JSON.

        Args:
            json (Optional[str]): A string containing JSON.
            data (Any): If json is not supplied, then encode this data.
            indent (Union[None, int, str], optional): Number of spaces to indent. Defaults to 2.
            highlight (bool, optional): Enable highlighting of output: Defaults to True.
            skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
            ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
            check_circular (bool, optional): Check for circular references. Defaults to True.
            allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
            default (Callable, optional): A callable that converts values that can not be encoded
                in to something that can be JSON encoded. Defaults to None.
            sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
        """
        from pip._vendor.rich.json import JSON

        if json is None:
            json_renderable = JSON.from_data(
                data,
                indent=indent,
                highlight=highlight,
                skip_keys=skip_keys,
                ensure_ascii=ensure_ascii,
                check_circular=check_circular,
                allow_nan=allow_nan,
                default=default,
                sort_keys=sort_keys,
            )
        else:
            if not isinstance(json, str):
                raise TypeError(
                    f"json must be str. Did you mean print_json(data={json!r}) ?"
                )
            json_renderable = JSON(
                json,
                indent=indent,
                highlight=highlight,
                skip_keys=skip_keys,
                ensure_ascii=ensure_ascii,
                check_circular=check_circular,
                allow_nan=allow_nan,
                default=default,
                sort_keys=sort_keys,
            )
        self.print(json_renderable, soft_wrap=True)

    def update_screen(
        self,
        renderable: RenderableType,
        *,
        region: Optional[Region] = None,
        options: Optional[ConsoleOptions] = None,
    ) -> None:
        """Update the screen at a given offset.

        Args:
            renderable (RenderableType): A Rich renderable.
            region (Region, optional): Region of screen to update, or None for entire screen. Defaults to None.
            x (int, optional): x offset. Defaults to 0.
            y (int, optional): y offset. Defaults to 0.

        Raises:
            errors.NoAltScreen: If the Console isn't in alt screen mode.

        """
        if not self.is_alt_screen:
            raise errors.NoAltScreen("Alt screen must be enabled to call update_screen")
        render_options = options or self.options
        if region is None:
            x = y = 0
            render_options = render_options.update_dimensions(
                render_options.max_width, render_options.height or self.height
            )
        else:
            x, y, width, height = region
            render_options = render_options.update_dimensions(width, height)

        lines = self.render_lines(renderable, options=render_options)
        self.update_screen_lines(lines, x, y)

    def update_screen_lines(
        self, lines: List[List[Segment]], x: int = 0, y: int = 0
    ) -> None:
        """Update lines of the screen at a given offset.

        Args:
            lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`).
            x (int, optional): x offset (column no). Defaults to 0.
            y (int, optional): y offset (column no). Defaults to 0.

        Raises:
            errors.NoAltScreen: If the Console isn't in alt screen mode.
        """
        if not self.is_alt_screen:
            raise errors.NoAltScreen("Alt screen must be enabled to call update_screen")
        screen_update = ScreenUpdate(lines, x, y)
        segments = self.render(screen_update)
        self._buffer.extend(segments)
        self._check_buffer()

    def print_exception(
        self,
        *,
        width: Optional[int] = 100,
        extra_lines: int = 3,
        theme: Optional[str] = None,
        word_wrap: bool = False,
        show_locals: bool = False,
        suppress: Iterable[Union[str, ModuleType]] = (),
        max_frames: int = 100,
    ) -> None:
        """Prints a rich render of the last exception and traceback.

        Args:
            width (Optional[int], optional): Number of characters used to render code. Defaults to 100.
            extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
            theme (str, optional): Override pygments theme used in traceback
            word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
            show_locals (bool, optional): Enable display of local variables. Defaults to False.
            suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
            max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
        """
        from .traceback import Traceback

        traceback = Traceback(
            width=width,
            extra_lines=extra_lines,
            theme=theme,
            word_wrap=word_wrap,
            show_locals=show_locals,
            suppress=suppress,
            max_frames=max_frames,
        )
        self.print(traceback)

    @staticmethod
    def _caller_frame_info(
        offset: int,
        currentframe: Callable[[], Optional[FrameType]] = inspect.currentframe,
    ) -> Tuple[str, int, Dict[str, Any]]:
        """Get caller frame information.

        Args:
            offset (int): the caller offset within the current frame stack.
            currentframe (Callable[[], Optional[FrameType]], optional): the callable to use to
                retrieve the current frame. Defaults to ``inspect.currentframe``.

        Returns:
            Tuple[str, int, Dict[str, Any]]: A tuple containing the filename, the line number and
                the dictionary of local variables associated with the caller frame.

        Raises:
            RuntimeError: If the stack offset is invalid.
        """
        # Ignore the frame of this local helper
        offset += 1

        frame = currentframe()
        if frame is not None:
            # Use the faster currentframe where implemented
            while offset and frame is not None:
                frame = frame.f_back
                offset -= 1
            assert frame is not None
            return frame.f_code.co_filename, frame.f_lineno, frame.f_locals
        else:
            # Fallback to the slower stack
            frame_info = inspect.stack()[offset]
            return frame_info.filename, frame_info.lineno, frame_info.frame.f_locals

    def log(
        self,
        *objects: Any,
        sep: str = " ",
        end: str = "\n",
        style: Optional[Union[str, Style]] = None,
        justify: Optional[JustifyMethod] = None,
        emoji: Optional[bool] = None,
        markup: Optional[bool] = None,
        highlight: Optional[bool] = None,
        log_locals: bool = False,
        _stack_offset: int = 1,
    ) -> None:
        """Log rich content to the terminal.

        Args:
            objects (positional args): Objects to log to the terminal.
            sep (str, optional): String to write between print data. Defaults to " ".
            end (str, optional): String to write at end of print data. Defaults to "\\\\n".
            style (Union[str, Style], optional): A style to apply to output. Defaults to None.
            justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``.
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None.
            emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to None.
            markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to None.
            highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to None.
            log_locals (bool, optional): Boolean to enable logging of locals where ``log()``
                was called. Defaults to False.
            _stack_offset (int, optional): Offset of caller from end of call stack. Defaults to 1.
        """
        if not objects:
            objects = (NewLine(),)

        render_hooks = self._render_hooks[:]

        with self:
            renderables = self._collect_renderables(
                objects,
                sep,
                end,
                justify=justify,
                emoji=emoji,
                markup=markup,
                highlight=highlight,
            )
            if style is not None:
                renderables = [Styled(renderable, style) for renderable in renderables]

            filename, line_no, locals = self._caller_frame_info(_stack_offset)
            link_path = None if filename.startswith("<") else os.path.abspath(filename)
            path = filename.rpartition(os.sep)[-1]
            if log_locals:
                locals_map = {
                    key: value
                    for key, value in locals.items()
                    if not key.startswith("__")
                }
                renderables.append(render_scope(locals_map, title="[i]locals"))

            renderables = [
                self._log_render(
                    self,
                    renderables,
                    log_time=self.get_datetime(),
                    path=path,
                    line_no=line_no,
                    link_path=link_path,
                )
            ]
            for hook in render_hooks:
                renderables = hook.process_renderables(renderables)
            new_segments: List[Segment] = []
            extend = new_segments.extend
            render = self.render
            render_options = self.options
            for renderable in renderables:
                extend(render(renderable, render_options))
            buffer_extend = self._buffer.extend
            for line in Segment.split_and_crop_lines(
                new_segments, self.width, pad=False
            ):
                buffer_extend(line)

    def _check_buffer(self) -> None:
        """Check if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False)
        Rendering is supported on Windows, Unix and Jupyter environments. For
        legacy Windows consoles, the win32 API is called directly.
        This method will also record what it renders if recording is enabled via Console.record.
        """
        if self.quiet:
            del self._buffer[:]
            return
        with self._lock:
            if self.record:
                with self._record_buffer_lock:
                    self._record_buffer.extend(self._buffer[:])

            if self._buffer_index == 0:
                if self.is_jupyter:  # pragma: no cover
                    from .jupyter import display

                    display(self._buffer, self._render_buffer(self._buffer[:]))
                    del self._buffer[:]
                else:
                    if WINDOWS:
                        use_legacy_windows_render = False
                        if self.legacy_windows:
                            fileno = get_fileno(self.file)
                            if fileno is not None:
                                use_legacy_windows_render = (
                                    fileno in _STD_STREAMS_OUTPUT
                                )

                        if use_legacy_windows_render:
                            from pip._vendor.rich._win32_console import LegacyWindowsTerm
                            from pip._vendor.rich._windows_renderer import legacy_windows_render

                            buffer = self._buffer[:]
                            if self.no_color and self._color_system:
                                buffer = list(Segment.remove_color(buffer))

                            legacy_windows_render(buffer, LegacyWindowsTerm(self.file))
                        else:
                            # Either a non-std stream on legacy Windows, or modern Windows.
                            text = self._render_buffer(self._buffer[:])
                            # https://bugs.python.org/issue37871
                            # https://github.com/python/cpython/issues/82052
                            # We need to avoid writing more than 32Kb in a single write, due to the above bug
                            write = self.file.write
                            # Worse case scenario, every character is 4 bytes of utf-8
                            MAX_WRITE = 32 * 1024 // 4
                            try:
                                if len(text) <= MAX_WRITE:
                                    write(text)
                                else:
                                    batch: List[str] = []
                                    batch_append = batch.append
                                    size = 0
                                    for line in text.splitlines(True):
                                        if size + len(line) > MAX_WRITE and batch:
                                            write("".join(batch))
                                            batch.clear()
                                            size = 0
                                        batch_append(line)
                                        size += len(line)
                                    if batch:
                                        write("".join(batch))
                                        batch.clear()
                            except UnicodeEncodeError as error:
                                error.reason = f"{error.reason}\n*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***"
                                raise
                    else:
                        text = self._render_buffer(self._buffer[:])
                        try:
                            self.file.write(text)
                        except UnicodeEncodeError as error:
                            error.reason = f"{error.reason}\n*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***"
                            raise

                    self.file.flush()
                    del self._buffer[:]

    def _render_buffer(self, buffer: Iterable[Segment]) -> str:
        """Render buffered output, and clear buffer."""
        output: List[str] = []
        append = output.append
        color_system = self._color_system
        legacy_windows = self.legacy_windows
        not_terminal = not self.is_terminal
        if self.no_color and color_system:
            buffer = Segment.remove_color(buffer)
        for text, style, control in buffer:
            if style:
                append(
                    style.render(
                        text,
                        color_system=color_system,
                        legacy_windows=legacy_windows,
                    )
                )
            elif not (not_terminal and control):
                append(text)

        rendered = "".join(output)
        return rendered

    def input(
        self,
        prompt: TextType = "",
        *,
        markup: bool = True,
        emoji: bool = True,
        password: bool = False,
        stream: Optional[TextIO] = None,
    ) -> str:
        """Displays a prompt and waits for input from the user. The prompt may contain color / style.

        It works in the same way as Python's builtin :func:`input` function and provides elaborate line editing and history features if Python's builtin :mod:`readline` module is previously loaded.

        Args:
            prompt (Union[str, Text]): Text to render in the prompt.
            markup (bool, optional): Enable console markup (requires a str prompt). Defaults to True.
            emoji (bool, optional): Enable emoji (requires a str prompt). Defaults to True.
            password: (bool, optional): Hide typed text. Defaults to False.
            stream: (TextIO, optional): Optional file to read input from (rather than stdin). Defaults to None.

        Returns:
            str: Text read from stdin.
        """
        if prompt:
            self.print(prompt, markup=markup, emoji=emoji, end="")
        if password:
            result = getpass("", stream=stream)
        else:
            if stream:
                result = stream.readline()
            else:
                result = input()
        return result

    def export_text(self, *, clear: bool = True, styles: bool = False) -> str:
        """Generate text from console contents (requires record=True argument in constructor).

        Args:
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
            styles (bool, optional): If ``True``, ansi escape codes will be included. ``False`` for plain text.
                Defaults to ``False``.

        Returns:
            str: String containing console contents.

        """
        assert (
            self.record
        ), "To export console contents set record=True in the constructor or instance"

        with self._record_buffer_lock:
            if styles:
                text = "".join(
                    (style.render(text) if style else text)
                    for text, style, _ in self._record_buffer
                )
            else:
                text = "".join(
                    segment.text
                    for segment in self._record_buffer
                    if not segment.control
                )
            if clear:
                del self._record_buffer[:]
        return text

    def save_text(self, path: str, *, clear: bool = True, styles: bool = False) -> None:
        """Generate text from console and save to a given location (requires record=True argument in constructor).

        Args:
            path (str): Path to write text files.
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
            styles (bool, optional): If ``True``, ansi style codes will be included. ``False`` for plain text.
                Defaults to ``False``.

        """
        text = self.export_text(clear=clear, styles=styles)
        with open(path, "wt", encoding="utf-8") as write_file:
            write_file.write(text)

    def export_html(
        self,
        *,
        theme: Optional[TerminalTheme] = None,
        clear: bool = True,
        code_format: Optional[str] = None,
        inline_styles: bool = False,
    ) -> str:
        """Generate HTML from console contents (requires record=True argument in constructor).

        Args:
            theme (TerminalTheme, optional): TerminalTheme object containing console colors.
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
            code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
                '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
            inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
                larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
                Defaults to False.

        Returns:
            str: String containing console contents as HTML.
        """
        assert (
            self.record
        ), "To export console contents set record=True in the constructor or instance"
        fragments: List[str] = []
        append = fragments.append
        _theme = theme or DEFAULT_TERMINAL_THEME
        stylesheet = ""

        render_code_format = CONSOLE_HTML_FORMAT if code_format is None else code_format

        with self._record_buffer_lock:
            if inline_styles:
                for text, style, _ in Segment.filter_control(
                    Segment.simplify(self._record_buffer)
                ):
                    text = escape(text)
                    if style:
                        rule = style.get_html_style(_theme)
                        if style.link:
                            text = f'<a href="{style.link}">{text}</a>'
                        text = f'<span style="{rule}">{text}</span>' if rule else text
                    append(text)
            else:
                styles: Dict[str, int] = {}
                for text, style, _ in Segment.filter_control(
                    Segment.simplify(self._record_buffer)
                ):
                    text = escape(text)
                    if style:
                        rule = style.get_html_style(_theme)
                        style_number = styles.setdefault(rule, len(styles) + 1)
                        if style.link:
                            text = f'<a class="r{style_number}" href="{style.link}">{text}</a>'
                        else:
                            text = f'<span class="r{style_number}">{text}</span>'
                    append(text)
                stylesheet_rules: List[str] = []
                stylesheet_append = stylesheet_rules.append
                for style_rule, style_number in styles.items():
                    if style_rule:
                        stylesheet_append(f".r{style_number} {{{style_rule}}}")
                stylesheet = "\n".join(stylesheet_rules)

            rendered_code = render_code_format.format(
                code="".join(fragments),
                stylesheet=stylesheet,
                foreground=_theme.foreground_color.hex,
                background=_theme.background_color.hex,
            )
            if clear:
                del self._record_buffer[:]
        return rendered_code

    def save_html(
        self,
        path: str,
        *,
        theme: Optional[TerminalTheme] = None,
        clear: bool = True,
        code_format: str = CONSOLE_HTML_FORMAT,
        inline_styles: bool = False,
    ) -> None:
        """Generate HTML from console contents and write to a file (requires record=True argument in constructor).

        Args:
            path (str): Path to write html file.
            theme (TerminalTheme, optional): TerminalTheme object containing console colors.
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
            code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
                '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
            inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
                larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
                Defaults to False.

        """
        html = self.export_html(
            theme=theme,
            clear=clear,
            code_format=code_format,
            inline_styles=inline_styles,
        )
        with open(path, "wt", encoding="utf-8") as write_file:
            write_file.write(html)

    def export_svg(
        self,
        *,
        title: str = "Rich",
        theme: Optional[TerminalTheme] = None,
        clear: bool = True,
        code_format: str = CONSOLE_SVG_FORMAT,
        font_aspect_ratio: float = 0.61,
        unique_id: Optional[str] = None,
    ) -> str:
        """
        Generate an SVG from the console contents (requires record=True in Console constructor).

        Args:
            title (str, optional): The title of the tab in the output image
            theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
            code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
                into the string in order to form the final SVG output. The default template used and the variables
                injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
            font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
                string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
                If you aren't specifying a different font inside ``code_format``, you probably don't need this.
            unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
                ids). If not set, this defaults to a computed value based on the recorded content.
        """

        from pip._vendor.rich.cells import cell_len

        style_cache: Dict[Style, str] = {}

        def get_svg_style(style: Style) -> str:
            """Convert a Style to CSS rules for SVG."""
            if style in style_cache:
                return style_cache[style]
            css_rules = []
            color = (
                _theme.foreground_color
                if (style.color is None or style.color.is_default)
                else style.color.get_truecolor(_theme)
            )
            bgcolor = (
                _theme.background_color
                if (style.bgcolor is None or style.bgcolor.is_default)
                else style.bgcolor.get_truecolor(_theme)
            )
            if style.reverse:
                color, bgcolor = bgcolor, color
            if style.dim:
                color = blend_rgb(color, bgcolor, 0.4)
            css_rules.append(f"fill: {color.hex}")
            if style.bold:
                css_rules.append("font-weight: bold")
            if style.italic:
                css_rules.append("font-style: italic;")
            if style.underline:
                css_rules.append("text-decoration: underline;")
            if style.strike:
                css_rules.append("text-decoration: line-through;")

            css = ";".join(css_rules)
            style_cache[style] = css
            return css

        _theme = theme or SVG_EXPORT_THEME

        width = self.width
        char_height = 20
        char_width = char_height * font_aspect_ratio
        line_height = char_height * 1.22

        margin_top = 1
        margin_right = 1
        margin_bottom = 1
        margin_left = 1

        padding_top = 40
        padding_right = 8
        padding_bottom = 8
        padding_left = 8

        padding_width = padding_left + padding_right
        padding_height = padding_top + padding_bottom
        margin_width = margin_left + margin_right
        margin_height = margin_top + margin_bottom

        text_backgrounds: List[str] = []
        text_group: List[str] = []
        classes: Dict[str, int] = {}
        style_no = 1

        def escape_text(text: str) -> str:
            """HTML escape text and replace spaces with nbsp."""
            return escape(text).replace(" ", "&#160;")

        def make_tag(
            name: str, content: Optional[str] = None, **attribs: object
        ) -> str:
            """Make a tag from name, content, and attributes."""

            def stringify(value: object) -> str:
                if isinstance(value, (float)):
                    return format(value, "g")
                return str(value)

            tag_attribs = " ".join(
                f'{k.lstrip("_").replace("_", "-")}="{stringify(v)}"'
                for k, v in attribs.items()
            )
            return (
                f"<{name} {tag_attribs}>{content}</{name}>"
                if content
                else f"<{name} {tag_attribs}/>"
            )

        with self._record_buffer_lock:
            segments = list(Segment.filter_control(self._record_buffer))
            if clear:
                self._record_buffer.clear()

        if unique_id is None:
            unique_id = "terminal-" + str(
                zlib.adler32(
                    ("".join(repr(segment) for segment in segments)).encode(
                        "utf-8",
                        "ignore",
                    )
                    + title.encode("utf-8", "ignore")
                )
            )
        y = 0
        for y, line in enumerate(Segment.split_and_crop_lines(segments, length=width)):
            x = 0
            for text, style, _control in line:
                style = style or Style()
                rules = get_svg_style(style)
                if rules not in classes:
                    classes[rules] = style_no
                    style_no += 1
                class_name = f"r{classes[rules]}"

                if style.reverse:
                    has_background = True
                    background = (
                        _theme.foreground_color.hex
                        if style.color is None
                        else style.color.get_truecolor(_theme).hex
                    )
                else:
                    bgcolor = style.bgcolor
                    has_background = bgcolor is not None and not bgcolor.is_default
                    background = (
                        _theme.background_color.hex
                        if style.bgcolor is None
                        else style.bgcolor.get_truecolor(_theme).hex
                    )

                text_length = cell_len(text)
                if has_background:
                    text_backgrounds.append(
                        make_tag(
                            "rect",
                            fill=background,
                            x=x * char_width,
                            y=y * line_height + 1.5,
                            width=char_width * text_length,
                            height=line_height + 0.25,
                            shape_rendering="crispEdges",
                        )
                    )

                if text != " " * len(text):
                    text_group.append(
                        make_tag(
                            "text",
                            escape_text(text),
                            _class=f"{unique_id}-{class_name}",
                            x=x * char_width,
                            y=y * line_height + char_height,
                            textLength=char_width * len(text),
                            clip_path=f"url(#{unique_id}-line-{y})",
                        )
                    )
                x += cell_len(text)

        line_offsets = [line_no * line_height + 1.5 for line_no in range(y)]
        lines = "\n".join(
            f"""<clipPath id="{unique_id}-line-{line_no}">
    {make_tag("rect", x=0, y=offset, width=char_width * width, height=line_height + 0.25)}
            </clipPath>"""
            for line_no, offset in enumerate(line_offsets)
        )

        styles = "\n".join(
            f".{unique_id}-r{rule_no} {{ {css} }}" for css, rule_no in classes.items()
        )
        backgrounds = "".join(text_backgrounds)
        matrix = "".join(text_group)

        terminal_width = ceil(width * char_width + padding_width)
        terminal_height = (y + 1) * line_height + padding_height
        chrome = make_tag(
            "rect",
            fill=_theme.background_color.hex,
            stroke="rgba(255,255,255,0.35)",
            stroke_width="1",
            x=margin_left,
            y=margin_top,
            width=terminal_width,
            height=terminal_height,
            rx=8,
        )

        title_color = _theme.foreground_color.hex
        if title:
            chrome += make_tag(
                "text",
                escape_text(title),
                _class=f"{unique_id}-title",
                fill=title_color,
                text_anchor="middle",
                x=terminal_width // 2,
                y=margin_top + char_height + 6,
            )
        chrome += f"""
            <g transform="translate(26,22)">
            <circle cx="0" cy="0" r="7" fill="#ff5f57"/>
            <circle cx="22" cy="0" r="7" fill="#febc2e"/>
            <circle cx="44" cy="0" r="7" fill="#28c840"/>
            </g>
        """

        svg = code_format.format(
            unique_id=unique_id,
            char_width=char_width,
            char_height=char_height,
            line_height=line_height,
            terminal_width=char_width * width - 1,
            terminal_height=(y + 1) * line_height - 1,
            width=terminal_width + margin_width,
            height=terminal_height + margin_height,
            terminal_x=margin_left + padding_left,
            terminal_y=margin_top + padding_top,
            styles=styles,
            chrome=chrome,
            backgrounds=backgrounds,
            matrix=matrix,
            lines=lines,
        )
        return svg

    def save_svg(
        self,
        path: str,
        *,
        title: str = "Rich",
        theme: Optional[TerminalTheme] = None,
        clear: bool = True,
        code_format: str = CONSOLE_SVG_FORMAT,
        font_aspect_ratio: float = 0.61,
        unique_id: Optional[str] = None,
    ) -> None:
        """Generate an SVG file from the console contents (requires record=True in Console constructor).

        Args:
            path (str): The path to write the SVG to.
            title (str, optional): The title of the tab in the output image
            theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
            code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
                into the string in order to form the final SVG output. The default template used and the variables
                injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
            font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
                string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
                If you aren't specifying a different font inside ``code_format``, you probably don't need this.
            unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
                ids). If not set, this defaults to a computed value based on the recorded content.
        """
        svg = self.export_svg(
            title=title,
            theme=theme,
            clear=clear,
            code_format=code_format,
            font_aspect_ratio=font_aspect_ratio,
            unique_id=unique_id,
        )
        with open(path, "wt", encoding="utf-8") as write_file:
            write_file.write(svg)


def _svg_hash(svg_main_code: str) -> str:
    """Returns a unique hash for the given SVG main code.

    Args:
        svg_main_code (str): The content we're going to inject in the SVG envelope.

    Returns:
        str: a hash of the given content
    """
    return str(zlib.adler32(svg_main_code.encode()))


if __name__ == "__main__":  # pragma: no cover
    console = Console(record=True)

    console.log(
        "JSONRPC [i]request[/i]",
        5,
        1.3,
        True,
        False,
        None,
        {
            "jsonrpc": "2.0",
            "method": "subtract",
            "params": {"minuend": 42, "subtrahend": 23},
            "id": 3,
        },
    )

    console.log("Hello, World!", "{'a': 1}", repr(console))

    console.print(
        {
            "name": None,
            "empty": [],
            "quiz": {
                "sport": {
                    "answered": True,
                    "q1": {
                        "question": "Which one is correct team name in NBA?",
                        "options": [
                            "New York Bulls",
                            "Los Angeles Kings",
                            "Golden State Warriors",
                            "Huston Rocket",
                        ],
                        "answer": "Huston Rocket",
                    },
                },
                "maths": {
                    "answered": False,
                    "q1": {
                        "question": "5 + 7 = ?",
                        "options": [10, 11, 12, 13],
                        "answer": 12,
                    },
                    "q2": {
                        "question": "12 - 8 = ?",
                        "options": [1, 2, 3, 4],
                        "answer": 4,
                    },
                },
            },
        }
    )
python3.12/site-packages/pip/_vendor/rich/__pycache__/color.cpython-312.pyc000064400000063772151732701670022343 0ustar00�

R`i0G���ddlZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZmZddl
mZmZmZddlmZdd	lmZmZdd
lmZe	rddlmZddlmZej6�d
k(ZGd�de�ZGd�de�Zidd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%�d&d'�d(d)�d*d+�d,d-�d.d/�d0d1�id2d1�d3d4�d5d6�d7d8�d9d:�d;d<�d=d>�d?d@�dAdB�dCdD�dEdF�dGdH�dIdJ�dKdL�dMdN�dOdP�dQdR��idSdT�dUdV�dWdX�dYdZ�d[d\�d]d^�d_d`�dadb�dcdd�dedf�dgdh�didj�dkdl�dmdn�dodp�dqdr�dsdt��idudv�dwdx�dydx�dzd{�d|d}�d~d�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�dÓd�dœd�dǓd�dɓd�d˓d�d͓d�dϓd�dѓd�dӓd�dՓd�dד�id�dٓd�dۓd�dݓd�dߓd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��d�d���id�d��d�d��d�d��d�d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d7��d9�d:��i�d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��dO�dP��dQ�dR��dS�dT��dU�dV��dW�dX��dY�dZ��d[�d\��i�d]�d^��d_�d`��da�db��dc�dd��de�df��dg�dh��di�dj��dk�dl��dm�dn��do�dp��dq�dr��ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d|��i�d~�d��d��d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d����d��d��d��d��d��d��d��d��d��d��d��d��d��d��d���ZG�d���d�e �Z!ejD�d�ejF�Z$eG�d���d�e
��Z%�d�e&�d�ef�d��Z'	�dِd�e�d�e�d�e(�d�ef�dĄZ)e*�d�k(�rKd�d�l+m,Z,d�d�l-m.Z.ddlmZe,�Z+e.�dȐdɐ�ʫZ-e-j_�d�d%�dː�̫e-j_�d͐d�d��ϫe-j_�d�d��ѫe-j_�d�d��ѫe-j_�d�d��ѫe0�dԄejc�D��Z2e2D]�\Z3Z4�d�e4vr�e�d֐d�e4����ѫZ5e3d1kr!e-jme5e3�e�d�e4��d؝���Bee3Z7e-jme5e&e3�e�d�e4��d؝�e7jpe7jr���e+jue-�yy(��N)�
rgb_to_hls)�IntEnum)�	lru_cache)�
TYPE_CHECKING�
NamedTuple�Optional�Tuple�)�EIGHT_BIT_PALETTE�STANDARD_PALETTE�WINDOWS_PALETTE)�ColorTriplet)�Result�	rich_repr)�DEFAULT_TERMINAL_THEME)�
TerminalTheme��Text�Windowsc�8�eZdZdZdZdZdZdZdefd�Z	defd�Z
y	)
�ColorSystemz1One of the 3 color system supported by terminals.r
����returnc� �d|j��S)NzColorSystem.��name��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/color.py�__repr__zColorSystem.__repr__s���d�i�i�[�)�)�c��t|�S�N)�reprrs r!�__str__zColorSystem.__str__ s���D�z�r#N)�__name__�
__module__�__qualname__�__doc__�STANDARD�	EIGHT_BIT�	TRUECOLOR�WINDOWS�strr"r'�r#r!rrs1��;��H��I��I��G�*�#�*���r#rc�0�eZdZdZdZdZdZdZdZde	fd�Z
y	)
�	ColorTypez$Type of color stored in Color class.rr
rrrrc� �d|j��S)Nz
ColorType.rrs r!r"zColorType.__repr__-s���D�I�I�;�'�'r#N)r(r)r*r+�DEFAULTr,r-r.r/r0r"r1r#r!r3r3$s*��.��G��H��I��I��G�(�#�(r#r3�black�red�greenr�yellowr�bluer�magenta��cyan��white��bright_black��
bright_red�	�bright_green�
�
bright_yellow��bright_blue��bright_magenta�
�bright_cyan��bright_white��grey0��gray0�	navy_blue��	dark_blue��blue3��blue1��
dark_green��deep_sky_blue4��dodger_blue3��dodger_blue2��green4��
spring_green4��
turquoise4��deep_sky_blue3� �dodger_blue1�!�green3�(�
spring_green3�)�	dark_cyan�$�light_sea_green�%�deep_sky_blue2�&�deep_sky_blue1�'�
spring_green2�/�cyan3�+�dark_turquoise�,�
turquoise2�-�green1�.�
spring_green1�0�medium_spring_green�1�cyan2�2�cyan1�3�dark_red�X�
deep_pink4�}�purple4�7�purple3�8�blue_violet�9�orange4�^�grey37�;�gray37�medium_purple4�<�slate_blue3�>�royal_blue1�?�chartreuse4�@�dark_sea_green4�G�pale_turquoise4�B�
steel_blue�C�steel_blue3�D�cornflower_blue�E�chartreuse3�L�
cadet_blue�I�	sky_blue3�J�steel_blue1�Q�pale_green3�r�
sea_green3�N�aquamarine3�O�medium_turquoise�P�chartreuse2�p�
sea_green2�S�
sea_green1�U�aquamarine1�z�dark_slate_gray2�W�dark_magenta�[�dark_violet��purple��light_pink4�_�plum4�`�medium_purple3�b�slate_blue1�c�yellow4�j�wheat4�e�grey53�f�gray53�light_slate_grey�g�light_slate_gray�
medium_purple�h�light_slate_blue�i�dark_olive_green3��dark_sea_green�l�light_sky_blue3�n�	sky_blue2�o�dark_sea_green3��dark_slate_gray3�t�	sky_blue1�u�chartreuse1�v�light_green�x�pale_green1��dark_slate_gray1�{�red3��medium_violet_red�~�magenta3��dark_orange3��
indian_red��	hot_pink3��medium_orchid3��
medium_orchid��medium_purple2��dark_goldenrod��
light_salmon3��
rosy_brown��grey63��gray63�medium_purple1��gold3��
dark_khaki��
navajo_white3��grey69��gray69�light_steel_blue3��light_steel_blue��yellow3��dark_sea_green2��light_cyan3��light_sky_blue1��green_yellow��dark_olive_green2��dark_sea_green1��pale_turquoise1��
deep_pink3��magenta2���	hot_pink2��orchid��medium_orchid1���orange3��light_pink3��pink3��plum3��violet��light_goldenrod3��tan��misty_rose3��thistle3��plum2��khaki3��light_goldenrod2���
light_yellow3��grey84��gray84�light_steel_blue1��yellow2��dark_olive_green1��	honeydew2���light_cyan1���red1���
deep_pink2���
deep_pink1���magenta1���orange_red1���indian_red1���hot_pink���dark_orange���salmon1���light_coral���pale_violet_red1���orchid2���orchid1���orange1���sandy_brown���
light_salmon1���light_pink1���pink1���plum1���gold1���
navajo_white1���misty_rose1���thistle1���yellow1���light_goldenrod1���khaki1���wheat1���	cornsilk1���grey100���gray100�grey3���gray3�grey7���gray7�grey11���gray11�grey15���gray15�grey19���gray19�grey23���gray23�grey27���gray27�grey30���gray30�grey35���gray35�grey39���gray39�grey42���gray42�grey46���gray46�grey50���gray50�grey54��gray54�grey58��gray58�grey62��gray62�grey66��gray66�������)�grey70�gray70�grey74�gray74�grey78�gray78�grey82�gray82�grey85�gray85�grey89�gray89�grey93�gray93c��eZdZdZy)�ColorParseErrorzThe color could not be parsed.N)r(r)r*r+r1r#r!r�r� s��(r#r�z?^
\#([0-9a-f]{6})$|
color\(([0-9]{1,3})\)$|
rgb\(([\d\s,]+)\)$
c	��eZdZUdZeed<	eed<	dZee	ed<	dZ
eeed<	d d�Zde
fd	�Zedefd
��Zedefd��Zedefd��Z	d!d
eddedefd�Zede	ddfd��Zed"d��Zededededdfd��Zed#d��Zeed��deddfd���Zed��d$dedeedffd��Zed��deddfd��Z y)%�ColorzTerminal color definition.r�typeN�number�tripletrc��ddlm}ddlm}|jd|j
�d|jj
j��d�d||��fd	�S)
z*Displays the actual color if Rich printed.r
)�Stylerz<color z (�)u⬤)�colorz >)�styler��textr�assemblerr��lower)r r�rs   r!�__rich__zColor.__rich__;sS�� ���t�}�}��d�i�i�]�"�T�Y�Y�^�^�%9�%9�%;�$<�A�>�
�E��%�&��
�	
r#c#�K�|j��|j��d|jdf��d|jdf��y�w)Nr�r�)rr�r�r�rs r!�
__rich_repr__zColor.__rich_repr__Fs:�����i�i���i�i������T�)�)�����t�+�+�s�AAc��|jtjk(rtjStt|j��S)z+Get the native color system for this color.)r�r3r5rr,�intrs r!�systemzColor.systemLs5���9�9�	�)�)�)��'�'�'��3�t�y�y�>�*�*r#c�Z�|jtjtjfvS)z7Check if the color is ultimately defined by the system.)r�rr-r.rs r!�is_system_definedzColor.is_system_definedSs$���{�{�;�#8�#8�+�:O�:O�"P�P�Pr#c�<�|jtjk(S)z&Check if the color is a default color.)r�r3r5rs r!�
is_defaultzColor.is_defaultXs���y�y�I�-�-�-�-r#�themer�
foregroundc�P�|�t}|jtjk(r|j�J�|jS|jtj
k(r!|j�J�t|jS|jtjk(r'|j�J�|j|jS|jtjk(r!|j�J�t|jS|j�J�|r|jS|jS)aGet an equivalent color triplet for this color.

        Args:
            theme (TerminalTheme, optional): Optional terminal theme, or None to use default. Defaults to None.
            foreground (bool, optional): True for a foreground color, or False for background. Defaults to True.

        Returns:
            ColorTriplet: A color triplet containing RGB components.
        )rr�r3r.r�r-r�rr,�ansi_colorsr/r
�foreground_color�background_color)r rrs   r!�
get_truecolorzColor.get_truecolor]s����=�*�E��9�9�	�+�+�+��<�<�+�+�+��<�<��
�Y�Y�)�-�-�
-��;�;�*�*�*�$�T�[�[�1�1�
�Y�Y�)�,�,�
,��;�;�*�*�*��$�$�T�[�[�1�1�
�Y�Y�)�+�+�
+��;�;�*�*�*�"�4�;�;�/�/��;�;�&�&�&�-7�5�)�)�S�U�=S�=S�Sr#c�r�|d|�d�|dkrtj|��Stj|��S)z�Create a Color number from it's 8-bit ansi number.

        Args:
            number (int): A number between 0-255 inclusive.

        Returns:
            Color: A new Color instance.
        zcolor(r�rR)rr�r�)r3r,r-)�clsr�s  r!�	from_ansizColor.from_ansi|sE����&���#�(.���)�$�$��
�	
�9B�9L�9L��
�	
r#c�H�||jtj|��S)z�Create a truecolor RGB color from a triplet of values.

        Args:
            triplet (ColorTriplet): A color triplet containing red, green and blue components.

        Returns:
            Color: A new color object.
        )rr�r�)�hexr3r.)rr�s  r!�from_tripletzColor.from_triplet�s������)�*=�*=�w�O�Or#r7r8r:c	�p�|jtt|�t|�t|���S)a@Create a truecolor from three color components in the range(0->255).

        Args:
            red (float): Red component in range 0-255.
            green (float): Green component in range 0-255.
            blue (float): Blue component in range 0-255.

        Returns:
            Color: A new color object.
        )rrr�)rr7r8r:s    r!�from_rgbzColor.from_rgb�s*������S��X�s�5�z�3�t�9� M�N�Nr#c�2�|dtj��S)zqGet a Color instance representing the default color.

        Returns:
            Color: Default color.
        �default)rr�)r3r5)rs r!rz
Color.default�s���	�	�(9�(9�:�:r#i)�maxsizer�c	���|}|j�j�}|dk(r||tj��Stj|�}|�4|||dkrtj|��Stj|��Stj|�}|�t|�d���|j�\}}}|rMtt|ddd�t|ddd�t|dd	d��}||tj|�
�S|rRt|�}	|	dkDrtd|����|||	dkrtj|	��Stj|	��S|jd
�}
t!|
�dk7rtd|����|
\}}}
tt|�t|�t|
��}t#d�|D��std|����||tj|�
�S)zParse a color definition.r)r�rR)r�r�z is not a valid colorrrrr>)r�r�zcolor number must be <= 255 in �,rzexpected three components in c3�&K�|]	}|dk���y�w)r�Nr1)�.0�	components  r!�	<genexpr>zColor.parse.<locals>.<genexpr>�s����A��I�y�C�'��s�z#color components must be <= 255 in )r��stripr3r5�ANSI_COLOR_NAMES�getr,r-�RE_COLOR�matchr��groupsrr�r.�split�len�all)rr��original_color�color_number�color_match�color_24�color_8�	color_rgbr�r��
componentsr7r8r:s              r!�parsezColor.parse�s�������
�#�#�%���I���u�9�#4�#4�5�5�'�+�+�E�2���#���,8�2�,=�i�(�(�#��
�CL�CV�CV�#��
��n�n�U�+����!�^�$6�6K�"L�M�M�'2�'9�'9�';�$��'�9��"��H�Q�q�M�2�&��H�Q�q�M�2�(>��H�Q�q�M�SU�@V��G��u�i�1�1�7�C�C�
���\�F���|�%�(G��y�&Q�R�R���,2�R�K�i�(�(���
�=F�=P�=P���
�#����-�J��:��!�#�%�3�N�3E�F��� *��C���"�3�s�8�S��Z��T��C�G��A��A�A�%�9�.�9K�L����u�i�1�1�7�C�Cr#.c�z�|j}|tjk(r|rdfSdfS|tjk(r7|j}|�J�|dkrdnd\}}t|r
||z�fS||z�fS|tjk(r7|j}|�J�|dkrdnd\}}t|r
||z�fS||z�fS|tjk(r*|j�J�|rdnddt|j�fS|j�J�|j\}}}|rdndd	t|�t|�t|�fS)
z)Get the ANSI escape codes for this color.�39�49rB)riro)�R�\�38�48�5�2)	r�r3r5r/r�r0r,r-r�)	r r�_typer��fore�backr7r8r:s	         r!�get_ansi_codeszColor.get_ansi_codes�sX���	�	���I�%�%�%�&�D�2�2�D�2�2�
�i�'�'�
'��[�[�F��%�%�%�%+�a�Z��X�J�D�$����v�
�G�I�I����G�I�I�
�i�(�(�
(��[�[�F��%�%�%�%+�a�Z��X�J�D�$����v�
�G�I�I����G�I�I�
�i�)�)�
)��;�;�*�*�*�&�D�D�#�s�4�;�;�7G�H�H��<�<�+�+�+�#�|�|��C���&�D�D�#�s�3�x��U��S�QU�Y�W�Wr#r�c��|jtj|fvr|S|tjk(�r;|j
tjk(�r|j�J�t|jj�\}}}|dkrIt|dz�}|dk(rd}n
|dk(rd}nd|z}t|jtj|��S|j\}}}	|dkr|dzn
d	|dz
d
zz}
|dkr|dzn
d	|dz
d
zz}|	dkr|	dzn
d	|	dz
d
zz}ddt|
�zzdt|�zzt|�z}t|jtj|��S|tjk(r�|j
tjk(r|j�J�|j}
n'|j�J�tt |j�}
t#j$|
�}t|jtj|��S|tj&k(r�|j
tjk(r|j�J�|j}
nf|j�J�|jdkr0t|jtj&|j��Stt |j�}
t)j$|
�}t|jtj&|��S|S)
z7Downgrade a color system to a system with fewer colors.g333333�?g9@rrRr_r�)r�r�r
rorsr>)r�r3r5rr-r�r.r�r�
normalized�roundr�rr,r�rrrrr/r
)r r��_h�l�s�grayr"r7r8r:�six_red�	six_green�six_bluer�s              r!�	downgradezColor.downgrades����9�9��*�*�F�3�3��K��[�*�*�*�t�{�{�k�>S�>S�/S��<�<�+�+�+�!�4�<�<�#:�#:�;�H�B��1��4�x��Q��X����1�9�#%�L��R�Z�#&�L�#&��:�L��T�Y�Y�	�(;�(;�L�Q�Q�#�|�|��C���"%��(�c�B�h��S�2�X��O�0C�G�&+�b�j���
�a�5�2�:��:K�6K�I�$(�2�I�t�b�y�1��r�	�R�7G�3G�H��R�%��.�(�(�1�u�Y�/?�+?�?�%��/�Q�
�����I�$7�$7��M�M��{�+�+�
+��{�{�k�3�3�3��|�|�/�/�/��,�,���{�{�.�.�.�&�(9�$�+�+�(F�G��+�1�1�'�:�L�����I�$6�$6�|�L�L�
�{�*�*�
*��{�{�k�3�3�3��|�|�/�/�/��,�,���{�{�.�.�.��;�;��#� ����I�,=�,=�d�k�k�R�R�&�(9�$�+�+�(F�G��*�0�0��9�L�����I�$5�$5�l�K�K��r#)rr)NT)r�rrr�)rr�)T)!r(r)r*r+r0�__annotations__r3r�rr�r�rr�rr��propertyrr��boolr�r�r�classmethodr	r�floatrrrr(r	r5r@r1r#r!r�r�.s���$�

�I�E�
�O� � �F�H�S�M� �9�&*�G�X�l�
#�*�9�	
�,�v�,��+��+��+��Q�4�Q��Q��.�D�.��.�
KO�T��o�.�T�CG�T�	�T�>�

�s�

�w�

��

��	P��	P��O�5�O��O�e�O��O��O��;��;���t��1D�#�1D�'�1D���1D�f�t��X��X��s�C�x��X��X�6�t��7��7��7��7r#r��	hex_colorrc	��t|�dk(sJd��tt|ddd�t|ddd�t|ddd��}|S)z+Parse six hex characters in to RGB triplet.r>zmust be 6 charactersrrrRr)rrr�)rFr�s  r!�
parse_rgb_hexrH;sY���y�>�Q��6� 6�6����I�a��N�B���Y�q��^�R�!8�#�i��!�n�b�:Q�
�E��Lr#�color1�color2�
cross_fadec	��|\}}}|\}}}tt|||z
|zz�t|||z
|zz�t|||z
|zz��}	|	S)z"Blend one RGB color in to another.)rr�)
rIrJrK�r1�g1�b1�r2�g2�b2�	new_colors
          r!�	blend_rgbrTDsn���J�B��B��J�B��B���B�"�r�'�Z�'�'�(��B�"�r�'�Z�'�'�(��B�"�r�'�Z�'�'�(��I�
�r#�__main__)�Console)�TableFT)�show_footer�	show_edge�ellipsis)�width�overflow�Number�right)�justifyr��Name)r��Hex�RGBc#�*K�|]\}}||f���
y�wr%r1)r�k�vs   r!rras����@�'?�t�q�!�Q��F�'?�s��greyz
          zon �")g�?);�platform�re�colorsysr�enumr�	functoolsr�typingrrrr	�	_palettesrrr
�
color_tripletrr&rr�terminal_themerrr�rr�r/rr3r�	Exceptionr��compile�VERBOSErr�r0rHrErTr(�consolerV�tablerW�
add_column�sorted�items�colorsr"r�
color_cell�add_rowr�r�rgb�printr1r#r!�<module>r~s���	����=�=�K�K�'�#�2��-���(�/�/�
�y�
(���'��
(��
(�l��Q�l�	�1�l��Q�l�
�a�	l�
�A�l��q�
l��A�l��Q�l��A�l��!�l��B�l��R�l��2�l��b�l��2�l� �B�!l�"�R�#l�$�R�%l�&��'l�(��)l�*�R�+l�,�R�-l�.�"�/l�0�b�1l�2�B�3l�4�B�5l�6
�b�7l�8�R�9l�:�"�;l�<�b�=l�>�B�?l�@
�b�Al�B�R�Cl�D��El�F�r�Gl�H�b�Il�J�b�Kl�L�R�Ml�N�R�Ol�P�b�Ql�R�"�Sl�T
�b�Ul�V�R�Wl�X�2�Yl�Z�R�[l�\�R�]l�^��_l�`�#�al�b�r�cl�d�r�el�f�2�gl�h�r�il�j
�b�kl�l
�b�ml�n�b�ol�p�2�ql�r�2�sl�t�2�ul�v�r�wl�x�r�yl�z�"�{l�|�2�}l�~�r�l�@�2�Al�B�"�Cl�D��El�F�2�Gl�H�3�Il�J�"�Kl�L�2�Ml�N��Ol�P�3�Ql�R�"�Sl�T�"�Ul�V�3�Wl�X��Yl�Z�B�[l�\�3�]l�^
�c�_l�`�2�al�b�R�cl�d�b�el�f�2�gl�h�s�il�j
�c�kl�l
�c�ml�n
�c�ol�p��ql�r��sl�t�S�ul�v��wl�x��yl�z�c�{l�|�s�}l�~��l�@�s�Al�B��Cl�D��El�F�3�Gl�H�3�Il�J�3�Kl�L��Ml�N�C�Ol�P��Ql�R��Sl�T�C�Ul�V�#�Wl�X��Yl�Z�c�[l�\�S�]l�^�c�_l�`�c�al�b�S�cl�d�#�el�f
�c�gl�h
�c�il�j�c�kl�l�S�ml�n�#�ol�p�S�ql�r
�c�sl�t
�c�ul�v��wl�x��yl�z�s�{l�|�s�}l�~�3�l�@�s�Al�B�C�Cl�D��El�F�s�Gl�H�s�Il�J�#�Kl�L��Ml�N��Ol�P
�c�Ql�R�c�Sl�T�s�Ul�V�3�Wl�X�S�Yl�Z�S�[l�\
�c�]l�^��_l�`
�3�al�b�3�cl�d��el�f�S�gl�h
�c�il�j��kl�l�S�ml�n
�c�ol�p
�c�ql�r��sl�t�s�ul�v��wl�x��yl�z�3�{l�|�C�}l�~�#�l�@�#�Al�B��Cl�D�3�El�F�3�Gl�H��Il�J�3�Kl�L�s�Ml�N�3�Ol�P��Ql�R�s�Sl�T�s�Ul�V�s�Wl�X�3�Yl�Z�S�[l�\�3�]l�^�S�_l�`�S�al�b�S�cl�d�S�el�f�3�gl�h��il�j�s�kl�l��ml�n
�c�ol�p
�c�ql�r��sl�t�s�ul�v�s�wl�x�S�yl�z�S�{l�|�S�}l�~�S�l�@
�c�Al�B
�c�Cl�D
�c�El�F
�c�Gl�H
�c�Il�J
�c�Kl�L
�c�Ml�N
�c�Ol�P
�c�Ql�R
�c�Sl�T
�c�Ul�V
�c�Wl�X
�c�Yl�Z
�c�[l�\
�c�]l�^
�c�_l�`
�c�al�b
�c�cl�d
�c�el�f
�c�gl�h
�c�il�j
�c�kl�l
�c�ml�n
�c�ol�p
�c�ql�r
�c�sl�t
�c�ul�v
�c�wl�x
�c�yl�z
�c�{l�|��������������Wl��^)�i�)��2�:�:��
�J�J�
���I�J�I��I�X�S��\��EH����".��<A�����z�� ����i�G��e�t�4�E�	���W�B���<�	���X�w�h��?�	���V�7��+�	���U�&��)�	���U�)��,�
�@�'7�'=�'=�'?�@�
@�F�$���d��T�>���(�C��v�,�7�
��"���M�M�*�����$��q�k�9J�K�%�l�3�E��M�M��C��-�t�a��v�Q�K�/@�%�)�)�U�Y�Y�
�%��M�M�%��9r#python3.12/site-packages/pip/_vendor/rich/__pycache__/style.cpython-312.pyc000064400000101415151732701670022350 0ustar00�

R`i�i���ddlZddlmZddlmZmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZddlmZddlmZmZmZmZdd	lmZmZdd
lmZmZeedfZGd�d
�Z eGd�d��Z!e!�Z"Gd�d�Z#y)�N)�	lru_cache)�dumps�loads)�randint)�Any�Dict�Iterable�List�Optional�Type�Union�cast�)�errors)�Color�ColorParseError�ColorSystem�	blend_rgb)�Result�	rich_repr)�DEFAULT_TERMINAL_THEME�
TerminalTheme�Stylec�F�eZdZdZdgZdeddfd�Zddd	eddee	fd
�Z
y)�_Bitz.A descriptor to get/set a style attribute bit.�bit�bit_no�returnNc��d|z|_y)Nr)r)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/style.py�__init__z
_Bit.__init__s
����;����objr�objtypec�n�|j|jzr|j|jzdk7Sy)Nr)�_set_attributesr�_attributes)r r$r%s   r!�__get__z_Bit.__get__s/��������)��?�?�T�X�X�-��2�2�r#)�__name__�
__module__�__qualname__�__doc__�	__slots__�intr"rr�boolr)�r#r!rrsA��8���I��s��t���7��T�'�]��x��~�r#rc&�V�eZdZUdZeeed<eeed<eed<eed<eeed<eed<ee	ed<gd	�Z
d
ddd
dddddddddd�
Zidd�dd�dd�dd�dd�dd�dd�dd�d d �d!d!�d"d"�d#d"�d$d$�d%d$�d&d&�d'd&�d(d(�d(d)d*d+d+d,��Zd-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d.�d/ee
eefd0ee
eefdeedeedeedeed eed!eed"eed$eed&eed(eed)eed*eed+eed1eed2eeeeff"d3�Zedrd5��Ze	dsd/eed0eed4dfd6��Zed2eeeefd4dfd7��Zedtd2eeeefd8ed4dfd9��Zed:�Zed;�Zed<�Zed=�Zed>�Zed?�Zed@�ZedA�ZedB�Z edC�Z!edD�Z"edE�Z#edF�Z$e%d4efdG��Z&d4efdH�Z'd4efdI�Z(dJe)d4efdK�Z*ee+dL�M�dNed4efdO���Z,edPee-d4e-fdQ��Z.d4e/fdR�Z0dSed4efdT�Z1dSed4efdU�Z2d4efdV�Z3e%d4eefdW��Z4e%d4eefdX��Z5e%d4eefdY��Z6e%d4efdZ��Z7e%drd[��Z8e%d4eeeffd\��Z9e%drd]��Z:ee+d^�M�d_ed4dfd`���Z;e+dL�M�dtdaee<d4efdb��Z=edce>dd4dfdd��Z?edude��Z@drdf�ZAe+dg�M�drdh��ZBdtd1eed4dfdi�ZC	dve)j�djdk�dledJee)dmed4efdn�ZEdtdleed4d-fdo�ZFe+dL�M�dNedd4dfdp��ZGdNedd4dfdq�ZHy-)wra�A terminal style.

    A terminal style consists of a color (`color`), a background color (`bgcolor`), and a number of attributes, such
    as bold, italic etc. The attributes have 3 states: they can either be on
    (``True``), off (``False``), or not set (``None``).

    Args:
        color (Union[Color, str], optional): Color of terminal text. Defaults to None.
        bgcolor (Union[Color, str], optional): Color of terminal background. Defaults to None.
        bold (bool, optional): Enable bold text. Defaults to None.
        dim (bool, optional): Enable dim text. Defaults to None.
        italic (bool, optional): Enable italic text. Defaults to None.
        underline (bool, optional): Enable underlined text. Defaults to None.
        blink (bool, optional): Enabled blinking text. Defaults to None.
        blink2 (bool, optional): Enable fast blinking text. Defaults to None.
        reverse (bool, optional): Enabled reverse text. Defaults to None.
        conceal (bool, optional): Enable concealed text. Defaults to None.
        strike (bool, optional): Enable strikethrough text. Defaults to None.
        underline2 (bool, optional): Enable doubly underlined text. Defaults to None.
        frame (bool, optional): Enable framed text. Defaults to None.
        encircle (bool, optional): Enable encircled text. Defaults to None.
        overline (bool, optional): Enable overlined text. Defaults to None.
        link (str, link): Link URL. Defaults to None.

    �_color�_bgcolorr(r'�_hash�_null�_meta)r3r4r(r'�_link�_link_id�_ansi�_style_definitionr5r6r7�1�2�3�4�5�6�7�8�9�21�51�52�53)
rr��������	�
���dim�d�bold�b�italic�i�	underline�u�blink�blink2�reverse�r�conceal�c�strike�s�
underline2�frame�encircle�overline)�uurerfrg�oN)�color�bgcolorrVrTrXrZr\r]r^r`rbrdrerfrg�link�metarjrkrlrmc�v�d|_d|_dtttfdtfd�}|�dn||�|_|�dn||�|_t|du|duxrd|duxrd|duxrd|duxrd|duxrd|	duxrd	|
duxrd
|duxrd|duxrd|
duxrd
|duxrd|duxrdf
�|_|jr�t|xrdxsd|xrdxsd|xrdxsd|xrdxsd|xrdxsd|xrdxsd|	xrd	xsd|
xrd
xsd|xrdxsd|xrdxsd|
xrd
xsd|xrdxsd|xrdxsdf
�nd|_	||_
|�dn
t|�|_|s|r#tdd��t|j���nd|_d|_|jxs|xs
|xs|xs||_y)Nrjrc�P�t|t�r|Stj|�S�N)�
isinstancer�parse)rjs r!�_make_colorz#Style.__init__.<locals>._make_color�s��&�u�e�4�5�L�%�+�+�e�:L�Lr#rIrKrO�� �@������rr�?B�)r:r;r
r�strr3r4�sumr'r(r8rr7r�hashr9r5r6)r rjrkrVrTrXrZr\r]r^r`rbrdrerfrgrlrmrss                   r!r"zStyle.__init__zsD��*%)��
�04���	M�u�U�C�Z�0�	M�U�	M�$�m�d��U�1C��� '���[��5I��
�"��D� ��4��%�A��d�"�(�q���%�+�!��T�!�(�b��d�"�)�r��t�#�*���t�#�+���d�"�*�s��$�&�.�3��T�!�*�d���$�-����$�-��
� 
���F�#�#�#
��J�Q�O�!��I�A�N���L�q�%�A��O�!�(�q��L�b�%�A��M�r�&�Q��N��'�a��O��(�q��N�s�'�a��&�3�+�!��N�d�'�a��%��*���%��*���
�$�'	
��,��
�!�\�T�u�T�{��
�:>�$�w�q�&�!�"�4��
�
�#3�"4�5�R�	
�
�%)��
��.�.�R�%�R�7�R�d�R�d�S��
r#rc��tS)zCCreate an 'null' style, equivalent to Style(), but more performant.)�
NULL_STYLE)�clss r!�nullz
Style.null�s
���r#c���|jt�}d|_d|_||_||_d|_d|_d|_d|_	d|_
|xs||_d|_|S)aCreate a new style with colors and no attributes.

        Returns:
            color (Optional[Color]): A (foreground) color, or None for no color. Defaults to None.
            bgcolor (Optional[Color]): A (background) color, or None for no color. Defaults to None.
        Nrr~)
�__new__rr:r;r3r4r'r(r8r9r7r6r5)r�rjrk�styles    r!�
from_colorzStyle.from_color�so���{�{�5�)�����"&������ ��� !��������������� �+�G�,�������r#c� �|jt�}d|_d|_d|_d|_d|_d|_d|_t|�|_
tdd��t|j���|_
d|_||_|S)z�Create a new style with meta data.

        Returns:
            meta (Optional[Dict[str, Any]]): A dictionary of meta data. Defaults to None.
        Nrr})r�rr:r;r3r4r'r(r8rr7rr�r9r5r6)r�rmr�s   r!�	from_metazStyle.from_meta�s����{�{�5�)�����"&��������� !����������D�k���#�A�v�.�/��U�[�[�0A�/B�C�������j����r#�handlersc��|�in|}|j|j�D��cic]\}}d|��|��
c}}�|j|�Scc}}w)a�Create a blank style with meta information.

        Example:
            style = Style.on(click=self.on_click)

        Args:
            meta (Optional[Dict[str, Any]], optional): An optional dict of meta information.
            **handlers (Any): Keyword arguments are translated in to handlers.

        Returns:
            Style: A Style with meta information attached.
        �@)�update�itemsr�)r�rmr��key�values     r!�onzStyle.on�sW���\�r�t��������8H�I�8H�*�#�u�q���Y��%�8H�I�J��}�}�T�"�"��Js�A
rrrIrJrKrLrMrNrOrPrQrRrSc��|jS)z+Get a link id, used in ansi code for links.)r9�r s r!�link_idz
Style.link_id����}�}�r#c�t�|j�� g}|j}|j}|dzrl|dzr||jrdnd�|dzr||jrdnd�|dzr||j
rd	nd
�|dzr||jrdnd
�|dzr�|dzr||jrdnd�|dzr||jrdnd�|dzr||jrdnd�|dzr||jrdnd�|dzr||jrdnd�|dzrl|dzr||jrd nd!�|d"zr||jrd#nd$�|d%zr||jrd&nd'�|d(zr||jrd)nd*�|j �||j j"�|j$�$|d+�||j$j"�|j&r|d,�||j&�d-j)|�xsd.|_|jS)/z-Re-generate style definition from attributes.�rrVznot boldrIrTznot dimrKrXz
not italicrOrZz
not underline��rtr\z	not blinkrur]z
not blink2rvr^znot reverserwr`znot concealrxrbz
not strike�ryrdznot underline2rzrez	not framer{rfznot encircler|rgznot overliner�rl� �none)r;�appendr'rVrTrXrZr\r]r^r`rbrdrerfrgr3�namer4r8�join)r �
attributesr��bitss    r!�__str__z
Style.__str__s����!�!�)�$&�J��&�&�F��'�'�D��o�%��!�8��T�Y�Y�6�J�?��6�?��D�H�H�5�)�<��6�?��t�{�{�8��E��6�?��$�.�.�;�o�N��o�%��6�?��d�j�j�7�k�B��6�?��t�{�{�8��E��6�?�����9�-�H��6�?�����9�-�H��6�?��t�{�{�8��E��o�%��6�?��4�?�?�<�@P�Q��7�#��d�j�j�7�k�B��7�#�����:�N�K��7�#�����:�N�K��{�{�&��t�{�{�'�'�(��}�}�(��t���t�}�}�)�)�*��z�z��v���t�z�z�"�%(�X�X�j�%9�%C�V�D�"��%�%�%r#c��|jS)z;A Style is false if it has no attributes, colors, or links.)r6r�s r!�__bool__zStyle.__bool__Ks���:�:�~�r#�color_systemc��|j��ig}|j}|j}|j|jz}|r�|dzr||d�|dzr||d�|dzr||d�|dzr||d�|dzr%tdd�D]}|d|zzs�|||��|d	zr%tdd
�D]}|d|zzs�|||��|j�8|j|jj|�j��|j�:|j|jj|�jd���d
j|�|_|jS)z�Generate ANSI codes for this style.

        Args:
            color_system (ColorSystem): Color system.

        Returns:
            str: String containing codes.
        rrrIrKrOrJr�rPr��
F��
foreground�;)r:r��
_style_mapr(r'�ranger3�extend�	downgrade�get_ansi_codesr4r�)r r��sgrr�r�r�rs       r!�_make_ansi_codeszStyle._make_ansi_codesOss���:�:���C��Z�Z�F����J��)�)�D�,@�,@�@�J����>��:�a�=�)���>��:�a�=�)���>��:�a�=�)���>��:�a�=�)���/�$�Q��{��%��c��2�"�:�c�?�3� +���/�$�Q��|��%��c��2�"�:�c�?�3� ,��{�{�&��
�
�4�;�;�0�0��>�M�M�O�P��}�}�(��
�
��M�M�+�+�L�9�H�H�#(�I���
���#��D�J��z�z�r#rz)�maxsizer�c��	t|j|��S#tj$r!|j	�j�cYSwxYw)z�Normalize a style definition so that styles with the same effect have the same string
        representation.

        Args:
            style (str): A style definition.

        Returns:
            str: Normal form of style definition.
        )rrrr�StyleSyntaxError�strip�lower)r�r�s  r!�	normalizezStyle.normalizezsE��	)��s�y�y��'�(�(���&�&�	)��;�;�=�&�&�(�(�	)�s��1A�A�valuesc�2�|D]}|��|cStd��)zPick first non-None style.z$expected at least one non-None style)�
ValueError)r�r�r�s   r!�
pick_firstzStyle.pick_first�s'���E�� �����?�@�@r#c#�DK�d|jdf��d|jdf��d|jdf��d|jdf��d|jdf��d|j
df��d|jdf��d|jdf��d	|jdf��d
|jdf��d|jdf��d|jdf��d
|jdf��d|jdf��d|jdf��|jrd|j f��yy�w)NrjrkrVrTrXrZr\r]r^r`rbrdrerfrlrm)rjrkrVrTrXrZr\r]r^r`rbrdrerfrlr7rmr�s r!�
__rich_repr__zStyle.__rich_repr__�s �����t�z�z�4�'�'�����t�+�+��d�i�i��&�&��T�X�X�t�$�$�����T�)�)��4�>�>�4�0�0��t�z�z�4�'�'�����T�)�)�����t�+�+�����t�+�+�����T�)�)��D�O�O�T�1�1��t�z�z�4�'�'��$�-�-��-�-��d�i�i��%�%��:�:��$�)�)�#�#��s�DD �otherc�p�t|t�stS|j�|j�k(Srp�rqr�NotImplemented�__hash__�r r�s  r!�__eq__zStyle.__eq__��*���%��'�!�!��}�}��%�.�.�"2�2�2r#c�p�t|t�stS|j�|j�k7Srpr�r�s  r!�__ne__zStyle.__ne__�r�r#c���|j�|jSt|j|j|j|j
|j|jf�|_|jSrp)r5r�r3r4r(r'r8r7r�s r!r�zStyle.__hash__�sa���:�:�!��:�:�������
�
�� � ��$�$��
�
��
�
�

�	
��
��z�z�r#c��|jS)z.The foreground color or None if it is not set.)r3r�s r!rjzStyle.color�s���{�{�r#c��|jS)z.The background color or None if it is not set.)r4r�s r!rkz
Style.bgcolor�r�r#c��|jS)zLink text, if set.)r8r�s r!rlz
Style.link�s���z�z�r#c�N�|jduxs|jjS)z6Check if the style specified a transparent background.N)rk�
is_defaultr�s r!�transparent_backgroundzStyle.transparent_background�s"���|�|�t�#�>�t�|�|�'>�'>�>r#c�.�t|j��S)zA Style with background only.)rk)rrkr�s r!�background_stylezStyle.background_style�s���T�\�\�*�*r#c�~�|j�iSttttft|j��S)z=Get meta information (can not be changed after construction).)r7rrrrrr�s r!rmz
Style.meta�s0���Z�Z�'�r�T�T�$�s�C�x�.�%��
�
�BS�-T�Tr#c�\�|jrtS|jt�}d|_d|_d|_d|_|j|_|j|_	|j|_
|jr
tdd��nd|_d|_d|_
d|_|S)z+Get a copy of the style with color removed.Nrr}r~F)r6r�r�rr:r;r3r4r(r'r8rr9r7r5�r r�s  r!�
without_colorzStyle.without_color�s����:�:����|�|�E�*�����"&��������� �,�,��� $� 4� 4����j�j���48�J�J�G�A�v�.�/�B�������������r#r|�style_definitionc�T�|j�dk(s|s|j�S|j}d}d}i}d}t|j	��}|D]�}|j�}	|	dk(r>t
|d�}	|	stjd��	tj|	�du|	}�V|	dk(r=t
|d�}	|j|	�}|�tjd	|	����d
||<��|	dk(r&t
|d�}	|	stjd��|	}��|	|vr	d
|||	<��	tj|	�|	}��td|||d�|��}|S#t$r!}
tjd|	�d|
���d�d}
~
wwxYw#t$r!}
tjd|	�d|
���d�d}
~
wwxYw)aParse a style definition.

        Args:
            style_definition (str): A string containing a style.

        Raises:
            errors.StyleSyntaxError: If the style definition syntax is invalid.

        Returns:
            `Style`: A Style instance.
        r�Nr�r~zcolor expected after 'on'zunable to parse z as background color; �notz,expected style attribute after 'not', found FrlzURL expected after 'link'Tz as color; )rjrkrlr1)r�r��STYLE_ATTRIBUTES�iter�splitr��nextrr�rrrr�getr)
r�r�r�rjrkr�rl�words�
original_word�word�error�	attributer�s
             r!rrzStyle.parse�s����!�!�#�v�-�5E��8�8�:���/�/��#��!%��/1�
�"���%�+�+�-�.��"�M� �&�&�(�D��t�|��E�2���� �1�1�2M�N�N� ��K�K��%��-�
������E�2���,�0�0��6�	��$� �1�1�F�t�h�O���).�
�9�%�����E�2���� �1�1�2M�N�N����)�)�59�
�+�D�1�2� ��K�K��%�
��O#�P�L�E�7��L��L�����C'� � �1�1�*�4�(�2H���P��� �� ��6'� � �1�1�*�4�(�+�e�W�E��� �� �s0�E�&E=�	E:�E5�5E:�=	F'�F"�"F'�themec���|xst}g}|j}|j}|j}|jr||}}|j
rI|�|jn|j|�}tjt||jd��}|�;|j|�}|d|j���|d|j���|�(|j|d��}|d|j���|jr|d�|jr|d�|jr|d	�|j r|d
�|j"r|d�dj%|�S)
zGet a CSS style rule.g�?zcolor: ztext-decoration-color: Fr�zbackground-color: zfont-weight: boldzfont-style: italicztext-decoration: underlineztext-decoration: line-throughztext-decoration: overlinez; )rr�rjrkr^rT�foreground_color�
get_truecolorr�from_tripletr�background_color�hexrVrXrZrbrgr�)r r��cssr�rjrkr��theme_colors        r!�get_html_stylezStyle.get_html_style3sZ���/�/���������
�
���,�,���<�<�$�e�7�E��8�8�*/�-��&�&�U�=P�=P�QV�=W�
��&�&��*�E�,B�,B�C�H��E����-�-�e�4�K��W�[�_�_�-�.�/��,�[�_�_�,=�>�?���!�/�/��%�/�H�K��'����'8�9�:��9�9��&�'��;�;��'�(��>�>��/�0��;�;��2�3��=�=��.�/��y�y��~�r#�stylesc�B�t|�}t|t|��S)z�Combine styles and get result.

        Args:
            styles (Iterable[Style]): Styles to combine.

        Returns:
            Style: A new style instance.
        �r�r�r��r�r��iter_styless   r!�combinez
Style.combineX����6�l���;��[� 1�2�2r#c�B�t|�}t|t|��S)z�Combine styles from positional argument in to a single style.

        Args:
            *styles (Iterable[Style]): Styles to combine.

        Returns:
            Style: A new style instance.
        r�r�s   r!�chainzStyle.chainer�r#c���|jrtS|jt�}|j|_|j
|_|j|_|j|_|j|_|j|_	|j|_
|jr
tdd��nd|_|j|_
d|_|j|_|S)zwGet a copy of this style.

        Returns:
            Style: A new Style instance with identical attributes.
        rr}r~F)r6r�r�rr:r;r3r4r(r'r8rr9r5r7r�s  r!�copyz
Style.copyrs����:�:����|�|�E�*���j�j���"&�"8�"8����{�{�������� �,�,��� $� 4� 4����j�j���48�J�J�G�A�v�.�/�B����j�j�������j�j����r#rwc�z�|jrtS|jt�}|j|_|j
|_|j|_|j|_|j|_|j|_	d|_
d|_|j|_d|_d|_
|S)z�Get a copy of this style with link and meta information removed.

        Returns:
            Style: New style object.
        Nr~F)r6r�r�rr:r;r3r4r(r'r8r9r5r7r�s  r!�clear_meta_and_linkszStyle.clear_meta_and_links�s����:�:����|�|�E�*���j�j���"&�"8�"8����{�{�������� �,�,��� $� 4� 4����������j�j����������r#c�t�|jt�}|j|_|j|_|j|_|j
|_|j|_|j|_||_|r
tdd��nd|_
d|_d|_|j|_
|S)z�Get a copy with a different value for link.

        Args:
            link (str, optional): New value for link. Defaults to None.

        Returns:
            Style: A new Style instance.
        rr}r~NF)r�rr:r;r3r4r(r'r8rr9r5r6r7)r rlr�s   r!�update_linkzStyle.update_link�s����|�|�E�*���j�j���"&�"8�"8����{�{�������� �,�,��� $� 4� 4������48�G�A�v�.�/�b����������j�j����r#F)r��legacy_windows�textr�c���|r|�|S|jxs|j|�}|r	d|�d|�d�n|}|jr"|s d|j�d|j�d|�d�}|S)aDRender the ANSI codes for the style.

        Args:
            text (str, optional): A string to style. Defaults to "".
            color_system (Optional[ColorSystem], optional): Color system to render to. Defaults to ColorSystem.TRUECOLOR.

        Returns:
            str: A string containing ANSI style codes.
        z[�mzz]8;id=r�z\z]8;;\)r:r�r8r9)r r�r�r��attrs�rendereds      r!�renderzStyle.render�sw�� �|�+��K��
�
�A�d�3�3�L�A��49�U�5�'��4�&��0�t���:�:�n��T�]�]�O�1�T�Z�Z�L��x�j��W�
��r#c��|xst|�}tjj|j	|��d��y)z�Write text with style directly to terminal.

        This method is for testing purposes only.

        Args:
            text (Optional[str], optional): Text to style or None for style name.

        �
N)r�sys�stdout�writer)r r�s  r!�testz
Style.test�s5��� �s�4�y���
�
���D�K�K��-�.�b�1�2r#c��|�|jr|S|jr|S|jt�}d|_d|_|j
xs|j
|_|jxs|j|_|j|jz|j|jzz|_|j|jz|_|jxs|j|_	|jxs|j|_
|j|_|jr5|jr)ti|j�|j��|_n|jxs|j|_d|_|Srp)r6r�rr:r;r3r4r(r'r8r9r7rrmr5)r r��	new_styles   r!�_addz
Style._add�s6���=�E�K�K��K��:�:��L��<�<��.�	��	��&*�	�#� �<�<�6�4�;�;�	��"�^�^�<�t�}�}�	��!%�!1�!1�U�5J�5J�4J�!J����� 5� 5�5�!
�	��%)�$8�$8�5�;P�;P�$P�	�!��+�+�3����	��"�^�^�<�t�}�}�	���+�+�	���:�:�%�+�+�#�$?�t�y�y�$?�E�J�J�$?�@�I�O�"�j�j�7�E�K�K�I�O��	���r#c�`�|j|�}|jr|j�S|Srp)rrlr�)r r��combined_styles   r!�__add__z
Style.__add__�s,�����5�)��(6�(;�(;�~�"�"�$�O��Or#)rr)NNrp)r�rrr)r~)Ir*r+r,r-rr�__annotations__r/r0�bytesr.r�r�r
rrrr"�classmethodr�r�r�r�rrVrTrXrZr\r]r^r`rbrdrerfrg�propertyr�r�r�rr�rr��	StyleTyper�rr�r�r�r�rjrkrlr�r�rmr�rrrr�r	r�r�r�r�r��	TRUECOLORrrrrr1r#r!rrs���4
�U�O���u�o�������C�=���K��E�?���I� ��������������J� �
�u���U��	���	�V�	�
	�(��	�X�
�	�[��	�[��	���	�(��	�9��	�Y��	�9��	�Y��	�(�� 	�X�!�"	�l�#�$����
�-��8.2�/3�#�"�!%�$(� $�!%�"&�"&�!%�%)� $�#'�#'�"�)-�'JT���e�S�j�)�*�JT��%��s�
�+�,�	JT�
�t�n�JT��d�^�
JT����JT��D�>�JT���~�JT����JT��$��JT��$��JT����JT��T�N�JT���~�JT� �4�.�!JT�"�4�.�#JT�$�s�m�%JT�&�t�C��H�~�&�'JT�X�����GK���U�O��5=�e�_��	����.��X�d�3��8�n�5��'����(�#�h�t�C��H�~�.�#�3�#�7�#��#�"��7�D�
�q�'�C�
�!�W�F��Q��I���G�E�
�!�W�F��1�g�G��1�g�G�
�!�W�F��a��J���H�E��B�x�H��B�x�H�
������,&��,&�\�$��)�[�)�S�)�V��t��
)�c�
)�c�
)���
)��A��)�!4�A��A��A�$�v�$�&3�C�3�D�3�
3�C�3�D�3�

�#�
���x���������%�������h�s�m�����?��?��?��+��+��U�d�3��8�n�U��U�����$��t��?�S�?�W�?���?�B�t��"�H�]�$;�"�s�"��"�H�
3�X�g�.�
3�7�
3��
3��
3��
3��,�s�����,���
����2��/:�.C�.C�$�����{�+�	�
��

�
�4
3��#��
3�$�
3��t���(�7�+������0P�X�g�.�P�7�Pr#c�\�eZdZdZdgZdd�Zdefd�Zede	fd��Z
de	ddfd	�Zde	fd
�Zy)�
StyleStackzA stack of styles.�_stackrNc��|g|_yrp�r)r �
default_styles  r!r"zStyleStack.__init__s��$1�?��r#c�"�d|j�d�S)Nz<stylestack �>rr�s r!�__repr__zStyleStack.__repr__s���d�k�k�_�A�.�.r#c� �|jdS)z&Get the Style at the top of the stack.���rr�s r!�currentzStyleStack.currents���{�{�2��r#r�c�Z�|jj|jd|z�y)z}Push a new style on to the stack.

        Args:
            style (Style): New style to combine with current style.
        rN)rr�r�s  r!�pushzStyleStack.push
s#��	
�����4�;�;�r�?�U�2�3r#c�T�|jj�|jdS)z}Pop last style and discard.

        Returns:
            Style: New current style (also available as stack.current)
        r)r�popr�s r!r$zStyleStack.pops ��	
�������{�{�2��r#)rrrN)
r*r+r,r-r.r"rrrrr r"r$r1r#r!rr�sW����
�I�3�/�#�/�������4�%�4�D�4��U�r#r)$r�	functoolsr�marshalrr�randomr�typingrrr	r
rrr
rr~rrjrrrr�reprrr�terminal_themerrrrrrr�rr1r#r!�<module>r+sv��
�� ��I�I�I��A�A�#�A�
�#�w�,��	����XP�XP��XP�v�W�
��r#python3.12/site-packages/pip/_vendor/rich/__pycache__/region.cpython-312.pyc000064400000001150151732701670022466 0ustar00�

R`i���&�ddlmZGd�de�Zy)�)�
NamedTuplec�:�eZdZUdZeed<eed<eed<eed<y)�Regionz+Defines a rectangular region of the screen.�x�y�width�heightN)�__name__�
__module__�__qualname__�__doc__�int�__annotations__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/region.pyrrs��5�
�F�
�F��J��KrrN)�typingrrrrr�<module>rs����Z�rpython3.12/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-312.pyc000064400000003362151732701670024147 0ustar00�

R`i(�	��ddlmZmZmZddlZddlmZeeZeegefZ	ee	egefZ
dejd�jfdedeede
d	efd
�Z
y)�)�Callable�Match�OptionalN�)�EMOJIz!(:(\S*?)(?:(?:\-)(emoji|text))?:)�text�default_variant�
_emoji_sub�returnc�����tj�ddd�}|j�|r|j|d�nd�dttdtf���fd�}|||�S)zReplace emoji code in text.u︎u️)r�emoji��matchrc���|j�\}}}	�|j���|��zS#t$r|cYSwxYw)N)�groups�lower�KeyError)r�
emoji_code�
emoji_name�variant�default_variant_code�	get_emoji�get_variants    �����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_replace.py�
do_replacez"_emoji_replace.<locals>.do_replacesY���*/�,�,�.�'�
�J��	��Z�-�-�/�0�;��-�4��
���	���	�s�7�A�A)r�__getitem__�getr�str)rr	r
�variantsrrrrs     @@@r�_emoji_replacer s_����!�!�I� �8�4�H��,�,�K�@O�8�<�<���<�UW���%��*�����j�$�'�'�)�typingrrr�re�_emoji_codesrr�_ReStringMatch�_ReSubCallable�_EmojiSubMethod�compile�subr �r!r�<module>r+s���,�,�	���s����>�*�C�/�0���N�C�0�#�5�6��
&*�",�"�*�*�-Q�"R�"V�"V�(�

�(��c�]�(� �(�	�	(r!python3.12/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-312.pyc000064400000004403151732701670023207 0ustar00�

R`i��^�ddlmZmZddlmZddlmZerddlmZm	Z	m
Z
mZGd�de�Zy)	�)�Optional�
TYPE_CHECKING�)�JupyterMixin)�Measurement)�Console�ConsoleOptions�RenderableType�RenderResultc�T�eZdZdZd
dddeeddfd�Z						dd�Z						dd	�Zy)
�	Constrainz�Constrain the width of a renderable to a given number of characters.

    Args:
        renderable (RenderableType): A renderable object.
        width (int, optional): The maximum width (in characters) to render. Defaults to 80.
    �
renderabler
�width�returnNc� �||_||_y�N)rr)�selfrrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/constrain.py�__init__zConstrain.__init__s��$�����
�c#��K�|j�|j��y|jt|j|j��}|j|j|�Ed{���y7��wr)rr�update_width�min�	max_width�render)r�console�options�
child_optionss    r�__rich_console__zConstrain.__rich_console__sU�����:�:���/�/�!�#�0�0��T�Z�Z��AR�AR�1S�T�M��~�~�d�o�o�}�E�E�E�s�A*A4�,A2�-A4c��|j�|j|j�}tj|||j�}|Sr)rrr�getr)rrr�measurements    r�__rich_measure__zConstrain.__rich_measure__s>���:�:�!��*�*�4�:�:�6�G�!�o�o�g�w����H���r)�P)rrrr	rr)rrrr	rr)	�__name__�
__module__�__qualname__�__doc__r�intrrr#�rrr
r

se����#3��H�S�M��SW��F� �F�+;�F�	�F�� ��+;��	�rr
N)
�typingrr�jupyterr�measurerrrr	r
rr
r*rr�<module>r.s#��*�!� ��N�N���rpython3.12/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-312.pyc000064400000004537151732701670022327 0ustar00�

R`i0�
��ddlZddlmZmZmZddlmZddlmZm	Z	ejd�Zdedeee
e
effd	�Zdded
e
dedee
fd�Zed
k(r2ddlmZed��Zej)d�ee	ddd���yy)�N)�Iterable�List�Tuple�)�	loop_last)�cell_len�
chop_cellsz	\s*\S+\s*�text�returnc#��K�d}tj||�}|�E|j�\}}|jd�}|||f��tj||�}|��Dyy�w)Nr)�re_word�match�span�group)r
�position�
word_match�start�end�words      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_wrap.py�wordsr
sf�����H����t�X�.�J�
�
 ��_�_�&�
��s�����"���S�$����]�]�4��-�
�	�
 �s�AA#�!A#�width�foldc��g}|j}d}t}t|�D]�\}}}	||	j��}
||
z|kDrv|
|kDrZ|rEt	|	|d��}t|�D](\}}
|r||�|r	||
�}�|t
|
�z
}�*�q|r||�||	�}��|s��|s��||�||	�}��|||	�z
}��|S)Nr)�max_sizer)�appendrr�rstripr	r�len)r
rr�dividesr�
line_position�	_cell_lenr�_endr�word_length�
chopped_words�last�lines              r�divide_liner's����G�
�^�^�F��M��I�"�4�[���t�T�����
�.���;�&��.��U�"��$.�t�e�a�$P�M�&/�
�&>�
��d� �"�5�M��,5�d�O�M�!�S��Y�.�E�'?���u�
�$-�d�O�M��5��u�
� )�$��
��Y�t�_�,�M�-)�.�N��__main__)�Console�
)rz@12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345�abcdefghijklmnopqrstuvwxyz�)r)T)�re�typingrrr�_loopr�cellsrr	�compiler
�str�intr�boolr'�__name__�consoler*�print�r(r�<module>r:s���	�(�(��'�
�"�*�*�\�
"��.��.���s�C��}�!5�6�.��c��#��T��T�#�Y��>�z�� ��B��G��M�M�T�U�	�*�1�2��
B�C�r(python3.12/site-packages/pip/_vendor/rich/__pycache__/live.cpython-312.pyc000064400000045162151732701670022155 0ustar00�

R`i�7�
�T�UddlZddlmZmZmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZmZmZmZddlmZdd	lmZdd
lmZddlmZmZddl m!Z!dd
l"m#Z#Gd�de�Z$Gd�dee�Z%e&dk(�rddl'Z'ddl(Z(ddl)m*Z*ddlm+Z+mZm,Z,ddl-m.Z.ddlmZddl/m%Z%ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7e�Ze5ddd��Z4e7d d!d"�Z6e6jqd#d$d%�d&e1d'�d(e6d)d*d+d,�d-e4e3d.�g	Z9e*e9�Z:gd/�Z;e%e�0�5Z<iZ=e+e,e>e>fe?fe@d1<eAd2�D�]VZBe;eBeCe;�zZDe;D�]?ZEeEeDk(r�
e(j�d3�e'j�dd4�dkrej�eIe:��d5e'jN�d6zdzze=eDeEf<eCe=�eCe;�dz
kDr(e=j�eKe=j���d�e7d7�8�Z6e6j�d9�e6j�d:�e6j�d;�e=j��D],\\ZOZPZQe6jqeOePe#eQd<�eQd=krd>nd?�@���.e<j�e.j�e6����B��Y	ddd�yy#1swYyxYw)A�N)�Event�RLock�Thread)�
TracebackType)�IO�Any�Callable�List�Optional�TextIO�Type�cast�)�get_console)�Console�ConsoleRenderable�RenderableType�
RenderHook)�Control)�	FileProxy)�JupyterMixin)�
LiveRender�VerticalOverflowMethod)�Screen)�Textc�@��eZdZdZdddeddf�fd�Zd
d�Zd
d	�Z�xZS)�_RefreshThreadz3A thread that calls refresh() at regular intervals.�live�Live�refresh_per_second�returnNc�`��||_||_t�|_t�|�d��y)NT)�daemon)rr r�done�super�__init__)�selfrr �	__class__s   ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/live.pyr&z_RefreshThread.__init__s+�����	�"4����G��	�
�����%�c�8�|jj�y�N)r$�set�r's r)�stopz_RefreshThread.stops���	�	�
�
�r*c�f�|jjd|jz�s}|jj5|jj�s|jj
�ddd�|jjd|jz�s�|yy#1swY�4xYw)Nr)r$�waitr r�_lock�is_set�refreshr.s r)�runz_RefreshThread.runsp���)�)�.�.��T�%<�%<�!<�=�������y�y�'�'�)��I�I�%�%�'�!��)�)�.�.��T�%<�%<�!<�=� ��s�5B'�'B0�r!N)	�__name__�
__module__�__qualname__�__doc__�floatr&r/r5�
__classcell__)r(s@r)rrs*���=�&�V�&��&�4�&��(r*rc�R�eZdZdZ	d&dddddddddd�	deed	eed
ededed
ededede	dee
gefddfd�Zedefd��Z
defd�Zd'deddfd�Zd(d�Zd)d�Zdeeedeedeeddfd�Zd(d�Zd(d�Zedefd ��Zdd!�dededdfd"�Zd(d#�Zd$eedeefd%�Zy)*ra�Renders an auto-updating live display of any given renderable.

    Args:
        renderable (RenderableType, optional): The renderable to live display. Defaults to displaying nothing.
        console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout.
        screen (bool, optional): Enable alternate screen mode. Defaults to False.
        auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()` or `update()` with refresh flag. Defaults to True
        refresh_per_second (float, optional): Number of times per second to refresh the live display. Defaults to 4.
        transient (bool, optional): Clear the renderable on exit (has no effect when screen=True). Defaults to False.
        redirect_stdout (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
        redirect_stderr (bool, optional): Enable redirection of stderr. Defaults to True.
        vertical_overflow (VerticalOverflowMethod, optional): How to handle renderable when it is too tall for the console. Defaults to "ellipsis".
        get_renderable (Callable[[], RenderableType], optional): Optional callable to get renderable. Defaults to None.
    NFT��ellipsis)	�console�screen�auto_refreshr �	transient�redirect_stdout�redirect_stderr�vertical_overflow�get_renderable�
renderabler@rArBr rCrDrErFrGr!c	�z�|dkDsJd��||_|�|n	t�|_||_d|_||_||_d|_d|_t�|_
d|_||_d|_
|rdn||_d|_||_|	|_|
|_t'|j)�|	��|_y)Nrzrefresh_per_second must be > 0FT)rF)�_renderablerr@�_screen�_alt_screen�_redirect_stdout�_redirect_stderr�_restore_stdout�_restore_stderrrr2�
ipy_widgetrB�_startedrC�_refresh_threadr rF�_get_renderablerrG�_live_render)r'rHr@rArBr rCrDrErFrGs           r)r&z
Live.__init__3s���"�A�%�G�'G�G�%�%���")�"5�w�;�=������ ��� /��� /���26���26����W��
�)-���(���#��
�!'��Y���9=���"4���!2���-���&����!�5F�
��r*c��|jS)z'Check if live display has been started.)rRr.s r)�
is_startedzLive.is_started[s���}�}�r*c�^�|j�|j�n|j}|xsdS)N�)rTrJ�r'rHs  r)rGzLive.get_renderable`s9���#�#�/�
� � �"��!�!�	�
��R�r*r4c�~�|j5|jr
	ddd�y|jj|�d|_|jr |jjd�|_|jjd�|j�|jj|�|r	|j�|jr5t||j�|_|j j#�ddd�y#t$r|j��wxYw#1swYyxYw)z|Start live rendering display.

        Args:
            refresh (bool, optional): Also refresh. Defaults to False.
        NTF)r2rRr@�set_liverK�set_alt_screenrL�show_cursor�_enable_redirect_io�push_render_hookr4�	Exceptionr/rBrr rS�start)r'r4s  r)rbz
Live.starths����Z�Z��}�}���Z�
�L�L�!�!�$�'� �D�M��|�|�#'�<�<�#>�#>�t�#D�� ��L�L�$�$�U�+��$�$�&��L�L�)�)�$�/����L�L�N�� � �'5�d�D�<S�<S�'T��$��$�$�*�*�,�-�Z��!��
�I�I�K��
���Z�s*�D3�BD3�;D�AD3�D0�0D3�3D<c��|j5|js
	ddd�y|jj�d|_|jr-|j
�!|j
j
�d|_d|_|j5	|js&|jjs|j�|j�|jj�|js0|jjr|jj�|jjd�|jr|jj!d�|j"r?|js3|jj%|j&j)��|j*�'|j"r|j*j-�	ddd�ddd�y#|j�|jj�|js0|jjr|jj�|jjd�|jr|jj!d�|j"r?|js3|jj%|j&j)��|j*�(|j"r|j*j-�wwwxYw#1swY��?xYw#1swYyxYw)zStop live rendering display.NF�visibleT)r2rRr@�
clear_liverBrSr/rFrL�
is_jupyterr4�_disable_redirect_io�pop_render_hook�is_terminal�liner^r]rC�controlrU�restore_cursorrQ�closer.s r)r/z	Live.stop�s8��
�Z�Z��=�=���Z�
�L�L�#�#�%�!�D�M�� � �T�%9�%9�%E��$�$�)�)�+�'+��$�%.�D�"����0��+�+�D�L�L�4K�4K������-�-�/��L�L�0�0�2��+�+����0H�0H����)�)�+��L�L�,�,�T�2��'�'����3�3�E�:��~�~�d�.>�.>����,�,�T�->�->�-M�-M�-O�P����2�t�~�~����-�-�/�!��Z�� �-�-�/��L�L�0�0�2��+�+����0H�0H����)�)�+��L�L�,�,�T�2��'�'����3�3�E�:��~�~�d�.>�.>����,�,�T�->�->�-M�-M�-O�P����2�t�~�~����-�-�/�8F�2������Z�sC�L5�A-L5�L(�2G<�D&L(�+L5�<D)L%�%L(�(L2	�-L5�5L>c�B�|j|jdu��|S)N�r4)rbrJr.s r)�	__enter__zLive.__enter__�s ���
�
�4�+�+�4�7�
�8��r*�exc_type�exc_val�exc_tbc�$�|j�yr,)r/)r'rqrrrss    r)�__exit__z
Live.__exit__�s
��	
�	�	�r*c�:�|jjs|jjr�|jrjt	t
jt�sLt
j|_tdt|jt
j��t
_|jrlt	t
jt�sMt
j|_tdt|jt
j��t
_yyyy)z&Enable redirecting of stdout / stderr.rN)
r@rirfrM�
isinstance�sys�stdoutrrOrrN�stderrrPr.s r)r_zLive._enable_redirect_io�s����<�<�#�#�t�|�|�'>�'>��$�$�Z��
�
�I�-N�'*�z�z��$�!�(�I�d�l�l�C�J�J�,O�P��
��$�$�Z��
�
�I�-N�'*�z�z��$�!�(�I�d�l�l�C�J�J�,O�P��
�.O�$�	(?r*c���|jr&td|j�t_d|_|jr'td|j�t_d|_yy)z'Disable redirecting of stdout / stderr.rN)rOrrxryrPrzr.s r)rgzLive._disable_redirect_io�sQ������h��(<�(<�=�C�J�#'�D� �����h��(<�(<�=�C�J�#'�D� � r*c�T�|j�}|jrt|�S|S)zwGet the renderable that is being displayed

        Returns:
            RenderableType: Displayed renderable.
        )rGrLrrZs  r)rHzLive.renderable�s*���(�(�*�
�%)�%5�%5�v�j�!�E�:�Er*roc���t|t�r|jj|�}|j5||_|r|j
�ddd�y#1swYyxYw)z�Update the renderable that is being displayed

        Args:
            renderable (RenderableType): New renderable to use.
            refresh (bool, optional): Refresh the display. Defaults to False.
        N)rw�strr@�
render_strr2rJr4)r'rHr4s   r)�updatezLive.update�sG���j�#�&����0�0��<�J�
�Z�Z�)�D��������Z�Z�s�A�A$c���|j5|jj|j�|jj
r�	ddlm}ddlm	}|j�|�|_
||j�|j5|jjd��|jj|jj�ddd�n�|jj rO|jj"s9|j5|jjt%��ddd�nP|j&sD|j(s8|j5|jjt%��ddd�ddd�y#1swY�xYw#t$rddl}|jd�Y�5wxYw#1swY�BxYw#1swY�NxYw#1swYyxYw)z&Update the display of the Live Render.r)�display)�OutputNT)r1z(install "ipywidgets" for Jupyter support)r2rU�set_renderablerHr@rf�IPython.displayr��
ipywidgetsr�rQ�clear_output�print�ImportError�warnings�warnri�is_dumb_terminalrrRrC)r'r�r�r�s    r)r4zLive.refresh�sQ��
�Z�Z����,�,�T�_�_�=��|�|�&�&�I�7�1����.�*0�(�������0�������4�4�$�4�?����*�*�4�+<�+<�+G�+G�H�)�����)�)�$�,�,�2O�2O��\�\��L�L�&�&�w�y�1�"�\��M�M�$�.�.��\�\��L�L�&�&�w�y�1�"�1�Z�)���#�N�#��M�M�"L�M�N��"�\��
"�\��1�Z�sy�<G'�
F+�6G'�AF�AG'�$G�=-G'�*$G�G'�F(	�$G'�+G�	G'�G�G'�G	�G'�G$	� G'�'G0�renderablesc��|j|j_|jjrb|j5|j
rt
j�n|jj�}|g|�|j�}ddd�|S|js|jsg|�|j�}|S#1swY|SxYw)z;Process renderables to restore cursor and display progress.N)rFrUr@�is_interactiver2rLr�home�position_cursorrRrC)r'r��resets   r)�process_renderableszLive.process_renderables�s���/3�.D�.D����+��<�<�&�&�����'�'��L�L�N��*�*�:�:�<��
 %�F�{�F�D�4E�4E�F��
���	�
�
�d�n�n�;�K�;��):�):�;�K������s�AB>�>Cr,)Fr6)r!r)r7r8r9r:rrr�boolr;rr	r&�propertyrWrGrbr/rpr
�
BaseExceptionrrur_rgrHr�r4r
rr��r*r)rr#s���
�"04�&
�&*��!�$%�� $� $�4>�AE�&
��^�,�&
��'�"�	&
�
�&
��
&
�"�&
��&
��&
��&
�2�&
�!��"�n�*<�!=�>�&
�
�&
�P��D���� �� �-�T�-�d�-�<0�>���4�
�.�/���-�(����'�	�

��Q�(��F�N�F��F�EJ����T��d��2�:�� 1�2��	
��	 �r*r�__main__)�cycle)�Dictr
�Tuple)�Align)r)r)�Panel)�Rule)�Syntax)�Tablea~def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_value�pythonT)�line_numbers�foo�bar�baz�1�2�3z�You can make the terminal shorter and taller to see the live table hideText may be printed while the progress bars are rendering.z(In fact, [i]any[/i] renderable will workzSuch as [magenta]tables[/]...zPretty printed structures...�examplezPretty printed)�type�textz	Syntax...zGive it a try!)�SGD�MYR�EUR�USD�AUD�JPY�CNH�HKD�CAD�INR�DKK�GBP�RUB�NZD�MXN�IDR�TWD�THB�VND)r@�exchange_rate_dict�dg�������?�
��i@zExchange Rates)�titlezSource CurrencyzDestination Currencyz
Exchange Ratez.4fg�?�red�green)�style)Trx�	threadingrrr�typesr�typingrrr	r
rrr
rrYrr@rrrrrkr�
file_proxyr�jupyterr�live_renderrrrArr�rrrr7�random�time�	itertoolsr�r�r��alignr�r�panelr��ruler��syntaxr��tabler��add_row�progress_renderables�examples�	exchanges�
live_tabler�r~r;�__annotations__�range�index�len�select_exchange�exchange�sleep�randint�log�next�pop�list�keys�
add_column�items�source�dest�
exchange_rater��centerr�r*r)�<module>r�s���
�*�*��H�H�H��K�K��!�!�;���(�V�(�&i�<��i�X�z�����(�(�� �"������i�G�
�
	"�	���F� 
�%���&�E�	�M�M�#�s�C� �	E�
�8�9�'�
�&��$4�5����
�����)�*�H��I�*
�g�	�*�;=��D��s�C�x��%�!7�8�=��3�Z�E�'���I��(>�?�O�%����.����
�
�3��!�6�>�>�!�R�(�1�,��K�K��X��/�BE�"�V�]�]�_�s�*�a�/�C�"�O�X�#>�?��)�*�S��^�a�-?�?�&�*�*�4�0B�0G�0G�0I�+J�1�+M�N��$4�5��� � �!2�3�� � �!7�8�� � ��1�7I�7O�7O�7Q�3�^�f�d�]��M�M����,�S�1�+8�3�+>�%�G���8R��!�!�,�%�,�,�u�"5�6�7&� �
�	�O�N
�	�s
�E4J�J'python3.12/site-packages/pip/_vendor/rich/__pycache__/align.cpython-312.pyc000064400000030060151732701670022277 0ustar00�

R`i�(��N�ddlZddlmZddlmZmZmZejdk\rddlmZnddl	mZddl
mZddlm
Z
dd	lmZdd
lmZddlmZerddlmZmZmZmZed
ZedZGd�de
�ZGd�de
�Zedk(r�ddlmZmZddl m!Z!ddl"m#Z#e!�Z$e�Ze#eejKe$d��ejMe$d��ejOe$d���ddd��Z(ejSejMe(ddejT���yy) �N)�chain)�
TYPE_CHECKING�Iterable�Optional)��)�Literal�)�	Constrain)�JupyterMixin)�Measurement)�Segment)�	StyleType)�Console�ConsoleOptions�RenderableType�RenderResult��left�center�right��top�middle�bottomc��eZdZdZ		dddddd�dddedeed	eed
edee	dee	d
dfd�Z
d
efd�Ze
	dddddd�dddeed	eed
edee	dee	d
dfd��Ze
	dddddd�dddeed	eed
edee	dee	d
dfd��Ze
	dddddd�dddeed	eed
edee	dee	d
dfd��Z						dd�Zddddd
efd�Zy)�AlignaAlign a renderable by adding spaces if necessary.

    Args:
        renderable (RenderableType): A console renderable.
        align (AlignMethod): One of "left", "center", or "right""
        style (StyleType, optional): An optional style to apply to the background.
        vertical (Optional[VerticalAlginMethod], optional): Optional vertical align, one of "top", "middle", or "bottom". Defaults to None.
        pad (bool, optional): Pad the right with spaces. Defaults to True.
        width (int, optional): Restrict contents to given width, or None to use default width. Defaults to None.
        height (int, optional): Set height of align renderable, or None to fit to contents. Defaults to None.

    Raises:
        ValueError: if ``align`` is not one of the expected values.
    NT)�vertical�pad�width�height�
renderabler�align�stylerrr r!�returnc��|dvrtd|�d���|�|dvrtd|�d���||_||_||_||_||_||_||_y)NrzDinvalid value for align, expected "left", "center", or "right" (not �)rzGinvalid value for vertical, expected "top", "middle", or "bottom" (not )�
ValueErrorr"r#r$rrr r!)�selfr"r#r$rrr r!s        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/align.py�__init__zAlign.__init__'s����3�3��V�W\�V_�_`�a��
���H�4O�$O��Y�Zb�Ye�ef�g��
�%�����
���
� ��
������
����c�<�d|j�d|j�d�S)NzAlign(z, r')r"r#�r)s r*�__repr__zAlign.__repr__Bs ������*�"�T�Z�Z�N�!�<�<r,c	� �||d|||||��S)zAlign a renderable to the left.r�r$rrr r!���clsr"r$rrr r!s       r*rz
Align.leftEs&����������
�	
r,c	� �||d|||||��S)z!Align a renderable to the center.rr1r2r3s       r*rzAlign.center[s&����������
�	
r,c	� �||d|||||��S)z Align a renderable to the right.rr1r2r3s       r*rzAlign.rightqs&����������
�	
r,�consoler�optionsrc	#�D���
����K��j�|j�j|��j}|j	t�j�j�|nt|�j��|jd���}ttj|���tj��\}}tj�||��tj��|j|z
��j �|j#�j �nd�dt$tf������fd�}�j&r*td�jxs|jz�d���n
td��
dt(dt$tf�
fd�}�j*xs|j*}�j,r�|���j,d	k(r||z
}	t/|�||	��}
nb�j,d
k(r/||z
dz}||z
|z
}	t/||�|�||	��}
n$||z
}t/||�|��}
n|�}
�j r1|j#�j ��tj0|
��}
|
Ed{���y7��w)N)r8�r!r%c3���K��dkr�D]}|Ed{�������y�dk(r9�jrtd�z�	�nd}�D]}|Ed{���|r|������y�dk(rV�dz}td|z�	�}�jrtd�|z
z�	�nd}�D]}|r|��|Ed{���|r|������y�dk(r)td�z�	�}�D]}|��|Ed{�������yy7��7��7�D7��w)Nrr� r�r)rr)
�linerr�	pad_rightr#�excess_space�lines�new_liner)r$s
    ������r*�generate_segmentsz1Align.__rich_console__.<locals>.generate_segments�s%������q� �!�D�#�O�O�"�N�"��&��<@�H�H�g�c�L�0�%�8�$��!�D�#�O�O��!�	�"�N�	"��(�"�#�q�(���c�D�j�%�0��CG�8�8�G�C�<�$�#6�7��?�QU��"�D��!�	�#�O�O� �'��"�N�
"��'�!��c�L�0�%�8��!�D��I�#�O�O�"�N�"�"�7$��$��$��$�sF�C/�C'�7C/�C)�AC/�&C+�'3C/�C-�
C/�)C/�+C/�-C/r<�
�countc3�B�K�|dkDrt|�D]}����yy�w)Nr��range)rE�_�
blank_lines  �r*�blank_linesz+Align.__rich_console__.<locals>.blank_lines�s'������q�y��u��A�$�$�&��s�rrr=)r#�measurer"�maximum�renderrr �min�update�listr�split_lines�	get_shape�	set_shaper>�	max_widthr$�	get_stylerr�intr!rr�apply_style)r)r7r8r �renderedr!rCrK�vertical_height�bottom_space�
iter_segments�	top_spacer#rJr@rArBr$s`           @@@@@@r*�__rich_console__zAlign.__rich_console__�sL������
�
����������A�I�I���>�>�����$�*�*�*<��#�e�T�Z�Z�BX�
�
�N�N�$�N�'�	
���W�(�(��2�3���)�)�%�0�
��v��!�!�%���7���<�<�>���(�(�5�0��15���1G��!�!�$�*�*�-�T��%	#�8�G�#4�%	#�%	#�R�x�x�
�s�d�j�j�=�G�,=�,=�>�?�r�B�E�J����	�	%�s�	%�x��'8�	%�
�+�+�7������=�=�_�8��}�}��%�.��7�� %�&7�&9�;�|�;T� U�
����(�*�,�v�5�!�;�	�.��:�V�C�� %��	�*�%�'���-�!�
�,�f�4�	� %�k�)�&<�>O�>Q� R�
�-�/�M��:�:��%�%�d�j�j�1�E�#�/�/�
�u�E�M� � � �s�JJ �J�J c�H�tj|||j�}|S�N�r
�getr"�r)r7r8�measurements    r*�__rich_measure__zAlign.__rich_measure__�� ��"�o�o�g�w����H���r,)rNr`�r7rr8rr%r)�__name__�
__module__�__qualname__�__doc__�AlignMethodrr�VerticalAlignMethod�boolrWr+�strr/�classmethodrrrr^r
rer2r,r*rrs\��
�$$�%)�	�37��#� $��$�����	�"�	��.�/�
�����}����
��
��6=�#�=��&*�
�
37��#� $�
�$�
��	�"�
�
�.�/�
��

���}�
���
�
�
�
��
�*�&*�
�
37��#� $�
�$�
��	�"�
�
�.�/�
��

���}�
���
�
�
�
��
�*�&*�
�
37��#� $�
�$�
��	�"�
�
�.�/�
��

���}�
���
�
�
�
��
�*Z!� �Z!�+;�Z!�	�Z!�x� ��+;��	�r,rc�b�eZdZdZ	ddddeeddfd�Zdefd�Z						dd
�Z	d	d
ddde
fd�Zy)�VerticalCenterz�Vertically aligns a renderable.

    Warn:
        This class is deprecated and may be removed in a future version. Use Align class with
        `vertical="middle"`.

    Args:
        renderable (RenderableType): A renderable object.
    Nr"rr$r%c� �||_||_yr`)r"r$)r)r"r$s   r*r+zVerticalCenter.__init__�s��
%�����
r,c�"�d|j�d�S)NzVerticalCenter(r')r"r.s r*r/zVerticalCenter.__repr__�s�� ���� 3�1�5�5r,r7rr8rc#���
K�|j�|j|j�nd}|j|j|j	d��d��}tj|�\}}tj��
|jxs|jj}|t|�z
dz}||z
t|�z
}	td|z�|��dtdtt
f��
fd�}
|d	kDr|
|�Ed{���|D]}|Ed{����
���|	d	kDr|
|	�Ed{���yy7�07�#7�
�w)
Nr:F)rr=r<rEr%c3�>�K�t|�D]
}�������y�wr`rG)rErIrJrBs  ��r*rKz4VerticalCenter.__rich_console__.<locals>.blank_liness ������5�\�� � ���"�s�r)
r$rV�render_linesr"rPrrSr>r!�size�lenrWr)r)r7r8r$rAr �_heightr!r]r[rKr>rJrBs            @@r*r^zVerticalCenter.__rich_console__s5�����26���1G��!�!�$�*�*�-�T���$�$��O�O�W�^�^�4�^�8�e�%�
��!�*�*�5�1���w��<�<�>�����6�7�<�<�#6�#6���c�%�j�(�Q�.�	��	�)�C��J�6����e��}�u�5�
�	�s�	�x��'8�	�
�q�=�"�9�-�-�-��D��O�O��N���!��"�<�0�0�0��	
.����
1�s6�DD?�D9�	D?�D;�D?�2D=�3D?�;D?�=D?c�H�tj|||j�}|Sr`rarcs    r*rezVerticalCenter.__rich_measure__rfr,r`rg)rhrirjrkrrr+ror/r^r
rer2r,r*rrrr�sx���&*��$���	�"��
�	�6�#�6�1� �1�+;�1�	�1�6� ��+;��	�r,rr�__main__)r�Group)�ReprHighlighter)�Panelzalign='left'zalign='center'z
align='right'�<zon dark_blue)r r$�titlerzon red)rr$r!)+�sys�	itertoolsr�typingrrr�version_infor	�pip._vendor.typing_extensions�	constrainr�jupyterrrLr
�segmentrr$rr7rrrrrlrmrrrrh�pip._vendor.rich.consoler}�pip._vendor.rich.highlighterr~�pip._vendor.rich.panelr�highlighterrrr�panel�printr!r2r,r*�<module>r�s��
��4�4����v���5� �!� ����N�N��/�0���7�8��P�L�P�f5�\�5�p�z��7�<�,�!�#�K��i�G��
��J�J�{�>�2�3��L�L��%5�6�7��K�K��O�4�5�	
�
���	
�E��M�M�
���U�X�X�g�n�n��U��'r,python3.12/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-312.pyc000064400000003504151732701700022300 0ustar00�

R`i<���ddlmZmZddlmZGd�de�ZGd�de�Zedk(rEdd	lm	Z	dd
l
mZe�Z
e
jd��5e
je	��d
d
d
�y
y
#1swYy
xYw)�)�ABC�abstractmethod)�Anyc�*�eZdZdZededdfd��Zy)�PagerzBase class for a pager.�content�returnNc��y)zbShow content in pager.

        Args:
            content (str): Content to be displayed.
        N���selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/pager.py�showz
Pager.shows��)�__name__�
__module__�__qualname__�__doc__r�strrrrrrrs%��!���C��D���rrc�0�eZdZdZdedefd�Zdeddfd�Zy)�SystemPagerz'Uses the pager installed on the system.rr	c�6�td�j|�S)N�pydoc)�
__import__�pagerrs  r�_pagerzSystemPager._pagers���'�"�(�(��1�1rNc�&�|j|�y)z!Use the same pager used by pydoc.N)rrs  rrzSystemPager.shows�����G�r)rrrrrrrrrrrrrs+��1�2�c�2�c�2��C��D�rr�__main__�)�make_test_card)�ConsoleT)�stylesN)�abcrr�typingrrrrrr �consoler!r�printrrr�<module>r'sm��#��	�C�	��%���z��(� ��i�G�	���d��	#��
�
�n�&�'�
$�	#��

$�	#�s�A0�0A9python3.12/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-312.pyc000064400000222277151732701700023060 0ustar00�

R`i:��+�
�ddlZddlZddlZddlZddlmZmZddlmZddl	m
Z
mZddlm
Z
ddlmZmZddlmZddlmZdd	lmZdd
lmZmZddlmZmZmZddlmZdd
lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ej`dk\rddlm1Z1nddl2m1Z1ddl3m4Z4m5Z5ddl6m7Z7m8Z8m9Z9m:Z:ddl;m<Z<ddl=m>Z>ddl?m@Z@ddlAmBZBddlCmDZDddlEmFZFddlGmHZHmIZIddlJmKZKmLZLe(deM�ZNe.d�ZOe gePfZQej\de+e�ZRGd�de�ZS														d�d'e/e*eOe%eOfd(eTd)e)ePd*eUd+e)e7d,eUd-e)e gePfd.ePd/eFd0eFd1eFd2eFd3ePd4eUd5eUd6e%eOf d7�ZVGd8�d9ee�ZWGd:�d;e!eRe$eR�ZXd<d dd!dd"d#d$d%d&d!d=�d>ed)eMd(eTd*eUd+e)e7d,eUd-e)e gePfd.ePd/eFd0eFd1eFd2eFd4eUd6e!efd?�ZYej�				d�dd<d dd!dd"d#d$d%d&d!d@�d>e/eTdAe[fdBe/e1dCe1dDfdEeMdFe)eTdGe)eTdHe)eTd)e)eMd(eTd*eUd+e)e7d,eUd-e)e gePfd.ePd/eFd0eFd1eFd2eFd4eUd6e!e+f&dI��Z\ej�				d�dd<d dd!dd"d#d$d%d&d!d@�d>e/eTdAe[fdBe1dJdEeMdFe)eTdGe)eTdHe)eTd)e)eMd(eTd*eUd+e)e7d,eUd-e)e gePfd.ePd/eFd0eFd1eFd2eFd4eUd6e!ef&dK��Z\					d�dd<d dd!dd"d#d$d%d&d!d@�d>e/eTdAe[fdBe/e1dJe1dCe1dDfdEeMdFe)eTdGe)eTdHe)eTd)e)eMd(eTd*eUd+e)e7d,eUd-e)e gePfd.ePd/eFd0eFd1eFd2eFd4eUd6e/e!ee!e+ff&dL�Z\GdM�dNe�Z]GdO�dPe]�Z^GdQ�dRe]�Z_GdS�dTe]�Z`GdU�dVe]�ZaGdW�dXe]�ZbGdY�dZe`�ZcGd[�d\e]�ZdGd]�d^e]�ZeGd_�d`e]�ZfGda�dbe]�ZgGdc�dde]�ZhGde�dfe]�ZiGdg�dhe'�Zje
Gdi�dj��ZkGdk�dle>�Zlemdmk(�rhddlnZnddloZoddnlpmqZqddolrmsZsddpltmuZuddqlGmIZIeudrdsd �t�ZteIdudvdw�ZGeGj�dxdydz�d{eqd|�d}eGd~dd�d��d�etesd��g	Zwdd�lxmyZyeyew�Zze7d ���Z6ele_�gelj���eb���e6d!d���5Z|e|j�d�d����Z~e|j�d�d����Ze|j�d�d���Z�e|�jsxe|�je~d����e|�jed����eo�jd��en�jdd��dkre|�je�ez��e|�js�xddd�yy#1swYyxYw)��N)�ABC�abstractmethod��deque)�	dataclass�field)�	timedelta)�	RawIOBase�UnsupportedOperation)�ceil)�mmap)�length_hint)�PathLike�stat)�Event�RLock�Thread)�
TracebackType)�Any�BinaryIO�Callable�ContextManager�Deque�Dict�Generic�Iterable�List�
NamedTuple�NewType�Optional�Sequence�TextIO�Tuple�Type�TypeVar�Union)��)�Literal�)�filesize�get_console)�Console�Group�
JustifyMethod�RenderableType)�Highlighter)�JupyterMixin)�Live)�ProgressBar)�Spinner)�	StyleType)�Column�Table)�Text�TextType�TaskID�ProgressType�_Ic�p��eZdZdZdddddef�fd�Zdd
�Zdd�Zdee	e
d
ee
deedd	fd�Z�xZ
S)�_TrackThreadz)A thread to periodically update progress.�progress�Progress�task_idr;�
update_periodc�x��||_||_||_t�|_d|_t�|��y)Nr)r@rBrCr�done�	completed�super�__init__)�selfr@rBrC�	__class__s    ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/progress.pyrHz_TrackThread.__init__Bs4��� ��
����*����G��	����
�����returnNc�T�|j}|jj}|j}d}|jj
}||�s(|j}||k7r||||z
�|}||�s�(|jj|j|jd��y)NrT)rF�refresh)rBr@�advancerCrE�waitrF�update)rIrBrPrC�last_completedrQrFs       rK�runz_TrackThread.runKs����,�,���-�-�'�'���*�*�
����y�y�~�~���}�%����I���*����^�!;�<�!*��	�}�%�	
�
�
���T�\�\�T�^�^�T��RrLc�&�|j�|S�N��start�rIs rK�	__enter__z_TrackThread.__enter__Y����
�
���rL�exc_type�exc_val�exc_tbc�X�|jj�|j�yrV)rE�set�join�rIr\r]r^s    rK�__exit__z_TrackThread.__exit__]s��	
�	�	�
�
���	�	�rL�rMN)rMr?)�__name__�
__module__�__qualname__�__doc__�floatrHrTrZr r$�
BaseExceptionrrc�
__classcell__�rJs@rKr?r??sj���3����h��u��S����4�
�.�/���-�(����'�	�

�rLr?TF�
�bar.back�bar.complete�bar.finished�	bar.pulse�sequence�description�total�auto_refresh�console�	transient�get_time�refresh_per_second�style�complete_style�finished_style�pulse_stylerC�disable�
show_speedrMc
#�*K�|rtd�gng}|jt||	|
|��t|��t	d��f�t||||||xsd|
d��}|5|j
||||��Ed	{���d	d	d	�y	7�
#1swYy	xYw�w)
a�Track progress by iterating over a sequence.

    Args:
        sequence (Iterable[ProgressType]): A sequence (must support "len") you wish to iterate over.
        description (str, optional): Description of task show next to progress bar. Defaults to "Working".
        total: (float, optional): Total number of steps. Default is len(sequence).
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.
        disable (bool, optional): Disable display of progress.
        show_speed (bool, optional): Show speed if total isn't known. Defaults to True.
    Returns:
        Iterable[ProgressType]: An iterable of the values in the sequence.

    �([progress.description]{task.description}�rzr{r|r})rT)�elapsed_when_finishedrm�rurvrwrxryr~)rtrsrCN)�
TextColumn�extend�	BarColumn�TaskProgressColumn�TimeRemainingColumnrA�track)rrrsrtrurvrwrxryrzr{r|r}rCr~r�columnsr@s                 rKr�r�gs�����PEP��>�	?�@�UW���N�N���-�-�'�	
�
�*�5��d�;�		
���	�!����-�3����H�
��>�>��E�{�-�"�
�	
�	
�
��	
��
��s0�AB�B�7B�8B�<	B�B�B�Bc��eZdZdZ	d'dedddededdf
d	�Zd(d
�Zde	e
ede	ed
e	eddfd�Z
defd�Zdefd�Zedefd��Zdefd�Zdefd�Zedefd��Zedefd��Zdefd�Zdefd�Zdefd�Zd)dedefd�Zdeeee ffd�Z!d)dedefd�Z"d)dede#efd�Z$d*d �Z%d+d!ed"edefd#�Z&defd$�Z'd%e(defd&�Z)y),�_Readerz9A reader that tracks progress while it's being read from.�handler@rA�task�close_handlerMNc�J�||_||_||_||_d|_y�NF)r�r@r�r��_closed)rIr�r@r�r�s     rKrHz_Reader.__init__�s(����� ��
���	�(�����rLc�:�|jj�|SrV)r�rZrYs rKrZz_Reader.__enter__�s���������rLr\r]r^c�$�|j�yrV)�closerbs    rKrcz_Reader.__exit__�s
��	
�
�
�rLc��|SrV�rYs rK�__iter__z_Reader.__iter__�s���rLc��t|j�}|jj|jt|���|S�N�rP)�nextr�r@rPr��len)rI�lines  rK�__next__z_Reader.__next__�s4���D�K�K� ���
�
���d�i�i��T���;��rLc��|jSrV)r�rYs rK�closedz_Reader.closed�s���|�|�rLc�6�|jj�SrV)r��filenorYs rKr�z_Reader.fileno�����{�{�!�!�#�#rLc�6�|jj�SrV)r��isattyrYs rKr�z_Reader.isatty�r�rLc�.�|jjSrV)r��moderYs rKr�z_Reader.mode�����{�{���rLc�.�|jjSrV)r��namerYs rKr�z_Reader.name�r�rLc�6�|jj�SrV)r��readablerYs rKr�z_Reader.readable�����{�{�#�#�%�%rLc�6�|jj�SrV)r��seekablerYs rKr�z_Reader.seekable�r�rLc��yr�r�rYs rK�writablez_Reader.writable�s��rL�sizec��|jj|�}|jj|jt|���|Sr�)r��readr@rPr�r�)rIr��blocks   rKr�z_Reader.read�s:����� � ��&���
�
���d�i�i��U���<��rL�bc��|jj|�}|jj|j|��|Sr�)r��readintor@rPr�)rIr��ns   rKr�z_Reader.readinto�s6���K�K� � ��#���
�
���d�i�i���3��rLc��|jj|�}|jj|jt|���|Sr�)r��readliner@rPr�r�)rIr�r�s   rKr�z_Reader.readline�s:���{�{�#�#�D�)���
�
���d�i�i��T���;��rL�hintc	��|jj|�}|jj|jtt
t|����|Sr�)r��	readlinesr@rPr��sum�mapr�)rIr��liness   rKr�z_Reader.readlines�sA�����%�%�d�+���
�
���d�i�i��S��e�_�1E��F��rLc�^�|jr|jj�d|_y)NT)r�r�r�r�rYs rKr�z
_Reader.closes"������K�K������rL�offset�whencec��|jj||�}|jj|j|��|S)N�rF)r��seekr@rRr�)rIr�r��poss    rKr�z_Reader.seeks8���k�k���v�v�.���
�
���T�Y�Y�#��6��
rLc�6�|jj�SrV)r��tellrYs rKr�z_Reader.tell
s���{�{���!�!rL�sc��td��)N�write)r)rIr�s  rKr�z
_Reader.write
s
��"�7�+�+rL)T)rMr�)���rd)r)*rerfrgrhrr;�boolrHrZr r$rjrrcr��bytesr��propertyr��intr�r��strr�r�r�r�r�r�r&�	bytearray�
memoryviewr
r�r�rr�r�r�r�rr�r�rLrKr�r��s���C�"�������	�
��
�
����4�
�.�/���-�(����'�	�

���(���%��
������$��$�$��$�� �c� �� �� �c� �� �&�$�&�&�$�&��$�����e��
�%�	�:�t� ;�<��
�S��%��
�c��4��;��
�
�3����C��
"�c�"�,�s�,�s�,rLr�c�`�eZdZdZdddeddfd�Zdefd�Zd	eee	d
ee	dee
ddfd�Zy)
�_ReadContextzEA utility class to handle a context for both a reader and a progress.r@rA�readerrMNc� �||_||_yrV)r@r�)rIr@r�s   rKrHz_ReadContext.__init__s�� ��
� ��rLc�j�|jj�|jj�SrV)r@rXr�rZrYs rKrZz_ReadContext.__enter__s%���
�
�����{�{�$�$�&�&rLr\r]r^c�r�|jj�|jj|||�yrV)r@�stopr�rcrbs    rKrcz_ReadContext.__exit__s*��	
�
�
���������X�w��7rL)rerfrgrhr=rHrZr r$rjrrcr�rLrKr�r�sj��O�!��!�R�!�D�!�'�2�'�8��4�
�.�/�8��-�(�8���'�	8�

�8rLr��
Reading...)rsrurvrwrxryrzr{r|r}r~�filec
���|rtd�gng}
|
jt||	|
|��t�t	�f�t|
|||||xsd|d��}|j
|||��}t||�S)aRead bytes from a file while tracking progress.

    Args:
        file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
        total (int): Total number of bytes to read.
        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        disable (bool, optional): Disable display of progress.
    Returns:
        ContextManager[BinaryIO]: A context manager yielding a progress reader.

    r�r�rmr�)rtrs)r�r�r��DownloadColumnr�rA�	wrap_filer�)r�rtrsrurvrwrxryrzr{r|r}r~r�r@r�s                rKr�r�&s���JEP��>�	?�@�UW���N�N���-�-�'�	
�
���!�		
���	�!����-�3����H��
�
��E�{�
�
K�F���&�)�)rL)rtrsrurvrwrxryrzr{r|r}r~�
PathLike[str]r��rt�r�	buffering�encoding�errors�newlinec��yrVr��r�r�r�r�r�r�rtrsrurvrwrxryrzr{r|r}r~s                  rK�openr�g���,	rL�rbc��yrVr�r�s                  rKr�r��r�rLc
��|rtd�gng}|jt|
|||��t�t	�f�t|||	|
||xsd|d��}|j
||||||||��}t||�S)a�Read bytes from a file while tracking progress.

    Args:
        path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
        mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
        buffering (int): The buffering strategy to use, see :func:`io.open`.
        encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
        errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
        newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`
        total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size.
        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        disable (bool, optional): Disable display of progress.
        encoding (str, optional): The encoding to use when reading in text mode.

    Returns:
        ContextManager[BinaryIO]: A context manager yielding a progress reader.

    r�r�rmr�)r�r�r�r�r�rtrs)r�r�r�r�r�rAr�r�)r�r�r�r�r�r�rtrsrurvrwrxryrzr{r|r}r~r�r@r�s                     rKr�r��s���bEP��>�	?�@�UW���N�N���-�-�'�	
�
���!�		
���	�!����-�3����H��]�]��
��������	�F���&�)�)rLc�t�eZdZUdZdZeeed<ddeeddfd�Z	defd�Z
dd	defd
�Ze
dd	defd��Zy)
�ProgressColumnz3Base class for a widget to use in progress display.N�max_refresh�table_columnrMc�.�||_i|_d|_yrV)�
_table_column�_renderable_cache�_update_time)rIr�s  rKrHzProgressColumn.__init__�s��)���MO���-1��rLc�2�|jxs
t�S)z.Get a table column, used to build tasks table.)r�r7rYs rK�get_table_columnzProgressColumn.get_table_column�s���!�!�-�V�X�-rLr��Taskc�.�|j�}|j�=|js1	|j|j\}}||jz|kDr|S|j
|�}||f|j|j<|S#t
$rY�9wxYw)aCalled by the Progress object to return a renderable for the given task.

        Args:
            task (Task): An object containing information regarding the task.

        Returns:
            RenderableType: Anything renderable (including str).
        )rxr�rFr��id�KeyError�render)rIr��current_time�	timestamp�
renderables     rK�__call__zProgressColumn.__call__�s����}�}������'����
&�(,�(>�(>�t�w�w�(G�%�	�:��t�/�/�/�,�>�%�%��[�[��&�
�+7��*D����t�w�w�'�����
��
�s�B�	B�Bc��y)z"Should return a renderable object.Nr��rIr�s  rKrzProgressColumn.renders�rLrV)rerfrgrhr�r ri�__annotations__r7rHr�r0rrrr�rLrKr�r��sl��=�#'�K��%��'�2�X�f�%5�2��2�
.�&�.��V����.�1�6�1�n�1��1rLr�c�L��eZdZdZ	ddd�dedeef�fd�Zddd	efd
�Z�xZ	S)�RenderableColumnz�A column to insert an arbitrary column.

    Args:
        renderable (RenderableType, optional): Any renderable. Defaults to empty string.
    N�r�rr�c�4��||_t�|�	|��y�Nr
)rrGrH)rIrr�rJs   �rKrHzRenderableColumn.__init__ s���%���
���l��3rLr�r�rMc��|jSrV)rrs  rKrzRenderableColumn.render&s�����rL)�)
rerfrgrhr0r r7rHrrkrls@rKr	r	sB����,.�4�SW�4�(�4�@H��@P�4��6��n�rLr	c���eZdZdZ					ddedeedededee	f
�fd�
Z
		dded	eeded
dfd�Zdd
d
efd�Z
�xZS)�
SpinnerColumna�A column with a 'spinner' animation.

    Args:
        spinner_name (str, optional): Name of spinner animation. Defaults to "dots".
        style (StyleType, optional): Style of spinner. Defaults to "progress.spinner".
        speed (float, optional): Speed factor of spinner. Defaults to 1.0.
        finished_text (TextType, optional): Text used when task is finished. Defaults to " ".
    N�spinner_namerz�speed�
finished_textr�c���t|||��|_t|t�rt	j
|�n||_t�|�!|��y)N�rzrr
)	r5�spinner�
isinstancer�r9�from_markuprrGrH)rIrrzrrr�rJs      �rKrHzSpinnerColumn.__init__4sN����|�5��F����-��-�
���]�+��	
��
	���l��3rL�
spinner_stylerMc�*�t|||��|_y)a-Set a new spinner.

        Args:
            spinner_name (str): Spinner name, see python -m rich.spinner.
            spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner".
            speed (float, optional): Speed factor of spinner. Defaults to 1.0.
        rN)r5r)rIrrrs    rK�set_spinnerzSpinnerColumn.set_spinnerDs���|�=��N��rLr�r�c��|jr|j}|S|jj|j	��}|SrV)�finishedrrrrx)rIr��texts   rKrzSpinnerColumn.renderSsH���}�}�
���	
�
�����$�$�T�]�]�_�5�	
�
�rL)�dots�progress.spinner��?� N)r r!)rerfrgrhr�r r6rir:r7rHrr0rrkrls@rKrr*s�����#�%7��"%�)-�
4��4��	�"�4��	4�
 �4��v�&�
4�&.@��	
O��
O� �	�*�
O��	
O�

�
O��6��n�rLrc�h��eZdZdZ					ddededededee	dee
d	df�fd
�
Zddd	efd
�Z
�xZS)r�zA column containing text.N�text_formatrz�justify�markup�highlighterr�rMc���||_||_||_||_||_t
�|�|xstd����y)NT��no_wrapr
)r$r%rzr&r'rGrHr7)rIr$rzr%r&r'r�rJs       �rKrHzTextColumn.__init___sD���'���&-�����
����&���
���l�&J�f�T�6J��KrLr�r�c�B�|jj|��}|jr-tj||j
|j��}n"t||j
|j��}|jr|jj|�|S�N�r�)rzr%)	r$�formatr&r9rrzr%r'�	highlight)rIr��_textrs    rKrzTextColumn.renderosv��� � �'�'�T�'�2���;�;��#�#�E����T�\�\�R�D���T�Z�Z����F�D�������&�&�t�,��rL)�none�leftTNN)rerfrgrhr�r6r/r�r r1r7rHr9rrkrls@rKr�r�\s����#�
"�!'��-1�)-�L��L��L��	L�
�L��k�*�
L��v�&�L�
�L� �6��d�rLr�c�j��eZdZdZ						ddeedededededeed	df�fd
�
Zddd	e	fd
�Z
�xZS)r�aRenders a visual progress bar.

    Args:
        bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
    N�	bar_widthrzr{r|r}r�rMc�l��||_||_||_||_||_t
�|�|��yr)r4rzr{r|r}rGrH)rIr4rzr{r|r}r�rJs       �rKrHzBarColumn.__init__�s;���#�����
�,���,���&���
���l��3rLr�r�c�\�t|j�td|j�ndtd|j�|j�dntd|j�|j
|j
�|j|j|j|j��	S)z&Gets a progress bar widget for a task.Nrr*)	rtrF�width�pulse�animation_timerzr{r|r})r4rt�maxrFr4�startedrxrzr{r|r}rs  rKrzBarColumn.render�s����(,�
�
�(>�#�a����$�D��!�T�^�^�,��.�.�0�$�c�!�T�^�^�6L��l�l�"��=�=�?��*�*��.�.��.�.��(�(�

�
	
rL)�(rnrorprqN)rerfrgrhr r�r6r7rHr4rrkrls@rKr�r�zs�����$&�%�$2�$2�!,�)-�4��C�=�4��4�"�	4�
"�4��
4��v�&�4�
�4� 
�6�
�k�
rLr�c� �eZdZdZdddefd�Zy)�TimeElapsedColumnzRenders time elapsed.r�r�rMc��|jr|jn|j}|�
tdd��St	t|���}tt
|�d��S)zShow time elapsed.�-:--:--�progress.elapsed�rz)�seconds)r�
finished_time�elapsedr9r	r�r�)rIr�rE�deltas    rKrzTimeElapsedColumn.render�sL��(,�
�
�$�$�$�4�<�<���?��	�);�<�<��#�g�,�/���C��J�&8�9�9rLN�rerfrgrhr9rr�rLrKr>r>�s���:�6�:�d�:rLr>c���eZdZdZ								ddedededededee	d	ee
d
eddf�fd�
Zed
ee
defd��Zdddefd�Z�xZS)r�aShow task progress as a percentage.

    Args:
        text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%".
        text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "".
        style (StyleType, optional): Style of output. Defaults to "none".
        justify (JustifyMethod, optional): Text justification. Defaults to "left".
        markup (bool, optional): Enable markup. Defaults to True.
        highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None.
        table_column (Optional[Column], optional): Table Column to use. Defaults to None.
        show_speed (bool, optional): Show speed if total is unknown. Defaults to False.
    Nr$�text_format_no_percentagerzr%r&r'r�rrMc	�L��||_||_t�	|�
||||||��y)N)r$rzr%r&r'r�)rIrrGrH)
rIr$rIrzr%r&r'r�rrJs
         �rKrHzTaskProgressColumn.__init__�s9���*C��&�$���
���#����#�%�
	�	
rLrc��|�
tdd��Stjt|�gd�d�\}}||z}t|d�|�d�d��S)z�Render the speed in iterations per second.

        Args:
            task (Task): A Task object.

        Returns:
            Text: Text object containing the task speed.
        rzprogress.percentagerB)ru×10³u×10⁶u×10⁹u×10¹²��z.1fz it/s)r9r+�pick_unit_and_suffixr�)�clsr�unit�suffix�
data_speeds     rK�render_speedzTaskProgressColumn.render_speed�s_���=���"7�8�8��4�4���J�<��
���f�
�T�\�
��z�#�&�v�h�e�4�<Q�R�RrLr�r�c��|j�5|jr)|j|jxs|j�S|j�|j
n|j}|j|��}|jr-tj||j|j��}n"t||j|j��}|jr|jj|�|Sr,)rtrrR�finished_speedrrIr$r.r&r9rrzr%r'r/)rIr�r$r0rs     rKrzTaskProgressColumn.render�s����:�:��$�/�/��$�$�T�%8�%8�%F�D�J�J�G�G�.2�j�j�.@�D�*�*�d�FV�FV�	��"�"��"�-���;�;��#�#�E����T�\�\�R�D���T�Z�Z����F�D�������&�&�t�,��rL)z-[progress.percentage]{task.percentage:>3.0f}%rr1r2TNNF)rerfrgrhr�r6r/r�r r1r7rH�classmethodrir9rRrrkrls@rKr�r��s�����K�)+�!�!'��-1�)-� �
��
�$'�
��	
�
�
��

��k�*�
��v�&�
��
�
�
�.�S��%��S�T�S��S�&
�6�
�d�
rLr�c�R��eZdZdZdZ			ddededeef�fd�
Zddd	e	fd
�Z
�xZS)r�aRenders estimated time remaining.

    Args:
        compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False.
        elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False.
    ��?�compactr�r�c�B��||_||_t�|�
|��yr)rXr�rGrH)rIrXr�r�rJs    �rKrHzTimeRemainingColumn.__init__s$������%:��"�
���l��3rLr�r�rMc��|jr|jr|j}d}n|j}d}|j�
td|��S|�!t|jrd|��Sd|��Stt|�d�\}}t|d�\}}|jr|s
|d�d	|d��}n
|d
�d	|d�d	|d��}t||��S)zShow time remaining.rAzprogress.remainingrrBz--:--r@�<�02d�:�d)	r�rrD�time_remainingrtr9rX�divmodr�)rIr��	task_timerz�minutesrC�hours�	formatteds        rKrzTimeRemainingColumn.renders����%�%�$�-�-��*�*�I�&�E��+�+�I�(�E��:�:����%�(�(����4�<�<��e�L�L�Y�e�L�L�"�#�i�.�"�5�������,���w��<�<��"�3�-�q���
�6�I� ��)�1�W�S�M��7�3�-�@�I��I�U�+�+rL)FFN)rerfrgrhr�r�r r7rHr9rrkrls@rKr�r��sS�����K��&+�)-�	4��4� $�4��v�&�	4�,�6�,�d�,rLr�c� �eZdZdZdddefd�Zy)�FileSizeColumnzRenders completed filesize.r�r�rMc�l�tjt|j��}t	|d��S)�Show data completed.zprogress.filesizerB)r+�decimalr�rFr9�rIr��	data_sizes   rKrzFileSizeColumn.render,s)���$�$�S����%8�9�	��I�%8�9�9rLNrGr�rLrKrfrf)s��%�:�6�:�d�:rLrfc� �eZdZdZdddefd�Zy)�TotalFileSizeColumnzRenders total filesize.r�r�rMc��|j�(tjt|j��nd}t	|d��S)rhrzprogress.filesize.totalrB)rtr+rir�r9rjs   rKrzTotalFileSizeColumn.render5s4��9=���9O�H�$�$�S����_�5�UW�	��I�%>�?�?rLNrGr�rLrKrmrm2s��!�@�6�@�d�@rLrmc�D��eZdZdZd	dedeef�fd�
Zdddefd�Z	�xZ
S)
�MofNCompleteColumnaHRenders completed count/total, e.g. '  10/1000'.

    Best for bounded tasks with int quantities.

    Space pads the completed count so that progress length does not change as task progresses
    past powers of 10.

    Args:
        separator (str, optional): Text to separate completed and total values. Defaults to "/".
    �	separatorr�c�4��||_t�|�	|��yr)rqrGrH)rIrqr�rJs   �rKrHzMofNCompleteColumn.__init__Gs���"���
���l��3rLr�r�rMc���t|j�}|j�t|j�nd}tt	|��}t||�d��|j�|��d��S)zShow completed/total.�?r^�progress.downloadrB)r�rFrtr�r�r9rq)rIr�rFrt�total_widths     rKrzMofNCompleteColumn.renderKsc������'�	�#'�:�:�#9��D�J�J��s���#�e�*�o����+��a��(����(8���@�%�
�	
rL)�/N)rerfrgrhr�r r7rHr9rrkrls@rKrprp;s3���	�4�#�4�8�F�;K�4�
�6�
�d�
rLrpc�J��eZdZdZ	d
dedeeddf�fd�
Zdddefd	�Z	�xZ
S)r�z�Renders file size downloaded and total, e.g. '0.5/2.3 GB'.

    Args:
        binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False.
    N�binary_unitsr�rMc�4��||_t�|�	|��yr)ryrGrH)rIryr�rJs   �rKrHzDownloadColumn.__init__]s���)���
���l��3rLr�r�c��t|j�}|j�t|j�n|}|jrt	j
|gd�d�\}}nt	j
|gd�d�\}}|dk(rdnd}||z}|d|�d��}|j�#t|j�}	|	|z}
|
d|�d��}nd	}|�d
|�d|��}t
|d�
�}
|
S)z.Calculate common unit for completed and total.)	r��KiB�MiB�GiB�TiB�PiB�EiB�ZiB�YiBi)	r��kB�MB�GB�TB�PB�EB�ZB�YBrLr*rz,.�frtrwr"rurB)r�rFrtryr+rMr9)rIr�rF� unit_and_suffix_calculation_baserOrP�	precision�completed_ratio�
completed_strrt�total_ratio�	total_str�download_status�
download_texts              rKrzDownloadColumn.rendercs�������'�	� $�z�z�5�C��
�
�O�9�	)����#�8�8�0�Q���L�D�&�$�8�8�0�I���L�D�&�
���A��	�#�d�*��*�2�i�[��/�:�
��:�:�!���
�
�O�E��$�,�K�&�r�)��A�o�6�I��I�*�O�1�Y�K�q���A���_�4G�H�
��rL)FN)rerfrgrhr�r r7rHr9rrkrls@rKr�r�VsD����LP�4� �4�8@��8H�4�	
�4�!�6�!�d�!rLr�c� �eZdZdZdddefd�Zy)�TransferSpeedColumnz&Renders human readable transfer speed.r�r�rMc��|jxs|j}|�
tdd��Stjt|��}t|�d�d��S)zShow data transfer speed.rtzprogress.data.speedrBz/s)rTrr9r+rir�)rIr�rrQs    rKrzTransferSpeedColumn.render�sR���#�#�1�t�z�z���=���#8�9�9��%�%�c�%�j�1�
��z�l�"�%�-B�C�CrLNrGr�rLrKr�r��s��0�D�6�D�d�DrLr�c�(�eZdZUdZeed<	eed<y)�ProgressSamplez$Sample of progress for a given time.rrFN)rerfrgrhrirr�rLrKr�r��s��.������$rLr�c��eZdZUdZeed<	eed<	eeed<	eed<	e	ed<	dZ
eeed<	d	Zeed
<	e
e��Zeeefed<	e
dd
d
��Zeeed<	e
dd
d
��Zeeed<	dZeeed<	e
d�d
d
��Zeeed<e
d
e��Zeed<	defd�Zedefd��Zedeefd��Zedeefd��Zedefd��Zedefd��Z edeefd��Z!edeefd��Z"d!d �Z#y)"r�z�Information regarding a progress task.

    This object should be considered read-only outside of the :class:`~Progress` class.

    r�rsrtrF�	_get_timeNrDT�visible)�default_factory�fieldsF)�default�init�repr�
start_time�	stop_timerTc��td��S)NrL)�maxlenrr�rLrK�<lambda>z
Task.<lambda>�s	���T� 2rL)r�r�r��	_progress)r�r��_lockrMc�"�|j�S)z(float: Get the current time, in seconds.)r�rYs rKrxz
Task.get_time�s���~�~��rLc��|jduS)z#bool: Check if the task as started.N)r�rYs rKr;zTask.started�s�����d�*�*rLc�N�|j�y|j|jz
S)zPOptional[float]: Get the number of steps remaining, if a non-None total was set.N)rtrFrYs rK�	remainingzTask.remaining�s$���:�:����z�z�D�N�N�*�*rLc��|j�y|j�|j|jz
S|j�|jz
S)z]Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started.N)r�r�rxrYs rKrEzTask.elapsed�sC���?�?�"���>�>�%��>�>�D�O�O�3�3��}�}�����0�0rLc��|jduS)zCheck if the task has finished.N)rDrYs rKrz
Task.finished�s���!�!��-�-rLc��|jsy|j|jzdz}tdtd|��}|S)zOfloat: Get progress of task as a percentage. If a None total was set, returns 0��Y@)rtrF�minr:)rIrFs  rK�
percentagezTask.percentage�s>���z�z���^�^�d�j�j�0�E�9�	���s�3�	�2�3�	��rLc�J�|j�y|j5|j}|s
	ddd�y|dj|djz
}|dk(r
	ddd�yt	|�}t|�t
d�|D��}||z}|cddd�S#1swYyxYw)z=Optional[float]: Get the estimated speed in steps per second.Nr�rc3�4K�|]}|j���y�wrVr�)�.0�samples  rK�	<genexpr>zTask.speed.<locals>.<genexpr>s����!O��v�&�"2�"2����)r�r�r�r�iterr�r�)rIr@�
total_time�
iter_progress�total_completedrs      rKrz
Task.speed�s����?�?�"��
�Z�Z��~�~�H����Z�"�"��/�/�(�1�+�2G�2G�G�J��Q���
�Z�!��N�M����!�!O��!O�O�O�#�j�0�E���Z�Z�s�B�%B�!.B�B"c�x�|jry|j}|sy|j}|�yt||z�}|S)zJOptional[float]: Get estimated time to completion, or ``None`` if no data.r�N)rrr�r)rIrr��estimates    rKr_zTask.time_remainingsC���=�=���
�
�����N�N�	�����	�E�)�*���rLc�T�|jj�d|_d|_y)zReset progress.N)r��clearrDrTrYs rK�_resetzTask._resets"��������!���"��rLrd)$rerfrgrhr;rr�r ri�GetTimeCallablerDr�r�r�dictr�rrr�r�rTr�rr�rr�rxr�r;r�rErr�rr_r�r�rLrKr�r��s����	�J�G���'��E�?��>���*���+�%)�M�8�E�?�)�(��G�T��J�"�4�8�F�D��c��N�8�?�"'��5�u�"M�J����M�N�!&�t�%�e�!L�I�x���L�N�&*�N�H�U�O�*�>�',�2��U�(�I�u�^�$���e�U�;�E�5�;�� �%� ��+��+��+��+�8�E�?�+��+��1��%��1��1��.�$�.��.���E������x������"��������#rLr�c��eZdZdZddddddddddd�
deeefd	eed
e	de
de
d
e	de	de	deede	de	ddfd�Ze
deedffd��Zedefd��Zedeefd��Zedeefd��Zede	fd��ZdOd�ZdOd�ZdPd�Zdeeedeed eeddfd!�Z				dQd"eee e!e fd#ee
d$eed%ed&e
dee fd'�Z"	dRdd(d)�d*e#d#ee$d$eed%ede#f
d+�Z%e&jN				dSddd(d,�d*eed-e(fd.e)d/d0e$d1eed2eed3eed#ee$d$eed%ede#fd4��Z*e&jN				dSddd(d,�d*eed-e(fd.ee)d5e)d6fd0e$d1eed2eed3eed#ee$d$eed%ede+fd7��Z*					dTddd(d,�d*eed-e(fd.ee)d/e)d6e)d5fd0e$d1eed2eed3eed#ee$d$eed%edee#e+ffd8�Z*d$eddfd9�Z,d$eddfd:�Z-ddddddd;�d$ed#ee
d<ee
d=ee
d%eed>ee	d?e	d@e.ddfdA�Z/dddBdddC�d$edDe	d#ee
d<e$d>ee	d%eed@e.ddfdE�Z0dUd$ed=e
ddfdF�Z1dOdG�Z2de3fdH�Z4dee3fdI�Z5dJeede6fdK�Z7de3fdL�Z8				dVd%edDe	d#ee
d<e$d>e	d@e.defdM�Z9d$eddfdN�Z:y)WrAa�Renders an auto-updating progress bar(s).

    Args:
        console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout.
        auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`.
        refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None.
        speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
        redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True.
        get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None.
        disable (bool, optional): Disable progress display. Defaults to False
        expand (bool, optional): Expand tasks table to fit width. Defaults to False.
    NTrmg>@F)
rvrury�speed_estimate_periodrw�redirect_stdout�redirect_stderrrxr~�expandr�rvruryr�rwr�r�rxr~r�rMc
	���|dkDsJd��t�|_|xs|j�|_||_|	|_|
|_i|_td�|_	t|xs
t�||||||j��|_
|xs|jj|_|jj |_|jj"|_y)Nrzrefresh_per_second must be > 0)rvruryrwr�r��get_renderable)rr��get_default_columnsr�r�r~r��_tasksr;�_task_indexr3r,r��livervrx�print�log)rIrvruryr�rwr�r�rxr~r�r�s            rKrHzProgress.__init__*s���"�A�%�G�'G�G�%��W��
��<�$�":�":�"<���%:��"�������*,���#)�!�9�����,�{�}�%�1��+�+��.�.�
��	�!�9�D�L�L�$9�$9��
��\�\�'�'��
��<�<�#�#��rL.c�P�td�t�t�t�fS)a�Get the default columns used for a new Progress instance:
           - a text column for the description (TextColumn)
           - the bar itself (BarColumn)
           - a text column showing completion percentage (TextColumn)
           - an estimated-time-remaining column (TimeRemainingColumn)
        If the Progress instance is created without passing a columns argument,
        the default columns defined here will be used.

        You can also create a Progress instance using custom columns before
        and/or after the defaults, as in this example:

            progress = Progress(
                SpinnerColumn(),
                *Progress.default_columns(),
                "Elapsed:",
                TimeElapsedColumn(),
            )

        This code shows the creation of a Progress display, containing
        a spinner to the left, the default columns, and a labeled elapsed
        time column.
        r�)r�r�r�r�)rNs rKr�zProgress.get_default_columnsNs(��2
�A�B��K�� ��!�	
�	
rLc�.�|jjSrV)r�rvrYs rKrvzProgress.consolems���y�y� � � rLc��|j5t|jj��cddd�S#1swYyxYw)zGet a list of Task instances.N)r��listr��valuesrYs rK�taskszProgress.tasksqs*���Z�Z�����*�*�,�-��Z�Z��	�#:�Ac��|j5t|jj��cddd�S#1swYyxYw)zA list of task IDs.N)r�r�r��keysrYs rK�task_idszProgress.task_idsws*���Z�Z�����(�(�*�+��Z�Z�r�c���|j5|js
	ddd�ytd�|jj�D��cddd�S#1swYyxYw)z'Check if all tasks have been completed.NTc3�4K�|]}|j���y�wrV)r)r�r�s  rKr�z$Progress.finished.<locals>.<genexpr>�s����F�1E��t�}�}�1E�r�)r�r��allr�rYs rKrzProgress.finished}sC���Z�Z��;�;���Z��F����1C�1C�1E�F�F��Z�Z�s�A�)A�A c�V�|js|jjd��yy)zStart the progress display.T)rON)r~r�rXrYs rKrXzProgress.start�s ���|�|��I�I�O�O�D�O�)�rLc��|jj�|jjs|jj	�yy)zStop the progress display.N)r�r�rv�is_interactiver�rYs rKr�z
Progress.stop�s2���	�	�����|�|�*�*��L�L��� �+rLc�&�|j�|SrVrWrYs rKrZzProgress.__enter__�r[rLr\r]r^c�$�|j�yrV)r�rbs    rKrczProgress.__exit__�s
��	
�	�	�rLrrrtrBrsrCc#�K�|�tt|��xsd}|�|j||��}n|j||��|jj
r8t
|||�5}|D]}|��|xjdz
c_�	ddd�y|j}|j}	|D]}|��||d�|	��y#1swYyxYw�w)a�Track progress by iterating over a sequence.

        Args:
            sequence (Sequence[ProgressType]): A sequence of values you want to iterate over and track progress.
            total: (float, optional): Total number of steps. Default is len(sequence).
            task_id: (TaskID): Task to track. Default is new task.
            description: (str, optional): Description of task, if new task is created.
            update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.

        Returns:
            Iterable[ProgressType]: An iterable of values taken from the provided sequence.
        N�rtr*)
rir�add_taskrRr�rur?rFrPrO)
rIrrrtrBrsrC�track_thread�valuerPrOs
          rKr�zProgress.track�s�����(�=��+�h�/�0�8�D�E��?��m�m�K�u�m�=�G��K�K��u�K�-��9�9�!�!��d�G�]�;�|�%�E��K� �*�*�a�/�*�&�<�;�
�l�l�G��l�l�G�!�������#��	�"�<�;�s�A'C�)!C�=C�C�
Cr�)rBrsr�c��d}|�|}n0|�.|j5|j|j}ddd�|�td��|�|j	||��}n|j||��t
|||d��S#1swY�NxYw)ajTrack progress file reading from a binary file.

        Args:
            file (BinaryIO): A file-like object opened in binary mode.
            total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given.
            task_id (TaskID): Task to track. Default is new task.
            description (str, optional): Description of task, if new task is created.

        Returns:
            BinaryIO: A readable file-like object in binary mode.

        Raises:
            ValueError: When no total value can be extracted from the arguments or the task.
        Nz?unable to get the total number of bytes, please specify 'total'r�F�r�)r�r�rt�
ValueErrorr�rRr�)rIr�rtrBrs�total_bytess      rKr�zProgress.wrap_file�s���.(,�����K�
�
 ����"�k�k�'�2�8�8������Q��
�
�?��m�m�K�{�m�C�G��K�K��{�K�3��t�T�7��?�?���s�A=�=B)rtrBrsr�r�r�r�r�r�r�c��yrVr��
rIr�r�r�r�r�r�rtrBrss
          rKr�z
Progress.open����	
rLr�r�c��yrVr�r�s
          rKr�z
Progress.open�r�rLc��djt|d���}
|
dvrtdj|���|dk(}|
dk(r"|dk(rt	j
dt�d	}n|
d
vr|dk(rtd��|dk(rd	}|�t|�j}|�|j|	|�
�}n|j||�
�tj|d|��}t|||d��}
|dvrtj|
||||��S|
S)a#Track progress while reading from a binary file.

        Args:
            path (Union[str, PathLike[str]]): The path to the file to read.
            mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
            buffering (int): The buffering strategy to use, see :func:`io.open`.
            encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
            errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
            newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`.
            total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used.
            task_id (TaskID): Task to track. Default is new task.
            description (str, optional): Description of task, if new task is created.

        Returns:
            BinaryIO: A readable file-like object in binary mode.

        Raises:
            ValueError: When an invalid mode is given.
        rF)�reverse)�brr�r�zinvalid mode {!r}r*r�zaline buffering (buffering=1) isn't supported in binary mode, the default buffer size will be usedr�)r�r�rzcan't have unbuffered text I/Or�r�)r�Tr�)r�r�)r�r�r��line_buffering)ra�sortedr�r.�warnings�warn�RuntimeWarningr�st_sizer�rR�ior�r��
TextIOWrapper)rIr�r�r�r�r�r�rtrBrs�_moder�r�r�s              rKr�z
Progress.opens(��B����t�U�3�4���)�)��0�7�7��=�>�>�#�a����D�=�Y�!�^��M�M�s��
��I�
�k�
!��A�~� �!A�B�B��a���	��=���J�&�&�E��?��m�m�K�u�m�=�G��K�K��u�K�-�����t�y�9�����w�T�B���;���#�#��!���-��
��
rLc��|j5|j|}|j�|j�|_ddd�y#1swYyxYw)z�Start a task.

        Starts a task (used when calculating elapsed time). You may need to call this manually,
        if you called ``add_task`` with ``start=False``.

        Args:
            task_id (TaskID): ID of task.
        N)r�r�r�rx)rIrBr�s   rK�
start_taskzProgress.start_task\s:���Z�Z��;�;�w�'�D����&�"&�-�-�/����Z�Z�s�1A�Ac��|j5|j|}|j�}|j�||_||_ddd�y#1swYyxYw)z�Stop a task.

        This will freeze the elapsed time on the task.

        Args:
            task_id (TaskID): ID of task.
        N)r�r�rxr�r�)rIrBr�rs    rK�	stop_taskzProgress.stop_taskjsF���Z�Z��;�;�w�'�D��=�=�?�L����&�".���)�D�N��Z�Z�s�:A�A)rtrFrPrsr�rOrFrPr�rOr�c�<�|j5|j|}	|	j}
|�&||	jk7r||	_|	j	�|�|	xj|z
c_|�||	_|�||	_|�||	_|	jj|�|	j|
z
}|j�}||jz
}
|	j}|j}|r.|dj|
kr|�|r|dj|
kr�|dkDr|jt||��|	j�6|	j|	jk\r|	j �|	j"|	_ddd�|r|j%�yy#1swY�xYw)a�Update information associated with a task.

        Args:
            task_id (TaskID): Task id (returned by add_task).
            total (float, optional): Updates task.total if not None.
            completed (float, optional): Updates task.completed if not None.
            advance (float, optional): Add a value to task.completed if not None.
            description (str, optional): Change task description if not None.
            visible (bool, optional): Set visible flag if not None.
            refresh (bool): Force a refresh of progress information. Default is False.
            **fields (Any): Additional data fields required for rendering.
        Nr)r�r�rFrtr�rsr�r�rRrxr�r��popleftr�appendr�rDrErO)rIrBrtrFrPrsr�rOr�r��completed_start�update_completedr�old_sample_timer�rs                rKrRzProgress.updateysq��0�Z�Z��;�;�w�'�D�"�n�n�O�� �U�d�j�j�%8�"��
����
��"����'�)���$�!*����&�#.�� ��"�&����K�K���v�&�#�~�~��?���=�=�?�L�*�T�-G�-G�G�O����I��'�'�G��	�!�� 6� 6�� H��	��	�!�� 6� 6�� H��!�#�� � ���>N�!O�P��
�
�&��N�N�d�j�j�0��&�&�.�%)�\�\��"�A�D��L�L�N��E�Z�s�DF�A"F�Fr)rXrtrFr�rsrXc�>�|j�}|j5|j|}	|	j�|r|nd|	_|�||	_||	_|�||	_|r||	_|�||	_	d|	_
ddd�|j�y#1swY�xYw)a�Reset a task so completed is 0 and the clock is reset.

        Args:
            task_id (TaskID): ID of task.
            start (bool, optional): Start the task after reset. Defaults to True.
            total (float, optional): New total steps in task, or None to use current total. Defaults to None.
            completed (int, optional): Number of steps completed. Defaults to 0.
            visible (bool, optional): Enable display of the task. Defaults to True.
            description (str, optional): Change task description if not None. Defaults to None.
            **fields (str): Additional data fields required for rendering.
        N)rxr�r�r�r�rtrFr�r�rsrDrO)
rIrBrXrtrFr�rsr�rr�s
          rK�resetzProgress.reset�s���,�}�}���
�Z�Z��;�;�w�'�D��K�K�M�.3�l��D�O�� �"��
�&�D�N��"�&����$����&�#.�� �!%�D���	
�����Z�s�AB�Bc��|j�}|j5|j|}|j}|xj|z
c_|j|z
}||jz
}|j
}|j}	|r.|dj|kr|	�|r|dj|kr�t|�dkDr|	�t|�dkDr�|jt||��|j�G|j|jk\r.|j�"|j|_|j|_ddd�y#1swYyxYw)z�Advance task by a number of steps.

        Args:
            task_id (TaskID): ID of task.
            advance (float): Number of steps to advance. Default is 1.
        rrLN)rxr�r�rFr�r�rrr�rr�rtrDrErrT)
rIrBrPrr�rrrr�rs
          rKrPzProgress.advance�s���}�}���
�Z�Z��;�;�w�'�D�"�n�n�O��N�N�g�%�N�#�~�~��?��*�T�-G�-G�G�O����I��'�'�G��	�!�� 6� 6�� H��	��	�!�� 6� 6�� H��i�.�4�'��	��i�.�4�'����^�L�:J�K�L��
�
�&��N�N�d�j�j�0��&�&�.�%)�\�\��"�&*�j�j��#�)�Z�Z�s�BE�4#E�A.E�Ec��|js2|jjr|jj�yyy)z*Refresh (render) the progress information.N)r~r��
is_startedrOrYs rKrOzProgress.refresh�s,���|�|��	�	� 4� 4��I�I����!5�|rLc�2�t|j��}|S)z*Get a renderable for the progress display.)r.�get_renderables)rIrs  rKr�zProgress.get_renderables���D�0�0�2�3�
��rLc#�JK�|j|j�}|��y�w)z5Get a number of renderables for the progress display.N)�make_tasks_tabler�)rI�tables  rKr
zProgress.get_renderabless�����%�%�d�j�j�1����s�!#r�c����d�|jD�}tj|d|jd��}|D]1��js�|j
�fd�|jD���3|S)z�Get a table to render the Progress display.

        Args:
            tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.

        Returns:
            Table: A table instance.
        c3�K�|]>}t|t�rtd��n|j�j	����@y�w)Tr)N)rr�r7r��copy)r��_columns  rKr�z,Progress.make_tasks_table.<locals>.<genexpr>sG����
�(���g�s�+��t�$��-�-�/�4�4�6�7�(�s�AA)rr*)�paddingr�c3�r�K�|].}t|t�r|j���n|�����0y�w)r-N)rr�r.)r��columnr�s  �rKr�z,Progress.make_tasks_table.<locals>.<genexpr> s@������'3�F� *�&�#�6�#�M�M�t�M�4�!'���.�'3�s�47)r�r8�gridr�r��add_row)rIr��
table_columnsrr�s    @rKrzProgress.make_tasks_table
si���
� �<�<�

�
��
�
�M�6�$�+�+�N���D��|�|���
�
��'+�l�l�
�	���rLc�f�|j5|j�cddd�S#1swYyxYw)z+Makes the Progress class itself renderable.N)r�r�rYs rK�__rich__zProgress.__rich__+s��
�Z�Z��&�&�(��Z�Z�s�'�0c��|j5t|j||||||j|j��}||j|j<|r|j|j�|j}t
t|j�dz�|_ddd�|j�S#1swY�xYw)aAdd a new 'task' to the Progress display.

        Args:
            description (str): A description of the task.
            start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False,
                you will need to call `start` manually. Defaults to True.
            total (float, optional): Number of total steps in the progress if known.
                Set to None to render a pulsing animation. Defaults to 100.
            completed (int, optional): Number of steps completed so far. Defaults to 0.
            visible (bool, optional): Enable display of the task. Defaults to True.
            **fields (str): Additional data fields required for rendering.

        Returns:
            TaskID: An ID you can use when calling `update`.
        )r�r�r�r�r*N)	r�r�r�rxr�r�r;r�rO)	rIrsrXrtrFr�r�r��new_task_indexs	         rKr�zProgress.add_task0s���0�Z�Z��� � �������-�-��j�j�	�D�-1�D�K�K��(�(�)������ 0� 0�1�!�-�-�N�%�c�$�*:�*:�&;�a�&?�@�D��� 	
������#�Z�s�BC�C
c�`�|j5|j|=ddd�y#1swYyxYw)z]Delete a task if it exists.

        Args:
            task_id (TaskID): A task ID.

        N)r�r�)rIrBs  rK�remove_taskzProgress.remove_task[s!���Z�Z����G�$��Z�Z�s�$�-rd)rMrA)NN�
Working...皙�����?rV�r�NNN�r�r�NNN)r*)Tr�rT);rerfrgrhr&r�r�r r-r�rir�rHrUr#r�r�rvrr�r�r;r�rrXr�rZr$rjrrcrr<r!r�rr�r��typing�overloadr�r)r�r"r�rrrRrrPrOr0r�r
r8rrr�r r�rLrKrArAs���
�$&*�!�$&�'+�� $� $�.2���"$���^�+�,�"$��'�"�"$��	"$�
"�"$� %�
"$��"$��"$��"$��?�+�"$��"$��"$�
�"$�H�
�E�.�#�*=�$>�
��
�<�!��!��!��.�t�D�z�.��.�
�,�$�v�,�,��,�
�G�$�G��G�*�
!����4�
�.�/���-�(����'�	�

��"&�$(�'�"�
'����.���0F�F�G�'����'��&�!�	'�
�'��
'�
�,�	�'�X $�(@�
%)�'�
(@��(@���}�(@�
�&�!�(@��
(@�
�(@�T�_�_�
�"&� $�!%�

� $�$(�'�

��C��%�/�0�

��d�m�

��	

�
�3�-�

���
�


��#��

���}�

��&�!�

��

�
�

��

��_�_�
�"&� $�!%�

� $�$(�'�

��C��%�/�0�

��G�C�L�'�$�-�/�0�

��	

�
�3�-�

���
�


��#��

���}�

��&�!�

��

�
�

��

�$CF��"&� $�!%�K� $�$(�'�K��C��%�/�0�K��G�D�M�7�4�=�'�#�,�>�?�K��	K�
�3�-�K���
�
K��#��K���}�K��&�!�K��K�
�x���	 �K�Z2�&�2�T�2�
*��
*�D�
*�&"&�%)�#'�%)�"&��;��;����	;�
�E�?�;��%��
;��c�]�;��$��;��;��;�
�;�B�!%��"&�%)�%��%��	%�
���%��
%��$��%��c�]�%��%�
�%�N1�v�1��1�d�1�< �
���
��.�!9��
�h�t�n����B)�.�)��!&���
)��)��)����	)�
�)��
)��)�
�)�V%�6�%�d�%rLrA�__main__)�Panel)�Rule)�Syntax)r8a~def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_value�python)�line_numbers�foo�bar�baz�1�2�3z:Text may be printed while the progress bars are rendering.z(In fact, [i]any[/i] renderable will workzSuch as [magenta]tables[/]...zPretty printed structures...�examplezPretty printed)�typerz	Syntax...zGive it a try!)�cycle)�record)rvrwz[red]DownloadingrLr�z[green]Processingz[yellow]ThinkingrWr�g333333�?g{�G�z�?�d)r!NTNFNrmrnrorprqr"FTr#r$)�r��sysr%r��abcrr�collectionsr�dataclassesrr�datetimer	r
r�mathrr
�operatorr�osrr�	threadingrrr�typesrrrrrrrrrrrrr r!r"r#r$r%r&�version_infor)�pip._vendor.typing_extensionsrr+r,rvr-r.r/r0r'r1�jupyterr2r�r3�progress_barr4rr5rzr6rr7r8rr9r:r�r;r<rir�r=r?r�r�r�r�r�r�r&r�r�r�r	rr�r�r>r�r�rfrmrpr�r�r�r�rAre�random�time�panelr(�ruler)�syntaxr*r�progress_renderables�	itertoolsr5�examplesr�r@r��task1�task2�task3rrR�sleep�randintr�r�r�rLrK�<module>rSsT	��	�
�
��#��(��.��� ��*�*�������*���v���5�#�B�B�$�!��%��� � �	��3�	���~�&���2�u�9�%���V�^�^�D�&�(�+��%�6�%�T$�!��!%��.2� "�!� .� .�(����C
��H�\�*�H�\�,B�B�C�C
��C
��E�?�C
��	C
�
�g�
�C
��
C
��x��E�	�*�+�C
��C
��C
��C
��C
��C
��C
��C
��C
� �l��!C
�La,�i��a,�H8�>�"�%�w�r�{�8�2$��!%��.2� "�!� .� .�(��>*�
�>*��>*��	>*�
�>*��g�
�
>*��>*��x��E�	�*�+�>*��>*��>*��>*��>*��>*��>*��H��>*�B����"� �!�
	� �#��!%��.2� "�!� .� .�(��'	�
��_�e�+�
,�	�
���
�w�s�|�+�
,�	��	��s�m�		�

�S�M�	��c�]�
	��C�=�	��	��	��g�
�	��	��x��E�	�*�+�	��	��	� �!	�"�#	�$�%	�&�'	�(�F��)	��	�0����"� �!�
	� �#��!%��.2� "�!� .� .�(��'	�
��_�e�+�
,�	�
�$�-�	��	��s�m�		�

�S�M�	��c�]�
	��C�=�	��	��	��g�
�	��	��x��E�	�*�+�	��	��	� �!	�"�#	�$�%	�&�'	�(�H��)	��	�4?B��"� �!�
S*� �#��!%��.2� "�!� .� .�(��'S*�
��_�e�+�
,�S*�
���
�w�t�}�g�c�l�:�
;�S*��S*��s�m�	S*�

�S�M�S*��c�]�
S*��C�=�S*��S*��S*��g�
�S*��S*��x��E�	�*�+�S*��S*��S*� �!S*�"�#S*�$�%S*�&�'S*�(�>�(�#�^�F�%;�;�<�)S*�l'1�S�'1�T�~��"/�N�/�d���<'
��'
�T	:��	:�F��F�R-,�.�-,�`:�^�:�@�.�@�
��
�6.�^�.�b	D�.�	D�%�Z�%��z#�z#��z#�zI	%�|�I	%�X�z��������
�
	"�	���F� 
�%���&�E�	�M�M�#�s�C� �	E�
�8�9�'�
�&��$4�5����
��
�� ��)�*�H��T�"�G�	���
�	�	%�	%�	'�
�	��
���
�
��!�!�"4�D�!�A���!�!�"5�T�!�B���!�!�"4�D�!�A���#�#��O�O�E�3�O�/��O�O�E�3�O�/��D�J�J�t���v�~�~�a��%��)����T�(�^�,��#�#�
�
�_�^
�
�s
�?B>U�Upython3.12/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-312.pyc000064400000032443151732701700022634 0ustar00�

R`i.�	���ddlZddlmZddlmZmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZddlmZdd	lmZdd
lmZmZddlmZmZddlmZmZdd
lmZddlmZGd�de�Z e!dk(�ruddl"m#Z#dZ$ejJde$de dd��g��ejLd�Z'e'jQd�e'jQd�e#d�e'jQd�e'jQd�e'jQd�e'jSd�e#d�e'jUd d!d"gd#�d$gd%d&�d!ddd%d'��e'jUd(�e'jWd)�e'jQd*�e'jQd+�e'jSd,�d3d-�Z,e,�e#d�e'j[d.�e'jQd/�e'jQd0e.d�1��2�yy)4�N)�datetime)�Handler�	LogRecord)�Path)�
ModuleType)�ClassVar�Iterable�List�Optional�Type�Union)�NullFile�)�get_console)�FormatTimeCallable�	LogRender)�Console�ConsoleRenderable)�Highlighter�ReprHighlighter)�Text)�	Tracebackc,���eZdZUdZgd�Zeeeee	d<e
Zeee
e	d<ejdfdddddddddddddd	d
dddd
�deeefdeededededededee
dededeededeedededeeeefdeded eeefd!eeed"df*�fd#�Zd$ed"efd%�Zd$ed"dfd&�Zd$ed'ed"d(fd)�Zd$ed*eed+d(d"d(fd,�Z�xZS)-�RichHandlera�
A logging handler that renders output with Rich. The time / level / message and file are displayed in columns.
    The level is color coded, and the message is syntax highlighted.

    Note:
        Be careful when enabling console markup in log messages if you have configured logging for libraries not
        under your control. If a dependency writes messages containing square brackets, it may not produce the intended output.

    Args:
        level (Union[int, str], optional): Log level. Defaults to logging.NOTSET.
        console (:class:`~rich.console.Console`, optional): Optional console instance to write logs.
            Default will use a global console instance writing to stdout.
        show_time (bool, optional): Show a column for the time. Defaults to True.
        omit_repeated_times (bool, optional): Omit repetition of the same time. Defaults to True.
        show_level (bool, optional): Show a column for the level. Defaults to True.
        show_path (bool, optional): Show the path to the original log call. Defaults to True.
        enable_link_path (bool, optional): Enable terminal link of path column to file. Defaults to True.
        highlighter (Highlighter, optional): Highlighter to style log messages, or None to use ReprHighlighter. Defaults to None.
        markup (bool, optional): Enable console markup in log messages. Defaults to False.
        rich_tracebacks (bool, optional): Enable rich tracebacks with syntax highlighting and formatting. Defaults to False.
        tracebacks_width (Optional[int], optional): Number of characters used to render tracebacks, or None for full width. Defaults to None.
        tracebacks_extra_lines (int, optional): Additional lines of code to render tracebacks, or None for full width. Defaults to None.
        tracebacks_theme (str, optional): Override pygments theme used in traceback.
        tracebacks_word_wrap (bool, optional): Enable word wrapping of long tracebacks lines. Defaults to True.
        tracebacks_show_locals (bool, optional): Enable display of locals in tracebacks. Defaults to False.
        tracebacks_suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%x %X] ".
        keywords (List[str], optional): List of words to highlight instead of ``RichHandler.KEYWORDS``.
    )�GET�POST�HEAD�PUT�DELETE�OPTIONS�TRACE�PATCH�KEYWORDS�HIGHLIGHTER_CLASSNTF���
�Pz[%x %X])�	show_time�omit_repeated_times�
show_level�	show_path�enable_link_path�highlighter�markup�rich_tracebacks�tracebacks_width�tracebacks_extra_lines�tracebacks_theme�tracebacks_word_wrap�tracebacks_show_locals�tracebacks_suppress�locals_max_length�locals_max_string�log_time_format�keywords�level�consoler)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:�returnc�R��t�|�|��|xs
t�|_|xs|j	�|_t
|||||d��|_||_|	|_	|
|_
||_||_|
|_
||_||_||_||_||_||_y)N)r;)r)r+r,�time_formatr*�level_width)�super�__init__rr<r$r.r�_log_renderr-r/r0r1r2r3r4r5r6r7r8r:)�selfr;r<r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:�	__class__s                     ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/logging.pyrBzRichHandler.__init__?s����0	���u��%��/�+�-���&�B�$�*@�*@�*B���$��!��'� 3��

���!1������.��� 0���&<��#� 0���$8��!�&<��#�#6�� �!2���!2��� ��
��recordc��|j}tj|jd�d|j	����}|S)z�Get the level name from the record.

        Args:
            record (LogRecord): LogRecord instance.

        Returns:
            Text: A tuple of the style and level name.
        �zlogging.level.)�	levelnamer�styled�ljust�lower)rDrH�
level_name�
level_texts    rF�get_level_textzRichHandler.get_level_textosF���%�%�
��[�[����Q��>�*�2B�2B�2D�1E�!F�
�
��rGc
���|j|�}d}|j�r0|j�r#|jdk7�r|j\}}}|�J�|�J�tj||||j
|j|j|j|j|j|j|j��}|j�}|jro|j�|_|j}t!|d�r1|j#�r!|j%||j&�|_|j+|�}|j-||�}|j/|||��}	t1|j2j4t6�r|j9|�y	|j2j;|	�y#t<$r|j9|�YywxYw)zInvoked by logging.N)NNN)�width�extra_lines�theme�	word_wrap�show_localsr7r8�suppress�usesTime)rH�	traceback�message_renderable)�formatr0�exc_infor�from_exceptionr1r2r3r4r5r7r8r6�
getMessage�	formatter�message�hasattrrY�
formatTime�datefmt�asctime�
formatMessage�render_message�render�
isinstancer<�filer�handleError�print�	Exception)
rDrHrarZ�exc_type�	exc_value�
exc_tracebackr`r[�log_renderables
          rF�emitzRichHandler.emit~s����+�+�f�%���	�� � �������#5�5�17���.�H�i���'�'�'��(�(�(�!�0�0�����+�+� �7�7��+�+��3�3� �7�7�"&�"8�"8�"&�"8�"8��1�1��I��'�'�)�G��~�~�!'�!2�!2�!4��� �N�N�	��9�j�1�i�6H�6H�6J�%.�%9�%9�&�)�BS�BS�%T�F�N�#�1�1�&�9��!�0�0���A������Y�CU�%�
���d�l�l�'�'��2�
���V�$�
)����"�"�>�2���
)�� � ��(�
)�s�.G
�
G'�&G'rarc�D�t|d|j�}|rtj|�n
t|�}t|d|j�}|r||�}|j
�|j|_|j
r|j|j
d�|S)z�Render message text in to Text.

        Args:
            record (LogRecord): logging Record.
            message (str): String containing log message.

        Returns:
            ConsoleRenderable: Renderable to display log message.
        r/r.zlogging.keyword)�getattrr/r�from_markupr.r:r#�highlight_words)rDrHra�
use_markup�message_textr.s      rFrgzRichHandler.render_message�s����V�X�t�{�{�;�
�4>�t�'�'��0�D��M���f�m�T�5E�5E�F���&�|�4�L��=�=� � �M�M�D�M��=�=��(�(����8I�J��rGrZr[c
��t|j�j}|j|�}|j�dn|jj
}t
j|j�}|j|j|s|gn||g|||||j|jr|jnd��}|S)avRender log for display.

        Args:
            record (LogRecord): logging Record.
            traceback (Optional[Traceback]): Traceback instance or None for no Traceback.
            message_renderable (ConsoleRenderable): Renderable (typically Text) containing log message contents.

        Returns:
            ConsoleRenderable: Renderable to display log.
        N)�log_timer?r;�path�line_no�	link_path)
r�pathname�namerQr`rdr�
fromtimestamp�createdrCr<�linenor-)	rDrHrZr[r{r;r?rzrqs	         rFrhzRichHandler.render�s���"�F�O�O�$�)�)���#�#�F�+��"�n�n�4�d�$�.�.�:P�:P���)�)�&�.�.�9���)�)��L�L�(1�
� �8J�I�7V��#����M�M�)-�)>�)>�f�o�o�D�*�	
���rG) �__name__�
__module__�__qualname__�__doc__r#rrr
�str�__annotations__rr$rr�logging�NOTSETr
�intr�boolr	rrrBrrrQrrrgrrh�
__classcell__)rEs@rFrrs����@	/�H�h�x��S�	�*�+�	�6E��x��[� 1�2�D�")���%)�.!�
�$(���!%�-1�� %�*.�&'�*.�%)�',�@B�!#�!#�:C�(,�-.!��S�#�X��.!��'�"�.!�
�.!�"�
.!��.!��.!��.!��k�*�.!��.!��.!�#�3�-�.!�!$�.!�#�3�-�.!� #�!.!�"!%�#.!�$&�e�C��O�&<�=�%.!�&�'.!�(�).!�*�s�$6�6�7�+.!�,�4��9�%�-.!�.
�/.!�`
�Y�
�4�
�.)�9�.)��.)�`�Y����AT��2 �� ��I�&�	 �
0� �
�
 rGr�__main__)�sleepz%(message)sr�z[%X]T)r0r5)r;r\rd�handlers�richzServer starting...z"Listening on http://127.0.0.1:8080zGET /index.html 200 1298z)GET /imgs/backgrounds/back1.jpg 200 54386zGET /css/styles.css 200 54386zGET /favicon.ico 404 242zJSONRPC request
--> %r
<-- %rz1.1�confirmFruitPurchase)�apple�orange�mangoes�pomelog+����?�	194521489)�version�method�params�id)r��result�errorr�zrLoading configuration file /adasd/asdasd/qeqwe/qwrqwrqwr/sdgsdgsdg/werwerwer/dfgerert/ertertert/ertetert/werwerwerz$Unable to find 'pomelo' in database!zPOST /jsonrpc/ 200 65532zPOST /admin/ 401 42234z%password was rejected for admin site.c��d}d}dgdz}tjd�	||zy#tjd�YyxYw)Nrr�foo�dz	in dividezAn error of some kind occurred!)�log�debug�	exception)�number�divisor�fooss   rF�divider�sD�������w��}���	�	�+��	=��W���	=��M�M�;�<�s	�'�AzOut of memory!zServer exited with code=-1z[bold]EXITING...[/bold])r/)�extra)r=N)/r�rrr�pathlibr�typesr�typingrr	r
rrr
�pip._vendor.rich._null_filer�rrCrrr<rrr.rr�textrrZrrr��timer��FORMAT�basicConfig�	getLoggerr��info�warningr�r�r��critical�dictr&rGrF�<module>r�s�����&���B�B�0��6�/�5�� �U�'�U�p�z���
�F��G�������d�4�P�Q�	��'�
�
�F�
#�C��H�H�
!�"��H�H�
1�2�	�!�H��H�H�
'�(��H�H�
8�9��H�H�
,�-��K�K�*�+�	�!�H��I�I�)��,�?��G��		
��T�D��L�	��I�I�|���I�I�4�5��H�H�
'�(��H�H�
%�&��K�K�7�8�=��H�	�!�H��L�L�!�"��H�H�
)�*��H�H�
&�d�$�.?�H�@�orGpython3.12/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-312.pyc000064400000011512151732701700023476 0ustar00�

R`iS����ddlZddlmZmZejdk\rddlmZnddlmZddlmZddl	m
Z
mZmZm
Z
ddlmZdd	lmZmZdd
lmZddlmZedZGd
�d�Zy)�N)�Optional�Tuple)��)�Literal�)�	loop_last)�Console�ConsoleOptions�RenderableType�RenderResult)�Control)�ControlType�Segment)�	StyleType)�Text)�crop�ellipsis�visiblec	�j�eZdZdZ		ddedededdfd�Zdeddfd�Zde	fd	�Z
de	fd
�Zdede
defd
�Zy)�
LiveRenderz�Creates a renderable that may be updated.

    Args:
        renderable (RenderableType): Any renderable object.
        style (StyleType, optional): An optional style to apply to the renderable. Defaults to "".
    �
renderable�style�vertical_overflow�returnNc�<�||_||_||_d|_y)N)rrr�_shape)�selfrrrs    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/live_render.py�__init__zLiveRender.__init__s!��%�����
�!2���15���c��||_y)z|Set a new renderable.

        Args:
            renderable (RenderableType): Any renderable object, including str.
        N)r)rrs  r�set_renderablezLiveRender.set_renderable's��%��r!c���|j�b|j\}}ttjtjdfgtj
dftjdff|dz
z���St�S)z�Get control codes to move cursor to beginning of live render.

        Returns:
            Control: A control instance that may be printed.
        �r)rrr�CARRIAGE_RETURN�
ERASE_IN_LINE�	CURSOR_UP�r�_�heights   r�position_cursorzLiveRender.position_cursor/s���;�;�"����I�A�v���+�+��*�*�A�.�
�
%�.�.��2�$�2�2�A�6����z�	#�	
�

��y�r!c���|j�N|j\}}ttjgtjdftj
dff|z���St�S)z�Get control codes to clear the render and restore the cursor to its previous position.

        Returns:
            Control: A Control instance that may be printed.
        rr%)rrrr&r(r'r)s   r�restore_cursorzLiveRender.restore_cursorDsd���;�;�"����I�A�v���+�+���(�(�!�,�{�/H�/H�!�.L�M�PV�V��
��y�r!�console�optionsc#��K�|j}|j|j�}|j|||d��}t	j
|�}|\}}||jjkDr�|jdk(r/|d|jj}t	j
|�}ny|jdk(rj|d|jjdz
}tddddd	�
�}	|jt|j|	���t	j
|�}||_
t	j�}
t|�D]\}}|Ed{���|r�|
���y7��w)NF)r�padrrrz...�center�z
live.ellipsis)�overflow�justify�endr)r�	get_styler�render_linesr�	get_shape�sizer+rr�append�list�renderr�liner	)
rr/r0rr�lines�shaper*r+�
overflow_text�new_line�lastr?s
             r�__rich_console__zLiveRender.__rich_console__RsD�����_�_�
��!�!�$�*�*�-���$�$�Z���5�$�Q���!�!�%�(���	��6��G�L�L�'�'�'��%�%��/��3���� 3� 3�4���)�)�%�0���'�'�:�5��9����!4�!4�q�!8�:�� $��#�$��)�!�
����T�'�.�.��"?�@�A��)�)�%�0������<�<�>��#�E�*�J�D�$��O�O����+��s�EE+�E)�E+�"E+)r4r)�__name__�
__module__�__qualname__�__doc__rr�VerticalOverflowMethodr r#rr,r.r
rr
rE�r!rrrs�����4>�		6�"�	6��	6�2�		6�

�	6�%��%�D�%����*������)7��	�r!r)�sys�typingrr�version_infor�pip._vendor.typing_extensions�_loopr	r/r
rrr
�controlr�segmentrrrr�textrrJrrKr!r�<module>rTsN��
�"����v���5��J�J��)��� �!>�?��]�]r!python3.12/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-312.pyc000064400000031654151732701710023212 0ustar00�

R`i�M����dZidddd��dddd��dddd��d	dd
d��dddd��d
ddd��dddd��dddd��dddd��dddd��dddd��ddgd�d��dddd��ddgd �d��d!dd"d��d#dd$d��d%d&gd'�d��id(d)gd*�d��d+d,d-d��d.dd/d��d0d,d1d��d2dd3d��d4d5d6d��d7d5d8d��d9d:d;d��d<d5d=d��d>dd?d��d@d5dAd��dBd5dCd��dDddEd��dFdGdHd��dIddJd��dKd5dLd��dMdNdOd���idPd5dQd��dRdGdSd��dTddUd��dVdWdXd��dYddZd��d[d5d\d��d]dd^d��d_dd`d��dadbdcd��dddded��dfddgd��dhddid��djddkd��dldGdmd��dnd5dod��dpddqd��drddsd���idtdgdu�d��dvd5gdw�d��dxdgdy�d��dzdgd{�d��d|d)d}d~gd��ddbgd��d��d�dgd��d��d�dgd��d��d�dNgd��d��d�d�gd��d��d�dgd��d��d�d:d�d�gd��d�dgd��d��d�d5gd��d��d�dd�d��d�dgd��d��d�d&d�d���dgd��d�d�gd��d�d�d�d�dgd��d�dgd��d�d���Zy�)�a�
Spinners are from:
* cli-spinners:
    MIT License
    Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights to
    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
    the Software, and to permit persons to whom the Software is furnished to do so,
    subject to the following conditions:
    The above copyright notice and this permission notice shall be included
    in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
    INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
    PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
    FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    IN THE SOFTWARE.
�dots�Pu⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏)�interval�frames�dots2u⣾⣽⣻⢿⡿⣟⣯⣷�dots3u⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓�dots4u*⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆�dots5u3⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋�dots6uH⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁�dots7uH⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈�dots8uW⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈�dots9u⢹⢺⢼⣸⣇⡧⡗⡏�dots10u⢄⢂⢁⡁⡈⡐⡠�dots11�du⠁⠂⠄⡀⢀⠠⠐⠈�dots12)8u⢀⠀u⡀⠀u⠄⠀u⢂⠀u⡂⠀u⠅⠀u⢃⠀u⡃⠀u⠍⠀u⢋⠀u⡋⠀u⠍⠁�⢋⠁�⡋⠁�⠍⠉�⠋⠉r�⠉⠙r�⠉⠩�⠈⢙�⠈⡙u⢈⠩u⡀⢙u⠄⡙u⢂⠩u⡂⢘u⠅⡘u⢃⠨u⡃⢐u⠍⡐u⢋⠠u⡋⢀u⠍⡁rrrrrrrrrru⠈⠩u⠀⢙u⠀⡙u⠀⠩u⠀⢘u⠀⡘u⠀⠨u⠀⢐u⠀⡐u⠀⠠u⠀⢀u⠀⡀�dots8Bitu⠀⠁⠂⠃⠄⠅⠆⠇⡀⡁⡂⡃⡄⡅⡆⡇⠈⠉⠊⠋⠌⠍⠎⠏⡈⡉⡊⡋⡌⡍⡎⡏⠐⠑⠒⠓⠔⠕⠖⠗⡐⡑⡒⡓⡔⡕⡖⡗⠘⠙⠚⠛⠜⠝⠞⠟⡘⡙⡚⡛⡜⡝⡞⡟⠠⠡⠢⠣⠤⠥⠦⠧⡠⡡⡢⡣⡤⡥⡦⡧⠨⠩⠪⠫⠬⠭⠮⠯⡨⡩⡪⡫⡬⡭⡮⡯⠰⠱⠲⠳⠴⠵⠶⠷⡰⡱⡲⡳⡴⡵⡶⡷⠸⠹⠺⠻⠼⠽⠾⠿⡸⡹⡺⡻⡼⡽⡾⡿⢀⢁⢂⢃⢄⢅⢆⢇⣀⣁⣂⣃⣄⣅⣆⣇⢈⢉⢊⢋⢌⢍⢎⢏⣈⣉⣊⣋⣌⣍⣎⣏⢐⢑⢒⢓⢔⢕⢖⢗⣐⣑⣒⣓⣔⣕⣖⣗⢘⢙⢚⢛⢜⢝⢞⢟⣘⣙⣚⣛⣜⣝⣞⣟⢠⢡⢢⢣⢤⢥⢦⢧⣠⣡⣢⣣⣤⣥⣦⣧⢨⢩⢪⢫⢬⢭⢮⢯⣨⣩⣪⣫⣬⣭⣮⣯⢰⢱⢲⢳⢴⢵⢶⢷⣰⣱⣲⣳⣴⣵⣶⣷⢸⢹⢺⢻⢼⢽⢾⢿⣸⣹⣺⣻⣼⣽⣾⣿�line�)�-�\�|�/�line2u⠂-–—–-�pipeu┤┘┴└├┌┬┐�
simpleDotsi�)�.  �.. �...�   �simpleDotsScrolling��)r$r%r&z ..z  .r'�star�Fu✶✸✹✺✹✷�star2z+x*�flipu
___-``'´-___�	hamburgeru	☱☲☴�growVertical�xu▁▃▄▅▆▇▆▅▄▃�growHorizontalu$▏▎▍▌▋▊▉▊▋▌▍▎�balloon�z .oO@* �balloon2u.oO°Oo.�noiseu	▓▒░�bounceu⠁⠂⠄⠂�	boxBounceu▖▘▝▗�
boxBounce2u▌▀▐▄�triangle�2u◢◣◤◥�arcu◜◠◝◞◡◟�circleu	◡⊙◠�
squareCorners�u◰◳◲◱�circleQuartersu◴◷◶◵�circleHalvesu◐◓◑◒�squishu╫╪�toggle�u⊶⊷�toggle2u▫▪�toggle3u□■�toggle4u■□▪▫�toggle5u▮▯�toggle6i,uဝ၀�toggle7u⦾⦿�toggle8u◍◌�toggle9u◉◎�toggle10u	㊂㊀㊁�toggle11u⧇⧆�toggle12u☗☖�toggle13z=*-�arrowu←↖↑↗→↘↓↙�arrow2)u⬆️ u↗️ u➡️ u↘️ u⬇️ u↙️ u⬅️ u↖️ �arrow3)u▹▹▹▹▹u▸▹▹▹▹u▹▸▹▹▹u▹▹▸▹▹u▹▹▹▸▹u▹▹▹▹▸�bouncingBar)�[    ]�[=   ]�[==  ]�[=== ]�[ ===]�[  ==]�[   =]rTrZrYrXz[====]rWrVrU�bouncingBall)
�
( ●    )�
(  ●   )�
(   ●  )�
(    ● )u
(     ●)r_r^r]r\u
(●     )�smileyu😄 u😝 �monkey)�🙈 rbu🙉 u🙊 �hearts)u💛 u💙 u💜 u💚 u❤️ �clock)u🕛 u🕐 u🕑 u🕒 u🕓 u🕔 u🕕 u🕖 u🕗 u🕘 u🕙 u🕚 �earth)u🌍 u🌎 u🌏 �material�)\u<█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁u<██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁u<███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁u<████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁�<██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁rhu<███████▁▁▁▁▁▁▁▁▁▁▁▁▁�<████████▁▁▁▁▁▁▁▁▁▁▁▁�<█████████▁▁▁▁▁▁▁▁▁▁▁rju<██████████▁▁▁▁▁▁▁▁▁▁�<███████████▁▁▁▁▁▁▁▁▁u<█████████████▁▁▁▁▁▁▁�<██████████████▁▁▁▁▁▁rl�<▁██████████████▁▁▁▁▁rmrmu<▁▁██████████████▁▁▁▁u<▁▁▁██████████████▁▁▁u<▁▁▁▁█████████████▁▁▁�<▁▁▁▁██████████████▁▁rn�<▁▁▁▁▁██████████████▁roro�<▁▁▁▁▁▁██████████████rp�<▁▁▁▁▁▁▁█████████████rq�<▁▁▁▁▁▁▁▁████████████rr�<▁▁▁▁▁▁▁▁▁███████████rs�<▁▁▁▁▁▁▁▁▁▁██████████rtu<▁▁▁▁▁▁▁▁▁▁▁▁████████�<▁▁▁▁▁▁▁▁▁▁▁▁▁███████u<▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████�<▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████rvu<█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████�<██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███rwu<███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███u<████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██�<█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█rxu<██████▁▁▁▁▁▁▁▁▁▁▁▁▁█rirjrjrjrjrk�<████████████▁▁▁▁▁▁▁▁ryrlrlrmrmu<▁▁▁█████████████▁▁▁▁�<▁▁▁▁▁████████████▁▁▁rzu<▁▁▁▁▁▁███████████▁▁▁�<▁▁▁▁▁▁▁▁█████████▁▁▁r{�<▁▁▁▁▁▁▁▁▁█████████▁▁r|u<▁▁▁▁▁▁▁▁▁▁█████████▁�<▁▁▁▁▁▁▁▁▁▁▁████████▁r}�<▁▁▁▁▁▁▁▁▁▁▁▁███████▁r~rururv�<▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████rr�<▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███r��<▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██r�r��<▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█r�r��<▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁r�r�r��moon)u🌑 u🌒 u🌓 u🌔 u🌕 u🌖 u🌗 u🌘 �runneru🚶 u🏃 �pong)u▐⠂       ▌u▐⠈       ▌u▐ ⠂      ▌�▐ ⠠      ▌u▐  ⡀     ▌u▐  ⠠     ▌�▐   ⠂    ▌u▐   ⠈    ▌u▐    ⠂   ▌�▐    ⠠   ▌u▐     ⡀  ▌u▐     ⠠  ▌�▐      ⠂ ▌u▐      ⠈ ▌u▐       ⠂▌u▐       ⠠▌u▐       ⡀▌u▐      ⠠ ▌r�u▐     ⠈  ▌u▐     ⠂  ▌r�u▐    ⡀   ▌u▐   ⠠    ▌r�u▐  ⠈     ▌u▐  ⠂     ▌r�u▐ ⡀      ▌u▐⠠       ▌�shark)u▐|\____________▌u▐_|\___________▌u▐__|\__________▌u▐___|\_________▌u▐____|\________▌u▐_____|\_______▌u▐______|\______▌u▐_______|\_____▌u▐________|\____▌u▐_________|\___▌u▐__________|\__▌u▐___________|\_▌u▐____________|\▌u▐____________/|▌u▐___________/|_▌u▐__________/|__▌u▐_________/|___▌u▐________/|____▌u▐_______/|_____▌u▐______/|______▌u▐_____/|_______▌u▐____/|________▌u▐___/|_________▌u▐__/|__________▌u▐_/|___________▌u▐/|____________▌�dqpb�weather)�☀️ r�r��🌤 �⛅️ �🌥 �☁️ �🌧 �🌨 r�r�r�r�u⛈ r�r�r�r�r�r�r�r�r��	christmasu🌲🎄)u،   u′   u ´ u ‾ u  ⸌u  ⸊z  |u  ⁎u  ⁕u ෴ u  ⁓r'r'r'�})�	∙∙∙u	●∙∙u	∙●∙u	∙∙●r��u-=≡)uρββββββuβρβββββuββρββββuβββρβββuββββρββuβββββρβuββββββρ)�▰▱▱▱▱▱▱u▰▰▱▱▱▱▱u▰▰▰▱▱▱▱u▰▰▰▰▱▱▱u▰▰▰▰▰▱▱u▰▰▰▰▰▰▱u▰▰▰▰▰▰▰r�)�grenade�point�layer�betaWave�	aestheticN)�__doc__�SPINNERS����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_spinners.py�<module>r�s���*L�
��2�
�L�
�"�(B�
C�L���2��
L���>��L���G��L�$��\��%L�,��\��-L�4��k��5L�<�"�(B�
C�=L�>
�2�)@�A�?L�@
�3�*D�E�AL�B
��9
�<�CL�|��S��}L�L��(=�>�ML�N�#�)9�
:�OL�P��(B�C�QL�R�s�.J�K�SL�T��<��UL�\��';�<�]L�^�"��
.�_L�`��!�
�aL�h�c�[�9�iL�j��2��kL�r��8��sL�z�C�9�5�{L�|�S�J�7�}L�~�#��
5�L�@
�3�.�9�AL�B�c�^�<�CL�D�s�n�=�EL�F�R�>�:�GL�H
��';�<�IL�J
�3�+�6�KL�L�#��@�ML�N�3�.�A�OL�P��~�>�QL�R
�3�(�3�SL�T
�3�(�3�UL�V�B�(�3�WL�X�C�8�4�YL�Z�C�>�:�[L�\�C�8�4�]L�^�C�8�4�_L�`�B�(�3�aL�b�C�8�4�cL�d�C�8�4�eL�f�S�K�8�gL�h�R�8�4�iL�j�S�H�5�kL�l�R�5�1�mL�n�#�)C�
D�oL�p
��j��qL�x
��E��yL�@��
��AL�h��
��iL�F
�3�7�G�*<�=�GL�H
�3�*N�O�IL�J
�3�*Y�Z�KL�L��

��ML�n�#�)D�
E�oL�p��]
�`�qL�r	��Z�
�s	L�z	
�3�7�G�*<�=�{	L�|	��
�"
�}	L�B��
��CL�@���/�AL�B��
��CL�z�c�Z�8�{L�~�
��&�)j�
k���
1��
���	
��
L�r�python3.12/site-packages/pip/_vendor/rich/__pycache__/control.cpython-312.pyc000064400000025356151732701710022674 0ustar00�

R`i�����UddlZddlZddlmZmZmZmZmZmZejdk\rddlm
Z
nddlm
Z
ddlm
Z
mZmZer
ddlmZmZmZgd�Ze
ed	<eD�cic]}|d��c}Ze
ed
<ddd
ddd�Ze
ed<iej0d��ej2d��ej4d��ej6d��ej8d��ej:d��ej<d��ej>d��ej@d��ejBd��ejDd��ejFd��ejHd��ejJd��ejLd��ejNd ��Z(ee)ed!e*ffed"<Gd#�d$�Z+efd%e*d&ee)dfd'e*fd(�Z,efd%e*d&ee)e*fd'e*fd)�Z-e.d*k(rUdd+l/mZe�Zejad,�e1d-�D]+Z2ejgd.d/e2zz�ejhd0��-yycc}w)1�N)�
TYPE_CHECKING�Callable�Dict�Iterable�List�Union)��)�Final�)�ControlCode�ControlType�Segment)�Console�ConsoleOptions�RenderResult)�r
���
�STRIP_CONTROL_CODES�_CONTROL_STRIP_TRANSLATEz\az\bz\vz\fz\r�CONTROL_ESCAPEc��y)N��r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/control.py�<lambda>r#s��frc��y)N�
rrrrrr$s��rc��y)Nzrrrrrr%s��hrc��y)Nzrrrrrr&s��yrc��y)Nz[?1049hrrrrrr's��=rc��y)Nz[?1049lrrrrrr(s��Mrc��y)Nz[?25hrrrrrr)���[rc��y)Nz[?25lrrrrrr*r'rc��d|�d�S)N�[�Ar��params rrr+s
��5���q�)9rc��d|�d�S)Nr*�Brr,s rrr,s
��U�5�'��+;rc��d|�d�S)Nr*�Crr,s rrr-s
���e�W�A�.>rc��d|�d�S)Nr*�Drr,s rrr.s
���u�g�Q�/?rc��d|dz�d�S)Nr*r�Grr,s rrr/s��u�U�1�W�I�Q�5Grc��d|�d�S)Nr*�Krr,s rrr0s
��u�U�G�1�-=rc� �d|dz�d|dz�d�S)Nr*r�;�Hr)�x�ys  rrr1s��u�Q�q�S�E��1�Q�3�%�q�-Arc��d|�d�S)Nz]0;rr)�titles rrr2s
��'�%���0Er.�CONTROL_CODES_FORMATc�2�eZdZdZdgZdeeefddfd�Ze	dd��Z
e	dd��Ze	dd	ed
eddfd��Z
e	dd	ed
eddfd��Ze	d	ed
eddfd
��Ze	dd��Ze	deddfd��Ze	deddfd��Ze	deddfd��Zdefd�Z						dd�Zy)�Controlz�A renderable that inserts a control code (non printable but may move cursor).

    Args:
        *codes (str): Positional arguments are either a :class:`~rich.segment.ControlType` enum or a
            tuple of ControlType and an integer parameter
    �segment�codes�returnNc���|D�cgc]}t|t�r|fn|��}}t�dj�fd�|D��}t	|d|�|_ycc}w)N�c3�2�K�|]^}}�||����y�w�Nr)�.0�code�
parameters�_format_maps   �r�	<genexpr>z#Control.__init__.<locals>.<genexpr>Es'�����!
�DQ�/@�t�j��K���z�*�M�s�)�
isinstancerr?�joinrrB)�selfrCrJ�
control_codes�rendered_codesrLs     @r�__init__zControl.__init__@sh���KP�,
�KP�4�z�$��4�T�G�$�>�5�	�,
�+�����!
�DQ�!
�
���~�t�]�C����,
s�Ac�.�|tj�S)zRing the 'bell'.)r�BELL��clss r�bellzControl.bellJ����;�#�#�$�$rc�.�|tj�S)zMove cursor to 'home' position.)r�HOMErVs r�homezControl.homeOrYrr;r<c�F���dttf��fd�}||��}|S)z�Move cursor relative to current position.

        Args:
            x (int): X offset.
            y (int): Y offset.

        Returns:
            ~Control: Control object.

        rDc3���K�t}�r*�dkDr|jn|jt��f���r+�dkDr|jn|j
t��f��yy�w)Nr)r�CURSOR_FORWARD�CURSOR_BACKWARD�abs�CURSOR_DOWN�	CURSOR_UP)�controlr;r<s ��r�	get_codeszControl.move.<locals>.get_codesasi�����!�G��./�!�e�G�*�*��9P�9P���F����+,�q�5�G�'�'�g�6G�6G���F����s�A!A$)rr
)rWr;r<rerds ``  r�movezControl.moveTs'���	�8�K�0�	��y�{�#���rc���|rG|tj|f|dkDrtjntjt	|�f�S|tj|f�S)z�Move to the given column, optionally add offset to row.

        Returns:
            x (int): absolute x (column)
            y (int): optional y offset (row)

        Returns:
            ~Control: Control object.
        r)r�CURSOR_MOVE_TO_COLUMNrbrcra�rWr;r<s   r�move_to_columnzControl.move_to_columnqsa��(�
��2�2�A�6�/0�1�u�K�+�+�+�:O�:O���F��
�
	
��k�7�7��;�<�
	
rc�4�|tj||f�S)z�Move cursor to absolute position.

        Args:
            x (int): x offset (column)
            y (int): y offset (row)

        Returns:
            ~Control: Control object.
        )r�CURSOR_MOVE_TOris   r�move_tozControl.move_to�s���K�.�.��1�5�6�6rc�.�|tj�S)zClear the screen.)r�CLEARrVs r�clearz
Control.clear�s���;�$�$�%�%r�showc�Z�||rtj�Stj�S)zShow or hide the cursor.)r�SHOW_CURSOR�HIDE_CURSOR)rWrqs  r�show_cursorzControl.show_cursor�s%���d�;�*�*�P�P��8O�8O�P�Pr�enablec�|�|r%|tjtj�S|tj�S)zEnable or disable alt screen.)r�ENABLE_ALT_SCREENr[�DISABLE_ALT_SCREEN)rWrvs  r�
alt_screenzControl.alt_screen�s1����{�4�4�k�6F�6F�G�G��{�5�5�6�6rr>c�2�|tj|f�S)zlSet the terminal window title

        Args:
            title (str): The new terminal window title
        )r�SET_WINDOW_TITLE)rWr>s  rr>z
Control.title�s���K�0�0�%�8�9�9rc�.�|jjSrH�rB�text)rPs r�__str__zControl.__str__�s���|�|� � � rc#�VK�|jjr|j��yy�wrHr~)rP�console�optionss   r�__rich_console__zControl.__rich_console__�s$�����<�<����,�,���s�'))rDrA)rr)r)r�rr�rrDr)�__name__�
__module__�__qualname__�__doc__�	__slots__rrr
rS�classmethodrXr\�intrfrjrmrp�boolrurz�strr>r�r�rrrrArA6sz�����I�D�u�[�+�%=�>�D�4�D��%��%��%��%���S����Y����8�
�s�
�s�
�9�
��
�.�
7��
7��
7�	�
7��
7��&��&��Q�t�Q�	�Q��Q��7��7��7��7��:�#�:�)�:��:�!��!�� ��+;��	�rrAr�_translate_tablerDc�$�|j|�S)z�Remove control codes from text.

    Args:
        text (str): A string possibly contain control codes.

    Returns:
        str: String with control codes removed.
    ��	translate�rr�s  r�strip_control_codesr��s���>�>�*�+�+rc�$�|j|�S)aReplace control codes with their "escaped" equivalent in the given text.
    (e.g. "" becomes "\b")

    Args:
        text (str): A string possibly containing control codes.

    Returns:
        str: String with control codes replaced with their escaped version.
    r�r�s  r�escape_control_codesr��s���>�>�*�+�+r�__main__)rz+Look at the title of your terminal window ^�
u🚀 Loading�.g�?)5�sys�time�typingrrrrrr�version_infor�pip._vendor.typing_extensionsrBr
rrr�rrrr�__annotations__rrrU�CARRIAGE_RETURNr[rorxryrsrtrcrbr_r`rh�
ERASE_IN_LINErlr|r?r�r�rAr�r�r��pip._vendor.rich.console�print�range�i�set_window_title�sleep)�
_codepoints0r�<module>r�s���
��G�G����v���3�6�6��>�>���U��(;�#�':��J���':�#��%��

��
�
�
�����7����n�7�����7����&�7����(�	7�
�!�!�#8�7��"�"�$9�
7����0�7����0�7����9�7����;�7���� >�7����!?�7��%�%�'G�7����=�7���� A�7� � � �"E�!7��d�3���c�� 2�2�3��(B�B�L4L�,�

�,�!%�c�4�i��,��,� (6�
,�

�
,��3��8�n�
,�	�
,� �z��0��i�G��M�M�?�@�
�2�Y��� � ��#��'�!9�:���
�
�3���
��G#s�
G0python3.12/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-312.pyc000064400000015630151732701720022746 0ustar00�

R`i����UdZddlZddlmZmZmZmZmZmZddl	m
Z
gd�Zerddlm
Z
daeded	<	ej j#ej$��Zd7d�Zd
ededdfd�Zddddd�dedededeeededdfd�Z	d8dddddddddd�	deedededeefd ed!ed"ed#ed$ed%eeegefd&eddfd'�Zddddddddddd(�
d)ed*edd+eed,ed-ed.ed/ed0ed1ed2ed3eddfd4�Zed5k(r	ed6�yy#e$rd
ZY��wxYw)9z3Rich text and beautiful formatting in the terminal.�N)�IO�
TYPE_CHECKING�Any�Callable�Optional�Union�)�load_ipython_extension)�get_console�reconfigure�print�inspect�
print_json��Consoler�_console��returnc�4�t�
ddlm}|�atS)z�Get a global :class:`~rich.console.Console` instance. This function is used when Rich requires a Console,
    and hasn't been explicitly given one.

    Returns:
        Console: A console instance.
    r	r)r�consolerrs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/__init__.pyrrs����$��9���O��args�kwargsc�V�ddlm}||i|��}t�}|j|_y)a	Reconfigures the global console by replacing it with another.

    Args:
        *args (Any): Positional arguments for the replacement :class:`~rich.console.Console`.
        **kwargs (Any): Keyword arguments for the replacement :class:`~rich.console.Console`.
    rrN)�pip._vendor.rich.consolerr�__dict__)rrr�new_consolers     rrr's+��1��4�*�6�*�K��}�H�#�,�,�H�r� �
F)�sep�end�file�flush�objectsr!r"r#r$c�^�ddlm}|�
t�n||��}|j|||d��S)a5Print object(s) supplied via positional arguments.
    This function has an identical signature to the built-in print.
    For more advanced features, see the :class:`~rich.console.Console` class.

    Args:
        sep (str, optional): Separator between printed objects. Defaults to " ".
        end (str, optional): Character to write at end of output. Defaults to "\\n".
        file (IO[str], optional): File to write to, or None for stdout. Defaults to None.
        flush (bool, optional): Has no effect as Rich always flushes output. Defaults to False.

    r	r)r#)r!r")rrrr
)r!r"r#r$r%r�
write_consoles       rr
r
5s0��$!�%)�\�K�M�w�D�7I�M��=����S�c�:�:r�T�	�data�indent�	highlight�	skip_keys�ensure_ascii�check_circular�	allow_nan�default�	sort_keys�jsonr*r+r,r-r.r/r0r1r2c	�J�t�j||||||||||	��
y)a�Pretty prints JSON. Output will be valid JSON.

    Args:
        json (str): A string containing JSON.
        data (Any): If json is not supplied, then encode this data.
        indent (int, optional): Number of spaces to indent. Defaults to 2.
        highlight (bool, optional): Enable highlighting of output: Defaults to True.
        skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
        ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
        check_circular (bool, optional): Check for circular references. Defaults to True.
        allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
        default (Callable, optional): A callable that converts values that can not be encoded
            in to something that can be JSON encoded. Defaults to None.
        sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
    r)N)rr)
r3r*r+r,r-r.r/r0r1r2s
          rrrMs7��:�M����
����!�%�����r)
r�title�help�methods�docs�private�dunder�sort�all�value�objrr5r6r7r8r9r:r;r<r=c
��|xs
t�}ddlm}|tu}
||||
xs||
xs||
xs|||||	|
��
}|j	|�y)aInspect any Python object.

    * inspect(<OBJECT>) to see summarized info.
    * inspect(<OBJECT>, methods=True) to see methods.
    * inspect(<OBJECT>, help=True) to see full (non-abbreviated) help.
    * inspect(<OBJECT>, private=True) to see private attributes (single underscore).
    * inspect(<OBJECT>, dunder=True) to see attributes beginning with double underscore.
    * inspect(<OBJECT>, all=True) to see all attributes.

    Args:
        obj (Any): An object to inspect.
        title (str, optional): Title to display over inspect result, or None use type. Defaults to None.
        help (bool, optional): Show full help text rather than just first paragraph. Defaults to False.
        methods (bool, optional): Enable inspection of callables. Defaults to False.
        docs (bool, optional): Also render doc strings. Defaults to True.
        private (bool, optional): Show private attributes (beginning with underscore). Defaults to False.
        dunder (bool, optional): Show attributes starting with double underscore. Defaults to False.
        sort (bool, optional): Sort attributes alphabetically. Defaults to True.
        all (bool, optional): Show all attributes. Defaults to False.
        value (bool, optional): Pretty print value. Defaults to True.
    r)�Inspect)	r5r6r7r8r9r:r;r<r=N)r�pip._vendor.rich._inspectr@rr
)r>rr5r6r7r8r9r:r;r<r=rr@�
is_inspect�_inspects               rrrxsd��F�'�+�-�H�1����J����
�
�4��%�g�
�
�4���
����H�
�N�N�8�r�__main__zHello, **World**)rr)N)�__doc__�os�typingrrrrrr�
_extensionr
�__all__rrr�__annotations__�path�abspath�getcwd�_IMPORT_CWD�FileNotFoundErrorrr�str�boolr
�intrr�__name__�rr�<module>rUsN��9�	�D�D�.�
J��� �!%��(�9�
�$���'�'�/�/�)�"�)�)�+�.�K�
� -�s�-�c�-�d�-� ��"��;��;�	�;�

�;��2�c�7�
�	;�
�;�
�
;�2�(��$%������.2��(�
�3�-�(��(�
�$��S�.�!�	(�
�(��
(��(��(��(��h��u�c�z�*�
+�(��(�
�(�\$(����������5�	�5��i�
 �5��C�=�	5�
�5��
5��5��5�
�5��5�
�5��5�
�5�p�z��	�
����}���K��s�*C?�?D	�D	python3.12/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-312.pyc000064400000022154151732701720022505 0ustar00�

R`i ��j�ddlZddlmZddlmZddlmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZmZej0dej2�Zej0d�ZGd
�de
�Ze	eZeegefZeeegefZ ej0d�jBfdede defd�Z"dedeee#eeeeffd�Z$			d!dede
eefde%deedef
d�Z&e'dk(rCgd�Z(ddl)m*Z*ddl+m,Z,e,ddd� �Z-e(D]Z.e-j_ee.�e.��e*e-�yy)"�N)�literal_eval)�
attrgetter)�Callable�Iterable�List�Match�
NamedTuple�Optional�Tuple�Union�)�_emoji_replace)�EmojiVariant)�MarkupError)�Style)�Span�Textz((\\*)\[([a-z#/@][^[]*?)])z^([\w.]*?)(\(.*?\))?$c�R�eZdZUdZeed<	eeed<	defd�Zedefd��Z	y)�TagzA tag in console markup.�name�
parameters�returnc�h�|j�|jS|j�d|j��S)N� �rr��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/markup.py�__str__zTag.__str__s3�����0�D�I�I�	
�9=����1�T�_�_�DU�6V�	
�c�t�|j�d|j�d�Sd|j�d|j�d�S)z*Get the string representation of this tag.�[�]�=rrs r�markupz
Tag.markup!sG��
���&���	�	�{�!��	
��T�Y�Y�K�q���� 1��3�	
r N)
�__name__�
__module__�__qualname__�__doc__�str�__annotations__r
r�propertyr%�r rrrsA��"�

�I�$���
��3�
��
�
�
��
��
r rz(\\*)(\[[a-z#/@][^[]*?])r%�_escaperc�F�dttdtfd�}|||�}|S)z�Escapes text so that it won't be interpreted as markup.

    Args:
        markup (str): Content to be inserted in to markup.

    Returns:
        str: Markup with square brackets escaped.
    �matchrc�:�|j�\}}|�|�d|��S)z!Called by re.sub replace matches.�\)�groups)r0�backslashes�texts   r�escape_backslashesz"escape.<locals>.escape_backslashes=s'��!�L�L�N���T���{�m�2�d�V�4�4r )rr*)r%r.r6s   r�escaper70s-��5�%��*�5��5�
�'��
0�F��Mr c#��K�d}t}t}tj|�D]�}|j	�\}}}|j�\}}	||kDr
||||df��|rA|t
|�d�\}
}|
r|d|
zdf��||
dzz
}|r||t
|�ddf��|	}�||jd�\}}
}|d|||
r|nd�f��|	}��|t
|�kr|||ddf��yy�w)z�Parse markup in to an iterable of tuples of (position, text, tag).

    Args:
        markup (str): A string containing console markup

    rN�r2r$)�divmodr�RE_TAGS�finditerr3�span�len�	partition)r%�position�_divmod�_Tagr0�	full_text�escapes�tag_text�start�endr4�escapedr5�equalsrs               r�_parserJFs"�����H��G��D��!�!�&�)��',�|�|�~�$�	�7�H��Z�Z�\�
��s��8������/��5�5��#*�3�w�<��#;� �K����T�K�/��5�5���q��(����Y�s�7�|�~�6��<�<����#+�#5�#5�c�#:� ��f�j��T�4��F�j��E�E�E���%*�&�#�f�+����x�y�)�4�/�/��s�C%C'�style�emoji�
emoji_variantc�����t}d|vrt|r|||��|��S||��St|��}|j}tj}g��j
�g}|j}	t}
t}dtdtttff��fd�}t|�D�]�\}
}}|�%|jdd�}||r||�n|��/|��2|jjd	��r/|jd
dj�}|r||�}	||�\}}n	��\}}|jjd�r�|j(rrd}|j(j�}t*j-|�}|�|j/�\}}|�dn|}	t1|�}|r|t9|t:�r|n|ff}nd}|	|
|t=|�t|j|i������Y|	|
|t=|�t|�����}|||j�|j(�}�jt=|�|f����t=|�}�r3�j�\}}t|�}|r|	|
|||���r�3t?|ddd�tAd���|_!|S#t $rt#d|j$�d|
�d
��d�wxYw#t&$rt#d|
�d��d�wxYw#t2$r-}t#d|�d|j(�d|j4����d}~wt6$r!}t#d|j(�d|���d�d}~wwxYw)a9Render console markup in to a Text instance.

    Args:
        markup (str): A string containing console markup.
        emoji (bool, optional): Also render emoji code. Defaults to True.

    Raises:
        MarkupError: If there is a syntax error in the markup.

    Returns:
        Text: A test instance.
    r")�default_variant)rK�
style_namerc���tt��d�D]"\}\}}|j|k(s��|�cSt|��)z"Pop tag matching given style name.r
)�	enumerate�reversedr�KeyError)rP�index�_�tag�pop�style_stacks    ��r�	pop_stylezrender.<locals>.pop_style�sG���(��+�)>��B�O�E�8�A�s��x�x�:�%��E�6�{�"� C��z�"�"r Nz\[�/r
z
closing tag 'z' at position z doesn't match any open tagzclosing tag '[/]' at position z has nothing to close�@�z()zerror parsing z in z; r-)�meta���rF)�key)"rr�appendr�	normalizerXrrr*r�intrJ�replacer�
startswith�striprTrr%�
IndexErrorr�
RE_HANDLERr0r3r�SyntaxError�msg�	Exception�
isinstance�tupler>�sortedr�spans)r%rKrLrM�
emoji_replacer5rarbro�append_span�_SpanrBrZr@�
plain_textrWrPrF�open_tag�handler_namer�
handler_match�match_parameters�meta_params�error�normalized_tag�text_lengthrXrYs                           @@r�renderr|gs����$#�M�
�&���DI�M�&�-�@��
�	
�OU��
�	
��e��D�
�[�[�F����I�)+�K�
�/�/�C��E��,�,�K��E��D�#�c�#�e�C��H�o�#�&,�F�^�!��*�c��!�#�+�+�E�3�7�J���=��,�:�F�
�_��x�x�"�"�3�'� �X�X�a�b�\�/�/�1�
��!*�:�!6�J�$�*3�J�*?���x�$�*-�%���x��=�=�+�+�C�0��*�*�')��%-�%8�%8�%>�%>�%@�
�(2�(8�(8��(D�
�(�4�=J�=Q�=Q�=S�:�L�*:�(8�(@��FV�'�	(�*6�z�*B�K�(� ,�#-�k�5�#A�!,�&1�^�	+�K�')����!�3�t�9�e�(�-�-��9U�.V��� ��e�S��Y��H�
� F�G�"&�i����&9�3�>�>�!J���"�"�C��I�~�#>�?�I&4�L�d�)�K�
� �_�_�&�
��s��C������e�[�%�8�9�	���d��d���G�)<�=�D�J��K��C$�$�)�+�C�J�J�<�~�h�Z�Oj�k��#�$�$��&�$�)�<�X�J�F[�\��#�$�$��$ +��"-�"0���d�8�CV�CV�BY�Y[�\a�\e�\e�[f� g�#��� )�(�"-�"0��1D�1D�0G�r�%�� Q�#�#'�(��(�s<�K	�*
K3�(L�	'K0�3L
�	M.�(M�M.�
M)�)M.�__main__)z[red]Hello World[/red]zagenta]Hello [b]World[/b]z9[bold]Bold[italic] bold and italic [/bold]italic[/italic]zDClick [link=https://www.willmcgugan.com]here[/link] to visit my Blogz+:warning-emoji: [bold red blink] DANGER![/])�print)�Table�Markup�Result)rr
)�padding)r]TN)0�re�astr�operatorr�typingrrrrr	r
rrrrLr�errorsrrKrr5rr�compile�VERBOSEr;rhrr*�_ReStringMatch�_ReSubCallable�_EscapeSubMethod�subr7rcrJ�boolr|r&�MARKUP�pip._vendor.richr~�pip._vendor.rich.tabler�gridr%�add_rowr-r r�<module>r�s���	���V�V�V�*�����
�"�*�*�%��J�J���
�R�Z�Z�0�
1�
�
�*�
�.�s����>�*�C�/�0���^�S�1�3�6�7��
!+��
�
�+F� G� K� K����
��	��,0�3�0�8�E�#�x��}�h�s�m�*K�$L�M�0�F "��,0�	z��z���e���z��z��L�)�	z�

�z�z�z���F�'�,���8�V�4�D������T�&�\�6�*��
�$�K�%r python3.12/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-312.pyc000064400000004753151732701720023044 0ustar00�

R`i���p�ddlZddlmZeGd�d��Z	ddlZddlmZejdk(reej�Zn
dZe	d��ddl
mZmZm
Z
mZd	efd
�Zedk(r;ddlZe�Zdd
lmZedej,��d��eee��yy#ee	ef$r	d	efd�ZY�QwxYw)�N)�	dataclassc�0�eZdZUdZdZeed<	dZeed<y)�WindowsConsoleFeatureszWindows features available.F�vt�	truecolorN)�__name__�
__module__�__qualname__�__doc__r�bool�__annotations__r����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_windows.pyrrs��%��B���(��I�t��)rr)�
LibraryLoader�win32zNot windows)�"ENABLE_VIRTUAL_TERMINAL_PROCESSING�GetConsoleMode�GetStdHandle�LegacyWindowsError�returnc�4�t�}	t|�}d}t|xr	|tz�}d}|rEtj�}|jdkDxs |jdk(xr|jdk\}t||��}|S#t$rd}d}Y�}wxYw)z�Get windows console features.

        Returns:
            WindowsConsoleFeatures: An instance of WindowsConsoleFeatures.
        TrF�
i�:)rr)
rrrrr�sys�getwindowsversion�major�buildr)�handle�console_mode�successrr�win_version�featuress       r�get_windows_console_featuresr#)s������	�)�&�1�L��G��'�O�l�-O�O�
P���	�
��/�/�1�K�#�)�)�B�.���!�!�R�'�F�K�,=�,=��,F�
�*�R�9�E�����"�	��L��G�	�s�
B�
B�Bc��t�}|S)N)r)r"s rr#r##s��)�+���r�__main__)�printz
platform="�")r�dataclassesrr�ctypesr�platform�WinDLL�windll�ImportError�pip._vendor.rich._win32_consolerrrrr#�AttributeError�
ValueErrorrr"�pip._vendor.richr&�system�reprrrr�<module>r4s���
�!��*�*��*�/��$�
�|�|�w���v�}�}�-�����-�(�(��� �*@��0�z���+�-�H�&�	�J��x���(�)��
+�,�	�$�x�.����C	��Z�0���*@���s�AB$�$B5�4B5python3.12/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-312.pyc000064400000006061151732701720023017 0ustar00�

R`i�	�
��dZdgZddlmZmZmZmZddd�dedeed	ed
eedeedefd
�Z	dedeed	edeeeffd�Z
ddd�ded
eedeedefd�Zy)a�Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2

The functions declared in this module should cover the different
use cases needed to generate a string representation of a file size
using several different units. Since there are many standards regarding
file size units, three different functions have been implemented.

See Also:
    * `Wikipedia: Binary prefix <https://en.wikipedia.org/wiki/Binary_prefix>`_

�decimal�)�Iterable�List�Optional�Tuple�� ��	precision�	separator�size�suffixes�baserr�returnc��|dk(ry||krdj|�St|d�D]\}}||z}||ks�ndj||zz||��S)Nrz1 bytez
{:,} bytes�z{:,.{precision}f}{separator}{}r
)�format�	enumerate)r
rrrr�i�suffix�units        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/filesize.py�_to_strrs}���q�y��	
����"�"�4�(�(��x��+�	��6��Q�w���$�;��,�,�2�2�	
���t�	����	3���c�T�t|�D]\}}||z}|||zks�||fSfS)z*Pick a suffix and base for the given size.)r)r
rrrrrs      r�pick_unit_and_suffixr,sC���x�(�	��6��Q�w���$��+�����<��	)���<�rc�"�t|dd||��S)a3Convert a filesize in to a string (powers of 1000, SI prefixes).

    In this convention, ``1000 B = 1 kB``.

    This is typically the format used to advertise the storage
    capacity of USB flash drives and the like (*256 MB* meaning
    actually a storage capacity of more than *256 000 000 B*),
    or used by **Mac OS X** since v10.6 to report file sizes.

    Arguments:
        int (size): A file size.
        int (precision): The number of decimal places to include (default = 1).
        str (separator): The string to separate the value from the units (default = " ").

    Returns:
        `str`: A string containing a abbreviated file size and units.

    Example:
        >>> filesize.decimal(30000)
        '30.0 kB'
        >>> filesize.decimal(30000, precision=2, separator="")
        '30.00kB'

    )�kB�MB�GB�TB�PB�EB�ZB�YBi�r
)r)r
rrs   rrr5s ��<��8�����rN)�__doc__�__all__�typingrrrr�int�strrrr�rr�<module>r,s���
��+��2�2� !�"�
�

���s�m����
��}����}�
�	��2�s��d�3�i��s��u�S�RU�X��� !�"�	$�

�$���}�$���}�	$�
	�$rpython3.12/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-312.pyc000064400000001766151732701730022461 0ustar00�

R`i_��@�ddlmZmZed�ZGd�dee�Zy)�)�List�TypeVar�Tc�6�eZdZdZedefd��Zdeddfd�Zy)�StackzA small shim over builtin list.�returnc��|dS)zGet top of stack.����)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_stack.py�topz	Stack.top	s
���B�x���itemNc�&�|j|�y)z<Push an item on to the stack (append in stack nomenclature).N)�append)rrs  r
�pushz
Stack.pushs�����D�r)�__name__�
__module__�__qualname__�__doc__�propertyrrrrrr
rrs1��)�
��Q�������t�rrN)�typingrrrrrrr
�<module>rs!�� ��C�L��
�D��G�
rpython3.12/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-312.pyc000064400000012211151732701740022703 0ustar00�

R`i�����ddlmZmZmZmZmZmZerddlmZddl	m
Z
ddlmZddl
mZerddlmZdZGd�d	�ZGd
�d�Zdeed
efd�Zdeeded
dfd�Zdeded
dfd�Zy)�)�
TYPE_CHECKING�Any�Dict�Iterable�List�Sequence)�ConsoleRenderable�)�get_console)�Segment)�DEFAULT_TERMINAL_THEMEz�<pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace">{code}</pre>
c
�R�eZdZdZdededdfd�Zdeedeed	edeeeffd
�Z	y)�JupyterRenderablez)A shim to write html to Jupyter notebook.�html�text�returnNc� �||_||_y)N)rr)�selfrrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/jupyter.py�__init__zJupyterRenderable.__init__s����	���	��include�exclude�kwargsc��|j|jd�}|r(|j�D��cic]
\}}||vs�||��}}}|r(|j�D��cic]
\}}||vs�||��}}}|Scc}}wcc}}w�N)z
text/plainz	text/html)rr�items)rrrr�data�k�vs       r�_repr_mimebundle_z#JupyterRenderable._repr_mimebundle_s{��#�i�i�d�i�i�@���'+�z�z�|�D�|�V�a��q�G�|�A�q�D�|�D�D��'+�z�z�|�H�|�V�a��q��7G�A�q�D�|�D�H����E��Hs�A0�A0�A6�&A6)
�__name__�
__module__�__qualname__�__doc__�strrrrrr!�rrrrsT��3��S���������}��/7��}��HK��	
�c�3�h��rrc�F�eZdZdZdZdddeedeededeeeff
d	�Z	y
)�JupyterMixinz@Add to an Rich renderable to make it render in Jupyter notebook.r'rr	rrrrc�f�t�}t|j||j��}t	|�}|j|�}||d�}|r(|j
�D�	�
cic]
\}	}
|	|vs�|	|
��}}	}
|r(|j
�D�	�
cic]
\}	}
|	|vs�|	|
��}}	}
|Scc}
}	wcc}
}	wr)r�list�render�options�_render_segments�_render_bufferr)rrrr�console�segmentsrrrrr s           rr!zJupyterMixin._repr_mimebundle_)s����-������t�W�_�_�=�>����)���%�%�h�/��"��6���'+�z�z�|�D�|�V�a��q�G�|�A�q�D�|�D�D��'+�z�z�|�H�|�V�a��q��7G�A�q�D�|�D�H����E��Hs�&B'�3B'�B-�B-N)
r"r#r$r%�	__slots__rr&rrr!r'rrr)r)$sM��J��I��!���#����#����	�

�c�3�h��rr)r1rc�|�dtdtfd�}g}|j}t}tj|�D]X\}}}|r�
||�}|r=|j|�}|r	d|�d|�d�n|}|jrd|j�d|�d	�}||��Zd
j|�}	tj|	��}
|
S)Nrrc�f�|jdd�jdd�jdd�S)zEscape html.�&z&amp;�<z&lt;�>z&gt;)�replace)rs r�escapez _render_segments.<locals>.escape<s-���|�|�C��)�1�1�#�v�>�F�F�s�F�S�Srz
<span style="z">z</span>z	<a href="z" target="_blank">z</a>�)�code)
r&�appendr
r�simplify�get_html_style�link�join�JUPYTER_HTML_FORMAT�format)r1r9�	fragments�append_fragment�themer�style�control�ruler;rs           rr.r.;s���T�S�T�S�T��I��&�&�O�"�E� '� 0� 0�� :���e�W����d�|����'�'��.�D�<@�]�4�&��4�&��8�d�D��z�z�"�5�:�:�,�.@���d�K�����!;��7�7�9��D��%�%�4�%�0�D��KrrNc�n�t|�}t||�}	ddlm}||�y#t$rYywxYw)zRender segments to Jupyter.r)�displayN)r.r�IPython.displayrJ�ModuleNotFoundError)r1rr�jupyter_renderable�ipython_displays     rrJrJTs>���H�%�D�*�4��6��
�>��*�+���
�	
�
�s�(�	4�4�argsrc�:�t�}|j|i|��S)zProxy for Console print.)r�print)rOrr0s   rrQrQbs���m�G��7�=�=�$�)�&�)�)r)�typingrrrrrr�pip._vendor.rich.consoler	r:r�segmentr�terminal_themer
rArr)r&r.rJrQr'rr�<module>rVs���E�E��:���2��:���
��$��.�x��0��S��2
�h�w�'�
�s�
�t�
�*��*��*��*rpython3.12/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-312.pyc000064400000001112151732701750023353 0ustar00�

R`i	�� �ddlmZdeddfd�Zy)�)�Any�ip�returnNc�8�ddlm}ddlm}|�|�y)Nr)�install)�pip._vendor.rich.prettyr�pip._vendor.rich.traceback)rr�
tr_installs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_extension.py�load_ipython_extensionrs��/�@��I��L�)�typingrr�r
r�<module>rs����s��t�r
python3.12/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-312.pyc000064400000022046151732701750023356 0ustar00�

R`iy���ddlmZddlmZmZmZmZmZmZm	Z	m
Z
e
rddlmZm
Z
mZmZmZmZddlmZddlmZddlmZe	d�ZGd	�d
�ZGd�d�Zy
)�)�zip_longest)�Iterator�Iterable�List�Optional�Union�overload�TypeVar�
TYPE_CHECKING�)�Console�ConsoleOptions�
JustifyMethod�OverflowMethod�RenderResult�RenderableType��Text)�cell_len)�Measurement�Tc�r�eZdZdZ	ddeedddfd�Z						dd�Z						d
d�Zdd	�Z	dedfd
�Z
y)�Renderablesz:A list subclass which renders its contents to the console.N�renderablesr�returnc�8�|�t|�|_yg|_y�N)�list�_renderables)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/containers.py�__init__zRenderables.__init__!s$��"-�!8�D���	
��>@�	
��c#�8K�|jEd{���y7��w�z,Console render method to insert line-breaks.N)r�r �console�optionss   r!�__rich_console__zRenderables.__rich_console__(s�����$�$�$�$�����c���|jD�cgc]}tj|||���}}|stdd�Std�|D��}td�|D��}t||�Scc}w)Nrc3�4K�|]}|j���y�wr)�minimum��.0�	dimensions  r!�	<genexpr>z/Renderables.__rich_measure__.<locals>.<genexpr>7�����A�j��9�$�$�j���c3�4K�|]}|j���y�wr)�maximumr.s  r!r1z/Renderables.__rich_measure__.<locals>.<genexpr>8r2r3)rr�get�max)r r'r(�
renderable�
dimensions�_min�_maxs       r!�__rich_measure__zRenderables.__rich_measure__.s{��
#�/�/�
�/�
�
�O�O�G�W�j�9�/�	�
���q�!�$�$��A�j�A�A���A�j�A�A���4��&�&��
s�A-c�:�|jj|�yr)r�append)r r8s  r!r>zRenderables.append;s����� � ��,r#c�,�t|j�Sr)�iterr�r s r!�__iter__zRenderables.__iter__>s���D�%�%�&�&r#r�r'r
r(rrr)r'r
r(rrr)r8rrN)�__name__�
__module__�__qualname__�__doc__rrr"r)r<r>rB�r#r!rrs}��D�CG�
�#�H�-=�$>�?�
�	
�
�%� �%�+;�%�	�%�'� �'�+;�'�	�'�-�'�(�#3�4�'r#rc�0�eZdZdZddedddfd�Zdefd�Zdedfd�Z	e
d	eddfd
��Ze
d	e
dedfd��Zd	ee
efdededffd�Zd	ed
dddfd�Zdefd�Z						dd�Zdd�Zdedddfd�Zdd	eddfd�Z		d dddeddddddf
d�Zy)!�Linesz0A list subclass which can render to the console.�linesrrNc�$�t|�|_yr)r�_lines�r rKs  r!r"zLines.__init__Es
��$(��K��r#c�"�d|j�d�S)NzLines(�)�rMrAs r!�__repr__zLines.__repr__Hs�������a�(�(r#c�,�t|j�Sr)r@rMrAs r!rBzLines.__iter__Ks���D�K�K� � r#�indexc��yrrH�r rTs  r!�__getitem__zLines.__getitem__N���r#c��yrrHrVs  r!rWzLines.__getitem__RrXr#c� �|j|SrrQrVs  r!rWzLines.__getitem__Vs���{�{�5�!�!r#�valuec�$�||j|<|SrrQ)r rTr[s   r!�__setitem__zLines.__setitem__Ys��"����E���r#c�6�|jj�Sr)rM�__len__rAs r!r_z
Lines.__len__]s���{�{�"�"�$�$r#r'r
c#�8K�|jEd{���y7��wr%rQr&s   r!r)zLines.__rich_console__`s�����;�;���r*c�:�|jj|�yr)rMr>)r �lines  r!r>zLines.appendfs�������4� r#c�:�|jj|�yr)rM�extendrNs  r!rdzLines.extendis�������5�!r#c�8�|jj|�Sr)rM�poprVs  r!rfz	Lines.popls���{�{���u�%�%r#�width�justifyr�overflowrc	�X�ddlm}|dk(r&|jD]}|j||d���y|dk(r�|jD]v}|j	�|j||��|j|t
|j�z
dz�|j|t
|j�z
��xy|d	k(r\|jD]L}|j	�|j||��|j|t
|j�z
��Ny|d
k(�r�t|j�D�]h\}}|t|j�dz
k(ry|jd�}td�|D��}	t|�dz
}
t|
�D�cgc]}d��}}d
}
|rC|	|
z|kr;|t|�|
z
dz
xxdz
cc<|
dz
}
|
dzt|�z}
|	|
z|kr�;g}tt||dd��D]~\}
\}}|j|�|
t|�ks�)|j!|d�}|j!|d
�}||k(r|n|j"}|j|d||
z|�����|d�j%|�||<��kyycc}w)a�Justify and overflow text to a given width.

        Args:
            console (Console): Console instance.
            width (int): Number of characters per line.
            justify (str, optional): Default justify method for text: "left", "center", "full" or "right". Defaults to "left".
            overflow (str, optional): Default overflow for text: "crop", "fold", or "ellipsis". Defaults to "fold".

        rr�leftT)ri�pad�center)ri��right�full� c3�FK�|]}t|j����y�wr)r�plain)r/�words  r!r1z Lines.justify.<locals>.<genexpr>�s���� H�%�$��$�*�*�!5�%�s�!rN���)�style�)�textrrM�truncate�rstrip�pad_leftrrs�	pad_right�	enumerate�len�split�sum�rangerr>�get_style_at_offsetrv�join)r r'rgrhrirrb�
line_index�words�
words_size�
num_spaces�_�spacesrT�tokensrt�	next_wordrv�
next_style�space_styles                    r!rhz
Lines.justifyos~�� 	��f�������
�
�e�h�D�
�A�$�
��
 ��������
��
�
�e�h�
�7��
�
�u�x��
�
�';�;��A�B����u�x��
�
�';�;�<�	$�
��
��������
��
�
�e�h�
�7��
�
�e�h�t�z�z�&:�:�;�$���
�$-�d�k�k�$:� �
�D���T�[�[�!1�A�!5�5���
�
�3��� � H�%� H�H�
� ��Z�!�^�
�%*�:�%6�7�%6��!�%6��7����$�z�1�E�9��s�6�{�U�2�Q�6�7�1�<�7�"�a��
�!&���c�&�k� 9��%�z�1�E�9�&(��09���u�Q�R�y�1�1�,�E�,�D�)��M�M�$�'��s�6�{�*� $� 8� 8��"� E��%.�%B�%B�7�A�%N�
�/4�
�/B�e��
�
���
�
�d�3����+>�k�&R�S�1�$(��8�=�=��#8��Z� �/%;���8s�	J')rHrC)rbrrN)ru)rk�fold)rDrErFrGrr"�strrRrrBr	�intrW�slicerrr]r_r)r>rdrfrhrHr#r!rJrJBs\��:�0�h�v�.�0��0�)�#�)�!�(�6�*�!�������������4��<����"��u�c�z�!2�"�u�V�T�&�\�=Q�7R�"����V����%��%�� ��+;��	��!�"�H�V�,�"��"�&��&�f�&�$*�%+�89��89��89�!�	89�
#�89�
�
89r#rJN)�	itertoolsr�typingrrrrrr	r
rr'r
rrrrrrxr�cellsr�measurerrrrJrHr#r!�<module>r�sQ��!�	�	�	������ ��C�L��!'�!'�He9�e9r#python3.12/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-312.pyc000064400000004740151732701750022471 0ustar00�

R`i7��l�ddlmZmZddlmZddlmZddlmZerddl	m
Z
mZmZm
Z
mZGd�d�Zy	)
�)�Optional�
TYPE_CHECKING�)�Segment)�	StyleType)�	loop_last)�Console�ConsoleOptions�RenderResult�RenderableType�Groupc	�V�eZdZUdZded<ddd�dddeed	ed
dfd�Z						d
d�Z	y)�Screenz�A renderable that fills the terminal screen and crops excess.

    Args:
        renderable (RenderableType): Child renderable.
        style (StyleType, optional): Optional background style. Defaults to None.
    r�
renderableNF)�style�application_mode�renderablesrr�returnc�@�ddlm}||�|_||_||_y)Nr)r
)�pip._vendor.rich.consoler
rrr)�selfrrrr
s     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/screen.py�__init__zScreen.__init__s"��	3���-�����
� 0���c#�K�|j\}}|jr|j|j�nd}|j||��}|j	|j
xsd||d��}t
j||||��}|jrt
d�nt
j�}t|�D]\}	}
|
Ed{���|	r�|���y7��w)N)�width�height�T)r�pad)rz

)�sizer�	get_style�update�render_linesrr�	set_shaper�liner)r�console�optionsrrr�render_options�lines�new_line�lastr%s           r�__rich_console__zScreen.__rich_console__(s����� ���
��v�15����!�!�$�*�*�-��� ���e�F��C���$�$��O�O�!�r�>��D�%�
���!�!�%���e�D��&*�&;�&;�7�6�?������#�E�*�J�D�$��O�O����+��s�C	C�C�C�C)r&r	r'r
rr)
�__name__�
__module__�__qualname__�__doc__�__annotations__rr�boolrr,�rrrrsd���!� �
&*�!&�	
1�&�
1��	�"�
1��	
1�

�
1�� ��+;��	�rrN)�typingrr�segmentrrr�_looprr&r	r
rrr
rr3rr�<module>r7s*��*�������$�$rpython3.12/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-312.pyc000064400000014735151732701760022475 0ustar00�

R`i`���ddlZddlmZddlmZddlmZmZmZm	Z	ejdk\rddlmZnddlmZGd�de�Z
d	ed
e	e
deefd�Zd	ed
eedeedeedeef
d�Z	dd	ed
eedeeedeefd�Zedk(rHddlmZeGd�d��Zededdd�eddd�eddd�g�Zeee��yy)�N)�Fraction)�ceil)�cast�List�Optional�Sequence)��)�Protocolc�B�eZdZUdZdZeeed<dZeed<dZ	eed<y)�Edgez1Any object that defines an edge (such as Layout).N�size��ratio�minimum_size)
�__name__�
__module__�__qualname__�__doc__rr�int�__annotations__rr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_ratio.pyr
r
s&��;��D�(�3�-���E�3�N��L�#�rr
�total�edges�returnc��|D�cgc]}|jxsd��}}t}d|v�rtt||��D���cgc]\}\}}|�||f��}}}}|t	d�|D��z
}|dkr1t||�D��cgc]\}}|�|j
xsdn|��c}}S||t	d�|D���}	|D]2\}}|	|jz|j
ks�#|j
||<n8|d�}
|D])\}}t|	|jz|
zd�\}}
|||<�+nd|vr��ttt|�Scc}wcc}}}wcc}}w)a�Divide total space to satisfy size, ratio, and minimum_size, constraints.

    The returned list of integers should add up to total in most cases, unless it is
    impossible to satisfy all the constraints. For instance, if there are two edges
    with a minimum size of 20 each and `total` is 30 then the returned list will be
    greater than total. In practice, this would mean that a Layout object would
    clip the rows that would overflow the screen height.

    Args:
        total (int): Total number of characters.
        edges (List[Edge]): Edges within total space.

    Returns:
        List[int]: Number of characters for each edge.
    Nc3�(K�|]
}|xsd���y�w)rNr)�.0rs  r�	<genexpr>z ratio_resolve.<locals>.<genexpr>2s����<�e�d��	��	�e�s�rrc3�BK�|]\}}|jxsd���y�w)rN)r)r �_�edges   rr!z ratio_resolve.<locals>.<genexpr>;s����K�N���D�D�J�J�O�!�O�N�s�)rr�	enumerate�zip�sumrr�divmodrrr)rrr$�sizes�	_Fraction�indexr�flexible_edges�	remaining�portion�	remainders           r�
ratio_resolver0s���".3�3�U�T�d�i�i��4��U�E�3��I��%�-�(1��U�E�1B�'C�
�'C�#��|��d��|��D�M�'C�	�
��C�<�e�<�<�<�	���>�#&�e�U�"3��"3�J�D�$�.2�\�$�#�#�(�q�t�C�"3��
�
��s�K�N�K�K�
��
*�K�E�4�����#�t�'8�'8�8�#�0�0��e���	*�"�!��I�-���t�"(��4�:�:�)=�	�)I�1�"M���i�#��e�� .�
�E�%�-�H��S�	�5�!�!��S
4��
��s�E�E
�E�ratios�maximums�valuesc�F�t||�D��cgc]\}}|r|nd��
}}}t|�}|s|ddS|}g}|j}	t|||�D]F\}}
}|r6|dkDr1t|
t	||z|z��}|	||z
�||z}||z}�?|	|��H|Scc}}w)adDivide an integer total in to parts based on ratios.

    Args:
        total (int): The total to divide.
        ratios (List[int]): A list of integer ratios.
        maximums (List[int]): List of maximums values for each slot.
        values (List[int]): List of values

    Returns:
        List[int]: A list of integers guaranteed to sum to total.
    rN)r&r'�append�min�round)
rr1r2r3r�_max�total_ratio�total_remaining�resultr5�maximum�value�distributeds
             r�ratio_reducer?Qs���7:�&�(�6K�
L�6K�{�u�d�t�e��"�6K�F�
L��f�+�K���a�y���O��F�
�]�]�F�!$�V�X�v�!>���w���[�1�_��g�u�U�_�-D�{�-R�'S�T�K��5�;�&�'��{�*�O��5� �K��5�M�"?��M��Ms�B�minimumsc�b�|r"t||�D��cgc]\}}|r|nd��
}}}t|�}|dkDsJd��|}g}|j}|�dgt|�z}	n|}	t||	�D]:\}}
|dkDrt	|
t||z|z��}n|}||�||z}||z}�<|Scc}}w)a<Distribute an integer total in to parts based on ratios.

    Args:
        total (int): The total to divide.
        ratios (List[int]): A list of integer ratios.
        minimums (List[int]): List of minimum values for each slot.

    Returns:
        List[int]: A list of integers guaranteed to sum to total.
    rzSum of ratios must be > 0)r&r'r5�len�maxr)rr1r@r�_minr9r:�distributed_totalr5�	_minimums�minimumr>s            r�ratio_distributerHqs����:=�f�h�:O�P�:O�;�5�$�4�%�Q�&�:O��P��f�+�K���?�7�7�7�?��O�#%��
�
%�
%�F����C�#�f�+�%�	��	��f�i�0���w���?��g�t�E�O�,C�k�,Q�'R�S�K�)�K��{���u����;�&��1����'Qs�B+�__main__)�	dataclassc�>�eZdZUdZeeed<dZeed<dZeed<y)�ENrrrr)	rrrrrrrrrrrrrLrL�s%��#��h�s�m�"���s����c�rrL�nr)N)�sys�	fractionsr�mathr�typingrrrr�version_infor�pip._vendor.typing_extensionsr
rr0r?rHr�dataclassesrJrL�resolved�printr'rrr�<module>rWs5��
���1�1����v���6��8��:"��:"�X�d�^�:"��S�	�:"�z����S�	��-1�#�Y��@D�S�	��	�#�Y��BDH�!��!��S�	�!�-5�d�3�i�-@�!�	�#�Y�!�H�z��%�������S�1�T�1�a�=�!�D�!�Q�-��4��A��"O�P�H�	�#�h�-��rpython3.12/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-312.pyc000064400000047357151732701760022543 0ustar00�

R`i�6����ddlmZmZddlmZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZmZmZmZddlmZddlmZdd	lmZmZmZmZdd
lmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(ddl)m*Z*e
rddl+m,Z,Gd�de�Z-ede#fZ.ede-fZ/Gd�de0�Z1Gd�de1�Z2Gd�d�Z3Gd�de�Z4Gd�de4�Z5Gd�d e4�Z6e&Gd!�d��Z7e8d"k(�rdd#l9mZe�Ze7�Z:e:jwe7d$d%�&�e7dd'�(�e7d)d*�+��e:d'jye7d,�-�e7d.d/�0��e:d.jye7d1d/�0�e7d2�-��e:d2jwe7d3�-�e7d4�-�e7d5�-��e:d,jwe7e:jzd6�-�e7d7�-��e:d1j}d8�eje:�y9y9):�)�ABC�abstractmethod)�islice)�
itemgetter)�RLock)	�
TYPE_CHECKING�Dict�Iterable�List�
NamedTuple�Optional�Sequence�Tuple�Union�)�
ratio_resolve)�Align)�Console�ConsoleOptions�RenderableType�RenderResult)�ReprHighlighter)�Panel)�Pretty)�Region)�Result�	rich_repr)�Segment)�	StyleType��Treec�2�eZdZUdZeed<eeeed<y)�LayoutRenderzAn individual layout render.�region�renderN)�__name__�
__module__�__qualname__�__doc__r�__annotations__rr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/layout.pyr#r# s��&��N���g���r,r#�Layoutc��eZdZdZy)�LayoutErrorzLayout related error.N�r&r'r(r)r+r,r-r0r0+s��r,r0c��eZdZdZy)�
NoSplitterz"Requested splitter does not exist.Nr1r+r,r-r3r3/s��,r,r3c�H�eZdZdZe�Zddddeddfd�Zded	e	de
fd
�Zy)�_Placeholderz4An internal renderable used as a Layout placeholder.�layoutr.�style�returnNc� �||_||_y�N)r6r7)�selfr6r7s   r-�__init__z_Placeholder.__init__8s�������
r,�console�optionsc#�jK�|j}|jxs|jj}|j}|jr|j�d|�d|�d�nd|�d|�d�}tt
jt|�d��|j|j|�d|����y�w)	Nz (z x �)�(�middle)�vertical�blue)r7�title�border_style�height)�	max_widthrG�sizer6�namerr�centerrr7�highlighter)r;r=r>�widthrGr6rEs       r-�__rich_console__z_Placeholder.__rich_console__<s������!�!�����6�7�<�<�#6�#6�������{�{��{�{�o�R��w�c�&���3��U�G�3�v�h�a�(�	�
��L�L����(�;��*�*��"�"�5�)���
�	
�s�B1B3)�)r&r'r(r)rrLrr<rrrrNr+r,r-r5r53sD��>�!�#�K��x��	��4��
��
�)7�
�	�
r,r5c
�j�eZdZUdZdZeed<edefd��Zede	dde
deede
ffd	��Z
y
)�SplitterzBase class for a splitter.rOrJr8c��y)z(Get the icon (emoji) used in layout.treeNr+�r;s r-�
get_tree_iconzSplitter.get_tree_iconU��r,�childrenr.r$c��y)z�Divide a region amongst several child layouts.

        Args:
            children (Sequence(Layout)): A number of child layouts.
            region (Region): A rectangular region to divide.
        Nr+)r;rVr$s   r-�dividezSplitter.divideYrUr,N)r&r'r(r)rJ�strr*rrTrrr
rrXr+r,r-rQrQPsg��$��D�#�N��7�s�7��7��� ��*��4:��	�%��&�(�)�	*���r,rQc	�J�eZdZdZdZdefd�Zdeddede	e
deffd�Zy	)
�RowSplitterz!Split a layout region in to rows.�rowr8c��y)Nu[layout.tree.row]⬌r+rSs r-rTzRowSplitter.get_tree_iconjs��%r,rVr.r$c#�K�|\}}}}t||�}d}t}	t||�D]\}
}|
|	||z|||�f��||z
}�y�w�Nr�rr�zip)r;rVr$�x�yrMrG�
render_widths�offset�_Region�child�child_widths            r-rXzRowSplitter.dividemsf����%���1�e�V�%�e�X�6�
�����"%�h�
�">��E�;����V��Q��V�D�D�D��k�!�F�#?���AA
N�r&r'r(r)rJrYrTrrr
rrXr+r,r-r[r[esG��+��D�&�s�&�	"� ��*�	"�4:�	"�	�%��&�(�)�	*�	"r,r[c	�J�eZdZdZdZdefd�Zdeddede	e
deffd�Zy	)
�ColumnSplitterz$Split a layout region in to columns.�columnr8c��y)Nu[layout.tree.column]⬍r+rSs r-rTzColumnSplitter.get_tree_icon~s��(r,rVr.r$c#�K�|\}}}}t||�}d}t}	t||�D]\}
}|
|	|||z||�f��||z
}�y�wr_r`)r;rVr$rbrcrMrG�render_heightsrerfrg�child_heights            r-rXzColumnSplitter.divide�sg����%���1�e�V�&�v�x�8������#&�x��#@��E�<����A��J��|�D�D�D��l�"�F�$A�riNrjr+r,r-rlrlysG��.��D�)�s�)�	#� ��*�	#�4:�	#�	�%��&�(�)�	*�	#r,rlc���eZdZdZeed�Z	d*dddddd�deedee	d	ee
d
e
de
ded
dfd�Zd
e
fd�Zed
efd��Zed
edfd��Zed
efd��Zde	d
edfd�Zde	d
dfd�Zed+d��Zdd�dedefdeee	fd
dfd�Zdedefd
dfd�Zdedefd
dfd�Zdedefd
dfd�Zd,d�Zded
dfd�Zd d!d"e	d
dfd#�Z d$e
d%e
d
e!fd&�Z"d e#d'e$d
efd(�Z%d e#d'e$d
e&fd)�Z'y)-r.aBA renderable to divide a fixed height in to rows or columns.

    Args:
        renderable (RenderableType, optional): Renderable content, or None for placeholder. Defaults to None.
        name (str, optional): Optional identifier for Layout. Defaults to None.
        size (int, optional): Optional fixed size of layout. Defaults to None.
        minimum_size (int, optional): Minimum size of layout. Defaults to 1.
        ratio (int, optional): Optional ratio for flexible layout. Defaults to 1.
        visible (bool, optional): Visibility of layout. Defaults to True.
    )r\rmNrT)rJrI�minimum_size�ratio�visible�
renderablerJrIrsrtrur8c���|xst|�|_||_||_||_||_||_|jd�|_g|_	i|_
t�|_y)Nrm)
r5�_renderablerIrsrtrJru�	splitters�splitter�	_children�_render_mapr�_lock)r;rvrJrIrsrtrus       r-r<zLayout.__init__�sg��&�;��d�);�����	�(�����
���	����":�$�.�.��":�"<��
�')���&(����W��
r,c#�K�d|jdf��d|jdf��d|jdf��d|jdf��y�w)NrJrIrsrrt)rJrIrsrtrSs r-�
__rich_repr__zLayout.__rich_repr__�sL�����d�i�i��%�%��d�i�i��%�%��d�/�/��2�2��t�z�z�1�$�$�s�AAc�6�|jr|S|jS)zLayout renderable.)r{rxrSs r-rvzLayout.renderable�s���~�~�t�;�4�+;�+;�;r,c�Z�|jD�cgc]}|js�|��c}Scc}w)zGets (visible) layout children.)r{ru)r;rgs  r-rVzLayout.children�s&��$(�>�>�C�>�%�U�]�]��>�C�C��Cs�(�(c��|jS)zGet a map of the last render.)r|rSs r-�mapz
Layout.map�s�����r,c�v�|j|k(r|S|jD]}|j|�}|��|cSy)z�Get a named layout, or None if it doesn't exist.

        Args:
            name (str): Name of layout.

        Returns:
            Optional[Layout]: Layout instance or None if no layout was found.
        N)rJr{�get)r;rJrg�named_layouts    r-r�z
Layout.get�sA���9�9����K�����$�y�y�����+�'�'�(�r,c�H�|j|�}|�td|����|S)NzNo layout with name )r��KeyError)r;rJr6s   r-�__getitem__zLayout.__getitem__�s,�����$����>��1�$��:�;�;��
r,c������ddlm�ddlm�ddlm}ddd�f��fd��|}|�|�d	|jj��d
��}d
��fd���||�|S)z/Get a tree renderable to show layout structure.r)�Styled)�Tabler r6r.r8c����|jj�}�jd��}|jrt	|�n�t	|�d�}|j||�|}|S)N)rrrr)�padding�dim)rzrT�gridrur�add_row)r6�icon�table�text�_summaryr�r�s     ��r-�summaryzLayout.tree.<locals>.summary�s`����?�?�0�0�2�D��J�J�|�J�4�E�#)�.�.��v��f�V�F�^�U�6S�
�
�M�M�$��%��H��Or,�layout.tree.T)�guide_style�	highlightc���|jD]9}�|j�|�d|jj����|��;y)Nr�)r�)r{�addrzrJ)�treer6rg�recurser�s   ��r-r�zLayout.tree.<locals>.recurse�sM����)�)����H�H����&2�5�>�>�3F�3F�2G�$H�����*r,)r�r!r6r.r8N)�pip._vendor.rich.styledr��pip._vendor.rich.tabler��pip._vendor.rich.treer!rzrJ)r;r!r6r�r�r�r�r�s    @@@@r-r�zLayout.tree�sg���	3�0�.�	�H�	��	�����F�O�&�v���';�';�&<�=��
��	�	��d���r,rm)rz�layoutsrzc��|D�cgc]}t|t�r|n
t|���!}}	t|t�r|n|j|�|_||jddycc}w#t
$rt
d|����wxYw)z�Split the layout in to multiple sub-layouts.

        Args:
            *layouts (Layout): Positional arguments should be (sub) Layout instances.
            splitter (Union[Splitter, str]): Splitter instance or name of splitter.
        zNo splitter called N)�
isinstancer.rQryrzr�r3r{)r;rzr�r6�_layoutss     r-�splitzLayout.splits���"�
�!��!���0�F�f�V�n�D�!�	�
�	A��h��1��-�T�^�^�H�-�/�
�M�%����q���
���	A��2�8�,�?�@�@�	A�s�$A'�+A,�,Bc�L�d�|D�}|jj|�y)z�Add a new layout(s) to existing split.

        Args:
            *layouts (Union[Layout, RenderableType]): Positional arguments should be renderables or (sub) Layout instances.

        c3�VK�|]!}t|t�r|n
t|����#y�wr:)r�r.)�.0r6s  r-�	<genexpr>z#Layout.add_split.<locals>.<genexpr>&s*����
�!��!���0�F�f�V�n�D�!�s�')N)r{�extend)r;r�r�s   r-�	add_splitzLayout.add_splits%��
�!�
��	
�����h�'r,c�(�|j|ddi�y)z�Split the layout in to a row (layouts side by side).

        Args:
            *layouts (Layout): Positional arguments should be (sub) Layout instances.
        rzr\N�r��r;r�s  r-�	split_rowzLayout.split_row,s��	��
�
�G�,�e�,r,c�(�|j|ddi�y)z�Split the layout in to a column (layouts stacked on top of each other).

        Args:
            *layouts (Layout): Positional arguments should be (sub) Layout instances.
        rzrmNr�r�s  r-�split_columnzLayout.split_column4s��	��
�
�G�/�h�/r,c�"�|jdd�=y)zReset splits to initial state.N)r{rSs r-�unsplitzLayout.unsplit<s���N�N�1�r,c�T�|j5||_ddd�y#1swYyxYw)zjUpdate renderable.

        Args:
            renderable (RenderableType): New renderable object.
        N)r}rx)r;rvs  r-�updatez
Layout.update@s���Z�Z�)�D���Z�Z�s��'r=r�layout_namec�2�|j5||}|j|\}}|\}}}}	|j||jj	||	��}
t||
�|j|<|j
|
||�ddd�y#1swYyxYw)z�Refresh a sub-layout.

        Args:
            console (Console): Console instance where Layout is to be rendered.
            layout_name (str): Name of layout.
        N)r}r|�render_linesr>�update_dimensionsr#�update_screen_lines)r;r=r�r6r$�_linesrbrcrMrG�liness           r-�refresh_screenzLayout.refresh_screenIs����Z�Z��+�&�F�!�-�-�f�5�N�F�F�$*�!�Q��5�&��(�(�����9�9�%��H��E�(4�F�E�'B�D���V�$��'�'��q�!�4��Z�Z�s�A7B
�
BrMrGc�t�|tdd||�fg}|j}|j}g}|j}|rO||��|d\}}	|j}
|
r)|jj|
|	�D]
}||��|r�Ot
|td���D��	cic]\}}	||	��
}}}	|Scc}	}w)z,Create a dict that maps layout on to Region.r���r)�key)r�append�poprVrzrX�sortedr)
r;rMrG�stack�pushr��layout_regions�append_layout_regionr6r$rV�child_and_region�
region_maps
             r-�_make_region_mapzLayout._make_region_mapZs���/3�V�A�q�%��5P�.Q�-R���|�|���i�i��68��-�4�4��� ���'�+�B�/�N�F�F����H��(.���(>�(>�x��(P�$��)�*�)Q��#)��Z��]�"K�
�"K����
�F�N�"K�	�
����	
s�"
B4r>c��|j}|jxs|j}|j||�}|j�D��cgc]\}}|js||f��}}}i}	|j
}
|j}|D]B\}}|
|j||j|j��}t||�|	|<�D|	Scc}}w)z�Render the sub_layouts.

        Args:
            console (Console): Console instance.
            options (ConsoleOptions): Console options.

        Returns:
            RenderMap: A dict that maps Layout on to a tuple of Region, lines
        )
rHrGr��itemsrVr�r�rvrMr#)
r;r=r>�render_width�
render_heightr�r6r$r��
render_mapr�r�r�s
             r-r%z
Layout.renderos����(�(�����8�'�.�.�
��*�*�<��G�
�#-�"2�"2�"4�
�"4�����?�?��V��"4�	�
�
68�
��+�+��#�5�5��,�N�F�F� ��!�!�#4�V�\�\�6�=�=�#Q��E�".�f�e�!<�J�v��	-�
���
s�Cc
#�DK�|j5|jxs|j}|jxs|j}|j	||j||��}||_t|�D�cgc]}g��}}t}|j�D]<\}	}
|	\}}}
}t|||||z�|
�D]\}}|j|���>tj�}|D]}|Ed{���|���	ddd�ycc}w7�#1swYyxYw�wr:)r}rHrMrGr%r�r|�ranger�valuesrar�r�line)r;r=r>rMrGr��_�layout_lines�_islicer$r��_xrc�
_layout_width�
layout_heightr\r��new_line�
layout_rows                   r-rNzLayout.__rich_console__�s�����Z�Z��%�%�6����E��^�^�5�w�~�~�F����W�g�.G�.G��v�.V�W�J�)�D��=B�6�]�0K�]���]�L�0K��G�#-�#4�#4�#6����6<�3��A�}�m�!$��L�!�Q��->�?��"�I�C���J�J�t�$�"�$7��|�|�~�H�*�
�%�%�%���+��Z��
1L�&��!�Z�s<�
D �A+D�:	D
�A5D�8D�9
D�	D �
D�D�D r:)r8r!)r8N)(r&r'r(r)r[rlryr
rrY�int�boolr<rr�propertyrvrrV�	RenderMapr�r�r�r�rrQr�r�r�r�r�r�r��	RegionMapr�rrr%rrNr+r,r-r.r.�s;��	�$�~�>�I�04��#�"������^�,���s�m�	�
�s�m���
�����
��*%�v�%��<�N�<��<��D�$�x�.�D��D�� �Y� �� ������ 2��$������%��%�T*2�%���.�0�1�%���#�
�&�%�
�	%�2(�%��.�(@�"A�(�d�(�-�%��.�(@�"A�-�d�-�0�U�8�^�+C�%D�0��0��*��*�D�*�5�i�5�c�5�d�5�"�c��3��9��*�g����9��:���)7��	�r,�__main__)r�header�)rJrI�main)rtrJ�
�footer)rIrJ�side)rJ�body�)rJrt�content�s2�toprB�bottom�left1�left2�fooN)@�abcrr�	itertoolsr�operatorr�	threadingr�typingrr	r
rrr
rrr�_ratior�alignrr=rrrrrLr�panelr�prettyrr$r�reprrr�segmentrr7rr�r!r#r�r��	Exceptionr0r3r5rQr[rlr.r&�pip._vendor.rich.consoler6r�r�r�r��printr+r,r-�<module>r�s���#����
�
�
�"��J�J�(����#����*� �:� �
��6�!�"�	���<�'�(�	� �)� �-��-�
�
�:�s��*"�(�"�(#�X�#�(�R�R��R�j�z��0��i�G�
�X�F�
����H�1�%��Q�V�$��B�X�&���6�N���V��0�&�f�A�2N�O�
�6�N���V��!�<�f�$�>O�P�
�4�L����E��F��1�6�x�3H���6�N����v�{�{�� A�6�w�CW�X�
�9����U�#��M�M�&��1r,python3.12/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-312.pyc000064400000012131151732701760023164 0ustar00�

R`i���L�ddlmZegd��Zegd��Zegd��Zy)�)�Palette))�rr)����)���)���)r
�7��)���)�:���)��rr��vrr)���H�V)���r)����)�;�x�)�r
�)�a��r')��r(r()�r
r
r
)�r
r
)r
r*r
)r*�Ur
)r
r
r*)r*r
r*)r
r*r*)r*r*r*)r+r+r+)r#r+r+)r+r#r+)r#r#r+)r+r+r#)r#r+r#)r+r#r#�r#r#r#(r))�r
r
)r
r-r
)r-r-r
)r
r
r-)r-r
r-)r
r-r-)�r.r.�r-r-r-�r#r
r
�r
r#r
�r#r#r
�r
r
r#�r#r
r#�r
r#r#r,r))r
r
�_)r
r
�)r
r
�)r
r
��r3)r
r6r
)r
r6r6)r
r6r7)r
r6r8)r
r6r9)r
r6r#)r
r7r
)r
r7r6)r
r7r7)r
r7r8)r
r7r9)r
r7r#)r
r8r
)r
r8r6)r
r8r7)r
r8r8)r
r8r9)r
r8r#)r
r9r
)r
r9r6)r
r9r7)r
r9r8)r
r9r9)r
r9r#r1)r
r#r6)r
r#r7)r
r#r8)r
r#r9r5)r6r
r
)r6r
r6)r6r
r7)r6r
r8)r6r
r9)r6r
r#)r6r6r
)r6r6r6)r6r6r7)r6r6r8)r6r6r9)r6r6r#)r6r7r
)r6r7r6)r6r7r7)r6r7r8)r6r7r9)r6r7r#)r6r8r
)r6r8r6)r6r8r7)r6r8r8)r6r8r9)r6r8r#)r6r9r
)r6r9r6)r6r9r7)r6r9r8)r6r9r9)r6r9r#)r6r#r
)r6r#r6)r6r#r7)r6r#r8)r6r#r9)r6r#r#)r7r
r
)r7r
r6)r7r
r7)r7r
r8)r7r
r9)r7r
r#)r7r6r
)r7r6r6)r7r6r7)r7r6r8)r7r6r9)r7r6r#)r7r7r
)r7r7r6)r7r7r7)r7r7r8)r7r7r9)r7r7r#)r7r8r
)r7r8r6)r7r8r7)r7r8r8)r7r8r9)r7r8r#)r7r9r
)r7r9r6)r7r9r7)r7r9r8)r7r9r9)r7r9r#)r7r#r
)r7r#r6)r7r#r7)r7r#r8)r7r#r9)r7r#r#)r8r
r
)r8r
r6)r8r
r7)r8r
r8)r8r
r9)r8r
r#)r8r6r
)r8r6r6)r8r6r7)r8r6r8)r8r6r9)r8r6r#)r8r7r
)r8r7r6)r8r7r7)r8r7r8)r8r7r9)r8r7r#)r8r8r
)r8r8r6)r8r8r7)r8r8r8)r8r8r9)r8r8r#)r8r9r
)r8r9r6)r8r9r7)r8r9r8)r8r9r9)r8r9r#)r8r#r
)r8r#r6)r8r#r7)r8r#r8)r8r#r9)r8r#r#)r9r
r
)r9r
r6)r9r
r7)r9r
r8)r9r
r9)r9r
r#)r9r6r
)r9r6r6)r9r6r7)r9r6r8)r9r6r9)r9r6r#)r9r7r
)r9r7r6)r9r7r7)r9r7r8)r9r7r9)r9r7r#)r9r8r
)r9r8r6)r9r8r7)r9r8r8)r9r8r9)r9r8r#)r9r9r
)r9r9r6)r9r9r7)r9r9r8)r9r9r9)r9r9r#)r9r#r
)r9r#r6)r9r#r7)r9r#r8)r9r#r9)r9r#r#r0)r#r
r6)r#r
r7)r#r
r8)r#r
r9r4)r#r6r
)r#r6r6)r#r6r7)r#r6r8)r#r6r9)r#r6r#)r#r7r
)r#r7r6)r#r7r7)r#r7r8)r#r7r9)r#r7r#)r#r8r
)r#r8r6)r#r8r7)r#r8r8)r#r8r9)r#r8r#)r#r9r
)r#r9r6)r#r9r7)r#r9r8)r#r9r9)r#r9r#r2)r#r#r6)r#r#r7)r#r#r8)r#r#r9r,)�r:r:)�r;r;)�r<r<)�&r=r=)�0r>r>)rrr)�Dr?r?)�Nr@r@)�XrArA)�brBrB)�lrCrCrr/)�rDrD)�rErE)r%r%r%)�rFrF)�rGrG)�rHrH)rrr)��rIrI)rrr)��rJrJ)��rKrKN)�paletter�WINDOWS_PALETTE�STANDARD_PALETTE�EIGHT_BIT_PALETTE����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_palettes.py�<module>rSs?�������,����.�A�C�rQpython3.12/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-312.pyc000064400000020671151732701760022674 0ustar00�

R`i���@�ddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZmZmZmZddlmZdd	lmZdd
lmZmZddlmZddlmZdd
lm Z Gd�de �Z!e"dk(r�ddl#Z#e�Ze$e%e#jL���D��cgc]\}}|�d|����c}}Z'e!e'ddd��Z(ejSe(�ejU�de(_+ejSe(�de(_,ejU�ejSe(�yycc}}w)�)�defaultdict)�chain)�
itemgetter)�Dict�Iterable�List�Optional�Tuple�)�Align�AlignMethod)�Console�ConsoleOptions�RenderableType�RenderResult)�	Constrain)�Measurement)�Padding�PaddingDimensions)�Table)�TextType)�JupyterMixinc��eZdZdZ		ddddddddd�deeededeede	d	e	d
e	de	dee
d
eeddfd�Zdeddfd�Z
dededefd�Zy)�Columnsa�Display renderables in neat columns.

    Args:
        renderables (Iterable[RenderableType]): Any number of Rich renderables (including str).
        width (int, optional): The desired width of the columns, or None to auto detect. Defaults to None.
        padding (PaddingDimensions, optional): Optional padding around cells. Defaults to (0, 1).
        expand (bool, optional): Expand columns to full width. Defaults to False.
        equal (bool, optional): Arrange in to equal sized columns. Defaults to False.
        column_first (bool, optional): Align items from top to bottom (rather than left to right). Defaults to False.
        right_to_left (bool, optional): Start column from right hand side. Defaults to False.
        align (str, optional): Align value ("left", "right", or "center") or None for default. Defaults to None.
        title (TextType, optional): Optional title for Columns.
    NF)�width�expand�equal�column_first�
right_to_left�align�title�renderables�paddingrrrrrr r!�returnc��t|xsg�|_||_||_||_||_||_||_||_|	|_	y)N)
�listr"rr#rrrrr r!)
�selfr"r#rrrrrr r!s
          ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/columns.py�__init__zColumns.__init__sP�� �� 1�r�2�����
���������
�(���*���,1��
���
��
renderablec�:�|jj|�y)zxAdd a renderable to the columns.

        Args:
            renderable (RenderableType): Any renderable object.
        N)r"�append)r'r+s  r(�add_renderablezColumns.add_renderable6s��	
�����
�+r*�console�optionsc#�Z���K�|j}�jD�cgc]}t|t�r||�n|��c}��syt	j
�j�\}}}}t||�}	|j}
tt�}t��}tj}
�D�cgc]}|
|||�j��c}��jrt��gt��z�dtdt t"tt$t&ff���fd�}t)j*�jdd��}�j,|_�j.|_�j0�?|
�j0|	zz}t3|�D]}|j5�j0��� n�|dkDr�|j7�d	}||�D]_\}}t|||�||<t9|j;��|	t|�dz
zz}||
kDrt|�dz
}n|dz|z}�an|dkDr��t=d�}||�D�cgc]
}||���}}�jr |D�cgc]}|�dnt?|�d	���}}�j@r,�j@}tB}|D�cgc]}|�dn|||���}}�jD}|jF}t3d	t|�|�D]}||||z}|r|ddd
�}||��|��ycc}wcc}wcc}wcc}wcc}w�w)N�column_countr$c3�D�K�t��}�
jr�tt����}||zg|z}t	||z�D]}||xxdz
cc<�||zdz
|z}t	|�D�cgc]}dg|z��
}}dx}}	t	|�D])}
|
|||	<||	xxdzcc<||	r|dz
}�#|	dz
}	d}�+tj|�D]}
|
dk(rn||
���nt���Ed{���||zrt	|||zz
�D]}d���yycc}w7�*�w)Nr���r)rN)�lenrr&�zip�ranger�
from_iterable)r2�
item_count�width_renderables�column_lengths�col_no�	row_count�_�cells�row�col�index�renderable_widthsr"r's           ���r(�iter_renderablesz2Columns.__rich_console__.<locals>.iter_renderablesVsg������[�)�J�� � �$(��->��)L�$M�!�-7�<�-G�,H�<�,W��#�J��$=�>�F�"�6�*�a�/�*�?�(�,�6��:�|�K�	�6;�I�6F�G�6F��"���,�6F��G��
��c�"�:�.�E�&+�E�#�J�s�O�"�3�'�1�,�'�%�c�*��q����q�����/�#�0�0��7�E���{��+�E�2�2�8�
�0�+�>�>�>��L�(��|�z�L�/H�I�J�A�!�M�K�)��#H�?�s�A.D �1
D�>A5D �3D�4+D TF)r#�collapse_padding�pad_edge)rrrr4)$�
render_strr"�
isinstance�strr�unpackr#�max�	max_widthr�intr5r�get�maximumrrr
r	rr�gridrr!rr7�
add_column�clear�sum�valuesrrr rr�add_row)r'r/r0rGr+�_top�right�_bottom�left�
width_paddingrL�widthsr2�get_measurementrD�tabler>�	column_no�renderable_width�total_width�get_renderable�_renderable�_renderablesr �_AlignrrU�startr@rCr"s`                            @@r(�__rich_console__zColumns.__rich_console__>sx������'�'�
�#�.�.�
�.�
�'1��S�&A�J�z�"�z�Q�.�
����%,�^�^�D�L�L�%A�"��e�W�d��D�%�(�
��%�%�	�!,�S�!1���;�'��%�/�/��*�
�)�
�
�G�W�j�9�A�A�)�
���:�:�!$�%6�!7� 8�3�?P�;Q� Q��	"��	"�
�e�C��.�!9�9�:�
;�	"�B�
�
�4�<�<�$�QV�W���{�{����j�j����:�:�!�%�4�:�:�
�+E�F�L��<�(��� � �t�z�z� �2�)���"������	�+;�L�+I�'�$�a�(+�F�9�,=�?O�(P�F�9�%�"%�f�m�m�o�"6���F��a��:�#�K�#�Y�.�'*�6�{�Q����%.��]�l�$B�	�,J����"� $�A��� 0��=�
�=��
�;�'�=�	�
��:�:�
#/�	�#/�J��%���z�+<�Q�+?�@�A�#/�	
���:�:��J�J�E��F�#/��".�J�#�*���z�5�0I�I�".�
��
�*�*�
��-�-���1�c�,�/��>�E��u�u�|�';�<�C���$�B�$�i���S�M�	?�
���S
��
��D
��
���sI�L+�!L�A0L+�1L�E,L+�9L+�L�L+�/L!�	$L+�-L&�A*L+)N�rr)�__name__�
__module__�__qualname__�__doc__r	rrrrM�boolr
rr)r.rrrrf�r*r(rrs���� ;?�%+��
 $���"�#�'+�$(���h�~�6�7��#��
��}���
���������$����!��
��.,��,�D�,�m��m�)7�m�	�mr*r�__main__N� rgF)r#rrT)-�collectionsr�	itertoolsr�operatorr�typingrrrr	r
r rr
r/rrrr�	constrainr�measurerr#rrr]r�textr�jupyterrrrh�os�	enumerate�sorted�listdir�files�columns�print�rulerr)�i�ss00r(�<module>r�s���#���8�8�%�J�J� � �/���!�[�l�[�|�z��
��i�G�$-�f�Z�R�Z�Z�\�.B�$C�D�$C�D�A�q��s�!�A�3�Z�$C�D�E��e�V�E��G�G��M�M�'���L�L�N��G���M�M�'�� �G���L�L�N��M�M�'����

Es�Dpython3.12/site-packages/pip/_vendor/rich/__pycache__/status.cpython-312.pyc000064400000013736151732701760022543 0ustar00�

R`iI��*�ddlmZddlmZmZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZGd	�d
e	�Zedk(r�ddlmZdd
lmZe�Zej)d�5Zed�ej+d�ed�ej+d�ed�ej-dd��ed�ej+d�ed�ej-ddd��ed�ddd�ej/d�yy#1swY�xYw)�)�
TracebackType)�Optional�Type�)�Console�RenderableType)�JupyterMixin)�Live)�Spinner)�	StyleTypec
��eZdZdZdddddd�ded	eed
edede	d
e	fd�Z
edefd��Z
edd��Z	ddddd�deed
eedeedee	ddf
d�Zdd�Zdd�Zdefd�Zdd�Zdeeedeedeeddfd�Zy) �Statusa�Displays a status indicator with a 'spinner' animation.

    Args:
        status (RenderableType): A status renderable (str or Text typically).
        console (Console, optional): Console instance to use, or None for global console. Defaults to None.
        spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
        spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
        speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
        refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.
    N�dotszstatus.spinnerg�?g)@)�console�spinner�
spinner_style�speed�refresh_per_second�statusrrrrrc��||_||_||_t||||��|_t|j||d��|_y)N��text�stylerT)rr�	transient)rrrr�_spinnerr
�
renderable�_live)�selfrrrrrrs       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/status.py�__init__zStatus.__init__sI�����*�����
���f�M�QV�W��
���O�O��1��	
��
��returnc��|jS�N)r�rs rrzStatus.renderable,s���}�}�r!c�.�|jjS)z+Get the Console used by the Status objects.)rrr%s rrzStatus.console0s���z�z�!�!�!r!)rrrc�j�|�||_|�||_|�||_|�Zt||j|j|j��|_|j
j
|jd��y|jj
|j|j|j��y)a�Update status.

        Args:
            status (Optional[RenderableType], optional): New status renderable or None for no change. Defaults to None.
            spinner (Optional[str], optional): New spinner or None for no change. Defaults to None.
            spinner_style (Optional[StyleType], optional): New spinner style or None for no change. Defaults to None.
            speed (Optional[float], optional): Speed factor for spinner animation or None for no change. Defaults to None.
        NrT)�refresh)rrrrrr�updater)rrrrrs     rr)z
Status.update5s��� �� �D�K��$�!.�D�����D�J���#��d�k�k��1C�1C�4�:�:��D�M�
�J�J���d�o�o�t��<��M�M� � ��[�[��(:�(:�$�*�*�
!�
r!c�8�|jj�y)zStart the status animation.N)r�startr%s rr+zStatus.startUs���
�
���r!c�8�|jj�y)zStop the spinner animation.N)r�stopr%s rr-zStatus.stopYs���
�
���r!c��|jSr$)rr%s r�__rich__zStatus.__rich__]s�����r!c�&�|j�|Sr$)r+r%s r�	__enter__zStatus.__enter__`s���
�
���r!�exc_type�exc_val�exc_tbc�$�|j�yr$)r-)rr2r3r4s    r�__exit__zStatus.__exit__ds
��	
�	�	�r!)r"rr$)r"N)r"r)�__name__�
__module__�__qualname__�__doc__rrr�strr�floatr �propertyrrrr)r+r-r/r1r�
BaseExceptionrr6�r!rrrsB��	�&*��#3��$(�
��
��'�"�	
�
�
�!�

��
�"�
�*��G�����"��"�,0��"&�-1�!%�
���(���#��	�
 �	�*�����
�
��@���.�����4�
�.�/���-�(����'�	�

�r!r�__main__)�sleep)rz"[magenta]Covid detector booting up�zImporting advanced AIzAdvanced Covid AI Readyz[bold blue] Scanning for Covid�earth)rrz*Found 10,000,000,000 copies of Covid32.exez%[bold red]Moving Covid32.exe to Trash�bouncingBall�yellow)rrr�Nz&[bold green]Covid deleted successfully)�typesr�typingrrrrr�jupyterr	�liver
rrrrrr7�timerAr�logr)�printr?r!r�<module>rNs����!�,�!����_�\�_�D�z��� ��i�G�	���<�	=��
�a�����+�,�
�a�����-�.�
�a���
�
�=�w�
�O�
�a�����@�A�
�a���
�
�:�"�"�	�	
�
	�a��
>� �M�M�:�;�/�
>�	=�s
�#BD	�	Dpython3.12/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-312.pyc000064400000007125151732701760023323 0ustar00�

R`ik��Z�ddlmZddlmZmZmZmZmZmZGd�dee	�Z
e
�Zy)�)�
TracebackType)�IO�Iterable�Iterator�List�Optional�Typec�T�eZdZd!d�Zdefd�Zd"dedefd�Zdefd�Z	d"dedefd	�Z
d"d
edeefd�Zd"ded
edefd�Z
defd�Zdefd�Zd"deedefd�Zdefd�Zdeeddfd�Zdefd�Zdeefd�Zdeefd�Zdeeedeedeeddfd�Zdedefd�Zd!d�Zdefd �Z y)#�NullFile�returnNc��y�N���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_null_file.py�closezNullFile.close����c��y�NFrrs r�isattyzNullFile.isatty	���r�_NullFile__nc��y�N�r)rrs  r�readz
NullFile.read���rc��yrrrs r�readablezNullFile.readablerr�_NullFile__limitc��yrr)rr"s  r�readlinezNullFile.readlinerr�_NullFile__hintc��gSrr)rr%s  r�	readlineszNullFile.readliness���	r�_NullFile__offset�_NullFile__whencec��y�Nrr)rr(r)s   r�seekz
NullFile.seek���rc��yrrrs r�seekablezNullFile.seekablerrc��yr+rrs r�tellz
NullFile.tellr-r�_NullFile__sizec��yr+r)rr2s  r�truncatezNullFile.truncate!r-rc��yrrrs r�writablezNullFile.writable$rr�_NullFile__linesc��yrr)rr7s  r�
writelineszNullFile.writelines'rrc��yrrrs r�__next__zNullFile.__next__*rrc��tdg�Sr)�iterrs r�__iter__zNullFile.__iter__-s���R�D�z�rc��yrrrs r�	__enter__zNullFile.__enter__0rr�_NullFile__t�_NullFile__value�_NullFile__tracebackc��yrr)rrArBrCs    r�__exit__zNullFile.__exit__3s��	
r�textc��yr+r)rrFs  r�writezNullFile.write;r-rc��yrrrs r�flushzNullFile.flush>rrc��y)N���rrs r�filenozNullFile.filenoArr)rN)�)!�__name__�
__module__�__qualname__r�boolr�int�strrr!r$rr'r,r/r1rr4r6rr9r;rr>rr@r	�
BaseExceptionrrErHrJrMrrrrrsW��
�������C���$�����C�����D��I���S��C�����$���c���x��}��S���$��
�(�3�-�
�D�
��#���(�3�-��
�2�c�7�
�
�
�d�=�)�
*�
��-�(�
��m�,�	
�

�
��#��#��
���rrN)�typesr�typingrrrrrr	rTr�	NULL_FILErrr�<module>rYs(���?�?�=�r�#�w�=�@
�J�	rpython3.12/site-packages/pip/_vendor/rich/__pycache__/console.cpython-312.pyc000064400000335660151732701770022666 0ustar00�

R`i���
��UddlZddlZddlZddlZddlZddlZddlmZmZddl	m
Z
mZddlmZddl
mZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZmZmZdd
lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,ddl-m.Z.ej^dk\rddlm0Z0m1Z1m2Z2n
ddl3m0Z0m1Z1m2Z2ddl4m5Z5m6Z6ddl7m7Z7ddl8m9Z9m:Z:ddl;m<Z<ddl=m>Z>m?Z?ddl@mAZAmBZBddlCmDZDmEZEddlFmGZGddlHmIZIddlJmKZKmLZLddlMmNZOddlPmQZQmRZRddlSmTZTmUZUddlVmWZWmXZXdd lYmZZZdd!l[m\Z\dd"l]m^Z^dd#l_m`Z`dd$lambZbdd%lcmdZdmeZedd&lfmgZgdd'lhmiZimjZjmkZkdd(llmmZmmnZndd)lompZpmqZqerdd*lrmsZsdd+ltmuZudd,lvmwZwd-Zxd.Zyej��d/k(Z{e!e+e|d0fgd0fZ}e0d1Z~e0d2ZGd3�d4�Z�e��Z�	e�j�j�Z�	e�j�j�Z�	e�j�j�Z�e�e�e�fZ�e�e�fZ�eD�jeD�jeD�jd6�Z�Gd7�d8e&�Z�e
Gd9�d:��Z�e2Gd;�d<e1��Z�e2Gd=�d>e1��Z�e+e�e�e|fZ�e#e+e�ebfZ�eK�Z�Gd?�d@e��Z�GdA�dB�Z�GdC�dD�Z�GdE�dF�Z�GdG�dH�Z�GdI�dJ�Z�GdK�dL�Z�GdM�dN�Z�ddPe�dQe!dRe!dRe�fffdS�Z�dQe�fdT�Z�eD�jeD�jeD�jBeDj�dU�Z�e��jG�D��cic]\}}||��
c}}Z�e
GdV�dWe�jJ��Z�GdX�dYe�Z�da�e'dZe�d[<d�d\�Z�dQe�fd]�Z�Gd^�d_�Z�d`e|dQe|fda�Z�e�dbk(rve�dO�c�Z�e��jadddedfdOdgddhdidjdkdl�dmdn��e��jadodpe�e���e��jedgdOdqgdr�dsdt�du�dgdvgdw�dxdt�dygdz�d{dt�d|�d}�d~��yy#e�$rdZ�Y��PwxYw#e�$rdZ�Y��AwxYw#e�$rd5Z�Y��2wxYwcc}}w)��N)�ABC�abstractmethod)�	dataclass�field)�datetime)�wraps)�getpass)�escape)�isclass)�islice)�ceil)�	monotonic)�	FrameType�
ModuleType�
TracebackType)�IO�
TYPE_CHECKING�Any�Callable�Dict�Iterable�List�Mapping�
NamedTuple�Optional�TextIO�Tuple�Type�Union�cast)�	NULL_FILE)��)�Literal�Protocol�runtime_checkable�)�errors�themes)�_emoji_replace)�CONSOLE_HTML_FORMAT�CONSOLE_SVG_FORMAT)�
get_fileno)�FormatTimeCallable�	LogRender)�Align�AlignMethod)�ColorSystem�	blend_rgb)�Control)�EmojiVariant)�NullHighlighter�ReprHighlighter��render)�Measurement�measure_renderables)�Pager�SystemPager)�Pretty�
is_expandable)�	rich_cast)�Region)�render_scope)�Screen)�Segment)�Style�	StyleType)�Styled)�DEFAULT_TERMINAL_THEME�SVG_EXPORT_THEME�
TerminalTheme)�Text�TextType)�Theme�
ThemeStack)�WindowsConsoleFeatures)�Live��Status�s�d�WindowsrK)�default�left�center�right�full)�fold�crop�ellipsis�ignorec��eZdZy)�NoChangeN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/console.pyr`r`Vs��rer`�)�kitty�256color�16colorc�(�eZdZUdZeed<	eed<y)�ConsoleDimensionszSize of the terminal.�width�heightN)rarbrc�__doc__�int�__annotations__rdrerfrlrlts����J�.��K�-rerlc��eZdZUdZeed<	eed<	eed<	eed<	eed<	eed<	eed<	d	Z	e
eed
<	d	Ze
e
ed<	dZe
eed
<	d	Ze
eed<	d	Ze
eed<	d	Ze
eed<edefd��Zdd�Zeeeeeeeeed�	deeefdeeefdeeefd
ee
eefdee
e
efd
ee
eefdee
eefdee
eefdee
eefddfd�Zdeddfd�Zdeddfd�Zdd�Zdededdfd�Zy	)�ConsoleOptionsz$Options for __rich_console__ method.�size�legacy_windows�	min_width�	max_width�is_terminal�encoding�
max_heightN�justify�overflowF�no_wrap�	highlight�markuprn�returnc�:�|jjd�S)z+Check if renderables should use ascii only.�utf)ry�
startswith��selfs rf�
ascii_onlyzConsoleOptions.ascii_only�s���=�=�+�+�E�2�2�2rec�v�tjt�}|jj�|_|S)zdReturn a copy of the options.

        Returns:
            ConsoleOptions: a copy of self.
        )rs�__new__�__dict__�copy�r��optionss  rfr�zConsoleOptions.copy�s.��#1�"8�"8��"H���=�=�-�-�/����re)	rmrvrwr{r|r}r~rrnrmc	��|j�}
t|t�std|�x|
_|
_t|t�s||
_t|t�s||
_t|t�s||
_t|t�s||
_t|t�s||
_t|t�s||
_	t|t�s||
_
t|	t�s|	�|	|
_|	�dntd|	�|
_|
S)zUpdate values, return a copy.rN)
r��
isinstancer`�maxrvrwr{r|r}r~rrzrn)r�rmrvrwr{r|r}r~rrnr�s           rf�updatezConsoleOptions.update�s����)�)�+���%��*�47��5�M�A�G��� 1��)�X�.� )�G���)�X�.� )�G���'�8�,�%�G�O��(�H�-�'�G���'�8�,�%�G�O��)�X�.� )�G���&�(�+�#�G�N��&�(�+��!�%+��"�%+�^�T��Q���G�N��rec�V�|j�}td|�x|_|_|S)z�Update just the width, return a copy.

        Args:
            width (int): New width (sets both min_width and max_width)

        Returns:
            ~ConsoleOptions: New console options instance.
        r)r�r�rvrw)r�rmr�s   rf�update_widthzConsoleOptions.update_width�s*���)�)�+��03�A�u�
�=���G�-��rec�B�|j�}|x|_|_|S)z�Update the height, and return a copy.

        Args:
            height (int): New height

        Returns:
            ~ConsoleOptions: New Console options instance.
        )r�rzrn)r�rnr�s   rf�
update_heightzConsoleOptions.update_height�s#���)�)�+��.4�4���W�^��rec�4�|j�}d|_|S)z�Return a copy of the options with height set to ``None``.

        Returns:
            ~ConsoleOptions: New console options instance.
        N)r�rnr�s  rf�reset_heightzConsoleOptions.reset_height�s���)�)�+������rec�r�|j�}td|�x|_|_|x|_|_|S)aUpdate the width and height, and return a copy.

        Args:
            width (int): New width (sets both min_width and max_width).
            height (int): New height.

        Returns:
            ~ConsoleOptions: New console options instance.
        r)r�r�rvrwrnrz)r�rmrnr�s    rf�update_dimensionsz ConsoleOptions.update_dimensions�s9���)�)�+��03�A�u�
�=���G�-�.4�4����+��re)r�rs)rarbrcrorlrq�boolrp�strr{r�
JustifyMethodr|�OverflowMethodr}r~rrn�propertyr�r��	NO_CHANGErr`r�r�r�r�r�rdrerfrsrs}s��.�
�����2��N�&��N�&���<��M���O�2�'+�G�X�m�
$�+�0�)-�H�h�~�&�-�1�#�G�X�d�^�#�$� $�I�x��~�$�,�!�F�H�T�N�!�/� �F�H�S�M� �
�3�D�3��3��'0�*3�*3�<E�>G�3<�5>�2;�1:�#��S�(�]�#�#���h��'�	#�
��h��'�#��x�
�.��8�9�
#����0�(�:�;�#��x��~�x�/�0�#���$���1�2�#��h�t�n�h�.�/�#��h�s�m�X�-�.�#�
�#�J�#��*:���C��,<���
�s�
�C�
�<L�
rersc�(�eZdZdZdeddeffd�Zy)�RichCastz5An object that may be 'cast' to a console renderable.r��ConsoleRenderablec��y�Nrdr�s rf�__rich__zRichCast.__rich__���	reN)rarbrcrorr�r�rdrerfr�r�s��?��	�"�J��3�	4�rer�c�$�eZdZdZ						dd�Zy)r�z-An object that supports the console protocol.c��yr�rd�r��consoler�s   rf�__rich_console__z"ConsoleRenderable.__rich_console__r�reN)r��Consoler�rsr��RenderResult)rarbrcror�rdrerfr�r�
s"��7�� ��+;��	�rer�c��eZdZdZy)�CaptureErrorz(An error in the Capture context manager.N)rarbrcrordrerfr�r� s��2rer�c�<�eZdZdZddeddfd�Zdddd	deefd
�Zy)�NewLinez$A renderable to generate new line(s)�countr�Nc��||_yr�)r��r�r�s  rf�__init__zNewLine.__init__'s	����
rer�r�r�rsc#�@K�td|jz���y�w)N�
)rDr�r�s   rfr�zNewLine.__rich_console__*s�����d�T�Z�Z�'�(�(�s��r')	rarbrcrorpr�rrDr�rdrerfr�r�$s:��.��c��$��)� �)�+;�)�	�'�	�)rer�c�H�eZdZdZdeeedededdfd�Zdd	d
ede	fd�Z
y)�ScreenUpdatez)Render a list of lines at a given offset.�lines�x�yr�Nc�.�||_||_||_yr�)�_linesr�r�)r�r�r�r�s    rfr�zScreenUpdate.__init__3s����������rer�r�r�c#��K�|j}tj}t|j|j
�D]\}}|||���|Ed{����y7��wr�)r�r4�move_to�	enumerater�r�)r�r�r�r�r��offset�lines       rfr�zScreenUpdate.__rich_console__8sN����
�F�F���/�/��%�d�k�k�4�6�6�:�L�F�D��!�V�$�$��O�O�;��s�AA�A�A)rarbrcrorrDrpr�rsr�r�rdrerfr�r�0sL��3��d�4��=�1��c��c��d��
� ��+9��	�rer�c�\�eZdZdZdd�Zdd�Zdeeedeedee	ddfd	�Z
defd
�Zy)
�Capturez�Context manager to capture the result of printing to the console.
    See :meth:`~rich.console.Console.capture` for how to use.

    Args:
        console (Console): A console instance to capture output.
    r�Nc� �||_d|_yr�)�_console�_result)r�r�s  rfr�zCapture.__init__Js����
�&*��rec�:�|jj�|Sr�)r��
begin_capturer�s rf�	__enter__zCapture.__enter__N����
�
�#�#�%��re�exc_type�exc_val�exc_tbc�B�|jj�|_yr�)r��end_capturer��r�r�r�r�s    rf�__exit__zCapture.__exit__Rs���}�}�0�0�2��rec�H�|j�td��|jS)zGet the result of the capture.z<Capture result is not available until context manager exits.)r�r�r�s rf�getzCapture.getZs(���<�<���N��
��|�|�re)r�r�r�N)r�r�)
rarbrcror�r�rr�
BaseExceptionrr�r�r�rdrerfr�r�Bs\���+��3��4�
�.�/�3��-�(�3���'�	3�

�3��S�rer�c	�b�eZdZdZddddededdfd�Zdd	�Zd
ee	e
dee
deeddfd
�Zy)�ThemeContextzbA context manager to use a temporary theme. See :meth:`~rich.console.Console.use_theme` for usage.r�r��theme�inheritr�Nc�.�||_||_||_yr�)r�r�r�)r�r�r�r�s    rfr�zThemeContext.__init__fs�������
���rec�P�|jj|j�|Sr�)r��
push_themer�r�s rfr�zThemeContext.__enter__ks��������
�
�+��rer�r�r�c�8�|jj�yr�)r��	pop_themer�s    rfr�zThemeContext.__exit__os��	
����� re�T)r�r�)
rarbrcrorMr�r�r�rrr�rr�rdrerfr�r�csk��l��	��%��$��RV��
�!��4�
�.�/�!��-�(�!���'�	!�

�!rer�c�r�eZdZdZ			ddddeedededdf
d	�Zdd
�Zdee	e
dee
d
eeddfd�Zy)�PagerContextzZA context manager that 'pages' content. See :meth:`~rich.console.Console.pager` for usage.Nr�r��pager�styles�linksr�c�T�||_|�
t�n||_||_||_yr�)r�r=r�r�r�)r�r�r�r�r�s     rfr�zPagerContext.__init__{s(�� ��
�&+�m�[�]���
������
rec�:�|jj�|Sr�)r��
_enter_bufferr�s rfr�zPagerContext.__enter__�r�rer�r�r�c���|��|jj5|jjdd}|jjdd�=|}|jst	j
|�}n!|jst	j|�}|jj|�}ddd�|jj�|jj�y#1swY�?xYwr�)r��_lock�_bufferr�rD�strip_stylesr��strip_links�_render_bufferr��show�_exit_buffer)r�r�r�r��buffer�segments�contents       rfr�zPagerContext.__exit__�s��������$�$�(,�
�
�(=�(=�a�(@���M�M�)�)�!�,�.4���{�{�&�3�3�H�=�H����&�2�2�8�<�H��-�-�6�6�x�@��%�
�J�J�O�O�G�$��
�
�"�"�$�%�$�s�BC*�*C3�NFF)r�r�)
rarbrcrorr<r�r�r�rr�rr�rdrerfr�r�xs���d�
"&���
��
����
��	
�
�
�
�
��%��4�
�.�/�%��-�(�%���'�	%�

�%rer�c	��eZdZdZ	ddddededdfd�Zdd	�d
edeeddfd�Z	dd�Z
d
eeedeedee
ddfd�Zy)�
ScreenContextziA context manager that enables an alternative screen. See :meth:`~rich.console.Console.screen` for usage.r�r��hide_cursor�styler�Nc�P�||_||_t|��|_d|_y)N�r�F)r�r�rC�screen�_changed)r�r�r�r�s    rfr�zScreenContext.__init__�s&�����&����5�)�����
rer��renderablesc���|r*t|�dkDrt|�n|d|j_|�||j_|j
j
|jd��y)a+Update the screen.

        Args:
            renderable (RenderableType, optional): Optional renderable to replace current renderable,
                or None for no change. Defaults to None.
            style: (Style, optional): Replacement style, or None for no change. Defaults to None.
        r'rN�)�end)�len�Groupr��
renderabler�r��print)r�r�r�s   rfr�zScreenContext.update�s\���'*�;�'7�!�';��{�#��Q��
�K�K�"��� %�D�K�K�������4�;�;�B��/rec��|jjd�|_|jr'|jr|jj	d�|S)NTF)r��set_alt_screenr�r��show_cursorr�s rfr�zScreenContext.__enter__�s>�����3�3�D�9��
��=�=�T�-�-��L�L�$�$�U�+��rer�r�r�c��|jrD|jjd�|jr|jj	d�yyy)NFT)r�r�rr�rr�s    rfr�zScreenContext.__exit__�sB���=�=��L�L�'�'��.�������(�(��.� �re�r�)r�r�)rarbrcror�rFr��RenderableTyperr�r�rr�rr�rdrerfr�r��s���s�IK�� ��/3��<E��	
��JN�0�*�0�3;�I�3F�0�	
�0�$�	/��4�
�.�/�	/��-�(�	/���'�		/�

�	/rer�c�n�eZdZdZdd�dddeddfd	�Zededfd
��Z						dd�Z	ddd
dde
fd�Zy)ra$Takes a group of renderables and returns a renderable object that renders the group.

    Args:
        renderables (Iterable[RenderableType]): An iterable of renderable objects.
        fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.
    T)�fitr�r
rr�Nc�.�||_||_d|_yr�)�_renderablesr�_render)r�rr�s   rfr�zGroup.__init__�s��'������7;��rec�f�|j�t|j�|_|jSr�)r�listrr�s rfr�zGroup.renderables�s(���<�<���� 1� 1�2�D�L��|�|�rer�r�r�rsc��|jrt|||j�St|j|j�Sr�)rr;r�r:rwr�s   rf�__rich_measure__zGroup.__rich_measure__�s9���8�8�&�w���9I�9I�J�J��w�0�0�'�2C�2C�D�Drec#�8K�|jEd{���y7��wr�)r�r�s   rfr�zGroup.__rich_console__�s�����#�#�#�#�s���)r�r�r�rsr�r:)rarbrcror�r�r�rr�rr�r�rdrerfrr�s����DH�<�%5�<�D�<�D�<�
��T�"2�3����
E� �E�+;�E�	�E�$� �$�+;�$�	�$rerTrr�.c�^��dtdttfdtdtff�fd�}|S)z�A decorator that turns an iterable of renderables in to a group.

    Args:
        fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.
    �method.r�c�X���t��dtdtdtf��fd��}|S)zGConvert a method that returns an iterable of renderables in to a Group.�args�kwargsr�c�*���|i|��}t|d�i�S)Nr)r)rrr�rrs   ��rf�_replacez*group.<locals>.decorator.<locals>._replace�s"��� �$�1�&�1�K��+�/�3�/�/re)rrr)rrrs` �rf�	decoratorzgroup.<locals>.decorator�s7���

�v��	0�C�	0�3�	0�5�	0�
�	0��re)rrr
r)rrs` rf�groupr�s8���
���h�~�6�6�7�
�	�#�u�*�	�
��rec���	tt�}|jj}dt	|j�vstjd�s|dk(ry|dk(ryy#t$rYywxYw)z-Check if we're running in a Jupyter notebook.Fzgoogle.colab�DATABRICKS_RUNTIME_VERSION�ZMQInteractiveShellT�TerminalInteractiveShell)�get_ipython�	NameError�	__class__rar��os�getenv)�ipython�shells  rf�_is_jupyterr)ss�����m�G����&�&�E��#�g�/�/�0�0�
�9�9�1�2��)�)��	�,�	,��������s�A!�!	A-�,A-)�standard�256�	truecolor�windowsc�L�eZdZUdZeed<ee��Ze	e
ed<dZeed<y)�ConsoleThreadLocalsz(Thread local values for Console context.�theme_stack)�default_factoryr�r�buffer_indexN)
rarbrcrorNrqrrr�rrDr2rprdrerfr/r/#s(��2���!�$�7�F�D��M�7��L�#�rer/c�6�eZdZdZedeedeefd��Zy)�
RenderHookz(Provides hooks in to the render process.r�r�c��y)aLCalled with a list of objects to render.

        This method can return a new list of renderables, or modify and return the same list.

        Args:
            renderables (List[ConsoleRenderable]): A number of renderable objects.

        Returns:
            List[ConsoleRenderable]: A replacement list of renderables.
        Nrd)r�r�s  rf�process_renderableszRenderHook.process_renderables/s�reN)rarbrcrorrr�r6rdrerfr4r4,s3��2���� 1�2��	
��	 ���rer4rO�_windows_console_featuresc�@�t�tSddlm}|�atS)Nr'��get_windows_console_features)r7�_windowsr:r9s rfr:r:Bs �� �,�(�(�6� <� >��$�$rec�<�txrt�jS)zDetect legacy Windows.)�WINDOWSr:�vtrdrerf�detect_legacy_windowsr?Ls���<�7�9�<�<�<�<rec<�n�eZdZUdZej
Zeeefe	d<dddddddddddddddddddddde
�dddddd	�d
eeddee
d
ee
dee
de
deede
deeede
deedeedeedee
dede
de
de
deede
de
de
d eeefd!ed"d#ee
d$e
d%eegefd&eegefdeeeeff8d'�Zd(efd)�Zed(eefd*��Zej8d+eed(dfd,��Zed(eefd-��Zed(efd.��Z e j8d/ed(dfd0��Z ed(e!fd1��Z"d(ee#fd2�Z$d�d3�Z%d�d4�Z&d�d5�Z'd�d6�Z(d7e)d(dfd8�Z*d�d9�Z+d�d:�Z,d;e-d<e-d=e-d(dfd>�Z.d�d?�Z/d(efd@�Z0ddA�dedBe
d(dfdC�Z1d�dD�Z2ddA�dedBe
d(e3fdE�Z4ed(eefdF��Z5ed(efdG��Z6ed(e
fdH��Z7ed(e
fdI��Z8ed(e9fdJ��Z:ed(e;fdK��Z<e<j8dLe=eefd(dfdM��Z<ed(efdN��Z>e>j8ded(dfdO��Z>ed(efdP��Z?e?j8ded(dfdQ��Z?d�dR�Z@d(eAfdS�ZB	d�dTeeCdUe
dVe
d(eDfdW�ZEd�dYed(dfdZ�ZFd�d[e
d(dfd\�ZGd]d^d_d`da�dbeHdceddedeedfed(dgfdh�ZId�die
d(e
fdj�ZJd�dke
d(e
fdl�ZKed(e
fdm��ZLdned(e
fdo�ZM	d�dpe
deed(dqfdr�ZNdds�dteHduee9d(eOfdv�ZP	d�dteHduee9d(eQefdw�ZR	d�ddddx�dteHduee9deeSdye
dze
d(eeefd{�ZTd|ddddddd}�d~edeeeSfdeeUd�eeVdee
dee
dee
d!eeWd(d�fd��ZXdd��d�eeeSfd�eeeSefd(eSfd��ZYddddd��d�eQe-d�ed�edeeUdee
dee
dee
d(eeZfd��Z[	d�d�d�d�d��dne\d�edeeeSfd�e]d(df
d��Z^d�e_d(dfd��Z`d�d�ddd��d�e-d�ed�edeeeeSfdee
d(dfd��Zad�d�ddddddddddddd��d�e-d�ed�edeeeeSfdeeUd�eeVd�ee
dee
dee
dee
deedeed�e
dee
d�e
d(df d��Zb	d�dd�dddddddd��	d�eed�e-d�edeefde
d�e
d�e
d�e
d�e
d�eee-ge-fd�e
d(dfd��Zcddd��dteHd�eedduee9d(dfd��Ze	d�d�eeed�ed�ed(dfd��Zfd�d�dddd�d�d��deed�edeed�e
d�e
d�eQeeegfd�ed(dfd��Zheiejj�fd�ed�egeelfd(e=eeemee-fffd���Znd�d�dddddddXd��	d�e-d�ed�edeeeeSfdeeUdee
dee
dee
d�e
d�ed(dfd��Zod�d��Zpd�eQed(efdÄZq	d�dddddĜd�e\de
de
d�e
d�eerd(efdȄZsdddɜd�e
dUe
d(efd˄Ztdddɜd�ed�e
dUe
d(dfd̈́ZudddddΜdeevd�e
d�eed�e
d(ef
dфZwddexddΜd�edeevd�e
d�ed�e
d(dfd҄Zyd�ddezd�dd՜dnedeevd�e
d�ed�ed�eed(efd؄Z{d�ddezd�dd՜d�ednedeevd�e
d�ed�ed�eed(dfdلZ|y)�r�arA high level console interface.

    Args:
        color_system (str, optional): The color system supported by your terminal,
            either ``"standard"``, ``"256"`` or ``"truecolor"``. Leave as ``"auto"`` to autodetect.
        force_terminal (Optional[bool], optional): Enable/disable terminal control codes, or None to auto-detect terminal. Defaults to None.
        force_jupyter (Optional[bool], optional): Enable/disable Jupyter rendering, or None to auto-detect Jupyter. Defaults to None.
        force_interactive (Optional[bool], optional): Enable/disable interactive mode, or None to auto detect. Defaults to None.
        soft_wrap (Optional[bool], optional): Set soft wrap default on print method. Defaults to False.
        theme (Theme, optional): An optional style theme object, or ``None`` for default theme.
        stderr (bool, optional): Use stderr rather than stdout if ``file`` is not specified. Defaults to False.
        file (IO, optional): A file object where the console should write to. Defaults to stdout.
        quiet (bool, Optional): Boolean to suppress all output. Defaults to False.
        width (int, optional): The width of the terminal. Leave as default to auto-detect width.
        height (int, optional): The height of the terminal. Leave as default to auto-detect height.
        style (StyleType, optional): Style to apply to all output, or None for no style. Defaults to None.
        no_color (Optional[bool], optional): Enabled no color mode, or None to auto detect. Defaults to None.
        tab_size (int, optional): Number of spaces used to replace a tab character. Defaults to 8.
        record (bool, optional): Boolean to enable recording of terminal output,
            required to call :meth:`export_html`, :meth:`export_svg`, and :meth:`export_text`. Defaults to False.
        markup (bool, optional): Boolean to enable :ref:`console_markup`. Defaults to True.
        emoji (bool, optional): Enable emoji code. Defaults to True.
        emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.
        highlight (bool, optional): Enable automatic highlighting. Defaults to True.
        log_time (bool, optional): Boolean to enable logging of time by :meth:`log` methods. Defaults to True.
        log_path (bool, optional): Boolean to enable the logging of the caller by :meth:`log`. Defaults to True.
        log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%X] ".
        highlighter (HighlighterType, optional): Default highlighter.
        legacy_windows (bool, optional): Enable legacy Windows mode, or ``None`` to auto detect. Defaults to ``None``.
        safe_box (bool, optional): Restrict box options that don't render on legacy Windows.
        get_datetime (Callable[[], datetime], optional): Callable that gets the current time as a datetime.datetime object (used by Console.log),
            or None for datetime.now.
        get_time (Callable[[], time], optional): Callable that gets the current time in seconds, default uses time.monotonic.
    �_environ�autoNFr#Tz[%X])�color_system�force_terminal�
force_jupyter�force_interactive�	soft_wrapr��stderr�file�quietrmrnr��no_color�tab_size�recordr�emoji�
emoji_variantr~�log_time�log_path�log_time_format�highlighterru�safe_box�get_datetime�get_timerArC)rBr*r+r,r-rDrErFrGr�rHrIrJrmrnr�rKrLrMrrNrOr~rPrQrRrS�HighlighterTyperurTrUrVc���|�||_|�
t�n||_|jr�|
�?|jjd�}|�|j	�rt|�}
nt}
|�?|jjd�}|�|j	�rt|�}nt}||_||_	||_
||_||_||_
|�t�xr|jn||_|
�E|jjd�}|�(|j	�rt|�|jz
}
|�8|jjd�} | �| j	�rt| �}||_|
|_||_|d|_|�||_||_|	|_||_|�d|_n)|dk(r|j1�|_nt2||_t5j6�|_t;|||��|_|xst>|_ ||_!|xstDjF|_$|xstJ|_&||_'|
�|
n
d|jv|_(|�|jRxr|jTn||_+t5j6�|_,t[t]|�t^j`n|���|_1g|_2g|_3d|_4d	|_5y)
N�JUPYTER_COLUMNS�
JUPYTER_LINES�COLUMNS�LINESrB)�	show_time�	show_path�time_format�NO_COLOR)r0F)6rAr)�
is_jupyterr��isdigitrp�JUPYTER_DEFAULT_COLUMNS�JUPYTER_DEFAULT_LINESrLrM�_markup�_emoji�_emoji_variant�
_highlightr?rurG�_width�_height�_force_terminal�_filerJrH�
_color_system�_detect_color_system�
COLOR_SYSTEMS�	threading�RLockr�r/�_log_render�_null_highlighterrSrTr�nowrUrrVr�rKrx�is_dumb_terminal�is_interactive�_record_buffer_lockr/rNr)�DEFAULT�_thread_locals�_record_buffer�
_render_hooks�_live�_is_alt_screen)!r�rCrDrErFrGr�rHrIrJrmrnr�rKrLrMrrNrOr~rPrQrRrSrurTrUrVrA�jupyter_columns�
jupyter_lines�columnsr�s!                                 rfr�zConsole.__init__ws���F��$�D�M�+8�+@�+�-�m����?�?��}�"&�-�-�"3�"3�4E�"F��"�.�?�3J�3J�3L���0�E�3�E��~� $�
�
� 1� 1�/� B�
� �,��1F�1F�1H� ��/�F�2�F� ��
����������6C���#����%�#�
$�
<�T�_�_�)<��	
���=��m�m�'�'�	�2�G��"�w���'8��G��t�':�':�:���>��M�M�%�%�g�.�E�� �U�]�]�_��U���"����������#����%�#1�D� ���
���
������!%�D��
�V�
#�!%�!:�!:�!<�D��!.�|�!<�D���_�_�&��
�$���'�
���
-8�,L�;L��� ��
�(�8�H�L�L��� �-�I��
���
� �,�H�*��
�
�2M�	
�
�
!�(��
�
�
;�d�&;�&;�";�"�	
��$-�?�?�#4�� �1�"�U�]�6�>�>��N�
���.0���/1���'+��
�#��rer�c�<�d|j�d|j�d�S)Nz<console width=� �>)rmrmr�s rf�__repr__zConsole.__repr__�s"�� �����A�d�.@�.@�-C�1�E�Erec��|jxs,|jrtjntj}t	|d|�}|�t
}|S)z Get the file object to write to.�rich_proxied_file)rlrH�sys�stdout�getattrr!)r�rIs  rfrIzConsole.file�s@���z�z�H�D�K�K�c�j�j�S�Z�Z���t�0�$�7���<��D��re�new_filec��||_y)zSet a new file object.N)rl)r�r�s  rfrIzConsole.file�s����
rec�.�|jjS�zGet a thread local buffer.)ryr�r�s rfr�zConsole._buffers���"�"�)�)�)rec�.�|jjSr��ryr2r�s rf�
_buffer_indexzConsole._buffer_index	s���"�"�/�/�/re�valuec�&�||j_yr�r�)r�r�s  rfr�zConsole._buffer_indexs��+0����(rec�.�|jjS)z!Get the thread local theme stack.)ryr0r�s rf�_theme_stackzConsole._theme_stacks���"�"�.�.�.rec��|jrtjS|jr|jryt
rR|jrtj
St�}|jrtjStjS|jjdd�j�j�}|dvrtjS|jjdd�j�j�}|jd�\}}}tj|tj �}|S)z"Detect color system from env vars.N�	COLORTERMr�)r,�24bit�TERM�-)rar2�	TRUECOLORrxrur=rur:r,�	EIGHT_BITrAr��strip�lower�
rpartition�_TERM_COLORS�STANDARD)r��windows_console_features�
color_term�term�
_term_name�_hyphen�colorsrCs        rfrnzConsole._detect_color_systems���?�?��(�(�(����4�#8�#8����"�"�"�*�*�*�'C�'E�$�,�5�5��%�%�
�!�*�*�
����*�*�;��;�A�A�C�I�I�K�J��3�3�"�,�,�,��=�=�$�$�V�R�0�6�6�8�>�>�@�D�*.�/�/�#�*>�'�J���'�+�+�F�K�4H�4H�I�L��rec�.�|xjdz
c_y)z4Enter in to a buffer context, and buffer all output.r'N)r�r�s rfr�zConsole._enter_buffer/s�����a��rec�N�|xjdzc_|j�y)z5Leave buffer context, and render content if required.r'N)r��
_check_bufferr�s rfr�zConsole._exit_buffer3s�����a������rec��|j5|j�tjd��||_ddd�y#1swYyxYw)z�Set Live instance. Used by Live context manager.

        Args:
            live (Live): Live instance using this Console.

        Raises:
            errors.LiveError: If this Console has a Live context currently active.
        Nz+Only one live display may be active at once)r�r|r(�	LiveError)r��lives  rf�set_livezConsole.set_live8s8���Z�Z��z�z�%��&�&�'T�U�U��D�J��Z�Z�s	�)?�Ac�T�|j5d|_ddd�y#1swYyxYw)zClear the Live instance.N)r�r|r�s rf�
clear_livezConsole.clear_liveFs��
�Z�Z��D�J��Z�Z�s��'�hookc�|�|j5|jj|�ddd�y#1swYyxYw)zpAdd a new render hook to the stack.

        Args:
            hook (RenderHook): Render hook instance.
        N)r�r{�append)r�r�s  rf�push_render_hookzConsole.push_render_hookKs)���Z�Z����%�%�d�+��Z�Z�s�2�;c�z�|j5|jj�ddd�y#1swYyxYw)z'Pop the last renderhook from the stack.N)r�r{�popr�s rf�pop_render_hookzConsole.pop_render_hookTs%��
�Z�Z����"�"�$��Z�Z�s�1�:c�&�|j�|S)z,Own context manager to enter buffer context.�r�r�s rfr�zConsole.__enter__Ys�������rer��	exc_value�	tracebackc�$�|j�y)zExit buffer context.N)r�)r�r�r�r�s    rfr�zConsole.__exit__^s�����rec�$�|j�y)z`Begin capturing console output. Call :meth:`end_capture` to exit capture mode and return output.Nr�r�s rfr�zConsole.begin_capturebs�����rec�z�|j|j�}|jdd�=|j�|S)zhEnd capture mode and return captured string.

        Returns:
            str: Console output.
        N)r�r�r�)r��
render_results  rfr�zConsole.end_capturefs5���+�+�D�L�L�9�
��L�L��O������re�r�r�c�>�|jj||��y)a�Push a new theme on to the top of the stack, replacing the styles from the previous theme.
        Generally speaking, you should call :meth:`~rich.console.Console.use_theme` to get a context manager, rather
        than calling this method directly.

        Args:
            theme (Theme): A theme instance.
            inherit (bool, optional): Inherit existing styles. Defaults to True.
        r�N)r�r��r�r�r�s   rfr�zConsole.push_themeqs��	
���$�$�U�G�$�<rec�8�|jj�y)z9Remove theme from top of stack, restoring previous theme.N)r�r�r�s rfr�zConsole.pop_theme|s�����#�#�%rec��t|||�S)aUse a different theme for the duration of the context manager.

        Args:
            theme (Theme): Theme instance to user.
            inherit (bool, optional): Inherit existing console styles. Defaults to True.

        Returns:
            ThemeContext: [description]
        )r�r�s   rf�	use_themezConsole.use_theme�s���D�%��1�1rec�B�|j�t|jSy)zpGet color system string.

        Returns:
            Optional[str]: "standard", "256" or "truecolor".
        N)rm�_COLOR_SYSTEMS_NAMESr�s rfrCzConsole.color_system�s$�����)�'��(:�(:�;�;�rec�T�t|jdd�xsdj�S)zGet the encoding of the console file, e.g. ``"utf-8"``.

        Returns:
            str: A standard encoding string.
        ry�utf-8)r�rIr�r�s rfryzConsole.encoding�s%����	�	�:�w�7�B�7�I�I�K�Krec��|j�|jSttjd�r*tjjjd�ry|jry|jjd�}|�d|_yt|jdd�}	|�dS|�S#t$rYywxYw)z�Check if the console is writing to a terminal.

        Returns:
            bool: True if the console writing to a device capable of
            understanding terminal codes, otherwise False.
        Nrb�idlelibF�FORCE_COLORT�isatty)rk�hasattrr��stdinrbr�rarAr�r�rI�
ValueError)r��force_colorr�s   rfrxzConsole.is_terminal�s������+��'�'�'��3�9�9�l�+��	�	�0D�0D�0O�0O��1
���?�?���m�m�'�'�
�6���"�#'�D� ��/6�t�y�y�(�D�/Q��	�"�N�5�8���8���	��		�s�'B2�+B2�2	B>�=B>c�~�|jjdd�}|j�dv}|jxr|S)zxDetect dumb terminal.

        Returns:
            bool: True if writing to a dumb terminal, otherwise False.

        r�r�)�dumb�unknown)rAr�r�rx)r��_term�is_dumbs   rfruzConsole.is_dumb_terminal�s<���
�
�!�!�&�"�-���+�+�-�#6�6�����+�G�+rec	��t|jj|j|jd|j|j
|j��S)zGet default console options.r')rzrtrurvrwryrx)rsrtrnrurmryrxr�s rfr�zConsole.options�sH����y�y�'�'�����.�.���j�j��]�]��(�(�
�	
rec�H�|j�9|j�-t|j|jz
|j�S|jrtdd�Sd}d}t
r	t
j�\}}n%tD]}	t
j|�\}}n|jjd�}|�|j�rt|�}|jjd�}|�|j�rt|�}|xsd}|xsd}t|j�||jz
n|j|j�|�S|j�S#tttf$rY��wxYw#tttf$rY��wxYw)zGet the size of the console.

        Returns:
            ConsoleDimensions: A named tuple containing the dimensions.
        N�P�r[r\)rirjrlrurur=r%�get_terminal_size�AttributeErrorr��OSError�_STD_STREAMSrAr�rbrp)r�rmrn�file_descriptorr�r�s      rfrtzConsole.size�s����;�;�"�t�|�|�'?�$�T�[�[�4�3F�3F�%F����U�U�� � �$�R��,�,�#�� $���
� "� 4� 4� 6�
��v�$0���$&�$8�$8��$I�M�E�6��
$0��-�-�#�#�I�.����7�?�?�#4���L�E��
�
�!�!�'�*����������Z�F�������2�� �+/�;�;�+>�E�D�'�'�'�D�K�K��l�l�*�F�
�	
�04���
�	
��+#�J��8�
��
��'�
�G�<����s$�)E/�F	�/F�F�	F!� F!�new_sizec�*�|\}}||_||_y)zvSet a new size for the terminal.

        Args:
            new_size (Tuple[int, int]): New width and height.
        N)rirj)r�r�rmrns    rfrtzConsole.size
s��!�
��v������rec�.�|jjS)zsGet the width of the console.

        Returns:
            int: The width (in characters) of the console.
        )rtrmr�s rfrmz
Console.widths���y�y���rec��||_y)zFSet width.

        Args:
            width (int): New width.
        N)ri)r�rms  rfrmz
Console.width!s����rec�.�|jjS)zpGet the height of the console.

        Returns:
            int: The height (in lines) of the console.
        )rtrnr�s rfrnzConsole.height*s���y�y���rec��||_y)zISet height.

        Args:
            height (int): new height.
        N)rj)r�rns  rfrnzConsole.height3s����rec�J�|jtj��y)z3Play a 'bell' sound (if supported by the terminal).N)�controlr4�bellr�s rfr�zConsole.bell<s�����W�\�\�^�$rec��t|�}|S)a�A context manager to *capture* the result of print() or log() in a string,
        rather than writing it to the console.

        Example:
            >>> from rich.console import Console
            >>> console = Console()
            >>> with console.capture() as capture:
            ...     console.print("[bold magenta]Hello World[/]")
            >>> print(capture.get())

        Returns:
            Capture: Context manager with disables writing to the terminal.
        )r�)r��captures  rfr�zConsole.capture@s���$�-���rer�r�r�c� �t||||��S)aA context manager to display anything printed within a "pager". The pager application
        is defined by the system and will typically support at least pressing a key to scroll.

        Args:
            pager (Pager, optional): A pager object, or None to use :class:`~rich.pager.SystemPager`. Defaults to None.
            styles (bool, optional): Show styles in pager. Defaults to False.
            links (bool, optional): Show links in pager. Defaults to False.

        Example:
            >>> from rich.console import Console
            >>> from rich.__main__ import make_test_card
            >>> console = Console()
            >>> with console.pager():
                    console.print(make_test_card())

        Returns:
            PagerContext: A context manager.
        )r�r�r�)r�)r�r�r�r�s    rfr�z
Console.pagerQs��*�D��f�E�J�Jrer'r�c�P�|dk\sJd��|jt|��y)zqWrite new line(s).

        Args:
            count (int, optional): Number of new lines. Defaults to 1.
        rzcount must be >= 0N)rr�r�s  rfr�zConsole.linehs&����z�/�/�/�z��
�
�7�5�>�"re�homec��|r7|jtj�tj��y|jtj��y)z�Clear the screen.

        Args:
            home (bool, optional): Also move the cursor to 'home' position. Defaults to True.
        N)r�r4�clearr�)r�r�s  rfr�z
Console.clearrs3����L�L�����'�,�,�.�9��L�L�����)re�dotszstatus.spinnerg�?g)@)�spinner�
spinner_style�speed�refresh_per_second�statusr�r�r�r�rRc�.�ddlm}|||||||��}|S)atDisplay a status and spinner.

        Args:
            status (RenderableType): A status renderable (str or Text typically).
            spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
            spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
            speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
            refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.

        Returns:
            Status: A Status object that may be used as a context manager.
        r'rQ)r�r�r�r�r�)r�rR)r�r�r�r�r�r�rR�status_renderables        rfr�zConsole.status}s,��*	#�"����'��1�

��!� rer�c�f�|jr%|jtj|��yy)zqShow or hide the cursor.

        Args:
            show (bool, optional): Set visibility of the cursor.
        TF)rxr�r4r)r�r�s  rfrzConsole.show_cursor�s*������L�L��,�,�T�2�3��re�enablec��d}|jr9|js-|jtj|��d}||_|S)a�Enables alternative screen mode.

        Note, if you enable this mode, you should ensure that is disabled before
        the application exits. See :meth:`~rich.Console.screen` for a context manager
        that handles this for you.

        Args:
            enable (bool, optional): Enable (True) or disable (False) alternate screen. Defaults to True.

        Returns:
            bool: True if the control codes were written.

        FT)rxrur�r4�
alt_screenr})r�r��changeds   rfrzConsole.set_alt_screen�sC�������D�$7�$7��L�L��+�+�F�3�4��G�"(�D���rec��|jS)z�Check if the alt screen was enabled.

        Returns:
            bool: True if the alt screen was enabled, otherwise False.
        )r}r�s rf�
is_alt_screenzConsole.is_alt_screen�s���"�"�"re�titlec�f�|jr%|jtj|��yy)aSet the title of the console terminal window.

        Warning: There is no means within Rich of "resetting" the window title to its
        previous value, meaning the title you set will persist even after your application
        exits.

        ``fish`` shell resets the window title before and after each command by default,
        negating this issue. Windows Terminal and command prompt will also reset the title for you.
        Most other shells and terminals, however, do not do this.

        Some terminals may require configuration changes before you can set the title.
        Some terminals may not support setting the title at all.

        Other software (including the terminal itself, the shell, custom prompts, plugins, etc.)
        may also set the terminal window title. This could result in whatever value you write
        using this method being overwritten.

        Args:
            title (str): The new title of the terminal window.

        Returns:
            bool: True if the control code to change the terminal title was
                written, otherwise False. Note that a return value of True
                does not guarantee that the window title has actually changed,
                since the feature may be unsupported/disabled in some terminals.
        TF)rxr�r4r�)r�r�s  rf�set_window_titlezConsole.set_window_title�s(��6����L�L����u�-�.��rer�r�c�&�t|||xsd��S)auContext manager to enable and disable 'alternative screen' mode.

        Args:
            hide_cursor (bool, optional): Also hide the cursor. Defaults to False.
            style (Style, optional): Optional style for screen. Defaults to None.

        Returns:
            ~ScreenContext: Context which enables alternate screen on enter, and disables it on exit.
        r�)r�r�)r�)r�r�r�s   rfr�zConsole.screen�s���T�{�%�+�2�N�Nre�r�rr�c�P�tj||xs|j|�}|S)a�Measure a renderable. Returns a :class:`~rich.measure.Measurement` object which contains
        information regarding the number of characters required to print the renderable.

        Args:
            renderable (RenderableType): Any renderable or string.
            options (Optional[ConsoleOptions], optional): Options to use when measuring, or None
                to use default options. Defaults to None.

        Returns:
            Measurement: A measurement of the renderable.
        )r:r�r�)r�rr��measurements    rf�measurezConsole.measure�s%��"�o�o�d�G�,C�t�|�|�Z�P���rec#�vK�|xs|j}|jdkryt|�}t|d�rt	|�s|j||�}ndt
|t�r;|j||j|j��}|j||�}ntjd|�d���	t|�}t}|j!�}|D]-}t
||�r|���|j#||�Ed{����/y#t$rtjd|�d���wxYw7�-�w)	akRender an object in to an iterable of `Segment` instances.

        This method contains the logic for rendering objects with the console protocol.
        You are unlikely to need to use it directly, unless you are extending the library.

        Args:
            renderable (RenderableType): An object supporting the console protocol, or
                an object that may be converted to a string.
            options (ConsoleOptions, optional): An options object, or None to use self.options. Defaults to None.

        Returns:
            Iterable[Segment]: An iterable of segments that may be rendered.
        r'Nr�)r~rzUnable to render zC; A str, Segment or object with __rich_console__ method is requiredzobject z is not renderable)r�rwr@r�rr�r�r��
render_strr~rr(�NotRenderableError�iter�	TypeErrorrDr�r9)	r�rr��_options�render_iterable�text_renderable�iter_render�_Segment�
render_outputs	         rfr9zConsole.rendersI����"�*�d�l�l������!���z�*�
��:�1�2�7�:�;N�(�9�9�$��I�O�
�
�C�
(�"�o�o��h�&8�&8����.��O�.�>�>�t�X�N�O��+�+�#�J�>�2T�T��
�
	���/�K�
���(�(�*��(�M��-��2�#�#��;�;�}�h�?�?�?�	)��
�	��+�+��/�,�,>�?��
�	��@�s+�B:D9�=D�AD9�	D7�
D9�#D4�4D9)r��pad�	new_linesrrc�^�|j5|xs|j}|j||�}|rtj||�}|j
}|�t
d|�}tttj||j|||��d|��}	|j
�r|j
t|	�z
}
|
dkDrU|r$td|jz|�td�gntd|jz|�gg}|	j||
z�|	cddd�S#1swYyxYw)aGRender objects in to a list of lines.

        The output of render_lines is useful when further formatting of rendered console text
        is required, such as the Panel class which draws a border around any renderable object.

        Args:
            renderable (RenderableType): Any object renderable in the console.
            options (Optional[ConsoleOptions], optional): Console options, or None to use self.options. Default to ``None``.
            style (Style, optional): Optional style to apply to renderables. Defaults to ``None``.
            pad (bool, optional): Pad lines shorter than render width. Defaults to ``True``.
            new_lines (bool, optional): Include "
" characters at end of lines.

        Returns:
            List[List[Segment]]: A list of lines, where a line is a list of Segment objects.
        Nr)�include_new_linesrr�r�r�)
r�r�r9rD�apply_stylernr�rr�split_and_crop_linesrwr�extend)r�rr�r�rr�render_options�	_rendered�
render_heightr��extra_lines�pad_lines            rf�render_lineszConsole.render_lines9s'��0�Z�Z�$�4����N����J��?�I��#�/�/�	�5�A�	�*�1�1�M��(� #�A�}� 5�
����0�0�!�&�0�0�*3��#���!�
��E��$�$�0�,�3�3�c�%�j�@����?�%�!��~�'?�'?�!?��G��QU��W�%�c�N�,D�,D�&D�e�L�M� �H�
�L�L��K�!7�8��C�Z�Z�s�DD#�#D,r�)r�r{r|rNrr~rS�textr{r|rKc��|xs|duxr|j}	|xs|duxr|j}
|xs|duxr|j}|
r(t|||	|j��}||_||_n(t|	rt||j��n||||��}|r|xs|jnd}
|
�$|
t|��}|j|�|S|S)a�Convert a string to a Text instance. This is called automatically if
        you print or log a string.

        Args:
            text (str): Text to render.
            style (Union[str, Style], optional): Style to apply to rendered text.
            justify (str, optional): Justify method: "default", "left", "center", "full", or "right". Defaults to ``None``.
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to ``None``.
            emoji (Optional[bool], optional): Enable emoji, or ``None`` to use Console default.
            markup (Optional[bool], optional): Enable markup, or ``None`` to use Console default.
            highlight (Optional[bool], optional): Enable highlighting, or ``None`` to use Console default.
            highlighter (HighlighterType, optional): Optional highlighter to apply.
        Returns:
            ConsoleRenderable: Renderable object.

        N)r�rNrO)�default_variant)r{r|r�)rfrerh�
render_markuprgr{r|rKr*rSr��copy_styles)r�rr�r{r|rNrr~rS�
emoji_enabled�markup_enabled�highlight_enabled�	rich_text�_highlighter�highlight_texts               rfrzConsole.render_strts���8�@�%�4�-�"?�D�K�K�
��D�F�d�N�$C�t�|�|��%�P�)�t�*;�*O������%���#�"�1�1�	�I�!(�I��!)�I��� ��t�T�5H�5H�I���!��
�I�=N��7�t�'7�'7�SW���#�)�#�i�.�9�N��&�&�y�1�!�!��re)rV�namerVc�f�t|t�r|S	|jj|�}|�tj|�}|j
r|j
�S|S#tj$r9}|�|j|�cYd}~Stjd|�d|���d�d}~wwxYw)a Get a Style instance by its theme name or parse a definition.

        Args:
            name (str): The name of a style or a style definition.

        Returns:
            Style: A Style object.

        Raises:
            MissingStyle: If no style could be parsed from name.

        NzFailed to get style z; )r�rEr�r��parse�linkr�r(�StyleSyntaxError�	get_style�MissingStyle)r�r)rVr��errors     rfr.zConsole.get_style�s����d�E�"��K�
	��%�%�)�)�$�/�E��}����D�)��#(�:�:�5�:�:�<�8�5�8���&�&�	��"��~�~�g�.�.��%�%�&�t�h�b���8���
��	�s*�A
A$�"A$�$B0�7B+�	B0�B+�+B0�r{rNrr~�objects�seprc	���������g}|j�g��j}	���dvrdtddf��fd�}
|
�t}|s|�|jr|j}d	�����fd�}|D]�}
t|
�}
t
|
t�r|	|j|
|||����:t
|
t�r	|	|
��St
|
t�r|��|
��st|
�r|��t|
|�����|	|t|
�����|�|j�4|j|j�}|D�
cgc]}
t|
|���}}
|Scc}
w)
aCombine a number of renderables and text into one renderable.

        Args:
            objects (Iterable[Any]): Anything that Rich can render.
            sep (str): String to write between print data.
            end (str): String to write at end of print data.
            justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``.
            emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default.
            markup (Optional[bool], optional): Enable markup, or ``None`` to use console default.
            highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default.

        Returns:
            List[ConsoleRenderable]: A list of things to render.
        )rWrXrYrr�Nc	�F���t|tt����yr�)r0r r1)r�_appendr{s ��rf�align_appendz2Console._collect_renderables.<locals>.align_append�s�����j�$�{�G�*D�E�Frec�v���r6t�����}�|j����j�yy)N)r{r)rK�joinr�)�sep_textr�rr{r3rs �����rf�
check_textz0Console._collect_renderables.<locals>.check_text�s3������W�#�>���x�}�}�T�*�+��
�
��re)rNrrS)rS�r�N)r�r
rsrhrSr@r�r�rrKr�r?r>r�r.rG)r�r2r3rr{rNrr~r��append_textr7r'r;rr�r6r�rs  ```          @@@rf�_collect_renderableszConsole._collect_renderables�s[���202���$�$�����k�k�����1�1�
G��
G�D�
G�"�F�(9����*�t����+�+�L�	�	�"�J�"�:�.�J��*�c�*���O�O�"�%��L�$���
�J��-��J�'��J�(9�:����z�"��z�*����v�j�l�C�D��L��Z��9�:�#"�&	���:�:�!��N�N�4�:�:�.�E�GR�S�{��6�*�e�4�{�K�S����Ts�E#u─z	rule.linerX)�
charactersr��alignr?r@c�J�ddlm}|||||��}|j|�y)u�Draw a line with optional centered title.

        Args:
            title (str, optional): Text to render over the rule. Defaults to "".
            characters (str, optional): Character(s) to form the line. Defaults to "─".
            style (str, optional): Style of line. Defaults to "rule.line".
            align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center".
        r')�Rule)r�r?r�r@N)�rulerBr)r�r�r?r�r@rBrCs       rfrCzConsole.rules#�� 	��%�J�e�5�Q���
�
�4�rer�c��|js.|5|jjd�|D��ddd�yy#1swYyxYw)z�Insert non-printing control codes.

        Args:
            control_codes (str): Control codes, such as those that may move the cursor.
        c3�4K�|]}|j���y�wr�)�segment)�.0�_controls  rf�	<genexpr>z"Console.control.<locals>.<genexpr>5s����#M�W��H�$4�$4�W���N)rur�r)r�r�s  rfr�zConsole.control-s:���$�$�����#�#�#M�W�#M�M���%���s	�#<�Ar�r�)r3rr�r~c�h�|jd�|D��}|j|||ddddd|��	y)a�Output to the terminal. This is a low-level way of writing to the terminal which unlike
        :meth:`~rich.console.Console.print` won't pretty print, wrap text, or apply markup, but will
        optionally apply highlighting and a basic style.

        Args:
            sep (str, optional): String to write between print data. Defaults to " ".
            end (str, optional): String to write at end of print data. Defaults to "\\n".
            style (Union[str, Style], optional): A style to apply to output. Defaults to None.
            highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use
                console default. Defaults to ``None``.
        c3�2K�|]}t|����y�wr�)r�)rG�_objects  rfrIzConsole.out.<locals>.<genexpr>Js����"G�w�G�3�w�<�w���FTr^)r�r~rNrr}r|r\rN)r9r)r�r3rr�r~r2�
raw_outputs       rf�outzConsole.out7sD��&�(�(�"G�w�"G�G�
��
�
����������	�
	
re)r3rr�r{r|r}rNrr~rmrnr\rG�new_line_startr}r\rQc
���|st�f}|
�|j}
|
r
|�d}|�d}d}|jdd}|5|j|||||||	��}|D]}|j	|�}�|j
j
|||
�t|
|j�nt||||	��}g}|j}|j}|�|D]}||||���n9|D]4}|tj|||�|j|����6|rVtdj!d�|D��j#��d	kDr$|j%d
tj&��|rF|j(j}tj*||jd��D]
}||��n|j(j|�ddd�y#1swYyxYw)a[Print to the console.

        Args:
            objects (positional args): Objects to log to the terminal.
            sep (str, optional): String to write between print data. Defaults to " ".
            end (str, optional): String to write at end of print data. Defaults to "\\n".
            style (Union[str, Style], optional): A style to apply to output. Defaults to None.
            justify (str, optional): Justify method: "default", "left", "right", "center", or "full". Defaults to ``None``.
            overflow (str, optional): Overflow method: "ignore", "crop", "fold", or "ellipsis". Defaults to None.
            no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to None.
            emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to ``None``.
            markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to ``None``.
            highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to ``None``.
            width (Optional[int], optional): Width of output, or ``None`` to auto-detect. Defaults to ``None``.
            crop (Optional[bool], optional): Crop output to width of terminal. Defaults to True.
            soft_wrap (bool, optional): Enable soft wrap mode which disables word wrapping and cropping of text or ``None`` for
                Console default. Defaults to ``None``.
            new_line_start (bool, False): Insert a new line at the start if the output contains more than one line. Defaults to ``False``.
        NTr^Fr1)r{r|rmrnr}rr~r�c3�4K�|]}|j���y�wr��r�rGrFs  rfrIz Console.print.<locals>.<genexpr>�s����I�L�����L�rJr'r�r)r�rGr{r>r6r�r��minrmr�rr9rDrr.rr9�
splitlines�insertr�r�r)r�r3rr�r{r|r}rNrr~rmrnr\rGrQr2�render_hooksr�r�r�new_segmentsrr9r�
buffer_extendr�s                          rfrz
Console.printWs���J��y�l�G������I��������#���D��)�)�!�,��
��3�3�������#�4��K�%��"�6�6�{�C��%�!�\�\�0�0��!�05�0A�c�%����,�y����#�1��N�+-�L�!�(�(�F��[�[�F��}�"-�J��6�*�n�=�>�#.�#.�J���+�+�"�:�~�>����u�@U���#.������I�L�I�I�T�T�V�W���!�'�'��7�<�<�>�:�� $��� 3� 3�
�#�8�8� �$�*�*�%��D�"�$�'��
���#�#�L�1�a�T�T�s�FG�G!rg)	�data�indentr~�	skip_keys�ensure_ascii�check_circular�	allow_nanrV�	sort_keys�jsonr]r^r_r`rarbrcc	���ddlm}|�|j||||||||	|
��	}n0t|t�std|�d���|||||||||	|
��	}|j
|d��y)	a�Pretty prints JSON. Output will be valid JSON.

        Args:
            json (Optional[str]): A string containing JSON.
            data (Any): If json is not supplied, then encode this data.
            indent (Union[None, int, str], optional): Number of spaces to indent. Defaults to 2.
            highlight (bool, optional): Enable highlighting of output: Defaults to True.
            skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
            ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
            check_circular (bool, optional): Check for circular references. Defaults to True.
            allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
            default (Callable, optional): A callable that converts values that can not be encoded
                in to something that can be JSON encoded. Defaults to None.
            sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
        r)�JSONN)r^r~r_r`rarbrVrcz/json must be str. Did you mean print_json(data=z) ?T)rG)�pip._vendor.rich.jsonrf�	from_datar�r�r
r)
r�rdr]r^r~r_r`rarbrVrcrf�json_renderables
             rf�
print_jsonzConsole.print_json�s���:	/��<�"�n�n���#�#�)�-�#��#�-�
�O��d�C�(��E�d�X�S�Q���#���#�#�)�-�#��#�
�O�	
�
�
�?�d�
�3re)�regionr�rkc�Z�|jstjd��|xs|j}|�9dx}}|j	|j
|jxs|j�}n|\}}}}|j	||�}|j||��}	|j|	||�y)a�Update the screen at a given offset.

        Args:
            renderable (RenderableType): A Rich renderable.
            region (Region, optional): Region of screen to update, or None for entire screen. Defaults to None.
            x (int, optional): x offset. Defaults to 0.
            y (int, optional): y offset. Defaults to 0.

        Raises:
            errors.NoAltScreen: If the Console isn't in alt screen mode.

        �0Alt screen must be enabled to call update_screenNrr)	r�r(�NoAltScreenr�r�rwrnr�update_screen_lines)
r�rrkr�rr�r�rmrnr�s
          rf�
update_screenzConsole.update_screen�s���&�!�!��$�$�%W�X�X� �0�D�L�L���>��I�A��+�=�=��(�(�.�*?�*?�*N�4�;�;��N�#)��A�q�%��+�=�=�e�V�L�N��!�!�*�n�!�E��� � ���1�-rer�r�r�c���|jstjd��t|||�}|j	|�}|j
j
|�|j�y)a�Update lines of the screen at a given offset.

        Args:
            lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`).
            x (int, optional): x offset (column no). Defaults to 0.
            y (int, optional): y offset (column no). Defaults to 0.

        Raises:
            errors.NoAltScreen: If the Console isn't in alt screen mode.
        rmN)r�r(rnr�r9r�rr�)r�r�r�r��
screen_updater�s      rfrozConsole.update_screen_linessY���!�!��$�$�%W�X�X�$�U�A�q�1�
��;�;�}�-�������H�%����rerTr"rd�rmrr��	word_wrap�show_locals�suppress�
max_framesrrtrurvrwc	�P�ddlm}||||||||��}	|j|	�y)a
Prints a rich render of the last exception and traceback.

        Args:
            width (Optional[int], optional): Number of characters used to render code. Defaults to 100.
            extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
            theme (str, optional): Override pygments theme used in traceback
            word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
            show_locals (bool, optional): Enable display of local variables. Defaults to False.
            suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
            max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
        r')�	TracebackrsN)r�ryr)
r�rmrr�rtrurvrwryr�s
          rf�print_exceptionzConsole.print_exception-s4��,	)���#���#��!�
�	�	
�
�
�9�rer��currentframec�<�|dz
}|�}|�K|r|�|j}|dz}|r|��|�J�|jj|j|jfStj�|}|j|j|jjfS)aEGet caller frame information.

        Args:
            offset (int): the caller offset within the current frame stack.
            currentframe (Callable[[], Optional[FrameType]], optional): the callable to use to
                retrieve the current frame. Defaults to ``inspect.currentframe``.

        Returns:
            Tuple[str, int, Dict[str, Any]]: A tuple containing the filename, the line number and
                the dictionary of local variables associated with the caller frame.

        Raises:
            RuntimeError: If the stack offset is invalid.
        r')
�f_back�f_code�co_filename�f_lineno�f_locals�inspect�stack�filename�lineno�frame)r�r{r��
frame_infos    rf�_caller_frame_infozConsole._caller_frame_infoPs���(	�!���������U�.������!����U�.��$�$�$��<�<�+�+�U�^�^�U�^�^�K�K�!�����0�J��&�&�
�(9�(9�:�;K�;K�;T�;T�T�Tre)	r3rr�r{rNrr~�
log_locals�
_stack_offsetr�r�c	
���|
st�f}
|jdd}|5|j|
||||||��}|�|D�
cgc]}
t|
|���}}
|j	|	�\}}}|jd�rdntjj|�}|jtj�d}|rP|j�D��cic]\}}|jd�s||��}}}|jt|d���|j|||j�|||��g}|D]}|j!|�}�g}|j"}|j$}|j&}|D]}
|||
|���|j(j"}t+j,||j.d	�
�D]
}||��	ddd�ycc}
wcc}}w#1swYyxYw)a�Log rich content to the terminal.

        Args:
            objects (positional args): Objects to log to the terminal.
            sep (str, optional): String to write between print data. Defaults to " ".
            end (str, optional): String to write at end of print data. Defaults to "\\n".
            style (Union[str, Style], optional): A style to apply to output. Defaults to None.
            justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``.
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None.
            emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to None.
            markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to None.
            highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to None.
            log_locals (bool, optional): Boolean to enable logging of locals where ``log()``
                was called. Defaults to False.
            _stack_offset (int, optional): Offset of caller from end of call stack. Defaults to 1.
        Nr1�<����__z	[i]locals)r�)rP�path�line_no�	link_pathFrV)r�r{r>rGr�r�r%r��abspathr�r3�itemsr�rBrrrUr6rr9r�r�rDrrm)r�r3rr�r{rNrr~r�r�r2rZr�rr�r��localsr�r��keyr��
locals_mapr�r[rr9rr\r�s                             rf�logzConsole.logss���:��y�l�G��)�)�!�,��
��3�3�������#�4��K�� �KV�W�;�Z�v�j�%�8�;��W�(,�(?�(?�
�(N�%�H�g�v� (� 3� 3�C� 8��b�g�g�o�o�h�>W�I��&�&�r�v�v�.�r�2�D��'-�l�l�n��&4�
��U��>�>�$�/���J�&4���
�"�"�<�
�+�#N�O�� � ���!�.�.�0��#�'�
!��	�K�%��"�6�6�{�C��%�*,�L�!�(�(�F��[�[�F�!�\�\�N�)�
��v�j�.�9�:�*� �L�L�/�/�M��4�4��d�j�j�e����d�#��W�T��X���#�T�s*�G"�G�BG"�G�/CG"�G"�"G+c	�p�|jr|jdd�=y|j5|jr=|j5|j
j
|jdd�ddd�|jdk(�rG|jrFddl	m
}||j|j|jdd��|jdd�=�n�t�r�d}|jrt|j�}|�|t v}|rlddlm}ddlm}|jdd}|j*r*|j,rt/t1j2|��}||||j���n*|j|jdd�}|jj4}d}		t7|�|	kr	||�n�g}
|
j8}d}|j;d	�D]T}
|t7|
�z|	kDr+|
r)|d
j=|
��|
j?�d}||
�|t7|
�z
}�V|
r'|d
j=|
��|
j?�n:|j|jdd�}	|jj5|�|jjE�|jdd�=ddd�y#1swY��jxYw#t@$r}|jB�d�|_!�d}~wwxYw#t@$r}|jB�d�|_!�d}~wwxYw#1swYyxYw)aQCheck if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False)
        Rendering is supported on Windows, Unix and Jupyter environments. For
        legacy Windows consoles, the win32 API is called directly.
        This method will also record what it renders if recording is enabled via Console.record.
        Nrr')�displayF)�LegacyWindowsTerm)�legacy_windows_renderi Tr�zG
*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***)#rJr�r�rMrwrzrr�ra�jupyterr�r�r=rur-rI�_STD_STREAMS_OUTPUT�pip._vendor.rich._win32_consoler��"pip._vendor.rich._windows_rendererr�rKrmrrD�remove_color�writerr�rXr9r��UnicodeEncodeError�reason�flush)r�r��use_legacy_windows_render�filenor�r�r�rr��	MAX_WRITE�batch�batch_appendrtr�r0s               rfr�zConsole._check_buffer�s����:�:����Q���
�Z�Z��{�{��-�-��'�'�.�.�t�|�|�A��?�.��!�!�Q�&��?�?�0��D�L�L�$�*=�*=�d�l�l�1�o�*N�O����Q���49�1��.�.�%/��	�	�%:�F�%�1�$*�.A�$A�!:�5�Y�`�%)�\�\�!�_�F�#�}�}��1C�1C�)-�g�.B�.B�6�.J�)K��1�&�:K�D�I�I�:V�W�$(�#6�#6�t�|�|�A��#G�D�%)�I�I�O�O�E�(6�I�&�#&�t�9�	�#9�$)�$�K�79�E�38�<�<�L�+,�D�04����0E��+/�#�d�)�+;�i�+G�E�,1�"�'�'�%�.�,A�,1�K�K�M�34�D�(4�T�(:�(,��D�	�(9��
1F�(-�(-�b�g�g�e�n�(=�(-���
��
 $�2�2�4�<�<��?�C��"� �I�I�O�O�D�1�
�I�I�O�O�%����Q��I�Z�-�-��l$6�&�27�,�,��@H�0I��� %��&�� 2�"�.3�l�l�^�<D�,E�E�L�!��"���Z�sm�L,�)K�+EL,�.B8K �&L,�L�!)L,�K	�L,� 	L�)K>�>L�L,�	L)�L$�$L)�)L,�,L5r�c�>�g}|j}|j}|j}|j}|jr|rtj|�}|D]0\}}}	|r||j|||����$|r|	r�)||��2dj|�}
|
S)z)Render buffered output, and clear buffer.)rCrur�)	r�rmrurxrKrDr�r9r9)r�r��outputr�rCru�not_terminalrr�r��rendereds           rfr�zConsole._render_buffers����������)�)���,�,���+�+�+���=�=�\��)�)�&�1�F�$*� �D�%�����L�L��%1�'5�!���#�w��t��%+��7�7�6�?���re)rrN�password�stream�promptr�r�c��|r|j|||d��|rtd|��}|S|r|j�}|St�}|S)a5Displays a prompt and waits for input from the user. The prompt may contain color / style.

        It works in the same way as Python's builtin :func:`input` function and provides elaborate line editing and history features if Python's builtin :mod:`readline` module is previously loaded.

        Args:
            prompt (Union[str, Text]): Text to render in the prompt.
            markup (bool, optional): Enable console markup (requires a str prompt). Defaults to True.
            emoji (bool, optional): Enable emoji (requires a str prompt). Defaults to True.
            password: (bool, optional): Hide typed text. Defaults to False.
            stream: (TextIO, optional): Optional file to read input from (rather than stdin). Defaults to None.

        Returns:
            str: Text read from stdin.
        r�)rrNr)r�)rr	�readline�input)r�r�rrNr�r��results       rfr�z
Console.input,sW��.��J�J�v�f�E�r�J�B���R��/�F��
�	����*���
�����
re�r�r�r�c� �|jsJd��|j5|r#djd�|jD��}n"djd�|jD��}|r|jdd�=ddd�|S#1swYSxYw)a�Generate text from console contents (requires record=True argument in constructor).

        Args:
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
            styles (bool, optional): If ``True``, ansi escape codes will be included. ``False`` for plain text.
                Defaults to ``False``.

        Returns:
            str: String containing console contents.

        �ITo export console contents set record=True in the constructor or instancer�c3�NK�|]\}}}|r|j|�n|���y�wr�r8)rGrr��_s    rfrIz&Console.export_text.<locals>.<genexpr>`s.�����*=���e�Q�,1�U�\�\�$�'�d�:�*=�s�#%c3�LK�|]}|js|j���y�wr�)r�rrUs  rfrIz&Console.export_text.<locals>.<genexpr>es#�����#6��"�?�?��L�L�#6�s�"$N)rMrwr9rz)r�r�r�rs    rf�export_textzConsole.export_textNs���
�K�K�	W�V�	W���
%�
%���w�w��*.�*=�*=����
�w�w��#'�#6�#6����
��'�'��*�&���&���s�AB�B
r�c��|j||��}t|dd��5}|j|�ddd�y#1swYyxYw)a�Generate text from console and save to a given location (requires record=True argument in constructor).

        Args:
            path (str): Path to write text files.
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
            styles (bool, optional): If ``True``, ansi style codes will be included. ``False`` for plain text.
                Defaults to ``False``.

        r��wtr��ryN)r��openr�)r�r�r�r�r�
write_files      rf�	save_textzConsole.save_textnsA�����e�F��;��
�$��w�
/�:����T�"�0�
/�
/�s	�=�A�r�r��code_format�
inline_stylesr�r�c	�~�|jsJd��g}|j}|xst}d}|�tn|}	|j5|r�tjtj|j��D]X\}
}}t|
�}
|r=|j|�}
|jrd|j�d|
�d�}
|
r	d|
�d|
�d�n|
}
||
��Zn�i}tjtj|j��D]v\}
}}t|
�}
|r[|j|�}
|j|
t|�d	z�}|jrd
|�d|j�d|
�d�}
n	d|�d|
�d�}
||
��xg}|j}|j�D]\}}|s�	|d
|�d|�d���dj|�}|	j!dj|�||j"j$|j&j$��}|r|jdd�=ddd�|S#1swYSxYw)aIGenerate HTML from console contents (requires record=True argument in constructor).

        Args:
            theme (TerminalTheme, optional): TerminalTheme object containing console colors.
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
            code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
                '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
            inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
                larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
                Defaults to False.

        Returns:
            str: String containing console contents as HTML.
        r�r�Nz	<a href="z">z</a>z
<span style="z</span>r'z<a class="rz" href="z<span class="rz.rz {�}r�)�code�
stylesheet�
foreground�
background)rMr�rHr+rwrD�filter_control�simplifyrzr
�get_html_styler,�
setdefaultrr�r9�format�foreground_color�hex�background_color)r�r�r�r�r��	fragmentsr��_themer��render_code_formatrr�r�rCr��style_number�stylesheet_rules�stylesheet_append�
style_rule�
rendered_codes                    rf�export_htmlzConsole.export_html|s]��.
�K�K�	W�V�	W��!�	��!�!���0�0���
�4?�4G�0�[��
�
%�
%��&-�&<�&<��$�$�T�%8�%8�9�'�N�D�%��"�$�<�D��$�3�3�F�;�� �:�:�%.�u�z�z�l�"�T�F�$�#G�D�HL��t�f�B�t�f�G�D�RV���4�L�'�*,��&-�&<�&<��$�$�T�%8�%8�9�'�N�D�%��"�$�<�D��$�3�3�F�;��'-�'8�'8��s�6�{�Q��'O�� �:�:�%0���h�u�z�z�l�RT�UY�TZ�Z^�#_�D�%3�L�>��D�6��#Q�D��4�L�'�/1� �$4�$;�$;�!�06����,�J��!�)�B�|�n�C�
�|�2�*N�O�1?�"�Y�Y�'7�8�
�.�5�5��W�W�Y�'�%�!�2�2�6�6�!�2�2�6�6�	6��M���'�'��*�Q&�R��S&�R��s�E$H2�)A?H2�2H<c��|j||||��}t|dd��5}|j|�ddd�y#1swYyxYw)a@Generate HTML from console contents and write to a file (requires record=True argument in constructor).

        Args:
            path (str): Path to write html file.
            theme (TerminalTheme, optional): TerminalTheme object containing console colors.
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
            code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
                '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
            inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
                larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
                Defaults to False.

        r�r�r�r�N)r�r�r�)r�r�r�r�r�r��htmlr�s        rf�	save_htmlzConsole.save_html�sO��,�����#�'�	 �
���$��w�
/�:����T�"�0�
/�
/�s	�?�A�Richg��Q���?�r�r�r�r��font_aspect_ratio�	unique_idr�r�c����3�4�5�6�7�8�ddlm}i�7dtdtf�3�7fd�}|xst�3|j
�8d}	|	|z�4|	dz�5d}
d}d}d}
d	}d
}d
}d
}||z}||z}|
|z}|
|z}g}g}i}d}dtdtfd�}	d2dtdttdtdtfd��6|j5ttj|j��}|r|jj�d
d
d
���Zdttjdj!d�D��j#dd�|j#dd�z��z�d}t%tj&�8���D�]�\}}d}|D�]�\}} }!| xs
t�} || �}"|"|vr
|||"<|dz
}d||"��}#| j(rJd}$| j*��3j,j.n$| j*j1�3�j.}%nf| j2}&|&d
uxr
|&j4}$| j2��3j6j.n$| j2j1�3�j.}%||�}'|$r-|j9�6d|%|�4z|�5zdz�4|'z�5dzd���|dt;|�zk7rE|j9�6d||���d |#��|�4z|�5z|	z�4t;|�zd!��d"|�d#��$��|||�z
}������t=|�D�(cgc]
}(|(�5zdz��})}(d%j!�4�5�6��8fd&�t%|)�D��}*d%j!�fd'�|j?�D��}+dj!|�},dj!|�}-tA�8�4z|z�}.|dz�5z|z}/�6d�3j6j.d(d)|
|
|.|/d
�*�	}0�3j,j.}1|r$|0�6d||���d+�|1d,|.d-z|
|	zd.z�/�z
}0|0d0z
}0|jC��4|	�5�4�8zdz
|dz�5zdz
|.|z|/|z|
|z|
|z|+|0|,|-|*�1�}2|2S#1swY��oxYwcc}(w)3a
        Generate an SVG from the console contents (requires record=True in Console constructor).

        Args:
            title (str, optional): The title of the tab in the output image
            theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
            code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
                into the string in order to form the final SVG output. The default template used and the variables
                injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
            font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
                string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
                If you aren't specifying a different font inside ``code_format``, you probably don't need this.
            unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
                ids). If not set, this defaults to a computed value based on the recorded content.
        r)�cell_lenr�r�c����|�vr�|Sg}|j�|jjr�jn|jj��}|j�|jjr�j
n|jj��}|jr||}}|jr
t||d�}|jd|j���|jr|jd�|jr|jd�|jr|jd�|jr|jd�dj|�}|�|<|S)z%Convert a Style to CSS rules for SVG.g�������?zfill: zfont-weight: boldzfont-style: italic;ztext-decoration: underline;ztext-decoration: line-through;�;)�color�
is_defaultr��
get_truecolor�bgcolorr��reverse�dimr3r�r��bold�italic�	underline�striker9)r��	css_rulesr�r��cssr��style_caches     ��rf�
get_svg_stylez)Console.export_svg.<locals>.get_svg_style	sD�����#�"�5�)�)��I��K�K�'�5�;�;�+A�+A��'�'��[�[�.�.�v�6�
��M�M�)�U�]�]�-E�-E��'�'��]�]�0�0��8�
�
�}�}�!(�%�w���y�y�!�%��#�6�����v�e�i�i�[�1�2��z�z�� � �!4�5��|�|�� � �!6�7����� � �!>�?��|�|�� � �!A�B��(�(�9�%�C�!$�K����Jre�g��Q���?r'�(r#rc�8�t|�jdd�S)z.HTML escape text and replace spaces with nbsp.r�z&#160;)r
�replacerTs rf�escape_textz'Console.export_svg.<locals>.escape_textA	s���$�<�'�'��X�6�6reNr)r��attribsc	���dtdtfd��dj�fd�|j�D��}|rd|�d|�d|�d|�d�	Sd|�d|�d	�S)
z.Make a tag from name, content, and attributes.r�r�c�P�t|t�rt|d�St|�S)N�g)r��floatr�r�)r�s rf�	stringifyz7Console.export_svg.<locals>.make_tag.<locals>.stringifyJ	s#���e�e�-�!�%��-�-��5�z�!rer�c3�~�K�|]4\}}|jd�jdd��d�|��d����6y�w)r�r�z="�"N)�lstripr�)rG�k�vr�s   �rfrIz7Console.export_svg.<locals>.make_tag.<locals>.<genexpr>O	sD�����#�+�D�A�q��8�8�C�=�(�(��c�2�3�2�i��l�^�1�E�+�s�:=r�r�z</z/>)�objectr�r9r�)r)r�r��tag_attribsr�s    @rf�make_tagz$Console.export_svg.<locals>.make_tagE	s|���

"��
"�C�
"�
�(�(�#�#�M�M�O�#��K���D�6��;�-�q��	��D�6��;�
����a��}�B�/�
rez	terminal-r�c3�2K�|]}t|����y�wr�)�reprrUs  rfrIz%Console.export_svg.<locals>.<genexpr>a	s����C�(�w�T�'�]�(�rNr�r^)�length�rT�rectg�?��?�
crispEdges)�fillr�r�rmrn�shape_renderingr�r�zurl(#�-line-�))�_classr�r��
textLength�	clip_pathr�c3�^�K�|]$\}}d��d|�d�dd|��z�dz���d����&y�w)	z<clipPath id="rz">
    rrr
)r�r�rmrnz
            </clipPath>Nrd)rGr�r��
char_width�line_heightrr�rms   �����rfrIz%Console.export_svg.<locals>.<genexpr>�	sY�����
�$;�����y�k���y�9�
�f��V�:��+=�k�TX�FX�Y�Z�[�
�$;�s�*-c3�<�K�|]\}}d��d|�d|�d����y�w)�.z-rz { z }Nrd)rGr��rule_nor�s   �rfrIz%Console.export_svg.<locals>.<genexpr>�	s.�����
�GV�|�s�G�a�	�{�"�W�I�T�#��c�2��s�zrgba(255,255,255,0.35)�1)r�stroke�stroke_widthr�r�rmrn�rxz-title�middlerg�)rr�text_anchorr�r�z�
            <g transform="translate(26,22)">
            <circle cx="0" cy="0" r="7" fill="#ff5f57"/>
            <circle cx="22" cy="0" r="7" fill="#febc2e"/>
            <circle cx="44" cy="0" r="7" fill="#28c840"/>
            </g>
        )r�r�char_heightr�terminal_width�terminal_heightrmrn�
terminal_x�
terminal_yr��chrome�backgrounds�matrixr�r�)"�pip._vendor.rich.cellsr�rEr�rIrmrrrwrrDr�rzr��zlib�adler32r9�encoder�rr�r�r�r�r�r�r�r�r�r�ranger�r
r�)9r�r�r�r�r�r�r�r�r�r#�
margin_top�margin_right�
margin_bottom�margin_left�padding_top�
padding_right�padding_bottom�padding_left�
padding_width�padding_height�margin_width�
margin_height�text_backgrounds�
text_group�classes�style_nor�r�r�r�r�rr�rH�rules�
class_name�has_backgroundr�r��text_lengthr��line_offsetsr�r�r)r*r$r%r(�title_color�svgr�rrrr�rms9      `                                            @@@@@@rf�
export_svgzConsole.export_svg�s[���6	4�(*��	��	�3�	�B�*�*���
�
���� �#4�4�
�!�D�(���
����
������
�����$�}�4�
�$�~�5��"�\�1��"�]�2�
�&(�� "�
�"$����	7�c�	7�c�	7�
15�	��	� (��
�	�AG�	�
�	�(�
%�
%��G�2�2�4�3F�3F�G�H�H���#�#�)�)�+�&�
��#�c�����W�W�C�(�C�C�K�K�� ���l�l�7�H�5�	6��'��I�
�� ��!=�!=�h�u�!U�V�G�A�t��A�)-�%��e�X��(����%�e�,����'�%-�G�E�N���M�H� ���� 0�1�
��=�=�%)�N�!�;�;�.��/�/�3�3�"�[�[�6�6�v�>�B�B��$�m�m�G�%,�D�%8�%S��AS�AS�=S�N�!�=�=�0��/�/�3�3�"�]�]�8�8��@�D�D��'�t�n��!�$�+�+� �"�!+��*�n��+�o��3�",�{�":�#.��#5�,8��
��3��T��?�*��%�%� �"�'��-�&/�[��*��#>��*�n��+�o��;�'1�C��I�'=�(-�i�[��q�c��&C��
��X�d�^�#��e*.�W�lDI��8�L�8���+�-��3�8��L��	�	�
�$-�\�#:�	
�
�����
�GN�}�}��
�
���g�g�.�/������$���e�j�0�=�@�A���q�5�K�/�.�@�����(�(�,�,�+���� �"��

���-�-�1�1����h���E�"�#��F�+� �$� �A�%��{�*�Q�.��
�F�	�	�	��� � ��!�#�#�%��-��1���U�k�1�A�5� �<�/�"�]�2�"�\�1�!�K�/���#���!�
��"�
�M&�
%��LMs�2AQ$�#Q1�$Q.c��|j||||||��}t|dd��5}	|	j|�ddd�y#1swYyxYw)a7Generate an SVG file from the console contents (requires record=True in Console constructor).

        Args:
            path (str): The path to write the SVG to.
            title (str, optional): The title of the tab in the output image
            theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
            code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
                into the string in order to form the final SVG output. The default template used and the variables
                injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
            font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
                string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
                If you aren't specifying a different font inside ``code_format``, you probably don't need this.
            unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
                ids). If not set, this defaults to a computed value based on the recorded content.
        r�r�r�r�N)rGr�r�)
r�r�r�r�r�r�r�r�rFr�s
          rf�save_svgzConsole.save_svg�	sS��6�o�o����#�/��
�
���$��w�
/�:����S�!�0�
/�
/�s�A�A
r<)r�rPr�N)r�r�r�r�r�)TNr�r	)rr)}rarbrcror%�environrArr�rqr7rr$r�rMrrprFr5rr.rrr�r�r�r�rI�setterrrDr�r�rNr�r2rnr�r�r�r�r4r�r�r�rr�r�r�r�r�r�r�rCryrxrursr�rlrtrrmrnr�r�r�r<r�r�r�r�r
r�rrr�rr�r:rrr9rErr�r�rWrr.r�r>rLr1rCr4r�rPrrjrArprorrz�staticmethodr�r{rrr�r�r�r�rr�r�r�rJr�r+r�r,rGrIrdrerfr�r�Qsn��!�F#%�*�*�H�g�c�3�h��,�
�)-�(,�,0��!%��"&��#� $�%)�#'�����04����:@�3B�3D�)-��9=�26�04�Az$���E�F�
�z$�!���
z$� ��~�z$�$�D�>�z$��z$����z$��z$��r�#�w��z$��z$���}�z$���
�z$� �	�"�!z$�"�4�.�#z$�$�%z$�&�'z$�(�)z$�*�+z$�, ��-�-z$�.�/z$�0�1z$�2�3z$�4�s�$6�6�7�5z$�6�/�0�7z$�8!���9z$�:�;z$�<�x��H��5�6�=z$�>�8�B��I�.�/�?z$�@�7�3��8�,�-�Az$�xF�#�F���b��g����
�[�[��R��W�������*��g��*��*��0�s�0��0����1�3�1�4�1��1��/�j�/��/� �h�{�&;� �0 ��
��
,�Z�,�D�,�%�
�
����������	�S�	�;?�	=��	=�4�	=�4�	=�&�:>�
2�u�
2�$�
2�,�
2��
�h�s�m�
��
��L�#�L��L��!�T�!��!�F�	,�$�	,��	,��

��

��

��+
�'�+
��+
�Z
�[�[��U�3��8�_��������s�����\�\��3��4����� �� �� ��]�]��S��T����%����$RW�K��e�_�K�59�K�JN�K�	�K�.#�#�#�d�#�	*�$�	*�$�	*��#3��$(�!��!��	!�
!�!��
!�"�!�
�!�B	��	��	��T��T��*�#�t�#��#��c��d��BFJ�O��O�/7�	�/B�O�	�O�RV��(��6>�~�6N��	��$OS�1@�(�1@�3;�N�3K�1@�	�'�	�1@�l-1�9�
"&���9�"�9��.�)�9�
���9��
9��9�
�d�7�m�	�9�~$&�+/�-1� $�!%�$(�15�9��9��S�%�Z� �	9�
�-�(�9��>�*�
9���~�9����9��D�>�9��o�.�9�
�9�xRV���#�u�*�%��3;�E�%��*�<M�3N��	��H,0� $�!%�$(�I��#��I��I��	I��-�(�
I���~�I����I��D�>�I�
��	 �I�Z�� �#.�%�
����	�
�S�%�Z� ���
�
��*N��N�D�N���-1�$(�

��
��
��	
�
��c�5�j�)�*�
��D�>�

�
�
�F��-1�+/�-1�"&� $�!%�$(�#� $��$(�$�!a2��a2��a2��	a2�
��c�5�j�)�*�a2��-�(�
a2��>�*�a2��$��a2���~�a2����a2��D�>�a2���}�a2���
�a2��a2��D�>�a2� �!a2�"
�#a2�J#�;4��()���"�#��26��;4��s�m�;4��	;4�
�d�C��n�%�;4��
;4��;4��;4��;4��;4��(�C�5�#�:�.�/�;4��;4�
�;4�B$(�,0� .�"� .��� �	 .�
�.�)� .�
�
 .�F@A���$�w�-�(��-0��9<��	
��. #��#��!�57��!���}�!��	!�
��}�!��
!��!��5��j��1�2�!��!�
�!�F�;B�:N�:N� U�� U��r�8�I�#6�6�7� U�
�s�C��c�3�h��'�	(� U�� U�J��-1�+/� $�!%�$(� ��P$��P$��P$��	P$�
��c�5�j�)�*�P$��-�(�
P$���~�P$����P$��D�>�P$��P$��P$�
�P$�dM(�^�X�g�%6��3��4� ����#'� �� ��	 �
� ��
 ��� � �

� �D,0���D����#��@59��#�c�#�T�#�$�#�SW�#�"*.��%)�#�
I��
�&�I��	I�
�c�]�I��
I�

�I�^*.��.�#�#��#��
�&�	#�
�#��
#��#�
�#�D�)-��-�#'�#'�y��y��
�&�	y�
�y��
y�!�y��C�=�y�

�y�~�)-��-�#'�#'�$"��$"��	$"�
�
�&�$"��
$"��$"�!�$"��C�=�$"�
�$"rer��
svg_main_codec�Z�ttj|j���S)z�Returns a unique hash for the given SVG main code.

    Args:
        svg_main_code (str): The content we're going to inject in the SVG envelope.

    Returns:
        str: a hash of the given content
    )r�r,r-r.)rMs rf�	_svg_hashrO
s!���t�|�|�M�0�0�2�3�4�4re�__main__)rMzJSONRPC [i]request[/i]�g�������?Fz2.0�subtract�*�)�minuend�
subtrahendr")�jsonrpcr�params�idz
Hello, World!z{'a': 1}z&Which one is correct team name in NBA?)zNew York BullszLos Angeles KingszGolden State Warriors�
Huston RocketrZ)�questionr��answer)�answered�q1z	5 + 7 = ?)�
���
raz
12 - 8 = ?)r'rgr"�rc)r]r^�q2)�sport�maths)r)�empty�quizr�)r�rO)�r�r%�platformr�rpr,�abcrr�dataclassesrrr�	functoolsrr	r�r
r�	itertoolsr�mathr
�timer�typesrrr�typingrrrrrrrrrrrrrrr �pip._vendor.rich._null_filer!�version_infor$r%r&�pip._vendor.typing_extensionsr�r(r)r*�_export_formatr+r,�_filenor-rrr.r/r@r0r1r�r2r3r�r4rNr5rSr6r7rr9r!rr:r;r�r<r=�prettyr>r?�protocolr@rkrA�scoperBr�rCrFrDr�rErF�styledrG�terminal_themerHrIrJrrKrLr�rMrNr;rOr�rPr�rRrcrd�systemr=r�rWr�r�r`r��	__stdin__r��
_STDIN_FILENO�	Exception�
__stdout__�_STDOUT_FILENO�
__stderr__�_STDERR_FILENOr�r�r�r�r�rlrsr�r�r
r�rsr�r�r�r�r�r�r�rr�rr)r�ror�r��localr/r4r7rqr:r?r�rOrar�r�r	r)r)r|s00rf�<module>r�s����	��
���#�(���������6�6������$2����v��;�;����*�C��6�%�)���9�+�5�%�)������#��S�S� �$��0�������
�(�/�/�
�y�
(���E�#�v�+�.�/��7�8���D�E�
��=�>��	�	�
�J�	���M�M�(�(�*�M���^�^�*�*�,�N���^�^�*�*�,�N��~�~�>��%�~�6���
"�
"��%�%��#�#���.�
�.��B�B��B�J��x�����������(�(�C�7�8����n�g�5�6�7��#�%��3�9�3�	)�	)���$��B!�!�*$%�$%�N,/�,/�^$�$�B�t��x��X�c�5�j�-A�(A�B��,�T��*�$�$�� � ��&�&��"�"�	�
�:G�9L�9L�9N�O�9N���v����9N�O����)�/�/�������&AE��8�$<�=�D�%�=�t�=�
t"�t"�n=	5�S�	5�S�	5��z���T�"�G��K�K� �	���
��� �"$�B�7��		
�
��K�K���T�'�]�;��M�M���!%�$L�$�#2�	��!&�$/�#3�"$��%1�#/�"#����	
�!�)��mM���M������N������N���t
Ps<�1P�P!�+P/�:
P=�P�P�!P,�+P,�/P:�9P:python3.12/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-312.pyc000064400000115322151732701770022541 0ustar00�

R`ie����UddlZddlZddlZddlZddlZddlmZmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZmZmZmZmZddlmZddlmZmZddlmZddlm Z dd	l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+dd
l,m-Z-ddl.m/Z/ddl0m1Z1m2Z2d
dl3m4Z4d
dl5m6Z6d
dl7m8Z8m9Z9d
dl:m;Z;m<Z<m=Z=m>Z>d
dl?m@Z@d
dlAmBZBd
dlCmDZDmEZEd
dlFmZmGZGd
dlHmIZIeeJdfZKej��dk(ZMdZNie*e��e+ed���e"ed���e"j�ed���e%ed���e%j*ed���e(j�ed ���e&j�ed���e&j�ed!���e&j�edd�"��e&j�ed!d�"��e&j�ed���e&j�ed d�#��e&j�ed$���e&j�ed$���e&j�ed���e&j�ed%���e)ed&��e'ed��e$j�ed'��e$j�ed!��e$j�ed�(�e$j�ed d�#�e$j�ed�(�e$jFed'��e#ed$d�"�i	�Z`e
eKefead)<ie*e��e+ed*���e"ed���e"j�ed+���e%ed%���e%j*ed+���e(j�ed,���e&j�ed+���e&j�ed-���e&j�ed+d�"��e&j�ed-d�"��e&j�ed+���e&j�ed,d�#��e&j�ed'���e&j�ed'���e&j�ed+���e&j�ed%���e)ed&��e'ed%��e$j�ed'��e$j�ed-��e$j�ed�(�e$j�ed,d�#�e$j�ed�(�e$jFed'��e#ed$d�"�i	�Zbe
eKefead.<e`ebd/�Zcd0ZdGd1�d2e�ZeGd3�d4ee�ZfGd5�d6ee�ZgeehehfZiGd7�d8e�ZjGd9�d:e@�Zkd;eehd<eid=eehfd>�Zlemd?k(�r�ddlnZnddlZenj�d@�A�Zpepj�dBdCdD�E�epj�dFdGdHdIddJ�K�epj�dLdMdNdIdOdP�K�epj�dQdRdSdIdT�U�epj�dVdWehdXddY�Z�epj�d[d\d]dIdOd^�K�epj�d_d`dIdadOdb�c�epj�dddedfddg�h�epj�didjdkddl�h�epj�dmdnddodp�q�epj�drdsehddtdu�v�epj�dwehddxdy�v�epj��Zsddzltm;Z;e;esj�esj��{�Z:esj�d|k(r�ej�j��Zzekezesj�esj�esj�esj�esj�es�jes�jes�jh�}�	Z�nyek�j	esj�esj�esj�esj�esj�esj�es�jes�jes�jh�~�	Z�e:�je�es�j��yy)��N)�ABC�abstractmethod)�Path)�Any�Dict�Iterable�List�
NamedTuple�Optional�Sequence�Set�Tuple�Type�Union)�Lexer)�get_lexer_by_name�guess_lexer_for_filename)�Style)�get_style_by_name)
�Comment�Error�Generic�Keyword�Name�Number�Operator�String�Token�
Whitespace)�
ClassNotFound)�Lines)�Padding�PaddingDimensions�)�
loop_first��cell_len)�Color�	blend_rgb)�Console�ConsoleOptions�
JustifyMethod�RenderResult)�JupyterMixin)�Measurement)�Segment�Segments)r�	StyleType)�Text.�Windows�monokai�white��colorT��dim�cyan�blue�magenta�green)r8�	underline)r8�bold�red�bright_blue�yellow�
bright_red)r@�
ANSI_LIGHT�bright_black�bright_cyan�bright_magenta�bright_green�	ANSI_DARK)�
ansi_light�	ansi_dark�c�@�eZdZdZededefd��Zedefd��Zy)�SyntaxThemezBase class for a syntax theme.�
token_type�returnc��t�)z'Get a style for a given Pygments token.��NotImplementedError)�selfrPs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/syntax.py�get_style_for_tokenzSyntaxTheme.get_style_for_token~�
��"�!�c��t�)zGet the background color.rS�rUs rV�get_background_stylez SyntaxTheme.get_background_style�rXrYN)	�__name__�
__module__�__qualname__�__doc__r�	TokenTyperrWr\�rYrVrOrO{s@��(��"�i�"�E�"��"��"�e�"��"rYrOc�L�eZdZdZdeeeefddfd�Zde	de
fd�Zde
fd�Zy)	�PygmentsSyntaxThemez.Syntax theme that delegates to Pygments theme.�themerQNc��i|_t|t�r	t|�|_n||_|jj|_t|j��|_	y#t
$rtd�|_Y�RwxYw)N�default��bgcolor)
�_style_cache�
isinstance�strr�_pygments_style_classr �background_color�_background_colorr�_background_style)rUres  rV�__init__zPygmentsSyntaxTheme.__init__�sx��46����e�S�!�
J�->�u�-E��*�*/�D�&�!%�!;�!;�!L�!L���!&�t�/E�/E�!F����
!�
J�->�y�-I��*�
J�s�A(�(B�BrPc	�V�	|j|S#t$r�	|jj|�}|d}|d}t	|rd|znd|rd|zn|j
|d|d|d��}n##t$rt	j�}YnwxYw||j|<Y|SwxYw)	z"Get a style from a Pygments class.r8ri�#z#000000r@�italicr?)r8rir@rtr?)rj�KeyErrorrm�style_for_tokenrro�null)rUrP�pygments_styler8ri�styles      rVrWz'PygmentsSyntaxTheme.get_style_for_token�s���	2��$�$�Z�0�0���	2�

�!%�!;�!;�!K�!K�J�!W��'�w�/��(��3���).�#��+�I�-4�C�'�M�$�:P�:P�'��/�)�(�3�,�[�9�����
%��
�
���
%��-2�D���j�)���!	2�s1��	B(�A2�<B(�2B�B(�B�B(�'B(c��|jS�N�rpr[s rVr\z(PygmentsSyntaxTheme.get_background_style�����%�%�%rY)
r]r^r_r`rrlr�
PygmentsStylerqrarrWr\rbrYrVrdrd�sI��8�G�e�C��m�)<�$<�=�G�$�G��i��E��,&�e�&rYrdc�F�eZdZdZdeeefddfd�Zdedefd�Zdefd�Z	y)	�ANSISyntaxThemez$Syntax theme to use standard colors.�	style_maprQNc��||_tj�|_tj�|_i|_yr{)r�rrw�_missing_stylerprj)rUr�s  rVrqzANSISyntaxTheme.__init__�s-��"���#�j�j�l���!&������46��rYrPc���	|j|S#t$rX|jj}t	|�}|j
}|r||�}|�|}n|dd}|r�||j|<|cYSwxYw)zLook up style in the style map.N���)rjrur��get�tupler�)rUrP�	get_style�tokenry�_styles      rVrWz#ANSISyntaxTheme.get_style_for_token�s���	��$�$�Z�0�0���	����*�*�I��*�%�E��'�'�E��"�5�)���%�"�E���c�r�
���-2�D���j�)��L�	�s��AA2�A2�1A2c��|jSr{r|r[s rVr\z$ANSISyntaxTheme.get_background_style�r}rY)
r]r^r_r`rrarrqrWr\rbrYrVr�r��sA��.�7�$�y�%�'7�"8�7�T�7��i��E��(&�e�&rYr�c�0�eZdZUdZeed<eed<eed<y)�_SyntaxHighlightRangez�
    A range to highlight in a Syntax object.
    `start` and `end` are 2-integers tuples, where the first integer is the line number
    (starting from 1) and the second integer is the column index (starting from 0).
    ry�start�endN)r]r^r_r`r2�__annotations__�SyntaxPositionrbrYrVr�r��s�������	�rYr�c"�
�eZdZUdZeeed<eed<ede	e
efdefd��Zedddd	d	d	d
dd	ddd�d
e
de	e
e
fde	e
efdedededeeeeeefdeeedeedededee
dededd	fd�Zedd	eddd	dd	d	d
dd	ddfde
de
dee	e
e
fde	e
efdededeeeefdedeeedeedededee
dededdf d��Zed6de
d
ee
de
fd ��Zdefd!�Zd"edeefd#�Zedee
fd$��Z	d6d
e
deeeeeefdefd%�Zd&e d'e!d(e!dd	fd)�Z"d7d*e#defd+�Z$edefd,��Z%d-e&deeeeffd.�Z'						d8d0�Z(d-e&d/e)de*fd1�Z+d-e&d/e)de,e-fd2�Z.d3edd	fd4�Z/d
e
deee
ffd5�Z0y	)9�Syntaxa�Construct a Syntax object to render syntax highlighted code.

    Args:
        code (str): Code to highlight.
        lexer (Lexer | str): Lexer to use (see https://pygments.org/docs/lexers/)
        theme (str, optional): Color theme, aka Pygments style (see https://pygments.org/docs/styles/#getting-a-list-of-available-styles). Defaults to "monokai".
        dedent (bool, optional): Enable stripping of initial whitespace. Defaults to False.
        line_numbers (bool, optional): Enable rendering of line numbers. Defaults to False.
        start_line (int, optional): Starting number for line numbers. Defaults to 1.
        line_range (Tuple[int | None, int | None], optional): If given should be a tuple of the start and end line to render.
            A value of None in the tuple indicates the range is open in that direction.
        highlight_lines (Set[int]): A set of line numbers to highlight.
        code_width: Width of code to render (not including line numbers), or ``None`` to use all available width.
        tab_size (int, optional): Size of tabs. Defaults to 4.
        word_wrap (bool, optional): Enable word wrapping.
        background_color (str, optional): Optional background color, or None to use theme color. Defaults to None.
        indent_guides (bool, optional): Show indent guides. Defaults to False.
        padding (PaddingDimensions): Padding to apply around the syntax. Defaults to 0 (no padding).
    rm�_theme�namerQc�x�t|t�r|S|tvrtt|�}|St	|�}|S)zGet a syntax theme instance.)rkrO�RICH_SYNTAX_THEMESr�rd)�clsr�res   rV�	get_themezSyntax.get_theme�sD���d�K�(��K��%�%�#�$6�t�$<�=�E���(��-�E��rYFr$N�r)re�dedent�line_numbers�
start_line�
line_range�highlight_lines�
code_width�tab_size�	word_wraprn�
indent_guides�padding�code�lexerrer�r�r�r�r�r�r�r�rnr�r�c�F�||_||_||_||_||_||_|xs
t
�|_|	|_|
|_	||_
||_|rt|��n	t�|_
|
|_||_|j!|�|_g|_y)Nrh)r��_lexerr�r�r�r��setr�r�r�r�rnr�background_styler�r�r�r��_stylized_ranges)rUr�r�rer�r�r�r�r�r�r�r�rnr�r�s               rVrqzSyntax.__init__s���$��	�������(���$���$���.�7�#�%���$��� ��
�"��� 0���/?�E�*�+�U�W�	
��+�������n�n�U�+���=?��rYzutf-8�path�encodingc��t|�j|��}|s|j||��}|||||||||	|
|||
||��S)aConstruct a Syntax object from a file.

        Args:
            path (str): Path to file to highlight.
            encoding (str): Encoding of file.
            lexer (str | Lexer, optional): Lexer to use. If None, lexer will be auto-detected from path/file content.
            theme (str, optional): Color theme, aka Pygments style (see https://pygments.org/docs/styles/#getting-a-list-of-available-styles). Defaults to "emacs".
            dedent (bool, optional): Enable stripping of initial whitespace. Defaults to True.
            line_numbers (bool, optional): Enable rendering of line numbers. Defaults to False.
            start_line (int, optional): Starting number for line numbers. Defaults to 1.
            line_range (Tuple[int, int], optional): If given should be a tuple of the start and end line to render.
            highlight_lines (Set[int]): A set of line numbers to highlight.
            code_width: Width of code to render (not including line numbers), or ``None`` to use all available width.
            tab_size (int, optional): Size of tabs. Defaults to 4.
            word_wrap (bool, optional): Enable word wrapping of code.
            background_color (str, optional): Optional background color, or None to use theme color. Defaults to None.
            indent_guides (bool, optional): Show indent guides. Defaults to False.
            padding (PaddingDimensions): Padding to apply around the syntax. Defaults to 0 (no padding).

        Returns:
            [Syntax]: A Syntax object that may be printed to the console
        )r�)r�)rer�r�r�r�r�r�r�r�rnr�r�)r�	read_text�guess_lexer)r�r�r�r�rer�r�r�r�r�r�r�r�rnr�r�r�s                 rV�	from_pathzSyntax.from_path-sh��R�D�z�#�#�X�#�6����O�O�D�t�O�4�E������%�!�!�+�!���-�'��
�	
rYc�`�d}d}|r
	t||�}|sO	tjj	|�\}}|r*|jd�j
�}t|�}|r)|jr|jd}|S|j}|S#t$rY��wxYw#t$rY�GwxYw)a�Guess the alias of the Pygments lexer to use based on a path and an optional string of code.
        If code is supplied, it will use a combination of the code and the filename to determine the
        best lexer to use. For example, if the file is ``index.html`` and the file contains Django
        templating syntax, then "html+django" will be returned. If the file is ``index.html``, and no
        templating language is used, the "html" lexer will be used. If no string of code
        is supplied, the lexer will be chosen based on the file extension..

        Args:
             path (AnyStr): The path to the file containing the code you wish to know the lexer for.
             code (str, optional): Optional string of code that will be used as a fallback if no lexer
                is found for the supplied path.

        Returns:
            str: The name of the Pygments lexer that best matches the supplied path/code.
        Nrg�.r)
rr �osr��splitext�lstrip�lowerr�aliasesr�)r�r�r�r��
lexer_name�_�ext�	extensions        rVr�zSyntax.guess_lexerls���""&���
��
�0��t�<���
����)�)�$�/���3�� #�
�
�3�� 5� 5� 7�I�-�i�8�E���}�}�"�]�]�1�-�
���#�Z�Z�
����%!�
��
��!�
��
�s#�B�AB!�	B�B�!	B-�,B-c�T�|jj�|jz}|S)zGet the base style.)r�r\r�)rU�
default_styles  rV�_get_base_stylezSyntax._get_base_style�s%�����8�8�:�T�=R�=R�R�
��rYrPc�P�|jj|�}|jS)z�Get a color (if any) for the given token.

        Args:
            token_type (TokenType): A token type tuple from Pygments.

        Returns:
            Optional[Color]: Color from theme, or None for no color.
        )r�rWr8)rUrPrys   rV�_get_token_colorzSyntax._get_token_color�s"�����/�/�
�;���{�{�rYc��t|jt�r|jS	t|jdd|j��S#t
$rYywxYw)z�The lexer for this syntax, or None if no lexer was found.

        Tries to find the lexer by name if a string was passed to the constructor.
        FT)�stripnl�ensurenl�tabsizeN)rkr�rrr�r r[s rVr�zSyntax.lexer�sV���d�k�k�5�)��;�;��	�$�������
�
�	�
���	��	�s�"A�	A�Ac�����	�
��|j�}|jrdnd}t|||j|j��}|j
j�|j���|j��n�|rg|\�
�	dttttff��fd��dtttttff��	�
�fd�}|j|��n)|j�fd��j!��D��|j"�|j%d|j"���|j&r|j)|�|S)	aHighlight code and return a Text instance.

        Args:
            code (str): Code to highlight.
            line_range(Tuple[int, int], optional): Optional line range to highlight.

        Returns:
            Text: A text instance containing highlighted syntax.
        rg�left)�justifyryr��no_wraprQc3��K��sJ��j��D])\}}|s�	|jd�\}}}|||zf��|r�!�+y�w)zSplit tokens to one per line.�
N)�
get_tokens�	partition)rPr��
line_token�new_liner�r�s    ��rV�
line_tokenizez'Syntax.highlight.<locals>.line_tokenize�sV����� �L�5�-2�-=�-=�d�-C�)�
�E�#�:?�/�/�$�:O�7�J��%�",�j�8�.C�"C�C�$�.D�s�A� A�Ac3�<�K�t�	��}d}�r�dz
nd}||kr1	t|�\}}|df��|jd�r|dz
}||kr�1|D]2\}}|�|�f��|jd�s�$|dz
}�s�,|�k\s�2yy#t$rY�CwxYw�w)zConvert tokens to spans.rr$Nr�)�iter�next�
StopIteration�endswith)
�tokens�line_no�_line_start�_token_typer�rP�_get_theme_style�line_end�
line_startr�s
      ����rV�tokens_to_spansz)Syntax.highlight.<locals>.tokens_to_spans�s������!�-�/�2�F��G�4>�*�q�.�A�K�"�K�/�"�15�f��.�K�� %�d�m�+� �>�>�$�/�#�q�L�G�"�K�/�.4�)�
�E�$�&6�z�&B�C�C� �>�>�$�/�#�q�L�G�'�G�x�,?� %�.4��
 -�"�!�"�s?�!B�B
�!B�%B�;B�B�	B�
	B�B�B�Bc3�8�K�|]\}}|�|�f���y�wr{rb)�.0rPr�r�s   �rV�	<genexpr>z#Syntax.highlight.<locals>.<genexpr>s)�����#�-C�)�
�E��,�Z�8�9�-C�s�zon )r��transparent_backgroundr3r�r�r�rWr��appendrrrrlrr�
append_tokensr�rn�stylizer��_apply_stylized_ranges)rUr�r��
base_styler��textr�r�r�r�r�r�s `     @@@@@rV�	highlightzSyntax.highlight�sA����)�)�+�
�#�:�:�I��	�����]�]����&�	
�� �;�;�:�:���
�
���=��K�K����(2�$�
�H�D�x��c�3�h��'@�D�&��%��X�e�_�8L�2M�)N�&�&�.�"�"�?�#4�5��"�"�#�-2�-=�-=�d�-C�#���$�$�0����s�4�#8�#8�"9�:�;�� � ��'�'��-��rYryr�r�c�P�|jjt|||��y)a�
        Adds a custom style on a part of the code, that will be applied to the syntax display when it's rendered.
        Line numbers are 1-based, while column indexes are 0-based.

        Args:
            style (StyleType): The style to apply.
            start (Tuple[int, int]): The start of the range, in the form `[line number, column index]`.
            end (Tuple[int, int]): The end of the range, in the form `[line number, column index]`.
        N)r�r�r�)rUryr�r�s    rV�
stylize_rangezSyntax.stylize_ranges"��	
���$�$�%:�5�%��%M�NrY�blendc��|jj�|jz}|j}|�|jrtj�S|jtj�}|�|jr|xstj�St|j�|j�|��}tj|�S)N)�
cross_fade)
r�r\r�ri�is_system_definedr(rgr�rr3r)�
get_truecolor�from_triplet)rUr�r�rn�foreground_color�	new_colors      rV�_get_line_numbers_colorzSyntax._get_line_numbers_colors����;�;�;�;�=��@U�@U�U��+�3�3���#�'7�'I�'I��=�=�?�"��0�0����<���#�'7�'I�'I�#�6�u�}�}��6���*�*�,��*�*�,��
�	�
�!�!�)�,�,rYc��d}|jrAtt|j|jjd�z��tz}|S)z?Get the number of characters used to render the numbers column.rr�)r��lenrlr�r��count�NUMBERS_COLUMN_DEFAULT_PADDING)rU�column_widths  rV�_numbers_column_widthzSyntax._numbers_column_width,sJ��������C����$�)�)�/�/�$�*?�?�@�A�0�1�
��rY�consolec
��|j�}|jr3tj�td��tj�fS|jdvr�tj
||jjtj�t|j���|j�}tj
||jjtj�td|jd���|j�}n|td��z}|td��z}|||fS)z>Get background, number, and highlight styles for line numbers.Tr9)�256�	truecolorr7g�������?)r@r8F)r�r�rrw�color_system�chainr�rWrr3r�r�)rUr�r��number_style�highlight_number_styles     rV�_get_number_styleszSyntax._get_number_styles7s����/�/�1���2�2��:�:�<��4��%�*�*�,�>�>����#7�7� �;�;� ����/�/��
�
�;��D�8�8�:�;��%�%�	�L�&+�[�[� ����/�/��
�
�;��4�t�'C�'C�C�'H�I��%�%�	&�"�,�e��o�=�L�%5��%�8H�%H�"���/E�E�ErY�optionsc��tj|j�\}}}}||z}|j�5|j|jz|zdz}t|j|�S|jj�}|j|z|rtd�|D��ndz}|jr|dz
}t|j|�S)Nr$c3�2K�|]}t|����y�wr{r&)r��lines  rVr�z*Syntax.__rich_measure__.<locals>.<genexpr>Zs����4�e�d�8�D�>�e�s�r)
r"�unpackr�r�r�r/r��
splitlines�maxr�)	rUr�rr��rightr�r��width�liness	         rV�__rich_measure__zSyntax.__rich_measure__Ns���$�N�N�4�<�<�8���5�!�T���,���?�?�&��O�O�d�&@�&@�@�7�J�Q�N�E��t�9�9�5�A�A��	�	�$�$�&���&�&��
�8=�s�4�e�4�4�1�
F�	�
����Q�J�E��4�5�5�u�=�=rYc#��K�t|j||��}|jr3t||jj�|j����y|��y�w)N�ry�pad)r1�_get_syntaxr�r"r�r\)rUr�r�segmentss    rV�__rich_console__zSyntax.__rich_console__`sR�����D�,�,�W�g�>�?���<�<������ @� @� B�����
��N�s�A A"c#�|	K�|j�j}|j�4|jr|j|j
z
dz
n|jn|j}|j
|j�\}}|j||j�}|j�s/|j�s"|j�s|s|jd�|j�|jjt�ztd��z|j z}|j"r0|j$s$|j'|j(|��}d|_|jr,|j-||j/|���	�Ed{���y|j1||j/|dd
��|j dd��}	|	D]}
|
Ed{����y|jxsd
\}}d}
|rt3d|dz
�}
|j5d|��}|jr|
t7|�kDry||
|}|j"r�|j$s�|j�|jjt�ztd��z|j z}t9d�j;|�j'|j(|td��z��j5dd��}|j
}|j/|��}|j<j>}t@}|d�}|jBrdnd}|jE|�\}}}tG||jH|
z�D�]@\}}|jr(|j1||j/dd
��||��}nMtK|j-|d���}|jLr|g}n!|jO||j||��g}|jr�|d|zdz|�}tQ|�D]y\}}|r`tS|�jU|dz
�dz}||�r!||td�����|||���n|d|���|||���n|��|Ed{���|���{��,|D]}|Ed{���|�����Cy7��7���7�+7��w)zc
        Get the Segments for the Syntax object, excluding any vertical/horizontal padding
        Nr$r�Tr9)ry�crop)r)rr�)r�heightr�)ryr�	new_lines)NNr)�allow_blankF)rtz> u❱ )rr�r�)r�� rMrAr7z  )+r�r�r�r��	max_widthr��
_process_coder�r�r�r��
remove_suffixr�rWrrr�r��
ascii_only�with_indent_guidesr��overflow�render�update�render_linesr	�splitr�r3�joinr��__contains__r0�legacy_windowsr�	enumerater��listr��adjust_line_lengthr%rl�rjust) rUr�rr�r��
ends_on_nl�processed_coder�ry�syntax_lines�syntax_liner��end_line�line_offsetr�numbers_column_width�render_options�highlight_line�_Segmentr��line_pointerr�rrr�r�
wrapped_linesr�wrapped_line_left_pad�first�wrapped_line�line_columns                                 rVrzSyntax._get_syntaxks�����"&�!5�!5�!7�!N�!N�����&��$�$��"�"�T�%?�%?�?�!�C��&�&����	�&*�%7�%7��	�	�%B�"�
�N��~�~�n�d�o�o�>��� � ���������"�"�4�(��$�$�&��+�+�1�1�'�:�;��D�/�"��'�'�(�
��!�!�'�*<�*<��.�.�t�}�}�E�.�J�� &��
��+�+�"�>�>��'�.�.�z�.�"B�*����
� '�3�3���N�N��D�&�N�Q��/�/��"� 4� ��$0�K�*�*�*�$0��#���>�,��
�H�����a��a��0�K�*.�*�*�T�z�*�*R���?�?��S��Z�'���+�h�/�E����g�&8�&8��$�$�&��+�+�1�1�'�:�;��D�/�"��'�'�(�
��T�
���e��#�#�D�M�M���e�AT�9T�#�U���t���.�	
� $�9�9�� ���j��9���-�-�:�:�����D�>��&�5�5�t�6��
�#�#�G�,�		
���"�'�u�d�o�o��.K�L�M�G�T��~�~� '� 4� 4��"�)�)��v�)�F�*�2�2�	!5�!�
� ����G��� <�=���?�?�%-�J�M�!�3�3�$�*�4�4�"2�$:� :�	4��%�M�� � �(0��.�.��4�6F�)�%�,6�m�+D�'�E�<��&)�'�l�&8�&8�9M�PQ�9Q�&R�UX�&X��)�'�2�"*�<��U�9K�"L�L�"*�;�8N�"O�O�"*�4�1G�"H�H�"*�;��"E�E�3�3�+�+�+�"�N�,E�%2�L�+�+�+�"�N�%2�QM�m��+��^,��,�sJ�FR<�R2�AR<�R5�J4R<�R8�
R<�#R:�$R<�5R<�8R<�:R<r�c��|j}dgtjd|tj��D�cgc]}|j	�dz��c}�t|�dz�}|jD]Q}t||j�}t||j�}|��2|��5|j|j||��Sycc}w)z�
        Apply stylized ranges to a text instance,
        using the given code to determine the right portion to apply the style to.

        Args:
            text (Text): Text instance to apply the style to.
        rr�)�flagsr$N)�plain�re�finditer�	MULTILINEr�r�r��#_get_code_index_for_syntax_positionr�r�ry)rUr�r��match�newlines_offsets�stylized_ranger�r�s        rVr�zSyntax._apply_stylized_ranges�s����z�z��
�	
� �[�[��t�2�<�<�H��H�E����
��!�H��		
�
��I��M�	
��#�3�3�N�7� �.�"6�"6��E�6� �.�"4�"4��C�� �S�_����^�1�1�5�#�>�4��s�Cc��|jd�}|r|n|dz}|jrtj|�n|}|j|j�}||fS)a�
        Applies various processing to a raw code string
        (normalises it so it always ends with a line return, dedents it if necessary, etc.)

        Args:
            code (str): The raw code string to process

        Returns:
            Tuple[bool, str]: the boolean indicates whether the raw code ends with a line return,
                while the string is the processed code.
        r�)r�r��textwrap�
expandtabsr�)rUr�r,r-s    rVrzSyntax._process_codesY���]�]�4�(�
�!+������/3�{�{�H�O�O�N�+��	�(�2�2�4�=�=�A���>�)�)rYr{)g333333�?)r�r*rr+rQr/)1r]r^r_r`rr~r�rO�classmethodrrlr��
DEFAULT_THEMEr�bool�intrrr
r#rqr�r�rr�rar(r��propertyr�r3r�r2r�r��floatr�r�r*rr
r+r-rrr0rr�rrbrYrVr�r��s&���( �
�.�.����	�U�3��#3�4�	��	��	� *7��"��DH�.2�$(���*.�#�%&�!$@��$@��U�C�Z� �$@�
�S�+�%�&�$@��
$@��$@��$@��U�8�C�=�(�3�-�#?�@�A�$@�"�#�c�(�+�$@��S�M�$@��$@��$@�#�3�-�$@��$@� #�!$@�"
�#$@�L� �-1�)6��"�04��.2�$(���*.�#�%&�!<
��<
��<
���e�S�j�)�*�	<
�
�S�+�%�&�<
��
<
��<
��U�3��8�_�-�<
��<
�"�#�c�(�+�<
��S�M�<
��<
��<
�#�3�-�<
��<
� #�!<
�"
�#<
��<
�|�'�s�'�(�3�-�'�3�'��'�R���

�9�
��%��
���x������*EI�S��S��U�8�C�=�(�3�-�#?�@�A�S�
�	S�jO��O�'5�O�<J�O�	
�O�
-�U�
-�U�
-���s����F�'�F�e�E�5�%�<O�6P�F�.>� �>�+;�>�	�>�$	��	�)7�	�	�	�D#��D#� �D#�
�'�	�	D#�L?�4�?�D�?�<*�#�*�%��c�	�*:�*rYr�rD�positionrQc��t|�}|\}}||kDst|�|dzkry|dz
}||dz||z
dz
}t||�}|||zS)a
    Returns the index of the code string for the given positions.

    Args:
        newlines_offsets (Sequence[int]): The offset of each newline character found in the code snippet.
        position (SyntaxPosition): The position to search for.

    Returns:
        Optional[int]: The index of the code string for this position, or `None`
            if the given position's line number is out of range (if it's the column that is out of range
            we silently clamp its value so that it reaches the end of the line)
    r$N)r��min)rDrO�lines_count�line_number�column_index�
line_index�line_lengths       rVrBrB$sy���&�'�K� (��K���[� �C�(8�$9�[�1�_�$M���q��J�"�:��>�2�5E�j�5Q�Q�TU�U�K��{�L�1�L��J�'�,�6�6rY�__main__z&Render syntax to the console with Rich)�descriptionr��PATHzpath to file, or - for stdin)�metavar�helpz-cz
--force-color�force_color�
store_truezforce color for non-terminals)�dest�actionrgr[z-iz--indent-guidesr�Fzdisplay indent guidesz-lz--line-numbersr�zrender line numbers)r^r_r[z-wz--widthrz*width of output (default will auto-detect))�typer^rgr[z-rz--wrapr�zword wrap long linesz-sz--soft-wrap�	soft_wrapzenable soft wrapping mode)r_r^rgr[z-tz--themerezpygments theme)r^rgr[z-bz--background-colorrnzOverride background colorz-xz--lexerr�z
Lexer name)rgr^r[z-pz	--paddingr�r")r`rgr^r[z--highlight-liner4z)The line number (not index!) to highlight)r*)�force_terminalr�-)	r�r�r�r�rernr�r�r�)r�r�r�rernr�r�r�)ra)��os.pathr��platformr?�sysrG�abcrr�pathlibr�typingrrrr	r
rrr
rrr�pip._vendor.pygments.lexerr�pip._vendor.pygments.lexersrr�pip._vendor.pygments.stylerr~�pip._vendor.pygments.stylesr�pip._vendor.pygments.tokenrrrrrrrrrr�pip._vendor.pygments.utilr �pip._vendor.rich.containersr!�pip._vendor.rich.paddingr"r#�_loopr%�cellsr'r8r(r)r�r*r+r,r-�jupyterr.�measurer/�segmentr0r1ryr2r�r3rlra�system�WINDOWSrJ�Preproc�Word�Builtin�Function�	Namespace�Class�	Exception�	Decorator�Variable�Constant�	Attribute�Tag�Deleted�Inserted�Heading�
Subheading�PromptrEr�rJr�r�rOrdr�rLr�r�r�rBr]�argparse�ArgumentParser�parser�add_argument�
parse_args�args�pip._vendor.rich.consoler\rr��stdin�readr�r�r�r�rernr�r�r4�syntaxr��printrarbrYrV�<module>r�s�����	�
��#������-�S�=�9����4�-�?���#�I�I�!� �&�#���#�s�(�O�	�
�(�/�/�
�y�
(���
�
&�	�5�7�&���G�$�&��U�t�_�&��O�O�U��(�	&�
�U��
 �&��L�L�%�f�%�
&�
�M�M�5�y�)�&�	�L�L�%�f�%�&�	�M�M�5�w�'�&�	�N�N�E��$�7�&�	�J�J��G�t�4�&�	�N�N�E��'�&�	�N�N�E�	��5�&�	�M�M�5�u�%�&�	�M�M�5�u�%�&� 	�N�N�E��'�!&�"	�H�H�e�-�(�#&�$�E��!�
�E����O�O�U��.����e�'�*��O�O�U��%�����I�D�9��N�N�E�t�$��M�M�5�|�,�	�5�u��-�5&�
�D��E�!�"��:%�	�5�7�%���N�+�%��U�t�_�%��O�O�U��/�	%�
�U��
'�%��L�L�%�m�,�
%�
�M�M�5�/�0�%�	�L�L�%�m�,�%�	�M�M�5�~�.�%�	�N�N�E�
��>�%�	�J�J��N�d�;�%�	�N�N�E�
�.�%�	�N�N�E� 0�t�<�%�	�M�M�5�|�,�%�	�M�M�5�|�,�%� 	�N�N�E�
�.�!%�"	�H�H�e�-�(�#%�$�E��!�
�E�
�&��O�O�U��.����e�.�1��O�O�U��%�����$4�4�@��N�N�E�t�$��M�M�5�|�,�	�5�u��-�5%�	�4�	�5� �!��:%/�Y�G��!"��"�#�"�'&�+�'&�T&�k�&�B�s�C�x���	�J�	�~*�\�~*�B7��s�m�7�/=�7�
�c�]�7�6�z����
$�X�
$�
$�<��F������
+���
�����
���
,�
�������
���
$�
�������
��
"��������
�
��
9�
�������
���
#�
��������
��
(�
������i�g�y�?O��������
��
(���������
�
�������k��Q�Y�Y�������
��
�
8�������D�0��T�%5�%5�T�Z�Z�H�G��y�y�C���y�y�~�~������/�/��*�*��n�n��*�*�!�2�2��,�,��L�L�!�0�0�1�

���!�!��I�I��/�/��*�*��n�n��*�*�!�2�2��,�,��L�L�!�0�0�1�"�

���M�M�&�D�N�N�M�3�krYpython3.12/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-312.pyc000064400000075510151732701770023136 0ustar00�

R`i�s�!�X�ddlmZddlZddlZddlZddlZddlmZmZddl	m
Z
ddlmZm
Z
ddlmZmZmZmZmZmZmZmZmZmZddlmZddlmZmZmZmZm Z m!Z!dd	lm"Z#dd
lm$Z$ddl%m&Z&dd
l'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.m/Z/m0Z0m1Z1m2Z2ddl3m4Z4ddl5m6Z6m7Z7ddl8m9Z9ddl:m;Z;ddl<m=Z=ddl>m?Z?dd	l@m"Z"ddlAmBZBej��dk(ZDdZEdZFddddddeEeFdddddd �
d!ee.d"eeGd#eGd$eeHd%eId&eId'eGd(eGd)eId*eeId+eId,eeeHefd-eGd.eeeJeJee
geffd/�ZKeGd0�d1��ZLeGd2�d3��ZMeGd4�d5��ZNeGd6�d7��ZOGd8�d9e6�ZPGd:�d;�ZQeRd<k(r-dd=l-m.Z.e.�Z-ddlZd>ed.dfd?�ZSd>ed.dfd@�ZTdBdA�ZUeU�yy)C�)�absolute_importN)�	dataclass�field)�walk_tb)�
ModuleType�
TracebackType)
�Any�Callable�Dict�Iterable�List�Optional�Sequence�Tuple�Type�Union)�guess_lexer_for_filename)�Comment�Keyword�Name�Number�Operator�String)�Text)�Token)�
ClassNotFound�)�pretty)�	loop_last)�Columns)�Console�ConsoleOptions�ConsoleRenderable�RenderResult�group)�	Constrain)�RegexHighlighter�ReprHighlighter)�Panel)�render_scope)�Style)�Syntax)�Theme�Windows�
�P�d�FT�)
�console�width�extra_lines�theme�	word_wrap�show_locals�locals_max_length�locals_max_string�locals_hide_dunder�locals_hide_sunder�
indent_guides�suppress�
max_framesr4r5r6r7r8r9r:r;r<r=r>r?r@�returnc
����������	�
�����|�td��n|��jr�	�dn�	�	dttdtdtt
ddf��
��	���������f
d��d	tddf�fd
�}
	t�}|
|�tjS#t$r tj}�t_	|cYSwxYw)a"Install a rich traceback handler.

    Once installed, any tracebacks will be printed with syntax highlighting and rich formatting.


    Args:
        console (Optional[Console], optional): Console to write exception to. Default uses internal Console instance.
        width (Optional[int], optional): Width (in characters) of traceback. Defaults to 100.
        extra_lines (int, optional): Extra lines of code. Defaults to 3.
        theme (Optional[str], optional): Pygments theme to use in traceback. Defaults to ``None`` which will pick
            a theme appropriate for the platform.
        word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
        show_locals (bool, optional): Enable display of local variables. Defaults to False.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
        suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.

    Returns:
        Callable: The previous exception handler that was replaced.

    NT)�stderr�type_�value�	tracebackrAc�~�
��
jtj|||�����
���t�����	���y)N�r5r6r7r8r9r:r;r<r=r>r?r@)�print�	Traceback�from_exception�bool)rDrErFr6r>r<r=r:r;r@r9r?r7�traceback_consoler5r8s   ���������������/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/traceback.py�
excepthookzinstall.<locals>.excepthookasY���
	����$�$�����'��#�'�"3�"3�#5�#'�(:�#;�+�!�%�
%�
�	
��ipc	��������i��j�dtdtddf��fd�}dd�dtdtdtddf���fd����_|�_�fd	��_y)
N�args�kwargsrAc���|��|i|��y)zEwrap the default ip.showtraceback to store info for ip._showtracebackNr3)rSrT�default_showtraceback�tb_datas  ��rN�ipy_show_tracebackzCinstall.<locals>.ipy_excepthook_closure.<locals>.ipy_show_traceback~s����G�!�4�2�6�2rPF)�	is_syntaxrYc�����	j�}|rdn|d}�
jdd�}�
jd|rdnd�}t|�D]}|�n|j}��|d|d|�i�
y)z2Internally called traceback from ip._showtracebackN��running_compiled_codeF�	tb_offsetrr)�
_get_exc_info�get�range�tb_next)rYrSrT�	exc_tuple�tb�compiledr]�_rOrQrWs        ���rN�ipy_display_tracebackzFinstall.<locals>.ipy_excepthook_closure.<locals>.ipy_display_traceback�s����
�(�(�*�I�3<�$��1��B��{�{�#:�E�B�H����K�h��A�F�I��9�%���:���Z�Z��&�

�y��|�Y�q�\�2�6��GrPc����|ddi|��S)NrYTr3)rSrTrfs  �rN�<lambda>z9install.<locals>.ipy_excepthook_closure.<locals>.<lambda>�s���5J�
�6
�!�6
�%+�6
rP)�
showtracebackr	rL�_showtraceback�showsyntaxerror)rQrXrVrfrWrOs` @@@�rN�ipy_excepthook_closurez'install.<locals>.ipy_excepthook_closurezst����� "� 0� 0��	3�c�	3�S�	3�T�	3�+0�	��	�#'�	�;>�	�
�	�02���-���
��rP)r!�
is_jupyterr�
BaseExceptionrrr	�get_ipython�sysrO�	Exception)r4r5r6r7r8r9r:r;r<r=r>r?r@rlrQ�old_excepthookrOrMs ````````````   @@rN�installrs0s�����R18���t�,�W��
�(�(�-?�-G�	
�
��
��M�"�
��
��M�*�
�
�	
�
�
�2'
�3�'
�4�'
�R	�
�]���r�"��~�~���������#�����	�s�4!B�&B?�>B?c�l�eZdZUeed<eed<eed<dZeed<dZee	ee
jfed<y)�Frame�filename�lineno�name��lineN�locals)�__name__�
__module__�__qualname__�str�__annotations__�intrzr{rrr�Noder3rPrNruru�s7���M��K�

�I��D�#�N�/3�F�H�T�#�v�{�{�*�+�,�3rPruc�@�eZdZUeed<eed<eed<eed<eed<y)�_SyntaxError�offsetrvrzrw�msgN)r|r}r~r�r�rr3rPrNr�r��s���K��M�

�I��K�	�HrPr�c�f�eZdZUeed<eed<dZeeed<dZe	ed<e
e��Ze
eed<y)	�Stack�exc_type�	exc_valueN�syntax_errorF�is_cause)�default_factory�frames)r|r}r~rr�r�rr�r�rLr�listr�r
rur3rPrNr�r��s8���M��N�+/�L�(�<�(�/��H�d����5�F�D��K�5rPr�c��eZdZUeeed<y)�Trace�stacksN)r|r}r~r
r�r�r3rPrNr�r��s����K�rPr�c��eZdZdgZy)�PathHighlighterz(?P<dim>.*/)(?P<bold>.+)N)r|r}r~�
highlightsr3rPrNr�r��s
��-�.�JrPr�c"��eZdZdZdddddd�Z	d-dd	dd
d
eedd
dddd
�deedee	de	dee
dedede	de	dedededee
e
efde	fd�Zedd	dd
d
eedd
dddd
�deededeedee	de	dee
dedede	de	dedededee
e
efde	ddf d ��Zed
eedd
d!�deededeedede	de	dededefd"��Zd#ed$edefd%�Ze�d&edefd'��Zed(e
d)e
de
fd*��Ze�d+edefd,��Z y).rJa�A Console renderable that renders a traceback.

    Args:
        trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses
            the last exception.
        width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
        extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
        theme (str, optional): Override pygments theme used in traceback.
        word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
        show_locals (bool, optional): Enable display of local variables. Defaults to False.
        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
        suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
        max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.

    �text�python�cython�pyrex)ryz.pyz.pxdz.pyxz.pxiNr1r2FTr3rH�tracer5r6r7r8r9r:r;r<r=r>r?r@c��|�>tj�\}}}|�|�|�td��|j||||��}||_||_||_tj|xsd�|_	||_
||_||_||_
||_|	|_|
|_g|_|D]�}t%|t&�s@|j(�
J|�d���t*j,j/|j(�}n|}t*j,j1t*j,j3|��}|j"j5|���|
dkDrt7d|
�|_yd|_y)Nz9Value for 'trace' required if not called in except: block�r9�	ansi_darkz+ must be a module with '__file__' attributer�)rp�exc_info�
ValueError�extractr�r5r6r,�	get_themer7r8r9r>r:r;r<r=r?�
isinstancer�__file__�os�path�dirname�normpath�abspath�append�maxr@)�selfr�r5r6r7r8r9r:r;r<r=r>r?r@r�r�rF�suppress_entityr�s                   rN�__init__zTraceback.__init__�sm��"�=�-0�\�\�^�*�H�i����9�#4�	�8I� �O����L�L��)�Y�K�!��E���
���
�&����%�%�e�&:�{�;��
�"���&���*���!2���!2���"4���"4���')��
�'�O��o�s�3�#�,�,�8�U�%�(�(S�T�U�8��w�w����'?�'?�@��&���7�7�#�#�B�G�G�O�O�D�$9�:�D��M�M� � ��&� (�1;�Q��#�a��,���A��rPr�r�rFrAc�^�|j|||||	|
||��}||||||||
|	|
||||��
S)aeCreate a traceback from exception info

        Args:
            exc_type (Type[BaseException]): Exception type.
            exc_value (BaseException): Exception value.
            traceback (TracebackType): Python Traceback object.
            width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
            extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
            theme (str, optional): Override pygments theme used in traceback.
            word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
            show_locals (bool, optional): Enable display of local variables. Defaults to False.
            indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
                Defaults to 10.
            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
            suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
            max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.

        Returns:
            Traceback: A Traceback instance that may be printed.
        �r9r:r;r<r=)r5r6r7r8r9r>r:r;r<r=r?r@)r�)�clsr�r�rFr5r6r7r8r9r:r;r<r=r>r?r@�rich_tracebacks                 rNrKzTraceback.from_exception$sf��V������#�/�/�1�1�%�	
�����#���#�'�/�/�1�1��!�
�	
rPr�c����g}	d}
ddlm}dtdtfd�}	t	||j
�||�|
��}
t
|t�rWt|jxsd|jxsd	|jxsd|jxsd
|j��|
_|	j|
�|
j j}dt"t$tt&fdt"t$tt&ff��fd
�}t)|�D�]3\}}|j*j,}|rP|j/d�s?t0j2j5|�s t0j2j7||�}|j8j;dd�r��t=|xsd	||j*j>|rJ||j8jA��D��cic]\}}|tCjD|||���� c}}nd��}||�|j8j;dd�s��%|
j dd�=��6tG|dd�}|r|jH}|}|jJ}d}
��]|jL}|r+tG|dd�s|jH}|}|jJ}d}
���	tO|	��}|Scc}}w)a�Extract traceback information.

        Args:
            exc_type (Type[BaseException]): Exception type.
            exc_value (BaseException): Exception value.
            traceback (TracebackType): Python Traceback object.
            show_locals (bool, optional): Enable display of local variables. Defaults to False.
            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
                Defaults to 10.
            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.

        Returns:
            Trace: A Trace instance which you can use to construct a `Traceback`.
        Fr)�_IMPORT_CWD�_objectrAc�8�	t|�S#t$rYywxYw)z1Don't allow exceptions from __str__ to propagate.z<exception str() failed>)rrq)r�s rN�safe_strz#Traceback.extract.<locals>.safe_str�s#��
2��7�|�#���
2�1�
2�s�

�	�T)r�r�r��?ry)r�rvrwrzr��iter_localsc3��K��s
�s|Ed{���y|D]3\}}�r|jd�r��r|jd�r�.||f���5y7�>�w)z-Extract locals from an iterator of key pairs.N�__re��
startswith)r��keyrEr<r=s   ��rN�
get_localsz%Traceback.extract.<locals>.get_locals�sZ�����+�.@�*�*�*��"-�J�C��)�c�n�n�T�.B� �)�c�n�n�S�.A� ��u�*�$�#.�+�s�
A�A�?A�<�_rich_traceback_omit)�
max_length�
max_stringN)rvrwrxr{�_rich_traceback_guard�	__cause__�__suppress_context__)r�)(�pip._vendor.richr�r	rr�r|r��SyntaxErrorr�r�rvrwr�r�r�r�r�rr�objectr�f_code�co_filenamer�r�r��isabs�join�f_localsr_ru�co_name�itemsr�traverse�getattr�	__class__�
__traceback__�__context__r�)r�r�r�rFr9r:r;r<r=r�r�r�r��stackr�r��
frame_summary�line_norvr�rE�frame�causer�s       ``               rNr�zTraceback.extractjs����<!����0�	2�c�	2�c�	2���!�(�"3�"3�4�"�9�-�!��E��)�[�1�%1�$�+�+�0�q�&�/�/�6�3�$�+�+�0�q�"���-�2�!�
�
�&��"�
�M�M�%� ��\�\�(�(�F�
%�%�e�C��K�&8�9�
%��%��V��,�-�
%�+2�)�*<�&�
�w�(�/�/�;�;���H�$7�$7��$<��7�7�=�=��2�#%�7�7�<�<��X�#F�� �)�)�-�-�.D�e�L���%�_��"�&�-�-�5�5�#�+5�]�5K�5K�5Q�5Q�5S�*T�
�+U�J�C���V�_�_�!�'8�'8���
+U�
�����u�
� �)�)�-�-�.E�u�M����Q��3+=�6�I�{�D�9�E�� �?�?��!�	�"�/�/�	�����)�)�E��W�Y�0F��N� �?�?��!�	�!�/�/�	� �����V�$�����Is�'#Kr4�optionsc#�K�|j}|j�}|j}tid|t��d|t
��d|t��d|tj��d|t��d|t�td��z�d	|t��d
|t�td��z�d|t��d
|tj��d|tj��d|tj��d|tj��d|t��d|t��d|tj�td��z�d��}t!�}t#t%|j&j(��D�]�\}}	|	j*rTt-|j/|	�d|ddd��}
t1|
|j2�}
|j5|�5|
��ddd�|	j6��|j5|�5t1t-|j9|	j6�|ddd|j2��|j2���ddd�t;j<|	j>�d�df||	j6j@����nh|	jBr8t;j<|	j>�d�df||	jB����n$t;j<|	j>�df���|r���|	jDrt;jFd������t;jFd������y#1swY��hxYw#1swY��xYw�w) Nr�
pygments.text�pygments.string�pygments.function�pygments.numberzrepr.indentT)�dimzrepr.strz
repr.brace)�boldzrepr.numberzrepr.bool_truezrepr.bool_falsez	repr.nonezscope.borderzscope.equalsz	scope.keyzscope.key.specialF)�inheritz7[traceback.title]Traceback [dim](most recent call last)ztraceback.border)rr)�title�style�border_style�expand�paddingztraceback.border.syntax_error)r�r�r�r�r5z: ztraceback.exc_typezI
[i]The above exception was the direct cause of the following exception:
zH
[i]During handling of the above exception, another exception occurred:
)$r7�get_background_style�get_style_for_tokenr-�	TextTokenrrr�Functionrrr+r�Constant�	Delimiterrr(r�reversedr�r�r�r)�
_render_stackr&r5�	use_themer��_render_syntax_errorr�assembler�r�r�r��from_markup)r�r4r�r7�background_style�token_style�traceback_theme�highlighter�lastr��stack_renderables           rN�__rich_console__zTraceback.__rich_console__�sS�����
�
�� �5�5�7���/�/���
��+�i�0�
���U�!3�
�"�;�v�#6�
�$�[����%?�	
�
"�;�v�#6�
��{�7�3�e��o�E�

��K��/�
��k�)�4�u�$�7G�G�
��{�6�2�
�!�+�g�.>�.>�"?�
�"�;�w�/?�/?�#@�
��[��)9�)9�:�
���F�,<�,<� =�
���H� 5�
��[��.�
� $�[����%?�%�D�/�%Q�!
�$�'
��,&�'��$�X�d�j�j�.?�.?�%@�A�K�D�%��|�|�6;��&�&�u�-�S�*�!3��"�
7� �$-�-=�t�z�z�#J� ��&�&��7�*�*�8��!�!�-��&�&��7�#�� �5�5�e�6H�6H�I�"2�)H�#'�$*�"&�*�*�
��
�
�
�
�8��m�m����'�r�*�,@�A��� 2� 2� 6� 6�7�������m�m����'�r�*�,@�A�����0���
�m�m����'7�:N�$O�P�P���>�>��*�*�e����*�*�d���YB�8�7��8�7�s?�G5M<�7M"�<%M<�!AM/�,B4M<�"AM<�"M,	�'M<�/M9	�4M<r�c#�8K�t�}t�}|jdk7rptjj|j�rGt
jd|j��dfdt|j�dfd��}||���||jj��}d|_t|jd	z
t|��}|j!d
||�|t
j"dd|zzdzd��z
}|��y�w)
Nz<stdin>� r���:r�r�r��r�Trzbold underline�
u[traceback.offset]▲[/])r(r�rvr�r��existsrr�rrwrz�rstrip�no_wrap�minr��len�stylizer�)r�r�r��path_highlighterr��syntax_error_textr�s       rNr�zTraceback._render_syntax_error5s����%�'��*�,��� � �I�-��w�w�~�~�l�3�3�4��}�}���.�.�/�0�2C�D�*���,�,�-�/@�A�)�	��'�t�,�,�'��(9�(9�(@�(@�(B�C��$(��!��\�(�(�1�,�c�2C�.D�E���!�!�"2�F�F�C��T�-�-��3��<��"<�<�!�
�	
�� ��s�DDrv�codec�R�tjj|�d}|sA|jd�}|dk7r|d|n|}|j	d�rd|j�vry	|jj|�xst||�jS#t$rYywxYw)N���rz#!r�r�)r�r��splitext�indexr��lower�LEXERSr_rrxr)r�rvr�ext�new_line_index�
first_lines      rN�_guess_lexerzTraceback._guess_lexerLs����g�g���x�(��,���"�Z�Z��-�N�2@�B�2F��o�~�.�D�J��$�$�T�*�x�:�;K�;K�;M�/M��	��:�:�>�>�#�&�W�*B�8�T�*R�*W�*W�W���	��	�s�'2B�	B&�%B&r�c
#�4��K�t�}�j}dtdtfd�}dtdtt
f�fd�}d}�jdk7r<t�jdzt|j��jdzz
�}d}t|j�D�]6\}}	|r||vrd	}�|r#|�J�td
t|��d�dd
����d}|dk(}
|	j�t�fd��jD��}tj j#|	j�rXtj$|t|	jd���dt|	j&�dfd|	j(dfd��}n;tj$d|	j(dfdt|	j&�dfd��}|	jj+d�s|
sd��|��|	jj+d�r||	�Ed{�����r|r��v	||	j�}
|
s����j-|	j|
�}t/|
||d	|	j&�j0z
|	j&�j0zf|	j&h�j2d�j4d��
}d��|	j6rt9|g||	��d��n|����9y7��#t:$r'}tj$d|��d
f���Yd}~��hd}~wwxYw�w)NrvrAc�J�djtj|��S)z�Read files, and cache results on filename.

            Args:
                filename (str): Filename to read

            Returns:
                str: Contents of file
            ry)r��	linecache�getlines)rvs rN�	read_codez*Traceback._render_stack.<locals>.read_codeas���7�7�9�-�-�h�7�8�8rPr�c3��K�|jr;t|jd�j�j�j����yy�w)Nr{)r�r>r�r�)r{r*r>r:r;)r�r�s �rN�
render_localsz.Traceback._render_stack.<locals>.render_localslsE������|�|�"��L�L�"�"&�"4�"4�#�5�5�#�5�5����s�A	Arr[FTz
... z frames hidden ...�centerztraceback.error)�justifyr�c3�@�K�|]}�j|����y�w�Nr�)�.0r��frame_filenames  �rN�	<genexpr>z*Traceback._render_stack.<locals>.<genexpr>�s�����W���^�6�6�t�<��s�r�rr�r�z in r�r�zin r�ry�X)r7�line_numbers�
line_range�highlight_linesr8�
code_widthr>�dedentr)r�r)r�r7rrurr#r@r`rr��	enumeraterrv�anyr?r�r�rr�rwrxr�rr,r6r8r>r{r rq)r�r�r	r7rr�exclude_frames�excluded�frame_indexr��first�
suppressedr�r�
lexer_name�syntax�errorr"s`                @rNr�zTraceback._render_stack\s�����*�,���
�
��		9��		9��		9�	��	�8�4E�+F�	�+/���?�?�a��"����1�$��E�L�L�!�D�O�O�q�$8�8��N�
��"+�E�L�L�"9��K���+��"?�����%�1�1�1���S��0�1�1C�D�$�+���
!���1�$�E�"�^�^�N��W����W�W�J��w�w�~�~�e�n�n�-��}�}�$�T�%�.�.�@Q�%R�S�*�����&�(9�:���Z�Z�!4�5�)�
���}�}���Z�Z�!4�5�*�����&�(9�:�)����>�>�,�,�S�1�%����J��~�~�(�(��-�(��/�/�/���&�$�U�^�^�4�D��!�!%�!2�!2�5�>�>�4�!H�J�#��"�#�%)�!�L�L�4�+;�+;�;�!�L�L�4�+;�+;�;�$�*/����"&�.�.�#%�&*�&8�&8�$��F��H�!�<�<� � &��!.�u�!5��%&��$�
�O#:�P0��4!���-�-��e�W��'8�9������sI�HL�K#�L�K%�3L�5BK%�9+L�%	L�.L�
L�L�Lr )!r|r}r~�__doc__r�LOCALS_MAX_LENGTH�LOCALS_MAX_STRINGrr�r�rrLrrrr��classmethodrr	rnrrKr�r!r"r$r�r%r�r�rr�r�r3rPrNrJrJ�s2���,
������F�"&�1F� #��#��!�!2�!2�#'�#(�"�57��1F����1F���}�	1F�
�1F���}�
1F��1F��1F��1F��1F�!�1F�!�1F��1F��5��j��1�2�1F��1F�f� #��#��!�!2�!2�#'�#(�"�57��#C
��s�)�C
�!�C
��M�*�	C
���}�
C
��C
���}�C
��C
��C
��C
��C
�!�C
�!�C
��C
� �5��j��1�2�!C
�"�#C
�$
�%C
��C
�J�"�!2�!2�#'�#(�z��}�%�z�!�z��M�*�	z��
z��z��z�!�z�!�z�
�z��z�xL��L�)7�L�	�L�\�W� �� �,� �
� �,�
�C�
�s�
�s�
��
��W�r�5�r�\�r�
�rrPrJ�__main__)r!�ac�$�d}t||z�y)Nr)rI)r9�ones  rN�barr<�s����
�c�A�g�rPc�,�d}hd�dd�}t|�y)NT>�Duncan Idaho�Thufir Hawat�
Paul Atreides�Vladimir Harkonnen)NFT)�
characters�atomic_types)r<)r9r��zeds   rN�foorE�s"�� $���0�
��	�A�rPc�r�		td�y#tYyxYw#tjd��YyxYw)NrTr�)rE�slfkjsldkfjr4�print_exceptionr3rPrNr3r3�s4��	6�
��A���
���	6��#�#��#�5�s�����6)rAN)V�
__future__rrr��platformrp�dataclassesrrrFr�typesrr�typingr	r
rrr
rrrrr�pip._vendor.pygments.lexersr�pip._vendor.pygments.tokenrrrrrrrr�r�pip._vendor.pygments.utilrryr�_loopr�columnsr r4r!r"r#r$r%�	constrainr&r�r'r(�panelr)�scoper*r�r+r2r,r�r7r-�system�WINDOWSr5r6r�rrLrnrsrur�r�r�r�rJr|r<rEr3r3rPrN�<module>rXsV��&��	��
�(��+����A�W�W�8�,�3����T�T� �:�������
�(�/�/�
�y�
(������
"&������.�.�#�)-��13��|�
�g�
�|��C�=�|��	|�
�C�=�|��
|��|��|��|��|�!���|��|��u�S�*�_�-�.�|��|��t�M�"�M�8�M�3J�K�S�P�Q�|�~�4�4��4��
�
��
��6�6��6������/�&�/�|�|�~�z�� ��i�G���s��t���s��t��6�
�G�ErPpython3.12/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-312.pyc000064400000016005151732701770022617 0ustar00�

R`ij�	���ddlmZmZmZmZmZmZerddlmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZddlmZeeeeeeefeeeeeffZGd�d	e
�Zed
k(rddlmZeedd
d���yy)�)�cast�List�Optional�Tuple�
TYPE_CHECKING�Union�)�Console�ConsoleOptions�RenderableType�RenderResult)�JupyterMixin)�Measurement)�Style)�Segmentc
��eZdZdZ	dddd�ddddd	eeefd
efd�Ze	ddde
d
dfd��Zeddd
e
e
e
e
e
ffd��Zd
efd�Z						dd�Z						dd�Zy)�Paddinga
Draw space around content.

    Example:
        >>> print(Padding("Hello", (2, 4), style="on blue"))

    Args:
        renderable (RenderableType): String or other renderable.
        pad (Union[int, Tuple[int]]): Padding for top, right, bottom, and left borders.
            May be specified with 1, 2, or 4 integers (CSS style).
        style (Union[str, Style], optional): Style for padding characters. Defaults to "none".
        expand (bool, optional): Expand padding to fit available width. Defaults to True.
    �noneT)�style�expand�
renderabler�pad�PaddingDimensionsrrc��||_|j|�\|_|_|_|_||_||_y)N)r�unpack�top�right�bottom�leftrr)�selfrrrrs     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/padding.py�__init__zPadding.__init__!s8��%���7;�{�{�3�7G�4���$�*�d�k�4�9���
�����level�returnc�&�t|ddd|fd��S)z�Make padding instance to render an indent.

        Args:
            renderable (RenderableType): String or other renderable.
            level (int): Number of characters to indent.

        Returns:
            Padding: A Padding instance.
        rF)rr)r)�clsrr$s   r!�indentzPadding.indent.s���z��1�a��'7��F�Fr#c�x�t|t�r||||fSt|�dk(r|d}||||fSt|�dk(r&ttttf|�\}}||||fSt|�dk(r2ttttttf|�\}}}}||||fStdt|��d���)z&Unpack padding specified in CSS style.r	r��z)1, 2 or 4 integers required for padding; z given)�
isinstance�int�lenrr�
ValueError)r�_pad�pad_top�	pad_rightrrrrs        r!rzPadding.unpack<s����c�3����c�3�'�'��s�8�q�=��q�6�D��$��d�+�+��s�8�q�=�!%�e�C��H�o�s�!;��G�Y��Y���;�;��s�8�q�=�'+�E�#�s�C��2D�,E�s�'K�$�C��������-�-��D�S��X�J�f�U�V�Vr#c��d|j�d|j�d|j�d|j�d|j�d�S)NzPadding(z, (�,z)))rrrrr)r s r!�__repr__zPadding.__repr__LsD���$�/�/�,�C����z��4�:�:�,�a����}�TU�VZ�V_�V_�U`�`b�c�cr#c#�K�|j|j�}|jr
|j}nYt	tj|||j�j|jz|jz|j�}|j||jz
|jz
�}|j�6|j|j|jz
|jz
��}|j!|j||d��}t"}|jr|d|jz|�nd}|jr'|d|jz�|�|j%�gn|j%�g}	d}
|jr'|d|z�d�|�g}
|
|jzEd{���|r |D]}|��|Ed{���|	Ed{����n|D]}|Ed{���|	Ed{����|jr,|
xs|d|z�d�|�g}
|
|jzEd{���yy7�z7�g7�_7�O7�G7��w)N)�heightT)rr� �
)�	get_stylerr�	max_width�minr�getr�maximumrr�update_widthr7�
update_heightrr�render_linesr�line)r �console�optionsr�width�render_options�lines�_Segmentrr�
blank_linerBs            r!�__rich_console__zPadding.__rich_console__Os/�����!�!�$�*�*�-���;�;��%�%�E�������$�/�/�B�J�J��)�)���*�*���!�!�	�E�!�-�-�e�d�i�i�.?�$�*�*�.L�M��� � �,�+�9�9�%�,�,�t�x�x�7�$�+�+�E�:��N��$�$��O�O�^�5�d�%�
����37�9�9�x��d�i�i���/�$���z�z���t�z�z�)�*�U�
3�X�]�]�_�E��-�-�/�"�	�
/3�
��8�8�"�c�E�k�]�"�#5�u�=�>�J�!�D�H�H�,�,�,�����
���� � � ��
����� � � ���;�;�#�L��C�%�K�=��1C�U�(K�'L�J�!�D�K�K�/�/�/��
-�� �� �� �� ��
0�sl�F8I�:H5�;I�H7�	I�H9�I�+H;�,	I�5H=�68I�.H?�/I�7I�9I�;I�=I�?Ic��|j}|j|jz}||z
dkrt||�Stj|||j
�\}}t||z||z�}|j
|�}|S)Nr	)r;rrrr=r�with_maximum)r rCrDr;�extra_width�measure_min�measure_max�measurements        r!�__rich_measure__zPadding.__rich_measure__}s����%�%�	��i�i�$�*�*�,���{�"�Q�&��y�)�4�4�#.�?�?�7�G�T�_�_�#U� ��[�!�+��";�[�;�=V�W��!�.�.�y�9���r#N))rrrr)rCr
rDrr%r
)rCr
rDrr%r)�__name__�
__module__�__qualname__�__doc__r�strr�boolr"�classmethodr-r(�staticmethodrrr5rJrQ�r#r!rrs���� $0��
$*��
�$��!��
�S�%�Z� ���
��G� 0�G��G��G��G��
W�'�
W�E�#�s�C��2D�,E�
W��
W�d�#�d�,0� �,0�+;�,0�	�,0�\
� �
�+;�
�	�
r#r�__main__)�printzHello, World)r*r+zon blue)rN)�typingrrrrrrrCr
rrr
�jupyterr�measurerrr�segmentrr-rrrR�pip._vendor.richr\rZr#r!�<module>rbs���D�D����"� ����#�u�S�z�5��c��?�E�#�s�C�QT�BT�<U�U�V��t�l�t�n�z��&�	�'�.�&�	�
:�;�r#python3.12/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-312.pyc000064400000013034151732701770022312 0ustar00�

R`i��
���ddlZddlmZddlmZmZddlmZejd�jZ
ed�ded	efd
��Z
e
fdedeegefd	efd�Zed�
�ded	efd��Zed�
�ded	efd��Zdeded	efd�Zddededed	eefd�Zedk(rQeed��edd�D]
Zee��eddd�D]Zeede�dz�edez��!yy) �N)�	lru_cache)�Callable�List�)�CELL_WIDTHSu^[ -o ˿Ͱ-҂]*$i�text�returnc�<��t�t�fd�|D��}|S)a/Get the number of cells required to display text.

    This method always caches, which may use up a lot of memory. It is recommended to use
    `cell_len` over this method.

    Args:
        text (str): Text to display.

    Returns:
        int: Get the number of cells required to display text.
    c3�.�K�|]}�|����y�w�N���.0�	character�	_get_sizes  ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/cells.py�	<genexpr>z"cached_cell_len.<locals>.<genexpr>������@�4�i�Y�y�)�4���)�get_character_cell_size�sum)r�
total_sizers  @r�cached_cell_lenrs ���(�I��@�4�@�@�J����	_cell_lenc�h��t|�dkr||�St�t�fd�|D��}|S)z�Get the number of cells required to display text.

    Args:
        text (str): Text to display.

    Returns:
        int: Get the number of cells required to display text.
    ic3�.�K�|]}�|����y�wrr
rs  �rrzcell_len.<locals>.<genexpr>)rr)�lenrr)rrrrs   @r�cell_lenrs5����4�y�3������'�I��@�4�@�@�J��r)�maxsizerc�*�tt|��S)z�Get the cell size of a character.

    Args:
        character (str): A single character.

    Returns:
        int: Number of cells (0, 1 or 2) occupied by that character.
    )�_get_codepoint_cell_size�ord)rs rrr-s��$�C�	�N�3�3r�	codepointc��t}d}t|�dz
}||zdz}	||\}}}||kr|dz
}n||kDr|dz}n	|dk(rdS|S||kr	y||zdz}�8)z�Get the cell size of a character.

    Args:
        codepoint (int): Codepoint of a character.

    Returns:
        int: Number of cells (0, 1 or 2) occupied by that character.
    rr����)rr)r$�_table�lower_bound�upper_bound�index�start�end�widths        rr"r":s����F��K��f�+��/�K�
�;�
&�1�,�E�
�"�5�M���s�E��u���!�)�K�
��_��!�)�K����1�.��.���$����{�*�q�0��r�totalc�`�t|�r t|�}||kr|d||z
zzS|d|S|dkryt|�}||k(r|S||kr|d||z
zzSd}t|�}	||zdz}|d|dz}t|�}||dzk(rt|d�dk(r|dddzS||k(r|S||kDr|}n|}�N)z?Set the length of a string to fit within given number of cells.� Nr�r&rr')�_is_single_cell_widthsrr)	rr/�size�	cell_sizer,r-�pos�before�
before_lens	         r�
set_cell_sizer9Ws���d�#��4�y���%�<��#����.�.�.��F�U�|����z�����I��E�����5���c�U�Y�.�/�/�/�
�E�

�d�)�C���s�{�q� ���i��a�����f�%�
�����"�x��r�
�';�q�'@��#�2�;��$�$�����M�����C��E�r�max_size�positionc�N�t}|D�cgc]}|||�f��}}|}gg}|dj}t|�D]>\}}	||	z|kDr$|j|g�|dj}|	}�2||	z
}||��@|D�
cgc]}
dj|
���c}
Scc}wcc}
w)z[Break text in to equal (cell) length strings, returning the characters in reverse
    orderr'r2)r�append�reversed�join)rr:r;�_get_character_cell_sizer�
charactersr�linesr=r4�lines           r�
chop_cellsrD|s��� 7��JN��JN�Y��,�Y�7�8�$����J� �T�E�
�2�Y�
�
�F�#�J�/��	�4����x�'��L�L�)��%��2�Y�%�%�F��J��$��J��9��0�',�,�e�d�B�G�G�D�M�e�,�,��!�� -s�B�B"�__main__u😽u]这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑。��Pr'�|�x)r)�re�	functoolsr�typingrr�_cell_widthsr�compile�matchr3�str�intrrrr"r9rD�__name__�printrC�range�nr
rr�<module>rVs���	��!�%�$����$Q�R�X�X���4���#��#����";J�
�3�
�8�S�E�3�J�#7�
�c�
� �4��	4�s�	4�s�	4��	4��4��
��
��
��
�8 �� �C� �C� �J-�S�-�C�-�3�-�t�C�y�-�.�z��	�
!�&�
)�*��~�AB�C��
�d��C�
�2�q�"�
��
�m��BC�D�GJ�J�	K�
�c�A�g���rpython3.12/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-312.pyc000064400000023317151732701770023513 0ustar00�

R`ip%����ddlZddlmZmZddlmZmZddlmZm	Z	de
de
fd�ZGd	�d
e�ZGd�de�Z
Gd
�de�ZGd�de�ZGd�de�ZGd�de�Zedk(�r|ddlmZe�Zej+d�ej+d�ej+d�ej+d�ej+d�ej+d�ej+d�ej+d�ej+d�ej+d �ej+d!�ej+d"�ej+d#�ej+d$�ej+d%�ej+d&�ej+d'�ej+d(�ej+d)�ddlZej/ej0d*dd+��,�d�-�yy).�N)�ABC�abstractmethod)�List�Union�)�Span�Text�regexes�returnc�$�dj|�S)z{Combine a number of regexes in to a single regex.

    Returns:
        str: New regex with all regexes ORed together.
    �|)�join)r
s ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/highlighter.py�_combine_regexrs���8�8�G���c�D�eZdZdZdeeefdefd�Zededdfd��Z	y)�Highlighterz%Abstract base class for highlighters.�textrc��t|t�rt|�}n/t|t�r|j�}nt	d|����|j|�|S)a	Highlight a str or Text instance.

        Args:
            text (Union[str, ~Text]): Text to highlight.

        Raises:
            TypeError: If not called with text or str.

        Returns:
            Text: A test instance with highlighting applied.
        z#str or Text instance required, not )�
isinstance�strr	�copy�	TypeError�	highlight)�selfr�highlight_texts   r�__call__zHighlighter.__call__sQ���d�C� �!�$�Z�N�
��d�
#�!�Y�Y�[�N��A�$��J�K�K����~�&��rNc��y)zoApply highlighting in place to text.

        Args:
            text (~Text): A text object highlight.
        N��rrs  rrzHighlighter.highlight)��r)
�__name__�
__module__�__qualname__�__doc__rrr	rrrrrrrrsC��/��U�3��9�-��$��*��d��t���rrc� �eZdZdZdeddfd�Zy)�NullHighlighterzeA highlighter object that doesn't highlight.

    May be used to disable highlighting entirely.

    rrNc��y)z
Nothing to doNrr s  rrzNullHighlighter.highlight9r!r)r"r#r$r%r	rrrrr'r'2s����d��t�rr'c�D�eZdZUdZgZeeed<dZeed<de	ddfd�Z
y)	�RegexHighlighterz8Applies highlighting from a list of regular expressions.�
highlights��
base_stylerrNc�f�|j}|jD]}|||j���y)z�Highlight :class:`rich.text.Text` using regular expressions.

        Args:
            text (~Text): Text to highlighted.

        )�style_prefixN)�highlight_regexr+r-)rrr0�re_highlights    rrzRegexHighlighter.highlightCs+���.�.�� �O�O�L��L�t���G�,r)r"r#r$r%r+rr�__annotations__r-r	rrrrr*r*=s3��B��J��S�	���J���
H�d�
H�t�
Hrr*c�D�eZdZdZdZdddedddd	d
ddd
ddddd�
gZy)�ReprHighlighterzAHighlights the text typically produced from ``__repr__`` methods.zrepr.zN(?P<tag_start><)(?P<tag_name>[-\w.:|]*)(?P<tag_contents>[\w\W]*)(?P<tag_end>>)z:(?P<attrib_name>[\w_]{1,50})=(?P<attrib_value>"?[\w_]+"?)?z(?P<brace>[][{}()])z8(?P<ipv4>[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})z4(?P<ipv6>([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})z�(?P<eui64>(?:[0-9A-Fa-f]{1,2}-){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){3}[0-9A-Fa-f]{4})z�(?P<eui48>(?:[0-9A-Fa-f]{1,2}-){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4})zU(?P<uuid>[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})z(?P<call>[\w.]*?)\(zD\b(?P<bool_true>True)\b|\b(?P<bool_false>False)\b|\b(?P<none>None)\bz(?P<ellipsis>\.\.\.)zk(?P<number_complex>(?<!\w)(?:\-?[0-9]+\.?[0-9]*(?:e[-+]?\d+?)?)(?:[-+](?:[0-9]+\.?[0-9]*(?:e[-+]?\d+)?))?j)zC(?P<number>(?<!\w)\-?[0-9]+\.?[0-9]*(e[-+]?\d+?)?\b|0x[0-9a-fA-F]*)z3(?P<path>\B(/[-\w._+]+)*\/)(?P<filename>[-\w._+]*)?z_(?<![\\\w])(?P<str>b?'''.*?(?<!\\)'''|b?'.*?(?<!\\)'|b?\"\"\".*?(?<!\\)\"\"\"|b?\".*?(?<!\\)\")zB(?P<url>(file|https|http|ws|wss)://[-0-9a-zA-Z$_+!`(),.?/;:&=%#]*)N)r"r#r$r%r-rr+rrrr4r4PsO��K��J�Y�E���G�C�
R�
R�d�"�S�#�z�R�B�n�Q�	
�	�Jrr4c�T��eZdZdZdZhd�ZdZeddde�gZde	d	d
f�fd�Z
�xZS)�JSONHighlighterzHighlights JSONz$(?<![\\\w])(?P<str>b?\".*?(?<!\\)\")>�	�
�
� zjson.z(?P<brace>[\{\[\(\)\]\}])zD\b(?P<bool_true>true)\b|\b(?P<bool_false>false)\b|\b(?P<null>null)\bzE(?P<number>(?<!\w)\-?[0-9]+\.?[0-9]*(e[\-\+]?\d+?)?\b|0x[0-9a-fA-F]*)rrNc�b��t�
|�|�|j}|jj}|j
}t
j|j|�D]N}|j�\}}|}|t|�ks�'||}	|dz
}|	dk(r|t||d��n|	|vr�7�Py)Nr�:zjson.key)�superr�plain�spans�append�JSON_WHITESPACE�re�finditer�JSON_STR�span�lenr)rrr>r@�
whitespace�match�start�end�cursor�char�	__class__s          �rrzJSONHighlighter.highlight{s����
���$���
�
�����"�"���)�)�
��[�[�����6�E�����J�E�3��F��3�u�:�%��V�}���!����3�;��4��s�J�7�8��Z�'���7r)r"r#r$r%rDrAr-rr+r	r�
__classcell__)rMs@rr6r6jsJ����7�H�-�O��J��(�S�T��		
��J��d��t��rr6c��eZdZdZdZgd�Zy)�ISO8601Highlighterz�Highlights the ISO8601 date time strings.
    Regex reference: https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s07.html
    ziso8601.)
z-^(?P<year>[0-9]{4})-(?P<month>1[0-2]|0[1-9])$zU^(?P<date>(?P<year>[0-9]{4})(?P<month>1[0-2]|0[1-9])(?P<day>3[01]|0[1-9]|[12][0-9]))$z]^(?P<date>(?P<year>[0-9]{4})-?(?P<day>36[0-6]|3[0-5][0-9]|[12][0-9]{2}|0[1-9][0-9]|00[1-9]))$zC^(?P<date>(?P<year>[0-9]{4})-?W(?P<week>5[0-3]|[1-4][0-9]|0[1-9]))$zS^(?P<date>(?P<year>[0-9]{4})-?W(?P<week>5[0-3]|[1-4][0-9]|0[1-9])-?(?P<day>[1-7]))$z>^(?P<time>(?P<hour>2[0-3]|[01][0-9]):?(?P<minute>[0-5][0-9]))$zR^(?P<time>(?P<hour>2[0-3]|[01][0-9])(?P<minute>[0-5][0-9])(?P<second>[0-5][0-9]))$zA^(?P<timezone>(Z|[+-](?:2[0-3]|[01][0-9])(?::?(?:[0-5][0-9]))?))$z�^(?P<time>(?P<hour>2[0-3]|[01][0-9])(?P<minute>[0-5][0-9])(?P<second>[0-5][0-9]))(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9])(?::?(?:[0-5][0-9]))?)$z�^(?P<date>(?P<year>[0-9]{4})(?P<hyphen>-)?(?P<month>1[0-2]|0[1-9])(?(hyphen)-)(?P<day>3[01]|0[1-9]|[12][0-9])) (?P<time>(?P<hour>2[0-3]|[01][0-9])(?(hyphen):)(?P<minute>[0-5][0-9])(?(hyphen):)(?P<second>[0-5][0-9]))$z�^(?P<date>(?P<year>-?(?:[1-9][0-9]*)?[0-9]{4})-(?P<month>1[0-2]|0[1-9])-(?P<day>3[01]|0[1-9]|[12][0-9]))(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$z�^(?P<time>(?P<hour>2[0-3]|[01][0-9]):(?P<minute>[0-5][0-9]):(?P<second>[0-5][0-9])(?P<frac>\.[0-9]+)?)(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$a^(?P<date>(?P<year>-?(?:[1-9][0-9]*)?[0-9]{4})-(?P<month>1[0-2]|0[1-9])-(?P<day>3[01]|0[1-9]|[12][0-9]))T(?P<time>(?P<hour>2[0-3]|[01][0-9]):(?P<minute>[0-5][0-9]):(?P<second>[0-5][0-9])(?P<ms>\.[0-9]+)?)(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$N)r"r#r$r%r-r+rrrrPrP�s����J�1�JrrP�__main__)�Consolez%[bold green]hello world![/bold green]z''[bold green]hello world![/bold green]'z /fooz/foo/z/foo/barzfoo/bar/bazz /foo/bar/baz?foo=bar+egg&egg=bazz
/foo/bar/baz/z/foo/bar/baz/eggz/foo/bar/baz/egg.pyz/foo/bar/baz/egg.py wordz /foo/bar/baz/egg.py wordzfoo /foo/bar/baz/egg.py wordz!foo /foo/bar/ba._++z/egg+.py wordz"https://example.org?foo=bar#headergq=
W��2Ag�?gF!
�@ܡ�zE127.0.1.1 bar 192.168.1.4 2001:0db8:85a3:0000:0000:8a2e:0370:7334 foo�apple)�name�count)�obj)�indent)rB�abcrr�typingrrrrr	rrrr'r*r4r6rPr"�consolerR�print�json�
print_json�dumpsrrr�<module>r_s���	�#����S��S���#��B�k��H�{�H�&�&��4"�&�"�J7�)�7�t�z�� ��i�G��M�M�9�:��M�M�;�<��M�M�'���M�M�'���M�M�*���M�M�-� ��M�M�4�5��M�M�/�"��M�M�$�%��M�M�'�(��M�M�,�-��M�M�-�.��M�M�0�1��M�M�5�6��M�M�6�7��M�M�*���M�M�%���M�M�#�$��M�M�O������z�t�z�z�w��&C�D�T��R�?rpython3.12/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-312.pyc000064400000003461151732701770023054 0ustar00�

R`io��\�ddlmZmZmZmZddlmZerddlmZdZ	dede
fd�Zdedd	fd
�Z
y)�)�Any�cast�Set�
TYPE_CHECKING)�isclass��RenderableType�-aihwerij235234ljsdnp34ksodfipwoe234234jlskjdf�check_object�returnc�Z�t|t�xst|d�xst|d�S)z+Check if an object may be rendered by Rich.�__rich__�__rich_console__)�
isinstance�str�hasattr)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/protocol.py�
is_renderabler
s2��	�<��%�	5��<��,�	5��<�!3�4���
renderabler	c�6�ddlm}t�}t|d�rrt	|�sgt|t
�rt
|�St|d�}|�}t|�}||vrn)|j|�t|d�rt	|�s�gt||�S)z�Cast an object to a renderable by calling __rich__ if present.

    Args:
        renderable (object): A potentially renderable object

    Returns:
        object: The result of recursively calling __rich__.
    rrr)�pip._vendor.rich.consoler	�setrr�
_GIBBERISH�repr�getattr�type�addr)rr	�rich_visited_set�cast_method�renderable_types     r�	rich_castr"s���8�"%�%��
�*�j�
)�'�*�2E��:�z�*��
�#�#��j�*�5�� �]�
��z�*���.�.�����_�-��*�j�
)�'�*�2E���
�+�+rN)�typingrrrr�inspectrrr	r�boolr�objectr"�rr�<module>r(s@��0�0���7�
@�
������,�&�,�%5�,rpython3.12/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-312.pyc000064400000027555151732702000022307 0ustar00�

R`iN)��d�ddlmZmZddlmZddlmZmZddlm	Z	ddl
mZddlm
Z
mZddlmZmZdd	lmZdd
lmZmZddlmZmZerddlmZmZmZmZGd
�de�Ze dk(rJddlmZe�Z!ddlm"Z"mZddlmZeddde"d��Z#e!jI�e!jIe#�yy)�)�
TYPE_CHECKING�Optional�)�AlignMethod)�ROUNDED�Box)�cell_len)�JupyterMixin)�Measurement�measure_renderables)�Padding�PaddingDimensions)�Segment)�Style�	StyleType)�Text�TextType)�Console�ConsoleOptions�RenderableType�RenderResultc �f�eZdZdZefddddddddddddd�d	d
dedeed
edeededee	de	de
de
deedeedede	ddfd�Z
eefdddddddddd�	d	d
dedeed
edeededee	de
de
deededdfd��Zedeefd��Zedeefd��Z						d d�Z						d!d�Zy)"�Panela�A console renderable that draws a border around its contents.

    Example:
        >>> console.print(Panel("Hello, World!"))

    Args:
        renderable (RenderableType): A console renderable object.
        box (Box, optional): A Box instance that defines the look of the border (see :ref:`appendix_box`.
            Defaults to box.ROUNDED.
        safe_box (bool, optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
        expand (bool, optional): If True the panel will stretch to fill the console
            width, otherwise it will be sized to fit the contents. Defaults to True.
        style (str, optional): The style of the panel (border and contents). Defaults to "none".
        border_style (str, optional): The style of the border. Defaults to "none".
        width (Optional[int], optional): Optional width of panel. Defaults to None to auto-detect.
        height (Optional[int], optional): Optional height of panel. Defaults to None to auto-detect.
        padding (Optional[PaddingDimensions]): Optional padding around renderable. Defaults to 0.
        highlight (bool, optional): Enable automatic highlighting of panel title (if str). Defaults to False.
    N�centerT�none)rrF)�title�title_align�subtitle�subtitle_align�safe_box�expand�style�border_style�width�height�padding�	highlight�
renderabler�boxrrrrr r!r"r#r$r%r&r'�returnc���||_||_||_||_||_||_||_||_|	|_|
|_	||_
||_|
|_||_
y)N)r(r)rrrrr r!r"r#r$r%r&r')�selfr(r)rrrrr r!r"r#r$r%r&r's               ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/panel.py�__init__zPanel.__init__&si��$%��������
�(3��� ��
�,��� ��
������
�(�����
�������"���)	rrrrr r"r#r$r&c	�*�||||||||||	|
|d��S)z2An alternative constructor that sets expand=False.F)
rrrrr r"r#r$r&r!�)�clsr(r)rrrrr r"r#r$r&s            r-�fitz	Panel.fitGs5��"����#��)���%����

�
	
r/c�f�|jr�t|jt�rtj|j�n|jj�}d|_|jjdd�|_d|_	|j�|jd�|Sy�N��
� Tr)r�
isinstance�strr�from_markup�copy�end�plain�replace�no_wrap�expand_tabs�pad)r,�
title_texts  r-�_titlezPanel._titlegs����:�:��d�j�j�#�.�� � ����,��Z�Z�_�_�&�
�
 �J�N�)�/�/�7�7��c�B�J��!%�J���"�"�$��N�N�1����r/c�f�|jr�t|jt�rtj|j�n|jj�}d|_|jjdd�|_d|_	|j�|jd�|Syr5)rr9r:rr;r<r=r>r?r@rArB)r,�
subtitle_texts  r-�	_subtitlezPanel._subtitlews����=�=��d�m�m�S�1�� � ����/��]�]�'�'�)�
�
!#�M��"/�"5�"5�"=�"=�d�C�"H�M��$(�M�!��%�%�'����a� � � �r/c#�RK�tj|j�}t|�rt|j|�n|j}|j|j�}||j|j�z}|j�|jnt|j|j�}|j�|jn|j}|jj||��}	dtdtdt dt dt"dtfd�}
|j$}|�|j'|�|j(r|d	z
n.|j+||j-|d	z
��
�j.}|j0xs|j0xsd}
|
r|
d	z}
|�0t|jd	z
t3||j4d	z��}|d	z}|j7||
|j8��}|j;|||��}t=|	j>|�}t=|	j@�|�}t=jB�}|�|d
kr"t=|	jE|d	z
g�|���n�|
||d
z
|jF|	jH|�}t=|	jJ|	jHz|���|jM||j-|d
z
��Ed{���t=|	jH|	jNz|���|��|D]}|��|Ed{���|��|���|jP}|�|j'|�|�|d
kr"t=|	jS|d	z
g�|���n�|
||d
z
|jT|	jV|�}t=|	jX|	jVz|���|jM||j-|d
z
��Ed{���t=|	jV|	jZz|���|��y7��17��7�3�w)N)�safe�textr$�align�	characterr"r*c�`�|j�}|j|�|t|j�z
}|rr|dk(rt	j
|||z|fdd��S|dk(r,|dz}t	j
||z|f||||z
z|fdd��St	j
||z|f|dd��S|S)acGets new aligned text.

            Args:
                text (Text): Title or subtitle text.
                width (int): Desired width.
                align (str): Alignment.
                character (str): Character for alignment.
                style (Style): Border style

            Returns:
                Text: New text instance
            �leftTr6)r@r=r�)r<�truncater	r>r�assemble)rJr$rKrLr"�excess_spacerNs       r-�
align_textz*Panel.__rich_console__.<locals>.align_text�s����9�9�;�D��M�M�%� � �8�D�J�J�#7�7�L���F�?��=�=��"�\�1�5�9� $��	���h�&�'�1�,�D��=�=�"�T�)�5�1��"�l�T�&9�:�E�B� $���� �=�=�"�\�1�5�9�� $��	���Kr/rO)�options)r$r%r')r"�).r
�unpackr&�anyr(�	get_styler"r#r$�	max_width�minr r)�
substituter�intr:rrD�stylize_beforer!�measure�update_width�maximumr%�maxr	�updater'�render_linesr�mid_left�	mid_right�line�get_topr�top�top_left�render�	top_rightrG�
get_bottomr�bottom�bottom_left�bottom_right)r,�consolerT�_paddingr(r"r#r$r r)rSrC�child_width�child_height�
child_options�lines�
line_start�line_end�new_linerfrFs                     r-�__rich_console__zPanel.__rich_console__�s������>�>�$�,�,�/��25�h�-�G�D�O�O�X�.�T�_�_�	��!�!�$�*�*�-���w�0�0��1B�1B�C�C���z�z�!�
����W�&�&��
�
�3�	�.2�]�]�-B��)�)��
�
���h�h�!�!�'��!�9��*	��*	�"�*	�+.�*	�;>�*	�GL�*	�
�*	�X�[�[�
��!��%�%�l�3��{�{�
�A�I�����G�$8�$8����$C�!���g�	��{�{�<�g�n�n�<�����A��L��!���!�!�A�%�s�;�
�8K�8K�a�8O�'P��K��a�������l�d�n�n�'�
�
��$�$�Z��e�$�L���S�\�\�<�8�
��c�m�m�_�|�<���<�<�>�����!���#�+�+�u�q�y�k�2�L�A�A�#����	�� � ������J��#�,�,����0�,�?�?��~�~�j�-�2L�2L�U�UV�Y�2W�X�X�X��#�'�'�C�M�M�1�<�@�@����D����O�O��N��N�	����
��$��(�(��6�� �E�Q�J��#�.�.�%�!�)��5�|�D�D�&����	��#�#��
�
���M��#�/�/�C�J�J�6��E�E��~�~��}�9�9�%�!�)�D��
�
��#�*�*�s�'7�'7�7��F�F���=
Y��
��&
�s7�K-P'�/P �0;P'�+P#�,CP'�1P%�2/P'�#P'�%P'c�h�|j}tj|j�\}}}}||z}|r|j|gn|jg}|j
�=t
||j|j|z
dz
�|�j|zdz}	n|j
}	t|	|	�S)NrO)rDr
rVr&r(r$rr_rYr`r)
r,rprTrD�_�rightrNr&�renderablesr$s
          r-�__rich_measure__zPanel.__rich_measure__s�������#�N�N�4�<�<�8���5�!�T���,��39�t����/����?P���:�:��#���(�(��):�):�W�)D�q�)H�I����'����
�
��J�J�E��5�%�(�(r/)rprrTrr*r)rprrTrr*r)�__name__�
__module__�__qualname__�__doc__rrrrr�boolrr\rr.�classmethodr3�propertyrrDrGryr~r1r/r-rrs'���.�#�
%)�#+�'+�&.�#'��!�"(�#� $�%+��!#�$�#��#�
��!�#�!�
#��8�$�#�$�#��4�.�#��#��#� �#���}�#���
�#�#�#� �!#�"
�##�B��
�
%)�#+�'+�&.�#'�!�"(�#�%+�
�$�
��
�
��!�
�!�

��8�$�
�$�
��4�.�
��
� �
���}�
�#�
�
�
��
�>�
����
��
��
�8�D�>�
��
�C� �C�+;�C�	�C�J)� �)�+;�)�	�)r/r�__main__)r)�DOUBLEr)r
z
Hello, World!z
rich.Panelz
white on blue)rr"r)r&N)%�typingrrrKrr)rr�cellsr	�jupyterr
r^rrr&r
r�segmentrr"rrrJrrrprrrrrr�cr��p�printr1r/r-�<module>r�s���*����!�5�/��#� ��N�N�O)�L�O)�d�z�� ��	�A�$� �
������	�A��G�G�I��G�G�A�J�#r/python3.12/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-312.pyc000064400000026335151732702000022142 0ustar00�

R`i�#�	��ddlmZmZmZmZddlmZmZddlm	Z	m
Z
mZmZddl
mZddlmZddlmZddlmZmZmZdd	lmZGd
�de�Zedk(�r�dd
lmZddlmZddlm Z ddl!m"Z"ddl#m$Z$e$ddg��Z%e%jMddd��e%jMdd��e%jMddd��e%jOd d!d"�e%jOd#d$d%�e%jOd&d'd(�e%jOd)d*d+�d,Z(e"e(d-d.d�/�Z)ed0�Z*ed1dd�2�Z+e+jYd3d4�5�Z-e-jYd6d7�5�Z.e.jYed8e)��e.jYed9e e*d�:���e-jYd;d<�5�Z/de/_0e jbd=d4�:�Z2e/jYed>e2��e/jYed?e%��e	�Zejge+�y@y@)A�)�Iterator�List�Optional�Tuple�)�
loop_first�	loop_last)�Console�ConsoleOptions�RenderableType�RenderResult)�JupyterMixin)�Measurement)�Segment)�Style�
StyleStack�	StyleType)�Styledc��eZdZdZdddddd�deded	ed
ededed
dfd�Zddddd�dedeed	eed
edeed
dfd�Z							dd�Z
						dd�Zy)�Treea�A renderable for a tree structure.

    Args:
        label (RenderableType): The renderable or str for the tree label.
        style (StyleType, optional): Style of this tree. Defaults to "tree".
        guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
        expanded (bool, optional): Also display children. Defaults to True.
        highlight (bool, optional): Highlight renderable (if str). Defaults to False.
    �treez	tree.lineTF)�style�guide_style�expanded�	highlight�	hide_root�labelrrrrr�returnNc�f�||_||_||_g|_||_||_||_y�N)rrr�childrenrrr)�selfrrrrrrs       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/tree.py�__init__z
Tree.__init__s6����
���
�&���$&��
� ��
�"���"����rrrrc��t||�|jn||�|jn|||�|jn|��}|jj|�|S)a3Add a child tree.

        Args:
            label (RenderableType): The renderable or str for the tree label.
            style (StyleType, optional): Style of this tree. Defaults to "tree".
            guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
            expanded (bool, optional): Also display children. Defaults to True.
            highlight (Optional[bool], optional): Highlight renderable (if str). Defaults to False.

        Returns:
            Tree: A new child Tree, which may be further modified.
        r&)rrrrr!�append)r"rrrrr�nodes       r#�addzTree.add)sX��*�� %�
�$�*�*�5�,7�,?��(�(�[��(1�(9�d�n�n�y�
��	
�
�
���T�"��r%c
#�����K�g}|j}|j}tj�}|j}tj�}||jd��xs|}	td�\}
}}}
d�gd��t�dtdt
dtf����fd	�}|||	�g}|tt|g���t||j��}t||j��}td
d
��}d}|�rW|�}	t|�\}}||�|r||
|d
jxs|�|d
<|j ||j�z}	|j ||j�z}||j"rdndd}|j%t'|j(|��j+�j,t/d�|D��z
|j0d���j2du��}|dk(r|j"spt5|�D]b\}}|r&�j7||j8|��Ed{���|Ed{���|��|s�?|s�B||r|
n||d
jxs|�|d
<�d|j:r�|j<r�||r|
n||d
jxs|�|d
<|j|t?|j<�dk(r|
n||	��|jA||j��|jA||j��|tt|j<���|dz
}|r��Vyy#t$rU|j�|r?|d
jxs|}	|||	�|d
<|j�|j�Y���wxYw7��y7��r�w)N�)�default�)�    z|   z+-- z`-- ))r/u│   u
├── u
└── )r/u┃   u
┣━━ u
┗━━ )r/u║   u
╠══ u
╚══ �indexrrc����jr�|}n4|jrdn|jrdnd}��jrdn||}�||�S)z.Make a Segment for a level of the guide lines.r�r)�
ascii_only�bold�
underline2�legacy_windows)r0r�line�guide�ASCII_GUIDES�TREE_GUIDES�_Segment�optionss    ����r#�
make_guidez)Tree.__rich_console__.<locals>.make_guide^sS����!�!�#�E�*��"�Z�Z��5�3C�3C�a���"��(>�(>�1�E�J�5�Q���D�%�(�(r%F)r4r5r���r2rc3�4K�|]}|j���y�wr )�cell_length)�.0�levels  r#�	<genexpr>z(Tree.__rich_console__.<locals>.<genexpr>�s����@���%�+�+��s�)�widthr�height)�pad)�
post_style)!�popr(rr7�	get_styler�nullr�range�int�iterr	rr�next�
StopIteration�currentr�render_linesrr�update�	max_width�sumr�justifyr�apply_style�background_stylerr!�len�push)r"�consoler<�stackrHrY�new_linerI�
null_styler�SPACE�CONTINUE�FORK�ENDr=�levels�guide_style_stack�style_stack�remove_guide_styles�depth�
stack_node�lastr)r�prefix�renderable_lines�firstr7r9r:r;s  `                         @@@r#�__rich_console__zTree.__rich_console__Hs������46���i�i���|�|���<�<�>���%�%�	��Z�Z�\�
��� 0� 0�"�=�K���%*�1�X�"��x��s�7��
��
��	)�c�	)�%�	)�G�	)�	)�",�H�k�!B� C���T�)�T�F�#�
$�%�&�y��1A�1A�'B�C�� ��4�:�:�!6�7��#��5�A�������J�	
�!�*�-�
��d�
����'��V�B�Z�-=�-=�-K��L��r�
�+�3�3�i��@P�@P�6Q�Q�K��'�'�)�D�J�J�*?�?�E��$�.�.�Q�a�:�;�F�&�3�3��t�z�z�5�)����!�+�+��@��@�@�A�"�n�n��	���O�O�4�/� 4�	 ���Q�J�4�>�>�#-�.>�#?�K�E�4��#+�#7�#7�"�!�2�2�':�$8�$���
 $�O�O�"�N���%/�%)�E�x����9I�9I�9W�Z�&��r�
�$@��}�}����'�!�E�x����1A�1A�1O�Z���r�
��
�
��c�$�-�-�&8�A�&=�s�4��U��� � ��4�:�:�!6�7�!�&�&�y��1A�1A�'B�C��T�)�D�M�M�2�3�4���
��o��!�
��
�
���"(��*�"2�"2�"@�j�K�!+�D�+�!>�F�2�J�%�)�)�+��O�O�%��
��:��
$�s]�DO�M)�'D*O�O
�	O�O
�
O�'O�*C;O�'O�)AO�O�O�O�
Oc���t|g�g}|j}|j}d}d}tj}d}	|r�|�}
	t|
�}||
�||||j�\}}
|	dz}t||z|�}t|
|z|�}|jr,|jr |t|j��|	dz
}	|r��t||�S#t$r|	dz}	Y��wxYw)Nrrr.)rMrHr(r�getrNrOr�maxrr!)r"rZr<r[rHrY�minimum�maximum�measurerB�	iter_treer�min_measure�max_measure�indents               r#�__rich_measure__zTree.__rich_measure__�s���(,�T�F�|�n���i�i���|�|�������/�/�������I�
��I���
��O�'.�w�����'L�$�K���Q�Y�F��+��.��8�G��+��.��8�G��}�}�����T�$�-�-�(�)���
����7�G�,�,��!�
���
���
�s�C�C+�*C+)rZr
r<rrr
)rZr
r<rrr)�__name__�
__module__�__qualname__�__doc__rr�boolr$rr*rlrw�r%r#rrs����"�!,����#��#��	#�
�#��
#��#��#�
�#�,&*�+/��$)�����	�"�	�
�i�(���
��D�>��
��>_� �_�+;�_�	�_�B-� �-�+;�-�	�-r%r�__main__)�Group)�Markdown)�Panel)�Syntax)�Tabler,�dim)�
row_styles�Released�cyanT)r�no_wrap�Title�magenta)rz
Box Office�right�green)rUrzDec 20, 2019z Star Wars: The Rise of Skywalkerz$952,110,690zMay 25, 2018zSolo: A Star Wars Storyz$393,151,347zDec 15, 2017z!Star Wars Ep. V111: The Last Jediz$1,332,539,889zDec 16, 2016zRogue One: A Star Wars Storyz$1,332,439,889zmclass Segment(NamedTuple):
    text: str = ""
    style: Optional[Style] = None
    is_control: bool = False
�python�monokai)�theme�line_numbersz=### example.md
> Hello, World!
>
> Markdown _all_ the things
u🌲 [b green]Rich Tree)rrz:file_folder: Renderables�red)rz!:file_folder: [bold yellow]Atomiczuu greenu📄 Syntaxu
📄 Markdown)�border_stylez&:file_folder: [bold magenta]Containerszbold magentazJust a panelu📄 Panelsu📄 [b magenta]TableN)4�typingrrrr�_looprr	rZr
rrr
�jupyterrrrr�segmentrrrrr�styledrrrx�pip._vendor.rich.consoler�pip._vendor.rich.markdownr��pip._vendor.rich.panelr��pip._vendor.rich.syntaxr��pip._vendor.rich.tabler��table�
add_column�add_row�code�syntax�markdown�rootr*r)�simple_node�containers_noder�fit�panel�printr}r%r#�<module>r�s���2�2�(�J�J�!� ��/�/��v-�<�v-�r�z��.�2�,�.�,��b�%�[�)�E�	���Z�v�t��<�	���W�I��.�	���\�7�'��B�	�M�M�.�"D�n�U�	�M�M�.�";�^�L�	�M�M�.�"E�GW�X�	�M�M�.�"@�BR�S��D��D�(�)�$�
G�F��	��H��)�T�T�J�D��8�8�/�U�8�C�D��(�(�>�J�(�W�K��O�O�E�-��0�1��O�O�E�/�5���+P�Q�R��h�h�0�n���O� $�O���E�I�I�n�5�9�E�����m�U�3�4�����5�u�=�>��i�G��M�M�$��mr%python3.12/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-312.pyc000064400000010245151732702000022277 0ustar00�

R`i�	���ddlZddlmZmZmZddlmZddlmZddl	m
Z
ddlmZddl
m
Z
ejd	k\rdd
lmZndd
lmZer
ddlmZmZmZedZGd
�de�ZGd�de�Zedk(r�ddlZddlmZddlmZed��Zed�eej<��D�d��ZejAe�e!ejD�dkDrejGejDd�yyy)�N)�
TYPE_CHECKING�Optional�Union�)�JupyterMixin)�Segment)�Style)�EMOJI��_emoji_replace)��)�Literal)�Console�ConsoleOptions�RenderResult)�emoji�textc��eZdZdZy)�NoEmojizNo emoji by that name.N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/emoji.pyrrs�� rrc	��eZdZgd�Zddd�Z		ddedeeefdee	d	dfd
�Z
eded	efd��Zd	efd
�Z
d	efd�Z						dd�Zy)�Emoji)�name�style�_char�variantu︎u️)rrNr r!r#�returnc���||_||_||_	t||_|�0|xj|jj|d�z
c_yy#t
$rt
d|����wxYw)z�A single emoji character.

        Args:
            name (str): Name of emoji.
            style (Union[str, Style], optional): Optional style. Defaults to None.

        Raises:
            NoEmoji: If the emoji doesn't exist.
        zNo emoji called N�)	r r!r#r
r"�KeyErrorr�VARIANTS�get)�selfr r!r#s    r�__init__zEmoji.__init__ sy����	���
����	7��t��D�J����J�J�$�-�-�+�+�G�R�8�8�J����	7��,�T�H�5�6�6�	7�s�A�A0rc��t|�S)z�Replace emoji markup with corresponding unicode characters.

        Args:
            text (str): A string with emojis codes, e.g. "Hello :smiley:!"

        Returns:
            str: A string with emoji codes replaces with actual emoji.
        r)�clsrs  r�replacez
Emoji.replace9s���d�#�#rc�"�d|j�d�S)Nz<emoji �>)r �r*s r�__repr__zEmoji.__repr__Es������
�Q�'�'rc��|jS�N)r"r1s r�__str__z
Emoji.__str__Hs���z�z�rc#�nK�t|j|j|j����y�wr4)rr"�	get_styler!)r*�console�optionss   r�__rich_console__zEmoji.__rich_console__Ks(�����d�j�j�'�"3�"3�D�J�J�"?�@�@�s�35)�noneN)r8rr9rr$r)rrr�	__slots__r(�strrr	r�EmojiVariantr+�classmethodr.r2r5r:rrrrrs���5�I� �8�4�H�
$*�*.�	9��9��S�%�Z� �9��,�'�	9�

�9�2�	$�3�	$�3�	$��	$�(�#�(����A� �A�+;�A�	�Arr�__main__)�Columns)rT)�recordc#�6K�|]}d|vs�d|�d|�����y�w)u‍�:z: Nr)�.0r s  r�	<genexpr>rFZs(����U�(<���PT�@T�1�T�F�"�T�F�	�(<�s�	�
)�column_first)$�sys�typingrrr�jupyterr�segmentrr!r	�_emoji_codesr
r�version_infor�pip._vendor.typing_extensionsr8rrrr>�	Exceptionrrr�pip._vendor.rich.columnsrA�pip._vendor.rich.console�sorted�keys�columns�print�len�argv�	save_htmlrrr�<module>rYs���
�1�1�!����*����v���5��>�>���'��!�i�!�3A�L�3A�l�z���0�0��T�"�G��U��z�u�z�z�|�(<�U���G�
�M�M�'��
�3�8�8�}�q�����#�(�(�1�+�&��rpython3.12/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-312.pyc000064400000067004151732702000022643 0ustar00�

R`i�^���ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZddlmZmZmZmZmZdd	lmZmZdd
lmZer
ddl m!Z!m"Z"m#Z#ed�Z$Gd
�de�Z%eee%ee%ee&e'ffee%e&e&ffZ(e�Gd�de��Z)Gd�d�Z*Gd�d�Z+e,dk(�rddl-m!Z!ddl.m/Z/ddl0m1Z1dZ2e1jfd�Z4e!�Z e jkd�e jmd�e jmd�e jme/e2dd� ��e jm�e jmd!�e7e jqe4��Z9e jme9�e jm�e jmd"�e jme4�e jmd#�y$y$)%�)�IntEnum)�	lru_cache)�filterfalse)�	getLogger)�
attrgetter)
�
TYPE_CHECKING�Dict�Iterable�List�
NamedTuple�Optional�Sequence�Tuple�Type�Union�)�_is_single_cell_widths�cached_cell_len�cell_len�get_character_cell_size�
set_cell_size)�Result�	rich_repr)�Style)�Console�ConsoleOptions�RenderResult�richc�P�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZy)�ControlTypezDNon-printable control codes which typically translate to ANSI codes.r��������	�
���
���N)�__name__�
__module__�__qualname__�__doc__�BELL�CARRIAGE_RETURN�HOME�CLEAR�SHOW_CURSOR�HIDE_CURSOR�ENABLE_ALT_SCREEN�DISABLE_ALT_SCREEN�	CURSOR_UP�CURSOR_DOWN�CURSOR_FORWARD�CURSOR_BACKWARD�CURSOR_MOVE_TO_COLUMN�CURSOR_MOVE_TO�
ERASE_IN_LINE�SET_WINDOW_TITLE����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/segment.pyr r #sY��N��D��O��D�
�E��K��K������I��K��N��O����N��M��rEr c�v�eZdZUdZeed<dZeeed<dZ	ee
eed<ede
fd��Zdefd�Zdefd	�Zedefd
��Zeed�ddd
e
dedfd���Zd
e
dedfd�Zed/d��Ze		d0deddeedeededfd��Ze	d1deddededfd��Zededdeedfd��Ze			d2dedde
deedededeedfd��Ze		d3dedde
deedededf
d��Z ededde
fd��Z!edeeddee
e
ffd ��Z"e			d4deedd!e
d"ee
deed#edeedfd$��Z#e	d1d%e$ddeedd!e
d"e
ded#edeedfd&��Z%e	d1d%e$ddeedd!e
d"e
ded#edeedfd'��Z&e	d1d%e$ddeedd!e
d"e
ded#edeedfd(��Z'ededdedfd)��Z(ededdedfd*��Z)ededdedfd+��Z*ededdedfd,��Z+ededd-ee
deedfd.��Z,y)5�Segmenta�A piece of text with associated style. Segments are produced by the Console render process and
    are ultimately converted in to strings to be written to the terminal.

    Args:
        text (str): A piece of text.
        style (:class:`~rich.style.Style`, optional): An optional style to apply to the text.
        control (Tuple[ControlCode], optional): Optional sequence of control codes.

    Attributes:
        cell_length (int): The cell length of this Segment.
    �textN�style�control�returnc�,�|\}}}|rdSt|�S)zzThe number of terminal cells required to display self.text.

        Returns:
            int: A number of cells.
        r)r)�selfrI�_stylerKs    rF�cell_lengthzSegment.cell_lengthQs!��!%���f�g��q�/��$��/rEc#�K�|j��|j�|j�|j��yy|j��|j��y�w�N)rIrKrJ�rNs rF�
__rich_repr__zSegment.__rich_repr__[sH�����i�i���<�<���z�z�%��j�j� �&��*�*���,�,��s�AAc�,�t|j�S)z#Check if the segment contains text.)�boolrIrSs rF�__bool__zSegment.__bool__ds���D�I�I��rEc��|jduS)z,Check if the segment contains control codes.N)rKrSs rF�
is_controlzSegment.is_controlhs���|�|�4�'�'rEi@�segment�cut)rHrHc��|\}}}t}|j}||k\r||d||�fSt}t||zt	|�dz
z�}	|d|	}
t|
�}||k(r||
||�|||	d||�fS|	t	|�krm||	}|	dz
}	|||�z
}|d|	}
||k(r||
||�|||	d||�fS||kDr#||
d|	dz
dz||�|d||	dz||�fS|	t	|�kr�mt
d��)N�r� zWill never reach here)rHrPr�int�lenr�AssertionError)
�clsrZr[rIrJrK�_SegmentrP�	cell_size�pos�before�cell_pos�chars
             rF�_split_cellszSegment._split_cellsmsi�� '���e�W����)�)���+���H�R���8�8�8�+�	��3��$��T��Q��7�8���d�s����F�#���s�?�����0���c�d��U�G�4��
��C��I�o���9�D��1�H�C��	�$��'�H��$�3�Z�F��3���V�U�G�4��T�#�$�Z���8����#�~��V�I�c�A�g�.��4�e�W�E��S�4���:�-�u�g�>����C��I�o� �4�5�5rEc���|\}}}t|�r=|t|�k\r|td||�fSt|d|||�t||d||�fS|j||�S)a0Split segment in to two segments at the specified column.

        If the cut point falls in the middle of a 2-cell wide character then it is replaced
        by two spaces, to preserve the display width of the parent segment.

        Returns:
            Tuple[Segment, Segment]: Two segments.
        r]N)rr`rHri)rNr[rIrJrKs     rF�split_cellszSegment.split_cells�s{�� $���e�W�!�$�'��c�$�i���W�R���8�8�8���T�c�
�E�7�3���S�T�
�E�7�3��
�
� � ��s�+�+rEc��|d�S)zMake a new line segment.�
rD)rbs rF�linezSegment.line�s���4�y�rE�segments�
post_stylec�`����|}|r|j���fd�|D�}�r��fd�|D�}|S)aApply style(s) to an iterable of segments.

        Returns an iterable of segments where the style is replaced by ``style + segment.style + post_style``.

        Args:
            segments (Iterable[Segment]): Segments to process.
            style (Style, optional): Base style. Defaults to None.
            post_style (Style, optional): Style to apply on top of segment style. Defaults to None.

        Returns:
            Iterable[Segments]: A new iterable of segments (possibly the same iterable).
        c3�N�K�|]\}}}�||rdn�|�|����y�wrRrD)�.0rIrOrK�applyrbs    ��rF�	<genexpr>z&Segment.apply_style.<locals>.<genexpr>�s1������-<�)�D�&�'��D�'�$�u�V�}�g�F�-<�s�"%c3�P�K�|]\}}}�||rdn|r|�zn�|����y�wrRrD)rsrIrOrKrbrps    ��rFruz&Segment.apply_style.<locals>.<genexpr>�sE������.=�)�D�&�'���#��5;�f�z�1����.=�s�#&)�__add__)rbrorJrp�result_segmentsrts`  ` @rF�apply_stylezSegment.apply_style�sC���&#����M�M�E��-<��O���.=��O��rErYc�Z�|rttd�|�Sttd�|�S)a2Filter segments by ``is_control`` attribute.

        Args:
            segments (Iterable[Segment]): An iterable of Segment instances.
            is_control (bool, optional): is_control flag to match in search.

        Returns:
            Iterable[Segment]: And iterable of Segment instances.

        rK)�filterrr)rbrorYs   rF�filter_controlzSegment.filter_control�s+����*�Y�/��:�:��z�)�4�h�?�?rEc#�K�g}|j}|D]k}d|jvrS|jsG|\}}}|s�&|jd�\}}	}|r||||��|	r|��g}|j}|r�=�d||��m|r|��yy�w)aSplit a sequence of segments in to a list of lines.

        Args:
            segments (Iterable[Segment]): Segments potentially containing line feeds.

        Yields:
            Iterable[List[Segment]]: Iterable of segment lists, one per line.
        rmN)�appendrIrK�	partition)
rbrornr~rZrIrJ�_�_text�new_lines
          rF�split_lineszSegment.split_lines�s�����!�������G��w�|�|�#�G�O�O�!(���e�Q��,0�N�N�4�,@�)�E�8�T���s�5�%�0�1��"�
�!��!%������w�� ���J��s�6B	�<B	�6B	�length�pad�include_new_linesc#�K�g}|j}|j}|d�}	|D]�}
d|
jvrt|
jsh|
\}}}
|s�&|j	d�\}}}|r||||��|r3|||||��}|r|j|	�|��|j�|r�^��||
���|r|||||����yy�w)a�Split segments in to lines, and crop lines greater than a given length.

        Args:
            segments (Iterable[Segment]): An iterable of segments, probably
                generated from console.render.
            length (int): Desired line length.
            style (Style, optional): Style to use for any padding.
            pad (bool): Enable padding of lines that are less than `length`.

        Returns:
            Iterable[List[Segment]]: An iterable of lines of segments.
        rm)rJr�N)r~�adjust_line_lengthrIrKr�clear)rbror�rJr�r�rnr~r��new_line_segmentrZrI�
segment_styler�r�r��cropped_lines                 rF�split_and_crop_lineszSegment.split_and_crop_lines	s�����*!������ �3�3���t�9���G��w�|�|�#�G�O�O�)0�&��m�Q��,0�N�N�4�,@�)�E�8�T���s�5�-�8�9��'9� �&��3�(��-�(�/�/�0@�A�*�*��
�
����w��! �"�$�T�6��C�H�H��s�A
C�
AC�+Crnc�^�td�|D��}||kr|r||d||z
z|�gz}|S|dd}|S||kDrmg}|j}d}|D]V}|j}	||	z|ks|jr||�||	z
}�1|\}
}}t	|
||z
�}
|||
|��|S|S|dd}|S)aAdjust a line to a given width (cropping or padding as required).

        Args:
            segments (Iterable[Segment]): A list of segments in a single line.
            length (int): The desired width of the line.
            style (Style, optional): The style of padding if used (space on the end). Defaults to None.
            pad (bool, optional): Pad lines with spaces if they are shorter than `length`. Defaults to True.

        Returns:
            List[Segment]: A line of segments with the desired length.
        c3�4K�|]}|j���y�wrR)rP)rsrZs  rFruz-Segment.adjust_line_length.<locals>.<genexpr>Ks����B�T�'�'�-�-�T�s�r^Nr)�sumr~rPrKr)
rbrnr�rJr��line_lengthr�r~rZ�segment_lengthrIr�r�s
             rFr�zSegment.adjust_line_length8s���&�B�T�B�B�������3�s�f�{�.B�'C�U�#K�"L�L��&��# ��7��"��!�6�
!��H��_�_�F��K���!(�!4�!4����/�&�8�G�O�O��7�O��>�1�K�-4�*�D�-��(��v��/C�D�D��3�t�]�3�4���� ����A�w�H��rEc�8��t�t�fd�|D��S)z�Get the length of list of segments.

        Args:
            line (List[Segment]): A line encoded as a list of Segments (assumes no '\\n' characters),

        Returns:
            int: The length of the line.
        c3�<�K�|]\}}}|r�
�|����y�wrRrD)rsrIrJrK�	_cell_lens    �rFruz*Segment.get_line_length.<locals>.<genexpr>ps�����S�t�';�t�U�G�7�9�T�?�t�s��
)rr�)rbrnr�s  @rF�get_line_lengthzSegment.get_line_lengthes����	��S�t�S�S�SrE�linesc�f��|j�|rt�fd�|D��nd}|t|�fS)z�Get the shape (enclosing rectangle) of a list of lines.

        Args:
            lines (List[List[Segment]]): A list of lines (no '\\n' characters).

        Returns:
            Tuple[int, int]: Width and height in characters.
        c3�.�K�|]}�|����y�wrRrD)rsrnr�s  �rFruz$Segment.get_shape.<locals>.<genexpr>}s�����@�%�$���-�%�s�r)r��maxr`)rbr��	max_widthr�s   @rF�	get_shapezSegment.get_shapers3����-�-��DI�C�@�%�@�@�q�	��3�u�:�&�&rE�width�height�	new_linesc�$�|xst|�}|r|d|zdz|�gn|d|z|�g}|j}|d|}	|D�
cgc]
}
||
||����c}
|	ddt|	�|kr!|	j|g|t|	�z
z�|	Scc}
w)a�Set the shape of a list of lines (enclosing rectangle).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style, optional): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "
". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        r^rmN)rJ)r`r��extend)rbr�r�r�rJr��_height�blankr��shaped_linesrns           rF�	set_shapezSegment.set_shape�s���*�&�C��J��1:�S��u��t�#�U�
+�,��C�%�K�QV�@W�?X�	�!�3�3���X�g���EJ�
�EJ�T��t�U�%�8�U�
��Q���|��w�&������7�S��5F�+F� G�H����
s�B
rbc��|t|�z
}|s|ddS|d|}|r|d|zdz|�n|d|z|�}||gg|zz}|S)a�Aligns lines to top (adds extra lines to bottom as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "
". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        Nr^rm�r`�rbr�r�r�rJr��extra_linesr�s        rF�	align_topzSegment.align_top�sf��*�s�5�z�)�����8�O��g�v���2;��C�%�K�$�&��.��S�5�[�RW�AX���%��	�K�/�/���rEc��|t|�z
}|s|ddS|d|}|r|d|zdz|�n|d|z|�}|gg|z|z}|S)a�Aligns render to bottom (adds extra lines above as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added. Defaults to None.
            new_lines (bool, optional): Padded lines should include "
". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        Nr^rmr�r�s        rF�align_bottomzSegment.align_bottom�sf��*�s�5�z�)�����8�O��g�v���2;��C�%�K�$�&��.��S�5�[�RW�AX����	�K�'�%�/���rEc��|t|�z
}|s|ddS|d|}|r|d|zdz|�n|d|z|�}|dz}||z
}	|gg|z|z|gg|	zz}|S)a�Aligns lines to middle (adds extra lines to above and below as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "
". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        Nr^rmr!r�)
rbr�r�r�rJr�r�r��	top_lines�bottom_liness
          rF�align_middlezSegment.align_middle�s���*�s�5�z�)�����8�O��g�v���2;��C�%�K�$�&��.��S�5�[�RW�AX���1�$�	�"�Y�.����	�I�%��-�%��	�L�0H�H���rEc#�&K�t|�}	t|�}t}|D]X}|j|jk(r7|j
s+||j|jz|j�}�S|��|}�Z|��y#t$rYywxYw�w)a)Simplify an iterable of segments by combining contiguous segments with the same style.

        Args:
            segments (Iterable[Segment]): An iterable of segments.

        Returns:
            Iterable[Segment]: A possibly smaller iterable of segments that will render the same way.
        N)�iter�next�
StopIterationrHrJrKrI)rbro�
iter_segments�last_segmentrcrZs      rF�simplifyzSegment.simplify�s������X��
�	��
�.�L���$�G��!�!�W�]�]�2�7�?�?�'� �%�%����4�l�6H�6H� ��#�"�&��%�����	��	�s(�B�B�A(B�	B�B�
B�Bc#�K�|D]C}|js|j�|��� |\}}}|||r|jd�nd����Ey�w)z�Remove all links from an iterable of styles.

        Args:
            segments (Iterable[Segment]): An iterable segments.

        Yields:
            Segment: Segments with link removed.
        N)rKrJ�update_link)rbrorZrIrJ�_controls      rF�strip_linkszSegment.strip_linkssO���� �G����'�-�-�"7��
�(/�%��e�X��$�5�� 1� 1�$� 7�d�K�K� �s�A
Ac#�:K�|D]\}}}||d|����y�w)z�Remove all styles from an iterable of segments.

        Args:
            segments (Iterable[Segment]): An iterable segments.

        Yields:
            Segment: Segments with styles replace with None
        NrD)rbrorIrOrKs     rF�strip_styleszSegment.strip_styles)s(����&.�!�D�&�'��d�D�'�*�*�&.�s�c#�K�i}|D]E\}}}|r1|j|�}|�|j}|||<||||����:||d|����Gy�w)z�Remove all color from an iterable of segments.

        Args:
            segments (Iterable[Segment]): An iterable segments.

        Yields:
            Segment: Segments with colorless style.
        N)�get�
without_color)rbro�cacherIrJrK�colorless_styles       rF�remove_colorzSegment.remove_color6sg����%'��$,� �D�%���"'�)�)�E�"2��"�*�&+�&9�&9�O�#2�E�%�L��$���9�9��$��g�.�.�%-�s�AA�cutsc#�XK�g}|j}t|�}	t|d�}|dk(rgS|dk7rng���d}|j}|j}	t
}
|D]�}|\}}
}|s�|r|n
||
|�z}||kr||�|}�+||k(r9||�|	���|�|}t|d�}|dk(r
|r	|	���y�i|j
||z
�\}}|\}}
}||�|	���|�|}t|d�}|dk(r
|r	|	���y|r����|	���y�w)z�Divides an iterable of segments in to portions.

        Args:
            cuts (Iterable[int]): Cell positions where to divide.

        Yields:
            [Iterable[List[Segment]]]: An iterable of Segments in List.
        ���rN)r~r�r�r��copyrrk)rbror��split_segments�add_segment�	iter_cutsr[re�segments_clear�
segments_copyr�rZrIrOrK�end_posrfs                 rF�dividezSegment.divideLsm����+-��$�+�+����J�	���y�"�%�C��b�y��	��a�x���H�
���'�-�-��&�+�+�
�#�	��G�$+�!�D�&�'��!(�#�c�I�d�O�.C���S�=���(�!�C���c�>���(�'�/�)�"�$�!�C��y�"�-�C��b�y�)�"/�/�1���'.�&9�&9�#��)�&D�O�F�G�,3�)�D�&�'���'�'�/�)�"�$��C��9�b�)���"�9�%�+�o�-��C� �J�o��s�A&D*�)B4D*�D*)rLrH)NN�F)NTT)NT)NNF)-r0r1r2r3�str�__annotations__rJr
rrKr�ControlCode�propertyr_rPrrTrVrWrY�classmethodrrrirkrnr
ryr|rr�r�r�r�r�r�rr�r�r�r�r�r�r�r�rDrErFrHrH?s���
��I�!�E�8�E�?�!�/3�G�X�h�{�+�
,�3�
�0�S�0��0��v���$���(�D�(��(���y��$6�9�$6�3�$6�5�AU�;V�$6���$6�L,�s�,�u�-A�'B�,�,�����"&�&*�	&��9�%�&����&��U�O�	&�

�)�	�&��&�P�?D�@��	�*�@�8<�@�	�)�	�@��@�$��8�I�#6��8�D��O�;T����8�
"&��"&�
,I��9�%�,I��,I����	,I�
�,I� �
,I�
�$�y�/�	"�,I��,I�\�
"&��*��9�o�*��*����	*�
�*�
�i��
*��*�X�
T�4�	�?�
T�s�
T��
T��'�d�4�	�?�3�'��c�3�h��'��'��
!%�!%��
!��D��O�$�!��!���
�	!�
���!��
!�
�d�9�o�	�!��!�F� �
�
�)�_���D��O�$�����	�
���
�
�d�9�o�	����8� �
�
�)�_���D��O�$�����	�
���
�
�d�9�o�	����8� �
�
�)�_���D��O�$�����	�
���
�
�d�9�o�	����<���� 3����8K����4�L�8�I�#6�L�8�I�;N�L��L� �
+�H�Y�$7�
+�H�Y�<O�
+��
+��/�H�Y�$7�/�H�Y�<O�/��/�*�B��	�*�B�2:�3�-�B�	�$�y�/�	"�B��BrErHc�@�eZdZdZddeededdfd�Z						d	d�Zy)
�Segmentsa=A simple renderable to render an iterable of segments. This class may be useful if
    you want to print segments outside of a __rich_console__ method.

    Args:
        segments (Iterable[Segment]): An iterable of segments.
        new_lines (bool, optional): Add new lines between segments. Defaults to False.
    ror�rLNc�2�t|�|_||_yrR)�listror�)rNror�s   rF�__init__zSegments.__init__�s���X���
�"��rEc#�K�|jr.tj�}|jD]
}|��|���y|jEd{���y7��wrR)r�rHrnro)rN�console�optionsrnrZs     rF�__rich_console__zSegments.__rich_console__�sA�����>�>��<�<�>�D��=�=���
��
�)��}�}�$�$�s�A
A�A�
Ar��r�rr�rrLr)	r0r1r2r3r
rHrVr�r�rDrErFr�r��sD���#��'�!2�#�t�#�PT�#�	%� �	%�+;�	%�	�	%rEr�c�B�eZdZddeeededdfd�Z						dd�Zy)	�SegmentLinesr�r�rLNc�2�t|�|_||_y)a=A simple renderable containing a number of lines of segments. May be used as an intermediate
        in rendering process.

        Args:
            lines (Iterable[List[Segment]]): Lists of segments forming lines.
            new_lines (bool, optional): Insert new lines after each line. Defaults to False.
        N)r�r�r�)rNr�r�s   rFr�zSegmentLines.__init__�s���%�[��
�"��rEc#��K�|jr4tj�}|jD]}|Ed{���|���y|jD]}|Ed{����y7�'7�	�wrR)r�rHrnr�)rNr�r�r�rns     rFr�zSegmentLines.__rich_console__�sV�����>�>��|�|�~�H��
�
�������#��
�
�����#� �� �s!�5A#�A�A#�A!�A#�!A#r�r�)	r0r1r2r
rrHrVr�r�rDrErFr�r��sC��	#�h�t�G�}�5�	#�$�	#�SW�	#�
 � �
 �+;�
 �	�
 rEr��__main__)r)�Syntax)�Textz�from rich.console import Console
console = Console()
text = Text.from_markup("Hello, [bold magenta]World[/]!")
console.print(text)zHello, [bold magenta]World[/]!zrich.Segmentz]A Segment is the last step in the Rich render process before generating text with ANSI codes.z
Consider the following code:
�pythonT)�line_numberszRWhen you call [b]print()[/b], Rich [i]renders[/i] the object in to the following:
zAThe Segments are then processed to produce the following output:
zS
You will only need to know this if you are implementing your own Rich renderables.N):�enumr�	functoolsr�	itertoolsr�loggingr�operatorr�typingrr	r
rrr
rrrr�cellsrrrrr�reprrrrJrr�rrr�logr r_r�r�rHr�r�r0�pip._vendor.rich.console�pip._vendor.rich.syntaxr��pip._vendor.rich.textr��code�from_markuprI�rule�printr��render�	fragmentsrDrErF�<module>r�s�����!��������$���>�>������'��*�	�+��	�+�u�S�#�X��
&�'�	�+�s�C�
� �"�����O	�j�O	�
�O	�d%�%�2 � �2�z��0�.�*��D�
�4���<�=�D��i�G��L�L�� ��M�M�g���M�M�4�5��M�M�&��x�d�;�<��M�M�O��M�M�]���W�^�^�D�)�*�I��M�M�)���M�M�O��M�M�V�W��M�M�$���M�M�^��;rEpython3.12/site-packages/pip/_vendor/rich/__pycache__/table.cpython-312.pyc000064400000125104151732702010022265 0ustar00�

R`i���X�ddlmZmZmZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZmZddlmZmZddlmZddlmZmZddlmZdd	lmZdd
lmZddlm Z m!Z!ddl"m#Z#dd
l$m%Z%ddl&m'Z'm(Z(ddl)m*Z*m+Z+erddl,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2eGd�d��Z3eGd�d��Z4Gd�de	�Z5Gd�de�Z6e7dk(�r�ddl8m-Z-ddl9m:Z:ddl;m6Z6ddl<m=Z=e=d�5e6dd d!�"�Z>e>jd#d$d%d&�'�e>jd(d)�*�e>jd+d!d,�-�e>j�d.d/d0�e>j�d1d2d3�e>j�d4d5d6d7d&�8�e>j�d9d:d;�d<eAd=d>fd?�ZBe-�Z,e:�ZCeBd@�e,j�e>dA�B�d&e>_EeBdC�e,j�e>�dDe>_FeBdE�e,j�e>dA�B�d>e>_FdFe>_EdGdHge>_GeBdI�e,j�e>dA�B�d>e>_FdFe>_EdGdHge>_Gde>_HeBdJ�e,j�e>dA�B�d>e>_FdFe>_EdGdHge>_Gd&e>_Ide>_HeBdK�e,j�e>dA�B�d>d>d>�y>y>#1swYy>xYw)L�)�	dataclass�field�replace)	�
TYPE_CHECKING�Dict�Iterable�List�
NamedTuple�Optional�Sequence�Tuple�Union�)�box�errors)�loop_first_last�	loop_last)�	pick_bool)�ratio_distribute�ratio_reduce)�VerticalAlignMethod)�JupyterMixin)�Measurement)�Padding�PaddingDimensions)�
is_renderable)�Segment)�Style�	StyleType)�Text�TextType)�Console�ConsoleOptions�
JustifyMethod�OverflowMethod�RenderableType�RenderResultc�f�eZdZUdZdZded<	dZded<	dZeed<	dZ	eed<	dZ
eed<	d	Zd
ed<	dZd
ed<	dZ
ded<	dZeeed<	dZeeed<	dZeeed<	dZeeed<	dZeed<	dZeed<	ee��Zeded<d!d�Zededfd��Zedefd ��Zy)"�Columna�
Defines a column within a ~Table.

    Args:
        title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
        caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
        width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
        min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
        box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
        safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
        padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
        collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
        pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
        expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
        show_header (bool, optional): Show a header row. Defaults to True.
        show_footer (bool, optional): Show a footer row. Defaults to False.
        show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
        show_lines (bool, optional): Draw lines between every row. Defaults to False.
        leading (bool, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
        style (Union[str, Style], optional): Default style for the table. Defaults to "none".
        row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
        header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
        footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
        border_style (Union[str, Style], optional): Style of the border. Defaults to None.
        title_style (Union[str, Style], optional): Style of the title. Defaults to None.
        caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
        title_justify (str, optional): Justify method for title. Defaults to "center".
        caption_justify (str, optional): Justify method for caption. Defaults to "center".
        highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
    �r&�header�footer�header_style�footer_style�style�leftr$�justify�topr�vertical�ellipsisr%�overflowN�width�	min_width�	max_width�ratioF�no_wrapr�_index)�default_factory�_cells�returnc��t|g��S)zReturn a copy of this Column.�r=)r��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/table.py�copyzColumn.copyrs���t�B�'�'�c#�8K�|jEd{���y7��w)z2Get all cells in the column, not including header.Nr@rAs rC�cellszColumn.cellsvs�����;�;���s���c��|jduS)z!Check if this column is flexible.N)r9rAs rC�flexiblezColumn.flexible{s���z�z��%�%rE)r>r)) �__name__�
__module__�__qualname__�__doc__r+�__annotations__r,r-rr.r/r1r3r5r6r�intr7r8r9r:�boolr;r�listr=r	rD�propertyrrGrI�rErCr)r)&s(���< "�F��!�H�!�F��!�H� �L�)� �-� �L�)� �-��E�9��-�%�G�_�%�[�&+�H�#�+�M�!+�H��+���E�8�C�=��\�#�I�x��}�#�_�#�I�x��}�#�_��E�8�C�=��w��G�T��R��F�C�O��%*�4�%@�F�D�!�"�@�(���x� 0�1�����&�$�&��&rEr)c�6�eZdZUdZdZeeed<	dZe	ed<y)�RowzInformation regarding a row.Nr/F�end_section)
rJrKrLrMr/rrrNrVrPrSrErCrUrU�s$��&�!%�E�8�I��%� ��K���LrErUc�4�eZdZUdZeed<	ded<	eed<y)�_CellzA single cell in a table.r/r&�
renderabler3N)rJrKrLrMrrNrrSrErCrXrX�s ��#���!� � ��!�!�"rErXc7�
�eZdZUdZeeed<eeed<ddddejddddddddddd	dd
dddddddd
�de
eefdee
dee
deedeedeejdeedededededededededededeeed eed!eed"eed#eed$eed%d&d'd&d(ed)df6d*�Zeddddd+�de
eefdedededed)dfd,��Zed)efd-��Zej2ded)dfd.��Zed)efd/��Zed)efd0��Zd1d2d3ed)efd4�Zd1d2d5d6d)efd7�Zed)eeeeeffd8��Z e j2ded)dfd9��Z 		d[dddd:d;d<dddddd=�d>d?d@d?d eed!eedeedAd&dBdCdDdEdeedeedFeedGeedHed)dfdI�Z!dddJ�dKed?deedLed)dfdM�Z"d\dN�Z#						d]dP�Z$d1d2d5d6d)eefdQ�Z%edReedSeedFed)eefdT��Z&d1d2dUedVed)ee'fdW�Z(dUed)efdX�Z)d1d2d5d6dVed)efdY�Z*d1d2d5d6dReed)dOfdZ�Z+y)^�TableaA console renderable to draw a table.

    Args:
        *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
        title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
        caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
        width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
        min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
        box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
        safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
        padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
        collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
        pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
        expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
        show_header (bool, optional): Show a header row. Defaults to True.
        show_footer (bool, optional): Show a footer row. Defaults to False.
        show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
        show_lines (bool, optional): Draw lines between every row. Defaults to False.
        leading (bool, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
        style (Union[str, Style], optional): Default style for the table. Defaults to "none".
        row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
        header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
        footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
        border_style (Union[str, Style], optional): Style of the border. Defaults to None.
        title_style (Union[str, Style], optional): Style of the title. Defaults to None.
        caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
        title_justify (str, optional): Justify method for title. Defaults to "center".
        caption_justify (str, optional): Justify method for caption. Defaults to "center".
        highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
    �columns�rowsN)rrFTr�noneztable.headerztable.footer�center)�title�captionr6r7r�safe_box�padding�collapse_padding�pad_edge�expand�show_header�show_footer�	show_edge�
show_lines�leadingr/�
row_stylesr-r.�border_style�title_style�
caption_style�
title_justify�caption_justify�	highlight�headersr`rar6r7rrbrcrdrerfrgrhrirjrkr/rlr-r.rmrnrorpr$rqrrr>c��g|_g|_||_||_||_||_||_||_tj|�|_
|	|_|
|_||_
||_|
|_||_||_||_||_|xsd|_|xsd|_||_||_||_||_||_||_t9|xsg�|_|jj<}|D]G}t?|t@�r|jC|���&tE|j�|_#||��Iy)Nr*)r+)$r\r]r`rar6r7rrbr�unpack�_paddingre�_expandrgrhrirjrkrdr/r-r.rmrnrorprqrrrQrl�append�
isinstance�str�
add_column�lenr;)rBr`rar6r7rrbrcrdrerfrgrhrirjrkr/rlr-r.rmrnrorprqrrrs�
append_columnr+s                             rC�__init__zTable.__init__�s1��<&(���!��	���
������
�"������ ��
����w�/��
� ��
����&���&���"���$������ 0�����
�(�.�B���(�.�B���(���&���*���.;���0?���"���/3�J�4D�"�/E������+�+�
��F��&�#�&����v��.� #�D�L�L� 1��
��f�%�rE)rcrdrerfc� �||d||ddd||d��S)a�Get a table with no lines, headers, or footer.

        Args:
            *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
            padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0.
            collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to True.
            pad_edge (bool, optional): Enable padding around edges of table. Defaults to False.
            expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.

        Returns:
            Table: A table instance.
        NF)rrcrdrgrhrirerfrS)�clsrcrdrerfrss      rC�gridz
Table.grid�s,��*�
���-������

�
	
rEc�:�|jxs|jduS)z-Setting a non-None self.width implies expand.N)rwr6rAs rCrfzTable.expands���|�|�5�t�z�z��5�5rEc��||_y)zSet expand.N)rw)rBrfs  rCrfzTable.expand!s����rEc��d}|jr|jr|dz
}|jr|t|j�dz
z
}|S)z'Get extra width to add to cell content.r�r)rrir|r\)rBr6s  rC�_extra_widthzTable._extra_width&sC�����8�8�����Q�J�E��8�8��S����&��*�*�E��rEc�,�t|j�S)zGet the current number of rows.)r|r]rAs rC�	row_countzTable.row_count0s���4�9�9�~�rE�consoler"�indexc��tj�}|jr7||j|j|t	|j�z�z
}|j
|j}|�||j|�z
}|S)zGet the current row style.)r�nullrl�	get_styler|r]r/)rBr�r�r/�	row_styles     rC�
get_row_stylezTable.get_row_style5st���
�
����?�?��W�&�&�t���u�s�4�?�?�?S�7S�'T�U�U�E��I�I�e�$�*�*�	�� ��W�&�&�y�1�1�E��rE�optionsr#c	�6�|j}|j�|j}|dkrtdd�S|j}t	|j||j
||z
���}|j}|jD�cgc]}|||j
|�|���}}t	d�|D��|z}|j�t	d�|D��|zn|j}	t||	�}
|
j|j�}
|
Scc}w)Nrc3�4K�|]}|j���y�w�N)�minimum��.0�measurements  rC�	<genexpr>z)Table.__rich_measure__.<locals>.<genexpr>U�����D�|���#�#�|���c3�4K�|]}|j���y�wr�)�maximumr�s  rCr�z)Table.__rich_measure__.<locals>.<genexpr>Xr�r�)r8r6rr��sum�_calculate_column_widths�update_width�_measure_columnr\�clampr7)rBr�r�r8�extra_widthr��column�measurements�
minimum_width�
maximum_widthr�s           rC�__rich_measure__zTable.__rich_measure__?s)���%�%�	��:�:�!��
�
�I��q�=��q�!�$�$��'�'����)�)���-�-�i�+�.E�F�
�
�	�
�.�.���,�,�
�&��
�G�W�%9�%9�)�%D�f�M�&�	�
�

�D�|�D�D�{�R�	�
�
�
�"�
�D�|�D�D�{�R����	�
"�-��?��!�'�'����7�����
s�	 Dc��|jS)zGet cell padding.)rvrAs rCrcz
Table.padding`s���}�}�rEc�:�tj|�|_|S)zSet cell padding.)rrurv)rBrcs  rCrcz
Table.paddinges�� ���w�/��
��rEr0r2r4)r-r.r/r1r3r5r6r7r8r9r:r+r&r,r1r3rr5r%r8r9r:c��tt|j�|||xsd|xsd|xsd||||	|
|||
��}|jj|�y)a�Add a column to the table.

        Args:
            header (RenderableType, optional): Text or renderable for the header.
                Defaults to "".
            footer (RenderableType, optional): Text or renderable for the footer.
                Defaults to "".
            header_style (Union[str, Style], optional): Style for the header, or None for default. Defaults to None.
            footer_style (Union[str, Style], optional): Style for the footer, or None for default. Defaults to None.
            style (Union[str, Style], optional): Style for the column cells, or None for default. Defaults to None.
            justify (JustifyMethod, optional): Alignment for cells. Defaults to "left".
            vertical (VerticalAlignMethod, optional): Vertical alignment, one of "top", "middle", or "bottom". Defaults to "top".
            overflow (OverflowMethod): Overflow method: "crop", "fold", "ellipsis". Defaults to "ellipsis".
            width (int, optional): Desired width of column in characters, or None to fit to contents. Defaults to None.
            min_width (Optional[int], optional): Minimum width of column, or ``None`` for no minimum. Defaults to None.
            max_width (Optional[int], optional): Maximum width of column, or ``None`` for no maximum. Defaults to None.
            ratio (int, optional): Flexible ratio for the column (requires ``Table.expand`` or ``Table.width``). Defaults to None.
            no_wrap (bool, optional): Set to ``True`` to disable wrapping of this column.
        r*)r;r+r,r-r.r/r1r3r5r6r7r8r9r:N)r)r|r\rx)rBr+r,r-r.r/r1r3r5r6r7r8r9r:r�s               rCr{zTable.add_columnksd��J��t�|�|�$���%�+��%�+���+�2���������
�� 	
�����F�#rE�r/rV�renderablesrVc��dtddddfd�}t|�}|j}t|�t|�krg|�dgt|�t|�z
z�}t	|�D]�\}}|t|�k(rKt|��}	|j
D]}
||	t
d���|jj|	�n||}	|�
||	d��pt|�r
||	|���tjd	t|�j�d
���|j
jt||���y)a�Add a row of renderables.

        Args:
            *renderables (None or renderable): Each cell in a row must be a renderable object (including str),
                or ``None`` for a blank cell.
            style (StyleType, optional): An optional style to apply to the entire row. Defaults to None.
            end_section (bool, optional): End a section and draw a line. Defaults to False.

        Raises:
            errors.NotRenderableError: If you add something that can't be rendered.
        r�rYr&r>Nc�:�|jj|�yr�)r=rx)r�rYs  rC�add_cellzTable.add_row.<locals>.add_cell�s���M�M� � ��,rE)r;r*zunable to render z1; a string or other renderable object is requiredr�)r)rQr\r|�	enumerater]r rxrr�NotRenderableError�typerJrU)rBr/rVr�r��cell_renderablesr\r�rYr��_s           rC�add_rowz
Table.add_row�sA��$	-�V�	-�1A�	-�d�	-�>B�+�=N���,�,���� �3�w�<�/� �!� ���3�w�<�#�.>�*?�?�@� ��"+�+;�!<��E�:���G��$��u�-�����A��V�T�"�X�.�#����#�#�F�+� �����!����$��z�*����,��/�/�'��Z�(8�(A�(A�'B�Bs�t���"=� 	
�	�	����5�k�B�CrEc�F�|jrd|jd_yy)z2Add a new section (draw a line after current row).T���N)r]rVrAs rC�add_sectionzTable.add_section�s ���9�9�(,�D�I�I�b�M�%�rEr'c	#���K�|jstd���y|j}|j�|j}|j}|j�|j
||z
��}t|�|z}|j||jd���	d
dtdtddddf��fd	�
}|jrE||jtj|jd
�|j ��Ed{���|j#��|�Ed{���|j$rF||j$tj|j&d�|j(��Ed{���yy7�r7�Y7�
�w)N�
)r6rr�height�textr/r1r$r>r'c���t|t�r�j||d��n|}�j|�j	|����S)NF)r/rr�r1)r�)ryrz�
render_str�render�update)r�r/r1�render_textr��render_optionss    ��rC�render_annotationz1Table.__rich_console__.<locals>.render_annotation�sY���
�d�C�(��"�"�4�u��"�F��
�
�>�>��^�%:�%:�7�%:�%K�"��
rEztable.title)r/r1z
table.caption)r_)r\rr8r6r�r�r�r�r�rrr!rr`r�
pick_firstrnrp�_renderrarorq)	rBr�r�r8r��widths�table_widthr�r�s	 `      @rC�__rich_console__zTable.__rich_console__�st������|�|��$�-����%�%�	��:�:�!��
�
�I��'�'���.�.��W�)�)�)�k�*A�B�
���&�k�K�/�� ��������(�
��
JR�
	��
	�#,�
	�7F�
	�
�
	��:�:�(��
�
��&�&�t�'7�'7��G��*�*��
�
�
�<�<����@�@�@��<�<�(�����&�&�t�'9�'9�?�K��,�,��
�
��

��
	A��
�s7�DE=�E7�E=�E9� AE=�0E;�1E=�9E=�;E=c
�,�|j}|j}|D�cgc]}|j|||���}}|D�cgc]}|jxsd��}}|j}	|j
}
|j�r|D�cgc]}|js�|jxsd��!}}t|�r�t||�D��cgc]\}}|jrdn|j��!}
}}|D�cgc]1}|jr#|jxsd|	|j�z��3}}|t|
�z
}t|||�}t|�}t!|�D]&\}}|js�|
|t#|�z||<�(t|�}||kDr�|j%||D�cgc]}|jduxr
|j&��!c}|�}t|�}||kDr+||z
}t)|dgt+|�z||�}t|�}t||�D��cgc]'\}}|j||j-|�|���)}}}|D�cgc]}|jxsd��}}||kr|js|j.�i||j.|
z
krW|j.�|nt1|j.|
z
|�}t||z
|�}t||�D��cgc]
\}}||z��}}}|Scc}wcc}wcc}wcc}}wcc}wcc}wcc}}wcc}wcc}}w)zNCalculate the widths of each column, including padding, not including borders.rrN)r8r\r�r��_get_padding_widthr�rfrIr9�any�zipr6r;r�r�iterr��next�_collapse_widthsr:rr|r�r7�min)rBr�r�r8r\r��width_ranges�_ranger��get_padding_widthr��col�ratios�fixed_widths�flex_minimum�flexible_width�flex_widths�iter_flex_widthsr�r��excess_widthr6�
_max_width�
pad_widths�_width�pads                          rCr�zTable._calculate_column_widthssH���%�%�	��,�,��IP�
�IP�v�D� � ��'�6�:��	�
�5A�A�L�&�&�.�.�%�A�%�L��A� �3�3���'�'���;�;�07�H���3�<�<�c�i�i�n�1�n��F�H��6�{�+.�l�G�*D� �*D���� ���A�f�n�n�<�*D�� �#*� �")������\�\�&�Q�*;�F�M�M�*J�J�")�� �
"+�S��->�!>��.�~�v�|�T��#'��#4� �%.�w�%7�M�E�6����(4�U�(;�d�CS�>T�(T��u�
�&8��&�k����"��*�*��MT�U�W�6�&�,�,�$�&�=�v�~�~�+=�=�W�U���F�
�f�+�K��Y�&�*�Y�6��%�l�Q�C�#�f�+�4E�v�v�V��!�&�k��&)���%9��%9�M�E�6��$�$�W�g�.B�.B�5�.I�6�R�%9�
��9E�E��f�f�n�n�)��)��F�E��)�#�����N�N�&�;�$�.�.�;�:V�+W��>�>�)������+�5�y�A�
�
*�*�{�*B�F�K�J�69�&�*�6M�N�6M�{�v�s�f�s�l�6M�F�N��
��q
��B��I�� �� �� V����F��Os:�K&�K+�?K0�K0�?$K5�*6K;�$L
�,L�L�Lr��wrapablec����t|�}||z
}t|�r�|r�|dkDr�td�t||�D���t�fd�t||�D��}�|z
}t||�D��	cgc]\}}	|�k(r|	rdnd��}
}}	t|
�r|s	|St	||�gt|�z}t
||
||�}t|�}||z
}|r|dkDr��|Scc}	}w)aMReduce widths so that the total is under max_width.

        Args:
            widths (List[int]): List of widths.
            wrapable (List[bool]): List of booleans that indicate if a column may shrink.
            max_width (int): Maximum width to reduce to.

        Returns:
            List[int]: A new list of widths.
        rc3�,K�|]\}}|s�	|���y�wr�rS)r�r6�
allow_wraps   rCr�z)Table._collapse_widths.<locals>.<genexpr>Ys����!�3H�/�e�Z�J�E�3H�s�
�c3�:�K�|]\}}|r|�k7r|nd���y�w)rNrS)r�r6r��
max_columns   �rCr�z)Table._collapse_widths.<locals>.<genexpr>\s,�����(�-B�)��z�(�E�Z�,?�E�Q�F�-B�s�r)r�r��maxr�r�r|r)
r�r�r�r8�total_widthr��second_max_column�column_differencer6r�r��
max_reducer�s
            @rCr�zTable._collapse_widthsGs����&�k��"�Y�.���x�=��,��"2� �!�36�v�x�3H�!��
�%(�(�-0���-B�(�%�!�%/�1B�$B�!�.1���-B��-B�)��z�!�J�.�:�Q�A�E�-B����6�{�*;���
�"�,�0A�B�C�c�&�k�Q�
�%�l�F�J��O��!�&�k��*�Y�6��'�,��"2�(�
��s�2C�column_indexr�c#��������K�|j�|j�|j�t��}|dk(�|t	|j
�dz
k(�i�dtdtdtttttff������fd�}g}|j}|j}|jr=||jxsd�||j�z}	||	|jf�||jxsd�}
|jD]}||
|f��|j r=||j"xsd�||j"�z}|||j$f�|rTt&}
t)|�D]?\}}\}}t+||
||||��t-|dd	�xs|j.����Ay	|D]-\}}t+||t-|dd	�xs|j.����/y	�w)
z3Get all the cells with padding and optional header.rr�	first_row�last_rowr>c�����j||f�}|r|S�
\}}}}�	r"�
std||z
�}|std||z
�}�s�
rd}�rd}|rd}|rd}||||f}|�||f<|S)Nr)�getr�)r�r��cachedr2�right�bottomr0rv�_padding_cacherd�first_column�last_columnrercs        ������rC�get_paddingz%Table._get_cells.<locals>.get_padding}s����#�'�'��H�(=�>�F���
�'.�$�C�����#��q�$��,�/�D�� ��C�&�L�1�F����D���E���C���F��U�F�D�1�H�4<�N�I�x�0�1��OrEr*r3N)rdrercr�r|r\rPr
rOrxr�rgr-r+r/rGrhr.r,rrrX�getattrr3)rBr�r�r��any_paddingr��	raw_cells�_appendr�r-�
cell_style�cellr.�_Padding�first�lastr/rYr�rdr�r�rercs                  @@@@@@rC�
_get_cellszTable._get_cellsns������
 �0�0���=�=���,�,���'�l��#�q�(��"�c�$�,�,�&7�!�&;�;��MO��	�4�	�4�	�E�#�s�C�QT�BT�<U�	�	�2?A�	��"�"���%�%�	����$�T�%6�%6�%<�"�=�	��#�#�A��L�
�\�6�=�=�1�2��v�|�|�1�r�2�
��L�L�D��Z��&�'�!����$�T�%6�%6�%<�"�=�	��#�#�A��L�
�\�6�=�=�1�2���H�4C�I�4N�0��t�0�e�Z����Z��U�D�)A�B��J�
�D�9�L�V�_�_���5O�(1�#��
�����J�
�D�9�L�V�_�_���(1�s�G,G4c�n�|j\}}}}|jr|dkDrtd||z
�}||zS)zGet extra width from padding.r)rcrdr�)rBr�r��	pad_right�pad_lefts     rCr�zTable._get_padding_width�sA��$(�L�L�!��9�a��� � ��a���q�(�Y�"6�7���)�#�#rEc���|j}|dkrtdd�S|j|j�}|j�5t|j|z|j|z�j|�Sg}g}|j}|j}	tj}
|j||j|�D])}|
|||j�\}}
||�|	|
��+t|rt|�nd|rt|�n|�j|�}|j|j�dn|j|z|j�d�}|S|j|z�}|S)z0Get the minimum and maximum width of the column.rrN)
r8rr�r;r6�with_maximumrxr�rrYr�r�r7)rBr�r�r�r8�
padding_width�
min_widths�
max_widths�
append_min�
append_max�get_render_widthr��_min�_maxr�s               rCr�zTable._measure_column�sp���%�%�	��q�=��q�!�$�$��/�/��
�
�>�
��<�<�#�����}�,�f�l�l�]�.J���l�9�%�
&�!#�
� "�
��&�&�
��&�&�
�&�?�?���O�O�G�V�]�]�F�C�D�)�'�7�D�O�O�L�J�D�$��t���t��D�
"�)�C�
�O�q�)�C�
�O�y�
��,�y�
!�	�"�'�'��$�$�,�D�&�2B�2B�]�2R��$�$�,�D�
����39�2B�2B�]�2R�
���rEc#�z���*�+�,�-K��j�jxsd�}|�j�jxsd�z}��fd�t�j�D�}tt
|��}�jr;�jj|t�j�j���nd}|r�js|j�n|}tj�}	�j}
�j}�j}�j }
�j"}�j$}t�*|r��*|j&|��*|j(|��*|j*|�f�*|j,|��*|j.|��*|j0|�f�*|j2|��*|j4|��*|j6|�fg}|
r!�*|j9|�|���|	��ng}�j:}�j}tt=|��D�]H\}\}}}|xr|�,|xr|�+�,s�+s�j>||z
nd}d}g}�,s�+rtAjB�}n||�|r|dz
n|��}t
|||
�D]�\}}}|jE||jF|jH|jJd��}�jM|jN|||j�|z��}tQ|tS|��}|jU|���tQd�|D���-dtVtVtd	d
dtXdt@d
tVtVtf
�*�+�,�-fd�} t
||||
�D��!��cgc]@\}}!}}�*j[| ||!j\|||!j�|z�||���Bc}}}!}|dd|r�|r#|r!�*|j_|d|
��|���|	��||rdn|rdnd\}"}#}$|$j`jc�r|$n)�*|$j`|jd|$jz�}%tg|�D]9}&|
r|"��ti|�D]\}'}(|(|&Ed{���|'r�|%���|
r|#��|	���;n(tg|�D]}&|D]}(|(|&Ed{����|	���|r%|r#|r!�*|j_|d|
��|���|	��|xr|jj})|s���|s|s|)s���|r���|r|tS|�dz
k\r���|r�,r��|r!�*|j_|d|
��|z|���n�*|j_|d|
��|���|	����K|r"|
r�*|jm|�|���|	��yyycc}}}!}w7��7��w)Nr*c3�J�K�|]\}}�j�||����y�wr�)r)r�r�r�r�rBs   ��rCr�z Table._render.<locals>.<genexpr>�s+�����
�(?�$��f�
�O�O�G�\�6�:�(?�s� #)�safer)r6r1r:r5r��r/c3�2K�|]}t|����y�wr�)r|)r�r�s  rCr�z Table._render.<locals>.<genexpr>@s����9�5�4�S��Y�5�s�r�r3rr6r/r>c����rd}n�rd}|dk(r�j||�|�S|dk(r�j||�|�S�j||�|�S)Nr�r2�middle)�	align_top�align_middle�align_bottom)r�r3r6r/�_Segment�
footer_row�
header_row�
row_heights    ����rC�
align_cellz!Table._render.<locals>.align_cellBsj����'�H��$�H��u�$�#�-�-�d�E�:�u�M�M���)�#�0�0��u�j�%�P�P��,�,�T�5�*�e�L�LrE�foot)�edgerr��head�mid�row)7r�r/rmr�r\rQr�r�
substituterrbrg�get_plain_headed_boxr�linerhrirjrk�	head_left�
head_right�
head_vertical�	foot_left�
foot_right�
foot_vertical�mid_left�	mid_right�mid_vertical�get_topr�rr]rr�r�r1r:r5�render_linesrYr�r|rxr	rO�	set_shaper3�get_rowr��strip�background_style�rangerrV�
get_bottom).rBr�r�r��table_stylerm�
_column_cells�	row_cells�_box�new_liner\rgrhrirjrk�box_segmentsr�r�r�rr�row_cellr#�
max_heightrGr�r6r�r�r��linesr�_cellr0r��_divider�divider�line_no�	last_cell�
rendered_cellrVrrrrs.``                                        @@@@rCr�z
Table._render�s�������'�'��
�
�(8�b�9��"�W�%6�%6�t�7H�7H�7N�B�%O�O��
�(1�$�,�,�(?�
�
�.2�#�}�2E�-F�	�
�x�x�
�H�H����i��
�
�w�7G�7G�H�
 �
��	
�/3�4�;K�;K�t�(�(�*�QU���<�<�>���,�,���&�&���&�&���N�N�	��_�_�
��,�,������T�^�^�\�:��T�_�_�l�;��T�/�/��>���T�^�^�\�:��T�_�_�l�;��T�/�/��>���T�]�]�L�9��T�^�^�\�:��T�.�.��=���L�"��t�|�|�F�3�\�B�B����L��*�*�
��%�%�	�.7��	�8R�.S�*�E�*�E�4���.�;�J��-�+�J�#�:��	�	�%�+�-�.��
�
�J�/1�E��Z�!�J�J�L�	�%�!�'��5�1�9��O��	�(+�6�8�W�'E�#��t�V�!(����"�N�N�"�N�N�#�_�_��"0�"�� �,�,��O�O�"�#�D�J�J�/�)�;�-���
!��S��Z�8�
����U�#�(F� �9�5�9�9�J�
M��4��=�)�
M�/�
M��
M��	
M�
�d�7�m�$�
M�
M�836�f�h��w�2W��3X�.�E�5�$���"�"�������!�%�+�+�.��:�	���	�3X��E�!�H���K�"����V�V�)��D�l���#�N�(4�%�Q�4�a�UV�(X�%��e�X�
 �}�}�*�*�,��!� �
�
�y�'A�'A�H�N�N�'R��� %�Z�0�G� �"�
�4=�e�4D�0�	�=�#0��#9�9�9�(�")�M�5E�!�#��"�N� 1� %�Z�0�G�).�
�#0��#9�9�9�*/�"�N� 1���+���L�L���i�L�@�,������1�#�/�/�K���w�+��(�U�c�)�n�q�6H�-H�(�Z��&� �L�L���Y�L�G�'�Q�(���
'� �L�L���Y�L�G����#�N�k/T�n�I��4�?�?�6�2�L�A�A��N��4��I�D:��:�sX�NV;�$AV.�)B4V;�V6
�V;�%.V;�V9
�AV;�V;�#V;�'V;�<V;�A5V;�9V;)r*r*)r>N)r�r"r�r#r>r'),rJrKrLrMr	r)rNrUr�
HEAVY_HEADrrzrr!rO�BoxrPrrrr~�classmethodr�rRrf�setterr�r�r�rr�r
rcr{r�r�r�r�r�rXrr�r�r�rSrErCr[r[�st���>�&�\��
�s�)�O�
%)�&*�#�#'�!$���#'�%+�!&��� �!�� ��!�48�,:�,:�,0�+/�-1�)1�+3��7?&�����$�?&���!�?&��(�#�	?&�
��}�?&��C�=�
?&��c�g�g�
�?&��4�.�?&�#�?&��?&��?&��?&��?&��?&��?&� �!?&�"�#?&�$�%?&�&�X�i�0�1�'?&�(�y�)�)?&�*�y�)�+?&�,�y�)�-?&�.�i�(�/?&�0 �	�*�1?&�2'�3?&�4)�5?&�6�7?&�8
�9?&�B�&'�!%���

�����$�
�#�
��	
�
�
��

�
�
��
�@�6��6��6��]�]��T��d������c������3�����Y��s��y��� ��+;��	��B���s�C��c�1�2����
�^�^��0��W����$&�#%�5$�
-1�,0�%)�#)�*/�%/�#�#'�#'�#��5$� �5$�!�5$�
�y�)�5$��y�)�
5$��	�"�5$�!�5$�(�5$�#�5$���}�5$��C�=�5$��C�=�5$���}�5$��5$� 
�!5$�t&*�!�	-D��/�0�-D��	�"�-D��	-D�

�-D�^-�.� �.�+;�.�	�.�`>� �>�+;�>�	
�c��>�@�$��#�Y�$�*.�t�*�$�AD�$�	
�c��$��$�LG� �G�03�G�=C�G�	�%��G�R$�s�$�s�$�&��&�"�&��	&�

�&�Pr� �r�+;�r�EI�#�Y�r�	�rrEr[�__main__)r")�ReprHighlighter)r[)�timerzTable renderzStar Wars MovieszRich example tabler�)r`rarq�Released�bright_cyan�cyanT)r-r/r:�Title�magentarz
Box Office�green)r1r/zDec 20, 2019z Star Wars: The Rise of Skywalkerz$952,110,690zMay 25, 2018zSolo: A Star Wars Storyz$393,151,347zDec 15, 2017z!Star Wars Ep. V111: The Last Jediz$1,332,539,889zon blackr�zDec 16, 2016zRogue One: A Star Wars Storyz$1,332,439,889r�r>Nc��tj�tjt|��tj�yr�)r��print�rulerr)r�s rCr+r+�s$���M�M�O��L�L��4��)��M�M�OrEz
Example Tabler_r�zexpand=True�2zwidth=50F�dimr^zrow_styles=['dim', 'none']z%leading=1, row_styles=['dim', 'none']z+show_lines=True, row_styles=['dim', 'none'])J�dataclassesrrr�typingrrrr	r
rrr
rr*rr�_looprr�_pickr�_ratiorr�alignr�jupyterr�measurerrcrr�protocolr�segmentrr/rrr�r r!r�r"r#r$r%r&r'r)rUrXr[rJ�pip._vendor.rich.console�pip._vendor.rich.highlighterrL�pip._vendor.rich.table�_timerrM�tabler{r�rzr+rrrUrfr6rlrkrjrSrErC�<module>rhs���1�1�
�
�
��-��2�&�!� �/�#��#� �����W&�W&��W&�t�M�M��M�#�J�#�B�L�B�J�z��0�<�5��	�~�	��$�(�#�
��	����]�&�$�	�	
�	����	��2�
����w�g��F�
�
�
��.��	
�
	�
�
�n�&?��P�
�
�
��/����	�	
�	�
�
��*��	
�	��	��	�
�)��#�%�	�����
�
�e�X�
�.�����}���
�
�e������z���
�
�e�X�
�.�������!�6�?����+�,��
�
�e�X�
�.�������!�6�?�����
��6�7��
�
�e�X�
�.�������!�6�?��������
��<�=��
�
�e�X�
�.�O
�	��
�	�s
�!F5J � J)python3.12/site-packages/pip/_vendor/rich/__pycache__/text.cpython-312.pyc000064400000163123151732702010022165 0ustar00�

R`iձ����UddlZddlmZmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZddlmZddlmZdd	lmZdd
lmZddlmZmZddlmZdd
l m!Z!ddl"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+m,Z,e	rddl-m.Z.m/Z/m0Z0m1Z1dZ2de3d<dZ4de3d<ejjd�Z6ee7dfZ8ee7gee,fZ9Gd�de�Z:Gd�de%�Z;e<dk(�rdd l=m.Z.e;d!�Z>e>jd"gd#�e>jd$gd%�e.�Z-e-j�d&�e-j�e>d'�(�e-j��e-j�d)�e-j�e>d*d+�,�e-j��e-j�d-�e-j�e>d.d/�,�e-j��e-j�d0�e-j�e>d1d2�,�e-j��yy)3�N)�partial�reduce)�gcd)�
itemgetter)
�
TYPE_CHECKING�Any�Callable�Dict�Iterable�List�
NamedTuple�Optional�Tuple�Union�)�	loop_last)�	pick_bool)�divide_line)�AlignMethod)�cell_len�
set_cell_size)�Lines)�strip_control_codes)�EmojiVariant)�JupyterMixin)�Measurement)�Segment)�Style�	StyleType)�Console�ConsoleOptions�
JustifyMethod�OverflowMethod�defaultr"�DEFAULT_JUSTIFY�foldr#�DEFAULT_OVERFLOWz\s+$�Textc��eZdZUdZeed<	eed<	eeefed<	defd�Z	de
fd�Zdedede
dffd	�Zdeddfd
�Zdeddfd�Zy)
�Spanz A marked up region in some text.�start�end�style�returnc�V�d|j�d|j�d|j�d�S)NzSpan(z, �))r+r,r-��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/text.py�__repr__z
Span.__repr__7s)���t�z�z�l�"�T�X�X�J�b�����a�@�@�c�4�|j|jkDS�N)r,r+r1s r3�__bool__z
Span.__bool__:s���x�x�$�*�*�$�$r5�offsetc��||jkr|dfS||jk\r|dfS|\}}}t|t||�|�}t|j||�}||fS)z)Split a span in to 2 from a given offset.N)r+r,r*�min)r2r9r+r,r-�span1�span2s       r3�splitz
Span.split=sm���D�J�J����:���T�X�X����:�� ���s�E��U�C��V�,�e�4���U�Y�Y��U�+���e�|�r5c�4�|\}}}t||z||z|�S)z�Move start and end by a given offset.

        Args:
            offset (int): Number of characters to add to start and end.

        Returns:
            TextSpan: A new TextSpan with adjusted position.
        )r*�r2r9r+r,r-s     r3�movez	Span.moveJs'��!���s�E��E�F�N�C�&�L�%�8�8r5c�J�|\}}}||k\r|St|t||�|�S)z�Crop the span at the given offset.

        Args:
            offset (int): A value between start and end.

        Returns:
            Span: A new (possibly smaller) span.
        )r*r;r@s     r3�
right_cropzSpan.right_cropVs2��!���s�E��S�=��K��E�3�v�s�+�U�3�3r5N)�__name__�
__module__�__qualname__�__doc__�int�__annotations__r�strrr4�boolr8rrr>rArC�r5r3r*r*-s���*��J��	�H����e����)�A�#�A�%�$�%��C��E�&�(�6�2B�*B�$C��
9�3�
9�6�
9�4��4��4r5r*c��eZdZdZgd�Z		d}ddddddd�ded	eeefd
edded
dee	dedee
deeeddfd�Z
de
fd�Zde	fd�Zdefd�Zdefd�Zdeddfd�Zdede	fd�Zdede	fd�Zdee
efddfd�Zede
fd��Zedefd��Zedd ddddd!�ded	eeefd"e	d#eed
edded
deddfd$��Zeddddddd%�ded	eeefd
edded
dee	dedee
ddfd&��Ze	d~ddd'�ded	e d
edded
ddf
d(��Z!edddddddd)�d*eede"ee ffd	eeefd
edded
dee	dede
d+ee#eefddfd,��Z$edefd-��Z%e%jLd.eddfd/��Z%edeefd0��Z'e'jLdeeddfd1��Z'd~d2eddfd3�Z(dd4�Z)		d�d	eeefd5e
dee
ddfd6�Z*		d�d	eeefd5e
dee
ddfd7�Z+	d�d+e#eefd5e
dee
ddfd8�Z,d�d+ee#eefd9eddfd:�Z-d;eddfd<�Z.d=d>d?e
defd@�Z/	d�ddA�dBed	eee0e fdCede
fdD�Z1d dE�dFe2ed	eeefdGe	de
fdH�Z3d�dI�Z4dJe
ddfdK�Z5dLe
ddfdM�Z6d=d>dNdOde2e7fdP�Z8d=d>dNdOde9fdQ�Z:d~d=d>dede2dRfdS�Z;dTe2dddfdU�Z<d�dee
ddfdV�Z=ddWdX�dYe
ded
dZe	ddfd[�Z>d�d\�Z?d�d]e
d^eddfd_�Z@d�d]e
d^eddfd`�ZAd�d]e
d^eddfda�ZBd�dbeCdce
d^eddfdd�ZD	d�dedefd	eeedefddfdf�ZEd�dg�ZFdhe2e"eee fddfdi�ZGd�dj�ZH	d�dWdWdk�dledme	dne	deIfdo�ZJdpe2e
deIfdq�ZKd�dre
ddfds�ZLdddddt�d=d>dce
d
edded
de
dee	deIfdu�ZMdce
deIfdv�ZNde
fdw�ZO	d�dxdydz�d{ee
d^ed	e ddfd|�ZPy)�r(a�Text with color / style.

    Args:
        text (str, optional): Default unstyled text. Defaults to "".
        style (Union[str, Style], optional): Base style for text. Defaults to "".
        justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
        overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
        no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
        end (str, optional): Character to end text with. Defaults to "\\n".
        tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
        spans (List[Span], optional). A list of predefined style spans. Defaults to None.
    )	�_textr-�justify�overflow�no_wrapr,�tab_size�_spans�_length�N�
�)rOrPrQr,rR�spans�textr-rOr"rPr#rQr,rRrXr.c��t|�}	|	g|_||_||_||_||_||_||_|xsg|_t|	�|_
yr7)rrNr-rOrPrQr,rRrS�lenrT)
r2rYr-rOrPrQr,rRrX�sanitized_texts
          r3�__init__z
Text.__init__sY��-�T�2��$�%��
���
�29���4<��
������� ��
�"'�+�2�����/��r5c��|jSr7)rTr1s r3�__len__zText.__len__�s���|�|�r5c�,�t|j�Sr7)rKrTr1s r3r8z
Text.__bool__�s���D�L�L�!�!r5c��|jSr7��plainr1s r3�__str__zText.__str__�s���z�z�r5c�<�d|j�d|j�d�S)Nz<text � �>)rcrSr1s r3r4z
Text.__repr__�s����
�
�~�Q�t�{�{�o�Q�7�7r5�otherc��t|ttf�r#|j�}|j	|�|St
Sr7)�
isinstancerJr(�copy�append�NotImplemented)r2rh�results   r3�__add__zText.__add__�s2���e�c�4�[�)��Y�Y�[�F��M�M�%� ��M��r5c��t|t�stS|j|jk(xr|j|jk(Sr7)rjr(rmrcrS�r2rhs  r3�__eq__zText.__eq__�s7���%��&�!�!��z�z�U�[�[�(�H�T�[�[�E�L�L�-H�Hr5c��t|t�r||jvSt|t�r|j|jvSy)NF)rjrJrcr(rqs  r3�__contains__zText.__contains__�s;���e�S�!��D�J�J�&�&�
��t�
$��;�;�$�*�*�,�,�r5�slicec����dtddf�fd�}t|t�r||�S|jt�j��\}}}|dk(r�j||g�}|dSt
d��)Nr9r.r(c
����t}t�j|�jD���cgc]\}}}||cxkDr|k\r
nn
|dd|��� c}}}d��}|Scc}}}w)NrrrU)rXr,)r*r(rcrS)r9�_Spanr+r,r-rYr2s      �r3�get_text_atz%Text.__getitem__.<locals>.get_text_at�sm����E���
�
�6�"�.2�[�[��-8�)��s�E��V�,�u�,��!�Q��&�-8��
��D��K��s�#Arz%slices with step!=1 are not supported)rHrj�indicesr[rc�divide�	TypeError)r2ruryr+�stop�step�liness`      r3�__getitem__zText.__getitem__�sz���	��	��	��e�S�!��u�%�%� %�
�
�c�$�*�*�o� >��E�4���q�y����U�D�M�2���Q�x�� � G�H�Hr5c�,�t|j�S)z5Get the number of cells required to render this text.)rrcr1s r3rz
Text.cell_len�s����
�
�#�#r5c��ddlm}g}|j}dd|jfgd�|jD��d�|jD��t|�d|jf�}|j
tdd���d}|j}|D]5\}}}	||kDr|||||��|}|	s�"||rd	|	�d
�nd|	�d
���7dj|�}
|
S)
z~Get console markup to render this Text.

        Returns:
            str: A string potentially creating markup tags.
        r)�escaperFc3�NK�|]}|jd|jf���y�w�FN)r+r-��.0�spans  r3�	<genexpr>zText.markup.<locals>.<genexpr>�s ����
F�+�$�t�z�z�5�$�*�*�-�+���#%c3�NK�|]}|jd|jf���y�w�TN)r,r-r�s  r3r�zText.markup.<locals>.<genexpr>�s ����
C�{�t�t�x�x��t�z�z�*�{�r�T��keyz[/�]�[rU)
�markupr�rcr-rSr[�sortrrl�join)r2r��outputrc�markup_spans�positionrlr9�closingr-r�s           r3r�zText.markup�s���	#����
�
��
��t�z�z�"�
�
F�$�+�+�
F�
�D�t�{�{�
C�
���Z��t�z�z�*�	
��	���j��A�.��/�������&2�"�F�G�U��� ��v�e�H�V�4�5�6�!������E�7�!�}�q���q�\�B�'3��������
r5T)r-�emoji�
emoji_variantrOrPr,r�r�c�T�ddlm}|||||��}	||	_||	_||	_|	S)a,Create Text instance from markup.

        Args:
            text (str): A string containing console markup.
            emoji (bool, optional): Also render emoji code. Defaults to True.
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\n".

        Returns:
            Text: A Text instance with markup rendered.
        r)�render)r�r�)r�r�rOrPr,)
�clsrYr-r�r�rOrPr,r��
rendered_texts
          r3�from_markupzText.from_markup�s5��0	#��t�U�%�}�U�
� '�
��!)�
���
���r5�r-rOrPrQr,rRc	��ddlm}td||||||��}	|�}
|	jd�|
j	|�D��}|S)a�Create a Text object from a string containing ANSI escape codes.

        Args:
            text (str): A string containing escape codes.
            style (Union[str, Style], optional): Base style for text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\n".
            tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
        r)�AnsiDecoderrV)rOrPrQr,rRr-c3� K�|]}|���y�wr7rL�r��lines  r3r�z!Text.from_ansi.<locals>.<genexpr>5s����C�.B�d�T�.B�s�)�ansir�r(r��decode)r�rYr-rOrPrQr,rRr��joiner�decoderrns            r3�	from_ansizText.from_ansisQ��.	&���������
���-�����C�g�n�n�T�.B�C�C���
r5�rOrPc�>�||||��}|j|�|S)aaConstruct a Text instance with a pre-applied styled. A style applied in this way won't be used
        to pad the text when it is justified.

        Args:
            text (str): A string containing console markup.
            style (Union[str, Style]): Style to apply to the text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.

        Returns:
            Text: A text instance with a style applied to the entire string.
        r�)�stylize)r�rYr-rOrP�styled_texts      r3�styledzText.styled8s&��*�$��(�C�����E�"��r5)r-rOrPrQr,rR�meta�partsr�c��|||||||��}	|	j}
t}|D]"}t||tf�r	|
|��|
|��$|r|	j	|�|	S)aRConstruct a text instance by combining a sequence of strings with optional styles.
        The positional arguments should be either strings, or a tuple of string + style.

        Args:
            style (Union[str, Style], optional): Base style for text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\n".
            tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
            meta (Dict[str, Any], optional). Meta data to apply to text, or None for no meta data. Default to None

        Returns:
            Text: A new text instance.
        r�)rlr(rjrJ�
apply_meta)
r�r-rOrPrQr,rRr�r�rYrl�_Text�parts
             r3�assemblez
Text.assembleQsl��4�������

���������D��$����-��t����
�	�
��O�O�D�!��r5c��t|j�dk7r)dj|j�g|jdd|jdS)z Get the text as a single string.rrUNr)r[rNr�r1s r3rcz
Text.plain~s?���t�z�z�?�a���W�W�T�Z�Z�0�1�D�J�J�q�M��z�z�!�}�r5�new_textc���||jk7rXt|�}|g|jdd|j}t	|�|_||jkDr|j�yyy)zSet the text to a new value.N)rcrrNrTr[�_trim_spans)r2r�r\�
old_lengths    r3rcz
Text.plain�sa���t�z�z�!�0��:�N�+�,�D�J�J�q�M����J��~�.�D�L��D�L�L�(�� � �"�)�"r5c��|jS)z.Get a reference to the internal list of spans.�rSr1s r3rXz
Text.spans�s���{�{�r5c��|dd|_y)z
Set spans.Nr�)r2rXs  r3rXz
Text.spans�s���A�h��r5rcc	��t||j|j|j|j|j
|j��}|S)zOReturn a new Text instance with copied meta data (but not the string or spans).r�)r(r-rOrPrQr,rR)r2rc�	copy_selfs   r3�
blank_copyzText.blank_copy�sA�����*�*��L�L��]�]��L�L�����]�]�
�	��r5c	���t|j|j|j|j|j
|j|j��}|j|jdd|S)zReturn a copy of this instance.r�N)	r(rcr-rOrPrQr,rRrS)r2r�s  r3rkz	Text.copy�sY����J�J��*�*��L�L��]�]��L�L�����]�]�
�	�#�k�k�	������r5r+c	���|r_t|�}|dkr||z}|�|}|dkr||z}||k\s||kry|jjt|t	||�|��yy)azApply a style to the text, or a portion of the text.

        Args:
            style (Union[str, Style]): Style instance or style definition to apply.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
        rN)r[rSrlr*r;�r2r-r+r,�lengths     r3r�zText.stylize�sq�����Y�F��q�y������{����Q�w��s�l�����#��,���K�K���t�E�3�v�s�+;�U�C�D�r5c
���|r`t|�}|dkr||z}|�|}|dkr||z}||k\s||kry|jjdt|t	||�|��yy)a�Apply a style to the text, or a portion of the text. Styles will be applied before other styles already present.

        Args:
            style (Union[str, Style]): Style instance or style definition to apply.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
        rN)r[rS�insertr*r;r�s     r3�stylize_beforezText.stylize_before�ss�����Y�F��q�y������{����Q�w��s�l�����#��,���K�K���q�$�u�c�&�#�.>��"F�G�r5c�V�tj|�}|j|||��y)ahApply meta data to the text, or a portion of the text.

        Args:
            meta (Dict[str, Any]): A dict of meta information.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.

        )r+r,N)r�	from_metar�)r2r�r+r,r-s     r3r�zText.apply_meta�s$������%�����U�%�S��1r5�handlersc���|�in|}|j|j�D��cic]\}}d|��|��
c}}�|jtj|��|Scc}}w)a�Apply event handlers (used by Textual project).

        Example:
            >>> from rich.text import Text
            >>> text = Text("hello world")
            >>> text.on(click="view.toggle('world')")

        Args:
            meta (Dict[str, Any]): Mapping of meta information.
            **handlers: Keyword args are prefixed with "@" to defined handlers.

        Returns:
            Text: Self is returned to method may be chained.
        �@)�update�itemsr�rr�)r2r�r�r��values     r3�onzText.on�sb���\�r�t��������8H�I�8H�*�#�u�q���Y��%�8H�I�J����U�_�_�T�*�+����Js�A#
�suffixc�p�|jj|�r|jt|��yy)zaRemove a suffix if it exists.

        Args:
            suffix (str): Suffix to remove.
        N)rc�endswithrCr[)r2r�s  r3�
remove_suffixzText.remove_suffixs+���:�:���v�&��O�O�C��K�(�'r5�consoler r9c���|dkrt|�|z}|j}||j�j�}|jD]"\}}}||cxkDr|k\s�n�|||d��z
}�$|S)a
Get the style of a character at give offset.

        Args:
            console (~Console): Console where text will be rendered.
            offset (int): Offset in to text (negative indexing supported)

        Returns:
            Style: A Style instance.
        rrU�r$)r[�	get_styler-rkrS)r2r�r9r�r-r+r,�
span_styles        r3�get_style_at_offsetzText.get_style_at_offsetsu���A�:���Y��'�F��%�%�	��$�*�*�%�*�*�,��&*�k�k�"�E�3�
��V�$�u�$���:�r�:�:��'2��r5)�style_prefix�re_highlightr�c
���d}|jj}t}|j}t	j
||�D]�}|j}	|r9|	�\}
}t|�r|||
|�n|}|�||
kDr|||
||��|dz
}|j�j�D]-}
|	|
�\}
}|
dk7s�||
kDs�|||
||�|
�����/��|S)aHighlight text with a regular expression, where group names are
        translated to styles.

        Args:
            re_highlight (str): A regular expression.
            style (Union[GetStyleCallable, StyleType]): Optional style to apply to whole match, or a callable
                which accepts the matched text and returns a style. Defaults to None.
            style_prefix (str, optional): Optional prefix to add to style group names.

        Returns:
            int: Number of regex matches
        rr���)
rSrlr*rc�re�finditerr��callable�	groupdict�keys)r2r�r-r��count�append_spanrxrc�match�get_spanr+r,�match_style�names              r3�highlight_regexzText.highlight_regex(s���&���k�k�(�(�����
�
���[�[��u�5�E��z�z�H��%�Z�
��s�9A�%��e�E�%��$4�5�e���*�s�U�{���e�S�+� >�?��Q�J�E����)�.�.�0��%�d�^�
��s��B�;�3��;���e�S�\�N�4�&�2I� J�K�1�6��r5)�case_sensitive�wordsr�c�6�djd�|D��}|jj}d}t}t	j
||j|rdntj��D]+}|jd�\}	}
|||	|
|��|dz
}�-|S)aDHighlight words with a style.

        Args:
            words (Iterable[str]): Worlds to highlight.
            style (Union[str, Style]): Style to apply.
            case_sensitive (bool, optional): Enable case sensitive matchings. Defaults to True.

        Returns:
            int: Number of words highlighted.
        �|c3�FK�|]}tj|����y�wr7)r�r��r��words  r3r�z'Text.highlight_words.<locals>.<genexpr>_s����>���B�I�I�d�O��s�!r��flagsr)	r�rSrlr*r�r�rc�
IGNORECASEr�)r2r�r-r��re_words�add_spanr�rxr�r+r,s           r3�highlight_wordszText.highlight_wordsNs���"�8�8�>��>�>���;�;�%�%�������[�[��d�j�j�^�����
�E����A��J�E�3��U�5�#�u�-�.��Q�J�E�
��r5c�B�|jj�|_y)z"Strip whitespace from end of text.N)rc�rstripr1s r3r�zText.rstripks���Z�Z�&�&�(��
r5�sizec���t|�}||kDr]||z
}tj|j�}|�6t|j	d��}|jt
||��yyy)z�Remove whitespace beyond a certain width at the end of the text.

        Args:
            size (int): The desired size of the text.
        Nr)r[�_re_whitespace�searchrc�grouprCr;)r2r��text_length�excess�whitespace_match�whitespace_counts      r3�
rstrip_endzText.rstrip_endoso���$�i����� �4�'�F�-�4�4�T�Z�Z�@���+�#&�'7�'=�'=�a�'@�#A� �����$4�f� =�>�,�r5�
new_lengthc��t|�}||k7r/||kr|j||z
�y|j||z
�yy)z<Set new length of the text, clipping or padding is required.N)r[�	pad_rightrC)r2rr�s   r3�
set_lengthzText.set_length}sB���T����Z���
�"����z�F�2�3������ 3�4�	 r5�optionsr!c#��K�|jxs|jxsd}|jxs|jxst}|jxs|jxst}|j||j|||xsdt|j|jd���}td�j|�}|j||j��Ed{���y7��w)NrWF�rOrPrRrQrV�r,)
rRrOr%rPr'�wrap�	max_widthrrQr(r�r�r,)r2r�rrRrOrPr�	all_liness        r3�__rich_console__zText.__rich_console__�s����� �(�(�>�D�M�M�>�Q���,�,�D�'�/�/�D�_���=�=�H�G�$4�$4�H�8H���	�	��������]���d�l�l�G�O�O�U�C�
�
����J�O�O�E�*�	��#�#�G����#�:�:�:�s�C!C+�#C)�$C+c���|j}|j�}|rtd�|D��nd}|j�}|rtd�|D��n|}t	||�S)Nc3�2K�|]}t|����y�wr7�rr�s  r3r�z(Text.__rich_measure__.<locals>.<genexpr>�s����>���X�d�^����rc3�2K�|]}t|����y�wr7rr�s  r3r�z(Text.__rich_measure__.<locals>.<genexpr>�s����1�5�4����5�r)rc�
splitlines�maxr>r)r2r�rrYr�max_text_widthr��min_text_widths        r3�__rich_measure__zText.__rich_measure__�s^���z�z�����!��BG��>��>�>�Q���
�
���5:�C�1�5�1�1��	��>�>�:�:r5rc#�V�����K�t}|j}|jst|���|r
||���yt|jtj���}tt|jd��}|D��cic]\}}|||j���c}}�||j��d<dgd�|D��d�|D��t|�ddf�}	|	jtdd��	�g��j}
�j}i��j�t
j �d
t
f�����fd�}t#|	|	dd�D]9\\}
}}\}}}|r	||�n|
|�||
kDs�'|||
||�����;|r||���yycc}}w�w)aRender the text as Segments.

        Args:
            console (Console): Console instance.
            end (Optional[str], optional): Optional end character.

        Returns:
            Iterable[Segment]: Result of render that may be written to the console.
        Nr�rr)rFrc3�@K�|]\}}|jd|f���y�wr�)r+�r��indexr�s   r3r�zText.render.<locals>.<genexpr>�s"����
M�<L�[�U�D�t�z�z�5�%�(�<L���c3�@K�|]\}}|jd|f���y�wr�rrs   r3r�zText.render.<locals>.<genexpr>�s"����
J�9I�+�%��t�x�x��u�%�9I�rTr�r.c�t��t�fd�t��D��}�|�}|�|S�|�}|�|<|S)z#Construct current style from stack.c3�(�K�|]	}�|���y�wr7rL)r��	_style_id�	style_maps  �r3r�z9Text.render.<locals>.get_current_style.<locals>.<genexpr>�s�����O��I�9�Y�/��s�)�tuple�sorted)�styles�cached_style�
current_style�combine�stack�style_cache�style_cache_getr#s   �����r3�get_current_stylez&Text.render.<locals>.get_current_style�sF����O����O�O�F�*�6�2�L��'�#�#�#�F�O�M�"/�K��� � r5)rrcrSrr�r�null�list�	enumerater-r[r�rrl�remove�getr)�zip)r2r�r,�_SegmentrYr��enumerated_spansrr�rX�stack_append�	stack_popr-r9�leaving�style_id�next_offset�_r)r*r+r,r#s                  @@@@@r3r�zText.render�s���������z�z���{�{��$�-����s�m�#���G�-�-�u�z�z�|�D�	��	�$�+�+�q� 9�:��EU�V�EU�k�e�T�U�I�d�j�j�1�1�EU�V�	� ����,�	�!��
�
�
M�<L�
M�
�K�9I�
J�
���Y��a� �	
��	�
�
�z�!�Q�'�
�(����|�|���L�L�	�68��%�/�/���-�-��	!�5�	!�	!�AD�E�5�QR�QS�9�@U�<�'�V�W�h�)<�+�q�!���(�#��X�&��V�#��t�F�;�7�9J�9L�M�M�
AV���3�-����IW�s�BF)�
F#�*CF)�)F)rc
������	��j�}dtdf��fd�}|jj}|jj
}|jj}d�	t�|�D]p}||j�|jr&|��	�	t|�z|j��|��	fd�|jD���	t|�z
�	�r�	|_	|S)z�Join text together with this instance as the separator.

        Args:
            lines (Iterable[Text]): An iterable of Text instances to join.

        Returns:
            Text: A new text instance containing join text.
        r.r(c3�|�K��jrt��D]\}}|��|r�
����y�Ed{���y7��wr7)rcr)�lastr�rr2s  ��r3�	iter_textzText.join.<locals>.iter_text�s9������z�z�"+�E�"2�J�D�$��J��"�
�#3�
!� � �s�$<�<�:�<rc3�F�K�|]\}}}��|z�|z|����y�wr7rL)r�r+r,r-rxr9s    ��r3r�zText.join.<locals>.<genexpr>�s1������)4�%�E�3���f�u�n�f�s�l�E�:�)4���!)
r�rrN�extendrSrlr*r-r[rT)
r2rr�r?�extend_textr��extend_spansrYrxr9s
``      @@r3r�z	Text.join�s�����?�?�$��	!�8�F�+�	!��n�n�+�+���o�o�,�,�����-�-�������K�D���
�
�#��z�z��E�&�&�3�t�9�*<�d�j�j�I�J���)-����
�
�c�$�i��F� �"����r5c�p�d|jvryd}|�|j}|�J�|j�}|j}|j}|jdd��D]�}|jdd��}|D]v}|jj
d�rQ|jdddzg|_||�|t|�z
}||d	z
|zz
d	z
}	|	s�]|d|	z|�||	z
}�o||��x��|jg|_t|j�|_	|j|jddy)
ztConverts tabs to spaces.

        Args:
            tab_size (int, optional): Size of tabs. Defaults to 8.

        �	NrrVT)�include_separatorr�rfr)rcrRr�rlr-r>r�rNr[rTrS)
r2rR�posrnrl�_styler�r�r��spacess
          r3�expand_tabszText.expand_tabss,���t�z�z�!�������}�}�H��#�#�#����"�����������J�J�t�t�J�<�D��J�J�t�t�J�<�E����:�:�&�&�t�,�"&�*�*�S�b�/�C�"7�!8�D�J��4�L��3�t�9�$�C�%�#��'�X�)=�>��B�F���s�V�|�V�4��v�
���4�L��=��l�l�^��
��4�:�:����������A�r5F)rP�padr
rLc�z�|xs|jxst}|dk7r�t|j�}||kDrB|dk(r"t	|j|dz
�dz|_nt	|j|�|_|r?||kr9||z
}|j�d|z��g|_t
|j�|_yyyy)auTruncate text if it is longer that a given width.

        Args:
            max_width (int): Maximum number of characters in text.
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None, to use self.overflow.
            pad (bool, optional): Pad with spaces if the length is less than max_width. Defaults to False.
        �ignore�ellipsisru…rfN)rPr'rrcrrNr[rT)r2r
rPrL�	_overflowr�rJs       r3�truncatez
Text.truncate)s����A��
�
�A�1A�	��� ��d�j�j�)�F��	�!��
�*�!.�t�z�z�9�q�=�!I�E�!Q�D�J�!.�t�z�z�9�!E�D�J��v�	�)�"�V�+��!%����S�6�\�N�;�<��
�"�4�:�:����*�s�!r5c
�2�t|j�}t}|jD�cgc]T}|j|krC|j
|kr|n1||jt
||j
�|j���Vc}|jddycc}w)z=Remove or modify any spans that are over the end of the text.N)r[rcr*rSr+r,r;r-)r2�
max_offsetrxr�s    r3r�zText._trim_spansDs�������_�
������

�$���z�z�J�&�	�8�8�j�(���4�:�:�s�:�t�x�x�'@�$�*�*�M�N�$�

����A���
s�ABr��	characterc
��t|�dk(sJd��|r`||z}|�|j�|��|_t}|jD���cgc]\}}}|||z||z|���c}}}|jddyycc}}}w)zxPad left and right with a given number of characters.

        Args:
            count (int): Width of padding.
        r�&Character must be a string of length 1N�r[rcr*rS)r2r�rT�pad_charactersrxr+r,r-s        r3rLzText.padRs����9�~��"�L�$L�L�"��&��.�N�*�+�D�J�J�<��7G�H�D�J��E�*.����)4�%�E�3���e�e�m�S�5�[�%�8�)4��D�K�K��N�	��s�
A9c
��t|�dk(sJd��|r\||z�|j��|_t}|jD���cgc]\}}}|||z||z|���c}}}|jddyycc}}}w)z�Pad the left with a given character.

        Args:
            count (int): Number of characters to pad.
            character (str, optional): Character to pad with. Defaults to " ".
        rrVNrW)r2r�rTrxr+r,r-s       r3�pad_leftz
Text.pad_leftbs����9�~��"�L�$L�L�"��%��-�.�t�z�z�l�;�D�J��E�*.����)4�%�E�3���e�e�m�S�5�[�%�8�)4��D�K�K��N���s�A5c�d�t|�dk(sJd��|r|j�||z��|_yy)z�Pad the right with a given character.

        Args:
            count (int): Number of characters to pad.
            character (str, optional): Character to pad with. Defaults to " ".
        rrVN)r[rc)r2r�rTs   r3rzText.pad_rightrs>���9�~��"�L�$L�L�"�� �J�J�<�	�E�(9�':�;�D�J�r5�align�widthc��|j|�|t|j�z
}|r]|dk(r|j||�y|dk(r-|dz}|j	||�|j||z
|�y|j	||�yy)z�Align text to a given width.

        Args:
            align (AlignMethod): One of "left", "center", or "right".
            width (int): Desired width.
            character (str, optional): Character to pad with. Defaults to " ".
        �left�center�N)rQrrcrrZ)r2r\r]rT�excess_spacer_s      r3r\z
Text.align}s���	
�
�
�e���x��
�
�3�3���������|�Y�7��(�"�#�q�(���
�
�d�I�.����|�d�2�I�>��
�
�l�I�6�r5rc	�L���t|ttf�std��t	|��rtt|t�r~t|�}|jj|�t	|�}t	|��|�)|jjt||�z|��|xj�z
c_
|St|t�r�t�|�td��|j�|j�9|jj���t	|�z|j��|jj|j�|jj��fd�|jD��|xjt	|�z
c_
|S)z�Add text with an optional style.

        Args:
            text (Union[Text, str]): A str or Text to append.
            style (str, optional): A style name. Defaults to None.

        Returns:
            Text: Returns self for chaining.
        z(Only str or Text can be appended to Textz2style must not be set when appending Text instancec3�F�K�|]\}}}�|�z|�z|����y�wr7rL�r�r+r,r-rxr�s    ��r3r�zText.append.<locals>.<genexpr>�s3�����#�-8�)��s�E��%�+�-�s�[�/@�%�H�-8�rA)rjrJr(r|r[rrNrlrSr*rT�
ValueErrorr-rcrB)r2rYr-r\r9rxr�s     @@r3rlzText.append�sU����$��d��,��F�G�G��t�9��$��$�!4�T�!:���
�
�!�!�.�1��T���!�.�1���$��K�K�&�&�t�F�F�[�4H�%�'P�Q�����+��$��#�D�$�'����$�$�L���#�l�l���:�:�)��K�K�&�&��k�;��T��+B�D�J�J�O���
�
�!�!�$�*�*�-����"�"�#�-1�[�[�#������D�	�)���r5c	����t�|j�|j�9|jj	���t|�z|j��|jj	|j�|jj��fd�|jD��|xjt|�z
c_|S)z�Append another Text instance. This method is more performant that Text.append, but
        only works for Text.

        Returns:
            Text: Returns self for chaining.
        c3�F�K�|]\}}}�|�z|�z|����y�wr7rLres    ��r3r�z#Text.append_text.<locals>.<genexpr>�s3�����
�%0�!��s�E�
�%�+�%�s�[�'8�%�@�%0�rA)	r*rTr-rSrlr[rNrcrB)r2rYrxr�s  @@r3�append_textzText.append_text�s�������l�l���:�:�!��K�K���u�[�+��D�	�2I�4�:�:�V�W��
�
���$�*�*�%������
�%)�[�[�
�	
�	
����D�	�!���r5�tokensc
�
�|jj}|jj}t}t	|�}|D]9\}}||�|�||||t	|�z|��|t	|�z
}�;||_|S)a(Append iterable of str and style. Style may be a Style instance or a str style definition.

        Args:
            pairs (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style.

        Returns:
            Text: Returns self for chaining.
        )rNrlrSr*r[rT)r2rjrir�rxr9�contentr-s        r3�
append_tokenszText.append_tokens�s����j�j�'�'���k�k�(�(�����T���$�N�G�U��� �� ��E�&�&�3�w�<�*?��G�H��c�'�l�"�F�	%�
����r5c�N�|jj|j�y)z�Copy styles from another Text instance.

        Args:
            text (Text): A Text instance to copy styles from, must be the same length.
        N)rSrB)r2rYs  r3�copy_styleszText.copy_styles�s��	
�����4�;�;�'r5)rG�allow_blank�	separatorrGrpc�����sJd��|j���vrt|j�g�S|r@|jd�t	j
t	j����D��}n<dttf��fd�}t�fd�|j|��D��}|s!�j��r|j�|S)a�Split rich text in to lines, preserving styles.

        Args:
            separator (str, optional): String to split on. Defaults to "\\n".
            include_separator (bool, optional): Include the separator in the lines. Defaults to False.
            allow_blank (bool, optional): Return a blank line if the text ends with a separator. Defaults to False.

        Returns:
            List[RichText]: A list of rich text, one per line of the original.
        zseparator must not be emptyc3�<K�|]}|j����y�wr7r)r�r�s  r3r�zText.split.<locals>.<genexpr>s���� �)P���	�	��)P�s�r.c3��K�tjtj����D]}|j�\}}|��|���y�wr7)r�r�r�r�)r�r+r,rqrYs   ��r3�
flatten_spansz!Text.split.<locals>.flatten_spanss?������[�[����9�)=�t�D�E�!&����J�E�3��K��I�E�s�AAc3�B�K�|]}|j�k7s�|���y�wr7rb)r�r�rqs  �r3r�zText.split.<locals>.<genexpr>s!������!=�����y�AX��!=�s��)rcrrkr{r�r�r�rrHr��pop)r2rqrGrprrurYs `    @r3r>z
Text.split�s����"�7�7�7�y��z�z���D� ��$�)�)�+��'�'���K�K� �)+���R�Y�Y�y�5I�4�)P� ��E�

�8�C�=�
���!%���]�_�!=���E��t�}�}�Y�7��I�I�K��r5�offsetsc	�������t|�}|st|j�g�S|j�t	��}dg|�|�}tt||dd��}|j�|j�|j�t�t�����fd�|D��}|js|S|jD�cgc]}|jj��}}t	|�}	t}
|jD]�\}}�d}
|	}|
|zdz}	||\}}||kr|dz
}n||kDr|dz}
nn	|
|zdz}�(||kr|}n/|x}}
|	}	||\}}||kr|dz
}n||kDr|dz}
nn	|
|zdz}�(t||dz�D]D}||\}}td||z
�}t!||z
||z
�}||kDs�2|||
||����F��|Scc}w)z�Divide text in to a number of lines at given offsets.

        Args:
            offsets (Iterable[int]): Offsets used to divide text.

        Returns:
            Lines: New RichText instances between offsets.
        rrNc3�B�K�|]\}}��||��������y�w))r-rOrPNrL)r�r+r,r�rOrPr-rYs   �����r3r�zText.divide.<locals>.<genexpr>2s=�����
�*�
��s�

��U�3����!�	
�
�*�s�ra)r/rrkrcr[r3r-rOrPr(rS�_linesrlr*�rangerr;)r2rx�_offsetsr��divide_offsets�line_ranges�	new_linesr��
_line_appends�
line_countrx�
span_start�span_end�lower_bound�upper_bound�
start_line_no�
line_start�line_end�end_line_no�line_no�	new_start�new_endr�rOrPr-rYs                      @@@@@r3r{zText.divides@�����=����$�)�)�+��'�'��z�z���$�i���4�h�4��4���3�~�~�a�b�/A�B�C���
�
���,�,���=�=�����
�*�
�
�	��{�{���8A�8H�8H�I�8H�����+�+�8H�
�I���%�
���+/�;�;�'�J��%��K�$�K�(�;�6�1�<�M��'2�=�'A�$�
�H��
�*�"/�!�"3�K��(�*�"/�!�"3�K��!,�{�!:�q� @�
���(�"�+��,9�9��k�(���+6�{�+C�(�J���*�,�&1�A�o��!�H�,�&1�A�o���#.��#<��"B�K��!���a��@��'2�7�';�$�
�H���:�
�#:�;�	��h��3�X�
�5J�K���Y�&�*�M�'�*�5��G�U�+K�L�A�A,7�N���WJs�G
�amountc
��t|j�|z
}t}|jD�cgc]T}|j|krC|j
|kr|n1||jt
||j
�|j���Vc}|jdd|jd|g|_|xj|zc_	ycc}w)z7Remove a number of characters from the end of the text.N)
r[rcr*rSr+r,r;r-rNrT)r2r�rSrxr�s     r3rCzText.right_cropks�������_�v�-�
������

�$���z�z�J�&�	�8�8�j�(���4�:�:�s�:�t�x�x�'@�$�*�*�M�N�$�

����A���j�j��6�'�*�+��
��������
s�ACr
c�6�|xs|jxst}|xs|jxst}t	||j
d�xs|dk(}t
�}	|jd��D]�}
d|
vr|
j|�|r
t
|
g�}n+tt|
�||dk(��}|
j|�}|D]}
|
j|��|r|j||||��|D]}
|
j||�	��|	j|���|	S)
a�Word wrap the text.

        Args:
            console (Console): Console instance.
            width (int): Number of characters per line.
            emoji (bool, optional): Also render emoji code. Defaults to True.
            justify (str, optional): Justify method: "default", "left", "center", "full", "right". Defaults to "default".
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None.
            tab_size (int, optional): Default tab size. Defaults to 8.
            no_wrap (bool, optional): Disable wrapping, Defaults to False.

        Returns:
            Lines: Number of lines.
        FrNT�rprFr&)r&r�)rP)rOr%rPr'rrQrr>rKrrJr{rrQrB)
r2r�r]rOrPrRrQ�wrap_justify�
wrap_overflowrr�r�rxs
             r3rz	Text.wrap{s��0�A�$�,�,�A�/�� �E�D�M�M�E�5E�
��G�T�\�\�5�9�Q�X��=Q������J�J�4�J�0�D��t�|�� � ��*��!�4�&�M�	�%�c�$�i��]�f�=T�U�� �K�K��0�	�!������&�"���!�!��U�L�=�"��"���
�
�e�m�
�<�"��L�L��#�!1�"�r5c��t�}|j}|j�D]}|j|�||��|S)z�Fit the text in to given width by chopping in to lines.

        Args:
            width (int): Maximum characters in a line.

        Returns:
            Lines: Lines container.
        )rrlr>r)r2r]rrlr�s     r3�fitzText.fit�s>���w�������J�J�L�D��O�O�E�"��4�L�!��r5c�:�tjd|jtj��D�chc]}t	|jd����}}	t
t|D�cgc]
}|dzr�	|��c}�xsd}|Scc}wcc}w#t$rd}Y|SwxYw)zrAuto-detect indentation of code.

        Returns:
            int: Number of spaces used to indent code.
        �
^( *)(.*)$r�rra)	r�r�rc�	MULTILINEr[r�rrr|)r2r��
_indentations�indent�indentations     r3�detect_indentationzText.detect_indentation�s������]�D�J�J�b�l�l�S�
�S��
����A���S�	�
�
	��s�-�R�-��v�PQ�z�V�-�R�S�X�WX�
����
��S���	��K���	�s/�!B�B�%
B
�0B
�4B�B�B�Bu│z	dim green)rTr-�indent_sizec�$�|�|j�n|}|j�}|j�|�d|dz
z��}tjd�}g}|j
}	d}
|j
d��D]�}|j|j�}|r|jd�s|
dz
}
�7|jd�}
tt|
�|�\}}||z�d|z��}||jt|�dz|_|j|dt|��|
r"|jt||�	�g|
z�d}
|	|���|
r |jtd
|�	�g|
z�|jd�j!|�}|S)u�Adds indent guide lines to text.

        Args:
            indent_size (Optional[int]): Size of indentation, or None to auto detect. Defaults to None.
            character (str, optional): Character to use for indentation. Defaults to "│".
            style (Union[Style, str], optional): Style of indent guides.

        Returns:
            Text: New text with indentation guides.
        Nrfrr�rTr�ra�r-rUrV)r�rkrKr��compilerlr>r�rcr��divmodr[r�rBr(r�r�)r2r�rTr-�_indent_sizerY�indent_line�	re_indentr��add_line�blank_linesr�r�r��full_indents�remaining_space�
new_indentr�s                  r3�with_indent_guideszText.with_indent_guides�s���$5@�4G�t�.�.�0�[���y�y�{������"��C�<�!�+;�$<�#=�>���J�J�}�-�	� "�	��#�#�����J�J�4�J�0�D��O�O�D�J�J�/�E�����A���q� ����[�[��^�F�,2�3�v�;��,M�)�L�/�'�,�6�7��o�8M�7N�O�J�#�d�j�j��Z��1B�&C�C�D�J��L�L���3�z�?�3��� � �$�z��"?�!@�;�!N�O����T�N�1�����d�2�U�3�4�{�B�C��?�?�4�(�-�-�i�8���r5)rUrU)rU)r.r()rNr7)r.N)rf)rYr(r.r()rYr(r.N)rV)r)QrDrErFrG�	__slots__rJrrrrKrHrr*r]r_r8rdr4rro�objectrrrtrur��propertyrr��classmethodrr�r�rr�rr
r�rc�setterrXr�rkr�r�r�r�r�r��GetStyleCallabler�rr�r�rrrrrrr�r�rKrQr�rLrZrrr\rlrirmrorr>r{rCrr�r�r�rLr5r3r(r(es����
�I��#%�0�
.2�/3�"&��"#�&*�0��0��S�%�Z� �0�
�/�*�0��+�,�
0��$��0��0��3�-�0���T�
�#�0�
�0�.���"�$�"����8�#�8��S��V��I�F�I�t�I�
�&��T��I��s�E�z�!2�I�v�I�4�$�#�$��$�������:�
$&��04�-1�/3������S�%�Z� �	�
�� ��-�
��/�*���+�,����
����>�
$&�-1�/3�"&��"#�#��#��S�%�Z� �	#�
�/�*�#��+�,�
#��$��#��#��3�-�#�
�#��#�J���
.2�/3�
�����
�/�*���+�,�
�
����0�$&�-1�/3�"&���)-�*��c�6�5��i��#8�8�9�*��S�%�Z� �*��/�*�	*�
�+�,�*��$��
*��*��*��t�C��H�~�&�*�
�*��*�X��s�����\�\�#�c�#�d�#��#���t�D�z�����\�\��4��:��$�������V���"�!�	E��S�%�Z� �E��E��c�]�	E�

�E�:�!�	H��S�%�Z� �H��H��c�]�	H�

�H�6JN�2���c��N�2�+.�2�9A�#��2�	
�2��x��S�#�X��/��C��F��()�C�)�D�)��9��c��e��.?C�$�
�$��$���.�	�9�:�;�$�
�$�

�
$�V $����}���S�%�Z� ��
��

�
�:)�?�s�?�t�?�5�S�5�T�5�;� �;�+;�;�	�'�	�;�&
;� �
;�+;�
;�	�
;�9 �i�9 �c�9 �8�I�;N�9 �v%�(�6�*�%�v�%�N '�H�S�M� '�T� '�L04��/��/��+�,�	/�
�/�
�
/�6
������t�� �c��c��D�� 	<�s�	<�s�	<�T�	<�7�;�7�s�7�s�7�T�7�*PT�*��&�#�+�&�*�/7��c�7�l�8K�/L�*�	�*�X�&��u�S�(�9�*=�%=�>�?��	��.(��*�#(�!�*��*� �	*�
�*�
�
*�XN�h�s�m�N��N�`���T��*.2�/3��"&�/��/��/�
�/�*�/��+�,�
/��/��$��/�
�/�b����� �C��.&*�.��&�.��c�]�.��	.�
�.�
�
.r5�__main__)r a�
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
�Lorem�bold�ipsum�italiczjustify='left'�redr�zjustify='center'�greenr`)r-rOzjustify='right'�blue�rightzjustify='full'�magenta�full)Br��	functoolsrr�mathr�operatorr�typingrrr	r
rrr
rrr�_loopr�_pickr�_wraprr\r�cellsrr�
containersr�controlrr�r�jupyterr�measurer�segmentrr-rrr�r r!r"r#r%rIr'r�r�rJ�TextTyper�r*r(rD�pip._vendor.rich.consolerYr��rule�printrLr5r3�<module>r�s���	�%����������*��(��!� ��#��O�O�#,���,�%+��"�+�����G�$����f�����S�E�8�I�#6�6�7��54�:�54�pZ�<�Z�z$�z��0��	P��D�	���'��F�+����'��H�-��i�G��L�L�!�"��M�M�$�e�M�$��M�M�O��L�L�#�$��M�M�$�g�x�M�8��M�M�O��L�L�"�#��M�M�$�f�g�M�6��M�M�O��L�L�!�"��M�M�$�i��M�8��M�M�O�3r5python3.12/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-312.pyc000064400000007044151732702010023360 0ustar00�

R`i���v�ddlZddlmZmZmZmZddlmZddlm	Z	erddl
mZGd�dej�Z
y)	�N)�IO�
TYPE_CHECKING�Any�List�)�AnsiDecoder)�Text)�Consolec�z�eZdZdZdddeeddfd�Zedeefd��Zd	ede	fd
�Z
dedefd�Zdd
�Z
defd�Zy)�	FileProxyzAWraps a file (e.g. sys.stdout) and redirects writes to a console.�consoler
�file�returnNc�L�||_||_g|_t�|_y�N)�_FileProxy__console�_FileProxy__file�_FileProxy__bufferr�_FileProxy__ansi_decoder)�selfr
rs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/file_proxy.py�__init__zFileProxy.__init__s!�� ������#%��
�)�m���c��|jS)zGet proxied file.)r�rs r�rich_proxied_filezFileProxy.rich_proxied_files���{�{�r�namec�.�t|j|�Sr)�getattrr)rrs  r�__getattr__zFileProxy.__getattr__s���t�{�{�D�)�)r�textc�8��t|t�s!tdt|�j�����j
}g}|r`|j
d�\}}}|r4|jdj|�|z�|j�n|j|�n|r�`|rV�j}|5td�j�fd�|D��}|j|�ddd�t|�St|�S#1swYt|�SxYw)Nz"write() argument must be str, not �
�c3�T�K�|]}�jj|����!y�wr)r�decode_line)�.0�liners  �r�	<genexpr>z"FileProxy.write.<locals>.<genexpr>,s&�����)�FK�d�D�'�'�3�3�D�9�e�s�%()�
isinstance�str�	TypeError�type�__name__r�	partition�append�join�clearrr	�print�len)rr!�buffer�linesr(�new_liner
�outputs`       r�writezFileProxy.writes�����$��$��@��d��AT�AT�@U�V�W�W��������#'�>�>�$�#7� �D�(�D�����R�W�W�V�_�t�3�4������
�
�d�#�����n�n�G���d����)�FK�)����
�
�f�%�	�
�4�y��s�4�y���
�4�y��s�35D�Dc��dj|j�}|r|jj|�|jdd�=y)Nr$)r1rrr3)rr8s  r�flushzFileProxy.flush2s5��������'����N�N� � ��(��M�M�!�rc�6�|jj�Sr)r�filenors rr=zFileProxy.fileno8s���{�{�!�!�#�#r)rN)r.�
__module__�__qualname__�__doc__rr+r�propertyrrr �intr9r;r=�rrrrsy��K�,�	�,��C��,�T�,���2�c�7����*��*��*��#��#��,�$��$rr)�io�typingrrrr�ansirr!r	r
r
�
TextIOBaserrCrr�<module>rHs*��	�/�/���� �.$��
�
�.$rpython3.12/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-312.pyc000064400000021633151732702010022132 0ustar00�

R`i�����ddlZddlZddlmZddlmZmZmZddlm	Z	ddl
mZddlm
Z
ejdej�ZGd	�d
e�Zdedeefd
�Zidd�dd�dd�dd�dd�dd�dd�dd�dd�dd �d!d"�d#d$�d%d&�d'd(�d)d*�d+d,�d-d.�id/d0�d1d2�d3d4�d5d6�d7d8�d9d:�d;d<�d=d>�d?d@�dAdB�dCdD�dEdF�dGdH�dIdJ�dKdL�dMdN�dOdP��idQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]d^�d_d`�dadb�dcdd�dedf�dgdh�didj�dkdl�dmdn�dodp�dqdr��dsdtdudvdwdxdy��ZGdz�d{�Zej,d|k7r�ed}k(r�ddlZddlZddlZddlZe�Zej8�Zd~edefd�Z ejBejDdde �dd�l#m$Z$e$d����Z#ejK�jMd��Z'e(e'�ejMe'�D]Z)e#jQe)��e#jUd��yyy)��N)�suppress)�Iterable�
NamedTuple�Optional�)�Color)�Style)�TextzA
(?:\x1b\](.*?)\x1b\\)|
(?:\x1b([(@-Z\\-_]|\[[0-?]*[ -/]*[@-~]))
c�H�eZdZUdZdZeed<dZeeed<dZ	eeed<y)�
_AnsiTokenz Result of ansi tokenized string.��plain�sgr�oscN)
�__name__�
__module__�__qualname__�__doc__r�str�__annotations__rrr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/ansi.pyrrs*��*��E�3�O��C��#����C��#��rr�	ansi_text�returnc#�~K�d}tj|�D]�}|jd�\}}|j�\}}||kDrt	|||���|r/|dk(r|dz}�L|jd�r"t	d|dd|���nt	d||���|}��|t
|�krt	||d���yy�w)z�Tokenize a string in to plain text and ANSI codes.

    Args:
        ansi_text (str): A String containing ANSI codes.

    Yields:
        AnsiToken: A named tuple of (plain, sgr, osc)
    r�(r�mr
���N)�re_ansi�finditer�span�groupsr�endswith�len)r�position�match�start�endrrs       r�_ansi_tokenizer*s������H��!�!�)�,���Z�Z��]�
��s��<�<�>���S��8���Y�x��6�7�7���c�z���7����|�|�C� � ��S��2�Y��4�4��R��c�*�*���-��#�i�.� ���8�9�-�.�.�!�s�B;B=�bold��dim��italic��	underline��blink��blink2��reverse��conceal�	�strike��
underline2�znot dim not bold�z
not italic�z
not underline�z	not blink�z
not blink2�znot reverse�znot conceal�z
not strike�zcolor(0)�zcolor(1)� zcolor(2)�!zcolor(3)�"zcolor(4)�#zcolor(5)�$zcolor(6)�%zcolor(7)�'�default�(zon color(0)�)zon color(1)�*zon color(2)�+zon color(3)�,zon color(4)�-zon color(5)�.zon color(6)�/zon color(7)�1z
on default�3�frame�4�encircle�5�overline�6znot frame not encircle�7znot overline�Zzcolor(8)�[zcolor(9)�\z	color(10)�]z	color(11)�^z	color(12)�_z	color(13)�`z	color(14)�az	color(15)�dzon color(8)�ezon color(9)zon color(10)zon color(11)zon color(12)zon color(13)zon color(14)zon color(15))�f�g�h�i�j�kc�>�eZdZdZd	d�Zdedeefd�Zdedefd�Z	y)
�AnsiDecoderz&Translate ANSI code in to styled Text.rNc�6�tj�|_y)N)r	�null�style)�selfs r�__init__zAnsiDecoder.__init__zs���Z�Z�\��
r�
terminal_textc#�\K�|j�D]}|j|����y�w)z�Decode ANSI codes in an iterable of lines.

        Args:
            lines (Iterable[str]): An iterable of lines of terminal output.

        Yields:
            Text: Marked up Text.
        N)�
splitlines�decode_line)rvrx�lines   r�decodezAnsiDecoder.decode}s,����"�,�,�.�D��"�"�4�(�(�/�s�*,r|c��tj}tj}t}t	�}|j
}|j
dd�d}t|�D�]�\}}}	|r|||jxsd��"|	�R|	jd�s�6|	ddjd�\}
}}|s�Q|jj|xsd�|_�v|��y|jd�D�
cgc]0}
|
j�s|
dk(rtd	|
rt|
�nd
���2}}
t!|�}|D�]�}|d
k(r|j#�|_�|t$vr,|xj|j't$|�z
c_�S|dk(r�t)t*�5t-|�}|dk(r4|xj|j/|t-|���z
c_nL|dk(rG|xj|j/|t-|�t-|�t-|���z
c_ddd���|d
k(s��	t)t*�5t-|�}|dk(r5|xj|j/d|t-|���z
c_nM|dk(rH|xj|j/d|t-|�t-|�t-|���z
c_ddd�������|Scc}
w#1swY���xYw#1swY���xYw)z�Decode a line containing ansi codes.

        Args:
            line (str): A line of terminal output.

        Returns:
            Text: A Text instance marked up according to ansi codes.
        �
rrNz8;r,�;r
�r�&r2�0)r�	from_ansi�from_rgbr	r
�append�rsplitr*ru�
startswith�	partition�update_link�split�isdigit�min�int�iterrt�
SGR_STYLE_MAP�parser�
StopIteration�next�
from_color)rvr|r�r��_Style�textr��
plain_textrr�_params�	semicolon�link�_code�codes�
iter_codes�code�
color_types                  rr{zAnsiDecoder.decode_line�s����O�O�	��>�>�����v�������{�{�4��#�B�'��$2�4�$8� �J��S���z�4�:�:�#5��6����>�>�$�'�/2�1�2�w�/@�/@��/E�,�G�Y�� �%)�Z�Z�%;�%;�D�L�D�%I��
���
"%���3���!/���}�}��%�2�+���5�S��Z�a�8�!/���
"�%�[�
�&�D��q�y�%+�[�[�]��
���.��
�
�f�l�l�=��3F�&G�G�
����%�m�4�)-�j�)9�J�)�Q�� $�
�
�f�.?�.?�$-�d�:�.>�$?�/"�!"�
�",�q�� $�
�
�f�.?�.?�$,�(,�Z�(8�(,�Z�(8�(,�Z�(8�%&�/"�!"�
�5�4����%�m�4�)-�j�)9�J�)�Q�� $�
�
�f�.?�.?�$(�)�D��4D�*E�/"�!"�
�",�q�� $�
�
�f�.?�.?�$(�$,�(,�Z�(8�(,�Z�(8�(,�Z�(8�%&�/"�!"�
�5�4�3'�#%9�t���_�5�4�� 5�4�s �)5K(�BK-�BK:�-K7�:L)rN)
rrrrrwrrr
r}r{rrrrrrrws7��0�"�
)�C�
)�H�T�N�
)�I��I��Irrr�win32�__main__�fdc�\�tj|d�}tj|�|S)Ni)�os�read�stdout�write)r��datas  rr�r��s#���w�w�r�4� �����T���r)�ConsoleT)�recordzutf-8zstdout.html)+�re�sys�
contextlibr�typingrrr�colorrrur	r�r
�compile�VERBOSEr rrr*r�rr�platformr�ior��pty�decoder�BytesIOr�r��bytesr��spawn�argv�consoler��getvaluer}�
stdout_result�printr|�	save_htmlrrr�<module>r�s���	�
��1�1����
�"�*�*���J�J������/�c�/�h�z�&:�/�>:��v�:��u�:��x�:��{�	:�
�w�:��x�
:��y�:��y�:��x�:���:���:���:���:���:���:� �
�!:�"�
�#:�$��%:�&�
�':�(�
�):�*�
�+:�,�
�-:�.�
�/:�0�
�1:�2�
�3:�4�
�5:�6�	�7:�8�
�9:�:�
�;:�<�
�=:�>�
�?:�@�
�A:�B�
�C:�D�
�E:�F�
�G:�H��I:�J��K:�L�
�M:�N�
�O:�P� �Q:�R��S:�T�
�U:�V�
�W:�X��Y:�Z��[:�\��]:�^��_:�`��a:�b��c:�d��e:�f��g:�h
�	�	�	�	�	�s:�
�z[�[�|�<�<�7��x�:�5�
�
����m�G�
�R�Z�Z�\�F������
�C�I�I�c�h�h�q�r�l�D�!� ��T�"�G��O�O�%�,�,�W�5�M�	�-�����}�-���
�
�d��.����m�$�7 6�rpython3.12/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-312.pyc000064400000007442151732702010022313 0ustar00�

R`i���ddlmZddlmZmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZmZerdd	lmZd
ddd
d
d
�dddeedededeedeeddfd�Zedk(r(ddlmZe�dededd
fd�Zedd�e�y
y
)�)�Mapping)�
TYPE_CHECKING�Any�Optional�Tuple�)�ReprHighlighter)�Panel)�Pretty)�Table)�Text�TextType)�ConsoleRenderableNTF)�title�	sort_keys�
indent_guides�
max_length�
max_string�scopezMapping[str, Any]rrrrr�returnrc���t�}tjdd��}|jd��dtt
tfdttt
ffd�}|rt|j�|�	�n|j�}	|	D]P\}
}tj|
|
jd
�rdndfd
�}|j|t|||||����Rtj ||dd��S)a�Render python variables in a given scope.

    Args:
        scope (Mapping): A mapping containing variable names and values.
        title (str, optional): Optional title. Defaults to None.
        sort_keys (bool, optional): Enable sorting of items. Defaults to True.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.

    Returns:
        ConsoleRenderable: A renderable object.
    )rrF)�padding�expand�right)�justify�itemrc�P�|\}}|jd�|j�fS)z2Sort special variables first, then alphabetically.�__)�
startswith�lower)r�key�_s   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/scope.py�
sort_itemsz render_scope.<locals>.sort_items)s(�����Q��N�N�4�(�(�#�)�)�+�6�6�)r!rzscope.key.specialz	scope.key)z =zscope.equals)�highlighterrrrzscope.border)r�border_styler)r	r�grid�
add_columnr�strr�bool�sorted�itemsr
�assembler�add_rowrr
�fit)
rrrrrrr&�items_tabler$r-r!�value�key_texts
             r#�render_scoper4s���."�#�K��*�*�V�E�:�K����7��+�7��s�C�x��7�U�4��9�-=�7�
6?�F�5�;�;�=�j�1�E�K�K�M�E��
��U��=�=�
�����)=�%�;�O�"�
��	������'�+�%�%�
�		
���9�9���#��	�r%�__main__)�print�foo�barc�`�gd�}ddgd�dgdd�}ttt�dd	�
��y)N)r��N�TFzHello Worldz1.1�confirmFruitPurchase)�apple�orange�mangoes�pomelog+����?�	194521489)�version�method�params�idz	[i]localsF)rr)r6r4�locals)r7r8�list_of_things�dict_of_thingss    r#�testrJKs4��G���,�?��G��	
��	�l�6�8�;�%�H�Ir%g�k	��W4@g��?$	@)�collections.abcr�typingrrrrr&r	�panelr
�prettyr�tabler�textr
r�consolerr+�intr4�__name__�pip._vendor.richr6�floatrJ�r%r#�<module>rWs���#�6�6�(���� ��*�!%��� $� $�5��5��H��5��	5�
�5���
�
5���
�5��5�p�z��&�	�G�J�%�J�e�J��J�	��&��	�G�!r%python3.12/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-312.pyc000064400000001610151732702010022604 0ustar00�

R`i��(�ddlmZddlmZmZdd�Zy)�)�annotations)�IO�Callablec�P�t|dd�}|�	|�Sy#t$rYywxYw)z�Get fileno() from a file, accounting for poorly implemented file-like objects.

    Args:
        file_like (IO): A file-like object.

    Returns:
        int | None: The result of fileno if available, or None if operation failed.
    �filenoN)�getattr�	Exception)�	file_likers  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_fileno.py�
get_filenors?��(/�y�(�D�'I�F�
��	��8�O����	��		�s��	%�%N)r
zIO[str]�returnz
int | None)�
__future__r�typingrrr��r�<module>rs��"��rpython3.12/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-312.pyc000064400000003001151732702010022756 0ustar00�

R`i���j�ddlZddlZddlmZddlmZmZddlmZddl	m
Z
dd�Zedk(re�yy)	�N)�inspect)�Console�get_windows_console_features)�Panel)�Prettyc�X�t�}t|�t�}t|�d}|D�cic]}|tj|���}}|jt
jt|�d���|jdtj��d��ycc}w)z9Print a report to the terminal with debugging information)�TERM�	COLORTERM�CLICOLOR�NO_COLOR�TERM_PROGRAM�COLUMNS�LINES�JUPYTER_COLUMNS�
JUPYTER_LINES�JPY_PARENT_PID�VSCODE_VERBOSE_LOGGINGz[b]Environment Variables)�titlez
platform="�"N)rrr�os�getenv�printr�fitr�platform�system)�console�features�	env_names�name�envs     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/diagnose.py�reportr"
s����i�G��G��+�-�H��H���I�.7�
7�Y�T�4����4�� �Y�C�
7��M�M�%�)�)�V�C�[�1K�L�M��M�M�J�x���0�1��3�4��8s�B'�__main__)�returnN)
rr�pip._vendor.richr�pip._vendor.rich.consolerr�pip._vendor.rich.panelr�pip._vendor.rich.prettyrr"�__name__��r!�<module>r,s0��	��$�J�(�*�5�4�z��
�H�r+python3.12/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-312.pyc000064400000024272151732702020023673 0ustar00�

R`i����ddlZddlmZddlmZddlmZmZmZddl	m
Z
mZddlm
Z
ddlmZmZmZdd	lmZdd
lmZddlmZddlmZmZd
ZGd�de�Zedk(r�e�Zedd��ZddlZej?d�e ddd�D]QZ!ejEe!�ejGe�ejHjKd�ejLd��Sej?d�ejG�yy)�N)�	lru_cache)�	monotonic)�Iterable�List�Optional�)�Color�	blend_rgb)�ColorTriplet)�Console�ConsoleOptions�RenderResult)�JupyterMixin)�Measurement)�Segment)�Style�	StyleType�c�2�eZdZdZ									ddeededeedededed	ed
edeefd�Z	d
e
fd�Zed
eefd��Z
ed��	ddedede
deded
eefd��Zd dedeed
dfd�Z	ddededed
eefd�Zdeded
efd�Zdeded
efd�Zy)!�ProgressBara�Renders a (progress) bar. Used by rich.progress.

    Args:
        total (float, optional): Number of steps in the bar. Defaults to 100. Set to None to render a pulsing animation.
        completed (float, optional): Number of steps completed. Defaults to 0.
        width (int, optional): Width of the bar, or ``None`` for maximum width. Defaults to None.
        pulse (bool, optional): Enable pulse effect. Defaults to False. Will pulse if a None total was passed.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        animation_time (Optional[float], optional): Time in seconds to use for animation, or None to use system time.
    N�total�	completed�width�pulse�style�complete_style�finished_style�pulse_style�animation_timec
��||_||_||_||_||_||_||_||_|	|_d|_	y�N)
rrrrrrrrr�_pulse_segments)
�selfrrrrrrrrrs
          ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/progress_bar.py�__init__zProgressBar.__init__!sO����
�"�����
���
���
�,���,���&���,���8<����returnc�<�d|j�d|j�d�S)Nz<Bar z of �>�rr)r#s r$�__repr__zProgressBar.__repr__9s ���t�~�~�(��T�Z�Z�N�!�<�<r&c��|j�y|j|jzdz}tdtd|��}|S)zCalculate percentage complete.N�Y@�dg)rr�min�max)r#rs  r$�percentage_completedz ProgressBar.percentage_completed<sA���:�:����^�^�d�j�j�0�E�9�	���S��i�0�1�	��r&�)�maxsize�
fore_style�
back_style�color_system�no_color�asciic��|rdnd}g}|dvs|rA|t||�gtdzzz
}|t|rdn||�gttdzz
zz
}|S|j}|jr|jj	�ntddd�}	|jr|jj	�ntddd�}
tj}tj}t}
t}tj}tt�D]I}|tz}d|||zdz�d	zz}t|	|
|�
�}||
||||������K|S)z�Get a list of segments to render a pulse animation.

        Returns:
            List[Segment]: A list of segments, one segment per character.
        �-�━)�standard�	eight_bit�	truecolor�� �rg�?g@)�
cross_fade)�color)r�
PULSE_SIZE�appendrC�
get_truecolorr�math�cos�pirr	�from_triplet�ranger
)r#r4r5r6r7r8�bar�segmentsrE�
fore_color�
back_colorrHrI�_Segment�_StylerJ�index�position�faderCs                    r$�_get_pulse_segmentszProgressBar._get_pulse_segmentsEsb���c���"$���E�E�����j�1�2�j�A�o�F�F�H�����c�:�F�G��j�A�o�.��
�H��O��������
���*�*�,��c�1�c�*�	����
���*�*�,��a��A�&�	�
�h�h��
�W�W�������)�)���:�&�E��z�)�H���h��m�a�/�1�C�7�7�D��j�*��F�E��8�C��l�5�.A�!B�C�D�	'�
�r&c�H�||_|�||_y|j|_y)z�Update progress with new values.

        Args:
            completed (float): Number of steps completed.
            total (float, optional): Total number of steps, or ``None`` to not change. Defaults to None.
        Nr*)r#rrs   r$�updatezProgressBar.updatets!��#���#�/�U��
�T�Z�Z��
r&�consolec#�K�|j|jd��}|j|jd��}|j|||j|j
|��}t
|�}|j�
t�n|j}|t||z�dzz}	t|dz�|z}
|	|
|
|z}	|	Ed{���y7��w)a)Renders the pulse animation.

        Args:
            console (Console): Console instance.
            width (int): Width in characters of pulse animation.

        Returns:
            RenderResult: [description]

        Yields:
            Iterator[Segment]: Segments to render pulse
        �white)�default�black�r8Nr?�)
�	get_stylerrrUr6r7�lenrr�int)r#rXrr8r4r5�pulse_segments�
segment_count�current_timerM�offsets           r$�
_render_pulsezProgressBar._render_pulse~s������&�&�t�'7�'7��&�I�
��&�&�t�z�z�7�&�C�
��1�1��
�G�$8�$8�'�:J�:J�RW�2�
���N�+�
��.�.�6�I�K�D�<O�<O�	�"�S���)>�%?�!�%C�D���l�]�R�'�(�=�8���F�V�e�^�4�����s�CC�C
�C�optionsc#��K�t|jxs|j|j�}|jxs|j}|j
xs|jdu}|r|j|||��Ed{���y|j�*t|jtd|j��nd}|rdnd}|rdnd}|rdnd}	|jr |�t|dz|z|jz�n|dz}
|
dz}|
dz}|j|j�}
|jduxs|j|jk\}|j|r|jn|j�}t}|r|||z|���|r|||z|���|j s>||z
|z
}|r3|j"�&|s|r||	|
���|d	z}|r|||z|
���yyyyy7��i�w)
Nr]rr:r;r@u╸u╺r?r)r/r�	max_width�legacy_windows�
ascii_onlyrrrfr0rrar_rrrrr7r6)r#rXrgrr8�should_pulserrL�half_bar_right�
half_bar_left�complete_halves�	bar_count�half_bar_countr�is_finishedrrP�remaining_barss                  r$�__rich_console__zProgressBar.__rich_console__�s�����D�J�J�3�'�"3�"3�W�5F�5F�G���&�&�<�'�*<�*<���z�z�7�T�Z�Z�4�%7����)�)�'�5��)�F�F�F��8<�z�z�7M�C��
�
�C��4�>�>�2�3�SW�	��c��� %��5��$��%�
��z�z�i�3�
���	�I�%��
�
�2�3����	�
$�q�(�	�(�1�,���!�!�$�*�*�-���j�j�D�(�H�D�N�N�d�j�j�,H�� �*�*�#.�D���D�4G�4G�
������3��?�N�;�;���>�N�:�N�K�K����"�Y�.��?�N��'�"6�"6�"B�%�)�"�=�%�8�8�"�a�'�N�!�"�3��#7��?�?�"�	#C�~� �9
G�s�A>G,�G)�E)G,c��|j� t|j|j�Std|j�S)N�)rrri)r#rXrgs   r$�__rich_measure__zProgressBar.__rich_measure__�s>��
�z�z�%�
��
�
�D�J�J�/�	
��Q�� 1� 1�2�	
r&)	r-rNFzbar.backzbar.completezbar.finishedz	bar.pulseN)Fr!)�__name__�
__module__�__qualname__�__doc__r�floatra�boolrr%�strr+�propertyr1rrrrrUrWrrrfr
rrtrrw�r&r$rrs���� "'��#��%�$2�$2�!,�*.�=����=��=���}�	=�
�=��
=�"�=�"�=��=�!���=�0=�#�=���h�u�o�����r���
,��,��,��	,�
�,��
,�
�g��,��,�\@��@�h�u�o�@��@�;@����'*��37��	�'�	��<+@��+@�)7�+@�	�+@�Z
��
�)7�
�	�
r&r�__main__�2r.)rrF�e�
g�������?T)'rG�	functoolsr�timer�typingrrrrCr	r
�
color_tripletrrXrr
r�jupyterr�measurer�segmentrrrrrDrrxrL�show_cursorrK�nrW�print�file�write�sleepr�r&r$�<module>r�s������+�+�#�'�:�:�!� ��#��
�~
�,�~
�B�z���i�G�
�B�c�
*�C�������
�1�c�1�
���
�
�1�
��
�
�c�������4� ���
�
�4��	�
������M�M�O�r&python3.12/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-312.pyc000064400000006505151732702020024177 0ustar00�

R`i*
����ddlmZmZmZddlmZddlmZeeeefZ	Gd�d�Z
e
ddgd	�gd
��Ze
ddgd
�gd��Ze
ddgd�gd��Z
e
ddgd�gd��Ze
ddgd�gd��Zy)�)�List�Optional�Tuple�)�ColorTriplet)�Palettec�B�eZdZdZ	d	dededeedeeeddf
d�Zy)
�
TerminalThemea�A color theme used when exporting console content.

    Args:
        background (Tuple[int, int, int]): The background color.
        foreground (Tuple[int, int, int]): The foreground (text) color.
        normal (List[Tuple[int, int, int]]): A list of 8 normal intensity colors.
        bright (List[Tuple[int, int, int]], optional): A list of 8 bright colors, or None
            to repeat normal intensity. Defaults to None.
    N�
background�
foreground�normal�bright�returnc�f�t|�|_t|�|_t||xs|z�|_y�N)r�background_color�foreground_colorr�ansi_colors)�selfrrr
rs     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/terminal_theme.py�__init__zTerminalTheme.__init__s5��!-�j� 9��� ,�j� 9���"�6�V�-=�v�#>�?���r)�__name__�
__module__�__qualname__�__doc__�_ColorTuplerrr�rrr
r
	sV���/3�	@��	@� �	@��[�!�		@�
��k�*�+�	@�
�
	@rr
��r r �rrr)r!)�rr)rr"r)r"r"r)rrr")r"rr")rr"r")�r#r#))r"r"r")r rr)rr r)r r r)rrr )r rr )rr r r)�r$r$)��r%r%)	)�r&r&���r�_�����$)������er r'��X����)�����)�b�^�L)r'r*)r,���ar1r'r4)�r@��)�rBrB����)	)�:�=�C)��?�H)���;)r9��5)�O�v�)��\�)�W��rC)��rM))�rr0)��r�/)r8�p�3)��m��)r]r�g)�.rard)r.r rD��@rK�S)	)r��')���B�>)�*�r+)���r)rLrS��rh)���j��z�rzrx))��nr|)�I��r9)rr���k)rV���)�irar+)r���)r+��)�)r�r��r9����)	)�K�N�U)��r��Z)r+�r�)r~��D)�`�r�)r+r_r�)�h�r�r�)rN��))r �&rl)r�rH)r~�rn)rBr���)r �,ry)�9r�r")r.r.r9N)�typingrrr�
color_tripletr�paletter�intrr
�DEFAULT_TERMINAL_THEME�MONOKAI�DIMMED_MONOKAI�NIGHT_OWLISH�SVG_EXPORT_THEMErrr�<module>r�s���(�(�'���C��c�M�"��@�@�.'��
�	�	���2���
����0���
����0���
����2!���
���rpython3.12/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-312.pyc000064400000024257151732702020024235 0ustar00�

R`i�����UddlmZddlmZidej��deddddddddddd���d	ed
���ded���d
ed
���ded
���ded
d
���ded
���ded
���ded
���ded
���ded
���ded
���ded
���ded� ��d!ed!� ��d"ed"� ��id#ed#� ��d$ed$� ��d%ed%� ��d&ed&� ��d'ed#d
�(��d)ed#d
d
�*��d+ed
d!�,��d-ed
d.�/��d0ed
d.�/��d1ed
d.�/��d2ed
d!�,��d3e��d4ed%� ��d5ed
���d6ed"� ��d7ed
d!�,��d8edd!�9���id:edd;�9��d<ed
d#�,��d=ed
���d>ed"� ��d?ed;� ��d@ed!� ��dAed!d
�B��dCed!d
d
�D��dEej��dFed%d
�G��dHej��dIed
���dJed#� ��dKed"d
�G��dLed!d
�B��dMed"dd�N��dOed
����idPed
���dQed
dR�,��dSed
dR�,��dTed
dR�,��dUed
dR�,��dVed
���dWedXd
�B��dYed� ��dZed
���d[ed#d�(��d\ed
���d]ed$d�(��d^ed%d
d�_��d`ed%d
d�_��daedRd
�(��dbedcd
�(��dded$d
�(���ideed
dfdd�g��dhedid�B��djed$d
�B��dked$� ��dledX� ��dmedR� ��dnej��doed
���dpedRd
�(��dqedcd
�(��dred$d
�(��dsed%d
d�_��dted"dd�N��dued;d
�B��dvej��dwed$d
�B��dxed%d
�B���idyed!� ��dzed!� ��d{ej��d|ed;� ��d}ed#d
�(��d~ed#d
d
�*��ded!� ��d�ed
���d�ed
���d�ej��d�ed
���d�ed
d
����d�ed!d
�(��d�edc� ��d�ed!� ��d�ej��d�ed!d
�B���id�edcd
�B��d�ej��d�edcd
�B��d�ed�� ��d�ed�� ��d�ed�� ��d�ed�� ��d�ej��d�ed"� ��d�ed"� ��d�ed"� ��d�ed#� ��d�ed$� ��d�ed%� ��d�ed!� ��d�ed"� ��d�ed"� ���id�e��d�e��d�e��d�e��d�ed
���d�ed
���d�ed
���d�ed
d%d����d�ed%d����d�ed$� ��d�ed%� ��d�e��d�ed#d
�B��d�ed#d
�B��d�ed#� ��d�e��d�ed
����ed
d
���ed
��ed
d
���ed
��ed
��ed
d
���edf� �ed;d
���ed
��ed;� �ed$� �ed#� �d���Zeeefed�<ed�k(r�dd�l	Z	dd�l
Z
dd�lmZdd�l
mZdd�lmZe	j"�Zej'd�d�d����ej)�Zej,Zeed�<ered
d�e
j0��«ne�Zed�dīZej7�D]%\ZZej;eee�ūee���'ej=e�ereej?d
�ƫ�y�y�y�)��)�Dict�)�Style�none�reset�defaultF)�color�bgcolor�dim�bold�italic�	underline�blink�blink2�reverse�conceal�strikerT)r�brightr)r�strong�code)rrr
)r
�	emphasizer)rr)rr)rr)rr)r�black)r	�red�green�yellow�magenta�cyan�whitezinspect.attr)r	r
zinspect.attr.dunder)r	r
rzinspect.callable)rr	zinspect.async_def�bright_cyan)r
r	zinspect.defz
inspect.classz
inspect.errorzinspect.equalszinspect.helpzinspect.doczinspect.value.borderz
live.ellipsiszlayout.tree.row)rr	zlayout.tree.column�bluezlogging.keywordzlogging.level.notsetzlogging.level.debugzlogging.level.infozlogging.level.warningzlogging.level.error)r	rzlogging.level.critical)r	rrz	log.levelzlog.time)r	rzlog.messagezlog.pathz
repr.ellipsiszrepr.indentz
repr.errorzrepr.str)r	r
rz
repr.bracez
repr.commaz	repr.ipv4�bright_greenz	repr.ipv6z
repr.eui48z
repr.eui64zrepr.tag_startz
repr.tag_name�bright_magentazrepr.tag_contentszrepr.tag_endzrepr.attrib_namezrepr.attrib_equalzrepr.attrib_valuezrepr.number)r	rr
zrepr.number_complexzrepr.bool_truezrepr.bool_false�
bright_redz	repr.nonezrepr.url�bright_blue)rr	r
rz	repr.uuid�
bright_yellowz	repr.callz	repr.pathz
repr.filenamez	rule.linez	rule.textz
json.bracezjson.bool_truezjson.bool_falsez	json.nullzjson.numberzjson.strzjson.key�promptzprompt.choiceszprompt.defaultzprompt.invalidzprompt.invalid.choice�prettyzscope.borderz	scope.keyzscope.key.specialzscope.equalsztable.headerztable.footerz
table.cellztable.titlez
table.caption)r
rztraceback.errorztraceback.border.syntax_errorztraceback.borderztraceback.textztraceback.titleztraceback.exc_typeztraceback.exc_valueztraceback.offsetzbar.back�grey23zbar.completezrgb(249,38,114)zbar.finishedzrgb(114,156,31)z	bar.pulsezprogress.descriptionzprogress.filesizezprogress.filesize.totalzprogress.downloadzprogress.elapsedzprogress.percentagezprogress.remainingzprogress.data.speedzprogress.spinnerzstatus.spinner�treez	tree.linezmarkdown.paragraphz
markdown.textzmarkdown.emz
markdown.emphzmarkdown.strongz
markdown.code)rr	r
zmarkdown.code_block)r	r
zmarkdown.block_quotez
markdown.listz
markdown.itemzmarkdown.item.bulletzmarkdown.item.numberzmarkdown.hrzmarkdown.h1.borderzmarkdown.h1)rr)rr)r	r)zmarkdown.h2zmarkdown.h3zmarkdown.h4zmarkdown.h5zmarkdown.h6zmarkdown.h7z
markdown.linkzmarkdown.link_urlz
markdown.sziso8601.dateziso8601.timeziso8601.timezone�DEFAULT_STYLES�__main__N)�Console)�Table)�Textz--html�
store_truezExport as HTML table)�action�help�html�F)�record�width�file�Name�Styling)�style)�
inline_styles) �typingrr9r�nullr*�str�__annotations__�__name__�argparse�io�pip._vendor.rich.consoler,�pip._vendor.rich.tabler-�pip._vendor.rich.textr.�ArgumentParser�parser�add_argument�
parse_args�argsr2�bool�StringIO�console�table�items�
style_name�add_row�print�export_html����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/default_styles.py�<module>rVs�����a$�
�J�E�J�J�L�a$��U����
���������a$�
�5�T�?�a$� 
�e���!a$�"�E�t��#a$�$
�e���%a$�&�E�$�T�*�'a$�(
�e�4� �)a$�*��d�#�+a$�,���&�-a$�.�U��
�/a$�0
�e�4� �1a$�2�u�T�"�3a$�4
�e�4� �5a$�6�U��
!�7a$�8
�5�u��9a$�:�U��
!�;a$�<
�e�(�#�=a$�>�u�9�%�?a$�@�E���Aa$�B�U��
!�Ca$�D�E���6�Ea$�F�5�x��$�G�Ga$�H��4�u�5�Ia$�J��d�-�@�Ka$�L�5��M�:�Ma$�N�U�$�m�<�Oa$�P�U��E�2�Qa$�R�e�g�Sa$�T�E��'�Ua$�V�5�T�?�Wa$�X�E��0�Ya$�Z�U��E�2�[a$�\�u��e�4�]a$�^�%�E��8�_a$�`�u�$�h�7�aa$�b�E�d�O�ca$�d�5�w�/�ea$�f�%�f�-�ga$�h�U��/�ia$�j�5�u�4�8�ka$�l�e�%�d�D�I�ma$�n������oa$�p��F��-�qa$�r�:�5�:�:�<�sa$�t��$��ua$�v�U��*�wa$�x�5�w�D�1�ya$�z�%�e�$�/�{a$�|��G�E��>�}a$�~�%�T�"�a$�@�%�T�"�Aa$�B��D��7�Ca$�D��D��7�Ea$�F�%�T��8�Ga$�H�%�T��8�Ia$�J�e��&�Ka$�L�U�!1��=�Ma$�N��Y�/�Oa$�P�E�t�$�Qa$�R��H�U�;�Sa$�T��D�)�Ua$�V��Y�u�=�Wa$�X�5�v�D��?�Ya$�Z�5�v�D��G�[a$�\�e�.��>�]a$�^�u�<��=�_a$�`��Y�t�4�aa$�b���M�%�e�T�ca$�d��_�5�9�ea$�f��Y�T�2�ga$�h��Y�'�ia$�j�U�!1�2�ka$�l��^�,�ma$�n������oa$�p�%�T�"�qa$�r�e�.��>�sa$�t�u�<��=�ua$�v��Y�t�4�wa$�x�5�v�D��?�ya$�z��G�E��>�{a$�|��F��.�}a$�~
�j�e�j�j�l�a$�@�e�)�$�7�Aa$�B�e�&�t�4�Ca$�D�e�%�(�Ea$�F�U��/�Ga$�H
�j�e�j�j�l�Ia$�J�E��'�Ka$�L��X�d�3�Ma$�N��X�d��E�Oa$�P�E��&�Qa$�R�E�t�$�Sa$�T�E�t�$�Ua$�V�*�%�*�*�,�Wa$�X�5��%�Ya$�Z�U�$�D�1�[a$�\�u�5��6�]a$�^$�U��%>�_a$�`��E�*�aa$�b�j�e�j�j�l�ca$�d�u�5�t�4�ea$�f�%�l��>�ga$�h�:�5�:�:�<�ia$�j��L�t�<�ka$�l��H�%�ma$�n�E� 1�2�oa$�p�E� 1�2�qa$�r��.�/�sa$�t�J�E�J�J�L�ua$�v��W�-�wa$�x�u�7�3�ya$�z��W�-�{a$�|��H�-�}a$�~�5�y�1�a$�@�%�f�-�Aa$�B�5�u�-�Ca$�D��G�,�Ea$�F�e�'�*�Ga$�H�E�G�Ia$�J���Ka$�L�%�'�Ma$�N�U�W�Oa$�P�5��%�Qa$�R�U�$�'�Sa$�T�u�$�'�Ua$�V�U��F�G�D�Wa$�X�5�v�w�?�Ya$�Z�E�	�2�[a$�\�U��(�]a$�^�U�W�_a$�`�E��t�<�aa$�b�E��t�<�ca$�d�5�x�(�ea$�f�%�'�ga$�h�5�d�#�ia$�j�d�d�3��d�#��d��-��4�(���%���$�/���/��V�t�<��t�$���'��	�*��H�-�Aa$���S�%�Z� �a�H�z���
�0�,�*�
$�X�
$�
$�
&�F�
�����<R��S�����D����D�$��DH�g�T��+�"�+�+�-�@�g�i�G��&�)�$�E�+�1�1�3��
�E�
�
�
�d�:�U�3�S��Z�@�4��M�M�%���
�g�!�!��!�5�6��)rTpython3.12/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-312.pyc000064400000014433151732702020022642 0ustar00�

R`i����ddlmZddlmZmZmZmZmZddlm	Z	ddl
mZmZer
ddl
mZmZmZGd�de�Zd	d
ddd
edddfd�Zy)�)�
itemgetter)�
TYPE_CHECKING�Callable�
NamedTuple�Optional�Sequence�)�errors)�
is_renderable�	rich_cast)�Console�ConsoleOptions�RenderableTypec��eZdZUdZeed<	eed<	edefd��Zdd�Zdeddfd�Z	deddfd	�Z
	ddeedeeddfd
�Ze
								dd��Zy
)�MeasurementzSStores the minimum and maximum widths (in characters) required to render an object.�minimum�maximum�returnc�4�|j|jz
S)z+Get difference between maximum and minimum.)rr)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/measure.py�spanzMeasurement.spans���|�|�d�l�l�*�*�c
��|\}}ttd|�|�}ttd|�tdt||���S)z�Get measurement that ensures that minimum <= maximum and minimum >= 0

        Returns:
            Measurement: A normalized measurement.
        r)�min�maxr)rrrs   r�	normalizezMeasurement.normalizesA�� �����c�!�W�o�w�/���3�q�'�?�C��3�w��3H�,I�J�Jr�widthc�L�|\}}tt||�t||��S)z�Get a RenderableWith where the widths are <= width.

        Args:
            width (int): Maximum desired width.

        Returns:
            Measurement: New Measurement object.
        )rr�rrrrs    r�with_maximumzMeasurement.with_maximum"s)�� �����3�w��.��G�U�0C�D�Drc�d�|\}}td|�}tt||�t||��S)z�Get a RenderableWith where the widths are >= width.

        Args:
            width (int): Minimum desired width.

        Returns:
            Measurement: New Measurement object.
        r)rrr s    r�with_minimumzMeasurement.with_minimum.s4�� �����A�u�
���3�w��.��G�U�0C�D�DrN�	min_width�	max_widthc�V�|}|�|j|�}|�|j|�}|S)aNClamp a measurement within the specified range.

        Args:
            min_width (int): Minimum desired width, or ``None`` for no minimum. Defaults to None.
            max_width (int): Maximum desired width, or ``None`` for no maximum. Defaults to None.

        Returns:
            Measurement: New Measurement object.
        )r#r!)rr$r%�measurements    r�clampzMeasurement.clamp;s;����� �%�2�2�9�=�K�� �%�2�2�9�=�K��rc���|j}|dkrtdd�St|t�r|j	||j
d��}t
|�}t|�rlt|dd�}|�Q|||�j�j|�}|jdkrtdd�S|j�Std|�Stjd|�d���)	a�Get a measurement for a renderable.

        Args:
            console (~rich.console.Console): Console instance.
            options (~rich.console.ConsoleOptions): Console options.
            renderable (RenderableType): An object that may be rendered with Rich.

        Raises:
            errors.NotRenderableError: If the object is not renderable.

        Returns:
            Measurement: Measurement object containing range of character widths required to render the object.
        r	rF)�markup�	highlight�__rich_measure__NzUnable to get render width for zD; a str, Segment, or object with __rich_console__ method is required)r%r�
isinstance�str�
render_strr*rr�getattrrr!rr
�NotRenderableError)�cls�console�options�
renderable�
_max_width�get_console_width�render_widths       r�getzMeasurement.getNs���"�&�&�
���>��q�!�$�$��j�#�&� �+�+��7�>�>�U�,��J��z�*�
���$��
�$6��=�
�!�,�%�g�w�7��Y�[�!�\�*�-��
 �'�'�!�+�&�q�!�,�,�#�-�-�/�/�"�1�j�1�1��+�+�1�*��@U�U��
r)rr)NN)r3r
r4rr5rrr)�__name__�
__module__�__qualname__�__doc__�int�__annotations__�propertyrrr!r#rr(�classmethodr9�rrrrs���]�
�L�5�
�L�5�
�+�c�+��+�K�
E�#�
E�-�
E�E�#�E�-�E�KO��!�#���:B�3�-��	��&�+��+�*:�+�HX�+�	�+��+rrr3r
r4r�renderablesrrc	�
�|stdd�Stj}|D�cgc]}||||���}}tt|td���jt|td���j
�}|Scc}w)a�Get a measurement that would fit a number of renderables.

    Args:
        console (~rich.console.Console): Console instance.
        options (~rich.console.ConsoleOptions): Console options.
        renderables (Iterable[RenderableType]): One or more renderable objects.

    Returns:
        Measurement: Measurement object containing range of character widths required to
            contain all given renderables.
    r)�keyr	)rr9rrrr)r3r4rC�get_measurementr5�measurements�measured_widths       r�measure_renderablesrI}s��� ��1�a� � �!�o�o�O�HS��HS�*����*�5����!��L�j��m�,�4�4��L�j��m�,�4�4��N����s�BN)�operatorr�typingrrrrr�r
�protocolrrr3r
rrrrIrBrr�<module>rNs[���J�J��.��@�@�o�*�o�d�
��
���*�+���	rpython3.12/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-312.pyc000064400000034756151732702020022534 0ustar00�

R`i',���ddlmZmZmZmZmZmZmZmZddl	m
Z
ddlmZddl
mZmZed�Zed�ZGd�d	e�ZGd
�de�ZGd�d
ee�ZGd�dee�ZGd�dee�ZGd�dee�ZGd�dee�Zedk(r�ddlmZejAdd��r�	ejAdd��Z!e!dk\re!dkrn	ed��'ede!���	ejAd d�!�Z"e#e"�dk\rn	ed"��(ed#e"���ejAd$gd%��&�Z$ed'e$���y)ed(�y)y))*�)�Any�Generic�List�Optional�TextIO�TypeVar�Union�overload�)�get_console)�Console)�Text�TextType�
PromptType�DefaultTypec��eZdZdZy)�PromptErrorz/Exception base class for prompt related errors.N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/prompt.pyrrs��9rrc�,�eZdZdZdeddfd�Zdefd�Zy)�InvalidResponsez�Exception to indicate a response was invalid. Raise this within process_response() to indicate an error
    and provide an error message.

    Args:
        message (Union[str, Text]): Error message.
    �message�returnNc��||_y�N�r)�selfrs  r�__init__zInvalidResponse.__init__s	����rc��|jSr r!�r"s r�__rich__zInvalidResponse.__rich__s���|�|�r)rrrrrr#r&rrrrrs&������T���(�rrc���eZdZUdZeZeed<dZdZ	dZ
dZee
eed<	d(dddd	d	d
�dedeed
edee
edededdfd�Zee	d(dddd	d	dd�dedeed
edee
ededededeedeeeffd���Zee	d(dddd	d	dd�dedeed
edee
edededeedefd���Ze	d(dddd	d	ddd�dedeed
edee
ededededeedefd��Zdedefd�Zdedefd�Ze	d)deded
edeedef
d��Zdedefd�Zdedefd�Zded e ddfd!�Z!d*d"�Z"edd#�deedefd$��Z#edd#�dedeedeeeffd%��Z#ddd&�dedeedefd'�Z#y)+�
PromptBasea�Ask the user for input until a valid response is received. This is the base class, see one of
    the concrete classes for examples.

    Args:
        prompt (TextType, optional): Prompt text. Defaults to "".
        console (Console, optional): A Console instance or None to use global console. Defaults to None.
        password (bool, optional): Enable password input. Defaults to False.
        choices (List[str], optional): A list of valid choices. Defaults to None.
        show_default (bool, optional): Show default in prompt. Defaults to True.
        show_choices (bool, optional): Show choices in prompt. Defaults to True.
    �
response_typez*[prompt.invalid]Please enter a valid valuezA[prompt.invalid.choice]Please select one of the available optionsz: N�choicesFT��console�passwordr*�show_default�show_choices�promptr,r-r.r/rc���|xs
t�|_t|t�rt	j
|d��n||_||_|�||_||_	||_
y)Nr0��style)rr,�
isinstance�strr�from_markupr0r-r*r.r/)r"r0r,r-r*r.r/s       rr#zPromptBase.__init__5s`���/�+�-����&�#�&�
���V�8�4��	
��
!��
���"�D�L�(���(��r)r,r-r*r.r/�stream�defaultr7c��yr r)	�clsr0r,r-r*r.r/r8r7s	         r�askzPromptBase.askKs��	rc��yr r)r:r0r,r-r*r.r/r7s        rr;zPromptBase.ask[s��	r.)r,r-r*r.r/r8r7c�2�|||||||��}	|	||��S)aShortcut to construct and run a prompt loop and return the result.

        Example:
            >>> filename = Prompt.ask("Enter a filename")

        Args:
            prompt (TextType, optional): Prompt text. Defaults to "".
            console (Console, optional): A Console instance or None to use global console. Defaults to None.
            password (bool, optional): Enable password input. Defaults to False.
            choices (List[str], optional): A list of valid choices. Defaults to None.
            show_default (bool, optional): Show default in prompt. Defaults to True.
            show_choices (bool, optional): Show choices in prompt. Defaults to True.
            stream (TextIO, optional): Optional text file open for reading to get input. Defaults to None.
        r+�r8r7r)
r:r0r,r-r*r.r/r8r7�_prompts
          rr;zPromptBase.askjs/��6�����%�%�

���w�v�6�6rc�"�td|�d�d�S)z�Turn the supplied default in to a Text instance.

        Args:
            default (DefaultType): Default value.

        Returns:
            Text: Text containing rendering of default value.
        �(�)�prompt.default)r)r"r8s  r�render_defaultzPromptBase.render_default�s���a��y��N�$4�5�5rc��|jj�}d|_|jrP|jrDdj|j�}d|�d�}|j
d�|j
|d�|dk7r[|jrOt|t|jf�r3|j
d�|j|�}|j
|�|j
|j�|S)z�Make prompt text.

        Args:
            default (DefaultType): Default value.

        Returns:
            Text: Text to display in prompt.
        ��/�[�]� zprompt.choices.)
r0�copy�endr/r*�join�appendr.r4r5r)rD�
prompt_suffix)r"r8r0�_choicesr*�_defaults      r�make_promptzPromptBase.make_prompt�s������!�!�#����
��������x�x����-�H��(��1�o�G��M�M�#���M�M�'�#3�4�
�s�N��!�!��7�S�$�*<�*<�$=�>��M�M�#���*�*�7�3�H��M�M�(�#��
�
�d�(�(�)��
rc�*�|j|||��S)z�Get input from user.

        Args:
            console (Console): Console instance.
            prompt (TextType): Prompt text.
            password (bool): Enable password entry.

        Returns:
            str: String from user.
        )r-r7)�input)r:r,r0r-r7s     r�	get_inputzPromptBase.get_input�s��$�}�}�V�h�v�}�F�Fr�valuec�V�|j�J�|j�|jvS)z�Check value is in the list of valid choices.

        Args:
            value (str): Value entered by user.

        Returns:
            bool: True if choice was valid, otherwise False.
        )r*�strip�r"rVs  r�check_choicezPromptBase.check_choice�s)���|�|�'�'�'��{�{�}����,�,rc���|j�}	|j|�}|j
�&|j
|�st|j��|S#t$rt|j��wxYw)aProcess response from user, convert to prompt type.

        Args:
            value (str): String typed by user.

        Raises:
            InvalidResponse: If ``value`` is invalid.

        Returns:
            PromptType: The value to be returned from ask method.
        )rXr)�
ValueErrorr�validate_error_messager*rZ�illegal_choice_message)r"rV�return_values   r�process_responsezPromptBase.process_response�sv�����
��	?�'+�'9�'9�%�'@�L��<�<�#�D�,=�,=�e�,D�!�$�"=�"=�>�>����
�	?�!�$�"=�"=�>�>�	?�s�A�A6�errorc�:�|jj|�y)z�Called to handle validation error.

        Args:
            value (str): String entered by user.
            error (InvalidResponse): Exception instance the initiated the error.
        N)r,�print)r"rVras   r�on_validate_errorzPromptBase.on_validate_error�s��	
�����5�!rc��y)z,Hook to display something before the prompt.Nrr%s r�
pre_promptzPromptBase.pre_prompt�s�r�r7c��yr r)r"r7s  r�__call__zPromptBase.__call__�s��rc��yr r)r"r8r7s   rrizPromptBase.__call__s��	rr>c�(�	|j�|j|�}|j|j||j|��}|dk(r|dk7r|S	|j|�}|S#t$r}|j||�Yd}~��d}~wwxYw)z�Run the prompt loop.

        Args:
            default (Any, optional): Optional default value.

        Returns:
            PromptType: Processed value.
        rgrF.N)rfrRrUr,r-r`rrd)r"r8r7r0rVr_ras       rrizPromptBase.__call__s�����O�O���%�%�g�.�F��N�N�4�<�<�����v�N�V�E���{�w�#�~���
$�#�4�4�U�;��
$�#��	#�
��&�&�u�e�4���
�s�A,�,	B�5B�B)rFr )rN)$rrrrr5r)�type�__annotations__r]r^rOr*rrrr
�boolr#�classmethodr
rrr	rr;rrrDrRrUrZr`rrdrfrirrrr(r(s���
��M�4��I��K���M�#'�G�X�d�3�i�
 �'��)�&*��'+�!�!�)��)��'�"�	)�
�)��$�s�)�$�
)��)��)�
�)�,�
���&*��'+�!�!�#'�����'�"�	�
���$�s�)�$�
��������� ��
�{�J�&�	'������
���&*��'+�!�!�#'�����'�"�	�
���$�s�)�$�
������� ��
�������"7�&*��'+�!�!��#'�"7��"7��'�"�	"7�
�"7��$�s�)�$�
"7��"7��"7��"7��� �"7�

�"7��"7�H	6�k�	6�d�	6��;��4��>�$(�G��G��G��	G�
�� �G�

�
G��G�&
-�#�
-�$�
-��c��j��."�s�"�?�"�t�"�;��59��(�6�"2��j�����BF��%��/7��/?��	�z�;�&�	'����
*-��$�3�$�h�v�6F�$�RU�$rr(c��eZdZdZeZy)�PromptzbA prompt that returns a str.

    Example:
        >>> name = Prompt.ask("Enter your name")


    N)rrrrr5r)rrrrqrqs����Mrrqc��eZdZdZeZdZy)�	IntPromptz�A prompt that returns an integer.

    Example:
        >>> burrito_count = IntPrompt.ask("How many burritos do you want to order")

    z3[prompt.invalid]Please enter a valid integer numberN)rrrr�intr)r]rrrrsrs*s����M�R�rrsc��eZdZdZeZdZy)�FloatPromptzyA prompt that returns a float.

    Example:
        >>> temperature = FloatPrompt.ask("Enter desired temperature")

    z%[prompt.invalid]Please enter a numberN)rrrr�floatr)r]rrrrvrv6s����M�D�rrvc�R�eZdZUdZeZdZddgZee	e
d<dedefd�Z
d	e	defd
�Zy)�ConfirmzuA yes / no confirmation prompt.

    Example:
        >>> if Confirm.ask("Continue"):
                run_job()

    z#[prompt.invalid]Please enter Y or N�y�nr*r8rc�^�|j\}}t|rd|�d�d��Sd|�d�d��S)z8Render the default as (y) or (n) rather than True/False.rArBrCr2)r*r)r"r8�yes�nos    rrDzConfirm.render_defaultOs:���,�,���R��'�a��u�A�J�@P�Q�Q��2�$�a�y�@P�Q�QrrVc��|j�j�}||jvrt|j��||jdk(S)zConvert choices to a bool.r)rX�lowerr*rr]rYs  rr`zConfirm.process_responseTsF�����
�#�#�%������$�!�$�"=�"=�>�>�����Q��'�'rN)rrrrrnr)r]r*rr5rmrrrDr`rrrryryBsO����M�B���s��G�T�#�Y�#�R�k�R�d�R�
(�c�(�d�(rry�__main__)rczRun [i]prompt[/i] tests?T)r8z6:rocket: Enter a number between [b]1[/b] and [b]10[/b]��
z=:pile_of_poo: [prompt.invalid]Number must be between 1 and 10znumber=z=Please enter a password [cyan](must be at least 5 characters))r-z"[prompt.invalid]password too shortz	password=z
Enter a fruit)�apple�orange�pear)r*zfruit=z[b]OK :loudly_crying_face:N)%�typingrrrrrrr	r
rFrr,r
�textrrrr�	Exceptionrrr(r5rqrtrsrvrnryr�pip._vendor.richrcr;�resultr-�len�fruitrrr�<module>r�s���Q�Q�Q��� �
�\�
"�
��m�$��:�)�:��k��}$���$�}$�@	�Z��_�	�	S�
�3��	S�	E�*�S�/�	E�(�j���(�4�z��&��{�{�-�t�{�<���]�]�H�RS�#��F���{�v��|���Q�R�
�	���x� �!���z�z�O��"��H��8�}��!���6�7��	�	�(��&�'��
�
�?�4O�
�P��
��u�i� �!�	�*�+�9rpython3.12/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-312.pyc000064400000024145151732702030022723 0ustar00�

R`i!�	�J�ddlZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZGd�d�Zdefd�Ze dk(�r�e	ejB�d��Z"e�Z#e�Z$e"jKe#�e&e�e$z
dzd�Z'ejB�e"_(e�Z$e"jKe#�e&e�e$z
dzd�Z)e	d��Z*e*jKe#�e%de'�d��e%de)�d��ddl+m,Z,e	�Z"ejZd��Z.e.j_dd��e.j_d� �e.jad!d"�e.jad#d$�ejbd%�Z2ejZd&��Z3e3j_�e3j_d� �e3jae2e.�e"jKe,jhe3ejjd'd(d)�*�d+�,�yy)-�N)�process_time)�box)�Color)�Console�ConsoleOptions�Group�RenderableType�RenderResult)�Markdown)�Measurement)�Pretty)�Segment)�Style)�Syntax)�Table)�Textc�4�eZdZdededefd�Zdddedefd�Zy)�ColorBox�console�options�returnc	#��K�tdd�D]�}t|j�D]�}||jz}d|dzdzz}tj||d�\}}}	tj||dzd�\}
}}t	j
|dz|dz|	dz�}
t	j
|
dz|dz|dz�}t
dt||
�	������t
j�����y�w)
Nr�g�������?gffffff�?g�?g�Q���?�u▄)�color�bgcolor)	�range�	max_width�colorsys�
hls_to_rgbr�from_rgbrr�line)�selfrr�y�x�h�l�r1�g1�b1�r2�g2�b2rrs               ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/__main__.py�__rich_console__zColorBox.__rich_console__s������q�!��A��7�,�,�-����)�)�)���A��E�S�=�)��%�0�0��A�s�;�
��B��%�0�0��A��L�#�F�
��B���.�.��c��2��8�R�#�X�F�����r�C�x��c��2��8�D���e�U���%H�I�I�.��,�,�.� ��s�C/C1rc�.�td|j�S)N�)rr)r#rrs   r.�__rich_measure__zColorBox.__rich_measure__!s���1�g�/�/�0�0�N)	�__name__�
__module__�__qualname__rrr
r/rr2�r3r.rrs<��!��!�)7�!�	�!�1� �1�+9�1�	�1r3rrc�T�tjdd��}d|_|jdddd��|jd	�td
dddd��}|j	d
t��|j	d|�|j	dd�d}tjdd��}d|_|j	t|dd��t|dd��t|dd��t|dd���|j	dttjd�|��dtdtdtfd �}|j	d!d"�d#}|j	d$|�tdddd%d&gtj�'�}|jd(dd�)�|jd*d�+�|jd,d-dd�.�|jd/d0dd�.�|j	d1d2d3d4�|j	d5d6d3d7�|j	d8d9d:d;�|j	d<d=d>d?�|j	d@|�dA}dBdCgdDdE�}|j	dF|t|dGdd�H�t|d�I���dJ}	|j	dK|dL|	zt|	���|j	dMdN�|S)Oz8Get a renderable that demonstrates a number of features.r1T)�padding�pad_edgez
Rich features�Feature�centerzbold red)�no_wrap�justify�style�
DemonstrationNF)r�expand�show_header�	show_edger:u�✓ [bold green]4-bit color[/]
✓ [bold blue]8-bit color[/]
✓ [bold magenta]Truecolor (16.7 million)[/]
✓ [bold yellow]Dumb terminals[/]
✓ [bold cyan]Automatic color conversion�Colors�Stylesz�All ansi styles: [bold]bold[/], [dim]dim[/], [italic]italic[/italic], [underline]underline[/], [strike]strikethrough[/], [reverse]reverse[/], and even [blink]blink[/].z�Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque in metus sed sapien ultricies pretium a at justo. Maecenas luctus velit et auctor maximus.)r9�collapse_padding�left�green)r>r?�yellow�right�blue�full�redrz[Word wrap text. Justify [green]left[/], [yellow]center[/], [blue]right[/] or [red]full[/].
�renderable1�renderable2rc��tdddd��}|jdd��|jdd��|j||�|S)NFT)rBr:rrA�1r1)�ratio�2)r�
add_column�add_row)rNrO�tables   r.�
comparisonz"make_test_card.<locals>.comparisonZsK���%�%�T�$�O��
����A��&�
����A��&�
�
�
�k�;�/��r3zAsian
language
supportu!:flag_for_china:  该库支持中文,日文和韩文文本!
:flag_for_japan:  ライブラリは中国語、日本語、韓国語のテキストをサポートしています
:flag_for_south_korea:  이 라이브러리는 중국어, 일본어 및 한국어 텍스트를 지원합니다z�[bold magenta]Rich[/] supports a simple [i]bbcode[/i]-like [b]markup[/b] for [yellow]color[/], [underline]style[/], and emoji! :+1: :apple: :ant: :bear: :baguette_bread: :bus: �Markup�none�dim)rCrBrA�
row_stylesrz[green]Date)r?r=z[blue]Title)r?z[cyan]Production Budget�cyan)r?r>r=z[magenta]Box Office�magentazDec 20, 2019z Star Wars: The Rise of Skywalkerz$275,000,000z$375,126,118zMay 25, 2018z[b]Solo[/]: A Star Wars Storyz$393,151,347zDec 15, 2017z!Star Wars Ep. VIII: The Last Jediz$262,000,000zold]$1,332,539,889[/bold]zMay 19, 1999z-Star Wars Ep. [b]I[/b]: [i]The phantom Menacez$115,000,000z$1,027,044,677�Tablesa~def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_valueg��?$	@)z
Paul AtreideszVladimir HarkonnenzThufir Hawat)FTN)�foo�atomicz%Syntax
highlighting
&
pretty
printing�python3)�line_numbers�
indent_guides)rcz�# Markdown

Supports much of the *markdown* __syntax__!

- Headers
- Basic formatting: **bold**, *italic*, `code`
- Block quotes
- Lists, and more...
    rz[cyan]z+more!zBProgress bars, columns, styled logging handler, tracebacks, etc...)r�grid�titlerTrUrr:rr�from_markupr	r�SIMPLErr
r)
rV�color_table�lorem�lorem_tablerW�markup_example�
example_table�code�pretty_data�markdown_examples
          r.�make_test_cardrp's���J�J�q�4�0�E�!�E�K�	���Y��h�j��Q�	���_�%��������K����
8�	�
�	�
�M�M�(�K�(�	�M�M��	r��

j�E��*�*�Q��>�K� �K������U�F�'�2��U�H�H�5��U�G�6�2��U�F�%�0�	�
�M�M��
����r�
�
�		
�����^��PU��
�M�M�"�	n��	<��
�M�M�(�N�+������E�?��J�J��M����]�'�4��H����]�&��9����!����	���������	������*���	�����'���	�����+��%�	�����7���	�
�M�M�(�M�*�"�D�
�
�
�&�
�K�
�M�M�3���4���T�J��;�d�3�	
��	��
�M�M��J�x�*:�:�H�EU�<V�W��
�M�M��P���Lr3�__main__T)�file�force_terminalg@�@r1)�recordzrendered in zms (cold cache)zms (warm cache))�Panel)r9rHrJ)r?r>)r=�
TextualizezH[u blue link=https://github.com/textualize]https://github.com/textualize�TwitterzL[u blue link=https://twitter.com/willmcgugan]https://twitter.com/willmcguganz�We hope you enjoy using Rich!

Rich is maintained with [red]:heart:[/] by [link=https://www.textualize.io]Textualize.io[/]

- Will McGugan�)r1rxz"[b red]Thanks for trying out Rich!�bright_blue)rr9re�border_styler<)r>)6r�io�timer�pip._vendor.richr�pip._vendor.rich.colorr�pip._vendor.rich.consolerrrr	r
�pip._vendor.rich.markdownr�pip._vendor.rich.measurer�pip._vendor.rich.prettyr
�pip._vendor.rich.segmentr�pip._vendor.rich.styler�pip._vendor.rich.syntaxr�pip._vendor.rich.tabler�pip._vendor.rich.textrrrpr4�StringIOr�	test_card�start�print�round�pre_cache_takenrr�taken�c�pip._vendor.rich.panelrurd�sponsor_messagerTrUrf�
intro_message�message�fit�ROUNDEDr7r3r.�<module>r�s���	�� �(�a�a�.�0�*�,�(�*�(�&�1�1�*g��g�T�z���
�R�[�[�]���G�� �I�
�N�E��M�M�)���\�^�e�3�v�=�q�A�O��2�;�;�=�G�L��N�E��M�M�)���<�>�E�)�V�3�Q�7�E��t��A��G�G�I��	�L��)��
9�:�	�L����
/�0�,��i�G� �e�j�j��+�O����W�g��>����t��,�����R������V��
%�D�$�$�	��M��e�j�j��#�G��������t��$��O�O�M�?�3��M�M���	�	������6�&�	
���	�qr3python3.12/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-312.pyc000064400000001402151732702030022257 0ustar00�

R`i���&�ddlmZdeedefd�Zy)�)�Optional�values�returnc�D�|sJd��|D]}|��|cSt�S)z�Pick the first non-none bool or return the last value.

    Args:
        *values (bool): Any number of boolean or None values.

    Returns:
        bool: First non-none boolean.
    z1 or more values required)�bool)r�values  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_pick.py�	pick_boolr
s3���.�.�.�6������L����;��N)�typingrrr
�rr	�<module>rs���
�x��~�
�$�
rpython3.12/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-312.pyc000064400000012342151732702030022635 0ustar00�

R`iD
���ddlmZddlmZddlmZmZmZddlm	Z	erddl
mZGd�d�Ze
d	k(rLdd
lZddlmZddlmZdd
lmZmZddlmZddlmZGd�d�Ze�Zej7e��y
y
)�)�sqrt)�	lru_cache)�Sequence�Tuple�
TYPE_CHECKING�)�ColorTriplet��Tablec�z�eZdZdZdeeeeeffd�Zdedefd�Z	d
d�Z
ed�	�d
eeeefdefd��Zy)�PalettezA palette of available colors.�colorsc��||_y�N)�_colors)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/palette.py�__init__zPalette.__init__s	������number�returnc�,�t|j|�Sr)r	r)rrs  r�__getitem__zPalette.__getitem__s���T�\�\�&�1�2�2rc
�<�ddlm}ddlm}ddlm}ddlm}|dddd	t|j��d
�dd�
�}t|j�D]F\}}|jt|�t|�|d||j|�������H|S)Nr��Color��Style)�Textr
�index�RGBrr
z colorsT�right)�title�caption�	highlight�caption_justifyz                )�bgcolor)�style)�pip._vendor.rich.colorr�pip._vendor.rich.styler�pip._vendor.rich.textr�pip._vendor.rich.tabler�lenr�	enumerate�add_row�str�repr�from_rgb)rrrrr�tabler �colors        r�__rich__zPalette.__rich__s���0�0�.�0�������4�<�<�(�)��1��#�
��&�d�l�l�3�L�E�5��M�M��E�
��U���X�U�>�5�>�>�5�3I�%J�K�
�4��ri)�maxsizer4c��������|\���t�|jj�dtdtf�����fd�}tt
t|j��|��}|S)z�Find a color from a palette that most closely matches a given color.

        Args:
            color (Tuple[int, int, int]): RGB components in range 0 > 255.

        Returns:
            int: Index of closes matching color.
        r rc����
|�\}}}�|zdz}�|z
}�|z
}�	|z
}�d|z|z|zdz	d|z|zzd|z
|z|zdz	z�S)zGet the distance to a color.�i��i��)
r �red2�green2�blue2�red_mean�red�green�blue�_sqrt�blue1�	get_color�green1�red1s
        �����r�get_color_distancez)Palette.match.<locals>.get_color_distance:s����"+�E�"2��D�&�%��t���)�H���+�C��V�O�E��5�=�D����>�S�(�3�.�1�4��e�)�e�#�$��8�^�t�+�d�2�q�8�:��
r)�key)rrr�int�float�min�ranger-)	rr4rI�	min_indexrDrErFrGrHs	    @@@@@r�matchz
Palette.match,s`���$���f�e����L�L�,�,�	�	�c�	�e�	�	���c�$�,�,�/�0�6H�I�	��rN)rr)
�__name__�
__module__�__qualname__�__doc__rrrKrr	rr5rrPr<rrr
r
sk��(��x��c�3��m�(<�=��3�#�3�,�3��0�t���5��c�3��/��C���rr
�__main__N)�Iterabler)�Console�ConsoleOptions)�Segmentrc�&�eZdZdededeefd�Zy)�ColorBox�console�optionsrc	#�K�|jjdz
}td|�D]�}t|j�D]�}||jz}||dzz}t	j
||d�\}}	}
t	j
||d|zdzzd�\}}}
t
j|dz|	dz|
dz�}t
j|dz|dz|
dz�}tdt||�������tj�����y�w)	N�rrg�?r9�u▄)r4r')�size�heightrN�	max_width�colorsys�
hls_to_rgbrr2rYr�line)rr\r]rb�y�x�h�l�r1�g1�b1�r2�g2�b2r'r4s                r�__rich_console__zColorBox.__rich_console__Ts������\�\�(�(�1�,�F��1�f�%���w�0�0�1�A��G�-�-�-�A��V�a�Z�(�A�!)�!4�!4�Q��3�!?�J�B��B�!)�!4�!4�Q��Q��Z�!�^�8L�c�!R�J�B��B�#�n�n�R�#�X�r�C�x��c��J�G�!�N�N�2��8�R�#�X�r�C�x�H�E�!�%��U�G�)L�M�M�2��l�l�n�$�&�s�DD
N)rQrRrSrWrXrVrYrqr<rrr[r[Ss$��
	%�"�
	%�-;�
	%�
�g�
�
	%rr[)�mathr�	functoolsr�typingrrr�
color_tripletr	r,rr
rQrdrVr)r�pip._vendor.rich.consolerWrX�pip._vendor.rich.segmentrYr*rr[r\�printr<rr�<module>rysg����1�1�'��,�=�=�@�z����,�@�0�,�%�%� �i�G��M�M�(�*��3rpython3.12/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-312.pyc000064400000003326151732702030024062 0ustar00�

R`i��*�ddlmZmZGd�de�Zy)�)�
NamedTuple�Tuplec��eZdZUdZeed<	eed<	eed<	edefd��Zedefd��Z	ede
eeeffd��Zy	)
�ColorTripletz/The red, green, and blue components of a color.�red�green�blue�returnc�&�|\}}}d|d�|d�|d��S)z#get the color triplet in CSS style.�#�02x���selfrrr	s    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/color_triplet.py�hexzColorTriplet.hexs+�� ���U�D��3�s�)�E�#�;�t�C�j�1�1�c�&�|\}}}d|�d|�d|�d�S)znThe color in RGB format.

        Returns:
            str: An rgb color, e.g. ``"rgb(100,23,255)"``.
        zrgb(�,�)rrs    r�rgbzColorTriplet.rgbs+�� ���U�D��c�U�!�E�7�!�D�6��+�+rc�*�|\}}}|dz|dz|dzfS)z�Convert components into floats between 0 and 1.

        Returns:
            Tuple[float, float, float]: A tuple of three normalized colour components.
        g�o@rrs    r�
normalizedzColorTriplet.normalizeds)�� ���U�D��U�{�E�E�M�4�%�<�7�7rN)
�__name__�
__module__�__qualname__�__doc__�int�__annotations__�property�strrrr�floatrrrrrrsx��9�	�H�*��J�,�

�I�+�
�2�S�2��2�
�,�S�,��,��8�E�%���"5�6�8��8rrN)�typingrrrrrr�<module>r$s��$�"8�:�"8rpython3.12/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-312.pyc000064400000003546151732702030022521 0ustar00�

R`i�����Gd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�d	e�ZGd
�de�ZGd�d
e�ZGd�de�ZGd�de�Z	y)c��eZdZdZy)�ConsoleErrorzAn error in console operation.N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/errors.pyrr���(r
rc��eZdZdZy)�
StyleErrorzAn error in styles.Nrr	r
rrrs��r
rc��eZdZdZy)�StyleSyntaxErrorzStyle was badly formatted.Nrr	r
rrr	s��$r
rc��eZdZdZy)�MissingStylezNo such style.Nrr	r
rrr
s��r
rc��eZdZdZy)�StyleStackErrorzStyle stack is invalid.Nrr	r
rrrs��!r
rc��eZdZdZy)�NotRenderableErrorzObject is not renderable.Nrr	r
rrrs��#r
rc��eZdZdZy)�MarkupErrorzMarkup was badly formatted.Nrr	r
rrrs��%r
rc��eZdZdZy)�	LiveErrorzError related to Live display.Nrr	r
rrrrr
rc��eZdZdZy)�NoAltScreenzAlt screen mode was required.Nrr	r
rrr!s��'r
rN)
�	Exceptionrrrrrrrrrr	r
r�<module>rsq��)�9�)����%�|�%��:��"�l�"�$��$�&�,�&�)��)�(�,�(r
python3.12/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-312.pyc000064400000001622151732702040022456 0ustar00�

R`i���^�dZddlmZddlZddlmZej
ddededfd��Zy)	z-
Timer context manager, only used in debug.

�)�timeN)�	Generator�subject�return)NNNc#�pK�t�}d��t�|z
}|dz}t|�d|d�d��y�w)z0print the elapsed time. (only used in debugging)Ni�z	 elapsed z.1f�ms)r�print)r�start�elapsed�
elapsed_mss    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_timer.py�timerrs>����
�F�E�	��f�u�n�G��4��J�	�W�I�Y�z�#�.�b�
1�2�s�46)�__doc__r�
contextlib�typingr�contextmanager�strr��r
�<module>rsC���
������3�3�3�I�.>�$?�3��3rpython3.12/site-packages/pip/_vendor/rich/__pycache__/json.cpython-312.pyc000064400000013704151732702040022154 0ustar00�

R`i����ddlmZddlmZmZddlmZmZmZm	Z	ddl
mZddlm
Z
mZGd�d�Zed	k(r�dd
lZdd
lZej&d��Zej+d
dd��ej+dddedd��ej/�ZddlmZe�Zed��Z	ej:dk(rej<j?�Z n eej:�jC�Z ejIee ejL��d��y
y
#e"$r=Z#ejIdej:�de#���ejJd�Yd
Z#[#�dd
Z#[#wwxYw) �)�Path)�loads�dumps)�Any�Callable�Optional�Union�)�Text)�JSONHighlighter�NullHighlighterc���eZdZdZ								ddededeefdedededed	ed
ee	e
ge
fdeddfd
�Ze								dde
dedeefdedededed	ed
ee	e
ge
fdeddfd��Z
defd�Zy)�JSONa_A renderable which pretty prints JSON.

    Args:
        json (str): JSON encoded data.
        indent (Union[None, int, str], optional): Number of characters to indent by. Defaults to 2.
        highlight (bool, optional): Enable highlighting. Defaults to True.
        skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
        ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
        check_circular (bool, optional): Check for circular references. Defaults to True.
        allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
        default (Callable, optional): A callable that converts values that can not be encoded
            in to something that can be JSON encoded. Defaults to None.
        sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
    N�json�indent�	highlight�	skip_keys�ensure_ascii�check_circular�	allow_nan�default�	sort_keys�returnc

���t|�}
t|
|||||||	��}|r
t�n	t�}||�|_d|j_d|j_y)N�r�skipkeysrrrrrT)rrrr
�text�no_wrap�overflow)�selfrrrrrrrrr�data�highlighters            ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/json.py�__init__z
JSON.__init__sd���T�{������%�)����	
��,5�o�'�/�:K����%��	� ��	�	��!��	�	��r!c

���|j|�}
t||||||||	��}|r
t�n	t�}||�|
_d|
j_d|
j_|
S)a|Encodes a JSON object from arbitrary data.

        Args:
            data (Any): An object that may be encoded in to JSON
            indent (Union[None, int, str], optional): Number of characters to indent by. Defaults to 2.
            highlight (bool, optional): Enable highlighting. Defaults to True.
            default (Callable, optional): Optional callable which will be called for objects that cannot be serialized. Defaults to None.
            skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
            ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
            check_circular (bool, optional): Check for circular references. Defaults to True.
            allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
            default (Callable, optional): A callable that converts values that can not be encoded
                in to something that can be JSON encoded. Defaults to None.
            sort_keys (bool, optional): Sort dictionary keys. Defaults to False.

        Returns:
            JSON: New JSON object from the given data.
        rTN)�__new__rrr
rrr)
�clsr!rrrrrrrr�
json_instancerr"s
             r#�	from_datazJSON.from_data5st��>!$���C� 0�
�����%�)����	
��,5�o�'�/�:K��(��.�
��%)�
���"�&*�
���#��r%c��|jS)N)r)r s r#�__rich__z
JSON.__rich__es���y�y�r%)�TFFTTNF)�__name__�
__module__�__qualname__�__doc__�strr	�int�boolrrrr$�classmethodr*rr,�r%r#rr	s[��
�$)*���"�#��26��"��"��d�C��n�%�"��	"�
�"��
"��"��"��(�C�5�#�:�.�/�"��"�
�"�8�)*���"�#��26��-��-��d�C��n�%�-��	-�
�-��
-��-��-��(�C�5�#�:�.�/�-��-�
�-��-�^�$�r%r�__main__NzPretty print json)�description�path�PATHzpath to file, or - for stdin)�metavar�helpz-iz--indent�SPACESzNumber of spaces in an indentr-)r;�typer<r)�ConsoleT)�stderr�-zUnable to read z; ���)r)�	soft_wrap)'�pathlibrrrr�typingrrrr	rrr"rr
rr.�argparse�sys�ArgumentParser�parser�add_argumentr3�
parse_args�args�pip._vendor.rich.consoler?�console�
error_consoler9�stdin�read�	json_data�	read_text�	Exception�error�print�exitrr6r%r#�<module>rXsH����1�1��9�]�]�@�z����
$�X�
$�
$�1D�
E�F�
�����
+���
������
�
,��
������D�0��i�G��4�(�M���9�9����	�	���(�I��T�Y�Y��1�1�3�I�
�M�M�$�y����5��M�F�G��>�����o�d�i�i�]�"�U�G�D�E����������s�%A
D�E�3E�Epython3.12/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-312.pyc000064400000010144151732702040023455 0ustar00�

R`i����ddlmZddlmZmZmZmZmZmZddlm	Z	m
Z
erddlmZm
Z
mZddlmZeege	fZGd�d�Zed	k(r4dd
lmZe�Zej-dd�
�ej/dd�
�yy)�)�datetime)�Iterable�List�Optional�
TYPE_CHECKING�Union�Callable�)�Text�TextType)�Console�ConsoleRenderable�RenderableType��Tablec��eZdZ						ddedededeeefdedeeddfd	�Z							dd
dde
d
deedeeeefdedeedeedeeddfd�Z
y)�	LogRender�	show_time�
show_level�	show_path�time_format�omit_repeated_times�level_width�returnNc�f�||_||_||_||_||_||_d|_y)N)rrrrrr�
_last_time)�selfrrrrrrs       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_log_render.py�__init__zLogRender.__init__s8��#���$���"���&���#6�� �&���*.����consoler
�renderablesr�log_time�level�path�line_no�	link_pathrc	�*�ddlm}	ddlm}
|
jd��}d|_|jr|jd��|jr|jd	|j�
�|jddd�
�|jr|r|jd��g}|jr�|xs|j�}|xs|j}t|�r	||�}
nt|j|��}
|
|j k(r3|j"r'|j%tdt'|
�z��n|j%|
�|
|_|jr|j%|�|j%|	|��|jrh|rft�}|j%||rd|��nd��|r/|j%d�|j%|�|rd|�d|��nd��|j%|�|j(|�|S)Nr
)�Renderablesr)rr
)�paddingTzlog.time)�stylez	log.level)r+�widthzlog.message�fold)�ratior+�overflowzlog.path� zlink file://��:�#)�
containersr)�tabler�grid�expandr�
add_columnrrr�get_datetimer�callabler�strftimerr�append�len�add_row)rr!r"r#rr$r%r&r'r)r�output�row�log_time_display�	path_texts               r�__call__zLogRender.__call__ s���	,� �����F�+����
��>�>����J��/��?�?����K�t�7G�7G��H��������H��>�>�d����J��/�&(���>�>��9�7�#7�#7�#9�H�%�9��)9�)9�K���$�#.�x�#8� �#'��(9�(9�+�(F�#G� ��4�?�?�2�t�7O�7O��
�
�4��c�*:�&;� ;�<�=��
�
�+�,�"2����?�?��J�J�u���
�
�;�{�+�,��>�>�d���I�����)�l�9�+�6��
�
��� � ��%�� � ��i�BK�L���1�W�I�>�QS�!��
�J�J�y�!��������
r )TFTz[%x %X]T�)NNr1NNN)�__name__�
__module__�__qualname__�boolr�str�FormatTimeCallabler�intrrrrrC�r rrrs��� ��6?�$(�%&�/��/��/��	/�
�3� 2�2�3�/�"�
/��c�]�/�
�/�*(,�@D��"�!%�#'�6��6��1�2�6��8�$�	6�
�e�C�);�$;�<�=�6��
6��s�m�6��#��6��C�=�6�
�6r r�__main__)r
z[on blue]Hello�right)�justifyz[on blue]helloN)r�typingrrrrrr	�textrrr!r
rrr5rrJrrE�pip._vendor.rich.console�c�print�logrLr r�<module>rVsy���K�K�!��C�C���x�j�$�.�/��H�H�V�z��0��	�A��G�G��g�G�.��E�E�
�G�E�,�r python3.12/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-312.pyc000064400000004502151732702040024227 0ustar00�

R`i4���dZdZdZdZy)a+<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<style>
{stylesheet}
body {{
    color: {foreground};
    background-color: {background};
}}
</style>
</head>
<html>
<body>
    <pre style="font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><code>{code}</code></pre>
</body>
</html>
a�<svg class="rich-terminal" viewBox="0 0 {width} {height}" xmlns="http://www.w3.org/2000/svg">
    <!-- Generated with Rich https://www.textualize.io -->
    <style>

    @font-face {{
        font-family: "Fira Code";
        src: local("FiraCode-Regular"),
                url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Regular.woff2") format("woff2"),
                url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Regular.woff") format("woff");
        font-style: normal;
        font-weight: 400;
    }}
    @font-face {{
        font-family: "Fira Code";
        src: local("FiraCode-Bold"),
                url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Bold.woff2") format("woff2"),
                url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Bold.woff") format("woff");
        font-style: bold;
        font-weight: 700;
    }}

    .{unique_id}-matrix {{
        font-family: Fira Code, monospace;
        font-size: {char_height}px;
        line-height: {line_height}px;
        font-variant-east-asian: full-width;
    }}

    .{unique_id}-title {{
        font-size: 18px;
        font-weight: bold;
        font-family: arial;
    }}

    {styles}
    </style>

    <defs>
    <clipPath id="{unique_id}-clip-terminal">
      <rect x="0" y="0" width="{terminal_width}" height="{terminal_height}" />
    </clipPath>
    {lines}
    </defs>

    {chrome}
    <g transform="translate({terminal_x}, {terminal_y})" clip-path="url(#{unique_id}-clip-terminal)">
    {backgrounds}
    <g class="{unique_id}-matrix">
    {matrix}
    </g>
    </g>
</svg>
zRich Fira Codezrich-svgN)�CONSOLE_HTML_FORMAT�CONSOLE_SVG_FORMAT�_SVG_FONT_FAMILY�_SVG_CLASSES_PREFIX����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_export_format.py�<module>r	s$����&5��n$�� �rpython3.12/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-312.pyc000064400000027532151732702040023013 0ustar00�

R`i�%��D�ddlmZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZm
Z
mZmZmZddlmZmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
l m!Z!m"Z"de#de#fd�Z$Gd�de�Z%dee&ee
fdee'dffd�Z(de&dee#fd�Z)de&dee#de*fd�Z+y)�)�absolute_importN)�cleandoc�getdoc�getfile�isclass�ismodule�	signature)�Any�
Collection�Iterable�Optional�Tuple�Type�Union�)�Group�RenderableType)�escape_control_codes)�ReprHighlighter)�JupyterMixin)�Panel)�Pretty)�Table)�Text�TextType�doc�returnc�0�|jd�\}}}|S)z)Get the first paragraph from a docstring.z

)�	partition)r�	paragraph�_s   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_inspect.py�_first_paragraphr#s���m�m�F�+�O�I�q�!���c��eZdZdZdddddddddd�	dedeeded	ed
ededed
edededdfd�Zdede	fd�Z
defd�Zde
dedee	fd�Zdeefd�Zdedee
fd�Zy)�Inspecta�A renderable to inspect any Python Object.

    Args:
        obj (Any): An object to inspect.
        title (str, optional): Title to display over inspect result, or None use type. Defaults to None.
        help (bool, optional): Show full help text rather than just first paragraph. Defaults to False.
        methods (bool, optional): Enable inspection of callables. Defaults to False.
        docs (bool, optional): Also render doc strings. Defaults to True.
        private (bool, optional): Show private attributes (beginning with underscore). Defaults to False.
        dunder (bool, optional): Show attributes starting with double underscore. Defaults to False.
        sort (bool, optional): Sort attributes alphabetically. Defaults to True.
        all (bool, optional): Show all attributes. Defaults to False.
        value (bool, optional): Pretty print value of object. Defaults to True.
    NFT)	�title�help�methods�docs�private�dunder�sort�all�value�objr'r(r)r*r+r,r-r.r/rc	���t�|_||_|xs|j|�|_|	rdx}x}}||_||_|xs||_|xs||_||_	||_
|
|_y)NT)r�highlighterr0�_make_titler'r(r)r*r+r,r-r/)�selfr0r'r(r)r*r+r,r-r.r/s           r"�__init__zInspect.__init__'sy��+�,�������3�d�.�.�s�3��
��)-�-�G�-�g����	�����L�D��	��(�&��������	���
r$c��t|�st|�st|�rt|�ntt	|��}|j|�}|S)zMake a default title.)r�callabler�str�typer2)r4r0�	title_str�
title_texts    r"r3zInspect._make_titleBsH�������
��#��
��H��T�#�Y��	�
�%�%�i�0�
��r$c�p�tjt|j��|jdd��S)Nzscope.border�rr)r'�border_style�padding)r�fitr�_renderr')r4s r"�__rich__zInspect.__rich__Ls.���y�y��4�<�<�>�"��*�*�'��	
�	
r$�namec��	tt|��dz}d}	t	|�}t
|d��}|r|jd|���|j|�}|xs
t|d|�}tj|�rd}ntj|�rd	}nd
}t
j|�d�d|jdd
���f|df|�}	|	S#t$rd}Y��t$rYywxYw#t
tf$rY��wxYw)zGet a signature for a callable.�:z(...)Nzinspect.callable��stylezlink file://�__qualname__�classz	async def�def� zinspect.r!)r8r	�
ValueError�	TypeErrorr�OSErrorr�stylizer2�getattr�inspectr�iscoroutinefunction�assemble�replace)
r4rCr0�
_signature�source_filename�
callable_name�signature_text�qualname�prefix�qual_signatures
          r"�_get_signaturezInspect._get_signatureTs"��	��Y�s�^�,�s�2�J�*.��	�%�c�l�O�
�T�);�<�
���!�!�L��0A�"B�C��)�)�*�5���=�7�3���=���?�?�3���F�
�
(�
(��
-� �F��F�����x�q�\�X�f�n�n�S�#�&>�%?�@�A�
�)�*��
�����C�	!� �J��	��	����#�	��	�s(�C�C,�C)�C)�(C)�,C>�=C>c	#���K�dtttfdtttffd�}dtdtttff�fd�}|j�t��}t
|�}|js!|D�cgc]}|jd�r�|��}}|js!|D�cgc]}|jd�r�|��}}|t
|�z
}|D�cgc]}|||�f��}}|jr|j|��tjd	d
��}|jd�
�|j}	|j}
t!��r|j#d��}|�|��d��|j$r0|j'��}|�t)|d��}
|
|
�}
|
��d��|j*rAt-��s6t!��s+t/��s t1t3�ddd��d����d��|D�]0\}\}}t)j4||jd�rdndfd�}|�:|j7�}|j9d�|	||
t;|����qt!|�r�|j<s��|j#||�}|�|	|t3||
�����|j$rT|j'|�}|�A|j?d|vrdnd�|
|�}|j9d�|j?|�|	||���|	|t3||
�����3|j@r|��y|rt)jBd |�d!����yycc}wcc}wcc}w�w)"zRender object.�itemrc�f�|\}\}}t|�|jd�j�fS)Nr!)r7�strip�lower)r^�key�_errorr/s    r"�
sort_itemsz#Inspect._render.<locals>.sort_items~s0��#'� �C��&�%��U�O�S�Y�Y�s�^�%9�%9�%;�<�<r$�	attr_namec�V��	dt�|�fS#t$r}|dfcYd}~Sd}~wwxYw)zGet attribute or any exception.N)rP�	Exception)re�errorr0s  �r"�safe_getattrz%Inspect._render.<locals>.safe_getattr�s4���
%��g�c�9�5�6�6���
%��t�}�$��
%�s�
�	(�#�(�(�__r!)rbr=F)r?�expand�right)�justify�Nzinspect.helprFT�
�<)�
indent_guides�
max_length�
max_stringzinspect.value.border)r>zinspect.attr.dunderzinspect.attr)z =zinspect.equalsz
inspect.error)r2�
rKzinspect.docz[b cyan]za[/][i] attribute(s) not shown.[/i] Run [b][magenta]inspect[/]([not b]inspect[/])[/b] for options.)"rr8r
�boolr0�dir�lenr,�
startswithr+r-r�grid�
add_column�add_rowr2r7r\r*�_get_formatted_docrr/rrrrrS�copyrO�reprr)�append�	row_count�from_markup)r4rdri�keys�total_itemsrb�not_shown_count�items�items_tabler{r2r	�_doc�doc_textrhr/�key_text�warning�_signature_textr*rr0s                     @r"rAzInspect._render{s:�����	=�U�3��8�_�	=��t�S�y�1A�	=�	%�C�	%�E�#�s�(�O�	%��h�h���3�x���$�i���{�{�#'�D�4�C�s�~�~�d�/C�C�4�D�D��|�|�#'�C�4�C�s�~�~�c�/B�C�4�D�C�%��D�	�1��59�:�T�c�#�|�C�(�)�T��:��9�9��J�J�:�J�&��j�j���>�����w��/��%�%���&�&���C�=��+�+�B��4�I��$������9�9��*�*�3�/�D�����N�;��&�x�0�������:�:�w�s�|�x��}���
���s�$�2�"�M�3��
��H�#(��C��%���}�}��-0�^�^�D�-A�)�~��)��H�� �"�-�-�/������0����T�%�[�!9�:������|�|��"&�"5�"5�c�5�"A��"�*��H�f�U��&L�M��y�y�#�6�6�u�=���+�+�2�2�4�4�<�4�S�Q�"-�d�"3�C��K�K�
�6�+�2�2�3�7��H�o�6���&��K�"H�I�A$)�B� � ���
��"�"��?�+�,Q�R��
���KE��C��:�s7�A<M2�?M#�M#�M2�,M(�M(�M2�M-�,JM2�object_c��t|�}|�yt|�j�}|jst	|�}t|�S)a�
        Extract the docstring of an object, process it and returns it.
        The processing consists in cleaning up the doctring's indentation,
        taking only its 1st paragraph if `self.help` is not True,
        and escape its control codes.

        Args:
            object_ (Any): the object to get the docstring from.

        Returns:
            Optional[str]: the processed docstring, or None if no docstring was found.
        N)rrr`r(r#r)r4r�r*s   r"r|zInspect._get_formatted_doc�sC���g����<����~�#�#�%���y�y�#�D�)�D�#�D�)�)r$)�__name__�
__module__rH�__doc__r
r
rrur5rr3rrBr8r\rrrAr|�r$r"r&r&s��
�&%)����������
����!�	�
���
�������������
��6�s��t��
�%�
�%�3�%�S�%�X�d�^�%�N[��.�1�[�z*�#�*�(�3�-�*r$r&r0.c�J�t|d�st|�}t|dd�S)zNReturns the MRO of an object's class, or of the object itself if it's a class.�__mro__r�)�hasattrr9rP)r0s r"�get_object_types_mror��s&���3�	�"��3�i���3�	�2�&�&r$c
�t�t|�D�cgc]}t|dd��dt|dd�����!c}Scc}w)z�
    Returns the MRO of an object's class as full qualified names, or of the object itself if it's a class.

    Examples:
        `object_types_mro_as_strings(JSONDecoder)` will return `['json.decoder.JSONDecoder', 'builtins.object']`
    r�rn�.rH)r�rP)r0�type_s  r"�get_object_types_mro_as_stringsr��sM��*�#�.��.�E��5�,��+�
,�A�g�e�^�R�.P�-Q�R�.����s�$5�fully_qualified_types_namesc�0�t|�D]}||vs�yy)z�
    Returns `True` if the given object's class (or the object itself, if it's a class) has one of the
    fully qualified names in its MRO.
    TF)r�)r0r��	type_names   r"�is_object_one_of_typesr�s$��5�S�9�	��3�3��:�r$),�
__future__rrQrrrrrr	�typingr
rrr
rrr�consolerr�controlrr2r�jupyterr�panelr�prettyr�tabler�textrrr8r#r&�objectr9r�r�rur�r�r$r"�<module>r�s���&��K�K�J�J�J�*�)�(�!���� ��#��#��T*�l�T*�n'�e�F�D��I�$5�6�'�5��s��;K�'�
��
�J�s�O�
�
�	�
�.8��o�
�	�
r$python3.12/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-312.pyc000064400000070541151732702040024030 0ustar00�

R`i$Y�
��UdZddlZddlZddlmZdZeed<ejdk(rejej�Zne
e�d���ddlZddlm
Z
mZmZddlmZmZmZmZdd	lmZdd
lmZdZdZej4ZGd
�de�ZGd�de�ZGd�de
�ZGd�dej�Z ejBjDZ#ejHge#_%ejLe#_'efde(dejLfd�Z"ejBjRZ*ejLejVge*_%ejXe*_'dejLde(fd�Z)ejBjZZ.ejLej^ejHeeee�ej`ejH�ge._%ejXe._'dejLde1de(dede(f
d�Z2ejBjfZ4ejLejjejHeeee�ej`ejH�ge4_%ejXe4_'dejLde(de(dede(f
d�Z3ejBjlZ7ejLejjge7_%ejXe7_'dejLdejjde8fd �Z6ejBjrZ:ejLej`e�ge:_%ejXe:_'dejLdefd!�Z9ejBjvZ<ejLeeee�ge<_%ejXe<_'dejLd"ede8fd#�Z;ejBjzZ>ejLej`e �ge>_%ejXe>_'dejLd$e de8fd%�Z=ejBj~Z@ejLej`e �ge@_%ejXe@_'dejLd$e de8fd&�Z?ejBj�ZBej�geB_%ejXeB_'d'e1de8fd(�ZDGd)�d*�ZEed+k(�r�e"�ZFdd,lGmHZHeH�ZIeEej��ZKeKj�d-�ed.d/�0�ZMej�d1�ZOeIj�d2�eIj�d3�eIj�d4�eIj�d5�eIj�d6�eIj�d7�eIj�d8�eIj�d9�eIj�d:�eIj�d;�eIj�d<�eIj�d=�eIj�d>�eIj�d?�eIj�d@�eIj�dA�eIj�dB�eIj��eKj��eKj��eKj�dC�ej�dD�eKj��eKj�dE�ej�dD�eKj��eKj�dF�ej�dD�eKj��eKj��eKj��eKj�dG�ej�dD�eKj��eKj��eKj��eKj�dH�ej�dD�eKj��eIj��eIj�dI�eIj�dJ�eKj�dK�ej�dD�eKj�dL�eKj�dMej�dN��eKj��ej�dD�eKj��ej�dD�eIj�dO�eKj�dK�ej�dD�eKj�dL�eKj�dPej�dN��ej�dD�eKj��ej�dD�eIj�dQ�eKj�dRej�dS��T�ej�dD�eKj��eKj��eQdU�yy)Vz�Light wrapper around the Win32 Console API - this module should only be imported on Windows

The API that this module wraps is documented at https://docs.microsoft.com/en-us/windows/console/console-functions
�N)�Any�windll�win32z  can only be imported on Windows)�	Structure�byref�wintypes)�IO�
NamedTuple�Type�cast)�ColorSystem)�Stylei�����c��eZdZy)�LegacyWindowsErrorN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_win32_console.pyrrs��rrc�@�eZdZUdZeed<eed<edddefd��Zy)�WindowsCoordinatesz�Coordinates in the Windows Console API are (y, x), not (x, y).
    This class is intended to prevent that confusion.
    Rows and columns are indexed from 0.
    This class can be used in place of wintypes._COORD in arguments and argtypes.
    �row�col�value�returnc�B�t|j|j�S)aEConverts a WindowsCoordinates into a wintypes _COORD structure.
        This classmethod is internally called by ctypes to perform the conversion.

        Args:
            value (WindowsCoordinates): The input coordinates to convert.

        Returns:
            wintypes._COORD: The converted coordinates struct.
        )�COORDrr)�clsrs  r�
from_paramzWindowsCoordinates.from_param*s���U�Y�Y��	�	�*�*rN)	rrr�__doc__�int�__annotations__�classmethodrr!rrrrr s4���

�H�	�H��
+�3�
+��
+��
+rrc�V�eZdZdefdefdej
fdejfdefgZy)�CONSOLE_SCREEN_BUFFER_INFO�dwSize�dwCursorPosition�wAttributes�srWindow�dwMaximumWindowSizeN)rrrrr�WORD�
SMALL_RECT�_fields_rrrr'r'8s;��	�5��	�U�#�	��
�
�&�	�X�(�(�)�	��&��Hrr'c�D�eZdZdejfdej
fgZy)�CONSOLE_CURSOR_INFOr(�bVisibleN)rrrr�DWORD�BOOLr/rrrr1r1Bs���8�>�>�*�Z����,G�H�Hrr1�handlerc�H�ttjt|��S)z�Retrieves a handle to the specified standard device (standard input, standard output, or standard error).

    Args:
        handle (int): Integer identifier for the handle. Defaults to -11 (stdout).

    Returns:
        wintypes.HANDLE: The handle
    )rr�HANDLE�
_GetStdHandle)r5s r�GetStdHandler9Ms�������v�!6�7�7r�
std_handlec��tj�}tt||��}|st	d��|j
S)aRetrieves the current input mode of a console's input buffer
    or the current output mode of a console screen buffer.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.

    Raises:
        LegacyWindowsError: If any error occurs while calling the Windows console API.

    Returns:
        int: Value representing the current console mode as documented at
            https://docs.microsoft.com/en-us/windows/console/getconsolemode#parameters
    z)Unable to get legacy Windows Console Mode)rr3�bool�_GetConsoleModerr)r:�console_mode�successs   r�GetConsoleModer@^s<���>�>�#�L��?�:�|�<�=�G�� �!L�M�M����r�char�length�startc	���tj|j��}tj|�}tjd�}t||||t
|��|jS)a�Writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        char (str): The character to write. Must be a string of length 1.
        length (int): The number of times to write the character.
        start (WindowsCoordinates): The coordinates to start writing at.

    Returns:
        int: The number of characters written.
    r)�ctypes�c_char�encoderr3�_FillConsoleOutputCharacterWrr)r:rArBrC�	character�num_characters�num_writtens       r�FillConsoleOutputCharacterrLs^��"�
�
�d�k�k�m�,�I��^�^�F�+�N��.�.��#�K� ����
�
�k������r�
attributesc	���tj|�}tj|�}tjd�}t||||t	|��|j
S)alSets the character attributes for a specified number of character cells,
    beginning at the specified coordinates in a screen buffer.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        attributes (int): Integer value representing the foreground and background colours of the cells.
        length (int): The number of cells to set the output attribute of.
        start (WindowsCoordinates): The coordinates of the first cell whose attributes are to be set.

    Returns:
        int: The number of cells whose attributes were actually set.
    r)rr3r-�_FillConsoleOutputAttributerr)r:rMrBrC�	num_cells�style_attrsrKs       r�FillConsoleOutputAttributerR�sT��$���v�&�I��-�-�
�+�K��.�.��#�K���K��E�5��3E�����rc�,�tt||��S)a|Set the colour attributes for all text written after this function is called.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        attributes (int): Integer value representing the foreground and background colours.


    Returns:
        bool: True if the attribute was set successfully, otherwise False.
    )r<�_SetConsoleTextAttribute)r:rMs  r�SetConsoleTextAttributerU�s���(��Z�@�A�Arc�D�t�}t|t|��|S)aqRetrieves information about the specified console screen buffer.

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.

    Returns:
        CONSOLE_SCREEN_BUFFER_INFO: A CONSOLE_SCREEN_BUFFER_INFO ctype struct contain information about
            screen size, cursor position, colour attributes, and more.)r'�_GetConsoleScreenBufferInfor)r:�console_screen_buffer_infos  r�GetConsoleScreenBufferInforY�s#��"<�!=���
�E�2L�,M�N�%�%r�coordsc�,�tt||��S)aESet the position of the cursor in the console screen

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        coords (WindowsCoordinates): The coordinates to move the cursor to.

    Returns:
        bool: True if the function succeeds, otherwise False.
    )r<�_SetConsoleCursorPosition)r:rZs  r�SetConsoleCursorPositionr]�s���)�*�f�=�>�>r�cursor_infoc�>�tt|t|���S)a�Get the cursor info - used to get cursor visibility and width

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct that receives information
            about the console's cursor.

    Returns:
          bool: True if the function succeeds, otherwise False.
    )r<�_GetConsoleCursorInfor�r:r^s  r�GetConsoleCursorInforbs���%�j�%��2D�E�F�Frc�>�tt|t|���S)awSet the cursor info - used for adjusting cursor visibility and width

    Args:
        std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
        cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct containing the new cursor info.

    Returns:
          bool: True if the function succeeds, otherwise False.
    )r<�_SetConsoleCursorInforras  r�SetConsoleCursorInfore*s���%�j�%��2D�E�F�Fr�titlec�*�tt|��S)z�Sets the title of the current console window

    Args:
        title (str): The new title of the console window.

    Returns:
        bool: True if the function succeeds, otherwise False.
    )r<�_SetConsoleTitle)rfs r�SetConsoleTitleri>s��� ��'�(�(rc��eZdZdZdZgd�Zdd�Zedefd��Z	edefd��Z
d	eddfd
�Zd	ede
ddfd�Zd
eddfd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdeddfd�Zdd�Zdd�Zdd�Zdeddfd�Zdefd�Zy)�LegacyWindowsTerma�This class allows interaction with the legacy Windows Console API. It should only be used in the context
    of environments where virtual terminal processing is not available. However, if it is used in a Windows environment,
    the entire API should work.

    Args:
        file (IO[str]): The file which the Windows Console API HANDLE is retrieved from, defaults to sys.stdout.
    �)rr������rl��
��	�
��rNc�*�tt�}||_t|�j}||_|dz|_|dz	dz|_|j|jdzz|_||_	|j|_
|j|_y)Nrrr)r9�STDOUT�_handlerYr*�
_default_text�
_default_fore�
_default_back�_default_attrs�_file�write�flush)�self�filer5�default_texts    r�__init__zLegacyWindowsTerm.__init__is����f�%�����1�&�9�E�E��)���)�A�-���*�a�/�1�4���"�0�0�D�4F�4F�!�4K�L�����
��Z�Z��
��Z�Z��
rc��t|j�j}tt	t
|j�t	t
|j���S)z�Returns the current position of the cursor (0-based)

        Returns:
            WindowsCoordinates: The current cursor position.
        �rr)rYr|r)rrr#�Y�X)r��coords  r�cursor_positionz!LegacyWindowsTerm.cursor_positionws;��2�$�,�,�?�P�P��!�d�3����&8�d�3����>P�Q�Qrc��t|j�j}tt	t
|j�t	t
|j���S)z�Returns the current size of the console screen buffer, in character columns and rows

        Returns:
            WindowsCoordinates: The width and height of the screen as WindowsCoordinates.
        r�)rYr|r(rrr#r�r�)r��screen_sizes  rr�zLegacyWindowsTerm.screen_size�s@��8����E�L�L��!��S�+�-�-�(�d�3��
�
�.F�
�	
r�textc�F�|j|�|j�y)z�Write text directly to the terminal without any modification of styles

        Args:
            text (str): The text to write to the console
        N)r�r�)r�r�s  r�
write_textzLegacyWindowsTerm.write_text�s��	
�
�
�4���
�
�r�stylec���|j}|j}|jr||}}|rv|jtj
�j}|�|nd}|jr||jz}|jr||jz}|j|}n|j}|r?|jtj
�j}|�|nd}|j|}n|j}|�J�|�J�t|jtj ||dzz���|j#|�t|j|j$��y)z�Write styled text to the terminal.

        Args:
            text (str): The text to write
            style (Style): The style of the text
        Nrrrr)rM)�color�bgcolor�reverse�	downgrader
�WINDOWS�number�bold�
BRIGHT_BIT�dim�ANSI_TO_WINDOWSr~rrUr|rE�c_ushortr�r})r�r�r�r�r��fore�backs       r�write_styledzLegacyWindowsTerm.write_styled�s:�������-�-���=�=�$�e�7�E���?�?�;�#6�#6�7�>�>�D��+�4��D��z�z��d�o�o�-���y�y��t���.�.���'�'��-�D��%�%�D���$�$�[�%8�%8�9�@�@�D��+�4��D��'�'��-�D��%�%�D�����������L�L�V�_�_�T�T�Q�Y�5G�%H�	
�	
����������9K�9K�Lr�new_positionc�p�|jdks|jdkryt|j|��y)z�Set the position of the cursor

        Args:
            new_position (WindowsCoordinates): The WindowsCoordinates representing the new position of the cursor.
        rN�rZ)rrr]r|)r�r�s  r�move_cursor_toz LegacyWindowsTerm.move_cursor_to�s0�����a��<�#3�#3�a�#7�� ����l�Crc���|j}|j}|j}t|jd��}t|jd||��t|j|j||��y)z@Erase all content on the line the cursor is currently located atrr�� �rBrCN)	r�r�rrrrLr|rRr�)r�r�r��cells_to_erase�start_coordinatess     r�
erase_linezLegacyWindowsTerm.erase_line�sj���&�&���.�.��$����.�?�3F�3F�A�N��"��L�L�#�n�<M�	
�	#��L�L����!�#�		
rc���|j}|jj|jz
}t|jd||��t|j|j||��y)zBErase all content from the cursor position to the end of that liner�r�N)r�r�rrLr|rRr�)r�r�r�s   r�erase_end_of_linez#LegacyWindowsTerm.erase_end_of_line�s^���.�.���)�)�-�-��0C�0C�C��"��L�L�#�n�O�	
�	#��L�L����!�!�		
rc��|j\}}t|d�}t|jd||��t	|j|j
||��y)zDErase all content from the cursor position to the start of that linerr�r�N)r�rrLr|rRr�)r�rrrCs    r�erase_start_of_linez%LegacyWindowsTerm.erase_start_of_line�sJ���'�'���S�"�3��*��"�4�<�<��S��N�"��L�L�$�-�-�c��	
rc��|j}t|jt|jdz
|j
����y)z Move the cursor up a single cellror�r�N�r�r]r|rrr�r�r�s  r�move_cursor_upz LegacyWindowsTerm.move_cursor_up�s:���.�.�� ��L�L�%�#�'�'�!�+��1D�1D��	
rc��|j}t|jt|jdz|j
����y)z"Move the cursor down a single cellror�r�Nr�r�s  r�move_cursor_downz"LegacyWindowsTerm.move_cursor_down�s;���.�.�� ��L�L�%�#�'�'�!�+�#�'�'��	
rc��|j\}}||jjdz
k(r|dz
}d}n|dz
}t|jt||����y)zIMove the cursor forward a single cell. Wrap to the next line if required.rorr�r�N�r�r�rr]r|r�r�rrs   r�move_cursor_forwardz%LegacyWindowsTerm.move_cursor_forwardsZ���'�'���S��$�"�"�&�&��*�*��1�H�C��C��1�H�C� ��L�L�!3���!E�	
r�columnc�d�|j\}}t|jt||���y)z�Move cursor to the column specified by the zero-based column index, staying on the same row

        Args:
            column (int): The zero-based column index to move the cursor to.
        r�N)r�r]r|r)r�r�r�_s    r�move_cursor_to_columnz'LegacyWindowsTerm.move_cursor_to_columns)���%�%���Q� ����6H��f�6U�Vrc��|j\}}|dk(r|dz}|jjdz
}n|dz}t|jt||����y)zNMove the cursor backward a single cell. Wrap to the previous line if required.rror�r�Nr�r�s   r�move_cursor_backwardz&LegacyWindowsTerm.move_cursor_backwardsY���'�'���S��!�8��1�H�C��"�"�&�&��*�C��1�H�C� ��L�L�!3���!E�	
rc�l�|j�}t|d��}t|j|��y)zHide the cursorr�r(r2�r^N��_get_cursor_sizer1rer|)r��current_cursor_size�invisible_cursors   r�hide_cursorzLegacyWindowsTerm.hide_cursor$s/��"�3�3�5��.�6I�TU�V���T�\�\�7G�Hrc�l�|j�}t|d��}t|j|��y)zShow the cursorror�r�Nr�)r�r��visible_cursors   r�show_cursorzLegacyWindowsTerm.show_cursor*s-��"�3�3�5��,�4G�RS�T���T�\�\�~�Frrfc�D�t|�dksJd��t|�y)zySet the title of the terminal window

        Args:
            title (str): The new title of the console window
        �z.Console title must be less than 255 charactersN)�lenri)r�rfs  r�	set_titlezLegacyWindowsTerm.set_title0s$���5�z�C��Q�!Q�Q����rc�n�t�}t|j|��t|j�S)zEGet the percentage of the character cell that is filled by the cursorr�)r1rbr|r#r()r�r^s  rr�z"LegacyWindowsTerm._get_cursor_size9s)��)�+���T�\�\�{�C��;�%�%�&�&r)r�zIO[str]rN)rN)rrrr"r�r�r��propertyrr�r��strr�rr�r�r�r�r�r�r�r�r#r�r�r�r�r�r�rrrrkrkJs����J��O�& ��R�!3�R��R��	
�/�	
��	
��s��t��%M��%M�U�%M�t�%M�ND�+=�D�$�D�
� 
�
�
�	
�

�W�C�W�D�W�

�I�G��s��t��'�#�'rrk�__main__)�ConsolezWin32 Console Examples�black�red)r�r�zblack on greenzChecking colour outputz[on red]on red!z[blue]blue!z[yellow]yellow!z[bold yellow]bold yellow!z[bright_yellow]bright_yellow!z%[dim bright_yellow]dim bright_yellow!z[italic cyan]italic cyan!z'[bold white on blue]bold white on blue!z7[reverse bold white on blue]reverse bold white on blue!z'[bold black on cyan]bold black on cyan!z[black on green]black on green!z[blue on green]blue on green!z[white on black]white on black!z[black on white]black on white!z'[#1BB152 on #DA812D]#1BB152 on #DA812D!zChecking cursor movementz"went back and wrapped to prev linerozwe go upzand downzwe went up and back 2zwe went down and back 2zChecking line erasingz(
...Deleting to the start of the line...z?The red arrow shows the cursor location, and direction of erase��<zblack on redz"

...And to the end of the line...�>z)

...Now the whole line will be erased...zI'm going to disappear!z
black on cyan)r��
)^r"rE�sys�typingrrr$�platform�
LibraryLoader�WinDLL�ImportErrorr�timerrrr	r
rr�pip._vendor.rich.colorr
�pip._vendor.rich.stylerr{�"ENABLE_VIRTUAL_TERMINAL_PROCESSING�_COORDr�	Exceptionrrr'r1�kernel32r9r8r3�argtypesr7�restyper#r@r=�LPDWORDr4�FillConsoleOutputCharacterWrHrF�POINTERr�rLrRrOr-rUrTr<rYrWr]r\rbr`rerd�SetConsoleTitleWrh�LPCWSTRrirkr5�pip._vendor.rich.consoler��console�stdout�termr�r��parse�heading�rule�printr�r��sleepr�r�r�r�r�r�r�r�r�rrr�<module>r�sj����
�������<�<�7��
!�V�
!�
!�&�-�-�
0�F�
��
�"B�C�
D�D��-�-�-�-�.�(�	��%&�"�����	��	�+��+�0���I�&�*�*�I����,�,�
��N�N��
��!���
�� &�	8��	8�(�/�/�	8��/�/�0�0��$�O�O�X�-=�-=�>���"�-�-����x����3��, &���J�J���O�O�
�M�M��N�N���e��(�)��F�N�N�8�>�>�"�)��%�(0�}�}��$������

��
���	�
	��<%�o�o�H�H���O�O��M�M��N�N���e��(�)��F�N�N�8�>�>�"�(��$�'/�m�m��#��������
���	�
	��6"�?�?�B�B���O�O��M�M�%��!�$,�=�=�� �
B����
B�-5�]�]�
B�	�
B� %�o�o�H�H���O�O��F�N�N�-�.�(��$�'/�m�m��#�
&����
&��
&� #�O�O�D�D���O�O���e��(�)�&��"�%-�M�M��!�?����?�);�?�	�?����<�<���O�O��F�N�N�&�'�"���!)�
�
���
G����
G�.A�
G�	�
G� ���<�<���O�O��F�N�N�&�'�"���!)�
�
���G����G�.A�G�	�G��?�?�3�3��%�-�-�.���#�=�=���	)�3�	)�4�	)�s'�s'�l�z��
�^�F�0��i�G��S�Z�Z�(�D��N�N�+�,����/�E��e�k�k�*�+�G��L�L�)�*��M�M�#�$��M�M�-� ��M�M�#�$��M�M�-�.��M�M�1�2��M�M�9�:��M�M�-�.��M�M�;�<��M�M�K�L��M�M�;�<��M�M�3�4��M�M�1�2��M�M�3�4��M�M�3�4��M�M�;�<��L�L�+�,��M�M�O����������O�O�8�9��D�J�J�q�M������O�O�J���D�J�J�q�M������O�O�J���D�J�J�q�M��������������O�O�+�,��D�J�J�q�M��������������O�O�-�.��D�J�J�q�M�	�����M�M�O��L�L�(�)��M�M�=�>��O�O�U�V��D�J�J�q�M����r�"����c�;�5�;�;�~�6�7������D�J�J�q�M������D�J�J�q�M��M�M�8�9��O�O�U�V��D�J�J�q�M����r�"����c�;�5�;�;�~�6�7��D�J�J�q�M������D�J�J�q�M��M�M�?�@����/�{�u�{�{�?�7S��T��D�J�J�q�M��O�O������	�$�K�mrpython3.12/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-312.pyc000064400000003171151732702040021725 0ustar00�

R`iz����ddlmZGd�de�Zedk(r[ddlmZe�Zeeee��eeee��Gd�d�Z	e	�Z
eee
e��eede��y	y	)
�)�ABCc�*�eZdZdZededefd��Zy)�RichRenderablea#An abstract base class for Rich renderables.

    Note that there is no need to extend this class, the intended use is to check if an
    object supports the Rich renderable protocol. For example::

        if isinstance(my_object, RichRenderable):
            console.print(my_object)

    �other�returnc�6�t|d�xst|d�S)z6Check if this class supports the rich render protocol.�__rich_console__�__rich__)�hasattr)�clsrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/abc.py�__subclasshook__zRichRenderable.__subclasshook__s���u�0�1�O�W�U�J�5O�O�N)�__name__�
__module__�__qualname__�__doc__�classmethod�type�boolr�rr
rrs-����P�T�P�d�P��Prr�__main__)�Textc��eZdZy)�FooN)rrrrrr
rrs��rr�N)�abcrrr�pip._vendor.rich.textr�t�print�
isinstancer�frrr
�<module>r#s~���P�S�P�"�z��*���A�	�*�T�>�
*�+�	�*�Q��
'�(�
�
�	��A�	�*�Q��
'�(�	�*�R��
(�)�rpython3.12/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-312.pyc000064400000015010151732702040022143 0ustar00�

R`iO�
��ddlZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
ed�Zeeee	ee	eefe	eeeffZeZGd�de�Ze
dee
ede
efd	��Ze
d
d�dedee
ege
effd
��Z	ddd�dee
edeedee
eee
ege
efffd�Ze
dee
ede
efd��Ze
d
d�dedee
ege
effd��Z	dd
d�dee
ededee
eee
ege
efffd�Zedk(r�eGd�d��Ze�ZddlmZe�Zej;d�ej=e�ej=ed��ej=ed��ej;d�dej>_ ej=e�ej=ed��ej=ed��yy)�N)�partial)
�Any�Callable�Iterable�List�Optional�Tuple�Type�TypeVar�Union�overload�Tc��eZdZdZy)�	ReprErrorz2An error occurred when attempting to build a repr.N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/repr.pyrrs��<rr�cls�returnc��y�Nr�rs r�autor���rF��angularr c��yrrrs rrr rrc��ddttdttdttfd�}|�
t	||��S|||��S)z5Class decorator to create __repr__ from __rich_repr__rr rc���dtdtfd�}dttdtfd�}t	|d�sd|_||_d|_||_|�||j_|S)N�selfrc��g}|j}t|jdd�}|j�D]x}t|t�rUt|�dk(r|t
|d���6|^}}}|�|t
|���O|r	|d|k(r�Z||�d|����h|t
|���z|r,d|jj�ddj|��d�S|jj�d	d
j|��d�S)z%Create repr string from __rich_repr__r F�r�=�<� �>�(z, �))
�append�getattr�
__rich_repr__�
isinstance�tuple�len�repr�	__class__r�join)r$�repr_strr-r �arg�key�value�defaults        r�	auto_reprz+auto.<locals>.do_replace.<locals>.auto_repr+s��"$�H��_�_�F�#�D�$6�$6�	�5�I�G��)�)�+���c�5�)��3�x�1�}��t�C��F�|�,�/2�,��U�W��;�"�4��;�/�&�7�1�:��+>� (�"�c�U�!�E�9�#5�6��4��9�%�,���4�>�>�2�2�3�1�S�X�X�h�5G�4H��J�J��.�.�1�1�2�!�D�I�I�h�4G�3H��J�Jrc3�,K�	tj|j�}|jj	�D]�\}}|j
|jk(rt||����.|j
|j|jfvs�S|j|jk(rt||j�����|jt||j�|jf����y#t$r}td|���d�d}~wwxYw�w)z5Auto generate __rich_rep__ from signature of __init__z'Failed to auto generate __rich_repr__; N)�inspect�	signature�__init__�
parameters�items�kind�POSITIONAL_ONLYr.�POSITIONAL_OR_KEYWORD�KEYWORD_ONLYr:�empty�name�	Exceptionr)r$r>rG�param�errors     r�auto_rich_reprz0auto.<locals>.do_replace.<locals>.auto_rich_reprDs�����
�#�-�-�d�m�m�<�	�#,�#7�#7�#=�#=�#?�K�D�%��z�z�U�%:�%:�:�%�d�D�1�1�����3�3��*�*�(��!�=�=�E�K�K�7�")�$��
�
�";�;�"'�*�*�g�d�E�J�J�.G����"V�V�$@���
��=�e�W�E�����
�s0�D�BC4�A#C4�3D�4	D�=D�D�Dr/zBuild a rich reprzReturn repr(self))	r�strr
�Result�hasattrrr/�__repr__r )rr r;rKs    r�
do_replacezauto.<locals>.do_replace*ss��	K�A�	K�#�	K�2	��a��	�V�	�(�s�O�,�%8�N�"� .�C��/�	�� �����(/�C���%��
rrr)r
rr�boolr)rr rPs   rrr%sJ��
6��Q��6�(�4�.�6�D��G�6�p�{��z�7�3�3��#�w�/�/rc��yrrrs r�	rich_reprrShrrc��yrrrs rrSrSmrrc�4�|�t|��St|�S)Nr)r)rr s  rrSrSrs���{��G�$�$��C�y�r�__main__c��eZdZdefd�Zy)�Foorc#�0K�d��ddgd�if��d��y�w)N�foo�bar�shopping)�eggs�ham�	pineapple)�buyzhand sanitizerr)r$s rr/zFoo.__rich_repr__s"�����K��*�&B�C�C�C�)�)�s�N)rrrrMr/rrrrXrX}s��	*�6�	*rrX)�Consolez
Standard repr�<)�width�zAngular reprTr)!r=�	functoolsr�typingrrrrrr	r
rrr
rrLrM�RichReprResultrHrrrQrSrrXrZ�pip._vendor.rich.consolera�console�rule�printr/r rrr�<module>rls���������C�L��
�%��U�3�Z��s�C�x��%��S�#�
�:N�N�O�	P����=�	�=�
��h�t�A�w���D��G��
��
�!��T��h��Q��y�$�q�'�/A�&B��
��
"�@0�@D�@0�	�$�q�'�	�@0�/7��~�@0�
�4��7�H�d�1�g�Y��Q��/�0�0�1�@0�F
��8�D��G�$���a���
��
�!&��$��8�T�!�W�I�t�A�w�4F�+G��
��
"��6;��	�$�q�'�	��/3��
�4��7�H�d�1�g�Y��Q��/�0�0�1���z��	�*�*�
�*��%�C�0��i�G��L�L��!��M�M�#���M�M�#�R�M� ��M�M�#�R�M� ��L�L�� � $�C�����M�M�#���M�M�#�R�M� ��M�M�#�R�M� �5rpython3.12/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-312.pyc000064400000116227151732702040022536 0ustar00�

R`i����UddlZddlZddlZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZddlmZm
Z
mZddlmZddlmZddlmZddlmZmZmZmZmZmZmZmZmZmZmZm Z dd	l!m"Z"	ddl#Z$e%e$d
�Z&dd
l(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5m6Z6ddl7m8Z8ddl9m:Z:erddl;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAdedeBfd�ZCdededfd�ZDdeEdeBfd�ZFej�dg�ZHdeEdeBfd�ZI								dmded ed!d"d#d$eBd%eBd&eeJd'eeJd(eeJd)eBde eKdffd*�ZLdeEd+e eMeeMd,ffdeBfd-�ZN								dmd ed!d"d#d$eBd%eBd&eeJd'eeJd(eeJd)eBddfd.�ZOGd/�d0e5�ZPd1eeefdeeKeKeKffd2�ZQd1d3deeKeKeKffd4�ZRej�d5�eeRe
eQed6�ed7�eTd8�ed9�eUd:�eVd;�e	d<�eWd=�eXd>�ed?�i
ZYeeMeegeeKeKeKfffeZd@<eXeYj���Z\eTej�eefZ]dedeBfdA�Z^eGdB�dC��Z_eGdD�dE��Z`dedeBfdF�Za			dnd1ed&eeJd'eeJd(eeJde_f
dG�ZbdHdIdddddJ�d1edKeJdLeJd&eeJd'eeJd(eeJd)eBdeKfdM�ZcddNdddddO�d1ed ed!d%eBd&eeJd'eeJd(eeJd)eBddfdP�ZdeedQk(r�GdR�dS�ZfddTlmgZgGdU�dVeg�Zhe
eJ�ZidWeidX<ddYdZd[d\hd]�geUhd^��e
eVd_gd`�i�egda��dbehdcdddedfdgdhg�ef�di�ZjejdXj�ej�ddjllmmZmGdk�dl�ZnemePen���yy#e'$rdZ&Y���wxYw)o�N)�array)�Counter�UserDict�UserList�defaultdict�deque)�	dataclass�fields�is_dataclass)�isclass)�islice)�MappingProxyType)�
TYPE_CHECKING�Any�Callable�DefaultDict�Dict�Iterable�List�Optional�Sequence�Set�Tuple�Union)�RichReprResult�ibF���get_console)�	loop_last)�	pick_bool)�RichRenderable��cell_len)�ReprHighlighter)�JupyterMixin�JupyterRenderable)�Measurement)�Text)�Console�ConsoleOptions�HighlighterType�
JustifyMethod�OverflowMethod�RenderResult�obj�returnc�N�txrtjt|��S)z1Check if an object was created with attrs module.)�
_has_attrs�_attr_module�has�type�r0s ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/pretty.py�_is_attr_objectr9:s���5�,�*�*�4��9�5�5�z_attr_module.Attribute[Any]c�N�trtjt|��SgS)zGet fields for an attrs object.)r3r4r
r6r7s r8�_get_attr_fieldsr<?s��-7�<���t�C�y�)�?�R�?r:c��	|jjjtjk(S#t
$rYywxYw)z�Check if an instance of a dataclass contains the default repr.

    Args:
        obj (object): A dataclass instance.

    Returns:
        bool: True if the default repr is used, False if there is a custom repr.
    F)�__repr__�__code__�co_filename�dataclasses�__file__�	Exceptionr7s r8�_is_dataclass_reprrDDs:����|�|�$�$�0�0�K�4H�4H�H�H������s�03�	?�?�_dummy_namedtuplec��d}	tj|j�}tjt
j�}||k(S#ttf$rY�9wxYw)z�Check if an instance of namedtuple contains the default repr

    Args:
        obj (object): A namedtuple

    Returns:
        bool: True if the default repr is used, False if there's a custom repr.
    N)�inspect�getfiler>�OSError�	TypeErrorrE)r0�obj_file�default_repr_files   r8�_has_default_namedtuple_reprrMXs_���H�
��?�?�3�<�<�0��
 ���(9�(B�(B�C���(�(�(��
�Y��
�	
�
�s�A�A�A�value�consoler*�overflowr.�crop�
indent_guides�
max_length�
max_string�	max_depth�
expand_allc	
��ddlm}	t|t�s|�y|xs
t	�}|j�5}
t||	�r|j
�|jt|t�r|nt|||||||d��|dd��ddd�
j�jd�S#1swY�(xYw)	Nr)�ConsoleRenderable�)rPrRrSrTrUrV�marginT�)rQ�new_line_start�end�
)rOrX�_safe_isinstancer'r�capture�line�printr"�Pretty�get�rstrip)rNrOrPrQrRrSrTrUrVrXr`s           r8�_ipy_display_hookrfls���+���0�1�U�]���&���G�	���	�g��E�#4�5��L�L�N��
�
���~�6�
���!�+�%�%�#�%��	����	�	
�	
�.�;�;�=����%�%�/
�	�s�AB4�4B=�class_or_tuple.c�:�	t||�S#t$rYywxYw)zFisinstance can fail in rare cases, for example types with no __class__F)�
isinstancerC)r0rgs  r8r_r_�s&����#�~�.�.������s��	�c	� ���������
�ddlm�
�xs�
����J�dtddf��������fd�}dt�vrDt	�}	ddlm}
G��
�����fd	�d
|
�}|�}||	jjd<y|t_
y)a�Install automatic pretty printing in the Python REPL.

    Args:
        console (Console, optional): Console instance or ``None`` to use global console. Defaults to None.
        overflow (Optional[OverflowMethod], optional): Overflow method. Defaults to "ignore".
        crop (Optional[bool], optional): Enable cropping of long lines. Defaults to False.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
        expand_all (bool, optional): Expand all containers. Defaults to False.
        max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
    rrNrNr1c���|�P��J�dt_�jt|t�r|nt|�����������|t_yy)z?Replacement sys.displayhook which prettifies objects with Rich.N)rPrRrSrTrUrV)rQ)�builtins�_rbr_r"rc)	rNrOrQrVrRrUrSrTrPs	 ��������r8�display_hookzinstall.<locals>.display_hook�sl������&�&�&��H�J��M�M�#�E�>�:����%�"/�)�)�'�)���
�

��H�J�#r:�get_ipython)�
BaseFormatterc�>��eZdZUdZeed<dedef�������fd�Zy)�install.<locals>.RichFormatterT�pprintrNr1c
�b��|jrt|����������St|�S)N)rOrPrRrSrTrUrV)rsrf�repr)	�selfrNrVrrRrUrSrTrPs	  �������r8�__call__z'install.<locals>.RichFormatter.__call__�s=����;�;�,�� +�
�!)�&3�#-�#-�"+�#-�	�	� ��;�&r:N)�__name__�
__module__�__qualname__rs�bool�__annotations__rrw)rVrrRrUrSrTrPs�������r8�
RichFormatterrr�s%����F�D��

'�c�

'�c�

'�

'r:r}z
text/plain)�pip._vendor.richrr�globalsro�IPython.core.formattersrp�display_formatter�
formatters�sys�displayhook)rOrPrQrRrSrTrUrVrn�iprpr}�rich_formatterrs````````     @r8�installr��s�����0-��&���G������C��D���*��	�!�
�]��9�	'�	'�M�	'�&'���8F����'�'��5�&��r:c��eZdZdZ	ddddddddddddd�deded	d
ededd
eddeededeedeedeededededdfd�Z						dd�Z							dd�Z
y)rcakA rich renderable that pretty prints an object.

    Args:
        _object (Any): An object to pretty print.
        highlighter (HighlighterType, optional): Highlighter object to apply to result, or None for ReprHighlighter. Defaults to None.
        indent_size (int, optional): Number of spaces in indent. Defaults to 4.
        justify (JustifyMethod, optional): Justify method, or None for default. Defaults to None.
        overflow (OverflowMethod, optional): Overflow method, or None for default. Defaults to None.
        no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to False.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
        expand_all (bool, optional): Expand all containers. Defaults to False.
        margin (int, optional): Subtrace a margin from width to force containers to expand earlier. Defaults to 0.
        insert_line (bool, optional): Insert a new line if the output has multiple new lines. Defaults to False.
    N�Fr)�indent_size�justifyrP�no_wraprRrSrTrUrVrZ�insert_line�_object�highlighterr,r�r�r-rPr.r�rRrSrTrUrVrZr�r1c���||_|xs
t�|_||_||_||_||_||_||_|	|_	|
|_
||_||_|
|_
y�N)r�r%r�r�r�rPr�rRrSrTrUrVrZr�)rvr�r�r�r�rPr�rRrSrTrUrVrZr�s              r8�__init__zPretty.__init__sk��"���&�;�/�*;���&���29���4<��
����*���$���$���"���$������&��r:c	#�K�t|j|j|jz
|j|j
|j|j|j��}tj||jxs|j|jxs|jt|j|j�d��}|r|j|�n"tt!|j��d�d��}|j"r)|j$s|j'|jd��}|j(rd|vrd	��|��y�w)
N��	max_widthr�rSrTrUrV�pretty)r�rPr��stylez.__repr__ returned empty stringz
dim italic)r�zrepr.indentr^r[)�pretty_reprr�r�rZr�rSrTrUrVr)�	from_ansir�rPr!r�r�r6rR�
ascii_only�with_indent_guidesr�)rvrO�options�
pretty_str�pretty_texts     r8�__rich_console__zPretty.__rich_console__&s$����!��L�L��'�'�$�+�+�5��(�(��������n�n����
�
��n�n���L�L�3�G�O�O��]�]�6�g�&6�&6��d�l�l�G�O�O�<��
���
���[�)������%�&�&E�F�"��	����g�&8�&8�%�8�8�� � �
�9��K������ 3��H���s�EEc	��t|j|j|j|j|j
|j|j��}|r td�|j�D��nd}t||�S)Nr�c3�2K�|]}t|����y�wr�r#��.0ras  r8�	<genexpr>z*Pretty.__rich_measure__.<locals>.<genexpr>Vs����C�+B�4����+B���r)r�r�r�r�rSrTrUrV�max�
splitlinesr()rvrOr�r��
text_widths     r8�__rich_measure__zPretty.__rich_measure__Isw��!��L�L��'�'��(�(��������n�n����
�
�HR�C�C�:�+@�+@�+B�C�C�WX�	��:�z�2�2r:r�)rOr*r�r+r1r/)rOr*r�r+r1r()rxryrz�__doc__rr�intr{r�r�r��r:r8rcrc�s���,48�'�
�-1�/3�"'�#�$(�$(�#'� ��!�'��'��/�0�'�
�'��/�*�
'��+�,�'��$��'��'��S�M�'��S�M�'��C�=�'��'��'��'� 
�!'�>!� �!�+;�!�	�!�F3� �3�+;�3�	�3r:rcr�c�D�d|j�d�dd|j�d�fS)Nzdefaultdict(z, {�})z, {}))�default_factory�r�s r8�_get_braces_for_defaultdictr�[s5��
�w�.�.�1��6��
�w�.�.�1��9��r:z
array[Any]c�D�d|j�d�dd|j�d�fS)Nzarray(z, [�])�))�typecoder�s r8�_get_braces_for_arrayr�cs0���W�%�%�(��,�d�f�W�=M�=M�<P�PQ�4R�S�Sr:c��y)N)z	environ({r�zenviron({})r�r�s r8�<lambda>r�hs��!Cr:c��y)N)z	Counter({r�z	Counter()r�r�s r8r�r�ks��=r:c��y)N)zdeque([r�zdeque()r�r�s r8r�r�ls��7r:c��y�N)�{�}z{}r�r�s r8r�r�m���*r:c��yr�r�r�s r8r�r�n���.r:c��y)N)zfrozenset({r�zfrozenset()r�r�s r8r�r�os��Cr:c��y�N)�[�]z[]r�r�s r8r�r�pr�r:c��yr�r�r�s r8r�r�qr�r:c��y)N)r�r�zset()r�r�s r8r�r�rs��,r:c��y)N)�(r��()r�r�s r8r�r�ss��+r:c��y)N)zmappingproxy({r�zmappingproxy({})r�r�s r8r�r�ts��&Rr:�_BRACESc��t|t�xs&t|�xst|d�xst	|�xrt|�S)z3Check if an object may be expanded by pretty print.�
__rich_repr__)r_�_CONTAINERSr�hasattrr9rr7s r8�
is_expandabler�zsO��	��k�*�	 ����	 ��C��)�	 ��3��	�
�c�l�
�r:c	��eZdZUdZdZeed<dZeed<dZeed<dZ	eed<dZ
eed<dZeed	<dZ
eed
<dZeed<dZeeded
<dZeed<dZeed<deefd�Zdededefd�Zdefd�Z	ddedededefd�Zy)�Nodez4A node in a repr tree. May be atomic or a container.r[�key_repr�
value_repr�
open_brace�close_brace�emptyF�last�is_tuple�
is_namedtupleN�childrenz: �
key_separatorz, �	separatorr1c#�^K�|jr|j��|j��|jr|j��y|j��|jr�|j��|j
rN|jsBt|j�dk(r*|jdj�Ed{���d��nD|jD]5}|j�Ed{���|jr�(|j���7|j��y|j��yy7�l7�B�w)zGenerate tokens for this node.Nrr�,)
r�r�r�r�r�r�r��len�iter_tokensr�r�r�r�)rv�childs  r8r�zNode.iter_tokens�s������=�=��-�-���$�$�$��?�?��/�/�!�
�]�]�
&��}�}��o�o�%��=�=��);�);��D�M�M�@R�VW�@W�#�}�}�Q�/�;�;�=�=�=��I�!%����#(�#4�#4�#6�6�6�$�z�z�"&�.�.�0�"/��&�&�&��j�j� �'�>��7�s*�B:D-�<D)�=+D-�(D+�)D-�:0D-�+D-�start_lengthrSc�\�|}|j�D]}|t|�z
}||kDs�yy)a*Check the length fits within a limit.

        Args:
            start_length (int): Starting length of the line (indent, prefix, suffix).
            max_length (int): Maximum length.

        Returns:
            bool: True if the node can be rendered within max length, otherwise False.
        FT)r�r$)rvr�rS�total_length�tokens     r8�check_lengthzNode.check_length�s:��$���%�%�'�E��H�U�O�+�L��j�(��(�r:c�D�dj|j��}|S�Nr[)�joinr�)rv�	repr_texts  r8�__str__zNode.__str__�s���G�G�D�,�,�.�/�	��r:r�r�rVc�(�t|d��g}d}|t|�kr[||}|jr6|js*|s|j	|�s|j|�|||dz|dz
}|t|�kr�[dj
d�|D��}|S)alRender the node to a pretty repr.

        Args:
            max_width (int, optional): Maximum width of the repr. Defaults to 80.
            indent_size (int, optional): Size of indents. Defaults to 4.
            expand_all (bool, optional): Expand all levels. Defaults to False.

        Returns:
            str: A repr string of the original object.
        T)�node�is_rootrrr^c3�2K�|]}t|����y�wr�)�strr�s  r8r�zNode.render.<locals>.<genexpr>�s����9�5�4�S��Y�5�r�)�_Liner��
expandable�expandedr��expandr�)rvr�r�rV�lines�line_nora�repr_strs        r8�renderzNode.render�s����D�$�/�0������E�
�"���>�D����t�}�}��T�%6�%6�y�%A�37�;�;�{�3K�E�'�G�a�K�0��q�L�G���E�
�"��9�9�9�5�9�9���r:)�Pr�F)rxryrzr�r�r�r|r�r�r�r�r�r{r�r�r�rrr�r�rr�r�r�r�r�r�r:r8r�r��s���>��H�c���J����J����K����E�3�O��D�$���H�d���M�4��'+�H�h�t�F�|�$�+��M�3���I�s��!�X�c�]�!�,���#��$��"���
MR����03��EI��	�r:r�c���eZdZUdZdZeded<dZeed<dZ	ee
ed<dZeed<dZ
eed	<dZeed
<dZeed<dZeed<ed
efd��Zded
efd�Zded
edfd�Zd
efd�Zy)r�zA line in repr output.N�parentFr�r�r[�text�suffix�
whitespacer�r�r1c�`�t|jduxr|jj�S)z"Check if the line may be expanded.N)r{r�r��rvs r8r�z_Line.expandable�s'���D�I�I�T�)�@�d�i�i�.@�.@�A�Ar:rSc���t|j�t|j�zt|j�z}|j
�J�|j
j
||�S)z4Check this line fits within a given number of cells.)r�rr$r�rr�r�)rvrSr�s   r8r�z_Line.check_length�sZ��
���� �8�D�I�I�#6�6��$�+�+�9N�N�	��y�y�$�$�$��y�y�%�%�l�J�?�?r:r�c	#�lK�|j}|�J�|j}|jsJ�|jr4t	|j�|j
�|j��|����}nt	|j|����}|jd|zz}|jxrt|j�dk(}t|j�D].\}}|rdn|j}	t	||||	|xr|��}
|
���0t	|j||j|j����y�w)z6Expand this line by adding children on their own line.N)r�r� rr�)r�r�rrr�)r�rrr�)r�rr�r�r�r�r�r�r�r r�r�rr�)rvr�r�r�new_line�child_whitespace�tuple_of_oner�r�r�ras           r8r�z_Line.expand�s#�����y�y�������_�_�
��}�}��}��=�=�"��
�
��t�'9�'9�&:�4�?�?�:K�L�%���H�
#����J�O�O�H��?�?�S�;�->�>���}�}�@��T�]�]�);�q�)@��$�T�]�]�3�K�D�%�+�����I����+� ��.�,�.��D��J�4���!�!�!��;�;����	
�	
�s�D2D4c��|jr*|j�|j�|jxsd��S|j�|j�|jxsd�|jj���Sr�)r�rr�r�rrers r8r�z
_Line.__str__si���9�9��o�o�&�t�y�y�k�$�)�)�/�r�1B�C�C��?�?�#�D�I�I�;�t�y�y��B�.?����@R�@R�@T�?U�V�
r:)rxryrzr�r�rr|r�r{r�r�r�r�rrr�r��propertyr�r�r�rr�r�r�r:r8r�r��s��� � $�F�H�W��$��G�T���D�(�4�.���D�#�N��F�C���J����H�d���D�$��
�B�D�B��B�@�s�@�t�@�
�#�
�(�7�*;�
�B��r:r�c��	t|dd�}t|t�xrt|t�S#t$rYywxYw)aXChecks if an object is most likely a namedtuple. It is possible
    to craft an object that passes this check and isn't a namedtuple, but
    there is only a minuscule chance of this happening unintentionally.

    Args:
        obj (Any): The object to test

    Returns:
        bool: True if the object is a namedtuple. False otherwise.
    �_fieldsNF)�getattrrCri�tuple)r0r
s  r8�_is_namedtuplersD�����i��.���c�5�!�?�j���&?�?������s�
1�	=�=c	����������	�dtdtf�fd��t��	�	j��	j�d	dtdt
dtdtf�������	fd�
��|d��}|S)
a`Traverse object and generate a tree.

    Args:
        _object (Any): Object to be traversed.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
            Defaults to None.
        max_depth (int, optional): Maximum depth of data structures, or None for no maximum.
            Defaults to None.

    Returns:
        Node: The root of a tree structure which can be used to render a pretty repr.
    r0r1c������>t|ttf�r(t|��kDrt|��z
}|d��d|��}|S	t	|�}|S#t
$r}dt|��d�}Yd}~|Sd}~wwxYw)z0Get repr string for an object, but catch errors.N�+z<repr-error �>)r_�bytesr�r�rurC)r0�	truncated�obj_repr�errorrTs    �r8�to_reprztraverse.<locals>.to_reprEs����
�"� ��u�c�l�3��C��:�%��C��:�-�I��k�z�*�-�Q�y�k�:�H���	
:���9������
:�)�#�e�*��q�9�����
:�s�A�	A3�A.�.A3�root�depthc	�P���"�t��}|�)vrtd��St��}�$duxr|�$k\}dtdtt
ttttfffd�}	t�d�}d}|s(	t�d	�rt��s�j�}|��7�'|�t�jd
d�}	t||��}
�jj}|
r�g}|j }
|r#|	rtd|�d���}n�t|�d
���}n�|	rtd|�d�d||d��}nt|�d�d||��}t#|
�D]a\}}t%|t&�r0|\}}�#||dz��}||_||_d|_|
|��F�#||dz��}||_|
|��cnt|	rd|�d�n|�d�g|��}�&|��nt/���rA|�s>�'|�g}|j }
t1���"�"r�|r$t�jj�d
���}n�t�jj�d�d||��}dttttt2t4tgtfff�"�fd�}t#|��D]Q\}\}}}|rtt||����}n
�#||dz��}||_||_d|_|
|��Sn%t�jj�d�g|��}�&|��n�t7���rt%�t�s�|s�t9��r��'|�g}|j }
|r$t�jj�d
���}n�t�jj�d�d||�jj�d���}t#d�t;��D��D]M\}}�#t�|j<�|dz��}|j<|_||_d|_|
|��O�&|��n�t?��r�tA��r��'|��jj}|rt|�d
���}ng}|j }
t|�d�d||�d���}t#�jC�jE��D]2\}\}}�#||dz��}||_||_d|_|
|��4�&|��n�t%�tF��r�tFD]}t%�|�s�|}n�'|�tI|��\}}}|rt|�d|����}�n[|jJt��jJk7rt�(��|��}�n$��rg}t||||��}|j }
tM��}|dz
}t%�tN�rjtQ�jE��}�%�tS|�%�}tU|�D]4\} \}}�#||dz��}�(|�|_| |k(|_|
|��6nKtQ��}!�%�tS|!�%�}!tU|!�D]$\} }�#||dz��}| |k(|_|
|��&�%�-|�%kDr(|
td|�%z
��d���nt|g|� �}�&|�nt�(��|��}t%�t&�|_+t?��|_,|S#t$rd}Y���wxYw#t$rY���wxYw)!zWalk the object depth first.z...)r�N�	rich_argsr1c3��K�|D]h}t|t�rRt|�dk(r|\}}}||k(r�-||f���4t|�dk(r|\}}||f���Nt|�dk(s�]|d���e|���jy�w)N��rr)r_rr�)r�arg�keyr��defaults     r8�iter_rich_argsz3traverse.<locals>._traverse.<locals>.iter_rich_argses}���� ��#�C��/��3�x�1�}�.1�+��U�G�"�e�+�$�!�5�j�(��S��Q��%(�
��U�!�5�j�(��S��Q��!�!�f���I�!�s�AA1�"A1�,awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492Fr��angular�<z...>z(...)rr)r�r�r�r�r�r�r�)r�r�r�r�r)r�=r�)r�r�r�c3��K��D]X}|js�	t�|j�}|j|t|j�r|jndf���Zy#t$r}|j|df��Yd}~�{d}~wwxYw�w)z$Iterate over attr fields and values.N)rur�name�callablerC)�attrrNr�attr_fieldsr0s   ��r8�
iter_attrsz/traverse.<locals>._traverse.<locals>.iter_attrs�s}�����%0�D�#�y�y�
!&�,3�C����,C�E�)-�	�	�(-�5=�d�i�i�5H��	�	�d�+&�%&�%0��(1�!C�+/�9�9�e�T�*B�$B��!C�s-�B	�A"�5B	�"	B�+B�<B	�B�B	)r�r�r�r�r�c3�:K�|]}|js�|���y�wr�)ru)r��fields  r8r�z.traverse.<locals>._traverse.<locals>.<genexpr>�s����-�'2�e�e�j�j�E�{�s��)r�r�r�r�)r�r�z... +T)r�r�r�)-�idr�r6rrrrr�r�rCrr�r�list�	__class__rx�appendr r_rr�r�r�r9r<rrrrDr
r*rrM�_asdict�itemsr�r�r>r��_MAPPING_CONTAINERS�iterr
�	enumerater�r�)*r0rr�obj_id�obj_type�reached_max_depthr$�fake_attributes�rich_repr_resultr&�args�
class_namer�r4r�r�r!r"r��
child_noder.r*rN�
repr_callabler0�container_typer�r�r��	num_items�last_item_index�
iter_items�index�iter_valuesr-�	_traverserUrS�pop_visited�push_visitedr�visited_idss*`                                 @�������r8rIztraverse.<locals>._traverseYsN����C����[� ��5�)�)���9��%�T�1�H�e�y�6H��	�c�	�h�u�S�%��S��/�=Q�7R�.S�	� 	$�%��C��O�6:���
��3��0����'*�'8�'8�':�$��'��� ��c�/�/��E�B�G���'7�8�9�D����/�/�J����!����$��#��:�,�d�/C�D��#�*��U�/C�D���#�)*�:�,�a�'8�(+�%-�!%�&)� �� $�*4��Q�'7�(+�%-�!%�	 ��&/�t�_�	��c�+�C��7�),�J�C��)2�5���	�)J�J�.2�J�O�25�J�/�7:�J�4�"�:�.�)2�3�e�a�i�)H�J�.2�J�O�"�:�.�&5��4;��:�,�a�0�J�<�r�AR�����

���
�S�
!�/��� ��H��_�_�F�*�3�/�K��$��c�m�m�.D�.D�-E�U�+K�L�D��&)�m�m�&<�&<�%=�Q�#?�$'�!)�!�	�D�&���c�3���3�%��*�1E�(F�F�G�)�&�$?H�
��>U�:��:�t�U�M�(�)-��]�5�=Q�9R�)S�J�)2�5���	�)J�J�*.�
��.2�
�+�36�
�0��z�*�?V��"%�-�-�"8�"8�!9��<�r�PT���
������$�S�$�/�#�"�3�'��� ��H��_�_�F� ��#�-�-�*@�*@�)A��'G�H���"%�-�-�"8�"8�!9��;� #�%�� �]�]�3�3�4�B�7���$-�-�'-�c�{�-�$�K�D�%�"+�7�3��
�
�+C�5�ST�9�!U�J�*/�*�*�J�'�&*�J�O�/2�J�,��:�&�$�
���
�C�
 �%A�#�%F��� ����/�/�J� ��",��U�3�����!�����",��Q�/� #�%�'�L��+�	��+4�C�K�K�M�4G�4G�4I�*J�&�D�,�3��!*�5���	�!B�J�*-�J�'�&*�J�O�/2�J�,��:�&�+K�
���
�c�;�
/�"-��#�C��8�-�H��#.�

�� �-4�X�->�s�-C�*�J��U� ��*��S��
�'F�G���"�"�d�3�i�&8�&8�8��w�s�|�$�?������)� +�%��	��"������H�	�"+�a�-��#�C�)<�=�!%�c�i�i�k�!2�J�!�-�%+�J�
�%C�
�/8��/D�+��|��U�%.�u�E�A�I�%F�
�.5�c�l�
�+�*/�?�*B�
���z�*�	0E�#'�s�)�K�!�-�&,�[�*�&E��(1�+�(>���u�%.�u�E�A�I�%F�
�*/�?�*B�
���z�*�)?��)�i�*�.D��4�U�9�z�3I�2J�+K�RV�W�X��%�"�4�@������7�3�<�d�;�D�(��e�4��
�+�C�0������s�	$�#�O�	$���
��
�s$�'\�8'\�\�\�	\%�$\%T)r)Fr)rr��set�add�remover{r�r�)
r�rSrTrUr�rIrJrKrrLs
 ``` @@@@@r8�traverserP0ss���*�S��S��  �E�K��?�?�L��$�$�K�y�s�y�$�y�s�y�4�y�y�v�W�4�(�D��Kr:r�r�r�r�r�c�r�t|t�r|}nt||||��}|j|||��}|S)a�Prettify repr string by expanding on to new lines to fit within a given width.

    Args:
        _object (Any): Object to repr.
        max_width (int, optional): Desired maximum width of repr string. Defaults to 80.
        indent_size (int, optional): Number of spaces to indent. Defaults to 4.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
            Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structure, or None for no depth.
            Defaults to None.
        expand_all (bool, optional): Expand all containers regardless of available width. Defaults to False.

    Returns:
        str: A possibly multi-line representation of the object.
    )rSrTrU)r�r�rV)r_r�rPr�)	r�r�r�rSrTrUrVr�r�s	         r8r�r�XsI��8���&�����
�z�Y�
���K�K���� ��H��Or:T)rOrRrSrTrUrVc�f�|�
t�n|}|jt||||||d��d��y)a�A convenience function for pretty printing.

    Args:
        _object (Any): Object to pretty print.
        console (Console, optional): Console instance, or None to use default. Defaults to None.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of strings before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth for nested data structures, or None for unlimited depth. Defaults to None.
        indent_guides (bool, optional): Enable indentation guides. Defaults to True.
        expand_all (bool, optional): Expand all containers. Defaults to False.
    N�ignore)rSrTrUrRrVrPT)�	soft_wrap)rrbrc)r�rOrRrSrTrUrV�_consoles        r8rsrs�sD��,!(��{�}�W�H��N�N���!�!��'�!��	
���r:�__main__c��eZdZdefd�Zy)�
BrokenReprr1c��ddzy)Nrrzthis will failr�rs r8r>zBrokenRepr.__repr__�s��
��E�#r:N�rxryrzr�r>r�r:r8rXrX�s��	$�c�	$r:rX)�
NamedTuplec�F�eZdZUeed<eed<eed<eed<eeed<y)�StockKeepingUnitr*�description�price�category�reviewsN)rxryrzr�r|�floatrr�r:r8r]r]�s!���	������
��c��r:r]��foozHello World!gZd;�Y@g�ʡE�3t@gcA>�rr rr�rc���>rr r�crumble)�apple�rhubarb�butter�sugar�flour)rj�orange�pear�kumquatrq�Xduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurian)FTNzSparkling British Spring WaterzCarbonated spring waterg�������?�waterzits amazing!z
its terrible!)rd�barr�counter�atomic�
namedtuple�Broken)rbc��eZdZdefd�Zy)�Thingr1c��y)NzHello World!r�rs r8r>zThing.__repr__�s��/r:NrZr�r:r8rzrz�s��	0�c�	0r:rz)NrSFFNNNF)NNN)orl�collectionsrArG�osr�rrrrrrr	r
rr�	itertoolsr
�typesr�typingrrrrrrrrrrrr�pip._vendor.rich.reprrr,r4r�r3�ImportErrorr[r�_loopr �_pickr!�abcr"�cellsr$r�r%�jupyterr&r'�measurer(r�r)rOr*r+r,r-r.r/r{r9r<�objectrDrwrErMr�r�rfr6r_r�rcr�r��_Environ�dict�	frozensetr2rMrr�r|�keysr�r7r�r�r�rrPr�rsrxrXr[r]�d�datar4r~rbrzr�r:r8�<module>r�s�������	�
��G�G�7�7���"�
�
�
�
�1�����t�,�J������(�4� �����6��6��6�
@�#�@�(�+H�"I�@�
�F��t��"+�K�*�*�+>��C��)�f�)��)�,$(�!)��� $� $�#��+&��+&�
�i�
 �+&��+&��	+&�
�+&���
�
+&���
�+&���}�+&��+&��3��9��+&�\�	��!&�t�U�4��9�-=�'=�!>��	��$(�!)��� $� $�#��L'�
�i�
 �L'��L'��L'��	L'�
��
�L'���
�
L'���}�L'��L'�
�L'�^e3�\�e3�P��S�#�X�)>��5��c�SV��CW��T�<�T�E�#�s�C�-�4H�T�
�K�K�C�	� ��,��
=�	�7��
*��.�
�C��
*��.��	,�	�+��R�>���d�H�c�U�E�#�s�C�-�$8�8�9�9�	:���G�L�L�N�#���R�[�[�*:�H�E���s��t���Q�Q��Q�h�@�@��@�F@��@��@�*!%� $�#�	e�
�e���
�e���
�e���}�	e�

�e�V	�� $� $�#��%�
�%��%��	%�
��
�%���
�
%���}�%��%�	�%�V$(�� $� $�#��"�
�"��i�
 �"��	"�
��
�"���
�
"���}�"��"�
�"�J�z��$�$�
"��:��	�C��A��A�e�H�
�����&�

���#�"��9�N�O�
��
�	
�&�&�,�%���
�_�-�
��,�? �D�B	��K���t��&�0�0�
�&���/��{��G���J��s�-
L>�>M	�M	python3.12/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-312.pyc000064400000004214151732702050022504 0ustar00�

R`i����ddlmZddlmZddlmZddlmZerddlm	Z	m
Z
mZmZGd�d�Z
ed	k(r$dd
lmZddlmZe
ed�d
�Zee�yy)�)�
TYPE_CHECKING�)�Measurement)�Segment)�	StyleType)�Console�ConsoleOptions�RenderResult�RenderableTypec�@�eZdZdZdd�Z						dd	�Zdddddefd
�Zy)
�Styledz�Apply a style to a renderable.

    Args:
        renderable (RenderableType): Any renderable.
        style (StyleType): A style to apply across the entire renderable.
    �returnNc� �||_||_y�N)�
renderable�style)�selfrrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/styled.py�__init__zStyled.__init__s��$�����
��consoler�optionsr	c��|j|j�}|j|j|�}t	j
||�}|Sr)�	get_styler�renderrr�apply_style)rrrr�rendered_segments�segmentss      r�__rich_console__zStyled.__rich_console__sE���!�!�$�*�*�-��#�N�N�4�?�?�G�D���&�&�'8�%�@���rc�D�tj|||j�Sr)r�getr)rrrs   r�__rich_measure__zStyled.__rich_measure__s�����w�����A�Ar)rrrrrN)rrrr	rr
)�__name__�
__module__�__qualname__�__doc__rrrr"�rrr
r
sJ����� ��+;��	��B� �B�+;�B�	�Brr
�__main__)�print)�Panel�hellozon blueN)�typingr�measurer�segmentrrrrrr	r
rr
r#�pip._vendor.richr)�pip._vendor.rich.panelr*�panelr'rr�<module>r2sR�� � ����N�N�B�B�4�z��&�,��5��>�9�-�E�	�%�L�rpython3.12/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-312.pyc000064400000013741151732702050022663 0ustar00�

R`i��
��ddlmZmZmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
erddlmZmZmZmZddlmZGd	�d
�Zedk(rzddlmZdd
lmZddlmZddlmZeeej@��D�cgc]}e|e
e!|�d������c}dd��Z"eee"dd��d��5Z	ed��	ycc}w#1swYyxYw)�)�cast�List�Optional�
TYPE_CHECKING�Union�)�SPINNERS)�Measurement)�Table)�Text)�Console�ConsoleOptions�RenderResult�RenderableType)�	StyleTypec��eZdZdZ	dddd�deddd	ed
deddf
d
�Z						dd�Zddddde	fd�Z
deddfd�Zdddd�ddd	ed
deeddfd�Zy)�Spinnera�A spinner animation.

    Args:
        name (str): Name of spinner (run python -m rich.spinner).
        text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
        style (StyleType, optional): Style for spinner animation. Defaults to None.
        speed (float, optional): Speed factor for animation. Defaults to 1.0.

    Raises:
        KeyError: If name isn't one of the supported spinner animations.
    �Ng�?)�style�speed�name�textrrrr�returnc�`�	t|}t|t�rt	j
|�n||_ttt|d�dd|_	tt|d�|_d|_||_
||_d|_d|_y#t$rtd|����wxYw)Nzno spinner called �frames�interval�)r	�KeyError�
isinstance�strr�from_markuprrrr�floatr�
start_timerr�frame_no_offset�
_update_speed)�selfrrrr�spinners      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/spinner.py�__init__zSpinner.__init__s���	:��t�n�G�'1��s�&;�D���T�"��	
�	��4��9�g�h�&7�8��;����U�G�J�$7�8��
�+/�����
���
�&)��� �����	:��/��x�8�9�9�	:�s�	B�B-�consoler
�optionsrc#�NK�|j|j����y�w)N)�render�get_time)r&r*r+s   r(�__rich_console__zSpinner.__rich_console__1s �����k�k�'�*�*�,�-�-�s�#%c�R�|jd�}tj|||�S)Nr)r-r
�get)r&r*r+rs    r(�__rich_measure__zSpinner.__rich_measure__6s$���{�{�1�~�����w���6�6��timec��|j�||_||jz
|jz|jdzz|jz}t	|j
t
|�t|j
�z|jxsd��}|jr&||_||_|j|_d|_	|js|St|jttf�r!t	j|d|j�Stjd��}|j!||j�|S)z�Render the spinner for a given time.

        Args:
            time (float): Time in seconds.

        Returns:
            RenderableType: A renderable containing animation frame.
        g@�@r�rr� r)�padding)r#rrr$rr�int�lenrr%rrr �assembler�grid�add_row)r&r4�frame_no�frame�tables     r(r-zSpinner.render<s	���?�?�"�"�D�O��D�O�O�+�t�z�z�9��M�M�F�"�
�� � �!����K�K��H�
��D�K�K�(8�8�9����AQ�r�
�����#+�D� �"�D�O��+�+�D�J�!$�D���y�y��L�
��	�	�C��;�
/��=�=���T�Y�Y�7�7��J�J�q�)�E��M�M�%����+��Lr3)rrrc��|r,t|t�rtj|�n||_|r||_|r||_yy)a�Updates attributes of a spinner after it has been started.

        Args:
            text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
            style (StyleType, optional): Style for spinner animation. Defaults to None.
            speed (float, optional): Speed factor for animation. Defaults to None.
        N)rr rr!rrr%)r&rrrs    r(�updatezSpinner.update^s>���2<�T�3�2G��(�(��.�T�D�I���D�J��!&�D��r3)r)r*r
r+rrr)
�__name__�
__module__�__qualname__�__doc__r rr"r)r/r
r2r-rB�r3r(rr
s���
�"$�!�
(,��
!��!��!�
��$�!��
!�
�!�..� �.�+;�.�	�.�
7� �7�+;�7�	�7� �5� �%5� �J"$�'+�!%�'��'���$�	'�
���'�
�
'r3r�__main__)�sleep)�Columns)�Panel)�Live�greenr6)rT)�column_first�expand�Spinners�blue)�title�border_style�)�refresh_per_secondg�������?N)#�typingrrrrr�	_spinnersr	�measurer
r@rrrr*r
rrrrrrrCr4rI�columnsrJ�panelrK�liverL�sorted�keys�repr�all_spinners)�spinner_names0r(�<module>ras���=�=�� ����N�N� �d'�d'�N�z��� ����!'�}�x�}�}�� 7�	
� 7��
�L�t�D��,>�g�'N�O� 7�	
���
�L�
�
�l�*�6�B��
�
���#�J��)��	
�
�
�s�=C�9C
�
Cpython3.12/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-312.pyc000064400000014731151732702050022154 0ustar00�

R`i���^�ddlmZddlmZddlmZmZddlmZm	Z	m
Z
ddlmZddl
mZddlmZdd	lmZGd
�de�Zedk(rZdd
lZddlmZ	ej.dZe�Zej3ee���e�Zej3ed�d��y
y
#e$rdZY�JwxYw)�)�Union�)�AlignMethod)�cell_len�
set_cell_size)�Console�ConsoleOptions�RenderResult)�JupyterMixin��Measurement)�Style)�Textc��eZdZdZ	dddddd�deeefded	eeefd
ededd
fd�Z	defd�Z
dedede
fd�Zdededefd�Zdededefd�Zy
)�RuleuA console renderable to draw a horizontal rule (line).

    Args:
        title (Union[str, Text], optional): Text to render in the rule. Defaults to "".
        characters (str, optional): Character(s) used to draw the line. Defaults to "─".
        style (StyleType, optional): Style of Rule. Defaults to "rule.line".
        end (str, optional): Character at end of Rule. defaults to "\\n"
        align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center".
    u─z	rule.line�
�center)�
characters�style�end�align�titlerrrr�returnNc��t|�dkrtd��|dvrtd|�d���||_||_||_||_||_y)Nrz:'characters' argument must have a cell width of at least 1)�leftr�rightzAinvalid value for align, expected "left", "center", "right" (not �))r�
ValueErrorrrrrr)�selfrrrrrs      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/rule.py�__init__z
Rule.__init__sm���J��!�#��L��
��3�3��S�TY�S\�\]�^��
���
�$�����
������
�c�<�d|j�d|j�d�S)NzRule(z, r)rr)rs r �__repr__z
Rule.__repr__.s ���t�z�z�n�B�t���&9��;�;r"�console�optionsc#�K�|j}|jr|jj�sdn|j}t	|�}|j
s|j
||���yt|j
t�r
|j
}n|j|j
d��}|jjdd�|_
|j�|jdk(rdnd}td	||z
�}|s|j
||���yt|j�
�}	|jdk(�r
|j!|d��|t	|j�z
dz}
t||
|zd
zz�}|j!|
d
z
�|t	|j�z
t	|j�z
}t||
|zd
zz�}
|
j!|�|	j#|jdz|j$�|	j#|�|	j#d|
jz|j$�n�|jdk(rb|j!|d��|	j#|�|	j#d�|	j#|||	jz
z|j$�ns|jdk(rd|j!|d��|	j#|||jz
d
z
z|j$�|	j#d�|	j#|�t'|	j|�|	_
|	��y�w)N�-z	rule.text)rr� r��r)r�ellipsis)�overflowrrr)�	max_width�
ascii_onlyr�isasciirr�
_rule_line�
isinstancer�
render_str�plain�replace�expand_tabsr�maxr�truncate�appendrr)rr%r&�widthr�	chars_len�
title_text�required_space�truncate_width�	rule_text�
side_widthr�right_lengthrs              r �__rich_console__zRule.__rich_console__1s������!�!���"�"�4�?�?�+B�+B�+D�
����	��Z�(�	��z�z��/�/�)�U�3�3���d�j�j�$�'����J� �+�+�D�J�J�k�+�J�J�%�+�+�3�3�D�#�>�
����� �"�j�j�H�4��!���Q��� 6�7����/�/�)�U�3�3���T�X�X�&�	��:�:��!�������D��(�:�+;�+;�"<�<��B�J��
�j�I�&=��&A�B�C�D��M�M�*�q�.�)� �8�D�J�J�#7�7�(�:�CS�CS�:T�T�L���z�Y�'>��'B�C�D�E��N�N�<�(����T�Z�Z�#�-�t�z�z�:����Z�(����S�5�;�;�.��
�
�;�
�Z�Z�6�
!�������D����Z�(����S�!����Z�5�9�3E�3E�+E�F��
�
�S�
�Z�Z�7�
"�������D����Z�5�:�3F�3F�+F��+J�K�T�Z�Z�X����S�!����Z�(�'�	����?�	����s�MMr;r:c��t|j||zdzz|j�}|j|�t	|j
|�|_|S�Nr)rrrr8rr4)rr;r:r?s    r r1zRule._rule_lineisK������U�i�-?�1�,D�E�t�z�z�R�	����5�!�'�	����?�	���r"c��tdd�SrDr)rr%r&s   r �__rich_measure__zRule.__rich_measure__os���1�a� � r")�)�__name__�
__module__�__qualname__�__doc__r�strrrrr!r$rr	r
rB�intr1r
rF�r"r rrs����#%�� �#.��%���S�$�Y����	�
�S�%�Z� ���
���
��.<�#�<�6��6�)7�6�	�6�p�C������!��!�)7�!�	�!r"r�__main__N)rzHello, World)r�foor*)r:)�typingrrr�cellsrrr%rr	r
�jupyterr�measurer
rr�textrrrH�sys�pip._vendor.rich.console�argv�
IndexError�printrNr"r �<module>r[s�����*�:�:�!� ���f!�<�f!�R�z���0���x�x��{���i�G��M�M�$�T�"�#��i�G��M�M�$�u�+�Q�M�'��������s�B"�"B,�+B,python3.12/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-312.pyc000064400000014360151732702050022305 0ustar00�

R`i����ddlZddlmZmZmZmZmZddlmZddl	m
Z
mZGd�d�ZGd�d	e
�ZGd
�d�Zedk(re�Zeej&�yy)
�N)�Dict�List�IO�Mapping�Optional�)�DEFAULT_STYLES)�Style�	StyleTypec
��eZdZUdZeeefed<	ddee	ee
fdefd�Ze
defd��Ze	ddeed	eededdfd
��Ze	ddededeeddfd
��Zy)�Themea'A container for style information, used by :class:`~rich.console.Console`.

    Args:
        styles (Dict[str, Style], optional): A mapping of style names on to styles. Defaults to None for a theme with no styles.
        inherit (bool, optional): Inherit default styles. Defaults to True.
    �stylesN�inheritc��|rtj�ni|_|�c|jj|j	�D��cic]-\}}|t|t�r|nt
j|���/c}}�yycc}}w)N)r	�copyr�update�items�
isinstancer
�parse)�selfrr�name�styles     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/theme.py�__init__zTheme.__init__sz��07�n�)�)�+�B������K�K���(.�|�|�~��'5���e��:�e�U�#;�%����U�AS�S�'5��
���s�2B
�returnc�~�ddjd�t|jj��D��z}|S)z-Get contents of a config file for this theme.z	[styles]
�
c3�0K�|]\}}|�d|�����y�w)z = N�)�.0rrs   r�	<genexpr>zTheme.config.<locals>.<genexpr>!s$����*
�3N�K�D�%�t�f�C��w��3N�s�)�join�sortedrr)r�configs  rr$zTheme.configs?����	�	�*
�39�$�+�+�:K�:K�:M�3N�*
�!
�
���
��config_file�sourcec���tj�}|j||��|jd�D��cic]\}}|t	j
|���}}}t
||��}|Scc}}w)aQLoad a theme from a text mode file.

        Args:
            config_file (IO[str]): An open conf file.
            source (str, optional): The filename of the open file. Defaults to None.
            inherit (bool, optional): Inherit default styles. Defaults to True.

        Returns:
            Theme: A New theme instance.
        )r'r)r)�configparser�ConfigParser�	read_filerr
rr
)	�clsr&r'rr$r�valuer�themes	         r�	from_filezTheme.from_file&sm���*�*�,������V��4�>D�l�l�8�>T�U�>T�{�t�U�$����E�*�*�>T��U��f�g�.�����Vs� A.�path�encodingc�r�t|d|��5}|j|||��cddd�S#1swYyxYw)agRead a theme from a path.

        Args:
            path (str): Path to a config file readable by Python configparser module.
            inherit (bool, optional): Inherit default styles. Defaults to True.
            encoding (str, optional): Encoding of the config file. Defaults to None.

        Returns:
            Theme: A new theme instance.
        �rt)r1)r'rN)�openr/)r,r0rr1r&s     r�readz
Theme.read:s0���$��x�
0�K��=�=��T�7�=�K�1�
0�
0�s�-�6)NT)TN)�__name__�
__module__�__qualname__�__doc__r�strr
�__annotations__rrr�boolr�propertyr$�classmethodrr/r5rr%rr
r
s����
��e����QU�
��w�s�I�~�6�7�
�IM�
��������QU���S�'��+3�C�=��JN��	����&�HL�L��L�!%�L�8@��
�L�	�L��Lr%r
c��eZdZdZy)�ThemeStackErrorz5Base exception for errors related to the theme stack.N)r6r7r8r9rr%rr@r@Ls��?r%r@c�>�eZdZdZdeddfd�Zd	dededdfd�Zd
d�Zy)�
ThemeStackzJA stack of themes.

    Args:
        theme (Theme): A theme instance
    r.rNc�d�|jg|_|jdj|_y)N���)r�_entries�get)rr.s  rrzThemeStack.__init__Ws%��16�����
��=�=��$�(�(��r%rc���|ri|jd�|j�n|jj�}|jj|�|jdj|_y)z�Push a theme on the top of the stack.

        Args:
            theme (Theme): A Theme instance.
            inherit (boolean, optional): Inherit styles from current top of stack.
        rDN)rErr�appendrF)rr.rrs    r�
push_themezThemeStack.push_theme[s_��6=�1�t�}�}�R� �1�E�L�L�1�%�,�,�BS�BS�BU�	�	
�
�
���V�$��=�=��$�(�(��r%c��t|j�dk(rtd��|jj�|jdj|_y)z%Pop (and discard) the top-most theme.rzUnable to pop base themerDN)�lenrEr@�poprF)rs r�	pop_themezThemeStack.pop_themeisE���t�}�}���"�!�"<�=�=��
�
�����=�=��$�(�(��r%)T)rN)	r6r7r8r9r
rr<rIrMrr%rrBrBPs9���)�e�)��)�)��)��)��)�)r%rB�__main__)r)�typingrrrrr�default_stylesr	rr
rr
�	Exceptionr@rBr6r.�printr$rr%r�<module>rSs^���4�4�*�#�AL�AL�H@�i�@�)�)�B�z���G�E�	�%�,�,��r%python3.12/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-312.pyc000064400000000553151732702050022467 0ustar00�

R`if��,�ddlmZddlmZee�Zy)�)�DEFAULT_STYLES)�ThemeN)�default_stylesr�themer�DEFAULT����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/themes.py�<module>rs��*����
�r	python3.12/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-312.pyc000064400000622311151732702050023623 0ustar00�

R`i�#��J��idd�dd�dd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�id"d#�d$d%�d&d'�d(d)�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC��idDdE�dFdG�dHdI�dJdK�dLdM�dNdO�dPdQ�dRdS�dTdU�dVdW�dXdY�dZd[�d\d]�d^d_�d`da�dbdc�ddde��idfdg�dhdi�djdk�dldm�dndo�dpdq�drds�dtdu�dvdw�dxdy�dzd{�d|d}�d~d�d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dÓd�dœd�dǓd�dɓd�d˓�id�d͓d�dϓd�dѓd�dӓd�dՓd�dדd�dٓd�dۓd�dݓd�dߓd�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d��d�d��d�d��d�d��d�d��d�d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��i�d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��i�dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��i�dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�i�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���i�d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��i�dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��i�dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�i�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��i�d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��i�dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��i�dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�i�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���i�d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��i�d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��i�db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�dy��d{�d|��d}�d~��d�d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�dŐdƓ�i�dǐdȓ�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�dѐdғ�dӐdԓ�dՐd֓�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d��d���d��d���d��d���d��d���d��d���d��d��d�d��d�d��d�d��d�d��d	�d
��i�d�d��d
�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��i�d-�d,��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��i�dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��i�dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�dŐdƓ�dǐdȓ�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�dѐdғ�dӐdԓ�i�dՐd֓�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d��d��i�d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��i�d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��i�d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��i�d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��i�d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��i�d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��i�dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��i�dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�i�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d��d���d��d���d��d���d��d���d��d���d��d��d�d��d�d��d�d��d�d��d	�d
��d�d��d
�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��d-�d.��d/�d0��d1�d2��d3�d4��d5�d6��i�d7�d8��d9�d:��d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��dO�dP��dQ�dR��dS�dT��dU�dV��dW�dX��i�dY�dZ��d[�d\��d]�d^��d_�d`��da�db��dc�dd��de�df��dg�dd��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��i�dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���	d�	d��i�	d�	d��	d�	d��	d�	d��	d�	d	��	d
�	d��	d�	d
��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d �	d!��	d"�	d#��i�	d$�	d%��	d&�	d'��	d(�	d)��	d*�	d+��	d,�	d-��	d.�	d/��	d0�	d1��	d2�	d3��	d4�	d5��	d6�	d7��	d8�	d9��	d:�	d;��	d<�	d=��	d>�	d?��	d@�	dA��	dB�	dC��	dD�	dE��i�	dF�	dG��	dH�	dI��	dJ�	dK��	dL�	dM��	dN�	dO��	dP�	dQ��	dR�	dS��	dT�	dU��	dV�	dW��	dX�	dY��	dZ�	d[��	d\�	d]��	d^�	d_��	d`�	da��	db�	dc��	dd�	de��	df�	dg��i�	dh�	di��	dj�	dk��	dl�	dm��	dn�	do��	dp�	dq��	dr�	ds��	dt�	du��	dv�	dw��	dx�	dy��	dz�	d{��	d|�	d}��	d~�	d��	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���i�	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���i�	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d	dÓ�	dĐ	dœ�	dƐ	dǓ�	dȐ	dɓ�	dʐ	d˓�	d̐	d͓�i�	dΐ	dϓ�	dА	dѓ�	dҐ	dӓ�	dԐ	dՓ�	d֐	dד�	dؐ	dٓ�	dڐ	dۓ�	dܐ	dݓ�	dސ	dߓ�	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��i�	d�	d��	d�	d��	d�	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���
d�
d��
d�
d��
d�
d��
d�
d��
d�
d	��
d
�
d��
d�
d
��
d�
d��
d�
d��i�
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d �
d!��
d"�
d#��
d$�
d%��
d&�
d'��
d(�
d)��
d*�
d+��
d,�
d-��
d.�
d/��
d0�
d1��
d2�
d3��i�
d4�
d5��
d6�
d7��
d8�
d9��
d:�
d;��
d<�
d=��
d>�
d?��
d@�
dA��
dB�
dC��
dD�
dE��
dF�
dG��
dH�
dI��
dJ�
dK��
dL�
dM��
dN�
dO��
dP�
dQ��
dR�
dS��
dT�
dU��i�
dV�
dW��
dX�
dY��
dZ�
d[��
d\�
d]��
d^�
d_��
d`�
da��
db�
dc��
dd�
de��
df�
dg��
dh�
di��
dj�
dk��
dl�
dm��
dn�
do��
dp�
dq��
dr�
ds��
dt�
du��
dv�
dw��i�
dx�
dy��
dz�
d{��
d|�
d}��
d~�
d��
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���i�
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���i�
d��
d���
d��
d���
d��
d���
d
dÓ�
dĐ
dœ�
dƐ
dǓ�
dȐ
dɓ�
dʐ
d˓�
d̐
d͓�
dΐ
dϓ�
dА
dѓ�
dҐ
dӓ�
dԐ
dՓ�
d֐
dד�
dؐ
dٓ�
dڐ
dۓ�
dܐ
dݓ�i�
dސ
dߓ�
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���i�d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��i�d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��i�dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��i�df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�i�d̐d͓�dΐdϓ�dАd��dѐdғ�dӐdԓ�dՐd֓�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d��d���d��d���d��d���d��d���d��d���d��d��d�d��d�d��d�d��d�d��d	�d
��d�d��d
�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��d-�d.��d/�d0��i�d1�d2��d3�d4��d5�d6��d7�d8��d9�d:��d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��dO�dP��dQ�dR��i�dS�dT��dU�dV��dW�dX��dY�dZ��d[�dZ��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��i�dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�i�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���i�d��d���d��d���
d�
d��
d�
d��
d�
d��
d�
d��
d�
d	��
d
�
d��
d�
d
��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��i�
d�
d��
d �
d!��
d"�
d#��
d$�
d%��
d&�
d'��
d(�
d)��
d*�
d+��
d,�
d-��
d.�
d/��
d0�
d1��
d2�
d3��
d4�
d5��
d6�
d7��
d8�
d9��
d:�
d;��
d<�
d=��
d>�
d?��i�
d@�
dA��
dB�
dC��
dD�
dE��
dF�
dG��
dH�
dI��
dJ�
dK��
dL�
dM��
dN�
dO��
dP�
dQ��
dR�
dS��
dT�
dU��
dV�
dW��
dX�
dY��
dZ�
d[��
d\�
d]��
d^�
d_��
d`�
da��i�
db�
dc��
dd�
de��
df�
dg��
dh�
di��
dj�d��
dk�
dl��
dm�
dn��
do�
dp��
dq�
dr��
ds�
dt��
du�
dv��
dw�
dx��
dy�
dz��
d{�
d|��
d}�
d~��
d�
d���
d��
d���i�
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���i�
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d“�
dÐ
dē�
dŐ
dƓ�i�
dǐ
dȓ�
dɐ
dʓ�
dː
d̓�
d͐
d�
dϐ
d�
dѐ
dғ�
dӐ
dԓ�
dՐ
d֓�
dא
dؓ�
dِ
dړ�
dې
dܓ�
dݐ
dޓ�
dߐ
d��
d�
d��
d�
d��
d�
d��
d�
d��i�
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��d��d�d��d�d��d�d��d�d��d	�d
��i�d�d��d
�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��i�d-�d.��d/�d0��d1�d2��d3�d4��d5�d6��d7�d8��d9�d:��d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��i�dO�dP��dQ�dR��dS�dT��dU�dV��dW�dX��dY�dZ��d[�d\��d]�d^��d_�d`��da�db��dc�dd��de�df��dg�dh��di�dj��dk�dl��dm�dn��do�dp��i�dq�dr��ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d~��d�d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�dŐdƓ�dǐdȓ�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�dѐdғ�dӐdԓ�dՐd֓�i�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d��d���d��d���i�d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d/�d0��d1�d2��d3�d4��d5�d6��d7�d8��d9�d:��i�d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��dO�dP��dQ�dR��dS�dT��dU�dV��dW�dX��dY�dZ��d[�d\��i�d]�d^��d_�d`��da�db��dc�dd��de�df��dg�dh��di�dj��dk�dl��dm�dn��do�dp��dq�dr��ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d|��i�d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��i�d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��i�d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dC��dE�dF��dG�dH��i�dI�dJ��dK�dL��dM�dN��dO�dP��dQ�dR��dS�dT��dU�dV��dW�dX��dY�dZ��d[�d\��d]�d^��d_�d`��da�db��dc�dd��de�df��dg�dh��di�dj��i�dk�dl��dm�dn��do�dp��dq�dr��ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d~��d�d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�dŐdƓ�dǐdȓ�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�i�dѐdғ�dӐdԓ�dՐd֓�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d��d���d��d���d��d���d��d���d��d���d��d��d�d��d�d��d�d��d�d��d	�d
��d�d��d
�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��d-�d.��d/�d0��d1�d2��d3�d4��d5�d6��i�d7�d8��d9�d:��d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��dO�dP��dQ�dΓ�dR�dS��dT�dU��dV�dW��i�dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dM��dw�dx��i�dy�dz��d{�d|��d}�d~��d�d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАd͓�dѐdғ�dӐdԓ�dՐd֓�dאdؓ�dِdړ�dېdܓ�i�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��d�d��d�d[��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���i�d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��i�dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��i�dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�d"��do�dp��dq�dr��ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d~��d�d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�dŐdƓ�dǐdȓ�i�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�dѐdғ�dӐdԓ�dՐd֓�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d��d���d��d���d��d���d��d���d��d���d��d��d�d��d�d��d�d��d�d��d	�d
��d�d��i�d
�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��d-�d.��i�d/�d0��d1�d2��d3�d4��d5�d6��d7�d8��d9�d:��d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��dO�dP��i�dQ�dR��dS�dT��dU�dV��dW�dX��dY�dZ��d[�d\��d]�d^��d_�d`��da�db��dc�dd��de�df��dg�dh��di�dj��dk�dl��dm�dn��do�dp��dq�dr��i�ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d~��d�d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�dŐdƓ�dǐdȓ�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�dѐdғ�dӐdԓ�dՐd֓�dאdؓ�i�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d��d���d��d���d��d���i�d��d���d��d���d��d��d�d��d�d��d�d��d�d��d	�d
��d�d��d
�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��d-�d.��d/�d0��d1�d2��d3�d4��d5�d6��d7�d8��d9�d:��d;�d<��d=�d>��i�d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��dO�dP��dQ�dR��dS�dT��dU�dV��dW�dX��dY�dZ��d[�d\��d]�d^��d_�d`��i�da�db��dc�dd��de�df��dg�dh��di�dj��dk�dl��dm�dn��do�dp��dq�dr��ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d~��d�d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�dŐdƓ�i�dǐdȓ�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�dѐdғ�dӐdԓ�dՐd֓�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d��d���d��d���d��d���d��d���d��d���d��d��d�d��d�d��d�d��d�d��d	�d
��i�d�d��d
�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��i�d-�d.��d/�d0��d1�d2��d3�d4��d5�d6��d7�d8��d9�d:��d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��i�dO�dP��dQ�dR��dS�dT��dU�dV��dW�dX��dY�dZ��d[�d\��d]�d^��d_�d`��da�db��dc�dd��de�df��dg�dh��di�dj��dk�dl��dm�dn��do�dp��i�dq�dr��ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d~��d�d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�dŐdƓ�dǐdȓ�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�dѐdғ�dӐdԓ�dՐd֓�i�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d���d�dɓ�d�d͓�d�dӓ�d�dՓ�d�dٓ�d�dݓ�d�d"��d�d��d�d��d�d��d�d��i�d�d1��d�d	��d�d��d�d��d�d��d�d1��d�dC��d�d���d��d��d��d<��d��dz��d��dc��d��dē�d��du��d��d���d��d���d��d���i�d��d���d��d���d�
dz��d�d+��d�d���d�d���d�d˓�d�d��d�d���d�d���d�d���d	�d���d
�d���d�d��d�d���d
�dz��d�d���i�d�d���d�d��d�d��d�d
��d�d���d�d6��d�dD��d�dz��d�d͓�d�d���d�dA��d�d��d�ds��d�d��d�d|��d �d~��d!�d���i�d"�d���d#�d���d$�d��d%�d���d&�d��d'�d��d(�d��d)�d5��d*�d���d+�d���d,�d���d-�d���d.�d̓�d/�d���d0�d���d1�d��d2�d	��i�d3�dǓ�d4�dɓ�d5�d	��d6�d
��d7�d���d8�d���d9�d���d:�
d��d;�dj��d<�dl��d=�d���d>�d���d?�d���d@�d���dA�d���dB�d���dC�d��i�dD�d��dE�d��dF�d��dG�dғ�dH�d��dI�d��dJ�d͓�dK�d֓�dL�dؓ�dM�dœ�dN�d��dO�d���dP�d���dQ�d��dR�d��dS�d��dT�dU��i�dV�d;��dW�dA��dX�dY��dY�do��dZ�dy��d[�d��d\�d]��d^�d}��d_�d���d`�d���da�d���db�d���dc�d3��dd�d���de�d���df�dg��dh�d���i�di�d���dj�d���dk�
d[��dl�d“�dm�d��dn�d̓�do�dȓ�dp�dq��dr�d��ds�d��dt�dv��du�dE��dv�dG��dw�dI��dx�d���dy�d���dz�d��i�d{�d���d|�d���d}�d���d~�d���d�d���d��d���d�d���d��d��d��dw��d��d���d��d#��d��d'��d��dC��d��
d��d��d1��d��d3��d��d/��i�d��dʓ�d��d9��d��dE��d��d;��d��
d�d��
dܓ�d��d?��d��dߓ�d��dM��d��d&��d��d���d��dI��d��dO��d��d��d��d���d��d���d��d���i�d��d���d��dÓ�d��dœ�d��d��d��d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d!��d�d%��d�d'��i�d�d)��d�d+��d�d-��d�d/��d�d5��d�d7��d�d9��d�d;��d�d=��d�d?��d�dA��d�dC��d�dE��d�dG��d�dI��d�dK��d�dM��i�d�dO��d�dQ��d�dS��d�dU��d�dW��d�dY��d�d[��d�d]��d�dc��d�de��d�dg��d�di��d�dm��d�dq��d�ds��d�du��d�dw��i�d�dy��d�d{��d�d}��d�d��d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���i�d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�dÓ�i�d�dœ�d�dǓ�d�dɓ�d�d˓�d�d͓�d�dϓ�d�dѓ�d�dՓ�d�dד�d�dٓ�d�dۓ�d�dݓ�d�dߓ�dd��dd��dd��dd��i�dd��dd��dd��dd��dd��d	d��d
d���dd���dd���d
d���dd���d�d��d�d��d�d��d�d��d�d	��d�d��i�d�d
��d�d��d�d��d�d=��d�d?��d�dA��d�dC��d�dE��d�dG��d�dI��d �dK��d!�dM��d"�dO��d#�dQ��d$�dU��d%�dW��d&�d[��i�d'�d]��d(�d_��d)�da��d*�dc��d+�de��d,�dg��d-�di��d.�dk��d/�dm��d0�do��d1�dq��d2�ds��d3�du��d4�dw��d5�dy��d6�d{��d7�d}��i�d8�d��d9�d���d:�d���d;�d���d<�d���d=�d���d>�d���d?�d���d@�d���dA�d���dB�d���dC�d���dD�d���dE�d���dF�d���dG�d���dH�d���i�dI�d���dJ�d���dK�d���dL�d���dM�d���dN�d���dO�dϓ�dP�dՓ�dQ�dד�dR�dٓ�dS�dۓ�dT�dݓ�dU�dߓ�dV�d��dW�d��dX�d��dY�d��i�dZ�d��d[�d��d\�d��d]�d��d^�d��d_�d���d`�d���da�d���db�d��dc�d��dd�d��de�d��df�d��dg�d��dh�d��di�d��dj�d!��i�dk�d#��dl�d%��dm�d'��dn�d)��do�d+��dp�d-��dq�d/��dr�d1��ds�d3��dt�d5��du�d7��dv�d9��dw�d;��dx�d=��dy�d?��dz�dA��d{�dE��i�d|�dG��d}�dI��d~�dK��d�dM��d��dO��d��dQ��d��dS��d��dY��d��d[��d��d]��d��da��d��dc��d��de��d��dg��d��dk��d��dm��d��do��i�d��dq��d��d���d��du��d��dw��d��dy��d��d{��d��d}��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d˓�d��dӓ�d��dՓ�d��d��d��d��d��d��d��d��d��d��d��d��d��d��i�d��d#��d��d-��d��dO��d��d��d��d[��d��dk��d��do��d��dq��d��ds��d��d{��d��d}��d��
d��d��d���d��dz��d��d���d��d���d��d���i�d��d���ddۓ�dÐd!��dĐd!��dŐd���dƐd���dǐdȓ�dɐd��dʐd͓�dːdϓ�d̐d;��d͐d)��dΐdѓ�dϐdu��dАdu��dѐdݓ�dҐdߓ�i�dӐdԓ�dՐd��d֐d���dאd���dؐd��dِd��dڐd
��dېd��dܐd��dݐdד�dސdГ�dߐd(��d�d.��d�d*��d�d,��d�d0��d�d2��i�d�dݓ�d�dݓ�d�d4��d�d��d�dU��d�d���d�d9��d�dJ��d�dL��d�dN��d�dP��d�dR��d�dT��d�dV��d�dX��d�dZ��d��d\��i�d��d^��d��d���d��dm��d��do��d��dq��d��ds��d��d���d��dۓ�d��d���d�d���d�d���d�d���d�d��d�d���d�d˓�d�dϓ�d�dד�i�d�d���d	�
di��d
�d3��d�d��d�
d9��d
�	d��d�	d��d�
dU��d�d���d�d��d�dϓ�d�dϓ�d�d��d�d��d�d���d�d.��d�d2��i�d�d4��d�d6��d�dB��d�dJ��d�d��d�d]��d �d,��d!�dg��d"�dm��d#d��d$�dC��d%d��d&d3��d'�d͓�d(�dӓ�d)�d���d*�dn��i�d+�d���d,�d���d-�d��d.�d��d/�d���d0�dÓ�d1�dϓ�d2�d��d3�d˓�d4�
d��d5�d��d6�
d��d7�
d��d8�
d��d9�
dS��d:�
d]��d;�dܓ�i�d<�d=��d>�
dn��d?�
dx��d@�
d���dA�d���dB�
d���dC�d���dD�d��dE�dn��dF�d���dG�dH��dI�d���dJ�d���dK�d���dL�d��dM�d
��dN�d:��i�dO�d��dP�d��dQ�d4��dR�d��dS�d>��dT�d@��dU�dÓ�dV�dW��dX�dL��dY�d���dZ�d���d[�d���d\�d���d]�d7��d^�d��d_�dϓ�d`�d��i�da�d��db�d���dc�d���dd�d��de�d��df�d��dg�d���dh�d���di�d���dj�d/��dk�d;��dl�dK��dm�dN��dn�d��do�dX��dp�d��dq�d~��i�dr�d���ds�d���dt�d���du�d��dv�d���dw�d���dx�d���dy�d���dz�dm��d{�dē�d|�dȓ�d}�dʓ�d~�ds��d�dw��d��du��d��dy��d��dy��i�d��d̓�d��dГ�d��d���d��dؓ�d��d��d��d��d��d���d��dƓ�d��dē�d��d��d��d��d��dk��d��d��d��d��d��d
��d��d��d��d��i�d��d��d��dc��d��d��d��d-��d��d+��d��d3��d��d%��d��d)��d��d'��d��d!��d��d��d��d1��d��d;��d�d_��d�da��d�d���d�d���i�d��d#��d��d7��d��d���d��d���d��d���d��d���d��d��d��d���d��dѓ�d��d2��d��dF��d��dW��d��d���d��d���d��di��d��di��d��d	��i�d��du��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d��d��d���d��dÓ�ddW��dÐd˓�dĐdœ�dƐdғ�dǐd֓�dȐd���i�dɐd���dʐd��dːd
��d̐d��d͐d��dΐd	��dϐd��dАd/��dѐdQ��dҐdS��dӐd���dԐdW��dՐdx��d֐dg��dאdi��dؐdk��dِd>��i�dڐdۓ�dܐdr��dݐd��dސdv��dߐd��d�d���d�d��d�d���d�d���d�d���d�d'��d�d“�d�dH��d�dJ��d�dL��d�d3��d�d��i�d�d���d�d���d�d���d�
dr��d�dL��d�dN��d�dP��d�dR��d�dX��d��d^��d��d`��d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d�d���d�d���d�d“�d�dē�d�dƓ�d�dȓ�d�dʓ�d�d̓�d�dΓ�d	�dГ�d
�dғ�d�dԓ�d�d֓�d
�dؓ��dڐdܐdސd�d��Z�y(�1st_place_medalu🥇�2nd_place_medalu🥈�3rd_place_medalu🥉zab_button_(blood_type)u🆎�atm_signu🏧za_button_(blood_type)u🅰�afghanistanu🇦🇫�albaniau🇦🇱�algeriau🇩🇿�american_samoau🇦🇸�andorrau🇦🇩�angolau🇦🇴�anguillau🇦🇮�
antarcticau🇦🇶zantigua_&_barbudau🇦🇬�aquariusu♒�	argentinau🇦🇷�ariesu♈�armeniau🇦🇲�arubau🇦🇼�ascension_islandu🇦🇨�	australiau🇦🇺�austriau🇦🇹�
azerbaijanu🇦🇿�
back_arrowu🔙zb_button_(blood_type)u🅱�bahamasu🇧🇸�bahrainu🇧🇭�
bangladeshu🇧🇩�barbadosu🇧🇧�belarusu🇧🇾�belgiumu🇧🇪�belizeu🇧🇿�beninu🇧🇯�bermudau🇧🇲�bhutanu🇧🇹�boliviau🇧🇴zbosnia_&_herzegovinau🇧🇦�botswanau🇧🇼�
bouvet_islandu🇧🇻�brazilu🇧🇷�british_indian_ocean_territoryu🇮🇴�british_virgin_islandsu🇻🇬�bruneiu🇧🇳�bulgariau🇧🇬�burkina_fasou🇧🇫�burundiu🇧🇮�	cl_buttonu🆑�cool_buttonu🆒�cambodiau🇰🇭�cameroonu🇨🇲�canadau🇨🇦�canary_islandsu🇮🇨�canceru♋�
cape_verdeu🇨🇻�	capricornu♑�caribbean_netherlandsu🇧🇶�cayman_islandsu🇰🇾�central_african_republicu🇨🇫zceuta_&_melillau🇪🇦�chadu🇹🇩�chileu🇨🇱�chinau🇨🇳�christmas_islandu🇨🇽�christmas_treeu🎄�clipperton_islandu🇨🇵zcocos_(keeling)_islandsu🇨🇨�colombiau🇨🇴�comorosu🇰🇲zcongo_-_brazzavilleu🇨🇬zcongo_-_kinshasau🇨🇩�cook_islandsu🇨🇰�
costa_ricau🇨🇷�croatiau🇭🇷�cubau🇨🇺ucuraçaou🇨🇼�cyprusu🇨🇾�czechiau🇨🇿ucôte_d’ivoireu🇨🇮�denmarku🇩🇰�diego_garciau🇩🇬�djiboutiu🇩🇯�dominicau🇩🇲�dominican_republicu🇩🇴�	end_arrowu🔚�ecuadoru🇪🇨�egyptu🇪🇬�el_salvadoru🇸🇻�englandu🏴󠁧󠁢󠁥󠁮󠁧󠁿�equatorial_guineau🇬🇶�eritreau🇪🇷�estoniau🇪🇪�ethiopiau🇪🇹�european_unionu🇪🇺�free_buttonu🆓�falkland_islandsu🇫🇰�
faroe_islandsu🇫🇴�fijiu🇫🇯�finlandu🇫🇮�franceu🇫🇷�
french_guianau🇬🇫�french_polynesiau🇵🇫�french_southern_territoriesu🇹🇫�gabonu🇬🇦�gambiau🇬🇲�geminiu♊�georgiau🇬🇪�germanyu🇩🇪�ghanau🇬🇭�	gibraltaru🇬🇮�greeceu🇬🇷�	greenlandu🇬🇱�grenadau🇬🇩�
guadeloupeu🇬🇵�guamu🇬🇺�	guatemalau🇬🇹�guernseyu🇬🇬�guineau🇬🇳z
guinea-bissauu🇬🇼�guyanau🇬🇾�haitiu🇭🇹zheard_&_mcdonald_islandsu🇭🇲�hondurasu🇭🇳�hong_kong_sar_chinau🇭🇰�hungaryu🇭🇺�	id_buttonu🆔�icelandu🇮🇸�indiau🇮🇳�	indonesiau🇮🇩�iranu🇮🇷�iraqu🇮🇶�irelandu🇮🇪�isle_of_manu🇮🇲�israelu🇮🇱�italyu🇮🇹�jamaicau🇯🇲�japanu🗾�japanese_acceptable_buttonu🉑�japanese_application_buttonu🈸�japanese_bargain_buttonu🉐�japanese_castleu🏯�japanese_congratulations_buttonu㊗�japanese_discount_buttonu🈹�japanese_dollsu🎎�japanese_free_of_charge_buttonu🈚�japanese_here_buttonu🈁�japanese_monthly_amount_buttonu🈷�japanese_no_vacancy_buttonu🈵�"japanese_not_free_of_charge_buttonu🈶�!japanese_open_for_business_buttonu🈺�japanese_passing_grade_buttonu🈴�japanese_post_officeu🏣�japanese_prohibited_buttonu🈲�japanese_reserved_buttonu🈯�japanese_secret_buttonu㊙�japanese_service_charge_buttonu🈂�japanese_symbol_for_beginneru🔰�japanese_vacancy_buttonu🈳�jerseyu🇯🇪�jordanu🇯🇴�
kazakhstanu🇰🇿�kenyau🇰🇪�kiribatiu🇰🇮�kosovou🇽🇰�kuwaitu🇰🇼�
kyrgyzstanu🇰🇬�laosu🇱🇦�latviau🇱🇻�lebanonu🇱🇧�leou♌�lesothou🇱🇸�liberiau🇱🇷�librau♎�libyau🇱🇾�
liechtensteinu🇱🇮�	lithuaniau🇱🇹�
luxembourgu🇱🇺�macau_sar_chinau🇲🇴�	macedoniau🇲🇰�
madagascaru🇲🇬�malawiu🇲🇼�malaysiau🇲🇾�maldivesu🇲🇻�maliu🇲🇱�maltau🇲🇹�marshall_islandsu🇲🇭�
martiniqueu🇲🇶�
mauritaniau🇲🇷�	mauritiusu🇲🇺�mayotteu🇾🇹�mexicou🇲🇽�
micronesiau🇫🇲�moldovau🇲🇩�monacou🇲🇨�mongoliau🇲🇳�
montenegrou🇲🇪�
montserratu🇲🇸�moroccou🇲🇦�
mozambiqueu🇲🇿z
mrs._clausu🤶zmrs._claus_dark_skin_toneu🤶🏿zmrs._claus_light_skin_toneu🤶🏻z mrs._claus_medium-dark_skin_toneu🤶🏾z!mrs._claus_medium-light_skin_toneu🤶🏼zmrs._claus_medium_skin_toneu🤶🏽zmyanmar_(burma)u🇲🇲�
new_buttonu🆕�	ng_buttonu🆖�namibiau🇳🇦�nauruu🇳🇷�nepalu🇳🇵�netherlandsu🇳🇱�
new_caledoniau🇳🇨�new_zealandu🇳🇿�	nicaraguau🇳🇮�nigeru🇳🇪�nigeriau🇳🇬�niueu🇳🇺�norfolk_islandu🇳🇫�north_koreau🇰🇵�northern_mariana_islandsu🇲🇵�norwayu🇳🇴�	ok_buttonu🆗�ok_handu👌�ok_hand_dark_skin_toneu👌🏿�ok_hand_light_skin_toneu👌🏻zok_hand_medium-dark_skin_toneu👌🏾zok_hand_medium-light_skin_toneu👌🏼�ok_hand_medium_skin_toneu👌🏽z	on!_arrowu🔛zo_button_(blood_type)u🅾�omanu🇴🇲�	ophiuchusu⛎�p_buttonu🅿�pakistanu🇵🇰�palauu🇵🇼�palestinian_territoriesu🇵🇸�panamau🇵🇦�papua_new_guineau🇵🇬�paraguayu🇵🇾�peruu🇵🇪�philippinesu🇵🇭�piscesu♓�pitcairn_islandsu🇵🇳�polandu🇵🇱�portugalu🇵🇹�puerto_ricou🇵🇷�qataru🇶🇦�romaniau🇷🇴�russiau🇷🇺�rwandau🇷🇼uréunionu🇷🇪�
soon_arrowu🔜�
sos_buttonu🆘�sagittariusu♐�samoau🇼🇸�
san_marinou🇸🇲�santa_clausu🎅�santa_claus_dark_skin_toneu🎅🏿�santa_claus_light_skin_toneu🎅🏻z!santa_claus_medium-dark_skin_toneu🎅🏾z"santa_claus_medium-light_skin_toneu🎅🏼�santa_claus_medium_skin_toneu🎅🏽�saudi_arabiau🇸🇦�scorpiou♏�scotlandu🏴󠁧󠁢󠁳󠁣󠁴󠁿�senegalu🇸🇳�serbiau🇷🇸�
seychellesu🇸🇨�sierra_leoneu🇸🇱�	singaporeu🇸🇬�sint_maartenu🇸🇽�slovakiau🇸🇰�sloveniau🇸🇮�solomon_islandsu🇸🇧�somaliau🇸🇴�south_africau🇿🇦z&south_georgia_&_south_sandwich_islandsu🇬🇸�south_koreau🇰🇷�south_sudanu🇸🇸�spainu🇪🇸�	sri_lankau🇱🇰ust._barthélemyu🇧🇱z
st._helenau🇸🇭zst._kitts_&_nevisu🇰🇳z	st._luciau🇱🇨z
st._martinu🇲🇫zst._pierre_&_miquelonu🇵🇲zst._vincent_&_grenadinesu🇻🇨�statue_of_libertyu🗽�sudanu🇸🇩�surinameu🇸🇷zsvalbard_&_jan_mayenu🇸🇯�	swazilandu🇸🇿�swedenu🇸🇪�switzerlandu🇨🇭�syriau🇸🇾usão_tomé_&_príncipeu🇸🇹zt-rexu🦖�	top_arrowu🔝�taiwanu🇹🇼�
tajikistanu🇹🇯�tanzaniau🇹🇿�taurusu♉�thailandu🇹🇭ztimor-lesteu🇹🇱�togou🇹🇬�tokelauu🇹🇰�tokyo_toweru🗼�tongau🇹🇴ztrinidad_&_tobagou🇹🇹�tristan_da_cunhau🇹🇦�tunisiau🇹🇳�turkeyu🦃�turkmenistanu🇹🇲zturks_&_caicos_islandsu🇹🇨�tuvaluu🇹🇻zu.s._outlying_islandsu🇺🇲zu.s._virgin_islandsu🇻🇮z
up!_buttonu🆙�ugandau🇺🇬�ukraineu🇺🇦�united_arab_emiratesu🇦🇪�united_kingdomu🇬🇧�united_nationsu🇺🇳�
united_statesu🇺🇸�uruguayu🇺🇾�
uzbekistanu🇺🇿�	vs_buttonu🆚�vanuatuu🇻🇺�vatican_cityu🇻🇦�	venezuelau🇻🇪�vietnamu🇻🇳�virgou♍�walesu🏴󠁧󠁢󠁷󠁬󠁳󠁿zwallis_&_futunau🇼🇫�western_saharau🇪🇭�yemenu🇾🇪�zambiau🇿🇲�zimbabweu🇿🇼�abacusu🧮�adhesive_bandageu🩹�admission_ticketsu🎟�adultu🧑�adult_dark_skin_toneu🧑🏿�adult_light_skin_toneu🧑🏻zadult_medium-dark_skin_toneu🧑🏾zadult_medium-light_skin_toneu🧑🏼�adult_medium_skin_toneu🧑🏽�aerial_tramwayu🚡�airplaneu✈�airplane_arrivalu🛬�airplane_departureu🛫�alarm_clocku⏰�alembicu⚗�alienu👽�
alien_monsteru👾�	ambulanceu🚑�american_footballu🏈�amphorau🏺�anchoru⚓�anger_symbolu💢�
angry_faceu😠�angry_face_with_hornsu👿�anguished_faceu😧�antu🐜�antenna_barsu📶�anxious_face_with_sweatu😰�articulated_lorryu🚛�artist_paletteu🎨�astonished_faceu😲�atom_symbolu⚛�
auto_rickshawu🛺�
automobileu🚗�avocadou🥑�axeu🪓�babyu👶�
baby_angelu👼�baby_angel_dark_skin_toneu👼🏿�baby_angel_light_skin_toneu👼🏻z baby_angel_medium-dark_skin_toneu👼🏾z!baby_angel_medium-light_skin_toneu👼🏼�baby_angel_medium_skin_toneu👼🏽�baby_bottleu🍼�
baby_chicku🐤�baby_dark_skin_toneu👶🏿�baby_light_skin_toneu👶🏻zbaby_medium-dark_skin_toneu👶🏾zbaby_medium-light_skin_toneu👶🏼�baby_medium_skin_toneu👶🏽�baby_symbolu🚼�backhand_index_pointing_downu👇�+backhand_index_pointing_down_dark_skin_toneu👇🏿�,backhand_index_pointing_down_light_skin_toneu👇🏻z2backhand_index_pointing_down_medium-dark_skin_toneu👇🏾z3backhand_index_pointing_down_medium-light_skin_toneu👇🏼�-backhand_index_pointing_down_medium_skin_toneu👇🏽�backhand_index_pointing_leftu👈�+backhand_index_pointing_left_dark_skin_toneu👈🏿�,backhand_index_pointing_left_light_skin_toneu👈🏻z2backhand_index_pointing_left_medium-dark_skin_toneu👈🏾z3backhand_index_pointing_left_medium-light_skin_toneu👈🏼�-backhand_index_pointing_left_medium_skin_toneu👈🏽�backhand_index_pointing_rightu👉�,backhand_index_pointing_right_dark_skin_toneu👉🏿�-backhand_index_pointing_right_light_skin_toneu👉🏻z3backhand_index_pointing_right_medium-dark_skin_toneu👉🏾z4backhand_index_pointing_right_medium-light_skin_toneu👉🏼�.backhand_index_pointing_right_medium_skin_toneu👉🏽�backhand_index_pointing_upu👆�)backhand_index_pointing_up_dark_skin_toneu👆🏿�*backhand_index_pointing_up_light_skin_toneu👆🏻z0backhand_index_pointing_up_medium-dark_skin_toneu👆🏾z1backhand_index_pointing_up_medium-light_skin_toneu👆🏼�+backhand_index_pointing_up_medium_skin_toneu👆🏽�baconu🥓�badgeru🦡�	badmintonu🏸�bagelu🥯�
baggage_claimu🛄�baguette_breadu🥖�
balance_scaleu⚖�baldu🦲�bald_manu👨‍🦲�
bald_womanu👩‍🦲�ballet_shoesu🩰�balloonu🎈�ballot_box_with_ballotu🗳�ballot_box_with_checku☑�bananau🍌�banjou🪕�banku🏦�	bar_chartu📊�barber_poleu💈�baseballu⚾�basketu🧺�
basketballu🏀�batu🦇�bathtubu🛁�batteryu🔋�beach_with_umbrellau🏖�beaming_face_with_smiling_eyesu😁�	bear_faceu🐻�bearded_personu🧔�bearded_person_dark_skin_toneu🧔🏿�bearded_person_light_skin_toneu🧔🏻z$bearded_person_medium-dark_skin_toneu🧔🏾z%bearded_person_medium-light_skin_toneu🧔🏼�bearded_person_medium_skin_toneu🧔🏽�
beating_heartu💓�bedu🛏�beer_mugu🍺�bellu🔔�bell_with_slashu🔕�bellhop_bellu🛎�	bento_boxu🍱�beverage_boxu🧃�bicycleu🚲�bikiniu👙�
billed_capu🧢�	biohazardu☣�birdu🐦�
birthday_cakeu🎂�black_circleu⚫�
black_flagu🏴�black_heartu🖤�black_large_squareu⬛zblack_medium-small_squareu◾�black_medium_squareu◼�	black_nibu✒�black_small_squareu▪�black_square_buttonu🔲zblond-haired_manu
👱‍♂️zblond-haired_man_dark_skin_toneu👱🏿‍♂️z blond-haired_man_light_skin_toneu👱🏻‍♂️z&blond-haired_man_medium-dark_skin_toneu👱🏾‍♂️z'blond-haired_man_medium-light_skin_toneu👱🏼‍♂️z!blond-haired_man_medium_skin_toneu👱🏽‍♂️zblond-haired_personu👱z"blond-haired_person_dark_skin_toneu👱🏿z#blond-haired_person_light_skin_toneu👱🏻z)blond-haired_person_medium-dark_skin_toneu👱🏾z*blond-haired_person_medium-light_skin_toneu👱🏼z$blond-haired_person_medium_skin_toneu👱🏽zblond-haired_womanu
👱‍♀️z!blond-haired_woman_dark_skin_toneu👱🏿‍♀️z"blond-haired_woman_light_skin_toneu👱🏻‍♀️z(blond-haired_woman_medium-dark_skin_toneu👱🏾‍♀️z)blond-haired_woman_medium-light_skin_toneu👱🏼‍♀️z#blond-haired_woman_medium_skin_toneu👱🏽‍♀️�blossomu🌼�blowfishu🐡�	blue_booku📘�blue_circleu🔵�
blue_heartu💙�blue_squareu🟦�boaru🐗�bombu💣�boneu🦴�bookmarku🔖�
bookmark_tabsu📑�booksu📚�bottle_with_popping_corku🍾�bouquetu💐�
bow_and_arrowu🏹�bowl_with_spoonu🥣�bowlingu🎳�boxing_gloveu🥊�boyu👦�boy_dark_skin_toneu👦🏿�boy_light_skin_toneu👦🏻zboy_medium-dark_skin_toneu👦🏾zboy_medium-light_skin_toneu👦🏼�boy_medium_skin_toneu👦🏽�brainu🧠�breadu🍞zbreast-feedingu🤱zbreast-feeding_dark_skin_toneu🤱🏿zbreast-feeding_light_skin_toneu🤱🏻z$breast-feeding_medium-dark_skin_toneu🤱🏾z%breast-feeding_medium-light_skin_toneu🤱🏼zbreast-feeding_medium_skin_toneu🤱🏽�bricku🧱�bride_with_veilu👰�bride_with_veil_dark_skin_toneu👰🏿�bride_with_veil_light_skin_toneu👰🏻z%bride_with_veil_medium-dark_skin_toneu👰🏾z&bride_with_veil_medium-light_skin_toneu👰🏼� bride_with_veil_medium_skin_toneu👰🏽�bridge_at_nightu🌉�	briefcaseu💼�briefsu🩲�
bright_buttonu🔆�broccoliu🥦�broken_heartu💔�broomu🧹�brown_circleu🟤�brown_heartu🤎�brown_squareu🟫�bugu🐛�building_constructionu🏗�bullet_trainu🚅�burritou🌯�busu🚌�bus_stopu🚏�bust_in_silhouetteu👤�busts_in_silhouetteu👥�butteru🧈�	butterflyu🦋�cactusu🌵�calendaru📆�call_me_handu🤙�call_me_hand_dark_skin_toneu🤙🏿�call_me_hand_light_skin_toneu🤙🏻z"call_me_hand_medium-dark_skin_toneu🤙🏾z#call_me_hand_medium-light_skin_toneu🤙🏼�call_me_hand_medium_skin_toneu🤙🏽�camelu🐫�camerau📷�camera_with_flashu📸�campingu🏕�candleu🕯�candyu🍬�canned_foodu🥫�canoeu🛶�
card_file_boxu🗃�
card_indexu📇�card_index_dividersu🗂�carousel_horseu🎠�
carp_streameru🎏�carrotu🥕�castleu🏰�catu🐱�cat_face�cat_face_with_tears_of_joyu😹�cat_face_with_wry_smileu😼�chainsu⛓�chairu🪑�chart_decreasingu📉�chart_increasingu📈�chart_increasing_with_yenu💹�cheese_wedgeu🧀�chequered_flagu🏁�cherriesu🍒�cherry_blossomu🌸�
chess_pawnu♟�chestnutu🌰�chickenu🐔�childu🧒�child_dark_skin_toneu🧒🏿�child_light_skin_toneu🧒🏻zchild_medium-dark_skin_toneu🧒🏾zchild_medium-light_skin_toneu🧒🏼�child_medium_skin_toneu🧒🏽�children_crossingu🚸�chipmunku🐿�
chocolate_baru🍫�
chopsticksu🥢�churchu⛪�	cigaretteu🚬�cinemau🎦�	circled_muⓂ�circus_tentu🎪�	cityscapeu🏙�cityscape_at_dusku🌆�clampu🗜�
clapper_boardu🎬�clapping_handsu👏�clapping_hands_dark_skin_toneu👏🏿�clapping_hands_light_skin_toneu👏🏻z$clapping_hands_medium-dark_skin_toneu👏🏾z%clapping_hands_medium-light_skin_toneu👏🏼�clapping_hands_medium_skin_toneu👏🏽�classical_buildingu🏛�clinking_beer_mugsu🍻�clinking_glassesu🥂�	clipboardu📋�clockwise_vertical_arrowsu🔃�closed_booku📕� closed_mailbox_with_lowered_flagu📪�closed_mailbox_with_raised_flagu📫�closed_umbrellau🌂�cloudu☁�cloud_with_lightningu🌩�cloud_with_lightning_and_rainu⛈�cloud_with_rainu🌧�cloud_with_snowu🌨�
clown_faceu🤡�	club_suitu♣�
clutch_bagu👝�coatu🧥�cocktail_glassu🍸�coconutu🥥�coffinu⚰�	cold_faceu🥶�	collisionu💥�cometu☄�compassu🧭�
computer_disku💽�computer_mouseu🖱�
confetti_ballu🎊�confounded_faceu😖�
confused_faceu😕�constructionu🚧�construction_workeru👷�"construction_worker_dark_skin_toneu👷🏿�#construction_worker_light_skin_toneu👷🏻z)construction_worker_medium-dark_skin_toneu👷🏾z*construction_worker_medium-light_skin_toneu👷🏼�$construction_worker_medium_skin_toneu👷🏽�
control_knobsu🎛�convenience_storeu🏪�cooked_riceu🍚�cookieu🍪�cookingu🍳�	copyright�©�couch_and_lampu🛋�counterclockwise_arrows_buttonu🔄�couple_with_heartu💑�couple_with_heart_man_manu👨‍❤️‍👨�couple_with_heart_woman_manu👩‍❤️‍👨�couple_with_heart_woman_womanu👩‍❤️‍👩�cowu🐮�cow_face�cowboy_hat_faceu🤠�crabu🦀�crayonu🖍�credit_cardu💳�
crescent_moonu🌙�cricketu🦗�cricket_gameu🏏�	crocodileu🐊�	croissantu🥐�
cross_marku❌�cross_mark_buttonu❎�crossed_fingersu🤞�crossed_fingers_dark_skin_toneu🤞🏿�crossed_fingers_light_skin_toneu🤞🏻z%crossed_fingers_medium-dark_skin_toneu🤞🏾z&crossed_fingers_medium-light_skin_toneu🤞🏼� crossed_fingers_medium_skin_toneu🤞🏽�
crossed_flagsu🎌�crossed_swordsu⚔�crownu👑�crying_cat_faceu😿�crying_faceu😢�crystal_ballu🔮�cucumberu🥒�cupcakeu🧁�cup_with_strawu🥤�
curling_stoneu🥌�
curly_hairu🦱zcurly-haired_manu👨‍🦱zcurly-haired_womanu👩‍🦱�
curly_loopu➰�currency_exchangeu💱�
curry_riceu🍛�custardu🍮�customsu🛃�cut_of_meatu🥩�cycloneu🌀�daggeru🗡�dangou🍡�dashing_awayu💨�deaf_personu🧏�deciduous_treeu🌳�deeru🦌�delivery_trucku🚚�department_storeu🏬�derelict_houseu🏚�desertu🏜�
desert_islandu🏝�desktop_computeru🖥�	detectiveu🕵�detective_dark_skin_toneu🕵🏿�detective_light_skin_toneu🕵🏻zdetective_medium-dark_skin_toneu🕵🏾z detective_medium-light_skin_toneu🕵🏼�detective_medium_skin_toneu🕵🏽�diamond_suitu♦�diamond_with_a_dotu💠�
dim_buttonu🔅�
direct_hitu🎯�disappointed_faceu😞�diving_masku🤿�	diya_lampu🪔�dizzyu💫�
dizzy_faceu😵�dnau🧬�dogu🐶�dog_face�dollar_banknoteu💵�dolphinu🐬�dooru🚪zdotted_six-pointed_staru🔯�double_curly_loopu➿�double_exclamation_marku‼�doughnutu🍩�doveu🕊zdown-left_arrowu↙zdown-right_arrowu↘�
down_arrowu⬇�downcast_face_with_sweatu😓�downwards_buttonu🔽�dragonu🐉�dragon_faceu🐲�dressu👗�
drooling_faceu🤤�
drop_of_bloodu🩸�dropletu💧�drumu🥁�ducku🦆�dumplingu🥟�dvdu📀ze-mailu📧�eagleu🦅�earu👂�ear_dark_skin_toneu👂🏿�ear_light_skin_toneu👂🏻zear_medium-dark_skin_toneu👂🏾zear_medium-light_skin_toneu👂🏼�ear_medium_skin_toneu👂🏽�ear_of_cornu🌽�ear_with_hearing_aidu🦻�egg�eggplantu🍆zeight-pointed_staru✴zeight-spoked_asterisku✳zeight-thirtyu🕣ueight_o’clocku🕗�eject_buttonu⏏�
electric_plugu🔌�elephantu🐘z
eleven-thirtyu🕦ueleven_o’clocku🕚�elfu🧝�elf_dark_skin_toneu🧝🏿�elf_light_skin_toneu🧝🏻zelf_medium-dark_skin_toneu🧝🏾zelf_medium-light_skin_toneu🧝🏼�elf_medium_skin_toneu🧝🏽�envelopeu✉�envelope_with_arrowu📩�
euro_banknoteu💶�evergreen_treeu🌲�eweu🐑�exclamation_marku❗�exclamation_question_marku⁉�exploding_headu🤯�expressionless_faceu😑�eyeu👁�eye_in_speech_bubbleu👁️‍🗨️�eyesu👀�face_blowing_a_kissu😘�face_savoring_foodu😋�face_screaming_in_fearu😱�
face_vomitingu🤮�face_with_hand_over_mouthu🤭zface_with_head-bandageu🤕�face_with_medical_masku😷�face_with_monocleu🧐�face_with_open_mouthu😮�face_with_raised_eyebrowu🤨�face_with_rolling_eyesu🙄�face_with_steam_from_noseu😤�face_with_symbols_on_mouthu🤬�face_with_tears_of_joyu😂�face_with_thermometeru🤒�face_with_tongueu😛�face_without_mouthu😶�factoryu🏭�fairyu🧚�fairy_dark_skin_toneu🧚🏿�fairy_light_skin_toneu🧚🏻zfairy_medium-dark_skin_toneu🧚🏾zfairy_medium-light_skin_toneu🧚🏼�fairy_medium_skin_toneu🧚🏽�falafelu🧆�fallen_leafu🍂�familyu👪�family_man_boyu👨‍👦�family_man_boy_boyu👨‍👦‍👦�family_man_girlu👨‍👧�family_man_girl_boyu👨‍👧‍👦�family_man_girl_girlu👨‍👧‍👧�family_man_man_boyu👨‍👨‍👦�family_man_man_boy_boyu👨‍👨‍👦‍👦�family_man_man_girlu👨‍👨‍👧�family_man_man_girl_boyu👨‍👨‍👧‍👦�family_man_man_girl_girlu👨‍👨‍👧‍👧�family_man_woman_boyu👨‍👩‍👦�family_man_woman_boy_boyu👨‍👩‍👦‍👦�family_man_woman_girlu👨‍👩‍👧�family_man_woman_girl_boyu👨‍👩‍👧‍👦�family_man_woman_girl_girlu👨‍👩‍👧‍👧�family_woman_boyu👩‍👦�family_woman_boy_boyu👩‍👦‍👦�family_woman_girlu👩‍👧�family_woman_girl_boyu👩‍👧‍👦�family_woman_girl_girlu👩‍👧‍👧�family_woman_woman_boyu👩‍👩‍👦�family_woman_woman_boy_boyu👩‍👩‍👦‍👦�family_woman_woman_girlu👩‍👩‍👧�family_woman_woman_girl_boyu👩‍👩‍👧‍👦�family_woman_woman_girl_girlu👩‍👩‍👧‍👧zfast-forward_buttonu⏩�fast_down_buttonu⏬�fast_reverse_buttonu⏪�fast_up_buttonu⏫�fax_machineu📠�fearful_faceu😨�female_signu♀�ferris_wheelu🎡�ferryu⛴�field_hockeyu🏑�file_cabinetu🗄�file_folderu📁�film_framesu🎞�film_projectoru📽�fireu🔥�fire_extinguisheru🧯�firecrackeru🧨�fire_engineu🚒�	fireworksu🎆�first_quarter_moonu🌓�first_quarter_moon_faceu🌛�fishu🐟�fish_cake_with_swirlu🍥�fishing_poleu🎣zfive-thirtyu🕠ufive_o’clocku🕔�flag_in_holeu⛳�flamingou🦩�
flashlightu🔦�	flat_shoeu🥿zfleur-de-lisu⚜�
flexed_bicepsu💪�flexed_biceps_dark_skin_toneu💪🏿�flexed_biceps_light_skin_toneu💪🏻z#flexed_biceps_medium-dark_skin_toneu💪🏾z$flexed_biceps_medium-light_skin_toneu💪🏼�flexed_biceps_medium_skin_toneu💪🏽�floppy_disku💾�flower_playing_cardsu🎴�flushed_faceu😳�flying_discu🥏�
flying_sauceru🛸�fogu🌫�foggyu🌁�folded_handsu🙏�folded_hands_dark_skin_toneu🙏🏿�folded_hands_light_skin_toneu🙏🏻z"folded_hands_medium-dark_skin_toneu🙏🏾z#folded_hands_medium-light_skin_toneu🙏🏼�folded_hands_medium_skin_toneu🙏🏽�footu🦶�
footprintsu👣�fork_and_knifeu🍴�fork_and_knife_with_plateu🍽�fortune_cookieu🥠�fountainu⛲�fountain_penu🖋zfour-thirtyu🕟�four_leaf_cloveru🍀ufour_o’clocku🕓�fox_faceu🦊�framed_pictureu🖼�french_friesu🍟�fried_shrimpu🍤�	frog_faceu🐸zfront-facing_baby_chicku🐥�
frowning_faceu☹�frowning_face_with_open_mouthu😦�	fuel_pumpu⛽�	full_moonu🌕�full_moon_faceu🌝�funeral_urnu⚱�game_dieu🎲�garlicu🧄�gearu⚙�	gem_stoneu💎�genieu🧞�ghostu👻�giraffeu🦒�girlu👧�girl_dark_skin_toneu👧🏿�girl_light_skin_toneu👧🏻zgirl_medium-dark_skin_toneu👧🏾zgirl_medium-light_skin_toneu👧🏼�girl_medium_skin_toneu👧🏽�
glass_of_milku🥛�glassesu👓�globe_showing_americasu🌎zglobe_showing_asia-australiau🌏zglobe_showing_europe-africau🌍�globe_with_meridiansu🌐�glovesu🧤�glowing_staru🌟�goal_netu🥅�goatu🐐�goblinu👺�gogglesu🥽�gorillau🦍�graduation_capu🎓�grapesu🍇�green_appleu🍏�
green_booku📗�green_circleu🟢�green_heartu💚�green_saladu🥗�green_squareu🟩�grimacing_faceu😬�grinning_cat_faceu😺�#grinning_cat_face_with_smiling_eyesu😸�
grinning_faceu😀�grinning_face_with_big_eyesu😃�grinning_face_with_smiling_eyesu😄�grinning_face_with_sweatu😅�grinning_squinting_faceu😆�
growing_heartu💗�guardu💂�guard_dark_skin_toneu💂🏿�guard_light_skin_toneu💂🏻zguard_medium-dark_skin_toneu💂🏾zguard_medium-light_skin_toneu💂🏼�guard_medium_skin_toneu💂🏽�	guide_dogu🦮�guitaru🎸�	hamburgeru🍔�hammeru🔨�hammer_and_picku⚒�hammer_and_wrenchu🛠�hamster_faceu🐹�hand_with_fingers_splayedu🖐�(hand_with_fingers_splayed_dark_skin_toneu🖐🏿�)hand_with_fingers_splayed_light_skin_toneu🖐🏻z/hand_with_fingers_splayed_medium-dark_skin_toneu🖐🏾z0hand_with_fingers_splayed_medium-light_skin_toneu🖐🏼�*hand_with_fingers_splayed_medium_skin_toneu🖐🏽�handbagu👜�	handshakeu🤝�hatching_chicku🐣�	headphoneu🎧zhear-no-evil_monkeyu🙉�heart_decorationu💟�
heart_suitu♥�heart_with_arrowu💘�heart_with_ribbonu💝�heavy_check_marku✔�heavy_division_signu➗�heavy_dollar_signu💲�heavy_heart_exclamationu❣�heavy_large_circleu⭕�heavy_minus_signu➖�heavy_multiplication_xu✖�heavy_plus_signu➕�hedgehogu🦔�
helicopteru🚁�herbu🌿�hibiscusu🌺zhigh-heeled_shoeu👠zhigh-speed_trainu🚄�high_voltageu⚡�hiking_bootu🥾�hindu_templeu🛕�hippopotamusu🦛�holeu🕳�	honey_potu🍯�honeybeeu🐝�horizontal_traffic_lightu🚥�horseu🐴�
horse_face�horse_racingu🏇�horse_racing_dark_skin_toneu🏇🏿�horse_racing_light_skin_toneu🏇🏻z"horse_racing_medium-dark_skin_toneu🏇🏾z#horse_racing_medium-light_skin_toneu🏇🏼�horse_racing_medium_skin_toneu🏇🏽�hospitalu🏥�hot_beverageu☕�hot_dogu🌭�hot_faceu🥵�
hot_pepperu🌶�hot_springsu♨�hotelu🏨�hourglass_doneu⌛�hourglass_not_doneu⏳�houseu🏠�house_with_gardenu🏡�housesu🏘�hugging_faceu🤗�hundred_pointsu💯�hushed_faceu😯�iceu🧊�	ice_creamu🍨�
ice_hockeyu🏒�	ice_skateu⛸�
inbox_trayu📥�incoming_envelopeu📨�index_pointing_upu☝� index_pointing_up_dark_skin_toneu☝🏿�!index_pointing_up_light_skin_toneu☝🏻z'index_pointing_up_medium-dark_skin_toneu☝🏾z(index_pointing_up_medium-light_skin_toneu☝🏼�"index_pointing_up_medium_skin_toneu☝🏽�infinityu♾�informationuℹ�input_latin_lettersu🔤�input_latin_lowercaseu🔡�input_latin_uppercaseu🔠�
input_numbersu🔢�
input_symbolsu🔣zjack-o-lanternu🎃�jeansu👖�jigsawu🧩�jokeru🃏�joysticku🕹�kaabau🕋�kangaroou🦘�keyu🔑�keyboardu⌨zkeycap_#u#️⃣zkeycap_*u*️⃣�keycap_0u0️⃣�keycap_1u1️⃣�	keycap_10u🔟�keycap_2u2️⃣�keycap_3u3️⃣�keycap_4u4️⃣�keycap_5u5️⃣�keycap_6u6️⃣�keycap_7u7️⃣�keycap_8u8️⃣�keycap_9u9️⃣�kick_scooteru🛴�kimonou👘�kissu💋�kiss_man_manu👨‍❤️‍💋‍👨�	kiss_mark�kiss_woman_manu👩‍❤️‍💋‍👨�kiss_woman_womanu👩‍❤️‍💋‍👩�kissing_cat_faceu😽�kissing_faceu😗�kissing_face_with_closed_eyesu😚�kissing_face_with_smiling_eyesu😙�
kitchen_knifeu🔪�kiteu🪁�
kiwi_fruitu🥝�koalau🐨�lab_coatu🥼�labelu🏷�lacrosseu🥍�lady_beetleu🐞�laptop_computeru💻�large_blue_diamondu🔷�large_orange_diamondu🔶�last_quarter_moonu🌗�last_quarter_moon_faceu🌜�last_track_buttonu⏮�latin_crossu✝�leaf_fluttering_in_windu🍃�leafy_greenu🥬�ledgeru📒zleft-facing_fistu🤛zleft-facing_fist_dark_skin_toneu🤛🏿z left-facing_fist_light_skin_toneu🤛🏻z&left-facing_fist_medium-dark_skin_toneu🤛🏾z'left-facing_fist_medium-light_skin_toneu🤛🏼z!left-facing_fist_medium_skin_toneu🤛🏽zleft-right_arrowu↔�
left_arrowu⬅�left_arrow_curving_rightu↪�left_luggageu🛅�left_speech_bubbleu🗨�legu🦵�lemonu🍋�leopardu🐆�level_slideru🎚�
light_bulbu💡�
light_railu🚈�linku🔗�linked_paperclipsu🖇�	lion_faceu🦁�lipsticku💄�litter_in_bin_signu🚮�lizardu🦎�llamau🦙�lobsteru🦞�lockedu🔒�locked_with_keyu🔐�locked_with_penu🔏�
locomotiveu🚂�lollipopu🍭�
lotion_bottleu🧴�loudly_crying_faceu😭�loudspeakeru📢zlove-you_gestureu🤟zlove-you_gesture_dark_skin_toneu🤟🏿z love-you_gesture_light_skin_toneu🤟🏻z&love-you_gesture_medium-dark_skin_toneu🤟🏾z'love-you_gesture_medium-light_skin_toneu🤟🏼z!love-you_gesture_medium_skin_toneu🤟🏽�
love_hotelu🏩�love_letteru💌�luggageu🧳�
lying_faceu🤥�mageu🧙�mage_dark_skin_toneu🧙🏿�mage_light_skin_toneu🧙🏻zmage_medium-dark_skin_toneu🧙🏾zmage_medium-light_skin_toneu🧙🏼�mage_medium_skin_toneu🧙🏽�magnetu🧲�magnifying_glass_tilted_leftu🔍�magnifying_glass_tilted_rightu🔎�mahjong_red_dragonu🀄�	male_signu♂�manu👨�man_and_woman_holding_handsu👫�
man_artistu👨‍🎨�man_artist_dark_skin_toneu👨🏿‍🎨�man_artist_light_skin_toneu👨🏻‍🎨z man_artist_medium-dark_skin_toneu👨🏾‍🎨z!man_artist_medium-light_skin_toneu👨🏼‍🎨�man_artist_medium_skin_toneu👨🏽‍🎨�
man_astronautu👨‍🚀�man_astronaut_dark_skin_toneu👨🏿‍🚀�man_astronaut_light_skin_toneu👨🏻‍🚀z#man_astronaut_medium-dark_skin_toneu👨🏾‍🚀z$man_astronaut_medium-light_skin_toneu👨🏼‍🚀�man_astronaut_medium_skin_toneu👨🏽‍🚀�
man_bikingu
🚴‍♂️�man_biking_dark_skin_toneu🚴🏿‍♂️�man_biking_light_skin_toneu🚴🏻‍♂️z man_biking_medium-dark_skin_toneu🚴🏾‍♂️z!man_biking_medium-light_skin_toneu🚴🏼‍♂️�man_biking_medium_skin_toneu🚴🏽‍♂️�man_bouncing_ballu⛹️‍♂️� man_bouncing_ball_dark_skin_toneu⛹🏿‍♂️�!man_bouncing_ball_light_skin_toneu⛹🏻‍♂️z'man_bouncing_ball_medium-dark_skin_toneu⛹🏾‍♂️z(man_bouncing_ball_medium-light_skin_toneu⛹🏼‍♂️�"man_bouncing_ball_medium_skin_toneu⛹🏽‍♂️�
man_bowingu
🙇‍♂️�man_bowing_dark_skin_toneu🙇🏿‍♂️�man_bowing_light_skin_toneu🙇🏻‍♂️z man_bowing_medium-dark_skin_toneu🙇🏾‍♂️z!man_bowing_medium-light_skin_toneu🙇🏼‍♂️�man_bowing_medium_skin_toneu🙇🏽‍♂️�man_cartwheelingu
🤸‍♂️�man_cartwheeling_dark_skin_toneu🤸🏿‍♂️� man_cartwheeling_light_skin_toneu🤸🏻‍♂️z&man_cartwheeling_medium-dark_skin_toneu🤸🏾‍♂️z'man_cartwheeling_medium-light_skin_toneu🤸🏼‍♂️�!man_cartwheeling_medium_skin_toneu🤸🏽‍♂️�man_climbingu
🧗‍♂️�man_climbing_dark_skin_toneu🧗🏿‍♂️�man_climbing_light_skin_toneu🧗🏻‍♂️z"man_climbing_medium-dark_skin_toneu🧗🏾‍♂️z#man_climbing_medium-light_skin_toneu🧗🏼‍♂️�man_climbing_medium_skin_toneu🧗🏽‍♂️�man_construction_workeru
👷‍♂️�&man_construction_worker_dark_skin_toneu👷🏿‍♂️�'man_construction_worker_light_skin_toneu👷🏻‍♂️z-man_construction_worker_medium-dark_skin_toneu👷🏾‍♂️z.man_construction_worker_medium-light_skin_toneu👷🏼‍♂️�(man_construction_worker_medium_skin_toneu👷🏽‍♂️�man_cooku👨‍🍳�man_cook_dark_skin_toneu👨🏿‍🍳�man_cook_light_skin_toneu👨🏻‍🍳zman_cook_medium-dark_skin_toneu👨🏾‍🍳zman_cook_medium-light_skin_toneu👨🏼‍🍳�man_cook_medium_skin_toneu👨🏽‍🍳�man_dancingu🕺�man_dancing_dark_skin_toneu🕺🏿�man_dancing_light_skin_toneu🕺🏻z!man_dancing_medium-dark_skin_toneu🕺🏾z"man_dancing_medium-light_skin_toneu🕺🏼�man_dancing_medium_skin_toneu🕺🏽�man_dark_skin_toneu👨🏿�
man_detectiveu🕵️‍♂️�man_detective_dark_skin_toneu🕵🏿‍♂️�man_detective_light_skin_toneu🕵🏻‍♂️z#man_detective_medium-dark_skin_toneu🕵🏾‍♂️z$man_detective_medium-light_skin_toneu🕵🏼‍♂️�man_detective_medium_skin_toneu🕵🏽‍♂️�man_elfu
🧝‍♂️�man_elf_dark_skin_toneu🧝🏿‍♂️�man_elf_light_skin_toneu🧝🏻‍♂️zman_elf_medium-dark_skin_toneu🧝🏾‍♂️zman_elf_medium-light_skin_toneu🧝🏼‍♂️�man_elf_medium_skin_toneu🧝🏽‍♂️�man_facepalmingu
🤦‍♂️�man_facepalming_dark_skin_toneu🤦🏿‍♂️�man_facepalming_light_skin_toneu🤦🏻‍♂️z%man_facepalming_medium-dark_skin_toneu🤦🏾‍♂️z&man_facepalming_medium-light_skin_toneu🤦🏼‍♂️� man_facepalming_medium_skin_toneu🤦🏽‍♂️�man_factory_workeru👨‍🏭�!man_factory_worker_dark_skin_toneu👨🏿‍🏭�"man_factory_worker_light_skin_toneu👨🏻‍🏭z(man_factory_worker_medium-dark_skin_toneu👨🏾‍🏭z)man_factory_worker_medium-light_skin_toneu👨🏼‍🏭�#man_factory_worker_medium_skin_toneu👨🏽‍🏭�	man_fairyu
🧚‍♂️�man_fairy_dark_skin_toneu🧚🏿‍♂️�man_fairy_light_skin_toneu🧚🏻‍♂️zman_fairy_medium-dark_skin_toneu🧚🏾‍♂️z man_fairy_medium-light_skin_toneu🧚🏼‍♂️�man_fairy_medium_skin_toneu🧚🏽‍♂️�
man_farmeru👨‍🌾�man_farmer_dark_skin_toneu👨🏿‍🌾�man_farmer_light_skin_toneu👨🏻‍🌾z man_farmer_medium-dark_skin_toneu👨🏾‍🌾z!man_farmer_medium-light_skin_toneu👨🏼‍🌾�man_farmer_medium_skin_toneu👨🏽‍🌾�man_firefighteru👨‍🚒�man_firefighter_dark_skin_toneu👨🏿‍🚒�man_firefighter_light_skin_toneu👨🏻‍🚒z%man_firefighter_medium-dark_skin_toneu👨🏾‍🚒z&man_firefighter_medium-light_skin_toneu👨🏼‍🚒� man_firefighter_medium_skin_toneu👨🏽‍🚒�man_frowningu
🙍‍♂️�man_frowning_dark_skin_toneu🙍🏿‍♂️�man_frowning_light_skin_toneu🙍🏻‍♂️z"man_frowning_medium-dark_skin_toneu🙍🏾‍♂️z#man_frowning_medium-light_skin_toneu🙍🏼‍♂️�man_frowning_medium_skin_toneu🙍🏽‍♂️�	man_genieu
🧞‍♂️�man_gesturing_nou
🙅‍♂️�man_gesturing_no_dark_skin_toneu🙅🏿‍♂️� man_gesturing_no_light_skin_toneu🙅🏻‍♂️z&man_gesturing_no_medium-dark_skin_toneu🙅🏾‍♂️z'man_gesturing_no_medium-light_skin_toneu🙅🏼‍♂️�!man_gesturing_no_medium_skin_toneu🙅🏽‍♂️�man_gesturing_oku
🙆‍♂️�man_gesturing_ok_dark_skin_toneu🙆🏿‍♂️� man_gesturing_ok_light_skin_toneu🙆🏻‍♂️z&man_gesturing_ok_medium-dark_skin_toneu🙆🏾‍♂️z'man_gesturing_ok_medium-light_skin_toneu🙆🏼‍♂️�!man_gesturing_ok_medium_skin_toneu🙆🏽‍♂️�man_getting_haircutu
💇‍♂️�"man_getting_haircut_dark_skin_toneu💇🏿‍♂️�#man_getting_haircut_light_skin_toneu💇🏻‍♂️z)man_getting_haircut_medium-dark_skin_toneu💇🏾‍♂️z*man_getting_haircut_medium-light_skin_toneu💇🏼‍♂️�$man_getting_haircut_medium_skin_toneu💇🏽‍♂️�man_getting_massageu
💆‍♂️�"man_getting_massage_dark_skin_toneu💆🏿‍♂️�#man_getting_massage_light_skin_toneu💆🏻‍♂️z)man_getting_massage_medium-dark_skin_toneu💆🏾‍♂️z*man_getting_massage_medium-light_skin_toneu💆🏼‍♂️�$man_getting_massage_medium_skin_toneu💆🏽‍♂️�man_golfingu🏌️‍♂️�man_golfing_dark_skin_toneu🏌🏿‍♂️�man_golfing_light_skin_toneu🏌🏻‍♂️z!man_golfing_medium-dark_skin_toneu🏌🏾‍♂️z"man_golfing_medium-light_skin_toneu🏌🏼‍♂️�man_golfing_medium_skin_toneu🏌🏽‍♂️�	man_guardu
💂‍♂️�man_guard_dark_skin_toneu💂🏿‍♂️�man_guard_light_skin_toneu💂🏻‍♂️zman_guard_medium-dark_skin_toneu💂🏾‍♂️z man_guard_medium-light_skin_toneu💂🏼‍♂️�man_guard_medium_skin_toneu💂🏽‍♂️�man_health_workeru
👨‍⚕️� man_health_worker_dark_skin_toneu👨🏿‍⚕️�!man_health_worker_light_skin_toneu👨🏻‍⚕️z'man_health_worker_medium-dark_skin_toneu👨🏾‍⚕️z(man_health_worker_medium-light_skin_toneu👨🏼‍⚕️�"man_health_worker_medium_skin_toneu👨🏽‍⚕️�man_in_lotus_positionu
🧘‍♂️�$man_in_lotus_position_dark_skin_toneu🧘🏿‍♂️�%man_in_lotus_position_light_skin_toneu🧘🏻‍♂️z+man_in_lotus_position_medium-dark_skin_toneu🧘🏾‍♂️z,man_in_lotus_position_medium-light_skin_toneu🧘🏼‍♂️�&man_in_lotus_position_medium_skin_toneu🧘🏽‍♂️�man_in_manual_wheelchairu👨‍🦽�man_in_motorized_wheelchairu👨‍🦼�man_in_steamy_roomu
🧖‍♂️�!man_in_steamy_room_dark_skin_toneu🧖🏿‍♂️�"man_in_steamy_room_light_skin_toneu🧖🏻‍♂️z(man_in_steamy_room_medium-dark_skin_toneu🧖🏾‍♂️z)man_in_steamy_room_medium-light_skin_toneu🧖🏼‍♂️�#man_in_steamy_room_medium_skin_toneu🧖🏽‍♂️�man_in_suit_levitatingu🕴�%man_in_suit_levitating_dark_skin_toneu🕴🏿�&man_in_suit_levitating_light_skin_toneu🕴🏻z,man_in_suit_levitating_medium-dark_skin_toneu🕴🏾z-man_in_suit_levitating_medium-light_skin_toneu🕴🏼�'man_in_suit_levitating_medium_skin_toneu🕴🏽�
man_in_tuxedou🤵�man_in_tuxedo_dark_skin_toneu🤵🏿�man_in_tuxedo_light_skin_toneu🤵🏻z#man_in_tuxedo_medium-dark_skin_toneu🤵🏾z$man_in_tuxedo_medium-light_skin_toneu🤵🏼�man_in_tuxedo_medium_skin_toneu🤵🏽�	man_judgeu
👨‍⚖️�man_judge_dark_skin_toneu👨🏿‍⚖️�man_judge_light_skin_toneu👨🏻‍⚖️zman_judge_medium-dark_skin_toneu👨🏾‍⚖️z man_judge_medium-light_skin_toneu👨🏼‍⚖️�man_judge_medium_skin_toneu👨🏽‍⚖️�man_jugglingu
🤹‍♂️�man_juggling_dark_skin_toneu🤹🏿‍♂️�man_juggling_light_skin_toneu🤹🏻‍♂️z"man_juggling_medium-dark_skin_toneu🤹🏾‍♂️z#man_juggling_medium-light_skin_toneu🤹🏼‍♂️�man_juggling_medium_skin_toneu🤹🏽‍♂️�man_lifting_weightsu🏋️‍♂️�"man_lifting_weights_dark_skin_toneu🏋🏿‍♂️�#man_lifting_weights_light_skin_toneu🏋🏻‍♂️z)man_lifting_weights_medium-dark_skin_toneu🏋🏾‍♂️z*man_lifting_weights_medium-light_skin_toneu🏋🏼‍♂️�$man_lifting_weights_medium_skin_toneu🏋🏽‍♂️�man_light_skin_toneu👨🏻�man_mageu
🧙‍♂️�man_mage_dark_skin_toneu🧙🏿‍♂️�man_mage_light_skin_toneu🧙🏻‍♂️zman_mage_medium-dark_skin_toneu🧙🏾‍♂️zman_mage_medium-light_skin_toneu🧙🏼‍♂️�man_mage_medium_skin_toneu🧙🏽‍♂️�man_mechanicu👨‍🔧�man_mechanic_dark_skin_toneu👨🏿‍🔧�man_mechanic_light_skin_toneu👨🏻‍🔧z"man_mechanic_medium-dark_skin_toneu👨🏾‍🔧z#man_mechanic_medium-light_skin_toneu👨🏼‍🔧�man_mechanic_medium_skin_toneu👨🏽‍🔧zman_medium-dark_skin_toneu👨🏾zman_medium-light_skin_toneu👨🏼�man_medium_skin_toneu👨🏽�man_mountain_bikingu
🚵‍♂️�"man_mountain_biking_dark_skin_toneu🚵🏿‍♂️�#man_mountain_biking_light_skin_toneu🚵🏻‍♂️z)man_mountain_biking_medium-dark_skin_toneu🚵🏾‍♂️z*man_mountain_biking_medium-light_skin_toneu🚵🏼‍♂️�$man_mountain_biking_medium_skin_toneu🚵🏽‍♂️�man_office_workeru👨‍💼� man_office_worker_dark_skin_toneu👨🏿‍💼�!man_office_worker_light_skin_toneu👨🏻‍💼z'man_office_worker_medium-dark_skin_toneu👨🏾‍💼z(man_office_worker_medium-light_skin_toneu👨🏼‍💼�"man_office_worker_medium_skin_toneu👨🏽‍💼�	man_pilotu
👨‍✈️�man_pilot_dark_skin_toneu👨🏿‍✈️�man_pilot_light_skin_toneu👨🏻‍✈️zman_pilot_medium-dark_skin_toneu👨🏾‍✈️z man_pilot_medium-light_skin_toneu👨🏼‍✈️�man_pilot_medium_skin_toneu👨🏽‍✈️�man_playing_handballu
🤾‍♂️�#man_playing_handball_dark_skin_toneu🤾🏿‍♂️�$man_playing_handball_light_skin_toneu🤾🏻‍♂️z*man_playing_handball_medium-dark_skin_toneu🤾🏾‍♂️z+man_playing_handball_medium-light_skin_toneu🤾🏼‍♂️�%man_playing_handball_medium_skin_toneu🤾🏽‍♂️�man_playing_water_polou
🤽‍♂️�%man_playing_water_polo_dark_skin_toneu🤽🏿‍♂️�&man_playing_water_polo_light_skin_toneu🤽🏻‍♂️z,man_playing_water_polo_medium-dark_skin_toneu🤽🏾‍♂️z-man_playing_water_polo_medium-light_skin_toneu🤽🏼‍♂️�'man_playing_water_polo_medium_skin_toneu🤽🏽‍♂️�man_police_officeru
👮‍♂️�!man_police_officer_dark_skin_toneu👮🏿‍♂️�"man_police_officer_light_skin_toneu👮🏻‍♂️z(man_police_officer_medium-dark_skin_toneu👮🏾‍♂️z)man_police_officer_medium-light_skin_toneu👮🏼‍♂️�#man_police_officer_medium_skin_toneu👮🏽‍♂️�man_poutingu
🙎‍♂️�man_pouting_dark_skin_toneu🙎🏿‍♂️�man_pouting_light_skin_toneu🙎🏻‍♂️z!man_pouting_medium-dark_skin_toneu🙎🏾‍♂️z"man_pouting_medium-light_skin_toneu🙎🏼‍♂️�man_pouting_medium_skin_toneu🙎🏽‍♂️�man_raising_handu
🙋‍♂️�man_raising_hand_dark_skin_toneu🙋🏿‍♂️� man_raising_hand_light_skin_toneu🙋🏻‍♂️z&man_raising_hand_medium-dark_skin_toneu🙋🏾‍♂️z'man_raising_hand_medium-light_skin_toneu🙋🏼‍♂️�!man_raising_hand_medium_skin_toneu🙋🏽‍♂️�man_rowing_boatu
🚣‍♂️�man_rowing_boat_dark_skin_toneu🚣🏿‍♂️�man_rowing_boat_light_skin_toneu🚣🏻‍♂️z%man_rowing_boat_medium-dark_skin_toneu🚣🏾‍♂️z&man_rowing_boat_medium-light_skin_toneu🚣🏼‍♂️� man_rowing_boat_medium_skin_toneu🚣🏽‍♂️�man_runningu
🏃‍♂️�man_running_dark_skin_toneu🏃🏿‍♂️�man_running_light_skin_toneu🏃🏻‍♂️z!man_running_medium-dark_skin_toneu🏃🏾‍♂️z"man_running_medium-light_skin_toneu🏃🏼‍♂️�man_running_medium_skin_toneu🏃🏽‍♂️�
man_scientistu👨‍🔬�man_scientist_dark_skin_toneu👨🏿‍🔬�man_scientist_light_skin_toneu👨🏻‍🔬z#man_scientist_medium-dark_skin_toneu👨🏾‍🔬z$man_scientist_medium-light_skin_toneu👨🏼‍🔬�man_scientist_medium_skin_toneu👨🏽‍🔬�
man_shruggingu
🤷‍♂️�man_shrugging_dark_skin_toneu🤷🏿‍♂️�man_shrugging_light_skin_toneu🤷🏻‍♂️z#man_shrugging_medium-dark_skin_toneu🤷🏾‍♂️z$man_shrugging_medium-light_skin_toneu🤷🏼‍♂️�man_shrugging_medium_skin_toneu🤷🏽‍♂️�
man_singeru👨‍🎤�man_singer_dark_skin_toneu👨🏿‍🎤�man_singer_light_skin_toneu👨🏻‍🎤z man_singer_medium-dark_skin_toneu👨🏾‍🎤z!man_singer_medium-light_skin_toneu👨🏼‍🎤�man_singer_medium_skin_toneu👨🏽‍🎤�man_studentu👨‍🎓�man_student_dark_skin_toneu👨🏿‍🎓�man_student_light_skin_toneu👨🏻‍🎓z!man_student_medium-dark_skin_toneu👨🏾‍🎓z"man_student_medium-light_skin_toneu👨🏼‍🎓�man_student_medium_skin_toneu👨🏽‍🎓�man_surfingu
🏄‍♂️�man_surfing_dark_skin_toneu🏄🏿‍♂️�man_surfing_light_skin_toneu🏄🏻‍♂️z!man_surfing_medium-dark_skin_toneu🏄🏾‍♂️z"man_surfing_medium-light_skin_toneu🏄🏼‍♂️�man_surfing_medium_skin_toneu🏄🏽‍♂️�man_swimmingu
🏊‍♂️�man_swimming_dark_skin_toneu🏊🏿‍♂️�man_swimming_light_skin_toneu🏊🏻‍♂️z"man_swimming_medium-dark_skin_toneu🏊🏾‍♂️z#man_swimming_medium-light_skin_toneu🏊🏼‍♂️�man_swimming_medium_skin_toneu🏊🏽‍♂️�man_teacheru👨‍🏫�man_teacher_dark_skin_toneu👨🏿‍🏫�man_teacher_light_skin_toneu👨🏻‍🏫z!man_teacher_medium-dark_skin_toneu👨🏾‍🏫z"man_teacher_medium-light_skin_toneu👨🏼‍🏫�man_teacher_medium_skin_toneu👨🏽‍🏫�man_technologistu👨‍💻�man_technologist_dark_skin_toneu👨🏿‍💻� man_technologist_light_skin_toneu👨🏻‍💻z&man_technologist_medium-dark_skin_toneu👨🏾‍💻z'man_technologist_medium-light_skin_toneu👨🏼‍💻�!man_technologist_medium_skin_toneu👨🏽‍💻�man_tipping_handu
💁‍♂️�man_tipping_hand_dark_skin_toneu💁🏿‍♂️� man_tipping_hand_light_skin_toneu💁🏻‍♂️z&man_tipping_hand_medium-dark_skin_toneu💁🏾‍♂️z'man_tipping_hand_medium-light_skin_toneu💁🏼‍♂️�!man_tipping_hand_medium_skin_toneu💁🏽‍♂️�man_vampireu
🧛‍♂️�man_vampire_dark_skin_toneu🧛🏿‍♂️�man_vampire_light_skin_toneu🧛🏻‍♂️z!man_vampire_medium-dark_skin_toneu🧛🏾‍♂️z"man_vampire_medium-light_skin_toneu🧛🏼‍♂️�man_vampire_medium_skin_toneu🧛🏽‍♂️�man_walkingu
🚶‍♂️�man_walking_dark_skin_toneu🚶🏿‍♂️�man_walking_light_skin_toneu🚶🏻‍♂️z!man_walking_medium-dark_skin_toneu🚶🏾‍♂️z"man_walking_medium-light_skin_toneu🚶🏼‍♂️�man_walking_medium_skin_toneu🚶🏽‍♂️�man_wearing_turbanu
👳‍♂️�!man_wearing_turban_dark_skin_toneu👳🏿‍♂️�"man_wearing_turban_light_skin_toneu👳🏻‍♂️z(man_wearing_turban_medium-dark_skin_toneu👳🏾‍♂️z)man_wearing_turban_medium-light_skin_toneu👳🏼‍♂️�#man_wearing_turban_medium_skin_toneu👳🏽‍♂️�man_with_probing_caneu👨‍🦯�man_with_chinese_capu👲�#man_with_chinese_cap_dark_skin_toneu👲🏿�$man_with_chinese_cap_light_skin_toneu👲🏻z*man_with_chinese_cap_medium-dark_skin_toneu👲🏾z+man_with_chinese_cap_medium-light_skin_toneu👲🏼�%man_with_chinese_cap_medium_skin_toneu👲🏽�
man_zombieu
🧟‍♂️�mangou🥭�mantelpiece_clocku🕰�manual_wheelchairu🦽uman’s_shoeu👞�map_of_japan�
maple_leafu🍁�martial_arts_uniformu🥋�mateu🧉�meat_on_boneu🍖�mechanical_armu🦾�mechanical_legu🦿�medical_symbolu⚕�	megaphoneu📣�melonu🍈�memou📝�men_with_bunny_earsu
👯‍♂️�
men_wrestlingu
🤼‍♂️�menorahu🕎umen’s_roomu🚹�mermaidu
🧜‍♀️�mermaid_dark_skin_toneu🧜🏿‍♀️�mermaid_light_skin_toneu🧜🏻‍♀️zmermaid_medium-dark_skin_toneu🧜🏾‍♀️zmermaid_medium-light_skin_toneu🧜🏼‍♀️�mermaid_medium_skin_toneu🧜🏽‍♀️�mermanu
🧜‍♂️�merman_dark_skin_toneu🧜🏿‍♂️�merman_light_skin_toneu🧜🏻‍♂️zmerman_medium-dark_skin_toneu🧜🏾‍♂️zmerman_medium-light_skin_toneu🧜🏼‍♂️�merman_medium_skin_toneu🧜🏽‍♂️�	merpersonu🧜�merperson_dark_skin_toneu🧜🏿�merperson_light_skin_toneu🧜🏻zmerperson_medium-dark_skin_toneu🧜🏾z merperson_medium-light_skin_toneu🧜🏼�merperson_medium_skin_toneu🧜🏽�metrou🚇�microbeu🦠�
microphoneu🎤�
microscopeu🔬�
middle_fingeru🖕�middle_finger_dark_skin_toneu🖕🏿�middle_finger_light_skin_toneu🖕🏻z#middle_finger_medium-dark_skin_toneu🖕🏾z$middle_finger_medium-light_skin_toneu🖕🏼�middle_finger_medium_skin_toneu🖕🏽�military_medalu🎖�	milky_wayu🌌�minibusu🚐�moaiu🗿�mobile_phoneu📱�mobile_phone_offu📴�mobile_phone_with_arrowu📲zmoney-mouth_faceu🤑�	money_bagu💰�money_with_wingsu💸�monkeyu🐒�monkey_faceu🐵�monorailu🚝�	moon_cakeu🥮�moon_viewing_ceremonyu🎑�mosqueu🕌�mosquitou🦟�
motor_boatu🛥�
motor_scooteru🛵�
motorcycleu🏍�motorized_wheelchairu🦼�motorwayu🛣�
mount_fujiu🗻�mountainu⛰�mountain_cablewayu🚠�mountain_railwayu🚞�mouseu🐭�
mouse_face�mouthu👄�movie_camerau🎥�mushroomu🍄�musical_keyboardu🎹�musical_noteu🎵�
musical_notesu🎶�
musical_scoreu🎼�
muted_speakeru🔇�nail_polishu💅�nail_polish_dark_skin_toneu💅🏿�nail_polish_light_skin_toneu💅🏻z!nail_polish_medium-dark_skin_toneu💅🏾z"nail_polish_medium-light_skin_toneu💅🏼�nail_polish_medium_skin_toneu💅🏽�
name_badgeu📛�
national_parku🏞�nauseated_faceu🤢�nazar_amuletu🧿�necktieu👔�	nerd_faceu🤓�neutral_faceu😐�new_moonu🌑�
new_moon_faceu🌚�	newspaperu📰�next_track_buttonu⏭�night_with_starsu🌃znine-thirtyu🕤unine_o’clocku🕘�no_bicyclesu🚳�no_entryu⛔�no_litteringu🚯�no_mobile_phonesu📵�no_one_under_eighteenu🔞�no_pedestriansu🚷�
no_smokingu🚭znon-potable_wateru🚱�noseu👃�nose_dark_skin_toneu👃🏿�nose_light_skin_toneu👃🏻znose_medium-dark_skin_toneu👃🏾znose_medium-light_skin_toneu👃🏼�nose_medium_skin_toneu👃🏽�notebooku📓�notebook_with_decorative_coveru📔�nut_and_boltu🔩�octopusu🐙�odenu🍢�office_buildingu🏢�ogreu👹�oil_drumu🛢�old_keyu🗝�old_manu👴�old_man_dark_skin_toneu👴🏿�old_man_light_skin_toneu👴🏻zold_man_medium-dark_skin_toneu👴🏾zold_man_medium-light_skin_toneu👴🏼�old_man_medium_skin_toneu👴🏽�	old_womanu👵�old_woman_dark_skin_toneu👵🏿�old_woman_light_skin_toneu👵🏻zold_woman_medium-dark_skin_toneu👵🏾z old_woman_medium-light_skin_toneu👵🏼�old_woman_medium_skin_toneu👵🏽�older_adultu🧓�older_adult_dark_skin_toneu🧓🏿�older_adult_light_skin_toneu🧓🏻z!older_adult_medium-dark_skin_toneu🧓🏾z"older_adult_medium-light_skin_toneu🧓🏼�older_adult_medium_skin_toneu🧓🏽�omu🕉�oncoming_automobileu🚘�oncoming_busu🚍�
oncoming_fistu👊�oncoming_fist_dark_skin_toneu👊🏿�oncoming_fist_light_skin_toneu👊🏻z#oncoming_fist_medium-dark_skin_toneu👊🏾z$oncoming_fist_medium-light_skin_toneu👊🏼�oncoming_fist_medium_skin_toneu👊🏽�oncoming_police_caru🚔�
oncoming_taxiu🚖zone-piece_swimsuitu🩱z
one-thirtyu🕜u
one_o’clocku🕐�onionu🧅�	open_booku📖�open_file_folderu📂�
open_handsu👐�open_hands_dark_skin_toneu👐🏿�open_hands_light_skin_toneu👐🏻z open_hands_medium-dark_skin_toneu👐🏾z!open_hands_medium-light_skin_toneu👐🏼�open_hands_medium_skin_toneu👐🏽�open_mailbox_with_lowered_flagu📭�open_mailbox_with_raised_flagu📬�optical_disku💿�orange_booku📙�
orange_circleu🟠�orange_heartu🧡�
orange_squareu🟧�	orangutanu🦧�orthodox_crossu☦�otteru🦦�outbox_trayu📤�owlu🦉�oxu🐂�oysteru🦪�packageu📦�page_facing_upu📄�page_with_curlu📃�pageru📟�
paintbrushu🖌�	palm_treeu🌴�palms_up_togetheru🤲� palms_up_together_dark_skin_toneu🤲🏿�!palms_up_together_light_skin_toneu🤲🏻z'palms_up_together_medium-dark_skin_toneu🤲🏾z(palms_up_together_medium-light_skin_toneu🤲🏼�"palms_up_together_medium_skin_toneu🤲🏽�pancakesu🥞�
panda_faceu🐼�	paperclipu📎�parrotu🦜�part_alternation_marku〽�party_popperu🎉�
partying_faceu🥳�passenger_shipu🛳�passport_controlu🛂�pause_buttonu⏸�
paw_printsu🐾�peace_symbolu☮�peachu🍑�peacocku🦚�peanutsu🥜�pearu🍐�penu🖊�pencil�penguinu🐧�pensive_faceu😔�people_holding_handsu🧑‍🤝‍🧑�people_with_bunny_earsu👯�people_wrestlingu🤼�performing_artsu🎭�persevering_faceu😣�
person_bikingu🚴�person_biking_dark_skin_toneu🚴🏿�person_biking_light_skin_toneu🚴🏻z#person_biking_medium-dark_skin_toneu🚴🏾z$person_biking_medium-light_skin_toneu🚴🏼�person_biking_medium_skin_toneu🚴🏽�person_bouncing_ballu⛹�#person_bouncing_ball_dark_skin_toneu⛹🏿�$person_bouncing_ball_light_skin_toneu⛹🏻z*person_bouncing_ball_medium-dark_skin_toneu⛹🏾z+person_bouncing_ball_medium-light_skin_toneu⛹🏼�%person_bouncing_ball_medium_skin_toneu⛹🏽�
person_bowingu🙇�person_bowing_dark_skin_toneu🙇🏿�person_bowing_light_skin_toneu🙇🏻z#person_bowing_medium-dark_skin_toneu🙇🏾z$person_bowing_medium-light_skin_toneu🙇🏼�person_bowing_medium_skin_toneu🙇🏽�person_cartwheelingu🤸�"person_cartwheeling_dark_skin_toneu🤸🏿�#person_cartwheeling_light_skin_toneu🤸🏻z)person_cartwheeling_medium-dark_skin_toneu🤸🏾z*person_cartwheeling_medium-light_skin_toneu🤸🏼�$person_cartwheeling_medium_skin_toneu🤸🏽�person_climbingu🧗�person_climbing_dark_skin_toneu🧗🏿�person_climbing_light_skin_toneu🧗🏻z%person_climbing_medium-dark_skin_toneu🧗🏾z&person_climbing_medium-light_skin_toneu🧗🏼� person_climbing_medium_skin_toneu🧗🏽�person_facepalmingu🤦�!person_facepalming_dark_skin_toneu🤦🏿�"person_facepalming_light_skin_toneu🤦🏻z(person_facepalming_medium-dark_skin_toneu🤦🏾z)person_facepalming_medium-light_skin_toneu🤦🏼�#person_facepalming_medium_skin_toneu🤦🏽�person_fencingu🤺�person_frowningu🙍�person_frowning_dark_skin_toneu🙍🏿�person_frowning_light_skin_toneu🙍🏻z%person_frowning_medium-dark_skin_toneu🙍🏾z&person_frowning_medium-light_skin_toneu🙍🏼� person_frowning_medium_skin_toneu🙍🏽�person_gesturing_nou🙅�"person_gesturing_no_dark_skin_toneu🙅🏿�#person_gesturing_no_light_skin_toneu🙅🏻z)person_gesturing_no_medium-dark_skin_toneu🙅🏾z*person_gesturing_no_medium-light_skin_toneu🙅🏼�$person_gesturing_no_medium_skin_toneu🙅🏽�person_gesturing_oku🙆�"person_gesturing_ok_dark_skin_toneu🙆🏿�#person_gesturing_ok_light_skin_toneu🙆🏻z)person_gesturing_ok_medium-dark_skin_toneu🙆🏾z*person_gesturing_ok_medium-light_skin_toneu🙆🏼�$person_gesturing_ok_medium_skin_toneu🙆🏽�person_getting_haircutu💇�%person_getting_haircut_dark_skin_toneu💇🏿�&person_getting_haircut_light_skin_toneu💇🏻z,person_getting_haircut_medium-dark_skin_toneu💇🏾z-person_getting_haircut_medium-light_skin_toneu💇🏼�'person_getting_haircut_medium_skin_toneu💇🏽�person_getting_massageu💆�%person_getting_massage_dark_skin_toneu💆🏿�&person_getting_massage_light_skin_toneu💆🏻z,person_getting_massage_medium-dark_skin_toneu💆🏾z-person_getting_massage_medium-light_skin_toneu💆🏼�'person_getting_massage_medium_skin_toneu💆🏽�person_golfingu🏌�person_golfing_dark_skin_toneu🏌🏿�person_golfing_light_skin_toneu🏌🏻z$person_golfing_medium-dark_skin_toneu🏌🏾z%person_golfing_medium-light_skin_toneu🏌🏼�person_golfing_medium_skin_toneu🏌🏽�
person_in_bedu🛌�person_in_bed_dark_skin_toneu🛌🏿�person_in_bed_light_skin_toneu🛌🏻z#person_in_bed_medium-dark_skin_toneu🛌🏾z$person_in_bed_medium-light_skin_toneu🛌🏼�person_in_bed_medium_skin_toneu🛌🏽�person_in_lotus_positionu🧘�'person_in_lotus_position_dark_skin_toneu🧘🏿�(person_in_lotus_position_light_skin_toneu🧘🏻z.person_in_lotus_position_medium-dark_skin_toneu🧘🏾z/person_in_lotus_position_medium-light_skin_toneu🧘🏼�)person_in_lotus_position_medium_skin_toneu🧘🏽�person_in_steamy_roomu🧖�$person_in_steamy_room_dark_skin_toneu🧖🏿�%person_in_steamy_room_light_skin_toneu🧖🏻z+person_in_steamy_room_medium-dark_skin_toneu🧖🏾z,person_in_steamy_room_medium-light_skin_toneu🧖🏼�&person_in_steamy_room_medium_skin_toneu🧖🏽�person_jugglingu🤹�person_juggling_dark_skin_toneu🤹🏿�person_juggling_light_skin_toneu🤹🏻z%person_juggling_medium-dark_skin_toneu🤹🏾z&person_juggling_medium-light_skin_toneu🤹🏼� person_juggling_medium_skin_toneu🤹🏽�person_kneelingu🧎�person_lifting_weightsu🏋�%person_lifting_weights_dark_skin_toneu🏋🏿�&person_lifting_weights_light_skin_toneu🏋🏻z,person_lifting_weights_medium-dark_skin_toneu🏋🏾z-person_lifting_weights_medium-light_skin_toneu🏋🏼�'person_lifting_weights_medium_skin_toneu🏋🏽�person_mountain_bikingu🚵�%person_mountain_biking_dark_skin_toneu🚵🏿�&person_mountain_biking_light_skin_toneu🚵🏻z,person_mountain_biking_medium-dark_skin_toneu🚵🏾z-person_mountain_biking_medium-light_skin_toneu🚵🏼�'person_mountain_biking_medium_skin_toneu🚵🏽�person_playing_handballu🤾�&person_playing_handball_dark_skin_toneu🤾🏿�'person_playing_handball_light_skin_toneu🤾🏻z-person_playing_handball_medium-dark_skin_toneu🤾🏾z.person_playing_handball_medium-light_skin_toneu🤾🏼�(person_playing_handball_medium_skin_toneu🤾🏽�person_playing_water_polou🤽�(person_playing_water_polo_dark_skin_toneu🤽🏿�)person_playing_water_polo_light_skin_toneu🤽🏻z/person_playing_water_polo_medium-dark_skin_toneu🤽🏾z0person_playing_water_polo_medium-light_skin_toneu🤽🏼�*person_playing_water_polo_medium_skin_toneu🤽🏽�person_poutingu🙎�person_pouting_dark_skin_toneu🙎🏿�person_pouting_light_skin_toneu🙎🏻z$person_pouting_medium-dark_skin_toneu🙎🏾z%person_pouting_medium-light_skin_toneu🙎🏼�person_pouting_medium_skin_toneu🙎🏽�person_raising_handu🙋�"person_raising_hand_dark_skin_toneu🙋🏿�#person_raising_hand_light_skin_toneu🙋🏻z)person_raising_hand_medium-dark_skin_toneu🙋🏾z*person_raising_hand_medium-light_skin_toneu🙋🏼�$person_raising_hand_medium_skin_toneu🙋🏽�person_rowing_boatu🚣�!person_rowing_boat_dark_skin_toneu🚣🏿�"person_rowing_boat_light_skin_toneu🚣🏻z(person_rowing_boat_medium-dark_skin_toneu🚣🏾z)person_rowing_boat_medium-light_skin_toneu🚣🏼�#person_rowing_boat_medium_skin_toneu🚣🏽�person_runningu🏃�person_running_dark_skin_toneu🏃🏿�person_running_light_skin_toneu🏃🏻z$person_running_medium-dark_skin_toneu🏃🏾z%person_running_medium-light_skin_toneu🏃🏼�person_running_medium_skin_toneu🏃🏽�person_shruggingu🤷�person_shrugging_dark_skin_toneu🤷🏿� person_shrugging_light_skin_toneu🤷🏻z&person_shrugging_medium-dark_skin_toneu🤷🏾z'person_shrugging_medium-light_skin_toneu🤷🏼�!person_shrugging_medium_skin_toneu🤷🏽�person_standingu🧍�person_surfingu🏄�person_surfing_dark_skin_toneu🏄🏿�person_surfing_light_skin_toneu🏄🏻z$person_surfing_medium-dark_skin_toneu🏄🏾z%person_surfing_medium-light_skin_toneu🏄🏼�person_surfing_medium_skin_toneu🏄🏽�person_swimmingu🏊�person_swimming_dark_skin_toneu🏊🏿�person_swimming_light_skin_toneu🏊🏻z%person_swimming_medium-dark_skin_toneu🏊🏾z&person_swimming_medium-light_skin_toneu🏊🏼� person_swimming_medium_skin_toneu🏊🏽�person_taking_bathu🛀�!person_taking_bath_dark_skin_toneu🛀🏿�"person_taking_bath_light_skin_toneu🛀🏻z(person_taking_bath_medium-dark_skin_toneu🛀🏾z)person_taking_bath_medium-light_skin_toneu🛀🏼�#person_taking_bath_medium_skin_toneu🛀🏽�person_tipping_handu💁�"person_tipping_hand_dark_skin_toneu💁🏿�#person_tipping_hand_light_skin_toneu💁🏻z)person_tipping_hand_medium-dark_skin_toneu💁🏾z*person_tipping_hand_medium-light_skin_toneu💁🏼�$person_tipping_hand_medium_skin_toneu💁🏽�person_walkingu🚶�person_walking_dark_skin_toneu🚶🏿�person_walking_light_skin_toneu🚶🏻z$person_walking_medium-dark_skin_toneu🚶🏾z%person_walking_medium-light_skin_toneu🚶🏼�person_walking_medium_skin_toneu🚶🏽�person_wearing_turbanu👳�$person_wearing_turban_dark_skin_toneu👳🏿�%person_wearing_turban_light_skin_toneu👳🏻z+person_wearing_turban_medium-dark_skin_toneu👳🏾z,person_wearing_turban_medium-light_skin_toneu👳🏼�&person_wearing_turban_medium_skin_toneu👳🏽�
petri_dishu🧫�picku⛏�pieu🥧�pigu🐷�pig_face�pig_noseu🐽�pile_of_poou💩�pillu💊�
pinching_handu🤏�pine_decorationu🎍�	pineappleu🍍�	ping_pongu🏓�pirate_flagu
🏴‍☠️�pistolu🔫�pizzau🍕�place_of_worshipu🛐�play_buttonu▶�play_or_pause_buttonu⏯�
pleading_faceu🥺�
police_caru🚓�police_car_lightu🚨�police_officeru👮�police_officer_dark_skin_toneu👮🏿�police_officer_light_skin_toneu👮🏻z$police_officer_medium-dark_skin_toneu👮🏾z%police_officer_medium-light_skin_toneu👮🏼�police_officer_medium_skin_toneu👮🏽�poodleu🐩�pool_8_ballu🎱�popcornu🍿�post_office�postal_hornu📯�postboxu📮�pot_of_foodu🍲�
potable_wateru🚰�potatou🥔�poultry_legu🍗�pound_banknoteu💷�pouting_cat_faceu😾�pouting_faceu😡�prayer_beadsu📿�pregnant_womanu🤰�pregnant_woman_dark_skin_toneu🤰🏿�pregnant_woman_light_skin_toneu🤰🏻z$pregnant_woman_medium-dark_skin_toneu🤰🏾z%pregnant_woman_medium-light_skin_toneu🤰🏼�pregnant_woman_medium_skin_toneu🤰🏽�pretzelu🥨�probing_caneu🦯�princeu🤴�prince_dark_skin_toneu🤴🏿�prince_light_skin_toneu🤴🏻zprince_medium-dark_skin_toneu🤴🏾zprince_medium-light_skin_toneu🤴🏼�prince_medium_skin_toneu🤴🏽�princessu👸�princess_dark_skin_toneu👸🏿�princess_light_skin_toneu👸🏻zprincess_medium-dark_skin_toneu👸🏾zprincess_medium-light_skin_toneu👸🏼�princess_medium_skin_toneu👸🏽�printeru🖨�
prohibitedu🚫�
purple_circleu🟣�purple_heartu💜�
purple_squareu🟪�purseu👛�pushpinu📌�
question_marku❓�rabbitu🐰�rabbit_face�raccoonu🦝�
racing_caru🏎�radiou📻�radio_buttonu🔘�radioactiveu☢�railway_caru🚃�
railway_tracku🛤�rainbowu🌈�rainbow_flagu🏳️‍🌈�raised_back_of_handu🤚�"raised_back_of_hand_dark_skin_toneu🤚🏿�#raised_back_of_hand_light_skin_toneu🤚🏻z)raised_back_of_hand_medium-dark_skin_toneu🤚🏾z*raised_back_of_hand_medium-light_skin_toneu🤚🏼�$raised_back_of_hand_medium_skin_toneu🤚🏽�raised_fistu✊�raised_fist_dark_skin_toneu✊🏿�raised_fist_light_skin_toneu✊🏻z!raised_fist_medium-dark_skin_toneu✊🏾z"raised_fist_medium-light_skin_toneu✊🏼�raised_fist_medium_skin_toneu✊🏽�raised_handu✋�raised_hand_dark_skin_toneu✋🏿�raised_hand_light_skin_toneu✋🏻z!raised_hand_medium-dark_skin_toneu✋🏾z"raised_hand_medium-light_skin_toneu✋🏼�raised_hand_medium_skin_toneu✋🏽�
raising_handsu🙌�raising_hands_dark_skin_toneu🙌🏿�raising_hands_light_skin_toneu🙌🏻z#raising_hands_medium-dark_skin_toneu🙌🏾z$raising_hands_medium-light_skin_toneu🙌🏼�raising_hands_medium_skin_toneu🙌🏽�ramu🐏�ratu🐀�razoru🪒�
ringed_planetu🪐�receiptu🧾�
record_buttonu⏺�recycling_symbolu♻�	red_appleu🍎�
red_circleu🔴�red_envelopeu🧧�red_hairu🦰zred-haired_manu👨‍🦰zred-haired_womanu👩‍🦰�	red_heartu❤�red_paper_lanternu🏮�
red_squareu🟥�red_triangle_pointed_downu🔻�red_triangle_pointed_upu🔺�
registered�®�
relieved_faceu😌�reminder_ribbonu🎗�
repeat_buttonu🔁�repeat_single_buttonu🔂urescue_worker’s_helmetu⛑�restroomu🚻�reverse_buttonu◀�revolving_heartsu💞�
rhinocerosu🦏�ribbonu🎀�	rice_ballu🍙�rice_crackeru🍘zright-facing_fistu🤜z right-facing_fist_dark_skin_toneu🤜🏿z!right-facing_fist_light_skin_toneu🤜🏻z'right-facing_fist_medium-dark_skin_toneu🤜🏾z(right-facing_fist_medium-light_skin_toneu🤜🏼z"right-facing_fist_medium_skin_toneu🤜🏽�right_anger_bubbleu🗯�right_arrowu➡�right_arrow_curving_downu⤵�right_arrow_curving_leftu↩�right_arrow_curving_upu⤴�ringu💍�roasted_sweet_potatou🍠�
robot_faceu🤖�rocketu🚀�
roll_of_paperu🧻zrolled-up_newspaperu🗞�roller_coasteru🎢�rolling_on_the_floor_laughingu🤣�roosteru🐓�roseu🌹�rosetteu🏵�
round_pushpinu📍�rugby_footballu🏉�
running_shirtu🎽�running_shoeu👟�sad_but_relieved_faceu😥�
safety_pinu🧷�safety_vestu🦺�saltu🧂�sailboatu⛵�sakeu🍶�sandwichu🥪�sariu🥻�	satelliteu📡�satellite_antenna�sauropodu🦕�	saxophoneu🎷�scarfu🧣�schoolu🏫�school_backpacku🎒�scissorsu✂�scorpionu🦂�scrollu📜�seatu💺zsee-no-evil_monkeyu🙈�seedlingu🌱�selfieu🤳�selfie_dark_skin_toneu🤳🏿�selfie_light_skin_toneu🤳🏻zselfie_medium-dark_skin_toneu🤳🏾zselfie_medium-light_skin_toneu🤳🏼�selfie_medium_skin_toneu🤳🏽�service_dogu🐕‍🦺zseven-thirtyu🕢useven_o’clocku🕖�shallow_pan_of_foodu🥘�shamrocku☘�sharku🦈�
shaved_iceu🍧�
sheaf_of_riceu🌾�shieldu🛡�
shinto_shrineu⛩�shipu🚢�
shooting_staru🌠�
shopping_bagsu🛍�
shopping_cartu🛒�	shortcakeu🍰�shortsu🩳�showeru🚿�shrimpu🦐�shuffle_tracks_buttonu🔀�
shushing_faceu🤫�sign_of_the_hornsu🤘� sign_of_the_horns_dark_skin_toneu🤘🏿�!sign_of_the_horns_light_skin_toneu🤘🏻z'sign_of_the_horns_medium-dark_skin_toneu🤘🏾z(sign_of_the_horns_medium-light_skin_toneu🤘🏼�"sign_of_the_horns_medium_skin_toneu🤘🏽z
six-thirtyu🕡u
six_o’clocku🕕�
skateboardu🛹�skieru⛷�skisu🎿�skullu💀�skull_and_crossbonesu☠�skunku🦨�sledu🛷�
sleeping_faceu😴�sleepy_faceu😪�slightly_frowning_faceu🙁�slightly_smiling_faceu🙂�slot_machineu🎰�slothu🦥�small_airplaneu🛩�small_blue_diamondu🔹�small_orange_diamondu🔸z smiling_cat_face_with_heart-eyesu😻�smiling_faceu☺�smiling_face_with_halou😇�smiling_face_with_3_heartsu🥰zsmiling_face_with_heart-eyesu😍�smiling_face_with_hornsu😈�smiling_face_with_smiling_eyesu😊�smiling_face_with_sunglassesu😎�
smirking_faceu😏�snailu🐌�snakeu🐍�
sneezing_faceu🤧zsnow-capped_mountainu🏔�snowboarderu🏂�snowboarder_dark_skin_toneu🏂🏿�snowboarder_light_skin_toneu🏂🏻z!snowboarder_medium-dark_skin_toneu🏂🏾z"snowboarder_medium-light_skin_toneu🏂🏼�snowboarder_medium_skin_toneu🏂🏽�	snowflakeu❄�snowmanu☃�snowman_without_snowu⛄�soapu🧼�soccer_ballu⚽�socksu🧦�softballu🥎�soft_ice_creamu🍦�
spade_suitu♠�	spaghettiu🍝�sparkleu❇�sparkleru🎇�sparklesu✨�sparkling_heartu💖zspeak-no-evil_monkeyu🙊�speaker_high_volumeu🔊�speaker_low_volumeu🔈�speaker_medium_volumeu🔉�
speaking_headu🗣�speech_balloonu💬�	speedboatu🚤�spideru🕷�
spider_webu🕸�spiral_calendaru🗓�spiral_notepadu🗒�spiral_shellu🐚�spoonu🥄�spongeu🧽�sport_utility_vehicleu🚙�sports_medalu🏅�spouting_whaleu🐳�squidu🦑�squinting_face_with_tongueu😝�stadiumu🏟zstar-strucku🤩�star_and_crescentu☪�
star_of_davidu✡�stationu🚉�
steaming_bowlu🍜�stethoscopeu🩺�stop_buttonu⏹�	stop_signu🛑�	stopwatchu⏱�straight_ruleru📏�
strawberryu🍓�studio_microphoneu🎙�stuffed_flatbreadu🥙�sunu☀�sun_behind_cloudu⛅�sun_behind_large_cloudu🌥�sun_behind_rain_cloudu🌦�sun_behind_small_cloudu🌤�
sun_with_faceu🌞�	sunfloweru🌻�
sunglasses�sunriseu🌅�sunrise_over_mountainsu🌄�sunsetu🌇�	superherou🦸�supervillainu🦹�sushiu🍣�suspension_railwayu🚟�swanu🦢�sweat_dropletsu💦�	synagogueu🕍�syringeu💉zt-shirtu👕�tacou🌮�takeout_boxu🥡�
tanabata_treeu🎋�	tangerineu🍊�taxiu🚕�teacup_without_handleu🍵ztear-off_calendar�
teddy_bearu🧸�	telephoneu☎�telephone_receiveru📞�	telescopeu🔭�
televisionu📺z
ten-thirtyu🕥u
ten_o’clocku🕙�tennisu🎾�tentu⛺�	test_tubeu🧪�thermometeru🌡�
thinking_faceu🤔�thought_balloonu💭�threadu🧵zthree-thirtyu🕞uthree_o’clocku🕒�thumbs_downu👎�thumbs_down_dark_skin_toneu👎🏿�thumbs_down_light_skin_toneu👎🏻z!thumbs_down_medium-dark_skin_toneu👎🏾z"thumbs_down_medium-light_skin_toneu👎🏼�thumbs_down_medium_skin_toneu👎🏽�	thumbs_upu👍�thumbs_up_dark_skin_toneu👍🏿�thumbs_up_light_skin_toneu👍🏻zthumbs_up_medium-dark_skin_toneu👍🏾z thumbs_up_medium-light_skin_toneu👍🏼�thumbs_up_medium_skin_toneu👍🏽�ticketu🎫�tigeru🐯�
tiger_face�timer_clocku⏲�
tired_faceu😫�toolboxu🧰�toiletu🚽�tomatou🍅�tongueu👅�toothu🦷�top_hatu🎩�tornadou🌪�	trackballu🖲�tractoru🚜�
trade_marku™�trainu🚋�tramu🚊�tram_car�triangular_flagu🚩�triangular_ruleru📐�trident_emblemu🔱�
trolleybusu🚎�trophyu🏆�tropical_drinku🍹�
tropical_fishu🐠�trumpetu🎺�tulipu🌷�
tumbler_glassu🥃�turtleu🐢z
twelve-thirtyu🕧utwelve_o’clocku🕛ztwo-hump_camelz
two-thirtyu🕝�
two_heartsu💕�two_men_holding_handsu👬u
two_o’clocku🕑�two_women_holding_handsu👭�umbrellau☂�umbrella_on_groundu⛱�umbrella_with_rain_dropsu☔�
unamused_faceu😒�unicorn_faceu🦄�unlockedu🔓z
up-down_arrowu↕z
up-left_arrowu↖zup-right_arrowu↗�up_arrowu⬆zupside-down_faceu🙃�upwards_buttonu🔼�vampireu🧛�vampire_dark_skin_toneu🧛🏿�vampire_light_skin_toneu🧛🏻zvampire_medium-dark_skin_toneu🧛🏾zvampire_medium-light_skin_toneu🧛🏼�vampire_medium_skin_toneu🧛🏽�vertical_traffic_lightu🚦�vibration_modeu📳�victory_handu✌�victory_hand_dark_skin_toneu✌🏿�victory_hand_light_skin_toneu✌🏻z"victory_hand_medium-dark_skin_toneu✌🏾z#victory_hand_medium-light_skin_toneu✌🏼�victory_hand_medium_skin_toneu✌🏽�video_camerau📹�
video_gameu🎮�
videocassetteu📼�violinu🎻�volcanou🌋�
volleyballu🏐�
vulcan_saluteu🖖�vulcan_salute_dark_skin_toneu🖖🏿�vulcan_salute_light_skin_toneu🖖🏻z#vulcan_salute_medium-dark_skin_toneu🖖🏾z$vulcan_salute_medium-light_skin_toneu🖖🏼�vulcan_salute_medium_skin_toneu🖖🏽�waffleu🧇�waning_crescent_moonu🌘�waning_gibbous_moonu🌖�warningu⚠�wastebasketu🗑�watchu⌚�
water_buffalou🐃�water_closetu🚾�
water_waveu🌊�
watermelonu🍉�waving_handu👋�waving_hand_dark_skin_toneu👋🏿�waving_hand_light_skin_toneu👋🏻z!waving_hand_medium-dark_skin_toneu👋🏾z"waving_hand_medium-light_skin_toneu👋🏼�waving_hand_medium_skin_toneu👋🏽�	wavy_dashu〰�waxing_crescent_moonu🌒�waxing_gibbous_moonu🌔�weary_cat_faceu🙀�
weary_faceu😩�weddingu💒�whale�wheel_of_dharmau☸�wheelchair_symbolu♿�white_circleu⚪�white_exclamation_marku❕�
white_flagu🏳�white_floweru💮�
white_hairu🦳zwhite-haired_manu👨‍🦳zwhite-haired_womanu👩‍🦳�white_heartu🤍�white_heavy_check_marku✅�white_large_squareu⬜zwhite_medium-small_squareu◽�white_medium_squareu◻�white_medium_staru⭐�white_question_marku❔�white_small_squareu▫�white_square_buttonu🔳�
wilted_floweru🥀�
wind_chimeu🎐�	wind_faceu🌬�
wine_glassu🍷�winking_faceu😉�winking_face_with_tongueu😜�	wolf_faceu🐺�womanu👩�woman_artistu👩‍🎨�woman_artist_dark_skin_toneu👩🏿‍🎨�woman_artist_light_skin_toneu👩🏻‍🎨z"woman_artist_medium-dark_skin_toneu👩🏾‍🎨z#woman_artist_medium-light_skin_toneu👩🏼‍🎨�woman_artist_medium_skin_toneu👩🏽‍🎨�woman_astronautu👩‍🚀�woman_astronaut_dark_skin_toneu👩🏿‍🚀�woman_astronaut_light_skin_toneu👩🏻‍🚀z%woman_astronaut_medium-dark_skin_toneu👩🏾‍🚀z&woman_astronaut_medium-light_skin_toneu👩🏼‍🚀� woman_astronaut_medium_skin_toneu👩🏽‍🚀�woman_bikingu
🚴‍♀️�woman_biking_dark_skin_toneu🚴🏿‍♀️�woman_biking_light_skin_toneu🚴🏻‍♀️z"woman_biking_medium-dark_skin_toneu🚴🏾‍♀️z#woman_biking_medium-light_skin_toneu🚴🏼‍♀️�woman_biking_medium_skin_toneu🚴🏽‍♀️�woman_bouncing_ballu⛹️‍♀️�"woman_bouncing_ball_dark_skin_toneu⛹🏿‍♀️�#woman_bouncing_ball_light_skin_toneu⛹🏻‍♀️z)woman_bouncing_ball_medium-dark_skin_toneu⛹🏾‍♀️z*woman_bouncing_ball_medium-light_skin_toneu⛹🏼‍♀️�$woman_bouncing_ball_medium_skin_toneu⛹🏽‍♀️�woman_bowingu
🙇‍♀️�woman_bowing_dark_skin_toneu🙇🏿‍♀️�woman_bowing_light_skin_toneu🙇🏻‍♀️z"woman_bowing_medium-dark_skin_toneu🙇🏾‍♀️z#woman_bowing_medium-light_skin_toneu🙇🏼‍♀️�woman_bowing_medium_skin_toneu🙇🏽‍♀️�woman_cartwheelingu
🤸‍♀️�!woman_cartwheeling_dark_skin_toneu🤸🏿‍♀️�"woman_cartwheeling_light_skin_toneu🤸🏻‍♀️z(woman_cartwheeling_medium-dark_skin_toneu🤸🏾‍♀️z)woman_cartwheeling_medium-light_skin_toneu🤸🏼‍♀️�#woman_cartwheeling_medium_skin_toneu🤸🏽‍♀️�woman_climbingu
🧗‍♀️�woman_climbing_dark_skin_toneu🧗🏿‍♀️�woman_climbing_light_skin_toneu🧗🏻‍♀️z$woman_climbing_medium-dark_skin_toneu🧗🏾‍♀️z%woman_climbing_medium-light_skin_toneu🧗🏼‍♀️�woman_climbing_medium_skin_toneu🧗🏽‍♀️�woman_construction_workeru
👷‍♀️�(woman_construction_worker_dark_skin_toneu👷🏿‍♀️�)woman_construction_worker_light_skin_toneu👷🏻‍♀️z/woman_construction_worker_medium-dark_skin_toneu👷🏾‍♀️z0woman_construction_worker_medium-light_skin_toneu👷🏼‍♀️�*woman_construction_worker_medium_skin_toneu👷🏽‍♀️�
woman_cooku👩‍🍳�woman_cook_dark_skin_toneu👩🏿‍🍳�woman_cook_light_skin_toneu👩🏻‍🍳z woman_cook_medium-dark_skin_toneu👩🏾‍🍳z!woman_cook_medium-light_skin_toneu👩🏼‍🍳�woman_cook_medium_skin_toneu👩🏽‍🍳�
woman_dancingu💃�woman_dancing_dark_skin_toneu💃🏿�woman_dancing_light_skin_toneu💃🏻z#woman_dancing_medium-dark_skin_toneu💃🏾z$woman_dancing_medium-light_skin_toneu💃🏼�woman_dancing_medium_skin_toneu💃🏽�woman_dark_skin_toneu👩🏿�woman_detectiveu🕵️‍♀️�woman_detective_dark_skin_toneu🕵🏿‍♀️�woman_detective_light_skin_toneu🕵🏻‍♀️z%woman_detective_medium-dark_skin_toneu🕵🏾‍♀️z&woman_detective_medium-light_skin_toneu🕵🏼‍♀️� woman_detective_medium_skin_toneu🕵🏽‍♀️�	woman_elfu
🧝‍♀️�woman_elf_dark_skin_toneu🧝🏿‍♀️�woman_elf_light_skin_toneu🧝🏻‍♀️zwoman_elf_medium-dark_skin_toneu🧝🏾‍♀️z woman_elf_medium-light_skin_toneu🧝🏼‍♀️�woman_elf_medium_skin_toneu🧝🏽‍♀️�woman_facepalmingu
🤦‍♀️� woman_facepalming_dark_skin_toneu🤦🏿‍♀️�!woman_facepalming_light_skin_toneu🤦🏻‍♀️z'woman_facepalming_medium-dark_skin_toneu🤦🏾‍♀️z(woman_facepalming_medium-light_skin_toneu🤦🏼‍♀️�"woman_facepalming_medium_skin_toneu🤦🏽‍♀️�woman_factory_workeru👩‍🏭�#woman_factory_worker_dark_skin_toneu👩🏿‍🏭�$woman_factory_worker_light_skin_toneu👩🏻‍🏭z*woman_factory_worker_medium-dark_skin_toneu👩🏾‍🏭z+woman_factory_worker_medium-light_skin_toneu👩🏼‍🏭�%woman_factory_worker_medium_skin_toneu👩🏽‍🏭�woman_fairyu
🧚‍♀️�woman_fairy_dark_skin_toneu🧚🏿‍♀️�woman_fairy_light_skin_toneu🧚🏻‍♀️z!woman_fairy_medium-dark_skin_toneu🧚🏾‍♀️z"woman_fairy_medium-light_skin_toneu🧚🏼‍♀️�woman_fairy_medium_skin_toneu🧚🏽‍♀️�woman_farmeru👩‍🌾�woman_farmer_dark_skin_toneu👩🏿‍🌾�woman_farmer_light_skin_toneu👩🏻‍🌾z"woman_farmer_medium-dark_skin_toneu👩🏾‍🌾z#woman_farmer_medium-light_skin_toneu👩🏼‍🌾�woman_farmer_medium_skin_toneu👩🏽‍🌾�woman_firefighteru👩‍🚒� woman_firefighter_dark_skin_toneu👩🏿‍🚒�!woman_firefighter_light_skin_toneu👩🏻‍🚒z'woman_firefighter_medium-dark_skin_toneu👩🏾‍🚒z(woman_firefighter_medium-light_skin_toneu👩🏼‍🚒�"woman_firefighter_medium_skin_toneu👩🏽‍🚒�woman_frowningu
🙍‍♀️�woman_frowning_dark_skin_toneu🙍🏿‍♀️�woman_frowning_light_skin_toneu🙍🏻‍♀️z$woman_frowning_medium-dark_skin_toneu🙍🏾‍♀️z%woman_frowning_medium-light_skin_toneu🙍🏼‍♀️�woman_frowning_medium_skin_toneu🙍🏽‍♀️�woman_genieu
🧞‍♀️�woman_gesturing_nou
🙅‍♀️�!woman_gesturing_no_dark_skin_toneu🙅🏿‍♀️�"woman_gesturing_no_light_skin_toneu🙅🏻‍♀️z(woman_gesturing_no_medium-dark_skin_toneu🙅🏾‍♀️z)woman_gesturing_no_medium-light_skin_toneu🙅🏼‍♀️�#woman_gesturing_no_medium_skin_toneu🙅🏽‍♀️�woman_gesturing_oku
🙆‍♀️�!woman_gesturing_ok_dark_skin_toneu🙆🏿‍♀️�"woman_gesturing_ok_light_skin_toneu🙆🏻‍♀️z(woman_gesturing_ok_medium-dark_skin_toneu🙆🏾‍♀️z)woman_gesturing_ok_medium-light_skin_toneu🙆🏼‍♀️�#woman_gesturing_ok_medium_skin_toneu🙆🏽‍♀️�woman_getting_haircutu
💇‍♀️�$woman_getting_haircut_dark_skin_toneu💇🏿‍♀️�%woman_getting_haircut_light_skin_toneu💇🏻‍♀️z+woman_getting_haircut_medium-dark_skin_toneu💇🏾‍♀️z,woman_getting_haircut_medium-light_skin_toneu💇🏼‍♀️�&woman_getting_haircut_medium_skin_toneu💇🏽‍♀️�woman_getting_massageu
💆‍♀️�$woman_getting_massage_dark_skin_toneu💆🏿‍♀️�%woman_getting_massage_light_skin_toneu💆🏻‍♀️z+woman_getting_massage_medium-dark_skin_toneu💆🏾‍♀️z,woman_getting_massage_medium-light_skin_toneu💆🏼‍♀️�&woman_getting_massage_medium_skin_toneu💆🏽‍♀️�
woman_golfingu🏌️‍♀️�woman_golfing_dark_skin_toneu🏌🏿‍♀️�woman_golfing_light_skin_toneu🏌🏻‍♀️z#woman_golfing_medium-dark_skin_toneu🏌🏾‍♀️z$woman_golfing_medium-light_skin_toneu🏌🏼‍♀️�woman_golfing_medium_skin_toneu🏌🏽‍♀️�woman_guardu
💂‍♀️�woman_guard_dark_skin_toneu💂🏿‍♀️�woman_guard_light_skin_toneu💂🏻‍♀️z!woman_guard_medium-dark_skin_toneu💂🏾‍♀️z"woman_guard_medium-light_skin_toneu💂🏼‍♀️�woman_guard_medium_skin_toneu💂🏽‍♀️�woman_health_workeru
👩‍⚕️�"woman_health_worker_dark_skin_toneu👩🏿‍⚕️�#woman_health_worker_light_skin_toneu👩🏻‍⚕️z)woman_health_worker_medium-dark_skin_toneu👩🏾‍⚕️z*woman_health_worker_medium-light_skin_toneu👩🏼‍⚕️�$woman_health_worker_medium_skin_toneu👩🏽‍⚕️�woman_in_lotus_positionu
🧘‍♀️�&woman_in_lotus_position_dark_skin_toneu🧘🏿‍♀️�'woman_in_lotus_position_light_skin_toneu🧘🏻‍♀️z-woman_in_lotus_position_medium-dark_skin_toneu🧘🏾‍♀️z.woman_in_lotus_position_medium-light_skin_toneu🧘🏼‍♀️�(woman_in_lotus_position_medium_skin_toneu🧘🏽‍♀️�woman_in_manual_wheelchairu👩‍🦽�woman_in_motorized_wheelchairu👩‍🦼�woman_in_steamy_roomu
🧖‍♀️�#woman_in_steamy_room_dark_skin_toneu🧖🏿‍♀️�$woman_in_steamy_room_light_skin_toneu🧖🏻‍♀️z*woman_in_steamy_room_medium-dark_skin_toneu🧖🏾‍♀️z+woman_in_steamy_room_medium-light_skin_toneu🧖🏼‍♀️�%woman_in_steamy_room_medium_skin_toneu🧖🏽‍♀️�woman_judgeu
👩‍⚖️�woman_judge_dark_skin_toneu👩🏿‍⚖️�woman_judge_light_skin_toneu👩🏻‍⚖️z!woman_judge_medium-dark_skin_toneu👩🏾‍⚖️z"woman_judge_medium-light_skin_toneu👩🏼‍⚖️�woman_judge_medium_skin_toneu👩🏽‍⚖️�woman_jugglingu
🤹‍♀️�woman_juggling_dark_skin_toneu🤹🏿‍♀️�woman_juggling_light_skin_toneu🤹🏻‍♀️z$woman_juggling_medium-dark_skin_toneu🤹🏾‍♀️z%woman_juggling_medium-light_skin_toneu🤹🏼‍♀️�woman_juggling_medium_skin_toneu🤹🏽‍♀️�woman_lifting_weightsu🏋️‍♀️�$woman_lifting_weights_dark_skin_toneu🏋🏿‍♀️�%woman_lifting_weights_light_skin_toneu🏋🏻‍♀️z+woman_lifting_weights_medium-dark_skin_toneu🏋🏾‍♀️z,woman_lifting_weights_medium-light_skin_toneu🏋🏼‍♀️�&woman_lifting_weights_medium_skin_toneu🏋🏽‍♀️�woman_light_skin_toneu👩🏻�
woman_mageu
🧙‍♀️�woman_mage_dark_skin_toneu🧙🏿‍♀️�woman_mage_light_skin_toneu🧙🏻‍♀️z woman_mage_medium-dark_skin_toneu🧙🏾‍♀️z!woman_mage_medium-light_skin_toneu🧙🏼‍♀️�woman_mage_medium_skin_toneu🧙🏽‍♀️�woman_mechanicu👩‍🔧�woman_mechanic_dark_skin_toneu👩🏿‍🔧�woman_mechanic_light_skin_toneu👩🏻‍🔧z$woman_mechanic_medium-dark_skin_toneu👩🏾‍🔧z%woman_mechanic_medium-light_skin_toneu👩🏼‍🔧�woman_mechanic_medium_skin_toneu👩🏽‍🔧zwoman_medium-dark_skin_toneu👩🏾zwoman_medium-light_skin_toneu👩🏼�woman_medium_skin_toneu👩🏽�woman_mountain_bikingu
🚵‍♀️�$woman_mountain_biking_dark_skin_toneu🚵🏿‍♀️�%woman_mountain_biking_light_skin_toneu🚵🏻‍♀️z+woman_mountain_biking_medium-dark_skin_toneu🚵🏾‍♀️z,woman_mountain_biking_medium-light_skin_toneu🚵🏼‍♀️�&woman_mountain_biking_medium_skin_toneu🚵🏽‍♀️�woman_office_workeru👩‍💼�"woman_office_worker_dark_skin_toneu👩🏿‍💼�#woman_office_worker_light_skin_toneu👩🏻‍💼z)woman_office_worker_medium-dark_skin_toneu👩🏾‍💼z*woman_office_worker_medium-light_skin_toneu👩🏼‍💼�$woman_office_worker_medium_skin_toneu👩🏽‍💼�woman_pilotu
👩‍✈️�woman_pilot_dark_skin_toneu👩🏿‍✈️�woman_pilot_light_skin_toneu👩🏻‍✈️z!woman_pilot_medium-dark_skin_toneu👩🏾‍✈️z"woman_pilot_medium-light_skin_toneu👩🏼‍✈️�woman_pilot_medium_skin_toneu👩🏽‍✈️�woman_playing_handballu
🤾‍♀️�%woman_playing_handball_dark_skin_toneu🤾🏿‍♀️�&woman_playing_handball_light_skin_toneu🤾🏻‍♀️z,woman_playing_handball_medium-dark_skin_toneu🤾🏾‍♀️z-woman_playing_handball_medium-light_skin_toneu🤾🏼‍♀️�'woman_playing_handball_medium_skin_toneu🤾🏽‍♀️�woman_playing_water_polou
🤽‍♀️�'woman_playing_water_polo_dark_skin_toneu🤽🏿‍♀️�(woman_playing_water_polo_light_skin_toneu🤽🏻‍♀️z.woman_playing_water_polo_medium-dark_skin_toneu🤽🏾‍♀️z/woman_playing_water_polo_medium-light_skin_toneu🤽🏼‍♀️�)woman_playing_water_polo_medium_skin_toneu🤽🏽‍♀️�woman_police_officeru
👮‍♀️�#woman_police_officer_dark_skin_toneu👮🏿‍♀️�$woman_police_officer_light_skin_toneu👮🏻‍♀️z*woman_police_officer_medium-dark_skin_toneu👮🏾‍♀️z+woman_police_officer_medium-light_skin_toneu👮🏼‍♀️�%woman_police_officer_medium_skin_toneu👮🏽‍♀️�
woman_poutingu
🙎‍♀️�woman_pouting_dark_skin_toneu🙎🏿‍♀️�woman_pouting_light_skin_toneu🙎🏻‍♀️z#woman_pouting_medium-dark_skin_toneu🙎🏾‍♀️z$woman_pouting_medium-light_skin_toneu🙎🏼‍♀️�woman_pouting_medium_skin_toneu🙎🏽‍♀️�woman_raising_handu
🙋‍♀️�!woman_raising_hand_dark_skin_toneu🙋🏿‍♀️�"woman_raising_hand_light_skin_toneu🙋🏻‍♀️z(woman_raising_hand_medium-dark_skin_toneu🙋🏾‍♀️z)woman_raising_hand_medium-light_skin_toneu🙋🏼‍♀️�#woman_raising_hand_medium_skin_toneu🙋🏽‍♀️�woman_rowing_boatu
🚣‍♀️� woman_rowing_boat_dark_skin_toneu🚣🏿‍♀️�!woman_rowing_boat_light_skin_toneu🚣🏻‍♀️z'woman_rowing_boat_medium-dark_skin_toneu🚣🏾‍♀️z(woman_rowing_boat_medium-light_skin_toneu🚣🏼‍♀️�"woman_rowing_boat_medium_skin_toneu🚣🏽‍♀️�
woman_runningu
🏃‍♀️�woman_running_dark_skin_toneu🏃🏿‍♀️�woman_running_light_skin_toneu🏃🏻‍♀️z#woman_running_medium-dark_skin_toneu🏃🏾‍♀️z$woman_running_medium-light_skin_toneu🏃🏼‍♀️�woman_running_medium_skin_toneu🏃🏽‍♀️�woman_scientistu👩‍🔬�woman_scientist_dark_skin_toneu👩🏿‍🔬�woman_scientist_light_skin_toneu👩🏻‍🔬z%woman_scientist_medium-dark_skin_toneu👩🏾‍🔬z&woman_scientist_medium-light_skin_toneu👩🏼‍🔬� woman_scientist_medium_skin_toneu👩🏽‍🔬�woman_shruggingu
🤷‍♀️�woman_shrugging_dark_skin_toneu🤷🏿‍♀️�woman_shrugging_light_skin_toneu🤷🏻‍♀️z%woman_shrugging_medium-dark_skin_toneu🤷🏾‍♀️z&woman_shrugging_medium-light_skin_toneu🤷🏼‍♀️� woman_shrugging_medium_skin_toneu🤷🏽‍♀️�woman_singeru👩‍🎤�woman_singer_dark_skin_toneu👩🏿‍🎤�woman_singer_light_skin_toneu👩🏻‍🎤z"woman_singer_medium-dark_skin_toneu👩🏾‍🎤z#woman_singer_medium-light_skin_toneu👩🏼‍🎤�woman_singer_medium_skin_toneu👩🏽‍🎤�
woman_studentu👩‍🎓�woman_student_dark_skin_toneu👩🏿‍🎓�woman_student_light_skin_toneu👩🏻‍🎓z#woman_student_medium-dark_skin_toneu👩🏾‍🎓z$woman_student_medium-light_skin_toneu👩🏼‍🎓�woman_student_medium_skin_toneu👩🏽‍🎓�
woman_surfingu
🏄‍♀️�woman_surfing_dark_skin_toneu🏄🏿‍♀️�woman_surfing_light_skin_toneu🏄🏻‍♀️z#woman_surfing_medium-dark_skin_toneu🏄🏾‍♀️z$woman_surfing_medium-light_skin_toneu🏄🏼‍♀️�woman_surfing_medium_skin_toneu🏄🏽‍♀️�woman_swimmingu
🏊‍♀️�woman_swimming_dark_skin_toneu🏊🏿‍♀️�woman_swimming_light_skin_toneu🏊🏻‍♀️z$woman_swimming_medium-dark_skin_toneu🏊🏾‍♀️z%woman_swimming_medium-light_skin_toneu🏊🏼‍♀️�woman_swimming_medium_skin_toneu🏊🏽‍♀️�
woman_teacheru👩‍🏫�woman_teacher_dark_skin_toneu👩🏿‍🏫�woman_teacher_light_skin_toneu👩🏻‍🏫z#woman_teacher_medium-dark_skin_toneu👩🏾‍🏫z$woman_teacher_medium-light_skin_toneu👩🏼‍🏫�woman_teacher_medium_skin_toneu👩🏽‍🏫�woman_technologistu👩‍💻�!woman_technologist_dark_skin_toneu👩🏿‍💻�"woman_technologist_light_skin_toneu👩🏻‍💻z(woman_technologist_medium-dark_skin_toneu👩🏾‍💻z)woman_technologist_medium-light_skin_toneu👩🏼‍💻�#woman_technologist_medium_skin_toneu👩🏽‍💻�woman_tipping_handu
💁‍♀️�!woman_tipping_hand_dark_skin_toneu💁🏿‍♀️�"woman_tipping_hand_light_skin_toneu💁🏻‍♀️z(woman_tipping_hand_medium-dark_skin_toneu💁🏾‍♀️z)woman_tipping_hand_medium-light_skin_toneu💁🏼‍♀️�#woman_tipping_hand_medium_skin_toneu💁🏽‍♀️�
woman_vampireu
🧛‍♀️�woman_vampire_dark_skin_toneu🧛🏿‍♀️�woman_vampire_light_skin_toneu🧛🏻‍♀️z#woman_vampire_medium-dark_skin_toneu🧛🏾‍♀️z$woman_vampire_medium-light_skin_toneu🧛🏼‍♀️�woman_vampire_medium_skin_toneu🧛🏽‍♀️�
woman_walkingu
🚶‍♀️�woman_walking_dark_skin_toneu🚶🏿‍♀️�woman_walking_light_skin_toneu🚶🏻‍♀️z#woman_walking_medium-dark_skin_toneu🚶🏾‍♀️z$woman_walking_medium-light_skin_toneu🚶🏼‍♀️�woman_walking_medium_skin_toneu🚶🏽‍♀️�woman_wearing_turbanu
👳‍♀️�#woman_wearing_turban_dark_skin_toneu👳🏿‍♀️�$woman_wearing_turban_light_skin_toneu👳🏻‍♀️z*woman_wearing_turban_medium-dark_skin_toneu👳🏾‍♀️z+woman_wearing_turban_medium-light_skin_toneu👳🏼‍♀️�%woman_wearing_turban_medium_skin_toneu👳🏽‍♀️�woman_with_headscarfu🧕�#woman_with_headscarf_dark_skin_toneu🧕🏿�$woman_with_headscarf_light_skin_toneu🧕🏻z*woman_with_headscarf_medium-dark_skin_toneu🧕🏾z+woman_with_headscarf_medium-light_skin_toneu🧕🏼�%woman_with_headscarf_medium_skin_toneu🧕🏽�woman_with_probing_caneu👩‍🦯�woman_zombieu
🧟‍♀️uwoman’s_bootu👢uwoman’s_clothesu👚u
woman’s_hatu👒uwoman’s_sandalu👡�women_with_bunny_earsu
👯‍♀️�women_wrestlingu
🤼‍♀️uwomen’s_roomu🚺�
woozy_faceu🥴�	world_mapu🗺�worried_faceu😟�wrapped_giftu🎁�wrenchu🔧�writing_handu✍�writing_hand_dark_skin_toneu✍🏿�writing_hand_light_skin_toneu✍🏻z"writing_hand_medium-dark_skin_toneu✍🏾z#writing_hand_medium-light_skin_toneu✍🏼�writing_hand_medium_skin_toneu✍🏽�yarnu🧶�yawning_faceu🥱�
yellow_circleu🟡�yellow_heartu💛�
yellow_squareu🟨�yen_banknoteu💴zyo-you🪀�yin_yangu☯�	zany_faceu🤪�zebrau🦓zzipper-mouth_faceu🤐�zombieu🧟�zzzu💤uåland_islandsu🇦🇽�keycap_asterisku*⃣�keycap_digit_eightu8⃣�keycap_digit_fiveu5⃣�keycap_digit_fouru4⃣�keycap_digit_nineu9⃣�keycap_digit_oneu1⃣�keycap_digit_sevenu7⃣�keycap_digit_sixu6⃣�keycap_digit_threeu3⃣�keycap_digit_twou2⃣�keycap_digit_zerou0⃣�keycap_number_signu#⃣�light_skin_toneu🏻�medium_light_skin_toneu🏼�medium_skin_toneu🏽�medium_dark_skin_toneu🏾�dark_skin_toneu🏿�"regional_indicator_symbol_letter_au🇦�"regional_indicator_symbol_letter_bu🇧�"regional_indicator_symbol_letter_cu🇨�"regional_indicator_symbol_letter_du🇩�"regional_indicator_symbol_letter_eu🇪�"regional_indicator_symbol_letter_fu🇫�"regional_indicator_symbol_letter_gu🇬�"regional_indicator_symbol_letter_hu🇭�"regional_indicator_symbol_letter_iu🇮�"regional_indicator_symbol_letter_ju🇯�"regional_indicator_symbol_letter_ku🇰�"regional_indicator_symbol_letter_lu🇱�"regional_indicator_symbol_letter_mu🇲�"regional_indicator_symbol_letter_nu🇳�"regional_indicator_symbol_letter_ou🇴�"regional_indicator_symbol_letter_pu🇵�"regional_indicator_symbol_letter_qu🇶�"regional_indicator_symbol_letter_ru🇷�"regional_indicator_symbol_letter_su🇸�"regional_indicator_symbol_letter_tu🇹�"regional_indicator_symbol_letter_uu🇺�"regional_indicator_symbol_letter_vu🇻�"regional_indicator_symbol_letter_wu🇼�"regional_indicator_symbol_letter_xu🇽�"regional_indicator_symbol_letter_yu🇾�"regional_indicator_symbol_letter_zu🇿�airplane_arriving�
space_invader�football�anger�angry�	anguished�signal_strength�arrows_counterclockwise�arrow_heading_down�arrow_heading_up�art�
astonished�
athletic_shoe�atm�car�red_car�angel�back�!badminton_racquet_and_shuttlecock�dollar�euro�pound�yen�barber�bath�bear�	heartbeat�beer�no_bell�bento�bike�	bicyclist�8ball�biohazard_sign�birthday�black_circle_for_record�clubs�diamonds�arrow_double_down�hearts�rewind�6black_left__pointing_double_triangle_with_vertical_bar�arrow_backward�black_medium_small_square�question�fast_forward�7black_right__pointing_double_triangle_with_vertical_bar�
arrow_forward�7black_right__pointing_triangle_with_double_vertical_bar�arrow_right�spades�black_square_for_stop�sunny�phone�recycle�arrow_double_up�busstop�dateu📅�flags�cat2u🐈�joy_cat�	smirk_cat�chart_with_downwards_trend�chart_with_upwards_trend�chart�mega�checkered_flag�accept�ideograph_advantage�congratulations�secret�m�city_sunset�clapper�clap�beers�clock830�clock8�	clock1130�clock11�clock530�clock5�clock430�clock4�clock930�clock9�clock130�clock1�clock730�clock7�clock630�clock6�	clock1030�clock10�clock330�clock3�	clock1230�clock12�clock230�clock2�arrows_clockwise�repeat�
repeat_one�closed_lock_with_key�mailbox_closed�mailbox�cloud_with_tornado�cocktail�boom�compression�
confounded�confused�rice�cow2u🐄�cricket_bat_and_ball�x�cry�curry�dagger_knife�dancer�dark_sunglassesu🕶�dash�truck�derelict_house_building�diamond_shape_with_a_dot_inside�dart�disappointed_relieved�disappointed�
do_not_litter�dog2u🐕�flipper�loop�bangbang�double_vertical_bar�
dove_of_peace�small_red_triangle_down�arrow_down_small�
arrow_down�dromedary_camelu🐪�e__mail�corn�ear_of_rice�earth_americas�
earth_asia�earth_africa�eight_pointed_black_star�eight_spoked_asterisk�eject_symbol�bulb�%emoji_modifier_fitzpatrick_type__1__2�"emoji_modifier_fitzpatrick_type__3�"emoji_modifier_fitzpatrick_type__4�"emoji_modifier_fitzpatrick_type__5�"emoji_modifier_fitzpatrick_type__6�end�email�european_castle�european_post_officeu🏤�interrobang�expressionless�
eyeglasses�massage�yum�scream�
kissing_heart�sweat�face_with_head__bandage�triumph�mask�no_good�ok_woman�
open_mouth�
cold_sweat�stuck_out_tongue�stuck_out_tongue_closed_eyes�stuck_out_tongue_winking_eye�joy�no_mouth�santa�fax�fearful�field_hockey_stick_and_ball�first_quarter_moon_with_face�	fish_cake�fishing_pole_and_fish�	facepunch�punch�flag_for_afghanistan�flag_for_albania�flag_for_algeria�flag_for_american_samoa�flag_for_andorra�flag_for_angola�flag_for_anguilla�flag_for_antarcticazflag_for_antigua_&_barbuda�flag_for_argentina�flag_for_armenia�flag_for_aruba�flag_for_ascension_island�flag_for_australia�flag_for_austria�flag_for_azerbaijan�flag_for_bahamas�flag_for_bahrain�flag_for_bangladesh�flag_for_barbados�flag_for_belarus�flag_for_belgium�flag_for_belize�flag_for_benin�flag_for_bermuda�flag_for_bhutan�flag_for_boliviazflag_for_bosnia_&_herzegovina�flag_for_botswana�flag_for_bouvet_island�flag_for_brazil�'flag_for_british_indian_ocean_territory�flag_for_british_virgin_islands�flag_for_brunei�flag_for_bulgaria�flag_for_burkina_faso�flag_for_burundi�flag_for_cambodia�flag_for_cameroon�flag_for_canada�flag_for_canary_islands�flag_for_cape_verde�flag_for_caribbean_netherlands�flag_for_cayman_islands�!flag_for_central_african_republiczflag_for_ceuta_&_melilla�
flag_for_chad�flag_for_chile�flag_for_china�flag_for_christmas_island�flag_for_clipperton_island�flag_for_cocos__islands�flag_for_colombia�flag_for_comoros�flag_for_congo____brazzaville�flag_for_congo____kinshasa�flag_for_cook_islands�flag_for_costa_rica�flag_for_croatia�
flag_for_cubauflag_for_curaçao�flag_for_cyprus�flag_for_czech_republicuflag_for_côte_d’ivoire�flag_for_denmark�flag_for_diego_garcia�flag_for_djibouti�flag_for_dominica�flag_for_dominican_republic�flag_for_ecuador�flag_for_egypt�flag_for_el_salvador�flag_for_equatorial_guinea�flag_for_eritrea�flag_for_estonia�flag_for_ethiopia�flag_for_european_union�flag_for_falkland_islands�flag_for_faroe_islands�
flag_for_fiji�flag_for_finland�flag_for_france�flag_for_french_guiana�flag_for_french_polynesia�$flag_for_french_southern_territories�flag_for_gabon�flag_for_gambia�flag_for_georgia�flag_for_germany�flag_for_ghana�flag_for_gibraltar�flag_for_greece�flag_for_greenland�flag_for_grenada�flag_for_guadeloupe�
flag_for_guam�flag_for_guatemala�flag_for_guernsey�flag_for_guinea�flag_for_guinea__bissau�flag_for_guyana�flag_for_haitiz!flag_for_heard_&_mcdonald_islands�flag_for_honduras�flag_for_hong_kong�flag_for_hungary�flag_for_iceland�flag_for_india�flag_for_indonesia�
flag_for_iran�
flag_for_iraq�flag_for_ireland�flag_for_isle_of_man�flag_for_israel�flag_for_italy�flag_for_jamaica�flag_for_japanu🇯🇵�flag_for_jersey�flag_for_jordan�flag_for_kazakhstan�flag_for_kenya�flag_for_kiribati�flag_for_kosovo�flag_for_kuwait�flag_for_kyrgyzstan�
flag_for_laos�flag_for_latvia�flag_for_lebanon�flag_for_lesotho�flag_for_liberia�flag_for_libya�flag_for_liechtenstein�flag_for_lithuania�flag_for_luxembourg�flag_for_macau�flag_for_macedonia�flag_for_madagascar�flag_for_malawi�flag_for_malaysia�flag_for_maldives�
flag_for_mali�flag_for_malta�flag_for_marshall_islands�flag_for_martinique�flag_for_mauritania�flag_for_mauritius�flag_for_mayotte�flag_for_mexico�flag_for_micronesia�flag_for_moldova�flag_for_monaco�flag_for_mongolia�flag_for_montenegro�flag_for_montserrat�flag_for_morocco�flag_for_mozambique�flag_for_myanmar�flag_for_namibia�flag_for_nauru�flag_for_nepal�flag_for_netherlands�flag_for_new_caledonia�flag_for_new_zealand�flag_for_nicaragua�flag_for_niger�flag_for_nigeria�
flag_for_niue�flag_for_norfolk_island�flag_for_north_korea�!flag_for_northern_mariana_islands�flag_for_norway�
flag_for_oman�flag_for_pakistan�flag_for_palau� flag_for_palestinian_territories�flag_for_panama�flag_for_papua_new_guinea�flag_for_paraguay�
flag_for_peru�flag_for_philippines�flag_for_pitcairn_islands�flag_for_poland�flag_for_portugal�flag_for_puerto_rico�flag_for_qatar�flag_for_romania�flag_for_russia�flag_for_rwandauflag_for_réunion�flag_for_samoa�flag_for_san_marino�flag_for_saudi_arabia�flag_for_senegal�flag_for_serbia�flag_for_seychelles�flag_for_sierra_leone�flag_for_singapore�flag_for_sint_maarten�flag_for_slovakia�flag_for_slovenia�flag_for_solomon_islands�flag_for_somalia�flag_for_south_africaz/flag_for_south_georgia_&_south_sandwich_islands�flag_for_south_korea�flag_for_south_sudan�flag_for_spain�flag_for_sri_lankauflag_for_st._barthélemyzflag_for_st._helenazflag_for_st._kitts_&_neviszflag_for_st._luciazflag_for_st._martinzflag_for_st._pierre_&_miquelonz!flag_for_st._vincent_&_grenadines�flag_for_sudan�flag_for_surinamezflag_for_svalbard_&_jan_mayen�flag_for_swaziland�flag_for_sweden�flag_for_switzerland�flag_for_syriauflag_for_são_tomé_&_príncipe�flag_for_taiwan�flag_for_tajikistan�flag_for_tanzania�flag_for_thailand�flag_for_timor__leste�
flag_for_togo�flag_for_tokelau�flag_for_tongazflag_for_trinidad_&_tobago�flag_for_tristan_da_cunha�flag_for_tunisia�flag_for_turkeyu🇹🇷�flag_for_turkmenistanzflag_for_turks_&_caicos_islands�flag_for_tuvaluzflag_for_u.s._outlying_islandszflag_for_u.s._virgin_islands�flag_for_uganda�flag_for_ukraine�flag_for_united_arab_emirates�flag_for_united_kingdom�flag_for_united_states�flag_for_uruguay�flag_for_uzbekistan�flag_for_vanuatu�flag_for_vatican_city�flag_for_venezuela�flag_for_vietnamzflag_for_wallis_&_futuna�flag_for_western_sahara�flag_for_yemen�flag_for_zambia�flag_for_zimbabweuflag_for_åland_islands�golf�fleur__de__lis�muscle�flushed�frame_with_picture�fries�frog�
hatched_chick�frowning�fuelpump�full_moon_with_face�gem�star2�golfer�mortar_board�	grimacing�	smile_cat�grinning�grin�
heartpulse�	guardsman�haircut�hamster�raising_hand�
headphones�hear_no_evil�cupid�
gift_heart�heart�exclamation�heavy_exclamation_mark�%heavy_heart_exclamation_mark_ornament�o�helm_symbolu⎈�helmet_with_white_cross�	high_heel�bullettrain_side�bullettrain_front�high_brightness�zap�hocho�knife�bee�
traffic_light�	racehorseu🐎�coffee�
hotsprings�	hourglass�hourglass_flowing_sand�house_buildings�100�hushed�ice_hockey_stick_and_puck�imp�information_desk_person�information_source�capital_abcd�abc�abcd�1234�symbols�izakaya_lantern�lantern�jack_o_lantern�dolls�japanese_goblin�
japanese_ogre�beginner�zero�one�ten�two�three�four�five�six�seven�eight�nine�
couplekissu💏�kissing_cat�kissing�kissing_closed_eyes�kissing_smiling_eyes�beetle�large_blue_circle�last_quarter_moon_with_face�leaves�mag�left_right_arrow�leftwards_arrow_with_hook�
arrow_left�lock�lock_with_ink_pen�sob�low_brightness�lower_left_ballpoint_pen�lower_left_crayon�lower_left_fountain_pen�lower_left_paintbrush�mahjong�couple�man_in_business_suit_levitating�man_with_gua_pi_mao�man_with_turban�	mans_shoe�shoe�menorah_with_nine_branches�mens�minidisc�iphone�calling�money__mouth_face�moneybag�
rice_scene�mountain_bicyclist�mouse2u🐁�lips�moyai�notes�	nail_care�ab�negative_squared_cross_mark�a�b�o2�parking�new_moon_with_face�
no_entry_sign�underage�non__potable_water�arrow_upper_right�arrow_upper_left�office�	older_man�older_woman�	om_symbol�on�book�unlock�mailbox_with_no_mail�mailbox_with_mail�cd�tada�feet�walking�pencil2u✏�pensive�	persevere�bow�raised_hands�person_with_ball�person_with_blond_hair�pray�person_with_pouting_face�computer�pig2u🐖�hankey�poop�shit�bamboo�gun�black_joker�rotating_light�cop�stew�pouch�pouting_cat�rage�put_litter_in_its_place�rabbit2u🐇�racing_motorcycle�radioactive_sign�fist�hand� raised_hand_with_fingers_splayed�5raised_hand_with_part_between_middle_and_ring_fingers�blue_car�apple�relieved�)reversed_hand_with_middle_finger_extended�	mag_right�arrow_right_hook�sweet_potato�robot�rolled__up_newspaper�rowboat�runner�running�running_shirt_with_sash�boat�scales�school_satchel�scorpius�see_no_evil�sheep�stars�cake�six_pointed_star�ski�sleeping_accommodation�sleeping�sleepy�
sleuth_or_spy�heart_eyes_cat�
smiley_cat�innocent�
heart_eyes�smiling_imp�smiley�sweat_smile�smile�laughing�	satisfied�blush�smirk�smoking�snow_capped_mountain�soccer�icecream�soon�arrow_lower_right�arrow_lower_left�
speak_no_evil�speaker�mute�sound�
loud_sound�speaking_head_in_silhouette�spiral_calendar_pad�spiral_note_pad�shell�sweat_drops�u5272�u5408�u55b6�u6307�u6708�u6709�u6e80�u7121�u7533�u7981�u7a7a�cl�cool�free�id�koko�sa�new�ng�ok�sos�up�vs�steam_locomotive�ramen�partly_sunny�city_sunrise�surfer�swimmer�shirt�tshirt�table_tennis_paddle_and_ball�tea�tv�three_button_mousez+1�thumbsup�__1z-1�
thumbsdown�thunder_cloud_and_rain�tiger2u🐅�tophat�top�tm�train2u🚆�triangular_flag_on_post�trident�twisted_rightwards_arrows�unamused�small_red_triangle�arrow_up_small�
arrow_up_down�upside__down_face�arrow_up�v�vhs�wc�ocean�waving_black_flag�wave�waving_white_flag�moon�
scream_cat�weary�
weight_lifter�whale2u🐋�
wheelchair�
point_down�grey_exclamation�white_frowning_face�white_check_mark�
point_left�white_medium_small_square�star�
grey_question�point_right�relaxed�white_sun_behind_cloud� white_sun_behind_cloud_with_rain�white_sun_with_small_cloud�
point_up_2�point_up�wind_blowing_face�wink�wolf�dancers�boot�womans_clothes�
womans_hat�sandal�womens�worried�gift�zipper__mouth_face�regional_indicator_a�regional_indicator_b�regional_indicator_c�regional_indicator_d�regional_indicator_e�regional_indicator_f�regional_indicator_g�regional_indicator_h�regional_indicator_i�regional_indicator_j�regional_indicator_k�regional_indicator_l�regional_indicator_m�regional_indicator_n�regional_indicator_o�regional_indicator_p�regional_indicator_q�regional_indicator_r�regional_indicator_s�regional_indicator_t�regional_indicator_u�regional_indicator_v)�regional_indicator_w�regional_indicator_x�regional_indicator_y�regional_indicator_zN)�EMOJI����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_codes.py�<module>r�s
���Y8	��v�Y8	��v�Y8	��v�Y8	��f�	Y8	�
��Y8	��V�
Y8	��:�Y8	��z�Y8	��z�Y8	��j�Y8	��z�Y8	�
�j�Y8	��
�Y8	��*�Y8	���Y8	� ��!Y8	�"��#Y8	�$�U�%Y8	�&�z�'Y8	�(�Z�)Y8	�*�
�+Y8	�,��-Y8	�.�z�/Y8	�0�*�1Y8	�2�&�3Y8	�4�V�5Y8	�6�z�7Y8	�8�z�9Y8	�:�*�;Y8	�<�
�=Y8	�>�z�?Y8	�@�z�AY8	�B
�j�CY8	�D�Z�EY8	�F�z�GY8	�H
�j�IY8	�J�z�KY8	�L�J�MY8	�N�
�OY8	�P�Z�QY8	�R
�j�SY8	�T%�j�UY8	�V�j�WY8	�X
�j�YY8	�Z�
�[Y8	�\�J�]Y8	�^�z�_Y8	�`��aY8	�b�6�cY8	�d�
�eY8	�f�
�gY8	�h
�j�iY8	�j�j�kY8	�l
�e�mY8	�n�*�oY8	�p��qY8	�r�Z�sY8	�t�j�uY8	�v�
�wY8	�x�z�yY8	�z�J�{Y8	�|�Z�}Y8	�~�Z�Y8	�@�
�AY8	�B�f�CY8	�D��EY8	�F�z�GY8	�H�
�IY8	�J�z�KY8	�L�:�MY8	�N�
�OY8	�P�J�QY8	�R�*�SY8	�T�z�UY8	�V�J�WY8	�X�
�YY8	�Z
�j�[Y8	�\�z�]Y8	�^�
�_Y8	�`�z�aY8	�b�J�cY8	�d�
�eY8	�f�
�gY8	�h�*�iY8	�j��kY8	�l�z�mY8	�n�Z�oY8	�p�:�qY8	�r�Q�sY8	�t��uY8	�v�z�wY8	�x�z�yY8	�z�
�{Y8	�|�j�}Y8	�~�6�Y8	�@�
�AY8	�B�Z�CY8	�D�J�EY8	�F�z�GY8	�H
�j�IY8	�J�Z�KY8	�L�
�MY8	�N"�:�OY8	�P�Z�QY8	�R
�j�SY8	�T
�e�UY8	�V�z�WY8	�X�z�YY8	�Z�Z�[Y8	�\��]Y8	�^
�j�_Y8	�`��aY8	�b�z�cY8	�d�*�eY8	�f�J�gY8	�h��iY8	�j�
�kY8	�l
�j�mY8	�n�Z�oY8	�p
�j�qY8	�r�Z�sY8	�t�
�uY8	�v�
�wY8	�x�:�yY8	�z�z�{Y8	�|��}Y8	�~�z�Y8	�@�Z�AY8	�B��CY8	�D�J�EY8	�F�J�GY8	�H�z�IY8	�J�:�KY8	�L
�j�MY8	�N�Z�OY8	�P�z�QY8	�R�V�SY8	�T!�&�UY8	�V"�6�WY8	�X�v�YY8	�Z�v�[Y8	�\&�u�]Y8	�^��_Y8	�`�f�aY8	�b%�f�cY8	�d�F�eY8	�f%�f�gY8	�h!�&�iY8	�j)�&�kY8	�l(��mY8	�n$�V�oY8	�p�F�qY8	�r!�&�sY8	�t��uY8	�v�e�wY8	�x%�f�yY8	�z#�F�{Y8	�|�v�}Y8	�~
�j�Y8	�@
�j�AY8	�B�*�CY8	�D�Z�EY8	�F�
�GY8	�H
�j�IY8	�J
�j�KY8	�L�*�MY8	�N�J�OY8	�P
�j�QY8	�R�z�SY8	�T
�5�UY8	�V�z�WY8	�X�z�YY8	�Z�U�[Y8	�\�Z�]Y8	�^�Z�_Y8	�`��aY8	�b�*�cY8	�d�z�eY8	�f��gY8	�h�*�iY8	�j
�j�kY8	�l�
�mY8	�n�
�oY8	�p�J�qY8	�r�Z�sY8	�t�
�uY8	�v�*�wY8	�x�*�yY8	�z��{Y8	�|�z�}Y8	�~
�j�Y8	�@�*�AY8	�B�z�CY8	�D
�j�EY8	�F�
�GY8	�H�*�IY8	�J�*�KY8	�L�z�MY8	�N�*�OY8	�P�&�QY8	�R ��SY8	�T!�*�UY8	�V'�
�WY8	�X(��YY8	�Z"�:�[Y8	�\�z�]Y8	�^�&�_Y8	�`��aY8	�b�z�cY8	�d�Z�eY8	�f�Z�gY8	�h�:�iY8	�j�Z�kY8	�l�:�mY8	�n��oY8	�p�Z�qY8	�r�z�sY8	�t�J�uY8	�v�j�wY8	�x�:�yY8	�z�
�{Y8	�|
�j�}Y8	�~��Y8	�@�v�AY8	�B�j�CY8	�D�z�EY8	�F$�Z�GY8	�H%�j�IY8	�J�
�KY8	�L��MY8	�N�V�OY8	�P�J�QY8	�R��SY8	�T��UY8	�V�
�WY8	�X�Z�YY8	�Z�z�[Y8	�\
�j�]Y8	�^�
�_Y8	�`�
�aY8	�b�J�cY8	�d�:�eY8	�f
�e�gY8	�h�
�iY8	�j
�j�kY8	�l�
�mY8	�n�:�oY8	�p�Z�qY8	�r�z�sY8	�t
�j�uY8	�v
�j�wY8	�x�
�yY8	�z�&�{Y8	�|�&�}Y8	�~�5�Y8	�@�Z�AY8	�B�*�CY8	�D�6�EY8	�F!�*�GY8	�H"�:�IY8	�J(��KY8	�L)�*�MY8	�N#�J�OY8	�P�J�QY8	�R�u�SY8	�T�R�UY8	�V�z�WY8	�X
�j�YY8	�Z�*�[Y8	�\�J�]Y8	�^��_Y8	�`�J�aY8	�b�
�cY8	�d�
�eY8	�f�z�gY8	�h�z�iY8	�j�J�kY8	�l-�j�mY8	�n�:�oY8	�p�:�qY8	�r�Z�sY8	�t��uY8	�v�z�wY8	�x�*�yY8	�z��{Y8	�|��}Y8	�~�*�Y8	�@	�Z�A	Y8	�B	�
�C	Y8	�D	��E	Y8	�F	�Z�G	Y8	�H	�
�I	Y8	�J	�J�K	Y8	�L	��M	Y8	�N	
�j�O	Y8	�P	�:�Q	Y8	�R	�Z�S	Y8	�T	�j�U	Y8	�V	�V�W	Y8	�X	��Y	Y8	�Z	
�j�[	Y8	�\	�*�]	Y8	�^	�
�_	Y8	�`	
�e�a	Y8	�b	�
�c	Y8	�d	�:�e	Y8	�f	�J�g	Y8	�h	�z�i	Y8	�j	�6�k	Y8	�l	�Z�m	Y8	�n	��o	Y8	�p	�
�q	Y8	�r	�z�s	Y8	�t	
�f�u	Y8	�v	�J�w	Y8	�x	�j�y	Y8	�z	
�j�{	Y8	�|	�Z�}	Y8	�~	�:�	Y8	�@
�&�A
Y8	�B

�j�C
Y8	�D
�z�E
Y8	�F
�J�G
Y8	�H
�j�I
Y8	�J
�j�K
Y8	�L
�Z�M
Y8	�N
�z�O
Y8	�P
�*�Q
Y8	�R
��S
Y8	�T
�z�U
Y8	�V
�J�W
Y8	�X
��Y
Y8	�Z
�z�[
Y8	�\
�U�]
Y8	�^
�
O�_
Y8	�`
�z�a
Y8	�b
�j�c
Y8	�d
�Z�e
Y8	�f

�j�g
Y8	�h
�
�i
Y8	�j

�f�k
Y8	�l
��m
Y8	�n
��o
Y8	�p
�V�q
Y8	�r
�J�s
Y8	�t
�Z�u
Y8	�v
"�:�w
Y8	�x
#�J�y
Y8	�z
�j�{
Y8	�|
�f�}
Y8	�~
��
Y8	�@��AY8	�B�&�CY8	�D�5�EY8	�F�u�GY8	�H�V�IY8	�J�V�KY8	�L��MY8	�N��OY8	�P�v�QY8	�R
�e�SY8	�T�F�UY8	�V�&�WY8	�X�V�YY8	�Z�f�[Y8	�\
�6�]Y8	�^�F�_Y8	�`�v�aY8	�b��cY8	�d�f�eY8	�f�v�gY8	�h�5�iY8	�j�V�kY8	�l�&�mY8	�n�v�oY8	�p
�6�qY8	�r�F�sY8	�t�&�uY8	�v ��wY8	�x!�*�yY8	�z'�
�{Y8	�|(��}Y8	�~"�:�Y8	�@�6�AY8	�B�&�CY8	�D�:�EY8	�F�J�GY8	�H!�*�IY8	�J"�:�KY8	�L�Z�MY8	�N�6�OY8	�P#�F�QY8	�R2�:�SY8	�T3�J�UY8	�V9�*�WY8	�X:�:�YY8	�Z4�Z�[Y8	�\#�F�]Y8	�^2�:�_Y8	�`3�J�aY8	�b9�*�cY8	�d:�:�eY8	�f4�Z�gY8	�h$�V�iY8	�j3�J�kY8	�l4�Z�mY8	�n:�:�oY8	�p;�J�qY8	�r5�j�sY8	�t!�&�uY8	�v0��wY8	�x1�*�yY8	�z7�
�{Y8	�|8��}Y8	�~2�:�Y8	�@
�V�A
Y8	�B

�f�C
Y8	�D
��E
Y8	�F
�V�G
Y8	�H
�V�I
Y8	�J
�f�K
Y8	�L
�U�M
Y8	�N
�F�O
Y8	�P
� �Q
Y8	�R
�"�S
Y8	�T
�F�U
Y8	�V
�v�W
Y8	�X
�f�Y
Y8	�Z
�U�[
Y8	�\

�f�]
Y8	�^
�V�_
Y8	�`
�F�a
Y8	�b
��c
Y8	�d
�6�e
Y8	�f
��g
Y8	�h

�f�i
Y8	�j
�&�k
Y8	�l

�6�m
Y8	�n
�v�o
Y8	�p
�v�q
Y8	�r
�6�s
Y8	�t
%�f�u
Y8	�v
��w
Y8	�x
�f�y
Y8	�z
$�Z�{
Y8	�|
%�j�}
Y8	�~
+�J�
Y8	�@,�Z�AY8	�B&�z�CY8	�D�V�EY8	�F
�6�GY8	�H��IY8	�J�F�KY8	�L�v�MY8	�N�F�OY8	�P��QY8	�R�F�SY8	�T�v�UY8	�V
�f�WY8	�X�&�YY8	�Z��[Y8	�\�F�]Y8	�^�V�_Y8	�`�E�aY8	�b�&�cY8	�d�6�eY8	�f�%�gY8	�h ��iY8	�j�5�kY8	�l��mY8	�n�%�oY8	�p�6�qY8	�r�*�sY8	�t&�'=�uY8	�v'�(>�wY8	�x-�.D�yY8	�z.�/E�{Y8	�|(�)?�}Y8	�~�6�Y8	�@)�*�AY8	�B*�:�CY8	�D0��EY8	�F1�*�GY8	�H+�J�IY8	�J�,�KY8	�L(�)?�MY8	�N)�*@�OY8	�P/�0F�QY8	�R0�1G�SY8	�T*�+A�UY8	�V�v�WY8	�X��YY8	�Z��[Y8	�\�6�]Y8	�^�&�_Y8	�`�6�aY8	�b�F�cY8	�d�F�eY8	�f�F�gY8	�h��iY8	�j�V�kY8	�l�V�mY8	�n��oY8	�p�v�qY8	�r�V�sY8	�t�v�uY8	�v�v�wY8	�x�F�yY8	�z
�6�{Y8	�|�*�}Y8	�~�:�Y8	�@ ��AY8	�B!�*�CY8	�D�J�EY8	�F�V�GY8	�H�V�IY8	�J�f�KY8	�L$�Z�MY8	�N%�j�OY8	�P+�J�QY8	�R,�Z�SY8	�T&�z�UY8	�V�V�WY8	�X�v�YY8	�Z%�j�[Y8	�\&�z�]Y8	�^,�Z�_Y8	�`-�j�aY8	�b'�
�cY8	�d�v�eY8	�f��gY8	�h
�f�iY8	�j�V�kY8	�l��mY8	�n�F�oY8	�p�V�qY8	�r�F�sY8	�t�6�uY8	�v�F�wY8	�x
�6�yY8	�z�V�{Y8	�|�F�}Y8	�~�v�Y8	�@
�6�AY8	�B��CY8	�D�&�EY8	�F�6�GY8	�H
�f�IY8	�J��KY8	�L
�f�MY8	�N��OY8	�P�F�QY8	�R"�:�SY8	�T#�J�UY8	�V)�*�WY8	�X*�:�YY8	�Z$�Z�[Y8	�\�V�]Y8	�^
�f�_Y8	�`��aY8	�b�v�cY8	�d
�f�eY8	�f�V�gY8	�h�6�iY8	�j�V�kY8	�l�V�mY8	�n�&�oY8	�p�6�qY8	�r�f�sY8	�t�V�uY8	�v
�f�wY8	�x
�f�yY8	�z
�6�{Y8	�|��}Y8	�~!�&�Y8	�@�v�AY8	�B
�e�CY8	�D�V�EY8	�F��GY8	�H��IY8	�J ��KY8	�L�F�MY8	�N�f�OY8	�P��QY8	�R�f�SY8	�T�%�UY8	�V��WY8	�X�v�YY8	�Z�V�[Y8	�\�J�]Y8	�^�Z�_Y8	�`"�:�aY8	�b#�J�cY8	�d�j�eY8	�f��gY8	�h��iY8	�j�V�kY8	�l�&�mY8	�n
�e�oY8	�p��qY8	�r
�f�sY8	�t��uY8	�v�6�wY8	�x��yY8	�z��{Y8	�|�V�}Y8	�~�V�Y8	�@�f�AY8	�B$�Z�CY8	�D%�j�EY8	�F+�J�GY8	�H,�Z�IY8	�J&�z�KY8	�L�&�MY8	�N�&�OY8	�P��QY8	�R��SY8	�T ��UY8	�V�6�WY8	�X'��YY8	�Z&�v�[Y8	�\�v�]Y8	�^�U�_Y8	�`�F�aY8	�b$�U�cY8	�d�v�eY8	�f�v�gY8	�h�&�iY8	�j��kY8	�l�&�mY8	�n�F�oY8	�p�f�qY8	�r�v�sY8	�t
�e�uY8	�v��wY8	�x��yY8	�z�U�{Y8	�|�v�}Y8	�~�V�Y8	�@�f�AY8	�B�V�CY8	�D�v�EY8	�F�V�GY8	�H�F�IY8	�J�6�KY8	�L)�*�MY8	�N*�:�OY8	�P0��QY8	�R1�*�SY8	�T+�J�UY8	�V�V�WY8	�X��YY8	�Z�6�[Y8	�\
�f�]Y8	�^�v�_Y8	�`��aY8	�b�f�cY8	�d%�f�eY8	�f��gY8	�h �!=�iY8	�j"�#?�kY8	�l$�%A�mY8	�n
�6�oY8	�p��qY8	�r�v�sY8	�t�F�uY8	�v
�f�wY8	�x�6�yY8	�z�V�{Y8	�|�v�}Y8	�~�F�Y8	�@��AY8	�B��CY8	�D�%�EY8	�F��GY8	�H�v�IY8	�J%�j�KY8	�L&�z�MY8	�N,�Z�OY8	�P-�j�QY8	�R'�
�SY8	�T�V�UY8	�V�e�WY8	�X�V�YY8	�Z�v�[Y8	�\�6�]Y8	�^�F�_Y8	�`��aY8	�b�v�cY8	�d�f�eY8	�f�V�gY8	�h�&�iY8	�j�(�kY8	�l�*�mY8	�n�%�oY8	�p��qY8	�r�&�sY8	�t�v�uY8	�v�v�wY8	�x�6�yY8	�z�v�{Y8	�|
�f�}Y8	�~�V�Y8	�@�F�AY8	�B�6�CY8	�D�f�EY8	�F�F�GY8	�H�f�IY8	�J��KY8	�L�f�MY8	�N
�f�OY8	�P�V�QY8	�R��SY8	�T��UY8	�V�
�WY8	�X ��YY8	�Z&�z�[Y8	�\'�
�]Y8	�^!�*�_Y8	�`�E�aY8	�b�&�cY8	�d�&�eY8	�f�&�gY8	�h��iY8	�j�6�kY8	�l��mY8	�n�V�oY8	�p�&�qY8	�r
�6�sY8	�t
�6�uY8	�v��wY8	�x�v�yY8	�z�v�{Y8	�|�F�}Y8	�~�v�Y8	�@��AY8	�B�u�CY8	�D��EY8	�F�F�GY8	�H�u�IY8	�J��KY8	�L�%�MY8	�N��OY8	�P��QY8	�R
�f�SY8	�T�6�UY8	�V�V�WY8	�X�V�YY8	�Z�V�[Y8	�\�v�]Y8	�^�F�_Y8	�`�F�aY8	�b��cY8	�d
�6�eY8	�f
�f�gY8	�h�V�iY8	�j
�6�kY8	�l�*�mY8	�n�:�oY8	�p ��qY8	�r!�*�sY8	�t�J�uY8	�v�6�wY8	�x�F�yY8	�z
�6�{Y8	�|��}Y8	�~�%�Y8	�@�U�AY8	�B�F�CY8	�D�v�EY8	�F�E�GY8	�H�V�IY8	�J��KY8	�L�V�MY8	�N��OY8	�P
�6�QY8	�R�*�SY8	�T�:�UY8	�V ��WY8	�X!�*�YY8	�Z�J�[Y8	�\��]Y8	�^�6�_Y8	�`�V�aY8	�b�f�cY8	�d
�6�eY8	�f��gY8	�h ��iY8	�j�f�kY8	�l�6�mY8	�n
�6�oY8	�p�2�qY8	�r�F�sY8	�t�6�uY8	�v�&�wY8	�x�f�yY8	�z�V�{Y8	�| ��}Y8	�~�f�Y8	�@�f�AY8	�B��CY8	�D�F�EY8	�F��GY8	�H�f�IY8	�J ��KY8	�L!�&�MY8	�N�f�OY8	�P�V�QY8	�R��SY8	�T�&�UY8	�V�v�WY8	�X�V�YY8	�Z�J�[Y8	�\�Z�]Y8	�^"�:�_Y8	�`#�J�aY8	�b�j�cY8	�d�v�eY8	�f�6�gY8	�h
�f�iY8	�j�&�kY8	�l�4�mY8	�n�'�oY8	�p�5�qY8	�r�6�sY8	�t�4�uY8	�v�B�wY8	�x�5�yY8	�z�C�{Y8	�|� D�}Y8	�~�6�Y8	�@� D�AY8	�B�7�CY8	�D �!E�EY8	�F!�"F�GY8	�H�(�IY8	�J�6�KY8	�L�)�MY8	�N�7�OY8	�P�8�QY8	�R�8�SY8	�T!�"F�UY8	�V�9�WY8	�X"�#G�YY8	�Z#�$H�[Y8	�\�5�]Y8	�^��_Y8	�`�5�aY8	�b�e�cY8	�d�6�eY8	�f�F�gY8	�h�5�iY8	�j�F�kY8	�l�U�mY8	�n�F�oY8	�p�F�qY8	�r�6�sY8	�t�6�uY8	�v�f�wY8	�x�F�yY8	�z��{Y8	�|�6�}Y8	�~�6�Y8	�@��AY8	�B�&�CY8	�D�v�EY8	�F�F�GY8	�H�F�IY8	�J�F�KY8	�L�6�MY8	�N�f�OY8	�P�E�QY8	�R��SY8	�T�&�UY8	�V��WY8	�X�E�YY8	�Z�V�[Y8	�\#�J�]Y8	�^$�Z�_Y8	�`*�:�aY8	�b+�J�cY8	�d%�j�eY8	�f�6�gY8	�h�F�iY8	�j�F�kY8	�l�6�mY8	�n�V�oY8	�p
�6�qY8	�r�V�sY8	�t�F�uY8	�v"�:�wY8	�x#�J�yY8	�z)�*�{Y8	�|*�:�}Y8	�~$�Z�Y8	�@�F�AY8	�B�&�CY8	�D�f�EY8	�F ��GY8	�H�f�IY8	�J��KY8	�L�F�MY8	�N�6�OY8	�P��QY8	�R�f�SY8	�T��UY8	�V�f�WY8	�X�F�YY8	�Z�F�[Y8	�\��]Y8	�^�v�_Y8	�`�U�aY8	�b$�V�cY8	�d��eY8	�f��gY8	�h�f�iY8	�j�5�kY8	�l��mY8	�n
�f�oY8	�p�E�qY8	�r��sY8	�t�V�uY8	�v�V�wY8	�x�v�yY8	�z�F�{Y8	�|�:�}Y8	�~�J�Y8	�@!�*�AY8	�B"�:�CY8	�D�Z�EY8	�F�V�GY8	�H�v�IY8	�J�f�KY8	�L#�F�MY8	�N"�6�OY8	�P�F�QY8	�R
�f�SY8	�T�F�UY8	�V��WY8	�X�F�YY8	�Z
�f�[Y8	�\�v�]Y8	�^�v�_Y8	�`�f�aY8	�b
�f�cY8	�d�6�eY8	�f�&�gY8	�h�F�iY8	�j�6�kY8	�l�6�mY8	�n�F�oY8	�p�f�qY8	�r��sY8	�t*�6�uY8	�v�V�wY8	�x"�6�yY8	�z&�v�{Y8	�|��}Y8	�~�v�Y8	�@�V�AY8	�B�V�CY8	�D�J�EY8	�F�Z�GY8	�H"�:�IY8	�J#�J�KY8	�L�j�MY8	�N��OY8	�P
�f�QY8	�R��SY8	�T
�f�UY8	�V�u�WY8	�X��YY8	�Z�F�[Y8	�\ ��]Y8	�^/�
�_Y8	�`0��aY8	�b6�z�cY8	�d7�
�eY8	�f1�*�gY8	�h�v�iY8	�j��kY8	�l�f�mY8	�n��oY8	�p�6�qY8	�r��sY8	�t�%�uY8	�v��wY8	�x��yY8	�z��{Y8	�|�5�}Y8	�~��Y8	�@�u�AY8	�B�%�CY8	�D��EY8	�F�e�GY8	�H�u�IY8	�J��KY8	�L�&�MY8	�N�F�OY8	�P��QY8	�R��SY8	�T��UY8	�V�E�WY8	�X�6�YY8	�Z�F�[Y8	�\�F�]Y8	�^�F�_Y8	�`��aY8	�b��cY8	�d��eY8	�f�V�gY8	�h�&�iY8	�j�F�kY8	�l"�:�mY8	�n#�J�oY8	�p)�*�qY8	�r*�:�sY8	�t$�Z�uY8	�v��wY8	�x�E�yY8	�z�v�{Y8	�|��}Y8	�~�&�Y8	�@ �5�A Y8	�B �V�C Y8	�D �e�E Y8	�F �%�G Y8	�H �V�I Y8	�J ��K Y8	�L 
�f�M Y8	�N �F�O Y8	�P �f�Q Y8	�R �6�S Y8	�T 
�6�U Y8	�V ��W Y8	�X �&�Y Y8	�Z ��[ Y8	�\ �&�] Y8	�^ ��_ Y8	�` ��a Y8	�b '�	�c Y8	�d (��e Y8	�f .�y�g Y8	�h /�	�i Y8	�j )�)�k Y8	�l ��m Y8	�n �5�o Y8	�p �6�q Y8	�r �V�s Y8	�t �V�u Y8	�v �V�w Y8	�x �V�y Y8	�z �f�{ Y8	�| �V�} Y8	�~ 
�f� Y8	�@!�V�A!Y8	�B!��C!Y8	�D!�V�E!Y8	�F!��G!Y8	�H!
�6�I!Y8	�J!��K!Y8	�L!�	�M!Y8	�N!�	�O!Y8	�P!�	�Q!Y8	�R!�	�S!Y8	�T!��U!Y8	�V!�	�W!Y8	�X!�	�Y!Y8	�Z!�	�[!Y8	�\!�	�]!Y8	�^!�	�_!Y8	�`!�	�a!Y8	�b!�	�c!Y8	�d!�	�e!Y8	�f!�F�g!Y8	�h!
�f�i!Y8	�j!�F�k!Y8	�l!�:�m!Y8	�n!��o!Y8	�p!�<�q!Y8	�r!�>�s!Y8	�t!��u!Y8	�v!�F�w!Y8	�x!$�V�y!Y8	�z!%�f�{!Y8	�|!�V�}!Y8	�~!�F�!Y8	�@"�&�A"Y8	�B"�V�C"Y8	�D"��E"Y8	�F"�V�G"Y8	�H"��I"Y8	�J"�6�K"Y8	�L"�v�M"Y8	�N"�&�O"Y8	�P"�F�Q"Y8	�R"��S"Y8	�T"�f�U"Y8	�V"��W"Y8	�X"�5�Y"Y8	�Z"�v�["Y8	�\"�6�]"Y8	�^"
�f�_"Y8	�`"��a"Y8	�b"&�z�c"Y8	�d"'�
�e"Y8	�f"-�j�g"Y8	�h".�z�i"Y8	�j"(��k"Y8	�l"��m"Y8	�n"�%�o"Y8	�p"��q"Y8	�r"�F�s"Y8	�t"�&�u"Y8	�v"
�6�w"Y8	�x"�V�y"Y8	�z"�v�{"Y8	�|"�F�}"Y8	�~"�&�"Y8	�@#�&�A#Y8	�B#�F�C#Y8	�D#��E#Y8	�F#��G#Y8	�H#��I#Y8	�J#�&�K#Y8	�L#
�f�M#Y8	�N#�V�O#Y8	�P#�v�Q#Y8	�R#
�f�S#Y8	�T#�v�U#Y8	�V#�v�W#Y8	�X#�&�Y#Y8	�Z#��[#Y8	�\#�V�]#Y8	�^#�&�_#Y8	�`#�6�a#Y8	�b#��c#Y8	�d#&�z�e#Y8	�f#'�
�g#Y8	�h#-�j�i#Y8	�j#.�z�k#Y8	�l#(��m#Y8	�n#�&�o#Y8	�p#�6�q#Y8	�r#�v�s#Y8	�t#�&�u#Y8	�v#�F�w#Y8	�x#�:�y#Y8	�z#�J�{#Y8	�|#!�*�}#Y8	�~#"�:�#Y8	�@$�Z�A$Y8	�B$
�f�C$Y8	�D$#�F�E$Y8	�F$$�V�G$Y8	�H$�&�I$Y8	�J$��K$Y8	�L$
�6�M$Y8	�N$"�6�O$Y8	�P$�"�Q$Y8	�R$ �!5�S$Y8	�T$!�"6�U$Y8	�V$'�(<�W$Y8	�X$(�)=�Y$Y8	�Z$"�#7�[$Y8	�\$�%�]$Y8	�^$#�$8�_$Y8	�`$$�%9�a$Y8	�b$*�+?�c$Y8	�d$+�,@�e$Y8	�f$%�&:�g$Y8	�h$�$�i$Y8	�j$ �!7�k$Y8	�l$!�"8�m$Y8	�n$'�(>�o$Y8	�p$(�)?�q$Y8	�r$"�#9�s$Y8	�t$�-�u$Y8	�v$'�(=�w$Y8	�x$(�)>�y$Y8	�z$.�/D�{$Y8	�|$/�0E�}$Y8	�~$)�*?�$Y8	�@%�$�A%Y8	�B% �!7�C%Y8	�D%!�"8�E%Y8	�F%'�(>�G%Y8	�H%(�)?�I%Y8	�J%"�#9�K%Y8	�L%�*�M%Y8	�N%&�'=�O%Y8	�P%'�(>�Q%Y8	�R%-�.D�S%Y8	�T%.�/E�U%Y8	�V%(�)?�W%Y8	�X%�&�Y%Y8	�Z%"�#9�[%Y8	�\%#�$:�]%Y8	�^%)�*@�_%Y8	�`%*�+A�a%Y8	�b%$�%;�c%Y8	�d%�1�e%Y8	�f%-�.D�g%Y8	�h%.�/E�i%Y8	�j%4�5K�k%Y8	�l%5�6L�m%Y8	�n%/�0F�o%Y8	�p%� �q%Y8	�r%�3�s%Y8	�t%� 4�u%Y8	�v%%�&:�w%Y8	�x%&�';�y%Y8	�z% �!5�{%Y8	�|%�6�}%Y8	�~%!�*�%Y8	�@&"�:�A&Y8	�B&(��C&Y8	�D&)�*�E&Y8	�F&#�J�G&Y8	�H&�*�I&Y8	�J&�*�K&Y8	�L&#�$:�M&Y8	�N&$�%;�O&Y8	�P&*�+A�Q&Y8	�R&+�,B�S&Y8	�T&%�&<�U&Y8	�V&�!�W&Y8	�X&�4�Y&Y8	�Z&�5�[&Y8	�\&$�%;�]&Y8	�^&%�&<�_&Y8	�`&� 6�a&Y8	�b&�)�c&Y8	�d&%�&<�e&Y8	�f&&�'=�g&Y8	�h&,�-C�i&Y8	�j&-�.D�k&Y8	�l&'�(>�m&Y8	�n&�*�o&Y8	�p&(�)=�q&Y8	�r&)�*>�s&Y8	�t&/�0D�u&Y8	�v&0�1E�w&Y8	�x&*�+?�y&Y8	�z&�#�{&Y8	�|&� 6�}&Y8	�~& �!7�&Y8	�@'&�'=�A'Y8	�B''�(>�C'Y8	�D'!�"8�E'Y8	�F'�"�G'Y8	�H' �!5�I'Y8	�J'!�"6�K'Y8	�L''�(<�M'Y8	�N'(�)=�O'Y8	�P'"�#7�Q'Y8	�R'�'�S'Y8	�T'%�&:�U'Y8	�V'&�';�W'Y8	�X',�-A�Y'Y8	�Z'-�.B�['Y8	�\''�(<�]'Y8	�^'�&�_'Y8	�`'"�#9�a'Y8	�b'#�$:�c'Y8	�d')�*@�e'Y8	�f'*�+A�g'Y8	�h'$�%;�i'Y8	�j'�#�k'Y8	�l'�*�m'Y8	�n'&�'=�o'Y8	�p''�(>�q'Y8	�r'-�.D�s'Y8	�t'.�/E�u'Y8	�v'(�)?�w'Y8	�x'�*�y'Y8	�z'&�'=�{'Y8	�|''�(>�}'Y8	�~'-�.D�'Y8	�@(.�/E�A(Y8	�B((�)?�C(Y8	�D(�-�E(Y8	�F()�*@�G(Y8	�H(*�+A�I(Y8	�J(0�1G�K(Y8	�L(1�2H�M(Y8	�N(+�,B�O(Y8	�P(�-�Q(Y8	�R()�*@�S(Y8	�T(*�+A�U(Y8	�V(0�1G�W(Y8	�X(1�2H�Y(Y8	�Z(+�,B�[(Y8	�\(�(�](Y8	�^(!�"8�_(Y8	�`("�#9�a(Y8	�b((�)?�c(Y8	�d()�*@�e(Y8	�f(#�$:�g(Y8	�h(�#�i(Y8	�j(� 6�k(Y8	�l( �!7�m(Y8	�n(&�'=�o(Y8	�p('�(>�q(Y8	�r(!�"8�s(Y8	�t(�+�u(Y8	�v('�(>�w(Y8	�x((�)?�y(Y8	�z(.�/E�{(Y8	�|(/�0F�}(Y8	�~()�*@�(Y8	�@)�/�A)Y8	�B)+�,B�C)Y8	�D),�-C�E)Y8	�F)2�3I�G)Y8	�H)3�4J�I)Y8	�J)-�.D�K)Y8	�L)� 0�M)Y8	�N)"�#3�O)Y8	�P)�,�Q)Y8	�R)(�)?�S)Y8	�T))�*@�U)Y8	�V)/�0F�W)Y8	�X)0�1G�Y)Y8	�Z)*�+A�[)Y8	�\)�f�])Y8	�^),�Z�_)Y8	�`)-�j�a)Y8	�b)3�J�c)Y8	�d)4�Z�e)Y8	�f).�z�g)Y8	�h)�V�i)Y8	�j)#�J�k)Y8	�l)$�Z�m)Y8	�n)*�:�o)Y8	�p)+�J�q)Y8	�r)%�j�s)Y8	�t)�#�u)Y8	�v)� 6�w)Y8	�x) �!7�y)Y8	�z)&�'=�{)Y8	�|)'�(>�})Y8	�~)!�"8�)Y8	�@*�&�A*Y8	�B*"�#9�C*Y8	�D*#�$:�E*Y8	�F*)�*@�G*Y8	�H**�+A�I*Y8	�J*$�%;�K*Y8	�L*�0�M*Y8	�N*)�*@�O*Y8	�P**�+A�Q*Y8	�R*0�1G�S*Y8	�T*1�2H�U*Y8	�V*+�,B�W*Y8	�X*�:�Y*Y8	�Z*�"�[*Y8	�\*�5�]*Y8	�^*� 6�_*Y8	�`*%�&<�a*Y8	�b*&�'=�c*Y8	�d* �!7�e*Y8	�f*�$�g*Y8	�h*"�#7�i*Y8	�j*#�$8�k*Y8	�l*)�*>�m*Y8	�n**�+?�o*Y8	�p*$�%9�q*Y8	�r* ��s*Y8	�t*!�*�u*Y8	�v*�J�w*Y8	�x*�-�y*Y8	�z*)�*@�{*Y8	�|**�+A�}*Y8	�~*0�1G�*Y8	�@+1�2H�A+Y8	�B++�,B�C+Y8	�D+�)�E+Y8	�F+'�(<�G+Y8	�H+(�)=�I+Y8	�J+.�/C�K+Y8	�L+/�0D�M+Y8	�N+)�*>�O+Y8	�P+�#�Q+Y8	�R+� 6�S+Y8	�T+ �!7�U+Y8	�V+&�'=�W+Y8	�X+'�(>�Y+Y8	�Z+!�"8�[+Y8	�\+�.�]+Y8	�^+*�+A�_+Y8	�`++�,B�a+Y8	�b+1�2H�c+Y8	�d+2�3I�e+Y8	�f+,�-C�g+Y8	�h+�0�i+Y8	�j+,�-C�k+Y8	�l+-�.D�m+Y8	�n+3�4J�o+Y8	�p+4�5K�q+Y8	�r+.�/E�s+Y8	�t+�,�u+Y8	�v+(�)?�w+Y8	�x+)�*@�y+Y8	�z+/�0F�{+Y8	�|+0�1G�}+Y8	�~+*�+A�+Y8	�@,�%�A,Y8	�B,!�"8�C,Y8	�D,"�#9�E,Y8	�F,(�)?�G,Y8	�H,)�*@�I,Y8	�J,#�$:�K,Y8	�L,�*�M,Y8	�N,&�'=�O,Y8	�P,'�(>�Q,Y8	�R,-�.D�S,Y8	�T,.�/E�U,Y8	�V,(�)?�W,Y8	�X,�)�Y,Y8	�Z,%�&<�[,Y8	�\,&�'=�],Y8	�^,,�-C�_,Y8	�`,-�.D�a,Y8	�b,'�(>�c,Y8	�d,�%�e,Y8	�f,!�"8�g,Y8	�h,"�#9�i,Y8	�j,(�)?�k,Y8	�l,)�*@�m,Y8	�n,#�$:�o,Y8	�p,�%�q,Y8	�r,#�$8�s,Y8	�t,$�%9�u,Y8	�v,*�+?�w,Y8	�x,+�,@�y,Y8	�z,%�&:�{,Y8	�|,�'�},Y8	�~,#�$:�,Y8	�@-$�%;�A-Y8	�B-*�+A�C-Y8	�D-+�,B�E-Y8	�F-%�&<�G-Y8	�H-�"�I-Y8	�J- �!5�K-Y8	�L-!�"6�M-Y8	�N-'�(<�O-Y8	�P-(�)=�Q-Y8	�R-"�#7�S-Y8	�T-�#�U-Y8	�V-!�"6�W-Y8	�X-"�#7�Y-Y8	�Z-(�)=�[-Y8	�\-)�*>�]-Y8	�^-#�$8�_-Y8	�`-�%�a-Y8	�b-!�"8�c-Y8	�d-"�#9�e-Y8	�f-(�)?�g-Y8	�h-)�*@�i-Y8	�j-#�$:�k-Y8	�l-�&�m-Y8	�n-"�#9�o-Y8	�p-#�$:�q-Y8	�r-)�*@�s-Y8	�t-*�+A�u-Y8	�v-$�%;�w-Y8	�x-�#�y-Y8	�z-!�"6�{-Y8	�|-"�#7�}-Y8	�~-(�)=�-Y8	�@.)�*>�A.Y8	�B.#�$8�C.Y8	�D.�(�E.Y8	�F.&�';�G.Y8	�H.'�(<�I.Y8	�J.-�.B�K.Y8	�L..�/C�M.Y8	�N.(�)=�O.Y8	�P.�*�Q.Y8	�R.&�'=�S.Y8	�T.'�(>�U.Y8	�V.-�.D�W.Y8	�X..�/E�Y.Y8	�Z.(�)?�[.Y8	�\.�%�].Y8	�^.!�"8�_.Y8	�`."�#9�a.Y8	�b.(�)?�c.Y8	�d.)�*@�e.Y8	�f.#�$:�g.Y8	�h.�%�i.Y8	�j.!�"8�k.Y8	�l."�#9�m.Y8	�n.(�)?�o.Y8	�p.)�*@�q.Y8	�r.#�$:�s.Y8	�t.�,�u.Y8	�v.(�)?�w.Y8	�x.)�*@�y.Y8	�z./�0F�{.Y8	�|.0�1G�}.Y8	�~.*�+A�.Y8	�@/�-�A/Y8	�B/�F�C/Y8	�D/*�:�E/Y8	�F/+�J�G/Y8	�H/1�*�I/Y8	�J/2�:�K/Y8	�L/,�Z�M/Y8	�N/�$�O/Y8	�P/�V�Q/Y8	�R/��S/Y8	�T/��U/Y8	�V/�F�W/Y8	�X/�F�Y/Y8	�Z/�&�[/Y8	�\/�F�]/Y8	�^/�F�_/Y8	�`/�F�a/Y8	�b/�f�c/Y8	�d/�f�e/Y8	�f/�e�g/Y8	�h/��i/Y8	�j/�V�k/Y8	�l/�F�m/Y8	�n/�-�o/Y8	�p/�'�q/Y8	�r/�v�s/Y8	�t/�F�u/Y8	�v/�!�w/Y8	�x/�4�y/Y8	�z/�5�{/Y8	�|/$�%;�}/Y8	�~/%�&<�/Y8	�@0� 6�A0Y8	�B0
� �C0Y8	�D0�3�E0Y8	�F0�4�G0Y8	�H0#�$:�I0Y8	�J0$�%;�K0Y8	�L0�5�M0Y8	�N0��O0Y8	�P0�
�Q0Y8	�R0 ��S0Y8	�T0&�z�U0Y8	�V0'�
�W0Y8	�X0!�*�Y0Y8	�Z0�V�[0Y8	�\0�v�]0Y8	�^0�&�_0Y8	�`0�&�a0Y8	�b0�V�c0Y8	�d0#�J�e0Y8	�f0$�Z�g0Y8	�h0*�:�i0Y8	�j0+�J�k0Y8	�l0%�j�m0Y8	�n0�f�o0Y8	�p0��q0Y8	�r0�v�s0Y8	�t0�F�u0Y8	�v0�F�w0Y8	�x0��y0Y8	�z0�v�{0Y8	�|0��}0Y8	�~0��0Y8	�@1��A1Y8	�B1
�f�C1Y8	�D1�6�E1Y8	�F1��G1Y8	�H1��I1Y8	�J1�V�K1Y8	�L1
�f�M1Y8	�N1��O1Y8	�P1�&�Q1Y8	�R1�V�S1Y8	�T1�&�U1Y8	�V1�F�W1Y8	�X1��Y1Y8	�Z1�&�[1Y8	�\1��]1Y8	�^1��_1Y8	�`1��a1Y8	�b1�V�c1Y8	�d1�&�e1Y8	�f1�V�g1Y8	�h1�F�i1Y8	�j1��k1Y8	�l1��m1Y8	�n1�F�o1Y8	�p1�V�q1Y8	�r1�V�s1Y8	�t1�V�u1Y8	�v1�6�w1Y8	�x1!�*�y1Y8	�z1"�:�{1Y8	�|1(��}1Y8	�~1)�*�1Y8	�@2#�J�A2Y8	�B2�&�C2Y8	�D2�V�E2Y8	�F2�f�G2Y8	�H2�F�I2Y8	�J2�v�K2Y8	�L2��M2Y8	�N2�F�O2Y8	�P2��Q2Y8	�R2�V�S2Y8	�T2��U2Y8	�V2��W2Y8	�X2��Y2Y8	�Z2�6�[2Y8	�\2�f�]2Y8	�^2�6�_2Y8	�`2��a2Y8	�b2�F�c2Y8	�d2��e2Y8	�f2�V�g2Y8	�h2�f�i2Y8	�j2�&�k2Y8	�l2��m2Y8	�n2�F�o2Y8	�p2�:�q2Y8	�r2�J�s2Y8	�t2!�*�u2Y8	�v2"�:�w2Y8	�x2�Z�y2Y8	�z2��{2Y8	�|2%�f�}2Y8	�~2�F�2Y8	�@3�v�A3Y8	�B3�F�C3Y8	�D3�v�E3Y8	�F3�F�G3Y8	�H3��I3Y8	�J3�v�K3Y8	�L3�v�M3Y8	�N3�j�O3Y8	�P3�z�Q3Y8	�R3$�Z�S3Y8	�T3%�j�U3Y8	�V3�
�W3Y8	�X3��Y3Y8	�Z3�
�[3Y8	�\3 ��]3Y8	�^3&�z�_3Y8	�`3'�
�a3Y8	�b3!�*�c3Y8	�d3�6�e3Y8	�f3!�*�g3Y8	�h3"�:�i3Y8	�j3(��k3Y8	�l3)�*�m3Y8	�n3#�J�o3Y8	�p3	�&�q3Y8	�r3�6�s3Y8	�t3�F�u3Y8	�v3�V�w3Y8	�x3#�J�y3Y8	�z3$�Z�{3Y8	�|3*�:�}3Y8	�~3+�J�3Y8	�@4%�j�A4Y8	�B4�6�C4Y8	�D4�V�E4Y8	�F4�&�G4Y8	�H4�&�I4Y8	�J4�V�K4Y8	�L4�V�M4Y8	�N4��O4Y8	�P4��Q4Y8	�R4�&�S4Y8	�T4 ��U4Y8	�V4!�*�W4Y8	�X4'�
�Y4Y8	�Z4(��[4Y8	�\4"�:�]4Y8	�^4%�f�_4Y8	�`4$�V�a4Y8	�b4�F�c4Y8	�d4�6�e4Y8	�f4�V�g4Y8	�h4�F�i4Y8	�j4�V�k4Y8	�l4��m4Y8	�n4�e�o4Y8	�p4�V�q4Y8	�r4�6�s4Y8	�t4
�6�u4Y8	�v4	�&�w4Y8	�x4
�f�y4Y8	�z4�v�{4Y8	�|4�f�}4Y8	�~4�f�4Y8	�@5�V�A5Y8	�B5�&�C5Y8	�D5��E5Y8	�F5��G5Y8	�H5'�
�I5Y8	�J5(��K5Y8	�L5.�z�M5Y8	�N5/�
�O5Y8	�P5)�*�Q5Y8	�R5��S5Y8	�T5�&�U5Y8	�V5��W5Y8	�X5
�f�Y5Y8	�Z5�U�[5Y8	�\5�F�]5Y8	�^5�V�_5Y8	�`5�f�a5Y8	�b5��c5Y8	�d5�E�e5Y8	�f5�&�g5Y8	�h5�E�i5Y8	�j5�V�k5Y8	�l5�v�m5Y8	�n5�v�o5Y8	�p5�F�q5Y8	�r5
�6�s5Y8	�t5
�f�u5Y8	�v5�v�w5Y8	�x5�F�y5Y8	�z5�6�{5Y8	�|5�f�}5Y8	�~5��5Y8	�@6�v�A6Y8	�B6��C6Y8	�D6�V�E6Y8	�F6#�J�G6Y8	�H6$�Z�I6Y8	�J6*�:�K6Y8	�L6+�J�M6Y8	�N6%�j�O6Y8	�P6�E�Q6Y8	�R6*�9�S6Y8	�T6+�I�U6Y8	�V61�)�W6Y8	�X62�9�Y6Y8	�Z6,�Y�[6Y8	�\6�V�]6Y8	�^6#�J�_6Y8	�`6$�Z�a6Y8	�b6*�:�c6Y8	�d6+�J�e6Y8	�f6%�j�g6Y8	�h6�6�i6Y8	�j6)�*�k6Y8	�l6*�:�m6Y8	�n60��o6Y8	�p61�*�q6Y8	�r6+�J�s6Y8	�t6�v�u6Y8	�v6%�j�w6Y8	�x6&�z�y6Y8	�z6,�Z�{6Y8	�|6-�j�}6Y8	�~6'�
�6Y8	�@7�&�A7Y8	�B7(��C7Y8	�D7)�*�E7Y8	�F7/�
�G7Y8	�H70��I7Y8	�J7*�:�K7Y8	�L7�f�M7Y8	�N7�v�O7Y8	�P7%�j�Q7Y8	�R7&�z�S7Y8	�T7,�Z�U7Y8	�V7-�j�W7Y8	�X7'�
�Y7Y8	�Z7�6�[7Y8	�\7)�*�]7Y8	�^7*�:�_7Y8	�`70��a7Y8	�b71�*�c7Y8	�d7+�J�e7Y8	�f7�6�g7Y8	�h7)�*�i7Y8	�j7*�:�k7Y8	�l70��m7Y8	�n71�*�o7Y8	�p7+�J�q7Y8	�r7�f�s7Y8	�t7,�Z�u7Y8	�v7-�j�w7Y8	�x73�J�y7Y8	�z74�Z�{7Y8	�|7.�z�}7Y8	�~7�f�7Y8	�@8,�Z�A8Y8	�B8-�j�C8Y8	�D83�J�E8Y8	�F84�Z�G8Y8	�H8.�z�I8Y8	�J8�f�K8Y8	�L8$�Z�M8Y8	�N8%�j�O8Y8	�P8+�J�Q8Y8	�R8,�Z�S8Y8	�T8&�z�U8Y8	�V8�V�W8Y8	�X8#�J�Y8Y8	�Z8$�Z�[8Y8	�\8*�:�]8Y8	�^8+�J�_8Y8	�`8%�j�a8Y8	�b8��c8Y8	�d8.�z�e8Y8	�f8/�
�g8Y8	�h85�j�i8Y8	�j86�z�k8Y8	�l80��m8Y8	�n8�V�o8Y8	�p8+�J�q8Y8	�r8,�Z�s8Y8	�t82�:�u8Y8	�v83�J�w8Y8	�x8-�j�y8Y8	�z8�v�{8Y8	�|8%�j�}8Y8	�~8&�z�8Y8	�@9,�Z�A9Y8	�B9-�j�C9Y8	�D9'�
�E9Y8	�F9�v�G9Y8	�H9�f�I9Y8	�J9,�Z�K9Y8	�L9-�j�M9Y8	�N93�J�O9Y8	�P94�Z�Q9Y8	�R9.�z�S9Y8	�T9�f�U9Y8	�V9,�Z�W9Y8	�X9-�j�Y9Y8	�Z93�J�[9Y8	�\94�Z�]9Y8	�^9.�z�_9Y8	�`9�v�a9Y8	�b9-�j�c9Y8	�d9.�z�e9Y8	�f94�Z�g9Y8	�h95�j�i9Y8	�j9/�
�k9Y8	�l9 ��m9Y8	�n9/�
�o9Y8	�p90��q9Y8	�r96�z�s9Y8	�t97�
�u9Y8	�v91�*�w9Y8	�x9�f�y9Y8	�z9$�Z�{9Y8	�|9%�j�}9Y8	�~9+�J�9Y8	�@:,�Z�A:Y8	�B:&�z�C:Y8	�D:�6�E:Y8	�F:)�*�G:Y8	�H:*�:�I:Y8	�J:0��K:Y8	�L:1�*�M:Y8	�N:+�J�O:Y8	�P:�&�Q:Y8	�R:(��S:Y8	�T:)�*�U:Y8	�V:/�
�W:Y8	�X:0��Y:Y8	�Z:*�:�[:Y8	�\:�f�]:Y8	�^:$�Z�_:Y8	�`:%�j�a:Y8	�b:+�J�c:Y8	�d:,�Z�e:Y8	�f:&�z�g:Y8	�h:��i:Y8	�j:&�z�k:Y8	�l:'�
�m:Y8	�n:-�j�o:Y8	�p:.�z�q:Y8	�r:(��s:Y8	�t:�v�u:Y8	�v:�f�w:Y8	�x:$�Z�y:Y8	�z:%�j�{:Y8	�|:+�J�}:Y8	�~:,�Z�:Y8	�@;&�z�A;Y8	�B;�v�C;Y8	�D;%�j�E;Y8	�F;&�z�G;Y8	�H;,�Z�I;Y8	�J;-�j�K;Y8	�L;'�
�M;Y8	�N;�&�O;Y8	�P;(��Q;Y8	�R;)�*�S;Y8	�T;/�
�U;Y8	�V;0��W;Y8	�X;*�:�Y;Y8	�Z;�6�[;Y8	�\;)�*�];Y8	�^;*�:�_;Y8	�`;0��a;Y8	�b;1�*�c;Y8	�d;+�J�e;Y8	�f;�f�g;Y8	�h;$�Z�i;Y8	�j;%�j�k;Y8	�l;+�J�m;Y8	�n;,�Z�o;Y8	�p;&�z�q;Y8	�r;�V�s;Y8	�t;+�J�u;Y8	�v;,�Z�w;Y8	�x;2�:�y;Y8	�z;3�J�{;Y8	�|;-�j�};Y8	�~;�&�;Y8	�@<�E�A<Y8	�B<
�6�C<Y8	�D<
�6�E<Y8	�F<��G<Y8	�H<��I<Y8	�J<�6�K<Y8	�L<�F�M<Y8	�N<�V�O<Y8	�P<�v�Q<Y8	�R<��S<Y8	�T<��U<Y8	�V<�%�W<Y8	�X<
�f�Y<Y8	�Z<�V�[<Y8	�\<��]<Y8	�^<�5�_<Y8	�`<�E�a<Y8	�b<�V�c<Y8	�d<�&�e<Y8	�f<��g<Y8	�h<�f�i<Y8	�j<$�Z�k<Y8	�l<%�j�m<Y8	�n<+�J�o<Y8	�p<,�Z�q<Y8	�r<&�z�s<Y8	�t<
�f�u<Y8	�v<�6�w<Y8	�x<�v�y<Y8	�z<�6�{<Y8	�|<�6�}<Y8	�~<�v�<Y8	�@=�6�A=Y8	�B=�V�C=Y8	�D=
�f�E=Y8	�F=�6�G=Y8	�H=�f�I=Y8	�J=��K=Y8	�L=�F�M=Y8	�N=�F�O=Y8	�P=�f�Q=Y8	�R=$�Z�S=Y8	�T=%�j�U=Y8	�V=+�J�W=Y8	�X=,�Z�Y=Y8	�Z=&�z�[=Y8	�\=�v�]=Y8	�^=�F�_=Y8	�`=
�f�a=Y8	�b=�Z�c=Y8	�d=�j�e=Y8	�f=#�J�g=Y8	�h=$�Z�i=Y8	�j=�z�k=Y8	�l=��m=Y8	�n=�z�o=Y8	�p=�
�q=Y8	�r=%�j�s=Y8	�t=&�z�u=Y8	�v= ��w=Y8	�x=�v�y=Y8	�z=�&�{=Y8	�|=�V�}=Y8	�~=�F�=Y8	�@>�V�A>Y8	�B>�V�C>Y8	�D>�v�E>Y8	�F>�U�G>Y8	�H>
�f�I>Y8	�J>�6�K>Y8	�L>�v�M>Y8	�N>�&�O>Y8	�P>�V�Q>Y8	�R>�F�S>Y8	�T>�5�U>Y8	�V>�6�W>Y8	�X>�V�Y>Y8	�Z>�v�[>Y8	�\>�'�]>Y8	�^>�6�_>Y8	�`>)�*�a>Y8	�b>*�:�c>Y8	�d>0��e>Y8	�f>1�*�g>Y8	�h>+�J�i>Y8	�j>�5�k>Y8	�l>!�)�m>Y8	�n>"�9�o>Y8	�p>(��q>Y8	�r>)�)�s>Y8	�t>#�I�u>Y8	�v>�5�w>Y8	�x>!�)�y>Y8	�z>"�9�{>Y8	�|>(��}>Y8	�~>)�)�>Y8	�@?#�I�A?Y8	�B?�V�C?Y8	�D?#�J�E?Y8	�F?$�Z�G?Y8	�H?*�:�I?Y8	�J?+�J�K?Y8	�L?%�j�M?Y8	�N?
�6�O?Y8	�P?
�6�Q?Y8	�R?�V�S?Y8	�T?�V�U?Y8	�V?�v�W?Y8	�X?�U�Y?Y8	�Z?��[?Y8	�\?��]?Y8	�^?�&�_?Y8	�`?�F�a?Y8	�b?��c?Y8	�d?�&�e?Y8	�f?�(�g?Y8	�h?��i?Y8	�j?��k?Y8	�l?�&�m?Y8	�n? ��o?Y8	�p?�v�q?Y8	�r?�$�s?Y8	�t?�V�u?Y8	�v?�v�w?Y8	�x?�V�y?Y8	�z?�F�{?Y8	�|?��}?Y8	�~?��?Y8	�@@�e�A@Y8	�B@��C@Y8	�D@�&�E@Y8	�F@
�f�G@Y8	�H@��I@Y8	�J@�F�K@Y8	�L@��M@Y8	�N@'�
�O@Y8	�P@(��Q@Y8	�R@.�z�S@Y8	�T@/�
�U@Y8	�V@)�*�W@Y8	�X@�&�Y@Y8	�Z@�5�[@Y8	�\@��]@Y8	�^@��_@Y8	�`@�e�a@Y8	�b@�F�c@Y8	�d@�F�e@Y8	�f@�&�g@Y8	�h@
�f�i@Y8	�j@�V�k@Y8	�l@�6�m@Y8	�n@�f�o@Y8	�p@$�V�q@Y8	�r@�v�s@Y8	�t@�F�u@Y8	�v@�v�w@Y8	�x@�V�y@Y8	�z@�f�{@Y8	�|@�V�}@Y8	�~@�F�@Y8	�@A�V�AAY8	�BA�&�CAY8	�DA�6�EAY8	�FA�F�GAY8	�HA��IAY8	�JA�F�KAY8	�LA��MAY8	�NA�F�OAY8	�PA��QAY8	�RA��SAY8	�TA��UAY8	�VA��WAY8	�XA�V�YAY8	�ZA
�f�[AY8	�\A�v�]AY8	�^A��_AY8	�`A��aAY8	�bA
�f�cAY8	�dA�F�eAY8	�fA�&�gAY8	�hA��iAY8	�jA
�f�kAY8	�lA�Z�mAY8	�nA�j�oAY8	�pA#�J�qAY8	�rA$�Z�sAY8	�tA�z�uAY8	�vA�#�wAY8	�xA�F�yAY8	�zA�v�{AY8	�|A�6�}AY8	�~A��AY8	�@B�V�ABY8	�BB�&�CBY8	�DB�V�EBY8	�FB
�f�GBY8	�HB�U�IBY8	�JB�F�KBY8	�LB�V�MBY8	�NB�V�OBY8	�PB�V�QBY8	�RB��SBY8	�TB
�f�UBY8	�VB
�f�WBY8	�XB
�f�YBY8	�ZB�V�[BY8	�\B�V�]BY8	�^B��_BY8	�`B'�
�aBY8	�bB(��cBY8	�dB.�z�eBY8	�fB/�
�gBY8	�hB)�*�iBY8	�jB�&�kBY8	�lB�V�mBY8	�nB�&�oBY8	�pB�U�qBY8	�rB�F�sBY8	�tB�V�uBY8	�vB�E�wBY8	�xB�V�yBY8	�zB�F�{BY8	�|B�V�}BY8	�~B�6�BY8	�@C�f�ACY8	�BC�V�CCY8	�DC�F�ECY8	�FC�V�GCY8	�HC�f�ICY8	�JC�&�KCY8	�LC�F�MCY8	�NC'��OCY8	�PC�E�QCY8	�RC�f�SCY8	�TC!�&�UCY8	�VC#�F�WCY8	�XC�v�YCY8	�ZC%�f�[CY8	�\C#�F�]CY8	�^C�V�_CY8	�`C�V�aCY8	�bC�V�cCY8	�dC�V�eCY8	�fC�F�gCY8	�hC�6�iCY8	�jC!�*�kCY8	�lC"�:�mCY8	�nC(��oCY8	�pC)�*�qCY8	�rC#�J�sCY8	�tC��uCY8	�vC�u�wCY8	�xC�E�yCY8	�zC�F�{CY8	�|C�5�}CY8	�~C�V�CY8	�@D��ADY8	�BD�f�CDY8	�DD�%�EDY8	�FD��GDY8	�HD�u�IDY8	�JD��KDY8	�LD��MDY8	�ND�v�ODY8	�PD�F�QDY8	�RD�6�SDY8	�TD�&�UDY8	�VD�V�WDY8	�XD�V�YDY8	�ZD�f�[DY8	�\D��]DY8	�^D
�f�_DY8	�`D�&�aDY8	�bD�v�cDY8	�dD�f�eDY8	�fD�F�gDY8	�hD�V�iDY8	�jD
�f�kDY8	�lD�V�mDY8	�nD�F�oDY8	�pD�f�qDY8	�rD�V�sDY8	�tD!�&�uDY8	�vD�v�wDY8	�xD�6�yDY8	�zD��{DY8	�|D�U�}DY8	�~D�v�DY8	�@E�V�AEY8	�BE�6�CEY8	�DE�5�EEY8	�FE��GEY8	�HE��IEY8	�JE�f�KEY8	�LE�&�MEY8	�NE��OEY8	�PE��QEY8	�RE
�5�SEY8	�TE��UEY8	�VE�f�WEY8	�XE�V�YEY8	�ZE�f�[EY8	�\E�V�]EY8	�^E��_EY8	�`E�&�aEY8	�bE�v�cEY8	�dE�f�eEY8	�fE
�f�gEY8	�hE��iEY8	�jE�F�kEY8	�lE�V�mEY8	�nE�&�oEY8	�pE�F�qEY8	�rE�f�sEY8	�tE��uEY8	�vE�v�wEY8	�xE�v�yEY8	�zE�F�{EY8	�|E�6�}EY8	�~E�V�EY8	�@F��AFY8	�BF�F�CFY8	�DF�V�EFY8	�FF��GFY8	�HF�&�IFY8	�JF��KFY8	�LF�&�MFY8	�NF��OFY8	�PF�&�QFY8	�RF�&�SFY8	�TF�V�UFY8	�VF
�f�WFY8	�XF�E�YFY8	�ZF��[FY8	�\F�6�]FY8	�^F�V�_FY8	�`F�v�aFY8	�bF
�f�cFY8	�dF�F�eFY8	�fF�v�gFY8	�hF�6�iFY8	�jF!�*�kFY8	�lF"�:�mFY8	�nF(��oFY8	�pF)�*�qFY8	�rF#�J�sFY8	�tF��uFY8	�vF�
�wFY8	�xF ��yFY8	�zF&�z�{FY8	�|F'�
�}FY8	�~F!�*�FY8	�@G
�f�AGY8	�BG�V�CGY8	�DG�&�EGY8	�FG�5�GGY8	�HG�&�IGY8	�JG�v�KGY8	�LG
�f�MGY8	�NG
�f�OGY8	�PG
�f�QGY8	�RG�V�SGY8	�TG�v�UGY8	�VG�v�WGY8	�XG��YGY8	�ZG�v�[GY8	�\G�%�]GY8	�^G�V�_GY8	�`G�F�aGY8	�bG��cGY8	�dG�v�eGY8	�fG��gGY8	�hG�f�iGY8	�jG�&�kGY8	�lG
�f�mGY8	�nG�f�oGY8	�pG�V�qGY8	�rG�v�sGY8	�tG�V�uGY8	�vG�V�wGY8	�xG
�f�yGY8	�zG�V�{GY8	�|G��}GY8	�~G�f�GY8	�@H�&�AHY8	�BH�&�CHY8	�DH�V�EHY8	�FH�V�GHY8	�HH�v�IHY8	�JH��KHY8	�LH�%�MHY8	�NH��OHY8	�PH�V�QHY8	�RH�F�SHY8	�TH��UHY8	�VH�U�WHY8	�XH�U�YHY8	�ZH�e�[HY8	�\H��]HY8	�^H��_HY8	�`H�f�aHY8	�bH�v�cHY8	�dH�j�eHY8	�fH�z�gHY8	�hH$�Z�iHY8	�jH%�j�kHY8	�lH�
�mHY8	�nH�f�oHY8	�pH�f�qHY8	�rH�E�sHY8	�tH"�9�uHY8	�vH#�I�wHY8	�xH)�)�yHY8	�zH*�9�{HY8	�|H$�Y�}HY8	�~H�F�HY8	�@I�&�AIY8	�BI�V�CIY8	�DI
�f�EIY8	�FI�v�GIY8	�HI�&�IIY8	�JI�V�KIY8	�LI#�J�MIY8	�NI$�Z�OIY8	�PI*�:�QIY8	�RI+�J�SIY8	�TI%�j�UIY8	�VI
�f�WIY8	�XI�F�YIY8	�ZI�6�[IY8	�\I�u�]IY8	�^I�6�_IY8	�`I�U�aIY8	�bI�V�cIY8	�dI�F�eIY8	�fI�&�gIY8	�hI�&�iIY8	�jI�6�kIY8	�lI!�*�mIY8	�nI"�:�oIY8	�pI(��qIY8	�rI)�*�sIY8	�tI#�J�uIY8	�vI��wIY8	�xI�F�yIY8	�zI�6�{IY8	�|I�f�}IY8	�~I�&�IY8	�@J�v�AJY8	�BJ�V�CJY8	�DJ�u�EJY8	�FJ��GJY8	�HJ�E�IJY8	�JJ�e�KJY8	�LJ�&�MJY8	�NJ�F�OJY8	�PJ�&�QJY8	�RJ�(�SJY8	�TJ�*�UJY8	�VJ�6�WJY8	�XJ�e�YJY8	�ZJ�%�[JY8	�\J ��]JY8	�^J�5�_JY8	�`J��aJY8	�bJ�5�cJY8	�dJ�%�eJY8	�fJ�6�gJY8	�hJ�V�iJY8	�jJ�&�kJY8	�lJ��mJY8	�nJ�&�oJY8	�pJ�F�qJY8	�rJ��sJY8	�tJ��uJY8	�vJ�V�wJY8	�xJ�$�yJY8	�zJ"�#7�{JY8	�|J#�$8�}JY8	�~J)�*>�JY8	�@K*�+?�AKY8	�BK$�%9�CKY8	�DK�'�EKY8	�FK%�&:�GKY8	�HK&�';�IKY8	�JK,�-A�KKY8	�LK-�.B�MKY8	�NK'�(<�OKY8	�PK�&�QKY8	�RK"�#9�SKY8	�TK#�$:�UKY8	�VK)�*@�WKY8	�XK*�+A�YKY8	�ZK$�%;�[KY8	�\K�/�]KY8	�^K)�*?�_KY8	�`K*�+@�aKY8	�bK0�1F�cKY8	�dK1�2G�eKY8	�fK+�,A�gKY8	�hK�&�iKY8	�jK"�#9�kKY8	�lK#�$:�mKY8	�nK)�*@�oKY8	�pK*�+A�qKY8	�rK$�%;�sKY8	�tK�,�uKY8	�vK(�)?�wKY8	�xK)�*@�yKY8	�zK/�0F�{KY8	�|K0�1G�}KY8	�~K*�+A�KY8	�@L�(�ALY8	�BL$�%;�CLY8	�DL%�&<�ELY8	�FL+�,B�GLY8	�HL,�-C�ILY8	�JL&�'=�KLY8	�LL �!3�MLY8	�NL/�0F�OLY8	�PL0�1G�QLY8	�RL6�7M�SLY8	�TL7�8N�ULY8	�VL1�2H�WLY8	�XL�"�YLY8	�ZL �!5�[LY8	�\L!�"6�]LY8	�^L'�(<�_LY8	�`L(�)=�aLY8	�bL"�#7�cLY8	�dL�V�eLY8	�fL#�J�gLY8	�hL$�Z�iLY8	�jL*�:�kLY8	�lL+�J�mLY8	�nL%�j�oLY8	�pL�J�qLY8	�rL�,�sLY8	�tL%�&<�uLY8	�vL&�'=�wLY8	�xL,�-C�yLY8	�zL-�.D�{LY8	�|L'�(>�}LY8	�~L�#�LY8	�@M� 6�AMY8	�BM �!7�CMY8	�DM&�'=�EMY8	�FM'�(>�GMY8	�HM!�"8�IMY8	�JM�+�KMY8	�LM'�(>�MMY8	�NM(�)?�OMY8	�PM.�/E�QMY8	�RM/�0F�SMY8	�TM)�*@�UMY8	�VM�,�WMY8	�XM*�+?�YMY8	�ZM+�,@�[MY8	�\M1�2F�]MY8	�^M2�3G�_MY8	�`M,�-A�aMY8	�bM�%�cMY8	�dM!�"8�eMY8	�fM"�#9�gMY8	�hM(�)?�iMY8	�jM)�*@�kMY8	�lM#�$:�mMY8	�nM�$�oMY8	�pM"�#7�qMY8	�rM#�$8�sMY8	�tM)�*>�uMY8	�vM*�+?�wMY8	�xM$�%9�yMY8	�zM�)�{MY8	�|M'�(<�}MY8	�~M(�)=�MY8	�@N.�/C�ANY8	�BN/�0D�CNY8	�DN)�*>�ENY8	�FN�(�GNY8	�HN$�%;�INY8	�JN%�&<�KNY8	�LN+�,B�MNY8	�NN,�-C�ONY8	�PN&�'=�QNY8	�RN�%�SNY8	�TN�,�UNY8	�VN(�)?�WNY8	�XN)�*@�YNY8	�ZN/�0F�[NY8	�\N0�1G�]NY8	�^N*�+A�_NY8	�`N�,�aNY8	�bN(�)?�cNY8	�dN)�*@�eNY8	�fN/�0F�gNY8	�hN0�1G�iNY8	�jN*�+A�kNY8	�lN�/�mNY8	�nN+�,B�oNY8	�pN,�-C�qNY8	�rN2�3I�sNY8	�tN3�4J�uNY8	�vN-�.D�wNY8	�xN�/�yNY8	�zN+�,B�{NY8	�|N,�-C�}NY8	�~N2�3I�NY8	�@O3�4J�AOY8	�BO-�.D�COY8	�DO�*�EOY8	�FO#�$:�GOY8	�HO$�%;�IOY8	�JO*�+A�KOY8	�LO+�,B�MOY8	�NO%�&<�OOY8	�PO�%�QOY8	�RO!�"8�SOY8	�TO"�#9�UOY8	�VO(�)?�WOY8	�XO)�*@�YOY8	�ZO#�$:�[OY8	�\O�-�]OY8	�^O)�*@�_OY8	�`O*�+A�aOY8	�bO0�1G�cOY8	�dO1�2H�eOY8	�fO+�,B�gOY8	�hO�1�iOY8	�jO-�.D�kOY8	�lO.�/E�mOY8	�nO4�5K�oOY8	�pO5�6L�qOY8	�rO/�0F�sOY8	�tO!�"2�uOY8	�vO$�%5�wOY8	�xO�.�yOY8	�zO*�+A�{OY8	�|O+�,B�}OY8	�~O1�2H�OY8	�@P2�3I�APY8	�BP,�-C�CPY8	�DP�%�EPY8	�FP!�"8�GPY8	�HP"�#9�IPY8	�JP(�)?�KPY8	�LP)�*@�MPY8	�NP#�$:�OPY8	�PP�(�QPY8	�RP$�%;�SPY8	�TP%�&<�UPY8	�VP+�,B�WPY8	�XP,�-C�YPY8	�ZP&�'=�[PY8	�\P�2�]PY8	�^P+�,B�_PY8	�`P,�-C�aPY8	�bP2�3I�cPY8	�dP3�4J�ePY8	�fP-�.D�gPY8	�hP�Z�iPY8	�jP�$�kPY8	�lP �!7�mPY8	�nP!�"8�oPY8	�pP'�(>�qPY8	�rP(�)?�sPY8	�tP"�#9�uPY8	�vP�&�wPY8	�xP$�%9�yPY8	�zP%�&:�{PY8	�|P+�,@�}PY8	�~P,�-A�PY8	�@Q&�';�AQY8	�BQ"�:�CQY8	�DQ#�J�EQY8	�FQ�j�GQY8	�HQ�/�IQY8	�JQ+�,B�KQY8	�LQ,�-C�MQY8	�NQ2�3I�OQY8	�PQ3�4J�QQY8	�RQ-�.D�SQY8	�TQ�+�UQY8	�VQ)�*>�WQY8	�XQ*�+?�YQY8	�ZQ0�1E�[QY8	�\Q1�2F�]QY8	�^Q+�,@�_QY8	�`Q�%�aQY8	�bQ!�"8�cQY8	�dQ"�#9�eQY8	�fQ(�)?�gQY8	�hQ)�*@�iQY8	�jQ#�$:�kQY8	�lQ�0�mQY8	�nQ,�-C�oQY8	�pQ-�.D�qQY8	�rQ3�4J�sQY8	�tQ4�5K�uQY8	�vQ.�/E�wQY8	�xQ� 2�yQY8	�zQ.�/E�{QY8	�|Q/�0F�}QY8	�~Q5�6L�QY8	�@R6�7M�ARY8	�BR0�1G�CRY8	�DR�.�ERY8	�FR*�+A�GRY8	�HR+�,B�IRY8	�JR1�2H�KRY8	�LR2�3I�MRY8	�NR,�-C�ORY8	�PR�'�QRY8	�RR#�$:�SRY8	�TR$�%;�URY8	�VR*�+A�WRY8	�XR+�,B�YRY8	�ZR%�&<�[RY8	�\R�,�]RY8	�^R(�)?�_RY8	�`R)�*@�aRY8	�bR/�0F�cRY8	�dR0�1G�eRY8	�fR*�+A�gRY8	�hR�+�iRY8	�jR'�(>�kRY8	�lR(�)?�mRY8	�nR.�/E�oRY8	�pR/�0F�qRY8	�rR)�*@�sRY8	�tR�'�uRY8	�vR#�$:�wRY8	�xR$�%;�yRY8	�zR*�+A�{RY8	�|R+�,B�}RY8	�~R%�&<�RY8	�@S�'�ASY8	�BS%�&:�CSY8	�DS&�';�ESY8	�FS,�-A�GSY8	�HS-�.B�ISY8	�JS'�(<�KSY8	�LS�)�MSY8	�NS%�&<�OSY8	�PS&�'=�QSY8	�RS,�-C�SSY8	�TS-�.D�USY8	�VS'�(>�WSY8	�XS�$�YSY8	�ZS"�#7�[SY8	�\S#�$8�]SY8	�^S)�*>�_SY8	�`S*�+?�aSY8	�bS$�%9�cSY8	�dS�%�eSY8	�fS#�$8�gSY8	�hS$�%9�iSY8	�jS*�+?�kSY8	�lS+�,@�mSY8	�nS%�&:�oSY8	�pS�'�qSY8	�rS#�$:�sSY8	�tS$�%;�uSY8	�vS*�+A�wSY8	�xS+�,B�ySY8	�zS%�&<�{SY8	�|S�(�}SY8	�~S$�%;�SY8	�@T%�&<�ATY8	�BT+�,B�CTY8	�DT,�-C�ETY8	�FT&�'=�GTY8	�HT�%�ITY8	�JT#�$8�KTY8	�LT$�%9�MTY8	�NT*�+?�OTY8	�PT+�,@�QTY8	�RT%�&:�STY8	�TT�*�UTY8	�VT(�)=�WTY8	�XT)�*>�YTY8	�ZT/�0D�[TY8	�\T0�1E�]TY8	�^T*�+?�_TY8	�`T�,�aTY8	�bT(�)?�cTY8	�dT)�*@�eTY8	�fT/�0F�gTY8	�hT0�1G�iTY8	�jT*�+A�kTY8	�lT�'�mTY8	�nT#�$:�oTY8	�pT$�%;�qTY8	�rT*�+A�sTY8	�tT+�,B�uTY8	�vT%�&<�wTY8	�xT�'�yTY8	�zT#�$:�{TY8	�|T$�%;�}TY8	�~T*�+A�TY8	�@U+�,B�AUY8	�BU%�&<�CUY8	�DU�.�EUY8	�FU*�+A�GUY8	�HU+�,B�IUY8	�JU1�2H�KUY8	�LU2�3I�MUY8	�NU,�-C�OUY8	�PU�F�QUY8	�RU*�:�SUY8	�TU+�J�UUY8	�VU1�*�WUY8	�XU2�:�YUY8	�ZU,�Z�[UY8	�\U�/�]UY8	�^U�&�_UY8	�`U�f�aUY8	�bU��cUY8	�dU�V�eUY8	�fU��gUY8	�hU�/�iUY8	�jU�)�kUY8	�lU�f�mUY8	�nU�&�oUY8	�pU��qUY8	�rU�F�sUY8	�tU�F�uUY8	�vU
�f�wUY8	�xU�E�yUY8	�zU"�9�{UY8	�|U#�I�}UY8	�~U)�)�UY8	�@V*�9�AVY8	�BV$�Y�CVY8	�DV�F�EVY8	�FV�F�GVY8	�HV�V�IVY8	�JV�F�KVY8	�LV�V�MVY8	�NV�F�OVY8	�PV�V�QVY8	�RV��SVY8	�TV��UVY8	�VV�V�WVY8	�XV��YVY8	�ZV
�f�[VY8	�\V
�6�]VY8	�^V�j�_VY8	�`V�v�aVY8	�bV�&�cVY8	�dV��eVY8	�fV��gVY8	�hV��iVY8	�jV��kVY8	�lV�&�mVY8	�nV��oVY8	�pV�&�qVY8	�rV��sVY8	�tV��uVY8	�vV�&�wVY8	�xV�v�yVY8	�zV�f�{VY8	�|V��}VY8	�~V�V�VY8	�@W�f�AWY8	�BW)�&�CWY8	�DW)�&�EWY8	�FW)�&�GWY8	�HW)�&�IWY8	�JW)�&�KWY8	�LW)�&�MWY8	�NW)�&�OWY8	�PW)�&�QWY8	�RW)�&�SWY8	�TW)�&�UWY8	�VW)�&�WWY8	�XW)�&�YWY8	�ZW)�&�[WY8	�\W)�&�]WY8	�^W)�&�_WY8	�`W)�&�aWY8	�bW)�&�cWY8	�dW)�&�eWY8	�fW)�&�gWY8	�hW)�&�iWY8	�jW)�&�kWY8	�lW)�&�mWY8	�nW)�&�oWY8	�pW)�&�qWY8	�rW)�&�sWY8	�tW)�&�uWY8	�vW��wWY8	�xW�V�yWY8	�zW��{WY8	�|W�V�}WY8	�~W�V�WY8	�@X��AXY8	�BX�v�CXY8	�DX�v�EXY8	�FX�%�GXY8	�HX��IXY8	�JX
�6�KXY8	�LX�&�MXY8	�NX�V�OXY8	�PX
�6�QXY8	�RX
�6�SXY8	�TX�v�UXY8	�VX�V�WXY8	�XX�F�YXY8	�ZX(��[XY8	�\X
�f�]XY8	�^X�F�_XY8	�`X�V�aXY8	�bX
�6�cXY8	�dX
�f�eXY8	�fX�F�gXY8	�hX�F�iXY8	�jX��kXY8	�lX�F�mXY8	�nX�v�oXY8	�pX�V�qXY8	�rX�F�sXY8	�tX��uXY8	�vX�V�wXY8	�xX�e�yXY8	�zX��{XY8	�|X�u�}XY8	�~X�U�XY8	�@Y��AYY8	�BY��CYY8	�DY
�e�EYY8	�FY
�e�GYY8	�HY=�e�IYY8	�JY�e�KYY8	�LY ��MYY8	�NY��OYY8	�PY�E�QYY8	�RY>�u�SYY8	�TY�U�UYY8	�VY>�u�WYY8	�XY�5�YYY8	�ZY
�e�[YY8	�\Y�U�]YY8	�^Y�U�_YY8	�`Y�U�aYY8	�bY�u�cYY8	�dY�u�eYY8	�fY�v�gYY8	�hY�F�iYY8	�jY�V�kYY8	�lY�F�mYY8	�nY�v�oYY8	�pY��qYY8	�rY!�&�sYY8	�tY��uYY8	�vY�V�wYY8	�xY�F�yYY8	�zY�f�{YY8	�|Y
�f�}YY8	�~Y�6�YY8	�@Z�u�AZY8	�BZ
�e�CZY8	�DZ��EZY8	�FZ�6�GZY8	�HZ�v�IZY8	�JZ�F�KZY8	�LZ�V�MZY8	�NZ��OZY8	�PZ
�f�QZY8	�RZ��SZY8	�TZ�v�UZY8	�VZ��WZY8	�XZ
�f�YZY8	�ZZ��[ZY8	�\Z
�f�]ZY8	�^Z��_ZY8	�`Z
�f�aZY8	�bZ��cZY8	�dZ
�f�eZY8	�fZ��gZY8	�hZ
�f�iZY8	�jZ��kZY8	�lZ
�f�mZY8	�nZ��oZY8	�pZ�v�qZY8	�rZ��sZY8	�tZ
�f�uZY8	�vZ��wZY8	�xZ�v�yZY8	�zZ��{ZY8	�|Z
�f�}ZY8	�~Z��ZY8	�@[
�f�A[Y8	�B[�&�C[Y8	�D[�F�E[Y8	�F[�f�G[Y8	�H[�v�I[Y8	�J[�&�K[Y8	�L[��M[Y8	�N[�F�O[Y8	�P[�6�Q[Y8	�R[�&�S[Y8	�T[��U[Y8	�V[�F�W[Y8	�X[�F�Y[Y8	�Z[�F�[[Y8	�\[��][Y8	�^[
�6�_[Y8	�`[�V�a[Y8	�b[�F�c[Y8	�d[
�f�e[Y8	�f[�v�g[Y8	�h[�F�i[Y8	�j[�V�k[Y8	�l[�v�m[Y8	�n[&�v�o[Y8	�p[�F�q[Y8	�r[�V�s[Y8	�t[�F�u[Y8	�v[�V�w[Y8	�x[�F�y[Y8	�z[�v�{[Y8	�|[�E�}[Y8	�~[��[Y8	�@\�5�A\Y8	�B\�V�C\Y8	�D\�v�E\Y8	�F\��G\Y8	�H\�%�I\Y8	�J\�v�K\Y8	�L\�v�M\Y8	�N\�F�O\Y8	�P\�6�Q\Y8	�R\�f�S\Y8	�T\�&�U\Y8	�V\�F�W\Y8	�X\��Y\Y8	�Z\�U�[\Y8	�\\�E�]\Y8	�^\�F�_\Y8	�`\,�V�a\Y8	�b\)�&�c\Y8	�d\)�&�e\Y8	�f\)�&�g\Y8	�h\)�&�i\Y8	�j\
�6�k\Y8	�l\�U�m\Y8	�n\�v�o\Y8	�p\�F�q\Y8	�r\�5�s\Y8	�t\�f�u\Y8	�v\�&�w\Y8	�x\�v�y\Y8	�z\
�6�{\Y8	�|\
�f�}\Y8	�~\�V�\Y8	�@]�V�A]Y8	�B]�v�C]Y8	�D]�v�E]Y8	�F]�F�G]Y8	�H]�v�I]Y8	�J]��K]Y8	�L]�&�M]Y8	�N]�&�O]Y8	�P]��Q]Y8	�R]#�F�S]Y8	�T]#�F�U]Y8	�V]
�6�W]Y8	�X]��Y]Y8	�Z]�V�[]Y8	�\]
�6�]]Y8	�^]�v�_]Y8	�`]"�6�a]Y8	�b]#�F�c]Y8	�d]��e]Y8	�f]�V�g]Y8	�h]��i]Y8	�j]�V�k]Y8	�l]�J�m]Y8	�n]�
�o]Y8	�p]�
�q]Y8	�r]�z�s]Y8	�t]�
�u]Y8	�v]�z�w]Y8	�x]��y]Y8	�z]�:�{]Y8	�|]!�*�}]Y8	�~]�*�]Y8	�@^�
�A^Y8	�B^�j�C^Y8	�D^ ��E^Y8	�F^�*�G^Y8	�H^�
�I^Y8	�J^�:�K^Y8	�L^�
�M^Y8	�N^�
�O^Y8	�P^�:�Q^Y8	�R^��S^Y8	�T^�
�U^Y8	�V^�
�W^Y8	�X^�z�Y^Y8	�Z^�j�[^Y8	�\^�
�]^Y8	�^^�z�_^Y8	�`^�
�a^Y8	�b^$�Z�c^Y8	�d^��e^Y8	�f^�j�g^Y8	�h^�z�i^Y8	�j^.�z�k^Y8	�l^&�z�m^Y8	�n^�z�o^Y8	�p^��q^Y8	�r^�Z�s^Y8	�t^�
�u^Y8	�v^��w^Y8	�x^��y^Y8	�z^�z�{^Y8	�|^�z�}^Y8	�~^�:�^Y8	�@_%�j�A_Y8	�B_�z�C_Y8	�D_(��E_Y8	�F_�
�G_Y8	�H_�Z�I_Y8	�J_�j�K_Y8	�L_�j�M_Y8	�N_ ��O_Y8	�P_!�*�Q_Y8	�R_�z�S_Y8	�T_��U_Y8	�V_�
�W_Y8	�X_$�Z�Y_Y8	�Z_!�*�[_Y8	�\_�Z�]_Y8	�^_�:�__Y8	�`_�
�a_Y8	�b_�Z�c_Y8	�d_��e_Y8	�f_�z�g_Y8	�h_�z�i_Y8	�j_ ��k_Y8	�l_�
�m_Y8	�n_�Z�o_Y8	�p_��q_Y8	�r_��s_Y8	�t_"�:�u_Y8	�v_�
�w_Y8	�x_�j�y_Y8	�z_�J�{_Y8	�|_!�*�}_Y8	�~_�
�_Y8	�@`�
�A`Y8	�B`��C`Y8	�D`�z�E`Y8	�F` ��G`Y8	�H`�j�I`Y8	�J`�Z�K`Y8	�L`�
�M`Y8	�N`�z�O`Y8	�P`�j�Q`Y8	�R` ��S`Y8	�T`+�J�U`Y8	�V`�j�W`Y8	�X`�z�Y`Y8	�Z`�
�[`Y8	�\`�
�]`Y8	�^`�j�_`Y8	�``�*�a`Y8	�b`�z�c`Y8	�d`�*�e`Y8	�f`�
�g`Y8	�h`�:�i`Y8	�j`�Z�k`Y8	�l`�*�m`Y8	�n`��o`Y8	�p`�z�q`Y8	�r`�z�s`Y8	�t`�z�u`Y8	�v`�j�w`Y8	�x`(��y`Y8	�z`��{`Y8	�|`�*�}`Y8	�~`�
�`Y8	�@a�
�AaY8	�Ba�j�CaY8	�Da�*�EaY8	�Fa�Z�GaY8	�Ha�Z�IaY8	�Ja�
�KaY8	�La�J�MaY8	�Na�z�OaY8	�Pa�j�QaY8	�Ra�
�SaY8	�Ta�j�UaY8	�Va�z�WaY8	�Xa�z�YaY8	�Za�:�[aY8	�\a�j�]aY8	�^a��_aY8	�`a�z�aaY8	�ba�z�caY8	�da�:�eaY8	�fa�Z�gaY8	�ha�z�iaY8	�ja�
�kaY8	�la�
�maY8	�na�
�oaY8	�pa�j�qaY8	�ra�j�saY8	�ta�*�uaY8	�va�:�waY8	�xa�j�yaY8	�za�*�{aY8	�|a�:�}aY8	�~a�z�aY8	�@b��AbY8	�Bb��CbY8	�Db�Z�EbY8	�Fb�j�GbY8	�Hb ��IbY8	�Jb�:�KbY8	�Lb�:�MbY8	�Nb�*�ObY8	�Pb�
�QbY8	�Rb�z�SbY8	�Tb�:�UbY8	�Vb�
�WbY8	�Xb�z�YbY8	�Zb��[bY8	�\b�:�]bY8	�^b�:�_bY8	�`b�
�abY8	�bb�:�cbY8	�db�
�ebY8	�fb�
�gbY8	�hb�j�ibY8	�jb�j�kbY8	�lb�J�mbY8	�nb�j�obY8	�pb�J�qbY8	�rb�*�sbY8	�tb�j�ubY8	�vb�
�wbY8	�xb�Z�ybY8	�zb�z�{bY8	�|b�J�}bY8	�~b(��bY8	�@c�z�AcY8	�Bc�Z�CcY8	�Dc��EcY8	�Fc�j�GcY8	�Hc'�
�IcY8	�Jc�z�KcY8	�Lc ��McY8	�Nc��OcY8	�Pc�Z�QcY8	�Rc�J�ScY8	�Tc ��UcY8	�Vc�z�WcY8	�Xc��YcY8	�Zc�J�[cY8	�\c�j�]cY8	�^c�
�_cY8	�`c�z�acY8	�bc�z�ccY8	�dc��ecY8	�fc�j�gcY8	�hc�:�icY8	�jc�Z�kcY8	�lc�
�mcY8	�nc�z�ocY8	�pc�:�qcY8	�rc�Z�scY8	�tc�*�ucY8	�vc�Z�wcY8	�xc��ycY8	�zc��{cY8	�|c�
�}cY8	�~c�
�cY8	�@d�Z�AdY8	�Bd6�z�CdY8	�Dd�J�EdY8	�Fd�J�GdY8	�Hd�j�IdY8	�Jd�*�KdY8	�Ld�
�MdY8	�Nd�:�OdY8	�Pd!�*�QdY8	�Rd�*�SdY8	�Td�:�UdY8	�Vd%�j�WdY8	�Xd(��YdY8	�Zd�j�[dY8	�\d��]dY8	�^d$�Z�_dY8	�`d�*�adY8	�bd�z�cdY8	�dd�J�edY8	�fd�j�gdY8	�hd&�z�idY8	�jd�z�kdY8	�ld�:�mdY8	�nd��odY8	�pd��qdY8	�rd�Z�sdY8	�td�Z�udY8	�vd�
�wdY8	�xd�j�ydY8	�zd!�*�{dY8	�|d ��}dY8	�~d�
�dY8	�@e�z�AeY8	�Be�Z�CeY8	�De&�z�EeY8	�Fe�z�GeY8	�He%�j�IeY8	�Je#�J�KeY8	�Le�z�MeY8	�Ne�
�OeY8	�Pe$�Z�QeY8	�Re�z�SeY8	�Te�j�UeY8	�Ve�
�WeY8	�Xe�:�YeY8	�Ze�
�[eY8	�\e�Z�]eY8	�^e�*�_eY8	�`e�
�aeY8	�be�
�ceY8	�de�z�eeY8	�fe�j�geY8	�he�z�ieY8	�je��keY8	�le�z�meY8	�ne�E�oeY8	�pe�e�qeY8	�re
�f�seY8	�te�v�ueY8	�ve�&�weY8	�xe�V�yeY8	�ze�F�{eY8	�|e�V�}eY8	�~e��eY8	�@f��AfY8	�Bf�6�CfY8	�Df
�6�EfY8	�Ff�V�GfY8	�Hf
�f�IfY8	�Jf�F�KfY8	�Lf��MfY8	�Nf��OfY8	�Pf��QfY8	�Rf�F�SfY8	�Tf�&�UfY8	�Vf��WfY8	�Xf�v�YfY8	�Zf�v�[fY8	�\f�F�]fY8	�^f�&�_fY8	�`f�F�afY8	�bf�V�cfY8	�df�&�efY8	�ff�U�gfY8	�hf�5�ifY8	�jf�e�kfY8	�lf,�U�mfY8	�nf��ofY8	�pf�5�qfY8	�rf�u�sfY8	�tf��ufY8	�vf��wfY8	�xf��yfY8	�zf�v�{fY8	�|f
�5�}fY8	�~f�V�fY8	�@g�V�AgY8	�Bg
�6�CgY8	�Dg�V�EgY8	�Fg��GgY8	�Hg
�e�IgY8	�Jg�%�KgY8	�Lg��MgY8	�Ng�e�OgY8	�Pg�v�QgY8	�Rg
�6�SgY8	�Tg
�f�UgY8	�Vg ��WgY8	�Xg
�6�YgY8	�Zg�v�[gY8	�\g�%�]gY8	�^g�F�_gY8	�`g
�6�agY8	�bg�F�cgY8	�dg�F�egY8	�fg�v�ggY8	�hg�v�igY8	�jg�v�kgY8	�lg�f�mgY8	�ng�V�ogY8	�pg�v�qgY8	�rg�V�sgY8	�tg��ugY8	�vg�I�wgY8	�xg
�9�ygY8	�zg
�6�{gY8	�|g
�9�}gY8	�~g�Y�gY8	�@h�I�AhY8	�Bh�I�ChY8	�Dh
�9�EhY8	�Fh�Y�GhY8	�Hh�Y�IhY8	�Jh�I�KhY8	�Lh�&�MhY8	�Nh�6�OhY8	�Ph�v�QhY8	�Rh�6�ShY8	�Th�F�UhY8	�Vh
�f�WhY8	�Xh��YhY8	�Zh"�6�[hY8	�\h
�f�]hY8	�^h
�6�_hY8	�`h��ahY8	�bh ��chY8	�dh�%�ehY8	�fh�F�ghY8	�hh��ihY8	�jh
�6�khY8	�lh�f�mhY8	�nh��ohY8	�ph��qhY8	�rh�v�shY8	�th�V�uhY8	�vh�v�whY8	�xh
�f�yhY8	�zh&�v�{hY8	�|h�6�}hY8	�~h�v�hY8	�@i��AiY8	�Bi�F�CiY8	�Di!�&�EiY8	�Fi�F�GiY8	�Hi��IiY8	�Ji
�f�KiY8	�Li�v�MiY8	�Ni��OiY8	�Pi��QiY8	�Ri�&�SiY8	�Ti�&�UiY8	�Vi
�f�WiY8	�Xi�F�YiY8	�Zi�V�[iY8	�\i�V�]iY8	�^i��_iY8	�`i	�&�aiY8	�bi"�5�ciY8	�di��eiY8	�fi��giY8	�hi	�&�iiY8	�ji�v�kiY8	�li�&�miY8	�ni�V�oiY8	�pi��qiY8	�ri�&�siY8	�ti��uiY8	�vi��wiY8	�xi
�f�yiY8	�zi��{iY8	�|i�6�}iY8	�~i��iY8	�@j	�&�AjY8	�Bj�F�CjY8	�Dj
�f�EjY8	�Fj�F�GjY8	�Hj��IjY8	�Jj	�&�KjY8	�Lj�F�MjY8	�Nj�F�OjY8	�Pj�v�QjY8	�Rj�u�SjY8	�Tj�v�UjY8	�Vj��WjY8	�Xj
�6�YjY8	�Zj�F�[jY8	�\j��]jY8	�^j�f�_jY8	�`j�F�ajY8	�bj��cjY8	�dj��ejY8	�fj�F�gjY8	�hj
�f�ijY8	�jj�F�kjY8	�lj�F�mjY8	�nj
�f�ojY8	�pj
�6�qjY8	�rj�6�sjY8	�tj�f�ujY8	�vj
�6�wjY8	�xj�F�yjY8	�zj�V�{jY8	�|j�6�}jY8	�~j�F�jY8	�@k�v�AkY8	�Bk�v�CkY8	�Dk��EkY8	�Fk��GkY8	�Hk�E�IkY8	�Jk�E�KkY8	�Lk'��MkY8	�Nk<�V�OkY8	�Pk��QkY8	�Rk�V�SkY8	�Tk��UkY8	�Vk0��WkY8	�Xk��YkY8	�Zk��[kY8	�\k�F�]kY8	�^k�V�_kY8	�`k�F�akY8	�bk�v�ckY8	�dk
�f�ekY8	�fk�v�gkY8	�hk�v�ikY8	�jk�E�kkY8	�lk
�e�mkY8	�nk�f�okY8	�pk��qkY8	�rk�6�skY8	�tk�V�ukY8	�vk�V�wkY8	�xk�F�ykY8	�zk��{kY8	�|k
�6�}kY8	�~k�f�kY8	�@l��AlY8	�Bl
�f�ClY8	�Dl�V�ElY8	�Fl�f�GlY8	�Hl�&�IlY8	�Jl��KlY8	�Ll�&�MlY8	�Nl�6�OlY8	�Pl
�f�QlY8	�Rl�6�SlY8	�Tl�V�UlY8	�Vl��WlY8	�Xl��YlY8	�Zl�V�[lY8	�\l�V�]lY8	�^l�v�_lY8	�`l�F�alY8	�bl
�e�clY8	�dl��elY8	�fl�F�glY8	�hl��ilY8	�jl��klY8	�ll�V�mlY8	�nl�v�olY8	�pl�F�qlY8	�rl�V�slY8	�tl�&�ulY8	�vl"�6�wlY8	�xl�6�ylY8	�zl�v�{lY8	�|l�V�}lY8	�~l�6�lY8	�@m�V�AmY8	�Bm�V�CmY8	�Dm�V�EmY8	�Fm�V�GmY8	�Hm�V�ImY8	�Jm�V�KmY8	�Lm�V�MmY8	�Nm�V�OmY8	�Pm�V�QmY8	�Rm�V�SmY8	�Tm�V�UmY8	�Vm	�&�WmY8	�Xm�F�YmY8	�Zm�F�[mY8	�\m	�&�]mY8	�^m�F�_mY8	�`m	�&�amY8	�bm
�6�cmY8	�dm	�&�emY8	�fm	�&�gmY8	�hm
�6�imY8	�jm	�&�kmY8	�lm	�&�mmY8	�nm��omY8	�pm�V�qmY8	�rm�E�smY8	�tm�F�umY8	�vm
�f�wmY8	�xm�v�ymY8	�zm�V�{mY8	�|m
�f�}mY8	�~m#�F�mY8	�@n
�6�AnY8	�Bn	�&�CnY8	�Dn�&�EnY8	�Fn	�&�GnY8	�Hn��InY8	�Jn
�6�KnY8	�Ln	�&�MnY8	�Nn�&�OnY8	�Pn�e�QnY8	�Rn
�f�SnY8	�Tn
�f�UnY8	�Vn
�6�WnY8	�Xn	�%�YnY8	�Zn
�f�[nY8	�\n�v�]nY8	�^n�v�_nY8	�`n ��anY8	�bn��cnY8	�dn�&�enY8	�fn�f�gnY8	�hn�U�inY8	�jn��knY8	�ln��mnY8	�nn��onY8	�pn
�6�qnY8	�rn	�&�snY8	�tn�V�unY8	�vn��wnY8	�xn�F�ynY8	�zn��{nY8	�|n�F�}nY8	�~n�&�nY8	�@o�V�AoY8	�Bo�V�CoY8	�Do
�f�EoY8	�Fo�%�GoY8	�Ho�&�IoY8	�Jo��KoY8	�Lo�5�MoY8	�No��OoY8	�Po�&�QoY8	�Ro ��SoY8	�To�E�UoY8	�Vo�U�WoY8	�Xo�6�YoY8	�Zo�u�[oY8	�\o�f�]oY8	�^o'��_oY8	�`o!�&�aoY8	�bo�&�coY8	�do��eoY8	�fo��goY8	�ho�F�ioY8	�jo�F�koY8	�lo�v�moY8	�no�F�ooY8	�po�f�qoY8	�ro�&�soY8	�to
�f�uoY8	�vo
�f�woY8	�xo�v�yoY8	�zo�F�{oY8	�|o�&�}oY8	�~o�F�oY8	�@p�F�ApY8	�Bp�F�CpY8	�Dp�F�EpY8	�Fp�F�GpY8	�Hp�F�IpY8	�Jp�F�KpY8	�Lp�F�MpY8	�Np�F�OpY8	�Pp�F�QpY8	�Rp�F�SpY8	�Tp�F�UpY8	�Vp�F�WpY8	�Xp�F�YpY8	�Zp�F�[pY8	�\p�F�]pY8	�^p�F�_pY8	�`p�F�apY8	�bp�F�cpY8	�dp�F�epY8	�fp�F�gpY8	�hp�F�ipY8	�jp#�"�"�"�qpY8	�r�python3.12/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-312.pyc000064400000003577151732702050022323 0ustar00�

R`i����ddlmZmZmZed�Zdeedeeeeffd�Zdeedeeeeffd�Zdeedeeeeeffd�Zy)	�)�Iterable�Tuple�TypeVar�T�values�returnc#�~K�t|�}	t|�}d|f��|D]}d|f���
y#t$rYywxYw�w)z9Iterate and generate a tuple with a flag for first value.NTF��iter�next�
StopIteration)r�iter_values�values   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_loop.py�
loop_firstrsQ�����v�,�K���[�!����+�����U�l��������s�=�.�=�	:�=�:�=c#�K�t|�}	t|�}|D]
}d|f��|}�d|f��y#t$rYywxYw�w)z8Iterate and generate a tuple with a flag for last value.NFTr
)rr�previous_valuers    r�	loop_lastrsZ�����v�,�K���k�*�����^�#�#������
�������s�?�0�?�	<�?�<�?c#�K�t|�}	t|�}d}|D]
}|d|f��d}|}�|d|f��y#t$rYywxYw�w)zBIterate and generate a tuple with a flag for first and last value.NTFr
)rrr�firstrs     r�loop_first_lastrsh�����v�,�K���k�*��
�E����U�N�*�*��������~�
%�%������s$�A�6�A�	A�A�A�AN)	�typingrrrr�boolrrr��r�<module>rs���+�+��C�L��	�x��{�	�x��d�A�g��'?�	�
�h�q�k�
�h�u�T�1�W�~�&>�
�&�H�Q�K�&�H�U�4��q�=�5I�,J�&rpython3.12/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-312.pyc000064400000007034151732702050024722 0ustar00�

R`i�
��Z�ddlmZmZmZmZddlmZmZddlm	Z	m
Z
mZdeededdfd�Zy)	�)�Iterable�Sequence�Tuple�cast)�LegacyWindowsTerm�WindowsCoordinates)�ControlCode�ControlType�Segment�buffer�term�returnNc	��|D�]�\}}}|s'|r|j||��|j|��1|}|D�]�}|d}|tjk(rIt	t
tttf|�\}}	}
|jt|
dz
|	dz
����e|tjk(r|jd���|tjk(r|jtdd����|tjk(r|j���|tjk(r|j���|tjk(r|j!���'|tj"k(r|j%���L|tj&k(r6t	t
ttf|�\}}|j)|dz
����|tj*k(r|j-����|tj.k(r|j1����|tj2k(rgt	t
ttf|�\}}|dk(r|j5���)|dk(r|j7���@|dk(s��G|j9���Y|tj:k(s��nt	t
tt<f|�\}}
|j?|
�������y)aMakes appropriate Windows Console API calls based on the segments in the buffer.

    Args:
        buffer (Iterable[Segment]): Iterable of Segments to convert to Win32 API calls.
        term (LegacyWindowsTerm): Used to call the Windows Console API.
    r�)�row�col�
�N) �write_styled�
write_textr
�CURSOR_MOVE_TOrr�int�move_cursor_tor�CARRIAGE_RETURN�HOME�	CURSOR_UP�move_cursor_up�CURSOR_DOWN�move_cursor_down�CURSOR_FORWARD�move_cursor_forward�CURSOR_BACKWARD�move_cursor_backward�CURSOR_MOVE_TO_COLUMN�move_cursor_to_column�HIDE_CURSOR�hide_cursor�SHOW_CURSOR�show_cursor�
ERASE_IN_LINE�erase_end_of_line�erase_start_of_line�
erase_line�SET_WINDOW_TITLE�str�	set_title)rr
�text�style�control�
control_codes�control_code�control_type�_�x�y�column�mode�titles              ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_windows_renderer.py�legacy_windows_renderr>sA��!'���e�W����!�!�$��.�����%�3:�M� -��+�A����;�#=�#=�=�"�5��c�3�)>�#?��N�G�A�q�!��'�'�(:�q�1�u�!�a�%�(P�Q�!�[�%@�%@�@��O�O�D�)�!�[�%5�%5�5��'�'�(:�1�a�(@�A�!�[�%:�%:�:��'�'�)�!�[�%<�%<�<��)�)�+�!�[�%?�%?�?��,�,�.�!�[�%@�%@�@��-�-�/�!�[�%F�%F�F� $�U�;��+;�%<�l� K�I�A�v��.�.�v��z�:�!�[�%<�%<�<��$�$�&�!�[�%<�%<�<��$�$�&�!�[�%>�%>�>�"�5��c�)9�#:�L�I�G�A�t��q�y��.�.�0�����0�0�2�������)�!�[�%A�%A�A�#�E�+�s�*:�$;�\�J�H�A�u��N�N�5�)�E!.�!'�)
�typingrrrr�pip._vendor.rich._win32_consolerr�pip._vendor.rich.segmentr	r
rr>�r?r=�<module>rDs5��2�2�Q�F�F�1*�(�7�"3�1*�;L�1*�QU�1*r?python3.12/site-packages/pip/_vendor/rich/__pycache__/box.cpython-312.pyc000064400000027157151732702050022003 0ustar00�

R`ir&����UddlZddlmZmZmZej
dk\rddlmZnddlmZddlm	Z	erddl
mZGd�d	�Zed
d��Z
eed
<edd��Zeed<edd��Zeed<ed�Zeed<ed�Zeed<ed�Zeed<ed�Zeed<ed�Zeed<ed�Zeed<ed�Zeed<ed �Zeed!<ed"�Zeed#<ed$�Zeed%<ed&�Zeed'<ed(�Zeed)<ed*�Zeed+<ed,�Zeed-<ed.�Zeed/<ed0d��Z eed1<eeeeeeeeeeeeiZ!eeeeeeeeeeiZ"e#d2k(�r
dd3l$m%Z%dd4l&m'Z'dd5l(m)Z)dd6l*m+Z+dd7l,m-Z-dd8l.m/Z/e+d�9�Z*gd:�Z0e*jce'd;d<�=�d>�?�e*jc�e%dd@�A�Z2e3e0�D]�Z4e-ddBdCd�D�Z,e,jkdEdF�e,jkdGdH�e,jmdIdI�e,jmdIdI�e7e)e4�e,_)e/dJe4��dK�=�e,_8e2jse,���e*jce2�yy)L�N)�
TYPE_CHECKING�Iterable�List)��)�Literal�)�	loop_last)�ConsoleOptionsc	��eZdZdZdd�dededdfd�Zdefd	�Zdefd
�Zdddd
eddfd�Z	dd�Z
deedefd�Z
		ddeededdedefd�Zdeedefd�Zy)�BoxuqDefines characters to render boxes.

    ┌─┬┐ top
    │ ││ head
    ├─┼┤ head_row
    │ ││ mid
    ├─┼┤ row
    ├─┼┤ foot_row
    │ ││ foot
    └─┴┘ bottom

    Args:
        box (str): Characters making up box.
        ascii (bool, optional): True if this box uses ascii characters only. Default is False.
    F��ascii�boxr�returnNc�v�||_||_|j�\}}}}}}}	}
t|�\|_|_|_|_t|�\|_}|_	|_
t|�\|_|_|_
|_t|�\|_}|_|_t|�\|_|_|_|_t|�\|_|_|_|_t|	�\|_}|_|_t|
�\|_|_|_|_ y�N)!�_boxr�
splitlines�iter�top_left�top�top_divider�	top_right�	head_left�
head_vertical�
head_right�
head_row_left�head_row_horizontal�head_row_cross�head_row_right�mid_left�mid_vertical�	mid_right�row_left�row_horizontal�	row_cross�	row_right�
foot_row_left�foot_row_horizontal�foot_row_cross�foot_row_right�	foot_left�
foot_vertical�
foot_right�bottom_left�bottom�bottom_divider�bottom_right)�selfrr�line1�line2�line3�line4�line5�line6�line7�line8�_s            ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/box.py�__init__zBox.__init__!s&����	���
�AO����AQ�>��u�e�U�E�5�%��DH��K�A��
�t�x��!1�4�>�AE�e��>����4�-�t��
��K�	
����$�����?C�5�k�;��
�q�$�+�T�^�MQ�RW�[�J��
�t�*�D�N�D�N�
��K�	
����$�����BF�e��>����4�-�t��PT��Q
�M���$�+�t�':�D�<M�c��y)NzBox(...)��r4s r>�__repr__zBox.__repr__Cs��r@c��|jSr)rrCs r>�__str__zBox.__str__Fs���y�y�r@�optionsr�safec��|}|jr|rtj||�}|jr|jst
}|S)a�Substitute this box for another if it won't render due to platform issues.

        Args:
            options (ConsoleOptions): Console options used in rendering.
            safe (bool, optional): Substitute this for another Box if there are known problems
                displaying on the platform (currently only relevant on Windows). Default is True.

        Returns:
            Box: A different Box or the same Box.
        )�legacy_windows�LEGACY_WINDOWS_SUBSTITUTIONS�get�
ascii_onlyr�ASCII)r4rGrHrs    r>�
substitutezBox.substituteIs?�����!�!�d�.�2�2�3��<�C����c�i�i��C��
r@c�.�tj||�S)aCIf this box uses special characters for the borders of the header, then
        return the equivalent box that does not.

        Returns:
            Box: The most similar Box that doesn't use header-specific box characters.
                If the current Box already satisfies this criterion, then it's returned.
        )�PLAIN_HEADED_SUBSTITUTIONSrLrCs r>�get_plain_headed_boxzBox.get_plain_headed_box[s��*�-�-�d�D�9�9r@�widthsc��g}|j}||j�t|�D]/\}}||j|z�|r�||j��1||j
�dj
|�S)z�Get the top of a simple box.

        Args:
            widths (List[int]): Widths of columns.

        Returns:
            str: A string of box characters.
        �)�appendrr
rrr�join�r4rS�partsrV�last�widths      r>�get_topzBox.get_topeso���������t�}�}��$�V�,�K�D�%��4�8�8�e�#�$���t�'�'�(�-�	�t�~�~���w�w�u�~�r@�level)�head�row�foot�mid�edgec�l�|dk(r1|j}|j}|j}|j}n�|dk(r1|j}|j
}|j}|j}nm|dk(r'|j}d}|j}|j}nA|dk(r1|j}|j}|j}|j}ntd��g}|j }	|r|	|�t#|�D]\}
}|	||z�|
r�|	|��|r|	|�dj%|�S)z�Get the top of a simple box.

        Args:
            width (List[int]): Widths of columns.

        Returns:
            str: A string of box characters.
        r^r_ra� r`z%level must be 'head', 'row' or 'foot'rU)rrr r!r%r&r'r(r"r#r$r)r*r+r,�
ValueErrorrVr
rW)r4rSr]rb�left�
horizontal�cross�rightrYrVrZr[s            r>�get_rowzBox.get_rowys(���F�?��%�%�D��1�1�J��'�'�E��'�'�E�
�e�^��=�=�D��,�,�J��N�N�E��N�N�E�
�e�^��=�=�D��J��%�%�E��N�N�E�
�f�_��%�%�D��1�1�J��'�'�E��'�'�E��D�E�E���������4�L�$�V�,�K�D�%��:��%�&���u�
�-���5�M��w�w�u�~�r@c��g}|j}||j�t|�D]/\}}||j|z�|r�||j��1||j
�dj
|�S)z�Get the bottom of a simple box.

        Args:
            widths (List[int]): Widths of columns.

        Returns:
            str: A string of box characters.
        rU)rVr0r
r1r2r3rWrXs      r>�
get_bottomzBox.get_bottom�ss���������t��� �$�V�,�K�D�%��4�;�;��&�'���t�*�*�+�-�	�t� � �!��w�w�u�~�r@)T)rr
)r_T)�__name__�
__module__�__qualname__�__doc__�str�boolr?rDrFrOrRr�intr\rrjrlrBr@r>r
r
s���� 38� 
�C� 
�4� 
�D� 
�D�#������"2��$��%��$:��h�s�m����.8=��	/���
�/��3�4�/��	/�


�/�b��#���3�r@r
z(+--+
| ||
|-+|
| ||
|-+|
|-+|
| ||
+--+
TrrNz(+-++
| ||
+-++
| ||
+-++
+-++
| ||
+-++
�ASCII2z(+-++
| ||
+=++
| ||
+-++
+-++
| ||
+-++
�ASCII_DOUBLE_HEADub┌─┬┐
│ ││
├─┼┤
│ ││
├─┼┤
├─┼┤
│ ││
└─┴┘
�SQUAREub┌─┬┐
│ ││
╞═╪╡
│ ││
├─┼┤
├─┼┤
│ ││
└─┴┘
�SQUARE_DOUBLE_HEADuJ  ╷ 
  │ 
╶─┼╴
  │ 
╶─┼╴
╶─┼╴
  │ 
  ╵ 
�MINIMALuJ  ╷ 
  │ 
╺━┿╸
  │ 
╶─┼╴
╶─┼╴
  │ 
  ╵ 
�MINIMAL_HEAVY_HEADu>  ╷ 
  │ 
 ═╪ 
  │ 
 ─┼ 
 ─┼ 
  │ 
  ╵ 
�MINIMAL_DOUBLE_HEADu0    
    
 ── 
    
    
 ── 
    
    
�SIMPLEu,    
    
 ── 
    
    
    
    
    
�SIMPLE_HEADu0    
    
 ━━ 
    
    
 ━━ 
    
    
�SIMPLE_HEAVYu< ── 
    
 ── 
    
 ── 
 ── 
    
 ── 
�HORIZONTALSub╭─┬╮
│ ││
├─┼┤
│ ││
├─┼┤
├─┼┤
│ ││
╰─┴╯
�ROUNDEDub┏━┳┓
┃ ┃┃
┣━╋┫
┃ ┃┃
┣━╋┫
┣━╋┫
┃ ┃┃
┗━┻┛
�HEAVYub┏━┯┓
┃ │┃
┠─┼┨
┃ │┃
┠─┼┨
┠─┼┨
┃ │┃
┗━┷┛
�
HEAVY_EDGEub┏━┳┓
┃ ┃┃
┡━╇┩
│ ││
├─┼┤
├─┼┤
│ ││
└─┴┘
�
HEAVY_HEADub╔═╦╗
║ ║║
╠═╬╣
║ ║║
╠═╬╣
╠═╬╣
║ ║║
╚═╩╝
�DOUBLEub╔═╤╗
║ │║
╟─┼╢
║ │║
╟─┼╢
╟─┼╢
║ │║
╚═╧╝
�DOUBLE_EDGEz(    
| ||
|-||
| ||
|-||
|-||
| ||
    
�MARKDOWN�__main__)�Columns)�Panel)r)�Console)�Table)�Text)�record)rNrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�z[bold green]Box Constants�green)�style�center)�justify�)�expand�padding�dimznot dim)�show_footerr��border_styler�zHeader 1zFooter 1zHeader 2zFooter 2�Cellzbox.�magenta):�sys�typingrrr�version_infor�pip._vendor.typing_extensions�_loopr
�pip._vendor.rich.consolerr
rN�__annotations__rtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�rKrQrm�pip._vendor.rich.columnsr��pip._vendor.rich.panelr�rUr�consoler��tabler��textr��BOXES�print�columns�sorted�box_name�
add_column�add_row�getattr�title�add_renderablerBr@r>�<module>r�se��
�0�0����v���5���7�l�l�^�	����s���	�������	����3���	������	���C���	������	���C���	���S���	������	���S���	���c���	���S���	������	���s���	��
�C���	��
�C���	������	���S���	����#�� �V����&�	�6�����
 �����������v����z��0�,�� ����T�"�G�
�E�,�M�M�%�3�7�C�X�M�V��M�M�O��T�1�-�G��5�M����E�	�$�
��	����Z�0�
����Z�0�
�
�
�f�f�%�
�
�
�f�f�%��C��*��	��T�(��,�I�>������u�%�"��M�M�'��cr@python3.12/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-312.pyc000064400000017276151732702050023654 0ustar00�

R`ip'���gd�Zy)(�)�rr)�����)��r)iior)i�i�r)i�i�r)�rr)i�i�r)i�i�r)��r	r)iir)iKi_r)�pr
r)i�i�r)i�i�r)i�i�r)i�i�r)�rr)i0iJr)i�i�r)i�i�r)�rr)iir)ii#r)i%i'r)i)i-r)iYi[r)i�i�r)i�i	r)�:	r
r)�<	rr)iA	iH	r)�M	rr)iQ	iW	r)ib	ic	r)�	rr)�	rr)i�	i�	r)��	rr)i�	i�	r)�	rr)i
i
r)�<
rr)iA
iB
r)iG
iH
r)iK
iM
r)�Q
rr)ip
iq
r)�u
rr)i�
i�
r)�
rr)i�
i�
r)i�
i�
r)��
rr)i�
i�
r)i�
i�
r)�rr)�<rr)�?rr)iAiDr)�Mrr)iUiVr)ibicr)�rr)�rr)��rr)�r r)�r!r)i>i@r)iFiHr)iJiMr)iUiVr)ibicr)�r"r)�r#r)�r$r)��r%r)i�i�r)i�i�r)i
i
r)i;
i<
r)iA
iD
r)�M
r&r)ib
ic
r)�
r'r)��
r(r)i�
i�
r)��
r)r)�1r*r)i4i:r)iGiNr)�r+r)i�i�r)i�i�r)iir)�5r,r)�7r-r)�9r.r)iqi~r)i�i�r)i�i�r)i�i�r)i�i�r)��r/r)i-i0r)i2i7r)i9i:r)i=i>r)iXiYr)i^i`r)iqitr)�r0r)i�i�r)�r1r)�r2r)ii_�)i]i_r)iir)i2i4r)iRiSr)irisr)i�i�r)i�i�r)��r4r)i�i�r)��r5r)ii
r)i�i�r)�r6r)i i"r)i'i(r)�2r7r)i9i;r)iir)�r8r)�Vr9r)iXi^r)�`r:r)�br;r)ieilr)isi|r)�r<r)i�i�r)iir)�4r=r)i6i:r)�<r>r)�Br?r)ikisr)i�i�r)i�i�r)i�i�r)i�i�r)��r@r)i�i�r)��rAr)i�i�r)i,i3r)i6i7r)i�i�r)i�i�r)i�i�r)��rBr)��rCr)i�i�r)i�i�r)i�i�r)i i r)i( i. r)i` ic r)i� i� r)i#i#r3)i)#i*#r3)i�#i�#r3)��#rDr3)��#rEr3)i�%i�%r3)i&i&r3)iH&iS&r3)�&rFr3)�&rGr3)�&rHr3)i�&i�&r3)i�&i�&r3)i�&i�&r3)��&rIr3)��&rJr3)��&rKr3)i�&i�&r3)�&rLr3)�&rMr3)�&rNr3)�'rOr3)i
'i'r3)�('rPr3)�L'rQr3)�N'rRr3)iS'iU'r3)�W'rSr3)i�'i�'r3)�'rTr3)�'rUr3)i+i+r3)�P+rVr3)�U+rWr3)i�,i�,r)�-rXr)i�-i�-r)i�.i�.r3)i�.i�.r3)i/i�/r3)i�/i�/r3)i0i)0r3)i*0i-0r)i.0i>0r3)iA0i�0r3)i�0i�0r)i�0i�0r3)i1i/1r3)i11i�1r3)i�1i�1r3)i�1i2r3)i 2iG2r3)iP2i�Mr3)iNi��r3)i��iƤr3)io�ir�r)it�i}�r)i��i��r)i�i�r)��rYr)��rZr)��r[r)i%�i&�r)�,�r\r)iĨiŨr)i�i�r)�r]r)i&�i-�r)iG�iQ�r)i`�i|�r3)i��i��r)鳩r^r)i��i��r)i��i��r)��r_r)i)�i.�r)i1�i2�r)i5�i6�r)�C�r`r)�L�rar)�|�rbr)鰪rcr)i��i��r)i��i��r)i��i��r)�rdr)i�i�r)�rer)��rfr)��rgr)��rhr)i�i��r3)i�i��r3)��rir)i�i�r)i�i�r3)i �i/�r)i0�iR�r3)iT�if�r3)ih�ik�r3)i�i`�r3)i�i�r3)�rjr)��rkr)ivizr)i
i
r)i
i
r)i
i
r)i8
i:
r)�?
rlr)i�
i�
r)i$
i'
r)i�i�r)iFiPr)�rmr)i8iFr)ii�r)i�i�r)i�i�r)iir)i'i+r)i-i4r)�srnr)i�i�r)i�i�r)i�i�r)��ror)i/i1r)�4rpr)i6i7r)�>rqr)��rrr)i�i�r)iir)i;i<r)�@rsr)ifilr)ipitr)i8i?r)iBiDr)�Frtr)�^rur)i�i�r)�rvr)i�i�r)i�i�r)i�i�r)i�i�r)i�i�r)i�i�r)i3i:r)�=rwr)i?i@r)�rxr)�ryr)i�i�r)�rzr)iir)i"i%r)i'i+r)i/i7r)i9i:r)i;i<r)�>r{r)�Cr|r)i�i�r)i�i�r)��r}r)ii
r)i3i8r)i;i>r)�Gr~r)iQiVr)iYi[r)i�i�r)i�i�r)i0i6r)i8i=r)�?rr)i�i�r)i�i�r)i�i�r)i�i�r)i1i6r)�:r�r)i<i=r)i?iEr)�Gr�r)i�i�r)�r�r)�r�r)i�i�r)i�ji�jr)i0ki6kr)�Oor�r)i�oi�or)i�oi�or3)��or�r)i�oi�or3)ipi��r3)i�iՌr3)i�i�r3)i�i�r3)iP�iR�r3)id�ig�r3)ip�i��r3)i��i��r)ig�ii�r)i{�i��r)i��i��r)i��i��r)iB�iD�r)i�i6�r)i;�il�r)�u�r�r)��r�r)i��i��r)i��i��r)i�i�r)i�i�r)i�i!�r)i#�i$�r)i&�i*�r)i0�i6�r)i��i��r)i��i��r)iD�iJ�r)��r�r3)���r�r3)��r�r3)i��i��r3)i�i�r3)i�i;�r3)i@�iH�r3)iP�iQ�r3)i`�ie�r3)i�i �r3)i-�i5�r3)i7�i|�r3)i~�i��r3)i��i��r3)i��i��r3)i��i��r3)���r�r3)i��i>�r3)�@�r�r3)iB�i��r3)i��i=�r3)iK�iN�r3)iP�ig�r3)�z�r�r3)i��i��r3)�r�r3)i��iO�r3)i��i�r3)��r�r3)i�i�r3)i�i�r3)i�i�r3)i�i��r3)i�i�r3)i�i:�r3)i<�iE�r3)iG�ix�r3)iz�i�r3)i�i��r3)ip�it�r3)ix�iz�r3)i��i��r3)i��i��r3)i��i��r3)i��i�r3)i�i�r3)ii��r3)ii��r3)ii�rN)�CELL_WIDTHS����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/_cell_widths.py�<module>r�s
��@�r�python3.12/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-312.pyc000064400000010341151732702050021742 0ustar00�

R`i����ddlmZmZddlmZddlmZmZmZddl	m
Z
ddlmZddl
mZddlmZgd	�Zgd
�ZdZGd�d
e
�Zy)�)�Optional�Union�)�Color)�Console�ConsoleOptions�RenderResult)�JupyterMixin)�Measurement)�Segment)�Style)�█rr�▐rr�▕r)� u▏u▎u▍u▌u▋u▊u▉rc��eZdZdZdddd�dedededeed	eee	fd
eee	ffd�Z
de	fd
�Zdede
defd�Zdede
defd�Zy)�Bara�Renders a solid block bar.

    Args:
        size (float): Value for the end of the bar.
        begin (float): Begin point (between 0 and size, inclusive).
        end (float): End point (between 0 and size, inclusive).
        width (int, optional): Width of the bar, or ``None`` for maximum width. Defaults to None.
        color (Union[Color, str], optional): Color of the bar. Defaults to "default".
        bgcolor (Union[Color, str], optional): Color of bar background. Defaults to "default".
    N�default)�width�color�bgcolor�size�begin�endrrrc��||_t|d�|_t||�|_||_t
||��|_y)Nr)rr)r�maxr�minrrr
�style)�selfrrrrrrs       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/bar.py�__init__zBar.__init__s:����	����]��
��s�D�>�����
����8��
��returnc�V�d|j�d|j�d|j�d�S)NzBar(z, �))rrr)rs r �__repr__zBar.__repr__-s)���d�i�i�[��4�:�:�,�b����
�!�<�<r"�console�optionsc#��K�t|j�|jn|j|j�}|j|jk\r2td|z|j���tj���yt|dz|jz|jz�}|dz}|dz}t|dz|jz|jz�}|dz}|dz}	d|z}
|r|
t|z
}
t|z}|	r|t|	z
}d|t|�z
z}t|
|t|
�dz|z|j���tj���y�w)Nr�)rr�	max_widthrrrr�line�intr�BEGIN_BLOCK_ELEMENTS�
FULL_BLOCK�END_BLOCK_ELEMENTS�len)
rr'r(r�prefix_complete_eights�prefix_bar_count�prefix_eights_count�body_complete_eights�body_bar_count�body_eights_count�prefix�body�suffixs
             r �__rich_console__zBar.__rich_console__0sZ������*�*�0�D�J�J�g�6G�6G����
��
�:�:����!��#��+�t�z�z�2�2��,�,�.� ��!$�U�Q�Y����%;�d�i�i�%G�!H��1�Q�6��4�q�8��"�5�1�9�t�x�x�#7�$�)�)�#C�D��-��2��0�1�4���'�'����*�+>�?�?�F��N�*����&�'8�9�9�D����D�	�)�*���f�t�C��K�M�2�2�V�;�T�Z�Z�H�H��l�l�n��s�E$E&c��|j� t|j|j�Std|j�S)N�)rrr+)rr'r(s   r �__rich_measure__zBar.__rich_measure__Ws>��
�z�z�%�
��
�
�D�J�J�/�	
��Q�� 1� 1�2�	
r")�__name__�
__module__�__qualname__�__doc__�floatrr-rr�strr!r&rrr	r;rr>�r"r rrs���	�" $�#,�%.�9��9��9��	9���}�
9��U�C�Z� �9��u�c�z�"�9� =�#�=�%��%�)7�%�	�%�N
��
�)7�
�	�
r"rN)�typingrrrrr'rrr	�jupyterr
�measurer�segmentrrr
r.r0r/rrEr"r �<module>rJs?��"��:�:�!� ���P��K��
�
�M
�,�M
r"python3.12/site-packages/pip/_vendor/rich/cells.py000064400000010635151732702050015745 0ustar00import re
from functools import lru_cache
from typing import Callable, List

from ._cell_widths import CELL_WIDTHS

# Regex to match sequence of the most common character ranges
_is_single_cell_widths = re.compile("^[\u0020-\u006f\u00a0\u02ff\u0370-\u0482]*$").match


@lru_cache(4096)
def cached_cell_len(text: str) -> int:
    """Get the number of cells required to display text.

    This method always caches, which may use up a lot of memory. It is recommended to use
    `cell_len` over this method.

    Args:
        text (str): Text to display.

    Returns:
        int: Get the number of cells required to display text.
    """
    _get_size = get_character_cell_size
    total_size = sum(_get_size(character) for character in text)
    return total_size


def cell_len(text: str, _cell_len: Callable[[str], int] = cached_cell_len) -> int:
    """Get the number of cells required to display text.

    Args:
        text (str): Text to display.

    Returns:
        int: Get the number of cells required to display text.
    """
    if len(text) < 512:
        return _cell_len(text)
    _get_size = get_character_cell_size
    total_size = sum(_get_size(character) for character in text)
    return total_size


@lru_cache(maxsize=4096)
def get_character_cell_size(character: str) -> int:
    """Get the cell size of a character.

    Args:
        character (str): A single character.

    Returns:
        int: Number of cells (0, 1 or 2) occupied by that character.
    """
    return _get_codepoint_cell_size(ord(character))


@lru_cache(maxsize=4096)
def _get_codepoint_cell_size(codepoint: int) -> int:
    """Get the cell size of a character.

    Args:
        codepoint (int): Codepoint of a character.

    Returns:
        int: Number of cells (0, 1 or 2) occupied by that character.
    """

    _table = CELL_WIDTHS
    lower_bound = 0
    upper_bound = len(_table) - 1
    index = (lower_bound + upper_bound) // 2
    while True:
        start, end, width = _table[index]
        if codepoint < start:
            upper_bound = index - 1
        elif codepoint > end:
            lower_bound = index + 1
        else:
            return 0 if width == -1 else width
        if upper_bound < lower_bound:
            break
        index = (lower_bound + upper_bound) // 2
    return 1


def set_cell_size(text: str, total: int) -> str:
    """Set the length of a string to fit within given number of cells."""

    if _is_single_cell_widths(text):
        size = len(text)
        if size < total:
            return text + " " * (total - size)
        return text[:total]

    if total <= 0:
        return ""
    cell_size = cell_len(text)
    if cell_size == total:
        return text
    if cell_size < total:
        return text + " " * (total - cell_size)

    start = 0
    end = len(text)

    # Binary search until we find the right size
    while True:
        pos = (start + end) // 2
        before = text[: pos + 1]
        before_len = cell_len(before)
        if before_len == total + 1 and cell_len(before[-1]) == 2:
            return before[:-1] + " "
        if before_len == total:
            return before
        if before_len > total:
            end = pos
        else:
            start = pos


# TODO: This is inefficient
# TODO: This might not work with CWJ type characters
def chop_cells(text: str, max_size: int, position: int = 0) -> List[str]:
    """Break text in to equal (cell) length strings, returning the characters in reverse
    order"""
    _get_character_cell_size = get_character_cell_size
    characters = [
        (character, _get_character_cell_size(character)) for character in text
    ]
    total_size = position
    lines: List[List[str]] = [[]]
    append = lines[-1].append

    for character, size in reversed(characters):
        if total_size + size > max_size:
            lines.append([character])
            append = lines[-1].append
            total_size = size
        else:
            total_size += size
            append(character)

    return ["".join(line) for line in lines]


if __name__ == "__main__":  # pragma: no cover

    print(get_character_cell_size("😽"))
    for line in chop_cells("""这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑。""", 8):
        print(line)
    for n in range(80, 1, -1):
        print(set_cell_size("""这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑。""", n) + "|")
        print("x" * n)
python3.12/site-packages/pip/_vendor/rich/__main__.py000064400000020436151732702050016363 0ustar00import colorsys
import io
from time import process_time

from pip._vendor.rich import box
from pip._vendor.rich.color import Color
from pip._vendor.rich.console import Console, ConsoleOptions, Group, RenderableType, RenderResult
from pip._vendor.rich.markdown import Markdown
from pip._vendor.rich.measure import Measurement
from pip._vendor.rich.pretty import Pretty
from pip._vendor.rich.segment import Segment
from pip._vendor.rich.style import Style
from pip._vendor.rich.syntax import Syntax
from pip._vendor.rich.table import Table
from pip._vendor.rich.text import Text


class ColorBox:
    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        for y in range(0, 5):
            for x in range(options.max_width):
                h = x / options.max_width
                l = 0.1 + ((y / 5) * 0.7)
                r1, g1, b1 = colorsys.hls_to_rgb(h, l, 1.0)
                r2, g2, b2 = colorsys.hls_to_rgb(h, l + 0.7 / 10, 1.0)
                bgcolor = Color.from_rgb(r1 * 255, g1 * 255, b1 * 255)
                color = Color.from_rgb(r2 * 255, g2 * 255, b2 * 255)
                yield Segment("▄", Style(color=color, bgcolor=bgcolor))
            yield Segment.line()

    def __rich_measure__(
        self, console: "Console", options: ConsoleOptions
    ) -> Measurement:
        return Measurement(1, options.max_width)


def make_test_card() -> Table:
    """Get a renderable that demonstrates a number of features."""
    table = Table.grid(padding=1, pad_edge=True)
    table.title = "Rich features"
    table.add_column("Feature", no_wrap=True, justify="center", style="bold red")
    table.add_column("Demonstration")

    color_table = Table(
        box=None,
        expand=False,
        show_header=False,
        show_edge=False,
        pad_edge=False,
    )
    color_table.add_row(
        (
            "✓ [bold green]4-bit color[/]\n"
            "✓ [bold blue]8-bit color[/]\n"
            "✓ [bold magenta]Truecolor (16.7 million)[/]\n"
            "✓ [bold yellow]Dumb terminals[/]\n"
            "✓ [bold cyan]Automatic color conversion"
        ),
        ColorBox(),
    )

    table.add_row("Colors", color_table)

    table.add_row(
        "Styles",
        "All ansi styles: [bold]bold[/], [dim]dim[/], [italic]italic[/italic], [underline]underline[/], [strike]strikethrough[/], [reverse]reverse[/], and even [blink]blink[/].",
    )

    lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque in metus sed sapien ultricies pretium a at justo. Maecenas luctus velit et auctor maximus."
    lorem_table = Table.grid(padding=1, collapse_padding=True)
    lorem_table.pad_edge = False
    lorem_table.add_row(
        Text(lorem, justify="left", style="green"),
        Text(lorem, justify="center", style="yellow"),
        Text(lorem, justify="right", style="blue"),
        Text(lorem, justify="full", style="red"),
    )
    table.add_row(
        "Text",
        Group(
            Text.from_markup(
                """Word wrap text. Justify [green]left[/], [yellow]center[/], [blue]right[/] or [red]full[/].\n"""
            ),
            lorem_table,
        ),
    )

    def comparison(renderable1: RenderableType, renderable2: RenderableType) -> Table:
        table = Table(show_header=False, pad_edge=False, box=None, expand=True)
        table.add_column("1", ratio=1)
        table.add_column("2", ratio=1)
        table.add_row(renderable1, renderable2)
        return table

    table.add_row(
        "Asian\nlanguage\nsupport",
        ":flag_for_china:  该库支持中文,日文和韩文文本!\n:flag_for_japan:  ライブラリは中国語、日本語、韓国語のテキストをサポートしています\n:flag_for_south_korea:  이 라이브러리는 중국어, 일본어 및 한국어 텍스트를 지원합니다",
    )

    markup_example = (
        "[bold magenta]Rich[/] supports a simple [i]bbcode[/i]-like [b]markup[/b] for [yellow]color[/], [underline]style[/], and emoji! "
        ":+1: :apple: :ant: :bear: :baguette_bread: :bus: "
    )
    table.add_row("Markup", markup_example)

    example_table = Table(
        show_edge=False,
        show_header=True,
        expand=False,
        row_styles=["none", "dim"],
        box=box.SIMPLE,
    )
    example_table.add_column("[green]Date", style="green", no_wrap=True)
    example_table.add_column("[blue]Title", style="blue")
    example_table.add_column(
        "[cyan]Production Budget",
        style="cyan",
        justify="right",
        no_wrap=True,
    )
    example_table.add_column(
        "[magenta]Box Office",
        style="magenta",
        justify="right",
        no_wrap=True,
    )
    example_table.add_row(
        "Dec 20, 2019",
        "Star Wars: The Rise of Skywalker",
        "$275,000,000",
        "$375,126,118",
    )
    example_table.add_row(
        "May 25, 2018",
        "[b]Solo[/]: A Star Wars Story",
        "$275,000,000",
        "$393,151,347",
    )
    example_table.add_row(
        "Dec 15, 2017",
        "Star Wars Ep. VIII: The Last Jedi",
        "$262,000,000",
        "[bold]$1,332,539,889[/bold]",
    )
    example_table.add_row(
        "May 19, 1999",
        "Star Wars Ep. [b]I[/b]: [i]The phantom Menace",
        "$115,000,000",
        "$1,027,044,677",
    )

    table.add_row("Tables", example_table)

    code = '''\
def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_value'''

    pretty_data = {
        "foo": [
            3.1427,
            (
                "Paul Atreides",
                "Vladimir Harkonnen",
                "Thufir Hawat",
            ),
        ],
        "atomic": (False, True, None),
    }
    table.add_row(
        "Syntax\nhighlighting\n&\npretty\nprinting",
        comparison(
            Syntax(code, "python3", line_numbers=True, indent_guides=True),
            Pretty(pretty_data, indent_guides=True),
        ),
    )

    markdown_example = """\
# Markdown

Supports much of the *markdown* __syntax__!

- Headers
- Basic formatting: **bold**, *italic*, `code`
- Block quotes
- Lists, and more...
    """
    table.add_row(
        "Markdown", comparison("[cyan]" + markdown_example, Markdown(markdown_example))
    )

    table.add_row(
        "+more!",
        """Progress bars, columns, styled logging handler, tracebacks, etc...""",
    )
    return table


if __name__ == "__main__":  # pragma: no cover

    console = Console(
        file=io.StringIO(),
        force_terminal=True,
    )
    test_card = make_test_card()

    # Print once to warm cache
    start = process_time()
    console.print(test_card)
    pre_cache_taken = round((process_time() - start) * 1000.0, 1)

    console.file = io.StringIO()

    start = process_time()
    console.print(test_card)
    taken = round((process_time() - start) * 1000.0, 1)

    c = Console(record=True)
    c.print(test_card)

    print(f"rendered in {pre_cache_taken}ms (cold cache)")
    print(f"rendered in {taken}ms (warm cache)")

    from pip._vendor.rich.panel import Panel

    console = Console()

    sponsor_message = Table.grid(padding=1)
    sponsor_message.add_column(style="green", justify="right")
    sponsor_message.add_column(no_wrap=True)

    sponsor_message.add_row(
        "Textualize",
        "[u blue link=https://github.com/textualize]https://github.com/textualize",
    )
    sponsor_message.add_row(
        "Twitter",
        "[u blue link=https://twitter.com/willmcgugan]https://twitter.com/willmcgugan",
    )

    intro_message = Text.from_markup(
        """\
We hope you enjoy using Rich!

Rich is maintained with [red]:heart:[/] by [link=https://www.textualize.io]Textualize.io[/]

- Will McGugan"""
    )

    message = Table.grid(padding=2)
    message.add_column()
    message.add_column(no_wrap=True)
    message.add_row(intro_message, sponsor_message)

    console.print(
        Panel.fit(
            message,
            box=box.ROUNDED,
            padding=(1, 2),
            title="[b red]Thanks for trying out Rich!",
            border_style="bright_blue",
        ),
        justify="center",
    )
python3.12/site-packages/pip/_vendor/rich/_log_render.py000064400000006231151732702060017120 0ustar00from datetime import datetime
from typing import Iterable, List, Optional, TYPE_CHECKING, Union, Callable


from .text import Text, TextType

if TYPE_CHECKING:
    from .console import Console, ConsoleRenderable, RenderableType
    from .table import Table

FormatTimeCallable = Callable[[datetime], Text]


class LogRender:
    def __init__(
        self,
        show_time: bool = True,
        show_level: bool = False,
        show_path: bool = True,
        time_format: Union[str, FormatTimeCallable] = "[%x %X]",
        omit_repeated_times: bool = True,
        level_width: Optional[int] = 8,
    ) -> None:
        self.show_time = show_time
        self.show_level = show_level
        self.show_path = show_path
        self.time_format = time_format
        self.omit_repeated_times = omit_repeated_times
        self.level_width = level_width
        self._last_time: Optional[Text] = None

    def __call__(
        self,
        console: "Console",
        renderables: Iterable["ConsoleRenderable"],
        log_time: Optional[datetime] = None,
        time_format: Optional[Union[str, FormatTimeCallable]] = None,
        level: TextType = "",
        path: Optional[str] = None,
        line_no: Optional[int] = None,
        link_path: Optional[str] = None,
    ) -> "Table":
        from .containers import Renderables
        from .table import Table

        output = Table.grid(padding=(0, 1))
        output.expand = True
        if self.show_time:
            output.add_column(style="log.time")
        if self.show_level:
            output.add_column(style="log.level", width=self.level_width)
        output.add_column(ratio=1, style="log.message", overflow="fold")
        if self.show_path and path:
            output.add_column(style="log.path")
        row: List["RenderableType"] = []
        if self.show_time:
            log_time = log_time or console.get_datetime()
            time_format = time_format or self.time_format
            if callable(time_format):
                log_time_display = time_format(log_time)
            else:
                log_time_display = Text(log_time.strftime(time_format))
            if log_time_display == self._last_time and self.omit_repeated_times:
                row.append(Text(" " * len(log_time_display)))
            else:
                row.append(log_time_display)
                self._last_time = log_time_display
        if self.show_level:
            row.append(level)

        row.append(Renderables(renderables))
        if self.show_path and path:
            path_text = Text()
            path_text.append(
                path, style=f"link file://{link_path}" if link_path else ""
            )
            if line_no:
                path_text.append(":")
                path_text.append(
                    f"{line_no}",
                    style=f"link file://{link_path}#{line_no}" if link_path else "",
                )
            row.append(path_text)

        output.add_row(*row)
        return output


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich.console import Console

    c = Console()
    c.print("[on blue]Hello", justify="right")
    c.log("[on blue]hello", justify="right")
python3.12/site-packages/pip/_vendor/rich/syntax.py000064400000104545151732702060016176 0ustar00import os.path
import platform
import re
import sys
import textwrap
from abc import ABC, abstractmethod
from pathlib import Path
from typing import (
    Any,
    Dict,
    Iterable,
    List,
    NamedTuple,
    Optional,
    Sequence,
    Set,
    Tuple,
    Type,
    Union,
)

from pip._vendor.pygments.lexer import Lexer
from pip._vendor.pygments.lexers import get_lexer_by_name, guess_lexer_for_filename
from pip._vendor.pygments.style import Style as PygmentsStyle
from pip._vendor.pygments.styles import get_style_by_name
from pip._vendor.pygments.token import (
    Comment,
    Error,
    Generic,
    Keyword,
    Name,
    Number,
    Operator,
    String,
    Token,
    Whitespace,
)
from pip._vendor.pygments.util import ClassNotFound

from pip._vendor.rich.containers import Lines
from pip._vendor.rich.padding import Padding, PaddingDimensions

from ._loop import loop_first
from .cells import cell_len
from .color import Color, blend_rgb
from .console import Console, ConsoleOptions, JustifyMethod, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment, Segments
from .style import Style, StyleType
from .text import Text

TokenType = Tuple[str, ...]

WINDOWS = platform.system() == "Windows"
DEFAULT_THEME = "monokai"

# The following styles are based on https://github.com/pygments/pygments/blob/master/pygments/formatters/terminal.py
# A few modifications were made

ANSI_LIGHT: Dict[TokenType, Style] = {
    Token: Style(),
    Whitespace: Style(color="white"),
    Comment: Style(dim=True),
    Comment.Preproc: Style(color="cyan"),
    Keyword: Style(color="blue"),
    Keyword.Type: Style(color="cyan"),
    Operator.Word: Style(color="magenta"),
    Name.Builtin: Style(color="cyan"),
    Name.Function: Style(color="green"),
    Name.Namespace: Style(color="cyan", underline=True),
    Name.Class: Style(color="green", underline=True),
    Name.Exception: Style(color="cyan"),
    Name.Decorator: Style(color="magenta", bold=True),
    Name.Variable: Style(color="red"),
    Name.Constant: Style(color="red"),
    Name.Attribute: Style(color="cyan"),
    Name.Tag: Style(color="bright_blue"),
    String: Style(color="yellow"),
    Number: Style(color="blue"),
    Generic.Deleted: Style(color="bright_red"),
    Generic.Inserted: Style(color="green"),
    Generic.Heading: Style(bold=True),
    Generic.Subheading: Style(color="magenta", bold=True),
    Generic.Prompt: Style(bold=True),
    Generic.Error: Style(color="bright_red"),
    Error: Style(color="red", underline=True),
}

ANSI_DARK: Dict[TokenType, Style] = {
    Token: Style(),
    Whitespace: Style(color="bright_black"),
    Comment: Style(dim=True),
    Comment.Preproc: Style(color="bright_cyan"),
    Keyword: Style(color="bright_blue"),
    Keyword.Type: Style(color="bright_cyan"),
    Operator.Word: Style(color="bright_magenta"),
    Name.Builtin: Style(color="bright_cyan"),
    Name.Function: Style(color="bright_green"),
    Name.Namespace: Style(color="bright_cyan", underline=True),
    Name.Class: Style(color="bright_green", underline=True),
    Name.Exception: Style(color="bright_cyan"),
    Name.Decorator: Style(color="bright_magenta", bold=True),
    Name.Variable: Style(color="bright_red"),
    Name.Constant: Style(color="bright_red"),
    Name.Attribute: Style(color="bright_cyan"),
    Name.Tag: Style(color="bright_blue"),
    String: Style(color="yellow"),
    Number: Style(color="bright_blue"),
    Generic.Deleted: Style(color="bright_red"),
    Generic.Inserted: Style(color="bright_green"),
    Generic.Heading: Style(bold=True),
    Generic.Subheading: Style(color="bright_magenta", bold=True),
    Generic.Prompt: Style(bold=True),
    Generic.Error: Style(color="bright_red"),
    Error: Style(color="red", underline=True),
}

RICH_SYNTAX_THEMES = {"ansi_light": ANSI_LIGHT, "ansi_dark": ANSI_DARK}
NUMBERS_COLUMN_DEFAULT_PADDING = 2


class SyntaxTheme(ABC):
    """Base class for a syntax theme."""

    @abstractmethod
    def get_style_for_token(self, token_type: TokenType) -> Style:
        """Get a style for a given Pygments token."""
        raise NotImplementedError  # pragma: no cover

    @abstractmethod
    def get_background_style(self) -> Style:
        """Get the background color."""
        raise NotImplementedError  # pragma: no cover


class PygmentsSyntaxTheme(SyntaxTheme):
    """Syntax theme that delegates to Pygments theme."""

    def __init__(self, theme: Union[str, Type[PygmentsStyle]]) -> None:
        self._style_cache: Dict[TokenType, Style] = {}
        if isinstance(theme, str):
            try:
                self._pygments_style_class = get_style_by_name(theme)
            except ClassNotFound:
                self._pygments_style_class = get_style_by_name("default")
        else:
            self._pygments_style_class = theme

        self._background_color = self._pygments_style_class.background_color
        self._background_style = Style(bgcolor=self._background_color)

    def get_style_for_token(self, token_type: TokenType) -> Style:
        """Get a style from a Pygments class."""
        try:
            return self._style_cache[token_type]
        except KeyError:
            try:
                pygments_style = self._pygments_style_class.style_for_token(token_type)
            except KeyError:
                style = Style.null()
            else:
                color = pygments_style["color"]
                bgcolor = pygments_style["bgcolor"]
                style = Style(
                    color="#" + color if color else "#000000",
                    bgcolor="#" + bgcolor if bgcolor else self._background_color,
                    bold=pygments_style["bold"],
                    italic=pygments_style["italic"],
                    underline=pygments_style["underline"],
                )
            self._style_cache[token_type] = style
        return style

    def get_background_style(self) -> Style:
        return self._background_style


class ANSISyntaxTheme(SyntaxTheme):
    """Syntax theme to use standard colors."""

    def __init__(self, style_map: Dict[TokenType, Style]) -> None:
        self.style_map = style_map
        self._missing_style = Style.null()
        self._background_style = Style.null()
        self._style_cache: Dict[TokenType, Style] = {}

    def get_style_for_token(self, token_type: TokenType) -> Style:
        """Look up style in the style map."""
        try:
            return self._style_cache[token_type]
        except KeyError:
            # Styles form a hierarchy
            # We need to go from most to least specific
            # e.g. ("foo", "bar", "baz") to ("foo", "bar")  to ("foo",)
            get_style = self.style_map.get
            token = tuple(token_type)
            style = self._missing_style
            while token:
                _style = get_style(token)
                if _style is not None:
                    style = _style
                    break
                token = token[:-1]
            self._style_cache[token_type] = style
            return style

    def get_background_style(self) -> Style:
        return self._background_style


SyntaxPosition = Tuple[int, int]


class _SyntaxHighlightRange(NamedTuple):
    """
    A range to highlight in a Syntax object.
    `start` and `end` are 2-integers tuples, where the first integer is the line number
    (starting from 1) and the second integer is the column index (starting from 0).
    """

    style: StyleType
    start: SyntaxPosition
    end: SyntaxPosition


class Syntax(JupyterMixin):
    """Construct a Syntax object to render syntax highlighted code.

    Args:
        code (str): Code to highlight.
        lexer (Lexer | str): Lexer to use (see https://pygments.org/docs/lexers/)
        theme (str, optional): Color theme, aka Pygments style (see https://pygments.org/docs/styles/#getting-a-list-of-available-styles). Defaults to "monokai".
        dedent (bool, optional): Enable stripping of initial whitespace. Defaults to False.
        line_numbers (bool, optional): Enable rendering of line numbers. Defaults to False.
        start_line (int, optional): Starting number for line numbers. Defaults to 1.
        line_range (Tuple[int | None, int | None], optional): If given should be a tuple of the start and end line to render.
            A value of None in the tuple indicates the range is open in that direction.
        highlight_lines (Set[int]): A set of line numbers to highlight.
        code_width: Width of code to render (not including line numbers), or ``None`` to use all available width.
        tab_size (int, optional): Size of tabs. Defaults to 4.
        word_wrap (bool, optional): Enable word wrapping.
        background_color (str, optional): Optional background color, or None to use theme color. Defaults to None.
        indent_guides (bool, optional): Show indent guides. Defaults to False.
        padding (PaddingDimensions): Padding to apply around the syntax. Defaults to 0 (no padding).
    """

    _pygments_style_class: Type[PygmentsStyle]
    _theme: SyntaxTheme

    @classmethod
    def get_theme(cls, name: Union[str, SyntaxTheme]) -> SyntaxTheme:
        """Get a syntax theme instance."""
        if isinstance(name, SyntaxTheme):
            return name
        theme: SyntaxTheme
        if name in RICH_SYNTAX_THEMES:
            theme = ANSISyntaxTheme(RICH_SYNTAX_THEMES[name])
        else:
            theme = PygmentsSyntaxTheme(name)
        return theme

    def __init__(
        self,
        code: str,
        lexer: Union[Lexer, str],
        *,
        theme: Union[str, SyntaxTheme] = DEFAULT_THEME,
        dedent: bool = False,
        line_numbers: bool = False,
        start_line: int = 1,
        line_range: Optional[Tuple[Optional[int], Optional[int]]] = None,
        highlight_lines: Optional[Set[int]] = None,
        code_width: Optional[int] = None,
        tab_size: int = 4,
        word_wrap: bool = False,
        background_color: Optional[str] = None,
        indent_guides: bool = False,
        padding: PaddingDimensions = 0,
    ) -> None:
        self.code = code
        self._lexer = lexer
        self.dedent = dedent
        self.line_numbers = line_numbers
        self.start_line = start_line
        self.line_range = line_range
        self.highlight_lines = highlight_lines or set()
        self.code_width = code_width
        self.tab_size = tab_size
        self.word_wrap = word_wrap
        self.background_color = background_color
        self.background_style = (
            Style(bgcolor=background_color) if background_color else Style()
        )
        self.indent_guides = indent_guides
        self.padding = padding

        self._theme = self.get_theme(theme)
        self._stylized_ranges: List[_SyntaxHighlightRange] = []

    @classmethod
    def from_path(
        cls,
        path: str,
        encoding: str = "utf-8",
        lexer: Optional[Union[Lexer, str]] = None,
        theme: Union[str, SyntaxTheme] = DEFAULT_THEME,
        dedent: bool = False,
        line_numbers: bool = False,
        line_range: Optional[Tuple[int, int]] = None,
        start_line: int = 1,
        highlight_lines: Optional[Set[int]] = None,
        code_width: Optional[int] = None,
        tab_size: int = 4,
        word_wrap: bool = False,
        background_color: Optional[str] = None,
        indent_guides: bool = False,
        padding: PaddingDimensions = 0,
    ) -> "Syntax":
        """Construct a Syntax object from a file.

        Args:
            path (str): Path to file to highlight.
            encoding (str): Encoding of file.
            lexer (str | Lexer, optional): Lexer to use. If None, lexer will be auto-detected from path/file content.
            theme (str, optional): Color theme, aka Pygments style (see https://pygments.org/docs/styles/#getting-a-list-of-available-styles). Defaults to "emacs".
            dedent (bool, optional): Enable stripping of initial whitespace. Defaults to True.
            line_numbers (bool, optional): Enable rendering of line numbers. Defaults to False.
            start_line (int, optional): Starting number for line numbers. Defaults to 1.
            line_range (Tuple[int, int], optional): If given should be a tuple of the start and end line to render.
            highlight_lines (Set[int]): A set of line numbers to highlight.
            code_width: Width of code to render (not including line numbers), or ``None`` to use all available width.
            tab_size (int, optional): Size of tabs. Defaults to 4.
            word_wrap (bool, optional): Enable word wrapping of code.
            background_color (str, optional): Optional background color, or None to use theme color. Defaults to None.
            indent_guides (bool, optional): Show indent guides. Defaults to False.
            padding (PaddingDimensions): Padding to apply around the syntax. Defaults to 0 (no padding).

        Returns:
            [Syntax]: A Syntax object that may be printed to the console
        """
        code = Path(path).read_text(encoding=encoding)

        if not lexer:
            lexer = cls.guess_lexer(path, code=code)

        return cls(
            code,
            lexer,
            theme=theme,
            dedent=dedent,
            line_numbers=line_numbers,
            line_range=line_range,
            start_line=start_line,
            highlight_lines=highlight_lines,
            code_width=code_width,
            tab_size=tab_size,
            word_wrap=word_wrap,
            background_color=background_color,
            indent_guides=indent_guides,
            padding=padding,
        )

    @classmethod
    def guess_lexer(cls, path: str, code: Optional[str] = None) -> str:
        """Guess the alias of the Pygments lexer to use based on a path and an optional string of code.
        If code is supplied, it will use a combination of the code and the filename to determine the
        best lexer to use. For example, if the file is ``index.html`` and the file contains Django
        templating syntax, then "html+django" will be returned. If the file is ``index.html``, and no
        templating language is used, the "html" lexer will be used. If no string of code
        is supplied, the lexer will be chosen based on the file extension..

        Args:
             path (AnyStr): The path to the file containing the code you wish to know the lexer for.
             code (str, optional): Optional string of code that will be used as a fallback if no lexer
                is found for the supplied path.

        Returns:
            str: The name of the Pygments lexer that best matches the supplied path/code.
        """
        lexer: Optional[Lexer] = None
        lexer_name = "default"
        if code:
            try:
                lexer = guess_lexer_for_filename(path, code)
            except ClassNotFound:
                pass

        if not lexer:
            try:
                _, ext = os.path.splitext(path)
                if ext:
                    extension = ext.lstrip(".").lower()
                    lexer = get_lexer_by_name(extension)
            except ClassNotFound:
                pass

        if lexer:
            if lexer.aliases:
                lexer_name = lexer.aliases[0]
            else:
                lexer_name = lexer.name

        return lexer_name

    def _get_base_style(self) -> Style:
        """Get the base style."""
        default_style = self._theme.get_background_style() + self.background_style
        return default_style

    def _get_token_color(self, token_type: TokenType) -> Optional[Color]:
        """Get a color (if any) for the given token.

        Args:
            token_type (TokenType): A token type tuple from Pygments.

        Returns:
            Optional[Color]: Color from theme, or None for no color.
        """
        style = self._theme.get_style_for_token(token_type)
        return style.color

    @property
    def lexer(self) -> Optional[Lexer]:
        """The lexer for this syntax, or None if no lexer was found.

        Tries to find the lexer by name if a string was passed to the constructor.
        """

        if isinstance(self._lexer, Lexer):
            return self._lexer
        try:
            return get_lexer_by_name(
                self._lexer,
                stripnl=False,
                ensurenl=True,
                tabsize=self.tab_size,
            )
        except ClassNotFound:
            return None

    def highlight(
        self,
        code: str,
        line_range: Optional[Tuple[Optional[int], Optional[int]]] = None,
    ) -> Text:
        """Highlight code and return a Text instance.

        Args:
            code (str): Code to highlight.
            line_range(Tuple[int, int], optional): Optional line range to highlight.

        Returns:
            Text: A text instance containing highlighted syntax.
        """

        base_style = self._get_base_style()
        justify: JustifyMethod = (
            "default" if base_style.transparent_background else "left"
        )

        text = Text(
            justify=justify,
            style=base_style,
            tab_size=self.tab_size,
            no_wrap=not self.word_wrap,
        )
        _get_theme_style = self._theme.get_style_for_token

        lexer = self.lexer

        if lexer is None:
            text.append(code)
        else:
            if line_range:
                # More complicated path to only stylize a portion of the code
                # This speeds up further operations as there are less spans to process
                line_start, line_end = line_range

                def line_tokenize() -> Iterable[Tuple[Any, str]]:
                    """Split tokens to one per line."""
                    assert lexer  # required to make MyPy happy - we know lexer is not None at this point

                    for token_type, token in lexer.get_tokens(code):
                        while token:
                            line_token, new_line, token = token.partition("\n")
                            yield token_type, line_token + new_line

                def tokens_to_spans() -> Iterable[Tuple[str, Optional[Style]]]:
                    """Convert tokens to spans."""
                    tokens = iter(line_tokenize())
                    line_no = 0
                    _line_start = line_start - 1 if line_start else 0

                    # Skip over tokens until line start
                    while line_no < _line_start:
                        try:
                            _token_type, token = next(tokens)
                        except StopIteration:
                            break
                        yield (token, None)
                        if token.endswith("\n"):
                            line_no += 1
                    # Generate spans until line end
                    for token_type, token in tokens:
                        yield (token, _get_theme_style(token_type))
                        if token.endswith("\n"):
                            line_no += 1
                            if line_end and line_no >= line_end:
                                break

                text.append_tokens(tokens_to_spans())

            else:
                text.append_tokens(
                    (token, _get_theme_style(token_type))
                    for token_type, token in lexer.get_tokens(code)
                )
            if self.background_color is not None:
                text.stylize(f"on {self.background_color}")

        if self._stylized_ranges:
            self._apply_stylized_ranges(text)

        return text

    def stylize_range(
        self, style: StyleType, start: SyntaxPosition, end: SyntaxPosition
    ) -> None:
        """
        Adds a custom style on a part of the code, that will be applied to the syntax display when it's rendered.
        Line numbers are 1-based, while column indexes are 0-based.

        Args:
            style (StyleType): The style to apply.
            start (Tuple[int, int]): The start of the range, in the form `[line number, column index]`.
            end (Tuple[int, int]): The end of the range, in the form `[line number, column index]`.
        """
        self._stylized_ranges.append(_SyntaxHighlightRange(style, start, end))

    def _get_line_numbers_color(self, blend: float = 0.3) -> Color:
        background_style = self._theme.get_background_style() + self.background_style
        background_color = background_style.bgcolor
        if background_color is None or background_color.is_system_defined:
            return Color.default()
        foreground_color = self._get_token_color(Token.Text)
        if foreground_color is None or foreground_color.is_system_defined:
            return foreground_color or Color.default()
        new_color = blend_rgb(
            background_color.get_truecolor(),
            foreground_color.get_truecolor(),
            cross_fade=blend,
        )
        return Color.from_triplet(new_color)

    @property
    def _numbers_column_width(self) -> int:
        """Get the number of characters used to render the numbers column."""
        column_width = 0
        if self.line_numbers:
            column_width = (
                len(str(self.start_line + self.code.count("\n")))
                + NUMBERS_COLUMN_DEFAULT_PADDING
            )
        return column_width

    def _get_number_styles(self, console: Console) -> Tuple[Style, Style, Style]:
        """Get background, number, and highlight styles for line numbers."""
        background_style = self._get_base_style()
        if background_style.transparent_background:
            return Style.null(), Style(dim=True), Style.null()
        if console.color_system in ("256", "truecolor"):
            number_style = Style.chain(
                background_style,
                self._theme.get_style_for_token(Token.Text),
                Style(color=self._get_line_numbers_color()),
                self.background_style,
            )
            highlight_number_style = Style.chain(
                background_style,
                self._theme.get_style_for_token(Token.Text),
                Style(bold=True, color=self._get_line_numbers_color(0.9)),
                self.background_style,
            )
        else:
            number_style = background_style + Style(dim=True)
            highlight_number_style = background_style + Style(dim=False)
        return background_style, number_style, highlight_number_style

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "Measurement":
        _, right, _, left = Padding.unpack(self.padding)
        padding = left + right
        if self.code_width is not None:
            width = self.code_width + self._numbers_column_width + padding + 1
            return Measurement(self._numbers_column_width, width)
        lines = self.code.splitlines()
        width = (
            self._numbers_column_width
            + padding
            + (max(cell_len(line) for line in lines) if lines else 0)
        )
        if self.line_numbers:
            width += 1
        return Measurement(self._numbers_column_width, width)

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        segments = Segments(self._get_syntax(console, options))
        if self.padding:
            yield Padding(
                segments, style=self._theme.get_background_style(), pad=self.padding
            )
        else:
            yield segments

    def _get_syntax(
        self,
        console: Console,
        options: ConsoleOptions,
    ) -> Iterable[Segment]:
        """
        Get the Segments for the Syntax object, excluding any vertical/horizontal padding
        """
        transparent_background = self._get_base_style().transparent_background
        code_width = (
            (
                (options.max_width - self._numbers_column_width - 1)
                if self.line_numbers
                else options.max_width
            )
            if self.code_width is None
            else self.code_width
        )

        ends_on_nl, processed_code = self._process_code(self.code)
        text = self.highlight(processed_code, self.line_range)

        if not self.line_numbers and not self.word_wrap and not self.line_range:
            if not ends_on_nl:
                text.remove_suffix("\n")
            # Simple case of just rendering text
            style = (
                self._get_base_style()
                + self._theme.get_style_for_token(Comment)
                + Style(dim=True)
                + self.background_style
            )
            if self.indent_guides and not options.ascii_only:
                text = text.with_indent_guides(self.tab_size, style=style)
                text.overflow = "crop"
            if style.transparent_background:
                yield from console.render(
                    text, options=options.update(width=code_width)
                )
            else:
                syntax_lines = console.render_lines(
                    text,
                    options.update(width=code_width, height=None, justify="left"),
                    style=self.background_style,
                    pad=True,
                    new_lines=True,
                )
                for syntax_line in syntax_lines:
                    yield from syntax_line
            return

        start_line, end_line = self.line_range or (None, None)
        line_offset = 0
        if start_line:
            line_offset = max(0, start_line - 1)
        lines: Union[List[Text], Lines] = text.split("\n", allow_blank=ends_on_nl)
        if self.line_range:
            if line_offset > len(lines):
                return
            lines = lines[line_offset:end_line]

        if self.indent_guides and not options.ascii_only:
            style = (
                self._get_base_style()
                + self._theme.get_style_for_token(Comment)
                + Style(dim=True)
                + self.background_style
            )
            lines = (
                Text("\n")
                .join(lines)
                .with_indent_guides(self.tab_size, style=style + Style(italic=False))
                .split("\n", allow_blank=True)
            )

        numbers_column_width = self._numbers_column_width
        render_options = options.update(width=code_width)

        highlight_line = self.highlight_lines.__contains__
        _Segment = Segment
        new_line = _Segment("\n")

        line_pointer = "> " if options.legacy_windows else "❱ "

        (
            background_style,
            number_style,
            highlight_number_style,
        ) = self._get_number_styles(console)

        for line_no, line in enumerate(lines, self.start_line + line_offset):
            if self.word_wrap:
                wrapped_lines = console.render_lines(
                    line,
                    render_options.update(height=None, justify="left"),
                    style=background_style,
                    pad=not transparent_background,
                )
            else:
                segments = list(line.render(console, end=""))
                if options.no_wrap:
                    wrapped_lines = [segments]
                else:
                    wrapped_lines = [
                        _Segment.adjust_line_length(
                            segments,
                            render_options.max_width,
                            style=background_style,
                            pad=not transparent_background,
                        )
                    ]

            if self.line_numbers:
                wrapped_line_left_pad = _Segment(
                    " " * numbers_column_width + " ", background_style
                )
                for first, wrapped_line in loop_first(wrapped_lines):
                    if first:
                        line_column = str(line_no).rjust(numbers_column_width - 2) + " "
                        if highlight_line(line_no):
                            yield _Segment(line_pointer, Style(color="red"))
                            yield _Segment(line_column, highlight_number_style)
                        else:
                            yield _Segment("  ", highlight_number_style)
                            yield _Segment(line_column, number_style)
                    else:
                        yield wrapped_line_left_pad
                    yield from wrapped_line
                    yield new_line
            else:
                for wrapped_line in wrapped_lines:
                    yield from wrapped_line
                    yield new_line

    def _apply_stylized_ranges(self, text: Text) -> None:
        """
        Apply stylized ranges to a text instance,
        using the given code to determine the right portion to apply the style to.

        Args:
            text (Text): Text instance to apply the style to.
        """
        code = text.plain
        newlines_offsets = [
            # Let's add outer boundaries at each side of the list:
            0,
            # N.B. using "\n" here is much faster than using metacharacters such as "^" or "\Z":
            *[
                match.start() + 1
                for match in re.finditer("\n", code, flags=re.MULTILINE)
            ],
            len(code) + 1,
        ]

        for stylized_range in self._stylized_ranges:
            start = _get_code_index_for_syntax_position(
                newlines_offsets, stylized_range.start
            )
            end = _get_code_index_for_syntax_position(
                newlines_offsets, stylized_range.end
            )
            if start is not None and end is not None:
                text.stylize(stylized_range.style, start, end)

    def _process_code(self, code: str) -> Tuple[bool, str]:
        """
        Applies various processing to a raw code string
        (normalises it so it always ends with a line return, dedents it if necessary, etc.)

        Args:
            code (str): The raw code string to process

        Returns:
            Tuple[bool, str]: the boolean indicates whether the raw code ends with a line return,
                while the string is the processed code.
        """
        ends_on_nl = code.endswith("\n")
        processed_code = code if ends_on_nl else code + "\n"
        processed_code = (
            textwrap.dedent(processed_code) if self.dedent else processed_code
        )
        processed_code = processed_code.expandtabs(self.tab_size)
        return ends_on_nl, processed_code


def _get_code_index_for_syntax_position(
    newlines_offsets: Sequence[int], position: SyntaxPosition
) -> Optional[int]:
    """
    Returns the index of the code string for the given positions.

    Args:
        newlines_offsets (Sequence[int]): The offset of each newline character found in the code snippet.
        position (SyntaxPosition): The position to search for.

    Returns:
        Optional[int]: The index of the code string for this position, or `None`
            if the given position's line number is out of range (if it's the column that is out of range
            we silently clamp its value so that it reaches the end of the line)
    """
    lines_count = len(newlines_offsets)

    line_number, column_index = position
    if line_number > lines_count or len(newlines_offsets) < (line_number + 1):
        return None  # `line_number` is out of range
    line_index = line_number - 1
    line_length = newlines_offsets[line_index + 1] - newlines_offsets[line_index] - 1
    # If `column_index` is out of range: let's silently clamp it:
    column_index = min(line_length, column_index)
    return newlines_offsets[line_index] + column_index


if __name__ == "__main__":  # pragma: no cover
    import argparse
    import sys

    parser = argparse.ArgumentParser(
        description="Render syntax to the console with Rich"
    )
    parser.add_argument(
        "path",
        metavar="PATH",
        help="path to file, or - for stdin",
    )
    parser.add_argument(
        "-c",
        "--force-color",
        dest="force_color",
        action="store_true",
        default=None,
        help="force color for non-terminals",
    )
    parser.add_argument(
        "-i",
        "--indent-guides",
        dest="indent_guides",
        action="store_true",
        default=False,
        help="display indent guides",
    )
    parser.add_argument(
        "-l",
        "--line-numbers",
        dest="line_numbers",
        action="store_true",
        help="render line numbers",
    )
    parser.add_argument(
        "-w",
        "--width",
        type=int,
        dest="width",
        default=None,
        help="width of output (default will auto-detect)",
    )
    parser.add_argument(
        "-r",
        "--wrap",
        dest="word_wrap",
        action="store_true",
        default=False,
        help="word wrap long lines",
    )
    parser.add_argument(
        "-s",
        "--soft-wrap",
        action="store_true",
        dest="soft_wrap",
        default=False,
        help="enable soft wrapping mode",
    )
    parser.add_argument(
        "-t", "--theme", dest="theme", default="monokai", help="pygments theme"
    )
    parser.add_argument(
        "-b",
        "--background-color",
        dest="background_color",
        default=None,
        help="Override background color",
    )
    parser.add_argument(
        "-x",
        "--lexer",
        default=None,
        dest="lexer_name",
        help="Lexer name",
    )
    parser.add_argument(
        "-p", "--padding", type=int, default=0, dest="padding", help="Padding"
    )
    parser.add_argument(
        "--highlight-line",
        type=int,
        default=None,
        dest="highlight_line",
        help="The line number (not index!) to highlight",
    )
    args = parser.parse_args()

    from pip._vendor.rich.console import Console

    console = Console(force_terminal=args.force_color, width=args.width)

    if args.path == "-":
        code = sys.stdin.read()
        syntax = Syntax(
            code=code,
            lexer=args.lexer_name,
            line_numbers=args.line_numbers,
            word_wrap=args.word_wrap,
            theme=args.theme,
            background_color=args.background_color,
            indent_guides=args.indent_guides,
            padding=args.padding,
            highlight_lines={args.highlight_line},
        )
    else:
        syntax = Syntax.from_path(
            args.path,
            lexer=args.lexer_name,
            line_numbers=args.line_numbers,
            word_wrap=args.word_wrap,
            theme=args.theme,
            background_color=args.background_color,
            indent_guides=args.indent_guides,
            padding=args.padding,
            highlight_lines={args.highlight_line},
        )
    console.print(syntax, soft_wrap=args.soft_wrap)
python3.12/site-packages/pip/_vendor/rich/text.py000064400000130725151732702060015633 0ustar00import re
from functools import partial, reduce
from math import gcd
from operator import itemgetter
from typing import (
    TYPE_CHECKING,
    Any,
    Callable,
    Dict,
    Iterable,
    List,
    NamedTuple,
    Optional,
    Tuple,
    Union,
)

from ._loop import loop_last
from ._pick import pick_bool
from ._wrap import divide_line
from .align import AlignMethod
from .cells import cell_len, set_cell_size
from .containers import Lines
from .control import strip_control_codes
from .emoji import EmojiVariant
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment
from .style import Style, StyleType

if TYPE_CHECKING:  # pragma: no cover
    from .console import Console, ConsoleOptions, JustifyMethod, OverflowMethod

DEFAULT_JUSTIFY: "JustifyMethod" = "default"
DEFAULT_OVERFLOW: "OverflowMethod" = "fold"


_re_whitespace = re.compile(r"\s+$")

TextType = Union[str, "Text"]

GetStyleCallable = Callable[[str], Optional[StyleType]]


class Span(NamedTuple):
    """A marked up region in some text."""

    start: int
    """Span start index."""
    end: int
    """Span end index."""
    style: Union[str, Style]
    """Style associated with the span."""

    def __repr__(self) -> str:
        return f"Span({self.start}, {self.end}, {self.style!r})"

    def __bool__(self) -> bool:
        return self.end > self.start

    def split(self, offset: int) -> Tuple["Span", Optional["Span"]]:
        """Split a span in to 2 from a given offset."""

        if offset < self.start:
            return self, None
        if offset >= self.end:
            return self, None

        start, end, style = self
        span1 = Span(start, min(end, offset), style)
        span2 = Span(span1.end, end, style)
        return span1, span2

    def move(self, offset: int) -> "Span":
        """Move start and end by a given offset.

        Args:
            offset (int): Number of characters to add to start and end.

        Returns:
            TextSpan: A new TextSpan with adjusted position.
        """
        start, end, style = self
        return Span(start + offset, end + offset, style)

    def right_crop(self, offset: int) -> "Span":
        """Crop the span at the given offset.

        Args:
            offset (int): A value between start and end.

        Returns:
            Span: A new (possibly smaller) span.
        """
        start, end, style = self
        if offset >= end:
            return self
        return Span(start, min(offset, end), style)


class Text(JupyterMixin):
    """Text with color / style.

    Args:
        text (str, optional): Default unstyled text. Defaults to "".
        style (Union[str, Style], optional): Base style for text. Defaults to "".
        justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
        overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
        no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
        end (str, optional): Character to end text with. Defaults to "\\\\n".
        tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
        spans (List[Span], optional). A list of predefined style spans. Defaults to None.
    """

    __slots__ = [
        "_text",
        "style",
        "justify",
        "overflow",
        "no_wrap",
        "end",
        "tab_size",
        "_spans",
        "_length",
    ]

    def __init__(
        self,
        text: str = "",
        style: Union[str, Style] = "",
        *,
        justify: Optional["JustifyMethod"] = None,
        overflow: Optional["OverflowMethod"] = None,
        no_wrap: Optional[bool] = None,
        end: str = "\n",
        tab_size: Optional[int] = 8,
        spans: Optional[List[Span]] = None,
    ) -> None:
        sanitized_text = strip_control_codes(text)
        self._text = [sanitized_text]
        self.style = style
        self.justify: Optional["JustifyMethod"] = justify
        self.overflow: Optional["OverflowMethod"] = overflow
        self.no_wrap = no_wrap
        self.end = end
        self.tab_size = tab_size
        self._spans: List[Span] = spans or []
        self._length: int = len(sanitized_text)

    def __len__(self) -> int:
        return self._length

    def __bool__(self) -> bool:
        return bool(self._length)

    def __str__(self) -> str:
        return self.plain

    def __repr__(self) -> str:
        return f"<text {self.plain!r} {self._spans!r}>"

    def __add__(self, other: Any) -> "Text":
        if isinstance(other, (str, Text)):
            result = self.copy()
            result.append(other)
            return result
        return NotImplemented

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, Text):
            return NotImplemented
        return self.plain == other.plain and self._spans == other._spans

    def __contains__(self, other: object) -> bool:
        if isinstance(other, str):
            return other in self.plain
        elif isinstance(other, Text):
            return other.plain in self.plain
        return False

    def __getitem__(self, slice: Union[int, slice]) -> "Text":
        def get_text_at(offset: int) -> "Text":
            _Span = Span
            text = Text(
                self.plain[offset],
                spans=[
                    _Span(0, 1, style)
                    for start, end, style in self._spans
                    if end > offset >= start
                ],
                end="",
            )
            return text

        if isinstance(slice, int):
            return get_text_at(slice)
        else:
            start, stop, step = slice.indices(len(self.plain))
            if step == 1:
                lines = self.divide([start, stop])
                return lines[1]
            else:
                # This would be a bit of work to implement efficiently
                # For now, its not required
                raise TypeError("slices with step!=1 are not supported")

    @property
    def cell_len(self) -> int:
        """Get the number of cells required to render this text."""
        return cell_len(self.plain)

    @property
    def markup(self) -> str:
        """Get console markup to render this Text.

        Returns:
            str: A string potentially creating markup tags.
        """
        from .markup import escape

        output: List[str] = []

        plain = self.plain
        markup_spans = [
            (0, False, self.style),
            *((span.start, False, span.style) for span in self._spans),
            *((span.end, True, span.style) for span in self._spans),
            (len(plain), True, self.style),
        ]
        markup_spans.sort(key=itemgetter(0, 1))
        position = 0
        append = output.append
        for offset, closing, style in markup_spans:
            if offset > position:
                append(escape(plain[position:offset]))
                position = offset
            if style:
                append(f"[/{style}]" if closing else f"[{style}]")
        markup = "".join(output)
        return markup

    @classmethod
    def from_markup(
        cls,
        text: str,
        *,
        style: Union[str, Style] = "",
        emoji: bool = True,
        emoji_variant: Optional[EmojiVariant] = None,
        justify: Optional["JustifyMethod"] = None,
        overflow: Optional["OverflowMethod"] = None,
        end: str = "\n",
    ) -> "Text":
        """Create Text instance from markup.

        Args:
            text (str): A string containing console markup.
            emoji (bool, optional): Also render emoji code. Defaults to True.
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\\\n".

        Returns:
            Text: A Text instance with markup rendered.
        """
        from .markup import render

        rendered_text = render(text, style, emoji=emoji, emoji_variant=emoji_variant)
        rendered_text.justify = justify
        rendered_text.overflow = overflow
        rendered_text.end = end
        return rendered_text

    @classmethod
    def from_ansi(
        cls,
        text: str,
        *,
        style: Union[str, Style] = "",
        justify: Optional["JustifyMethod"] = None,
        overflow: Optional["OverflowMethod"] = None,
        no_wrap: Optional[bool] = None,
        end: str = "\n",
        tab_size: Optional[int] = 8,
    ) -> "Text":
        """Create a Text object from a string containing ANSI escape codes.

        Args:
            text (str): A string containing escape codes.
            style (Union[str, Style], optional): Base style for text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\\\n".
            tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
        """
        from .ansi import AnsiDecoder

        joiner = Text(
            "\n",
            justify=justify,
            overflow=overflow,
            no_wrap=no_wrap,
            end=end,
            tab_size=tab_size,
            style=style,
        )
        decoder = AnsiDecoder()
        result = joiner.join(line for line in decoder.decode(text))
        return result

    @classmethod
    def styled(
        cls,
        text: str,
        style: StyleType = "",
        *,
        justify: Optional["JustifyMethod"] = None,
        overflow: Optional["OverflowMethod"] = None,
    ) -> "Text":
        """Construct a Text instance with a pre-applied styled. A style applied in this way won't be used
        to pad the text when it is justified.

        Args:
            text (str): A string containing console markup.
            style (Union[str, Style]): Style to apply to the text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.

        Returns:
            Text: A text instance with a style applied to the entire string.
        """
        styled_text = cls(text, justify=justify, overflow=overflow)
        styled_text.stylize(style)
        return styled_text

    @classmethod
    def assemble(
        cls,
        *parts: Union[str, "Text", Tuple[str, StyleType]],
        style: Union[str, Style] = "",
        justify: Optional["JustifyMethod"] = None,
        overflow: Optional["OverflowMethod"] = None,
        no_wrap: Optional[bool] = None,
        end: str = "\n",
        tab_size: int = 8,
        meta: Optional[Dict[str, Any]] = None,
    ) -> "Text":
        """Construct a text instance by combining a sequence of strings with optional styles.
        The positional arguments should be either strings, or a tuple of string + style.

        Args:
            style (Union[str, Style], optional): Base style for text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\\\n".
            tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
            meta (Dict[str, Any], optional). Meta data to apply to text, or None for no meta data. Default to None

        Returns:
            Text: A new text instance.
        """
        text = cls(
            style=style,
            justify=justify,
            overflow=overflow,
            no_wrap=no_wrap,
            end=end,
            tab_size=tab_size,
        )
        append = text.append
        _Text = Text
        for part in parts:
            if isinstance(part, (_Text, str)):
                append(part)
            else:
                append(*part)
        if meta:
            text.apply_meta(meta)
        return text

    @property
    def plain(self) -> str:
        """Get the text as a single string."""
        if len(self._text) != 1:
            self._text[:] = ["".join(self._text)]
        return self._text[0]

    @plain.setter
    def plain(self, new_text: str) -> None:
        """Set the text to a new value."""
        if new_text != self.plain:
            sanitized_text = strip_control_codes(new_text)
            self._text[:] = [sanitized_text]
            old_length = self._length
            self._length = len(sanitized_text)
            if old_length > self._length:
                self._trim_spans()

    @property
    def spans(self) -> List[Span]:
        """Get a reference to the internal list of spans."""
        return self._spans

    @spans.setter
    def spans(self, spans: List[Span]) -> None:
        """Set spans."""
        self._spans = spans[:]

    def blank_copy(self, plain: str = "") -> "Text":
        """Return a new Text instance with copied meta data (but not the string or spans)."""
        copy_self = Text(
            plain,
            style=self.style,
            justify=self.justify,
            overflow=self.overflow,
            no_wrap=self.no_wrap,
            end=self.end,
            tab_size=self.tab_size,
        )
        return copy_self

    def copy(self) -> "Text":
        """Return a copy of this instance."""
        copy_self = Text(
            self.plain,
            style=self.style,
            justify=self.justify,
            overflow=self.overflow,
            no_wrap=self.no_wrap,
            end=self.end,
            tab_size=self.tab_size,
        )
        copy_self._spans[:] = self._spans
        return copy_self

    def stylize(
        self,
        style: Union[str, Style],
        start: int = 0,
        end: Optional[int] = None,
    ) -> None:
        """Apply a style to the text, or a portion of the text.

        Args:
            style (Union[str, Style]): Style instance or style definition to apply.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
        """
        if style:
            length = len(self)
            if start < 0:
                start = length + start
            if end is None:
                end = length
            if end < 0:
                end = length + end
            if start >= length or end <= start:
                # Span not in text or not valid
                return
            self._spans.append(Span(start, min(length, end), style))

    def stylize_before(
        self,
        style: Union[str, Style],
        start: int = 0,
        end: Optional[int] = None,
    ) -> None:
        """Apply a style to the text, or a portion of the text. Styles will be applied before other styles already present.

        Args:
            style (Union[str, Style]): Style instance or style definition to apply.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
        """
        if style:
            length = len(self)
            if start < 0:
                start = length + start
            if end is None:
                end = length
            if end < 0:
                end = length + end
            if start >= length or end <= start:
                # Span not in text or not valid
                return
            self._spans.insert(0, Span(start, min(length, end), style))

    def apply_meta(
        self, meta: Dict[str, Any], start: int = 0, end: Optional[int] = None
    ) -> None:
        """Apply meta data to the text, or a portion of the text.

        Args:
            meta (Dict[str, Any]): A dict of meta information.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.

        """
        style = Style.from_meta(meta)
        self.stylize(style, start=start, end=end)

    def on(self, meta: Optional[Dict[str, Any]] = None, **handlers: Any) -> "Text":
        """Apply event handlers (used by Textual project).

        Example:
            >>> from rich.text import Text
            >>> text = Text("hello world")
            >>> text.on(click="view.toggle('world')")

        Args:
            meta (Dict[str, Any]): Mapping of meta information.
            **handlers: Keyword args are prefixed with "@" to defined handlers.

        Returns:
            Text: Self is returned to method may be chained.
        """
        meta = {} if meta is None else meta
        meta.update({f"@{key}": value for key, value in handlers.items()})
        self.stylize(Style.from_meta(meta))
        return self

    def remove_suffix(self, suffix: str) -> None:
        """Remove a suffix if it exists.

        Args:
            suffix (str): Suffix to remove.
        """
        if self.plain.endswith(suffix):
            self.right_crop(len(suffix))

    def get_style_at_offset(self, console: "Console", offset: int) -> Style:
        """Get the style of a character at give offset.

        Args:
            console (~Console): Console where text will be rendered.
            offset (int): Offset in to text (negative indexing supported)

        Returns:
            Style: A Style instance.
        """
        # TODO: This is a little inefficient, it is only used by full justify
        if offset < 0:
            offset = len(self) + offset
        get_style = console.get_style
        style = get_style(self.style).copy()
        for start, end, span_style in self._spans:
            if end > offset >= start:
                style += get_style(span_style, default="")
        return style

    def highlight_regex(
        self,
        re_highlight: str,
        style: Optional[Union[GetStyleCallable, StyleType]] = None,
        *,
        style_prefix: str = "",
    ) -> int:
        """Highlight text with a regular expression, where group names are
        translated to styles.

        Args:
            re_highlight (str): A regular expression.
            style (Union[GetStyleCallable, StyleType]): Optional style to apply to whole match, or a callable
                which accepts the matched text and returns a style. Defaults to None.
            style_prefix (str, optional): Optional prefix to add to style group names.

        Returns:
            int: Number of regex matches
        """
        count = 0
        append_span = self._spans.append
        _Span = Span
        plain = self.plain
        for match in re.finditer(re_highlight, plain):
            get_span = match.span
            if style:
                start, end = get_span()
                match_style = style(plain[start:end]) if callable(style) else style
                if match_style is not None and end > start:
                    append_span(_Span(start, end, match_style))

            count += 1
            for name in match.groupdict().keys():
                start, end = get_span(name)
                if start != -1 and end > start:
                    append_span(_Span(start, end, f"{style_prefix}{name}"))
        return count

    def highlight_words(
        self,
        words: Iterable[str],
        style: Union[str, Style],
        *,
        case_sensitive: bool = True,
    ) -> int:
        """Highlight words with a style.

        Args:
            words (Iterable[str]): Worlds to highlight.
            style (Union[str, Style]): Style to apply.
            case_sensitive (bool, optional): Enable case sensitive matchings. Defaults to True.

        Returns:
            int: Number of words highlighted.
        """
        re_words = "|".join(re.escape(word) for word in words)
        add_span = self._spans.append
        count = 0
        _Span = Span
        for match in re.finditer(
            re_words, self.plain, flags=0 if case_sensitive else re.IGNORECASE
        ):
            start, end = match.span(0)
            add_span(_Span(start, end, style))
            count += 1
        return count

    def rstrip(self) -> None:
        """Strip whitespace from end of text."""
        self.plain = self.plain.rstrip()

    def rstrip_end(self, size: int) -> None:
        """Remove whitespace beyond a certain width at the end of the text.

        Args:
            size (int): The desired size of the text.
        """
        text_length = len(self)
        if text_length > size:
            excess = text_length - size
            whitespace_match = _re_whitespace.search(self.plain)
            if whitespace_match is not None:
                whitespace_count = len(whitespace_match.group(0))
                self.right_crop(min(whitespace_count, excess))

    def set_length(self, new_length: int) -> None:
        """Set new length of the text, clipping or padding is required."""
        length = len(self)
        if length != new_length:
            if length < new_length:
                self.pad_right(new_length - length)
            else:
                self.right_crop(length - new_length)

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> Iterable[Segment]:
        tab_size: int = console.tab_size or self.tab_size or 8
        justify = self.justify or options.justify or DEFAULT_JUSTIFY

        overflow = self.overflow or options.overflow or DEFAULT_OVERFLOW

        lines = self.wrap(
            console,
            options.max_width,
            justify=justify,
            overflow=overflow,
            tab_size=tab_size or 8,
            no_wrap=pick_bool(self.no_wrap, options.no_wrap, False),
        )
        all_lines = Text("\n").join(lines)
        yield from all_lines.render(console, end=self.end)

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> Measurement:
        text = self.plain
        lines = text.splitlines()
        max_text_width = max(cell_len(line) for line in lines) if lines else 0
        words = text.split()
        min_text_width = (
            max(cell_len(word) for word in words) if words else max_text_width
        )
        return Measurement(min_text_width, max_text_width)

    def render(self, console: "Console", end: str = "") -> Iterable["Segment"]:
        """Render the text as Segments.

        Args:
            console (Console): Console instance.
            end (Optional[str], optional): Optional end character.

        Returns:
            Iterable[Segment]: Result of render that may be written to the console.
        """
        _Segment = Segment
        text = self.plain
        if not self._spans:
            yield Segment(text)
            if end:
                yield _Segment(end)
            return
        get_style = partial(console.get_style, default=Style.null())

        enumerated_spans = list(enumerate(self._spans, 1))
        style_map = {index: get_style(span.style) for index, span in enumerated_spans}
        style_map[0] = get_style(self.style)

        spans = [
            (0, False, 0),
            *((span.start, False, index) for index, span in enumerated_spans),
            *((span.end, True, index) for index, span in enumerated_spans),
            (len(text), True, 0),
        ]
        spans.sort(key=itemgetter(0, 1))

        stack: List[int] = []
        stack_append = stack.append
        stack_pop = stack.remove

        style_cache: Dict[Tuple[Style, ...], Style] = {}
        style_cache_get = style_cache.get
        combine = Style.combine

        def get_current_style() -> Style:
            """Construct current style from stack."""
            styles = tuple(style_map[_style_id] for _style_id in sorted(stack))
            cached_style = style_cache_get(styles)
            if cached_style is not None:
                return cached_style
            current_style = combine(styles)
            style_cache[styles] = current_style
            return current_style

        for (offset, leaving, style_id), (next_offset, _, _) in zip(spans, spans[1:]):
            if leaving:
                stack_pop(style_id)
            else:
                stack_append(style_id)
            if next_offset > offset:
                yield _Segment(text[offset:next_offset], get_current_style())
        if end:
            yield _Segment(end)

    def join(self, lines: Iterable["Text"]) -> "Text":
        """Join text together with this instance as the separator.

        Args:
            lines (Iterable[Text]): An iterable of Text instances to join.

        Returns:
            Text: A new text instance containing join text.
        """

        new_text = self.blank_copy()

        def iter_text() -> Iterable["Text"]:
            if self.plain:
                for last, line in loop_last(lines):
                    yield line
                    if not last:
                        yield self
            else:
                yield from lines

        extend_text = new_text._text.extend
        append_span = new_text._spans.append
        extend_spans = new_text._spans.extend
        offset = 0
        _Span = Span

        for text in iter_text():
            extend_text(text._text)
            if text.style:
                append_span(_Span(offset, offset + len(text), text.style))
            extend_spans(
                _Span(offset + start, offset + end, style)
                for start, end, style in text._spans
            )
            offset += len(text)
        new_text._length = offset
        return new_text

    def expand_tabs(self, tab_size: Optional[int] = None) -> None:
        """Converts tabs to spaces.

        Args:
            tab_size (int, optional): Size of tabs. Defaults to 8.

        """
        if "\t" not in self.plain:
            return
        pos = 0
        if tab_size is None:
            tab_size = self.tab_size
        assert tab_size is not None
        result = self.blank_copy()
        append = result.append

        _style = self.style
        for line in self.split("\n", include_separator=True):
            parts = line.split("\t", include_separator=True)
            for part in parts:
                if part.plain.endswith("\t"):
                    part._text = [part.plain[:-1] + " "]
                    append(part)
                    pos += len(part)
                    spaces = tab_size - ((pos - 1) % tab_size) - 1
                    if spaces:
                        append(" " * spaces, _style)
                        pos += spaces
                else:
                    append(part)
        self._text = [result.plain]
        self._length = len(self.plain)
        self._spans[:] = result._spans

    def truncate(
        self,
        max_width: int,
        *,
        overflow: Optional["OverflowMethod"] = None,
        pad: bool = False,
    ) -> None:
        """Truncate text if it is longer that a given width.

        Args:
            max_width (int): Maximum number of characters in text.
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None, to use self.overflow.
            pad (bool, optional): Pad with spaces if the length is less than max_width. Defaults to False.
        """
        _overflow = overflow or self.overflow or DEFAULT_OVERFLOW
        if _overflow != "ignore":
            length = cell_len(self.plain)
            if length > max_width:
                if _overflow == "ellipsis":
                    self.plain = set_cell_size(self.plain, max_width - 1) + "…"
                else:
                    self.plain = set_cell_size(self.plain, max_width)
            if pad and length < max_width:
                spaces = max_width - length
                self._text = [f"{self.plain}{' ' * spaces}"]
                self._length = len(self.plain)

    def _trim_spans(self) -> None:
        """Remove or modify any spans that are over the end of the text."""
        max_offset = len(self.plain)
        _Span = Span
        self._spans[:] = [
            (
                span
                if span.end < max_offset
                else _Span(span.start, min(max_offset, span.end), span.style)
            )
            for span in self._spans
            if span.start < max_offset
        ]

    def pad(self, count: int, character: str = " ") -> None:
        """Pad left and right with a given number of characters.

        Args:
            count (int): Width of padding.
        """
        assert len(character) == 1, "Character must be a string of length 1"
        if count:
            pad_characters = character * count
            self.plain = f"{pad_characters}{self.plain}{pad_characters}"
            _Span = Span
            self._spans[:] = [
                _Span(start + count, end + count, style)
                for start, end, style in self._spans
            ]

    def pad_left(self, count: int, character: str = " ") -> None:
        """Pad the left with a given character.

        Args:
            count (int): Number of characters to pad.
            character (str, optional): Character to pad with. Defaults to " ".
        """
        assert len(character) == 1, "Character must be a string of length 1"
        if count:
            self.plain = f"{character * count}{self.plain}"
            _Span = Span
            self._spans[:] = [
                _Span(start + count, end + count, style)
                for start, end, style in self._spans
            ]

    def pad_right(self, count: int, character: str = " ") -> None:
        """Pad the right with a given character.

        Args:
            count (int): Number of characters to pad.
            character (str, optional): Character to pad with. Defaults to " ".
        """
        assert len(character) == 1, "Character must be a string of length 1"
        if count:
            self.plain = f"{self.plain}{character * count}"

    def align(self, align: AlignMethod, width: int, character: str = " ") -> None:
        """Align text to a given width.

        Args:
            align (AlignMethod): One of "left", "center", or "right".
            width (int): Desired width.
            character (str, optional): Character to pad with. Defaults to " ".
        """
        self.truncate(width)
        excess_space = width - cell_len(self.plain)
        if excess_space:
            if align == "left":
                self.pad_right(excess_space, character)
            elif align == "center":
                left = excess_space // 2
                self.pad_left(left, character)
                self.pad_right(excess_space - left, character)
            else:
                self.pad_left(excess_space, character)

    def append(
        self, text: Union["Text", str], style: Optional[Union[str, "Style"]] = None
    ) -> "Text":
        """Add text with an optional style.

        Args:
            text (Union[Text, str]): A str or Text to append.
            style (str, optional): A style name. Defaults to None.

        Returns:
            Text: Returns self for chaining.
        """

        if not isinstance(text, (str, Text)):
            raise TypeError("Only str or Text can be appended to Text")

        if len(text):
            if isinstance(text, str):
                sanitized_text = strip_control_codes(text)
                self._text.append(sanitized_text)
                offset = len(self)
                text_length = len(sanitized_text)
                if style is not None:
                    self._spans.append(Span(offset, offset + text_length, style))
                self._length += text_length
            elif isinstance(text, Text):
                _Span = Span
                if style is not None:
                    raise ValueError(
                        "style must not be set when appending Text instance"
                    )
                text_length = self._length
                if text.style is not None:
                    self._spans.append(
                        _Span(text_length, text_length + len(text), text.style)
                    )
                self._text.append(text.plain)
                self._spans.extend(
                    _Span(start + text_length, end + text_length, style)
                    for start, end, style in text._spans
                )
                self._length += len(text)
        return self

    def append_text(self, text: "Text") -> "Text":
        """Append another Text instance. This method is more performant that Text.append, but
        only works for Text.

        Returns:
            Text: Returns self for chaining.
        """
        _Span = Span
        text_length = self._length
        if text.style is not None:
            self._spans.append(_Span(text_length, text_length + len(text), text.style))
        self._text.append(text.plain)
        self._spans.extend(
            _Span(start + text_length, end + text_length, style)
            for start, end, style in text._spans
        )
        self._length += len(text)
        return self

    def append_tokens(
        self, tokens: Iterable[Tuple[str, Optional[StyleType]]]
    ) -> "Text":
        """Append iterable of str and style. Style may be a Style instance or a str style definition.

        Args:
            pairs (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style.

        Returns:
            Text: Returns self for chaining.
        """
        append_text = self._text.append
        append_span = self._spans.append
        _Span = Span
        offset = len(self)
        for content, style in tokens:
            append_text(content)
            if style is not None:
                append_span(_Span(offset, offset + len(content), style))
            offset += len(content)
        self._length = offset
        return self

    def copy_styles(self, text: "Text") -> None:
        """Copy styles from another Text instance.

        Args:
            text (Text): A Text instance to copy styles from, must be the same length.
        """
        self._spans.extend(text._spans)

    def split(
        self,
        separator: str = "\n",
        *,
        include_separator: bool = False,
        allow_blank: bool = False,
    ) -> Lines:
        """Split rich text in to lines, preserving styles.

        Args:
            separator (str, optional): String to split on. Defaults to "\\\\n".
            include_separator (bool, optional): Include the separator in the lines. Defaults to False.
            allow_blank (bool, optional): Return a blank line if the text ends with a separator. Defaults to False.

        Returns:
            List[RichText]: A list of rich text, one per line of the original.
        """
        assert separator, "separator must not be empty"

        text = self.plain
        if separator not in text:
            return Lines([self.copy()])

        if include_separator:
            lines = self.divide(
                match.end() for match in re.finditer(re.escape(separator), text)
            )
        else:

            def flatten_spans() -> Iterable[int]:
                for match in re.finditer(re.escape(separator), text):
                    start, end = match.span()
                    yield start
                    yield end

            lines = Lines(
                line for line in self.divide(flatten_spans()) if line.plain != separator
            )

        if not allow_blank and text.endswith(separator):
            lines.pop()

        return lines

    def divide(self, offsets: Iterable[int]) -> Lines:
        """Divide text in to a number of lines at given offsets.

        Args:
            offsets (Iterable[int]): Offsets used to divide text.

        Returns:
            Lines: New RichText instances between offsets.
        """
        _offsets = list(offsets)

        if not _offsets:
            return Lines([self.copy()])

        text = self.plain
        text_length = len(text)
        divide_offsets = [0, *_offsets, text_length]
        line_ranges = list(zip(divide_offsets, divide_offsets[1:]))

        style = self.style
        justify = self.justify
        overflow = self.overflow
        _Text = Text
        new_lines = Lines(
            _Text(
                text[start:end],
                style=style,
                justify=justify,
                overflow=overflow,
            )
            for start, end in line_ranges
        )
        if not self._spans:
            return new_lines

        _line_appends = [line._spans.append for line in new_lines._lines]
        line_count = len(line_ranges)
        _Span = Span

        for span_start, span_end, style in self._spans:

            lower_bound = 0
            upper_bound = line_count
            start_line_no = (lower_bound + upper_bound) // 2

            while True:
                line_start, line_end = line_ranges[start_line_no]
                if span_start < line_start:
                    upper_bound = start_line_no - 1
                elif span_start > line_end:
                    lower_bound = start_line_no + 1
                else:
                    break
                start_line_no = (lower_bound + upper_bound) // 2

            if span_end < line_end:
                end_line_no = start_line_no
            else:
                end_line_no = lower_bound = start_line_no
                upper_bound = line_count

                while True:
                    line_start, line_end = line_ranges[end_line_no]
                    if span_end < line_start:
                        upper_bound = end_line_no - 1
                    elif span_end > line_end:
                        lower_bound = end_line_no + 1
                    else:
                        break
                    end_line_no = (lower_bound + upper_bound) // 2

            for line_no in range(start_line_no, end_line_no + 1):
                line_start, line_end = line_ranges[line_no]
                new_start = max(0, span_start - line_start)
                new_end = min(span_end - line_start, line_end - line_start)
                if new_end > new_start:
                    _line_appends[line_no](_Span(new_start, new_end, style))

        return new_lines

    def right_crop(self, amount: int = 1) -> None:
        """Remove a number of characters from the end of the text."""
        max_offset = len(self.plain) - amount
        _Span = Span
        self._spans[:] = [
            (
                span
                if span.end < max_offset
                else _Span(span.start, min(max_offset, span.end), span.style)
            )
            for span in self._spans
            if span.start < max_offset
        ]
        self._text = [self.plain[:-amount]]
        self._length -= amount

    def wrap(
        self,
        console: "Console",
        width: int,
        *,
        justify: Optional["JustifyMethod"] = None,
        overflow: Optional["OverflowMethod"] = None,
        tab_size: int = 8,
        no_wrap: Optional[bool] = None,
    ) -> Lines:
        """Word wrap the text.

        Args:
            console (Console): Console instance.
            width (int): Number of characters per line.
            emoji (bool, optional): Also render emoji code. Defaults to True.
            justify (str, optional): Justify method: "default", "left", "center", "full", "right". Defaults to "default".
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None.
            tab_size (int, optional): Default tab size. Defaults to 8.
            no_wrap (bool, optional): Disable wrapping, Defaults to False.

        Returns:
            Lines: Number of lines.
        """
        wrap_justify = justify or self.justify or DEFAULT_JUSTIFY
        wrap_overflow = overflow or self.overflow or DEFAULT_OVERFLOW

        no_wrap = pick_bool(no_wrap, self.no_wrap, False) or overflow == "ignore"

        lines = Lines()
        for line in self.split(allow_blank=True):
            if "\t" in line:
                line.expand_tabs(tab_size)
            if no_wrap:
                new_lines = Lines([line])
            else:
                offsets = divide_line(str(line), width, fold=wrap_overflow == "fold")
                new_lines = line.divide(offsets)
            for line in new_lines:
                line.rstrip_end(width)
            if wrap_justify:
                new_lines.justify(
                    console, width, justify=wrap_justify, overflow=wrap_overflow
                )
            for line in new_lines:
                line.truncate(width, overflow=wrap_overflow)
            lines.extend(new_lines)
        return lines

    def fit(self, width: int) -> Lines:
        """Fit the text in to given width by chopping in to lines.

        Args:
            width (int): Maximum characters in a line.

        Returns:
            Lines: Lines container.
        """
        lines: Lines = Lines()
        append = lines.append
        for line in self.split():
            line.set_length(width)
            append(line)
        return lines

    def detect_indentation(self) -> int:
        """Auto-detect indentation of code.

        Returns:
            int: Number of spaces used to indent code.
        """

        _indentations = {
            len(match.group(1))
            for match in re.finditer(r"^( *)(.*)$", self.plain, flags=re.MULTILINE)
        }

        try:
            indentation = (
                reduce(gcd, [indent for indent in _indentations if not indent % 2]) or 1
            )
        except TypeError:
            indentation = 1

        return indentation

    def with_indent_guides(
        self,
        indent_size: Optional[int] = None,
        *,
        character: str = "│",
        style: StyleType = "dim green",
    ) -> "Text":
        """Adds indent guide lines to text.

        Args:
            indent_size (Optional[int]): Size of indentation, or None to auto detect. Defaults to None.
            character (str, optional): Character to use for indentation. Defaults to "│".
            style (Union[Style, str], optional): Style of indent guides.

        Returns:
            Text: New text with indentation guides.
        """

        _indent_size = self.detect_indentation() if indent_size is None else indent_size

        text = self.copy()
        text.expand_tabs()
        indent_line = f"{character}{' ' * (_indent_size - 1)}"

        re_indent = re.compile(r"^( *)(.*)$")
        new_lines: List[Text] = []
        add_line = new_lines.append
        blank_lines = 0
        for line in text.split(allow_blank=True):
            match = re_indent.match(line.plain)
            if not match or not match.group(2):
                blank_lines += 1
                continue
            indent = match.group(1)
            full_indents, remaining_space = divmod(len(indent), _indent_size)
            new_indent = f"{indent_line * full_indents}{' ' * remaining_space}"
            line.plain = new_indent + line.plain[len(new_indent) :]
            line.stylize(style, 0, len(new_indent))
            if blank_lines:
                new_lines.extend([Text(new_indent, style=style)] * blank_lines)
                blank_lines = 0
            add_line(line)
        if blank_lines:
            new_lines.extend([Text("", style=style)] * blank_lines)

        new_text = text.blank_copy("\n").join(new_lines)
        return new_text


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich.console import Console

    text = Text(
        """\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n"""
    )
    text.highlight_words(["Lorem"], "bold")
    text.highlight_words(["ipsum"], "italic")

    console = Console()

    console.rule("justify='left'")
    console.print(text, style="red")
    console.print()

    console.rule("justify='center'")
    console.print(text, style="green", justify="center")
    console.print()

    console.rule("justify='right'")
    console.print(text, style="blue", justify="right")
    console.print()

    console.rule("justify='full'")
    console.print(text, style="magenta", justify="full")
    console.print()
python3.12/site-packages/pip/_vendor/rich/highlighter.py000064400000022560151732702060017142 0ustar00import re
from abc import ABC, abstractmethod
from typing import List, Union

from .text import Span, Text


def _combine_regex(*regexes: str) -> str:
    """Combine a number of regexes in to a single regex.

    Returns:
        str: New regex with all regexes ORed together.
    """
    return "|".join(regexes)


class Highlighter(ABC):
    """Abstract base class for highlighters."""

    def __call__(self, text: Union[str, Text]) -> Text:
        """Highlight a str or Text instance.

        Args:
            text (Union[str, ~Text]): Text to highlight.

        Raises:
            TypeError: If not called with text or str.

        Returns:
            Text: A test instance with highlighting applied.
        """
        if isinstance(text, str):
            highlight_text = Text(text)
        elif isinstance(text, Text):
            highlight_text = text.copy()
        else:
            raise TypeError(f"str or Text instance required, not {text!r}")
        self.highlight(highlight_text)
        return highlight_text

    @abstractmethod
    def highlight(self, text: Text) -> None:
        """Apply highlighting in place to text.

        Args:
            text (~Text): A text object highlight.
        """


class NullHighlighter(Highlighter):
    """A highlighter object that doesn't highlight.

    May be used to disable highlighting entirely.

    """

    def highlight(self, text: Text) -> None:
        """Nothing to do"""


class RegexHighlighter(Highlighter):
    """Applies highlighting from a list of regular expressions."""

    highlights: List[str] = []
    base_style: str = ""

    def highlight(self, text: Text) -> None:
        """Highlight :class:`rich.text.Text` using regular expressions.

        Args:
            text (~Text): Text to highlighted.

        """

        highlight_regex = text.highlight_regex
        for re_highlight in self.highlights:
            highlight_regex(re_highlight, style_prefix=self.base_style)


class ReprHighlighter(RegexHighlighter):
    """Highlights the text typically produced from ``__repr__`` methods."""

    base_style = "repr."
    highlights = [
        r"(?P<tag_start><)(?P<tag_name>[-\w.:|]*)(?P<tag_contents>[\w\W]*)(?P<tag_end>>)",
        r'(?P<attrib_name>[\w_]{1,50})=(?P<attrib_value>"?[\w_]+"?)?',
        r"(?P<brace>[][{}()])",
        _combine_regex(
            r"(?P<ipv4>[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})",
            r"(?P<ipv6>([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})",
            r"(?P<eui64>(?:[0-9A-Fa-f]{1,2}-){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){3}[0-9A-Fa-f]{4})",
            r"(?P<eui48>(?:[0-9A-Fa-f]{1,2}-){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4})",
            r"(?P<uuid>[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})",
            r"(?P<call>[\w.]*?)\(",
            r"\b(?P<bool_true>True)\b|\b(?P<bool_false>False)\b|\b(?P<none>None)\b",
            r"(?P<ellipsis>\.\.\.)",
            r"(?P<number_complex>(?<!\w)(?:\-?[0-9]+\.?[0-9]*(?:e[-+]?\d+?)?)(?:[-+](?:[0-9]+\.?[0-9]*(?:e[-+]?\d+)?))?j)",
            r"(?P<number>(?<!\w)\-?[0-9]+\.?[0-9]*(e[-+]?\d+?)?\b|0x[0-9a-fA-F]*)",
            r"(?P<path>\B(/[-\w._+]+)*\/)(?P<filename>[-\w._+]*)?",
            r"(?<![\\\w])(?P<str>b?'''.*?(?<!\\)'''|b?'.*?(?<!\\)'|b?\"\"\".*?(?<!\\)\"\"\"|b?\".*?(?<!\\)\")",
            r"(?P<url>(file|https|http|ws|wss)://[-0-9a-zA-Z$_+!`(),.?/;:&=%#]*)",
        ),
    ]


class JSONHighlighter(RegexHighlighter):
    """Highlights JSON"""

    # Captures the start and end of JSON strings, handling escaped quotes
    JSON_STR = r"(?<![\\\w])(?P<str>b?\".*?(?<!\\)\")"
    JSON_WHITESPACE = {" ", "\n", "\r", "\t"}

    base_style = "json."
    highlights = [
        _combine_regex(
            r"(?P<brace>[\{\[\(\)\]\}])",
            r"\b(?P<bool_true>true)\b|\b(?P<bool_false>false)\b|\b(?P<null>null)\b",
            r"(?P<number>(?<!\w)\-?[0-9]+\.?[0-9]*(e[\-\+]?\d+?)?\b|0x[0-9a-fA-F]*)",
            JSON_STR,
        ),
    ]

    def highlight(self, text: Text) -> None:
        super().highlight(text)

        # Additional work to handle highlighting JSON keys
        plain = text.plain
        append = text.spans.append
        whitespace = self.JSON_WHITESPACE
        for match in re.finditer(self.JSON_STR, plain):
            start, end = match.span()
            cursor = end
            while cursor < len(plain):
                char = plain[cursor]
                cursor += 1
                if char == ":":
                    append(Span(start, end, "json.key"))
                elif char in whitespace:
                    continue
                break


class ISO8601Highlighter(RegexHighlighter):
    """Highlights the ISO8601 date time strings.
    Regex reference: https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s07.html
    """

    base_style = "iso8601."
    highlights = [
        #
        # Dates
        #
        # Calendar month (e.g. 2008-08). The hyphen is required
        r"^(?P<year>[0-9]{4})-(?P<month>1[0-2]|0[1-9])$",
        # Calendar date w/o hyphens (e.g. 20080830)
        r"^(?P<date>(?P<year>[0-9]{4})(?P<month>1[0-2]|0[1-9])(?P<day>3[01]|0[1-9]|[12][0-9]))$",
        # Ordinal date (e.g. 2008-243). The hyphen is optional
        r"^(?P<date>(?P<year>[0-9]{4})-?(?P<day>36[0-6]|3[0-5][0-9]|[12][0-9]{2}|0[1-9][0-9]|00[1-9]))$",
        #
        # Weeks
        #
        # Week of the year (e.g., 2008-W35). The hyphen is optional
        r"^(?P<date>(?P<year>[0-9]{4})-?W(?P<week>5[0-3]|[1-4][0-9]|0[1-9]))$",
        # Week date (e.g., 2008-W35-6). The hyphens are optional
        r"^(?P<date>(?P<year>[0-9]{4})-?W(?P<week>5[0-3]|[1-4][0-9]|0[1-9])-?(?P<day>[1-7]))$",
        #
        # Times
        #
        # Hours and minutes (e.g., 17:21). The colon is optional
        r"^(?P<time>(?P<hour>2[0-3]|[01][0-9]):?(?P<minute>[0-5][0-9]))$",
        # Hours, minutes, and seconds w/o colons (e.g., 172159)
        r"^(?P<time>(?P<hour>2[0-3]|[01][0-9])(?P<minute>[0-5][0-9])(?P<second>[0-5][0-9]))$",
        # Time zone designator (e.g., Z, +07 or +07:00). The colons and the minutes are optional
        r"^(?P<timezone>(Z|[+-](?:2[0-3]|[01][0-9])(?::?(?:[0-5][0-9]))?))$",
        # Hours, minutes, and seconds with time zone designator (e.g., 17:21:59+07:00).
        # All the colons are optional. The minutes in the time zone designator are also optional
        r"^(?P<time>(?P<hour>2[0-3]|[01][0-9])(?P<minute>[0-5][0-9])(?P<second>[0-5][0-9]))(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9])(?::?(?:[0-5][0-9]))?)$",
        #
        # Date and Time
        #
        # Calendar date with hours, minutes, and seconds (e.g., 2008-08-30 17:21:59 or 20080830 172159).
        # A space is required between the date and the time. The hyphens and colons are optional.
        # This regex matches dates and times that specify some hyphens or colons but omit others.
        # This does not follow ISO 8601
        r"^(?P<date>(?P<year>[0-9]{4})(?P<hyphen>-)?(?P<month>1[0-2]|0[1-9])(?(hyphen)-)(?P<day>3[01]|0[1-9]|[12][0-9])) (?P<time>(?P<hour>2[0-3]|[01][0-9])(?(hyphen):)(?P<minute>[0-5][0-9])(?(hyphen):)(?P<second>[0-5][0-9]))$",
        #
        # XML Schema dates and times
        #
        # Date, with optional time zone (e.g., 2008-08-30 or 2008-08-30+07:00).
        # Hyphens are required. This is the XML Schema 'date' type
        r"^(?P<date>(?P<year>-?(?:[1-9][0-9]*)?[0-9]{4})-(?P<month>1[0-2]|0[1-9])-(?P<day>3[01]|0[1-9]|[12][0-9]))(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$",
        # Time, with optional fractional seconds and time zone (e.g., 01:45:36 or 01:45:36.123+07:00).
        # There is no limit on the number of digits for the fractional seconds. This is the XML Schema 'time' type
        r"^(?P<time>(?P<hour>2[0-3]|[01][0-9]):(?P<minute>[0-5][0-9]):(?P<second>[0-5][0-9])(?P<frac>\.[0-9]+)?)(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$",
        # Date and time, with optional fractional seconds and time zone (e.g., 2008-08-30T01:45:36 or 2008-08-30T01:45:36.123Z).
        # This is the XML Schema 'dateTime' type
        r"^(?P<date>(?P<year>-?(?:[1-9][0-9]*)?[0-9]{4})-(?P<month>1[0-2]|0[1-9])-(?P<day>3[01]|0[1-9]|[12][0-9]))T(?P<time>(?P<hour>2[0-3]|[01][0-9]):(?P<minute>[0-5][0-9]):(?P<second>[0-5][0-9])(?P<ms>\.[0-9]+)?)(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$",
    ]


if __name__ == "__main__":  # pragma: no cover
    from .console import Console

    console = Console()
    console.print("[bold green]hello world![/bold green]")
    console.print("'[bold green]hello world![/bold green]'")

    console.print(" /foo")
    console.print("/foo/")
    console.print("/foo/bar")
    console.print("foo/bar/baz")

    console.print("/foo/bar/baz?foo=bar+egg&egg=baz")
    console.print("/foo/bar/baz/")
    console.print("/foo/bar/baz/egg")
    console.print("/foo/bar/baz/egg.py")
    console.print("/foo/bar/baz/egg.py word")
    console.print(" /foo/bar/baz/egg.py word")
    console.print("foo /foo/bar/baz/egg.py word")
    console.print("foo /foo/bar/ba._++z/egg+.py word")
    console.print("https://example.org?foo=bar#header")

    console.print(1234567.34)
    console.print(1 / 2)
    console.print(-1 / 123123123123)

    console.print(
        "127.0.1.1 bar 192.168.1.4 2001:0db8:85a3:0000:0000:8a2e:0370:7334 foo"
    )
    import json

    console.print_json(json.dumps(obj={"name": "apple", "count": 1}), indent=None)
python3.12/site-packages/pip/_vendor/rich/default_styles.py000064400000017622151732702060017676 0ustar00from typing import Dict

from .style import Style

DEFAULT_STYLES: Dict[str, Style] = {
    "none": Style.null(),
    "reset": Style(
        color="default",
        bgcolor="default",
        dim=False,
        bold=False,
        italic=False,
        underline=False,
        blink=False,
        blink2=False,
        reverse=False,
        conceal=False,
        strike=False,
    ),
    "dim": Style(dim=True),
    "bright": Style(dim=False),
    "bold": Style(bold=True),
    "strong": Style(bold=True),
    "code": Style(reverse=True, bold=True),
    "italic": Style(italic=True),
    "emphasize": Style(italic=True),
    "underline": Style(underline=True),
    "blink": Style(blink=True),
    "blink2": Style(blink2=True),
    "reverse": Style(reverse=True),
    "strike": Style(strike=True),
    "black": Style(color="black"),
    "red": Style(color="red"),
    "green": Style(color="green"),
    "yellow": Style(color="yellow"),
    "magenta": Style(color="magenta"),
    "cyan": Style(color="cyan"),
    "white": Style(color="white"),
    "inspect.attr": Style(color="yellow", italic=True),
    "inspect.attr.dunder": Style(color="yellow", italic=True, dim=True),
    "inspect.callable": Style(bold=True, color="red"),
    "inspect.async_def": Style(italic=True, color="bright_cyan"),
    "inspect.def": Style(italic=True, color="bright_cyan"),
    "inspect.class": Style(italic=True, color="bright_cyan"),
    "inspect.error": Style(bold=True, color="red"),
    "inspect.equals": Style(),
    "inspect.help": Style(color="cyan"),
    "inspect.doc": Style(dim=True),
    "inspect.value.border": Style(color="green"),
    "live.ellipsis": Style(bold=True, color="red"),
    "layout.tree.row": Style(dim=False, color="red"),
    "layout.tree.column": Style(dim=False, color="blue"),
    "logging.keyword": Style(bold=True, color="yellow"),
    "logging.level.notset": Style(dim=True),
    "logging.level.debug": Style(color="green"),
    "logging.level.info": Style(color="blue"),
    "logging.level.warning": Style(color="red"),
    "logging.level.error": Style(color="red", bold=True),
    "logging.level.critical": Style(color="red", bold=True, reverse=True),
    "log.level": Style.null(),
    "log.time": Style(color="cyan", dim=True),
    "log.message": Style.null(),
    "log.path": Style(dim=True),
    "repr.ellipsis": Style(color="yellow"),
    "repr.indent": Style(color="green", dim=True),
    "repr.error": Style(color="red", bold=True),
    "repr.str": Style(color="green", italic=False, bold=False),
    "repr.brace": Style(bold=True),
    "repr.comma": Style(bold=True),
    "repr.ipv4": Style(bold=True, color="bright_green"),
    "repr.ipv6": Style(bold=True, color="bright_green"),
    "repr.eui48": Style(bold=True, color="bright_green"),
    "repr.eui64": Style(bold=True, color="bright_green"),
    "repr.tag_start": Style(bold=True),
    "repr.tag_name": Style(color="bright_magenta", bold=True),
    "repr.tag_contents": Style(color="default"),
    "repr.tag_end": Style(bold=True),
    "repr.attrib_name": Style(color="yellow", italic=False),
    "repr.attrib_equal": Style(bold=True),
    "repr.attrib_value": Style(color="magenta", italic=False),
    "repr.number": Style(color="cyan", bold=True, italic=False),
    "repr.number_complex": Style(color="cyan", bold=True, italic=False),  # same
    "repr.bool_true": Style(color="bright_green", italic=True),
    "repr.bool_false": Style(color="bright_red", italic=True),
    "repr.none": Style(color="magenta", italic=True),
    "repr.url": Style(underline=True, color="bright_blue", italic=False, bold=False),
    "repr.uuid": Style(color="bright_yellow", bold=False),
    "repr.call": Style(color="magenta", bold=True),
    "repr.path": Style(color="magenta"),
    "repr.filename": Style(color="bright_magenta"),
    "rule.line": Style(color="bright_green"),
    "rule.text": Style.null(),
    "json.brace": Style(bold=True),
    "json.bool_true": Style(color="bright_green", italic=True),
    "json.bool_false": Style(color="bright_red", italic=True),
    "json.null": Style(color="magenta", italic=True),
    "json.number": Style(color="cyan", bold=True, italic=False),
    "json.str": Style(color="green", italic=False, bold=False),
    "json.key": Style(color="blue", bold=True),
    "prompt": Style.null(),
    "prompt.choices": Style(color="magenta", bold=True),
    "prompt.default": Style(color="cyan", bold=True),
    "prompt.invalid": Style(color="red"),
    "prompt.invalid.choice": Style(color="red"),
    "pretty": Style.null(),
    "scope.border": Style(color="blue"),
    "scope.key": Style(color="yellow", italic=True),
    "scope.key.special": Style(color="yellow", italic=True, dim=True),
    "scope.equals": Style(color="red"),
    "table.header": Style(bold=True),
    "table.footer": Style(bold=True),
    "table.cell": Style.null(),
    "table.title": Style(italic=True),
    "table.caption": Style(italic=True, dim=True),
    "traceback.error": Style(color="red", italic=True),
    "traceback.border.syntax_error": Style(color="bright_red"),
    "traceback.border": Style(color="red"),
    "traceback.text": Style.null(),
    "traceback.title": Style(color="red", bold=True),
    "traceback.exc_type": Style(color="bright_red", bold=True),
    "traceback.exc_value": Style.null(),
    "traceback.offset": Style(color="bright_red", bold=True),
    "bar.back": Style(color="grey23"),
    "bar.complete": Style(color="rgb(249,38,114)"),
    "bar.finished": Style(color="rgb(114,156,31)"),
    "bar.pulse": Style(color="rgb(249,38,114)"),
    "progress.description": Style.null(),
    "progress.filesize": Style(color="green"),
    "progress.filesize.total": Style(color="green"),
    "progress.download": Style(color="green"),
    "progress.elapsed": Style(color="yellow"),
    "progress.percentage": Style(color="magenta"),
    "progress.remaining": Style(color="cyan"),
    "progress.data.speed": Style(color="red"),
    "progress.spinner": Style(color="green"),
    "status.spinner": Style(color="green"),
    "tree": Style(),
    "tree.line": Style(),
    "markdown.paragraph": Style(),
    "markdown.text": Style(),
    "markdown.em": Style(italic=True),
    "markdown.emph": Style(italic=True),  # For commonmark backwards compatibility
    "markdown.strong": Style(bold=True),
    "markdown.code": Style(bold=True, color="cyan", bgcolor="black"),
    "markdown.code_block": Style(color="cyan", bgcolor="black"),
    "markdown.block_quote": Style(color="magenta"),
    "markdown.list": Style(color="cyan"),
    "markdown.item": Style(),
    "markdown.item.bullet": Style(color="yellow", bold=True),
    "markdown.item.number": Style(color="yellow", bold=True),
    "markdown.hr": Style(color="yellow"),
    "markdown.h1.border": Style(),
    "markdown.h1": Style(bold=True),
    "markdown.h2": Style(bold=True, underline=True),
    "markdown.h3": Style(bold=True),
    "markdown.h4": Style(bold=True, dim=True),
    "markdown.h5": Style(underline=True),
    "markdown.h6": Style(italic=True),
    "markdown.h7": Style(italic=True, dim=True),
    "markdown.link": Style(color="bright_blue"),
    "markdown.link_url": Style(color="blue", underline=True),
    "markdown.s": Style(strike=True),
    "iso8601.date": Style(color="blue"),
    "iso8601.time": Style(color="magenta"),
    "iso8601.timezone": Style(color="yellow"),
}


if __name__ == "__main__":  # pragma: no cover
    import argparse
    import io

    from pip._vendor.rich.console import Console
    from pip._vendor.rich.table import Table
    from pip._vendor.rich.text import Text

    parser = argparse.ArgumentParser()
    parser.add_argument("--html", action="store_true", help="Export as HTML table")
    args = parser.parse_args()
    html: bool = args.html
    console = Console(record=True, width=70, file=io.StringIO()) if html else Console()

    table = Table("Name", "Styling")

    for style_name, style in DEFAULT_STYLES.items():
        table.add_row(Text(style_name, style=style), str(style))

    console.print(table)
    if html:
        print(console.export_html(inline_styles=True))
python3.12/site-packages/pip/_vendor/rich/diagnose.py000064400000001714151732702060016433 0ustar00import os
import platform

from pip._vendor.rich import inspect
from pip._vendor.rich.console import Console, get_windows_console_features
from pip._vendor.rich.panel import Panel
from pip._vendor.rich.pretty import Pretty


def report() -> None:  # pragma: no cover
    """Print a report to the terminal with debugging information"""
    console = Console()
    inspect(console)
    features = get_windows_console_features()
    inspect(features)

    env_names = (
        "TERM",
        "COLORTERM",
        "CLICOLOR",
        "NO_COLOR",
        "TERM_PROGRAM",
        "COLUMNS",
        "LINES",
        "JUPYTER_COLUMNS",
        "JUPYTER_LINES",
        "JPY_PARENT_PID",
        "VSCODE_VERBOSE_LOGGING",
    )
    env = {name: os.getenv(name) for name in env_names}
    console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables"))

    console.print(f'platform="{platform.system()}"')


if __name__ == "__main__":  # pragma: no cover
    report()
python3.12/site-packages/pip/_vendor/rich/color.py000064400000043460151732702070015765 0ustar00import platform
import re
from colorsys import rgb_to_hls
from enum import IntEnum
from functools import lru_cache
from typing import TYPE_CHECKING, NamedTuple, Optional, Tuple

from ._palettes import EIGHT_BIT_PALETTE, STANDARD_PALETTE, WINDOWS_PALETTE
from .color_triplet import ColorTriplet
from .repr import Result, rich_repr
from .terminal_theme import DEFAULT_TERMINAL_THEME

if TYPE_CHECKING:  # pragma: no cover
    from .terminal_theme import TerminalTheme
    from .text import Text


WINDOWS = platform.system() == "Windows"


class ColorSystem(IntEnum):
    """One of the 3 color system supported by terminals."""

    STANDARD = 1
    EIGHT_BIT = 2
    TRUECOLOR = 3
    WINDOWS = 4

    def __repr__(self) -> str:
        return f"ColorSystem.{self.name}"

    def __str__(self) -> str:
        return repr(self)


class ColorType(IntEnum):
    """Type of color stored in Color class."""

    DEFAULT = 0
    STANDARD = 1
    EIGHT_BIT = 2
    TRUECOLOR = 3
    WINDOWS = 4

    def __repr__(self) -> str:
        return f"ColorType.{self.name}"


ANSI_COLOR_NAMES = {
    "black": 0,
    "red": 1,
    "green": 2,
    "yellow": 3,
    "blue": 4,
    "magenta": 5,
    "cyan": 6,
    "white": 7,
    "bright_black": 8,
    "bright_red": 9,
    "bright_green": 10,
    "bright_yellow": 11,
    "bright_blue": 12,
    "bright_magenta": 13,
    "bright_cyan": 14,
    "bright_white": 15,
    "grey0": 16,
    "gray0": 16,
    "navy_blue": 17,
    "dark_blue": 18,
    "blue3": 20,
    "blue1": 21,
    "dark_green": 22,
    "deep_sky_blue4": 25,
    "dodger_blue3": 26,
    "dodger_blue2": 27,
    "green4": 28,
    "spring_green4": 29,
    "turquoise4": 30,
    "deep_sky_blue3": 32,
    "dodger_blue1": 33,
    "green3": 40,
    "spring_green3": 41,
    "dark_cyan": 36,
    "light_sea_green": 37,
    "deep_sky_blue2": 38,
    "deep_sky_blue1": 39,
    "spring_green2": 47,
    "cyan3": 43,
    "dark_turquoise": 44,
    "turquoise2": 45,
    "green1": 46,
    "spring_green1": 48,
    "medium_spring_green": 49,
    "cyan2": 50,
    "cyan1": 51,
    "dark_red": 88,
    "deep_pink4": 125,
    "purple4": 55,
    "purple3": 56,
    "blue_violet": 57,
    "orange4": 94,
    "grey37": 59,
    "gray37": 59,
    "medium_purple4": 60,
    "slate_blue3": 62,
    "royal_blue1": 63,
    "chartreuse4": 64,
    "dark_sea_green4": 71,
    "pale_turquoise4": 66,
    "steel_blue": 67,
    "steel_blue3": 68,
    "cornflower_blue": 69,
    "chartreuse3": 76,
    "cadet_blue": 73,
    "sky_blue3": 74,
    "steel_blue1": 81,
    "pale_green3": 114,
    "sea_green3": 78,
    "aquamarine3": 79,
    "medium_turquoise": 80,
    "chartreuse2": 112,
    "sea_green2": 83,
    "sea_green1": 85,
    "aquamarine1": 122,
    "dark_slate_gray2": 87,
    "dark_magenta": 91,
    "dark_violet": 128,
    "purple": 129,
    "light_pink4": 95,
    "plum4": 96,
    "medium_purple3": 98,
    "slate_blue1": 99,
    "yellow4": 106,
    "wheat4": 101,
    "grey53": 102,
    "gray53": 102,
    "light_slate_grey": 103,
    "light_slate_gray": 103,
    "medium_purple": 104,
    "light_slate_blue": 105,
    "dark_olive_green3": 149,
    "dark_sea_green": 108,
    "light_sky_blue3": 110,
    "sky_blue2": 111,
    "dark_sea_green3": 150,
    "dark_slate_gray3": 116,
    "sky_blue1": 117,
    "chartreuse1": 118,
    "light_green": 120,
    "pale_green1": 156,
    "dark_slate_gray1": 123,
    "red3": 160,
    "medium_violet_red": 126,
    "magenta3": 164,
    "dark_orange3": 166,
    "indian_red": 167,
    "hot_pink3": 168,
    "medium_orchid3": 133,
    "medium_orchid": 134,
    "medium_purple2": 140,
    "dark_goldenrod": 136,
    "light_salmon3": 173,
    "rosy_brown": 138,
    "grey63": 139,
    "gray63": 139,
    "medium_purple1": 141,
    "gold3": 178,
    "dark_khaki": 143,
    "navajo_white3": 144,
    "grey69": 145,
    "gray69": 145,
    "light_steel_blue3": 146,
    "light_steel_blue": 147,
    "yellow3": 184,
    "dark_sea_green2": 157,
    "light_cyan3": 152,
    "light_sky_blue1": 153,
    "green_yellow": 154,
    "dark_olive_green2": 155,
    "dark_sea_green1": 193,
    "pale_turquoise1": 159,
    "deep_pink3": 162,
    "magenta2": 200,
    "hot_pink2": 169,
    "orchid": 170,
    "medium_orchid1": 207,
    "orange3": 172,
    "light_pink3": 174,
    "pink3": 175,
    "plum3": 176,
    "violet": 177,
    "light_goldenrod3": 179,
    "tan": 180,
    "misty_rose3": 181,
    "thistle3": 182,
    "plum2": 183,
    "khaki3": 185,
    "light_goldenrod2": 222,
    "light_yellow3": 187,
    "grey84": 188,
    "gray84": 188,
    "light_steel_blue1": 189,
    "yellow2": 190,
    "dark_olive_green1": 192,
    "honeydew2": 194,
    "light_cyan1": 195,
    "red1": 196,
    "deep_pink2": 197,
    "deep_pink1": 199,
    "magenta1": 201,
    "orange_red1": 202,
    "indian_red1": 204,
    "hot_pink": 206,
    "dark_orange": 208,
    "salmon1": 209,
    "light_coral": 210,
    "pale_violet_red1": 211,
    "orchid2": 212,
    "orchid1": 213,
    "orange1": 214,
    "sandy_brown": 215,
    "light_salmon1": 216,
    "light_pink1": 217,
    "pink1": 218,
    "plum1": 219,
    "gold1": 220,
    "navajo_white1": 223,
    "misty_rose1": 224,
    "thistle1": 225,
    "yellow1": 226,
    "light_goldenrod1": 227,
    "khaki1": 228,
    "wheat1": 229,
    "cornsilk1": 230,
    "grey100": 231,
    "gray100": 231,
    "grey3": 232,
    "gray3": 232,
    "grey7": 233,
    "gray7": 233,
    "grey11": 234,
    "gray11": 234,
    "grey15": 235,
    "gray15": 235,
    "grey19": 236,
    "gray19": 236,
    "grey23": 237,
    "gray23": 237,
    "grey27": 238,
    "gray27": 238,
    "grey30": 239,
    "gray30": 239,
    "grey35": 240,
    "gray35": 240,
    "grey39": 241,
    "gray39": 241,
    "grey42": 242,
    "gray42": 242,
    "grey46": 243,
    "gray46": 243,
    "grey50": 244,
    "gray50": 244,
    "grey54": 245,
    "gray54": 245,
    "grey58": 246,
    "gray58": 246,
    "grey62": 247,
    "gray62": 247,
    "grey66": 248,
    "gray66": 248,
    "grey70": 249,
    "gray70": 249,
    "grey74": 250,
    "gray74": 250,
    "grey78": 251,
    "gray78": 251,
    "grey82": 252,
    "gray82": 252,
    "grey85": 253,
    "gray85": 253,
    "grey89": 254,
    "gray89": 254,
    "grey93": 255,
    "gray93": 255,
}


class ColorParseError(Exception):
    """The color could not be parsed."""


RE_COLOR = re.compile(
    r"""^
\#([0-9a-f]{6})$|
color\(([0-9]{1,3})\)$|
rgb\(([\d\s,]+)\)$
""",
    re.VERBOSE,
)


@rich_repr
class Color(NamedTuple):
    """Terminal color definition."""

    name: str
    """The name of the color (typically the input to Color.parse)."""
    type: ColorType
    """The type of the color."""
    number: Optional[int] = None
    """The color number, if a standard color, or None."""
    triplet: Optional[ColorTriplet] = None
    """A triplet of color components, if an RGB color."""

    def __rich__(self) -> "Text":
        """Displays the actual color if Rich printed."""
        from .style import Style
        from .text import Text

        return Text.assemble(
            f"<color {self.name!r} ({self.type.name.lower()})",
            ("⬤", Style(color=self)),
            " >",
        )

    def __rich_repr__(self) -> Result:
        yield self.name
        yield self.type
        yield "number", self.number, None
        yield "triplet", self.triplet, None

    @property
    def system(self) -> ColorSystem:
        """Get the native color system for this color."""
        if self.type == ColorType.DEFAULT:
            return ColorSystem.STANDARD
        return ColorSystem(int(self.type))

    @property
    def is_system_defined(self) -> bool:
        """Check if the color is ultimately defined by the system."""
        return self.system not in (ColorSystem.EIGHT_BIT, ColorSystem.TRUECOLOR)

    @property
    def is_default(self) -> bool:
        """Check if the color is a default color."""
        return self.type == ColorType.DEFAULT

    def get_truecolor(
        self, theme: Optional["TerminalTheme"] = None, foreground: bool = True
    ) -> ColorTriplet:
        """Get an equivalent color triplet for this color.

        Args:
            theme (TerminalTheme, optional): Optional terminal theme, or None to use default. Defaults to None.
            foreground (bool, optional): True for a foreground color, or False for background. Defaults to True.

        Returns:
            ColorTriplet: A color triplet containing RGB components.
        """

        if theme is None:
            theme = DEFAULT_TERMINAL_THEME
        if self.type == ColorType.TRUECOLOR:
            assert self.triplet is not None
            return self.triplet
        elif self.type == ColorType.EIGHT_BIT:
            assert self.number is not None
            return EIGHT_BIT_PALETTE[self.number]
        elif self.type == ColorType.STANDARD:
            assert self.number is not None
            return theme.ansi_colors[self.number]
        elif self.type == ColorType.WINDOWS:
            assert self.number is not None
            return WINDOWS_PALETTE[self.number]
        else:  # self.type == ColorType.DEFAULT:
            assert self.number is None
            return theme.foreground_color if foreground else theme.background_color

    @classmethod
    def from_ansi(cls, number: int) -> "Color":
        """Create a Color number from it's 8-bit ansi number.

        Args:
            number (int): A number between 0-255 inclusive.

        Returns:
            Color: A new Color instance.
        """
        return cls(
            name=f"color({number})",
            type=(ColorType.STANDARD if number < 16 else ColorType.EIGHT_BIT),
            number=number,
        )

    @classmethod
    def from_triplet(cls, triplet: "ColorTriplet") -> "Color":
        """Create a truecolor RGB color from a triplet of values.

        Args:
            triplet (ColorTriplet): A color triplet containing red, green and blue components.

        Returns:
            Color: A new color object.
        """
        return cls(name=triplet.hex, type=ColorType.TRUECOLOR, triplet=triplet)

    @classmethod
    def from_rgb(cls, red: float, green: float, blue: float) -> "Color":
        """Create a truecolor from three color components in the range(0->255).

        Args:
            red (float): Red component in range 0-255.
            green (float): Green component in range 0-255.
            blue (float): Blue component in range 0-255.

        Returns:
            Color: A new color object.
        """
        return cls.from_triplet(ColorTriplet(int(red), int(green), int(blue)))

    @classmethod
    def default(cls) -> "Color":
        """Get a Color instance representing the default color.

        Returns:
            Color: Default color.
        """
        return cls(name="default", type=ColorType.DEFAULT)

    @classmethod
    @lru_cache(maxsize=1024)
    def parse(cls, color: str) -> "Color":
        """Parse a color definition."""
        original_color = color
        color = color.lower().strip()

        if color == "default":
            return cls(color, type=ColorType.DEFAULT)

        color_number = ANSI_COLOR_NAMES.get(color)
        if color_number is not None:
            return cls(
                color,
                type=(ColorType.STANDARD if color_number < 16 else ColorType.EIGHT_BIT),
                number=color_number,
            )

        color_match = RE_COLOR.match(color)
        if color_match is None:
            raise ColorParseError(f"{original_color!r} is not a valid color")

        color_24, color_8, color_rgb = color_match.groups()
        if color_24:
            triplet = ColorTriplet(
                int(color_24[0:2], 16), int(color_24[2:4], 16), int(color_24[4:6], 16)
            )
            return cls(color, ColorType.TRUECOLOR, triplet=triplet)

        elif color_8:
            number = int(color_8)
            if number > 255:
                raise ColorParseError(f"color number must be <= 255 in {color!r}")
            return cls(
                color,
                type=(ColorType.STANDARD if number < 16 else ColorType.EIGHT_BIT),
                number=number,
            )

        else:  #  color_rgb:
            components = color_rgb.split(",")
            if len(components) != 3:
                raise ColorParseError(
                    f"expected three components in {original_color!r}"
                )
            red, green, blue = components
            triplet = ColorTriplet(int(red), int(green), int(blue))
            if not all(component <= 255 for component in triplet):
                raise ColorParseError(
                    f"color components must be <= 255 in {original_color!r}"
                )
            return cls(color, ColorType.TRUECOLOR, triplet=triplet)

    @lru_cache(maxsize=1024)
    def get_ansi_codes(self, foreground: bool = True) -> Tuple[str, ...]:
        """Get the ANSI escape codes for this color."""
        _type = self.type
        if _type == ColorType.DEFAULT:
            return ("39" if foreground else "49",)

        elif _type == ColorType.WINDOWS:
            number = self.number
            assert number is not None
            fore, back = (30, 40) if number < 8 else (82, 92)
            return (str(fore + number if foreground else back + number),)

        elif _type == ColorType.STANDARD:
            number = self.number
            assert number is not None
            fore, back = (30, 40) if number < 8 else (82, 92)
            return (str(fore + number if foreground else back + number),)

        elif _type == ColorType.EIGHT_BIT:
            assert self.number is not None
            return ("38" if foreground else "48", "5", str(self.number))

        else:  # self.standard == ColorStandard.TRUECOLOR:
            assert self.triplet is not None
            red, green, blue = self.triplet
            return ("38" if foreground else "48", "2", str(red), str(green), str(blue))

    @lru_cache(maxsize=1024)
    def downgrade(self, system: ColorSystem) -> "Color":
        """Downgrade a color system to a system with fewer colors."""

        if self.type in (ColorType.DEFAULT, system):
            return self
        # Convert to 8-bit color from truecolor color
        if system == ColorSystem.EIGHT_BIT and self.system == ColorSystem.TRUECOLOR:
            assert self.triplet is not None
            _h, l, s = rgb_to_hls(*self.triplet.normalized)
            # If saturation is under 15% assume it is grayscale
            if s < 0.15:
                gray = round(l * 25.0)
                if gray == 0:
                    color_number = 16
                elif gray == 25:
                    color_number = 231
                else:
                    color_number = 231 + gray
                return Color(self.name, ColorType.EIGHT_BIT, number=color_number)

            red, green, blue = self.triplet
            six_red = red / 95 if red < 95 else 1 + (red - 95) / 40
            six_green = green / 95 if green < 95 else 1 + (green - 95) / 40
            six_blue = blue / 95 if blue < 95 else 1 + (blue - 95) / 40

            color_number = (
                16 + 36 * round(six_red) + 6 * round(six_green) + round(six_blue)
            )
            return Color(self.name, ColorType.EIGHT_BIT, number=color_number)

        # Convert to standard from truecolor or 8-bit
        elif system == ColorSystem.STANDARD:
            if self.system == ColorSystem.TRUECOLOR:
                assert self.triplet is not None
                triplet = self.triplet
            else:  # self.system == ColorSystem.EIGHT_BIT
                assert self.number is not None
                triplet = ColorTriplet(*EIGHT_BIT_PALETTE[self.number])

            color_number = STANDARD_PALETTE.match(triplet)
            return Color(self.name, ColorType.STANDARD, number=color_number)

        elif system == ColorSystem.WINDOWS:
            if self.system == ColorSystem.TRUECOLOR:
                assert self.triplet is not None
                triplet = self.triplet
            else:  # self.system == ColorSystem.EIGHT_BIT
                assert self.number is not None
                if self.number < 16:
                    return Color(self.name, ColorType.WINDOWS, number=self.number)
                triplet = ColorTriplet(*EIGHT_BIT_PALETTE[self.number])

            color_number = WINDOWS_PALETTE.match(triplet)
            return Color(self.name, ColorType.WINDOWS, number=color_number)

        return self


def parse_rgb_hex(hex_color: str) -> ColorTriplet:
    """Parse six hex characters in to RGB triplet."""
    assert len(hex_color) == 6, "must be 6 characters"
    color = ColorTriplet(
        int(hex_color[0:2], 16), int(hex_color[2:4], 16), int(hex_color[4:6], 16)
    )
    return color


def blend_rgb(
    color1: ColorTriplet, color2: ColorTriplet, cross_fade: float = 0.5
) -> ColorTriplet:
    """Blend one RGB color in to another."""
    r1, g1, b1 = color1
    r2, g2, b2 = color2
    new_color = ColorTriplet(
        int(r1 + (r2 - r1) * cross_fade),
        int(g1 + (g2 - g1) * cross_fade),
        int(b1 + (b2 - b1) * cross_fade),
    )
    return new_color


if __name__ == "__main__":  # pragma: no cover

    from .console import Console
    from .table import Table
    from .text import Text

    console = Console()

    table = Table(show_footer=False, show_edge=True)
    table.add_column("Color", width=10, overflow="ellipsis")
    table.add_column("Number", justify="right", style="yellow")
    table.add_column("Name", style="green")
    table.add_column("Hex", style="blue")
    table.add_column("RGB", style="magenta")

    colors = sorted((v, k) for k, v in ANSI_COLOR_NAMES.items())
    for color_number, name in colors:
        if "grey" in name:
            continue
        color_cell = Text(" " * 10, style=f"on {name}")
        if color_number < 16:
            table.add_row(color_cell, f"{color_number}", Text(f'"{name}"'))
        else:
            color = EIGHT_BIT_PALETTE[color_number]  # type: ignore[has-type]
            table.add_row(
                color_cell, str(color_number), Text(f'"{name}"'), color.hex, color.rgb
            )

    console.print(table)
python3.12/site-packages/pip/_vendor/rich/box.py000064400000023162151732702070015434 0ustar00import sys
from typing import TYPE_CHECKING, Iterable, List

if sys.version_info >= (3, 8):
    from typing import Literal
else:
    from pip._vendor.typing_extensions import Literal  # pragma: no cover


from ._loop import loop_last

if TYPE_CHECKING:
    from pip._vendor.rich.console import ConsoleOptions


class Box:
    """Defines characters to render boxes.

    ┌─┬┐ top
    │ ││ head
    ├─┼┤ head_row
    │ ││ mid
    ├─┼┤ row
    ├─┼┤ foot_row
    │ ││ foot
    └─┴┘ bottom

    Args:
        box (str): Characters making up box.
        ascii (bool, optional): True if this box uses ascii characters only. Default is False.
    """

    def __init__(self, box: str, *, ascii: bool = False) -> None:
        self._box = box
        self.ascii = ascii
        line1, line2, line3, line4, line5, line6, line7, line8 = box.splitlines()
        # top
        self.top_left, self.top, self.top_divider, self.top_right = iter(line1)
        # head
        self.head_left, _, self.head_vertical, self.head_right = iter(line2)
        # head_row
        (
            self.head_row_left,
            self.head_row_horizontal,
            self.head_row_cross,
            self.head_row_right,
        ) = iter(line3)

        # mid
        self.mid_left, _, self.mid_vertical, self.mid_right = iter(line4)
        # row
        self.row_left, self.row_horizontal, self.row_cross, self.row_right = iter(line5)
        # foot_row
        (
            self.foot_row_left,
            self.foot_row_horizontal,
            self.foot_row_cross,
            self.foot_row_right,
        ) = iter(line6)
        # foot
        self.foot_left, _, self.foot_vertical, self.foot_right = iter(line7)
        # bottom
        self.bottom_left, self.bottom, self.bottom_divider, self.bottom_right = iter(
            line8
        )

    def __repr__(self) -> str:
        return "Box(...)"

    def __str__(self) -> str:
        return self._box

    def substitute(self, options: "ConsoleOptions", safe: bool = True) -> "Box":
        """Substitute this box for another if it won't render due to platform issues.

        Args:
            options (ConsoleOptions): Console options used in rendering.
            safe (bool, optional): Substitute this for another Box if there are known problems
                displaying on the platform (currently only relevant on Windows). Default is True.

        Returns:
            Box: A different Box or the same Box.
        """
        box = self
        if options.legacy_windows and safe:
            box = LEGACY_WINDOWS_SUBSTITUTIONS.get(box, box)
        if options.ascii_only and not box.ascii:
            box = ASCII
        return box

    def get_plain_headed_box(self) -> "Box":
        """If this box uses special characters for the borders of the header, then
        return the equivalent box that does not.

        Returns:
            Box: The most similar Box that doesn't use header-specific box characters.
                If the current Box already satisfies this criterion, then it's returned.
        """
        return PLAIN_HEADED_SUBSTITUTIONS.get(self, self)

    def get_top(self, widths: Iterable[int]) -> str:
        """Get the top of a simple box.

        Args:
            widths (List[int]): Widths of columns.

        Returns:
            str: A string of box characters.
        """

        parts: List[str] = []
        append = parts.append
        append(self.top_left)
        for last, width in loop_last(widths):
            append(self.top * width)
            if not last:
                append(self.top_divider)
        append(self.top_right)
        return "".join(parts)

    def get_row(
        self,
        widths: Iterable[int],
        level: Literal["head", "row", "foot", "mid"] = "row",
        edge: bool = True,
    ) -> str:
        """Get the top of a simple box.

        Args:
            width (List[int]): Widths of columns.

        Returns:
            str: A string of box characters.
        """
        if level == "head":
            left = self.head_row_left
            horizontal = self.head_row_horizontal
            cross = self.head_row_cross
            right = self.head_row_right
        elif level == "row":
            left = self.row_left
            horizontal = self.row_horizontal
            cross = self.row_cross
            right = self.row_right
        elif level == "mid":
            left = self.mid_left
            horizontal = " "
            cross = self.mid_vertical
            right = self.mid_right
        elif level == "foot":
            left = self.foot_row_left
            horizontal = self.foot_row_horizontal
            cross = self.foot_row_cross
            right = self.foot_row_right
        else:
            raise ValueError("level must be 'head', 'row' or 'foot'")

        parts: List[str] = []
        append = parts.append
        if edge:
            append(left)
        for last, width in loop_last(widths):
            append(horizontal * width)
            if not last:
                append(cross)
        if edge:
            append(right)
        return "".join(parts)

    def get_bottom(self, widths: Iterable[int]) -> str:
        """Get the bottom of a simple box.

        Args:
            widths (List[int]): Widths of columns.

        Returns:
            str: A string of box characters.
        """

        parts: List[str] = []
        append = parts.append
        append(self.bottom_left)
        for last, width in loop_last(widths):
            append(self.bottom * width)
            if not last:
                append(self.bottom_divider)
        append(self.bottom_right)
        return "".join(parts)


ASCII: Box = Box(
    """\
+--+
| ||
|-+|
| ||
|-+|
|-+|
| ||
+--+
""",
    ascii=True,
)

ASCII2: Box = Box(
    """\
+-++
| ||
+-++
| ||
+-++
+-++
| ||
+-++
""",
    ascii=True,
)

ASCII_DOUBLE_HEAD: Box = Box(
    """\
+-++
| ||
+=++
| ||
+-++
+-++
| ||
+-++
""",
    ascii=True,
)

SQUARE: Box = Box(
    """\
┌─┬┐
│ ││
├─┼┤
│ ││
├─┼┤
├─┼┤
│ ││
└─┴┘
"""
)

SQUARE_DOUBLE_HEAD: Box = Box(
    """\
┌─┬┐
│ ││
╞═╪╡
│ ││
├─┼┤
├─┼┤
│ ││
└─┴┘
"""
)

MINIMAL: Box = Box(
    """\
  ╷ 
  │ 
╶─┼╴
  │ 
╶─┼╴
╶─┼╴
  │ 
  ╵ 
"""
)


MINIMAL_HEAVY_HEAD: Box = Box(
    """\
  ╷ 
  │ 
╺━┿╸
  │ 
╶─┼╴
╶─┼╴
  │ 
  ╵ 
"""
)

MINIMAL_DOUBLE_HEAD: Box = Box(
    """\
  ╷ 
  │ 
 ═╪ 
  │ 
 ─┼ 
 ─┼ 
  │ 
  ╵ 
"""
)


SIMPLE: Box = Box(
    """\
    
    
 ── 
    
    
 ── 
    
    
"""
)

SIMPLE_HEAD: Box = Box(
    """\
    
    
 ── 
    
    
    
    
    
"""
)


SIMPLE_HEAVY: Box = Box(
    """\
    
    
 ━━ 
    
    
 ━━ 
    
    
"""
)


HORIZONTALS: Box = Box(
    """\
 ── 
    
 ── 
    
 ── 
 ── 
    
 ── 
"""
)

ROUNDED: Box = Box(
    """\
╭─┬╮
│ ││
├─┼┤
│ ││
├─┼┤
├─┼┤
│ ││
╰─┴╯
"""
)

HEAVY: Box = Box(
    """\
┏━┳┓
┃ ┃┃
┣━╋┫
┃ ┃┃
┣━╋┫
┣━╋┫
┃ ┃┃
┗━┻┛
"""
)

HEAVY_EDGE: Box = Box(
    """\
┏━┯┓
┃ │┃
┠─┼┨
┃ │┃
┠─┼┨
┠─┼┨
┃ │┃
┗━┷┛
"""
)

HEAVY_HEAD: Box = Box(
    """\
┏━┳┓
┃ ┃┃
┡━╇┩
│ ││
├─┼┤
├─┼┤
│ ││
└─┴┘
"""
)

DOUBLE: Box = Box(
    """\
╔═╦╗
║ ║║
╠═╬╣
║ ║║
╠═╬╣
╠═╬╣
║ ║║
╚═╩╝
"""
)

DOUBLE_EDGE: Box = Box(
    """\
╔═╤╗
║ │║
╟─┼╢
║ │║
╟─┼╢
╟─┼╢
║ │║
╚═╧╝
"""
)

MARKDOWN: Box = Box(
    """\
    
| ||
|-||
| ||
|-||
|-||
| ||
    
""",
    ascii=True,
)

# Map Boxes that don't render with raster fonts on to equivalent that do
LEGACY_WINDOWS_SUBSTITUTIONS = {
    ROUNDED: SQUARE,
    MINIMAL_HEAVY_HEAD: MINIMAL,
    SIMPLE_HEAVY: SIMPLE,
    HEAVY: SQUARE,
    HEAVY_EDGE: SQUARE,
    HEAVY_HEAD: SQUARE,
}

# Map headed boxes to their headerless equivalents
PLAIN_HEADED_SUBSTITUTIONS = {
    HEAVY_HEAD: SQUARE,
    SQUARE_DOUBLE_HEAD: SQUARE,
    MINIMAL_DOUBLE_HEAD: MINIMAL,
    MINIMAL_HEAVY_HEAD: MINIMAL,
    ASCII_DOUBLE_HEAD: ASCII2,
}


if __name__ == "__main__":  # pragma: no cover

    from pip._vendor.rich.columns import Columns
    from pip._vendor.rich.panel import Panel

    from . import box as box
    from .console import Console
    from .table import Table
    from .text import Text

    console = Console(record=True)

    BOXES = [
        "ASCII",
        "ASCII2",
        "ASCII_DOUBLE_HEAD",
        "SQUARE",
        "SQUARE_DOUBLE_HEAD",
        "MINIMAL",
        "MINIMAL_HEAVY_HEAD",
        "MINIMAL_DOUBLE_HEAD",
        "SIMPLE",
        "SIMPLE_HEAD",
        "SIMPLE_HEAVY",
        "HORIZONTALS",
        "ROUNDED",
        "HEAVY",
        "HEAVY_EDGE",
        "HEAVY_HEAD",
        "DOUBLE",
        "DOUBLE_EDGE",
        "MARKDOWN",
    ]

    console.print(Panel("[bold green]Box Constants", style="green"), justify="center")
    console.print()

    columns = Columns(expand=True, padding=2)
    for box_name in sorted(BOXES):
        table = Table(
            show_footer=True, style="dim", border_style="not dim", expand=True
        )
        table.add_column("Header 1", "Footer 1")
        table.add_column("Header 2", "Footer 2")
        table.add_row("Cell", "Cell")
        table.add_row("Cell", "Cell")
        table.box = getattr(box, box_name)
        table.title = Text(f"box.{box_name}", style="magenta")
        columns.add_renderable(table)
    console.print(columns)

    # console.save_svg("box.svg")
python3.12/site-packages/pip/_vendor/rich/json.py000064400000011650151732702070015614 0ustar00from pathlib import Path
from json import loads, dumps
from typing import Any, Callable, Optional, Union

from .text import Text
from .highlighter import JSONHighlighter, NullHighlighter


class JSON:
    """A renderable which pretty prints JSON.

    Args:
        json (str): JSON encoded data.
        indent (Union[None, int, str], optional): Number of characters to indent by. Defaults to 2.
        highlight (bool, optional): Enable highlighting. Defaults to True.
        skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
        ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
        check_circular (bool, optional): Check for circular references. Defaults to True.
        allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
        default (Callable, optional): A callable that converts values that can not be encoded
            in to something that can be JSON encoded. Defaults to None.
        sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
    """

    def __init__(
        self,
        json: str,
        indent: Union[None, int, str] = 2,
        highlight: bool = True,
        skip_keys: bool = False,
        ensure_ascii: bool = False,
        check_circular: bool = True,
        allow_nan: bool = True,
        default: Optional[Callable[[Any], Any]] = None,
        sort_keys: bool = False,
    ) -> None:
        data = loads(json)
        json = dumps(
            data,
            indent=indent,
            skipkeys=skip_keys,
            ensure_ascii=ensure_ascii,
            check_circular=check_circular,
            allow_nan=allow_nan,
            default=default,
            sort_keys=sort_keys,
        )
        highlighter = JSONHighlighter() if highlight else NullHighlighter()
        self.text = highlighter(json)
        self.text.no_wrap = True
        self.text.overflow = None

    @classmethod
    def from_data(
        cls,
        data: Any,
        indent: Union[None, int, str] = 2,
        highlight: bool = True,
        skip_keys: bool = False,
        ensure_ascii: bool = False,
        check_circular: bool = True,
        allow_nan: bool = True,
        default: Optional[Callable[[Any], Any]] = None,
        sort_keys: bool = False,
    ) -> "JSON":
        """Encodes a JSON object from arbitrary data.

        Args:
            data (Any): An object that may be encoded in to JSON
            indent (Union[None, int, str], optional): Number of characters to indent by. Defaults to 2.
            highlight (bool, optional): Enable highlighting. Defaults to True.
            default (Callable, optional): Optional callable which will be called for objects that cannot be serialized. Defaults to None.
            skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
            ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
            check_circular (bool, optional): Check for circular references. Defaults to True.
            allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
            default (Callable, optional): A callable that converts values that can not be encoded
                in to something that can be JSON encoded. Defaults to None.
            sort_keys (bool, optional): Sort dictionary keys. Defaults to False.

        Returns:
            JSON: New JSON object from the given data.
        """
        json_instance: "JSON" = cls.__new__(cls)
        json = dumps(
            data,
            indent=indent,
            skipkeys=skip_keys,
            ensure_ascii=ensure_ascii,
            check_circular=check_circular,
            allow_nan=allow_nan,
            default=default,
            sort_keys=sort_keys,
        )
        highlighter = JSONHighlighter() if highlight else NullHighlighter()
        json_instance.text = highlighter(json)
        json_instance.text.no_wrap = True
        json_instance.text.overflow = None
        return json_instance

    def __rich__(self) -> Text:
        return self.text


if __name__ == "__main__":

    import argparse
    import sys

    parser = argparse.ArgumentParser(description="Pretty print json")
    parser.add_argument(
        "path",
        metavar="PATH",
        help="path to file, or - for stdin",
    )
    parser.add_argument(
        "-i",
        "--indent",
        metavar="SPACES",
        type=int,
        help="Number of spaces in an indent",
        default=2,
    )
    args = parser.parse_args()

    from pip._vendor.rich.console import Console

    console = Console()
    error_console = Console(stderr=True)

    try:
        if args.path == "-":
            json_data = sys.stdin.read()
        else:
            json_data = Path(args.path).read_text()
    except Exception as error:
        error_console.print(f"Unable to read {args.path!r}; {error}")
        sys.exit(-1)

    console.print(JSON(json_data, indent=args.indent), soft_wrap=True)
python3.12/site-packages/pip/_vendor/rich/tree.py000064400000021721151732702070015602 0ustar00from typing import Iterator, List, Optional, Tuple

from ._loop import loop_first, loop_last
from .console import Console, ConsoleOptions, RenderableType, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment
from .style import Style, StyleStack, StyleType
from .styled import Styled


class Tree(JupyterMixin):
    """A renderable for a tree structure.

    Args:
        label (RenderableType): The renderable or str for the tree label.
        style (StyleType, optional): Style of this tree. Defaults to "tree".
        guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
        expanded (bool, optional): Also display children. Defaults to True.
        highlight (bool, optional): Highlight renderable (if str). Defaults to False.
    """

    def __init__(
        self,
        label: RenderableType,
        *,
        style: StyleType = "tree",
        guide_style: StyleType = "tree.line",
        expanded: bool = True,
        highlight: bool = False,
        hide_root: bool = False,
    ) -> None:
        self.label = label
        self.style = style
        self.guide_style = guide_style
        self.children: List[Tree] = []
        self.expanded = expanded
        self.highlight = highlight
        self.hide_root = hide_root

    def add(
        self,
        label: RenderableType,
        *,
        style: Optional[StyleType] = None,
        guide_style: Optional[StyleType] = None,
        expanded: bool = True,
        highlight: Optional[bool] = False,
    ) -> "Tree":
        """Add a child tree.

        Args:
            label (RenderableType): The renderable or str for the tree label.
            style (StyleType, optional): Style of this tree. Defaults to "tree".
            guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
            expanded (bool, optional): Also display children. Defaults to True.
            highlight (Optional[bool], optional): Highlight renderable (if str). Defaults to False.

        Returns:
            Tree: A new child Tree, which may be further modified.
        """
        node = Tree(
            label,
            style=self.style if style is None else style,
            guide_style=self.guide_style if guide_style is None else guide_style,
            expanded=expanded,
            highlight=self.highlight if highlight is None else highlight,
        )
        self.children.append(node)
        return node

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":

        stack: List[Iterator[Tuple[bool, Tree]]] = []
        pop = stack.pop
        push = stack.append
        new_line = Segment.line()

        get_style = console.get_style
        null_style = Style.null()
        guide_style = get_style(self.guide_style, default="") or null_style
        SPACE, CONTINUE, FORK, END = range(4)

        ASCII_GUIDES = ("    ", "|   ", "+-- ", "`-- ")
        TREE_GUIDES = [
            ("    ", "│   ", "├── ", "└── "),
            ("    ", "┃   ", "┣━━ ", "┗━━ "),
            ("    ", "║   ", "╠══ ", "╚══ "),
        ]
        _Segment = Segment

        def make_guide(index: int, style: Style) -> Segment:
            """Make a Segment for a level of the guide lines."""
            if options.ascii_only:
                line = ASCII_GUIDES[index]
            else:
                guide = 1 if style.bold else (2 if style.underline2 else 0)
                line = TREE_GUIDES[0 if options.legacy_windows else guide][index]
            return _Segment(line, style)

        levels: List[Segment] = [make_guide(CONTINUE, guide_style)]
        push(iter(loop_last([self])))

        guide_style_stack = StyleStack(get_style(self.guide_style))
        style_stack = StyleStack(get_style(self.style))
        remove_guide_styles = Style(bold=False, underline2=False)

        depth = 0

        while stack:
            stack_node = pop()
            try:
                last, node = next(stack_node)
            except StopIteration:
                levels.pop()
                if levels:
                    guide_style = levels[-1].style or null_style
                    levels[-1] = make_guide(FORK, guide_style)
                    guide_style_stack.pop()
                    style_stack.pop()
                continue
            push(stack_node)
            if last:
                levels[-1] = make_guide(END, levels[-1].style or null_style)

            guide_style = guide_style_stack.current + get_style(node.guide_style)
            style = style_stack.current + get_style(node.style)
            prefix = levels[(2 if self.hide_root else 1) :]
            renderable_lines = console.render_lines(
                Styled(node.label, style),
                options.update(
                    width=options.max_width
                    - sum(level.cell_length for level in prefix),
                    highlight=self.highlight,
                    height=None,
                ),
                pad=options.justify is not None,
            )

            if not (depth == 0 and self.hide_root):
                for first, line in loop_first(renderable_lines):
                    if prefix:
                        yield from _Segment.apply_style(
                            prefix,
                            style.background_style,
                            post_style=remove_guide_styles,
                        )
                    yield from line
                    yield new_line
                    if first and prefix:
                        prefix[-1] = make_guide(
                            SPACE if last else CONTINUE, prefix[-1].style or null_style
                        )

            if node.expanded and node.children:
                levels[-1] = make_guide(
                    SPACE if last else CONTINUE, levels[-1].style or null_style
                )
                levels.append(
                    make_guide(END if len(node.children) == 1 else FORK, guide_style)
                )
                style_stack.push(get_style(node.style))
                guide_style_stack.push(get_style(node.guide_style))
                push(iter(loop_last(node.children)))
                depth += 1

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "Measurement":
        stack: List[Iterator[Tree]] = [iter([self])]
        pop = stack.pop
        push = stack.append
        minimum = 0
        maximum = 0
        measure = Measurement.get
        level = 0
        while stack:
            iter_tree = pop()
            try:
                tree = next(iter_tree)
            except StopIteration:
                level -= 1
                continue
            push(iter_tree)
            min_measure, max_measure = measure(console, options, tree.label)
            indent = level * 4
            minimum = max(min_measure + indent, minimum)
            maximum = max(max_measure + indent, maximum)
            if tree.expanded and tree.children:
                push(iter(tree.children))
                level += 1
        return Measurement(minimum, maximum)


if __name__ == "__main__":  # pragma: no cover

    from pip._vendor.rich.console import Group
    from pip._vendor.rich.markdown import Markdown
    from pip._vendor.rich.panel import Panel
    from pip._vendor.rich.syntax import Syntax
    from pip._vendor.rich.table import Table

    table = Table(row_styles=["", "dim"])

    table.add_column("Released", style="cyan", no_wrap=True)
    table.add_column("Title", style="magenta")
    table.add_column("Box Office", justify="right", style="green")

    table.add_row("Dec 20, 2019", "Star Wars: The Rise of Skywalker", "$952,110,690")
    table.add_row("May 25, 2018", "Solo: A Star Wars Story", "$393,151,347")
    table.add_row("Dec 15, 2017", "Star Wars Ep. V111: The Last Jedi", "$1,332,539,889")
    table.add_row("Dec 16, 2016", "Rogue One: A Star Wars Story", "$1,332,439,889")

    code = """\
class Segment(NamedTuple):
    text: str = ""
    style: Optional[Style] = None
    is_control: bool = False
"""
    syntax = Syntax(code, "python", theme="monokai", line_numbers=True)

    markdown = Markdown(
        """\
### example.md
> Hello, World!
>
> Markdown _all_ the things
"""
    )

    root = Tree("🌲 [b green]Rich Tree", highlight=True, hide_root=True)

    node = root.add(":file_folder: Renderables", guide_style="red")
    simple_node = node.add(":file_folder: [bold yellow]Atomic", guide_style="uu green")
    simple_node.add(Group("📄 Syntax", syntax))
    simple_node.add(Group("📄 Markdown", Panel(markdown, border_style="green")))

    containers_node = node.add(
        ":file_folder: [bold magenta]Containers", guide_style="bold magenta"
    )
    containers_node.expanded = True
    panel = Panel.fit("Just a panel", border_style="red")
    containers_node.add(Group("📄 Panels", panel))

    containers_node.add(Group("📄 [b magenta]Table", table))

    console = Console()

    console.print(root)
python3.12/site-packages/pip/_vendor/rich/status.py000064400000010511151732702070016161 0ustar00from types import TracebackType
from typing import Optional, Type

from .console import Console, RenderableType
from .jupyter import JupyterMixin
from .live import Live
from .spinner import Spinner
from .style import StyleType


class Status(JupyterMixin):
    """Displays a status indicator with a 'spinner' animation.

    Args:
        status (RenderableType): A status renderable (str or Text typically).
        console (Console, optional): Console instance to use, or None for global console. Defaults to None.
        spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
        spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
        speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
        refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.
    """

    def __init__(
        self,
        status: RenderableType,
        *,
        console: Optional[Console] = None,
        spinner: str = "dots",
        spinner_style: StyleType = "status.spinner",
        speed: float = 1.0,
        refresh_per_second: float = 12.5,
    ):
        self.status = status
        self.spinner_style = spinner_style
        self.speed = speed
        self._spinner = Spinner(spinner, text=status, style=spinner_style, speed=speed)
        self._live = Live(
            self.renderable,
            console=console,
            refresh_per_second=refresh_per_second,
            transient=True,
        )

    @property
    def renderable(self) -> Spinner:
        return self._spinner

    @property
    def console(self) -> "Console":
        """Get the Console used by the Status objects."""
        return self._live.console

    def update(
        self,
        status: Optional[RenderableType] = None,
        *,
        spinner: Optional[str] = None,
        spinner_style: Optional[StyleType] = None,
        speed: Optional[float] = None,
    ) -> None:
        """Update status.

        Args:
            status (Optional[RenderableType], optional): New status renderable or None for no change. Defaults to None.
            spinner (Optional[str], optional): New spinner or None for no change. Defaults to None.
            spinner_style (Optional[StyleType], optional): New spinner style or None for no change. Defaults to None.
            speed (Optional[float], optional): Speed factor for spinner animation or None for no change. Defaults to None.
        """
        if status is not None:
            self.status = status
        if spinner_style is not None:
            self.spinner_style = spinner_style
        if speed is not None:
            self.speed = speed
        if spinner is not None:
            self._spinner = Spinner(
                spinner, text=self.status, style=self.spinner_style, speed=self.speed
            )
            self._live.update(self.renderable, refresh=True)
        else:
            self._spinner.update(
                text=self.status, style=self.spinner_style, speed=self.speed
            )

    def start(self) -> None:
        """Start the status animation."""
        self._live.start()

    def stop(self) -> None:
        """Stop the spinner animation."""
        self._live.stop()

    def __rich__(self) -> RenderableType:
        return self.renderable

    def __enter__(self) -> "Status":
        self.start()
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self.stop()


if __name__ == "__main__":  # pragma: no cover

    from time import sleep

    from .console import Console

    console = Console()
    with console.status("[magenta]Covid detector booting up") as status:
        sleep(3)
        console.log("Importing advanced AI")
        sleep(3)
        console.log("Advanced Covid AI Ready")
        sleep(3)
        status.update(status="[bold blue] Scanning for Covid", spinner="earth")
        sleep(3)
        console.log("Found 10,000,000,000 copies of Covid32.exe")
        sleep(3)
        status.update(
            status="[bold red]Moving Covid32.exe to Trash",
            spinner="bouncingBall",
            spinner_style="yellow",
        )
        sleep(5)
    console.print("[bold green]Covid deleted successfully")
python3.12/site-packages/pip/_vendor/rich/_wrap.py000064400000003460151732702070015753 0ustar00import re
from typing import Iterable, List, Tuple

from ._loop import loop_last
from .cells import cell_len, chop_cells

re_word = re.compile(r"\s*\S+\s*")


def words(text: str) -> Iterable[Tuple[int, int, str]]:
    position = 0
    word_match = re_word.match(text, position)
    while word_match is not None:
        start, end = word_match.span()
        word = word_match.group(0)
        yield start, end, word
        word_match = re_word.match(text, end)


def divide_line(text: str, width: int, fold: bool = True) -> List[int]:
    divides: List[int] = []
    append = divides.append
    line_position = 0
    _cell_len = cell_len
    for start, _end, word in words(text):
        word_length = _cell_len(word.rstrip())
        if line_position + word_length > width:
            if word_length > width:
                if fold:
                    chopped_words = chop_cells(word, max_size=width, position=0)
                    for last, line in loop_last(chopped_words):
                        if start:
                            append(start)

                        if last:
                            line_position = _cell_len(line)
                        else:
                            start += len(line)
                else:
                    if start:
                        append(start)
                    line_position = _cell_len(word)
            elif line_position and start:
                append(start)
                line_position = _cell_len(word)
        else:
            line_position += _cell_len(word)
    return divides


if __name__ == "__main__":  # pragma: no cover
    from .console import Console

    console = Console(width=10)
    console.print("12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345")
    print(chop_cells("abcdefghijklmnopqrstuvwxyz", 10, position=2))
python3.12/site-packages/pip/_vendor/rich/_loop.py000064400000002324151732702070015751 0ustar00from typing import Iterable, Tuple, TypeVar

T = TypeVar("T")


def loop_first(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for first value."""
    iter_values = iter(values)
    try:
        value = next(iter_values)
    except StopIteration:
        return
    yield True, value
    for value in iter_values:
        yield False, value


def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_value


def loop_first_last(values: Iterable[T]) -> Iterable[Tuple[bool, bool, T]]:
    """Iterate and generate a tuple with a flag for first and last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    first = True
    for value in iter_values:
        yield first, False, previous_value
        first = False
        previous_value = value
    yield first, True, previous_value
python3.12/site-packages/pip/_vendor/rich/_spinners.py000064400000046717151732702070016657 0ustar00"""
Spinners are from:
* cli-spinners:
    MIT License
    Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights to
    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
    the Software, and to permit persons to whom the Software is furnished to do so,
    subject to the following conditions:
    The above copyright notice and this permission notice shall be included
    in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
    INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
    PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
    FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    IN THE SOFTWARE.
"""

SPINNERS = {
    "dots": {
        "interval": 80,
        "frames": "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏",
    },
    "dots2": {"interval": 80, "frames": "⣾⣽⣻⢿⡿⣟⣯⣷"},
    "dots3": {
        "interval": 80,
        "frames": "⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓",
    },
    "dots4": {
        "interval": 80,
        "frames": "⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆",
    },
    "dots5": {
        "interval": 80,
        "frames": "⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋",
    },
    "dots6": {
        "interval": 80,
        "frames": "⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁",
    },
    "dots7": {
        "interval": 80,
        "frames": "⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈",
    },
    "dots8": {
        "interval": 80,
        "frames": "⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈",
    },
    "dots9": {"interval": 80, "frames": "⢹⢺⢼⣸⣇⡧⡗⡏"},
    "dots10": {"interval": 80, "frames": "⢄⢂⢁⡁⡈⡐⡠"},
    "dots11": {"interval": 100, "frames": "⠁⠂⠄⡀⢀⠠⠐⠈"},
    "dots12": {
        "interval": 80,
        "frames": [
            "⢀⠀",
            "⡀⠀",
            "⠄⠀",
            "⢂⠀",
            "⡂⠀",
            "⠅⠀",
            "⢃⠀",
            "⡃⠀",
            "⠍⠀",
            "⢋⠀",
            "⡋⠀",
            "⠍⠁",
            "⢋⠁",
            "⡋⠁",
            "⠍⠉",
            "⠋⠉",
            "⠋⠉",
            "⠉⠙",
            "⠉⠙",
            "⠉⠩",
            "⠈⢙",
            "⠈⡙",
            "⢈⠩",
            "⡀⢙",
            "⠄⡙",
            "⢂⠩",
            "⡂⢘",
            "⠅⡘",
            "⢃⠨",
            "⡃⢐",
            "⠍⡐",
            "⢋⠠",
            "⡋⢀",
            "⠍⡁",
            "⢋⠁",
            "⡋⠁",
            "⠍⠉",
            "⠋⠉",
            "⠋⠉",
            "⠉⠙",
            "⠉⠙",
            "⠉⠩",
            "⠈⢙",
            "⠈⡙",
            "⠈⠩",
            "⠀⢙",
            "⠀⡙",
            "⠀⠩",
            "⠀⢘",
            "⠀⡘",
            "⠀⠨",
            "⠀⢐",
            "⠀⡐",
            "⠀⠠",
            "⠀⢀",
            "⠀⡀",
        ],
    },
    "dots8Bit": {
        "interval": 80,
        "frames": "⠀⠁⠂⠃⠄⠅⠆⠇⡀⡁⡂⡃⡄⡅⡆⡇⠈⠉⠊⠋⠌⠍⠎⠏⡈⡉⡊⡋⡌⡍⡎⡏⠐⠑⠒⠓⠔⠕⠖⠗⡐⡑⡒⡓⡔⡕⡖⡗⠘⠙⠚⠛⠜⠝⠞⠟⡘⡙"
        "⡚⡛⡜⡝⡞⡟⠠⠡⠢⠣⠤⠥⠦⠧⡠⡡⡢⡣⡤⡥⡦⡧⠨⠩⠪⠫⠬⠭⠮⠯⡨⡩⡪⡫⡬⡭⡮⡯⠰⠱⠲⠳⠴⠵⠶⠷⡰⡱⡲⡳⡴⡵⡶⡷⠸⠹⠺⠻"
        "⠼⠽⠾⠿⡸⡹⡺⡻⡼⡽⡾⡿⢀⢁⢂⢃⢄⢅⢆⢇⣀⣁⣂⣃⣄⣅⣆⣇⢈⢉⢊⢋⢌⢍⢎⢏⣈⣉⣊⣋⣌⣍⣎⣏⢐⢑⢒⢓⢔⢕⢖⢗⣐⣑⣒⣓⣔⣕"
        "⣖⣗⢘⢙⢚⢛⢜⢝⢞⢟⣘⣙⣚⣛⣜⣝⣞⣟⢠⢡⢢⢣⢤⢥⢦⢧⣠⣡⣢⣣⣤⣥⣦⣧⢨⢩⢪⢫⢬⢭⢮⢯⣨⣩⣪⣫⣬⣭⣮⣯⢰⢱⢲⢳⢴⢵⢶⢷"
        "⣰⣱⣲⣳⣴⣵⣶⣷⢸⢹⢺⢻⢼⢽⢾⢿⣸⣹⣺⣻⣼⣽⣾⣿",
    },
    "line": {"interval": 130, "frames": ["-", "\\", "|", "/"]},
    "line2": {"interval": 100, "frames": "⠂-–—–-"},
    "pipe": {"interval": 100, "frames": "┤┘┴└├┌┬┐"},
    "simpleDots": {"interval": 400, "frames": [".  ", ".. ", "...", "   "]},
    "simpleDotsScrolling": {
        "interval": 200,
        "frames": [".  ", ".. ", "...", " ..", "  .", "   "],
    },
    "star": {"interval": 70, "frames": "✶✸✹✺✹✷"},
    "star2": {"interval": 80, "frames": "+x*"},
    "flip": {
        "interval": 70,
        "frames": "___-``'´-___",
    },
    "hamburger": {"interval": 100, "frames": "☱☲☴"},
    "growVertical": {
        "interval": 120,
        "frames": "▁▃▄▅▆▇▆▅▄▃",
    },
    "growHorizontal": {
        "interval": 120,
        "frames": "▏▎▍▌▋▊▉▊▋▌▍▎",
    },
    "balloon": {"interval": 140, "frames": " .oO@* "},
    "balloon2": {"interval": 120, "frames": ".oO°Oo."},
    "noise": {"interval": 100, "frames": "▓▒░"},
    "bounce": {"interval": 120, "frames": "⠁⠂⠄⠂"},
    "boxBounce": {"interval": 120, "frames": "▖▘▝▗"},
    "boxBounce2": {"interval": 100, "frames": "▌▀▐▄"},
    "triangle": {"interval": 50, "frames": "◢◣◤◥"},
    "arc": {"interval": 100, "frames": "◜◠◝◞◡◟"},
    "circle": {"interval": 120, "frames": "◡⊙◠"},
    "squareCorners": {"interval": 180, "frames": "◰◳◲◱"},
    "circleQuarters": {"interval": 120, "frames": "◴◷◶◵"},
    "circleHalves": {"interval": 50, "frames": "◐◓◑◒"},
    "squish": {"interval": 100, "frames": "╫╪"},
    "toggle": {"interval": 250, "frames": "⊶⊷"},
    "toggle2": {"interval": 80, "frames": "▫▪"},
    "toggle3": {"interval": 120, "frames": "□■"},
    "toggle4": {"interval": 100, "frames": "■□▪▫"},
    "toggle5": {"interval": 100, "frames": "▮▯"},
    "toggle6": {"interval": 300, "frames": "ဝ၀"},
    "toggle7": {"interval": 80, "frames": "⦾⦿"},
    "toggle8": {"interval": 100, "frames": "◍◌"},
    "toggle9": {"interval": 100, "frames": "◉◎"},
    "toggle10": {"interval": 100, "frames": "㊂㊀㊁"},
    "toggle11": {"interval": 50, "frames": "⧇⧆"},
    "toggle12": {"interval": 120, "frames": "☗☖"},
    "toggle13": {"interval": 80, "frames": "=*-"},
    "arrow": {"interval": 100, "frames": "←↖↑↗→↘↓↙"},
    "arrow2": {
        "interval": 80,
        "frames": ["⬆️ ", "↗️ ", "➡️ ", "↘️ ", "⬇️ ", "↙️ ", "⬅️ ", "↖️ "],
    },
    "arrow3": {
        "interval": 120,
        "frames": ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"],
    },
    "bouncingBar": {
        "interval": 80,
        "frames": [
            "[    ]",
            "[=   ]",
            "[==  ]",
            "[=== ]",
            "[ ===]",
            "[  ==]",
            "[   =]",
            "[    ]",
            "[   =]",
            "[  ==]",
            "[ ===]",
            "[====]",
            "[=== ]",
            "[==  ]",
            "[=   ]",
        ],
    },
    "bouncingBall": {
        "interval": 80,
        "frames": [
            "( ●    )",
            "(  ●   )",
            "(   ●  )",
            "(    ● )",
            "(     ●)",
            "(    ● )",
            "(   ●  )",
            "(  ●   )",
            "( ●    )",
            "(●     )",
        ],
    },
    "smiley": {"interval": 200, "frames": ["😄 ", "😝 "]},
    "monkey": {"interval": 300, "frames": ["🙈 ", "🙈 ", "🙉 ", "🙊 "]},
    "hearts": {"interval": 100, "frames": ["💛 ", "💙 ", "💜 ", "💚 ", "❤️ "]},
    "clock": {
        "interval": 100,
        "frames": [
            "🕛 ",
            "🕐 ",
            "🕑 ",
            "🕒 ",
            "🕓 ",
            "🕔 ",
            "🕕 ",
            "🕖 ",
            "🕗 ",
            "🕘 ",
            "🕙 ",
            "🕚 ",
        ],
    },
    "earth": {"interval": 180, "frames": ["🌍 ", "🌎 ", "🌏 "]},
    "material": {
        "interval": 17,
        "frames": [
            "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "███████▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "████████▁▁▁▁▁▁▁▁▁▁▁▁",
            "█████████▁▁▁▁▁▁▁▁▁▁▁",
            "█████████▁▁▁▁▁▁▁▁▁▁▁",
            "██████████▁▁▁▁▁▁▁▁▁▁",
            "███████████▁▁▁▁▁▁▁▁▁",
            "█████████████▁▁▁▁▁▁▁",
            "██████████████▁▁▁▁▁▁",
            "██████████████▁▁▁▁▁▁",
            "▁██████████████▁▁▁▁▁",
            "▁██████████████▁▁▁▁▁",
            "▁██████████████▁▁▁▁▁",
            "▁▁██████████████▁▁▁▁",
            "▁▁▁██████████████▁▁▁",
            "▁▁▁▁█████████████▁▁▁",
            "▁▁▁▁██████████████▁▁",
            "▁▁▁▁██████████████▁▁",
            "▁▁▁▁▁██████████████▁",
            "▁▁▁▁▁██████████████▁",
            "▁▁▁▁▁██████████████▁",
            "▁▁▁▁▁▁██████████████",
            "▁▁▁▁▁▁██████████████",
            "▁▁▁▁▁▁▁█████████████",
            "▁▁▁▁▁▁▁█████████████",
            "▁▁▁▁▁▁▁▁████████████",
            "▁▁▁▁▁▁▁▁████████████",
            "▁▁▁▁▁▁▁▁▁███████████",
            "▁▁▁▁▁▁▁▁▁███████████",
            "▁▁▁▁▁▁▁▁▁▁██████████",
            "▁▁▁▁▁▁▁▁▁▁██████████",
            "▁▁▁▁▁▁▁▁▁▁▁▁████████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
            "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
            "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
            "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
            "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
            "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
            "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
            "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
            "██████▁▁▁▁▁▁▁▁▁▁▁▁▁█",
            "████████▁▁▁▁▁▁▁▁▁▁▁▁",
            "█████████▁▁▁▁▁▁▁▁▁▁▁",
            "█████████▁▁▁▁▁▁▁▁▁▁▁",
            "█████████▁▁▁▁▁▁▁▁▁▁▁",
            "█████████▁▁▁▁▁▁▁▁▁▁▁",
            "███████████▁▁▁▁▁▁▁▁▁",
            "████████████▁▁▁▁▁▁▁▁",
            "████████████▁▁▁▁▁▁▁▁",
            "██████████████▁▁▁▁▁▁",
            "██████████████▁▁▁▁▁▁",
            "▁██████████████▁▁▁▁▁",
            "▁██████████████▁▁▁▁▁",
            "▁▁▁█████████████▁▁▁▁",
            "▁▁▁▁▁████████████▁▁▁",
            "▁▁▁▁▁████████████▁▁▁",
            "▁▁▁▁▁▁███████████▁▁▁",
            "▁▁▁▁▁▁▁▁█████████▁▁▁",
            "▁▁▁▁▁▁▁▁█████████▁▁▁",
            "▁▁▁▁▁▁▁▁▁█████████▁▁",
            "▁▁▁▁▁▁▁▁▁█████████▁▁",
            "▁▁▁▁▁▁▁▁▁▁█████████▁",
            "▁▁▁▁▁▁▁▁▁▁▁████████▁",
            "▁▁▁▁▁▁▁▁▁▁▁████████▁",
            "▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
            "▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
            "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
        ],
    },
    "moon": {
        "interval": 80,
        "frames": ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "],
    },
    "runner": {"interval": 140, "frames": ["🚶 ", "🏃 "]},
    "pong": {
        "interval": 80,
        "frames": [
            "▐⠂       ▌",
            "▐⠈       ▌",
            "▐ ⠂      ▌",
            "▐ ⠠      ▌",
            "▐  ⡀     ▌",
            "▐  ⠠     ▌",
            "▐   ⠂    ▌",
            "▐   ⠈    ▌",
            "▐    ⠂   ▌",
            "▐    ⠠   ▌",
            "▐     ⡀  ▌",
            "▐     ⠠  ▌",
            "▐      ⠂ ▌",
            "▐      ⠈ ▌",
            "▐       ⠂▌",
            "▐       ⠠▌",
            "▐       ⡀▌",
            "▐      ⠠ ▌",
            "▐      ⠂ ▌",
            "▐     ⠈  ▌",
            "▐     ⠂  ▌",
            "▐    ⠠   ▌",
            "▐    ⡀   ▌",
            "▐   ⠠    ▌",
            "▐   ⠂    ▌",
            "▐  ⠈     ▌",
            "▐  ⠂     ▌",
            "▐ ⠠      ▌",
            "▐ ⡀      ▌",
            "▐⠠       ▌",
        ],
    },
    "shark": {
        "interval": 120,
        "frames": [
            "▐|\\____________▌",
            "▐_|\\___________▌",
            "▐__|\\__________▌",
            "▐___|\\_________▌",
            "▐____|\\________▌",
            "▐_____|\\_______▌",
            "▐______|\\______▌",
            "▐_______|\\_____▌",
            "▐________|\\____▌",
            "▐_________|\\___▌",
            "▐__________|\\__▌",
            "▐___________|\\_▌",
            "▐____________|\\▌",
            "▐____________/|▌",
            "▐___________/|_▌",
            "▐__________/|__▌",
            "▐_________/|___▌",
            "▐________/|____▌",
            "▐_______/|_____▌",
            "▐______/|______▌",
            "▐_____/|_______▌",
            "▐____/|________▌",
            "▐___/|_________▌",
            "▐__/|__________▌",
            "▐_/|___________▌",
            "▐/|____________▌",
        ],
    },
    "dqpb": {"interval": 100, "frames": "dqpb"},
    "weather": {
        "interval": 100,
        "frames": [
            "☀️ ",
            "☀️ ",
            "☀️ ",
            "🌤 ",
            "⛅️ ",
            "🌥 ",
            "☁️ ",
            "🌧 ",
            "🌨 ",
            "🌧 ",
            "🌨 ",
            "🌧 ",
            "🌨 ",
            "⛈ ",
            "🌨 ",
            "🌧 ",
            "🌨 ",
            "☁️ ",
            "🌥 ",
            "⛅️ ",
            "🌤 ",
            "☀️ ",
            "☀️ ",
        ],
    },
    "christmas": {"interval": 400, "frames": "🌲🎄"},
    "grenade": {
        "interval": 80,
        "frames": [
            "،   ",
            "′   ",
            " ´ ",
            " ‾ ",
            "  ⸌",
            "  ⸊",
            "  |",
            "  ⁎",
            "  ⁕",
            " ෴ ",
            "  ⁓",
            "   ",
            "   ",
            "   ",
        ],
    },
    "point": {"interval": 125, "frames": ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"]},
    "layer": {"interval": 150, "frames": "-=≡"},
    "betaWave": {
        "interval": 80,
        "frames": [
            "ρββββββ",
            "βρβββββ",
            "ββρββββ",
            "βββρβββ",
            "ββββρββ",
            "βββββρβ",
            "ββββββρ",
        ],
    },
    "aesthetic": {
        "interval": 80,
        "frames": [
            "▰▱▱▱▱▱▱",
            "▰▰▱▱▱▱▱",
            "▰▰▰▱▱▱▱",
            "▰▰▰▰▱▱▱",
            "▰▰▰▰▰▱▱",
            "▰▰▰▰▰▰▱",
            "▰▰▰▰▰▰▰",
            "▰▱▱▱▱▱▱",
        ],
    },
}
python3.12/site-packages/pip/_vendor/rich/rule.py000064400000010772151732702070015616 0ustar00from typing import Union

from .align import AlignMethod
from .cells import cell_len, set_cell_size
from .console import Console, ConsoleOptions, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .style import Style
from .text import Text


class Rule(JupyterMixin):
    """A console renderable to draw a horizontal rule (line).

    Args:
        title (Union[str, Text], optional): Text to render in the rule. Defaults to "".
        characters (str, optional): Character(s) used to draw the line. Defaults to "─".
        style (StyleType, optional): Style of Rule. Defaults to "rule.line".
        end (str, optional): Character at end of Rule. defaults to "\\\\n"
        align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center".
    """

    def __init__(
        self,
        title: Union[str, Text] = "",
        *,
        characters: str = "─",
        style: Union[str, Style] = "rule.line",
        end: str = "\n",
        align: AlignMethod = "center",
    ) -> None:
        if cell_len(characters) < 1:
            raise ValueError(
                "'characters' argument must have a cell width of at least 1"
            )
        if align not in ("left", "center", "right"):
            raise ValueError(
                f'invalid value for align, expected "left", "center", "right" (not {align!r})'
            )
        self.title = title
        self.characters = characters
        self.style = style
        self.end = end
        self.align = align

    def __repr__(self) -> str:
        return f"Rule({self.title!r}, {self.characters!r})"

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        width = options.max_width

        characters = (
            "-"
            if (options.ascii_only and not self.characters.isascii())
            else self.characters
        )

        chars_len = cell_len(characters)
        if not self.title:
            yield self._rule_line(chars_len, width)
            return

        if isinstance(self.title, Text):
            title_text = self.title
        else:
            title_text = console.render_str(self.title, style="rule.text")

        title_text.plain = title_text.plain.replace("\n", " ")
        title_text.expand_tabs()

        required_space = 4 if self.align == "center" else 2
        truncate_width = max(0, width - required_space)
        if not truncate_width:
            yield self._rule_line(chars_len, width)
            return

        rule_text = Text(end=self.end)
        if self.align == "center":
            title_text.truncate(truncate_width, overflow="ellipsis")
            side_width = (width - cell_len(title_text.plain)) // 2
            left = Text(characters * (side_width // chars_len + 1))
            left.truncate(side_width - 1)
            right_length = width - cell_len(left.plain) - cell_len(title_text.plain)
            right = Text(characters * (side_width // chars_len + 1))
            right.truncate(right_length)
            rule_text.append(left.plain + " ", self.style)
            rule_text.append(title_text)
            rule_text.append(" " + right.plain, self.style)
        elif self.align == "left":
            title_text.truncate(truncate_width, overflow="ellipsis")
            rule_text.append(title_text)
            rule_text.append(" ")
            rule_text.append(characters * (width - rule_text.cell_len), self.style)
        elif self.align == "right":
            title_text.truncate(truncate_width, overflow="ellipsis")
            rule_text.append(characters * (width - title_text.cell_len - 1), self.style)
            rule_text.append(" ")
            rule_text.append(title_text)

        rule_text.plain = set_cell_size(rule_text.plain, width)
        yield rule_text

    def _rule_line(self, chars_len: int, width: int) -> Text:
        rule_text = Text(self.characters * ((width // chars_len) + 1), self.style)
        rule_text.truncate(width)
        rule_text.plain = set_cell_size(rule_text.plain, width)
        return rule_text

    def __rich_measure__(
        self, console: Console, options: ConsoleOptions
    ) -> Measurement:
        return Measurement(1, 1)


if __name__ == "__main__":  # pragma: no cover
    import sys

    from pip._vendor.rich.console import Console

    try:
        text = sys.argv[1]
    except IndexError:
        text = "Hello, World"
    console = Console()
    console.print(Rule(title=text))

    console = Console()
    console.print(Rule("foo"), width=4)
python3.12/site-packages/pip/_vendor/rich/_windows.py000064400000003606151732702070016476 0ustar00import sys
from dataclasses import dataclass


@dataclass
class WindowsConsoleFeatures:
    """Windows features available."""

    vt: bool = False
    """The console supports VT codes."""
    truecolor: bool = False
    """The console supports truecolor."""


try:
    import ctypes
    from ctypes import LibraryLoader

    if sys.platform == "win32":
        windll = LibraryLoader(ctypes.WinDLL)
    else:
        windll = None
        raise ImportError("Not windows")

    from pip._vendor.rich._win32_console import (
        ENABLE_VIRTUAL_TERMINAL_PROCESSING,
        GetConsoleMode,
        GetStdHandle,
        LegacyWindowsError,
    )

except (AttributeError, ImportError, ValueError):

    # Fallback if we can't load the Windows DLL
    def get_windows_console_features() -> WindowsConsoleFeatures:
        features = WindowsConsoleFeatures()
        return features

else:

    def get_windows_console_features() -> WindowsConsoleFeatures:
        """Get windows console features.

        Returns:
            WindowsConsoleFeatures: An instance of WindowsConsoleFeatures.
        """
        handle = GetStdHandle()
        try:
            console_mode = GetConsoleMode(handle)
            success = True
        except LegacyWindowsError:
            console_mode = 0
            success = False
        vt = bool(success and console_mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING)
        truecolor = False
        if vt:
            win_version = sys.getwindowsversion()
            truecolor = win_version.major > 10 or (
                win_version.major == 10 and win_version.build >= 15063
            )
        features = WindowsConsoleFeatures(vt=vt, truecolor=truecolor)
        return features


if __name__ == "__main__":
    import platform

    features = get_windows_console_features()
    from pip._vendor.rich import print

    print(f'platform="{platform.system()}"')
    print(repr(features))
python3.12/site-packages/pip/_vendor/rich/layout.py000064400000033267151732702070016170 0ustar00from abc import ABC, abstractmethod
from itertools import islice
from operator import itemgetter
from threading import RLock
from typing import (
    TYPE_CHECKING,
    Dict,
    Iterable,
    List,
    NamedTuple,
    Optional,
    Sequence,
    Tuple,
    Union,
)

from ._ratio import ratio_resolve
from .align import Align
from .console import Console, ConsoleOptions, RenderableType, RenderResult
from .highlighter import ReprHighlighter
from .panel import Panel
from .pretty import Pretty
from .region import Region
from .repr import Result, rich_repr
from .segment import Segment
from .style import StyleType

if TYPE_CHECKING:
    from pip._vendor.rich.tree import Tree


class LayoutRender(NamedTuple):
    """An individual layout render."""

    region: Region
    render: List[List[Segment]]


RegionMap = Dict["Layout", Region]
RenderMap = Dict["Layout", LayoutRender]


class LayoutError(Exception):
    """Layout related error."""


class NoSplitter(LayoutError):
    """Requested splitter does not exist."""


class _Placeholder:
    """An internal renderable used as a Layout placeholder."""

    highlighter = ReprHighlighter()

    def __init__(self, layout: "Layout", style: StyleType = "") -> None:
        self.layout = layout
        self.style = style

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        width = options.max_width
        height = options.height or options.size.height
        layout = self.layout
        title = (
            f"{layout.name!r} ({width} x {height})"
            if layout.name
            else f"({width} x {height})"
        )
        yield Panel(
            Align.center(Pretty(layout), vertical="middle"),
            style=self.style,
            title=self.highlighter(title),
            border_style="blue",
            height=height,
        )


class Splitter(ABC):
    """Base class for a splitter."""

    name: str = ""

    @abstractmethod
    def get_tree_icon(self) -> str:
        """Get the icon (emoji) used in layout.tree"""

    @abstractmethod
    def divide(
        self, children: Sequence["Layout"], region: Region
    ) -> Iterable[Tuple["Layout", Region]]:
        """Divide a region amongst several child layouts.

        Args:
            children (Sequence(Layout)): A number of child layouts.
            region (Region): A rectangular region to divide.
        """


class RowSplitter(Splitter):
    """Split a layout region in to rows."""

    name = "row"

    def get_tree_icon(self) -> str:
        return "[layout.tree.row]⬌"

    def divide(
        self, children: Sequence["Layout"], region: Region
    ) -> Iterable[Tuple["Layout", Region]]:
        x, y, width, height = region
        render_widths = ratio_resolve(width, children)
        offset = 0
        _Region = Region
        for child, child_width in zip(children, render_widths):
            yield child, _Region(x + offset, y, child_width, height)
            offset += child_width


class ColumnSplitter(Splitter):
    """Split a layout region in to columns."""

    name = "column"

    def get_tree_icon(self) -> str:
        return "[layout.tree.column]⬍"

    def divide(
        self, children: Sequence["Layout"], region: Region
    ) -> Iterable[Tuple["Layout", Region]]:
        x, y, width, height = region
        render_heights = ratio_resolve(height, children)
        offset = 0
        _Region = Region
        for child, child_height in zip(children, render_heights):
            yield child, _Region(x, y + offset, width, child_height)
            offset += child_height


@rich_repr
class Layout:
    """A renderable to divide a fixed height in to rows or columns.

    Args:
        renderable (RenderableType, optional): Renderable content, or None for placeholder. Defaults to None.
        name (str, optional): Optional identifier for Layout. Defaults to None.
        size (int, optional): Optional fixed size of layout. Defaults to None.
        minimum_size (int, optional): Minimum size of layout. Defaults to 1.
        ratio (int, optional): Optional ratio for flexible layout. Defaults to 1.
        visible (bool, optional): Visibility of layout. Defaults to True.
    """

    splitters = {"row": RowSplitter, "column": ColumnSplitter}

    def __init__(
        self,
        renderable: Optional[RenderableType] = None,
        *,
        name: Optional[str] = None,
        size: Optional[int] = None,
        minimum_size: int = 1,
        ratio: int = 1,
        visible: bool = True,
    ) -> None:
        self._renderable = renderable or _Placeholder(self)
        self.size = size
        self.minimum_size = minimum_size
        self.ratio = ratio
        self.name = name
        self.visible = visible
        self.splitter: Splitter = self.splitters["column"]()
        self._children: List[Layout] = []
        self._render_map: RenderMap = {}
        self._lock = RLock()

    def __rich_repr__(self) -> Result:
        yield "name", self.name, None
        yield "size", self.size, None
        yield "minimum_size", self.minimum_size, 1
        yield "ratio", self.ratio, 1

    @property
    def renderable(self) -> RenderableType:
        """Layout renderable."""
        return self if self._children else self._renderable

    @property
    def children(self) -> List["Layout"]:
        """Gets (visible) layout children."""
        return [child for child in self._children if child.visible]

    @property
    def map(self) -> RenderMap:
        """Get a map of the last render."""
        return self._render_map

    def get(self, name: str) -> Optional["Layout"]:
        """Get a named layout, or None if it doesn't exist.

        Args:
            name (str): Name of layout.

        Returns:
            Optional[Layout]: Layout instance or None if no layout was found.
        """
        if self.name == name:
            return self
        else:
            for child in self._children:
                named_layout = child.get(name)
                if named_layout is not None:
                    return named_layout
        return None

    def __getitem__(self, name: str) -> "Layout":
        layout = self.get(name)
        if layout is None:
            raise KeyError(f"No layout with name {name!r}")
        return layout

    @property
    def tree(self) -> "Tree":
        """Get a tree renderable to show layout structure."""
        from pip._vendor.rich.styled import Styled
        from pip._vendor.rich.table import Table
        from pip._vendor.rich.tree import Tree

        def summary(layout: "Layout") -> Table:

            icon = layout.splitter.get_tree_icon()

            table = Table.grid(padding=(0, 1, 0, 0))

            text: RenderableType = (
                Pretty(layout) if layout.visible else Styled(Pretty(layout), "dim")
            )
            table.add_row(icon, text)
            _summary = table
            return _summary

        layout = self
        tree = Tree(
            summary(layout),
            guide_style=f"layout.tree.{layout.splitter.name}",
            highlight=True,
        )

        def recurse(tree: "Tree", layout: "Layout") -> None:
            for child in layout._children:
                recurse(
                    tree.add(
                        summary(child),
                        guide_style=f"layout.tree.{child.splitter.name}",
                    ),
                    child,
                )

        recurse(tree, self)
        return tree

    def split(
        self,
        *layouts: Union["Layout", RenderableType],
        splitter: Union[Splitter, str] = "column",
    ) -> None:
        """Split the layout in to multiple sub-layouts.

        Args:
            *layouts (Layout): Positional arguments should be (sub) Layout instances.
            splitter (Union[Splitter, str]): Splitter instance or name of splitter.
        """
        _layouts = [
            layout if isinstance(layout, Layout) else Layout(layout)
            for layout in layouts
        ]
        try:
            self.splitter = (
                splitter
                if isinstance(splitter, Splitter)
                else self.splitters[splitter]()
            )
        except KeyError:
            raise NoSplitter(f"No splitter called {splitter!r}")
        self._children[:] = _layouts

    def add_split(self, *layouts: Union["Layout", RenderableType]) -> None:
        """Add a new layout(s) to existing split.

        Args:
            *layouts (Union[Layout, RenderableType]): Positional arguments should be renderables or (sub) Layout instances.

        """
        _layouts = (
            layout if isinstance(layout, Layout) else Layout(layout)
            for layout in layouts
        )
        self._children.extend(_layouts)

    def split_row(self, *layouts: Union["Layout", RenderableType]) -> None:
        """Split the layout in to a row (layouts side by side).

        Args:
            *layouts (Layout): Positional arguments should be (sub) Layout instances.
        """
        self.split(*layouts, splitter="row")

    def split_column(self, *layouts: Union["Layout", RenderableType]) -> None:
        """Split the layout in to a column (layouts stacked on top of each other).

        Args:
            *layouts (Layout): Positional arguments should be (sub) Layout instances.
        """
        self.split(*layouts, splitter="column")

    def unsplit(self) -> None:
        """Reset splits to initial state."""
        del self._children[:]

    def update(self, renderable: RenderableType) -> None:
        """Update renderable.

        Args:
            renderable (RenderableType): New renderable object.
        """
        with self._lock:
            self._renderable = renderable

    def refresh_screen(self, console: "Console", layout_name: str) -> None:
        """Refresh a sub-layout.

        Args:
            console (Console): Console instance where Layout is to be rendered.
            layout_name (str): Name of layout.
        """
        with self._lock:
            layout = self[layout_name]
            region, _lines = self._render_map[layout]
            (x, y, width, height) = region
            lines = console.render_lines(
                layout, console.options.update_dimensions(width, height)
            )
            self._render_map[layout] = LayoutRender(region, lines)
            console.update_screen_lines(lines, x, y)

    def _make_region_map(self, width: int, height: int) -> RegionMap:
        """Create a dict that maps layout on to Region."""
        stack: List[Tuple[Layout, Region]] = [(self, Region(0, 0, width, height))]
        push = stack.append
        pop = stack.pop
        layout_regions: List[Tuple[Layout, Region]] = []
        append_layout_region = layout_regions.append
        while stack:
            append_layout_region(pop())
            layout, region = layout_regions[-1]
            children = layout.children
            if children:
                for child_and_region in layout.splitter.divide(children, region):
                    push(child_and_region)

        region_map = {
            layout: region
            for layout, region in sorted(layout_regions, key=itemgetter(1))
        }
        return region_map

    def render(self, console: Console, options: ConsoleOptions) -> RenderMap:
        """Render the sub_layouts.

        Args:
            console (Console): Console instance.
            options (ConsoleOptions): Console options.

        Returns:
            RenderMap: A dict that maps Layout on to a tuple of Region, lines
        """
        render_width = options.max_width
        render_height = options.height or console.height
        region_map = self._make_region_map(render_width, render_height)
        layout_regions = [
            (layout, region)
            for layout, region in region_map.items()
            if not layout.children
        ]
        render_map: Dict["Layout", "LayoutRender"] = {}
        render_lines = console.render_lines
        update_dimensions = options.update_dimensions

        for layout, region in layout_regions:
            lines = render_lines(
                layout.renderable, update_dimensions(region.width, region.height)
            )
            render_map[layout] = LayoutRender(region, lines)
        return render_map

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        with self._lock:
            width = options.max_width or console.width
            height = options.height or console.height
            render_map = self.render(console, options.update_dimensions(width, height))
            self._render_map = render_map
            layout_lines: List[List[Segment]] = [[] for _ in range(height)]
            _islice = islice
            for (region, lines) in render_map.values():
                _x, y, _layout_width, layout_height = region
                for row, line in zip(
                    _islice(layout_lines, y, y + layout_height), lines
                ):
                    row.extend(line)

            new_line = Segment.line()
            for layout_row in layout_lines:
                yield from layout_row
                yield new_line


if __name__ == "__main__":
    from pip._vendor.rich.console import Console

    console = Console()
    layout = Layout()

    layout.split_column(
        Layout(name="header", size=3),
        Layout(ratio=1, name="main"),
        Layout(size=10, name="footer"),
    )

    layout["main"].split_row(Layout(name="side"), Layout(name="body", ratio=2))

    layout["body"].split_row(Layout(name="content", ratio=2), Layout(name="s2"))

    layout["s2"].split_column(
        Layout(name="top"), Layout(name="middle"), Layout(name="bottom")
    )

    layout["side"].split_column(Layout(layout.tree, name="left1"), Layout(name="left2"))

    layout["content"].update("foo")

    console.print(layout)
python3.12/site-packages/pip/_vendor/rich/theme.py000064400000007301151732702070015743 0ustar00import configparser
from typing import Dict, List, IO, Mapping, Optional

from .default_styles import DEFAULT_STYLES
from .style import Style, StyleType


class Theme:
    """A container for style information, used by :class:`~rich.console.Console`.

    Args:
        styles (Dict[str, Style], optional): A mapping of style names on to styles. Defaults to None for a theme with no styles.
        inherit (bool, optional): Inherit default styles. Defaults to True.
    """

    styles: Dict[str, Style]

    def __init__(
        self, styles: Optional[Mapping[str, StyleType]] = None, inherit: bool = True
    ):
        self.styles = DEFAULT_STYLES.copy() if inherit else {}
        if styles is not None:
            self.styles.update(
                {
                    name: style if isinstance(style, Style) else Style.parse(style)
                    for name, style in styles.items()
                }
            )

    @property
    def config(self) -> str:
        """Get contents of a config file for this theme."""
        config = "[styles]\n" + "\n".join(
            f"{name} = {style}" for name, style in sorted(self.styles.items())
        )
        return config

    @classmethod
    def from_file(
        cls, config_file: IO[str], source: Optional[str] = None, inherit: bool = True
    ) -> "Theme":
        """Load a theme from a text mode file.

        Args:
            config_file (IO[str]): An open conf file.
            source (str, optional): The filename of the open file. Defaults to None.
            inherit (bool, optional): Inherit default styles. Defaults to True.

        Returns:
            Theme: A New theme instance.
        """
        config = configparser.ConfigParser()
        config.read_file(config_file, source=source)
        styles = {name: Style.parse(value) for name, value in config.items("styles")}
        theme = Theme(styles, inherit=inherit)
        return theme

    @classmethod
    def read(
        cls, path: str, inherit: bool = True, encoding: Optional[str] = None
    ) -> "Theme":
        """Read a theme from a path.

        Args:
            path (str): Path to a config file readable by Python configparser module.
            inherit (bool, optional): Inherit default styles. Defaults to True.
            encoding (str, optional): Encoding of the config file. Defaults to None.

        Returns:
            Theme: A new theme instance.
        """
        with open(path, "rt", encoding=encoding) as config_file:
            return cls.from_file(config_file, source=path, inherit=inherit)


class ThemeStackError(Exception):
    """Base exception for errors related to the theme stack."""


class ThemeStack:
    """A stack of themes.

    Args:
        theme (Theme): A theme instance
    """

    def __init__(self, theme: Theme) -> None:
        self._entries: List[Dict[str, Style]] = [theme.styles]
        self.get = self._entries[-1].get

    def push_theme(self, theme: Theme, inherit: bool = True) -> None:
        """Push a theme on the top of the stack.

        Args:
            theme (Theme): A Theme instance.
            inherit (boolean, optional): Inherit styles from current top of stack.
        """
        styles: Dict[str, Style]
        styles = (
            {**self._entries[-1], **theme.styles} if inherit else theme.styles.copy()
        )
        self._entries.append(styles)
        self.get = self._entries[-1].get

    def pop_theme(self) -> None:
        """Pop (and discard) the top-most theme."""
        if len(self._entries) == 1:
            raise ThemeStackError("Unable to pop base theme")
        self._entries.pop()
        self.get = self._entries[-1].get


if __name__ == "__main__":  # pragma: no cover
    theme = Theme()
    print(theme.config)
python3.12/site-packages/pip/_vendor/rich/prompt.py000064400000026047151732702100016164 0ustar00from typing import Any, Generic, List, Optional, TextIO, TypeVar, Union, overload

from . import get_console
from .console import Console
from .text import Text, TextType

PromptType = TypeVar("PromptType")
DefaultType = TypeVar("DefaultType")


class PromptError(Exception):
    """Exception base class for prompt related errors."""


class InvalidResponse(PromptError):
    """Exception to indicate a response was invalid. Raise this within process_response() to indicate an error
    and provide an error message.

    Args:
        message (Union[str, Text]): Error message.
    """

    def __init__(self, message: TextType) -> None:
        self.message = message

    def __rich__(self) -> TextType:
        return self.message


class PromptBase(Generic[PromptType]):
    """Ask the user for input until a valid response is received. This is the base class, see one of
    the concrete classes for examples.

    Args:
        prompt (TextType, optional): Prompt text. Defaults to "".
        console (Console, optional): A Console instance or None to use global console. Defaults to None.
        password (bool, optional): Enable password input. Defaults to False.
        choices (List[str], optional): A list of valid choices. Defaults to None.
        show_default (bool, optional): Show default in prompt. Defaults to True.
        show_choices (bool, optional): Show choices in prompt. Defaults to True.
    """

    response_type: type = str

    validate_error_message = "[prompt.invalid]Please enter a valid value"
    illegal_choice_message = (
        "[prompt.invalid.choice]Please select one of the available options"
    )
    prompt_suffix = ": "

    choices: Optional[List[str]] = None

    def __init__(
        self,
        prompt: TextType = "",
        *,
        console: Optional[Console] = None,
        password: bool = False,
        choices: Optional[List[str]] = None,
        show_default: bool = True,
        show_choices: bool = True,
    ) -> None:
        self.console = console or get_console()
        self.prompt = (
            Text.from_markup(prompt, style="prompt")
            if isinstance(prompt, str)
            else prompt
        )
        self.password = password
        if choices is not None:
            self.choices = choices
        self.show_default = show_default
        self.show_choices = show_choices

    @classmethod
    @overload
    def ask(
        cls,
        prompt: TextType = "",
        *,
        console: Optional[Console] = None,
        password: bool = False,
        choices: Optional[List[str]] = None,
        show_default: bool = True,
        show_choices: bool = True,
        default: DefaultType,
        stream: Optional[TextIO] = None,
    ) -> Union[DefaultType, PromptType]:
        ...

    @classmethod
    @overload
    def ask(
        cls,
        prompt: TextType = "",
        *,
        console: Optional[Console] = None,
        password: bool = False,
        choices: Optional[List[str]] = None,
        show_default: bool = True,
        show_choices: bool = True,
        stream: Optional[TextIO] = None,
    ) -> PromptType:
        ...

    @classmethod
    def ask(
        cls,
        prompt: TextType = "",
        *,
        console: Optional[Console] = None,
        password: bool = False,
        choices: Optional[List[str]] = None,
        show_default: bool = True,
        show_choices: bool = True,
        default: Any = ...,
        stream: Optional[TextIO] = None,
    ) -> Any:
        """Shortcut to construct and run a prompt loop and return the result.

        Example:
            >>> filename = Prompt.ask("Enter a filename")

        Args:
            prompt (TextType, optional): Prompt text. Defaults to "".
            console (Console, optional): A Console instance or None to use global console. Defaults to None.
            password (bool, optional): Enable password input. Defaults to False.
            choices (List[str], optional): A list of valid choices. Defaults to None.
            show_default (bool, optional): Show default in prompt. Defaults to True.
            show_choices (bool, optional): Show choices in prompt. Defaults to True.
            stream (TextIO, optional): Optional text file open for reading to get input. Defaults to None.
        """
        _prompt = cls(
            prompt,
            console=console,
            password=password,
            choices=choices,
            show_default=show_default,
            show_choices=show_choices,
        )
        return _prompt(default=default, stream=stream)

    def render_default(self, default: DefaultType) -> Text:
        """Turn the supplied default in to a Text instance.

        Args:
            default (DefaultType): Default value.

        Returns:
            Text: Text containing rendering of default value.
        """
        return Text(f"({default})", "prompt.default")

    def make_prompt(self, default: DefaultType) -> Text:
        """Make prompt text.

        Args:
            default (DefaultType): Default value.

        Returns:
            Text: Text to display in prompt.
        """
        prompt = self.prompt.copy()
        prompt.end = ""

        if self.show_choices and self.choices:
            _choices = "/".join(self.choices)
            choices = f"[{_choices}]"
            prompt.append(" ")
            prompt.append(choices, "prompt.choices")

        if (
            default != ...
            and self.show_default
            and isinstance(default, (str, self.response_type))
        ):
            prompt.append(" ")
            _default = self.render_default(default)
            prompt.append(_default)

        prompt.append(self.prompt_suffix)

        return prompt

    @classmethod
    def get_input(
        cls,
        console: Console,
        prompt: TextType,
        password: bool,
        stream: Optional[TextIO] = None,
    ) -> str:
        """Get input from user.

        Args:
            console (Console): Console instance.
            prompt (TextType): Prompt text.
            password (bool): Enable password entry.

        Returns:
            str: String from user.
        """
        return console.input(prompt, password=password, stream=stream)

    def check_choice(self, value: str) -> bool:
        """Check value is in the list of valid choices.

        Args:
            value (str): Value entered by user.

        Returns:
            bool: True if choice was valid, otherwise False.
        """
        assert self.choices is not None
        return value.strip() in self.choices

    def process_response(self, value: str) -> PromptType:
        """Process response from user, convert to prompt type.

        Args:
            value (str): String typed by user.

        Raises:
            InvalidResponse: If ``value`` is invalid.

        Returns:
            PromptType: The value to be returned from ask method.
        """
        value = value.strip()
        try:
            return_value: PromptType = self.response_type(value)
        except ValueError:
            raise InvalidResponse(self.validate_error_message)

        if self.choices is not None and not self.check_choice(value):
            raise InvalidResponse(self.illegal_choice_message)

        return return_value

    def on_validate_error(self, value: str, error: InvalidResponse) -> None:
        """Called to handle validation error.

        Args:
            value (str): String entered by user.
            error (InvalidResponse): Exception instance the initiated the error.
        """
        self.console.print(error)

    def pre_prompt(self) -> None:
        """Hook to display something before the prompt."""

    @overload
    def __call__(self, *, stream: Optional[TextIO] = None) -> PromptType:
        ...

    @overload
    def __call__(
        self, *, default: DefaultType, stream: Optional[TextIO] = None
    ) -> Union[PromptType, DefaultType]:
        ...

    def __call__(self, *, default: Any = ..., stream: Optional[TextIO] = None) -> Any:
        """Run the prompt loop.

        Args:
            default (Any, optional): Optional default value.

        Returns:
            PromptType: Processed value.
        """
        while True:
            self.pre_prompt()
            prompt = self.make_prompt(default)
            value = self.get_input(self.console, prompt, self.password, stream=stream)
            if value == "" and default != ...:
                return default
            try:
                return_value = self.process_response(value)
            except InvalidResponse as error:
                self.on_validate_error(value, error)
                continue
            else:
                return return_value


class Prompt(PromptBase[str]):
    """A prompt that returns a str.

    Example:
        >>> name = Prompt.ask("Enter your name")


    """

    response_type = str


class IntPrompt(PromptBase[int]):
    """A prompt that returns an integer.

    Example:
        >>> burrito_count = IntPrompt.ask("How many burritos do you want to order")

    """

    response_type = int
    validate_error_message = "[prompt.invalid]Please enter a valid integer number"


class FloatPrompt(PromptBase[int]):
    """A prompt that returns a float.

    Example:
        >>> temperature = FloatPrompt.ask("Enter desired temperature")

    """

    response_type = float
    validate_error_message = "[prompt.invalid]Please enter a number"


class Confirm(PromptBase[bool]):
    """A yes / no confirmation prompt.

    Example:
        >>> if Confirm.ask("Continue"):
                run_job()

    """

    response_type = bool
    validate_error_message = "[prompt.invalid]Please enter Y or N"
    choices: List[str] = ["y", "n"]

    def render_default(self, default: DefaultType) -> Text:
        """Render the default as (y) or (n) rather than True/False."""
        yes, no = self.choices
        return Text(f"({yes})" if default else f"({no})", style="prompt.default")

    def process_response(self, value: str) -> bool:
        """Convert choices to a bool."""
        value = value.strip().lower()
        if value not in self.choices:
            raise InvalidResponse(self.validate_error_message)
        return value == self.choices[0]


if __name__ == "__main__":  # pragma: no cover

    from pip._vendor.rich import print

    if Confirm.ask("Run [i]prompt[/i] tests?", default=True):
        while True:
            result = IntPrompt.ask(
                ":rocket: Enter a number between [b]1[/b] and [b]10[/b]", default=5
            )
            if result >= 1 and result <= 10:
                break
            print(":pile_of_poo: [prompt.invalid]Number must be between 1 and 10")
        print(f"number={result}")

        while True:
            password = Prompt.ask(
                "Please enter a password [cyan](must be at least 5 characters)",
                password=True,
            )
            if len(password) >= 5:
                break
            print("[prompt.invalid]password too short")
        print(f"password={password!r}")

        fruit = Prompt.ask("Enter a fruit", choices=["apple", "orange", "pear"])
        print(f"fruit={fruit!r}")

    else:
        print("[b]OK :loudly_crying_face:")
python3.12/site-packages/pip/_vendor/rich/themes.py000064400000000146151732702100016120 0ustar00from .default_styles import DEFAULT_STYLES
from .theme import Theme


DEFAULT = Theme(DEFAULT_STYLES)
python3.12/site-packages/pip/_vendor/rich/segment.py000064400000057267151732702100016315 0ustar00from enum import IntEnum
from functools import lru_cache
from itertools import filterfalse
from logging import getLogger
from operator import attrgetter
from typing import (
    TYPE_CHECKING,
    Dict,
    Iterable,
    List,
    NamedTuple,
    Optional,
    Sequence,
    Tuple,
    Type,
    Union,
)

from .cells import (
    _is_single_cell_widths,
    cached_cell_len,
    cell_len,
    get_character_cell_size,
    set_cell_size,
)
from .repr import Result, rich_repr
from .style import Style

if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderResult

log = getLogger("rich")


class ControlType(IntEnum):
    """Non-printable control codes which typically translate to ANSI codes."""

    BELL = 1
    CARRIAGE_RETURN = 2
    HOME = 3
    CLEAR = 4
    SHOW_CURSOR = 5
    HIDE_CURSOR = 6
    ENABLE_ALT_SCREEN = 7
    DISABLE_ALT_SCREEN = 8
    CURSOR_UP = 9
    CURSOR_DOWN = 10
    CURSOR_FORWARD = 11
    CURSOR_BACKWARD = 12
    CURSOR_MOVE_TO_COLUMN = 13
    CURSOR_MOVE_TO = 14
    ERASE_IN_LINE = 15
    SET_WINDOW_TITLE = 16


ControlCode = Union[
    Tuple[ControlType],
    Tuple[ControlType, Union[int, str]],
    Tuple[ControlType, int, int],
]


@rich_repr()
class Segment(NamedTuple):
    """A piece of text with associated style. Segments are produced by the Console render process and
    are ultimately converted in to strings to be written to the terminal.

    Args:
        text (str): A piece of text.
        style (:class:`~rich.style.Style`, optional): An optional style to apply to the text.
        control (Tuple[ControlCode], optional): Optional sequence of control codes.

    Attributes:
        cell_length (int): The cell length of this Segment.
    """

    text: str
    style: Optional[Style] = None
    control: Optional[Sequence[ControlCode]] = None

    @property
    def cell_length(self) -> int:
        """The number of terminal cells required to display self.text.

        Returns:
            int: A number of cells.
        """
        text, _style, control = self
        return 0 if control else cell_len(text)

    def __rich_repr__(self) -> Result:
        yield self.text
        if self.control is None:
            if self.style is not None:
                yield self.style
        else:
            yield self.style
            yield self.control

    def __bool__(self) -> bool:
        """Check if the segment contains text."""
        return bool(self.text)

    @property
    def is_control(self) -> bool:
        """Check if the segment contains control codes."""
        return self.control is not None

    @classmethod
    @lru_cache(1024 * 16)
    def _split_cells(cls, segment: "Segment", cut: int) -> Tuple["Segment", "Segment"]:

        text, style, control = segment
        _Segment = Segment

        cell_length = segment.cell_length
        if cut >= cell_length:
            return segment, _Segment("", style, control)

        cell_size = get_character_cell_size

        pos = int((cut / cell_length) * (len(text) - 1))

        before = text[:pos]
        cell_pos = cell_len(before)
        if cell_pos == cut:
            return (
                _Segment(before, style, control),
                _Segment(text[pos:], style, control),
            )
        while pos < len(text):
            char = text[pos]
            pos += 1
            cell_pos += cell_size(char)
            before = text[:pos]
            if cell_pos == cut:
                return (
                    _Segment(before, style, control),
                    _Segment(text[pos:], style, control),
                )
            if cell_pos > cut:
                return (
                    _Segment(before[: pos - 1] + " ", style, control),
                    _Segment(" " + text[pos:], style, control),
                )

        raise AssertionError("Will never reach here")

    def split_cells(self, cut: int) -> Tuple["Segment", "Segment"]:
        """Split segment in to two segments at the specified column.

        If the cut point falls in the middle of a 2-cell wide character then it is replaced
        by two spaces, to preserve the display width of the parent segment.

        Returns:
            Tuple[Segment, Segment]: Two segments.
        """
        text, style, control = self

        if _is_single_cell_widths(text):
            # Fast path with all 1 cell characters
            if cut >= len(text):
                return self, Segment("", style, control)
            return (
                Segment(text[:cut], style, control),
                Segment(text[cut:], style, control),
            )

        return self._split_cells(self, cut)

    @classmethod
    def line(cls) -> "Segment":
        """Make a new line segment."""
        return cls("\n")

    @classmethod
    def apply_style(
        cls,
        segments: Iterable["Segment"],
        style: Optional[Style] = None,
        post_style: Optional[Style] = None,
    ) -> Iterable["Segment"]:
        """Apply style(s) to an iterable of segments.

        Returns an iterable of segments where the style is replaced by ``style + segment.style + post_style``.

        Args:
            segments (Iterable[Segment]): Segments to process.
            style (Style, optional): Base style. Defaults to None.
            post_style (Style, optional): Style to apply on top of segment style. Defaults to None.

        Returns:
            Iterable[Segments]: A new iterable of segments (possibly the same iterable).
        """
        result_segments = segments
        if style:
            apply = style.__add__
            result_segments = (
                cls(text, None if control else apply(_style), control)
                for text, _style, control in result_segments
            )
        if post_style:
            result_segments = (
                cls(
                    text,
                    (
                        None
                        if control
                        else (_style + post_style if _style else post_style)
                    ),
                    control,
                )
                for text, _style, control in result_segments
            )
        return result_segments

    @classmethod
    def filter_control(
        cls, segments: Iterable["Segment"], is_control: bool = False
    ) -> Iterable["Segment"]:
        """Filter segments by ``is_control`` attribute.

        Args:
            segments (Iterable[Segment]): An iterable of Segment instances.
            is_control (bool, optional): is_control flag to match in search.

        Returns:
            Iterable[Segment]: And iterable of Segment instances.

        """
        if is_control:
            return filter(attrgetter("control"), segments)
        else:
            return filterfalse(attrgetter("control"), segments)

    @classmethod
    def split_lines(cls, segments: Iterable["Segment"]) -> Iterable[List["Segment"]]:
        """Split a sequence of segments in to a list of lines.

        Args:
            segments (Iterable[Segment]): Segments potentially containing line feeds.

        Yields:
            Iterable[List[Segment]]: Iterable of segment lists, one per line.
        """
        line: List[Segment] = []
        append = line.append

        for segment in segments:
            if "\n" in segment.text and not segment.control:
                text, style, _ = segment
                while text:
                    _text, new_line, text = text.partition("\n")
                    if _text:
                        append(cls(_text, style))
                    if new_line:
                        yield line
                        line = []
                        append = line.append
            else:
                append(segment)
        if line:
            yield line

    @classmethod
    def split_and_crop_lines(
        cls,
        segments: Iterable["Segment"],
        length: int,
        style: Optional[Style] = None,
        pad: bool = True,
        include_new_lines: bool = True,
    ) -> Iterable[List["Segment"]]:
        """Split segments in to lines, and crop lines greater than a given length.

        Args:
            segments (Iterable[Segment]): An iterable of segments, probably
                generated from console.render.
            length (int): Desired line length.
            style (Style, optional): Style to use for any padding.
            pad (bool): Enable padding of lines that are less than `length`.

        Returns:
            Iterable[List[Segment]]: An iterable of lines of segments.
        """
        line: List[Segment] = []
        append = line.append

        adjust_line_length = cls.adjust_line_length
        new_line_segment = cls("\n")

        for segment in segments:
            if "\n" in segment.text and not segment.control:
                text, segment_style, _ = segment
                while text:
                    _text, new_line, text = text.partition("\n")
                    if _text:
                        append(cls(_text, segment_style))
                    if new_line:
                        cropped_line = adjust_line_length(
                            line, length, style=style, pad=pad
                        )
                        if include_new_lines:
                            cropped_line.append(new_line_segment)
                        yield cropped_line
                        line.clear()
            else:
                append(segment)
        if line:
            yield adjust_line_length(line, length, style=style, pad=pad)

    @classmethod
    def adjust_line_length(
        cls,
        line: List["Segment"],
        length: int,
        style: Optional[Style] = None,
        pad: bool = True,
    ) -> List["Segment"]:
        """Adjust a line to a given width (cropping or padding as required).

        Args:
            segments (Iterable[Segment]): A list of segments in a single line.
            length (int): The desired width of the line.
            style (Style, optional): The style of padding if used (space on the end). Defaults to None.
            pad (bool, optional): Pad lines with spaces if they are shorter than `length`. Defaults to True.

        Returns:
            List[Segment]: A line of segments with the desired length.
        """
        line_length = sum(segment.cell_length for segment in line)
        new_line: List[Segment]

        if line_length < length:
            if pad:
                new_line = line + [cls(" " * (length - line_length), style)]
            else:
                new_line = line[:]
        elif line_length > length:
            new_line = []
            append = new_line.append
            line_length = 0
            for segment in line:
                segment_length = segment.cell_length
                if line_length + segment_length < length or segment.control:
                    append(segment)
                    line_length += segment_length
                else:
                    text, segment_style, _ = segment
                    text = set_cell_size(text, length - line_length)
                    append(cls(text, segment_style))
                    break
        else:
            new_line = line[:]
        return new_line

    @classmethod
    def get_line_length(cls, line: List["Segment"]) -> int:
        """Get the length of list of segments.

        Args:
            line (List[Segment]): A line encoded as a list of Segments (assumes no '\\\\n' characters),

        Returns:
            int: The length of the line.
        """
        _cell_len = cell_len
        return sum(_cell_len(text) for text, style, control in line if not control)

    @classmethod
    def get_shape(cls, lines: List[List["Segment"]]) -> Tuple[int, int]:
        """Get the shape (enclosing rectangle) of a list of lines.

        Args:
            lines (List[List[Segment]]): A list of lines (no '\\\\n' characters).

        Returns:
            Tuple[int, int]: Width and height in characters.
        """
        get_line_length = cls.get_line_length
        max_width = max(get_line_length(line) for line in lines) if lines else 0
        return (max_width, len(lines))

    @classmethod
    def set_shape(
        cls,
        lines: List[List["Segment"]],
        width: int,
        height: Optional[int] = None,
        style: Optional[Style] = None,
        new_lines: bool = False,
    ) -> List[List["Segment"]]:
        """Set the shape of a list of lines (enclosing rectangle).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style, optional): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "\n". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        """
        _height = height or len(lines)

        blank = (
            [cls(" " * width + "\n", style)] if new_lines else [cls(" " * width, style)]
        )

        adjust_line_length = cls.adjust_line_length
        shaped_lines = lines[:_height]
        shaped_lines[:] = [
            adjust_line_length(line, width, style=style) for line in lines
        ]
        if len(shaped_lines) < _height:
            shaped_lines.extend([blank] * (_height - len(shaped_lines)))
        return shaped_lines

    @classmethod
    def align_top(
        cls: Type["Segment"],
        lines: List[List["Segment"]],
        width: int,
        height: int,
        style: Style,
        new_lines: bool = False,
    ) -> List[List["Segment"]]:
        """Aligns lines to top (adds extra lines to bottom as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "\n". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        """
        extra_lines = height - len(lines)
        if not extra_lines:
            return lines[:]
        lines = lines[:height]
        blank = cls(" " * width + "\n", style) if new_lines else cls(" " * width, style)
        lines = lines + [[blank]] * extra_lines
        return lines

    @classmethod
    def align_bottom(
        cls: Type["Segment"],
        lines: List[List["Segment"]],
        width: int,
        height: int,
        style: Style,
        new_lines: bool = False,
    ) -> List[List["Segment"]]:
        """Aligns render to bottom (adds extra lines above as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added. Defaults to None.
            new_lines (bool, optional): Padded lines should include "\n". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        """
        extra_lines = height - len(lines)
        if not extra_lines:
            return lines[:]
        lines = lines[:height]
        blank = cls(" " * width + "\n", style) if new_lines else cls(" " * width, style)
        lines = [[blank]] * extra_lines + lines
        return lines

    @classmethod
    def align_middle(
        cls: Type["Segment"],
        lines: List[List["Segment"]],
        width: int,
        height: int,
        style: Style,
        new_lines: bool = False,
    ) -> List[List["Segment"]]:
        """Aligns lines to middle (adds extra lines to above and below as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "\n". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        """
        extra_lines = height - len(lines)
        if not extra_lines:
            return lines[:]
        lines = lines[:height]
        blank = cls(" " * width + "\n", style) if new_lines else cls(" " * width, style)
        top_lines = extra_lines // 2
        bottom_lines = extra_lines - top_lines
        lines = [[blank]] * top_lines + lines + [[blank]] * bottom_lines
        return lines

    @classmethod
    def simplify(cls, segments: Iterable["Segment"]) -> Iterable["Segment"]:
        """Simplify an iterable of segments by combining contiguous segments with the same style.

        Args:
            segments (Iterable[Segment]): An iterable of segments.

        Returns:
            Iterable[Segment]: A possibly smaller iterable of segments that will render the same way.
        """
        iter_segments = iter(segments)
        try:
            last_segment = next(iter_segments)
        except StopIteration:
            return

        _Segment = Segment
        for segment in iter_segments:
            if last_segment.style == segment.style and not segment.control:
                last_segment = _Segment(
                    last_segment.text + segment.text, last_segment.style
                )
            else:
                yield last_segment
                last_segment = segment
        yield last_segment

    @classmethod
    def strip_links(cls, segments: Iterable["Segment"]) -> Iterable["Segment"]:
        """Remove all links from an iterable of styles.

        Args:
            segments (Iterable[Segment]): An iterable segments.

        Yields:
            Segment: Segments with link removed.
        """
        for segment in segments:
            if segment.control or segment.style is None:
                yield segment
            else:
                text, style, _control = segment
                yield cls(text, style.update_link(None) if style else None)

    @classmethod
    def strip_styles(cls, segments: Iterable["Segment"]) -> Iterable["Segment"]:
        """Remove all styles from an iterable of segments.

        Args:
            segments (Iterable[Segment]): An iterable segments.

        Yields:
            Segment: Segments with styles replace with None
        """
        for text, _style, control in segments:
            yield cls(text, None, control)

    @classmethod
    def remove_color(cls, segments: Iterable["Segment"]) -> Iterable["Segment"]:
        """Remove all color from an iterable of segments.

        Args:
            segments (Iterable[Segment]): An iterable segments.

        Yields:
            Segment: Segments with colorless style.
        """

        cache: Dict[Style, Style] = {}
        for text, style, control in segments:
            if style:
                colorless_style = cache.get(style)
                if colorless_style is None:
                    colorless_style = style.without_color
                    cache[style] = colorless_style
                yield cls(text, colorless_style, control)
            else:
                yield cls(text, None, control)

    @classmethod
    def divide(
        cls, segments: Iterable["Segment"], cuts: Iterable[int]
    ) -> Iterable[List["Segment"]]:
        """Divides an iterable of segments in to portions.

        Args:
            cuts (Iterable[int]): Cell positions where to divide.

        Yields:
            [Iterable[List[Segment]]]: An iterable of Segments in List.
        """
        split_segments: List["Segment"] = []
        add_segment = split_segments.append

        iter_cuts = iter(cuts)

        while True:
            cut = next(iter_cuts, -1)
            if cut == -1:
                return []
            if cut != 0:
                break
            yield []
        pos = 0

        segments_clear = split_segments.clear
        segments_copy = split_segments.copy

        _cell_len = cached_cell_len
        for segment in segments:
            text, _style, control = segment
            while text:
                end_pos = pos if control else pos + _cell_len(text)
                if end_pos < cut:
                    add_segment(segment)
                    pos = end_pos
                    break

                if end_pos == cut:
                    add_segment(segment)
                    yield segments_copy()
                    segments_clear()
                    pos = end_pos

                    cut = next(iter_cuts, -1)
                    if cut == -1:
                        if split_segments:
                            yield segments_copy()
                        return

                    break

                else:
                    before, segment = segment.split_cells(cut - pos)
                    text, _style, control = segment
                    add_segment(before)
                    yield segments_copy()
                    segments_clear()
                    pos = cut

                cut = next(iter_cuts, -1)
                if cut == -1:
                    if split_segments:
                        yield segments_copy()
                    return

        yield segments_copy()


class Segments:
    """A simple renderable to render an iterable of segments. This class may be useful if
    you want to print segments outside of a __rich_console__ method.

    Args:
        segments (Iterable[Segment]): An iterable of segments.
        new_lines (bool, optional): Add new lines between segments. Defaults to False.
    """

    def __init__(self, segments: Iterable[Segment], new_lines: bool = False) -> None:
        self.segments = list(segments)
        self.new_lines = new_lines

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        if self.new_lines:
            line = Segment.line()
            for segment in self.segments:
                yield segment
                yield line
        else:
            yield from self.segments


class SegmentLines:
    def __init__(self, lines: Iterable[List[Segment]], new_lines: bool = False) -> None:
        """A simple renderable containing a number of lines of segments. May be used as an intermediate
        in rendering process.

        Args:
            lines (Iterable[List[Segment]]): Lists of segments forming lines.
            new_lines (bool, optional): Insert new lines after each line. Defaults to False.
        """
        self.lines = list(lines)
        self.new_lines = new_lines

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        if self.new_lines:
            new_line = Segment.line()
            for line in self.lines:
                yield from line
                yield new_line
        else:
            for line in self.lines:
                yield from line


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich.console import Console
    from pip._vendor.rich.syntax import Syntax
    from pip._vendor.rich.text import Text

    code = """from rich.console import Console
console = Console()
text = Text.from_markup("Hello, [bold magenta]World[/]!")
console.print(text)"""

    text = Text.from_markup("Hello, [bold magenta]World[/]!")

    console = Console()

    console.rule("rich.Segment")
    console.print(
        "A Segment is the last step in the Rich render process before generating text with ANSI codes."
    )
    console.print("\nConsider the following code:\n")
    console.print(Syntax(code, "python", line_numbers=True))
    console.print()
    console.print(
        "When you call [b]print()[/b], Rich [i]renders[/i] the object in to the following:\n"
    )
    fragments = list(console.render(text))
    console.print(fragments)
    console.print()
    console.print("The Segments are then processed to produce the following output:\n")
    console.print(text)
    console.print(
        "\nYou will only need to know this if you are implementing your own Rich renderables."
    )
python3.12/site-packages/pip/_vendor/rich/traceback.py000064400000071644151732702100016565 0ustar00from __future__ import absolute_import

import linecache
import os
import platform
import sys
from dataclasses import dataclass, field
from traceback import walk_tb
from types import ModuleType, TracebackType
from typing import (
    Any,
    Callable,
    Dict,
    Iterable,
    List,
    Optional,
    Sequence,
    Tuple,
    Type,
    Union,
)

from pip._vendor.pygments.lexers import guess_lexer_for_filename
from pip._vendor.pygments.token import Comment, Keyword, Name, Number, Operator, String
from pip._vendor.pygments.token import Text as TextToken
from pip._vendor.pygments.token import Token
from pip._vendor.pygments.util import ClassNotFound

from . import pretty
from ._loop import loop_last
from .columns import Columns
from .console import Console, ConsoleOptions, ConsoleRenderable, RenderResult, group
from .constrain import Constrain
from .highlighter import RegexHighlighter, ReprHighlighter
from .panel import Panel
from .scope import render_scope
from .style import Style
from .syntax import Syntax
from .text import Text
from .theme import Theme

WINDOWS = platform.system() == "Windows"

LOCALS_MAX_LENGTH = 10
LOCALS_MAX_STRING = 80


def install(
    *,
    console: Optional[Console] = None,
    width: Optional[int] = 100,
    extra_lines: int = 3,
    theme: Optional[str] = None,
    word_wrap: bool = False,
    show_locals: bool = False,
    locals_max_length: int = LOCALS_MAX_LENGTH,
    locals_max_string: int = LOCALS_MAX_STRING,
    locals_hide_dunder: bool = True,
    locals_hide_sunder: Optional[bool] = None,
    indent_guides: bool = True,
    suppress: Iterable[Union[str, ModuleType]] = (),
    max_frames: int = 100,
) -> Callable[[Type[BaseException], BaseException, Optional[TracebackType]], Any]:
    """Install a rich traceback handler.

    Once installed, any tracebacks will be printed with syntax highlighting and rich formatting.


    Args:
        console (Optional[Console], optional): Console to write exception to. Default uses internal Console instance.
        width (Optional[int], optional): Width (in characters) of traceback. Defaults to 100.
        extra_lines (int, optional): Extra lines of code. Defaults to 3.
        theme (Optional[str], optional): Pygments theme to use in traceback. Defaults to ``None`` which will pick
            a theme appropriate for the platform.
        word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
        show_locals (bool, optional): Enable display of local variables. Defaults to False.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
        suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.

    Returns:
        Callable: The previous exception handler that was replaced.

    """
    traceback_console = Console(stderr=True) if console is None else console

    locals_hide_sunder = (
        True
        if (traceback_console.is_jupyter and locals_hide_sunder is None)
        else locals_hide_sunder
    )

    def excepthook(
        type_: Type[BaseException],
        value: BaseException,
        traceback: Optional[TracebackType],
    ) -> None:
        traceback_console.print(
            Traceback.from_exception(
                type_,
                value,
                traceback,
                width=width,
                extra_lines=extra_lines,
                theme=theme,
                word_wrap=word_wrap,
                show_locals=show_locals,
                locals_max_length=locals_max_length,
                locals_max_string=locals_max_string,
                locals_hide_dunder=locals_hide_dunder,
                locals_hide_sunder=bool(locals_hide_sunder),
                indent_guides=indent_guides,
                suppress=suppress,
                max_frames=max_frames,
            )
        )

    def ipy_excepthook_closure(ip: Any) -> None:  # pragma: no cover
        tb_data = {}  # store information about showtraceback call
        default_showtraceback = ip.showtraceback  # keep reference of default traceback

        def ipy_show_traceback(*args: Any, **kwargs: Any) -> None:
            """wrap the default ip.showtraceback to store info for ip._showtraceback"""
            nonlocal tb_data
            tb_data = kwargs
            default_showtraceback(*args, **kwargs)

        def ipy_display_traceback(
            *args: Any, is_syntax: bool = False, **kwargs: Any
        ) -> None:
            """Internally called traceback from ip._showtraceback"""
            nonlocal tb_data
            exc_tuple = ip._get_exc_info()

            # do not display trace on syntax error
            tb: Optional[TracebackType] = None if is_syntax else exc_tuple[2]

            # determine correct tb_offset
            compiled = tb_data.get("running_compiled_code", False)
            tb_offset = tb_data.get("tb_offset", 1 if compiled else 0)
            # remove ipython internal frames from trace with tb_offset
            for _ in range(tb_offset):
                if tb is None:
                    break
                tb = tb.tb_next

            excepthook(exc_tuple[0], exc_tuple[1], tb)
            tb_data = {}  # clear data upon usage

        # replace _showtraceback instead of showtraceback to allow ipython features such as debugging to work
        # this is also what the ipython docs recommends to modify when subclassing InteractiveShell
        ip._showtraceback = ipy_display_traceback
        # add wrapper to capture tb_data
        ip.showtraceback = ipy_show_traceback
        ip.showsyntaxerror = lambda *args, **kwargs: ipy_display_traceback(
            *args, is_syntax=True, **kwargs
        )

    try:  # pragma: no cover
        # if within ipython, use customized traceback
        ip = get_ipython()  # type: ignore[name-defined]
        ipy_excepthook_closure(ip)
        return sys.excepthook
    except Exception:
        # otherwise use default system hook
        old_excepthook = sys.excepthook
        sys.excepthook = excepthook
        return old_excepthook


@dataclass
class Frame:
    filename: str
    lineno: int
    name: str
    line: str = ""
    locals: Optional[Dict[str, pretty.Node]] = None


@dataclass
class _SyntaxError:
    offset: int
    filename: str
    line: str
    lineno: int
    msg: str


@dataclass
class Stack:
    exc_type: str
    exc_value: str
    syntax_error: Optional[_SyntaxError] = None
    is_cause: bool = False
    frames: List[Frame] = field(default_factory=list)


@dataclass
class Trace:
    stacks: List[Stack]


class PathHighlighter(RegexHighlighter):
    highlights = [r"(?P<dim>.*/)(?P<bold>.+)"]


class Traceback:
    """A Console renderable that renders a traceback.

    Args:
        trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses
            the last exception.
        width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
        extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
        theme (str, optional): Override pygments theme used in traceback.
        word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
        show_locals (bool, optional): Enable display of local variables. Defaults to False.
        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
        suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
        max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.

    """

    LEXERS = {
        "": "text",
        ".py": "python",
        ".pxd": "cython",
        ".pyx": "cython",
        ".pxi": "pyrex",
    }

    def __init__(
        self,
        trace: Optional[Trace] = None,
        *,
        width: Optional[int] = 100,
        extra_lines: int = 3,
        theme: Optional[str] = None,
        word_wrap: bool = False,
        show_locals: bool = False,
        locals_max_length: int = LOCALS_MAX_LENGTH,
        locals_max_string: int = LOCALS_MAX_STRING,
        locals_hide_dunder: bool = True,
        locals_hide_sunder: bool = False,
        indent_guides: bool = True,
        suppress: Iterable[Union[str, ModuleType]] = (),
        max_frames: int = 100,
    ):
        if trace is None:
            exc_type, exc_value, traceback = sys.exc_info()
            if exc_type is None or exc_value is None or traceback is None:
                raise ValueError(
                    "Value for 'trace' required if not called in except: block"
                )
            trace = self.extract(
                exc_type, exc_value, traceback, show_locals=show_locals
            )
        self.trace = trace
        self.width = width
        self.extra_lines = extra_lines
        self.theme = Syntax.get_theme(theme or "ansi_dark")
        self.word_wrap = word_wrap
        self.show_locals = show_locals
        self.indent_guides = indent_guides
        self.locals_max_length = locals_max_length
        self.locals_max_string = locals_max_string
        self.locals_hide_dunder = locals_hide_dunder
        self.locals_hide_sunder = locals_hide_sunder

        self.suppress: Sequence[str] = []
        for suppress_entity in suppress:
            if not isinstance(suppress_entity, str):
                assert (
                    suppress_entity.__file__ is not None
                ), f"{suppress_entity!r} must be a module with '__file__' attribute"
                path = os.path.dirname(suppress_entity.__file__)
            else:
                path = suppress_entity
            path = os.path.normpath(os.path.abspath(path))
            self.suppress.append(path)
        self.max_frames = max(4, max_frames) if max_frames > 0 else 0

    @classmethod
    def from_exception(
        cls,
        exc_type: Type[Any],
        exc_value: BaseException,
        traceback: Optional[TracebackType],
        *,
        width: Optional[int] = 100,
        extra_lines: int = 3,
        theme: Optional[str] = None,
        word_wrap: bool = False,
        show_locals: bool = False,
        locals_max_length: int = LOCALS_MAX_LENGTH,
        locals_max_string: int = LOCALS_MAX_STRING,
        locals_hide_dunder: bool = True,
        locals_hide_sunder: bool = False,
        indent_guides: bool = True,
        suppress: Iterable[Union[str, ModuleType]] = (),
        max_frames: int = 100,
    ) -> "Traceback":
        """Create a traceback from exception info

        Args:
            exc_type (Type[BaseException]): Exception type.
            exc_value (BaseException): Exception value.
            traceback (TracebackType): Python Traceback object.
            width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
            extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
            theme (str, optional): Override pygments theme used in traceback.
            word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
            show_locals (bool, optional): Enable display of local variables. Defaults to False.
            indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
                Defaults to 10.
            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
            suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
            max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.

        Returns:
            Traceback: A Traceback instance that may be printed.
        """
        rich_traceback = cls.extract(
            exc_type,
            exc_value,
            traceback,
            show_locals=show_locals,
            locals_max_length=locals_max_length,
            locals_max_string=locals_max_string,
            locals_hide_dunder=locals_hide_dunder,
            locals_hide_sunder=locals_hide_sunder,
        )

        return cls(
            rich_traceback,
            width=width,
            extra_lines=extra_lines,
            theme=theme,
            word_wrap=word_wrap,
            show_locals=show_locals,
            indent_guides=indent_guides,
            locals_max_length=locals_max_length,
            locals_max_string=locals_max_string,
            locals_hide_dunder=locals_hide_dunder,
            locals_hide_sunder=locals_hide_sunder,
            suppress=suppress,
            max_frames=max_frames,
        )

    @classmethod
    def extract(
        cls,
        exc_type: Type[BaseException],
        exc_value: BaseException,
        traceback: Optional[TracebackType],
        *,
        show_locals: bool = False,
        locals_max_length: int = LOCALS_MAX_LENGTH,
        locals_max_string: int = LOCALS_MAX_STRING,
        locals_hide_dunder: bool = True,
        locals_hide_sunder: bool = False,
    ) -> Trace:
        """Extract traceback information.

        Args:
            exc_type (Type[BaseException]): Exception type.
            exc_value (BaseException): Exception value.
            traceback (TracebackType): Python Traceback object.
            show_locals (bool, optional): Enable display of local variables. Defaults to False.
            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
                Defaults to 10.
            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.

        Returns:
            Trace: A Trace instance which you can use to construct a `Traceback`.
        """

        stacks: List[Stack] = []
        is_cause = False

        from pip._vendor.rich import _IMPORT_CWD

        def safe_str(_object: Any) -> str:
            """Don't allow exceptions from __str__ to propagate."""
            try:
                return str(_object)
            except Exception:
                return "<exception str() failed>"

        while True:
            stack = Stack(
                exc_type=safe_str(exc_type.__name__),
                exc_value=safe_str(exc_value),
                is_cause=is_cause,
            )

            if isinstance(exc_value, SyntaxError):
                stack.syntax_error = _SyntaxError(
                    offset=exc_value.offset or 0,
                    filename=exc_value.filename or "?",
                    lineno=exc_value.lineno or 0,
                    line=exc_value.text or "",
                    msg=exc_value.msg,
                )

            stacks.append(stack)
            append = stack.frames.append

            def get_locals(
                iter_locals: Iterable[Tuple[str, object]]
            ) -> Iterable[Tuple[str, object]]:
                """Extract locals from an iterator of key pairs."""
                if not (locals_hide_dunder or locals_hide_sunder):
                    yield from iter_locals
                    return
                for key, value in iter_locals:
                    if locals_hide_dunder and key.startswith("__"):
                        continue
                    if locals_hide_sunder and key.startswith("_"):
                        continue
                    yield key, value

            for frame_summary, line_no in walk_tb(traceback):
                filename = frame_summary.f_code.co_filename
                if filename and not filename.startswith("<"):
                    if not os.path.isabs(filename):
                        filename = os.path.join(_IMPORT_CWD, filename)
                if frame_summary.f_locals.get("_rich_traceback_omit", False):
                    continue

                frame = Frame(
                    filename=filename or "?",
                    lineno=line_no,
                    name=frame_summary.f_code.co_name,
                    locals={
                        key: pretty.traverse(
                            value,
                            max_length=locals_max_length,
                            max_string=locals_max_string,
                        )
                        for key, value in get_locals(frame_summary.f_locals.items())
                    }
                    if show_locals
                    else None,
                )
                append(frame)
                if frame_summary.f_locals.get("_rich_traceback_guard", False):
                    del stack.frames[:]

            cause = getattr(exc_value, "__cause__", None)
            if cause:
                exc_type = cause.__class__
                exc_value = cause
                # __traceback__ can be None, e.g. for exceptions raised by the
                # 'multiprocessing' module
                traceback = cause.__traceback__
                is_cause = True
                continue

            cause = exc_value.__context__
            if cause and not getattr(exc_value, "__suppress_context__", False):
                exc_type = cause.__class__
                exc_value = cause
                traceback = cause.__traceback__
                is_cause = False
                continue
            # No cover, code is reached but coverage doesn't recognize it.
            break  # pragma: no cover

        trace = Trace(stacks=stacks)
        return trace

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        theme = self.theme
        background_style = theme.get_background_style()
        token_style = theme.get_style_for_token

        traceback_theme = Theme(
            {
                "pretty": token_style(TextToken),
                "pygments.text": token_style(Token),
                "pygments.string": token_style(String),
                "pygments.function": token_style(Name.Function),
                "pygments.number": token_style(Number),
                "repr.indent": token_style(Comment) + Style(dim=True),
                "repr.str": token_style(String),
                "repr.brace": token_style(TextToken) + Style(bold=True),
                "repr.number": token_style(Number),
                "repr.bool_true": token_style(Keyword.Constant),
                "repr.bool_false": token_style(Keyword.Constant),
                "repr.none": token_style(Keyword.Constant),
                "scope.border": token_style(String.Delimiter),
                "scope.equals": token_style(Operator),
                "scope.key": token_style(Name),
                "scope.key.special": token_style(Name.Constant) + Style(dim=True),
            },
            inherit=False,
        )

        highlighter = ReprHighlighter()
        for last, stack in loop_last(reversed(self.trace.stacks)):
            if stack.frames:
                stack_renderable: ConsoleRenderable = Panel(
                    self._render_stack(stack),
                    title="[traceback.title]Traceback [dim](most recent call last)",
                    style=background_style,
                    border_style="traceback.border",
                    expand=True,
                    padding=(0, 1),
                )
                stack_renderable = Constrain(stack_renderable, self.width)
                with console.use_theme(traceback_theme):
                    yield stack_renderable
            if stack.syntax_error is not None:
                with console.use_theme(traceback_theme):
                    yield Constrain(
                        Panel(
                            self._render_syntax_error(stack.syntax_error),
                            style=background_style,
                            border_style="traceback.border.syntax_error",
                            expand=True,
                            padding=(0, 1),
                            width=self.width,
                        ),
                        self.width,
                    )
                yield Text.assemble(
                    (f"{stack.exc_type}: ", "traceback.exc_type"),
                    highlighter(stack.syntax_error.msg),
                )
            elif stack.exc_value:
                yield Text.assemble(
                    (f"{stack.exc_type}: ", "traceback.exc_type"),
                    highlighter(stack.exc_value),
                )
            else:
                yield Text.assemble((f"{stack.exc_type}", "traceback.exc_type"))

            if not last:
                if stack.is_cause:
                    yield Text.from_markup(
                        "\n[i]The above exception was the direct cause of the following exception:\n",
                    )
                else:
                    yield Text.from_markup(
                        "\n[i]During handling of the above exception, another exception occurred:\n",
                    )

    @group()
    def _render_syntax_error(self, syntax_error: _SyntaxError) -> RenderResult:
        highlighter = ReprHighlighter()
        path_highlighter = PathHighlighter()
        if syntax_error.filename != "<stdin>":
            if os.path.exists(syntax_error.filename):
                text = Text.assemble(
                    (f" {syntax_error.filename}", "pygments.string"),
                    (":", "pygments.text"),
                    (str(syntax_error.lineno), "pygments.number"),
                    style="pygments.text",
                )
                yield path_highlighter(text)
        syntax_error_text = highlighter(syntax_error.line.rstrip())
        syntax_error_text.no_wrap = True
        offset = min(syntax_error.offset - 1, len(syntax_error_text))
        syntax_error_text.stylize("bold underline", offset, offset)
        syntax_error_text += Text.from_markup(
            "\n" + " " * offset + "[traceback.offset]▲[/]",
            style="pygments.text",
        )
        yield syntax_error_text

    @classmethod
    def _guess_lexer(cls, filename: str, code: str) -> str:
        ext = os.path.splitext(filename)[-1]
        if not ext:
            # No extension, look at first line to see if it is a hashbang
            # Note, this is an educated guess and not a guarantee
            # If it fails, the only downside is that the code is highlighted strangely
            new_line_index = code.index("\n")
            first_line = code[:new_line_index] if new_line_index != -1 else code
            if first_line.startswith("#!") and "python" in first_line.lower():
                return "python"
        try:
            return cls.LEXERS.get(ext) or guess_lexer_for_filename(filename, code).name
        except ClassNotFound:
            return "text"

    @group()
    def _render_stack(self, stack: Stack) -> RenderResult:
        path_highlighter = PathHighlighter()
        theme = self.theme

        def read_code(filename: str) -> str:
            """Read files, and cache results on filename.

            Args:
                filename (str): Filename to read

            Returns:
                str: Contents of file
            """
            return "".join(linecache.getlines(filename))

        def render_locals(frame: Frame) -> Iterable[ConsoleRenderable]:
            if frame.locals:
                yield render_scope(
                    frame.locals,
                    title="locals",
                    indent_guides=self.indent_guides,
                    max_length=self.locals_max_length,
                    max_string=self.locals_max_string,
                )

        exclude_frames: Optional[range] = None
        if self.max_frames != 0:
            exclude_frames = range(
                self.max_frames // 2,
                len(stack.frames) - self.max_frames // 2,
            )

        excluded = False
        for frame_index, frame in enumerate(stack.frames):

            if exclude_frames and frame_index in exclude_frames:
                excluded = True
                continue

            if excluded:
                assert exclude_frames is not None
                yield Text(
                    f"\n... {len(exclude_frames)} frames hidden ...",
                    justify="center",
                    style="traceback.error",
                )
                excluded = False

            first = frame_index == 0
            frame_filename = frame.filename
            suppressed = any(frame_filename.startswith(path) for path in self.suppress)

            if os.path.exists(frame.filename):
                text = Text.assemble(
                    path_highlighter(Text(frame.filename, style="pygments.string")),
                    (":", "pygments.text"),
                    (str(frame.lineno), "pygments.number"),
                    " in ",
                    (frame.name, "pygments.function"),
                    style="pygments.text",
                )
            else:
                text = Text.assemble(
                    "in ",
                    (frame.name, "pygments.function"),
                    (":", "pygments.text"),
                    (str(frame.lineno), "pygments.number"),
                    style="pygments.text",
                )
            if not frame.filename.startswith("<") and not first:
                yield ""
            yield text
            if frame.filename.startswith("<"):
                yield from render_locals(frame)
                continue
            if not suppressed:
                try:
                    code = read_code(frame.filename)
                    if not code:
                        # code may be an empty string if the file doesn't exist, OR
                        # if the traceback filename is generated dynamically
                        continue
                    lexer_name = self._guess_lexer(frame.filename, code)
                    syntax = Syntax(
                        code,
                        lexer_name,
                        theme=theme,
                        line_numbers=True,
                        line_range=(
                            frame.lineno - self.extra_lines,
                            frame.lineno + self.extra_lines,
                        ),
                        highlight_lines={frame.lineno},
                        word_wrap=self.word_wrap,
                        code_width=88,
                        indent_guides=self.indent_guides,
                        dedent=False,
                    )
                    yield ""
                except Exception as error:
                    yield Text.assemble(
                        (f"\n{error}", "traceback.error"),
                    )
                else:
                    yield (
                        Columns(
                            [
                                syntax,
                                *render_locals(frame),
                            ],
                            padding=1,
                        )
                        if frame.locals
                        else syntax
                    )


if __name__ == "__main__":  # pragma: no cover

    from .console import Console

    console = Console()
    import sys

    def bar(a: Any) -> None:  # 这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑
        one = 1
        print(one / a)

    def foo(a: Any) -> None:
        _rich_traceback_guard = True
        zed = {
            "characters": {
                "Paul Atreides",
                "Vladimir Harkonnen",
                "Thufir Hawat",
                "Duncan Idaho",
            },
            "atomic_types": (None, False, True),
        }
        bar(a)

    def error() -> None:

        try:
            try:
                foo(0)
            except:
                slfkjsldkfj  # type: ignore[name-defined]
        except:
            console.print_exception(show_locals=True)

    error()
python3.12/site-packages/pip/_vendor/rich/screen.py000064400000003067151732702110016120 0ustar00from typing import Optional, TYPE_CHECKING

from .segment import Segment
from .style import StyleType
from ._loop import loop_last


if TYPE_CHECKING:
    from .console import (
        Console,
        ConsoleOptions,
        RenderResult,
        RenderableType,
        Group,
    )


class Screen:
    """A renderable that fills the terminal screen and crops excess.

    Args:
        renderable (RenderableType): Child renderable.
        style (StyleType, optional): Optional background style. Defaults to None.
    """

    renderable: "RenderableType"

    def __init__(
        self,
        *renderables: "RenderableType",
        style: Optional[StyleType] = None,
        application_mode: bool = False,
    ) -> None:
        from pip._vendor.rich.console import Group

        self.renderable = Group(*renderables)
        self.style = style
        self.application_mode = application_mode

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        width, height = options.size
        style = console.get_style(self.style) if self.style else None
        render_options = options.update(width=width, height=height)
        lines = console.render_lines(
            self.renderable or "", render_options, style=style, pad=True
        )
        lines = Segment.set_shape(lines, width, height, style=style)
        new_line = Segment("\n\r") if self.application_mode else Segment.line()
        for last, line in loop_last(lines):
            yield from line
            if not last:
                yield new_line
python3.12/site-packages/pip/_vendor/rich/progress_bar.py000064400000017745151732702110017341 0ustar00import math
from functools import lru_cache
from time import monotonic
from typing import Iterable, List, Optional

from .color import Color, blend_rgb
from .color_triplet import ColorTriplet
from .console import Console, ConsoleOptions, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment
from .style import Style, StyleType

# Number of characters before 'pulse' animation repeats
PULSE_SIZE = 20


class ProgressBar(JupyterMixin):
    """Renders a (progress) bar. Used by rich.progress.

    Args:
        total (float, optional): Number of steps in the bar. Defaults to 100. Set to None to render a pulsing animation.
        completed (float, optional): Number of steps completed. Defaults to 0.
        width (int, optional): Width of the bar, or ``None`` for maximum width. Defaults to None.
        pulse (bool, optional): Enable pulse effect. Defaults to False. Will pulse if a None total was passed.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        animation_time (Optional[float], optional): Time in seconds to use for animation, or None to use system time.
    """

    def __init__(
        self,
        total: Optional[float] = 100.0,
        completed: float = 0,
        width: Optional[int] = None,
        pulse: bool = False,
        style: StyleType = "bar.back",
        complete_style: StyleType = "bar.complete",
        finished_style: StyleType = "bar.finished",
        pulse_style: StyleType = "bar.pulse",
        animation_time: Optional[float] = None,
    ):
        self.total = total
        self.completed = completed
        self.width = width
        self.pulse = pulse
        self.style = style
        self.complete_style = complete_style
        self.finished_style = finished_style
        self.pulse_style = pulse_style
        self.animation_time = animation_time

        self._pulse_segments: Optional[List[Segment]] = None

    def __repr__(self) -> str:
        return f"<Bar {self.completed!r} of {self.total!r}>"

    @property
    def percentage_completed(self) -> Optional[float]:
        """Calculate percentage complete."""
        if self.total is None:
            return None
        completed = (self.completed / self.total) * 100.0
        completed = min(100, max(0.0, completed))
        return completed

    @lru_cache(maxsize=16)
    def _get_pulse_segments(
        self,
        fore_style: Style,
        back_style: Style,
        color_system: str,
        no_color: bool,
        ascii: bool = False,
    ) -> List[Segment]:
        """Get a list of segments to render a pulse animation.

        Returns:
            List[Segment]: A list of segments, one segment per character.
        """
        bar = "-" if ascii else "━"
        segments: List[Segment] = []
        if color_system not in ("standard", "eight_bit", "truecolor") or no_color:
            segments += [Segment(bar, fore_style)] * (PULSE_SIZE // 2)
            segments += [Segment(" " if no_color else bar, back_style)] * (
                PULSE_SIZE - (PULSE_SIZE // 2)
            )
            return segments

        append = segments.append
        fore_color = (
            fore_style.color.get_truecolor()
            if fore_style.color
            else ColorTriplet(255, 0, 255)
        )
        back_color = (
            back_style.color.get_truecolor()
            if back_style.color
            else ColorTriplet(0, 0, 0)
        )
        cos = math.cos
        pi = math.pi
        _Segment = Segment
        _Style = Style
        from_triplet = Color.from_triplet

        for index in range(PULSE_SIZE):
            position = index / PULSE_SIZE
            fade = 0.5 + cos((position * pi * 2)) / 2.0
            color = blend_rgb(fore_color, back_color, cross_fade=fade)
            append(_Segment(bar, _Style(color=from_triplet(color))))
        return segments

    def update(self, completed: float, total: Optional[float] = None) -> None:
        """Update progress with new values.

        Args:
            completed (float): Number of steps completed.
            total (float, optional): Total number of steps, or ``None`` to not change. Defaults to None.
        """
        self.completed = completed
        self.total = total if total is not None else self.total

    def _render_pulse(
        self, console: Console, width: int, ascii: bool = False
    ) -> Iterable[Segment]:
        """Renders the pulse animation.

        Args:
            console (Console): Console instance.
            width (int): Width in characters of pulse animation.

        Returns:
            RenderResult: [description]

        Yields:
            Iterator[Segment]: Segments to render pulse
        """
        fore_style = console.get_style(self.pulse_style, default="white")
        back_style = console.get_style(self.style, default="black")

        pulse_segments = self._get_pulse_segments(
            fore_style, back_style, console.color_system, console.no_color, ascii=ascii
        )
        segment_count = len(pulse_segments)
        current_time = (
            monotonic() if self.animation_time is None else self.animation_time
        )
        segments = pulse_segments * (int(width / segment_count) + 2)
        offset = int(-current_time * 15) % segment_count
        segments = segments[offset : offset + width]
        yield from segments

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:

        width = min(self.width or options.max_width, options.max_width)
        ascii = options.legacy_windows or options.ascii_only
        should_pulse = self.pulse or self.total is None
        if should_pulse:
            yield from self._render_pulse(console, width, ascii=ascii)
            return

        completed: Optional[float] = (
            min(self.total, max(0, self.completed)) if self.total is not None else None
        )

        bar = "-" if ascii else "━"
        half_bar_right = " " if ascii else "╸"
        half_bar_left = " " if ascii else "╺"
        complete_halves = (
            int(width * 2 * completed / self.total)
            if self.total and completed is not None
            else width * 2
        )
        bar_count = complete_halves // 2
        half_bar_count = complete_halves % 2
        style = console.get_style(self.style)
        is_finished = self.total is None or self.completed >= self.total
        complete_style = console.get_style(
            self.finished_style if is_finished else self.complete_style
        )
        _Segment = Segment
        if bar_count:
            yield _Segment(bar * bar_count, complete_style)
        if half_bar_count:
            yield _Segment(half_bar_right * half_bar_count, complete_style)

        if not console.no_color:
            remaining_bars = width - bar_count - half_bar_count
            if remaining_bars and console.color_system is not None:
                if not half_bar_count and bar_count:
                    yield _Segment(half_bar_left, style)
                    remaining_bars -= 1
                if remaining_bars:
                    yield _Segment(bar * remaining_bars, style)

    def __rich_measure__(
        self, console: Console, options: ConsoleOptions
    ) -> Measurement:
        return (
            Measurement(self.width, self.width)
            if self.width is not None
            else Measurement(4, options.max_width)
        )


if __name__ == "__main__":  # pragma: no cover
    console = Console()
    bar = ProgressBar(width=50, total=100)

    import time

    console.show_cursor(False)
    for n in range(0, 101, 1):
        bar.update(n)
        console.print(bar)
        console.file.write("\r")
        time.sleep(0.05)
    console.show_cursor(True)
    console.print()
python3.12/site-packages/pip/_vendor/rich/_cell_widths.py000064400000023560151732702120017302 0ustar00# Auto generated by make_terminal_widths.py

CELL_WIDTHS = [
    (0, 0, 0),
    (1, 31, -1),
    (127, 159, -1),
    (768, 879, 0),
    (1155, 1161, 0),
    (1425, 1469, 0),
    (1471, 1471, 0),
    (1473, 1474, 0),
    (1476, 1477, 0),
    (1479, 1479, 0),
    (1552, 1562, 0),
    (1611, 1631, 0),
    (1648, 1648, 0),
    (1750, 1756, 0),
    (1759, 1764, 0),
    (1767, 1768, 0),
    (1770, 1773, 0),
    (1809, 1809, 0),
    (1840, 1866, 0),
    (1958, 1968, 0),
    (2027, 2035, 0),
    (2045, 2045, 0),
    (2070, 2073, 0),
    (2075, 2083, 0),
    (2085, 2087, 0),
    (2089, 2093, 0),
    (2137, 2139, 0),
    (2259, 2273, 0),
    (2275, 2306, 0),
    (2362, 2362, 0),
    (2364, 2364, 0),
    (2369, 2376, 0),
    (2381, 2381, 0),
    (2385, 2391, 0),
    (2402, 2403, 0),
    (2433, 2433, 0),
    (2492, 2492, 0),
    (2497, 2500, 0),
    (2509, 2509, 0),
    (2530, 2531, 0),
    (2558, 2558, 0),
    (2561, 2562, 0),
    (2620, 2620, 0),
    (2625, 2626, 0),
    (2631, 2632, 0),
    (2635, 2637, 0),
    (2641, 2641, 0),
    (2672, 2673, 0),
    (2677, 2677, 0),
    (2689, 2690, 0),
    (2748, 2748, 0),
    (2753, 2757, 0),
    (2759, 2760, 0),
    (2765, 2765, 0),
    (2786, 2787, 0),
    (2810, 2815, 0),
    (2817, 2817, 0),
    (2876, 2876, 0),
    (2879, 2879, 0),
    (2881, 2884, 0),
    (2893, 2893, 0),
    (2901, 2902, 0),
    (2914, 2915, 0),
    (2946, 2946, 0),
    (3008, 3008, 0),
    (3021, 3021, 0),
    (3072, 3072, 0),
    (3076, 3076, 0),
    (3134, 3136, 0),
    (3142, 3144, 0),
    (3146, 3149, 0),
    (3157, 3158, 0),
    (3170, 3171, 0),
    (3201, 3201, 0),
    (3260, 3260, 0),
    (3263, 3263, 0),
    (3270, 3270, 0),
    (3276, 3277, 0),
    (3298, 3299, 0),
    (3328, 3329, 0),
    (3387, 3388, 0),
    (3393, 3396, 0),
    (3405, 3405, 0),
    (3426, 3427, 0),
    (3457, 3457, 0),
    (3530, 3530, 0),
    (3538, 3540, 0),
    (3542, 3542, 0),
    (3633, 3633, 0),
    (3636, 3642, 0),
    (3655, 3662, 0),
    (3761, 3761, 0),
    (3764, 3772, 0),
    (3784, 3789, 0),
    (3864, 3865, 0),
    (3893, 3893, 0),
    (3895, 3895, 0),
    (3897, 3897, 0),
    (3953, 3966, 0),
    (3968, 3972, 0),
    (3974, 3975, 0),
    (3981, 3991, 0),
    (3993, 4028, 0),
    (4038, 4038, 0),
    (4141, 4144, 0),
    (4146, 4151, 0),
    (4153, 4154, 0),
    (4157, 4158, 0),
    (4184, 4185, 0),
    (4190, 4192, 0),
    (4209, 4212, 0),
    (4226, 4226, 0),
    (4229, 4230, 0),
    (4237, 4237, 0),
    (4253, 4253, 0),
    (4352, 4447, 2),
    (4957, 4959, 0),
    (5906, 5908, 0),
    (5938, 5940, 0),
    (5970, 5971, 0),
    (6002, 6003, 0),
    (6068, 6069, 0),
    (6071, 6077, 0),
    (6086, 6086, 0),
    (6089, 6099, 0),
    (6109, 6109, 0),
    (6155, 6157, 0),
    (6277, 6278, 0),
    (6313, 6313, 0),
    (6432, 6434, 0),
    (6439, 6440, 0),
    (6450, 6450, 0),
    (6457, 6459, 0),
    (6679, 6680, 0),
    (6683, 6683, 0),
    (6742, 6742, 0),
    (6744, 6750, 0),
    (6752, 6752, 0),
    (6754, 6754, 0),
    (6757, 6764, 0),
    (6771, 6780, 0),
    (6783, 6783, 0),
    (6832, 6848, 0),
    (6912, 6915, 0),
    (6964, 6964, 0),
    (6966, 6970, 0),
    (6972, 6972, 0),
    (6978, 6978, 0),
    (7019, 7027, 0),
    (7040, 7041, 0),
    (7074, 7077, 0),
    (7080, 7081, 0),
    (7083, 7085, 0),
    (7142, 7142, 0),
    (7144, 7145, 0),
    (7149, 7149, 0),
    (7151, 7153, 0),
    (7212, 7219, 0),
    (7222, 7223, 0),
    (7376, 7378, 0),
    (7380, 7392, 0),
    (7394, 7400, 0),
    (7405, 7405, 0),
    (7412, 7412, 0),
    (7416, 7417, 0),
    (7616, 7673, 0),
    (7675, 7679, 0),
    (8203, 8207, 0),
    (8232, 8238, 0),
    (8288, 8291, 0),
    (8400, 8432, 0),
    (8986, 8987, 2),
    (9001, 9002, 2),
    (9193, 9196, 2),
    (9200, 9200, 2),
    (9203, 9203, 2),
    (9725, 9726, 2),
    (9748, 9749, 2),
    (9800, 9811, 2),
    (9855, 9855, 2),
    (9875, 9875, 2),
    (9889, 9889, 2),
    (9898, 9899, 2),
    (9917, 9918, 2),
    (9924, 9925, 2),
    (9934, 9934, 2),
    (9940, 9940, 2),
    (9962, 9962, 2),
    (9970, 9971, 2),
    (9973, 9973, 2),
    (9978, 9978, 2),
    (9981, 9981, 2),
    (9989, 9989, 2),
    (9994, 9995, 2),
    (10024, 10024, 2),
    (10060, 10060, 2),
    (10062, 10062, 2),
    (10067, 10069, 2),
    (10071, 10071, 2),
    (10133, 10135, 2),
    (10160, 10160, 2),
    (10175, 10175, 2),
    (11035, 11036, 2),
    (11088, 11088, 2),
    (11093, 11093, 2),
    (11503, 11505, 0),
    (11647, 11647, 0),
    (11744, 11775, 0),
    (11904, 11929, 2),
    (11931, 12019, 2),
    (12032, 12245, 2),
    (12272, 12283, 2),
    (12288, 12329, 2),
    (12330, 12333, 0),
    (12334, 12350, 2),
    (12353, 12438, 2),
    (12441, 12442, 0),
    (12443, 12543, 2),
    (12549, 12591, 2),
    (12593, 12686, 2),
    (12688, 12771, 2),
    (12784, 12830, 2),
    (12832, 12871, 2),
    (12880, 19903, 2),
    (19968, 42124, 2),
    (42128, 42182, 2),
    (42607, 42610, 0),
    (42612, 42621, 0),
    (42654, 42655, 0),
    (42736, 42737, 0),
    (43010, 43010, 0),
    (43014, 43014, 0),
    (43019, 43019, 0),
    (43045, 43046, 0),
    (43052, 43052, 0),
    (43204, 43205, 0),
    (43232, 43249, 0),
    (43263, 43263, 0),
    (43302, 43309, 0),
    (43335, 43345, 0),
    (43360, 43388, 2),
    (43392, 43394, 0),
    (43443, 43443, 0),
    (43446, 43449, 0),
    (43452, 43453, 0),
    (43493, 43493, 0),
    (43561, 43566, 0),
    (43569, 43570, 0),
    (43573, 43574, 0),
    (43587, 43587, 0),
    (43596, 43596, 0),
    (43644, 43644, 0),
    (43696, 43696, 0),
    (43698, 43700, 0),
    (43703, 43704, 0),
    (43710, 43711, 0),
    (43713, 43713, 0),
    (43756, 43757, 0),
    (43766, 43766, 0),
    (44005, 44005, 0),
    (44008, 44008, 0),
    (44013, 44013, 0),
    (44032, 55203, 2),
    (63744, 64255, 2),
    (64286, 64286, 0),
    (65024, 65039, 0),
    (65040, 65049, 2),
    (65056, 65071, 0),
    (65072, 65106, 2),
    (65108, 65126, 2),
    (65128, 65131, 2),
    (65281, 65376, 2),
    (65504, 65510, 2),
    (66045, 66045, 0),
    (66272, 66272, 0),
    (66422, 66426, 0),
    (68097, 68099, 0),
    (68101, 68102, 0),
    (68108, 68111, 0),
    (68152, 68154, 0),
    (68159, 68159, 0),
    (68325, 68326, 0),
    (68900, 68903, 0),
    (69291, 69292, 0),
    (69446, 69456, 0),
    (69633, 69633, 0),
    (69688, 69702, 0),
    (69759, 69761, 0),
    (69811, 69814, 0),
    (69817, 69818, 0),
    (69888, 69890, 0),
    (69927, 69931, 0),
    (69933, 69940, 0),
    (70003, 70003, 0),
    (70016, 70017, 0),
    (70070, 70078, 0),
    (70089, 70092, 0),
    (70095, 70095, 0),
    (70191, 70193, 0),
    (70196, 70196, 0),
    (70198, 70199, 0),
    (70206, 70206, 0),
    (70367, 70367, 0),
    (70371, 70378, 0),
    (70400, 70401, 0),
    (70459, 70460, 0),
    (70464, 70464, 0),
    (70502, 70508, 0),
    (70512, 70516, 0),
    (70712, 70719, 0),
    (70722, 70724, 0),
    (70726, 70726, 0),
    (70750, 70750, 0),
    (70835, 70840, 0),
    (70842, 70842, 0),
    (70847, 70848, 0),
    (70850, 70851, 0),
    (71090, 71093, 0),
    (71100, 71101, 0),
    (71103, 71104, 0),
    (71132, 71133, 0),
    (71219, 71226, 0),
    (71229, 71229, 0),
    (71231, 71232, 0),
    (71339, 71339, 0),
    (71341, 71341, 0),
    (71344, 71349, 0),
    (71351, 71351, 0),
    (71453, 71455, 0),
    (71458, 71461, 0),
    (71463, 71467, 0),
    (71727, 71735, 0),
    (71737, 71738, 0),
    (71995, 71996, 0),
    (71998, 71998, 0),
    (72003, 72003, 0),
    (72148, 72151, 0),
    (72154, 72155, 0),
    (72160, 72160, 0),
    (72193, 72202, 0),
    (72243, 72248, 0),
    (72251, 72254, 0),
    (72263, 72263, 0),
    (72273, 72278, 0),
    (72281, 72283, 0),
    (72330, 72342, 0),
    (72344, 72345, 0),
    (72752, 72758, 0),
    (72760, 72765, 0),
    (72767, 72767, 0),
    (72850, 72871, 0),
    (72874, 72880, 0),
    (72882, 72883, 0),
    (72885, 72886, 0),
    (73009, 73014, 0),
    (73018, 73018, 0),
    (73020, 73021, 0),
    (73023, 73029, 0),
    (73031, 73031, 0),
    (73104, 73105, 0),
    (73109, 73109, 0),
    (73111, 73111, 0),
    (73459, 73460, 0),
    (92912, 92916, 0),
    (92976, 92982, 0),
    (94031, 94031, 0),
    (94095, 94098, 0),
    (94176, 94179, 2),
    (94180, 94180, 0),
    (94192, 94193, 2),
    (94208, 100343, 2),
    (100352, 101589, 2),
    (101632, 101640, 2),
    (110592, 110878, 2),
    (110928, 110930, 2),
    (110948, 110951, 2),
    (110960, 111355, 2),
    (113821, 113822, 0),
    (119143, 119145, 0),
    (119163, 119170, 0),
    (119173, 119179, 0),
    (119210, 119213, 0),
    (119362, 119364, 0),
    (121344, 121398, 0),
    (121403, 121452, 0),
    (121461, 121461, 0),
    (121476, 121476, 0),
    (121499, 121503, 0),
    (121505, 121519, 0),
    (122880, 122886, 0),
    (122888, 122904, 0),
    (122907, 122913, 0),
    (122915, 122916, 0),
    (122918, 122922, 0),
    (123184, 123190, 0),
    (123628, 123631, 0),
    (125136, 125142, 0),
    (125252, 125258, 0),
    (126980, 126980, 2),
    (127183, 127183, 2),
    (127374, 127374, 2),
    (127377, 127386, 2),
    (127488, 127490, 2),
    (127504, 127547, 2),
    (127552, 127560, 2),
    (127568, 127569, 2),
    (127584, 127589, 2),
    (127744, 127776, 2),
    (127789, 127797, 2),
    (127799, 127868, 2),
    (127870, 127891, 2),
    (127904, 127946, 2),
    (127951, 127955, 2),
    (127968, 127984, 2),
    (127988, 127988, 2),
    (127992, 128062, 2),
    (128064, 128064, 2),
    (128066, 128252, 2),
    (128255, 128317, 2),
    (128331, 128334, 2),
    (128336, 128359, 2),
    (128378, 128378, 2),
    (128405, 128406, 2),
    (128420, 128420, 2),
    (128507, 128591, 2),
    (128640, 128709, 2),
    (128716, 128716, 2),
    (128720, 128722, 2),
    (128725, 128727, 2),
    (128747, 128748, 2),
    (128756, 128764, 2),
    (128992, 129003, 2),
    (129292, 129338, 2),
    (129340, 129349, 2),
    (129351, 129400, 2),
    (129402, 129483, 2),
    (129485, 129535, 2),
    (129648, 129652, 2),
    (129656, 129658, 2),
    (129664, 129670, 2),
    (129680, 129704, 2),
    (129712, 129718, 2),
    (129728, 129730, 2),
    (129744, 129750, 2),
    (131072, 196605, 2),
    (196608, 262141, 2),
    (917760, 917999, 0),
]
python3.12/site-packages/pip/_vendor/rich/measure.py000064400000012271151732702120016300 0ustar00from operator import itemgetter
from typing import TYPE_CHECKING, Callable, NamedTuple, Optional, Sequence

from . import errors
from .protocol import is_renderable, rich_cast

if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderableType


class Measurement(NamedTuple):
    """Stores the minimum and maximum widths (in characters) required to render an object."""

    minimum: int
    """Minimum number of cells required to render."""
    maximum: int
    """Maximum number of cells required to render."""

    @property
    def span(self) -> int:
        """Get difference between maximum and minimum."""
        return self.maximum - self.minimum

    def normalize(self) -> "Measurement":
        """Get measurement that ensures that minimum <= maximum and minimum >= 0

        Returns:
            Measurement: A normalized measurement.
        """
        minimum, maximum = self
        minimum = min(max(0, minimum), maximum)
        return Measurement(max(0, minimum), max(0, max(minimum, maximum)))

    def with_maximum(self, width: int) -> "Measurement":
        """Get a RenderableWith where the widths are <= width.

        Args:
            width (int): Maximum desired width.

        Returns:
            Measurement: New Measurement object.
        """
        minimum, maximum = self
        return Measurement(min(minimum, width), min(maximum, width))

    def with_minimum(self, width: int) -> "Measurement":
        """Get a RenderableWith where the widths are >= width.

        Args:
            width (int): Minimum desired width.

        Returns:
            Measurement: New Measurement object.
        """
        minimum, maximum = self
        width = max(0, width)
        return Measurement(max(minimum, width), max(maximum, width))

    def clamp(
        self, min_width: Optional[int] = None, max_width: Optional[int] = None
    ) -> "Measurement":
        """Clamp a measurement within the specified range.

        Args:
            min_width (int): Minimum desired width, or ``None`` for no minimum. Defaults to None.
            max_width (int): Maximum desired width, or ``None`` for no maximum. Defaults to None.

        Returns:
            Measurement: New Measurement object.
        """
        measurement = self
        if min_width is not None:
            measurement = measurement.with_minimum(min_width)
        if max_width is not None:
            measurement = measurement.with_maximum(max_width)
        return measurement

    @classmethod
    def get(
        cls, console: "Console", options: "ConsoleOptions", renderable: "RenderableType"
    ) -> "Measurement":
        """Get a measurement for a renderable.

        Args:
            console (~rich.console.Console): Console instance.
            options (~rich.console.ConsoleOptions): Console options.
            renderable (RenderableType): An object that may be rendered with Rich.

        Raises:
            errors.NotRenderableError: If the object is not renderable.

        Returns:
            Measurement: Measurement object containing range of character widths required to render the object.
        """
        _max_width = options.max_width
        if _max_width < 1:
            return Measurement(0, 0)
        if isinstance(renderable, str):
            renderable = console.render_str(
                renderable, markup=options.markup, highlight=False
            )
        renderable = rich_cast(renderable)
        if is_renderable(renderable):
            get_console_width: Optional[
                Callable[["Console", "ConsoleOptions"], "Measurement"]
            ] = getattr(renderable, "__rich_measure__", None)
            if get_console_width is not None:
                render_width = (
                    get_console_width(console, options)
                    .normalize()
                    .with_maximum(_max_width)
                )
                if render_width.maximum < 1:
                    return Measurement(0, 0)
                return render_width.normalize()
            else:
                return Measurement(0, _max_width)
        else:
            raise errors.NotRenderableError(
                f"Unable to get render width for {renderable!r}; "
                "a str, Segment, or object with __rich_console__ method is required"
            )


def measure_renderables(
    console: "Console",
    options: "ConsoleOptions",
    renderables: Sequence["RenderableType"],
) -> "Measurement":
    """Get a measurement that would fit a number of renderables.

    Args:
        console (~rich.console.Console): Console instance.
        options (~rich.console.ConsoleOptions): Console options.
        renderables (Iterable[RenderableType]): One or more renderable objects.

    Returns:
        Measurement: Measurement object containing range of character widths required to
            contain all given renderables.
    """
    if not renderables:
        return Measurement(0, 0)
    get_measurement = Measurement.get
    measurements = [
        get_measurement(console, options, renderable) for renderable in renderables
    ]
    measured_width = Measurement(
        max(measurements, key=itemgetter(0)).minimum,
        max(measurements, key=itemgetter(1)).maximum,
    )
    return measured_width
python3.12/site-packages/pip/_vendor/rich/_ratio.py000064400000012540151732702120016113 0ustar00import sys
from fractions import Fraction
from math import ceil
from typing import cast, List, Optional, Sequence

if sys.version_info >= (3, 8):
    from typing import Protocol
else:
    from pip._vendor.typing_extensions import Protocol  # pragma: no cover


class Edge(Protocol):
    """Any object that defines an edge (such as Layout)."""

    size: Optional[int] = None
    ratio: int = 1
    minimum_size: int = 1


def ratio_resolve(total: int, edges: Sequence[Edge]) -> List[int]:
    """Divide total space to satisfy size, ratio, and minimum_size, constraints.

    The returned list of integers should add up to total in most cases, unless it is
    impossible to satisfy all the constraints. For instance, if there are two edges
    with a minimum size of 20 each and `total` is 30 then the returned list will be
    greater than total. In practice, this would mean that a Layout object would
    clip the rows that would overflow the screen height.

    Args:
        total (int): Total number of characters.
        edges (List[Edge]): Edges within total space.

    Returns:
        List[int]: Number of characters for each edge.
    """
    # Size of edge or None for yet to be determined
    sizes = [(edge.size or None) for edge in edges]

    _Fraction = Fraction

    # While any edges haven't been calculated
    while None in sizes:
        # Get flexible edges and index to map these back on to sizes list
        flexible_edges = [
            (index, edge)
            for index, (size, edge) in enumerate(zip(sizes, edges))
            if size is None
        ]
        # Remaining space in total
        remaining = total - sum(size or 0 for size in sizes)
        if remaining <= 0:
            # No room for flexible edges
            return [
                ((edge.minimum_size or 1) if size is None else size)
                for size, edge in zip(sizes, edges)
            ]
        # Calculate number of characters in a ratio portion
        portion = _Fraction(
            remaining, sum((edge.ratio or 1) for _, edge in flexible_edges)
        )

        # If any edges will be less than their minimum, replace size with the minimum
        for index, edge in flexible_edges:
            if portion * edge.ratio <= edge.minimum_size:
                sizes[index] = edge.minimum_size
                # New fixed size will invalidate calculations, so we need to repeat the process
                break
        else:
            # Distribute flexible space and compensate for rounding error
            # Since edge sizes can only be integers we need to add the remainder
            # to the following line
            remainder = _Fraction(0)
            for index, edge in flexible_edges:
                size, remainder = divmod(portion * edge.ratio + remainder, 1)
                sizes[index] = size
            break
    # Sizes now contains integers only
    return cast(List[int], sizes)


def ratio_reduce(
    total: int, ratios: List[int], maximums: List[int], values: List[int]
) -> List[int]:
    """Divide an integer total in to parts based on ratios.

    Args:
        total (int): The total to divide.
        ratios (List[int]): A list of integer ratios.
        maximums (List[int]): List of maximums values for each slot.
        values (List[int]): List of values

    Returns:
        List[int]: A list of integers guaranteed to sum to total.
    """
    ratios = [ratio if _max else 0 for ratio, _max in zip(ratios, maximums)]
    total_ratio = sum(ratios)
    if not total_ratio:
        return values[:]
    total_remaining = total
    result: List[int] = []
    append = result.append
    for ratio, maximum, value in zip(ratios, maximums, values):
        if ratio and total_ratio > 0:
            distributed = min(maximum, round(ratio * total_remaining / total_ratio))
            append(value - distributed)
            total_remaining -= distributed
            total_ratio -= ratio
        else:
            append(value)
    return result


def ratio_distribute(
    total: int, ratios: List[int], minimums: Optional[List[int]] = None
) -> List[int]:
    """Distribute an integer total in to parts based on ratios.

    Args:
        total (int): The total to divide.
        ratios (List[int]): A list of integer ratios.
        minimums (List[int]): List of minimum values for each slot.

    Returns:
        List[int]: A list of integers guaranteed to sum to total.
    """
    if minimums:
        ratios = [ratio if _min else 0 for ratio, _min in zip(ratios, minimums)]
    total_ratio = sum(ratios)
    assert total_ratio > 0, "Sum of ratios must be > 0"

    total_remaining = total
    distributed_total: List[int] = []
    append = distributed_total.append
    if minimums is None:
        _minimums = [0] * len(ratios)
    else:
        _minimums = minimums
    for ratio, minimum in zip(ratios, _minimums):
        if total_ratio > 0:
            distributed = max(minimum, ceil(ratio * total_remaining / total_ratio))
        else:
            distributed = total_remaining
        append(distributed)
        total_ratio -= ratio
        total_remaining -= distributed
    return distributed_total


if __name__ == "__main__":
    from dataclasses import dataclass

    @dataclass
    class E:

        size: Optional[int] = None
        ratio: int = 1
        minimum_size: int = 1

    resolved = ratio_resolve(110, [E(None, 1, 1), E(None, 1, 1), E(None, 1, 1)])
    print(sum(resolved))
python3.12/site-packages/pip/_vendor/rich/_windows_renderer.py000064400000005337151732702130020364 0ustar00from typing import Iterable, Sequence, Tuple, cast

from pip._vendor.rich._win32_console import LegacyWindowsTerm, WindowsCoordinates
from pip._vendor.rich.segment import ControlCode, ControlType, Segment


def legacy_windows_render(buffer: Iterable[Segment], term: LegacyWindowsTerm) -> None:
    """Makes appropriate Windows Console API calls based on the segments in the buffer.

    Args:
        buffer (Iterable[Segment]): Iterable of Segments to convert to Win32 API calls.
        term (LegacyWindowsTerm): Used to call the Windows Console API.
    """
    for text, style, control in buffer:
        if not control:
            if style:
                term.write_styled(text, style)
            else:
                term.write_text(text)
        else:
            control_codes: Sequence[ControlCode] = control
            for control_code in control_codes:
                control_type = control_code[0]
                if control_type == ControlType.CURSOR_MOVE_TO:
                    _, x, y = cast(Tuple[ControlType, int, int], control_code)
                    term.move_cursor_to(WindowsCoordinates(row=y - 1, col=x - 1))
                elif control_type == ControlType.CARRIAGE_RETURN:
                    term.write_text("\r")
                elif control_type == ControlType.HOME:
                    term.move_cursor_to(WindowsCoordinates(0, 0))
                elif control_type == ControlType.CURSOR_UP:
                    term.move_cursor_up()
                elif control_type == ControlType.CURSOR_DOWN:
                    term.move_cursor_down()
                elif control_type == ControlType.CURSOR_FORWARD:
                    term.move_cursor_forward()
                elif control_type == ControlType.CURSOR_BACKWARD:
                    term.move_cursor_backward()
                elif control_type == ControlType.CURSOR_MOVE_TO_COLUMN:
                    _, column = cast(Tuple[ControlType, int], control_code)
                    term.move_cursor_to_column(column - 1)
                elif control_type == ControlType.HIDE_CURSOR:
                    term.hide_cursor()
                elif control_type == ControlType.SHOW_CURSOR:
                    term.show_cursor()
                elif control_type == ControlType.ERASE_IN_LINE:
                    _, mode = cast(Tuple[ControlType, int], control_code)
                    if mode == 0:
                        term.erase_end_of_line()
                    elif mode == 1:
                        term.erase_start_of_line()
                    elif mode == 2:
                        term.erase_line()
                elif control_type == ControlType.SET_WINDOW_TITLE:
                    _, title = cast(Tuple[ControlType, str], control_code)
                    term.set_title(title)
python3.12/site-packages/pip/_vendor/rich/style.py000064400000064701151732702130016005 0ustar00import sys
from functools import lru_cache
from marshal import dumps, loads
from random import randint
from typing import Any, Dict, Iterable, List, Optional, Type, Union, cast

from . import errors
from .color import Color, ColorParseError, ColorSystem, blend_rgb
from .repr import Result, rich_repr
from .terminal_theme import DEFAULT_TERMINAL_THEME, TerminalTheme

# Style instances and style definitions are often interchangeable
StyleType = Union[str, "Style"]


class _Bit:
    """A descriptor to get/set a style attribute bit."""

    __slots__ = ["bit"]

    def __init__(self, bit_no: int) -> None:
        self.bit = 1 << bit_no

    def __get__(self, obj: "Style", objtype: Type["Style"]) -> Optional[bool]:
        if obj._set_attributes & self.bit:
            return obj._attributes & self.bit != 0
        return None


@rich_repr
class Style:
    """A terminal style.

    A terminal style consists of a color (`color`), a background color (`bgcolor`), and a number of attributes, such
    as bold, italic etc. The attributes have 3 states: they can either be on
    (``True``), off (``False``), or not set (``None``).

    Args:
        color (Union[Color, str], optional): Color of terminal text. Defaults to None.
        bgcolor (Union[Color, str], optional): Color of terminal background. Defaults to None.
        bold (bool, optional): Enable bold text. Defaults to None.
        dim (bool, optional): Enable dim text. Defaults to None.
        italic (bool, optional): Enable italic text. Defaults to None.
        underline (bool, optional): Enable underlined text. Defaults to None.
        blink (bool, optional): Enabled blinking text. Defaults to None.
        blink2 (bool, optional): Enable fast blinking text. Defaults to None.
        reverse (bool, optional): Enabled reverse text. Defaults to None.
        conceal (bool, optional): Enable concealed text. Defaults to None.
        strike (bool, optional): Enable strikethrough text. Defaults to None.
        underline2 (bool, optional): Enable doubly underlined text. Defaults to None.
        frame (bool, optional): Enable framed text. Defaults to None.
        encircle (bool, optional): Enable encircled text. Defaults to None.
        overline (bool, optional): Enable overlined text. Defaults to None.
        link (str, link): Link URL. Defaults to None.

    """

    _color: Optional[Color]
    _bgcolor: Optional[Color]
    _attributes: int
    _set_attributes: int
    _hash: Optional[int]
    _null: bool
    _meta: Optional[bytes]

    __slots__ = [
        "_color",
        "_bgcolor",
        "_attributes",
        "_set_attributes",
        "_link",
        "_link_id",
        "_ansi",
        "_style_definition",
        "_hash",
        "_null",
        "_meta",
    ]

    # maps bits on to SGR parameter
    _style_map = {
        0: "1",
        1: "2",
        2: "3",
        3: "4",
        4: "5",
        5: "6",
        6: "7",
        7: "8",
        8: "9",
        9: "21",
        10: "51",
        11: "52",
        12: "53",
    }

    STYLE_ATTRIBUTES = {
        "dim": "dim",
        "d": "dim",
        "bold": "bold",
        "b": "bold",
        "italic": "italic",
        "i": "italic",
        "underline": "underline",
        "u": "underline",
        "blink": "blink",
        "blink2": "blink2",
        "reverse": "reverse",
        "r": "reverse",
        "conceal": "conceal",
        "c": "conceal",
        "strike": "strike",
        "s": "strike",
        "underline2": "underline2",
        "uu": "underline2",
        "frame": "frame",
        "encircle": "encircle",
        "overline": "overline",
        "o": "overline",
    }

    def __init__(
        self,
        *,
        color: Optional[Union[Color, str]] = None,
        bgcolor: Optional[Union[Color, str]] = None,
        bold: Optional[bool] = None,
        dim: Optional[bool] = None,
        italic: Optional[bool] = None,
        underline: Optional[bool] = None,
        blink: Optional[bool] = None,
        blink2: Optional[bool] = None,
        reverse: Optional[bool] = None,
        conceal: Optional[bool] = None,
        strike: Optional[bool] = None,
        underline2: Optional[bool] = None,
        frame: Optional[bool] = None,
        encircle: Optional[bool] = None,
        overline: Optional[bool] = None,
        link: Optional[str] = None,
        meta: Optional[Dict[str, Any]] = None,
    ):
        self._ansi: Optional[str] = None
        self._style_definition: Optional[str] = None

        def _make_color(color: Union[Color, str]) -> Color:
            return color if isinstance(color, Color) else Color.parse(color)

        self._color = None if color is None else _make_color(color)
        self._bgcolor = None if bgcolor is None else _make_color(bgcolor)
        self._set_attributes = sum(
            (
                bold is not None,
                dim is not None and 2,
                italic is not None and 4,
                underline is not None and 8,
                blink is not None and 16,
                blink2 is not None and 32,
                reverse is not None and 64,
                conceal is not None and 128,
                strike is not None and 256,
                underline2 is not None and 512,
                frame is not None and 1024,
                encircle is not None and 2048,
                overline is not None and 4096,
            )
        )
        self._attributes = (
            sum(
                (
                    bold and 1 or 0,
                    dim and 2 or 0,
                    italic and 4 or 0,
                    underline and 8 or 0,
                    blink and 16 or 0,
                    blink2 and 32 or 0,
                    reverse and 64 or 0,
                    conceal and 128 or 0,
                    strike and 256 or 0,
                    underline2 and 512 or 0,
                    frame and 1024 or 0,
                    encircle and 2048 or 0,
                    overline and 4096 or 0,
                )
            )
            if self._set_attributes
            else 0
        )

        self._link = link
        self._meta = None if meta is None else dumps(meta)
        self._link_id = (
            f"{randint(0, 999999)}{hash(self._meta)}" if (link or meta) else ""
        )
        self._hash: Optional[int] = None
        self._null = not (self._set_attributes or color or bgcolor or link or meta)

    @classmethod
    def null(cls) -> "Style":
        """Create an 'null' style, equivalent to Style(), but more performant."""
        return NULL_STYLE

    @classmethod
    def from_color(
        cls, color: Optional[Color] = None, bgcolor: Optional[Color] = None
    ) -> "Style":
        """Create a new style with colors and no attributes.

        Returns:
            color (Optional[Color]): A (foreground) color, or None for no color. Defaults to None.
            bgcolor (Optional[Color]): A (background) color, or None for no color. Defaults to None.
        """
        style: Style = cls.__new__(Style)
        style._ansi = None
        style._style_definition = None
        style._color = color
        style._bgcolor = bgcolor
        style._set_attributes = 0
        style._attributes = 0
        style._link = None
        style._link_id = ""
        style._meta = None
        style._null = not (color or bgcolor)
        style._hash = None
        return style

    @classmethod
    def from_meta(cls, meta: Optional[Dict[str, Any]]) -> "Style":
        """Create a new style with meta data.

        Returns:
            meta (Optional[Dict[str, Any]]): A dictionary of meta data. Defaults to None.
        """
        style: Style = cls.__new__(Style)
        style._ansi = None
        style._style_definition = None
        style._color = None
        style._bgcolor = None
        style._set_attributes = 0
        style._attributes = 0
        style._link = None
        style._meta = dumps(meta)
        style._link_id = f"{randint(0, 999999)}{hash(style._meta)}"
        style._hash = None
        style._null = not (meta)
        return style

    @classmethod
    def on(cls, meta: Optional[Dict[str, Any]] = None, **handlers: Any) -> "Style":
        """Create a blank style with meta information.

        Example:
            style = Style.on(click=self.on_click)

        Args:
            meta (Optional[Dict[str, Any]], optional): An optional dict of meta information.
            **handlers (Any): Keyword arguments are translated in to handlers.

        Returns:
            Style: A Style with meta information attached.
        """
        meta = {} if meta is None else meta
        meta.update({f"@{key}": value for key, value in handlers.items()})
        return cls.from_meta(meta)

    bold = _Bit(0)
    dim = _Bit(1)
    italic = _Bit(2)
    underline = _Bit(3)
    blink = _Bit(4)
    blink2 = _Bit(5)
    reverse = _Bit(6)
    conceal = _Bit(7)
    strike = _Bit(8)
    underline2 = _Bit(9)
    frame = _Bit(10)
    encircle = _Bit(11)
    overline = _Bit(12)

    @property
    def link_id(self) -> str:
        """Get a link id, used in ansi code for links."""
        return self._link_id

    def __str__(self) -> str:
        """Re-generate style definition from attributes."""
        if self._style_definition is None:
            attributes: List[str] = []
            append = attributes.append
            bits = self._set_attributes
            if bits & 0b0000000001111:
                if bits & 1:
                    append("bold" if self.bold else "not bold")
                if bits & (1 << 1):
                    append("dim" if self.dim else "not dim")
                if bits & (1 << 2):
                    append("italic" if self.italic else "not italic")
                if bits & (1 << 3):
                    append("underline" if self.underline else "not underline")
            if bits & 0b0000111110000:
                if bits & (1 << 4):
                    append("blink" if self.blink else "not blink")
                if bits & (1 << 5):
                    append("blink2" if self.blink2 else "not blink2")
                if bits & (1 << 6):
                    append("reverse" if self.reverse else "not reverse")
                if bits & (1 << 7):
                    append("conceal" if self.conceal else "not conceal")
                if bits & (1 << 8):
                    append("strike" if self.strike else "not strike")
            if bits & 0b1111000000000:
                if bits & (1 << 9):
                    append("underline2" if self.underline2 else "not underline2")
                if bits & (1 << 10):
                    append("frame" if self.frame else "not frame")
                if bits & (1 << 11):
                    append("encircle" if self.encircle else "not encircle")
                if bits & (1 << 12):
                    append("overline" if self.overline else "not overline")
            if self._color is not None:
                append(self._color.name)
            if self._bgcolor is not None:
                append("on")
                append(self._bgcolor.name)
            if self._link:
                append("link")
                append(self._link)
            self._style_definition = " ".join(attributes) or "none"
        return self._style_definition

    def __bool__(self) -> bool:
        """A Style is false if it has no attributes, colors, or links."""
        return not self._null

    def _make_ansi_codes(self, color_system: ColorSystem) -> str:
        """Generate ANSI codes for this style.

        Args:
            color_system (ColorSystem): Color system.

        Returns:
            str: String containing codes.
        """

        if self._ansi is None:
            sgr: List[str] = []
            append = sgr.append
            _style_map = self._style_map
            attributes = self._attributes & self._set_attributes
            if attributes:
                if attributes & 1:
                    append(_style_map[0])
                if attributes & 2:
                    append(_style_map[1])
                if attributes & 4:
                    append(_style_map[2])
                if attributes & 8:
                    append(_style_map[3])
                if attributes & 0b0000111110000:
                    for bit in range(4, 9):
                        if attributes & (1 << bit):
                            append(_style_map[bit])
                if attributes & 0b1111000000000:
                    for bit in range(9, 13):
                        if attributes & (1 << bit):
                            append(_style_map[bit])
            if self._color is not None:
                sgr.extend(self._color.downgrade(color_system).get_ansi_codes())
            if self._bgcolor is not None:
                sgr.extend(
                    self._bgcolor.downgrade(color_system).get_ansi_codes(
                        foreground=False
                    )
                )
            self._ansi = ";".join(sgr)
        return self._ansi

    @classmethod
    @lru_cache(maxsize=1024)
    def normalize(cls, style: str) -> str:
        """Normalize a style definition so that styles with the same effect have the same string
        representation.

        Args:
            style (str): A style definition.

        Returns:
            str: Normal form of style definition.
        """
        try:
            return str(cls.parse(style))
        except errors.StyleSyntaxError:
            return style.strip().lower()

    @classmethod
    def pick_first(cls, *values: Optional[StyleType]) -> StyleType:
        """Pick first non-None style."""
        for value in values:
            if value is not None:
                return value
        raise ValueError("expected at least one non-None style")

    def __rich_repr__(self) -> Result:
        yield "color", self.color, None
        yield "bgcolor", self.bgcolor, None
        yield "bold", self.bold, None,
        yield "dim", self.dim, None,
        yield "italic", self.italic, None
        yield "underline", self.underline, None,
        yield "blink", self.blink, None
        yield "blink2", self.blink2, None
        yield "reverse", self.reverse, None
        yield "conceal", self.conceal, None
        yield "strike", self.strike, None
        yield "underline2", self.underline2, None
        yield "frame", self.frame, None
        yield "encircle", self.encircle, None
        yield "link", self.link, None
        if self._meta:
            yield "meta", self.meta

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, Style):
            return NotImplemented
        return self.__hash__() == other.__hash__()

    def __ne__(self, other: Any) -> bool:
        if not isinstance(other, Style):
            return NotImplemented
        return self.__hash__() != other.__hash__()

    def __hash__(self) -> int:
        if self._hash is not None:
            return self._hash
        self._hash = hash(
            (
                self._color,
                self._bgcolor,
                self._attributes,
                self._set_attributes,
                self._link,
                self._meta,
            )
        )
        return self._hash

    @property
    def color(self) -> Optional[Color]:
        """The foreground color or None if it is not set."""
        return self._color

    @property
    def bgcolor(self) -> Optional[Color]:
        """The background color or None if it is not set."""
        return self._bgcolor

    @property
    def link(self) -> Optional[str]:
        """Link text, if set."""
        return self._link

    @property
    def transparent_background(self) -> bool:
        """Check if the style specified a transparent background."""
        return self.bgcolor is None or self.bgcolor.is_default

    @property
    def background_style(self) -> "Style":
        """A Style with background only."""
        return Style(bgcolor=self.bgcolor)

    @property
    def meta(self) -> Dict[str, Any]:
        """Get meta information (can not be changed after construction)."""
        return {} if self._meta is None else cast(Dict[str, Any], loads(self._meta))

    @property
    def without_color(self) -> "Style":
        """Get a copy of the style with color removed."""
        if self._null:
            return NULL_STYLE
        style: Style = self.__new__(Style)
        style._ansi = None
        style._style_definition = None
        style._color = None
        style._bgcolor = None
        style._attributes = self._attributes
        style._set_attributes = self._set_attributes
        style._link = self._link
        style._link_id = f"{randint(0, 999999)}" if self._link else ""
        style._null = False
        style._meta = None
        style._hash = None
        return style

    @classmethod
    @lru_cache(maxsize=4096)
    def parse(cls, style_definition: str) -> "Style":
        """Parse a style definition.

        Args:
            style_definition (str): A string containing a style.

        Raises:
            errors.StyleSyntaxError: If the style definition syntax is invalid.

        Returns:
            `Style`: A Style instance.
        """
        if style_definition.strip() == "none" or not style_definition:
            return cls.null()

        STYLE_ATTRIBUTES = cls.STYLE_ATTRIBUTES
        color: Optional[str] = None
        bgcolor: Optional[str] = None
        attributes: Dict[str, Optional[Any]] = {}
        link: Optional[str] = None

        words = iter(style_definition.split())
        for original_word in words:
            word = original_word.lower()
            if word == "on":
                word = next(words, "")
                if not word:
                    raise errors.StyleSyntaxError("color expected after 'on'")
                try:
                    Color.parse(word) is None
                except ColorParseError as error:
                    raise errors.StyleSyntaxError(
                        f"unable to parse {word!r} as background color; {error}"
                    ) from None
                bgcolor = word

            elif word == "not":
                word = next(words, "")
                attribute = STYLE_ATTRIBUTES.get(word)
                if attribute is None:
                    raise errors.StyleSyntaxError(
                        f"expected style attribute after 'not', found {word!r}"
                    )
                attributes[attribute] = False

            elif word == "link":
                word = next(words, "")
                if not word:
                    raise errors.StyleSyntaxError("URL expected after 'link'")
                link = word

            elif word in STYLE_ATTRIBUTES:
                attributes[STYLE_ATTRIBUTES[word]] = True

            else:
                try:
                    Color.parse(word)
                except ColorParseError as error:
                    raise errors.StyleSyntaxError(
                        f"unable to parse {word!r} as color; {error}"
                    ) from None
                color = word
        style = Style(color=color, bgcolor=bgcolor, link=link, **attributes)
        return style

    @lru_cache(maxsize=1024)
    def get_html_style(self, theme: Optional[TerminalTheme] = None) -> str:
        """Get a CSS style rule."""
        theme = theme or DEFAULT_TERMINAL_THEME
        css: List[str] = []
        append = css.append

        color = self.color
        bgcolor = self.bgcolor
        if self.reverse:
            color, bgcolor = bgcolor, color
        if self.dim:
            foreground_color = (
                theme.foreground_color if color is None else color.get_truecolor(theme)
            )
            color = Color.from_triplet(
                blend_rgb(foreground_color, theme.background_color, 0.5)
            )
        if color is not None:
            theme_color = color.get_truecolor(theme)
            append(f"color: {theme_color.hex}")
            append(f"text-decoration-color: {theme_color.hex}")
        if bgcolor is not None:
            theme_color = bgcolor.get_truecolor(theme, foreground=False)
            append(f"background-color: {theme_color.hex}")
        if self.bold:
            append("font-weight: bold")
        if self.italic:
            append("font-style: italic")
        if self.underline:
            append("text-decoration: underline")
        if self.strike:
            append("text-decoration: line-through")
        if self.overline:
            append("text-decoration: overline")
        return "; ".join(css)

    @classmethod
    def combine(cls, styles: Iterable["Style"]) -> "Style":
        """Combine styles and get result.

        Args:
            styles (Iterable[Style]): Styles to combine.

        Returns:
            Style: A new style instance.
        """
        iter_styles = iter(styles)
        return sum(iter_styles, next(iter_styles))

    @classmethod
    def chain(cls, *styles: "Style") -> "Style":
        """Combine styles from positional argument in to a single style.

        Args:
            *styles (Iterable[Style]): Styles to combine.

        Returns:
            Style: A new style instance.
        """
        iter_styles = iter(styles)
        return sum(iter_styles, next(iter_styles))

    def copy(self) -> "Style":
        """Get a copy of this style.

        Returns:
            Style: A new Style instance with identical attributes.
        """
        if self._null:
            return NULL_STYLE
        style: Style = self.__new__(Style)
        style._ansi = self._ansi
        style._style_definition = self._style_definition
        style._color = self._color
        style._bgcolor = self._bgcolor
        style._attributes = self._attributes
        style._set_attributes = self._set_attributes
        style._link = self._link
        style._link_id = f"{randint(0, 999999)}" if self._link else ""
        style._hash = self._hash
        style._null = False
        style._meta = self._meta
        return style

    @lru_cache(maxsize=128)
    def clear_meta_and_links(self) -> "Style":
        """Get a copy of this style with link and meta information removed.

        Returns:
            Style: New style object.
        """
        if self._null:
            return NULL_STYLE
        style: Style = self.__new__(Style)
        style._ansi = self._ansi
        style._style_definition = self._style_definition
        style._color = self._color
        style._bgcolor = self._bgcolor
        style._attributes = self._attributes
        style._set_attributes = self._set_attributes
        style._link = None
        style._link_id = ""
        style._hash = self._hash
        style._null = False
        style._meta = None
        return style

    def update_link(self, link: Optional[str] = None) -> "Style":
        """Get a copy with a different value for link.

        Args:
            link (str, optional): New value for link. Defaults to None.

        Returns:
            Style: A new Style instance.
        """
        style: Style = self.__new__(Style)
        style._ansi = self._ansi
        style._style_definition = self._style_definition
        style._color = self._color
        style._bgcolor = self._bgcolor
        style._attributes = self._attributes
        style._set_attributes = self._set_attributes
        style._link = link
        style._link_id = f"{randint(0, 999999)}" if link else ""
        style._hash = None
        style._null = False
        style._meta = self._meta
        return style

    def render(
        self,
        text: str = "",
        *,
        color_system: Optional[ColorSystem] = ColorSystem.TRUECOLOR,
        legacy_windows: bool = False,
    ) -> str:
        """Render the ANSI codes for the style.

        Args:
            text (str, optional): A string to style. Defaults to "".
            color_system (Optional[ColorSystem], optional): Color system to render to. Defaults to ColorSystem.TRUECOLOR.

        Returns:
            str: A string containing ANSI style codes.
        """
        if not text or color_system is None:
            return text
        attrs = self._ansi or self._make_ansi_codes(color_system)
        rendered = f"\x1b[{attrs}m{text}\x1b[0m" if attrs else text
        if self._link and not legacy_windows:
            rendered = (
                f"\x1b]8;id={self._link_id};{self._link}\x1b\\{rendered}\x1b]8;;\x1b\\"
            )
        return rendered

    def test(self, text: Optional[str] = None) -> None:
        """Write text with style directly to terminal.

        This method is for testing purposes only.

        Args:
            text (Optional[str], optional): Text to style or None for style name.

        """
        text = text or str(self)
        sys.stdout.write(f"{self.render(text)}\n")

    @lru_cache(maxsize=1024)
    def _add(self, style: Optional["Style"]) -> "Style":
        if style is None or style._null:
            return self
        if self._null:
            return style
        new_style: Style = self.__new__(Style)
        new_style._ansi = None
        new_style._style_definition = None
        new_style._color = style._color or self._color
        new_style._bgcolor = style._bgcolor or self._bgcolor
        new_style._attributes = (self._attributes & ~style._set_attributes) | (
            style._attributes & style._set_attributes
        )
        new_style._set_attributes = self._set_attributes | style._set_attributes
        new_style._link = style._link or self._link
        new_style._link_id = style._link_id or self._link_id
        new_style._null = style._null
        if self._meta and style._meta:
            new_style._meta = dumps({**self.meta, **style.meta})
        else:
            new_style._meta = self._meta or style._meta
        new_style._hash = None
        return new_style

    def __add__(self, style: Optional["Style"]) -> "Style":
        combined_style = self._add(style)
        return combined_style.copy() if combined_style.link else combined_style


NULL_STYLE = Style()


class StyleStack:
    """A stack of styles."""

    __slots__ = ["_stack"]

    def __init__(self, default_style: "Style") -> None:
        self._stack: List[Style] = [default_style]

    def __repr__(self) -> str:
        return f"<stylestack {self._stack!r}>"

    @property
    def current(self) -> Style:
        """Get the Style at the top of the stack."""
        return self._stack[-1]

    def push(self, style: Style) -> None:
        """Push a new style on to the stack.

        Args:
            style (Style): New style to combine with current style.
        """
        self._stack.append(self._stack[-1] + style)

    def pop(self) -> Style:
        """Pop last style and discard.

        Returns:
            Style: New current style (also available as stack.current)
        """
        self._stack.pop()
        return self._stack[-1]
python3.12/site-packages/pip/_vendor/rich/_emoji_replace.py000064400000002050151732702140017570 0ustar00from typing import Callable, Match, Optional
import re

from ._emoji_codes import EMOJI


_ReStringMatch = Match[str]  # regex match object
_ReSubCallable = Callable[[_ReStringMatch], str]  # Callable invoked by re.sub
_EmojiSubMethod = Callable[[_ReSubCallable, str], str]  # Sub method of a compiled re


def _emoji_replace(
    text: str,
    default_variant: Optional[str] = None,
    _emoji_sub: _EmojiSubMethod = re.compile(r"(:(\S*?)(?:(?:\-)(emoji|text))?:)").sub,
) -> str:
    """Replace emoji code in text."""
    get_emoji = EMOJI.__getitem__
    variants = {"text": "\uFE0E", "emoji": "\uFE0F"}
    get_variant = variants.get
    default_variant_code = variants.get(default_variant, "") if default_variant else ""

    def do_replace(match: Match[str]) -> str:
        emoji_code, emoji_name, variant = match.groups()
        try:
            return get_emoji(emoji_name.lower()) + get_variant(
                variant, default_variant_code
            )
        except KeyError:
            return emoji_code

    return _emoji_sub(do_replace, text)
python3.12/site-packages/pip/_vendor/rich/table.py000064400000115404151732702140015732 0ustar00from dataclasses import dataclass, field, replace
from typing import (
    TYPE_CHECKING,
    Dict,
    Iterable,
    List,
    NamedTuple,
    Optional,
    Sequence,
    Tuple,
    Union,
)

from . import box, errors
from ._loop import loop_first_last, loop_last
from ._pick import pick_bool
from ._ratio import ratio_distribute, ratio_reduce
from .align import VerticalAlignMethod
from .jupyter import JupyterMixin
from .measure import Measurement
from .padding import Padding, PaddingDimensions
from .protocol import is_renderable
from .segment import Segment
from .style import Style, StyleType
from .text import Text, TextType

if TYPE_CHECKING:
    from .console import (
        Console,
        ConsoleOptions,
        JustifyMethod,
        OverflowMethod,
        RenderableType,
        RenderResult,
    )


@dataclass
class Column:
    """Defines a column within a ~Table.

    Args:
        title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
        caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
        width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
        min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
        box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
        safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
        padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
        collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
        pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
        expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
        show_header (bool, optional): Show a header row. Defaults to True.
        show_footer (bool, optional): Show a footer row. Defaults to False.
        show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
        show_lines (bool, optional): Draw lines between every row. Defaults to False.
        leading (bool, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
        style (Union[str, Style], optional): Default style for the table. Defaults to "none".
        row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
        header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
        footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
        border_style (Union[str, Style], optional): Style of the border. Defaults to None.
        title_style (Union[str, Style], optional): Style of the title. Defaults to None.
        caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
        title_justify (str, optional): Justify method for title. Defaults to "center".
        caption_justify (str, optional): Justify method for caption. Defaults to "center".
        highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
    """

    header: "RenderableType" = ""
    """RenderableType: Renderable for the header (typically a string)"""

    footer: "RenderableType" = ""
    """RenderableType: Renderable for the footer (typically a string)"""

    header_style: StyleType = ""
    """StyleType: The style of the header."""

    footer_style: StyleType = ""
    """StyleType: The style of the footer."""

    style: StyleType = ""
    """StyleType: The style of the column."""

    justify: "JustifyMethod" = "left"
    """str: How to justify text within the column ("left", "center", "right", or "full")"""

    vertical: "VerticalAlignMethod" = "top"
    """str: How to vertically align content ("top", "middle", or "bottom")"""

    overflow: "OverflowMethod" = "ellipsis"
    """str: Overflow method."""

    width: Optional[int] = None
    """Optional[int]: Width of the column, or ``None`` (default) to auto calculate width."""

    min_width: Optional[int] = None
    """Optional[int]: Minimum width of column, or ``None`` for no minimum. Defaults to None."""

    max_width: Optional[int] = None
    """Optional[int]: Maximum width of column, or ``None`` for no maximum. Defaults to None."""

    ratio: Optional[int] = None
    """Optional[int]: Ratio to use when calculating column width, or ``None`` (default) to adapt to column contents."""

    no_wrap: bool = False
    """bool: Prevent wrapping of text within the column. Defaults to ``False``."""

    _index: int = 0
    """Index of column."""

    _cells: List["RenderableType"] = field(default_factory=list)

    def copy(self) -> "Column":
        """Return a copy of this Column."""
        return replace(self, _cells=[])

    @property
    def cells(self) -> Iterable["RenderableType"]:
        """Get all cells in the column, not including header."""
        yield from self._cells

    @property
    def flexible(self) -> bool:
        """Check if this column is flexible."""
        return self.ratio is not None


@dataclass
class Row:
    """Information regarding a row."""

    style: Optional[StyleType] = None
    """Style to apply to row."""

    end_section: bool = False
    """Indicated end of section, which will force a line beneath the row."""


class _Cell(NamedTuple):
    """A single cell in a table."""

    style: StyleType
    """Style to apply to cell."""
    renderable: "RenderableType"
    """Cell renderable."""
    vertical: VerticalAlignMethod
    """Cell vertical alignment."""


class Table(JupyterMixin):
    """A console renderable to draw a table.

    Args:
        *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
        title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
        caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
        width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
        min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
        box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
        safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
        padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
        collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
        pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
        expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
        show_header (bool, optional): Show a header row. Defaults to True.
        show_footer (bool, optional): Show a footer row. Defaults to False.
        show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
        show_lines (bool, optional): Draw lines between every row. Defaults to False.
        leading (bool, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
        style (Union[str, Style], optional): Default style for the table. Defaults to "none".
        row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
        header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
        footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
        border_style (Union[str, Style], optional): Style of the border. Defaults to None.
        title_style (Union[str, Style], optional): Style of the title. Defaults to None.
        caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
        title_justify (str, optional): Justify method for title. Defaults to "center".
        caption_justify (str, optional): Justify method for caption. Defaults to "center".
        highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
    """

    columns: List[Column]
    rows: List[Row]

    def __init__(
        self,
        *headers: Union[Column, str],
        title: Optional[TextType] = None,
        caption: Optional[TextType] = None,
        width: Optional[int] = None,
        min_width: Optional[int] = None,
        box: Optional[box.Box] = box.HEAVY_HEAD,
        safe_box: Optional[bool] = None,
        padding: PaddingDimensions = (0, 1),
        collapse_padding: bool = False,
        pad_edge: bool = True,
        expand: bool = False,
        show_header: bool = True,
        show_footer: bool = False,
        show_edge: bool = True,
        show_lines: bool = False,
        leading: int = 0,
        style: StyleType = "none",
        row_styles: Optional[Iterable[StyleType]] = None,
        header_style: Optional[StyleType] = "table.header",
        footer_style: Optional[StyleType] = "table.footer",
        border_style: Optional[StyleType] = None,
        title_style: Optional[StyleType] = None,
        caption_style: Optional[StyleType] = None,
        title_justify: "JustifyMethod" = "center",
        caption_justify: "JustifyMethod" = "center",
        highlight: bool = False,
    ) -> None:

        self.columns: List[Column] = []
        self.rows: List[Row] = []
        self.title = title
        self.caption = caption
        self.width = width
        self.min_width = min_width
        self.box = box
        self.safe_box = safe_box
        self._padding = Padding.unpack(padding)
        self.pad_edge = pad_edge
        self._expand = expand
        self.show_header = show_header
        self.show_footer = show_footer
        self.show_edge = show_edge
        self.show_lines = show_lines
        self.leading = leading
        self.collapse_padding = collapse_padding
        self.style = style
        self.header_style = header_style or ""
        self.footer_style = footer_style or ""
        self.border_style = border_style
        self.title_style = title_style
        self.caption_style = caption_style
        self.title_justify: "JustifyMethod" = title_justify
        self.caption_justify: "JustifyMethod" = caption_justify
        self.highlight = highlight
        self.row_styles: Sequence[StyleType] = list(row_styles or [])
        append_column = self.columns.append
        for header in headers:
            if isinstance(header, str):
                self.add_column(header=header)
            else:
                header._index = len(self.columns)
                append_column(header)

    @classmethod
    def grid(
        cls,
        *headers: Union[Column, str],
        padding: PaddingDimensions = 0,
        collapse_padding: bool = True,
        pad_edge: bool = False,
        expand: bool = False,
    ) -> "Table":
        """Get a table with no lines, headers, or footer.

        Args:
            *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
            padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0.
            collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to True.
            pad_edge (bool, optional): Enable padding around edges of table. Defaults to False.
            expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.

        Returns:
            Table: A table instance.
        """
        return cls(
            *headers,
            box=None,
            padding=padding,
            collapse_padding=collapse_padding,
            show_header=False,
            show_footer=False,
            show_edge=False,
            pad_edge=pad_edge,
            expand=expand,
        )

    @property
    def expand(self) -> bool:
        """Setting a non-None self.width implies expand."""
        return self._expand or self.width is not None

    @expand.setter
    def expand(self, expand: bool) -> None:
        """Set expand."""
        self._expand = expand

    @property
    def _extra_width(self) -> int:
        """Get extra width to add to cell content."""
        width = 0
        if self.box and self.show_edge:
            width += 2
        if self.box:
            width += len(self.columns) - 1
        return width

    @property
    def row_count(self) -> int:
        """Get the current number of rows."""
        return len(self.rows)

    def get_row_style(self, console: "Console", index: int) -> StyleType:
        """Get the current row style."""
        style = Style.null()
        if self.row_styles:
            style += console.get_style(self.row_styles[index % len(self.row_styles)])
        row_style = self.rows[index].style
        if row_style is not None:
            style += console.get_style(row_style)
        return style

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> Measurement:
        max_width = options.max_width
        if self.width is not None:
            max_width = self.width
        if max_width < 0:
            return Measurement(0, 0)

        extra_width = self._extra_width
        max_width = sum(
            self._calculate_column_widths(
                console, options.update_width(max_width - extra_width)
            )
        )
        _measure_column = self._measure_column

        measurements = [
            _measure_column(console, options.update_width(max_width), column)
            for column in self.columns
        ]
        minimum_width = (
            sum(measurement.minimum for measurement in measurements) + extra_width
        )
        maximum_width = (
            sum(measurement.maximum for measurement in measurements) + extra_width
            if (self.width is None)
            else self.width
        )
        measurement = Measurement(minimum_width, maximum_width)
        measurement = measurement.clamp(self.min_width)
        return measurement

    @property
    def padding(self) -> Tuple[int, int, int, int]:
        """Get cell padding."""
        return self._padding

    @padding.setter
    def padding(self, padding: PaddingDimensions) -> "Table":
        """Set cell padding."""
        self._padding = Padding.unpack(padding)
        return self

    def add_column(
        self,
        header: "RenderableType" = "",
        footer: "RenderableType" = "",
        *,
        header_style: Optional[StyleType] = None,
        footer_style: Optional[StyleType] = None,
        style: Optional[StyleType] = None,
        justify: "JustifyMethod" = "left",
        vertical: "VerticalAlignMethod" = "top",
        overflow: "OverflowMethod" = "ellipsis",
        width: Optional[int] = None,
        min_width: Optional[int] = None,
        max_width: Optional[int] = None,
        ratio: Optional[int] = None,
        no_wrap: bool = False,
    ) -> None:
        """Add a column to the table.

        Args:
            header (RenderableType, optional): Text or renderable for the header.
                Defaults to "".
            footer (RenderableType, optional): Text or renderable for the footer.
                Defaults to "".
            header_style (Union[str, Style], optional): Style for the header, or None for default. Defaults to None.
            footer_style (Union[str, Style], optional): Style for the footer, or None for default. Defaults to None.
            style (Union[str, Style], optional): Style for the column cells, or None for default. Defaults to None.
            justify (JustifyMethod, optional): Alignment for cells. Defaults to "left".
            vertical (VerticalAlignMethod, optional): Vertical alignment, one of "top", "middle", or "bottom". Defaults to "top".
            overflow (OverflowMethod): Overflow method: "crop", "fold", "ellipsis". Defaults to "ellipsis".
            width (int, optional): Desired width of column in characters, or None to fit to contents. Defaults to None.
            min_width (Optional[int], optional): Minimum width of column, or ``None`` for no minimum. Defaults to None.
            max_width (Optional[int], optional): Maximum width of column, or ``None`` for no maximum. Defaults to None.
            ratio (int, optional): Flexible ratio for the column (requires ``Table.expand`` or ``Table.width``). Defaults to None.
            no_wrap (bool, optional): Set to ``True`` to disable wrapping of this column.
        """

        column = Column(
            _index=len(self.columns),
            header=header,
            footer=footer,
            header_style=header_style or "",
            footer_style=footer_style or "",
            style=style or "",
            justify=justify,
            vertical=vertical,
            overflow=overflow,
            width=width,
            min_width=min_width,
            max_width=max_width,
            ratio=ratio,
            no_wrap=no_wrap,
        )
        self.columns.append(column)

    def add_row(
        self,
        *renderables: Optional["RenderableType"],
        style: Optional[StyleType] = None,
        end_section: bool = False,
    ) -> None:
        """Add a row of renderables.

        Args:
            *renderables (None or renderable): Each cell in a row must be a renderable object (including str),
                or ``None`` for a blank cell.
            style (StyleType, optional): An optional style to apply to the entire row. Defaults to None.
            end_section (bool, optional): End a section and draw a line. Defaults to False.

        Raises:
            errors.NotRenderableError: If you add something that can't be rendered.
        """

        def add_cell(column: Column, renderable: "RenderableType") -> None:
            column._cells.append(renderable)

        cell_renderables: List[Optional["RenderableType"]] = list(renderables)

        columns = self.columns
        if len(cell_renderables) < len(columns):
            cell_renderables = [
                *cell_renderables,
                *[None] * (len(columns) - len(cell_renderables)),
            ]
        for index, renderable in enumerate(cell_renderables):
            if index == len(columns):
                column = Column(_index=index)
                for _ in self.rows:
                    add_cell(column, Text(""))
                self.columns.append(column)
            else:
                column = columns[index]
            if renderable is None:
                add_cell(column, "")
            elif is_renderable(renderable):
                add_cell(column, renderable)
            else:
                raise errors.NotRenderableError(
                    f"unable to render {type(renderable).__name__}; a string or other renderable object is required"
                )
        self.rows.append(Row(style=style, end_section=end_section))

    def add_section(self) -> None:
        """Add a new section (draw a line after current row)."""

        if self.rows:
            self.rows[-1].end_section = True

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":

        if not self.columns:
            yield Segment("\n")
            return

        max_width = options.max_width
        if self.width is not None:
            max_width = self.width

        extra_width = self._extra_width
        widths = self._calculate_column_widths(
            console, options.update_width(max_width - extra_width)
        )
        table_width = sum(widths) + extra_width

        render_options = options.update(
            width=table_width, highlight=self.highlight, height=None
        )

        def render_annotation(
            text: TextType, style: StyleType, justify: "JustifyMethod" = "center"
        ) -> "RenderResult":
            render_text = (
                console.render_str(text, style=style, highlight=False)
                if isinstance(text, str)
                else text
            )
            return console.render(
                render_text, options=render_options.update(justify=justify)
            )

        if self.title:
            yield from render_annotation(
                self.title,
                style=Style.pick_first(self.title_style, "table.title"),
                justify=self.title_justify,
            )
        yield from self._render(console, render_options, widths)
        if self.caption:
            yield from render_annotation(
                self.caption,
                style=Style.pick_first(self.caption_style, "table.caption"),
                justify=self.caption_justify,
            )

    def _calculate_column_widths(
        self, console: "Console", options: "ConsoleOptions"
    ) -> List[int]:
        """Calculate the widths of each column, including padding, not including borders."""
        max_width = options.max_width
        columns = self.columns
        width_ranges = [
            self._measure_column(console, options, column) for column in columns
        ]
        widths = [_range.maximum or 1 for _range in width_ranges]
        get_padding_width = self._get_padding_width
        extra_width = self._extra_width
        if self.expand:
            ratios = [col.ratio or 0 for col in columns if col.flexible]
            if any(ratios):
                fixed_widths = [
                    0 if column.flexible else _range.maximum
                    for _range, column in zip(width_ranges, columns)
                ]
                flex_minimum = [
                    (column.width or 1) + get_padding_width(column._index)
                    for column in columns
                    if column.flexible
                ]
                flexible_width = max_width - sum(fixed_widths)
                flex_widths = ratio_distribute(flexible_width, ratios, flex_minimum)
                iter_flex_widths = iter(flex_widths)
                for index, column in enumerate(columns):
                    if column.flexible:
                        widths[index] = fixed_widths[index] + next(iter_flex_widths)
        table_width = sum(widths)

        if table_width > max_width:
            widths = self._collapse_widths(
                widths,
                [(column.width is None and not column.no_wrap) for column in columns],
                max_width,
            )
            table_width = sum(widths)
            # last resort, reduce columns evenly
            if table_width > max_width:
                excess_width = table_width - max_width
                widths = ratio_reduce(excess_width, [1] * len(widths), widths, widths)
                table_width = sum(widths)

            width_ranges = [
                self._measure_column(console, options.update_width(width), column)
                for width, column in zip(widths, columns)
            ]
            widths = [_range.maximum or 0 for _range in width_ranges]

        if (table_width < max_width and self.expand) or (
            self.min_width is not None and table_width < (self.min_width - extra_width)
        ):
            _max_width = (
                max_width
                if self.min_width is None
                else min(self.min_width - extra_width, max_width)
            )
            pad_widths = ratio_distribute(_max_width - table_width, widths)
            widths = [_width + pad for _width, pad in zip(widths, pad_widths)]

        return widths

    @classmethod
    def _collapse_widths(
        cls, widths: List[int], wrapable: List[bool], max_width: int
    ) -> List[int]:
        """Reduce widths so that the total is under max_width.

        Args:
            widths (List[int]): List of widths.
            wrapable (List[bool]): List of booleans that indicate if a column may shrink.
            max_width (int): Maximum width to reduce to.

        Returns:
            List[int]: A new list of widths.
        """
        total_width = sum(widths)
        excess_width = total_width - max_width
        if any(wrapable):
            while total_width and excess_width > 0:
                max_column = max(
                    width for width, allow_wrap in zip(widths, wrapable) if allow_wrap
                )
                second_max_column = max(
                    width if allow_wrap and width != max_column else 0
                    for width, allow_wrap in zip(widths, wrapable)
                )
                column_difference = max_column - second_max_column
                ratios = [
                    (1 if (width == max_column and allow_wrap) else 0)
                    for width, allow_wrap in zip(widths, wrapable)
                ]
                if not any(ratios) or not column_difference:
                    break
                max_reduce = [min(excess_width, column_difference)] * len(widths)
                widths = ratio_reduce(excess_width, ratios, max_reduce, widths)

                total_width = sum(widths)
                excess_width = total_width - max_width
        return widths

    def _get_cells(
        self, console: "Console", column_index: int, column: Column
    ) -> Iterable[_Cell]:
        """Get all the cells with padding and optional header."""

        collapse_padding = self.collapse_padding
        pad_edge = self.pad_edge
        padding = self.padding
        any_padding = any(padding)

        first_column = column_index == 0
        last_column = column_index == len(self.columns) - 1

        _padding_cache: Dict[Tuple[bool, bool], Tuple[int, int, int, int]] = {}

        def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
            cached = _padding_cache.get((first_row, last_row))
            if cached:
                return cached
            top, right, bottom, left = padding

            if collapse_padding:
                if not first_column:
                    left = max(0, left - right)
                if not last_row:
                    bottom = max(0, top - bottom)

            if not pad_edge:
                if first_column:
                    left = 0
                if last_column:
                    right = 0
                if first_row:
                    top = 0
                if last_row:
                    bottom = 0
            _padding = (top, right, bottom, left)
            _padding_cache[(first_row, last_row)] = _padding
            return _padding

        raw_cells: List[Tuple[StyleType, "RenderableType"]] = []
        _append = raw_cells.append
        get_style = console.get_style
        if self.show_header:
            header_style = get_style(self.header_style or "") + get_style(
                column.header_style
            )
            _append((header_style, column.header))
        cell_style = get_style(column.style or "")
        for cell in column.cells:
            _append((cell_style, cell))
        if self.show_footer:
            footer_style = get_style(self.footer_style or "") + get_style(
                column.footer_style
            )
            _append((footer_style, column.footer))

        if any_padding:
            _Padding = Padding
            for first, last, (style, renderable) in loop_first_last(raw_cells):
                yield _Cell(
                    style,
                    _Padding(renderable, get_padding(first, last)),
                    getattr(renderable, "vertical", None) or column.vertical,
                )
        else:
            for (style, renderable) in raw_cells:
                yield _Cell(
                    style,
                    renderable,
                    getattr(renderable, "vertical", None) or column.vertical,
                )

    def _get_padding_width(self, column_index: int) -> int:
        """Get extra width from padding."""
        _, pad_right, _, pad_left = self.padding
        if self.collapse_padding:
            if column_index > 0:
                pad_left = max(0, pad_left - pad_right)
        return pad_left + pad_right

    def _measure_column(
        self,
        console: "Console",
        options: "ConsoleOptions",
        column: Column,
    ) -> Measurement:
        """Get the minimum and maximum width of the column."""

        max_width = options.max_width
        if max_width < 1:
            return Measurement(0, 0)

        padding_width = self._get_padding_width(column._index)

        if column.width is not None:
            # Fixed width column
            return Measurement(
                column.width + padding_width, column.width + padding_width
            ).with_maximum(max_width)
        # Flexible column, we need to measure contents
        min_widths: List[int] = []
        max_widths: List[int] = []
        append_min = min_widths.append
        append_max = max_widths.append
        get_render_width = Measurement.get
        for cell in self._get_cells(console, column._index, column):
            _min, _max = get_render_width(console, options, cell.renderable)
            append_min(_min)
            append_max(_max)

        measurement = Measurement(
            max(min_widths) if min_widths else 1,
            max(max_widths) if max_widths else max_width,
        ).with_maximum(max_width)
        measurement = measurement.clamp(
            None if column.min_width is None else column.min_width + padding_width,
            None if column.max_width is None else column.max_width + padding_width,
        )
        return measurement

    def _render(
        self, console: "Console", options: "ConsoleOptions", widths: List[int]
    ) -> "RenderResult":
        table_style = console.get_style(self.style or "")

        border_style = table_style + console.get_style(self.border_style or "")
        _column_cells = (
            self._get_cells(console, column_index, column)
            for column_index, column in enumerate(self.columns)
        )
        row_cells: List[Tuple[_Cell, ...]] = list(zip(*_column_cells))
        _box = (
            self.box.substitute(
                options, safe=pick_bool(self.safe_box, console.safe_box)
            )
            if self.box
            else None
        )
        _box = _box.get_plain_headed_box() if _box and not self.show_header else _box

        new_line = Segment.line()

        columns = self.columns
        show_header = self.show_header
        show_footer = self.show_footer
        show_edge = self.show_edge
        show_lines = self.show_lines
        leading = self.leading

        _Segment = Segment
        if _box:
            box_segments = [
                (
                    _Segment(_box.head_left, border_style),
                    _Segment(_box.head_right, border_style),
                    _Segment(_box.head_vertical, border_style),
                ),
                (
                    _Segment(_box.foot_left, border_style),
                    _Segment(_box.foot_right, border_style),
                    _Segment(_box.foot_vertical, border_style),
                ),
                (
                    _Segment(_box.mid_left, border_style),
                    _Segment(_box.mid_right, border_style),
                    _Segment(_box.mid_vertical, border_style),
                ),
            ]
            if show_edge:
                yield _Segment(_box.get_top(widths), border_style)
                yield new_line
        else:
            box_segments = []

        get_row_style = self.get_row_style
        get_style = console.get_style

        for index, (first, last, row_cell) in enumerate(loop_first_last(row_cells)):
            header_row = first and show_header
            footer_row = last and show_footer
            row = (
                self.rows[index - show_header]
                if (not header_row and not footer_row)
                else None
            )
            max_height = 1
            cells: List[List[List[Segment]]] = []
            if header_row or footer_row:
                row_style = Style.null()
            else:
                row_style = get_style(
                    get_row_style(console, index - 1 if show_header else index)
                )
            for width, cell, column in zip(widths, row_cell, columns):
                render_options = options.update(
                    width=width,
                    justify=column.justify,
                    no_wrap=column.no_wrap,
                    overflow=column.overflow,
                    height=None,
                )
                lines = console.render_lines(
                    cell.renderable,
                    render_options,
                    style=get_style(cell.style) + row_style,
                )
                max_height = max(max_height, len(lines))
                cells.append(lines)

            row_height = max(len(cell) for cell in cells)

            def align_cell(
                cell: List[List[Segment]],
                vertical: "VerticalAlignMethod",
                width: int,
                style: Style,
            ) -> List[List[Segment]]:
                if header_row:
                    vertical = "bottom"
                elif footer_row:
                    vertical = "top"

                if vertical == "top":
                    return _Segment.align_top(cell, width, row_height, style)
                elif vertical == "middle":
                    return _Segment.align_middle(cell, width, row_height, style)
                return _Segment.align_bottom(cell, width, row_height, style)

            cells[:] = [
                _Segment.set_shape(
                    align_cell(
                        cell,
                        _cell.vertical,
                        width,
                        get_style(_cell.style) + row_style,
                    ),
                    width,
                    max_height,
                )
                for width, _cell, cell, column in zip(widths, row_cell, cells, columns)
            ]

            if _box:
                if last and show_footer:
                    yield _Segment(
                        _box.get_row(widths, "foot", edge=show_edge), border_style
                    )
                    yield new_line
                left, right, _divider = box_segments[0 if first else (2 if last else 1)]

                # If the column divider is whitespace also style it with the row background
                divider = (
                    _divider
                    if _divider.text.strip()
                    else _Segment(
                        _divider.text, row_style.background_style + _divider.style
                    )
                )
                for line_no in range(max_height):
                    if show_edge:
                        yield left
                    for last_cell, rendered_cell in loop_last(cells):
                        yield from rendered_cell[line_no]
                        if not last_cell:
                            yield divider
                    if show_edge:
                        yield right
                    yield new_line
            else:
                for line_no in range(max_height):
                    for rendered_cell in cells:
                        yield from rendered_cell[line_no]
                    yield new_line
            if _box and first and show_header:
                yield _Segment(
                    _box.get_row(widths, "head", edge=show_edge), border_style
                )
                yield new_line
            end_section = row and row.end_section
            if _box and (show_lines or leading or end_section):
                if (
                    not last
                    and not (show_footer and index >= len(row_cells) - 2)
                    and not (show_header and header_row)
                ):
                    if leading:
                        yield _Segment(
                            _box.get_row(widths, "mid", edge=show_edge) * leading,
                            border_style,
                        )
                    else:
                        yield _Segment(
                            _box.get_row(widths, "row", edge=show_edge), border_style
                        )
                    yield new_line

        if _box and show_edge:
            yield _Segment(_box.get_bottom(widths), border_style)
            yield new_line


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich.console import Console
    from pip._vendor.rich.highlighter import ReprHighlighter
    from pip._vendor.rich.table import Table as Table

    from ._timer import timer

    with timer("Table render"):
        table = Table(
            title="Star Wars Movies",
            caption="Rich example table",
            caption_justify="right",
        )

        table.add_column(
            "Released", header_style="bright_cyan", style="cyan", no_wrap=True
        )
        table.add_column("Title", style="magenta")
        table.add_column("Box Office", justify="right", style="green")

        table.add_row(
            "Dec 20, 2019",
            "Star Wars: The Rise of Skywalker",
            "$952,110,690",
        )
        table.add_row("May 25, 2018", "Solo: A Star Wars Story", "$393,151,347")
        table.add_row(
            "Dec 15, 2017",
            "Star Wars Ep. V111: The Last Jedi",
            "$1,332,539,889",
            style="on black",
            end_section=True,
        )
        table.add_row(
            "Dec 16, 2016",
            "Rogue One: A Star Wars Story",
            "$1,332,439,889",
        )

        def header(text: str) -> None:
            console.print()
            console.rule(highlight(text))
            console.print()

        console = Console()
        highlight = ReprHighlighter()
        header("Example Table")
        console.print(table, justify="center")

        table.expand = True
        header("expand=True")
        console.print(table)

        table.width = 50
        header("width=50")

        console.print(table, justify="center")

        table.width = None
        table.expand = False
        table.row_styles = ["dim", "none"]
        header("row_styles=['dim', 'none']")

        console.print(table, justify="center")

        table.width = None
        table.expand = False
        table.row_styles = ["dim", "none"]
        table.leading = 1
        header("leading=1, row_styles=['dim', 'none']")
        console.print(table, justify="center")

        table.width = None
        table.expand = False
        table.row_styles = ["dim", "none"]
        table.show_lines = True
        table.leading = 0
        header("show_lines=True, row_styles=['dim', 'none']")
        console.print(table, justify="center")
python3.12/site-packages/pip/_vendor/rich/color_triplet.py000064400000002036151732702150017521 0ustar00from typing import NamedTuple, Tuple


class ColorTriplet(NamedTuple):
    """The red, green, and blue components of a color."""

    red: int
    """Red component in 0 to 255 range."""
    green: int
    """Green component in 0 to 255 range."""
    blue: int
    """Blue component in 0 to 255 range."""

    @property
    def hex(self) -> str:
        """get the color triplet in CSS style."""
        red, green, blue = self
        return f"#{red:02x}{green:02x}{blue:02x}"

    @property
    def rgb(self) -> str:
        """The color in RGB format.

        Returns:
            str: An rgb color, e.g. ``"rgb(100,23,255)"``.
        """
        red, green, blue = self
        return f"rgb({red},{green},{blue})"

    @property
    def normalized(self) -> Tuple[float, float, float]:
        """Convert components into floats between 0 and 1.

        Returns:
            Tuple[float, float, float]: A tuple of three normalized colour components.
        """
        red, green, blue = self
        return red / 255.0, green / 255.0, blue / 255.0
python3.12/site-packages/pip/_vendor/rich/__init__.py000064400000013712151732702150016402 0ustar00"""Rich text and beautiful formatting in the terminal."""

import os
from typing import IO, TYPE_CHECKING, Any, Callable, Optional, Union

from ._extension import load_ipython_extension  # noqa: F401

__all__ = ["get_console", "reconfigure", "print", "inspect", "print_json"]

if TYPE_CHECKING:
    from .console import Console

# Global console used by alternative print
_console: Optional["Console"] = None

try:
    _IMPORT_CWD = os.path.abspath(os.getcwd())
except FileNotFoundError:
    # Can happen if the cwd has been deleted
    _IMPORT_CWD = ""


def get_console() -> "Console":
    """Get a global :class:`~rich.console.Console` instance. This function is used when Rich requires a Console,
    and hasn't been explicitly given one.

    Returns:
        Console: A console instance.
    """
    global _console
    if _console is None:
        from .console import Console

        _console = Console()

    return _console


def reconfigure(*args: Any, **kwargs: Any) -> None:
    """Reconfigures the global console by replacing it with another.

    Args:
        *args (Any): Positional arguments for the replacement :class:`~rich.console.Console`.
        **kwargs (Any): Keyword arguments for the replacement :class:`~rich.console.Console`.
    """
    from pip._vendor.rich.console import Console

    new_console = Console(*args, **kwargs)
    _console = get_console()
    _console.__dict__ = new_console.__dict__


def print(
    *objects: Any,
    sep: str = " ",
    end: str = "\n",
    file: Optional[IO[str]] = None,
    flush: bool = False,
) -> None:
    r"""Print object(s) supplied via positional arguments.
    This function has an identical signature to the built-in print.
    For more advanced features, see the :class:`~rich.console.Console` class.

    Args:
        sep (str, optional): Separator between printed objects. Defaults to " ".
        end (str, optional): Character to write at end of output. Defaults to "\\n".
        file (IO[str], optional): File to write to, or None for stdout. Defaults to None.
        flush (bool, optional): Has no effect as Rich always flushes output. Defaults to False.

    """
    from .console import Console

    write_console = get_console() if file is None else Console(file=file)
    return write_console.print(*objects, sep=sep, end=end)


def print_json(
    json: Optional[str] = None,
    *,
    data: Any = None,
    indent: Union[None, int, str] = 2,
    highlight: bool = True,
    skip_keys: bool = False,
    ensure_ascii: bool = False,
    check_circular: bool = True,
    allow_nan: bool = True,
    default: Optional[Callable[[Any], Any]] = None,
    sort_keys: bool = False,
) -> None:
    """Pretty prints JSON. Output will be valid JSON.

    Args:
        json (str): A string containing JSON.
        data (Any): If json is not supplied, then encode this data.
        indent (int, optional): Number of spaces to indent. Defaults to 2.
        highlight (bool, optional): Enable highlighting of output: Defaults to True.
        skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
        ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
        check_circular (bool, optional): Check for circular references. Defaults to True.
        allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
        default (Callable, optional): A callable that converts values that can not be encoded
            in to something that can be JSON encoded. Defaults to None.
        sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
    """

    get_console().print_json(
        json,
        data=data,
        indent=indent,
        highlight=highlight,
        skip_keys=skip_keys,
        ensure_ascii=ensure_ascii,
        check_circular=check_circular,
        allow_nan=allow_nan,
        default=default,
        sort_keys=sort_keys,
    )


def inspect(
    obj: Any,
    *,
    console: Optional["Console"] = None,
    title: Optional[str] = None,
    help: bool = False,
    methods: bool = False,
    docs: bool = True,
    private: bool = False,
    dunder: bool = False,
    sort: bool = True,
    all: bool = False,
    value: bool = True,
) -> None:
    """Inspect any Python object.

    * inspect(<OBJECT>) to see summarized info.
    * inspect(<OBJECT>, methods=True) to see methods.
    * inspect(<OBJECT>, help=True) to see full (non-abbreviated) help.
    * inspect(<OBJECT>, private=True) to see private attributes (single underscore).
    * inspect(<OBJECT>, dunder=True) to see attributes beginning with double underscore.
    * inspect(<OBJECT>, all=True) to see all attributes.

    Args:
        obj (Any): An object to inspect.
        title (str, optional): Title to display over inspect result, or None use type. Defaults to None.
        help (bool, optional): Show full help text rather than just first paragraph. Defaults to False.
        methods (bool, optional): Enable inspection of callables. Defaults to False.
        docs (bool, optional): Also render doc strings. Defaults to True.
        private (bool, optional): Show private attributes (beginning with underscore). Defaults to False.
        dunder (bool, optional): Show attributes starting with double underscore. Defaults to False.
        sort (bool, optional): Sort attributes alphabetically. Defaults to True.
        all (bool, optional): Show all attributes. Defaults to False.
        value (bool, optional): Pretty print value. Defaults to True.
    """
    _console = console or get_console()
    from pip._vendor.rich._inspect import Inspect

    # Special case for inspect(inspect)
    is_inspect = obj is inspect

    _inspect = Inspect(
        obj,
        title=title,
        help=is_inspect or help,
        methods=is_inspect or methods,
        docs=is_inspect or docs,
        private=private,
        dunder=dunder,
        sort=sort,
        all=all,
        value=value,
    )
    _console.print(_inspect)


if __name__ == "__main__":  # pragma: no cover
    print("Hello, **World**")
python3.12/site-packages/pip/_vendor/rich/logging.py000064400000027177151732702160016304 0ustar00import logging
from datetime import datetime
from logging import Handler, LogRecord
from pathlib import Path
from types import ModuleType
from typing import ClassVar, Iterable, List, Optional, Type, Union

from pip._vendor.rich._null_file import NullFile

from . import get_console
from ._log_render import FormatTimeCallable, LogRender
from .console import Console, ConsoleRenderable
from .highlighter import Highlighter, ReprHighlighter
from .text import Text
from .traceback import Traceback


class RichHandler(Handler):
    """A logging handler that renders output with Rich. The time / level / message and file are displayed in columns.
    The level is color coded, and the message is syntax highlighted.

    Note:
        Be careful when enabling console markup in log messages if you have configured logging for libraries not
        under your control. If a dependency writes messages containing square brackets, it may not produce the intended output.

    Args:
        level (Union[int, str], optional): Log level. Defaults to logging.NOTSET.
        console (:class:`~rich.console.Console`, optional): Optional console instance to write logs.
            Default will use a global console instance writing to stdout.
        show_time (bool, optional): Show a column for the time. Defaults to True.
        omit_repeated_times (bool, optional): Omit repetition of the same time. Defaults to True.
        show_level (bool, optional): Show a column for the level. Defaults to True.
        show_path (bool, optional): Show the path to the original log call. Defaults to True.
        enable_link_path (bool, optional): Enable terminal link of path column to file. Defaults to True.
        highlighter (Highlighter, optional): Highlighter to style log messages, or None to use ReprHighlighter. Defaults to None.
        markup (bool, optional): Enable console markup in log messages. Defaults to False.
        rich_tracebacks (bool, optional): Enable rich tracebacks with syntax highlighting and formatting. Defaults to False.
        tracebacks_width (Optional[int], optional): Number of characters used to render tracebacks, or None for full width. Defaults to None.
        tracebacks_extra_lines (int, optional): Additional lines of code to render tracebacks, or None for full width. Defaults to None.
        tracebacks_theme (str, optional): Override pygments theme used in traceback.
        tracebacks_word_wrap (bool, optional): Enable word wrapping of long tracebacks lines. Defaults to True.
        tracebacks_show_locals (bool, optional): Enable display of locals in tracebacks. Defaults to False.
        tracebacks_suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%x %X] ".
        keywords (List[str], optional): List of words to highlight instead of ``RichHandler.KEYWORDS``.
    """

    KEYWORDS: ClassVar[Optional[List[str]]] = [
        "GET",
        "POST",
        "HEAD",
        "PUT",
        "DELETE",
        "OPTIONS",
        "TRACE",
        "PATCH",
    ]
    HIGHLIGHTER_CLASS: ClassVar[Type[Highlighter]] = ReprHighlighter

    def __init__(
        self,
        level: Union[int, str] = logging.NOTSET,
        console: Optional[Console] = None,
        *,
        show_time: bool = True,
        omit_repeated_times: bool = True,
        show_level: bool = True,
        show_path: bool = True,
        enable_link_path: bool = True,
        highlighter: Optional[Highlighter] = None,
        markup: bool = False,
        rich_tracebacks: bool = False,
        tracebacks_width: Optional[int] = None,
        tracebacks_extra_lines: int = 3,
        tracebacks_theme: Optional[str] = None,
        tracebacks_word_wrap: bool = True,
        tracebacks_show_locals: bool = False,
        tracebacks_suppress: Iterable[Union[str, ModuleType]] = (),
        locals_max_length: int = 10,
        locals_max_string: int = 80,
        log_time_format: Union[str, FormatTimeCallable] = "[%x %X]",
        keywords: Optional[List[str]] = None,
    ) -> None:
        super().__init__(level=level)
        self.console = console or get_console()
        self.highlighter = highlighter or self.HIGHLIGHTER_CLASS()
        self._log_render = LogRender(
            show_time=show_time,
            show_level=show_level,
            show_path=show_path,
            time_format=log_time_format,
            omit_repeated_times=omit_repeated_times,
            level_width=None,
        )
        self.enable_link_path = enable_link_path
        self.markup = markup
        self.rich_tracebacks = rich_tracebacks
        self.tracebacks_width = tracebacks_width
        self.tracebacks_extra_lines = tracebacks_extra_lines
        self.tracebacks_theme = tracebacks_theme
        self.tracebacks_word_wrap = tracebacks_word_wrap
        self.tracebacks_show_locals = tracebacks_show_locals
        self.tracebacks_suppress = tracebacks_suppress
        self.locals_max_length = locals_max_length
        self.locals_max_string = locals_max_string
        self.keywords = keywords

    def get_level_text(self, record: LogRecord) -> Text:
        """Get the level name from the record.

        Args:
            record (LogRecord): LogRecord instance.

        Returns:
            Text: A tuple of the style and level name.
        """
        level_name = record.levelname
        level_text = Text.styled(
            level_name.ljust(8), f"logging.level.{level_name.lower()}"
        )
        return level_text

    def emit(self, record: LogRecord) -> None:
        """Invoked by logging."""
        message = self.format(record)
        traceback = None
        if (
            self.rich_tracebacks
            and record.exc_info
            and record.exc_info != (None, None, None)
        ):
            exc_type, exc_value, exc_traceback = record.exc_info
            assert exc_type is not None
            assert exc_value is not None
            traceback = Traceback.from_exception(
                exc_type,
                exc_value,
                exc_traceback,
                width=self.tracebacks_width,
                extra_lines=self.tracebacks_extra_lines,
                theme=self.tracebacks_theme,
                word_wrap=self.tracebacks_word_wrap,
                show_locals=self.tracebacks_show_locals,
                locals_max_length=self.locals_max_length,
                locals_max_string=self.locals_max_string,
                suppress=self.tracebacks_suppress,
            )
            message = record.getMessage()
            if self.formatter:
                record.message = record.getMessage()
                formatter = self.formatter
                if hasattr(formatter, "usesTime") and formatter.usesTime():
                    record.asctime = formatter.formatTime(record, formatter.datefmt)
                message = formatter.formatMessage(record)

        message_renderable = self.render_message(record, message)
        log_renderable = self.render(
            record=record, traceback=traceback, message_renderable=message_renderable
        )
        if isinstance(self.console.file, NullFile):
            # Handles pythonw, where stdout/stderr are null, and we return NullFile
            # instance from Console.file. In this case, we still want to make a log record
            # even though we won't be writing anything to a file.
            self.handleError(record)
        else:
            try:
                self.console.print(log_renderable)
            except Exception:
                self.handleError(record)

    def render_message(self, record: LogRecord, message: str) -> "ConsoleRenderable":
        """Render message text in to Text.

        Args:
            record (LogRecord): logging Record.
            message (str): String containing log message.

        Returns:
            ConsoleRenderable: Renderable to display log message.
        """
        use_markup = getattr(record, "markup", self.markup)
        message_text = Text.from_markup(message) if use_markup else Text(message)

        highlighter = getattr(record, "highlighter", self.highlighter)
        if highlighter:
            message_text = highlighter(message_text)

        if self.keywords is None:
            self.keywords = self.KEYWORDS

        if self.keywords:
            message_text.highlight_words(self.keywords, "logging.keyword")

        return message_text

    def render(
        self,
        *,
        record: LogRecord,
        traceback: Optional[Traceback],
        message_renderable: "ConsoleRenderable",
    ) -> "ConsoleRenderable":
        """Render log for display.

        Args:
            record (LogRecord): logging Record.
            traceback (Optional[Traceback]): Traceback instance or None for no Traceback.
            message_renderable (ConsoleRenderable): Renderable (typically Text) containing log message contents.

        Returns:
            ConsoleRenderable: Renderable to display log.
        """
        path = Path(record.pathname).name
        level = self.get_level_text(record)
        time_format = None if self.formatter is None else self.formatter.datefmt
        log_time = datetime.fromtimestamp(record.created)

        log_renderable = self._log_render(
            self.console,
            [message_renderable] if not traceback else [message_renderable, traceback],
            log_time=log_time,
            time_format=time_format,
            level=level,
            path=path,
            line_no=record.lineno,
            link_path=record.pathname if self.enable_link_path else None,
        )
        return log_renderable


if __name__ == "__main__":  # pragma: no cover
    from time import sleep

    FORMAT = "%(message)s"
    # FORMAT = "%(asctime)-15s - %(levelname)s - %(message)s"
    logging.basicConfig(
        level="NOTSET",
        format=FORMAT,
        datefmt="[%X]",
        handlers=[RichHandler(rich_tracebacks=True, tracebacks_show_locals=True)],
    )
    log = logging.getLogger("rich")

    log.info("Server starting...")
    log.info("Listening on http://127.0.0.1:8080")
    sleep(1)

    log.info("GET /index.html 200 1298")
    log.info("GET /imgs/backgrounds/back1.jpg 200 54386")
    log.info("GET /css/styles.css 200 54386")
    log.warning("GET /favicon.ico 404 242")
    sleep(1)

    log.debug(
        "JSONRPC request\n--> %r\n<-- %r",
        {
            "version": "1.1",
            "method": "confirmFruitPurchase",
            "params": [["apple", "orange", "mangoes", "pomelo"], 1.123],
            "id": "194521489",
        },
        {"version": "1.1", "result": True, "error": None, "id": "194521489"},
    )
    log.debug(
        "Loading configuration file /adasd/asdasd/qeqwe/qwrqwrqwr/sdgsdgsdg/werwerwer/dfgerert/ertertert/ertetert/werwerwer"
    )
    log.error("Unable to find 'pomelo' in database!")
    log.info("POST /jsonrpc/ 200 65532")
    log.info("POST /admin/ 401 42234")
    log.warning("password was rejected for admin site.")

    def divide() -> None:
        number = 1
        divisor = 0
        foos = ["foo"] * 100
        log.debug("in divide")
        try:
            number / divisor
        except:
            log.exception("An error of some kind occurred!")

    divide()
    sleep(1)
    log.critical("Out of memory!")
    log.info("Server exited with code=-1")
    log.info("[bold]EXITING...[/bold]", extra=dict(markup=True))
python3.12/site-packages/pip/_vendor/rich/palette.py000064400000006504151732702160016303 0ustar00from math import sqrt
from functools import lru_cache
from typing import Sequence, Tuple, TYPE_CHECKING

from .color_triplet import ColorTriplet

if TYPE_CHECKING:
    from pip._vendor.rich.table import Table


class Palette:
    """A palette of available colors."""

    def __init__(self, colors: Sequence[Tuple[int, int, int]]):
        self._colors = colors

    def __getitem__(self, number: int) -> ColorTriplet:
        return ColorTriplet(*self._colors[number])

    def __rich__(self) -> "Table":
        from pip._vendor.rich.color import Color
        from pip._vendor.rich.style import Style
        from pip._vendor.rich.text import Text
        from pip._vendor.rich.table import Table

        table = Table(
            "index",
            "RGB",
            "Color",
            title="Palette",
            caption=f"{len(self._colors)} colors",
            highlight=True,
            caption_justify="right",
        )
        for index, color in enumerate(self._colors):
            table.add_row(
                str(index),
                repr(color),
                Text(" " * 16, style=Style(bgcolor=Color.from_rgb(*color))),
            )
        return table

    # This is somewhat inefficient and needs caching
    @lru_cache(maxsize=1024)
    def match(self, color: Tuple[int, int, int]) -> int:
        """Find a color from a palette that most closely matches a given color.

        Args:
            color (Tuple[int, int, int]): RGB components in range 0 > 255.

        Returns:
            int: Index of closes matching color.
        """
        red1, green1, blue1 = color
        _sqrt = sqrt
        get_color = self._colors.__getitem__

        def get_color_distance(index: int) -> float:
            """Get the distance to a color."""
            red2, green2, blue2 = get_color(index)
            red_mean = (red1 + red2) // 2
            red = red1 - red2
            green = green1 - green2
            blue = blue1 - blue2
            return _sqrt(
                (((512 + red_mean) * red * red) >> 8)
                + 4 * green * green
                + (((767 - red_mean) * blue * blue) >> 8)
            )

        min_index = min(range(len(self._colors)), key=get_color_distance)
        return min_index


if __name__ == "__main__":  # pragma: no cover
    import colorsys
    from typing import Iterable
    from pip._vendor.rich.color import Color
    from pip._vendor.rich.console import Console, ConsoleOptions
    from pip._vendor.rich.segment import Segment
    from pip._vendor.rich.style import Style

    class ColorBox:
        def __rich_console__(
            self, console: Console, options: ConsoleOptions
        ) -> Iterable[Segment]:
            height = console.size.height - 3
            for y in range(0, height):
                for x in range(options.max_width):
                    h = x / options.max_width
                    l = y / (height + 1)
                    r1, g1, b1 = colorsys.hls_to_rgb(h, l, 1.0)
                    r2, g2, b2 = colorsys.hls_to_rgb(h, l + (1 / height / 2), 1.0)
                    bgcolor = Color.from_rgb(r1 * 255, g1 * 255, b1 * 255)
                    color = Color.from_rgb(r2 * 255, g2 * 255, b2 * 255)
                    yield Segment("▄", Style(color=color, bgcolor=bgcolor))
                yield Segment.line()

    console = Console()
    console.print(ColorBox())
python3.12/site-packages/pip/_vendor/rich/pretty.py000064400000106014151732702170016172 0ustar00import builtins
import collections
import dataclasses
import inspect
import os
import sys
from array import array
from collections import Counter, UserDict, UserList, defaultdict, deque
from dataclasses import dataclass, fields, is_dataclass
from inspect import isclass
from itertools import islice
from types import MappingProxyType
from typing import (
    TYPE_CHECKING,
    Any,
    Callable,
    DefaultDict,
    Dict,
    Iterable,
    List,
    Optional,
    Sequence,
    Set,
    Tuple,
    Union,
)

from pip._vendor.rich.repr import RichReprResult

try:
    import attr as _attr_module

    _has_attrs = hasattr(_attr_module, "ib")
except ImportError:  # pragma: no cover
    _has_attrs = False

from . import get_console
from ._loop import loop_last
from ._pick import pick_bool
from .abc import RichRenderable
from .cells import cell_len
from .highlighter import ReprHighlighter
from .jupyter import JupyterMixin, JupyterRenderable
from .measure import Measurement
from .text import Text

if TYPE_CHECKING:
    from .console import (
        Console,
        ConsoleOptions,
        HighlighterType,
        JustifyMethod,
        OverflowMethod,
        RenderResult,
    )


def _is_attr_object(obj: Any) -> bool:
    """Check if an object was created with attrs module."""
    return _has_attrs and _attr_module.has(type(obj))


def _get_attr_fields(obj: Any) -> Sequence["_attr_module.Attribute[Any]"]:
    """Get fields for an attrs object."""
    return _attr_module.fields(type(obj)) if _has_attrs else []


def _is_dataclass_repr(obj: object) -> bool:
    """Check if an instance of a dataclass contains the default repr.

    Args:
        obj (object): A dataclass instance.

    Returns:
        bool: True if the default repr is used, False if there is a custom repr.
    """
    # Digging in to a lot of internals here
    # Catching all exceptions in case something is missing on a non CPython implementation
    try:
        return obj.__repr__.__code__.co_filename == dataclasses.__file__
    except Exception:  # pragma: no coverage
        return False


_dummy_namedtuple = collections.namedtuple("_dummy_namedtuple", [])


def _has_default_namedtuple_repr(obj: object) -> bool:
    """Check if an instance of namedtuple contains the default repr

    Args:
        obj (object): A namedtuple

    Returns:
        bool: True if the default repr is used, False if there's a custom repr.
    """
    obj_file = None
    try:
        obj_file = inspect.getfile(obj.__repr__)
    except (OSError, TypeError):
        # OSError handles case where object is defined in __main__ scope, e.g. REPL - no filename available.
        # TypeError trapped defensively, in case of object without filename slips through.
        pass
    default_repr_file = inspect.getfile(_dummy_namedtuple.__repr__)
    return obj_file == default_repr_file


def _ipy_display_hook(
    value: Any,
    console: Optional["Console"] = None,
    overflow: "OverflowMethod" = "ignore",
    crop: bool = False,
    indent_guides: bool = False,
    max_length: Optional[int] = None,
    max_string: Optional[int] = None,
    max_depth: Optional[int] = None,
    expand_all: bool = False,
) -> Union[str, None]:
    # needed here to prevent circular import:
    from .console import ConsoleRenderable

    # always skip rich generated jupyter renderables or None values
    if _safe_isinstance(value, JupyterRenderable) or value is None:
        return None

    console = console or get_console()

    with console.capture() as capture:
        # certain renderables should start on a new line
        if _safe_isinstance(value, ConsoleRenderable):
            console.line()
        console.print(
            value
            if _safe_isinstance(value, RichRenderable)
            else Pretty(
                value,
                overflow=overflow,
                indent_guides=indent_guides,
                max_length=max_length,
                max_string=max_string,
                max_depth=max_depth,
                expand_all=expand_all,
                margin=12,
            ),
            crop=crop,
            new_line_start=True,
            end="",
        )
    # strip trailing newline, not usually part of a text repr
    # I'm not sure if this should be prevented at a lower level
    return capture.get().rstrip("\n")


def _safe_isinstance(
    obj: object, class_or_tuple: Union[type, Tuple[type, ...]]
) -> bool:
    """isinstance can fail in rare cases, for example types with no __class__"""
    try:
        return isinstance(obj, class_or_tuple)
    except Exception:
        return False


def install(
    console: Optional["Console"] = None,
    overflow: "OverflowMethod" = "ignore",
    crop: bool = False,
    indent_guides: bool = False,
    max_length: Optional[int] = None,
    max_string: Optional[int] = None,
    max_depth: Optional[int] = None,
    expand_all: bool = False,
) -> None:
    """Install automatic pretty printing in the Python REPL.

    Args:
        console (Console, optional): Console instance or ``None`` to use global console. Defaults to None.
        overflow (Optional[OverflowMethod], optional): Overflow method. Defaults to "ignore".
        crop (Optional[bool], optional): Enable cropping of long lines. Defaults to False.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
        expand_all (bool, optional): Expand all containers. Defaults to False.
        max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
    """
    from pip._vendor.rich import get_console

    console = console or get_console()
    assert console is not None

    def display_hook(value: Any) -> None:
        """Replacement sys.displayhook which prettifies objects with Rich."""
        if value is not None:
            assert console is not None
            builtins._ = None  # type: ignore[attr-defined]
            console.print(
                value
                if _safe_isinstance(value, RichRenderable)
                else Pretty(
                    value,
                    overflow=overflow,
                    indent_guides=indent_guides,
                    max_length=max_length,
                    max_string=max_string,
                    max_depth=max_depth,
                    expand_all=expand_all,
                ),
                crop=crop,
            )
            builtins._ = value  # type: ignore[attr-defined]

    if "get_ipython" in globals():
        ip = get_ipython()  # type: ignore[name-defined]
        from IPython.core.formatters import BaseFormatter

        class RichFormatter(BaseFormatter):  # type: ignore[misc]
            pprint: bool = True

            def __call__(self, value: Any) -> Any:
                if self.pprint:
                    return _ipy_display_hook(
                        value,
                        console=get_console(),
                        overflow=overflow,
                        indent_guides=indent_guides,
                        max_length=max_length,
                        max_string=max_string,
                        max_depth=max_depth,
                        expand_all=expand_all,
                    )
                else:
                    return repr(value)

        # replace plain text formatter with rich formatter
        rich_formatter = RichFormatter()
        ip.display_formatter.formatters["text/plain"] = rich_formatter
    else:
        sys.displayhook = display_hook


class Pretty(JupyterMixin):
    """A rich renderable that pretty prints an object.

    Args:
        _object (Any): An object to pretty print.
        highlighter (HighlighterType, optional): Highlighter object to apply to result, or None for ReprHighlighter. Defaults to None.
        indent_size (int, optional): Number of spaces in indent. Defaults to 4.
        justify (JustifyMethod, optional): Justify method, or None for default. Defaults to None.
        overflow (OverflowMethod, optional): Overflow method, or None for default. Defaults to None.
        no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to False.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
        expand_all (bool, optional): Expand all containers. Defaults to False.
        margin (int, optional): Subtrace a margin from width to force containers to expand earlier. Defaults to 0.
        insert_line (bool, optional): Insert a new line if the output has multiple new lines. Defaults to False.
    """

    def __init__(
        self,
        _object: Any,
        highlighter: Optional["HighlighterType"] = None,
        *,
        indent_size: int = 4,
        justify: Optional["JustifyMethod"] = None,
        overflow: Optional["OverflowMethod"] = None,
        no_wrap: Optional[bool] = False,
        indent_guides: bool = False,
        max_length: Optional[int] = None,
        max_string: Optional[int] = None,
        max_depth: Optional[int] = None,
        expand_all: bool = False,
        margin: int = 0,
        insert_line: bool = False,
    ) -> None:
        self._object = _object
        self.highlighter = highlighter or ReprHighlighter()
        self.indent_size = indent_size
        self.justify: Optional["JustifyMethod"] = justify
        self.overflow: Optional["OverflowMethod"] = overflow
        self.no_wrap = no_wrap
        self.indent_guides = indent_guides
        self.max_length = max_length
        self.max_string = max_string
        self.max_depth = max_depth
        self.expand_all = expand_all
        self.margin = margin
        self.insert_line = insert_line

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        pretty_str = pretty_repr(
            self._object,
            max_width=options.max_width - self.margin,
            indent_size=self.indent_size,
            max_length=self.max_length,
            max_string=self.max_string,
            max_depth=self.max_depth,
            expand_all=self.expand_all,
        )
        pretty_text = Text.from_ansi(
            pretty_str,
            justify=self.justify or options.justify,
            overflow=self.overflow or options.overflow,
            no_wrap=pick_bool(self.no_wrap, options.no_wrap),
            style="pretty",
        )
        pretty_text = (
            self.highlighter(pretty_text)
            if pretty_text
            else Text(
                f"{type(self._object)}.__repr__ returned empty string",
                style="dim italic",
            )
        )
        if self.indent_guides and not options.ascii_only:
            pretty_text = pretty_text.with_indent_guides(
                self.indent_size, style="repr.indent"
            )
        if self.insert_line and "\n" in pretty_text:
            yield ""
        yield pretty_text

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "Measurement":
        pretty_str = pretty_repr(
            self._object,
            max_width=options.max_width,
            indent_size=self.indent_size,
            max_length=self.max_length,
            max_string=self.max_string,
            max_depth=self.max_depth,
            expand_all=self.expand_all,
        )
        text_width = (
            max(cell_len(line) for line in pretty_str.splitlines()) if pretty_str else 0
        )
        return Measurement(text_width, text_width)


def _get_braces_for_defaultdict(_object: DefaultDict[Any, Any]) -> Tuple[str, str, str]:
    return (
        f"defaultdict({_object.default_factory!r}, {{",
        "})",
        f"defaultdict({_object.default_factory!r}, {{}})",
    )


def _get_braces_for_array(_object: "array[Any]") -> Tuple[str, str, str]:
    return (f"array({_object.typecode!r}, [", "])", f"array({_object.typecode!r})")


_BRACES: Dict[type, Callable[[Any], Tuple[str, str, str]]] = {
    os._Environ: lambda _object: ("environ({", "})", "environ({})"),
    array: _get_braces_for_array,
    defaultdict: _get_braces_for_defaultdict,
    Counter: lambda _object: ("Counter({", "})", "Counter()"),
    deque: lambda _object: ("deque([", "])", "deque()"),
    dict: lambda _object: ("{", "}", "{}"),
    UserDict: lambda _object: ("{", "}", "{}"),
    frozenset: lambda _object: ("frozenset({", "})", "frozenset()"),
    list: lambda _object: ("[", "]", "[]"),
    UserList: lambda _object: ("[", "]", "[]"),
    set: lambda _object: ("{", "}", "set()"),
    tuple: lambda _object: ("(", ")", "()"),
    MappingProxyType: lambda _object: ("mappingproxy({", "})", "mappingproxy({})"),
}
_CONTAINERS = tuple(_BRACES.keys())
_MAPPING_CONTAINERS = (dict, os._Environ, MappingProxyType, UserDict)


def is_expandable(obj: Any) -> bool:
    """Check if an object may be expanded by pretty print."""
    return (
        _safe_isinstance(obj, _CONTAINERS)
        or (is_dataclass(obj))
        or (hasattr(obj, "__rich_repr__"))
        or _is_attr_object(obj)
    ) and not isclass(obj)


@dataclass
class Node:
    """A node in a repr tree. May be atomic or a container."""

    key_repr: str = ""
    value_repr: str = ""
    open_brace: str = ""
    close_brace: str = ""
    empty: str = ""
    last: bool = False
    is_tuple: bool = False
    is_namedtuple: bool = False
    children: Optional[List["Node"]] = None
    key_separator: str = ": "
    separator: str = ", "

    def iter_tokens(self) -> Iterable[str]:
        """Generate tokens for this node."""
        if self.key_repr:
            yield self.key_repr
            yield self.key_separator
        if self.value_repr:
            yield self.value_repr
        elif self.children is not None:
            if self.children:
                yield self.open_brace
                if self.is_tuple and not self.is_namedtuple and len(self.children) == 1:
                    yield from self.children[0].iter_tokens()
                    yield ","
                else:
                    for child in self.children:
                        yield from child.iter_tokens()
                        if not child.last:
                            yield self.separator
                yield self.close_brace
            else:
                yield self.empty

    def check_length(self, start_length: int, max_length: int) -> bool:
        """Check the length fits within a limit.

        Args:
            start_length (int): Starting length of the line (indent, prefix, suffix).
            max_length (int): Maximum length.

        Returns:
            bool: True if the node can be rendered within max length, otherwise False.
        """
        total_length = start_length
        for token in self.iter_tokens():
            total_length += cell_len(token)
            if total_length > max_length:
                return False
        return True

    def __str__(self) -> str:
        repr_text = "".join(self.iter_tokens())
        return repr_text

    def render(
        self, max_width: int = 80, indent_size: int = 4, expand_all: bool = False
    ) -> str:
        """Render the node to a pretty repr.

        Args:
            max_width (int, optional): Maximum width of the repr. Defaults to 80.
            indent_size (int, optional): Size of indents. Defaults to 4.
            expand_all (bool, optional): Expand all levels. Defaults to False.

        Returns:
            str: A repr string of the original object.
        """
        lines = [_Line(node=self, is_root=True)]
        line_no = 0
        while line_no < len(lines):
            line = lines[line_no]
            if line.expandable and not line.expanded:
                if expand_all or not line.check_length(max_width):
                    lines[line_no : line_no + 1] = line.expand(indent_size)
            line_no += 1

        repr_str = "\n".join(str(line) for line in lines)
        return repr_str


@dataclass
class _Line:
    """A line in repr output."""

    parent: Optional["_Line"] = None
    is_root: bool = False
    node: Optional[Node] = None
    text: str = ""
    suffix: str = ""
    whitespace: str = ""
    expanded: bool = False
    last: bool = False

    @property
    def expandable(self) -> bool:
        """Check if the line may be expanded."""
        return bool(self.node is not None and self.node.children)

    def check_length(self, max_length: int) -> bool:
        """Check this line fits within a given number of cells."""
        start_length = (
            len(self.whitespace) + cell_len(self.text) + cell_len(self.suffix)
        )
        assert self.node is not None
        return self.node.check_length(start_length, max_length)

    def expand(self, indent_size: int) -> Iterable["_Line"]:
        """Expand this line by adding children on their own line."""
        node = self.node
        assert node is not None
        whitespace = self.whitespace
        assert node.children
        if node.key_repr:
            new_line = yield _Line(
                text=f"{node.key_repr}{node.key_separator}{node.open_brace}",
                whitespace=whitespace,
            )
        else:
            new_line = yield _Line(text=node.open_brace, whitespace=whitespace)
        child_whitespace = self.whitespace + " " * indent_size
        tuple_of_one = node.is_tuple and len(node.children) == 1
        for last, child in loop_last(node.children):
            separator = "," if tuple_of_one else node.separator
            line = _Line(
                parent=new_line,
                node=child,
                whitespace=child_whitespace,
                suffix=separator,
                last=last and not tuple_of_one,
            )
            yield line

        yield _Line(
            text=node.close_brace,
            whitespace=whitespace,
            suffix=self.suffix,
            last=self.last,
        )

    def __str__(self) -> str:
        if self.last:
            return f"{self.whitespace}{self.text}{self.node or ''}"
        else:
            return (
                f"{self.whitespace}{self.text}{self.node or ''}{self.suffix.rstrip()}"
            )


def _is_namedtuple(obj: Any) -> bool:
    """Checks if an object is most likely a namedtuple. It is possible
    to craft an object that passes this check and isn't a namedtuple, but
    there is only a minuscule chance of this happening unintentionally.

    Args:
        obj (Any): The object to test

    Returns:
        bool: True if the object is a namedtuple. False otherwise.
    """
    try:
        fields = getattr(obj, "_fields", None)
    except Exception:
        # Being very defensive - if we cannot get the attr then its not a namedtuple
        return False
    return isinstance(obj, tuple) and isinstance(fields, tuple)


def traverse(
    _object: Any,
    max_length: Optional[int] = None,
    max_string: Optional[int] = None,
    max_depth: Optional[int] = None,
) -> Node:
    """Traverse object and generate a tree.

    Args:
        _object (Any): Object to be traversed.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
            Defaults to None.
        max_depth (int, optional): Maximum depth of data structures, or None for no maximum.
            Defaults to None.

    Returns:
        Node: The root of a tree structure which can be used to render a pretty repr.
    """

    def to_repr(obj: Any) -> str:
        """Get repr string for an object, but catch errors."""
        if (
            max_string is not None
            and _safe_isinstance(obj, (bytes, str))
            and len(obj) > max_string
        ):
            truncated = len(obj) - max_string
            obj_repr = f"{obj[:max_string]!r}+{truncated}"
        else:
            try:
                obj_repr = repr(obj)
            except Exception as error:
                obj_repr = f"<repr-error {str(error)!r}>"
        return obj_repr

    visited_ids: Set[int] = set()
    push_visited = visited_ids.add
    pop_visited = visited_ids.remove

    def _traverse(obj: Any, root: bool = False, depth: int = 0) -> Node:
        """Walk the object depth first."""

        obj_id = id(obj)
        if obj_id in visited_ids:
            # Recursion detected
            return Node(value_repr="...")

        obj_type = type(obj)
        children: List[Node]
        reached_max_depth = max_depth is not None and depth >= max_depth

        def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
            for arg in rich_args:
                if _safe_isinstance(arg, tuple):
                    if len(arg) == 3:
                        key, child, default = arg
                        if default == child:
                            continue
                        yield key, child
                    elif len(arg) == 2:
                        key, child = arg
                        yield key, child
                    elif len(arg) == 1:
                        yield arg[0]
                else:
                    yield arg

        try:
            fake_attributes = hasattr(
                obj, "awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492"
            )
        except Exception:
            fake_attributes = False

        rich_repr_result: Optional[RichReprResult] = None
        if not fake_attributes:
            try:
                if hasattr(obj, "__rich_repr__") and not isclass(obj):
                    rich_repr_result = obj.__rich_repr__()
            except Exception:
                pass

        if rich_repr_result is not None:
            push_visited(obj_id)
            angular = getattr(obj.__rich_repr__, "angular", False)
            args = list(iter_rich_args(rich_repr_result))
            class_name = obj.__class__.__name__

            if args:
                children = []
                append = children.append

                if reached_max_depth:
                    if angular:
                        node = Node(value_repr=f"<{class_name}...>")
                    else:
                        node = Node(value_repr=f"{class_name}(...)")
                else:
                    if angular:
                        node = Node(
                            open_brace=f"<{class_name} ",
                            close_brace=">",
                            children=children,
                            last=root,
                            separator=" ",
                        )
                    else:
                        node = Node(
                            open_brace=f"{class_name}(",
                            close_brace=")",
                            children=children,
                            last=root,
                        )
                    for last, arg in loop_last(args):
                        if _safe_isinstance(arg, tuple):
                            key, child = arg
                            child_node = _traverse(child, depth=depth + 1)
                            child_node.last = last
                            child_node.key_repr = key
                            child_node.key_separator = "="
                            append(child_node)
                        else:
                            child_node = _traverse(arg, depth=depth + 1)
                            child_node.last = last
                            append(child_node)
            else:
                node = Node(
                    value_repr=f"<{class_name}>" if angular else f"{class_name}()",
                    children=[],
                    last=root,
                )
            pop_visited(obj_id)
        elif _is_attr_object(obj) and not fake_attributes:
            push_visited(obj_id)
            children = []
            append = children.append

            attr_fields = _get_attr_fields(obj)
            if attr_fields:
                if reached_max_depth:
                    node = Node(value_repr=f"{obj.__class__.__name__}(...)")
                else:
                    node = Node(
                        open_brace=f"{obj.__class__.__name__}(",
                        close_brace=")",
                        children=children,
                        last=root,
                    )

                    def iter_attrs() -> Iterable[
                        Tuple[str, Any, Optional[Callable[[Any], str]]]
                    ]:
                        """Iterate over attr fields and values."""
                        for attr in attr_fields:
                            if attr.repr:
                                try:
                                    value = getattr(obj, attr.name)
                                except Exception as error:
                                    # Can happen, albeit rarely
                                    yield (attr.name, error, None)
                                else:
                                    yield (
                                        attr.name,
                                        value,
                                        attr.repr if callable(attr.repr) else None,
                                    )

                    for last, (name, value, repr_callable) in loop_last(iter_attrs()):
                        if repr_callable:
                            child_node = Node(value_repr=str(repr_callable(value)))
                        else:
                            child_node = _traverse(value, depth=depth + 1)
                        child_node.last = last
                        child_node.key_repr = name
                        child_node.key_separator = "="
                        append(child_node)
            else:
                node = Node(
                    value_repr=f"{obj.__class__.__name__}()", children=[], last=root
                )
            pop_visited(obj_id)
        elif (
            is_dataclass(obj)
            and not _safe_isinstance(obj, type)
            and not fake_attributes
            and _is_dataclass_repr(obj)
        ):
            push_visited(obj_id)
            children = []
            append = children.append
            if reached_max_depth:
                node = Node(value_repr=f"{obj.__class__.__name__}(...)")
            else:
                node = Node(
                    open_brace=f"{obj.__class__.__name__}(",
                    close_brace=")",
                    children=children,
                    last=root,
                    empty=f"{obj.__class__.__name__}()",
                )

                for last, field in loop_last(
                    field for field in fields(obj) if field.repr
                ):
                    child_node = _traverse(getattr(obj, field.name), depth=depth + 1)
                    child_node.key_repr = field.name
                    child_node.last = last
                    child_node.key_separator = "="
                    append(child_node)

            pop_visited(obj_id)
        elif _is_namedtuple(obj) and _has_default_namedtuple_repr(obj):
            push_visited(obj_id)
            class_name = obj.__class__.__name__
            if reached_max_depth:
                # If we've reached the max depth, we still show the class name, but not its contents
                node = Node(
                    value_repr=f"{class_name}(...)",
                )
            else:
                children = []
                append = children.append
                node = Node(
                    open_brace=f"{class_name}(",
                    close_brace=")",
                    children=children,
                    empty=f"{class_name}()",
                )
                for last, (key, value) in loop_last(obj._asdict().items()):
                    child_node = _traverse(value, depth=depth + 1)
                    child_node.key_repr = key
                    child_node.last = last
                    child_node.key_separator = "="
                    append(child_node)
            pop_visited(obj_id)
        elif _safe_isinstance(obj, _CONTAINERS):
            for container_type in _CONTAINERS:
                if _safe_isinstance(obj, container_type):
                    obj_type = container_type
                    break

            push_visited(obj_id)

            open_brace, close_brace, empty = _BRACES[obj_type](obj)

            if reached_max_depth:
                node = Node(value_repr=f"{open_brace}...{close_brace}")
            elif obj_type.__repr__ != type(obj).__repr__:
                node = Node(value_repr=to_repr(obj), last=root)
            elif obj:
                children = []
                node = Node(
                    open_brace=open_brace,
                    close_brace=close_brace,
                    children=children,
                    last=root,
                )
                append = children.append
                num_items = len(obj)
                last_item_index = num_items - 1

                if _safe_isinstance(obj, _MAPPING_CONTAINERS):
                    iter_items = iter(obj.items())
                    if max_length is not None:
                        iter_items = islice(iter_items, max_length)
                    for index, (key, child) in enumerate(iter_items):
                        child_node = _traverse(child, depth=depth + 1)
                        child_node.key_repr = to_repr(key)
                        child_node.last = index == last_item_index
                        append(child_node)
                else:
                    iter_values = iter(obj)
                    if max_length is not None:
                        iter_values = islice(iter_values, max_length)
                    for index, child in enumerate(iter_values):
                        child_node = _traverse(child, depth=depth + 1)
                        child_node.last = index == last_item_index
                        append(child_node)
                if max_length is not None and num_items > max_length:
                    append(Node(value_repr=f"... +{num_items - max_length}", last=True))
            else:
                node = Node(empty=empty, children=[], last=root)

            pop_visited(obj_id)
        else:
            node = Node(value_repr=to_repr(obj), last=root)
        node.is_tuple = _safe_isinstance(obj, tuple)
        node.is_namedtuple = _is_namedtuple(obj)
        return node

    node = _traverse(_object, root=True)
    return node


def pretty_repr(
    _object: Any,
    *,
    max_width: int = 80,
    indent_size: int = 4,
    max_length: Optional[int] = None,
    max_string: Optional[int] = None,
    max_depth: Optional[int] = None,
    expand_all: bool = False,
) -> str:
    """Prettify repr string by expanding on to new lines to fit within a given width.

    Args:
        _object (Any): Object to repr.
        max_width (int, optional): Desired maximum width of repr string. Defaults to 80.
        indent_size (int, optional): Number of spaces to indent. Defaults to 4.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
            Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structure, or None for no depth.
            Defaults to None.
        expand_all (bool, optional): Expand all containers regardless of available width. Defaults to False.

    Returns:
        str: A possibly multi-line representation of the object.
    """

    if _safe_isinstance(_object, Node):
        node = _object
    else:
        node = traverse(
            _object, max_length=max_length, max_string=max_string, max_depth=max_depth
        )
    repr_str: str = node.render(
        max_width=max_width, indent_size=indent_size, expand_all=expand_all
    )
    return repr_str


def pprint(
    _object: Any,
    *,
    console: Optional["Console"] = None,
    indent_guides: bool = True,
    max_length: Optional[int] = None,
    max_string: Optional[int] = None,
    max_depth: Optional[int] = None,
    expand_all: bool = False,
) -> None:
    """A convenience function for pretty printing.

    Args:
        _object (Any): Object to pretty print.
        console (Console, optional): Console instance, or None to use default. Defaults to None.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of strings before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth for nested data structures, or None for unlimited depth. Defaults to None.
        indent_guides (bool, optional): Enable indentation guides. Defaults to True.
        expand_all (bool, optional): Expand all containers. Defaults to False.
    """
    _console = get_console() if console is None else console
    _console.print(
        Pretty(
            _object,
            max_length=max_length,
            max_string=max_string,
            max_depth=max_depth,
            indent_guides=indent_guides,
            expand_all=expand_all,
            overflow="ignore",
        ),
        soft_wrap=True,
    )


if __name__ == "__main__":  # pragma: no cover

    class BrokenRepr:
        def __repr__(self) -> str:
            1 / 0
            return "this will fail"

    from typing import NamedTuple

    class StockKeepingUnit(NamedTuple):
        name: str
        description: str
        price: float
        category: str
        reviews: List[str]

    d = defaultdict(int)
    d["foo"] = 5
    data = {
        "foo": [
            1,
            "Hello World!",
            100.123,
            323.232,
            432324.0,
            {5, 6, 7, (1, 2, 3, 4), 8},
        ],
        "bar": frozenset({1, 2, 3}),
        "defaultdict": defaultdict(
            list, {"crumble": ["apple", "rhubarb", "butter", "sugar", "flour"]}
        ),
        "counter": Counter(
            [
                "apple",
                "orange",
                "pear",
                "kumquat",
                "kumquat",
                "durian" * 100,
            ]
        ),
        "atomic": (False, True, None),
        "namedtuple": StockKeepingUnit(
            "Sparkling British Spring Water",
            "Carbonated spring water",
            0.9,
            "water",
            ["its amazing!", "its terrible!"],
        ),
        "Broken": BrokenRepr(),
    }
    data["foo"].append(data)  # type: ignore[attr-defined]

    from pip._vendor.rich import print

    # print(Pretty(data, indent_guides=True, max_string=20))

    class Thing:
        def __repr__(self) -> str:
            return "Hello\x1b[38;5;239m World!"

    print(Pretty(Thing()))
python3.12/site-packages/pip/_vendor/rich/columns.py000064400000015733151732702170016332 0ustar00from collections import defaultdict
from itertools import chain
from operator import itemgetter
from typing import Dict, Iterable, List, Optional, Tuple

from .align import Align, AlignMethod
from .console import Console, ConsoleOptions, RenderableType, RenderResult
from .constrain import Constrain
from .measure import Measurement
from .padding import Padding, PaddingDimensions
from .table import Table
from .text import TextType
from .jupyter import JupyterMixin


class Columns(JupyterMixin):
    """Display renderables in neat columns.

    Args:
        renderables (Iterable[RenderableType]): Any number of Rich renderables (including str).
        width (int, optional): The desired width of the columns, or None to auto detect. Defaults to None.
        padding (PaddingDimensions, optional): Optional padding around cells. Defaults to (0, 1).
        expand (bool, optional): Expand columns to full width. Defaults to False.
        equal (bool, optional): Arrange in to equal sized columns. Defaults to False.
        column_first (bool, optional): Align items from top to bottom (rather than left to right). Defaults to False.
        right_to_left (bool, optional): Start column from right hand side. Defaults to False.
        align (str, optional): Align value ("left", "right", or "center") or None for default. Defaults to None.
        title (TextType, optional): Optional title for Columns.
    """

    def __init__(
        self,
        renderables: Optional[Iterable[RenderableType]] = None,
        padding: PaddingDimensions = (0, 1),
        *,
        width: Optional[int] = None,
        expand: bool = False,
        equal: bool = False,
        column_first: bool = False,
        right_to_left: bool = False,
        align: Optional[AlignMethod] = None,
        title: Optional[TextType] = None,
    ) -> None:
        self.renderables = list(renderables or [])
        self.width = width
        self.padding = padding
        self.expand = expand
        self.equal = equal
        self.column_first = column_first
        self.right_to_left = right_to_left
        self.align: Optional[AlignMethod] = align
        self.title = title

    def add_renderable(self, renderable: RenderableType) -> None:
        """Add a renderable to the columns.

        Args:
            renderable (RenderableType): Any renderable object.
        """
        self.renderables.append(renderable)

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        render_str = console.render_str
        renderables = [
            render_str(renderable) if isinstance(renderable, str) else renderable
            for renderable in self.renderables
        ]
        if not renderables:
            return
        _top, right, _bottom, left = Padding.unpack(self.padding)
        width_padding = max(left, right)
        max_width = options.max_width
        widths: Dict[int, int] = defaultdict(int)
        column_count = len(renderables)

        get_measurement = Measurement.get
        renderable_widths = [
            get_measurement(console, options, renderable).maximum
            for renderable in renderables
        ]
        if self.equal:
            renderable_widths = [max(renderable_widths)] * len(renderable_widths)

        def iter_renderables(
            column_count: int,
        ) -> Iterable[Tuple[int, Optional[RenderableType]]]:
            item_count = len(renderables)
            if self.column_first:
                width_renderables = list(zip(renderable_widths, renderables))

                column_lengths: List[int] = [item_count // column_count] * column_count
                for col_no in range(item_count % column_count):
                    column_lengths[col_no] += 1

                row_count = (item_count + column_count - 1) // column_count
                cells = [[-1] * column_count for _ in range(row_count)]
                row = col = 0
                for index in range(item_count):
                    cells[row][col] = index
                    column_lengths[col] -= 1
                    if column_lengths[col]:
                        row += 1
                    else:
                        col += 1
                        row = 0
                for index in chain.from_iterable(cells):
                    if index == -1:
                        break
                    yield width_renderables[index]
            else:
                yield from zip(renderable_widths, renderables)
            # Pad odd elements with spaces
            if item_count % column_count:
                for _ in range(column_count - (item_count % column_count)):
                    yield 0, None

        table = Table.grid(padding=self.padding, collapse_padding=True, pad_edge=False)
        table.expand = self.expand
        table.title = self.title

        if self.width is not None:
            column_count = (max_width) // (self.width + width_padding)
            for _ in range(column_count):
                table.add_column(width=self.width)
        else:
            while column_count > 1:
                widths.clear()
                column_no = 0
                for renderable_width, _ in iter_renderables(column_count):
                    widths[column_no] = max(widths[column_no], renderable_width)
                    total_width = sum(widths.values()) + width_padding * (
                        len(widths) - 1
                    )
                    if total_width > max_width:
                        column_count = len(widths) - 1
                        break
                    else:
                        column_no = (column_no + 1) % column_count
                else:
                    break

        get_renderable = itemgetter(1)
        _renderables = [
            get_renderable(_renderable)
            for _renderable in iter_renderables(column_count)
        ]
        if self.equal:
            _renderables = [
                None
                if renderable is None
                else Constrain(renderable, renderable_widths[0])
                for renderable in _renderables
            ]
        if self.align:
            align = self.align
            _Align = Align
            _renderables = [
                None if renderable is None else _Align(renderable, align)
                for renderable in _renderables
            ]

        right_to_left = self.right_to_left
        add_row = table.add_row
        for start in range(0, len(_renderables), column_count):
            row = _renderables[start : start + column_count]
            if right_to_left:
                row = row[::-1]
            add_row(*row)
        yield table


if __name__ == "__main__":  # pragma: no cover
    import os

    console = Console()

    files = [f"{i} {s}" for i, s in enumerate(sorted(os.listdir()))]
    columns = Columns(files, padding=(0, 1), expand=False, equal=False)
    console.print(columns)
    console.rule()
    columns.column_first = True
    console.print(columns)
    columns.right_to_left = True
    console.rule()
    console.print(columns)
python3.12/site-packages/pip/_vendor/rich/_fileno.py000064400000001437151732702170016261 0ustar00from __future__ import annotations

from typing import IO, Callable


def get_fileno(file_like: IO[str]) -> int | None:
    """Get fileno() from a file, accounting for poorly implemented file-like objects.

    Args:
        file_like (IO): A file-like object.

    Returns:
        int | None: The result of fileno if available, or None if operation failed.
    """
    fileno: Callable[[], int] | None = getattr(file_like, "fileno", None)
    if fileno is not None:
        try:
            return fileno()
        except Exception:
            # `fileno` is documented as potentially raising a OSError
            # Alas, from the issues, there are so many poorly implemented file-like objects,
            # that `fileno()` can raise just about anything.
            return None
    return None
python3.12/site-packages/pip/_vendor/rich/live.py000064400000033701151732702170015604 0ustar00import sys
from threading import Event, RLock, Thread
from types import TracebackType
from typing import IO, Any, Callable, List, Optional, TextIO, Type, cast

from . import get_console
from .console import Console, ConsoleRenderable, RenderableType, RenderHook
from .control import Control
from .file_proxy import FileProxy
from .jupyter import JupyterMixin
from .live_render import LiveRender, VerticalOverflowMethod
from .screen import Screen
from .text import Text


class _RefreshThread(Thread):
    """A thread that calls refresh() at regular intervals."""

    def __init__(self, live: "Live", refresh_per_second: float) -> None:
        self.live = live
        self.refresh_per_second = refresh_per_second
        self.done = Event()
        super().__init__(daemon=True)

    def stop(self) -> None:
        self.done.set()

    def run(self) -> None:
        while not self.done.wait(1 / self.refresh_per_second):
            with self.live._lock:
                if not self.done.is_set():
                    self.live.refresh()


class Live(JupyterMixin, RenderHook):
    """Renders an auto-updating live display of any given renderable.

    Args:
        renderable (RenderableType, optional): The renderable to live display. Defaults to displaying nothing.
        console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout.
        screen (bool, optional): Enable alternate screen mode. Defaults to False.
        auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()` or `update()` with refresh flag. Defaults to True
        refresh_per_second (float, optional): Number of times per second to refresh the live display. Defaults to 4.
        transient (bool, optional): Clear the renderable on exit (has no effect when screen=True). Defaults to False.
        redirect_stdout (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
        redirect_stderr (bool, optional): Enable redirection of stderr. Defaults to True.
        vertical_overflow (VerticalOverflowMethod, optional): How to handle renderable when it is too tall for the console. Defaults to "ellipsis".
        get_renderable (Callable[[], RenderableType], optional): Optional callable to get renderable. Defaults to None.
    """

    def __init__(
        self,
        renderable: Optional[RenderableType] = None,
        *,
        console: Optional[Console] = None,
        screen: bool = False,
        auto_refresh: bool = True,
        refresh_per_second: float = 4,
        transient: bool = False,
        redirect_stdout: bool = True,
        redirect_stderr: bool = True,
        vertical_overflow: VerticalOverflowMethod = "ellipsis",
        get_renderable: Optional[Callable[[], RenderableType]] = None,
    ) -> None:
        assert refresh_per_second > 0, "refresh_per_second must be > 0"
        self._renderable = renderable
        self.console = console if console is not None else get_console()
        self._screen = screen
        self._alt_screen = False

        self._redirect_stdout = redirect_stdout
        self._redirect_stderr = redirect_stderr
        self._restore_stdout: Optional[IO[str]] = None
        self._restore_stderr: Optional[IO[str]] = None

        self._lock = RLock()
        self.ipy_widget: Optional[Any] = None
        self.auto_refresh = auto_refresh
        self._started: bool = False
        self.transient = True if screen else transient

        self._refresh_thread: Optional[_RefreshThread] = None
        self.refresh_per_second = refresh_per_second

        self.vertical_overflow = vertical_overflow
        self._get_renderable = get_renderable
        self._live_render = LiveRender(
            self.get_renderable(), vertical_overflow=vertical_overflow
        )

    @property
    def is_started(self) -> bool:
        """Check if live display has been started."""
        return self._started

    def get_renderable(self) -> RenderableType:
        renderable = (
            self._get_renderable()
            if self._get_renderable is not None
            else self._renderable
        )
        return renderable or ""

    def start(self, refresh: bool = False) -> None:
        """Start live rendering display.

        Args:
            refresh (bool, optional): Also refresh. Defaults to False.
        """
        with self._lock:
            if self._started:
                return
            self.console.set_live(self)
            self._started = True
            if self._screen:
                self._alt_screen = self.console.set_alt_screen(True)
            self.console.show_cursor(False)
            self._enable_redirect_io()
            self.console.push_render_hook(self)
            if refresh:
                try:
                    self.refresh()
                except Exception:
                    # If refresh fails, we want to stop the redirection of sys.stderr,
                    # so the error stacktrace is properly displayed in the terminal.
                    # (or, if the code that calls Rich captures the exception and wants to display something,
                    # let this be displayed in the terminal).
                    self.stop()
                    raise
            if self.auto_refresh:
                self._refresh_thread = _RefreshThread(self, self.refresh_per_second)
                self._refresh_thread.start()

    def stop(self) -> None:
        """Stop live rendering display."""
        with self._lock:
            if not self._started:
                return
            self.console.clear_live()
            self._started = False

            if self.auto_refresh and self._refresh_thread is not None:
                self._refresh_thread.stop()
                self._refresh_thread = None
            # allow it to fully render on the last even if overflow
            self.vertical_overflow = "visible"
            with self.console:
                try:
                    if not self._alt_screen and not self.console.is_jupyter:
                        self.refresh()
                finally:
                    self._disable_redirect_io()
                    self.console.pop_render_hook()
                    if not self._alt_screen and self.console.is_terminal:
                        self.console.line()
                    self.console.show_cursor(True)
                    if self._alt_screen:
                        self.console.set_alt_screen(False)

                    if self.transient and not self._alt_screen:
                        self.console.control(self._live_render.restore_cursor())
                    if self.ipy_widget is not None and self.transient:
                        self.ipy_widget.close()  # pragma: no cover

    def __enter__(self) -> "Live":
        self.start(refresh=self._renderable is not None)
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self.stop()

    def _enable_redirect_io(self) -> None:
        """Enable redirecting of stdout / stderr."""
        if self.console.is_terminal or self.console.is_jupyter:
            if self._redirect_stdout and not isinstance(sys.stdout, FileProxy):
                self._restore_stdout = sys.stdout
                sys.stdout = cast("TextIO", FileProxy(self.console, sys.stdout))
            if self._redirect_stderr and not isinstance(sys.stderr, FileProxy):
                self._restore_stderr = sys.stderr
                sys.stderr = cast("TextIO", FileProxy(self.console, sys.stderr))

    def _disable_redirect_io(self) -> None:
        """Disable redirecting of stdout / stderr."""
        if self._restore_stdout:
            sys.stdout = cast("TextIO", self._restore_stdout)
            self._restore_stdout = None
        if self._restore_stderr:
            sys.stderr = cast("TextIO", self._restore_stderr)
            self._restore_stderr = None

    @property
    def renderable(self) -> RenderableType:
        """Get the renderable that is being displayed

        Returns:
            RenderableType: Displayed renderable.
        """
        renderable = self.get_renderable()
        return Screen(renderable) if self._alt_screen else renderable

    def update(self, renderable: RenderableType, *, refresh: bool = False) -> None:
        """Update the renderable that is being displayed

        Args:
            renderable (RenderableType): New renderable to use.
            refresh (bool, optional): Refresh the display. Defaults to False.
        """
        if isinstance(renderable, str):
            renderable = self.console.render_str(renderable)
        with self._lock:
            self._renderable = renderable
            if refresh:
                self.refresh()

    def refresh(self) -> None:
        """Update the display of the Live Render."""
        with self._lock:
            self._live_render.set_renderable(self.renderable)
            if self.console.is_jupyter:  # pragma: no cover
                try:
                    from IPython.display import display
                    from ipywidgets import Output
                except ImportError:
                    import warnings

                    warnings.warn('install "ipywidgets" for Jupyter support')
                else:
                    if self.ipy_widget is None:
                        self.ipy_widget = Output()
                        display(self.ipy_widget)

                    with self.ipy_widget:
                        self.ipy_widget.clear_output(wait=True)
                        self.console.print(self._live_render.renderable)
            elif self.console.is_terminal and not self.console.is_dumb_terminal:
                with self.console:
                    self.console.print(Control())
            elif (
                not self._started and not self.transient
            ):  # if it is finished allow files or dumb-terminals to see final result
                with self.console:
                    self.console.print(Control())

    def process_renderables(
        self, renderables: List[ConsoleRenderable]
    ) -> List[ConsoleRenderable]:
        """Process renderables to restore cursor and display progress."""
        self._live_render.vertical_overflow = self.vertical_overflow
        if self.console.is_interactive:
            # lock needs acquiring as user can modify live_render renderable at any time unlike in Progress.
            with self._lock:
                reset = (
                    Control.home()
                    if self._alt_screen
                    else self._live_render.position_cursor()
                )
                renderables = [reset, *renderables, self._live_render]
        elif (
            not self._started and not self.transient
        ):  # if it is finished render the final output for files or dumb_terminals
            renderables = [*renderables, self._live_render]

        return renderables


if __name__ == "__main__":  # pragma: no cover
    import random
    import time
    from itertools import cycle
    from typing import Dict, List, Tuple

    from .align import Align
    from .console import Console
    from .live import Live as Live
    from .panel import Panel
    from .rule import Rule
    from .syntax import Syntax
    from .table import Table

    console = Console()

    syntax = Syntax(
        '''def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_value''',
        "python",
        line_numbers=True,
    )

    table = Table("foo", "bar", "baz")
    table.add_row("1", "2", "3")

    progress_renderables = [
        "You can make the terminal shorter and taller to see the live table hide"
        "Text may be printed while the progress bars are rendering.",
        Panel("In fact, [i]any[/i] renderable will work"),
        "Such as [magenta]tables[/]...",
        table,
        "Pretty printed structures...",
        {"type": "example", "text": "Pretty printed"},
        "Syntax...",
        syntax,
        Rule("Give it a try!"),
    ]

    examples = cycle(progress_renderables)

    exchanges = [
        "SGD",
        "MYR",
        "EUR",
        "USD",
        "AUD",
        "JPY",
        "CNH",
        "HKD",
        "CAD",
        "INR",
        "DKK",
        "GBP",
        "RUB",
        "NZD",
        "MXN",
        "IDR",
        "TWD",
        "THB",
        "VND",
    ]
    with Live(console=console) as live_table:
        exchange_rate_dict: Dict[Tuple[str, str], float] = {}

        for index in range(100):
            select_exchange = exchanges[index % len(exchanges)]

            for exchange in exchanges:
                if exchange == select_exchange:
                    continue
                time.sleep(0.4)
                if random.randint(0, 10) < 1:
                    console.log(next(examples))
                exchange_rate_dict[(select_exchange, exchange)] = 200 / (
                    (random.random() * 320) + 1
                )
                if len(exchange_rate_dict) > len(exchanges) - 1:
                    exchange_rate_dict.pop(list(exchange_rate_dict.keys())[0])
                table = Table(title="Exchange Rates")

                table.add_column("Source Currency")
                table.add_column("Destination Currency")
                table.add_column("Exchange Rate")

                for ((source, dest), exchange_rate) in exchange_rate_dict.items():
                    table.add_row(
                        source,
                        dest,
                        Text(
                            f"{exchange_rate:.4f}",
                            style="red" if exchange_rate < 1.0 else "green",
                        ),
                    )

                live_table.update(Align.center(table))
python3.12/site-packages/pip/_vendor/rich/repr.py000064400000010517151732702170015615 0ustar00import inspect
from functools import partial
from typing import (
    Any,
    Callable,
    Iterable,
    List,
    Optional,
    Tuple,
    Type,
    TypeVar,
    Union,
    overload,
)

T = TypeVar("T")


Result = Iterable[Union[Any, Tuple[Any], Tuple[str, Any], Tuple[str, Any, Any]]]
RichReprResult = Result


class ReprError(Exception):
    """An error occurred when attempting to build a repr."""


@overload
def auto(cls: Optional[Type[T]]) -> Type[T]:
    ...


@overload
def auto(*, angular: bool = False) -> Callable[[Type[T]], Type[T]]:
    ...


def auto(
    cls: Optional[Type[T]] = None, *, angular: Optional[bool] = None
) -> Union[Type[T], Callable[[Type[T]], Type[T]]]:
    """Class decorator to create __repr__ from __rich_repr__"""

    def do_replace(cls: Type[T], angular: Optional[bool] = None) -> Type[T]:
        def auto_repr(self: T) -> str:
            """Create repr string from __rich_repr__"""
            repr_str: List[str] = []
            append = repr_str.append

            angular: bool = getattr(self.__rich_repr__, "angular", False)  # type: ignore[attr-defined]
            for arg in self.__rich_repr__():  # type: ignore[attr-defined]
                if isinstance(arg, tuple):
                    if len(arg) == 1:
                        append(repr(arg[0]))
                    else:
                        key, value, *default = arg
                        if key is None:
                            append(repr(value))
                        else:
                            if default and default[0] == value:
                                continue
                            append(f"{key}={value!r}")
                else:
                    append(repr(arg))
            if angular:
                return f"<{self.__class__.__name__} {' '.join(repr_str)}>"
            else:
                return f"{self.__class__.__name__}({', '.join(repr_str)})"

        def auto_rich_repr(self: Type[T]) -> Result:
            """Auto generate __rich_rep__ from signature of __init__"""
            try:
                signature = inspect.signature(self.__init__)
                for name, param in signature.parameters.items():
                    if param.kind == param.POSITIONAL_ONLY:
                        yield getattr(self, name)
                    elif param.kind in (
                        param.POSITIONAL_OR_KEYWORD,
                        param.KEYWORD_ONLY,
                    ):
                        if param.default == param.empty:
                            yield getattr(self, param.name)
                        else:
                            yield param.name, getattr(self, param.name), param.default
            except Exception as error:
                raise ReprError(
                    f"Failed to auto generate __rich_repr__; {error}"
                ) from None

        if not hasattr(cls, "__rich_repr__"):
            auto_rich_repr.__doc__ = "Build a rich repr"
            cls.__rich_repr__ = auto_rich_repr  # type: ignore[attr-defined]

        auto_repr.__doc__ = "Return repr(self)"
        cls.__repr__ = auto_repr  # type: ignore[assignment]
        if angular is not None:
            cls.__rich_repr__.angular = angular  # type: ignore[attr-defined]
        return cls

    if cls is None:
        return partial(do_replace, angular=angular)
    else:
        return do_replace(cls, angular=angular)


@overload
def rich_repr(cls: Optional[Type[T]]) -> Type[T]:
    ...


@overload
def rich_repr(*, angular: bool = False) -> Callable[[Type[T]], Type[T]]:
    ...


def rich_repr(
    cls: Optional[Type[T]] = None, *, angular: bool = False
) -> Union[Type[T], Callable[[Type[T]], Type[T]]]:
    if cls is None:
        return auto(angular=angular)
    else:
        return auto(cls)


if __name__ == "__main__":

    @auto
    class Foo:
        def __rich_repr__(self) -> Result:
            yield "foo"
            yield "bar", {"shopping": ["eggs", "ham", "pineapple"]}
            yield "buy", "hand sanitizer"

    foo = Foo()
    from pip._vendor.rich.console import Console

    console = Console()

    console.rule("Standard repr")
    console.print(foo)

    console.print(foo, width=60)
    console.print(foo, width=30)

    console.rule("Angular repr")
    Foo.__rich_repr__.angular = True  # type: ignore[attr-defined]

    console.print(foo)

    console.print(foo, width=60)
    console.print(foo, width=30)
python3.12/site-packages/pip/_vendor/rich/scope.py000064400000005433151732702170015757 0ustar00from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, Optional, Tuple

from .highlighter import ReprHighlighter
from .panel import Panel
from .pretty import Pretty
from .table import Table
from .text import Text, TextType

if TYPE_CHECKING:
    from .console import ConsoleRenderable


def render_scope(
    scope: "Mapping[str, Any]",
    *,
    title: Optional[TextType] = None,
    sort_keys: bool = True,
    indent_guides: bool = False,
    max_length: Optional[int] = None,
    max_string: Optional[int] = None,
) -> "ConsoleRenderable":
    """Render python variables in a given scope.

    Args:
        scope (Mapping): A mapping containing variable names and values.
        title (str, optional): Optional title. Defaults to None.
        sort_keys (bool, optional): Enable sorting of items. Defaults to True.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.

    Returns:
        ConsoleRenderable: A renderable object.
    """
    highlighter = ReprHighlighter()
    items_table = Table.grid(padding=(0, 1), expand=False)
    items_table.add_column(justify="right")

    def sort_items(item: Tuple[str, Any]) -> Tuple[bool, str]:
        """Sort special variables first, then alphabetically."""
        key, _ = item
        return (not key.startswith("__"), key.lower())

    items = sorted(scope.items(), key=sort_items) if sort_keys else scope.items()
    for key, value in items:
        key_text = Text.assemble(
            (key, "scope.key.special" if key.startswith("__") else "scope.key"),
            (" =", "scope.equals"),
        )
        items_table.add_row(
            key_text,
            Pretty(
                value,
                highlighter=highlighter,
                indent_guides=indent_guides,
                max_length=max_length,
                max_string=max_string,
            ),
        )
    return Panel.fit(
        items_table,
        title=title,
        border_style="scope.border",
        padding=(0, 1),
    )


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich import print

    print()

    def test(foo: float, bar: float) -> None:
        list_of_things = [1, 2, 3, None, 4, True, False, "Hello World"]
        dict_of_things = {
            "version": "1.1",
            "method": "confirmFruitPurchase",
            "params": [["apple", "orange", "mangoes", "pomelo"], 1.123],
            "id": "194521489",
        }
        print(render_scope(locals(), title="[i]locals", sort_keys=False))

    test(20.3423, 3.1427)
    print()
python3.12/site-packages/pip/_vendor/rich/_timer.py000064400000000641151732702200016113 0ustar00"""
Timer context manager, only used in debug.

"""

from time import time

import contextlib
from typing import Generator


@contextlib.contextmanager
def timer(subject: str = "time") -> Generator[None, None, None]:
    """print the elapsed time. (only used in debugging)"""
    start = time()
    yield
    elapsed = time() - start
    elapsed_ms = elapsed * 1000
    print(f"{subject} elapsed {elapsed_ms:.1f}ms")
python3.12/site-packages/pip/_vendor/rich/ansi.py000064400000015372151732702200015575 0ustar00import re
import sys
from contextlib import suppress
from typing import Iterable, NamedTuple, Optional

from .color import Color
from .style import Style
from .text import Text

re_ansi = re.compile(
    r"""
(?:\x1b\](.*?)\x1b\\)|
(?:\x1b([(@-Z\\-_]|\[[0-?]*[ -/]*[@-~]))
""",
    re.VERBOSE,
)


class _AnsiToken(NamedTuple):
    """Result of ansi tokenized string."""

    plain: str = ""
    sgr: Optional[str] = ""
    osc: Optional[str] = ""


def _ansi_tokenize(ansi_text: str) -> Iterable[_AnsiToken]:
    """Tokenize a string in to plain text and ANSI codes.

    Args:
        ansi_text (str): A String containing ANSI codes.

    Yields:
        AnsiToken: A named tuple of (plain, sgr, osc)
    """

    position = 0
    sgr: Optional[str]
    osc: Optional[str]
    for match in re_ansi.finditer(ansi_text):
        start, end = match.span(0)
        osc, sgr = match.groups()
        if start > position:
            yield _AnsiToken(ansi_text[position:start])
        if sgr:
            if sgr == "(":
                position = end + 1
                continue
            if sgr.endswith("m"):
                yield _AnsiToken("", sgr[1:-1], osc)
        else:
            yield _AnsiToken("", sgr, osc)
        position = end
    if position < len(ansi_text):
        yield _AnsiToken(ansi_text[position:])


SGR_STYLE_MAP = {
    1: "bold",
    2: "dim",
    3: "italic",
    4: "underline",
    5: "blink",
    6: "blink2",
    7: "reverse",
    8: "conceal",
    9: "strike",
    21: "underline2",
    22: "not dim not bold",
    23: "not italic",
    24: "not underline",
    25: "not blink",
    26: "not blink2",
    27: "not reverse",
    28: "not conceal",
    29: "not strike",
    30: "color(0)",
    31: "color(1)",
    32: "color(2)",
    33: "color(3)",
    34: "color(4)",
    35: "color(5)",
    36: "color(6)",
    37: "color(7)",
    39: "default",
    40: "on color(0)",
    41: "on color(1)",
    42: "on color(2)",
    43: "on color(3)",
    44: "on color(4)",
    45: "on color(5)",
    46: "on color(6)",
    47: "on color(7)",
    49: "on default",
    51: "frame",
    52: "encircle",
    53: "overline",
    54: "not frame not encircle",
    55: "not overline",
    90: "color(8)",
    91: "color(9)",
    92: "color(10)",
    93: "color(11)",
    94: "color(12)",
    95: "color(13)",
    96: "color(14)",
    97: "color(15)",
    100: "on color(8)",
    101: "on color(9)",
    102: "on color(10)",
    103: "on color(11)",
    104: "on color(12)",
    105: "on color(13)",
    106: "on color(14)",
    107: "on color(15)",
}


class AnsiDecoder:
    """Translate ANSI code in to styled Text."""

    def __init__(self) -> None:
        self.style = Style.null()

    def decode(self, terminal_text: str) -> Iterable[Text]:
        """Decode ANSI codes in an iterable of lines.

        Args:
            lines (Iterable[str]): An iterable of lines of terminal output.

        Yields:
            Text: Marked up Text.
        """
        for line in terminal_text.splitlines():
            yield self.decode_line(line)

    def decode_line(self, line: str) -> Text:
        """Decode a line containing ansi codes.

        Args:
            line (str): A line of terminal output.

        Returns:
            Text: A Text instance marked up according to ansi codes.
        """
        from_ansi = Color.from_ansi
        from_rgb = Color.from_rgb
        _Style = Style
        text = Text()
        append = text.append
        line = line.rsplit("\r", 1)[-1]
        for plain_text, sgr, osc in _ansi_tokenize(line):
            if plain_text:
                append(plain_text, self.style or None)
            elif osc is not None:
                if osc.startswith("8;"):
                    _params, semicolon, link = osc[2:].partition(";")
                    if semicolon:
                        self.style = self.style.update_link(link or None)
            elif sgr is not None:
                # Translate in to semi-colon separated codes
                # Ignore invalid codes, because we want to be lenient
                codes = [
                    min(255, int(_code) if _code else 0)
                    for _code in sgr.split(";")
                    if _code.isdigit() or _code == ""
                ]
                iter_codes = iter(codes)
                for code in iter_codes:
                    if code == 0:
                        # reset
                        self.style = _Style.null()
                    elif code in SGR_STYLE_MAP:
                        # styles
                        self.style += _Style.parse(SGR_STYLE_MAP[code])
                    elif code == 38:
                        #  Foreground
                        with suppress(StopIteration):
                            color_type = next(iter_codes)
                            if color_type == 5:
                                self.style += _Style.from_color(
                                    from_ansi(next(iter_codes))
                                )
                            elif color_type == 2:
                                self.style += _Style.from_color(
                                    from_rgb(
                                        next(iter_codes),
                                        next(iter_codes),
                                        next(iter_codes),
                                    )
                                )
                    elif code == 48:
                        # Background
                        with suppress(StopIteration):
                            color_type = next(iter_codes)
                            if color_type == 5:
                                self.style += _Style.from_color(
                                    None, from_ansi(next(iter_codes))
                                )
                            elif color_type == 2:
                                self.style += _Style.from_color(
                                    None,
                                    from_rgb(
                                        next(iter_codes),
                                        next(iter_codes),
                                        next(iter_codes),
                                    ),
                                )

        return text


if sys.platform != "win32" and __name__ == "__main__":  # pragma: no cover
    import io
    import os
    import pty
    import sys

    decoder = AnsiDecoder()

    stdout = io.BytesIO()

    def read(fd: int) -> bytes:
        data = os.read(fd, 1024)
        stdout.write(data)
        return data

    pty.spawn(sys.argv[1:], read)

    from .console import Console

    console = Console(record=True)

    stdout_result = stdout.getvalue().decode("utf-8")
    print(stdout_result)

    for line in decoder.decode(stdout_result):
        console.print(line)

    console.save_html("stdout.html")
python3.12/site-packages/pip/_vendor/rich/emoji.py000064400000004705151732702200015744 0ustar00import sys
from typing import TYPE_CHECKING, Optional, Union

from .jupyter import JupyterMixin
from .segment import Segment
from .style import Style
from ._emoji_codes import EMOJI
from ._emoji_replace import _emoji_replace

if sys.version_info >= (3, 8):
    from typing import Literal
else:
    from pip._vendor.typing_extensions import Literal  # pragma: no cover


if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderResult


EmojiVariant = Literal["emoji", "text"]


class NoEmoji(Exception):
    """No emoji by that name."""


class Emoji(JupyterMixin):
    __slots__ = ["name", "style", "_char", "variant"]

    VARIANTS = {"text": "\uFE0E", "emoji": "\uFE0F"}

    def __init__(
        self,
        name: str,
        style: Union[str, Style] = "none",
        variant: Optional[EmojiVariant] = None,
    ) -> None:
        """A single emoji character.

        Args:
            name (str): Name of emoji.
            style (Union[str, Style], optional): Optional style. Defaults to None.

        Raises:
            NoEmoji: If the emoji doesn't exist.
        """
        self.name = name
        self.style = style
        self.variant = variant
        try:
            self._char = EMOJI[name]
        except KeyError:
            raise NoEmoji(f"No emoji called {name!r}")
        if variant is not None:
            self._char += self.VARIANTS.get(variant, "")

    @classmethod
    def replace(cls, text: str) -> str:
        """Replace emoji markup with corresponding unicode characters.

        Args:
            text (str): A string with emojis codes, e.g. "Hello :smiley:!"

        Returns:
            str: A string with emoji codes replaces with actual emoji.
        """
        return _emoji_replace(text)

    def __repr__(self) -> str:
        return f"<emoji {self.name!r}>"

    def __str__(self) -> str:
        return self._char

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        yield Segment(self._char, console.get_style(self.style))


if __name__ == "__main__":  # pragma: no cover
    import sys

    from pip._vendor.rich.columns import Columns
    from pip._vendor.rich.console import Console

    console = Console(record=True)

    columns = Columns(
        (f":{name}: {name}" for name in sorted(EMOJI.keys()) if "\u200D" not in name),
        column_first=True,
    )

    console.print(columns)
    if len(sys.argv) > 1:
        console.save_html(sys.argv[1])
python3.12/site-packages/pip/_vendor/rich/containers.py000064400000012571151732702210017007 0ustar00from itertools import zip_longest
from typing import (
    Iterator,
    Iterable,
    List,
    Optional,
    Union,
    overload,
    TypeVar,
    TYPE_CHECKING,
)

if TYPE_CHECKING:
    from .console import (
        Console,
        ConsoleOptions,
        JustifyMethod,
        OverflowMethod,
        RenderResult,
        RenderableType,
    )
    from .text import Text

from .cells import cell_len
from .measure import Measurement

T = TypeVar("T")


class Renderables:
    """A list subclass which renders its contents to the console."""

    def __init__(
        self, renderables: Optional[Iterable["RenderableType"]] = None
    ) -> None:
        self._renderables: List["RenderableType"] = (
            list(renderables) if renderables is not None else []
        )

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        """Console render method to insert line-breaks."""
        yield from self._renderables

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "Measurement":
        dimensions = [
            Measurement.get(console, options, renderable)
            for renderable in self._renderables
        ]
        if not dimensions:
            return Measurement(1, 1)
        _min = max(dimension.minimum for dimension in dimensions)
        _max = max(dimension.maximum for dimension in dimensions)
        return Measurement(_min, _max)

    def append(self, renderable: "RenderableType") -> None:
        self._renderables.append(renderable)

    def __iter__(self) -> Iterable["RenderableType"]:
        return iter(self._renderables)


class Lines:
    """A list subclass which can render to the console."""

    def __init__(self, lines: Iterable["Text"] = ()) -> None:
        self._lines: List["Text"] = list(lines)

    def __repr__(self) -> str:
        return f"Lines({self._lines!r})"

    def __iter__(self) -> Iterator["Text"]:
        return iter(self._lines)

    @overload
    def __getitem__(self, index: int) -> "Text":
        ...

    @overload
    def __getitem__(self, index: slice) -> List["Text"]:
        ...

    def __getitem__(self, index: Union[slice, int]) -> Union["Text", List["Text"]]:
        return self._lines[index]

    def __setitem__(self, index: int, value: "Text") -> "Lines":
        self._lines[index] = value
        return self

    def __len__(self) -> int:
        return self._lines.__len__()

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        """Console render method to insert line-breaks."""
        yield from self._lines

    def append(self, line: "Text") -> None:
        self._lines.append(line)

    def extend(self, lines: Iterable["Text"]) -> None:
        self._lines.extend(lines)

    def pop(self, index: int = -1) -> "Text":
        return self._lines.pop(index)

    def justify(
        self,
        console: "Console",
        width: int,
        justify: "JustifyMethod" = "left",
        overflow: "OverflowMethod" = "fold",
    ) -> None:
        """Justify and overflow text to a given width.

        Args:
            console (Console): Console instance.
            width (int): Number of characters per line.
            justify (str, optional): Default justify method for text: "left", "center", "full" or "right". Defaults to "left".
            overflow (str, optional): Default overflow for text: "crop", "fold", or "ellipsis". Defaults to "fold".

        """
        from .text import Text

        if justify == "left":
            for line in self._lines:
                line.truncate(width, overflow=overflow, pad=True)
        elif justify == "center":
            for line in self._lines:
                line.rstrip()
                line.truncate(width, overflow=overflow)
                line.pad_left((width - cell_len(line.plain)) // 2)
                line.pad_right(width - cell_len(line.plain))
        elif justify == "right":
            for line in self._lines:
                line.rstrip()
                line.truncate(width, overflow=overflow)
                line.pad_left(width - cell_len(line.plain))
        elif justify == "full":
            for line_index, line in enumerate(self._lines):
                if line_index == len(self._lines) - 1:
                    break
                words = line.split(" ")
                words_size = sum(cell_len(word.plain) for word in words)
                num_spaces = len(words) - 1
                spaces = [1 for _ in range(num_spaces)]
                index = 0
                if spaces:
                    while words_size + num_spaces < width:
                        spaces[len(spaces) - index - 1] += 1
                        num_spaces += 1
                        index = (index + 1) % len(spaces)
                tokens: List[Text] = []
                for index, (word, next_word) in enumerate(
                    zip_longest(words, words[1:])
                ):
                    tokens.append(word)
                    if index < len(spaces):
                        style = word.get_style_at_offset(console, -1)
                        next_style = next_word.get_style_at_offset(console, 0)
                        space_style = style if style == next_style else line.style
                        tokens.append(Text(" " * spaces[index], style=space_style))
                self[line_index] = Text("").join(tokens)
python3.12/site-packages/pip/_vendor/rich/py.typed000064400000000000151732702210015747 0ustar00python3.12/site-packages/pip/_vendor/rich/_palettes.py000064400000015627151732702210016627 0ustar00from .palette import Palette


# Taken from https://en.wikipedia.org/wiki/ANSI_escape_code (Windows 10 column)
WINDOWS_PALETTE = Palette(
    [
        (12, 12, 12),
        (197, 15, 31),
        (19, 161, 14),
        (193, 156, 0),
        (0, 55, 218),
        (136, 23, 152),
        (58, 150, 221),
        (204, 204, 204),
        (118, 118, 118),
        (231, 72, 86),
        (22, 198, 12),
        (249, 241, 165),
        (59, 120, 255),
        (180, 0, 158),
        (97, 214, 214),
        (242, 242, 242),
    ]
)

# # The standard ansi colors (including bright variants)
STANDARD_PALETTE = Palette(
    [
        (0, 0, 0),
        (170, 0, 0),
        (0, 170, 0),
        (170, 85, 0),
        (0, 0, 170),
        (170, 0, 170),
        (0, 170, 170),
        (170, 170, 170),
        (85, 85, 85),
        (255, 85, 85),
        (85, 255, 85),
        (255, 255, 85),
        (85, 85, 255),
        (255, 85, 255),
        (85, 255, 255),
        (255, 255, 255),
    ]
)


# The 256 color palette
EIGHT_BIT_PALETTE = Palette(
    [
        (0, 0, 0),
        (128, 0, 0),
        (0, 128, 0),
        (128, 128, 0),
        (0, 0, 128),
        (128, 0, 128),
        (0, 128, 128),
        (192, 192, 192),
        (128, 128, 128),
        (255, 0, 0),
        (0, 255, 0),
        (255, 255, 0),
        (0, 0, 255),
        (255, 0, 255),
        (0, 255, 255),
        (255, 255, 255),
        (0, 0, 0),
        (0, 0, 95),
        (0, 0, 135),
        (0, 0, 175),
        (0, 0, 215),
        (0, 0, 255),
        (0, 95, 0),
        (0, 95, 95),
        (0, 95, 135),
        (0, 95, 175),
        (0, 95, 215),
        (0, 95, 255),
        (0, 135, 0),
        (0, 135, 95),
        (0, 135, 135),
        (0, 135, 175),
        (0, 135, 215),
        (0, 135, 255),
        (0, 175, 0),
        (0, 175, 95),
        (0, 175, 135),
        (0, 175, 175),
        (0, 175, 215),
        (0, 175, 255),
        (0, 215, 0),
        (0, 215, 95),
        (0, 215, 135),
        (0, 215, 175),
        (0, 215, 215),
        (0, 215, 255),
        (0, 255, 0),
        (0, 255, 95),
        (0, 255, 135),
        (0, 255, 175),
        (0, 255, 215),
        (0, 255, 255),
        (95, 0, 0),
        (95, 0, 95),
        (95, 0, 135),
        (95, 0, 175),
        (95, 0, 215),
        (95, 0, 255),
        (95, 95, 0),
        (95, 95, 95),
        (95, 95, 135),
        (95, 95, 175),
        (95, 95, 215),
        (95, 95, 255),
        (95, 135, 0),
        (95, 135, 95),
        (95, 135, 135),
        (95, 135, 175),
        (95, 135, 215),
        (95, 135, 255),
        (95, 175, 0),
        (95, 175, 95),
        (95, 175, 135),
        (95, 175, 175),
        (95, 175, 215),
        (95, 175, 255),
        (95, 215, 0),
        (95, 215, 95),
        (95, 215, 135),
        (95, 215, 175),
        (95, 215, 215),
        (95, 215, 255),
        (95, 255, 0),
        (95, 255, 95),
        (95, 255, 135),
        (95, 255, 175),
        (95, 255, 215),
        (95, 255, 255),
        (135, 0, 0),
        (135, 0, 95),
        (135, 0, 135),
        (135, 0, 175),
        (135, 0, 215),
        (135, 0, 255),
        (135, 95, 0),
        (135, 95, 95),
        (135, 95, 135),
        (135, 95, 175),
        (135, 95, 215),
        (135, 95, 255),
        (135, 135, 0),
        (135, 135, 95),
        (135, 135, 135),
        (135, 135, 175),
        (135, 135, 215),
        (135, 135, 255),
        (135, 175, 0),
        (135, 175, 95),
        (135, 175, 135),
        (135, 175, 175),
        (135, 175, 215),
        (135, 175, 255),
        (135, 215, 0),
        (135, 215, 95),
        (135, 215, 135),
        (135, 215, 175),
        (135, 215, 215),
        (135, 215, 255),
        (135, 255, 0),
        (135, 255, 95),
        (135, 255, 135),
        (135, 255, 175),
        (135, 255, 215),
        (135, 255, 255),
        (175, 0, 0),
        (175, 0, 95),
        (175, 0, 135),
        (175, 0, 175),
        (175, 0, 215),
        (175, 0, 255),
        (175, 95, 0),
        (175, 95, 95),
        (175, 95, 135),
        (175, 95, 175),
        (175, 95, 215),
        (175, 95, 255),
        (175, 135, 0),
        (175, 135, 95),
        (175, 135, 135),
        (175, 135, 175),
        (175, 135, 215),
        (175, 135, 255),
        (175, 175, 0),
        (175, 175, 95),
        (175, 175, 135),
        (175, 175, 175),
        (175, 175, 215),
        (175, 175, 255),
        (175, 215, 0),
        (175, 215, 95),
        (175, 215, 135),
        (175, 215, 175),
        (175, 215, 215),
        (175, 215, 255),
        (175, 255, 0),
        (175, 255, 95),
        (175, 255, 135),
        (175, 255, 175),
        (175, 255, 215),
        (175, 255, 255),
        (215, 0, 0),
        (215, 0, 95),
        (215, 0, 135),
        (215, 0, 175),
        (215, 0, 215),
        (215, 0, 255),
        (215, 95, 0),
        (215, 95, 95),
        (215, 95, 135),
        (215, 95, 175),
        (215, 95, 215),
        (215, 95, 255),
        (215, 135, 0),
        (215, 135, 95),
        (215, 135, 135),
        (215, 135, 175),
        (215, 135, 215),
        (215, 135, 255),
        (215, 175, 0),
        (215, 175, 95),
        (215, 175, 135),
        (215, 175, 175),
        (215, 175, 215),
        (215, 175, 255),
        (215, 215, 0),
        (215, 215, 95),
        (215, 215, 135),
        (215, 215, 175),
        (215, 215, 215),
        (215, 215, 255),
        (215, 255, 0),
        (215, 255, 95),
        (215, 255, 135),
        (215, 255, 175),
        (215, 255, 215),
        (215, 255, 255),
        (255, 0, 0),
        (255, 0, 95),
        (255, 0, 135),
        (255, 0, 175),
        (255, 0, 215),
        (255, 0, 255),
        (255, 95, 0),
        (255, 95, 95),
        (255, 95, 135),
        (255, 95, 175),
        (255, 95, 215),
        (255, 95, 255),
        (255, 135, 0),
        (255, 135, 95),
        (255, 135, 135),
        (255, 135, 175),
        (255, 135, 215),
        (255, 135, 255),
        (255, 175, 0),
        (255, 175, 95),
        (255, 175, 135),
        (255, 175, 175),
        (255, 175, 215),
        (255, 175, 255),
        (255, 215, 0),
        (255, 215, 95),
        (255, 215, 135),
        (255, 215, 175),
        (255, 215, 215),
        (255, 215, 255),
        (255, 255, 0),
        (255, 255, 95),
        (255, 255, 135),
        (255, 255, 175),
        (255, 255, 215),
        (255, 255, 255),
        (8, 8, 8),
        (18, 18, 18),
        (28, 28, 28),
        (38, 38, 38),
        (48, 48, 48),
        (58, 58, 58),
        (68, 68, 68),
        (78, 78, 78),
        (88, 88, 88),
        (98, 98, 98),
        (108, 108, 108),
        (118, 118, 118),
        (128, 128, 128),
        (138, 138, 138),
        (148, 148, 148),
        (158, 158, 158),
        (168, 168, 168),
        (178, 178, 178),
        (188, 188, 188),
        (198, 198, 198),
        (208, 208, 208),
        (218, 218, 218),
        (228, 228, 228),
        (238, 238, 238),
    ]
)
python3.12/site-packages/pip/_vendor/rich/_null_file.py000064400000002553151732702220016752 0ustar00from types import TracebackType
from typing import IO, Iterable, Iterator, List, Optional, Type


class NullFile(IO[str]):
    def close(self) -> None:
        pass

    def isatty(self) -> bool:
        return False

    def read(self, __n: int = 1) -> str:
        return ""

    def readable(self) -> bool:
        return False

    def readline(self, __limit: int = 1) -> str:
        return ""

    def readlines(self, __hint: int = 1) -> List[str]:
        return []

    def seek(self, __offset: int, __whence: int = 1) -> int:
        return 0

    def seekable(self) -> bool:
        return False

    def tell(self) -> int:
        return 0

    def truncate(self, __size: Optional[int] = 1) -> int:
        return 0

    def writable(self) -> bool:
        return False

    def writelines(self, __lines: Iterable[str]) -> None:
        pass

    def __next__(self) -> str:
        return ""

    def __iter__(self) -> Iterator[str]:
        return iter([""])

    def __enter__(self) -> IO[str]:
        pass

    def __exit__(
        self,
        __t: Optional[Type[BaseException]],
        __value: Optional[BaseException],
        __traceback: Optional[TracebackType],
    ) -> None:
        pass

    def write(self, text: str) -> int:
        return 0

    def flush(self) -> None:
        pass

    def fileno(self) -> int:
        return -1


NULL_FILE = NullFile()
python3.12/site-packages/pip/_vendor/rich/_stack.py000064400000000537151732702220016106 0ustar00from typing import List, TypeVar

T = TypeVar("T")


class Stack(List[T]):
    """A small shim over builtin list."""

    @property
    def top(self) -> T:
        """Get top of stack."""
        return self[-1]

    def push(self, item: T) -> None:
        """Push an item on to the stack (append in stack nomenclature)."""
        self.append(item)
python3.12/site-packages/pip/_vendor/rich/_pick.py000064400000000647151732702220015731 0ustar00from typing import Optional


def pick_bool(*values: Optional[bool]) -> bool:
    """Pick the first non-none bool or return the last value.

    Args:
        *values (bool): Any number of boolean or None values.

    Returns:
        bool: First non-none boolean.
    """
    assert values, "1 or more values required"
    for value in values:
        if value is not None:
            return value
    return bool(value)
python3.12/site-packages/pip/_vendor/rich/control.py000064400000014746151732702230016332 0ustar00import sys
import time
from typing import TYPE_CHECKING, Callable, Dict, Iterable, List, Union

if sys.version_info >= (3, 8):
    from typing import Final
else:
    from pip._vendor.typing_extensions import Final  # pragma: no cover

from .segment import ControlCode, ControlType, Segment

if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderResult

STRIP_CONTROL_CODES: Final = [
    7,  # Bell
    8,  # Backspace
    11,  # Vertical tab
    12,  # Form feed
    13,  # Carriage return
]
_CONTROL_STRIP_TRANSLATE: Final = {
    _codepoint: None for _codepoint in STRIP_CONTROL_CODES
}

CONTROL_ESCAPE: Final = {
    7: "\\a",
    8: "\\b",
    11: "\\v",
    12: "\\f",
    13: "\\r",
}

CONTROL_CODES_FORMAT: Dict[int, Callable[..., str]] = {
    ControlType.BELL: lambda: "\x07",
    ControlType.CARRIAGE_RETURN: lambda: "\r",
    ControlType.HOME: lambda: "\x1b[H",
    ControlType.CLEAR: lambda: "\x1b[2J",
    ControlType.ENABLE_ALT_SCREEN: lambda: "\x1b[?1049h",
    ControlType.DISABLE_ALT_SCREEN: lambda: "\x1b[?1049l",
    ControlType.SHOW_CURSOR: lambda: "\x1b[?25h",
    ControlType.HIDE_CURSOR: lambda: "\x1b[?25l",
    ControlType.CURSOR_UP: lambda param: f"\x1b[{param}A",
    ControlType.CURSOR_DOWN: lambda param: f"\x1b[{param}B",
    ControlType.CURSOR_FORWARD: lambda param: f"\x1b[{param}C",
    ControlType.CURSOR_BACKWARD: lambda param: f"\x1b[{param}D",
    ControlType.CURSOR_MOVE_TO_COLUMN: lambda param: f"\x1b[{param+1}G",
    ControlType.ERASE_IN_LINE: lambda param: f"\x1b[{param}K",
    ControlType.CURSOR_MOVE_TO: lambda x, y: f"\x1b[{y+1};{x+1}H",
    ControlType.SET_WINDOW_TITLE: lambda title: f"\x1b]0;{title}\x07",
}


class Control:
    """A renderable that inserts a control code (non printable but may move cursor).

    Args:
        *codes (str): Positional arguments are either a :class:`~rich.segment.ControlType` enum or a
            tuple of ControlType and an integer parameter
    """

    __slots__ = ["segment"]

    def __init__(self, *codes: Union[ControlType, ControlCode]) -> None:
        control_codes: List[ControlCode] = [
            (code,) if isinstance(code, ControlType) else code for code in codes
        ]
        _format_map = CONTROL_CODES_FORMAT
        rendered_codes = "".join(
            _format_map[code](*parameters) for code, *parameters in control_codes
        )
        self.segment = Segment(rendered_codes, None, control_codes)

    @classmethod
    def bell(cls) -> "Control":
        """Ring the 'bell'."""
        return cls(ControlType.BELL)

    @classmethod
    def home(cls) -> "Control":
        """Move cursor to 'home' position."""
        return cls(ControlType.HOME)

    @classmethod
    def move(cls, x: int = 0, y: int = 0) -> "Control":
        """Move cursor relative to current position.

        Args:
            x (int): X offset.
            y (int): Y offset.

        Returns:
            ~Control: Control object.

        """

        def get_codes() -> Iterable[ControlCode]:
            control = ControlType
            if x:
                yield (
                    control.CURSOR_FORWARD if x > 0 else control.CURSOR_BACKWARD,
                    abs(x),
                )
            if y:
                yield (
                    control.CURSOR_DOWN if y > 0 else control.CURSOR_UP,
                    abs(y),
                )

        control = cls(*get_codes())
        return control

    @classmethod
    def move_to_column(cls, x: int, y: int = 0) -> "Control":
        """Move to the given column, optionally add offset to row.

        Returns:
            x (int): absolute x (column)
            y (int): optional y offset (row)

        Returns:
            ~Control: Control object.
        """

        return (
            cls(
                (ControlType.CURSOR_MOVE_TO_COLUMN, x),
                (
                    ControlType.CURSOR_DOWN if y > 0 else ControlType.CURSOR_UP,
                    abs(y),
                ),
            )
            if y
            else cls((ControlType.CURSOR_MOVE_TO_COLUMN, x))
        )

    @classmethod
    def move_to(cls, x: int, y: int) -> "Control":
        """Move cursor to absolute position.

        Args:
            x (int): x offset (column)
            y (int): y offset (row)

        Returns:
            ~Control: Control object.
        """
        return cls((ControlType.CURSOR_MOVE_TO, x, y))

    @classmethod
    def clear(cls) -> "Control":
        """Clear the screen."""
        return cls(ControlType.CLEAR)

    @classmethod
    def show_cursor(cls, show: bool) -> "Control":
        """Show or hide the cursor."""
        return cls(ControlType.SHOW_CURSOR if show else ControlType.HIDE_CURSOR)

    @classmethod
    def alt_screen(cls, enable: bool) -> "Control":
        """Enable or disable alt screen."""
        if enable:
            return cls(ControlType.ENABLE_ALT_SCREEN, ControlType.HOME)
        else:
            return cls(ControlType.DISABLE_ALT_SCREEN)

    @classmethod
    def title(cls, title: str) -> "Control":
        """Set the terminal window title

        Args:
            title (str): The new terminal window title
        """
        return cls((ControlType.SET_WINDOW_TITLE, title))

    def __str__(self) -> str:
        return self.segment.text

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        if self.segment.text:
            yield self.segment


def strip_control_codes(
    text: str, _translate_table: Dict[int, None] = _CONTROL_STRIP_TRANSLATE
) -> str:
    """Remove control codes from text.

    Args:
        text (str): A string possibly contain control codes.

    Returns:
        str: String with control codes removed.
    """
    return text.translate(_translate_table)


def escape_control_codes(
    text: str,
    _translate_table: Dict[int, str] = CONTROL_ESCAPE,
) -> str:
    """Replace control codes with their "escaped" equivalent in the given text.
    (e.g. "\b" becomes "\\b")

    Args:
        text (str): A string possibly containing control codes.

    Returns:
        str: String with control codes replaced with their escaped version.
    """
    return text.translate(_translate_table)


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich.console import Console

    console = Console()
    console.print("Look at the title of your terminal window ^")
    # console.print(Control((ControlType.SET_WINDOW_TITLE, "Hello, world!")))
    for i in range(10):
        console.set_window_title("🚀 Loading" + "." * i)
        time.sleep(0.5)
python3.12/site-packages/pip/_vendor/rich/styled.py000064400000002352151732702230016144 0ustar00from typing import TYPE_CHECKING

from .measure import Measurement
from .segment import Segment
from .style import StyleType

if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderResult, RenderableType


class Styled:
    """Apply a style to a renderable.

    Args:
        renderable (RenderableType): Any renderable.
        style (StyleType): A style to apply across the entire renderable.
    """

    def __init__(self, renderable: "RenderableType", style: "StyleType") -> None:
        self.renderable = renderable
        self.style = style

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        style = console.get_style(self.style)
        rendered_segments = console.render(self.renderable, options)
        segments = Segment.apply_style(rendered_segments, style)
        return segments

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> Measurement:
        return Measurement.get(console, options, self.renderable)


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich import print
    from pip._vendor.rich.panel import Panel

    panel = Styled(Panel("hello"), "on blue")
    print(panel)
python3.12/site-packages/pip/_vendor/rich/pager.py000064400000001474151732702240015743 0ustar00from abc import ABC, abstractmethod
from typing import Any


class Pager(ABC):
    """Base class for a pager."""

    @abstractmethod
    def show(self, content: str) -> None:
        """Show content in pager.

        Args:
            content (str): Content to be displayed.
        """


class SystemPager(Pager):
    """Uses the pager installed on the system."""

    def _pager(self, content: str) -> Any:  #  pragma: no cover
        return __import__("pydoc").pager(content)

    def show(self, content: str) -> None:
        """Use the same pager used by pydoc."""
        self._pager(content)


if __name__ == "__main__":  # pragma: no cover
    from .__main__ import make_test_card
    from .console import Console

    console = Console()
    with console.pager(styles=True):
        console.print(make_test_card())
python3.12/site-packages/pip/_vendor/rich/constrain.py000064400000002410151732702240016634 0ustar00from typing import Optional, TYPE_CHECKING

from .jupyter import JupyterMixin
from .measure import Measurement

if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderableType, RenderResult


class Constrain(JupyterMixin):
    """Constrain the width of a renderable to a given number of characters.

    Args:
        renderable (RenderableType): A renderable object.
        width (int, optional): The maximum width (in characters) to render. Defaults to 80.
    """

    def __init__(self, renderable: "RenderableType", width: Optional[int] = 80) -> None:
        self.renderable = renderable
        self.width = width

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        if self.width is None:
            yield self.renderable
        else:
            child_options = options.update_width(min(self.width, options.max_width))
            yield from console.render(self.renderable, child_options)

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "Measurement":
        if self.width is not None:
            options = options.update_width(self.width)
        measurement = Measurement.get(console, options, self.renderable)
        return measurement
python3.12/site-packages/pip/_vendor/rich/panel.py000064400000024516151732702250015747 0ustar00from typing import TYPE_CHECKING, Optional

from .align import AlignMethod
from .box import ROUNDED, Box
from .cells import cell_len
from .jupyter import JupyterMixin
from .measure import Measurement, measure_renderables
from .padding import Padding, PaddingDimensions
from .segment import Segment
from .style import Style, StyleType
from .text import Text, TextType

if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderableType, RenderResult


class Panel(JupyterMixin):
    """A console renderable that draws a border around its contents.

    Example:
        >>> console.print(Panel("Hello, World!"))

    Args:
        renderable (RenderableType): A console renderable object.
        box (Box, optional): A Box instance that defines the look of the border (see :ref:`appendix_box`.
            Defaults to box.ROUNDED.
        safe_box (bool, optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
        expand (bool, optional): If True the panel will stretch to fill the console
            width, otherwise it will be sized to fit the contents. Defaults to True.
        style (str, optional): The style of the panel (border and contents). Defaults to "none".
        border_style (str, optional): The style of the border. Defaults to "none".
        width (Optional[int], optional): Optional width of panel. Defaults to None to auto-detect.
        height (Optional[int], optional): Optional height of panel. Defaults to None to auto-detect.
        padding (Optional[PaddingDimensions]): Optional padding around renderable. Defaults to 0.
        highlight (bool, optional): Enable automatic highlighting of panel title (if str). Defaults to False.
    """

    def __init__(
        self,
        renderable: "RenderableType",
        box: Box = ROUNDED,
        *,
        title: Optional[TextType] = None,
        title_align: AlignMethod = "center",
        subtitle: Optional[TextType] = None,
        subtitle_align: AlignMethod = "center",
        safe_box: Optional[bool] = None,
        expand: bool = True,
        style: StyleType = "none",
        border_style: StyleType = "none",
        width: Optional[int] = None,
        height: Optional[int] = None,
        padding: PaddingDimensions = (0, 1),
        highlight: bool = False,
    ) -> None:
        self.renderable = renderable
        self.box = box
        self.title = title
        self.title_align: AlignMethod = title_align
        self.subtitle = subtitle
        self.subtitle_align = subtitle_align
        self.safe_box = safe_box
        self.expand = expand
        self.style = style
        self.border_style = border_style
        self.width = width
        self.height = height
        self.padding = padding
        self.highlight = highlight

    @classmethod
    def fit(
        cls,
        renderable: "RenderableType",
        box: Box = ROUNDED,
        *,
        title: Optional[TextType] = None,
        title_align: AlignMethod = "center",
        subtitle: Optional[TextType] = None,
        subtitle_align: AlignMethod = "center",
        safe_box: Optional[bool] = None,
        style: StyleType = "none",
        border_style: StyleType = "none",
        width: Optional[int] = None,
        padding: PaddingDimensions = (0, 1),
    ) -> "Panel":
        """An alternative constructor that sets expand=False."""
        return cls(
            renderable,
            box,
            title=title,
            title_align=title_align,
            subtitle=subtitle,
            subtitle_align=subtitle_align,
            safe_box=safe_box,
            style=style,
            border_style=border_style,
            width=width,
            padding=padding,
            expand=False,
        )

    @property
    def _title(self) -> Optional[Text]:
        if self.title:
            title_text = (
                Text.from_markup(self.title)
                if isinstance(self.title, str)
                else self.title.copy()
            )
            title_text.end = ""
            title_text.plain = title_text.plain.replace("\n", " ")
            title_text.no_wrap = True
            title_text.expand_tabs()
            title_text.pad(1)
            return title_text
        return None

    @property
    def _subtitle(self) -> Optional[Text]:
        if self.subtitle:
            subtitle_text = (
                Text.from_markup(self.subtitle)
                if isinstance(self.subtitle, str)
                else self.subtitle.copy()
            )
            subtitle_text.end = ""
            subtitle_text.plain = subtitle_text.plain.replace("\n", " ")
            subtitle_text.no_wrap = True
            subtitle_text.expand_tabs()
            subtitle_text.pad(1)
            return subtitle_text
        return None

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        _padding = Padding.unpack(self.padding)
        renderable = (
            Padding(self.renderable, _padding) if any(_padding) else self.renderable
        )
        style = console.get_style(self.style)
        border_style = style + console.get_style(self.border_style)
        width = (
            options.max_width
            if self.width is None
            else min(options.max_width, self.width)
        )

        safe_box: bool = console.safe_box if self.safe_box is None else self.safe_box
        box = self.box.substitute(options, safe=safe_box)

        def align_text(
            text: Text, width: int, align: str, character: str, style: Style
        ) -> Text:
            """Gets new aligned text.

            Args:
                text (Text): Title or subtitle text.
                width (int): Desired width.
                align (str): Alignment.
                character (str): Character for alignment.
                style (Style): Border style

            Returns:
                Text: New text instance
            """
            text = text.copy()
            text.truncate(width)
            excess_space = width - cell_len(text.plain)
            if excess_space:
                if align == "left":
                    return Text.assemble(
                        text,
                        (character * excess_space, style),
                        no_wrap=True,
                        end="",
                    )
                elif align == "center":
                    left = excess_space // 2
                    return Text.assemble(
                        (character * left, style),
                        text,
                        (character * (excess_space - left), style),
                        no_wrap=True,
                        end="",
                    )
                else:
                    return Text.assemble(
                        (character * excess_space, style),
                        text,
                        no_wrap=True,
                        end="",
                    )
            return text

        title_text = self._title
        if title_text is not None:
            title_text.stylize_before(border_style)

        child_width = (
            width - 2
            if self.expand
            else console.measure(
                renderable, options=options.update_width(width - 2)
            ).maximum
        )
        child_height = self.height or options.height or None
        if child_height:
            child_height -= 2
        if title_text is not None:
            child_width = min(
                options.max_width - 2, max(child_width, title_text.cell_len + 2)
            )

        width = child_width + 2
        child_options = options.update(
            width=child_width, height=child_height, highlight=self.highlight
        )
        lines = console.render_lines(renderable, child_options, style=style)

        line_start = Segment(box.mid_left, border_style)
        line_end = Segment(f"{box.mid_right}", border_style)
        new_line = Segment.line()
        if title_text is None or width <= 4:
            yield Segment(box.get_top([width - 2]), border_style)
        else:
            title_text = align_text(
                title_text,
                width - 4,
                self.title_align,
                box.top,
                border_style,
            )
            yield Segment(box.top_left + box.top, border_style)
            yield from console.render(title_text, child_options.update_width(width - 4))
            yield Segment(box.top + box.top_right, border_style)

        yield new_line
        for line in lines:
            yield line_start
            yield from line
            yield line_end
            yield new_line

        subtitle_text = self._subtitle
        if subtitle_text is not None:
            subtitle_text.stylize_before(border_style)

        if subtitle_text is None or width <= 4:
            yield Segment(box.get_bottom([width - 2]), border_style)
        else:
            subtitle_text = align_text(
                subtitle_text,
                width - 4,
                self.subtitle_align,
                box.bottom,
                border_style,
            )
            yield Segment(box.bottom_left + box.bottom, border_style)
            yield from console.render(
                subtitle_text, child_options.update_width(width - 4)
            )
            yield Segment(box.bottom + box.bottom_right, border_style)

        yield new_line

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "Measurement":
        _title = self._title
        _, right, _, left = Padding.unpack(self.padding)
        padding = left + right
        renderables = [self.renderable, _title] if _title else [self.renderable]

        if self.width is None:
            width = (
                measure_renderables(
                    console,
                    options.update_width(options.max_width - padding - 2),
                    renderables,
                ).maximum
                + padding
                + 2
            )
        else:
            width = self.width
        return Measurement(width, width)


if __name__ == "__main__":  # pragma: no cover
    from .console import Console

    c = Console()

    from .box import DOUBLE, ROUNDED
    from .padding import Padding

    p = Panel(
        "Hello, World!",
        title="rich.Panel",
        style="white on blue",
        box=DOUBLE,
        padding=1,
    )

    c.print()
    c.print(p)
python3.12/site-packages/pip/_vendor/rich/file_proxy.py000064400000003223151732702250017020 0ustar00import io
from typing import IO, TYPE_CHECKING, Any, List

from .ansi import AnsiDecoder
from .text import Text

if TYPE_CHECKING:
    from .console import Console


class FileProxy(io.TextIOBase):
    """Wraps a file (e.g. sys.stdout) and redirects writes to a console."""

    def __init__(self, console: "Console", file: IO[str]) -> None:
        self.__console = console
        self.__file = file
        self.__buffer: List[str] = []
        self.__ansi_decoder = AnsiDecoder()

    @property
    def rich_proxied_file(self) -> IO[str]:
        """Get proxied file."""
        return self.__file

    def __getattr__(self, name: str) -> Any:
        return getattr(self.__file, name)

    def write(self, text: str) -> int:
        if not isinstance(text, str):
            raise TypeError(f"write() argument must be str, not {type(text).__name__}")
        buffer = self.__buffer
        lines: List[str] = []
        while text:
            line, new_line, text = text.partition("\n")
            if new_line:
                lines.append("".join(buffer) + line)
                buffer.clear()
            else:
                buffer.append(line)
                break
        if lines:
            console = self.__console
            with console:
                output = Text("\n").join(
                    self.__ansi_decoder.decode_line(line) for line in lines
                )
                console.print(output)
        return len(text)

    def flush(self) -> None:
        output = "".join(self.__buffer)
        if output:
            self.__console.print(output)
        del self.__buffer[:]

    def fileno(self) -> int:
        return self.__file.fileno()
python3.12/site-packages/pip/_vendor/rich/align.py000064400000024200151732702250015730 0ustar00import sys
from itertools import chain
from typing import TYPE_CHECKING, Iterable, Optional

if sys.version_info >= (3, 8):
    from typing import Literal
else:
    from pip._vendor.typing_extensions import Literal  # pragma: no cover

from .constrain import Constrain
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment
from .style import StyleType

if TYPE_CHECKING:
    from .console import Console, ConsoleOptions, RenderableType, RenderResult

AlignMethod = Literal["left", "center", "right"]
VerticalAlignMethod = Literal["top", "middle", "bottom"]


class Align(JupyterMixin):
    """Align a renderable by adding spaces if necessary.

    Args:
        renderable (RenderableType): A console renderable.
        align (AlignMethod): One of "left", "center", or "right""
        style (StyleType, optional): An optional style to apply to the background.
        vertical (Optional[VerticalAlginMethod], optional): Optional vertical align, one of "top", "middle", or "bottom". Defaults to None.
        pad (bool, optional): Pad the right with spaces. Defaults to True.
        width (int, optional): Restrict contents to given width, or None to use default width. Defaults to None.
        height (int, optional): Set height of align renderable, or None to fit to contents. Defaults to None.

    Raises:
        ValueError: if ``align`` is not one of the expected values.
    """

    def __init__(
        self,
        renderable: "RenderableType",
        align: AlignMethod = "left",
        style: Optional[StyleType] = None,
        *,
        vertical: Optional[VerticalAlignMethod] = None,
        pad: bool = True,
        width: Optional[int] = None,
        height: Optional[int] = None,
    ) -> None:
        if align not in ("left", "center", "right"):
            raise ValueError(
                f'invalid value for align, expected "left", "center", or "right" (not {align!r})'
            )
        if vertical is not None and vertical not in ("top", "middle", "bottom"):
            raise ValueError(
                f'invalid value for vertical, expected "top", "middle", or "bottom" (not {vertical!r})'
            )
        self.renderable = renderable
        self.align = align
        self.style = style
        self.vertical = vertical
        self.pad = pad
        self.width = width
        self.height = height

    def __repr__(self) -> str:
        return f"Align({self.renderable!r}, {self.align!r})"

    @classmethod
    def left(
        cls,
        renderable: "RenderableType",
        style: Optional[StyleType] = None,
        *,
        vertical: Optional[VerticalAlignMethod] = None,
        pad: bool = True,
        width: Optional[int] = None,
        height: Optional[int] = None,
    ) -> "Align":
        """Align a renderable to the left."""
        return cls(
            renderable,
            "left",
            style=style,
            vertical=vertical,
            pad=pad,
            width=width,
            height=height,
        )

    @classmethod
    def center(
        cls,
        renderable: "RenderableType",
        style: Optional[StyleType] = None,
        *,
        vertical: Optional[VerticalAlignMethod] = None,
        pad: bool = True,
        width: Optional[int] = None,
        height: Optional[int] = None,
    ) -> "Align":
        """Align a renderable to the center."""
        return cls(
            renderable,
            "center",
            style=style,
            vertical=vertical,
            pad=pad,
            width=width,
            height=height,
        )

    @classmethod
    def right(
        cls,
        renderable: "RenderableType",
        style: Optional[StyleType] = None,
        *,
        vertical: Optional[VerticalAlignMethod] = None,
        pad: bool = True,
        width: Optional[int] = None,
        height: Optional[int] = None,
    ) -> "Align":
        """Align a renderable to the right."""
        return cls(
            renderable,
            "right",
            style=style,
            vertical=vertical,
            pad=pad,
            width=width,
            height=height,
        )

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        align = self.align
        width = console.measure(self.renderable, options=options).maximum
        rendered = console.render(
            Constrain(
                self.renderable, width if self.width is None else min(width, self.width)
            ),
            options.update(height=None),
        )
        lines = list(Segment.split_lines(rendered))
        width, height = Segment.get_shape(lines)
        lines = Segment.set_shape(lines, width, height)
        new_line = Segment.line()
        excess_space = options.max_width - width
        style = console.get_style(self.style) if self.style is not None else None

        def generate_segments() -> Iterable[Segment]:
            if excess_space <= 0:
                # Exact fit
                for line in lines:
                    yield from line
                    yield new_line

            elif align == "left":
                # Pad on the right
                pad = Segment(" " * excess_space, style) if self.pad else None
                for line in lines:
                    yield from line
                    if pad:
                        yield pad
                    yield new_line

            elif align == "center":
                # Pad left and right
                left = excess_space // 2
                pad = Segment(" " * left, style)
                pad_right = (
                    Segment(" " * (excess_space - left), style) if self.pad else None
                )
                for line in lines:
                    if left:
                        yield pad
                    yield from line
                    if pad_right:
                        yield pad_right
                    yield new_line

            elif align == "right":
                # Padding on left
                pad = Segment(" " * excess_space, style)
                for line in lines:
                    yield pad
                    yield from line
                    yield new_line

        blank_line = (
            Segment(f"{' ' * (self.width or options.max_width)}\n", style)
            if self.pad
            else Segment("\n")
        )

        def blank_lines(count: int) -> Iterable[Segment]:
            if count > 0:
                for _ in range(count):
                    yield blank_line

        vertical_height = self.height or options.height
        iter_segments: Iterable[Segment]
        if self.vertical and vertical_height is not None:
            if self.vertical == "top":
                bottom_space = vertical_height - height
                iter_segments = chain(generate_segments(), blank_lines(bottom_space))
            elif self.vertical == "middle":
                top_space = (vertical_height - height) // 2
                bottom_space = vertical_height - top_space - height
                iter_segments = chain(
                    blank_lines(top_space),
                    generate_segments(),
                    blank_lines(bottom_space),
                )
            else:  #  self.vertical == "bottom":
                top_space = vertical_height - height
                iter_segments = chain(blank_lines(top_space), generate_segments())
        else:
            iter_segments = generate_segments()
        if self.style:
            style = console.get_style(self.style)
            iter_segments = Segment.apply_style(iter_segments, style)
        yield from iter_segments

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> Measurement:
        measurement = Measurement.get(console, options, self.renderable)
        return measurement


class VerticalCenter(JupyterMixin):
    """Vertically aligns a renderable.

    Warn:
        This class is deprecated and may be removed in a future version. Use Align class with
        `vertical="middle"`.

    Args:
        renderable (RenderableType): A renderable object.
    """

    def __init__(
        self,
        renderable: "RenderableType",
        style: Optional[StyleType] = None,
    ) -> None:
        self.renderable = renderable
        self.style = style

    def __repr__(self) -> str:
        return f"VerticalCenter({self.renderable!r})"

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        style = console.get_style(self.style) if self.style is not None else None
        lines = console.render_lines(
            self.renderable, options.update(height=None), pad=False
        )
        width, _height = Segment.get_shape(lines)
        new_line = Segment.line()
        height = options.height or options.size.height
        top_space = (height - len(lines)) // 2
        bottom_space = height - top_space - len(lines)
        blank_line = Segment(f"{' ' * width}", style)

        def blank_lines(count: int) -> Iterable[Segment]:
            for _ in range(count):
                yield blank_line
                yield new_line

        if top_space > 0:
            yield from blank_lines(top_space)
        for line in lines:
            yield from line
            yield new_line
        if bottom_space > 0:
            yield from blank_lines(bottom_space)

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> Measurement:
        measurement = Measurement.get(console, options, self.renderable)
        return measurement


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich.console import Console, Group
    from pip._vendor.rich.highlighter import ReprHighlighter
    from pip._vendor.rich.panel import Panel

    highlighter = ReprHighlighter()
    console = Console()

    panel = Panel(
        Group(
            Align.left(highlighter("align='left'")),
            Align.center(highlighter("align='center'")),
            Align.right(highlighter("align='right'")),
        ),
        width=60,
        style="on dark_blue",
        title="Align",
    )

    console.print(
        Align.center(panel, vertical="middle", style="on red", height=console.height)
    )
python3.12/site-packages/pip/_vendor/rich/protocol.py000064400000002557151732702260016513 0ustar00from typing import Any, cast, Set, TYPE_CHECKING
from inspect import isclass

if TYPE_CHECKING:
    from pip._vendor.rich.console import RenderableType

_GIBBERISH = """aihwerij235234ljsdnp34ksodfipwoe234234jlskjdf"""


def is_renderable(check_object: Any) -> bool:
    """Check if an object may be rendered by Rich."""
    return (
        isinstance(check_object, str)
        or hasattr(check_object, "__rich__")
        or hasattr(check_object, "__rich_console__")
    )


def rich_cast(renderable: object) -> "RenderableType":
    """Cast an object to a renderable by calling __rich__ if present.

    Args:
        renderable (object): A potentially renderable object

    Returns:
        object: The result of recursively calling __rich__.
    """
    from pip._vendor.rich.console import RenderableType

    rich_visited_set: Set[type] = set()  # Prevent potential infinite loop
    while hasattr(renderable, "__rich__") and not isclass(renderable):
        # Detect object which claim to have all the attributes
        if hasattr(renderable, _GIBBERISH):
            return repr(renderable)
        cast_method = getattr(renderable, "__rich__")
        renderable = cast_method()
        renderable_type = type(renderable)
        if renderable_type in rich_visited_set:
            break
        rich_visited_set.add(renderable_type)

    return cast(RenderableType, renderable)
python3.12/site-packages/pip/_vendor/rich/region.py000064400000000246151732702260016126 0ustar00from typing import NamedTuple


class Region(NamedTuple):
    """Defines a rectangular region of the screen."""

    x: int
    y: int
    width: int
    height: int
python3.12/site-packages/pip/_vendor/rich/_export_format.py000064400000004064151732702260017675 0ustar00CONSOLE_HTML_FORMAT = """\
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<style>
{stylesheet}
body {{
    color: {foreground};
    background-color: {background};
}}
</style>
</head>
<html>
<body>
    <pre style="font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><code>{code}</code></pre>
</body>
</html>
"""

CONSOLE_SVG_FORMAT = """\
<svg class="rich-terminal" viewBox="0 0 {width} {height}" xmlns="http://www.w3.org/2000/svg">
    <!-- Generated with Rich https://www.textualize.io -->
    <style>

    @font-face {{
        font-family: "Fira Code";
        src: local("FiraCode-Regular"),
                url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Regular.woff2") format("woff2"),
                url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Regular.woff") format("woff");
        font-style: normal;
        font-weight: 400;
    }}
    @font-face {{
        font-family: "Fira Code";
        src: local("FiraCode-Bold"),
                url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Bold.woff2") format("woff2"),
                url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Bold.woff") format("woff");
        font-style: bold;
        font-weight: 700;
    }}

    .{unique_id}-matrix {{
        font-family: Fira Code, monospace;
        font-size: {char_height}px;
        line-height: {line_height}px;
        font-variant-east-asian: full-width;
    }}

    .{unique_id}-title {{
        font-size: 18px;
        font-weight: bold;
        font-family: arial;
    }}

    {styles}
    </style>

    <defs>
    <clipPath id="{unique_id}-clip-terminal">
      <rect x="0" y="0" width="{terminal_width}" height="{terminal_height}" />
    </clipPath>
    {lines}
    </defs>

    {chrome}
    <g transform="translate({terminal_x}, {terminal_y})" clip-path="url(#{unique_id}-clip-terminal)">
    {backgrounds}
    <g class="{unique_id}-matrix">
    {matrix}
    </g>
    </g>
</svg>
"""

_SVG_FONT_FAMILY = "Rich Fira Code"
_SVG_CLASSES_PREFIX = "rich-svg"
python3.12/site-packages/pip/_vendor/rich/padding.py000064400000011552151732702260016253 0ustar00from typing import cast, List, Optional, Tuple, TYPE_CHECKING, Union

if TYPE_CHECKING:
    from .console import (
        Console,
        ConsoleOptions,
        RenderableType,
        RenderResult,
    )
from .jupyter import JupyterMixin
from .measure import Measurement
from .style import Style
from .segment import Segment


PaddingDimensions = Union[int, Tuple[int], Tuple[int, int], Tuple[int, int, int, int]]


class Padding(JupyterMixin):
    """Draw space around content.

    Example:
        >>> print(Padding("Hello", (2, 4), style="on blue"))

    Args:
        renderable (RenderableType): String or other renderable.
        pad (Union[int, Tuple[int]]): Padding for top, right, bottom, and left borders.
            May be specified with 1, 2, or 4 integers (CSS style).
        style (Union[str, Style], optional): Style for padding characters. Defaults to "none".
        expand (bool, optional): Expand padding to fit available width. Defaults to True.
    """

    def __init__(
        self,
        renderable: "RenderableType",
        pad: "PaddingDimensions" = (0, 0, 0, 0),
        *,
        style: Union[str, Style] = "none",
        expand: bool = True,
    ):
        self.renderable = renderable
        self.top, self.right, self.bottom, self.left = self.unpack(pad)
        self.style = style
        self.expand = expand

    @classmethod
    def indent(cls, renderable: "RenderableType", level: int) -> "Padding":
        """Make padding instance to render an indent.

        Args:
            renderable (RenderableType): String or other renderable.
            level (int): Number of characters to indent.

        Returns:
            Padding: A Padding instance.
        """

        return Padding(renderable, pad=(0, 0, 0, level), expand=False)

    @staticmethod
    def unpack(pad: "PaddingDimensions") -> Tuple[int, int, int, int]:
        """Unpack padding specified in CSS style."""
        if isinstance(pad, int):
            return (pad, pad, pad, pad)
        if len(pad) == 1:
            _pad = pad[0]
            return (_pad, _pad, _pad, _pad)
        if len(pad) == 2:
            pad_top, pad_right = cast(Tuple[int, int], pad)
            return (pad_top, pad_right, pad_top, pad_right)
        if len(pad) == 4:
            top, right, bottom, left = cast(Tuple[int, int, int, int], pad)
            return (top, right, bottom, left)
        raise ValueError(f"1, 2 or 4 integers required for padding; {len(pad)} given")

    def __repr__(self) -> str:
        return f"Padding({self.renderable!r}, ({self.top},{self.right},{self.bottom},{self.left}))"

    def __rich_console__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "RenderResult":
        style = console.get_style(self.style)
        if self.expand:
            width = options.max_width
        else:
            width = min(
                Measurement.get(console, options, self.renderable).maximum
                + self.left
                + self.right,
                options.max_width,
            )
        render_options = options.update_width(width - self.left - self.right)
        if render_options.height is not None:
            render_options = render_options.update_height(
                height=render_options.height - self.top - self.bottom
            )
        lines = console.render_lines(
            self.renderable, render_options, style=style, pad=True
        )
        _Segment = Segment

        left = _Segment(" " * self.left, style) if self.left else None
        right = (
            [_Segment(f'{" " * self.right}', style), _Segment.line()]
            if self.right
            else [_Segment.line()]
        )
        blank_line: Optional[List[Segment]] = None
        if self.top:
            blank_line = [_Segment(f'{" " * width}\n', style)]
            yield from blank_line * self.top
        if left:
            for line in lines:
                yield left
                yield from line
                yield from right
        else:
            for line in lines:
                yield from line
                yield from right
        if self.bottom:
            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
            yield from blank_line * self.bottom

    def __rich_measure__(
        self, console: "Console", options: "ConsoleOptions"
    ) -> "Measurement":
        max_width = options.max_width
        extra_width = self.left + self.right
        if max_width - extra_width < 1:
            return Measurement(max_width, max_width)
        measure_min, measure_max = Measurement.get(console, options, self.renderable)
        measurement = Measurement(measure_min + extra_width, measure_max + extra_width)
        measurement = measurement.with_maximum(max_width)
        return measurement


if __name__ == "__main__":  #  pragma: no cover
    from pip._vendor.rich import print

    print(Padding("Hello, World", (2, 4), style="on blue"))
python3.12/site-packages/pip/_vendor/rich/progress.py000064400000164472151732702260016523 0ustar00import io
import sys
import typing
import warnings
from abc import ABC, abstractmethod
from collections import deque
from dataclasses import dataclass, field
from datetime import timedelta
from io import RawIOBase, UnsupportedOperation
from math import ceil
from mmap import mmap
from operator import length_hint
from os import PathLike, stat
from threading import Event, RLock, Thread
from types import TracebackType
from typing import (
    Any,
    BinaryIO,
    Callable,
    ContextManager,
    Deque,
    Dict,
    Generic,
    Iterable,
    List,
    NamedTuple,
    NewType,
    Optional,
    Sequence,
    TextIO,
    Tuple,
    Type,
    TypeVar,
    Union,
)

if sys.version_info >= (3, 8):
    from typing import Literal
else:
    from pip._vendor.typing_extensions import Literal  # pragma: no cover

from . import filesize, get_console
from .console import Console, Group, JustifyMethod, RenderableType
from .highlighter import Highlighter
from .jupyter import JupyterMixin
from .live import Live
from .progress_bar import ProgressBar
from .spinner import Spinner
from .style import StyleType
from .table import Column, Table
from .text import Text, TextType

TaskID = NewType("TaskID", int)

ProgressType = TypeVar("ProgressType")

GetTimeCallable = Callable[[], float]


_I = typing.TypeVar("_I", TextIO, BinaryIO)


class _TrackThread(Thread):
    """A thread to periodically update progress."""

    def __init__(self, progress: "Progress", task_id: "TaskID", update_period: float):
        self.progress = progress
        self.task_id = task_id
        self.update_period = update_period
        self.done = Event()

        self.completed = 0
        super().__init__()

    def run(self) -> None:
        task_id = self.task_id
        advance = self.progress.advance
        update_period = self.update_period
        last_completed = 0
        wait = self.done.wait
        while not wait(update_period):
            completed = self.completed
            if last_completed != completed:
                advance(task_id, completed - last_completed)
                last_completed = completed

        self.progress.update(self.task_id, completed=self.completed, refresh=True)

    def __enter__(self) -> "_TrackThread":
        self.start()
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self.done.set()
        self.join()


def track(
    sequence: Union[Sequence[ProgressType], Iterable[ProgressType]],
    description: str = "Working...",
    total: Optional[float] = None,
    auto_refresh: bool = True,
    console: Optional[Console] = None,
    transient: bool = False,
    get_time: Optional[Callable[[], float]] = None,
    refresh_per_second: float = 10,
    style: StyleType = "bar.back",
    complete_style: StyleType = "bar.complete",
    finished_style: StyleType = "bar.finished",
    pulse_style: StyleType = "bar.pulse",
    update_period: float = 0.1,
    disable: bool = False,
    show_speed: bool = True,
) -> Iterable[ProgressType]:
    """Track progress by iterating over a sequence.

    Args:
        sequence (Iterable[ProgressType]): A sequence (must support "len") you wish to iterate over.
        description (str, optional): Description of task show next to progress bar. Defaults to "Working".
        total: (float, optional): Total number of steps. Default is len(sequence).
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.
        disable (bool, optional): Disable display of progress.
        show_speed (bool, optional): Show speed if total isn't known. Defaults to True.
    Returns:
        Iterable[ProgressType]: An iterable of the values in the sequence.

    """

    columns: List["ProgressColumn"] = (
        [TextColumn("[progress.description]{task.description}")] if description else []
    )
    columns.extend(
        (
            BarColumn(
                style=style,
                complete_style=complete_style,
                finished_style=finished_style,
                pulse_style=pulse_style,
            ),
            TaskProgressColumn(show_speed=show_speed),
            TimeRemainingColumn(elapsed_when_finished=True),
        )
    )
    progress = Progress(
        *columns,
        auto_refresh=auto_refresh,
        console=console,
        transient=transient,
        get_time=get_time,
        refresh_per_second=refresh_per_second or 10,
        disable=disable,
    )

    with progress:
        yield from progress.track(
            sequence, total=total, description=description, update_period=update_period
        )


class _Reader(RawIOBase, BinaryIO):
    """A reader that tracks progress while it's being read from."""

    def __init__(
        self,
        handle: BinaryIO,
        progress: "Progress",
        task: TaskID,
        close_handle: bool = True,
    ) -> None:
        self.handle = handle
        self.progress = progress
        self.task = task
        self.close_handle = close_handle
        self._closed = False

    def __enter__(self) -> "_Reader":
        self.handle.__enter__()
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self.close()

    def __iter__(self) -> BinaryIO:
        return self

    def __next__(self) -> bytes:
        line = next(self.handle)
        self.progress.advance(self.task, advance=len(line))
        return line

    @property
    def closed(self) -> bool:
        return self._closed

    def fileno(self) -> int:
        return self.handle.fileno()

    def isatty(self) -> bool:
        return self.handle.isatty()

    @property
    def mode(self) -> str:
        return self.handle.mode

    @property
    def name(self) -> str:
        return self.handle.name

    def readable(self) -> bool:
        return self.handle.readable()

    def seekable(self) -> bool:
        return self.handle.seekable()

    def writable(self) -> bool:
        return False

    def read(self, size: int = -1) -> bytes:
        block = self.handle.read(size)
        self.progress.advance(self.task, advance=len(block))
        return block

    def readinto(self, b: Union[bytearray, memoryview, mmap]):  # type: ignore[no-untyped-def, override]
        n = self.handle.readinto(b)  # type: ignore[attr-defined]
        self.progress.advance(self.task, advance=n)
        return n

    def readline(self, size: int = -1) -> bytes:  # type: ignore[override]
        line = self.handle.readline(size)
        self.progress.advance(self.task, advance=len(line))
        return line

    def readlines(self, hint: int = -1) -> List[bytes]:
        lines = self.handle.readlines(hint)
        self.progress.advance(self.task, advance=sum(map(len, lines)))
        return lines

    def close(self) -> None:
        if self.close_handle:
            self.handle.close()
        self._closed = True

    def seek(self, offset: int, whence: int = 0) -> int:
        pos = self.handle.seek(offset, whence)
        self.progress.update(self.task, completed=pos)
        return pos

    def tell(self) -> int:
        return self.handle.tell()

    def write(self, s: Any) -> int:
        raise UnsupportedOperation("write")


class _ReadContext(ContextManager[_I], Generic[_I]):
    """A utility class to handle a context for both a reader and a progress."""

    def __init__(self, progress: "Progress", reader: _I) -> None:
        self.progress = progress
        self.reader: _I = reader

    def __enter__(self) -> _I:
        self.progress.start()
        return self.reader.__enter__()

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self.progress.stop()
        self.reader.__exit__(exc_type, exc_val, exc_tb)


def wrap_file(
    file: BinaryIO,
    total: int,
    *,
    description: str = "Reading...",
    auto_refresh: bool = True,
    console: Optional[Console] = None,
    transient: bool = False,
    get_time: Optional[Callable[[], float]] = None,
    refresh_per_second: float = 10,
    style: StyleType = "bar.back",
    complete_style: StyleType = "bar.complete",
    finished_style: StyleType = "bar.finished",
    pulse_style: StyleType = "bar.pulse",
    disable: bool = False,
) -> ContextManager[BinaryIO]:
    """Read bytes from a file while tracking progress.

    Args:
        file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
        total (int): Total number of bytes to read.
        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        disable (bool, optional): Disable display of progress.
    Returns:
        ContextManager[BinaryIO]: A context manager yielding a progress reader.

    """

    columns: List["ProgressColumn"] = (
        [TextColumn("[progress.description]{task.description}")] if description else []
    )
    columns.extend(
        (
            BarColumn(
                style=style,
                complete_style=complete_style,
                finished_style=finished_style,
                pulse_style=pulse_style,
            ),
            DownloadColumn(),
            TimeRemainingColumn(),
        )
    )
    progress = Progress(
        *columns,
        auto_refresh=auto_refresh,
        console=console,
        transient=transient,
        get_time=get_time,
        refresh_per_second=refresh_per_second or 10,
        disable=disable,
    )

    reader = progress.wrap_file(file, total=total, description=description)
    return _ReadContext(progress, reader)


@typing.overload
def open(
    file: Union[str, "PathLike[str]", bytes],
    mode: Union[Literal["rt"], Literal["r"]],
    buffering: int = -1,
    encoding: Optional[str] = None,
    errors: Optional[str] = None,
    newline: Optional[str] = None,
    *,
    total: Optional[int] = None,
    description: str = "Reading...",
    auto_refresh: bool = True,
    console: Optional[Console] = None,
    transient: bool = False,
    get_time: Optional[Callable[[], float]] = None,
    refresh_per_second: float = 10,
    style: StyleType = "bar.back",
    complete_style: StyleType = "bar.complete",
    finished_style: StyleType = "bar.finished",
    pulse_style: StyleType = "bar.pulse",
    disable: bool = False,
) -> ContextManager[TextIO]:
    pass


@typing.overload
def open(
    file: Union[str, "PathLike[str]", bytes],
    mode: Literal["rb"],
    buffering: int = -1,
    encoding: Optional[str] = None,
    errors: Optional[str] = None,
    newline: Optional[str] = None,
    *,
    total: Optional[int] = None,
    description: str = "Reading...",
    auto_refresh: bool = True,
    console: Optional[Console] = None,
    transient: bool = False,
    get_time: Optional[Callable[[], float]] = None,
    refresh_per_second: float = 10,
    style: StyleType = "bar.back",
    complete_style: StyleType = "bar.complete",
    finished_style: StyleType = "bar.finished",
    pulse_style: StyleType = "bar.pulse",
    disable: bool = False,
) -> ContextManager[BinaryIO]:
    pass


def open(
    file: Union[str, "PathLike[str]", bytes],
    mode: Union[Literal["rb"], Literal["rt"], Literal["r"]] = "r",
    buffering: int = -1,
    encoding: Optional[str] = None,
    errors: Optional[str] = None,
    newline: Optional[str] = None,
    *,
    total: Optional[int] = None,
    description: str = "Reading...",
    auto_refresh: bool = True,
    console: Optional[Console] = None,
    transient: bool = False,
    get_time: Optional[Callable[[], float]] = None,
    refresh_per_second: float = 10,
    style: StyleType = "bar.back",
    complete_style: StyleType = "bar.complete",
    finished_style: StyleType = "bar.finished",
    pulse_style: StyleType = "bar.pulse",
    disable: bool = False,
) -> Union[ContextManager[BinaryIO], ContextManager[TextIO]]:
    """Read bytes from a file while tracking progress.

    Args:
        path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
        mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
        buffering (int): The buffering strategy to use, see :func:`io.open`.
        encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
        errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
        newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`
        total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size.
        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        disable (bool, optional): Disable display of progress.
        encoding (str, optional): The encoding to use when reading in text mode.

    Returns:
        ContextManager[BinaryIO]: A context manager yielding a progress reader.

    """

    columns: List["ProgressColumn"] = (
        [TextColumn("[progress.description]{task.description}")] if description else []
    )
    columns.extend(
        (
            BarColumn(
                style=style,
                complete_style=complete_style,
                finished_style=finished_style,
                pulse_style=pulse_style,
            ),
            DownloadColumn(),
            TimeRemainingColumn(),
        )
    )
    progress = Progress(
        *columns,
        auto_refresh=auto_refresh,
        console=console,
        transient=transient,
        get_time=get_time,
        refresh_per_second=refresh_per_second or 10,
        disable=disable,
    )

    reader = progress.open(
        file,
        mode=mode,
        buffering=buffering,
        encoding=encoding,
        errors=errors,
        newline=newline,
        total=total,
        description=description,
    )
    return _ReadContext(progress, reader)  # type: ignore[return-value, type-var]


class ProgressColumn(ABC):
    """Base class for a widget to use in progress display."""

    max_refresh: Optional[float] = None

    def __init__(self, table_column: Optional[Column] = None) -> None:
        self._table_column = table_column
        self._renderable_cache: Dict[TaskID, Tuple[float, RenderableType]] = {}
        self._update_time: Optional[float] = None

    def get_table_column(self) -> Column:
        """Get a table column, used to build tasks table."""
        return self._table_column or Column()

    def __call__(self, task: "Task") -> RenderableType:
        """Called by the Progress object to return a renderable for the given task.

        Args:
            task (Task): An object containing information regarding the task.

        Returns:
            RenderableType: Anything renderable (including str).
        """
        current_time = task.get_time()
        if self.max_refresh is not None and not task.completed:
            try:
                timestamp, renderable = self._renderable_cache[task.id]
            except KeyError:
                pass
            else:
                if timestamp + self.max_refresh > current_time:
                    return renderable

        renderable = self.render(task)
        self._renderable_cache[task.id] = (current_time, renderable)
        return renderable

    @abstractmethod
    def render(self, task: "Task") -> RenderableType:
        """Should return a renderable object."""


class RenderableColumn(ProgressColumn):
    """A column to insert an arbitrary column.

    Args:
        renderable (RenderableType, optional): Any renderable. Defaults to empty string.
    """

    def __init__(
        self, renderable: RenderableType = "", *, table_column: Optional[Column] = None
    ):
        self.renderable = renderable
        super().__init__(table_column=table_column)

    def render(self, task: "Task") -> RenderableType:
        return self.renderable


class SpinnerColumn(ProgressColumn):
    """A column with a 'spinner' animation.

    Args:
        spinner_name (str, optional): Name of spinner animation. Defaults to "dots".
        style (StyleType, optional): Style of spinner. Defaults to "progress.spinner".
        speed (float, optional): Speed factor of spinner. Defaults to 1.0.
        finished_text (TextType, optional): Text used when task is finished. Defaults to " ".
    """

    def __init__(
        self,
        spinner_name: str = "dots",
        style: Optional[StyleType] = "progress.spinner",
        speed: float = 1.0,
        finished_text: TextType = " ",
        table_column: Optional[Column] = None,
    ):
        self.spinner = Spinner(spinner_name, style=style, speed=speed)
        self.finished_text = (
            Text.from_markup(finished_text)
            if isinstance(finished_text, str)
            else finished_text
        )
        super().__init__(table_column=table_column)

    def set_spinner(
        self,
        spinner_name: str,
        spinner_style: Optional[StyleType] = "progress.spinner",
        speed: float = 1.0,
    ) -> None:
        """Set a new spinner.

        Args:
            spinner_name (str): Spinner name, see python -m rich.spinner.
            spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner".
            speed (float, optional): Speed factor of spinner. Defaults to 1.0.
        """
        self.spinner = Spinner(spinner_name, style=spinner_style, speed=speed)

    def render(self, task: "Task") -> RenderableType:
        text = (
            self.finished_text
            if task.finished
            else self.spinner.render(task.get_time())
        )
        return text


class TextColumn(ProgressColumn):
    """A column containing text."""

    def __init__(
        self,
        text_format: str,
        style: StyleType = "none",
        justify: JustifyMethod = "left",
        markup: bool = True,
        highlighter: Optional[Highlighter] = None,
        table_column: Optional[Column] = None,
    ) -> None:
        self.text_format = text_format
        self.justify: JustifyMethod = justify
        self.style = style
        self.markup = markup
        self.highlighter = highlighter
        super().__init__(table_column=table_column or Column(no_wrap=True))

    def render(self, task: "Task") -> Text:
        _text = self.text_format.format(task=task)
        if self.markup:
            text = Text.from_markup(_text, style=self.style, justify=self.justify)
        else:
            text = Text(_text, style=self.style, justify=self.justify)
        if self.highlighter:
            self.highlighter.highlight(text)
        return text


class BarColumn(ProgressColumn):
    """Renders a visual progress bar.

    Args:
        bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
    """

    def __init__(
        self,
        bar_width: Optional[int] = 40,
        style: StyleType = "bar.back",
        complete_style: StyleType = "bar.complete",
        finished_style: StyleType = "bar.finished",
        pulse_style: StyleType = "bar.pulse",
        table_column: Optional[Column] = None,
    ) -> None:
        self.bar_width = bar_width
        self.style = style
        self.complete_style = complete_style
        self.finished_style = finished_style
        self.pulse_style = pulse_style
        super().__init__(table_column=table_column)

    def render(self, task: "Task") -> ProgressBar:
        """Gets a progress bar widget for a task."""
        return ProgressBar(
            total=max(0, task.total) if task.total is not None else None,
            completed=max(0, task.completed),
            width=None if self.bar_width is None else max(1, self.bar_width),
            pulse=not task.started,
            animation_time=task.get_time(),
            style=self.style,
            complete_style=self.complete_style,
            finished_style=self.finished_style,
            pulse_style=self.pulse_style,
        )


class TimeElapsedColumn(ProgressColumn):
    """Renders time elapsed."""

    def render(self, task: "Task") -> Text:
        """Show time elapsed."""
        elapsed = task.finished_time if task.finished else task.elapsed
        if elapsed is None:
            return Text("-:--:--", style="progress.elapsed")
        delta = timedelta(seconds=int(elapsed))
        return Text(str(delta), style="progress.elapsed")


class TaskProgressColumn(TextColumn):
    """Show task progress as a percentage.

    Args:
        text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%".
        text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "".
        style (StyleType, optional): Style of output. Defaults to "none".
        justify (JustifyMethod, optional): Text justification. Defaults to "left".
        markup (bool, optional): Enable markup. Defaults to True.
        highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None.
        table_column (Optional[Column], optional): Table Column to use. Defaults to None.
        show_speed (bool, optional): Show speed if total is unknown. Defaults to False.
    """

    def __init__(
        self,
        text_format: str = "[progress.percentage]{task.percentage:>3.0f}%",
        text_format_no_percentage: str = "",
        style: StyleType = "none",
        justify: JustifyMethod = "left",
        markup: bool = True,
        highlighter: Optional[Highlighter] = None,
        table_column: Optional[Column] = None,
        show_speed: bool = False,
    ) -> None:

        self.text_format_no_percentage = text_format_no_percentage
        self.show_speed = show_speed
        super().__init__(
            text_format=text_format,
            style=style,
            justify=justify,
            markup=markup,
            highlighter=highlighter,
            table_column=table_column,
        )

    @classmethod
    def render_speed(cls, speed: Optional[float]) -> Text:
        """Render the speed in iterations per second.

        Args:
            task (Task): A Task object.

        Returns:
            Text: Text object containing the task speed.
        """
        if speed is None:
            return Text("", style="progress.percentage")
        unit, suffix = filesize.pick_unit_and_suffix(
            int(speed),
            ["", "×10³", "×10⁶", "×10⁹", "×10¹²"],
            1000,
        )
        data_speed = speed / unit
        return Text(f"{data_speed:.1f}{suffix} it/s", style="progress.percentage")

    def render(self, task: "Task") -> Text:
        if task.total is None and self.show_speed:
            return self.render_speed(task.finished_speed or task.speed)
        text_format = (
            self.text_format_no_percentage if task.total is None else self.text_format
        )
        _text = text_format.format(task=task)
        if self.markup:
            text = Text.from_markup(_text, style=self.style, justify=self.justify)
        else:
            text = Text(_text, style=self.style, justify=self.justify)
        if self.highlighter:
            self.highlighter.highlight(text)
        return text


class TimeRemainingColumn(ProgressColumn):
    """Renders estimated time remaining.

    Args:
        compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False.
        elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False.
    """

    # Only refresh twice a second to prevent jitter
    max_refresh = 0.5

    def __init__(
        self,
        compact: bool = False,
        elapsed_when_finished: bool = False,
        table_column: Optional[Column] = None,
    ):
        self.compact = compact
        self.elapsed_when_finished = elapsed_when_finished
        super().__init__(table_column=table_column)

    def render(self, task: "Task") -> Text:
        """Show time remaining."""
        if self.elapsed_when_finished and task.finished:
            task_time = task.finished_time
            style = "progress.elapsed"
        else:
            task_time = task.time_remaining
            style = "progress.remaining"

        if task.total is None:
            return Text("", style=style)

        if task_time is None:
            return Text("--:--" if self.compact else "-:--:--", style=style)

        # Based on https://github.com/tqdm/tqdm/blob/master/tqdm/std.py
        minutes, seconds = divmod(int(task_time), 60)
        hours, minutes = divmod(minutes, 60)

        if self.compact and not hours:
            formatted = f"{minutes:02d}:{seconds:02d}"
        else:
            formatted = f"{hours:d}:{minutes:02d}:{seconds:02d}"

        return Text(formatted, style=style)


class FileSizeColumn(ProgressColumn):
    """Renders completed filesize."""

    def render(self, task: "Task") -> Text:
        """Show data completed."""
        data_size = filesize.decimal(int(task.completed))
        return Text(data_size, style="progress.filesize")


class TotalFileSizeColumn(ProgressColumn):
    """Renders total filesize."""

    def render(self, task: "Task") -> Text:
        """Show data completed."""
        data_size = filesize.decimal(int(task.total)) if task.total is not None else ""
        return Text(data_size, style="progress.filesize.total")


class MofNCompleteColumn(ProgressColumn):
    """Renders completed count/total, e.g. '  10/1000'.

    Best for bounded tasks with int quantities.

    Space pads the completed count so that progress length does not change as task progresses
    past powers of 10.

    Args:
        separator (str, optional): Text to separate completed and total values. Defaults to "/".
    """

    def __init__(self, separator: str = "/", table_column: Optional[Column] = None):
        self.separator = separator
        super().__init__(table_column=table_column)

    def render(self, task: "Task") -> Text:
        """Show completed/total."""
        completed = int(task.completed)
        total = int(task.total) if task.total is not None else "?"
        total_width = len(str(total))
        return Text(
            f"{completed:{total_width}d}{self.separator}{total}",
            style="progress.download",
        )


class DownloadColumn(ProgressColumn):
    """Renders file size downloaded and total, e.g. '0.5/2.3 GB'.

    Args:
        binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False.
    """

    def __init__(
        self, binary_units: bool = False, table_column: Optional[Column] = None
    ) -> None:
        self.binary_units = binary_units
        super().__init__(table_column=table_column)

    def render(self, task: "Task") -> Text:
        """Calculate common unit for completed and total."""
        completed = int(task.completed)

        unit_and_suffix_calculation_base = (
            int(task.total) if task.total is not None else completed
        )
        if self.binary_units:
            unit, suffix = filesize.pick_unit_and_suffix(
                unit_and_suffix_calculation_base,
                ["bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"],
                1024,
            )
        else:
            unit, suffix = filesize.pick_unit_and_suffix(
                unit_and_suffix_calculation_base,
                ["bytes", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
                1000,
            )
        precision = 0 if unit == 1 else 1

        completed_ratio = completed / unit
        completed_str = f"{completed_ratio:,.{precision}f}"

        if task.total is not None:
            total = int(task.total)
            total_ratio = total / unit
            total_str = f"{total_ratio:,.{precision}f}"
        else:
            total_str = "?"

        download_status = f"{completed_str}/{total_str} {suffix}"
        download_text = Text(download_status, style="progress.download")
        return download_text


class TransferSpeedColumn(ProgressColumn):
    """Renders human readable transfer speed."""

    def render(self, task: "Task") -> Text:
        """Show data transfer speed."""
        speed = task.finished_speed or task.speed
        if speed is None:
            return Text("?", style="progress.data.speed")
        data_speed = filesize.decimal(int(speed))
        return Text(f"{data_speed}/s", style="progress.data.speed")


class ProgressSample(NamedTuple):
    """Sample of progress for a given time."""

    timestamp: float
    """Timestamp of sample."""
    completed: float
    """Number of steps completed."""


@dataclass
class Task:
    """Information regarding a progress task.

    This object should be considered read-only outside of the :class:`~Progress` class.

    """

    id: TaskID
    """Task ID associated with this task (used in Progress methods)."""

    description: str
    """str: Description of the task."""

    total: Optional[float]
    """Optional[float]: Total number of steps in this task."""

    completed: float
    """float: Number of steps completed"""

    _get_time: GetTimeCallable
    """Callable to get the current time."""

    finished_time: Optional[float] = None
    """float: Time task was finished."""

    visible: bool = True
    """bool: Indicates if this task is visible in the progress display."""

    fields: Dict[str, Any] = field(default_factory=dict)
    """dict: Arbitrary fields passed in via Progress.update."""

    start_time: Optional[float] = field(default=None, init=False, repr=False)
    """Optional[float]: Time this task was started, or None if not started."""

    stop_time: Optional[float] = field(default=None, init=False, repr=False)
    """Optional[float]: Time this task was stopped, or None if not stopped."""

    finished_speed: Optional[float] = None
    """Optional[float]: The last speed for a finished task."""

    _progress: Deque[ProgressSample] = field(
        default_factory=lambda: deque(maxlen=1000), init=False, repr=False
    )

    _lock: RLock = field(repr=False, default_factory=RLock)
    """Thread lock."""

    def get_time(self) -> float:
        """float: Get the current time, in seconds."""
        return self._get_time()

    @property
    def started(self) -> bool:
        """bool: Check if the task as started."""
        return self.start_time is not None

    @property
    def remaining(self) -> Optional[float]:
        """Optional[float]: Get the number of steps remaining, if a non-None total was set."""
        if self.total is None:
            return None
        return self.total - self.completed

    @property
    def elapsed(self) -> Optional[float]:
        """Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started."""
        if self.start_time is None:
            return None
        if self.stop_time is not None:
            return self.stop_time - self.start_time
        return self.get_time() - self.start_time

    @property
    def finished(self) -> bool:
        """Check if the task has finished."""
        return self.finished_time is not None

    @property
    def percentage(self) -> float:
        """float: Get progress of task as a percentage. If a None total was set, returns 0"""
        if not self.total:
            return 0.0
        completed = (self.completed / self.total) * 100.0
        completed = min(100.0, max(0.0, completed))
        return completed

    @property
    def speed(self) -> Optional[float]:
        """Optional[float]: Get the estimated speed in steps per second."""
        if self.start_time is None:
            return None
        with self._lock:
            progress = self._progress
            if not progress:
                return None
            total_time = progress[-1].timestamp - progress[0].timestamp
            if total_time == 0:
                return None
            iter_progress = iter(progress)
            next(iter_progress)
            total_completed = sum(sample.completed for sample in iter_progress)
            speed = total_completed / total_time
            return speed

    @property
    def time_remaining(self) -> Optional[float]:
        """Optional[float]: Get estimated time to completion, or ``None`` if no data."""
        if self.finished:
            return 0.0
        speed = self.speed
        if not speed:
            return None
        remaining = self.remaining
        if remaining is None:
            return None
        estimate = ceil(remaining / speed)
        return estimate

    def _reset(self) -> None:
        """Reset progress."""
        self._progress.clear()
        self.finished_time = None
        self.finished_speed = None


class Progress(JupyterMixin):
    """Renders an auto-updating progress bar(s).

    Args:
        console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout.
        auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`.
        refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None.
        speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
        redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True.
        get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None.
        disable (bool, optional): Disable progress display. Defaults to False
        expand (bool, optional): Expand tasks table to fit width. Defaults to False.
    """

    def __init__(
        self,
        *columns: Union[str, ProgressColumn],
        console: Optional[Console] = None,
        auto_refresh: bool = True,
        refresh_per_second: float = 10,
        speed_estimate_period: float = 30.0,
        transient: bool = False,
        redirect_stdout: bool = True,
        redirect_stderr: bool = True,
        get_time: Optional[GetTimeCallable] = None,
        disable: bool = False,
        expand: bool = False,
    ) -> None:
        assert refresh_per_second > 0, "refresh_per_second must be > 0"
        self._lock = RLock()
        self.columns = columns or self.get_default_columns()
        self.speed_estimate_period = speed_estimate_period

        self.disable = disable
        self.expand = expand
        self._tasks: Dict[TaskID, Task] = {}
        self._task_index: TaskID = TaskID(0)
        self.live = Live(
            console=console or get_console(),
            auto_refresh=auto_refresh,
            refresh_per_second=refresh_per_second,
            transient=transient,
            redirect_stdout=redirect_stdout,
            redirect_stderr=redirect_stderr,
            get_renderable=self.get_renderable,
        )
        self.get_time = get_time or self.console.get_time
        self.print = self.console.print
        self.log = self.console.log

    @classmethod
    def get_default_columns(cls) -> Tuple[ProgressColumn, ...]:
        """Get the default columns used for a new Progress instance:
           - a text column for the description (TextColumn)
           - the bar itself (BarColumn)
           - a text column showing completion percentage (TextColumn)
           - an estimated-time-remaining column (TimeRemainingColumn)
        If the Progress instance is created without passing a columns argument,
        the default columns defined here will be used.

        You can also create a Progress instance using custom columns before
        and/or after the defaults, as in this example:

            progress = Progress(
                SpinnerColumn(),
                *Progress.default_columns(),
                "Elapsed:",
                TimeElapsedColumn(),
            )

        This code shows the creation of a Progress display, containing
        a spinner to the left, the default columns, and a labeled elapsed
        time column.
        """
        return (
            TextColumn("[progress.description]{task.description}"),
            BarColumn(),
            TaskProgressColumn(),
            TimeRemainingColumn(),
        )

    @property
    def console(self) -> Console:
        return self.live.console

    @property
    def tasks(self) -> List[Task]:
        """Get a list of Task instances."""
        with self._lock:
            return list(self._tasks.values())

    @property
    def task_ids(self) -> List[TaskID]:
        """A list of task IDs."""
        with self._lock:
            return list(self._tasks.keys())

    @property
    def finished(self) -> bool:
        """Check if all tasks have been completed."""
        with self._lock:
            if not self._tasks:
                return True
            return all(task.finished for task in self._tasks.values())

    def start(self) -> None:
        """Start the progress display."""
        if not self.disable:
            self.live.start(refresh=True)

    def stop(self) -> None:
        """Stop the progress display."""
        self.live.stop()
        if not self.console.is_interactive:
            self.console.print()

    def __enter__(self) -> "Progress":
        self.start()
        return self

    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> None:
        self.stop()

    def track(
        self,
        sequence: Union[Iterable[ProgressType], Sequence[ProgressType]],
        total: Optional[float] = None,
        task_id: Optional[TaskID] = None,
        description: str = "Working...",
        update_period: float = 0.1,
    ) -> Iterable[ProgressType]:
        """Track progress by iterating over a sequence.

        Args:
            sequence (Sequence[ProgressType]): A sequence of values you want to iterate over and track progress.
            total: (float, optional): Total number of steps. Default is len(sequence).
            task_id: (TaskID): Task to track. Default is new task.
            description: (str, optional): Description of task, if new task is created.
            update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.

        Returns:
            Iterable[ProgressType]: An iterable of values taken from the provided sequence.
        """
        if total is None:
            total = float(length_hint(sequence)) or None

        if task_id is None:
            task_id = self.add_task(description, total=total)
        else:
            self.update(task_id, total=total)

        if self.live.auto_refresh:
            with _TrackThread(self, task_id, update_period) as track_thread:
                for value in sequence:
                    yield value
                    track_thread.completed += 1
        else:
            advance = self.advance
            refresh = self.refresh
            for value in sequence:
                yield value
                advance(task_id, 1)
                refresh()

    def wrap_file(
        self,
        file: BinaryIO,
        total: Optional[int] = None,
        *,
        task_id: Optional[TaskID] = None,
        description: str = "Reading...",
    ) -> BinaryIO:
        """Track progress file reading from a binary file.

        Args:
            file (BinaryIO): A file-like object opened in binary mode.
            total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given.
            task_id (TaskID): Task to track. Default is new task.
            description (str, optional): Description of task, if new task is created.

        Returns:
            BinaryIO: A readable file-like object in binary mode.

        Raises:
            ValueError: When no total value can be extracted from the arguments or the task.
        """
        # attempt to recover the total from the task
        total_bytes: Optional[float] = None
        if total is not None:
            total_bytes = total
        elif task_id is not None:
            with self._lock:
                total_bytes = self._tasks[task_id].total
        if total_bytes is None:
            raise ValueError(
                f"unable to get the total number of bytes, please specify 'total'"
            )

        # update total of task or create new task
        if task_id is None:
            task_id = self.add_task(description, total=total_bytes)
        else:
            self.update(task_id, total=total_bytes)

        return _Reader(file, self, task_id, close_handle=False)

    @typing.overload
    def open(
        self,
        file: Union[str, "PathLike[str]", bytes],
        mode: Literal["rb"],
        buffering: int = -1,
        encoding: Optional[str] = None,
        errors: Optional[str] = None,
        newline: Optional[str] = None,
        *,
        total: Optional[int] = None,
        task_id: Optional[TaskID] = None,
        description: str = "Reading...",
    ) -> BinaryIO:
        pass

    @typing.overload
    def open(
        self,
        file: Union[str, "PathLike[str]", bytes],
        mode: Union[Literal["r"], Literal["rt"]],
        buffering: int = -1,
        encoding: Optional[str] = None,
        errors: Optional[str] = None,
        newline: Optional[str] = None,
        *,
        total: Optional[int] = None,
        task_id: Optional[TaskID] = None,
        description: str = "Reading...",
    ) -> TextIO:
        pass

    def open(
        self,
        file: Union[str, "PathLike[str]", bytes],
        mode: Union[Literal["rb"], Literal["rt"], Literal["r"]] = "r",
        buffering: int = -1,
        encoding: Optional[str] = None,
        errors: Optional[str] = None,
        newline: Optional[str] = None,
        *,
        total: Optional[int] = None,
        task_id: Optional[TaskID] = None,
        description: str = "Reading...",
    ) -> Union[BinaryIO, TextIO]:
        """Track progress while reading from a binary file.

        Args:
            path (Union[str, PathLike[str]]): The path to the file to read.
            mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
            buffering (int): The buffering strategy to use, see :func:`io.open`.
            encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
            errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
            newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`.
            total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used.
            task_id (TaskID): Task to track. Default is new task.
            description (str, optional): Description of task, if new task is created.

        Returns:
            BinaryIO: A readable file-like object in binary mode.

        Raises:
            ValueError: When an invalid mode is given.
        """
        # normalize the mode (always rb, rt)
        _mode = "".join(sorted(mode, reverse=False))
        if _mode not in ("br", "rt", "r"):
            raise ValueError("invalid mode {!r}".format(mode))

        # patch buffering to provide the same behaviour as the builtin `open`
        line_buffering = buffering == 1
        if _mode == "br" and buffering == 1:
            warnings.warn(
                "line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used",
                RuntimeWarning,
            )
            buffering = -1
        elif _mode in ("rt", "r"):
            if buffering == 0:
                raise ValueError("can't have unbuffered text I/O")
            elif buffering == 1:
                buffering = -1

        # attempt to get the total with `os.stat`
        if total is None:
            total = stat(file).st_size

        # update total of task or create new task
        if task_id is None:
            task_id = self.add_task(description, total=total)
        else:
            self.update(task_id, total=total)

        # open the file in binary mode,
        handle = io.open(file, "rb", buffering=buffering)
        reader = _Reader(handle, self, task_id, close_handle=True)

        # wrap the reader in a `TextIOWrapper` if text mode
        if mode in ("r", "rt"):
            return io.TextIOWrapper(
                reader,
                encoding=encoding,
                errors=errors,
                newline=newline,
                line_buffering=line_buffering,
            )

        return reader

    def start_task(self, task_id: TaskID) -> None:
        """Start a task.

        Starts a task (used when calculating elapsed time). You may need to call this manually,
        if you called ``add_task`` with ``start=False``.

        Args:
            task_id (TaskID): ID of task.
        """
        with self._lock:
            task = self._tasks[task_id]
            if task.start_time is None:
                task.start_time = self.get_time()

    def stop_task(self, task_id: TaskID) -> None:
        """Stop a task.

        This will freeze the elapsed time on the task.

        Args:
            task_id (TaskID): ID of task.
        """
        with self._lock:
            task = self._tasks[task_id]
            current_time = self.get_time()
            if task.start_time is None:
                task.start_time = current_time
            task.stop_time = current_time

    def update(
        self,
        task_id: TaskID,
        *,
        total: Optional[float] = None,
        completed: Optional[float] = None,
        advance: Optional[float] = None,
        description: Optional[str] = None,
        visible: Optional[bool] = None,
        refresh: bool = False,
        **fields: Any,
    ) -> None:
        """Update information associated with a task.

        Args:
            task_id (TaskID): Task id (returned by add_task).
            total (float, optional): Updates task.total if not None.
            completed (float, optional): Updates task.completed if not None.
            advance (float, optional): Add a value to task.completed if not None.
            description (str, optional): Change task description if not None.
            visible (bool, optional): Set visible flag if not None.
            refresh (bool): Force a refresh of progress information. Default is False.
            **fields (Any): Additional data fields required for rendering.
        """
        with self._lock:
            task = self._tasks[task_id]
            completed_start = task.completed

            if total is not None and total != task.total:
                task.total = total
                task._reset()
            if advance is not None:
                task.completed += advance
            if completed is not None:
                task.completed = completed
            if description is not None:
                task.description = description
            if visible is not None:
                task.visible = visible
            task.fields.update(fields)
            update_completed = task.completed - completed_start

            current_time = self.get_time()
            old_sample_time = current_time - self.speed_estimate_period
            _progress = task._progress

            popleft = _progress.popleft
            while _progress and _progress[0].timestamp < old_sample_time:
                popleft()
            if update_completed > 0:
                _progress.append(ProgressSample(current_time, update_completed))
            if (
                task.total is not None
                and task.completed >= task.total
                and task.finished_time is None
            ):
                task.finished_time = task.elapsed

        if refresh:
            self.refresh()

    def reset(
        self,
        task_id: TaskID,
        *,
        start: bool = True,
        total: Optional[float] = None,
        completed: int = 0,
        visible: Optional[bool] = None,
        description: Optional[str] = None,
        **fields: Any,
    ) -> None:
        """Reset a task so completed is 0 and the clock is reset.

        Args:
            task_id (TaskID): ID of task.
            start (bool, optional): Start the task after reset. Defaults to True.
            total (float, optional): New total steps in task, or None to use current total. Defaults to None.
            completed (int, optional): Number of steps completed. Defaults to 0.
            visible (bool, optional): Enable display of the task. Defaults to True.
            description (str, optional): Change task description if not None. Defaults to None.
            **fields (str): Additional data fields required for rendering.
        """
        current_time = self.get_time()
        with self._lock:
            task = self._tasks[task_id]
            task._reset()
            task.start_time = current_time if start else None
            if total is not None:
                task.total = total
            task.completed = completed
            if visible is not None:
                task.visible = visible
            if fields:
                task.fields = fields
            if description is not None:
                task.description = description
            task.finished_time = None
        self.refresh()

    def advance(self, task_id: TaskID, advance: float = 1) -> None:
        """Advance task by a number of steps.

        Args:
            task_id (TaskID): ID of task.
            advance (float): Number of steps to advance. Default is 1.
        """
        current_time = self.get_time()
        with self._lock:
            task = self._tasks[task_id]
            completed_start = task.completed
            task.completed += advance
            update_completed = task.completed - completed_start
            old_sample_time = current_time - self.speed_estimate_period
            _progress = task._progress

            popleft = _progress.popleft
            while _progress and _progress[0].timestamp < old_sample_time:
                popleft()
            while len(_progress) > 1000:
                popleft()
            _progress.append(ProgressSample(current_time, update_completed))
            if (
                task.total is not None
                and task.completed >= task.total
                and task.finished_time is None
            ):
                task.finished_time = task.elapsed
                task.finished_speed = task.speed

    def refresh(self) -> None:
        """Refresh (render) the progress information."""
        if not self.disable and self.live.is_started:
            self.live.refresh()

    def get_renderable(self) -> RenderableType:
        """Get a renderable for the progress display."""
        renderable = Group(*self.get_renderables())
        return renderable

    def get_renderables(self) -> Iterable[RenderableType]:
        """Get a number of renderables for the progress display."""
        table = self.make_tasks_table(self.tasks)
        yield table

    def make_tasks_table(self, tasks: Iterable[Task]) -> Table:
        """Get a table to render the Progress display.

        Args:
            tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.

        Returns:
            Table: A table instance.
        """
        table_columns = (
            (
                Column(no_wrap=True)
                if isinstance(_column, str)
                else _column.get_table_column().copy()
            )
            for _column in self.columns
        )
        table = Table.grid(*table_columns, padding=(0, 1), expand=self.expand)

        for task in tasks:
            if task.visible:
                table.add_row(
                    *(
                        (
                            column.format(task=task)
                            if isinstance(column, str)
                            else column(task)
                        )
                        for column in self.columns
                    )
                )
        return table

    def __rich__(self) -> RenderableType:
        """Makes the Progress class itself renderable."""
        with self._lock:
            return self.get_renderable()

    def add_task(
        self,
        description: str,
        start: bool = True,
        total: Optional[float] = 100.0,
        completed: int = 0,
        visible: bool = True,
        **fields: Any,
    ) -> TaskID:
        """Add a new 'task' to the Progress display.

        Args:
            description (str): A description of the task.
            start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False,
                you will need to call `start` manually. Defaults to True.
            total (float, optional): Number of total steps in the progress if known.
                Set to None to render a pulsing animation. Defaults to 100.
            completed (int, optional): Number of steps completed so far. Defaults to 0.
            visible (bool, optional): Enable display of the task. Defaults to True.
            **fields (str): Additional data fields required for rendering.

        Returns:
            TaskID: An ID you can use when calling `update`.
        """
        with self._lock:
            task = Task(
                self._task_index,
                description,
                total,
                completed,
                visible=visible,
                fields=fields,
                _get_time=self.get_time,
                _lock=self._lock,
            )
            self._tasks[self._task_index] = task
            if start:
                self.start_task(self._task_index)
            new_task_index = self._task_index
            self._task_index = TaskID(int(self._task_index) + 1)
        self.refresh()
        return new_task_index

    def remove_task(self, task_id: TaskID) -> None:
        """Delete a task if it exists.

        Args:
            task_id (TaskID): A task ID.

        """
        with self._lock:
            del self._tasks[task_id]


if __name__ == "__main__":  # pragma: no coverage

    import random
    import time

    from .panel import Panel
    from .rule import Rule
    from .syntax import Syntax
    from .table import Table

    syntax = Syntax(
        '''def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_value''',
        "python",
        line_numbers=True,
    )

    table = Table("foo", "bar", "baz")
    table.add_row("1", "2", "3")

    progress_renderables = [
        "Text may be printed while the progress bars are rendering.",
        Panel("In fact, [i]any[/i] renderable will work"),
        "Such as [magenta]tables[/]...",
        table,
        "Pretty printed structures...",
        {"type": "example", "text": "Pretty printed"},
        "Syntax...",
        syntax,
        Rule("Give it a try!"),
    ]

    from itertools import cycle

    examples = cycle(progress_renderables)

    console = Console(record=True)

    with Progress(
        SpinnerColumn(),
        *Progress.get_default_columns(),
        TimeElapsedColumn(),
        console=console,
        transient=False,
    ) as progress:

        task1 = progress.add_task("[red]Downloading", total=1000)
        task2 = progress.add_task("[green]Processing", total=1000)
        task3 = progress.add_task("[yellow]Thinking", total=None)

        while not progress.finished:
            progress.update(task1, advance=0.5)
            progress.update(task2, advance=0.3)
            time.sleep(0.01)
            if random.randint(0, 100) < 1:
                progress.log(next(examples))
python3.12/site-packages/pip/_vendor/rich/_emoji_codes.py000064400000421713151732702260017270 0ustar00EMOJI = {
    "1st_place_medal": "🥇",
    "2nd_place_medal": "🥈",
    "3rd_place_medal": "🥉",
    "ab_button_(blood_type)": "🆎",
    "atm_sign": "🏧",
    "a_button_(blood_type)": "🅰",
    "afghanistan": "🇦🇫",
    "albania": "🇦🇱",
    "algeria": "🇩🇿",
    "american_samoa": "🇦🇸",
    "andorra": "🇦🇩",
    "angola": "🇦🇴",
    "anguilla": "🇦🇮",
    "antarctica": "🇦🇶",
    "antigua_&_barbuda": "🇦🇬",
    "aquarius": "♒",
    "argentina": "🇦🇷",
    "aries": "♈",
    "armenia": "🇦🇲",
    "aruba": "🇦🇼",
    "ascension_island": "🇦🇨",
    "australia": "🇦🇺",
    "austria": "🇦🇹",
    "azerbaijan": "🇦🇿",
    "back_arrow": "🔙",
    "b_button_(blood_type)": "🅱",
    "bahamas": "🇧🇸",
    "bahrain": "🇧🇭",
    "bangladesh": "🇧🇩",
    "barbados": "🇧🇧",
    "belarus": "🇧🇾",
    "belgium": "🇧🇪",
    "belize": "🇧🇿",
    "benin": "🇧🇯",
    "bermuda": "🇧🇲",
    "bhutan": "🇧🇹",
    "bolivia": "🇧🇴",
    "bosnia_&_herzegovina": "🇧🇦",
    "botswana": "🇧🇼",
    "bouvet_island": "🇧🇻",
    "brazil": "🇧🇷",
    "british_indian_ocean_territory": "🇮🇴",
    "british_virgin_islands": "🇻🇬",
    "brunei": "🇧🇳",
    "bulgaria": "🇧🇬",
    "burkina_faso": "🇧🇫",
    "burundi": "🇧🇮",
    "cl_button": "🆑",
    "cool_button": "🆒",
    "cambodia": "🇰🇭",
    "cameroon": "🇨🇲",
    "canada": "🇨🇦",
    "canary_islands": "🇮🇨",
    "cancer": "♋",
    "cape_verde": "🇨🇻",
    "capricorn": "♑",
    "caribbean_netherlands": "🇧🇶",
    "cayman_islands": "🇰🇾",
    "central_african_republic": "🇨🇫",
    "ceuta_&_melilla": "🇪🇦",
    "chad": "🇹🇩",
    "chile": "🇨🇱",
    "china": "🇨🇳",
    "christmas_island": "🇨🇽",
    "christmas_tree": "🎄",
    "clipperton_island": "🇨🇵",
    "cocos_(keeling)_islands": "🇨🇨",
    "colombia": "🇨🇴",
    "comoros": "🇰🇲",
    "congo_-_brazzaville": "🇨🇬",
    "congo_-_kinshasa": "🇨🇩",
    "cook_islands": "🇨🇰",
    "costa_rica": "🇨🇷",
    "croatia": "🇭🇷",
    "cuba": "🇨🇺",
    "curaçao": "🇨🇼",
    "cyprus": "🇨🇾",
    "czechia": "🇨🇿",
    "côte_d’ivoire": "🇨🇮",
    "denmark": "🇩🇰",
    "diego_garcia": "🇩🇬",
    "djibouti": "🇩🇯",
    "dominica": "🇩🇲",
    "dominican_republic": "🇩🇴",
    "end_arrow": "🔚",
    "ecuador": "🇪🇨",
    "egypt": "🇪🇬",
    "el_salvador": "🇸🇻",
    "england": "🏴\U000e0067\U000e0062\U000e0065\U000e006e\U000e0067\U000e007f",
    "equatorial_guinea": "🇬🇶",
    "eritrea": "🇪🇷",
    "estonia": "🇪🇪",
    "ethiopia": "🇪🇹",
    "european_union": "🇪🇺",
    "free_button": "🆓",
    "falkland_islands": "🇫🇰",
    "faroe_islands": "🇫🇴",
    "fiji": "🇫🇯",
    "finland": "🇫🇮",
    "france": "🇫🇷",
    "french_guiana": "🇬🇫",
    "french_polynesia": "🇵🇫",
    "french_southern_territories": "🇹🇫",
    "gabon": "🇬🇦",
    "gambia": "🇬🇲",
    "gemini": "♊",
    "georgia": "🇬🇪",
    "germany": "🇩🇪",
    "ghana": "🇬🇭",
    "gibraltar": "🇬🇮",
    "greece": "🇬🇷",
    "greenland": "🇬🇱",
    "grenada": "🇬🇩",
    "guadeloupe": "🇬🇵",
    "guam": "🇬🇺",
    "guatemala": "🇬🇹",
    "guernsey": "🇬🇬",
    "guinea": "🇬🇳",
    "guinea-bissau": "🇬🇼",
    "guyana": "🇬🇾",
    "haiti": "🇭🇹",
    "heard_&_mcdonald_islands": "🇭🇲",
    "honduras": "🇭🇳",
    "hong_kong_sar_china": "🇭🇰",
    "hungary": "🇭🇺",
    "id_button": "🆔",
    "iceland": "🇮🇸",
    "india": "🇮🇳",
    "indonesia": "🇮🇩",
    "iran": "🇮🇷",
    "iraq": "🇮🇶",
    "ireland": "🇮🇪",
    "isle_of_man": "🇮🇲",
    "israel": "🇮🇱",
    "italy": "🇮🇹",
    "jamaica": "🇯🇲",
    "japan": "🗾",
    "japanese_acceptable_button": "🉑",
    "japanese_application_button": "🈸",
    "japanese_bargain_button": "🉐",
    "japanese_castle": "🏯",
    "japanese_congratulations_button": "㊗",
    "japanese_discount_button": "🈹",
    "japanese_dolls": "🎎",
    "japanese_free_of_charge_button": "🈚",
    "japanese_here_button": "🈁",
    "japanese_monthly_amount_button": "🈷",
    "japanese_no_vacancy_button": "🈵",
    "japanese_not_free_of_charge_button": "🈶",
    "japanese_open_for_business_button": "🈺",
    "japanese_passing_grade_button": "🈴",
    "japanese_post_office": "🏣",
    "japanese_prohibited_button": "🈲",
    "japanese_reserved_button": "🈯",
    "japanese_secret_button": "㊙",
    "japanese_service_charge_button": "🈂",
    "japanese_symbol_for_beginner": "🔰",
    "japanese_vacancy_button": "🈳",
    "jersey": "🇯🇪",
    "jordan": "🇯🇴",
    "kazakhstan": "🇰🇿",
    "kenya": "🇰🇪",
    "kiribati": "🇰🇮",
    "kosovo": "🇽🇰",
    "kuwait": "🇰🇼",
    "kyrgyzstan": "🇰🇬",
    "laos": "🇱🇦",
    "latvia": "🇱🇻",
    "lebanon": "🇱🇧",
    "leo": "♌",
    "lesotho": "🇱🇸",
    "liberia": "🇱🇷",
    "libra": "♎",
    "libya": "🇱🇾",
    "liechtenstein": "🇱🇮",
    "lithuania": "🇱🇹",
    "luxembourg": "🇱🇺",
    "macau_sar_china": "🇲🇴",
    "macedonia": "🇲🇰",
    "madagascar": "🇲🇬",
    "malawi": "🇲🇼",
    "malaysia": "🇲🇾",
    "maldives": "🇲🇻",
    "mali": "🇲🇱",
    "malta": "🇲🇹",
    "marshall_islands": "🇲🇭",
    "martinique": "🇲🇶",
    "mauritania": "🇲🇷",
    "mauritius": "🇲🇺",
    "mayotte": "🇾🇹",
    "mexico": "🇲🇽",
    "micronesia": "🇫🇲",
    "moldova": "🇲🇩",
    "monaco": "🇲🇨",
    "mongolia": "🇲🇳",
    "montenegro": "🇲🇪",
    "montserrat": "🇲🇸",
    "morocco": "🇲🇦",
    "mozambique": "🇲🇿",
    "mrs._claus": "🤶",
    "mrs._claus_dark_skin_tone": "🤶🏿",
    "mrs._claus_light_skin_tone": "🤶🏻",
    "mrs._claus_medium-dark_skin_tone": "🤶🏾",
    "mrs._claus_medium-light_skin_tone": "🤶🏼",
    "mrs._claus_medium_skin_tone": "🤶🏽",
    "myanmar_(burma)": "🇲🇲",
    "new_button": "🆕",
    "ng_button": "🆖",
    "namibia": "🇳🇦",
    "nauru": "🇳🇷",
    "nepal": "🇳🇵",
    "netherlands": "🇳🇱",
    "new_caledonia": "🇳🇨",
    "new_zealand": "🇳🇿",
    "nicaragua": "🇳🇮",
    "niger": "🇳🇪",
    "nigeria": "🇳🇬",
    "niue": "🇳🇺",
    "norfolk_island": "🇳🇫",
    "north_korea": "🇰🇵",
    "northern_mariana_islands": "🇲🇵",
    "norway": "🇳🇴",
    "ok_button": "🆗",
    "ok_hand": "👌",
    "ok_hand_dark_skin_tone": "👌🏿",
    "ok_hand_light_skin_tone": "👌🏻",
    "ok_hand_medium-dark_skin_tone": "👌🏾",
    "ok_hand_medium-light_skin_tone": "👌🏼",
    "ok_hand_medium_skin_tone": "👌🏽",
    "on!_arrow": "🔛",
    "o_button_(blood_type)": "🅾",
    "oman": "🇴🇲",
    "ophiuchus": "⛎",
    "p_button": "🅿",
    "pakistan": "🇵🇰",
    "palau": "🇵🇼",
    "palestinian_territories": "🇵🇸",
    "panama": "🇵🇦",
    "papua_new_guinea": "🇵🇬",
    "paraguay": "🇵🇾",
    "peru": "🇵🇪",
    "philippines": "🇵🇭",
    "pisces": "♓",
    "pitcairn_islands": "🇵🇳",
    "poland": "🇵🇱",
    "portugal": "🇵🇹",
    "puerto_rico": "🇵🇷",
    "qatar": "🇶🇦",
    "romania": "🇷🇴",
    "russia": "🇷🇺",
    "rwanda": "🇷🇼",
    "réunion": "🇷🇪",
    "soon_arrow": "🔜",
    "sos_button": "🆘",
    "sagittarius": "♐",
    "samoa": "🇼🇸",
    "san_marino": "🇸🇲",
    "santa_claus": "🎅",
    "santa_claus_dark_skin_tone": "🎅🏿",
    "santa_claus_light_skin_tone": "🎅🏻",
    "santa_claus_medium-dark_skin_tone": "🎅🏾",
    "santa_claus_medium-light_skin_tone": "🎅🏼",
    "santa_claus_medium_skin_tone": "🎅🏽",
    "saudi_arabia": "🇸🇦",
    "scorpio": "♏",
    "scotland": "🏴\U000e0067\U000e0062\U000e0073\U000e0063\U000e0074\U000e007f",
    "senegal": "🇸🇳",
    "serbia": "🇷🇸",
    "seychelles": "🇸🇨",
    "sierra_leone": "🇸🇱",
    "singapore": "🇸🇬",
    "sint_maarten": "🇸🇽",
    "slovakia": "🇸🇰",
    "slovenia": "🇸🇮",
    "solomon_islands": "🇸🇧",
    "somalia": "🇸🇴",
    "south_africa": "🇿🇦",
    "south_georgia_&_south_sandwich_islands": "🇬🇸",
    "south_korea": "🇰🇷",
    "south_sudan": "🇸🇸",
    "spain": "🇪🇸",
    "sri_lanka": "🇱🇰",
    "st._barthélemy": "🇧🇱",
    "st._helena": "🇸🇭",
    "st._kitts_&_nevis": "🇰🇳",
    "st._lucia": "🇱🇨",
    "st._martin": "🇲🇫",
    "st._pierre_&_miquelon": "🇵🇲",
    "st._vincent_&_grenadines": "🇻🇨",
    "statue_of_liberty": "🗽",
    "sudan": "🇸🇩",
    "suriname": "🇸🇷",
    "svalbard_&_jan_mayen": "🇸🇯",
    "swaziland": "🇸🇿",
    "sweden": "🇸🇪",
    "switzerland": "🇨🇭",
    "syria": "🇸🇾",
    "são_tomé_&_príncipe": "🇸🇹",
    "t-rex": "🦖",
    "top_arrow": "🔝",
    "taiwan": "🇹🇼",
    "tajikistan": "🇹🇯",
    "tanzania": "🇹🇿",
    "taurus": "♉",
    "thailand": "🇹🇭",
    "timor-leste": "🇹🇱",
    "togo": "🇹🇬",
    "tokelau": "🇹🇰",
    "tokyo_tower": "🗼",
    "tonga": "🇹🇴",
    "trinidad_&_tobago": "🇹🇹",
    "tristan_da_cunha": "🇹🇦",
    "tunisia": "🇹🇳",
    "turkey": "🦃",
    "turkmenistan": "🇹🇲",
    "turks_&_caicos_islands": "🇹🇨",
    "tuvalu": "🇹🇻",
    "u.s._outlying_islands": "🇺🇲",
    "u.s._virgin_islands": "🇻🇮",
    "up!_button": "🆙",
    "uganda": "🇺🇬",
    "ukraine": "🇺🇦",
    "united_arab_emirates": "🇦🇪",
    "united_kingdom": "🇬🇧",
    "united_nations": "🇺🇳",
    "united_states": "🇺🇸",
    "uruguay": "🇺🇾",
    "uzbekistan": "🇺🇿",
    "vs_button": "🆚",
    "vanuatu": "🇻🇺",
    "vatican_city": "🇻🇦",
    "venezuela": "🇻🇪",
    "vietnam": "🇻🇳",
    "virgo": "♍",
    "wales": "🏴\U000e0067\U000e0062\U000e0077\U000e006c\U000e0073\U000e007f",
    "wallis_&_futuna": "🇼🇫",
    "western_sahara": "🇪🇭",
    "yemen": "🇾🇪",
    "zambia": "🇿🇲",
    "zimbabwe": "🇿🇼",
    "abacus": "🧮",
    "adhesive_bandage": "🩹",
    "admission_tickets": "🎟",
    "adult": "🧑",
    "adult_dark_skin_tone": "🧑🏿",
    "adult_light_skin_tone": "🧑🏻",
    "adult_medium-dark_skin_tone": "🧑🏾",
    "adult_medium-light_skin_tone": "🧑🏼",
    "adult_medium_skin_tone": "🧑🏽",
    "aerial_tramway": "🚡",
    "airplane": "✈",
    "airplane_arrival": "🛬",
    "airplane_departure": "🛫",
    "alarm_clock": "⏰",
    "alembic": "⚗",
    "alien": "👽",
    "alien_monster": "👾",
    "ambulance": "🚑",
    "american_football": "🏈",
    "amphora": "🏺",
    "anchor": "⚓",
    "anger_symbol": "💢",
    "angry_face": "😠",
    "angry_face_with_horns": "👿",
    "anguished_face": "😧",
    "ant": "🐜",
    "antenna_bars": "📶",
    "anxious_face_with_sweat": "😰",
    "articulated_lorry": "🚛",
    "artist_palette": "🎨",
    "astonished_face": "😲",
    "atom_symbol": "⚛",
    "auto_rickshaw": "🛺",
    "automobile": "🚗",
    "avocado": "🥑",
    "axe": "🪓",
    "baby": "👶",
    "baby_angel": "👼",
    "baby_angel_dark_skin_tone": "👼🏿",
    "baby_angel_light_skin_tone": "👼🏻",
    "baby_angel_medium-dark_skin_tone": "👼🏾",
    "baby_angel_medium-light_skin_tone": "👼🏼",
    "baby_angel_medium_skin_tone": "👼🏽",
    "baby_bottle": "🍼",
    "baby_chick": "🐤",
    "baby_dark_skin_tone": "👶🏿",
    "baby_light_skin_tone": "👶🏻",
    "baby_medium-dark_skin_tone": "👶🏾",
    "baby_medium-light_skin_tone": "👶🏼",
    "baby_medium_skin_tone": "👶🏽",
    "baby_symbol": "🚼",
    "backhand_index_pointing_down": "👇",
    "backhand_index_pointing_down_dark_skin_tone": "👇🏿",
    "backhand_index_pointing_down_light_skin_tone": "👇🏻",
    "backhand_index_pointing_down_medium-dark_skin_tone": "👇🏾",
    "backhand_index_pointing_down_medium-light_skin_tone": "👇🏼",
    "backhand_index_pointing_down_medium_skin_tone": "👇🏽",
    "backhand_index_pointing_left": "👈",
    "backhand_index_pointing_left_dark_skin_tone": "👈🏿",
    "backhand_index_pointing_left_light_skin_tone": "👈🏻",
    "backhand_index_pointing_left_medium-dark_skin_tone": "👈🏾",
    "backhand_index_pointing_left_medium-light_skin_tone": "👈🏼",
    "backhand_index_pointing_left_medium_skin_tone": "👈🏽",
    "backhand_index_pointing_right": "👉",
    "backhand_index_pointing_right_dark_skin_tone": "👉🏿",
    "backhand_index_pointing_right_light_skin_tone": "👉🏻",
    "backhand_index_pointing_right_medium-dark_skin_tone": "👉🏾",
    "backhand_index_pointing_right_medium-light_skin_tone": "👉🏼",
    "backhand_index_pointing_right_medium_skin_tone": "👉🏽",
    "backhand_index_pointing_up": "👆",
    "backhand_index_pointing_up_dark_skin_tone": "👆🏿",
    "backhand_index_pointing_up_light_skin_tone": "👆🏻",
    "backhand_index_pointing_up_medium-dark_skin_tone": "👆🏾",
    "backhand_index_pointing_up_medium-light_skin_tone": "👆🏼",
    "backhand_index_pointing_up_medium_skin_tone": "👆🏽",
    "bacon": "🥓",
    "badger": "🦡",
    "badminton": "🏸",
    "bagel": "🥯",
    "baggage_claim": "🛄",
    "baguette_bread": "🥖",
    "balance_scale": "⚖",
    "bald": "🦲",
    "bald_man": "👨\u200d🦲",
    "bald_woman": "👩\u200d🦲",
    "ballet_shoes": "🩰",
    "balloon": "🎈",
    "ballot_box_with_ballot": "🗳",
    "ballot_box_with_check": "☑",
    "banana": "🍌",
    "banjo": "🪕",
    "bank": "🏦",
    "bar_chart": "📊",
    "barber_pole": "💈",
    "baseball": "⚾",
    "basket": "🧺",
    "basketball": "🏀",
    "bat": "🦇",
    "bathtub": "🛁",
    "battery": "🔋",
    "beach_with_umbrella": "🏖",
    "beaming_face_with_smiling_eyes": "😁",
    "bear_face": "🐻",
    "bearded_person": "🧔",
    "bearded_person_dark_skin_tone": "🧔🏿",
    "bearded_person_light_skin_tone": "🧔🏻",
    "bearded_person_medium-dark_skin_tone": "🧔🏾",
    "bearded_person_medium-light_skin_tone": "🧔🏼",
    "bearded_person_medium_skin_tone": "🧔🏽",
    "beating_heart": "💓",
    "bed": "🛏",
    "beer_mug": "🍺",
    "bell": "🔔",
    "bell_with_slash": "🔕",
    "bellhop_bell": "🛎",
    "bento_box": "🍱",
    "beverage_box": "🧃",
    "bicycle": "🚲",
    "bikini": "👙",
    "billed_cap": "🧢",
    "biohazard": "☣",
    "bird": "🐦",
    "birthday_cake": "🎂",
    "black_circle": "⚫",
    "black_flag": "🏴",
    "black_heart": "🖤",
    "black_large_square": "⬛",
    "black_medium-small_square": "◾",
    "black_medium_square": "◼",
    "black_nib": "✒",
    "black_small_square": "▪",
    "black_square_button": "🔲",
    "blond-haired_man": "👱\u200d♂️",
    "blond-haired_man_dark_skin_tone": "👱🏿\u200d♂️",
    "blond-haired_man_light_skin_tone": "👱🏻\u200d♂️",
    "blond-haired_man_medium-dark_skin_tone": "👱🏾\u200d♂️",
    "blond-haired_man_medium-light_skin_tone": "👱🏼\u200d♂️",
    "blond-haired_man_medium_skin_tone": "👱🏽\u200d♂️",
    "blond-haired_person": "👱",
    "blond-haired_person_dark_skin_tone": "👱🏿",
    "blond-haired_person_light_skin_tone": "👱🏻",
    "blond-haired_person_medium-dark_skin_tone": "👱🏾",
    "blond-haired_person_medium-light_skin_tone": "👱🏼",
    "blond-haired_person_medium_skin_tone": "👱🏽",
    "blond-haired_woman": "👱\u200d♀️",
    "blond-haired_woman_dark_skin_tone": "👱🏿\u200d♀️",
    "blond-haired_woman_light_skin_tone": "👱🏻\u200d♀️",
    "blond-haired_woman_medium-dark_skin_tone": "👱🏾\u200d♀️",
    "blond-haired_woman_medium-light_skin_tone": "👱🏼\u200d♀️",
    "blond-haired_woman_medium_skin_tone": "👱🏽\u200d♀️",
    "blossom": "🌼",
    "blowfish": "🐡",
    "blue_book": "📘",
    "blue_circle": "🔵",
    "blue_heart": "💙",
    "blue_square": "🟦",
    "boar": "🐗",
    "bomb": "💣",
    "bone": "🦴",
    "bookmark": "🔖",
    "bookmark_tabs": "📑",
    "books": "📚",
    "bottle_with_popping_cork": "🍾",
    "bouquet": "💐",
    "bow_and_arrow": "🏹",
    "bowl_with_spoon": "🥣",
    "bowling": "🎳",
    "boxing_glove": "🥊",
    "boy": "👦",
    "boy_dark_skin_tone": "👦🏿",
    "boy_light_skin_tone": "👦🏻",
    "boy_medium-dark_skin_tone": "👦🏾",
    "boy_medium-light_skin_tone": "👦🏼",
    "boy_medium_skin_tone": "👦🏽",
    "brain": "🧠",
    "bread": "🍞",
    "breast-feeding": "🤱",
    "breast-feeding_dark_skin_tone": "🤱🏿",
    "breast-feeding_light_skin_tone": "🤱🏻",
    "breast-feeding_medium-dark_skin_tone": "🤱🏾",
    "breast-feeding_medium-light_skin_tone": "🤱🏼",
    "breast-feeding_medium_skin_tone": "🤱🏽",
    "brick": "🧱",
    "bride_with_veil": "👰",
    "bride_with_veil_dark_skin_tone": "👰🏿",
    "bride_with_veil_light_skin_tone": "👰🏻",
    "bride_with_veil_medium-dark_skin_tone": "👰🏾",
    "bride_with_veil_medium-light_skin_tone": "👰🏼",
    "bride_with_veil_medium_skin_tone": "👰🏽",
    "bridge_at_night": "🌉",
    "briefcase": "💼",
    "briefs": "🩲",
    "bright_button": "🔆",
    "broccoli": "🥦",
    "broken_heart": "💔",
    "broom": "🧹",
    "brown_circle": "🟤",
    "brown_heart": "🤎",
    "brown_square": "🟫",
    "bug": "🐛",
    "building_construction": "🏗",
    "bullet_train": "🚅",
    "burrito": "🌯",
    "bus": "🚌",
    "bus_stop": "🚏",
    "bust_in_silhouette": "👤",
    "busts_in_silhouette": "👥",
    "butter": "🧈",
    "butterfly": "🦋",
    "cactus": "🌵",
    "calendar": "📆",
    "call_me_hand": "🤙",
    "call_me_hand_dark_skin_tone": "🤙🏿",
    "call_me_hand_light_skin_tone": "🤙🏻",
    "call_me_hand_medium-dark_skin_tone": "🤙🏾",
    "call_me_hand_medium-light_skin_tone": "🤙🏼",
    "call_me_hand_medium_skin_tone": "🤙🏽",
    "camel": "🐫",
    "camera": "📷",
    "camera_with_flash": "📸",
    "camping": "🏕",
    "candle": "🕯",
    "candy": "🍬",
    "canned_food": "🥫",
    "canoe": "🛶",
    "card_file_box": "🗃",
    "card_index": "📇",
    "card_index_dividers": "🗂",
    "carousel_horse": "🎠",
    "carp_streamer": "🎏",
    "carrot": "🥕",
    "castle": "🏰",
    "cat": "🐱",
    "cat_face": "🐱",
    "cat_face_with_tears_of_joy": "😹",
    "cat_face_with_wry_smile": "😼",
    "chains": "⛓",
    "chair": "🪑",
    "chart_decreasing": "📉",
    "chart_increasing": "📈",
    "chart_increasing_with_yen": "💹",
    "cheese_wedge": "🧀",
    "chequered_flag": "🏁",
    "cherries": "🍒",
    "cherry_blossom": "🌸",
    "chess_pawn": "♟",
    "chestnut": "🌰",
    "chicken": "🐔",
    "child": "🧒",
    "child_dark_skin_tone": "🧒🏿",
    "child_light_skin_tone": "🧒🏻",
    "child_medium-dark_skin_tone": "🧒🏾",
    "child_medium-light_skin_tone": "🧒🏼",
    "child_medium_skin_tone": "🧒🏽",
    "children_crossing": "🚸",
    "chipmunk": "🐿",
    "chocolate_bar": "🍫",
    "chopsticks": "🥢",
    "church": "⛪",
    "cigarette": "🚬",
    "cinema": "🎦",
    "circled_m": "Ⓜ",
    "circus_tent": "🎪",
    "cityscape": "🏙",
    "cityscape_at_dusk": "🌆",
    "clamp": "🗜",
    "clapper_board": "🎬",
    "clapping_hands": "👏",
    "clapping_hands_dark_skin_tone": "👏🏿",
    "clapping_hands_light_skin_tone": "👏🏻",
    "clapping_hands_medium-dark_skin_tone": "👏🏾",
    "clapping_hands_medium-light_skin_tone": "👏🏼",
    "clapping_hands_medium_skin_tone": "👏🏽",
    "classical_building": "🏛",
    "clinking_beer_mugs": "🍻",
    "clinking_glasses": "🥂",
    "clipboard": "📋",
    "clockwise_vertical_arrows": "🔃",
    "closed_book": "📕",
    "closed_mailbox_with_lowered_flag": "📪",
    "closed_mailbox_with_raised_flag": "📫",
    "closed_umbrella": "🌂",
    "cloud": "☁",
    "cloud_with_lightning": "🌩",
    "cloud_with_lightning_and_rain": "⛈",
    "cloud_with_rain": "🌧",
    "cloud_with_snow": "🌨",
    "clown_face": "🤡",
    "club_suit": "♣",
    "clutch_bag": "👝",
    "coat": "🧥",
    "cocktail_glass": "🍸",
    "coconut": "🥥",
    "coffin": "⚰",
    "cold_face": "🥶",
    "collision": "💥",
    "comet": "☄",
    "compass": "🧭",
    "computer_disk": "💽",
    "computer_mouse": "🖱",
    "confetti_ball": "🎊",
    "confounded_face": "😖",
    "confused_face": "😕",
    "construction": "🚧",
    "construction_worker": "👷",
    "construction_worker_dark_skin_tone": "👷🏿",
    "construction_worker_light_skin_tone": "👷🏻",
    "construction_worker_medium-dark_skin_tone": "👷🏾",
    "construction_worker_medium-light_skin_tone": "👷🏼",
    "construction_worker_medium_skin_tone": "👷🏽",
    "control_knobs": "🎛",
    "convenience_store": "🏪",
    "cooked_rice": "🍚",
    "cookie": "🍪",
    "cooking": "🍳",
    "copyright": "©",
    "couch_and_lamp": "🛋",
    "counterclockwise_arrows_button": "🔄",
    "couple_with_heart": "💑",
    "couple_with_heart_man_man": "👨\u200d❤️\u200d👨",
    "couple_with_heart_woman_man": "👩\u200d❤️\u200d👨",
    "couple_with_heart_woman_woman": "👩\u200d❤️\u200d👩",
    "cow": "🐮",
    "cow_face": "🐮",
    "cowboy_hat_face": "🤠",
    "crab": "🦀",
    "crayon": "🖍",
    "credit_card": "💳",
    "crescent_moon": "🌙",
    "cricket": "🦗",
    "cricket_game": "🏏",
    "crocodile": "🐊",
    "croissant": "🥐",
    "cross_mark": "❌",
    "cross_mark_button": "❎",
    "crossed_fingers": "🤞",
    "crossed_fingers_dark_skin_tone": "🤞🏿",
    "crossed_fingers_light_skin_tone": "🤞🏻",
    "crossed_fingers_medium-dark_skin_tone": "🤞🏾",
    "crossed_fingers_medium-light_skin_tone": "🤞🏼",
    "crossed_fingers_medium_skin_tone": "🤞🏽",
    "crossed_flags": "🎌",
    "crossed_swords": "⚔",
    "crown": "👑",
    "crying_cat_face": "😿",
    "crying_face": "😢",
    "crystal_ball": "🔮",
    "cucumber": "🥒",
    "cupcake": "🧁",
    "cup_with_straw": "🥤",
    "curling_stone": "🥌",
    "curly_hair": "🦱",
    "curly-haired_man": "👨\u200d🦱",
    "curly-haired_woman": "👩\u200d🦱",
    "curly_loop": "➰",
    "currency_exchange": "💱",
    "curry_rice": "🍛",
    "custard": "🍮",
    "customs": "🛃",
    "cut_of_meat": "🥩",
    "cyclone": "🌀",
    "dagger": "🗡",
    "dango": "🍡",
    "dashing_away": "💨",
    "deaf_person": "🧏",
    "deciduous_tree": "🌳",
    "deer": "🦌",
    "delivery_truck": "🚚",
    "department_store": "🏬",
    "derelict_house": "🏚",
    "desert": "🏜",
    "desert_island": "🏝",
    "desktop_computer": "🖥",
    "detective": "🕵",
    "detective_dark_skin_tone": "🕵🏿",
    "detective_light_skin_tone": "🕵🏻",
    "detective_medium-dark_skin_tone": "🕵🏾",
    "detective_medium-light_skin_tone": "🕵🏼",
    "detective_medium_skin_tone": "🕵🏽",
    "diamond_suit": "♦",
    "diamond_with_a_dot": "💠",
    "dim_button": "🔅",
    "direct_hit": "🎯",
    "disappointed_face": "😞",
    "diving_mask": "🤿",
    "diya_lamp": "🪔",
    "dizzy": "💫",
    "dizzy_face": "😵",
    "dna": "🧬",
    "dog": "🐶",
    "dog_face": "🐶",
    "dollar_banknote": "💵",
    "dolphin": "🐬",
    "door": "🚪",
    "dotted_six-pointed_star": "🔯",
    "double_curly_loop": "➿",
    "double_exclamation_mark": "‼",
    "doughnut": "🍩",
    "dove": "🕊",
    "down-left_arrow": "↙",
    "down-right_arrow": "↘",
    "down_arrow": "⬇",
    "downcast_face_with_sweat": "😓",
    "downwards_button": "🔽",
    "dragon": "🐉",
    "dragon_face": "🐲",
    "dress": "👗",
    "drooling_face": "🤤",
    "drop_of_blood": "🩸",
    "droplet": "💧",
    "drum": "🥁",
    "duck": "🦆",
    "dumpling": "🥟",
    "dvd": "📀",
    "e-mail": "📧",
    "eagle": "🦅",
    "ear": "👂",
    "ear_dark_skin_tone": "👂🏿",
    "ear_light_skin_tone": "👂🏻",
    "ear_medium-dark_skin_tone": "👂🏾",
    "ear_medium-light_skin_tone": "👂🏼",
    "ear_medium_skin_tone": "👂🏽",
    "ear_of_corn": "🌽",
    "ear_with_hearing_aid": "🦻",
    "egg": "🍳",
    "eggplant": "🍆",
    "eight-pointed_star": "✴",
    "eight-spoked_asterisk": "✳",
    "eight-thirty": "🕣",
    "eight_o’clock": "🕗",
    "eject_button": "⏏",
    "electric_plug": "🔌",
    "elephant": "🐘",
    "eleven-thirty": "🕦",
    "eleven_o’clock": "🕚",
    "elf": "🧝",
    "elf_dark_skin_tone": "🧝🏿",
    "elf_light_skin_tone": "🧝🏻",
    "elf_medium-dark_skin_tone": "🧝🏾",
    "elf_medium-light_skin_tone": "🧝🏼",
    "elf_medium_skin_tone": "🧝🏽",
    "envelope": "✉",
    "envelope_with_arrow": "📩",
    "euro_banknote": "💶",
    "evergreen_tree": "🌲",
    "ewe": "🐑",
    "exclamation_mark": "❗",
    "exclamation_question_mark": "⁉",
    "exploding_head": "🤯",
    "expressionless_face": "😑",
    "eye": "👁",
    "eye_in_speech_bubble": "👁️\u200d🗨️",
    "eyes": "👀",
    "face_blowing_a_kiss": "😘",
    "face_savoring_food": "😋",
    "face_screaming_in_fear": "😱",
    "face_vomiting": "🤮",
    "face_with_hand_over_mouth": "🤭",
    "face_with_head-bandage": "🤕",
    "face_with_medical_mask": "😷",
    "face_with_monocle": "🧐",
    "face_with_open_mouth": "😮",
    "face_with_raised_eyebrow": "🤨",
    "face_with_rolling_eyes": "🙄",
    "face_with_steam_from_nose": "😤",
    "face_with_symbols_on_mouth": "🤬",
    "face_with_tears_of_joy": "😂",
    "face_with_thermometer": "🤒",
    "face_with_tongue": "😛",
    "face_without_mouth": "😶",
    "factory": "🏭",
    "fairy": "🧚",
    "fairy_dark_skin_tone": "🧚🏿",
    "fairy_light_skin_tone": "🧚🏻",
    "fairy_medium-dark_skin_tone": "🧚🏾",
    "fairy_medium-light_skin_tone": "🧚🏼",
    "fairy_medium_skin_tone": "🧚🏽",
    "falafel": "🧆",
    "fallen_leaf": "🍂",
    "family": "👪",
    "family_man_boy": "👨\u200d👦",
    "family_man_boy_boy": "👨\u200d👦\u200d👦",
    "family_man_girl": "👨\u200d👧",
    "family_man_girl_boy": "👨\u200d👧\u200d👦",
    "family_man_girl_girl": "👨\u200d👧\u200d👧",
    "family_man_man_boy": "👨\u200d👨\u200d👦",
    "family_man_man_boy_boy": "👨\u200d👨\u200d👦\u200d👦",
    "family_man_man_girl": "👨\u200d👨\u200d👧",
    "family_man_man_girl_boy": "👨\u200d👨\u200d👧\u200d👦",
    "family_man_man_girl_girl": "👨\u200d👨\u200d👧\u200d👧",
    "family_man_woman_boy": "👨\u200d👩\u200d👦",
    "family_man_woman_boy_boy": "👨\u200d👩\u200d👦\u200d👦",
    "family_man_woman_girl": "👨\u200d👩\u200d👧",
    "family_man_woman_girl_boy": "👨\u200d👩\u200d👧\u200d👦",
    "family_man_woman_girl_girl": "👨\u200d👩\u200d👧\u200d👧",
    "family_woman_boy": "👩\u200d👦",
    "family_woman_boy_boy": "👩\u200d👦\u200d👦",
    "family_woman_girl": "👩\u200d👧",
    "family_woman_girl_boy": "👩\u200d👧\u200d👦",
    "family_woman_girl_girl": "👩\u200d👧\u200d👧",
    "family_woman_woman_boy": "👩\u200d👩\u200d👦",
    "family_woman_woman_boy_boy": "👩\u200d👩\u200d👦\u200d👦",
    "family_woman_woman_girl": "👩\u200d👩\u200d👧",
    "family_woman_woman_girl_boy": "👩\u200d👩\u200d👧\u200d👦",
    "family_woman_woman_girl_girl": "👩\u200d👩\u200d👧\u200d👧",
    "fast-forward_button": "⏩",
    "fast_down_button": "⏬",
    "fast_reverse_button": "⏪",
    "fast_up_button": "⏫",
    "fax_machine": "📠",
    "fearful_face": "😨",
    "female_sign": "♀",
    "ferris_wheel": "🎡",
    "ferry": "⛴",
    "field_hockey": "🏑",
    "file_cabinet": "🗄",
    "file_folder": "📁",
    "film_frames": "🎞",
    "film_projector": "📽",
    "fire": "🔥",
    "fire_extinguisher": "🧯",
    "firecracker": "🧨",
    "fire_engine": "🚒",
    "fireworks": "🎆",
    "first_quarter_moon": "🌓",
    "first_quarter_moon_face": "🌛",
    "fish": "🐟",
    "fish_cake_with_swirl": "🍥",
    "fishing_pole": "🎣",
    "five-thirty": "🕠",
    "five_o’clock": "🕔",
    "flag_in_hole": "⛳",
    "flamingo": "🦩",
    "flashlight": "🔦",
    "flat_shoe": "🥿",
    "fleur-de-lis": "⚜",
    "flexed_biceps": "💪",
    "flexed_biceps_dark_skin_tone": "💪🏿",
    "flexed_biceps_light_skin_tone": "💪🏻",
    "flexed_biceps_medium-dark_skin_tone": "💪🏾",
    "flexed_biceps_medium-light_skin_tone": "💪🏼",
    "flexed_biceps_medium_skin_tone": "💪🏽",
    "floppy_disk": "💾",
    "flower_playing_cards": "🎴",
    "flushed_face": "😳",
    "flying_disc": "🥏",
    "flying_saucer": "🛸",
    "fog": "🌫",
    "foggy": "🌁",
    "folded_hands": "🙏",
    "folded_hands_dark_skin_tone": "🙏🏿",
    "folded_hands_light_skin_tone": "🙏🏻",
    "folded_hands_medium-dark_skin_tone": "🙏🏾",
    "folded_hands_medium-light_skin_tone": "🙏🏼",
    "folded_hands_medium_skin_tone": "🙏🏽",
    "foot": "🦶",
    "footprints": "👣",
    "fork_and_knife": "🍴",
    "fork_and_knife_with_plate": "🍽",
    "fortune_cookie": "🥠",
    "fountain": "⛲",
    "fountain_pen": "🖋",
    "four-thirty": "🕟",
    "four_leaf_clover": "🍀",
    "four_o’clock": "🕓",
    "fox_face": "🦊",
    "framed_picture": "🖼",
    "french_fries": "🍟",
    "fried_shrimp": "🍤",
    "frog_face": "🐸",
    "front-facing_baby_chick": "🐥",
    "frowning_face": "☹",
    "frowning_face_with_open_mouth": "😦",
    "fuel_pump": "⛽",
    "full_moon": "🌕",
    "full_moon_face": "🌝",
    "funeral_urn": "⚱",
    "game_die": "🎲",
    "garlic": "🧄",
    "gear": "⚙",
    "gem_stone": "💎",
    "genie": "🧞",
    "ghost": "👻",
    "giraffe": "🦒",
    "girl": "👧",
    "girl_dark_skin_tone": "👧🏿",
    "girl_light_skin_tone": "👧🏻",
    "girl_medium-dark_skin_tone": "👧🏾",
    "girl_medium-light_skin_tone": "👧🏼",
    "girl_medium_skin_tone": "👧🏽",
    "glass_of_milk": "🥛",
    "glasses": "👓",
    "globe_showing_americas": "🌎",
    "globe_showing_asia-australia": "🌏",
    "globe_showing_europe-africa": "🌍",
    "globe_with_meridians": "🌐",
    "gloves": "🧤",
    "glowing_star": "🌟",
    "goal_net": "🥅",
    "goat": "🐐",
    "goblin": "👺",
    "goggles": "🥽",
    "gorilla": "🦍",
    "graduation_cap": "🎓",
    "grapes": "🍇",
    "green_apple": "🍏",
    "green_book": "📗",
    "green_circle": "🟢",
    "green_heart": "💚",
    "green_salad": "🥗",
    "green_square": "🟩",
    "grimacing_face": "😬",
    "grinning_cat_face": "😺",
    "grinning_cat_face_with_smiling_eyes": "😸",
    "grinning_face": "😀",
    "grinning_face_with_big_eyes": "😃",
    "grinning_face_with_smiling_eyes": "😄",
    "grinning_face_with_sweat": "😅",
    "grinning_squinting_face": "😆",
    "growing_heart": "💗",
    "guard": "💂",
    "guard_dark_skin_tone": "💂🏿",
    "guard_light_skin_tone": "💂🏻",
    "guard_medium-dark_skin_tone": "💂🏾",
    "guard_medium-light_skin_tone": "💂🏼",
    "guard_medium_skin_tone": "💂🏽",
    "guide_dog": "🦮",
    "guitar": "🎸",
    "hamburger": "🍔",
    "hammer": "🔨",
    "hammer_and_pick": "⚒",
    "hammer_and_wrench": "🛠",
    "hamster_face": "🐹",
    "hand_with_fingers_splayed": "🖐",
    "hand_with_fingers_splayed_dark_skin_tone": "🖐🏿",
    "hand_with_fingers_splayed_light_skin_tone": "🖐🏻",
    "hand_with_fingers_splayed_medium-dark_skin_tone": "🖐🏾",
    "hand_with_fingers_splayed_medium-light_skin_tone": "🖐🏼",
    "hand_with_fingers_splayed_medium_skin_tone": "🖐🏽",
    "handbag": "👜",
    "handshake": "🤝",
    "hatching_chick": "🐣",
    "headphone": "🎧",
    "hear-no-evil_monkey": "🙉",
    "heart_decoration": "💟",
    "heart_suit": "♥",
    "heart_with_arrow": "💘",
    "heart_with_ribbon": "💝",
    "heavy_check_mark": "✔",
    "heavy_division_sign": "➗",
    "heavy_dollar_sign": "💲",
    "heavy_heart_exclamation": "❣",
    "heavy_large_circle": "⭕",
    "heavy_minus_sign": "➖",
    "heavy_multiplication_x": "✖",
    "heavy_plus_sign": "➕",
    "hedgehog": "🦔",
    "helicopter": "🚁",
    "herb": "🌿",
    "hibiscus": "🌺",
    "high-heeled_shoe": "👠",
    "high-speed_train": "🚄",
    "high_voltage": "⚡",
    "hiking_boot": "🥾",
    "hindu_temple": "🛕",
    "hippopotamus": "🦛",
    "hole": "🕳",
    "honey_pot": "🍯",
    "honeybee": "🐝",
    "horizontal_traffic_light": "🚥",
    "horse": "🐴",
    "horse_face": "🐴",
    "horse_racing": "🏇",
    "horse_racing_dark_skin_tone": "🏇🏿",
    "horse_racing_light_skin_tone": "🏇🏻",
    "horse_racing_medium-dark_skin_tone": "🏇🏾",
    "horse_racing_medium-light_skin_tone": "🏇🏼",
    "horse_racing_medium_skin_tone": "🏇🏽",
    "hospital": "🏥",
    "hot_beverage": "☕",
    "hot_dog": "🌭",
    "hot_face": "🥵",
    "hot_pepper": "🌶",
    "hot_springs": "♨",
    "hotel": "🏨",
    "hourglass_done": "⌛",
    "hourglass_not_done": "⏳",
    "house": "🏠",
    "house_with_garden": "🏡",
    "houses": "🏘",
    "hugging_face": "🤗",
    "hundred_points": "💯",
    "hushed_face": "😯",
    "ice": "🧊",
    "ice_cream": "🍨",
    "ice_hockey": "🏒",
    "ice_skate": "⛸",
    "inbox_tray": "📥",
    "incoming_envelope": "📨",
    "index_pointing_up": "☝",
    "index_pointing_up_dark_skin_tone": "☝🏿",
    "index_pointing_up_light_skin_tone": "☝🏻",
    "index_pointing_up_medium-dark_skin_tone": "☝🏾",
    "index_pointing_up_medium-light_skin_tone": "☝🏼",
    "index_pointing_up_medium_skin_tone": "☝🏽",
    "infinity": "♾",
    "information": "ℹ",
    "input_latin_letters": "🔤",
    "input_latin_lowercase": "🔡",
    "input_latin_uppercase": "🔠",
    "input_numbers": "🔢",
    "input_symbols": "🔣",
    "jack-o-lantern": "🎃",
    "jeans": "👖",
    "jigsaw": "🧩",
    "joker": "🃏",
    "joystick": "🕹",
    "kaaba": "🕋",
    "kangaroo": "🦘",
    "key": "🔑",
    "keyboard": "⌨",
    "keycap_#": "#️⃣",
    "keycap_*": "*️⃣",
    "keycap_0": "0️⃣",
    "keycap_1": "1️⃣",
    "keycap_10": "🔟",
    "keycap_2": "2️⃣",
    "keycap_3": "3️⃣",
    "keycap_4": "4️⃣",
    "keycap_5": "5️⃣",
    "keycap_6": "6️⃣",
    "keycap_7": "7️⃣",
    "keycap_8": "8️⃣",
    "keycap_9": "9️⃣",
    "kick_scooter": "🛴",
    "kimono": "👘",
    "kiss": "💋",
    "kiss_man_man": "👨\u200d❤️\u200d💋\u200d👨",
    "kiss_mark": "💋",
    "kiss_woman_man": "👩\u200d❤️\u200d💋\u200d👨",
    "kiss_woman_woman": "👩\u200d❤️\u200d💋\u200d👩",
    "kissing_cat_face": "😽",
    "kissing_face": "😗",
    "kissing_face_with_closed_eyes": "😚",
    "kissing_face_with_smiling_eyes": "😙",
    "kitchen_knife": "🔪",
    "kite": "🪁",
    "kiwi_fruit": "🥝",
    "koala": "🐨",
    "lab_coat": "🥼",
    "label": "🏷",
    "lacrosse": "🥍",
    "lady_beetle": "🐞",
    "laptop_computer": "💻",
    "large_blue_diamond": "🔷",
    "large_orange_diamond": "🔶",
    "last_quarter_moon": "🌗",
    "last_quarter_moon_face": "🌜",
    "last_track_button": "⏮",
    "latin_cross": "✝",
    "leaf_fluttering_in_wind": "🍃",
    "leafy_green": "🥬",
    "ledger": "📒",
    "left-facing_fist": "🤛",
    "left-facing_fist_dark_skin_tone": "🤛🏿",
    "left-facing_fist_light_skin_tone": "🤛🏻",
    "left-facing_fist_medium-dark_skin_tone": "🤛🏾",
    "left-facing_fist_medium-light_skin_tone": "🤛🏼",
    "left-facing_fist_medium_skin_tone": "🤛🏽",
    "left-right_arrow": "↔",
    "left_arrow": "⬅",
    "left_arrow_curving_right": "↪",
    "left_luggage": "🛅",
    "left_speech_bubble": "🗨",
    "leg": "🦵",
    "lemon": "🍋",
    "leopard": "🐆",
    "level_slider": "🎚",
    "light_bulb": "💡",
    "light_rail": "🚈",
    "link": "🔗",
    "linked_paperclips": "🖇",
    "lion_face": "🦁",
    "lipstick": "💄",
    "litter_in_bin_sign": "🚮",
    "lizard": "🦎",
    "llama": "🦙",
    "lobster": "🦞",
    "locked": "🔒",
    "locked_with_key": "🔐",
    "locked_with_pen": "🔏",
    "locomotive": "🚂",
    "lollipop": "🍭",
    "lotion_bottle": "🧴",
    "loudly_crying_face": "😭",
    "loudspeaker": "📢",
    "love-you_gesture": "🤟",
    "love-you_gesture_dark_skin_tone": "🤟🏿",
    "love-you_gesture_light_skin_tone": "🤟🏻",
    "love-you_gesture_medium-dark_skin_tone": "🤟🏾",
    "love-you_gesture_medium-light_skin_tone": "🤟🏼",
    "love-you_gesture_medium_skin_tone": "🤟🏽",
    "love_hotel": "🏩",
    "love_letter": "💌",
    "luggage": "🧳",
    "lying_face": "🤥",
    "mage": "🧙",
    "mage_dark_skin_tone": "🧙🏿",
    "mage_light_skin_tone": "🧙🏻",
    "mage_medium-dark_skin_tone": "🧙🏾",
    "mage_medium-light_skin_tone": "🧙🏼",
    "mage_medium_skin_tone": "🧙🏽",
    "magnet": "🧲",
    "magnifying_glass_tilted_left": "🔍",
    "magnifying_glass_tilted_right": "🔎",
    "mahjong_red_dragon": "🀄",
    "male_sign": "♂",
    "man": "👨",
    "man_and_woman_holding_hands": "👫",
    "man_artist": "👨\u200d🎨",
    "man_artist_dark_skin_tone": "👨🏿\u200d🎨",
    "man_artist_light_skin_tone": "👨🏻\u200d🎨",
    "man_artist_medium-dark_skin_tone": "👨🏾\u200d🎨",
    "man_artist_medium-light_skin_tone": "👨🏼\u200d🎨",
    "man_artist_medium_skin_tone": "👨🏽\u200d🎨",
    "man_astronaut": "👨\u200d🚀",
    "man_astronaut_dark_skin_tone": "👨🏿\u200d🚀",
    "man_astronaut_light_skin_tone": "👨🏻\u200d🚀",
    "man_astronaut_medium-dark_skin_tone": "👨🏾\u200d🚀",
    "man_astronaut_medium-light_skin_tone": "👨🏼\u200d🚀",
    "man_astronaut_medium_skin_tone": "👨🏽\u200d🚀",
    "man_biking": "🚴\u200d♂️",
    "man_biking_dark_skin_tone": "🚴🏿\u200d♂️",
    "man_biking_light_skin_tone": "🚴🏻\u200d♂️",
    "man_biking_medium-dark_skin_tone": "🚴🏾\u200d♂️",
    "man_biking_medium-light_skin_tone": "🚴🏼\u200d♂️",
    "man_biking_medium_skin_tone": "🚴🏽\u200d♂️",
    "man_bouncing_ball": "⛹️\u200d♂️",
    "man_bouncing_ball_dark_skin_tone": "⛹🏿\u200d♂️",
    "man_bouncing_ball_light_skin_tone": "⛹🏻\u200d♂️",
    "man_bouncing_ball_medium-dark_skin_tone": "⛹🏾\u200d♂️",
    "man_bouncing_ball_medium-light_skin_tone": "⛹🏼\u200d♂️",
    "man_bouncing_ball_medium_skin_tone": "⛹🏽\u200d♂️",
    "man_bowing": "🙇\u200d♂️",
    "man_bowing_dark_skin_tone": "🙇🏿\u200d♂️",
    "man_bowing_light_skin_tone": "🙇🏻\u200d♂️",
    "man_bowing_medium-dark_skin_tone": "🙇🏾\u200d♂️",
    "man_bowing_medium-light_skin_tone": "🙇🏼\u200d♂️",
    "man_bowing_medium_skin_tone": "🙇🏽\u200d♂️",
    "man_cartwheeling": "🤸\u200d♂️",
    "man_cartwheeling_dark_skin_tone": "🤸🏿\u200d♂️",
    "man_cartwheeling_light_skin_tone": "🤸🏻\u200d♂️",
    "man_cartwheeling_medium-dark_skin_tone": "🤸🏾\u200d♂️",
    "man_cartwheeling_medium-light_skin_tone": "🤸🏼\u200d♂️",
    "man_cartwheeling_medium_skin_tone": "🤸🏽\u200d♂️",
    "man_climbing": "🧗\u200d♂️",
    "man_climbing_dark_skin_tone": "🧗🏿\u200d♂️",
    "man_climbing_light_skin_tone": "🧗🏻\u200d♂️",
    "man_climbing_medium-dark_skin_tone": "🧗🏾\u200d♂️",
    "man_climbing_medium-light_skin_tone": "🧗🏼\u200d♂️",
    "man_climbing_medium_skin_tone": "🧗🏽\u200d♂️",
    "man_construction_worker": "👷\u200d♂️",
    "man_construction_worker_dark_skin_tone": "👷🏿\u200d♂️",
    "man_construction_worker_light_skin_tone": "👷🏻\u200d♂️",
    "man_construction_worker_medium-dark_skin_tone": "👷🏾\u200d♂️",
    "man_construction_worker_medium-light_skin_tone": "👷🏼\u200d♂️",
    "man_construction_worker_medium_skin_tone": "👷🏽\u200d♂️",
    "man_cook": "👨\u200d🍳",
    "man_cook_dark_skin_tone": "👨🏿\u200d🍳",
    "man_cook_light_skin_tone": "👨🏻\u200d🍳",
    "man_cook_medium-dark_skin_tone": "👨🏾\u200d🍳",
    "man_cook_medium-light_skin_tone": "👨🏼\u200d🍳",
    "man_cook_medium_skin_tone": "👨🏽\u200d🍳",
    "man_dancing": "🕺",
    "man_dancing_dark_skin_tone": "🕺🏿",
    "man_dancing_light_skin_tone": "🕺🏻",
    "man_dancing_medium-dark_skin_tone": "🕺🏾",
    "man_dancing_medium-light_skin_tone": "🕺🏼",
    "man_dancing_medium_skin_tone": "🕺🏽",
    "man_dark_skin_tone": "👨🏿",
    "man_detective": "🕵️\u200d♂️",
    "man_detective_dark_skin_tone": "🕵🏿\u200d♂️",
    "man_detective_light_skin_tone": "🕵🏻\u200d♂️",
    "man_detective_medium-dark_skin_tone": "🕵🏾\u200d♂️",
    "man_detective_medium-light_skin_tone": "🕵🏼\u200d♂️",
    "man_detective_medium_skin_tone": "🕵🏽\u200d♂️",
    "man_elf": "🧝\u200d♂️",
    "man_elf_dark_skin_tone": "🧝🏿\u200d♂️",
    "man_elf_light_skin_tone": "🧝🏻\u200d♂️",
    "man_elf_medium-dark_skin_tone": "🧝🏾\u200d♂️",
    "man_elf_medium-light_skin_tone": "🧝🏼\u200d♂️",
    "man_elf_medium_skin_tone": "🧝🏽\u200d♂️",
    "man_facepalming": "🤦\u200d♂️",
    "man_facepalming_dark_skin_tone": "🤦🏿\u200d♂️",
    "man_facepalming_light_skin_tone": "🤦🏻\u200d♂️",
    "man_facepalming_medium-dark_skin_tone": "🤦🏾\u200d♂️",
    "man_facepalming_medium-light_skin_tone": "🤦🏼\u200d♂️",
    "man_facepalming_medium_skin_tone": "🤦🏽\u200d♂️",
    "man_factory_worker": "👨\u200d🏭",
    "man_factory_worker_dark_skin_tone": "👨🏿\u200d🏭",
    "man_factory_worker_light_skin_tone": "👨🏻\u200d🏭",
    "man_factory_worker_medium-dark_skin_tone": "👨🏾\u200d🏭",
    "man_factory_worker_medium-light_skin_tone": "👨🏼\u200d🏭",
    "man_factory_worker_medium_skin_tone": "👨🏽\u200d🏭",
    "man_fairy": "🧚\u200d♂️",
    "man_fairy_dark_skin_tone": "🧚🏿\u200d♂️",
    "man_fairy_light_skin_tone": "🧚🏻\u200d♂️",
    "man_fairy_medium-dark_skin_tone": "🧚🏾\u200d♂️",
    "man_fairy_medium-light_skin_tone": "🧚🏼\u200d♂️",
    "man_fairy_medium_skin_tone": "🧚🏽\u200d♂️",
    "man_farmer": "👨\u200d🌾",
    "man_farmer_dark_skin_tone": "👨🏿\u200d🌾",
    "man_farmer_light_skin_tone": "👨🏻\u200d🌾",
    "man_farmer_medium-dark_skin_tone": "👨🏾\u200d🌾",
    "man_farmer_medium-light_skin_tone": "👨🏼\u200d🌾",
    "man_farmer_medium_skin_tone": "👨🏽\u200d🌾",
    "man_firefighter": "👨\u200d🚒",
    "man_firefighter_dark_skin_tone": "👨🏿\u200d🚒",
    "man_firefighter_light_skin_tone": "👨🏻\u200d🚒",
    "man_firefighter_medium-dark_skin_tone": "👨🏾\u200d🚒",
    "man_firefighter_medium-light_skin_tone": "👨🏼\u200d🚒",
    "man_firefighter_medium_skin_tone": "👨🏽\u200d🚒",
    "man_frowning": "🙍\u200d♂️",
    "man_frowning_dark_skin_tone": "🙍🏿\u200d♂️",
    "man_frowning_light_skin_tone": "🙍🏻\u200d♂️",
    "man_frowning_medium-dark_skin_tone": "🙍🏾\u200d♂️",
    "man_frowning_medium-light_skin_tone": "🙍🏼\u200d♂️",
    "man_frowning_medium_skin_tone": "🙍🏽\u200d♂️",
    "man_genie": "🧞\u200d♂️",
    "man_gesturing_no": "🙅\u200d♂️",
    "man_gesturing_no_dark_skin_tone": "🙅🏿\u200d♂️",
    "man_gesturing_no_light_skin_tone": "🙅🏻\u200d♂️",
    "man_gesturing_no_medium-dark_skin_tone": "🙅🏾\u200d♂️",
    "man_gesturing_no_medium-light_skin_tone": "🙅🏼\u200d♂️",
    "man_gesturing_no_medium_skin_tone": "🙅🏽\u200d♂️",
    "man_gesturing_ok": "🙆\u200d♂️",
    "man_gesturing_ok_dark_skin_tone": "🙆🏿\u200d♂️",
    "man_gesturing_ok_light_skin_tone": "🙆🏻\u200d♂️",
    "man_gesturing_ok_medium-dark_skin_tone": "🙆🏾\u200d♂️",
    "man_gesturing_ok_medium-light_skin_tone": "🙆🏼\u200d♂️",
    "man_gesturing_ok_medium_skin_tone": "🙆🏽\u200d♂️",
    "man_getting_haircut": "💇\u200d♂️",
    "man_getting_haircut_dark_skin_tone": "💇🏿\u200d♂️",
    "man_getting_haircut_light_skin_tone": "💇🏻\u200d♂️",
    "man_getting_haircut_medium-dark_skin_tone": "💇🏾\u200d♂️",
    "man_getting_haircut_medium-light_skin_tone": "💇🏼\u200d♂️",
    "man_getting_haircut_medium_skin_tone": "💇🏽\u200d♂️",
    "man_getting_massage": "💆\u200d♂️",
    "man_getting_massage_dark_skin_tone": "💆🏿\u200d♂️",
    "man_getting_massage_light_skin_tone": "💆🏻\u200d♂️",
    "man_getting_massage_medium-dark_skin_tone": "💆🏾\u200d♂️",
    "man_getting_massage_medium-light_skin_tone": "💆🏼\u200d♂️",
    "man_getting_massage_medium_skin_tone": "💆🏽\u200d♂️",
    "man_golfing": "🏌️\u200d♂️",
    "man_golfing_dark_skin_tone": "🏌🏿\u200d♂️",
    "man_golfing_light_skin_tone": "🏌🏻\u200d♂️",
    "man_golfing_medium-dark_skin_tone": "🏌🏾\u200d♂️",
    "man_golfing_medium-light_skin_tone": "🏌🏼\u200d♂️",
    "man_golfing_medium_skin_tone": "🏌🏽\u200d♂️",
    "man_guard": "💂\u200d♂️",
    "man_guard_dark_skin_tone": "💂🏿\u200d♂️",
    "man_guard_light_skin_tone": "💂🏻\u200d♂️",
    "man_guard_medium-dark_skin_tone": "💂🏾\u200d♂️",
    "man_guard_medium-light_skin_tone": "💂🏼\u200d♂️",
    "man_guard_medium_skin_tone": "💂🏽\u200d♂️",
    "man_health_worker": "👨\u200d⚕️",
    "man_health_worker_dark_skin_tone": "👨🏿\u200d⚕️",
    "man_health_worker_light_skin_tone": "👨🏻\u200d⚕️",
    "man_health_worker_medium-dark_skin_tone": "👨🏾\u200d⚕️",
    "man_health_worker_medium-light_skin_tone": "👨🏼\u200d⚕️",
    "man_health_worker_medium_skin_tone": "👨🏽\u200d⚕️",
    "man_in_lotus_position": "🧘\u200d♂️",
    "man_in_lotus_position_dark_skin_tone": "🧘🏿\u200d♂️",
    "man_in_lotus_position_light_skin_tone": "🧘🏻\u200d♂️",
    "man_in_lotus_position_medium-dark_skin_tone": "🧘🏾\u200d♂️",
    "man_in_lotus_position_medium-light_skin_tone": "🧘🏼\u200d♂️",
    "man_in_lotus_position_medium_skin_tone": "🧘🏽\u200d♂️",
    "man_in_manual_wheelchair": "👨\u200d🦽",
    "man_in_motorized_wheelchair": "👨\u200d🦼",
    "man_in_steamy_room": "🧖\u200d♂️",
    "man_in_steamy_room_dark_skin_tone": "🧖🏿\u200d♂️",
    "man_in_steamy_room_light_skin_tone": "🧖🏻\u200d♂️",
    "man_in_steamy_room_medium-dark_skin_tone": "🧖🏾\u200d♂️",
    "man_in_steamy_room_medium-light_skin_tone": "🧖🏼\u200d♂️",
    "man_in_steamy_room_medium_skin_tone": "🧖🏽\u200d♂️",
    "man_in_suit_levitating": "🕴",
    "man_in_suit_levitating_dark_skin_tone": "🕴🏿",
    "man_in_suit_levitating_light_skin_tone": "🕴🏻",
    "man_in_suit_levitating_medium-dark_skin_tone": "🕴🏾",
    "man_in_suit_levitating_medium-light_skin_tone": "🕴🏼",
    "man_in_suit_levitating_medium_skin_tone": "🕴🏽",
    "man_in_tuxedo": "🤵",
    "man_in_tuxedo_dark_skin_tone": "🤵🏿",
    "man_in_tuxedo_light_skin_tone": "🤵🏻",
    "man_in_tuxedo_medium-dark_skin_tone": "🤵🏾",
    "man_in_tuxedo_medium-light_skin_tone": "🤵🏼",
    "man_in_tuxedo_medium_skin_tone": "🤵🏽",
    "man_judge": "👨\u200d⚖️",
    "man_judge_dark_skin_tone": "👨🏿\u200d⚖️",
    "man_judge_light_skin_tone": "👨🏻\u200d⚖️",
    "man_judge_medium-dark_skin_tone": "👨🏾\u200d⚖️",
    "man_judge_medium-light_skin_tone": "👨🏼\u200d⚖️",
    "man_judge_medium_skin_tone": "👨🏽\u200d⚖️",
    "man_juggling": "🤹\u200d♂️",
    "man_juggling_dark_skin_tone": "🤹🏿\u200d♂️",
    "man_juggling_light_skin_tone": "🤹🏻\u200d♂️",
    "man_juggling_medium-dark_skin_tone": "🤹🏾\u200d♂️",
    "man_juggling_medium-light_skin_tone": "🤹🏼\u200d♂️",
    "man_juggling_medium_skin_tone": "🤹🏽\u200d♂️",
    "man_lifting_weights": "🏋️\u200d♂️",
    "man_lifting_weights_dark_skin_tone": "🏋🏿\u200d♂️",
    "man_lifting_weights_light_skin_tone": "🏋🏻\u200d♂️",
    "man_lifting_weights_medium-dark_skin_tone": "🏋🏾\u200d♂️",
    "man_lifting_weights_medium-light_skin_tone": "🏋🏼\u200d♂️",
    "man_lifting_weights_medium_skin_tone": "🏋🏽\u200d♂️",
    "man_light_skin_tone": "👨🏻",
    "man_mage": "🧙\u200d♂️",
    "man_mage_dark_skin_tone": "🧙🏿\u200d♂️",
    "man_mage_light_skin_tone": "🧙🏻\u200d♂️",
    "man_mage_medium-dark_skin_tone": "🧙🏾\u200d♂️",
    "man_mage_medium-light_skin_tone": "🧙🏼\u200d♂️",
    "man_mage_medium_skin_tone": "🧙🏽\u200d♂️",
    "man_mechanic": "👨\u200d🔧",
    "man_mechanic_dark_skin_tone": "👨🏿\u200d🔧",
    "man_mechanic_light_skin_tone": "👨🏻\u200d🔧",
    "man_mechanic_medium-dark_skin_tone": "👨🏾\u200d🔧",
    "man_mechanic_medium-light_skin_tone": "👨🏼\u200d🔧",
    "man_mechanic_medium_skin_tone": "👨🏽\u200d🔧",
    "man_medium-dark_skin_tone": "👨🏾",
    "man_medium-light_skin_tone": "👨🏼",
    "man_medium_skin_tone": "👨🏽",
    "man_mountain_biking": "🚵\u200d♂️",
    "man_mountain_biking_dark_skin_tone": "🚵🏿\u200d♂️",
    "man_mountain_biking_light_skin_tone": "🚵🏻\u200d♂️",
    "man_mountain_biking_medium-dark_skin_tone": "🚵🏾\u200d♂️",
    "man_mountain_biking_medium-light_skin_tone": "🚵🏼\u200d♂️",
    "man_mountain_biking_medium_skin_tone": "🚵🏽\u200d♂️",
    "man_office_worker": "👨\u200d💼",
    "man_office_worker_dark_skin_tone": "👨🏿\u200d💼",
    "man_office_worker_light_skin_tone": "👨🏻\u200d💼",
    "man_office_worker_medium-dark_skin_tone": "👨🏾\u200d💼",
    "man_office_worker_medium-light_skin_tone": "👨🏼\u200d💼",
    "man_office_worker_medium_skin_tone": "👨🏽\u200d💼",
    "man_pilot": "👨\u200d✈️",
    "man_pilot_dark_skin_tone": "👨🏿\u200d✈️",
    "man_pilot_light_skin_tone": "👨🏻\u200d✈️",
    "man_pilot_medium-dark_skin_tone": "👨🏾\u200d✈️",
    "man_pilot_medium-light_skin_tone": "👨🏼\u200d✈️",
    "man_pilot_medium_skin_tone": "👨🏽\u200d✈️",
    "man_playing_handball": "🤾\u200d♂️",
    "man_playing_handball_dark_skin_tone": "🤾🏿\u200d♂️",
    "man_playing_handball_light_skin_tone": "🤾🏻\u200d♂️",
    "man_playing_handball_medium-dark_skin_tone": "🤾🏾\u200d♂️",
    "man_playing_handball_medium-light_skin_tone": "🤾🏼\u200d♂️",
    "man_playing_handball_medium_skin_tone": "🤾🏽\u200d♂️",
    "man_playing_water_polo": "🤽\u200d♂️",
    "man_playing_water_polo_dark_skin_tone": "🤽🏿\u200d♂️",
    "man_playing_water_polo_light_skin_tone": "🤽🏻\u200d♂️",
    "man_playing_water_polo_medium-dark_skin_tone": "🤽🏾\u200d♂️",
    "man_playing_water_polo_medium-light_skin_tone": "🤽🏼\u200d♂️",
    "man_playing_water_polo_medium_skin_tone": "🤽🏽\u200d♂️",
    "man_police_officer": "👮\u200d♂️",
    "man_police_officer_dark_skin_tone": "👮🏿\u200d♂️",
    "man_police_officer_light_skin_tone": "👮🏻\u200d♂️",
    "man_police_officer_medium-dark_skin_tone": "👮🏾\u200d♂️",
    "man_police_officer_medium-light_skin_tone": "👮🏼\u200d♂️",
    "man_police_officer_medium_skin_tone": "👮🏽\u200d♂️",
    "man_pouting": "🙎\u200d♂️",
    "man_pouting_dark_skin_tone": "🙎🏿\u200d♂️",
    "man_pouting_light_skin_tone": "🙎🏻\u200d♂️",
    "man_pouting_medium-dark_skin_tone": "🙎🏾\u200d♂️",
    "man_pouting_medium-light_skin_tone": "🙎🏼\u200d♂️",
    "man_pouting_medium_skin_tone": "🙎🏽\u200d♂️",
    "man_raising_hand": "🙋\u200d♂️",
    "man_raising_hand_dark_skin_tone": "🙋🏿\u200d♂️",
    "man_raising_hand_light_skin_tone": "🙋🏻\u200d♂️",
    "man_raising_hand_medium-dark_skin_tone": "🙋🏾\u200d♂️",
    "man_raising_hand_medium-light_skin_tone": "🙋🏼\u200d♂️",
    "man_raising_hand_medium_skin_tone": "🙋🏽\u200d♂️",
    "man_rowing_boat": "🚣\u200d♂️",
    "man_rowing_boat_dark_skin_tone": "🚣🏿\u200d♂️",
    "man_rowing_boat_light_skin_tone": "🚣🏻\u200d♂️",
    "man_rowing_boat_medium-dark_skin_tone": "🚣🏾\u200d♂️",
    "man_rowing_boat_medium-light_skin_tone": "🚣🏼\u200d♂️",
    "man_rowing_boat_medium_skin_tone": "🚣🏽\u200d♂️",
    "man_running": "🏃\u200d♂️",
    "man_running_dark_skin_tone": "🏃🏿\u200d♂️",
    "man_running_light_skin_tone": "🏃🏻\u200d♂️",
    "man_running_medium-dark_skin_tone": "🏃🏾\u200d♂️",
    "man_running_medium-light_skin_tone": "🏃🏼\u200d♂️",
    "man_running_medium_skin_tone": "🏃🏽\u200d♂️",
    "man_scientist": "👨\u200d🔬",
    "man_scientist_dark_skin_tone": "👨🏿\u200d🔬",
    "man_scientist_light_skin_tone": "👨🏻\u200d🔬",
    "man_scientist_medium-dark_skin_tone": "👨🏾\u200d🔬",
    "man_scientist_medium-light_skin_tone": "👨🏼\u200d🔬",
    "man_scientist_medium_skin_tone": "👨🏽\u200d🔬",
    "man_shrugging": "🤷\u200d♂️",
    "man_shrugging_dark_skin_tone": "🤷🏿\u200d♂️",
    "man_shrugging_light_skin_tone": "🤷🏻\u200d♂️",
    "man_shrugging_medium-dark_skin_tone": "🤷🏾\u200d♂️",
    "man_shrugging_medium-light_skin_tone": "🤷🏼\u200d♂️",
    "man_shrugging_medium_skin_tone": "🤷🏽\u200d♂️",
    "man_singer": "👨\u200d🎤",
    "man_singer_dark_skin_tone": "👨🏿\u200d🎤",
    "man_singer_light_skin_tone": "👨🏻\u200d🎤",
    "man_singer_medium-dark_skin_tone": "👨🏾\u200d🎤",
    "man_singer_medium-light_skin_tone": "👨🏼\u200d🎤",
    "man_singer_medium_skin_tone": "👨🏽\u200d🎤",
    "man_student": "👨\u200d🎓",
    "man_student_dark_skin_tone": "👨🏿\u200d🎓",
    "man_student_light_skin_tone": "👨🏻\u200d🎓",
    "man_student_medium-dark_skin_tone": "👨🏾\u200d🎓",
    "man_student_medium-light_skin_tone": "👨🏼\u200d🎓",
    "man_student_medium_skin_tone": "👨🏽\u200d🎓",
    "man_surfing": "🏄\u200d♂️",
    "man_surfing_dark_skin_tone": "🏄🏿\u200d♂️",
    "man_surfing_light_skin_tone": "🏄🏻\u200d♂️",
    "man_surfing_medium-dark_skin_tone": "🏄🏾\u200d♂️",
    "man_surfing_medium-light_skin_tone": "🏄🏼\u200d♂️",
    "man_surfing_medium_skin_tone": "🏄🏽\u200d♂️",
    "man_swimming": "🏊\u200d♂️",
    "man_swimming_dark_skin_tone": "🏊🏿\u200d♂️",
    "man_swimming_light_skin_tone": "🏊🏻\u200d♂️",
    "man_swimming_medium-dark_skin_tone": "🏊🏾\u200d♂️",
    "man_swimming_medium-light_skin_tone": "🏊🏼\u200d♂️",
    "man_swimming_medium_skin_tone": "🏊🏽\u200d♂️",
    "man_teacher": "👨\u200d🏫",
    "man_teacher_dark_skin_tone": "👨🏿\u200d🏫",
    "man_teacher_light_skin_tone": "👨🏻\u200d🏫",
    "man_teacher_medium-dark_skin_tone": "👨🏾\u200d🏫",
    "man_teacher_medium-light_skin_tone": "👨🏼\u200d🏫",
    "man_teacher_medium_skin_tone": "👨🏽\u200d🏫",
    "man_technologist": "👨\u200d💻",
    "man_technologist_dark_skin_tone": "👨🏿\u200d💻",
    "man_technologist_light_skin_tone": "👨🏻\u200d💻",
    "man_technologist_medium-dark_skin_tone": "👨🏾\u200d💻",
    "man_technologist_medium-light_skin_tone": "👨🏼\u200d💻",
    "man_technologist_medium_skin_tone": "👨🏽\u200d💻",
    "man_tipping_hand": "💁\u200d♂️",
    "man_tipping_hand_dark_skin_tone": "💁🏿\u200d♂️",
    "man_tipping_hand_light_skin_tone": "💁🏻\u200d♂️",
    "man_tipping_hand_medium-dark_skin_tone": "💁🏾\u200d♂️",
    "man_tipping_hand_medium-light_skin_tone": "💁🏼\u200d♂️",
    "man_tipping_hand_medium_skin_tone": "💁🏽\u200d♂️",
    "man_vampire": "🧛\u200d♂️",
    "man_vampire_dark_skin_tone": "🧛🏿\u200d♂️",
    "man_vampire_light_skin_tone": "🧛🏻\u200d♂️",
    "man_vampire_medium-dark_skin_tone": "🧛🏾\u200d♂️",
    "man_vampire_medium-light_skin_tone": "🧛🏼\u200d♂️",
    "man_vampire_medium_skin_tone": "🧛🏽\u200d♂️",
    "man_walking": "🚶\u200d♂️",
    "man_walking_dark_skin_tone": "🚶🏿\u200d♂️",
    "man_walking_light_skin_tone": "🚶🏻\u200d♂️",
    "man_walking_medium-dark_skin_tone": "🚶🏾\u200d♂️",
    "man_walking_medium-light_skin_tone": "🚶🏼\u200d♂️",
    "man_walking_medium_skin_tone": "🚶🏽\u200d♂️",
    "man_wearing_turban": "👳\u200d♂️",
    "man_wearing_turban_dark_skin_tone": "👳🏿\u200d♂️",
    "man_wearing_turban_light_skin_tone": "👳🏻\u200d♂️",
    "man_wearing_turban_medium-dark_skin_tone": "👳🏾\u200d♂️",
    "man_wearing_turban_medium-light_skin_tone": "👳🏼\u200d♂️",
    "man_wearing_turban_medium_skin_tone": "👳🏽\u200d♂️",
    "man_with_probing_cane": "👨\u200d🦯",
    "man_with_chinese_cap": "👲",
    "man_with_chinese_cap_dark_skin_tone": "👲🏿",
    "man_with_chinese_cap_light_skin_tone": "👲🏻",
    "man_with_chinese_cap_medium-dark_skin_tone": "👲🏾",
    "man_with_chinese_cap_medium-light_skin_tone": "👲🏼",
    "man_with_chinese_cap_medium_skin_tone": "👲🏽",
    "man_zombie": "🧟\u200d♂️",
    "mango": "🥭",
    "mantelpiece_clock": "🕰",
    "manual_wheelchair": "🦽",
    "man’s_shoe": "👞",
    "map_of_japan": "🗾",
    "maple_leaf": "🍁",
    "martial_arts_uniform": "🥋",
    "mate": "🧉",
    "meat_on_bone": "🍖",
    "mechanical_arm": "🦾",
    "mechanical_leg": "🦿",
    "medical_symbol": "⚕",
    "megaphone": "📣",
    "melon": "🍈",
    "memo": "📝",
    "men_with_bunny_ears": "👯\u200d♂️",
    "men_wrestling": "🤼\u200d♂️",
    "menorah": "🕎",
    "men’s_room": "🚹",
    "mermaid": "🧜\u200d♀️",
    "mermaid_dark_skin_tone": "🧜🏿\u200d♀️",
    "mermaid_light_skin_tone": "🧜🏻\u200d♀️",
    "mermaid_medium-dark_skin_tone": "🧜🏾\u200d♀️",
    "mermaid_medium-light_skin_tone": "🧜🏼\u200d♀️",
    "mermaid_medium_skin_tone": "🧜🏽\u200d♀️",
    "merman": "🧜\u200d♂️",
    "merman_dark_skin_tone": "🧜🏿\u200d♂️",
    "merman_light_skin_tone": "🧜🏻\u200d♂️",
    "merman_medium-dark_skin_tone": "🧜🏾\u200d♂️",
    "merman_medium-light_skin_tone": "🧜🏼\u200d♂️",
    "merman_medium_skin_tone": "🧜🏽\u200d♂️",
    "merperson": "🧜",
    "merperson_dark_skin_tone": "🧜🏿",
    "merperson_light_skin_tone": "🧜🏻",
    "merperson_medium-dark_skin_tone": "🧜🏾",
    "merperson_medium-light_skin_tone": "🧜🏼",
    "merperson_medium_skin_tone": "🧜🏽",
    "metro": "🚇",
    "microbe": "🦠",
    "microphone": "🎤",
    "microscope": "🔬",
    "middle_finger": "🖕",
    "middle_finger_dark_skin_tone": "🖕🏿",
    "middle_finger_light_skin_tone": "🖕🏻",
    "middle_finger_medium-dark_skin_tone": "🖕🏾",
    "middle_finger_medium-light_skin_tone": "🖕🏼",
    "middle_finger_medium_skin_tone": "🖕🏽",
    "military_medal": "🎖",
    "milky_way": "🌌",
    "minibus": "🚐",
    "moai": "🗿",
    "mobile_phone": "📱",
    "mobile_phone_off": "📴",
    "mobile_phone_with_arrow": "📲",
    "money-mouth_face": "🤑",
    "money_bag": "💰",
    "money_with_wings": "💸",
    "monkey": "🐒",
    "monkey_face": "🐵",
    "monorail": "🚝",
    "moon_cake": "🥮",
    "moon_viewing_ceremony": "🎑",
    "mosque": "🕌",
    "mosquito": "🦟",
    "motor_boat": "🛥",
    "motor_scooter": "🛵",
    "motorcycle": "🏍",
    "motorized_wheelchair": "🦼",
    "motorway": "🛣",
    "mount_fuji": "🗻",
    "mountain": "⛰",
    "mountain_cableway": "🚠",
    "mountain_railway": "🚞",
    "mouse": "🐭",
    "mouse_face": "🐭",
    "mouth": "👄",
    "movie_camera": "🎥",
    "mushroom": "🍄",
    "musical_keyboard": "🎹",
    "musical_note": "🎵",
    "musical_notes": "🎶",
    "musical_score": "🎼",
    "muted_speaker": "🔇",
    "nail_polish": "💅",
    "nail_polish_dark_skin_tone": "💅🏿",
    "nail_polish_light_skin_tone": "💅🏻",
    "nail_polish_medium-dark_skin_tone": "💅🏾",
    "nail_polish_medium-light_skin_tone": "💅🏼",
    "nail_polish_medium_skin_tone": "💅🏽",
    "name_badge": "📛",
    "national_park": "🏞",
    "nauseated_face": "🤢",
    "nazar_amulet": "🧿",
    "necktie": "👔",
    "nerd_face": "🤓",
    "neutral_face": "😐",
    "new_moon": "🌑",
    "new_moon_face": "🌚",
    "newspaper": "📰",
    "next_track_button": "⏭",
    "night_with_stars": "🌃",
    "nine-thirty": "🕤",
    "nine_o’clock": "🕘",
    "no_bicycles": "🚳",
    "no_entry": "⛔",
    "no_littering": "🚯",
    "no_mobile_phones": "📵",
    "no_one_under_eighteen": "🔞",
    "no_pedestrians": "🚷",
    "no_smoking": "🚭",
    "non-potable_water": "🚱",
    "nose": "👃",
    "nose_dark_skin_tone": "👃🏿",
    "nose_light_skin_tone": "👃🏻",
    "nose_medium-dark_skin_tone": "👃🏾",
    "nose_medium-light_skin_tone": "👃🏼",
    "nose_medium_skin_tone": "👃🏽",
    "notebook": "📓",
    "notebook_with_decorative_cover": "📔",
    "nut_and_bolt": "🔩",
    "octopus": "🐙",
    "oden": "🍢",
    "office_building": "🏢",
    "ogre": "👹",
    "oil_drum": "🛢",
    "old_key": "🗝",
    "old_man": "👴",
    "old_man_dark_skin_tone": "👴🏿",
    "old_man_light_skin_tone": "👴🏻",
    "old_man_medium-dark_skin_tone": "👴🏾",
    "old_man_medium-light_skin_tone": "👴🏼",
    "old_man_medium_skin_tone": "👴🏽",
    "old_woman": "👵",
    "old_woman_dark_skin_tone": "👵🏿",
    "old_woman_light_skin_tone": "👵🏻",
    "old_woman_medium-dark_skin_tone": "👵🏾",
    "old_woman_medium-light_skin_tone": "👵🏼",
    "old_woman_medium_skin_tone": "👵🏽",
    "older_adult": "🧓",
    "older_adult_dark_skin_tone": "🧓🏿",
    "older_adult_light_skin_tone": "🧓🏻",
    "older_adult_medium-dark_skin_tone": "🧓🏾",
    "older_adult_medium-light_skin_tone": "🧓🏼",
    "older_adult_medium_skin_tone": "🧓🏽",
    "om": "🕉",
    "oncoming_automobile": "🚘",
    "oncoming_bus": "🚍",
    "oncoming_fist": "👊",
    "oncoming_fist_dark_skin_tone": "👊🏿",
    "oncoming_fist_light_skin_tone": "👊🏻",
    "oncoming_fist_medium-dark_skin_tone": "👊🏾",
    "oncoming_fist_medium-light_skin_tone": "👊🏼",
    "oncoming_fist_medium_skin_tone": "👊🏽",
    "oncoming_police_car": "🚔",
    "oncoming_taxi": "🚖",
    "one-piece_swimsuit": "🩱",
    "one-thirty": "🕜",
    "one_o’clock": "🕐",
    "onion": "🧅",
    "open_book": "📖",
    "open_file_folder": "📂",
    "open_hands": "👐",
    "open_hands_dark_skin_tone": "👐🏿",
    "open_hands_light_skin_tone": "👐🏻",
    "open_hands_medium-dark_skin_tone": "👐🏾",
    "open_hands_medium-light_skin_tone": "👐🏼",
    "open_hands_medium_skin_tone": "👐🏽",
    "open_mailbox_with_lowered_flag": "📭",
    "open_mailbox_with_raised_flag": "📬",
    "optical_disk": "💿",
    "orange_book": "📙",
    "orange_circle": "🟠",
    "orange_heart": "🧡",
    "orange_square": "🟧",
    "orangutan": "🦧",
    "orthodox_cross": "☦",
    "otter": "🦦",
    "outbox_tray": "📤",
    "owl": "🦉",
    "ox": "🐂",
    "oyster": "🦪",
    "package": "📦",
    "page_facing_up": "📄",
    "page_with_curl": "📃",
    "pager": "📟",
    "paintbrush": "🖌",
    "palm_tree": "🌴",
    "palms_up_together": "🤲",
    "palms_up_together_dark_skin_tone": "🤲🏿",
    "palms_up_together_light_skin_tone": "🤲🏻",
    "palms_up_together_medium-dark_skin_tone": "🤲🏾",
    "palms_up_together_medium-light_skin_tone": "🤲🏼",
    "palms_up_together_medium_skin_tone": "🤲🏽",
    "pancakes": "🥞",
    "panda_face": "🐼",
    "paperclip": "📎",
    "parrot": "🦜",
    "part_alternation_mark": "〽",
    "party_popper": "🎉",
    "partying_face": "🥳",
    "passenger_ship": "🛳",
    "passport_control": "🛂",
    "pause_button": "⏸",
    "paw_prints": "🐾",
    "peace_symbol": "☮",
    "peach": "🍑",
    "peacock": "🦚",
    "peanuts": "🥜",
    "pear": "🍐",
    "pen": "🖊",
    "pencil": "📝",
    "penguin": "🐧",
    "pensive_face": "😔",
    "people_holding_hands": "🧑\u200d🤝\u200d🧑",
    "people_with_bunny_ears": "👯",
    "people_wrestling": "🤼",
    "performing_arts": "🎭",
    "persevering_face": "😣",
    "person_biking": "🚴",
    "person_biking_dark_skin_tone": "🚴🏿",
    "person_biking_light_skin_tone": "🚴🏻",
    "person_biking_medium-dark_skin_tone": "🚴🏾",
    "person_biking_medium-light_skin_tone": "🚴🏼",
    "person_biking_medium_skin_tone": "🚴🏽",
    "person_bouncing_ball": "⛹",
    "person_bouncing_ball_dark_skin_tone": "⛹🏿",
    "person_bouncing_ball_light_skin_tone": "⛹🏻",
    "person_bouncing_ball_medium-dark_skin_tone": "⛹🏾",
    "person_bouncing_ball_medium-light_skin_tone": "⛹🏼",
    "person_bouncing_ball_medium_skin_tone": "⛹🏽",
    "person_bowing": "🙇",
    "person_bowing_dark_skin_tone": "🙇🏿",
    "person_bowing_light_skin_tone": "🙇🏻",
    "person_bowing_medium-dark_skin_tone": "🙇🏾",
    "person_bowing_medium-light_skin_tone": "🙇🏼",
    "person_bowing_medium_skin_tone": "🙇🏽",
    "person_cartwheeling": "🤸",
    "person_cartwheeling_dark_skin_tone": "🤸🏿",
    "person_cartwheeling_light_skin_tone": "🤸🏻",
    "person_cartwheeling_medium-dark_skin_tone": "🤸🏾",
    "person_cartwheeling_medium-light_skin_tone": "🤸🏼",
    "person_cartwheeling_medium_skin_tone": "🤸🏽",
    "person_climbing": "🧗",
    "person_climbing_dark_skin_tone": "🧗🏿",
    "person_climbing_light_skin_tone": "🧗🏻",
    "person_climbing_medium-dark_skin_tone": "🧗🏾",
    "person_climbing_medium-light_skin_tone": "🧗🏼",
    "person_climbing_medium_skin_tone": "🧗🏽",
    "person_facepalming": "🤦",
    "person_facepalming_dark_skin_tone": "🤦🏿",
    "person_facepalming_light_skin_tone": "🤦🏻",
    "person_facepalming_medium-dark_skin_tone": "🤦🏾",
    "person_facepalming_medium-light_skin_tone": "🤦🏼",
    "person_facepalming_medium_skin_tone": "🤦🏽",
    "person_fencing": "🤺",
    "person_frowning": "🙍",
    "person_frowning_dark_skin_tone": "🙍🏿",
    "person_frowning_light_skin_tone": "🙍🏻",
    "person_frowning_medium-dark_skin_tone": "🙍🏾",
    "person_frowning_medium-light_skin_tone": "🙍🏼",
    "person_frowning_medium_skin_tone": "🙍🏽",
    "person_gesturing_no": "🙅",
    "person_gesturing_no_dark_skin_tone": "🙅🏿",
    "person_gesturing_no_light_skin_tone": "🙅🏻",
    "person_gesturing_no_medium-dark_skin_tone": "🙅🏾",
    "person_gesturing_no_medium-light_skin_tone": "🙅🏼",
    "person_gesturing_no_medium_skin_tone": "🙅🏽",
    "person_gesturing_ok": "🙆",
    "person_gesturing_ok_dark_skin_tone": "🙆🏿",
    "person_gesturing_ok_light_skin_tone": "🙆🏻",
    "person_gesturing_ok_medium-dark_skin_tone": "🙆🏾",
    "person_gesturing_ok_medium-light_skin_tone": "🙆🏼",
    "person_gesturing_ok_medium_skin_tone": "🙆🏽",
    "person_getting_haircut": "💇",
    "person_getting_haircut_dark_skin_tone": "💇🏿",
    "person_getting_haircut_light_skin_tone": "💇🏻",
    "person_getting_haircut_medium-dark_skin_tone": "💇🏾",
    "person_getting_haircut_medium-light_skin_tone": "💇🏼",
    "person_getting_haircut_medium_skin_tone": "💇🏽",
    "person_getting_massage": "💆",
    "person_getting_massage_dark_skin_tone": "💆🏿",
    "person_getting_massage_light_skin_tone": "💆🏻",
    "person_getting_massage_medium-dark_skin_tone": "💆🏾",
    "person_getting_massage_medium-light_skin_tone": "💆🏼",
    "person_getting_massage_medium_skin_tone": "💆🏽",
    "person_golfing": "🏌",
    "person_golfing_dark_skin_tone": "🏌🏿",
    "person_golfing_light_skin_tone": "🏌🏻",
    "person_golfing_medium-dark_skin_tone": "🏌🏾",
    "person_golfing_medium-light_skin_tone": "🏌🏼",
    "person_golfing_medium_skin_tone": "🏌🏽",
    "person_in_bed": "🛌",
    "person_in_bed_dark_skin_tone": "🛌🏿",
    "person_in_bed_light_skin_tone": "🛌🏻",
    "person_in_bed_medium-dark_skin_tone": "🛌🏾",
    "person_in_bed_medium-light_skin_tone": "🛌🏼",
    "person_in_bed_medium_skin_tone": "🛌🏽",
    "person_in_lotus_position": "🧘",
    "person_in_lotus_position_dark_skin_tone": "🧘🏿",
    "person_in_lotus_position_light_skin_tone": "🧘🏻",
    "person_in_lotus_position_medium-dark_skin_tone": "🧘🏾",
    "person_in_lotus_position_medium-light_skin_tone": "🧘🏼",
    "person_in_lotus_position_medium_skin_tone": "🧘🏽",
    "person_in_steamy_room": "🧖",
    "person_in_steamy_room_dark_skin_tone": "🧖🏿",
    "person_in_steamy_room_light_skin_tone": "🧖🏻",
    "person_in_steamy_room_medium-dark_skin_tone": "🧖🏾",
    "person_in_steamy_room_medium-light_skin_tone": "🧖🏼",
    "person_in_steamy_room_medium_skin_tone": "🧖🏽",
    "person_juggling": "🤹",
    "person_juggling_dark_skin_tone": "🤹🏿",
    "person_juggling_light_skin_tone": "🤹🏻",
    "person_juggling_medium-dark_skin_tone": "🤹🏾",
    "person_juggling_medium-light_skin_tone": "🤹🏼",
    "person_juggling_medium_skin_tone": "🤹🏽",
    "person_kneeling": "🧎",
    "person_lifting_weights": "🏋",
    "person_lifting_weights_dark_skin_tone": "🏋🏿",
    "person_lifting_weights_light_skin_tone": "🏋🏻",
    "person_lifting_weights_medium-dark_skin_tone": "🏋🏾",
    "person_lifting_weights_medium-light_skin_tone": "🏋🏼",
    "person_lifting_weights_medium_skin_tone": "🏋🏽",
    "person_mountain_biking": "🚵",
    "person_mountain_biking_dark_skin_tone": "🚵🏿",
    "person_mountain_biking_light_skin_tone": "🚵🏻",
    "person_mountain_biking_medium-dark_skin_tone": "🚵🏾",
    "person_mountain_biking_medium-light_skin_tone": "🚵🏼",
    "person_mountain_biking_medium_skin_tone": "🚵🏽",
    "person_playing_handball": "🤾",
    "person_playing_handball_dark_skin_tone": "🤾🏿",
    "person_playing_handball_light_skin_tone": "🤾🏻",
    "person_playing_handball_medium-dark_skin_tone": "🤾🏾",
    "person_playing_handball_medium-light_skin_tone": "🤾🏼",
    "person_playing_handball_medium_skin_tone": "🤾🏽",
    "person_playing_water_polo": "🤽",
    "person_playing_water_polo_dark_skin_tone": "🤽🏿",
    "person_playing_water_polo_light_skin_tone": "🤽🏻",
    "person_playing_water_polo_medium-dark_skin_tone": "🤽🏾",
    "person_playing_water_polo_medium-light_skin_tone": "🤽🏼",
    "person_playing_water_polo_medium_skin_tone": "🤽🏽",
    "person_pouting": "🙎",
    "person_pouting_dark_skin_tone": "🙎🏿",
    "person_pouting_light_skin_tone": "🙎🏻",
    "person_pouting_medium-dark_skin_tone": "🙎🏾",
    "person_pouting_medium-light_skin_tone": "🙎🏼",
    "person_pouting_medium_skin_tone": "🙎🏽",
    "person_raising_hand": "🙋",
    "person_raising_hand_dark_skin_tone": "🙋🏿",
    "person_raising_hand_light_skin_tone": "🙋🏻",
    "person_raising_hand_medium-dark_skin_tone": "🙋🏾",
    "person_raising_hand_medium-light_skin_tone": "🙋🏼",
    "person_raising_hand_medium_skin_tone": "🙋🏽",
    "person_rowing_boat": "🚣",
    "person_rowing_boat_dark_skin_tone": "🚣🏿",
    "person_rowing_boat_light_skin_tone": "🚣🏻",
    "person_rowing_boat_medium-dark_skin_tone": "🚣🏾",
    "person_rowing_boat_medium-light_skin_tone": "🚣🏼",
    "person_rowing_boat_medium_skin_tone": "🚣🏽",
    "person_running": "🏃",
    "person_running_dark_skin_tone": "🏃🏿",
    "person_running_light_skin_tone": "🏃🏻",
    "person_running_medium-dark_skin_tone": "🏃🏾",
    "person_running_medium-light_skin_tone": "🏃🏼",
    "person_running_medium_skin_tone": "🏃🏽",
    "person_shrugging": "🤷",
    "person_shrugging_dark_skin_tone": "🤷🏿",
    "person_shrugging_light_skin_tone": "🤷🏻",
    "person_shrugging_medium-dark_skin_tone": "🤷🏾",
    "person_shrugging_medium-light_skin_tone": "🤷🏼",
    "person_shrugging_medium_skin_tone": "🤷🏽",
    "person_standing": "🧍",
    "person_surfing": "🏄",
    "person_surfing_dark_skin_tone": "🏄🏿",
    "person_surfing_light_skin_tone": "🏄🏻",
    "person_surfing_medium-dark_skin_tone": "🏄🏾",
    "person_surfing_medium-light_skin_tone": "🏄🏼",
    "person_surfing_medium_skin_tone": "🏄🏽",
    "person_swimming": "🏊",
    "person_swimming_dark_skin_tone": "🏊🏿",
    "person_swimming_light_skin_tone": "🏊🏻",
    "person_swimming_medium-dark_skin_tone": "🏊🏾",
    "person_swimming_medium-light_skin_tone": "🏊🏼",
    "person_swimming_medium_skin_tone": "🏊🏽",
    "person_taking_bath": "🛀",
    "person_taking_bath_dark_skin_tone": "🛀🏿",
    "person_taking_bath_light_skin_tone": "🛀🏻",
    "person_taking_bath_medium-dark_skin_tone": "🛀🏾",
    "person_taking_bath_medium-light_skin_tone": "🛀🏼",
    "person_taking_bath_medium_skin_tone": "🛀🏽",
    "person_tipping_hand": "💁",
    "person_tipping_hand_dark_skin_tone": "💁🏿",
    "person_tipping_hand_light_skin_tone": "💁🏻",
    "person_tipping_hand_medium-dark_skin_tone": "💁🏾",
    "person_tipping_hand_medium-light_skin_tone": "💁🏼",
    "person_tipping_hand_medium_skin_tone": "💁🏽",
    "person_walking": "🚶",
    "person_walking_dark_skin_tone": "🚶🏿",
    "person_walking_light_skin_tone": "🚶🏻",
    "person_walking_medium-dark_skin_tone": "🚶🏾",
    "person_walking_medium-light_skin_tone": "🚶🏼",
    "person_walking_medium_skin_tone": "🚶🏽",
    "person_wearing_turban": "👳",
    "person_wearing_turban_dark_skin_tone": "👳🏿",
    "person_wearing_turban_light_skin_tone": "👳🏻",
    "person_wearing_turban_medium-dark_skin_tone": "👳🏾",
    "person_wearing_turban_medium-light_skin_tone": "👳🏼",
    "person_wearing_turban_medium_skin_tone": "👳🏽",
    "petri_dish": "🧫",
    "pick": "⛏",
    "pie": "🥧",
    "pig": "🐷",
    "pig_face": "🐷",
    "pig_nose": "🐽",
    "pile_of_poo": "💩",
    "pill": "💊",
    "pinching_hand": "🤏",
    "pine_decoration": "🎍",
    "pineapple": "🍍",
    "ping_pong": "🏓",
    "pirate_flag": "🏴\u200d☠️",
    "pistol": "🔫",
    "pizza": "🍕",
    "place_of_worship": "🛐",
    "play_button": "▶",
    "play_or_pause_button": "⏯",
    "pleading_face": "🥺",
    "police_car": "🚓",
    "police_car_light": "🚨",
    "police_officer": "👮",
    "police_officer_dark_skin_tone": "👮🏿",
    "police_officer_light_skin_tone": "👮🏻",
    "police_officer_medium-dark_skin_tone": "👮🏾",
    "police_officer_medium-light_skin_tone": "👮🏼",
    "police_officer_medium_skin_tone": "👮🏽",
    "poodle": "🐩",
    "pool_8_ball": "🎱",
    "popcorn": "🍿",
    "post_office": "🏣",
    "postal_horn": "📯",
    "postbox": "📮",
    "pot_of_food": "🍲",
    "potable_water": "🚰",
    "potato": "🥔",
    "poultry_leg": "🍗",
    "pound_banknote": "💷",
    "pouting_cat_face": "😾",
    "pouting_face": "😡",
    "prayer_beads": "📿",
    "pregnant_woman": "🤰",
    "pregnant_woman_dark_skin_tone": "🤰🏿",
    "pregnant_woman_light_skin_tone": "🤰🏻",
    "pregnant_woman_medium-dark_skin_tone": "🤰🏾",
    "pregnant_woman_medium-light_skin_tone": "🤰🏼",
    "pregnant_woman_medium_skin_tone": "🤰🏽",
    "pretzel": "🥨",
    "probing_cane": "🦯",
    "prince": "🤴",
    "prince_dark_skin_tone": "🤴🏿",
    "prince_light_skin_tone": "🤴🏻",
    "prince_medium-dark_skin_tone": "🤴🏾",
    "prince_medium-light_skin_tone": "🤴🏼",
    "prince_medium_skin_tone": "🤴🏽",
    "princess": "👸",
    "princess_dark_skin_tone": "👸🏿",
    "princess_light_skin_tone": "👸🏻",
    "princess_medium-dark_skin_tone": "👸🏾",
    "princess_medium-light_skin_tone": "👸🏼",
    "princess_medium_skin_tone": "👸🏽",
    "printer": "🖨",
    "prohibited": "🚫",
    "purple_circle": "🟣",
    "purple_heart": "💜",
    "purple_square": "🟪",
    "purse": "👛",
    "pushpin": "📌",
    "question_mark": "❓",
    "rabbit": "🐰",
    "rabbit_face": "🐰",
    "raccoon": "🦝",
    "racing_car": "🏎",
    "radio": "📻",
    "radio_button": "🔘",
    "radioactive": "☢",
    "railway_car": "🚃",
    "railway_track": "🛤",
    "rainbow": "🌈",
    "rainbow_flag": "🏳️\u200d🌈",
    "raised_back_of_hand": "🤚",
    "raised_back_of_hand_dark_skin_tone": "🤚🏿",
    "raised_back_of_hand_light_skin_tone": "🤚🏻",
    "raised_back_of_hand_medium-dark_skin_tone": "🤚🏾",
    "raised_back_of_hand_medium-light_skin_tone": "🤚🏼",
    "raised_back_of_hand_medium_skin_tone": "🤚🏽",
    "raised_fist": "✊",
    "raised_fist_dark_skin_tone": "✊🏿",
    "raised_fist_light_skin_tone": "✊🏻",
    "raised_fist_medium-dark_skin_tone": "✊🏾",
    "raised_fist_medium-light_skin_tone": "✊🏼",
    "raised_fist_medium_skin_tone": "✊🏽",
    "raised_hand": "✋",
    "raised_hand_dark_skin_tone": "✋🏿",
    "raised_hand_light_skin_tone": "✋🏻",
    "raised_hand_medium-dark_skin_tone": "✋🏾",
    "raised_hand_medium-light_skin_tone": "✋🏼",
    "raised_hand_medium_skin_tone": "✋🏽",
    "raising_hands": "🙌",
    "raising_hands_dark_skin_tone": "🙌🏿",
    "raising_hands_light_skin_tone": "🙌🏻",
    "raising_hands_medium-dark_skin_tone": "🙌🏾",
    "raising_hands_medium-light_skin_tone": "🙌🏼",
    "raising_hands_medium_skin_tone": "🙌🏽",
    "ram": "🐏",
    "rat": "🐀",
    "razor": "🪒",
    "ringed_planet": "🪐",
    "receipt": "🧾",
    "record_button": "⏺",
    "recycling_symbol": "♻",
    "red_apple": "🍎",
    "red_circle": "🔴",
    "red_envelope": "🧧",
    "red_hair": "🦰",
    "red-haired_man": "👨\u200d🦰",
    "red-haired_woman": "👩\u200d🦰",
    "red_heart": "❤",
    "red_paper_lantern": "🏮",
    "red_square": "🟥",
    "red_triangle_pointed_down": "🔻",
    "red_triangle_pointed_up": "🔺",
    "registered": "®",
    "relieved_face": "😌",
    "reminder_ribbon": "🎗",
    "repeat_button": "🔁",
    "repeat_single_button": "🔂",
    "rescue_worker’s_helmet": "⛑",
    "restroom": "🚻",
    "reverse_button": "◀",
    "revolving_hearts": "💞",
    "rhinoceros": "🦏",
    "ribbon": "🎀",
    "rice_ball": "🍙",
    "rice_cracker": "🍘",
    "right-facing_fist": "🤜",
    "right-facing_fist_dark_skin_tone": "🤜🏿",
    "right-facing_fist_light_skin_tone": "🤜🏻",
    "right-facing_fist_medium-dark_skin_tone": "🤜🏾",
    "right-facing_fist_medium-light_skin_tone": "🤜🏼",
    "right-facing_fist_medium_skin_tone": "🤜🏽",
    "right_anger_bubble": "🗯",
    "right_arrow": "➡",
    "right_arrow_curving_down": "⤵",
    "right_arrow_curving_left": "↩",
    "right_arrow_curving_up": "⤴",
    "ring": "💍",
    "roasted_sweet_potato": "🍠",
    "robot_face": "🤖",
    "rocket": "🚀",
    "roll_of_paper": "🧻",
    "rolled-up_newspaper": "🗞",
    "roller_coaster": "🎢",
    "rolling_on_the_floor_laughing": "🤣",
    "rooster": "🐓",
    "rose": "🌹",
    "rosette": "🏵",
    "round_pushpin": "📍",
    "rugby_football": "🏉",
    "running_shirt": "🎽",
    "running_shoe": "👟",
    "sad_but_relieved_face": "😥",
    "safety_pin": "🧷",
    "safety_vest": "🦺",
    "salt": "🧂",
    "sailboat": "⛵",
    "sake": "🍶",
    "sandwich": "🥪",
    "sari": "🥻",
    "satellite": "📡",
    "satellite_antenna": "📡",
    "sauropod": "🦕",
    "saxophone": "🎷",
    "scarf": "🧣",
    "school": "🏫",
    "school_backpack": "🎒",
    "scissors": "✂",
    "scorpion": "🦂",
    "scroll": "📜",
    "seat": "💺",
    "see-no-evil_monkey": "🙈",
    "seedling": "🌱",
    "selfie": "🤳",
    "selfie_dark_skin_tone": "🤳🏿",
    "selfie_light_skin_tone": "🤳🏻",
    "selfie_medium-dark_skin_tone": "🤳🏾",
    "selfie_medium-light_skin_tone": "🤳🏼",
    "selfie_medium_skin_tone": "🤳🏽",
    "service_dog": "🐕\u200d🦺",
    "seven-thirty": "🕢",
    "seven_o’clock": "🕖",
    "shallow_pan_of_food": "🥘",
    "shamrock": "☘",
    "shark": "🦈",
    "shaved_ice": "🍧",
    "sheaf_of_rice": "🌾",
    "shield": "🛡",
    "shinto_shrine": "⛩",
    "ship": "🚢",
    "shooting_star": "🌠",
    "shopping_bags": "🛍",
    "shopping_cart": "🛒",
    "shortcake": "🍰",
    "shorts": "🩳",
    "shower": "🚿",
    "shrimp": "🦐",
    "shuffle_tracks_button": "🔀",
    "shushing_face": "🤫",
    "sign_of_the_horns": "🤘",
    "sign_of_the_horns_dark_skin_tone": "🤘🏿",
    "sign_of_the_horns_light_skin_tone": "🤘🏻",
    "sign_of_the_horns_medium-dark_skin_tone": "🤘🏾",
    "sign_of_the_horns_medium-light_skin_tone": "🤘🏼",
    "sign_of_the_horns_medium_skin_tone": "🤘🏽",
    "six-thirty": "🕡",
    "six_o’clock": "🕕",
    "skateboard": "🛹",
    "skier": "⛷",
    "skis": "🎿",
    "skull": "💀",
    "skull_and_crossbones": "☠",
    "skunk": "🦨",
    "sled": "🛷",
    "sleeping_face": "😴",
    "sleepy_face": "😪",
    "slightly_frowning_face": "🙁",
    "slightly_smiling_face": "🙂",
    "slot_machine": "🎰",
    "sloth": "🦥",
    "small_airplane": "🛩",
    "small_blue_diamond": "🔹",
    "small_orange_diamond": "🔸",
    "smiling_cat_face_with_heart-eyes": "😻",
    "smiling_face": "☺",
    "smiling_face_with_halo": "😇",
    "smiling_face_with_3_hearts": "🥰",
    "smiling_face_with_heart-eyes": "😍",
    "smiling_face_with_horns": "😈",
    "smiling_face_with_smiling_eyes": "😊",
    "smiling_face_with_sunglasses": "😎",
    "smirking_face": "😏",
    "snail": "🐌",
    "snake": "🐍",
    "sneezing_face": "🤧",
    "snow-capped_mountain": "🏔",
    "snowboarder": "🏂",
    "snowboarder_dark_skin_tone": "🏂🏿",
    "snowboarder_light_skin_tone": "🏂🏻",
    "snowboarder_medium-dark_skin_tone": "🏂🏾",
    "snowboarder_medium-light_skin_tone": "🏂🏼",
    "snowboarder_medium_skin_tone": "🏂🏽",
    "snowflake": "❄",
    "snowman": "☃",
    "snowman_without_snow": "⛄",
    "soap": "🧼",
    "soccer_ball": "⚽",
    "socks": "🧦",
    "softball": "🥎",
    "soft_ice_cream": "🍦",
    "spade_suit": "♠",
    "spaghetti": "🍝",
    "sparkle": "❇",
    "sparkler": "🎇",
    "sparkles": "✨",
    "sparkling_heart": "💖",
    "speak-no-evil_monkey": "🙊",
    "speaker_high_volume": "🔊",
    "speaker_low_volume": "🔈",
    "speaker_medium_volume": "🔉",
    "speaking_head": "🗣",
    "speech_balloon": "💬",
    "speedboat": "🚤",
    "spider": "🕷",
    "spider_web": "🕸",
    "spiral_calendar": "🗓",
    "spiral_notepad": "🗒",
    "spiral_shell": "🐚",
    "spoon": "🥄",
    "sponge": "🧽",
    "sport_utility_vehicle": "🚙",
    "sports_medal": "🏅",
    "spouting_whale": "🐳",
    "squid": "🦑",
    "squinting_face_with_tongue": "😝",
    "stadium": "🏟",
    "star-struck": "🤩",
    "star_and_crescent": "☪",
    "star_of_david": "✡",
    "station": "🚉",
    "steaming_bowl": "🍜",
    "stethoscope": "🩺",
    "stop_button": "⏹",
    "stop_sign": "🛑",
    "stopwatch": "⏱",
    "straight_ruler": "📏",
    "strawberry": "🍓",
    "studio_microphone": "🎙",
    "stuffed_flatbread": "🥙",
    "sun": "☀",
    "sun_behind_cloud": "⛅",
    "sun_behind_large_cloud": "🌥",
    "sun_behind_rain_cloud": "🌦",
    "sun_behind_small_cloud": "🌤",
    "sun_with_face": "🌞",
    "sunflower": "🌻",
    "sunglasses": "😎",
    "sunrise": "🌅",
    "sunrise_over_mountains": "🌄",
    "sunset": "🌇",
    "superhero": "🦸",
    "supervillain": "🦹",
    "sushi": "🍣",
    "suspension_railway": "🚟",
    "swan": "🦢",
    "sweat_droplets": "💦",
    "synagogue": "🕍",
    "syringe": "💉",
    "t-shirt": "👕",
    "taco": "🌮",
    "takeout_box": "🥡",
    "tanabata_tree": "🎋",
    "tangerine": "🍊",
    "taxi": "🚕",
    "teacup_without_handle": "🍵",
    "tear-off_calendar": "📆",
    "teddy_bear": "🧸",
    "telephone": "☎",
    "telephone_receiver": "📞",
    "telescope": "🔭",
    "television": "📺",
    "ten-thirty": "🕥",
    "ten_o’clock": "🕙",
    "tennis": "🎾",
    "tent": "⛺",
    "test_tube": "🧪",
    "thermometer": "🌡",
    "thinking_face": "🤔",
    "thought_balloon": "💭",
    "thread": "🧵",
    "three-thirty": "🕞",
    "three_o’clock": "🕒",
    "thumbs_down": "👎",
    "thumbs_down_dark_skin_tone": "👎🏿",
    "thumbs_down_light_skin_tone": "👎🏻",
    "thumbs_down_medium-dark_skin_tone": "👎🏾",
    "thumbs_down_medium-light_skin_tone": "👎🏼",
    "thumbs_down_medium_skin_tone": "👎🏽",
    "thumbs_up": "👍",
    "thumbs_up_dark_skin_tone": "👍🏿",
    "thumbs_up_light_skin_tone": "👍🏻",
    "thumbs_up_medium-dark_skin_tone": "👍🏾",
    "thumbs_up_medium-light_skin_tone": "👍🏼",
    "thumbs_up_medium_skin_tone": "👍🏽",
    "ticket": "🎫",
    "tiger": "🐯",
    "tiger_face": "🐯",
    "timer_clock": "⏲",
    "tired_face": "😫",
    "toolbox": "🧰",
    "toilet": "🚽",
    "tomato": "🍅",
    "tongue": "👅",
    "tooth": "🦷",
    "top_hat": "🎩",
    "tornado": "🌪",
    "trackball": "🖲",
    "tractor": "🚜",
    "trade_mark": "™",
    "train": "🚋",
    "tram": "🚊",
    "tram_car": "🚋",
    "triangular_flag": "🚩",
    "triangular_ruler": "📐",
    "trident_emblem": "🔱",
    "trolleybus": "🚎",
    "trophy": "🏆",
    "tropical_drink": "🍹",
    "tropical_fish": "🐠",
    "trumpet": "🎺",
    "tulip": "🌷",
    "tumbler_glass": "🥃",
    "turtle": "🐢",
    "twelve-thirty": "🕧",
    "twelve_o’clock": "🕛",
    "two-hump_camel": "🐫",
    "two-thirty": "🕝",
    "two_hearts": "💕",
    "two_men_holding_hands": "👬",
    "two_o’clock": "🕑",
    "two_women_holding_hands": "👭",
    "umbrella": "☂",
    "umbrella_on_ground": "⛱",
    "umbrella_with_rain_drops": "☔",
    "unamused_face": "😒",
    "unicorn_face": "🦄",
    "unlocked": "🔓",
    "up-down_arrow": "↕",
    "up-left_arrow": "↖",
    "up-right_arrow": "↗",
    "up_arrow": "⬆",
    "upside-down_face": "🙃",
    "upwards_button": "🔼",
    "vampire": "🧛",
    "vampire_dark_skin_tone": "🧛🏿",
    "vampire_light_skin_tone": "🧛🏻",
    "vampire_medium-dark_skin_tone": "🧛🏾",
    "vampire_medium-light_skin_tone": "🧛🏼",
    "vampire_medium_skin_tone": "🧛🏽",
    "vertical_traffic_light": "🚦",
    "vibration_mode": "📳",
    "victory_hand": "✌",
    "victory_hand_dark_skin_tone": "✌🏿",
    "victory_hand_light_skin_tone": "✌🏻",
    "victory_hand_medium-dark_skin_tone": "✌🏾",
    "victory_hand_medium-light_skin_tone": "✌🏼",
    "victory_hand_medium_skin_tone": "✌🏽",
    "video_camera": "📹",
    "video_game": "🎮",
    "videocassette": "📼",
    "violin": "🎻",
    "volcano": "🌋",
    "volleyball": "🏐",
    "vulcan_salute": "🖖",
    "vulcan_salute_dark_skin_tone": "🖖🏿",
    "vulcan_salute_light_skin_tone": "🖖🏻",
    "vulcan_salute_medium-dark_skin_tone": "🖖🏾",
    "vulcan_salute_medium-light_skin_tone": "🖖🏼",
    "vulcan_salute_medium_skin_tone": "🖖🏽",
    "waffle": "🧇",
    "waning_crescent_moon": "🌘",
    "waning_gibbous_moon": "🌖",
    "warning": "⚠",
    "wastebasket": "🗑",
    "watch": "⌚",
    "water_buffalo": "🐃",
    "water_closet": "🚾",
    "water_wave": "🌊",
    "watermelon": "🍉",
    "waving_hand": "👋",
    "waving_hand_dark_skin_tone": "👋🏿",
    "waving_hand_light_skin_tone": "👋🏻",
    "waving_hand_medium-dark_skin_tone": "👋🏾",
    "waving_hand_medium-light_skin_tone": "👋🏼",
    "waving_hand_medium_skin_tone": "👋🏽",
    "wavy_dash": "〰",
    "waxing_crescent_moon": "🌒",
    "waxing_gibbous_moon": "🌔",
    "weary_cat_face": "🙀",
    "weary_face": "😩",
    "wedding": "💒",
    "whale": "🐳",
    "wheel_of_dharma": "☸",
    "wheelchair_symbol": "♿",
    "white_circle": "⚪",
    "white_exclamation_mark": "❕",
    "white_flag": "🏳",
    "white_flower": "💮",
    "white_hair": "🦳",
    "white-haired_man": "👨\u200d🦳",
    "white-haired_woman": "👩\u200d🦳",
    "white_heart": "🤍",
    "white_heavy_check_mark": "✅",
    "white_large_square": "⬜",
    "white_medium-small_square": "◽",
    "white_medium_square": "◻",
    "white_medium_star": "⭐",
    "white_question_mark": "❔",
    "white_small_square": "▫",
    "white_square_button": "🔳",
    "wilted_flower": "🥀",
    "wind_chime": "🎐",
    "wind_face": "🌬",
    "wine_glass": "🍷",
    "winking_face": "😉",
    "winking_face_with_tongue": "😜",
    "wolf_face": "🐺",
    "woman": "👩",
    "woman_artist": "👩\u200d🎨",
    "woman_artist_dark_skin_tone": "👩🏿\u200d🎨",
    "woman_artist_light_skin_tone": "👩🏻\u200d🎨",
    "woman_artist_medium-dark_skin_tone": "👩🏾\u200d🎨",
    "woman_artist_medium-light_skin_tone": "👩🏼\u200d🎨",
    "woman_artist_medium_skin_tone": "👩🏽\u200d🎨",
    "woman_astronaut": "👩\u200d🚀",
    "woman_astronaut_dark_skin_tone": "👩🏿\u200d🚀",
    "woman_astronaut_light_skin_tone": "👩🏻\u200d🚀",
    "woman_astronaut_medium-dark_skin_tone": "👩🏾\u200d🚀",
    "woman_astronaut_medium-light_skin_tone": "👩🏼\u200d🚀",
    "woman_astronaut_medium_skin_tone": "👩🏽\u200d🚀",
    "woman_biking": "🚴\u200d♀️",
    "woman_biking_dark_skin_tone": "🚴🏿\u200d♀️",
    "woman_biking_light_skin_tone": "🚴🏻\u200d♀️",
    "woman_biking_medium-dark_skin_tone": "🚴🏾\u200d♀️",
    "woman_biking_medium-light_skin_tone": "🚴🏼\u200d♀️",
    "woman_biking_medium_skin_tone": "🚴🏽\u200d♀️",
    "woman_bouncing_ball": "⛹️\u200d♀️",
    "woman_bouncing_ball_dark_skin_tone": "⛹🏿\u200d♀️",
    "woman_bouncing_ball_light_skin_tone": "⛹🏻\u200d♀️",
    "woman_bouncing_ball_medium-dark_skin_tone": "⛹🏾\u200d♀️",
    "woman_bouncing_ball_medium-light_skin_tone": "⛹🏼\u200d♀️",
    "woman_bouncing_ball_medium_skin_tone": "⛹🏽\u200d♀️",
    "woman_bowing": "🙇\u200d♀️",
    "woman_bowing_dark_skin_tone": "🙇🏿\u200d♀️",
    "woman_bowing_light_skin_tone": "🙇🏻\u200d♀️",
    "woman_bowing_medium-dark_skin_tone": "🙇🏾\u200d♀️",
    "woman_bowing_medium-light_skin_tone": "🙇🏼\u200d♀️",
    "woman_bowing_medium_skin_tone": "🙇🏽\u200d♀️",
    "woman_cartwheeling": "🤸\u200d♀️",
    "woman_cartwheeling_dark_skin_tone": "🤸🏿\u200d♀️",
    "woman_cartwheeling_light_skin_tone": "🤸🏻\u200d♀️",
    "woman_cartwheeling_medium-dark_skin_tone": "🤸🏾\u200d♀️",
    "woman_cartwheeling_medium-light_skin_tone": "🤸🏼\u200d♀️",
    "woman_cartwheeling_medium_skin_tone": "🤸🏽\u200d♀️",
    "woman_climbing": "🧗\u200d♀️",
    "woman_climbing_dark_skin_tone": "🧗🏿\u200d♀️",
    "woman_climbing_light_skin_tone": "🧗🏻\u200d♀️",
    "woman_climbing_medium-dark_skin_tone": "🧗🏾\u200d♀️",
    "woman_climbing_medium-light_skin_tone": "🧗🏼\u200d♀️",
    "woman_climbing_medium_skin_tone": "🧗🏽\u200d♀️",
    "woman_construction_worker": "👷\u200d♀️",
    "woman_construction_worker_dark_skin_tone": "👷🏿\u200d♀️",
    "woman_construction_worker_light_skin_tone": "👷🏻\u200d♀️",
    "woman_construction_worker_medium-dark_skin_tone": "👷🏾\u200d♀️",
    "woman_construction_worker_medium-light_skin_tone": "👷🏼\u200d♀️",
    "woman_construction_worker_medium_skin_tone": "👷🏽\u200d♀️",
    "woman_cook": "👩\u200d🍳",
    "woman_cook_dark_skin_tone": "👩🏿\u200d🍳",
    "woman_cook_light_skin_tone": "👩🏻\u200d🍳",
    "woman_cook_medium-dark_skin_tone": "👩🏾\u200d🍳",
    "woman_cook_medium-light_skin_tone": "👩🏼\u200d🍳",
    "woman_cook_medium_skin_tone": "👩🏽\u200d🍳",
    "woman_dancing": "💃",
    "woman_dancing_dark_skin_tone": "💃🏿",
    "woman_dancing_light_skin_tone": "💃🏻",
    "woman_dancing_medium-dark_skin_tone": "💃🏾",
    "woman_dancing_medium-light_skin_tone": "💃🏼",
    "woman_dancing_medium_skin_tone": "💃🏽",
    "woman_dark_skin_tone": "👩🏿",
    "woman_detective": "🕵️\u200d♀️",
    "woman_detective_dark_skin_tone": "🕵🏿\u200d♀️",
    "woman_detective_light_skin_tone": "🕵🏻\u200d♀️",
    "woman_detective_medium-dark_skin_tone": "🕵🏾\u200d♀️",
    "woman_detective_medium-light_skin_tone": "🕵🏼\u200d♀️",
    "woman_detective_medium_skin_tone": "🕵🏽\u200d♀️",
    "woman_elf": "🧝\u200d♀️",
    "woman_elf_dark_skin_tone": "🧝🏿\u200d♀️",
    "woman_elf_light_skin_tone": "🧝🏻\u200d♀️",
    "woman_elf_medium-dark_skin_tone": "🧝🏾\u200d♀️",
    "woman_elf_medium-light_skin_tone": "🧝🏼\u200d♀️",
    "woman_elf_medium_skin_tone": "🧝🏽\u200d♀️",
    "woman_facepalming": "🤦\u200d♀️",
    "woman_facepalming_dark_skin_tone": "🤦🏿\u200d♀️",
    "woman_facepalming_light_skin_tone": "🤦🏻\u200d♀️",
    "woman_facepalming_medium-dark_skin_tone": "🤦🏾\u200d♀️",
    "woman_facepalming_medium-light_skin_tone": "🤦🏼\u200d♀️",
    "woman_facepalming_medium_skin_tone": "🤦🏽\u200d♀️",
    "woman_factory_worker": "👩\u200d🏭",
    "woman_factory_worker_dark_skin_tone": "👩🏿\u200d🏭",
    "woman_factory_worker_light_skin_tone": "👩🏻\u200d🏭",
    "woman_factory_worker_medium-dark_skin_tone": "👩🏾\u200d🏭",
    "woman_factory_worker_medium-light_skin_tone": "👩🏼\u200d🏭",
    "woman_factory_worker_medium_skin_tone": "👩🏽\u200d🏭",
    "woman_fairy": "🧚\u200d♀️",
    "woman_fairy_dark_skin_tone": "🧚🏿\u200d♀️",
    "woman_fairy_light_skin_tone": "🧚🏻\u200d♀️",
    "woman_fairy_medium-dark_skin_tone": "🧚🏾\u200d♀️",
    "woman_fairy_medium-light_skin_tone": "🧚🏼\u200d♀️",
    "woman_fairy_medium_skin_tone": "🧚🏽\u200d♀️",
    "woman_farmer": "👩\u200d🌾",
    "woman_farmer_dark_skin_tone": "👩🏿\u200d🌾",
    "woman_farmer_light_skin_tone": "👩🏻\u200d🌾",
    "woman_farmer_medium-dark_skin_tone": "👩🏾\u200d🌾",
    "woman_farmer_medium-light_skin_tone": "👩🏼\u200d🌾",
    "woman_farmer_medium_skin_tone": "👩🏽\u200d🌾",
    "woman_firefighter": "👩\u200d🚒",
    "woman_firefighter_dark_skin_tone": "👩🏿\u200d🚒",
    "woman_firefighter_light_skin_tone": "👩🏻\u200d🚒",
    "woman_firefighter_medium-dark_skin_tone": "👩🏾\u200d🚒",
    "woman_firefighter_medium-light_skin_tone": "👩🏼\u200d🚒",
    "woman_firefighter_medium_skin_tone": "👩🏽\u200d🚒",
    "woman_frowning": "🙍\u200d♀️",
    "woman_frowning_dark_skin_tone": "🙍🏿\u200d♀️",
    "woman_frowning_light_skin_tone": "🙍🏻\u200d♀️",
    "woman_frowning_medium-dark_skin_tone": "🙍🏾\u200d♀️",
    "woman_frowning_medium-light_skin_tone": "🙍🏼\u200d♀️",
    "woman_frowning_medium_skin_tone": "🙍🏽\u200d♀️",
    "woman_genie": "🧞\u200d♀️",
    "woman_gesturing_no": "🙅\u200d♀️",
    "woman_gesturing_no_dark_skin_tone": "🙅🏿\u200d♀️",
    "woman_gesturing_no_light_skin_tone": "🙅🏻\u200d♀️",
    "woman_gesturing_no_medium-dark_skin_tone": "🙅🏾\u200d♀️",
    "woman_gesturing_no_medium-light_skin_tone": "🙅🏼\u200d♀️",
    "woman_gesturing_no_medium_skin_tone": "🙅🏽\u200d♀️",
    "woman_gesturing_ok": "🙆\u200d♀️",
    "woman_gesturing_ok_dark_skin_tone": "🙆🏿\u200d♀️",
    "woman_gesturing_ok_light_skin_tone": "🙆🏻\u200d♀️",
    "woman_gesturing_ok_medium-dark_skin_tone": "🙆🏾\u200d♀️",
    "woman_gesturing_ok_medium-light_skin_tone": "🙆🏼\u200d♀️",
    "woman_gesturing_ok_medium_skin_tone": "🙆🏽\u200d♀️",
    "woman_getting_haircut": "💇\u200d♀️",
    "woman_getting_haircut_dark_skin_tone": "💇🏿\u200d♀️",
    "woman_getting_haircut_light_skin_tone": "💇🏻\u200d♀️",
    "woman_getting_haircut_medium-dark_skin_tone": "💇🏾\u200d♀️",
    "woman_getting_haircut_medium-light_skin_tone": "💇🏼\u200d♀️",
    "woman_getting_haircut_medium_skin_tone": "💇🏽\u200d♀️",
    "woman_getting_massage": "💆\u200d♀️",
    "woman_getting_massage_dark_skin_tone": "💆🏿\u200d♀️",
    "woman_getting_massage_light_skin_tone": "💆🏻\u200d♀️",
    "woman_getting_massage_medium-dark_skin_tone": "💆🏾\u200d♀️",
    "woman_getting_massage_medium-light_skin_tone": "💆🏼\u200d♀️",
    "woman_getting_massage_medium_skin_tone": "💆🏽\u200d♀️",
    "woman_golfing": "🏌️\u200d♀️",
    "woman_golfing_dark_skin_tone": "🏌🏿\u200d♀️",
    "woman_golfing_light_skin_tone": "🏌🏻\u200d♀️",
    "woman_golfing_medium-dark_skin_tone": "🏌🏾\u200d♀️",
    "woman_golfing_medium-light_skin_tone": "🏌🏼\u200d♀️",
    "woman_golfing_medium_skin_tone": "🏌🏽\u200d♀️",
    "woman_guard": "💂\u200d♀️",
    "woman_guard_dark_skin_tone": "💂🏿\u200d♀️",
    "woman_guard_light_skin_tone": "💂🏻\u200d♀️",
    "woman_guard_medium-dark_skin_tone": "💂🏾\u200d♀️",
    "woman_guard_medium-light_skin_tone": "💂🏼\u200d♀️",
    "woman_guard_medium_skin_tone": "💂🏽\u200d♀️",
    "woman_health_worker": "👩\u200d⚕️",
    "woman_health_worker_dark_skin_tone": "👩🏿\u200d⚕️",
    "woman_health_worker_light_skin_tone": "👩🏻\u200d⚕️",
    "woman_health_worker_medium-dark_skin_tone": "👩🏾\u200d⚕️",
    "woman_health_worker_medium-light_skin_tone": "👩🏼\u200d⚕️",
    "woman_health_worker_medium_skin_tone": "👩🏽\u200d⚕️",
    "woman_in_lotus_position": "🧘\u200d♀️",
    "woman_in_lotus_position_dark_skin_tone": "🧘🏿\u200d♀️",
    "woman_in_lotus_position_light_skin_tone": "🧘🏻\u200d♀️",
    "woman_in_lotus_position_medium-dark_skin_tone": "🧘🏾\u200d♀️",
    "woman_in_lotus_position_medium-light_skin_tone": "🧘🏼\u200d♀️",
    "woman_in_lotus_position_medium_skin_tone": "🧘🏽\u200d♀️",
    "woman_in_manual_wheelchair": "👩\u200d🦽",
    "woman_in_motorized_wheelchair": "👩\u200d🦼",
    "woman_in_steamy_room": "🧖\u200d♀️",
    "woman_in_steamy_room_dark_skin_tone": "🧖🏿\u200d♀️",
    "woman_in_steamy_room_light_skin_tone": "🧖🏻\u200d♀️",
    "woman_in_steamy_room_medium-dark_skin_tone": "🧖🏾\u200d♀️",
    "woman_in_steamy_room_medium-light_skin_tone": "🧖🏼\u200d♀️",
    "woman_in_steamy_room_medium_skin_tone": "🧖🏽\u200d♀️",
    "woman_judge": "👩\u200d⚖️",
    "woman_judge_dark_skin_tone": "👩🏿\u200d⚖️",
    "woman_judge_light_skin_tone": "👩🏻\u200d⚖️",
    "woman_judge_medium-dark_skin_tone": "👩🏾\u200d⚖️",
    "woman_judge_medium-light_skin_tone": "👩🏼\u200d⚖️",
    "woman_judge_medium_skin_tone": "👩🏽\u200d⚖️",
    "woman_juggling": "🤹\u200d♀️",
    "woman_juggling_dark_skin_tone": "🤹🏿\u200d♀️",
    "woman_juggling_light_skin_tone": "🤹🏻\u200d♀️",
    "woman_juggling_medium-dark_skin_tone": "🤹🏾\u200d♀️",
    "woman_juggling_medium-light_skin_tone": "🤹🏼\u200d♀️",
    "woman_juggling_medium_skin_tone": "🤹🏽\u200d♀️",
    "woman_lifting_weights": "🏋️\u200d♀️",
    "woman_lifting_weights_dark_skin_tone": "🏋🏿\u200d♀️",
    "woman_lifting_weights_light_skin_tone": "🏋🏻\u200d♀️",
    "woman_lifting_weights_medium-dark_skin_tone": "🏋🏾\u200d♀️",
    "woman_lifting_weights_medium-light_skin_tone": "🏋🏼\u200d♀️",
    "woman_lifting_weights_medium_skin_tone": "🏋🏽\u200d♀️",
    "woman_light_skin_tone": "👩🏻",
    "woman_mage": "🧙\u200d♀️",
    "woman_mage_dark_skin_tone": "🧙🏿\u200d♀️",
    "woman_mage_light_skin_tone": "🧙🏻\u200d♀️",
    "woman_mage_medium-dark_skin_tone": "🧙🏾\u200d♀️",
    "woman_mage_medium-light_skin_tone": "🧙🏼\u200d♀️",
    "woman_mage_medium_skin_tone": "🧙🏽\u200d♀️",
    "woman_mechanic": "👩\u200d🔧",
    "woman_mechanic_dark_skin_tone": "👩🏿\u200d🔧",
    "woman_mechanic_light_skin_tone": "👩🏻\u200d🔧",
    "woman_mechanic_medium-dark_skin_tone": "👩🏾\u200d🔧",
    "woman_mechanic_medium-light_skin_tone": "👩🏼\u200d🔧",
    "woman_mechanic_medium_skin_tone": "👩🏽\u200d🔧",
    "woman_medium-dark_skin_tone": "👩🏾",
    "woman_medium-light_skin_tone": "👩🏼",
    "woman_medium_skin_tone": "👩🏽",
    "woman_mountain_biking": "🚵\u200d♀️",
    "woman_mountain_biking_dark_skin_tone": "🚵🏿\u200d♀️",
    "woman_mountain_biking_light_skin_tone": "🚵🏻\u200d♀️",
    "woman_mountain_biking_medium-dark_skin_tone": "🚵🏾\u200d♀️",
    "woman_mountain_biking_medium-light_skin_tone": "🚵🏼\u200d♀️",
    "woman_mountain_biking_medium_skin_tone": "🚵🏽\u200d♀️",
    "woman_office_worker": "👩\u200d💼",
    "woman_office_worker_dark_skin_tone": "👩🏿\u200d💼",
    "woman_office_worker_light_skin_tone": "👩🏻\u200d💼",
    "woman_office_worker_medium-dark_skin_tone": "👩🏾\u200d💼",
    "woman_office_worker_medium-light_skin_tone": "👩🏼\u200d💼",
    "woman_office_worker_medium_skin_tone": "👩🏽\u200d💼",
    "woman_pilot": "👩\u200d✈️",
    "woman_pilot_dark_skin_tone": "👩🏿\u200d✈️",
    "woman_pilot_light_skin_tone": "👩🏻\u200d✈️",
    "woman_pilot_medium-dark_skin_tone": "👩🏾\u200d✈️",
    "woman_pilot_medium-light_skin_tone": "👩🏼\u200d✈️",
    "woman_pilot_medium_skin_tone": "👩🏽\u200d✈️",
    "woman_playing_handball": "🤾\u200d♀️",
    "woman_playing_handball_dark_skin_tone": "🤾🏿\u200d♀️",
    "woman_playing_handball_light_skin_tone": "🤾🏻\u200d♀️",
    "woman_playing_handball_medium-dark_skin_tone": "🤾🏾\u200d♀️",
    "woman_playing_handball_medium-light_skin_tone": "🤾🏼\u200d♀️",
    "woman_playing_handball_medium_skin_tone": "🤾🏽\u200d♀️",
    "woman_playing_water_polo": "🤽\u200d♀️",
    "woman_playing_water_polo_dark_skin_tone": "🤽🏿\u200d♀️",
    "woman_playing_water_polo_light_skin_tone": "🤽🏻\u200d♀️",
    "woman_playing_water_polo_medium-dark_skin_tone": "🤽🏾\u200d♀️",
    "woman_playing_water_polo_medium-light_skin_tone": "🤽🏼\u200d♀️",
    "woman_playing_water_polo_medium_skin_tone": "🤽🏽\u200d♀️",
    "woman_police_officer": "👮\u200d♀️",
    "woman_police_officer_dark_skin_tone": "👮🏿\u200d♀️",
    "woman_police_officer_light_skin_tone": "👮🏻\u200d♀️",
    "woman_police_officer_medium-dark_skin_tone": "👮🏾\u200d♀️",
    "woman_police_officer_medium-light_skin_tone": "👮🏼\u200d♀️",
    "woman_police_officer_medium_skin_tone": "👮🏽\u200d♀️",
    "woman_pouting": "🙎\u200d♀️",
    "woman_pouting_dark_skin_tone": "🙎🏿\u200d♀️",
    "woman_pouting_light_skin_tone": "🙎🏻\u200d♀️",
    "woman_pouting_medium-dark_skin_tone": "🙎🏾\u200d♀️",
    "woman_pouting_medium-light_skin_tone": "🙎🏼\u200d♀️",
    "woman_pouting_medium_skin_tone": "🙎🏽\u200d♀️",
    "woman_raising_hand": "🙋\u200d♀️",
    "woman_raising_hand_dark_skin_tone": "🙋🏿\u200d♀️",
    "woman_raising_hand_light_skin_tone": "🙋🏻\u200d♀️",
    "woman_raising_hand_medium-dark_skin_tone": "🙋🏾\u200d♀️",
    "woman_raising_hand_medium-light_skin_tone": "🙋🏼\u200d♀️",
    "woman_raising_hand_medium_skin_tone": "🙋🏽\u200d♀️",
    "woman_rowing_boat": "🚣\u200d♀️",
    "woman_rowing_boat_dark_skin_tone": "🚣🏿\u200d♀️",
    "woman_rowing_boat_light_skin_tone": "🚣🏻\u200d♀️",
    "woman_rowing_boat_medium-dark_skin_tone": "🚣🏾\u200d♀️",
    "woman_rowing_boat_medium-light_skin_tone": "🚣🏼\u200d♀️",
    "woman_rowing_boat_medium_skin_tone": "🚣🏽\u200d♀️",
    "woman_running": "🏃\u200d♀️",
    "woman_running_dark_skin_tone": "🏃🏿\u200d♀️",
    "woman_running_light_skin_tone": "🏃🏻\u200d♀️",
    "woman_running_medium-dark_skin_tone": "🏃🏾\u200d♀️",
    "woman_running_medium-light_skin_tone": "🏃🏼\u200d♀️",
    "woman_running_medium_skin_tone": "🏃🏽\u200d♀️",
    "woman_scientist": "👩\u200d🔬",
    "woman_scientist_dark_skin_tone": "👩🏿\u200d🔬",
    "woman_scientist_light_skin_tone": "👩🏻\u200d🔬",
    "woman_scientist_medium-dark_skin_tone": "👩🏾\u200d🔬",
    "woman_scientist_medium-light_skin_tone": "👩🏼\u200d🔬",
    "woman_scientist_medium_skin_tone": "👩🏽\u200d🔬",
    "woman_shrugging": "🤷\u200d♀️",
    "woman_shrugging_dark_skin_tone": "🤷🏿\u200d♀️",
    "woman_shrugging_light_skin_tone": "🤷🏻\u200d♀️",
    "woman_shrugging_medium-dark_skin_tone": "🤷🏾\u200d♀️",
    "woman_shrugging_medium-light_skin_tone": "🤷🏼\u200d♀️",
    "woman_shrugging_medium_skin_tone": "🤷🏽\u200d♀️",
    "woman_singer": "👩\u200d🎤",
    "woman_singer_dark_skin_tone": "👩🏿\u200d🎤",
    "woman_singer_light_skin_tone": "👩🏻\u200d🎤",
    "woman_singer_medium-dark_skin_tone": "👩🏾\u200d🎤",
    "woman_singer_medium-light_skin_tone": "👩🏼\u200d🎤",
    "woman_singer_medium_skin_tone": "👩🏽\u200d🎤",
    "woman_student": "👩\u200d🎓",
    "woman_student_dark_skin_tone": "👩🏿\u200d🎓",
    "woman_student_light_skin_tone": "👩🏻\u200d🎓",
    "woman_student_medium-dark_skin_tone": "👩🏾\u200d🎓",
    "woman_student_medium-light_skin_tone": "👩🏼\u200d🎓",
    "woman_student_medium_skin_tone": "👩🏽\u200d🎓",
    "woman_surfing": "🏄\u200d♀️",
    "woman_surfing_dark_skin_tone": "🏄🏿\u200d♀️",
    "woman_surfing_light_skin_tone": "🏄🏻\u200d♀️",
    "woman_surfing_medium-dark_skin_tone": "🏄🏾\u200d♀️",
    "woman_surfing_medium-light_skin_tone": "🏄🏼\u200d♀️",
    "woman_surfing_medium_skin_tone": "🏄🏽\u200d♀️",
    "woman_swimming": "🏊\u200d♀️",
    "woman_swimming_dark_skin_tone": "🏊🏿\u200d♀️",
    "woman_swimming_light_skin_tone": "🏊🏻\u200d♀️",
    "woman_swimming_medium-dark_skin_tone": "🏊🏾\u200d♀️",
    "woman_swimming_medium-light_skin_tone": "🏊🏼\u200d♀️",
    "woman_swimming_medium_skin_tone": "🏊🏽\u200d♀️",
    "woman_teacher": "👩\u200d🏫",
    "woman_teacher_dark_skin_tone": "👩🏿\u200d🏫",
    "woman_teacher_light_skin_tone": "👩🏻\u200d🏫",
    "woman_teacher_medium-dark_skin_tone": "👩🏾\u200d🏫",
    "woman_teacher_medium-light_skin_tone": "👩🏼\u200d🏫",
    "woman_teacher_medium_skin_tone": "👩🏽\u200d🏫",
    "woman_technologist": "👩\u200d💻",
    "woman_technologist_dark_skin_tone": "👩🏿\u200d💻",
    "woman_technologist_light_skin_tone": "👩🏻\u200d💻",
    "woman_technologist_medium-dark_skin_tone": "👩🏾\u200d💻",
    "woman_technologist_medium-light_skin_tone": "👩🏼\u200d💻",
    "woman_technologist_medium_skin_tone": "👩🏽\u200d💻",
    "woman_tipping_hand": "💁\u200d♀️",
    "woman_tipping_hand_dark_skin_tone": "💁🏿\u200d♀️",
    "woman_tipping_hand_light_skin_tone": "💁🏻\u200d♀️",
    "woman_tipping_hand_medium-dark_skin_tone": "💁🏾\u200d♀️",
    "woman_tipping_hand_medium-light_skin_tone": "💁🏼\u200d♀️",
    "woman_tipping_hand_medium_skin_tone": "💁🏽\u200d♀️",
    "woman_vampire": "🧛\u200d♀️",
    "woman_vampire_dark_skin_tone": "🧛🏿\u200d♀️",
    "woman_vampire_light_skin_tone": "🧛🏻\u200d♀️",
    "woman_vampire_medium-dark_skin_tone": "🧛🏾\u200d♀️",
    "woman_vampire_medium-light_skin_tone": "🧛🏼\u200d♀️",
    "woman_vampire_medium_skin_tone": "🧛🏽\u200d♀️",
    "woman_walking": "🚶\u200d♀️",
    "woman_walking_dark_skin_tone": "🚶🏿\u200d♀️",
    "woman_walking_light_skin_tone": "🚶🏻\u200d♀️",
    "woman_walking_medium-dark_skin_tone": "🚶🏾\u200d♀️",
    "woman_walking_medium-light_skin_tone": "🚶🏼\u200d♀️",
    "woman_walking_medium_skin_tone": "🚶🏽\u200d♀️",
    "woman_wearing_turban": "👳\u200d♀️",
    "woman_wearing_turban_dark_skin_tone": "👳🏿\u200d♀️",
    "woman_wearing_turban_light_skin_tone": "👳🏻\u200d♀️",
    "woman_wearing_turban_medium-dark_skin_tone": "👳🏾\u200d♀️",
    "woman_wearing_turban_medium-light_skin_tone": "👳🏼\u200d♀️",
    "woman_wearing_turban_medium_skin_tone": "👳🏽\u200d♀️",
    "woman_with_headscarf": "🧕",
    "woman_with_headscarf_dark_skin_tone": "🧕🏿",
    "woman_with_headscarf_light_skin_tone": "🧕🏻",
    "woman_with_headscarf_medium-dark_skin_tone": "🧕🏾",
    "woman_with_headscarf_medium-light_skin_tone": "🧕🏼",
    "woman_with_headscarf_medium_skin_tone": "🧕🏽",
    "woman_with_probing_cane": "👩\u200d🦯",
    "woman_zombie": "🧟\u200d♀️",
    "woman’s_boot": "👢",
    "woman’s_clothes": "👚",
    "woman’s_hat": "👒",
    "woman’s_sandal": "👡",
    "women_with_bunny_ears": "👯\u200d♀️",
    "women_wrestling": "🤼\u200d♀️",
    "women’s_room": "🚺",
    "woozy_face": "🥴",
    "world_map": "🗺",
    "worried_face": "😟",
    "wrapped_gift": "🎁",
    "wrench": "🔧",
    "writing_hand": "✍",
    "writing_hand_dark_skin_tone": "✍🏿",
    "writing_hand_light_skin_tone": "✍🏻",
    "writing_hand_medium-dark_skin_tone": "✍🏾",
    "writing_hand_medium-light_skin_tone": "✍🏼",
    "writing_hand_medium_skin_tone": "✍🏽",
    "yarn": "🧶",
    "yawning_face": "🥱",
    "yellow_circle": "🟡",
    "yellow_heart": "💛",
    "yellow_square": "🟨",
    "yen_banknote": "💴",
    "yo-yo": "🪀",
    "yin_yang": "☯",
    "zany_face": "🤪",
    "zebra": "🦓",
    "zipper-mouth_face": "🤐",
    "zombie": "🧟",
    "zzz": "💤",
    "åland_islands": "🇦🇽",
    "keycap_asterisk": "*⃣",
    "keycap_digit_eight": "8⃣",
    "keycap_digit_five": "5⃣",
    "keycap_digit_four": "4⃣",
    "keycap_digit_nine": "9⃣",
    "keycap_digit_one": "1⃣",
    "keycap_digit_seven": "7⃣",
    "keycap_digit_six": "6⃣",
    "keycap_digit_three": "3⃣",
    "keycap_digit_two": "2⃣",
    "keycap_digit_zero": "0⃣",
    "keycap_number_sign": "#⃣",
    "light_skin_tone": "🏻",
    "medium_light_skin_tone": "🏼",
    "medium_skin_tone": "🏽",
    "medium_dark_skin_tone": "🏾",
    "dark_skin_tone": "🏿",
    "regional_indicator_symbol_letter_a": "🇦",
    "regional_indicator_symbol_letter_b": "🇧",
    "regional_indicator_symbol_letter_c": "🇨",
    "regional_indicator_symbol_letter_d": "🇩",
    "regional_indicator_symbol_letter_e": "🇪",
    "regional_indicator_symbol_letter_f": "🇫",
    "regional_indicator_symbol_letter_g": "🇬",
    "regional_indicator_symbol_letter_h": "🇭",
    "regional_indicator_symbol_letter_i": "🇮",
    "regional_indicator_symbol_letter_j": "🇯",
    "regional_indicator_symbol_letter_k": "🇰",
    "regional_indicator_symbol_letter_l": "🇱",
    "regional_indicator_symbol_letter_m": "🇲",
    "regional_indicator_symbol_letter_n": "🇳",
    "regional_indicator_symbol_letter_o": "🇴",
    "regional_indicator_symbol_letter_p": "🇵",
    "regional_indicator_symbol_letter_q": "🇶",
    "regional_indicator_symbol_letter_r": "🇷",
    "regional_indicator_symbol_letter_s": "🇸",
    "regional_indicator_symbol_letter_t": "🇹",
    "regional_indicator_symbol_letter_u": "🇺",
    "regional_indicator_symbol_letter_v": "🇻",
    "regional_indicator_symbol_letter_w": "🇼",
    "regional_indicator_symbol_letter_x": "🇽",
    "regional_indicator_symbol_letter_y": "🇾",
    "regional_indicator_symbol_letter_z": "🇿",
    "airplane_arriving": "🛬",
    "space_invader": "👾",
    "football": "🏈",
    "anger": "💢",
    "angry": "😠",
    "anguished": "😧",
    "signal_strength": "📶",
    "arrows_counterclockwise": "🔄",
    "arrow_heading_down": "⤵",
    "arrow_heading_up": "⤴",
    "art": "🎨",
    "astonished": "😲",
    "athletic_shoe": "👟",
    "atm": "🏧",
    "car": "🚗",
    "red_car": "🚗",
    "angel": "👼",
    "back": "🔙",
    "badminton_racquet_and_shuttlecock": "🏸",
    "dollar": "💵",
    "euro": "💶",
    "pound": "💷",
    "yen": "💴",
    "barber": "💈",
    "bath": "🛀",
    "bear": "🐻",
    "heartbeat": "💓",
    "beer": "🍺",
    "no_bell": "🔕",
    "bento": "🍱",
    "bike": "🚲",
    "bicyclist": "🚴",
    "8ball": "🎱",
    "biohazard_sign": "☣",
    "birthday": "🎂",
    "black_circle_for_record": "⏺",
    "clubs": "♣",
    "diamonds": "♦",
    "arrow_double_down": "⏬",
    "hearts": "♥",
    "rewind": "⏪",
    "black_left__pointing_double_triangle_with_vertical_bar": "⏮",
    "arrow_backward": "◀",
    "black_medium_small_square": "◾",
    "question": "❓",
    "fast_forward": "⏩",
    "black_right__pointing_double_triangle_with_vertical_bar": "⏭",
    "arrow_forward": "▶",
    "black_right__pointing_triangle_with_double_vertical_bar": "⏯",
    "arrow_right": "➡",
    "spades": "♠",
    "black_square_for_stop": "⏹",
    "sunny": "☀",
    "phone": "☎",
    "recycle": "♻",
    "arrow_double_up": "⏫",
    "busstop": "🚏",
    "date": "📅",
    "flags": "🎏",
    "cat2": "🐈",
    "joy_cat": "😹",
    "smirk_cat": "😼",
    "chart_with_downwards_trend": "📉",
    "chart_with_upwards_trend": "📈",
    "chart": "💹",
    "mega": "📣",
    "checkered_flag": "🏁",
    "accept": "🉑",
    "ideograph_advantage": "🉐",
    "congratulations": "㊗",
    "secret": "㊙",
    "m": "Ⓜ",
    "city_sunset": "🌆",
    "clapper": "🎬",
    "clap": "👏",
    "beers": "🍻",
    "clock830": "🕣",
    "clock8": "🕗",
    "clock1130": "🕦",
    "clock11": "🕚",
    "clock530": "🕠",
    "clock5": "🕔",
    "clock430": "🕟",
    "clock4": "🕓",
    "clock930": "🕤",
    "clock9": "🕘",
    "clock130": "🕜",
    "clock1": "🕐",
    "clock730": "🕢",
    "clock7": "🕖",
    "clock630": "🕡",
    "clock6": "🕕",
    "clock1030": "🕥",
    "clock10": "🕙",
    "clock330": "🕞",
    "clock3": "🕒",
    "clock1230": "🕧",
    "clock12": "🕛",
    "clock230": "🕝",
    "clock2": "🕑",
    "arrows_clockwise": "🔃",
    "repeat": "🔁",
    "repeat_one": "🔂",
    "closed_lock_with_key": "🔐",
    "mailbox_closed": "📪",
    "mailbox": "📫",
    "cloud_with_tornado": "🌪",
    "cocktail": "🍸",
    "boom": "💥",
    "compression": "🗜",
    "confounded": "😖",
    "confused": "😕",
    "rice": "🍚",
    "cow2": "🐄",
    "cricket_bat_and_ball": "🏏",
    "x": "❌",
    "cry": "😢",
    "curry": "🍛",
    "dagger_knife": "🗡",
    "dancer": "💃",
    "dark_sunglasses": "🕶",
    "dash": "💨",
    "truck": "🚚",
    "derelict_house_building": "🏚",
    "diamond_shape_with_a_dot_inside": "💠",
    "dart": "🎯",
    "disappointed_relieved": "😥",
    "disappointed": "😞",
    "do_not_litter": "🚯",
    "dog2": "🐕",
    "flipper": "🐬",
    "loop": "➿",
    "bangbang": "‼",
    "double_vertical_bar": "⏸",
    "dove_of_peace": "🕊",
    "small_red_triangle_down": "🔻",
    "arrow_down_small": "🔽",
    "arrow_down": "⬇",
    "dromedary_camel": "🐪",
    "e__mail": "📧",
    "corn": "🌽",
    "ear_of_rice": "🌾",
    "earth_americas": "🌎",
    "earth_asia": "🌏",
    "earth_africa": "🌍",
    "eight_pointed_black_star": "✴",
    "eight_spoked_asterisk": "✳",
    "eject_symbol": "⏏",
    "bulb": "💡",
    "emoji_modifier_fitzpatrick_type__1__2": "🏻",
    "emoji_modifier_fitzpatrick_type__3": "🏼",
    "emoji_modifier_fitzpatrick_type__4": "🏽",
    "emoji_modifier_fitzpatrick_type__5": "🏾",
    "emoji_modifier_fitzpatrick_type__6": "🏿",
    "end": "🔚",
    "email": "✉",
    "european_castle": "🏰",
    "european_post_office": "🏤",
    "interrobang": "⁉",
    "expressionless": "😑",
    "eyeglasses": "👓",
    "massage": "💆",
    "yum": "😋",
    "scream": "😱",
    "kissing_heart": "😘",
    "sweat": "😓",
    "face_with_head__bandage": "🤕",
    "triumph": "😤",
    "mask": "😷",
    "no_good": "🙅",
    "ok_woman": "🙆",
    "open_mouth": "😮",
    "cold_sweat": "😰",
    "stuck_out_tongue": "😛",
    "stuck_out_tongue_closed_eyes": "😝",
    "stuck_out_tongue_winking_eye": "😜",
    "joy": "😂",
    "no_mouth": "😶",
    "santa": "🎅",
    "fax": "📠",
    "fearful": "😨",
    "field_hockey_stick_and_ball": "🏑",
    "first_quarter_moon_with_face": "🌛",
    "fish_cake": "🍥",
    "fishing_pole_and_fish": "🎣",
    "facepunch": "👊",
    "punch": "👊",
    "flag_for_afghanistan": "🇦🇫",
    "flag_for_albania": "🇦🇱",
    "flag_for_algeria": "🇩🇿",
    "flag_for_american_samoa": "🇦🇸",
    "flag_for_andorra": "🇦🇩",
    "flag_for_angola": "🇦🇴",
    "flag_for_anguilla": "🇦🇮",
    "flag_for_antarctica": "🇦🇶",
    "flag_for_antigua_&_barbuda": "🇦🇬",
    "flag_for_argentina": "🇦🇷",
    "flag_for_armenia": "🇦🇲",
    "flag_for_aruba": "🇦🇼",
    "flag_for_ascension_island": "🇦🇨",
    "flag_for_australia": "🇦🇺",
    "flag_for_austria": "🇦🇹",
    "flag_for_azerbaijan": "🇦🇿",
    "flag_for_bahamas": "🇧🇸",
    "flag_for_bahrain": "🇧🇭",
    "flag_for_bangladesh": "🇧🇩",
    "flag_for_barbados": "🇧🇧",
    "flag_for_belarus": "🇧🇾",
    "flag_for_belgium": "🇧🇪",
    "flag_for_belize": "🇧🇿",
    "flag_for_benin": "🇧🇯",
    "flag_for_bermuda": "🇧🇲",
    "flag_for_bhutan": "🇧🇹",
    "flag_for_bolivia": "🇧🇴",
    "flag_for_bosnia_&_herzegovina": "🇧🇦",
    "flag_for_botswana": "🇧🇼",
    "flag_for_bouvet_island": "🇧🇻",
    "flag_for_brazil": "🇧🇷",
    "flag_for_british_indian_ocean_territory": "🇮🇴",
    "flag_for_british_virgin_islands": "🇻🇬",
    "flag_for_brunei": "🇧🇳",
    "flag_for_bulgaria": "🇧🇬",
    "flag_for_burkina_faso": "🇧🇫",
    "flag_for_burundi": "🇧🇮",
    "flag_for_cambodia": "🇰🇭",
    "flag_for_cameroon": "🇨🇲",
    "flag_for_canada": "🇨🇦",
    "flag_for_canary_islands": "🇮🇨",
    "flag_for_cape_verde": "🇨🇻",
    "flag_for_caribbean_netherlands": "🇧🇶",
    "flag_for_cayman_islands": "🇰🇾",
    "flag_for_central_african_republic": "🇨🇫",
    "flag_for_ceuta_&_melilla": "🇪🇦",
    "flag_for_chad": "🇹🇩",
    "flag_for_chile": "🇨🇱",
    "flag_for_china": "🇨🇳",
    "flag_for_christmas_island": "🇨🇽",
    "flag_for_clipperton_island": "🇨🇵",
    "flag_for_cocos__islands": "🇨🇨",
    "flag_for_colombia": "🇨🇴",
    "flag_for_comoros": "🇰🇲",
    "flag_for_congo____brazzaville": "🇨🇬",
    "flag_for_congo____kinshasa": "🇨🇩",
    "flag_for_cook_islands": "🇨🇰",
    "flag_for_costa_rica": "🇨🇷",
    "flag_for_croatia": "🇭🇷",
    "flag_for_cuba": "🇨🇺",
    "flag_for_curaçao": "🇨🇼",
    "flag_for_cyprus": "🇨🇾",
    "flag_for_czech_republic": "🇨🇿",
    "flag_for_côte_d’ivoire": "🇨🇮",
    "flag_for_denmark": "🇩🇰",
    "flag_for_diego_garcia": "🇩🇬",
    "flag_for_djibouti": "🇩🇯",
    "flag_for_dominica": "🇩🇲",
    "flag_for_dominican_republic": "🇩🇴",
    "flag_for_ecuador": "🇪🇨",
    "flag_for_egypt": "🇪🇬",
    "flag_for_el_salvador": "🇸🇻",
    "flag_for_equatorial_guinea": "🇬🇶",
    "flag_for_eritrea": "🇪🇷",
    "flag_for_estonia": "🇪🇪",
    "flag_for_ethiopia": "🇪🇹",
    "flag_for_european_union": "🇪🇺",
    "flag_for_falkland_islands": "🇫🇰",
    "flag_for_faroe_islands": "🇫🇴",
    "flag_for_fiji": "🇫🇯",
    "flag_for_finland": "🇫🇮",
    "flag_for_france": "🇫🇷",
    "flag_for_french_guiana": "🇬🇫",
    "flag_for_french_polynesia": "🇵🇫",
    "flag_for_french_southern_territories": "🇹🇫",
    "flag_for_gabon": "🇬🇦",
    "flag_for_gambia": "🇬🇲",
    "flag_for_georgia": "🇬🇪",
    "flag_for_germany": "🇩🇪",
    "flag_for_ghana": "🇬🇭",
    "flag_for_gibraltar": "🇬🇮",
    "flag_for_greece": "🇬🇷",
    "flag_for_greenland": "🇬🇱",
    "flag_for_grenada": "🇬🇩",
    "flag_for_guadeloupe": "🇬🇵",
    "flag_for_guam": "🇬🇺",
    "flag_for_guatemala": "🇬🇹",
    "flag_for_guernsey": "🇬🇬",
    "flag_for_guinea": "🇬🇳",
    "flag_for_guinea__bissau": "🇬🇼",
    "flag_for_guyana": "🇬🇾",
    "flag_for_haiti": "🇭🇹",
    "flag_for_heard_&_mcdonald_islands": "🇭🇲",
    "flag_for_honduras": "🇭🇳",
    "flag_for_hong_kong": "🇭🇰",
    "flag_for_hungary": "🇭🇺",
    "flag_for_iceland": "🇮🇸",
    "flag_for_india": "🇮🇳",
    "flag_for_indonesia": "🇮🇩",
    "flag_for_iran": "🇮🇷",
    "flag_for_iraq": "🇮🇶",
    "flag_for_ireland": "🇮🇪",
    "flag_for_isle_of_man": "🇮🇲",
    "flag_for_israel": "🇮🇱",
    "flag_for_italy": "🇮🇹",
    "flag_for_jamaica": "🇯🇲",
    "flag_for_japan": "🇯🇵",
    "flag_for_jersey": "🇯🇪",
    "flag_for_jordan": "🇯🇴",
    "flag_for_kazakhstan": "🇰🇿",
    "flag_for_kenya": "🇰🇪",
    "flag_for_kiribati": "🇰🇮",
    "flag_for_kosovo": "🇽🇰",
    "flag_for_kuwait": "🇰🇼",
    "flag_for_kyrgyzstan": "🇰🇬",
    "flag_for_laos": "🇱🇦",
    "flag_for_latvia": "🇱🇻",
    "flag_for_lebanon": "🇱🇧",
    "flag_for_lesotho": "🇱🇸",
    "flag_for_liberia": "🇱🇷",
    "flag_for_libya": "🇱🇾",
    "flag_for_liechtenstein": "🇱🇮",
    "flag_for_lithuania": "🇱🇹",
    "flag_for_luxembourg": "🇱🇺",
    "flag_for_macau": "🇲🇴",
    "flag_for_macedonia": "🇲🇰",
    "flag_for_madagascar": "🇲🇬",
    "flag_for_malawi": "🇲🇼",
    "flag_for_malaysia": "🇲🇾",
    "flag_for_maldives": "🇲🇻",
    "flag_for_mali": "🇲🇱",
    "flag_for_malta": "🇲🇹",
    "flag_for_marshall_islands": "🇲🇭",
    "flag_for_martinique": "🇲🇶",
    "flag_for_mauritania": "🇲🇷",
    "flag_for_mauritius": "🇲🇺",
    "flag_for_mayotte": "🇾🇹",
    "flag_for_mexico": "🇲🇽",
    "flag_for_micronesia": "🇫🇲",
    "flag_for_moldova": "🇲🇩",
    "flag_for_monaco": "🇲🇨",
    "flag_for_mongolia": "🇲🇳",
    "flag_for_montenegro": "🇲🇪",
    "flag_for_montserrat": "🇲🇸",
    "flag_for_morocco": "🇲🇦",
    "flag_for_mozambique": "🇲🇿",
    "flag_for_myanmar": "🇲🇲",
    "flag_for_namibia": "🇳🇦",
    "flag_for_nauru": "🇳🇷",
    "flag_for_nepal": "🇳🇵",
    "flag_for_netherlands": "🇳🇱",
    "flag_for_new_caledonia": "🇳🇨",
    "flag_for_new_zealand": "🇳🇿",
    "flag_for_nicaragua": "🇳🇮",
    "flag_for_niger": "🇳🇪",
    "flag_for_nigeria": "🇳🇬",
    "flag_for_niue": "🇳🇺",
    "flag_for_norfolk_island": "🇳🇫",
    "flag_for_north_korea": "🇰🇵",
    "flag_for_northern_mariana_islands": "🇲🇵",
    "flag_for_norway": "🇳🇴",
    "flag_for_oman": "🇴🇲",
    "flag_for_pakistan": "🇵🇰",
    "flag_for_palau": "🇵🇼",
    "flag_for_palestinian_territories": "🇵🇸",
    "flag_for_panama": "🇵🇦",
    "flag_for_papua_new_guinea": "🇵🇬",
    "flag_for_paraguay": "🇵🇾",
    "flag_for_peru": "🇵🇪",
    "flag_for_philippines": "🇵🇭",
    "flag_for_pitcairn_islands": "🇵🇳",
    "flag_for_poland": "🇵🇱",
    "flag_for_portugal": "🇵🇹",
    "flag_for_puerto_rico": "🇵🇷",
    "flag_for_qatar": "🇶🇦",
    "flag_for_romania": "🇷🇴",
    "flag_for_russia": "🇷🇺",
    "flag_for_rwanda": "🇷🇼",
    "flag_for_réunion": "🇷🇪",
    "flag_for_samoa": "🇼🇸",
    "flag_for_san_marino": "🇸🇲",
    "flag_for_saudi_arabia": "🇸🇦",
    "flag_for_senegal": "🇸🇳",
    "flag_for_serbia": "🇷🇸",
    "flag_for_seychelles": "🇸🇨",
    "flag_for_sierra_leone": "🇸🇱",
    "flag_for_singapore": "🇸🇬",
    "flag_for_sint_maarten": "🇸🇽",
    "flag_for_slovakia": "🇸🇰",
    "flag_for_slovenia": "🇸🇮",
    "flag_for_solomon_islands": "🇸🇧",
    "flag_for_somalia": "🇸🇴",
    "flag_for_south_africa": "🇿🇦",
    "flag_for_south_georgia_&_south_sandwich_islands": "🇬🇸",
    "flag_for_south_korea": "🇰🇷",
    "flag_for_south_sudan": "🇸🇸",
    "flag_for_spain": "🇪🇸",
    "flag_for_sri_lanka": "🇱🇰",
    "flag_for_st._barthélemy": "🇧🇱",
    "flag_for_st._helena": "🇸🇭",
    "flag_for_st._kitts_&_nevis": "🇰🇳",
    "flag_for_st._lucia": "🇱🇨",
    "flag_for_st._martin": "🇲🇫",
    "flag_for_st._pierre_&_miquelon": "🇵🇲",
    "flag_for_st._vincent_&_grenadines": "🇻🇨",
    "flag_for_sudan": "🇸🇩",
    "flag_for_suriname": "🇸🇷",
    "flag_for_svalbard_&_jan_mayen": "🇸🇯",
    "flag_for_swaziland": "🇸🇿",
    "flag_for_sweden": "🇸🇪",
    "flag_for_switzerland": "🇨🇭",
    "flag_for_syria": "🇸🇾",
    "flag_for_são_tomé_&_príncipe": "🇸🇹",
    "flag_for_taiwan": "🇹🇼",
    "flag_for_tajikistan": "🇹🇯",
    "flag_for_tanzania": "🇹🇿",
    "flag_for_thailand": "🇹🇭",
    "flag_for_timor__leste": "🇹🇱",
    "flag_for_togo": "🇹🇬",
    "flag_for_tokelau": "🇹🇰",
    "flag_for_tonga": "🇹🇴",
    "flag_for_trinidad_&_tobago": "🇹🇹",
    "flag_for_tristan_da_cunha": "🇹🇦",
    "flag_for_tunisia": "🇹🇳",
    "flag_for_turkey": "🇹🇷",
    "flag_for_turkmenistan": "🇹🇲",
    "flag_for_turks_&_caicos_islands": "🇹🇨",
    "flag_for_tuvalu": "🇹🇻",
    "flag_for_u.s._outlying_islands": "🇺🇲",
    "flag_for_u.s._virgin_islands": "🇻🇮",
    "flag_for_uganda": "🇺🇬",
    "flag_for_ukraine": "🇺🇦",
    "flag_for_united_arab_emirates": "🇦🇪",
    "flag_for_united_kingdom": "🇬🇧",
    "flag_for_united_states": "🇺🇸",
    "flag_for_uruguay": "🇺🇾",
    "flag_for_uzbekistan": "🇺🇿",
    "flag_for_vanuatu": "🇻🇺",
    "flag_for_vatican_city": "🇻🇦",
    "flag_for_venezuela": "🇻🇪",
    "flag_for_vietnam": "🇻🇳",
    "flag_for_wallis_&_futuna": "🇼🇫",
    "flag_for_western_sahara": "🇪🇭",
    "flag_for_yemen": "🇾🇪",
    "flag_for_zambia": "🇿🇲",
    "flag_for_zimbabwe": "🇿🇼",
    "flag_for_åland_islands": "🇦🇽",
    "golf": "⛳",
    "fleur__de__lis": "⚜",
    "muscle": "💪",
    "flushed": "😳",
    "frame_with_picture": "🖼",
    "fries": "🍟",
    "frog": "🐸",
    "hatched_chick": "🐥",
    "frowning": "😦",
    "fuelpump": "⛽",
    "full_moon_with_face": "🌝",
    "gem": "💎",
    "star2": "🌟",
    "golfer": "🏌",
    "mortar_board": "🎓",
    "grimacing": "😬",
    "smile_cat": "😸",
    "grinning": "😀",
    "grin": "😁",
    "heartpulse": "💗",
    "guardsman": "💂",
    "haircut": "💇",
    "hamster": "🐹",
    "raising_hand": "🙋",
    "headphones": "🎧",
    "hear_no_evil": "🙉",
    "cupid": "💘",
    "gift_heart": "💝",
    "heart": "❤",
    "exclamation": "❗",
    "heavy_exclamation_mark": "❗",
    "heavy_heart_exclamation_mark_ornament": "❣",
    "o": "⭕",
    "helm_symbol": "⎈",
    "helmet_with_white_cross": "⛑",
    "high_heel": "👠",
    "bullettrain_side": "🚄",
    "bullettrain_front": "🚅",
    "high_brightness": "🔆",
    "zap": "⚡",
    "hocho": "🔪",
    "knife": "🔪",
    "bee": "🐝",
    "traffic_light": "🚥",
    "racehorse": "🐎",
    "coffee": "☕",
    "hotsprings": "♨",
    "hourglass": "⌛",
    "hourglass_flowing_sand": "⏳",
    "house_buildings": "🏘",
    "100": "💯",
    "hushed": "😯",
    "ice_hockey_stick_and_puck": "🏒",
    "imp": "👿",
    "information_desk_person": "💁",
    "information_source": "ℹ",
    "capital_abcd": "🔠",
    "abc": "🔤",
    "abcd": "🔡",
    "1234": "🔢",
    "symbols": "🔣",
    "izakaya_lantern": "🏮",
    "lantern": "🏮",
    "jack_o_lantern": "🎃",
    "dolls": "🎎",
    "japanese_goblin": "👺",
    "japanese_ogre": "👹",
    "beginner": "🔰",
    "zero": "0️⃣",
    "one": "1️⃣",
    "ten": "🔟",
    "two": "2️⃣",
    "three": "3️⃣",
    "four": "4️⃣",
    "five": "5️⃣",
    "six": "6️⃣",
    "seven": "7️⃣",
    "eight": "8️⃣",
    "nine": "9️⃣",
    "couplekiss": "💏",
    "kissing_cat": "😽",
    "kissing": "😗",
    "kissing_closed_eyes": "😚",
    "kissing_smiling_eyes": "😙",
    "beetle": "🐞",
    "large_blue_circle": "🔵",
    "last_quarter_moon_with_face": "🌜",
    "leaves": "🍃",
    "mag": "🔍",
    "left_right_arrow": "↔",
    "leftwards_arrow_with_hook": "↩",
    "arrow_left": "⬅",
    "lock": "🔒",
    "lock_with_ink_pen": "🔏",
    "sob": "😭",
    "low_brightness": "🔅",
    "lower_left_ballpoint_pen": "🖊",
    "lower_left_crayon": "🖍",
    "lower_left_fountain_pen": "🖋",
    "lower_left_paintbrush": "🖌",
    "mahjong": "🀄",
    "couple": "👫",
    "man_in_business_suit_levitating": "🕴",
    "man_with_gua_pi_mao": "👲",
    "man_with_turban": "👳",
    "mans_shoe": "👞",
    "shoe": "👞",
    "menorah_with_nine_branches": "🕎",
    "mens": "🚹",
    "minidisc": "💽",
    "iphone": "📱",
    "calling": "📲",
    "money__mouth_face": "🤑",
    "moneybag": "💰",
    "rice_scene": "🎑",
    "mountain_bicyclist": "🚵",
    "mouse2": "🐁",
    "lips": "👄",
    "moyai": "🗿",
    "notes": "🎶",
    "nail_care": "💅",
    "ab": "🆎",
    "negative_squared_cross_mark": "❎",
    "a": "🅰",
    "b": "🅱",
    "o2": "🅾",
    "parking": "🅿",
    "new_moon_with_face": "🌚",
    "no_entry_sign": "🚫",
    "underage": "🔞",
    "non__potable_water": "🚱",
    "arrow_upper_right": "↗",
    "arrow_upper_left": "↖",
    "office": "🏢",
    "older_man": "👴",
    "older_woman": "👵",
    "om_symbol": "🕉",
    "on": "🔛",
    "book": "📖",
    "unlock": "🔓",
    "mailbox_with_no_mail": "📭",
    "mailbox_with_mail": "📬",
    "cd": "💿",
    "tada": "🎉",
    "feet": "🐾",
    "walking": "🚶",
    "pencil2": "✏",
    "pensive": "😔",
    "persevere": "😣",
    "bow": "🙇",
    "raised_hands": "🙌",
    "person_with_ball": "⛹",
    "person_with_blond_hair": "👱",
    "pray": "🙏",
    "person_with_pouting_face": "🙎",
    "computer": "💻",
    "pig2": "🐖",
    "hankey": "💩",
    "poop": "💩",
    "shit": "💩",
    "bamboo": "🎍",
    "gun": "🔫",
    "black_joker": "🃏",
    "rotating_light": "🚨",
    "cop": "👮",
    "stew": "🍲",
    "pouch": "👝",
    "pouting_cat": "😾",
    "rage": "😡",
    "put_litter_in_its_place": "🚮",
    "rabbit2": "🐇",
    "racing_motorcycle": "🏍",
    "radioactive_sign": "☢",
    "fist": "✊",
    "hand": "✋",
    "raised_hand_with_fingers_splayed": "🖐",
    "raised_hand_with_part_between_middle_and_ring_fingers": "🖖",
    "blue_car": "🚙",
    "apple": "🍎",
    "relieved": "😌",
    "reversed_hand_with_middle_finger_extended": "🖕",
    "mag_right": "🔎",
    "arrow_right_hook": "↪",
    "sweet_potato": "🍠",
    "robot": "🤖",
    "rolled__up_newspaper": "🗞",
    "rowboat": "🚣",
    "runner": "🏃",
    "running": "🏃",
    "running_shirt_with_sash": "🎽",
    "boat": "⛵",
    "scales": "⚖",
    "school_satchel": "🎒",
    "scorpius": "♏",
    "see_no_evil": "🙈",
    "sheep": "🐑",
    "stars": "🌠",
    "cake": "🍰",
    "six_pointed_star": "🔯",
    "ski": "🎿",
    "sleeping_accommodation": "🛌",
    "sleeping": "😴",
    "sleepy": "😪",
    "sleuth_or_spy": "🕵",
    "heart_eyes_cat": "😻",
    "smiley_cat": "😺",
    "innocent": "😇",
    "heart_eyes": "😍",
    "smiling_imp": "😈",
    "smiley": "😃",
    "sweat_smile": "😅",
    "smile": "😄",
    "laughing": "😆",
    "satisfied": "😆",
    "blush": "😊",
    "smirk": "😏",
    "smoking": "🚬",
    "snow_capped_mountain": "🏔",
    "soccer": "⚽",
    "icecream": "🍦",
    "soon": "🔜",
    "arrow_lower_right": "↘",
    "arrow_lower_left": "↙",
    "speak_no_evil": "🙊",
    "speaker": "🔈",
    "mute": "🔇",
    "sound": "🔉",
    "loud_sound": "🔊",
    "speaking_head_in_silhouette": "🗣",
    "spiral_calendar_pad": "🗓",
    "spiral_note_pad": "🗒",
    "shell": "🐚",
    "sweat_drops": "💦",
    "u5272": "🈹",
    "u5408": "🈴",
    "u55b6": "🈺",
    "u6307": "🈯",
    "u6708": "🈷",
    "u6709": "🈶",
    "u6e80": "🈵",
    "u7121": "🈚",
    "u7533": "🈸",
    "u7981": "🈲",
    "u7a7a": "🈳",
    "cl": "🆑",
    "cool": "🆒",
    "free": "🆓",
    "id": "🆔",
    "koko": "🈁",
    "sa": "🈂",
    "new": "🆕",
    "ng": "🆖",
    "ok": "🆗",
    "sos": "🆘",
    "up": "🆙",
    "vs": "🆚",
    "steam_locomotive": "🚂",
    "ramen": "🍜",
    "partly_sunny": "⛅",
    "city_sunrise": "🌇",
    "surfer": "🏄",
    "swimmer": "🏊",
    "shirt": "👕",
    "tshirt": "👕",
    "table_tennis_paddle_and_ball": "🏓",
    "tea": "🍵",
    "tv": "📺",
    "three_button_mouse": "🖱",
    "+1": "👍",
    "thumbsup": "👍",
    "__1": "👎",
    "-1": "👎",
    "thumbsdown": "👎",
    "thunder_cloud_and_rain": "⛈",
    "tiger2": "🐅",
    "tophat": "🎩",
    "top": "🔝",
    "tm": "™",
    "train2": "🚆",
    "triangular_flag_on_post": "🚩",
    "trident": "🔱",
    "twisted_rightwards_arrows": "🔀",
    "unamused": "😒",
    "small_red_triangle": "🔺",
    "arrow_up_small": "🔼",
    "arrow_up_down": "↕",
    "upside__down_face": "🙃",
    "arrow_up": "⬆",
    "v": "✌",
    "vhs": "📼",
    "wc": "🚾",
    "ocean": "🌊",
    "waving_black_flag": "🏴",
    "wave": "👋",
    "waving_white_flag": "🏳",
    "moon": "🌔",
    "scream_cat": "🙀",
    "weary": "😩",
    "weight_lifter": "🏋",
    "whale2": "🐋",
    "wheelchair": "♿",
    "point_down": "👇",
    "grey_exclamation": "❕",
    "white_frowning_face": "☹",
    "white_check_mark": "✅",
    "point_left": "👈",
    "white_medium_small_square": "◽",
    "star": "⭐",
    "grey_question": "❔",
    "point_right": "👉",
    "relaxed": "☺",
    "white_sun_behind_cloud": "🌥",
    "white_sun_behind_cloud_with_rain": "🌦",
    "white_sun_with_small_cloud": "🌤",
    "point_up_2": "👆",
    "point_up": "☝",
    "wind_blowing_face": "🌬",
    "wink": "😉",
    "wolf": "🐺",
    "dancers": "👯",
    "boot": "👢",
    "womans_clothes": "👚",
    "womans_hat": "👒",
    "sandal": "👡",
    "womens": "🚺",
    "worried": "😟",
    "gift": "🎁",
    "zipper__mouth_face": "🤐",
    "regional_indicator_a": "🇦",
    "regional_indicator_b": "🇧",
    "regional_indicator_c": "🇨",
    "regional_indicator_d": "🇩",
    "regional_indicator_e": "🇪",
    "regional_indicator_f": "🇫",
    "regional_indicator_g": "🇬",
    "regional_indicator_h": "🇭",
    "regional_indicator_i": "🇮",
    "regional_indicator_j": "🇯",
    "regional_indicator_k": "🇰",
    "regional_indicator_l": "🇱",
    "regional_indicator_m": "🇲",
    "regional_indicator_n": "🇳",
    "regional_indicator_o": "🇴",
    "regional_indicator_p": "🇵",
    "regional_indicator_q": "🇶",
    "regional_indicator_r": "🇷",
    "regional_indicator_s": "🇸",
    "regional_indicator_t": "🇹",
    "regional_indicator_u": "🇺",
    "regional_indicator_v": "🇻",
    "regional_indicator_w": "🇼",
    "regional_indicator_x": "🇽",
    "regional_indicator_y": "🇾",
    "regional_indicator_z": "🇿",
}
python3.12/site-packages/pip/_vendor/rich/abc.py000064400000001572151732702260015373 0ustar00from abc import ABC


class RichRenderable(ABC):
    """An abstract base class for Rich renderables.

    Note that there is no need to extend this class, the intended use is to check if an
    object supports the Rich renderable protocol. For example::

        if isinstance(my_object, RichRenderable):
            console.print(my_object)

    """

    @classmethod
    def __subclasshook__(cls, other: type) -> bool:
        """Check if this class supports the rich render protocol."""
        return hasattr(other, "__rich_console__") or hasattr(other, "__rich__")


if __name__ == "__main__":  # pragma: no cover
    from pip._vendor.rich.text import Text

    t = Text()
    print(isinstance(Text, RichRenderable))
    print(isinstance(t, RichRenderable))

    class Foo:
        pass

    f = Foo()
    print(isinstance(f, RichRenderable))
    print(isinstance("", RichRenderable))
python3.12/site-packages/pip/_vendor/rich/live_render.py000064400000007123151732702260017142 0ustar00import sys
from typing import Optional, Tuple

if sys.version_info >= (3, 8):
    from typing import Literal
else:
    from pip._vendor.typing_extensions import Literal  # pragma: no cover


from ._loop import loop_last
from .console import Console, ConsoleOptions, RenderableType, RenderResult
from .control import Control
from .segment import ControlType, Segment
from .style import StyleType
from .text import Text

VerticalOverflowMethod = Literal["crop", "ellipsis", "visible"]


class LiveRender:
    """Creates a renderable that may be updated.

    Args:
        renderable (RenderableType): Any renderable object.
        style (StyleType, optional): An optional style to apply to the renderable. Defaults to "".
    """

    def __init__(
        self,
        renderable: RenderableType,
        style: StyleType = "",
        vertical_overflow: VerticalOverflowMethod = "ellipsis",
    ) -> None:
        self.renderable = renderable
        self.style = style
        self.vertical_overflow = vertical_overflow
        self._shape: Optional[Tuple[int, int]] = None

    def set_renderable(self, renderable: RenderableType) -> None:
        """Set a new renderable.

        Args:
            renderable (RenderableType): Any renderable object, including str.
        """
        self.renderable = renderable

    def position_cursor(self) -> Control:
        """Get control codes to move cursor to beginning of live render.

        Returns:
            Control: A control instance that may be printed.
        """
        if self._shape is not None:
            _, height = self._shape
            return Control(
                ControlType.CARRIAGE_RETURN,
                (ControlType.ERASE_IN_LINE, 2),
                *(
                    (
                        (ControlType.CURSOR_UP, 1),
                        (ControlType.ERASE_IN_LINE, 2),
                    )
                    * (height - 1)
                )
            )
        return Control()

    def restore_cursor(self) -> Control:
        """Get control codes to clear the render and restore the cursor to its previous position.

        Returns:
            Control: A Control instance that may be printed.
        """
        if self._shape is not None:
            _, height = self._shape
            return Control(
                ControlType.CARRIAGE_RETURN,
                *((ControlType.CURSOR_UP, 1), (ControlType.ERASE_IN_LINE, 2)) * height
            )
        return Control()

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:

        renderable = self.renderable
        style = console.get_style(self.style)
        lines = console.render_lines(renderable, options, style=style, pad=False)
        shape = Segment.get_shape(lines)

        _, height = shape
        if height > options.size.height:
            if self.vertical_overflow == "crop":
                lines = lines[: options.size.height]
                shape = Segment.get_shape(lines)
            elif self.vertical_overflow == "ellipsis":
                lines = lines[: (options.size.height - 1)]
                overflow_text = Text(
                    "...",
                    overflow="crop",
                    justify="center",
                    end="",
                    style="live.ellipsis",
                )
                lines.append(list(console.render(overflow_text)))
                shape = Segment.get_shape(lines)
        self._shape = shape

        new_line = Segment.line()
        for last, line in loop_last(lines):
            yield from line
            if not last:
                yield new_line
python3.12/site-packages/pip/_vendor/rich/terminal_theme.py000064400000006452151732702260017645 0ustar00from typing import List, Optional, Tuple

from .color_triplet import ColorTriplet
from .palette import Palette

_ColorTuple = Tuple[int, int, int]


class TerminalTheme:
    """A color theme used when exporting console content.

    Args:
        background (Tuple[int, int, int]): The background color.
        foreground (Tuple[int, int, int]): The foreground (text) color.
        normal (List[Tuple[int, int, int]]): A list of 8 normal intensity colors.
        bright (List[Tuple[int, int, int]], optional): A list of 8 bright colors, or None
            to repeat normal intensity. Defaults to None.
    """

    def __init__(
        self,
        background: _ColorTuple,
        foreground: _ColorTuple,
        normal: List[_ColorTuple],
        bright: Optional[List[_ColorTuple]] = None,
    ) -> None:
        self.background_color = ColorTriplet(*background)
        self.foreground_color = ColorTriplet(*foreground)
        self.ansi_colors = Palette(normal + (bright or normal))


DEFAULT_TERMINAL_THEME = TerminalTheme(
    (255, 255, 255),
    (0, 0, 0),
    [
        (0, 0, 0),
        (128, 0, 0),
        (0, 128, 0),
        (128, 128, 0),
        (0, 0, 128),
        (128, 0, 128),
        (0, 128, 128),
        (192, 192, 192),
    ],
    [
        (128, 128, 128),
        (255, 0, 0),
        (0, 255, 0),
        (255, 255, 0),
        (0, 0, 255),
        (255, 0, 255),
        (0, 255, 255),
        (255, 255, 255),
    ],
)

MONOKAI = TerminalTheme(
    (12, 12, 12),
    (217, 217, 217),
    [
        (26, 26, 26),
        (244, 0, 95),
        (152, 224, 36),
        (253, 151, 31),
        (157, 101, 255),
        (244, 0, 95),
        (88, 209, 235),
        (196, 197, 181),
        (98, 94, 76),
    ],
    [
        (244, 0, 95),
        (152, 224, 36),
        (224, 213, 97),
        (157, 101, 255),
        (244, 0, 95),
        (88, 209, 235),
        (246, 246, 239),
    ],
)
DIMMED_MONOKAI = TerminalTheme(
    (25, 25, 25),
    (185, 188, 186),
    [
        (58, 61, 67),
        (190, 63, 72),
        (135, 154, 59),
        (197, 166, 53),
        (79, 118, 161),
        (133, 92, 141),
        (87, 143, 164),
        (185, 188, 186),
        (136, 137, 135),
    ],
    [
        (251, 0, 31),
        (15, 114, 47),
        (196, 112, 51),
        (24, 109, 227),
        (251, 0, 103),
        (46, 112, 109),
        (253, 255, 185),
    ],
)
NIGHT_OWLISH = TerminalTheme(
    (255, 255, 255),
    (64, 63, 83),
    [
        (1, 22, 39),
        (211, 66, 62),
        (42, 162, 152),
        (218, 170, 1),
        (72, 118, 214),
        (64, 63, 83),
        (8, 145, 106),
        (122, 129, 129),
        (122, 129, 129),
    ],
    [
        (247, 110, 110),
        (73, 208, 197),
        (218, 194, 107),
        (92, 167, 228),
        (105, 112, 152),
        (0, 201, 144),
        (152, 159, 177),
    ],
)

SVG_EXPORT_THEME = TerminalTheme(
    (41, 41, 41),
    (197, 200, 198),
    [
        (75, 78, 85),
        (204, 85, 90),
        (152, 168, 75),
        (208, 179, 68),
        (96, 138, 177),
        (152, 114, 159),
        (104, 160, 179),
        (197, 200, 198),
        (154, 155, 153),
    ],
    [
        (255, 38, 39),
        (0, 130, 61),
        (208, 132, 66),
        (25, 132, 233),
        (255, 44, 122),
        (57, 130, 128),
        (253, 253, 197),
    ],
)
python3.12/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-312.pyc000064400000004316151732702260024341 0ustar00�

R`i	�	��ddlZddlZddlZddlZddlZgd�Zejd�Zejdejdejdfd��Zdede
fd�Z	d
d	ejd
eededzddfd�Zy)�N)z/etc/ssl/cert.pemz/etc/pki/tls/cert.pemz"/etc/ssl/certs/ca-certificates.crtz/etc/ssl/ca-bundle.pemz^[0-9a-fA-F]{8}\.[0-9]$�ctx�returnc#�4K�tj�}|js!|jr&t	|j�r|j�n>tD]5}tjj|�s�#|j|��nd��y�w)N)�cafile)�ssl�get_default_verify_pathsr�capath�_capath_contains_certs�set_default_verify_paths�_CA_FILE_CANDIDATES�os�path�isfile�load_verify_locations)r�defaultsrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/truststore/_openssl.py�_configure_contextrsp�����+�+�-�H����8�?�?�/E�h�o�o�/V��$�$�&�
*�F��w�w�~�~�f�%��)�)��)�8��*�

�s�A;B�>Br	c��tjj|�sytj|�D]}tj|�s�yy)zFCheck whether capath exists and contains certs in the expected format.FT)r
r�isdir�listdir�_HASHED_CERT_FILENAME_RE�match)r	�names  rr
r
1s>��
�7�7�=�=�� ���
�
�6�"��#�)�)�$�/��#���ssl_context�
cert_chain�server_hostnamec��y�N�)rrrs   r�_verify_peercerts_implr!;s��	rr)�
contextlibr
�rer�typingr�compiler�contextmanager�
SSLContext�Iteratorr�str�boolr
�list�bytesr!r rr�<module>r-s����	�	�
�
�	��&�2�:�:�&@�A�����
�C�N�N�
�v���t�/D�
��
�4�3��4��#'�	����	��U��	��4�Z�	�
�		rpython3.12/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-312.pyc000064400000001233151732702270024252 0ustar00�

R`i���b�dZddlZejdkred��ddlmZmZmZ[[gd�Z	dZ
y)	z4Verify certificates using native system trust stores�N)��
z(truststore requires Python 3.10 or later�)�
SSLContext�extract_from_ssl�inject_into_ssl)rrrz0.8.0)�__doc__�sys�_sys�version_info�ImportError�_apirrr�__all__�__version__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/truststore/__init__.py�<module>rs:��:�����w��
�@�
A�A�?�?��$�
?���rpython3.12/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-312.pyc000064400000036271151732702270024356 0ustar00�

R`i<D��"�ddlZddlZddlZddlmZddlmZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZddlmZmZmZmZmZmZmZmZmZmZddlmZmZddlmZeZeZ eZ!Gd	�d
e�Z"ee"�Z#ee#�Z$Gd�de�Z%ee%�Z&Gd
�de�Z'Gd�de�Z(eree(Z)nee(�Z)Gd�de�Z*Gd�de�Z+ee+�Z,Gd�de�Z-ee-�Z.Gd�de�Z/ee/�Z0ee0�Z1Gd�de�Z2Gd�de�Z3ee3�Z4Gd�de�Z5ee5�Z6Gd�d e�Z7ee7�Z8ee�Z9dZ:d!Z;d"Z<d#Z=dZ>ed$�Z?d%Z@d&ZAd'ZBd(ZCd)ZDd*ZEd+ZFd,ZGd-ZHd.ZId/ZJd#ZKd0ZLd1ZMd2ZNeBeCzeDzeEzeFzeGzeHzeIzeJzZOed3�ZPed4�ZQd5eRd6ed7ed8efd9�ZSePj�ZTe8e9feT_UeSeT_VePj�ZWeee!ee
feW_Ue eW_XeSeW_VePj�ZYe eeeee$feY_UeeY_XePj�ZZeeefeZ_Ue#eZ_XeSeZ_VePj�Z[ee#ee e)ee
e1fe[_Uee[_XeSe[_VePj�Z\e	e0e4e6fe\_Uee\_XePj�Z]e efe]_Uee]_XeSe]_VePj�Z^e0fe^_UePj�Z_e#fe__UePj�Z`efe`_UeQj�Zaeeeeeee
fea_Ueea_X	dHd:ej�d;ecedd<eedzd8dfd=�Zfd:ej�d>edzd?e d@e
dAe)d<eedzdBegd8dfdC�Zhd:ej�dDecedd?e d@e
dAe)d<eedzdBegd8dfdE�Ziej�dFej�d8ej�dfdG��Zly)I�N)�WinDLL��WinError)
�POINTER�	Structure�c_char_p�c_ulong�c_void_p�	c_wchar_p�cast�create_unicode_buffer�pointer�sizeof)
�BOOL�DWORD�HANDLE�LONG�LPCSTR�LPCVOID�LPCWSTR�
LPFILETIME�LPSTR�LPWSTR)�
TYPE_CHECKING�Any�)�_set_ssl_context_verify_modec�.�eZdZdefdefdefdefdeffZy)�CERT_CONTEXT�dwCertEncodingType�
pbCertEncoded�
cbCertEncoded�	pCertInfo�
hCertStoreN)�__name__�
__module__�__qualname__rr
�
HCERTSTORE�_fields_����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/truststore/_windows.pyrr's1��	�u�%�	�(�#�	�%� �	�h��	�z�"��Hr+rc�(�eZdZdefdee�ffZy)�CERT_ENHKEY_USAGE�cUsageIdentifier�rgpszUsageIdentifierN)r%r&r'rrrr)r*r+r,r.r.5s��	�U�#�	����0��Hr+r.c��eZdZdefdeffZy)�CERT_USAGE_MATCH�dwType�UsageN)r%r&r'rr.r)r*r+r,r2r2?s��	�5��	�#�$��Hr+r2c
�F�eZdZdefdefdefdefdefdefdefdefd	eff	Zy
)�CERT_CHAIN_PARA�cbSize�RequestedUsage�RequestedIssuancePolicy�dwUrlRetrievalTimeout�fCheckRevocationFreshnessTime�dwRevocationFreshnessTime�pftCacheResync�pStrongSignPara�dwStrongSignFlagsN)	r%r&r'rr2rrr
r)r*r+r,r6r6FsS��	�5��	�+�,�	"�$4�5�	 �%�(�	(�$�/�	$�e�,�	�:�&�	�H�%�	�e�$�
�Hr+r6c��eZdZdefdeffZy)�CERT_TRUST_STATUS�
dwErrorStatus�dwInfoStatusN)r%r&r'rr)r*r+r,rArAZs��	�%� �	����Hr+rAc�:�eZdZdefdefdefdefdefdefdeffZ	y)	�CERT_CHAIN_ELEMENTr7�pCertContext�TrustStatus�pRevocationInfo�pIssuanceUsage�pApplicationUsage�pwszExtendedErrorInfoN)
r%r&r'r�
PCERT_CONTEXTrAr
�PCERT_ENHKEY_USAGErr)r*r+r,rErEasD��	�5��	��'�	�)�*�	�H�%�	�-�.�	�0�1�	 �'�*��Hr+rEc�F�eZdZdefdefdefdee�fdefdefdeffZ	y)	�CERT_SIMPLE_CHAINr7rG�cElement�
rgpElement�pTrustListInfo�fHasRevocationFreshnessTimer<N)
r%r&r'rrAr�PCERT_CHAIN_ELEMENTr
rr)r*r+r,rOrOpsH��	�5��	�)�*�	�U��	�w�2�3�4�	�8�$�	&��-�	$�e�,��Hr+rOc	�L�eZdZdefdefdefdee�fdefdefdefdeffZ	y	)
�CERT_CHAIN_CONTEXTr7rG�cChain�rgpChain�cLowerQualityChainContext�rgpLowerQualityChainContextrSr<N)
r%r&r'rrAr�PCERT_SIMPLE_CHAINr
rr)r*r+r,rVrVsP��	�5��	�)�*�	�5��	�W�/�0�1�	$�e�,�	&��1�	&��-�	$�e�,�	�Hr+rVc�(�eZdZdefdefdefdeffZy)� SSL_EXTRA_CERT_CHAIN_POLICY_PARAr7�
dwAuthType�	fdwChecks�pwszServerNameN)r%r&r'rrr)r*r+r,r]r]�s)��	�5��	�u��	�e��	�7�#�	�Hr+r]c�"�eZdZdefdefdeffZy)�CERT_CHAIN_POLICY_PARAr7�dwFlags�pvExtraPolicyParaN)r%r&r'rr
r)r*r+r,rbrb�s!��	�5��	�E��	�h�'��Hr+rbc�.�eZdZdefdefdefdefdeffZy)�CERT_CHAIN_POLICY_STATUSr7�dwError�lChainIndex�
lElementIndex�pvExtraPolicyStatusN)r%r&r'rrr
r)r*r+r,rfrf�s1��	�5��	�E��	���	�$��	��)��Hr+rfc�^�eZdZdefdefdefdefdefdefdefdefd	efd
efdefdefd
eff
Zy)�CERT_CHAIN_ENGINE_CONFIGr7�hRestrictedRoot�hRestrictedTrust�hRestrictedOther�cAdditionalStore�rghAdditionalStorercr:�MaximumCachedCertificates�CycleDetectionModulus�hExclusiveRoot�hExclusiveTrustedPeople�dwExclusiveFlagsN)r%r&r'rr(r
r)r*r+r,rlrl�sq��	�5��	�J�'�	�Z�(�	�Z�(�	�U�#�	�x�(�	�E��	 �%�(�	$�e�,�	 �%�(�	�:�&�	"�J�/�	�U�#��Hr+rlisMemory�s1.3.6.1.5.5.7.3.1ii ����@� �ii�i@�iizcrypt32.dllzkernel32.dll�result�_�args�returnc��|s
t��|S�Nr)rr�r�s   r,�_handle_win_errorr��s����j���Kr+�ssl_context�
cert_chain�server_hostnamec
�X�d}ttdddd�}	|ddD]*}t|ttz|t|�td��,|d}tttz|t|��}t�}d|_	tdzt�|_t�}||_t�}	||	_t#|	�|	_t'|	�}
|j(t*j,zrt.}n&|j(t*j0zrt2}nd}	t5|d|||
||��t=|d�|rt?|�yy#t*j6$r+|j9d��}|rt;|||||
||��n�Y�XwxYw#t=|d�|rt?|�wwxYw)z9Verify the cert_chain from the server using Windows APIs.Nrr)�chain_flagsT)�binary_form) �
CertOpenStore�CERT_STORE_PROV_MEMORY� CertAddEncodedCertificateToStore�X509_ASN_ENCODING�PKCS_7_ASN_ENCODING�len�CERT_STORE_ADD_USE_EXISTING�CertCreateCertificateContextr.r/r�OID_PKIX_KP_SERVER_AUTHr0r2r4r6r8rr7r�verify_flags�ssl�VERIFY_CRL_CHECK_CHAIN�!CERT_CHAIN_REVOCATION_CHECK_CHAIN�VERIFY_CRL_CHECK_LEAF�$CERT_CHAIN_REVOCATION_CHECK_END_CERT�_get_and_verify_cert_chain�SSLCertVerificationError�get_ca_certs�_verify_using_custom_ca_certs�CertCloseStore�CertFreeCertificateContext)
r�r�r�rF�hIntermediateCertStore�
cert_bytes�	leaf_cert�cert_enhkey_usage�cert_usage_match�chain_params�
pChainParar��custom_ca_certss
             r,�_verify_peercerts_implr�Bs����L�*�+A�1�d�A�t�T��G5�$�Q�R�.�J�,�&�!�$7�7���J��+��

�)��q�M�	�3�� 3�3�Y��I��
��
.�/��-.��*�2:�Q�,�@W�1X��.�+�-��!2���&�(��&6��#�$�\�2����\�*�
��#�#�c�&@�&@�@�;�K�
�
%�
%��(A�(A�
A�>�K��K�	�
'���&����'�
�<	�-�q�1��&�|�4���-�+�+�	�
3>�2J�2J� �3K�3�O��-��#�*� ��#� +����	��*	�-�q�1��&�|�4��s*�DF
�E�;F
�F
�	F
�
F
�
F)�hChainEnginer��pPeerCertContextr�r�c
�.�d}	tt��}t||d|||d|�|j}t	�}	t|	�|	_t|	_d|	_	|rt|�|	_t�}
tt|	�t�|
_|j t"j$k(r|
xj&t(zc_|j*s|
xj&t,zc_t|
�|
_t|
�}t/�}t|�|_t|�}
t1t2|||
�|j4}|r�t7d�}t9t:t<zd|d|t|�d�}|dkrd|d�d|j>�d�}n|j@jC�}t#jD|�}||_#||_$|d�	|rtK|j�yy#|rtK|j�wwxYw)NrizCertificate chain policy error z#xz [�])&r�PCERT_CHAIN_CONTEXT�CertGetCertificateChain�contentsr]rr7�AUTHTYPE_SERVERr^r_rr`rbrr
rd�verify_moder��	CERT_NONErc�(CERT_CHAIN_POLICY_VERIFY_MODE_NONE_FLAGS�check_hostname�*CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAGrf� CertVerifyCertificateChainPolicy�CERT_CHAIN_POLICY_SSLrgr
�FormatMessageW�FORMAT_MESSAGE_FROM_SYSTEM�FORMAT_MESSAGE_IGNORE_INSERTSri�value�stripr��verify_message�verify_code�CertFreeCertificateChain)r�r�r�r�r�r�r��ppChainContext�
pChainContext� ssl_extra_cert_chain_policy_para�chain_policy�pPolicyPara�
policy_status�
pPolicyStatus�
error_code�error_message_buf�error_message_chars�
error_message�errs                   r,r�r��s���N�K>� �!4�!6�7������"�����		
�'�/�/�
�,L�+M�(�28�,�3
�(�/�7F�(�3�56�(�2��>G��>X�,�;�-�/��)-��4�5�x�*
��&��"�"�c�m�m�3�� � �$L�L� ��)�)�� � �$N�N� �$�\�2����l�+��0�2�
�%�m�4�
���
�.�
�(�!����		
�#�*�*�
�� 5�d� ;��"0�*�-J�J����!��(�)��#��#�a�'�"A�*�R��PR�S`�Sn�Sn�Ro�op� q�
� 1� 7� 7� =� =� ?�
��.�.�}�=�C�!.�C��(�C�O��4��1�4�$�^�%<�%<�=���>�$�^�%<�%<�=��s�GG:�:Hr�c	���d}ttdddd�}	|D]*}	t|ttz|	t|	�td��,t�}
t|
�|
_	||
_
t|
�}tt��}t||�|j}t|||||||�|rt!|�t#|d�y#|rt!|�t#|d�wxYw)Nr)r�r�r�r�r�r�r�rlrr7rtr�HCERTCHAINENGINE� CertCreateCertificateChainEnginer�r��CertFreeCertificateChainEnginer�)
r�r�r�r�r�r�r�r��hRootCertStorer��cert_chain_engine_config�pConfig�
phChainEngines
             r,r�r��s����L�"�#9�1�d�A�t�L�N�&*�)�J�,��!�$7�7���J��+��

�*�$<�#=� �*0�1I�*J� �'�2@� �/��2�3��� 0� 2�3�
�(���	
�%�-�-��	#���"�����	
��*�<�8��~�q�)���*�<�8��~�q�)�s�BC�C#�ctxc#��K�|j}|j}d|_t|tj�	d��||_t||�y#||_t||�wxYw�w)NF)r�r�rr�r�)r�r�r�s   r,�_configure_contextr� s_�����'�'�N��/�/�K��C�� ��c�m�m�4�7�
�+���$�S�+�6��,���$�S�+�6�s�:A-�A�A-�A*�*A-r�)m�
contextlibr��typing�ctypesrrrrrr	r
rrr
rr�ctypes.wintypesrrrrrrrrrrrr�_ssl_constantsrr�r(�HCRYPTPROV_LEGACYrrL�PCCERT_CONTEXTr.rMr2r6�PCERT_CHAIN_PARArArErTrOr[rVr��PCCERT_CHAIN_CONTEXTr]rb�PCERT_CHAIN_POLICY_PARArf�PCERT_CHAIN_POLICY_STATUSrl�PCERT_CHAIN_ENGINE_CONFIG�PHCERTCHAINENGINEr�r�r�r��USAGE_MATCH_TYPE_ORr�r�r��1CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS�7CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG�'CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAGr��)CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG�,CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG�.CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS�%CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG�%CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAGr�r�r�r�r��wincrypt�kernel32�boolr�r��argtypes�errcheckr��restyper�r�r�r�r�r�r�r�r��
SSLContext�list�bytes�strr��intr�r��contextmanager�Iteratorr�r*r+r,�<module>r�s����
�
���������&�8���
�
����9����%�
���'���	���.�/���y���i�����/����/���	��	��	��0�1��	�	�	��.�/��
��
��0�1���2�3���y���Y��"�"8�9���y��$�$<�=���y��$$�$<�=���,�-���� ��"������"�#7�8��'1�$�$.�!�4>�1�:D�7�*4�'�-7�*�,6�)�/9�,�1;�.�(2�%�(2�%�����'�� *��6�=�>�-�.�1�1�0�	0�
3�3�5�
5�,�,�,�,�)��-� ���.�!���d��s��#��#��$,�#L�#L� ���-� �)�->� �)��&�&�
� �%�):�E�8�L�
��"�
��*�
��#+�#L�#L� ��	��	�	��
-� �)�,0� �(�'�D�D��).��%�(@��%�'4��$�(9��%�"�:�:�������	���	$�� �#'���#4�� �#+�#L�#L� �����	-� �)�,0� �(��(�(��%�u�-������+���#�<�<��%8�$:��!�%�@�@��'4�&6��#�!)�!H�!H��+;�*=��'��(�(��	��	�	�
�	��������#'�O5����O5��U��O5��4�Z�O5�
�	O5�dU>����U>�"�T�)�U>�'�U>��	U>�
!�U>��4�Z�
U>��U>�
�U>�p1*����1*��%�[�1*�'�1*��	1*�
!�1*��4�Z�
1*��1*�
�1*�h���	7�C�N�N�	7�v���t�/D�	7��	7r+python3.12/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-312.pyc000064400000002174151732702270025554 0ustar00�

R`ij���UddlZddlZddlZejZeee�Zejee	d<ee	d<ejjdk(reZdZ
neZeZ
dejdejddfd�Zy)	�N�#_truststore_SSLContext_dunder_class�"_truststore_SSLContext_super_class�cpython�ssl_context�verify_mode�returnc�D�tjj||�y)N)�_original_super_SSLContextr�__set__)rrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/truststore/_ssl_constants.py�_set_ssl_context_verify_moder
s���*�*�2�2�;��L�)�ssl�sys�typing�
SSLContext�_original_SSLContext�superr
�Optional�type�__annotations__�implementation�namerr�object�
VerifyModer
�rr�<module>rs���
�
�
��~�~��"�#7�9M�N��&,�_�_�T�%:�:�%)�(������i�'�)=�&�*.�'�)/�&�*>�'�M����M�.1�n�n�M�	�Mrpython3.12/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-312.pyc000064400000040502151732702270023756 0ustar00�

R`iE�	���ddlZddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZej$�dZeeeej/d���Zedkreded�ded����d	ed
edefd�Zed
d�Zedd�ZeZe
ZeZ e
Z!e
Z"e
Z#e
Z$e
Z%e
Z&eZ'ee&�Z(e
Z)e	Z*ee%�Z+ee!�Z,ee"�Z-ee#�Z.ee$�Z/e
Z0eZ1ee
�Z2ee
�Z3ee
�Z4eZ5eZ6	e)e,gejn_8e2ejn_9e2gejt_8e,ejt_9e*e
gejv_8e-ejv_9e4e.gejx_8e*ejx_9e4egejz_8e*ejz_9e4ee5�gej|_8e*ej|_9e1gej~_8e3ej~_9ee-gej�_8e3ej�_9e(e(ee4�gej�_8e*ej�_9e4ee5�gej�_8e*ej�_9e4e_4e5e_5e*e_*dZCdZDe(gej�_8dej�_9e(gej�_8e'ej�_9e)ee gej�_8e-ej�_9e-e gej�_8eej�_9e-eee gej�_8eej�_9e)eegej�_8e,ej�_9e,gej�_8eej�_9e,gej�_8e
ej�_9e)ee(�ee0gej�_8e.ej�_9e)ee0gej�_8e/ej�_9e/e
gej�_8dej�_9e.gej�_8eej�_9e.egej�_8e
ej�_9e+gej�_8eej�_9e+gej�_8e-ej�_9e)j�ed�e_Ue
j�ed�e_Ve(e_(e.e_.e-e_-e+e_+de*dej�dej�dej�fd�ZYeYej�_ZeYejx_ZeYej�_ZGd�d�Z[de\de,fd�Z]de\de"fd�Z^de-dedzfd �Z_d!e`e\de/fd"�Zaej�d#ej�dej�dfd$��Ze	d)d%ej�d&e`e\d'edzddfd(�Zfy#eW$r
ed�d�wxYw)*�N)	�CDLL�POINTER�c_bool�c_char_p�c_int32�c_long�c_uint32�c_ulong�c_void_p)�find_library�)�_set_ssl_context_verify_mode�.)�
�z,Only OS X 10.8 and newer are supported, not �name�macos10_16_path�returnc��	tdk\r|}nt|�}|st�t|d��S#t$rt	d|�d��d�wxYw)z:Loads a CDLL by name, falling back to known path on 10.16+)r�T)�	use_errnozThe library z failed to loadN)�_mac_version_infor�OSErrorr�ImportError)rr�paths   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/truststore/_macos.py�
_load_cdllrs]��J���(�"�D���%�D���M��D�D�)�)���J��L���o�>�?�T�I�J�s	�+.�A�Securityz6/System/Library/Frameworks/Security.framework/Security�CoreFoundationzB/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation�r�kCFAllocatorDefault�kCFTypeArrayCallBackszError initializing ctypes�result�_�argsc�b�t|�dk(r|Sd}	tj|d�}tj|tj
tj��}tj|tj�}|�Ttjd�}tj||dtj�}|std��|j}|�tj|�	|�|dk(rd|��}t!j"|��#|�tj|�wwxYw)z<
    Raises an error if the OSStatus value is non-zero.
    rN��'Error copying C string from CFStringRef�z8SecureTransport operation returned a non-zero OSStatus: )�intr�SecCopyErrorMessageString�ctypes�castrrr�CFStringGetCStringPtr�CFConst�kCFStringEncodingUTF8�create_string_buffer�CFStringGetCStringr�value�	CFRelease�ssl�SSLError)r#r$r%�error_message_cfstring�error_message_cfstring_c_void_p�message�buffers       r�_handle_osstatusr;�s%���6�{�a����"��!=�!)�!C�!C�F�D�!Q��+1�+�+�"�F�N�N�6�?�?�$C�+
�'�!�6�6�+�W�-J�-J�
���?��0�0��6�F�#�6�6�/����-�-�	�F���G�H�H��l�l�G�"�-��$�$�%;�<���'�R�-�L�V�H�U��

�,�,�w�
���"�-��$�$�%;�<�.�s�CD�D.c�0�eZdZdZed�ZdZdZdZdZ	y)r/zCoreFoundation constantsii���i��i���i����N)
�__name__�
__module__�__qualname__�__doc__�CFStringEncodingr0�#errSecIncompleteCertRevocationCheck�errSecHostNameMismatch�errSecCertificateExpired�errSecNotTrusted��rr/r/	s(��"�,�Z�8��*0�'�#��%���rGr/r3c�^�tjtj|t|��S�N)r�CFDataCreater!�len)r3s r�_bytes_to_cf_data_refrLs&���&�&��*�*�E�3�u�:��rGc��tj|�}tjtj|t
j�}|S)zi
    Given a Python binary data, create a CFString.
    The string must be CFReleased by the caller.
    )r,rr�CFStringCreateWithCStringr!r/r0)r3�c_str�cf_strs   r�_bytes_to_cf_stringrQs>��

�O�O�E�"�E�
�
5�
5��*�*�
��%�%��F�
�MrG�
cf_string_refc� �tj|tj�}|�Tt	j
d�}tj
||dtj�}|std��|j}|�|jd�}|S)z�
    Creates a Unicode string from a CFString object. Used entirely for error
    reporting.
    Yes, it annoys me quite a lot that this function is this complex.
    r'r(zutf-8)
rr.r/r0r,r1r2rr3�decode)rR�stringr:r#s    r�_cf_string_ref_to_strrV(s����
1�
1��w�4�4��F��~��,�,�T�2���2�2��6�4��)F�)F�
����C�D�D�����
�����w�'���MrG�certsc��tjtjdtjtj
��}|st
d��|D]{}d}d}	t|�}tjtj|�}tj||�|rtj|�|s�gtj|��}|S#|rtj|�|rtj|�wwxYw)z�Builds a CFArray of SecCertificateRefs from a list of DER-encoded certificates.
    Responsibility of the caller to call CoreFoundation.CFRelease on the CFArray.
    rzUnable to allocate memory!N)r�CFArrayCreateMutabler!r,�byrefr"�MemoryErrorrLr�SecCertificateCreateWithData�CFArrayAppendValuer4)rW�cf_array�	cert_data�cf_data�sec_cert_refs     r�_der_certs_to_cf_cert_arrayrb?s����2�2��*�*�	����^�9�9�:��H�
��6�7�7��	�����
	7�+�I�6�G�#�@�@��2�2�G��L�
�-�-�h��E���(�(��1���(�(��6���O����(�(��1���(�(��6��s
�AC�1D�ctxc#��K�|j}|j}d|_t|tj�	d��||_t||�y#||_t||�wxYw�w)NF)�check_hostname�verify_moderr5�	CERT_NONE)rcrerfs   r�_configure_contextrh]s_�����'�'�N��/�/�K��C�� ��c�m�m�4�7�
�+���$�S�+�6��,���$�S�+�6�s�:A-�A�A-�A*�*A-�ssl_context�
cert_chain�server_hostnamec�	�d}d}d}d}	|�Kd}	t|jd��}tjd|�}|r,tj|�ntjdd�}|}|jtjzr�tjtjdtjtj��}tj||�tj|�tjt t"z�}	tj||	�tj|	�n(|jtj$zrt'd��d}	t)|�}tj+�}tj-||tj|��|rtj|�	|j/d��}
|
r<d}	t)|�}tj1||�|r,tj|�ntj1|d�tj3�}tj5|tj|��}|dk(rd}
n |dk(rd}
ntj6d|����d}|
s|tj9|�}|j:tj<k7r)|t>j@k(s|t>jBk(rd}
n!|jDs|t>jFk(rd}
|
s�d}	tjI|�}tK|�xsd	}tjM�}tjO|tj|��tjP|�}||_)||_*|�	|rtj|�|rtj|�yy#|rtj|�wwxYw#|rtj|�wwxYw#|rtj|�wwxYw#|rtj|�wwxYw#|rtj|�|rtj|�wwxYw)
N�asciiTrz/VERIFY_CRL_CHECK_LEAF not implemented for macOS)�binary_formr
Fz8Unknown result from Security.SecTrustEvaluateWithError: zCertificate verification failed)+rQ�encoder�SecPolicyCreateSSLrr4�verify_flagsr5�VERIFY_CRL_CHECK_CHAINrYr!r,rZr"r]�SecPolicyCreateRevocation�#kSecRevocationUseAnyAvailableMethod�%kSecRevocationRequirePositiveResponse�VERIFY_CRL_CHECK_LEAF�NotImplementedErrorrb�SecTrustRef�SecTrustCreateWithCertificates�get_ca_certs�SecTrustSetAnchorCertificates�
CFErrorRef�SecTrustEvaluateWithErrorr6�CFErrorGetCoderf�
CERT_REQUIREDr/rErDrerC�CFErrorCopyDescriptionrV�SecTrustResultType�SecTrustGetTrustResult�SSLCertVerificationError�verify_message�verify_code)rirjrkrW�policies�trust�cf_error�cf_str_hostname�
ssl_policy�revocation_policy�ctx_ca_certs_der�ctx_ca_certs�sec_trust_eval_result�
is_trusted�
cf_error_code�cf_error_string_ref�cf_error_message�sec_trust_result_type�errs                   r�_verify_peercerts_implr�js��

�E��H��E��H�B,��&�"�O�
>�"5�o�6L�6L�W�6U�"V��%�8�8���O�
�"�"�,�,�_�=�!�4�4�T�4�@�J����#�#�c�&@�&@�@�%�:�:��2�2�����^�A�A�B��H�

�-�-�h�
�C��$�$�Z�0� (� B� B�3�7�8�!��
�-�-�h�8I�J��$�$�%6�7�
�
%�
%��(A�(A�
A�%�&W�X�X���	0�/�
�;�E��(�(�*�E��3�3��x����e�!4�
���(�(��/�
0;�/G�/G��0H�0
����L�
;�:�:�F���6�6�u�l�K��"�,�,�\�:��2�2�5�$�?�!�,�,�.�� (� B� B��6�<�<��)�!
��
!�A�%��J�
"�a�
'��J��,�,�J�K`�Jc�d��
��
��*�9�9�(�C�M�
�&�&�#�*;�*;�;���!9�!9�9� �G�$D�$D�D�!�
��.�.�!�W�%C�%C�C�!�
��"&��
B�&4�&K�&K�H�&U�#�*�*=�>�9�8�!�)1�(C�(C�(E�%��/�/��6�<�<�(=�>���2�2�3C�D��%5��"�"/����	�+�6��$�$�X�.���$�$�U�+���u#�"�,�,�_�=�#��L��(�(��/��� �"�,�,�\�:� ��~'�"�,�,�-@�A�'����$�$�X�.���$�$�U�+��sg�Q�0O�D4Q�4A	O9�=.Q�,!P�
DQ�%BP3�O6�6Q�9P�Q�P0�0Q�3Q
�
Q�1RrI)g�
contextlibr,�platformr5�typingrrrrrrr	r
r�ctypes.utilr�_ssl_constantsr�mac_ver�_mac_version�tuple�mapr*�splitrr�strrrr�Boolean�CFIndexrA�CFData�CFString�CFArray�CFMutableArray�CFError�CFType�CFTypeID�	CFTypeRef�CFAllocatorRef�OSStatusr|�	CFDataRef�CFStringRef�
CFArrayRef�CFMutableArrayRef�CFArrayCallBacks�
CFOptionFlags�SecCertificateRef�SecPolicyRefrxr��SecTrustOptionFlagsr\�argtypes�restype�SecCertificateCopyDatar+r{�!SecTrustSetAnchorCertificatesOnly�SecTrustEvaluatersrpryr�rtrur4�CFGetTypeIDrNr.r2rJ�CFDataGetLength�CFDataGetBytePtr�
CFArrayCreaterYr]�CFArrayGetCount�CFArrayGetValueAtIndexr~r��in_dllr!r"�AttributeError�Anyr;�errcheckr/�bytesrLrQrV�listrb�contextmanager�
SSLContext�Iteratorrhr�rFrGr�<module>r�s����
��
�
�
�
�
�%�8��x���!�!�$���#�c�<�#5�#5�c�#:�;�<���w��
�
6�7H��7K�6L�A�N_�`a�Nb�Mc�d���
J�S�J�3�J�4�J�"��H�����H���
��
����	����
����
��	�����F�O�	�����
�W�
�
��F�O�	��h���
�W�
�
��N�+�����
��H�%���x� ���h�������y=�6D�i�5P�H�)�)�2�4E�H�)�)�1�0A�/B�H�#�#�,�.7�H�#�#�+�3;�X�2F�H�&�&�/�1<�H�&�&�.�7B�J�6O�H�*�*�3�5=�H�*�*�2�;F��:P�H�.�.�7�9A�H�.�.�6�*5�w�?Q�7R�)S�H���&�(0�H���%�3@�/�H�&�&�/�1=�H�&�&�.�,3�[�+A�H���(�*6�H���'�	�����8�H�+�+�4�
7?�H�+�+�3�	��"�#�0�H�#�#�,�/7�H�#�#�+�&�H��"4�H�� �H��*+�'�,-�)�)2��N���%�'+�N���$�+4�+�N���'�)1�N���&�	���9�N�,�,�5�
8C�N�,�,�4�5@�BR�4S�N�(�(�1�3;�N�(�(�0�	����	2�N�%�%�.�17�N�%�%�-�,:�H�g�+N�N���(�*3�N���'�/8�k�N�"�"�+�-4�N�"�"�*�09�{�N�#�#�,�.6�N�#�#�+�	��	����	-�N� � �)�,6�N� � �(�	���4�N�'�'�0�
3D�N�'�'�/�2C�X�1N�N�%�%�.�04�N�%�%�-�/9�l�N�"�"�+�-4�N�"�"�*�6@�'�5J�N�)�)�2�4<�N�)�)�1�.8�\�N�!�!�*�,3�N�!�!�)�6@�\�N�)�)�2�4?�N�)�)�1�)7�)>�)>��-�*�N�&�,;�8�?�?��/�,�N�(� )�N�� *�N��!,�N�� *�N��2 �X�2 �&�*�*�2 �F�J�J�2 �6�:�:�2 �j4D��'�'�0�2B��&�&�/�+;����(������9���u��������t���.�t�E�{��7H��<���	7�C�N�N�	7�v���t�/D�	7��	7�#'�K,����K,��U��K,��4�Z�K,�
�	K,���=�
�1�
2��<�=�s
�O?W � W/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-312.pyc000064400000036735151732702270023442 0ustar00�

R`i�&���UddlZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
ej�dk(r	ddlm
Z
mZn%ej�dk(r	ddlm
Z
mZnddlm
Z
mZej"rddlmZeezej,ezej,ezZej0ed<eezej4geezfzZej0ed	<dd�Zdd�ZGd
�de
�Zdej>ej@zdedzd
dfd�Z!y)�N�)�_original_SSLContext�_original_super_SSLContext�#_truststore_SSLContext_dunder_class�"_truststore_SSLContext_super_class�Windows)�_configure_context�_verify_peercerts_impl�Darwin)�Buffer�_StrOrBytesPath�
_PasswordType�returnc��ttdt�	ddlmcmcmcm}t|dt�y#t$rYywxYw)zqInjects the :class:`truststore.SSLContext` into the ``ssl``
    module by replacing :class:`ssl.SSLContext`.
    �
SSLContextrN)	�setattr�sslr�pip._vendor.urllib3.util.ssl_�_vendor�urllib3�util�ssl_�ImportError��urllib3_ssls ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/truststore/_api.py�inject_into_sslrs9���C��z�*�
�;�;���\�:�6���
��
�s� 8�	A�Ac��ttdt�	ddlmcmcmcm}t|_y#t$rYywxYw)z@Restores the :class:`ssl.SSLContext` class to its original staterrN)
rrrrrrrrrrrs r�extract_from_sslr.s4���C��3�4�
�;�;�!5�����
��
�s�2�	>�>c���eZdZdZedefd��ZdAdeddfd�Z					dBd	e	jd
e
de
de
d
edzdejdzdejfd�Z			dCdej dej d
e
d
edzdejdzdej"fd�Z			dDdeezej*ezej*ezdzdeezej*ezej*ezdzdej.eddfddfd�Z		dEdededzdedzddfd�Zej8j:fdej8ddfd�Zdej>eddfd�Z d ej>eddfd!�Z!d"eddfd#�Z"dejFfd$�Z$de%eeffd%�Z&de%eeffd&�Z'ejP	dFd'ejRdde*ejFfd(��Z+ejPdFd'ejRdde*efd)��Z+ejPdFd'e
dejFfd*��Z+dGd'e
de*ejFe*ezfd+�Z+ede
fd,��Z,e,jZd-e
ddfd.��Z,ede
fd/��Z.e.jZd-e
ddfd0��Z.edefd1��Z/e/jZd-eddfd2��Z/edej`fd3��Z1e1jZd-ej`ddfd4��Z1edej`fd5��Z2e2jZd-ej`ddfd6��Z2edejffd7��Z4e4jZd-ejfddfd8��Z4ede
fd9��Z5e5jZd-e
ddfd:��Z5edejlfd;��Z7edefd<��Z8edejrfd=��Z:e:jZd-ejrddfd>��Z:edejvfd?��Z<e<jZd-ejvddfd@��Z<y)Hrz=SSLContext API that uses system certificates on all platformsrc��txstS�N)rr��selfs r�	__class__zSSLContext.__class__<s��
3�@�j�@�N�protocolc�x�t|�|_Gd�dtj�}||j_y)Nc� ��eZdZd�fd�Z�xZS)�0SSLContext.__init__.<locals>.TruststoreSSLObjectc�R��t�|��}t||j��|S)N��server_hostname)�super�do_handshake�_verify_peercertsr-)r$�retr%s  �rr/z=SSLContext.__init__.<locals>.TruststoreSSLObject.do_handshakeKs%����g�*�,��!�$��8L�8L�M��
r&�rN)�__name__�
__module__�__qualname__r/�
__classcell__)r%s@r�TruststoreSSLObjectr*Fs
���

�
r&r7)r�_ctxr�	SSLObject�sslobject_class)r$r'r7s   r�__init__zSSLContext.__init__Cs,��(��2��	�	�#�-�-�	�%8��	�	�!r&FT�sock�server_side�do_handshake_on_connect�suppress_ragged_eofsr-�sessionc	���t|j�5|jj||||||��}ddd�	t|��|S#1swY�xYw#t$rj��wxYw)N)r=r-r>r?r@r,)r	r8�wrap_socketr0�	Exception�close)r$r<r=r>r?r-r@�ssl_socks        rrBzSSLContext.wrap_socketRs|�� ��	�	�
*��y�y�,�,��'� /�(?�%9��
-��H�+�	��h��H���+�
*���	��N�N���	�s�"A�
A�A�A7�incoming�outgoingc��t|j�5|jj|||||��}ddd�|S#1swYSxYw)N)r-r=r@)r	r8�wrap_bio)r$rFrGr=r-r@�ssl_objs       rrIzSSLContext.wrap_bionsQ�� ��	�	�
*��i�i�(�(��� /�'��)��G�+���+���s�!A�A�cafile�capath�cadatarc�>�|jj|||��S)N)rKrLrM)r8�load_verify_locations)r$rKrLrMs    rrOz SSLContext.load_verify_locations�s'���y�y�.�.��&��/�
�	
r&�certfile�keyfile�passwordc�>�|jj|||��S)N)rPrQrR)r8�load_cert_chain)r$rPrQrRs    rrTzSSLContext.load_cert_chain�s'���y�y�(�(��w��)�
�	
r&�purposec�8�|jj|�Sr")r8�load_default_certs)r$rUs  rrWzSSLContext.load_default_certs�s���y�y�+�+�G�4�4r&�alpn_protocolsc�8�|jj|�Sr")r8�set_alpn_protocols)r$rXs  rrZzSSLContext.set_alpn_protocols�s���y�y�+�+�N�;�;r&�
npn_protocolsc�8�|jj|�Sr")r8�set_npn_protocols)r$r[s  rr]zSSLContext.set_npn_protocols�s���y�y�*�*�=�9�9r&�_SSLContext__cipherlistc�8�|jj|�Sr")r8�set_ciphers)r$r^s  rr`zSSLContext.set_ciphers�s���y�y�$�$�\�2�2r&c�6�|jj�Sr")r8�get_ciphersr#s rrbzSSLContext.get_ciphers�s���y�y�$�$�&�&r&c�6�|jj�Sr")r8�
session_statsr#s rrdzSSLContext.session_stats�s���y�y�&�&�(�(r&c��t��r"��NotImplementedErrorr#s r�cert_store_statszSSLContext.cert_store_stats����!�#�#r&�binary_formc��yr"��r$rjs  r�get_ca_certszSSLContext.get_ca_certs�s��	r&c��yr"rlrms  rrnzSSLContext.get_ca_certs����r&c��yr"rlrms  rrnzSSLContext.get_ca_certs�rpr&c��t��r"rfrms  rrnzSSLContext.get_ca_certs�rir&c�.�|jjSr"�r8�check_hostnamer#s rruzSSLContext.check_hostname�����y�y�'�'�'r&�valuec�&�||j_yr"rt�r$rws  rruzSSLContext.check_hostname�s��#(��	�	� r&c�.�|jjSr"�r8�hostname_checks_common_namer#s rr|z&SSLContext.hostname_checks_common_name�s���y�y�4�4�4r&c�&�||j_yr"r{rys  rr|z&SSLContext.hostname_checks_common_name�s��05��	�	�-r&c�.�|jjSr"�r8�keylog_filenamer#s rr�zSSLContext.keylog_filename�����y�y�(�(�(r&c�&�||j_yr"rrys  rr�zSSLContext.keylog_filename�s��$)��	�	�!r&c�.�|jjSr")r8�maximum_versionr#s rr�zSSLContext.maximum_version�r�r&c�X�tjj|j|�yr")rr��__set__r8rys  rr�zSSLContext.maximum_version����"�2�2�:�:��I�I�u�	
r&c�.�|jjSr")r8�minimum_versionr#s rr�zSSLContext.minimum_version�r�r&c�X�tjj|j|�yr")rr�r�r8rys  rr�zSSLContext.minimum_version�r�r&c�.�|jjSr")r8�optionsr#s rr�zSSLContext.options�s���y�y� � � r&c�X�tjj|j|�yr")rr�r�r8rys  rr�zSSLContext.options�s��"�*�*�2�2��I�I�u�	
r&c�.�|jjSr"�r8�post_handshake_authr#s rr�zSSLContext.post_handshake_auth�s���y�y�,�,�,r&c�&�||j_yr"r�rys  rr�zSSLContext.post_handshake_auth�s��(-��	�	�%r&c�.�|jjSr")r8r'r#s rr'zSSLContext.protocol�s���y�y�!�!�!r&c�.�|jjSr")r8�security_levelr#s rr�zSSLContext.security_level�rvr&c�.�|jjSr")r8�verify_flagsr#s rr�zSSLContext.verify_flagss���y�y�%�%�%r&c�X�tjj|j|�yr")rr�r�r8rys  rr�zSSLContext.verify_flagss��"�/�/�7�7��I�I�u�	
r&c�.�|jjSr")r8�verify_moder#s rr�zSSLContext.verify_modes���y�y�$�$�$r&c�X�tjj|j|�yr")rr�r�r8rys  rr�zSSLContext.verify_modes��"�.�.�6�6��I�I�u�	
r&r")FTTNN)FNN)NNN)NN).)F)=r3r4r5�__doc__�property�typer%�intr;�socket�bool�strr�
SSLSession�	SSLSocketrB�	MemoryBIOr9rI�bytes�os�PathLike�typing�UnionrOr
rrT�Purpose�SERVER_AUTHrW�IterablerZr]r`�Anyrb�dictrdrh�overload�Literal�listrnru�setterr|r��
TLSVersionr�r��Optionsr�r��
_SSLMethodr'r��VerifyFlagsr��
VerifyModer�rlr&rrr9s���G�
�A�4�A��A�
8��
8��
8�$"�(,�%)�&*�)-���m�m����"&�	�
#���t��
����$�&��

����@"�&*�)-�
��-�-���-�-���	�
�t������$�&�
�

����(NR�MQ�48�	
��e��b�k�k�#�.�.����U�1C�C�d�J�
��e��b�k�k�#�.�.����U�1C�C�d�J�
����S�(�D�0�1�	
�

�
�+/�)-�	
�!�
�!�4�'�
� �$�&�	
�

�
�&)�[�[�%<�%<�5��{�{�5�	
�5�
<�����1E�<�$�<�:�v���s�/C�:��:�3��3��3�'�V�Z�Z�'�)�t�C��H�~�)�$�$�s�C�x�.�$��_�_�36��!�>�>�%�0��	
�f�j�j�	����
�_�_�����t�(<��t�E�{�����_�_����v�z�z����$��$��f�j�j�9I�D�QV�K�9W�$��(��(��(����)�D�)�T�)��)��5�T�5��5�!�'�'�6��6�$�6�(�6��)��)��)����*�S�*�T�*��*��)����)��)����
�S�^�^�
��
��
�
�)����)��)����
�S�^�^�
��
��
�
�!����!��!�
�^�^�
�S�[�[�
�T�
��
�
�-�T�-��-����.��.�$�.� �.��"�#�.�.�"��"��(��(��(��&�c�o�o�&��&����
�#�/�/�
�d�
��
�
�%�S�^�^�%��%����
����
�D�
��
r&r�sock_or_sslobjr-c�,�|}	t|d�s|j}t|d�s�|j�xsd}|D�cgc]!}|j	t
j���#}}t|j||��y#t$rY�dwxYwcc}w)z{
    Verifies the peer certificates from an SSLSocket or SSLObject
    against the certificates in the OS trust store.
    �get_unverified_chainrlr,N)	�hasattr�_sslobj�AttributeErrorr��public_bytes�_ssl�ENCODING_DERr
�context)r�r-�sslobj�unverified_chain�cert�
cert_bytess      rr0r0s���+�F�
��&�"8�9��^�^�F��&�"8�9�	�#�#�%�+���DT�T�CS�4�$�#�#�D�$5�$5�6�CS�J�T�����
�O����
��
��Us�$B�&B�	B�
Br2)"r��platformr�rr�r��_ssl_constantsrrrr�system�_windowsr	r
�_macos�_openssl�
TYPE_CHECKING�pip._vendor.typing_extensionsrr�r�r�r
�	TypeAlias�__annotations__�Callablerrrrr�r9r0rlr&r�<module>r�s��	��
�
�
�����8�?�?��	�!�D�D��X�_�_��(�"�B�B�D�	���4�%(�%�K�"�+�+�c�2B�$B�R�[�[�QV�EW�$W���!�!�W�"%��+�����C�%�K��0P�"P�
�v���P�
�
�[
�3�[
�|��M�M�C�M�M�1��DG�$�J��	�r&python3.12/site-packages/pip/_vendor/truststore/_api.py000064400000023245151732702270017071 0ustar00import os
import platform
import socket
import ssl
import typing

import _ssl  # type: ignore[import]

from ._ssl_constants import (
    _original_SSLContext,
    _original_super_SSLContext,
    _truststore_SSLContext_dunder_class,
    _truststore_SSLContext_super_class,
)

if platform.system() == "Windows":
    from ._windows import _configure_context, _verify_peercerts_impl
elif platform.system() == "Darwin":
    from ._macos import _configure_context, _verify_peercerts_impl
else:
    from ._openssl import _configure_context, _verify_peercerts_impl

if typing.TYPE_CHECKING:
    from pip._vendor.typing_extensions import Buffer

# From typeshed/stdlib/ssl.pyi
_StrOrBytesPath: typing.TypeAlias = str | bytes | os.PathLike[str] | os.PathLike[bytes]
_PasswordType: typing.TypeAlias = str | bytes | typing.Callable[[], str | bytes]


def inject_into_ssl() -> None:
    """Injects the :class:`truststore.SSLContext` into the ``ssl``
    module by replacing :class:`ssl.SSLContext`.
    """
    setattr(ssl, "SSLContext", SSLContext)
    # urllib3 holds on to its own reference of ssl.SSLContext
    # so we need to replace that reference too.
    try:
        import pip._vendor.urllib3.util.ssl_ as urllib3_ssl

        setattr(urllib3_ssl, "SSLContext", SSLContext)
    except ImportError:
        pass


def extract_from_ssl() -> None:
    """Restores the :class:`ssl.SSLContext` class to its original state"""
    setattr(ssl, "SSLContext", _original_SSLContext)
    try:
        import pip._vendor.urllib3.util.ssl_ as urllib3_ssl

        urllib3_ssl.SSLContext = _original_SSLContext
    except ImportError:
        pass


class SSLContext(_truststore_SSLContext_super_class):  # type: ignore[misc]
    """SSLContext API that uses system certificates on all platforms"""

    @property  # type: ignore[misc]
    def __class__(self) -> type:
        # Dirty hack to get around isinstance() checks
        # for ssl.SSLContext instances in aiohttp/trustme
        # when using non-CPython implementations.
        return _truststore_SSLContext_dunder_class or SSLContext

    def __init__(self, protocol: int = None) -> None:  # type: ignore[assignment]
        self._ctx = _original_SSLContext(protocol)

        class TruststoreSSLObject(ssl.SSLObject):
            # This object exists because wrap_bio() doesn't
            # immediately do the handshake so we need to do
            # certificate verifications after SSLObject.do_handshake()

            def do_handshake(self) -> None:
                ret = super().do_handshake()
                _verify_peercerts(self, server_hostname=self.server_hostname)
                return ret

        self._ctx.sslobject_class = TruststoreSSLObject

    def wrap_socket(
        self,
        sock: socket.socket,
        server_side: bool = False,
        do_handshake_on_connect: bool = True,
        suppress_ragged_eofs: bool = True,
        server_hostname: str | None = None,
        session: ssl.SSLSession | None = None,
    ) -> ssl.SSLSocket:
        # Use a context manager here because the
        # inner SSLContext holds on to our state
        # but also does the actual handshake.
        with _configure_context(self._ctx):
            ssl_sock = self._ctx.wrap_socket(
                sock,
                server_side=server_side,
                server_hostname=server_hostname,
                do_handshake_on_connect=do_handshake_on_connect,
                suppress_ragged_eofs=suppress_ragged_eofs,
                session=session,
            )
        try:
            _verify_peercerts(ssl_sock, server_hostname=server_hostname)
        except Exception:
            ssl_sock.close()
            raise
        return ssl_sock

    def wrap_bio(
        self,
        incoming: ssl.MemoryBIO,
        outgoing: ssl.MemoryBIO,
        server_side: bool = False,
        server_hostname: str | None = None,
        session: ssl.SSLSession | None = None,
    ) -> ssl.SSLObject:
        with _configure_context(self._ctx):
            ssl_obj = self._ctx.wrap_bio(
                incoming,
                outgoing,
                server_hostname=server_hostname,
                server_side=server_side,
                session=session,
            )
        return ssl_obj

    def load_verify_locations(
        self,
        cafile: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None = None,
        capath: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None = None,
        cadata: typing.Union[str, "Buffer", None] = None,
    ) -> None:
        return self._ctx.load_verify_locations(
            cafile=cafile, capath=capath, cadata=cadata
        )

    def load_cert_chain(
        self,
        certfile: _StrOrBytesPath,
        keyfile: _StrOrBytesPath | None = None,
        password: _PasswordType | None = None,
    ) -> None:
        return self._ctx.load_cert_chain(
            certfile=certfile, keyfile=keyfile, password=password
        )

    def load_default_certs(
        self, purpose: ssl.Purpose = ssl.Purpose.SERVER_AUTH
    ) -> None:
        return self._ctx.load_default_certs(purpose)

    def set_alpn_protocols(self, alpn_protocols: typing.Iterable[str]) -> None:
        return self._ctx.set_alpn_protocols(alpn_protocols)

    def set_npn_protocols(self, npn_protocols: typing.Iterable[str]) -> None:
        return self._ctx.set_npn_protocols(npn_protocols)

    def set_ciphers(self, __cipherlist: str) -> None:
        return self._ctx.set_ciphers(__cipherlist)

    def get_ciphers(self) -> typing.Any:
        return self._ctx.get_ciphers()

    def session_stats(self) -> dict[str, int]:
        return self._ctx.session_stats()

    def cert_store_stats(self) -> dict[str, int]:
        raise NotImplementedError()

    @typing.overload
    def get_ca_certs(
        self, binary_form: typing.Literal[False] = ...
    ) -> list[typing.Any]:
        ...

    @typing.overload
    def get_ca_certs(self, binary_form: typing.Literal[True] = ...) -> list[bytes]:
        ...

    @typing.overload
    def get_ca_certs(self, binary_form: bool = ...) -> typing.Any:
        ...

    def get_ca_certs(self, binary_form: bool = False) -> list[typing.Any] | list[bytes]:
        raise NotImplementedError()

    @property
    def check_hostname(self) -> bool:
        return self._ctx.check_hostname

    @check_hostname.setter
    def check_hostname(self, value: bool) -> None:
        self._ctx.check_hostname = value

    @property
    def hostname_checks_common_name(self) -> bool:
        return self._ctx.hostname_checks_common_name

    @hostname_checks_common_name.setter
    def hostname_checks_common_name(self, value: bool) -> None:
        self._ctx.hostname_checks_common_name = value

    @property
    def keylog_filename(self) -> str:
        return self._ctx.keylog_filename

    @keylog_filename.setter
    def keylog_filename(self, value: str) -> None:
        self._ctx.keylog_filename = value

    @property
    def maximum_version(self) -> ssl.TLSVersion:
        return self._ctx.maximum_version

    @maximum_version.setter
    def maximum_version(self, value: ssl.TLSVersion) -> None:
        _original_super_SSLContext.maximum_version.__set__(  # type: ignore[attr-defined]
            self._ctx, value
        )

    @property
    def minimum_version(self) -> ssl.TLSVersion:
        return self._ctx.minimum_version

    @minimum_version.setter
    def minimum_version(self, value: ssl.TLSVersion) -> None:
        _original_super_SSLContext.minimum_version.__set__(  # type: ignore[attr-defined]
            self._ctx, value
        )

    @property
    def options(self) -> ssl.Options:
        return self._ctx.options

    @options.setter
    def options(self, value: ssl.Options) -> None:
        _original_super_SSLContext.options.__set__(  # type: ignore[attr-defined]
            self._ctx, value
        )

    @property
    def post_handshake_auth(self) -> bool:
        return self._ctx.post_handshake_auth

    @post_handshake_auth.setter
    def post_handshake_auth(self, value: bool) -> None:
        self._ctx.post_handshake_auth = value

    @property
    def protocol(self) -> ssl._SSLMethod:
        return self._ctx.protocol

    @property
    def security_level(self) -> int:
        return self._ctx.security_level

    @property
    def verify_flags(self) -> ssl.VerifyFlags:
        return self._ctx.verify_flags

    @verify_flags.setter
    def verify_flags(self, value: ssl.VerifyFlags) -> None:
        _original_super_SSLContext.verify_flags.__set__(  # type: ignore[attr-defined]
            self._ctx, value
        )

    @property
    def verify_mode(self) -> ssl.VerifyMode:
        return self._ctx.verify_mode

    @verify_mode.setter
    def verify_mode(self, value: ssl.VerifyMode) -> None:
        _original_super_SSLContext.verify_mode.__set__(  # type: ignore[attr-defined]
            self._ctx, value
        )


def _verify_peercerts(
    sock_or_sslobj: ssl.SSLSocket | ssl.SSLObject, server_hostname: str | None
) -> None:
    """
    Verifies the peer certificates from an SSLSocket or SSLObject
    against the certificates in the OS trust store.
    """
    sslobj: ssl.SSLObject = sock_or_sslobj  # type: ignore[assignment]
    try:
        while not hasattr(sslobj, "get_unverified_chain"):
            sslobj = sslobj._sslobj  # type: ignore[attr-defined]
    except AttributeError:
        pass

    # SSLObject.get_unverified_chain() returns 'None'
    # if the peer sends no certificates. This is common
    # for the server-side scenario.
    unverified_chain: typing.Sequence[_ssl.Certificate] = (
        sslobj.get_unverified_chain() or ()  # type: ignore[attr-defined]
    )
    cert_bytes = [cert.public_bytes(_ssl.ENCODING_DER) for cert in unverified_chain]
    _verify_peercerts_impl(
        sock_or_sslobj.context, cert_bytes, server_hostname=server_hostname
    )
python3.12/site-packages/pip/_vendor/truststore/_windows.py000064400000042074151732702270020013 0ustar00import contextlib
import ssl
import typing
from ctypes import WinDLL  # type: ignore
from ctypes import WinError  # type: ignore
from ctypes import (
    POINTER,
    Structure,
    c_char_p,
    c_ulong,
    c_void_p,
    c_wchar_p,
    cast,
    create_unicode_buffer,
    pointer,
    sizeof,
)
from ctypes.wintypes import (
    BOOL,
    DWORD,
    HANDLE,
    LONG,
    LPCSTR,
    LPCVOID,
    LPCWSTR,
    LPFILETIME,
    LPSTR,
    LPWSTR,
)
from typing import TYPE_CHECKING, Any

from ._ssl_constants import _set_ssl_context_verify_mode

HCERTCHAINENGINE = HANDLE
HCERTSTORE = HANDLE
HCRYPTPROV_LEGACY = HANDLE


class CERT_CONTEXT(Structure):
    _fields_ = (
        ("dwCertEncodingType", DWORD),
        ("pbCertEncoded", c_void_p),
        ("cbCertEncoded", DWORD),
        ("pCertInfo", c_void_p),
        ("hCertStore", HCERTSTORE),
    )


PCERT_CONTEXT = POINTER(CERT_CONTEXT)
PCCERT_CONTEXT = POINTER(PCERT_CONTEXT)


class CERT_ENHKEY_USAGE(Structure):
    _fields_ = (
        ("cUsageIdentifier", DWORD),
        ("rgpszUsageIdentifier", POINTER(LPSTR)),
    )


PCERT_ENHKEY_USAGE = POINTER(CERT_ENHKEY_USAGE)


class CERT_USAGE_MATCH(Structure):
    _fields_ = (
        ("dwType", DWORD),
        ("Usage", CERT_ENHKEY_USAGE),
    )


class CERT_CHAIN_PARA(Structure):
    _fields_ = (
        ("cbSize", DWORD),
        ("RequestedUsage", CERT_USAGE_MATCH),
        ("RequestedIssuancePolicy", CERT_USAGE_MATCH),
        ("dwUrlRetrievalTimeout", DWORD),
        ("fCheckRevocationFreshnessTime", BOOL),
        ("dwRevocationFreshnessTime", DWORD),
        ("pftCacheResync", LPFILETIME),
        ("pStrongSignPara", c_void_p),
        ("dwStrongSignFlags", DWORD),
    )


if TYPE_CHECKING:
    PCERT_CHAIN_PARA = pointer[CERT_CHAIN_PARA]  # type: ignore[misc]
else:
    PCERT_CHAIN_PARA = POINTER(CERT_CHAIN_PARA)


class CERT_TRUST_STATUS(Structure):
    _fields_ = (
        ("dwErrorStatus", DWORD),
        ("dwInfoStatus", DWORD),
    )


class CERT_CHAIN_ELEMENT(Structure):
    _fields_ = (
        ("cbSize", DWORD),
        ("pCertContext", PCERT_CONTEXT),
        ("TrustStatus", CERT_TRUST_STATUS),
        ("pRevocationInfo", c_void_p),
        ("pIssuanceUsage", PCERT_ENHKEY_USAGE),
        ("pApplicationUsage", PCERT_ENHKEY_USAGE),
        ("pwszExtendedErrorInfo", LPCWSTR),
    )


PCERT_CHAIN_ELEMENT = POINTER(CERT_CHAIN_ELEMENT)


class CERT_SIMPLE_CHAIN(Structure):
    _fields_ = (
        ("cbSize", DWORD),
        ("TrustStatus", CERT_TRUST_STATUS),
        ("cElement", DWORD),
        ("rgpElement", POINTER(PCERT_CHAIN_ELEMENT)),
        ("pTrustListInfo", c_void_p),
        ("fHasRevocationFreshnessTime", BOOL),
        ("dwRevocationFreshnessTime", DWORD),
    )


PCERT_SIMPLE_CHAIN = POINTER(CERT_SIMPLE_CHAIN)


class CERT_CHAIN_CONTEXT(Structure):
    _fields_ = (
        ("cbSize", DWORD),
        ("TrustStatus", CERT_TRUST_STATUS),
        ("cChain", DWORD),
        ("rgpChain", POINTER(PCERT_SIMPLE_CHAIN)),
        ("cLowerQualityChainContext", DWORD),
        ("rgpLowerQualityChainContext", c_void_p),
        ("fHasRevocationFreshnessTime", BOOL),
        ("dwRevocationFreshnessTime", DWORD),
    )


PCERT_CHAIN_CONTEXT = POINTER(CERT_CHAIN_CONTEXT)
PCCERT_CHAIN_CONTEXT = POINTER(PCERT_CHAIN_CONTEXT)


class SSL_EXTRA_CERT_CHAIN_POLICY_PARA(Structure):
    _fields_ = (
        ("cbSize", DWORD),
        ("dwAuthType", DWORD),
        ("fdwChecks", DWORD),
        ("pwszServerName", LPCWSTR),
    )


class CERT_CHAIN_POLICY_PARA(Structure):
    _fields_ = (
        ("cbSize", DWORD),
        ("dwFlags", DWORD),
        ("pvExtraPolicyPara", c_void_p),
    )


PCERT_CHAIN_POLICY_PARA = POINTER(CERT_CHAIN_POLICY_PARA)


class CERT_CHAIN_POLICY_STATUS(Structure):
    _fields_ = (
        ("cbSize", DWORD),
        ("dwError", DWORD),
        ("lChainIndex", LONG),
        ("lElementIndex", LONG),
        ("pvExtraPolicyStatus", c_void_p),
    )


PCERT_CHAIN_POLICY_STATUS = POINTER(CERT_CHAIN_POLICY_STATUS)


class CERT_CHAIN_ENGINE_CONFIG(Structure):
    _fields_ = (
        ("cbSize", DWORD),
        ("hRestrictedRoot", HCERTSTORE),
        ("hRestrictedTrust", HCERTSTORE),
        ("hRestrictedOther", HCERTSTORE),
        ("cAdditionalStore", DWORD),
        ("rghAdditionalStore", c_void_p),
        ("dwFlags", DWORD),
        ("dwUrlRetrievalTimeout", DWORD),
        ("MaximumCachedCertificates", DWORD),
        ("CycleDetectionModulus", DWORD),
        ("hExclusiveRoot", HCERTSTORE),
        ("hExclusiveTrustedPeople", HCERTSTORE),
        ("dwExclusiveFlags", DWORD),
    )


PCERT_CHAIN_ENGINE_CONFIG = POINTER(CERT_CHAIN_ENGINE_CONFIG)
PHCERTCHAINENGINE = POINTER(HCERTCHAINENGINE)

X509_ASN_ENCODING = 0x00000001
PKCS_7_ASN_ENCODING = 0x00010000
CERT_STORE_PROV_MEMORY = b"Memory"
CERT_STORE_ADD_USE_EXISTING = 2
USAGE_MATCH_TYPE_OR = 1
OID_PKIX_KP_SERVER_AUTH = c_char_p(b"1.3.6.1.5.5.7.3.1")
CERT_CHAIN_REVOCATION_CHECK_END_CERT = 0x10000000
CERT_CHAIN_REVOCATION_CHECK_CHAIN = 0x20000000
CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS = 0x00000007
CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG = 0x00000008
CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG = 0x00000010
CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG = 0x00000040
CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG = 0x00000020
CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG = 0x00000080
CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS = 0x00000F00
CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG = 0x00008000
CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG = 0x00004000
AUTHTYPE_SERVER = 2
CERT_CHAIN_POLICY_SSL = 4
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000
FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200

# Flags to set for SSLContext.verify_mode=CERT_NONE
CERT_CHAIN_POLICY_VERIFY_MODE_NONE_FLAGS = (
    CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS
    | CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG
    | CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG
    | CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG
    | CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG
    | CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG
    | CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS
    | CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG
    | CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG
)

wincrypt = WinDLL("crypt32.dll")
kernel32 = WinDLL("kernel32.dll")


def _handle_win_error(result: bool, _: Any, args: Any) -> Any:
    if not result:
        # Note, actually raises OSError after calling GetLastError and FormatMessage
        raise WinError()
    return args


CertCreateCertificateChainEngine = wincrypt.CertCreateCertificateChainEngine
CertCreateCertificateChainEngine.argtypes = (
    PCERT_CHAIN_ENGINE_CONFIG,
    PHCERTCHAINENGINE,
)
CertCreateCertificateChainEngine.errcheck = _handle_win_error

CertOpenStore = wincrypt.CertOpenStore
CertOpenStore.argtypes = (LPCSTR, DWORD, HCRYPTPROV_LEGACY, DWORD, c_void_p)
CertOpenStore.restype = HCERTSTORE
CertOpenStore.errcheck = _handle_win_error

CertAddEncodedCertificateToStore = wincrypt.CertAddEncodedCertificateToStore
CertAddEncodedCertificateToStore.argtypes = (
    HCERTSTORE,
    DWORD,
    c_char_p,
    DWORD,
    DWORD,
    PCCERT_CONTEXT,
)
CertAddEncodedCertificateToStore.restype = BOOL

CertCreateCertificateContext = wincrypt.CertCreateCertificateContext
CertCreateCertificateContext.argtypes = (DWORD, c_char_p, DWORD)
CertCreateCertificateContext.restype = PCERT_CONTEXT
CertCreateCertificateContext.errcheck = _handle_win_error

CertGetCertificateChain = wincrypt.CertGetCertificateChain
CertGetCertificateChain.argtypes = (
    HCERTCHAINENGINE,
    PCERT_CONTEXT,
    LPFILETIME,
    HCERTSTORE,
    PCERT_CHAIN_PARA,
    DWORD,
    c_void_p,
    PCCERT_CHAIN_CONTEXT,
)
CertGetCertificateChain.restype = BOOL
CertGetCertificateChain.errcheck = _handle_win_error

CertVerifyCertificateChainPolicy = wincrypt.CertVerifyCertificateChainPolicy
CertVerifyCertificateChainPolicy.argtypes = (
    c_ulong,
    PCERT_CHAIN_CONTEXT,
    PCERT_CHAIN_POLICY_PARA,
    PCERT_CHAIN_POLICY_STATUS,
)
CertVerifyCertificateChainPolicy.restype = BOOL

CertCloseStore = wincrypt.CertCloseStore
CertCloseStore.argtypes = (HCERTSTORE, DWORD)
CertCloseStore.restype = BOOL
CertCloseStore.errcheck = _handle_win_error

CertFreeCertificateChain = wincrypt.CertFreeCertificateChain
CertFreeCertificateChain.argtypes = (PCERT_CHAIN_CONTEXT,)

CertFreeCertificateContext = wincrypt.CertFreeCertificateContext
CertFreeCertificateContext.argtypes = (PCERT_CONTEXT,)

CertFreeCertificateChainEngine = wincrypt.CertFreeCertificateChainEngine
CertFreeCertificateChainEngine.argtypes = (HCERTCHAINENGINE,)

FormatMessageW = kernel32.FormatMessageW
FormatMessageW.argtypes = (
    DWORD,
    LPCVOID,
    DWORD,
    DWORD,
    LPWSTR,
    DWORD,
    c_void_p,
)
FormatMessageW.restype = DWORD


def _verify_peercerts_impl(
    ssl_context: ssl.SSLContext,
    cert_chain: list[bytes],
    server_hostname: str | None = None,
) -> None:
    """Verify the cert_chain from the server using Windows APIs."""
    pCertContext = None
    hIntermediateCertStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, None, 0, None)
    try:
        # Add intermediate certs to an in-memory cert store
        for cert_bytes in cert_chain[1:]:
            CertAddEncodedCertificateToStore(
                hIntermediateCertStore,
                X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
                cert_bytes,
                len(cert_bytes),
                CERT_STORE_ADD_USE_EXISTING,
                None,
            )

        # Cert context for leaf cert
        leaf_cert = cert_chain[0]
        pCertContext = CertCreateCertificateContext(
            X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, leaf_cert, len(leaf_cert)
        )

        # Chain params to match certs for serverAuth extended usage
        cert_enhkey_usage = CERT_ENHKEY_USAGE()
        cert_enhkey_usage.cUsageIdentifier = 1
        cert_enhkey_usage.rgpszUsageIdentifier = (c_char_p * 1)(OID_PKIX_KP_SERVER_AUTH)
        cert_usage_match = CERT_USAGE_MATCH()
        cert_usage_match.Usage = cert_enhkey_usage
        chain_params = CERT_CHAIN_PARA()
        chain_params.RequestedUsage = cert_usage_match
        chain_params.cbSize = sizeof(chain_params)
        pChainPara = pointer(chain_params)

        if ssl_context.verify_flags & ssl.VERIFY_CRL_CHECK_CHAIN:
            chain_flags = CERT_CHAIN_REVOCATION_CHECK_CHAIN
        elif ssl_context.verify_flags & ssl.VERIFY_CRL_CHECK_LEAF:
            chain_flags = CERT_CHAIN_REVOCATION_CHECK_END_CERT
        else:
            chain_flags = 0

        try:
            # First attempt to verify using the default Windows system trust roots
            # (default chain engine).
            _get_and_verify_cert_chain(
                ssl_context,
                None,
                hIntermediateCertStore,
                pCertContext,
                pChainPara,
                server_hostname,
                chain_flags=chain_flags,
            )
        except ssl.SSLCertVerificationError:
            # If that fails but custom CA certs have been added
            # to the SSLContext using load_verify_locations,
            # try verifying using a custom chain engine
            # that trusts the custom CA certs.
            custom_ca_certs: list[bytes] | None = ssl_context.get_ca_certs(
                binary_form=True
            )
            if custom_ca_certs:
                _verify_using_custom_ca_certs(
                    ssl_context,
                    custom_ca_certs,
                    hIntermediateCertStore,
                    pCertContext,
                    pChainPara,
                    server_hostname,
                    chain_flags=chain_flags,
                )
            else:
                raise
    finally:
        CertCloseStore(hIntermediateCertStore, 0)
        if pCertContext:
            CertFreeCertificateContext(pCertContext)


def _get_and_verify_cert_chain(
    ssl_context: ssl.SSLContext,
    hChainEngine: HCERTCHAINENGINE | None,
    hIntermediateCertStore: HCERTSTORE,
    pPeerCertContext: c_void_p,
    pChainPara: PCERT_CHAIN_PARA,  # type: ignore[valid-type]
    server_hostname: str | None,
    chain_flags: int,
) -> None:
    ppChainContext = None
    try:
        # Get cert chain
        ppChainContext = pointer(PCERT_CHAIN_CONTEXT())
        CertGetCertificateChain(
            hChainEngine,  # chain engine
            pPeerCertContext,  # leaf cert context
            None,  # current system time
            hIntermediateCertStore,  # additional in-memory cert store
            pChainPara,  # chain-building parameters
            chain_flags,
            None,  # reserved
            ppChainContext,  # the resulting chain context
        )
        pChainContext = ppChainContext.contents

        # Verify cert chain
        ssl_extra_cert_chain_policy_para = SSL_EXTRA_CERT_CHAIN_POLICY_PARA()
        ssl_extra_cert_chain_policy_para.cbSize = sizeof(
            ssl_extra_cert_chain_policy_para
        )
        ssl_extra_cert_chain_policy_para.dwAuthType = AUTHTYPE_SERVER
        ssl_extra_cert_chain_policy_para.fdwChecks = 0
        if server_hostname:
            ssl_extra_cert_chain_policy_para.pwszServerName = c_wchar_p(server_hostname)

        chain_policy = CERT_CHAIN_POLICY_PARA()
        chain_policy.pvExtraPolicyPara = cast(
            pointer(ssl_extra_cert_chain_policy_para), c_void_p
        )
        if ssl_context.verify_mode == ssl.CERT_NONE:
            chain_policy.dwFlags |= CERT_CHAIN_POLICY_VERIFY_MODE_NONE_FLAGS
        if not ssl_context.check_hostname:
            chain_policy.dwFlags |= CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG
        chain_policy.cbSize = sizeof(chain_policy)

        pPolicyPara = pointer(chain_policy)
        policy_status = CERT_CHAIN_POLICY_STATUS()
        policy_status.cbSize = sizeof(policy_status)
        pPolicyStatus = pointer(policy_status)
        CertVerifyCertificateChainPolicy(
            CERT_CHAIN_POLICY_SSL,
            pChainContext,
            pPolicyPara,
            pPolicyStatus,
        )

        # Check status
        error_code = policy_status.dwError
        if error_code:
            # Try getting a human readable message for an error code.
            error_message_buf = create_unicode_buffer(1024)
            error_message_chars = FormatMessageW(
                FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
                None,
                error_code,
                0,
                error_message_buf,
                sizeof(error_message_buf),
                None,
            )

            # See if we received a message for the error,
            # otherwise we use a generic error with the
            # error code and hope that it's search-able.
            if error_message_chars <= 0:
                error_message = f"Certificate chain policy error {error_code:#x} [{policy_status.lElementIndex}]"
            else:
                error_message = error_message_buf.value.strip()

            err = ssl.SSLCertVerificationError(error_message)
            err.verify_message = error_message
            err.verify_code = error_code
            raise err from None
    finally:
        if ppChainContext:
            CertFreeCertificateChain(ppChainContext.contents)


def _verify_using_custom_ca_certs(
    ssl_context: ssl.SSLContext,
    custom_ca_certs: list[bytes],
    hIntermediateCertStore: HCERTSTORE,
    pPeerCertContext: c_void_p,
    pChainPara: PCERT_CHAIN_PARA,  # type: ignore[valid-type]
    server_hostname: str | None,
    chain_flags: int,
) -> None:
    hChainEngine = None
    hRootCertStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, None, 0, None)
    try:
        # Add custom CA certs to an in-memory cert store
        for cert_bytes in custom_ca_certs:
            CertAddEncodedCertificateToStore(
                hRootCertStore,
                X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
                cert_bytes,
                len(cert_bytes),
                CERT_STORE_ADD_USE_EXISTING,
                None,
            )

        # Create a custom cert chain engine which exclusively trusts
        # certs from our hRootCertStore
        cert_chain_engine_config = CERT_CHAIN_ENGINE_CONFIG()
        cert_chain_engine_config.cbSize = sizeof(cert_chain_engine_config)
        cert_chain_engine_config.hExclusiveRoot = hRootCertStore
        pConfig = pointer(cert_chain_engine_config)
        phChainEngine = pointer(HCERTCHAINENGINE())
        CertCreateCertificateChainEngine(
            pConfig,
            phChainEngine,
        )
        hChainEngine = phChainEngine.contents

        # Get and verify a cert chain using the custom chain engine
        _get_and_verify_cert_chain(
            ssl_context,
            hChainEngine,
            hIntermediateCertStore,
            pPeerCertContext,
            pChainPara,
            server_hostname,
            chain_flags,
        )
    finally:
        if hChainEngine:
            CertFreeCertificateChainEngine(hChainEngine)
        CertCloseStore(hRootCertStore, 0)


@contextlib.contextmanager
def _configure_context(ctx: ssl.SSLContext) -> typing.Iterator[None]:
    check_hostname = ctx.check_hostname
    verify_mode = ctx.verify_mode
    ctx.check_hostname = False
    _set_ssl_context_verify_mode(ctx, ssl.CERT_NONE)
    try:
        yield
    finally:
        ctx.check_hostname = check_hostname
        _set_ssl_context_verify_mode(ctx, verify_mode)
python3.12/site-packages/pip/_vendor/truststore/__init__.py000064400000000623151732702270017713 0ustar00"""Verify certificates using native system trust stores"""

import sys as _sys

if _sys.version_info < (3, 10):
    raise ImportError("truststore requires Python 3.10 or later")

from ._api import SSLContext, extract_from_ssl, inject_into_ssl  # noqa: E402

del _api, _sys  # type: ignore[name-defined] # noqa: F821

__all__ = ["SSLContext", "inject_into_ssl", "extract_from_ssl"]
__version__ = "0.8.0"
python3.12/site-packages/pip/_vendor/truststore/_macos.py000064400000042436151732702270017425 0ustar00import contextlib
import ctypes
import platform
import ssl
import typing
from ctypes import (
    CDLL,
    POINTER,
    c_bool,
    c_char_p,
    c_int32,
    c_long,
    c_uint32,
    c_ulong,
    c_void_p,
)
from ctypes.util import find_library

from ._ssl_constants import _set_ssl_context_verify_mode

_mac_version = platform.mac_ver()[0]
_mac_version_info = tuple(map(int, _mac_version.split(".")))
if _mac_version_info < (10, 8):
    raise ImportError(
        f"Only OS X 10.8 and newer are supported, not {_mac_version_info[0]}.{_mac_version_info[1]}"
    )


def _load_cdll(name: str, macos10_16_path: str) -> CDLL:
    """Loads a CDLL by name, falling back to known path on 10.16+"""
    try:
        # Big Sur is technically 11 but we use 10.16 due to the Big Sur
        # beta being labeled as 10.16.
        path: str | None
        if _mac_version_info >= (10, 16):
            path = macos10_16_path
        else:
            path = find_library(name)
        if not path:
            raise OSError  # Caught and reraised as 'ImportError'
        return CDLL(path, use_errno=True)
    except OSError:
        raise ImportError(f"The library {name} failed to load") from None


Security = _load_cdll(
    "Security", "/System/Library/Frameworks/Security.framework/Security"
)
CoreFoundation = _load_cdll(
    "CoreFoundation",
    "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation",
)

Boolean = c_bool
CFIndex = c_long
CFStringEncoding = c_uint32
CFData = c_void_p
CFString = c_void_p
CFArray = c_void_p
CFMutableArray = c_void_p
CFError = c_void_p
CFType = c_void_p
CFTypeID = c_ulong
CFTypeRef = POINTER(CFType)
CFAllocatorRef = c_void_p

OSStatus = c_int32

CFErrorRef = POINTER(CFError)
CFDataRef = POINTER(CFData)
CFStringRef = POINTER(CFString)
CFArrayRef = POINTER(CFArray)
CFMutableArrayRef = POINTER(CFMutableArray)
CFArrayCallBacks = c_void_p
CFOptionFlags = c_uint32

SecCertificateRef = POINTER(c_void_p)
SecPolicyRef = POINTER(c_void_p)
SecTrustRef = POINTER(c_void_p)
SecTrustResultType = c_uint32
SecTrustOptionFlags = c_uint32

try:
    Security.SecCertificateCreateWithData.argtypes = [CFAllocatorRef, CFDataRef]
    Security.SecCertificateCreateWithData.restype = SecCertificateRef

    Security.SecCertificateCopyData.argtypes = [SecCertificateRef]
    Security.SecCertificateCopyData.restype = CFDataRef

    Security.SecCopyErrorMessageString.argtypes = [OSStatus, c_void_p]
    Security.SecCopyErrorMessageString.restype = CFStringRef

    Security.SecTrustSetAnchorCertificates.argtypes = [SecTrustRef, CFArrayRef]
    Security.SecTrustSetAnchorCertificates.restype = OSStatus

    Security.SecTrustSetAnchorCertificatesOnly.argtypes = [SecTrustRef, Boolean]
    Security.SecTrustSetAnchorCertificatesOnly.restype = OSStatus

    Security.SecTrustEvaluate.argtypes = [SecTrustRef, POINTER(SecTrustResultType)]
    Security.SecTrustEvaluate.restype = OSStatus

    Security.SecPolicyCreateRevocation.argtypes = [CFOptionFlags]
    Security.SecPolicyCreateRevocation.restype = SecPolicyRef

    Security.SecPolicyCreateSSL.argtypes = [Boolean, CFStringRef]
    Security.SecPolicyCreateSSL.restype = SecPolicyRef

    Security.SecTrustCreateWithCertificates.argtypes = [
        CFTypeRef,
        CFTypeRef,
        POINTER(SecTrustRef),
    ]
    Security.SecTrustCreateWithCertificates.restype = OSStatus

    Security.SecTrustGetTrustResult.argtypes = [
        SecTrustRef,
        POINTER(SecTrustResultType),
    ]
    Security.SecTrustGetTrustResult.restype = OSStatus

    Security.SecTrustRef = SecTrustRef  # type: ignore[attr-defined]
    Security.SecTrustResultType = SecTrustResultType  # type: ignore[attr-defined]
    Security.OSStatus = OSStatus  # type: ignore[attr-defined]

    kSecRevocationUseAnyAvailableMethod = 3
    kSecRevocationRequirePositiveResponse = 8

    CoreFoundation.CFRelease.argtypes = [CFTypeRef]
    CoreFoundation.CFRelease.restype = None

    CoreFoundation.CFGetTypeID.argtypes = [CFTypeRef]
    CoreFoundation.CFGetTypeID.restype = CFTypeID

    CoreFoundation.CFStringCreateWithCString.argtypes = [
        CFAllocatorRef,
        c_char_p,
        CFStringEncoding,
    ]
    CoreFoundation.CFStringCreateWithCString.restype = CFStringRef

    CoreFoundation.CFStringGetCStringPtr.argtypes = [CFStringRef, CFStringEncoding]
    CoreFoundation.CFStringGetCStringPtr.restype = c_char_p

    CoreFoundation.CFStringGetCString.argtypes = [
        CFStringRef,
        c_char_p,
        CFIndex,
        CFStringEncoding,
    ]
    CoreFoundation.CFStringGetCString.restype = c_bool

    CoreFoundation.CFDataCreate.argtypes = [CFAllocatorRef, c_char_p, CFIndex]
    CoreFoundation.CFDataCreate.restype = CFDataRef

    CoreFoundation.CFDataGetLength.argtypes = [CFDataRef]
    CoreFoundation.CFDataGetLength.restype = CFIndex

    CoreFoundation.CFDataGetBytePtr.argtypes = [CFDataRef]
    CoreFoundation.CFDataGetBytePtr.restype = c_void_p

    CoreFoundation.CFArrayCreate.argtypes = [
        CFAllocatorRef,
        POINTER(CFTypeRef),
        CFIndex,
        CFArrayCallBacks,
    ]
    CoreFoundation.CFArrayCreate.restype = CFArrayRef

    CoreFoundation.CFArrayCreateMutable.argtypes = [
        CFAllocatorRef,
        CFIndex,
        CFArrayCallBacks,
    ]
    CoreFoundation.CFArrayCreateMutable.restype = CFMutableArrayRef

    CoreFoundation.CFArrayAppendValue.argtypes = [CFMutableArrayRef, c_void_p]
    CoreFoundation.CFArrayAppendValue.restype = None

    CoreFoundation.CFArrayGetCount.argtypes = [CFArrayRef]
    CoreFoundation.CFArrayGetCount.restype = CFIndex

    CoreFoundation.CFArrayGetValueAtIndex.argtypes = [CFArrayRef, CFIndex]
    CoreFoundation.CFArrayGetValueAtIndex.restype = c_void_p

    CoreFoundation.CFErrorGetCode.argtypes = [CFErrorRef]
    CoreFoundation.CFErrorGetCode.restype = CFIndex

    CoreFoundation.CFErrorCopyDescription.argtypes = [CFErrorRef]
    CoreFoundation.CFErrorCopyDescription.restype = CFStringRef

    CoreFoundation.kCFAllocatorDefault = CFAllocatorRef.in_dll(  # type: ignore[attr-defined]
        CoreFoundation, "kCFAllocatorDefault"
    )
    CoreFoundation.kCFTypeArrayCallBacks = c_void_p.in_dll(  # type: ignore[attr-defined]
        CoreFoundation, "kCFTypeArrayCallBacks"
    )

    CoreFoundation.CFTypeRef = CFTypeRef  # type: ignore[attr-defined]
    CoreFoundation.CFArrayRef = CFArrayRef  # type: ignore[attr-defined]
    CoreFoundation.CFStringRef = CFStringRef  # type: ignore[attr-defined]
    CoreFoundation.CFErrorRef = CFErrorRef  # type: ignore[attr-defined]

except AttributeError:
    raise ImportError("Error initializing ctypes") from None


def _handle_osstatus(result: OSStatus, _: typing.Any, args: typing.Any) -> typing.Any:
    """
    Raises an error if the OSStatus value is non-zero.
    """
    if int(result) == 0:
        return args

    # Returns a CFString which we need to transform
    # into a UTF-8 Python string.
    error_message_cfstring = None
    try:
        error_message_cfstring = Security.SecCopyErrorMessageString(result, None)

        # First step is convert the CFString into a C string pointer.
        # We try the fast no-copy way first.
        error_message_cfstring_c_void_p = ctypes.cast(
            error_message_cfstring, ctypes.POINTER(ctypes.c_void_p)
        )
        message = CoreFoundation.CFStringGetCStringPtr(
            error_message_cfstring_c_void_p, CFConst.kCFStringEncodingUTF8
        )

        # Quoting the Apple dev docs:
        #
        # "A pointer to a C string or NULL if the internal
        # storage of theString does not allow this to be
        # returned efficiently."
        #
        # So we need to get our hands dirty.
        if message is None:
            buffer = ctypes.create_string_buffer(1024)
            result = CoreFoundation.CFStringGetCString(
                error_message_cfstring_c_void_p,
                buffer,
                1024,
                CFConst.kCFStringEncodingUTF8,
            )
            if not result:
                raise OSError("Error copying C string from CFStringRef")
            message = buffer.value

    finally:
        if error_message_cfstring is not None:
            CoreFoundation.CFRelease(error_message_cfstring)

    # If no message can be found for this status we come
    # up with a generic one that forwards the status code.
    if message is None or message == "":
        message = f"SecureTransport operation returned a non-zero OSStatus: {result}"

    raise ssl.SSLError(message)


Security.SecTrustCreateWithCertificates.errcheck = _handle_osstatus  # type: ignore[assignment]
Security.SecTrustSetAnchorCertificates.errcheck = _handle_osstatus  # type: ignore[assignment]
Security.SecTrustGetTrustResult.errcheck = _handle_osstatus  # type: ignore[assignment]


class CFConst:
    """CoreFoundation constants"""

    kCFStringEncodingUTF8 = CFStringEncoding(0x08000100)

    errSecIncompleteCertRevocationCheck = -67635
    errSecHostNameMismatch = -67602
    errSecCertificateExpired = -67818
    errSecNotTrusted = -67843


def _bytes_to_cf_data_ref(value: bytes) -> CFDataRef:  # type: ignore[valid-type]
    return CoreFoundation.CFDataCreate(  # type: ignore[no-any-return]
        CoreFoundation.kCFAllocatorDefault, value, len(value)
    )


def _bytes_to_cf_string(value: bytes) -> CFString:
    """
    Given a Python binary data, create a CFString.
    The string must be CFReleased by the caller.
    """
    c_str = ctypes.c_char_p(value)
    cf_str = CoreFoundation.CFStringCreateWithCString(
        CoreFoundation.kCFAllocatorDefault,
        c_str,
        CFConst.kCFStringEncodingUTF8,
    )
    return cf_str  # type: ignore[no-any-return]


def _cf_string_ref_to_str(cf_string_ref: CFStringRef) -> str | None:  # type: ignore[valid-type]
    """
    Creates a Unicode string from a CFString object. Used entirely for error
    reporting.
    Yes, it annoys me quite a lot that this function is this complex.
    """

    string = CoreFoundation.CFStringGetCStringPtr(
        cf_string_ref, CFConst.kCFStringEncodingUTF8
    )
    if string is None:
        buffer = ctypes.create_string_buffer(1024)
        result = CoreFoundation.CFStringGetCString(
            cf_string_ref, buffer, 1024, CFConst.kCFStringEncodingUTF8
        )
        if not result:
            raise OSError("Error copying C string from CFStringRef")
        string = buffer.value
    if string is not None:
        string = string.decode("utf-8")
    return string  # type: ignore[no-any-return]


def _der_certs_to_cf_cert_array(certs: list[bytes]) -> CFMutableArrayRef:  # type: ignore[valid-type]
    """Builds a CFArray of SecCertificateRefs from a list of DER-encoded certificates.
    Responsibility of the caller to call CoreFoundation.CFRelease on the CFArray.
    """
    cf_array = CoreFoundation.CFArrayCreateMutable(
        CoreFoundation.kCFAllocatorDefault,
        0,
        ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks),
    )
    if not cf_array:
        raise MemoryError("Unable to allocate memory!")

    for cert_data in certs:
        cf_data = None
        sec_cert_ref = None
        try:
            cf_data = _bytes_to_cf_data_ref(cert_data)
            sec_cert_ref = Security.SecCertificateCreateWithData(
                CoreFoundation.kCFAllocatorDefault, cf_data
            )
            CoreFoundation.CFArrayAppendValue(cf_array, sec_cert_ref)
        finally:
            if cf_data:
                CoreFoundation.CFRelease(cf_data)
            if sec_cert_ref:
                CoreFoundation.CFRelease(sec_cert_ref)

    return cf_array  # type: ignore[no-any-return]


@contextlib.contextmanager
def _configure_context(ctx: ssl.SSLContext) -> typing.Iterator[None]:
    check_hostname = ctx.check_hostname
    verify_mode = ctx.verify_mode
    ctx.check_hostname = False
    _set_ssl_context_verify_mode(ctx, ssl.CERT_NONE)
    try:
        yield
    finally:
        ctx.check_hostname = check_hostname
        _set_ssl_context_verify_mode(ctx, verify_mode)


def _verify_peercerts_impl(
    ssl_context: ssl.SSLContext,
    cert_chain: list[bytes],
    server_hostname: str | None = None,
) -> None:
    certs = None
    policies = None
    trust = None
    cf_error = None
    try:
        if server_hostname is not None:
            cf_str_hostname = None
            try:
                cf_str_hostname = _bytes_to_cf_string(server_hostname.encode("ascii"))
                ssl_policy = Security.SecPolicyCreateSSL(True, cf_str_hostname)
            finally:
                if cf_str_hostname:
                    CoreFoundation.CFRelease(cf_str_hostname)
        else:
            ssl_policy = Security.SecPolicyCreateSSL(True, None)

        policies = ssl_policy
        if ssl_context.verify_flags & ssl.VERIFY_CRL_CHECK_CHAIN:
            # Add explicit policy requiring positive revocation checks
            policies = CoreFoundation.CFArrayCreateMutable(
                CoreFoundation.kCFAllocatorDefault,
                0,
                ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks),
            )
            CoreFoundation.CFArrayAppendValue(policies, ssl_policy)
            CoreFoundation.CFRelease(ssl_policy)
            revocation_policy = Security.SecPolicyCreateRevocation(
                kSecRevocationUseAnyAvailableMethod
                | kSecRevocationRequirePositiveResponse
            )
            CoreFoundation.CFArrayAppendValue(policies, revocation_policy)
            CoreFoundation.CFRelease(revocation_policy)
        elif ssl_context.verify_flags & ssl.VERIFY_CRL_CHECK_LEAF:
            raise NotImplementedError("VERIFY_CRL_CHECK_LEAF not implemented for macOS")

        certs = None
        try:
            certs = _der_certs_to_cf_cert_array(cert_chain)

            # Now that we have certificates loaded and a SecPolicy
            # we can finally create a SecTrust object!
            trust = Security.SecTrustRef()
            Security.SecTrustCreateWithCertificates(
                certs, policies, ctypes.byref(trust)
            )

        finally:
            # The certs are now being held by SecTrust so we can
            # release our handles for the array.
            if certs:
                CoreFoundation.CFRelease(certs)

        # If there are additional trust anchors to load we need to transform
        # the list of DER-encoded certificates into a CFArray. Otherwise
        # pass 'None' to signal that we only want system / fetched certificates.
        ctx_ca_certs_der: list[bytes] | None = ssl_context.get_ca_certs(
            binary_form=True
        )
        if ctx_ca_certs_der:
            ctx_ca_certs = None
            try:
                ctx_ca_certs = _der_certs_to_cf_cert_array(cert_chain)
                Security.SecTrustSetAnchorCertificates(trust, ctx_ca_certs)
            finally:
                if ctx_ca_certs:
                    CoreFoundation.CFRelease(ctx_ca_certs)
        else:
            Security.SecTrustSetAnchorCertificates(trust, None)

        cf_error = CoreFoundation.CFErrorRef()
        sec_trust_eval_result = Security.SecTrustEvaluateWithError(
            trust, ctypes.byref(cf_error)
        )
        # sec_trust_eval_result is a bool (0 or 1)
        # where 1 means that the certs are trusted.
        if sec_trust_eval_result == 1:
            is_trusted = True
        elif sec_trust_eval_result == 0:
            is_trusted = False
        else:
            raise ssl.SSLError(
                f"Unknown result from Security.SecTrustEvaluateWithError: {sec_trust_eval_result!r}"
            )

        cf_error_code = 0
        if not is_trusted:
            cf_error_code = CoreFoundation.CFErrorGetCode(cf_error)

            # If the error is a known failure that we're
            # explicitly okay with from SSLContext configuration
            # we can set is_trusted accordingly.
            if ssl_context.verify_mode != ssl.CERT_REQUIRED and (
                cf_error_code == CFConst.errSecNotTrusted
                or cf_error_code == CFConst.errSecCertificateExpired
            ):
                is_trusted = True
            elif (
                not ssl_context.check_hostname
                and cf_error_code == CFConst.errSecHostNameMismatch
            ):
                is_trusted = True

        # If we're still not trusted then we start to
        # construct and raise the SSLCertVerificationError.
        if not is_trusted:
            cf_error_string_ref = None
            try:
                cf_error_string_ref = CoreFoundation.CFErrorCopyDescription(cf_error)

                # Can this ever return 'None' if there's a CFError?
                cf_error_message = (
                    _cf_string_ref_to_str(cf_error_string_ref)
                    or "Certificate verification failed"
                )

                # TODO: Not sure if we need the SecTrustResultType for anything?
                # We only care whether or not it's a success or failure for now.
                sec_trust_result_type = Security.SecTrustResultType()
                Security.SecTrustGetTrustResult(
                    trust, ctypes.byref(sec_trust_result_type)
                )

                err = ssl.SSLCertVerificationError(cf_error_message)
                err.verify_message = cf_error_message
                err.verify_code = cf_error_code
                raise err
            finally:
                if cf_error_string_ref:
                    CoreFoundation.CFRelease(cf_error_string_ref)

    finally:
        if policies:
            CoreFoundation.CFRelease(policies)
        if trust:
            CoreFoundation.CFRelease(trust)
python3.12/site-packages/pip/_vendor/truststore/py.typed000064400000000000151732702270017266 0ustar00python3.12/site-packages/pip/_vendor/truststore/_ssl_constants.py000064400000002152151732702270021207 0ustar00import ssl
import sys
import typing

# Hold on to the original class so we can create it consistently
# even if we inject our own SSLContext into the ssl module.
_original_SSLContext = ssl.SSLContext
_original_super_SSLContext = super(_original_SSLContext, _original_SSLContext)

# CPython is known to be good, but non-CPython implementations
# may implement SSLContext differently so to be safe we don't
# subclass the SSLContext.

# This is returned by truststore.SSLContext.__class__()
_truststore_SSLContext_dunder_class: typing.Optional[type]

# This value is the superclass of truststore.SSLContext.
_truststore_SSLContext_super_class: type

if sys.implementation.name == "cpython":
    _truststore_SSLContext_super_class = _original_SSLContext
    _truststore_SSLContext_dunder_class = None
else:
    _truststore_SSLContext_super_class = object
    _truststore_SSLContext_dunder_class = _original_SSLContext


def _set_ssl_context_verify_mode(
    ssl_context: ssl.SSLContext, verify_mode: ssl.VerifyMode
) -> None:
    _original_super_SSLContext.verify_mode.__set__(ssl_context, verify_mode)  # type: ignore[attr-defined]
python3.12/site-packages/pip/_vendor/truststore/_openssl.py000064400000004424151732702300017773 0ustar00import contextlib
import os
import re
import ssl
import typing

# candidates based on https://github.com/tiran/certifi-system-store by Christian Heimes
_CA_FILE_CANDIDATES = [
    # Alpine, Arch, Fedora 34+, OpenWRT, RHEL 9+, BSD
    "/etc/ssl/cert.pem",
    # Fedora <= 34, RHEL <= 9, CentOS <= 9
    "/etc/pki/tls/cert.pem",
    # Debian, Ubuntu (requires ca-certificates)
    "/etc/ssl/certs/ca-certificates.crt",
    # SUSE
    "/etc/ssl/ca-bundle.pem",
]

_HASHED_CERT_FILENAME_RE = re.compile(r"^[0-9a-fA-F]{8}\.[0-9]$")


@contextlib.contextmanager
def _configure_context(ctx: ssl.SSLContext) -> typing.Iterator[None]:
    # First, check whether the default locations from OpenSSL
    # seem like they will give us a usable set of CA certs.
    # ssl.get_default_verify_paths already takes care of:
    # - getting cafile from either the SSL_CERT_FILE env var
    #   or the path configured when OpenSSL was compiled,
    #   and verifying that that path exists
    # - getting capath from either the SSL_CERT_DIR env var
    #   or the path configured when OpenSSL was compiled,
    #   and verifying that that path exists
    # In addition we'll check whether capath appears to contain certs.
    defaults = ssl.get_default_verify_paths()
    if defaults.cafile or (defaults.capath and _capath_contains_certs(defaults.capath)):
        ctx.set_default_verify_paths()
    else:
        # cafile from OpenSSL doesn't exist
        # and capath from OpenSSL doesn't contain certs.
        # Let's search other common locations instead.
        for cafile in _CA_FILE_CANDIDATES:
            if os.path.isfile(cafile):
                ctx.load_verify_locations(cafile=cafile)
                break

    yield


def _capath_contains_certs(capath: str) -> bool:
    """Check whether capath exists and contains certs in the expected format."""
    if not os.path.isdir(capath):
        return False
    for name in os.listdir(capath):
        if _HASHED_CERT_FILENAME_RE.match(name):
            return True
    return False


def _verify_peercerts_impl(
    ssl_context: ssl.SSLContext,
    cert_chain: list[bytes],
    server_hostname: str | None = None,
) -> None:
    # This is a no-op because we've enabled SSLContext's built-in
    # verification via verify_mode=CERT_REQUIRED, and don't need to repeat it.
    pass
python3.12/site-packages/pip/_vendor/urllib3.pyi000064400000000025151732702300015431 0ustar00from urllib3 import *python3.12/site-packages/pip/_vendor/tenacity/tornadoweb.py000064400000004136151732702300017677 0ustar00# Copyright 2017 Elisey Zanko
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import typing

from pip._vendor.tenacity import BaseRetrying
from pip._vendor.tenacity import DoAttempt
from pip._vendor.tenacity import DoSleep
from pip._vendor.tenacity import RetryCallState

from tornado import gen

if typing.TYPE_CHECKING:
    from tornado.concurrent import Future

_RetValT = typing.TypeVar("_RetValT")


class TornadoRetrying(BaseRetrying):
    def __init__(self, sleep: "typing.Callable[[float], Future[None]]" = gen.sleep, **kwargs: typing.Any) -> None:
        super().__init__(**kwargs)
        self.sleep = sleep

    @gen.coroutine  # type: ignore[misc]
    def __call__(
        self,
        fn: "typing.Callable[..., typing.Union[typing.Generator[typing.Any, typing.Any, _RetValT], Future[_RetValT]]]",
        *args: typing.Any,
        **kwargs: typing.Any,
    ) -> "typing.Generator[typing.Any, typing.Any, _RetValT]":
        self.begin()

        retry_state = RetryCallState(retry_object=self, fn=fn, args=args, kwargs=kwargs)
        while True:
            do = self.iter(retry_state=retry_state)
            if isinstance(do, DoAttempt):
                try:
                    result = yield fn(*args, **kwargs)
                except BaseException:  # noqa: B902
                    retry_state.set_exception(sys.exc_info())  # type: ignore[arg-type]
                else:
                    retry_state.set_result(result)
            elif isinstance(do, DoSleep):
                retry_state.prepare_for_next_attempt()
                yield self.sleep(do)
            else:
                raise gen.Return(do)
python3.12/site-packages/pip/_vendor/tenacity/after.py000064400000003222151732702300016627 0ustar00# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import typing

from pip._vendor.tenacity import _utils

if typing.TYPE_CHECKING:
    import logging

    from pip._vendor.tenacity import RetryCallState


def after_nothing(retry_state: "RetryCallState") -> None:
    """After call strategy that does nothing."""


def after_log(
    logger: "logging.Logger",
    log_level: int,
    sec_format: str = "%0.3f",
) -> typing.Callable[["RetryCallState"], None]:
    """After call strategy that logs to some logger the finished attempt."""

    def log_it(retry_state: "RetryCallState") -> None:
        if retry_state.fn is None:
            # NOTE(sileht): can't really happen, but we must please mypy
            fn_name = "<unknown>"
        else:
            fn_name = _utils.get_callback_name(retry_state.fn)
        logger.log(
            log_level,
            f"Finished call to '{fn_name}' "
            f"after {sec_format % retry_state.seconds_since_start}(s), "
            f"this was the {_utils.to_ordinal(retry_state.attempt_number)} time calling it.",
        )

    return log_it
python3.12/site-packages/pip/_vendor/tenacity/__pycache__/tornadoweb.cpython-312.pyc000064400000005113151732702300024234 0ustar00�

R`i^���ddlZddlZddlmZddlmZddlmZddlmZddlmZejrddl
mZejd�Z
Gd	�d
e�Zy)�N)�BaseRetrying)�	DoAttempt)�DoSleep)�RetryCallState)�gen)�Future�_RetValTc	���eZdZejfdddejddf�fd�
Zejddd	ejdejdd
fd��Z	�xZ
S)�TornadoRetrying�sleepz&typing.Callable[[float], Future[None]]�kwargs�returnNc�2��t�|�di|��||_y)N�)�super�__init__r)�selfrr
�	__class__s   ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/tornadoweb.pyrzTornadoRetrying.__init__ s���
���"�6�"���
��fnzhtyping.Callable[..., typing.Union[typing.Generator[typing.Any, typing.Any, _RetValT], Future[_RetValT]]]�argsz2typing.Generator[typing.Any, typing.Any, _RetValT]c/�K�|j�t||||��}	|j|��}t|t�r	||i|����}|j|�nIt|t�r$|j�|j|���ntj|����#t$r&|jtj��Y�/wxYw�w)N)�retry_objectrrr
)�retry_state)�beginr�iter�
isinstancer�
set_result�
BaseException�
set_exception�sys�exc_infor�prepare_for_next_attemptrr�Return)rrrr
r�do�results       r�__call__zTornadoRetrying.__call__$s�����	
�
�
��$�$�2�D�QW�X������{��3�B��"�i�(�3�#%�t�#6�v�#6�6�F� �*�*�6�2��B��(��4�4�6��j�j��n�$��j�j��n�$���
%�>��-�-�c�l�l�n�=�>�s+�AC�
B,�AC�,,C�C�C�C)�__name__�
__module__�__qualname__rr�typing�Anyr�	coroutiner(�
__classcell__)rs@rrrss���IL����F��^d�^h�^h��mq��	�]�]�%�v�%��z�z�%��*�*�	%�

>�%��%rr)r"r,�pip._vendor.tenacityrrrr�tornador�
TYPE_CHECKING�tornado.concurrentr�TypeVarr	rrrr�<module>r5sD���
�-�*�(�/��	���)��6�>�>�*�%��%�l�%rpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/_asyncio.cpython-312.pyc000064400000011367151732702310023705 0ustar00�

R`i�
���ddlZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZejd�Z
ejd	ejd
ejej f��ZGd�d
e�Zy)�N)�sleep)�AttemptManager)�BaseRetrying)�	DoAttempt)�DoSleep)�RetryCallState�WrappedFnReturnT�	WrappedFn.)�boundc���eZdZUejegejejfed<e	fdejegejejfdejddf�fd�
Z
dedejdejdefd�Z
dejeddffd	�Zd
d
�Zdefd�Zdedef�fd�Z�xZS)�
AsyncRetryingr�kwargs�returnNc�2��t�|�di|��||_y)N�)�super�__init__r)�selfrr�	__class__s   ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/_asyncio.pyrzAsyncRetrying.__init__$s���
���"�6�"���
��fn�argsc��K�|j�t||||��}	|j|��}t|t�r#	||i|���d{���}|j|�n<t|t�r*|j�|j|��d{���n|S��7�S#t$r&|jtj��Y�1wxYw7�<�w)N)�retry_objectrrr��retry_state)
�beginr�iter�
isinstancer�
set_result�
BaseException�
set_exception�sys�exc_infor�prepare_for_next_attemptr)rrrrr�do�results       r�__call__zAsyncRetrying.__call__(s�����	
�
�
��$�$�2�D�QW�X������{��3�B��"�i�(�3�#%�t�#6�v�#6�6�F� �*�*�6�2��B��(��4�4�6��j�j��n�$�$��	��7��$�>��-�-�c�l�l�n�=�>��%�sI�AC�B'�B%�B'�AC�C�C�%B'�',C�C�C�Cc��td��)Nz$AsyncRetrying object is not iterable)�	TypeError�rs r�__iter__zAsyncRetrying.__iter__=s���>�?�?rc�N�|j�t|ddi��|_|S)Nr)rrr)rr�_retry_stater,s r�	__aiter__zAsyncRetrying.__aiter__@s#���
�
��*�4�D�r�"�M����rc��:K�	|j|j��}|�t�t|t�rt|j��St|t�r4|jj�|j|��d{���nt���7��w)Nr)	rr/�StopAsyncIterationr rrrr&r)rr's  r�	__anext__zAsyncRetrying.__anext__Es���������t�'8�'8��9�B��z�(�(��B�	�*�%�$�2C�2C�D�D��B��(��!�!�:�:�<��j�j��n�$�$�(�(��%�s�B
B�B�

Bc����t�|����tj��dtjdtjdtjf�fd��}�j
|_�j|_|S)Nrrrc��0�K��|i|���d{���S7��w)Nr)rrrs  �r�
async_wrappedz*AsyncRetrying.wraps.<locals>.async_wrappedVs������T�,�V�,�,�,�,�s���)r�wraps�	functools�t�Any�retry�
retry_with)rrr6rs ` �rr7zAsyncRetrying.wrapsRso���
�W�]�2�
��
����	�	-�q�u�u�	-����	-�!�%�%�	-�
�	-�!�h�h�
��#%�=�=�
� ��r)rr
)�__name__�
__module__�__qualname__r9�Callable�float�	Awaitabler:�__annotations__rrr
r	r)�	Generatorrr-r0r3r7�
__classcell__)rs@rr
r
!s�����:�:�u�g�q�{�{�1�5�5�1�1�2�2�HM��a�j�j�%��!�+�+�a�e�e�2D�)D�E��YZ�Y^�Y^��cg�����$%�E�E��56�U�U��	��*@�!�+�+�n�d�D�&@�A�@��
)��)��	��i��rr
)r8r$�typingr9�asyncior�pip._vendor.tenacityrrrrr�TypeVarr	r@rBr:r
r
rrr�<module>rJsm��$�
���/�-�*�(�/��1�9�9�/�0���A�I�I�k����C����Q�U�U�9K�4K�)L�M�	�=�L�=rpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/__init__.cpython-312.pyc000064400000065002151732702310023633 0ustar00�

R`i
P��,�ddlZddlZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl m!Z!ddl m"Z"ddl m#Z#ddl m$Z$ddl m%Z%ddl m&Z&ddl'm(Z(ddl'm)Z)ddl'm*Z*ddl'm+Z+dd l'm,Z,dd!l'm-Z-dd"l'm.Z.dd#l'm/Z/dd#l'm/Z0dd$l'm1Z1dd%l2m3Z3dd&l2m4Z4dd'l5m6Z6dd(l5m7Z7dd)l8m9Z9dd*l8m:Z:dZ;ejxrddl=Z=dd+lm>Z>dd,l m?Z?dd-l'm@Z@ej�d.�ZBej�d/ej�d0ej�f�1�ZEGd2�d3eF�ZGeH�ZIGd4�d5�ZJGd6�d7eK�ZLGd8�d9�ZMGd:�d;eM�ZNeH�ZOd<ej�ej�eHfd=ej�d>ej�fd?�ZQGd@�dAeF�ZRGdB�dC�ZSGdD�dEe�ZTGdF�dGeT�ZUej�ddHk\rej�ej�ZXnej�ZXGdI�dJeX�ZWGdK�dL�ZYej�dMeEd>eEfdN��Zej�ee%e-�e�e4e7ddOeRdf
dPej�ej�e[eKfgdfdQdRdSdTdUdVdWej�dLgdfdXej�dLgdfdYej�ej�dLgdfdZe]d[ej�dAd\ej�ej�dLgej�fd>ej�eEgeEffd]��Zd^ej�d_ej�d>ej�fd`�Zddal_m`Z`e;rddblambZbgdc�Zcy)d�N)�ABC�abstractmethod)�futures)�iscoroutinefunction�)�
retry_base)�	retry_all)�retry_always)�	retry_any)�retry_if_exception)�retry_if_exception_type)�retry_if_exception_cause_type)�retry_if_not_exception_type)�retry_if_not_result)�retry_if_result)�retry_never)�retry_unless_exception_type)�retry_if_exception_message)�retry_if_not_exception_message��sleep)�sleep_using_event)�stop_after_attempt)�stop_after_delay)�stop_all)�stop_any)�
stop_never)�stop_when_event_set)�
wait_chain)�wait_combine)�wait_exponential)�
wait_fixed)�wait_incrementing)�	wait_none)�wait_random)�wait_random_exponential)�wait_exponential_jitter)�
before_log)�before_nothing)�	after_log)�
after_nothing)�before_sleep_log)�before_sleep_nothing)�
RetryBaseT)�	StopBaseT)�	WaitBaseT�WrappedFnReturnT�	WrappedFn.)�boundc��eZdZdZy)�TryAgainz/Always retry the executed function when raised.N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/__init__.pyr5r5es��9r;r5c��eZdZy)�	DoAttemptN�r6r7r8r:r;r<r>r>l���r;r>c��eZdZy)�DoSleepNr?r:r;r<rBrBpr@r;rBc�z�eZdZUdZdZejeed<dZ	ejeed<defd�Zdefd�Zy)	�
BaseActiona5Base class for representing actions to take by retry object.

    Concrete implementations must define:
    - __init__: to initialize all necessary fields
    - REPR_FIELDS: class variable specifying attributes to include in repr(self)
    - NAME: for identification in retry object methods and callbacks
    r:�REPR_FIELDSN�NAME�returnc���dj�fd��jD��}�jj�d|�d�S)Nz, c3�@�K�|]}|�dt�|������y�w)�=N)�getattr)�.0�field�selfs  �r<�	<genexpr>z&BaseAction.__repr__.<locals>.<genexpr>�s'�����`�O_�e���q���u�)=�(@�A�O_�s��(�))�joinrE�	__class__r6)rN�	state_strs` r<�__repr__zBaseAction.__repr__�s;����I�I�`�t�O_�O_�`�`�	��.�.�)�)�*�!�I�;�a�8�8r;c��t|�S�N)�repr�rNs r<�__str__zBaseAction.__str__�s���D�z�r;)
r6r7r8r9rE�t�Sequence�str�__annotations__rF�OptionalrUrZr:r;r<rDrDtsE���$&�K����C��%� �D�!�*�*�S�/� �9�#�9���r;rDc�8�eZdZdZdZdejddfd�Zy)�RetryActionr�retryrrGNc�$�t|�|_yrW)�floatr)rNrs  r<�__init__zRetryAction.__init__�s
���5�\��
r;)r6r7r8rErFr[�
SupportsFloatrer:r;r<rara�s#���K��D�"�a�o�o�"�$�"r;ra�first�secondrGc��|tur|S|SrW)�_unset)rgrhs  r<�
_first_setrk�s���f�_�6�/�%�/r;c�8��eZdZdZd�fd�Zdd�Zdefd�Z�xZS)�
RetryErrorz>Encapsulates the last attempt instance right before giving up.rGc�2��||_t�|�	|�yrW)�last_attempt�superre)rNrorSs  �r<rezRetryError.__init__�s���(���
����&r;c�f�|jjr|jj��|�rW)ro�failed�resultrYs r<�reraisezRetryError.reraise�s+�����#�#��#�#�*�*�,�,��
r;c�N�|jj�d|j�d�S)N�[�])rSr6rorYs r<rZzRetryError.__str__�s'���.�.�)�)�*�!�D�,=�,=�+>�a�@�@r;)ro�FuturerGN)rGz
t.NoReturn)	r6r7r8r9rertr]rZ�
__classcell__�rSs@r<rmrm�s���H�'��
A��Ar;rmc	��eZdZdZdd�Zdd�Zdejeje	deje	dejd	deje
fd
�Zy)
�AttemptManagerzManage attempt context.c��||_yrW��retry_state)rNrs  r<rezAttemptManager.__init__�s
��&��r;rGNc��yrWr:rYs r<�	__enter__zAttemptManager.__enter__�s��r;�exc_type�	exc_value�	tracebackztypes.TracebackTypec��|�!|�|jj|||f�y|jjd�y)NT)r�
set_exception�
set_result)rNr�r�r�s    r<�__exit__zAttemptManager.__exit__�sF����I�$9����*�*�H�i��+K�L��
���'�'��-�r;)r�RetryCallState�rGN)r6r7r8r9rer�r[r_�Type�
BaseException�boolr�r:r;r<r|r|�sh��!�'�
���*�*�Q�V�V�M�2�3���:�:�m�,���:�:�3�4�	�

���D�	�r;r|c�`�eZdZeee�e�eedde	df
de
je
je
efgdfdddddd	d
e
jdgdfde
jdgdfd
e
je
jdgdfdede
j"e	de
je
jdge
j$ffd�Zeeeeeeeeeef
de
je
je
je
efgdfefde
jdefde
jdefde
jeefd
e
je
jdgdfefde
je
jdgdfefd
e
je
je
jdgdfefde
jeefde
je
j"e	efde
je
je
jdge
j$fefddfd�Zdefd�Zede
j6ee
j$ffd��Zdedefd�Zd!d�Zddde
je e!e
j$ffd�Z"de
jFe$ddffd�Z%e&de
jde'fde
j$de
j$de'fd ��Z(y)"�BaseRetryingNFr�stopr/�waitr0rbr.�beforer��after�before_sleeprt�retry_error_cls�retry_error_callbackc���||_||_||_||_||_||_||_||_tj�|_
|	|_|
|_yrW)
rr�r�rbr�r�r�rt�	threading�local�_localr�r��rNrr�r�rbr�r�r�rtr�r�s           r<rezBaseRetrying.__init__�s[����
���	���	���
������
�(�������o�o�'���.���$8��!r;rGc���|jt||j�t||j�t||j�t||j
�t||j�t||j�t||j�t||j�t|	|j�t|
|j���
S)z8Copy this object with some parameters changed if needed.�
rr�r�rbr�r�r�rtr�r�)rSrkrr�r�rbr�r�r�rtr�r�r�s           r<�copyzBaseRetrying.copy�s����~�~��U�D�J�J�/��D�$�)�)�,��D�$�)�)�,��U�D�J�J�/��f�d�k�k�2��U�D�J�J�/�#�L�$�2C�2C�D��w����5�&���8L�8L�M�!+�,@�$�B[�B[�!\��
�	
r;c���d|jj�dt|�d�d|j�d|j�d|j
�d|j�d|j�d	|j�d
�S)N�<z
 object at 0x�xz (stop=z, wait=z, sleep=z, retry=z	, before=z, after=z)>)	rSr6�idr�r�rrbr�r�rYs r<rUzBaseRetrying.__repr__�s�������'�'�(�
�b��h�q�\�B��I�I�;���I�I�;���Z�Z�L�!��Z�Z�L�!��k�k�]�#��Z�Z�L��

$�	
r;c��	|jjS#t$rctjtj
ttjfi�|j_|jjcYSwxYw)aSReturn a dictionary of runtime statistics.

        This dictionary will be empty when the controller has never been
        ran. When it is running or has ran previously it should have (but
        may not) have useful and/or informational keys and values when
        running is underway and/or completed.

        .. warning:: The keys in this dictionary **should** be some what
                     stable (not changing), but there existence **may**
                     change between major releases as new statistics are
                     gathered or removed so before accessing keys ensure that
                     they actually exist and handle when they do not.

        .. note:: The values in this dictionary are local to the thread
                  running call (so if multiple threads share the same retrying
                  object - either directly or indirectly) they will each have
                  there own view of statistics they have collected (in the
                  future we may provide a way to aggregate the various
                  statistics from each thread).
        )r��
statistics�AttributeErrorr[�cast�Dictr]�AnyrYs r<r�zBaseRetrying.statistics�s^��,	*��;�;�)�)�)���	*�%&�V�V�A�F�F�3����:�,>��%C�D�K�K�"��;�;�)�)�)�	*�s��A)B�B�fc����tj��dtjdtjdtjf��fd��}dtjdtjdtf��fd�}�|_||_|S)z[Wrap a function for retrying.

        :param f: A function to wraps for retrying.
        �args�kwrGc�����g|��i|��SrWr:)r�r�r�rNs  ��r<�	wrapped_fz%BaseRetrying.wraps.<locals>.wrapped_f!s�����'�D�'�B�'�'r;�kwargsc�F���j|i|��j��SrW)r��wraps)r�r�r�rNs  ��r<�
retry_withz&BaseRetrying.wraps.<locals>.retry_with%s$����4�9�9�d�-�f�-�3�3�A�6�6r;)�	functoolsr�r[r�r2rbr�)rNr�r�r�s``  r<r�zBaseRetrying.wrapssz���
����	�	(�Q�U�U�	(�!�%�%�	(�A�E�E�	(�
�	(�	7�a�e�e�	7�q�u�u�	7��	7��	��)�	���r;c��|jj�tj�|jd<d|jd<d|jd<y)N�
start_timer�attempt_numberr�idle_for)r��clear�time�	monotonicrYs r<�beginzBaseRetrying.begin-sD��������(,���(8�����%�,-����(�)�&'����
�#r;rc��|j}|�'|j�|j|�t�S|jxrt	|j�t�}|s!|j|�s|j�S|j�|j|�|j|jd<|j|�r[|jr|j|�S|j|�}|jr|j��||j��|j r|j!|�}nd}t#|�|_|xj&|z
c_|jdxx|z
cc<|jdxxdz
cc<|j(�|j)|�t+|�S)N�delay_since_first_attempt�r�r�r)�outcomer�r>rr�
isinstance�	exceptionr5rbrsr��seconds_since_startr�r�r�r�rtr�ra�next_actionr�r�rB)rNr�fut�is_explicit_retry�	retry_excrs      r<�iterzBaseRetrying.iter3sp���!�!���;��{�{�&����K�(��;���J�J�P�:�c�m�m�o�x�+P��!�T�Z�Z��%<��:�:�<���:�:�!��J�J�{�#�7B�7V�7V����3�4��9�9�[�!��(�(��0�0��=�=��,�,�S�1�I��|�|��'�'�)�)������0��9�9��I�I�k�*�E��E�"-�e�"4�������%�����
�#�u�,�#����(�)�Q�.�)����(����k�*��u�~�r;c#�K�|j�t|ddi��}	|j|��}t|t�rt|����n3t|t�r"|j�|j|�ny�e�w)Nr:)�fnr�r�r~)	r�r�r�r�r>r|rB�prepare_for_next_attemptr)rNr�dos   r<�__iter__zBaseRetrying.__iter__Xsp�����
�
��$�T�d��B�G������{��3�B��"�i�(�$��=�=��B��(��4�4�6��
�
�2����s�BBr�.r�r�c��yrWr:)rNr�r�r�s    r<�__call__zBaseRetrying.__call__fs��	
r;r�))r6r7r8rrr$r
r)r+rmr[�Callable�Union�intrdr_r�r�r�rerj�objectrr�r]rU�propertyr�r�r2r�r�r>rBr��	Generatorr|r�rr1r�r:r;r<r�r��s���:?�&�%�K�5�7�7E�6C�IM��.8�RV�9��z�z�1�7�7�3��:�.�/��5�6�9��9��	9�
�9��
�
�,�-�t�3�4�
9��z�z�+�,�d�2�3�9��j�j����-=�,>��,D�!E�F�9��9����
�+�9� �j�j����5E�4F����4M�)N�O�9�6KQ�-3�-3�-3�HN�GM�Z`�)/�?E�ci�
��w�w�q�z�z�1�7�7�3��:�#6�"7��"=�>��F�G�
��g�g�k�6�)�*�
��g�g�k�6�)�*�	
�
�w�w�z�6�)�*�
�����
�
�$4�#5�t�#;�<�f�D�E�

��w�w�q�z�z�#3�"4�d�":�;�V�C�D�
��g�g�a�j�j����5E�4F��4L�)M�N�PV�V�W�
�����v��&�
�������
�!3�V�!;�<�
� �g�g�a�j�j����=M�<N�PQ�PU�PU�<U�1V�&W�Y_�&_�`�
�
�
�6	
�#�	
��*�A�F�F�3����:�.�*��*�6�y��Y��$(�#� 0�#�Q�W�W�Y��QR�QV�QV�=V�5W�#�J�!�+�+�n�d�D�&@�A���
�
�J�J�s�,�,�-�
��u�u�
��%�%�	
�

�
��
r;r�c�n�eZdZdZdej
defdejdejdefd�Zy)	�RetryingzRetrying controller.r�.r�r�rGc��|j�t||||��}	|j|��}t|t�r	||i|��}|j|�n4t|t�r"|j�|j|�n|S�r#t$r&|jtj��Y�/wxYw)N)�retry_objectr�r�r�r~)
r�r�r�r�r>r�r�r��sys�exc_inforBr�r)rNr�r�r�rr�rss       r<r�zRetrying.__call__ss���	
�
�
��$�$�2�D�QW�X������{��3�B��"�i�(�3���0��0�F� �*�*�6�2��B��(��4�4�6��
�
�2���	���
%�>��-�-�c�l�l�n�=�>�s�B�,C�CN)	r6r7r8r9r[r�r1r�r�r:r;r<r�r�psG����
�J�J�s�,�,�-���u�u���%�%�	�

�r;r��	c	�x��eZdZdZdeddf�fd�Zedefd��Ze	dede
jdeddfd	��Z�xZ
S)
rxzDEncapsulates a (future or past) attempted call to a target function.r�rGNc�0��t�|��||_yrW)rprer�)rNr�rSs  �r<rezFuture.__init__�s���
����,��r;c�&�|j�duS)z8Return whether a exception is being held in this future.N)r�rYs r<rrz
Future.failed�s���~�~��t�+�+r;�value�
has_exceptionc�b�||�}|r|j|�|S|j|�|S)zConstruct a new Future object.)r�r�)�clsr�r�r�r�s     r<�	constructzFuture.construct�s9���.�!������e�$��
�
�N�N�5�!��
r;)r6r7r8r9r�rer�r�rr�classmethodr[r�r�ryrzs@r<rxrx�si���N�-�s�-�t�-��,��,��,���s��1�5�5����RZ���r;rxc
� �eZdZdZdedejedejdejddf
d�Z	e
dejefd	��Zdd
�Z
dejddfd�Zd
ejej eedfddfd�Zdefd�Zy)r�z5State related to a single call wrapped with Retrying.r�r�r�r�rGNc��tj�|_||_||_||_||_d|_d|_d|_	d|_
d|_y)Nrr�)r�r�r�r�r�r�r�r�r��outcome_timestampr�r�)rNr�r�r�r�s     r<rezRetryCallState.__init__�sW���.�.�*���(��������	����$%���+/���48���"��
�48��r;c�N�|j�y|j|jz
SrW)r�r�rYs r<r�z"RetryCallState.seconds_since_start�s&���!�!�)���%�%����7�7r;c�X�d|_d|_|xjdz
c_d|_y�Nr)r�r�r�r�rYs r<r�z'RetryCallState.prepare_for_next_attempt�s*�����!%������q� ����r;�valc��tj�}t|j�}|j	|�||c|_|_yrW)r�r�rxr�r�r�r�)rNr��tsr�s    r<r�zRetryCallState.set_result�s;��
�^�^�
���T�(�(�)�����s��/2�B�,���d�,r;r�ztypes.TracebackType| Nonec��tj�}t|j�}|j	|d�||c|_|_yr�)r�r�rxr�r�r�r�)rNr�r�r�s    r<r�zRetryCallState.set_exception�sC���^�^�
���T�(�(�)�����(�1�+�&�/2�B�,���d�,r;c��|j�d}nk|jjr8|jj�}d|jj�d|�d�}nd|jj���}t
t|jd��}|jj}d|�dt|��d|j�d	|�d
|�d�S)Nznone yetzfailed (� rQz	returned �r�z: attempt #z; slept for z; last result: �>)r�rrr�rSr6rsrd�roundr�r�r�)rNrsr��slept�clsnames     r<rUzRetryCallState.__repr__�s����<�<���F�
�\�\�
 �
 ����.�.�0�I��	� 3� 3� <� <�=�Q�y�k��K�F� ����!4�!4�!6� 7�8�F��e�D�M�M�1�-�.���.�.�)�)���7�)�1�R��X�J�k�$�2E�2E�1F�l�SX�RY�Yh�io�hp�pq�r�rr;r�)r6r7r8r9r�r[r_r2r�rer�rdr�r�r��Tupler�r�r�r]rUr:r;r<r�r��s���?�9�"�9�
�J�J�y�!�9��e�e�	9�
���9�
�
9�:�8�Q�Z�Z��%6�8��8�
 �7�a�e�e�7��7�7�������}� 5�}�Fa� a�b�7�	
�7�s�#�sr;r��funcc��yrWr:)r�s r<rbrb�s��r;Frr�r/r�r0rbr.r�r�r�rtr�r�c
��yrWr:r�s
          r<rbrb�s��r;�dargs�dkwc����t��dk(r!t�d�rt��d�Sdtdtf��fd�}|S)z�Wrap a function with a new `Retrying` object.

    :param dargs: positional arguments passed to Retrying object
    :param dkw: keyword arguments passed to the Retrying object
    rrr�rGc���t|t�rDtjd|jj
�d|jj
�d��t
|�rt�i���}nVtrEttjd�r+tjj|�rt�i���}nt�i���}|j|�S)NzGot retry_base instance (zQ) as callable argument, this will probably hang indefinitely (did you mean retry=z(...)?)�is_coroutine_function)r�r�warnings�warnrSr6r�
AsyncRetrying�tornado�hasattr�genr��TornadoRetryingr�r�)r��rr�r�s  ��r<�wrapzretry.<locals>.wraps�����!�Z�(��
�
�/����0D�0D�/E�FP�PQ�P[�P[�Pd�Pd�Oe�el�n��
#�1�%�!�5�0�C�0���W�W�[�[�2I�J�w�{�{�Op�Op�qr�Os�#�U�2�c�2���e�+�s�+���7�7�1�:�r;)�len�callablerbr2)r�r�rs`` r<rbrbsH����5�z�Q��8�E�!�H�-��u�w�u�Q�x� � �	�I�	�)�	� �r;)r)r)5rr	r
rrr
rrrrrrrrrrrrrrrrrr r!r"r#r$r%r&�wait_full_jitterr'r(r)r*r+r,r-rbr2r5�	NO_RESULTr>rBrDrarmr|r�r�rxr�r)dr�r�r�r��typingr[r��abcrr�
concurrentr�inspectrrbrr	r
rrr
rrrrrrrr�naprrr�rrrrrrr�rr r!r"r#r$r%r&r
r'r�r(r)r�r*r+r�r,r-r�
TYPE_CHECKING�typesr.r/r0�TypeVarr1r�r�r2�	Exceptionr5r�rr>rdrBrDrarjr�rkrmr|r�r��version_inforx�FutureGenericTr��overloadr�r_r�r��pip._vendor.tenacity._asyncior�pip._vendor.tenacity.tornadowebr�__all__r:r;r<�<module>rs���(�
�����#��'�����%�*�0�.�&�"��.�-�1��"�%�"����%���"��#���)�=�)��"�� �+�.����?�?��!����1�9�9�/�0���A�I�I�k����C����J�)?�@�	�:�y�:�
�H�	�	�	�	�e�	���("�*�"�
���0�a�g�g�a�e�e�V�m�,�0�a�e�e�0����0�
A��
A� ��0n
�3�n
�b�|��8���A��!���^�^�A�E�E�*�N��^�^�N��^��.Es�Es�P����	��i�������5:�"�!��1�3�3A�2?�EI��,6�NR���:�:�q�w�w�s�E�z�*�+�T�1�2��
�����	�

�J�J�(�)�4�/�0��
�:�:�'�(�$�.�/�
��*�*�Q�Z�Z�)9�(:�D�(@�A�B�����V�V�L�)���*�*�Q�Z�Z�1A�0B�A�E�E�0I�%J�K���Z�Z���Y�&�'�����!�%�%������!�%�%��<8�
�?�6�r;python3.12/site-packages/pip/_vendor/tenacity/__pycache__/retry.cpython-312.pyc000064400000033765151732702310023254 0ustar00�

R`i*"����ddlZddlZddlZejrddlmZGd�dej�Zejeejdge
ffZGd�de�Ze�Z
Gd�d	e�Ze�ZGd
�de�ZGd�d
e�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Zy) �N)�RetryCallStatec�N�eZdZdZej
dddefd��Zd	d�Zd
d�Z	y)�
retry_basez)Abstract base class for retry strategies.�retry_stater�returnc��y�N���selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/retry.py�__call__zretry_base.__call__s���c��t||�Sr	)�	retry_all�r�others  r
�__and__zretry_base.__and__ �����u�%�%rc��t||�Sr	)�	retry_anyrs  r
�__or__zretry_base.__or__#rrN)rrrr)rrrr)
�__name__�
__module__�__qualname__�__doc__�abc�abstractmethod�boolrrrr
rr
rrs6��3����
�$4�
��
��
�&�&rrrc� �eZdZdZdddefd�Zy)�_retry_neverz-Retry strategy that never rejects any result.rrrc��y)NFr
rs  r
rz_retry_never.__call__-s��rN�rrrrrrr
rr
r!r!*s��7��$4���rr!c� �eZdZdZdddefd�Zy)�
_retry_alwaysz.Retry strategy that always rejects any result.rrrc��y)NTr
rs  r
rz_retry_always.__call__7s��rNr#r
rr
r%r%4s��8��$4���rr%c�P�eZdZdZdej
egefddfd�Zdddefd�Z	y)	�retry_if_exceptionzARetry strategy that retries if an exception verifies a predicate.�	predicaterNc��||_yr	�r)�rr)s  r
�__init__zretry_if_exception.__init__A�	��"��rrrc���|j�td��|jjr8|jj�}|�td��|j	|�Sy)N�(__call__() called before outcome was set�(outcome failed but the exception is NoneF��outcome�RuntimeError�failed�	exceptionr)�rrr6s   r
rzretry_if_exception.__call__Dsa�����&��I�J�J����%�%�#�+�+�5�5�7�I�� �"�#M�N�N��>�>�)�,�,�r)
rrrr�typing�Callable�
BaseExceptionrr-rr
rr
r(r(>s<��K�#�&�/�/�=�/�4�2G�"H�#�T�#�
�$4�
��
rr(c���eZdZdZefdejejeejejedffddf�fd�
Z
�xZS)�retry_if_exception_typez=Retries if an exception has been raised of one or more types.�exception_types.rNc�:����|_t�|�	�fd��y)Nc���t|��Sr	��
isinstance��er=s �r
�<lambda>z2retry_if_exception_type.__init__.<locals>.<lambda>\s���:�a��#Ar�r=�superr-�rr=�	__class__s `�r
r-z retry_if_exception_type.__init__Ts��� /���
���A�Br�rrrr�	Exceptionr8�Union�Typer:�Tupler-�
__classcell__�rHs@r
r<r<Qs_���G�
�C�����K�K�
�&��L�L����]�3�S�8�9�
;�
�C�
�
C�Crr<c���eZdZdZefdejejeejejedffddf�fd�
Z
�xZS)�retry_if_not_exception_typezARetries except an exception has been raised of one or more types.r=.rNc�:����|_t�|�	�fd��y)Nc���t|��Sr	r@rBs �r
rDz6retry_if_not_exception_type.__init__.<locals>.<lambda>j����z�!�_�'E�#ErrErGs `�r
r-z$retry_if_not_exception_type.__init__b���� /���
���E�FrrIrOs@r
rQrQ_s_���K�
�G�����K�K�
�&��L�L����]�3�S�8�9�
;�
�G�
�
G�GrrQc���eZdZdZefdejejeejejedffddf�fd�
Z
dddefd	�Z�xZ
S)
�retry_unless_exception_typez:Retries until an exception is raised of one or more types.r=.rNc�:����|_t�|�	�fd��y)Nc���t|��Sr	r@rBs �r
rDz6retry_unless_exception_type.__init__.<locals>.<lambda>xrTrrErGs `�r
r-z$retry_unless_exception_type.__init__prUrrrc���|j�td��|jjsy|jj�}|�td��|j	|�S�Nr0Tr1r2r7s   r
rz$retry_unless_exception_type.__call__zsc�����&��I�J�J��"�"�)�)���'�'�1�1�3�	����I�J�J��~�~�i�(�(r)rrrrrJr8rKrLr:rMr-rrrNrOs@r
rWrWmsm���D�
�G�����K�K�
�&��L�L����]�3�S�8�9�
;�
�G�
�
G�)�$4�)��)rrWc��eZdZdZefdejejeejejedffddfd�Z
dddefd	�Zy)
�retry_if_exception_cause_typez�Retries if any of the causes of the raised exception is of one or more types.

    The check on the type of the cause of the exception is done recursively (until finding
    an exception in the chain that has no `__cause__`)
    r=.rNc��||_yr	)�exception_cause_types)rr=s  r
r-z&retry_if_exception_cause_type.__init__�s��&5��"rrrc��|j�td��|jjrL|jj�}|�0t	|j
|j�ry|j
}|��0y)Nz&__call__ called before outcome was setTF)r3r4r5r6rA�	__cause__r_)rr�excs   r
rz&retry_if_exception_cause_type.__call__�sn�����&��G�H�H����%�%��%�%�/�/�1�C��/��c�m�m�T�-G�-G�H���m�m���/�
r)
rrrrrJr8rKrLr:rMr-rrr
rr
r]r]�sk���
�5�����K�K�
�&��L�L����]�3�S�8�9�
;�
�5�
�
5��$4���rr]c�d�eZdZdZdej
ejgefddfd�Zdddefd�Z	y)	�retry_if_resultz+Retries if the result verifies a predicate.r)rNc��||_yr	r+r,s  r
r-zretry_if_result.__init__�r.rrrc��|j�td��|jjs)|j|jj	��Sy�Nr0F�r3r4r5r)�resultrs  r
rzretry_if_result.__call__�sJ�����&��I�J�J��"�"�)�)��>�>�+�"5�"5�"<�"<�">�?�?�r�
rrrrr8r9�Anyrr-rr
rr
rdrd�s@��5�#�&�/�/�6�:�:�,��2D�"E�#�$�#��$4���rrdc�d�eZdZdZdej
ejgefddfd�Zdddefd�Z	y)	�retry_if_not_resultz*Retries if the result refutes a predicate.r)rNc��||_yr	r+r,s  r
r-zretry_if_not_result.__init__�r.rrrc��|j�td��|jjs*|j|jj	��Syrgrhrs  r
rzretry_if_not_result.__call__�sM�����&��I�J�J��"�"�)�)��~�~�k�&9�&9�&@�&@�&B�C�C�C�rrjr
rr
rmrm�s@��4�#�&�/�/�6�:�:�,��2D�"E�#�$�#��$4���rrmc�j��eZdZdZ		ddej
edej
eddf�fd�
Z�xZS)�retry_if_exception_messagez2Retries if an exception message equals or matches.N�message�matchrc�>�����r$|r"t|jj�d����rdtdtf�fd�}|}nN|r*tj|��dtdtf�fd�}|}n"t|jj�d���t�|�!|�y)Nz.() takes either 'message' or 'match', not bothr6rc� ���t|�k(Sr	)�str)r6rrs �r
�message_fncz8retry_if_exception_message.__init__.<locals>.message_fnc�s����#�i�.�0�0rc�J��t�jt|���Sr	)rrsrv)r6�progs �r
�	match_fncz6retry_if_exception_message.__init__.<locals>.match_fnc�s����D�J�J�s�9�~�6�7�7rz3() missing 1 required argument 'message' or 'match')	�	TypeErrorrHrr:r�re�compilerFr-)rrrrsrwr)rzryrHs `    @�r
r-z#retry_if_exception_message.__init__�s����
�u��t�~�~�6�6�7�7e�f�g�g��
1�}�
1��
1�$�I�
��:�:�e�$�D�
8�]�
8�t�
8�"�I��t�~�~�6�6�7�7j�k�l�l�
����#r�NN)	rrrrr8�Optionalrvr-rNrOs@r
rqrq�sF���<�)-�&*�$�����%�$����s�#�$�
�	$�$rrqc�z��eZdZdZ		d
dej
edej
eddf�fd�
Zdddefd	�Z	�xZ
S)�retry_if_not_exception_messagez5Retries until an exception message equals or matches.Nrrrsrc�T���t�|�||�|j��fd�|_y)Nc����|i|��Sr	r
)�args_�kwargs_�if_predicates  �r
rDz9retry_if_not_exception_message.__init__.<locals>.<lambda>�s���|�U�7V�g�7V�3Vr)rFr-r))rrrrsr�rHs   @�r
r-z'retry_if_not_exception_message.__init__�s$���
	����%�(��~�~��V��rrrc���|j�td��|jjsy|jj�}|�td��|j	|�Sr[r2r7s   r
rz'retry_if_not_exception_message.__call__�sa�����&��I�J�J��"�"�)�)���'�'�1�1�3�	����I�J�J��~�~�i�(�(rr~)rrrrr8rrvr-rrrNrOs@r
r�r��sY���?�)-�&*�W�����%�W����s�#�W�
�	W�
)�$4�
)��
)rr�c�0�eZdZdZdeddfd�Zdddefd�Zy)	rz1Retries if any of the retries condition is valid.�retriesrNc��||_yr	�r��rr�s  r
r-zretry_any.__init__�	����rrrc�@��t�fd�|jD��S)Nc3�.�K�|]}|�����y�wr	r
��.0�rrs  �r
�	<genexpr>z%retry_any.__call__.<locals>.<genexpr>������8�<�a�1�[�>�<���)�anyr�rs `r
rzretry_any.__call__�����8�4�<�<�8�8�8r�rrrrrr-rrr
rr
rr�s,��;������9�$4�9��9rrc�0�eZdZdZdeddfd�Zdddefd�Zy)	rz/Retries if all the retries condition are valid.r�rNc��||_yr	r�r�s  r
r-zretry_all.__init__r�rrrc�@��t�fd�|jD��S)Nc3�.�K�|]}|�����y�wr	r
r�s  �r
r�z%retry_all.__call__.<locals>.<genexpr>r�r�)�allr�rs `r
rzretry_all.__call__r�rr�r
rr
rr	s,��9������9�$4�9��9rr)rr|r8�
TYPE_CHECKING�pip._vendor.tenacityr�ABCrrKr9r�
RetryBaseTr!�retry_neverr%�retry_alwaysr(r<rQrWr]rdrmrqr�rrr
rr
�<module>r�s
��"�	�
�	���3�&����&��\�\�*�f�o�o�7G�6H�$�6N�&O�O�
P�
��:���n���J��������&C�0�C�G�"4�G�)�"4�)�6�J��<
�j�
� 
�*�
� $�!3�$�>)�%?�)�49�
�9�9�
�9rpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/wait.cpython-312.pyc000064400000030257151732702320023045 0ustar00�

R`iX���ddlZddlZddlZddlmZej
rddlmZGd�dej�ZejeejdgejeefffZ
Gd�de�ZGd	�d
e�ZGd�de�ZGd
�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Zy)�N)�_utils)�RetryCallStatec�p�eZdZdZej
dddefd��Zdd�Zddde	jdfd	�Zy
)�	wait_basez(Abstract base class for wait strategies.�retry_stater�returnc��y�N���selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/wait.py�__call__zwait_base.__call__s����otherc��t||�Sr
)�wait_combine�r
rs  r�__add__zwait_base.__add__"s���D�%�(�(r)rrc�2�|dk(r|S|j|�S�Nr)rrs  r�__radd__zwait_base.__radd__%s���A�:��K��|�|�E�"�"rN)rrrr)�__name__�
__module__�__qualname__�__doc__�abc�abstractmethod�floatrr�typing�UnionrrrrrrsN��2����
�$4�
��
��
�)�#�k�#�f�l�l�;V�.W�#rrrc�D�eZdZdZdej
ddfd�Zdddefd�Zy)	�
wait_fixedzCWait strategy that waits a fixed amount of time between each retry.�waitrNc�8�tj|�|_yr
)r�
to_secondsr#)r
r$s  r�__init__zwait_fixed.__init__2s�� �+�+�D�1��rrrc��|jSr
)r#rs  rrzwait_fixed.__call__5s�����r�	rrrrr�time_unit_typer'rrrrrr#r#/s2��M�2�V�2�2�2�t�2��$4���rr#c�$��eZdZdZd�fd�Z�xZS)�	wait_nonez7Wait strategy that doesn't wait at all before retrying.c�$��t�|�d�yr)�superr')r
�	__class__s �rr'zwait_none.__init__<s���
����r)rN)rrrrr'�
__classcell__�r/s@rr,r,9s���A��rr,c�^�eZdZdZd
dej
dej
ddfd�Zdddefd	�Zy)�wait_randomzAWait strategy that waits a random amount of time between min/max.�min�maxrNc�l�tj|�|_tj|�|_yr
)rr&�wait_random_min�wait_random_max)r
r4r5s   rr'zwait_random.__init__Cs(��%�0�0��5���%�0�0��5��rrrc�x�|jtj�|j|jz
zzSr
)r7�randomr8rs  rrzwait_random.__call__Gs0���#�#�v�}�}��$�:N�:N�QU�Qe�Qe�:e�'f�g�gr)r�r)rrrr3r3@sC��K�6�F�1�1�6�F�<Q�<Q�6�Z^�6�h�$4�h��hrr3c�0�eZdZdZdeddfd�Zdddefd�Zy)	rz#Combine several waiting strategies.�
strategiesrNc��||_yr
)�
wait_funcs�r
r=s  rr'zwait_combine.__init__N�	��$��rrrc�@��t�fd�|jD��S)Nc3�0�K�|]
}|������y�w)�rNr)�.0�xrs  �r�	<genexpr>z(wait_combine.__call__.<locals>.<genexpr>Rs�����G��!�1��-�-��s�)�sumr?rs `rrzwait_combine.__call__Qs����G�t���G�G�Gr�rrrrrr'rrrrrrrKs/��-�%�I�%�$�%�H�$4�H��Hrrc�0�eZdZdZdeddfd�Zdddefd�Zy)	�
wait_chaina�Chain two or more waiting strategies.

    If all strategies are exhausted, the very last strategy is used
    thereafter.

    For example::

        @retry(wait=wait_chain(*[wait_fixed(1) for i in range(3)] +
                               [wait_fixed(2) for j in range(5)] +
                               [wait_fixed(5) for k in range(4)))
        def wait_chained():
            print("Wait 1s for 3 attempts, 2s for 5 attempts and 5s
                   thereafter.")
    r=rNc��||_yr
)r=r@s  rr'zwait_chain.__init__erArrrc��tt|jd�t|j��}|j|dz
}||��S)Nr;rD)r4r5�attempt_number�lenr=)r
r�wait_func_no�	wait_funcs    rrzwait_chain.__call__hsB���3�{�9�9�1�=�s�4�?�?�?S�T���O�O�L�1�$4�5�	��[�1�1rrIrrrrKrKUs.��
�%�I�%�$�%�2�$4�2��2rrKc	��eZdZdZddej
fdejdejdejddfd	�Zd
ddefd�Z	y)
�wait_incrementingz�Wait an incremental amount of time after each attempt.

    Starting at a starting value and incrementing by a value for each attempt
    (and restricting the upper limit to some maximum value).
    r�d�start�	incrementr5rNc��tj|�|_tj|�|_tj|�|_yr
)rr&rUrVr5)r
rUrVr5s    rr'zwait_incrementing.__init__us:���&�&�u�-��
��*�*�9�5����$�$�S�)��rrrc��|j|j|jdz
zz}tdt	||j��S�Nr;r)rUrVrNr5r4)r
r�results   rrzwait_incrementing.__call__s<�����t�~�~��1K�1K�a�1O�P�Q���1�c�&�$�(�(�+�,�,r)
rrrrr�MAX_WAITr*r'rrrrrrSrSnsg���()�+.�%+�_�_�	*��$�$�*��(�(�*��
"�
"�	*�

�*�-�$4�-��-rrSc��eZdZdZdej
ddfdejee	fdejdejee	fdejd	d
f
d�Zdd
d	e	fd�Zy
)�wait_exponentialaWait strategy that applies exponential backoff.

    It allows for a customized multiplier and an ability to restrict the
    upper and lower limits to some maximum and minimum value.

    The intervals are fixed (i.e. there is no jitter), so this strategy is
    suitable for balancing retries against latency when a required resource is
    unavailable for an unknown duration, but *not* suitable for resolving
    contention between multiple processes for a shared resource. Use
    wait_random_exponential for the latter case.
    r;�r�
multiplierr5�exp_baser4rNc��||_tj|�|_tj|�|_||_yr
)r_rr&r4r5r`)r
r_r5r`r4s     rr'zwait_exponential.__init__�s6��%����$�$�S�)����$�$�S�)��� ��
rrrc��	|j|jdz
z}|j|z}t	t	d|j
�t||j��S#t$r|jcYSwxYwrY)r`rNr_�
OverflowErrorr5r4)r
r�exprZs    rrzwait_exponential.__call__�sm��	��-�-�K�$>�$>��$B�C�C��_�_�s�*�F��3�q�$�(�(�#�S�����%:�;�;���	��8�8�O�	�s�+A!�!A9�8A9)
rrrrrr[r r!�intrr*r'rrrrr]r]�s���
�01�%+�_�_�-.�%&�
!��L�L��e��,�
!��
"�
"�
!��,�,�s�E�z�*�	
!�
�
"�
"�
!�
�
!�<�$4�<��<rr]c�,��eZdZdZdddef�fd�Z�xZS)�wait_random_exponentialaRandom wait with exponentially widening window.

    An exponential backoff strategy used to mediate contention between multiple
    uncoordinated processes for a shared resource in distributed systems. This
    is the sense in which "exponential backoff" is meant in e.g. Ethernet
    networking, and corresponds to the "Full Jitter" algorithm described in
    this blog post:

    https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

    Each retry occurs at a random time in a geometrically expanding interval.
    It allows for a custom multiplier and an ability to restrict the upper
    limit of the random interval to some maximum value.

    Example::

        wait_random_exponential(multiplier=0.5,  # initial window 0.5s
                                max=60)          # max 60s timeout

    When waiting for an unavailable resource to become available again, as
    opposed to trying to resolve contention for a shared resource, the
    wait_exponential strategy (which uses a fixed interval) may be preferable.

    rrrc�P��t�|�|��}tjd|�S)NrDr)r.rr:�uniform)r
r�highr/s   �rrz wait_random_exponential.__call__�s&����w��K��8���~�~�a��&�&r)rrrrrrr0r1s@rrgrg�s!����2'�$4�'��'�'rrgc�Z�eZdZdZdej
ddfdededededd	f
d
�Zdddefd
�Zy	)�wait_exponential_jittera`Wait strategy that applies exponential backoff and jitter.

    It allows for a customized initial wait, maximum wait and jitter.

    This implements the strategy described here:
    https://cloud.google.com/storage/docs/retry-strategy

    The wait time is min(initial * 2**n + random.uniform(0, jitter), maximum)
    where n is the retry count.
    r;r^�initialr5r`�jitterrNc�<�||_||_||_||_yr
)rmr5r`rn)r
rmr5r`rns     rr'z wait_exponential_jitter.__init__�s �������� ��
���rrrc��tjd|j�}	|j|jdz
z}|j
|z|z}tdt||j��S#t$r|j}Y�7wxYw)Nrr;)	r:rirnr`rNrmrcr5r4)r
rrnrdrZs     rrz wait_exponential_jitter.__call__�s{������4�;�;�/��	��-�-�K�$>�$>��$B�C�C��\�\�C�'�&�0�F��1�c�&�$�(�(�+�,�,���	��X�X�F�	�s�.A0�0B�B)	rrrrrr[rr'rrrrrlrl�sb��	���_�_���
��
��
��	
�
�
�
�
�-�$4�-��-rrl)rr:r �pip._vendor.tenacityr�
TYPE_CHECKINGr�ABCrr!�Callablerre�	WaitBaseTr#r,r3rrKrSr]rgrlrrr�<module>rvs���"�
�
�'�	���3�#����#�"
�L�L��F�O�O�5E�4F����UZ�\_�U_�H`�4`�$a�a�b�	�����
��h�)�h�H�9�H�2��2�2-�	�-�,<�y�<�D'�.�'�>-�i�-rpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/before_sleep.cpython-312.pyc000064400000004457151732702320024536 0ustar00�

R`iD	���ddlZddlmZejr
ddlZddlmZdd�Z	d
ddd	ed
edejdgdffd�Z
y)�N)�_utils)�RetryCallStater�returnc��y)z'Before call strategy that does nothing.N�)�retry_states ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/before_sleep.py�before_sleep_nothingr
s���loggerzlogging.Logger�	log_level�exc_infoc�����d���fd�}|S)z:Before call strategy that logs to some logger the attempt.c�>��|j�td��|j�td��|jjrW|jj	�}d|j
j�d|��}}�r|jj	�}n!d}nd|jj�}}d}|j�d}ntj|j�}�j�d|�d	|jj�d
|�d|�d�	|�
�y)Nz&log_it() called before outcome was setz*log_it() called before next_action was set�raisedz: F�returnedz	<unknown>z	Retrying z in z seconds as it � �.)r)
�outcome�RuntimeError�next_action�failed�	exception�	__class__�__name__�result�fnr�get_callback_name�log�sleep)	r�ex�verb�value�local_exc_info�fn_namerr
rs	      ���r	�log_itz before_sleep_log.<locals>.log_it&s������&��G�H�H��"�"�*��K�L�L����%�%��$�$�.�.�0�B�"�r�|�|�'<�'<�&=�R��t�$D�%�D��!,�!4�!4�!>�!>�!@��!&��$�k�&9�&9�&@�&@�&B�%�D�"�N��>�>�!�!�G��.�.�{�~�~�>�G��
�
����y���)@�)@�)F�)F�(G��W[�V\�\]�^c�]d�de�f�#�	�	
r�rrrNr)rr
rr&s``` r	�before_sleep_logr(s���
�B�Mrr')F)�typing�pip._vendor.tenacityr�
TYPE_CHECKING�loggingrr
�int�bool�Callabler(rrr	�<module>r0sa��"�'�	����3�2��(��(��(��(��_�_�&�'��-�.�	(rpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/before.cpython-312.pyc000064400000002751151732702330023342 0ustar00�

R`i���ddlZddlmZejr
ddlZddlmZdd�Zddd	edejdgdffd
�Z	y)�N)�_utils)�RetryCallStater�returnc��y)z'Before call strategy that does nothing.N�)�retry_states ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/before.py�before_nothingr
s���loggerzlogging.Logger�	log_levelc����d��fd�}|S)z:Before call strategy that logs to some logger the attempt.c	����|j�d}ntj|j�}�j�d|�dtj|j
��d��y)Nz	<unknown>zStarting call to 'z', this is the z time calling it.)�fnr�get_callback_name�log�
to_ordinal�attempt_number)r�fn_namer
rs  ��r	�log_itzbefore_log.<locals>.log_it"sa����>�>�!�!�G��.�.�{�~�~�>�G��
�
�� ��	�*�!�,�,�[�-G�-G�H�I�IZ�
\�	
r�rrrNr)rr
rs`` r	�
before_logrs���

��Mrr)
�typing�pip._vendor.tenacityr�
TYPE_CHECKING�loggingrr
�int�Callablerrrr	�<module>rsO��"�'�	����3�2��'��C��F�O�O�M]�L^�`d�Ld�<e�rpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/stop.cpython-312.pyc000064400000012762151732702330023070 0ustar00�

R`i��J�ddlZddlZddlmZejr
ddlZddlmZGd�dej�ZejeejdgeffZGd�de�Z
Gd	�d
e�ZGd�de�Ze�ZGd
�de�ZGd�de�ZGd�de�Zy)�N)�_utils)�RetryCallStatec�N�eZdZdZej
dddefd��Zd	d�Zd
d�Z	y)�	stop_basez(Abstract base class for stop strategies.�retry_stater�returnc��y�N���selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/stop.py�__call__zstop_base.__call__s���c��t||�Sr
)�stop_all�r
�others  r�__and__zstop_base.__and__"�����e�$�$rc��t||�Sr
)�stop_anyrs  r�__or__zstop_base.__or__%rrN)rrrr)rrrr)
�__name__�
__module__�__qualname__�__doc__�abc�abstractmethod�boolrrrrrrrrs6��2����
�$4�
��
��
�%�%rrrc�0�eZdZdZdeddfd�Zdddefd�Zy)	rz+Stop if any of the stop condition is valid.�stopsrNc��||_yr
�r"�r
r"s  r�__init__zstop_any.__init__/�	����
rrrc�@��t�fd�|jD��S)Nc3�.�K�|]}|�����y�wr
r��.0�xrs  �r�	<genexpr>z$stop_any.__call__.<locals>.<genexpr>3������6�:�a�1�[�>�:���)�anyr"rs `rrzstop_any.__call__2�����6�4�:�:�6�6�6r�rrrrrr&r rrrrrr,s,��5��y��T��7�$4�7��7rrc�0�eZdZdZdeddfd�Zdddefd�Zy)	rz*Stop if all the stop conditions are valid.r"rNc��||_yr
r$r%s  rr&zstop_all.__init__9r'rrrc�@��t�fd�|jD��S)Nc3�.�K�|]}|�����y�wr
rr*s  �rr-z$stop_all.__call__.<locals>.<genexpr>=r.r/)�allr"rs `rrzstop_all.__call__<r1rr2rrrrr6s,��4��y��T��7�$4�7��7rrc� �eZdZdZdddefd�Zy)�_stop_neverzNever stop.rrrc��y)NFrrs  rrz_stop_never.__call__Cs��rN)rrrrr rrrrr9r9@s����$4���rr9c�(�eZdZdZdd�Zdddefd�Zy)	�stop_when_event_setz!Stop when the given event is set.rNc��||_yr
)�event)r
r>s  rr&zstop_when_event_set.__init__Mr'rrrc�6�|jj�Sr
)r>�is_setrs  rrzstop_when_event_set.__call__Ps���z�z� � �"�"r)r>zthreading.EventrN)rrrrr&r rrrrr<r<Js��+��#�$4�#��#rr<c�0�eZdZdZdeddfd�Zdddefd�Zy)	�stop_after_attemptz.Stop when the previous attempt >= max_attempt.�max_attempt_numberrNc��||_yr
)rC)r
rCs  rr&zstop_after_attempt.__init__Ws
��"4��rrrc�4�|j|jk\Sr
)�attempt_numberrCrs  rrzstop_after_attempt.__call__Zs���)�)�T�-D�-D�D�Dr)rrrr�intr&r rrrrrBrBTs/��8�5�3�5�4�5�E�$4�E��ErrBc�D�eZdZdZdej
ddfd�Zdddefd�Zy)	�stop_after_delayz3Stop when the time from the first attempt >= limit.�	max_delayrNc�8�tj|�|_yr
)r�
to_secondsrJ)r
rJs  rr&zstop_after_delay.__init__as���*�*�9�5��rrrc�b�|j�td��|j|jk\S)Nz4__call__() called but seconds_since_start is not set)�seconds_since_start�RuntimeErrorrJrs  rrzstop_after_delay.__call__ds/���*�*�2��U�V�V��.�.�$�.�.�@�@r)	rrrrr�time_unit_typer&r rrrrrIrI^s5��=�6�&�"7�"7�6�D�6�A�$4�A��ArrI)r�typing�pip._vendor.tenacityr�
TYPE_CHECKING�	threadingr�ABCr�Union�Callabler �	StopBaseTrrr9�
stop_neverr<rBrIrrr�<module>rZs��� �
�'�	����3�%����%�
�L�L��F�O�O�5E�4F��4L�$M�M�N�	�7�y�7�7�y�7��)���]�
�#�)�#�E��E�	A�y�	Arpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/_utils.cpython-312.pyc000064400000004474151732702330023403 0ustar00�

R`i�����ddlZddlZddlmZejdzZdedefd�Zdedefd�Z	dejd	ejfdefd
�ZejeeefZdedefd�Zy)
�N)�	timedelta��pos_num�returnc�h�|dk(ry|dk(ry|dk(ry|dk(ryd	|cxkrd
kryt|dz�S)Nr�th��str�nd��rd���
��find_ordinal�rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/_utils.pyrrsP���!�|��	�A���	�A���	�A���	
�g�	��	��
��G�b�L�)�)�c� �|�t|���S�Nrrs r�
to_ordinalr+s���Y�|�G�,�-�.�.r�cb.c�`�g}	|j|j�|st	|�S	|j
r|j
d|j
�dj|�S#t$r/	|j|j�n#t$rYnwxYwY�~wxYw#t$rY�WwxYw)znGet a callback fully-qualified name.

    If no name can be produced ``repr(cb)`` is called and returned.
    r�.)�append�__qualname__�AttributeError�__name__�repr�
__module__�insert�join)r�segmentss  r�get_callback_namer%/s���
�H��������(���B�x��	��}�}�����2�=�=�1��x�x��!�!����	��O�O�B�K�K�(���	��	�����	��	�sF�A&�(B!�&	B�0B�B�	B�B�B�B�B�!	B-�,B-�	time_unitc�`�tt|t�r|j��S|�Sr)�float�
isinstancer�
total_seconds)r&s r�
to_secondsr+Ks(���j��I�.N��(�(�*�^�^�T]�^�^r)�sys�typing�datetimer�maxsize�MAX_WAIT�int�strrr�Callable�Anyr%�Unionr(�time_unit_typer+�rr�<module>r8s���"�
��
�;�;��?��
*�#�
*�#�
*� /��/��/�"�&�/�/�#�v�z�z�/�:�"�s�"�2���c�5�)�3�4��_�.�_�U�_rpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/after.cpython-312.pyc000064400000003211151732702330023171 0ustar00�

R`i����ddlZddlmZejr
ddlZddlmZdd�Z	d
ddd	ed
edejdgdffd�Z
y)�N)�_utils)�RetryCallStater�returnc��y)z&After call strategy that does nothing.N�)�retry_states ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/after.py�
after_nothingr
s���loggerzlogging.Logger�	log_level�
sec_formatc�����d���fd�}|S)zBAfter call strategy that logs to some logger the finished attempt.c����|j�d}ntj|j�}�j�d|�d�|jz�dtj
|j��d��y)Nz	<unknown>zFinished call to 'z' after z(s), this was the z time calling it.)�fnr�get_callback_name�log�seconds_since_start�
to_ordinal�attempt_number)r�fn_namer
rrs  ���r	�log_itzafter_log.<locals>.log_it&sx����>�>�!�!�G��.�.�{�~�~�>�G��
�
�� ��	�*��+�"A�"A�A�B�C�"�-�-�k�.H�.H�I�J�J[�
]�	
r�rrrNr)rr
rrs``` r	�	after_logrs���
��Mrr)z%0.3f)�typing�pip._vendor.tenacityr�
TYPE_CHECKING�loggingrr
�int�str�Callablerrrr	�<module>r"sa��"�'�	����3�1����������_�_�&�'��-�.�	rpython3.12/site-packages/pip/_vendor/tenacity/__pycache__/nap.cpython-312.pyc000064400000002665151732702330022662 0ustar00�

R`ig��X�ddlZddlZejrddlZdeddfd�ZGd�d�Zy)�N�seconds�returnc�.�tj|�y)z�
    Sleep strategy that delays execution for a given number of seconds.

    This is the default strategy, and may be mocked out for unit testing.
    N)�time�sleep)rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/tenacity/nap.pyrrs��	�J�J�w��c�B�eZdZdZdd�Zdejeddfd�Zy)�sleep_using_eventz0Sleep strategy that waits on an event to be set.rNc��||_y)N)�event)�selfr
s  r�__init__zsleep_using_event.__init__%s	����
r	�timeoutc�<�|jj|��y)N)r)r
�wait)rrs  r�__call__zsleep_using_event.__call__(s��	
�
�
�����(r	)r
zthreading.EventrN)	�__name__�
__module__�__qualname__�__doc__r�typing�Optional�floatr�r	rrr"s&��:��)����� 6�)�4�)r	r)rr�
TYPE_CHECKING�	threadingrrrrr	r�<module>rs6��$�
�	�����5��T��	)�	)r	python3.12/site-packages/pip/_vendor/tenacity/stop.py000064400000006016151732702330016522 0ustar00# Copyright 2016–2021 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import abc
import typing

from pip._vendor.tenacity import _utils

if typing.TYPE_CHECKING:
    import threading

    from pip._vendor.tenacity import RetryCallState


class stop_base(abc.ABC):
    """Abstract base class for stop strategies."""

    @abc.abstractmethod
    def __call__(self, retry_state: "RetryCallState") -> bool:
        pass

    def __and__(self, other: "stop_base") -> "stop_all":
        return stop_all(self, other)

    def __or__(self, other: "stop_base") -> "stop_any":
        return stop_any(self, other)


StopBaseT = typing.Union[stop_base, typing.Callable[["RetryCallState"], bool]]


class stop_any(stop_base):
    """Stop if any of the stop condition is valid."""

    def __init__(self, *stops: stop_base) -> None:
        self.stops = stops

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return any(x(retry_state) for x in self.stops)


class stop_all(stop_base):
    """Stop if all the stop conditions are valid."""

    def __init__(self, *stops: stop_base) -> None:
        self.stops = stops

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return all(x(retry_state) for x in self.stops)


class _stop_never(stop_base):
    """Never stop."""

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return False


stop_never = _stop_never()


class stop_when_event_set(stop_base):
    """Stop when the given event is set."""

    def __init__(self, event: "threading.Event") -> None:
        self.event = event

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return self.event.is_set()


class stop_after_attempt(stop_base):
    """Stop when the previous attempt >= max_attempt."""

    def __init__(self, max_attempt_number: int) -> None:
        self.max_attempt_number = max_attempt_number

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return retry_state.attempt_number >= self.max_attempt_number


class stop_after_delay(stop_base):
    """Stop when the time from the first attempt >= limit."""

    def __init__(self, max_delay: _utils.time_unit_type) -> None:
        self.max_delay = _utils.to_seconds(max_delay)

    def __call__(self, retry_state: "RetryCallState") -> bool:
        if retry_state.seconds_since_start is None:
            raise RuntimeError("__call__() called but seconds_since_start is not set")
        return retry_state.seconds_since_start >= self.max_delay
python3.12/site-packages/pip/_vendor/tenacity/_utils.py000064400000004203151732702340017031 0ustar00# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import typing
from datetime import timedelta


# sys.maxsize:
# An integer giving the maximum value a variable of type Py_ssize_t can take.
MAX_WAIT = sys.maxsize / 2


def find_ordinal(pos_num: int) -> str:
    # See: https://en.wikipedia.org/wiki/English_numerals#Ordinal_numbers
    if pos_num == 0:
        return "th"
    elif pos_num == 1:
        return "st"
    elif pos_num == 2:
        return "nd"
    elif pos_num == 3:
        return "rd"
    elif 4 <= pos_num <= 20:
        return "th"
    else:
        return find_ordinal(pos_num % 10)


def to_ordinal(pos_num: int) -> str:
    return f"{pos_num}{find_ordinal(pos_num)}"


def get_callback_name(cb: typing.Callable[..., typing.Any]) -> str:
    """Get a callback fully-qualified name.

    If no name can be produced ``repr(cb)`` is called and returned.
    """
    segments = []
    try:
        segments.append(cb.__qualname__)
    except AttributeError:
        try:
            segments.append(cb.__name__)
        except AttributeError:
            pass
    if not segments:
        return repr(cb)
    else:
        try:
            # When running under sphinx it appears this can be none?
            if cb.__module__:
                segments.insert(0, cb.__module__)
        except AttributeError:
            pass
        return ".".join(segments)


time_unit_type = typing.Union[int, float, timedelta]


def to_seconds(time_unit: time_unit_type) -> float:
    return float(time_unit.total_seconds() if isinstance(time_unit, timedelta) else time_unit)
python3.12/site-packages/pip/_vendor/tenacity/retry.py000064400000021052151732702340016700 0ustar00# Copyright 2016–2021 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import abc
import re
import typing

if typing.TYPE_CHECKING:
    from pip._vendor.tenacity import RetryCallState


class retry_base(abc.ABC):
    """Abstract base class for retry strategies."""

    @abc.abstractmethod
    def __call__(self, retry_state: "RetryCallState") -> bool:
        pass

    def __and__(self, other: "retry_base") -> "retry_all":
        return retry_all(self, other)

    def __or__(self, other: "retry_base") -> "retry_any":
        return retry_any(self, other)


RetryBaseT = typing.Union[retry_base, typing.Callable[["RetryCallState"], bool]]


class _retry_never(retry_base):
    """Retry strategy that never rejects any result."""

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return False


retry_never = _retry_never()


class _retry_always(retry_base):
    """Retry strategy that always rejects any result."""

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return True


retry_always = _retry_always()


class retry_if_exception(retry_base):
    """Retry strategy that retries if an exception verifies a predicate."""

    def __init__(self, predicate: typing.Callable[[BaseException], bool]) -> None:
        self.predicate = predicate

    def __call__(self, retry_state: "RetryCallState") -> bool:
        if retry_state.outcome is None:
            raise RuntimeError("__call__() called before outcome was set")

        if retry_state.outcome.failed:
            exception = retry_state.outcome.exception()
            if exception is None:
                raise RuntimeError("outcome failed but the exception is None")
            return self.predicate(exception)
        else:
            return False


class retry_if_exception_type(retry_if_exception):
    """Retries if an exception has been raised of one or more types."""

    def __init__(
        self,
        exception_types: typing.Union[
            typing.Type[BaseException],
            typing.Tuple[typing.Type[BaseException], ...],
        ] = Exception,
    ) -> None:
        self.exception_types = exception_types
        super().__init__(lambda e: isinstance(e, exception_types))


class retry_if_not_exception_type(retry_if_exception):
    """Retries except an exception has been raised of one or more types."""

    def __init__(
        self,
        exception_types: typing.Union[
            typing.Type[BaseException],
            typing.Tuple[typing.Type[BaseException], ...],
        ] = Exception,
    ) -> None:
        self.exception_types = exception_types
        super().__init__(lambda e: not isinstance(e, exception_types))


class retry_unless_exception_type(retry_if_exception):
    """Retries until an exception is raised of one or more types."""

    def __init__(
        self,
        exception_types: typing.Union[
            typing.Type[BaseException],
            typing.Tuple[typing.Type[BaseException], ...],
        ] = Exception,
    ) -> None:
        self.exception_types = exception_types
        super().__init__(lambda e: not isinstance(e, exception_types))

    def __call__(self, retry_state: "RetryCallState") -> bool:
        if retry_state.outcome is None:
            raise RuntimeError("__call__() called before outcome was set")

        # always retry if no exception was raised
        if not retry_state.outcome.failed:
            return True

        exception = retry_state.outcome.exception()
        if exception is None:
            raise RuntimeError("outcome failed but the exception is None")
        return self.predicate(exception)


class retry_if_exception_cause_type(retry_base):
    """Retries if any of the causes of the raised exception is of one or more types.

    The check on the type of the cause of the exception is done recursively (until finding
    an exception in the chain that has no `__cause__`)
    """

    def __init__(
        self,
        exception_types: typing.Union[
            typing.Type[BaseException],
            typing.Tuple[typing.Type[BaseException], ...],
        ] = Exception,
    ) -> None:
        self.exception_cause_types = exception_types

    def __call__(self, retry_state: "RetryCallState") -> bool:
        if retry_state.outcome is None:
            raise RuntimeError("__call__ called before outcome was set")

        if retry_state.outcome.failed:
            exc = retry_state.outcome.exception()
            while exc is not None:
                if isinstance(exc.__cause__, self.exception_cause_types):
                    return True
                exc = exc.__cause__

        return False


class retry_if_result(retry_base):
    """Retries if the result verifies a predicate."""

    def __init__(self, predicate: typing.Callable[[typing.Any], bool]) -> None:
        self.predicate = predicate

    def __call__(self, retry_state: "RetryCallState") -> bool:
        if retry_state.outcome is None:
            raise RuntimeError("__call__() called before outcome was set")

        if not retry_state.outcome.failed:
            return self.predicate(retry_state.outcome.result())
        else:
            return False


class retry_if_not_result(retry_base):
    """Retries if the result refutes a predicate."""

    def __init__(self, predicate: typing.Callable[[typing.Any], bool]) -> None:
        self.predicate = predicate

    def __call__(self, retry_state: "RetryCallState") -> bool:
        if retry_state.outcome is None:
            raise RuntimeError("__call__() called before outcome was set")

        if not retry_state.outcome.failed:
            return not self.predicate(retry_state.outcome.result())
        else:
            return False


class retry_if_exception_message(retry_if_exception):
    """Retries if an exception message equals or matches."""

    def __init__(
        self,
        message: typing.Optional[str] = None,
        match: typing.Optional[str] = None,
    ) -> None:
        if message and match:
            raise TypeError(f"{self.__class__.__name__}() takes either 'message' or 'match', not both")

        # set predicate
        if message:

            def message_fnc(exception: BaseException) -> bool:
                return message == str(exception)

            predicate = message_fnc
        elif match:
            prog = re.compile(match)

            def match_fnc(exception: BaseException) -> bool:
                return bool(prog.match(str(exception)))

            predicate = match_fnc
        else:
            raise TypeError(f"{self.__class__.__name__}() missing 1 required argument 'message' or 'match'")

        super().__init__(predicate)


class retry_if_not_exception_message(retry_if_exception_message):
    """Retries until an exception message equals or matches."""

    def __init__(
        self,
        message: typing.Optional[str] = None,
        match: typing.Optional[str] = None,
    ) -> None:
        super().__init__(message, match)
        # invert predicate
        if_predicate = self.predicate
        self.predicate = lambda *args_, **kwargs_: not if_predicate(*args_, **kwargs_)

    def __call__(self, retry_state: "RetryCallState") -> bool:
        if retry_state.outcome is None:
            raise RuntimeError("__call__() called before outcome was set")

        if not retry_state.outcome.failed:
            return True

        exception = retry_state.outcome.exception()
        if exception is None:
            raise RuntimeError("outcome failed but the exception is None")
        return self.predicate(exception)


class retry_any(retry_base):
    """Retries if any of the retries condition is valid."""

    def __init__(self, *retries: retry_base) -> None:
        self.retries = retries

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return any(r(retry_state) for r in self.retries)


class retry_all(retry_base):
    """Retries if all the retries condition are valid."""

    def __init__(self, *retries: retry_base) -> None:
        self.retries = retries

    def __call__(self, retry_state: "RetryCallState") -> bool:
        return all(r(retry_state) for r in self.retries)
python3.12/site-packages/pip/_vendor/tenacity/before_sleep.py000064400000004504151732702340020170 0ustar00# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import typing

from pip._vendor.tenacity import _utils

if typing.TYPE_CHECKING:
    import logging

    from pip._vendor.tenacity import RetryCallState


def before_sleep_nothing(retry_state: "RetryCallState") -> None:
    """Before call strategy that does nothing."""


def before_sleep_log(
    logger: "logging.Logger",
    log_level: int,
    exc_info: bool = False,
) -> typing.Callable[["RetryCallState"], None]:
    """Before call strategy that logs to some logger the attempt."""

    def log_it(retry_state: "RetryCallState") -> None:
        local_exc_info: BaseException | bool | None

        if retry_state.outcome is None:
            raise RuntimeError("log_it() called before outcome was set")

        if retry_state.next_action is None:
            raise RuntimeError("log_it() called before next_action was set")

        if retry_state.outcome.failed:
            ex = retry_state.outcome.exception()
            verb, value = "raised", f"{ex.__class__.__name__}: {ex}"

            if exc_info:
                local_exc_info = retry_state.outcome.exception()
            else:
                local_exc_info = False
        else:
            verb, value = "returned", retry_state.outcome.result()
            local_exc_info = False  # exc_info does not apply when no exception

        if retry_state.fn is None:
            # NOTE(sileht): can't really happen, but we must please mypy
            fn_name = "<unknown>"
        else:
            fn_name = _utils.get_callback_name(retry_state.fn)

        logger.log(
            log_level,
            f"Retrying {fn_name} " f"in {retry_state.next_action.sleep} seconds as it {verb} {value}.",
            exc_info=local_exc_info,
        )

    return log_it
python3.12/site-packages/pip/_vendor/tenacity/_asyncio.py000064400000006737151732702350017355 0ustar00# Copyright 2016 Étienne Bersac
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import functools
import sys
import typing as t
from asyncio import sleep

from pip._vendor.tenacity import AttemptManager
from pip._vendor.tenacity import BaseRetrying
from pip._vendor.tenacity import DoAttempt
from pip._vendor.tenacity import DoSleep
from pip._vendor.tenacity import RetryCallState

WrappedFnReturnT = t.TypeVar("WrappedFnReturnT")
WrappedFn = t.TypeVar("WrappedFn", bound=t.Callable[..., t.Awaitable[t.Any]])


class AsyncRetrying(BaseRetrying):
    sleep: t.Callable[[float], t.Awaitable[t.Any]]

    def __init__(self, sleep: t.Callable[[float], t.Awaitable[t.Any]] = sleep, **kwargs: t.Any) -> None:
        super().__init__(**kwargs)
        self.sleep = sleep

    async def __call__(  # type: ignore[override]
        self, fn: WrappedFn, *args: t.Any, **kwargs: t.Any
    ) -> WrappedFnReturnT:
        self.begin()

        retry_state = RetryCallState(retry_object=self, fn=fn, args=args, kwargs=kwargs)
        while True:
            do = self.iter(retry_state=retry_state)
            if isinstance(do, DoAttempt):
                try:
                    result = await fn(*args, **kwargs)
                except BaseException:  # noqa: B902
                    retry_state.set_exception(sys.exc_info())  # type: ignore[arg-type]
                else:
                    retry_state.set_result(result)
            elif isinstance(do, DoSleep):
                retry_state.prepare_for_next_attempt()
                await self.sleep(do)
            else:
                return do  # type: ignore[no-any-return]

    def __iter__(self) -> t.Generator[AttemptManager, None, None]:
        raise TypeError("AsyncRetrying object is not iterable")

    def __aiter__(self) -> "AsyncRetrying":
        self.begin()
        self._retry_state = RetryCallState(self, fn=None, args=(), kwargs={})
        return self

    async def __anext__(self) -> AttemptManager:
        while True:
            do = self.iter(retry_state=self._retry_state)
            if do is None:
                raise StopAsyncIteration
            elif isinstance(do, DoAttempt):
                return AttemptManager(retry_state=self._retry_state)
            elif isinstance(do, DoSleep):
                self._retry_state.prepare_for_next_attempt()
                await self.sleep(do)
            else:
                raise StopAsyncIteration

    def wraps(self, fn: WrappedFn) -> WrappedFn:
        fn = super().wraps(fn)
        # Ensure wrapper is recognized as a coroutine function.

        @functools.wraps(fn)
        async def async_wrapped(*args: t.Any, **kwargs: t.Any) -> t.Any:
            return await fn(*args, **kwargs)

        # Preserve attributes
        async_wrapped.retry = fn.retry  # type: ignore[attr-defined]
        async_wrapped.retry_with = fn.retry_with  # type: ignore[attr-defined]

        return async_wrapped  # type: ignore[return-value]
python3.12/site-packages/pip/_vendor/tenacity/__init__.py000064400000050015151732702350017274 0ustar00# Copyright 2016-2018 Julien Danjou
# Copyright 2017 Elisey Zanko
# Copyright 2016 Étienne Bersac
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import functools
import sys
import threading
import time
import typing as t
import warnings
from abc import ABC, abstractmethod
from concurrent import futures
from inspect import iscoroutinefunction

# Import all built-in retry strategies for easier usage.
from .retry import retry_base  # noqa
from .retry import retry_all  # noqa
from .retry import retry_always  # noqa
from .retry import retry_any  # noqa
from .retry import retry_if_exception  # noqa
from .retry import retry_if_exception_type  # noqa
from .retry import retry_if_exception_cause_type  # noqa
from .retry import retry_if_not_exception_type  # noqa
from .retry import retry_if_not_result  # noqa
from .retry import retry_if_result  # noqa
from .retry import retry_never  # noqa
from .retry import retry_unless_exception_type  # noqa
from .retry import retry_if_exception_message  # noqa
from .retry import retry_if_not_exception_message  # noqa

# Import all nap strategies for easier usage.
from .nap import sleep  # noqa
from .nap import sleep_using_event  # noqa

# Import all built-in stop strategies for easier usage.
from .stop import stop_after_attempt  # noqa
from .stop import stop_after_delay  # noqa
from .stop import stop_all  # noqa
from .stop import stop_any  # noqa
from .stop import stop_never  # noqa
from .stop import stop_when_event_set  # noqa

# Import all built-in wait strategies for easier usage.
from .wait import wait_chain  # noqa
from .wait import wait_combine  # noqa
from .wait import wait_exponential  # noqa
from .wait import wait_fixed  # noqa
from .wait import wait_incrementing  # noqa
from .wait import wait_none  # noqa
from .wait import wait_random  # noqa
from .wait import wait_random_exponential  # noqa
from .wait import wait_random_exponential as wait_full_jitter  # noqa
from .wait import wait_exponential_jitter  # noqa

# Import all built-in before strategies for easier usage.
from .before import before_log  # noqa
from .before import before_nothing  # noqa

# Import all built-in after strategies for easier usage.
from .after import after_log  # noqa
from .after import after_nothing  # noqa

# Import all built-in after strategies for easier usage.
from .before_sleep import before_sleep_log  # noqa
from .before_sleep import before_sleep_nothing  # noqa

# Replace a conditional import with a hard-coded None so that pip does
# not attempt to use tornado even if it is present in the environment.
# If tornado is non-None, tenacity will attempt to execute some code
# that is sensitive to the version of tornado, which could break pip
# if an old version is found.
tornado = None  # type: ignore

if t.TYPE_CHECKING:
    import types

    from .retry import RetryBaseT
    from .stop import StopBaseT
    from .wait import WaitBaseT


WrappedFnReturnT = t.TypeVar("WrappedFnReturnT")
WrappedFn = t.TypeVar("WrappedFn", bound=t.Callable[..., t.Any])


class TryAgain(Exception):
    """Always retry the executed function when raised."""


NO_RESULT = object()


class DoAttempt:
    pass


class DoSleep(float):
    pass


class BaseAction:
    """Base class for representing actions to take by retry object.

    Concrete implementations must define:
    - __init__: to initialize all necessary fields
    - REPR_FIELDS: class variable specifying attributes to include in repr(self)
    - NAME: for identification in retry object methods and callbacks
    """

    REPR_FIELDS: t.Sequence[str] = ()
    NAME: t.Optional[str] = None

    def __repr__(self) -> str:
        state_str = ", ".join(f"{field}={getattr(self, field)!r}" for field in self.REPR_FIELDS)
        return f"{self.__class__.__name__}({state_str})"

    def __str__(self) -> str:
        return repr(self)


class RetryAction(BaseAction):
    REPR_FIELDS = ("sleep",)
    NAME = "retry"

    def __init__(self, sleep: t.SupportsFloat) -> None:
        self.sleep = float(sleep)


_unset = object()


def _first_set(first: t.Union[t.Any, object], second: t.Any) -> t.Any:
    return second if first is _unset else first


class RetryError(Exception):
    """Encapsulates the last attempt instance right before giving up."""

    def __init__(self, last_attempt: "Future") -> None:
        self.last_attempt = last_attempt
        super().__init__(last_attempt)

    def reraise(self) -> "t.NoReturn":
        if self.last_attempt.failed:
            raise self.last_attempt.result()
        raise self

    def __str__(self) -> str:
        return f"{self.__class__.__name__}[{self.last_attempt}]"


class AttemptManager:
    """Manage attempt context."""

    def __init__(self, retry_state: "RetryCallState"):
        self.retry_state = retry_state

    def __enter__(self) -> None:
        pass

    def __exit__(
        self,
        exc_type: t.Optional[t.Type[BaseException]],
        exc_value: t.Optional[BaseException],
        traceback: t.Optional["types.TracebackType"],
    ) -> t.Optional[bool]:
        if exc_type is not None and exc_value is not None:
            self.retry_state.set_exception((exc_type, exc_value, traceback))
            return True  # Swallow exception.
        else:
            # We don't have the result, actually.
            self.retry_state.set_result(None)
            return None


class BaseRetrying(ABC):
    def __init__(
        self,
        sleep: t.Callable[[t.Union[int, float]], None] = sleep,
        stop: "StopBaseT" = stop_never,
        wait: "WaitBaseT" = wait_none(),
        retry: "RetryBaseT" = retry_if_exception_type(),
        before: t.Callable[["RetryCallState"], None] = before_nothing,
        after: t.Callable[["RetryCallState"], None] = after_nothing,
        before_sleep: t.Optional[t.Callable[["RetryCallState"], None]] = None,
        reraise: bool = False,
        retry_error_cls: t.Type[RetryError] = RetryError,
        retry_error_callback: t.Optional[t.Callable[["RetryCallState"], t.Any]] = None,
    ):
        self.sleep = sleep
        self.stop = stop
        self.wait = wait
        self.retry = retry
        self.before = before
        self.after = after
        self.before_sleep = before_sleep
        self.reraise = reraise
        self._local = threading.local()
        self.retry_error_cls = retry_error_cls
        self.retry_error_callback = retry_error_callback

    def copy(
        self,
        sleep: t.Union[t.Callable[[t.Union[int, float]], None], object] = _unset,
        stop: t.Union["StopBaseT", object] = _unset,
        wait: t.Union["WaitBaseT", object] = _unset,
        retry: t.Union[retry_base, object] = _unset,
        before: t.Union[t.Callable[["RetryCallState"], None], object] = _unset,
        after: t.Union[t.Callable[["RetryCallState"], None], object] = _unset,
        before_sleep: t.Union[t.Optional[t.Callable[["RetryCallState"], None]], object] = _unset,
        reraise: t.Union[bool, object] = _unset,
        retry_error_cls: t.Union[t.Type[RetryError], object] = _unset,
        retry_error_callback: t.Union[t.Optional[t.Callable[["RetryCallState"], t.Any]], object] = _unset,
    ) -> "BaseRetrying":
        """Copy this object with some parameters changed if needed."""
        return self.__class__(
            sleep=_first_set(sleep, self.sleep),
            stop=_first_set(stop, self.stop),
            wait=_first_set(wait, self.wait),
            retry=_first_set(retry, self.retry),
            before=_first_set(before, self.before),
            after=_first_set(after, self.after),
            before_sleep=_first_set(before_sleep, self.before_sleep),
            reraise=_first_set(reraise, self.reraise),
            retry_error_cls=_first_set(retry_error_cls, self.retry_error_cls),
            retry_error_callback=_first_set(retry_error_callback, self.retry_error_callback),
        )

    def __repr__(self) -> str:
        return (
            f"<{self.__class__.__name__} object at 0x{id(self):x} ("
            f"stop={self.stop}, "
            f"wait={self.wait}, "
            f"sleep={self.sleep}, "
            f"retry={self.retry}, "
            f"before={self.before}, "
            f"after={self.after})>"
        )

    @property
    def statistics(self) -> t.Dict[str, t.Any]:
        """Return a dictionary of runtime statistics.

        This dictionary will be empty when the controller has never been
        ran. When it is running or has ran previously it should have (but
        may not) have useful and/or informational keys and values when
        running is underway and/or completed.

        .. warning:: The keys in this dictionary **should** be some what
                     stable (not changing), but there existence **may**
                     change between major releases as new statistics are
                     gathered or removed so before accessing keys ensure that
                     they actually exist and handle when they do not.

        .. note:: The values in this dictionary are local to the thread
                  running call (so if multiple threads share the same retrying
                  object - either directly or indirectly) they will each have
                  there own view of statistics they have collected (in the
                  future we may provide a way to aggregate the various
                  statistics from each thread).
        """
        try:
            return self._local.statistics  # type: ignore[no-any-return]
        except AttributeError:
            self._local.statistics = t.cast(t.Dict[str, t.Any], {})
            return self._local.statistics

    def wraps(self, f: WrappedFn) -> WrappedFn:
        """Wrap a function for retrying.

        :param f: A function to wraps for retrying.
        """

        @functools.wraps(f)
        def wrapped_f(*args: t.Any, **kw: t.Any) -> t.Any:
            return self(f, *args, **kw)

        def retry_with(*args: t.Any, **kwargs: t.Any) -> WrappedFn:
            return self.copy(*args, **kwargs).wraps(f)

        wrapped_f.retry = self  # type: ignore[attr-defined]
        wrapped_f.retry_with = retry_with  # type: ignore[attr-defined]

        return wrapped_f  # type: ignore[return-value]

    def begin(self) -> None:
        self.statistics.clear()
        self.statistics["start_time"] = time.monotonic()
        self.statistics["attempt_number"] = 1
        self.statistics["idle_for"] = 0

    def iter(self, retry_state: "RetryCallState") -> t.Union[DoAttempt, DoSleep, t.Any]:  # noqa
        fut = retry_state.outcome
        if fut is None:
            if self.before is not None:
                self.before(retry_state)
            return DoAttempt()

        is_explicit_retry = fut.failed and isinstance(fut.exception(), TryAgain)
        if not (is_explicit_retry or self.retry(retry_state)):
            return fut.result()

        if self.after is not None:
            self.after(retry_state)

        self.statistics["delay_since_first_attempt"] = retry_state.seconds_since_start
        if self.stop(retry_state):
            if self.retry_error_callback:
                return self.retry_error_callback(retry_state)
            retry_exc = self.retry_error_cls(fut)
            if self.reraise:
                raise retry_exc.reraise()
            raise retry_exc from fut.exception()

        if self.wait:
            sleep = self.wait(retry_state)
        else:
            sleep = 0.0
        retry_state.next_action = RetryAction(sleep)
        retry_state.idle_for += sleep
        self.statistics["idle_for"] += sleep
        self.statistics["attempt_number"] += 1

        if self.before_sleep is not None:
            self.before_sleep(retry_state)

        return DoSleep(sleep)

    def __iter__(self) -> t.Generator[AttemptManager, None, None]:
        self.begin()

        retry_state = RetryCallState(self, fn=None, args=(), kwargs={})
        while True:
            do = self.iter(retry_state=retry_state)
            if isinstance(do, DoAttempt):
                yield AttemptManager(retry_state=retry_state)
            elif isinstance(do, DoSleep):
                retry_state.prepare_for_next_attempt()
                self.sleep(do)
            else:
                break

    @abstractmethod
    def __call__(
        self,
        fn: t.Callable[..., WrappedFnReturnT],
        *args: t.Any,
        **kwargs: t.Any,
    ) -> WrappedFnReturnT:
        pass


class Retrying(BaseRetrying):
    """Retrying controller."""

    def __call__(
        self,
        fn: t.Callable[..., WrappedFnReturnT],
        *args: t.Any,
        **kwargs: t.Any,
    ) -> WrappedFnReturnT:
        self.begin()

        retry_state = RetryCallState(retry_object=self, fn=fn, args=args, kwargs=kwargs)
        while True:
            do = self.iter(retry_state=retry_state)
            if isinstance(do, DoAttempt):
                try:
                    result = fn(*args, **kwargs)
                except BaseException:  # noqa: B902
                    retry_state.set_exception(sys.exc_info())  # type: ignore[arg-type]
                else:
                    retry_state.set_result(result)
            elif isinstance(do, DoSleep):
                retry_state.prepare_for_next_attempt()
                self.sleep(do)
            else:
                return do  # type: ignore[no-any-return]


if sys.version_info[1] >= 9:
    FutureGenericT = futures.Future[t.Any]
else:
    FutureGenericT = futures.Future


class Future(FutureGenericT):
    """Encapsulates a (future or past) attempted call to a target function."""

    def __init__(self, attempt_number: int) -> None:
        super().__init__()
        self.attempt_number = attempt_number

    @property
    def failed(self) -> bool:
        """Return whether a exception is being held in this future."""
        return self.exception() is not None

    @classmethod
    def construct(cls, attempt_number: int, value: t.Any, has_exception: bool) -> "Future":
        """Construct a new Future object."""
        fut = cls(attempt_number)
        if has_exception:
            fut.set_exception(value)
        else:
            fut.set_result(value)
        return fut


class RetryCallState:
    """State related to a single call wrapped with Retrying."""

    def __init__(
        self,
        retry_object: BaseRetrying,
        fn: t.Optional[WrappedFn],
        args: t.Any,
        kwargs: t.Any,
    ) -> None:
        #: Retry call start timestamp
        self.start_time = time.monotonic()
        #: Retry manager object
        self.retry_object = retry_object
        #: Function wrapped by this retry call
        self.fn = fn
        #: Arguments of the function wrapped by this retry call
        self.args = args
        #: Keyword arguments of the function wrapped by this retry call
        self.kwargs = kwargs

        #: The number of the current attempt
        self.attempt_number: int = 1
        #: Last outcome (result or exception) produced by the function
        self.outcome: t.Optional[Future] = None
        #: Timestamp of the last outcome
        self.outcome_timestamp: t.Optional[float] = None
        #: Time spent sleeping in retries
        self.idle_for: float = 0.0
        #: Next action as decided by the retry manager
        self.next_action: t.Optional[RetryAction] = None

    @property
    def seconds_since_start(self) -> t.Optional[float]:
        if self.outcome_timestamp is None:
            return None
        return self.outcome_timestamp - self.start_time

    def prepare_for_next_attempt(self) -> None:
        self.outcome = None
        self.outcome_timestamp = None
        self.attempt_number += 1
        self.next_action = None

    def set_result(self, val: t.Any) -> None:
        ts = time.monotonic()
        fut = Future(self.attempt_number)
        fut.set_result(val)
        self.outcome, self.outcome_timestamp = fut, ts

    def set_exception(
        self, exc_info: t.Tuple[t.Type[BaseException], BaseException, "types.TracebackType| None"]
    ) -> None:
        ts = time.monotonic()
        fut = Future(self.attempt_number)
        fut.set_exception(exc_info[1])
        self.outcome, self.outcome_timestamp = fut, ts

    def __repr__(self) -> str:
        if self.outcome is None:
            result = "none yet"
        elif self.outcome.failed:
            exception = self.outcome.exception()
            result = f"failed ({exception.__class__.__name__} {exception})"
        else:
            result = f"returned {self.outcome.result()}"

        slept = float(round(self.idle_for, 2))
        clsname = self.__class__.__name__
        return f"<{clsname} {id(self)}: attempt #{self.attempt_number}; slept for {slept}; last result: {result}>"


@t.overload
def retry(func: WrappedFn) -> WrappedFn:
    ...


@t.overload
def retry(
    sleep: t.Callable[[t.Union[int, float]], None] = sleep,
    stop: "StopBaseT" = stop_never,
    wait: "WaitBaseT" = wait_none(),
    retry: "RetryBaseT" = retry_if_exception_type(),
    before: t.Callable[["RetryCallState"], None] = before_nothing,
    after: t.Callable[["RetryCallState"], None] = after_nothing,
    before_sleep: t.Optional[t.Callable[["RetryCallState"], None]] = None,
    reraise: bool = False,
    retry_error_cls: t.Type["RetryError"] = RetryError,
    retry_error_callback: t.Optional[t.Callable[["RetryCallState"], t.Any]] = None,
) -> t.Callable[[WrappedFn], WrappedFn]:
    ...


def retry(*dargs: t.Any, **dkw: t.Any) -> t.Any:
    """Wrap a function with a new `Retrying` object.

    :param dargs: positional arguments passed to Retrying object
    :param dkw: keyword arguments passed to the Retrying object
    """
    # support both @retry and @retry() as valid syntax
    if len(dargs) == 1 and callable(dargs[0]):
        return retry()(dargs[0])
    else:

        def wrap(f: WrappedFn) -> WrappedFn:
            if isinstance(f, retry_base):
                warnings.warn(
                    f"Got retry_base instance ({f.__class__.__name__}) as callable argument, "
                    f"this will probably hang indefinitely (did you mean retry={f.__class__.__name__}(...)?)"
                )
            r: "BaseRetrying"
            if iscoroutinefunction(f):
                r = AsyncRetrying(*dargs, **dkw)
            elif tornado and hasattr(tornado.gen, "is_coroutine_function") and tornado.gen.is_coroutine_function(f):
                r = TornadoRetrying(*dargs, **dkw)
            else:
                r = Retrying(*dargs, **dkw)

            return r.wraps(f)

        return wrap


from pip._vendor.tenacity._asyncio import AsyncRetrying  # noqa:E402,I100

if tornado:
    from pip._vendor.tenacity.tornadoweb import TornadoRetrying


__all__ = [
    "retry_base",
    "retry_all",
    "retry_always",
    "retry_any",
    "retry_if_exception",
    "retry_if_exception_type",
    "retry_if_exception_cause_type",
    "retry_if_not_exception_type",
    "retry_if_not_result",
    "retry_if_result",
    "retry_never",
    "retry_unless_exception_type",
    "retry_if_exception_message",
    "retry_if_not_exception_message",
    "sleep",
    "sleep_using_event",
    "stop_after_attempt",
    "stop_after_delay",
    "stop_all",
    "stop_any",
    "stop_never",
    "stop_when_event_set",
    "wait_chain",
    "wait_combine",
    "wait_exponential",
    "wait_fixed",
    "wait_incrementing",
    "wait_none",
    "wait_random",
    "wait_random_exponential",
    "wait_full_jitter",
    "wait_exponential_jitter",
    "before_log",
    "before_nothing",
    "after_log",
    "after_nothing",
    "before_sleep_log",
    "before_sleep_nothing",
    "retry",
    "WrappedFn",
    "TryAgain",
    "NO_RESULT",
    "DoAttempt",
    "DoSleep",
    "BaseAction",
    "RetryAction",
    "RetryError",
    "AttemptManager",
    "BaseRetrying",
    "Retrying",
    "Future",
    "RetryCallState",
    "AsyncRetrying",
]
python3.12/site-packages/pip/_vendor/tenacity/py.typed000064400000000000151732702350016647 0ustar00python3.12/site-packages/pip/_vendor/tenacity/nap.py000064400000002547151732702350016322 0ustar00# Copyright 2016 Étienne Bersac
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import time
import typing

if typing.TYPE_CHECKING:
    import threading


def sleep(seconds: float) -> None:
    """
    Sleep strategy that delays execution for a given number of seconds.

    This is the default strategy, and may be mocked out for unit testing.
    """
    time.sleep(seconds)


class sleep_using_event:
    """Sleep strategy that waits on an event to be set."""

    def __init__(self, event: "threading.Event") -> None:
        self.event = event

    def __call__(self, timeout: typing.Optional[float]) -> None:
        # NOTE(harlowja): this may *not* actually wait for timeout
        # seconds if the event is set (ie this may eject out early).
        self.event.wait(timeout=timeout)
python3.12/site-packages/pip/_vendor/tenacity/before.py000064400000003032151732702350016774 0ustar00# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import typing

from pip._vendor.tenacity import _utils

if typing.TYPE_CHECKING:
    import logging

    from pip._vendor.tenacity import RetryCallState


def before_nothing(retry_state: "RetryCallState") -> None:
    """Before call strategy that does nothing."""


def before_log(logger: "logging.Logger", log_level: int) -> typing.Callable[["RetryCallState"], None]:
    """Before call strategy that logs to some logger the attempt."""

    def log_it(retry_state: "RetryCallState") -> None:
        if retry_state.fn is None:
            # NOTE(sileht): can't really happen, but we must please mypy
            fn_name = "<unknown>"
        else:
            fn_name = _utils.get_callback_name(retry_state.fn)
        logger.log(
            log_level,
            f"Starting call to '{fn_name}', "
            f"this is the {_utils.to_ordinal(retry_state.attempt_number)} time calling it.",
        )

    return log_it
python3.12/site-packages/pip/_vendor/tenacity/wait.py000064400000017530151732702350016506 0ustar00# Copyright 2016–2021 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import abc
import random
import typing

from pip._vendor.tenacity import _utils

if typing.TYPE_CHECKING:
    from pip._vendor.tenacity import RetryCallState


class wait_base(abc.ABC):
    """Abstract base class for wait strategies."""

    @abc.abstractmethod
    def __call__(self, retry_state: "RetryCallState") -> float:
        pass

    def __add__(self, other: "wait_base") -> "wait_combine":
        return wait_combine(self, other)

    def __radd__(self, other: "wait_base") -> typing.Union["wait_combine", "wait_base"]:
        # make it possible to use multiple waits with the built-in sum function
        if other == 0:  # type: ignore[comparison-overlap]
            return self
        return self.__add__(other)


WaitBaseT = typing.Union[wait_base, typing.Callable[["RetryCallState"], typing.Union[float, int]]]


class wait_fixed(wait_base):
    """Wait strategy that waits a fixed amount of time between each retry."""

    def __init__(self, wait: _utils.time_unit_type) -> None:
        self.wait_fixed = _utils.to_seconds(wait)

    def __call__(self, retry_state: "RetryCallState") -> float:
        return self.wait_fixed


class wait_none(wait_fixed):
    """Wait strategy that doesn't wait at all before retrying."""

    def __init__(self) -> None:
        super().__init__(0)


class wait_random(wait_base):
    """Wait strategy that waits a random amount of time between min/max."""

    def __init__(self, min: _utils.time_unit_type = 0, max: _utils.time_unit_type = 1) -> None:  # noqa
        self.wait_random_min = _utils.to_seconds(min)
        self.wait_random_max = _utils.to_seconds(max)

    def __call__(self, retry_state: "RetryCallState") -> float:
        return self.wait_random_min + (random.random() * (self.wait_random_max - self.wait_random_min))


class wait_combine(wait_base):
    """Combine several waiting strategies."""

    def __init__(self, *strategies: wait_base) -> None:
        self.wait_funcs = strategies

    def __call__(self, retry_state: "RetryCallState") -> float:
        return sum(x(retry_state=retry_state) for x in self.wait_funcs)


class wait_chain(wait_base):
    """Chain two or more waiting strategies.

    If all strategies are exhausted, the very last strategy is used
    thereafter.

    For example::

        @retry(wait=wait_chain(*[wait_fixed(1) for i in range(3)] +
                               [wait_fixed(2) for j in range(5)] +
                               [wait_fixed(5) for k in range(4)))
        def wait_chained():
            print("Wait 1s for 3 attempts, 2s for 5 attempts and 5s
                   thereafter.")
    """

    def __init__(self, *strategies: wait_base) -> None:
        self.strategies = strategies

    def __call__(self, retry_state: "RetryCallState") -> float:
        wait_func_no = min(max(retry_state.attempt_number, 1), len(self.strategies))
        wait_func = self.strategies[wait_func_no - 1]
        return wait_func(retry_state=retry_state)


class wait_incrementing(wait_base):
    """Wait an incremental amount of time after each attempt.

    Starting at a starting value and incrementing by a value for each attempt
    (and restricting the upper limit to some maximum value).
    """

    def __init__(
        self,
        start: _utils.time_unit_type = 0,
        increment: _utils.time_unit_type = 100,
        max: _utils.time_unit_type = _utils.MAX_WAIT,  # noqa
    ) -> None:
        self.start = _utils.to_seconds(start)
        self.increment = _utils.to_seconds(increment)
        self.max = _utils.to_seconds(max)

    def __call__(self, retry_state: "RetryCallState") -> float:
        result = self.start + (self.increment * (retry_state.attempt_number - 1))
        return max(0, min(result, self.max))


class wait_exponential(wait_base):
    """Wait strategy that applies exponential backoff.

    It allows for a customized multiplier and an ability to restrict the
    upper and lower limits to some maximum and minimum value.

    The intervals are fixed (i.e. there is no jitter), so this strategy is
    suitable for balancing retries against latency when a required resource is
    unavailable for an unknown duration, but *not* suitable for resolving
    contention between multiple processes for a shared resource. Use
    wait_random_exponential for the latter case.
    """

    def __init__(
        self,
        multiplier: typing.Union[int, float] = 1,
        max: _utils.time_unit_type = _utils.MAX_WAIT,  # noqa
        exp_base: typing.Union[int, float] = 2,
        min: _utils.time_unit_type = 0,  # noqa
    ) -> None:
        self.multiplier = multiplier
        self.min = _utils.to_seconds(min)
        self.max = _utils.to_seconds(max)
        self.exp_base = exp_base

    def __call__(self, retry_state: "RetryCallState") -> float:
        try:
            exp = self.exp_base ** (retry_state.attempt_number - 1)
            result = self.multiplier * exp
        except OverflowError:
            return self.max
        return max(max(0, self.min), min(result, self.max))


class wait_random_exponential(wait_exponential):
    """Random wait with exponentially widening window.

    An exponential backoff strategy used to mediate contention between multiple
    uncoordinated processes for a shared resource in distributed systems. This
    is the sense in which "exponential backoff" is meant in e.g. Ethernet
    networking, and corresponds to the "Full Jitter" algorithm described in
    this blog post:

    https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

    Each retry occurs at a random time in a geometrically expanding interval.
    It allows for a custom multiplier and an ability to restrict the upper
    limit of the random interval to some maximum value.

    Example::

        wait_random_exponential(multiplier=0.5,  # initial window 0.5s
                                max=60)          # max 60s timeout

    When waiting for an unavailable resource to become available again, as
    opposed to trying to resolve contention for a shared resource, the
    wait_exponential strategy (which uses a fixed interval) may be preferable.

    """

    def __call__(self, retry_state: "RetryCallState") -> float:
        high = super().__call__(retry_state=retry_state)
        return random.uniform(0, high)


class wait_exponential_jitter(wait_base):
    """Wait strategy that applies exponential backoff and jitter.

    It allows for a customized initial wait, maximum wait and jitter.

    This implements the strategy described here:
    https://cloud.google.com/storage/docs/retry-strategy

    The wait time is min(initial * 2**n + random.uniform(0, jitter), maximum)
    where n is the retry count.
    """

    def __init__(
        self,
        initial: float = 1,
        max: float = _utils.MAX_WAIT,  # noqa
        exp_base: float = 2,
        jitter: float = 1,
    ) -> None:
        self.initial = initial
        self.max = max
        self.exp_base = exp_base
        self.jitter = jitter

    def __call__(self, retry_state: "RetryCallState") -> float:
        jitter = random.uniform(0, self.jitter)
        try:
            exp = self.exp_base ** (retry_state.attempt_number - 1)
            result = self.initial * exp + jitter
        except OverflowError:
            result = self.max
        return max(0, min(result, self.max))
python3.12/site-packages/pip/_vendor/idna/compat.py000064400000000501151732702350016106 0ustar00from .core import *
from .codec import *
from typing import Any, Union

def ToASCII(label: str) -> bytes:
    return encode(label)

def ToUnicode(label: Union[bytes, bytearray]) -> str:
    return decode(label)

def nameprep(s: Any) -> None:
    raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol')

python3.12/site-packages/pip/_vendor/idna/__pycache__/idnadata.cpython-312.pyc000064400000113036151732702350022741 0ustar00�

R`iW����dZdddddd�Zidd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d��id,d�d-d�d.d�d/d�d0d�d1d�d2d3�d4d�d5d�d6d�d7d�d8d�d9d�d:d�d;d�d<d�d=d��id>d�d?d�d@d�dAd�dBd�dCd�dDd�dEd�dFd�dGd�dHd�dId�dJd�dKd�dLd�dMd�dNd��idOd�dPd�dQd�dRd�dSd�dTd�dUd�dVd�dWd�dXd�dYd�dZd�d[d�d\d�d]d�d^d�d_d��id`d�dad�dbd�dcd�ddd�ded�dfd�dgd�dhd�did�djd�dkd�dld�dmd�dnd�dod�dpd��idqd�drd�dsd�dtd�dud�dvd�dwd�dxd�dyd�dzd�d{d�d|d�d}d�d~d�dd�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d��dd��dd��dd��dd��dd��dd��dd��dd��dd��d	d��d
d��i�dd��dd��d
d��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��i�dd��dd��dd��dd��d d3��d!d��d"d��d#d��d$d��d%d��d&d��d'd��d(d��d)d��d*d��d+d��d,d��i�d-d��d.d��d/d��d0d��d1d��d2d��d3d��d4d��d5d��d6d��d7d��d8d��d9d��d:d��d;d��d<d��d=d��i�d>d��d?d��d@d��dAd��dBd��dCd��dDd��dEd��dFd��dGd��dHd��dId��dJd��dKd��dLd��dMd��dNd��i�dOd��dPd��dQd��dRd��dSd��dTd��dUd��dVd��dWd��dXd3��dYd3��dZd3��d[d��d\d��d]d��d^d��d_d��i�d`d��dad��dbd��dcd��ddd��ded��dfd��dgd��dhd��did��djd��dkd��dld��dmd��dnd��dod��dpd��i�dqd��drd��dsd��dtd��dud��dvd��dwd��dxd��dyd��dzd��d{d��d|d��d}d��d~d��dd��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d3��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d�d���d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��dd��dd��dd��dd��dd��dd��dd��dd��dd��d	d��i�d
d��dd��dd��d
d��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd3��dd��dd��i�dd��dd��dd��dd��dd��d d��d!d��d"d��d#d��d$d��d%d��d&d��d'd��d(d��d)d��d*d��d+d��i�d,d��d-d��d.d��d/d��d0d��d1d��d2d��d3d��d4d��d5d��d6d��d7d��d8d��d9d��d:d��d;d��d<d��i�d=d��d>d��d?d��d@d��dAd��dBd��dCd��dDd��dEd��dFd��dGd��dHd��dId��dJd��dKd��dLd��dMd��i�dNd��dOd��dP�dQ��dRd��dSd��dTd��dUd��dVd��dWd��dXd��dYd��dZd��d[d��d\d��d]d��d^d��d_d��i�d`�dQ��dad��dbd��dcd��ddd��ded��dfd��dgd��dhd��did��dj�dQ��dkd��dld��dmd��dnd��dod��dpd��i�dqd��drd��dsd��dtd��dud��dvd��dwd��dxd��dyd��dzd��d{d��d|d��d}d��d~d��dd��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d��dQ��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��dd��d�dQ��dd��dd��dd��dd��dd��dd��dd��d	d��i�d
d��dd��dd��d
d��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��dd��i�dd��dd��dd��dd��dd��d d��d!d��d"d��d#d��d$d��d%d��d&d��d'd��d(d��d)d��d*d��d+d��i�d,d��d-d��d.d��d/d��d0d��d1d��d2d��d3d��d4d��d5d��d6d��d7d��d8d��d9d��d:d��d;d��d<d��dddddddddddd��d=��Z�d>�d?�d@�dA�Z�yB(Cz15.0.0)$lt�
lx�
l~�
l��
l�l�l� l�0l�8l��l�l+�tlbtulk�ul��vl|l`|lF�|lN }�X@}lZd}l\l}l^t}l~|}l�~l��~l�l�Xl�tl��l��l'!�lf+�-l�l��lFRH)l�.:l�.l:l�/<l0@l0@l*0�@l<0�@��MPl 8lnzdl�z�il�o�?��o�?��&�:7�8]��N�`��k�:lz`�K��#@M)	l�D��@l��l7{tll={�ll?{�llB{mlE{mlP{m)��0Al�0tBl 1@
�31�D
�S1@E
lrH)��0�Bl1�C�2�Gl�2@KlX3Llp�}l��}��/�?
��/�?
��/�?
l0@
l#1�D
�V1TE
�h1�E
)�Greek�Han�Hebrew�Hiragana�Katakanai�Uiiiiiiii �Di!i"�Ri#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@�CiAiBiCiDiEiFiGiHiIiJinioiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�Tiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/iMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXi`iaibicidieifigihiiijipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iii
ii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i i
 i/ if ig ih ii i@�iA�iB�iC�iD�iE�iF�iG�iH�iI�iJ�iK�iL�iM�iN�iO�iP�iQ�iR�iS�iT�iU�iV�iW�iX�iY�iZ�i[�i\�i]�i^�i_�i`�ia�ib�ic�id�ie�if�ig�ih�ii�ij�ik�il�im�in�io�ip�iq�ir��Lis�i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i
i
i
i
i
i
i
i
i
i	
i

i
i
i

i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i 
i!
i"
i#
i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiQiRiSiTipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i	�i
�i�i�i
�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i �i!�i"�i#�i$�i%�i&�i'�i(�i)�i*�i+�i,�i-�i.�i/�i0�i1�i2�i3�i4�i5�i6�i7�i8�)i9�i:�i;�i<�i=�i>�i?�i@�iA�iB�iC�iK�(�l.�l:�l{�l�|l�lllll
$l,l4l<lDlLlTl\ldllltl |l"�l$�l&�l(�l*�l,�l.�l0�l2�l6�l9�l;�l=�l?�lClElGlI lL,lN4lP<lRDlTLlVTlX\lZdl\ll^tl`|lb�ld�lf�lh�lj�ll�ln�lp�lr�lt�lv�lx�l{�l}�l�l�l�l�l� l�0l�Hl�Tl�dl�xl��l��l��l��l��l��l��l��l��l��l��l�8l�@l�Hl�Pl�Xl�`l�hl�pl�|l��l��l��l��l��l��l��l��l��l��l��l��l�lllll
$l,l4l<lDlLlTl\ldllltl |l"�l$�l&�l(�l*�l,�l.�l0�l2�l:�l=�lA�lC	lH	lJ$	lL,	lN4	l�<	l��
l�l��l��l@lC
lO
lp@
lr�
lt�
lx�
l~�
l�@l��l�\l�dl�ll�tl�|l��l��l��l��l��l��l��l��l��l��l��l`�lb�ld�lf�lh�lj�ll�ln�lp�lr�lt�lv�lx�lz�l|�l~�l��l�l�l�,l�4l�<l�Dl�Ll�Tl�\l�dl�ll�tl�|l��l��l��l��l��l��l��l��l��l��l��l��l��l��l��l��l�l�l�l� l�(l�0l�8l�Dl�Ll�Tl�\l�dl�ll�tl�|l��l��l��l��l��l��l��l��l��l��l��l��l��l��l��l�lllll
$l,l4l<lDlLlTl\ldllltl |l"�l$�l&�l(�l*�l,�l.�l0�lZdl��l� l�Dl��l�l�l�rl��l@l@�l`lu�l��l�Tl�|l��l�lK@l�4l�l��l. l\!lk�!l��!l�$"l�`"lX	�#ld	�%lp	�%l�	�%l�	&l�	<&l�	L&l�	�&l�	�&l�	�&l�	�&l�	'l�	,'l�	\'l�	�'l�	�'l�	�'l�	�'l
(l
(l
<(l)
L(l1
�(l3
�(l6
�(l:
�(l=
�(lC
�(lI
)lN
,)lR
D)l]
p)lv
�)l�
*l�
*l�
<*l�
L*l�
�*l�
�*l�
�*l�
�*l�
+l�
,+l�
@+l�
�+l�
�+l�+l,l
,l<,l)L,l1�,l4�,l:�,lE�,lI-lN,-lXT-ld|-lp�-lr�-l�.l�.l�8.l�H.l�d.l�p.l�x.l��.l��.l��.l��.l�/l�(/l�@/l�\/l��/l
0l80l)H0l:�0lE�0lI1lN(1lWT1l[`1l^t1ld�1lp�1l�2l�2l�82l�H2l��2l��2l��2l�3l�(3l�T3l�t3l��3l��3l��3l

4l
84lE
H4lI
5lO
(5lX
P5ld
|5lp
�5l�
�5l�
6l�
6l�
h6l�
�6l�
�6l�
7l�
(7l�
<7l�
X7l�
`7l�
�7l�
�7l38l;�8lO9lZ@9l�:l�:l�:l�0:l��:l��:l��:l�;l�;l� ;l�@;l�x;l<l,<l`<l*�<l6�<l8�<l:�<lC�<lH=lM$=lR8=lWL=l\`=lit=lm�=ls�=lu�=l��=l�>l�>l�P>l�d>l�x>l��>l��>l��>l��>l�?lJ@l�@Al�@Cl�ClIHlN(IlW@IlY`Il^hIl��Il�(Jl�@Jl��Jl��Jl�Kl�Kl� Kl`KlHLl[`Ll`tMl�Nl��NlmPl��Yl�Zl��Zl��[l\l5|\lT]lm�]lq�]lt�]l�^l��^l�\_l�p_l��_l@`ly�`l�bl��bldl,�dl<�dlnelu�el�fl��fl�@glhl_�hl}�il��il�@jl��jl��jl��jlMllZ@mlt�ml�nl8plJql~4ql�@sl�Psl,tl0�tl<�tlO8ulx�ul��ulwlxlxlxlxl
$xl,xl4xl<xlDxlLxlTxl\xldxllxltxl |xl"�xl$�xl&�xl(�xl*�xl,�xl.�xl0�xl2�xl4�xl6�xl8�xl:�xl<�xl>�xl@�xlBylDylFylHylJ$ylL,ylN4ylP<ylRDylTLylVTylX\ylZdyl\lyl^tyl`|ylb�yld�ylf�ylh�ylj�yll�yln�ylp�ylr�ylt�ylv�ylx�ylz�yl|�yl~�yl��yl�zl�zl�zl�zl�$zl�,zl�4zl�<zl�Dzl�Lzl�Tzl�pzl�|zl��zl��zl��zl��zl��zl��zl��zl��zl��zl��zl��zl��zl��zl��zl��zl��zl�{l�{l�{l�{l�${l�,{l�4{l�<{l�D{l�L{l�T{l�\{l�d{l�l{l�t{l�|{l��{l��{l��{l��{l��{l��{l��{l��{l��{l��{l��{l��{l��{l��{l��{l�{l@|l(�|l8�|lF}rlh�}lq�}ls�}lu�}lw�}ly�}l{�}l}�}l��~l��~l�l�@l�Xl��l��l��lO!8l�!l`,�0lb,�1lg,�1li,�1lk,�1lm,�1lr,�1lu,�1l|,�1l�,2l�,2l�,2l�,2l�,$2l�,,2l�,42l�,<2l�,D2l�,L2l�,T2l�,\2l�,d2l�,l2l�,t2l�,|2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,�2l�,3l�,3l�,3l�,3l�,$3l�,,3l�,43l�,<3l�,D3l�,L3l�,T3l�,\3l�,d3l�,l3l�,t3l�,|3l�,�3l�,�3l�,�3l�,�3l�,�3l&-4l(-�4l.-�4lh-�4l�-�5l�-�6l�-�6l�-�6l�-�6l�-7l�- 7l�-@7l�-`7l.�7l0.�8l0@l.0�@l=0�@r
l�0dBl�0tBrl�0�Cl01Dl�1�Frrl�$8l�$@l
&l,&@lB&lD&lF&lH&lJ&$lL&,lN&4lP&<lR&DlT&LlV&TlX&\lZ&dl\&ll^&tl`&|lb&�ld&�lf&�lh&�lj&�ll&�lp&�l~&�l�&�l�&l�&l�&l�&l�&$l�&,l�&4l�&<l�&Dl�&Ll�&Tl�&\l�&dl�&ll�&xl�&�l '\l$'�l&'�l('�l*'�l,'�l.'�l2'�l4'�l6'�l8'�l:'�l<'�l>'�l@'�lB'lD'lF'lH'lJ'$lL',lN'4lP'<lR'DlT'LlV'TlX'\lZ'dl\'ll^'tl`'|lb'�ld'�lf'�lh'�lj'�ll'�ln'�lp'�ly'�l{'�l}'�l�'�l�'l�'l�'l�'l�'0l�'8l�'Dl�'Ll�'\l�'dl�'ll�'tl�'|l�'�l�'�l�'�l�'�l�'�l�'�l�'�l�'�l�'�l�'�l�'�l�'�l�'l�'l�' l�'(l�'Dl�'Ll�'Tl�'\l�'dl�'�l�'�l((�l-(� lt(!l�("l�(@#l�(�#l�(�#l.)�#lT)�$l�)&l�)<'l�)�'l7*(lN*)lZ*@)lw*�)l�*�)l�*l+l�*�+l�*�+l+,l+$,l+D,l'+�,l/+�,l[+�,li+�-l�+/l�+�/l�+�/l�W0lz8hlzDhlzLhl z|hl"z�hl%z�hl*z�hl{xll0~�xlt~�yll'4l;�l>�lN�l^@l�l��l�
l��
l��l lA�lJ
l{@
l�l��l� l��l��l�`l(ld�l�\l��l��l��l7lVlh�l�l�l��l l	  l6( l9� l=� lV� lw�!l�"l��#l��#l	$l:	�$l�	&l�	�&l
(l
(l
0(l
T(l6
d(l;
�(l@
�(l}
�)l�
*l�
+l�
$+l6,lV-ls�-l�.lI0l�3l(
4l:
�4l�:l��:l��:l�;l(�<lQ�<l��=l��>l��?lG@lv�Al��Al�Cl�@Cl��Cl5Dl@�DlHElt@Elw�El�Fl�$Gl�8Gl�pGlHl8LHlB�Hl�Jl� Jl�(Jl�<Jl�|Jl��Jl��KlLl
Ll<Ll)LLl1�Ll4�Ll:�LlE�LlIMlN,MlQ@MlX\MldtMlm�Mlu�MlKPlZ@QlbxQl�Rl�Sl�@Sl�Vl��Vl�`WlAXlEYlZ@Yl�Zl�[l\l,t\l:�\lG]l;`l�cl�cl
$dl0dlTdl6`dl9�dlD�dlZ@el��fl��fl�hgl��gl?hlHil�@il�tjl��jl	pl7(plA�plZ@ql��ql�Hrl��rltl
 tl7,tl;�tl>�tlH�tlZ@ulf�uli�ul��ul�@vl�Lvl��vl��{l|l;H|lC�|lZ@}l��~l�#	lD%	l�/@>	l04@	lV4Q	lGF
l9j l_j)ljj�)l�j�)l�j+l�j@+l�j�+l7k,lDk-lZk@-lxk�-l�k�-l�n�9lKo<l�o<=l�o<>l�o�?l�o�?rl�@l� l	
4rrrl#1@
rrrrl�2�E
lk<p
l}<�q
l�<r
l�<@r
l�<tr
l.O<lGO�<l7ZhlmZ�hlvZ�il�Zjl�Zljl�Z�jl_|l+_�|l`l` l"`ll%`�l+`�ln`�l�`<l-al>a�lJalOa8l�b@
l�bl�d@l�g�l�g�l�g�l�g�l�h l�h@#lLi�$lZi@%rrrrr	r
r)l 0)l��lv�
l��lj�l��l�0�C)�PVALID�CONTEXTJ�CONTEXTON)�__version__�scripts�
joining_types�codepoint_classes����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/idnadata.py�<module>r,s0����%�L�.
���ca��D}�	�2�}�	�2�}�
�2�}�
�2�	}�

�2�}�
�2�
}�
�2�}�
�2�}�
�2�}�
�2�}�
�2�}�
�2�}�
�2�}�
�2�}�
�2�}� 
�2�!}�"
�2�#}�$
�2�%}�&
�2�'}�(
�2�)}�*
�2�+}�,
�2�-}�.
�2�/}�0
�2�1}�2
�2�3}�4
�2�5}�6
�2�7}�8
�2�9}�:
�2�;}�<
�2�=}�>
�2�?}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@	
�2�A	}�B	
�2�C	}�D	
�2�E	}�F	
�2�G	}�H	
�2�I	}�J	
�2�K	}�L	
�2�M	}�N	
�2�O	}�P	
�2�Q	}�R	
�2�S	}�T	
�2�U	}�V	
�2�W	}�X	
�2�Y	}�Z	
�2�[	}�\	
�2�]	}�^	
�2�_	}�`	
�2�a	}�b	
�2�c	}�d	
�2�e	}�f	
�2�g	}�h	
�2�i	}�j	
�2�k	}�l	
�2�m	}�n	
�2�o	}�p	
�2�q	}�r	
�2�s	}�t	
�2�u	}�v	
�2�w	}�x	
�2�y	}�z	
�2�{	}�|	
�2�}	}�~	
�2�	}�@

�2�A
}�B

�2�C
}�D

�2�E
}�F

�2�G
}�H

�2�I
}�J

�2�K
}�L

�2�M
}�N

�2�O
}�P

�2�Q
}�R

�2�S
}�T

�2�U
}�V

�2�W
}�X

�2�Y
}�Z

�2�[
}�\

�2�]
}�^

�2�_
}�`

�2�a
}�b

�2�c
}�d

�2�e
}�f

�2�g
}�h

�2�i
}�j

�2�k
}�l

�2�m
}�n

�2�o
}�p

�2�q
}�r

�2�s
}�t

�2�u
}�v

�2�w
}�x

�2�y
}�z

�2�{
}�|

�2�}
}�~

�2�
}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J
�2�K}�L
�2�M}�N
�2�O}�P
�2�Q}�R
�2�S}�T
�2�U}�V
�2�W}�X
�2�Y}�Z
�2�[}�\
�2�]}�^
�2�_}�`
�2�a}�b
�2�c}�d
�2�e}�f
�2�g}�h
�2�i}�j
�2�k}�l
�2�m}�n
�2�o}�p
�2�q}�r
�2�s}�t
�2�u}�v
�2�w}�x
�2�y}�z
�2�{}�|
�2�}}�~
�2�}�@
�2�A}�B
�2�C}�D
�2�E}�F
�2�G}�H
�2�I}�J�B�K}�L�B�M}�N�B�O}�P�B�Q}�R�B�S}�T�B�U}�V�B�W}�X�B�Y}�Z�B�[}�\�B�]}�^�B�_}�`�B�a}�b�B�c}�d�B�e}�f�B�g}�h�B�i}�j�B�k}�l�B�m}�n�B�o}�p�B�q}�r�B�s}�t�B�u}�v�B�w}�x�B�y}�z�B�{}�|�B�}}�~�B�}�@
�B�A
}�B
�B�C
}�D
�B�E
}�F
�B�G
}�H
�B�I
}�J
�B�K
}�L
�B�M
}�N
�B�O
}�P
�B�Q
}�R
�B�S
}�T
�B�U
}�V
�B�W
}�X
�B�Y
}�Z
�B�[
}�\
�B�]
}�^
�B�_
}�`
�B�a
}�b
�B�c
}�d
�B�e
}�f
�B�g
}�h
�B�i
}�j
�B�k
}�l
�B�m
}�n
�B�o
}�p
�B�q
}�r
�B�s
}�t
�B�u
}�v
�B�w
}�x
�B�y
}�z
�B�{
}�|
�B�}
}�~
�B�
}�@�B�A}�B�B�C}�D�B�E}�F�B�G}�H�B�I}�J�B�K}�L�B�M}�N�B�O}�P�B�Q}�R�B�S}�T�B�U}�V�B�W}�X�B�Y}�Z�B�[}�\�B�]}�^�B�_}�`�B�a}�b�B�c}�d�B�e}�f�B�g}�h�B�i}�j�B�k}�l�B�m}�n�B�o}�p�B�q}�r�B�s}�t�B�u}�v�B�w}�x�B�y}�z�B�{}�|�B�}}�~�B�}�@�B�A}�B�B�C}�D�B�E}�F�B�G}�H�B�I}�J�B�K}�L�B�M}�N�B�O}�P�B�Q}�R�B�S}�T�B�U}�V�B�W}�X�B�Y}�Z�B�[}�\�B�]}�^�B�_}�`�B�a}�b�B�c}�d�B�e}�f�B�g}�h�B�i}�j�B�k}�l�B�m}�n�B�o}�p�B�q}�r�B�s}�t�B�u}�v�B�w}�x�B�y}�z�B�{}�|�B�}}�~�B�}�@�B�A}�B�B�C}�D�B�E}�F�B�G}�H�B�I}�J�B�K}�L�B�M}�N�B�O}�P�B�Q}�R�B�S}�T�B�U}�V�B�W}�X�B�Y}�Z�B�[}�\�B�]}�^�B�_}�`�B�a}�b�B�c}�d�B�e}�f�B�g}�h�B�i}�j�B�k}�l�B�m}�n�B�o}�p�B�q}�r�B�s}�t�B�u}�v�B�w}�x�B�y}�z�B�{}�|�B�}}�~�B�}�@�B�A}�B�B�C}�D�B�E}�F�B�G}�H�B�I}�J�B�K}�L�B�M}�N�B�O}�P�B�Q}�R�B�S}�T�B�U}�V�B�W}�X�B�Y}�Z�B�[}�\�B�]}�^�B�_}�`�B�a}�b�B�c}�d�B�e}�f�B�g}�h�B�i}�j�B�k}�l�B�m}�n�B�o}�p�B�q}�r�B�s}�t�B�u}�v�B�w}�x�B�y}�z�B�{}�|�B�}}�~�B�}�@�B�A}�B�B�C}�D�B�E}�F�B�G}�H�B�I}�J�B�K}�L�B�M}�N�R�O}�P�R�Q}�R�R�S}�T�R�U}�V�R�W}�X�R�Y}�Z�R�[}�\�R�]}�^�R�_}�`�R�a}�b�R�c}�d�R�e}�f�R�g}�h�R�i}�j�R�k}�l�R�m}�n�R�o}�p�R�q}�r�R�s}�t�R�u}�v�R�w}�x�R�y}�z�R�{}�|�R�}}�~�R�}�@�R�A}�B�R�C}�D�R�E}�F�R�G}�H�R�I}�J�R�K}�L�R�M}�N�R�O}�P�R�Q}�R�R�S}�T�R�U}�V�R�W}�X�R�Y}�Z�R�[}�\�R�]}�^�R�_}�`�R�a}�b�R�c}�d�R�e}�f�R�g}�h�R�i}�j�R�k}�l�R�m}�n�R�o}�p�R�q}�r�R�s}�t�R�u}�v�R�w}�x�R�y}�z�R�{}�|�R�}}�~�R�}�@�R�A}�B�R�C}�D�R�E}�F�R�G}�H�R�I}�J�R�K}�L�R�M}�N�R�O}�P�R�Q}�R�R�S}�T�R�U}�V�R�W}�X�R�Y}�Z�R�[}�\�R�]}�^�R�_}�`�R�a}�b�R�c}�d�R�e}�f�R�g}�h�R�i}�j�R�k}�l�R�m}�n�R�o}�p�R�q}�r�R�s}�t�R�u}�v�R�w}�x�R�y}�z�R�{}�|�R�}}�~�R�}�@�R�A}�B�R�C}�D�R�E}�F�R�G}�H�R�I}�J�R�K}�L�R�M}�N�R�O}�P�R�Q}�R�R�S}�T�R�U}�V�R�W}�X�R�Y}�Z�R�[}�\�R�]}�^�R�_}�`�R�a}�b�R�c}�d�R�e}�f�R�g}�h�R�i}�j�R�k}�l�R�m}�n�R�o}�p�R�q}�r�R�s}�t�R�u}�v�R�w}�x�R�y}�z�R�{}�|�R�}}�~�R�}�@�R�A}�B�R�C}�D�R�E}�F�R�G}�H�R�I}�J�R�K}�L�R�M}�N�R�O}�P�R�Q}�R�R�S}�T�R�U}�V�R�W}�X�R�Y}�Z�R�[}�\�R�]}�^�R�_}�`�R�a}�b�R�c}�d�R�e}�f�R�g}�h�R�i}�j�R�k}�l�R�m}�n�R�o}�p�R�q}�r�R�s}�t�R�u}�v�R�w}�x�R�y}�z�R�{}�|�R�}}�~�R�}�@�R�A}�B�R�C}�D�R�E}�F�R�G}�H�R�I}�J�R�K}�L�R�M}�N�R�O}�P�R�Q}�R�R�S}�T�R�U}�V�R�W}�X�R�Y}�Z�R�[}�\�R�]}�^�R�_}�`�R�a}�b�R�c}�d�R�e}�f�R�g}�h�R�i}�j�R�k}�l�R�m}�n�R�o}�p�R�q}�r�R�s}�t�R�u}�v�R�w}�x�R�y}�z�R�{}�|�R�}}�~�R�}�@�R�A}�B�R�C}�D�R�E}�F�R�G}�H�R�I}�J�R�K}�L�R�M}�N�R�O}�P�R�Q}�R�R�S}�T�R�U}�V�R�W}�X�R�Y}�Z�R�[}�\�R�]}�^�R�_}�`�R�a}�b�R�c}�d�R�e}�f�R�g}�h�R�i}�j�R�k}�l�R�m}�n�R�o}�p�R�q}�r�R�s}�t�R�u}�v�R�w}�x�R�y}�z�R�{}�|�R�}}�~�R�}�@�R�A}�B�R�C}�D�R�E}�F�R�G}�H�R�I}�J�R�K}�L�R�M}�N�R�O}�P�R�Q}�R�R�S}�T�R�U}�V�R�W}�X�R�Y}�Z�R�[}�\�R�]}�^�R�_}�`�R�a}�b�
�
�
�
�
�
�
�
�
�
�
�y}�
�~v�n%��w%C�r*python3.12/site-packages/pip/_vendor/idna/__pycache__/intranges.cpython-312.pyc000064400000005171151732702350023166 0ustar00�

R`iY���dZddlZddlmZmZdeedeedffd�Zded	edefd
�Zdedeeeffd�Zd
edeedfde	fd�Z
y)a	
Given a list of integers, made up of (hopefully) a small number of long runs
of consecutive integers, compute a representation of the form
((start1, end1), (start2, end2) ...). Then answer the question "was x present
in the original list?" in time O(log(# runs)).
�N)�List�Tuple�list_�return.c��t|�}g}d}tt|��D]V}|dzt|�kr||||dzdz
k(r�&||dz|dz}|jt	|d|ddz��|}�Xt|�S)aRepresent a list of integers as a sequence of ranges:
    ((start_0, end_0), (start_1, end_1), ...), such that the original
    integers are exactly those x such that start_i <= x < end_i for some i.

    Ranges are encoded as single integers (start << 32 | end), not as tuples.
    ����r)�sorted�range�len�append�
_encode_range�tuple)r�sorted_list�ranges�
last_write�i�
current_ranges      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/intranges.py�intranges_from_listrs�����-�K�
�F��J�
�3�{�#�
$���Q�3��[�!�!��1�~��Q�q�S�!1�!�!3�3��#�J�q�L��1��5�
��
�
�m�M�!�$4�m�B�6G�!�6K�L�M��
�
%���=���start�endc��|dz|zS)N� �)rrs  rrr s���R�K�3��r�rc��|dz	|dzfS)Nrl��r)rs r�
_decode_ranger#s��
��G�q�M�*�+�+r�int_rc���t|d�}tj||�}|dkDr!t||dz
�\}}||cxkr|kry|t	|�krt||�\}}||k(ryy)z=Determine if `int_` falls into one of the ranges in `ranges`.rr	TF)r�bisect�bisect_leftrr)r r�tuple_�pos�left�right�_s       r�intranges_containr)'s���
�4��
#�F�
�
�
�V�V�
,�C��Q�w�#�F�3�q�5�M�2���e��4��%��� ��S��[����s��,���a��4�<��r)�__doc__r"�typingrr�intrrr�boolr)rrr�<module>r.s�������t�C�y��U�3��8�_��*���3��3��,�S�,�U�3��8�_�,��C���s�C�x���T�rpython3.12/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-312.pyc000064400000001641151732702350022731 0ustar00�

R`iQ��t�ddlmZddlmZmZmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZddlmZgd�Zy)�)�__version__)�
IDNABidiError�	IDNAError�InvalidCodepoint�InvalidCodepointContext�alabel�
check_bidi�check_hyphen_ok�check_initial_combiner�check_label�	check_nfc�decode�encode�ulabel�uts46_remap�valid_contextj�valid_contexto�valid_label_length�valid_string_length)�intranges_contain)rrrrrr	r
rrr
rrrrrrrrrN)�package_datar�corerrrrrr	r
rrr
rrrrrrrr�	intrangesr�__all__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/__init__.py�<module>rs-��%������()��rpython3.12/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-312.pyc000064400000466306151732702350023026 0ustar00�

R`i�&��L�ddlmZmZmZ	dZdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Z	deeeeefeeeefffd�Z
deeeeefeeeefffd�Zdeeeeefeeeefffd	�Zdeeeeefeeeefffd
�Z
deeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd
�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Zdeeeeefeeeefffd�Z deeeeefeeeefffd�Z!deeeeefeeeefffd�Z"deeeeefeeeefffd �Z#deeeeefeeeefffd!�Z$deeeeefeeeefffd"�Z%deeeeefeeeefffd#�Z&deeeeefeeeefffd$�Z'deeeeefeeeefffd%�Z(deeeeefeeeefffd&�Z)deeeeefeeeefffd'�Z*deeeeefeeeefffd(�Z+deeeeefeeeefffd)�Z,deeeeefeeeefffd*�Z-deeeeefeeeefffd+�Z.deeeeefeeeefffd,�Z/deeeeefeeeefffd-�Z0deeeeefeeeefffd.�Z1deeeeefeeeefffd/�Z2deeeeefeeeefffd0�Z3deeeeefeeeefffd1�Z4deeeeefeeeefffd2�Z5deeeeefeeeefffd3�Z6deeeeefeeeefffd4�Z7deeeeefeeeefffd5�Z8deeeeefeeeefffd6�Z9deeeeefeeeefffd7�Z:deeeeefeeeefffd8�Z;deeeeefeeeefffd9�Z<deeeeefeeeefffd:�Z=deeeeefeeeefffd;�Z>deeeeefeeeefffd<�Z?deeeeefeeeefffd=�Z@deeeeefeeeefffd>�ZAdeeeeefeeeefffd?�ZBdeeeeefeeeefffd@�ZCdeeeeefeeeefffdA�ZDdeeeeefeeeefffdB�ZEdeeeeefeeeefffdC�ZFdeeeeefeeeefffdD�ZGdeeeeefeeeefffdE�ZHdeeeeefeeeefffdF�ZIdeeeeefeeeefffdG�ZJdeeeeefeeeefffdH�ZKdeeeeefeeeefffdI�ZLdeeeeefeeeefffdJ�ZMdeeeeefeeeefffdK�ZNdeeeeefeeeefffdL�ZOdeeeeefeeeefffdM�ZPdeeeeefeeeefffdN�ZQdeeeeefeeeefffdO�ZRdeeeeefeeeefffdP�ZSdeeeeefeeeefffdQ�ZTdeeeeefeeeefffdR�ZUdeeeeefeeeefffdS�ZVdeeeeefeeeefffdT�ZWdeeeeefeeeefffdU�ZXeYe�e�ze	�ze
�ze�ze�ze
�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze�ze �ze!�ze"�ze#�ze$�ze%�ze&�ze'�ze(�ze)�ze*�ze+�ze,�ze-�ze.�ze/�ze0�ze1�ze2�ze3�ze4�ze5�ze6�ze7�ze8�ze9�ze:�ze;�ze<�ze=�ze>�ze?�ze@�zeA�zeB�zeC�zeD�zeE�zeF�zeG�zeH�zeI�zeJ�zeK�zeL�zeM�zeN�zeO�zeP�zeQ�zeR�zeS�zeT�zeU�zeV�zeW�zeX�z�ZZyV)W�)�List�Tuple�Unionz15.0.0�returnc�
�gd�S)N)d)r�3)�r)�r)�r)�r)�r)�r)�r)�r)�	r)�
r)�r)�r)�
r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)�r)� r)�!r)�"r)�#r)�$r)�%r)�&r)�'r)�(r)�)r)�*r)�+r)�,r)�-�V)�.r6)�/r)�0r6)�1r6)�2r6)�3r6)�4r6)�5r6)�6r6)�7r6)�8r6)�9r6)�:r)�;r)�<r)�=r)�>r)�?r)�@r)�A�M�a)�BrK�b)�CrK�c)�DrK�d)�ErK�e)�FrK�f)�GrK�g)�HrK�h)�IrK�i)�JrK�j)�KrK�k)�LrK�l)�MrK�m)�NrK�n)�OrK�o)�PrK�p)�QrK�q)�RrK�r)�SrK�s)�TrK�t)�UrK�u)�VrK�v)�WrK�w)�XrK�x)�YrK�y)�ZrK�z)�[r)�\r)�]r)�^r)�_r)�`r)�ar6)�br6)�cr6�r����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/uts46data.py�_seg_0r����e�er�c�
�gd�S)N)d)�dr6)�er6)�fr6)�gr6)�hr6)�ir6)�jr6)�kr6)�lr6)�mr6)�nr6)�or6)�pr6)�qr6)�rr6)�sr6)�tr6)�ur6)�vr6)�wr6)�xr6)�yr6)�zr6)�{r)�|r)�}r)�~r)�r)��X)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r�)�r� )�r6)�r6)�r6)�r6)�r6)�r6)�r6)�ru ̈)�r6)�rKrL)�r6)�r6)��I)�r6)�r� ̄)�r6)�r6)�rK�2)�rKr)�r� ́)�rK�μ)�r6)�r6)�ru ̧)�rK�1)�rKrh)�r6)�rKu1⁄4)�rKu1⁄2)�rKu3⁄4)�r6)�rK�à)�rK�á)��rK�â)��rK�ã)��rK�ä)��rK�å)��rK�æ)��rK�çr�r�r�r��_seg_1rsr�r�c�
�gd�S)N)d)��rK�è)��rK�é)��rK�ê)��rK�ë)��rK�ì)��rK�í)��rK�î)��rK�ï)��rK�ð)��rK�ñ)��rK�ò)��rK�ó)��rK�ô)��rK�õ)��rK�ö)��r6)��rK�ø)��rK�ù)��rK�ú)��rK�û)��rK�ü)��rK�ý)��rK�þ)���D�ss)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)��r6)�r6)�r6)�r6)�r6)�r6)�r6)�r6)�r6)�r6)�r6)�r6)�rKuā)ir6)irKuă)ir6)irKuą)ir6)irKuć)ir6)irKuĉ)i	r6)i
rKuċ)ir6)irKuč)i
r6)irKuď)ir6)irKuđ)ir6)irKuē)ir6)irKuĕ)ir6)irKuė)ir6)irKuę)ir6)irKuě)ir6)irKuĝ)ir6)irKuğ)ir6)i rKuġ)i!r6)i"rKuģ)i#r6)i$rKuĥ)i%r6)i&rK�ħ)i'r6)i(rKuĩ)i)r6)i*rKuī)i+r6r�r�r�r��_seg_2rV�r�r�c�
�gd�S)N)d)i,rKuĭ)i-r6)i.rKuį)i/r6)i0rKui̇)i1r6)i2rK�ij)i4rKuĵ)i5r6)i6rKuķ)i7r6)i9rKuĺ)i:r6)i;rKuļ)i<r6)i=rKuľ)i>r6)i?rKul·)iArKuł)iBr6)iCrKuń)iDr6)iErKuņ)iFr6)iGrKuň)iHr6)iIrKuʼn)iJrK�ŋ)iKr6)iLrKuō)iMr6)iNrKuŏ)iOr6)iPrKuő)iQr6)iRrK�œ)iSr6)iTrKuŕ)iUr6)iVrKuŗ)iWr6)iXrKuř)iYr6)iZrKuś)i[r6)i\rKuŝ)i]r6)i^rKuş)i_r6)i`rKuš)iar6)ibrKuţ)icr6)idrKuť)ier6)ifrKuŧ)igr6)ihrKuũ)iir6)ijrKuū)ikr6)ilrKuŭ)imr6)inrKuů)ior6)iprKuű)iqr6)irrKuų)isr6)itrKuŵ)iur6)ivrKuŷ)iwr6)ixrK�ÿ)iyrKuź)izr6)i{rKuż)i|r6)i}rKuž)i~r6)irKrp)i�r6)i�rK�ɓ)i�rKuƃ)i�r6)i�rKuƅ)i�r6)i�rK�ɔ)i�rKuƈ)i�r6)i�rK�ɖ)i�rK�ɗ)i�rKuƌ)i�r6)i�rK�ǝ)i�rK�ə)i�rK�ɛ)i�rKuƒ)i�r6)i�rK�ɠr�r�r�r��_seg_3rdCr�r�c�
�gd�S)N)d)i�rK�ɣ)i�r6)i�rK�ɩ)i�rK�ɨ)i�rKuƙ)i�r6)i�rK�ɯ)i�rK�ɲ)i�r6)i�rK�ɵ)i�rKuơ)i�r6)i�rKuƣ)i�r6)i�rKuƥ)i�r6)i�rK�ʀ)i�rKuƨ)i�r6)i�rK�ʃ)i�r6)i�rKuƭ)i�r6)i�rK�ʈ)i�rKuư)i�r6)i�rK�ʊ)i�rK�ʋ)i�rKuƴ)i�r6)i�rKuƶ)i�r6)i�rK�ʒ)i�rKuƹ)i�r6)i�rKuƽ)i�r6)i�rKudž)i�rK�lj)i�rK�nj)i�rKuǎ)i�r6)i�rKuǐ)i�r6)i�rKuǒ)i�r6)i�rKuǔ)i�r6)i�rKuǖ)i�r6)i�rKuǘ)i�r6)i�rKuǚ)i�r6)i�rKuǜ)i�r6)i�rKuǟ)i�r6)i�rKuǡ)i�r6)i�rKuǣ)i�r6)i�rKuǥ)i�r6)i�rKuǧ)i�r6)i�rKuǩ)i�r6)i�rKuǫ)i�r6)i�rKuǭ)i�r6)i�rKuǯ)i�r6)i�rK�dz)i�rKuǵ)i�r6)i�rKuƕ)i�rKuƿ)i�rKuǹ)i�r6)i�rKuǻ)i�r6)i�rKuǽ)i�r6)i�rKuǿ)i�r6)irKuȁ)ir6)irKuȃ)ir6)irKuȅ)ir6)irKuȇ)ir6)irKuȉ)i	r6)i
rKuȋ)ir6)irKuȍr�r�r�r��_seg_4ru�r�r�c�
�gd�S)N)d)i
r6)irKuȏ)ir6)irKuȑ)ir6)irKuȓ)ir6)irKuȕ)ir6)irKuȗ)ir6)irKuș)ir6)irKuț)ir6)irKuȝ)ir6)irKuȟ)ir6)i rKuƞ)i!r6)i"rK�ȣ)i#r6)i$rKuȥ)i%r6)i&rKuȧ)i'r6)i(rKuȩ)i)r6)i*rKuȫ)i+r6)i,rKuȭ)i-r6)i.rKuȯ)i/r6)i0rKuȱ)i1r6)i2rKuȳ)i3r6)i:rKuⱥ)i;rKuȼ)i<r6)i=rKuƚ)i>rKuⱦ)i?r6)iArKuɂ)iBr6)iCrKuƀ)iDrK�ʉ)iErK�ʌ)iFrKuɇ)iGr6)iHrKuɉ)iIr6)iJrKuɋ)iKr6)iLrKuɍ)iMr6)iNrKuɏ)iOr6)i�rKrZ)i�rK�ɦ)i�rKr^)i�rKrn)i�rKuɹ)i�rKuɻ)i�rKuʁ)i�rKrx)i�rKr|)i�r6)i�ru ̆)i�ru ̇)i�ru ̊)i�ru ̨)i�ru ̃)i�ru ̋)i�r6)i�rKrf)i�rKrb)i�rKrp)i�rKrz)i�rKuʕ)i�r6)i@rKù)iArKú)iBr6)iCrKu̓)iDrKǘ)iErK�ι)iFr6)iOr�)iPr6)iprKuͱ)iqr6)irrKuͳ)isr6)itrKuʹ)iur6)ivrKuͷ)iwr6r�r�r�r��_seg_5r|r�r�c�
�gd�S)N)d)ixr�)izru ι)i{r6)i~r�;)irKuϳ)i�r�)i�rr�)i�r� ̈́)i�rK�ά)i�rK�·)i�rK�έ)i�rK�ή)i�rK�ί)i�r�)i�rK�ό)i�r�)i�rK�ύ)i�rK�ώ)i�r6)i�rK�α)i�rK�β)i�rK�γ)i�rK�δ)i�rK�ε)i�rK�ζ)i�rK�η)i�rK�θ)i�rKr{)i�rK�κ)i�rK�λ)i�rKr�)i�rK�ν)i�rK�ξ)i�rK�ο)i�rK�π)i�rK�ρ)i�r�)i�rK�σ)i�rK�τ)i�rK�υ)i�rK�φ)i�rK�χ)i�rK�ψ)i�rK�ω)i�rKuϊ)i�rK�ϋ)i�r6)i�r2r�)i�r6)i�rKuϗ)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�r6)i�rKuϙ)i�r6)i�rKuϛ)i�r6)i�rK�ϝ)i�r6)i�rKuϟ)i�r6)i�rKuϡ)i�r6)i�rKuϣ)i�r6)i�rKuϥ)i�r6)i�rKuϧ)i�r6)i�rKuϩ)i�r6)i�rKuϫ)i�r6)i�rKuϭ)i�r6)i�rKuϯ)i�r6)i�rKr�)i�rKr�)i�rKr�)i�r6)i�rKr�)i�rKr�)i�r6)i�rKuϸ)i�r6)i�rKr�)i�rKuϻ)i�r6)i�rKuͻ)i�rKuͼ)i�rKuͽ)irKuѐ)irKuё)irKuђr�r�r�r��_seg_6r�{r�r�c�
�gd�S)N)d)irKuѓ)irKuє)irK�ѕ)irK�і)irKuї)irK�ј)i	rKuљ)i
rKuњ)irKuћ)irKuќ)i
rKuѝ)irKuў)irK�џ)irK�а)irK�б)irK�в)irK�г)irK�д)irK�е)irK�ж)irK�з)irK�и)irKuй)irK�к)irK�л)irK�м)irK�н)irK�о)irK�п)i rK�р)i!rK�с)i"rK�т)i#rK�у)i$rK�ф)i%rK�х)i&rK�ц)i'rK�ч)i(rK�ш)i)rKuщ)i*rK�ъ)i+rK�ы)i,rK�ь)i-rK�э)i.rK�ю)i/rKuя)i0r6)i`rKuѡ)iar6)ibrK�ѣ)icr6)idrKuѥ)ier6)ifrKuѧ)igr6)ihrKuѩ)iir6)ijrKuѫ)ikr6)ilrKuѭ)imr6)inrKuѯ)ior6)iprKuѱ)iqr6)irrKuѳ)isr6)itrKuѵ)iur6)ivrKuѷ)iwr6)ixrKuѹ)iyr6)izrKuѻ)i{r6)i|rKuѽ)i}r6)i~rKuѿ)ir6)i�rKuҁ)i�r6)i�rKuҋ)i�r6)i�rKuҍ)i�r6)i�rKuҏ)i�r6)i�rK�ґ)i�r6)i�rKuғ)i�r6)i�rKuҕ)i�r6)i�rKuҗ)i�r6)i�rKuҙ)i�r6)i�rKuқ)i�r6)i�rKuҝ)i�r6r�r�r�r��_seg_7r��r�r�c�
�gd�S)N)d)i�rKuҟ)i�r6)i�rKuҡ)i�r6)i�rKuң)i�r6)i�rKuҥ)i�r6)i�rKuҧ)i�r6)i�rKuҩ)i�r6)i�rK�ҫ)i�r6)i�rKuҭ)i�r6)i�rK�ү)i�r6)i�rK�ұ)i�r6)i�rKuҳ)i�r6)i�rKuҵ)i�r6)i�rKuҷ)i�r6)i�rKuҹ)i�r6)i�rKuһ)i�r6)i�rKuҽ)i�r6)i�rKuҿ)i�r6)i�r�)i�rKuӂ)i�r6)i�rKuӄ)i�r6)i�rKuӆ)i�r6)i�rKuӈ)i�r6)i�rKuӊ)i�r6)i�rKuӌ)i�r6)i�rKuӎ)i�r6)i�rKuӑ)i�r6)i�rKuӓ)i�r6)i�rKuӕ)i�r6)i�rKuӗ)i�r6)i�rK�ә)i�r6)i�rKuӛ)i�r6)i�rKuӝ)i�r6)i�rKuӟ)i�r6)i�rKuӡ)i�r6)i�rKuӣ)i�r6)i�rKuӥ)i�r6)i�rKuӧ)i�r6)i�rK�ө)i�r6)i�rKuӫ)i�r6)i�rKuӭ)i�r6)i�rKuӯ)i�r6)i�rKuӱ)i�r6)i�rKuӳ)i�r6)i�rKuӵ)i�r6)i�rKuӷ)i�r6)i�rKuӹ)i�r6)i�rKuӻ)i�r6)i�rKuӽ)i�r6)i�rKuӿ)i�r6)irKuԁ)ir6)irKuԃr�r�r�r��_seg_8r�Kr�r�c�
�gd�S)N)d)ir6)irKuԅ)ir6)irKuԇ)ir6)irKuԉ)i	r6)i
rKuԋ)ir6)irKuԍ)i
r6)irKuԏ)ir6)irKuԑ)ir6)irKuԓ)ir6)irKuԕ)ir6)irKuԗ)ir6)irKuԙ)ir6)irKuԛ)ir6)irKuԝ)ir6)irKuԟ)ir6)i rKuԡ)i!r6)i"rKuԣ)i#r6)i$rKuԥ)i%r6)i&rKuԧ)i'r6)i(rKuԩ)i)r6)i*rKuԫ)i+r6)i,rKuԭ)i-r6)i.rKuԯ)i/r6)i0r�)i1rKuա)i2rKuբ)i3rKuգ)i4rKuդ)i5rKuե)i6rKuզ)i7rKuէ)i8rKuը)i9rKuթ)i:rKuժ)i;rKuի)i<rKuլ)i=rKuխ)i>rKuծ)i?rKuկ)i@rKuհ)iArKuձ)iBrKuղ)iCrKuճ)iDrKuմ)iErKuյ)iFrKuն)iGrKuշ)iHrKuո)iIrKuչ)iJrKuպ)iKrKuջ)iLrKuռ)iMrKuս)iNrKuվ)iOrKuտ)iPrKuր)iQrKuց)iRrKuւ)iSrKuփ)iTrKuք)iUrKuօ)iVrKuֆ)iWr�)iYr6)i�rKuեւ)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)ir�)ir6r�r�r�r��_seg_9r��r�r�c�
�gd�S)N)d)iurKuاٴ)ivrKuوٴ)iwrK�ۇٴ)ixrKuيٴ)iyr6)i�r�)i�r6)ir�)ir6)iKr�)iMr6)i�r�)i�r6)i�r�)i�r6)i.r�)i0r6)i?r�)i@r6)i\r�)i^r6)i_r�)i`r6)ikr�)ipr6)i�r�)i�r6)i�r�)i�r6)iX	rKuक़)iY	rKuख़)iZ	rKuग़)i[	rKuज़)i\	rKuड़)i]	rKuढ़)i^	rKuफ़)i_	rKuय़)i`	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	rKuড়)i�	rKuঢ়)i�	r�)i�	rKuয়)i�	r6)i�	r�)i�	r6)i�	r�)i
r6)i
r�)i
r6)i
r�)i
r6)i
r�)i
r6)i)
r�)i*
r6)i1
r�)i2
r6)i3
rKuਲ਼)i4
r�)i5
r6)i6
rKuਸ਼)i7
r�)i8
r6)i:
r�)i<
r6)i=
r�)i>
r6)iC
r�)iG
r6)iI
r�)iK
r6)iN
r�)iQ
r6)iR
r�)iY
rKuਖ਼)iZ
rKuਗ਼)i[
rKuਜ਼)i\
r6)i]
r�r�r�r�r��_seg_10r�r�r�c�
�gd�S)N)d)i^
rKuਫ਼)i_
r�)if
r6)iw
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)ir�)ir6)ir�)ir6)i
r�)ir6)ir�)ir6)i)r�)i*r6)i1r�)i2r6)i4r�)i5r6)i:r�)i<r6)iEr�)iGr6)iIr�)iKr6)iNr�)iUr6)iXr�)i\rKuଡ଼)i]rKuଢ଼)i^r�)i_r6)idr�)ifr6)ixr�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)i
r�)ir6)ir�)ir6)i)r�)i*r6r�r�r�r��_seg_11r��r�r�c�
�gd�S)N)d)i:r�)i<r6)iEr�)iFr6)iIr�)iJr6)iNr�)iUr6)iWr�)iXr6)i[r�)i]r6)i^r�)i`r6)idr�)ifr6)ipr�)iwr6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i
r6)i

r�)i
r6)i
r�)i
r6)iE
r�)iF
r6)iI
r�)iJ
r6)iP
r�)iT
r6)id
r�)if
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)i�
r6)i�
r�)ir6)i3rKuํา)i4r6)i;r�)i?r6)i\r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�rKuໍາ)i�r6r�r�r�r��_seg_12r��r�r�c�
�gd�S)N)d)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�rKuຫນ)i�rKuຫມ)i�r6)i�r�)ir6)irKu་)i
r6)iCrKuགྷ)iDr6)iHr�)iIr6)iMrKuཌྷ)iNr6)iRrKuདྷ)iSr6)iWrKuབྷ)iXr6)i\rKuཛྷ)i]r6)iirKuཀྵ)ijr6)imr�)iqr6)isrKuཱི)itr6)iurKuཱུ)ivrKuྲྀ)iwrKu	ྲཱྀ)ixrKuླྀ)iyrKu	ླཱྀ)izr6)i�rKuཱྀ)i�r6)i�rKuྒྷ)i�r6)i�r�)i�r6)i�rKuྜྷ)i�r6)i�rKuྡྷ)i�r6)i�rKuྦྷ)i�r6)i�rKuྫྷ)i�r6)i�rKuྐྵ)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)i�r�)i�rKuⴧ)i�r�)i�rKuⴭ)i�r�)i�r6)i�rK�ნ)i�r6)i_r�)iar6)iIr�)iJr6)iNr�)iPr6)iWr�)iXr6)iYr�)iZr6)i^r�)i`r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)ir�)ir6r�r�r�r��_seg_13r�Sr�r�c�
�gd�S)N)d)ir�)ir6)i[r�)i]r6)i}r�)i�r6)i�r�)i�r6)i�r�)i�rKuᏰ)i�rKuᏱ)i�rKuᏲ)i�rKuᏳ)i�rKuᏴ)i�rKuᏵ)i�r�)ir6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)ir�)ir6)i7r�)i@r6)iTr�)i`r6)imr�)inr6)iqr�)irr6)itr�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)ir�)ir6)ir�)ir�)ir�)ir6)ir�)i r6)iyr�)i�r6)i�r�)i�r6)i�r�)ir6)ir�)i r6)i,r�)i0r6)i<r�)i@r6)iAr�)iDr6)inr�)ipr6)iur�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)ir�)ir6)i_r�)i`r6)i}r�)ir6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)iMr�)iPr6)ir�)i�r6)i�r�)i�r6)i8r�)i;r6)iJr�)iMr6)i�rKr�r�r�r�r��_seg_14r��r�r�c�
�gd�S)N)d)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rK�ꙋ)i�r�)i�rKuა)i�rKuბ)i�rKuგ)i�rKuდ)i�rKuე)i�rKuვ)i�rKuზ)i�rKuთ)i�rKuი)i�rKuკ)i�rKuლ)i�rKuმ)i�rKr�)i�rKuო)i�rKuპ)i�rKuჟ)i�rKuრ)i�rKuს)i�rKuტ)i�rKuუ)i�rKuფ)i�rKuქ)i�rKuღ)i�rKuყ)i�rKuშ)i�rKuჩ)i�rKuც)i�rKuძ)i�rKuწ)i�rKuჭ)i�rKuხ)i�rKuჯ)i�rKuჰ)i�rKuჱ)i�rKuჲ)i�rKuჳ)i�rKuჴ)i�rKuჵ)i�rKuჶ)i�rKuჷ)i�rKuჸ)i�rKuჹ)i�rKuჺ)i�r�)i�rKuჽ)i�rKuჾ)i�rKuჿ)i�r6)i�r�)i�r6)i�r�)ir6)i,rKrL)i-rKr�)i.rKrN)i/r6)i0rKrR)i1rKrT)i2rKr`)i3rKrX)i4rKrZ)i5rKr\)i6rKr^)i7rKr`)i8rKrb)i9rKrd)i:rKrf)i;r6)i<rKrh)i=rKrw)i>rKrj)i?rKrn)i@rKrr)iArKrt)iBrKrx)iCrKrL)iDrK�ɐ)iErK�ɑ)iFrKuᴂ)iGrKrN)iHrKrR)iIrKrT)iJrKra)iKrKrb)iLrK�ɜ)iMrKrX)iNr6)iOrKr`)iPrKrd)iQrKrY)iRrKrh)iSrKr]r�r�r�r��_seg_15r�#r�r�c�
�gd�S)N)d)iTrKuᴖ)iUrKuᴗ)iVrKrj)iWrKrr)iXrKrt)iYrKuᴝ)iZrKri)i[rKrv)i\rKuᴥ)i]rKr�)i^rKr�)i_rKr�)i`rKr�)iarKr�)ibrKr\)icrKrn)idrKrt)ierKrv)ifrKr�)igrKr�)ihrKr�)iirKr�)ijrKr�)ikr6)ixrKr�)iyr6)i�rK�ɒ)i�rKrP)i�rKuɕ)i�rKr)i�rKr�)i�rKrV)i�rKuɟ)i�rK�ɡ)i�rK�ɥ)i�rKrh)i�rKrg)i�rK�ɪ)i�rKuᵻ)i�rK�ʝ)i�rKuɭ)i�rKuᶅ)i�rKuʟ)i�rK�ɱ)i�rKuɰ)i�rKrj)i�rKuɳ)i�rKuɴ)i�rKrk)i�rKuɸ)i�rK�ʂ)i�rKrm)i�rKuƫ)i�rKrx)i�rKro)i�rKuᴜ)i�rKrp)i�rKry)i�rKr~)i�rKuʐ)i�rKuʑ)i�rKrq)i�rKr�)i�r6)irKuḁ)ir6)irKuḃ)ir6)irKuḅ)ir6)irKuḇ)ir6)irKuḉ)i	r6)i
rKuḋ)ir6)irKuḍ)i
r6)irKuḏ)ir6)irKuḑ)ir6)irKuḓ)ir6)irKuḕ)ir6)irKuḗ)ir6)irKuḙ)ir6)irKuḛ)ir6)irKuḝ)ir6)irKuḟ)ir6)i rKuḡ)i!r6)i"rKuḣ)i#r6r�r�r�r��_seg_16r��r�r�c�
�gd�S)N)d)i$rKuḥ)i%r6)i&rKuḧ)i'r6)i(rKuḩ)i)r6)i*rKuḫ)i+r6)i,rKuḭ)i-r6)i.rKuḯ)i/r6)i0rKuḱ)i1r6)i2rKuḳ)i3r6)i4rKuḵ)i5r6)i6rKuḷ)i7r6)i8rKuḹ)i9r6)i:rKuḻ)i;r6)i<rKuḽ)i=r6)i>rKuḿ)i?r6)i@rKuṁ)iAr6)iBrKuṃ)iCr6)iDrKuṅ)iEr6)iFrKuṇ)iGr6)iHrKuṉ)iIr6)iJrKuṋ)iKr6)iLrKuṍ)iMr6)iNrKuṏ)iOr6)iPrKuṑ)iQr6)iRrKuṓ)iSr6)iTrKuṕ)iUr6)iVrKuṗ)iWr6)iXrKuṙ)iYr6)iZrKuṛ)i[r6)i\rKuṝ)i]r6)i^rKuṟ)i_r6)i`rK�ṡ)iar6)ibrKuṣ)icr6)idrKuṥ)ier6)ifrKuṧ)igr6)ihrKuṩ)iir6)ijrKuṫ)ikr6)ilrKuṭ)imr6)inrKuṯ)ior6)iprKuṱ)iqr6)irrKuṳ)isr6)itrKuṵ)iur6)ivrKuṷ)iwr6)ixrKuṹ)iyr6)izrKuṻ)i{r6)i|rKuṽ)i}r6)i~rKuṿ)ir6)i�rKuẁ)i�r6)i�rKuẃ)i�r6)i�rKuẅ)i�r6)i�rKuẇ)i�r6r�r�r�r��_seg_17r��r�r�c�
�gd�S)N)d)i�rKuẉ)i�r6)i�rKuẋ)i�r6)i�rKuẍ)i�r6)i�rKuẏ)i�r6)i�rKuẑ)i�r6)i�rKuẓ)i�r6)i�rKuẕ)i�r6)i�rKuaʾ)i�rKr�)i�r6)i�rKr3)i�r6)i�rKuạ)i�r6)i�rKuả)i�r6)i�rKuấ)i�r6)i�rKuầ)i�r6)i�rKuẩ)i�r6)i�rKuẫ)i�r6)i�rKuậ)i�r6)i�rKuắ)i�r6)i�rKuằ)i�r6)i�rKuẳ)i�r6)i�rKuẵ)i�r6)i�rKuặ)i�r6)i�rKuẹ)i�r6)i�rKuẻ)i�r6)i�rKuẽ)i�r6)i�rKuế)i�r6)i�rKuề)i�r6)i�rKuể)i�r6)i�rKuễ)i�r6)i�rKuệ)i�r6)i�rKuỉ)i�r6)i�rKuị)i�r6)i�rKuọ)i�r6)i�rKuỏ)i�r6)i�rKuố)i�r6)i�rKuồ)i�r6)i�rKuổ)i�r6)i�rKuỗ)i�r6)i�rKuộ)i�r6)i�rKuớ)i�r6)i�rKuờ)i�r6)i�rKuở)i�r6)i�rKuỡ)i�r6)i�rKuợ)i�r6)i�rKuụ)i�r6)i�rKuủ)i�r6)i�rKuứ)i�r6)i�rKuừ)i�r6)i�rKuử)i�r6)i�rKuữ)i�r6)i�rKuựr�r�r�r��_seg_18r�[r�r�c�
�gd�S)N)d)i�r6)i�rKuỳ)i�r6)i�rKuỵ)i�r6)i�rKuỷ)i�r6)i�rKuỹ)i�r6)i�rKuỻ)i�r6)i�rKuỽ)i�r6)i�rKuỿ)i�r6)irKuἀ)i	rKuἁ)i
rKuἂ)irKuἃ)irKuἄ)i
rKuἅ)irKuἆ)irKuἇ)ir6)ir�)irKuἐ)irKuἑ)irKuἒ)irKuἓ)irKuἔ)irKuἕ)ir�)i r6)i(rKuἠ)i)rKuἡ)i*rKuἢ)i+rKuἣ)i,rKuἤ)i-rKuἥ)i.rKuἦ)i/rKuἧ)i0r6)i8rKuἰ)i9rKuἱ)i:rKuἲ)i;rKuἳ)i<rKuἴ)i=rKuἵ)i>rKuἶ)i?rKuἷ)i@r6)iFr�)iHrKuὀ)iIrKuὁ)iJrKuὂ)iKrKuὃ)iLrKuὄ)iMrKuὅ)iNr�)iPr6)iXr�)iYrKuὑ)iZr�)i[rKuὓ)i\r�)i]rKuὕ)i^r�)i_rKuὗ)i`r6)ihrKuὠ)iirKuὡ)ijrKuὢ)ikrKuὣ)ilrKuὤ)imrKuὥ)inrKuὦ)iorKuὧ)ipr6)iqrKr�)irr6)isrKr�)itr6)iurKr�)ivr6)iwrKr�)ixr6)iyrKr�)izr6)i{rKr�)i|r6)i}rKr�)i~r�)i�rK�ἀι)i�rK�ἁι)i�rK�ἂι)i�rK�ἃι)i�rK�ἄι)i�rK�ἅι)i�rK�ἆι)i�rK�ἇιr�r�r�r��_seg_19r��r�r�c�
�gd�S)N)d)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rK�ἠι)i�rK�ἡι)i�rK�ἢι)i�rK�ἣι)i�rK�ἤι)i�rK�ἥι)i�rK�ἦι)i�rK�ἧι)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr)i�rKr)i�rK�ὠι)i�rK�ὡι)i�rK�ὢι)i�rK�ὣι)i�rK�ὤι)i�rK�ὥι)i�rK�ὦι)i�rK�ὧι)i�rKr)i�rKr)i�rKr)i�rKr)i�rKr)i�rKr)i�rKr)i�rKr	)i�r6)i�rKuὰι)i�rK�αι)i�rKuάι)i�r�)i�r6)i�rKuᾶι)i�rKuᾰ)i�rKuᾱ)i�rKuὰ)i�rKr�)i�rKr
)i�r� ̓)i�rKr{)i�rr)i�ru ͂)i�ru ̈͂)i�rKuὴι)i�rK�ηι)i�rKuήι)i�r�)i�r6)i�rKuῆι)i�rKuὲ)i�rKr�)i�rKuὴ)i�rKr�)i�rKr)i�ru ̓̀)i�ru ̓́)i�ru ̓͂)i�r6)i�rKuΐ)i�r�)i�r6)i�rKuῐ)i�rKuῑ)i�rKuὶ)i�rKr�)i�r�)i�ru ̔̀)i�ru ̔́)i�ru ̔͂)i�r6)i�rKuΰ)i�r6)i�rKuῠ)i�rKuῡ)i�rKuὺ)i�rKr�)i�rKuῥ)i�ru ̈̀)i�rr)i�r�`)i�r�)i�rKuὼι)i�rK�ωι)i�rKuώι)i�r�)i�r6r�r�r�r��_seg_20r+r�r�c�
�gd�S)N)d)i�rKuῶι)i�rKuὸ)i�rKr�)i�rKuὼ)i�rKr�)i�rKr)i�rr�)i�ru ̔)i�r�)i rr�)i r�)i r2�)i r�)i r6)i rKu‐)i r6)i ru ̳)i r6)i$ r�)i' r6)i( r�)i/ rr�)i0 r6)i3 rKu′′)i4 rKu	′′′)i5 r6)i6 rKu‵‵)i7 rKu	‵‵‵)i8 r6)i< rz!!)i= r6)i> r� ̅)i? r6)iG rz??)iH rz?!)iI rz!?)iJ r6)iW rKu′′′′)iX r6)i_ rr�)i` r�)ia r�)id r�)ie r�)ip rK�0)iq rKr\)ir r�)it rK�4)iu rK�5)iv rK�6)iw rK�7)ix rK�8)iy rK�9)iz r�+)i{ rK�−)i| r�=)i} r�()i~ r�))i rKrf)i� rKr)i� rKr�)i� rKr�)i� rKr)i� rKr)i� rKr)i� rKr)i� rKr)i� rKr)i� rKr)i� rr)i� rKr)i� rr)i� rr)i� rr)i� r�)i� rKrL)i� rKrT)i� rKrh)i� rKrz)i� rKra)i� rKrZ)i� rKr`)i� rKrb)i� rKrd)i� rKrf)i� rKrj)i� rKrp)i� rKrr)i� r�)i� r6)i� rK�rs)i� r6)i� r�)i� r6)i� r�)i!rza/c)i!rza/s)i!rKrP)i!rKu°c)i!r6r�r�r�r��_seg_21r �r�r�c�
�gd�S)N)d)i!rzc/o)i!rzc/u)i!rKrb)i!r6)i	!rKu°f)i
!rKrX)i!rKrZ)i!rKrU)i!rKr\)i!rKrb)i!r6)i!rKrf)i!rK�no)i!r6)i!rKrj)i!rKrl)i!rKrn)i!r6)i !rK�sm)i!!rK�tel)i"!rK�tm)i#!r6)i$!rKr~)i%!r6)i&!rKr�)i'!r6)i(!rKr~)i)!r6)i*!rKr`)i+!rKr�)i,!rKrN)i-!rKrP)i.!r6)i/!rKrT)i1!rKrV)i2!r�)i3!rKrd)i4!rKrh)i5!rK�א)i6!rKuב)i7!rKuג)i8!rK�ד)i9!rKr\)i:!r6)i;!rK�fax)i<!rKr�)i=!rKr�)i?!rKr�)i@!rKu∑)iA!r6)iE!rKrR)iG!rKrT)iH!rKr\)iI!rKr^)iJ!r6)iP!rKu1⁄7)iQ!rKu1⁄9)iR!rKu1⁄10)iS!rKu1⁄3)iT!rKu2⁄3)iU!rKu1⁄5)iV!rKu2⁄5)iW!rKu3⁄5)iX!rKu4⁄5)iY!rKu1⁄6)iZ!rKu5⁄6)i[!rKu1⁄8)i\!rKu3⁄8)i]!rKu5⁄8)i^!rKu7⁄8)i_!rKu1⁄)i`!rKr\)ia!rK�ii)ib!rK�iii)ic!rK�iv)id!rKrv)ie!rK�vi)if!rK�vii)ig!rK�viii)ih!rK�ix)ii!rKrz)ij!rK�xi)ik!rK�xii)il!rKrb)im!rKrP)in!rKrR)io!rKrd)ip!rKr\)iq!rKr))ir!rKr*)is!rKr+)it!rKrv)iu!rKr,)iv!rKr-)iw!rKr.)ix!rKr/)iy!rKrz)iz!rKr0)i{!rKr1)i|!rKrbr�r�r�r��_seg_22r2�r�r�c�
�gd�S)N)d)i}!rKrP)i~!rKrR)i!rKrd)i�!r6)i�!r�)i�!r6)i�!rKu0⁄3)i�!r6)i�!r�)i�!r6)i,"rKu∫∫)i-"rKu	∫∫∫)i."r6)i/"rKu∮∮)i0"rKu	∮∮∮)i1"r6)i`"r)ia"r6)in"r)ip"r6)i)#rK�〈)i*#rK�〉)i+#r6)i'$r�)i@$r6)iK$r�)i`$rKr�)ia$rKr�)ib$rKr)ic$rKr)id$rKr)ie$rKr)if$rKr)ig$rKr)ih$rKr)ii$rK�10)ij$rK�11)ik$rK�12)il$rK�13)im$rK�14)in$rK�15)io$rK�16)ip$rK�17)iq$rK�18)ir$rK�19)is$rK�20)it$rz(1))iu$rz(2))iv$rz(3))iw$rz(4))ix$rz(5))iy$rz(6))iz$rz(7))i{$rz(8))i|$rz(9))i}$rz(10))i~$rz(11))i$rz(12))i�$rz(13))i�$rz(14))i�$rz(15))i�$rz(16))i�$rz(17))i�$rz(18))i�$rz(19))i�$rz(20))i�$r�)i�$r�(a))i�$r�(b))i�$r�(c))i�$r�(d))i�$r�(e))i�$r�(f))i�$r�(g))i�$r�(h))i�$r�(i))i�$r�(j))i�$r�(k))i�$r�(l))i�$r�(m))i�$r�(n))i�$r�(o))i�$r�(p))i�$r�(q))i�$r�(r))i�$r�(s))i�$r�(t))i�$r�(u))i�$r�(v))i�$r�(w))i�$r�(x))i�$r�(y))i�$r�(z))i�$rKrL)i�$rKrN)i�$rKrP)i�$rKrR)i�$rKrT)i�$rKrV)i�$rKrXr�r�r�r��_seg_23r[c	r�r�c�
�gd�S)N)d)i�$rKrZ)i�$rKr\)i�$rKr^)i�$rKr`)i�$rKrb)i�$rKrd)i�$rKrf)i�$rKrh)i�$rKrj)i�$rKrl)i�$rKrn)i�$rKrp)i�$rKrr)i�$rKrt)i�$rKrv)i�$rKrx)i�$rKrz)i�$rKr|)i�$rKr~)i�$rKrL)i�$rKrN)i�$rKrP)i�$rKrR)i�$rKrT)i�$rKrV)i�$rKrX)i�$rKrZ)i�$rKr\)i�$rKr^)i�$rKr`)i�$rKrb)i�$rKrd)i�$rKrf)i�$rKrh)i�$rKrj)i�$rKrl)i�$rKrn)i�$rKrp)i�$rKrr)i�$rKrt)i�$rKrv)i�$rKrx)i�$rKrz)i�$rKr|)i�$rKr~)i�$rKr)i�$r6)i*rKu∫∫∫∫)i
*r6)it*rz::=)iu*rz==)iv*rz===)iw*r6)i�*rKu⫝̸)i�*r6)it+r�)iv+r6)i�+r�)i�+r6)i,rKuⰰ)i,rKuⰱ)i,rKuⰲ)i,rKuⰳ)i,rKuⰴ)i,rKuⰵ)i,rKuⰶ)i,rKuⰷ)i,rKuⰸ)i	,rKuⰹ)i
,rKuⰺ)i,rKuⰻ)i,rKuⰼ)i
,rKuⰽ)i,rKuⰾ)i,rKuⰿ)i,rKuⱀ)i,rKuⱁ)i,rKuⱂ)i,rKuⱃ)i,rKuⱄ)i,rKuⱅ)i,rKuⱆ)i,rKuⱇ)i,rKuⱈ)i,rKuⱉ)i,rKuⱊ)i,rKuⱋ)i,rKuⱌ)i,rKuⱍ)i,rKuⱎ)i,rKuⱏ)i ,rKuⱐ)i!,rKuⱑ)i",rKuⱒ)i#,rKuⱓ)i$,rKuⱔ)i%,rKuⱕ)i&,rKuⱖ)i',rKuⱗ)i(,rKuⱘr�r�r�r��_seg_24r]�	r�r�c�
�gd�S)N)d)i),rKuⱙ)i*,rKuⱚ)i+,rKuⱛ)i,,rKuⱜ)i-,rKuⱝ)i.,rKuⱞ)i/,rKuⱟ)i0,r6)i`,rKuⱡ)ia,r6)ib,rK�ɫ)ic,rKuᵽ)id,rK�ɽ)ie,r6)ig,rKuⱨ)ih,r6)ii,rKuⱪ)ij,r6)ik,rKuⱬ)il,r6)im,rKr�)in,rKr�)io,rKr�)ip,rKr�)iq,r6)ir,rKuⱳ)is,r6)iu,rKuⱶ)iv,r6)i|,rKr^)i},rKrv)i~,rKuȿ)i,rKuɀ)i�,rKuⲁ)i�,r6)i�,rKuⲃ)i�,r6)i�,rKuⲅ)i�,r6)i�,rKuⲇ)i�,r6)i�,rKuⲉ)i�,r6)i�,rKuⲋ)i�,r6)i�,rKuⲍ)i�,r6)i�,rKuⲏ)i�,r6)i�,rKuⲑ)i�,r6)i�,rKuⲓ)i�,r6)i�,rKuⲕ)i�,r6)i�,rKuⲗ)i�,r6)i�,rKuⲙ)i�,r6)i�,rKuⲛ)i�,r6)i�,rKuⲝ)i�,r6)i�,rKuⲟ)i�,r6)i�,rKuⲡ)i�,r6)i�,rKuⲣ)i�,r6)i�,rKuⲥ)i�,r6)i�,rKuⲧ)i�,r6)i�,rKuⲩ)i�,r6)i�,rKuⲫ)i�,r6)i�,rKuⲭ)i�,r6)i�,rKuⲯ)i�,r6)i�,rKuⲱ)i�,r6)i�,rKuⲳ)i�,r6)i�,rKuⲵ)i�,r6)i�,rKuⲷ)i�,r6)i�,rKuⲹ)i�,r6)i�,rKuⲻ)i�,r6)i�,rKuⲽ)i�,r6)i�,rKuⲿ)i�,r6)i�,rKuⳁ)i�,r6)i�,rKuⳃr�r�r�r��_seg_25ra3
r�r�c�
�gd�S)N)d)i�,r6)i�,rKuⳅ)i�,r6)i�,rKuⳇ)i�,r6)i�,rKuⳉ)i�,r6)i�,rKuⳋ)i�,r6)i�,rKuⳍ)i�,r6)i�,rKuⳏ)i�,r6)i�,rKuⳑ)i�,r6)i�,rKuⳓ)i�,r6)i�,rKuⳕ)i�,r6)i�,rKuⳗ)i�,r6)i�,rKuⳙ)i�,r6)i�,rKuⳛ)i�,r6)i�,rKuⳝ)i�,r6)i�,rKuⳟ)i�,r6)i�,rKuⳡ)i�,r6)i�,rKuⳣ)i�,r6)i�,rKuⳬ)i�,r6)i�,rKuⳮ)i�,r6)i�,rKuⳳ)i�,r6)i�,r�)i�,r6)i&-r�)i'-r6)i(-r�)i--r6)i.-r�)i0-r6)ih-r�)io-rKuⵡ)ip-r6)iq-r�)i-r6)i�-r�)i�-r6)i�-r�)i�-r6)i�-r�)i�-r6)i�-r�)i�-r6)i�-r�)i�-r6)i�-r�)i�-r6)i�-r�)i�-r6)i�-r�)i�-r6)i�-r�)i�-r6)i^.r�)i�.r6)i�.r�)i�.r6)i�.rKu母)i�.r6)i�.rKu龟)i�.r�)i/rK�一)i/rKu丨)i/rKu丶)i/rKu丿)i/rK�乙)i/rKu亅)i/rK�二)i/rKu亠)i/rK�人)i	/rKu儿)i
/rKu入)i/rK�八)i/rKu冂)i
/rKu冖)i/rKu冫)i/rKu几)i/rK�凵)i/rKu刀)i/rK�力)i/rKu勹)i/rKu匕)i/rKu匚r�r�r�r��_seg_26rj�
r�r�c�
�gd�S)N)d)i/rKu匸)i/rK�十)i/rKu卜)i/rKu卩)i/rKu厂)i/rKu厶)i/rKu又)i/rKu口)i/rKu囗)i/rK�土)i /rKu士)i!/rKu夂)i"/rKu夊)i#/rKu夕)i$/rKu大)i%/rK�女)i&/rKu子)i'/rKu宀)i(/rKu寸)i)/rKu小)i*/rK�尢)i+/rKu尸)i,/rK�屮)i-/rKu山)i./rKu巛)i//rKu工)i0/rKu己)i1/rKu巾)i2/rKu干)i3/rKu幺)i4/rKu广)i5/rKu廴)i6/rK�廾)i7/rKu弋)i8/rKu弓)i9/rKu彐)i:/rKu彡)i;/rKu彳)i</rKu心)i=/rKu戈)i>/rKu戶)i?/rK�手)i@/rKu支)iA/rKu攴)iB/rK�文)iC/rKu斗)iD/rKu斤)iE/rKu方)iF/rKu无)iG/rK�日)iH/rKu曰)iI/rK�月)iJ/rK�木)iK/rKu欠)iL/rKu止)iM/rK�歹)iN/rKu殳)iO/rKu毋)iP/rKu比)iQ/rKu毛)iR/rKu氏)iS/rKu气)iT/rK�水)iU/rK�火)iV/rKu爪)iW/rKu父)iX/rKu爻)iY/rKu爿)iZ/rKu片)i[/rKu牙)i\/rKu牛)i]/rKu犬)i^/rKu玄)i_/rKu玉)i`/rKu瓜)ia/rKu瓦)ib/rKu甘)ic/rK�生)id/rKu用)ie/rKu田)if/rKu疋)ig/rKu疒)ih/rKu癶)ii/rKu白)ij/rKu皮)ik/rKu皿)il/rKu目)im/rKu矛)in/rKu矢)io/rKu石)ip/rKu示)iq/rKu禸)ir/rKu禾)is/rKu穴)it/rK�立)iu/rKu竹)iv/rKu米)iw/rKu糸)ix/rKu缶)iy/rKu网r�r�r�r��_seg_27r|r�r�c�
�gd�S)N)d)iz/rKu羊)i{/rK�羽)i|/rK�老)i}/rKu而)i~/rKu耒)i/rKu耳)i�/rKu聿)i�/rKu肉)i�/rKu臣)i�/rKu自)i�/rKu至)i�/rKu臼)i�/rKu舌)i�/rKu舛)i�/rKu舟)i�/rKu艮)i�/rKu色)i�/rKu艸)i�/rKu虍)i�/rKu虫)i�/rKu血)i�/rK�行)i�/rK�衣)i�/rKu襾)i�/rK�見)i�/rKu角)i�/rKu言)i�/rKu谷)i�/rKu豆)i�/rK�豕)i�/rKu豸)i�/rKu貝)i�/rKu赤)i�/rK�走)i�/rKu足)i�/rKu身)i�/rK�車)i�/rKu辛)i�/rK�辰)i�/rKu辵)i�/rKu邑)i�/rKu酉)i�/rKu釆)i�/rK�里)i�/rK�金)i�/rKu長)i�/rKu門)i�/rKu阜)i�/rKu隶)i�/rKu隹)i�/rKu雨)i�/rKu靑)i�/rKu非)i�/rKu面)i�/rKu革)i�/rKu韋)i�/rKu韭)i�/rKu音)i�/rKu頁)i�/rKu風)i�/rKu飛)i�/rKu食)i�/rKu首)i�/rKu香)i�/rKu馬)i�/rKu骨)i�/rKu高)i�/rKu髟)i�/rKu鬥)i�/rKu鬯)i�/rKu鬲)i�/rKu鬼)i�/rKu魚)i�/rKu鳥)i�/rKu鹵)i�/rK�鹿)i�/rKu麥)i�/rK�麻)i�/rKu黃)i�/rKu黍)i�/rKu黑)i�/rK�黹)i�/rKu黽)i�/rKu鼎)i�/rKu鼓)i�/rKu鼠)i�/rK�鼻)i�/rKu齊)i�/rKu齒)i�/rK�龍)i�/rK�龜)i�/rKu龠)i�/r�)i0rr�)i0r6)i0rK�.)i0r6)i60rKu〒)i70r6)i80rKrlr�r�r�r��_seg_28r�kr�r�c�
�gd�S)N)d)i90rKu卄)i:0rKu卅)i;0r6)i@0r�)iA0r6)i�0r�)i�0r6)i�0ru ゙)i�0ru ゚)i�0r6)i�0rKuより)i�0r6)i�0rKuコト)i1r�)i1r6)i01r�)i11rK�ᄀ)i21rK�ᄁ)i31rK�ᆪ)i41rK�ᄂ)i51rK�ᆬ)i61rK�ᆭ)i71rK�ᄃ)i81rK�ᄄ)i91rK�ᄅ)i:1rK�ᆰ)i;1rK�ᆱ)i<1rK�ᆲ)i=1rK�ᆳ)i>1rK�ᆴ)i?1rK�ᆵ)i@1rK�ᄚ)iA1rK�ᄆ)iB1rK�ᄇ)iC1rK�ᄈ)iD1rK�ᄡ)iE1rK�ᄉ)iF1rK�ᄊ)iG1rK�ᄋ)iH1rK�ᄌ)iI1rK�ᄍ)iJ1rK�ᄎ)iK1rK�ᄏ)iL1rK�ᄐ)iM1rK�ᄑ)iN1rK�ᄒ)iO1rK�ᅡ)iP1rK�ᅢ)iQ1rK�ᅣ)iR1rK�ᅤ)iS1rK�ᅥ)iT1rK�ᅦ)iU1rK�ᅧ)iV1rK�ᅨ)iW1rK�ᅩ)iX1rK�ᅪ)iY1rK�ᅫ)iZ1rK�ᅬ)i[1rK�ᅭ)i\1rK�ᅮ)i]1rK�ᅯ)i^1rK�ᅰ)i_1rK�ᅱ)i`1rK�ᅲ)ia1rK�ᅳ)ib1rK�ᅴ)ic1rK�ᅵ)id1r�)ie1rKuᄔ)if1rKuᄕ)ig1rKuᇇ)ih1rKuᇈ)ii1rKuᇌ)ij1rKuᇎ)ik1rKuᇓ)il1rKuᇗ)im1rKuᇙ)in1rKuᄜ)io1rKuᇝ)ip1rKuᇟ)iq1rKuᄝ)ir1rKuᄞ)is1rKuᄠ)it1rKuᄢ)iu1rKuᄣ)iv1rKuᄧ)iw1rKuᄩ)ix1rKuᄫ)iy1rKuᄬ)iz1rKuᄭ)i{1rKuᄮ)i|1rKuᄯ)i}1rKuᄲ)i~1rKuᄶ)i1rKuᅀ)i�1rKuᅇ)i�1rKuᅌ)i�1rKuᇱ)i�1rKuᇲ)i�1rKuᅗr�r�r�r��_seg_29r��r�r�c�
�gd�S)N)d)i�1rKuᅘ)i�1rKuᅙ)i�1rKuᆄ)i�1rKuᆅ)i�1rKuᆈ)i�1rKuᆑ)i�1rKuᆒ)i�1rKuᆔ)i�1rKuᆞ)i�1rKuᆡ)i�1r�)i�1r6)i�1rKrc)i�1rKre)i�1rK�三)i�1rK�四)i�1rK�上)i�1rK�中)i�1rK�下)i�1rKu甲)i�1rKrd)i�1rKu丙)i�1rKu丁)i�1rK�天)i�1rKu地)i�1rKrf)i�1r6)i�1r�)i�1r6)i2ru(ᄀ))i2ru(ᄂ))i2ru(ᄃ))i2ru(ᄅ))i2ru(ᄆ))i2ru(ᄇ))i2ru(ᄉ))i2ru(ᄋ))i2ru(ᄌ))i	2ru(ᄎ))i
2ru(ᄏ))i2ru(ᄐ))i2ru(ᄑ))i
2ru(ᄒ))i2ru(가))i2ru(나))i2ru(다))i2ru(라))i2ru(마))i2ru(바))i2ru(사))i2ru(아))i2ru(자))i2ru(차))i2ru(카))i2ru(타))i2ru(파))i2ru(하))i2ru(주))i2ru(오전))i2ru(오후))i2r�)i 2ru(一))i!2ru(二))i"2ru(三))i#2ru(四))i$2ru(五))i%2ru(六))i&2ru(七))i'2ru(八))i(2ru(九))i)2ru(十))i*2ru(月))i+2ru(火))i,2ru(水))i-2ru(木))i.2ru(金))i/2ru(土))i02ru(日))i12ru(株))i22ru(有))i32ru(社))i42ru(名))i52ru(特))i62ru(財))i72ru(祝))i82ru(労))i92ru(代))i:2ru(呼))i;2ru(学))i<2ru(監))i=2ru(企))i>2ru(資))i?2ru(協))i@2ru(祭))iA2ru(休))iB2ru(自))iC2ru(至))iD2rKu問)iE2rKu幼)iF2rKrsr�r�r�r��_seg_30r�;r�r�c�
�gd�S)N)d)iG2rKu箏)iH2r6)iP2rK�pte)iQ2rK�21)iR2rK�22)iS2rK�23)iT2rK�24)iU2rK�25)iV2rK�26)iW2rK�27)iX2rK�28)iY2rK�29)iZ2rK�30)i[2rK�31)i\2rK�32)i]2rK�33)i^2rK�34)i_2rK�35)i`2rKr�)ia2rKr�)ib2rKr�)ic2rKr�)id2rKr�)ie2rKr�)if2rKr�)ig2rKr�)ih2rKr�)ii2rKr�)ij2rKr�)ik2rKr�)il2rKr�)im2rKr�)in2rKu가)io2rKu나)ip2rKu다)iq2rKu라)ir2rKu마)is2rKu바)it2rKu사)iu2rKu아)iv2rKu자)iw2rKu차)ix2rKu카)iy2rKu타)iz2rKu파)i{2rKu하)i|2rKu참고)i}2rKu주의)i~2rKu우)i2r6)i�2rKrc)i�2rKre)i�2rKr�)i�2rKr�)i�2rKu五)i�2rK�六)i�2rKu七)i�2rKrg)i�2rKu九)i�2rKrl)i�2rKru)i�2rKry)i�2rKrx)i�2rKrv)i�2rKr�)i�2rKrm)i�2rKrt)i�2rKu株)i�2rK�有)i�2rK�社)i�2rKu名)i�2rKu特)i�2rKu財)i�2rK�祝)i�2rKu労)i�2rKu秘)i�2rKu男)i�2rKrn)i�2rKu適)i�2rKu優)i�2rKu印)i�2rKu注)i�2rKu項)i�2rKu休)i�2rKu写)i�2rKu正)i�2rKr�)i�2rKr�)i�2rKr�)i�2rK�左)i�2rK�右)i�2rKu医)i�2rKu宗)i�2rKu学)i�2rKu監)i�2rKu企)i�2rKu資)i�2rKu協)i�2rKu夜)i�2rK�36r�r�r�r��_seg_31r��r�r�c�
�gd�S)N)d)i�2rK�37)i�2rK�38)i�2rK�39)i�2rK�40)i�2rK�41)i�2rK�42)i�2rK�43)i�2rK�44)i�2rK�45)i�2rK�46)i�2rK�47)i�2rK�48)i�2rK�49)i�2rK�50)i�2rKu1月)i�2rKu2月)i�2rKu3月)i�2rKu4月)i�2rKu5月)i�2rKu6月)i�2rKu7月)i�2rKu8月)i�2rKu9月)i�2rKu10月)i�2rKu11月)i�2rKu12月)i�2rK�hg)i�2rK�erg)i�2rK�ev)i�2rK�ltd)i�2rK�ア)i�2rK�イ)i�2rK�ウ)i�2rK�エ)i�2rK�オ)i�2rK�カ)i�2rK�キ)i�2rK�ク)i�2rK�ケ)i�2rK�コ)i�2rK�サ)i�2rK�シ)i�2rK�ス)i�2rK�セ)i�2rK�ソ)i�2rK�タ)i�2rK�チ)i�2rK�ツ)i�2rK�テ)i�2rK�ト)i�2rK�ナ)i�2rK�ニ)i�2rK�ヌ)i�2rK�ネ)i�2rK�ノ)i�2rK�ハ)i�2rK�ヒ)i�2rK�フ)i�2rK�ヘ)i�2rK�ホ)i�2rK�マ)i�2rK�ミ)i�2rK�ム)i�2rK�メ)i�2rK�モ)i�2rK�ヤ)i�2rK�ユ)i�2rK�ヨ)i�2rK�ラ)i�2rK�リ)i�2rK�ル)i�2rK�レ)i�2rK�ロ)i�2rK�ワ)i�2rKuヰ)i�2rKuヱ)i�2rK�ヲ)i�2rKu令和)i3rKuアパート)i3rKuアルファ)i3rKuアンペア)i3rKu	アール)i3rKuイニング)i3rKu	インチ)i3rKu	ウォン)i3rKuエスクード)i3rKuエーカー)i	3rKu	オンス)i
3rKu	オーム)i3rKu	カイリ)i3rKuカラット)i
3rKuカロリー)i3rKu	ガロン)i3rKu	ガンマ)i3rKuギガ)i3rKu	ギニー)i3rKuキュリー)i3rKuギルダー)i3rKuキロ)i3rKuキログラムr�r�r�r��_seg_32r'
r�r�c�
�gd�S)N)d)i3rKuキロメートル)i3rKuキロワット)i3rKu	グラム)i3rKuグラムトン)i3rKuクルゼイロ)i3rKuクローネ)i3rKu	ケース)i3rKu	コルナ)i3rKu	コーポ)i3rKuサイクル)i 3rKuサンチーム)i!3rKuシリング)i"3rKu	センチ)i#3rKu	セント)i$3rKu	ダース)i%3rKuデシ)i&3rKuドル)i'3rKuトン)i(3rKuナノ)i)3rKu	ノット)i*3rKu	ハイツ)i+3rKuパーセント)i,3rKu	パーツ)i-3rKuバーレル)i.3rKuピアストル)i/3rKu	ピクル)i03rKuピコ)i13rKuビル)i23rKuファラッド)i33rKuフィート)i43rKuブッシェル)i53rKu	フラン)i63rKuヘクタール)i73rKuペソ)i83rKu	ペニヒ)i93rKu	ヘルツ)i:3rKu	ペンス)i;3rKu	ページ)i<3rKu	ベータ)i=3rKuポイント)i>3rKu	ボルト)i?3rKuホン)i@3rKu	ポンド)iA3rKu	ホール)iB3rKu	ホーン)iC3rKuマイクロ)iD3rKu	マイル)iE3rKu	マッハ)iF3rKu	マルク)iG3rKuマンション)iH3rKuミクロン)iI3rKuミリ)iJ3rKuミリバール)iK3rKuメガ)iL3rKuメガトン)iM3rKuメートル)iN3rKu	ヤード)iO3rKu	ヤール)iP3rKu	ユアン)iQ3rKuリットル)iR3rKuリラ)iS3rKu	ルピー)iT3rKuルーブル)iU3rKuレム)iV3rKuレントゲン)iW3rKu	ワット)iX3rKu0点)iY3rKu1点)iZ3rKu2点)i[3rKu3点)i\3rKu4点)i]3rKu5点)i^3rKu6点)i_3rKu7点)i`3rKu8点)ia3rKu9点)ib3rKu10点)ic3rKu11点)id3rKu12点)ie3rKu13点)if3rKu14点)ig3rKu15点)ih3rKu16点)ii3rKu17点)ij3rKu18点)ik3rKu19点)il3rKu20点)im3rKu21点)in3rKu22点)io3rKu23点)ip3rKu24点)iq3rK�hpa)ir3rK�da)is3rK�au)it3rK�bar)iu3rK�ov)iv3rK�pc)iw3rK�dm)ix3rK�dm2)iy3rK�dm3r�r�r�r��_seg_33r2s
r�r�c�
�gd�S)N)d)iz3rK�iu)i{3rKu平成)i|3rKu昭和)i}3rKu大正)i~3rKu明治)i3rKu株式会社)i�3rK�pa)i�3rK�na)i�3rKuμa)i�3rK�ma)i�3rK�ka)i�3rK�kb)i�3rK�mb)i�3rK�gb)i�3rK�cal)i�3rK�kcal)i�3rK�pf)i�3rK�nf)i�3rKuμf)i�3rKuμg)i�3rK�mg)i�3rK�kg)i�3rK�hz)i�3rK�khz)i�3rK�mhz)i�3rK�ghz)i�3rK�thz)i�3rKuμl)i�3rK�ml)i�3rK�dl)i�3rK�kl)i�3rK�fm)i�3rK�nm)i�3rKuμm)i�3rK�mm)i�3rK�cm)i�3rK�km)i�3rK�mm2)i�3rK�cm2)i�3rK�m2)i�3rK�km2)i�3rK�mm3)i�3rK�cm3)i�3rK�m3)i�3rK�km3)i�3rKum∕s)i�3rKum∕s2)i�3rKr5)i�3rK�kpa)i�3rK�mpa)i�3rK�gpa)i�3rK�rad)i�3rKurad∕s)i�3rKurad∕s2)i�3rK�ps)i�3rK�ns)i�3rKuμs)i�3rK�ms)i�3rK�pv)i�3rK�nv)i�3rKuμv)i�3rK�mv)i�3rK�kv)i�3rKr`)i�3rK�pw)i�3rK�nw)i�3rKuμw)i�3rK�mw)i�3rK�kw)i�3rKrd)i�3rKukω)i�3rKumω)i�3r�)i�3rK�bq)i�3rK�cc)i�3rK�cd)i�3rKuc∕kg)i�3r�)i�3rK�db)i�3rK�gy)i�3rK�ha)i�3rK�hp)i�3rK�in)i�3rK�kk)i�3rKrN)i�3rK�kt)i�3rK�lm)i�3rK�ln)i�3rK�log)i�3rK�lx)i�3rKr:)i�3rK�mil)i�3rK�mol)i�3rK�ph)i�3r�)i�3rK�ppm)i�3rK�pr)i�3rK�sr)i�3rK�sv)i�3rK�wbr�r�r�r��_seg_34r|�
r�r�c�
�gd�S)N)d)i�3rKuv∕m)i�3rKua∕m)i�3rKu1日)i�3rKu2日)i�3rKu3日)i�3rKu4日)i�3rKu5日)i�3rKu6日)i�3rKu7日)i�3rKu8日)i�3rKu9日)i�3rKu10日)i�3rKu11日)i�3rKu12日)i�3rKu13日)i�3rKu14日)i�3rKu15日)i�3rKu16日)i�3rKu17日)i�3rKu18日)i�3rKu19日)i�3rKu20日)i�3rKu21日)i�3rKu22日)i�3rKu23日)i�3rKu24日)i�3rKu25日)i�3rKu26日)i�3rKu27日)i�3rKu28日)i�3rKu29日)i�3rKu30日)i�3rKu31日)i�3rK�gal)i4r6)i��r�)i��r6)iǤr�)iФr6)i,�r�)i@�rKuꙁ)iA�r6)iB�rKuꙃ)iC�r6)iD�rKuꙅ)iE�r6)iF�rKuꙇ)iG�r6)iH�rKuꙉ)iI�r6)iJ�rKr�)iK�r6)iL�rKuꙍ)iM�r6)iN�rKuꙏ)iO�r6)iP�rK�ꙑ)iQ�r6)iR�rKuꙓ)iS�r6)iT�rKuꙕ)iU�r6)iV�rKuꙗ)iW�r6)iX�rKuꙙ)iY�r6)iZ�rKuꙛ)i[�r6)i\�rKuꙝ)i]�r6)i^�rKuꙟ)i_�r6)i`�rKuꙡ)ia�r6)ib�rKuꙣ)ic�r6)id�rKuꙥ)ie�r6)if�rKuꙧ)ig�r6)ih�rKuꙩ)ii�r6)ij�rKuꙫ)ik�r6)il�rKuꙭ)im�r6)i��rKuꚁ)i��r6)i��rKuꚃ)i��r6)i��rKuꚅ)i��r6)i��rKuꚇ)i��r6)i��rK�ꚉ)i��r6)i��rKuꚋ)i��r6)i��rKuꚍ)i��r6r�r�r�r��_seg_35r�Cr�r�c�
�gd�S)N)d)i��rKuꚏ)i��r6)i��rKuꚑ)i��r6)i��rKuꚓ)i��r6)i��rKuꚕ)i��r6)i��rKuꚗ)i��r6)i��rKuꚙ)i��r6)i��rKuꚛ)i��r6)i��rKr�)i��rKr�)i��r6)i��r�)i�r6)i"�rKuꜣ)i#�r6)i$�rKuꜥ)i%�r6)i&�rK�ꜧ)i'�r6)i(�rKuꜩ)i)�r6)i*�rKuꜫ)i+�r6)i,�rKuꜭ)i-�r6)i.�rKuꜯ)i/�r6)i2�rKuꜳ)i3�r6)i4�rKuꜵ)i5�r6)i6�rKuꜷ)i7�r6)i8�rKuꜹ)i9�r6)i:�rKuꜻ)i;�r6)i<�rKuꜽ)i=�r6)i>�rKuꜿ)i?�r6)i@�rKuꝁ)iA�r6)iB�rKuꝃ)iC�r6)iD�rKuꝅ)iE�r6)iF�rKuꝇ)iG�r6)iH�rKuꝉ)iI�r6)iJ�rKuꝋ)iK�r6)iL�rKuꝍ)iM�r6)iN�rKuꝏ)iO�r6)iP�rKuꝑ)iQ�r6)iR�rKuꝓ)iS�r6)iT�rKuꝕ)iU�r6)iV�rKuꝗ)iW�r6)iX�rKuꝙ)iY�r6)iZ�rKuꝛ)i[�r6)i\�rKuꝝ)i]�r6)i^�rKuꝟ)i_�r6)i`�rKuꝡ)ia�r6)ib�rKuꝣ)ic�r6)id�rKuꝥ)ie�r6)if�rKuꝧ)ig�r6)ih�rKuꝩ)ii�r6)ij�rKuꝫ)ik�r6)il�rKuꝭ)im�r6)in�rK�ꝯ)io�r6)ip�rKr�)iq�r6)iy�rKuꝺ)iz�r6)i{�rKuꝼr�r�r�r��_seg_36r��r�r�c�
�gd�S)N)d)i|�r6)i}�rKuᵹ)i~�rKuꝿ)i�r6)i��rKuꞁ)i��r6)i��rKuꞃ)i��r6)i��rKuꞅ)i��r6)i��rKuꞇ)i��r6)i��rKuꞌ)i��r6)i��rKr�)i��r6)i��rKuꞑ)i��r6)i��rKuꞓ)i��r6)i��rKuꞗ)i��r6)i��rKuꞙ)i��r6)i��rKuꞛ)i��r6)i��rKuꞝ)i��r6)i��rKuꞟ)i��r6)i��rKuꞡ)i��r6)i��rKuꞣ)i��r6)i��rKuꞥ)i��r6)i��rKuꞧ)i��r6)i��rKuꞩ)i��r6)i��rKrz)i��rKr�)i��rKr�)i��rK�ɬ)i��rKr�)i��r6)i��rKuʞ)i��rKuʇ)i��rKr�)i��rKuꭓ)i��rKuꞵ)i��r6)i��rKuꞷ)i��r6)i��rKuꞹ)i��r6)i��rKuꞻ)i��r6)i��rKuꞽ)i��r6)i��rKuꞿ)i��r6)i��rKuꟁ)i��r6)i§rKuꟃ)içr6)iħrKuꞔ)iŧrKr�)iƧrKuᶎ)iǧrKuꟈ)iȧr6)iɧrKuꟊ)iʧr6)i˧r�)iЧrKuꟑ)iѧr6)iҧr�)iӧr6)iԧr�)iէr6)i֧rKuꟗ)iקr6)iاrKuꟙ)i٧r6)iڧr�)i�rKrP)i�rKrV)i�rKrl)i��rKuꟶ)i��r6)i��rKrU)i��rKrZ)i��r6)i-�r�)i0�r6)i:�r�)i@�r6)ix�r�)i��r6)iƨr�r�r�r�r��_seg_37r�r�r�c�
�gd�S)N)d)iΨr6)iڨr�)i�r6)iT�r�)i_�r6)i}�r�)i��r6)iΩr�)iϩr6)iکr�)iީr6)i��r�)i�r6)i7�r�)i@�r6)iN�r�)iP�r6)iZ�r�)i\�r6)iêr�)i۪r6)i��r�)i�r6)i�r�)i	�r6)i�r�)i�r6)i�r�)i �r6)i'�r�)i(�r6)i/�r�)i0�r6)i\�rKr�)i]�rKuꬷ)i^�rKr_)i_�rKuꭒ)i`�r6)ii�rKuʍ)ij�r6)il�r�)ip�rKuᎠ)iq�rKuᎡ)ir�rKuᎢ)is�rKuᎣ)it�rKuᎤ)iu�rKuᎥ)iv�rKuᎦ)iw�rKuᎧ)ix�rKuᎨ)iy�rKuᎩ)iz�rKuᎪ)i{�rKuᎫ)i|�rKuᎬ)i}�rKuᎭ)i~�rKuᎮ)i�rKuᎯ)i��rKuᎰ)i��rKuᎱ)i��rKuᎲ)i��rKuᎳ)i��rKuᎴ)i��rKuᎵ)i��rKuᎶ)i��rKuᎷ)i��rKuᎸ)i��rKuᎹ)i��rKuᎺ)i��rKuᎻ)i��rKuᎼ)i��rKuᎽ)i��rKuᎾ)i��rKuᎿ)i��rKuᏀ)i��rKuᏁ)i��rKuᏂ)i��rKuᏃ)i��rKuᏄ)i��rKuᏅ)i��rKuᏆ)i��rKuᏇ)i��rKuᏈ)i��rKuᏉ)i��rKuᏊ)i��rKuᏋ)i��rKuᏌ)i��rKuᏍ)i��rKuᏎ)i��rKuᏏ)i��rKuᏐ)i��rKuᏑ)i��rKuᏒ)i��rKuᏓ)i��rKuᏔ)i��rKuᏕ)i��rKuᏖ)i��rKuᏗ)i��rKuᏘ)i��rKuᏙ)i��rKuᏚr�r�r�r��_seg_38r�{r�r�c�
�gd�S)N)d)i��rKuᏛ)i��rKuᏜ)i��rKuᏝ)i��rKuᏞ)i��rKuᏟ)i��rKuᏠ)i��rKuᏡ)i��rKuᏢ)i��rKuᏣ)i��rKuᏤ)i��rKuᏥ)i��rKuᏦ)i��rKuᏧ)i��rKuᏨ)i��rKuᏩ)i��rKuᏪ)i��rKuᏫ)i��rKuᏬ)i��rKuᏭ)i��rKuᏮ)i��rKuᏯ)i��r6)i�r�)i�r6)i��r�)i�r6)i��r�)i��r6)i��r�)i��r6)i��r�)i�rKu豈)i�rKu更)i�rKr�)i�rKu賈)i�rKu滑)i�rKu串)i�rKu句)i�rKr�)i	�rKu契)i
�rKr�)i�rKu喇)i�rKu奈)i
�rK�懶)i�rKu癩)i�rKu羅)i�rKu蘿)i�rKu螺)i�rKu裸)i�rKu邏)i�rK�樂)i�rKu洛)i�rKu烙)i�rKu珞)i�rKu落)i�rKu酪)i�rKu駱)i�rKu亂)i�rKu卵)i�rKu欄)i�rKu爛)i�rKu蘭)i �rKu鸞)i!�rKu嵐)i"�rKu濫)i#�rKu藍)i$�rKu襤)i%�rKu拉)i&�rKu臘)i'�rKu蠟)i(�rK�廊)i)�rK�朗)i*�rKu浪)i+�rKu狼)i,�rKu郎)i-�rKu來)i.�rKu冷)i/�rKu勞)i0�rKu擄)i1�rKu櫓)i2�rKu爐)i3�rKu盧)i4�rKr)i5�rKu蘆)i6�rK�虜)i7�rKu路)i8�rKu露)i9�rKu魯)i:�rKu鷺)i;�rK�碌)i<�rKu祿)i=�rKu綠)i>�rKu菉)i?�rKu錄)i@�rKr�)iA�rKu論)iB�rKu壟)iC�rKu弄)iD�rKu籠)iE�rKu聾r�r�r�r��_seg_39r��r�r�c�
�gd�S)N)d)iF�rKu牢)iG�rKu磊)iH�rKu賂)iI�rKu雷)iJ�rKu壘)iK�rKu屢)iL�rKu樓)iM�rKu淚)iN�rKu漏)iO�rKu累)iP�rKu縷)iQ�rKu陋)iR�rKu勒)iS�rKu肋)iT�rKu凜)iU�rKu凌)iV�rKu稜)iW�rKu綾)iX�rKu菱)iY�rKu陵)iZ�rKu讀)i[�rKu拏)i\�rKr�)i]�rK�諾)i^�rKu丹)i_�rK�寧)i`�rKu怒)ia�rK�率)ib�rK�異)ic�rK�北)id�rKu磻)ie�rKu便)if�rKu復)ig�rKu不)ih�rKu泌)ii�rKu數)ij�rKu索)ik�rKu參)il�rKu塞)im�rKu省)in�rKu葉)io�rK�說)ip�rK�殺)iq�rKr�)ir�rKu沈)is�rKu拾)it�rK�若)iu�rKu掠)iv�rKu略)iw�rKu亮)ix�rKu兩)iy�rKu凉)iz�rKu梁)i{�rKu糧)i|�rKu良)i}�rKu諒)i~�rKu量)i�rKu勵)i��rKu呂)i��rKrn)i��rKu廬)i��rKu旅)i��rKu濾)i��rKu礪)i��rKu閭)i��rKu驪)i��rKu麗)i��rKu黎)i��rKri)i��rKu曆)i��rKu歷)i��rKu轢)i��rKu年)i��rKu憐)i��rKu戀)i��rKu撚)i��rKu漣)i��rKu煉)i��rKu璉)i��rKu秊)i��rK�練)i��rKu聯)i��rKu輦)i��rKu蓮)i��rKu連)i��rKu鍊)i��rKu列)i��rKu劣)i��rKu咽)i��rKu烈)i��rKu裂)i��rKr�)i��rKu廉)i��rKu念)i��rKu捻)i��rKu殮)i��rKu簾)i��rKu獵)i��rKu令)i��rKu囹r�r�r�r��_seg_40r�Kr�r�c�
�gd�S)N)d)i��rKr�)i��rKu嶺)i��rKu怜)i��rKu玲)i��rKu瑩)i��rKu羚)i��rKu聆)i��rKu鈴)i��rKu零)i��rKu靈)i��rKu領)i��rKu例)i��rKu禮)i��rKu醴)i��rKu隸)i��rKu惡)i��rKu了)i��rKu僚)i��rKu寮)i��rKu尿)i��rK�料)i��rKr�)i��rKu燎)i��rKu療)i�rKu蓼)i�rKu遼)i�rKr�)i�rKu暈)i�rKu阮)i�rKu劉)i�rKu杻)i�rKu柳)i�rK�流)i�rKu溜)i�rKu琉)i�rKu留)i�rKu硫)i�rKu紐)i�rKu類)i�rKr�)i�rKu戮)i�rKu陸)i�rKu倫)i�rKu崙)i�rKu淪)i�rKu輪)i�rKu律)i�rKu慄)i�rKu栗)i�rKr�)i�rKu隆)i�rKu利)i�rKu吏)i�rKu履)i�rKu易)i�rKu李)i�rKu梨)i�rKu泥)i�rKu理)i�rKu痢)i�rKu罹)i�rKu裏)i�rKu裡)i�rKr�)i�rKu離)i�rKu匿)i�rKu溺)i�rKu吝)i�rKu燐)i�rKu璘)i�rKu藺)i�rKu隣)i�rKu鱗)i�rKu麟)i�rKu林)i��rKu淋)i��rKu臨)i��rKr{)i��rKu笠)i��rKu粒)i��rKu狀)i��rKu炙)i��rKu識)i��rKu什)i��rKu茶)i��rKu刺)i�rK�切)i�rKu度)i�rKu拓)i�rKu糖)i�rKu宅)i�rKu洞)i�rKu暴)i�rKu輻)i�rKr�)i	�rKu降)i
�rKr�)i�rKu廓)i�rKu兀)i
�rKu嗀r�r�r�r��_seg_41r��r�r�c�
�gd�S)N)d)i�r6)i�rK�塚)i�r6)i�rK�晴)i�r6)i�rKu凞)i�rK�猪)i�rK�益)i�rKu礼)i�rKu神)i�rKu祥)i�rK�福)i�rK�靖)i�rKu精)i�rKr~)i�r6)i �rKu蘒)i!�r6)i"�rK�諸)i#�r6)i%�rK�逸)i&�rKu都)i'�r6)i*�rKu飯)i+�rKu飼)i,�rKu館)i-�rKu鶴)i.�rKu郞)i/�rKu隷)i0�rK�侮)i1�rK�僧)i2�rK�免)i3�rK�勉)i4�rK�勤)i5�rK�卑)i6�rK�喝)i7�rK�嘆)i8�rKu器)i9�rKu塀)i:�rKu墨)i;�rKu層)i<�rKrp)i=�rK�悔)i>�rKu慨)i?�rK�憎)i@�rK�懲)iA�rK�敏)iB�rKu既)iC�rK�暑)iD�rK�梅)iE�rK�海)iF�rKu渚)iG�rK�漢)iH�rK�煮)iI�rKu爫)iJ�rKu琢)iK�rKu碑)iL�rKr�)iM�rKu祉)iN�rKu祈)iO�rKu祐)iP�rK�祖)iQ�rKr�)iR�rKu禍)iS�rKu禎)iT�rK�穀)iU�rKu突)iV�rK�節)iW�rKr�)iX�rKu縉)iY�rKu繁)iZ�rKu署)i[�rK�者)i\�rKu臭)i]�rKu艹)i_�rK�著)i`�rKu褐)ia�rK�視)ib�rK�謁)ic�rK�謹)id�rKu賓)ie�rK�贈)if�rKu辶)ig�rKr�)ih�rK�難)ii�rK�響)ij�rK�頻)ik�rKu恵)il�rKu𤋮)im�rKu舘)in�r�)ip�rKu並)iq�rK�况)ir�rKu全)is�rKu侀)it�rKu充)iu�rKu冀)iv�rK�勇)iw�rK�勺)ix�rKr�r�r�r�r��_seg_42r�r�r�c�
�gd�S)N)d)iy�rKu啕)iz�rK�喙)i{�rKu嗢)i|�rKr�)i}�rKu墳)i~�rKu奄)i�rKu奔)i��rKu婢)i��rKu嬨)i��rKu廒)i��rKu廙)i��rKu彩)i��rKu徭)i��rKu惘)i��rK�慎)i��rKu愈)i��rKr�)i��rKu慠)i��rKr�)i��rKu戴)i��rKu揄)i��rKu搜)i��rKu摒)i��rKu敖)i��rKr�)i��rKr�)i��rK�望)i��rKu杖)i��rKrw)i��rKr�)i��rKr�)i��rKu滛)i��rK�滋)i��rKr�)i��rK�瀞)i��rKr�)i��rKu瞧)i��rK�爵)i��rKu犯)i��rKr�)i��rK�瑱)i��rKu甆)i��rKu画)i��rKu瘝)i��rKu瘟)i��rKr�)i��rKu盛)i��rK�直)i��rK�睊)i��rKu着)i��rK�磌)i��rKu窱)i��rKr�)i��rKu类)i��rKu絛)i��rKr�)i��rKu缾)i��rKr�)i��rKu荒)i��rKu華)i��rK�蝹)i��rKu襁)i��rKu覆)i��rKr�)i��rKu調)i��rKr�)i��rKu請)i��rKr�)i��rKr�)i��rK�諭)i��rKr�)i��rK�變)i��rKr�)i�rK�輸)i�rKu遲)i�rKu醙)i�rKu鉶)i�rKu陼)i�rKr�)i�rKr�)i�rKu韛)i�rKr�)i�rK�頋)i�rKr�)i�rK�鬒)i�rKr�)i�rKu𢡊)i�rKu𢡄)i�rKu𣏕)i�rK�㮝)i�rKu䀘)i�rK�䀹)i�rKu𥉉)i�rKu𥳐)i�rKu𧻓)i�rKu齃)i�rKu龎)i�r�)i�rK�ff)i�rK�fir�r�r�r��_seg_43r��r�r�c�
�gd�S)N)d)i�rK�fl)i�rK�ffi)i�rK�ffl)i�rK�st)i�r�)i�rKuմն)i�rKuմե)i�rKuմի)i�rKuվն)i�rKuմխ)i�r�)i�rKuיִ)i�r6)i�rKuײַ)i �rKuע)i!�rKr&)i"�rKr')i#�rKuה)i$�rKuכ)i%�rKuל)i&�rKuם)i'�rKuר)i(�rKuת)i)�rr)i*�rKuשׁ)i+�rKuשׂ)i,�rKuשּׁ)i-�rKuשּׂ)i.�rKuאַ)i/�rKuאָ)i0�rKuאּ)i1�rKuבּ)i2�rKuגּ)i3�rKuדּ)i4�rKuהּ)i5�rKuוּ)i6�rKuזּ)i7�r�)i8�rKuטּ)i9�rKuיּ)i:�rKuךּ)i;�rKuכּ)i<�rKuלּ)i=�r�)i>�rKuמּ)i?�r�)i@�rKuנּ)iA�rKuסּ)iB�r�)iC�rKuףּ)iD�rKuפּ)iE�r�)iF�rKuצּ)iG�rKuקּ)iH�rKuרּ)iI�rKuשּ)iJ�rKuתּ)iK�rKuוֹ)iL�rKuבֿ)iM�rKuכֿ)iN�rKuפֿ)iO�rKuאל)iP�rKuٱ)iR�rKuٻ)iV�rKuپ)iZ�rKuڀ)i^�rKuٺ)ib�rKuٿ)if�rKuٹ)ij�rKuڤ)in�rKuڦ)ir�rKuڄ)iv�rKuڃ)iz�rKuچ)i~�rKuڇ)i��rKuڍ)i��rKuڌ)i��rKuڎ)i��rKuڈ)i��rKuژ)i��rKuڑ)i��rKuک)i��rKuگ)i��rKuڳ)i��rKuڱ)i��rK�ں)i��rKuڻ)i��rKuۀ)i��rKuہ)i��rKuھ)i��rKuے)i��rKuۓ)i��r6)i�r�)i�rKuڭ)i�rKuۇ)i�rKuۆ)i�rKuۈ)i�rKr�)i�rKuۋr�r�r�r��_seg_44r��r�r�c�
�gd�S)N)d)i�rKuۅ)i�rKuۉ)i�rKuې)i�rK�ى)i�rKuئا)i�rKuئە)i�rKuئو)i�rKuئۇ)i�rKuئۆ)i�rKuئۈ)i��rKuئې)i��rK�ئى)i��rKuی)i�rK�ئج)i�rK�ئح)i�rK�ئم)i�rKr�)i�rK�ئي)i�rK�بج)i�rK�بح)i�rK�بخ)i�rK�بم)i	�rK�بى)i
�rK�بي)i�rK�تج)i�rK�تح)i
�rK�تخ)i�rK�تم)i�rK�تى)i�rK�تي)i�rKuثج)i�rK�ثم)i�rK�ثى)i�rK�ثي)i�rK�جح)i�rK�جم)i�rK�حج)i�rK�حم)i�rK�خج)i�rKuخح)i�rK�خم)i�rK�سج)i�rK�سح)i�rK�سخ)i�rK�سم)i �rK�صح)i!�rK�صم)i"�rK�ضج)i#�rK�ضح)i$�rK�ضخ)i%�rK�ضم)i&�rK�طح)i'�rK�طم)i(�rK�ظم)i)�rK�عج)i*�rK�عم)i+�rK�غج)i,�rK�غم)i-�rK�فج)i.�rK�فح)i/�rK�فخ)i0�rK�فم)i1�rK�فى)i2�rK�في)i3�rK�قح)i4�rK�قم)i5�rK�قى)i6�rK�قي)i7�rK�كا)i8�rK�كج)i9�rK�كح)i:�rK�كخ)i;�rK�كل)i<�rK�كم)i=�rK�كى)i>�rK�كي)i?�rK�لج)i@�rK�لح)iA�rK�لخ)iB�rK�لم)iC�rK�لى)iD�rK�لي)iE�rK�مج)iF�rK�مح)iG�rK�مخ)iH�rK�مم)iI�rKuمى)iJ�rKuمي)iK�rK�نج)iL�rK�نح)iM�rK�نخ)iN�rK�نم)iO�rK�نى)iP�rK�ني)iQ�rK�هج)iR�rK�هم)iS�rKuهى)iT�rKuهي)iU�rK�يج)iV�rK�يحr�r�r�r��_seg_45r=Sr�r�c�
�gd�S)N)d)iW�rK�يخ)iX�rK�يم)iY�rK�يى)iZ�rK�يي)i[�rKuذٰ)i\�rKuرٰ)i]�rK�ىٰ)i^�ru ٌّ)i_�ru ٍّ)i`�ru َّ)ia�ru ُّ)ib�ru ِّ)ic�ru ّٰ)id�rKuئر)ie�rKuئز)if�rKr�)ig�rKuئن)ih�rKr�)ii�rKr�)ij�rKuبر)ik�rKuبز)il�rKr�)im�rKuبن)in�rKr�)io�rKr�)ip�rKuتر)iq�rKuتز)ir�rKr�)is�rKuتن)it�rKr�)iu�rKr�)iv�rKuثر)iw�rKuثز)ix�rKr�)iy�rKuثن)iz�rKr�)i{�rKr�)i|�rKr)i}�rKr)i~�rKr)i�rKr )i��rKr!)i��rKr%)i��rKr&)i��rKr')i��rKr()i��rKr,)i��rKr-)i��rKr.)i��rKuما)i��rKr2)i��rKuنر)i��rKuنز)i��rKr6)i��rKuنن)i��rKr7)i��rKr8)i��rKrC)i��rKuير)i��rKuيز)i��rKr@)i��rKuين)i��rKrA)i��rKrB)i��rKr�)i��rKr�)i��rKuئخ)i��rKr�)i��rK�ئه)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rK�به)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rK�ته)i��rKr�)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr	)i��rKr
)i��rKuصخ)i��rKr)i��rKr)i��rKr
)i��rKr)i��rKr)i��rKr)i��rKr)i��rKrr�r�r�r��_seg_46rG�r�r�c�
�gd�S)N)d)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i�rKr)i�rKr)i�rKr")i�rKr#)i�rKr$)i�rKr%)i�rKr&)i�rKr))i�rKr*)i�rKr+)i�rKr,)i�rKuله)i�rKr/)i�rKr0)i�rKr1)i�rKr2)i�rKr3)i�rKr4)i�rKr5)i�rKr6)i�rK�نه)i�rKr9)i�rKr:)i�rKuهٰ)i�rKr;)i�rKr<)i�rKr?)i�rKr@)i�rK�يه)i�rKr�)i�rKrD)i�rKr�)i�rKrE)i�rKr�)i�rKrF)i�rKr�)i�rKuثه)i�rKr	)i�rK�سه)i�rK�شم)i�rK�شه)i�rKr%)i�rKr&)i�rKr,)i�rKr6)i�rKrI)i�rKr@)i�rKrJ)i�rKuـَّ)i�rKuـُّ)i�rKuـِّ)i��rK�طى)i��rK�طي)i��rK�عى)i��rK�عي)i��rK�غى)i��rK�غي)i��rK�سى)i��rK�سي)i��rK�شى)i��rK�شي)i��rK�حى)i�rK�حي)i�rK�جى)i�rK�جي)i�rK�خى)i�rK�خي)i�rK�صى)i�rK�صي)i�rK�ضى)i�rK�ضي)i	�rK�شج)i
�rK�شح)i�rK�شخ)i�rKrL)i
�rK�شر)i�rK�سر)i�rK�صر)i�rK�ضر)i�rKrN)i�rKrO)i�rKrP)i�rKrQ)i�rKrR)i�rKrS)i�rKrT)i�rKrU)i�rKrV)i�rKrW)i�rKrX)i�rKrY)i�rKrZ)i�rKr[r�r�r�r��_seg_47ri#r�r�c�
�gd�S)N)d)i�rKr\)i �rKr])i!�rKr^)i"�rKr_)i#�rKr`)i$�rKra)i%�rKrb)i&�rKrc)i'�rKrd)i(�rKrL)i)�rKre)i*�rKrf)i+�rKrg)i,�rKrh)i-�rKrb)i.�rKrc)i/�rKrd)i0�rKrL)i1�rKrK)i2�rKrM)i3�rKr)i4�rKr)i5�rKr)i6�rKr)i7�rKrb)i8�rKrc)i9�rKrd)i:�rKr)i;�rKr)i<�rKuاً)i>�r6)iP�rKuتجم)iQ�rKuتحج)iS�rKuتحم)iT�rKuتخم)iU�rKuتمج)iV�rKuتمح)iW�rKuتمخ)iX�rKuجمح)iZ�rKuحمي)i[�rKuحمى)i\�rKuسحج)i]�rKuسجح)i^�rKuسجى)i_�rKuسمح)ia�rKuسمج)ib�rKuسمم)id�rKuصحح)if�rK�صمم)ig�rKuشحم)ii�rKuشجي)ij�rKuشمخ)il�rKuشمم)in�rKuضحى)io�rKuضخم)iq�rKuطمح)is�rKuطمم)it�rKuطمي)iu�rK�عجم)iv�rKuعمم)ix�rKuعمى)iy�rKuغمم)iz�rKuغمي)i{�rKuغمى)i|�rKuفخم)i~�rK�قمح)i�rKuقمم)i��rK�لحم)i��rKuلحي)i��rKuلحى)i��rKuلجج)i��rKuلخم)i��rKuلمح)i��rKuمحج)i��rKuمحم)i��rKuمحي)i��rKuمجح)i��rKuمجم)i��rKuمخج)i��rKuمخم)i��r�)i��rKuمجخ)i��rKuهمج)i��rKuهمم)i��rKuنحم)i��rKuنحى)i��rKuنجم)i��rKuنجى)i��rKuنمي)i��rKuنمى)i��rKuيمم)i��rKuبخي)i��rKuتجي)i��rKuتجى)i��rKuتخي)i��rKuتخى)i��rKuتمي)i��rKuتمى)i��rKuجمي)i��rKuجحىr�r�r�r��_seg_48ro�r�r�c�
�gd�S)N)d)i��rKuجمى)i��rKuسخى)i��rKuصحي)i��rKuشحي)i��rKuضحي)i��rKuلجي)i��rKuلمي)i��rKuيحي)i��rKuيجي)i��rKuيمي)i��rKuممي)i��rKuقمي)i��rKuنحي)i��rKrm)i��rKrn)i��rKuعمي)i��rKuكمي)i��rK�نجح)i��rKuمخي)i��rK�لجم)i��rK�كمم)i��rKrr)i��rKrq)i��rKuجحي)i��rKuحجي)i��rKuمجي)i��rKuفمي)i�rKuبحي)i�rKrs)i�rKrl)i�rKrk)i�rKuسخي)i�rKuنجي)i�r�)i�r6)i�r�)i�rKuصلے)i�rKuقلے)i�rKuالله)i�rKuاكبر)i�rKuمحمد)i��rKuصلعم)i��rKuرسول)i��rKuعليه)i��rKuوسلم)i��rKuصلى)i��ru!صلى الله عليه وسلم)i��ruجل جلاله)i��rKuریال)i��r6)i�r�)i�r�,)i�rK�、)i�r�)i�r�:)i�rr~)i�r�!)i�r�?)i�rKu〖)i�rKu〗)i�r�)i �r6)i0�r�)i1�rK�—)i2�rKu–)i3�r�_)i5�rr)i6�rr)i7�r�{)i8�r�})i9�rK�〔)i:�rK�〕)i;�rKu【)i<�rKu】)i=�rKu《)i>�rKu》)i?�rKr4)i@�rKr5)iA�rK�「)iB�rK�」)iC�rKu『)iD�rKu』)iE�r6)iG�r�[)iH�r�])iI�rr)iM�rrz)iP�rrt)iQ�rKru)iR�r�)iT�rr~)iU�rrv)iV�rrx)iW�rrw)iX�rKry)iY�rr)iZ�rr)i[�rr{)i\�rr|)i]�rKr}r�r�r�r��_seg_49r��r�r�c�
�gd�S)N)d)i^�rKr~)i_�r�#)i`�r�&)ia�r�*)ib�rr)ic�rK�-)id�r�<)ie�r�>)if�rr)ig�r�)ih�r�\)ii�r�$)ij�r�%)ik�r�@)il�r�)ip�ru ً)iq�rKuـً)ir�ru ٌ)is�r6)it�ru ٍ)iu�r�)iv�ru َ)iw�rKuـَ)ix�ru ُ)iy�rKuـُ)iz�ru ِ)i{�rKuـِ)i|�ru ّ)i}�rKuـّ)i~�ru ْ)i�rKuـْ)i��rKuء)i��rKuآ)i��rKuأ)i��rKuؤ)i��rKuإ)i��rKuئ)i��rK�ا)i��rK�ب)i��rKuة)i��rK�ت)i��rK�ث)i��rK�ج)i��rK�ح)i��rK�خ)i��rK�د)i��rK�ذ)i��rK�ر)i��rK�ز)i��rK�س)i��rK�ش)i��rK�ص)i��rK�ض)i��rK�ط)i�rK�ظ)i�rK�ع)i�rK�غ)i�rK�ف)i�rK�ق)i�rK�ك)i�rK�ل)i�rK�م)i�rK�ن)i�rK�ه)i�rK�و)i�rKr�)i�rK�ي)i��rKuلآ)i��rKuلأ)i��rKuلإ)i��rKuلا)i��r�)i��r�)i�r�)i�rrw)i�r�")i�rr�)i�rr�)i�rr�)i�rr�)i�r�')i�rr)i	�rr)i
�rr�)i�rr)i�rrt)i
�rKr�)i�rKr�)i�r�/)i�rKr)i�rKr�)i�rKr�)i�rKr)i�rKr)i�rKr)i�rKr)i�rKr)i�rKr)i�rKr)i�rrvr�r�r�r��_seg_50r�[r�r�c�
�gd�S)N)d)i�rr~)i�rr�)i�rr)i�rr�)i�rrx)i �rr�)i!�rKrL)i"�rKrN)i#�rKrP)i$�rKrR)i%�rKrT)i&�rKrV)i'�rKrX)i(�rKrZ)i)�rKr\)i*�rKr^)i+�rKr`)i,�rKrb)i-�rKrd)i.�rKrf)i/�rKrh)i0�rKrj)i1�rKrl)i2�rKrn)i3�rKrp)i4�rKrr)i5�rKrt)i6�rKrv)i7�rKrx)i8�rKrz)i9�rKr|)i:�rKr~)i;�rr�)i<�rr�)i=�rr�)i>�r�^)i?�rrz)i@�rr
)iA�rKrL)iB�rKrN)iC�rKrP)iD�rKrR)iE�rKrT)iF�rKrV)iG�rKrX)iH�rKrZ)iI�rKr\)iJ�rKr^)iK�rKr`)iL�rKrb)iM�rKrd)iN�rKrf)iO�rKrh)iP�rKrj)iQ�rKrl)iR�rKrn)iS�rKrp)iT�rKrr)iU�rKrt)iV�rKrv)iW�rKrx)iX�rKrz)iY�rKr|)iZ�rKr~)i[�rr{)i\�r�|)i]�rr|)i^�r�~)i_�rKu⦅)i`�rKu⦆)ia�rKr�)ib�rKr)ic�rKr�)id�rKru)ie�rKu・)if�rKr&)ig�rKuァ)ih�rKuィ)ii�rKuゥ)ij�rKuェ)ik�rKuォ)il�rKuャ)im�rKuュ)in�rKuョ)io�rKuッ)ip�rKuー)iq�rKr�)ir�rKr�)is�rKr�)it�rKr�)iu�rKr�)iv�rKr�)iw�rKr)ix�rKr)iy�rKr)iz�rKr)i{�rKr)i|�rKr)i}�rKr)i~�rKrr�r�r�r��_seg_51r��r�r�c�
�gd�S)N)d)i�rKr)i��rKr	)i��rKr
)i��rKr)i��rKr)i��rKr
)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr )i��rKr!)i��rKr")i��rKr#)i��rKr$)i��rKr%)i��rKuン)i��rKu゙)i��rKu゚)i��r�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��r�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�r�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�r�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�r�)i�rKr�)i�rKr�)i�rKr�)i�r�)i�rK�¢)i�rK�£)i�rK�¬)i�rr�)i�rK�¦)i�rK�¥)i�rKu₩)i�r�)i�rKu│)i�rKu←r�r�r�r��_seg_52r�+r�r�c�
�gd�S)N)d)i�rKu↑)i�rKu→)i�rKu↓)i�rKu■)i�rKu○)i�r�)ir6)ir�)i
r6)i'r�)i(r6)i;r�)i<r6)i>r�)i?r6)iNr�)iPr6)i^r�)i�r6)i�r�)ir6)ir�)ir6)i4r�)i7r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)i$r�)i-r6)iKr�)iPr6)i{r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)irKu𐐨)irKu𐐩)irKu𐐪)irKu𐐫)irKu𐐬)irKu𐐭)irKu𐐮)irKu𐐯)irKu𐐰)i	rKu𐐱)i
rKu𐐲)irKu𐐳)irKu𐐴)i
rKu𐐵)irKu𐐶)irKu𐐷)irKu𐐸)irKu𐐹)irKu𐐺)irKu𐐻)irKu𐐼)irKu𐐽)irKu𐐾)irKu𐐿)irKu𐑀)irKu𐑁)irKu𐑂)irKu𐑃)irKu𐑄)irKu𐑅)irKu𐑆)irKu𐑇)i rKu𐑈)i!rKu𐑉)i"rKu𐑊)i#rKu𐑋)i$rKu𐑌)i%rKu𐑍)i&rKu𐑎)i'rKu𐑏)i(r6)i�r�)i�r6)i�r�)i�rKu𐓘)i�rKu𐓙)i�rKu𐓚)i�rKu𐓛)i�rKu𐓜)i�rKu𐓝r�r�r�r��_seg_53r��r�r�c�
�gd�S)N)d)i�rKu𐓞)i�rKu𐓟)i�rKu𐓠)i�rKu𐓡)i�rKu𐓢)i�rKu𐓣)i�rKu𐓤)i�rKu𐓥)i�rKu𐓦)i�rKu𐓧)i�rKu𐓨)i�rKu𐓩)i�rKu𐓪)i�rKu𐓫)i�rKu𐓬)i�rKu𐓭)i�rKu𐓮)i�rKu𐓯)i�rKu𐓰)i�rKu𐓱)i�rKu𐓲)i�rKu𐓳)i�rKu𐓴)i�rKu𐓵)i�rKu𐓶)i�rKu𐓷)i�rKu𐓸)i�rKu𐓹)i�rKu𐓺)i�rKu𐓻)i�r�)i�r6)i�r�)ir6)i(r�)i0r6)idr�)ior6)iprKu𐖗)iqrKu𐖘)irrKu𐖙)isrKu𐖚)itrKu𐖛)iurKu𐖜)ivrKu𐖝)iwrKu𐖞)ixrKu𐖟)iyrKu𐖠)izrKu𐖡)i{r�)i|rKu𐖣)i}rKu𐖤)i~rKu𐖥)irKu𐖦)i�rKu𐖧)i�rKu𐖨)i�rKu𐖩)i�rKu𐖪)i�rKu𐖫)i�rKu𐖬)i�rKu𐖭)i�rKu𐖮)i�rKu𐖯)i�rKu𐖰)i�rKu𐖱)i�r�)i�rKu𐖳)i�rKu𐖴)i�rKu𐖵)i�rKu𐖶)i�rKu𐖷)i�rKu𐖸)i�rKu𐖹)i�r�)i�rKu𐖻)i�rKu𐖼)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)i7r�)i@r6)iVr�)i`r6)ihr�)i�r6)i�rKuː)i�rKuˑ)i�rKr�)i�rKuʙ)i�rKr\)i�r�)i�rKuʣ)i�rKuꭦr�r�r�r��_seg_54r��r�r�c�
�gd�S)N)d)i�rKuʥ)i�rKuʤ)i�rKr^)i�rKr_)i�rKuᶑ)i�rKuɘ)i�rKuɞ)i�rKuʩ)i�rKuɤ)i�rKuɢ)i�rKrc)i�rKuʛ)i�rKrU)i�rKuʜ)i�rKuɧ)i�rKuʄ)i�rKuʪ)i�rKuʫ)i�rKr�)i�rKu𝼄)i�rKuꞎ)i�rKuɮ)i�rKu𝼅)i�rKuʎ)i�rKu𝼆)i�rKr$)i�rKuɶ)i�rKuɷ)i�rKrl)i�rKuɺ)i�rKu𝼈)i�rKr`)i�rKuɾ)i�rKrl)i�rKuʨ)i�rKuʦ)i�rKuꭧ)i�rKuʧ)i�rKrn)i�rKuⱱ)i�r�)i�rKuʏ)i�rKuʡ)i�rKuʢ)i�rKuʘ)i�rKuǀ)i�rKuǁ)i�rKuǂ)i�rKu𝼊)i�rKu𝼞)i�r�)ir6)ir�)ir6)i	r�)i
r6)i6r�)i7r6)i9r�)i<r6)i=r�)i?r6)iVr�)iWr6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i	r�)i	r6)i:	r�)i?	r6)i@	r�)i�	r6)i�	r�)i�	r6)i�	r�)i�	r6)i
r�)i
r6)i
r�)i
r6)i
r�)i
r6)i
r�)i
r6)i6
r�)i8
r6)i;
r�)i?
r6)iI
r�)iP
r6)iY
r�)i`
r6)i�
r�)i�
r6r�r�r�r��_seg_55r�cr�r�c�
�gd�S)N)d)i�
r�)i�
r6)i�
r�)ir6)i6r�)i9r6)iVr�)iXr6)isr�)ixr6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)iIr�)i�rKu𐳀)i�rKu𐳁)i�rKu𐳂)i�rKu𐳃)i�rKu𐳄)i�rKu𐳅)i�rKu𐳆)i�rKu𐳇)i�rKu𐳈)i�rKu𐳉)i�rKu𐳊)i�rKu𐳋)i�rKu𐳌)i�rKu𐳍)i�rKu𐳎)i�rKu𐳏)i�rKu𐳐)i�rKu𐳑)i�rKu𐳒)i�rKu𐳓)i�rKu𐳔)i�rKu𐳕)i�rKu𐳖)i�rKu𐳗)i�rKu𐳘)i�rKu𐳙)i�rKu𐳚)i�rKu𐳛)i�rKu𐳜)i�rKu𐳝)i�rKu𐳞)i�rKu𐳟)i�rKu𐳠)i�rKu𐳡)i�rKu𐳢)i�rKu𐳣)i�rKu𐳤)i�rKu𐳥)i�rKu𐳦)i�rKu𐳧)i�rKu𐳨)i�rKu𐳩)i�rKu𐳪)i�rKu𐳫)i�rKu𐳬)i�rKu𐳭)i�rKu𐳮)i�rKu𐳯)i�rKu𐳰)i�rKu𐳱)i�rKu𐳲)i�r�)i�r6)i�r�)i�r6)i(
r�)i0
r6)i:
r�)i`r6)ir�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i(r�)i0r6)iZr�)ipr6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)iNr�)iRr6)ivr�)ir6)i�r�)i�r6r�r�r�r��_seg_56r��r�r�c�
�gd�S)N)d)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)i5r�)i6r6)iHr�)iPr6)iwr�)i�r6)i�r�)i�r6)i�r�)ir6)ir�)ir6)iBr�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)ir�)ir6)i
r�)ir6)ir�)ir6)i)r�)i*r6)i1r�)i2r6)i4r�)i5r6)i:r�)i;r6)iEr�)iGr6)iIr�)iKr6)iNr�)iPr6)iQr�)iWr6)iXr�)i]r6)idr�)ifr6)imr�)ipr6)iur�)ir6)i\r�)i]r6)ibr�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)iEr�)iPr6)iZr�)i`r6)imr�)i�r6)i�r�)i�r6)i�r�)ir6)ir�)ir6)i,r�)i0r6)iGr�)ir6)i<r�)i�rKu𑣀)i�rKu𑣁)i�rKu𑣂)i�rKu𑣃)i�rKu𑣄)i�rKu𑣅)i�rKu𑣆r�r�r�r��_seg_57r�3r�r�c�
�gd�S)N)d)i�rKu𑣇)i�rKu𑣈)i�rKu𑣉)i�rKu𑣊)i�rKu𑣋)i�rKu𑣌)i�rKu𑣍)i�rKu𑣎)i�rKu𑣏)i�rKu𑣐)i�rKu𑣑)i�rKu𑣒)i�rKu𑣓)i�rKu𑣔)i�rKu𑣕)i�rKu𑣖)i�rKu𑣗)i�rKu𑣘)i�rKu𑣙)i�rKu𑣚)i�rKu𑣛)i�rKu𑣜)i�rKu𑣝)i�rKu𑣞)i�rKu𑣟)i�r6)i�r�)i�r6)ir�)i	r6)i
r�)ir6)ir�)ir6)ir�)ir6)i6r�)i7r6)i9r�)i;r6)iGr�)iPr6)iZr�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)iHr�)iPr6)i�r�)i�r6)i�r�)ir6)i
r�)ir6)i	r�)i
r6)i7r�)i8r6)iFr�)iPr6)imr�)ipr6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6)ir�)ir6)i
r�)ir6)i7r�)i:r6)i;r�)i<r6)i>r�)i?r6)iHr�)iPr6)iZr�)i`r6)ifr�)igr6)iir�)ijr6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)ir6r�r�r�r��_seg_58r��r�r�c�
�gd�S)N)d)ir�)ir6)i;r�)i>r6)iZr�)i�r6)i�r�)i�r6)i�r�)i�r6)i�#r�)i$r6)io$r�)ip$r6)iu$r�)i�$r6)iD%r�)i�/r6)i�/r�)i0r6)i04r�)i@4r6)iV4r�)iDr6)iGFr�)ihr6)i9jr�)i@jr6)i_jr�)i`jr6)ijjr�)injr6)i�jr�)i�jr6)i�jr�)i�jr6)i�jr�)i�jr6)i�jr�)ikr6)iFkr�)iPkr6)iZkr�)i[kr6)ibkr�)ickr6)ixkr�)i}kr6)i�kr�)i@nrKu𖹠)iAnrKu𖹡)iBnrKu𖹢)iCnrKu𖹣)iDnrKu𖹤)iEnrKu𖹥)iFnrKu𖹦)iGnrKu𖹧)iHnrKu𖹨)iInrKu𖹩)iJnrKu𖹪)iKnrKu𖹫)iLnrKu𖹬)iMnrKu𖹭)iNnrKu𖹮)iOnrKu𖹯)iPnrKu𖹰)iQnrKu𖹱)iRnrKu𖹲)iSnrKu𖹳)iTnrKu𖹴)iUnrKu𖹵)iVnrKu𖹶)iWnrKu𖹷)iXnrKu𖹸)iYnrKu𖹹)iZnrKu𖹺)i[nrKu𖹻)i\nrKu𖹼)i]nrKu𖹽)i^nrKu𖹾)i_nrKu𖹿)i`nr6)i�nr�)ior6)iKor�)iOor6)i�or�)i�or6)i�or�)i�or6)i�or�)i�or6)i�or�)ipr6)i��r�)i�r6)i֌r�)i�r6)i	�r�)i�r6r�r�r�r��_seg_59r�r�r�c�
�gd�S)N)d)i�r�)i��r6)i��r�)i��r6)i��r�)i�r6)i#�r�)i2�r6)i3�r�)iP�r6)iS�r�)iU�r6)iV�r�)id�r6)ih�r�)ip�r6)i��r�)i�r6)ik�r�)ip�r6)i}�r�)i��r6)i��r�)i��r6)i��r�)i��r6)i��r�)i��r�)i�r6)i.�r�)i0�r6)iG�r�)iP�r6)i��r�)i�r6)i��r�)i�r6)i'�r�)i)�r6)i^�rKu𝅗𝅥)i_�rKu𝅘𝅥)i`�rKu𝅘𝅥𝅮)ia�rKu𝅘𝅥𝅯)ib�rKu𝅘𝅥𝅰)ic�rKu𝅘𝅥𝅱)id�rKu𝅘𝅥𝅲)ie�r6)is�r�)i{�r6)i��rKu𝆹𝅥)i��rKu𝆺𝅥)i��rKu𝆹𝅥𝅮)i��rKu𝆺𝅥𝅮)i��rKu𝆹𝅥𝅯)i��rKu𝆺𝅥𝅯)i��r6)i��r�)i�r6)iF�r�)i��r6)i��r�)i��r6)i��r�)i�r6)iW�r�)i`�r6)iy�r�)i�rKrL)i�rKrN)i�rKrP)i�rKrR)i�rKrT)i�rKrV)i�rKrX)i�rKrZ)i�rKr\)i	�rKr^)i
�rKr`)i�rKrb)i�rKrd)i
�rKrf)i�rKrh)i�rKrj)i�rKrl)i�rKrn)i�rKrp)i�rKrr)i�rKrt)i�rKrv)i�rKrx)i�rKrz)i�rKr|)i�rKr~)i�rKrL)i�rKrN)i�rKrP)i�rKrR)i�rKrT)i�rKrV)i �rKrXr�r�r�r��_seg_60r�kr�r�c�
�gd�S)N)d)i!�rKrZ)i"�rKr\)i#�rKr^)i$�rKr`)i%�rKrb)i&�rKrd)i'�rKrf)i(�rKrh)i)�rKrj)i*�rKrl)i+�rKrn)i,�rKrp)i-�rKrr)i.�rKrt)i/�rKrv)i0�rKrx)i1�rKrz)i2�rKr|)i3�rKr~)i4�rKrL)i5�rKrN)i6�rKrP)i7�rKrR)i8�rKrT)i9�rKrV)i:�rKrX)i;�rKrZ)i<�rKr\)i=�rKr^)i>�rKr`)i?�rKrb)i@�rKrd)iA�rKrf)iB�rKrh)iC�rKrj)iD�rKrl)iE�rKrn)iF�rKrp)iG�rKrr)iH�rKrt)iI�rKrv)iJ�rKrx)iK�rKrz)iL�rKr|)iM�rKr~)iN�rKrL)iO�rKrN)iP�rKrP)iQ�rKrR)iR�rKrT)iS�rKrV)iT�rKrX)iU�r�)iV�rKr\)iW�rKr^)iX�rKr`)iY�rKrb)iZ�rKrd)i[�rKrf)i\�rKrh)i]�rKrj)i^�rKrl)i_�rKrn)i`�rKrp)ia�rKrr)ib�rKrt)ic�rKrv)id�rKrx)ie�rKrz)if�rKr|)ig�rKr~)ih�rKrL)ii�rKrN)ij�rKrP)ik�rKrR)il�rKrT)im�rKrV)in�rKrX)io�rKrZ)ip�rKr\)iq�rKr^)ir�rKr`)is�rKrb)it�rKrd)iu�rKrf)iv�rKrh)iw�rKrj)ix�rKrl)iy�rKrn)iz�rKrp)i{�rKrr)i|�rKrt)i}�rKrv)i~�rKrx)i�rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrPr�r�r�r��_seg_61r��r�r�c�
�gd�S)N)d)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��r�)i��rKrP)i��rKrR)i��r�)i��rKrX)i��r�)i��rKr^)i��rKr`)i��r�)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��r�)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrP)i��rKrR)i��r�)i��rKrV)i��r�)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��r�)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrP)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrNr�r�r�r��_seg_62r�;r�r�c�
�gd�S)N)d)i��rKrP)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i�rKrx)i�rKrz)i�rKr|)i�rKr~)i�rKrL)i�rKrN)i�r�)i�rKrR)i�rKrT)i	�rKrV)i
�rKrX)i�r�)i
�rKr^)i�rKr`)i�rKrb)i�rKrd)i�rKrf)i�rKrh)i�rKrj)i�rKrl)i�r�)i�rKrp)i�rKrr)i�rKrt)i�rKrv)i�rKrx)i�rKrz)i�rKr|)i�r�)i�rKrL)i�rKrN)i �rKrP)i!�rKrR)i"�rKrT)i#�rKrV)i$�rKrX)i%�rKrZ)i&�rKr\)i'�rKr^)i(�rKr`)i)�rKrb)i*�rKrd)i+�rKrf)i,�rKrh)i-�rKrj)i.�rKrl)i/�rKrn)i0�rKrp)i1�rKrr)i2�rKrt)i3�rKrv)i4�rKrx)i5�rKrz)i6�rKr|)i7�rKr~)i8�rKrL)i9�rKrN)i:�r�)i;�rKrR)i<�rKrT)i=�rKrV)i>�rKrX)i?�r�)i@�rKr\)iA�rKr^)iB�rKr`)iC�rKrb)iD�rKrd)iE�r�)iF�rKrh)iG�r�)iJ�rKrp)iK�rKrr)iL�rKrt)iM�rKrv)iN�rKrx)iO�rKrz)iP�rKr|)iQ�r�)iR�rKrLr�r�r�r��_seg_63r��r�r�c�
�gd�S)N)d)iS�rKrN)iT�rKrP)iU�rKrR)iV�rKrT)iW�rKrV)iX�rKrX)iY�rKrZ)iZ�rKr\)i[�rKr^)i\�rKr`)i]�rKrb)i^�rKrd)i_�rKrf)i`�rKrh)ia�rKrj)ib�rKrl)ic�rKrn)id�rKrp)ie�rKrr)if�rKrt)ig�rKrv)ih�rKrx)ii�rKrz)ij�rKr|)ik�rKr~)il�rKrL)im�rKrN)in�rKrP)io�rKrR)ip�rKrT)iq�rKrV)ir�rKrX)is�rKrZ)it�rKr\)iu�rKr^)iv�rKr`)iw�rKrb)ix�rKrd)iy�rKrf)iz�rKrh)i{�rKrj)i|�rKrl)i}�rKrn)i~�rKrp)i�rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrP)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrP)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrxr�r�r�r��_seg_64r�r�r�c�
�gd�S)N)d)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrP)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrP)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrP)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i�rKrp)i�rKrr)i�rKrt)i�rKrv)i�rKrx)i�rKrz)i�rKr|)i�rKr~)i�rKrL)i	�rKrN)i
�rKrP)i�rKrR)i�rKrT)i
�rKrV)i�rKrX)i�rKrZ)i�rKr\)i�rKr^)i�rKr`)i�rKrb)i�rKrd)i�rKrf)i�rKrh)i�rKrj)i�rKrl)i�rKrn)i�rKrpr�r�r�r��_seg_65r�sr�r�c�
�gd�S)N)d)i�rKrr)i�rKrt)i�rKrv)i�rKrx)i�rKrz)i �rKr|)i!�rKr~)i"�rKrL)i#�rKrN)i$�rKrP)i%�rKrR)i&�rKrT)i'�rKrV)i(�rKrX)i)�rKrZ)i*�rKr\)i+�rKr^)i,�rKr`)i-�rKrb)i.�rKrd)i/�rKrf)i0�rKrh)i1�rKrj)i2�rKrl)i3�rKrn)i4�rKrp)i5�rKrr)i6�rKrt)i7�rKrv)i8�rKrx)i9�rKrz)i:�rKr|)i;�rKr~)i<�rKrL)i=�rKrN)i>�rKrP)i?�rKrR)i@�rKrT)iA�rKrV)iB�rKrX)iC�rKrZ)iD�rKr\)iE�rKr^)iF�rKr`)iG�rKrb)iH�rKrd)iI�rKrf)iJ�rKrh)iK�rKrj)iL�rKrl)iM�rKrn)iN�rKrp)iO�rKrr)iP�rKrt)iQ�rKrv)iR�rKrx)iS�rKrz)iT�rKr|)iU�rKr~)iV�rKrL)iW�rKrN)iX�rKrP)iY�rKrR)iZ�rKrT)i[�rKrV)i\�rKrX)i]�rKrZ)i^�rKr\)i_�rKr^)i`�rKr`)ia�rKrb)ib�rKrd)ic�rKrf)id�rKrh)ie�rKrj)if�rKrl)ig�rKrn)ih�rKrp)ii�rKrr)ij�rKrt)ik�rKrv)il�rKrx)im�rKrz)in�rKr|)io�rKr~)ip�rKrL)iq�rKrN)ir�rKrP)is�rKrR)it�rKrT)iu�rKrV)iv�rKrX)iw�rKrZ)ix�rKr\)iy�rKr^)iz�rKr`)i{�rKrb)i|�rKrd)i}�rKrf)i~�rKrhr�r�r�r��_seg_66r��r�r�c�
�gd�S)N)d)i�rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKrL)i��rKrN)i��rKrP)i��rKrR)i��rKrT)i��rKrV)i��rKrX)i��rKrZ)i��rKr\)i��rKr^)i��rKr`)i��rKrb)i��rKrd)i��rKrf)i��rKrh)i��rKrj)i��rKrl)i��rKrn)i��rKrp)i��rKrr)i��rKrt)i��rKrv)i��rKrx)i��rKrz)i��rKr|)i��rKr~)i��rKuı)i��rKuȷ)i��r�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr{)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rK�∇)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr{)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rK�∂)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�r�r�r�r��_seg_67r�Cr�r�c�
�gd�S)N)d)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr{)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr{)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i	�rKr�)i
�rKr�)i�rKr�)i�rKr�)i
�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i �rKr�)i!�rKr�)i"�rKr�)i#�rKr�)i$�rKr{)i%�rKr�)i&�rKr�)i'�rKr�)i(�rKr�)i)�rKr�)i*�rKr�)i+�rKr�)i,�rKr�)i-�rKr�)i.�rKr�)i/�rKr�)i0�rKr�)i1�rKr�)i2�rKr�)i3�rKr�)i4�rKr�)i5�rKr�)i6�rKr�)i7�rKr�)i8�rKr�)i9�rKr�)i:�rKr�)i;�rKr�)i<�rKr�)i=�rKr�)i>�rKr{)i?�rKr�)i@�rKr�)iA�rKr�)iB�rKr�)iC�rKr�)iD�rKr�)iE�rKr�)iF�rKr�)iG�rKr�)iI�rKr�)iJ�rKr�r�r�r�r��_seg_68r��r�r�c�
�gd�S)N)d)iK�rKr�)iL�rKr�)iM�rKr�)iN�rKr�)iO�rKr�)iP�rKr�)iQ�rKr�)iR�rKr�)iS�rKr�)iT�rKr�)iU�rKr�)iV�rKr�)iW�rKr�)iX�rKr�)iY�rKr�)iZ�rKr�)i[�rKr�)i\�rKr�)i]�rKr�)i^�rKr{)i_�rKr�)i`�rKr�)ia�rKr�)ib�rKr�)ic�rKr�)id�rKr�)ie�rKr�)if�rKr�)ig�rKr�)ih�rKr�)ii�rKr�)ij�rKr�)ik�rKr�)il�rKr�)im�rKr�)in�rKr�)io�rKr�)ip�rKr�)iq�rKr�)ir�rKr�)is�rKr�)it�rKr�)iu�rKr�)iv�rKr�)iw�rKr�)ix�rKr{)iy�rKr�)iz�rKr�)i{�rKr�)i|�rKr�)i}�rKr�)i~�rKr�)i�rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr{)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�r�r�r�r��_seg_69r�r�r�c�
�gd�S)N)d)i��rKr�)i��rKr�)i��rKr{)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��r�)i��rKr)i��rKr�)i��rKr�)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr�)i��rKr�)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr�)i��rKr�)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr�)i��rKr�)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr�)i��rKr�)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i�r6)i��r�)i��r6)i��r�)i��r6)i��r�)i�r6)i�r�)i%�r6)i+�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i"�r�)i#�r6)i%�r�)i&�r6)i+�r�)i0�rKr�)i1�rKr�)i2�rKr�r�r�r�r��_seg_70r�{r�r�c�
�gd�S)N)d)i3�rKr�)i4�rKr�)i5�rKr�)i6�rKr�)i7�rKr�)i8�rKr�)i9�rKr�)i:�rKr�)i;�rKr�)i<�rKr�)i=�rKr�)i>�rKr�)i?�rKr�)i@�rKr�)iA�rKr�)iB�rKr�)iC�rKr�)iD�rKr�)iE�rKr�)iF�rKr�)iG�rKr�)iH�rKr�)iI�rKr�)iJ�rKr�)iK�rKr�)iL�rKr�)iM�rKr�)iN�rKr�)iO�rKr�)iP�rKuӏ)iQ�rKr�)iR�rKr�)iS�rKr�)iT�rKr�)iU�rKr�)iV�rKr�)iW�rKr�)iX�rKr�)iY�rKr�)iZ�rKr�)i[�rKr�)i\�rKr�)i]�rKr�)i^�rKr�)i_�rKr�)i`�rKr�)ia�rKr�)ib�rKr�)ic�rKr�)id�rKr�)ie�rKr�)if�rKr�)ig�rKr�)ih�rKr�)ii�rKr�)ij�rKr�)ik�rKr�)il�rKr)im�rKr�)in�r�)i��r6)i��r�)i�r6)i-�r�)i0�r6)i>�r�)i@�r6)iJ�r�)iN�r6)iP�r�)i��r6)i��r�)i��r6)i��r�)i��r6)i�r�)i��r6)i��r�)i��r6)i��r�)i��r6)i��r�)i��r6)i��r�)i��r6)i��r�)i�r6)i��r�)i��r6)i��r�)i�rKu𞤢)i�rKu𞤣)i�rKu𞤤)i�rKu𞤥)i�rKu𞤦)i�rKu𞤧)i�rKu𞤨)i�rKu𞤩)i�rKu𞤪)i	�rKu𞤫r�r�r�r��_seg_71r��r�r�c�
�gd�S)N)d)i
�rKu𞤬)i�rKu𞤭)i�rKu𞤮)i
�rKu𞤯)i�rKu𞤰)i�rKu𞤱)i�rKu𞤲)i�rKu𞤳)i�rKu𞤴)i�rKu𞤵)i�rKu𞤶)i�rKu𞤷)i�rKu𞤸)i�rKu𞤹)i�rKu𞤺)i�rKu𞤻)i�rKu𞤼)i�rKu𞤽)i�rKu𞤾)i�rKu𞤿)i�rKu𞥀)i�rKu𞥁)i �rKu𞥂)i!�rKu𞥃)i"�r6)iL�r�)iP�r6)iZ�r�)i^�r6)i`�r�)iq�r6)i��r�)i�r6)i>�r�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�r�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i	�rKr�)i
�rKr�)i�rKr�)i�rKr�)i
�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rKr�)i�rK�ٮ)i�rKr�)i�rK�ڡ)i�rK�ٯ)i �r�)i!�rKr�)i"�rKr�)i#�r�)i$�rKr�)i%�r�)i'�rKr�)i(�r�)i)�rKr�)i*�rKr�)i+�rKr�)i,�rKr�)i-�rKr�)i.�rKr�)i/�rKr�)i0�rKr�)i1�rKr�)i2�rKr�)i3�r�)i4�rKr�)i5�rKr�)i6�rKr�)i7�rKr�)i8�r�)i9�rKr�)i:�r�)i;�rKr�)i<�r�)iB�rKr�)iC�r�)iG�rKr�)iH�r�)iI�rKr�)iJ�r�r�r�r�r��_seg_72r�Kr�r�c�
�gd�S)N)d)iK�rKr�)iL�r�)iM�rKr�)iN�rKr�)iO�rKr�)iP�r�)iQ�rKr�)iR�rKr�)iS�r�)iT�rKr�)iU�r�)iW�rKr�)iX�r�)iY�rKr�)iZ�r�)i[�rKr�)i\�r�)i]�rKr�)i^�r�)i_�rKr�)i`�r�)ia�rKr�)ib�rKr�)ic�r�)id�rKr�)ie�r�)ig�rKr�)ih�rKr�)ii�rKr�)ij�rKr�)ik�r�)il�rKr�)im�rKr�)in�rKr�)io�rKr�)ip�rKr�)iq�rKr�)ir�rKr�)is�r�)it�rKr�)iu�rKr�)iv�rKr�)iw�rKr�)ix�r�)iy�rKr�)iz�rKr�)i{�rKr�)i|�rKr�)i}�r�)i~�rKr�)i�r�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��r�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��r�)i��rKr�)i��rKr�)i��rKr�)i��r�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��r�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�r�r�r�r��_seg_73r��r�r�c�
�gd�S)N)d)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��rKr�)i��r�)i��r6)i��r�)i�r6)i,�r�)i0�r6)i��r�)i��r6)i��r�)i��r6)i��r�)i��r6)i��r�)i��r6)i��r�)i�rz0,)i�rz1,)i�rz2,)i�rz3,)i�rz4,)i�rz5,)i�rz6,)i�rz7,)i	�rz8,)i
�rz9,)i�r6)i�rrA)i�rrB)i�rrC)i�rrD)i�rrE)i�rrF)i�rrG)i�rrH)i�rrI)i�rrJ)i�rrK)i�rrL)i�rrM)i�rrN)i�rrO)i�rrP)i �rrQ)i!�rrR)i"�rrS)i#�rrT)i$�rrU)i%�rrV)i&�rrW)i'�rrX)i(�rrY)i)�rrZ)i*�rKu〔s〕)i+�rKrP)i,�rKrn)i-�rKrh)i.�rK�wz)i/�r6)i0�rKrL)i1�rKrN)i2�rKrP)i3�rKrR)i4�rKrT)i5�rKrV)i6�rKrX)i7�rKrZ)i8�rKr\)i9�rKr^)i:�rKr`)i;�rKrb)i<�rKrd)i=�rKrf)i>�rKrh)i?�rKrj)i@�rKrl)iA�rKrn)iB�rKrp)iC�rKrr)iD�rKrt)iE�rKrv)iF�rKrx)iG�rKrz)iH�rKr|)iI�rKr~)iJ�rK�hv)iK�rKr`)iL�rK�sd)iM�rKr3)iN�rK�ppv)iO�rK�wc)iP�r6)ij�rK�mc)ik�rK�mdr�r�r�r��_seg_74r�r�r�c�
�gd�S)N)d)il�rK�mr)im�r6)i��rK�dj)i��r6)i��r�)i��r6)i�rKuほか)i�rKuココ)i�rKr)i�r�)i�rKrr)i�rKu字)i�rKu双)i�rKuデ)i�rKre)i�rK�多)i�rKu解)i�rKr�)i�rKu交)i�rKu映)i�rKu無)i�rKr�)i�rKu前)i�rKu後)i�rK�再)i�rKu新)i �rKu初)i!�rKu終)i"�rKrz)i#�rKu販)i$�rKu声)i%�rKu吹)i&�rKu演)i'�rKu投)i(�rKu捕)i)�rKrc)i*�rKr�)i+�rKu遊)i,�rKr�)i-�rKr�)i.�rKr�)i/�rKu指)i0�rKr�)i1�rKu打)i2�rKu禁)i3�rKu空)i4�rKu合)i5�rKu満)i6�rKr�)i7�rKru)i8�rKu申)i9�rK�割)i:�rKu営)i;�rKu配)i<�r�)i@�rKu	〔本〕)iA�rKu	〔三〕)iB�rKu	〔二〕)iC�rKu	〔安〕)iD�rKu	〔点〕)iE�rKu	〔打〕)iF�rKu	〔盗〕)iG�rKu	〔勝〕)iH�rKu	〔敗〕)iI�r�)iP�rKu得)iQ�rKu可)iR�r�)i`�r6)if�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i��r�)i�r6)iw�r�)i{�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)iH�r�)iP�r6)iZ�r�)i`�r6)i��r�)i��r6)i��r�)i��r6)i��r�)i�r6)iT�r�)i`�r6)in�r�r�r�r�r��_seg_75r��r�r�c�
�gd�S)N)d)ip�r6)i}�r�)i��r6)i��r�)i��r6)i��r�)i��r6)i�r�)i�r6)i�r�)i�r6)i�r�)i�r6)i��r�)i�r6)i��r�)i��r6)i�r�)i�rKr)i�rKr�)i�rKr�)i�rKr)i�rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��rKr)i��r�)ir6)i�r�)i�r6)i:�r�)i@�r6)i�r�)i �r6)i��r�)i��r6)i��r�)i�rKu丽)i�rKu丸)i�rKu乁)i�rKu𠄢)i�rKu你)i�rKr�)i�rKu侻)i�rKu倂)i�rKu偺)i	�rKu備)i
�rKr�)i�rKu像)i�rKu㒞)i
�rKu𠘺)i�rKr�)i�rKu兔)i�rKu兤)i�rKu具)i�rKu𠔜)i�rKu㒹)i�rKu內)i�rKr�)i�rKu𠕋)i�rKu冗)i�rKu冤)i�rKu仌)i�rKu冬)i�rKr�)i�rKu𩇟)i�rKrh)i�rKu刃)i�rKu㓟)i �rKu刻)i!�rKu剆)i"�rKr�)i#�rKu剷)i$�rKu㔕)i%�rKr�)i&�rKr�)i'�rKr�)i(�rKr�)i)�rKu包)i*�rKu匆)i+�rKr�)i,�rKu卉)i-�rKr�)i.�rKu博)i/�rKu即)i0�rKu卽)i1�rKu卿)i4�rKu𠨬)i5�rKu灰)i6�rKu及)i7�rKu叟)i8�rKu𠭣)i9�rKu叫)i:�rKu叱)i;�rKu吆)i<�rKu咞)i=�rKu吸)i>�rKu呈r�r�r�r��_seg_76r��r�r�c�
�gd�S)N)d)i?�rKu周)i@�rKu咢)iA�rKu哶)iB�rKu唐)iC�rKu啓)iD�rKu啣)iE�rKu善)iG�rKr�)iH�rKu喫)iI�rKu喳)iJ�rKu嗂)iK�rKu圖)iL�rKr�)iM�rKu圗)iN�rKu噑)iO�rKu噴)iP�rKr�)iQ�rKu壮)iR�rKu城)iS�rKu埴)iT�rKu堍)iU�rKu型)iV�rKu堲)iW�rKu報)iX�rKu墬)iY�rKu𡓤)iZ�rKu売)i[�rKu壷)i\�rKu夆)i]�rKr�)i^�rKu夢)i_�rKu奢)i`�rKu𡚨)ia�rKu𡛪)ib�rKu姬)ic�rKu娛)id�rKu娧)ie�rKu姘)if�rKu婦)ig�rKu㛮)ih�r�)ii�rKu嬈)ij�rKu嬾)il�rKu𡧈)im�rKu寃)in�rKu寘)io�rKr�)ip�rKu寳)iq�rKu𡬘)ir�rKu寿)is�rKu将)it�r�)iu�rKro)iv�rKu㞁)iw�rKu屠)ix�rKrp)iy�rKu峀)iz�rKu岍)i{�rKu𡷤)i|�rKu嵃)i}�rKu𡷦)i~�rKu嵮)i�rKu嵫)i��rKu嵼)i��rKu巡)i��rKu巢)i��rKu㠯)i��rKu巽)i��rKu帨)i��rKu帽)i��rKu幩)i��rKu㡢)i��rKu𢆃)i��rKu㡼)i��rKu庰)i��rKu庳)i��rKu庶)i��rKr�)i��rKu𪎒)i��rKrq)i��rKu𢌱)i��rK�舁)i��rKu弢)i��rKu㣇)i��rKu𣊸)i��rKu𦇚)i��rKu形)i��rKu彫)i��rKu㣣)i��rKu徚)i��rKu忍)i��rKu志)i��rKu忹)i��rKu悁)i��rKu㤺)i��rKu㤜)i��rKr�)i��rKu𢛔)i��rKu惇)i��rKu慈r�r�r�r��_seg_77r�Sr�r�c�
�gd�S)N)d)i��rK�慌)i��rKr�)i��rKr)i��rKu慺)i��rKr�)i��rKu憲)i��rKu憤)i��rKu憯)i��rKu懞)i��rKr�)i��rKr�)i��rKu成)i��rKu戛)i��rKu扝)i��rKu抱)i��rKu拔)i��rKu捐)i��rKu𢬌)i��rKu挽)i��rKu拼)i��rKu捨)i��rKu掃)i��rKu揤)i��rKu𢯱)i��rKu搢)i��rKu揅)i��rKu掩)i�rKu㨮)i�rKu摩)i�rKu摾)i�rKu撝)i�rKu摷)i�rKu㩬)i�rKr�)i�rKu敬)i�rKu𣀊)i�rKu旣)i�rKu書)i�rKu晉)i�rKu㬙)i�rKr�)i�rKu㬈)i�rKu㫤)i�rKu冒)i�rKu冕)i�rKu最)i�rKu暜)i�rKu肭)i�rKu䏙)i�rKr�)i�rKr�)i�rKu朡)i�rKu杞)i�rKu杓)i�rKu𣏃)i�rKu㭉)i�rKu柺)i�rKu枅)i�rKu桒)i�rKr�)i�rKu𣑭)i�rKu梎)i�rKu栟)i�rKu椔)i�rKr�)i�rKu楂)i�rKu榣)i�rKu槪)i�rKu檨)i�rKu𣚣)i�rKu櫛)i�rKu㰘)i�rKu次)i�rKu𣢧)i�rKu歔)i�rKu㱎)i�rKu歲)i�rKu殟)i��rKr�)i��rKu殻)i��rKu𣪍)i��rKu𡴋)i��rKu𣫺)i��rKu汎)i��rKu𣲼)i��rKu沿)i��rKu泍)i��rKu汧)i��rKu洖)i�rKu派)i�rKr�)i�rKr�)i�rKu浩)i�rKu浸)i�rKu涅)i�rKu𣴞)i�rKu洴)i�rKu港)i	�rKu湮)i
�rKu㴳r�r�r�r��_seg_78r�r�r�c�
�gd�S)N)d)i�rKr�)i�rKu滇)i
�rKu𣻑)i�rKu淹)i�rKu潮)i�rKu𣽞)i�rKu𣾎)i�rKu濆)i�rKu瀹)i�rKr�)i�rKu瀛)i�rKu㶖)i�rKu灊)i�rKu災)i�rKu灷)i�rKu炭)i�rKu𠔥)i�rKu煅)i�rKu𤉣)i�rKu熜)i�r�)i �rKu爨)i!�rKr�)i"�rKu牐)i#�rKu𤘈)i$�rKu犀)i%�rKu犕)i&�rKu𤜵)i'�rKu𤠔)i(�rKu獺)i)�rKu王)i*�rKu㺬)i+�rKu玥)i,�rKu㺸)i.�rKu瑇)i/�rKu瑜)i0�rKr�)i1�rKu璅)i2�rKu瓊)i3�rKu㼛)i4�rKu甤)i5�rKu𤰶)i6�rKu甾)i7�rKu𤲒)i8�rKr�)i9�rKu𢆟)i:�rKu瘐)i;�rKu𤾡)i<�rKu𤾸)i=�rKu𥁄)i>�rKu㿼)i?�rKu䀈)i@�rKr�)iA�rKu𥃳)iB�rKu𥃲)iC�rKu𥄙)iD�rKu𥄳)iE�rKu眞)iF�rKu真)iH�rKr�)iI�rKr�)iJ�rKu瞋)iK�rKu䁆)iL�rKu䂖)iM�rKu𥐝)iN�rKu硎)iO�rKr�)iP�rKr�)iQ�rKu䃣)iR�rKu𥘦)iS�rKr�)iT�rKu𥚚)iU�rKu𥛅)iV�rKr�)iW�rKu秫)iX�rKu䄯)iY�rKr�)iZ�rKu穊)i[�rKu穏)i\�rKu𥥼)i]�rKu𥪧)i_�r�)i`�rKu䈂)ia�rKu𥮫)ib�rKu篆)ic�rKu築)id�rKu䈧)ie�rKu𥲀)if�rKu糒)ig�rKu䊠)ih�rKu糨)ii�rKu糣)ij�rKu紀)ik�rKu𥾆)il�rKu絣)im�rKu䌁)in�rKu緇)io�rKu縂)ip�rKu繅)iq�rKu䌴r�r�r�r��_seg_79r# r�r�c�
�gd�S)N)d)ir�rKu𦈨)is�rKu𦉇)it�rKu䍙)iu�rKu𦋙)iv�rKu罺)iw�rKu𦌾)ix�rKu羕)iy�rKu翺)iz�rKr�)i{�rKu𦓚)i|�rKu𦔣)i}�rKu聠)i~�rKu𦖨)i�rKu聰)i��rKu𣍟)i��rKu䏕)i��rKu育)i��rKu脃)i��rKu䐋)i��rKu脾)i��rKu媵)i��rKu𦞧)i��rKu𦞵)i��rKu𣎓)i��rKu𣎜)i��rKr�)i��rKu舄)i��rKu辞)i��rKu䑫)i��rKu芑)i��rKu芋)i��rKu芝)i��rKu劳)i��rKu花)i��rKu芳)i��rKu芽)i��rKu苦)i��rKu𦬼)i��rKr�)i��rKu茝)i��rKu荣)i��rKu莭)i��rKu茣)i��rKu莽)i��rKu菧)i��rKr�)i��rKu荓)i��rKu菊)i��rKu菌)i��rKu菜)i��rKu𦰶)i��rKu𦵫)i��rKu𦳕)i��rKu䔫)i��rKu蓱)i��rKu蓳)i��rKu蔖)i��rKu𧏊)i��rKu蕤)i��rKu𦼬)i��rKu䕝)i��rKu䕡)i��rKu𦾱)i��rKu𧃒)i��rKu䕫)i��rKu虐)i��rKr�)i��rKu虧)i��rKu虩)i��rKu蚩)i��rKu蚈)i��rKu蜎)i��rKu蛢)i��rKr�)i��rKu蜨)i��rKu蝫)i��rKu螆)i��r�)i��rKu蟡)i��rKu蠁)i�rKu䗹)i�rKu衠)i�rKr�)i�rKu𧙧)i�rKu裗)i�rKu裞)i�rKu䘵)i�rKu裺)i�rKu㒻)i�rKu𧢮)i�rKu𧥦)i�rKu䚾)i�rKu䛇)i�rKu誠)i�rKr�)i�rKr�)i�rKr�)i�rKu𧲨)i�rKu貫)i�rKu賁r�r�r�r��_seg_80r� r�r�c�
�gd�S)N)N)i�rKu贛)i�rKu起)i�rKu𧼯)i�rKu𠠄)i�rKu跋)i�rKu趼)i�rKu跰)i�rKu𠣞)i�rKu軔)i�rKr�)i�rKu𨗒)i�rKu𨗭)i�rKu邔)i�rKu郱)i�rKu鄑)i�rKu𨜮)i�rKu鄛)i�rKu鈸)i�rKu鋗)i�rKu鋘)i�rKu鉼)i�rKu鏹)i�rKu鐕)i�rKu𨯺)i�rKu開)i�rKu䦕)i�rKu閷)i�rKu𨵷)i�rKu䧦)i�rKu雃)i�rKu嶲)i��rKu霣)i��rKu𩅅)i��rKu𩈚)i��rKu䩮)i��rKu䩶)i��rKu韠)i��rKu𩐊)i��rKu䪲)i��rKu𩒖)i��rKr�)i�rKu頩)i�rKu𩖶)i�rKu飢)i�rKu䬳)i�rKu餩)i�rKu馧)i�rKu駂)i�rKu駾)i�rKu䯎)i	�rKu𩬰)i
�rKr�)i�rKu鱀)i�rKu鳽)i
�rKu䳎)i�rKu䳭)i�rKu鵧)i�rKu𪃎)i�rKu䳸)i�rKu𪄅)i�rKu𪈎)i�rKu𪊑)i�rKr�)i�rKu䵖)i�rKr�)i�rKu黾)i�rKu鼅)i�rKu鼏)i�rKu鼖)i�rKr�)i�rKu𪘀)i�r�)ir6)iKr�)iPr6)i�#r�)ir�)i�r�r�r�r�r��_seg_81r� s��O�Or�N)[�typingrrr�__version__�int�strr�rrVrdrur|r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr r2r[r]rarjr|r�r�r�r�r'r2r|r�r�r�r�r�r�r�r�r�r�r=rGriror�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr�tuple�	uts46datar�r�r��<module>rs��&�%�%���f��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��U�5��c��?�E�#�s�C�-�,@�@�A�B�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�Pf��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�f�PP��e�E�#�s�(�O�U�3��S�=�-A�A�B�C�P�d
�
�H��h���h��
�h��
�h�	�

�h��
�h�
�
�h��
�h��
�h�	��i�
��i���i���i�
��i���i�� �i�!�"�i�#�$�i�%�&�i�'�(�i�)�*�i�+�,�i�-�.�i�/�0�i�1�2�i�3�4�i�5�6�i�7�8�i�9�:�i�;�<�i�=�>�i�?�@�i�A �B�i�C!�D�i�E"�F�i�G#�H�i�I$�J�i�K%�L�i�M&�N�i�O'�P�i�Q(�R�i�S)�T�i�U*�V�i�W+�X�i�Y,�Z�i�[-�\�i�].�^�i�_/�`�i�a0�b�i�c1�d�i�e2�f�i�g3�h�i�i4�j�i�k5�l�i�m6�n�i�o7�p�i�q8�r�i�s9�t�i�u:�v�i�w;�x�i�y<�z�i�{=�|�i�}>�~�i�?�@�i�A@�B�i�CA�D�i�EB�F�i�GC�H�i�ID�J�i�KE�L�i�MF�N�i�OG�P�i�QH�R�i�SI�T�i�UJ�V�i�WK�X�i�YL�Z�i�[M�\�i�]N�^�i�_O�`�i�aP�b�i�cQ�S
�	r�python3.12/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-312.pyc000064400000001647151732702350022463 0ustar00�

R`iA��b�ddl�ddl�ddlmZmZdedefd�Zdeeefdefd�Z	dedd	fd
�Z
y	)�)�*�)�Any�Union�label�returnc��t|�S�N)�encode�rs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/compat.py�ToASCIIr����%�=��c��t|�Sr
)�decoders r
�	ToUnicoderrr�sNc��td��)Nz,IDNA 2008 does not utilise nameprep protocol)�NotImplementedError)rs r
�namepreprs��
�L�
M�Mr)�core�codec�typingrr�str�bytesr�	bytearrayrr�rr
�<module>rsT������3��5���U�5�)�+�,����N��N��Nrpython3.12/site-packages/pip/_vendor/idna/__pycache__/core.cpython-312.pyc000064400000037621151732702350022131 0ustar00�

R`i�2�
�r�ddlmZddlZddlZddlZddlmZmZddlm	Z	dZ
dZejd�Z
Gd	�d
e�ZGd�de�ZGd
�de�ZGd�de�Zdedefd�Zdededefd�Zdedefd�Zdedefd�Zdeeefdefd�Zdeeefdedefd�Zd1dededefd�Zdedefd�Zdedefd �Zdeddfd!�Z ded"edefd#�Z!d1ded"ed$edefd%�Z"deeee#fddfd&�Z$dedefd'�Z%deeee#fdefd(�Z&d2d)ed*ed+edefd,�Z'd3deeee#fd-ed.ed*ed+edefd/�Z(d4deeee#fd-ed.ed*edef
d0�Z)y)5�)�idnadata�N)�Union�Optional)�intranges_contain�	sxn--u[.。.。]c��eZdZdZy)�	IDNAErrorz7 Base exception for all IDNA-encoding related problems N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/core.pyr
r
s��A�rr
c��eZdZdZy)�
IDNABidiErrorz= Exception when bidirectional requirements are not satisfied Nrrrrrrs��G�rrc��eZdZdZy)�InvalidCodepointz> Exception when a disallowed or unallocated codepoint is used Nrrrrrrs��H�rrc��eZdZdZy)�InvalidCodepointContextzE Exception when the codepoint is not valid in the context it is used Nrrrrrrs��O�rr�cp�returnc��tjt|��}|dk(r)tjt|��st	d��|S)Nrz Unknown character in unicodedata)�unicodedata�	combining�chr�name�
ValueError)r�vs  r�_combining_classr" s@�����c�"�g�&�A��A�v�����B��(��?�@�@��Hr�scriptc�N�tt|�tj|�S)N)r�ordr�scripts)rr#s  r�
_is_scriptr''s���S��W�h�&6�&6�v�&>�?�?r�sc�$�|jd�S)N�punycode)�encode�r(s r�	_punycoder-*s���8�8�J��rc�$�dj|�S)NzU+{:04X})�formatr,s r�_unotr0-s�����Q��r�labelc�"�t|�dkDryy)N�?FT��len�r1s r�valid_label_lengthr71s��
�5�z�B���r�trailing_dotc�*�t|�|rdndkDryy)N��FTr4)r1r8s  r�valid_string_lengthr<7s��
�5�z�L�S�c�2��r�	check_ltrc��d}t|d�D]J\}}tj|�}|dk(r$tdj	t|�|���|dvs�Id}�L|s|sytj|d�}|dvrd}n+|d	k(rd}n#td
j	t|����d}d}t|d�D]�\}}tj|�}|rG|dvrtdj	|���|d
vrd}n|dk7rd}|dvs�N|s|}�S||k7s�Ytd��|dvrtdj	|���|dvrd}��|dk7s��d}��|std��y)NFr�z1Unknown directionality in label {} at position {})�R�AL�ANTr)r@rA�Lz=First codepoint in label {} must be directionality L, R or AL)
r@rArB�EN�ES�CS�ET�ON�BN�NSMzGInvalid direction for codepoint at position {} in a right-to-left label)r@rArDrBrJ)rBrDz2Can not mix numeral types in a right-to-left label)rCrDrErFrGrHrIrJzGInvalid direction for codepoint at position {} in a left-to-right label)rCrDz0Label ends with illegal codepoint directionality)�	enumerater�
bidirectionalrr/�repr)	r1r=�
bidi_label�idxr�	direction�rtl�valid_ending�number_types	         r�
check_bidirT=s����J��u�a�(�	��b��-�-�b�1�	���?�� S� Z� Z�[_�`e�[f�hk� l�m�m��)�)��J�
)��i���)�)�%��(�3�I��K����	�c�	����[�b�b�cg�hm�cn�o�p�p��L��K��u�a�(�	��b��-�-�b�1�	��� \�\�#�$m�$t�$t�ux�$y�z�z��3�3�#���e�#�$���L�(�"�"+�K�"�i�/�+�,`�a�a�� P�P�#�$m�$t�$t�ux�$y�z�z��K�'�#���e�#�$��7)�:��N�O�O�rc�V�tj|d�ddk(rtd��y)Nr�Mz0Label begins with an illegal combining characterT)r�categoryr
r6s r�check_initial_combinerrXxs-�����E�!�H�%�a�(�C�/��J�K�K�rc�`�|dddk(rtd��|ddk(s|ddk(rtd��y	)
N��z--z4Label has disallowed hyphens in 3rd and 4th positionr�-���z)Label must not start or end with a hyphenT)r
r6s r�check_hyphen_okr^~sA���Q�q�z�T���N�O�O��Q�x�3��%��)�s�*��C�D�D�rc�L�tjd|�|k7rtd��y)N�NFCz%Label must be in Normalization Form C)r�	normalizer
r6s r�	check_nfcrb�s(�����U�E�*�e�3��?�@�@�4r�posc��t||�}|dk(�r|dkDr"tt||dz
��tk(ryd}t|dz
dd�D]X}tj
j
t||��}|td�k(r�=|td�td	�fvs�Vd}n|syd}t|dzt|��D]Y}tj
j
t||��}|td�k(r�=|td
�td	�fvs�Vd}|S|S|dk(r(|dkDr"tt||dz
��tk(ryyy)Ni rrTFr]�TrC�Dr@i
 )r%r"�_virama_combining_class�ranger�
joining_types�getr5)r1rc�cp_value�ok�i�joining_types      r�valid_contextjro�sS���5��:��H��6����7���E�#��'�N� 3�4�8O�O��
���s�1�u�b�"�%�A�#�1�1�5�5�c�%��(�m�D�L��s�3�x�'����C��#�c�(�3�3����
&���
���s�1�u�c�%�j�)�A�#�1�1�5�5�c�%��(�m�D�L��s�3�x�'����C��#�c�(�3�3�����	�*��	��6����7���E�#��'�N� 3�4�8O�O���r�	exceptionc��t||�}|dk(rDd|cxkrt|�dz
kr,nyt||dz
�dk(rt||dz�dk(ryy|dk(r2|t|�dz
kr t|�dkDrt||dzd�Sy|d	k(s|d
k(r|dkDrt||dz
d�Sy|dk(r4|D].}|d
k(r�	t|d�st|d�s
t|d�s�.yyd|cxkrdkr#nn |D]}dt|�cxkrdks�y�yd|cxkrdkr#ny|D]}dt|�cxkrdks�y�yy)N�rr�lTFiu�Greeki�i��Hebrewi�0u・�Hiragana�Katakana�Hani`iii�i�)r%r5r')r1rcrprkrs     r�valid_contextory�s����5��:��H��6���s�!�S��Z��\�!���5��q��>�"�f�,��U�3��7�^�1D��1N���	�V�	���U��A���#�e�*�q�.��e�C�!�G�n�g�6�6��	�V�	�x�6�1���7��e�C�!�G�n�h�7�7��	�V�	��B��X�~���"�j�)�Z��J�-G�:�VX�Z_�K`��	�
�	�(�	#�e�	#��B���B��)�6�)��*���	�(�	#�e�	#���B���B��)�6�)��*���rc��t|ttf�r|jd�}t	|�dk(rtd��t
|�t|�t|�t|�D�]\}}t|�}t|tjd�r�0t|tjd�r?	t||�s1tdj!t#|�|dzt%|������t|tjd	�r>t)||�r��td
j!t#|�|dzt%|����t+dj!t#|�|dzt%|����t-|�y#t&$r2tdj!t#|�|dzt%|����wxYw)Nzutf-8rzEmpty Label�PVALID�CONTEXTJz*Joiner {} not allowed at position {} in {}rz<Unknown codepoint adjacent to joiner {} at position {} in {}�CONTEXTO�-Codepoint {} not allowed at position {} in {}z-Codepoint {} at position {} of {} not allowed)�
isinstance�bytes�	bytearray�decoder5r
rbr^rXrKr%rr�codepoint_classesrorr/r0rMr ryrrT)r1rcrrks    r�check_labelr��s����%�%��+�,����W�%��
�5�z�Q���
�&�&�
�e���E���5�!��u�%�	��b��r�7���X�x�'A�'A�(�'K�L��
�x��)C�)C�J�)O�
P�
:�%�e�S�1�1�2^�2e�2e��h���Q���U��3=�>�>�2��x��)C�)C�J�)O�
P�!�%��-�-�.]�.d�.d�ej�ks�et�vy�z{�v{�~B�CH�~I�/J�K�K�"�#R�#Y�#Y�Z_�`h�Zi�kn�op�kp�rv�w|�r}�#~���!&�$�u����
:�� ^� e� e��(�O�S��U�D��K�!9�:�:�
:�s�;=F�;G
c�(�	|jd�}t|�t|�std��|S#t$rYnwxYw|std��t|�}t
|�t|�}t|z}t|�std��|S)N�asciizLabel too longzNo Input)	r+�ulabelr7r
�UnicodeEncodeError�strr�r-�_alabel_prefix�r1�label_bytess  r�alabelr��s���
��l�l�7�+���{��!�+�.��,�-�-�����
��
����
�#�#���J�E�����E�"�K� �;�.�K��k�*��(�)�)��s�36�	A�Ac��t|ttf�s	|jd�}n|}|j
�}|jt�rA|tt�d}|std��|jd�ddk(r'td��t|�|jd�S	|jd�}t|�|S#t$rt|�|cYSwxYw#t$rtd��wxYw)Nr�z5Malformed A-label, no Punycode eligible content foundr]r\z"A-label must not end with a hyphenr*zInvalid A-label)
rr�r�r+r�r��lower�
startswithr�r5r
r��UnicodeErrorr�s  rr�r�s���e�e�Y�/�0�	��,�,�w�/�K�
���#�#�%�K����n�-�!�#�n�"5�"6�7����S�T�T����g�&�r�*�c�1��@�A�A��K� ��!�!�'�*�*�+��"�"�:�.������L��-"�	�����L�	��&�+��)�*�*�+�s�C
�/C)�
C&�%C&�)C>�domain�
std3_rules�transitionalc��ddlm}d}t|�D]�\}}t|�}	||dkr|ntj||df�dz
}|d}	d}
t|�dk(r|d}
|	d	k(s|	d
k(r|r	|	dk(r
|s|
�||z
}n*|
�|	dk(s|	dk(r|r|	d
k(r|r||
z
}n|	d
k7r
t
����tjd|�S#t$r2tdjt|�|dzt|����wxYw)zBRe-map the characters in the string according to UTS46 processing.r)�	uts46datar?��ZN�rZ�Vrf�3rV�Ir~r`)
r�rKr%�bisect�bisect_leftr5�
IndexErrorrr/r0rMrra)r�r�r�r��outputrc�char�
code_point�uts46row�status�replacements           r�uts46_remapr�4s0��$�
�F��v�&�	��T���Y�
�	;� �z�C�/?���"�"�9�z�3�.?�@�1�D�F�H��a�[�F��K��8�}��!�&�q�k���#�
��s�]�<��s�]�:�+�:M��$����(�f��m��s�]�:��s�]�|��+�%���3�� �l�"��%'�0� � ���/�/���	;�"�?�F�F��j�!�3��7�D��L�:�;�
;�	;�s�BC�;C=�strict�uts46c��t|ttf�r	|jd�}|r
t
|||�}d}g}|r|jd�}ntj|�}|r|dgk(rtd��|ddk(r|d=d}|D]+}t|�}|r|j|��"td	��|r|jd
�dj|�}t||�std��|S#t$rtd��wxYw)
Nr�zGshould pass a unicode string to the function rather than a byte string.F�.r?�Empty domainr]T�Empty labelr�.zDomain too long)
rr�r�r��UnicodeDecodeErrorr
r��split�_unicode_dots_rer��append�joinr<)	r(r�r�r�r�r8�result�labelsr1s	         rr+r+Ts���!�e�Y�'�(�	g�����!�A�
���:�|�4���L�
�F�
�������!�'�'��*���V��t�^���'�'�
�b�z�R���2�J������5�M����M�M�!���M�*�*����
�
�c���	�	�&��A��q�,�/��)�*�*��H��5"�	g��e�f�f�	g�s�C2�2Dc���	t|ttf�r|jd�}|r
t
||d�}d}g}|stj|�}n|jd�}|r|dgk(rtd��|ds|d=d}|D]+}t|�}|r|j|��"td	��|r|jd�dj|�S#t$rtd��wxYw)
Nr�zInvalid ASCII in A-labelFr�r?r�r]Tr�)rr�r�r�r�r
r�r�r�r�r�r�)r(r�r�r�r8r�r�r1s        rr�r�us���4��a�%��+�,�����!�A�
���:�u�-���L�
�F��!�'�'��*���������V��t�^���'�'��"�:��2�J������5�M����M�M�!���M�*�*����
�
�b���8�8�F����/�4��2�3�3�4�s�'C�C+)F)TF)FFFF)FFF)*r?rr�r�re�typingrr�	intrangesrrgr��compiler�r�r
rrr�intr"r��boolr'r�r-r0r7r<rTrXr^rbroryr�r�r�r�r�r+r�rrr�<module>r�s���
��	�"�(������2�:�:�:�;��	��	�
	�I�	�
	�y�	�
	�i�	�

��
��
�@�3�@��@��@� �� �� � �S� �S� ��e�E�3�J�/��D���u�U�C�Z�0������8�c�8�d�8�t�8�v�#��$���3��4��A�S�A�T�A�
(�#�(�C�(�D�(�V'�#�'�C�'�D�'�T�'�T�u�S�%��2�3����>�#��%��0�%��U�I�-�.��3��:0��0��0�D�0�UX�0�@
�e�C��	�)�*�
�D�
��
�cg�
�@D�
�QV�
�B�e�C��	�)�*��D����cg��tw�rpython3.12/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-312.pyc000064400000000410151732702350023547 0ustar00�

R`i���dZy)z3.4N)�__version__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/package_data.py�<module>rs
���rpython3.12/site-packages/pip/_vendor/idna/__pycache__/codec.cpython-312.pyc000064400000011077151732702350022253 0ustar00�

R`i.
��Z�ddlmZmZmZmZmZddlZddlZddlm	Z	m
Z
ejd�ZGd�dej�Z
Gd�d	ej�ZGd
�dej �ZGd�d
e
ej$�ZGd�de
ej&�Zdej(fd�Zy)�)�encode�decode�alabel�ulabel�	IDNAError�N)�Tuple�Optionalu[.。.。]c	�L�eZdZddededeeeffd�Zddededeeeffd�Zy)�Codec�data�errors�returnc�r�|dk7rtdj|���|syt|�t|�fS)N�strict�Unsupported error handling "{}")�r)r�formatr�len��selfr
rs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/codec.pyrzCodec.encode
s:���X���?�F�F�v�N�O�O����d�|�S��Y�&�&rc�r�|dk7rtdj|���|syt|�t|�fS)Nrr��r)rrrrrs   rrzCodec.decodes:���X���?�F�F�v�N�O�O����d�|�S��Y�&�&rN)r)	�__name__�
__module__�__qualname__�strr	�bytes�intrr�rrrrsG��'�3�'��'�5����;L�'�'�5�'�#�'�U�3��8�_�'rrc
�.�eZdZdedededeeeffd�Zy)�IncrementalEncoderr
r�finalrc�`�|dk7rtdj|���|sytj|�}d}|r|dsd}|d=n	|s|d=|rd}g}d}|D]1}|j	t|��|r|dz
}|t
|�z
}�3dj|�|z}	|t
|�z
}|	|fS�	Nrrrr����.rr)rr�_unicode_dots_re�split�appendrr�join�
rr
rr%�labels�trailing_dot�result�size�label�
result_strs
          r�_buffer_encodez!IncrementalEncoder._buffer_encodes����X���?�F�F�v�N�O�O���!�'�'��-������"�:�"���2�J���2�J��#&�L������E��M�M�&��-�(����	���C��J��D�	��X�X�f�%��4�
���L�!�!���4��rN)rrrr�boolr	r!r5r"rrr$r$s,�� �3� �� �D� �U�3�PS�8�_� rr$c
�.�eZdZdedededeeeffd�Zy)�IncrementalDecoderr
rr%rc�`�|dk7rtdj|���|sytj|�}d}|r|dsd}|d=n	|s|d=|rd}g}d}|D]1}|j	t|��|r|dz
}|t
|�z
}�3dj|�|z}	|t
|�z
}|	|fSr')rrr*r+r,rrr-r.s
          r�_buffer_decodez!IncrementalDecoder._buffer_decode>s����X���?�F�F�v�N�O�O���!�'�'��-������"�:�"���2�J���2�J��#&�L������E��M�M�&��-�(����	���C��J��D�	��X�X�f�%��4�
���L�!�!���D�!�!rN)rrrrr6r	r!r:r"rrr8r8=s,��"�3�"��"�D�"�U�3�PS�8�_�"rr8c��eZdZy)�StreamWriterN�rrrr"rrr<r<^���rr<c��eZdZy)�StreamReaderNr=r"rrr@r@br>rr@rc	��tjdt�jt�jt
ttt��S)N�idna)�namerr�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInforrrr$r8r<r@r"rr�getregentryrJfs6�����
��w�~�~��w�~�~�-�-�!�!��r)�corerrrrrrH�re�typingr	r
�compiler*r�BufferedIncrementalEncoderr$�BufferedIncrementalDecoderr8r<r@rIrJr"rr�<module>rQs���;�;�
�	�"��2�:�:�:�;��'�F�L�L�'�( ��:�:� �B"��:�:�"�B	�5�&�-�-�	�	�5�&�-�-�	�
�V�%�%�
rpython3.12/site-packages/pip/_vendor/idna/idnadata.py000064400000126527151732702360016412 0ustar00# This file is automatically generated by tools/idna-data

__version__ = '15.0.0'
scripts = {
    'Greek': (
        0x37000000374,
        0x37500000378,
        0x37a0000037e,
        0x37f00000380,
        0x38400000385,
        0x38600000387,
        0x3880000038b,
        0x38c0000038d,
        0x38e000003a2,
        0x3a3000003e2,
        0x3f000000400,
        0x1d2600001d2b,
        0x1d5d00001d62,
        0x1d6600001d6b,
        0x1dbf00001dc0,
        0x1f0000001f16,
        0x1f1800001f1e,
        0x1f2000001f46,
        0x1f4800001f4e,
        0x1f5000001f58,
        0x1f5900001f5a,
        0x1f5b00001f5c,
        0x1f5d00001f5e,
        0x1f5f00001f7e,
        0x1f8000001fb5,
        0x1fb600001fc5,
        0x1fc600001fd4,
        0x1fd600001fdc,
        0x1fdd00001ff0,
        0x1ff200001ff5,
        0x1ff600001fff,
        0x212600002127,
        0xab650000ab66,
        0x101400001018f,
        0x101a0000101a1,
        0x1d2000001d246,
    ),
    'Han': (
        0x2e8000002e9a,
        0x2e9b00002ef4,
        0x2f0000002fd6,
        0x300500003006,
        0x300700003008,
        0x30210000302a,
        0x30380000303c,
        0x340000004dc0,
        0x4e000000a000,
        0xf9000000fa6e,
        0xfa700000fada,
        0x16fe200016fe4,
        0x16ff000016ff2,
        0x200000002a6e0,
        0x2a7000002b73a,
        0x2b7400002b81e,
        0x2b8200002cea2,
        0x2ceb00002ebe1,
        0x2f8000002fa1e,
        0x300000003134b,
        0x31350000323b0,
    ),
    'Hebrew': (
        0x591000005c8,
        0x5d0000005eb,
        0x5ef000005f5,
        0xfb1d0000fb37,
        0xfb380000fb3d,
        0xfb3e0000fb3f,
        0xfb400000fb42,
        0xfb430000fb45,
        0xfb460000fb50,
    ),
    'Hiragana': (
        0x304100003097,
        0x309d000030a0,
        0x1b0010001b120,
        0x1b1320001b133,
        0x1b1500001b153,
        0x1f2000001f201,
    ),
    'Katakana': (
        0x30a1000030fb,
        0x30fd00003100,
        0x31f000003200,
        0x32d0000032ff,
        0x330000003358,
        0xff660000ff70,
        0xff710000ff9e,
        0x1aff00001aff4,
        0x1aff50001affc,
        0x1affd0001afff,
        0x1b0000001b001,
        0x1b1200001b123,
        0x1b1550001b156,
        0x1b1640001b168,
    ),
}
joining_types = {
    0x600: 85,
    0x601: 85,
    0x602: 85,
    0x603: 85,
    0x604: 85,
    0x605: 85,
    0x608: 85,
    0x60b: 85,
    0x620: 68,
    0x621: 85,
    0x622: 82,
    0x623: 82,
    0x624: 82,
    0x625: 82,
    0x626: 68,
    0x627: 82,
    0x628: 68,
    0x629: 82,
    0x62a: 68,
    0x62b: 68,
    0x62c: 68,
    0x62d: 68,
    0x62e: 68,
    0x62f: 82,
    0x630: 82,
    0x631: 82,
    0x632: 82,
    0x633: 68,
    0x634: 68,
    0x635: 68,
    0x636: 68,
    0x637: 68,
    0x638: 68,
    0x639: 68,
    0x63a: 68,
    0x63b: 68,
    0x63c: 68,
    0x63d: 68,
    0x63e: 68,
    0x63f: 68,
    0x640: 67,
    0x641: 68,
    0x642: 68,
    0x643: 68,
    0x644: 68,
    0x645: 68,
    0x646: 68,
    0x647: 68,
    0x648: 82,
    0x649: 68,
    0x64a: 68,
    0x66e: 68,
    0x66f: 68,
    0x671: 82,
    0x672: 82,
    0x673: 82,
    0x674: 85,
    0x675: 82,
    0x676: 82,
    0x677: 82,
    0x678: 68,
    0x679: 68,
    0x67a: 68,
    0x67b: 68,
    0x67c: 68,
    0x67d: 68,
    0x67e: 68,
    0x67f: 68,
    0x680: 68,
    0x681: 68,
    0x682: 68,
    0x683: 68,
    0x684: 68,
    0x685: 68,
    0x686: 68,
    0x687: 68,
    0x688: 82,
    0x689: 82,
    0x68a: 82,
    0x68b: 82,
    0x68c: 82,
    0x68d: 82,
    0x68e: 82,
    0x68f: 82,
    0x690: 82,
    0x691: 82,
    0x692: 82,
    0x693: 82,
    0x694: 82,
    0x695: 82,
    0x696: 82,
    0x697: 82,
    0x698: 82,
    0x699: 82,
    0x69a: 68,
    0x69b: 68,
    0x69c: 68,
    0x69d: 68,
    0x69e: 68,
    0x69f: 68,
    0x6a0: 68,
    0x6a1: 68,
    0x6a2: 68,
    0x6a3: 68,
    0x6a4: 68,
    0x6a5: 68,
    0x6a6: 68,
    0x6a7: 68,
    0x6a8: 68,
    0x6a9: 68,
    0x6aa: 68,
    0x6ab: 68,
    0x6ac: 68,
    0x6ad: 68,
    0x6ae: 68,
    0x6af: 68,
    0x6b0: 68,
    0x6b1: 68,
    0x6b2: 68,
    0x6b3: 68,
    0x6b4: 68,
    0x6b5: 68,
    0x6b6: 68,
    0x6b7: 68,
    0x6b8: 68,
    0x6b9: 68,
    0x6ba: 68,
    0x6bb: 68,
    0x6bc: 68,
    0x6bd: 68,
    0x6be: 68,
    0x6bf: 68,
    0x6c0: 82,
    0x6c1: 68,
    0x6c2: 68,
    0x6c3: 82,
    0x6c4: 82,
    0x6c5: 82,
    0x6c6: 82,
    0x6c7: 82,
    0x6c8: 82,
    0x6c9: 82,
    0x6ca: 82,
    0x6cb: 82,
    0x6cc: 68,
    0x6cd: 82,
    0x6ce: 68,
    0x6cf: 82,
    0x6d0: 68,
    0x6d1: 68,
    0x6d2: 82,
    0x6d3: 82,
    0x6d5: 82,
    0x6dd: 85,
    0x6ee: 82,
    0x6ef: 82,
    0x6fa: 68,
    0x6fb: 68,
    0x6fc: 68,
    0x6ff: 68,
    0x70f: 84,
    0x710: 82,
    0x712: 68,
    0x713: 68,
    0x714: 68,
    0x715: 82,
    0x716: 82,
    0x717: 82,
    0x718: 82,
    0x719: 82,
    0x71a: 68,
    0x71b: 68,
    0x71c: 68,
    0x71d: 68,
    0x71e: 82,
    0x71f: 68,
    0x720: 68,
    0x721: 68,
    0x722: 68,
    0x723: 68,
    0x724: 68,
    0x725: 68,
    0x726: 68,
    0x727: 68,
    0x728: 82,
    0x729: 68,
    0x72a: 82,
    0x72b: 68,
    0x72c: 82,
    0x72d: 68,
    0x72e: 68,
    0x72f: 82,
    0x74d: 82,
    0x74e: 68,
    0x74f: 68,
    0x750: 68,
    0x751: 68,
    0x752: 68,
    0x753: 68,
    0x754: 68,
    0x755: 68,
    0x756: 68,
    0x757: 68,
    0x758: 68,
    0x759: 82,
    0x75a: 82,
    0x75b: 82,
    0x75c: 68,
    0x75d: 68,
    0x75e: 68,
    0x75f: 68,
    0x760: 68,
    0x761: 68,
    0x762: 68,
    0x763: 68,
    0x764: 68,
    0x765: 68,
    0x766: 68,
    0x767: 68,
    0x768: 68,
    0x769: 68,
    0x76a: 68,
    0x76b: 82,
    0x76c: 82,
    0x76d: 68,
    0x76e: 68,
    0x76f: 68,
    0x770: 68,
    0x771: 82,
    0x772: 68,
    0x773: 82,
    0x774: 82,
    0x775: 68,
    0x776: 68,
    0x777: 68,
    0x778: 82,
    0x779: 82,
    0x77a: 68,
    0x77b: 68,
    0x77c: 68,
    0x77d: 68,
    0x77e: 68,
    0x77f: 68,
    0x7ca: 68,
    0x7cb: 68,
    0x7cc: 68,
    0x7cd: 68,
    0x7ce: 68,
    0x7cf: 68,
    0x7d0: 68,
    0x7d1: 68,
    0x7d2: 68,
    0x7d3: 68,
    0x7d4: 68,
    0x7d5: 68,
    0x7d6: 68,
    0x7d7: 68,
    0x7d8: 68,
    0x7d9: 68,
    0x7da: 68,
    0x7db: 68,
    0x7dc: 68,
    0x7dd: 68,
    0x7de: 68,
    0x7df: 68,
    0x7e0: 68,
    0x7e1: 68,
    0x7e2: 68,
    0x7e3: 68,
    0x7e4: 68,
    0x7e5: 68,
    0x7e6: 68,
    0x7e7: 68,
    0x7e8: 68,
    0x7e9: 68,
    0x7ea: 68,
    0x7fa: 67,
    0x840: 82,
    0x841: 68,
    0x842: 68,
    0x843: 68,
    0x844: 68,
    0x845: 68,
    0x846: 82,
    0x847: 82,
    0x848: 68,
    0x849: 82,
    0x84a: 68,
    0x84b: 68,
    0x84c: 68,
    0x84d: 68,
    0x84e: 68,
    0x84f: 68,
    0x850: 68,
    0x851: 68,
    0x852: 68,
    0x853: 68,
    0x854: 82,
    0x855: 68,
    0x856: 82,
    0x857: 82,
    0x858: 82,
    0x860: 68,
    0x861: 85,
    0x862: 68,
    0x863: 68,
    0x864: 68,
    0x865: 68,
    0x866: 85,
    0x867: 82,
    0x868: 68,
    0x869: 82,
    0x86a: 82,
    0x870: 82,
    0x871: 82,
    0x872: 82,
    0x873: 82,
    0x874: 82,
    0x875: 82,
    0x876: 82,
    0x877: 82,
    0x878: 82,
    0x879: 82,
    0x87a: 82,
    0x87b: 82,
    0x87c: 82,
    0x87d: 82,
    0x87e: 82,
    0x87f: 82,
    0x880: 82,
    0x881: 82,
    0x882: 82,
    0x883: 67,
    0x884: 67,
    0x885: 67,
    0x886: 68,
    0x887: 85,
    0x888: 85,
    0x889: 68,
    0x88a: 68,
    0x88b: 68,
    0x88c: 68,
    0x88d: 68,
    0x88e: 82,
    0x890: 85,
    0x891: 85,
    0x8a0: 68,
    0x8a1: 68,
    0x8a2: 68,
    0x8a3: 68,
    0x8a4: 68,
    0x8a5: 68,
    0x8a6: 68,
    0x8a7: 68,
    0x8a8: 68,
    0x8a9: 68,
    0x8aa: 82,
    0x8ab: 82,
    0x8ac: 82,
    0x8ad: 85,
    0x8ae: 82,
    0x8af: 68,
    0x8b0: 68,
    0x8b1: 82,
    0x8b2: 82,
    0x8b3: 68,
    0x8b4: 68,
    0x8b5: 68,
    0x8b6: 68,
    0x8b7: 68,
    0x8b8: 68,
    0x8b9: 82,
    0x8ba: 68,
    0x8bb: 68,
    0x8bc: 68,
    0x8bd: 68,
    0x8be: 68,
    0x8bf: 68,
    0x8c0: 68,
    0x8c1: 68,
    0x8c2: 68,
    0x8c3: 68,
    0x8c4: 68,
    0x8c5: 68,
    0x8c6: 68,
    0x8c7: 68,
    0x8c8: 68,
    0x8e2: 85,
    0x1806: 85,
    0x1807: 68,
    0x180a: 67,
    0x180e: 85,
    0x1820: 68,
    0x1821: 68,
    0x1822: 68,
    0x1823: 68,
    0x1824: 68,
    0x1825: 68,
    0x1826: 68,
    0x1827: 68,
    0x1828: 68,
    0x1829: 68,
    0x182a: 68,
    0x182b: 68,
    0x182c: 68,
    0x182d: 68,
    0x182e: 68,
    0x182f: 68,
    0x1830: 68,
    0x1831: 68,
    0x1832: 68,
    0x1833: 68,
    0x1834: 68,
    0x1835: 68,
    0x1836: 68,
    0x1837: 68,
    0x1838: 68,
    0x1839: 68,
    0x183a: 68,
    0x183b: 68,
    0x183c: 68,
    0x183d: 68,
    0x183e: 68,
    0x183f: 68,
    0x1840: 68,
    0x1841: 68,
    0x1842: 68,
    0x1843: 68,
    0x1844: 68,
    0x1845: 68,
    0x1846: 68,
    0x1847: 68,
    0x1848: 68,
    0x1849: 68,
    0x184a: 68,
    0x184b: 68,
    0x184c: 68,
    0x184d: 68,
    0x184e: 68,
    0x184f: 68,
    0x1850: 68,
    0x1851: 68,
    0x1852: 68,
    0x1853: 68,
    0x1854: 68,
    0x1855: 68,
    0x1856: 68,
    0x1857: 68,
    0x1858: 68,
    0x1859: 68,
    0x185a: 68,
    0x185b: 68,
    0x185c: 68,
    0x185d: 68,
    0x185e: 68,
    0x185f: 68,
    0x1860: 68,
    0x1861: 68,
    0x1862: 68,
    0x1863: 68,
    0x1864: 68,
    0x1865: 68,
    0x1866: 68,
    0x1867: 68,
    0x1868: 68,
    0x1869: 68,
    0x186a: 68,
    0x186b: 68,
    0x186c: 68,
    0x186d: 68,
    0x186e: 68,
    0x186f: 68,
    0x1870: 68,
    0x1871: 68,
    0x1872: 68,
    0x1873: 68,
    0x1874: 68,
    0x1875: 68,
    0x1876: 68,
    0x1877: 68,
    0x1878: 68,
    0x1880: 85,
    0x1881: 85,
    0x1882: 85,
    0x1883: 85,
    0x1884: 85,
    0x1885: 84,
    0x1886: 84,
    0x1887: 68,
    0x1888: 68,
    0x1889: 68,
    0x188a: 68,
    0x188b: 68,
    0x188c: 68,
    0x188d: 68,
    0x188e: 68,
    0x188f: 68,
    0x1890: 68,
    0x1891: 68,
    0x1892: 68,
    0x1893: 68,
    0x1894: 68,
    0x1895: 68,
    0x1896: 68,
    0x1897: 68,
    0x1898: 68,
    0x1899: 68,
    0x189a: 68,
    0x189b: 68,
    0x189c: 68,
    0x189d: 68,
    0x189e: 68,
    0x189f: 68,
    0x18a0: 68,
    0x18a1: 68,
    0x18a2: 68,
    0x18a3: 68,
    0x18a4: 68,
    0x18a5: 68,
    0x18a6: 68,
    0x18a7: 68,
    0x18a8: 68,
    0x18aa: 68,
    0x200c: 85,
    0x200d: 67,
    0x202f: 85,
    0x2066: 85,
    0x2067: 85,
    0x2068: 85,
    0x2069: 85,
    0xa840: 68,
    0xa841: 68,
    0xa842: 68,
    0xa843: 68,
    0xa844: 68,
    0xa845: 68,
    0xa846: 68,
    0xa847: 68,
    0xa848: 68,
    0xa849: 68,
    0xa84a: 68,
    0xa84b: 68,
    0xa84c: 68,
    0xa84d: 68,
    0xa84e: 68,
    0xa84f: 68,
    0xa850: 68,
    0xa851: 68,
    0xa852: 68,
    0xa853: 68,
    0xa854: 68,
    0xa855: 68,
    0xa856: 68,
    0xa857: 68,
    0xa858: 68,
    0xa859: 68,
    0xa85a: 68,
    0xa85b: 68,
    0xa85c: 68,
    0xa85d: 68,
    0xa85e: 68,
    0xa85f: 68,
    0xa860: 68,
    0xa861: 68,
    0xa862: 68,
    0xa863: 68,
    0xa864: 68,
    0xa865: 68,
    0xa866: 68,
    0xa867: 68,
    0xa868: 68,
    0xa869: 68,
    0xa86a: 68,
    0xa86b: 68,
    0xa86c: 68,
    0xa86d: 68,
    0xa86e: 68,
    0xa86f: 68,
    0xa870: 68,
    0xa871: 68,
    0xa872: 76,
    0xa873: 85,
    0x10ac0: 68,
    0x10ac1: 68,
    0x10ac2: 68,
    0x10ac3: 68,
    0x10ac4: 68,
    0x10ac5: 82,
    0x10ac6: 85,
    0x10ac7: 82,
    0x10ac8: 85,
    0x10ac9: 82,
    0x10aca: 82,
    0x10acb: 85,
    0x10acc: 85,
    0x10acd: 76,
    0x10ace: 82,
    0x10acf: 82,
    0x10ad0: 82,
    0x10ad1: 82,
    0x10ad2: 82,
    0x10ad3: 68,
    0x10ad4: 68,
    0x10ad5: 68,
    0x10ad6: 68,
    0x10ad7: 76,
    0x10ad8: 68,
    0x10ad9: 68,
    0x10ada: 68,
    0x10adb: 68,
    0x10adc: 68,
    0x10add: 82,
    0x10ade: 68,
    0x10adf: 68,
    0x10ae0: 68,
    0x10ae1: 82,
    0x10ae2: 85,
    0x10ae3: 85,
    0x10ae4: 82,
    0x10aeb: 68,
    0x10aec: 68,
    0x10aed: 68,
    0x10aee: 68,
    0x10aef: 82,
    0x10b80: 68,
    0x10b81: 82,
    0x10b82: 68,
    0x10b83: 82,
    0x10b84: 82,
    0x10b85: 82,
    0x10b86: 68,
    0x10b87: 68,
    0x10b88: 68,
    0x10b89: 82,
    0x10b8a: 68,
    0x10b8b: 68,
    0x10b8c: 82,
    0x10b8d: 68,
    0x10b8e: 82,
    0x10b8f: 82,
    0x10b90: 68,
    0x10b91: 82,
    0x10ba9: 82,
    0x10baa: 82,
    0x10bab: 82,
    0x10bac: 82,
    0x10bad: 68,
    0x10bae: 68,
    0x10baf: 85,
    0x10d00: 76,
    0x10d01: 68,
    0x10d02: 68,
    0x10d03: 68,
    0x10d04: 68,
    0x10d05: 68,
    0x10d06: 68,
    0x10d07: 68,
    0x10d08: 68,
    0x10d09: 68,
    0x10d0a: 68,
    0x10d0b: 68,
    0x10d0c: 68,
    0x10d0d: 68,
    0x10d0e: 68,
    0x10d0f: 68,
    0x10d10: 68,
    0x10d11: 68,
    0x10d12: 68,
    0x10d13: 68,
    0x10d14: 68,
    0x10d15: 68,
    0x10d16: 68,
    0x10d17: 68,
    0x10d18: 68,
    0x10d19: 68,
    0x10d1a: 68,
    0x10d1b: 68,
    0x10d1c: 68,
    0x10d1d: 68,
    0x10d1e: 68,
    0x10d1f: 68,
    0x10d20: 68,
    0x10d21: 68,
    0x10d22: 82,
    0x10d23: 68,
    0x10f30: 68,
    0x10f31: 68,
    0x10f32: 68,
    0x10f33: 82,
    0x10f34: 68,
    0x10f35: 68,
    0x10f36: 68,
    0x10f37: 68,
    0x10f38: 68,
    0x10f39: 68,
    0x10f3a: 68,
    0x10f3b: 68,
    0x10f3c: 68,
    0x10f3d: 68,
    0x10f3e: 68,
    0x10f3f: 68,
    0x10f40: 68,
    0x10f41: 68,
    0x10f42: 68,
    0x10f43: 68,
    0x10f44: 68,
    0x10f45: 85,
    0x10f51: 68,
    0x10f52: 68,
    0x10f53: 68,
    0x10f54: 82,
    0x10f70: 68,
    0x10f71: 68,
    0x10f72: 68,
    0x10f73: 68,
    0x10f74: 82,
    0x10f75: 82,
    0x10f76: 68,
    0x10f77: 68,
    0x10f78: 68,
    0x10f79: 68,
    0x10f7a: 68,
    0x10f7b: 68,
    0x10f7c: 68,
    0x10f7d: 68,
    0x10f7e: 68,
    0x10f7f: 68,
    0x10f80: 68,
    0x10f81: 68,
    0x10fb0: 68,
    0x10fb1: 85,
    0x10fb2: 68,
    0x10fb3: 68,
    0x10fb4: 82,
    0x10fb5: 82,
    0x10fb6: 82,
    0x10fb7: 85,
    0x10fb8: 68,
    0x10fb9: 82,
    0x10fba: 82,
    0x10fbb: 68,
    0x10fbc: 68,
    0x10fbd: 82,
    0x10fbe: 68,
    0x10fbf: 68,
    0x10fc0: 85,
    0x10fc1: 68,
    0x10fc2: 82,
    0x10fc3: 82,
    0x10fc4: 68,
    0x10fc5: 85,
    0x10fc6: 85,
    0x10fc7: 85,
    0x10fc8: 85,
    0x10fc9: 82,
    0x10fca: 68,
    0x10fcb: 76,
    0x110bd: 85,
    0x110cd: 85,
    0x1e900: 68,
    0x1e901: 68,
    0x1e902: 68,
    0x1e903: 68,
    0x1e904: 68,
    0x1e905: 68,
    0x1e906: 68,
    0x1e907: 68,
    0x1e908: 68,
    0x1e909: 68,
    0x1e90a: 68,
    0x1e90b: 68,
    0x1e90c: 68,
    0x1e90d: 68,
    0x1e90e: 68,
    0x1e90f: 68,
    0x1e910: 68,
    0x1e911: 68,
    0x1e912: 68,
    0x1e913: 68,
    0x1e914: 68,
    0x1e915: 68,
    0x1e916: 68,
    0x1e917: 68,
    0x1e918: 68,
    0x1e919: 68,
    0x1e91a: 68,
    0x1e91b: 68,
    0x1e91c: 68,
    0x1e91d: 68,
    0x1e91e: 68,
    0x1e91f: 68,
    0x1e920: 68,
    0x1e921: 68,
    0x1e922: 68,
    0x1e923: 68,
    0x1e924: 68,
    0x1e925: 68,
    0x1e926: 68,
    0x1e927: 68,
    0x1e928: 68,
    0x1e929: 68,
    0x1e92a: 68,
    0x1e92b: 68,
    0x1e92c: 68,
    0x1e92d: 68,
    0x1e92e: 68,
    0x1e92f: 68,
    0x1e930: 68,
    0x1e931: 68,
    0x1e932: 68,
    0x1e933: 68,
    0x1e934: 68,
    0x1e935: 68,
    0x1e936: 68,
    0x1e937: 68,
    0x1e938: 68,
    0x1e939: 68,
    0x1e93a: 68,
    0x1e93b: 68,
    0x1e93c: 68,
    0x1e93d: 68,
    0x1e93e: 68,
    0x1e93f: 68,
    0x1e940: 68,
    0x1e941: 68,
    0x1e942: 68,
    0x1e943: 68,
    0x1e94b: 84,
}
codepoint_classes = {
    'PVALID': (
        0x2d0000002e,
        0x300000003a,
        0x610000007b,
        0xdf000000f7,
        0xf800000100,
        0x10100000102,
        0x10300000104,
        0x10500000106,
        0x10700000108,
        0x1090000010a,
        0x10b0000010c,
        0x10d0000010e,
        0x10f00000110,
        0x11100000112,
        0x11300000114,
        0x11500000116,
        0x11700000118,
        0x1190000011a,
        0x11b0000011c,
        0x11d0000011e,
        0x11f00000120,
        0x12100000122,
        0x12300000124,
        0x12500000126,
        0x12700000128,
        0x1290000012a,
        0x12b0000012c,
        0x12d0000012e,
        0x12f00000130,
        0x13100000132,
        0x13500000136,
        0x13700000139,
        0x13a0000013b,
        0x13c0000013d,
        0x13e0000013f,
        0x14200000143,
        0x14400000145,
        0x14600000147,
        0x14800000149,
        0x14b0000014c,
        0x14d0000014e,
        0x14f00000150,
        0x15100000152,
        0x15300000154,
        0x15500000156,
        0x15700000158,
        0x1590000015a,
        0x15b0000015c,
        0x15d0000015e,
        0x15f00000160,
        0x16100000162,
        0x16300000164,
        0x16500000166,
        0x16700000168,
        0x1690000016a,
        0x16b0000016c,
        0x16d0000016e,
        0x16f00000170,
        0x17100000172,
        0x17300000174,
        0x17500000176,
        0x17700000178,
        0x17a0000017b,
        0x17c0000017d,
        0x17e0000017f,
        0x18000000181,
        0x18300000184,
        0x18500000186,
        0x18800000189,
        0x18c0000018e,
        0x19200000193,
        0x19500000196,
        0x1990000019c,
        0x19e0000019f,
        0x1a1000001a2,
        0x1a3000001a4,
        0x1a5000001a6,
        0x1a8000001a9,
        0x1aa000001ac,
        0x1ad000001ae,
        0x1b0000001b1,
        0x1b4000001b5,
        0x1b6000001b7,
        0x1b9000001bc,
        0x1bd000001c4,
        0x1ce000001cf,
        0x1d0000001d1,
        0x1d2000001d3,
        0x1d4000001d5,
        0x1d6000001d7,
        0x1d8000001d9,
        0x1da000001db,
        0x1dc000001de,
        0x1df000001e0,
        0x1e1000001e2,
        0x1e3000001e4,
        0x1e5000001e6,
        0x1e7000001e8,
        0x1e9000001ea,
        0x1eb000001ec,
        0x1ed000001ee,
        0x1ef000001f1,
        0x1f5000001f6,
        0x1f9000001fa,
        0x1fb000001fc,
        0x1fd000001fe,
        0x1ff00000200,
        0x20100000202,
        0x20300000204,
        0x20500000206,
        0x20700000208,
        0x2090000020a,
        0x20b0000020c,
        0x20d0000020e,
        0x20f00000210,
        0x21100000212,
        0x21300000214,
        0x21500000216,
        0x21700000218,
        0x2190000021a,
        0x21b0000021c,
        0x21d0000021e,
        0x21f00000220,
        0x22100000222,
        0x22300000224,
        0x22500000226,
        0x22700000228,
        0x2290000022a,
        0x22b0000022c,
        0x22d0000022e,
        0x22f00000230,
        0x23100000232,
        0x2330000023a,
        0x23c0000023d,
        0x23f00000241,
        0x24200000243,
        0x24700000248,
        0x2490000024a,
        0x24b0000024c,
        0x24d0000024e,
        0x24f000002b0,
        0x2b9000002c2,
        0x2c6000002d2,
        0x2ec000002ed,
        0x2ee000002ef,
        0x30000000340,
        0x34200000343,
        0x3460000034f,
        0x35000000370,
        0x37100000372,
        0x37300000374,
        0x37700000378,
        0x37b0000037e,
        0x39000000391,
        0x3ac000003cf,
        0x3d7000003d8,
        0x3d9000003da,
        0x3db000003dc,
        0x3dd000003de,
        0x3df000003e0,
        0x3e1000003e2,
        0x3e3000003e4,
        0x3e5000003e6,
        0x3e7000003e8,
        0x3e9000003ea,
        0x3eb000003ec,
        0x3ed000003ee,
        0x3ef000003f0,
        0x3f3000003f4,
        0x3f8000003f9,
        0x3fb000003fd,
        0x43000000460,
        0x46100000462,
        0x46300000464,
        0x46500000466,
        0x46700000468,
        0x4690000046a,
        0x46b0000046c,
        0x46d0000046e,
        0x46f00000470,
        0x47100000472,
        0x47300000474,
        0x47500000476,
        0x47700000478,
        0x4790000047a,
        0x47b0000047c,
        0x47d0000047e,
        0x47f00000480,
        0x48100000482,
        0x48300000488,
        0x48b0000048c,
        0x48d0000048e,
        0x48f00000490,
        0x49100000492,
        0x49300000494,
        0x49500000496,
        0x49700000498,
        0x4990000049a,
        0x49b0000049c,
        0x49d0000049e,
        0x49f000004a0,
        0x4a1000004a2,
        0x4a3000004a4,
        0x4a5000004a6,
        0x4a7000004a8,
        0x4a9000004aa,
        0x4ab000004ac,
        0x4ad000004ae,
        0x4af000004b0,
        0x4b1000004b2,
        0x4b3000004b4,
        0x4b5000004b6,
        0x4b7000004b8,
        0x4b9000004ba,
        0x4bb000004bc,
        0x4bd000004be,
        0x4bf000004c0,
        0x4c2000004c3,
        0x4c4000004c5,
        0x4c6000004c7,
        0x4c8000004c9,
        0x4ca000004cb,
        0x4cc000004cd,
        0x4ce000004d0,
        0x4d1000004d2,
        0x4d3000004d4,
        0x4d5000004d6,
        0x4d7000004d8,
        0x4d9000004da,
        0x4db000004dc,
        0x4dd000004de,
        0x4df000004e0,
        0x4e1000004e2,
        0x4e3000004e4,
        0x4e5000004e6,
        0x4e7000004e8,
        0x4e9000004ea,
        0x4eb000004ec,
        0x4ed000004ee,
        0x4ef000004f0,
        0x4f1000004f2,
        0x4f3000004f4,
        0x4f5000004f6,
        0x4f7000004f8,
        0x4f9000004fa,
        0x4fb000004fc,
        0x4fd000004fe,
        0x4ff00000500,
        0x50100000502,
        0x50300000504,
        0x50500000506,
        0x50700000508,
        0x5090000050a,
        0x50b0000050c,
        0x50d0000050e,
        0x50f00000510,
        0x51100000512,
        0x51300000514,
        0x51500000516,
        0x51700000518,
        0x5190000051a,
        0x51b0000051c,
        0x51d0000051e,
        0x51f00000520,
        0x52100000522,
        0x52300000524,
        0x52500000526,
        0x52700000528,
        0x5290000052a,
        0x52b0000052c,
        0x52d0000052e,
        0x52f00000530,
        0x5590000055a,
        0x56000000587,
        0x58800000589,
        0x591000005be,
        0x5bf000005c0,
        0x5c1000005c3,
        0x5c4000005c6,
        0x5c7000005c8,
        0x5d0000005eb,
        0x5ef000005f3,
        0x6100000061b,
        0x62000000640,
        0x64100000660,
        0x66e00000675,
        0x679000006d4,
        0x6d5000006dd,
        0x6df000006e9,
        0x6ea000006f0,
        0x6fa00000700,
        0x7100000074b,
        0x74d000007b2,
        0x7c0000007f6,
        0x7fd000007fe,
        0x8000000082e,
        0x8400000085c,
        0x8600000086b,
        0x87000000888,
        0x8890000088f,
        0x898000008e2,
        0x8e300000958,
        0x96000000964,
        0x96600000970,
        0x97100000984,
        0x9850000098d,
        0x98f00000991,
        0x993000009a9,
        0x9aa000009b1,
        0x9b2000009b3,
        0x9b6000009ba,
        0x9bc000009c5,
        0x9c7000009c9,
        0x9cb000009cf,
        0x9d7000009d8,
        0x9e0000009e4,
        0x9e6000009f2,
        0x9fc000009fd,
        0x9fe000009ff,
        0xa0100000a04,
        0xa0500000a0b,
        0xa0f00000a11,
        0xa1300000a29,
        0xa2a00000a31,
        0xa3200000a33,
        0xa3500000a36,
        0xa3800000a3a,
        0xa3c00000a3d,
        0xa3e00000a43,
        0xa4700000a49,
        0xa4b00000a4e,
        0xa5100000a52,
        0xa5c00000a5d,
        0xa6600000a76,
        0xa8100000a84,
        0xa8500000a8e,
        0xa8f00000a92,
        0xa9300000aa9,
        0xaaa00000ab1,
        0xab200000ab4,
        0xab500000aba,
        0xabc00000ac6,
        0xac700000aca,
        0xacb00000ace,
        0xad000000ad1,
        0xae000000ae4,
        0xae600000af0,
        0xaf900000b00,
        0xb0100000b04,
        0xb0500000b0d,
        0xb0f00000b11,
        0xb1300000b29,
        0xb2a00000b31,
        0xb3200000b34,
        0xb3500000b3a,
        0xb3c00000b45,
        0xb4700000b49,
        0xb4b00000b4e,
        0xb5500000b58,
        0xb5f00000b64,
        0xb6600000b70,
        0xb7100000b72,
        0xb8200000b84,
        0xb8500000b8b,
        0xb8e00000b91,
        0xb9200000b96,
        0xb9900000b9b,
        0xb9c00000b9d,
        0xb9e00000ba0,
        0xba300000ba5,
        0xba800000bab,
        0xbae00000bba,
        0xbbe00000bc3,
        0xbc600000bc9,
        0xbca00000bce,
        0xbd000000bd1,
        0xbd700000bd8,
        0xbe600000bf0,
        0xc0000000c0d,
        0xc0e00000c11,
        0xc1200000c29,
        0xc2a00000c3a,
        0xc3c00000c45,
        0xc4600000c49,
        0xc4a00000c4e,
        0xc5500000c57,
        0xc5800000c5b,
        0xc5d00000c5e,
        0xc6000000c64,
        0xc6600000c70,
        0xc8000000c84,
        0xc8500000c8d,
        0xc8e00000c91,
        0xc9200000ca9,
        0xcaa00000cb4,
        0xcb500000cba,
        0xcbc00000cc5,
        0xcc600000cc9,
        0xcca00000cce,
        0xcd500000cd7,
        0xcdd00000cdf,
        0xce000000ce4,
        0xce600000cf0,
        0xcf100000cf4,
        0xd0000000d0d,
        0xd0e00000d11,
        0xd1200000d45,
        0xd4600000d49,
        0xd4a00000d4f,
        0xd5400000d58,
        0xd5f00000d64,
        0xd6600000d70,
        0xd7a00000d80,
        0xd8100000d84,
        0xd8500000d97,
        0xd9a00000db2,
        0xdb300000dbc,
        0xdbd00000dbe,
        0xdc000000dc7,
        0xdca00000dcb,
        0xdcf00000dd5,
        0xdd600000dd7,
        0xdd800000de0,
        0xde600000df0,
        0xdf200000df4,
        0xe0100000e33,
        0xe3400000e3b,
        0xe4000000e4f,
        0xe5000000e5a,
        0xe8100000e83,
        0xe8400000e85,
        0xe8600000e8b,
        0xe8c00000ea4,
        0xea500000ea6,
        0xea700000eb3,
        0xeb400000ebe,
        0xec000000ec5,
        0xec600000ec7,
        0xec800000ecf,
        0xed000000eda,
        0xede00000ee0,
        0xf0000000f01,
        0xf0b00000f0c,
        0xf1800000f1a,
        0xf2000000f2a,
        0xf3500000f36,
        0xf3700000f38,
        0xf3900000f3a,
        0xf3e00000f43,
        0xf4400000f48,
        0xf4900000f4d,
        0xf4e00000f52,
        0xf5300000f57,
        0xf5800000f5c,
        0xf5d00000f69,
        0xf6a00000f6d,
        0xf7100000f73,
        0xf7400000f75,
        0xf7a00000f81,
        0xf8200000f85,
        0xf8600000f93,
        0xf9400000f98,
        0xf9900000f9d,
        0xf9e00000fa2,
        0xfa300000fa7,
        0xfa800000fac,
        0xfad00000fb9,
        0xfba00000fbd,
        0xfc600000fc7,
        0x10000000104a,
        0x10500000109e,
        0x10d0000010fb,
        0x10fd00001100,
        0x120000001249,
        0x124a0000124e,
        0x125000001257,
        0x125800001259,
        0x125a0000125e,
        0x126000001289,
        0x128a0000128e,
        0x1290000012b1,
        0x12b2000012b6,
        0x12b8000012bf,
        0x12c0000012c1,
        0x12c2000012c6,
        0x12c8000012d7,
        0x12d800001311,
        0x131200001316,
        0x13180000135b,
        0x135d00001360,
        0x138000001390,
        0x13a0000013f6,
        0x14010000166d,
        0x166f00001680,
        0x16810000169b,
        0x16a0000016eb,
        0x16f1000016f9,
        0x170000001716,
        0x171f00001735,
        0x174000001754,
        0x17600000176d,
        0x176e00001771,
        0x177200001774,
        0x1780000017b4,
        0x17b6000017d4,
        0x17d7000017d8,
        0x17dc000017de,
        0x17e0000017ea,
        0x18100000181a,
        0x182000001879,
        0x1880000018ab,
        0x18b0000018f6,
        0x19000000191f,
        0x19200000192c,
        0x19300000193c,
        0x19460000196e,
        0x197000001975,
        0x1980000019ac,
        0x19b0000019ca,
        0x19d0000019da,
        0x1a0000001a1c,
        0x1a2000001a5f,
        0x1a6000001a7d,
        0x1a7f00001a8a,
        0x1a9000001a9a,
        0x1aa700001aa8,
        0x1ab000001abe,
        0x1abf00001acf,
        0x1b0000001b4d,
        0x1b5000001b5a,
        0x1b6b00001b74,
        0x1b8000001bf4,
        0x1c0000001c38,
        0x1c4000001c4a,
        0x1c4d00001c7e,
        0x1cd000001cd3,
        0x1cd400001cfb,
        0x1d0000001d2c,
        0x1d2f00001d30,
        0x1d3b00001d3c,
        0x1d4e00001d4f,
        0x1d6b00001d78,
        0x1d7900001d9b,
        0x1dc000001e00,
        0x1e0100001e02,
        0x1e0300001e04,
        0x1e0500001e06,
        0x1e0700001e08,
        0x1e0900001e0a,
        0x1e0b00001e0c,
        0x1e0d00001e0e,
        0x1e0f00001e10,
        0x1e1100001e12,
        0x1e1300001e14,
        0x1e1500001e16,
        0x1e1700001e18,
        0x1e1900001e1a,
        0x1e1b00001e1c,
        0x1e1d00001e1e,
        0x1e1f00001e20,
        0x1e2100001e22,
        0x1e2300001e24,
        0x1e2500001e26,
        0x1e2700001e28,
        0x1e2900001e2a,
        0x1e2b00001e2c,
        0x1e2d00001e2e,
        0x1e2f00001e30,
        0x1e3100001e32,
        0x1e3300001e34,
        0x1e3500001e36,
        0x1e3700001e38,
        0x1e3900001e3a,
        0x1e3b00001e3c,
        0x1e3d00001e3e,
        0x1e3f00001e40,
        0x1e4100001e42,
        0x1e4300001e44,
        0x1e4500001e46,
        0x1e4700001e48,
        0x1e4900001e4a,
        0x1e4b00001e4c,
        0x1e4d00001e4e,
        0x1e4f00001e50,
        0x1e5100001e52,
        0x1e5300001e54,
        0x1e5500001e56,
        0x1e5700001e58,
        0x1e5900001e5a,
        0x1e5b00001e5c,
        0x1e5d00001e5e,
        0x1e5f00001e60,
        0x1e6100001e62,
        0x1e6300001e64,
        0x1e6500001e66,
        0x1e6700001e68,
        0x1e6900001e6a,
        0x1e6b00001e6c,
        0x1e6d00001e6e,
        0x1e6f00001e70,
        0x1e7100001e72,
        0x1e7300001e74,
        0x1e7500001e76,
        0x1e7700001e78,
        0x1e7900001e7a,
        0x1e7b00001e7c,
        0x1e7d00001e7e,
        0x1e7f00001e80,
        0x1e8100001e82,
        0x1e8300001e84,
        0x1e8500001e86,
        0x1e8700001e88,
        0x1e8900001e8a,
        0x1e8b00001e8c,
        0x1e8d00001e8e,
        0x1e8f00001e90,
        0x1e9100001e92,
        0x1e9300001e94,
        0x1e9500001e9a,
        0x1e9c00001e9e,
        0x1e9f00001ea0,
        0x1ea100001ea2,
        0x1ea300001ea4,
        0x1ea500001ea6,
        0x1ea700001ea8,
        0x1ea900001eaa,
        0x1eab00001eac,
        0x1ead00001eae,
        0x1eaf00001eb0,
        0x1eb100001eb2,
        0x1eb300001eb4,
        0x1eb500001eb6,
        0x1eb700001eb8,
        0x1eb900001eba,
        0x1ebb00001ebc,
        0x1ebd00001ebe,
        0x1ebf00001ec0,
        0x1ec100001ec2,
        0x1ec300001ec4,
        0x1ec500001ec6,
        0x1ec700001ec8,
        0x1ec900001eca,
        0x1ecb00001ecc,
        0x1ecd00001ece,
        0x1ecf00001ed0,
        0x1ed100001ed2,
        0x1ed300001ed4,
        0x1ed500001ed6,
        0x1ed700001ed8,
        0x1ed900001eda,
        0x1edb00001edc,
        0x1edd00001ede,
        0x1edf00001ee0,
        0x1ee100001ee2,
        0x1ee300001ee4,
        0x1ee500001ee6,
        0x1ee700001ee8,
        0x1ee900001eea,
        0x1eeb00001eec,
        0x1eed00001eee,
        0x1eef00001ef0,
        0x1ef100001ef2,
        0x1ef300001ef4,
        0x1ef500001ef6,
        0x1ef700001ef8,
        0x1ef900001efa,
        0x1efb00001efc,
        0x1efd00001efe,
        0x1eff00001f08,
        0x1f1000001f16,
        0x1f2000001f28,
        0x1f3000001f38,
        0x1f4000001f46,
        0x1f5000001f58,
        0x1f6000001f68,
        0x1f7000001f71,
        0x1f7200001f73,
        0x1f7400001f75,
        0x1f7600001f77,
        0x1f7800001f79,
        0x1f7a00001f7b,
        0x1f7c00001f7d,
        0x1fb000001fb2,
        0x1fb600001fb7,
        0x1fc600001fc7,
        0x1fd000001fd3,
        0x1fd600001fd8,
        0x1fe000001fe3,
        0x1fe400001fe8,
        0x1ff600001ff7,
        0x214e0000214f,
        0x218400002185,
        0x2c3000002c60,
        0x2c6100002c62,
        0x2c6500002c67,
        0x2c6800002c69,
        0x2c6a00002c6b,
        0x2c6c00002c6d,
        0x2c7100002c72,
        0x2c7300002c75,
        0x2c7600002c7c,
        0x2c8100002c82,
        0x2c8300002c84,
        0x2c8500002c86,
        0x2c8700002c88,
        0x2c8900002c8a,
        0x2c8b00002c8c,
        0x2c8d00002c8e,
        0x2c8f00002c90,
        0x2c9100002c92,
        0x2c9300002c94,
        0x2c9500002c96,
        0x2c9700002c98,
        0x2c9900002c9a,
        0x2c9b00002c9c,
        0x2c9d00002c9e,
        0x2c9f00002ca0,
        0x2ca100002ca2,
        0x2ca300002ca4,
        0x2ca500002ca6,
        0x2ca700002ca8,
        0x2ca900002caa,
        0x2cab00002cac,
        0x2cad00002cae,
        0x2caf00002cb0,
        0x2cb100002cb2,
        0x2cb300002cb4,
        0x2cb500002cb6,
        0x2cb700002cb8,
        0x2cb900002cba,
        0x2cbb00002cbc,
        0x2cbd00002cbe,
        0x2cbf00002cc0,
        0x2cc100002cc2,
        0x2cc300002cc4,
        0x2cc500002cc6,
        0x2cc700002cc8,
        0x2cc900002cca,
        0x2ccb00002ccc,
        0x2ccd00002cce,
        0x2ccf00002cd0,
        0x2cd100002cd2,
        0x2cd300002cd4,
        0x2cd500002cd6,
        0x2cd700002cd8,
        0x2cd900002cda,
        0x2cdb00002cdc,
        0x2cdd00002cde,
        0x2cdf00002ce0,
        0x2ce100002ce2,
        0x2ce300002ce5,
        0x2cec00002ced,
        0x2cee00002cf2,
        0x2cf300002cf4,
        0x2d0000002d26,
        0x2d2700002d28,
        0x2d2d00002d2e,
        0x2d3000002d68,
        0x2d7f00002d97,
        0x2da000002da7,
        0x2da800002daf,
        0x2db000002db7,
        0x2db800002dbf,
        0x2dc000002dc7,
        0x2dc800002dcf,
        0x2dd000002dd7,
        0x2dd800002ddf,
        0x2de000002e00,
        0x2e2f00002e30,
        0x300500003008,
        0x302a0000302e,
        0x303c0000303d,
        0x304100003097,
        0x30990000309b,
        0x309d0000309f,
        0x30a1000030fb,
        0x30fc000030ff,
        0x310500003130,
        0x31a0000031c0,
        0x31f000003200,
        0x340000004dc0,
        0x4e000000a48d,
        0xa4d00000a4fe,
        0xa5000000a60d,
        0xa6100000a62c,
        0xa6410000a642,
        0xa6430000a644,
        0xa6450000a646,
        0xa6470000a648,
        0xa6490000a64a,
        0xa64b0000a64c,
        0xa64d0000a64e,
        0xa64f0000a650,
        0xa6510000a652,
        0xa6530000a654,
        0xa6550000a656,
        0xa6570000a658,
        0xa6590000a65a,
        0xa65b0000a65c,
        0xa65d0000a65e,
        0xa65f0000a660,
        0xa6610000a662,
        0xa6630000a664,
        0xa6650000a666,
        0xa6670000a668,
        0xa6690000a66a,
        0xa66b0000a66c,
        0xa66d0000a670,
        0xa6740000a67e,
        0xa67f0000a680,
        0xa6810000a682,
        0xa6830000a684,
        0xa6850000a686,
        0xa6870000a688,
        0xa6890000a68a,
        0xa68b0000a68c,
        0xa68d0000a68e,
        0xa68f0000a690,
        0xa6910000a692,
        0xa6930000a694,
        0xa6950000a696,
        0xa6970000a698,
        0xa6990000a69a,
        0xa69b0000a69c,
        0xa69e0000a6e6,
        0xa6f00000a6f2,
        0xa7170000a720,
        0xa7230000a724,
        0xa7250000a726,
        0xa7270000a728,
        0xa7290000a72a,
        0xa72b0000a72c,
        0xa72d0000a72e,
        0xa72f0000a732,
        0xa7330000a734,
        0xa7350000a736,
        0xa7370000a738,
        0xa7390000a73a,
        0xa73b0000a73c,
        0xa73d0000a73e,
        0xa73f0000a740,
        0xa7410000a742,
        0xa7430000a744,
        0xa7450000a746,
        0xa7470000a748,
        0xa7490000a74a,
        0xa74b0000a74c,
        0xa74d0000a74e,
        0xa74f0000a750,
        0xa7510000a752,
        0xa7530000a754,
        0xa7550000a756,
        0xa7570000a758,
        0xa7590000a75a,
        0xa75b0000a75c,
        0xa75d0000a75e,
        0xa75f0000a760,
        0xa7610000a762,
        0xa7630000a764,
        0xa7650000a766,
        0xa7670000a768,
        0xa7690000a76a,
        0xa76b0000a76c,
        0xa76d0000a76e,
        0xa76f0000a770,
        0xa7710000a779,
        0xa77a0000a77b,
        0xa77c0000a77d,
        0xa77f0000a780,
        0xa7810000a782,
        0xa7830000a784,
        0xa7850000a786,
        0xa7870000a789,
        0xa78c0000a78d,
        0xa78e0000a790,
        0xa7910000a792,
        0xa7930000a796,
        0xa7970000a798,
        0xa7990000a79a,
        0xa79b0000a79c,
        0xa79d0000a79e,
        0xa79f0000a7a0,
        0xa7a10000a7a2,
        0xa7a30000a7a4,
        0xa7a50000a7a6,
        0xa7a70000a7a8,
        0xa7a90000a7aa,
        0xa7af0000a7b0,
        0xa7b50000a7b6,
        0xa7b70000a7b8,
        0xa7b90000a7ba,
        0xa7bb0000a7bc,
        0xa7bd0000a7be,
        0xa7bf0000a7c0,
        0xa7c10000a7c2,
        0xa7c30000a7c4,
        0xa7c80000a7c9,
        0xa7ca0000a7cb,
        0xa7d10000a7d2,
        0xa7d30000a7d4,
        0xa7d50000a7d6,
        0xa7d70000a7d8,
        0xa7d90000a7da,
        0xa7f20000a7f5,
        0xa7f60000a7f8,
        0xa7fa0000a828,
        0xa82c0000a82d,
        0xa8400000a874,
        0xa8800000a8c6,
        0xa8d00000a8da,
        0xa8e00000a8f8,
        0xa8fb0000a8fc,
        0xa8fd0000a92e,
        0xa9300000a954,
        0xa9800000a9c1,
        0xa9cf0000a9da,
        0xa9e00000a9ff,
        0xaa000000aa37,
        0xaa400000aa4e,
        0xaa500000aa5a,
        0xaa600000aa77,
        0xaa7a0000aac3,
        0xaadb0000aade,
        0xaae00000aaf0,
        0xaaf20000aaf7,
        0xab010000ab07,
        0xab090000ab0f,
        0xab110000ab17,
        0xab200000ab27,
        0xab280000ab2f,
        0xab300000ab5b,
        0xab600000ab69,
        0xabc00000abeb,
        0xabec0000abee,
        0xabf00000abfa,
        0xac000000d7a4,
        0xfa0e0000fa10,
        0xfa110000fa12,
        0xfa130000fa15,
        0xfa1f0000fa20,
        0xfa210000fa22,
        0xfa230000fa25,
        0xfa270000fa2a,
        0xfb1e0000fb1f,
        0xfe200000fe30,
        0xfe730000fe74,
        0x100000001000c,
        0x1000d00010027,
        0x100280001003b,
        0x1003c0001003e,
        0x1003f0001004e,
        0x100500001005e,
        0x10080000100fb,
        0x101fd000101fe,
        0x102800001029d,
        0x102a0000102d1,
        0x102e0000102e1,
        0x1030000010320,
        0x1032d00010341,
        0x103420001034a,
        0x103500001037b,
        0x103800001039e,
        0x103a0000103c4,
        0x103c8000103d0,
        0x104280001049e,
        0x104a0000104aa,
        0x104d8000104fc,
        0x1050000010528,
        0x1053000010564,
        0x10597000105a2,
        0x105a3000105b2,
        0x105b3000105ba,
        0x105bb000105bd,
        0x1060000010737,
        0x1074000010756,
        0x1076000010768,
        0x1078000010786,
        0x10787000107b1,
        0x107b2000107bb,
        0x1080000010806,
        0x1080800010809,
        0x1080a00010836,
        0x1083700010839,
        0x1083c0001083d,
        0x1083f00010856,
        0x1086000010877,
        0x108800001089f,
        0x108e0000108f3,
        0x108f4000108f6,
        0x1090000010916,
        0x109200001093a,
        0x10980000109b8,
        0x109be000109c0,
        0x10a0000010a04,
        0x10a0500010a07,
        0x10a0c00010a14,
        0x10a1500010a18,
        0x10a1900010a36,
        0x10a3800010a3b,
        0x10a3f00010a40,
        0x10a6000010a7d,
        0x10a8000010a9d,
        0x10ac000010ac8,
        0x10ac900010ae7,
        0x10b0000010b36,
        0x10b4000010b56,
        0x10b6000010b73,
        0x10b8000010b92,
        0x10c0000010c49,
        0x10cc000010cf3,
        0x10d0000010d28,
        0x10d3000010d3a,
        0x10e8000010eaa,
        0x10eab00010ead,
        0x10eb000010eb2,
        0x10efd00010f1d,
        0x10f2700010f28,
        0x10f3000010f51,
        0x10f7000010f86,
        0x10fb000010fc5,
        0x10fe000010ff7,
        0x1100000011047,
        0x1106600011076,
        0x1107f000110bb,
        0x110c2000110c3,
        0x110d0000110e9,
        0x110f0000110fa,
        0x1110000011135,
        0x1113600011140,
        0x1114400011148,
        0x1115000011174,
        0x1117600011177,
        0x11180000111c5,
        0x111c9000111cd,
        0x111ce000111db,
        0x111dc000111dd,
        0x1120000011212,
        0x1121300011238,
        0x1123e00011242,
        0x1128000011287,
        0x1128800011289,
        0x1128a0001128e,
        0x1128f0001129e,
        0x1129f000112a9,
        0x112b0000112eb,
        0x112f0000112fa,
        0x1130000011304,
        0x113050001130d,
        0x1130f00011311,
        0x1131300011329,
        0x1132a00011331,
        0x1133200011334,
        0x113350001133a,
        0x1133b00011345,
        0x1134700011349,
        0x1134b0001134e,
        0x1135000011351,
        0x1135700011358,
        0x1135d00011364,
        0x113660001136d,
        0x1137000011375,
        0x114000001144b,
        0x114500001145a,
        0x1145e00011462,
        0x11480000114c6,
        0x114c7000114c8,
        0x114d0000114da,
        0x11580000115b6,
        0x115b8000115c1,
        0x115d8000115de,
        0x1160000011641,
        0x1164400011645,
        0x116500001165a,
        0x11680000116b9,
        0x116c0000116ca,
        0x117000001171b,
        0x1171d0001172c,
        0x117300001173a,
        0x1174000011747,
        0x118000001183b,
        0x118c0000118ea,
        0x118ff00011907,
        0x119090001190a,
        0x1190c00011914,
        0x1191500011917,
        0x1191800011936,
        0x1193700011939,
        0x1193b00011944,
        0x119500001195a,
        0x119a0000119a8,
        0x119aa000119d8,
        0x119da000119e2,
        0x119e3000119e5,
        0x11a0000011a3f,
        0x11a4700011a48,
        0x11a5000011a9a,
        0x11a9d00011a9e,
        0x11ab000011af9,
        0x11c0000011c09,
        0x11c0a00011c37,
        0x11c3800011c41,
        0x11c5000011c5a,
        0x11c7200011c90,
        0x11c9200011ca8,
        0x11ca900011cb7,
        0x11d0000011d07,
        0x11d0800011d0a,
        0x11d0b00011d37,
        0x11d3a00011d3b,
        0x11d3c00011d3e,
        0x11d3f00011d48,
        0x11d5000011d5a,
        0x11d6000011d66,
        0x11d6700011d69,
        0x11d6a00011d8f,
        0x11d9000011d92,
        0x11d9300011d99,
        0x11da000011daa,
        0x11ee000011ef7,
        0x11f0000011f11,
        0x11f1200011f3b,
        0x11f3e00011f43,
        0x11f5000011f5a,
        0x11fb000011fb1,
        0x120000001239a,
        0x1248000012544,
        0x12f9000012ff1,
        0x1300000013430,
        0x1344000013456,
        0x1440000014647,
        0x1680000016a39,
        0x16a4000016a5f,
        0x16a6000016a6a,
        0x16a7000016abf,
        0x16ac000016aca,
        0x16ad000016aee,
        0x16af000016af5,
        0x16b0000016b37,
        0x16b4000016b44,
        0x16b5000016b5a,
        0x16b6300016b78,
        0x16b7d00016b90,
        0x16e6000016e80,
        0x16f0000016f4b,
        0x16f4f00016f88,
        0x16f8f00016fa0,
        0x16fe000016fe2,
        0x16fe300016fe5,
        0x16ff000016ff2,
        0x17000000187f8,
        0x1880000018cd6,
        0x18d0000018d09,
        0x1aff00001aff4,
        0x1aff50001affc,
        0x1affd0001afff,
        0x1b0000001b123,
        0x1b1320001b133,
        0x1b1500001b153,
        0x1b1550001b156,
        0x1b1640001b168,
        0x1b1700001b2fc,
        0x1bc000001bc6b,
        0x1bc700001bc7d,
        0x1bc800001bc89,
        0x1bc900001bc9a,
        0x1bc9d0001bc9f,
        0x1cf000001cf2e,
        0x1cf300001cf47,
        0x1da000001da37,
        0x1da3b0001da6d,
        0x1da750001da76,
        0x1da840001da85,
        0x1da9b0001daa0,
        0x1daa10001dab0,
        0x1df000001df1f,
        0x1df250001df2b,
        0x1e0000001e007,
        0x1e0080001e019,
        0x1e01b0001e022,
        0x1e0230001e025,
        0x1e0260001e02b,
        0x1e0300001e06e,
        0x1e08f0001e090,
        0x1e1000001e12d,
        0x1e1300001e13e,
        0x1e1400001e14a,
        0x1e14e0001e14f,
        0x1e2900001e2af,
        0x1e2c00001e2fa,
        0x1e4d00001e4fa,
        0x1e7e00001e7e7,
        0x1e7e80001e7ec,
        0x1e7ed0001e7ef,
        0x1e7f00001e7ff,
        0x1e8000001e8c5,
        0x1e8d00001e8d7,
        0x1e9220001e94c,
        0x1e9500001e95a,
        0x200000002a6e0,
        0x2a7000002b73a,
        0x2b7400002b81e,
        0x2b8200002cea2,
        0x2ceb00002ebe1,
        0x300000003134b,
        0x31350000323b0,
    ),
    'CONTEXTJ': (
        0x200c0000200e,
    ),
    'CONTEXTO': (
        0xb7000000b8,
        0x37500000376,
        0x5f3000005f5,
        0x6600000066a,
        0x6f0000006fa,
        0x30fb000030fc,
    ),
}
python3.12/site-packages/pip/_vendor/idna/package_data.py000064400000000025151732702360017211 0ustar00__version__ = '3.4'

python3.12/site-packages/pip/_vendor/idna/__init__.py000064400000001521151732702360016366 0ustar00from .package_data import __version__
from .core import (
    IDNABidiError,
    IDNAError,
    InvalidCodepoint,
    InvalidCodepointContext,
    alabel,
    check_bidi,
    check_hyphen_ok,
    check_initial_combiner,
    check_label,
    check_nfc,
    decode,
    encode,
    ulabel,
    uts46_remap,
    valid_contextj,
    valid_contexto,
    valid_label_length,
    valid_string_length,
)
from .intranges import intranges_contain

__all__ = [
    "IDNABidiError",
    "IDNAError",
    "InvalidCodepoint",
    "InvalidCodepointContext",
    "alabel",
    "check_bidi",
    "check_hyphen_ok",
    "check_initial_combiner",
    "check_label",
    "check_nfc",
    "decode",
    "encode",
    "intranges_contain",
    "ulabel",
    "uts46_remap",
    "valid_contextj",
    "valid_contexto",
    "valid_label_length",
    "valid_string_length",
]
python3.12/site-packages/pip/_vendor/idna/codec.py000064400000006456151732702360015720 0ustar00from .core import encode, decode, alabel, ulabel, IDNAError
import codecs
import re
from typing import Tuple, Optional

_unicode_dots_re = re.compile('[\u002e\u3002\uff0e\uff61]')

class Codec(codecs.Codec):

    def encode(self, data: str, errors: str = 'strict') -> Tuple[bytes, int]:
        if errors != 'strict':
            raise IDNAError('Unsupported error handling \"{}\"'.format(errors))

        if not data:
            return b"", 0

        return encode(data), len(data)

    def decode(self, data: bytes, errors: str = 'strict') -> Tuple[str, int]:
        if errors != 'strict':
            raise IDNAError('Unsupported error handling \"{}\"'.format(errors))

        if not data:
            return '', 0

        return decode(data), len(data)

class IncrementalEncoder(codecs.BufferedIncrementalEncoder):
    def _buffer_encode(self, data: str, errors: str, final: bool) -> Tuple[str, int]:  # type: ignore
        if errors != 'strict':
            raise IDNAError('Unsupported error handling \"{}\"'.format(errors))

        if not data:
            return "", 0

        labels = _unicode_dots_re.split(data)
        trailing_dot = ''
        if labels:
            if not labels[-1]:
                trailing_dot = '.'
                del labels[-1]
            elif not final:
                # Keep potentially unfinished label until the next call
                del labels[-1]
                if labels:
                    trailing_dot = '.'

        result = []
        size = 0
        for label in labels:
            result.append(alabel(label))
            if size:
                size += 1
            size += len(label)

        # Join with U+002E
        result_str = '.'.join(result) + trailing_dot  # type: ignore
        size += len(trailing_dot)
        return result_str, size

class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
    def _buffer_decode(self, data: str, errors: str, final: bool) -> Tuple[str, int]:  # type: ignore
        if errors != 'strict':
            raise IDNAError('Unsupported error handling \"{}\"'.format(errors))

        if not data:
            return ('', 0)

        labels = _unicode_dots_re.split(data)
        trailing_dot = ''
        if labels:
            if not labels[-1]:
                trailing_dot = '.'
                del labels[-1]
            elif not final:
                # Keep potentially unfinished label until the next call
                del labels[-1]
                if labels:
                    trailing_dot = '.'

        result = []
        size = 0
        for label in labels:
            result.append(ulabel(label))
            if size:
                size += 1
            size += len(label)

        result_str = '.'.join(result) + trailing_dot
        size += len(trailing_dot)
        return (result_str, size)


class StreamWriter(Codec, codecs.StreamWriter):
    pass


class StreamReader(Codec, codecs.StreamReader):
    pass


def getregentry() -> codecs.CodecInfo:
    # Compatibility as a search_function for codecs.register()
    return codecs.CodecInfo(
        name='idna',
        encode=Codec().encode,  # type: ignore
        decode=Codec().decode,  # type: ignore
        incrementalencoder=IncrementalEncoder,
        incrementaldecoder=IncrementalDecoder,
        streamwriter=StreamWriter,
        streamreader=StreamReader,
    )
python3.12/site-packages/pip/_vendor/idna/py.typed000064400000000000151732702360015743 0ustar00python3.12/site-packages/pip/_vendor/idna/core.py000064400000031226151732702360015564 0ustar00from . import idnadata
import bisect
import unicodedata
import re
from typing import Union, Optional
from .intranges import intranges_contain

_virama_combining_class = 9
_alabel_prefix = b'xn--'
_unicode_dots_re = re.compile('[\u002e\u3002\uff0e\uff61]')

class IDNAError(UnicodeError):
    """ Base exception for all IDNA-encoding related problems """
    pass


class IDNABidiError(IDNAError):
    """ Exception when bidirectional requirements are not satisfied """
    pass


class InvalidCodepoint(IDNAError):
    """ Exception when a disallowed or unallocated codepoint is used """
    pass


class InvalidCodepointContext(IDNAError):
    """ Exception when the codepoint is not valid in the context it is used """
    pass


def _combining_class(cp: int) -> int:
    v = unicodedata.combining(chr(cp))
    if v == 0:
        if not unicodedata.name(chr(cp)):
            raise ValueError('Unknown character in unicodedata')
    return v

def _is_script(cp: str, script: str) -> bool:
    return intranges_contain(ord(cp), idnadata.scripts[script])

def _punycode(s: str) -> bytes:
    return s.encode('punycode')

def _unot(s: int) -> str:
    return 'U+{:04X}'.format(s)


def valid_label_length(label: Union[bytes, str]) -> bool:
    if len(label) > 63:
        return False
    return True


def valid_string_length(label: Union[bytes, str], trailing_dot: bool) -> bool:
    if len(label) > (254 if trailing_dot else 253):
        return False
    return True


def check_bidi(label: str, check_ltr: bool = False) -> bool:
    # Bidi rules should only be applied if string contains RTL characters
    bidi_label = False
    for (idx, cp) in enumerate(label, 1):
        direction = unicodedata.bidirectional(cp)
        if direction == '':
            # String likely comes from a newer version of Unicode
            raise IDNABidiError('Unknown directionality in label {} at position {}'.format(repr(label), idx))
        if direction in ['R', 'AL', 'AN']:
            bidi_label = True
    if not bidi_label and not check_ltr:
        return True

    # Bidi rule 1
    direction = unicodedata.bidirectional(label[0])
    if direction in ['R', 'AL']:
        rtl = True
    elif direction == 'L':
        rtl = False
    else:
        raise IDNABidiError('First codepoint in label {} must be directionality L, R or AL'.format(repr(label)))

    valid_ending = False
    number_type = None  # type: Optional[str]
    for (idx, cp) in enumerate(label, 1):
        direction = unicodedata.bidirectional(cp)

        if rtl:
            # Bidi rule 2
            if not direction in ['R', 'AL', 'AN', 'EN', 'ES', 'CS', 'ET', 'ON', 'BN', 'NSM']:
                raise IDNABidiError('Invalid direction for codepoint at position {} in a right-to-left label'.format(idx))
            # Bidi rule 3
            if direction in ['R', 'AL', 'EN', 'AN']:
                valid_ending = True
            elif direction != 'NSM':
                valid_ending = False
            # Bidi rule 4
            if direction in ['AN', 'EN']:
                if not number_type:
                    number_type = direction
                else:
                    if number_type != direction:
                        raise IDNABidiError('Can not mix numeral types in a right-to-left label')
        else:
            # Bidi rule 5
            if not direction in ['L', 'EN', 'ES', 'CS', 'ET', 'ON', 'BN', 'NSM']:
                raise IDNABidiError('Invalid direction for codepoint at position {} in a left-to-right label'.format(idx))
            # Bidi rule 6
            if direction in ['L', 'EN']:
                valid_ending = True
            elif direction != 'NSM':
                valid_ending = False

    if not valid_ending:
        raise IDNABidiError('Label ends with illegal codepoint directionality')

    return True


def check_initial_combiner(label: str) -> bool:
    if unicodedata.category(label[0])[0] == 'M':
        raise IDNAError('Label begins with an illegal combining character')
    return True


def check_hyphen_ok(label: str) -> bool:
    if label[2:4] == '--':
        raise IDNAError('Label has disallowed hyphens in 3rd and 4th position')
    if label[0] == '-' or label[-1] == '-':
        raise IDNAError('Label must not start or end with a hyphen')
    return True


def check_nfc(label: str) -> None:
    if unicodedata.normalize('NFC', label) != label:
        raise IDNAError('Label must be in Normalization Form C')


def valid_contextj(label: str, pos: int) -> bool:
    cp_value = ord(label[pos])

    if cp_value == 0x200c:

        if pos > 0:
            if _combining_class(ord(label[pos - 1])) == _virama_combining_class:
                return True

        ok = False
        for i in range(pos-1, -1, -1):
            joining_type = idnadata.joining_types.get(ord(label[i]))
            if joining_type == ord('T'):
                continue
            if joining_type in [ord('L'), ord('D')]:
                ok = True
                break

        if not ok:
            return False

        ok = False
        for i in range(pos+1, len(label)):
            joining_type = idnadata.joining_types.get(ord(label[i]))
            if joining_type == ord('T'):
                continue
            if joining_type in [ord('R'), ord('D')]:
                ok = True
                break
        return ok

    if cp_value == 0x200d:

        if pos > 0:
            if _combining_class(ord(label[pos - 1])) == _virama_combining_class:
                return True
        return False

    else:

        return False


def valid_contexto(label: str, pos: int, exception: bool = False) -> bool:
    cp_value = ord(label[pos])

    if cp_value == 0x00b7:
        if 0 < pos < len(label)-1:
            if ord(label[pos - 1]) == 0x006c and ord(label[pos + 1]) == 0x006c:
                return True
        return False

    elif cp_value == 0x0375:
        if pos < len(label)-1 and len(label) > 1:
            return _is_script(label[pos + 1], 'Greek')
        return False

    elif cp_value == 0x05f3 or cp_value == 0x05f4:
        if pos > 0:
            return _is_script(label[pos - 1], 'Hebrew')
        return False

    elif cp_value == 0x30fb:
        for cp in label:
            if cp == '\u30fb':
                continue
            if _is_script(cp, 'Hiragana') or _is_script(cp, 'Katakana') or _is_script(cp, 'Han'):
                return True
        return False

    elif 0x660 <= cp_value <= 0x669:
        for cp in label:
            if 0x6f0 <= ord(cp) <= 0x06f9:
                return False
        return True

    elif 0x6f0 <= cp_value <= 0x6f9:
        for cp in label:
            if 0x660 <= ord(cp) <= 0x0669:
                return False
        return True

    return False


def check_label(label: Union[str, bytes, bytearray]) -> None:
    if isinstance(label, (bytes, bytearray)):
        label = label.decode('utf-8')
    if len(label) == 0:
        raise IDNAError('Empty Label')

    check_nfc(label)
    check_hyphen_ok(label)
    check_initial_combiner(label)

    for (pos, cp) in enumerate(label):
        cp_value = ord(cp)
        if intranges_contain(cp_value, idnadata.codepoint_classes['PVALID']):
            continue
        elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTJ']):
            try:
                if not valid_contextj(label, pos):
                    raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format(
                        _unot(cp_value), pos+1, repr(label)))
            except ValueError:
                raise IDNAError('Unknown codepoint adjacent to joiner {} at position {} in {}'.format(
                    _unot(cp_value), pos+1, repr(label)))
        elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTO']):
            if not valid_contexto(label, pos):
                raise InvalidCodepointContext('Codepoint {} not allowed at position {} in {}'.format(_unot(cp_value), pos+1, repr(label)))
        else:
            raise InvalidCodepoint('Codepoint {} at position {} of {} not allowed'.format(_unot(cp_value), pos+1, repr(label)))

    check_bidi(label)


def alabel(label: str) -> bytes:
    try:
        label_bytes = label.encode('ascii')
        ulabel(label_bytes)
        if not valid_label_length(label_bytes):
            raise IDNAError('Label too long')
        return label_bytes
    except UnicodeEncodeError:
        pass

    if not label:
        raise IDNAError('No Input')

    label = str(label)
    check_label(label)
    label_bytes = _punycode(label)
    label_bytes = _alabel_prefix + label_bytes

    if not valid_label_length(label_bytes):
        raise IDNAError('Label too long')

    return label_bytes


def ulabel(label: Union[str, bytes, bytearray]) -> str:
    if not isinstance(label, (bytes, bytearray)):
        try:
            label_bytes = label.encode('ascii')
        except UnicodeEncodeError:
            check_label(label)
            return label
    else:
        label_bytes = label

    label_bytes = label_bytes.lower()
    if label_bytes.startswith(_alabel_prefix):
        label_bytes = label_bytes[len(_alabel_prefix):]
        if not label_bytes:
            raise IDNAError('Malformed A-label, no Punycode eligible content found')
        if label_bytes.decode('ascii')[-1] == '-':
            raise IDNAError('A-label must not end with a hyphen')
    else:
        check_label(label_bytes)
        return label_bytes.decode('ascii')

    try:
        label = label_bytes.decode('punycode')
    except UnicodeError:
        raise IDNAError('Invalid A-label')
    check_label(label)
    return label


def uts46_remap(domain: str, std3_rules: bool = True, transitional: bool = False) -> str:
    """Re-map the characters in the string according to UTS46 processing."""
    from .uts46data import uts46data
    output = ''

    for pos, char in enumerate(domain):
        code_point = ord(char)
        try:
            uts46row = uts46data[code_point if code_point < 256 else
                bisect.bisect_left(uts46data, (code_point, 'Z')) - 1]
            status = uts46row[1]
            replacement = None  # type: Optional[str]
            if len(uts46row) == 3:
                replacement = uts46row[2]  # type: ignore
            if (status == 'V' or
                    (status == 'D' and not transitional) or
                    (status == '3' and not std3_rules and replacement is None)):
                output += char
            elif replacement is not None and (status == 'M' or
                    (status == '3' and not std3_rules) or
                    (status == 'D' and transitional)):
                output += replacement
            elif status != 'I':
                raise IndexError()
        except IndexError:
            raise InvalidCodepoint(
                'Codepoint {} not allowed at position {} in {}'.format(
                _unot(code_point), pos + 1, repr(domain)))

    return unicodedata.normalize('NFC', output)


def encode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool = False, std3_rules: bool = False, transitional: bool = False) -> bytes:
    if isinstance(s, (bytes, bytearray)):
        try:
            s = s.decode('ascii')
        except UnicodeDecodeError:
            raise IDNAError('should pass a unicode string to the function rather than a byte string.')
    if uts46:
        s = uts46_remap(s, std3_rules, transitional)
    trailing_dot = False
    result = []
    if strict:
        labels = s.split('.')
    else:
        labels = _unicode_dots_re.split(s)
    if not labels or labels == ['']:
        raise IDNAError('Empty domain')
    if labels[-1] == '':
        del labels[-1]
        trailing_dot = True
    for label in labels:
        s = alabel(label)
        if s:
            result.append(s)
        else:
            raise IDNAError('Empty label')
    if trailing_dot:
        result.append(b'')
    s = b'.'.join(result)
    if not valid_string_length(s, trailing_dot):
        raise IDNAError('Domain too long')
    return s


def decode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool = False, std3_rules: bool = False) -> str:
    try:
        if isinstance(s, (bytes, bytearray)):
            s = s.decode('ascii')
    except UnicodeDecodeError:
        raise IDNAError('Invalid ASCII in A-label')
    if uts46:
        s = uts46_remap(s, std3_rules, False)
    trailing_dot = False
    result = []
    if not strict:
        labels = _unicode_dots_re.split(s)
    else:
        labels = s.split('.')
    if not labels or labels == ['']:
        raise IDNAError('Empty domain')
    if not labels[-1]:
        del labels[-1]
        trailing_dot = True
    for label in labels:
        s = ulabel(label)
        if s:
            result.append(s)
        else:
            raise IDNAError('Empty label')
    if trailing_dot:
        result.append('')
    return '.'.join(result)
python3.12/site-packages/pip/_vendor/idna/uts46data.py000064400000623313151732702360016457 0ustar00# This file is automatically generated by tools/idna-data
# vim: set fileencoding=utf-8 :

from typing import List, Tuple, Union


"""IDNA Mapping Table from UTS46."""


__version__ = '15.0.0'
def _seg_0() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x0, '3'),
    (0x1, '3'),
    (0x2, '3'),
    (0x3, '3'),
    (0x4, '3'),
    (0x5, '3'),
    (0x6, '3'),
    (0x7, '3'),
    (0x8, '3'),
    (0x9, '3'),
    (0xA, '3'),
    (0xB, '3'),
    (0xC, '3'),
    (0xD, '3'),
    (0xE, '3'),
    (0xF, '3'),
    (0x10, '3'),
    (0x11, '3'),
    (0x12, '3'),
    (0x13, '3'),
    (0x14, '3'),
    (0x15, '3'),
    (0x16, '3'),
    (0x17, '3'),
    (0x18, '3'),
    (0x19, '3'),
    (0x1A, '3'),
    (0x1B, '3'),
    (0x1C, '3'),
    (0x1D, '3'),
    (0x1E, '3'),
    (0x1F, '3'),
    (0x20, '3'),
    (0x21, '3'),
    (0x22, '3'),
    (0x23, '3'),
    (0x24, '3'),
    (0x25, '3'),
    (0x26, '3'),
    (0x27, '3'),
    (0x28, '3'),
    (0x29, '3'),
    (0x2A, '3'),
    (0x2B, '3'),
    (0x2C, '3'),
    (0x2D, 'V'),
    (0x2E, 'V'),
    (0x2F, '3'),
    (0x30, 'V'),
    (0x31, 'V'),
    (0x32, 'V'),
    (0x33, 'V'),
    (0x34, 'V'),
    (0x35, 'V'),
    (0x36, 'V'),
    (0x37, 'V'),
    (0x38, 'V'),
    (0x39, 'V'),
    (0x3A, '3'),
    (0x3B, '3'),
    (0x3C, '3'),
    (0x3D, '3'),
    (0x3E, '3'),
    (0x3F, '3'),
    (0x40, '3'),
    (0x41, 'M', 'a'),
    (0x42, 'M', 'b'),
    (0x43, 'M', 'c'),
    (0x44, 'M', 'd'),
    (0x45, 'M', 'e'),
    (0x46, 'M', 'f'),
    (0x47, 'M', 'g'),
    (0x48, 'M', 'h'),
    (0x49, 'M', 'i'),
    (0x4A, 'M', 'j'),
    (0x4B, 'M', 'k'),
    (0x4C, 'M', 'l'),
    (0x4D, 'M', 'm'),
    (0x4E, 'M', 'n'),
    (0x4F, 'M', 'o'),
    (0x50, 'M', 'p'),
    (0x51, 'M', 'q'),
    (0x52, 'M', 'r'),
    (0x53, 'M', 's'),
    (0x54, 'M', 't'),
    (0x55, 'M', 'u'),
    (0x56, 'M', 'v'),
    (0x57, 'M', 'w'),
    (0x58, 'M', 'x'),
    (0x59, 'M', 'y'),
    (0x5A, 'M', 'z'),
    (0x5B, '3'),
    (0x5C, '3'),
    (0x5D, '3'),
    (0x5E, '3'),
    (0x5F, '3'),
    (0x60, '3'),
    (0x61, 'V'),
    (0x62, 'V'),
    (0x63, 'V'),
    ]

def _seg_1() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x64, 'V'),
    (0x65, 'V'),
    (0x66, 'V'),
    (0x67, 'V'),
    (0x68, 'V'),
    (0x69, 'V'),
    (0x6A, 'V'),
    (0x6B, 'V'),
    (0x6C, 'V'),
    (0x6D, 'V'),
    (0x6E, 'V'),
    (0x6F, 'V'),
    (0x70, 'V'),
    (0x71, 'V'),
    (0x72, 'V'),
    (0x73, 'V'),
    (0x74, 'V'),
    (0x75, 'V'),
    (0x76, 'V'),
    (0x77, 'V'),
    (0x78, 'V'),
    (0x79, 'V'),
    (0x7A, 'V'),
    (0x7B, '3'),
    (0x7C, '3'),
    (0x7D, '3'),
    (0x7E, '3'),
    (0x7F, '3'),
    (0x80, 'X'),
    (0x81, 'X'),
    (0x82, 'X'),
    (0x83, 'X'),
    (0x84, 'X'),
    (0x85, 'X'),
    (0x86, 'X'),
    (0x87, 'X'),
    (0x88, 'X'),
    (0x89, 'X'),
    (0x8A, 'X'),
    (0x8B, 'X'),
    (0x8C, 'X'),
    (0x8D, 'X'),
    (0x8E, 'X'),
    (0x8F, 'X'),
    (0x90, 'X'),
    (0x91, 'X'),
    (0x92, 'X'),
    (0x93, 'X'),
    (0x94, 'X'),
    (0x95, 'X'),
    (0x96, 'X'),
    (0x97, 'X'),
    (0x98, 'X'),
    (0x99, 'X'),
    (0x9A, 'X'),
    (0x9B, 'X'),
    (0x9C, 'X'),
    (0x9D, 'X'),
    (0x9E, 'X'),
    (0x9F, 'X'),
    (0xA0, '3', ' '),
    (0xA1, 'V'),
    (0xA2, 'V'),
    (0xA3, 'V'),
    (0xA4, 'V'),
    (0xA5, 'V'),
    (0xA6, 'V'),
    (0xA7, 'V'),
    (0xA8, '3', ' ̈'),
    (0xA9, 'V'),
    (0xAA, 'M', 'a'),
    (0xAB, 'V'),
    (0xAC, 'V'),
    (0xAD, 'I'),
    (0xAE, 'V'),
    (0xAF, '3', ' ̄'),
    (0xB0, 'V'),
    (0xB1, 'V'),
    (0xB2, 'M', '2'),
    (0xB3, 'M', '3'),
    (0xB4, '3', ' ́'),
    (0xB5, 'M', 'μ'),
    (0xB6, 'V'),
    (0xB7, 'V'),
    (0xB8, '3', ' ̧'),
    (0xB9, 'M', '1'),
    (0xBA, 'M', 'o'),
    (0xBB, 'V'),
    (0xBC, 'M', '1⁄4'),
    (0xBD, 'M', '1⁄2'),
    (0xBE, 'M', '3⁄4'),
    (0xBF, 'V'),
    (0xC0, 'M', 'à'),
    (0xC1, 'M', 'á'),
    (0xC2, 'M', 'â'),
    (0xC3, 'M', 'ã'),
    (0xC4, 'M', 'ä'),
    (0xC5, 'M', 'å'),
    (0xC6, 'M', 'æ'),
    (0xC7, 'M', 'ç'),
    ]

def _seg_2() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xC8, 'M', 'è'),
    (0xC9, 'M', 'é'),
    (0xCA, 'M', 'ê'),
    (0xCB, 'M', 'ë'),
    (0xCC, 'M', 'ì'),
    (0xCD, 'M', 'í'),
    (0xCE, 'M', 'î'),
    (0xCF, 'M', 'ï'),
    (0xD0, 'M', 'ð'),
    (0xD1, 'M', 'ñ'),
    (0xD2, 'M', 'ò'),
    (0xD3, 'M', 'ó'),
    (0xD4, 'M', 'ô'),
    (0xD5, 'M', 'õ'),
    (0xD6, 'M', 'ö'),
    (0xD7, 'V'),
    (0xD8, 'M', 'ø'),
    (0xD9, 'M', 'ù'),
    (0xDA, 'M', 'ú'),
    (0xDB, 'M', 'û'),
    (0xDC, 'M', 'ü'),
    (0xDD, 'M', 'ý'),
    (0xDE, 'M', 'þ'),
    (0xDF, 'D', 'ss'),
    (0xE0, 'V'),
    (0xE1, 'V'),
    (0xE2, 'V'),
    (0xE3, 'V'),
    (0xE4, 'V'),
    (0xE5, 'V'),
    (0xE6, 'V'),
    (0xE7, 'V'),
    (0xE8, 'V'),
    (0xE9, 'V'),
    (0xEA, 'V'),
    (0xEB, 'V'),
    (0xEC, 'V'),
    (0xED, 'V'),
    (0xEE, 'V'),
    (0xEF, 'V'),
    (0xF0, 'V'),
    (0xF1, 'V'),
    (0xF2, 'V'),
    (0xF3, 'V'),
    (0xF4, 'V'),
    (0xF5, 'V'),
    (0xF6, 'V'),
    (0xF7, 'V'),
    (0xF8, 'V'),
    (0xF9, 'V'),
    (0xFA, 'V'),
    (0xFB, 'V'),
    (0xFC, 'V'),
    (0xFD, 'V'),
    (0xFE, 'V'),
    (0xFF, 'V'),
    (0x100, 'M', 'ā'),
    (0x101, 'V'),
    (0x102, 'M', 'ă'),
    (0x103, 'V'),
    (0x104, 'M', 'ą'),
    (0x105, 'V'),
    (0x106, 'M', 'ć'),
    (0x107, 'V'),
    (0x108, 'M', 'ĉ'),
    (0x109, 'V'),
    (0x10A, 'M', 'ċ'),
    (0x10B, 'V'),
    (0x10C, 'M', 'č'),
    (0x10D, 'V'),
    (0x10E, 'M', 'ď'),
    (0x10F, 'V'),
    (0x110, 'M', 'đ'),
    (0x111, 'V'),
    (0x112, 'M', 'ē'),
    (0x113, 'V'),
    (0x114, 'M', 'ĕ'),
    (0x115, 'V'),
    (0x116, 'M', 'ė'),
    (0x117, 'V'),
    (0x118, 'M', 'ę'),
    (0x119, 'V'),
    (0x11A, 'M', 'ě'),
    (0x11B, 'V'),
    (0x11C, 'M', 'ĝ'),
    (0x11D, 'V'),
    (0x11E, 'M', 'ğ'),
    (0x11F, 'V'),
    (0x120, 'M', 'ġ'),
    (0x121, 'V'),
    (0x122, 'M', 'ģ'),
    (0x123, 'V'),
    (0x124, 'M', 'ĥ'),
    (0x125, 'V'),
    (0x126, 'M', 'ħ'),
    (0x127, 'V'),
    (0x128, 'M', 'ĩ'),
    (0x129, 'V'),
    (0x12A, 'M', 'ī'),
    (0x12B, 'V'),
    ]

def _seg_3() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x12C, 'M', 'ĭ'),
    (0x12D, 'V'),
    (0x12E, 'M', 'į'),
    (0x12F, 'V'),
    (0x130, 'M', 'i̇'),
    (0x131, 'V'),
    (0x132, 'M', 'ij'),
    (0x134, 'M', 'ĵ'),
    (0x135, 'V'),
    (0x136, 'M', 'ķ'),
    (0x137, 'V'),
    (0x139, 'M', 'ĺ'),
    (0x13A, 'V'),
    (0x13B, 'M', 'ļ'),
    (0x13C, 'V'),
    (0x13D, 'M', 'ľ'),
    (0x13E, 'V'),
    (0x13F, 'M', 'l·'),
    (0x141, 'M', 'ł'),
    (0x142, 'V'),
    (0x143, 'M', 'ń'),
    (0x144, 'V'),
    (0x145, 'M', 'ņ'),
    (0x146, 'V'),
    (0x147, 'M', 'ň'),
    (0x148, 'V'),
    (0x149, 'M', 'ʼn'),
    (0x14A, 'M', 'ŋ'),
    (0x14B, 'V'),
    (0x14C, 'M', 'ō'),
    (0x14D, 'V'),
    (0x14E, 'M', 'ŏ'),
    (0x14F, 'V'),
    (0x150, 'M', 'ő'),
    (0x151, 'V'),
    (0x152, 'M', 'œ'),
    (0x153, 'V'),
    (0x154, 'M', 'ŕ'),
    (0x155, 'V'),
    (0x156, 'M', 'ŗ'),
    (0x157, 'V'),
    (0x158, 'M', 'ř'),
    (0x159, 'V'),
    (0x15A, 'M', 'ś'),
    (0x15B, 'V'),
    (0x15C, 'M', 'ŝ'),
    (0x15D, 'V'),
    (0x15E, 'M', 'ş'),
    (0x15F, 'V'),
    (0x160, 'M', 'š'),
    (0x161, 'V'),
    (0x162, 'M', 'ţ'),
    (0x163, 'V'),
    (0x164, 'M', 'ť'),
    (0x165, 'V'),
    (0x166, 'M', 'ŧ'),
    (0x167, 'V'),
    (0x168, 'M', 'ũ'),
    (0x169, 'V'),
    (0x16A, 'M', 'ū'),
    (0x16B, 'V'),
    (0x16C, 'M', 'ŭ'),
    (0x16D, 'V'),
    (0x16E, 'M', 'ů'),
    (0x16F, 'V'),
    (0x170, 'M', 'ű'),
    (0x171, 'V'),
    (0x172, 'M', 'ų'),
    (0x173, 'V'),
    (0x174, 'M', 'ŵ'),
    (0x175, 'V'),
    (0x176, 'M', 'ŷ'),
    (0x177, 'V'),
    (0x178, 'M', 'ÿ'),
    (0x179, 'M', 'ź'),
    (0x17A, 'V'),
    (0x17B, 'M', 'ż'),
    (0x17C, 'V'),
    (0x17D, 'M', 'ž'),
    (0x17E, 'V'),
    (0x17F, 'M', 's'),
    (0x180, 'V'),
    (0x181, 'M', 'ɓ'),
    (0x182, 'M', 'ƃ'),
    (0x183, 'V'),
    (0x184, 'M', 'ƅ'),
    (0x185, 'V'),
    (0x186, 'M', 'ɔ'),
    (0x187, 'M', 'ƈ'),
    (0x188, 'V'),
    (0x189, 'M', 'ɖ'),
    (0x18A, 'M', 'ɗ'),
    (0x18B, 'M', 'ƌ'),
    (0x18C, 'V'),
    (0x18E, 'M', 'ǝ'),
    (0x18F, 'M', 'ə'),
    (0x190, 'M', 'ɛ'),
    (0x191, 'M', 'ƒ'),
    (0x192, 'V'),
    (0x193, 'M', 'ɠ'),
    ]

def _seg_4() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x194, 'M', 'ɣ'),
    (0x195, 'V'),
    (0x196, 'M', 'ɩ'),
    (0x197, 'M', 'ɨ'),
    (0x198, 'M', 'ƙ'),
    (0x199, 'V'),
    (0x19C, 'M', 'ɯ'),
    (0x19D, 'M', 'ɲ'),
    (0x19E, 'V'),
    (0x19F, 'M', 'ɵ'),
    (0x1A0, 'M', 'ơ'),
    (0x1A1, 'V'),
    (0x1A2, 'M', 'ƣ'),
    (0x1A3, 'V'),
    (0x1A4, 'M', 'ƥ'),
    (0x1A5, 'V'),
    (0x1A6, 'M', 'ʀ'),
    (0x1A7, 'M', 'ƨ'),
    (0x1A8, 'V'),
    (0x1A9, 'M', 'ʃ'),
    (0x1AA, 'V'),
    (0x1AC, 'M', 'ƭ'),
    (0x1AD, 'V'),
    (0x1AE, 'M', 'ʈ'),
    (0x1AF, 'M', 'ư'),
    (0x1B0, 'V'),
    (0x1B1, 'M', 'ʊ'),
    (0x1B2, 'M', 'ʋ'),
    (0x1B3, 'M', 'ƴ'),
    (0x1B4, 'V'),
    (0x1B5, 'M', 'ƶ'),
    (0x1B6, 'V'),
    (0x1B7, 'M', 'ʒ'),
    (0x1B8, 'M', 'ƹ'),
    (0x1B9, 'V'),
    (0x1BC, 'M', 'ƽ'),
    (0x1BD, 'V'),
    (0x1C4, 'M', 'dž'),
    (0x1C7, 'M', 'lj'),
    (0x1CA, 'M', 'nj'),
    (0x1CD, 'M', 'ǎ'),
    (0x1CE, 'V'),
    (0x1CF, 'M', 'ǐ'),
    (0x1D0, 'V'),
    (0x1D1, 'M', 'ǒ'),
    (0x1D2, 'V'),
    (0x1D3, 'M', 'ǔ'),
    (0x1D4, 'V'),
    (0x1D5, 'M', 'ǖ'),
    (0x1D6, 'V'),
    (0x1D7, 'M', 'ǘ'),
    (0x1D8, 'V'),
    (0x1D9, 'M', 'ǚ'),
    (0x1DA, 'V'),
    (0x1DB, 'M', 'ǜ'),
    (0x1DC, 'V'),
    (0x1DE, 'M', 'ǟ'),
    (0x1DF, 'V'),
    (0x1E0, 'M', 'ǡ'),
    (0x1E1, 'V'),
    (0x1E2, 'M', 'ǣ'),
    (0x1E3, 'V'),
    (0x1E4, 'M', 'ǥ'),
    (0x1E5, 'V'),
    (0x1E6, 'M', 'ǧ'),
    (0x1E7, 'V'),
    (0x1E8, 'M', 'ǩ'),
    (0x1E9, 'V'),
    (0x1EA, 'M', 'ǫ'),
    (0x1EB, 'V'),
    (0x1EC, 'M', 'ǭ'),
    (0x1ED, 'V'),
    (0x1EE, 'M', 'ǯ'),
    (0x1EF, 'V'),
    (0x1F1, 'M', 'dz'),
    (0x1F4, 'M', 'ǵ'),
    (0x1F5, 'V'),
    (0x1F6, 'M', 'ƕ'),
    (0x1F7, 'M', 'ƿ'),
    (0x1F8, 'M', 'ǹ'),
    (0x1F9, 'V'),
    (0x1FA, 'M', 'ǻ'),
    (0x1FB, 'V'),
    (0x1FC, 'M', 'ǽ'),
    (0x1FD, 'V'),
    (0x1FE, 'M', 'ǿ'),
    (0x1FF, 'V'),
    (0x200, 'M', 'ȁ'),
    (0x201, 'V'),
    (0x202, 'M', 'ȃ'),
    (0x203, 'V'),
    (0x204, 'M', 'ȅ'),
    (0x205, 'V'),
    (0x206, 'M', 'ȇ'),
    (0x207, 'V'),
    (0x208, 'M', 'ȉ'),
    (0x209, 'V'),
    (0x20A, 'M', 'ȋ'),
    (0x20B, 'V'),
    (0x20C, 'M', 'ȍ'),
    ]

def _seg_5() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x20D, 'V'),
    (0x20E, 'M', 'ȏ'),
    (0x20F, 'V'),
    (0x210, 'M', 'ȑ'),
    (0x211, 'V'),
    (0x212, 'M', 'ȓ'),
    (0x213, 'V'),
    (0x214, 'M', 'ȕ'),
    (0x215, 'V'),
    (0x216, 'M', 'ȗ'),
    (0x217, 'V'),
    (0x218, 'M', 'ș'),
    (0x219, 'V'),
    (0x21A, 'M', 'ț'),
    (0x21B, 'V'),
    (0x21C, 'M', 'ȝ'),
    (0x21D, 'V'),
    (0x21E, 'M', 'ȟ'),
    (0x21F, 'V'),
    (0x220, 'M', 'ƞ'),
    (0x221, 'V'),
    (0x222, 'M', 'ȣ'),
    (0x223, 'V'),
    (0x224, 'M', 'ȥ'),
    (0x225, 'V'),
    (0x226, 'M', 'ȧ'),
    (0x227, 'V'),
    (0x228, 'M', 'ȩ'),
    (0x229, 'V'),
    (0x22A, 'M', 'ȫ'),
    (0x22B, 'V'),
    (0x22C, 'M', 'ȭ'),
    (0x22D, 'V'),
    (0x22E, 'M', 'ȯ'),
    (0x22F, 'V'),
    (0x230, 'M', 'ȱ'),
    (0x231, 'V'),
    (0x232, 'M', 'ȳ'),
    (0x233, 'V'),
    (0x23A, 'M', 'ⱥ'),
    (0x23B, 'M', 'ȼ'),
    (0x23C, 'V'),
    (0x23D, 'M', 'ƚ'),
    (0x23E, 'M', 'ⱦ'),
    (0x23F, 'V'),
    (0x241, 'M', 'ɂ'),
    (0x242, 'V'),
    (0x243, 'M', 'ƀ'),
    (0x244, 'M', 'ʉ'),
    (0x245, 'M', 'ʌ'),
    (0x246, 'M', 'ɇ'),
    (0x247, 'V'),
    (0x248, 'M', 'ɉ'),
    (0x249, 'V'),
    (0x24A, 'M', 'ɋ'),
    (0x24B, 'V'),
    (0x24C, 'M', 'ɍ'),
    (0x24D, 'V'),
    (0x24E, 'M', 'ɏ'),
    (0x24F, 'V'),
    (0x2B0, 'M', 'h'),
    (0x2B1, 'M', 'ɦ'),
    (0x2B2, 'M', 'j'),
    (0x2B3, 'M', 'r'),
    (0x2B4, 'M', 'ɹ'),
    (0x2B5, 'M', 'ɻ'),
    (0x2B6, 'M', 'ʁ'),
    (0x2B7, 'M', 'w'),
    (0x2B8, 'M', 'y'),
    (0x2B9, 'V'),
    (0x2D8, '3', ' ̆'),
    (0x2D9, '3', ' ̇'),
    (0x2DA, '3', ' ̊'),
    (0x2DB, '3', ' ̨'),
    (0x2DC, '3', ' ̃'),
    (0x2DD, '3', ' ̋'),
    (0x2DE, 'V'),
    (0x2E0, 'M', 'ɣ'),
    (0x2E1, 'M', 'l'),
    (0x2E2, 'M', 's'),
    (0x2E3, 'M', 'x'),
    (0x2E4, 'M', 'ʕ'),
    (0x2E5, 'V'),
    (0x340, 'M', '̀'),
    (0x341, 'M', '́'),
    (0x342, 'V'),
    (0x343, 'M', '̓'),
    (0x344, 'M', '̈́'),
    (0x345, 'M', 'ι'),
    (0x346, 'V'),
    (0x34F, 'I'),
    (0x350, 'V'),
    (0x370, 'M', 'ͱ'),
    (0x371, 'V'),
    (0x372, 'M', 'ͳ'),
    (0x373, 'V'),
    (0x374, 'M', 'ʹ'),
    (0x375, 'V'),
    (0x376, 'M', 'ͷ'),
    (0x377, 'V'),
    ]

def _seg_6() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x378, 'X'),
    (0x37A, '3', ' ι'),
    (0x37B, 'V'),
    (0x37E, '3', ';'),
    (0x37F, 'M', 'ϳ'),
    (0x380, 'X'),
    (0x384, '3', ' ́'),
    (0x385, '3', ' ̈́'),
    (0x386, 'M', 'ά'),
    (0x387, 'M', '·'),
    (0x388, 'M', 'έ'),
    (0x389, 'M', 'ή'),
    (0x38A, 'M', 'ί'),
    (0x38B, 'X'),
    (0x38C, 'M', 'ό'),
    (0x38D, 'X'),
    (0x38E, 'M', 'ύ'),
    (0x38F, 'M', 'ώ'),
    (0x390, 'V'),
    (0x391, 'M', 'α'),
    (0x392, 'M', 'β'),
    (0x393, 'M', 'γ'),
    (0x394, 'M', 'δ'),
    (0x395, 'M', 'ε'),
    (0x396, 'M', 'ζ'),
    (0x397, 'M', 'η'),
    (0x398, 'M', 'θ'),
    (0x399, 'M', 'ι'),
    (0x39A, 'M', 'κ'),
    (0x39B, 'M', 'λ'),
    (0x39C, 'M', 'μ'),
    (0x39D, 'M', 'ν'),
    (0x39E, 'M', 'ξ'),
    (0x39F, 'M', 'ο'),
    (0x3A0, 'M', 'π'),
    (0x3A1, 'M', 'ρ'),
    (0x3A2, 'X'),
    (0x3A3, 'M', 'σ'),
    (0x3A4, 'M', 'τ'),
    (0x3A5, 'M', 'υ'),
    (0x3A6, 'M', 'φ'),
    (0x3A7, 'M', 'χ'),
    (0x3A8, 'M', 'ψ'),
    (0x3A9, 'M', 'ω'),
    (0x3AA, 'M', 'ϊ'),
    (0x3AB, 'M', 'ϋ'),
    (0x3AC, 'V'),
    (0x3C2, 'D', 'σ'),
    (0x3C3, 'V'),
    (0x3CF, 'M', 'ϗ'),
    (0x3D0, 'M', 'β'),
    (0x3D1, 'M', 'θ'),
    (0x3D2, 'M', 'υ'),
    (0x3D3, 'M', 'ύ'),
    (0x3D4, 'M', 'ϋ'),
    (0x3D5, 'M', 'φ'),
    (0x3D6, 'M', 'π'),
    (0x3D7, 'V'),
    (0x3D8, 'M', 'ϙ'),
    (0x3D9, 'V'),
    (0x3DA, 'M', 'ϛ'),
    (0x3DB, 'V'),
    (0x3DC, 'M', 'ϝ'),
    (0x3DD, 'V'),
    (0x3DE, 'M', 'ϟ'),
    (0x3DF, 'V'),
    (0x3E0, 'M', 'ϡ'),
    (0x3E1, 'V'),
    (0x3E2, 'M', 'ϣ'),
    (0x3E3, 'V'),
    (0x3E4, 'M', 'ϥ'),
    (0x3E5, 'V'),
    (0x3E6, 'M', 'ϧ'),
    (0x3E7, 'V'),
    (0x3E8, 'M', 'ϩ'),
    (0x3E9, 'V'),
    (0x3EA, 'M', 'ϫ'),
    (0x3EB, 'V'),
    (0x3EC, 'M', 'ϭ'),
    (0x3ED, 'V'),
    (0x3EE, 'M', 'ϯ'),
    (0x3EF, 'V'),
    (0x3F0, 'M', 'κ'),
    (0x3F1, 'M', 'ρ'),
    (0x3F2, 'M', 'σ'),
    (0x3F3, 'V'),
    (0x3F4, 'M', 'θ'),
    (0x3F5, 'M', 'ε'),
    (0x3F6, 'V'),
    (0x3F7, 'M', 'ϸ'),
    (0x3F8, 'V'),
    (0x3F9, 'M', 'σ'),
    (0x3FA, 'M', 'ϻ'),
    (0x3FB, 'V'),
    (0x3FD, 'M', 'ͻ'),
    (0x3FE, 'M', 'ͼ'),
    (0x3FF, 'M', 'ͽ'),
    (0x400, 'M', 'ѐ'),
    (0x401, 'M', 'ё'),
    (0x402, 'M', 'ђ'),
    ]

def _seg_7() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x403, 'M', 'ѓ'),
    (0x404, 'M', 'є'),
    (0x405, 'M', 'ѕ'),
    (0x406, 'M', 'і'),
    (0x407, 'M', 'ї'),
    (0x408, 'M', 'ј'),
    (0x409, 'M', 'љ'),
    (0x40A, 'M', 'њ'),
    (0x40B, 'M', 'ћ'),
    (0x40C, 'M', 'ќ'),
    (0x40D, 'M', 'ѝ'),
    (0x40E, 'M', 'ў'),
    (0x40F, 'M', 'џ'),
    (0x410, 'M', 'а'),
    (0x411, 'M', 'б'),
    (0x412, 'M', 'в'),
    (0x413, 'M', 'г'),
    (0x414, 'M', 'д'),
    (0x415, 'M', 'е'),
    (0x416, 'M', 'ж'),
    (0x417, 'M', 'з'),
    (0x418, 'M', 'и'),
    (0x419, 'M', 'й'),
    (0x41A, 'M', 'к'),
    (0x41B, 'M', 'л'),
    (0x41C, 'M', 'м'),
    (0x41D, 'M', 'н'),
    (0x41E, 'M', 'о'),
    (0x41F, 'M', 'п'),
    (0x420, 'M', 'р'),
    (0x421, 'M', 'с'),
    (0x422, 'M', 'т'),
    (0x423, 'M', 'у'),
    (0x424, 'M', 'ф'),
    (0x425, 'M', 'х'),
    (0x426, 'M', 'ц'),
    (0x427, 'M', 'ч'),
    (0x428, 'M', 'ш'),
    (0x429, 'M', 'щ'),
    (0x42A, 'M', 'ъ'),
    (0x42B, 'M', 'ы'),
    (0x42C, 'M', 'ь'),
    (0x42D, 'M', 'э'),
    (0x42E, 'M', 'ю'),
    (0x42F, 'M', 'я'),
    (0x430, 'V'),
    (0x460, 'M', 'ѡ'),
    (0x461, 'V'),
    (0x462, 'M', 'ѣ'),
    (0x463, 'V'),
    (0x464, 'M', 'ѥ'),
    (0x465, 'V'),
    (0x466, 'M', 'ѧ'),
    (0x467, 'V'),
    (0x468, 'M', 'ѩ'),
    (0x469, 'V'),
    (0x46A, 'M', 'ѫ'),
    (0x46B, 'V'),
    (0x46C, 'M', 'ѭ'),
    (0x46D, 'V'),
    (0x46E, 'M', 'ѯ'),
    (0x46F, 'V'),
    (0x470, 'M', 'ѱ'),
    (0x471, 'V'),
    (0x472, 'M', 'ѳ'),
    (0x473, 'V'),
    (0x474, 'M', 'ѵ'),
    (0x475, 'V'),
    (0x476, 'M', 'ѷ'),
    (0x477, 'V'),
    (0x478, 'M', 'ѹ'),
    (0x479, 'V'),
    (0x47A, 'M', 'ѻ'),
    (0x47B, 'V'),
    (0x47C, 'M', 'ѽ'),
    (0x47D, 'V'),
    (0x47E, 'M', 'ѿ'),
    (0x47F, 'V'),
    (0x480, 'M', 'ҁ'),
    (0x481, 'V'),
    (0x48A, 'M', 'ҋ'),
    (0x48B, 'V'),
    (0x48C, 'M', 'ҍ'),
    (0x48D, 'V'),
    (0x48E, 'M', 'ҏ'),
    (0x48F, 'V'),
    (0x490, 'M', 'ґ'),
    (0x491, 'V'),
    (0x492, 'M', 'ғ'),
    (0x493, 'V'),
    (0x494, 'M', 'ҕ'),
    (0x495, 'V'),
    (0x496, 'M', 'җ'),
    (0x497, 'V'),
    (0x498, 'M', 'ҙ'),
    (0x499, 'V'),
    (0x49A, 'M', 'қ'),
    (0x49B, 'V'),
    (0x49C, 'M', 'ҝ'),
    (0x49D, 'V'),
    ]

def _seg_8() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x49E, 'M', 'ҟ'),
    (0x49F, 'V'),
    (0x4A0, 'M', 'ҡ'),
    (0x4A1, 'V'),
    (0x4A2, 'M', 'ң'),
    (0x4A3, 'V'),
    (0x4A4, 'M', 'ҥ'),
    (0x4A5, 'V'),
    (0x4A6, 'M', 'ҧ'),
    (0x4A7, 'V'),
    (0x4A8, 'M', 'ҩ'),
    (0x4A9, 'V'),
    (0x4AA, 'M', 'ҫ'),
    (0x4AB, 'V'),
    (0x4AC, 'M', 'ҭ'),
    (0x4AD, 'V'),
    (0x4AE, 'M', 'ү'),
    (0x4AF, 'V'),
    (0x4B0, 'M', 'ұ'),
    (0x4B1, 'V'),
    (0x4B2, 'M', 'ҳ'),
    (0x4B3, 'V'),
    (0x4B4, 'M', 'ҵ'),
    (0x4B5, 'V'),
    (0x4B6, 'M', 'ҷ'),
    (0x4B7, 'V'),
    (0x4B8, 'M', 'ҹ'),
    (0x4B9, 'V'),
    (0x4BA, 'M', 'һ'),
    (0x4BB, 'V'),
    (0x4BC, 'M', 'ҽ'),
    (0x4BD, 'V'),
    (0x4BE, 'M', 'ҿ'),
    (0x4BF, 'V'),
    (0x4C0, 'X'),
    (0x4C1, 'M', 'ӂ'),
    (0x4C2, 'V'),
    (0x4C3, 'M', 'ӄ'),
    (0x4C4, 'V'),
    (0x4C5, 'M', 'ӆ'),
    (0x4C6, 'V'),
    (0x4C7, 'M', 'ӈ'),
    (0x4C8, 'V'),
    (0x4C9, 'M', 'ӊ'),
    (0x4CA, 'V'),
    (0x4CB, 'M', 'ӌ'),
    (0x4CC, 'V'),
    (0x4CD, 'M', 'ӎ'),
    (0x4CE, 'V'),
    (0x4D0, 'M', 'ӑ'),
    (0x4D1, 'V'),
    (0x4D2, 'M', 'ӓ'),
    (0x4D3, 'V'),
    (0x4D4, 'M', 'ӕ'),
    (0x4D5, 'V'),
    (0x4D6, 'M', 'ӗ'),
    (0x4D7, 'V'),
    (0x4D8, 'M', 'ә'),
    (0x4D9, 'V'),
    (0x4DA, 'M', 'ӛ'),
    (0x4DB, 'V'),
    (0x4DC, 'M', 'ӝ'),
    (0x4DD, 'V'),
    (0x4DE, 'M', 'ӟ'),
    (0x4DF, 'V'),
    (0x4E0, 'M', 'ӡ'),
    (0x4E1, 'V'),
    (0x4E2, 'M', 'ӣ'),
    (0x4E3, 'V'),
    (0x4E4, 'M', 'ӥ'),
    (0x4E5, 'V'),
    (0x4E6, 'M', 'ӧ'),
    (0x4E7, 'V'),
    (0x4E8, 'M', 'ө'),
    (0x4E9, 'V'),
    (0x4EA, 'M', 'ӫ'),
    (0x4EB, 'V'),
    (0x4EC, 'M', 'ӭ'),
    (0x4ED, 'V'),
    (0x4EE, 'M', 'ӯ'),
    (0x4EF, 'V'),
    (0x4F0, 'M', 'ӱ'),
    (0x4F1, 'V'),
    (0x4F2, 'M', 'ӳ'),
    (0x4F3, 'V'),
    (0x4F4, 'M', 'ӵ'),
    (0x4F5, 'V'),
    (0x4F6, 'M', 'ӷ'),
    (0x4F7, 'V'),
    (0x4F8, 'M', 'ӹ'),
    (0x4F9, 'V'),
    (0x4FA, 'M', 'ӻ'),
    (0x4FB, 'V'),
    (0x4FC, 'M', 'ӽ'),
    (0x4FD, 'V'),
    (0x4FE, 'M', 'ӿ'),
    (0x4FF, 'V'),
    (0x500, 'M', 'ԁ'),
    (0x501, 'V'),
    (0x502, 'M', 'ԃ'),
    ]

def _seg_9() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x503, 'V'),
    (0x504, 'M', 'ԅ'),
    (0x505, 'V'),
    (0x506, 'M', 'ԇ'),
    (0x507, 'V'),
    (0x508, 'M', 'ԉ'),
    (0x509, 'V'),
    (0x50A, 'M', 'ԋ'),
    (0x50B, 'V'),
    (0x50C, 'M', 'ԍ'),
    (0x50D, 'V'),
    (0x50E, 'M', 'ԏ'),
    (0x50F, 'V'),
    (0x510, 'M', 'ԑ'),
    (0x511, 'V'),
    (0x512, 'M', 'ԓ'),
    (0x513, 'V'),
    (0x514, 'M', 'ԕ'),
    (0x515, 'V'),
    (0x516, 'M', 'ԗ'),
    (0x517, 'V'),
    (0x518, 'M', 'ԙ'),
    (0x519, 'V'),
    (0x51A, 'M', 'ԛ'),
    (0x51B, 'V'),
    (0x51C, 'M', 'ԝ'),
    (0x51D, 'V'),
    (0x51E, 'M', 'ԟ'),
    (0x51F, 'V'),
    (0x520, 'M', 'ԡ'),
    (0x521, 'V'),
    (0x522, 'M', 'ԣ'),
    (0x523, 'V'),
    (0x524, 'M', 'ԥ'),
    (0x525, 'V'),
    (0x526, 'M', 'ԧ'),
    (0x527, 'V'),
    (0x528, 'M', 'ԩ'),
    (0x529, 'V'),
    (0x52A, 'M', 'ԫ'),
    (0x52B, 'V'),
    (0x52C, 'M', 'ԭ'),
    (0x52D, 'V'),
    (0x52E, 'M', 'ԯ'),
    (0x52F, 'V'),
    (0x530, 'X'),
    (0x531, 'M', 'ա'),
    (0x532, 'M', 'բ'),
    (0x533, 'M', 'գ'),
    (0x534, 'M', 'դ'),
    (0x535, 'M', 'ե'),
    (0x536, 'M', 'զ'),
    (0x537, 'M', 'է'),
    (0x538, 'M', 'ը'),
    (0x539, 'M', 'թ'),
    (0x53A, 'M', 'ժ'),
    (0x53B, 'M', 'ի'),
    (0x53C, 'M', 'լ'),
    (0x53D, 'M', 'խ'),
    (0x53E, 'M', 'ծ'),
    (0x53F, 'M', 'կ'),
    (0x540, 'M', 'հ'),
    (0x541, 'M', 'ձ'),
    (0x542, 'M', 'ղ'),
    (0x543, 'M', 'ճ'),
    (0x544, 'M', 'մ'),
    (0x545, 'M', 'յ'),
    (0x546, 'M', 'ն'),
    (0x547, 'M', 'շ'),
    (0x548, 'M', 'ո'),
    (0x549, 'M', 'չ'),
    (0x54A, 'M', 'պ'),
    (0x54B, 'M', 'ջ'),
    (0x54C, 'M', 'ռ'),
    (0x54D, 'M', 'ս'),
    (0x54E, 'M', 'վ'),
    (0x54F, 'M', 'տ'),
    (0x550, 'M', 'ր'),
    (0x551, 'M', 'ց'),
    (0x552, 'M', 'ւ'),
    (0x553, 'M', 'փ'),
    (0x554, 'M', 'ք'),
    (0x555, 'M', 'օ'),
    (0x556, 'M', 'ֆ'),
    (0x557, 'X'),
    (0x559, 'V'),
    (0x587, 'M', 'եւ'),
    (0x588, 'V'),
    (0x58B, 'X'),
    (0x58D, 'V'),
    (0x590, 'X'),
    (0x591, 'V'),
    (0x5C8, 'X'),
    (0x5D0, 'V'),
    (0x5EB, 'X'),
    (0x5EF, 'V'),
    (0x5F5, 'X'),
    (0x606, 'V'),
    (0x61C, 'X'),
    (0x61D, 'V'),
    ]

def _seg_10() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x675, 'M', 'اٴ'),
    (0x676, 'M', 'وٴ'),
    (0x677, 'M', 'ۇٴ'),
    (0x678, 'M', 'يٴ'),
    (0x679, 'V'),
    (0x6DD, 'X'),
    (0x6DE, 'V'),
    (0x70E, 'X'),
    (0x710, 'V'),
    (0x74B, 'X'),
    (0x74D, 'V'),
    (0x7B2, 'X'),
    (0x7C0, 'V'),
    (0x7FB, 'X'),
    (0x7FD, 'V'),
    (0x82E, 'X'),
    (0x830, 'V'),
    (0x83F, 'X'),
    (0x840, 'V'),
    (0x85C, 'X'),
    (0x85E, 'V'),
    (0x85F, 'X'),
    (0x860, 'V'),
    (0x86B, 'X'),
    (0x870, 'V'),
    (0x88F, 'X'),
    (0x898, 'V'),
    (0x8E2, 'X'),
    (0x8E3, 'V'),
    (0x958, 'M', 'क़'),
    (0x959, 'M', 'ख़'),
    (0x95A, 'M', 'ग़'),
    (0x95B, 'M', 'ज़'),
    (0x95C, 'M', 'ड़'),
    (0x95D, 'M', 'ढ़'),
    (0x95E, 'M', 'फ़'),
    (0x95F, 'M', 'य़'),
    (0x960, 'V'),
    (0x984, 'X'),
    (0x985, 'V'),
    (0x98D, 'X'),
    (0x98F, 'V'),
    (0x991, 'X'),
    (0x993, 'V'),
    (0x9A9, 'X'),
    (0x9AA, 'V'),
    (0x9B1, 'X'),
    (0x9B2, 'V'),
    (0x9B3, 'X'),
    (0x9B6, 'V'),
    (0x9BA, 'X'),
    (0x9BC, 'V'),
    (0x9C5, 'X'),
    (0x9C7, 'V'),
    (0x9C9, 'X'),
    (0x9CB, 'V'),
    (0x9CF, 'X'),
    (0x9D7, 'V'),
    (0x9D8, 'X'),
    (0x9DC, 'M', 'ড়'),
    (0x9DD, 'M', 'ঢ়'),
    (0x9DE, 'X'),
    (0x9DF, 'M', 'য়'),
    (0x9E0, 'V'),
    (0x9E4, 'X'),
    (0x9E6, 'V'),
    (0x9FF, 'X'),
    (0xA01, 'V'),
    (0xA04, 'X'),
    (0xA05, 'V'),
    (0xA0B, 'X'),
    (0xA0F, 'V'),
    (0xA11, 'X'),
    (0xA13, 'V'),
    (0xA29, 'X'),
    (0xA2A, 'V'),
    (0xA31, 'X'),
    (0xA32, 'V'),
    (0xA33, 'M', 'ਲ਼'),
    (0xA34, 'X'),
    (0xA35, 'V'),
    (0xA36, 'M', 'ਸ਼'),
    (0xA37, 'X'),
    (0xA38, 'V'),
    (0xA3A, 'X'),
    (0xA3C, 'V'),
    (0xA3D, 'X'),
    (0xA3E, 'V'),
    (0xA43, 'X'),
    (0xA47, 'V'),
    (0xA49, 'X'),
    (0xA4B, 'V'),
    (0xA4E, 'X'),
    (0xA51, 'V'),
    (0xA52, 'X'),
    (0xA59, 'M', 'ਖ਼'),
    (0xA5A, 'M', 'ਗ਼'),
    (0xA5B, 'M', 'ਜ਼'),
    (0xA5C, 'V'),
    (0xA5D, 'X'),
    ]

def _seg_11() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xA5E, 'M', 'ਫ਼'),
    (0xA5F, 'X'),
    (0xA66, 'V'),
    (0xA77, 'X'),
    (0xA81, 'V'),
    (0xA84, 'X'),
    (0xA85, 'V'),
    (0xA8E, 'X'),
    (0xA8F, 'V'),
    (0xA92, 'X'),
    (0xA93, 'V'),
    (0xAA9, 'X'),
    (0xAAA, 'V'),
    (0xAB1, 'X'),
    (0xAB2, 'V'),
    (0xAB4, 'X'),
    (0xAB5, 'V'),
    (0xABA, 'X'),
    (0xABC, 'V'),
    (0xAC6, 'X'),
    (0xAC7, 'V'),
    (0xACA, 'X'),
    (0xACB, 'V'),
    (0xACE, 'X'),
    (0xAD0, 'V'),
    (0xAD1, 'X'),
    (0xAE0, 'V'),
    (0xAE4, 'X'),
    (0xAE6, 'V'),
    (0xAF2, 'X'),
    (0xAF9, 'V'),
    (0xB00, 'X'),
    (0xB01, 'V'),
    (0xB04, 'X'),
    (0xB05, 'V'),
    (0xB0D, 'X'),
    (0xB0F, 'V'),
    (0xB11, 'X'),
    (0xB13, 'V'),
    (0xB29, 'X'),
    (0xB2A, 'V'),
    (0xB31, 'X'),
    (0xB32, 'V'),
    (0xB34, 'X'),
    (0xB35, 'V'),
    (0xB3A, 'X'),
    (0xB3C, 'V'),
    (0xB45, 'X'),
    (0xB47, 'V'),
    (0xB49, 'X'),
    (0xB4B, 'V'),
    (0xB4E, 'X'),
    (0xB55, 'V'),
    (0xB58, 'X'),
    (0xB5C, 'M', 'ଡ଼'),
    (0xB5D, 'M', 'ଢ଼'),
    (0xB5E, 'X'),
    (0xB5F, 'V'),
    (0xB64, 'X'),
    (0xB66, 'V'),
    (0xB78, 'X'),
    (0xB82, 'V'),
    (0xB84, 'X'),
    (0xB85, 'V'),
    (0xB8B, 'X'),
    (0xB8E, 'V'),
    (0xB91, 'X'),
    (0xB92, 'V'),
    (0xB96, 'X'),
    (0xB99, 'V'),
    (0xB9B, 'X'),
    (0xB9C, 'V'),
    (0xB9D, 'X'),
    (0xB9E, 'V'),
    (0xBA0, 'X'),
    (0xBA3, 'V'),
    (0xBA5, 'X'),
    (0xBA8, 'V'),
    (0xBAB, 'X'),
    (0xBAE, 'V'),
    (0xBBA, 'X'),
    (0xBBE, 'V'),
    (0xBC3, 'X'),
    (0xBC6, 'V'),
    (0xBC9, 'X'),
    (0xBCA, 'V'),
    (0xBCE, 'X'),
    (0xBD0, 'V'),
    (0xBD1, 'X'),
    (0xBD7, 'V'),
    (0xBD8, 'X'),
    (0xBE6, 'V'),
    (0xBFB, 'X'),
    (0xC00, 'V'),
    (0xC0D, 'X'),
    (0xC0E, 'V'),
    (0xC11, 'X'),
    (0xC12, 'V'),
    (0xC29, 'X'),
    (0xC2A, 'V'),
    ]

def _seg_12() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xC3A, 'X'),
    (0xC3C, 'V'),
    (0xC45, 'X'),
    (0xC46, 'V'),
    (0xC49, 'X'),
    (0xC4A, 'V'),
    (0xC4E, 'X'),
    (0xC55, 'V'),
    (0xC57, 'X'),
    (0xC58, 'V'),
    (0xC5B, 'X'),
    (0xC5D, 'V'),
    (0xC5E, 'X'),
    (0xC60, 'V'),
    (0xC64, 'X'),
    (0xC66, 'V'),
    (0xC70, 'X'),
    (0xC77, 'V'),
    (0xC8D, 'X'),
    (0xC8E, 'V'),
    (0xC91, 'X'),
    (0xC92, 'V'),
    (0xCA9, 'X'),
    (0xCAA, 'V'),
    (0xCB4, 'X'),
    (0xCB5, 'V'),
    (0xCBA, 'X'),
    (0xCBC, 'V'),
    (0xCC5, 'X'),
    (0xCC6, 'V'),
    (0xCC9, 'X'),
    (0xCCA, 'V'),
    (0xCCE, 'X'),
    (0xCD5, 'V'),
    (0xCD7, 'X'),
    (0xCDD, 'V'),
    (0xCDF, 'X'),
    (0xCE0, 'V'),
    (0xCE4, 'X'),
    (0xCE6, 'V'),
    (0xCF0, 'X'),
    (0xCF1, 'V'),
    (0xCF4, 'X'),
    (0xD00, 'V'),
    (0xD0D, 'X'),
    (0xD0E, 'V'),
    (0xD11, 'X'),
    (0xD12, 'V'),
    (0xD45, 'X'),
    (0xD46, 'V'),
    (0xD49, 'X'),
    (0xD4A, 'V'),
    (0xD50, 'X'),
    (0xD54, 'V'),
    (0xD64, 'X'),
    (0xD66, 'V'),
    (0xD80, 'X'),
    (0xD81, 'V'),
    (0xD84, 'X'),
    (0xD85, 'V'),
    (0xD97, 'X'),
    (0xD9A, 'V'),
    (0xDB2, 'X'),
    (0xDB3, 'V'),
    (0xDBC, 'X'),
    (0xDBD, 'V'),
    (0xDBE, 'X'),
    (0xDC0, 'V'),
    (0xDC7, 'X'),
    (0xDCA, 'V'),
    (0xDCB, 'X'),
    (0xDCF, 'V'),
    (0xDD5, 'X'),
    (0xDD6, 'V'),
    (0xDD7, 'X'),
    (0xDD8, 'V'),
    (0xDE0, 'X'),
    (0xDE6, 'V'),
    (0xDF0, 'X'),
    (0xDF2, 'V'),
    (0xDF5, 'X'),
    (0xE01, 'V'),
    (0xE33, 'M', 'ํา'),
    (0xE34, 'V'),
    (0xE3B, 'X'),
    (0xE3F, 'V'),
    (0xE5C, 'X'),
    (0xE81, 'V'),
    (0xE83, 'X'),
    (0xE84, 'V'),
    (0xE85, 'X'),
    (0xE86, 'V'),
    (0xE8B, 'X'),
    (0xE8C, 'V'),
    (0xEA4, 'X'),
    (0xEA5, 'V'),
    (0xEA6, 'X'),
    (0xEA7, 'V'),
    (0xEB3, 'M', 'ໍາ'),
    (0xEB4, 'V'),
    ]

def _seg_13() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xEBE, 'X'),
    (0xEC0, 'V'),
    (0xEC5, 'X'),
    (0xEC6, 'V'),
    (0xEC7, 'X'),
    (0xEC8, 'V'),
    (0xECF, 'X'),
    (0xED0, 'V'),
    (0xEDA, 'X'),
    (0xEDC, 'M', 'ຫນ'),
    (0xEDD, 'M', 'ຫມ'),
    (0xEDE, 'V'),
    (0xEE0, 'X'),
    (0xF00, 'V'),
    (0xF0C, 'M', '་'),
    (0xF0D, 'V'),
    (0xF43, 'M', 'གྷ'),
    (0xF44, 'V'),
    (0xF48, 'X'),
    (0xF49, 'V'),
    (0xF4D, 'M', 'ཌྷ'),
    (0xF4E, 'V'),
    (0xF52, 'M', 'དྷ'),
    (0xF53, 'V'),
    (0xF57, 'M', 'བྷ'),
    (0xF58, 'V'),
    (0xF5C, 'M', 'ཛྷ'),
    (0xF5D, 'V'),
    (0xF69, 'M', 'ཀྵ'),
    (0xF6A, 'V'),
    (0xF6D, 'X'),
    (0xF71, 'V'),
    (0xF73, 'M', 'ཱི'),
    (0xF74, 'V'),
    (0xF75, 'M', 'ཱུ'),
    (0xF76, 'M', 'ྲྀ'),
    (0xF77, 'M', 'ྲཱྀ'),
    (0xF78, 'M', 'ླྀ'),
    (0xF79, 'M', 'ླཱྀ'),
    (0xF7A, 'V'),
    (0xF81, 'M', 'ཱྀ'),
    (0xF82, 'V'),
    (0xF93, 'M', 'ྒྷ'),
    (0xF94, 'V'),
    (0xF98, 'X'),
    (0xF99, 'V'),
    (0xF9D, 'M', 'ྜྷ'),
    (0xF9E, 'V'),
    (0xFA2, 'M', 'ྡྷ'),
    (0xFA3, 'V'),
    (0xFA7, 'M', 'ྦྷ'),
    (0xFA8, 'V'),
    (0xFAC, 'M', 'ྫྷ'),
    (0xFAD, 'V'),
    (0xFB9, 'M', 'ྐྵ'),
    (0xFBA, 'V'),
    (0xFBD, 'X'),
    (0xFBE, 'V'),
    (0xFCD, 'X'),
    (0xFCE, 'V'),
    (0xFDB, 'X'),
    (0x1000, 'V'),
    (0x10A0, 'X'),
    (0x10C7, 'M', 'ⴧ'),
    (0x10C8, 'X'),
    (0x10CD, 'M', 'ⴭ'),
    (0x10CE, 'X'),
    (0x10D0, 'V'),
    (0x10FC, 'M', 'ნ'),
    (0x10FD, 'V'),
    (0x115F, 'X'),
    (0x1161, 'V'),
    (0x1249, 'X'),
    (0x124A, 'V'),
    (0x124E, 'X'),
    (0x1250, 'V'),
    (0x1257, 'X'),
    (0x1258, 'V'),
    (0x1259, 'X'),
    (0x125A, 'V'),
    (0x125E, 'X'),
    (0x1260, 'V'),
    (0x1289, 'X'),
    (0x128A, 'V'),
    (0x128E, 'X'),
    (0x1290, 'V'),
    (0x12B1, 'X'),
    (0x12B2, 'V'),
    (0x12B6, 'X'),
    (0x12B8, 'V'),
    (0x12BF, 'X'),
    (0x12C0, 'V'),
    (0x12C1, 'X'),
    (0x12C2, 'V'),
    (0x12C6, 'X'),
    (0x12C8, 'V'),
    (0x12D7, 'X'),
    (0x12D8, 'V'),
    (0x1311, 'X'),
    (0x1312, 'V'),
    ]

def _seg_14() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1316, 'X'),
    (0x1318, 'V'),
    (0x135B, 'X'),
    (0x135D, 'V'),
    (0x137D, 'X'),
    (0x1380, 'V'),
    (0x139A, 'X'),
    (0x13A0, 'V'),
    (0x13F6, 'X'),
    (0x13F8, 'M', 'Ᏸ'),
    (0x13F9, 'M', 'Ᏹ'),
    (0x13FA, 'M', 'Ᏺ'),
    (0x13FB, 'M', 'Ᏻ'),
    (0x13FC, 'M', 'Ᏼ'),
    (0x13FD, 'M', 'Ᏽ'),
    (0x13FE, 'X'),
    (0x1400, 'V'),
    (0x1680, 'X'),
    (0x1681, 'V'),
    (0x169D, 'X'),
    (0x16A0, 'V'),
    (0x16F9, 'X'),
    (0x1700, 'V'),
    (0x1716, 'X'),
    (0x171F, 'V'),
    (0x1737, 'X'),
    (0x1740, 'V'),
    (0x1754, 'X'),
    (0x1760, 'V'),
    (0x176D, 'X'),
    (0x176E, 'V'),
    (0x1771, 'X'),
    (0x1772, 'V'),
    (0x1774, 'X'),
    (0x1780, 'V'),
    (0x17B4, 'X'),
    (0x17B6, 'V'),
    (0x17DE, 'X'),
    (0x17E0, 'V'),
    (0x17EA, 'X'),
    (0x17F0, 'V'),
    (0x17FA, 'X'),
    (0x1800, 'V'),
    (0x1806, 'X'),
    (0x1807, 'V'),
    (0x180B, 'I'),
    (0x180E, 'X'),
    (0x180F, 'I'),
    (0x1810, 'V'),
    (0x181A, 'X'),
    (0x1820, 'V'),
    (0x1879, 'X'),
    (0x1880, 'V'),
    (0x18AB, 'X'),
    (0x18B0, 'V'),
    (0x18F6, 'X'),
    (0x1900, 'V'),
    (0x191F, 'X'),
    (0x1920, 'V'),
    (0x192C, 'X'),
    (0x1930, 'V'),
    (0x193C, 'X'),
    (0x1940, 'V'),
    (0x1941, 'X'),
    (0x1944, 'V'),
    (0x196E, 'X'),
    (0x1970, 'V'),
    (0x1975, 'X'),
    (0x1980, 'V'),
    (0x19AC, 'X'),
    (0x19B0, 'V'),
    (0x19CA, 'X'),
    (0x19D0, 'V'),
    (0x19DB, 'X'),
    (0x19DE, 'V'),
    (0x1A1C, 'X'),
    (0x1A1E, 'V'),
    (0x1A5F, 'X'),
    (0x1A60, 'V'),
    (0x1A7D, 'X'),
    (0x1A7F, 'V'),
    (0x1A8A, 'X'),
    (0x1A90, 'V'),
    (0x1A9A, 'X'),
    (0x1AA0, 'V'),
    (0x1AAE, 'X'),
    (0x1AB0, 'V'),
    (0x1ACF, 'X'),
    (0x1B00, 'V'),
    (0x1B4D, 'X'),
    (0x1B50, 'V'),
    (0x1B7F, 'X'),
    (0x1B80, 'V'),
    (0x1BF4, 'X'),
    (0x1BFC, 'V'),
    (0x1C38, 'X'),
    (0x1C3B, 'V'),
    (0x1C4A, 'X'),
    (0x1C4D, 'V'),
    (0x1C80, 'M', 'в'),
    ]

def _seg_15() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1C81, 'M', 'д'),
    (0x1C82, 'M', 'о'),
    (0x1C83, 'M', 'с'),
    (0x1C84, 'M', 'т'),
    (0x1C86, 'M', 'ъ'),
    (0x1C87, 'M', 'ѣ'),
    (0x1C88, 'M', 'ꙋ'),
    (0x1C89, 'X'),
    (0x1C90, 'M', 'ა'),
    (0x1C91, 'M', 'ბ'),
    (0x1C92, 'M', 'გ'),
    (0x1C93, 'M', 'დ'),
    (0x1C94, 'M', 'ე'),
    (0x1C95, 'M', 'ვ'),
    (0x1C96, 'M', 'ზ'),
    (0x1C97, 'M', 'თ'),
    (0x1C98, 'M', 'ი'),
    (0x1C99, 'M', 'კ'),
    (0x1C9A, 'M', 'ლ'),
    (0x1C9B, 'M', 'მ'),
    (0x1C9C, 'M', 'ნ'),
    (0x1C9D, 'M', 'ო'),
    (0x1C9E, 'M', 'პ'),
    (0x1C9F, 'M', 'ჟ'),
    (0x1CA0, 'M', 'რ'),
    (0x1CA1, 'M', 'ს'),
    (0x1CA2, 'M', 'ტ'),
    (0x1CA3, 'M', 'უ'),
    (0x1CA4, 'M', 'ფ'),
    (0x1CA5, 'M', 'ქ'),
    (0x1CA6, 'M', 'ღ'),
    (0x1CA7, 'M', 'ყ'),
    (0x1CA8, 'M', 'შ'),
    (0x1CA9, 'M', 'ჩ'),
    (0x1CAA, 'M', 'ც'),
    (0x1CAB, 'M', 'ძ'),
    (0x1CAC, 'M', 'წ'),
    (0x1CAD, 'M', 'ჭ'),
    (0x1CAE, 'M', 'ხ'),
    (0x1CAF, 'M', 'ჯ'),
    (0x1CB0, 'M', 'ჰ'),
    (0x1CB1, 'M', 'ჱ'),
    (0x1CB2, 'M', 'ჲ'),
    (0x1CB3, 'M', 'ჳ'),
    (0x1CB4, 'M', 'ჴ'),
    (0x1CB5, 'M', 'ჵ'),
    (0x1CB6, 'M', 'ჶ'),
    (0x1CB7, 'M', 'ჷ'),
    (0x1CB8, 'M', 'ჸ'),
    (0x1CB9, 'M', 'ჹ'),
    (0x1CBA, 'M', 'ჺ'),
    (0x1CBB, 'X'),
    (0x1CBD, 'M', 'ჽ'),
    (0x1CBE, 'M', 'ჾ'),
    (0x1CBF, 'M', 'ჿ'),
    (0x1CC0, 'V'),
    (0x1CC8, 'X'),
    (0x1CD0, 'V'),
    (0x1CFB, 'X'),
    (0x1D00, 'V'),
    (0x1D2C, 'M', 'a'),
    (0x1D2D, 'M', 'æ'),
    (0x1D2E, 'M', 'b'),
    (0x1D2F, 'V'),
    (0x1D30, 'M', 'd'),
    (0x1D31, 'M', 'e'),
    (0x1D32, 'M', 'ǝ'),
    (0x1D33, 'M', 'g'),
    (0x1D34, 'M', 'h'),
    (0x1D35, 'M', 'i'),
    (0x1D36, 'M', 'j'),
    (0x1D37, 'M', 'k'),
    (0x1D38, 'M', 'l'),
    (0x1D39, 'M', 'm'),
    (0x1D3A, 'M', 'n'),
    (0x1D3B, 'V'),
    (0x1D3C, 'M', 'o'),
    (0x1D3D, 'M', 'ȣ'),
    (0x1D3E, 'M', 'p'),
    (0x1D3F, 'M', 'r'),
    (0x1D40, 'M', 't'),
    (0x1D41, 'M', 'u'),
    (0x1D42, 'M', 'w'),
    (0x1D43, 'M', 'a'),
    (0x1D44, 'M', 'ɐ'),
    (0x1D45, 'M', 'ɑ'),
    (0x1D46, 'M', 'ᴂ'),
    (0x1D47, 'M', 'b'),
    (0x1D48, 'M', 'd'),
    (0x1D49, 'M', 'e'),
    (0x1D4A, 'M', 'ə'),
    (0x1D4B, 'M', 'ɛ'),
    (0x1D4C, 'M', 'ɜ'),
    (0x1D4D, 'M', 'g'),
    (0x1D4E, 'V'),
    (0x1D4F, 'M', 'k'),
    (0x1D50, 'M', 'm'),
    (0x1D51, 'M', 'ŋ'),
    (0x1D52, 'M', 'o'),
    (0x1D53, 'M', 'ɔ'),
    ]

def _seg_16() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D54, 'M', 'ᴖ'),
    (0x1D55, 'M', 'ᴗ'),
    (0x1D56, 'M', 'p'),
    (0x1D57, 'M', 't'),
    (0x1D58, 'M', 'u'),
    (0x1D59, 'M', 'ᴝ'),
    (0x1D5A, 'M', 'ɯ'),
    (0x1D5B, 'M', 'v'),
    (0x1D5C, 'M', 'ᴥ'),
    (0x1D5D, 'M', 'β'),
    (0x1D5E, 'M', 'γ'),
    (0x1D5F, 'M', 'δ'),
    (0x1D60, 'M', 'φ'),
    (0x1D61, 'M', 'χ'),
    (0x1D62, 'M', 'i'),
    (0x1D63, 'M', 'r'),
    (0x1D64, 'M', 'u'),
    (0x1D65, 'M', 'v'),
    (0x1D66, 'M', 'β'),
    (0x1D67, 'M', 'γ'),
    (0x1D68, 'M', 'ρ'),
    (0x1D69, 'M', 'φ'),
    (0x1D6A, 'M', 'χ'),
    (0x1D6B, 'V'),
    (0x1D78, 'M', 'н'),
    (0x1D79, 'V'),
    (0x1D9B, 'M', 'ɒ'),
    (0x1D9C, 'M', 'c'),
    (0x1D9D, 'M', 'ɕ'),
    (0x1D9E, 'M', 'ð'),
    (0x1D9F, 'M', 'ɜ'),
    (0x1DA0, 'M', 'f'),
    (0x1DA1, 'M', 'ɟ'),
    (0x1DA2, 'M', 'ɡ'),
    (0x1DA3, 'M', 'ɥ'),
    (0x1DA4, 'M', 'ɨ'),
    (0x1DA5, 'M', 'ɩ'),
    (0x1DA6, 'M', 'ɪ'),
    (0x1DA7, 'M', 'ᵻ'),
    (0x1DA8, 'M', 'ʝ'),
    (0x1DA9, 'M', 'ɭ'),
    (0x1DAA, 'M', 'ᶅ'),
    (0x1DAB, 'M', 'ʟ'),
    (0x1DAC, 'M', 'ɱ'),
    (0x1DAD, 'M', 'ɰ'),
    (0x1DAE, 'M', 'ɲ'),
    (0x1DAF, 'M', 'ɳ'),
    (0x1DB0, 'M', 'ɴ'),
    (0x1DB1, 'M', 'ɵ'),
    (0x1DB2, 'M', 'ɸ'),
    (0x1DB3, 'M', 'ʂ'),
    (0x1DB4, 'M', 'ʃ'),
    (0x1DB5, 'M', 'ƫ'),
    (0x1DB6, 'M', 'ʉ'),
    (0x1DB7, 'M', 'ʊ'),
    (0x1DB8, 'M', 'ᴜ'),
    (0x1DB9, 'M', 'ʋ'),
    (0x1DBA, 'M', 'ʌ'),
    (0x1DBB, 'M', 'z'),
    (0x1DBC, 'M', 'ʐ'),
    (0x1DBD, 'M', 'ʑ'),
    (0x1DBE, 'M', 'ʒ'),
    (0x1DBF, 'M', 'θ'),
    (0x1DC0, 'V'),
    (0x1E00, 'M', 'ḁ'),
    (0x1E01, 'V'),
    (0x1E02, 'M', 'ḃ'),
    (0x1E03, 'V'),
    (0x1E04, 'M', 'ḅ'),
    (0x1E05, 'V'),
    (0x1E06, 'M', 'ḇ'),
    (0x1E07, 'V'),
    (0x1E08, 'M', 'ḉ'),
    (0x1E09, 'V'),
    (0x1E0A, 'M', 'ḋ'),
    (0x1E0B, 'V'),
    (0x1E0C, 'M', 'ḍ'),
    (0x1E0D, 'V'),
    (0x1E0E, 'M', 'ḏ'),
    (0x1E0F, 'V'),
    (0x1E10, 'M', 'ḑ'),
    (0x1E11, 'V'),
    (0x1E12, 'M', 'ḓ'),
    (0x1E13, 'V'),
    (0x1E14, 'M', 'ḕ'),
    (0x1E15, 'V'),
    (0x1E16, 'M', 'ḗ'),
    (0x1E17, 'V'),
    (0x1E18, 'M', 'ḙ'),
    (0x1E19, 'V'),
    (0x1E1A, 'M', 'ḛ'),
    (0x1E1B, 'V'),
    (0x1E1C, 'M', 'ḝ'),
    (0x1E1D, 'V'),
    (0x1E1E, 'M', 'ḟ'),
    (0x1E1F, 'V'),
    (0x1E20, 'M', 'ḡ'),
    (0x1E21, 'V'),
    (0x1E22, 'M', 'ḣ'),
    (0x1E23, 'V'),
    ]

def _seg_17() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1E24, 'M', 'ḥ'),
    (0x1E25, 'V'),
    (0x1E26, 'M', 'ḧ'),
    (0x1E27, 'V'),
    (0x1E28, 'M', 'ḩ'),
    (0x1E29, 'V'),
    (0x1E2A, 'M', 'ḫ'),
    (0x1E2B, 'V'),
    (0x1E2C, 'M', 'ḭ'),
    (0x1E2D, 'V'),
    (0x1E2E, 'M', 'ḯ'),
    (0x1E2F, 'V'),
    (0x1E30, 'M', 'ḱ'),
    (0x1E31, 'V'),
    (0x1E32, 'M', 'ḳ'),
    (0x1E33, 'V'),
    (0x1E34, 'M', 'ḵ'),
    (0x1E35, 'V'),
    (0x1E36, 'M', 'ḷ'),
    (0x1E37, 'V'),
    (0x1E38, 'M', 'ḹ'),
    (0x1E39, 'V'),
    (0x1E3A, 'M', 'ḻ'),
    (0x1E3B, 'V'),
    (0x1E3C, 'M', 'ḽ'),
    (0x1E3D, 'V'),
    (0x1E3E, 'M', 'ḿ'),
    (0x1E3F, 'V'),
    (0x1E40, 'M', 'ṁ'),
    (0x1E41, 'V'),
    (0x1E42, 'M', 'ṃ'),
    (0x1E43, 'V'),
    (0x1E44, 'M', 'ṅ'),
    (0x1E45, 'V'),
    (0x1E46, 'M', 'ṇ'),
    (0x1E47, 'V'),
    (0x1E48, 'M', 'ṉ'),
    (0x1E49, 'V'),
    (0x1E4A, 'M', 'ṋ'),
    (0x1E4B, 'V'),
    (0x1E4C, 'M', 'ṍ'),
    (0x1E4D, 'V'),
    (0x1E4E, 'M', 'ṏ'),
    (0x1E4F, 'V'),
    (0x1E50, 'M', 'ṑ'),
    (0x1E51, 'V'),
    (0x1E52, 'M', 'ṓ'),
    (0x1E53, 'V'),
    (0x1E54, 'M', 'ṕ'),
    (0x1E55, 'V'),
    (0x1E56, 'M', 'ṗ'),
    (0x1E57, 'V'),
    (0x1E58, 'M', 'ṙ'),
    (0x1E59, 'V'),
    (0x1E5A, 'M', 'ṛ'),
    (0x1E5B, 'V'),
    (0x1E5C, 'M', 'ṝ'),
    (0x1E5D, 'V'),
    (0x1E5E, 'M', 'ṟ'),
    (0x1E5F, 'V'),
    (0x1E60, 'M', 'ṡ'),
    (0x1E61, 'V'),
    (0x1E62, 'M', 'ṣ'),
    (0x1E63, 'V'),
    (0x1E64, 'M', 'ṥ'),
    (0x1E65, 'V'),
    (0x1E66, 'M', 'ṧ'),
    (0x1E67, 'V'),
    (0x1E68, 'M', 'ṩ'),
    (0x1E69, 'V'),
    (0x1E6A, 'M', 'ṫ'),
    (0x1E6B, 'V'),
    (0x1E6C, 'M', 'ṭ'),
    (0x1E6D, 'V'),
    (0x1E6E, 'M', 'ṯ'),
    (0x1E6F, 'V'),
    (0x1E70, 'M', 'ṱ'),
    (0x1E71, 'V'),
    (0x1E72, 'M', 'ṳ'),
    (0x1E73, 'V'),
    (0x1E74, 'M', 'ṵ'),
    (0x1E75, 'V'),
    (0x1E76, 'M', 'ṷ'),
    (0x1E77, 'V'),
    (0x1E78, 'M', 'ṹ'),
    (0x1E79, 'V'),
    (0x1E7A, 'M', 'ṻ'),
    (0x1E7B, 'V'),
    (0x1E7C, 'M', 'ṽ'),
    (0x1E7D, 'V'),
    (0x1E7E, 'M', 'ṿ'),
    (0x1E7F, 'V'),
    (0x1E80, 'M', 'ẁ'),
    (0x1E81, 'V'),
    (0x1E82, 'M', 'ẃ'),
    (0x1E83, 'V'),
    (0x1E84, 'M', 'ẅ'),
    (0x1E85, 'V'),
    (0x1E86, 'M', 'ẇ'),
    (0x1E87, 'V'),
    ]

def _seg_18() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1E88, 'M', 'ẉ'),
    (0x1E89, 'V'),
    (0x1E8A, 'M', 'ẋ'),
    (0x1E8B, 'V'),
    (0x1E8C, 'M', 'ẍ'),
    (0x1E8D, 'V'),
    (0x1E8E, 'M', 'ẏ'),
    (0x1E8F, 'V'),
    (0x1E90, 'M', 'ẑ'),
    (0x1E91, 'V'),
    (0x1E92, 'M', 'ẓ'),
    (0x1E93, 'V'),
    (0x1E94, 'M', 'ẕ'),
    (0x1E95, 'V'),
    (0x1E9A, 'M', 'aʾ'),
    (0x1E9B, 'M', 'ṡ'),
    (0x1E9C, 'V'),
    (0x1E9E, 'M', 'ss'),
    (0x1E9F, 'V'),
    (0x1EA0, 'M', 'ạ'),
    (0x1EA1, 'V'),
    (0x1EA2, 'M', 'ả'),
    (0x1EA3, 'V'),
    (0x1EA4, 'M', 'ấ'),
    (0x1EA5, 'V'),
    (0x1EA6, 'M', 'ầ'),
    (0x1EA7, 'V'),
    (0x1EA8, 'M', 'ẩ'),
    (0x1EA9, 'V'),
    (0x1EAA, 'M', 'ẫ'),
    (0x1EAB, 'V'),
    (0x1EAC, 'M', 'ậ'),
    (0x1EAD, 'V'),
    (0x1EAE, 'M', 'ắ'),
    (0x1EAF, 'V'),
    (0x1EB0, 'M', 'ằ'),
    (0x1EB1, 'V'),
    (0x1EB2, 'M', 'ẳ'),
    (0x1EB3, 'V'),
    (0x1EB4, 'M', 'ẵ'),
    (0x1EB5, 'V'),
    (0x1EB6, 'M', 'ặ'),
    (0x1EB7, 'V'),
    (0x1EB8, 'M', 'ẹ'),
    (0x1EB9, 'V'),
    (0x1EBA, 'M', 'ẻ'),
    (0x1EBB, 'V'),
    (0x1EBC, 'M', 'ẽ'),
    (0x1EBD, 'V'),
    (0x1EBE, 'M', 'ế'),
    (0x1EBF, 'V'),
    (0x1EC0, 'M', 'ề'),
    (0x1EC1, 'V'),
    (0x1EC2, 'M', 'ể'),
    (0x1EC3, 'V'),
    (0x1EC4, 'M', 'ễ'),
    (0x1EC5, 'V'),
    (0x1EC6, 'M', 'ệ'),
    (0x1EC7, 'V'),
    (0x1EC8, 'M', 'ỉ'),
    (0x1EC9, 'V'),
    (0x1ECA, 'M', 'ị'),
    (0x1ECB, 'V'),
    (0x1ECC, 'M', 'ọ'),
    (0x1ECD, 'V'),
    (0x1ECE, 'M', 'ỏ'),
    (0x1ECF, 'V'),
    (0x1ED0, 'M', 'ố'),
    (0x1ED1, 'V'),
    (0x1ED2, 'M', 'ồ'),
    (0x1ED3, 'V'),
    (0x1ED4, 'M', 'ổ'),
    (0x1ED5, 'V'),
    (0x1ED6, 'M', 'ỗ'),
    (0x1ED7, 'V'),
    (0x1ED8, 'M', 'ộ'),
    (0x1ED9, 'V'),
    (0x1EDA, 'M', 'ớ'),
    (0x1EDB, 'V'),
    (0x1EDC, 'M', 'ờ'),
    (0x1EDD, 'V'),
    (0x1EDE, 'M', 'ở'),
    (0x1EDF, 'V'),
    (0x1EE0, 'M', 'ỡ'),
    (0x1EE1, 'V'),
    (0x1EE2, 'M', 'ợ'),
    (0x1EE3, 'V'),
    (0x1EE4, 'M', 'ụ'),
    (0x1EE5, 'V'),
    (0x1EE6, 'M', 'ủ'),
    (0x1EE7, 'V'),
    (0x1EE8, 'M', 'ứ'),
    (0x1EE9, 'V'),
    (0x1EEA, 'M', 'ừ'),
    (0x1EEB, 'V'),
    (0x1EEC, 'M', 'ử'),
    (0x1EED, 'V'),
    (0x1EEE, 'M', 'ữ'),
    (0x1EEF, 'V'),
    (0x1EF0, 'M', 'ự'),
    ]

def _seg_19() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1EF1, 'V'),
    (0x1EF2, 'M', 'ỳ'),
    (0x1EF3, 'V'),
    (0x1EF4, 'M', 'ỵ'),
    (0x1EF5, 'V'),
    (0x1EF6, 'M', 'ỷ'),
    (0x1EF7, 'V'),
    (0x1EF8, 'M', 'ỹ'),
    (0x1EF9, 'V'),
    (0x1EFA, 'M', 'ỻ'),
    (0x1EFB, 'V'),
    (0x1EFC, 'M', 'ỽ'),
    (0x1EFD, 'V'),
    (0x1EFE, 'M', 'ỿ'),
    (0x1EFF, 'V'),
    (0x1F08, 'M', 'ἀ'),
    (0x1F09, 'M', 'ἁ'),
    (0x1F0A, 'M', 'ἂ'),
    (0x1F0B, 'M', 'ἃ'),
    (0x1F0C, 'M', 'ἄ'),
    (0x1F0D, 'M', 'ἅ'),
    (0x1F0E, 'M', 'ἆ'),
    (0x1F0F, 'M', 'ἇ'),
    (0x1F10, 'V'),
    (0x1F16, 'X'),
    (0x1F18, 'M', 'ἐ'),
    (0x1F19, 'M', 'ἑ'),
    (0x1F1A, 'M', 'ἒ'),
    (0x1F1B, 'M', 'ἓ'),
    (0x1F1C, 'M', 'ἔ'),
    (0x1F1D, 'M', 'ἕ'),
    (0x1F1E, 'X'),
    (0x1F20, 'V'),
    (0x1F28, 'M', 'ἠ'),
    (0x1F29, 'M', 'ἡ'),
    (0x1F2A, 'M', 'ἢ'),
    (0x1F2B, 'M', 'ἣ'),
    (0x1F2C, 'M', 'ἤ'),
    (0x1F2D, 'M', 'ἥ'),
    (0x1F2E, 'M', 'ἦ'),
    (0x1F2F, 'M', 'ἧ'),
    (0x1F30, 'V'),
    (0x1F38, 'M', 'ἰ'),
    (0x1F39, 'M', 'ἱ'),
    (0x1F3A, 'M', 'ἲ'),
    (0x1F3B, 'M', 'ἳ'),
    (0x1F3C, 'M', 'ἴ'),
    (0x1F3D, 'M', 'ἵ'),
    (0x1F3E, 'M', 'ἶ'),
    (0x1F3F, 'M', 'ἷ'),
    (0x1F40, 'V'),
    (0x1F46, 'X'),
    (0x1F48, 'M', 'ὀ'),
    (0x1F49, 'M', 'ὁ'),
    (0x1F4A, 'M', 'ὂ'),
    (0x1F4B, 'M', 'ὃ'),
    (0x1F4C, 'M', 'ὄ'),
    (0x1F4D, 'M', 'ὅ'),
    (0x1F4E, 'X'),
    (0x1F50, 'V'),
    (0x1F58, 'X'),
    (0x1F59, 'M', 'ὑ'),
    (0x1F5A, 'X'),
    (0x1F5B, 'M', 'ὓ'),
    (0x1F5C, 'X'),
    (0x1F5D, 'M', 'ὕ'),
    (0x1F5E, 'X'),
    (0x1F5F, 'M', 'ὗ'),
    (0x1F60, 'V'),
    (0x1F68, 'M', 'ὠ'),
    (0x1F69, 'M', 'ὡ'),
    (0x1F6A, 'M', 'ὢ'),
    (0x1F6B, 'M', 'ὣ'),
    (0x1F6C, 'M', 'ὤ'),
    (0x1F6D, 'M', 'ὥ'),
    (0x1F6E, 'M', 'ὦ'),
    (0x1F6F, 'M', 'ὧ'),
    (0x1F70, 'V'),
    (0x1F71, 'M', 'ά'),
    (0x1F72, 'V'),
    (0x1F73, 'M', 'έ'),
    (0x1F74, 'V'),
    (0x1F75, 'M', 'ή'),
    (0x1F76, 'V'),
    (0x1F77, 'M', 'ί'),
    (0x1F78, 'V'),
    (0x1F79, 'M', 'ό'),
    (0x1F7A, 'V'),
    (0x1F7B, 'M', 'ύ'),
    (0x1F7C, 'V'),
    (0x1F7D, 'M', 'ώ'),
    (0x1F7E, 'X'),
    (0x1F80, 'M', 'ἀι'),
    (0x1F81, 'M', 'ἁι'),
    (0x1F82, 'M', 'ἂι'),
    (0x1F83, 'M', 'ἃι'),
    (0x1F84, 'M', 'ἄι'),
    (0x1F85, 'M', 'ἅι'),
    (0x1F86, 'M', 'ἆι'),
    (0x1F87, 'M', 'ἇι'),
    ]

def _seg_20() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1F88, 'M', 'ἀι'),
    (0x1F89, 'M', 'ἁι'),
    (0x1F8A, 'M', 'ἂι'),
    (0x1F8B, 'M', 'ἃι'),
    (0x1F8C, 'M', 'ἄι'),
    (0x1F8D, 'M', 'ἅι'),
    (0x1F8E, 'M', 'ἆι'),
    (0x1F8F, 'M', 'ἇι'),
    (0x1F90, 'M', 'ἠι'),
    (0x1F91, 'M', 'ἡι'),
    (0x1F92, 'M', 'ἢι'),
    (0x1F93, 'M', 'ἣι'),
    (0x1F94, 'M', 'ἤι'),
    (0x1F95, 'M', 'ἥι'),
    (0x1F96, 'M', 'ἦι'),
    (0x1F97, 'M', 'ἧι'),
    (0x1F98, 'M', 'ἠι'),
    (0x1F99, 'M', 'ἡι'),
    (0x1F9A, 'M', 'ἢι'),
    (0x1F9B, 'M', 'ἣι'),
    (0x1F9C, 'M', 'ἤι'),
    (0x1F9D, 'M', 'ἥι'),
    (0x1F9E, 'M', 'ἦι'),
    (0x1F9F, 'M', 'ἧι'),
    (0x1FA0, 'M', 'ὠι'),
    (0x1FA1, 'M', 'ὡι'),
    (0x1FA2, 'M', 'ὢι'),
    (0x1FA3, 'M', 'ὣι'),
    (0x1FA4, 'M', 'ὤι'),
    (0x1FA5, 'M', 'ὥι'),
    (0x1FA6, 'M', 'ὦι'),
    (0x1FA7, 'M', 'ὧι'),
    (0x1FA8, 'M', 'ὠι'),
    (0x1FA9, 'M', 'ὡι'),
    (0x1FAA, 'M', 'ὢι'),
    (0x1FAB, 'M', 'ὣι'),
    (0x1FAC, 'M', 'ὤι'),
    (0x1FAD, 'M', 'ὥι'),
    (0x1FAE, 'M', 'ὦι'),
    (0x1FAF, 'M', 'ὧι'),
    (0x1FB0, 'V'),
    (0x1FB2, 'M', 'ὰι'),
    (0x1FB3, 'M', 'αι'),
    (0x1FB4, 'M', 'άι'),
    (0x1FB5, 'X'),
    (0x1FB6, 'V'),
    (0x1FB7, 'M', 'ᾶι'),
    (0x1FB8, 'M', 'ᾰ'),
    (0x1FB9, 'M', 'ᾱ'),
    (0x1FBA, 'M', 'ὰ'),
    (0x1FBB, 'M', 'ά'),
    (0x1FBC, 'M', 'αι'),
    (0x1FBD, '3', ' ̓'),
    (0x1FBE, 'M', 'ι'),
    (0x1FBF, '3', ' ̓'),
    (0x1FC0, '3', ' ͂'),
    (0x1FC1, '3', ' ̈͂'),
    (0x1FC2, 'M', 'ὴι'),
    (0x1FC3, 'M', 'ηι'),
    (0x1FC4, 'M', 'ήι'),
    (0x1FC5, 'X'),
    (0x1FC6, 'V'),
    (0x1FC7, 'M', 'ῆι'),
    (0x1FC8, 'M', 'ὲ'),
    (0x1FC9, 'M', 'έ'),
    (0x1FCA, 'M', 'ὴ'),
    (0x1FCB, 'M', 'ή'),
    (0x1FCC, 'M', 'ηι'),
    (0x1FCD, '3', ' ̓̀'),
    (0x1FCE, '3', ' ̓́'),
    (0x1FCF, '3', ' ̓͂'),
    (0x1FD0, 'V'),
    (0x1FD3, 'M', 'ΐ'),
    (0x1FD4, 'X'),
    (0x1FD6, 'V'),
    (0x1FD8, 'M', 'ῐ'),
    (0x1FD9, 'M', 'ῑ'),
    (0x1FDA, 'M', 'ὶ'),
    (0x1FDB, 'M', 'ί'),
    (0x1FDC, 'X'),
    (0x1FDD, '3', ' ̔̀'),
    (0x1FDE, '3', ' ̔́'),
    (0x1FDF, '3', ' ̔͂'),
    (0x1FE0, 'V'),
    (0x1FE3, 'M', 'ΰ'),
    (0x1FE4, 'V'),
    (0x1FE8, 'M', 'ῠ'),
    (0x1FE9, 'M', 'ῡ'),
    (0x1FEA, 'M', 'ὺ'),
    (0x1FEB, 'M', 'ύ'),
    (0x1FEC, 'M', 'ῥ'),
    (0x1FED, '3', ' ̈̀'),
    (0x1FEE, '3', ' ̈́'),
    (0x1FEF, '3', '`'),
    (0x1FF0, 'X'),
    (0x1FF2, 'M', 'ὼι'),
    (0x1FF3, 'M', 'ωι'),
    (0x1FF4, 'M', 'ώι'),
    (0x1FF5, 'X'),
    (0x1FF6, 'V'),
    ]

def _seg_21() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1FF7, 'M', 'ῶι'),
    (0x1FF8, 'M', 'ὸ'),
    (0x1FF9, 'M', 'ό'),
    (0x1FFA, 'M', 'ὼ'),
    (0x1FFB, 'M', 'ώ'),
    (0x1FFC, 'M', 'ωι'),
    (0x1FFD, '3', ' ́'),
    (0x1FFE, '3', ' ̔'),
    (0x1FFF, 'X'),
    (0x2000, '3', ' '),
    (0x200B, 'I'),
    (0x200C, 'D', ''),
    (0x200E, 'X'),
    (0x2010, 'V'),
    (0x2011, 'M', '‐'),
    (0x2012, 'V'),
    (0x2017, '3', ' ̳'),
    (0x2018, 'V'),
    (0x2024, 'X'),
    (0x2027, 'V'),
    (0x2028, 'X'),
    (0x202F, '3', ' '),
    (0x2030, 'V'),
    (0x2033, 'M', '′′'),
    (0x2034, 'M', '′′′'),
    (0x2035, 'V'),
    (0x2036, 'M', '‵‵'),
    (0x2037, 'M', '‵‵‵'),
    (0x2038, 'V'),
    (0x203C, '3', '!!'),
    (0x203D, 'V'),
    (0x203E, '3', ' ̅'),
    (0x203F, 'V'),
    (0x2047, '3', '??'),
    (0x2048, '3', '?!'),
    (0x2049, '3', '!?'),
    (0x204A, 'V'),
    (0x2057, 'M', '′′′′'),
    (0x2058, 'V'),
    (0x205F, '3', ' '),
    (0x2060, 'I'),
    (0x2061, 'X'),
    (0x2064, 'I'),
    (0x2065, 'X'),
    (0x2070, 'M', '0'),
    (0x2071, 'M', 'i'),
    (0x2072, 'X'),
    (0x2074, 'M', '4'),
    (0x2075, 'M', '5'),
    (0x2076, 'M', '6'),
    (0x2077, 'M', '7'),
    (0x2078, 'M', '8'),
    (0x2079, 'M', '9'),
    (0x207A, '3', '+'),
    (0x207B, 'M', '−'),
    (0x207C, '3', '='),
    (0x207D, '3', '('),
    (0x207E, '3', ')'),
    (0x207F, 'M', 'n'),
    (0x2080, 'M', '0'),
    (0x2081, 'M', '1'),
    (0x2082, 'M', '2'),
    (0x2083, 'M', '3'),
    (0x2084, 'M', '4'),
    (0x2085, 'M', '5'),
    (0x2086, 'M', '6'),
    (0x2087, 'M', '7'),
    (0x2088, 'M', '8'),
    (0x2089, 'M', '9'),
    (0x208A, '3', '+'),
    (0x208B, 'M', '−'),
    (0x208C, '3', '='),
    (0x208D, '3', '('),
    (0x208E, '3', ')'),
    (0x208F, 'X'),
    (0x2090, 'M', 'a'),
    (0x2091, 'M', 'e'),
    (0x2092, 'M', 'o'),
    (0x2093, 'M', 'x'),
    (0x2094, 'M', 'ə'),
    (0x2095, 'M', 'h'),
    (0x2096, 'M', 'k'),
    (0x2097, 'M', 'l'),
    (0x2098, 'M', 'm'),
    (0x2099, 'M', 'n'),
    (0x209A, 'M', 'p'),
    (0x209B, 'M', 's'),
    (0x209C, 'M', 't'),
    (0x209D, 'X'),
    (0x20A0, 'V'),
    (0x20A8, 'M', 'rs'),
    (0x20A9, 'V'),
    (0x20C1, 'X'),
    (0x20D0, 'V'),
    (0x20F1, 'X'),
    (0x2100, '3', 'a/c'),
    (0x2101, '3', 'a/s'),
    (0x2102, 'M', 'c'),
    (0x2103, 'M', '°c'),
    (0x2104, 'V'),
    ]

def _seg_22() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2105, '3', 'c/o'),
    (0x2106, '3', 'c/u'),
    (0x2107, 'M', 'ɛ'),
    (0x2108, 'V'),
    (0x2109, 'M', '°f'),
    (0x210A, 'M', 'g'),
    (0x210B, 'M', 'h'),
    (0x210F, 'M', 'ħ'),
    (0x2110, 'M', 'i'),
    (0x2112, 'M', 'l'),
    (0x2114, 'V'),
    (0x2115, 'M', 'n'),
    (0x2116, 'M', 'no'),
    (0x2117, 'V'),
    (0x2119, 'M', 'p'),
    (0x211A, 'M', 'q'),
    (0x211B, 'M', 'r'),
    (0x211E, 'V'),
    (0x2120, 'M', 'sm'),
    (0x2121, 'M', 'tel'),
    (0x2122, 'M', 'tm'),
    (0x2123, 'V'),
    (0x2124, 'M', 'z'),
    (0x2125, 'V'),
    (0x2126, 'M', 'ω'),
    (0x2127, 'V'),
    (0x2128, 'M', 'z'),
    (0x2129, 'V'),
    (0x212A, 'M', 'k'),
    (0x212B, 'M', 'å'),
    (0x212C, 'M', 'b'),
    (0x212D, 'M', 'c'),
    (0x212E, 'V'),
    (0x212F, 'M', 'e'),
    (0x2131, 'M', 'f'),
    (0x2132, 'X'),
    (0x2133, 'M', 'm'),
    (0x2134, 'M', 'o'),
    (0x2135, 'M', 'א'),
    (0x2136, 'M', 'ב'),
    (0x2137, 'M', 'ג'),
    (0x2138, 'M', 'ד'),
    (0x2139, 'M', 'i'),
    (0x213A, 'V'),
    (0x213B, 'M', 'fax'),
    (0x213C, 'M', 'π'),
    (0x213D, 'M', 'γ'),
    (0x213F, 'M', 'π'),
    (0x2140, 'M', '∑'),
    (0x2141, 'V'),
    (0x2145, 'M', 'd'),
    (0x2147, 'M', 'e'),
    (0x2148, 'M', 'i'),
    (0x2149, 'M', 'j'),
    (0x214A, 'V'),
    (0x2150, 'M', '1⁄7'),
    (0x2151, 'M', '1⁄9'),
    (0x2152, 'M', '1⁄10'),
    (0x2153, 'M', '1⁄3'),
    (0x2154, 'M', '2⁄3'),
    (0x2155, 'M', '1⁄5'),
    (0x2156, 'M', '2⁄5'),
    (0x2157, 'M', '3⁄5'),
    (0x2158, 'M', '4⁄5'),
    (0x2159, 'M', '1⁄6'),
    (0x215A, 'M', '5⁄6'),
    (0x215B, 'M', '1⁄8'),
    (0x215C, 'M', '3⁄8'),
    (0x215D, 'M', '5⁄8'),
    (0x215E, 'M', '7⁄8'),
    (0x215F, 'M', '1⁄'),
    (0x2160, 'M', 'i'),
    (0x2161, 'M', 'ii'),
    (0x2162, 'M', 'iii'),
    (0x2163, 'M', 'iv'),
    (0x2164, 'M', 'v'),
    (0x2165, 'M', 'vi'),
    (0x2166, 'M', 'vii'),
    (0x2167, 'M', 'viii'),
    (0x2168, 'M', 'ix'),
    (0x2169, 'M', 'x'),
    (0x216A, 'M', 'xi'),
    (0x216B, 'M', 'xii'),
    (0x216C, 'M', 'l'),
    (0x216D, 'M', 'c'),
    (0x216E, 'M', 'd'),
    (0x216F, 'M', 'm'),
    (0x2170, 'M', 'i'),
    (0x2171, 'M', 'ii'),
    (0x2172, 'M', 'iii'),
    (0x2173, 'M', 'iv'),
    (0x2174, 'M', 'v'),
    (0x2175, 'M', 'vi'),
    (0x2176, 'M', 'vii'),
    (0x2177, 'M', 'viii'),
    (0x2178, 'M', 'ix'),
    (0x2179, 'M', 'x'),
    (0x217A, 'M', 'xi'),
    (0x217B, 'M', 'xii'),
    (0x217C, 'M', 'l'),
    ]

def _seg_23() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x217D, 'M', 'c'),
    (0x217E, 'M', 'd'),
    (0x217F, 'M', 'm'),
    (0x2180, 'V'),
    (0x2183, 'X'),
    (0x2184, 'V'),
    (0x2189, 'M', '0⁄3'),
    (0x218A, 'V'),
    (0x218C, 'X'),
    (0x2190, 'V'),
    (0x222C, 'M', '∫∫'),
    (0x222D, 'M', '∫∫∫'),
    (0x222E, 'V'),
    (0x222F, 'M', '∮∮'),
    (0x2230, 'M', '∮∮∮'),
    (0x2231, 'V'),
    (0x2260, '3'),
    (0x2261, 'V'),
    (0x226E, '3'),
    (0x2270, 'V'),
    (0x2329, 'M', '〈'),
    (0x232A, 'M', '〉'),
    (0x232B, 'V'),
    (0x2427, 'X'),
    (0x2440, 'V'),
    (0x244B, 'X'),
    (0x2460, 'M', '1'),
    (0x2461, 'M', '2'),
    (0x2462, 'M', '3'),
    (0x2463, 'M', '4'),
    (0x2464, 'M', '5'),
    (0x2465, 'M', '6'),
    (0x2466, 'M', '7'),
    (0x2467, 'M', '8'),
    (0x2468, 'M', '9'),
    (0x2469, 'M', '10'),
    (0x246A, 'M', '11'),
    (0x246B, 'M', '12'),
    (0x246C, 'M', '13'),
    (0x246D, 'M', '14'),
    (0x246E, 'M', '15'),
    (0x246F, 'M', '16'),
    (0x2470, 'M', '17'),
    (0x2471, 'M', '18'),
    (0x2472, 'M', '19'),
    (0x2473, 'M', '20'),
    (0x2474, '3', '(1)'),
    (0x2475, '3', '(2)'),
    (0x2476, '3', '(3)'),
    (0x2477, '3', '(4)'),
    (0x2478, '3', '(5)'),
    (0x2479, '3', '(6)'),
    (0x247A, '3', '(7)'),
    (0x247B, '3', '(8)'),
    (0x247C, '3', '(9)'),
    (0x247D, '3', '(10)'),
    (0x247E, '3', '(11)'),
    (0x247F, '3', '(12)'),
    (0x2480, '3', '(13)'),
    (0x2481, '3', '(14)'),
    (0x2482, '3', '(15)'),
    (0x2483, '3', '(16)'),
    (0x2484, '3', '(17)'),
    (0x2485, '3', '(18)'),
    (0x2486, '3', '(19)'),
    (0x2487, '3', '(20)'),
    (0x2488, 'X'),
    (0x249C, '3', '(a)'),
    (0x249D, '3', '(b)'),
    (0x249E, '3', '(c)'),
    (0x249F, '3', '(d)'),
    (0x24A0, '3', '(e)'),
    (0x24A1, '3', '(f)'),
    (0x24A2, '3', '(g)'),
    (0x24A3, '3', '(h)'),
    (0x24A4, '3', '(i)'),
    (0x24A5, '3', '(j)'),
    (0x24A6, '3', '(k)'),
    (0x24A7, '3', '(l)'),
    (0x24A8, '3', '(m)'),
    (0x24A9, '3', '(n)'),
    (0x24AA, '3', '(o)'),
    (0x24AB, '3', '(p)'),
    (0x24AC, '3', '(q)'),
    (0x24AD, '3', '(r)'),
    (0x24AE, '3', '(s)'),
    (0x24AF, '3', '(t)'),
    (0x24B0, '3', '(u)'),
    (0x24B1, '3', '(v)'),
    (0x24B2, '3', '(w)'),
    (0x24B3, '3', '(x)'),
    (0x24B4, '3', '(y)'),
    (0x24B5, '3', '(z)'),
    (0x24B6, 'M', 'a'),
    (0x24B7, 'M', 'b'),
    (0x24B8, 'M', 'c'),
    (0x24B9, 'M', 'd'),
    (0x24BA, 'M', 'e'),
    (0x24BB, 'M', 'f'),
    (0x24BC, 'M', 'g'),
    ]

def _seg_24() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x24BD, 'M', 'h'),
    (0x24BE, 'M', 'i'),
    (0x24BF, 'M', 'j'),
    (0x24C0, 'M', 'k'),
    (0x24C1, 'M', 'l'),
    (0x24C2, 'M', 'm'),
    (0x24C3, 'M', 'n'),
    (0x24C4, 'M', 'o'),
    (0x24C5, 'M', 'p'),
    (0x24C6, 'M', 'q'),
    (0x24C7, 'M', 'r'),
    (0x24C8, 'M', 's'),
    (0x24C9, 'M', 't'),
    (0x24CA, 'M', 'u'),
    (0x24CB, 'M', 'v'),
    (0x24CC, 'M', 'w'),
    (0x24CD, 'M', 'x'),
    (0x24CE, 'M', 'y'),
    (0x24CF, 'M', 'z'),
    (0x24D0, 'M', 'a'),
    (0x24D1, 'M', 'b'),
    (0x24D2, 'M', 'c'),
    (0x24D3, 'M', 'd'),
    (0x24D4, 'M', 'e'),
    (0x24D5, 'M', 'f'),
    (0x24D6, 'M', 'g'),
    (0x24D7, 'M', 'h'),
    (0x24D8, 'M', 'i'),
    (0x24D9, 'M', 'j'),
    (0x24DA, 'M', 'k'),
    (0x24DB, 'M', 'l'),
    (0x24DC, 'M', 'm'),
    (0x24DD, 'M', 'n'),
    (0x24DE, 'M', 'o'),
    (0x24DF, 'M', 'p'),
    (0x24E0, 'M', 'q'),
    (0x24E1, 'M', 'r'),
    (0x24E2, 'M', 's'),
    (0x24E3, 'M', 't'),
    (0x24E4, 'M', 'u'),
    (0x24E5, 'M', 'v'),
    (0x24E6, 'M', 'w'),
    (0x24E7, 'M', 'x'),
    (0x24E8, 'M', 'y'),
    (0x24E9, 'M', 'z'),
    (0x24EA, 'M', '0'),
    (0x24EB, 'V'),
    (0x2A0C, 'M', '∫∫∫∫'),
    (0x2A0D, 'V'),
    (0x2A74, '3', '::='),
    (0x2A75, '3', '=='),
    (0x2A76, '3', '==='),
    (0x2A77, 'V'),
    (0x2ADC, 'M', '⫝̸'),
    (0x2ADD, 'V'),
    (0x2B74, 'X'),
    (0x2B76, 'V'),
    (0x2B96, 'X'),
    (0x2B97, 'V'),
    (0x2C00, 'M', 'ⰰ'),
    (0x2C01, 'M', 'ⰱ'),
    (0x2C02, 'M', 'ⰲ'),
    (0x2C03, 'M', 'ⰳ'),
    (0x2C04, 'M', 'ⰴ'),
    (0x2C05, 'M', 'ⰵ'),
    (0x2C06, 'M', 'ⰶ'),
    (0x2C07, 'M', 'ⰷ'),
    (0x2C08, 'M', 'ⰸ'),
    (0x2C09, 'M', 'ⰹ'),
    (0x2C0A, 'M', 'ⰺ'),
    (0x2C0B, 'M', 'ⰻ'),
    (0x2C0C, 'M', 'ⰼ'),
    (0x2C0D, 'M', 'ⰽ'),
    (0x2C0E, 'M', 'ⰾ'),
    (0x2C0F, 'M', 'ⰿ'),
    (0x2C10, 'M', 'ⱀ'),
    (0x2C11, 'M', 'ⱁ'),
    (0x2C12, 'M', 'ⱂ'),
    (0x2C13, 'M', 'ⱃ'),
    (0x2C14, 'M', 'ⱄ'),
    (0x2C15, 'M', 'ⱅ'),
    (0x2C16, 'M', 'ⱆ'),
    (0x2C17, 'M', 'ⱇ'),
    (0x2C18, 'M', 'ⱈ'),
    (0x2C19, 'M', 'ⱉ'),
    (0x2C1A, 'M', 'ⱊ'),
    (0x2C1B, 'M', 'ⱋ'),
    (0x2C1C, 'M', 'ⱌ'),
    (0x2C1D, 'M', 'ⱍ'),
    (0x2C1E, 'M', 'ⱎ'),
    (0x2C1F, 'M', 'ⱏ'),
    (0x2C20, 'M', 'ⱐ'),
    (0x2C21, 'M', 'ⱑ'),
    (0x2C22, 'M', 'ⱒ'),
    (0x2C23, 'M', 'ⱓ'),
    (0x2C24, 'M', 'ⱔ'),
    (0x2C25, 'M', 'ⱕ'),
    (0x2C26, 'M', 'ⱖ'),
    (0x2C27, 'M', 'ⱗ'),
    (0x2C28, 'M', 'ⱘ'),
    ]

def _seg_25() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2C29, 'M', 'ⱙ'),
    (0x2C2A, 'M', 'ⱚ'),
    (0x2C2B, 'M', 'ⱛ'),
    (0x2C2C, 'M', 'ⱜ'),
    (0x2C2D, 'M', 'ⱝ'),
    (0x2C2E, 'M', 'ⱞ'),
    (0x2C2F, 'M', 'ⱟ'),
    (0x2C30, 'V'),
    (0x2C60, 'M', 'ⱡ'),
    (0x2C61, 'V'),
    (0x2C62, 'M', 'ɫ'),
    (0x2C63, 'M', 'ᵽ'),
    (0x2C64, 'M', 'ɽ'),
    (0x2C65, 'V'),
    (0x2C67, 'M', 'ⱨ'),
    (0x2C68, 'V'),
    (0x2C69, 'M', 'ⱪ'),
    (0x2C6A, 'V'),
    (0x2C6B, 'M', 'ⱬ'),
    (0x2C6C, 'V'),
    (0x2C6D, 'M', 'ɑ'),
    (0x2C6E, 'M', 'ɱ'),
    (0x2C6F, 'M', 'ɐ'),
    (0x2C70, 'M', 'ɒ'),
    (0x2C71, 'V'),
    (0x2C72, 'M', 'ⱳ'),
    (0x2C73, 'V'),
    (0x2C75, 'M', 'ⱶ'),
    (0x2C76, 'V'),
    (0x2C7C, 'M', 'j'),
    (0x2C7D, 'M', 'v'),
    (0x2C7E, 'M', 'ȿ'),
    (0x2C7F, 'M', 'ɀ'),
    (0x2C80, 'M', 'ⲁ'),
    (0x2C81, 'V'),
    (0x2C82, 'M', 'ⲃ'),
    (0x2C83, 'V'),
    (0x2C84, 'M', 'ⲅ'),
    (0x2C85, 'V'),
    (0x2C86, 'M', 'ⲇ'),
    (0x2C87, 'V'),
    (0x2C88, 'M', 'ⲉ'),
    (0x2C89, 'V'),
    (0x2C8A, 'M', 'ⲋ'),
    (0x2C8B, 'V'),
    (0x2C8C, 'M', 'ⲍ'),
    (0x2C8D, 'V'),
    (0x2C8E, 'M', 'ⲏ'),
    (0x2C8F, 'V'),
    (0x2C90, 'M', 'ⲑ'),
    (0x2C91, 'V'),
    (0x2C92, 'M', 'ⲓ'),
    (0x2C93, 'V'),
    (0x2C94, 'M', 'ⲕ'),
    (0x2C95, 'V'),
    (0x2C96, 'M', 'ⲗ'),
    (0x2C97, 'V'),
    (0x2C98, 'M', 'ⲙ'),
    (0x2C99, 'V'),
    (0x2C9A, 'M', 'ⲛ'),
    (0x2C9B, 'V'),
    (0x2C9C, 'M', 'ⲝ'),
    (0x2C9D, 'V'),
    (0x2C9E, 'M', 'ⲟ'),
    (0x2C9F, 'V'),
    (0x2CA0, 'M', 'ⲡ'),
    (0x2CA1, 'V'),
    (0x2CA2, 'M', 'ⲣ'),
    (0x2CA3, 'V'),
    (0x2CA4, 'M', 'ⲥ'),
    (0x2CA5, 'V'),
    (0x2CA6, 'M', 'ⲧ'),
    (0x2CA7, 'V'),
    (0x2CA8, 'M', 'ⲩ'),
    (0x2CA9, 'V'),
    (0x2CAA, 'M', 'ⲫ'),
    (0x2CAB, 'V'),
    (0x2CAC, 'M', 'ⲭ'),
    (0x2CAD, 'V'),
    (0x2CAE, 'M', 'ⲯ'),
    (0x2CAF, 'V'),
    (0x2CB0, 'M', 'ⲱ'),
    (0x2CB1, 'V'),
    (0x2CB2, 'M', 'ⲳ'),
    (0x2CB3, 'V'),
    (0x2CB4, 'M', 'ⲵ'),
    (0x2CB5, 'V'),
    (0x2CB6, 'M', 'ⲷ'),
    (0x2CB7, 'V'),
    (0x2CB8, 'M', 'ⲹ'),
    (0x2CB9, 'V'),
    (0x2CBA, 'M', 'ⲻ'),
    (0x2CBB, 'V'),
    (0x2CBC, 'M', 'ⲽ'),
    (0x2CBD, 'V'),
    (0x2CBE, 'M', 'ⲿ'),
    (0x2CBF, 'V'),
    (0x2CC0, 'M', 'ⳁ'),
    (0x2CC1, 'V'),
    (0x2CC2, 'M', 'ⳃ'),
    ]

def _seg_26() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2CC3, 'V'),
    (0x2CC4, 'M', 'ⳅ'),
    (0x2CC5, 'V'),
    (0x2CC6, 'M', 'ⳇ'),
    (0x2CC7, 'V'),
    (0x2CC8, 'M', 'ⳉ'),
    (0x2CC9, 'V'),
    (0x2CCA, 'M', 'ⳋ'),
    (0x2CCB, 'V'),
    (0x2CCC, 'M', 'ⳍ'),
    (0x2CCD, 'V'),
    (0x2CCE, 'M', 'ⳏ'),
    (0x2CCF, 'V'),
    (0x2CD0, 'M', 'ⳑ'),
    (0x2CD1, 'V'),
    (0x2CD2, 'M', 'ⳓ'),
    (0x2CD3, 'V'),
    (0x2CD4, 'M', 'ⳕ'),
    (0x2CD5, 'V'),
    (0x2CD6, 'M', 'ⳗ'),
    (0x2CD7, 'V'),
    (0x2CD8, 'M', 'ⳙ'),
    (0x2CD9, 'V'),
    (0x2CDA, 'M', 'ⳛ'),
    (0x2CDB, 'V'),
    (0x2CDC, 'M', 'ⳝ'),
    (0x2CDD, 'V'),
    (0x2CDE, 'M', 'ⳟ'),
    (0x2CDF, 'V'),
    (0x2CE0, 'M', 'ⳡ'),
    (0x2CE1, 'V'),
    (0x2CE2, 'M', 'ⳣ'),
    (0x2CE3, 'V'),
    (0x2CEB, 'M', 'ⳬ'),
    (0x2CEC, 'V'),
    (0x2CED, 'M', 'ⳮ'),
    (0x2CEE, 'V'),
    (0x2CF2, 'M', 'ⳳ'),
    (0x2CF3, 'V'),
    (0x2CF4, 'X'),
    (0x2CF9, 'V'),
    (0x2D26, 'X'),
    (0x2D27, 'V'),
    (0x2D28, 'X'),
    (0x2D2D, 'V'),
    (0x2D2E, 'X'),
    (0x2D30, 'V'),
    (0x2D68, 'X'),
    (0x2D6F, 'M', 'ⵡ'),
    (0x2D70, 'V'),
    (0x2D71, 'X'),
    (0x2D7F, 'V'),
    (0x2D97, 'X'),
    (0x2DA0, 'V'),
    (0x2DA7, 'X'),
    (0x2DA8, 'V'),
    (0x2DAF, 'X'),
    (0x2DB0, 'V'),
    (0x2DB7, 'X'),
    (0x2DB8, 'V'),
    (0x2DBF, 'X'),
    (0x2DC0, 'V'),
    (0x2DC7, 'X'),
    (0x2DC8, 'V'),
    (0x2DCF, 'X'),
    (0x2DD0, 'V'),
    (0x2DD7, 'X'),
    (0x2DD8, 'V'),
    (0x2DDF, 'X'),
    (0x2DE0, 'V'),
    (0x2E5E, 'X'),
    (0x2E80, 'V'),
    (0x2E9A, 'X'),
    (0x2E9B, 'V'),
    (0x2E9F, 'M', '母'),
    (0x2EA0, 'V'),
    (0x2EF3, 'M', '龟'),
    (0x2EF4, 'X'),
    (0x2F00, 'M', '一'),
    (0x2F01, 'M', '丨'),
    (0x2F02, 'M', '丶'),
    (0x2F03, 'M', '丿'),
    (0x2F04, 'M', '乙'),
    (0x2F05, 'M', '亅'),
    (0x2F06, 'M', '二'),
    (0x2F07, 'M', '亠'),
    (0x2F08, 'M', '人'),
    (0x2F09, 'M', '儿'),
    (0x2F0A, 'M', '入'),
    (0x2F0B, 'M', '八'),
    (0x2F0C, 'M', '冂'),
    (0x2F0D, 'M', '冖'),
    (0x2F0E, 'M', '冫'),
    (0x2F0F, 'M', '几'),
    (0x2F10, 'M', '凵'),
    (0x2F11, 'M', '刀'),
    (0x2F12, 'M', '力'),
    (0x2F13, 'M', '勹'),
    (0x2F14, 'M', '匕'),
    (0x2F15, 'M', '匚'),
    ]

def _seg_27() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2F16, 'M', '匸'),
    (0x2F17, 'M', '十'),
    (0x2F18, 'M', '卜'),
    (0x2F19, 'M', '卩'),
    (0x2F1A, 'M', '厂'),
    (0x2F1B, 'M', '厶'),
    (0x2F1C, 'M', '又'),
    (0x2F1D, 'M', '口'),
    (0x2F1E, 'M', '囗'),
    (0x2F1F, 'M', '土'),
    (0x2F20, 'M', '士'),
    (0x2F21, 'M', '夂'),
    (0x2F22, 'M', '夊'),
    (0x2F23, 'M', '夕'),
    (0x2F24, 'M', '大'),
    (0x2F25, 'M', '女'),
    (0x2F26, 'M', '子'),
    (0x2F27, 'M', '宀'),
    (0x2F28, 'M', '寸'),
    (0x2F29, 'M', '小'),
    (0x2F2A, 'M', '尢'),
    (0x2F2B, 'M', '尸'),
    (0x2F2C, 'M', '屮'),
    (0x2F2D, 'M', '山'),
    (0x2F2E, 'M', '巛'),
    (0x2F2F, 'M', '工'),
    (0x2F30, 'M', '己'),
    (0x2F31, 'M', '巾'),
    (0x2F32, 'M', '干'),
    (0x2F33, 'M', '幺'),
    (0x2F34, 'M', '广'),
    (0x2F35, 'M', '廴'),
    (0x2F36, 'M', '廾'),
    (0x2F37, 'M', '弋'),
    (0x2F38, 'M', '弓'),
    (0x2F39, 'M', '彐'),
    (0x2F3A, 'M', '彡'),
    (0x2F3B, 'M', '彳'),
    (0x2F3C, 'M', '心'),
    (0x2F3D, 'M', '戈'),
    (0x2F3E, 'M', '戶'),
    (0x2F3F, 'M', '手'),
    (0x2F40, 'M', '支'),
    (0x2F41, 'M', '攴'),
    (0x2F42, 'M', '文'),
    (0x2F43, 'M', '斗'),
    (0x2F44, 'M', '斤'),
    (0x2F45, 'M', '方'),
    (0x2F46, 'M', '无'),
    (0x2F47, 'M', '日'),
    (0x2F48, 'M', '曰'),
    (0x2F49, 'M', '月'),
    (0x2F4A, 'M', '木'),
    (0x2F4B, 'M', '欠'),
    (0x2F4C, 'M', '止'),
    (0x2F4D, 'M', '歹'),
    (0x2F4E, 'M', '殳'),
    (0x2F4F, 'M', '毋'),
    (0x2F50, 'M', '比'),
    (0x2F51, 'M', '毛'),
    (0x2F52, 'M', '氏'),
    (0x2F53, 'M', '气'),
    (0x2F54, 'M', '水'),
    (0x2F55, 'M', '火'),
    (0x2F56, 'M', '爪'),
    (0x2F57, 'M', '父'),
    (0x2F58, 'M', '爻'),
    (0x2F59, 'M', '爿'),
    (0x2F5A, 'M', '片'),
    (0x2F5B, 'M', '牙'),
    (0x2F5C, 'M', '牛'),
    (0x2F5D, 'M', '犬'),
    (0x2F5E, 'M', '玄'),
    (0x2F5F, 'M', '玉'),
    (0x2F60, 'M', '瓜'),
    (0x2F61, 'M', '瓦'),
    (0x2F62, 'M', '甘'),
    (0x2F63, 'M', '生'),
    (0x2F64, 'M', '用'),
    (0x2F65, 'M', '田'),
    (0x2F66, 'M', '疋'),
    (0x2F67, 'M', '疒'),
    (0x2F68, 'M', '癶'),
    (0x2F69, 'M', '白'),
    (0x2F6A, 'M', '皮'),
    (0x2F6B, 'M', '皿'),
    (0x2F6C, 'M', '目'),
    (0x2F6D, 'M', '矛'),
    (0x2F6E, 'M', '矢'),
    (0x2F6F, 'M', '石'),
    (0x2F70, 'M', '示'),
    (0x2F71, 'M', '禸'),
    (0x2F72, 'M', '禾'),
    (0x2F73, 'M', '穴'),
    (0x2F74, 'M', '立'),
    (0x2F75, 'M', '竹'),
    (0x2F76, 'M', '米'),
    (0x2F77, 'M', '糸'),
    (0x2F78, 'M', '缶'),
    (0x2F79, 'M', '网'),
    ]

def _seg_28() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2F7A, 'M', '羊'),
    (0x2F7B, 'M', '羽'),
    (0x2F7C, 'M', '老'),
    (0x2F7D, 'M', '而'),
    (0x2F7E, 'M', '耒'),
    (0x2F7F, 'M', '耳'),
    (0x2F80, 'M', '聿'),
    (0x2F81, 'M', '肉'),
    (0x2F82, 'M', '臣'),
    (0x2F83, 'M', '自'),
    (0x2F84, 'M', '至'),
    (0x2F85, 'M', '臼'),
    (0x2F86, 'M', '舌'),
    (0x2F87, 'M', '舛'),
    (0x2F88, 'M', '舟'),
    (0x2F89, 'M', '艮'),
    (0x2F8A, 'M', '色'),
    (0x2F8B, 'M', '艸'),
    (0x2F8C, 'M', '虍'),
    (0x2F8D, 'M', '虫'),
    (0x2F8E, 'M', '血'),
    (0x2F8F, 'M', '行'),
    (0x2F90, 'M', '衣'),
    (0x2F91, 'M', '襾'),
    (0x2F92, 'M', '見'),
    (0x2F93, 'M', '角'),
    (0x2F94, 'M', '言'),
    (0x2F95, 'M', '谷'),
    (0x2F96, 'M', '豆'),
    (0x2F97, 'M', '豕'),
    (0x2F98, 'M', '豸'),
    (0x2F99, 'M', '貝'),
    (0x2F9A, 'M', '赤'),
    (0x2F9B, 'M', '走'),
    (0x2F9C, 'M', '足'),
    (0x2F9D, 'M', '身'),
    (0x2F9E, 'M', '車'),
    (0x2F9F, 'M', '辛'),
    (0x2FA0, 'M', '辰'),
    (0x2FA1, 'M', '辵'),
    (0x2FA2, 'M', '邑'),
    (0x2FA3, 'M', '酉'),
    (0x2FA4, 'M', '釆'),
    (0x2FA5, 'M', '里'),
    (0x2FA6, 'M', '金'),
    (0x2FA7, 'M', '長'),
    (0x2FA8, 'M', '門'),
    (0x2FA9, 'M', '阜'),
    (0x2FAA, 'M', '隶'),
    (0x2FAB, 'M', '隹'),
    (0x2FAC, 'M', '雨'),
    (0x2FAD, 'M', '靑'),
    (0x2FAE, 'M', '非'),
    (0x2FAF, 'M', '面'),
    (0x2FB0, 'M', '革'),
    (0x2FB1, 'M', '韋'),
    (0x2FB2, 'M', '韭'),
    (0x2FB3, 'M', '音'),
    (0x2FB4, 'M', '頁'),
    (0x2FB5, 'M', '風'),
    (0x2FB6, 'M', '飛'),
    (0x2FB7, 'M', '食'),
    (0x2FB8, 'M', '首'),
    (0x2FB9, 'M', '香'),
    (0x2FBA, 'M', '馬'),
    (0x2FBB, 'M', '骨'),
    (0x2FBC, 'M', '高'),
    (0x2FBD, 'M', '髟'),
    (0x2FBE, 'M', '鬥'),
    (0x2FBF, 'M', '鬯'),
    (0x2FC0, 'M', '鬲'),
    (0x2FC1, 'M', '鬼'),
    (0x2FC2, 'M', '魚'),
    (0x2FC3, 'M', '鳥'),
    (0x2FC4, 'M', '鹵'),
    (0x2FC5, 'M', '鹿'),
    (0x2FC6, 'M', '麥'),
    (0x2FC7, 'M', '麻'),
    (0x2FC8, 'M', '黃'),
    (0x2FC9, 'M', '黍'),
    (0x2FCA, 'M', '黑'),
    (0x2FCB, 'M', '黹'),
    (0x2FCC, 'M', '黽'),
    (0x2FCD, 'M', '鼎'),
    (0x2FCE, 'M', '鼓'),
    (0x2FCF, 'M', '鼠'),
    (0x2FD0, 'M', '鼻'),
    (0x2FD1, 'M', '齊'),
    (0x2FD2, 'M', '齒'),
    (0x2FD3, 'M', '龍'),
    (0x2FD4, 'M', '龜'),
    (0x2FD5, 'M', '龠'),
    (0x2FD6, 'X'),
    (0x3000, '3', ' '),
    (0x3001, 'V'),
    (0x3002, 'M', '.'),
    (0x3003, 'V'),
    (0x3036, 'M', '〒'),
    (0x3037, 'V'),
    (0x3038, 'M', '十'),
    ]

def _seg_29() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x3039, 'M', '卄'),
    (0x303A, 'M', '卅'),
    (0x303B, 'V'),
    (0x3040, 'X'),
    (0x3041, 'V'),
    (0x3097, 'X'),
    (0x3099, 'V'),
    (0x309B, '3', ' ゙'),
    (0x309C, '3', ' ゚'),
    (0x309D, 'V'),
    (0x309F, 'M', 'より'),
    (0x30A0, 'V'),
    (0x30FF, 'M', 'コト'),
    (0x3100, 'X'),
    (0x3105, 'V'),
    (0x3130, 'X'),
    (0x3131, 'M', 'ᄀ'),
    (0x3132, 'M', 'ᄁ'),
    (0x3133, 'M', 'ᆪ'),
    (0x3134, 'M', 'ᄂ'),
    (0x3135, 'M', 'ᆬ'),
    (0x3136, 'M', 'ᆭ'),
    (0x3137, 'M', 'ᄃ'),
    (0x3138, 'M', 'ᄄ'),
    (0x3139, 'M', 'ᄅ'),
    (0x313A, 'M', 'ᆰ'),
    (0x313B, 'M', 'ᆱ'),
    (0x313C, 'M', 'ᆲ'),
    (0x313D, 'M', 'ᆳ'),
    (0x313E, 'M', 'ᆴ'),
    (0x313F, 'M', 'ᆵ'),
    (0x3140, 'M', 'ᄚ'),
    (0x3141, 'M', 'ᄆ'),
    (0x3142, 'M', 'ᄇ'),
    (0x3143, 'M', 'ᄈ'),
    (0x3144, 'M', 'ᄡ'),
    (0x3145, 'M', 'ᄉ'),
    (0x3146, 'M', 'ᄊ'),
    (0x3147, 'M', 'ᄋ'),
    (0x3148, 'M', 'ᄌ'),
    (0x3149, 'M', 'ᄍ'),
    (0x314A, 'M', 'ᄎ'),
    (0x314B, 'M', 'ᄏ'),
    (0x314C, 'M', 'ᄐ'),
    (0x314D, 'M', 'ᄑ'),
    (0x314E, 'M', 'ᄒ'),
    (0x314F, 'M', 'ᅡ'),
    (0x3150, 'M', 'ᅢ'),
    (0x3151, 'M', 'ᅣ'),
    (0x3152, 'M', 'ᅤ'),
    (0x3153, 'M', 'ᅥ'),
    (0x3154, 'M', 'ᅦ'),
    (0x3155, 'M', 'ᅧ'),
    (0x3156, 'M', 'ᅨ'),
    (0x3157, 'M', 'ᅩ'),
    (0x3158, 'M', 'ᅪ'),
    (0x3159, 'M', 'ᅫ'),
    (0x315A, 'M', 'ᅬ'),
    (0x315B, 'M', 'ᅭ'),
    (0x315C, 'M', 'ᅮ'),
    (0x315D, 'M', 'ᅯ'),
    (0x315E, 'M', 'ᅰ'),
    (0x315F, 'M', 'ᅱ'),
    (0x3160, 'M', 'ᅲ'),
    (0x3161, 'M', 'ᅳ'),
    (0x3162, 'M', 'ᅴ'),
    (0x3163, 'M', 'ᅵ'),
    (0x3164, 'X'),
    (0x3165, 'M', 'ᄔ'),
    (0x3166, 'M', 'ᄕ'),
    (0x3167, 'M', 'ᇇ'),
    (0x3168, 'M', 'ᇈ'),
    (0x3169, 'M', 'ᇌ'),
    (0x316A, 'M', 'ᇎ'),
    (0x316B, 'M', 'ᇓ'),
    (0x316C, 'M', 'ᇗ'),
    (0x316D, 'M', 'ᇙ'),
    (0x316E, 'M', 'ᄜ'),
    (0x316F, 'M', 'ᇝ'),
    (0x3170, 'M', 'ᇟ'),
    (0x3171, 'M', 'ᄝ'),
    (0x3172, 'M', 'ᄞ'),
    (0x3173, 'M', 'ᄠ'),
    (0x3174, 'M', 'ᄢ'),
    (0x3175, 'M', 'ᄣ'),
    (0x3176, 'M', 'ᄧ'),
    (0x3177, 'M', 'ᄩ'),
    (0x3178, 'M', 'ᄫ'),
    (0x3179, 'M', 'ᄬ'),
    (0x317A, 'M', 'ᄭ'),
    (0x317B, 'M', 'ᄮ'),
    (0x317C, 'M', 'ᄯ'),
    (0x317D, 'M', 'ᄲ'),
    (0x317E, 'M', 'ᄶ'),
    (0x317F, 'M', 'ᅀ'),
    (0x3180, 'M', 'ᅇ'),
    (0x3181, 'M', 'ᅌ'),
    (0x3182, 'M', 'ᇱ'),
    (0x3183, 'M', 'ᇲ'),
    (0x3184, 'M', 'ᅗ'),
    ]

def _seg_30() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x3185, 'M', 'ᅘ'),
    (0x3186, 'M', 'ᅙ'),
    (0x3187, 'M', 'ᆄ'),
    (0x3188, 'M', 'ᆅ'),
    (0x3189, 'M', 'ᆈ'),
    (0x318A, 'M', 'ᆑ'),
    (0x318B, 'M', 'ᆒ'),
    (0x318C, 'M', 'ᆔ'),
    (0x318D, 'M', 'ᆞ'),
    (0x318E, 'M', 'ᆡ'),
    (0x318F, 'X'),
    (0x3190, 'V'),
    (0x3192, 'M', '一'),
    (0x3193, 'M', '二'),
    (0x3194, 'M', '三'),
    (0x3195, 'M', '四'),
    (0x3196, 'M', '上'),
    (0x3197, 'M', '中'),
    (0x3198, 'M', '下'),
    (0x3199, 'M', '甲'),
    (0x319A, 'M', '乙'),
    (0x319B, 'M', '丙'),
    (0x319C, 'M', '丁'),
    (0x319D, 'M', '天'),
    (0x319E, 'M', '地'),
    (0x319F, 'M', '人'),
    (0x31A0, 'V'),
    (0x31E4, 'X'),
    (0x31F0, 'V'),
    (0x3200, '3', '(ᄀ)'),
    (0x3201, '3', '(ᄂ)'),
    (0x3202, '3', '(ᄃ)'),
    (0x3203, '3', '(ᄅ)'),
    (0x3204, '3', '(ᄆ)'),
    (0x3205, '3', '(ᄇ)'),
    (0x3206, '3', '(ᄉ)'),
    (0x3207, '3', '(ᄋ)'),
    (0x3208, '3', '(ᄌ)'),
    (0x3209, '3', '(ᄎ)'),
    (0x320A, '3', '(ᄏ)'),
    (0x320B, '3', '(ᄐ)'),
    (0x320C, '3', '(ᄑ)'),
    (0x320D, '3', '(ᄒ)'),
    (0x320E, '3', '(가)'),
    (0x320F, '3', '(나)'),
    (0x3210, '3', '(다)'),
    (0x3211, '3', '(라)'),
    (0x3212, '3', '(마)'),
    (0x3213, '3', '(바)'),
    (0x3214, '3', '(사)'),
    (0x3215, '3', '(아)'),
    (0x3216, '3', '(자)'),
    (0x3217, '3', '(차)'),
    (0x3218, '3', '(카)'),
    (0x3219, '3', '(타)'),
    (0x321A, '3', '(파)'),
    (0x321B, '3', '(하)'),
    (0x321C, '3', '(주)'),
    (0x321D, '3', '(오전)'),
    (0x321E, '3', '(오후)'),
    (0x321F, 'X'),
    (0x3220, '3', '(一)'),
    (0x3221, '3', '(二)'),
    (0x3222, '3', '(三)'),
    (0x3223, '3', '(四)'),
    (0x3224, '3', '(五)'),
    (0x3225, '3', '(六)'),
    (0x3226, '3', '(七)'),
    (0x3227, '3', '(八)'),
    (0x3228, '3', '(九)'),
    (0x3229, '3', '(十)'),
    (0x322A, '3', '(月)'),
    (0x322B, '3', '(火)'),
    (0x322C, '3', '(水)'),
    (0x322D, '3', '(木)'),
    (0x322E, '3', '(金)'),
    (0x322F, '3', '(土)'),
    (0x3230, '3', '(日)'),
    (0x3231, '3', '(株)'),
    (0x3232, '3', '(有)'),
    (0x3233, '3', '(社)'),
    (0x3234, '3', '(名)'),
    (0x3235, '3', '(特)'),
    (0x3236, '3', '(財)'),
    (0x3237, '3', '(祝)'),
    (0x3238, '3', '(労)'),
    (0x3239, '3', '(代)'),
    (0x323A, '3', '(呼)'),
    (0x323B, '3', '(学)'),
    (0x323C, '3', '(監)'),
    (0x323D, '3', '(企)'),
    (0x323E, '3', '(資)'),
    (0x323F, '3', '(協)'),
    (0x3240, '3', '(祭)'),
    (0x3241, '3', '(休)'),
    (0x3242, '3', '(自)'),
    (0x3243, '3', '(至)'),
    (0x3244, 'M', '問'),
    (0x3245, 'M', '幼'),
    (0x3246, 'M', '文'),
    ]

def _seg_31() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x3247, 'M', '箏'),
    (0x3248, 'V'),
    (0x3250, 'M', 'pte'),
    (0x3251, 'M', '21'),
    (0x3252, 'M', '22'),
    (0x3253, 'M', '23'),
    (0x3254, 'M', '24'),
    (0x3255, 'M', '25'),
    (0x3256, 'M', '26'),
    (0x3257, 'M', '27'),
    (0x3258, 'M', '28'),
    (0x3259, 'M', '29'),
    (0x325A, 'M', '30'),
    (0x325B, 'M', '31'),
    (0x325C, 'M', '32'),
    (0x325D, 'M', '33'),
    (0x325E, 'M', '34'),
    (0x325F, 'M', '35'),
    (0x3260, 'M', 'ᄀ'),
    (0x3261, 'M', 'ᄂ'),
    (0x3262, 'M', 'ᄃ'),
    (0x3263, 'M', 'ᄅ'),
    (0x3264, 'M', 'ᄆ'),
    (0x3265, 'M', 'ᄇ'),
    (0x3266, 'M', 'ᄉ'),
    (0x3267, 'M', 'ᄋ'),
    (0x3268, 'M', 'ᄌ'),
    (0x3269, 'M', 'ᄎ'),
    (0x326A, 'M', 'ᄏ'),
    (0x326B, 'M', 'ᄐ'),
    (0x326C, 'M', 'ᄑ'),
    (0x326D, 'M', 'ᄒ'),
    (0x326E, 'M', '가'),
    (0x326F, 'M', '나'),
    (0x3270, 'M', '다'),
    (0x3271, 'M', '라'),
    (0x3272, 'M', '마'),
    (0x3273, 'M', '바'),
    (0x3274, 'M', '사'),
    (0x3275, 'M', '아'),
    (0x3276, 'M', '자'),
    (0x3277, 'M', '차'),
    (0x3278, 'M', '카'),
    (0x3279, 'M', '타'),
    (0x327A, 'M', '파'),
    (0x327B, 'M', '하'),
    (0x327C, 'M', '참고'),
    (0x327D, 'M', '주의'),
    (0x327E, 'M', '우'),
    (0x327F, 'V'),
    (0x3280, 'M', '一'),
    (0x3281, 'M', '二'),
    (0x3282, 'M', '三'),
    (0x3283, 'M', '四'),
    (0x3284, 'M', '五'),
    (0x3285, 'M', '六'),
    (0x3286, 'M', '七'),
    (0x3287, 'M', '八'),
    (0x3288, 'M', '九'),
    (0x3289, 'M', '十'),
    (0x328A, 'M', '月'),
    (0x328B, 'M', '火'),
    (0x328C, 'M', '水'),
    (0x328D, 'M', '木'),
    (0x328E, 'M', '金'),
    (0x328F, 'M', '土'),
    (0x3290, 'M', '日'),
    (0x3291, 'M', '株'),
    (0x3292, 'M', '有'),
    (0x3293, 'M', '社'),
    (0x3294, 'M', '名'),
    (0x3295, 'M', '特'),
    (0x3296, 'M', '財'),
    (0x3297, 'M', '祝'),
    (0x3298, 'M', '労'),
    (0x3299, 'M', '秘'),
    (0x329A, 'M', '男'),
    (0x329B, 'M', '女'),
    (0x329C, 'M', '適'),
    (0x329D, 'M', '優'),
    (0x329E, 'M', '印'),
    (0x329F, 'M', '注'),
    (0x32A0, 'M', '項'),
    (0x32A1, 'M', '休'),
    (0x32A2, 'M', '写'),
    (0x32A3, 'M', '正'),
    (0x32A4, 'M', '上'),
    (0x32A5, 'M', '中'),
    (0x32A6, 'M', '下'),
    (0x32A7, 'M', '左'),
    (0x32A8, 'M', '右'),
    (0x32A9, 'M', '医'),
    (0x32AA, 'M', '宗'),
    (0x32AB, 'M', '学'),
    (0x32AC, 'M', '監'),
    (0x32AD, 'M', '企'),
    (0x32AE, 'M', '資'),
    (0x32AF, 'M', '協'),
    (0x32B0, 'M', '夜'),
    (0x32B1, 'M', '36'),
    ]

def _seg_32() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x32B2, 'M', '37'),
    (0x32B3, 'M', '38'),
    (0x32B4, 'M', '39'),
    (0x32B5, 'M', '40'),
    (0x32B6, 'M', '41'),
    (0x32B7, 'M', '42'),
    (0x32B8, 'M', '43'),
    (0x32B9, 'M', '44'),
    (0x32BA, 'M', '45'),
    (0x32BB, 'M', '46'),
    (0x32BC, 'M', '47'),
    (0x32BD, 'M', '48'),
    (0x32BE, 'M', '49'),
    (0x32BF, 'M', '50'),
    (0x32C0, 'M', '1月'),
    (0x32C1, 'M', '2月'),
    (0x32C2, 'M', '3月'),
    (0x32C3, 'M', '4月'),
    (0x32C4, 'M', '5月'),
    (0x32C5, 'M', '6月'),
    (0x32C6, 'M', '7月'),
    (0x32C7, 'M', '8月'),
    (0x32C8, 'M', '9月'),
    (0x32C9, 'M', '10月'),
    (0x32CA, 'M', '11月'),
    (0x32CB, 'M', '12月'),
    (0x32CC, 'M', 'hg'),
    (0x32CD, 'M', 'erg'),
    (0x32CE, 'M', 'ev'),
    (0x32CF, 'M', 'ltd'),
    (0x32D0, 'M', 'ア'),
    (0x32D1, 'M', 'イ'),
    (0x32D2, 'M', 'ウ'),
    (0x32D3, 'M', 'エ'),
    (0x32D4, 'M', 'オ'),
    (0x32D5, 'M', 'カ'),
    (0x32D6, 'M', 'キ'),
    (0x32D7, 'M', 'ク'),
    (0x32D8, 'M', 'ケ'),
    (0x32D9, 'M', 'コ'),
    (0x32DA, 'M', 'サ'),
    (0x32DB, 'M', 'シ'),
    (0x32DC, 'M', 'ス'),
    (0x32DD, 'M', 'セ'),
    (0x32DE, 'M', 'ソ'),
    (0x32DF, 'M', 'タ'),
    (0x32E0, 'M', 'チ'),
    (0x32E1, 'M', 'ツ'),
    (0x32E2, 'M', 'テ'),
    (0x32E3, 'M', 'ト'),
    (0x32E4, 'M', 'ナ'),
    (0x32E5, 'M', 'ニ'),
    (0x32E6, 'M', 'ヌ'),
    (0x32E7, 'M', 'ネ'),
    (0x32E8, 'M', 'ノ'),
    (0x32E9, 'M', 'ハ'),
    (0x32EA, 'M', 'ヒ'),
    (0x32EB, 'M', 'フ'),
    (0x32EC, 'M', 'ヘ'),
    (0x32ED, 'M', 'ホ'),
    (0x32EE, 'M', 'マ'),
    (0x32EF, 'M', 'ミ'),
    (0x32F0, 'M', 'ム'),
    (0x32F1, 'M', 'メ'),
    (0x32F2, 'M', 'モ'),
    (0x32F3, 'M', 'ヤ'),
    (0x32F4, 'M', 'ユ'),
    (0x32F5, 'M', 'ヨ'),
    (0x32F6, 'M', 'ラ'),
    (0x32F7, 'M', 'リ'),
    (0x32F8, 'M', 'ル'),
    (0x32F9, 'M', 'レ'),
    (0x32FA, 'M', 'ロ'),
    (0x32FB, 'M', 'ワ'),
    (0x32FC, 'M', 'ヰ'),
    (0x32FD, 'M', 'ヱ'),
    (0x32FE, 'M', 'ヲ'),
    (0x32FF, 'M', '令和'),
    (0x3300, 'M', 'アパート'),
    (0x3301, 'M', 'アルファ'),
    (0x3302, 'M', 'アンペア'),
    (0x3303, 'M', 'アール'),
    (0x3304, 'M', 'イニング'),
    (0x3305, 'M', 'インチ'),
    (0x3306, 'M', 'ウォン'),
    (0x3307, 'M', 'エスクード'),
    (0x3308, 'M', 'エーカー'),
    (0x3309, 'M', 'オンス'),
    (0x330A, 'M', 'オーム'),
    (0x330B, 'M', 'カイリ'),
    (0x330C, 'M', 'カラット'),
    (0x330D, 'M', 'カロリー'),
    (0x330E, 'M', 'ガロン'),
    (0x330F, 'M', 'ガンマ'),
    (0x3310, 'M', 'ギガ'),
    (0x3311, 'M', 'ギニー'),
    (0x3312, 'M', 'キュリー'),
    (0x3313, 'M', 'ギルダー'),
    (0x3314, 'M', 'キロ'),
    (0x3315, 'M', 'キログラム'),
    ]

def _seg_33() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x3316, 'M', 'キロメートル'),
    (0x3317, 'M', 'キロワット'),
    (0x3318, 'M', 'グラム'),
    (0x3319, 'M', 'グラムトン'),
    (0x331A, 'M', 'クルゼイロ'),
    (0x331B, 'M', 'クローネ'),
    (0x331C, 'M', 'ケース'),
    (0x331D, 'M', 'コルナ'),
    (0x331E, 'M', 'コーポ'),
    (0x331F, 'M', 'サイクル'),
    (0x3320, 'M', 'サンチーム'),
    (0x3321, 'M', 'シリング'),
    (0x3322, 'M', 'センチ'),
    (0x3323, 'M', 'セント'),
    (0x3324, 'M', 'ダース'),
    (0x3325, 'M', 'デシ'),
    (0x3326, 'M', 'ドル'),
    (0x3327, 'M', 'トン'),
    (0x3328, 'M', 'ナノ'),
    (0x3329, 'M', 'ノット'),
    (0x332A, 'M', 'ハイツ'),
    (0x332B, 'M', 'パーセント'),
    (0x332C, 'M', 'パーツ'),
    (0x332D, 'M', 'バーレル'),
    (0x332E, 'M', 'ピアストル'),
    (0x332F, 'M', 'ピクル'),
    (0x3330, 'M', 'ピコ'),
    (0x3331, 'M', 'ビル'),
    (0x3332, 'M', 'ファラッド'),
    (0x3333, 'M', 'フィート'),
    (0x3334, 'M', 'ブッシェル'),
    (0x3335, 'M', 'フラン'),
    (0x3336, 'M', 'ヘクタール'),
    (0x3337, 'M', 'ペソ'),
    (0x3338, 'M', 'ペニヒ'),
    (0x3339, 'M', 'ヘルツ'),
    (0x333A, 'M', 'ペンス'),
    (0x333B, 'M', 'ページ'),
    (0x333C, 'M', 'ベータ'),
    (0x333D, 'M', 'ポイント'),
    (0x333E, 'M', 'ボルト'),
    (0x333F, 'M', 'ホン'),
    (0x3340, 'M', 'ポンド'),
    (0x3341, 'M', 'ホール'),
    (0x3342, 'M', 'ホーン'),
    (0x3343, 'M', 'マイクロ'),
    (0x3344, 'M', 'マイル'),
    (0x3345, 'M', 'マッハ'),
    (0x3346, 'M', 'マルク'),
    (0x3347, 'M', 'マンション'),
    (0x3348, 'M', 'ミクロン'),
    (0x3349, 'M', 'ミリ'),
    (0x334A, 'M', 'ミリバール'),
    (0x334B, 'M', 'メガ'),
    (0x334C, 'M', 'メガトン'),
    (0x334D, 'M', 'メートル'),
    (0x334E, 'M', 'ヤード'),
    (0x334F, 'M', 'ヤール'),
    (0x3350, 'M', 'ユアン'),
    (0x3351, 'M', 'リットル'),
    (0x3352, 'M', 'リラ'),
    (0x3353, 'M', 'ルピー'),
    (0x3354, 'M', 'ルーブル'),
    (0x3355, 'M', 'レム'),
    (0x3356, 'M', 'レントゲン'),
    (0x3357, 'M', 'ワット'),
    (0x3358, 'M', '0点'),
    (0x3359, 'M', '1点'),
    (0x335A, 'M', '2点'),
    (0x335B, 'M', '3点'),
    (0x335C, 'M', '4点'),
    (0x335D, 'M', '5点'),
    (0x335E, 'M', '6点'),
    (0x335F, 'M', '7点'),
    (0x3360, 'M', '8点'),
    (0x3361, 'M', '9点'),
    (0x3362, 'M', '10点'),
    (0x3363, 'M', '11点'),
    (0x3364, 'M', '12点'),
    (0x3365, 'M', '13点'),
    (0x3366, 'M', '14点'),
    (0x3367, 'M', '15点'),
    (0x3368, 'M', '16点'),
    (0x3369, 'M', '17点'),
    (0x336A, 'M', '18点'),
    (0x336B, 'M', '19点'),
    (0x336C, 'M', '20点'),
    (0x336D, 'M', '21点'),
    (0x336E, 'M', '22点'),
    (0x336F, 'M', '23点'),
    (0x3370, 'M', '24点'),
    (0x3371, 'M', 'hpa'),
    (0x3372, 'M', 'da'),
    (0x3373, 'M', 'au'),
    (0x3374, 'M', 'bar'),
    (0x3375, 'M', 'ov'),
    (0x3376, 'M', 'pc'),
    (0x3377, 'M', 'dm'),
    (0x3378, 'M', 'dm2'),
    (0x3379, 'M', 'dm3'),
    ]

def _seg_34() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x337A, 'M', 'iu'),
    (0x337B, 'M', '平成'),
    (0x337C, 'M', '昭和'),
    (0x337D, 'M', '大正'),
    (0x337E, 'M', '明治'),
    (0x337F, 'M', '株式会社'),
    (0x3380, 'M', 'pa'),
    (0x3381, 'M', 'na'),
    (0x3382, 'M', 'μa'),
    (0x3383, 'M', 'ma'),
    (0x3384, 'M', 'ka'),
    (0x3385, 'M', 'kb'),
    (0x3386, 'M', 'mb'),
    (0x3387, 'M', 'gb'),
    (0x3388, 'M', 'cal'),
    (0x3389, 'M', 'kcal'),
    (0x338A, 'M', 'pf'),
    (0x338B, 'M', 'nf'),
    (0x338C, 'M', 'μf'),
    (0x338D, 'M', 'μg'),
    (0x338E, 'M', 'mg'),
    (0x338F, 'M', 'kg'),
    (0x3390, 'M', 'hz'),
    (0x3391, 'M', 'khz'),
    (0x3392, 'M', 'mhz'),
    (0x3393, 'M', 'ghz'),
    (0x3394, 'M', 'thz'),
    (0x3395, 'M', 'μl'),
    (0x3396, 'M', 'ml'),
    (0x3397, 'M', 'dl'),
    (0x3398, 'M', 'kl'),
    (0x3399, 'M', 'fm'),
    (0x339A, 'M', 'nm'),
    (0x339B, 'M', 'μm'),
    (0x339C, 'M', 'mm'),
    (0x339D, 'M', 'cm'),
    (0x339E, 'M', 'km'),
    (0x339F, 'M', 'mm2'),
    (0x33A0, 'M', 'cm2'),
    (0x33A1, 'M', 'm2'),
    (0x33A2, 'M', 'km2'),
    (0x33A3, 'M', 'mm3'),
    (0x33A4, 'M', 'cm3'),
    (0x33A5, 'M', 'm3'),
    (0x33A6, 'M', 'km3'),
    (0x33A7, 'M', 'm∕s'),
    (0x33A8, 'M', 'm∕s2'),
    (0x33A9, 'M', 'pa'),
    (0x33AA, 'M', 'kpa'),
    (0x33AB, 'M', 'mpa'),
    (0x33AC, 'M', 'gpa'),
    (0x33AD, 'M', 'rad'),
    (0x33AE, 'M', 'rad∕s'),
    (0x33AF, 'M', 'rad∕s2'),
    (0x33B0, 'M', 'ps'),
    (0x33B1, 'M', 'ns'),
    (0x33B2, 'M', 'μs'),
    (0x33B3, 'M', 'ms'),
    (0x33B4, 'M', 'pv'),
    (0x33B5, 'M', 'nv'),
    (0x33B6, 'M', 'μv'),
    (0x33B7, 'M', 'mv'),
    (0x33B8, 'M', 'kv'),
    (0x33B9, 'M', 'mv'),
    (0x33BA, 'M', 'pw'),
    (0x33BB, 'M', 'nw'),
    (0x33BC, 'M', 'μw'),
    (0x33BD, 'M', 'mw'),
    (0x33BE, 'M', 'kw'),
    (0x33BF, 'M', 'mw'),
    (0x33C0, 'M', 'kω'),
    (0x33C1, 'M', 'mω'),
    (0x33C2, 'X'),
    (0x33C3, 'M', 'bq'),
    (0x33C4, 'M', 'cc'),
    (0x33C5, 'M', 'cd'),
    (0x33C6, 'M', 'c∕kg'),
    (0x33C7, 'X'),
    (0x33C8, 'M', 'db'),
    (0x33C9, 'M', 'gy'),
    (0x33CA, 'M', 'ha'),
    (0x33CB, 'M', 'hp'),
    (0x33CC, 'M', 'in'),
    (0x33CD, 'M', 'kk'),
    (0x33CE, 'M', 'km'),
    (0x33CF, 'M', 'kt'),
    (0x33D0, 'M', 'lm'),
    (0x33D1, 'M', 'ln'),
    (0x33D2, 'M', 'log'),
    (0x33D3, 'M', 'lx'),
    (0x33D4, 'M', 'mb'),
    (0x33D5, 'M', 'mil'),
    (0x33D6, 'M', 'mol'),
    (0x33D7, 'M', 'ph'),
    (0x33D8, 'X'),
    (0x33D9, 'M', 'ppm'),
    (0x33DA, 'M', 'pr'),
    (0x33DB, 'M', 'sr'),
    (0x33DC, 'M', 'sv'),
    (0x33DD, 'M', 'wb'),
    ]

def _seg_35() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x33DE, 'M', 'v∕m'),
    (0x33DF, 'M', 'a∕m'),
    (0x33E0, 'M', '1日'),
    (0x33E1, 'M', '2日'),
    (0x33E2, 'M', '3日'),
    (0x33E3, 'M', '4日'),
    (0x33E4, 'M', '5日'),
    (0x33E5, 'M', '6日'),
    (0x33E6, 'M', '7日'),
    (0x33E7, 'M', '8日'),
    (0x33E8, 'M', '9日'),
    (0x33E9, 'M', '10日'),
    (0x33EA, 'M', '11日'),
    (0x33EB, 'M', '12日'),
    (0x33EC, 'M', '13日'),
    (0x33ED, 'M', '14日'),
    (0x33EE, 'M', '15日'),
    (0x33EF, 'M', '16日'),
    (0x33F0, 'M', '17日'),
    (0x33F1, 'M', '18日'),
    (0x33F2, 'M', '19日'),
    (0x33F3, 'M', '20日'),
    (0x33F4, 'M', '21日'),
    (0x33F5, 'M', '22日'),
    (0x33F6, 'M', '23日'),
    (0x33F7, 'M', '24日'),
    (0x33F8, 'M', '25日'),
    (0x33F9, 'M', '26日'),
    (0x33FA, 'M', '27日'),
    (0x33FB, 'M', '28日'),
    (0x33FC, 'M', '29日'),
    (0x33FD, 'M', '30日'),
    (0x33FE, 'M', '31日'),
    (0x33FF, 'M', 'gal'),
    (0x3400, 'V'),
    (0xA48D, 'X'),
    (0xA490, 'V'),
    (0xA4C7, 'X'),
    (0xA4D0, 'V'),
    (0xA62C, 'X'),
    (0xA640, 'M', 'ꙁ'),
    (0xA641, 'V'),
    (0xA642, 'M', 'ꙃ'),
    (0xA643, 'V'),
    (0xA644, 'M', 'ꙅ'),
    (0xA645, 'V'),
    (0xA646, 'M', 'ꙇ'),
    (0xA647, 'V'),
    (0xA648, 'M', 'ꙉ'),
    (0xA649, 'V'),
    (0xA64A, 'M', 'ꙋ'),
    (0xA64B, 'V'),
    (0xA64C, 'M', 'ꙍ'),
    (0xA64D, 'V'),
    (0xA64E, 'M', 'ꙏ'),
    (0xA64F, 'V'),
    (0xA650, 'M', 'ꙑ'),
    (0xA651, 'V'),
    (0xA652, 'M', 'ꙓ'),
    (0xA653, 'V'),
    (0xA654, 'M', 'ꙕ'),
    (0xA655, 'V'),
    (0xA656, 'M', 'ꙗ'),
    (0xA657, 'V'),
    (0xA658, 'M', 'ꙙ'),
    (0xA659, 'V'),
    (0xA65A, 'M', 'ꙛ'),
    (0xA65B, 'V'),
    (0xA65C, 'M', 'ꙝ'),
    (0xA65D, 'V'),
    (0xA65E, 'M', 'ꙟ'),
    (0xA65F, 'V'),
    (0xA660, 'M', 'ꙡ'),
    (0xA661, 'V'),
    (0xA662, 'M', 'ꙣ'),
    (0xA663, 'V'),
    (0xA664, 'M', 'ꙥ'),
    (0xA665, 'V'),
    (0xA666, 'M', 'ꙧ'),
    (0xA667, 'V'),
    (0xA668, 'M', 'ꙩ'),
    (0xA669, 'V'),
    (0xA66A, 'M', 'ꙫ'),
    (0xA66B, 'V'),
    (0xA66C, 'M', 'ꙭ'),
    (0xA66D, 'V'),
    (0xA680, 'M', 'ꚁ'),
    (0xA681, 'V'),
    (0xA682, 'M', 'ꚃ'),
    (0xA683, 'V'),
    (0xA684, 'M', 'ꚅ'),
    (0xA685, 'V'),
    (0xA686, 'M', 'ꚇ'),
    (0xA687, 'V'),
    (0xA688, 'M', 'ꚉ'),
    (0xA689, 'V'),
    (0xA68A, 'M', 'ꚋ'),
    (0xA68B, 'V'),
    (0xA68C, 'M', 'ꚍ'),
    (0xA68D, 'V'),
    ]

def _seg_36() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xA68E, 'M', 'ꚏ'),
    (0xA68F, 'V'),
    (0xA690, 'M', 'ꚑ'),
    (0xA691, 'V'),
    (0xA692, 'M', 'ꚓ'),
    (0xA693, 'V'),
    (0xA694, 'M', 'ꚕ'),
    (0xA695, 'V'),
    (0xA696, 'M', 'ꚗ'),
    (0xA697, 'V'),
    (0xA698, 'M', 'ꚙ'),
    (0xA699, 'V'),
    (0xA69A, 'M', 'ꚛ'),
    (0xA69B, 'V'),
    (0xA69C, 'M', 'ъ'),
    (0xA69D, 'M', 'ь'),
    (0xA69E, 'V'),
    (0xA6F8, 'X'),
    (0xA700, 'V'),
    (0xA722, 'M', 'ꜣ'),
    (0xA723, 'V'),
    (0xA724, 'M', 'ꜥ'),
    (0xA725, 'V'),
    (0xA726, 'M', 'ꜧ'),
    (0xA727, 'V'),
    (0xA728, 'M', 'ꜩ'),
    (0xA729, 'V'),
    (0xA72A, 'M', 'ꜫ'),
    (0xA72B, 'V'),
    (0xA72C, 'M', 'ꜭ'),
    (0xA72D, 'V'),
    (0xA72E, 'M', 'ꜯ'),
    (0xA72F, 'V'),
    (0xA732, 'M', 'ꜳ'),
    (0xA733, 'V'),
    (0xA734, 'M', 'ꜵ'),
    (0xA735, 'V'),
    (0xA736, 'M', 'ꜷ'),
    (0xA737, 'V'),
    (0xA738, 'M', 'ꜹ'),
    (0xA739, 'V'),
    (0xA73A, 'M', 'ꜻ'),
    (0xA73B, 'V'),
    (0xA73C, 'M', 'ꜽ'),
    (0xA73D, 'V'),
    (0xA73E, 'M', 'ꜿ'),
    (0xA73F, 'V'),
    (0xA740, 'M', 'ꝁ'),
    (0xA741, 'V'),
    (0xA742, 'M', 'ꝃ'),
    (0xA743, 'V'),
    (0xA744, 'M', 'ꝅ'),
    (0xA745, 'V'),
    (0xA746, 'M', 'ꝇ'),
    (0xA747, 'V'),
    (0xA748, 'M', 'ꝉ'),
    (0xA749, 'V'),
    (0xA74A, 'M', 'ꝋ'),
    (0xA74B, 'V'),
    (0xA74C, 'M', 'ꝍ'),
    (0xA74D, 'V'),
    (0xA74E, 'M', 'ꝏ'),
    (0xA74F, 'V'),
    (0xA750, 'M', 'ꝑ'),
    (0xA751, 'V'),
    (0xA752, 'M', 'ꝓ'),
    (0xA753, 'V'),
    (0xA754, 'M', 'ꝕ'),
    (0xA755, 'V'),
    (0xA756, 'M', 'ꝗ'),
    (0xA757, 'V'),
    (0xA758, 'M', 'ꝙ'),
    (0xA759, 'V'),
    (0xA75A, 'M', 'ꝛ'),
    (0xA75B, 'V'),
    (0xA75C, 'M', 'ꝝ'),
    (0xA75D, 'V'),
    (0xA75E, 'M', 'ꝟ'),
    (0xA75F, 'V'),
    (0xA760, 'M', 'ꝡ'),
    (0xA761, 'V'),
    (0xA762, 'M', 'ꝣ'),
    (0xA763, 'V'),
    (0xA764, 'M', 'ꝥ'),
    (0xA765, 'V'),
    (0xA766, 'M', 'ꝧ'),
    (0xA767, 'V'),
    (0xA768, 'M', 'ꝩ'),
    (0xA769, 'V'),
    (0xA76A, 'M', 'ꝫ'),
    (0xA76B, 'V'),
    (0xA76C, 'M', 'ꝭ'),
    (0xA76D, 'V'),
    (0xA76E, 'M', 'ꝯ'),
    (0xA76F, 'V'),
    (0xA770, 'M', 'ꝯ'),
    (0xA771, 'V'),
    (0xA779, 'M', 'ꝺ'),
    (0xA77A, 'V'),
    (0xA77B, 'M', 'ꝼ'),
    ]

def _seg_37() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xA77C, 'V'),
    (0xA77D, 'M', 'ᵹ'),
    (0xA77E, 'M', 'ꝿ'),
    (0xA77F, 'V'),
    (0xA780, 'M', 'ꞁ'),
    (0xA781, 'V'),
    (0xA782, 'M', 'ꞃ'),
    (0xA783, 'V'),
    (0xA784, 'M', 'ꞅ'),
    (0xA785, 'V'),
    (0xA786, 'M', 'ꞇ'),
    (0xA787, 'V'),
    (0xA78B, 'M', 'ꞌ'),
    (0xA78C, 'V'),
    (0xA78D, 'M', 'ɥ'),
    (0xA78E, 'V'),
    (0xA790, 'M', 'ꞑ'),
    (0xA791, 'V'),
    (0xA792, 'M', 'ꞓ'),
    (0xA793, 'V'),
    (0xA796, 'M', 'ꞗ'),
    (0xA797, 'V'),
    (0xA798, 'M', 'ꞙ'),
    (0xA799, 'V'),
    (0xA79A, 'M', 'ꞛ'),
    (0xA79B, 'V'),
    (0xA79C, 'M', 'ꞝ'),
    (0xA79D, 'V'),
    (0xA79E, 'M', 'ꞟ'),
    (0xA79F, 'V'),
    (0xA7A0, 'M', 'ꞡ'),
    (0xA7A1, 'V'),
    (0xA7A2, 'M', 'ꞣ'),
    (0xA7A3, 'V'),
    (0xA7A4, 'M', 'ꞥ'),
    (0xA7A5, 'V'),
    (0xA7A6, 'M', 'ꞧ'),
    (0xA7A7, 'V'),
    (0xA7A8, 'M', 'ꞩ'),
    (0xA7A9, 'V'),
    (0xA7AA, 'M', 'ɦ'),
    (0xA7AB, 'M', 'ɜ'),
    (0xA7AC, 'M', 'ɡ'),
    (0xA7AD, 'M', 'ɬ'),
    (0xA7AE, 'M', 'ɪ'),
    (0xA7AF, 'V'),
    (0xA7B0, 'M', 'ʞ'),
    (0xA7B1, 'M', 'ʇ'),
    (0xA7B2, 'M', 'ʝ'),
    (0xA7B3, 'M', 'ꭓ'),
    (0xA7B4, 'M', 'ꞵ'),
    (0xA7B5, 'V'),
    (0xA7B6, 'M', 'ꞷ'),
    (0xA7B7, 'V'),
    (0xA7B8, 'M', 'ꞹ'),
    (0xA7B9, 'V'),
    (0xA7BA, 'M', 'ꞻ'),
    (0xA7BB, 'V'),
    (0xA7BC, 'M', 'ꞽ'),
    (0xA7BD, 'V'),
    (0xA7BE, 'M', 'ꞿ'),
    (0xA7BF, 'V'),
    (0xA7C0, 'M', 'ꟁ'),
    (0xA7C1, 'V'),
    (0xA7C2, 'M', 'ꟃ'),
    (0xA7C3, 'V'),
    (0xA7C4, 'M', 'ꞔ'),
    (0xA7C5, 'M', 'ʂ'),
    (0xA7C6, 'M', 'ᶎ'),
    (0xA7C7, 'M', 'ꟈ'),
    (0xA7C8, 'V'),
    (0xA7C9, 'M', 'ꟊ'),
    (0xA7CA, 'V'),
    (0xA7CB, 'X'),
    (0xA7D0, 'M', 'ꟑ'),
    (0xA7D1, 'V'),
    (0xA7D2, 'X'),
    (0xA7D3, 'V'),
    (0xA7D4, 'X'),
    (0xA7D5, 'V'),
    (0xA7D6, 'M', 'ꟗ'),
    (0xA7D7, 'V'),
    (0xA7D8, 'M', 'ꟙ'),
    (0xA7D9, 'V'),
    (0xA7DA, 'X'),
    (0xA7F2, 'M', 'c'),
    (0xA7F3, 'M', 'f'),
    (0xA7F4, 'M', 'q'),
    (0xA7F5, 'M', 'ꟶ'),
    (0xA7F6, 'V'),
    (0xA7F8, 'M', 'ħ'),
    (0xA7F9, 'M', 'œ'),
    (0xA7FA, 'V'),
    (0xA82D, 'X'),
    (0xA830, 'V'),
    (0xA83A, 'X'),
    (0xA840, 'V'),
    (0xA878, 'X'),
    (0xA880, 'V'),
    (0xA8C6, 'X'),
    ]

def _seg_38() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xA8CE, 'V'),
    (0xA8DA, 'X'),
    (0xA8E0, 'V'),
    (0xA954, 'X'),
    (0xA95F, 'V'),
    (0xA97D, 'X'),
    (0xA980, 'V'),
    (0xA9CE, 'X'),
    (0xA9CF, 'V'),
    (0xA9DA, 'X'),
    (0xA9DE, 'V'),
    (0xA9FF, 'X'),
    (0xAA00, 'V'),
    (0xAA37, 'X'),
    (0xAA40, 'V'),
    (0xAA4E, 'X'),
    (0xAA50, 'V'),
    (0xAA5A, 'X'),
    (0xAA5C, 'V'),
    (0xAAC3, 'X'),
    (0xAADB, 'V'),
    (0xAAF7, 'X'),
    (0xAB01, 'V'),
    (0xAB07, 'X'),
    (0xAB09, 'V'),
    (0xAB0F, 'X'),
    (0xAB11, 'V'),
    (0xAB17, 'X'),
    (0xAB20, 'V'),
    (0xAB27, 'X'),
    (0xAB28, 'V'),
    (0xAB2F, 'X'),
    (0xAB30, 'V'),
    (0xAB5C, 'M', 'ꜧ'),
    (0xAB5D, 'M', 'ꬷ'),
    (0xAB5E, 'M', 'ɫ'),
    (0xAB5F, 'M', 'ꭒ'),
    (0xAB60, 'V'),
    (0xAB69, 'M', 'ʍ'),
    (0xAB6A, 'V'),
    (0xAB6C, 'X'),
    (0xAB70, 'M', 'Ꭰ'),
    (0xAB71, 'M', 'Ꭱ'),
    (0xAB72, 'M', 'Ꭲ'),
    (0xAB73, 'M', 'Ꭳ'),
    (0xAB74, 'M', 'Ꭴ'),
    (0xAB75, 'M', 'Ꭵ'),
    (0xAB76, 'M', 'Ꭶ'),
    (0xAB77, 'M', 'Ꭷ'),
    (0xAB78, 'M', 'Ꭸ'),
    (0xAB79, 'M', 'Ꭹ'),
    (0xAB7A, 'M', 'Ꭺ'),
    (0xAB7B, 'M', 'Ꭻ'),
    (0xAB7C, 'M', 'Ꭼ'),
    (0xAB7D, 'M', 'Ꭽ'),
    (0xAB7E, 'M', 'Ꭾ'),
    (0xAB7F, 'M', 'Ꭿ'),
    (0xAB80, 'M', 'Ꮀ'),
    (0xAB81, 'M', 'Ꮁ'),
    (0xAB82, 'M', 'Ꮂ'),
    (0xAB83, 'M', 'Ꮃ'),
    (0xAB84, 'M', 'Ꮄ'),
    (0xAB85, 'M', 'Ꮅ'),
    (0xAB86, 'M', 'Ꮆ'),
    (0xAB87, 'M', 'Ꮇ'),
    (0xAB88, 'M', 'Ꮈ'),
    (0xAB89, 'M', 'Ꮉ'),
    (0xAB8A, 'M', 'Ꮊ'),
    (0xAB8B, 'M', 'Ꮋ'),
    (0xAB8C, 'M', 'Ꮌ'),
    (0xAB8D, 'M', 'Ꮍ'),
    (0xAB8E, 'M', 'Ꮎ'),
    (0xAB8F, 'M', 'Ꮏ'),
    (0xAB90, 'M', 'Ꮐ'),
    (0xAB91, 'M', 'Ꮑ'),
    (0xAB92, 'M', 'Ꮒ'),
    (0xAB93, 'M', 'Ꮓ'),
    (0xAB94, 'M', 'Ꮔ'),
    (0xAB95, 'M', 'Ꮕ'),
    (0xAB96, 'M', 'Ꮖ'),
    (0xAB97, 'M', 'Ꮗ'),
    (0xAB98, 'M', 'Ꮘ'),
    (0xAB99, 'M', 'Ꮙ'),
    (0xAB9A, 'M', 'Ꮚ'),
    (0xAB9B, 'M', 'Ꮛ'),
    (0xAB9C, 'M', 'Ꮜ'),
    (0xAB9D, 'M', 'Ꮝ'),
    (0xAB9E, 'M', 'Ꮞ'),
    (0xAB9F, 'M', 'Ꮟ'),
    (0xABA0, 'M', 'Ꮠ'),
    (0xABA1, 'M', 'Ꮡ'),
    (0xABA2, 'M', 'Ꮢ'),
    (0xABA3, 'M', 'Ꮣ'),
    (0xABA4, 'M', 'Ꮤ'),
    (0xABA5, 'M', 'Ꮥ'),
    (0xABA6, 'M', 'Ꮦ'),
    (0xABA7, 'M', 'Ꮧ'),
    (0xABA8, 'M', 'Ꮨ'),
    (0xABA9, 'M', 'Ꮩ'),
    (0xABAA, 'M', 'Ꮪ'),
    ]

def _seg_39() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xABAB, 'M', 'Ꮫ'),
    (0xABAC, 'M', 'Ꮬ'),
    (0xABAD, 'M', 'Ꮭ'),
    (0xABAE, 'M', 'Ꮮ'),
    (0xABAF, 'M', 'Ꮯ'),
    (0xABB0, 'M', 'Ꮰ'),
    (0xABB1, 'M', 'Ꮱ'),
    (0xABB2, 'M', 'Ꮲ'),
    (0xABB3, 'M', 'Ꮳ'),
    (0xABB4, 'M', 'Ꮴ'),
    (0xABB5, 'M', 'Ꮵ'),
    (0xABB6, 'M', 'Ꮶ'),
    (0xABB7, 'M', 'Ꮷ'),
    (0xABB8, 'M', 'Ꮸ'),
    (0xABB9, 'M', 'Ꮹ'),
    (0xABBA, 'M', 'Ꮺ'),
    (0xABBB, 'M', 'Ꮻ'),
    (0xABBC, 'M', 'Ꮼ'),
    (0xABBD, 'M', 'Ꮽ'),
    (0xABBE, 'M', 'Ꮾ'),
    (0xABBF, 'M', 'Ꮿ'),
    (0xABC0, 'V'),
    (0xABEE, 'X'),
    (0xABF0, 'V'),
    (0xABFA, 'X'),
    (0xAC00, 'V'),
    (0xD7A4, 'X'),
    (0xD7B0, 'V'),
    (0xD7C7, 'X'),
    (0xD7CB, 'V'),
    (0xD7FC, 'X'),
    (0xF900, 'M', '豈'),
    (0xF901, 'M', '更'),
    (0xF902, 'M', '車'),
    (0xF903, 'M', '賈'),
    (0xF904, 'M', '滑'),
    (0xF905, 'M', '串'),
    (0xF906, 'M', '句'),
    (0xF907, 'M', '龜'),
    (0xF909, 'M', '契'),
    (0xF90A, 'M', '金'),
    (0xF90B, 'M', '喇'),
    (0xF90C, 'M', '奈'),
    (0xF90D, 'M', '懶'),
    (0xF90E, 'M', '癩'),
    (0xF90F, 'M', '羅'),
    (0xF910, 'M', '蘿'),
    (0xF911, 'M', '螺'),
    (0xF912, 'M', '裸'),
    (0xF913, 'M', '邏'),
    (0xF914, 'M', '樂'),
    (0xF915, 'M', '洛'),
    (0xF916, 'M', '烙'),
    (0xF917, 'M', '珞'),
    (0xF918, 'M', '落'),
    (0xF919, 'M', '酪'),
    (0xF91A, 'M', '駱'),
    (0xF91B, 'M', '亂'),
    (0xF91C, 'M', '卵'),
    (0xF91D, 'M', '欄'),
    (0xF91E, 'M', '爛'),
    (0xF91F, 'M', '蘭'),
    (0xF920, 'M', '鸞'),
    (0xF921, 'M', '嵐'),
    (0xF922, 'M', '濫'),
    (0xF923, 'M', '藍'),
    (0xF924, 'M', '襤'),
    (0xF925, 'M', '拉'),
    (0xF926, 'M', '臘'),
    (0xF927, 'M', '蠟'),
    (0xF928, 'M', '廊'),
    (0xF929, 'M', '朗'),
    (0xF92A, 'M', '浪'),
    (0xF92B, 'M', '狼'),
    (0xF92C, 'M', '郎'),
    (0xF92D, 'M', '來'),
    (0xF92E, 'M', '冷'),
    (0xF92F, 'M', '勞'),
    (0xF930, 'M', '擄'),
    (0xF931, 'M', '櫓'),
    (0xF932, 'M', '爐'),
    (0xF933, 'M', '盧'),
    (0xF934, 'M', '老'),
    (0xF935, 'M', '蘆'),
    (0xF936, 'M', '虜'),
    (0xF937, 'M', '路'),
    (0xF938, 'M', '露'),
    (0xF939, 'M', '魯'),
    (0xF93A, 'M', '鷺'),
    (0xF93B, 'M', '碌'),
    (0xF93C, 'M', '祿'),
    (0xF93D, 'M', '綠'),
    (0xF93E, 'M', '菉'),
    (0xF93F, 'M', '錄'),
    (0xF940, 'M', '鹿'),
    (0xF941, 'M', '論'),
    (0xF942, 'M', '壟'),
    (0xF943, 'M', '弄'),
    (0xF944, 'M', '籠'),
    (0xF945, 'M', '聾'),
    ]

def _seg_40() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xF946, 'M', '牢'),
    (0xF947, 'M', '磊'),
    (0xF948, 'M', '賂'),
    (0xF949, 'M', '雷'),
    (0xF94A, 'M', '壘'),
    (0xF94B, 'M', '屢'),
    (0xF94C, 'M', '樓'),
    (0xF94D, 'M', '淚'),
    (0xF94E, 'M', '漏'),
    (0xF94F, 'M', '累'),
    (0xF950, 'M', '縷'),
    (0xF951, 'M', '陋'),
    (0xF952, 'M', '勒'),
    (0xF953, 'M', '肋'),
    (0xF954, 'M', '凜'),
    (0xF955, 'M', '凌'),
    (0xF956, 'M', '稜'),
    (0xF957, 'M', '綾'),
    (0xF958, 'M', '菱'),
    (0xF959, 'M', '陵'),
    (0xF95A, 'M', '讀'),
    (0xF95B, 'M', '拏'),
    (0xF95C, 'M', '樂'),
    (0xF95D, 'M', '諾'),
    (0xF95E, 'M', '丹'),
    (0xF95F, 'M', '寧'),
    (0xF960, 'M', '怒'),
    (0xF961, 'M', '率'),
    (0xF962, 'M', '異'),
    (0xF963, 'M', '北'),
    (0xF964, 'M', '磻'),
    (0xF965, 'M', '便'),
    (0xF966, 'M', '復'),
    (0xF967, 'M', '不'),
    (0xF968, 'M', '泌'),
    (0xF969, 'M', '數'),
    (0xF96A, 'M', '索'),
    (0xF96B, 'M', '參'),
    (0xF96C, 'M', '塞'),
    (0xF96D, 'M', '省'),
    (0xF96E, 'M', '葉'),
    (0xF96F, 'M', '說'),
    (0xF970, 'M', '殺'),
    (0xF971, 'M', '辰'),
    (0xF972, 'M', '沈'),
    (0xF973, 'M', '拾'),
    (0xF974, 'M', '若'),
    (0xF975, 'M', '掠'),
    (0xF976, 'M', '略'),
    (0xF977, 'M', '亮'),
    (0xF978, 'M', '兩'),
    (0xF979, 'M', '凉'),
    (0xF97A, 'M', '梁'),
    (0xF97B, 'M', '糧'),
    (0xF97C, 'M', '良'),
    (0xF97D, 'M', '諒'),
    (0xF97E, 'M', '量'),
    (0xF97F, 'M', '勵'),
    (0xF980, 'M', '呂'),
    (0xF981, 'M', '女'),
    (0xF982, 'M', '廬'),
    (0xF983, 'M', '旅'),
    (0xF984, 'M', '濾'),
    (0xF985, 'M', '礪'),
    (0xF986, 'M', '閭'),
    (0xF987, 'M', '驪'),
    (0xF988, 'M', '麗'),
    (0xF989, 'M', '黎'),
    (0xF98A, 'M', '力'),
    (0xF98B, 'M', '曆'),
    (0xF98C, 'M', '歷'),
    (0xF98D, 'M', '轢'),
    (0xF98E, 'M', '年'),
    (0xF98F, 'M', '憐'),
    (0xF990, 'M', '戀'),
    (0xF991, 'M', '撚'),
    (0xF992, 'M', '漣'),
    (0xF993, 'M', '煉'),
    (0xF994, 'M', '璉'),
    (0xF995, 'M', '秊'),
    (0xF996, 'M', '練'),
    (0xF997, 'M', '聯'),
    (0xF998, 'M', '輦'),
    (0xF999, 'M', '蓮'),
    (0xF99A, 'M', '連'),
    (0xF99B, 'M', '鍊'),
    (0xF99C, 'M', '列'),
    (0xF99D, 'M', '劣'),
    (0xF99E, 'M', '咽'),
    (0xF99F, 'M', '烈'),
    (0xF9A0, 'M', '裂'),
    (0xF9A1, 'M', '說'),
    (0xF9A2, 'M', '廉'),
    (0xF9A3, 'M', '念'),
    (0xF9A4, 'M', '捻'),
    (0xF9A5, 'M', '殮'),
    (0xF9A6, 'M', '簾'),
    (0xF9A7, 'M', '獵'),
    (0xF9A8, 'M', '令'),
    (0xF9A9, 'M', '囹'),
    ]

def _seg_41() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xF9AA, 'M', '寧'),
    (0xF9AB, 'M', '嶺'),
    (0xF9AC, 'M', '怜'),
    (0xF9AD, 'M', '玲'),
    (0xF9AE, 'M', '瑩'),
    (0xF9AF, 'M', '羚'),
    (0xF9B0, 'M', '聆'),
    (0xF9B1, 'M', '鈴'),
    (0xF9B2, 'M', '零'),
    (0xF9B3, 'M', '靈'),
    (0xF9B4, 'M', '領'),
    (0xF9B5, 'M', '例'),
    (0xF9B6, 'M', '禮'),
    (0xF9B7, 'M', '醴'),
    (0xF9B8, 'M', '隸'),
    (0xF9B9, 'M', '惡'),
    (0xF9BA, 'M', '了'),
    (0xF9BB, 'M', '僚'),
    (0xF9BC, 'M', '寮'),
    (0xF9BD, 'M', '尿'),
    (0xF9BE, 'M', '料'),
    (0xF9BF, 'M', '樂'),
    (0xF9C0, 'M', '燎'),
    (0xF9C1, 'M', '療'),
    (0xF9C2, 'M', '蓼'),
    (0xF9C3, 'M', '遼'),
    (0xF9C4, 'M', '龍'),
    (0xF9C5, 'M', '暈'),
    (0xF9C6, 'M', '阮'),
    (0xF9C7, 'M', '劉'),
    (0xF9C8, 'M', '杻'),
    (0xF9C9, 'M', '柳'),
    (0xF9CA, 'M', '流'),
    (0xF9CB, 'M', '溜'),
    (0xF9CC, 'M', '琉'),
    (0xF9CD, 'M', '留'),
    (0xF9CE, 'M', '硫'),
    (0xF9CF, 'M', '紐'),
    (0xF9D0, 'M', '類'),
    (0xF9D1, 'M', '六'),
    (0xF9D2, 'M', '戮'),
    (0xF9D3, 'M', '陸'),
    (0xF9D4, 'M', '倫'),
    (0xF9D5, 'M', '崙'),
    (0xF9D6, 'M', '淪'),
    (0xF9D7, 'M', '輪'),
    (0xF9D8, 'M', '律'),
    (0xF9D9, 'M', '慄'),
    (0xF9DA, 'M', '栗'),
    (0xF9DB, 'M', '率'),
    (0xF9DC, 'M', '隆'),
    (0xF9DD, 'M', '利'),
    (0xF9DE, 'M', '吏'),
    (0xF9DF, 'M', '履'),
    (0xF9E0, 'M', '易'),
    (0xF9E1, 'M', '李'),
    (0xF9E2, 'M', '梨'),
    (0xF9E3, 'M', '泥'),
    (0xF9E4, 'M', '理'),
    (0xF9E5, 'M', '痢'),
    (0xF9E6, 'M', '罹'),
    (0xF9E7, 'M', '裏'),
    (0xF9E8, 'M', '裡'),
    (0xF9E9, 'M', '里'),
    (0xF9EA, 'M', '離'),
    (0xF9EB, 'M', '匿'),
    (0xF9EC, 'M', '溺'),
    (0xF9ED, 'M', '吝'),
    (0xF9EE, 'M', '燐'),
    (0xF9EF, 'M', '璘'),
    (0xF9F0, 'M', '藺'),
    (0xF9F1, 'M', '隣'),
    (0xF9F2, 'M', '鱗'),
    (0xF9F3, 'M', '麟'),
    (0xF9F4, 'M', '林'),
    (0xF9F5, 'M', '淋'),
    (0xF9F6, 'M', '臨'),
    (0xF9F7, 'M', '立'),
    (0xF9F8, 'M', '笠'),
    (0xF9F9, 'M', '粒'),
    (0xF9FA, 'M', '狀'),
    (0xF9FB, 'M', '炙'),
    (0xF9FC, 'M', '識'),
    (0xF9FD, 'M', '什'),
    (0xF9FE, 'M', '茶'),
    (0xF9FF, 'M', '刺'),
    (0xFA00, 'M', '切'),
    (0xFA01, 'M', '度'),
    (0xFA02, 'M', '拓'),
    (0xFA03, 'M', '糖'),
    (0xFA04, 'M', '宅'),
    (0xFA05, 'M', '洞'),
    (0xFA06, 'M', '暴'),
    (0xFA07, 'M', '輻'),
    (0xFA08, 'M', '行'),
    (0xFA09, 'M', '降'),
    (0xFA0A, 'M', '見'),
    (0xFA0B, 'M', '廓'),
    (0xFA0C, 'M', '兀'),
    (0xFA0D, 'M', '嗀'),
    ]

def _seg_42() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFA0E, 'V'),
    (0xFA10, 'M', '塚'),
    (0xFA11, 'V'),
    (0xFA12, 'M', '晴'),
    (0xFA13, 'V'),
    (0xFA15, 'M', '凞'),
    (0xFA16, 'M', '猪'),
    (0xFA17, 'M', '益'),
    (0xFA18, 'M', '礼'),
    (0xFA19, 'M', '神'),
    (0xFA1A, 'M', '祥'),
    (0xFA1B, 'M', '福'),
    (0xFA1C, 'M', '靖'),
    (0xFA1D, 'M', '精'),
    (0xFA1E, 'M', '羽'),
    (0xFA1F, 'V'),
    (0xFA20, 'M', '蘒'),
    (0xFA21, 'V'),
    (0xFA22, 'M', '諸'),
    (0xFA23, 'V'),
    (0xFA25, 'M', '逸'),
    (0xFA26, 'M', '都'),
    (0xFA27, 'V'),
    (0xFA2A, 'M', '飯'),
    (0xFA2B, 'M', '飼'),
    (0xFA2C, 'M', '館'),
    (0xFA2D, 'M', '鶴'),
    (0xFA2E, 'M', '郞'),
    (0xFA2F, 'M', '隷'),
    (0xFA30, 'M', '侮'),
    (0xFA31, 'M', '僧'),
    (0xFA32, 'M', '免'),
    (0xFA33, 'M', '勉'),
    (0xFA34, 'M', '勤'),
    (0xFA35, 'M', '卑'),
    (0xFA36, 'M', '喝'),
    (0xFA37, 'M', '嘆'),
    (0xFA38, 'M', '器'),
    (0xFA39, 'M', '塀'),
    (0xFA3A, 'M', '墨'),
    (0xFA3B, 'M', '層'),
    (0xFA3C, 'M', '屮'),
    (0xFA3D, 'M', '悔'),
    (0xFA3E, 'M', '慨'),
    (0xFA3F, 'M', '憎'),
    (0xFA40, 'M', '懲'),
    (0xFA41, 'M', '敏'),
    (0xFA42, 'M', '既'),
    (0xFA43, 'M', '暑'),
    (0xFA44, 'M', '梅'),
    (0xFA45, 'M', '海'),
    (0xFA46, 'M', '渚'),
    (0xFA47, 'M', '漢'),
    (0xFA48, 'M', '煮'),
    (0xFA49, 'M', '爫'),
    (0xFA4A, 'M', '琢'),
    (0xFA4B, 'M', '碑'),
    (0xFA4C, 'M', '社'),
    (0xFA4D, 'M', '祉'),
    (0xFA4E, 'M', '祈'),
    (0xFA4F, 'M', '祐'),
    (0xFA50, 'M', '祖'),
    (0xFA51, 'M', '祝'),
    (0xFA52, 'M', '禍'),
    (0xFA53, 'M', '禎'),
    (0xFA54, 'M', '穀'),
    (0xFA55, 'M', '突'),
    (0xFA56, 'M', '節'),
    (0xFA57, 'M', '練'),
    (0xFA58, 'M', '縉'),
    (0xFA59, 'M', '繁'),
    (0xFA5A, 'M', '署'),
    (0xFA5B, 'M', '者'),
    (0xFA5C, 'M', '臭'),
    (0xFA5D, 'M', '艹'),
    (0xFA5F, 'M', '著'),
    (0xFA60, 'M', '褐'),
    (0xFA61, 'M', '視'),
    (0xFA62, 'M', '謁'),
    (0xFA63, 'M', '謹'),
    (0xFA64, 'M', '賓'),
    (0xFA65, 'M', '贈'),
    (0xFA66, 'M', '辶'),
    (0xFA67, 'M', '逸'),
    (0xFA68, 'M', '難'),
    (0xFA69, 'M', '響'),
    (0xFA6A, 'M', '頻'),
    (0xFA6B, 'M', '恵'),
    (0xFA6C, 'M', '𤋮'),
    (0xFA6D, 'M', '舘'),
    (0xFA6E, 'X'),
    (0xFA70, 'M', '並'),
    (0xFA71, 'M', '况'),
    (0xFA72, 'M', '全'),
    (0xFA73, 'M', '侀'),
    (0xFA74, 'M', '充'),
    (0xFA75, 'M', '冀'),
    (0xFA76, 'M', '勇'),
    (0xFA77, 'M', '勺'),
    (0xFA78, 'M', '喝'),
    ]

def _seg_43() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFA79, 'M', '啕'),
    (0xFA7A, 'M', '喙'),
    (0xFA7B, 'M', '嗢'),
    (0xFA7C, 'M', '塚'),
    (0xFA7D, 'M', '墳'),
    (0xFA7E, 'M', '奄'),
    (0xFA7F, 'M', '奔'),
    (0xFA80, 'M', '婢'),
    (0xFA81, 'M', '嬨'),
    (0xFA82, 'M', '廒'),
    (0xFA83, 'M', '廙'),
    (0xFA84, 'M', '彩'),
    (0xFA85, 'M', '徭'),
    (0xFA86, 'M', '惘'),
    (0xFA87, 'M', '慎'),
    (0xFA88, 'M', '愈'),
    (0xFA89, 'M', '憎'),
    (0xFA8A, 'M', '慠'),
    (0xFA8B, 'M', '懲'),
    (0xFA8C, 'M', '戴'),
    (0xFA8D, 'M', '揄'),
    (0xFA8E, 'M', '搜'),
    (0xFA8F, 'M', '摒'),
    (0xFA90, 'M', '敖'),
    (0xFA91, 'M', '晴'),
    (0xFA92, 'M', '朗'),
    (0xFA93, 'M', '望'),
    (0xFA94, 'M', '杖'),
    (0xFA95, 'M', '歹'),
    (0xFA96, 'M', '殺'),
    (0xFA97, 'M', '流'),
    (0xFA98, 'M', '滛'),
    (0xFA99, 'M', '滋'),
    (0xFA9A, 'M', '漢'),
    (0xFA9B, 'M', '瀞'),
    (0xFA9C, 'M', '煮'),
    (0xFA9D, 'M', '瞧'),
    (0xFA9E, 'M', '爵'),
    (0xFA9F, 'M', '犯'),
    (0xFAA0, 'M', '猪'),
    (0xFAA1, 'M', '瑱'),
    (0xFAA2, 'M', '甆'),
    (0xFAA3, 'M', '画'),
    (0xFAA4, 'M', '瘝'),
    (0xFAA5, 'M', '瘟'),
    (0xFAA6, 'M', '益'),
    (0xFAA7, 'M', '盛'),
    (0xFAA8, 'M', '直'),
    (0xFAA9, 'M', '睊'),
    (0xFAAA, 'M', '着'),
    (0xFAAB, 'M', '磌'),
    (0xFAAC, 'M', '窱'),
    (0xFAAD, 'M', '節'),
    (0xFAAE, 'M', '类'),
    (0xFAAF, 'M', '絛'),
    (0xFAB0, 'M', '練'),
    (0xFAB1, 'M', '缾'),
    (0xFAB2, 'M', '者'),
    (0xFAB3, 'M', '荒'),
    (0xFAB4, 'M', '華'),
    (0xFAB5, 'M', '蝹'),
    (0xFAB6, 'M', '襁'),
    (0xFAB7, 'M', '覆'),
    (0xFAB8, 'M', '視'),
    (0xFAB9, 'M', '調'),
    (0xFABA, 'M', '諸'),
    (0xFABB, 'M', '請'),
    (0xFABC, 'M', '謁'),
    (0xFABD, 'M', '諾'),
    (0xFABE, 'M', '諭'),
    (0xFABF, 'M', '謹'),
    (0xFAC0, 'M', '變'),
    (0xFAC1, 'M', '贈'),
    (0xFAC2, 'M', '輸'),
    (0xFAC3, 'M', '遲'),
    (0xFAC4, 'M', '醙'),
    (0xFAC5, 'M', '鉶'),
    (0xFAC6, 'M', '陼'),
    (0xFAC7, 'M', '難'),
    (0xFAC8, 'M', '靖'),
    (0xFAC9, 'M', '韛'),
    (0xFACA, 'M', '響'),
    (0xFACB, 'M', '頋'),
    (0xFACC, 'M', '頻'),
    (0xFACD, 'M', '鬒'),
    (0xFACE, 'M', '龜'),
    (0xFACF, 'M', '𢡊'),
    (0xFAD0, 'M', '𢡄'),
    (0xFAD1, 'M', '𣏕'),
    (0xFAD2, 'M', '㮝'),
    (0xFAD3, 'M', '䀘'),
    (0xFAD4, 'M', '䀹'),
    (0xFAD5, 'M', '𥉉'),
    (0xFAD6, 'M', '𥳐'),
    (0xFAD7, 'M', '𧻓'),
    (0xFAD8, 'M', '齃'),
    (0xFAD9, 'M', '龎'),
    (0xFADA, 'X'),
    (0xFB00, 'M', 'ff'),
    (0xFB01, 'M', 'fi'),
    ]

def _seg_44() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFB02, 'M', 'fl'),
    (0xFB03, 'M', 'ffi'),
    (0xFB04, 'M', 'ffl'),
    (0xFB05, 'M', 'st'),
    (0xFB07, 'X'),
    (0xFB13, 'M', 'մն'),
    (0xFB14, 'M', 'մե'),
    (0xFB15, 'M', 'մի'),
    (0xFB16, 'M', 'վն'),
    (0xFB17, 'M', 'մխ'),
    (0xFB18, 'X'),
    (0xFB1D, 'M', 'יִ'),
    (0xFB1E, 'V'),
    (0xFB1F, 'M', 'ײַ'),
    (0xFB20, 'M', 'ע'),
    (0xFB21, 'M', 'א'),
    (0xFB22, 'M', 'ד'),
    (0xFB23, 'M', 'ה'),
    (0xFB24, 'M', 'כ'),
    (0xFB25, 'M', 'ל'),
    (0xFB26, 'M', 'ם'),
    (0xFB27, 'M', 'ר'),
    (0xFB28, 'M', 'ת'),
    (0xFB29, '3', '+'),
    (0xFB2A, 'M', 'שׁ'),
    (0xFB2B, 'M', 'שׂ'),
    (0xFB2C, 'M', 'שּׁ'),
    (0xFB2D, 'M', 'שּׂ'),
    (0xFB2E, 'M', 'אַ'),
    (0xFB2F, 'M', 'אָ'),
    (0xFB30, 'M', 'אּ'),
    (0xFB31, 'M', 'בּ'),
    (0xFB32, 'M', 'גּ'),
    (0xFB33, 'M', 'דּ'),
    (0xFB34, 'M', 'הּ'),
    (0xFB35, 'M', 'וּ'),
    (0xFB36, 'M', 'זּ'),
    (0xFB37, 'X'),
    (0xFB38, 'M', 'טּ'),
    (0xFB39, 'M', 'יּ'),
    (0xFB3A, 'M', 'ךּ'),
    (0xFB3B, 'M', 'כּ'),
    (0xFB3C, 'M', 'לּ'),
    (0xFB3D, 'X'),
    (0xFB3E, 'M', 'מּ'),
    (0xFB3F, 'X'),
    (0xFB40, 'M', 'נּ'),
    (0xFB41, 'M', 'סּ'),
    (0xFB42, 'X'),
    (0xFB43, 'M', 'ףּ'),
    (0xFB44, 'M', 'פּ'),
    (0xFB45, 'X'),
    (0xFB46, 'M', 'צּ'),
    (0xFB47, 'M', 'קּ'),
    (0xFB48, 'M', 'רּ'),
    (0xFB49, 'M', 'שּ'),
    (0xFB4A, 'M', 'תּ'),
    (0xFB4B, 'M', 'וֹ'),
    (0xFB4C, 'M', 'בֿ'),
    (0xFB4D, 'M', 'כֿ'),
    (0xFB4E, 'M', 'פֿ'),
    (0xFB4F, 'M', 'אל'),
    (0xFB50, 'M', 'ٱ'),
    (0xFB52, 'M', 'ٻ'),
    (0xFB56, 'M', 'پ'),
    (0xFB5A, 'M', 'ڀ'),
    (0xFB5E, 'M', 'ٺ'),
    (0xFB62, 'M', 'ٿ'),
    (0xFB66, 'M', 'ٹ'),
    (0xFB6A, 'M', 'ڤ'),
    (0xFB6E, 'M', 'ڦ'),
    (0xFB72, 'M', 'ڄ'),
    (0xFB76, 'M', 'ڃ'),
    (0xFB7A, 'M', 'چ'),
    (0xFB7E, 'M', 'ڇ'),
    (0xFB82, 'M', 'ڍ'),
    (0xFB84, 'M', 'ڌ'),
    (0xFB86, 'M', 'ڎ'),
    (0xFB88, 'M', 'ڈ'),
    (0xFB8A, 'M', 'ژ'),
    (0xFB8C, 'M', 'ڑ'),
    (0xFB8E, 'M', 'ک'),
    (0xFB92, 'M', 'گ'),
    (0xFB96, 'M', 'ڳ'),
    (0xFB9A, 'M', 'ڱ'),
    (0xFB9E, 'M', 'ں'),
    (0xFBA0, 'M', 'ڻ'),
    (0xFBA4, 'M', 'ۀ'),
    (0xFBA6, 'M', 'ہ'),
    (0xFBAA, 'M', 'ھ'),
    (0xFBAE, 'M', 'ے'),
    (0xFBB0, 'M', 'ۓ'),
    (0xFBB2, 'V'),
    (0xFBC3, 'X'),
    (0xFBD3, 'M', 'ڭ'),
    (0xFBD7, 'M', 'ۇ'),
    (0xFBD9, 'M', 'ۆ'),
    (0xFBDB, 'M', 'ۈ'),
    (0xFBDD, 'M', 'ۇٴ'),
    (0xFBDE, 'M', 'ۋ'),
    ]

def _seg_45() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFBE0, 'M', 'ۅ'),
    (0xFBE2, 'M', 'ۉ'),
    (0xFBE4, 'M', 'ې'),
    (0xFBE8, 'M', 'ى'),
    (0xFBEA, 'M', 'ئا'),
    (0xFBEC, 'M', 'ئە'),
    (0xFBEE, 'M', 'ئو'),
    (0xFBF0, 'M', 'ئۇ'),
    (0xFBF2, 'M', 'ئۆ'),
    (0xFBF4, 'M', 'ئۈ'),
    (0xFBF6, 'M', 'ئې'),
    (0xFBF9, 'M', 'ئى'),
    (0xFBFC, 'M', 'ی'),
    (0xFC00, 'M', 'ئج'),
    (0xFC01, 'M', 'ئح'),
    (0xFC02, 'M', 'ئم'),
    (0xFC03, 'M', 'ئى'),
    (0xFC04, 'M', 'ئي'),
    (0xFC05, 'M', 'بج'),
    (0xFC06, 'M', 'بح'),
    (0xFC07, 'M', 'بخ'),
    (0xFC08, 'M', 'بم'),
    (0xFC09, 'M', 'بى'),
    (0xFC0A, 'M', 'بي'),
    (0xFC0B, 'M', 'تج'),
    (0xFC0C, 'M', 'تح'),
    (0xFC0D, 'M', 'تخ'),
    (0xFC0E, 'M', 'تم'),
    (0xFC0F, 'M', 'تى'),
    (0xFC10, 'M', 'تي'),
    (0xFC11, 'M', 'ثج'),
    (0xFC12, 'M', 'ثم'),
    (0xFC13, 'M', 'ثى'),
    (0xFC14, 'M', 'ثي'),
    (0xFC15, 'M', 'جح'),
    (0xFC16, 'M', 'جم'),
    (0xFC17, 'M', 'حج'),
    (0xFC18, 'M', 'حم'),
    (0xFC19, 'M', 'خج'),
    (0xFC1A, 'M', 'خح'),
    (0xFC1B, 'M', 'خم'),
    (0xFC1C, 'M', 'سج'),
    (0xFC1D, 'M', 'سح'),
    (0xFC1E, 'M', 'سخ'),
    (0xFC1F, 'M', 'سم'),
    (0xFC20, 'M', 'صح'),
    (0xFC21, 'M', 'صم'),
    (0xFC22, 'M', 'ضج'),
    (0xFC23, 'M', 'ضح'),
    (0xFC24, 'M', 'ضخ'),
    (0xFC25, 'M', 'ضم'),
    (0xFC26, 'M', 'طح'),
    (0xFC27, 'M', 'طم'),
    (0xFC28, 'M', 'ظم'),
    (0xFC29, 'M', 'عج'),
    (0xFC2A, 'M', 'عم'),
    (0xFC2B, 'M', 'غج'),
    (0xFC2C, 'M', 'غم'),
    (0xFC2D, 'M', 'فج'),
    (0xFC2E, 'M', 'فح'),
    (0xFC2F, 'M', 'فخ'),
    (0xFC30, 'M', 'فم'),
    (0xFC31, 'M', 'فى'),
    (0xFC32, 'M', 'في'),
    (0xFC33, 'M', 'قح'),
    (0xFC34, 'M', 'قم'),
    (0xFC35, 'M', 'قى'),
    (0xFC36, 'M', 'قي'),
    (0xFC37, 'M', 'كا'),
    (0xFC38, 'M', 'كج'),
    (0xFC39, 'M', 'كح'),
    (0xFC3A, 'M', 'كخ'),
    (0xFC3B, 'M', 'كل'),
    (0xFC3C, 'M', 'كم'),
    (0xFC3D, 'M', 'كى'),
    (0xFC3E, 'M', 'كي'),
    (0xFC3F, 'M', 'لج'),
    (0xFC40, 'M', 'لح'),
    (0xFC41, 'M', 'لخ'),
    (0xFC42, 'M', 'لم'),
    (0xFC43, 'M', 'لى'),
    (0xFC44, 'M', 'لي'),
    (0xFC45, 'M', 'مج'),
    (0xFC46, 'M', 'مح'),
    (0xFC47, 'M', 'مخ'),
    (0xFC48, 'M', 'مم'),
    (0xFC49, 'M', 'مى'),
    (0xFC4A, 'M', 'مي'),
    (0xFC4B, 'M', 'نج'),
    (0xFC4C, 'M', 'نح'),
    (0xFC4D, 'M', 'نخ'),
    (0xFC4E, 'M', 'نم'),
    (0xFC4F, 'M', 'نى'),
    (0xFC50, 'M', 'ني'),
    (0xFC51, 'M', 'هج'),
    (0xFC52, 'M', 'هم'),
    (0xFC53, 'M', 'هى'),
    (0xFC54, 'M', 'هي'),
    (0xFC55, 'M', 'يج'),
    (0xFC56, 'M', 'يح'),
    ]

def _seg_46() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFC57, 'M', 'يخ'),
    (0xFC58, 'M', 'يم'),
    (0xFC59, 'M', 'يى'),
    (0xFC5A, 'M', 'يي'),
    (0xFC5B, 'M', 'ذٰ'),
    (0xFC5C, 'M', 'رٰ'),
    (0xFC5D, 'M', 'ىٰ'),
    (0xFC5E, '3', ' ٌّ'),
    (0xFC5F, '3', ' ٍّ'),
    (0xFC60, '3', ' َّ'),
    (0xFC61, '3', ' ُّ'),
    (0xFC62, '3', ' ِّ'),
    (0xFC63, '3', ' ّٰ'),
    (0xFC64, 'M', 'ئر'),
    (0xFC65, 'M', 'ئز'),
    (0xFC66, 'M', 'ئم'),
    (0xFC67, 'M', 'ئن'),
    (0xFC68, 'M', 'ئى'),
    (0xFC69, 'M', 'ئي'),
    (0xFC6A, 'M', 'بر'),
    (0xFC6B, 'M', 'بز'),
    (0xFC6C, 'M', 'بم'),
    (0xFC6D, 'M', 'بن'),
    (0xFC6E, 'M', 'بى'),
    (0xFC6F, 'M', 'بي'),
    (0xFC70, 'M', 'تر'),
    (0xFC71, 'M', 'تز'),
    (0xFC72, 'M', 'تم'),
    (0xFC73, 'M', 'تن'),
    (0xFC74, 'M', 'تى'),
    (0xFC75, 'M', 'تي'),
    (0xFC76, 'M', 'ثر'),
    (0xFC77, 'M', 'ثز'),
    (0xFC78, 'M', 'ثم'),
    (0xFC79, 'M', 'ثن'),
    (0xFC7A, 'M', 'ثى'),
    (0xFC7B, 'M', 'ثي'),
    (0xFC7C, 'M', 'فى'),
    (0xFC7D, 'M', 'في'),
    (0xFC7E, 'M', 'قى'),
    (0xFC7F, 'M', 'قي'),
    (0xFC80, 'M', 'كا'),
    (0xFC81, 'M', 'كل'),
    (0xFC82, 'M', 'كم'),
    (0xFC83, 'M', 'كى'),
    (0xFC84, 'M', 'كي'),
    (0xFC85, 'M', 'لم'),
    (0xFC86, 'M', 'لى'),
    (0xFC87, 'M', 'لي'),
    (0xFC88, 'M', 'ما'),
    (0xFC89, 'M', 'مم'),
    (0xFC8A, 'M', 'نر'),
    (0xFC8B, 'M', 'نز'),
    (0xFC8C, 'M', 'نم'),
    (0xFC8D, 'M', 'نن'),
    (0xFC8E, 'M', 'نى'),
    (0xFC8F, 'M', 'ني'),
    (0xFC90, 'M', 'ىٰ'),
    (0xFC91, 'M', 'ير'),
    (0xFC92, 'M', 'يز'),
    (0xFC93, 'M', 'يم'),
    (0xFC94, 'M', 'ين'),
    (0xFC95, 'M', 'يى'),
    (0xFC96, 'M', 'يي'),
    (0xFC97, 'M', 'ئج'),
    (0xFC98, 'M', 'ئح'),
    (0xFC99, 'M', 'ئخ'),
    (0xFC9A, 'M', 'ئم'),
    (0xFC9B, 'M', 'ئه'),
    (0xFC9C, 'M', 'بج'),
    (0xFC9D, 'M', 'بح'),
    (0xFC9E, 'M', 'بخ'),
    (0xFC9F, 'M', 'بم'),
    (0xFCA0, 'M', 'به'),
    (0xFCA1, 'M', 'تج'),
    (0xFCA2, 'M', 'تح'),
    (0xFCA3, 'M', 'تخ'),
    (0xFCA4, 'M', 'تم'),
    (0xFCA5, 'M', 'ته'),
    (0xFCA6, 'M', 'ثم'),
    (0xFCA7, 'M', 'جح'),
    (0xFCA8, 'M', 'جم'),
    (0xFCA9, 'M', 'حج'),
    (0xFCAA, 'M', 'حم'),
    (0xFCAB, 'M', 'خج'),
    (0xFCAC, 'M', 'خم'),
    (0xFCAD, 'M', 'سج'),
    (0xFCAE, 'M', 'سح'),
    (0xFCAF, 'M', 'سخ'),
    (0xFCB0, 'M', 'سم'),
    (0xFCB1, 'M', 'صح'),
    (0xFCB2, 'M', 'صخ'),
    (0xFCB3, 'M', 'صم'),
    (0xFCB4, 'M', 'ضج'),
    (0xFCB5, 'M', 'ضح'),
    (0xFCB6, 'M', 'ضخ'),
    (0xFCB7, 'M', 'ضم'),
    (0xFCB8, 'M', 'طح'),
    (0xFCB9, 'M', 'ظم'),
    (0xFCBA, 'M', 'عج'),
    ]

def _seg_47() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFCBB, 'M', 'عم'),
    (0xFCBC, 'M', 'غج'),
    (0xFCBD, 'M', 'غم'),
    (0xFCBE, 'M', 'فج'),
    (0xFCBF, 'M', 'فح'),
    (0xFCC0, 'M', 'فخ'),
    (0xFCC1, 'M', 'فم'),
    (0xFCC2, 'M', 'قح'),
    (0xFCC3, 'M', 'قم'),
    (0xFCC4, 'M', 'كج'),
    (0xFCC5, 'M', 'كح'),
    (0xFCC6, 'M', 'كخ'),
    (0xFCC7, 'M', 'كل'),
    (0xFCC8, 'M', 'كم'),
    (0xFCC9, 'M', 'لج'),
    (0xFCCA, 'M', 'لح'),
    (0xFCCB, 'M', 'لخ'),
    (0xFCCC, 'M', 'لم'),
    (0xFCCD, 'M', 'له'),
    (0xFCCE, 'M', 'مج'),
    (0xFCCF, 'M', 'مح'),
    (0xFCD0, 'M', 'مخ'),
    (0xFCD1, 'M', 'مم'),
    (0xFCD2, 'M', 'نج'),
    (0xFCD3, 'M', 'نح'),
    (0xFCD4, 'M', 'نخ'),
    (0xFCD5, 'M', 'نم'),
    (0xFCD6, 'M', 'نه'),
    (0xFCD7, 'M', 'هج'),
    (0xFCD8, 'M', 'هم'),
    (0xFCD9, 'M', 'هٰ'),
    (0xFCDA, 'M', 'يج'),
    (0xFCDB, 'M', 'يح'),
    (0xFCDC, 'M', 'يخ'),
    (0xFCDD, 'M', 'يم'),
    (0xFCDE, 'M', 'يه'),
    (0xFCDF, 'M', 'ئم'),
    (0xFCE0, 'M', 'ئه'),
    (0xFCE1, 'M', 'بم'),
    (0xFCE2, 'M', 'به'),
    (0xFCE3, 'M', 'تم'),
    (0xFCE4, 'M', 'ته'),
    (0xFCE5, 'M', 'ثم'),
    (0xFCE6, 'M', 'ثه'),
    (0xFCE7, 'M', 'سم'),
    (0xFCE8, 'M', 'سه'),
    (0xFCE9, 'M', 'شم'),
    (0xFCEA, 'M', 'شه'),
    (0xFCEB, 'M', 'كل'),
    (0xFCEC, 'M', 'كم'),
    (0xFCED, 'M', 'لم'),
    (0xFCEE, 'M', 'نم'),
    (0xFCEF, 'M', 'نه'),
    (0xFCF0, 'M', 'يم'),
    (0xFCF1, 'M', 'يه'),
    (0xFCF2, 'M', 'ـَّ'),
    (0xFCF3, 'M', 'ـُّ'),
    (0xFCF4, 'M', 'ـِّ'),
    (0xFCF5, 'M', 'طى'),
    (0xFCF6, 'M', 'طي'),
    (0xFCF7, 'M', 'عى'),
    (0xFCF8, 'M', 'عي'),
    (0xFCF9, 'M', 'غى'),
    (0xFCFA, 'M', 'غي'),
    (0xFCFB, 'M', 'سى'),
    (0xFCFC, 'M', 'سي'),
    (0xFCFD, 'M', 'شى'),
    (0xFCFE, 'M', 'شي'),
    (0xFCFF, 'M', 'حى'),
    (0xFD00, 'M', 'حي'),
    (0xFD01, 'M', 'جى'),
    (0xFD02, 'M', 'جي'),
    (0xFD03, 'M', 'خى'),
    (0xFD04, 'M', 'خي'),
    (0xFD05, 'M', 'صى'),
    (0xFD06, 'M', 'صي'),
    (0xFD07, 'M', 'ضى'),
    (0xFD08, 'M', 'ضي'),
    (0xFD09, 'M', 'شج'),
    (0xFD0A, 'M', 'شح'),
    (0xFD0B, 'M', 'شخ'),
    (0xFD0C, 'M', 'شم'),
    (0xFD0D, 'M', 'شر'),
    (0xFD0E, 'M', 'سر'),
    (0xFD0F, 'M', 'صر'),
    (0xFD10, 'M', 'ضر'),
    (0xFD11, 'M', 'طى'),
    (0xFD12, 'M', 'طي'),
    (0xFD13, 'M', 'عى'),
    (0xFD14, 'M', 'عي'),
    (0xFD15, 'M', 'غى'),
    (0xFD16, 'M', 'غي'),
    (0xFD17, 'M', 'سى'),
    (0xFD18, 'M', 'سي'),
    (0xFD19, 'M', 'شى'),
    (0xFD1A, 'M', 'شي'),
    (0xFD1B, 'M', 'حى'),
    (0xFD1C, 'M', 'حي'),
    (0xFD1D, 'M', 'جى'),
    (0xFD1E, 'M', 'جي'),
    ]

def _seg_48() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFD1F, 'M', 'خى'),
    (0xFD20, 'M', 'خي'),
    (0xFD21, 'M', 'صى'),
    (0xFD22, 'M', 'صي'),
    (0xFD23, 'M', 'ضى'),
    (0xFD24, 'M', 'ضي'),
    (0xFD25, 'M', 'شج'),
    (0xFD26, 'M', 'شح'),
    (0xFD27, 'M', 'شخ'),
    (0xFD28, 'M', 'شم'),
    (0xFD29, 'M', 'شر'),
    (0xFD2A, 'M', 'سر'),
    (0xFD2B, 'M', 'صر'),
    (0xFD2C, 'M', 'ضر'),
    (0xFD2D, 'M', 'شج'),
    (0xFD2E, 'M', 'شح'),
    (0xFD2F, 'M', 'شخ'),
    (0xFD30, 'M', 'شم'),
    (0xFD31, 'M', 'سه'),
    (0xFD32, 'M', 'شه'),
    (0xFD33, 'M', 'طم'),
    (0xFD34, 'M', 'سج'),
    (0xFD35, 'M', 'سح'),
    (0xFD36, 'M', 'سخ'),
    (0xFD37, 'M', 'شج'),
    (0xFD38, 'M', 'شح'),
    (0xFD39, 'M', 'شخ'),
    (0xFD3A, 'M', 'طم'),
    (0xFD3B, 'M', 'ظم'),
    (0xFD3C, 'M', 'اً'),
    (0xFD3E, 'V'),
    (0xFD50, 'M', 'تجم'),
    (0xFD51, 'M', 'تحج'),
    (0xFD53, 'M', 'تحم'),
    (0xFD54, 'M', 'تخم'),
    (0xFD55, 'M', 'تمج'),
    (0xFD56, 'M', 'تمح'),
    (0xFD57, 'M', 'تمخ'),
    (0xFD58, 'M', 'جمح'),
    (0xFD5A, 'M', 'حمي'),
    (0xFD5B, 'M', 'حمى'),
    (0xFD5C, 'M', 'سحج'),
    (0xFD5D, 'M', 'سجح'),
    (0xFD5E, 'M', 'سجى'),
    (0xFD5F, 'M', 'سمح'),
    (0xFD61, 'M', 'سمج'),
    (0xFD62, 'M', 'سمم'),
    (0xFD64, 'M', 'صحح'),
    (0xFD66, 'M', 'صمم'),
    (0xFD67, 'M', 'شحم'),
    (0xFD69, 'M', 'شجي'),
    (0xFD6A, 'M', 'شمخ'),
    (0xFD6C, 'M', 'شمم'),
    (0xFD6E, 'M', 'ضحى'),
    (0xFD6F, 'M', 'ضخم'),
    (0xFD71, 'M', 'طمح'),
    (0xFD73, 'M', 'طمم'),
    (0xFD74, 'M', 'طمي'),
    (0xFD75, 'M', 'عجم'),
    (0xFD76, 'M', 'عمم'),
    (0xFD78, 'M', 'عمى'),
    (0xFD79, 'M', 'غمم'),
    (0xFD7A, 'M', 'غمي'),
    (0xFD7B, 'M', 'غمى'),
    (0xFD7C, 'M', 'فخم'),
    (0xFD7E, 'M', 'قمح'),
    (0xFD7F, 'M', 'قمم'),
    (0xFD80, 'M', 'لحم'),
    (0xFD81, 'M', 'لحي'),
    (0xFD82, 'M', 'لحى'),
    (0xFD83, 'M', 'لجج'),
    (0xFD85, 'M', 'لخم'),
    (0xFD87, 'M', 'لمح'),
    (0xFD89, 'M', 'محج'),
    (0xFD8A, 'M', 'محم'),
    (0xFD8B, 'M', 'محي'),
    (0xFD8C, 'M', 'مجح'),
    (0xFD8D, 'M', 'مجم'),
    (0xFD8E, 'M', 'مخج'),
    (0xFD8F, 'M', 'مخم'),
    (0xFD90, 'X'),
    (0xFD92, 'M', 'مجخ'),
    (0xFD93, 'M', 'همج'),
    (0xFD94, 'M', 'همم'),
    (0xFD95, 'M', 'نحم'),
    (0xFD96, 'M', 'نحى'),
    (0xFD97, 'M', 'نجم'),
    (0xFD99, 'M', 'نجى'),
    (0xFD9A, 'M', 'نمي'),
    (0xFD9B, 'M', 'نمى'),
    (0xFD9C, 'M', 'يمم'),
    (0xFD9E, 'M', 'بخي'),
    (0xFD9F, 'M', 'تجي'),
    (0xFDA0, 'M', 'تجى'),
    (0xFDA1, 'M', 'تخي'),
    (0xFDA2, 'M', 'تخى'),
    (0xFDA3, 'M', 'تمي'),
    (0xFDA4, 'M', 'تمى'),
    (0xFDA5, 'M', 'جمي'),
    (0xFDA6, 'M', 'جحى'),
    ]

def _seg_49() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFDA7, 'M', 'جمى'),
    (0xFDA8, 'M', 'سخى'),
    (0xFDA9, 'M', 'صحي'),
    (0xFDAA, 'M', 'شحي'),
    (0xFDAB, 'M', 'ضحي'),
    (0xFDAC, 'M', 'لجي'),
    (0xFDAD, 'M', 'لمي'),
    (0xFDAE, 'M', 'يحي'),
    (0xFDAF, 'M', 'يجي'),
    (0xFDB0, 'M', 'يمي'),
    (0xFDB1, 'M', 'ممي'),
    (0xFDB2, 'M', 'قمي'),
    (0xFDB3, 'M', 'نحي'),
    (0xFDB4, 'M', 'قمح'),
    (0xFDB5, 'M', 'لحم'),
    (0xFDB6, 'M', 'عمي'),
    (0xFDB7, 'M', 'كمي'),
    (0xFDB8, 'M', 'نجح'),
    (0xFDB9, 'M', 'مخي'),
    (0xFDBA, 'M', 'لجم'),
    (0xFDBB, 'M', 'كمم'),
    (0xFDBC, 'M', 'لجم'),
    (0xFDBD, 'M', 'نجح'),
    (0xFDBE, 'M', 'جحي'),
    (0xFDBF, 'M', 'حجي'),
    (0xFDC0, 'M', 'مجي'),
    (0xFDC1, 'M', 'فمي'),
    (0xFDC2, 'M', 'بحي'),
    (0xFDC3, 'M', 'كمم'),
    (0xFDC4, 'M', 'عجم'),
    (0xFDC5, 'M', 'صمم'),
    (0xFDC6, 'M', 'سخي'),
    (0xFDC7, 'M', 'نجي'),
    (0xFDC8, 'X'),
    (0xFDCF, 'V'),
    (0xFDD0, 'X'),
    (0xFDF0, 'M', 'صلے'),
    (0xFDF1, 'M', 'قلے'),
    (0xFDF2, 'M', 'الله'),
    (0xFDF3, 'M', 'اكبر'),
    (0xFDF4, 'M', 'محمد'),
    (0xFDF5, 'M', 'صلعم'),
    (0xFDF6, 'M', 'رسول'),
    (0xFDF7, 'M', 'عليه'),
    (0xFDF8, 'M', 'وسلم'),
    (0xFDF9, 'M', 'صلى'),
    (0xFDFA, '3', 'صلى الله عليه وسلم'),
    (0xFDFB, '3', 'جل جلاله'),
    (0xFDFC, 'M', 'ریال'),
    (0xFDFD, 'V'),
    (0xFE00, 'I'),
    (0xFE10, '3', ','),
    (0xFE11, 'M', '、'),
    (0xFE12, 'X'),
    (0xFE13, '3', ':'),
    (0xFE14, '3', ';'),
    (0xFE15, '3', '!'),
    (0xFE16, '3', '?'),
    (0xFE17, 'M', '〖'),
    (0xFE18, 'M', '〗'),
    (0xFE19, 'X'),
    (0xFE20, 'V'),
    (0xFE30, 'X'),
    (0xFE31, 'M', '—'),
    (0xFE32, 'M', '–'),
    (0xFE33, '3', '_'),
    (0xFE35, '3', '('),
    (0xFE36, '3', ')'),
    (0xFE37, '3', '{'),
    (0xFE38, '3', '}'),
    (0xFE39, 'M', '〔'),
    (0xFE3A, 'M', '〕'),
    (0xFE3B, 'M', '【'),
    (0xFE3C, 'M', '】'),
    (0xFE3D, 'M', '《'),
    (0xFE3E, 'M', '》'),
    (0xFE3F, 'M', '〈'),
    (0xFE40, 'M', '〉'),
    (0xFE41, 'M', '「'),
    (0xFE42, 'M', '」'),
    (0xFE43, 'M', '『'),
    (0xFE44, 'M', '』'),
    (0xFE45, 'V'),
    (0xFE47, '3', '['),
    (0xFE48, '3', ']'),
    (0xFE49, '3', ' ̅'),
    (0xFE4D, '3', '_'),
    (0xFE50, '3', ','),
    (0xFE51, 'M', '、'),
    (0xFE52, 'X'),
    (0xFE54, '3', ';'),
    (0xFE55, '3', ':'),
    (0xFE56, '3', '?'),
    (0xFE57, '3', '!'),
    (0xFE58, 'M', '—'),
    (0xFE59, '3', '('),
    (0xFE5A, '3', ')'),
    (0xFE5B, '3', '{'),
    (0xFE5C, '3', '}'),
    (0xFE5D, 'M', '〔'),
    ]

def _seg_50() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFE5E, 'M', '〕'),
    (0xFE5F, '3', '#'),
    (0xFE60, '3', '&'),
    (0xFE61, '3', '*'),
    (0xFE62, '3', '+'),
    (0xFE63, 'M', '-'),
    (0xFE64, '3', '<'),
    (0xFE65, '3', '>'),
    (0xFE66, '3', '='),
    (0xFE67, 'X'),
    (0xFE68, '3', '\\'),
    (0xFE69, '3', '$'),
    (0xFE6A, '3', '%'),
    (0xFE6B, '3', '@'),
    (0xFE6C, 'X'),
    (0xFE70, '3', ' ً'),
    (0xFE71, 'M', 'ـً'),
    (0xFE72, '3', ' ٌ'),
    (0xFE73, 'V'),
    (0xFE74, '3', ' ٍ'),
    (0xFE75, 'X'),
    (0xFE76, '3', ' َ'),
    (0xFE77, 'M', 'ـَ'),
    (0xFE78, '3', ' ُ'),
    (0xFE79, 'M', 'ـُ'),
    (0xFE7A, '3', ' ِ'),
    (0xFE7B, 'M', 'ـِ'),
    (0xFE7C, '3', ' ّ'),
    (0xFE7D, 'M', 'ـّ'),
    (0xFE7E, '3', ' ْ'),
    (0xFE7F, 'M', 'ـْ'),
    (0xFE80, 'M', 'ء'),
    (0xFE81, 'M', 'آ'),
    (0xFE83, 'M', 'أ'),
    (0xFE85, 'M', 'ؤ'),
    (0xFE87, 'M', 'إ'),
    (0xFE89, 'M', 'ئ'),
    (0xFE8D, 'M', 'ا'),
    (0xFE8F, 'M', 'ب'),
    (0xFE93, 'M', 'ة'),
    (0xFE95, 'M', 'ت'),
    (0xFE99, 'M', 'ث'),
    (0xFE9D, 'M', 'ج'),
    (0xFEA1, 'M', 'ح'),
    (0xFEA5, 'M', 'خ'),
    (0xFEA9, 'M', 'د'),
    (0xFEAB, 'M', 'ذ'),
    (0xFEAD, 'M', 'ر'),
    (0xFEAF, 'M', 'ز'),
    (0xFEB1, 'M', 'س'),
    (0xFEB5, 'M', 'ش'),
    (0xFEB9, 'M', 'ص'),
    (0xFEBD, 'M', 'ض'),
    (0xFEC1, 'M', 'ط'),
    (0xFEC5, 'M', 'ظ'),
    (0xFEC9, 'M', 'ع'),
    (0xFECD, 'M', 'غ'),
    (0xFED1, 'M', 'ف'),
    (0xFED5, 'M', 'ق'),
    (0xFED9, 'M', 'ك'),
    (0xFEDD, 'M', 'ل'),
    (0xFEE1, 'M', 'م'),
    (0xFEE5, 'M', 'ن'),
    (0xFEE9, 'M', 'ه'),
    (0xFEED, 'M', 'و'),
    (0xFEEF, 'M', 'ى'),
    (0xFEF1, 'M', 'ي'),
    (0xFEF5, 'M', 'لآ'),
    (0xFEF7, 'M', 'لأ'),
    (0xFEF9, 'M', 'لإ'),
    (0xFEFB, 'M', 'لا'),
    (0xFEFD, 'X'),
    (0xFEFF, 'I'),
    (0xFF00, 'X'),
    (0xFF01, '3', '!'),
    (0xFF02, '3', '"'),
    (0xFF03, '3', '#'),
    (0xFF04, '3', '$'),
    (0xFF05, '3', '%'),
    (0xFF06, '3', '&'),
    (0xFF07, '3', '\''),
    (0xFF08, '3', '('),
    (0xFF09, '3', ')'),
    (0xFF0A, '3', '*'),
    (0xFF0B, '3', '+'),
    (0xFF0C, '3', ','),
    (0xFF0D, 'M', '-'),
    (0xFF0E, 'M', '.'),
    (0xFF0F, '3', '/'),
    (0xFF10, 'M', '0'),
    (0xFF11, 'M', '1'),
    (0xFF12, 'M', '2'),
    (0xFF13, 'M', '3'),
    (0xFF14, 'M', '4'),
    (0xFF15, 'M', '5'),
    (0xFF16, 'M', '6'),
    (0xFF17, 'M', '7'),
    (0xFF18, 'M', '8'),
    (0xFF19, 'M', '9'),
    (0xFF1A, '3', ':'),
    ]

def _seg_51() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFF1B, '3', ';'),
    (0xFF1C, '3', '<'),
    (0xFF1D, '3', '='),
    (0xFF1E, '3', '>'),
    (0xFF1F, '3', '?'),
    (0xFF20, '3', '@'),
    (0xFF21, 'M', 'a'),
    (0xFF22, 'M', 'b'),
    (0xFF23, 'M', 'c'),
    (0xFF24, 'M', 'd'),
    (0xFF25, 'M', 'e'),
    (0xFF26, 'M', 'f'),
    (0xFF27, 'M', 'g'),
    (0xFF28, 'M', 'h'),
    (0xFF29, 'M', 'i'),
    (0xFF2A, 'M', 'j'),
    (0xFF2B, 'M', 'k'),
    (0xFF2C, 'M', 'l'),
    (0xFF2D, 'M', 'm'),
    (0xFF2E, 'M', 'n'),
    (0xFF2F, 'M', 'o'),
    (0xFF30, 'M', 'p'),
    (0xFF31, 'M', 'q'),
    (0xFF32, 'M', 'r'),
    (0xFF33, 'M', 's'),
    (0xFF34, 'M', 't'),
    (0xFF35, 'M', 'u'),
    (0xFF36, 'M', 'v'),
    (0xFF37, 'M', 'w'),
    (0xFF38, 'M', 'x'),
    (0xFF39, 'M', 'y'),
    (0xFF3A, 'M', 'z'),
    (0xFF3B, '3', '['),
    (0xFF3C, '3', '\\'),
    (0xFF3D, '3', ']'),
    (0xFF3E, '3', '^'),
    (0xFF3F, '3', '_'),
    (0xFF40, '3', '`'),
    (0xFF41, 'M', 'a'),
    (0xFF42, 'M', 'b'),
    (0xFF43, 'M', 'c'),
    (0xFF44, 'M', 'd'),
    (0xFF45, 'M', 'e'),
    (0xFF46, 'M', 'f'),
    (0xFF47, 'M', 'g'),
    (0xFF48, 'M', 'h'),
    (0xFF49, 'M', 'i'),
    (0xFF4A, 'M', 'j'),
    (0xFF4B, 'M', 'k'),
    (0xFF4C, 'M', 'l'),
    (0xFF4D, 'M', 'm'),
    (0xFF4E, 'M', 'n'),
    (0xFF4F, 'M', 'o'),
    (0xFF50, 'M', 'p'),
    (0xFF51, 'M', 'q'),
    (0xFF52, 'M', 'r'),
    (0xFF53, 'M', 's'),
    (0xFF54, 'M', 't'),
    (0xFF55, 'M', 'u'),
    (0xFF56, 'M', 'v'),
    (0xFF57, 'M', 'w'),
    (0xFF58, 'M', 'x'),
    (0xFF59, 'M', 'y'),
    (0xFF5A, 'M', 'z'),
    (0xFF5B, '3', '{'),
    (0xFF5C, '3', '|'),
    (0xFF5D, '3', '}'),
    (0xFF5E, '3', '~'),
    (0xFF5F, 'M', '⦅'),
    (0xFF60, 'M', '⦆'),
    (0xFF61, 'M', '.'),
    (0xFF62, 'M', '「'),
    (0xFF63, 'M', '」'),
    (0xFF64, 'M', '、'),
    (0xFF65, 'M', '・'),
    (0xFF66, 'M', 'ヲ'),
    (0xFF67, 'M', 'ァ'),
    (0xFF68, 'M', 'ィ'),
    (0xFF69, 'M', 'ゥ'),
    (0xFF6A, 'M', 'ェ'),
    (0xFF6B, 'M', 'ォ'),
    (0xFF6C, 'M', 'ャ'),
    (0xFF6D, 'M', 'ュ'),
    (0xFF6E, 'M', 'ョ'),
    (0xFF6F, 'M', 'ッ'),
    (0xFF70, 'M', 'ー'),
    (0xFF71, 'M', 'ア'),
    (0xFF72, 'M', 'イ'),
    (0xFF73, 'M', 'ウ'),
    (0xFF74, 'M', 'エ'),
    (0xFF75, 'M', 'オ'),
    (0xFF76, 'M', 'カ'),
    (0xFF77, 'M', 'キ'),
    (0xFF78, 'M', 'ク'),
    (0xFF79, 'M', 'ケ'),
    (0xFF7A, 'M', 'コ'),
    (0xFF7B, 'M', 'サ'),
    (0xFF7C, 'M', 'シ'),
    (0xFF7D, 'M', 'ス'),
    (0xFF7E, 'M', 'セ'),
    ]

def _seg_52() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFF7F, 'M', 'ソ'),
    (0xFF80, 'M', 'タ'),
    (0xFF81, 'M', 'チ'),
    (0xFF82, 'M', 'ツ'),
    (0xFF83, 'M', 'テ'),
    (0xFF84, 'M', 'ト'),
    (0xFF85, 'M', 'ナ'),
    (0xFF86, 'M', 'ニ'),
    (0xFF87, 'M', 'ヌ'),
    (0xFF88, 'M', 'ネ'),
    (0xFF89, 'M', 'ノ'),
    (0xFF8A, 'M', 'ハ'),
    (0xFF8B, 'M', 'ヒ'),
    (0xFF8C, 'M', 'フ'),
    (0xFF8D, 'M', 'ヘ'),
    (0xFF8E, 'M', 'ホ'),
    (0xFF8F, 'M', 'マ'),
    (0xFF90, 'M', 'ミ'),
    (0xFF91, 'M', 'ム'),
    (0xFF92, 'M', 'メ'),
    (0xFF93, 'M', 'モ'),
    (0xFF94, 'M', 'ヤ'),
    (0xFF95, 'M', 'ユ'),
    (0xFF96, 'M', 'ヨ'),
    (0xFF97, 'M', 'ラ'),
    (0xFF98, 'M', 'リ'),
    (0xFF99, 'M', 'ル'),
    (0xFF9A, 'M', 'レ'),
    (0xFF9B, 'M', 'ロ'),
    (0xFF9C, 'M', 'ワ'),
    (0xFF9D, 'M', 'ン'),
    (0xFF9E, 'M', '゙'),
    (0xFF9F, 'M', '゚'),
    (0xFFA0, 'X'),
    (0xFFA1, 'M', 'ᄀ'),
    (0xFFA2, 'M', 'ᄁ'),
    (0xFFA3, 'M', 'ᆪ'),
    (0xFFA4, 'M', 'ᄂ'),
    (0xFFA5, 'M', 'ᆬ'),
    (0xFFA6, 'M', 'ᆭ'),
    (0xFFA7, 'M', 'ᄃ'),
    (0xFFA8, 'M', 'ᄄ'),
    (0xFFA9, 'M', 'ᄅ'),
    (0xFFAA, 'M', 'ᆰ'),
    (0xFFAB, 'M', 'ᆱ'),
    (0xFFAC, 'M', 'ᆲ'),
    (0xFFAD, 'M', 'ᆳ'),
    (0xFFAE, 'M', 'ᆴ'),
    (0xFFAF, 'M', 'ᆵ'),
    (0xFFB0, 'M', 'ᄚ'),
    (0xFFB1, 'M', 'ᄆ'),
    (0xFFB2, 'M', 'ᄇ'),
    (0xFFB3, 'M', 'ᄈ'),
    (0xFFB4, 'M', 'ᄡ'),
    (0xFFB5, 'M', 'ᄉ'),
    (0xFFB6, 'M', 'ᄊ'),
    (0xFFB7, 'M', 'ᄋ'),
    (0xFFB8, 'M', 'ᄌ'),
    (0xFFB9, 'M', 'ᄍ'),
    (0xFFBA, 'M', 'ᄎ'),
    (0xFFBB, 'M', 'ᄏ'),
    (0xFFBC, 'M', 'ᄐ'),
    (0xFFBD, 'M', 'ᄑ'),
    (0xFFBE, 'M', 'ᄒ'),
    (0xFFBF, 'X'),
    (0xFFC2, 'M', 'ᅡ'),
    (0xFFC3, 'M', 'ᅢ'),
    (0xFFC4, 'M', 'ᅣ'),
    (0xFFC5, 'M', 'ᅤ'),
    (0xFFC6, 'M', 'ᅥ'),
    (0xFFC7, 'M', 'ᅦ'),
    (0xFFC8, 'X'),
    (0xFFCA, 'M', 'ᅧ'),
    (0xFFCB, 'M', 'ᅨ'),
    (0xFFCC, 'M', 'ᅩ'),
    (0xFFCD, 'M', 'ᅪ'),
    (0xFFCE, 'M', 'ᅫ'),
    (0xFFCF, 'M', 'ᅬ'),
    (0xFFD0, 'X'),
    (0xFFD2, 'M', 'ᅭ'),
    (0xFFD3, 'M', 'ᅮ'),
    (0xFFD4, 'M', 'ᅯ'),
    (0xFFD5, 'M', 'ᅰ'),
    (0xFFD6, 'M', 'ᅱ'),
    (0xFFD7, 'M', 'ᅲ'),
    (0xFFD8, 'X'),
    (0xFFDA, 'M', 'ᅳ'),
    (0xFFDB, 'M', 'ᅴ'),
    (0xFFDC, 'M', 'ᅵ'),
    (0xFFDD, 'X'),
    (0xFFE0, 'M', '¢'),
    (0xFFE1, 'M', '£'),
    (0xFFE2, 'M', '¬'),
    (0xFFE3, '3', ' ̄'),
    (0xFFE4, 'M', '¦'),
    (0xFFE5, 'M', '¥'),
    (0xFFE6, 'M', '₩'),
    (0xFFE7, 'X'),
    (0xFFE8, 'M', '│'),
    (0xFFE9, 'M', '←'),
    ]

def _seg_53() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0xFFEA, 'M', '↑'),
    (0xFFEB, 'M', '→'),
    (0xFFEC, 'M', '↓'),
    (0xFFED, 'M', '■'),
    (0xFFEE, 'M', '○'),
    (0xFFEF, 'X'),
    (0x10000, 'V'),
    (0x1000C, 'X'),
    (0x1000D, 'V'),
    (0x10027, 'X'),
    (0x10028, 'V'),
    (0x1003B, 'X'),
    (0x1003C, 'V'),
    (0x1003E, 'X'),
    (0x1003F, 'V'),
    (0x1004E, 'X'),
    (0x10050, 'V'),
    (0x1005E, 'X'),
    (0x10080, 'V'),
    (0x100FB, 'X'),
    (0x10100, 'V'),
    (0x10103, 'X'),
    (0x10107, 'V'),
    (0x10134, 'X'),
    (0x10137, 'V'),
    (0x1018F, 'X'),
    (0x10190, 'V'),
    (0x1019D, 'X'),
    (0x101A0, 'V'),
    (0x101A1, 'X'),
    (0x101D0, 'V'),
    (0x101FE, 'X'),
    (0x10280, 'V'),
    (0x1029D, 'X'),
    (0x102A0, 'V'),
    (0x102D1, 'X'),
    (0x102E0, 'V'),
    (0x102FC, 'X'),
    (0x10300, 'V'),
    (0x10324, 'X'),
    (0x1032D, 'V'),
    (0x1034B, 'X'),
    (0x10350, 'V'),
    (0x1037B, 'X'),
    (0x10380, 'V'),
    (0x1039E, 'X'),
    (0x1039F, 'V'),
    (0x103C4, 'X'),
    (0x103C8, 'V'),
    (0x103D6, 'X'),
    (0x10400, 'M', '𐐨'),
    (0x10401, 'M', '𐐩'),
    (0x10402, 'M', '𐐪'),
    (0x10403, 'M', '𐐫'),
    (0x10404, 'M', '𐐬'),
    (0x10405, 'M', '𐐭'),
    (0x10406, 'M', '𐐮'),
    (0x10407, 'M', '𐐯'),
    (0x10408, 'M', '𐐰'),
    (0x10409, 'M', '𐐱'),
    (0x1040A, 'M', '𐐲'),
    (0x1040B, 'M', '𐐳'),
    (0x1040C, 'M', '𐐴'),
    (0x1040D, 'M', '𐐵'),
    (0x1040E, 'M', '𐐶'),
    (0x1040F, 'M', '𐐷'),
    (0x10410, 'M', '𐐸'),
    (0x10411, 'M', '𐐹'),
    (0x10412, 'M', '𐐺'),
    (0x10413, 'M', '𐐻'),
    (0x10414, 'M', '𐐼'),
    (0x10415, 'M', '𐐽'),
    (0x10416, 'M', '𐐾'),
    (0x10417, 'M', '𐐿'),
    (0x10418, 'M', '𐑀'),
    (0x10419, 'M', '𐑁'),
    (0x1041A, 'M', '𐑂'),
    (0x1041B, 'M', '𐑃'),
    (0x1041C, 'M', '𐑄'),
    (0x1041D, 'M', '𐑅'),
    (0x1041E, 'M', '𐑆'),
    (0x1041F, 'M', '𐑇'),
    (0x10420, 'M', '𐑈'),
    (0x10421, 'M', '𐑉'),
    (0x10422, 'M', '𐑊'),
    (0x10423, 'M', '𐑋'),
    (0x10424, 'M', '𐑌'),
    (0x10425, 'M', '𐑍'),
    (0x10426, 'M', '𐑎'),
    (0x10427, 'M', '𐑏'),
    (0x10428, 'V'),
    (0x1049E, 'X'),
    (0x104A0, 'V'),
    (0x104AA, 'X'),
    (0x104B0, 'M', '𐓘'),
    (0x104B1, 'M', '𐓙'),
    (0x104B2, 'M', '𐓚'),
    (0x104B3, 'M', '𐓛'),
    (0x104B4, 'M', '𐓜'),
    (0x104B5, 'M', '𐓝'),
    ]

def _seg_54() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x104B6, 'M', '𐓞'),
    (0x104B7, 'M', '𐓟'),
    (0x104B8, 'M', '𐓠'),
    (0x104B9, 'M', '𐓡'),
    (0x104BA, 'M', '𐓢'),
    (0x104BB, 'M', '𐓣'),
    (0x104BC, 'M', '𐓤'),
    (0x104BD, 'M', '𐓥'),
    (0x104BE, 'M', '𐓦'),
    (0x104BF, 'M', '𐓧'),
    (0x104C0, 'M', '𐓨'),
    (0x104C1, 'M', '𐓩'),
    (0x104C2, 'M', '𐓪'),
    (0x104C3, 'M', '𐓫'),
    (0x104C4, 'M', '𐓬'),
    (0x104C5, 'M', '𐓭'),
    (0x104C6, 'M', '𐓮'),
    (0x104C7, 'M', '𐓯'),
    (0x104C8, 'M', '𐓰'),
    (0x104C9, 'M', '𐓱'),
    (0x104CA, 'M', '𐓲'),
    (0x104CB, 'M', '𐓳'),
    (0x104CC, 'M', '𐓴'),
    (0x104CD, 'M', '𐓵'),
    (0x104CE, 'M', '𐓶'),
    (0x104CF, 'M', '𐓷'),
    (0x104D0, 'M', '𐓸'),
    (0x104D1, 'M', '𐓹'),
    (0x104D2, 'M', '𐓺'),
    (0x104D3, 'M', '𐓻'),
    (0x104D4, 'X'),
    (0x104D8, 'V'),
    (0x104FC, 'X'),
    (0x10500, 'V'),
    (0x10528, 'X'),
    (0x10530, 'V'),
    (0x10564, 'X'),
    (0x1056F, 'V'),
    (0x10570, 'M', '𐖗'),
    (0x10571, 'M', '𐖘'),
    (0x10572, 'M', '𐖙'),
    (0x10573, 'M', '𐖚'),
    (0x10574, 'M', '𐖛'),
    (0x10575, 'M', '𐖜'),
    (0x10576, 'M', '𐖝'),
    (0x10577, 'M', '𐖞'),
    (0x10578, 'M', '𐖟'),
    (0x10579, 'M', '𐖠'),
    (0x1057A, 'M', '𐖡'),
    (0x1057B, 'X'),
    (0x1057C, 'M', '𐖣'),
    (0x1057D, 'M', '𐖤'),
    (0x1057E, 'M', '𐖥'),
    (0x1057F, 'M', '𐖦'),
    (0x10580, 'M', '𐖧'),
    (0x10581, 'M', '𐖨'),
    (0x10582, 'M', '𐖩'),
    (0x10583, 'M', '𐖪'),
    (0x10584, 'M', '𐖫'),
    (0x10585, 'M', '𐖬'),
    (0x10586, 'M', '𐖭'),
    (0x10587, 'M', '𐖮'),
    (0x10588, 'M', '𐖯'),
    (0x10589, 'M', '𐖰'),
    (0x1058A, 'M', '𐖱'),
    (0x1058B, 'X'),
    (0x1058C, 'M', '𐖳'),
    (0x1058D, 'M', '𐖴'),
    (0x1058E, 'M', '𐖵'),
    (0x1058F, 'M', '𐖶'),
    (0x10590, 'M', '𐖷'),
    (0x10591, 'M', '𐖸'),
    (0x10592, 'M', '𐖹'),
    (0x10593, 'X'),
    (0x10594, 'M', '𐖻'),
    (0x10595, 'M', '𐖼'),
    (0x10596, 'X'),
    (0x10597, 'V'),
    (0x105A2, 'X'),
    (0x105A3, 'V'),
    (0x105B2, 'X'),
    (0x105B3, 'V'),
    (0x105BA, 'X'),
    (0x105BB, 'V'),
    (0x105BD, 'X'),
    (0x10600, 'V'),
    (0x10737, 'X'),
    (0x10740, 'V'),
    (0x10756, 'X'),
    (0x10760, 'V'),
    (0x10768, 'X'),
    (0x10780, 'V'),
    (0x10781, 'M', 'ː'),
    (0x10782, 'M', 'ˑ'),
    (0x10783, 'M', 'æ'),
    (0x10784, 'M', 'ʙ'),
    (0x10785, 'M', 'ɓ'),
    (0x10786, 'X'),
    (0x10787, 'M', 'ʣ'),
    (0x10788, 'M', 'ꭦ'),
    ]

def _seg_55() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x10789, 'M', 'ʥ'),
    (0x1078A, 'M', 'ʤ'),
    (0x1078B, 'M', 'ɖ'),
    (0x1078C, 'M', 'ɗ'),
    (0x1078D, 'M', 'ᶑ'),
    (0x1078E, 'M', 'ɘ'),
    (0x1078F, 'M', 'ɞ'),
    (0x10790, 'M', 'ʩ'),
    (0x10791, 'M', 'ɤ'),
    (0x10792, 'M', 'ɢ'),
    (0x10793, 'M', 'ɠ'),
    (0x10794, 'M', 'ʛ'),
    (0x10795, 'M', 'ħ'),
    (0x10796, 'M', 'ʜ'),
    (0x10797, 'M', 'ɧ'),
    (0x10798, 'M', 'ʄ'),
    (0x10799, 'M', 'ʪ'),
    (0x1079A, 'M', 'ʫ'),
    (0x1079B, 'M', 'ɬ'),
    (0x1079C, 'M', '𝼄'),
    (0x1079D, 'M', 'ꞎ'),
    (0x1079E, 'M', 'ɮ'),
    (0x1079F, 'M', '𝼅'),
    (0x107A0, 'M', 'ʎ'),
    (0x107A1, 'M', '𝼆'),
    (0x107A2, 'M', 'ø'),
    (0x107A3, 'M', 'ɶ'),
    (0x107A4, 'M', 'ɷ'),
    (0x107A5, 'M', 'q'),
    (0x107A6, 'M', 'ɺ'),
    (0x107A7, 'M', '𝼈'),
    (0x107A8, 'M', 'ɽ'),
    (0x107A9, 'M', 'ɾ'),
    (0x107AA, 'M', 'ʀ'),
    (0x107AB, 'M', 'ʨ'),
    (0x107AC, 'M', 'ʦ'),
    (0x107AD, 'M', 'ꭧ'),
    (0x107AE, 'M', 'ʧ'),
    (0x107AF, 'M', 'ʈ'),
    (0x107B0, 'M', 'ⱱ'),
    (0x107B1, 'X'),
    (0x107B2, 'M', 'ʏ'),
    (0x107B3, 'M', 'ʡ'),
    (0x107B4, 'M', 'ʢ'),
    (0x107B5, 'M', 'ʘ'),
    (0x107B6, 'M', 'ǀ'),
    (0x107B7, 'M', 'ǁ'),
    (0x107B8, 'M', 'ǂ'),
    (0x107B9, 'M', '𝼊'),
    (0x107BA, 'M', '𝼞'),
    (0x107BB, 'X'),
    (0x10800, 'V'),
    (0x10806, 'X'),
    (0x10808, 'V'),
    (0x10809, 'X'),
    (0x1080A, 'V'),
    (0x10836, 'X'),
    (0x10837, 'V'),
    (0x10839, 'X'),
    (0x1083C, 'V'),
    (0x1083D, 'X'),
    (0x1083F, 'V'),
    (0x10856, 'X'),
    (0x10857, 'V'),
    (0x1089F, 'X'),
    (0x108A7, 'V'),
    (0x108B0, 'X'),
    (0x108E0, 'V'),
    (0x108F3, 'X'),
    (0x108F4, 'V'),
    (0x108F6, 'X'),
    (0x108FB, 'V'),
    (0x1091C, 'X'),
    (0x1091F, 'V'),
    (0x1093A, 'X'),
    (0x1093F, 'V'),
    (0x10940, 'X'),
    (0x10980, 'V'),
    (0x109B8, 'X'),
    (0x109BC, 'V'),
    (0x109D0, 'X'),
    (0x109D2, 'V'),
    (0x10A04, 'X'),
    (0x10A05, 'V'),
    (0x10A07, 'X'),
    (0x10A0C, 'V'),
    (0x10A14, 'X'),
    (0x10A15, 'V'),
    (0x10A18, 'X'),
    (0x10A19, 'V'),
    (0x10A36, 'X'),
    (0x10A38, 'V'),
    (0x10A3B, 'X'),
    (0x10A3F, 'V'),
    (0x10A49, 'X'),
    (0x10A50, 'V'),
    (0x10A59, 'X'),
    (0x10A60, 'V'),
    (0x10AA0, 'X'),
    (0x10AC0, 'V'),
    ]

def _seg_56() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x10AE7, 'X'),
    (0x10AEB, 'V'),
    (0x10AF7, 'X'),
    (0x10B00, 'V'),
    (0x10B36, 'X'),
    (0x10B39, 'V'),
    (0x10B56, 'X'),
    (0x10B58, 'V'),
    (0x10B73, 'X'),
    (0x10B78, 'V'),
    (0x10B92, 'X'),
    (0x10B99, 'V'),
    (0x10B9D, 'X'),
    (0x10BA9, 'V'),
    (0x10BB0, 'X'),
    (0x10C00, 'V'),
    (0x10C49, 'X'),
    (0x10C80, 'M', '𐳀'),
    (0x10C81, 'M', '𐳁'),
    (0x10C82, 'M', '𐳂'),
    (0x10C83, 'M', '𐳃'),
    (0x10C84, 'M', '𐳄'),
    (0x10C85, 'M', '𐳅'),
    (0x10C86, 'M', '𐳆'),
    (0x10C87, 'M', '𐳇'),
    (0x10C88, 'M', '𐳈'),
    (0x10C89, 'M', '𐳉'),
    (0x10C8A, 'M', '𐳊'),
    (0x10C8B, 'M', '𐳋'),
    (0x10C8C, 'M', '𐳌'),
    (0x10C8D, 'M', '𐳍'),
    (0x10C8E, 'M', '𐳎'),
    (0x10C8F, 'M', '𐳏'),
    (0x10C90, 'M', '𐳐'),
    (0x10C91, 'M', '𐳑'),
    (0x10C92, 'M', '𐳒'),
    (0x10C93, 'M', '𐳓'),
    (0x10C94, 'M', '𐳔'),
    (0x10C95, 'M', '𐳕'),
    (0x10C96, 'M', '𐳖'),
    (0x10C97, 'M', '𐳗'),
    (0x10C98, 'M', '𐳘'),
    (0x10C99, 'M', '𐳙'),
    (0x10C9A, 'M', '𐳚'),
    (0x10C9B, 'M', '𐳛'),
    (0x10C9C, 'M', '𐳜'),
    (0x10C9D, 'M', '𐳝'),
    (0x10C9E, 'M', '𐳞'),
    (0x10C9F, 'M', '𐳟'),
    (0x10CA0, 'M', '𐳠'),
    (0x10CA1, 'M', '𐳡'),
    (0x10CA2, 'M', '𐳢'),
    (0x10CA3, 'M', '𐳣'),
    (0x10CA4, 'M', '𐳤'),
    (0x10CA5, 'M', '𐳥'),
    (0x10CA6, 'M', '𐳦'),
    (0x10CA7, 'M', '𐳧'),
    (0x10CA8, 'M', '𐳨'),
    (0x10CA9, 'M', '𐳩'),
    (0x10CAA, 'M', '𐳪'),
    (0x10CAB, 'M', '𐳫'),
    (0x10CAC, 'M', '𐳬'),
    (0x10CAD, 'M', '𐳭'),
    (0x10CAE, 'M', '𐳮'),
    (0x10CAF, 'M', '𐳯'),
    (0x10CB0, 'M', '𐳰'),
    (0x10CB1, 'M', '𐳱'),
    (0x10CB2, 'M', '𐳲'),
    (0x10CB3, 'X'),
    (0x10CC0, 'V'),
    (0x10CF3, 'X'),
    (0x10CFA, 'V'),
    (0x10D28, 'X'),
    (0x10D30, 'V'),
    (0x10D3A, 'X'),
    (0x10E60, 'V'),
    (0x10E7F, 'X'),
    (0x10E80, 'V'),
    (0x10EAA, 'X'),
    (0x10EAB, 'V'),
    (0x10EAE, 'X'),
    (0x10EB0, 'V'),
    (0x10EB2, 'X'),
    (0x10EFD, 'V'),
    (0x10F28, 'X'),
    (0x10F30, 'V'),
    (0x10F5A, 'X'),
    (0x10F70, 'V'),
    (0x10F8A, 'X'),
    (0x10FB0, 'V'),
    (0x10FCC, 'X'),
    (0x10FE0, 'V'),
    (0x10FF7, 'X'),
    (0x11000, 'V'),
    (0x1104E, 'X'),
    (0x11052, 'V'),
    (0x11076, 'X'),
    (0x1107F, 'V'),
    (0x110BD, 'X'),
    (0x110BE, 'V'),
    ]

def _seg_57() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x110C3, 'X'),
    (0x110D0, 'V'),
    (0x110E9, 'X'),
    (0x110F0, 'V'),
    (0x110FA, 'X'),
    (0x11100, 'V'),
    (0x11135, 'X'),
    (0x11136, 'V'),
    (0x11148, 'X'),
    (0x11150, 'V'),
    (0x11177, 'X'),
    (0x11180, 'V'),
    (0x111E0, 'X'),
    (0x111E1, 'V'),
    (0x111F5, 'X'),
    (0x11200, 'V'),
    (0x11212, 'X'),
    (0x11213, 'V'),
    (0x11242, 'X'),
    (0x11280, 'V'),
    (0x11287, 'X'),
    (0x11288, 'V'),
    (0x11289, 'X'),
    (0x1128A, 'V'),
    (0x1128E, 'X'),
    (0x1128F, 'V'),
    (0x1129E, 'X'),
    (0x1129F, 'V'),
    (0x112AA, 'X'),
    (0x112B0, 'V'),
    (0x112EB, 'X'),
    (0x112F0, 'V'),
    (0x112FA, 'X'),
    (0x11300, 'V'),
    (0x11304, 'X'),
    (0x11305, 'V'),
    (0x1130D, 'X'),
    (0x1130F, 'V'),
    (0x11311, 'X'),
    (0x11313, 'V'),
    (0x11329, 'X'),
    (0x1132A, 'V'),
    (0x11331, 'X'),
    (0x11332, 'V'),
    (0x11334, 'X'),
    (0x11335, 'V'),
    (0x1133A, 'X'),
    (0x1133B, 'V'),
    (0x11345, 'X'),
    (0x11347, 'V'),
    (0x11349, 'X'),
    (0x1134B, 'V'),
    (0x1134E, 'X'),
    (0x11350, 'V'),
    (0x11351, 'X'),
    (0x11357, 'V'),
    (0x11358, 'X'),
    (0x1135D, 'V'),
    (0x11364, 'X'),
    (0x11366, 'V'),
    (0x1136D, 'X'),
    (0x11370, 'V'),
    (0x11375, 'X'),
    (0x11400, 'V'),
    (0x1145C, 'X'),
    (0x1145D, 'V'),
    (0x11462, 'X'),
    (0x11480, 'V'),
    (0x114C8, 'X'),
    (0x114D0, 'V'),
    (0x114DA, 'X'),
    (0x11580, 'V'),
    (0x115B6, 'X'),
    (0x115B8, 'V'),
    (0x115DE, 'X'),
    (0x11600, 'V'),
    (0x11645, 'X'),
    (0x11650, 'V'),
    (0x1165A, 'X'),
    (0x11660, 'V'),
    (0x1166D, 'X'),
    (0x11680, 'V'),
    (0x116BA, 'X'),
    (0x116C0, 'V'),
    (0x116CA, 'X'),
    (0x11700, 'V'),
    (0x1171B, 'X'),
    (0x1171D, 'V'),
    (0x1172C, 'X'),
    (0x11730, 'V'),
    (0x11747, 'X'),
    (0x11800, 'V'),
    (0x1183C, 'X'),
    (0x118A0, 'M', '𑣀'),
    (0x118A1, 'M', '𑣁'),
    (0x118A2, 'M', '𑣂'),
    (0x118A3, 'M', '𑣃'),
    (0x118A4, 'M', '𑣄'),
    (0x118A5, 'M', '𑣅'),
    (0x118A6, 'M', '𑣆'),
    ]

def _seg_58() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x118A7, 'M', '𑣇'),
    (0x118A8, 'M', '𑣈'),
    (0x118A9, 'M', '𑣉'),
    (0x118AA, 'M', '𑣊'),
    (0x118AB, 'M', '𑣋'),
    (0x118AC, 'M', '𑣌'),
    (0x118AD, 'M', '𑣍'),
    (0x118AE, 'M', '𑣎'),
    (0x118AF, 'M', '𑣏'),
    (0x118B0, 'M', '𑣐'),
    (0x118B1, 'M', '𑣑'),
    (0x118B2, 'M', '𑣒'),
    (0x118B3, 'M', '𑣓'),
    (0x118B4, 'M', '𑣔'),
    (0x118B5, 'M', '𑣕'),
    (0x118B6, 'M', '𑣖'),
    (0x118B7, 'M', '𑣗'),
    (0x118B8, 'M', '𑣘'),
    (0x118B9, 'M', '𑣙'),
    (0x118BA, 'M', '𑣚'),
    (0x118BB, 'M', '𑣛'),
    (0x118BC, 'M', '𑣜'),
    (0x118BD, 'M', '𑣝'),
    (0x118BE, 'M', '𑣞'),
    (0x118BF, 'M', '𑣟'),
    (0x118C0, 'V'),
    (0x118F3, 'X'),
    (0x118FF, 'V'),
    (0x11907, 'X'),
    (0x11909, 'V'),
    (0x1190A, 'X'),
    (0x1190C, 'V'),
    (0x11914, 'X'),
    (0x11915, 'V'),
    (0x11917, 'X'),
    (0x11918, 'V'),
    (0x11936, 'X'),
    (0x11937, 'V'),
    (0x11939, 'X'),
    (0x1193B, 'V'),
    (0x11947, 'X'),
    (0x11950, 'V'),
    (0x1195A, 'X'),
    (0x119A0, 'V'),
    (0x119A8, 'X'),
    (0x119AA, 'V'),
    (0x119D8, 'X'),
    (0x119DA, 'V'),
    (0x119E5, 'X'),
    (0x11A00, 'V'),
    (0x11A48, 'X'),
    (0x11A50, 'V'),
    (0x11AA3, 'X'),
    (0x11AB0, 'V'),
    (0x11AF9, 'X'),
    (0x11B00, 'V'),
    (0x11B0A, 'X'),
    (0x11C00, 'V'),
    (0x11C09, 'X'),
    (0x11C0A, 'V'),
    (0x11C37, 'X'),
    (0x11C38, 'V'),
    (0x11C46, 'X'),
    (0x11C50, 'V'),
    (0x11C6D, 'X'),
    (0x11C70, 'V'),
    (0x11C90, 'X'),
    (0x11C92, 'V'),
    (0x11CA8, 'X'),
    (0x11CA9, 'V'),
    (0x11CB7, 'X'),
    (0x11D00, 'V'),
    (0x11D07, 'X'),
    (0x11D08, 'V'),
    (0x11D0A, 'X'),
    (0x11D0B, 'V'),
    (0x11D37, 'X'),
    (0x11D3A, 'V'),
    (0x11D3B, 'X'),
    (0x11D3C, 'V'),
    (0x11D3E, 'X'),
    (0x11D3F, 'V'),
    (0x11D48, 'X'),
    (0x11D50, 'V'),
    (0x11D5A, 'X'),
    (0x11D60, 'V'),
    (0x11D66, 'X'),
    (0x11D67, 'V'),
    (0x11D69, 'X'),
    (0x11D6A, 'V'),
    (0x11D8F, 'X'),
    (0x11D90, 'V'),
    (0x11D92, 'X'),
    (0x11D93, 'V'),
    (0x11D99, 'X'),
    (0x11DA0, 'V'),
    (0x11DAA, 'X'),
    (0x11EE0, 'V'),
    (0x11EF9, 'X'),
    (0x11F00, 'V'),
    ]

def _seg_59() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x11F11, 'X'),
    (0x11F12, 'V'),
    (0x11F3B, 'X'),
    (0x11F3E, 'V'),
    (0x11F5A, 'X'),
    (0x11FB0, 'V'),
    (0x11FB1, 'X'),
    (0x11FC0, 'V'),
    (0x11FF2, 'X'),
    (0x11FFF, 'V'),
    (0x1239A, 'X'),
    (0x12400, 'V'),
    (0x1246F, 'X'),
    (0x12470, 'V'),
    (0x12475, 'X'),
    (0x12480, 'V'),
    (0x12544, 'X'),
    (0x12F90, 'V'),
    (0x12FF3, 'X'),
    (0x13000, 'V'),
    (0x13430, 'X'),
    (0x13440, 'V'),
    (0x13456, 'X'),
    (0x14400, 'V'),
    (0x14647, 'X'),
    (0x16800, 'V'),
    (0x16A39, 'X'),
    (0x16A40, 'V'),
    (0x16A5F, 'X'),
    (0x16A60, 'V'),
    (0x16A6A, 'X'),
    (0x16A6E, 'V'),
    (0x16ABF, 'X'),
    (0x16AC0, 'V'),
    (0x16ACA, 'X'),
    (0x16AD0, 'V'),
    (0x16AEE, 'X'),
    (0x16AF0, 'V'),
    (0x16AF6, 'X'),
    (0x16B00, 'V'),
    (0x16B46, 'X'),
    (0x16B50, 'V'),
    (0x16B5A, 'X'),
    (0x16B5B, 'V'),
    (0x16B62, 'X'),
    (0x16B63, 'V'),
    (0x16B78, 'X'),
    (0x16B7D, 'V'),
    (0x16B90, 'X'),
    (0x16E40, 'M', '𖹠'),
    (0x16E41, 'M', '𖹡'),
    (0x16E42, 'M', '𖹢'),
    (0x16E43, 'M', '𖹣'),
    (0x16E44, 'M', '𖹤'),
    (0x16E45, 'M', '𖹥'),
    (0x16E46, 'M', '𖹦'),
    (0x16E47, 'M', '𖹧'),
    (0x16E48, 'M', '𖹨'),
    (0x16E49, 'M', '𖹩'),
    (0x16E4A, 'M', '𖹪'),
    (0x16E4B, 'M', '𖹫'),
    (0x16E4C, 'M', '𖹬'),
    (0x16E4D, 'M', '𖹭'),
    (0x16E4E, 'M', '𖹮'),
    (0x16E4F, 'M', '𖹯'),
    (0x16E50, 'M', '𖹰'),
    (0x16E51, 'M', '𖹱'),
    (0x16E52, 'M', '𖹲'),
    (0x16E53, 'M', '𖹳'),
    (0x16E54, 'M', '𖹴'),
    (0x16E55, 'M', '𖹵'),
    (0x16E56, 'M', '𖹶'),
    (0x16E57, 'M', '𖹷'),
    (0x16E58, 'M', '𖹸'),
    (0x16E59, 'M', '𖹹'),
    (0x16E5A, 'M', '𖹺'),
    (0x16E5B, 'M', '𖹻'),
    (0x16E5C, 'M', '𖹼'),
    (0x16E5D, 'M', '𖹽'),
    (0x16E5E, 'M', '𖹾'),
    (0x16E5F, 'M', '𖹿'),
    (0x16E60, 'V'),
    (0x16E9B, 'X'),
    (0x16F00, 'V'),
    (0x16F4B, 'X'),
    (0x16F4F, 'V'),
    (0x16F88, 'X'),
    (0x16F8F, 'V'),
    (0x16FA0, 'X'),
    (0x16FE0, 'V'),
    (0x16FE5, 'X'),
    (0x16FF0, 'V'),
    (0x16FF2, 'X'),
    (0x17000, 'V'),
    (0x187F8, 'X'),
    (0x18800, 'V'),
    (0x18CD6, 'X'),
    (0x18D00, 'V'),
    (0x18D09, 'X'),
    (0x1AFF0, 'V'),
    ]

def _seg_60() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1AFF4, 'X'),
    (0x1AFF5, 'V'),
    (0x1AFFC, 'X'),
    (0x1AFFD, 'V'),
    (0x1AFFF, 'X'),
    (0x1B000, 'V'),
    (0x1B123, 'X'),
    (0x1B132, 'V'),
    (0x1B133, 'X'),
    (0x1B150, 'V'),
    (0x1B153, 'X'),
    (0x1B155, 'V'),
    (0x1B156, 'X'),
    (0x1B164, 'V'),
    (0x1B168, 'X'),
    (0x1B170, 'V'),
    (0x1B2FC, 'X'),
    (0x1BC00, 'V'),
    (0x1BC6B, 'X'),
    (0x1BC70, 'V'),
    (0x1BC7D, 'X'),
    (0x1BC80, 'V'),
    (0x1BC89, 'X'),
    (0x1BC90, 'V'),
    (0x1BC9A, 'X'),
    (0x1BC9C, 'V'),
    (0x1BCA0, 'I'),
    (0x1BCA4, 'X'),
    (0x1CF00, 'V'),
    (0x1CF2E, 'X'),
    (0x1CF30, 'V'),
    (0x1CF47, 'X'),
    (0x1CF50, 'V'),
    (0x1CFC4, 'X'),
    (0x1D000, 'V'),
    (0x1D0F6, 'X'),
    (0x1D100, 'V'),
    (0x1D127, 'X'),
    (0x1D129, 'V'),
    (0x1D15E, 'M', '𝅗𝅥'),
    (0x1D15F, 'M', '𝅘𝅥'),
    (0x1D160, 'M', '𝅘𝅥𝅮'),
    (0x1D161, 'M', '𝅘𝅥𝅯'),
    (0x1D162, 'M', '𝅘𝅥𝅰'),
    (0x1D163, 'M', '𝅘𝅥𝅱'),
    (0x1D164, 'M', '𝅘𝅥𝅲'),
    (0x1D165, 'V'),
    (0x1D173, 'X'),
    (0x1D17B, 'V'),
    (0x1D1BB, 'M', '𝆹𝅥'),
    (0x1D1BC, 'M', '𝆺𝅥'),
    (0x1D1BD, 'M', '𝆹𝅥𝅮'),
    (0x1D1BE, 'M', '𝆺𝅥𝅮'),
    (0x1D1BF, 'M', '𝆹𝅥𝅯'),
    (0x1D1C0, 'M', '𝆺𝅥𝅯'),
    (0x1D1C1, 'V'),
    (0x1D1EB, 'X'),
    (0x1D200, 'V'),
    (0x1D246, 'X'),
    (0x1D2C0, 'V'),
    (0x1D2D4, 'X'),
    (0x1D2E0, 'V'),
    (0x1D2F4, 'X'),
    (0x1D300, 'V'),
    (0x1D357, 'X'),
    (0x1D360, 'V'),
    (0x1D379, 'X'),
    (0x1D400, 'M', 'a'),
    (0x1D401, 'M', 'b'),
    (0x1D402, 'M', 'c'),
    (0x1D403, 'M', 'd'),
    (0x1D404, 'M', 'e'),
    (0x1D405, 'M', 'f'),
    (0x1D406, 'M', 'g'),
    (0x1D407, 'M', 'h'),
    (0x1D408, 'M', 'i'),
    (0x1D409, 'M', 'j'),
    (0x1D40A, 'M', 'k'),
    (0x1D40B, 'M', 'l'),
    (0x1D40C, 'M', 'm'),
    (0x1D40D, 'M', 'n'),
    (0x1D40E, 'M', 'o'),
    (0x1D40F, 'M', 'p'),
    (0x1D410, 'M', 'q'),
    (0x1D411, 'M', 'r'),
    (0x1D412, 'M', 's'),
    (0x1D413, 'M', 't'),
    (0x1D414, 'M', 'u'),
    (0x1D415, 'M', 'v'),
    (0x1D416, 'M', 'w'),
    (0x1D417, 'M', 'x'),
    (0x1D418, 'M', 'y'),
    (0x1D419, 'M', 'z'),
    (0x1D41A, 'M', 'a'),
    (0x1D41B, 'M', 'b'),
    (0x1D41C, 'M', 'c'),
    (0x1D41D, 'M', 'd'),
    (0x1D41E, 'M', 'e'),
    (0x1D41F, 'M', 'f'),
    (0x1D420, 'M', 'g'),
    ]

def _seg_61() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D421, 'M', 'h'),
    (0x1D422, 'M', 'i'),
    (0x1D423, 'M', 'j'),
    (0x1D424, 'M', 'k'),
    (0x1D425, 'M', 'l'),
    (0x1D426, 'M', 'm'),
    (0x1D427, 'M', 'n'),
    (0x1D428, 'M', 'o'),
    (0x1D429, 'M', 'p'),
    (0x1D42A, 'M', 'q'),
    (0x1D42B, 'M', 'r'),
    (0x1D42C, 'M', 's'),
    (0x1D42D, 'M', 't'),
    (0x1D42E, 'M', 'u'),
    (0x1D42F, 'M', 'v'),
    (0x1D430, 'M', 'w'),
    (0x1D431, 'M', 'x'),
    (0x1D432, 'M', 'y'),
    (0x1D433, 'M', 'z'),
    (0x1D434, 'M', 'a'),
    (0x1D435, 'M', 'b'),
    (0x1D436, 'M', 'c'),
    (0x1D437, 'M', 'd'),
    (0x1D438, 'M', 'e'),
    (0x1D439, 'M', 'f'),
    (0x1D43A, 'M', 'g'),
    (0x1D43B, 'M', 'h'),
    (0x1D43C, 'M', 'i'),
    (0x1D43D, 'M', 'j'),
    (0x1D43E, 'M', 'k'),
    (0x1D43F, 'M', 'l'),
    (0x1D440, 'M', 'm'),
    (0x1D441, 'M', 'n'),
    (0x1D442, 'M', 'o'),
    (0x1D443, 'M', 'p'),
    (0x1D444, 'M', 'q'),
    (0x1D445, 'M', 'r'),
    (0x1D446, 'M', 's'),
    (0x1D447, 'M', 't'),
    (0x1D448, 'M', 'u'),
    (0x1D449, 'M', 'v'),
    (0x1D44A, 'M', 'w'),
    (0x1D44B, 'M', 'x'),
    (0x1D44C, 'M', 'y'),
    (0x1D44D, 'M', 'z'),
    (0x1D44E, 'M', 'a'),
    (0x1D44F, 'M', 'b'),
    (0x1D450, 'M', 'c'),
    (0x1D451, 'M', 'd'),
    (0x1D452, 'M', 'e'),
    (0x1D453, 'M', 'f'),
    (0x1D454, 'M', 'g'),
    (0x1D455, 'X'),
    (0x1D456, 'M', 'i'),
    (0x1D457, 'M', 'j'),
    (0x1D458, 'M', 'k'),
    (0x1D459, 'M', 'l'),
    (0x1D45A, 'M', 'm'),
    (0x1D45B, 'M', 'n'),
    (0x1D45C, 'M', 'o'),
    (0x1D45D, 'M', 'p'),
    (0x1D45E, 'M', 'q'),
    (0x1D45F, 'M', 'r'),
    (0x1D460, 'M', 's'),
    (0x1D461, 'M', 't'),
    (0x1D462, 'M', 'u'),
    (0x1D463, 'M', 'v'),
    (0x1D464, 'M', 'w'),
    (0x1D465, 'M', 'x'),
    (0x1D466, 'M', 'y'),
    (0x1D467, 'M', 'z'),
    (0x1D468, 'M', 'a'),
    (0x1D469, 'M', 'b'),
    (0x1D46A, 'M', 'c'),
    (0x1D46B, 'M', 'd'),
    (0x1D46C, 'M', 'e'),
    (0x1D46D, 'M', 'f'),
    (0x1D46E, 'M', 'g'),
    (0x1D46F, 'M', 'h'),
    (0x1D470, 'M', 'i'),
    (0x1D471, 'M', 'j'),
    (0x1D472, 'M', 'k'),
    (0x1D473, 'M', 'l'),
    (0x1D474, 'M', 'm'),
    (0x1D475, 'M', 'n'),
    (0x1D476, 'M', 'o'),
    (0x1D477, 'M', 'p'),
    (0x1D478, 'M', 'q'),
    (0x1D479, 'M', 'r'),
    (0x1D47A, 'M', 's'),
    (0x1D47B, 'M', 't'),
    (0x1D47C, 'M', 'u'),
    (0x1D47D, 'M', 'v'),
    (0x1D47E, 'M', 'w'),
    (0x1D47F, 'M', 'x'),
    (0x1D480, 'M', 'y'),
    (0x1D481, 'M', 'z'),
    (0x1D482, 'M', 'a'),
    (0x1D483, 'M', 'b'),
    (0x1D484, 'M', 'c'),
    ]

def _seg_62() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D485, 'M', 'd'),
    (0x1D486, 'M', 'e'),
    (0x1D487, 'M', 'f'),
    (0x1D488, 'M', 'g'),
    (0x1D489, 'M', 'h'),
    (0x1D48A, 'M', 'i'),
    (0x1D48B, 'M', 'j'),
    (0x1D48C, 'M', 'k'),
    (0x1D48D, 'M', 'l'),
    (0x1D48E, 'M', 'm'),
    (0x1D48F, 'M', 'n'),
    (0x1D490, 'M', 'o'),
    (0x1D491, 'M', 'p'),
    (0x1D492, 'M', 'q'),
    (0x1D493, 'M', 'r'),
    (0x1D494, 'M', 's'),
    (0x1D495, 'M', 't'),
    (0x1D496, 'M', 'u'),
    (0x1D497, 'M', 'v'),
    (0x1D498, 'M', 'w'),
    (0x1D499, 'M', 'x'),
    (0x1D49A, 'M', 'y'),
    (0x1D49B, 'M', 'z'),
    (0x1D49C, 'M', 'a'),
    (0x1D49D, 'X'),
    (0x1D49E, 'M', 'c'),
    (0x1D49F, 'M', 'd'),
    (0x1D4A0, 'X'),
    (0x1D4A2, 'M', 'g'),
    (0x1D4A3, 'X'),
    (0x1D4A5, 'M', 'j'),
    (0x1D4A6, 'M', 'k'),
    (0x1D4A7, 'X'),
    (0x1D4A9, 'M', 'n'),
    (0x1D4AA, 'M', 'o'),
    (0x1D4AB, 'M', 'p'),
    (0x1D4AC, 'M', 'q'),
    (0x1D4AD, 'X'),
    (0x1D4AE, 'M', 's'),
    (0x1D4AF, 'M', 't'),
    (0x1D4B0, 'M', 'u'),
    (0x1D4B1, 'M', 'v'),
    (0x1D4B2, 'M', 'w'),
    (0x1D4B3, 'M', 'x'),
    (0x1D4B4, 'M', 'y'),
    (0x1D4B5, 'M', 'z'),
    (0x1D4B6, 'M', 'a'),
    (0x1D4B7, 'M', 'b'),
    (0x1D4B8, 'M', 'c'),
    (0x1D4B9, 'M', 'd'),
    (0x1D4BA, 'X'),
    (0x1D4BB, 'M', 'f'),
    (0x1D4BC, 'X'),
    (0x1D4BD, 'M', 'h'),
    (0x1D4BE, 'M', 'i'),
    (0x1D4BF, 'M', 'j'),
    (0x1D4C0, 'M', 'k'),
    (0x1D4C1, 'M', 'l'),
    (0x1D4C2, 'M', 'm'),
    (0x1D4C3, 'M', 'n'),
    (0x1D4C4, 'X'),
    (0x1D4C5, 'M', 'p'),
    (0x1D4C6, 'M', 'q'),
    (0x1D4C7, 'M', 'r'),
    (0x1D4C8, 'M', 's'),
    (0x1D4C9, 'M', 't'),
    (0x1D4CA, 'M', 'u'),
    (0x1D4CB, 'M', 'v'),
    (0x1D4CC, 'M', 'w'),
    (0x1D4CD, 'M', 'x'),
    (0x1D4CE, 'M', 'y'),
    (0x1D4CF, 'M', 'z'),
    (0x1D4D0, 'M', 'a'),
    (0x1D4D1, 'M', 'b'),
    (0x1D4D2, 'M', 'c'),
    (0x1D4D3, 'M', 'd'),
    (0x1D4D4, 'M', 'e'),
    (0x1D4D5, 'M', 'f'),
    (0x1D4D6, 'M', 'g'),
    (0x1D4D7, 'M', 'h'),
    (0x1D4D8, 'M', 'i'),
    (0x1D4D9, 'M', 'j'),
    (0x1D4DA, 'M', 'k'),
    (0x1D4DB, 'M', 'l'),
    (0x1D4DC, 'M', 'm'),
    (0x1D4DD, 'M', 'n'),
    (0x1D4DE, 'M', 'o'),
    (0x1D4DF, 'M', 'p'),
    (0x1D4E0, 'M', 'q'),
    (0x1D4E1, 'M', 'r'),
    (0x1D4E2, 'M', 's'),
    (0x1D4E3, 'M', 't'),
    (0x1D4E4, 'M', 'u'),
    (0x1D4E5, 'M', 'v'),
    (0x1D4E6, 'M', 'w'),
    (0x1D4E7, 'M', 'x'),
    (0x1D4E8, 'M', 'y'),
    (0x1D4E9, 'M', 'z'),
    (0x1D4EA, 'M', 'a'),
    (0x1D4EB, 'M', 'b'),
    ]

def _seg_63() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D4EC, 'M', 'c'),
    (0x1D4ED, 'M', 'd'),
    (0x1D4EE, 'M', 'e'),
    (0x1D4EF, 'M', 'f'),
    (0x1D4F0, 'M', 'g'),
    (0x1D4F1, 'M', 'h'),
    (0x1D4F2, 'M', 'i'),
    (0x1D4F3, 'M', 'j'),
    (0x1D4F4, 'M', 'k'),
    (0x1D4F5, 'M', 'l'),
    (0x1D4F6, 'M', 'm'),
    (0x1D4F7, 'M', 'n'),
    (0x1D4F8, 'M', 'o'),
    (0x1D4F9, 'M', 'p'),
    (0x1D4FA, 'M', 'q'),
    (0x1D4FB, 'M', 'r'),
    (0x1D4FC, 'M', 's'),
    (0x1D4FD, 'M', 't'),
    (0x1D4FE, 'M', 'u'),
    (0x1D4FF, 'M', 'v'),
    (0x1D500, 'M', 'w'),
    (0x1D501, 'M', 'x'),
    (0x1D502, 'M', 'y'),
    (0x1D503, 'M', 'z'),
    (0x1D504, 'M', 'a'),
    (0x1D505, 'M', 'b'),
    (0x1D506, 'X'),
    (0x1D507, 'M', 'd'),
    (0x1D508, 'M', 'e'),
    (0x1D509, 'M', 'f'),
    (0x1D50A, 'M', 'g'),
    (0x1D50B, 'X'),
    (0x1D50D, 'M', 'j'),
    (0x1D50E, 'M', 'k'),
    (0x1D50F, 'M', 'l'),
    (0x1D510, 'M', 'm'),
    (0x1D511, 'M', 'n'),
    (0x1D512, 'M', 'o'),
    (0x1D513, 'M', 'p'),
    (0x1D514, 'M', 'q'),
    (0x1D515, 'X'),
    (0x1D516, 'M', 's'),
    (0x1D517, 'M', 't'),
    (0x1D518, 'M', 'u'),
    (0x1D519, 'M', 'v'),
    (0x1D51A, 'M', 'w'),
    (0x1D51B, 'M', 'x'),
    (0x1D51C, 'M', 'y'),
    (0x1D51D, 'X'),
    (0x1D51E, 'M', 'a'),
    (0x1D51F, 'M', 'b'),
    (0x1D520, 'M', 'c'),
    (0x1D521, 'M', 'd'),
    (0x1D522, 'M', 'e'),
    (0x1D523, 'M', 'f'),
    (0x1D524, 'M', 'g'),
    (0x1D525, 'M', 'h'),
    (0x1D526, 'M', 'i'),
    (0x1D527, 'M', 'j'),
    (0x1D528, 'M', 'k'),
    (0x1D529, 'M', 'l'),
    (0x1D52A, 'M', 'm'),
    (0x1D52B, 'M', 'n'),
    (0x1D52C, 'M', 'o'),
    (0x1D52D, 'M', 'p'),
    (0x1D52E, 'M', 'q'),
    (0x1D52F, 'M', 'r'),
    (0x1D530, 'M', 's'),
    (0x1D531, 'M', 't'),
    (0x1D532, 'M', 'u'),
    (0x1D533, 'M', 'v'),
    (0x1D534, 'M', 'w'),
    (0x1D535, 'M', 'x'),
    (0x1D536, 'M', 'y'),
    (0x1D537, 'M', 'z'),
    (0x1D538, 'M', 'a'),
    (0x1D539, 'M', 'b'),
    (0x1D53A, 'X'),
    (0x1D53B, 'M', 'd'),
    (0x1D53C, 'M', 'e'),
    (0x1D53D, 'M', 'f'),
    (0x1D53E, 'M', 'g'),
    (0x1D53F, 'X'),
    (0x1D540, 'M', 'i'),
    (0x1D541, 'M', 'j'),
    (0x1D542, 'M', 'k'),
    (0x1D543, 'M', 'l'),
    (0x1D544, 'M', 'm'),
    (0x1D545, 'X'),
    (0x1D546, 'M', 'o'),
    (0x1D547, 'X'),
    (0x1D54A, 'M', 's'),
    (0x1D54B, 'M', 't'),
    (0x1D54C, 'M', 'u'),
    (0x1D54D, 'M', 'v'),
    (0x1D54E, 'M', 'w'),
    (0x1D54F, 'M', 'x'),
    (0x1D550, 'M', 'y'),
    (0x1D551, 'X'),
    (0x1D552, 'M', 'a'),
    ]

def _seg_64() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D553, 'M', 'b'),
    (0x1D554, 'M', 'c'),
    (0x1D555, 'M', 'd'),
    (0x1D556, 'M', 'e'),
    (0x1D557, 'M', 'f'),
    (0x1D558, 'M', 'g'),
    (0x1D559, 'M', 'h'),
    (0x1D55A, 'M', 'i'),
    (0x1D55B, 'M', 'j'),
    (0x1D55C, 'M', 'k'),
    (0x1D55D, 'M', 'l'),
    (0x1D55E, 'M', 'm'),
    (0x1D55F, 'M', 'n'),
    (0x1D560, 'M', 'o'),
    (0x1D561, 'M', 'p'),
    (0x1D562, 'M', 'q'),
    (0x1D563, 'M', 'r'),
    (0x1D564, 'M', 's'),
    (0x1D565, 'M', 't'),
    (0x1D566, 'M', 'u'),
    (0x1D567, 'M', 'v'),
    (0x1D568, 'M', 'w'),
    (0x1D569, 'M', 'x'),
    (0x1D56A, 'M', 'y'),
    (0x1D56B, 'M', 'z'),
    (0x1D56C, 'M', 'a'),
    (0x1D56D, 'M', 'b'),
    (0x1D56E, 'M', 'c'),
    (0x1D56F, 'M', 'd'),
    (0x1D570, 'M', 'e'),
    (0x1D571, 'M', 'f'),
    (0x1D572, 'M', 'g'),
    (0x1D573, 'M', 'h'),
    (0x1D574, 'M', 'i'),
    (0x1D575, 'M', 'j'),
    (0x1D576, 'M', 'k'),
    (0x1D577, 'M', 'l'),
    (0x1D578, 'M', 'm'),
    (0x1D579, 'M', 'n'),
    (0x1D57A, 'M', 'o'),
    (0x1D57B, 'M', 'p'),
    (0x1D57C, 'M', 'q'),
    (0x1D57D, 'M', 'r'),
    (0x1D57E, 'M', 's'),
    (0x1D57F, 'M', 't'),
    (0x1D580, 'M', 'u'),
    (0x1D581, 'M', 'v'),
    (0x1D582, 'M', 'w'),
    (0x1D583, 'M', 'x'),
    (0x1D584, 'M', 'y'),
    (0x1D585, 'M', 'z'),
    (0x1D586, 'M', 'a'),
    (0x1D587, 'M', 'b'),
    (0x1D588, 'M', 'c'),
    (0x1D589, 'M', 'd'),
    (0x1D58A, 'M', 'e'),
    (0x1D58B, 'M', 'f'),
    (0x1D58C, 'M', 'g'),
    (0x1D58D, 'M', 'h'),
    (0x1D58E, 'M', 'i'),
    (0x1D58F, 'M', 'j'),
    (0x1D590, 'M', 'k'),
    (0x1D591, 'M', 'l'),
    (0x1D592, 'M', 'm'),
    (0x1D593, 'M', 'n'),
    (0x1D594, 'M', 'o'),
    (0x1D595, 'M', 'p'),
    (0x1D596, 'M', 'q'),
    (0x1D597, 'M', 'r'),
    (0x1D598, 'M', 's'),
    (0x1D599, 'M', 't'),
    (0x1D59A, 'M', 'u'),
    (0x1D59B, 'M', 'v'),
    (0x1D59C, 'M', 'w'),
    (0x1D59D, 'M', 'x'),
    (0x1D59E, 'M', 'y'),
    (0x1D59F, 'M', 'z'),
    (0x1D5A0, 'M', 'a'),
    (0x1D5A1, 'M', 'b'),
    (0x1D5A2, 'M', 'c'),
    (0x1D5A3, 'M', 'd'),
    (0x1D5A4, 'M', 'e'),
    (0x1D5A5, 'M', 'f'),
    (0x1D5A6, 'M', 'g'),
    (0x1D5A7, 'M', 'h'),
    (0x1D5A8, 'M', 'i'),
    (0x1D5A9, 'M', 'j'),
    (0x1D5AA, 'M', 'k'),
    (0x1D5AB, 'M', 'l'),
    (0x1D5AC, 'M', 'm'),
    (0x1D5AD, 'M', 'n'),
    (0x1D5AE, 'M', 'o'),
    (0x1D5AF, 'M', 'p'),
    (0x1D5B0, 'M', 'q'),
    (0x1D5B1, 'M', 'r'),
    (0x1D5B2, 'M', 's'),
    (0x1D5B3, 'M', 't'),
    (0x1D5B4, 'M', 'u'),
    (0x1D5B5, 'M', 'v'),
    (0x1D5B6, 'M', 'w'),
    ]

def _seg_65() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D5B7, 'M', 'x'),
    (0x1D5B8, 'M', 'y'),
    (0x1D5B9, 'M', 'z'),
    (0x1D5BA, 'M', 'a'),
    (0x1D5BB, 'M', 'b'),
    (0x1D5BC, 'M', 'c'),
    (0x1D5BD, 'M', 'd'),
    (0x1D5BE, 'M', 'e'),
    (0x1D5BF, 'M', 'f'),
    (0x1D5C0, 'M', 'g'),
    (0x1D5C1, 'M', 'h'),
    (0x1D5C2, 'M', 'i'),
    (0x1D5C3, 'M', 'j'),
    (0x1D5C4, 'M', 'k'),
    (0x1D5C5, 'M', 'l'),
    (0x1D5C6, 'M', 'm'),
    (0x1D5C7, 'M', 'n'),
    (0x1D5C8, 'M', 'o'),
    (0x1D5C9, 'M', 'p'),
    (0x1D5CA, 'M', 'q'),
    (0x1D5CB, 'M', 'r'),
    (0x1D5CC, 'M', 's'),
    (0x1D5CD, 'M', 't'),
    (0x1D5CE, 'M', 'u'),
    (0x1D5CF, 'M', 'v'),
    (0x1D5D0, 'M', 'w'),
    (0x1D5D1, 'M', 'x'),
    (0x1D5D2, 'M', 'y'),
    (0x1D5D3, 'M', 'z'),
    (0x1D5D4, 'M', 'a'),
    (0x1D5D5, 'M', 'b'),
    (0x1D5D6, 'M', 'c'),
    (0x1D5D7, 'M', 'd'),
    (0x1D5D8, 'M', 'e'),
    (0x1D5D9, 'M', 'f'),
    (0x1D5DA, 'M', 'g'),
    (0x1D5DB, 'M', 'h'),
    (0x1D5DC, 'M', 'i'),
    (0x1D5DD, 'M', 'j'),
    (0x1D5DE, 'M', 'k'),
    (0x1D5DF, 'M', 'l'),
    (0x1D5E0, 'M', 'm'),
    (0x1D5E1, 'M', 'n'),
    (0x1D5E2, 'M', 'o'),
    (0x1D5E3, 'M', 'p'),
    (0x1D5E4, 'M', 'q'),
    (0x1D5E5, 'M', 'r'),
    (0x1D5E6, 'M', 's'),
    (0x1D5E7, 'M', 't'),
    (0x1D5E8, 'M', 'u'),
    (0x1D5E9, 'M', 'v'),
    (0x1D5EA, 'M', 'w'),
    (0x1D5EB, 'M', 'x'),
    (0x1D5EC, 'M', 'y'),
    (0x1D5ED, 'M', 'z'),
    (0x1D5EE, 'M', 'a'),
    (0x1D5EF, 'M', 'b'),
    (0x1D5F0, 'M', 'c'),
    (0x1D5F1, 'M', 'd'),
    (0x1D5F2, 'M', 'e'),
    (0x1D5F3, 'M', 'f'),
    (0x1D5F4, 'M', 'g'),
    (0x1D5F5, 'M', 'h'),
    (0x1D5F6, 'M', 'i'),
    (0x1D5F7, 'M', 'j'),
    (0x1D5F8, 'M', 'k'),
    (0x1D5F9, 'M', 'l'),
    (0x1D5FA, 'M', 'm'),
    (0x1D5FB, 'M', 'n'),
    (0x1D5FC, 'M', 'o'),
    (0x1D5FD, 'M', 'p'),
    (0x1D5FE, 'M', 'q'),
    (0x1D5FF, 'M', 'r'),
    (0x1D600, 'M', 's'),
    (0x1D601, 'M', 't'),
    (0x1D602, 'M', 'u'),
    (0x1D603, 'M', 'v'),
    (0x1D604, 'M', 'w'),
    (0x1D605, 'M', 'x'),
    (0x1D606, 'M', 'y'),
    (0x1D607, 'M', 'z'),
    (0x1D608, 'M', 'a'),
    (0x1D609, 'M', 'b'),
    (0x1D60A, 'M', 'c'),
    (0x1D60B, 'M', 'd'),
    (0x1D60C, 'M', 'e'),
    (0x1D60D, 'M', 'f'),
    (0x1D60E, 'M', 'g'),
    (0x1D60F, 'M', 'h'),
    (0x1D610, 'M', 'i'),
    (0x1D611, 'M', 'j'),
    (0x1D612, 'M', 'k'),
    (0x1D613, 'M', 'l'),
    (0x1D614, 'M', 'm'),
    (0x1D615, 'M', 'n'),
    (0x1D616, 'M', 'o'),
    (0x1D617, 'M', 'p'),
    (0x1D618, 'M', 'q'),
    (0x1D619, 'M', 'r'),
    (0x1D61A, 'M', 's'),
    ]

def _seg_66() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D61B, 'M', 't'),
    (0x1D61C, 'M', 'u'),
    (0x1D61D, 'M', 'v'),
    (0x1D61E, 'M', 'w'),
    (0x1D61F, 'M', 'x'),
    (0x1D620, 'M', 'y'),
    (0x1D621, 'M', 'z'),
    (0x1D622, 'M', 'a'),
    (0x1D623, 'M', 'b'),
    (0x1D624, 'M', 'c'),
    (0x1D625, 'M', 'd'),
    (0x1D626, 'M', 'e'),
    (0x1D627, 'M', 'f'),
    (0x1D628, 'M', 'g'),
    (0x1D629, 'M', 'h'),
    (0x1D62A, 'M', 'i'),
    (0x1D62B, 'M', 'j'),
    (0x1D62C, 'M', 'k'),
    (0x1D62D, 'M', 'l'),
    (0x1D62E, 'M', 'm'),
    (0x1D62F, 'M', 'n'),
    (0x1D630, 'M', 'o'),
    (0x1D631, 'M', 'p'),
    (0x1D632, 'M', 'q'),
    (0x1D633, 'M', 'r'),
    (0x1D634, 'M', 's'),
    (0x1D635, 'M', 't'),
    (0x1D636, 'M', 'u'),
    (0x1D637, 'M', 'v'),
    (0x1D638, 'M', 'w'),
    (0x1D639, 'M', 'x'),
    (0x1D63A, 'M', 'y'),
    (0x1D63B, 'M', 'z'),
    (0x1D63C, 'M', 'a'),
    (0x1D63D, 'M', 'b'),
    (0x1D63E, 'M', 'c'),
    (0x1D63F, 'M', 'd'),
    (0x1D640, 'M', 'e'),
    (0x1D641, 'M', 'f'),
    (0x1D642, 'M', 'g'),
    (0x1D643, 'M', 'h'),
    (0x1D644, 'M', 'i'),
    (0x1D645, 'M', 'j'),
    (0x1D646, 'M', 'k'),
    (0x1D647, 'M', 'l'),
    (0x1D648, 'M', 'm'),
    (0x1D649, 'M', 'n'),
    (0x1D64A, 'M', 'o'),
    (0x1D64B, 'M', 'p'),
    (0x1D64C, 'M', 'q'),
    (0x1D64D, 'M', 'r'),
    (0x1D64E, 'M', 's'),
    (0x1D64F, 'M', 't'),
    (0x1D650, 'M', 'u'),
    (0x1D651, 'M', 'v'),
    (0x1D652, 'M', 'w'),
    (0x1D653, 'M', 'x'),
    (0x1D654, 'M', 'y'),
    (0x1D655, 'M', 'z'),
    (0x1D656, 'M', 'a'),
    (0x1D657, 'M', 'b'),
    (0x1D658, 'M', 'c'),
    (0x1D659, 'M', 'd'),
    (0x1D65A, 'M', 'e'),
    (0x1D65B, 'M', 'f'),
    (0x1D65C, 'M', 'g'),
    (0x1D65D, 'M', 'h'),
    (0x1D65E, 'M', 'i'),
    (0x1D65F, 'M', 'j'),
    (0x1D660, 'M', 'k'),
    (0x1D661, 'M', 'l'),
    (0x1D662, 'M', 'm'),
    (0x1D663, 'M', 'n'),
    (0x1D664, 'M', 'o'),
    (0x1D665, 'M', 'p'),
    (0x1D666, 'M', 'q'),
    (0x1D667, 'M', 'r'),
    (0x1D668, 'M', 's'),
    (0x1D669, 'M', 't'),
    (0x1D66A, 'M', 'u'),
    (0x1D66B, 'M', 'v'),
    (0x1D66C, 'M', 'w'),
    (0x1D66D, 'M', 'x'),
    (0x1D66E, 'M', 'y'),
    (0x1D66F, 'M', 'z'),
    (0x1D670, 'M', 'a'),
    (0x1D671, 'M', 'b'),
    (0x1D672, 'M', 'c'),
    (0x1D673, 'M', 'd'),
    (0x1D674, 'M', 'e'),
    (0x1D675, 'M', 'f'),
    (0x1D676, 'M', 'g'),
    (0x1D677, 'M', 'h'),
    (0x1D678, 'M', 'i'),
    (0x1D679, 'M', 'j'),
    (0x1D67A, 'M', 'k'),
    (0x1D67B, 'M', 'l'),
    (0x1D67C, 'M', 'm'),
    (0x1D67D, 'M', 'n'),
    (0x1D67E, 'M', 'o'),
    ]

def _seg_67() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D67F, 'M', 'p'),
    (0x1D680, 'M', 'q'),
    (0x1D681, 'M', 'r'),
    (0x1D682, 'M', 's'),
    (0x1D683, 'M', 't'),
    (0x1D684, 'M', 'u'),
    (0x1D685, 'M', 'v'),
    (0x1D686, 'M', 'w'),
    (0x1D687, 'M', 'x'),
    (0x1D688, 'M', 'y'),
    (0x1D689, 'M', 'z'),
    (0x1D68A, 'M', 'a'),
    (0x1D68B, 'M', 'b'),
    (0x1D68C, 'M', 'c'),
    (0x1D68D, 'M', 'd'),
    (0x1D68E, 'M', 'e'),
    (0x1D68F, 'M', 'f'),
    (0x1D690, 'M', 'g'),
    (0x1D691, 'M', 'h'),
    (0x1D692, 'M', 'i'),
    (0x1D693, 'M', 'j'),
    (0x1D694, 'M', 'k'),
    (0x1D695, 'M', 'l'),
    (0x1D696, 'M', 'm'),
    (0x1D697, 'M', 'n'),
    (0x1D698, 'M', 'o'),
    (0x1D699, 'M', 'p'),
    (0x1D69A, 'M', 'q'),
    (0x1D69B, 'M', 'r'),
    (0x1D69C, 'M', 's'),
    (0x1D69D, 'M', 't'),
    (0x1D69E, 'M', 'u'),
    (0x1D69F, 'M', 'v'),
    (0x1D6A0, 'M', 'w'),
    (0x1D6A1, 'M', 'x'),
    (0x1D6A2, 'M', 'y'),
    (0x1D6A3, 'M', 'z'),
    (0x1D6A4, 'M', 'ı'),
    (0x1D6A5, 'M', 'ȷ'),
    (0x1D6A6, 'X'),
    (0x1D6A8, 'M', 'α'),
    (0x1D6A9, 'M', 'β'),
    (0x1D6AA, 'M', 'γ'),
    (0x1D6AB, 'M', 'δ'),
    (0x1D6AC, 'M', 'ε'),
    (0x1D6AD, 'M', 'ζ'),
    (0x1D6AE, 'M', 'η'),
    (0x1D6AF, 'M', 'θ'),
    (0x1D6B0, 'M', 'ι'),
    (0x1D6B1, 'M', 'κ'),
    (0x1D6B2, 'M', 'λ'),
    (0x1D6B3, 'M', 'μ'),
    (0x1D6B4, 'M', 'ν'),
    (0x1D6B5, 'M', 'ξ'),
    (0x1D6B6, 'M', 'ο'),
    (0x1D6B7, 'M', 'π'),
    (0x1D6B8, 'M', 'ρ'),
    (0x1D6B9, 'M', 'θ'),
    (0x1D6BA, 'M', 'σ'),
    (0x1D6BB, 'M', 'τ'),
    (0x1D6BC, 'M', 'υ'),
    (0x1D6BD, 'M', 'φ'),
    (0x1D6BE, 'M', 'χ'),
    (0x1D6BF, 'M', 'ψ'),
    (0x1D6C0, 'M', 'ω'),
    (0x1D6C1, 'M', '∇'),
    (0x1D6C2, 'M', 'α'),
    (0x1D6C3, 'M', 'β'),
    (0x1D6C4, 'M', 'γ'),
    (0x1D6C5, 'M', 'δ'),
    (0x1D6C6, 'M', 'ε'),
    (0x1D6C7, 'M', 'ζ'),
    (0x1D6C8, 'M', 'η'),
    (0x1D6C9, 'M', 'θ'),
    (0x1D6CA, 'M', 'ι'),
    (0x1D6CB, 'M', 'κ'),
    (0x1D6CC, 'M', 'λ'),
    (0x1D6CD, 'M', 'μ'),
    (0x1D6CE, 'M', 'ν'),
    (0x1D6CF, 'M', 'ξ'),
    (0x1D6D0, 'M', 'ο'),
    (0x1D6D1, 'M', 'π'),
    (0x1D6D2, 'M', 'ρ'),
    (0x1D6D3, 'M', 'σ'),
    (0x1D6D5, 'M', 'τ'),
    (0x1D6D6, 'M', 'υ'),
    (0x1D6D7, 'M', 'φ'),
    (0x1D6D8, 'M', 'χ'),
    (0x1D6D9, 'M', 'ψ'),
    (0x1D6DA, 'M', 'ω'),
    (0x1D6DB, 'M', '∂'),
    (0x1D6DC, 'M', 'ε'),
    (0x1D6DD, 'M', 'θ'),
    (0x1D6DE, 'M', 'κ'),
    (0x1D6DF, 'M', 'φ'),
    (0x1D6E0, 'M', 'ρ'),
    (0x1D6E1, 'M', 'π'),
    (0x1D6E2, 'M', 'α'),
    (0x1D6E3, 'M', 'β'),
    (0x1D6E4, 'M', 'γ'),
    ]

def _seg_68() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D6E5, 'M', 'δ'),
    (0x1D6E6, 'M', 'ε'),
    (0x1D6E7, 'M', 'ζ'),
    (0x1D6E8, 'M', 'η'),
    (0x1D6E9, 'M', 'θ'),
    (0x1D6EA, 'M', 'ι'),
    (0x1D6EB, 'M', 'κ'),
    (0x1D6EC, 'M', 'λ'),
    (0x1D6ED, 'M', 'μ'),
    (0x1D6EE, 'M', 'ν'),
    (0x1D6EF, 'M', 'ξ'),
    (0x1D6F0, 'M', 'ο'),
    (0x1D6F1, 'M', 'π'),
    (0x1D6F2, 'M', 'ρ'),
    (0x1D6F3, 'M', 'θ'),
    (0x1D6F4, 'M', 'σ'),
    (0x1D6F5, 'M', 'τ'),
    (0x1D6F6, 'M', 'υ'),
    (0x1D6F7, 'M', 'φ'),
    (0x1D6F8, 'M', 'χ'),
    (0x1D6F9, 'M', 'ψ'),
    (0x1D6FA, 'M', 'ω'),
    (0x1D6FB, 'M', '∇'),
    (0x1D6FC, 'M', 'α'),
    (0x1D6FD, 'M', 'β'),
    (0x1D6FE, 'M', 'γ'),
    (0x1D6FF, 'M', 'δ'),
    (0x1D700, 'M', 'ε'),
    (0x1D701, 'M', 'ζ'),
    (0x1D702, 'M', 'η'),
    (0x1D703, 'M', 'θ'),
    (0x1D704, 'M', 'ι'),
    (0x1D705, 'M', 'κ'),
    (0x1D706, 'M', 'λ'),
    (0x1D707, 'M', 'μ'),
    (0x1D708, 'M', 'ν'),
    (0x1D709, 'M', 'ξ'),
    (0x1D70A, 'M', 'ο'),
    (0x1D70B, 'M', 'π'),
    (0x1D70C, 'M', 'ρ'),
    (0x1D70D, 'M', 'σ'),
    (0x1D70F, 'M', 'τ'),
    (0x1D710, 'M', 'υ'),
    (0x1D711, 'M', 'φ'),
    (0x1D712, 'M', 'χ'),
    (0x1D713, 'M', 'ψ'),
    (0x1D714, 'M', 'ω'),
    (0x1D715, 'M', '∂'),
    (0x1D716, 'M', 'ε'),
    (0x1D717, 'M', 'θ'),
    (0x1D718, 'M', 'κ'),
    (0x1D719, 'M', 'φ'),
    (0x1D71A, 'M', 'ρ'),
    (0x1D71B, 'M', 'π'),
    (0x1D71C, 'M', 'α'),
    (0x1D71D, 'M', 'β'),
    (0x1D71E, 'M', 'γ'),
    (0x1D71F, 'M', 'δ'),
    (0x1D720, 'M', 'ε'),
    (0x1D721, 'M', 'ζ'),
    (0x1D722, 'M', 'η'),
    (0x1D723, 'M', 'θ'),
    (0x1D724, 'M', 'ι'),
    (0x1D725, 'M', 'κ'),
    (0x1D726, 'M', 'λ'),
    (0x1D727, 'M', 'μ'),
    (0x1D728, 'M', 'ν'),
    (0x1D729, 'M', 'ξ'),
    (0x1D72A, 'M', 'ο'),
    (0x1D72B, 'M', 'π'),
    (0x1D72C, 'M', 'ρ'),
    (0x1D72D, 'M', 'θ'),
    (0x1D72E, 'M', 'σ'),
    (0x1D72F, 'M', 'τ'),
    (0x1D730, 'M', 'υ'),
    (0x1D731, 'M', 'φ'),
    (0x1D732, 'M', 'χ'),
    (0x1D733, 'M', 'ψ'),
    (0x1D734, 'M', 'ω'),
    (0x1D735, 'M', '∇'),
    (0x1D736, 'M', 'α'),
    (0x1D737, 'M', 'β'),
    (0x1D738, 'M', 'γ'),
    (0x1D739, 'M', 'δ'),
    (0x1D73A, 'M', 'ε'),
    (0x1D73B, 'M', 'ζ'),
    (0x1D73C, 'M', 'η'),
    (0x1D73D, 'M', 'θ'),
    (0x1D73E, 'M', 'ι'),
    (0x1D73F, 'M', 'κ'),
    (0x1D740, 'M', 'λ'),
    (0x1D741, 'M', 'μ'),
    (0x1D742, 'M', 'ν'),
    (0x1D743, 'M', 'ξ'),
    (0x1D744, 'M', 'ο'),
    (0x1D745, 'M', 'π'),
    (0x1D746, 'M', 'ρ'),
    (0x1D747, 'M', 'σ'),
    (0x1D749, 'M', 'τ'),
    (0x1D74A, 'M', 'υ'),
    ]

def _seg_69() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D74B, 'M', 'φ'),
    (0x1D74C, 'M', 'χ'),
    (0x1D74D, 'M', 'ψ'),
    (0x1D74E, 'M', 'ω'),
    (0x1D74F, 'M', '∂'),
    (0x1D750, 'M', 'ε'),
    (0x1D751, 'M', 'θ'),
    (0x1D752, 'M', 'κ'),
    (0x1D753, 'M', 'φ'),
    (0x1D754, 'M', 'ρ'),
    (0x1D755, 'M', 'π'),
    (0x1D756, 'M', 'α'),
    (0x1D757, 'M', 'β'),
    (0x1D758, 'M', 'γ'),
    (0x1D759, 'M', 'δ'),
    (0x1D75A, 'M', 'ε'),
    (0x1D75B, 'M', 'ζ'),
    (0x1D75C, 'M', 'η'),
    (0x1D75D, 'M', 'θ'),
    (0x1D75E, 'M', 'ι'),
    (0x1D75F, 'M', 'κ'),
    (0x1D760, 'M', 'λ'),
    (0x1D761, 'M', 'μ'),
    (0x1D762, 'M', 'ν'),
    (0x1D763, 'M', 'ξ'),
    (0x1D764, 'M', 'ο'),
    (0x1D765, 'M', 'π'),
    (0x1D766, 'M', 'ρ'),
    (0x1D767, 'M', 'θ'),
    (0x1D768, 'M', 'σ'),
    (0x1D769, 'M', 'τ'),
    (0x1D76A, 'M', 'υ'),
    (0x1D76B, 'M', 'φ'),
    (0x1D76C, 'M', 'χ'),
    (0x1D76D, 'M', 'ψ'),
    (0x1D76E, 'M', 'ω'),
    (0x1D76F, 'M', '∇'),
    (0x1D770, 'M', 'α'),
    (0x1D771, 'M', 'β'),
    (0x1D772, 'M', 'γ'),
    (0x1D773, 'M', 'δ'),
    (0x1D774, 'M', 'ε'),
    (0x1D775, 'M', 'ζ'),
    (0x1D776, 'M', 'η'),
    (0x1D777, 'M', 'θ'),
    (0x1D778, 'M', 'ι'),
    (0x1D779, 'M', 'κ'),
    (0x1D77A, 'M', 'λ'),
    (0x1D77B, 'M', 'μ'),
    (0x1D77C, 'M', 'ν'),
    (0x1D77D, 'M', 'ξ'),
    (0x1D77E, 'M', 'ο'),
    (0x1D77F, 'M', 'π'),
    (0x1D780, 'M', 'ρ'),
    (0x1D781, 'M', 'σ'),
    (0x1D783, 'M', 'τ'),
    (0x1D784, 'M', 'υ'),
    (0x1D785, 'M', 'φ'),
    (0x1D786, 'M', 'χ'),
    (0x1D787, 'M', 'ψ'),
    (0x1D788, 'M', 'ω'),
    (0x1D789, 'M', '∂'),
    (0x1D78A, 'M', 'ε'),
    (0x1D78B, 'M', 'θ'),
    (0x1D78C, 'M', 'κ'),
    (0x1D78D, 'M', 'φ'),
    (0x1D78E, 'M', 'ρ'),
    (0x1D78F, 'M', 'π'),
    (0x1D790, 'M', 'α'),
    (0x1D791, 'M', 'β'),
    (0x1D792, 'M', 'γ'),
    (0x1D793, 'M', 'δ'),
    (0x1D794, 'M', 'ε'),
    (0x1D795, 'M', 'ζ'),
    (0x1D796, 'M', 'η'),
    (0x1D797, 'M', 'θ'),
    (0x1D798, 'M', 'ι'),
    (0x1D799, 'M', 'κ'),
    (0x1D79A, 'M', 'λ'),
    (0x1D79B, 'M', 'μ'),
    (0x1D79C, 'M', 'ν'),
    (0x1D79D, 'M', 'ξ'),
    (0x1D79E, 'M', 'ο'),
    (0x1D79F, 'M', 'π'),
    (0x1D7A0, 'M', 'ρ'),
    (0x1D7A1, 'M', 'θ'),
    (0x1D7A2, 'M', 'σ'),
    (0x1D7A3, 'M', 'τ'),
    (0x1D7A4, 'M', 'υ'),
    (0x1D7A5, 'M', 'φ'),
    (0x1D7A6, 'M', 'χ'),
    (0x1D7A7, 'M', 'ψ'),
    (0x1D7A8, 'M', 'ω'),
    (0x1D7A9, 'M', '∇'),
    (0x1D7AA, 'M', 'α'),
    (0x1D7AB, 'M', 'β'),
    (0x1D7AC, 'M', 'γ'),
    (0x1D7AD, 'M', 'δ'),
    (0x1D7AE, 'M', 'ε'),
    (0x1D7AF, 'M', 'ζ'),
    ]

def _seg_70() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1D7B0, 'M', 'η'),
    (0x1D7B1, 'M', 'θ'),
    (0x1D7B2, 'M', 'ι'),
    (0x1D7B3, 'M', 'κ'),
    (0x1D7B4, 'M', 'λ'),
    (0x1D7B5, 'M', 'μ'),
    (0x1D7B6, 'M', 'ν'),
    (0x1D7B7, 'M', 'ξ'),
    (0x1D7B8, 'M', 'ο'),
    (0x1D7B9, 'M', 'π'),
    (0x1D7BA, 'M', 'ρ'),
    (0x1D7BB, 'M', 'σ'),
    (0x1D7BD, 'M', 'τ'),
    (0x1D7BE, 'M', 'υ'),
    (0x1D7BF, 'M', 'φ'),
    (0x1D7C0, 'M', 'χ'),
    (0x1D7C1, 'M', 'ψ'),
    (0x1D7C2, 'M', 'ω'),
    (0x1D7C3, 'M', '∂'),
    (0x1D7C4, 'M', 'ε'),
    (0x1D7C5, 'M', 'θ'),
    (0x1D7C6, 'M', 'κ'),
    (0x1D7C7, 'M', 'φ'),
    (0x1D7C8, 'M', 'ρ'),
    (0x1D7C9, 'M', 'π'),
    (0x1D7CA, 'M', 'ϝ'),
    (0x1D7CC, 'X'),
    (0x1D7CE, 'M', '0'),
    (0x1D7CF, 'M', '1'),
    (0x1D7D0, 'M', '2'),
    (0x1D7D1, 'M', '3'),
    (0x1D7D2, 'M', '4'),
    (0x1D7D3, 'M', '5'),
    (0x1D7D4, 'M', '6'),
    (0x1D7D5, 'M', '7'),
    (0x1D7D6, 'M', '8'),
    (0x1D7D7, 'M', '9'),
    (0x1D7D8, 'M', '0'),
    (0x1D7D9, 'M', '1'),
    (0x1D7DA, 'M', '2'),
    (0x1D7DB, 'M', '3'),
    (0x1D7DC, 'M', '4'),
    (0x1D7DD, 'M', '5'),
    (0x1D7DE, 'M', '6'),
    (0x1D7DF, 'M', '7'),
    (0x1D7E0, 'M', '8'),
    (0x1D7E1, 'M', '9'),
    (0x1D7E2, 'M', '0'),
    (0x1D7E3, 'M', '1'),
    (0x1D7E4, 'M', '2'),
    (0x1D7E5, 'M', '3'),
    (0x1D7E6, 'M', '4'),
    (0x1D7E7, 'M', '5'),
    (0x1D7E8, 'M', '6'),
    (0x1D7E9, 'M', '7'),
    (0x1D7EA, 'M', '8'),
    (0x1D7EB, 'M', '9'),
    (0x1D7EC, 'M', '0'),
    (0x1D7ED, 'M', '1'),
    (0x1D7EE, 'M', '2'),
    (0x1D7EF, 'M', '3'),
    (0x1D7F0, 'M', '4'),
    (0x1D7F1, 'M', '5'),
    (0x1D7F2, 'M', '6'),
    (0x1D7F3, 'M', '7'),
    (0x1D7F4, 'M', '8'),
    (0x1D7F5, 'M', '9'),
    (0x1D7F6, 'M', '0'),
    (0x1D7F7, 'M', '1'),
    (0x1D7F8, 'M', '2'),
    (0x1D7F9, 'M', '3'),
    (0x1D7FA, 'M', '4'),
    (0x1D7FB, 'M', '5'),
    (0x1D7FC, 'M', '6'),
    (0x1D7FD, 'M', '7'),
    (0x1D7FE, 'M', '8'),
    (0x1D7FF, 'M', '9'),
    (0x1D800, 'V'),
    (0x1DA8C, 'X'),
    (0x1DA9B, 'V'),
    (0x1DAA0, 'X'),
    (0x1DAA1, 'V'),
    (0x1DAB0, 'X'),
    (0x1DF00, 'V'),
    (0x1DF1F, 'X'),
    (0x1DF25, 'V'),
    (0x1DF2B, 'X'),
    (0x1E000, 'V'),
    (0x1E007, 'X'),
    (0x1E008, 'V'),
    (0x1E019, 'X'),
    (0x1E01B, 'V'),
    (0x1E022, 'X'),
    (0x1E023, 'V'),
    (0x1E025, 'X'),
    (0x1E026, 'V'),
    (0x1E02B, 'X'),
    (0x1E030, 'M', 'а'),
    (0x1E031, 'M', 'б'),
    (0x1E032, 'M', 'в'),
    ]

def _seg_71() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1E033, 'M', 'г'),
    (0x1E034, 'M', 'д'),
    (0x1E035, 'M', 'е'),
    (0x1E036, 'M', 'ж'),
    (0x1E037, 'M', 'з'),
    (0x1E038, 'M', 'и'),
    (0x1E039, 'M', 'к'),
    (0x1E03A, 'M', 'л'),
    (0x1E03B, 'M', 'м'),
    (0x1E03C, 'M', 'о'),
    (0x1E03D, 'M', 'п'),
    (0x1E03E, 'M', 'р'),
    (0x1E03F, 'M', 'с'),
    (0x1E040, 'M', 'т'),
    (0x1E041, 'M', 'у'),
    (0x1E042, 'M', 'ф'),
    (0x1E043, 'M', 'х'),
    (0x1E044, 'M', 'ц'),
    (0x1E045, 'M', 'ч'),
    (0x1E046, 'M', 'ш'),
    (0x1E047, 'M', 'ы'),
    (0x1E048, 'M', 'э'),
    (0x1E049, 'M', 'ю'),
    (0x1E04A, 'M', 'ꚉ'),
    (0x1E04B, 'M', 'ә'),
    (0x1E04C, 'M', 'і'),
    (0x1E04D, 'M', 'ј'),
    (0x1E04E, 'M', 'ө'),
    (0x1E04F, 'M', 'ү'),
    (0x1E050, 'M', 'ӏ'),
    (0x1E051, 'M', 'а'),
    (0x1E052, 'M', 'б'),
    (0x1E053, 'M', 'в'),
    (0x1E054, 'M', 'г'),
    (0x1E055, 'M', 'д'),
    (0x1E056, 'M', 'е'),
    (0x1E057, 'M', 'ж'),
    (0x1E058, 'M', 'з'),
    (0x1E059, 'M', 'и'),
    (0x1E05A, 'M', 'к'),
    (0x1E05B, 'M', 'л'),
    (0x1E05C, 'M', 'о'),
    (0x1E05D, 'M', 'п'),
    (0x1E05E, 'M', 'с'),
    (0x1E05F, 'M', 'у'),
    (0x1E060, 'M', 'ф'),
    (0x1E061, 'M', 'х'),
    (0x1E062, 'M', 'ц'),
    (0x1E063, 'M', 'ч'),
    (0x1E064, 'M', 'ш'),
    (0x1E065, 'M', 'ъ'),
    (0x1E066, 'M', 'ы'),
    (0x1E067, 'M', 'ґ'),
    (0x1E068, 'M', 'і'),
    (0x1E069, 'M', 'ѕ'),
    (0x1E06A, 'M', 'џ'),
    (0x1E06B, 'M', 'ҫ'),
    (0x1E06C, 'M', 'ꙑ'),
    (0x1E06D, 'M', 'ұ'),
    (0x1E06E, 'X'),
    (0x1E08F, 'V'),
    (0x1E090, 'X'),
    (0x1E100, 'V'),
    (0x1E12D, 'X'),
    (0x1E130, 'V'),
    (0x1E13E, 'X'),
    (0x1E140, 'V'),
    (0x1E14A, 'X'),
    (0x1E14E, 'V'),
    (0x1E150, 'X'),
    (0x1E290, 'V'),
    (0x1E2AF, 'X'),
    (0x1E2C0, 'V'),
    (0x1E2FA, 'X'),
    (0x1E2FF, 'V'),
    (0x1E300, 'X'),
    (0x1E4D0, 'V'),
    (0x1E4FA, 'X'),
    (0x1E7E0, 'V'),
    (0x1E7E7, 'X'),
    (0x1E7E8, 'V'),
    (0x1E7EC, 'X'),
    (0x1E7ED, 'V'),
    (0x1E7EF, 'X'),
    (0x1E7F0, 'V'),
    (0x1E7FF, 'X'),
    (0x1E800, 'V'),
    (0x1E8C5, 'X'),
    (0x1E8C7, 'V'),
    (0x1E8D7, 'X'),
    (0x1E900, 'M', '𞤢'),
    (0x1E901, 'M', '𞤣'),
    (0x1E902, 'M', '𞤤'),
    (0x1E903, 'M', '𞤥'),
    (0x1E904, 'M', '𞤦'),
    (0x1E905, 'M', '𞤧'),
    (0x1E906, 'M', '𞤨'),
    (0x1E907, 'M', '𞤩'),
    (0x1E908, 'M', '𞤪'),
    (0x1E909, 'M', '𞤫'),
    ]

def _seg_72() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1E90A, 'M', '𞤬'),
    (0x1E90B, 'M', '𞤭'),
    (0x1E90C, 'M', '𞤮'),
    (0x1E90D, 'M', '𞤯'),
    (0x1E90E, 'M', '𞤰'),
    (0x1E90F, 'M', '𞤱'),
    (0x1E910, 'M', '𞤲'),
    (0x1E911, 'M', '𞤳'),
    (0x1E912, 'M', '𞤴'),
    (0x1E913, 'M', '𞤵'),
    (0x1E914, 'M', '𞤶'),
    (0x1E915, 'M', '𞤷'),
    (0x1E916, 'M', '𞤸'),
    (0x1E917, 'M', '𞤹'),
    (0x1E918, 'M', '𞤺'),
    (0x1E919, 'M', '𞤻'),
    (0x1E91A, 'M', '𞤼'),
    (0x1E91B, 'M', '𞤽'),
    (0x1E91C, 'M', '𞤾'),
    (0x1E91D, 'M', '𞤿'),
    (0x1E91E, 'M', '𞥀'),
    (0x1E91F, 'M', '𞥁'),
    (0x1E920, 'M', '𞥂'),
    (0x1E921, 'M', '𞥃'),
    (0x1E922, 'V'),
    (0x1E94C, 'X'),
    (0x1E950, 'V'),
    (0x1E95A, 'X'),
    (0x1E95E, 'V'),
    (0x1E960, 'X'),
    (0x1EC71, 'V'),
    (0x1ECB5, 'X'),
    (0x1ED01, 'V'),
    (0x1ED3E, 'X'),
    (0x1EE00, 'M', 'ا'),
    (0x1EE01, 'M', 'ب'),
    (0x1EE02, 'M', 'ج'),
    (0x1EE03, 'M', 'د'),
    (0x1EE04, 'X'),
    (0x1EE05, 'M', 'و'),
    (0x1EE06, 'M', 'ز'),
    (0x1EE07, 'M', 'ح'),
    (0x1EE08, 'M', 'ط'),
    (0x1EE09, 'M', 'ي'),
    (0x1EE0A, 'M', 'ك'),
    (0x1EE0B, 'M', 'ل'),
    (0x1EE0C, 'M', 'م'),
    (0x1EE0D, 'M', 'ن'),
    (0x1EE0E, 'M', 'س'),
    (0x1EE0F, 'M', 'ع'),
    (0x1EE10, 'M', 'ف'),
    (0x1EE11, 'M', 'ص'),
    (0x1EE12, 'M', 'ق'),
    (0x1EE13, 'M', 'ر'),
    (0x1EE14, 'M', 'ش'),
    (0x1EE15, 'M', 'ت'),
    (0x1EE16, 'M', 'ث'),
    (0x1EE17, 'M', 'خ'),
    (0x1EE18, 'M', 'ذ'),
    (0x1EE19, 'M', 'ض'),
    (0x1EE1A, 'M', 'ظ'),
    (0x1EE1B, 'M', 'غ'),
    (0x1EE1C, 'M', 'ٮ'),
    (0x1EE1D, 'M', 'ں'),
    (0x1EE1E, 'M', 'ڡ'),
    (0x1EE1F, 'M', 'ٯ'),
    (0x1EE20, 'X'),
    (0x1EE21, 'M', 'ب'),
    (0x1EE22, 'M', 'ج'),
    (0x1EE23, 'X'),
    (0x1EE24, 'M', 'ه'),
    (0x1EE25, 'X'),
    (0x1EE27, 'M', 'ح'),
    (0x1EE28, 'X'),
    (0x1EE29, 'M', 'ي'),
    (0x1EE2A, 'M', 'ك'),
    (0x1EE2B, 'M', 'ل'),
    (0x1EE2C, 'M', 'م'),
    (0x1EE2D, 'M', 'ن'),
    (0x1EE2E, 'M', 'س'),
    (0x1EE2F, 'M', 'ع'),
    (0x1EE30, 'M', 'ف'),
    (0x1EE31, 'M', 'ص'),
    (0x1EE32, 'M', 'ق'),
    (0x1EE33, 'X'),
    (0x1EE34, 'M', 'ش'),
    (0x1EE35, 'M', 'ت'),
    (0x1EE36, 'M', 'ث'),
    (0x1EE37, 'M', 'خ'),
    (0x1EE38, 'X'),
    (0x1EE39, 'M', 'ض'),
    (0x1EE3A, 'X'),
    (0x1EE3B, 'M', 'غ'),
    (0x1EE3C, 'X'),
    (0x1EE42, 'M', 'ج'),
    (0x1EE43, 'X'),
    (0x1EE47, 'M', 'ح'),
    (0x1EE48, 'X'),
    (0x1EE49, 'M', 'ي'),
    (0x1EE4A, 'X'),
    ]

def _seg_73() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1EE4B, 'M', 'ل'),
    (0x1EE4C, 'X'),
    (0x1EE4D, 'M', 'ن'),
    (0x1EE4E, 'M', 'س'),
    (0x1EE4F, 'M', 'ع'),
    (0x1EE50, 'X'),
    (0x1EE51, 'M', 'ص'),
    (0x1EE52, 'M', 'ق'),
    (0x1EE53, 'X'),
    (0x1EE54, 'M', 'ش'),
    (0x1EE55, 'X'),
    (0x1EE57, 'M', 'خ'),
    (0x1EE58, 'X'),
    (0x1EE59, 'M', 'ض'),
    (0x1EE5A, 'X'),
    (0x1EE5B, 'M', 'غ'),
    (0x1EE5C, 'X'),
    (0x1EE5D, 'M', 'ں'),
    (0x1EE5E, 'X'),
    (0x1EE5F, 'M', 'ٯ'),
    (0x1EE60, 'X'),
    (0x1EE61, 'M', 'ب'),
    (0x1EE62, 'M', 'ج'),
    (0x1EE63, 'X'),
    (0x1EE64, 'M', 'ه'),
    (0x1EE65, 'X'),
    (0x1EE67, 'M', 'ح'),
    (0x1EE68, 'M', 'ط'),
    (0x1EE69, 'M', 'ي'),
    (0x1EE6A, 'M', 'ك'),
    (0x1EE6B, 'X'),
    (0x1EE6C, 'M', 'م'),
    (0x1EE6D, 'M', 'ن'),
    (0x1EE6E, 'M', 'س'),
    (0x1EE6F, 'M', 'ع'),
    (0x1EE70, 'M', 'ف'),
    (0x1EE71, 'M', 'ص'),
    (0x1EE72, 'M', 'ق'),
    (0x1EE73, 'X'),
    (0x1EE74, 'M', 'ش'),
    (0x1EE75, 'M', 'ت'),
    (0x1EE76, 'M', 'ث'),
    (0x1EE77, 'M', 'خ'),
    (0x1EE78, 'X'),
    (0x1EE79, 'M', 'ض'),
    (0x1EE7A, 'M', 'ظ'),
    (0x1EE7B, 'M', 'غ'),
    (0x1EE7C, 'M', 'ٮ'),
    (0x1EE7D, 'X'),
    (0x1EE7E, 'M', 'ڡ'),
    (0x1EE7F, 'X'),
    (0x1EE80, 'M', 'ا'),
    (0x1EE81, 'M', 'ب'),
    (0x1EE82, 'M', 'ج'),
    (0x1EE83, 'M', 'د'),
    (0x1EE84, 'M', 'ه'),
    (0x1EE85, 'M', 'و'),
    (0x1EE86, 'M', 'ز'),
    (0x1EE87, 'M', 'ح'),
    (0x1EE88, 'M', 'ط'),
    (0x1EE89, 'M', 'ي'),
    (0x1EE8A, 'X'),
    (0x1EE8B, 'M', 'ل'),
    (0x1EE8C, 'M', 'م'),
    (0x1EE8D, 'M', 'ن'),
    (0x1EE8E, 'M', 'س'),
    (0x1EE8F, 'M', 'ع'),
    (0x1EE90, 'M', 'ف'),
    (0x1EE91, 'M', 'ص'),
    (0x1EE92, 'M', 'ق'),
    (0x1EE93, 'M', 'ر'),
    (0x1EE94, 'M', 'ش'),
    (0x1EE95, 'M', 'ت'),
    (0x1EE96, 'M', 'ث'),
    (0x1EE97, 'M', 'خ'),
    (0x1EE98, 'M', 'ذ'),
    (0x1EE99, 'M', 'ض'),
    (0x1EE9A, 'M', 'ظ'),
    (0x1EE9B, 'M', 'غ'),
    (0x1EE9C, 'X'),
    (0x1EEA1, 'M', 'ب'),
    (0x1EEA2, 'M', 'ج'),
    (0x1EEA3, 'M', 'د'),
    (0x1EEA4, 'X'),
    (0x1EEA5, 'M', 'و'),
    (0x1EEA6, 'M', 'ز'),
    (0x1EEA7, 'M', 'ح'),
    (0x1EEA8, 'M', 'ط'),
    (0x1EEA9, 'M', 'ي'),
    (0x1EEAA, 'X'),
    (0x1EEAB, 'M', 'ل'),
    (0x1EEAC, 'M', 'م'),
    (0x1EEAD, 'M', 'ن'),
    (0x1EEAE, 'M', 'س'),
    (0x1EEAF, 'M', 'ع'),
    (0x1EEB0, 'M', 'ف'),
    (0x1EEB1, 'M', 'ص'),
    (0x1EEB2, 'M', 'ق'),
    (0x1EEB3, 'M', 'ر'),
    (0x1EEB4, 'M', 'ش'),
    ]

def _seg_74() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1EEB5, 'M', 'ت'),
    (0x1EEB6, 'M', 'ث'),
    (0x1EEB7, 'M', 'خ'),
    (0x1EEB8, 'M', 'ذ'),
    (0x1EEB9, 'M', 'ض'),
    (0x1EEBA, 'M', 'ظ'),
    (0x1EEBB, 'M', 'غ'),
    (0x1EEBC, 'X'),
    (0x1EEF0, 'V'),
    (0x1EEF2, 'X'),
    (0x1F000, 'V'),
    (0x1F02C, 'X'),
    (0x1F030, 'V'),
    (0x1F094, 'X'),
    (0x1F0A0, 'V'),
    (0x1F0AF, 'X'),
    (0x1F0B1, 'V'),
    (0x1F0C0, 'X'),
    (0x1F0C1, 'V'),
    (0x1F0D0, 'X'),
    (0x1F0D1, 'V'),
    (0x1F0F6, 'X'),
    (0x1F101, '3', '0,'),
    (0x1F102, '3', '1,'),
    (0x1F103, '3', '2,'),
    (0x1F104, '3', '3,'),
    (0x1F105, '3', '4,'),
    (0x1F106, '3', '5,'),
    (0x1F107, '3', '6,'),
    (0x1F108, '3', '7,'),
    (0x1F109, '3', '8,'),
    (0x1F10A, '3', '9,'),
    (0x1F10B, 'V'),
    (0x1F110, '3', '(a)'),
    (0x1F111, '3', '(b)'),
    (0x1F112, '3', '(c)'),
    (0x1F113, '3', '(d)'),
    (0x1F114, '3', '(e)'),
    (0x1F115, '3', '(f)'),
    (0x1F116, '3', '(g)'),
    (0x1F117, '3', '(h)'),
    (0x1F118, '3', '(i)'),
    (0x1F119, '3', '(j)'),
    (0x1F11A, '3', '(k)'),
    (0x1F11B, '3', '(l)'),
    (0x1F11C, '3', '(m)'),
    (0x1F11D, '3', '(n)'),
    (0x1F11E, '3', '(o)'),
    (0x1F11F, '3', '(p)'),
    (0x1F120, '3', '(q)'),
    (0x1F121, '3', '(r)'),
    (0x1F122, '3', '(s)'),
    (0x1F123, '3', '(t)'),
    (0x1F124, '3', '(u)'),
    (0x1F125, '3', '(v)'),
    (0x1F126, '3', '(w)'),
    (0x1F127, '3', '(x)'),
    (0x1F128, '3', '(y)'),
    (0x1F129, '3', '(z)'),
    (0x1F12A, 'M', '〔s〕'),
    (0x1F12B, 'M', 'c'),
    (0x1F12C, 'M', 'r'),
    (0x1F12D, 'M', 'cd'),
    (0x1F12E, 'M', 'wz'),
    (0x1F12F, 'V'),
    (0x1F130, 'M', 'a'),
    (0x1F131, 'M', 'b'),
    (0x1F132, 'M', 'c'),
    (0x1F133, 'M', 'd'),
    (0x1F134, 'M', 'e'),
    (0x1F135, 'M', 'f'),
    (0x1F136, 'M', 'g'),
    (0x1F137, 'M', 'h'),
    (0x1F138, 'M', 'i'),
    (0x1F139, 'M', 'j'),
    (0x1F13A, 'M', 'k'),
    (0x1F13B, 'M', 'l'),
    (0x1F13C, 'M', 'm'),
    (0x1F13D, 'M', 'n'),
    (0x1F13E, 'M', 'o'),
    (0x1F13F, 'M', 'p'),
    (0x1F140, 'M', 'q'),
    (0x1F141, 'M', 'r'),
    (0x1F142, 'M', 's'),
    (0x1F143, 'M', 't'),
    (0x1F144, 'M', 'u'),
    (0x1F145, 'M', 'v'),
    (0x1F146, 'M', 'w'),
    (0x1F147, 'M', 'x'),
    (0x1F148, 'M', 'y'),
    (0x1F149, 'M', 'z'),
    (0x1F14A, 'M', 'hv'),
    (0x1F14B, 'M', 'mv'),
    (0x1F14C, 'M', 'sd'),
    (0x1F14D, 'M', 'ss'),
    (0x1F14E, 'M', 'ppv'),
    (0x1F14F, 'M', 'wc'),
    (0x1F150, 'V'),
    (0x1F16A, 'M', 'mc'),
    (0x1F16B, 'M', 'md'),
    ]

def _seg_75() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1F16C, 'M', 'mr'),
    (0x1F16D, 'V'),
    (0x1F190, 'M', 'dj'),
    (0x1F191, 'V'),
    (0x1F1AE, 'X'),
    (0x1F1E6, 'V'),
    (0x1F200, 'M', 'ほか'),
    (0x1F201, 'M', 'ココ'),
    (0x1F202, 'M', 'サ'),
    (0x1F203, 'X'),
    (0x1F210, 'M', '手'),
    (0x1F211, 'M', '字'),
    (0x1F212, 'M', '双'),
    (0x1F213, 'M', 'デ'),
    (0x1F214, 'M', '二'),
    (0x1F215, 'M', '多'),
    (0x1F216, 'M', '解'),
    (0x1F217, 'M', '天'),
    (0x1F218, 'M', '交'),
    (0x1F219, 'M', '映'),
    (0x1F21A, 'M', '無'),
    (0x1F21B, 'M', '料'),
    (0x1F21C, 'M', '前'),
    (0x1F21D, 'M', '後'),
    (0x1F21E, 'M', '再'),
    (0x1F21F, 'M', '新'),
    (0x1F220, 'M', '初'),
    (0x1F221, 'M', '終'),
    (0x1F222, 'M', '生'),
    (0x1F223, 'M', '販'),
    (0x1F224, 'M', '声'),
    (0x1F225, 'M', '吹'),
    (0x1F226, 'M', '演'),
    (0x1F227, 'M', '投'),
    (0x1F228, 'M', '捕'),
    (0x1F229, 'M', '一'),
    (0x1F22A, 'M', '三'),
    (0x1F22B, 'M', '遊'),
    (0x1F22C, 'M', '左'),
    (0x1F22D, 'M', '中'),
    (0x1F22E, 'M', '右'),
    (0x1F22F, 'M', '指'),
    (0x1F230, 'M', '走'),
    (0x1F231, 'M', '打'),
    (0x1F232, 'M', '禁'),
    (0x1F233, 'M', '空'),
    (0x1F234, 'M', '合'),
    (0x1F235, 'M', '満'),
    (0x1F236, 'M', '有'),
    (0x1F237, 'M', '月'),
    (0x1F238, 'M', '申'),
    (0x1F239, 'M', '割'),
    (0x1F23A, 'M', '営'),
    (0x1F23B, 'M', '配'),
    (0x1F23C, 'X'),
    (0x1F240, 'M', '〔本〕'),
    (0x1F241, 'M', '〔三〕'),
    (0x1F242, 'M', '〔二〕'),
    (0x1F243, 'M', '〔安〕'),
    (0x1F244, 'M', '〔点〕'),
    (0x1F245, 'M', '〔打〕'),
    (0x1F246, 'M', '〔盗〕'),
    (0x1F247, 'M', '〔勝〕'),
    (0x1F248, 'M', '〔敗〕'),
    (0x1F249, 'X'),
    (0x1F250, 'M', '得'),
    (0x1F251, 'M', '可'),
    (0x1F252, 'X'),
    (0x1F260, 'V'),
    (0x1F266, 'X'),
    (0x1F300, 'V'),
    (0x1F6D8, 'X'),
    (0x1F6DC, 'V'),
    (0x1F6ED, 'X'),
    (0x1F6F0, 'V'),
    (0x1F6FD, 'X'),
    (0x1F700, 'V'),
    (0x1F777, 'X'),
    (0x1F77B, 'V'),
    (0x1F7DA, 'X'),
    (0x1F7E0, 'V'),
    (0x1F7EC, 'X'),
    (0x1F7F0, 'V'),
    (0x1F7F1, 'X'),
    (0x1F800, 'V'),
    (0x1F80C, 'X'),
    (0x1F810, 'V'),
    (0x1F848, 'X'),
    (0x1F850, 'V'),
    (0x1F85A, 'X'),
    (0x1F860, 'V'),
    (0x1F888, 'X'),
    (0x1F890, 'V'),
    (0x1F8AE, 'X'),
    (0x1F8B0, 'V'),
    (0x1F8B2, 'X'),
    (0x1F900, 'V'),
    (0x1FA54, 'X'),
    (0x1FA60, 'V'),
    (0x1FA6E, 'X'),
    ]

def _seg_76() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x1FA70, 'V'),
    (0x1FA7D, 'X'),
    (0x1FA80, 'V'),
    (0x1FA89, 'X'),
    (0x1FA90, 'V'),
    (0x1FABE, 'X'),
    (0x1FABF, 'V'),
    (0x1FAC6, 'X'),
    (0x1FACE, 'V'),
    (0x1FADC, 'X'),
    (0x1FAE0, 'V'),
    (0x1FAE9, 'X'),
    (0x1FAF0, 'V'),
    (0x1FAF9, 'X'),
    (0x1FB00, 'V'),
    (0x1FB93, 'X'),
    (0x1FB94, 'V'),
    (0x1FBCB, 'X'),
    (0x1FBF0, 'M', '0'),
    (0x1FBF1, 'M', '1'),
    (0x1FBF2, 'M', '2'),
    (0x1FBF3, 'M', '3'),
    (0x1FBF4, 'M', '4'),
    (0x1FBF5, 'M', '5'),
    (0x1FBF6, 'M', '6'),
    (0x1FBF7, 'M', '7'),
    (0x1FBF8, 'M', '8'),
    (0x1FBF9, 'M', '9'),
    (0x1FBFA, 'X'),
    (0x20000, 'V'),
    (0x2A6E0, 'X'),
    (0x2A700, 'V'),
    (0x2B73A, 'X'),
    (0x2B740, 'V'),
    (0x2B81E, 'X'),
    (0x2B820, 'V'),
    (0x2CEA2, 'X'),
    (0x2CEB0, 'V'),
    (0x2EBE1, 'X'),
    (0x2F800, 'M', '丽'),
    (0x2F801, 'M', '丸'),
    (0x2F802, 'M', '乁'),
    (0x2F803, 'M', '𠄢'),
    (0x2F804, 'M', '你'),
    (0x2F805, 'M', '侮'),
    (0x2F806, 'M', '侻'),
    (0x2F807, 'M', '倂'),
    (0x2F808, 'M', '偺'),
    (0x2F809, 'M', '備'),
    (0x2F80A, 'M', '僧'),
    (0x2F80B, 'M', '像'),
    (0x2F80C, 'M', '㒞'),
    (0x2F80D, 'M', '𠘺'),
    (0x2F80E, 'M', '免'),
    (0x2F80F, 'M', '兔'),
    (0x2F810, 'M', '兤'),
    (0x2F811, 'M', '具'),
    (0x2F812, 'M', '𠔜'),
    (0x2F813, 'M', '㒹'),
    (0x2F814, 'M', '內'),
    (0x2F815, 'M', '再'),
    (0x2F816, 'M', '𠕋'),
    (0x2F817, 'M', '冗'),
    (0x2F818, 'M', '冤'),
    (0x2F819, 'M', '仌'),
    (0x2F81A, 'M', '冬'),
    (0x2F81B, 'M', '况'),
    (0x2F81C, 'M', '𩇟'),
    (0x2F81D, 'M', '凵'),
    (0x2F81E, 'M', '刃'),
    (0x2F81F, 'M', '㓟'),
    (0x2F820, 'M', '刻'),
    (0x2F821, 'M', '剆'),
    (0x2F822, 'M', '割'),
    (0x2F823, 'M', '剷'),
    (0x2F824, 'M', '㔕'),
    (0x2F825, 'M', '勇'),
    (0x2F826, 'M', '勉'),
    (0x2F827, 'M', '勤'),
    (0x2F828, 'M', '勺'),
    (0x2F829, 'M', '包'),
    (0x2F82A, 'M', '匆'),
    (0x2F82B, 'M', '北'),
    (0x2F82C, 'M', '卉'),
    (0x2F82D, 'M', '卑'),
    (0x2F82E, 'M', '博'),
    (0x2F82F, 'M', '即'),
    (0x2F830, 'M', '卽'),
    (0x2F831, 'M', '卿'),
    (0x2F834, 'M', '𠨬'),
    (0x2F835, 'M', '灰'),
    (0x2F836, 'M', '及'),
    (0x2F837, 'M', '叟'),
    (0x2F838, 'M', '𠭣'),
    (0x2F839, 'M', '叫'),
    (0x2F83A, 'M', '叱'),
    (0x2F83B, 'M', '吆'),
    (0x2F83C, 'M', '咞'),
    (0x2F83D, 'M', '吸'),
    (0x2F83E, 'M', '呈'),
    ]

def _seg_77() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2F83F, 'M', '周'),
    (0x2F840, 'M', '咢'),
    (0x2F841, 'M', '哶'),
    (0x2F842, 'M', '唐'),
    (0x2F843, 'M', '啓'),
    (0x2F844, 'M', '啣'),
    (0x2F845, 'M', '善'),
    (0x2F847, 'M', '喙'),
    (0x2F848, 'M', '喫'),
    (0x2F849, 'M', '喳'),
    (0x2F84A, 'M', '嗂'),
    (0x2F84B, 'M', '圖'),
    (0x2F84C, 'M', '嘆'),
    (0x2F84D, 'M', '圗'),
    (0x2F84E, 'M', '噑'),
    (0x2F84F, 'M', '噴'),
    (0x2F850, 'M', '切'),
    (0x2F851, 'M', '壮'),
    (0x2F852, 'M', '城'),
    (0x2F853, 'M', '埴'),
    (0x2F854, 'M', '堍'),
    (0x2F855, 'M', '型'),
    (0x2F856, 'M', '堲'),
    (0x2F857, 'M', '報'),
    (0x2F858, 'M', '墬'),
    (0x2F859, 'M', '𡓤'),
    (0x2F85A, 'M', '売'),
    (0x2F85B, 'M', '壷'),
    (0x2F85C, 'M', '夆'),
    (0x2F85D, 'M', '多'),
    (0x2F85E, 'M', '夢'),
    (0x2F85F, 'M', '奢'),
    (0x2F860, 'M', '𡚨'),
    (0x2F861, 'M', '𡛪'),
    (0x2F862, 'M', '姬'),
    (0x2F863, 'M', '娛'),
    (0x2F864, 'M', '娧'),
    (0x2F865, 'M', '姘'),
    (0x2F866, 'M', '婦'),
    (0x2F867, 'M', '㛮'),
    (0x2F868, 'X'),
    (0x2F869, 'M', '嬈'),
    (0x2F86A, 'M', '嬾'),
    (0x2F86C, 'M', '𡧈'),
    (0x2F86D, 'M', '寃'),
    (0x2F86E, 'M', '寘'),
    (0x2F86F, 'M', '寧'),
    (0x2F870, 'M', '寳'),
    (0x2F871, 'M', '𡬘'),
    (0x2F872, 'M', '寿'),
    (0x2F873, 'M', '将'),
    (0x2F874, 'X'),
    (0x2F875, 'M', '尢'),
    (0x2F876, 'M', '㞁'),
    (0x2F877, 'M', '屠'),
    (0x2F878, 'M', '屮'),
    (0x2F879, 'M', '峀'),
    (0x2F87A, 'M', '岍'),
    (0x2F87B, 'M', '𡷤'),
    (0x2F87C, 'M', '嵃'),
    (0x2F87D, 'M', '𡷦'),
    (0x2F87E, 'M', '嵮'),
    (0x2F87F, 'M', '嵫'),
    (0x2F880, 'M', '嵼'),
    (0x2F881, 'M', '巡'),
    (0x2F882, 'M', '巢'),
    (0x2F883, 'M', '㠯'),
    (0x2F884, 'M', '巽'),
    (0x2F885, 'M', '帨'),
    (0x2F886, 'M', '帽'),
    (0x2F887, 'M', '幩'),
    (0x2F888, 'M', '㡢'),
    (0x2F889, 'M', '𢆃'),
    (0x2F88A, 'M', '㡼'),
    (0x2F88B, 'M', '庰'),
    (0x2F88C, 'M', '庳'),
    (0x2F88D, 'M', '庶'),
    (0x2F88E, 'M', '廊'),
    (0x2F88F, 'M', '𪎒'),
    (0x2F890, 'M', '廾'),
    (0x2F891, 'M', '𢌱'),
    (0x2F893, 'M', '舁'),
    (0x2F894, 'M', '弢'),
    (0x2F896, 'M', '㣇'),
    (0x2F897, 'M', '𣊸'),
    (0x2F898, 'M', '𦇚'),
    (0x2F899, 'M', '形'),
    (0x2F89A, 'M', '彫'),
    (0x2F89B, 'M', '㣣'),
    (0x2F89C, 'M', '徚'),
    (0x2F89D, 'M', '忍'),
    (0x2F89E, 'M', '志'),
    (0x2F89F, 'M', '忹'),
    (0x2F8A0, 'M', '悁'),
    (0x2F8A1, 'M', '㤺'),
    (0x2F8A2, 'M', '㤜'),
    (0x2F8A3, 'M', '悔'),
    (0x2F8A4, 'M', '𢛔'),
    (0x2F8A5, 'M', '惇'),
    (0x2F8A6, 'M', '慈'),
    ]

def _seg_78() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2F8A7, 'M', '慌'),
    (0x2F8A8, 'M', '慎'),
    (0x2F8A9, 'M', '慌'),
    (0x2F8AA, 'M', '慺'),
    (0x2F8AB, 'M', '憎'),
    (0x2F8AC, 'M', '憲'),
    (0x2F8AD, 'M', '憤'),
    (0x2F8AE, 'M', '憯'),
    (0x2F8AF, 'M', '懞'),
    (0x2F8B0, 'M', '懲'),
    (0x2F8B1, 'M', '懶'),
    (0x2F8B2, 'M', '成'),
    (0x2F8B3, 'M', '戛'),
    (0x2F8B4, 'M', '扝'),
    (0x2F8B5, 'M', '抱'),
    (0x2F8B6, 'M', '拔'),
    (0x2F8B7, 'M', '捐'),
    (0x2F8B8, 'M', '𢬌'),
    (0x2F8B9, 'M', '挽'),
    (0x2F8BA, 'M', '拼'),
    (0x2F8BB, 'M', '捨'),
    (0x2F8BC, 'M', '掃'),
    (0x2F8BD, 'M', '揤'),
    (0x2F8BE, 'M', '𢯱'),
    (0x2F8BF, 'M', '搢'),
    (0x2F8C0, 'M', '揅'),
    (0x2F8C1, 'M', '掩'),
    (0x2F8C2, 'M', '㨮'),
    (0x2F8C3, 'M', '摩'),
    (0x2F8C4, 'M', '摾'),
    (0x2F8C5, 'M', '撝'),
    (0x2F8C6, 'M', '摷'),
    (0x2F8C7, 'M', '㩬'),
    (0x2F8C8, 'M', '敏'),
    (0x2F8C9, 'M', '敬'),
    (0x2F8CA, 'M', '𣀊'),
    (0x2F8CB, 'M', '旣'),
    (0x2F8CC, 'M', '書'),
    (0x2F8CD, 'M', '晉'),
    (0x2F8CE, 'M', '㬙'),
    (0x2F8CF, 'M', '暑'),
    (0x2F8D0, 'M', '㬈'),
    (0x2F8D1, 'M', '㫤'),
    (0x2F8D2, 'M', '冒'),
    (0x2F8D3, 'M', '冕'),
    (0x2F8D4, 'M', '最'),
    (0x2F8D5, 'M', '暜'),
    (0x2F8D6, 'M', '肭'),
    (0x2F8D7, 'M', '䏙'),
    (0x2F8D8, 'M', '朗'),
    (0x2F8D9, 'M', '望'),
    (0x2F8DA, 'M', '朡'),
    (0x2F8DB, 'M', '杞'),
    (0x2F8DC, 'M', '杓'),
    (0x2F8DD, 'M', '𣏃'),
    (0x2F8DE, 'M', '㭉'),
    (0x2F8DF, 'M', '柺'),
    (0x2F8E0, 'M', '枅'),
    (0x2F8E1, 'M', '桒'),
    (0x2F8E2, 'M', '梅'),
    (0x2F8E3, 'M', '𣑭'),
    (0x2F8E4, 'M', '梎'),
    (0x2F8E5, 'M', '栟'),
    (0x2F8E6, 'M', '椔'),
    (0x2F8E7, 'M', '㮝'),
    (0x2F8E8, 'M', '楂'),
    (0x2F8E9, 'M', '榣'),
    (0x2F8EA, 'M', '槪'),
    (0x2F8EB, 'M', '檨'),
    (0x2F8EC, 'M', '𣚣'),
    (0x2F8ED, 'M', '櫛'),
    (0x2F8EE, 'M', '㰘'),
    (0x2F8EF, 'M', '次'),
    (0x2F8F0, 'M', '𣢧'),
    (0x2F8F1, 'M', '歔'),
    (0x2F8F2, 'M', '㱎'),
    (0x2F8F3, 'M', '歲'),
    (0x2F8F4, 'M', '殟'),
    (0x2F8F5, 'M', '殺'),
    (0x2F8F6, 'M', '殻'),
    (0x2F8F7, 'M', '𣪍'),
    (0x2F8F8, 'M', '𡴋'),
    (0x2F8F9, 'M', '𣫺'),
    (0x2F8FA, 'M', '汎'),
    (0x2F8FB, 'M', '𣲼'),
    (0x2F8FC, 'M', '沿'),
    (0x2F8FD, 'M', '泍'),
    (0x2F8FE, 'M', '汧'),
    (0x2F8FF, 'M', '洖'),
    (0x2F900, 'M', '派'),
    (0x2F901, 'M', '海'),
    (0x2F902, 'M', '流'),
    (0x2F903, 'M', '浩'),
    (0x2F904, 'M', '浸'),
    (0x2F905, 'M', '涅'),
    (0x2F906, 'M', '𣴞'),
    (0x2F907, 'M', '洴'),
    (0x2F908, 'M', '港'),
    (0x2F909, 'M', '湮'),
    (0x2F90A, 'M', '㴳'),
    ]

def _seg_79() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2F90B, 'M', '滋'),
    (0x2F90C, 'M', '滇'),
    (0x2F90D, 'M', '𣻑'),
    (0x2F90E, 'M', '淹'),
    (0x2F90F, 'M', '潮'),
    (0x2F910, 'M', '𣽞'),
    (0x2F911, 'M', '𣾎'),
    (0x2F912, 'M', '濆'),
    (0x2F913, 'M', '瀹'),
    (0x2F914, 'M', '瀞'),
    (0x2F915, 'M', '瀛'),
    (0x2F916, 'M', '㶖'),
    (0x2F917, 'M', '灊'),
    (0x2F918, 'M', '災'),
    (0x2F919, 'M', '灷'),
    (0x2F91A, 'M', '炭'),
    (0x2F91B, 'M', '𠔥'),
    (0x2F91C, 'M', '煅'),
    (0x2F91D, 'M', '𤉣'),
    (0x2F91E, 'M', '熜'),
    (0x2F91F, 'X'),
    (0x2F920, 'M', '爨'),
    (0x2F921, 'M', '爵'),
    (0x2F922, 'M', '牐'),
    (0x2F923, 'M', '𤘈'),
    (0x2F924, 'M', '犀'),
    (0x2F925, 'M', '犕'),
    (0x2F926, 'M', '𤜵'),
    (0x2F927, 'M', '𤠔'),
    (0x2F928, 'M', '獺'),
    (0x2F929, 'M', '王'),
    (0x2F92A, 'M', '㺬'),
    (0x2F92B, 'M', '玥'),
    (0x2F92C, 'M', '㺸'),
    (0x2F92E, 'M', '瑇'),
    (0x2F92F, 'M', '瑜'),
    (0x2F930, 'M', '瑱'),
    (0x2F931, 'M', '璅'),
    (0x2F932, 'M', '瓊'),
    (0x2F933, 'M', '㼛'),
    (0x2F934, 'M', '甤'),
    (0x2F935, 'M', '𤰶'),
    (0x2F936, 'M', '甾'),
    (0x2F937, 'M', '𤲒'),
    (0x2F938, 'M', '異'),
    (0x2F939, 'M', '𢆟'),
    (0x2F93A, 'M', '瘐'),
    (0x2F93B, 'M', '𤾡'),
    (0x2F93C, 'M', '𤾸'),
    (0x2F93D, 'M', '𥁄'),
    (0x2F93E, 'M', '㿼'),
    (0x2F93F, 'M', '䀈'),
    (0x2F940, 'M', '直'),
    (0x2F941, 'M', '𥃳'),
    (0x2F942, 'M', '𥃲'),
    (0x2F943, 'M', '𥄙'),
    (0x2F944, 'M', '𥄳'),
    (0x2F945, 'M', '眞'),
    (0x2F946, 'M', '真'),
    (0x2F948, 'M', '睊'),
    (0x2F949, 'M', '䀹'),
    (0x2F94A, 'M', '瞋'),
    (0x2F94B, 'M', '䁆'),
    (0x2F94C, 'M', '䂖'),
    (0x2F94D, 'M', '𥐝'),
    (0x2F94E, 'M', '硎'),
    (0x2F94F, 'M', '碌'),
    (0x2F950, 'M', '磌'),
    (0x2F951, 'M', '䃣'),
    (0x2F952, 'M', '𥘦'),
    (0x2F953, 'M', '祖'),
    (0x2F954, 'M', '𥚚'),
    (0x2F955, 'M', '𥛅'),
    (0x2F956, 'M', '福'),
    (0x2F957, 'M', '秫'),
    (0x2F958, 'M', '䄯'),
    (0x2F959, 'M', '穀'),
    (0x2F95A, 'M', '穊'),
    (0x2F95B, 'M', '穏'),
    (0x2F95C, 'M', '𥥼'),
    (0x2F95D, 'M', '𥪧'),
    (0x2F95F, 'X'),
    (0x2F960, 'M', '䈂'),
    (0x2F961, 'M', '𥮫'),
    (0x2F962, 'M', '篆'),
    (0x2F963, 'M', '築'),
    (0x2F964, 'M', '䈧'),
    (0x2F965, 'M', '𥲀'),
    (0x2F966, 'M', '糒'),
    (0x2F967, 'M', '䊠'),
    (0x2F968, 'M', '糨'),
    (0x2F969, 'M', '糣'),
    (0x2F96A, 'M', '紀'),
    (0x2F96B, 'M', '𥾆'),
    (0x2F96C, 'M', '絣'),
    (0x2F96D, 'M', '䌁'),
    (0x2F96E, 'M', '緇'),
    (0x2F96F, 'M', '縂'),
    (0x2F970, 'M', '繅'),
    (0x2F971, 'M', '䌴'),
    ]

def _seg_80() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2F972, 'M', '𦈨'),
    (0x2F973, 'M', '𦉇'),
    (0x2F974, 'M', '䍙'),
    (0x2F975, 'M', '𦋙'),
    (0x2F976, 'M', '罺'),
    (0x2F977, 'M', '𦌾'),
    (0x2F978, 'M', '羕'),
    (0x2F979, 'M', '翺'),
    (0x2F97A, 'M', '者'),
    (0x2F97B, 'M', '𦓚'),
    (0x2F97C, 'M', '𦔣'),
    (0x2F97D, 'M', '聠'),
    (0x2F97E, 'M', '𦖨'),
    (0x2F97F, 'M', '聰'),
    (0x2F980, 'M', '𣍟'),
    (0x2F981, 'M', '䏕'),
    (0x2F982, 'M', '育'),
    (0x2F983, 'M', '脃'),
    (0x2F984, 'M', '䐋'),
    (0x2F985, 'M', '脾'),
    (0x2F986, 'M', '媵'),
    (0x2F987, 'M', '𦞧'),
    (0x2F988, 'M', '𦞵'),
    (0x2F989, 'M', '𣎓'),
    (0x2F98A, 'M', '𣎜'),
    (0x2F98B, 'M', '舁'),
    (0x2F98C, 'M', '舄'),
    (0x2F98D, 'M', '辞'),
    (0x2F98E, 'M', '䑫'),
    (0x2F98F, 'M', '芑'),
    (0x2F990, 'M', '芋'),
    (0x2F991, 'M', '芝'),
    (0x2F992, 'M', '劳'),
    (0x2F993, 'M', '花'),
    (0x2F994, 'M', '芳'),
    (0x2F995, 'M', '芽'),
    (0x2F996, 'M', '苦'),
    (0x2F997, 'M', '𦬼'),
    (0x2F998, 'M', '若'),
    (0x2F999, 'M', '茝'),
    (0x2F99A, 'M', '荣'),
    (0x2F99B, 'M', '莭'),
    (0x2F99C, 'M', '茣'),
    (0x2F99D, 'M', '莽'),
    (0x2F99E, 'M', '菧'),
    (0x2F99F, 'M', '著'),
    (0x2F9A0, 'M', '荓'),
    (0x2F9A1, 'M', '菊'),
    (0x2F9A2, 'M', '菌'),
    (0x2F9A3, 'M', '菜'),
    (0x2F9A4, 'M', '𦰶'),
    (0x2F9A5, 'M', '𦵫'),
    (0x2F9A6, 'M', '𦳕'),
    (0x2F9A7, 'M', '䔫'),
    (0x2F9A8, 'M', '蓱'),
    (0x2F9A9, 'M', '蓳'),
    (0x2F9AA, 'M', '蔖'),
    (0x2F9AB, 'M', '𧏊'),
    (0x2F9AC, 'M', '蕤'),
    (0x2F9AD, 'M', '𦼬'),
    (0x2F9AE, 'M', '䕝'),
    (0x2F9AF, 'M', '䕡'),
    (0x2F9B0, 'M', '𦾱'),
    (0x2F9B1, 'M', '𧃒'),
    (0x2F9B2, 'M', '䕫'),
    (0x2F9B3, 'M', '虐'),
    (0x2F9B4, 'M', '虜'),
    (0x2F9B5, 'M', '虧'),
    (0x2F9B6, 'M', '虩'),
    (0x2F9B7, 'M', '蚩'),
    (0x2F9B8, 'M', '蚈'),
    (0x2F9B9, 'M', '蜎'),
    (0x2F9BA, 'M', '蛢'),
    (0x2F9BB, 'M', '蝹'),
    (0x2F9BC, 'M', '蜨'),
    (0x2F9BD, 'M', '蝫'),
    (0x2F9BE, 'M', '螆'),
    (0x2F9BF, 'X'),
    (0x2F9C0, 'M', '蟡'),
    (0x2F9C1, 'M', '蠁'),
    (0x2F9C2, 'M', '䗹'),
    (0x2F9C3, 'M', '衠'),
    (0x2F9C4, 'M', '衣'),
    (0x2F9C5, 'M', '𧙧'),
    (0x2F9C6, 'M', '裗'),
    (0x2F9C7, 'M', '裞'),
    (0x2F9C8, 'M', '䘵'),
    (0x2F9C9, 'M', '裺'),
    (0x2F9CA, 'M', '㒻'),
    (0x2F9CB, 'M', '𧢮'),
    (0x2F9CC, 'M', '𧥦'),
    (0x2F9CD, 'M', '䚾'),
    (0x2F9CE, 'M', '䛇'),
    (0x2F9CF, 'M', '誠'),
    (0x2F9D0, 'M', '諭'),
    (0x2F9D1, 'M', '變'),
    (0x2F9D2, 'M', '豕'),
    (0x2F9D3, 'M', '𧲨'),
    (0x2F9D4, 'M', '貫'),
    (0x2F9D5, 'M', '賁'),
    ]

def _seg_81() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]:
    return [
    (0x2F9D6, 'M', '贛'),
    (0x2F9D7, 'M', '起'),
    (0x2F9D8, 'M', '𧼯'),
    (0x2F9D9, 'M', '𠠄'),
    (0x2F9DA, 'M', '跋'),
    (0x2F9DB, 'M', '趼'),
    (0x2F9DC, 'M', '跰'),
    (0x2F9DD, 'M', '𠣞'),
    (0x2F9DE, 'M', '軔'),
    (0x2F9DF, 'M', '輸'),
    (0x2F9E0, 'M', '𨗒'),
    (0x2F9E1, 'M', '𨗭'),
    (0x2F9E2, 'M', '邔'),
    (0x2F9E3, 'M', '郱'),
    (0x2F9E4, 'M', '鄑'),
    (0x2F9E5, 'M', '𨜮'),
    (0x2F9E6, 'M', '鄛'),
    (0x2F9E7, 'M', '鈸'),
    (0x2F9E8, 'M', '鋗'),
    (0x2F9E9, 'M', '鋘'),
    (0x2F9EA, 'M', '鉼'),
    (0x2F9EB, 'M', '鏹'),
    (0x2F9EC, 'M', '鐕'),
    (0x2F9ED, 'M', '𨯺'),
    (0x2F9EE, 'M', '開'),
    (0x2F9EF, 'M', '䦕'),
    (0x2F9F0, 'M', '閷'),
    (0x2F9F1, 'M', '𨵷'),
    (0x2F9F2, 'M', '䧦'),
    (0x2F9F3, 'M', '雃'),
    (0x2F9F4, 'M', '嶲'),
    (0x2F9F5, 'M', '霣'),
    (0x2F9F6, 'M', '𩅅'),
    (0x2F9F7, 'M', '𩈚'),
    (0x2F9F8, 'M', '䩮'),
    (0x2F9F9, 'M', '䩶'),
    (0x2F9FA, 'M', '韠'),
    (0x2F9FB, 'M', '𩐊'),
    (0x2F9FC, 'M', '䪲'),
    (0x2F9FD, 'M', '𩒖'),
    (0x2F9FE, 'M', '頋'),
    (0x2FA00, 'M', '頩'),
    (0x2FA01, 'M', '𩖶'),
    (0x2FA02, 'M', '飢'),
    (0x2FA03, 'M', '䬳'),
    (0x2FA04, 'M', '餩'),
    (0x2FA05, 'M', '馧'),
    (0x2FA06, 'M', '駂'),
    (0x2FA07, 'M', '駾'),
    (0x2FA08, 'M', '䯎'),
    (0x2FA09, 'M', '𩬰'),
    (0x2FA0A, 'M', '鬒'),
    (0x2FA0B, 'M', '鱀'),
    (0x2FA0C, 'M', '鳽'),
    (0x2FA0D, 'M', '䳎'),
    (0x2FA0E, 'M', '䳭'),
    (0x2FA0F, 'M', '鵧'),
    (0x2FA10, 'M', '𪃎'),
    (0x2FA11, 'M', '䳸'),
    (0x2FA12, 'M', '𪄅'),
    (0x2FA13, 'M', '𪈎'),
    (0x2FA14, 'M', '𪊑'),
    (0x2FA15, 'M', '麻'),
    (0x2FA16, 'M', '䵖'),
    (0x2FA17, 'M', '黹'),
    (0x2FA18, 'M', '黾'),
    (0x2FA19, 'M', '鼅'),
    (0x2FA1A, 'M', '鼏'),
    (0x2FA1B, 'M', '鼖'),
    (0x2FA1C, 'M', '鼻'),
    (0x2FA1D, 'M', '𪘀'),
    (0x2FA1E, 'X'),
    (0x30000, 'V'),
    (0x3134B, 'X'),
    (0x31350, 'V'),
    (0x323B0, 'X'),
    (0xE0100, 'I'),
    (0xE01F0, 'X'),
    ]

uts46data = tuple(
    _seg_0()
    + _seg_1()
    + _seg_2()
    + _seg_3()
    + _seg_4()
    + _seg_5()
    + _seg_6()
    + _seg_7()
    + _seg_8()
    + _seg_9()
    + _seg_10()
    + _seg_11()
    + _seg_12()
    + _seg_13()
    + _seg_14()
    + _seg_15()
    + _seg_16()
    + _seg_17()
    + _seg_18()
    + _seg_19()
    + _seg_20()
    + _seg_21()
    + _seg_22()
    + _seg_23()
    + _seg_24()
    + _seg_25()
    + _seg_26()
    + _seg_27()
    + _seg_28()
    + _seg_29()
    + _seg_30()
    + _seg_31()
    + _seg_32()
    + _seg_33()
    + _seg_34()
    + _seg_35()
    + _seg_36()
    + _seg_37()
    + _seg_38()
    + _seg_39()
    + _seg_40()
    + _seg_41()
    + _seg_42()
    + _seg_43()
    + _seg_44()
    + _seg_45()
    + _seg_46()
    + _seg_47()
    + _seg_48()
    + _seg_49()
    + _seg_50()
    + _seg_51()
    + _seg_52()
    + _seg_53()
    + _seg_54()
    + _seg_55()
    + _seg_56()
    + _seg_57()
    + _seg_58()
    + _seg_59()
    + _seg_60()
    + _seg_61()
    + _seg_62()
    + _seg_63()
    + _seg_64()
    + _seg_65()
    + _seg_66()
    + _seg_67()
    + _seg_68()
    + _seg_69()
    + _seg_70()
    + _seg_71()
    + _seg_72()
    + _seg_73()
    + _seg_74()
    + _seg_75()
    + _seg_76()
    + _seg_77()
    + _seg_78()
    + _seg_79()
    + _seg_80()
    + _seg_81()
)  # type: Tuple[Union[Tuple[int, str], Tuple[int, str, str]], ...]
python3.12/site-packages/pip/_vendor/idna/intranges.py000064400000003531151732702360016624 0ustar00"""
Given a list of integers, made up of (hopefully) a small number of long runs
of consecutive integers, compute a representation of the form
((start1, end1), (start2, end2) ...). Then answer the question "was x present
in the original list?" in time O(log(# runs)).
"""

import bisect
from typing import List, Tuple

def intranges_from_list(list_: List[int]) -> Tuple[int, ...]:
    """Represent a list of integers as a sequence of ranges:
    ((start_0, end_0), (start_1, end_1), ...), such that the original
    integers are exactly those x such that start_i <= x < end_i for some i.

    Ranges are encoded as single integers (start << 32 | end), not as tuples.
    """

    sorted_list = sorted(list_)
    ranges = []
    last_write = -1
    for i in range(len(sorted_list)):
        if i+1 < len(sorted_list):
            if sorted_list[i] == sorted_list[i+1]-1:
                continue
        current_range = sorted_list[last_write+1:i+1]
        ranges.append(_encode_range(current_range[0], current_range[-1] + 1))
        last_write = i

    return tuple(ranges)

def _encode_range(start: int, end: int) -> int:
    return (start << 32) | end

def _decode_range(r: int) -> Tuple[int, int]:
    return (r >> 32), (r & ((1 << 32) - 1))


def intranges_contain(int_: int, ranges: Tuple[int, ...]) -> bool:
    """Determine if `int_` falls into one of the ranges in `ranges`."""
    tuple_ = _encode_range(int_, 0)
    pos = bisect.bisect_left(ranges, tuple_)
    # we could be immediately ahead of a tuple (start, end)
    # with start < int_ <= end
    if pos > 0:
        left, right = _decode_range(ranges[pos-1])
        if left <= int_ < right:
            return True
    # or we could be immediately behind a tuple (int_, end)
    if pos < len(ranges):
        left, _ = _decode_range(ranges[pos])
        if left == int_:
            return True
    return False
python3.12/site-packages/pip/_vendor/pyparsing/unicode.py000064400000024626151732702360017371 0ustar00# unicode.py

import sys
from itertools import filterfalse
from typing import List, Tuple, Union


class _lazyclassproperty:
    def __init__(self, fn):
        self.fn = fn
        self.__doc__ = fn.__doc__
        self.__name__ = fn.__name__

    def __get__(self, obj, cls):
        if cls is None:
            cls = type(obj)
        if not hasattr(cls, "_intern") or any(
            cls._intern is getattr(superclass, "_intern", [])
            for superclass in cls.__mro__[1:]
        ):
            cls._intern = {}
        attrname = self.fn.__name__
        if attrname not in cls._intern:
            cls._intern[attrname] = self.fn(cls)
        return cls._intern[attrname]


UnicodeRangeList = List[Union[Tuple[int, int], Tuple[int]]]


class unicode_set:
    """
    A set of Unicode characters, for language-specific strings for
    ``alphas``, ``nums``, ``alphanums``, and ``printables``.
    A unicode_set is defined by a list of ranges in the Unicode character
    set, in a class attribute ``_ranges``. Ranges can be specified using
    2-tuples or a 1-tuple, such as::

        _ranges = [
            (0x0020, 0x007e),
            (0x00a0, 0x00ff),
            (0x0100,),
            ]

    Ranges are left- and right-inclusive. A 1-tuple of (x,) is treated as (x, x).

    A unicode set can also be defined using multiple inheritance of other unicode sets::

        class CJK(Chinese, Japanese, Korean):
            pass
    """

    _ranges: UnicodeRangeList = []

    @_lazyclassproperty
    def _chars_for_ranges(cls):
        ret = []
        for cc in cls.__mro__:
            if cc is unicode_set:
                break
            for rr in getattr(cc, "_ranges", ()):
                ret.extend(range(rr[0], rr[-1] + 1))
        return [chr(c) for c in sorted(set(ret))]

    @_lazyclassproperty
    def printables(cls):
        """all non-whitespace characters in this range"""
        return "".join(filterfalse(str.isspace, cls._chars_for_ranges))

    @_lazyclassproperty
    def alphas(cls):
        """all alphabetic characters in this range"""
        return "".join(filter(str.isalpha, cls._chars_for_ranges))

    @_lazyclassproperty
    def nums(cls):
        """all numeric digit characters in this range"""
        return "".join(filter(str.isdigit, cls._chars_for_ranges))

    @_lazyclassproperty
    def alphanums(cls):
        """all alphanumeric characters in this range"""
        return cls.alphas + cls.nums

    @_lazyclassproperty
    def identchars(cls):
        """all characters in this range that are valid identifier characters, plus underscore '_'"""
        return "".join(
            sorted(
                set(
                    "".join(filter(str.isidentifier, cls._chars_for_ranges))
                    + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµº"
                    + "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ"
                    + "_"
                )
            )
        )

    @_lazyclassproperty
    def identbodychars(cls):
        """
        all characters in this range that are valid identifier body characters,
        plus the digits 0-9, and · (Unicode MIDDLE DOT)
        """
        return "".join(
            sorted(
                set(
                    cls.identchars
                    + "0123456789·"
                    + "".join(
                        [c for c in cls._chars_for_ranges if ("_" + c).isidentifier()]
                    )
                )
            )
        )

    @_lazyclassproperty
    def identifier(cls):
        """
        a pyparsing Word expression for an identifier using this range's definitions for
        identchars and identbodychars
        """
        from pip._vendor.pyparsing import Word

        return Word(cls.identchars, cls.identbodychars)


class pyparsing_unicode(unicode_set):
    """
    A namespace class for defining common language unicode_sets.
    """

    # fmt: off

    # define ranges in language character sets
    _ranges: UnicodeRangeList = [
        (0x0020, sys.maxunicode),
    ]

    class BasicMultilingualPlane(unicode_set):
        """Unicode set for the Basic Multilingual Plane"""
        _ranges: UnicodeRangeList = [
            (0x0020, 0xFFFF),
        ]

    class Latin1(unicode_set):
        """Unicode set for Latin-1 Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x0020, 0x007E),
            (0x00A0, 0x00FF),
        ]

    class LatinA(unicode_set):
        """Unicode set for Latin-A Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x0100, 0x017F),
        ]

    class LatinB(unicode_set):
        """Unicode set for Latin-B Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x0180, 0x024F),
        ]

    class Greek(unicode_set):
        """Unicode set for Greek Unicode Character Ranges"""
        _ranges: UnicodeRangeList = [
            (0x0342, 0x0345),
            (0x0370, 0x0377),
            (0x037A, 0x037F),
            (0x0384, 0x038A),
            (0x038C,),
            (0x038E, 0x03A1),
            (0x03A3, 0x03E1),
            (0x03F0, 0x03FF),
            (0x1D26, 0x1D2A),
            (0x1D5E,),
            (0x1D60,),
            (0x1D66, 0x1D6A),
            (0x1F00, 0x1F15),
            (0x1F18, 0x1F1D),
            (0x1F20, 0x1F45),
            (0x1F48, 0x1F4D),
            (0x1F50, 0x1F57),
            (0x1F59,),
            (0x1F5B,),
            (0x1F5D,),
            (0x1F5F, 0x1F7D),
            (0x1F80, 0x1FB4),
            (0x1FB6, 0x1FC4),
            (0x1FC6, 0x1FD3),
            (0x1FD6, 0x1FDB),
            (0x1FDD, 0x1FEF),
            (0x1FF2, 0x1FF4),
            (0x1FF6, 0x1FFE),
            (0x2129,),
            (0x2719, 0x271A),
            (0xAB65,),
            (0x10140, 0x1018D),
            (0x101A0,),
            (0x1D200, 0x1D245),
            (0x1F7A1, 0x1F7A7),
        ]

    class Cyrillic(unicode_set):
        """Unicode set for Cyrillic Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x0400, 0x052F),
            (0x1C80, 0x1C88),
            (0x1D2B,),
            (0x1D78,),
            (0x2DE0, 0x2DFF),
            (0xA640, 0xA672),
            (0xA674, 0xA69F),
            (0xFE2E, 0xFE2F),
        ]

    class Chinese(unicode_set):
        """Unicode set for Chinese Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x2E80, 0x2E99),
            (0x2E9B, 0x2EF3),
            (0x31C0, 0x31E3),
            (0x3400, 0x4DB5),
            (0x4E00, 0x9FEF),
            (0xA700, 0xA707),
            (0xF900, 0xFA6D),
            (0xFA70, 0xFAD9),
            (0x16FE2, 0x16FE3),
            (0x1F210, 0x1F212),
            (0x1F214, 0x1F23B),
            (0x1F240, 0x1F248),
            (0x20000, 0x2A6D6),
            (0x2A700, 0x2B734),
            (0x2B740, 0x2B81D),
            (0x2B820, 0x2CEA1),
            (0x2CEB0, 0x2EBE0),
            (0x2F800, 0x2FA1D),
        ]

    class Japanese(unicode_set):
        """Unicode set for Japanese Unicode Character Range, combining Kanji, Hiragana, and Katakana ranges"""

        class Kanji(unicode_set):
            "Unicode set for Kanji Unicode Character Range"
            _ranges: UnicodeRangeList = [
                (0x4E00, 0x9FBF),
                (0x3000, 0x303F),
            ]

        class Hiragana(unicode_set):
            """Unicode set for Hiragana Unicode Character Range"""
            _ranges: UnicodeRangeList = [
                (0x3041, 0x3096),
                (0x3099, 0x30A0),
                (0x30FC,),
                (0xFF70,),
                (0x1B001,),
                (0x1B150, 0x1B152),
                (0x1F200,),
            ]

        class Katakana(unicode_set):
            """Unicode set for Katakana  Unicode Character Range"""
            _ranges: UnicodeRangeList = [
                (0x3099, 0x309C),
                (0x30A0, 0x30FF),
                (0x31F0, 0x31FF),
                (0x32D0, 0x32FE),
                (0xFF65, 0xFF9F),
                (0x1B000,),
                (0x1B164, 0x1B167),
                (0x1F201, 0x1F202),
                (0x1F213,),
            ]

        漢字 = Kanji
        カタカナ = Katakana
        ひらがな = Hiragana

        _ranges = (
            Kanji._ranges
            + Hiragana._ranges
            + Katakana._ranges
        )

    class Hangul(unicode_set):
        """Unicode set for Hangul (Korean) Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x1100, 0x11FF),
            (0x302E, 0x302F),
            (0x3131, 0x318E),
            (0x3200, 0x321C),
            (0x3260, 0x327B),
            (0x327E,),
            (0xA960, 0xA97C),
            (0xAC00, 0xD7A3),
            (0xD7B0, 0xD7C6),
            (0xD7CB, 0xD7FB),
            (0xFFA0, 0xFFBE),
            (0xFFC2, 0xFFC7),
            (0xFFCA, 0xFFCF),
            (0xFFD2, 0xFFD7),
            (0xFFDA, 0xFFDC),
        ]

    Korean = Hangul

    class CJK(Chinese, Japanese, Hangul):
        """Unicode set for combined Chinese, Japanese, and Korean (CJK) Unicode Character Range"""

    class Thai(unicode_set):
        """Unicode set for Thai Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x0E01, 0x0E3A),
            (0x0E3F, 0x0E5B)
        ]

    class Arabic(unicode_set):
        """Unicode set for Arabic Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x0600, 0x061B),
            (0x061E, 0x06FF),
            (0x0700, 0x077F),
        ]

    class Hebrew(unicode_set):
        """Unicode set for Hebrew Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x0591, 0x05C7),
            (0x05D0, 0x05EA),
            (0x05EF, 0x05F4),
            (0xFB1D, 0xFB36),
            (0xFB38, 0xFB3C),
            (0xFB3E,),
            (0xFB40, 0xFB41),
            (0xFB43, 0xFB44),
            (0xFB46, 0xFB4F),
        ]

    class Devanagari(unicode_set):
        """Unicode set for Devanagari Unicode Character Range"""
        _ranges: UnicodeRangeList = [
            (0x0900, 0x097F),
            (0xA8E0, 0xA8FF)
        ]

    BMP = BasicMultilingualPlane

    # add language identifiers using language Unicode
    العربية = Arabic
    中文 = Chinese
    кириллица = Cyrillic
    Ελληνικά = Greek
    עִברִית = Hebrew
    日本語 = Japanese
    한국어 = Korean
    ไทย = Thai
    देवनागरी = Devanagari

    # fmt: on
python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/results.cpython-312.pyc000064400000102471151732702360024000 0ustar00�

R`iDh����UddlmZmZmZmZmZmZddlZddlm	Z	m
Z
mZmZm
Z
eefZe	edfed<ed�dD��ZGd�d	�ZGd
�d�Zej,e�ej,e�y)�)�MutableMapping�Mapping�MutableSequence�Iterator�Sequence�	ContainerN)�Tuple�Any�Dict�Set�List.�str_typec#� K�|]}|���y�w�N�)�.0�_s  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/results.py�	<genexpr>rs�����2�a��2�s�rc�J�eZdZUedefed<dgZdddefd�Zd�Zd�Z	d�Z
y	)
�_ParseResultsWithOffset�ParseResults�tup�p1�p2c��||f|_yr�r)�selfrrs   r�__init__z _ParseResultsWithOffset.__init__s
��.0�"�X���c� �|j|Srr�r�is  r�__getitem__z#_ParseResultsWithOffset.__getitem__s���x�x��{�r c��|jSrr�rs r�__getstate__z$_ParseResultsWithOffset.__getstate__s���x�x�r c��|d|_y�Nrr)r�argss  r�__setstate__z$_ParseResultsWithOffset.__setstate__s
����7��r N)�__name__�
__module__�__qualname__r	�int�__annotations__�	__slots__rr$r'r+rr rrrs;��	�~�s�"�	#�#���I�6�>�6�s�6���r rc��eZdZUdZdgdfZeedfed<eed<ded<e	eed<e
ed	<eeed
<eeefed<dZ
Gd
�de�Zd8d�Zddddefd�Zd�Zefd�Zd�Zde
fd�Zdefd�Zde
fd�Zdefd�Zdefd�Zd�Zd�Zd�Zde
fd�Zd�Z d9d �Z!d!�Z"d"�Z#d#�Z$d$�Z%d%�Z&d:d&�Z'd:d'�Z(d;d(�Z)defd)�Z*defd*�Z+d<d+�Z,defd,�Z-de.fd-�Z/d;d.�Z0d;d/�Z1d0�Z2d=defd1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8e9d9d;d7��Z:e-Z;	e/Z<	e2Z=y)>ra{Structured parse results, to provide multiple means of access to
    the parsed data:

    - as a list (``len(results)``)
    - by list index (``results[0], results[1]``, etc.)
    - by attribute (``results.<results_name>`` - see :class:`ParserElement.set_results_name`)

    Example::

        integer = Word(nums)
        date_str = (integer.set_results_name("year") + '/'
                    + integer.set_results_name("month") + '/'
                    + integer.set_results_name("day"))
        # equivalent form:
        # date_str = (integer("year") + '/'
        #             + integer("month") + '/'
        #             + integer("day"))

        # parse_string returns a ParseResults object
        result = date_str.parse_string("1999/12/31")

        def test(s, fn=repr):
            print(f"{s} -> {fn(eval(s))}")
        test("list(result)")
        test("result[0]")
        test("result['month']")
        test("result.day")
        test("'month' in result")
        test("'minutes' in result")
        test("result.dump()", str)

    prints::

        list(result) -> ['1999', '/', '12', '/', '31']
        result[0] -> '1999'
        result['month'] -> '12'
        result.day -> '31'
        'month' in result -> True
        'minutes' in result -> False
        result.dump() -> ['1999', '/', '12', '/', '31']
        - day: '31'
        - month: '12'
        - year: '1999'
    Nr.�_null_values�_name�_parent�
_all_names�_modal�_toklist�_tokdict)r4r5r6r7r8r9c��eZdZdZdd�Zy)�ParseResults.Lista�
        Simple wrapper class to distinguish parsed list results that should be preserved
        as actual Python lists, instead of being converted to :class:`ParseResults`::

            LBRACK, RBRACK = map(pp.Suppress, "[]")
            element = pp.Forward()
            item = ppc.integer
            element_list = LBRACK + pp.DelimitedList(element) + RBRACK

            # add parse actions to convert from ParseResults to actual Python collection types
            def as_python_list(t):
                return pp.ParseResults.List(t.as_list())
            element_list.add_parse_action(as_python_list)

            element <<= item | element_list

            element.run_tests('''
                100
                [2,3,4]
                [[2, 1],3,4]
                [(2, 1),3,4]
                (2,3,4)
                ''', post_parse=lambda s, r: (r[0], type(r[0])))

        prints::

            100
            (100, <class 'int'>)

            [2,3,4]
            ([2, 3, 4], <class 'list'>)

            [[2, 1],3,4]
            ([[2, 1], 3, 4], <class 'list'>)

        (Used internally by :class:`Group` when `aslist=True`.)
        Nc��|�g}t|t�s-t|j�dt	|�j����tj|�S)Nz* may only be constructed with a list, not )�
isinstance�list�	TypeErrorr,�type�__new__)�cls�	containeds  rrAzParseResults.List.__new__�sT��� ��	��i��.���|�|�n�$N�t�T]��Og�Og�Nh�i����<�<��$�$r r)r,r-r.�__doc__rArr rr
r;bs
��$	�L		%r r
c�^�t|t�r|Stj|�}d|_d|_t
�|_|�g|_nOt|ttf�r1t|tj�r|ddgn
t|�|_n|g|_t�|_
|Sr)r=r�objectrAr4r5�setr6r8r>�_generator_typer
�dictr9)rB�toklist�name�kwargsrs     rrAzParseResults.__new__�s����g�|�,��N��~�~�c�"����
�����%����?��D�M�
��$��!8�
9��g�|�'8�'8�9������'�]�
�M�%�I�D�M����
��r Tc���|||_|��|dk7r�||t�rt|�}|s|h|_||_||j
vrx||ttf�r|g}|rV||t�r#tt|j�d�||<ntt|d�d�||<|||_y	|d||<yyyy#tttf$r||ur|||<Yy||_YywxYw)N�r)r7r/�strr6r4r3rr@rrr8�KeyErrorr?�
IndexError)rrJrK�asList�modalr=s      rrzParseResults.__init__�s
��	
��������
��$��$��4�y���#'�&����D�J��d�/�/�/��g��$�'7�8�&�i�G��!�'�<�8�%<�(��)9�)9�:�A�&��T�
�&=�(����4�a�&��T�
�(,�D��J�$�.�%,�Q�Z��T�
�0�
!+���,%�i��<�.�"�$�.�)0�D��J�)-�D�J�	.�s�7C�C,�"C,�+C,c���t|ttf�r|j|S||jvr|j
|ddSt
|j
|D�cgc]}|d��	c}�Scc}w)N���r)r=r/�slicer8r6r9r)rr#�vs   rr$zParseResults.__getitem__�sp���a�#�u��&��=�=��#�#�����'��}�}�Q�'��+�A�.�.�#�4�=�=��3C�$D�3C�a�Q�q�T�3C�$D�E�E��$Ds�A2c��||t�r;|jj|t��|gz|j|<|d}nf||tt
f�r||j|<|}nA|jj|t��t|d�gz|j|<|}||t�r||_yyr))	rr9�getr>r/rVr8rr5)r�krWr=�subs     r�__setitem__zParseResults.__setitem__�s����a�0�1�#�}�}�0�0��D�F�;�q�c�A�D�M�M�!���A�$�C�
��C��<�
(� �D�M�M�!���C�#�}�}�0�0��D�F�;�'��1�-�?� �D�M�M�!���C��c�<�(��C�K�)r c	���t|ttf�r�t|j�}|j|=t|t�r|dkr||z
}t||dz�}tt
|j|���}|j�|jj�D]7\}}|D]-}t|�D]\}\}}	t||	|	|kDz
�||<��/�9y|j|=y)Nr�)
r=r/rV�lenr8r>�range�indices�reverser9�items�	enumerater)
rr#�mylen�removedrK�occurrences�jrZ�value�positions
          r�__delitem__zParseResults.__delitem__�s����a�#�u��&���
�
�&�E��
�
�a� ��!�S�!��q�5���J�A��!�Q��U�O���5�!�)�)�E�"2�3�4�G��O�O��%)�]�]�%8�%8�%:�!��k� �A�09�+�0F�,��,�E�8�)@�!�8�x�!�|�#<�*��A��1G�!�&;��
�
�a� r �returnc��||jvSr�r9)rrZs  r�__contains__zParseResults.__contains__�s���D�M�M�!�!r c�,�t|j�Sr)r_r8r&s r�__len__zParseResults.__len__�s���4�=�=�!�!r c�:�|jxs|jSr)r8r9r&s r�__bool__zParseResults.__bool__s���
�
�6����7�7�7r c�,�t|j�Sr��iterr8r&s r�__iter__zParseResults.__iter__����D�M�M�"�"r c�8�t|jddd��S)NrUrur&s r�__reversed__zParseResults.__reversed__s���D�M�M�$�B�$�'�(�(r c�,�t|j�Sr)rvr9r&s r�keyszParseResults.keys
rxr c�6���fd��j�D�S)Nc3�(�K�|]	}�|���y�wrr�rrZrs  �rrz&ParseResults.values.<locals>.<genexpr>s�����-��A��Q���s��r|r&s`r�valueszParseResults.values
s���-�����-�-r c�6���fd��j�D�S)Nc3�,�K�|]}|�|f���
y�wrrrs  �rrz%ParseResults.items.<locals>.<genexpr>s�����2�k���D��G��k�s�r�r&s`rrczParseResults.itemss���2�d�i�i�k�2�2r c��|jS)z�
        Since ``keys()`` returns an iterator, this method is helpful in bypassing
        code that looks for the existence of any defined results names.rnr&s r�haskeyszParseResults.haskeyss���}�}�$�$�$r c���|sdg}|j�D]\}}|dk(r|d|f}�td|����t|dt�st	|�dk(s|d|vr|d}||}||=|S|d}|S)a�
        Removes and returns item at specified index (default= ``last``).
        Supports both ``list`` and ``dict`` semantics for ``pop()``. If
        passed no argument or an integer argument, it will use ``list``
        semantics and pop tokens from the list of parsed tokens. If passed
        a non-integer argument (most likely a string), it will use ``dict``
        semantics and pop the corresponding value from any defined results
        names. A second default return value argument is supported, just as in
        ``dict.pop()``.

        Example::

            numlist = Word(nums)[...]
            print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

            def remove_first(tokens):
                tokens.pop(0)
            numlist.add_parse_action(remove_first)
            print(numlist.parse_string("0 123 321")) # -> ['123', '321']

            label = Word(alphas)
            patt = label("LABEL") + Word(nums)[1, ...]
            print(patt.parse_string("AAB 123 321").dump())

            # Use pop() in a parse action to remove named result (note that corresponding value is not
            # removed from list form of results)
            def remove_LABEL(tokens):
                tokens.pop("LABEL")
                return tokens
            patt.add_parse_action(remove_LABEL)
            print(patt.parse_string("AAB 123 321").dump())

        prints::

            ['AAB', '123', '321']
            - LABEL: 'AAB'

            ['AAB', '123', '321']
        rU�defaultrz)pop() got an unexpected keyword argument r^)rcr?r=r/r_)rr*rLrZrW�index�ret�defaultvalues        r�popzParseResults.pops���P��4�D��L�L�N�D�A�q��I�~��Q���|���"K�A�5� Q�R�R�	#�
�d�1�g�s�#�s�4�y�A�~��a��D����G�E��u�+�C��U���J���7�L��r c��||vr||S|S)a^
        Returns named result matching the given key, or if there is no
        such name, then returns the given ``default_value`` or ``None`` if no
        ``default_value`` is specified.

        Similar to ``dict.get()``.

        Example::

            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            result = date_str.parse_string("1999/12/31")
            print(result.get("year")) # -> '1999'
            print(result.get("hour", "not specified")) # -> 'not specified'
            print(result.get("hour")) # -> None
        r)r�key�
default_values   rrYzParseResults.getQs��$�$�;���9�� � r c���|jj||�|jj�D]0\}}t	|�D]\}\}}t||||kDz�||<��2y)a;
        Inserts new element at location index in the list of parsed tokens.

        Similar to ``list.insert()``.

        Example::

            numlist = Word(nums)[...]
            print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

            # use a parse action to insert the parse location in the front of the parsed results
            def insert_locn(locn, tokens):
                tokens.insert(0, locn)
            numlist.add_parse_action(insert_locn)
            print(numlist.parse_string("0 123 321")) # -> [0, '0', '123', '321']
        N)r8�insertr9rcrdr)rr��
ins_stringrKrgrZrirjs        rr�zParseResults.inserthsj��"	
�
�
���U�J�/�!%���!4�!4�!6��D�+�(1�+�(>�$��$�E�8�!8��8�x�%�'7�8�"��A��)?�"7r c�:�|jj|�y)a
        Add single element to end of ``ParseResults`` list of elements.

        Example::

            numlist = Word(nums)[...]
            print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

            # use a parse action to compute the sum of the parsed integers, and add it to the end
            def append_sum(tokens):
                tokens.append(sum(map(int, tokens)))
            numlist.add_parse_action(append_sum)
            print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321', 444]
        N)r8�append)r�items  rr�zParseResults.append�s��	
�
�
���T�"r c�~�t|t�r|j|�y|jj	|�y)a
        Add sequence of elements to end of ``ParseResults`` list of elements.

        Example::

            patt = Word(alphas)[1, ...]

            # use a parse action to append the reverse of the matched strings, to make a palindrome
            def make_palindrome(tokens):
                tokens.extend(reversed([t[::-1] for t in tokens]))
                return ''.join(tokens)
            patt.add_parse_action(make_palindrome)
            print(patt.parse_string("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'
        N)r=r�__iadd__r8�extend)r�itemseqs  rr�zParseResults.extend�s,���g�|�,��M�M�'�"��M�M� � ��)r c�V�|jdd�=|jj�y)z7
        Clear all elements and results names.
        N)r8r9�clearr&s rr�zParseResults.clear�s ��
�M�M�!���
�
���r c�d�	||S#t$r|jd�rt|��YywxYw)N�__rN)rP�
startswith�AttributeError)rrKs  r�__getattr__zParseResults.__getattr__�s:��	���:����	����t�$�$�T�*�*��	�s��%/�/c�0�|j�}||z
}|Sr)�copy)r�otherr�s   r�__add__zParseResults.__add__�s���i�i�k���u����
r c����|s|S|jr�t|j���fd�}|jj�}|D���cgc]&\}}|D]}|t	|d||d��f���(}}}}|D](\}}|||<t|dt�s�||d_�*|xj|jz
c_|xj|jzc_|Scc}}}w)Nc���|dkr�S|�zSr)r)�a�offsets �r�<lambda>z'ParseResults.__iadd__.<locals>.<lambda>�s���A��E�&�"A�q�6�z�"Ar rr^)	r9r_r8rcrr=rr5r6)	rr��	addoffset�
otheritemsrZ�vlistrW�otherdictitemsr�s	        @rr�zParseResults.__iadd__�s������K��>�>�����'�F�A�I����-�-�/�J�!+�� *�H�A�u��A��+�A�a�D�)�A�a�D�/�B�C��D� *�
��
'���1���Q���a��d�L�1�#'�A�a�D�L�'�
	
�
�
����'�
����5�+�+�+�����s�+C(c�V�t|t�r|dk(r|j�S||zSr))r=r/r�)rr�s  r�__radd__zParseResults.__radd__�s*���e�S�!�e�q�j��9�9�;���4�<�r c�n�t|�j�d|j�d|j��d�S)N�(�, �))r@r,r8�as_dictr&s r�__repr__zParseResults.__repr__�s2���t�*�%�%�&�a��
�
�'8��4�<�<�>�:J�!�L�Lr c
��ddj|jD�cgc](}t|t�rt	|�n
t|���*c}�zdzScc}w)N�[r��])�joinr8r=rrO�reprr"s  r�__str__zParseResults.__str__�sa����i�i�"�]�]��*��)��L�9�C��F�t�A�w�F�*���
��
�		
��s�-A
c���g}|jD]U}|r|r|j|�t|t�r||j	�z
}�<|jt|���W|Sr)r8r�r=r�
_asStringListrO)r�sep�outr�s    rr�zParseResults._asStringList�sY�����M�M�D��s��
�
�3���$��-��t�)�)�+�+���
�
�3�t�9�%�
"��
r c��|jD�cgc]$}t|t�r|j�n|��&c}Scc}w)ax
        Returns the parse results as a nested list of matching tokens, all converted to strings.

        Example::

            patt = Word(alphas)[1, ...]
            result = patt.parse_string("sldkj lsdkj sldkj")
            # even though the result prints in string-like form, it is actually a pyparsing ParseResults
            print(type(result), result) # -> <class 'pyparsing.ParseResults'> ['sldkj', 'lsdkj', 'sldkj']

            # Use as_list() to create an actual list
            result_list = result.as_list()
            print(type(result_list), result_list) # -> <class 'list'> ['sldkj', 'lsdkj', 'sldkj']
        )r8r=r�as_list)r�ress  rr�zParseResults.as_list�sA��"�}�}�
�$��(��\�:�C�K�K�M��C�$�
�	
��
s�);c�R���fd��t�fd�|j�D��S)a�
        Returns the named parse results as a nested dictionary.

        Example::

            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            result = date_str.parse_string('12/31/1999')
            print(type(result), repr(result)) # -> <class 'pyparsing.ParseResults'> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]})

            result_dict = result.as_dict()
            print(type(result_dict), repr(result_dict)) # -> <class 'dict'> {'day': '1999', 'year': '12', 'month': '31'}

            # even though a ParseResults supports dict-like access, sometime you just need to have a dict
            import json
            print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable
            print(json.dumps(result.as_dict())) # -> {"month": "31", "day": "1999", "year": "12"}
        c���t|t�r6|j�r|j�S|D�cgc]
}�|���c}S|Scc}wr)r=rr�r�)�objrW�to_items  �rr�z%ParseResults.as_dict.<locals>.to_itemsG����#�|�,�(+���
�s�{�{�}�T�PS�;T�PS�1�G�A�J�PS�;T�T��
��<Us�A
c3�8�K�|]\}}|�|�f���y�wrr)rrZrWr�s   �rrz'ParseResults.as_dict.<locals>.<genexpr>!s�����=����1�Q���
�O��s�)rIrc)rr�s @rr�zParseResults.as_dicts!���*	��=��
�
��=�=�=r c���t|j�}|jj�|_|j|_|xj
|j
zc_|j|_|S)a
        Returns a new shallow copy of a :class:`ParseResults` object. `ParseResults`
        items contained within the source are shared with the copy. Use
        :class:`ParseResults.deepcopy()` to create a copy with its own separate
        content values.
        )rr8r9r�r5r6r4)rr�s  rr�zParseResults.copy#sS���4�=�=�)���}�}�)�)�+����l�l������$�/�/�)���J�J��	��
r c�0�|j�}t|j�D]�\}}t|t�r|j�|j|<�4t|ttf�r�Kt|t�r]t|��x|j|<}|j�D]*\}}t|t�r|j�n|||<�,��t|t�s��t|�d�|D��|j|<��|S)zL
        Returns a new deep copy of a :class:`ParseResults` object.
        c3�`K�|]&}t|t�r|j�n|���(y�wr)r=r�deepcopy)rrWs  rrz(ParseResults.deepcopy.<locals>.<genexpr>As)����-�PS�1�J�q�,�$?�A�J�J�L�Q�F�PS�s�,.)r�rdr8r=rr�rO�bytesrr@rcr)rr�r#r��destrZrWs       rr�zParseResults.deepcopy1s����i�i�k����
�
�.�F�A�s��#�|�,�#&�<�<�>��
�
�a� ��C�#�u��.���C��0�*3�$�s�)�+�5��
�
�a� �4��I�I�K�D�A�q�.8��L�.I�a�j�j�l�q�D��G�(��C��+�#,�4��9�-�PS�-�$��
�
�a� �/��
r c�����jr�jS�jr;�j}|jj�}t	�fd�|D�d�St��dk(rxt�j�dk(r`t	t
�jj���dddvr,t	t
�jj���Sy)a
        Returns the results name for this token expression. Useful when several
        different expressions might match at a particular location.

        Example::

            integer = Word(nums)
            ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
            house_number_expr = Suppress('#') + Word(nums, alphanums)
            user_data = (Group(house_number_expr)("house_number")
                        | Group(ssn_expr)("ssn")
                        | Group(integer)("age"))
            user_info = user_data[1, ...]

            result = user_info.parse_string("22 111-22-3333 #221B")
            for item in result:
                print(item.get_name(), ':', item[0])

        prints::

            age : 22
            ssn : 111-22-3333
            house_number : 221B
        c3�D�K�|]\}}|D]
\}}|�ur|����y�wrr)rrZr�rW�locrs     �rrz(ParseResults.get_name.<locals>.<genexpr>es5������$8���5�"'���3��D�y��"'��$8�s� Nr^r)rrU)	r4r5r9rc�nextr_rvr�r|)r�par�parent_tokdict_itemss`  r�get_namezParseResults.get_nameFs����2�:�:��:�:��
�\�\�"&�,�,�C�#&�<�<�#5�#5�#7� ���$8����
�
��I��N��D�M�M�"�a�'��T�$�-�-�.�.�0�1�2�1�5�a�8�G�C���T�]�]�/�/�1�2�3�3�r c��g}d}|j|r|t|j��znd�|�r�|j�r�t	d�|j�D��}|D]�\}}	|r|j|�|j|�d|z�d|�d��t
|	t�rE|	r(|j|	j||||dz����o|jt|	����|jt|	����td	�|D��r�|}	t|	�D]�\}
}t
|t�rE|jd
j|d|z|
|d|dzz|j||||dz�����[|jd|d|z|
|d|dzzt|�fz���dj|�S)aM
        Diagnostic method for listing out the contents of
        a :class:`ParseResults`. Accepts an optional ``indent`` argument so
        that this string can be embedded in a nested display of other data.

        Example::

            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            result = date_str.parse_string('1999/12/31')
            print(result.dump())

        prints::

            ['1999', '/', '12', '/', '31']
            - day: '31'
            - month: '12'
            - year: '1999'
        �
rNc3�<K�|]\}}t|�|f���y�wr)rO)rrZrWs   rrz$ParseResults.dump.<locals>.<genexpr>�s����D�|�t�q�!��A���{�|���z  z- z: r^)�indent�full�include_list�_depthc3�<K�|]}t|t����y�wr)r=r)r�vvs  rrz$ParseResults.dump.<locals>.<genexpr>�s����?�$�B�:�b�,�/�$�r�z
{}{}[{}]:
{}{}{}z
%s%s[%d]:
%s%s%s)r�rOr�r��sortedrcr=r�dumpr��anyrd�formatr�)rr�r�r�r�r��NLrcrZrWr#r�s            rr�zParseResults.dumpvs���*��
���
�
�<�6�C�����/�/�R�H���|�|�~��D�t�z�z�|�D�D��!�D�A�q���
�
�2���J�J�&��4�&�=�):�"�Q�C�r�B�C�!�!�\�2���J�J� !���+1�)-�1=�+1�A�:�	!'�!"�� �J�J�s�1�v�.��
�
�4��7�+�#"�$�?�$�?�?���&�q�\�E�A�r�!�"�l�3��
�
�1�8�8� &�!%��� !� &�!%��!��!4� "���+1�)-�1=�+1�A�:�	!(�!"�
�� �
�
�1� &�!%��� !� &�!%��!��!4� #�B��
��
�%*�<�w�w�s�|�r c�R�tj|j�g|��i|��y)a$
        Pretty-printer for parsed results as a list, using the
        `pprint <https://docs.python.org/3/library/pprint.html>`_ module.
        Accepts additional positional or keyword args as defined for
        `pprint.pprint <https://docs.python.org/3/library/pprint.html#pprint.pprint>`_ .

        Example::

            ident = Word(alphas, alphanums)
            num = Word(nums)
            func = Forward()
            term = ident | num | Group('(' + func + ')')
            func <<= ident + Group(Optional(DelimitedList(term)))
            result = func.parse_string("fna a,b,(fnb c,d,200),100")
            result.pprint(width=40)

        prints::

            ['fna',
             ['a',
              'b',
              ['(', 'fnb', ['c', 'd', '200'], ')'],
              '100']]
        N)�pprintr�)rr*rLs   rr�zParseResults.pprint�s ��2	�
�
�d�l�l�n�6�t�6�v�6r c�~�|j|jj�d|j|jffSr)r8r9r�r6r4r&s rr'zParseResults.__getstate__�s9���M�M��
�
�"�"�$������
�
�	
�
�	
r c�d�|\|_\|_}}|_t|�|_d|_yr)r8r9r4rGr6r5)r�stater��inAccumNamess    rr+zParseResults.__setstate__�s.��HM�E��
�E��
�s�L�$�*��l�+�����r c�2�|j|jfSr)r8r4r&s r�__getnewargs__zParseResults.__getnewargs__�s���}�}�d�j�j�(�(r c�^�tt|��t|j��zSr)�dirr@r>r|r&s r�__dir__zParseResults.__dir__�s ���4��:���d�i�i�k�!2�2�2r c	���d�}|g�}|j�D]A\}}t|t�r||j||��z
}�-|||g|||���z
}�C|�||g|��}|S)z�
        Helper classmethod to construct a ``ParseResults`` from a ``dict``, preserving the
        name-value relations as results names. If an optional ``name`` argument is
        given, a nested ``ParseResults`` will be returned.
        c�Z�	t|�t|t�S#t$rYywxYw)NF)rvr=r�	Exception)r�s r�is_iterablez+ParseResults.from_dict.<locals>.is_iterables4��
5��S�	�
&�c�8�4�4�4��	�
��
�s��	*�*)rK)rKrR)rcr=r�	from_dict)rBr�rKr�r�rZrWs       rr�zParseResults.from_dict�s{��	5��"�g���K�K�M�D�A�q��!�W�%��s�}�}�Q�Q�}�/�/���s�A�3�Q�{�1�~�>�>��	"�
���s�e�$�'�C��
r )NNr)r�rrlr)rlr)rN)rNTTr)>r,r-r.rDr3r	r
r0rOr�boolr
rr1r>rAr=rr$r\rkror/rqrsrrwrzr|r�rcr�r�rYr�r�r�r�r�r�r�r�r�r�r�r�rIr�r�r�r�r�r�r'r+r�r��classmethodr�rR�asDict�getNamerr rrr"s���+�Z&*�2�r�N�L�%��S��/�2��J�
���C����L��3�i���3��8�n���I�0%�t�0%�d�0��d�$�:�.�BF�,6�
�!�."��"�"��"�8�$�8�#�(�#�)�h�)�#�.�3�%��%�6 �p!�.�2#�"*�(���
�, �M�#�M�

��

�	�
��
�(>��>�:��*.�`N��N�`7�8	
��
)�3�����4�F�+�
�F�+��G�,r r)�collections.abcrrrrrrr��typingr	r
rrr
rOr�rr@r0rHrr�registerrr r�<module>r�s}������.�.�!�5�\��%��c�	�
�)���2��'����"v-�v-�r�����%������&r python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/__init__.cpython-312.pyc000064400000017433151732702360024041 0ustar00�

R`i�#��T�dZddlmZGd�de�Zeddddd�ZdZejZeZd	Zdd
l	�dd
l
�dd
l�ddlm
Z
mZdd
l�dd
l�ddlmZdd
l�ddlmZdd
lmZmZmZddlmZddlmZmZde�vreZde�vreZde�vreZeeezz
Zgd�Zy)a
pyparsing module - Classes and methods to define and execute parsing grammars
=============================================================================

The pyparsing module is an alternative approach to creating and
executing simple grammars, vs. the traditional lex/yacc approach, or the
use of regular expressions.  With pyparsing, you don't need to learn
a new syntax for defining grammars or matching expressions - the parsing
module provides a library of classes that you use to construct the
grammar directly in Python.

Here is a program to parse "Hello, World!" (or any greeting of the form
``"<salutation>, <addressee>!"``), built up using :class:`Word`,
:class:`Literal`, and :class:`And` elements
(the :meth:`'+'<ParserElement.__add__>` operators create :class:`And` expressions,
and the strings are auto-converted to :class:`Literal` expressions)::

    from pip._vendor.pyparsing import Word, alphas

    # define grammar of a greeting
    greet = Word(alphas) + "," + Word(alphas) + "!"

    hello = "Hello, World!"
    print(hello, "->", greet.parse_string(hello))

The program outputs the following::

    Hello, World! -> ['Hello', ',', 'World', '!']

The Python representation of the grammar is quite readable, owing to the
self-explanatory class names, and the use of :class:`'+'<And>`,
:class:`'|'<MatchFirst>`, :class:`'^'<Or>` and :class:`'&'<Each>` operators.

The :class:`ParseResults` object returned from
:class:`ParserElement.parse_string` can be
accessed as a nested list, a dictionary, or an object with named
attributes.

The pyparsing module handles some of the problems that are typically
vexing when writing text parsers:

  - extra or missing whitespace (the above program will also handle
    "Hello,World!", "Hello  ,  World  !", etc.)
  - quoted strings
  - embedded comments


Getting Started -
-----------------
Visit the classes :class:`ParserElement` and :class:`ParseResults` to
see the base classes that most other pyparsing
classes inherit from. Use the docstrings for examples of how to:

 - construct literal match expressions from :class:`Literal` and
   :class:`CaselessLiteral` classes
 - construct character word-group expressions using the :class:`Word`
   class
 - see how to create repetitive expressions using :class:`ZeroOrMore`
   and :class:`OneOrMore` classes
 - use :class:`'+'<And>`, :class:`'|'<MatchFirst>`, :class:`'^'<Or>`,
   and :class:`'&'<Each>` operators to combine simple expressions into
   more complex ones
 - associate names with your parsed results using
   :class:`ParserElement.set_results_name`
 - access the parsed data, which is returned as a :class:`ParseResults`
   object
 - find some helpful expression short-cuts like :class:`DelimitedList`
   and :class:`one_of`
 - find more useful common expressions in the :class:`pyparsing_common`
   namespace class
�)�
NamedTuplec�\�eZdZUeed<eed<eed<eed<eed<ed��Zd�Zd�Z	y	)
�version_info�major�minor�micro�releaselevel�serialc���|j�d|j�d|j��|jddk(rdnd�|jd�|j��df|jdk(zS)N�.r�c�r��final)rrrr	r
��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/__init__.py�__version__zversion_info.__version__js����z�z�l�!�D�J�J�<�q�����5��+�+�A�.�#�5�3�2�>�t�?P�?P�QR�?S�>T�UY�U`�U`�Ta�b������7�*�,�
,�	
�c�:�t�d|j�dt��S)N� z / )�__name__r�__version_time__rs r�__str__zversion_info.__str__ts"����1�T�-�-�.�c�2B�1C�D�Drc��t�dt|�j�ddjd�t|j|�D���d�S)Nr�(z, c3�:K�|]}dj|����y�w)z{}={!r}N)�format)�.0�nvs  r�	<genexpr>z(version_info.__repr__.<locals>.<genexpr>xs"����<u�]t�WY�=M�Y�=M�=M�r�=R�]t�s��))r�type�join�zip�_fieldsrs r�__repr__zversion_info.__repr__wsG����1�T�$�Z�0�0�1��4�9�9�<u�]`�ae�am�am�os�]t�<u�3u�2v�vw�x�xrN)
r�
__module__�__qualname__�int�__annotations__�str�propertyrrr'�rrrrcs:���J��J��J����K�
�
��
�E�yrr��rz18 Jun 2023 14:05 UTCz+Paul McGuire <ptmcg.gm+pyparsing@gmail.com>)�*)�__diag__�
__compat__)�_builtin_exprs)�unicode_set�UnicodeRangeList�pyparsing_unicode)�pyparsing_test)�pyparsing_commonr4r7r9r8)�rr�
__author__r3r2�And�AtLineStart�
AtStringStart�CaselessKeyword�CaselessLiteral�
CharsNotIn�
CloseMatch�Combine�
DelimitedList�Dict�Each�Empty�
FollowedBy�Forward�
GoToColumn�Group�
IndentedBlock�Keyword�LineEnd�	LineStart�Literal�Located�
PrecededBy�
MatchFirst�NoMatch�NotAny�	OneOrMore�OnlyOnce�OpAssoc�Opt�Optional�Or�ParseBaseException�ParseElementEnhance�ParseException�ParseExpression�ParseFatalException�ParseResults�ParseSyntaxException�
ParserElement�
PositionToken�QuotedString�RecursiveGrammarException�Regex�SkipTo�	StringEnd�StringStart�Suppress�Token�TokenConverter�White�Word�WordEnd�	WordStart�
ZeroOrMore�Char�	alphanums�alphas�
alphas8bit�
any_close_tag�any_open_tag�autoname_elements�c_style_comment�col�common_html_entity�condition_as_parse_action�
counted_array�cpp_style_comment�dbl_quoted_string�dbl_slash_comment�delimited_list�dict_of�empty�hexnums�html_comment�
identchars�identbodychars�infix_notation�java_style_comment�line�line_end�
line_start�lineno�make_html_tags�
make_xml_tags�match_only_at_col�match_previous_expr�match_previous_literal�nested_expr�null_debug_action�nums�one_of�original_text_for�
printables�punc8bitr9r8r7�python_style_comment�
quoted_string�
remove_quotes�replace_with�replace_html_entity�rest_of_line�sgl_quoted_string�srange�
string_end�string_start�	token_map�trace_parse_action�ungroupr5�unicode_string�with_attribute�
with_class�__versionTime__�anyCloseTag�
anyOpenTag�
cStyleComment�commonHTMLEntity�conditionAsParseAction�countedArray�cppStyleComment�dblQuotedString�dblSlashComment�
delimitedList�dictOf�htmlComment�
indentedBlock�
infixNotation�javaStyleComment�lineEnd�	lineStart�locatedExpr�makeHTMLTags�makeXMLTags�matchOnlyAtCol�matchPreviousExpr�matchPreviousLiteral�
nestedExpr�nullDebugAction�oneOf�opAssoc�originalTextFor�pythonStyleComment�quotedString�removeQuotes�replaceHTMLEntity�replaceWith�
restOfLine�sglQuotedString�	stringEnd�stringStart�tokenMap�traceParseAction�
unicodeString�
withAttribute�	withClassN)�__doc__�typingrr�__version_info__rrr�r:�util�
exceptions�actions�corer2r3�resultsr4�core_builtin_exprs�helpers�helper_builtin_exprs�unicoder5r6r7�testingr8�commonr9�common_builtin_exprs�globals�__all__r.rr�<module>r�s���2F��N�y�:�y�0 ��1�a��!�4��*���*�*��"��
:�
����&���6��;�P�P�.���g�i�'����W�Y�&����7�9�$��N��*�-A�A�A��e�rpython3.12/site-packages/pip/_vendor/pyparsing/__pycache__/common.cpython-312.pyc000064400000032225151732702360023566 0ustar00�

R`iK4���ddl�ddlmZmZmZddlmZGd�d�Zee�j�D�cgc]}e	|e
�s�
|��c}Zycc}w)�)�*)�
DelimitedList�any_open_tag�
any_close_tag�)�datetimec��eZdZdZee�Z	ee�Z	e	e
�jd�je�Z
	e	e�jd�jeed��Z	ed�jd�je�Z	e�je�dze�je�zjd�Z	ej'd	��eeeed
�j+�ez�zzjd�Z	ej'e�ed�jd
�je�Z	ed�jd�je�Z	eezezj5d�j7�Z	ed�jd�je�Z	e	ee�jd�Z 	ed�jd�Z!	ed�jd�Z"e"de"zdzzjd�Z#ee"de"zdzz�dzee"de"zdzz�zjd�Z$e$jKd��de!zjd �Z&e'e#e&ze$zjd!��jd!�Z(	ed"�jd#�Z)	e*d=d$e+fd%��Z,e*d>d$e+fd&��Z-ed'�jd(�Z.	ed)�jd*�Z/	ed+�jd,�Z0	e1j*�e2j*�zZ3e*d-e+d.ed/e4fd0��Z5e'e6e7d1�e8�ze	e9d1�2�zee:d3�e;e8�d1z�z�z��j7�jd4�Z<e=ee>j�e<zd5�6��jd7�Z@	e*ed8���ZA	e*ed9���ZB	ed:�jd;�ZC	eZD	eZE	e,ZF	e-ZG	e5ZH	eAZI	eBZJy<)?�pyparsing_commona7Here are some common low-level expressions that may be useful in
    jump-starting parser development:

    - numeric forms (:class:`integers<integer>`, :class:`reals<real>`,
      :class:`scientific notation<sci_real>`)
    - common :class:`programming identifiers<identifier>`
    - network addresses (:class:`MAC<mac_address>`,
      :class:`IPv4<ipv4_address>`, :class:`IPv6<ipv6_address>`)
    - ISO8601 :class:`dates<iso8601_date>` and
      :class:`datetime<iso8601_datetime>`
    - :class:`UUID<uuid>`
    - :class:`comma-separated list<comma_separated_list>`
    - :class:`url`

    Parse actions:

    - :class:`convert_to_integer`
    - :class:`convert_to_float`
    - :class:`convert_to_date`
    - :class:`convert_to_datetime`
    - :class:`strip_html_tags`
    - :class:`upcase_tokens`
    - :class:`downcase_tokens`

    Example::

        pyparsing_common.number.run_tests('''
            # any int or real number, returned as the appropriate type
            100
            -100
            +100
            3.14159
            6.02e23
            1e-12
            ''')

        pyparsing_common.fnumber.run_tests('''
            # any int or real number, returned as float
            100
            -100
            +100
            3.14159
            6.02e23
            1e-12
            ''')

        pyparsing_common.hex_integer.run_tests('''
            # hex numbers
            100
            FF
            ''')

        pyparsing_common.fraction.run_tests('''
            # fractions
            1/2
            -3/4
            ''')

        pyparsing_common.mixed_integer.run_tests('''
            # mixed fractions
            1
            1/2
            -3/4
            1-3/4
            ''')

        import uuid
        pyparsing_common.uuid.set_parse_action(token_map(uuid.UUID))
        pyparsing_common.uuid.run_tests('''
            # uuid
            12345678-1234-5678-1234-567812345678
            ''')

    prints::

        # any int or real number, returned as the appropriate type
        100
        [100]

        -100
        [-100]

        +100
        [100]

        3.14159
        [3.14159]

        6.02e23
        [6.02e+23]

        1e-12
        [1e-12]

        # any int or real number, returned as float
        100
        [100.0]

        -100
        [-100.0]

        +100
        [100.0]

        3.14159
        [3.14159]

        6.02e23
        [6.02e+23]

        1e-12
        [1e-12]

        # hex numbers
        100
        [256]

        FF
        [255]

        # fractions
        1/2
        [0.5]

        -3/4
        [-0.75]

        # mixed fractions
        1
        [1]

        1/2
        [0.5]

        -3/4
        [-0.75]

        1-3/4
        [1.75]

        # uuid
        12345678-1234-5678-1234-567812345678
        [UUID('12345678-1234-5678-1234-567812345678')]
    �integerzhex integer�z[+-]?\d+zsigned integer�/�fractionc��|d|dzS)Nr����)�tts ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/common.py�<lambda>zpyparsing_common.<lambda>�s���A���B����-z"fraction or mixed integer-fractionz[+-]?(?:\d+\.\d*|\.\d+)zreal numberz@[+-]?(?:\d+(?:[eE][+-]?\d+)|(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?)z$real number with scientific notation�numberz[+-]?\d+\.?\d*([eE][+-]?\d+)?�fnumber�
identifierzK(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}zIPv4 addressz[0-9a-fA-F]{1,4}�hex_integer�:�zfull IPv6 address)r�z::zshort IPv6 addressc�,�td�|D��dkS)Nc3�`K�|]&}tjj|�s�#d���(y�w)rN)r
�
_ipv6_part�matches)�.0rs  r�	<genexpr>z,pyparsing_common.<lambda>.<locals>.<genexpr>�s%����O�!�B�'7�'B�'B�'J�'J�2�'N�a�!�s�$.�.�)�sum��ts rrzpyparsing_common.<lambda>�s��#�O�!�O�O�RS�Srz::ffff:zmixed IPv6 addresszIPv6 addressz:[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}zMAC address�fmtc����fd�}|S)a�
        Helper to create a parse action for converting parsed date string to Python datetime.date

        Params -
        - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%d"``)

        Example::

            date_expr = pyparsing_common.iso8601_date.copy()
            date_expr.set_parse_action(pyparsing_common.convert_to_date())
            print(date_expr.parse_string("1999-12-31"))

        prints::

            [datetime.date(1999, 12, 31)]
        c���	tj|d��j�S#t$r}t	||t|���d}~wwxYw�Nr)r�strptime�date�
ValueError�ParseException�str)�ss�llr�ver(s    �r�cvt_fnz0pyparsing_common.convert_to_date.<locals>.cvt_fnsK���
6��(�(��A���4�9�9�;�;���
6�$�R��S��W�5�5��
6�s�&*�	A�A	�	Ar�r(r4s` r�convert_to_datez pyparsing_common.convert_to_date�s���&	6��
rc����fd�}|S)aHelper to create a parse action for converting parsed
        datetime string to Python datetime.datetime

        Params -
        - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%dT%H:%M:%S.%f"``)

        Example::

            dt_expr = pyparsing_common.iso8601_datetime.copy()
            dt_expr.set_parse_action(pyparsing_common.convert_to_datetime())
            print(dt_expr.parse_string("1999-12-31T23:59:59.999"))

        prints::

            [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)]
        c���	tj|d��S#t$r}t||t	|���d}~wwxYwr+)rr,r.r/r0)�s�lr'r3r(s    �rr4z4pyparsing_common.convert_to_datetime.<locals>.cvt_fn*sB���
4��(�(��1��s�3�3���
4�$�Q��3�r�7�3�3��
4�s��	A�;�Arr5s` r�convert_to_datetimez$pyparsing_common.convert_to_datetimes���&	4��
rz7(?P<year>\d{4})(?:-(?P<month>\d\d)(?:-(?P<day>\d\d))?)?zISO8601 datez�(?P<year>\d{4})-(?P<month>\d\d)-(?P<day>\d\d)[T ](?P<hour>\d\d):(?P<minute>\d\d)(:(?P<second>\d\d(\.\d*)?)?)?(?P<tz>Z|[+-]\d\d:?\d\d)?zISO8601 datetimez2[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}�UUIDr9r:�tokensc�F�tjj|d�S)aParse action to remove HTML tags from web page HTML source

        Example::

            # strip HTML links from normal text
            text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>'
            td, td_end = make_html_tags("TD")
            table_text = td + SkipTo(td_end).set_parse_action(pyparsing_common.strip_html_tags)("body") + td_end
            print(table_text.parse_string(text).body)

        Prints::

            More info at the pyparsing wiki page
        r)r
�_html_stripper�transform_string)r9r:r=s   r�strip_html_tagsz pyparsing_common.strip_html_tagsAs��  �.�.�?�?��q�	�J�Jr�,)�
exclude_charsz 	�	commaItem�)�defaultzcomma separated listc�"�|j�S�N)�upperr&s rrzpyparsing_common.<lambda>ds
��Q�W�W�Yrc�"�|j�SrH)�lowerr&s rrzpyparsing_common.<lambda>gs
��q�w�w�yra�(?P<url>(?:(?:(?P<scheme>https?|ftp):)?\/\/)(?:(?P<auth>\S+(?::\S*)?)@)?(?P<host>(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(:(?P<port>\d{2,5}))?(?P<path>\/[^?# ]*)?(\?(?P<query>[^#]*))?(#(?P<fragment>\S*))?)�urlN)z%Y-%m-%d)z%Y-%m-%dT%H:%M:%S.%f)K�__name__�
__module__�__qualname__�__doc__�	token_map�int�convert_to_integer�float�convert_to_float�Word�nums�set_name�set_parse_actionr�hexnumsr�Regex�signed_integerr�add_parse_action�Opt�suppress�
mixed_integerr%�real�sci_real�setName�
streamlinerr�
identchars�identbodycharsr�ipv4_addressr �_full_ipv6_address�_short_ipv6_address�
add_condition�_mixed_ipv6_address�Combine�ipv6_address�mac_address�staticmethodr0r6r;�iso8601_date�iso8601_datetime�uuidrrr?�ParseResultsrA�	OneOrMore�Literal�LineEnd�
printables�White�
FollowedBy�
_commasepitemr�
quoted_string�copy�comma_separated_list�
upcase_tokens�downcase_tokensrL�convertToInteger�convertToFloat�
convertToDate�convertToDatetime�
stripHTMLTags�upcaseTokens�downcaseTokensrrrr
r
sY��O�b#�3����!��'����4�j�!�!�)�,�=�=�>P�Q�G�D�	
�W�
���}�-�>�>�y��b�?Q�R��G�	�k��	��"�	#�	�	�,�	-��
W�	��)�)�*:�;�

�	�
�
�
+�
+�,<�
=�	>��h�z��	
�
U����7�8�	�>�C��C��(9�(9�(;�h�(F�$G�G�G��h�3�4��g��"�"�3�'�	�(�)�	��-�	 �	�	�*�	+�	�
M�	�Q�R�	��8�	9�	�	�*�	+�
�
/���o��.�
7�
7��
A�
L�
L�
N�F�G�	�.�/�	��)�	�	�	�*�	+��
4��j�.�1�:�:�<�H�J�d��V���h�~���3��*�+�4�4�]�C�J�$��j�(8�A�'=�=�G�G����	�J�#�
�*�f�4�4�5�
�	�

�j�C�*�,��6�6�
7�	8��h�#�$�	�
�%�%�S��%�|�3�=�=�>R�S���	�1�	1�4G�	G�Q�Q��	
���h�~��	�
0��E���h�}���G���S����4������4�B���h�~���$��	R���h�!�"��]��F�G�P�P�QW�X�D�5�*�\�*�*�,�/E�}�/E�/E�/G�G�N��K�3�K�3�K��K��K�$	�����
��9�*���z��5�6��e�E�l�j���S��&A�%A�A�B�C�
�	
�
���	��+�	��)��M��� �=�0�"�=���h�%�&��e� ��+>�!?�@�M�7�"�9�-@�#A�B�O�7��*	
�.�\�h�u�o�]�^&�*��6�%�N�4�#�M�3�+��7�#�M�3� �L�1�$�N�3rr
N)�core�helpersrrrrr
�vars�values�
isinstance�
ParserElement�_builtin_exprs)�vs0r�<module>r�sW���?�?��c4�c4�N
�$�%�,�,�.��.�!�*�Q�
�2N�A�.����s�A�Apython3.12/site-packages/pip/_vendor/pyparsing/__pycache__/util.cpython-312.pyc000064400000035126151732702370023257 0ustar00�

R`i�!����ddlZddlZddlZddlZddlZddlmZmZddlm	Z	m
Z
mZmZm
Z
mZed�Ze
de	��ZGd�d�Zed	�
�deded
efd��Zed	�
�deded
efd��Zed	�
�deded
efd��ZGd�d�ZGd�d�ZGd�d�ZGd�de�Zded
efd�Z	d#deeeefded
efd�Zde d
e fd�Z!ded ed
efd!�Z"d ed
e	e	geffd"�Z#y)$�N)�	lru_cache�wraps)�Callable�List�Union�Iterable�TypeVar�cast�\�C)�boundc�r�eZdZUdZgZeeed<gZeeed<dZ	e
d��Ze
d��Ze
d��Z
y)	�__config_flagsz=Internal class for defining compatibility and debugging flags�
_all_names�_fixed_names�
configurationc�>�||jvrYtj|j�d|�d|j�dtt
||��j��d�d��y||jvrt|||�ytd|j�d|����)N�.� z is z and cannot be overridden�)�
stacklevelzno such )r�warnings�warn�__name__�
_type_desc�str�getattr�upperr�setattr�
ValueError)�cls�dname�values   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/util.py�_setz__config_flags._sets����C�$�$�$��M�M��<�<�.��%���#�.�.�)9��c�'�#�u�BU�>V�>\�>\�>^�=_�+�-��
�

��C�N�N�"��C���&��x����'7�q��	�B�C�C�c�&�|j|d�S)NT�r%�r!�names  r$�<lambda>z__config_flags.<lambda>#s��3�8�8�D�$�+?r&c�&�|j|d�S)NFr(r)s  r$r+z__config_flags.<lambda>$s��C�H�H�T�5�,Ar&N)r�
__module__�__qualname__�__doc__rrr�__annotations__rr�classmethodr%�enable�disable�r&r$rrsR��G��J��S�	�� �L�$�s�)� � �J��D��D��?�
@�F��A�B�Gr&r�)�maxsize�loc�strg�returnc�z�|}d|cxkrt|�krnn
||dz
dk(rdS||jdd|�z
S)a�
    Returns current column within a string, counting newlines as line separators.
    The first column is number 1.

    Note: the default parsing behavior is to expand tabs in the input string
    before starting the parsing process.  See
    :class:`ParserElement.parse_string` for more
    information on parsing strings containing ``<TAB>`` s, and suggested
    methods to maintain a consistent view of the parsed string, the parse
    location, and line and column positions within the parsed string.
    r��
)�len�rfind)r7r8�ss   r$�colr@'sG��	
�A��C� �#�a�&� �Q�s�Q�w�Z�4�%7�1�X�S�1�7�7�4�QR�TW�CX�=X�Xr&c�.�|jdd|�dzS)a�Returns current line number within a string, counting newlines as line separators.
    The first line is number 1.

    Note - the default parsing behavior is to expand tabs in the input string
    before starting the parsing process.  See :class:`ParserElement.parse_string`
    for more information on parsing strings containing ``<TAB>`` s, and
    suggested methods to maintain a consistent view of the parsed string, the
    parse location, and line and column positions within the parsed string.
    r<rr;)�count)r7r8s  r$�linenorC8s���:�:�d�A�s�#�a�'�'r&c�v�|jdd|�}|jd|�}|dk\r||dz|S||dzdS)zh
    Returns the line of text containing loc within a string, counting newlines as line separators.
    r<rr;N)r>�find)r7r8�last_cr�next_crs    r$�linerHFsM��
�j�j��q�#�&�G��i�i��c�"�G�*1�Q�,�4��!��g�&�O�D��1���<O�Or&c��eZdZd�Zy)�_UnboundedCachec�����i��j�t�x|_���fd�}�fd�}�fd�}d|_t	j
||�|_t	j
||�|_t	j
||�|_y)Nc����|��S�Nr4��_�key�	cache_get�not_in_caches  ��r$�getz%_UnboundedCache.__init__.<locals>.getV�����S�,�/�/r&c���|�|<yrMr4)rOrPr#�caches   �r$�set_z&_UnboundedCache.__init__.<locals>.set_Ys����E�#�Jr&c�&���j�yrM)�clear)rOrVs �r$rYz'_UnboundedCache.__init__.<locals>.clear\s����K�K�Mr&)rS�objectrR�size�types�
MethodType�setrY)�selfrSrWrYrVrQrRs    @@@r$�__init__z_UnboundedCache.__init__Qst������I�I�	�+1�8�3���L�	0�	�	���	��#�#�C��.����#�#�D�$�/����%�%�e�T�2��
r&N�rr-r.r`r4r&r$rJrJPs��3r&rJc��eZdZd�Zy)�
_FifoCachec�������	�
�t�x|_�
i�t�g�z�	�j��j�t	j
t
������
fd�}����	fd�}��	�fd�}�|_tj||�|_tj||�|_
tj||�|_y)Nc����|��SrMr4rNs  ��r$rSz _FifoCache.__init__.<locals>.getnrTr&c�H��|�|<t��}��|d�|�|<yrM)�next)rOrPr#�irV�	cache_pop�keyiter�keyrings    ����r$rWz!_FifoCache.__init__.<locals>.set_qs,����E�#�J��W�
�A��g�a�j�$�'��G�A�Jr&c�H���j�t�g�z�ddyrM)rYrZ)rOrVrkr[s ���r$rYz"_FifoCache.__init__.<locals>.clearws����K�K�M� �(��d�*�G�A�Jr&)rZrRrS�pop�	itertools�cycle�ranger[r\r]r^rY)r_r[rSrWrYrVrQrirjrkrRs `   @@@@@@r$r`z_FifoCache.__init__fs����+1�8�3���L����8�*�t�#���I�I�	��I�I�	��/�/�%��+�.��	0�	�	+���	��#�#�C��.����#�#�D�$�/����%�%�e�T�2��
r&Nrar4r&r$rcrces��3r&rcc�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�LRUMemoz�
    A memoizing mapping that retains `capacity` deleted items

    The memo tracks retained items by their access order; once `capacity` items
    are retained, the least recently used item is discarded.
    c�R�||_i|_tj�|_yrM)�	_capacity�_active�collections�OrderedDict�_memory)r_�capacitys  r$r`zLRUMemo.__init__�s ��!������"�.�.�0��r&c��	|j|S#t$r-|jj|�|j|cYSwxYwrM)ru�KeyErrorrx�move_to_end�r_rPs  r$�__getitem__zLRUMemo.__getitem__�sF��	%��<�<��$�$���	%��L�L�$�$�S�)��<�<��$�$�	%�s��3A�Ac�Z�|jj|d�||j|<yrM)rxrmru�r_rPr#s   r$�__setitem__zLRUMemo.__setitem__�s$��������d�#�!����S�r&c�:�	|jj|�}t|j�|jk\r?|jjd��t|j�|jk\r�?||j|<y#t$rYywxYw)NF)�last)rurmr=rxrt�popitemr{r�s   r$�__delitem__zLRUMemo.__delitem__�s���	&��L�L�$�$�S�)�E��d�l�l�#�t�~�~�5����$�$�%�$�0��d�l�l�#�t�~�~�5� %�D�L�L�����	��	�s�B�	B�Bc�l�|jj�|jj�yrM)rurYrx)r_s r$rYz
LRUMemo.clear�s"�������������r&N)	rr-r.r/r`r~r�r�rYr4r&r$rrrr�s ���1�
%�"�&�r&rrc��eZdZdZd�Zy)�
UnboundedMemoz<
    A memoizing mapping that retains all deleted items
    c��yrMr4r}s  r$r�zUnboundedMemo.__delitem__�s��r&N)rr-r.r/r�r4r&r$r�r��s���
r&r�r?c��dD]}|j|t|z�}�|jdd�}|jdd�}t|�S)Nz\^-[]r<z\n�	z\t)�replace�_bslashr)r?�cs  r$�_escape_regex_range_charsr��sI��
��
�I�I�a��1��%���	�	�	�$���A�	�	�	�$���A��q�6�Mr&�	re_escapec�����fd��d�_tj��_d�_d�}d�}|s|}g}djt
t|���}t|�dkDr�tj|���D]�\}}t|�x}}tjtjt|g�|�d	�
�j�}||k(r|j!||���st#|�t#|�d	zk(rdnd}	|j!||��|	�||������n|D�
cgc]
}
||
���}}
dj|�Scc}
w)Nc���t|�}|�jc�_}||z
dkDrt�j��_�jS)Nr;)�ord�prevrg�counterr#)r��c_intr��is_consecutives   �r$r�z2_collapse_string_to_ranges.<locals>.is_consecutive�sL����A���$)�>�+>�+>�!���T��4�<�!��#'��(>�(>�#?�N� ��#�#�#r&r���c��|dvrd|zS|S)Nz\^-][�\r4�r�s r$�escape_re_range_charz8_collapse_string_to_ranges.<locals>.escape_re_range_char�s����=�t�a�x�/�a�/r&c��|SrMr4r�s r$�no_escape_re_range_charz;_collapse_string_to_ranges.<locals>.no_escape_re_range_char�s���r&�r)rPr;)�maxlen�-)r�rnrBr�r#�join�sortedr^r=�groupbyrgrv�deque�chain�iterrm�appendr�)r?r�r�r��retrO�chars�firstr��sepr�r�s           @r$�_collapse_string_to_rangesr��sK���$��N��&�_�_�.�N���N��0���6��
�C�
����s�1�v���A�
�1�v��z�!�)�)�!��@�H�A�u���;�&�E�D��$�$�����d�V��e�4�Q���c�e�
���}��
�
�/��6�7���I��U��a��7�b�S���
�
�+�E�2�3�C�5�9M�d�9S�8T�U��A�12�2��1�#�A�&���2�
�7�7�3�<���3s�=E�llc��g}|D]>}t|t�r|jt|���.|j	|��@|SrM)�
isinstance�list�extend�_flattenr�)r�r�rhs   r$r�r��s=��
�C�
���a����J�J�x��{�#��J�J�q�M�	�
�Jr&�compat_name�fnc�:��t�d���dttj��j�dk(rt���fd��}nt���fd��}d�j�d�|_||_�j|_t�tj�r�j|_n?t�t�r(t�d�r�jj|_nd|_�j |_t#t$|�S)	N�__func__r_rc����|g|��i|��SrMr4)r_�args�kwargsr�s   �r$�_innerz&_make_synonym_function.<locals>._inner�s���
�d�,�T�,�V�,�,r&c����|i|��SrMr4)r�r�r�s  �r$r�z&_make_synonym_function.<locals>._inners���
�t�&�v�&�&r&zDeprecated - use :class:`�`r`)rr��inspect�	signature�
parametersrrr/r0r�r\�FunctionType�__kwdefaults__�type�hasattrr`r.r
r)r�r�r�s ` r$�_make_synonym_functionr��s����

��Z��	$�B���g�'�'��+�6�6�7��:�:�	�r��	-�
�	-�
�r��	'�
�	'�3�2�;�;�-�q�C�F�N�!�F�O��/�/�F���"�e�(�(�)� "� 1� 1���	�B��	�'�"�j�"9� "��� :� :��� $����/�/�F����6�?�r&c����fd�S)zZ
    Decorator for pre-PEP8 compatibility synonyms, to link them to the new function.
    c�0��t|j��SrM)r�r)�otherr�s �r$r+z"replaced_by_pep8.<locals>.<lambda>s���/�����Cr&r4)r�s`r$�replaced_by_pep8r�s���D�Cr&)T)$r�rr\rvrn�	functoolsrr�typingrrrrr	r
�chrr�rr�intrr@rCrHrJrcrr�dictr�r��boolr�r�r�r�r�r4r&r$�<module>r�s��������&�A�A�

�b�'���C�x� ��C�C�2�3��
Y�S�
Y��
Y��
Y��
Y� �3��
(��
(�3�
(�3�
(��
(��3��P�c�P��P��P��P�3�3�*3�3�8$�$�N
�D�
������59�)��S�(�3�-�
� �)�-1�)��)�X���$��%��%��%�q�%�PD��D�x��
�A�
�6�Dr&python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/core.cpython-312.pyc000064400001012535151732702370023232 0ustar00�

R`i�l�
���UddlmZddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
mZddlmZmZddlmZddlZddlZddlZddlZddlZddlmZddlZddlZddlmZddlm Z dd	l!m"Z"dd
l#m$Z$ddl%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z.m/Z0m1Z1dd
l2�dd
l3�ddl4m5Z5m6Z6ddl7m8Z8ejrZ:e;e<fZ=ee>dfe?d<ej�dk\rddlmAZAn
Gd�d�ZAGd�de(�ZBGd�de(�ZCGd�de�ZDdeDddfd�ZEdeDddfd�ZFd�d �ZG[(d!ej4e;d"ej�e;deIfd#�ZJeJej�ej�j�d$��reG�eNeOePeQeReSeTeUeVeWeXhZYej�Z[ee\efZ]e
e5e	e5fZ^e
egefee5gefee\e5gefee;e\e5geffZ_e
egeIfee5geIfee\e5geIfee;e\e5geIffZ`ee;e\d%eagdfZbee;e\d%eIgdfZcee;e\e\d%e5eIgdfZdee;e\d%eaeIgdfZeej�ej�zZhe8j�j�Zje8j�j�Zkd&Zleld'zZmehelzZnd(j�ej�D�cgc]}|ej�vs�|��c}�Zrdasej�e?d)<d�d*�Zu	d�d+e`d,ej�e;d-eIde_fd.�Zv	d�d/e;d0e\d1d%d2eIfd3�Zw	d�d/e;d4e\d5e\d1d%d6e5d2eIfd7�Zx	d�d/e;d0e\d1d%d8ead2eIf
d9�Zyd:�ZzGd;�d%e�Z{Gd<�d=e{�Z|Gd>�d?e{�Z}Gd@�dAe}�Z~GdB�dCe}�ZGdD�dEe�Z�GdF�dGe�Z�ee{_�GdH�dIe}�Z�GdJ�dKe�Z�GdL�dMe��Z�GdN�dOe}�Z�GdP�dQe}�Z�GdR�dSe��Z�GdT�dUe}�Z�GdV�dWe}�Z�GdX�dYe}�Z�GdZ�d[e}�Z�Gd\�d]e}�Z�Gd^�d_e��Z�Gd`�dae��Z�Gdb�dce��Z�Gdd�dee��Z�Gdf�dge��Z�Gdh�die��Z�Gdj�dke��Z�Gdl�dme{�Z�Gdn�doe��Z�Gdp�dqe��Z�Gdr�dse��Z�Gdt�due��Z�Gdv�dwe{�Z�Gdx�dye��Z�Gdz�d{e��Z�Gd|�d}e��Z�Gd~�de��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d��Z�Gd��d�e��Z�e�ZHGd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�Gd��d�e��Z�d�e_de_fd��Z�e���jad��Z�e���jad��Z�e���jad��Z�e���jad��Z�e���jad��Z�e�d���jmd���Z�e�d���jmd���Z�e�d���jmd���Z�e�e�ze�ze�d�d���zZ�e�e�e�d��ze�z�Z�ed��e�d���jyd��ze�e�e�e�z���jyd��zed��zZ�d�e;de;fd��Z�de_fd��Z�d�d��Z�e�e�d��d�z��jad��Z�e�e�d��d�z��jad��Z�e�e�d��d�z�jad��e�d��d�z�jad��z��jad��Z�e�e�d�e�j��ëd�z�jadūe�d�e�j��ëd�z�jadȫze�dɫd�z�jad��ze�dʫd�z�jad��z��jad˫Z�e�d�e�j+�z��jadͫZ�e�dΫZ�e�dϫZ�eɫ�j��D�cgc]}e�|e{�s�
|��c}Z�ee{e?d�<e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�e1ez�dф�Z�e1e��d҄�Z�e1ev�dӄ�Z�e1e��dԄ�Z�ycc}wcc}w)��)�dequeN)�Any�Callable�	Generator�List�
NamedTuple�Sequence�Set�TextIO�Tuple�Union�cast)�ABC�abstractmethod)�Enum)�Iterable)�
itemgetter)�wraps)�RLock)�Path�)
�
_FifoCache�_UnboundedCache�__config_flags�_collapse_string_to_ranges�_escape_regex_range_chars�_bslash�_flatten�LRUMemo�
UnboundedMemo�replaced_by_pep8)�*)�ParseResults�_ParseResultsWithOffset)�pyparsing_unicode.�str_type)��)�cached_propertyc��eZdZd�Zdd�Zy)r)c��||_y�N)�_func)�self�funcs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/core.py�__init__zcached_property.__init__Us	���D�J�Nc�n�|j|�x}|j|jj<|Sr,)r-�__dict__�__name__)r.�instance�owner�rets    r0�__get__zcached_property.__get__Xs/��;?�:�:�h�;O�O�C�(�#�#�D�J�J�$7�$7�8��Jr2r,)r5�
__module__�__qualname__r1r9�r2r0r)r)Ts��	�	r2r)c��eZdZdZdZdZe�D��cgc]}|jd�r�|��c}}Zdj�Z
ycc}}w)�
__compat__aJ
    A cross-version compatibility configuration for pyparsing features that will be
    released in a future version. By setting values in this configuration to True,
    those features can be enabled in prior versions for compatibility development
    and testing.

    - ``collect_all_And_tokens`` - flag to enable fix for Issue #63 that fixes erroneous grouping
      of results names when an :class:`And` expression is nested within an :class:`Or` or :class:`MatchFirst`;
      maintained for compatibility, but setting to ``False`` no longer restores pre-2.3.1
      behavior
    �
compatibilityT�_z(
        collect_all_And_tokens
        N)r5r:r;�__doc__�
_type_desc�collect_all_And_tokens�locals�
startswith�
_all_names�split�_fixed_names)�.0�__s00r0r>r>]sL��
�!�J�!��%�x�B�x��r�}�}�S�/A�"�x�B�J���E�G���Cs
�A�Ar>c�H�eZdZdZdZdZdZdZdZdZ	dZ
dZe�D��cgc]}|jd�r�|��c}}ZeD��cgc]}|jd�s�|��c}}ZeD��cgc]}|jd�s�|��c}}Zedd��Zycc}}wcc}}wcc}}w)	�__diag__�
diagnosticFr@�warn�enable_debugNc�H�|jD]}|j|��yr,)�_warning_names�enable)�cls�names  r0�enable_all_warningsz__diag__.enable_all_warnings�s���&�&�D��J�J�t��'r2��returnN)r5r:r;rB�)warn_multiple_tokens_in_named_alternation�)warn_ungrouped_named_tokens_in_collection�warn_name_set_on_empty_Forward�!warn_on_parse_using_empty_Forward�warn_on_assignment_to_Forward�%warn_on_multiple_string_args_to_oneof�(warn_on_match_first_with_lshift_operator�!enable_debug_on_named_expressionsrDrErFrQ�_debug_names�classmethodrU)rIrJrTs000r0rLrLts����J�05�-�05�-�%*�"�(-�%�$)�!�,1�)�/4�,�(-�%�%�x�B�x��r�}�}�S�/A�"�x�B�J�'1�M�z�t�T�_�_�V�5L�d�z�M�N�%/�S�Z�T�4�?�?�>�3R�D�Z�S�L������C��M��Ss"�B�B�B�B�)B�BrLc�0�eZdZdZdZdZdZdZdZdZ	dZ
d	Zy
)�Diagnosticsa�
    Diagnostic configuration (all default to disabled)

    - ``warn_multiple_tokens_in_named_alternation`` - flag to enable warnings when a results
      name is defined on a :class:`MatchFirst` or :class:`Or` expression with one or more :class:`And` subexpressions
    - ``warn_ungrouped_named_tokens_in_collection`` - flag to enable warnings when a results
      name is defined on a containing expression with ungrouped subexpressions that also
      have results names
    - ``warn_name_set_on_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined
      with a results name, but has no contents defined
    - ``warn_on_parse_using_empty_Forward`` - flag to enable warnings when a :class:`Forward` is
      defined in a grammar but has never had an expression attached to it
    - ``warn_on_assignment_to_Forward`` - flag to enable warnings when a :class:`Forward` is defined
      but is overwritten by assigning using ``'='`` instead of ``'<<='`` or ``'<<'``
    - ``warn_on_multiple_string_args_to_oneof`` - flag to enable warnings when :class:`one_of` is
      incorrectly called with multiple str arguments
    - ``enable_debug_on_named_expressions`` - flag to auto-enable debug on all subsequent
      calls to :class:`ParserElement.set_name`

    Diagnostics are enabled/disabled by calling :class:`enable_diag` and :class:`disable_diag`.
    All warnings can be enabled by calling :class:`enable_all_warnings`.
    rr�r'����N)r5r:r;rArXrYrZr[r\r]r^r_r<r2r0rcrc�s9���.12�-�01�-�%&�"�()�%�$%�!�,-�)�/0�,�()�%r2rc�	diag_enumrWc�B�tj|j�y)zO
    Enable a global pyparsing diagnostic flag (see :class:`Diagnostics`).
    N)rLrRrT�ris r0�enable_diagrl�s��
�O�O�I�N�N�#r2c�B�tj|j�y)zP
    Disable a global pyparsing diagnostic flag (see :class:`Diagnostics`).
    N)rL�disablerTrks r0�disable_diagro�s��
���Y�^�^�$r2c�,�tj�y)zU
    Enable all global pyparsing diagnostic warnings (see :class:`Diagnostics`).
    N)rLrUr<r2r0rUrU�s��
� � �"r2�cmd_line_warn_options�warn_env_varc��t|�}|D]s}|dzjd�dd\}}}}}|j�jd�s|s|s|r|dk(rd}�M|j�jd�s�m|dvs�rd}�u|S)	Nz::::�:rf�i�	pyparsingT)rv�F)�boolrG�lowerrE)	rqrrrR�warn_opt�w_action�	w_message�
w_category�w_module�w_lines	         r0�_should_enable_warningsr��s����,�
�F�)��=E��=N�<U�<U��=
�
�1�=�9��)�Z��6��~�~��*�*�3�/��j�H��[�9P��F�
�^�^�
�
(�
(��
-�(�>O�2O��F�*��Mr2�PYPARSINGENABLEALLWARNINGS�
ParserElement�
0123456789�ABCDEFabcdefrw�_trim_arity_call_linec�&�������tvr�fd�Sd�d�d}txstjd��datdtd|zf������fd	�}t	�d
t	�d�j
�}||_�j|_|S)zAdecorator to trim function calls to match the arity of the targetc����|�Sr,r<)�s�l�tr/s   �r0�<lambda>z_trim_arity.<locals>.<lambda>s	���t�A�wr2rFrhrd��limit���rc����		�|�	d�}d�|S#t$rR}�r�|j}tj|d��}|d}|ddgddd�k(}~|r�	�
kr
�	dz
�	Yd}~�c�d}~wwxYw)NrTrdr�r�)�	TypeError�
__traceback__�	traceback�
extract_tb)�argsr8�te�tb�frames�
frame_summary�trim_arity_type_error�found_arityr/r��	max_limit�pa_call_line_synths       �����r0�wrapperz_trim_arity.<locals>.wrapper!s�����
��D���L�)��"���
���
����)�)�B�&�1�1�"�A�>�F�$*�2�J�M�&�r��*�+�B�/���3�7I�I�*��,� �9�,�!�Q�J�E�$���%
�s��	A+�AA&�%A&�&A+r5�	__class__)�_single_arg_builtinsr�r��
extract_stack�getattrr5rA)r/r��	LINE_DIFFr��	func_namer�r�r�s``   @@@r0�_trim_arityr�
s�����#�#�&�&�
�E��K��I�3�Z�i�6M�6M�TU�6V�WY�6Z��/��2�4I�!�4L�y�4X�Y����<��j�'�$��*D�*M�*M�N�I� �G���l�l�G�O��Nr2�fn�message�fatalc�t����|�|nd�|rtnt�t���t�����fd��}|S)aC
    Function to convert a simple predicate function that returns ``True`` or ``False``
    into a parse action. Can be used in places when a parse action is required
    and :class:`ParserElement.add_condition` cannot be used (such as when adding a condition
    to an operator level in :class:`infix_notation`).

    Optional keyword arguments:

    - ``message`` - define a custom message to be used in the raised exception
    - ``fatal`` - if True, will raise :class:`ParseFatalException` to stop parsing immediately;
      otherwise will raise :class:`ParseException`

    zfailed user-defined conditionc�@��t�|||��s
�||���yr,)rx)r�r�r��exc_typer��msgs   ���r0�paz%condition_as_parse_action.<locals>.paZs'����B�q�!�Q�K� ��1�a��%�%�!r2)�ParseFatalException�ParseExceptionr�r)r�r�r�r�r�r�s`   @@r0�condition_as_parse_actionr�FsB��� �(�'�.M�C�&+�"��H�	�R��B�
�2�Y�&��&��Ir2�instring�loc�expr�	cache_hitc��|rdnd}t|�d|�d|�dt||��dt||��dt||��dd	t||�d
z
z�d��y)Nr"rw�Match z at loc �(�,z)
  z
  � r�^)�print�lineno�col�line)r�r�r�r��
cache_hit_strs     r0�_default_start_debug_actionr�bs{��%�C�"�M�	��o�V�D�6��#��a��s�H�8M�7N�a�PS�TW�Ya�Pb�Oc�d��c�8�$�%�&���C��*�Q�.�/�0��
3�r2�startloc�endloc�toksc�R�|rdnd}t|�d|�d|j����y)Nr"rwzMatched z -> )r��as_list)r�r�r�r�r�r�r�s       r0�_default_success_debug_actionr�os-��%�C�"�M�	�]�O�8�D�6��d�l�l�n�-=�
>�?r2�excc	�b�|rdnd}t|�d|�dt|�j�d|���y)Nr"rwr�z	 failed, z	 raised: )r��typer5)r�r�r�r�r�r�s      r0�_default_exception_debug_actionr�{s7��%�C�"�M�	�]�O�6�$��y��c��1C�1C�0D�I�c�U�
S�Tr2c��y)zG'Do-nothing' debug action, to suppress debugging output during parsing.Nr<)r�s r0�null_debug_actionr����r2c'�>
�eZdZUdZdZeed<dZeed<dZ	e
ed<eded	dfd
��Zede
d	dfd��Z
ed
��ZGd�de�Zd�defd�Zded	dfd�Zd�Zd�d�Z	d�dd�dededed	dfd�Zd�d�Zd�ded	dfd�Zded	dfd �Zded	dfd!�Zded	dfd"�Zd#ed	dfd$�Z d%ed&e!d	e!fd'�Z"d%ed&e!d	e!fd(�Z#d�d)�Z$d*�Z%	d�d	e&e!e'ffd+�Z(ddd,�d%ed&e!d-ed.ed	e!f
d/�Z)d�d%ed&e!d.ed	efd0�Z*e+�Z,iZ-e.j^e&e!d1efe&e!e0e'e1fffed2<Gd3�d4e2�Z3e3�Z4e+�Z5d5d5gZ6	d�d	e&e!e'ffd6�Z7e(Z8ed�d7��Z9dZ:dZ;ed�d8��Z<e	d�dd9�d:e.jze!d	dfd;��Z>ed�dd9�d:e!d<ed	dfd=��Z?	d�dd>�d%ed?ed@ed	e'fdA�Z@eAdfdeAdB�d%edCe!dDedEedFe!d	eBe&e'e!e!fddffdG�ZCddH�d%edEed	efdI�ZDeAfdeAdB�d%edCe!dEedFe!d	e'f
dJ�ZEeAdfddK�d%edLe!dMed	eBeddffdN�ZFd�dO�ZGd�dP�ZHd�dQ�ZId�dR�ZJd�dS�ZKd�dT�ZLd�dU�ZMd�dV�ZNd�dW�ZOd�dX�ZPd�dY�ZQd�dZ�ZRd�d[�ZSdZTd\�ZUd�de.jzed	dfd]�ZVd�d^�ZWd�d_ed	dfd`�ZXd�d_ed	dfda�ZY	d�de0eZeefdbed	dfdc�Z[d�dd�Z\d�de�Z]dfe^dge_dhe`d	dfdi�Zad�djedked	dfdl�Zbecd	efdm��Zdeed	efdn��Zfded	dfdo�Zgecd	efdp��Zhd	efdq�Zid	efdr�Zjd�ds�Zkd	eldfdt�Zmdu�Znd�d�dv�Zo		d�dd>�dwe0eepeqfdxed?ed@ed	e'f
dy�Zrdz�Zsd{�Zt	d�dd>�d|ed?ed@ed	efd}�Zu								d�dddddd~�de0eelefd?ed�e.jze0defd�ed�ed�ed�e.jzevee'gefd�e.jzeqd�ed@ed�ed�ed�ed�e.jzevee'gefd	e&eele&ee0e'e1ffffd��Zw				d�d�e0eqepefd�e!d�ed�ed�ed	dfd��Zxeeye
�d����Zzeeye�d����Z{eye�d���Z|eye�d���Z}eye�d���Z~eye�d���Zeye�d���Z�eye �d���Z�eye)�d���Z�eeye>�d����Z�eeye?�d����Z�eye@�d���Z�eyeC�d���Z�eyeD�d���Z�eyeE�d���Z�eyeX�d���Z�eyeY�d���Z�eye[�d���Z�eye\�d���Z�eyea�d���Z�eyeb�d���Z�eyeg�d���Z�eyer�d���Z�eyew�d���Z�e*Z�e9Z�edZ�y)�r�z)Abstract base level parser element class.z 
	
�DEFAULT_WHITE_CHARSF�verbose_stacktraceN�_literalStringClass�charsrWc�j�|t_tD]}|js�t	|�|_�!y)a�
        Overrides the default whitespace chars

        Example::

            # default whitespace chars are space, <TAB> and newline
            Word(alphas)[1, ...].parse_string("abc def\nghi jkl")  # -> ['abc', 'def', 'ghi', 'jkl']

            # change to just treat newline as significant
            ParserElement.set_default_whitespace_chars(" \t")
            Word(alphas)[1, ...].parse_string("abc def\nghi jkl")  # -> ['abc', 'def']
        N)r�r��_builtin_exprs�copyDefaultWhiteChars�set�
whiteChars)r�r�s  r0�set_default_whitespace_charsz*ParserElement.set_default_whitespace_chars�s,��-2�
�)�#�D��)�)�"%�e�*���#r2rSc��|t_y)al
        Set class to be used for inclusion of string literals into a parser.

        Example::

            # default literal class used is Literal
            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            date_str.parse_string("1999/12/31")  # -> ['1999', '/', '12', '/', '31']


            # change to Suppress
            ParserElement.inline_literals_using(Suppress)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            date_str.parse_string("1999/12/31")  # -> ['1999', '12', '31']
        N)r�r�)rSs r0�inline_literals_usingz#ParserElement.inline_literals_using�s��(-0�
�)r2c+�<��K���fd�|D�Ed{���y7��w)z�
        Yields a sequence of class(obj, **class_kwargs) for obj in seq.

        Example::

            LPAR, RPAR, LBRACE, RBRACE, SEMI = Suppress.using_each("(){};")

        c3�0�K�|]
}�|fi������y�wr,r<)rI�obj�class_kwargsrSs  ��r0�	<genexpr>z+ParserElement.using_each.<locals>.<genexpr>�s�����<���C��,�|�,��s�Nr<)rS�seqr�s` `r0�
using_eachzParserElement.using_each�s�����=��<�<�<�s���c�z�eZdZUejeed<ejeed<ejeed<y)�ParserElement.DebugActions�	debug_try�debug_match�
debug_failN)	r5r:r;�typing�Optional�DebugStartAction�__annotations__�DebugSuccessAction�DebugExceptionActionr<r2r0�DebugActionsr��s2���?�?�#3�4�4��_�_�%7�8�8��O�O�$8�9�9r2r��savelistc��t�|_d|_d|_d|_d|_||_d|_ttj�|_d|_d|_
d|_t�|_d|_d|_d|_d|_d|_|j+ddd�|_d|_d|_g|_y)NTFrw)�list�parseAction�
failAction�
customName�_defaultName�resultsName�
saveAsList�skipWhitespacer�r�r�r�r��mayReturnEmpty�keepTabs�ignoreExprs�debug�streamlined�
mayIndexError�errmsg�modalResultsr��debugActions�callPreparse�
callDuringTry�suppress_warnings_)r.r�s  r0r1zParserElement.__init__�s���.2�f���<@���#���26��� $���"���"����m�?�?�@���%)��"�#�����
�26�&�����
� ���!������ ��� �-�-�d�D�$�?��� ���"���57��r2�warning_typec�<�|jj|�|S)aZ
        Suppress warnings emitted for a particular diagnostic on this expression.

        Example::

            base = pp.Forward()
            base.suppress_warning(Diagnostics.warn_on_parse_using_empty_Forward)

            # statement would normally raise a warning, but is now suppressed
            print(base.parse_string("x"))

        )r�append)r.rs  r0�suppress_warningzParserElement.suppress_warning�s��	
���&�&�|�4��r2c#��K�t|g�}t�}|rM|j�}||vr�|j|�|j	|j��|��|r�Lyy�w)z�General-purpose method to yield all expressions and sub-expressions
        in a grammar. Typically just for internal use.
        N)rr��popleft�add�extend�recurse)r.�to_visit�seen�curs    r0�	visit_allzParserElement.visit_all�s^�����$��=���u����"�"�$�C��d�{���H�H�S�M��O�O�C�K�K�M�*��I��s�A$A)�'A)c���tj|�}|jdd|_|jdd|_|jrt	t
j�|_|S)a7
        Make a copy of this :class:`ParserElement`.  Useful for defining
        different parse actions for the same parsing pattern, using copies of
        the original parse element.

        Example::

            integer = Word(nums).set_parse_action(lambda toks: int(toks[0]))
            integerK = integer.copy().add_parse_action(lambda toks: toks[0] * 1024) + Suppress("K")
            integerM = integer.copy().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M")

            print((integerK | integerM | integer)[1, ...].parse_string("5K 100 640K 256M"))

        prints::

            [5120, 100, 655360, 268435456]

        Equivalent form of ``expr.copy()`` is just ``expr()``::

            integerM = integer().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M")
        N)�copyr�r�r�r�r�r�r�)r.�cpys  r0rzParserElement.copy
sU��,�i�i��o���*�*�1�-����*�*�1�-����%�%� ��!B�!B�C�C�N��
r2)�listAllMatchesrT�list_all_matchesrc�2�|xs|}|j||�S)a�
        Define name for referencing matching tokens as a nested attribute
        of the returned parse results.

        Normally, results names are assigned as you would assign keys in a dict:
        any existing value is overwritten by later values. If it is necessary to
        keep all values captured for a particular results name, call ``set_results_name``
        with ``list_all_matches`` = True.

        NOTE: ``set_results_name`` returns a *copy* of the original :class:`ParserElement` object;
        this is so that the client can define a basic element, such as an
        integer, and reference it in multiple places with different names.

        You can also set results names using the abbreviated syntax,
        ``expr("name")`` in place of ``expr.set_results_name("name")``
        - see :class:`__call__`. If ``list_all_matches`` is required, use
        ``expr("name*")``.

        Example::

            date_str = (integer.set_results_name("year") + '/'
                        + integer.set_results_name("month") + '/'
                        + integer.set_results_name("day"))

            # equivalent form:
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
        )�_setResultsName)r.rTrrs    r0�set_results_namezParserElement.set_results_name's"��<(�;�+;���#�#�D�.�9�9r2c�|�|�|S|j�}|jd�r|dd}d}||_||_|S)Nr"r�T)r�endswithr�r�)r.rTr�newselfs    r0rzParserElement._setResultsNameHsK���<��K��)�)�+���=�=������9�D�!�N�"���#1�1����r2T�
break_flagc���|r"|j�d�fd�	}�|_||_|St|jd�r|jj|_|S)z�
        Method to invoke the Python pdb debugger when this element is
        about to be parsed. Set ``break_flag`` to ``True`` to enable, ``False`` to
        disable.
        c�B��ddl}|j��||||�S�Nr)�pdb�	set_trace)r�r��	doActions�callPreParser�_parseMethods     �r0�breakerz(ParserElement.set_break.<locals>.breaker\s"�����
�
��#�H�c�9�l�K�Kr2�_originalParseMethod�TT)�_parser%�hasattr)r.rr$r#s   @r0�	set_breakzParserElement.set_breakSsV�����;�;�L�
L�,8�G�(�!�D�K����t�{�{�$:�;�"�k�k�>�>����r2�fnsc��t|�dgk(r	g|_|Std�|D��std��|D�cgc]
}t	|���c}|_|jd|jdd��|_|Scc}w)a�
        Define one or more actions to perform when successfully matching parse element definition.

        Parse actions can be called to perform data conversions, do extra validation,
        update external data structures, or enhance or replace the parsed tokens.
        Each parse action ``fn`` is a callable method with 0-3 arguments, called as
        ``fn(s, loc, toks)`` , ``fn(loc, toks)`` , ``fn(toks)`` , or just ``fn()`` , where:

        - ``s``    = the original string being parsed (see note below)
        - ``loc``  = the location of the matching substring
        - ``toks`` = a list of the matched tokens, packaged as a :class:`ParseResults` object

        The parsed tokens are passed to the parse action as ParseResults. They can be
        modified in place using list-style append, extend, and pop operations to update
        the parsed list elements; and with dictionary-style item set and del operations
        to add, update, or remove any named results. If the tokens are modified in place,
        it is not necessary to return them with a return statement.

        Parse actions can also completely replace the given tokens, with another ``ParseResults``
        object, or with some entirely different object (common for parse actions that perform data
        conversions). A convenient way to build a new parse result is to define the values
        using a dict, and then create the return value using :class:`ParseResults.from_dict`.

        If None is passed as the ``fn`` parse action, all previously added parse actions for this
        expression are cleared.

        Optional keyword arguments:

        - ``call_during_try`` = (default= ``False``) indicate if parse action should be run during
          lookaheads and alternate testing. For parse actions that have side effects, it is
          important to only call the parse action once it is determined that it is being
          called as part of a successful parse. For parse actions that perform additional
          validation, then call_during_try should be passed as True, so that the validation
          code is included in the preliminary "try" parses.

        Note: the default parsing behavior is to expand tabs in the input string
        before starting the parsing process.  See :class:`parse_string` for more
        information on parsing strings containing ``<TAB>`` s, and suggested
        methods to maintain a consistent view of the parsed string, the parse
        location, and line and column positions within the parsed string.

        Example::

            # parse dates in the form YYYY/MM/DD

            # use parse action to convert toks from str to int at parse time
            def convert_to_int(toks):
                return int(toks[0])

            # use a parse action to verify that the date is a valid date
            def is_valid_date(instring, loc, toks):
                from datetime import date
                year, month, day = toks[::2]
                try:
                    date(year, month, day)
                except ValueError:
                    raise ParseException(instring, loc, "invalid date given")

            integer = Word(nums)
            date_str = integer + '/' + integer + '/' + integer

            # add parse actions
            integer.set_parse_action(convert_to_int)
            date_str.set_parse_action(is_valid_date)

            # note that integer fields are now ints, not strings
            date_str.run_tests('''
                # successful parse - note that integer fields were converted to ints
                1999/12/31

                # fail - invalid date
                1999/13/31
                ''')
        Nc3�2K�|]}t|����y�wr,)�callable)rIr�s  r0r�z1ParserElement.set_parse_action.<locals>.<genexpr>�s����2�c��x��|�c���zparse actions must be callable�call_during_tryrF)r�r��allr�r��getr�r.r*�kwargsr�s    r0�set_parse_actionzParserElement.set_parse_actionjs���V��9����!�D����
�2�c�2�2�� @�A�A�:=�>�#�B��B��#�>�D��!'���!�6�:�:�o�u�#E�"�D�����	 ?s�A=c���|xj|D�cgc]
}t|���c}z
c_|jxs"|jd|jdd��|_|Scc}w)z�
        Add one or more parse actions to expression's list of parse actions. See :class:`set_parse_action`.

        See examples in :class:`copy`.
        r/rF)r�r�rr1r2s    r0�add_parse_actionzParserElement.add_parse_action�sb��	
���s�;�s��[��_�s�;�;��!�/�/�
�6�:�:��v�z�z�/�5�A�4
������	<s�A$c
�.�|D]Z}|jjt|t|j	d��t|j	dd������\|jxs"|j	d|j	dd��|_|S)a�Add a boolean predicate function to expression's list of parse actions. See
        :class:`set_parse_action` for function call signatures. Unlike ``set_parse_action``,
        functions passed to ``add_condition`` need to return boolean success/fail of the condition.

        Optional keyword arguments:

        - ``message`` = define a custom message to be used in the raised exception
        - ``fatal`` = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise
          ParseException
        - ``call_during_try`` = boolean to indicate if this method should be called during internal tryParse calls,
          default=False

        Example::

            integer = Word(nums).set_parse_action(lambda toks: int(toks[0]))
            year_int = integer.copy()
            year_int.add_condition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later")
            date_str = year_int + '/' + integer + '/' + integer

            result = date_str.parse_string("1999/12/31")  # -> Exception: Only support years 2000 and later (at char 0),
                                                                         (line:1, col:1)
        r�r�F)r�r�r/r)r�rr��strr1rxrr2s    r0�
add_conditionzParserElement.add_condition�s���.�B����#�#�)����
�
�9� 5�6��v�z�z�'�5�9�:��
��"�/�/�
�6�:�:��v�z�z�/�5�A�4
����r2r�c��||_|S)a
        Define action to perform if parsing fails at this expression.
        Fail acton fn is a callable function that takes the arguments
        ``fn(s, loc, expr, err)`` where:

        - ``s`` = string being parsed
        - ``loc`` = location where expression match was attempted and failed
        - ``expr`` = the parse expression that failed
        - ``err`` = the exception thrown

        The function returns no value.  It may throw :class:`ParseFatalException`
        if it is desired to stop parsing immediately.)r�)r.r�s  r0�set_fail_actionzParserElement.set_fail_action�s������r2r�r�c���|js|Sd}|jD�cgc]}|j��}}|rd}|D]}		|||�\}}d}�|r�|Scc}w#t$rY�*wxYw�NTF)r�r'r�)r.r�r��
exprsFound�e�ignore_expr_fns�	ignore_fn�dummys        r0�_skipIgnorableszParserElement._skipIgnorabless�������J��
�-1�-=�-=�>�-=��1�8�8�-=��>���J�,�	���%.�x��%=�
��U�%)�
��-���
��?��&����s�A�A�	A%�$A%c���|jr|j||�}|jr5t|�}|j}||kr|||vr|dz
}||kr|||vr�|S�Nr)r�rCr��lenr�)r.r�r��instrlen�white_charss     r0�preParsezParserElement.preParsesn������&�&�x��5�C�����8�}�H��/�/�K���.�X�c�]�k�%A��q�����.�X�c�]�k�%A��
r2c�
�|gfSr,r<�r.r�r�r!s    r0�	parseImplzParserElement.parseImpl����B�w�r2c��|Sr,r<�r.r�r��	tokenlists    r0�	postParsezParserElement.postParse s���r2c
��d\}}}|j}t|�}	|s|jr�	|r|jr|j	||�}
n|}
|
}|j
jr|j
j
|||d�|js|
|	k\r	|j||
|�\}}n|j||
|�\}}nd|r|jr|j	||�}
n|}
|
}|js|
|	k\r	|j||
|�\}}n|j||
|�\}}|j|||�}t||j |j"|j$��}|j&r�|s|j(r�|rk	|j&D]Z}	||||�}|��||us�t||j |j"xrt+|tt,f�|j$��}�\ni|j&D]Z}	||||�}|��||us�t||j |j"xrt+|tt,f�|j$��}�\|r6|j
j.r |j
j/|||||d�||fS#t$rt||	|j|��wxYw#t$r[}
|j
jr|j
j|||
d�|jr|j|||
��d}
~
wwxYw#t$rt||	|j|��wxYw#t$r}td�}||�d}~wwxYw#t$r;}
|j
jr|j
j||||
d��d}
~
wwxYw#t$r}td�}||�d}~wwxYw)N�rrrdF)�asList�modalz exception raised in parse action)r�rFr�rrIr�r�r�rL�
IndexErrorr�r��	Exceptionr�rQr#r�r�r�r�r�
isinstancer�r�)r.r�r�r!r"�TRY�MATCH�FAIL�	debugging�len_instring�pre_loc�tokens_start�tokens�err�
ret_tokensr��parse_action_excr�s                  r0�
_parseNoCachezParserElement._parseNoCache$s���#���U�D��J�J�	��8�}������
��D�$5�$5�"�m�m�H�c�:�G�!�G�&���$�$�.�.��%�%�/�/��,��e�T��%�%��L�)@�X�&*�n�n�X�w�	�&R���V�#'�.�.��7�I�"N�K�C����� 1� 1��-�-��#�6����"�L��!�!�W��%<�T�"&�.�.��7�I�"N�K�C��#�n�n�X�w�	�J���V�����#�v�6��!��D�$�$�T�_�_�D�DU�DU�
�
�����d�.@�.@���"�.�.��<�%'��,�
�%K�F�
"�-�&�
�2J�)5� &� $� 0� 0�'+���(M�$.�v��d�7K�$L�&*�&7�&7�*�J�/�.�*�*�B�8�!#�H�l�J�!G��
�)�f�J�.F�%1�"� �,�,�#'�?�?�$I� *�6�L�$�3G� H�"&�"3�"3�&�
�+��� � �,�,��!�!�-�-��l�C��z�5���J����a&�X�,�X�|�T�[�[�RV�W�W�X���
��$�$�/�/��%�%�0�0� �,��c�5���?�?��O�O�H�l�D�#�F���
��$"�T�(��<����d�S�S�T��  *�<�"0�1S�"T�C�"%�+;�;��<��!���(�(�3�3��)�)�4�4�$�l�D�#�u����
��&�8�,�-O�P��!�'7�7��8�s��A*J;�J�.J;�=L"�M&�
M�!M&�$M&�)AM&�
N-�"J8�8J;�;	L�AL�L�""M�	M#�M�M#�#M&�&	N*�/6N%�%N*�-	O	�6O�O	)�raise_fatal�
do_actionsrerfc��	|j|||��dS#t$r|r�t|||j|��wxYw)N�r!r)r'r�r�r�)r.r�r�rerfs     r0�	try_parsezParserElement.try_parse�sN��	C��;�;�x��
�;�C�A�F�F��"�	C��� ��3����T�B�B�	C�s��%>c�X�	|j|||��y#ttf$rYywxYw)N�rfTF)rir�rV)r.r�r�rfs    r0�can_parse_nextzParserElement.can_parse_next�s7��	��N�N�8�S�Z�N�@����
�+�	��	�s��)�)�Forward�recursion_memosc�(�eZdZUdZeed<d�Zd�Zy)�ParserElement._CacheTypez-
        class to help type checking
        �not_in_cachec��yr,r<�r.r�s  r0r1zParserElement._CacheType.get����r2c��yr,r<rss  r0r�zParserElement._CacheType.set�rtr2N)r5r:r;rArxr�r1r�r<r2r0�
_CacheTyperp�s��	���	�	r2rvrc	���d\}}d\}}}	|||||f}
tj5tj}|j|
�}||jurdtj
|xxdz
cc<	|j
||||�}|j|
|d|dj�|f�|cddd�Stj
|xxdz
cc<|jr6|jjr 	|jj|||d��t!|t"�rG|jr9|jj$r#	|jj%||||d��|�|�t't(t*t,t*f|�}|d|dj�|d}}}|jr8|jj.r"	|jj/|||||d��||fcddd�S#t$r/}
|j|
|
j|
j���d}
~
wwxYw#t$rY��.wxYw#t$rY|�wxYw#t$rY�swxYw#1swYyxYw)N)rrrSrrT)r�rd)r��packrat_cache_lock�
packrat_cacher1rq�packrat_cache_statsrdr�r�ParseBaseExceptionr�r�r�r�r�r�rXrWr�rr�intr#r�)r.r�r�r!r"�HIT�MISSrYrZr[�lookup�cache�value�pe�loc_�resultr�s                 r0�_parseCachezParserElement._parseCache�sb���	��T�"���U�D���#�|�Y�?��
�
-�
-�!�/�/�E��I�I�f�%�E���*�*�*��1�1�$�7�1�<�7�!� �.�.�x��i��V�E��I�I�f�u�Q�x��q�����#�&F�G� �.�
-��1�1�#�6�!�;�6��:�:�$�"3�"3�"=�"=���)�)�3�3�H�c�4�SW�3�X��e�Y�/��z�z�d�&7�&7�&B�&B�!� �-�-�8�8� (�#�t�U�d�9��
 �K�%�K��U�3��c�#9�:�E�B��',�Q�x��q�����%��(�f�f���:�:�$�"3�"3�"?�"?���)�)�5�5�$�d�F�D�&�D�6���V�|�S.�
-��*���I�I�f�l�b�l�l�B�G�G�&<�=�����%����� )�!� ��K�!��%�����M.�
-�s��AI%�/G;�*I%�7=I%�5H6�2I%� I�'A%I%�
!I�.I%�;	H3�*H.�.H3�3I%�6	I�?I%�I�I%�	I�I%�I�I%�	I"�I%�!I"�"I%�%I.c���tjj�dgttj�ztjddtj
j�yr)r�ry�clearrFrzrnr<r2r0�reset_cachezParserElement.reset_cache�sO���#�#�)�)�+�01�s�S��-�-�6
�0
�
�)�)�!�,�	�%�%�+�+�-r2c��tj�dt_dt_tjt_y)a$
        Disables active Packrat or Left Recursion parsing and their memoization

        This method also works if neither Packrat nor Left Recursion are enabled.
        This makes it safe to call before activating Packrat nor Left Recursion
        to clear any previous settings.
        FN)r�r��_left_recursion_enabled�_packratEnabledrdr'r<r2r0�disable_memoizationz!ParserElement.disable_memoization�s.��	�!�!�#�05�
�-�(-�
�%�,�:�:�
�r2)�force�cache_size_limitc��|rtj�ntjrtd��|�t	�t_dt_y|dkDr!t
|��t_dt_ytd|z��)a8
        Enables "bounded recursion" parsing, which allows for both direct and indirect
        left-recursion. During parsing, left-recursive :class:`Forward` elements are
        repeatedly matched with a fixed recursion depth that is gradually increased
        until finding the longest match.

        Example::

            from pip._vendor import pyparsing as pp
            pp.ParserElement.enable_left_recursion()

            E = pp.Forward("E")
            num = pp.Word(pp.nums)
            # match `num`, or `num '+' num`, or `num '+' num '+' num`, ...
            E <<= E + '+' - num | num

            print(E.parse_string("1+2+3"))

        Recursion search naturally memoizes matches of ``Forward`` elements and may
        thus skip reevaluation of parse actions during backtracking. This may break
        programs with parse actions which rely on strict ordering of side-effects.

        Parameters:

        - ``cache_size_limit`` - (default=``None``) - memoize at most this many
          ``Forward`` elements during matching; if ``None`` (the default),
          memoize all ``Forward`` elements.

        Bounded Recursion parsing works similar but not identical to Packrat parsing,
        thus the two cannot be used together. Use ``force=True`` to disable any
        previous, conflicting settings.
        �0Packrat and Bounded Recursion are not compatibleNr)�capacityzMemo size of %sT)	r�r�r��RuntimeError�_UnboundedMemorn�_LRUMemo�NotImplementedErrorr��r�r�s  r0�enable_left_recursionz#ParserElement.enable_left_recursion	sz��H��-�-�/�
�
*�
*��Q�R�R��#�,:�,<�M�)�
15�
�-�	��
!�,4�>N�,O�M�)�15�
�-�&�&7�:J�&J�K�Kr2r�c�&�|rtj�ntjrtd��tjsOdt_|�t�t_nt|�t_tjt_	yy)a{
        Enables "packrat" parsing, which adds memoizing to the parsing logic.
        Repeated parse attempts at the same string location (which happens
        often in many complex grammars) can immediately return a cached value,
        instead of re-executing parsing/validating code.  Memoizing is done of
        both valid results and parsing exceptions.

        Parameters:

        - ``cache_size_limit`` - (default= ``128``) - if an integer value is provided
          will limit the size of the packrat cache; if None is passed, then
          the cache size will be unbounded; if 0 is passed, the cache will
          be effectively disabled.

        This speedup may break existing programs that use parse actions that
        have side-effects.  For this reason, packrat parsing is disabled when
        you first import pyparsing.  To activate the packrat feature, your
        program must call the class method :class:`ParserElement.enable_packrat`.
        For best results, call ``enable_packrat()`` immediately after
        importing pyparsing.

        Example::

            from pip._vendor import pyparsing
            pyparsing.ParserElement.enable_packrat()

        Packrat parsing works similar but not identical to Bounded Recursion parsing,
        thus the two cannot be used together. Use ``force=True`` to disable any
        previous, conflicting settings.
        r�TN)
r�r�r�r�r�rryrr�r'r�s  r0�enable_packratzParserElement.enable_packrat9sl��@��-�-�/�
�
2�
2��Q�R�R��,�,�,0�M�)��'�.=�.?�
�+�.8�9I�.J�
�+�#0�#<�#<�M� �
-r2)�parseAll�	parse_allr�c���|xs|}tj�|js|j�|jD]}|j��|j
s|j
�}	|j|d�\}}|r9|j||�}t�t�z}|j||�|S#t$r'}tjr�|jd��d}~wwxYw)a8	
        Parse a string with respect to the parser definition. This function is intended as the primary interface to the
        client code.

        :param instring: The input string to be parsed.
        :param parse_all: If set, the entire input string must match the grammar.
        :param parseAll: retained for pre-PEP8 compatibility, will be removed in a future release.
        :raises ParseException: Raised if ``parse_all`` is set and the input string does not match the whole grammar.
        :returns: the parsed data as a :class:`ParseResults` object, which may be accessed as a `list`, a `dict`, or
          an object with attributes if the given parser includes results names.

        If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This
        is also equivalent to ending the grammar with :class:`StringEnd`\ ().

        To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are
        converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string
        contains tabs and the grammar uses parse actions that use the ``loc`` argument to index into the string
        being parsed, one can ensure a consistent view of the input string by doing one of the following:

        - calling ``parse_with_tabs`` on your grammar before calling ``parse_string`` (see :class:`parse_with_tabs`),
        - define your parse action using the full ``(s,loc,toks)`` signature, and reference the input string using the
          parse action's ``s`` argument, or
        - explicitly expand the tabs in your input string before calling ``parse_string``.

        Examples:

        By default, partial matches are OK.

        >>> res = Word('a').parse_string('aaaaabaaa')
        >>> print(res)
        ['aaaaa']

        The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children
        directly to see more examples.

        It raises an exception if parse_all flag is set and instring does not match the whole grammar.

        >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True)
        Traceback (most recent call last):
        ...
        pyparsing.ParseException: Expected end of text, found 'b'  (at char 5), (line:1, col:6)
        rN)r�r�r��
streamliner�r��
expandtabsr'rI�Empty�	StringEndr{r��with_traceback)	r.r�r�r�r?r�r`�ser�s	         r0�parse_stringzParserElement.parse_stringes���Z�(����!�!�#�����O�O���!�!�A�
�L�L�N�"��}�}��*�*�,�H�
	��+�+�h��2�K�C����m�m�H�c�2���W�y�{�*���	�	�(�C�(��M��"�	/��/�/���(�(��.�.��	/�s�5AC�	C7�"C2�2C7)r��
maxMatches�max_matches�overlapr�r�c#��K�t||�}|js|j�|jD]}|j��|jst|�j
�}t|�}d}|j}	|j}
tj�d}	||kr}||krw	|	||�}|
||d��\}
}|
|kDrG|dz
}|rt|j�||
d��|||
f��|r|	||�}||kDr|
}n|dz
}n	|
}n|dz}	||kr||kr�uyyyy#t$rdz}Y�wxYw#t$r'}tj r�|j#d��d}~wwxYw�w)at
        Scan the input string for expression matches.  Each match will return the
        matching tokens, start location, and end location.  May be called with optional
        ``max_matches`` argument, to clip scanning after 'n' matches are found.  If
        ``overlap`` is specified, then overlapping matches will be reported.

        Note that the start and end locations are reported relative to the string
        being parsed.  See :class:`parse_string` for more information on parsing
        strings with embedded tabs.

        Example::

            source = "sldjf123lsdjjkf345sldkjf879lkjsfd987"
            print(source)
            for tokens, start, end in Word(alphas).scan_string(source):
                print(' '*start + '^'*(end-start))
                print(' '*start + tokens[0])

        prints::

            sldjf123lsdjjkf345sldkjf879lkjsfd987
            ^^^^^
            sldjf
                    ^^^^^^^
                    lsdjjkf
                              ^^^^^^
                              sldkjf
                                       ^^^^^^
                                       lkjsfd
        rF�r"r)r`�start�endN)�minr�r�r�r�r8r�rFrIr'r��
resetCacher�rTr�r{r�r�)r.r�r�r�r�r�r?rGr��
preparseFn�parseFn�matches�preloc�nextLocr`�nextlocr�s                 r0�scan_stringzParserElement.scan_string�s�����N��[�1�
�����O�O���!�!�A�
�L�L�N�"��}�}��8�}�/�/�1�H��x�=�����]�]�
��+�+��� � �"���$	/���/�g�
�&:�)�",�X�s�";�F�'.�h��U�&S�O�G�V���}��1��� �!�.4�m�m�o�-3�+2�!"��%�f�g�5�5�"�&0��3�&?�G�&��}�&-�� #�q���")�C�$�q�j��;��/�g�
�&:�/�&:�/��&�%� �1�*�C�%��0"�	/��/�/���(�(��.�.��	/�sO�B*E7�-
E�8D0�AE�,E7�0E�>E�E�E�	E4�
"E/�/E4�4E7�r�c�x�g}d}d|_	|j||��D]�\}}}|j|||�|rgt|t�r||j�z
}nCt|t�r"t|t�s|j|�n|j|�|}��|j||d�|D�cgc]}|s�|��	}}djt|�D�cgc]
}t|���c}�Scc}wcc}w#t$r'}	tjr�|	jd��d}	~	wwxYw)ab
        Extension to :class:`scan_string`, to modify matching text with modified tokens that may
        be returned from a parse action.  To use ``transform_string``, define a grammar and
        attach a parse action to it that modifies the returned token list.
        Invoking ``transform_string()`` on a target string will then scan for matches,
        and replace the matched text patterns according to the logic in the parse
        action.  ``transform_string()`` returns the resulting transformed string.

        Example::

            wd = Word(alphas)
            wd.set_parse_action(lambda toks: toks[0].title())

            print(wd.transform_string("now is the winter of our discontent made glorious summer by this sun of york."))

        prints::

            Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York.
        rTr�Nrw)r�r�rrXr#r�rr&r
�joinrr8r{r�r�r�)
r.r�r��out�lastEr�r�r?�or�s
          r0�transform_stringzParserElement.transform_strings#��(������
�	/��+�+�H�E�+�B���1�a��
�
�8�E�!�,�-��!�!�\�2��q�y�y�{�*��#�A�x�0��A�x�9P��
�
�1�
��
�
�1�
���C�
�J�J�x���'�(�!�'�c��Q�1�c�C�'��7�7�H�S�M�:�M�q�C��F�M�:�;�;��(��:��!�	/��/�/���(�(��.�.��	/�s<�B3D	�C?�C?�D	�&D�8D	�?
D	�		D9�"D4�4D9c
��t||�}	t|j|||��D���cgc]\}}}|��
c}}}�Scc}}}w#t$r'}tj
r�|j
d��d}~wwxYw)a�
        Another extension to :class:`scan_string`, simplifying the access to the tokens found
        to match the given parse expression.  May be called with optional
        ``max_matches`` argument, to clip searching after 'n' matches are found.

        Example::

            # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters
            cap_word = Word(alphas.upper(), alphas.lower())

            print(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity"))

            # the sum() builtin can be used to merge results into a single ParseResults object
            print(sum(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity")))

        prints::

            [['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']]
            ['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity']
        r�N)r�r#r�r{r�r�r�)	r.r�r�r�r�r�r�r?r�s	         r0�
search_stringzParserElement.search_string3s���8��[�1�
�		/��"&�"2�"2�8�Z�u�"2�"U�V�"U�w�q�!�Q��"U�V��
��V��!�	/��/�/���(�(��.�.��	/�s'�A�
A�A�A�	A8�"A3�3A8)�includeSeparators�maxsplit�include_separatorsc#�K�|xs|}d}|j||��D]\}}}|||��|r|d��|}�||d��y�w)aT
        Generator method to split a string using the given expression as a separator.
        May be called with optional ``maxsplit`` argument, to limit the number of splits;
        and the optional ``include_separators`` argument (default= ``False``), if the separating
        matching text should be included in the split results.

        Example::

            punc = one_of(list(".,;:/-!?"))
            print(list(punc.split("This, this?, this sentence, is badly punctuated!")))

        prints::

            ['This', ' this', '', ' this sentence', ' is badly punctuated', '']
        r)r�N)r�)	r.r�r�r�r��lastr�r�r?s	         r0rGzParserElement.split[sf����..�C�1C�����'�'��h�'�G�G�A�q�!��4��"�"� ���d�
��D�	H�
�t�u�o��s�?Ac��|turt|�St|t�r|j	|�}t|t
�stSt||g�S)al
        Implementation of ``+`` operator - returns :class:`And`. Adding strings to a :class:`ParserElement`
        converts them to :class:`Literal`\ s by default.

        Example::

            greet = Word(alphas) + "," + Word(alphas) + "!"
            hello = "Hello, World!"
            print(hello, "->", greet.parse_string(hello))

        prints::

            Hello, World! -> ['Hello', ',', 'World', '!']

        ``...`` may be used as a parse expression as a short form of :class:`SkipTo`::

            Literal('start') + ... + Literal('end')

        is equivalent to::

            Literal('start') + SkipTo('end')("_skipped*") + Literal('end')

        Note that the skipped text is returned with '_skipped' as a results name,
        and to support having multiple skips in the same parser, the value returned is
        a list of all skipped text.
        )�Ellipsis�_PendingSkiprXr&r�r��NotImplemented�And�r.�others  r0�__add__zParserElement.__add__{sP��6�H����%�%��e�X�&��,�,�U�3�E��%��/�!�!��D�%�=�!�!r2c��|turt|�d�|zSt|t�r|j	|�}t|t
�stS||zS)zd
        Implementation of ``+`` operator when left operand is not a :class:`ParserElement`
        �	_skipped*)r��SkipTorXr&r�r�r�r�s  r0�__radd__zParserElement.__radd__�sV���H���6�$�<��,�t�3�3��e�X�&��,�,�U�3�E��%��/�!�!��t�|�r2c��t|t�r|j|�}t|t�stS|t
j
�z|zS)zX
        Implementation of ``-`` operator, returns :class:`And` with error stop
        )rXr&r�r�r�r��
_ErrorStopr�s  r0�__sub__zParserElement.__sub__�sE���e�X�&��,�,�U�3�E��%��/�!�!��c�n�n�&�&��.�.r2c�z�t|t�r|j|�}t|t�stS||z
S)zd
        Implementation of ``-`` operator when left operand is not a :class:`ParserElement`
        �rXr&r�r�r�r�s  r0�__rsub__zParserElement.__rsub__��8���e�X�&��,�,�U�3�E��%��/�!�!��t�|�r2c�H���|turd}n+t|t�r|ddtfk(rd|ddzdzdd}t|t�r|d}}n�t|t�r�td�|D��}|d	zdd}|d�d|df}t|dt�r?|d�:|ddk(rt	��S|ddk(rt��S�|dzt	��zSt|dt�rt|dt�r|\}}||z}ntStS|dkrtd
��|dkrtd��||cxk(rdk(rtg�S|r>��fd��|r,|dk(r
��|�z}|St�g|z��|�z}|S�|�}|S|dk(r�}|St�g|z�}|S)
a�
        Implementation of ``*`` operator, allows use of ``expr * 3`` in place of
        ``expr + expr + expr``.  Expressions may also be multiplied by a 2-integer
        tuple, similar to ``{min, max}`` multipliers in regular expressions.  Tuples
        may also include ``None`` as in:

        - ``expr*(n, None)`` or ``expr*(n, )`` is equivalent
          to ``expr*n + ZeroOrMore(expr)``
          (read as "at least n instances of ``expr``")
        - ``expr*(None, n)`` is equivalent to ``expr*(0, n)``
          (read as "0 to n instances of ``expr``")
        - ``expr*(None, None)`` is equivalent to ``ZeroOrMore(expr)``
        - ``expr*(1, None)`` is equivalent to ``OneOrMore(expr)``

        Note that ``expr*(None, n)`` does not raise an exception if
        more than n exprs exist in the input stream; that is,
        ``expr*(None, n)`` does not enforce a maximum number of expr
        occurrences.  If this behavior is desired, then write
        ``expr*(None, n) + ~expr``
        )rNNr)rr,rdrc3�4K�|]}|tur|nd���y�wr,)r�)rIr�s  r0r�z(ParserElement.__mul__.<locals>.<genexpr>�s����J�E�q�q��0�!�d�:�E���)NNz/cannot multiply ParserElement by negative valuez@second tuple value must be greater or equal to first tuple valuec�R��|dkDrt��|dz
�z�St��SrE)�Opt)�n�makeOptionalListr.s ��r0r�z/ParserElement.__mul__.<locals>.makeOptionalList�s.����q�5��t�&6�q�1�u�&=�=�>�>��t�9�$r2)	r�rX�tupler|�
ZeroOrMore�	OneOrMorer��
ValueErrorr�)r.r��minElements�optElementsr8r�s`    @r0�__mul__zParserElement.__mul__�s���*�H���E�
��u�
%�%���)��{�*B��E�!�"�I�%��/��!�4�E��e�S�!�',�a��K�
��u�
%��J�E�J�J�E��\�)�2�A�.�E��Q�x���E�!�H�
���%��(�C�(�U�1�X�-=���8�q�=�%�d�+�+���8�q�=�$�T�?�*��%��(�?�Z��-=�=�=��E�!�H�c�*�z�%��(�C�/H�+0�(��[��{�*��%�%�!�!���?��N�O�O���?��R��
��+�*��*��r�7�N�+��
%���!�#��!1�+�!>�>�C��
��t�f�{�2�3�6F�{�6S�S�C��
�
'�{�3���
�	�a�����
��4�&�;�.�/���
r2c�$�|j|�Sr,)r�r�s  r0�__rmul__zParserElement.__rmul__s���|�|�E�"�"r2c���|tur
t|d��St|t�r!|dk(rt	|�S|j|�}t|t�stSt||g�S)zP
        Implementation of ``|`` operator - returns :class:`MatchFirst`
        T)�	must_skiprw)	r�r�rXr&r�r�r�r��
MatchFirstr�s  r0�__or__zParserElement.__or__sc���H�����5�5��e�X�&���{��4�y� ��,�,�U�3�E��%��/�!�!��4��-�(�(r2c�z�t|t�r|j|�}t|t�stS||zS)zd
        Implementation of ``|`` operator when left operand is not a :class:`ParserElement`
        r�r�s  r0�__ror__zParserElement.__ror__"r�r2c��t|t�r|j|�}t|t�stSt||g�S)zH
        Implementation of ``^`` operator - returns :class:`Or`
        )rXr&r�r�r��Orr�s  r0�__xor__zParserElement.__xor__,s=���e�X�&��,�,�U�3�E��%��/�!�!��4��-� � r2c�z�t|t�r|j|�}t|t�stS||zS)zd
        Implementation of ``^`` operator when left operand is not a :class:`ParserElement`
        r�r�s  r0�__rxor__zParserElement.__rxor__6r�r2c��t|t�r|j|�}t|t�stSt||g�S)zJ
        Implementation of ``&`` operator - returns :class:`Each`
        )rXr&r�r�r��Eachr�s  r0�__and__zParserElement.__and__@s=���e�X�&��,�,�U�3�E��%��/�!�!��T�5�M�"�"r2c�z�t|t�r|j|�}t|t�stS||zS)zd
        Implementation of ``&`` operator when left operand is not a :class:`ParserElement`
        r�r�s  r0�__rand__zParserElement.__rand__Jr�r2c��t|�S)zL
        Implementation of ``~`` operator - returns :class:`NotAny`
        )�NotAny�r.s r0�
__invert__zParserElement.__invert__Ts���d�|�r2c�j�d}t�}t|t�r|j|j}}|�d}d}nHt|t
�r8t|dt�r%|d|djf|dj}}d}t|t�r|f}	t|�t|�dkDr1td	|dd
�t|�d
kDrdt|��d�nd
�d���|t|dd�z}tjt|�}|r|j|�|S#t$r||f}Y��wxYw)a�
        use ``[]`` indexing notation as a short form for expression repetition:

        - ``expr[n]`` is equivalent to ``expr*n``
        - ``expr[m, n]`` is equivalent to ``expr*(m, n)``
        - ``expr[n, ...]`` or ``expr[n,]`` is equivalent
             to ``expr*n + ZeroOrMore(expr)``
             (read as "at least n instances of ``expr``")
        - ``expr[..., n]`` is equivalent to ``expr*(0, n)``
             (read as "0 to n instances of ``expr``")
        - ``expr[...]`` and ``expr[0, ...]`` are equivalent to ``ZeroOrMore(expr)``
        - ``expr[1, ...]`` is equivalent to ``OneOrMore(expr)``

        ``None`` may be used in place of ``...``.

        Note that ``expr[..., n]`` and ``expr[m, n]`` do not raise an exception
        if more than ``n`` ``expr``\ s exist in the input stream.  If this behavior is
        desired, then write ``expr[..., n] + ~expr``.

        For repetition with a stop_on expression, use slice notation:

        - ``expr[...: end_expr]`` and ``expr[0, ...: end_expr]`` are equivalent to ``ZeroOrMore(expr, stop_on=end_expr)``
        - ``expr[1, ...: end_expr]`` is equivalent to ``OneOrMore(expr, stop_on=end_expr)``

        FN.Tr�rrrdz'only 1 or 2 index arguments supported (rfz... [�]rw�))�NoMatchrX�slicer��stopr�r&�iterr�rFr�r�_MultipleMatch�stopOn)r.�key�stop_on_defined�stop_onr8s     r0�__getitem__zParserElement.__getitem__^s=��6 ���)���c�5�!��9�9�c�h�h��C��{���"�O�
��U�
#�
�3�r�7�E�(B���F�C��F�L�L�1�3�q�6�;�;��C�"�O��c�8�$��&�C�	���I��s�8�a�<��9�#�b�q�'��Z]�^a�Zb�ef�Zf�U�3�s�8�*�TU�CV�ln�Bo�op�q��
�
�U�3�r��7�^�#���k�k�.�#�.����J�J�w���
���	���*�C�	�s�D"�"
D2�1D2c�H�|�|j|�S|j�S)a
        Shortcut for :class:`set_results_name`, with ``list_all_matches=False``.

        If ``name`` is given with a trailing ``'*'`` character, then ``list_all_matches`` will be
        passed as ``True``.

        If ``name`` is omitted, same as calling :class:`copy`.

        Example::

            # these are equivalent
            userdata = Word(alphas).set_results_name("name") + Word(nums + "-").set_results_name("socsecno")
            userdata = Word(alphas)("name") + Word(nums + "-")("socsecno")
        )rr�r.rTs  r0�__call__zParserElement.__call__�s'�����'�'��-�-��9�9�;�r2c��t|�S)z�
        Suppresses the output of this :class:`ParserElement`; useful to keep punctuation from
        cluttering up returned output.
        )�Suppressr�s r0�suppresszParserElement.suppress�s��
��~�r2�	recursivec��d|_|S)z�
        Enables the skipping of whitespace before matching the characters in the
        :class:`ParserElement`'s defined pattern.

        :param recursive: If ``True`` (the default), also enable whitespace skipping in child elements (if any)
        T�r��r.rs  r0�ignore_whitespacezParserElement.ignore_whitespace�s��#����r2c��d|_|S)a|
        Disables the skipping of whitespace before matching the characters in the
        :class:`ParserElement`'s defined pattern.  This is normally only used internally by
        the pyparsing module, but may be needed in some whitespace-sensitive grammars.

        :param recursive: If true (the default), also disable whitespace skipping in child elements (if any)
        Frrs  r0�leave_whitespacezParserElement.leave_whitespace�s��$����r2�
copy_defaultsc�B�d|_t|�|_||_|S)z8
        Overrides the default whitespace chars
        T)r�r�r�r�)r.r�rs   r0�set_whitespace_charsz"ParserElement.set_whitespace_chars�s$��#����e�*���%2��"��r2c��d|_|S)z�
        Overrides default behavior to expand ``<TAB>`` s to spaces before parsing the input string.
        Must be called before ``parse_string`` when the input grammar contains elements that
        match ``<TAB>`` characters.
        T)r�r�s r0�parse_with_tabszParserElement.parse_with_tabs�s����
��r2c��ddl}t|t�rt|�}t|t�r+||jvr|jj|�|S|jjt|j
���|S)a�
        Define expression to be ignored (e.g., comments) while doing pattern
        matching; may be called repeatedly, to define multiple comment or other
        ignorable patterns.

        Example::

            patt = Word(alphas)[1, ...]
            patt.parse_string('ablaj /* comment */ lskjd')
            # -> ['ablaj']

            patt.ignore(c_style_comment)
            patt.parse_string('ablaj /* comment */ lskjd')
            # -> ['ablaj', 'lskjd']
        rN)r�rXr&r
r�rr)r.r�r�s   r0�ignorezParserElement.ignore�ss�� 	��e�X�&��U�O�E��e�X�&��D�,�,�,�� � �'�'��.���
���#�#�H�U�Z�Z�\�$:�;��r2�start_action�success_action�exception_actionc�t�|j|xst|xst|xst�|_d|_|S)a 
        Customize display of debugging messages while doing pattern matching:

        - ``start_action`` - method to be called when an expression is about to be parsed;
          should have the signature ``fn(input_string: str, location: int, expression: ParserElement, cache_hit: bool)``

        - ``success_action`` - method to be called when an expression has successfully parsed;
          should have the signature ``fn(input_string: str, start_location: int, end_location: int, expression: ParserELement, parsed_tokens: ParseResults, cache_hit: bool)``

        - ``exception_action`` - method to be called when expression fails to parse;
          should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)``
        T)r�r�r�r�r�r�)r.rrrs    r0�set_debug_actionszParserElement.set_debug_actions�s@��$!�-�-��7�7��;�;��?� ?�
���
��
��r2�flagrc��|r*|j�D]}|j|d���|S|r!|jttt
�|Sd|_|S)a
        Enable display of debugging messages while doing pattern matching.
        Set ``flag`` to ``True`` to enable, ``False`` to disable.
        Set ``recurse`` to ``True`` to set the debug flag on this expression and all sub-expressions.

        Example::

            wd = Word(alphas).set_name("alphaword")
            integer = Word(nums).set_name("numword")
            term = wd | integer

            # turn on debugging for wd
            wd.set_debug()

            term[1, ...].parse_string("abc 123 xyz 890")

        prints::

            Match alphaword at loc 0(1,1)
            Matched alphaword -> ['abc']
            Match alphaword at loc 3(1,4)
            Exception raised:Expected alphaword (at char 4), (line:1, col:5)
            Match alphaword at loc 7(1,8)
            Matched alphaword -> ['xyz']
            Match alphaword at loc 11(1,12)
            Exception raised:Expected alphaword (at char 12), (line:1, col:13)
            Match alphaword at loc 15(1,16)
            Exception raised:Expected alphaword (at char 15), (line:1, col:16)

        The output shown is that produced by the default debug actions - custom debug actions can be
        specified using :class:`set_debug_actions`. Prior to attempting
        to match the ``wd`` expression, the debugging message ``"Match <exprname> at loc <n>(<line>,<col>)"``
        is shown. Then if the parse succeeds, a ``"Matched"`` message is shown, or an ``"Exception raised"``
        message is shown. Also note the use of :class:`set_name` to assign a human-readable name to the expression,
        which makes debugging and exception messages easier to understand - for instance, the default
        name created for the :class:`Word` expression without calling ``set_name`` is ``"W:(A-Za-z)"``.
        F)r)r�	set_debugrr�r�r�r�)r.rrr�s    r0r!zParserElement.set_debugs]��L����(�����t�U��3�)��K���"�"�+�-�/�
����D�J��r2c�\�|j�|j�|_|jSr,)r��_generateDefaultNamer�s r0�default_namezParserElement.default_nameIs+�����$� $� 9� 9� ;�D��� � � r2c��y)zg
        Child classes must define this method, which defines how the ``default_name`` is set.
        Nr<r�s r0r#z"ParserElement._generateDefaultNameOr�r2c�|�||_d|jz|_tjr|j�|S)a^
        Define name for this expression, makes debugging and exception messages clearer.

        Example::

            Word(nums).parse_string("ABC")  # -> Exception: Expected W:(0-9) (at char 0), (line:1, col:1)
            Word(nums).set_name("integer").parse_string("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)
        �	Expected )r�rTr�rLr_r!rs  r0�set_namezParserElement.set_nameUs3�����!�D�I�I�-����5�5��N�N���r2c�J�|j�|jS|jSr,)r�r$r�s r0rTzParserElement.nameds"��#'�/�/�"=�t���T�4�CT�CT�Tr2c��|jSr,�rTr�s r0�__str__zParserElement.__str__is���y�y�r2c��t|�Sr,�r8r�s r0�__repr__zParserElement.__repr__ls���4�y�r2c�"�d|_d|_|S�NT)r�r�r�s r0r�zParserElement.streamlineos����� ����r2c��gSr,r<r�s r0rzParserElement.recurset����	r2c�b�|dd|gz}|j�D]}|j|��yr,)r�_checkRecursion�r.�parseElementList�subRecCheckListr?s    r0r5zParserElement._checkRecursionws1��*�1�-���6������A�
���o�.� r2c�^�tjdtd��|jg�y)zj
        Check defined expressions for valid structure, check for infinite recursive definitions.
        �ZParserElement.validate() is deprecated, and should not be used to check for left recursionrd��
stacklevelN)�warningsrN�DeprecationWarningr5)r.�
validateTraces  r0�validatezParserElement.validate|s)��	�
�
�h���	
�
	
���R� r2�file_or_filename�encodingc��|xs|}	tjt|�}|j�}	|j|�S#t$rQtjt
|�}t
|d|��5}|j�}ddd�n#1swYnxYwY�lwxYw#t$r'}tjr�|jd��d}~wwxYw)z�
        Execute the parse expression on the given file or filename.
        If a filename is specified (instead of a file object),
        the entire file is opened, read, and closed before parsing.
        �r�rBN)r�rr�read�AttributeErrorr8�openr�r{r�r�r�)r.rArBr�r��
file_contents�fr�s        r0�
parse_filezParserElement.parse_file�s����(�y��	)�%�{�{�6�3C�D��,�1�1�3�M�
	/��$�$�]�H�=�=���	)�%�{�{�3�0@�A���&��h�?�1� !����
�@�?�?��	)��"�	/��/�/���(�(��.�.��	/�s@�*A�B"�1B�6B�	B�B	�B�B�"	C�+"C
�
Cc��||uryt|t�r|j|d��St|t�rt	|�t	|�k(Sy)NT�r�F)rXr&r�r��varsr�s  r0�__eq__zParserElement.__eq__�sI���5�=��
��x�
(��<�<���<�6�6�
��}�
-���:��e��,�,�r2c��t|�Sr,)�idr�s r0�__hash__zParserElement.__hash__�s���$�x�r2�test_stringc�h�|xr|}	|jt|�|��y#t$rYywxYw)a�
        Method for quick testing of a parser against a test string. Good for simple
        inline microtests of sub expressions while building up larger parser.

        Parameters:

        - ``test_string`` - to test against this expression for a match
        - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests

        Example::

            expr = Word(nums)
            assert expr.matches("100")
        rMTF)r�r8r{)r.rSr�r�s    r0r�zParserElement.matches�s@��"�)�	��	����c�+�.�(��C���!�	��	�s�%�	1�1)r��fullDump�printResults�failureTestsrQ�tests�comment�	full_dump�
print_results�
failure_tests�
post_parse�file�with_line_numbersrUrVrWrQc
	���ddlm}|
xr|}
|xr|}|xr|}|
xs|}
|xs|}t|t�r`t	j
t|�}t|�j}|j�j�D�cgc]
}||���}}|du}|r5t|t�r%t	j
t|�}t|�}t	j
t|�}|�tj}|j}g}g}d}td�j!t#d��j%t&�}d}|D�]�}|r|j)|d�s|r'|s%|j+|	r|j-|�n|��A|s�D|rddj/|�znd	|	r|j-|�n|g}g}	|j1|j3|��}|j5||
�
�}|xr|
}|�w	|||�}|�Kt|t6�r |j+|j9��n:|j+t
|��n|j+|j9��n"|j+|j9|���	|j+d	�|r|dj/|��|j+||f����||fScc}w#t:$ra}|j+|j9|���|j+|j<�dt|�j<�d
|���Yd}~��d}~wwxYw#t>$r�}t|t@�rdnd	}|j+|jC��|j+dt
|�z�tjDr.|jGtIjJ|jL��|xr|
}|}Yd}~��[d}~wt:$r{} |j+dt| �j<�d
| ���tjDr.|jGtIjJ| jL��|xr|
}| }Yd} ~ ���d} ~ wwxYw)a�

        Execute the parse expression on a series of test strings, showing each
        test, the parsed results or where the parse failed. Quick and easy way to
        run a parse expression against a list of sample strings.

        Parameters:

        - ``tests`` - a list of separate test strings, or a multiline string of test strings
        - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests
        - ``comment`` - (default= ``'#'``) - expression for indicating embedded comments in the test
          string; pass None to disable comment filtering
        - ``full_dump`` - (default= ``True``) - dump results as list followed by results names in nested outline;
          if False, only dump nested list
        - ``print_results`` - (default= ``True``) prints test output to stdout
        - ``failure_tests`` - (default= ``False``) indicates if these tests are expected to fail parsing
        - ``post_parse`` - (default= ``None``) optional callback for successful parse results; called as
          `fn(test_string, parse_results)` and returns a string to be added to the test output
        - ``file`` - (default= ``None``) optional file-like object to which test output will be written;
          if None, will default to ``sys.stdout``
        - ``with_line_numbers`` - default= ``False``) show test strings with line and column numbers

        Returns: a (success, results) tuple, where success indicates that all tests succeeded
        (or failed if ``failure_tests`` is True), and the results contain a list of lines of each
        test's output

        Example::

            number_expr = pyparsing_common.number.copy()

            result = number_expr.run_tests('''
                # unsigned integer
                100
                # negative integer
                -100
                # float with scientific notation
                6.02e23
                # integer with scientific notation
                1e-12
                ''')
            print("Success" if result[0] else "Failed!")

            result = number_expr.run_tests('''
                # stray character
                100Z
                # missing leading digit before '.'
                -.100
                # too many '.'
                3.14.159
                ''', failure_tests=True)
            print("Success" if result[0] else "Failed!")

        prints::

            # unsigned integer
            100
            [100]

            # negative integer
            -100
            [-100]

            # float with scientific notation
            6.02e23
            [6.02e+23]

            # integer with scientific notation
            1e-12
            [1e-12]

            Success

            # stray character
            100Z
               ^
            FAIL: Expected end of text (at char 3), (line:1, col:4)

            # missing leading digit before '.'
            -.100
            ^
            FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1)

            # too many '.'
            3.14.159
                ^
            FAIL: Expected end of text (at char 4), (line:1, col:5)

            Success

        Each test string must be on a single line. If you want to test a string that spans multiple
        lines, create a test like this::

            expr.run_tests(r"this is a test\n of strings that spans \n 3 lines")

        (Note that this is a raw string literal, you must include the leading ``'r'``.)
        r)�pyparsing_testNT�\n�
uFrwrM)�fullz	 failed: �: z(FATAL)zFAIL: zFAIL-EXCEPTION: )'�testingrarXr&r�rr8r��strip�rstrip�
splitlines�Literalr��sys�stdout�writer6�replace_withr�
quoted_stringr�rr_r�r��lstripr�r#�dumprWr5r{r��explainr�r
r��	format_tbr�)!r.rXr�rYrZr[r\r]r^r_r�rUrVrWrQra�
line_strip�	test_line�comment_specified�print_�
allResults�comments�success�NL�BOMr�r�r��pp_valuer?r�r�r�s!                                 r0�	run_testszParserElement.run_tests�s���b	,��)�	���)�	��#�5�
��#�4�}���+��	��e�X�&��K�K��U�+�E��e��*�*�J�<A�L�L�N�<U�<U�<W�X�<W�y�Z�	�*�<W�E�X�#�4�/����'�8�,� �+�+�c�7�3��!�'�*���+�+�m�W�5���<��:�:�D�����HJ�
� ����
�U�^�
,�
,�\�$�-?�
@�
G�
G�
�
V�����A� �W�_�_�Q��%>�(�ST����;L�N�4�4�Q�7�RS�����.6��t�y�y��*�*�B�7H��0�0��3�a��C��H�$
;��'�'�����
�6���*�*�1��*�A�� "�6�,�&6���(�
�#,�Q��#7��#�/�)�(�L�A� #�
�
�8�=�=�?� ;� #�
�
�3�x�=� 9��J�J�v�{�{�}�5���J�J�v�{�{��{�9�:��J�J�r�N���t�y�y��~�&����q�&�k�*�o�r�
�"�"��UY��x%���
�
�6�;�;�H�;�#=�>��
�
�(�1�1�2�)�D��G�<L�<L�;M�R�PQ�s�S������5&�
�%/��4G�%H�	�b���
�
�2�:�:�<�(��
�
�8�c�"�g�-�.� �3�3��J�J�y�2�2�2�3C�3C�D�E�!�2�l������
��
�
�-�d�3�i�.@�.@�-A��C�5�I�J� �3�3��J�J�y�2�2�3�3D�3D�E�F�!�2�l�����
�sF�K�<3M�9A5K�	M�#AL?�?M�	Q3�BO,�,Q3�8A0Q.�.Q3�output_html�vertical�show_results_names�show_groups�embedc�f�	ddlm}m}|j�||||||��}
t
|ttf�r2t|dd��5}|j||
fd	|i|���ddd�y|j||
fd	|i|���y#t$r}	t	d�|	�d}	~	wwxYw#1swYyxYw)
ag
        Create a railroad diagram for the parser.

        Parameters:

        - ``output_html`` (str or file-like object) - output target for generated
          diagram HTML
        - ``vertical`` (int) - threshold for formatting multiple alternatives vertically
          instead of horizontally (default=3)
        - ``show_results_names`` - bool flag whether diagram should show annotations for
          defined results names
        - ``show_groups`` - bool flag whether groups should be highlighted with an unlabeled surrounding box
        - ``embed`` - bool flag whether generated HTML should omit <HEAD>, <BODY>, and <DOCTYPE> tags to embed
          the resulting HTML in an enclosing HTML source
        - ``head`` - str containing additional HTML to insert into the <HEAD> section of the generated code;
          can be used to insert custom CSS styling
        - ``body`` - str containing additional HTML to insert at the beginning of the <BODY> section of the
          generated code

        Additional diagram-formatting keyword arguments can also be included;
        see railroad.Diagram class.
        r)�to_railroad�railroad_to_htmlzMmust ``pip install pyparsing[diagrams]`` to generate parser railroad diagramsN)r�r�r��diagram_kwargs�w�utf-8rEr�)�diagramr�r��ImportErrorrWr�rXr8rrHrm)r.rr�r�r�r�r3r�r��ie�railroad�	diag_files            r0�create_diagramzParserElement.create_diagram�s���@	�>�	
�������1�#�!�
���k�C��;�/��k�3��9�Y���� 0�� Q�� Q�&� Q�R�:�9�
���.�x�O�u�O��O�P��'�	��_���
��	��:�9�s#�B
�B'�
	B$�B�B$�'B0c��yr,r<r<r2r0�inlineLiteralsUsingz!ParserElement.inlineLiteralsUsing����"r2c��yr,r<r<r2r0�setDefaultWhitespaceCharsz'ParserElement.setDefaultWhitespaceChars�s��%(r2c��yr,r<r�s r0�setResultsNamezParserElement.setResultsName����!r2c��yr,r<r�s r0�setBreakzParserElement.setBreak����r2c��yr,r<r�s r0�setParseActionzParserElement.setParseAction�r�r2c��yr,r<r�s r0�addParseActionzParserElement.addParseAction�r�r2c��yr,r<r�s r0�addConditionzParserElement.addCondition����r2c��yr,r<r�s r0�
setFailActionzParserElement.setFailAction���� r2c��yr,r<r�s r0�tryParsezParserElement.tryParse�r�r2c��yr,r<r<r2r0�enableLeftRecursionz!ParserElement.enableLeftRecursion�r�r2c��yr,r<r<r2r0�
enablePackratzParserElement.enablePackrat�s��r2c��yr,r<r�s r0�parseStringzParserElement.parseString�s��r2c��yr,r<r�s r0�
scanStringzParserElement.scanString�s��r2c��yr,r<r�s r0�transformStringzParserElement.transformString����"r2c��yr,r<r�s r0�searchStringzParserElement.searchString�r�r2c��yr,r<r�s r0�ignoreWhitespacezParserElement.ignoreWhitespace���� #r2c��yr,r<r�s r0�leaveWhitespacezParserElement.leaveWhitespace�r�r2c��yr,r<r�s r0�setWhitespaceCharsz ParserElement.setWhitespaceChars	s��"%r2c��yr,r<r�s r0�
parseWithTabszParserElement.parseWithTabs	r�r2c��yr,r<r�s r0�setDebugActionszParserElement.setDebugActions	r�r2c��yr,r<r�s r0�setDebugzParserElement.setDebug		r�r2c��yr,r<r�s r0�setNamezParserElement.setName	���r2c��yr,r<r�s r0�	parseFilezParserElement.parseFile	s��r2c��yr,r<r�s r0�runTestszParserElement.runTests	r�r2�F�rWr��Tr&rVr,)�)r�r�rWr�)TF)r�F)T�#TTFNNF)r'FFF)�r5r:r;rAr�r8r�r�rxr�r��staticmethodr�r�rar�rr�r1rcrrrrrr)�ParseActionr4r6�ParseConditionr9�ParseFailActionr;r|rCrIrLrQrr#rdrirlr�recursion_lockrnr��Dictr
rW�dictrvryrxrzr�r'r�r�r�r�r�r�r�r��_MAX_INTrr�r�r�rGr�r�r�r�r�r�r�r�r�r�r�r�r��__iter__rrrrrr
rrrr�r�r�rr!�propertyr$rr#r(rTr,r/r�rrr5r@rrrKrOrRr�rr~r�r!r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��canParseNextr��defaultNamer<r2r0r�r��s�
��3�(���(�$���$� $���$��-�C�-�D�-��-�(�0�4�0�D�0��0�*�	=��	=�:�z�:�
8��8�8�[��_�� �"�<38�:�SX�:��:�+/�:�LP�:�	�:�B	��D��O��.T�[�T��T�l
�[�
��
�#�.�#��#�J�/��o�� ���#��#�� 
��
�3�
�3�
���
;?�d�	�s�L� �	!�d�V"� �

C��
C��
C�
�
C��

C�

�
C��s����$��SW���W�N�	��V�[�[�
�c�9�d�"�#�U�3��l�I�6M�0N�+N�%O�O����T��	�������a�&��
;?�/$�	�s�L� �	!�/$�b�F��.��.��O�#���;��;��15�-5�@E�-5� �/�/�#�.�-5�	
�-5��-5�^�)=�U�)=��)=�d�)=�t�)=��)=�X05�C�JO�C��C�(,�C�CG�C�	�C�P$��	Y/��"�Y/��Y/��Y/��	Y/��
Y/��Y/�
�5��s�C�/�0�$��<�	=�Y/�v@E�,/��,/��,/��,/�b$�&/�
�"�
&/��&/��&/�
�&/��
&/�
�&/�V!�#(�	� �
�����!�	�
�3��d�?�	#��@""�H�/��M�^#�)� �!��#����H�:�x�V�_�_�S�1��_��(��4��?��	�$�	�/�	�BG�	��3�s�8�S�=�)�	�:>�	�	�	���8�&��+��/�	�

��43�d�3�D�3�_�3�j�!�c�!��!�
��c����

�S�
�_�
��U�c�U��U�����#���
��o�.��/�
	!� ��	/��
/���T�6� 1�2�/��/��	/��
/�
�/�<��37��LP����+/��EI��	
��6�@C��"�#�JN�(,�"'�E#���!�"�IM�!E#��S�$�s�)�^�$�E#��E#�������';�!<�=�	E#�
�E#��
E#��E#��O�O�H�c�<�-@�#�-E�$F�G�E#��o�o�f�%�E#� �E#��E#��E#��E#��E#� �?�?�8�S�,�,?��,D�#E�F�!E#�"
�t�T�%��U�<��+B�%C� C�D�E�E�	F�#E#�T�#(�!��
5Q��6�4��,�-�5Q��5Q�!�	5Q�
�5Q��
5Q�
�5Q�r��+�,�"�-��"���2�3�(�4��(��&�'�!�(�!��i� ��!���&�'�!�(�!��&�'�!�(�!��m�$��%���o�&� �'� ��i� ��!����+�,�"�-��"���n�%��&����l�#��$���k�"��#���&�'�"�(�"��m�$��%���'�(�#�)�#��&�'�"�(�"��*�+�%�,�%��o�&� �'� ��'�(�"�)�"��i� ��!���h��� ���j�!��"���i� ��!��!�L��J��Kr2c�J��eZdZd	dedef�fd�
Zdefd�Zd
d�Zd�Z	d�Z
�xZS)r�r�r�c�>��t�|��||_||_yr,)�superr1�anchorr�)r.r�r�r�s   �r0r1z_PendingSkip.__init__	s���
�������"��r2rWc�b�t|jt�z�jdd�S)Nr��...)r8r�r��replacer�s r0r#z!_PendingSkip._generateDefaultName#	s%���4�;�;���(�)�1�1�'�5�A�Ar2c�
��t|�jd�d�}�jrEd�}�fd�}�j|�j	|�z|�j	|�z|zS�j|z|zS)Nr�r�c��|jr|jj�dgk(r|d=|jdd�yy)Nrwr�_skipped)r�r��pop)r�s r0r�z'_PendingSkip.__add__.<locals>.must_skip*	s:���z�z�Q�Z�Z�%7�%7�%9�b�T�%A��!���E�E�*�d�+�&Br2c���|jj�dddgk(r0|jd�dt�j�zdz|d<yy)Nr�rwr�z	missing <�>)r�r�r��reprr�)r�r.s �r0�	show_skipz'_PendingSkip.__add__.<locals>.show_skip/	sN����:�:�%�%�'���,���4��E�E�*�%�$/�$�t�{�{�2C�$C�c�$I�A�j�M�5r2)r�r(r�r�r6)r.r��skipperr�r�s`    r0r�z_PendingSkip.__add__&	s����/�&��-�(�(��/��<���>�>�
,�

J����g�i�8�8��C�C��)�,�,�Y�7�8���
�
�{�{�W�$�u�,�,r2c��|jSr,)r�r�s r0r/z_PendingSkip.__repr__;	s�����r2c��td��)NzBuse of `...` expression without following SkipTo target expression)rWrss  r0rLz_PendingSkip.parseImpl>	s���P�
�	
r2r�r�)r5r:r;r�rxr1r8r#r�r/rL�
__classcell__�r�s@r0r�r�	s3���#�]�#�t�#�
B�c�B�-�* �
r2r�c�.��eZdZdZ�fd�Zdefd�Z�xZS)�TokenzYAbstract :class:`ParserElement` subclass, for defining atomic
    matching patterns.
    c�&��t�|�d��y)NF�r��r�r1�r.r�s �r0r1zToken.__init__I	s���
���%��(r2rWc�,�t|�jSr,)r�r5r�s r0r#zToken._generateDefaultNameL	s���D�z�"�"�"r2)r5r:r;rAr1r8r#r�r�s@r0r�r�D	s����)�#�c�#r2r�c�*��eZdZdZ�fd�Zdd�Z�xZS)r�z(
    A token that will never match.
    c�L��t�|��d|_d|_d|_y)NTFzUnmatchable token)r�r1r�r�r�r�s �r0r1zNoMatch.__init__U	s%���
����"���"���)��r2c�2�t|||j|��r,)r�r�rKs    r0rLzNoMatch.parseImpl[	s���X�s�D�K�K��>�>r2r��r5r:r;rAr1rLr�r�s@r0r�r�P	s����*�?r2r�c�j��eZdZdZddd�dedef�fd�Zd�Zddd�dedef�fd�Zd	efd
�Zd
d�Z	�xZ
S)rja�
    Token to exactly match a specified string.

    Example::

        Literal('blah').parse_string('blah')  # -> ['blah']
        Literal('blah').parse_string('blahfooblah')  # -> ['blah']
        Literal('blah').parse_string('bla')  # -> Exception: Expected "blah"

    For case-insensitive matching, use :class:`CaselessLiteral`.

    For keyword matching (force word break before and after the matched string),
    use :class:`Keyword` or :class:`CaselessKeyword`.
    rw��matchString�match_stringr�c���|tur<|xs|}|st�|�	t�St	|�dk(rt�|�	t
�St�|�	|�SrE)rjr��__new__r�rF�_SingleCharLiteral)rSr�r�r�s   �r0r�zLiteral.__new__o	sT����'�>�&�6�,�L���w��u�-�-��<� �A�%��w��'9�:�:��w��s�#�#r2c��|jfSr,)�matchr�s r0�__getnewargs__zLiteral.__getnewargs__|	s���
�
�}�r2c���t�|��|xs|}||_t|�|_|dd|_d|jz|_d|_d|_	y)Nrr'F)
r�r1rrF�matchLen�firstMatchCharrTr�r�r��r.r�r�r�s   �r0r1zLiteral.__init__	sZ���
����"�2�l��!��
��L�)��
�*�2�A�.���!�D�I�I�-���#���"��r2rWc�,�t|j�Sr,�r�rr�s r0r#zLiteral._generateDefaultName�	����D�J�J��r2c���|||jk(r7|j|j|�r||jz|jfSt	|||j
|��r,)rrErrr�r�rKs    r0rLzLiteral.parseImpl�	sY���C�=�D�/�/�/�H�4G�4G��J�J��5
�����&��
�
�2�2��X�s�D�K�K��>�>r2�rwr�)r5r:r;rAr8r�rr1r#rLr�r�s@r0rjrj_	sR���
�
$�2�
$�3�
$�S�
$��#�R�#�S�#�s�#� �c� �?r2rjc�>��eZdZdZddd��fd�Zdefd�Zd	d�Z�xZS)
r�z,
    An empty token, will always match.
    rwr�c�@��t�|�d�d|_d|_y)NrwTF�r�r1r�r�rs   �r0r1zEmpty.__init__�	s ���
�����"���"��r2rWc��y)Nr�r<r�s r0r#zEmpty._generateDefaultName�	s��r2c�
�|gfSr,r<rKs    r0rLzEmpty.parseImpl�	rMr2r
r�)	r5r:r;rAr1r8r#rLr�r�s@r0r�r��	s%����#�r�#�
�c��r2r�c��eZdZdd�Zy)r�c�x�|||jk(r|dz|jfSt|||j|��rE)rrr�r�rKs    r0rLz_SingleCharLiteral.parseImpl�	s<���C�=�D�/�/�/���7�D�J�J�&�&��X�s�D�K�K��>�>r2Nr�)r5r:r;rLr<r2r0r�r��	s��?r2r�c
���eZdZdZedzZ			dddd�dedejede	d	ed
ejef
�fd�Z
defd
�Zdd�Ze
dd��ZeZ�xZS)�Keyworda�
    Token to exactly match a specified string as a keyword, that is,
    it must be immediately preceded and followed by whitespace or
    non-keyword characters. Compare with :class:`Literal`:

    - ``Literal("if")`` will match the leading ``'if'`` in
      ``'ifAndOnlyIf'``.
    - ``Keyword("if")`` will not; it will only match the leading
      ``'if'`` in ``'if x=1'``, or ``'if(y==2)'``

    Accepts two optional constructor arguments in addition to the
    keyword string:

    - ``ident_chars`` is a string of characters that would be valid
      identifier characters, defaulting to all alphanumerics + "_" and
      "$"
    - ``caseless`` allows case-insensitive matching, default is ``False``.

    Example::

        Keyword("start").parse_string("start")  # -> ['start']
        Keyword("start").parse_string("starting")  # -> Exception

    For case-insensitive matching, use :class:`CaselessKeyword`.
    z_$rwN�r��
identCharsr��ident_chars�caselessr�rc���t�|��|xs|}|�tj}|xs|}||_t|�|_	|d|_dt|�j�d|j��|_
d|_d|_||_|r%|j#�|_|j#�}t'|�|_y#t$rtd��wxYw)Nrz2null string passed to Keyword; use Empty() insteadr'r�F)r�r1r�DEFAULT_KEYWORD_CHARSrrFrrrVr�r�r5rTr�r�r�r�upper�
caselessmatchr�r)r.r�rrr�rr�s      �r0r1zKeyword.__init__�	s����	�����.�;�
��� �6�6�J�"�2�l��!��
��L�)��
�	S�".�q�/�D��"�$�t�*�"5�"5�!6�a��	�	�{�C���#���"��� ��
��!-�!3�!3�!5�D��#�)�)�+�J��j�/�����	S��Q�R�R�	S�s�
C�CrWc�,�t|j�Sr,rr�s r0r#zKeyword._generateDefaultName�	rr2c��|j}|}|jr�||||jzj�|jk(�rr|dk(s"||dz
j�|j
vrw|t
|�|jz
k\s,|||jzj�|j
vr||jz|jfS|dz
}||jz}n�|dz
}|dz
}n�|||jk(r|jdk(s|j|j|�r�|dk(s||dz
|j
vri|t
|�|jz
k\s|||jz|j
vr||jz|jfS|dz
}||jz}n
|dz
}|dz
}t||||��)Nrrz/, was immediately followed by keyword characterz7, keyword was immediately preceded by keyword characterz7, keyword was immediately followed by keyword character)r�rrrrrrFrrrEr�)r.r�r�r!r��errlocs      r0rLzKeyword.parseImpl�	s����������=�=���c�D�M�M�1�2�8�8�:�d�>P�>P�P��!�8�x��a��0�6�6�8����O��s�8�}�t�}�}�<�<�#�C�$�-�-�$7�8�>�>�@����W�"�T�]�]�2�D�J�J�>�>��"S�S��!$�t�}�}�!4���W�W�F� �1�W�F�
��
��!4�!4�4��M�M�Q�&��&�&�t�z�z�3�7��!�8�x��a��0����G��s�8�}�t�}�}�<�<�#�C�$�-�-�$7�8����O�"�T�]�]�2�D�J�J�>�>��U���"%�t�}�}�!4���W�W�F� �1�W�F��X�v�v�t�<�<r2c��|t_y)zX
        Overrides the default characters used by :class:`Keyword` expressions.
        N)rr)r�s r0�set_default_keyword_charsz!Keyword.set_default_keyword_chars
s��
).��%r2)rwNFr�rV)r5r:r;rA�	alphanumsrr8r�r�rxr1r#rLr�r �setDefaultKeywordCharsr�r�s@r0rr�	s�����4&��,���,0��	*��+/�*��*��_�_�S�)�*��	*��
*��O�O�C�(�*�: �c� �-=�^�.��.�7�r2rc�<��eZdZdZddd�dedef�fd�Zd	d�Z�xZS)
�CaselessLiteralaq
    Token to match a specified string, ignoring case of letters.
    Note: the matched results will always be in the case of the given
    match string, NOT the case of the input text.

    Example::

        CaselessLiteral("CMD")[1, ...].parse_string("cmd CMD Cmd10")
        # -> ['CMD', 'CMD', 'CMD']

    (Contrast with example for :class:`CaselessKeyword`.)
    rwr�r�r�c���|xs|}t�|�|j��||_d|jz|_y)Nr')r�r1r�returnStringrTr�rs   �r0r1zCaselessLiteral.__init__3
s;���"�2�l��
����+�+�-�.�(���!�D�I�I�-��r2c���||||jzj�|jk(r||jz|jfSt	|||j
|��r,)rrrr&r�r�rKs    r0rLzCaselessLiteral.parseImpl:
sV���C�#��
�
�-�.�4�4�6�$�*�*�D�����&��(9�(9�9�9��X�s�D�K�K��>�>r2r
r�)r5r:r;rAr8r1rLr�r�s@r0r$r$%
s'����.�R�.�S�.�s�.�?r2r$c�v��eZdZdZ		d
ddd�dedejededejef�fd	�Z�xZS)�CaselessKeywordz�
    Caseless version of :class:`Keyword`.

    Example::

        CaselessKeyword("CMD")[1, ...].parse_string("cmd CMD Cmd10")
        # -> ['CMD', 'CMD']

    (Contrast with example for :class:`CaselessLiteral`.)
    rwNrr�rr�rc�B��|xs|}|xs|}t�|�||d��y)NT)rr�)r.r�rr�rr�s     �r0r1zCaselessKeyword.__init__L
s-��� �.�;�
�"�2�l��
����z�D��Ar2)rwN)	r5r:r;rAr8r�r�r1r�r�s@r0r)r)@
sf���	��,0�
B�
�+/�
B��
B��_�_�S�)�
B�
�
B��O�O�C�(�
B�
Br2r)c�j��eZdZdZ	dddd�dedejedef�fd�Zd	efd
�Z	d
d�Z
�xZS)�
CloseMatcha�A variation on :class:`Literal` which matches "close" matches,
    that is, strings with at most 'n' mismatching characters.
    :class:`CloseMatch` takes parameters:

    - ``match_string`` - string to be matched
    - ``caseless`` - a boolean indicating whether to ignore casing when comparing characters
    - ``max_mismatches`` - (``default=1``) maximum number of
      mismatches allowed to count as a match

    The results from a successful parse will contain the matched text
    from the input string and the following named results:

    - ``mismatches`` - a list of the positions within the
      match_string where mismatches were found
    - ``original`` - the original match_string used to compare
      against the input string

    If ``mismatches`` is an empty list, then the match was an exact
    match.

    Example::

        patt = CloseMatch("ATCATCGAATGGA")
        patt.parse_string("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']})
        patt.parse_string("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1)

        # exact match
        patt.parse_string("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']})

        # close match allowing up to 2 mismatches
        patt = CloseMatch("ATCATCGAATGGA", max_mismatches=2)
        patt.parse_string("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']})
    rF)�
maxMismatchesrr��max_mismatchesr-c���|�|n|}t�|��||_||_d|j�d|j�d�|_||_d|_d|_y)Nr'z
 (with up to z mismatches)F)r�r1r�r-r�rr�r�)r.r�r.r-rr�s     �r0r1zCloseMatch.__init__|
sh���+9�*D��-�
�
����(���*���!�$�"3�"3�!6�m�D�DV�DV�CW�Wc�d��� ��
�"���#��r2rWc�J�t|�j�d|j��S)Nrt)r�r5r�r�s r0r#zCloseMatch._generateDefaultName�
s%���t�*�%�%�&�a��(9�(9�'<�=�=r2c��|}t|�}|t|j�z}||kr�|j}d}g}	|j}
tt	||||��D]]\}}|\}}
|j
r |j
�|
j
�}
}||
k7s�=|	j|�t|	�|
kDs�]n&||zdz}t|||g�}||d<|	|d<||fSt|||j|��)Nrr�original�
mismatches)rFr�r-�	enumerate�ziprryrr#r�r�)r.r�r�r!r�rG�maxlocr��match_stringlocr3r-�s_m�src�mat�resultss               r0rLzCloseMatch.parseImpl�
s�����x�=����T�.�.�/�/���X���,�,�L��O��J� �.�.�M�(1��H�S��(�,�7�)�$������S��=�=�"�y�y�{�C�I�I�K��C��#�:��%�%�o�6��:���6��)��o�-��1��&���s�(;�'<�=��&2��
�#�(2���%��G�|�#��X�s�D�K�K��>�>r2r,r�)r5r:r;rAr8r�r�r|r1r#rLr�r�s@r0r,r,Y
sV��� �J04�$�
��
$��$�����,�$�
�$�">�c�>�?r2r,c�
��eZdZdZ							dddddd�dedejededed	ed
edejedejed
ejededejef�fd�Z	defd�Z
dd�Zdd�Z�xZ
S)�Worda:Token for matching words composed of allowed character sets.

    Parameters:

    - ``init_chars`` - string of all characters that should be used to
      match as a word; "ABC" will match "AAA", "ABAB", "CBAC", etc.;
      if ``body_chars`` is also specified, then this is the string of
      initial characters
    - ``body_chars`` - string of characters that
      can be used for matching after a matched initial character as
      given in ``init_chars``; if omitted, same as the initial characters
      (default=``None``)
    - ``min`` - minimum number of characters to match (default=1)
    - ``max`` - maximum number of characters to match (default=0)
    - ``exact`` - exact number of characters to match (default=0)
    - ``as_keyword`` - match as a keyword (default=``False``)
    - ``exclude_chars`` - characters that might be
      found in the input ``body_chars`` string but which should not be
      accepted for matching ;useful to define a word of all
      printables except for one or two characters, for instance
      (default=``None``)

    :class:`srange` is useful for defining custom character set strings
    for defining :class:`Word` expressions, using range notation from
    regular expression character sets.

    A common mistake is to use :class:`Word` to match a specific literal
    string, as in ``Word("Address")``. Remember that :class:`Word`
    uses the string argument to define *sets* of matchable characters.
    This expression would match "Add", "AAA", "dAred", or any other word
    made up of the characters 'A', 'd', 'r', 'e', and 's'. To match an
    exact literal string, use :class:`Literal` or :class:`Keyword`.

    pyparsing includes helper strings for building Words:

    - :class:`alphas`
    - :class:`nums`
    - :class:`alphanums`
    - :class:`hexnums`
    - :class:`alphas8bit` (alphabetic characters in ASCII range 128-255
      - accented, tilded, umlauted, etc.)
    - :class:`punc8bit` (non-alphabetic characters in ASCII range
      128-255 - currency, symbols, superscripts, diacriticals, etc.)
    - :class:`printables` (any non-whitespace character)

    ``alphas``, ``nums``, and ``printables`` are also defined in several
    Unicode sets - see :class:`pyparsing_unicode``.

    Example::

        # a word composed of digits
        integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9"))

        # a word with a leading capital, and zero or more lowercase
        capital_word = Word(alphas.upper(), alphas.lower())

        # hostnames are alphanumeric, with leading alpha, and '-'
        hostname = Word(alphas, alphanums + '-')

        # roman numeral (not a strict parser, accepts invalid mix of characters)
        roman = Word("IVXLCDM")

        # any string of non-whitespace characters, except for ','
        csv_value = Word(printables, exclude_chars=",")
    NF)�	initChars�	bodyChars�	asKeyword�excludeChars�
init_chars�
body_charsr��max�exact�
as_keyword�
exclude_charsr>r?r@rAc�f��|xs|}|	xs|}	|
xs|}
|xs|}t�|��|s"tdt|�j�d���t|�}|r/t|�}
||
z}|	rdj
t|	�|
z
�}	||_dj
t|��|_	|	r0t|	�|_
dj
t|	��|_n||_
|j|_|dkD|_|dkrtd��|jr||kDrtd|�d|�d	���||_
|dkDr||_nt|_|dkDr|x}}||_||_
d
|j z|_d|_|
|_|j&r|xj"dz
c_d
|j|jzv�r�t)|j�dk(r t+j,|j�}ndt/|j��d�}|j|jk(rx|dk(rd}nd|dk(rd}n\|j|jk7r3d|j�d|jtk(rdn|j�d�}nd|j�d�}|�|��|_ns|dk(rd}d}n\dt/|j��d�}|dk(rd}n;|dk(r
|dkrdnd}n,||k7rd|dkDr|dz
nd�d|dz
�d�}nd|dkDr|dz
nd�d�}|�|�|��|_|j&rd|j0�d�|_	t+j2|j0�|_|j*j4|_|j8|_yy#t*j<$r
d|_YywxYw)Nzinvalid z", initChars cannot be empty stringrwrrzUcannot specify a minimum length < 1; use Opt(Word()) if zero-length word is permittedzDinvalid args, if min and max both specified min must be <= max (min=z, max=r�r'Fz
 as a keywordr��[r��+�{r��}r"rd�?z\b)r�r1r�r�r5r�r�r>�sorted�
initCharsOrigr?�
bodyCharsOrig�maxSpecified�minLen�maxLenr�rTr�r�r@rF�re�escaper�reString�compiler�re_match�parseImpl_regexrL�error)r.rBrCr�rDrErFrGr>r?r@rA�
initChars_set�excludeChars_set�re_leading_fragment�repeat�re_body_fragmentr�s                 �r0r1z
Word.__init__�
s�����+��	��+��	��+��	�#�4�}��
�������4��:�.�.�/�/Q�R��
��I��
��"�<�0���-�-�M���G�G�C�	�N�5E�$E�F�	�&����W�W�V�M�%:�;���� ��^�D�N�!#����	�):�!;�D��*�D�N�!%�!3�!3�D���!�G�����7��g��
�����s���V�WZ�V[�[a�be�af�fg�h��
������7��D�K�"�D�K��1�9���C�#��D�K��D�K�!�D�I�I�-���"���"����>�>��K�K�?�*�K��t�~�~����6�7��4�>�>�"�a�'�&(�i�i��0B�0B�&C�#�()�*D�T�^�^�*T�)U�UV�&W�#��~�~����/��!�8� �F��A�X��F��{�{�d�k�k�1�#%�d�k�k�]�!�$�+�+��:Q�B�W[�Wb�Wb�3c�ce�!f��#%�d�k�k�]�"�!5��#6�"7��x� @��
��!�8�')�$��F�)*�+E�d�n�n�+U�*V�VW�'X�$��a�x�!$�����(+�q���b���#�:�')�S�1�W�#��'�!�)D�A�c�A�g�Y�b�%Q�F�')�S�1�W�#��'�!�)D�B�%G�F�+�+�0@�/A�f�X�N��
��~�~�#%�d�m�m�_�B� 7��
�
6��*�*�T�]�]�3���!%���
�
��
�!%�!5�!5���]8��T�8�8�
����
�s�$N�N0�/N0rWc��d�}|j|jk7r*d||j��d||j��d�}nd||j��d�}|jdkDs|jtk7r�|j|jk(r'|jdk(r|ddS|d|j�d�zS|jtk(r|d|j�d	�zS|d|j�d
|j�d�zS|S)Nc�V�d}t|d��}t|�|kDr|d|dz
dzS|S)N�F)�	re_escaper'r�)rrF)r��max_repr_lens  r0�
charsAsStrz-Word._generateDefaultName.<locals>.charsAsStrls<���L�*�1��>�A��1�v��$��+�<�!�+�,�u�4�4��r2zW:(�, r�rrdrKrLz,...}r�)r>r?rRrSr�)r.re�bases   r0r#zWord._generateDefaultNameks���	��>�>�T�^�^�+���D�N�N�3�4�B�z�$�.�.�7Q�6R�RS�T�D���D�N�N�3�4�A�6�D��;�;��?�d�k�k�X�5��{�{�d�k�k�)��;�;�!�#����8�O��B�t�{�{�m�2�"6�6�6�����(���4�;�;�-�v�6�6�6���4�;�;�-�q����
�R�@�@�@��r2c��|||jvrt|||j|��|}|dz
}t|�}|j}||j
z}t
||�}||kr|||vr|dz
}||kr|||vr�d}||z
|jkrd}nD|jr||kr
|||vrd}n)|jr|dkDr
||dz
|vs||kr	|||vrd}|rt|||j|��||||fS)NrFTr)
r>r�r�rFr?rSr�rRrQr@)	r.r�r�r!r�rG�	bodycharsr6�throwExceptions	         r0rLzWord.parseImpl�s,���C�=����.� ��3����T�B�B����q����x�=���N�N�	�����$���V�X�&���F�l�x��}�	�9��1�H�C��F�l�x��}�	�9�����;����$�!�N�
�
�
�3��>�h�s�m�y�6P�!�N�
�^�^���	��U�Q�Y�'�9�4���>��S�M�Y�.�!%��� ��3����T�B�B��H�U�3�'�'�'r2c��|j||�}|st|||j|��|j�}||j	�fSr,)rXr�r�r��group)r.r�r�r!r�s     r0rYzWord.parseImpl_regex�sF�����x��-��� ��3����T�B�B��j�j�l���F�L�L�N�"�"r2)rwNrrrFNr�)r5r:r;rAr8r�r�r|rxr1r#rLrYr�r�s@r0r=r=�
s����@�H�+/���� �.2�v6�+/�*.��-1�v6��v6��O�O�C�(�v6��	v6�
�v6��
v6��v6����s�+�v6��?�?�3�'�v6��?�?�3�'�v6��v6��o�o�c�*�v6�p�c��6(�@#r2r=c
�z��eZdZdZ		dddd�dededejeded	ejef
�fd
�Z�xZ	S)�Charz�A short-cut class for defining :class:`Word` ``(characters, exact=1)``,
    when defining a match of any single character in a string of
    characters.
    FN)r@rA�charsetrFrGr@rAc�D��|xs|}|xs|}t�|�|d||��y)Nr)rErFrGr�)r.rorFrGr@rAr�s      �r0r1z
Char.__init__�s4����+��	�#�4�}��
����1��,�	�	
r2)FN)
r5r:r;rAr8rxr�r�r1r�r�s@r0rnrn�si����!�.2�	

� �-1�

��

��

����s�+�	

��


��o�o�c�*�

�

r2rnc����eZdZdZ			dddd�dedeejefde	de	de	d	e	f�fd
�Z
ed��Zed��Zed
��Z
defd�Zdd�Zdd�Zdd�Zdedefd�Z�xZS)�Regexa�Token for matching strings that match a given regular
    expression. Defined with string specifying the regular expression in
    a form recognized by the stdlib Python  `re module <https://docs.python.org/3/library/re.html>`_.
    If the given regex contains named groups (defined using ``(?P<name>...)``),
    these will be preserved as named :class:`ParseResults`.

    If instead of the Python stdlib ``re`` module you wish to use a different RE module
    (such as the ``regex`` module), you can do so by building your ``Regex`` object with
    a compiled RE that was compiled using ``regex``.

    Example::

        realnum = Regex(r"[+-]?\d+\.\d*")
        # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression
        roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})")

        # named fields in a regex will be returned as named results
        date = Regex(r'(?P<year>\d{4})-(?P<month>\d\d?)-(?P<day>\d\d?)')

        # the Regex class will accept re's compiled using the regex module
        import regex
        parser = pp.Regex(regex.compile(r'[0-9]'))
    F)�asGroupList�asMatch�pattern�flags�
as_group_list�as_matchrsrtc�
��t�|��|xs|}|xs|}t|t�r*|st	d��d|_|x|_|_||_nJt|d�r3t|d�r'||_|jx|_|_||_ntd��d|jz|_d|_
||_||_|jr|j |_|jr|j$|_yy)aThe parameters ``pattern`` and ``flags`` are passed
        to the ``re.compile()`` function as-is. See the Python
        `re module <https://docs.python.org/3/library/re.html>`_ module for an
        explanation of the acceptable patterns and flags.
        z0null string passed to Regex; use Empty() insteadNrurzCRegex may only be constructed with a string or a compiled RE objectr'F)r�r1rXr&r��_rerVrurvr(r�rTr�r�rsrt�parseImplAsGroupListrL�parseImplAsMatch)r.rurvrwrxrsrtr�s       �r0r1zRegex.__init__�s����	����!�2�]���%�X���g�x�(�� �!S�T�T��D�H�+2�2�D�M�D�L��D�J�
�W�i�
(�W�W�g�-F��D�H�+2�?�?�:�D�L�4�=��D�J��U��
�"�D�I�I�-���"���&���������!�6�6�D�N��<�<�!�2�2�D�N�r2c���|jr|jS	tj|j|j�S#tj
$rt
d|j�d���wxYw)Nzinvalid pattern (z) passed to Regex)rzrTrWrurvrZr�r�s r0rTzRegex.resa���8�8��8�8�O�
X��z�z�$�,�,��
�
�;�;���8�8�
X� �#4�T�\�\�4D�DU�!V�W�W�
X�s�)A�-A1c�.�|jjSr,)rTrr�s r0rXzRegex.re_matchs���w�w�}�}�r2c�(�|jd�duS�Nrw)rXr�s r0r�zRegex.mayReturnEmptys���}�}�R� ��,�,r2rWc�j�djt|j�jdd��S)NzRe:({})z\\�\)�formatr�rur�r�s r0r#zRegex._generateDefaultNames)������T�\�\� 2� :� :�6�4� H�I�Ir2c��|j||�}|st|||j|��|j�}t	|j��}|j
�}|r|j�D]
\}}|||<�||fSr,)rXr�r�r�r#rl�	groupdict�items)	r.r�r�r!r�r8�d�k�vs	         r0rLzRegex.parseImpl!s|�����x��-��� ��3����T�B�B��j�j�l���6�<�<�>�*�����������	���1���A��"��C�x�r2c��|j||�}|st|||j|��|j�}|j	�}||fSr,)rXr�r�r��groups�r.r�r�r!r�r8s      r0r{zRegex.parseImplAsGroupList.sI�����x��-��� ��3����T�B�B��j�j�l���m�m�o���C�x�r2c��|j||�}|st|||j|��|j�}|}||fSr,)rXr�r�r�r�s      r0r|zRegex.parseImplAsMatch7sC�����x��-��� ��3����T�B�B��j�j�l�����C�x�r2�replc������jrtd���jrt��rtd���jr�fd�}n��fd�}�j	|�S)a�
        Return :class:`Regex` with an attached parse action to transform the parsed
        result as if called using `re.sub(expr, repl, string) <https://docs.python.org/3/library/re.html#re.sub>`_.

        Example::

            make_html = Regex(r"(\w+):(.*?):").sub(r"<\1>\2</\1>")
            print(make_html.transform_string("h1:main title:"))
            # prints "<h1>main title</h1>"
        z/cannot use sub() with Regex(as_group_list=True)z:cannot use sub() with a callable with Regex(as_match=True)c�,��|dj��Sr)�expand)r`r�s �r0r�zRegex.sub.<locals>.paUs����a�y�'�'��-�-r2c�B���jj�|d�Sr)rT�sub)r`r�r.s ��r0r�zRegex.sub.<locals>.paZs����w�w�{�{�4����3�3r2)rsr�rtr-r6)r.r�r�s`` r0r�z	Regex.sub@s]�������M�N�N��<�<�H�T�N��L��
��<�<�
.�

4��$�$�R�(�(r2)rFFr�)r5r:r;rArr
rT�	RegexFlagr|rxr1r)rXr�r8r#rLr{r|r�r�r�r�s@r0rrrr�s�����6+,�#��,3�"��,3��,3��R�\�\�3�&�'�,3��	,3�
�,3��,3��,3�\�X��X������-��-�J�c�J����)��)�
�)r2rrc�8��eZdZdZed�Z							dddddddd�dedejed	ejed
e	de	dejed
e	dedejedejede	dejede	f�fd�Z
defd�Zdd�Z�xZ
S)�QuotedStringa
    Token for matching strings that are delimited by quoting characters.

    Defined with the following parameters:

    - ``quote_char`` - string of one or more characters defining the
      quote delimiting string
    - ``esc_char`` - character to re_escape quotes, typically backslash
      (default= ``None``)
    - ``esc_quote`` - special quote sequence to re_escape an embedded quote
      string (such as SQL's ``""`` to re_escape an embedded ``"``)
      (default= ``None``)
    - ``multiline`` - boolean indicating whether quotes can span
      multiple lines (default= ``False``)
    - ``unquote_results`` - boolean indicating whether the matched text
      should be unquoted (default= ``True``)
    - ``end_quote_char`` - string of one or more characters defining the
      end of the quote delimited string (default= ``None``  => same as
      quote_char)
    - ``convert_whitespace_escapes`` - convert escaped whitespace
      (``'\t'``, ``'\n'``, etc.) to actual whitespace
      (default= ``True``)

    Example::

        qs = QuotedString('"')
        print(qs.search_string('lsjdf "This is the quote" sldjf'))
        complex_qs = QuotedString('{{', end_quote_char='}}')
        print(complex_qs.search_string('lsjdf {{This is the "quote"}} sldjf'))
        sql_qs = QuotedString('"', esc_quote='""')
        print(sql_qs.search_string('lsjdf "This is the quote with ""embedded"" quotes" sldjf'))

    prints::

        [['This is the quote']]
        [['This is the "quote"']]
        [['This is the quote with "embedded" quotes']]
    ))z\t�	)rbrc)z\f�)z\r�
rwNT)�	quoteChar�escChar�escQuote�unquoteResults�endQuoteChar�convertWhitespaceEscapes�
quote_char�esc_char�	esc_quote�	multiline�unquote_results�end_quote_char�convert_whitespace_escapesr�r�r�r�r�r�c
����t����|	xs|}	|
xs|}
|xr|}|xs|}|
xr|}
|xs|}|j�}|std��|�|}n|j�}|std��|�_t|��_|d�_|�_t|��_	|	xsd�_
|
xsd�_|�_|
�_
|�_d}d}|
r ||�dtj |
��d�z
}d}|	r=||�dtj |	��d�z
}d}tj |	�d	z�_t�j�d
kDrI||�d�dj%�fd�t't�j�d
z
dd�D��zdzz
}d}tj(d��_|rWtj,tj.z�_||�d
t1�jd��|	�t1|	�nd�d�z
}n1||�d
t1�jd��d|	�t1|	�nd�d�z
}dj%tj �j�d|dtj �j�g��_�jr��jrktj4ddj%d��j6D���dtj �j��d��j*���_nGtj4dtj �j��d��j*���_	tj4�j2�j*��_�j2�_�jj<�_d�jBz�_"d�_#d�_$y#tj@$rtd�j2�d���wxYw)Nz%quote_char cannot be the empty stringz)end_quote_char cannot be the empty stringrrw�(?:r��|z.)z(.)rc	3��K�|]M}dtj�jd|��dtj�j|d��d����Oy�w)r�Nz(?!z)))rTrUr�)rIrur.s  �r0r�z(QuotedString.__init__.<locals>.<genexpr>�sY������E���"�)�)�D�$5�$5�b�q�$9�:�;�3�r�y�y��IZ�IZ�[\�[]�I^�?_�>`�`b�c�E�s�AAr�z(?:[^z])z\n\rz)*r�c3�FK�|]}tj|����y�wr,)rTrU)rIr�s  r0r�z(QuotedString.__init__.<locals>.<genexpr>�s����!D��1�"�)�)�A�,��s�!z)|(z	.)|(\n|.)�rvzinvalid pattern z passed to Regexr'FT)%r�r1rgr�r�rF�quoteCharLen�firstQuoteCharr��endQuoteCharLenr�r�r�r�r�rTrU�escCharReplacePatternr��ranger�rv�	MULTILINE�DOTALLrrurW�ws_map�unquote_scan_rerVrrXrZrTr�r�r�)r.r�r�r�r�r�r�r�r�r�r�r�r�r��sep�
inner_patternr�s`               �r0r1zQuotedString.__init__�s����"	�����%�X���(�y��'�;�O��#�5�~��$�C�)C�	!��,�*�
� �%�%�'�
���D�E�E���%�L�'�-�-�/�L�� �!L�M�M�(���!$�Z����#-�a�=���!-���$'��$5���#�M�r���%�^���
�$2���.F��%�"������
�����S����8�)<�(=�Q�?�?�M��C�����S����7�);�(<�B�?�?�M��C�)+���7�);�e�)C�D�&��t� � �!�A�%���%�s���(�(��"�3�t�'8�'8�#9�A�#=�q�"�E����
��
�M��C��\�\�!�_��
������	�	�1�D�J���5��7��8I�8I�!�8L�M�N�;B�;N�.�w�7�TV�X�XZ�\�
�M�

��5��7��8I�8I�!�8L�M�N�d�;B�;N�.�w�7�TV�X�XZ�\�
�M�
�w�w��	�	�$�.�.�)�����	�	�$�+�+�,�
�
�������,�,�')�z�z�����!D����!D�D�E�S����SW�S_�S_�I`�Ha�aj�k��*�*�(��$�
(*�z�z�����4�<�<�0�1��;�4�:�:�(��$�	R��j�j����t�z�z�:�D�G� �L�L�D�M� �G�G�M�M�D�M�"�D�I�I�-���"���"�����x�x�	R��/����/?�?O�P�Q�Q�	R�s
�!AO�-PrWc��|j|jk(r)t|jt�rd|j��Sd|j�d|j��S)Nzstring enclosed in zquoted string, starting with z
 ending with )r�r�rXr&r�s r0r#z!QuotedString._generateDefaultName
sR���>�>�T�.�.�.�:�d�n�n�h�3W�(����(:�;�;�.�t�~�~�.>�m�D�L]�L]�K^�_�_r2c���||�jk(xr�j||�xsd}|st||�j���|j	�}|j�}�jr�|�j�j}t|t�r��jr4dj�fd��jj|�D��}n1djd��jj|�D��}�jr&|j!�j�j"�}||fS)Nrwc3���K�|]i}|jd�r�j|jd�n5|jd�r|jd�dn|jd����ky�w)rrdr�r'N)rlr�)rIrr.s  �r0r�z)QuotedString.parseImpl.<locals>.<genexpr>
sl�����"�&H�E�	!�;�;�q�>����E�K�K��N�3�!�;�;�q�>�#�[�[��^�B�/�"�[�[��^�	,�
&H�s�A/A2c3�K�|]:}|jd�r|jd�dn|jd����<y�w)rr�rdN)rl)rIrs  r0r�z)QuotedString.parseImpl.<locals>.<genexpr>!
s<����"�%G�E�/4�k�k�!�n����A��r�*�%�+�+�a�.�P�%G�s�AA)r�rXr�r�r�rlr�r�r�rXr&r�r�r��finditerr�r�r�r�s`     r0rLzQuotedString.parseImpl
s$����S�M�T�0�0�0�
-��
�
�h��,�
��	�
� ��3����T�B�B��j�j�l���l�l�n������d�'�'�4�+?�+?�*?�@�C��#�x�(��0�0��'�'�"�&*�%9�%9�%B�%B�3�%G�
"��C��'�'�"�%)�%9�%9�%B�%B�3�%G�"��C��=�=��+�+�d�m�m�T�5F�5F�G�C��C�x�r2)rwNNFTNTr�)r5r:r;rAr�r�r8r�r�rxr1r#rLr�r�s@r0r�r�`s$���%�L�N�
O�F��)-�*.�� $�/3�+/�u#��(,�)-�#�-1�)-�u#��u#��/�/�#�&�u#��?�?�3�'�	u#�
�u#��
u#�����,�u#�%)�u#��u#�����%�u#��/�/�#�&�u#��u#��o�o�c�*�u#�#'�u#�n`�c�`�$r2r�c�\��eZdZdZ				d
dd�dededededef
�fd	�Zd
efd�Zdd�Z�xZ	S)�
CharsNotIna�Token for matching words composed of characters *not* in a given
    set (will include whitespace in matched characters if not listed in
    the provided exclusion set - see example). Defined with string
    containing all disallowed characters, and an optional minimum,
    maximum, and/or exact length.  The default value for ``min`` is
    1 (a minimum value < 1 is not valid); the default values for
    ``max`` and ``exact`` are 0, meaning no maximum or exact
    length restriction.

    Example::

        # define a comma-separated-value as anything that is not a ','
        csv_value = CharsNotIn(',')
        print(DelimitedList(csv_value).parse_string("dkls,lsdkjf,s12 34,@!#,213"))

    prints::

        ['dkls', 'lsdkjf', 's12 34', '@!#', '213']
    rw)�notChars�	not_charsr�rDrEr�c�\��t�|��d|_|xs||_t	|j�|_|dkrt
d��||_|dkDr||_nt|_|dkDr||_||_d|jz|_|jdk(|_d|_
y)NFrzacannot specify a minimum length < 1; use Opt(CharsNotIn()) if zero-length char group is permittedrr')r�r1r�r�r��notCharsSetr�rRrSr�rTr�r�r�)r.r�r�rDrEr�r�s      �r0r1zCharsNotIn.__init__B
s����	����#���!�-�X��
��t�}�}�-�����7��K��
�
�����7��D�K�"�D�K��1�9��D�K��D�K�!�D�I�I�-���"�k�k�Q�.���"��r2rWc��t|j�}t|�dkDrd|jdd�d�Sd|j�d�S)Nrbz!W:(�
z...)r�)rr�rF)r.�
not_chars_strs  r0r#zCharsNotIn._generateDefaultNamee
sK��2�4�=�=�A�
��}���"��$�-�-��&�1�2�$�7�7��$�-�-���*�*r2c�H�|j}|||vrt|||j|��|}|dz
}t||jzt|��}||kr|||vr|dz
}||kr|||vr�||z
|jkrt|||j|��||||fSrE)r�r�r�r�rSrFrR)r.r�r�r!�notcharsr��maxlens       r0rLzCharsNotIn.parseImpll
s����#�#���C�=�H�$� ��3����T�B�B����q����U�T�[�[�(�#�h�-�8���F�l�x��}�H�<��1�H�C��F�l�x��}�H�<���;����$� ��3����T�B�B��H�U�3�'�'�'r2)rwrrrr�)
r5r:r;rAr8r|r1r#rLr�r�s@r0r�r�-
sg����,����!#��!#��!#��!#��	!#�
�!#��!#�F+�c�+�(r2r�c	����eZdZdZidd�dd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%d&d'd(d)d*��Zd3d+ed,ed-ed.ef�fd/�
Zd0efd1�Zd4d2�Z	�xZ
S)5�Whitea�Special matching class for matching whitespace.  Normally,
    whitespace is ignored by pyparsing grammars.  This class is included
    when some whitespace structures are significant.  Define with
    a string containing the whitespace characters to be matched; default
    is ``" \t\r\n"``.  Also takes optional ``min``,
    ``max``, and ``exact`` arguments, as defined for the
    :class:`Word` class.
    r�z<SP>r�z<TAB>rcz<LF>r�z<CR>r�z<FF>� z<NBSP>u z<OGHAM_SPACE_MARK>u᠎z<MONGOLIAN_VOWEL_SEPARATOR>u z	<EN_QUAD>u z	<EM_QUAD>u z
<EN_SPACE>u z
<EM_SPACE>u z<THREE-PER-EM_SPACE>u z<FOUR-PER-EM_SPACE>u z<SIX-PER-EM_SPACE>u z<FIGURE_SPACE>u z<PUNCTUATION_SPACE>z<THIN_SPACE>z<HAIR_SPACE>z<ZERO_WIDTH_SPACE>z<NNBSP>z<MMSP>z<IDEOGRAPHIC_SPACE>)u u u​u u u �wsr�rDrEc�8���t����|�_�jdj	�fd��j
D��d��d�_d�jz�_|�_	|dkDr|�_
nt�_
|dkDr|�_
|�_	yy)Nrwc3�@�K�|]}|�jvs�|���y�wr,)�
matchWhite)rI�cr.s  �r0r�z!White.__init__.<locals>.<genexpr>�
s�����J�~�!��$�/�/�1I�A�~�s��T�rr'r)r�r1r�rr��	whiteStrsr�rTr�rRrSr�)r.r�r�rDrEr�s`    �r0r1zWhite.__init__�
s����
��������!�!��G�G�J�t�~�~�J�J��	"�	
�
#���!�D�I�I�-��������7��D�K�"�D�K��1�9��D�K��D�K�r2rWc�F�djd�|jD��S)Nrwc3�BK�|]}tj|���y�wr,)r�r��rIr�s  r0r�z-White._generateDefaultName.<locals>.<genexpr>�
s����C�?�a�u���q�)�?�s�)r�r�r�s r0r#zWhite._generateDefaultName�
s���w�w�C�4�?�?�C�C�Cr2c�p�|||jvrt|||j|��|}|dz
}||jz}t	|t|��}||kr-|||jvr|dz
}||kr|||jvr�||z
|jkrt|||j|��||||fSrE)r�r�r�rSr�rFrR)r.r�r�r!r�r6s      r0rLzWhite.parseImpl�
s����C�=����/� ��3����T�B�B����q�������$���V�S��]�+���F�l�x��}����?��1�H�C��F�l�x��}����?���;����$� ��3����T�B�B��H�U�3�'�'�'r2)z 	
rrrr�)r5r:r;rAr�r8r|r1r#rLr�r�s@r0r�r�}
s+������V���g��	
�f��	
�f�	�
	
�f��	�(�
�	�&��	�/��	�+��	�+��	�,��	�,��	�(��	�'��	�&�� 	�"�!�"	�'�#�$!� �&���'�/�I�4 �3� �� �s� �s� �,D�c�D�
(r2r�c���eZdZ�fd�Z�xZS)�
PositionTokenc�>��t�|��d|_d|_yr=r
r�s �r0r1zPositionToken.__init__�
s���
����"���"��r2)r5r:r;r1r�r�s@r0r�r��
s
���#�#r2r�c�D��eZdZdZdef�fd�Zdededefd�Zd	d�Z�xZ	S)
�
GoToColumnzaToken to advance to a specific column of input text; useful for
    tabular report scraping.
    �colnoc�0��t�|��||_yr,)r�r1r�)r.r�r�s  �r0r1zGoToColumn.__init__�
s���
������r2r�r�rWc�Z�t||�|jk7r�t|�}|jr|j||�}||krc||j	�rPt||�|jk7r7|dz
}||kr-||j	�rt||�|jk7r�7|SrE)r�rFr�rC�isspace)r.r�r�rGs    r0rIzGoToColumn.preParse�
s����s�H�����)��8�}�H�����*�*�8�S�9���h���S�M�)�)�+���X�&�$�(�(�2��q���	�h���S�M�)�)�+���X�&�$�(�(�2��
r2c��t||�}||jkDrt||d|��||jz|z
}|||}||fS)NzText not in expected column)r�r�)r.r�r�r!�thiscol�newlocr8s       r0rLzGoToColumn.parseImpl�
sT���c�8�$���T�X�X�� ��3�0M�t�T�T��t�x�x��'�)���s�6�"���s�{�r2r�)
r5r:r;rAr|r1r8rIrLr�r�s@r0r�r��
s3�����c�����3��3��r2r�c�>��eZdZdZ�fd�Zdededefd�Zdd�Z�xZ	S)	�	LineStarta�Matches if current position is at the beginning of a line within
    the parse string

    Example::

        test = '''\
        AAA this line
        AAA and this line
          AAA but not this one
        B AAA and definitely not this one
        '''

        for t in (LineStart() + 'AAA' + rest_of_line).search_string(test):
            print(t)

    prints::

        ['AAA', ' this line']
        ['AAA', ' and this line']

    c���t�|��|j�t�|jz|_|jj
d�t�j|j�|_	d|_
y)NrczExpected start of line)r�r1rr�r��orig_whiteChars�discardr�rr�r�r�s �r0r1zLineStart.__init__s^���
��������"�u�t���6���������%��w�3�3�D�O�O�D���.��r2r�r�rWc���|dk(r|S|jj||�}d|jvr6|||dzdk(r+|jj||dz�}|||dzdk(r�+|S)Nrrcr)r�rIr�)r.r�r�r8s    r0rIzLineStart.preParsesy���!�8��J��,�,�'�'��#�6�C��t�+�+�+��s�S�1�W�-��5��,�,�/�/��#��'�B�C��s�S�1�W�-��5��Jr2c�X�t||�dk(r|gfSt|||j|��rE)r�r�r�rKs    r0rLzLineStart.parseImpls/���s�H���"���7�N��X�s�D�K�K��>�>r2r�)
r5r:r;rAr1r8r|rIrLr�r�s@r0r�r��
s,����,/����3��3��?r2r�c�*��eZdZdZ�fd�Zdd�Z�xZS)�LineEndzTMatches if current position is at the end of a line within the
    parse string
    c���t�|��|jjd�|j	|jd��d|_y)NrcFr�zExpected end of line)r�r1r�r�rr�r�s �r0r1zLineEnd.__init__$s>���
����������%��!�!�$�/�/��!�G�,��r2c���|t|�kr'||dk(r|dzdfSt|||j|��|t|�k(r|dzgfSt|||j|��)Nrcr�rFr�r�rKs    r0rLzLineEnd.parseImpl*sl����X�����}��$��Q�w��}�$�$�X�s�D�K�K��F�F�
�C��M�
!���7�B�;�� ��3����T�B�Br2r�r�r�s@r0r�r�s����-�	Cr2r�c�*��eZdZdZ�fd�Zdd�Z�xZS)�StringStartzLMatches if current position is at the beginning of the parse
    string
    c�0��t�|��d|_y)NzExpected start of text�r�r1r�r�s �r0r1zStringStart.__init__;s���
����.��r2c�n�|dk7r-||j|d�k7rt|||j|��|gfSr)rIr�r�rKs    r0rLzStringStart.parseImpl?s:���!�8��d�m�m�H�a�0�0�$�X�s�D�K�K��F�F��B�w�r2r�r�r�s@r0r�r�6s����/�r2r�c�*��eZdZdZ�fd�Zdd�Z�xZS)r�zG
    Matches if current position is at the end of the parse string
    c�0��t�|��d|_y)NzExpected end of textr�r�s �r0r1zStringEnd.__init__Ls���
����,��r2c���|t|�krt|||j|��|t|�k(r|dzgfS|t|�kDr|gfSt|||j|��rEr�rKs    r0rLzStringEnd.parseImplPsg����X��� ��3����T�B�B�
�C��M�
!���7�B�;��
�3�x�=�
 ���7�N� ��3����T�B�Br2r�r�r�s@r0r�r�Gs����-�Cr2r�c�>��eZdZdZefed�dedef�fd�Zdd�Z�xZS)�	WordStarta�Matches if the current position is at the beginning of a
    :class:`Word`, and is not preceded by any character in a given
    set of ``word_chars`` (default= ``printables``). To emulate the
    ```` behavior of regular expressions, use
    ``WordStart(alphanums)``. ``WordStart`` will also match at
    the beginning of the string being parsed, or at the beginning of
    a line.
    ��	wordChars�
word_charsr�c�j��|tk(r|n|}t�|�	�t|�|_d|_y)NzNot at the start of a word)�
printablesr�r1r�r�r��r.r�r�r�s   �r0r1zWordStart.__init__es.���"+�z�"9�J�y�	�
�����Y����2��r2c��|dk7r=||dz
|jvs|||jvrt|||j|��|gfS�Nrr)r�r�r�rKs    r0rLzWordStart.parseImplksL���!�8���q��!�T�^�^�3��C�=����6�$�X�s�D�K�K��F�F��B�w�r2r��	r5r:r;rAr�r8r1rLr�r�s@r0r�r�[s,����*4�3��3�3�3�3�3�r2r�c�>��eZdZdZefed�dedef�fd�Zdd�Z�xZS)�WordEndaiMatches if the current position is at the end of a :class:`Word`,
    and is not followed by any character in a given set of ``word_chars``
    (default= ``printables``). To emulate the ```` behavior of
    regular expressions, use ``WordEnd(alphanums)``. ``WordEnd``
    will also match at the end of the string being parsed, or at the end
    of a line.
    r�r�r�c�x��|tk(r|n|}t�|�	�t|�|_d|_d|_y)NFzNot at the end of a word)r�r�r1r�r�r�r�r�s   �r0r1zWordEnd.__init__~s6���"+�z�"9�J�y�	�
�����Y����#���0��r2c��t|�}|dkDrB||kr=|||jvs||dz
|jvrt|||j|��|gfSr)rFr�r�r�)r.r�r�r!rGs     r0rLzWordEnd.parseImpl�s[���x�=���a�<�C�(�N���
����/��C�!�G�$�D�N�N�:�$�X�s�D�K�K��F�F��B�w�r2r�rr�s@r0rrus,����*4�1��1�3�1�3�1�r2rc���eZdZdZddej
edef�fd�
Zde	efd�Z
defd�Zddedef�fd	�
Zddedef�fd
�
Z
def�fd�Zdefd�Zdef�fd
�Zddd�Zdef�fd�Zd�fd�	Zee�d��Zee
�d��Z�xZS)�ParseExpressionz]Abstract subclass of ParserElement, for combining and
    post-processing parsed tokens.
    �exprsr�c�
���t���|��t|t�rt	|�}t|t
�r�j
|�g�_d�_yt|t�r|g�_d�_yt|t�r@t	|�}td�|D��r�fd�|D�}t	|��_d�_y	t	|��_d�_y#t$r|g�_Yd�_ywxYw)Nc3�<K�|]}t|t����y�wr,)rXr&)rIr�s  r0r�z+ParseExpression.__init__.<locals>.<genexpr>�s����@�%�$�:�d�H�-�%�s�c3�d�K�|]'}t|t�r�j|�n|���)y�wr,)rXr&r�)rIr?r.s  �r0r�z+ParseExpression.__init__.<locals>.<genexpr>�s3������"��4>�a��3J�D�,�,�Q�/�PQ�Q�"�s�-0F)
r�r1rX�_generatorTyper�r&r�rr�r�anyr�r�r.rr�r�s`  �r0r1zParseExpression.__init__�s����
����"���e�^�,���K�E��e�X�&��2�2�5�9�:�D�J�""���!��}�
-���D�J�"�����x�
(���K�E��@�%�@�@��"����e��D�J�"���	
%�!�%�[��
�"�����
%�#�W��
�!���
%�s�C'�'D�DrWc� �|jddSr,)rr�s r0rzParseExpression.recurse�s���z�z�!�}�r2c�J�|jj|�d|_|Sr,)rrr�r�s  r0rzParseExpression.append�s!���
�
���%� � ����r2rc����t�|�|�|rO|jD�cgc]}|j���c}|_|jD]}|j|��|Scc}w)z�
        Extends ``leave_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on
           all contained expressions.
        )r�rrr�r.rr?r�s   �r0rz ParseExpression.leave_whitespace�s[���
	�� ��+��,0�J�J�7�J�q�!�&�&�(�J�7�D�J��Z�Z���"�"�9�-� ����8��A$c����t�|�|�|rO|jD�cgc]}|j���c}|_|jD]}|j|��|Scc}w)z�
        Extends ``ignore_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on
           all contained expressions.
        )r�rrrrs   �r0rz!ParseExpression.ignore_whitespace�s[���
	��!�)�,��,0�J�J�7�J�q�!�&�&�(�J�7�D�J��Z�Z���#�#�I�.� ����8rc�@��t|t�rN||jvr>t�|�|�|j
D] }|j	|jd��"|St�|�|�|j
D] }|j	|jd��"|S�Nr�)rXr
r�r�rr)r.r�r?r�s   �r0rzParseExpression.ignore�s�����e�X�&��D�,�,�,����u�%����A��H�H�T�-�-�b�1�2�$���
�G�N�5�!��Z�Z������)�)�"�-�.� ��r2c�`�|jj�dt|j��d�S�Nz:(r�)r�r5r8rr�s r0r#z$ParseExpression._generateDefaultName�s)���.�.�)�)�*�"�S����_�,=�Q�?�?r2c���|jr|St�|�	�|jD]}|j��t	|j�dk(�re|jd}t||j�r�|js�|j�v|jsj|jdd|jdgz|_d|_
|xj|jzc_|xj|jzc_|jd}t||j�r�|js�|j�u|jsi|jdd|jddz|_d|_
|xj|jzc_|xj|jzc_dt|�z|_|S)Nrdrrr�r')r�r�r�rrFrXr�r�r�r�r�r�r�r8r�)r.r?r�r�s   �r0r�zParseExpression.streamline�sp�������K�
�������A�
�L�L�N���t�z�z�?�a���J�J�q�M�E��5�$�.�.�1��)�)��%�%�-����"�[�[��^�t�z�z�!�}�o�=��
�$(��!��#�#�u�';�';�;�#��"�"�e�&9�&9�9�"��J�J�r�N�E��5�$�.�.�1��)�)��%�%�-����!�Z�Z���_�u�{�{�1�~�=��
�$(��!��#�#�u�';�';�;�#��"�"�e�&9�&9�9�"�!�C��I�-����r2c��tjdtd��|�|ngdd|gz}|jD]}|j	|��|jg�y�Nr:rdr;)r=rNr>rr@r5)r.r?�tmpr?s    r0r@zParseExpression.validatesX���
�
�h���	
�
!.� 9�}�r�1�E���N�����A�
�J�J�s�O�����R� r2c���t�|��}tjt|�}|j
D�cgc]}|j���c}|_|Scc}wr,)r�rr�rrr)r.r8r?r�s   �r0rzParseExpression.copysH����g�l�n���k�k�/�3�/��'+�z�z�2�z�!�Q�V�V�X�z�2��	��
��3s�Ac
���tjr�tj|jvr�|jD]�}t|t�s�|js�!tj|jvs�>tjdjd|t|�j|j�d����t�|�9||�S�NzY{}: setting results name {!r} on {} expression collides with {!r} on contained expressionrYr'r;)rLrYrcrrrXr�r�r=rNr�r�r5r�r�r.rTrr?r�s    �r0rzParseExpression._setResultsNames�����>�>��E�E��*�*�+��Z�Z���q�-�0��
�
�#�M�M��/�/�0��M�M�E�EK�V�G� � ��J�/�/��M�M�	F�$%�	� �$�w�&�t�^�<�<r2c��yr,r<r�s r0r�zParseExpression.leaveWhitespace5r�r2c��yr,r<r�s r0r�z ParseExpression.ignoreWhitespace8r�r2r�r�r,rV)r5r:r;rAr�rr�rxr1rrrrrrr8r#r�r@rrr!r�r�r�r�s@r0rr�s�����"�f�o�o�m�<�"��"�4��m�,���}��
�$��-��
�4�
�=�
�
�}�
�@�c�@�'�M�'�R	!��m��=�8�&�'�"�(�"��'�(�#�)�#r2rc���eZdZdZGd�de�Z	d
dejede	f�fd�
Z
def�fd�Zd
d	�Zd
�Z
d�Zdefd�Z�xZS)r�a
    Requires all given :class:`ParseExpression` s to be found in the given order.
    Expressions may be separated by whitespace.
    May be constructed using the ``'+'`` operator.
    May also be constructed using the ``'-'`` operator, which will
    suppress backtracking.

    Example::

        integer = Word(nums)
        name_expr = Word(alphas)[1, ...]

        expr = And([integer("id"), name_expr("name"), integer("age")])
        # more easily written as:
        expr = integer("id") + name_expr("name") + integer("age")
    c�*��eZdZ�fd�Zdefd�Z�xZS)�And._ErrorStopc�D��t�|�|i|��|j�yr,)r�r1r)r.r�r3r�s   �r0r1zAnd._ErrorStop.__init__Ps!����G��d�-�f�-��!�!�#r2rWc��y)N�-r<r�s r0r#z#And._ErrorStop._generateDefaultNameTs��r2)r5r:r;r1r8r#r�r�s@r0r�r%Os���	$�	�#�	r2r��	exprs_argr�c�<��t|�}|r�t|vr�g}t|�D]�\}}|turu|t|�dz
krYt	j
tt�||dzz�jd}|jt|�d���xtd��|j|���||ddt�|�5||�|jr�td�|jD��|_t!|jdt"�sg|j%|jdj&|jdj(��|jdj*|_d	|_yd|_d	|_yd	|_d	|_y)
Nrr�r�z0cannot construct And with sequence ending in ...c3�4K�|]}|j���y�wr,�r��rIr?s  r0r�zAnd.__init__.<locals>.<genexpr>m�����%K�
�1�a�&6�&6�
�r�rr�FT)r�r�r4rFr�rrr�rrr�rWr�r1r0r�rXr�rr�r�r�r)	r.r)r�rrrur��
skipto_argr�s	        �r0r1zAnd.__init__Wsv���&*�)�_���X��&��C�$�U�+���4��8�#��3�u�:��>�)�4:�K�K�+�e�g��a�!�e��.D�5��%��5$�
��
�
�#5�6�*�#5�k�#B�C�'�N����J�J�t�$�,��E�!�H�
�����)��:�:�"%�%K��
�
�%K�"K�D���d�j�j��m�U�3��)�)��J�J�q�M�,�,�"&�*�*�Q�-�"E�"E�*��'+�j�j��m�&B�&B��#�
!���',��#�!���#'�D�� ��r2rWc����|jr�td�|jddD��r�t�}t|jdd�D]�\}}||ur�t	|t
�s�|js�)t	|jdt�s�G|jd|j|dzz|jd<||j|dz<��|jD�cgc]	}||us�|��c}|_t�	|�!�t|j|jdd�D]�\}}t�}	t|�|vr�|jt|��t	|t�r|j|fd���^|j�}t!t#|�d�}|���t%j&t(|�}��t+d�|jD��|_|Scc}w)Nc3�K�|]A}t|t�xr+|jxrt|jdt����Cy�w�r�N)rXrrr�r-s  r0r�z!And.streamline.<locals>.<genexpr>}sK�����)�A��1�o�.�:��G�G�:��q�w�w�r�{�L�9�:�)�s�AA	r�rc�0�t|dt||��S)N�
parent_anchor)�setattrr�)r�r�r��cur_s    r0r�z And.streamline.<locals>.<lambda>�s��'� �/�3�q�!�9�3r2c3�4K�|]}|j���y�wr,r,r-s  r0r�z!And.streamline.<locals>.<genexpr>�s����!G�J�q�!�"2�"2�J�r�)rr
r�r4rXrr�r�r�r5r�rQr	�
IndentedBlockr6r�nextr�r�rr�r0r�)
r.�deleted_expr_markerrur?�prevrr
�subs�
next_firstr�s
         �r0r�zAnd.streamlinezs�����:�:������C�R��	��'.�i�#�%�d�j�j��"�o�6�D�A�q��/�/� �"�1�o�6��G�G�&�q�w�w�r�{�L�A�&'�g�g�b�k�D�J�J�q�1�u�4E�&E������,?��
�
�1�q�5�)�7�*.���T��A�q�@S�7S�a��T��
�
����
�T�Z�Z����A�B��8�I�D�#��5�D���c�7�d�?������C��!��c�=�1��)�)�-0���
��{�{�}��!�$�t�*�d�3�
��%���k�k�-��<���	9�*"�!G�D�J�J�!G�G������;Us�'	G3�1G3c���|jdj|||d��\}}d}|jddD]U}t|�tjurd}�!|r	|j|||�\}}n|j|||�\}}||z
}�W||fS#t
$r�t$r!}d|_t
j|��d}~wt$r"t|t|�|j|��wxYw)NrFr�rT)rr'r�r�r��ParseSyntaxExceptionr{r��_from_exceptionrVrFr�)	r.r�r�r!�
resultlist�	errorStopr?�
exprtokensr�s	         r0rLz
And.parseImpl�s
���*�*�Q�-�.�.��c�9�5�/�
���Z��	����A�B��A��A�w�#�.�.�(� �	���
�&'�h�h�x��i�&H�O�C��#$�(�(�8�S�)�"D���Z��*�$�J�' �(�J����,���)�C�'+�B�$�.�>�>�r�B�B��!��.� �#�h�-����d����s�B�C/�%C�.C/c��t|t�r|j|�}t|t�stS|j|�Sr,�rXr&r�r�r�rr�s  r0�__iadd__zAnd.__iadd__��;���e�X�&��,�,�U�3�E��%��/�!�!��{�{�5�!�!r2c�v�|dd|gz}|jD]!}|j|�|jr�!yyr,)rr5r�r6s    r0r5zAnd._checkRecursion�s;��*�1�-���6�����A�
���o�.��#�#��r2c��djd�|jD��}t|�dkDrB|ddt|�dz
�dk(r+|dd}t|�dkDr|ddt|�dz
�dk(r�+d|zdzS)	Nr�c3�2K�|]}t|����y�wr,r.r-s  r0r�z+And._generateDefaultName.<locals>.<genexpr>�s����4��A��Q���r.rr�{}r�rKrL)r�rrF�r.�inners  r0r#zAnd._generateDefaultName�s������4����4�4���%�j�1�n��q�':�C��J��N�':�!;�t�!C��!�B�K�E��%�j�1�n��q�':�C��J��N�':�!;�t�!C��U�{�S� � r2r�)r5r:r;rAr�r�r�rr�rxr1r�rLrFr5r8r#r�r�s@r0r�r�=sb����"�U��KO�!!�����7�!!�CG�!!�F1�M�1�f�:"��!�c�!r2r�c�~��eZdZdZddej
edef�fd�
Zdef�fd�Z	dd�Z
d�Zdefd	�Z
d�fd
�	Z�xZS)
r�a�Requires that at least one :class:`ParseExpression` is found. If
    two expressions match, the expression that matches the longest
    string will be used. May be constructed using the ``'^'``
    operator.

    Example::

        # construct Or using '^' operator

        number = Word(nums) ^ Combine(Word(nums) + '.' + Word(nums))
        print(number.search_string("123 3.1416 789"))

    prints::

        [['123'], ['3.1416'], ['789']]
    rr�c����t�|�||�|jrCtd�|jD��|_td�|jD��|_yd|_y)Nc3�4K�|]}|j���y�wr,r,r-s  r0r�zOr.__init__.<locals>.<genexpr>�r.r�c3�4K�|]}|j���y�wr,rr-s  r0r�zOr.__init__.<locals>.<genexpr>�r.r�T�r�r1rr
r�r0r�rs   �r0r1zOr.__init__��O���
�����)��:�:�"%�%K��
�
�%K�"K�D��"%�%K��
�
�%K�"K�D��"&�D�r2rWc���t�|��|jretd�|jD��|_td�|jD��|_t
d�|jD��|_|Sd|_|S)Nc3�4K�|]}|j���y�wr,r,r-s  r0r�z Or.streamline.<locals>.<genexpr>�r.r�c3�4K�|]}|j���y�wr,�r�r-s  r0r�z Or.streamline.<locals>.<genexpr>������!C�
�1�!�,�,�
�r�c3�ZK�|]#}|jxrt|t����%y�wr,�r�rXr�r-s  r0r�z Or.streamline.<locals>.<genexpr>��,����&�GQ�!�� � �=��A�u�)=�%=�=�z���)+F)r�r�rr
r�r�r0r�r�s �r0r�z
Or.streamline�su���
�����:�:�"%�%K��
�
�%K�"K�D��!�!C��
�
�!C�C�D�O�"%�&�GK�z�z�&�#�D��
��$�D�O��r2c���d}d}g}g}td�|jD��r|j||�}|jD]*}	|j||d��}	|j	|	|f��,|r�|jtd�d��|s|dd}|j|||�Sd}
|D]@\}}||
dkr|
cS	|j|||�\}	}|	|k\r|	|fcS|	|
dkDs�=|	|f}
�B|
dk7r|
S|rZt|�dkDrE|jd	��
�|dj|djk(r|jd��
�|d}|�|�||k(r|j|_|�t||d|��#t
$r.}
d|
_||
_|j	|
�d}d}Yd}
~
��ld}
~
wt$r1}|s$d|_|j|kDr|}|j}Yd}~���d}~wt$r>t|�|kDr,t|t|�|j|�}t|�}Y���wxYw#t$r/}d|_|j|kDr|}|j}Yd}~���d}~wwxYw)
Nr�c3�4K�|]}|j���y�wr,)rr-s  r0r�zOr.parseImpl.<locals>.<genexpr>s����2�z�!�q�~�~�z�r�T�rer)r�reverserr2c��|jSr,�r��r?s r0r�zOr.parseImpl.<locals>.<lambda>J�
��1�5�5�&r2�rc�Z�|jtt|j��fSr,�r�rFr8�parser_elementrcs r0r�zOr.parseImpl.<locals>.<lambda>L�"�����v��C��@P�@P�<Q�8R�7R�.Sr2� no defined alternatives to match)r0rrIrirr�r�rhr�r�rVrFr��sortrr'r�)r.r�r�r!�	maxExcLoc�maxExceptionr��fatalsr?�loc2�pfera�	best_expr�longest�loc1�expr1r��	max_fatals                  r0rLzOr.parseImpls����	��������2�t�z�z�2�2��-�-��#�.�C����A�
*��{�{�8�S�d�{�C��*����a�y�)�/�2�
�L�L�Z��]�D�L�9��$�A�J�q�M�	� �'�'��#�y�A�A��G�&���e��7�1�:�%�"�N�-�!&���h��Y�!G�J�D�$��t�|�#�T�z�)����
�*�"&��*��# '�&�*�$�����6�{�Q����� 0��1��!�9�=�=�F�1�I�M�M�1��K�K�$S�K�T��q�	�I��O��#��C��#'�;�;�� ��� ��#�A�4��
��O'�
�$(��!�%&��"��
�
�c�"�#���	��!�
,��(,�C�%��w�w��*�'*��$'�G�G�	����
.��x�=�9�,�#1� �#�h�-����4�$�L�!$�H�
�I��
.��:&�,�(,�C�%��w�w��*�'*��$'�G�G�	���	,�sC�E=�H4�=	H1�#F/�/H1�;&G'�'AH1�0H1�4	I,�=$I'�'I,c��t|t�r|j|�}t|t�stS|j|�Sr,rEr�s  r0�__ixor__zOr.__ixor__[rGr2c�R�ddjd�|jD��zdzS)NrKz ^ c3�2K�|]}t|����y�wr,r.r-s  r0r�z*Or._generateDefaultName.<locals>.<genexpr>c�����;�
�1��A��
�r.rL�r�rr�s r0r#zOr._generateDefaultNameb�%���U�Z�Z�;��
�
�;�;�;�c�A�Ar2c	�*��tjrstj|jvrWt	d�|j
D��r;t
jdjd|t|�j�d��t�|�1||�S)Nc3�xK�|]2}t|t�xrtj|jv���4y�wr,�rXr�rcrXrr-s  r0r�z%Or._setResultsName.<locals>.<genexpr>k�D�����$�A��1�c�"�,��I�I��+�+�,�,�$���8:��{}: setting results name {!r} on {} expression will return a list of all parsed tokens in an And alternative, in prior versions only the first token was returned; enclose contained argument in GrouprXr'r;�
rLrXrcrr
rr=rNr�r�r5r�r�r.rTrr�s   �r0rzOr._setResultsNamee�����>�>��E�E��*�*�+������	���
�
�2�39�&�C���T�
�+�+�3�
 !�
��w�&�t�^�<�<r2r�r�)r5r:r;rAr�rr�rxr1r�rLrwr8r#rr�r�s@r0r�r��sT����"'�f�o�o�m�<�'��'�
�M�
�S�j"�B�c�B�=�=r2r�c�~��eZdZdZddej
edef�fd�
Zdef�fd�Z	dd�Z
d�Zdefd	�Z
d�fd
�	Z�xZS)
r�a�Requires that at least one :class:`ParseExpression` is found. If
    more than one expression matches, the first one listed is the one that will
    match. May be constructed using the ``'|'`` operator.

    Example::

        # construct MatchFirst using '|' operator

        # watch the order of expressions to match
        number = Word(nums) | Combine(Word(nums) + '.' + Word(nums))
        print(number.search_string("123 3.1416 789")) #  Fail! -> [['123'], ['3'], ['1416'], ['789']]

        # put more selective expression first
        number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums)
        print(number.search_string("123 3.1416 789")) #  Better -> [['123'], ['3.1416'], ['789']]
    rr�c����t�|�||�|jrCtd�|jD��|_td�|jD��|_yd|_y)Nc3�4K�|]}|j���y�wr,r,r-s  r0r�z&MatchFirst.__init__.<locals>.<genexpr>�r.r�c3�4K�|]}|j���y�wr,rr-s  r0r�z&MatchFirst.__init__.<locals>.<genexpr>�r.r�TrRrs   �r0r1zMatchFirst.__init__�rSr2rWc�>��|jr|St�|�	�|jret	d�|jD��|_t	d�|jD��|_td�|jD��|_|Sd|_d|_|S)Nc3�4K�|]}|j���y�wr,rWr-s  r0r�z(MatchFirst.streamline.<locals>.<genexpr>�rXr�c3�4K�|]}|j���y�wr,r,r-s  r0r�z(MatchFirst.streamline.<locals>.<genexpr>�r.r�c3�ZK�|]#}|jxrt|t����%y�wr,rZr-s  r0r�z(MatchFirst.streamline.<locals>.<genexpr>�r[r\FT)	r�r�r�rr
r�r�r0r�r�s �r0r�zMatchFirst.streamline�s��������K�
�����:�:�!�!C��
�
�!C�C�D�O�"%�%K��
�
�%K�"K�D��"%�&�GK�z�z�&�#�D����$�D�O�"&�D���r2c���d}d}|jD]}	|j|||�cS|�||k(r|j|_
|�t||d|��#t$r}d|_||_�d}~wt
$r'}|j|kDr|}|j}Yd}~��d}~wt$r=t|�|kDr,t|t|�|j|�}t|�}Y��wxYw)Nr�rj)rr'r�r�rhr�r�rVrFr�r�)	r.r�r�r!rlrmr?rpras	         r0rLzMatchFirst.parseImpl�s����	������A�
.��x�x�������,�#��C��#'�;�;�� ��� ��#�A�4��
��-'�
�$(��!�%&��"���!�
(��7�7�Y�&�#&�L� #���I����
.��x�=�9�,�#1� �#�h�-����4�$�L�!$�H�
�I��
.�s*�A�	C"�A+�+C"�7B�AC"�!C"c��t|t�r|j|�}t|t�stS|j|�Sr,rEr�s  r0�__ior__zMatchFirst.__ior__�rGr2c�R�ddjd�|jD��zdzS)NrKz | c3�2K�|]}t|����y�wr,r.r-s  r0r�z2MatchFirst._generateDefaultName.<locals>.<genexpr>�rzr.rLr{r�s r0r#zMatchFirst._generateDefaultName�r|r2c	�*��tjrstj|jvrWt	d�|j
D��r;t
jdjd|t|�j�d��t�|�1||�S)Nc3�xK�|]2}t|t�xrtj|jv���4y�wr,rr-s  r0r�z-MatchFirst._setResultsName.<locals>.<genexpr>�r�r�r�rXr'r;r�r�s   �r0rzMatchFirst._setResultsName�r�r2r�r�)r5r:r;rAr�rr�rxr1r�rLr�r8r#rr�r�s@r0r�r��sS����"'�f�o�o�m�<�'��'��M�� #�J"�B�c�B�=�=r2r�c�r��eZdZdZd
dej
edef�fd�
Zd�Z	def�fd�Z
d
d�Zdefd	�Z
�xZS)r�alRequires all given :class:`ParseExpression` s to be found, but in
    any order. Expressions may be separated by whitespace.

    May be constructed using the ``'&'`` operator.

    Example::

        color = one_of("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN")
        shape_type = one_of("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON")
        integer = Word(nums)
        shape_attr = "shape:" + shape_type("shape")
        posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn")
        color_attr = "color:" + color("color")
        size_attr = "size:" + integer("size")

        # use Each (using operator '&') to accept attributes in any order
        # (shape and posn are required, color and size are optional)
        shape_spec = shape_attr & posn_attr & Opt(color_attr) & Opt(size_attr)

        shape_spec.run_tests('''
            shape: SQUARE color: BLACK posn: 100, 120
            shape: CIRCLE size: 50 color: BLUE posn: 50,80
            color:GREEN size:20 shape:TRIANGLE posn:20,40
            '''
            )

    prints::

        shape: SQUARE color: BLACK posn: 100, 120
        ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']]
        - color: BLACK
        - posn: ['100', ',', '120']
          - x: 100
          - y: 120
        - shape: SQUARE


        shape: CIRCLE size: 50 color: BLUE posn: 50,80
        ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']]
        - color: BLUE
        - posn: ['50', ',', '80']
          - x: 50
          - y: 80
        - shape: CIRCLE
        - size: 50


        color: GREEN size: 20 shape: TRIANGLE posn: 20,40
        ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']]
        - color: GREEN
        - posn: ['20', ',', '40']
          - x: 20
          - y: 40
        - shape: TRIANGLE
        - size: 20
    rr�c���t�|�||�|jr"td�|jD��|_nd|_d|_d|_d|_y)Nc3�4K�|]}|j���y�wr,r,r-s  r0r�z Each.__init__.<locals>.<genexpr>1r.r�T)r�r1rr0r�r��initExprGroupsr�rs   �r0r1z
Each.__init__.sO���
�����)��:�:�"%�%K��
�
�%K�"K�D��"&�D��"���"�����r2c��t|t�r|j|�}t|t�stS|j|�Sr,rEr�s  r0�__iand__z
Each.__iand__8rGr2rWc���t�|��|jr#td�|jD��|_|Sd|_|S)Nc3�4K�|]}|j���y�wr,r,r-s  r0r�z"Each.streamline.<locals>.<genexpr>Br.r�T)r�r�rr0r�r�s �r0r�zEach.streamline?sB���
�����:�:�"%�%K��
�
�%K�"K�D����#'�D���r2c	�t�|j�r�td�|jD��|_|jD�cgc]}t	|t
�s�|j��!}}|jD�cgc]+}|jrt	|t
ttf�s|��-}}||z|_
|jD�cgc]9}t	|t�r'|jj|jd����;c}|_|jD�cgc]9}t	|t�r'|jj|jd����;c}|_|jD�cgc] }t	|t
ttf�r�|��"c}|_|xj"|j z
c_d|_|}|j"dd}|jdd}	|jdd}
g}d}g}
g}|r�||	z|
z}|
j%�|j%�|D]w}	|j'||d��}|j)|jj+t-|�|��||vr|j/|��b||	vs�g|	j/|��yt9|
�t9|�k(rd}|r��|rZt9|�dkDrE|j;d���|d	j<|dj<k(r|j;d
���|d	}|�|r9dj?|D�cgc]
}tA|���c}�}t7||d|�d
���||jD�cgc]$}t	|t
�s�|j|	vs�#|��&c}z
}tCg�}|D]}|jE|||�\}}||z
}�||fScc}wcc}wcc}wcc}wcc}w#t0$r;}d|_||_|j)|�|
j)|�Yd}~���d}~wt6$r|
j)|�Y��wxYwcc}wcc}w)Nc3�lK�|],}t|t�s�t|j�|f���.y�wr,)rXr�rQr�r-s  r0r�z!Each.parseImpl.<locals>.<genexpr>Is)���� �)3�A�z�!�S�7I��A�F�F��Q���s�4�4T)rFr_rc��|jSr,rbrcs r0r�z Each.parseImpl.<locals>.<lambda>�rdr2rerc�Z�|jtt|j��fSr,rgrcs r0r�z Each.parseImpl.<locals>.<lambda>�rir2rfz'Missing one or more required elements (r�)#r�r�r�opt1maprXr�r�r�rrr��	optionalsrrr��multioptionalsr��
multirequired�requiredr�rirr1rQ�remover�r�rhr�rFrkr�r�r8r#r')r.r�r�r!r?�opt1�opt2�tmpLoc�tmpReqd�tmpOpt�multis�
matchOrder�keepMatching�failedrn�tmpExprsrpru�missing�
total_resultsr;s                     r0rLzEach.parseImplGs������� �)-��� ��D�L�%)�J�J�E�J�q�*�Q��2D�A�F�F�J�D�E�����#�A��#�#�J�q�3��z�:R�,S��#�
��
"�D�[�D�N����#�#�A��a��0����'�'��
�
��'�M�#�#�D�����"�#�A��a��+����'�'��
�
��'�M�#�"�D�� �:�:��%�a�Z��C��Y�;W�-X��:��D�M�
�M�M�T�/�/�/�M�"'�D�����-�-��"������"���$�$�Q�'���
����������'�&�0�H��L�L�N��L�L�N���)��[�[��6�t�[�L�F��%�%�d�l�l�&6�&6�r�!�u�a�&@�A��G�|����q�)��f���
�
�a�(�� �6�{�c�(�m�+�$��+�0��6�{�Q����� 0��1��!�9�=�=�F�1�I�M�M�1��K�K�$S�K�T��q�	�I��O���i�i�� 9��A��Q��� 9�:�G� ���9�'��!�D��
�	�$�*�*�X�*�Q�
�1�c�0B�q�v�v�QW�GW�q�*�X�X�
�$�R�(�
��A��8�8�H�c�9�=�L�C���W�$�M���M�!�!��aF����#��
"��
��,+�%�(,�C�%�)*�C�&��M�M�#�&��M�M�!�$�$��%�%��M�M�!�$�%��*!:��Ys_�N4�N4�10N9�;>N>�>O�# O�O�O
�P0�P5�+P5�:P5�
	P-�0P�P-�,P-c�R�ddjd�|jD��zdzS)NrKz & c3�2K�|]}t|����y�wr,r.r-s  r0r�z,Each._generateDefaultName.<locals>.<genexpr>�rzr.rLr{r�s r0r#zEach._generateDefaultName�r|r2r�)r5r:r;rAr�rr�rxr1r�r�rLr8r#r�r�s@r0r�r��sK���7�r�f�o�o�m�<����"��M��U"�nB�c�Br2r�c����eZdZdZddeeefdef�fd�
Zde	efd�Z
dd�Zddedef�fd	�
Zddedef�fd
�
Z
def�fd�Zdef�fd�Zd
�Zddd�Zdefd�Zee�d��Zee
�d��Z�xZS)�ParseElementEnhancezfAbstract subclass of :class:`ParserElement`, for combining and
    post-processing parsed tokens.
    r�r�c����t�|�|�t|t�r�t	j
t|�}t|jt�r|j|�}nEtt|�|j�rt|�}n|jt|��}t	j
t|�}||_
|��|j|_|j|_|j!|j"|j$��|j&|_|j(|_|j*|_|j,j/|j,�yy)Nr�)r�r1rXr&r�rr8�
issubclassr�r�r�rjr�r�r�r�rr�r�r�r�rr�r
)r.r�r��expr_strr�s    �r0r1zParseElementEnhance.__init__�s ���
����"��d�H�%��{�{�3��-�H��$�2�2�E�:��/�/��9���D��J��(@�(@�A��x�(���/�/���0A�B���{�{�=�$�/����	���!%�!3�!3�D��"&�"5�"5�D���%�%����t�/I�/I�
&�
�#'�"5�"5�D��"�o�o�D�O� $� 1� 1�D�����#�#�D�$4�$4�5�r2rWc�8�|j�
|jgSgSr,�r�r�s r0rzParseElementEnhance.recurse�s��"�i�i�3��	�	�{�;��;r2c��|j� 	|jj|||d��St||d|��#t$r}|j|_�d}~wwxYw)NFr�zNo expression defined)r�r'r{r�r�r�)r.r�r�r!�pbes     r0rLzParseElementEnhance.parseImpl�sc���9�9� �
��y�y�'�'��#�y�u�'�U�U�
!��3�0G��N�N��	&�
��+�+�����
�s�;�	A�A�Arc���t�|�|�|rF|j�:|jj�|_|jj|�|Sr,)r�rr�r�r.rr�s  �r0rz$ParseElementEnhance.leave_whitespace�sF���
�� ��+���y�y�$� �I�I�N�N�,��	��	�	�*�*�9�5��r2c���t�|�|�|rF|j�:|jj�|_|jj|�|Sr,)r�rr�rr�s  �r0rz%ParseElementEnhance.ignore_whitespace�sF���
��!�)�,���y�y�$� �I�I�N�N�,��	��	�	�+�+�I�6��r2c�T��t|t�rS||jvrCt�|�|�|j
�(|j
j	|jd�|St�|�|�|j
�(|j
j	|jd�|Sr)rXr
r�r�rr��r.r�r�s  �r0rzParseElementEnhance.ignore�s�����e�X�&��D�,�,�,����u�%��9�9�(��I�I�$�$�T�%5�%5�b�%9�:�
��
�G�N�5�!��y�y�$��	�	� � ��!1�!1�"�!5�6��r2c�p��t�|��|j�|jj�|Sr,)r�r�r�r�s �r0r�zParseElementEnhance.streamline�s-���
�����9�9� ��I�I� � �"��r2c��||vrt||gz��|dd|gz}|j�|jj|�yyr,)�RecursiveGrammarExceptionr�r5)r.r7r8s   r0r5z#ParseElementEnhance._checkRecursion�sP���#�#�+�,<��v�,E�F�F�*�1�-���6���9�9� ��I�I�%�%�o�6�!r2c���tjdtd��|�g}|dd|gz}|j�|jj	|�|jg�yr�r=rNr>r�r@r5�r.r?rs   r0r@zParseElementEnhance.validate�s_���
�
�h���	
�
� ��M��A��$��'���9�9� ��I�I���s�#����R� r2c�`�|jj�dt|j��d�Sr)r�r5r8r�r�s r0r#z(ParseElementEnhance._generateDefaultNames)���.�.�)�)�*�"�S����^�,<�A�>�>r2c��yr,r<r�s r0r�z#ParseElementEnhance.leaveWhitespacer�r2c��yr,r<r�s r0r�z$ParseElementEnhance.ignoreWhitespacer�r2r�r�r,rV)r5r:r;rAr
r�r8rxr1rrrLrrrr�r5r@r#r!r�r�r�r�s@r0r�r��s�����6�U�=�#�#5�6�6�$�6�.<��m�,�<�O��$��-���4��=��
�}�
��M��7�!�?�c�?�
�&�'�"�(�"��'�(�#�)�#r2r�c�l��eZdZdZGd�de�ZGd�de�Zddd�d	ed
edef�fd�Z	dd
�Z
�xZS)r8z�
    Expression to match one or more expressions at a given indentation level.
    Useful for parsing text where structure is implied by indentation (like Python source code).
    c�$��eZdZdef�fd�Z�xZS)�IndentedBlock._Indent�ref_colc�`���t�|��d���|_|j�fd��y)Nzexpected indent at column c�"��t||��k(Sr,�r��r�r�r�r�s   �r0r�z0IndentedBlock._Indent.__init__.<locals>.<lambda>s���s�1�a�y�G�/Cr2�r�r1r�r9�r.r�r�s `�r0r1zIndentedBlock._Indent.__init__s+����G���6�w�i�@�D�K����C�Dr2�r5r:r;r|r1r�r�s@r0�_Indentr�s���	E�C�	E�	Er2r�c�$��eZdZdef�fd�Z�xZS)�IndentedBlock._IndentGreaterr�c�`���t�|��d���|_|j�fd��y)Nz'expected indent at column greater than c�"��t||��kDSr,r�r�s   �r0r�z7IndentedBlock._IndentGreater.__init__.<locals>.<lambda> s���s�1�a�y�7�/Br2r�r�s `�r0r1z%IndentedBlock._IndentGreater.__init__s+����G���C�G�9�M�D�K����B�Cr2r�r�s@r0�_IndentGreaterr�s���	D�C�	D�	Dr2r�FT�r�groupedr�rr�c�R��t�|�|d��||_||_d|_y)NTr�r)r�r1�
_recursive�_groupedr4)r.r�rr�r�s    �r0r1zIndentedBlock.__init__"s/���	������-�$�����
���r2c�$�t�j||�}|jj|||��t	||�}|j|�}t�|z|jz}|jrp|j|�}t|j|j|j��}	|	j|j�||	_|t||	z�z
}|jdtt!|��ddj#��d|���t%|�}
|j|j�t'�z}|jrt(}nd�}||
�t+|�zj-|||�S)Nrkr�zinner ����@c��|Sr,r<r�s r0r�z)IndentedBlock.parseImpl.<locals>.<lambda>Js��4r2)r�rIr�rir�r�r�r�r8r�r!r�r4r�r(�hexrQrr�r��Groupr�rL)
r.r�r�r!�
anchor_loc�
indent_col�peer_detect_expr�
inner_expr�
sub_indent�nested_block�block�trailing_undentr�s
             r0rLzIndentedBlock.parseImpl,s[���W�%�%�h��4�
�	
�	�	���H�j�Y��G���X�.�
��<�<�
�3���W�/�/�$�)�)�;�
��?�?��,�,�Z�8�J�(��	�	�T�_�_�d�m�m��L�
�"�"�4�:�:�.�)3�L�&��#�j�<�7�8�8�J����f�S��J��%8���%=�%C�%C�%E�$F�a�
�|�T�U��*�%���,�,�t�'9�'9�:�Y�[�H���=�=��G�'�G�����/�!:�:�E�E��j�)�
�	
r2r�)r5r:r;rAr�r�r�r�rxr1rLr�r�s@r0r8r8sM����
E�%�E�D��D�9>�t��!��15��HL��!
r2r8c�>��eZdZdZdeeeff�fd�Zd�fd�	Z�xZ	S)�
AtStringStartz�Matches if expression matches at the beginning of the parse
    string::

        AtStringStart(Word(nums)).parse_string("123")
        # prints ["123"]

        AtStringStart(Word(nums)).parse_string("    123")
        # raises ParseException
    r�c�2��t�|�|�d|_y�NF�r�r1r�r.r�r�s  �r0r1zAtStringStart.__init__[����
�����!��r2c�J��|dk7r
t||d��t�|�	|||�S)Nrznot found at string start)r�r�rL�r.r�r�r!r�s    �r0rLzAtStringStart.parseImpl_s.����!�8� ��3�0K�L�L��w� ��3�	�:�:r2r��
r5r:r;rAr
r�r8r1rLr�r�s@r0r�r�Ps(����"�U�=�#�#5�6�"�;�;r2r�c�>��eZdZdZdeeeff�fd�Zd�fd�	Z�xZ	S)�AtLineStarta�Matches if an expression matches at the beginning of a line within
    the parse string

    Example::

        test = '''\
        AAA this line
        AAA and this line
          AAA but not this one
        B AAA and definitely not this one
        '''

        for t in (AtLineStart('AAA') + rest_of_line).search_string(test):
            print(t)

    prints::

        ['AAA', ' this line']
        ['AAA', ' and this line']

    r�c�2��t�|�|�d|_yr�r�r�s  �r0r1zAtLineStart.__init__|r�r2c�^��t||�dk7r
t||d��t�|�
|||�S)Nrznot found at line start)r�r�r�rLr�s    �r0rLzAtLineStart.parseImpl�s6����s�H���"� ��3�0I�J�J��w� ��3�	�:�:r2r�r�r�s@r0r�r�es(����,"�U�=�#�#5�6�"�;�;r2r�c�:��eZdZdZdeeeff�fd�Zdd�Z�xZ	S)�
FollowedByacLookahead matching of the given parse expression.
    ``FollowedBy`` does *not* advance the parsing position within
    the input string, it only verifies that the specified parse
    expression matches at the current position.  ``FollowedBy``
    always returns a null token list. If any results names are defined
    in the lookahead expression, those *will* be returned for access by
    name.

    Example::

        # use FollowedBy to match a label only if it is followed by a ':'
        data_word = Word(alphas)
        label = data_word + FollowedBy(':')
        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))

        attr_expr[1, ...].parse_string("shape: SQUARE color: BLACK posn: upper left").pprint()

    prints::

        [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']]
    r�c�2��t�|�|�d|_yr1�r�r1r�r�s  �r0r1zFollowedBy.__init__�s���
�����"��r2c�V�|jj|||��\}}|dd�=||fS)Nrh)r�r')r.r�r�r!r@r8s      r0rLzFollowedBy.parseImpl�s3�����!�!�(�C�9�!�E���3���F��C�x�r2r�r�r�s@r0r�r��s#����,#�U�=�#�#5�6�#�r2r�c�\��eZdZdZ	ddeeefdeje	f�fd�
Z
dd�Z�xZS)�
PrecededBya�Lookbehind matching of the given parse expression.
    ``PrecededBy`` does not advance the parsing position within the
    input string, it only verifies that the specified parse expression
    matches prior to the current position.  ``PrecededBy`` always
    returns a null token list, but if a results name is defined on the
    given expression, it is returned.

    Parameters:

    - ``expr`` - expression that must match prior to the current parse
      location
    - ``retreat`` - (default= ``None``) - (int) maximum number of characters
      to lookbehind prior to the current parse location

    If the lookbehind expression is a string, :class:`Literal`,
    :class:`Keyword`, or a :class:`Word` or :class:`CharsNotIn`
    with a specified exact or maximum length, then the retreat
    parameter is not required. Otherwise, retreat must be specified to
    give a maximum number of characters to look back from
    the current parse position for a lookbehind match.

    Example::

        # VB-style variable names with type prefixes
        int_var = PrecededBy("#") + pyparsing_common.identifier
        str_var = PrecededBy("$") + pyparsing_common.identifier

    r��retreatc���t�|�|�|j�j�|_d|_d|_d|_t|t�r-tjt|�}t|�}d|_n�t|ttf�r|j}d|_nVt|t t"f�r'|j$t&k7r|j$}d|_nt|t(�r	d}d|_||_dt|�z|_d|_|j0j3d��y)NTFrznot preceded by c�8�|jtdd��Sr,)�__delitem__r��r�r�r�s   r0r�z%PrecededBy.__init__.<locals>.<lambda>�s���
�
�e�D�$�>O�0Pr2)r�r1r�rr�r�rErXr&r�rr8rFrjrrr=r�rSr�r�rr�r�r�r)r.r�rr�s   �r0r1zPrecededBy.__init__�s����	������I�I�K�0�0�2��	�"���"�����
��d�H�%��;�;�s�D�)�D��$�i�G��D�J�
��w��0�
1��m�m�G��D�J�
��t�Z�0�
1�d�k�k�X�6M��k�k�G��D�J�
��m�
,��G��D�J����(�3�t�9�4���#�������� P�Qr2c�4�|jrX||jkrt|||j��||jz
}|jj||�\}}||fS|jt
�z}|td||jz
�|}t|||j�}	tdt||jdz�dz�D](}
	|j|t|�|
z
�\}}||fS|	�#t$r}|}	Yd}~�=d}~wwxYwr)rErr�r�r�r'r�rDr�r�rFr{)r.r�r�r!r�r@r8�	test_expr�instring_slice�	last_expr�offsetr�s            r0rLzPrecededBy.parseImpl�s���:�:��T�\�\�!�$�X�s�D�K�K�@�@��$�,�,�&�E��Y�Y�%�%�h��6�F�A�s�$�C�x���	�	�I�K�/�I�%�c�!�S�4�<�<�-?�&@�3�G�N�&�x��d�k�k�B�I���3�s�D�L�L�1�,<�#=��#A�B���&�-�-�&��N�(;�f�(D��F�A�s���C�x��C� ���*�$� #�I��$�s�!D�	D�D�Dr,)rT)
r5r:r;rAr
r�r8r�r�r|r1rLr�r�s@r0rr�s?����<PT�R��-��,�-�R�8>����8L�R�4r2rc��eZdZdZdd�Zy)�Locateda�
    Decorates a returned token with its starting and ending
    locations in the input string.

    This helper adds the following results names:

    - ``locn_start`` - location where matched expression begins
    - ``locn_end`` - location where matched expression ends
    - ``value`` - the actual parsed results

    Be careful if the input text contains ``<TAB>`` characters, you
    may want to call :class:`ParserElement.parse_with_tabs`

    Example::

        wd = Word(alphas)
        for match in Located(wd).search_string("ljsdf123lksdjjf123lkkjj1222"):
            print(match)

    prints::

        [0, ['ljsdf'], 5]
        [8, ['lksdjjf'], 15]
        [18, ['lkkjj'], 23]

    c��|}|jj|||d��\}}t|||g�}||d<||d<||d<|jr||gfS||fS)NFr��
locn_startr��locn_end)r�r'r#r�)r.r�r�r!r�r`rbs       r0rLzLocated.parseImplsx�����i�i�&�&�x��	�PU�&�V���V�!�5�&�#�"6�7�
�#(�
�<� �$�
�7��!$�
�:��������$�$��
�?�"r2Nr�)r5r:r;rArLr<r2r0rr�s���6#r2rc�F��eZdZdZdeeeff�fd�Zdd�Zdefd�Z	�xZ
S)r�a�
    Lookahead to disallow matching with the given parse expression.
    ``NotAny`` does *not* advance the parsing position within the
    input string, it only verifies that the specified parse expression
    does *not* match at the current position.  Also, ``NotAny`` does
    *not* skip over leading whitespace. ``NotAny`` always returns
    a null token list.  May be constructed using the ``'~'`` operator.

    Example::

        AND, OR, NOT = map(CaselessKeyword, "AND OR NOT".split())

        # take care not to mistake keywords for identifiers
        ident = ~(AND | OR | NOT) + Word(alphas)
        boolean_term = Opt(NOT) + ident

        # very crude boolean expression - to support parenthesis groups and
        # operation hierarchy, use infix_notation
        boolean_expr = boolean_term + ((AND | OR) + boolean_term)[...]

        # integers that are followed by "." are actually floats
        integer = Word(nums) + ~Char(".")
    r�c�z��t�|�|�d|_d|_dt	|j
�z|_y)NFTzFound unwanted token, )r�r1r�r�r8r�r�r�s  �r0r1zNotAny.__init__?s6���
�����$���"���.��T�Y�Y��?��r2c�v�|jj|||��rt|||j|��|gfS)Nrk)r�rlr�r�rKs    r0rLzNotAny.parseImplHs9���9�9�#�#�H�c�i�#�H� ��3����T�B�B��B�w�r2rWc�8�dt|j�zdzS)Nz~{rL�r8r�r�s r0r#zNotAny._generateDefaultNameMs���c�$�)�)�n�$�s�*�*r2r�)r5r:r;rAr
r�r8r1rLr#r�r�s@r0r�r�&s1����0@�U�=�#�#5�6�@��
+�c�+r2r�c���eZdZ	ddd�deeefdejeeefdejeeeff�fd�Zdefd�Z	dd	�Z
d
�fd
�	Z�xZS)rN�rr�rrc���t�|�|�|xs|}d|_|}t|t�r|j|�}|j
|�yr1)r�r1r�rXr&r�r)r.r�rr�enderr�s     �r0r1z_MultipleMatch.__init__RsN���	������"�7��������e�X�&��,�,�U�3�E����E�r2rWc�n�t|t�r|j|�}|�
||_|Sd|_|Sr,)rXr&r��	not_ender)r.rs  r0rz_MultipleMatch.stopOnas=���e�X�&��,�,�U�3�E�#(�#4�%������;?����r2c�j�|jj}|j}|jdu}|r|jj}|r	||�||||�\}}	|j
}		|r	||�|	r
|||�}
n|}
|||
|�\}}||z
}�,#ttf$rY||fSwxYwr,)r�r'rCrrir�r�rV)r.r�r�r!�self_expr_parse�self_skip_ignorables�check_ender�
try_not_enderr`�hasIgnoreExprsr��	tmptokenss            r0rLz_MultipleMatch.parseImplgs����)�)�*�*��#�3�3���n�n�D�0��� �N�N�4�4�M���(�C�(�%�h��Y�?���V�	�%)�%5�%5�!5�5�N���!�(�C�0�!�1�(�C�@�F� �F�!0��6�9�!M���Y��)�#�����
�+�	���F�{��	�s�";B�B2�1B2c
����tjr�tj|jvr�|jg|jj�zD]�}t
|t�s�|js�!tj|jvs�>tjdjd|t|�j|j�d����t�|�=||�Sr)rLrYrcrr�rrXr�r�r=rNr�r�r5r�rr s    �r0rz_MultipleMatch._setResultsName�s�����>�>��E�E��*�*�+��i�i�[�4�9�9�#4�#4�#6�6���q�-�0��
�
�#�M�M��/�/�0��M�M�E�EK�V�G� � ��J�/�/��M�M�	F�$%�	�7�$�w�&�t�^�<�<r2r,r�r�)
r5r:r;r
r8r�r�r�r1rrLrr�r�s@r0rrQs����?C�
�
>B�
��C��&�'�
�����}�c�'9�!:�;�
�
����m�S�&8� 9�:�
��}���8=�=r2rc��eZdZdZdefd�Zy)r�au
    Repetition of one or more of the given expression.

    Parameters:

    - ``expr`` - expression that must match one or more times
    - ``stop_on`` - (default= ``None``) - expression for a terminating sentinel
      (only required if the sentinel would ordinarily match the repetition
      expression)

    Example::

        data_word = Word(alphas)
        label = data_word + FollowedBy(':')
        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).set_parse_action(' '.join))

        text = "shape: SQUARE posn: upper left color: BLACK"
        attr_expr[1, ...].parse_string(text).pprint()  # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']]

        # use stop_on attribute for OneOrMore to avoid reading label string as part of the data
        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))
        OneOrMore(attr_expr).parse_string(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']]

        # could also be written as
        (attr_expr * (1,)).parse_string(text).pprint()
    rWc�8�dt|j�zdzS)NrKz}...rr�s r0r#zOneOrMore._generateDefaultName�����S����^�#�f�,�,r2N)r5r:r;rAr8r#r<r2r0r�r��s���6-�c�-r2r�c���eZdZdZ	ddd�deeefdejeeefdejeeeff�fd�Z	d�fd�	Z
d	efd
�Z�xZS)
r�ap
    Optional repetition of zero or more of the given expression.

    Parameters:

    - ``expr`` - expression that must match zero or more times
    - ``stop_on`` - expression for a terminating sentinel
      (only required if the sentinel would ordinarily match the repetition
      expression) - (default= ``None``)

    Example: similar to :class:`OneOrMore`
    Nrr�rrc�>��t�|�||xs|��d|_y)NrTr)r.r�rrr�s    �r0r1zZeroOrMore.__init__�s$���	����f�&7���8�"��r2c���	t�|�|||�S#ttf$r|t	g|j
��fcYSwxYw)Nr+)r�rLr�rVr#r�r�s    �r0rLzZeroOrMore.parseImpl�sK���	@��7�$�X�s�I�>�>���
�+�	@���R�d�.>�.>�?�?�?�	@�s��(?�?rWc�8�dt|j�zdzS)NrIz]...rr�s r0r#zZeroOrMore._generateDefaultName�r)r2r,r�)
r5r:r;rAr
r8r�r�r�r1rLr#r�r�s@r0r�r��s|���� ?C�#�
>B�#��C��&�'�#�����}�c�'9�!:�;�#�
����m�S�&8� 9�:�#�@�-�c�-r2r�c���eZdZ				ddd�deeefdeeefdedeje	deje	def�fd	�Z
d
efd�Z�xZS)
�
DelimitedListF)�allow_trailing_delimr��delim�combiner�rDr0c���t|t�rtj|�}t	j
t|�}|�|dkrt
d��|�|�||krt
d��||_t|�|_	||_
||_|st|�|_
|xsd|_
||_||_|j|j|jz|jdz
|j�dn|jdz
fzz}|jr|t!|j�z
}|jrt#|�}t$�|�M|d��y)aaHelper to define a delimited list of expressions - the delimiter
        defaults to ','. By default, the list elements and delimiters can
        have intervening whitespace, and comments, but this can be
        overridden by passing ``combine=True`` in the constructor. If
        ``combine`` is set to ``True``, the matching tokens are
        returned as a single token string, with the delimiters included;
        otherwise, the matching tokens are returned as a list of tokens,
        with the delimiters suppressed.

        If ``allow_trailing_delim`` is set to True, then the list may end with
        a delimiter.

        Example::

            DelimitedList(Word(alphas)).parse_string("aa,bb,cc") # -> ['aa', 'bb', 'cc']
            DelimitedList(Word(hexnums), delim=':', combine=True).parse_string("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE']
        Nrzmin must be greater than 0z)max must be greater than, or equal to minTr�)rXr&r�r�r�rr��contentr8�	raw_delimr1r2r
r�rDr0r��Combiner�r1)	r.r�r1r2r�rDr0�delim_list_exprr�s	        �r0r1zDelimitedList.__init__�s4���6�d�H�%� �4�4�T�:�D��{�{�=�$�/���?��Q�w� �!=�>�>��?���3��9� �!L�M�M�����U������
�����!�%��D�J��8�!������$8��!��,�,�$�*�*�t�|�|�*C��H�H�q�L��H�H�$�D�$�(�(�Q�,�H
�*
�
���$�$��s�4�:�:��.�O��<�<�%�o�6�O�
����4��8r2rWc�j�dj|jj�|j�S)Nz{0} [{1} {0}]...)r�r4r�r5r�s r0r#z"DelimitedList._generateDefaultNames&��!�(�(����)@�)@�)B�D�N�N�S�Sr2)r�FNN)
r5r:r;r
r8r�rxr�r�r|r1r#r�r�s@r0r/r/�s����,/��$(�$(�
:9�&+�:9��C��&�'�:9��S�-�'�(�:9��	:9�
�_�_�S�
!�:9��_�_�S�
!�
:9�#�:9�xT�c�Tr2r/c��eZdZd�Zd�Zy)�
_NullTokenc��yr�r<r�s r0�__bool__z_NullToken.__bool__"s��r2c��yr�r<r�s r0r,z_NullToken.__str__%s��r2N)r5r:r;r<r,r<r2r0r:r:!s���r2r:c�\��eZdZdZe�Zefdeeefde	f�fd�
Z
dd�Zdefd�Z�xZ
S)	r�aO
    Optional matching of the given expression.

    Parameters:

    - ``expr`` - expression that must match zero or more times
    - ``default`` (optional) - value to be returned if the optional expression is not found.

    Example::

        # US postal code can be a 5-digit zip, plus optional 4-digit qualifier
        zip = Combine(Word(nums, exact=5) + Opt('-' + Word(nums, exact=4)))
        zip.run_tests('''
            # traditional ZIP code
            12345

            # ZIP+4 form
            12101-0001

            # invalid ZIP
            98765-
            ''')

    prints::

        # traditional ZIP code
        12345
        ['12345']

        # ZIP+4 form
        12101-0001
        ['12101-0001']

        # invalid ZIP
        98765-
             ^
        FAIL: Expected end of text (at char 5), (line:1, col:6)
    r��defaultc�z��t�|�|d��|jj|_||_d|_y)NFr�T)r�r1r�r��defaultValuer�)r.r�r?r�s   �r0r1zOpt.__init__Ss8���	������.��)�)�.�.���#���"��r2c��|j}	|j|||d��\}}||fS#ttf$rN|j}||j
ur,|jrt|g�}|||j<n|g}ng}Y||fSwxYw)NFr�)r�r'r�rVrA�_Opt__optionalNotMatchedr�r#)r.r�r�r!�	self_exprr`�
default_values       r0rLz
Opt.parseImpl[s����I�I�	�	�#�*�*�8�S�)�RW�*�X�K�C���F�{����
�+�		� �-�-�M��D�$=�$=�=��(�(�)�=�/�:�F�4A�F�9�0�0�1�+�_�F�����F�{��		�s�*�AB�BrWc���t|j�}t|�dkDrB|ddt|�dz
�dk(r+|dd}t|�dkDr|ddt|�dz
�dk(r�+d|zdzS)NrrrKr�rIr�)r8r�rFrLs  r0r#zOpt._generateDefaultNameksy���D�I�I����%�j�1�n��q�':�C��J��N�':�!;�t�!C��!�B�K�E��%�j�1�n��q�':�C��J��N�':�!;�t�!C��U�{�S� � r2r�)r5r:r;rAr:rCr
r�r8rr1rLr#r�r�s@r0r�r�)sI���%�N&�<��?S�#��-��,�-�#�8;�#�� !�c�!r2r�c����eZdZdZ			ddd�deeefdedejeeefdejeeefdejeeeff
�fd	�Z
dd
�Z�xZS)
r�a+

    Token for skipping over all undefined text until the matched
    expression is found.

    Parameters:

    - ``expr`` - target expression marking the end of the data to be skipped
    - ``include`` - if ``True``, the target expression is also parsed
      (the skipped text and target expression are returned as a 2-element
      list) (default= ``False``).
    - ``ignore`` - (default= ``None``) used to define grammars (typically quoted strings and
      comments) that might contain false matches to the target expression
    - ``fail_on`` - (default= ``None``) define expressions that are not allowed to be
      included in the skipped test; if found before the target expression is found,
      the :class:`SkipTo` is not a match

    Example::

        report = '''
            Outstanding Issues Report - 1 Jan 2000

               # | Severity | Description                               |  Days Open
            -----+----------+-------------------------------------------+-----------
             101 | Critical | Intermittent system crash                 |          6
              94 | Cosmetic | Spelling error on Login ('log|n')         |         14
              79 | Minor    | System slow when running too many reports |         47
            '''
        integer = Word(nums)
        SEP = Suppress('|')
        # use SkipTo to simply match everything up until the next SEP
        # - ignore quoted strings, so that a '|' character inside a quoted string does not match
        # - parse action will call token.strip() for each matched token, i.e., the description body
        string_data = SkipTo(SEP, ignore=quoted_string)
        string_data.set_parse_action(token_map(str.strip))
        ticket_expr = (integer("issue_num") + SEP
                      + string_data("sev") + SEP
                      + string_data("desc") + SEP
                      + integer("days_open"))

        for tkt in ticket_expr.search_string(report):
            print tkt.dump()

    prints::

        ['101', 'Critical', 'Intermittent system crash', '6']
        - days_open: '6'
        - desc: 'Intermittent system crash'
        - issue_num: '101'
        - sev: 'Critical'
        ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14']
        - days_open: '14'
        - desc: "Spelling error on Login ('log|n')"
        - issue_num: '94'
        - sev: 'Cosmetic'
        ['79', 'Minor', 'System slow when running too many reports', '47']
        - days_open: '47'
        - desc: 'System slow when running too many reports'
        - issue_num: '79'
        - sev: 'Minor'
    N)�failOnr��includer�fail_onrHc�$��t�|�|�|xs|}|�|j|�d|_d|_||_d|_t|t�r|j|�|_
n||_
dt|j�z|_
y)NTFzNo match found for )r�r1rr�r��includeMatchr�rXr&r�rHr8r�r�)r.r�rIrrJrHr�s      �r0r1zSkipTo.__init__�s����	������"�7�����K�K���"���"���#�������f�h�'��2�2�6�:�D�K� �D�K�+�c�$�)�)�n�<��r2c��|}t|�}|jj}|j�|jjnd}|j
r|jnd}|}	|	|kr%|�
|||	�rn1|�	|||	�}		|||	dd��nt|||j|��|	}|||}
t|
�}|jr||||d��\}}||z
}||fS#ttf$r|	dz
}	YnwxYw|	|kr���o)NF)r!r"rr�)rFr�r'rHr�rrIr�rVr�r#rL)
r.r�r�r!r�rGr �self_failOn_canParseNext�
self_preParse�tmploc�skiptext�
skipresultr:s
             r0rLzSkipTo.parseImpl�s+�����x�=���)�)�*�*��(,���(?�D�K�K�$�$�T�	!�*.�):�):��
�
��
����� �'�3�+�H�f�=���(�&�x��8��
���&�E�PU�V��!��3����T�B�B����H�S�)��!�(�+�
����&�x��i�e�T�H�C���#��J��J����)#�J�/�
��!���
���� �s�C�C3�2C3)FNNr�)
r5r:r;rAr
r�r8rxr�r�r1rLr�r�s@r0r�r�vs����;�@�=A�>B�=�>B�=��]�C�'�(�=��=�����m�S�&8� 9�:�	=�
����}�c�'9�!:�;�=�����m�S�&8� 9�:�=�.*r2r�c���eZdZdZddej
eeeff�fd�
Z	dd�Z
dd�Zd�fd�Zd�Z
d�fd	�	Zdd
edefd�Zdd
edefd�Zdefd
�Zddd�Zdefd�Zdef�fd�Zd�fd�	Zee�d��Zee�d��Z�xZS)rmaw
    Forward declaration of an expression to be defined later -
    used for recursive grammars, such as algebraic infix notation.
    When the expression is known, it is assigned to the ``Forward``
    variable using the ``'<<'`` operator.

    Note: take care when assigning to ``Forward`` not to overlook
    precedence of operators.

    Specifically, ``'|'`` has a lower precedence than ``'<<'``, so that::

        fwd_expr << a | b | c

    will actually be evaluated as::

        (fwd_expr << a) | b | c

    thereby leaving b and c out as parseable alternatives.  It is recommended that you
    explicitly group the values inserted into the ``Forward``::

        fwd_expr << (a | b | c)

    Converting to use the ``'<<='`` operator instead will avoid this problem.

    See :class:`ParseResults.pprint` for an example of a recursive
    parser created using ``Forward``.
    r�c�r��tjd��d|_t�|�|d��d|_y)Nrdr�rFr�)r�r��caller_framer�r1�lshift_liner�s  �r0r1zForward.__init__s5���%�3�3�!�<�Q�?���
������/���r2rWc��t|d�r|`t|t�r|j	|�}t|t
�stS||_|j|_|jj|_	|jj|_
|j|jj|jj��|jj|_|jj|_|j j#|jj �t%j&d��d|_|S)NrUr�rdr����)r(rUrXr&r�r�r�r�r�r�r�rr�r�r�r�r�r
r�r�rVr�s  r0�
__lshift__zForward.__lshift__s���4��(��!��e�X�&��,�,�U�3�E��%��/�!�!���	� �,�,���!�Y�Y�4�4���"�i�i�6�6����!�!��I�I� � ��	�	�0O�0O�	"�	
�#�i�i�6�6����)�)�.�.���������	�	� 5� 5�6�$�2�2��;�B�?����r2c�8�t|t�stS||zSr,)rXr�r�r�s  r0�__ilshift__zForward.__ilshift__0s���%��/�!�!��u�}�r2c���tjd��d}tjrB||jk(r3t
j|jvrtjdd��t�|�)|�}|S)Nrdr�rXz<using '<<' operator with '|' is probably an error, use '<<='r;)r�r�rLr^rVrcrr=rNr�r�)r.r��caller_liner8r�s    �r0r�zForward.__or__6so����-�-�A�6�r�:���=�=��t�/�/�/��D�D��*�*�+�
�M�M�N��
��g�n�U�#���
r2c��|j�ttjrctj|jvrFtjdt|jj|jj��yyyy)NzIForward defined here but no expression attached later using '<<=' or '<<')�filenamer�)r�rLr\rcrr=�
warn_explicit�UserWarningrUr_r�r�s r0�__del__zForward.__del__Esm��
�I�I���6�6��9�9��AX�AX�X��"�"�[���*�*�3�3��(�(�/�/�	
�Y�7�
r2c	�n��|j��tjr�tj|jvrdd}tjd��}tt|�d��D]\}}|j|vs�|dz}nd}tjd|��tjst�|�=|||�Stj 5tj"}		|	|||f\}
}t%|t&�r|�|
|j)�fcddd�S#t*$�r||d	f}||d
f}
|dz
t-||d|�fx\}
}|	|
<|r|	|
|	|<		t�|�=||d
�\}}n$#t,$rt%|t&�r�|
|}}YnwxYw||
krR|r0|	|x\}
}|	|
<|	|
=|	|=|
|j)�fcYcddd�S|	|
=|
|j)�fcYcddd�S|r4	t�|�=||d	�|	|<n#t,$r}||fx|	|
<|	|<�d}~wwxYw||fx\}
}|	|
<��wxYw#1swYyxYw)N)r�r�r�r���r�r)r�rdzGForward expression was never assigned a value, will not parse any inputr;TFz#Forward recursion without base case)r�rLr[rcrr�r�r4�reversedrTr=rNr�r�r�rLr�rnrXrWr�KeyErrorr�)r.r�r�r!�	parse_fnsr�ru�frmr<�memo�prev_loc�prev_result�act_key�peek_key�	prev_peek�new_loc�new_peekr?r�s                  �r0rLzForward.parseImplSs�����I�I���:�:��=�=��*�*�+��I��(�(�s�3�B�#�H�R�L��:���3��8�8�y�(�!"�Q��J��;�
�
��M�M�Y�%�
��4�4��7�$�X�s�I�>�>�(�
)�
)� �0�0�D�-
Q�(,�S�$�	�-A�(B�%��+��k�9�5�%�%���!1�!1�!3�3�*�
)���'
Q���d�+����u�-���!�G�"� �#�'L�d��8��#��)�d�8�n��$(��N�D��M��@�,1�G�,=�h��U�,S�)����)�@�%�i��;�!�,4�i���	@���(�*�$�FJ�'�]�R�1�H�k�D��N� $�X���W�
�#+�[�-=�-=�-?�#?�?�I*�
)�J!��N�'����)9�9�9�M*�
)�R%�&�05��0A�(�C�QU�0V��W�
��#1�&�BI�1�� M��X���g�� %��&��@G��?P�P�+��)�d�8�n�5�'
Q��*�
)�s~�H+�!.D�:H(�E)�(H(�)F
�H(�	F
�
/H(�9H+�H(�H+�$H(�'G<�;H(�<	H�
H�H�H(�(H+�+H4rc��d|_|Sr�rrs  r0rzForward.leave_whitespace�s��#����r2c��d|_|Sr1rrs  r0rzForward.ignore_whitespace�s��"����r2c�x�|js-d|_|j�|jj�|Sr1)r�r�r�r�s r0r�zForward.streamline�s2�����#�D���y�y�$��	�	�$�$�&��r2c���tjdtd��|�g}||vr0|dd|gz}|j�|jj	|�|jg�yrr�r�s   r0r@zForward.validate�sg���
�
�h���	
�
� ��M��}�$���"�d�V�+�C��y�y�$��	�	�"�"�3�'����R� r2c���d|_d}	|j�t|j�dd}nd}|jjdz|zS#|jjdz|zccYSxYw)Nz: ...r�i��Nonere)r�r�r8r�r5)r.�	retStrings  r0r#zForward._generateDefaultName�sn��#����	�	>��y�y�$���	�	�N�5�D�1�	�"�	��>�>�*�*�T�1�I�=�=��4�>�>�*�*�T�1�I�=�=�s�'A�A/c�Z��|j�t�|�	�St�}||z}|Sr,)r�r�rrm)r.r8r�s  �r0rzForward.copy�s.����9�9� ��7�<�>�!��)�C��D�L�C��Jr2c	�
��tjrctj|jvrG|j�;tjdjd|t|�j�d��t�|�-||�S)NzO{}: setting results name {!r} on {} expression that has no contained expressionrZr'r;)rLrZrcrr�r=rNr�r�r5r�r)r.rTrr�s   �r0rzForward._setResultsName�su����3�3��:�:��*�*�+��y�y� ��
�
�7�7=�v�8�$��T�
�@S�@S�8� !���w�&�t�-=�>�>r2c��yr,r<r�s r0r�zForward.leaveWhitespace�r�r2c��yr,r<r�s r0r�zForward.ignoreWhitespace�r�r2r,)rWrmr�r�rVr�)r5r:r;rAr�r�r
r�r8r1rYr[r�rbrLrxrrr�r@r#rrr!r�r�r�r�s@r0rmrm�s�����8 �f�o�o�e�M�3�4F�.G�H� �
�,�
��]Q�~�$��-���4��=���M��
!�>�c�>��m��?�&�&�'�"�(�"��'�(�#�)�#r2rmc�4��eZdZdZddeeeff�fd�
Z�xZS)�TokenConverterzW
    Abstract subclass of :class:`ParseExpression`, for converting parsed results.
    r�c�2��t�|�|�d|_yr�)r�r1r��r.r�r�r�s   �r0r1zTokenConverter.__init__s���
�������r2r�)	r5r:r;rAr
r�r8r1r�r�s@r0r}r}s#���� �U�=�#�#5�6� � r2r}c�p��eZdZdZ		ddd�dedededejef�fd�Z	d	ef�fd
�Z
d�Z�xZS)
r6a�Converter to concatenate all matching tokens to a single string.
    By default, the matching patterns must also be contiguous in the
    input string; this can be disabled by specifying
    ``'adjacent=False'`` in the constructor.

    Example::

        real = Word(nums) + '.' + Word(nums)
        print(real.parse_string('3.1416')) # -> ['3', '.', '1416']
        # will also erroneously match the following
        print(real.parse_string('3. 1416')) # -> ['3', '.', '1416']

        real = Combine(Word(nums) + '.' + Word(nums))
        print(real.parse_string('3.1416')) # -> ['3.1416']
        # no match when there are internal spaces
        print(real.parse_string('3. 1416')) # -> Exception: Expected W:(0123...)
    N)�
joinStringr��join_string�adjacentr�c���t�|�|�|�|n|}|r|j�||_d|_||_d|_yr1)r�r1rr�r�r�r)r.r�r�r�r�r�s     �r0r1zCombine.__init__sK���	�����#-�#9�Z�{�
���!�!�#� ��
�"���$��� ��r2rWc�n��|jrtj||�|St�|�	|�|Sr,)r�r�rr�r�s  �r0rzCombine.ignore0s4����=�=�� � ��u�-���
�G�N�5�!��r2c���|j�}|dd�=|tdj|j|j��g|j
��z
}|jr|j�r|gS|S)Nrw)rU)rr#r��
_asStringListr�r�r��haskeys)r.r�r�rP�retTokss     r0rQzCombine.postParse7sm���.�.�"���A�J��<�
�W�W�Y�,�,�T�_�_�=�
>�?�t�GX�GX�
�	
�������� 1��9���Nr2)rwT)
r5r:r;rAr�r8rxr�r�r1rrQr�r�s@r0r6r6s_����*��	!�,0�
!��!��!��	!��O�O�C�(�
!�$�}��
r2r6c�4��eZdZdZddedef�fd�
Zd�Z�xZS)r�a�Converter to return the matched tokens as a list - useful for
    returning tokens of :class:`ZeroOrMore` and :class:`OneOrMore` expressions.

    The optional ``aslist`` argument when set to True will return the
    parsed tokens as a Python list instead of a pyparsing ParseResults.

    Example::

        ident = Word(alphas)
        num = Word(nums)
        term = ident | num
        func = ident + Opt(DelimitedList(term))
        print(func.parse_string("fn a, b, 100"))
        # -> ['fn', 'a', 'b', '100']

        func = ident + Group(Opt(DelimitedList(term)))
        print(func.parse_string("fn a, b, 100"))
        # -> ['fn', ['a', 'b', '100']]
    r��aslistc�@��t�|�|�d|_||_yr1)r�r1r��
_asPythonList)r.r�r�r�s   �r0r1zGroup.__init__Y����
��������#��r2c��|jrBtjt|t�r|j	��St|��S|gSr,)r�r#rrXrTr�rOs    r0rQzGroup.postParse^sS������$�$��i��6�� � �"��
��)�_��
��;�r2r��	r5r:r;rAr�rxr1rQr�r�s@r0r�r�Ds ����($�]�$�D�$�
r2r�c�4��eZdZdZddedef�fd�
Zd�Z�xZS)r�arConverter to return a repetitive expression as a list, but also
    as a dictionary. Each element can also be referenced using the first
    token in the expression as its key. Useful for tabular report
    scraping when the first column can be used as a item key.

    The optional ``asdict`` argument when set to True will return the
    parsed tokens as a Python dict instead of a pyparsing ParseResults.

    Example::

        data_word = Word(alphas)
        label = data_word + FollowedBy(':')

        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))

        # print attributes as plain groups
        print(attr_expr[1, ...].parse_string(text).dump())

        # instead of OneOrMore(expr), parse using Dict(Group(expr)[1, ...]) - Dict will auto-assign names
        result = Dict(Group(attr_expr)[1, ...]).parse_string(text)
        print(result.dump())

        # access named fields as dict entries, or output as dict
        print(result['shape'])
        print(result.as_dict())

    prints::

        ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap']
        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
        - color: 'light blue'
        - posn: 'upper left'
        - shape: 'SQUARE'
        - texture: 'burlap'
        SQUARE
        {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'}

    See more examples at :class:`ParseResults` of accessing fields by results name.
    r��asdictc�@��t�|�|�d|_||_yr1)r�r1r��
_asPythonDict)r.r�r�r�s   �r0r1z
Dict.__init__�r�r2c���t|�D]�\}}t|�dk(r�|d}t|t�rt	|�j�}t|�dk(rt
d|�||<�at|�dk(r&t|dt�st
|d|�||<��	|j�}|d=t|�dk7s t|t�r |j�rt
||�||<��t
|d|�||<��|jr-|jr|j�gS|j�S|jr|gS|S#t$rtd�}|d�wxYw)Nrrrwrdzdcould not extract dict values from parsed results - Dict expression must contain Grouped expressions)r4rFrXr|r8rgr$r#rrWr�r�r�r��as_dict)	r.r�r�rPru�tok�ikey�	dictvaluer�s	         r0rQzDict.postParse�s_���	�*�F�A�s��3�x�1�}���q�6�D��$��$��4�y���(���3�x�1�}�"9�"�a�"@�	�$���S��Q��z�#�a�&�,�'G�"9�#�a�&�!�"D�	�$��(� #���
�I��a�L��y�>�Q�&��y�,�7�I�<M�<M�<O�&=�i��&K�I�d�O�&=�i��l�A�&N�I�d�O�?+�B���,0�,<�,<�I�%�%�'�(�U�)�BS�BS�BU�U�"&�"2�"2�I�;�A�	�A��'!�(�#�N��C��4�'�(�s�"E�E)r�r�r�s@r0r�r�is"���'�R$�]�$�D�$�
%Br2r�c�b��eZdZdZd
deeefdef�fd�
Zd�fd�Z	d�fd�Z
d�Zdefd	�Z�xZ
S)r
a�Converter for ignoring the results of a parsed expression.

    Example::

        source = "a, b, c,d"
        wd = Word(alphas)
        wd_list1 = wd + (',' + wd)[...]
        print(wd_list1.parse_string(source))

        # often, delimiters that are useful during parsing are just in the
        # way afterward - use Suppress to keep them out of the parsed output
        wd_list2 = wd + (Suppress(',') + wd)[...]
        print(wd_list2.parse_string(source))

        # Skipped text (using '...') can be suppressed as well
        source = "lead in START relevant text END trailing text"
        start_marker = Keyword("START")
        end_marker = Keyword("END")
        find_body = Suppress(...) + start_marker + ... + end_marker
        print(find_body.parse_string(source)

    prints::

        ['a', ',', 'b', ',', 'c', ',', 'd']
        ['a', 'b', 'c', 'd']
        ['START', 'relevant text ', 'END']

    (See also :class:`DelimitedList`.)
    r�r�c�R��|durtt��}t�|�
|�y)N.)r�r�r�r1rs   �r0r1zSuppress.__init__�s#����3�;���	�*�D�
����r2rWc���t|jt�rtt	|��|zSt
�|�|�Sr,)rXr�r�r
r�r�r�r�s  �r0r�zSuppress.__add__��4����d�i�i��.��F�5�M�*�U�2�2��7�?�5�)�)r2c���t|jt�rtt	|��|z
St
�|�|�Sr,)rXr�r�r
r�r�r�r�s  �r0r�zSuppress.__sub__�r�r2c��gSr,r<rOs    r0rQzSuppress.postParse�r3r2c��|Sr,r<r�s r0rzSuppress.suppress�s���r2r�r�)r5r:r;rAr
r�r8rxr1r�r�rQrr�r�s@r0r
r
�s@����<�U�=�#�#5�6��$��
*�*���-�r2r
rJc�J��t����fd�}�j|_|S)asDecorator for debugging parse actions.

    When the parse action is called, this decorator will print
    ``">> entering method-name(line:<current_source_line>, <parse_location>, <matched_tokens>)"``.
    When the parse action completes, the decorator will print
    ``"<<"`` followed by the returned value, or any exception that the parse action raised.

    Example::

        wd = Word(alphas)

        @trace_parse_action
        def remove_duplicate_chars(tokens):
            return ''.join(sorted(set(''.join(tokens))))

        wds = wd[1, ...].set_parse_action(remove_duplicate_chars)
        print(wds.parse_string("slkdjs sld sldd sdlf sdljf"))

    prints::

        >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {}))
        <<leaving remove_duplicate_chars (ret: 'dfjkls')
        ['dfjkls']
    c����j}|dd\}}}t|�dkDr|djjdz|z}tjjd|�dt
||��d|�d|�d�	�	�|�}tjjd	|�d|�d��|S#t$r,}tjjd	|�d
|�d���d}~wwxYw)N���r'r�.z>>entering z(line: rfz)
z
<<leaving z
 (exception: z (ret: )r5rFr�rk�stderrrmr�rW)�paArgs�thisFuncr�r�r�r8r�rJs       �r0�zztrace_parse_action.<locals>.zs�����:�:�����+���1�a��v�;��?��a�y�*�*�3�3�c�9�H�D�H��
�
���;�x�j���Q��
�~�R��s�"�Q�E�QT�U�V�	��V�*�C�	�
�
���:�h�Z�w�s�g�S�A�B��
��	�	��J�J���z�(��=���S�I�J���	�s�;B(�(	C�1'C�C)r�r5)rJr�s` r0�trace_parse_actionr��s%���2	�A��A�����A�J��Hr2�empty�
line_start�line_end�string_start�
string_endz\\[\\[\]\/\-\*\.\$\+\^\?()~ ]c��|ddSrr<r	s   r0r�r�,s��A�a�D��Gr2z\\0?[xX][0-9a-fA-F]+c�P�tt|djd�d��S)Nrz\0xrb)�chrr|rpr	s   r0r�r�/s��C��A�a�D�K�K��/��4�5r2z	\\0[0-7]+c�8�tt|dddd��S)Nrrr()r�r|r	s   r0r�r�2s��C��A�a�D���H�a�(�)r2z\])rEr(rIr��negate�bodyr�r�c���d��	dj�fd�tj|�jD��S#t$r
}Yd}~yd}~wwxYw)a	Helper to easily define string ranges for use in :class:`Word`
    construction. Borrows syntax from regexp ``'[]'`` string range
    definitions::

        srange("[0-9]")   -> "0123456789"
        srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"
        srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"

    The input string must be enclosed in []'s, and the returned string
    is the expanded character set joined into a single string. The
    values enclosed in the []'s may be:

    - a single character
    - an escaped character with a leading backslash (such as ``\-``
      or ``\]``)
    - an escaped hex character with a leading ``'\x'``
      (``\x21``, which is a ``'!'`` character) (``\0x##``
      is also supported for backwards compatibility)
    - an escaped octal character with a leading ``'\0'``
      (``\041``, which is a ``'!'`` character)
    - a range of any of the above, separated by a dash (``'a-z'``,
      etc.)
    - any combination of the above (``'aeiouy'``,
      ``'a-zA-Z0-9_$'``, etc.)
    c
��t|t�s|Sdjd�tt	|d�t	|d�dz�D��S)Nrwc3�2K�|]}t|����y�wr,)r�r�s  r0r�z+srange.<locals>.<lambda>.<locals>.<genexpr>]s����E�%D��S��V�%D�r.rr)rXr#r�r��ord)�ps r0r�zsrange.<locals>.<lambda>[sJ���!�\�*��F�
�W�W�E�U�3�q��t�9�c�!�A�$�i�!�m�%D�E�
E�Fr2rwc3�.�K�|]}�|����y�wr,r<)rI�part�	_expandeds  �r0r�zsrange.<locals>.<genexpr>`s�����W�3V�4�y���3V�s�N)r��_reBracketExprr�r�rW)r�r?r�s  @r0�sranger�@sL���6	F��
��w�w�W�>�3N�3N�q�3Q�3V�3V�W�W�W�������s�6=�	A�Ac�f�����fd�}t�dt�d�j�}||_|S)a^Helper to define a parse action by mapping a function to all
    elements of a :class:`ParseResults` list. If any additional args are passed,
    they are forwarded to the given function as additional arguments
    after the token, as in
    ``hex_integer = Word(hexnums).set_parse_action(token_map(int, 16))``,
    which will convert the parsed data to an integer using base 16.

    Example (compare the last to example in :class:`ParserElement.transform_string`::

        hex_ints = Word(hexnums)[1, ...].set_parse_action(token_map(int, 16))
        hex_ints.run_tests('''
            00 11 22 aa FF 0a 0d 1a
            ''')

        upperword = Word(alphas).set_parse_action(token_map(str.upper))
        upperword[1, ...].run_tests('''
            my kingdom for a horse
            ''')

        wd = Word(alphas).set_parse_action(token_map(str.title))
        wd[1, ...].set_parse_action(' '.join).run_tests('''
            now is the winter of our discontent made glorious summer by this sun of york
            ''')

    prints::

        00 11 22 aa FF 0a 0d 1a
        [0, 17, 34, 170, 255, 10, 13, 26]

        my kingdom for a horse
        ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE']

        now is the winter of our discontent made glorious summer by this sun of york
        ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York']
    c�<��|D�cgc]}�|g������
c}Scc}wr,r<)r�r�r��toknr�r/s    ��r0r�ztoken_map.<locals>.pa�s%���./�0�a�d��T�!�D�!�a�0�0��0s�r5r�)r�r5)r/r�r�r�s``  r0�	token_mapr�es2���J1���j�'�$��*D�*M�*M�N�I��B�K�
�Ir2c�0�tj�j}|�ytjt
j|�}|jj�D]4\}}t|t�s�|jr�$|j|��6y)zy
    Utility to simplify mass-naming of parser elements, for
    generating railroad diagram with named subdiagrams.
    N)
rk�	_getframe�f_backr�r�types�	FrameType�f_localsr�rXr�r�r()�
calling_framerT�vars   r0�autoname_elementsr��sk��
�M�M�O�*�*�M�����K�K�����?�M�"�+�+�1�1�3�	��c��c�=�)�#�.�.��L�L���4r2z4"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*�"z string enclosed in double quotesz4'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*�'z string enclosed in single quoteszdouble quoted stringzsingle quoted stringz+quoted string using single or double quotesz""""(?:[^"\\]|""(?!")|"(?!"")|\\.)*r�z"""zmultiline double quoted stringz"'''(?:[^'\\]|''(?!')|'(?!'')|\\.)*z'''zmultiline single quoted stringz5"(?:[^"\n\r\\]|(?:\\")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*z5'(?:[^'\n\r\\]|(?:\\')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*zPython quoted string�uzunicode string literalz#[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]z[\0xa1-\0xbf\0xd7\0xf7]r�c��yr,r<r<r2r0�nullDebugActionr��r�r2c��yr,r<r<r2r0�traceParseActionr��r�r2c��yr,r<r<r2r0�conditionAsParseActionr��r�r2c��yr,r<r<r2r0�tokenMapr��s��r2rV)r'r�r�)��collectionsr�osr�rrrrrr	r
rrr
r�abcrr�enumr�stringrr=rTrk�collections.abcrr�r��operatorr�	functoolsr�	threadingr�pathlibr�utilrrrrrrrrr�r r�r!�
exceptions�actionsr;r#r$�unicoder%�maxsizer�r8�bytesr&r�r��version_infor)r>rLrcrlrorUr�rxr��warnoptions�environr1�sumrFrNrer�r�r�r
r0r�rDr��
GeneratorTyperr|�ParseImplReturnType�PostParseReturnTyper�r�rWr�r�r�r��ascii_uppercase�ascii_lowercase�alphas�Latin1�
identchars�identbodychars�nums�hexnumsr!r��	printable�
whitespacer�r��StackSummaryr�r�r�r�r�r�r�r�r�r�rjr�r�r�rr$r)r,r=rnrrr�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r8r�r�r�rrr�rr�r�r/r:r�r�rmr}r6r�r�r
r�r(r�r�r�r�r�r4�_escapedPunc�_escapedHexChar�_escapedOctChar�_singleChar�
_charRangerr�r�r�r��dbl_quoted_string�sgl_quoted_stringror��python_quoted_string�unicode_string�
alphas8bit�punc8bitrN�valuesrXr��sglQuotedString�dblQuotedString�quotedString�
unicodeString�	lineStart�lineEnd�stringStart�	stringEndr�r�r�r�)r�r�s00r0�<module>r
s�
��
�	�
�����$��
���	�
�$������������:�&��;�;��!�5�\��%��c�	�
�)�4���v��)������.�~��,*�$�*�D$�;�$�4�$�%�K�%�D�%�#���!�?�?�3�/��?E���s�?S��	��"��O�O�R�Z�Z�^�^�$@�A����
��
���	���������$�$���C��H�o���L�(�<�*@�@�A����R��W���l�^�S�
 �!��c�<�
 �#�
%�&��c�3��
%�s�
*�+�-�����R��X���l�^�T�
!�"��c�<�
 �$�
&�'��c�3��
%�t�
+�,�.����C��o�y�A�4�G�H���S�#���=�t�C�D����#�s�O�\�4�8�$�>��� ��c�?�I�t� L�d� R�S��
�	�	�&�"8�"8�	8��
�
%�
%�
0�
0�
�"�)�)�8�8����
��
���T�M�	�
�W�W��!1�!1�P�!1�A�Q�f�>O�>O�5O�a�!1�P�
Q�
�04��y�-�-�4�6�tMR����!'����!5��EI����:GL�
��
��
�#2�
�?C�
�&�
	@��	@��	@�
�	@��		@�
�	@��
	@�"�U��U�	�U��U�
�	U�
�U�R�M�C�M�b<&
�=�&
�R	#�M�	#�?�e�?�2?�e�2?�j�G��"?��?�%,�
�!�s7�e�s7�l?�g�?�6B�g�B�2T?��T?�n|#�5�|#�~
�4�
�,X)�E�X)�vJ�5�J�ZM(��M(�`J(�E�J(�Z#�E�#����>,?�
�,?�^C�m�C�.�-��"C�
�C�(�
��4�m��6i$�m�i$�Z`!�/�`!�F]=��]=�@q=��q=�hkB�?�kB�\j$�-�j$�\=
�'�=
�@;�'�;�*;�%�;�B!�$�!�HO�$�O�d'#�!�'#�T(+�
 �(+�VJ=�(�J=�Z-��-�@-��-�D>T�'�>T�B��G!�
�G!�T���
 ��DE$�!�E$�R �(� �6�n�6�r"�N�"�JTB�>�TB�n4�~�4�n*
�+�*
�+�*
�\	�����!��
�[�
!�
!�,�
/�
��9���j�)���}�%�%�n�5��
�[�
!�
!�,�
/�
��5�6�G�G�����/�0�A�A�5�����%�6�6�)����?�"�_�4�z�%�q�7Q�Q���;��#��.��<�
=�
��C�L�	�#�h����)�*��I�j�;�.�/�0�A�A�&�I�J��c�l���"�c�"�c�"�J+�k�+�\��	�
A�B�S�H��
�(�-�.���	�
A�B�S�H��
�(�-�.���
�B�C�c�I�S�S���
�
D�E��K�U�U������(�8�9���
�0����E��M�W�W�(��	�3�2�<�<�H�5�P��h�/�0�1�
�
E�F��L�V�V���
�
�
E�F��L�V�V����
��(�!�"����}�1�1�3�3�4�=�=�>V�W���:�
;�
��,�-��
�v�}�}��'��!�*�Q�
�">�A��'���]�#��$��#�����
��	�
�����	��#�$��%���$�%��&���+�,�!�-�!��)������uvQ��Bv's�2a�a�7a#�a#python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/unicode.cpython-312.pyc000064400000031663151732702370023732 0ustar00�

R`i�)���ddlZddlmZddlmZmZmZGd�d�ZeeeeefeefZ	Gd�d�Z
Gd�d	e
�Zy)
�N)�filterfalse)�List�Tuple�Unionc��eZdZd�Zd�Zy)�_lazyclasspropertyc�V�||_|j|_|j|_y)N)�fn�__doc__�__name__)�selfr
s  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/unicode.py�__init__z_lazyclassproperty.__init__	s������z�z�������
�c�(����t|��t�d�r!t�fd��jddD��ri�_|j
j}|�jvr|j���j|<�j|S)N�_internc3�P�K�|]}�jt|dg�u���y�w)rN)r�getattr)�.0�
superclass�clss  �r�	<genexpr>z-_lazyclassproperty.__get__.<locals>.<genexpr>s+�����.
�-�
�
�K�K�7�:�y�"�=�=�-�s�#&�)�type�hasattr�any�__mro__rr
r)r
�objr�attrnames  ` r�__get__z_lazyclassproperty.__get__s�����;��s�)�C��s�I�&�#�.
�!�k�k�!�"�o�.
�+
��C�K��7�7�#�#���3�;�;�&�$(�G�G�C�L�C�K�K��!��{�{�8�$�$rN)r�
__module__�__qualname__rr �rrrrs��$�
%rrc��eZdZUdZgZeed<ed��Zed��Z	ed��Z
ed��Zed��Zed��Z
ed	��Zed
��Zy)�unicode_seta�
    A set of Unicode characters, for language-specific strings for
    ``alphas``, ``nums``, ``alphanums``, and ``printables``.
    A unicode_set is defined by a list of ranges in the Unicode character
    set, in a class attribute ``_ranges``. Ranges can be specified using
    2-tuples or a 1-tuple, such as::

        _ranges = [
            (0x0020, 0x007e),
            (0x00a0, 0x00ff),
            (0x0100,),
            ]

    Ranges are left- and right-inclusive. A 1-tuple of (x,) is treated as (x, x).

    A unicode set can also be defined using multiple inheritance of other unicode sets::

        class CJK(Chinese, Japanese, Korean):
            pass
    �_rangesc	��g}|jD]B}|turn8t|dd�D]&}|jt	|d|ddz���(�Dtt
|��D�cgc]
}t|���c}Scc}w)Nr&r#r���r)rr%r�extend�range�sorted�set�chr)r�ret�cc�rr�cs     r�_chars_for_rangeszunicode_set._chars_for_ranges7s{�����+�+�B��[� ���b�)�R�0���
�
�5��A���2���
�3�4�1��
!'�s�3�x� 0�1� 0�1��A�� 0�1�1��1s�*A?c�h�djttj|j��S)z+all non-whitespace characters in this range�)�joinr�str�isspacer2�rs r�
printableszunicode_set.printablesAs$���w�w�{�3�;�;��0E�0E�F�G�Grc�h�djttj|j��S)z'all alphabetic characters in this ranger4)r5�filterr6�isalphar2r8s r�alphaszunicode_set.alphasF�$���w�w�v�c�k�k�3�+@�+@�A�B�Brc�h�djttj|j��S)z*all numeric digit characters in this ranger4)r5r;r6�isdigitr2r8s r�numszunicode_set.numsKr>rc�4�|j|jzS)z)all alphanumeric characters in this range)r=rAr8s r�	alphanumszunicode_set.alphanumsPs���z�z�C�H�H�$�$rc��djttdjttj
|j��dzdzdz���S)zVall characters in this range that are valid identifier characters, plus underscore '_'r4u:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµºu|ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ�_)r5r+r,r;r6�isidentifierr2r8s r�
identcharszunicode_set.identcharsUsc���w�w����G�G�F�3�#3�#3�S�5J�5J�K�L�R�S�U�U����
�	
�		
rc���djtt|jdzdj|jD�cgc]}d|zj�s�|��c}�z���Scc}w)u�
        all characters in this range that are valid identifier body characters,
        plus the digits 0-9, and · (Unicode MIDDLE DOT)
        r4u0123456789·rE)r5r+r,rGr2rF)rr1s  r�identbodycharszunicode_set.identbodycharscst���w�w����N�N�$�%��g�g�$'�$9�$9�V�$9�q�c�A�g�=S�=S�=U��$9�V����
�

�
	
��Ws�A/�A/c�H�ddlm}||j|j�S)z�
        a pyparsing Word expression for an identifier using this range's definitions for
        identchars and identbodychars
        r)�Word)�pip._vendor.pyparsingrKrGrI)rrKs  r�
identifierzunicode_set.identifierus��	/��C�N�N�C�$6�$6�7�7rN)rr!r"rr&�UnicodeRangeList�__annotations__rr2r9r=rArCrGrIrMr#rrr%r%s����*!#�G�
�"��2��2��H��H��C��C��C��C��%��%��
��
��
��
�"�8��8rr%c��eZdZUdZdej
fgZeed<Gd�de	�Z
Gd�de	�ZGd�d	e	�ZGd
�de	�Z
Gd�d
e	�ZGd�de	�ZGd�de	�ZGd�de	�ZGd�de	�ZeZGd�deee�ZGd�de	�ZGd�de	�ZGd�de	�ZGd�de	�Ze
ZeZeZeZeZeZeZeZ eZ!eZ"y )!�pyparsing_unicodezF
    A namespace class for defining common language unicode_sets.
    � r&c�"�eZdZUdZdgZeed<y)�(pyparsing_unicode.BasicMultilingualPlanez,Unicode set for the Basic Multilingual Plane)rRi��r&N�rr!r"rr&rNrOr#rr�BasicMultilingualPlanerT�s��:��%
��!�	
rrVc�$�eZdZUdZddgZeed<y)�pyparsing_unicode.Latin1z/Unicode set for Latin-1 Unicode Character Range)rR�~)��r&NrUr#rr�Latin1rX�s��=���%
��!�	
rr\c�"�eZdZUdZdgZeed<y)�pyparsing_unicode.LatinAz/Unicode set for Latin-A Unicode Character Range)�ir&NrUr#rr�LatinAr^����=��%
��!�	
rr`c�"�eZdZUdZdgZeed<y)�pyparsing_unicode.LatinBz/Unicode set for Latin-B Unicode Character Range)i�iOr&NrUr#rr�LatinBrc�rarrdc�$�eZdZUdZgd�Zeed<y)�pyparsing_unicode.Greekz.Unicode set for Greek Unicode Character Ranges)#)iBiE)ipiw)izi)i�i�)i�)i�i�)i�i�)i�i�)i&i*)i^)i`)ifij)ii)ii)i iE)iHiM)iPiW)iY)i[)i])i_i})i�i�)i�i�)i�i�)i�i�)i�i�)i�i�)i�i�)i)!)i'i')ie�)i@i�)i�)i�iE�)i��i��r&NrUr#rr�Greekrf�s��<�$%
��!�$	
rrgc�$�eZdZUdZgd�Zeed<y)�pyparsing_unicode.Cyrillicz0Unicode set for Cyrillic Unicode Character Range))ii/)i�i�)i+)ix)i�-i�-)i@�ir�)it�i��)i.�i/�r&NrUr#rr�Cyrillicri�s��>�	%
��!�		
rrjc�$�eZdZUdZgd�Zeed<y)�pyparsing_unicode.Chinesez/Unicode set for Chinese Unicode Character Range))i�.i�.)i�.i�.)i�1i�1)i4i�M)�Ni�)i�i�)i�im�)ip�i�)i�oi�o)i�i�)i�i;�)i@�iH�)ii֦)i�i4�)i@�i�)i �i��)i��i��)i�i�r&NrUr#rr�Chineserl�s��=�%
��!�	
rrnc��eZdZdZGd�de�ZGd�de�ZGd�de�ZeZeZ	eZ
ejejzejzZy)	�pyparsing_unicode.Japanesez`Unicode set for Japanese Unicode Character Range, combining Kanji, Hiragana, and Katakana rangesc�$�eZdZUdZddgZeed<y)� pyparsing_unicode.Japanese.Kanjiz-Unicode set for Kanji Unicode Character Range)rmi��)i0i?0r&NrUr#rr�Kanjirr�s��;� � �)�G�%�
rrsc�$�eZdZUdZgd�Zeed<y)�#pyparsing_unicode.Japanese.Hiraganaz0Unicode set for Hiragana Unicode Character Range))iA0i�0)�0�0)i�0)ip�)i�)iP�iR�)i�r&NrUr#rr�Hiraganaru�s��B�)�G�%�
rrxc�$�eZdZUdZgd�Zeed<y)�#pyparsing_unicode.Japanese.Katakanaz1Unicode set for Katakana  Unicode Character Range)	)rvi�0)rwi�0)i�1i�1)i�2i�2)ie�i��)i�)id�ig�)i�i�)i�r&NrUr#rr�Katakanarzs��C�
)�G�%�

rr{N)rr!r"rr%rsrxr{�漢字�カタカナ�ひらがなr&r#rr�Japaneserp�sd��n�	�K�	�
	�{�
	�	�{�	�������
�M�M����
����
�	rrc�$�eZdZUdZgd�Zeed<y)�pyparsing_unicode.Hangulz7Unicode set for Hangul (Korean) Unicode Character Range))ii�)i.0i/0)i11i�1)i2i2)i`2i{2)i~2)i`�i|�)i�i��)i��i��)i��i��)i��i��)i�i�)i�i�)i�i�)i�i�r&NrUr#rr�Hangulr�s��E�%
��!�	
rr�c��eZdZdZy)�pyparsing_unicode.CJKzTUnicode set for combined Chinese, Japanese, and Korean (CJK) Unicode Character RangeN)rr!r"rr#rr�CJKr�5s��brr�c�$�eZdZUdZddgZeed<y)�pyparsing_unicode.Thaiz,Unicode set for Thai Unicode Character Range)ii:)i?i[r&NrUr#rr�Thair�8s��:���%
��!�	
rr�c�$�eZdZUdZgd�Zeed<y)�pyparsing_unicode.Arabicz.Unicode set for Arabic Unicode Character Range))ii)ii�)iir&NrUr#rr�Arabicr�?s��<�%
��!�	
rr�c�$�eZdZUdZgd�Zeed<y)�pyparsing_unicode.Hebrewz.Unicode set for Hebrew Unicode Character Range)	)i�i�)i�i�)i�i�)i�i6�)i8�i<�)i>�)i@�iA�)iC�iD�)iF�iO�r&NrUr#rr�Hebrewr�Gs��<�
%
��!�
	
rr�c�$�eZdZUdZddgZeed<y)�pyparsing_unicode.Devanagariz2Unicode set for Devanagari Unicode Character Range)i	i	)i�i��r&NrUr#rr�
Devanagarir�Us��@���%
��!�	
rr�N)#rr!r"r�sys�
maxunicoder&rNrOr%rVr\r`rdrgrjrnrr��Koreanr�r�r�r�r��BMP�العربية�中文�кириллица�Ελληνικά�עִברִית�	日本語�	한국어�	ไทย�देवनागरीr#rrrQrQ�s���
���� �!�G�
��
��
�
��
�
��
�
��
�&
��&
�P
�;�
�
�+�
�.,
�;�,
�\
��
�(�F�c�g�x��c�
�{�
�
��
�
��
�
�[�
�!�C��N�
�F�!�����N��I��I��I�)�rrQ)r��	itertoolsr�typingrrrr�intrNr%rQr#rr�<module>r�s[���!�%�%�%�%�(��e�C��H�o�u�S�z�9�:�;��^8�^8�Bg*��g*rpython3.12/site-packages/pip/_vendor/pyparsing/__pycache__/testing.cpython-312.pyc000064400000041524151732702370023756 0ustar00�

R`i�4��H�ddlmZddlZddlmZmZmZmZmZGd�d�Z	y)�)�contextmanagerN�)�
ParserElement�ParseException�Keyword�__diag__�
__compat__c���eZdZdZGd�d�ZGd�d�Ze						ddedeje
d	eje
d
ededejed
ejedefd��Zy)�pyparsing_testzB
    namespace class for classes useful in writing unit tests
    c�4�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	y)	�&pyparsing_test.reset_pyparsing_contexta�
        Context manager to be used when writing unit tests that modify pyparsing config values:
        - packrat parsing
        - bounded recursion parsing
        - default whitespace characters.
        - default keyword characters
        - literal string auto-conversion class
        - __diag__ settings

        Example::

            with reset_pyparsing_context():
                # test that literals used to construct a grammar are automatically suppressed
                ParserElement.inlineLiteralsUsing(Suppress)

                term = Word(alphas) | Word(nums)
                group = Group('(' + term[...] + ')')

                # assert that the '()' characters are not included in the parsed tokens
                self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def'])

            # after exiting context manager, literals are converted to Literal expressions again
        c��i|_y�N)�
_save_context��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/testing.py�__init__z/pyparsing_test.reset_pyparsing_context.__init__-s
��!#�D��c���tj|jd<tj|jd<tj
|jd<tj|jd<tj|jd<tjr(tjj|jd<nd|jd<tj|jd<tj|jd<tjD�cic]}|tt|���c}|jd	<d
tj i|jd<|Scc}w)N�default_whitespace�default_keyword_chars�literal_string_class�verbose_stacktrace�packrat_enabled�packrat_cache_size�
packrat_parse�recursion_enabledr�collect_all_And_tokensr	)r�DEFAULT_WHITE_CHARSrr�DEFAULT_KEYWORD_CHARS�_literalStringClassr�_packratEnabled�
packrat_cache�size�_parse�_left_recursion_enabledr�
_all_names�getattrr	r)r�names  r�savez+pyparsing_test.reset_pyparsing_context.save0sY��7D�7X�7X�D���3�4�:A�:W�:W�D���6�7��1�1�
���&�
�8E�7W�7W�D���3�4�4A�4Q�4Q�D���0�1��,�,�"�/�/�4�4��"�"�(��<@��"�"�#7�8�2?�2F�2F�D����/��5�5�
���#�
�
;C�:M�:M�.�:M�$��g�h��-�-�:M�.�D���z�*�
)�*�*K�*K�0�D���|�,��K��.s�%E.c���tj|jdk7r"tj|jd�|jdt_|jdt
_tj|jd�|jdj�D]-\}}|rtjntj|��/dt_|jdr#tj|jd�n|jd	t_|jd
t_|jdt _|S)NrrrrrFrrrrr	)rr r�set_default_whitespace_charsrrr!�inlineLiteralsUsing�itemsr�enable�disabler#�enable_packratr&r'r	r)rr*�values   r�restorez.pyparsing_test.reset_pyparsing_context.restorePs:���1�1��%�%�&:�;�<��:�:��&�&�';�<��04�/A�/A�BV�/W�M�,�,0�,>�,>�?V�,W�G�)��-�-��"�"�#9�:�
� $�1�1�*�=�C�C�E���e�?�E����x�/?�/?��F� F�-2�M�)��!�!�"3�4��,�,�T�-?�-?�@T�-U�V�'+�'9�'9�/�'J�
�$�48�4F�4F�#�5�M�1�15�0B�0B�<�0P�J�-��Krc�p�t|��}|jj|j�|Sr)�typer�update)r�rets  r�copyz+pyparsing_test.reset_pyparsing_context.copyqs.���$�t�*�,�C����$�$�T�%7�%7�8��Jrc�"�|j�Sr)r+rs r�	__enter__z0pyparsing_test.reset_pyparsing_context.__enter__vs���9�9�;�rc�$�|j�yr)r4)r�argss  r�__exit__z/pyparsing_test.reset_pyparsing_context.__exit__ys���L�L�NrN)
�__name__�
__module__�__qualname__�__doc__rr+r4r9r;r>�rr�reset_pyparsing_contextr
s'��	�0	$�	�@	�B	�
	�	rrDc�N�eZdZdZ	dd�Z	d	d�Z	d	d�Z	d
d�Zee	dfd��Z
y)�&pyparsing_test.TestParseResultsAssertszk
        A mixin class to add parse results assertion methods to normal unittest.TestCase classes.
        Nc��|�"|j||j�|��|�#|j||j�|��yy)z�
            Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``,
            and compare any defined results names with an optional ``expected_dict``.
            N��msg)�assertEqual�as_list�as_dict)r�result�
expected_list�
expected_dictrIs     r�assertParseResultsEqualsz?pyparsing_test.TestParseResultsAsserts.assertParseResultsEquals�sM���(�� � �����0@�c� �J��(�� � �����0@�c� �J�)rc��|j|d��}|rt|j��nt|j��|j	|||��y)z�
            Convenience wrapper assert to test a parser element and input string, and assert that
            the resulting ``ParseResults.asList()`` is equal to the ``expected_list``.
            T)�	parse_all)rNrIN��parse_string�print�dumprKrP)r�expr�test_stringrNrI�verboserMs       r�assertParseAndCheckListz>pyparsing_test.TestParseResultsAsserts.assertParseAndCheckList�sO���&�&�{�d�&�C�F���f�k�k�m�$��f�n�n�&�'��)�)�&�
�SV�)�Wrc��|j|d��}|rt|j��nt|j��|j	|||��y)z�
            Convenience wrapper assert to test a parser element and input string, and assert that
            the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``.
            T)�parseAll)rOrINrS)rrWrXrOrIrYrMs       r�assertParseAndCheckDictz>pyparsing_test.TestParseResultsAsserts.assertParseAndCheckDict�sO���&�&�{�T�&�B�F���f�k�k�m�$��f�n�n�&�'��)�)�&�
�SV�)�Wrc�.�|\}}|��t||�D��cgc]\}}g|�|����}}}|D]�\}	}
}td�|D�d�}td�|D�d�}|�4|j||xs|��5t|
t�r|
�	ddd��ctd�|D�d�}
td�|D�d�}|
|fdk7r|j|
|
||xs|����t
d	|	�����|j||�|��yd
��ycc}}w#1swY��xYw)ah
            Unit test assertion to evaluate output of ``ParserElement.runTests()``. If a list of
            list-dict tuples is given as the ``expected_parse_results`` argument, then these are zipped
            with the report tuples returned by ``runTests`` and evaluated using ``assertParseResultsEquals``.
            Finally, asserts that the overall ``runTests()`` success value is ``True``.

            :param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests
            :param expected_parse_results (optional): [tuple(str, list, dict, Exception)]
            Nc3�BK�|]}t|t�s�|���y�wr)�
isinstance�str��.0�exps  r�	<genexpr>zNpyparsing_test.TestParseResultsAsserts.assertRunTestResults.<locals>.<genexpr>�s����I���J�s�C�4H������c3�`K�|]&}t|t�rt|t�r|���(y�wr)r`r6�
issubclass�	Exceptionrbs  rrezNpyparsing_test.TestParseResultsAsserts.assertRunTestResults.<locals>.<genexpr>�s+�����'/��)�#�t�4��C��9S� �'/�s�,.)�expected_exceptionrIc3�BK�|]}t|t�s�|���y�wr)r`�listrbs  rrezNpyparsing_test.TestParseResultsAsserts.assertRunTestResults.<locals>.<genexpr>������N�H�S�
�3��8M�S�H�rfc3�BK�|]}t|t�s�|���y�wr)r`�dictrbs  rrezNpyparsing_test.TestParseResultsAsserts.assertRunTestResults.<locals>.<genexpr>�rmrf�NN)rNrOrIzno validation for zfailed runTestsrH)�zip�next�assertRaisesr`rirPrU�
assertTrue)r�run_tests_report�expected_parse_resultsrI�run_test_success�run_test_results�rpt�expected�mergedrXrM�fail_msgrjrNrOs               r�assertRunTestResultsz;pyparsing_test.TestParseResultsAsserts.assertRunTestResults�s���2B�.��.�%�1�*-�-=�?U�)V��)V�
��X�%�c�$�8�$�)V���6<�1�K��� $�I��I�4� �H�*.��'/��
�
*�&�*�5�!�.�.�/A�x��SV�/�� *�&�)�<�&,�� =���)-�N�H�N�PT�)�
�)-�N�H�N�PT�)�
�*�=�9�\�I� �9�9� &�.;�.;�$,�O��	:��"�$6�{�o�"F�G�K6<�P
�O�O� �S�_�c�
�
�BS�
�
��Y�(��s�D�3D�D	c#�dK�|j||��5d��ddd�y#1swYyxYw�w)NrH)rs)r�exc_typerIs   r�assertRaisesParseExceptionzApyparsing_test.TestParseResultsAsserts.assertRaisesParseException�s'�����"�"�8��"�5��6�5�5�s�0�$�	0�-�0)NNN)NTrp)r?r@rArBrPrZr]r}rrr�rCrr�TestParseResultsAssertsrF|sT��	�
GK�
	K�GK�	X�GK�	X�FJ�=	�~
�6D�$�	�
�	rr�N�s�
start_line�end_line�expand_tabs�eol_mark�mark_spaces�mark_control�returnc
����|r|j�}|��tjt|�}|dk(rPt	tdd�tdd��D��cic]\}}||��
}	}}d|	d<tj
|	�}
d�nFt|�}tj
ttdd	��dgzD�cic]}||��c}�}
|j|
�}|�F|d
k7rA|dk(r*tj
ddd
��}
|j|
�}n|jd
|�}|�d}|�t|�}t|t|��}ttd|�|�}|dk7r|j�|dz
|}n'|jd�|dz
|D�
cgc]}
|
dz��	}}
|sytt|���td�|D��}d
�dzz}|dk\r5|dj!d�tt|dzd��D��zdz}nd}||zdj!d�t|dz�D��zdz}|d|dzzzdz}||zdj!��fd�t#||��D��zdzScc}}wcc}wcc}
w)u	
        Helpful method for debugging a parser - prints a string with line and column numbers.
        (Line and column numbers are 1-based.)

        :param s: tuple(bool, str - string to be printed with line and column numbers
        :param start_line: int - (optional) starting line number in s to print (default=1)
        :param end_line: int - (optional) ending line number in s to print (default=len(s))
        :param expand_tabs: bool - (optional) expand tabs to spaces, to match the pyparsing default
        :param eol_mark: str - (optional) string to mark the end of lines, helps visualize trailing spaces (default="|")
        :param mark_spaces: str - (optional) special character to display in place of spaces
        :param mark_control: str - (optional) convert non-printing control characters to a placeholding
                                 character; valid values:
                                 - "unicode" - replaces control chars with Unicode symbols, such as "␍" and "␊"
                                 - any single character string - replace control characters with given string
                                 - None (default) - string is displayed as-is

        :return: str - input string with leading line numbers and column number headers
        �unicoder�!i$i3$i!$��� � i	$i#$)�	r�ru␊c3�2K�|]}t|����y�wr)�len)rc�lines  rrez3pyparsing_test.with_line_numbers.<locals>.<genexpr>/s����9���3�t�9�����cc3�4K�|]}d�|dzdz�����y�w)zc                                                                                                   r�dNrC�rc�is  rrez3pyparsing_test.with_line_numbers.<locals>.<genexpr>4s)�����?�� �j�!�a�%�3���0�?�s�r��
c3�2K�|]}d|dzdz�����y�w)z	         r�
NrCr�s  rrez3pyparsing_test.with_line_numbers.<locals>.<genexpr>?s"����X�:W�Q�	�1�q�5�B�,��0�:W�r�r��
1234567890c3�>�K�|]\}}|��d��d|�������y�w)�d�:NrC)rcr�r�r��lineno_widths   ��rrez3pyparsing_test.with_line_numbers.<locals>.<genexpr>Fs6������C�G�A�t��l�^�1�$�%�Q�t�f�X�J�7�C�s�)�start)�
expandtabs�typing�castrarq�range�	maketrans�ordrl�	translate�replacer��min�max�
splitlines�split�join�	enumerate)r�r�r�r�r�r�r��c�u�transtable_map�tbl�ord_mark_control�s_linesr��max_line_len�lead�header0�header1�header2r�s    `              @r�with_line_numbersz pyparsing_test.with_line_numbers�s����8�����A��#�!�;�;�s�L�9�L��y�(�%(��q�"��u�V�V�7L�%M�"�%M�T�Q��A�q�D�%M��"�'-��s�#��m�m�N�3����#&�|�#4� ��m�m�26�u�Q��|�2D��u�2L�M�2L�Q�Q�(�(�2L�M������C� �A��"�{�c�'9��i�'��m�m��F�$;�<���K�K��$���I�I�c�;�/�����J����1�v�H��x��Q��(����Q�
�+�X�6�
��9�$��l�l�n�Z�!�^�h�?�G�01�����z�A�~�PX�0Y�Z�0Y��t�e�|�0Y�G�Z����3�x�=�)���9��9�9���l�Q�&�'���2����'�'��"�3�|�s�':�A�#>�?����
��
��G���
��g�g�X�%�<�-�SU�BU�@V�:W�X�X�
Y��
�	���L�=�B�+>�)?�@�@�4�G����
��i�i��(��
�C���
��

�	
��k"��N��&[s�
I?�;
J�J
)NNT�|NN)
r?r@rArBrDr��staticmethodrar��Optional�int�boolr�rCrrrrs����f�f�Po�o�b�,0�)-� ��,0�-1�]
��]
��O�O�C�(�]
��/�/�#�&�]
��	]
�
�]
��_�_�S�)�
]
��o�o�c�*�]
�

�]
��]
rr)
�
contextlibrr��corerrrrr	rrCrr�<module>r�s#��&�
���|
�|
rpython3.12/site-packages/pip/_vendor/pyparsing/__pycache__/exceptions.cpython-312.pyc000064400000031356151732702370024464 0ustar00�

R`i3%�	��ddlZddlZddlZddlmZmZmZmZmZddl	m
ZGd�dejejejejej �Zeej$�Zej(dezdz�ZGd	�d
e�ZGd�de�ZGd
�de�ZGd�de�ZGd�de�Zy)�N�)�col�line�lineno�_collapse_string_to_ranges�replaced_by_pep8)�pyparsing_unicodec��eZdZy)�ExceptionWordUnicodeN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/exceptions.pyrrs��rrz([z
]{1,16})|.c���eZdZUdZeed<eed<eed<ejed<ejeeejefed<dZ			ddededejefd	�Ze
dd
��Zed��Zedefd
��Zedefd��Zedefd��Zedefd��Zed��Zej.d��Zdefd�Zd�Z	ddd�dejededefd�Zddefd�Zee�d��Zy)�ParseBaseExceptionz7base exception class for all parsing runtime exceptions�loc�msg�pstr�parser_element�args�rrrrrNc�r�||_|�||_d|_n||_||_||_|||f|_y)N�r)�selfrrr�elems     r�__init__zParseBaseException.__init__,sB������;��D�H��D�I��D�H��D�I�"����3��$��	rc�<�ddl}ddlm}|�tj�}g}t|t�r?|j|j�|jd|jdz
zdz�|jt|�j�d|���|dkD�rl|j|j|��}t�}t||d�D�]2\}}|d}	|	j j#d	d�}
t|
|�r�|	j$j&j)d
�s�Zt+|
�|vr�h|j-t+|
��t|
�}|j|j.�d|j�d|
���no|
�6t|
�}|j|j.�d|j���n7|	j$}|j&d
vr��|j|j&�|dz}|r��3ndj1|�S)a�
        Method to take an exception and translate the Python internal traceback into a list
        of the pyparsing expressions that caused the exception to be raised.

        Parameters:

        - exc - exception raised during parsing (need not be a ParseException, in support
          of Python exceptions that might be raised in a parse action)
        - depth (default=16) - number of levels back in the stack trace to list expression
          and function names; if None, the full stack trace names will be listed; if 0, only
          the failing input line, marker, and exception string will be shown

        Returns a multi-line string listing the ParserElements and/or function names in the
        exception's stack trace.
        rNr)�
ParserElement� �^z: )�contextr)�	parseImpl�
_parseNoCache�.z - )�wrapperz<module>�
)�inspect�corer �sys�getrecursionlimit�
isinstancer�appendr�column�typer�getinnerframes�
__traceback__�set�	enumerate�f_locals�get�f_code�co_name�
startswith�id�addr
�join)
�exc�depthr)r �ret�callers�seen�i�ff�frm�f_self�	self_type�codes
             r�explain_exceptionz$ParseBaseException.explain_exception=s���"	�'��=��)�)�+�E����c�-�.��J�J�s�x�x� ��J�J�s�c�j�j�1�n�-��3�4��
�
�d�3�i�(�(�)��C�5�1�2��1�9��,�,�S�->�->��,�N�G��5�D�"�7�E�6�7�#3�4���2���e�����)�)�&�$�7���f�m�4��:�:�-�-�8�8�6��!��&�z�T�)� ��H�H�R��Z�(� $�V��I��J�J�$�/�/�0��)�2D�2D�1E�S���Q���'� $�V��I��J�J�)�"6�"6�!7�q��9K�9K�8L�M�N��:�:�D��|�|�'>�>� ��J�J�t�|�|�,���
����?5�B�y�y��~�rc�h�||j|j|j|j�S)z�
        internal factory method to simplify creating one type of ParseException
        from another - avoids having __init__ signature conflicts among subclasses
        )rrrr)�cls�pes  r�_from_exceptionz"ParseBaseException._from_exceptions'���2�7�7�B�F�F�B�F�F�B�,=�,=�>�>r�returnc�B�t|j|j�S)zG
        Return the line of text where the exception occurred.
        )rrr�rs rrzParseBaseException.line�s��
�D�H�H�d�i�i�(�(rc�B�t|j|j�S)zV
        Return the 1-based line number of text where the exception occurred.
        )rrrrOs rrzParseBaseException.lineno�s��
�d�h�h��	�	�*�*rc�B�t|j|j�S�z]
        Return the 1-based column on the line of text where the exception occurred.
        �rrrrOs rrzParseBaseException.col����
�4�8�8�T�Y�Y�'�'rc�B�t|j|j�SrRrSrOs rr/zParseBaseException.column�rTrc��|jS�N�rrOs r�
parserElementz ParseBaseException.parserElement�s���"�"�"rc��||_yrWrX)rrs  rrYz ParseBaseException.parserElement�s
��"��rc	���|jr�|jt|j�k\rd}n|tj	|j|j�}|�|jd�}n&|j|j|jdz}d|zj
dd�}nd}|j�|�d|j�d	|j�d
|j�d�	S)Nz, found end of textrrz
, found %rz\\�\rz  (at char z	), (line:z, col:�))
rr�len�_exception_word_extractor�match�group�replacerrr/)r�foundstr�found_match�founds    r�__str__zParseBaseException.__str__�s����9�9��x�x�3�t�y�y�>�)�0��8�=�=�d�i�i����R���*�'�-�-�a�0�E� �I�I�d�h�h����A��>�E�(�5�0�9�9�%��F���H��(�(��H�:�[����
�)�D�K�K�=�PV�W[�Wb�Wb�Vc�cd�e�erc��t|�SrW)�strrOs r�__repr__zParseBaseException.__repr__�s���4�y�rz>!<)�markerString�
marker_stringrjc��|�|n|}|j}|jdz
}|rdj|d||||df�}|j�S)z�
        Extracts the exception line from the input string, and marks
        the location of the exception with a special symbol.
        Nrr)rr/r<�strip)rrkrj�line_str�line_columns     r�mark_input_linez"ParseBaseException.mark_input_line�s^��)6�(A�}�|���9�9���k�k�A�o����w�w��,�;�'��x���7M�N��H��~�~��rc�&�|j||�S)a
        Method to translate the Python internal traceback into a list
        of the pyparsing expressions that caused the exception to be raised.

        Parameters:

        - depth (default=16) - number of levels back in the stack trace to list expression
          and function names; if None, the full stack trace names will be listed; if 0, only
          the failing input line, marker, and exception string will be shown

        Returns a multi-line string listing the ParserElements and/or function names in the
        exception's stack trace.

        Example::

            expr = pp.Word(pp.nums) * 3
            try:
                expr.parse_string("123 456 A789")
            except pp.ParseException as pe:
                print(pe.explain(depth=0))

        prints::

            123 456 A789
                    ^
            ParseException: Expected W:(0-9), found 'A'  (at char 8), (line:1, col:9)

        Note: the diagnostic output will include string representations of the expressions
        that failed to parse. These representations will be more helpful if you use `set_name` to
        give identifiable names to your expressions. Otherwise they will use the default string
        forms, which may be cryptic to read.

        Note: pyparsing's default truncation of exception tracebacks may also truncate the
        stack of expressions that are displayed in the ``explain`` output. To get the full listing
        of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True``
        )rH)rr>s  r�explainzParseBaseException.explain�s��J�%�%�d�E�2�2rc��yrWrrOs r�
markInputlinez ParseBaseException.markInputline�s�� r)rNN)�rW)rr
r�__doc__�int�__annotations__rh�typing�Any�Tuple�Optional�	__slots__r�staticmethodrH�classmethodrL�propertyrrrr/rY�setterrfrirprrrrtrrrrrs���A�	�H�	�H�

�I��J�J��
�,�,�s�C�����!5�5�
6�6��I��$(�
�%��%��%��_�_�S�
!�	%�"�?��?�B�?��?��)�c�)��)��+��+��+��(�S�(��(��(��(��(��#��#����#��#�f��f� �59� �QV� �#�_�_�S�1� �KN� �	� � %3�3�%3�P�o�&� �'� rrc��eZdZdZy)�ParseExceptionaq
    Exception thrown when a parse expression doesn't match the input string

    Example::

        try:
            Word(nums).set_name("integer").parse_string("ABC")
        except ParseException as pe:
            print(pe)
            print("column: {}".format(pe.column))

    prints::

       Expected integer (at char 0), (line:1, col:1)
        column: 1

    N�rr
rrvrrrr�r��s��rr�c��eZdZdZy)�ParseFatalExceptionzu
    User-throwable exception thrown when inconsistent parse content
    is found; stops all parsing immediately
    Nr�rrrr�r�s��rr�c��eZdZdZy)�ParseSyntaxExceptionz�
    Just like :class:`ParseFatalException`, but thrown internally
    when an :class:`ErrorStop<And._ErrorStop>` ('-' operator) indicates
    that parsing is to stop immediately because an unbacktrackable
    syntax error has been found.
    Nr�rrrr�r�s��rr�c�"�eZdZdZd�Zdefd�Zy)�RecursiveGrammarExceptionz�
    Exception thrown by :class:`ParserElement.validate` if the
    grammar could be left-recursive; parser may need to enable
    left recursion using :class:`ParserElement.enable_left_recursion<ParserElement.enable_left_recursion>`
    c��||_yrW��parseElementTrace)r�parseElementLists  rrz"RecursiveGrammarException.__init__'s
��!1��rrMc� �d|j��S)NzRecursiveGrammarException: r�rOs rrfz!RecursiveGrammarException.__str__*s��,�T�-C�-C�,D�E�ErN)rr
rrvrrhrfrrrr�r� s���2�F��Frr�)�rer+ry�utilrrrrr�unicoder	�ppu�Latin1�LatinA�LatinB�Greek�Cyrillicr�	alphanums�_extract_alphanums�compiler_�	Exceptionrr�r�r�r�rrr�<module>r�s���
�
�
���.�	�3�:�:�s�z�z�3�:�:�s�y�y�#�,�,�	�0�0D�0N�0N�O��&�B�J�J�t�.@�'@�<�'O�P��_!��_!�F�'��(�,���.��F�	�Frpython3.12/site-packages/pip/_vendor/pyparsing/__pycache__/actions.cpython-312.pyc000064400000020371151732702370023736 0ustar00�

R`i����ddlmZddlmZmZGd�d�Zd�Zd�Zd�Zd�Z	e
�e	_dd	�Zee�d
��Z
ee�d��Zee	�d��Zee�d
��Zee�d��Zy)�)�ParseException)�col�replaced_by_pep8c�"�eZdZdZd�Zd�Zd�Zy)�OnlyOncezI
    Wrapper for parse actions, to ensure they are only called once.
    c�8�ddlm}||�|_d|_y)Nr)�_trim_arityF)�corer	�callable�called)�self�method_callr	s   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/actions.py�__init__zOnlyOnce.__init__s��%�#�K�0��
����c�l�|js|j|||�}d|_|St||d��)NTz.OnlyOnce obj called multiple times w/out reset)rrr)r
�s�l�t�resultss     r�__call__zOnlyOnce.__call__s7���{�{��m�m�A�q�!�,�G��D�K��N��Q��#S�T�Trc��d|_y)zK
        Allow the associated parse action to be called once more.
        FN)r)r
s r�resetzOnlyOnce.resets��
��rN)�__name__�
__module__�__qualname__�__doc__rrr�rrrrs����U�rrc����fd�}|S)zt
    Helper method for defining parse actions that require matching at
    a specific column in the input text.
    c�D��t||��k7rt||d�����y)Nzmatched token not at column )rr)�strg�locn�toks�ns   �r�
verify_colz%match_only_at_col.<locals>.verify_col's-����t�T�?�a�� ��t�/K�A�3�-O�P�P� rr)r$r%s` r�match_only_at_colr&!s���Q��rc����fd�S)a�
    Helper method for common parse actions that simply return
    a literal value.  Especially useful when used with
    :class:`transform_string<ParserElement.transform_string>` ().

    Example::

        num = Word(nums).set_parse_action(lambda toks: int(toks[0]))
        na = one_of("N/A NA").set_parse_action(replace_with(math.nan))
        term = na | num

        term[1, ...].parse_string("324 234 N/A 234") # -> [324, 234, nan, 234]
    c�
���gS�Nr)rrr�repl_strs   �r�<lambda>zreplace_with.<locals>.<lambda><s���H�:rr)r*s`r�replace_withr,.s���&�%rc��|dddS)a#
    Helper parse action for removing quotation marks from parsed
    quoted strings.

    Example::

        # by default, quotation marks are included in parsed results
        quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"]

        # use remove_quotes to strip quotation marks from parsed results
        quoted_string.set_parse_action(remove_quotes)
        quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"]
    �r���r)rrrs   r�
remove_quotesr0?s��
�Q�4��"�:�rc�|��|r|dd�n|j���D��cgc]	\}}||f��c}}��fd�}|Scc}}w)aK
    Helper to create a validating parse action to be used with start
    tags created with :class:`make_xml_tags` or
    :class:`make_html_tags`. Use ``with_attribute`` to qualify
    a starting tag with a required attribute value, to avoid false
    matches on common tags such as ``<TD>`` or ``<DIV>``.

    Call ``with_attribute`` with a series of attribute names and
    values. Specify the list of filter attributes names and values as:

    - keyword arguments, as in ``(align="right")``, or
    - as an explicit dict with ``**`` operator, when an attribute
      name is also a Python reserved word, as in ``**{"class":"Customer", "align":"right"}``
    - a list of name-value tuples, as in ``(("ns1:class", "Customer"), ("ns2:align", "right"))``

    For attribute names with a namespace prefix, you must use the second
    form.  Attribute names are matched insensitive to upper/lower case.

    If just testing for ``class`` (with or without a namespace), use
    :class:`with_class`.

    To verify that the attribute exists, but without specifying a value,
    pass ``with_attribute.ANY_VALUE`` as the value.

    Example::

        html = '''
            <div>
            Some text
            <div type="grid">1 4 0 1 0</div>
            <div type="graph">1,3 2,3 1,1</div>
            <div>this has no type</div>
            </div>

        '''
        div,div_end = make_html_tags("div")

        # only match div tag having a type attribute with value "grid"
        div_grid = div().set_parse_action(with_attribute(type="grid"))
        grid_expr = div_grid + SkipTo(div | div_end)("body")
        for grid_header in grid_expr.search_string(html):
            print(grid_header.body)

        # construct a match with any div tag having a type attribute, regardless of the value
        div_any_type = div().set_parse_action(with_attribute(type=with_attribute.ANY_VALUE))
        div_expr = div_any_type + SkipTo(div | div_end)("body")
        for div_header in div_expr.search_string(html):
            print(div_header.body)

    prints::

        1 4 0 1 0

        1 4 0 1 0
        1,3 2,3 1,1
    Nc����D]N\}}||vrt||d|z��|tjk7s�.|||k7s�7t||d|�d||�d|����y)Nzno matching attribute z
attribute z has value z
, must be )r�with_attribute�	ANY_VALUE)rr�tokens�attrName�	attrValue�attrss     �r�pazwith_attribute.<locals>.pa�sz���#(��H�i��v�%�$�Q��+C�h�+N�O�O��N�4�4�4���9I�Y�9V�$��� ���K��x�8H�7K�:�V_�Ub�c���	$)r)�items)�args�	attr_dict�k�vr9r8s     @rr3r3PsK���r��Q������!�� %�&����1�a��V��&�E�	��I��
's�8c�.�|r|�d�nd}tdi||i��S)a�
    Simplified version of :class:`with_attribute` when
    matching on a div class - made difficult because ``class`` is
    a reserved word in Python.

    Example::

        html = '''
            <div>
            Some text
            <div class="grid">1 4 0 1 0</div>
            <div class="graph">1,3 2,3 1,1</div>
            <div>this &lt;div&gt; has no class</div>
            </div>

        '''
        div,div_end = make_html_tags("div")
        div_grid = div().set_parse_action(with_class("grid"))

        grid_expr = div_grid + SkipTo(div | div_end)("body")
        for grid_header in grid_expr.search_string(html):
            print(grid_header.body)

        div_any_type = div().set_parse_action(with_class(withAttribute.ANY_VALUE))
        div_expr = div_any_type + SkipTo(div | div_end)("body")
        for div_header in div_expr.search_string(html):
            print(div_header.body)

    prints::

        1 4 0 1 0

        1 4 0 1 0
        1,3 2,3 1,1
    z:class�classr)r3)�	classname�	namespace�	classattrs   r�
with_classrD�s(��H)2�9�+�V�$�w�I��3�Y�	�2�3�3rc��yr)rrrr�replaceWithrF�s��rc��yr)rrrr�removeQuotesrH�s��rc��yr)rrrr�
withAttributerJ�s��rc��yr)rrrr�	withClassrL�s��rc��yr)rrrr�matchOnlyAtColrN�s��rN)�)�
exceptionsr�utilrrrr&r,r0r3�objectr4rDrFrHrJrLrNrrr�<module>rSs���'�'���4
�&�"�"J�Z"�8���%4�T�,��� ���-� ��!���.�!��"���*������#�$��%�rpython3.12/site-packages/pip/_vendor/pyparsing/__pycache__/helpers.cpython-312.pyc000064400000136624151732702370023751 0ustar00�

R`i�����UddlZddlZddlZddlZddlmZddl�ddlm	Z	m
Z
mZmZ	dcdd�de
deje
d	eje
d
e
fd�Zde
d
e
fd�Zde
d
e
fd
�Z			ddddd�deej&eefdededededed
e
fd�Zde
de
d
e
fd�Z	dedd�de
deded
e
fd�Zde
d
e
fd�Zde
d
e
fd �Zd!d"de�fe�d#�d$eee
fd%eee
fd&eje
d'e
d(e
d
e
fd)�Zed*�ed+�fd,�Zd-eee
fd
ee
e
ffd.�Z d-eee
fd
ee
e
ffd/�Z!e
e"d0<e
e"d1<e e#e$e%d2z�jMd3��\Z'Z(ejRjTjW�D��cic]\}}|jYd4�|��c}}Z-e.d5d6j_e-�zd7z�jMd8�Z0d9�Z1Gd:�d;e2�Z3ee
eeee
efee
efffZ4eee4e5e3eje6fee4e5e3ffZ7ed!�ed"�fd<e
d=e8e7d>eee
fd?eee
fd
e
f
d@�Z9dgfdA�Z:e;e.dB�dCz�jMdD�Z<	e.dE�jMdF�Z=	e.dG�j}�jMdH�Z?e.dI�jMdJ�Z@	e;e.dB�dCze@z�jMdK�ZA	eAZB	e.dL�jMdM�ZC	eD�j��D�cgc]}eF|e
�s�
|��c}ZGe8e
e"dN<				dfddO�deee
fdPeee
fdQedReje5dSeje5dTed
e
fdU�ZHe3ZIe'ZJe(ZKe0ZLe<ZMe=ZNe?ZOe@ZPeAZQeBZReCZSeeT�dV��ZUeeT�dW��ZHee�dX��ZVee�dY��ZWee�dZ��ZXee�d[��ZYee�d\��ZZee�d]��Z[ee�d^��Z\ee �d_��Z]ee!�d`��Z^ee1�da��Z_ee9�db��Z`ycc}}wcc}w)g�N�)�__diag__)�*)�_bslash�_flatten�_escape_regex_range_chars�replaced_by_pep8)�intExpr�expr�int_exprr
�returnc�$���|xs|}t����fd�}|� tt�jd��}n|j	�}|jd�|j
|d��|�zjdt��zdz�S)a~Helper to define a counted list of expressions.

    This helper defines a pattern of the form::

        integer expr expr expr...

    where the leading integer tells how many expr expressions follow.
    The matched tokens returns the array of expr tokens as a list - the
    leading count token is suppressed.

    If ``int_expr`` is specified, it should be a pyparsing expression
    that produces an integer value.

    Example::

        counted_array(Word(alphas)).parse_string('2 ab cd ef')  # -> ['ab', 'cd']

        # in this parser, the leading integer value is given in binary,
        # '10' indicating that 2 values are in the array
        binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2))
        counted_array(Word(alphas), int_expr=binary_constant).parse_string('10 ab cd ef')  # -> ['ab', 'cd']

        # if other fields must be parsed after the count but before the
        # list items, give the fields results names and they will
        # be preserved in the returned ParseResults:
        count_with_metadata = integer + Word(alphas)("type")
        typed_array = counted_array(Word(alphanums), int_expr=count_with_metadata)("items")
        result = typed_array.parse_string("3 bool True True False")
        print(result.dump())

        # prints
        # ['True', 'True', 'False']
        # - items: ['True', 'True', 'False']
        # - type: 'bool'
    c�B��|d}�|r�|zn	t�z�|dd�=y�Nr)�Empty)�s�l�t�n�
array_exprrs    ����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/helpers.py�count_field_parse_actionz/counted_array.<locals>.count_field_parse_action@s'���
�a�D���Q��q��E�G�3�
�
�a�D�c��t|d�Sr)�int�rs r�<lambda>zcounted_array.<locals>.<lambda>Hs���A�a�D�	r�arrayLenT)�call_during_tryz(len) z...)�Forward�Word�nums�set_parse_action�copy�set_name�add_parse_action�str)rrr
rrs`   @r�
counted_arrayr(s����R�!��G���J�����t�*�-�-�.A�B���,�,�.�����Z� ����5�t��L��j� �*�*�8�c�$�i�+?�%�+G�H�Hrc���t���fd�}|j|d���jdt|�z��S)a9Helper to define an expression that is indirectly defined from
    the tokens matched in a previous expression, that is, it looks for
    a 'repeat' of a previous expression.  For example::

        first = Word(nums)
        second = match_previous_literal(first)
        match_expr = first + ":" + second

    will match ``"1:1"``, but not ``"1:2"``.  Because this
    matches a previous literal, will also match the leading
    ``"1:1"`` in ``"1:10"``. If this is not desired, use
    :class:`match_previous_expr`. Do *not* use with packrat parsing
    enabled.
    c���|rFt|�dk(r	�|dzyt|j��}�td�|D��zy�t	�zy)Nrrc3�2K�|]}t|����y�w�N)�Literal)�.0�tts  r�	<genexpr>zImatch_previous_literal.<locals>.copy_token_to_repeater.<locals>.<genexpr>hs����7��2�7�2�;����)�lenr�as_list�Andr)rrr�tflat�reps    �r�copy_token_to_repeaterz6match_previous_literal.<locals>.copy_token_to_repeaterasJ�����1�v��{��q��t��!�����-���s�7��7�7�7��5�7�NrT��
callDuringTry�(prev) )r r&r%r')rr7r6s  @r�match_previous_literalr;PsA����)�C�	�	���0���E��L�L��S��Y�&�'��Jrc���t��|j�}�|z��fd�}|j|d���jdt	|�z��S)aWHelper to define an expression that is indirectly defined from
    the tokens matched in a previous expression, that is, it looks for
    a 'repeat' of a previous expression.  For example::

        first = Word(nums)
        second = match_previous_expr(first)
        match_expr = first + ":" + second

    will match ``"1:1"``, but not ``"1:2"``.  Because this
    matches by expressions, will *not* match the leading ``"1:1"``
    in ``"1:10"``; the expressions are evaluated first, and then
    compared, so ``"1"`` is compared with ``"10"``. Do *not* use
    with packrat parsing enabled.
    c�j���t|j����fd�}�j|d��y)Nc�h��t|j��}|�k7rt||d��d|����y)Nz	Expected z, found)rr3�ParseException)rrr�theseTokens�matchTokenss    �r�must_match_these_tokenszTmatch_previous_expr.<locals>.copy_token_to_repeater.<locals>.must_match_these_tokens�sA���"�1�9�9�;�/�K��k�)�$��q�I�k�]�'�+��G���*rTr8)rr3r#)rrrrBrAr6s    @�rr7z3match_previous_expr.<locals>.copy_token_to_repeater�s.����q�y�y�{�+��	�	���4�D��IrTr8r:)r r$r&r%r')r�e2r7r6s   @r�match_previous_exprrDqsV����)�C�	
����B��B�J�C�
J�	���0���E��L�L��S��Y�&�'��JrFT)�useRegex�	asKeyword�strs�caseless�	use_regex�
as_keywordrErFc�H���|xs|}|xr|}t|t�r'tjrtjdd��|rd�}d�}|rtnt�nd�}d�}|rtnt�g}t|t�r+tjt|�}|j�}n't|t�rt|�}nt!d��|s
t#�St%d	�|D��r�d
}	|	t'|�dz
kro||	}
t)||	dzd�D]?\}}|||
�r||	|zdz=n-||
|�s�$||	|zdz=|j+|	|�n|	dz
}	|	t'|�dz
kr�o|r�|rt,j.nd
}
	t1d
�|D��rddj3d�|D���d�}ndj3d�|D��}|rd|�d�}t5||
��j7dj3|��}|r3|D�cic]}|j9�|��c}�|j;�fd��|St?�fd�|D��j7dj3|��Scc}w#t,j<$rtjdd��Y�cwxYw)a!Helper to quickly define a set of alternative :class:`Literal` s,
    and makes sure to do longest-first testing when there is a conflict,
    regardless of the input order, but returns
    a :class:`MatchFirst` for best performance.

    Parameters:

    - ``strs`` - a string of space-delimited literals, or a collection of
      string literals
    - ``caseless`` - treat all literals as caseless - (default= ``False``)
    - ``use_regex`` - as an optimization, will
      generate a :class:`Regex` object; otherwise, will generate
      a :class:`MatchFirst` object (if ``caseless=True`` or ``as_keyword=True``, or if
      creating a :class:`Regex` raises an exception) - (default= ``True``)
    - ``as_keyword`` - enforce :class:`Keyword`-style matching on the
      generated expressions - (default= ``False``)
    - ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility,
      but will be removed in a future release

    Example::

        comp_oper = one_of("< = > <= >= !=")
        var = Word(alphas)
        number = Word(nums)
        term = var | number
        comparison_expr = term + comp_oper + term
        print(comparison_expr.search_string("B = 12  AA=23 B<=AA AA>12"))

    prints::

        [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']]
    z`More than one string argument passed to one_of, pass choices as a list or space-delimited string�)�
stacklevelc�D�|j�|j�k(Sr,)�upper��a�bs  rrzone_of.<locals>.<lambda>�s��q�w�w�y�A�G�G�I�5rc�\�|j�j|j��Sr,)rO�
startswithrPs  rrzone_of.<locals>.<lambda>�s��Q�W�W�Y�1�1�!�'�'�)�<rc��||k(Sr,�rPs  rrzone_of.<locals>.<lambda>�s��q�A�vrc�$�|j|�Sr,)rTrPs  rrzone_of.<locals>.<lambda>�s��Q�\�\�!�_rz7Invalid argument to one_of, expected string or iterablec3�8K�|]}t|�dkD���y�w�rN�r2�r.�syms  rr0zone_of.<locals>.<genexpr>�s����
+�7�C�3�s�8�a�<�7���rrNc3�8K�|]}t|�dk(���y�wrYrZr[s  rr0zone_of.<locals>.<genexpr>�s����4�G�S�3�s�8�q�=�G�r]�[�c3�2K�|]}t|����y�wr,)rr[s  rr0zone_of.<locals>.<genexpr>�s����"U�W�c�#<�S�#A�W�r1�]�|c3�FK�|]}tj|����y�wr,)�re�escaper[s  rr0zone_of.<locals>.<genexpr>�s����B�'�3��	�	�#��'�s�!z\b(?:z)\b)�flagsz | c�0���|dj�Sr��lower)rrr�
symbol_maps   �rrzone_of.<locals>.<lambda>s���Z��!��
�
��5Mrz8Exception creating Regex for one_of, building MatchFirstc3�.�K�|]}�|����y�wr,rV)r.r\�parseElementClasss  �rr0zone_of.<locals>.<genexpr>s�����@���'��,��s�) �
isinstance�str_typer�%warn_on_multiple_string_args_to_oneof�warnings�warn�CaselessKeyword�CaselessLiteral�Keywordr-�typing�castr'�split�Iterable�list�	TypeError�NoMatch�anyr2�	enumerate�insertre�
IGNORECASE�all�join�Regexr%rjr&�error�
MatchFirst)rGrHrIrJrErF�isequal�masks�symbols�i�cur�j�other�re_flags�patt�retr\rmrks                 @@r�one_ofr��s����R�'�Z�I��%�I�H�	�8�X�&��:�:��
�
�
;��	�	
��5��<��/8�O�o��%��,��'0�G�g���G��$��!��{�{�3��%���*�*�,��	�D�(�	#��t�*���Q�R�R���y���
+�7�
+�+�
���#�g�,��"�"��!�*�C�%�g�a�!�e�g�&6�7���5��5�#�&���A���	�*���3��&���A���	�*��N�N�1�e�,��8��Q����#�g�,��"�"��)1��
�
�q��	��4�G�4�4��2�7�7�"U�W�"U�U�V�VW�X���x�x�B�'�B�B�����v�S�)����H�-�6�6�u�z�z�'�7J�K�C��;B�B�'�3�c�i�i�k�3�.�'�B�
��$�$�%M�N��J��@��@�@�I�I�
�
�
�7�����C��
�x�x�	��M�M�J�WX�
�
�	�s%�BI4�I/�$I4�/I4�4*J!� J!�key�valuec�B�ttt||z���S)a�Helper to easily and clearly define a dictionary by specifying
    the respective patterns for the key and value.  Takes care of
    defining the :class:`Dict`, :class:`ZeroOrMore`, and
    :class:`Group` tokens in the proper order.  The key pattern
    can include delimiting markers or punctuation, as long as they are
    suppressed, thereby leaving the significant key text.  The value
    pattern can include named results, so that the :class:`Dict` results
    can include named token fields.

    Example::

        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))
        print(attr_expr[1, ...].parse_string(text).dump())

        attr_label = label
        attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)

        # similar to Dict, but simpler call format
        result = dict_of(attr_label, attr_value).parse_string(text)
        print(result.dump())
        print(result['shape'])
        print(result.shape)  # object attribute access works too
        print(result.as_dict())

    prints::

        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
        - color: 'light blue'
        - posn: 'upper left'
        - shape: 'SQUARE'
        - texture: 'burlap'
        SQUARE
        SQUARE
        {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'}
    )�Dict�	OneOrMore�Group)r�r�s  r�dict_ofr�s��J�	�%��e��,�-�.�.r)�asString�	as_stringr�c�0�|xr|}t�jd��}|j�}d|_|d�|z|d�z}|rd�}nd�}|j|�|j|_|jtj�|S)a
Helper to return the original, untokenized text for a given
    expression.  Useful to restore the parsed fields of an HTML start
    tag into the raw tag text itself, or to revert separate tokens with
    intervening whitespace back to the original matching input text. By
    default, returns a string containing the original parsed text.

    If the optional ``as_string`` argument is passed as
    ``False``, then the return value is
    a :class:`ParseResults` containing any results names that
    were originally matched, and a single token containing the original
    matched text from the input string.  So if the expression passed to
    :class:`original_text_for` contains expressions with defined
    results names, you must set ``as_string`` to ``False`` if you
    want to preserve those results name values.

    The ``asString`` pre-PEP8 argument is retained for compatibility,
    but will be removed in a future release.

    Example::

        src = "this is test <b> bold <i>text</i> </b> normal text "
        for tag in ("b", "i"):
            opener, closer = make_html_tags(tag)
            patt = original_text_for(opener + ... + closer)
            print(patt.search_string(src)[0])

    prints::

        ['<b> bold <i>text</i> </b>']
        ['<i>text</i>']
    c��|Sr,rV)r�locrs   rrz#original_text_for.<locals>.<lambda>_s��3rF�_original_start�
_original_endc�4�||j|jSr,)r�r��rrrs   rrz#original_text_for.<locals>.<lambda>ds��a��(9�(9�A�O�O�&Lrc�R�||jd�|jd�g|ddy)Nr�r���popr�s   r�extractTextz&original_text_for.<locals>.extractTextgs(���a�e�e�-�.�����1G�H�I�A�a�Dr)rr#r$�callPreparse�ignoreExprs�suppress_warning�Diagnostics�)warn_ungrouped_named_tokens_in_collection)rr�r��	locMarker�endlocMarker�	matchExprr�s       r�original_text_forr�;s���D�%�I�H���(�(�)>�?�I��>�>�#�L� %�L���+�,�t�3�l�?�6S�S�I��L��	J����{�+� �,�,�I��
���{�T�T�U��rc�8�t|�jd��S)zkHelper to undo pyparsing's default grouping of And expressions,
    even if all but one are non-empty.
    c��|dSrrVrs rrzungroup.<locals>.<lambda>ts��1�Q�4r)�TokenConverterr&)rs r�ungroupr�ps���$��0�0��@�@rc��t�jd��}t|d�|d�z|j�j	�d�z�S)a
    (DEPRECATED - future code should use the :class:`Located` class)
    Helper to decorate a returned token with its starting and ending
    locations in the input string.

    This helper adds the following results names:

    - ``locn_start`` - location where matched expression begins
    - ``locn_end`` - location where matched expression ends
    - ``value`` - the actual parsed results

    Be careful if the input text contains ``<TAB>`` characters, you
    may want to call :class:`ParserElement.parse_with_tabs`

    Example::

        wd = Word(alphas)
        for match in locatedExpr(wd).search_string("ljsdf123lksdjjf123lkkjj1222"):
            print(match)

    prints::

        [[0, 'ljsdf', 5]]
        [[8, 'lksdjjf', 15]]
        [[18, 'lkkjj', 23]]
    c��|Sr,rV)�ss�llr/s   rrzlocatedExpr.<locals>.<lambda>�s��"r�
locn_startr��locn_end)rr#r�r$�leaveWhitespace)r�locators  r�locatedExprr�wsV��6�g�&�&�'<�=�G�����
�w�-�	�
*�'�,�,�.�
(�
(�
*�:�
6�	7��r�(�))�
ignoreExpr�opener�closer�content�ignore_exprr�c	���||k7r|t�k(r|n|}||k(rtd��|���t|t��r�t|t��r�t	j
t|�}t	j
t|�}t|�dk(r�t|�dk(r�|�Itt|t||ztjzd��z��jd��}�ntj�t||ztjz�jd��z}n�|�\tt|t!|�zt!|�zttjd��z��jd��}ncttt!|�t!|�zttjd��z��jd��}ntd��t#�}|�6|t%t'|�t)||z|z�zt'|�z�z}n2|t%t'|�t)||z�zt'|�z�z}|j+d	|�|�d
��|S)a&
Helper method for defining nested lists enclosed in opening and
    closing delimiters (``"("`` and ``")"`` are the default).

    Parameters:

    - ``opener`` - opening character for a nested list
      (default= ``"("``); can also be a pyparsing expression
    - ``closer`` - closing character for a nested list
      (default= ``")"``); can also be a pyparsing expression
    - ``content`` - expression for items within the nested lists
      (default= ``None``)
    - ``ignore_expr`` - expression for ignoring opening and closing delimiters
      (default= :class:`quoted_string`)
    - ``ignoreExpr`` - this pre-PEP8 argument is retained for compatibility
      but will be removed in a future release

    If an expression is not provided for the content argument, the
    nested expression will capture all whitespace-delimited content
    between delimiters as a list of separate values.

    Use the ``ignore_expr`` argument to define expressions that may
    contain opening or closing characters that should not be treated as
    opening or closing characters for nesting, such as quoted_string or
    a comment expression.  Specify multiple expressions using an
    :class:`Or` or :class:`MatchFirst`. The default is
    :class:`quoted_string`, but if no expressions are to be ignored, then
    pass ``None`` for this argument.

    Example::

        data_type = one_of("void int short long char float double")
        decl_data_type = Combine(data_type + Opt(Word('*')))
        ident = Word(alphas+'_', alphanums+'_')
        number = pyparsing_common.number
        arg = Group(decl_data_type + ident)
        LPAR, RPAR = map(Suppress, "()")

        code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment))

        c_function = (decl_data_type("type")
                      + ident("name")
                      + LPAR + Opt(DelimitedList(arg), [])("args") + RPAR
                      + code_body("body"))
        c_function.ignore(c_style_comment)

        source_code = '''
            int is_odd(int x) {
                return (x%2);
            }

            int dec_to_hex(char hchar) {
                if (hchar >= '0' && hchar <= '9') {
                    return (ord(hchar)-ord('0'));
                } else {
                    return (10+ord(hchar)-ord('A'));
                }
            }
        '''
        for func in c_function.search_string(source_code):
            print("%(name)s (%(type)s) args: %(args)s" % func)


    prints::

        is_odd (int) args: [['int', 'x']]
        dec_to_hex (int) args: [['char', 'hchar']]
    z.opening and closing strings cannot be the samer)�exactc�(�|dj�Sr��striprs rrznested_expr.<locals>.<lambda>�����1����rc�(�|dj�Srr�rs rrznested_expr.<locals>.<lambda>�r�rc�(�|dj�Srr�rs rrznested_expr.<locals>.<lambda>r�rc�(�|dj�Srr�rs rrznested_expr.<locals>.<lambda>
r�rzOopening and closing arguments must be strings if no content expression is givenznested z expression)�
quoted_string�
ValueErrorrnrorvrwr'r2�Combiner��
CharsNotIn�
ParserElement�DEFAULT_WHITE_CHARSr#�emptyr$r-r r��Suppress�
ZeroOrMorer%)r�r�r�r�r�r�s      r�nested_exprr��s`��V�[� �$.�-�/�$A�[�z�
�
����I�J�J����f�h�'�J�v�x�,H��[�[��f�-�F��[�[��f�-�F��6�{�a��C��K�1�$4��)�%�!�'�K�(� &���-�2S�2S� S�&'�����'�&�'=�>��$�j�j�l�Z����-�*K�*K�K�.�&�&�'=�>�?�G��)�%�!�'�K�&�v��.�/�&�v��.�/�)��)J�)J�RS�T�U���'�&�'=�>��&�!�$�V�_�,�&�v��.�/�(��)J�)J�RS�T�U���'�&�'=�>�
��a��
��)�C������V��z�*�s�*:�W�*D�E�E��QW�HX�X�
�	
��	��h�v�&��C�'�M�)B�B�X�f�EU�U�V�V���L�L�V�V�<�=��Jr�<�>c
���t|t�r|�t||��}n|j�t	t
tdz�}|r�tj�jt�}||d�zttt|td�z|z���ztddg��d�jd	��z|z}n�t j�jt�t	t"d
��z}||d�zttt|jd��ttd�|z�z���ztddg��d�jd
��z|z}t%t'd�|zd
zd��}|j)d�z�|j+�fd��|ddj-�j/dd�j1�j3��z�j)d�z�}�|_�|_t7|��|_||fS)zRInternal helper to construct opening and closing tag expressions, given a tag name)rHz_-:�tag�=�/F)�defaultr�c��|ddk(S�Nrr�rVr�s   rrz_makeTags.<locals>.<lambda>-����!���rr�)�
exclude_charsc�(�|dj�Srrirs rrz_makeTags.<locals>.<lambda>;s��q��t�z�z�|rc��|ddk(Sr�rVr�s   rrz_makeTags.<locals>.<lambda>Ar�rz</)�adjacentz<%s>c	���|jddj�jdd�j�j	��z|j��S)N�startr`�:� )�__setitem__r��replace�titlerxr$)r�resnames �rrz_makeTags.<locals>.<lambda>JsD���!�-�-��b�g�g�g�o�o�c�3�7�=�=�?�E�E�G�H�H�!�&�&�(�
r�endr`r�r�z</%s>)rnroru�namer!�alphas�	alphanums�dbl_quoted_stringr$r#�
remove_quotesr�r�r�r��Optr��
printablesr�r-r%r&r�r�r�rxr��SkipTo�tag_body)	�tagStr�xml�suppress_LT�suppress_GT�tagAttrName�tagAttrValue�openTag�closeTagr�s	        @r�	_makeTagsr�s1����&�(�#�����c�'�2���+�+���v�y�5�0�1�K�
�(�-�-�/�@�@��O����U�m�
��:�e�K�(�3�-�$?�,�$N�O�P�Q�
R�(�c�#��w�'��0�A�A�+��
��

�	�%�)�)�+�<�<�]�K�d��c�O
�
��
��U�m�
����#�4�4�5K�L��h�s�m�l�:�;�<����	
�(�c�#��w�'��0�A�A�+��
��

�	� �w�t�}�v�-��3�e�D�H����V�g�%�&����	
��
�
��������S�1�7�7�9�?�?�A�B�B���h�w�� �!�
��G�K��H�L��h�j�)�G���H��r�tag_strc��t|d�S)aPHelper to construct opening and closing tag expressions for HTML,
    given a tag name. Matches tags in either upper or lower case,
    attributes with namespaces and with quoted or unquoted values.

    Example::

        text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>'
        # make_html_tags returns pyparsing expressions for the opening and
        # closing tags as a 2-tuple
        a, a_end = make_html_tags("A")
        link_expr = a + SkipTo(a_end)("link_text") + a_end

        for link in link_expr.search_string(text):
            # attributes in the <A> tag (like "href" shown here) are
            # also accessible as named results
            print(link.link_text, '->', link.href)

    prints::

        pyparsing -> https://github.com/pyparsing/pyparsing/wiki
    F�r��r�s r�make_html_tagsrWs��0�W�e�$�$rc��t|d�S)z�Helper to construct opening and closing tag expressions for XML,
    given a tag name. Matches tags only in the given upper/lower case.

    Example: similar to :class:`make_html_tags`
    Trrs r�
make_xml_tagsrrs���W�d�#�#r�any_open_tag�
any_close_tagz_:zany tag�;z&(?P<entity>rcz);zcommon HTML entityc�@�tj|j�S)zRHelper parser action to replace common HTML entities with their special characters)�_htmlEntityMap�get�entityr�s   r�replace_html_entityr�s�����a�h�h�'�'rc��eZdZdZdZdZy)�OpAssoczvEnumeration of operator associativity
    - used in constructing InfixNotationOperatorSpec for :class:`infix_notation`rrLN)�__name__�
__module__�__qualname__�__doc__�LEFT�RIGHTrVrrrr�s��T�
�D�
�Err�	base_expr�op_list�lpar�rparc	�H�Gd�dt�}d|_t�}t|t�rt|�}t|t�rt|�}t|t
�rt|t
�s|t
||z|z�z}n|||z|zz}t|�D�]�\}}|dzdd\}	}
}}t|	t�rtj|	�}	tjt|	�}	|
dk(r<t|	ttf�rt|	�dk7rt!d	��|	\}
}|
�|�d
�}n|	�d
�}d|
cxkrdkst!d��t!d��|t"j$t"j&fvrt!d
��t�j)|�}tjt|�}|t"j$ur�|
dk(r|||	z�t
||	dz�z}�nU|
dk(rC|	�%|||	z|z�t
||	|zdz�z}�n)|||z�t
|d�z}�n
|
dk(�r||
z|zz|z�t
|t+|
|z|z|z�z�z}n�|t"j&ur�|
dk(r@t|	t,�st-|	�}	||	j.|z�t
|	|z�z}nz|
dk(rD|	�$|||	z|z�t
||	|zdz�z}nO|||z�t
||dz�z}n1|
dk(r,||
z|zz|z�t
||
z|z|z|z�z}|r7t|ttf�rj0|�nj1|�||zj3|�z}|}���||z}|S)a�Helper method for constructing grammars of expressions made up of
    operators working in a precedence hierarchy.  Operators may be unary
    or binary, left- or right-associative.  Parse actions can also be
    attached to operator expressions. The generated parser will also
    recognize the use of parentheses to override operator precedences
    (see example below).

    Note: if you define a deep operator list, you may see performance
    issues when using infix_notation. See
    :class:`ParserElement.enable_packrat` for a mechanism to potentially
    improve your parser performance.

    Parameters:

    - ``base_expr`` - expression representing the most basic operand to
      be used in the expression
    - ``op_list`` - list of tuples, one for each operator precedence level
      in the expression grammar; each tuple is of the form ``(op_expr,
      num_operands, right_left_assoc, (optional)parse_action)``, where:

      - ``op_expr`` is the pyparsing expression for the operator; may also
        be a string, which will be converted to a Literal; if ``num_operands``
        is 3, ``op_expr`` is a tuple of two expressions, for the two
        operators separating the 3 terms
      - ``num_operands`` is the number of terms for this operator (must be 1,
        2, or 3)
      - ``right_left_assoc`` is the indicator whether the operator is right
        or left associative, using the pyparsing-defined constants
        ``OpAssoc.RIGHT`` and ``OpAssoc.LEFT``.
      - ``parse_action`` is the parse action to be associated with
        expressions matching this operator expression (the parse action
        tuple member may be omitted); if the parse action is passed
        a tuple or list of functions, this is equivalent to calling
        ``set_parse_action(*fn)``
        (:class:`ParserElement.set_parse_action`)
    - ``lpar`` - expression for matching left-parentheses; if passed as a
      str, then will be parsed as ``Suppress(lpar)``. If lpar is passed as
      an expression (such as ``Literal('(')``), then it will be kept in
      the parsed results, and grouped with them. (default= ``Suppress('(')``)
    - ``rpar`` - expression for matching right-parentheses; if passed as a
      str, then will be parsed as ``Suppress(rpar)``. If rpar is passed as
      an expression (such as ``Literal(')')``), then it will be kept in
      the parsed results, and grouped with them. (default= ``Suppress(')')``)

    Example::

        # simple example of four-function arithmetic with ints and
        # variable names
        integer = pyparsing_common.signed_integer
        varname = pyparsing_common.identifier

        arith_expr = infix_notation(integer | varname,
            [
            ('-', 1, OpAssoc.RIGHT),
            (one_of('* /'), 2, OpAssoc.LEFT),
            (one_of('+ -'), 2, OpAssoc.LEFT),
            ])

        arith_expr.run_tests('''
            5+3*6
            (5+3)*6
            -2--11
            ''', full_dump=False)

    prints::

        5+3*6
        [[5, '+', [3, '*', 6]]]

        (5+3)*6
        [[[5, '+', 3], '*', 6]]

        (5+x)*y
        [[[5, '+', 'x'], '*', 'y']]

        -2--11
        [[['-', 2], '-', ['-', 11]]]
    c��eZdZdd�Zy)�infix_notation.<locals>._FBc�B�|jj||�|gfSr,)r�	try_parse)�self�instringr��	doActionss    r�	parseImplz%infix_notation.<locals>._FB.parseImpl�s���I�I����#�.���7�NrN�T)rrrr!rVrr�_FBr�s��	rr#zFollowedBy>r,N��rLz@if numterms=3, opExpr must be a tuple or list of two expressionsz termrz6operator must be unary (1), binary (2), or ternary (3)z2operator must indicate right or left associativity)r.)rL.)�
FollowedByrr rnr'r�r�r~ror��_literalStringClassrvrw�tuplerzr2r�rrrr%r�r�rr#�setName)rrrrr#r��lastExprr��operDef�opExpr�arity�rightLeftAssoc�pa�opExpr1�opExpr2�	term_name�thisExprr�s                  r�infix_notationr4�s���l�j��
!�C�L�
�)�C��$�����~���$�����~��
�t�X�&�:�d�H�+E��u�T�C�Z�$�%6�7�7����s�
�T� 1�2�� ��(�
��7�-4�w�->���,C�)���~�r��f�h�'�"�6�6�v�>�F����]�F�3���A�:��f�u�d�m�4��F��q�8H� �V��� &��G�W�"�)�G�9�E�2�I�!�(�%�(�I��E��Q���U�V�V���U�V�V��'�,�,��
�
�!>�>��Q�R�R�")�)�"4�"4�Y�"?���;�;�w��1���W�\�\�)���z���6� 1�2�U�8�f�V�n�;T�5U�U�	��!���%� #�H�v�$5��$@� A�E� �F�X�$5�v�#>�>�E�!�I�!$�H�x�$7� 8�5��&�AQ�;R� R�I��!����w�&��1�G�;�h�F���(�Y�w��/A�G�/K�h�/V�%W�W�X�Y�	��w�}�}�
,���z�!�&�#�.� ��[�F�����h� 6�7�%���@Q�:R�R�	��!���%� #�H�v�$5��$@� A�E� �F�X�$5�v�#>�>�E�!�I�!$�H�x�$7� 8�5� �8�F�#3�3�<�!�I��!����w�&��1�G�;�h�F���(�W�,�x�7�'�A�H�L�M�N�	���"�u�d�m�,�*�	�*�*�B�/��*�*�2�.��i�(�*�3�3�I�>�>����})�~�H��C��Jrc	�|�����j�dd���fd���fd�}�fd�}�fd�}tt�jd�j	��}t�t�j
|�zjd�}t�j
|�jd�}	t�j
|�jd	�}
|r?tt|�|zt|	t|�zt|�z�z|
z�}nDtt|�t|	t|�zt|�z�zt|
�z�}|j�fd
��|j�fd��|jtt�z�|jd�S)
a�	
    (DEPRECATED - use :class:`IndentedBlock` class instead)
    Helper method for defining space-delimited indentation blocks,
    such as those used to define block statements in Python source code.

    Parameters:

    - ``blockStatementExpr`` - expression defining syntax of statement that
      is repeated within the indented block
    - ``indentStack`` - list created by caller to manage indentation stack
      (multiple ``statementWithIndentedBlock`` expressions within a single
      grammar should share a common ``indentStack``)
    - ``indent`` - boolean indicating whether block must be indented beyond
      the current level; set to ``False`` for block of left-most statements
      (default= ``True``)

    A valid block must contain at least one ``blockStatement``.

    (Note that indentedBlock uses internal parse actions which make it
    incompatible with packrat parsing.)

    Example::

        data = '''
        def A(z):
          A1
          B = 100
          G = A2
          A2
          A3
        B
        def BB(a,b,c):
          BB1
          def BBA():
            bba1
            bba2
            bba3
        C
        D
        def spam(x,y):
             def eggs(z):
                 pass
        '''


        indentStack = [1]
        stmt = Forward()

        identifier = Word(alphas, alphanums)
        funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":")
        func_body = indentedBlock(stmt, indentStack)
        funcDef = Group(funcDecl + func_body)

        rvalue = Forward()
        funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")")
        rvalue << (funcCall | identifier | Word(nums))
        assignment = Group(identifier + "=" + rvalue)
        stmt << (funcDef | assignment | identifier)

        module_body = stmt[1, ...]

        parseTree = module_body.parseString(data)
        parseTree.pprint()

    prints::

        [['def',
          'A',
          ['(', 'z', ')'],
          ':',
          [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]],
         'B',
         ['def',
          'BB',
          ['(', 'a', 'b', 'c', ')'],
          ':',
          [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]],
         'C',
         'D',
         ['def',
          'spam',
          ['(', 'x', 'y', ')'],
          ':',
          [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]]
    Nc����d�ddy�N���rV)�
backup_stacks�indentStacks��r�reset_stackz"indentedBlock.<locals>.reset_stack�s���&�r�*��A�rc���|t|�k\ryt||�}|�dk7r"|�dkDr
t||d��t||d��y)Nr8zillegal nestingznot a peer entry)r2�colr?�rrr�curColr:s    �r�checkPeerIndentz&indentedBlock.<locals>.checkPeerIndent�sY�����A��;���Q�����[��_�$���B��'�$�Q��+<�=�=� ��A�'9�:�:�%rc�j��t||�}|�dkDr�j|�yt||d��)Nr8znot a subentry)r=�appendr?r>s    �r�checkSubIndentz%indentedBlock.<locals>.checkSubIndent�s8����Q�����K��O�#����v�&� ��A�'7�8�8rc���|t|�k\ryt||�}�r|�vs
t||d��|�dkr�j�yy)Nznot an unindentr8)r2r=r?r�r>s    �r�
checkUnindentz$indentedBlock.<locals>.checkUnindent�sQ�����A��;���Q������+� 5� ��A�'8�9�9��K��O�#��O�O��$rz	 �INDENTr`�UNINDENTc�6���r�jd�xrdSdSr7r�)r9s�rrzindentedBlock.<locals>.<lambda>�s���-�
�!�!�"�%�.�$�I�T�Irc�����Sr,rV)rQrR�c�dr;s    �rrzindentedBlock.<locals>.<lambda>�s���k�mrzindented block)rBr��LineEnd�set_whitespace_chars�suppressrr#r%r�r�r&�set_fail_action�ignorer)
�blockStatementExprr:�indentr9r@rCrE�NLrF�PEER�UNDENT�smExprr;s
 ` `        @r�
indentedBlockrWYs~���l����Q��(�+�;�9��
�7�9�1�1�%�8�A�A�C�	D�B��g���0�0��@�@�
J�
J�8�
T�F��7�#�#�O�4�=�=�b�A�D�
�W�
%�
%�m�
4�
=�
=�j�
I�F�
����G��
���u�%7�8�8�3�r�7�B�C�
D��
�
�����G���u�%7�8�8�3�r�7�B�C�
D��&�k�
�
�����I�����;�<����g��	�1�2��?�?�+�,�,rz/\*(?:[^*]|\*(?!/))*z*/zC style commentz<!--[\s\S]*?-->zHTML commentz.*zrest of linez//(?:\\\n|[^\n])*z
// commentzC++ style commentz#.*zPython style comment�_builtin_exprs��allow_trailing_delim�delim�combine�min�maxrZc�$�t||||||��S)z/(DEPRECATED - use :class:`DelimitedList` class)rY)�
DelimitedList)rr[r\r]r^rZs      r�delimited_listra	s����e�W�c�3�=Q��rc��yr,rVrVrr�
delimitedListrc&���rc��yr,rVrVrrrara)s��rc��yr,rVrVrr�countedArrayrg,���rc��yr,rVrVrr�matchPreviousLiteralrj/s��rc��yr,rVrVrr�matchPreviousExprrl2���rc��yr,rVrVrr�oneOfro5s��
rc��yr,rVrVrr�dictOfrq8s��rc��yr,rVrVrr�originalTextForrs;s��rc��yr,rVrVrr�
nestedExprru>s��rc��yr,rVrVrr�makeHTMLTagsrwArhrc��yr,rVrVrr�makeXMLTagsryDs��rc��yr,rVrVrr�replaceHTMLEntityr{Grmrc��yr,rVrVrr�
infixNotationr}Jrdrr,)FTFr")�,FNN)a�
html.entities�htmlre�sysrvr`r�core�utilrrrr	r��Optionalr(r;rD�Unionryr'�boolr�r�r�r�r�r�r�r�r��Tuplerr�__annotations__r!r�r�r%rr�entities�html5�items�rstripr	r�r��common_html_entityr�Enumr�InfixNotationOperatorArgTyper�ParseAction�InfixNotationOperatorSpec�Listr4rWr��c_style_comment�html_comment�leave_whitespace�rest_of_line�dbl_slash_comment�cpp_style_comment�java_style_comment�python_style_comment�vars�valuesrnrXra�opAssoc�
anyOpenTag�anyCloseTag�commonHTMLEntity�
cStyleComment�htmlComment�
restOfLine�dblSlashComment�cppStyleComment�javaStyleComment�pythonStyleCommentr`rcrgrjrlrorqrsrurwryr{r})�k�vs00r�<module>r�s����	�
�
�����04�9I�/3�	9I�
�9I��o�o�m�,�9I��_�_�]�
+�	9I�
�9I�x���=��B!�m�!�
�!�L���	{���{�
�����$�c�)�
*�{��{��{��	{��
{��{��{�|%/��%/�}�%/��%/�R,0�2�EI�2�
�2�$(�2�>B�2��2�jA�-�A�M�A� �m� �
� �H),�(+�.2�!.��	@�!.��
@��#�}�$�%�@��#�}�$�%�@��_�_�]�
+�@��	@��
@��@�F(0��}�(�3�-�7�t%�
�3�
�%�
&�%�
�=�-�'�(�%�6$�
�3�
�%�
&�$�
�=�-�'�(�$�����,����T�!�"�+�+�I�6����m�04�}�}�/B�/B�/H�/H�/J�K�/J�t�q�!�!�(�(�3�-��"�/J�K���>�C�H�H�^�,D�D�t�K�L�U�U����
(�
�d�� %��3��e�M�3�$6�7��}�c�?Q�9R�R�S�S� ��"�	�$�������$�	&��
�$���	��
���$'/�s�m�&.�s�m�	n��n�
�+�
,�n���]�"�
#�n���]�"�
#�	n�
�n�b;?�b�L-�`�%� 7�8�4�?�@�I�I����$��'�(�1�1�.�A��&��U�|�,�,�.�7�7��G���.�/�8�8��F��1��	�
!�"�T�)�,=�=��
�(����P�&��$��V�}�-�-�.D�E��0��v�}�}��'��!�*�Q�
�">�A��'���]�#��(+�� $� $��"'��
��]�"�
#����m�#�$����
����	�	�

����	������"��
�
���%���
���
�
�#��#��%��)���-� ��!���-� ��!���-� ��!���(�)��*���%�&��'���&������'������#�$��%���+������.�!��"���-� ��!���%�&��'���.�!��"���QL��@'s�?P6�
P<�P<python3.12/site-packages/pip/_vendor/pyparsing/actions.py000064400000014647151732702370017406 0ustar00# actions.py

from .exceptions import ParseException
from .util import col, replaced_by_pep8


class OnlyOnce:
    """
    Wrapper for parse actions, to ensure they are only called once.
    """

    def __init__(self, method_call):
        from .core import _trim_arity

        self.callable = _trim_arity(method_call)
        self.called = False

    def __call__(self, s, l, t):
        if not self.called:
            results = self.callable(s, l, t)
            self.called = True
            return results
        raise ParseException(s, l, "OnlyOnce obj called multiple times w/out reset")

    def reset(self):
        """
        Allow the associated parse action to be called once more.
        """

        self.called = False


def match_only_at_col(n):
    """
    Helper method for defining parse actions that require matching at
    a specific column in the input text.
    """

    def verify_col(strg, locn, toks):
        if col(locn, strg) != n:
            raise ParseException(strg, locn, f"matched token not at column {n}")

    return verify_col


def replace_with(repl_str):
    """
    Helper method for common parse actions that simply return
    a literal value.  Especially useful when used with
    :class:`transform_string<ParserElement.transform_string>` ().

    Example::

        num = Word(nums).set_parse_action(lambda toks: int(toks[0]))
        na = one_of("N/A NA").set_parse_action(replace_with(math.nan))
        term = na | num

        term[1, ...].parse_string("324 234 N/A 234") # -> [324, 234, nan, 234]
    """
    return lambda s, l, t: [repl_str]


def remove_quotes(s, l, t):
    """
    Helper parse action for removing quotation marks from parsed
    quoted strings.

    Example::

        # by default, quotation marks are included in parsed results
        quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"]

        # use remove_quotes to strip quotation marks from parsed results
        quoted_string.set_parse_action(remove_quotes)
        quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"]
    """
    return t[0][1:-1]


def with_attribute(*args, **attr_dict):
    """
    Helper to create a validating parse action to be used with start
    tags created with :class:`make_xml_tags` or
    :class:`make_html_tags`. Use ``with_attribute`` to qualify
    a starting tag with a required attribute value, to avoid false
    matches on common tags such as ``<TD>`` or ``<DIV>``.

    Call ``with_attribute`` with a series of attribute names and
    values. Specify the list of filter attributes names and values as:

    - keyword arguments, as in ``(align="right")``, or
    - as an explicit dict with ``**`` operator, when an attribute
      name is also a Python reserved word, as in ``**{"class":"Customer", "align":"right"}``
    - a list of name-value tuples, as in ``(("ns1:class", "Customer"), ("ns2:align", "right"))``

    For attribute names with a namespace prefix, you must use the second
    form.  Attribute names are matched insensitive to upper/lower case.

    If just testing for ``class`` (with or without a namespace), use
    :class:`with_class`.

    To verify that the attribute exists, but without specifying a value,
    pass ``with_attribute.ANY_VALUE`` as the value.

    Example::

        html = '''
            <div>
            Some text
            <div type="grid">1 4 0 1 0</div>
            <div type="graph">1,3 2,3 1,1</div>
            <div>this has no type</div>
            </div>

        '''
        div,div_end = make_html_tags("div")

        # only match div tag having a type attribute with value "grid"
        div_grid = div().set_parse_action(with_attribute(type="grid"))
        grid_expr = div_grid + SkipTo(div | div_end)("body")
        for grid_header in grid_expr.search_string(html):
            print(grid_header.body)

        # construct a match with any div tag having a type attribute, regardless of the value
        div_any_type = div().set_parse_action(with_attribute(type=with_attribute.ANY_VALUE))
        div_expr = div_any_type + SkipTo(div | div_end)("body")
        for div_header in div_expr.search_string(html):
            print(div_header.body)

    prints::

        1 4 0 1 0

        1 4 0 1 0
        1,3 2,3 1,1
    """
    if args:
        attrs = args[:]
    else:
        attrs = attr_dict.items()
    attrs = [(k, v) for k, v in attrs]

    def pa(s, l, tokens):
        for attrName, attrValue in attrs:
            if attrName not in tokens:
                raise ParseException(s, l, "no matching attribute " + attrName)
            if attrValue != with_attribute.ANY_VALUE and tokens[attrName] != attrValue:
                raise ParseException(
                    s,
                    l,
                    f"attribute {attrName!r} has value {tokens[attrName]!r}, must be {attrValue!r}",
                )

    return pa


with_attribute.ANY_VALUE = object()  # type: ignore [attr-defined]


def with_class(classname, namespace=""):
    """
    Simplified version of :class:`with_attribute` when
    matching on a div class - made difficult because ``class`` is
    a reserved word in Python.

    Example::

        html = '''
            <div>
            Some text
            <div class="grid">1 4 0 1 0</div>
            <div class="graph">1,3 2,3 1,1</div>
            <div>this &lt;div&gt; has no class</div>
            </div>

        '''
        div,div_end = make_html_tags("div")
        div_grid = div().set_parse_action(with_class("grid"))

        grid_expr = div_grid + SkipTo(div | div_end)("body")
        for grid_header in grid_expr.search_string(html):
            print(grid_header.body)

        div_any_type = div().set_parse_action(with_class(withAttribute.ANY_VALUE))
        div_expr = div_any_type + SkipTo(div | div_end)("body")
        for div_header in div_expr.search_string(html):
            print(div_header.body)

    prints::

        1 4 0 1 0

        1 4 0 1 0
        1,3 2,3 1,1
    """
    classattr = f"{namespace}:class" if namespace else "class"
    return with_attribute(**{classattr: classname})


# pre-PEP8 compatibility symbols
# fmt: off
@replaced_by_pep8(replace_with)
def replaceWith(): ...

@replaced_by_pep8(remove_quotes)
def removeQuotes(): ...

@replaced_by_pep8(with_attribute)
def withAttribute(): ...

@replaced_by_pep8(with_class)
def withClass(): ...

@replaced_by_pep8(match_only_at_col)
def matchOnlyAtCol(): ...

# fmt: on
python3.12/site-packages/pip/_vendor/pyparsing/__init__.py000064400000021634151732702370017477 0ustar00# module pyparsing.py
#
# Copyright (c) 2003-2022  Paul T. McGuire
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__doc__ = """
pyparsing module - Classes and methods to define and execute parsing grammars
=============================================================================

The pyparsing module is an alternative approach to creating and
executing simple grammars, vs. the traditional lex/yacc approach, or the
use of regular expressions.  With pyparsing, you don't need to learn
a new syntax for defining grammars or matching expressions - the parsing
module provides a library of classes that you use to construct the
grammar directly in Python.

Here is a program to parse "Hello, World!" (or any greeting of the form
``"<salutation>, <addressee>!"``), built up using :class:`Word`,
:class:`Literal`, and :class:`And` elements
(the :meth:`'+'<ParserElement.__add__>` operators create :class:`And` expressions,
and the strings are auto-converted to :class:`Literal` expressions)::

    from pip._vendor.pyparsing import Word, alphas

    # define grammar of a greeting
    greet = Word(alphas) + "," + Word(alphas) + "!"

    hello = "Hello, World!"
    print(hello, "->", greet.parse_string(hello))

The program outputs the following::

    Hello, World! -> ['Hello', ',', 'World', '!']

The Python representation of the grammar is quite readable, owing to the
self-explanatory class names, and the use of :class:`'+'<And>`,
:class:`'|'<MatchFirst>`, :class:`'^'<Or>` and :class:`'&'<Each>` operators.

The :class:`ParseResults` object returned from
:class:`ParserElement.parse_string` can be
accessed as a nested list, a dictionary, or an object with named
attributes.

The pyparsing module handles some of the problems that are typically
vexing when writing text parsers:

  - extra or missing whitespace (the above program will also handle
    "Hello,World!", "Hello  ,  World  !", etc.)
  - quoted strings
  - embedded comments


Getting Started -
-----------------
Visit the classes :class:`ParserElement` and :class:`ParseResults` to
see the base classes that most other pyparsing
classes inherit from. Use the docstrings for examples of how to:

 - construct literal match expressions from :class:`Literal` and
   :class:`CaselessLiteral` classes
 - construct character word-group expressions using the :class:`Word`
   class
 - see how to create repetitive expressions using :class:`ZeroOrMore`
   and :class:`OneOrMore` classes
 - use :class:`'+'<And>`, :class:`'|'<MatchFirst>`, :class:`'^'<Or>`,
   and :class:`'&'<Each>` operators to combine simple expressions into
   more complex ones
 - associate names with your parsed results using
   :class:`ParserElement.set_results_name`
 - access the parsed data, which is returned as a :class:`ParseResults`
   object
 - find some helpful expression short-cuts like :class:`DelimitedList`
   and :class:`one_of`
 - find more useful common expressions in the :class:`pyparsing_common`
   namespace class
"""
from typing import NamedTuple


class version_info(NamedTuple):
    major: int
    minor: int
    micro: int
    releaselevel: str
    serial: int

    @property
    def __version__(self):
        return (
            f"{self.major}.{self.minor}.{self.micro}"
            + (
                f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}",
                "",
            )[self.releaselevel == "final"]
        )

    def __str__(self):
        return f"{__name__} {self.__version__} / {__version_time__}"

    def __repr__(self):
        return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})"


__version_info__ = version_info(3, 1, 0, "final", 1)
__version_time__ = "18 Jun 2023 14:05 UTC"
__version__ = __version_info__.__version__
__versionTime__ = __version_time__
__author__ = "Paul McGuire <ptmcg.gm+pyparsing@gmail.com>"

from .util import *
from .exceptions import *
from .actions import *
from .core import __diag__, __compat__
from .results import *
from .core import *  # type: ignore[misc, assignment]
from .core import _builtin_exprs as core_builtin_exprs
from .helpers import *  # type: ignore[misc, assignment]
from .helpers import _builtin_exprs as helper_builtin_exprs

from .unicode import unicode_set, UnicodeRangeList, pyparsing_unicode as unicode
from .testing import pyparsing_test as testing
from .common import (
    pyparsing_common as common,
    _builtin_exprs as common_builtin_exprs,
)

# define backward compat synonyms
if "pyparsing_unicode" not in globals():
    pyparsing_unicode = unicode  # type: ignore[misc]
if "pyparsing_common" not in globals():
    pyparsing_common = common  # type: ignore[misc]
if "pyparsing_test" not in globals():
    pyparsing_test = testing  # type: ignore[misc]

core_builtin_exprs += common_builtin_exprs + helper_builtin_exprs


__all__ = [
    "__version__",
    "__version_time__",
    "__author__",
    "__compat__",
    "__diag__",
    "And",
    "AtLineStart",
    "AtStringStart",
    "CaselessKeyword",
    "CaselessLiteral",
    "CharsNotIn",
    "CloseMatch",
    "Combine",
    "DelimitedList",
    "Dict",
    "Each",
    "Empty",
    "FollowedBy",
    "Forward",
    "GoToColumn",
    "Group",
    "IndentedBlock",
    "Keyword",
    "LineEnd",
    "LineStart",
    "Literal",
    "Located",
    "PrecededBy",
    "MatchFirst",
    "NoMatch",
    "NotAny",
    "OneOrMore",
    "OnlyOnce",
    "OpAssoc",
    "Opt",
    "Optional",
    "Or",
    "ParseBaseException",
    "ParseElementEnhance",
    "ParseException",
    "ParseExpression",
    "ParseFatalException",
    "ParseResults",
    "ParseSyntaxException",
    "ParserElement",
    "PositionToken",
    "QuotedString",
    "RecursiveGrammarException",
    "Regex",
    "SkipTo",
    "StringEnd",
    "StringStart",
    "Suppress",
    "Token",
    "TokenConverter",
    "White",
    "Word",
    "WordEnd",
    "WordStart",
    "ZeroOrMore",
    "Char",
    "alphanums",
    "alphas",
    "alphas8bit",
    "any_close_tag",
    "any_open_tag",
    "autoname_elements",
    "c_style_comment",
    "col",
    "common_html_entity",
    "condition_as_parse_action",
    "counted_array",
    "cpp_style_comment",
    "dbl_quoted_string",
    "dbl_slash_comment",
    "delimited_list",
    "dict_of",
    "empty",
    "hexnums",
    "html_comment",
    "identchars",
    "identbodychars",
    "infix_notation",
    "java_style_comment",
    "line",
    "line_end",
    "line_start",
    "lineno",
    "make_html_tags",
    "make_xml_tags",
    "match_only_at_col",
    "match_previous_expr",
    "match_previous_literal",
    "nested_expr",
    "null_debug_action",
    "nums",
    "one_of",
    "original_text_for",
    "printables",
    "punc8bit",
    "pyparsing_common",
    "pyparsing_test",
    "pyparsing_unicode",
    "python_style_comment",
    "quoted_string",
    "remove_quotes",
    "replace_with",
    "replace_html_entity",
    "rest_of_line",
    "sgl_quoted_string",
    "srange",
    "string_end",
    "string_start",
    "token_map",
    "trace_parse_action",
    "ungroup",
    "unicode_set",
    "unicode_string",
    "with_attribute",
    "with_class",
    # pre-PEP8 compatibility names
    "__versionTime__",
    "anyCloseTag",
    "anyOpenTag",
    "cStyleComment",
    "commonHTMLEntity",
    "conditionAsParseAction",
    "countedArray",
    "cppStyleComment",
    "dblQuotedString",
    "dblSlashComment",
    "delimitedList",
    "dictOf",
    "htmlComment",
    "indentedBlock",
    "infixNotation",
    "javaStyleComment",
    "lineEnd",
    "lineStart",
    "locatedExpr",
    "makeHTMLTags",
    "makeXMLTags",
    "matchOnlyAtCol",
    "matchPreviousExpr",
    "matchPreviousLiteral",
    "nestedExpr",
    "nullDebugAction",
    "oneOf",
    "opAssoc",
    "originalTextFor",
    "pythonStyleComment",
    "quotedString",
    "removeQuotes",
    "replaceHTMLEntity",
    "replaceWith",
    "restOfLine",
    "sglQuotedString",
    "stringEnd",
    "stringStart",
    "tokenMap",
    "traceParseAction",
    "unicodeString",
    "withAttribute",
    "withClass",
]
python3.12/site-packages/pip/_vendor/pyparsing/results.py000064400000064104151732702370017440 0ustar00# results.py
from collections.abc import (
    MutableMapping,
    Mapping,
    MutableSequence,
    Iterator,
    Sequence,
    Container,
)
import pprint
from typing import Tuple, Any, Dict, Set, List

str_type: Tuple[type, ...] = (str, bytes)
_generator_type = type((_ for _ in ()))


class _ParseResultsWithOffset:
    tup: Tuple["ParseResults", int]
    __slots__ = ["tup"]

    def __init__(self, p1: "ParseResults", p2: int):
        self.tup: Tuple[ParseResults, int] = (p1, p2)

    def __getitem__(self, i):
        return self.tup[i]

    def __getstate__(self):
        return self.tup

    def __setstate__(self, *args):
        self.tup = args[0]


class ParseResults:
    """Structured parse results, to provide multiple means of access to
    the parsed data:

    - as a list (``len(results)``)
    - by list index (``results[0], results[1]``, etc.)
    - by attribute (``results.<results_name>`` - see :class:`ParserElement.set_results_name`)

    Example::

        integer = Word(nums)
        date_str = (integer.set_results_name("year") + '/'
                    + integer.set_results_name("month") + '/'
                    + integer.set_results_name("day"))
        # equivalent form:
        # date_str = (integer("year") + '/'
        #             + integer("month") + '/'
        #             + integer("day"))

        # parse_string returns a ParseResults object
        result = date_str.parse_string("1999/12/31")

        def test(s, fn=repr):
            print(f"{s} -> {fn(eval(s))}")
        test("list(result)")
        test("result[0]")
        test("result['month']")
        test("result.day")
        test("'month' in result")
        test("'minutes' in result")
        test("result.dump()", str)

    prints::

        list(result) -> ['1999', '/', '12', '/', '31']
        result[0] -> '1999'
        result['month'] -> '12'
        result.day -> '31'
        'month' in result -> True
        'minutes' in result -> False
        result.dump() -> ['1999', '/', '12', '/', '31']
        - day: '31'
        - month: '12'
        - year: '1999'
    """

    _null_values: Tuple[Any, ...] = (None, [], ())

    _name: str
    _parent: "ParseResults"
    _all_names: Set[str]
    _modal: bool
    _toklist: List[Any]
    _tokdict: Dict[str, Any]

    __slots__ = (
        "_name",
        "_parent",
        "_all_names",
        "_modal",
        "_toklist",
        "_tokdict",
    )

    class List(list):
        """
        Simple wrapper class to distinguish parsed list results that should be preserved
        as actual Python lists, instead of being converted to :class:`ParseResults`::

            LBRACK, RBRACK = map(pp.Suppress, "[]")
            element = pp.Forward()
            item = ppc.integer
            element_list = LBRACK + pp.DelimitedList(element) + RBRACK

            # add parse actions to convert from ParseResults to actual Python collection types
            def as_python_list(t):
                return pp.ParseResults.List(t.as_list())
            element_list.add_parse_action(as_python_list)

            element <<= item | element_list

            element.run_tests('''
                100
                [2,3,4]
                [[2, 1],3,4]
                [(2, 1),3,4]
                (2,3,4)
                ''', post_parse=lambda s, r: (r[0], type(r[0])))

        prints::

            100
            (100, <class 'int'>)

            [2,3,4]
            ([2, 3, 4], <class 'list'>)

            [[2, 1],3,4]
            ([[2, 1], 3, 4], <class 'list'>)

        (Used internally by :class:`Group` when `aslist=True`.)
        """

        def __new__(cls, contained=None):
            if contained is None:
                contained = []

            if not isinstance(contained, list):
                raise TypeError(
                    f"{cls.__name__} may only be constructed with a list, not {type(contained).__name__}"
                )

            return list.__new__(cls)

    def __new__(cls, toklist=None, name=None, **kwargs):
        if isinstance(toklist, ParseResults):
            return toklist
        self = object.__new__(cls)
        self._name = None
        self._parent = None
        self._all_names = set()

        if toklist is None:
            self._toklist = []
        elif isinstance(toklist, (list, _generator_type)):
            self._toklist = (
                [toklist[:]]
                if isinstance(toklist, ParseResults.List)
                else list(toklist)
            )
        else:
            self._toklist = [toklist]
        self._tokdict = dict()
        return self

    # Performance tuning: we construct a *lot* of these, so keep this
    # constructor as small and fast as possible
    def __init__(
        self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance
    ):
        self._tokdict: Dict[str, _ParseResultsWithOffset]
        self._modal = modal
        if name is not None and name != "":
            if isinstance(name, int):
                name = str(name)
            if not modal:
                self._all_names = {name}
            self._name = name
            if toklist not in self._null_values:
                if isinstance(toklist, (str_type, type)):
                    toklist = [toklist]
                if asList:
                    if isinstance(toklist, ParseResults):
                        self[name] = _ParseResultsWithOffset(
                            ParseResults(toklist._toklist), 0
                        )
                    else:
                        self[name] = _ParseResultsWithOffset(
                            ParseResults(toklist[0]), 0
                        )
                    self[name]._name = name
                else:
                    try:
                        self[name] = toklist[0]
                    except (KeyError, TypeError, IndexError):
                        if toklist is not self:
                            self[name] = toklist
                        else:
                            self._name = name

    def __getitem__(self, i):
        if isinstance(i, (int, slice)):
            return self._toklist[i]
        else:
            if i not in self._all_names:
                return self._tokdict[i][-1][0]
            else:
                return ParseResults([v[0] for v in self._tokdict[i]])

    def __setitem__(self, k, v, isinstance=isinstance):
        if isinstance(v, _ParseResultsWithOffset):
            self._tokdict[k] = self._tokdict.get(k, list()) + [v]
            sub = v[0]
        elif isinstance(k, (int, slice)):
            self._toklist[k] = v
            sub = v
        else:
            self._tokdict[k] = self._tokdict.get(k, list()) + [
                _ParseResultsWithOffset(v, 0)
            ]
            sub = v
        if isinstance(sub, ParseResults):
            sub._parent = self

    def __delitem__(self, i):
        if isinstance(i, (int, slice)):
            mylen = len(self._toklist)
            del self._toklist[i]

            # convert int to slice
            if isinstance(i, int):
                if i < 0:
                    i += mylen
                i = slice(i, i + 1)
            # get removed indices
            removed = list(range(*i.indices(mylen)))
            removed.reverse()
            # fixup indices in token dictionary
            for name, occurrences in self._tokdict.items():
                for j in removed:
                    for k, (value, position) in enumerate(occurrences):
                        occurrences[k] = _ParseResultsWithOffset(
                            value, position - (position > j)
                        )
        else:
            del self._tokdict[i]

    def __contains__(self, k) -> bool:
        return k in self._tokdict

    def __len__(self) -> int:
        return len(self._toklist)

    def __bool__(self) -> bool:
        return not not (self._toklist or self._tokdict)

    def __iter__(self) -> Iterator:
        return iter(self._toklist)

    def __reversed__(self) -> Iterator:
        return iter(self._toklist[::-1])

    def keys(self):
        return iter(self._tokdict)

    def values(self):
        return (self[k] for k in self.keys())

    def items(self):
        return ((k, self[k]) for k in self.keys())

    def haskeys(self) -> bool:
        """
        Since ``keys()`` returns an iterator, this method is helpful in bypassing
        code that looks for the existence of any defined results names."""
        return not not self._tokdict

    def pop(self, *args, **kwargs):
        """
        Removes and returns item at specified index (default= ``last``).
        Supports both ``list`` and ``dict`` semantics for ``pop()``. If
        passed no argument or an integer argument, it will use ``list``
        semantics and pop tokens from the list of parsed tokens. If passed
        a non-integer argument (most likely a string), it will use ``dict``
        semantics and pop the corresponding value from any defined results
        names. A second default return value argument is supported, just as in
        ``dict.pop()``.

        Example::

            numlist = Word(nums)[...]
            print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

            def remove_first(tokens):
                tokens.pop(0)
            numlist.add_parse_action(remove_first)
            print(numlist.parse_string("0 123 321")) # -> ['123', '321']

            label = Word(alphas)
            patt = label("LABEL") + Word(nums)[1, ...]
            print(patt.parse_string("AAB 123 321").dump())

            # Use pop() in a parse action to remove named result (note that corresponding value is not
            # removed from list form of results)
            def remove_LABEL(tokens):
                tokens.pop("LABEL")
                return tokens
            patt.add_parse_action(remove_LABEL)
            print(patt.parse_string("AAB 123 321").dump())

        prints::

            ['AAB', '123', '321']
            - LABEL: 'AAB'

            ['AAB', '123', '321']
        """
        if not args:
            args = [-1]
        for k, v in kwargs.items():
            if k == "default":
                args = (args[0], v)
            else:
                raise TypeError(f"pop() got an unexpected keyword argument {k!r}")
        if isinstance(args[0], int) or len(args) == 1 or args[0] in self:
            index = args[0]
            ret = self[index]
            del self[index]
            return ret
        else:
            defaultvalue = args[1]
            return defaultvalue

    def get(self, key, default_value=None):
        """
        Returns named result matching the given key, or if there is no
        such name, then returns the given ``default_value`` or ``None`` if no
        ``default_value`` is specified.

        Similar to ``dict.get()``.

        Example::

            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            result = date_str.parse_string("1999/12/31")
            print(result.get("year")) # -> '1999'
            print(result.get("hour", "not specified")) # -> 'not specified'
            print(result.get("hour")) # -> None
        """
        if key in self:
            return self[key]
        else:
            return default_value

    def insert(self, index, ins_string):
        """
        Inserts new element at location index in the list of parsed tokens.

        Similar to ``list.insert()``.

        Example::

            numlist = Word(nums)[...]
            print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

            # use a parse action to insert the parse location in the front of the parsed results
            def insert_locn(locn, tokens):
                tokens.insert(0, locn)
            numlist.add_parse_action(insert_locn)
            print(numlist.parse_string("0 123 321")) # -> [0, '0', '123', '321']
        """
        self._toklist.insert(index, ins_string)
        # fixup indices in token dictionary
        for name, occurrences in self._tokdict.items():
            for k, (value, position) in enumerate(occurrences):
                occurrences[k] = _ParseResultsWithOffset(
                    value, position + (position > index)
                )

    def append(self, item):
        """
        Add single element to end of ``ParseResults`` list of elements.

        Example::

            numlist = Word(nums)[...]
            print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

            # use a parse action to compute the sum of the parsed integers, and add it to the end
            def append_sum(tokens):
                tokens.append(sum(map(int, tokens)))
            numlist.add_parse_action(append_sum)
            print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321', 444]
        """
        self._toklist.append(item)

    def extend(self, itemseq):
        """
        Add sequence of elements to end of ``ParseResults`` list of elements.

        Example::

            patt = Word(alphas)[1, ...]

            # use a parse action to append the reverse of the matched strings, to make a palindrome
            def make_palindrome(tokens):
                tokens.extend(reversed([t[::-1] for t in tokens]))
                return ''.join(tokens)
            patt.add_parse_action(make_palindrome)
            print(patt.parse_string("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'
        """
        if isinstance(itemseq, ParseResults):
            self.__iadd__(itemseq)
        else:
            self._toklist.extend(itemseq)

    def clear(self):
        """
        Clear all elements and results names.
        """
        del self._toklist[:]
        self._tokdict.clear()

    def __getattr__(self, name):
        try:
            return self[name]
        except KeyError:
            if name.startswith("__"):
                raise AttributeError(name)
            return ""

    def __add__(self, other: "ParseResults") -> "ParseResults":
        ret = self.copy()
        ret += other
        return ret

    def __iadd__(self, other: "ParseResults") -> "ParseResults":
        if not other:
            return self

        if other._tokdict:
            offset = len(self._toklist)
            addoffset = lambda a: offset if a < 0 else a + offset
            otheritems = other._tokdict.items()
            otherdictitems = [
                (k, _ParseResultsWithOffset(v[0], addoffset(v[1])))
                for k, vlist in otheritems
                for v in vlist
            ]
            for k, v in otherdictitems:
                self[k] = v
                if isinstance(v[0], ParseResults):
                    v[0]._parent = self

        self._toklist += other._toklist
        self._all_names |= other._all_names
        return self

    def __radd__(self, other) -> "ParseResults":
        if isinstance(other, int) and other == 0:
            # useful for merging many ParseResults using sum() builtin
            return self.copy()
        else:
            # this may raise a TypeError - so be it
            return other + self

    def __repr__(self) -> str:
        return f"{type(self).__name__}({self._toklist!r}, {self.as_dict()})"

    def __str__(self) -> str:
        return (
            "["
            + ", ".join(
                [
                    str(i) if isinstance(i, ParseResults) else repr(i)
                    for i in self._toklist
                ]
            )
            + "]"
        )

    def _asStringList(self, sep=""):
        out = []
        for item in self._toklist:
            if out and sep:
                out.append(sep)
            if isinstance(item, ParseResults):
                out += item._asStringList()
            else:
                out.append(str(item))
        return out

    def as_list(self) -> list:
        """
        Returns the parse results as a nested list of matching tokens, all converted to strings.

        Example::

            patt = Word(alphas)[1, ...]
            result = patt.parse_string("sldkj lsdkj sldkj")
            # even though the result prints in string-like form, it is actually a pyparsing ParseResults
            print(type(result), result) # -> <class 'pyparsing.ParseResults'> ['sldkj', 'lsdkj', 'sldkj']

            # Use as_list() to create an actual list
            result_list = result.as_list()
            print(type(result_list), result_list) # -> <class 'list'> ['sldkj', 'lsdkj', 'sldkj']
        """
        return [
            res.as_list() if isinstance(res, ParseResults) else res
            for res in self._toklist
        ]

    def as_dict(self) -> dict:
        """
        Returns the named parse results as a nested dictionary.

        Example::

            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            result = date_str.parse_string('12/31/1999')
            print(type(result), repr(result)) # -> <class 'pyparsing.ParseResults'> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]})

            result_dict = result.as_dict()
            print(type(result_dict), repr(result_dict)) # -> <class 'dict'> {'day': '1999', 'year': '12', 'month': '31'}

            # even though a ParseResults supports dict-like access, sometime you just need to have a dict
            import json
            print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable
            print(json.dumps(result.as_dict())) # -> {"month": "31", "day": "1999", "year": "12"}
        """

        def to_item(obj):
            if isinstance(obj, ParseResults):
                return obj.as_dict() if obj.haskeys() else [to_item(v) for v in obj]
            else:
                return obj

        return dict((k, to_item(v)) for k, v in self.items())

    def copy(self) -> "ParseResults":
        """
        Returns a new shallow copy of a :class:`ParseResults` object. `ParseResults`
        items contained within the source are shared with the copy. Use
        :class:`ParseResults.deepcopy()` to create a copy with its own separate
        content values.
        """
        ret = ParseResults(self._toklist)
        ret._tokdict = self._tokdict.copy()
        ret._parent = self._parent
        ret._all_names |= self._all_names
        ret._name = self._name
        return ret

    def deepcopy(self) -> "ParseResults":
        """
        Returns a new deep copy of a :class:`ParseResults` object.
        """
        ret = self.copy()
        # replace values with copies if they are of known mutable types
        for i, obj in enumerate(self._toklist):
            if isinstance(obj, ParseResults):
                self._toklist[i] = obj.deepcopy()
            elif isinstance(obj, (str, bytes)):
                pass
            elif isinstance(obj, MutableMapping):
                self._toklist[i] = dest = type(obj)()
                for k, v in obj.items():
                    dest[k] = v.deepcopy() if isinstance(v, ParseResults) else v
            elif isinstance(obj, Container):
                self._toklist[i] = type(obj)(
                    v.deepcopy() if isinstance(v, ParseResults) else v for v in obj
                )
        return ret

    def get_name(self):
        r"""
        Returns the results name for this token expression. Useful when several
        different expressions might match at a particular location.

        Example::

            integer = Word(nums)
            ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
            house_number_expr = Suppress('#') + Word(nums, alphanums)
            user_data = (Group(house_number_expr)("house_number")
                        | Group(ssn_expr)("ssn")
                        | Group(integer)("age"))
            user_info = user_data[1, ...]

            result = user_info.parse_string("22 111-22-3333 #221B")
            for item in result:
                print(item.get_name(), ':', item[0])

        prints::

            age : 22
            ssn : 111-22-3333
            house_number : 221B
        """
        if self._name:
            return self._name
        elif self._parent:
            par: "ParseResults" = self._parent
            parent_tokdict_items = par._tokdict.items()
            return next(
                (
                    k
                    for k, vlist in parent_tokdict_items
                    for v, loc in vlist
                    if v is self
                ),
                None,
            )
        elif (
            len(self) == 1
            and len(self._tokdict) == 1
            and next(iter(self._tokdict.values()))[0][1] in (0, -1)
        ):
            return next(iter(self._tokdict.keys()))
        else:
            return None

    def dump(self, indent="", full=True, include_list=True, _depth=0) -> str:
        """
        Diagnostic method for listing out the contents of
        a :class:`ParseResults`. Accepts an optional ``indent`` argument so
        that this string can be embedded in a nested display of other data.

        Example::

            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            result = date_str.parse_string('1999/12/31')
            print(result.dump())

        prints::

            ['1999', '/', '12', '/', '31']
            - day: '31'
            - month: '12'
            - year: '1999'
        """
        out = []
        NL = "\n"
        out.append(indent + str(self.as_list()) if include_list else "")

        if full:
            if self.haskeys():
                items = sorted((str(k), v) for k, v in self.items())
                for k, v in items:
                    if out:
                        out.append(NL)
                    out.append(f"{indent}{('  ' * _depth)}- {k}: ")
                    if isinstance(v, ParseResults):
                        if v:
                            out.append(
                                v.dump(
                                    indent=indent,
                                    full=full,
                                    include_list=include_list,
                                    _depth=_depth + 1,
                                )
                            )
                        else:
                            out.append(str(v))
                    else:
                        out.append(repr(v))
            if any(isinstance(vv, ParseResults) for vv in self):
                v = self
                for i, vv in enumerate(v):
                    if isinstance(vv, ParseResults):
                        out.append(
                            "\n{}{}[{}]:\n{}{}{}".format(
                                indent,
                                ("  " * (_depth)),
                                i,
                                indent,
                                ("  " * (_depth + 1)),
                                vv.dump(
                                    indent=indent,
                                    full=full,
                                    include_list=include_list,
                                    _depth=_depth + 1,
                                ),
                            )
                        )
                    else:
                        out.append(
                            "\n%s%s[%d]:\n%s%s%s"
                            % (
                                indent,
                                ("  " * (_depth)),
                                i,
                                indent,
                                ("  " * (_depth + 1)),
                                str(vv),
                            )
                        )

        return "".join(out)

    def pprint(self, *args, **kwargs):
        """
        Pretty-printer for parsed results as a list, using the
        `pprint <https://docs.python.org/3/library/pprint.html>`_ module.
        Accepts additional positional or keyword args as defined for
        `pprint.pprint <https://docs.python.org/3/library/pprint.html#pprint.pprint>`_ .

        Example::

            ident = Word(alphas, alphanums)
            num = Word(nums)
            func = Forward()
            term = ident | num | Group('(' + func + ')')
            func <<= ident + Group(Optional(DelimitedList(term)))
            result = func.parse_string("fna a,b,(fnb c,d,200),100")
            result.pprint(width=40)

        prints::

            ['fna',
             ['a',
              'b',
              ['(', 'fnb', ['c', 'd', '200'], ')'],
              '100']]
        """
        pprint.pprint(self.as_list(), *args, **kwargs)

    # add support for pickle protocol
    def __getstate__(self):
        return (
            self._toklist,
            (
                self._tokdict.copy(),
                None,
                self._all_names,
                self._name,
            ),
        )

    def __setstate__(self, state):
        self._toklist, (self._tokdict, par, inAccumNames, self._name) = state
        self._all_names = set(inAccumNames)
        self._parent = None

    def __getnewargs__(self):
        return self._toklist, self._name

    def __dir__(self):
        return dir(type(self)) + list(self.keys())

    @classmethod
    def from_dict(cls, other, name=None) -> "ParseResults":
        """
        Helper classmethod to construct a ``ParseResults`` from a ``dict``, preserving the
        name-value relations as results names. If an optional ``name`` argument is
        given, a nested ``ParseResults`` will be returned.
        """

        def is_iterable(obj):
            try:
                iter(obj)
            except Exception:
                return False
            # str's are iterable, but in pyparsing, we don't want to iterate over them
            else:
                return not isinstance(obj, str_type)

        ret = cls([])
        for k, v in other.items():
            if isinstance(v, Mapping):
                ret += cls.from_dict(v, name=k)
            else:
                ret += cls([v], name=k, asList=is_iterable(v))
        if name is not None:
            ret = cls([ret], name=name)
        return ret

    asList = as_list
    """Deprecated - use :class:`as_list`"""
    asDict = as_dict
    """Deprecated - use :class:`as_dict`"""
    getName = get_name
    """Deprecated - use :class:`get_name`"""


MutableMapping.register(ParseResults)
MutableSequence.register(ParseResults)
python3.12/site-packages/pip/_vendor/pyparsing/common.py000064400000032113151732702370017222 0ustar00# common.py
from .core import *
from .helpers import DelimitedList, any_open_tag, any_close_tag
from datetime import datetime


# some other useful expressions - using lower-case class name since we are really using this as a namespace
class pyparsing_common:
    """Here are some common low-level expressions that may be useful in
    jump-starting parser development:

    - numeric forms (:class:`integers<integer>`, :class:`reals<real>`,
      :class:`scientific notation<sci_real>`)
    - common :class:`programming identifiers<identifier>`
    - network addresses (:class:`MAC<mac_address>`,
      :class:`IPv4<ipv4_address>`, :class:`IPv6<ipv6_address>`)
    - ISO8601 :class:`dates<iso8601_date>` and
      :class:`datetime<iso8601_datetime>`
    - :class:`UUID<uuid>`
    - :class:`comma-separated list<comma_separated_list>`
    - :class:`url`

    Parse actions:

    - :class:`convert_to_integer`
    - :class:`convert_to_float`
    - :class:`convert_to_date`
    - :class:`convert_to_datetime`
    - :class:`strip_html_tags`
    - :class:`upcase_tokens`
    - :class:`downcase_tokens`

    Example::

        pyparsing_common.number.run_tests('''
            # any int or real number, returned as the appropriate type
            100
            -100
            +100
            3.14159
            6.02e23
            1e-12
            ''')

        pyparsing_common.fnumber.run_tests('''
            # any int or real number, returned as float
            100
            -100
            +100
            3.14159
            6.02e23
            1e-12
            ''')

        pyparsing_common.hex_integer.run_tests('''
            # hex numbers
            100
            FF
            ''')

        pyparsing_common.fraction.run_tests('''
            # fractions
            1/2
            -3/4
            ''')

        pyparsing_common.mixed_integer.run_tests('''
            # mixed fractions
            1
            1/2
            -3/4
            1-3/4
            ''')

        import uuid
        pyparsing_common.uuid.set_parse_action(token_map(uuid.UUID))
        pyparsing_common.uuid.run_tests('''
            # uuid
            12345678-1234-5678-1234-567812345678
            ''')

    prints::

        # any int or real number, returned as the appropriate type
        100
        [100]

        -100
        [-100]

        +100
        [100]

        3.14159
        [3.14159]

        6.02e23
        [6.02e+23]

        1e-12
        [1e-12]

        # any int or real number, returned as float
        100
        [100.0]

        -100
        [-100.0]

        +100
        [100.0]

        3.14159
        [3.14159]

        6.02e23
        [6.02e+23]

        1e-12
        [1e-12]

        # hex numbers
        100
        [256]

        FF
        [255]

        # fractions
        1/2
        [0.5]

        -3/4
        [-0.75]

        # mixed fractions
        1
        [1]

        1/2
        [0.5]

        -3/4
        [-0.75]

        1-3/4
        [1.75]

        # uuid
        12345678-1234-5678-1234-567812345678
        [UUID('12345678-1234-5678-1234-567812345678')]
    """

    convert_to_integer = token_map(int)
    """
    Parse action for converting parsed integers to Python int
    """

    convert_to_float = token_map(float)
    """
    Parse action for converting parsed numbers to Python float
    """

    integer = Word(nums).set_name("integer").set_parse_action(convert_to_integer)
    """expression that parses an unsigned integer, returns an int"""

    hex_integer = (
        Word(hexnums).set_name("hex integer").set_parse_action(token_map(int, 16))
    )
    """expression that parses a hexadecimal integer, returns an int"""

    signed_integer = (
        Regex(r"[+-]?\d+")
        .set_name("signed integer")
        .set_parse_action(convert_to_integer)
    )
    """expression that parses an integer with optional leading sign, returns an int"""

    fraction = (
        signed_integer().set_parse_action(convert_to_float)
        + "/"
        + signed_integer().set_parse_action(convert_to_float)
    ).set_name("fraction")
    """fractional expression of an integer divided by an integer, returns a float"""
    fraction.add_parse_action(lambda tt: tt[0] / tt[-1])

    mixed_integer = (
        fraction | signed_integer + Opt(Opt("-").suppress() + fraction)
    ).set_name("fraction or mixed integer-fraction")
    """mixed integer of the form 'integer - fraction', with optional leading integer, returns float"""
    mixed_integer.add_parse_action(sum)

    real = (
        Regex(r"[+-]?(?:\d+\.\d*|\.\d+)")
        .set_name("real number")
        .set_parse_action(convert_to_float)
    )
    """expression that parses a floating point number and returns a float"""

    sci_real = (
        Regex(r"[+-]?(?:\d+(?:[eE][+-]?\d+)|(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?)")
        .set_name("real number with scientific notation")
        .set_parse_action(convert_to_float)
    )
    """expression that parses a floating point number with optional
    scientific notation and returns a float"""

    # streamlining this expression makes the docs nicer-looking
    number = (sci_real | real | signed_integer).setName("number").streamline()
    """any numeric expression, returns the corresponding Python type"""

    fnumber = (
        Regex(r"[+-]?\d+\.?\d*([eE][+-]?\d+)?")
        .set_name("fnumber")
        .set_parse_action(convert_to_float)
    )
    """any int or real number, returned as float"""

    identifier = Word(identchars, identbodychars).set_name("identifier")
    """typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')"""

    ipv4_address = Regex(
        r"(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}"
    ).set_name("IPv4 address")
    "IPv4 address (``0.0.0.0 - 255.255.255.255``)"

    _ipv6_part = Regex(r"[0-9a-fA-F]{1,4}").set_name("hex_integer")
    _full_ipv6_address = (_ipv6_part + (":" + _ipv6_part) * 7).set_name(
        "full IPv6 address"
    )
    _short_ipv6_address = (
        Opt(_ipv6_part + (":" + _ipv6_part) * (0, 6))
        + "::"
        + Opt(_ipv6_part + (":" + _ipv6_part) * (0, 6))
    ).set_name("short IPv6 address")
    _short_ipv6_address.add_condition(
        lambda t: sum(1 for tt in t if pyparsing_common._ipv6_part.matches(tt)) < 8
    )
    _mixed_ipv6_address = ("::ffff:" + ipv4_address).set_name("mixed IPv6 address")
    ipv6_address = Combine(
        (_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).set_name(
            "IPv6 address"
        )
    ).set_name("IPv6 address")
    "IPv6 address (long, short, or mixed form)"

    mac_address = Regex(
        r"[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}"
    ).set_name("MAC address")
    "MAC address xx:xx:xx:xx:xx (may also have '-' or '.' delimiters)"

    @staticmethod
    def convert_to_date(fmt: str = "%Y-%m-%d"):
        """
        Helper to create a parse action for converting parsed date string to Python datetime.date

        Params -
        - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%d"``)

        Example::

            date_expr = pyparsing_common.iso8601_date.copy()
            date_expr.set_parse_action(pyparsing_common.convert_to_date())
            print(date_expr.parse_string("1999-12-31"))

        prints::

            [datetime.date(1999, 12, 31)]
        """

        def cvt_fn(ss, ll, tt):
            try:
                return datetime.strptime(tt[0], fmt).date()
            except ValueError as ve:
                raise ParseException(ss, ll, str(ve))

        return cvt_fn

    @staticmethod
    def convert_to_datetime(fmt: str = "%Y-%m-%dT%H:%M:%S.%f"):
        """Helper to create a parse action for converting parsed
        datetime string to Python datetime.datetime

        Params -
        - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%dT%H:%M:%S.%f"``)

        Example::

            dt_expr = pyparsing_common.iso8601_datetime.copy()
            dt_expr.set_parse_action(pyparsing_common.convert_to_datetime())
            print(dt_expr.parse_string("1999-12-31T23:59:59.999"))

        prints::

            [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)]
        """

        def cvt_fn(s, l, t):
            try:
                return datetime.strptime(t[0], fmt)
            except ValueError as ve:
                raise ParseException(s, l, str(ve))

        return cvt_fn

    iso8601_date = Regex(
        r"(?P<year>\d{4})(?:-(?P<month>\d\d)(?:-(?P<day>\d\d))?)?"
    ).set_name("ISO8601 date")
    "ISO8601 date (``yyyy-mm-dd``)"

    iso8601_datetime = Regex(
        r"(?P<year>\d{4})-(?P<month>\d\d)-(?P<day>\d\d)[T ](?P<hour>\d\d):(?P<minute>\d\d)(:(?P<second>\d\d(\.\d*)?)?)?(?P<tz>Z|[+-]\d\d:?\d\d)?"
    ).set_name("ISO8601 datetime")
    "ISO8601 datetime (``yyyy-mm-ddThh:mm:ss.s(Z|+-00:00)``) - trailing seconds, milliseconds, and timezone optional; accepts separating ``'T'`` or ``' '``"

    uuid = Regex(r"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}").set_name("UUID")
    "UUID (``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``)"

    _html_stripper = any_open_tag.suppress() | any_close_tag.suppress()

    @staticmethod
    def strip_html_tags(s: str, l: int, tokens: ParseResults):
        """Parse action to remove HTML tags from web page HTML source

        Example::

            # strip HTML links from normal text
            text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>'
            td, td_end = make_html_tags("TD")
            table_text = td + SkipTo(td_end).set_parse_action(pyparsing_common.strip_html_tags)("body") + td_end
            print(table_text.parse_string(text).body)

        Prints::

            More info at the pyparsing wiki page
        """
        return pyparsing_common._html_stripper.transform_string(tokens[0])

    _commasepitem = (
        Combine(
            OneOrMore(
                ~Literal(",")
                + ~LineEnd()
                + Word(printables, exclude_chars=",")
                + Opt(White(" \t") + ~FollowedBy(LineEnd() | ","))
            )
        )
        .streamline()
        .set_name("commaItem")
    )
    comma_separated_list = DelimitedList(
        Opt(quoted_string.copy() | _commasepitem, default="")
    ).set_name("comma separated list")
    """Predefined expression of 1 or more printable words or quoted strings, separated by commas."""

    upcase_tokens = staticmethod(token_map(lambda t: t.upper()))
    """Parse action to convert tokens to upper case."""

    downcase_tokens = staticmethod(token_map(lambda t: t.lower()))
    """Parse action to convert tokens to lower case."""

    # fmt: off
    url = Regex(
        # https://mathiasbynens.be/demo/url-regex
        # https://gist.github.com/dperini/729294
        r"(?P<url>" +
        # protocol identifier (optional)
        # short syntax // still required
        r"(?:(?:(?P<scheme>https?|ftp):)?\/\/)" +
        # user:pass BasicAuth (optional)
        r"(?:(?P<auth>\S+(?::\S*)?)@)?" +
        r"(?P<host>" +
        # IP address exclusion
        # private & local networks
        r"(?!(?:10|127)(?:\.\d{1,3}){3})" +
        r"(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})" +
        r"(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})" +
        # IP address dotted notation octets
        # excludes loopback network 0.0.0.0
        # excludes reserved space >= 224.0.0.0
        # excludes network & broadcast addresses
        # (first & last IP address of each class)
        r"(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])" +
        r"(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}" +
        r"(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))" +
        r"|" +
        # host & domain names, may end with dot
        # can be replaced by a shortest alternative
        # (?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.)+
        r"(?:" +
        r"(?:" +
        r"[a-z0-9\u00a1-\uffff]" +
        r"[a-z0-9\u00a1-\uffff_-]{0,62}" +
        r")?" +
        r"[a-z0-9\u00a1-\uffff]\." +
        r")+" +
        # TLD identifier name, may end with dot
        r"(?:[a-z\u00a1-\uffff]{2,}\.?)" +
        r")" +
        # port number (optional)
        r"(:(?P<port>\d{2,5}))?" +
        # resource path (optional)
        r"(?P<path>\/[^?# ]*)?" +
        # query string (optional)
        r"(\?(?P<query>[^#]*))?" +
        # fragment (optional)
        r"(#(?P<fragment>\S*))?" +
        r")"
    ).set_name("url")
    """URL (http/https/ftp scheme)"""
    # fmt: on

    # pre-PEP8 compatibility names
    convertToInteger = convert_to_integer
    """Deprecated - use :class:`convert_to_integer`"""
    convertToFloat = convert_to_float
    """Deprecated - use :class:`convert_to_float`"""
    convertToDate = convert_to_date
    """Deprecated - use :class:`convert_to_date`"""
    convertToDatetime = convert_to_datetime
    """Deprecated - use :class:`convert_to_datetime`"""
    stripHTMLTags = strip_html_tags
    """Deprecated - use :class:`strip_html_tags`"""
    upcaseTokens = upcase_tokens
    """Deprecated - use :class:`upcase_tokens`"""
    downcaseTokens = downcase_tokens
    """Deprecated - use :class:`downcase_tokens`"""


_builtin_exprs = [
    v for v in vars(pyparsing_common).values() if isinstance(v, ParserElement)
]
python3.12/site-packages/pip/_vendor/pyparsing/helpers.py000064400000113366151732702370017406 0ustar00# helpers.py
import html.entities
import re
import sys
import typing

from . import __diag__
from .core import *
from .util import (
    _bslash,
    _flatten,
    _escape_regex_range_chars,
    replaced_by_pep8,
)


#
# global helpers
#
def counted_array(
    expr: ParserElement,
    int_expr: typing.Optional[ParserElement] = None,
    *,
    intExpr: typing.Optional[ParserElement] = None,
) -> ParserElement:
    """Helper to define a counted list of expressions.

    This helper defines a pattern of the form::

        integer expr expr expr...

    where the leading integer tells how many expr expressions follow.
    The matched tokens returns the array of expr tokens as a list - the
    leading count token is suppressed.

    If ``int_expr`` is specified, it should be a pyparsing expression
    that produces an integer value.

    Example::

        counted_array(Word(alphas)).parse_string('2 ab cd ef')  # -> ['ab', 'cd']

        # in this parser, the leading integer value is given in binary,
        # '10' indicating that 2 values are in the array
        binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2))
        counted_array(Word(alphas), int_expr=binary_constant).parse_string('10 ab cd ef')  # -> ['ab', 'cd']

        # if other fields must be parsed after the count but before the
        # list items, give the fields results names and they will
        # be preserved in the returned ParseResults:
        count_with_metadata = integer + Word(alphas)("type")
        typed_array = counted_array(Word(alphanums), int_expr=count_with_metadata)("items")
        result = typed_array.parse_string("3 bool True True False")
        print(result.dump())

        # prints
        # ['True', 'True', 'False']
        # - items: ['True', 'True', 'False']
        # - type: 'bool'
    """
    intExpr = intExpr or int_expr
    array_expr = Forward()

    def count_field_parse_action(s, l, t):
        nonlocal array_expr
        n = t[0]
        array_expr <<= (expr * n) if n else Empty()
        # clear list contents, but keep any named results
        del t[:]

    if intExpr is None:
        intExpr = Word(nums).set_parse_action(lambda t: int(t[0]))
    else:
        intExpr = intExpr.copy()
    intExpr.set_name("arrayLen")
    intExpr.add_parse_action(count_field_parse_action, call_during_try=True)
    return (intExpr + array_expr).set_name("(len) " + str(expr) + "...")


def match_previous_literal(expr: ParserElement) -> ParserElement:
    """Helper to define an expression that is indirectly defined from
    the tokens matched in a previous expression, that is, it looks for
    a 'repeat' of a previous expression.  For example::

        first = Word(nums)
        second = match_previous_literal(first)
        match_expr = first + ":" + second

    will match ``"1:1"``, but not ``"1:2"``.  Because this
    matches a previous literal, will also match the leading
    ``"1:1"`` in ``"1:10"``. If this is not desired, use
    :class:`match_previous_expr`. Do *not* use with packrat parsing
    enabled.
    """
    rep = Forward()

    def copy_token_to_repeater(s, l, t):
        if t:
            if len(t) == 1:
                rep << t[0]
            else:
                # flatten t tokens
                tflat = _flatten(t.as_list())
                rep << And(Literal(tt) for tt in tflat)
        else:
            rep << Empty()

    expr.add_parse_action(copy_token_to_repeater, callDuringTry=True)
    rep.set_name("(prev) " + str(expr))
    return rep


def match_previous_expr(expr: ParserElement) -> ParserElement:
    """Helper to define an expression that is indirectly defined from
    the tokens matched in a previous expression, that is, it looks for
    a 'repeat' of a previous expression.  For example::

        first = Word(nums)
        second = match_previous_expr(first)
        match_expr = first + ":" + second

    will match ``"1:1"``, but not ``"1:2"``.  Because this
    matches by expressions, will *not* match the leading ``"1:1"``
    in ``"1:10"``; the expressions are evaluated first, and then
    compared, so ``"1"`` is compared with ``"10"``. Do *not* use
    with packrat parsing enabled.
    """
    rep = Forward()
    e2 = expr.copy()
    rep <<= e2

    def copy_token_to_repeater(s, l, t):
        matchTokens = _flatten(t.as_list())

        def must_match_these_tokens(s, l, t):
            theseTokens = _flatten(t.as_list())
            if theseTokens != matchTokens:
                raise ParseException(
                    s, l, f"Expected {matchTokens}, found{theseTokens}"
                )

        rep.set_parse_action(must_match_these_tokens, callDuringTry=True)

    expr.add_parse_action(copy_token_to_repeater, callDuringTry=True)
    rep.set_name("(prev) " + str(expr))
    return rep


def one_of(
    strs: Union[typing.Iterable[str], str],
    caseless: bool = False,
    use_regex: bool = True,
    as_keyword: bool = False,
    *,
    useRegex: bool = True,
    asKeyword: bool = False,
) -> ParserElement:
    """Helper to quickly define a set of alternative :class:`Literal` s,
    and makes sure to do longest-first testing when there is a conflict,
    regardless of the input order, but returns
    a :class:`MatchFirst` for best performance.

    Parameters:

    - ``strs`` - a string of space-delimited literals, or a collection of
      string literals
    - ``caseless`` - treat all literals as caseless - (default= ``False``)
    - ``use_regex`` - as an optimization, will
      generate a :class:`Regex` object; otherwise, will generate
      a :class:`MatchFirst` object (if ``caseless=True`` or ``as_keyword=True``, or if
      creating a :class:`Regex` raises an exception) - (default= ``True``)
    - ``as_keyword`` - enforce :class:`Keyword`-style matching on the
      generated expressions - (default= ``False``)
    - ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility,
      but will be removed in a future release

    Example::

        comp_oper = one_of("< = > <= >= !=")
        var = Word(alphas)
        number = Word(nums)
        term = var | number
        comparison_expr = term + comp_oper + term
        print(comparison_expr.search_string("B = 12  AA=23 B<=AA AA>12"))

    prints::

        [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']]
    """
    asKeyword = asKeyword or as_keyword
    useRegex = useRegex and use_regex

    if (
        isinstance(caseless, str_type)
        and __diag__.warn_on_multiple_string_args_to_oneof
    ):
        warnings.warn(
            "More than one string argument passed to one_of, pass"
            " choices as a list or space-delimited string",
            stacklevel=2,
        )

    if caseless:
        isequal = lambda a, b: a.upper() == b.upper()
        masks = lambda a, b: b.upper().startswith(a.upper())
        parseElementClass = CaselessKeyword if asKeyword else CaselessLiteral
    else:
        isequal = lambda a, b: a == b
        masks = lambda a, b: b.startswith(a)
        parseElementClass = Keyword if asKeyword else Literal

    symbols: List[str] = []
    if isinstance(strs, str_type):
        strs = typing.cast(str, strs)
        symbols = strs.split()
    elif isinstance(strs, Iterable):
        symbols = list(strs)
    else:
        raise TypeError("Invalid argument to one_of, expected string or iterable")
    if not symbols:
        return NoMatch()

    # reorder given symbols to take care to avoid masking longer choices with shorter ones
    # (but only if the given symbols are not just single characters)
    if any(len(sym) > 1 for sym in symbols):
        i = 0
        while i < len(symbols) - 1:
            cur = symbols[i]
            for j, other in enumerate(symbols[i + 1 :]):
                if isequal(other, cur):
                    del symbols[i + j + 1]
                    break
                elif masks(cur, other):
                    del symbols[i + j + 1]
                    symbols.insert(i, other)
                    break
            else:
                i += 1

    if useRegex:
        re_flags: int = re.IGNORECASE if caseless else 0

        try:
            if all(len(sym) == 1 for sym in symbols):
                # symbols are just single characters, create range regex pattern
                patt = f"[{''.join(_escape_regex_range_chars(sym) for sym in symbols)}]"
            else:
                patt = "|".join(re.escape(sym) for sym in symbols)

            # wrap with \b word break markers if defining as keywords
            if asKeyword:
                patt = rf"\b(?:{patt})\b"

            ret = Regex(patt, flags=re_flags).set_name(" | ".join(symbols))

            if caseless:
                # add parse action to return symbols as specified, not in random
                # casing as found in input string
                symbol_map = {sym.lower(): sym for sym in symbols}
                ret.add_parse_action(lambda s, l, t: symbol_map[t[0].lower()])

            return ret

        except re.error:
            warnings.warn(
                "Exception creating Regex for one_of, building MatchFirst", stacklevel=2
            )

    # last resort, just use MatchFirst
    return MatchFirst(parseElementClass(sym) for sym in symbols).set_name(
        " | ".join(symbols)
    )


def dict_of(key: ParserElement, value: ParserElement) -> ParserElement:
    """Helper to easily and clearly define a dictionary by specifying
    the respective patterns for the key and value.  Takes care of
    defining the :class:`Dict`, :class:`ZeroOrMore`, and
    :class:`Group` tokens in the proper order.  The key pattern
    can include delimiting markers or punctuation, as long as they are
    suppressed, thereby leaving the significant key text.  The value
    pattern can include named results, so that the :class:`Dict` results
    can include named token fields.

    Example::

        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))
        print(attr_expr[1, ...].parse_string(text).dump())

        attr_label = label
        attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)

        # similar to Dict, but simpler call format
        result = dict_of(attr_label, attr_value).parse_string(text)
        print(result.dump())
        print(result['shape'])
        print(result.shape)  # object attribute access works too
        print(result.as_dict())

    prints::

        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
        - color: 'light blue'
        - posn: 'upper left'
        - shape: 'SQUARE'
        - texture: 'burlap'
        SQUARE
        SQUARE
        {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'}
    """
    return Dict(OneOrMore(Group(key + value)))


def original_text_for(
    expr: ParserElement, as_string: bool = True, *, asString: bool = True
) -> ParserElement:
    """Helper to return the original, untokenized text for a given
    expression.  Useful to restore the parsed fields of an HTML start
    tag into the raw tag text itself, or to revert separate tokens with
    intervening whitespace back to the original matching input text. By
    default, returns a string containing the original parsed text.

    If the optional ``as_string`` argument is passed as
    ``False``, then the return value is
    a :class:`ParseResults` containing any results names that
    were originally matched, and a single token containing the original
    matched text from the input string.  So if the expression passed to
    :class:`original_text_for` contains expressions with defined
    results names, you must set ``as_string`` to ``False`` if you
    want to preserve those results name values.

    The ``asString`` pre-PEP8 argument is retained for compatibility,
    but will be removed in a future release.

    Example::

        src = "this is test <b> bold <i>text</i> </b> normal text "
        for tag in ("b", "i"):
            opener, closer = make_html_tags(tag)
            patt = original_text_for(opener + ... + closer)
            print(patt.search_string(src)[0])

    prints::

        ['<b> bold <i>text</i> </b>']
        ['<i>text</i>']
    """
    asString = asString and as_string

    locMarker = Empty().set_parse_action(lambda s, loc, t: loc)
    endlocMarker = locMarker.copy()
    endlocMarker.callPreparse = False
    matchExpr = locMarker("_original_start") + expr + endlocMarker("_original_end")
    if asString:
        extractText = lambda s, l, t: s[t._original_start : t._original_end]
    else:

        def extractText(s, l, t):
            t[:] = [s[t.pop("_original_start") : t.pop("_original_end")]]

    matchExpr.set_parse_action(extractText)
    matchExpr.ignoreExprs = expr.ignoreExprs
    matchExpr.suppress_warning(Diagnostics.warn_ungrouped_named_tokens_in_collection)
    return matchExpr


def ungroup(expr: ParserElement) -> ParserElement:
    """Helper to undo pyparsing's default grouping of And expressions,
    even if all but one are non-empty.
    """
    return TokenConverter(expr).add_parse_action(lambda t: t[0])


def locatedExpr(expr: ParserElement) -> ParserElement:
    """
    (DEPRECATED - future code should use the :class:`Located` class)
    Helper to decorate a returned token with its starting and ending
    locations in the input string.

    This helper adds the following results names:

    - ``locn_start`` - location where matched expression begins
    - ``locn_end`` - location where matched expression ends
    - ``value`` - the actual parsed results

    Be careful if the input text contains ``<TAB>`` characters, you
    may want to call :class:`ParserElement.parse_with_tabs`

    Example::

        wd = Word(alphas)
        for match in locatedExpr(wd).search_string("ljsdf123lksdjjf123lkkjj1222"):
            print(match)

    prints::

        [[0, 'ljsdf', 5]]
        [[8, 'lksdjjf', 15]]
        [[18, 'lkkjj', 23]]
    """
    locator = Empty().set_parse_action(lambda ss, ll, tt: ll)
    return Group(
        locator("locn_start")
        + expr("value")
        + locator.copy().leaveWhitespace()("locn_end")
    )


def nested_expr(
    opener: Union[str, ParserElement] = "(",
    closer: Union[str, ParserElement] = ")",
    content: typing.Optional[ParserElement] = None,
    ignore_expr: ParserElement = quoted_string(),
    *,
    ignoreExpr: ParserElement = quoted_string(),
) -> ParserElement:
    """Helper method for defining nested lists enclosed in opening and
    closing delimiters (``"("`` and ``")"`` are the default).

    Parameters:

    - ``opener`` - opening character for a nested list
      (default= ``"("``); can also be a pyparsing expression
    - ``closer`` - closing character for a nested list
      (default= ``")"``); can also be a pyparsing expression
    - ``content`` - expression for items within the nested lists
      (default= ``None``)
    - ``ignore_expr`` - expression for ignoring opening and closing delimiters
      (default= :class:`quoted_string`)
    - ``ignoreExpr`` - this pre-PEP8 argument is retained for compatibility
      but will be removed in a future release

    If an expression is not provided for the content argument, the
    nested expression will capture all whitespace-delimited content
    between delimiters as a list of separate values.

    Use the ``ignore_expr`` argument to define expressions that may
    contain opening or closing characters that should not be treated as
    opening or closing characters for nesting, such as quoted_string or
    a comment expression.  Specify multiple expressions using an
    :class:`Or` or :class:`MatchFirst`. The default is
    :class:`quoted_string`, but if no expressions are to be ignored, then
    pass ``None`` for this argument.

    Example::

        data_type = one_of("void int short long char float double")
        decl_data_type = Combine(data_type + Opt(Word('*')))
        ident = Word(alphas+'_', alphanums+'_')
        number = pyparsing_common.number
        arg = Group(decl_data_type + ident)
        LPAR, RPAR = map(Suppress, "()")

        code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment))

        c_function = (decl_data_type("type")
                      + ident("name")
                      + LPAR + Opt(DelimitedList(arg), [])("args") + RPAR
                      + code_body("body"))
        c_function.ignore(c_style_comment)

        source_code = '''
            int is_odd(int x) {
                return (x%2);
            }

            int dec_to_hex(char hchar) {
                if (hchar >= '0' && hchar <= '9') {
                    return (ord(hchar)-ord('0'));
                } else {
                    return (10+ord(hchar)-ord('A'));
                }
            }
        '''
        for func in c_function.search_string(source_code):
            print("%(name)s (%(type)s) args: %(args)s" % func)


    prints::

        is_odd (int) args: [['int', 'x']]
        dec_to_hex (int) args: [['char', 'hchar']]
    """
    if ignoreExpr != ignore_expr:
        ignoreExpr = ignore_expr if ignoreExpr == quoted_string() else ignoreExpr
    if opener == closer:
        raise ValueError("opening and closing strings cannot be the same")
    if content is None:
        if isinstance(opener, str_type) and isinstance(closer, str_type):
            opener = typing.cast(str, opener)
            closer = typing.cast(str, closer)
            if len(opener) == 1 and len(closer) == 1:
                if ignoreExpr is not None:
                    content = Combine(
                        OneOrMore(
                            ~ignoreExpr
                            + CharsNotIn(
                                opener + closer + ParserElement.DEFAULT_WHITE_CHARS,
                                exact=1,
                            )
                        )
                    ).set_parse_action(lambda t: t[0].strip())
                else:
                    content = empty.copy() + CharsNotIn(
                        opener + closer + ParserElement.DEFAULT_WHITE_CHARS
                    ).set_parse_action(lambda t: t[0].strip())
            else:
                if ignoreExpr is not None:
                    content = Combine(
                        OneOrMore(
                            ~ignoreExpr
                            + ~Literal(opener)
                            + ~Literal(closer)
                            + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS, exact=1)
                        )
                    ).set_parse_action(lambda t: t[0].strip())
                else:
                    content = Combine(
                        OneOrMore(
                            ~Literal(opener)
                            + ~Literal(closer)
                            + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS, exact=1)
                        )
                    ).set_parse_action(lambda t: t[0].strip())
        else:
            raise ValueError(
                "opening and closing arguments must be strings if no content expression is given"
            )
    ret = Forward()
    if ignoreExpr is not None:
        ret <<= Group(
            Suppress(opener) + ZeroOrMore(ignoreExpr | ret | content) + Suppress(closer)
        )
    else:
        ret <<= Group(Suppress(opener) + ZeroOrMore(ret | content) + Suppress(closer))
    ret.set_name("nested %s%s expression" % (opener, closer))
    return ret


def _makeTags(tagStr, xml, suppress_LT=Suppress("<"), suppress_GT=Suppress(">")):
    """Internal helper to construct opening and closing tag expressions, given a tag name"""
    if isinstance(tagStr, str_type):
        resname = tagStr
        tagStr = Keyword(tagStr, caseless=not xml)
    else:
        resname = tagStr.name

    tagAttrName = Word(alphas, alphanums + "_-:")
    if xml:
        tagAttrValue = dbl_quoted_string.copy().set_parse_action(remove_quotes)
        openTag = (
            suppress_LT
            + tagStr("tag")
            + Dict(ZeroOrMore(Group(tagAttrName + Suppress("=") + tagAttrValue)))
            + Opt("/", default=[False])("empty").set_parse_action(
                lambda s, l, t: t[0] == "/"
            )
            + suppress_GT
        )
    else:
        tagAttrValue = quoted_string.copy().set_parse_action(remove_quotes) | Word(
            printables, exclude_chars=">"
        )
        openTag = (
            suppress_LT
            + tagStr("tag")
            + Dict(
                ZeroOrMore(
                    Group(
                        tagAttrName.set_parse_action(lambda t: t[0].lower())
                        + Opt(Suppress("=") + tagAttrValue)
                    )
                )
            )
            + Opt("/", default=[False])("empty").set_parse_action(
                lambda s, l, t: t[0] == "/"
            )
            + suppress_GT
        )
    closeTag = Combine(Literal("</") + tagStr + ">", adjacent=False)

    openTag.set_name("<%s>" % resname)
    # add start<tagname> results name in parse action now that ungrouped names are not reported at two levels
    openTag.add_parse_action(
        lambda t: t.__setitem__(
            "start" + "".join(resname.replace(":", " ").title().split()), t.copy()
        )
    )
    closeTag = closeTag(
        "end" + "".join(resname.replace(":", " ").title().split())
    ).set_name("</%s>" % resname)
    openTag.tag = resname
    closeTag.tag = resname
    openTag.tag_body = SkipTo(closeTag())
    return openTag, closeTag


def make_html_tags(
    tag_str: Union[str, ParserElement]
) -> Tuple[ParserElement, ParserElement]:
    """Helper to construct opening and closing tag expressions for HTML,
    given a tag name. Matches tags in either upper or lower case,
    attributes with namespaces and with quoted or unquoted values.

    Example::

        text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>'
        # make_html_tags returns pyparsing expressions for the opening and
        # closing tags as a 2-tuple
        a, a_end = make_html_tags("A")
        link_expr = a + SkipTo(a_end)("link_text") + a_end

        for link in link_expr.search_string(text):
            # attributes in the <A> tag (like "href" shown here) are
            # also accessible as named results
            print(link.link_text, '->', link.href)

    prints::

        pyparsing -> https://github.com/pyparsing/pyparsing/wiki
    """
    return _makeTags(tag_str, False)


def make_xml_tags(
    tag_str: Union[str, ParserElement]
) -> Tuple[ParserElement, ParserElement]:
    """Helper to construct opening and closing tag expressions for XML,
    given a tag name. Matches tags only in the given upper/lower case.

    Example: similar to :class:`make_html_tags`
    """
    return _makeTags(tag_str, True)


any_open_tag: ParserElement
any_close_tag: ParserElement
any_open_tag, any_close_tag = make_html_tags(
    Word(alphas, alphanums + "_:").set_name("any tag")
)

_htmlEntityMap = {k.rstrip(";"): v for k, v in html.entities.html5.items()}
common_html_entity = Regex("&(?P<entity>" + "|".join(_htmlEntityMap) + ");").set_name(
    "common HTML entity"
)


def replace_html_entity(s, l, t):
    """Helper parser action to replace common HTML entities with their special characters"""
    return _htmlEntityMap.get(t.entity)


class OpAssoc(Enum):
    """Enumeration of operator associativity
    - used in constructing InfixNotationOperatorSpec for :class:`infix_notation`"""

    LEFT = 1
    RIGHT = 2


InfixNotationOperatorArgType = Union[
    ParserElement, str, Tuple[Union[ParserElement, str], Union[ParserElement, str]]
]
InfixNotationOperatorSpec = Union[
    Tuple[
        InfixNotationOperatorArgType,
        int,
        OpAssoc,
        typing.Optional[ParseAction],
    ],
    Tuple[
        InfixNotationOperatorArgType,
        int,
        OpAssoc,
    ],
]


def infix_notation(
    base_expr: ParserElement,
    op_list: List[InfixNotationOperatorSpec],
    lpar: Union[str, ParserElement] = Suppress("("),
    rpar: Union[str, ParserElement] = Suppress(")"),
) -> ParserElement:
    """Helper method for constructing grammars of expressions made up of
    operators working in a precedence hierarchy.  Operators may be unary
    or binary, left- or right-associative.  Parse actions can also be
    attached to operator expressions. The generated parser will also
    recognize the use of parentheses to override operator precedences
    (see example below).

    Note: if you define a deep operator list, you may see performance
    issues when using infix_notation. See
    :class:`ParserElement.enable_packrat` for a mechanism to potentially
    improve your parser performance.

    Parameters:

    - ``base_expr`` - expression representing the most basic operand to
      be used in the expression
    - ``op_list`` - list of tuples, one for each operator precedence level
      in the expression grammar; each tuple is of the form ``(op_expr,
      num_operands, right_left_assoc, (optional)parse_action)``, where:

      - ``op_expr`` is the pyparsing expression for the operator; may also
        be a string, which will be converted to a Literal; if ``num_operands``
        is 3, ``op_expr`` is a tuple of two expressions, for the two
        operators separating the 3 terms
      - ``num_operands`` is the number of terms for this operator (must be 1,
        2, or 3)
      - ``right_left_assoc`` is the indicator whether the operator is right
        or left associative, using the pyparsing-defined constants
        ``OpAssoc.RIGHT`` and ``OpAssoc.LEFT``.
      - ``parse_action`` is the parse action to be associated with
        expressions matching this operator expression (the parse action
        tuple member may be omitted); if the parse action is passed
        a tuple or list of functions, this is equivalent to calling
        ``set_parse_action(*fn)``
        (:class:`ParserElement.set_parse_action`)
    - ``lpar`` - expression for matching left-parentheses; if passed as a
      str, then will be parsed as ``Suppress(lpar)``. If lpar is passed as
      an expression (such as ``Literal('(')``), then it will be kept in
      the parsed results, and grouped with them. (default= ``Suppress('(')``)
    - ``rpar`` - expression for matching right-parentheses; if passed as a
      str, then will be parsed as ``Suppress(rpar)``. If rpar is passed as
      an expression (such as ``Literal(')')``), then it will be kept in
      the parsed results, and grouped with them. (default= ``Suppress(')')``)

    Example::

        # simple example of four-function arithmetic with ints and
        # variable names
        integer = pyparsing_common.signed_integer
        varname = pyparsing_common.identifier

        arith_expr = infix_notation(integer | varname,
            [
            ('-', 1, OpAssoc.RIGHT),
            (one_of('* /'), 2, OpAssoc.LEFT),
            (one_of('+ -'), 2, OpAssoc.LEFT),
            ])

        arith_expr.run_tests('''
            5+3*6
            (5+3)*6
            -2--11
            ''', full_dump=False)

    prints::

        5+3*6
        [[5, '+', [3, '*', 6]]]

        (5+3)*6
        [[[5, '+', 3], '*', 6]]

        (5+x)*y
        [[[5, '+', 'x'], '*', 'y']]

        -2--11
        [[['-', 2], '-', ['-', 11]]]
    """

    # captive version of FollowedBy that does not do parse actions or capture results names
    class _FB(FollowedBy):
        def parseImpl(self, instring, loc, doActions=True):
            self.expr.try_parse(instring, loc)
            return loc, []

    _FB.__name__ = "FollowedBy>"

    ret = Forward()
    if isinstance(lpar, str):
        lpar = Suppress(lpar)
    if isinstance(rpar, str):
        rpar = Suppress(rpar)

    # if lpar and rpar are not suppressed, wrap in group
    if not (isinstance(rpar, Suppress) and isinstance(rpar, Suppress)):
        lastExpr = base_expr | Group(lpar + ret + rpar)
    else:
        lastExpr = base_expr | (lpar + ret + rpar)

    arity: int
    rightLeftAssoc: opAssoc
    pa: typing.Optional[ParseAction]
    opExpr1: ParserElement
    opExpr2: ParserElement
    for i, operDef in enumerate(op_list):
        opExpr, arity, rightLeftAssoc, pa = (operDef + (None,))[:4]  # type: ignore[assignment]
        if isinstance(opExpr, str_type):
            opExpr = ParserElement._literalStringClass(opExpr)
        opExpr = typing.cast(ParserElement, opExpr)
        if arity == 3:
            if not isinstance(opExpr, (tuple, list)) or len(opExpr) != 2:
                raise ValueError(
                    "if numterms=3, opExpr must be a tuple or list of two expressions"
                )
            opExpr1, opExpr2 = opExpr
            term_name = f"{opExpr1}{opExpr2} term"
        else:
            term_name = f"{opExpr} term"

        if not 1 <= arity <= 3:
            raise ValueError("operator must be unary (1), binary (2), or ternary (3)")

        if rightLeftAssoc not in (OpAssoc.LEFT, OpAssoc.RIGHT):
            raise ValueError("operator must indicate right or left associativity")

        thisExpr: ParserElement = Forward().set_name(term_name)
        thisExpr = typing.cast(Forward, thisExpr)
        if rightLeftAssoc is OpAssoc.LEFT:
            if arity == 1:
                matchExpr = _FB(lastExpr + opExpr) + Group(lastExpr + opExpr[1, ...])
            elif arity == 2:
                if opExpr is not None:
                    matchExpr = _FB(lastExpr + opExpr + lastExpr) + Group(
                        lastExpr + (opExpr + lastExpr)[1, ...]
                    )
                else:
                    matchExpr = _FB(lastExpr + lastExpr) + Group(lastExpr[2, ...])
            elif arity == 3:
                matchExpr = _FB(
                    lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr
                ) + Group(lastExpr + OneOrMore(opExpr1 + lastExpr + opExpr2 + lastExpr))
        elif rightLeftAssoc is OpAssoc.RIGHT:
            if arity == 1:
                # try to avoid LR with this extra test
                if not isinstance(opExpr, Opt):
                    opExpr = Opt(opExpr)
                matchExpr = _FB(opExpr.expr + thisExpr) + Group(opExpr + thisExpr)
            elif arity == 2:
                if opExpr is not None:
                    matchExpr = _FB(lastExpr + opExpr + thisExpr) + Group(
                        lastExpr + (opExpr + thisExpr)[1, ...]
                    )
                else:
                    matchExpr = _FB(lastExpr + thisExpr) + Group(
                        lastExpr + thisExpr[1, ...]
                    )
            elif arity == 3:
                matchExpr = _FB(
                    lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr
                ) + Group(lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr)
        if pa:
            if isinstance(pa, (tuple, list)):
                matchExpr.set_parse_action(*pa)
            else:
                matchExpr.set_parse_action(pa)
        thisExpr <<= (matchExpr | lastExpr).setName(term_name)
        lastExpr = thisExpr
    ret <<= lastExpr
    return ret


def indentedBlock(blockStatementExpr, indentStack, indent=True, backup_stacks=[]):
    """
    (DEPRECATED - use :class:`IndentedBlock` class instead)
    Helper method for defining space-delimited indentation blocks,
    such as those used to define block statements in Python source code.

    Parameters:

    - ``blockStatementExpr`` - expression defining syntax of statement that
      is repeated within the indented block
    - ``indentStack`` - list created by caller to manage indentation stack
      (multiple ``statementWithIndentedBlock`` expressions within a single
      grammar should share a common ``indentStack``)
    - ``indent`` - boolean indicating whether block must be indented beyond
      the current level; set to ``False`` for block of left-most statements
      (default= ``True``)

    A valid block must contain at least one ``blockStatement``.

    (Note that indentedBlock uses internal parse actions which make it
    incompatible with packrat parsing.)

    Example::

        data = '''
        def A(z):
          A1
          B = 100
          G = A2
          A2
          A3
        B
        def BB(a,b,c):
          BB1
          def BBA():
            bba1
            bba2
            bba3
        C
        D
        def spam(x,y):
             def eggs(z):
                 pass
        '''


        indentStack = [1]
        stmt = Forward()

        identifier = Word(alphas, alphanums)
        funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":")
        func_body = indentedBlock(stmt, indentStack)
        funcDef = Group(funcDecl + func_body)

        rvalue = Forward()
        funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")")
        rvalue << (funcCall | identifier | Word(nums))
        assignment = Group(identifier + "=" + rvalue)
        stmt << (funcDef | assignment | identifier)

        module_body = stmt[1, ...]

        parseTree = module_body.parseString(data)
        parseTree.pprint()

    prints::

        [['def',
          'A',
          ['(', 'z', ')'],
          ':',
          [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]],
         'B',
         ['def',
          'BB',
          ['(', 'a', 'b', 'c', ')'],
          ':',
          [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]],
         'C',
         'D',
         ['def',
          'spam',
          ['(', 'x', 'y', ')'],
          ':',
          [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]]
    """
    backup_stacks.append(indentStack[:])

    def reset_stack():
        indentStack[:] = backup_stacks[-1]

    def checkPeerIndent(s, l, t):
        if l >= len(s):
            return
        curCol = col(l, s)
        if curCol != indentStack[-1]:
            if curCol > indentStack[-1]:
                raise ParseException(s, l, "illegal nesting")
            raise ParseException(s, l, "not a peer entry")

    def checkSubIndent(s, l, t):
        curCol = col(l, s)
        if curCol > indentStack[-1]:
            indentStack.append(curCol)
        else:
            raise ParseException(s, l, "not a subentry")

    def checkUnindent(s, l, t):
        if l >= len(s):
            return
        curCol = col(l, s)
        if not (indentStack and curCol in indentStack):
            raise ParseException(s, l, "not an unindent")
        if curCol < indentStack[-1]:
            indentStack.pop()

    NL = OneOrMore(LineEnd().set_whitespace_chars("\t ").suppress())
    INDENT = (Empty() + Empty().set_parse_action(checkSubIndent)).set_name("INDENT")
    PEER = Empty().set_parse_action(checkPeerIndent).set_name("")
    UNDENT = Empty().set_parse_action(checkUnindent).set_name("UNINDENT")
    if indent:
        smExpr = Group(
            Opt(NL)
            + INDENT
            + OneOrMore(PEER + Group(blockStatementExpr) + Opt(NL))
            + UNDENT
        )
    else:
        smExpr = Group(
            Opt(NL)
            + OneOrMore(PEER + Group(blockStatementExpr) + Opt(NL))
            + Opt(UNDENT)
        )

    # add a parse action to remove backup_stack from list of backups
    smExpr.add_parse_action(
        lambda: backup_stacks.pop(-1) and None if backup_stacks else None
    )
    smExpr.set_fail_action(lambda a, b, c, d: reset_stack())
    blockStatementExpr.ignore(_bslash + LineEnd())
    return smExpr.set_name("indented block")


# it's easy to get these comment structures wrong - they're very common, so may as well make them available
c_style_comment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + "*/").set_name(
    "C style comment"
)
"Comment of the form ``/* ... */``"

html_comment = Regex(r"<!--[\s\S]*?-->").set_name("HTML comment")
"Comment of the form ``<!-- ... -->``"

rest_of_line = Regex(r".*").leave_whitespace().set_name("rest of line")
dbl_slash_comment = Regex(r"//(?:\\\n|[^\n])*").set_name("// comment")
"Comment of the form ``// ... (to end of line)``"

cpp_style_comment = Combine(
    Regex(r"/\*(?:[^*]|\*(?!/))*") + "*/" | dbl_slash_comment
).set_name("C++ style comment")
"Comment of either form :class:`c_style_comment` or :class:`dbl_slash_comment`"

java_style_comment = cpp_style_comment
"Same as :class:`cpp_style_comment`"

python_style_comment = Regex(r"#.*").set_name("Python style comment")
"Comment of the form ``# ... (to end of line)``"


# build list of built-in expressions, for future reference if a global default value
# gets updated
_builtin_exprs: List[ParserElement] = [
    v for v in vars().values() if isinstance(v, ParserElement)
]


# compatibility function, superseded by DelimitedList class
def delimited_list(
    expr: Union[str, ParserElement],
    delim: Union[str, ParserElement] = ",",
    combine: bool = False,
    min: typing.Optional[int] = None,
    max: typing.Optional[int] = None,
    *,
    allow_trailing_delim: bool = False,
) -> ParserElement:
    """(DEPRECATED - use :class:`DelimitedList` class)"""
    return DelimitedList(
        expr, delim, combine, min, max, allow_trailing_delim=allow_trailing_delim
    )


# pre-PEP8 compatible names
# fmt: off
opAssoc = OpAssoc
anyOpenTag = any_open_tag
anyCloseTag = any_close_tag
commonHTMLEntity = common_html_entity
cStyleComment = c_style_comment
htmlComment = html_comment
restOfLine = rest_of_line
dblSlashComment = dbl_slash_comment
cppStyleComment = cpp_style_comment
javaStyleComment = java_style_comment
pythonStyleComment = python_style_comment

@replaced_by_pep8(DelimitedList)
def delimitedList(): ...

@replaced_by_pep8(DelimitedList)
def delimited_list(): ...

@replaced_by_pep8(counted_array)
def countedArray(): ...

@replaced_by_pep8(match_previous_literal)
def matchPreviousLiteral(): ...

@replaced_by_pep8(match_previous_expr)
def matchPreviousExpr(): ...

@replaced_by_pep8(one_of)
def oneOf(): ...

@replaced_by_pep8(dict_of)
def dictOf(): ...

@replaced_by_pep8(original_text_for)
def originalTextFor(): ...

@replaced_by_pep8(nested_expr)
def nestedExpr(): ...

@replaced_by_pep8(make_html_tags)
def makeHTMLTags(): ...

@replaced_by_pep8(make_xml_tags)
def makeXMLTags(): ...

@replaced_by_pep8(replace_html_entity)
def replaceHTMLEntity(): ...

@replaced_by_pep8(infix_notation)
def infixNotation(): ...
# fmt: on
python3.12/site-packages/pip/_vendor/pyparsing/py.typed000064400000000000151732702370017045 0ustar00python3.12/site-packages/pip/_vendor/pyparsing/testing.py000064400000032260151732702370017412 0ustar00# testing.py

from contextlib import contextmanager
import typing

from .core import (
    ParserElement,
    ParseException,
    Keyword,
    __diag__,
    __compat__,
)


class pyparsing_test:
    """
    namespace class for classes useful in writing unit tests
    """

    class reset_pyparsing_context:
        """
        Context manager to be used when writing unit tests that modify pyparsing config values:
        - packrat parsing
        - bounded recursion parsing
        - default whitespace characters.
        - default keyword characters
        - literal string auto-conversion class
        - __diag__ settings

        Example::

            with reset_pyparsing_context():
                # test that literals used to construct a grammar are automatically suppressed
                ParserElement.inlineLiteralsUsing(Suppress)

                term = Word(alphas) | Word(nums)
                group = Group('(' + term[...] + ')')

                # assert that the '()' characters are not included in the parsed tokens
                self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def'])

            # after exiting context manager, literals are converted to Literal expressions again
        """

        def __init__(self):
            self._save_context = {}

        def save(self):
            self._save_context["default_whitespace"] = ParserElement.DEFAULT_WHITE_CHARS
            self._save_context["default_keyword_chars"] = Keyword.DEFAULT_KEYWORD_CHARS

            self._save_context[
                "literal_string_class"
            ] = ParserElement._literalStringClass

            self._save_context["verbose_stacktrace"] = ParserElement.verbose_stacktrace

            self._save_context["packrat_enabled"] = ParserElement._packratEnabled
            if ParserElement._packratEnabled:
                self._save_context[
                    "packrat_cache_size"
                ] = ParserElement.packrat_cache.size
            else:
                self._save_context["packrat_cache_size"] = None
            self._save_context["packrat_parse"] = ParserElement._parse
            self._save_context[
                "recursion_enabled"
            ] = ParserElement._left_recursion_enabled

            self._save_context["__diag__"] = {
                name: getattr(__diag__, name) for name in __diag__._all_names
            }

            self._save_context["__compat__"] = {
                "collect_all_And_tokens": __compat__.collect_all_And_tokens
            }

            return self

        def restore(self):
            # reset pyparsing global state
            if (
                ParserElement.DEFAULT_WHITE_CHARS
                != self._save_context["default_whitespace"]
            ):
                ParserElement.set_default_whitespace_chars(
                    self._save_context["default_whitespace"]
                )

            ParserElement.verbose_stacktrace = self._save_context["verbose_stacktrace"]

            Keyword.DEFAULT_KEYWORD_CHARS = self._save_context["default_keyword_chars"]
            ParserElement.inlineLiteralsUsing(
                self._save_context["literal_string_class"]
            )

            for name, value in self._save_context["__diag__"].items():
                (__diag__.enable if value else __diag__.disable)(name)

            ParserElement._packratEnabled = False
            if self._save_context["packrat_enabled"]:
                ParserElement.enable_packrat(self._save_context["packrat_cache_size"])
            else:
                ParserElement._parse = self._save_context["packrat_parse"]
            ParserElement._left_recursion_enabled = self._save_context[
                "recursion_enabled"
            ]

            __compat__.collect_all_And_tokens = self._save_context["__compat__"]

            return self

        def copy(self):
            ret = type(self)()
            ret._save_context.update(self._save_context)
            return ret

        def __enter__(self):
            return self.save()

        def __exit__(self, *args):
            self.restore()

    class TestParseResultsAsserts:
        """
        A mixin class to add parse results assertion methods to normal unittest.TestCase classes.
        """

        def assertParseResultsEquals(
            self, result, expected_list=None, expected_dict=None, msg=None
        ):
            """
            Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``,
            and compare any defined results names with an optional ``expected_dict``.
            """
            if expected_list is not None:
                self.assertEqual(expected_list, result.as_list(), msg=msg)
            if expected_dict is not None:
                self.assertEqual(expected_dict, result.as_dict(), msg=msg)

        def assertParseAndCheckList(
            self, expr, test_string, expected_list, msg=None, verbose=True
        ):
            """
            Convenience wrapper assert to test a parser element and input string, and assert that
            the resulting ``ParseResults.asList()`` is equal to the ``expected_list``.
            """
            result = expr.parse_string(test_string, parse_all=True)
            if verbose:
                print(result.dump())
            else:
                print(result.as_list())
            self.assertParseResultsEquals(result, expected_list=expected_list, msg=msg)

        def assertParseAndCheckDict(
            self, expr, test_string, expected_dict, msg=None, verbose=True
        ):
            """
            Convenience wrapper assert to test a parser element and input string, and assert that
            the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``.
            """
            result = expr.parse_string(test_string, parseAll=True)
            if verbose:
                print(result.dump())
            else:
                print(result.as_list())
            self.assertParseResultsEquals(result, expected_dict=expected_dict, msg=msg)

        def assertRunTestResults(
            self, run_tests_report, expected_parse_results=None, msg=None
        ):
            """
            Unit test assertion to evaluate output of ``ParserElement.runTests()``. If a list of
            list-dict tuples is given as the ``expected_parse_results`` argument, then these are zipped
            with the report tuples returned by ``runTests`` and evaluated using ``assertParseResultsEquals``.
            Finally, asserts that the overall ``runTests()`` success value is ``True``.

            :param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests
            :param expected_parse_results (optional): [tuple(str, list, dict, Exception)]
            """
            run_test_success, run_test_results = run_tests_report

            if expected_parse_results is not None:
                merged = [
                    (*rpt, expected)
                    for rpt, expected in zip(run_test_results, expected_parse_results)
                ]
                for test_string, result, expected in merged:
                    # expected should be a tuple containing a list and/or a dict or an exception,
                    # and optional failure message string
                    # an empty tuple will skip any result validation
                    fail_msg = next(
                        (exp for exp in expected if isinstance(exp, str)), None
                    )
                    expected_exception = next(
                        (
                            exp
                            for exp in expected
                            if isinstance(exp, type) and issubclass(exp, Exception)
                        ),
                        None,
                    )
                    if expected_exception is not None:
                        with self.assertRaises(
                            expected_exception=expected_exception, msg=fail_msg or msg
                        ):
                            if isinstance(result, Exception):
                                raise result
                    else:
                        expected_list = next(
                            (exp for exp in expected if isinstance(exp, list)), None
                        )
                        expected_dict = next(
                            (exp for exp in expected if isinstance(exp, dict)), None
                        )
                        if (expected_list, expected_dict) != (None, None):
                            self.assertParseResultsEquals(
                                result,
                                expected_list=expected_list,
                                expected_dict=expected_dict,
                                msg=fail_msg or msg,
                            )
                        else:
                            # warning here maybe?
                            print(f"no validation for {test_string!r}")

            # do this last, in case some specific test results can be reported instead
            self.assertTrue(
                run_test_success, msg=msg if msg is not None else "failed runTests"
            )

        @contextmanager
        def assertRaisesParseException(self, exc_type=ParseException, msg=None):
            with self.assertRaises(exc_type, msg=msg):
                yield

    @staticmethod
    def with_line_numbers(
        s: str,
        start_line: typing.Optional[int] = None,
        end_line: typing.Optional[int] = None,
        expand_tabs: bool = True,
        eol_mark: str = "|",
        mark_spaces: typing.Optional[str] = None,
        mark_control: typing.Optional[str] = None,
    ) -> str:
        """
        Helpful method for debugging a parser - prints a string with line and column numbers.
        (Line and column numbers are 1-based.)

        :param s: tuple(bool, str - string to be printed with line and column numbers
        :param start_line: int - (optional) starting line number in s to print (default=1)
        :param end_line: int - (optional) ending line number in s to print (default=len(s))
        :param expand_tabs: bool - (optional) expand tabs to spaces, to match the pyparsing default
        :param eol_mark: str - (optional) string to mark the end of lines, helps visualize trailing spaces (default="|")
        :param mark_spaces: str - (optional) special character to display in place of spaces
        :param mark_control: str - (optional) convert non-printing control characters to a placeholding
                                 character; valid values:
                                 - "unicode" - replaces control chars with Unicode symbols, such as "␍" and "␊"
                                 - any single character string - replace control characters with given string
                                 - None (default) - string is displayed as-is

        :return: str - input string with leading line numbers and column number headers
        """
        if expand_tabs:
            s = s.expandtabs()
        if mark_control is not None:
            mark_control = typing.cast(str, mark_control)
            if mark_control == "unicode":
                transtable_map = {
                    c: u for c, u in zip(range(0, 33), range(0x2400, 0x2433))
                }
                transtable_map[127] = 0x2421
                tbl = str.maketrans(transtable_map)
                eol_mark = ""
            else:
                ord_mark_control = ord(mark_control)
                tbl = str.maketrans(
                    {c: ord_mark_control for c in list(range(0, 32)) + [127]}
                )
            s = s.translate(tbl)
        if mark_spaces is not None and mark_spaces != " ":
            if mark_spaces == "unicode":
                tbl = str.maketrans({9: 0x2409, 32: 0x2423})
                s = s.translate(tbl)
            else:
                s = s.replace(" ", mark_spaces)
        if start_line is None:
            start_line = 1
        if end_line is None:
            end_line = len(s)
        end_line = min(end_line, len(s))
        start_line = min(max(1, start_line), end_line)

        if mark_control != "unicode":
            s_lines = s.splitlines()[start_line - 1 : end_line]
        else:
            s_lines = [line + "␊" for line in s.split("␊")[start_line - 1 : end_line]]
        if not s_lines:
            return ""

        lineno_width = len(str(end_line))
        max_line_len = max(len(line) for line in s_lines)
        lead = " " * (lineno_width + 1)
        if max_line_len >= 99:
            header0 = (
                lead
                + "".join(
                    f"{' ' * 99}{(i + 1) % 100}"
                    for i in range(max(max_line_len // 100, 1))
                )
                + "\n"
            )
        else:
            header0 = ""
        header1 = (
            header0
            + lead
            + "".join(f"         {(i + 1) % 10}" for i in range(-(-max_line_len // 10)))
            + "\n"
        )
        header2 = lead + "1234567890" * (-(-max_line_len // 10)) + "\n"
        return (
            header1
            + header2
            + "\n".join(
                f"{i:{lineno_width}d}:{line}{eol_mark}"
                for i, line in enumerate(s_lines, start=start_line)
            )
            + "\n"
        )
python3.12/site-packages/pip/_vendor/pyparsing/core.py000064400000666275151732702400016702 0ustar00#
# core.py
#

from collections import deque
import os
import typing
from typing import (
    Any,
    Callable,
    Generator,
    List,
    NamedTuple,
    Sequence,
    Set,
    TextIO,
    Tuple,
    Union,
    cast,
)
from abc import ABC, abstractmethod
from enum import Enum
import string
import copy
import warnings
import re
import sys
from collections.abc import Iterable
import traceback
import types
from operator import itemgetter
from functools import wraps
from threading import RLock
from pathlib import Path

from .util import (
    _FifoCache,
    _UnboundedCache,
    __config_flags,
    _collapse_string_to_ranges,
    _escape_regex_range_chars,
    _bslash,
    _flatten,
    LRUMemo as _LRUMemo,
    UnboundedMemo as _UnboundedMemo,
    replaced_by_pep8,
)
from .exceptions import *
from .actions import *
from .results import ParseResults, _ParseResultsWithOffset
from .unicode import pyparsing_unicode

_MAX_INT = sys.maxsize
str_type: Tuple[type, ...] = (str, bytes)

#
# Copyright (c) 2003-2022  Paul T. McGuire
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#


if sys.version_info >= (3, 8):
    from functools import cached_property
else:

    class cached_property:
        def __init__(self, func):
            self._func = func

        def __get__(self, instance, owner=None):
            ret = instance.__dict__[self._func.__name__] = self._func(instance)
            return ret


class __compat__(__config_flags):
    """
    A cross-version compatibility configuration for pyparsing features that will be
    released in a future version. By setting values in this configuration to True,
    those features can be enabled in prior versions for compatibility development
    and testing.

    - ``collect_all_And_tokens`` - flag to enable fix for Issue #63 that fixes erroneous grouping
      of results names when an :class:`And` expression is nested within an :class:`Or` or :class:`MatchFirst`;
      maintained for compatibility, but setting to ``False`` no longer restores pre-2.3.1
      behavior
    """

    _type_desc = "compatibility"

    collect_all_And_tokens = True

    _all_names = [__ for __ in locals() if not __.startswith("_")]
    _fixed_names = """
        collect_all_And_tokens
        """.split()


class __diag__(__config_flags):
    _type_desc = "diagnostic"

    warn_multiple_tokens_in_named_alternation = False
    warn_ungrouped_named_tokens_in_collection = False
    warn_name_set_on_empty_Forward = False
    warn_on_parse_using_empty_Forward = False
    warn_on_assignment_to_Forward = False
    warn_on_multiple_string_args_to_oneof = False
    warn_on_match_first_with_lshift_operator = False
    enable_debug_on_named_expressions = False

    _all_names = [__ for __ in locals() if not __.startswith("_")]
    _warning_names = [name for name in _all_names if name.startswith("warn")]
    _debug_names = [name for name in _all_names if name.startswith("enable_debug")]

    @classmethod
    def enable_all_warnings(cls) -> None:
        for name in cls._warning_names:
            cls.enable(name)


class Diagnostics(Enum):
    """
    Diagnostic configuration (all default to disabled)

    - ``warn_multiple_tokens_in_named_alternation`` - flag to enable warnings when a results
      name is defined on a :class:`MatchFirst` or :class:`Or` expression with one or more :class:`And` subexpressions
    - ``warn_ungrouped_named_tokens_in_collection`` - flag to enable warnings when a results
      name is defined on a containing expression with ungrouped subexpressions that also
      have results names
    - ``warn_name_set_on_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined
      with a results name, but has no contents defined
    - ``warn_on_parse_using_empty_Forward`` - flag to enable warnings when a :class:`Forward` is
      defined in a grammar but has never had an expression attached to it
    - ``warn_on_assignment_to_Forward`` - flag to enable warnings when a :class:`Forward` is defined
      but is overwritten by assigning using ``'='`` instead of ``'<<='`` or ``'<<'``
    - ``warn_on_multiple_string_args_to_oneof`` - flag to enable warnings when :class:`one_of` is
      incorrectly called with multiple str arguments
    - ``enable_debug_on_named_expressions`` - flag to auto-enable debug on all subsequent
      calls to :class:`ParserElement.set_name`

    Diagnostics are enabled/disabled by calling :class:`enable_diag` and :class:`disable_diag`.
    All warnings can be enabled by calling :class:`enable_all_warnings`.
    """

    warn_multiple_tokens_in_named_alternation = 0
    warn_ungrouped_named_tokens_in_collection = 1
    warn_name_set_on_empty_Forward = 2
    warn_on_parse_using_empty_Forward = 3
    warn_on_assignment_to_Forward = 4
    warn_on_multiple_string_args_to_oneof = 5
    warn_on_match_first_with_lshift_operator = 6
    enable_debug_on_named_expressions = 7


def enable_diag(diag_enum: Diagnostics) -> None:
    """
    Enable a global pyparsing diagnostic flag (see :class:`Diagnostics`).
    """
    __diag__.enable(diag_enum.name)


def disable_diag(diag_enum: Diagnostics) -> None:
    """
    Disable a global pyparsing diagnostic flag (see :class:`Diagnostics`).
    """
    __diag__.disable(diag_enum.name)


def enable_all_warnings() -> None:
    """
    Enable all global pyparsing diagnostic warnings (see :class:`Diagnostics`).
    """
    __diag__.enable_all_warnings()


# hide abstract class
del __config_flags


def _should_enable_warnings(
    cmd_line_warn_options: typing.Iterable[str], warn_env_var: typing.Optional[str]
) -> bool:
    enable = bool(warn_env_var)
    for warn_opt in cmd_line_warn_options:
        w_action, w_message, w_category, w_module, w_line = (warn_opt + "::::").split(
            ":"
        )[:5]
        if not w_action.lower().startswith("i") and (
            not (w_message or w_category or w_module) or w_module == "pyparsing"
        ):
            enable = True
        elif w_action.lower().startswith("i") and w_module in ("pyparsing", ""):
            enable = False
    return enable


if _should_enable_warnings(
    sys.warnoptions, os.environ.get("PYPARSINGENABLEALLWARNINGS")
):
    enable_all_warnings()


# build list of single arg builtins, that can be used as parse actions
_single_arg_builtins = {
    sum,
    len,
    sorted,
    reversed,
    list,
    tuple,
    set,
    any,
    all,
    min,
    max,
}

_generatorType = types.GeneratorType
ParseImplReturnType = Tuple[int, Any]
PostParseReturnType = Union[ParseResults, Sequence[ParseResults]]
ParseAction = Union[
    Callable[[], Any],
    Callable[[ParseResults], Any],
    Callable[[int, ParseResults], Any],
    Callable[[str, int, ParseResults], Any],
]
ParseCondition = Union[
    Callable[[], bool],
    Callable[[ParseResults], bool],
    Callable[[int, ParseResults], bool],
    Callable[[str, int, ParseResults], bool],
]
ParseFailAction = Callable[[str, int, "ParserElement", Exception], None]
DebugStartAction = Callable[[str, int, "ParserElement", bool], None]
DebugSuccessAction = Callable[
    [str, int, int, "ParserElement", ParseResults, bool], None
]
DebugExceptionAction = Callable[[str, int, "ParserElement", Exception, bool], None]


alphas = string.ascii_uppercase + string.ascii_lowercase
identchars = pyparsing_unicode.Latin1.identchars
identbodychars = pyparsing_unicode.Latin1.identbodychars
nums = "0123456789"
hexnums = nums + "ABCDEFabcdef"
alphanums = alphas + nums
printables = "".join([c for c in string.printable if c not in string.whitespace])

_trim_arity_call_line: traceback.StackSummary = None  # type: ignore[assignment]


def _trim_arity(func, max_limit=3):
    """decorator to trim function calls to match the arity of the target"""
    global _trim_arity_call_line

    if func in _single_arg_builtins:
        return lambda s, l, t: func(t)

    limit = 0
    found_arity = False

    # synthesize what would be returned by traceback.extract_stack at the call to
    # user's parse action 'func', so that we don't incur call penalty at parse time

    # fmt: off
    LINE_DIFF = 7
    # IF ANY CODE CHANGES, EVEN JUST COMMENTS OR BLANK LINES, BETWEEN THE NEXT LINE AND
    # THE CALL TO FUNC INSIDE WRAPPER, LINE_DIFF MUST BE MODIFIED!!!!
    _trim_arity_call_line = (_trim_arity_call_line or traceback.extract_stack(limit=2)[-1])
    pa_call_line_synth = (_trim_arity_call_line[0], _trim_arity_call_line[1] + LINE_DIFF)

    def wrapper(*args):
        nonlocal found_arity, limit
        while 1:
            try:
                ret = func(*args[limit:])
                found_arity = True
                return ret
            except TypeError as te:
                # re-raise TypeErrors if they did not come from our arity testing
                if found_arity:
                    raise
                else:
                    tb = te.__traceback__
                    frames = traceback.extract_tb(tb, limit=2)
                    frame_summary = frames[-1]
                    trim_arity_type_error = (
                        [frame_summary[:2]][-1][:2] == pa_call_line_synth
                    )
                    del tb

                    if trim_arity_type_error:
                        if limit < max_limit:
                            limit += 1
                            continue

                    raise
    # fmt: on

    # copy func name to wrapper for sensible debug output
    # (can't use functools.wraps, since that messes with function signature)
    func_name = getattr(func, "__name__", getattr(func, "__class__").__name__)
    wrapper.__name__ = func_name
    wrapper.__doc__ = func.__doc__

    return wrapper


def condition_as_parse_action(
    fn: ParseCondition, message: typing.Optional[str] = None, fatal: bool = False
) -> ParseAction:
    """
    Function to convert a simple predicate function that returns ``True`` or ``False``
    into a parse action. Can be used in places when a parse action is required
    and :class:`ParserElement.add_condition` cannot be used (such as when adding a condition
    to an operator level in :class:`infix_notation`).

    Optional keyword arguments:

    - ``message`` - define a custom message to be used in the raised exception
    - ``fatal`` - if True, will raise :class:`ParseFatalException` to stop parsing immediately;
      otherwise will raise :class:`ParseException`

    """
    msg = message if message is not None else "failed user-defined condition"
    exc_type = ParseFatalException if fatal else ParseException
    fn = _trim_arity(fn)

    @wraps(fn)
    def pa(s, l, t):
        if not bool(fn(s, l, t)):
            raise exc_type(s, l, msg)

    return pa


def _default_start_debug_action(
    instring: str, loc: int, expr: "ParserElement", cache_hit: bool = False
):
    cache_hit_str = "*" if cache_hit else ""
    print(
        (
            f"{cache_hit_str}Match {expr} at loc {loc}({lineno(loc, instring)},{col(loc, instring)})\n"
            f"  {line(loc, instring)}\n"
            f"  {' ' * (col(loc, instring) - 1)}^"
        )
    )


def _default_success_debug_action(
    instring: str,
    startloc: int,
    endloc: int,
    expr: "ParserElement",
    toks: ParseResults,
    cache_hit: bool = False,
):
    cache_hit_str = "*" if cache_hit else ""
    print(f"{cache_hit_str}Matched {expr} -> {toks.as_list()}")


def _default_exception_debug_action(
    instring: str,
    loc: int,
    expr: "ParserElement",
    exc: Exception,
    cache_hit: bool = False,
):
    cache_hit_str = "*" if cache_hit else ""
    print(f"{cache_hit_str}Match {expr} failed, {type(exc).__name__} raised: {exc}")


def null_debug_action(*args):
    """'Do-nothing' debug action, to suppress debugging output during parsing."""


class ParserElement(ABC):
    """Abstract base level parser element class."""

    DEFAULT_WHITE_CHARS: str = " \n\t\r"
    verbose_stacktrace: bool = False
    _literalStringClass: type = None  # type: ignore[assignment]

    @staticmethod
    def set_default_whitespace_chars(chars: str) -> None:
        r"""
        Overrides the default whitespace chars

        Example::

            # default whitespace chars are space, <TAB> and newline
            Word(alphas)[1, ...].parse_string("abc def\nghi jkl")  # -> ['abc', 'def', 'ghi', 'jkl']

            # change to just treat newline as significant
            ParserElement.set_default_whitespace_chars(" \t")
            Word(alphas)[1, ...].parse_string("abc def\nghi jkl")  # -> ['abc', 'def']
        """
        ParserElement.DEFAULT_WHITE_CHARS = chars

        # update whitespace all parse expressions defined in this module
        for expr in _builtin_exprs:
            if expr.copyDefaultWhiteChars:
                expr.whiteChars = set(chars)

    @staticmethod
    def inline_literals_using(cls: type) -> None:
        """
        Set class to be used for inclusion of string literals into a parser.

        Example::

            # default literal class used is Literal
            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            date_str.parse_string("1999/12/31")  # -> ['1999', '/', '12', '/', '31']


            # change to Suppress
            ParserElement.inline_literals_using(Suppress)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            date_str.parse_string("1999/12/31")  # -> ['1999', '12', '31']
        """
        ParserElement._literalStringClass = cls

    @classmethod
    def using_each(cls, seq, **class_kwargs):
        """
        Yields a sequence of class(obj, **class_kwargs) for obj in seq.

        Example::

            LPAR, RPAR, LBRACE, RBRACE, SEMI = Suppress.using_each("(){};")

        """
        yield from (cls(obj, **class_kwargs) for obj in seq)

    class DebugActions(NamedTuple):
        debug_try: typing.Optional[DebugStartAction]
        debug_match: typing.Optional[DebugSuccessAction]
        debug_fail: typing.Optional[DebugExceptionAction]

    def __init__(self, savelist: bool = False):
        self.parseAction: List[ParseAction] = list()
        self.failAction: typing.Optional[ParseFailAction] = None
        self.customName: str = None  # type: ignore[assignment]
        self._defaultName: typing.Optional[str] = None
        self.resultsName: str = None  # type: ignore[assignment]
        self.saveAsList = savelist
        self.skipWhitespace = True
        self.whiteChars = set(ParserElement.DEFAULT_WHITE_CHARS)
        self.copyDefaultWhiteChars = True
        # used when checking for left-recursion
        self.mayReturnEmpty = False
        self.keepTabs = False
        self.ignoreExprs: List["ParserElement"] = list()
        self.debug = False
        self.streamlined = False
        # optimize exception handling for subclasses that don't advance parse index
        self.mayIndexError = True
        self.errmsg = ""
        # mark results names as modal (report only last) or cumulative (list all)
        self.modalResults = True
        # custom debug actions
        self.debugActions = self.DebugActions(None, None, None)
        # avoid redundant calls to preParse
        self.callPreparse = True
        self.callDuringTry = False
        self.suppress_warnings_: List[Diagnostics] = []

    def suppress_warning(self, warning_type: Diagnostics) -> "ParserElement":
        """
        Suppress warnings emitted for a particular diagnostic on this expression.

        Example::

            base = pp.Forward()
            base.suppress_warning(Diagnostics.warn_on_parse_using_empty_Forward)

            # statement would normally raise a warning, but is now suppressed
            print(base.parse_string("x"))

        """
        self.suppress_warnings_.append(warning_type)
        return self

    def visit_all(self):
        """General-purpose method to yield all expressions and sub-expressions
        in a grammar. Typically just for internal use.
        """
        to_visit = deque([self])
        seen = set()
        while to_visit:
            cur = to_visit.popleft()

            # guard against looping forever through recursive grammars
            if cur in seen:
                continue
            seen.add(cur)

            to_visit.extend(cur.recurse())
            yield cur

    def copy(self) -> "ParserElement":
        """
        Make a copy of this :class:`ParserElement`.  Useful for defining
        different parse actions for the same parsing pattern, using copies of
        the original parse element.

        Example::

            integer = Word(nums).set_parse_action(lambda toks: int(toks[0]))
            integerK = integer.copy().add_parse_action(lambda toks: toks[0] * 1024) + Suppress("K")
            integerM = integer.copy().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M")

            print((integerK | integerM | integer)[1, ...].parse_string("5K 100 640K 256M"))

        prints::

            [5120, 100, 655360, 268435456]

        Equivalent form of ``expr.copy()`` is just ``expr()``::

            integerM = integer().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M")
        """
        cpy = copy.copy(self)
        cpy.parseAction = self.parseAction[:]
        cpy.ignoreExprs = self.ignoreExprs[:]
        if self.copyDefaultWhiteChars:
            cpy.whiteChars = set(ParserElement.DEFAULT_WHITE_CHARS)
        return cpy

    def set_results_name(
        self, name: str, list_all_matches: bool = False, *, listAllMatches: bool = False
    ) -> "ParserElement":
        """
        Define name for referencing matching tokens as a nested attribute
        of the returned parse results.

        Normally, results names are assigned as you would assign keys in a dict:
        any existing value is overwritten by later values. If it is necessary to
        keep all values captured for a particular results name, call ``set_results_name``
        with ``list_all_matches`` = True.

        NOTE: ``set_results_name`` returns a *copy* of the original :class:`ParserElement` object;
        this is so that the client can define a basic element, such as an
        integer, and reference it in multiple places with different names.

        You can also set results names using the abbreviated syntax,
        ``expr("name")`` in place of ``expr.set_results_name("name")``
        - see :class:`__call__`. If ``list_all_matches`` is required, use
        ``expr("name*")``.

        Example::

            date_str = (integer.set_results_name("year") + '/'
                        + integer.set_results_name("month") + '/'
                        + integer.set_results_name("day"))

            # equivalent form:
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
        """
        listAllMatches = listAllMatches or list_all_matches
        return self._setResultsName(name, listAllMatches)

    def _setResultsName(self, name, listAllMatches=False):
        if name is None:
            return self
        newself = self.copy()
        if name.endswith("*"):
            name = name[:-1]
            listAllMatches = True
        newself.resultsName = name
        newself.modalResults = not listAllMatches
        return newself

    def set_break(self, break_flag: bool = True) -> "ParserElement":
        """
        Method to invoke the Python pdb debugger when this element is
        about to be parsed. Set ``break_flag`` to ``True`` to enable, ``False`` to
        disable.
        """
        if break_flag:
            _parseMethod = self._parse

            def breaker(instring, loc, doActions=True, callPreParse=True):
                import pdb

                # this call to pdb.set_trace() is intentional, not a checkin error
                pdb.set_trace()
                return _parseMethod(instring, loc, doActions, callPreParse)

            breaker._originalParseMethod = _parseMethod  # type: ignore [attr-defined]
            self._parse = breaker  # type: ignore [assignment]
        else:
            if hasattr(self._parse, "_originalParseMethod"):
                self._parse = self._parse._originalParseMethod  # type: ignore [attr-defined, assignment]
        return self

    def set_parse_action(self, *fns: ParseAction, **kwargs) -> "ParserElement":
        """
        Define one or more actions to perform when successfully matching parse element definition.

        Parse actions can be called to perform data conversions, do extra validation,
        update external data structures, or enhance or replace the parsed tokens.
        Each parse action ``fn`` is a callable method with 0-3 arguments, called as
        ``fn(s, loc, toks)`` , ``fn(loc, toks)`` , ``fn(toks)`` , or just ``fn()`` , where:

        - ``s``    = the original string being parsed (see note below)
        - ``loc``  = the location of the matching substring
        - ``toks`` = a list of the matched tokens, packaged as a :class:`ParseResults` object

        The parsed tokens are passed to the parse action as ParseResults. They can be
        modified in place using list-style append, extend, and pop operations to update
        the parsed list elements; and with dictionary-style item set and del operations
        to add, update, or remove any named results. If the tokens are modified in place,
        it is not necessary to return them with a return statement.

        Parse actions can also completely replace the given tokens, with another ``ParseResults``
        object, or with some entirely different object (common for parse actions that perform data
        conversions). A convenient way to build a new parse result is to define the values
        using a dict, and then create the return value using :class:`ParseResults.from_dict`.

        If None is passed as the ``fn`` parse action, all previously added parse actions for this
        expression are cleared.

        Optional keyword arguments:

        - ``call_during_try`` = (default= ``False``) indicate if parse action should be run during
          lookaheads and alternate testing. For parse actions that have side effects, it is
          important to only call the parse action once it is determined that it is being
          called as part of a successful parse. For parse actions that perform additional
          validation, then call_during_try should be passed as True, so that the validation
          code is included in the preliminary "try" parses.

        Note: the default parsing behavior is to expand tabs in the input string
        before starting the parsing process.  See :class:`parse_string` for more
        information on parsing strings containing ``<TAB>`` s, and suggested
        methods to maintain a consistent view of the parsed string, the parse
        location, and line and column positions within the parsed string.

        Example::

            # parse dates in the form YYYY/MM/DD

            # use parse action to convert toks from str to int at parse time
            def convert_to_int(toks):
                return int(toks[0])

            # use a parse action to verify that the date is a valid date
            def is_valid_date(instring, loc, toks):
                from datetime import date
                year, month, day = toks[::2]
                try:
                    date(year, month, day)
                except ValueError:
                    raise ParseException(instring, loc, "invalid date given")

            integer = Word(nums)
            date_str = integer + '/' + integer + '/' + integer

            # add parse actions
            integer.set_parse_action(convert_to_int)
            date_str.set_parse_action(is_valid_date)

            # note that integer fields are now ints, not strings
            date_str.run_tests('''
                # successful parse - note that integer fields were converted to ints
                1999/12/31

                # fail - invalid date
                1999/13/31
                ''')
        """
        if list(fns) == [None]:
            self.parseAction = []
        else:
            if not all(callable(fn) for fn in fns):
                raise TypeError("parse actions must be callable")
            self.parseAction = [_trim_arity(fn) for fn in fns]
            self.callDuringTry = kwargs.get(
                "call_during_try", kwargs.get("callDuringTry", False)
            )
        return self

    def add_parse_action(self, *fns: ParseAction, **kwargs) -> "ParserElement":
        """
        Add one or more parse actions to expression's list of parse actions. See :class:`set_parse_action`.

        See examples in :class:`copy`.
        """
        self.parseAction += [_trim_arity(fn) for fn in fns]
        self.callDuringTry = self.callDuringTry or kwargs.get(
            "call_during_try", kwargs.get("callDuringTry", False)
        )
        return self

    def add_condition(self, *fns: ParseCondition, **kwargs) -> "ParserElement":
        """Add a boolean predicate function to expression's list of parse actions. See
        :class:`set_parse_action` for function call signatures. Unlike ``set_parse_action``,
        functions passed to ``add_condition`` need to return boolean success/fail of the condition.

        Optional keyword arguments:

        - ``message`` = define a custom message to be used in the raised exception
        - ``fatal`` = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise
          ParseException
        - ``call_during_try`` = boolean to indicate if this method should be called during internal tryParse calls,
          default=False

        Example::

            integer = Word(nums).set_parse_action(lambda toks: int(toks[0]))
            year_int = integer.copy()
            year_int.add_condition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later")
            date_str = year_int + '/' + integer + '/' + integer

            result = date_str.parse_string("1999/12/31")  # -> Exception: Only support years 2000 and later (at char 0),
                                                                         (line:1, col:1)
        """
        for fn in fns:
            self.parseAction.append(
                condition_as_parse_action(
                    fn,
                    message=str(kwargs.get("message")),
                    fatal=bool(kwargs.get("fatal", False)),
                )
            )

        self.callDuringTry = self.callDuringTry or kwargs.get(
            "call_during_try", kwargs.get("callDuringTry", False)
        )
        return self

    def set_fail_action(self, fn: ParseFailAction) -> "ParserElement":
        """
        Define action to perform if parsing fails at this expression.
        Fail acton fn is a callable function that takes the arguments
        ``fn(s, loc, expr, err)`` where:

        - ``s`` = string being parsed
        - ``loc`` = location where expression match was attempted and failed
        - ``expr`` = the parse expression that failed
        - ``err`` = the exception thrown

        The function returns no value.  It may throw :class:`ParseFatalException`
        if it is desired to stop parsing immediately."""
        self.failAction = fn
        return self

    def _skipIgnorables(self, instring: str, loc: int) -> int:
        if not self.ignoreExprs:
            return loc
        exprsFound = True
        ignore_expr_fns = [e._parse for e in self.ignoreExprs]
        while exprsFound:
            exprsFound = False
            for ignore_fn in ignore_expr_fns:
                try:
                    while 1:
                        loc, dummy = ignore_fn(instring, loc)
                        exprsFound = True
                except ParseException:
                    pass
        return loc

    def preParse(self, instring: str, loc: int) -> int:
        if self.ignoreExprs:
            loc = self._skipIgnorables(instring, loc)

        if self.skipWhitespace:
            instrlen = len(instring)
            white_chars = self.whiteChars
            while loc < instrlen and instring[loc] in white_chars:
                loc += 1

        return loc

    def parseImpl(self, instring, loc, doActions=True):
        return loc, []

    def postParse(self, instring, loc, tokenlist):
        return tokenlist

    # @profile
    def _parseNoCache(
        self, instring, loc, doActions=True, callPreParse=True
    ) -> Tuple[int, ParseResults]:
        TRY, MATCH, FAIL = 0, 1, 2
        debugging = self.debug  # and doActions)
        len_instring = len(instring)

        if debugging or self.failAction:
            # print("Match {} at loc {}({}, {})".format(self, loc, lineno(loc, instring), col(loc, instring)))
            try:
                if callPreParse and self.callPreparse:
                    pre_loc = self.preParse(instring, loc)
                else:
                    pre_loc = loc
                tokens_start = pre_loc
                if self.debugActions.debug_try:
                    self.debugActions.debug_try(instring, tokens_start, self, False)
                if self.mayIndexError or pre_loc >= len_instring:
                    try:
                        loc, tokens = self.parseImpl(instring, pre_loc, doActions)
                    except IndexError:
                        raise ParseException(instring, len_instring, self.errmsg, self)
                else:
                    loc, tokens = self.parseImpl(instring, pre_loc, doActions)
            except Exception as err:
                # print("Exception raised:", err)
                if self.debugActions.debug_fail:
                    self.debugActions.debug_fail(
                        instring, tokens_start, self, err, False
                    )
                if self.failAction:
                    self.failAction(instring, tokens_start, self, err)
                raise
        else:
            if callPreParse and self.callPreparse:
                pre_loc = self.preParse(instring, loc)
            else:
                pre_loc = loc
            tokens_start = pre_loc
            if self.mayIndexError or pre_loc >= len_instring:
                try:
                    loc, tokens = self.parseImpl(instring, pre_loc, doActions)
                except IndexError:
                    raise ParseException(instring, len_instring, self.errmsg, self)
            else:
                loc, tokens = self.parseImpl(instring, pre_loc, doActions)

        tokens = self.postParse(instring, loc, tokens)

        ret_tokens = ParseResults(
            tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults
        )
        if self.parseAction and (doActions or self.callDuringTry):
            if debugging:
                try:
                    for fn in self.parseAction:
                        try:
                            tokens = fn(instring, tokens_start, ret_tokens)  # type: ignore [call-arg, arg-type]
                        except IndexError as parse_action_exc:
                            exc = ParseException("exception raised in parse action")
                            raise exc from parse_action_exc

                        if tokens is not None and tokens is not ret_tokens:
                            ret_tokens = ParseResults(
                                tokens,
                                self.resultsName,
                                asList=self.saveAsList
                                and isinstance(tokens, (ParseResults, list)),
                                modal=self.modalResults,
                            )
                except Exception as err:
                    # print "Exception raised in user parse action:", err
                    if self.debugActions.debug_fail:
                        self.debugActions.debug_fail(
                            instring, tokens_start, self, err, False
                        )
                    raise
            else:
                for fn in self.parseAction:
                    try:
                        tokens = fn(instring, tokens_start, ret_tokens)  # type: ignore [call-arg, arg-type]
                    except IndexError as parse_action_exc:
                        exc = ParseException("exception raised in parse action")
                        raise exc from parse_action_exc

                    if tokens is not None and tokens is not ret_tokens:
                        ret_tokens = ParseResults(
                            tokens,
                            self.resultsName,
                            asList=self.saveAsList
                            and isinstance(tokens, (ParseResults, list)),
                            modal=self.modalResults,
                        )
        if debugging:
            # print("Matched", self, "->", ret_tokens.as_list())
            if self.debugActions.debug_match:
                self.debugActions.debug_match(
                    instring, tokens_start, loc, self, ret_tokens, False
                )

        return loc, ret_tokens

    def try_parse(
        self,
        instring: str,
        loc: int,
        *,
        raise_fatal: bool = False,
        do_actions: bool = False,
    ) -> int:
        try:
            return self._parse(instring, loc, doActions=do_actions)[0]
        except ParseFatalException:
            if raise_fatal:
                raise
            raise ParseException(instring, loc, self.errmsg, self)

    def can_parse_next(self, instring: str, loc: int, do_actions: bool = False) -> bool:
        try:
            self.try_parse(instring, loc, do_actions=do_actions)
        except (ParseException, IndexError):
            return False
        else:
            return True

    # cache for left-recursion in Forward references
    recursion_lock = RLock()
    recursion_memos: typing.Dict[
        Tuple[int, "Forward", bool], Tuple[int, Union[ParseResults, Exception]]
    ] = {}

    class _CacheType(dict):
        """
        class to help type checking
        """

        not_in_cache: bool

        def get(self, *args):
            ...

        def set(self, *args):
            ...

    # argument cache for optimizing repeated calls when backtracking through recursive expressions
    packrat_cache = (
        _CacheType()
    )  # set later by enable_packrat(); this is here so that reset_cache() doesn't fail
    packrat_cache_lock = RLock()
    packrat_cache_stats = [0, 0]

    # this method gets repeatedly called during backtracking with the same arguments -
    # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression
    def _parseCache(
        self, instring, loc, doActions=True, callPreParse=True
    ) -> Tuple[int, ParseResults]:
        HIT, MISS = 0, 1
        TRY, MATCH, FAIL = 0, 1, 2
        lookup = (self, instring, loc, callPreParse, doActions)
        with ParserElement.packrat_cache_lock:
            cache = ParserElement.packrat_cache
            value = cache.get(lookup)
            if value is cache.not_in_cache:
                ParserElement.packrat_cache_stats[MISS] += 1
                try:
                    value = self._parseNoCache(instring, loc, doActions, callPreParse)
                except ParseBaseException as pe:
                    # cache a copy of the exception, without the traceback
                    cache.set(lookup, pe.__class__(*pe.args))
                    raise
                else:
                    cache.set(lookup, (value[0], value[1].copy(), loc))
                    return value
            else:
                ParserElement.packrat_cache_stats[HIT] += 1
                if self.debug and self.debugActions.debug_try:
                    try:
                        self.debugActions.debug_try(instring, loc, self, cache_hit=True)  # type: ignore [call-arg]
                    except TypeError:
                        pass
                if isinstance(value, Exception):
                    if self.debug and self.debugActions.debug_fail:
                        try:
                            self.debugActions.debug_fail(
                                instring, loc, self, value, cache_hit=True  # type: ignore [call-arg]
                            )
                        except TypeError:
                            pass
                    raise value

                value = cast(Tuple[int, ParseResults, int], value)
                loc_, result, endloc = value[0], value[1].copy(), value[2]
                if self.debug and self.debugActions.debug_match:
                    try:
                        self.debugActions.debug_match(
                            instring, loc_, endloc, self, result, cache_hit=True  # type: ignore [call-arg]
                        )
                    except TypeError:
                        pass

                return loc_, result

    _parse = _parseNoCache

    @staticmethod
    def reset_cache() -> None:
        ParserElement.packrat_cache.clear()
        ParserElement.packrat_cache_stats[:] = [0] * len(
            ParserElement.packrat_cache_stats
        )
        ParserElement.recursion_memos.clear()

    _packratEnabled = False
    _left_recursion_enabled = False

    @staticmethod
    def disable_memoization() -> None:
        """
        Disables active Packrat or Left Recursion parsing and their memoization

        This method also works if neither Packrat nor Left Recursion are enabled.
        This makes it safe to call before activating Packrat nor Left Recursion
        to clear any previous settings.
        """
        ParserElement.reset_cache()
        ParserElement._left_recursion_enabled = False
        ParserElement._packratEnabled = False
        ParserElement._parse = ParserElement._parseNoCache

    @staticmethod
    def enable_left_recursion(
        cache_size_limit: typing.Optional[int] = None, *, force=False
    ) -> None:
        """
        Enables "bounded recursion" parsing, which allows for both direct and indirect
        left-recursion. During parsing, left-recursive :class:`Forward` elements are
        repeatedly matched with a fixed recursion depth that is gradually increased
        until finding the longest match.

        Example::

            from pip._vendor import pyparsing as pp
            pp.ParserElement.enable_left_recursion()

            E = pp.Forward("E")
            num = pp.Word(pp.nums)
            # match `num`, or `num '+' num`, or `num '+' num '+' num`, ...
            E <<= E + '+' - num | num

            print(E.parse_string("1+2+3"))

        Recursion search naturally memoizes matches of ``Forward`` elements and may
        thus skip reevaluation of parse actions during backtracking. This may break
        programs with parse actions which rely on strict ordering of side-effects.

        Parameters:

        - ``cache_size_limit`` - (default=``None``) - memoize at most this many
          ``Forward`` elements during matching; if ``None`` (the default),
          memoize all ``Forward`` elements.

        Bounded Recursion parsing works similar but not identical to Packrat parsing,
        thus the two cannot be used together. Use ``force=True`` to disable any
        previous, conflicting settings.
        """
        if force:
            ParserElement.disable_memoization()
        elif ParserElement._packratEnabled:
            raise RuntimeError("Packrat and Bounded Recursion are not compatible")
        if cache_size_limit is None:
            ParserElement.recursion_memos = _UnboundedMemo()  # type: ignore[assignment]
        elif cache_size_limit > 0:
            ParserElement.recursion_memos = _LRUMemo(capacity=cache_size_limit)  # type: ignore[assignment]
        else:
            raise NotImplementedError("Memo size of %s" % cache_size_limit)
        ParserElement._left_recursion_enabled = True

    @staticmethod
    def enable_packrat(cache_size_limit: int = 128, *, force: bool = False) -> None:
        """
        Enables "packrat" parsing, which adds memoizing to the parsing logic.
        Repeated parse attempts at the same string location (which happens
        often in many complex grammars) can immediately return a cached value,
        instead of re-executing parsing/validating code.  Memoizing is done of
        both valid results and parsing exceptions.

        Parameters:

        - ``cache_size_limit`` - (default= ``128``) - if an integer value is provided
          will limit the size of the packrat cache; if None is passed, then
          the cache size will be unbounded; if 0 is passed, the cache will
          be effectively disabled.

        This speedup may break existing programs that use parse actions that
        have side-effects.  For this reason, packrat parsing is disabled when
        you first import pyparsing.  To activate the packrat feature, your
        program must call the class method :class:`ParserElement.enable_packrat`.
        For best results, call ``enable_packrat()`` immediately after
        importing pyparsing.

        Example::

            from pip._vendor import pyparsing
            pyparsing.ParserElement.enable_packrat()

        Packrat parsing works similar but not identical to Bounded Recursion parsing,
        thus the two cannot be used together. Use ``force=True`` to disable any
        previous, conflicting settings.
        """
        if force:
            ParserElement.disable_memoization()
        elif ParserElement._left_recursion_enabled:
            raise RuntimeError("Packrat and Bounded Recursion are not compatible")
        if not ParserElement._packratEnabled:
            ParserElement._packratEnabled = True
            if cache_size_limit is None:
                ParserElement.packrat_cache = _UnboundedCache()
            else:
                ParserElement.packrat_cache = _FifoCache(cache_size_limit)  # type: ignore[assignment]
            ParserElement._parse = ParserElement._parseCache

    def parse_string(
        self, instring: str, parse_all: bool = False, *, parseAll: bool = False
    ) -> ParseResults:
        """
        Parse a string with respect to the parser definition. This function is intended as the primary interface to the
        client code.

        :param instring: The input string to be parsed.
        :param parse_all: If set, the entire input string must match the grammar.
        :param parseAll: retained for pre-PEP8 compatibility, will be removed in a future release.
        :raises ParseException: Raised if ``parse_all`` is set and the input string does not match the whole grammar.
        :returns: the parsed data as a :class:`ParseResults` object, which may be accessed as a `list`, a `dict`, or
          an object with attributes if the given parser includes results names.

        If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This
        is also equivalent to ending the grammar with :class:`StringEnd`\\ ().

        To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are
        converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string
        contains tabs and the grammar uses parse actions that use the ``loc`` argument to index into the string
        being parsed, one can ensure a consistent view of the input string by doing one of the following:

        - calling ``parse_with_tabs`` on your grammar before calling ``parse_string`` (see :class:`parse_with_tabs`),
        - define your parse action using the full ``(s,loc,toks)`` signature, and reference the input string using the
          parse action's ``s`` argument, or
        - explicitly expand the tabs in your input string before calling ``parse_string``.

        Examples:

        By default, partial matches are OK.

        >>> res = Word('a').parse_string('aaaaabaaa')
        >>> print(res)
        ['aaaaa']

        The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children
        directly to see more examples.

        It raises an exception if parse_all flag is set and instring does not match the whole grammar.

        >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True)
        Traceback (most recent call last):
        ...
        pyparsing.ParseException: Expected end of text, found 'b'  (at char 5), (line:1, col:6)
        """
        parseAll = parse_all or parseAll

        ParserElement.reset_cache()
        if not self.streamlined:
            self.streamline()
        for e in self.ignoreExprs:
            e.streamline()
        if not self.keepTabs:
            instring = instring.expandtabs()
        try:
            loc, tokens = self._parse(instring, 0)
            if parseAll:
                loc = self.preParse(instring, loc)
                se = Empty() + StringEnd()
                se._parse(instring, loc)
        except ParseBaseException as exc:
            if ParserElement.verbose_stacktrace:
                raise
            else:
                # catch and re-raise exception from here, clearing out pyparsing internal stack trace
                raise exc.with_traceback(None)
        else:
            return tokens

    def scan_string(
        self,
        instring: str,
        max_matches: int = _MAX_INT,
        overlap: bool = False,
        *,
        debug: bool = False,
        maxMatches: int = _MAX_INT,
    ) -> Generator[Tuple[ParseResults, int, int], None, None]:
        """
        Scan the input string for expression matches.  Each match will return the
        matching tokens, start location, and end location.  May be called with optional
        ``max_matches`` argument, to clip scanning after 'n' matches are found.  If
        ``overlap`` is specified, then overlapping matches will be reported.

        Note that the start and end locations are reported relative to the string
        being parsed.  See :class:`parse_string` for more information on parsing
        strings with embedded tabs.

        Example::

            source = "sldjf123lsdjjkf345sldkjf879lkjsfd987"
            print(source)
            for tokens, start, end in Word(alphas).scan_string(source):
                print(' '*start + '^'*(end-start))
                print(' '*start + tokens[0])

        prints::

            sldjf123lsdjjkf345sldkjf879lkjsfd987
            ^^^^^
            sldjf
                    ^^^^^^^
                    lsdjjkf
                              ^^^^^^
                              sldkjf
                                       ^^^^^^
                                       lkjsfd
        """
        maxMatches = min(maxMatches, max_matches)
        if not self.streamlined:
            self.streamline()
        for e in self.ignoreExprs:
            e.streamline()

        if not self.keepTabs:
            instring = str(instring).expandtabs()
        instrlen = len(instring)
        loc = 0
        preparseFn = self.preParse
        parseFn = self._parse
        ParserElement.resetCache()
        matches = 0
        try:
            while loc <= instrlen and matches < maxMatches:
                try:
                    preloc: int = preparseFn(instring, loc)
                    nextLoc: int
                    tokens: ParseResults
                    nextLoc, tokens = parseFn(instring, preloc, callPreParse=False)
                except ParseException:
                    loc = preloc + 1
                else:
                    if nextLoc > loc:
                        matches += 1
                        if debug:
                            print(
                                {
                                    "tokens": tokens.asList(),
                                    "start": preloc,
                                    "end": nextLoc,
                                }
                            )
                        yield tokens, preloc, nextLoc
                        if overlap:
                            nextloc = preparseFn(instring, loc)
                            if nextloc > loc:
                                loc = nextLoc
                            else:
                                loc += 1
                        else:
                            loc = nextLoc
                    else:
                        loc = preloc + 1
        except ParseBaseException as exc:
            if ParserElement.verbose_stacktrace:
                raise
            else:
                # catch and re-raise exception from here, clears out pyparsing internal stack trace
                raise exc.with_traceback(None)

    def transform_string(self, instring: str, *, debug: bool = False) -> str:
        """
        Extension to :class:`scan_string`, to modify matching text with modified tokens that may
        be returned from a parse action.  To use ``transform_string``, define a grammar and
        attach a parse action to it that modifies the returned token list.
        Invoking ``transform_string()`` on a target string will then scan for matches,
        and replace the matched text patterns according to the logic in the parse
        action.  ``transform_string()`` returns the resulting transformed string.

        Example::

            wd = Word(alphas)
            wd.set_parse_action(lambda toks: toks[0].title())

            print(wd.transform_string("now is the winter of our discontent made glorious summer by this sun of york."))

        prints::

            Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York.
        """
        out: List[str] = []
        lastE = 0
        # force preservation of <TAB>s, to minimize unwanted transformation of string, and to
        # keep string locs straight between transform_string and scan_string
        self.keepTabs = True
        try:
            for t, s, e in self.scan_string(instring, debug=debug):
                out.append(instring[lastE:s])
                if t:
                    if isinstance(t, ParseResults):
                        out += t.as_list()
                    elif isinstance(t, Iterable) and not isinstance(t, str_type):
                        out.extend(t)
                    else:
                        out.append(t)
                lastE = e
            out.append(instring[lastE:])
            out = [o for o in out if o]
            return "".join([str(s) for s in _flatten(out)])
        except ParseBaseException as exc:
            if ParserElement.verbose_stacktrace:
                raise
            else:
                # catch and re-raise exception from here, clears out pyparsing internal stack trace
                raise exc.with_traceback(None)

    def search_string(
        self,
        instring: str,
        max_matches: int = _MAX_INT,
        *,
        debug: bool = False,
        maxMatches: int = _MAX_INT,
    ) -> ParseResults:
        """
        Another extension to :class:`scan_string`, simplifying the access to the tokens found
        to match the given parse expression.  May be called with optional
        ``max_matches`` argument, to clip searching after 'n' matches are found.

        Example::

            # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters
            cap_word = Word(alphas.upper(), alphas.lower())

            print(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity"))

            # the sum() builtin can be used to merge results into a single ParseResults object
            print(sum(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity")))

        prints::

            [['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']]
            ['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity']
        """
        maxMatches = min(maxMatches, max_matches)
        try:
            return ParseResults(
                [t for t, s, e in self.scan_string(instring, maxMatches, debug=debug)]
            )
        except ParseBaseException as exc:
            if ParserElement.verbose_stacktrace:
                raise
            else:
                # catch and re-raise exception from here, clears out pyparsing internal stack trace
                raise exc.with_traceback(None)

    def split(
        self,
        instring: str,
        maxsplit: int = _MAX_INT,
        include_separators: bool = False,
        *,
        includeSeparators=False,
    ) -> Generator[str, None, None]:
        """
        Generator method to split a string using the given expression as a separator.
        May be called with optional ``maxsplit`` argument, to limit the number of splits;
        and the optional ``include_separators`` argument (default= ``False``), if the separating
        matching text should be included in the split results.

        Example::

            punc = one_of(list(".,;:/-!?"))
            print(list(punc.split("This, this?, this sentence, is badly punctuated!")))

        prints::

            ['This', ' this', '', ' this sentence', ' is badly punctuated', '']
        """
        includeSeparators = includeSeparators or include_separators
        last = 0
        for t, s, e in self.scan_string(instring, max_matches=maxsplit):
            yield instring[last:s]
            if includeSeparators:
                yield t[0]
            last = e
        yield instring[last:]

    def __add__(self, other) -> "ParserElement":
        """
        Implementation of ``+`` operator - returns :class:`And`. Adding strings to a :class:`ParserElement`
        converts them to :class:`Literal`\\ s by default.

        Example::

            greet = Word(alphas) + "," + Word(alphas) + "!"
            hello = "Hello, World!"
            print(hello, "->", greet.parse_string(hello))

        prints::

            Hello, World! -> ['Hello', ',', 'World', '!']

        ``...`` may be used as a parse expression as a short form of :class:`SkipTo`::

            Literal('start') + ... + Literal('end')

        is equivalent to::

            Literal('start') + SkipTo('end')("_skipped*") + Literal('end')

        Note that the skipped text is returned with '_skipped' as a results name,
        and to support having multiple skips in the same parser, the value returned is
        a list of all skipped text.
        """
        if other is Ellipsis:
            return _PendingSkip(self)

        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return And([self, other])

    def __radd__(self, other) -> "ParserElement":
        """
        Implementation of ``+`` operator when left operand is not a :class:`ParserElement`
        """
        if other is Ellipsis:
            return SkipTo(self)("_skipped*") + self

        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return other + self

    def __sub__(self, other) -> "ParserElement":
        """
        Implementation of ``-`` operator, returns :class:`And` with error stop
        """
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return self + And._ErrorStop() + other

    def __rsub__(self, other) -> "ParserElement":
        """
        Implementation of ``-`` operator when left operand is not a :class:`ParserElement`
        """
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return other - self

    def __mul__(self, other) -> "ParserElement":
        """
        Implementation of ``*`` operator, allows use of ``expr * 3`` in place of
        ``expr + expr + expr``.  Expressions may also be multiplied by a 2-integer
        tuple, similar to ``{min, max}`` multipliers in regular expressions.  Tuples
        may also include ``None`` as in:

        - ``expr*(n, None)`` or ``expr*(n, )`` is equivalent
          to ``expr*n + ZeroOrMore(expr)``
          (read as "at least n instances of ``expr``")
        - ``expr*(None, n)`` is equivalent to ``expr*(0, n)``
          (read as "0 to n instances of ``expr``")
        - ``expr*(None, None)`` is equivalent to ``ZeroOrMore(expr)``
        - ``expr*(1, None)`` is equivalent to ``OneOrMore(expr)``

        Note that ``expr*(None, n)`` does not raise an exception if
        more than n exprs exist in the input stream; that is,
        ``expr*(None, n)`` does not enforce a maximum number of expr
        occurrences.  If this behavior is desired, then write
        ``expr*(None, n) + ~expr``
        """
        if other is Ellipsis:
            other = (0, None)
        elif isinstance(other, tuple) and other[:1] == (Ellipsis,):
            other = ((0,) + other[1:] + (None,))[:2]

        if isinstance(other, int):
            minElements, optElements = other, 0
        elif isinstance(other, tuple):
            other = tuple(o if o is not Ellipsis else None for o in other)
            other = (other + (None, None))[:2]
            if other[0] is None:
                other = (0, other[1])
            if isinstance(other[0], int) and other[1] is None:
                if other[0] == 0:
                    return ZeroOrMore(self)
                if other[0] == 1:
                    return OneOrMore(self)
                else:
                    return self * other[0] + ZeroOrMore(self)
            elif isinstance(other[0], int) and isinstance(other[1], int):
                minElements, optElements = other
                optElements -= minElements
            else:
                return NotImplemented
        else:
            return NotImplemented

        if minElements < 0:
            raise ValueError("cannot multiply ParserElement by negative value")
        if optElements < 0:
            raise ValueError(
                "second tuple value must be greater or equal to first tuple value"
            )
        if minElements == optElements == 0:
            return And([])

        if optElements:

            def makeOptionalList(n):
                if n > 1:
                    return Opt(self + makeOptionalList(n - 1))
                else:
                    return Opt(self)

            if minElements:
                if minElements == 1:
                    ret = self + makeOptionalList(optElements)
                else:
                    ret = And([self] * minElements) + makeOptionalList(optElements)
            else:
                ret = makeOptionalList(optElements)
        else:
            if minElements == 1:
                ret = self
            else:
                ret = And([self] * minElements)
        return ret

    def __rmul__(self, other) -> "ParserElement":
        return self.__mul__(other)

    def __or__(self, other) -> "ParserElement":
        """
        Implementation of ``|`` operator - returns :class:`MatchFirst`
        """
        if other is Ellipsis:
            return _PendingSkip(self, must_skip=True)

        if isinstance(other, str_type):
            # `expr | ""` is equivalent to `Opt(expr)`
            if other == "":
                return Opt(self)
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return MatchFirst([self, other])

    def __ror__(self, other) -> "ParserElement":
        """
        Implementation of ``|`` operator when left operand is not a :class:`ParserElement`
        """
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return other | self

    def __xor__(self, other) -> "ParserElement":
        """
        Implementation of ``^`` operator - returns :class:`Or`
        """
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return Or([self, other])

    def __rxor__(self, other) -> "ParserElement":
        """
        Implementation of ``^`` operator when left operand is not a :class:`ParserElement`
        """
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return other ^ self

    def __and__(self, other) -> "ParserElement":
        """
        Implementation of ``&`` operator - returns :class:`Each`
        """
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return Each([self, other])

    def __rand__(self, other) -> "ParserElement":
        """
        Implementation of ``&`` operator when left operand is not a :class:`ParserElement`
        """
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return other & self

    def __invert__(self) -> "ParserElement":
        """
        Implementation of ``~`` operator - returns :class:`NotAny`
        """
        return NotAny(self)

    # disable __iter__ to override legacy use of sequential access to __getitem__ to
    # iterate over a sequence
    __iter__ = None

    def __getitem__(self, key):
        """
        use ``[]`` indexing notation as a short form for expression repetition:

        - ``expr[n]`` is equivalent to ``expr*n``
        - ``expr[m, n]`` is equivalent to ``expr*(m, n)``
        - ``expr[n, ...]`` or ``expr[n,]`` is equivalent
             to ``expr*n + ZeroOrMore(expr)``
             (read as "at least n instances of ``expr``")
        - ``expr[..., n]`` is equivalent to ``expr*(0, n)``
             (read as "0 to n instances of ``expr``")
        - ``expr[...]`` and ``expr[0, ...]`` are equivalent to ``ZeroOrMore(expr)``
        - ``expr[1, ...]`` is equivalent to ``OneOrMore(expr)``

        ``None`` may be used in place of ``...``.

        Note that ``expr[..., n]`` and ``expr[m, n]`` do not raise an exception
        if more than ``n`` ``expr``\\ s exist in the input stream.  If this behavior is
        desired, then write ``expr[..., n] + ~expr``.

        For repetition with a stop_on expression, use slice notation:

        - ``expr[...: end_expr]`` and ``expr[0, ...: end_expr]`` are equivalent to ``ZeroOrMore(expr, stop_on=end_expr)``
        - ``expr[1, ...: end_expr]`` is equivalent to ``OneOrMore(expr, stop_on=end_expr)``

        """

        stop_on_defined = False
        stop_on = NoMatch()
        if isinstance(key, slice):
            key, stop_on = key.start, key.stop
            if key is None:
                key = ...
            stop_on_defined = True
        elif isinstance(key, tuple) and isinstance(key[-1], slice):
            key, stop_on = (key[0], key[1].start), key[1].stop
            stop_on_defined = True

        # convert single arg keys to tuples
        if isinstance(key, str_type):
            key = (key,)
        try:
            iter(key)
        except TypeError:
            key = (key, key)

        if len(key) > 2:
            raise TypeError(
                f"only 1 or 2 index arguments supported ({key[:5]}{f'... [{len(key)}]' if len(key) > 5 else ''})"
            )

        # clip to 2 elements
        ret = self * tuple(key[:2])
        ret = typing.cast(_MultipleMatch, ret)

        if stop_on_defined:
            ret.stopOn(stop_on)

        return ret

    def __call__(self, name: typing.Optional[str] = None) -> "ParserElement":
        """
        Shortcut for :class:`set_results_name`, with ``list_all_matches=False``.

        If ``name`` is given with a trailing ``'*'`` character, then ``list_all_matches`` will be
        passed as ``True``.

        If ``name`` is omitted, same as calling :class:`copy`.

        Example::

            # these are equivalent
            userdata = Word(alphas).set_results_name("name") + Word(nums + "-").set_results_name("socsecno")
            userdata = Word(alphas)("name") + Word(nums + "-")("socsecno")
        """
        if name is not None:
            return self._setResultsName(name)
        else:
            return self.copy()

    def suppress(self) -> "ParserElement":
        """
        Suppresses the output of this :class:`ParserElement`; useful to keep punctuation from
        cluttering up returned output.
        """
        return Suppress(self)

    def ignore_whitespace(self, recursive: bool = True) -> "ParserElement":
        """
        Enables the skipping of whitespace before matching the characters in the
        :class:`ParserElement`'s defined pattern.

        :param recursive: If ``True`` (the default), also enable whitespace skipping in child elements (if any)
        """
        self.skipWhitespace = True
        return self

    def leave_whitespace(self, recursive: bool = True) -> "ParserElement":
        """
        Disables the skipping of whitespace before matching the characters in the
        :class:`ParserElement`'s defined pattern.  This is normally only used internally by
        the pyparsing module, but may be needed in some whitespace-sensitive grammars.

        :param recursive: If true (the default), also disable whitespace skipping in child elements (if any)
        """
        self.skipWhitespace = False
        return self

    def set_whitespace_chars(
        self, chars: Union[Set[str], str], copy_defaults: bool = False
    ) -> "ParserElement":
        """
        Overrides the default whitespace chars
        """
        self.skipWhitespace = True
        self.whiteChars = set(chars)
        self.copyDefaultWhiteChars = copy_defaults
        return self

    def parse_with_tabs(self) -> "ParserElement":
        """
        Overrides default behavior to expand ``<TAB>`` s to spaces before parsing the input string.
        Must be called before ``parse_string`` when the input grammar contains elements that
        match ``<TAB>`` characters.
        """
        self.keepTabs = True
        return self

    def ignore(self, other: "ParserElement") -> "ParserElement":
        """
        Define expression to be ignored (e.g., comments) while doing pattern
        matching; may be called repeatedly, to define multiple comment or other
        ignorable patterns.

        Example::

            patt = Word(alphas)[1, ...]
            patt.parse_string('ablaj /* comment */ lskjd')
            # -> ['ablaj']

            patt.ignore(c_style_comment)
            patt.parse_string('ablaj /* comment */ lskjd')
            # -> ['ablaj', 'lskjd']
        """
        import typing

        if isinstance(other, str_type):
            other = Suppress(other)

        if isinstance(other, Suppress):
            if other not in self.ignoreExprs:
                self.ignoreExprs.append(other)
        else:
            self.ignoreExprs.append(Suppress(other.copy()))
        return self

    def set_debug_actions(
        self,
        start_action: DebugStartAction,
        success_action: DebugSuccessAction,
        exception_action: DebugExceptionAction,
    ) -> "ParserElement":
        """
        Customize display of debugging messages while doing pattern matching:

        - ``start_action`` - method to be called when an expression is about to be parsed;
          should have the signature ``fn(input_string: str, location: int, expression: ParserElement, cache_hit: bool)``

        - ``success_action`` - method to be called when an expression has successfully parsed;
          should have the signature ``fn(input_string: str, start_location: int, end_location: int, expression: ParserELement, parsed_tokens: ParseResults, cache_hit: bool)``

        - ``exception_action`` - method to be called when expression fails to parse;
          should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)``
        """
        self.debugActions = self.DebugActions(
            start_action or _default_start_debug_action,  # type: ignore[truthy-function]
            success_action or _default_success_debug_action,  # type: ignore[truthy-function]
            exception_action or _default_exception_debug_action,  # type: ignore[truthy-function]
        )
        self.debug = True
        return self

    def set_debug(self, flag: bool = True, recurse: bool = False) -> "ParserElement":
        """
        Enable display of debugging messages while doing pattern matching.
        Set ``flag`` to ``True`` to enable, ``False`` to disable.
        Set ``recurse`` to ``True`` to set the debug flag on this expression and all sub-expressions.

        Example::

            wd = Word(alphas).set_name("alphaword")
            integer = Word(nums).set_name("numword")
            term = wd | integer

            # turn on debugging for wd
            wd.set_debug()

            term[1, ...].parse_string("abc 123 xyz 890")

        prints::

            Match alphaword at loc 0(1,1)
            Matched alphaword -> ['abc']
            Match alphaword at loc 3(1,4)
            Exception raised:Expected alphaword (at char 4), (line:1, col:5)
            Match alphaword at loc 7(1,8)
            Matched alphaword -> ['xyz']
            Match alphaword at loc 11(1,12)
            Exception raised:Expected alphaword (at char 12), (line:1, col:13)
            Match alphaword at loc 15(1,16)
            Exception raised:Expected alphaword (at char 15), (line:1, col:16)

        The output shown is that produced by the default debug actions - custom debug actions can be
        specified using :class:`set_debug_actions`. Prior to attempting
        to match the ``wd`` expression, the debugging message ``"Match <exprname> at loc <n>(<line>,<col>)"``
        is shown. Then if the parse succeeds, a ``"Matched"`` message is shown, or an ``"Exception raised"``
        message is shown. Also note the use of :class:`set_name` to assign a human-readable name to the expression,
        which makes debugging and exception messages easier to understand - for instance, the default
        name created for the :class:`Word` expression without calling ``set_name`` is ``"W:(A-Za-z)"``.
        """
        if recurse:
            for expr in self.visit_all():
                expr.set_debug(flag, recurse=False)
            return self

        if flag:
            self.set_debug_actions(
                _default_start_debug_action,
                _default_success_debug_action,
                _default_exception_debug_action,
            )
        else:
            self.debug = False
        return self

    @property
    def default_name(self) -> str:
        if self._defaultName is None:
            self._defaultName = self._generateDefaultName()
        return self._defaultName

    @abstractmethod
    def _generateDefaultName(self) -> str:
        """
        Child classes must define this method, which defines how the ``default_name`` is set.
        """

    def set_name(self, name: str) -> "ParserElement":
        """
        Define name for this expression, makes debugging and exception messages clearer.

        Example::

            Word(nums).parse_string("ABC")  # -> Exception: Expected W:(0-9) (at char 0), (line:1, col:1)
            Word(nums).set_name("integer").parse_string("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)
        """
        self.customName = name
        self.errmsg = "Expected " + self.name
        if __diag__.enable_debug_on_named_expressions:
            self.set_debug()
        return self

    @property
    def name(self) -> str:
        # This will use a user-defined name if available, but otherwise defaults back to the auto-generated name
        return self.customName if self.customName is not None else self.default_name

    def __str__(self) -> str:
        return self.name

    def __repr__(self) -> str:
        return str(self)

    def streamline(self) -> "ParserElement":
        self.streamlined = True
        self._defaultName = None
        return self

    def recurse(self) -> List["ParserElement"]:
        return []

    def _checkRecursion(self, parseElementList):
        subRecCheckList = parseElementList[:] + [self]
        for e in self.recurse():
            e._checkRecursion(subRecCheckList)

    def validate(self, validateTrace=None) -> None:
        """
        Check defined expressions for valid structure, check for infinite recursive definitions.
        """
        warnings.warn(
            "ParserElement.validate() is deprecated, and should not be used to check for left recursion",
            DeprecationWarning,
            stacklevel=2,
        )
        self._checkRecursion([])

    def parse_file(
        self,
        file_or_filename: Union[str, Path, TextIO],
        encoding: str = "utf-8",
        parse_all: bool = False,
        *,
        parseAll: bool = False,
    ) -> ParseResults:
        """
        Execute the parse expression on the given file or filename.
        If a filename is specified (instead of a file object),
        the entire file is opened, read, and closed before parsing.
        """
        parseAll = parseAll or parse_all
        try:
            file_or_filename = typing.cast(TextIO, file_or_filename)
            file_contents = file_or_filename.read()
        except AttributeError:
            file_or_filename = typing.cast(str, file_or_filename)
            with open(file_or_filename, "r", encoding=encoding) as f:
                file_contents = f.read()
        try:
            return self.parse_string(file_contents, parseAll)
        except ParseBaseException as exc:
            if ParserElement.verbose_stacktrace:
                raise
            else:
                # catch and re-raise exception from here, clears out pyparsing internal stack trace
                raise exc.with_traceback(None)

    def __eq__(self, other):
        if self is other:
            return True
        elif isinstance(other, str_type):
            return self.matches(other, parse_all=True)
        elif isinstance(other, ParserElement):
            return vars(self) == vars(other)
        return False

    def __hash__(self):
        return id(self)

    def matches(
        self, test_string: str, parse_all: bool = True, *, parseAll: bool = True
    ) -> bool:
        """
        Method for quick testing of a parser against a test string. Good for simple
        inline microtests of sub expressions while building up larger parser.

        Parameters:

        - ``test_string`` - to test against this expression for a match
        - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests

        Example::

            expr = Word(nums)
            assert expr.matches("100")
        """
        parseAll = parseAll and parse_all
        try:
            self.parse_string(str(test_string), parse_all=parseAll)
            return True
        except ParseBaseException:
            return False

    def run_tests(
        self,
        tests: Union[str, List[str]],
        parse_all: bool = True,
        comment: typing.Optional[Union["ParserElement", str]] = "#",
        full_dump: bool = True,
        print_results: bool = True,
        failure_tests: bool = False,
        post_parse: typing.Optional[Callable[[str, ParseResults], str]] = None,
        file: typing.Optional[TextIO] = None,
        with_line_numbers: bool = False,
        *,
        parseAll: bool = True,
        fullDump: bool = True,
        printResults: bool = True,
        failureTests: bool = False,
        postParse: typing.Optional[Callable[[str, ParseResults], str]] = None,
    ) -> Tuple[bool, List[Tuple[str, Union[ParseResults, Exception]]]]:
        """
        Execute the parse expression on a series of test strings, showing each
        test, the parsed results or where the parse failed. Quick and easy way to
        run a parse expression against a list of sample strings.

        Parameters:

        - ``tests`` - a list of separate test strings, or a multiline string of test strings
        - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests
        - ``comment`` - (default= ``'#'``) - expression for indicating embedded comments in the test
          string; pass None to disable comment filtering
        - ``full_dump`` - (default= ``True``) - dump results as list followed by results names in nested outline;
          if False, only dump nested list
        - ``print_results`` - (default= ``True``) prints test output to stdout
        - ``failure_tests`` - (default= ``False``) indicates if these tests are expected to fail parsing
        - ``post_parse`` - (default= ``None``) optional callback for successful parse results; called as
          `fn(test_string, parse_results)` and returns a string to be added to the test output
        - ``file`` - (default= ``None``) optional file-like object to which test output will be written;
          if None, will default to ``sys.stdout``
        - ``with_line_numbers`` - default= ``False``) show test strings with line and column numbers

        Returns: a (success, results) tuple, where success indicates that all tests succeeded
        (or failed if ``failure_tests`` is True), and the results contain a list of lines of each
        test's output

        Example::

            number_expr = pyparsing_common.number.copy()

            result = number_expr.run_tests('''
                # unsigned integer
                100
                # negative integer
                -100
                # float with scientific notation
                6.02e23
                # integer with scientific notation
                1e-12
                ''')
            print("Success" if result[0] else "Failed!")

            result = number_expr.run_tests('''
                # stray character
                100Z
                # missing leading digit before '.'
                -.100
                # too many '.'
                3.14.159
                ''', failure_tests=True)
            print("Success" if result[0] else "Failed!")

        prints::

            # unsigned integer
            100
            [100]

            # negative integer
            -100
            [-100]

            # float with scientific notation
            6.02e23
            [6.02e+23]

            # integer with scientific notation
            1e-12
            [1e-12]

            Success

            # stray character
            100Z
               ^
            FAIL: Expected end of text (at char 3), (line:1, col:4)

            # missing leading digit before '.'
            -.100
            ^
            FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1)

            # too many '.'
            3.14.159
                ^
            FAIL: Expected end of text (at char 4), (line:1, col:5)

            Success

        Each test string must be on a single line. If you want to test a string that spans multiple
        lines, create a test like this::

            expr.run_tests(r"this is a test\\n of strings that spans \\n 3 lines")

        (Note that this is a raw string literal, you must include the leading ``'r'``.)
        """
        from .testing import pyparsing_test

        parseAll = parseAll and parse_all
        fullDump = fullDump and full_dump
        printResults = printResults and print_results
        failureTests = failureTests or failure_tests
        postParse = postParse or post_parse
        if isinstance(tests, str_type):
            tests = typing.cast(str, tests)
            line_strip = type(tests).strip
            tests = [line_strip(test_line) for test_line in tests.rstrip().splitlines()]
        comment_specified = comment is not None
        if comment_specified:
            if isinstance(comment, str_type):
                comment = typing.cast(str, comment)
                comment = Literal(comment)
        comment = typing.cast(ParserElement, comment)
        if file is None:
            file = sys.stdout
        print_ = file.write

        result: Union[ParseResults, Exception]
        allResults: List[Tuple[str, Union[ParseResults, Exception]]] = []
        comments: List[str] = []
        success = True
        NL = Literal(r"\n").add_parse_action(replace_with("\n")).ignore(quoted_string)
        BOM = "\ufeff"
        for t in tests:
            if comment_specified and comment.matches(t, False) or comments and not t:
                comments.append(
                    pyparsing_test.with_line_numbers(t) if with_line_numbers else t
                )
                continue
            if not t:
                continue
            out = [
                "\n" + "\n".join(comments) if comments else "",
                pyparsing_test.with_line_numbers(t) if with_line_numbers else t,
            ]
            comments = []
            try:
                # convert newline marks to actual newlines, and strip leading BOM if present
                t = NL.transform_string(t.lstrip(BOM))
                result = self.parse_string(t, parse_all=parseAll)
            except ParseBaseException as pe:
                fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else ""
                out.append(pe.explain())
                out.append("FAIL: " + str(pe))
                if ParserElement.verbose_stacktrace:
                    out.extend(traceback.format_tb(pe.__traceback__))
                success = success and failureTests
                result = pe
            except Exception as exc:
                out.append(f"FAIL-EXCEPTION: {type(exc).__name__}: {exc}")
                if ParserElement.verbose_stacktrace:
                    out.extend(traceback.format_tb(exc.__traceback__))
                success = success and failureTests
                result = exc
            else:
                success = success and not failureTests
                if postParse is not None:
                    try:
                        pp_value = postParse(t, result)
                        if pp_value is not None:
                            if isinstance(pp_value, ParseResults):
                                out.append(pp_value.dump())
                            else:
                                out.append(str(pp_value))
                        else:
                            out.append(result.dump())
                    except Exception as e:
                        out.append(result.dump(full=fullDump))
                        out.append(
                            f"{postParse.__name__} failed: {type(e).__name__}: {e}"
                        )
                else:
                    out.append(result.dump(full=fullDump))
            out.append("")

            if printResults:
                print_("\n".join(out))

            allResults.append((t, result))

        return success, allResults

    def create_diagram(
        self,
        output_html: Union[TextIO, Path, str],
        vertical: int = 3,
        show_results_names: bool = False,
        show_groups: bool = False,
        embed: bool = False,
        **kwargs,
    ) -> None:
        """
        Create a railroad diagram for the parser.

        Parameters:

        - ``output_html`` (str or file-like object) - output target for generated
          diagram HTML
        - ``vertical`` (int) - threshold for formatting multiple alternatives vertically
          instead of horizontally (default=3)
        - ``show_results_names`` - bool flag whether diagram should show annotations for
          defined results names
        - ``show_groups`` - bool flag whether groups should be highlighted with an unlabeled surrounding box
        - ``embed`` - bool flag whether generated HTML should omit <HEAD>, <BODY>, and <DOCTYPE> tags to embed
          the resulting HTML in an enclosing HTML source
        - ``head`` - str containing additional HTML to insert into the <HEAD> section of the generated code;
          can be used to insert custom CSS styling
        - ``body`` - str containing additional HTML to insert at the beginning of the <BODY> section of the
          generated code

        Additional diagram-formatting keyword arguments can also be included;
        see railroad.Diagram class.
        """

        try:
            from .diagram import to_railroad, railroad_to_html
        except ImportError as ie:
            raise Exception(
                "must ``pip install pyparsing[diagrams]`` to generate parser railroad diagrams"
            ) from ie

        self.streamline()

        railroad = to_railroad(
            self,
            vertical=vertical,
            show_results_names=show_results_names,
            show_groups=show_groups,
            diagram_kwargs=kwargs,
        )
        if isinstance(output_html, (str, Path)):
            with open(output_html, "w", encoding="utf-8") as diag_file:
                diag_file.write(railroad_to_html(railroad, embed=embed, **kwargs))
        else:
            # we were passed a file-like object, just write to it
            output_html.write(railroad_to_html(railroad, embed=embed, **kwargs))

    # Compatibility synonyms
    # fmt: off
    @staticmethod
    @replaced_by_pep8(inline_literals_using)
    def inlineLiteralsUsing(): ...

    @staticmethod
    @replaced_by_pep8(set_default_whitespace_chars)
    def setDefaultWhitespaceChars(): ...

    @replaced_by_pep8(set_results_name)
    def setResultsName(self): ...

    @replaced_by_pep8(set_break)
    def setBreak(self): ...

    @replaced_by_pep8(set_parse_action)
    def setParseAction(self): ...

    @replaced_by_pep8(add_parse_action)
    def addParseAction(self): ...

    @replaced_by_pep8(add_condition)
    def addCondition(self): ...

    @replaced_by_pep8(set_fail_action)
    def setFailAction(self): ...

    @replaced_by_pep8(try_parse)
    def tryParse(self): ...

    @staticmethod
    @replaced_by_pep8(enable_left_recursion)
    def enableLeftRecursion(): ...

    @staticmethod
    @replaced_by_pep8(enable_packrat)
    def enablePackrat(): ...

    @replaced_by_pep8(parse_string)
    def parseString(self): ...

    @replaced_by_pep8(scan_string)
    def scanString(self): ...

    @replaced_by_pep8(transform_string)
    def transformString(self): ...

    @replaced_by_pep8(search_string)
    def searchString(self): ...

    @replaced_by_pep8(ignore_whitespace)
    def ignoreWhitespace(self): ...

    @replaced_by_pep8(leave_whitespace)
    def leaveWhitespace(self): ...

    @replaced_by_pep8(set_whitespace_chars)
    def setWhitespaceChars(self): ...

    @replaced_by_pep8(parse_with_tabs)
    def parseWithTabs(self): ...

    @replaced_by_pep8(set_debug_actions)
    def setDebugActions(self): ...

    @replaced_by_pep8(set_debug)
    def setDebug(self): ...

    @replaced_by_pep8(set_name)
    def setName(self): ...

    @replaced_by_pep8(parse_file)
    def parseFile(self): ...

    @replaced_by_pep8(run_tests)
    def runTests(self): ...

    canParseNext = can_parse_next
    resetCache = reset_cache
    defaultName = default_name
    # fmt: on


class _PendingSkip(ParserElement):
    # internal placeholder class to hold a place were '...' is added to a parser element,
    # once another ParserElement is added, this placeholder will be replaced with a SkipTo
    def __init__(self, expr: ParserElement, must_skip: bool = False):
        super().__init__()
        self.anchor = expr
        self.must_skip = must_skip

    def _generateDefaultName(self) -> str:
        return str(self.anchor + Empty()).replace("Empty", "...")

    def __add__(self, other) -> "ParserElement":
        skipper = SkipTo(other).set_name("...")("_skipped*")
        if self.must_skip:

            def must_skip(t):
                if not t._skipped or t._skipped.as_list() == [""]:
                    del t[0]
                    t.pop("_skipped", None)

            def show_skip(t):
                if t._skipped.as_list()[-1:] == [""]:
                    t.pop("_skipped")
                    t["_skipped"] = "missing <" + repr(self.anchor) + ">"

            return (
                self.anchor + skipper().add_parse_action(must_skip)
                | skipper().add_parse_action(show_skip)
            ) + other

        return self.anchor + skipper + other

    def __repr__(self):
        return self.defaultName

    def parseImpl(self, *args):
        raise Exception(
            "use of `...` expression without following SkipTo target expression"
        )


class Token(ParserElement):
    """Abstract :class:`ParserElement` subclass, for defining atomic
    matching patterns.
    """

    def __init__(self):
        super().__init__(savelist=False)

    def _generateDefaultName(self) -> str:
        return type(self).__name__


class NoMatch(Token):
    """
    A token that will never match.
    """

    def __init__(self):
        super().__init__()
        self.mayReturnEmpty = True
        self.mayIndexError = False
        self.errmsg = "Unmatchable token"

    def parseImpl(self, instring, loc, doActions=True):
        raise ParseException(instring, loc, self.errmsg, self)


class Literal(Token):
    """
    Token to exactly match a specified string.

    Example::

        Literal('blah').parse_string('blah')  # -> ['blah']
        Literal('blah').parse_string('blahfooblah')  # -> ['blah']
        Literal('blah').parse_string('bla')  # -> Exception: Expected "blah"

    For case-insensitive matching, use :class:`CaselessLiteral`.

    For keyword matching (force word break before and after the matched string),
    use :class:`Keyword` or :class:`CaselessKeyword`.
    """

    def __new__(cls, match_string: str = "", *, matchString: str = ""):
        # Performance tuning: select a subclass with optimized parseImpl
        if cls is Literal:
            match_string = matchString or match_string
            if not match_string:
                return super().__new__(Empty)
            if len(match_string) == 1:
                return super().__new__(_SingleCharLiteral)

        # Default behavior
        return super().__new__(cls)

    # Needed to make copy.copy() work correctly if we customize __new__
    def __getnewargs__(self):
        return (self.match,)

    def __init__(self, match_string: str = "", *, matchString: str = ""):
        super().__init__()
        match_string = matchString or match_string
        self.match = match_string
        self.matchLen = len(match_string)
        self.firstMatchChar = match_string[:1]
        self.errmsg = "Expected " + self.name
        self.mayReturnEmpty = False
        self.mayIndexError = False

    def _generateDefaultName(self) -> str:
        return repr(self.match)

    def parseImpl(self, instring, loc, doActions=True):
        if instring[loc] == self.firstMatchChar and instring.startswith(
            self.match, loc
        ):
            return loc + self.matchLen, self.match
        raise ParseException(instring, loc, self.errmsg, self)


class Empty(Literal):
    """
    An empty token, will always match.
    """

    def __init__(self, match_string="", *, matchString=""):
        super().__init__("")
        self.mayReturnEmpty = True
        self.mayIndexError = False

    def _generateDefaultName(self) -> str:
        return "Empty"

    def parseImpl(self, instring, loc, doActions=True):
        return loc, []


class _SingleCharLiteral(Literal):
    def parseImpl(self, instring, loc, doActions=True):
        if instring[loc] == self.firstMatchChar:
            return loc + 1, self.match
        raise ParseException(instring, loc, self.errmsg, self)


ParserElement._literalStringClass = Literal


class Keyword(Token):
    """
    Token to exactly match a specified string as a keyword, that is,
    it must be immediately preceded and followed by whitespace or
    non-keyword characters. Compare with :class:`Literal`:

    - ``Literal("if")`` will match the leading ``'if'`` in
      ``'ifAndOnlyIf'``.
    - ``Keyword("if")`` will not; it will only match the leading
      ``'if'`` in ``'if x=1'``, or ``'if(y==2)'``

    Accepts two optional constructor arguments in addition to the
    keyword string:

    - ``ident_chars`` is a string of characters that would be valid
      identifier characters, defaulting to all alphanumerics + "_" and
      "$"
    - ``caseless`` allows case-insensitive matching, default is ``False``.

    Example::

        Keyword("start").parse_string("start")  # -> ['start']
        Keyword("start").parse_string("starting")  # -> Exception

    For case-insensitive matching, use :class:`CaselessKeyword`.
    """

    DEFAULT_KEYWORD_CHARS = alphanums + "_$"

    def __init__(
        self,
        match_string: str = "",
        ident_chars: typing.Optional[str] = None,
        caseless: bool = False,
        *,
        matchString: str = "",
        identChars: typing.Optional[str] = None,
    ):
        super().__init__()
        identChars = identChars or ident_chars
        if identChars is None:
            identChars = Keyword.DEFAULT_KEYWORD_CHARS
        match_string = matchString or match_string
        self.match = match_string
        self.matchLen = len(match_string)
        try:
            self.firstMatchChar = match_string[0]
        except IndexError:
            raise ValueError("null string passed to Keyword; use Empty() instead")
        self.errmsg = f"Expected {type(self).__name__} {self.name}"
        self.mayReturnEmpty = False
        self.mayIndexError = False
        self.caseless = caseless
        if caseless:
            self.caselessmatch = match_string.upper()
            identChars = identChars.upper()
        self.identChars = set(identChars)

    def _generateDefaultName(self) -> str:
        return repr(self.match)

    def parseImpl(self, instring, loc, doActions=True):
        errmsg = self.errmsg
        errloc = loc
        if self.caseless:
            if instring[loc : loc + self.matchLen].upper() == self.caselessmatch:
                if loc == 0 or instring[loc - 1].upper() not in self.identChars:
                    if (
                        loc >= len(instring) - self.matchLen
                        or instring[loc + self.matchLen].upper() not in self.identChars
                    ):
                        return loc + self.matchLen, self.match
                    else:
                        # followed by keyword char
                        errmsg += ", was immediately followed by keyword character"
                        errloc = loc + self.matchLen
                else:
                    # preceded by keyword char
                    errmsg += ", keyword was immediately preceded by keyword character"
                    errloc = loc - 1
            # else no match just raise plain exception

        else:
            if (
                instring[loc] == self.firstMatchChar
                and self.matchLen == 1
                or instring.startswith(self.match, loc)
            ):
                if loc == 0 or instring[loc - 1] not in self.identChars:
                    if (
                        loc >= len(instring) - self.matchLen
                        or instring[loc + self.matchLen] not in self.identChars
                    ):
                        return loc + self.matchLen, self.match
                    else:
                        # followed by keyword char
                        errmsg += (
                            ", keyword was immediately followed by keyword character"
                        )
                        errloc = loc + self.matchLen
                else:
                    # preceded by keyword char
                    errmsg += ", keyword was immediately preceded by keyword character"
                    errloc = loc - 1
            # else no match just raise plain exception

        raise ParseException(instring, errloc, errmsg, self)

    @staticmethod
    def set_default_keyword_chars(chars) -> None:
        """
        Overrides the default characters used by :class:`Keyword` expressions.
        """
        Keyword.DEFAULT_KEYWORD_CHARS = chars

    setDefaultKeywordChars = set_default_keyword_chars


class CaselessLiteral(Literal):
    """
    Token to match a specified string, ignoring case of letters.
    Note: the matched results will always be in the case of the given
    match string, NOT the case of the input text.

    Example::

        CaselessLiteral("CMD")[1, ...].parse_string("cmd CMD Cmd10")
        # -> ['CMD', 'CMD', 'CMD']

    (Contrast with example for :class:`CaselessKeyword`.)
    """

    def __init__(self, match_string: str = "", *, matchString: str = ""):
        match_string = matchString or match_string
        super().__init__(match_string.upper())
        # Preserve the defining literal.
        self.returnString = match_string
        self.errmsg = "Expected " + self.name

    def parseImpl(self, instring, loc, doActions=True):
        if instring[loc : loc + self.matchLen].upper() == self.match:
            return loc + self.matchLen, self.returnString
        raise ParseException(instring, loc, self.errmsg, self)


class CaselessKeyword(Keyword):
    """
    Caseless version of :class:`Keyword`.

    Example::

        CaselessKeyword("CMD")[1, ...].parse_string("cmd CMD Cmd10")
        # -> ['CMD', 'CMD']

    (Contrast with example for :class:`CaselessLiteral`.)
    """

    def __init__(
        self,
        match_string: str = "",
        ident_chars: typing.Optional[str] = None,
        *,
        matchString: str = "",
        identChars: typing.Optional[str] = None,
    ):
        identChars = identChars or ident_chars
        match_string = matchString or match_string
        super().__init__(match_string, identChars, caseless=True)


class CloseMatch(Token):
    """A variation on :class:`Literal` which matches "close" matches,
    that is, strings with at most 'n' mismatching characters.
    :class:`CloseMatch` takes parameters:

    - ``match_string`` - string to be matched
    - ``caseless`` - a boolean indicating whether to ignore casing when comparing characters
    - ``max_mismatches`` - (``default=1``) maximum number of
      mismatches allowed to count as a match

    The results from a successful parse will contain the matched text
    from the input string and the following named results:

    - ``mismatches`` - a list of the positions within the
      match_string where mismatches were found
    - ``original`` - the original match_string used to compare
      against the input string

    If ``mismatches`` is an empty list, then the match was an exact
    match.

    Example::

        patt = CloseMatch("ATCATCGAATGGA")
        patt.parse_string("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']})
        patt.parse_string("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1)

        # exact match
        patt.parse_string("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']})

        # close match allowing up to 2 mismatches
        patt = CloseMatch("ATCATCGAATGGA", max_mismatches=2)
        patt.parse_string("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']})
    """

    def __init__(
        self,
        match_string: str,
        max_mismatches: typing.Optional[int] = None,
        *,
        maxMismatches: int = 1,
        caseless=False,
    ):
        maxMismatches = max_mismatches if max_mismatches is not None else maxMismatches
        super().__init__()
        self.match_string = match_string
        self.maxMismatches = maxMismatches
        self.errmsg = f"Expected {self.match_string!r} (with up to {self.maxMismatches} mismatches)"
        self.caseless = caseless
        self.mayIndexError = False
        self.mayReturnEmpty = False

    def _generateDefaultName(self) -> str:
        return f"{type(self).__name__}:{self.match_string!r}"

    def parseImpl(self, instring, loc, doActions=True):
        start = loc
        instrlen = len(instring)
        maxloc = start + len(self.match_string)

        if maxloc <= instrlen:
            match_string = self.match_string
            match_stringloc = 0
            mismatches = []
            maxMismatches = self.maxMismatches

            for match_stringloc, s_m in enumerate(
                zip(instring[loc:maxloc], match_string)
            ):
                src, mat = s_m
                if self.caseless:
                    src, mat = src.lower(), mat.lower()

                if src != mat:
                    mismatches.append(match_stringloc)
                    if len(mismatches) > maxMismatches:
                        break
            else:
                loc = start + match_stringloc + 1
                results = ParseResults([instring[start:loc]])
                results["original"] = match_string
                results["mismatches"] = mismatches
                return loc, results

        raise ParseException(instring, loc, self.errmsg, self)


class Word(Token):
    """Token for matching words composed of allowed character sets.

    Parameters:

    - ``init_chars`` - string of all characters that should be used to
      match as a word; "ABC" will match "AAA", "ABAB", "CBAC", etc.;
      if ``body_chars`` is also specified, then this is the string of
      initial characters
    - ``body_chars`` - string of characters that
      can be used for matching after a matched initial character as
      given in ``init_chars``; if omitted, same as the initial characters
      (default=``None``)
    - ``min`` - minimum number of characters to match (default=1)
    - ``max`` - maximum number of characters to match (default=0)
    - ``exact`` - exact number of characters to match (default=0)
    - ``as_keyword`` - match as a keyword (default=``False``)
    - ``exclude_chars`` - characters that might be
      found in the input ``body_chars`` string but which should not be
      accepted for matching ;useful to define a word of all
      printables except for one or two characters, for instance
      (default=``None``)

    :class:`srange` is useful for defining custom character set strings
    for defining :class:`Word` expressions, using range notation from
    regular expression character sets.

    A common mistake is to use :class:`Word` to match a specific literal
    string, as in ``Word("Address")``. Remember that :class:`Word`
    uses the string argument to define *sets* of matchable characters.
    This expression would match "Add", "AAA", "dAred", or any other word
    made up of the characters 'A', 'd', 'r', 'e', and 's'. To match an
    exact literal string, use :class:`Literal` or :class:`Keyword`.

    pyparsing includes helper strings for building Words:

    - :class:`alphas`
    - :class:`nums`
    - :class:`alphanums`
    - :class:`hexnums`
    - :class:`alphas8bit` (alphabetic characters in ASCII range 128-255
      - accented, tilded, umlauted, etc.)
    - :class:`punc8bit` (non-alphabetic characters in ASCII range
      128-255 - currency, symbols, superscripts, diacriticals, etc.)
    - :class:`printables` (any non-whitespace character)

    ``alphas``, ``nums``, and ``printables`` are also defined in several
    Unicode sets - see :class:`pyparsing_unicode``.

    Example::

        # a word composed of digits
        integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9"))

        # a word with a leading capital, and zero or more lowercase
        capital_word = Word(alphas.upper(), alphas.lower())

        # hostnames are alphanumeric, with leading alpha, and '-'
        hostname = Word(alphas, alphanums + '-')

        # roman numeral (not a strict parser, accepts invalid mix of characters)
        roman = Word("IVXLCDM")

        # any string of non-whitespace characters, except for ','
        csv_value = Word(printables, exclude_chars=",")
    """

    def __init__(
        self,
        init_chars: str = "",
        body_chars: typing.Optional[str] = None,
        min: int = 1,
        max: int = 0,
        exact: int = 0,
        as_keyword: bool = False,
        exclude_chars: typing.Optional[str] = None,
        *,
        initChars: typing.Optional[str] = None,
        bodyChars: typing.Optional[str] = None,
        asKeyword: bool = False,
        excludeChars: typing.Optional[str] = None,
    ):
        initChars = initChars or init_chars
        bodyChars = bodyChars or body_chars
        asKeyword = asKeyword or as_keyword
        excludeChars = excludeChars or exclude_chars
        super().__init__()
        if not initChars:
            raise ValueError(
                f"invalid {type(self).__name__}, initChars cannot be empty string"
            )

        initChars_set = set(initChars)
        if excludeChars:
            excludeChars_set = set(excludeChars)
            initChars_set -= excludeChars_set
            if bodyChars:
                bodyChars = "".join(set(bodyChars) - excludeChars_set)
        self.initChars = initChars_set
        self.initCharsOrig = "".join(sorted(initChars_set))

        if bodyChars:
            self.bodyChars = set(bodyChars)
            self.bodyCharsOrig = "".join(sorted(bodyChars))
        else:
            self.bodyChars = initChars_set
            self.bodyCharsOrig = self.initCharsOrig

        self.maxSpecified = max > 0

        if min < 1:
            raise ValueError(
                "cannot specify a minimum length < 1; use Opt(Word()) if zero-length word is permitted"
            )

        if self.maxSpecified and min > max:
            raise ValueError(
                f"invalid args, if min and max both specified min must be <= max (min={min}, max={max})"
            )

        self.minLen = min

        if max > 0:
            self.maxLen = max
        else:
            self.maxLen = _MAX_INT

        if exact > 0:
            min = max = exact
            self.maxLen = exact
            self.minLen = exact

        self.errmsg = "Expected " + self.name
        self.mayIndexError = False
        self.asKeyword = asKeyword
        if self.asKeyword:
            self.errmsg += " as a keyword"

        # see if we can make a regex for this Word
        if " " not in (self.initChars | self.bodyChars):
            if len(self.initChars) == 1:
                re_leading_fragment = re.escape(self.initCharsOrig)
            else:
                re_leading_fragment = f"[{_collapse_string_to_ranges(self.initChars)}]"

            if self.bodyChars == self.initChars:
                if max == 0:
                    repeat = "+"
                elif max == 1:
                    repeat = ""
                else:
                    if self.minLen != self.maxLen:
                        repeat = f"{{{self.minLen},{'' if self.maxLen == _MAX_INT else self.maxLen}}}"
                    else:
                        repeat = f"{{{self.minLen}}}"
                self.reString = f"{re_leading_fragment}{repeat}"
            else:
                if max == 1:
                    re_body_fragment = ""
                    repeat = ""
                else:
                    re_body_fragment = f"[{_collapse_string_to_ranges(self.bodyChars)}]"
                    if max == 0:
                        repeat = "*"
                    elif max == 2:
                        repeat = "?" if min <= 1 else ""
                    else:
                        if min != max:
                            repeat = f"{{{min - 1 if min > 0 else 0},{max - 1}}}"
                        else:
                            repeat = f"{{{min - 1 if min > 0 else 0}}}"

                self.reString = (
                    f"{re_leading_fragment}" f"{re_body_fragment}" f"{repeat}"
                )

            if self.asKeyword:
                self.reString = rf"\b{self.reString}\b"

            try:
                self.re = re.compile(self.reString)
            except re.error:
                self.re = None  # type: ignore[assignment]
            else:
                self.re_match = self.re.match
                self.parseImpl = self.parseImpl_regex  # type: ignore[assignment]

    def _generateDefaultName(self) -> str:
        def charsAsStr(s):
            max_repr_len = 16
            s = _collapse_string_to_ranges(s, re_escape=False)
            if len(s) > max_repr_len:
                return s[: max_repr_len - 3] + "..."
            else:
                return s

        if self.initChars != self.bodyChars:
            base = f"W:({charsAsStr(self.initChars)}, {charsAsStr(self.bodyChars)})"
        else:
            base = f"W:({charsAsStr(self.initChars)})"

        # add length specification
        if self.minLen > 1 or self.maxLen != _MAX_INT:
            if self.minLen == self.maxLen:
                if self.minLen == 1:
                    return base[2:]
                else:
                    return base + f"{{{self.minLen}}}"
            elif self.maxLen == _MAX_INT:
                return base + f"{{{self.minLen},...}}"
            else:
                return base + f"{{{self.minLen},{self.maxLen}}}"
        return base

    def parseImpl(self, instring, loc, doActions=True):
        if instring[loc] not in self.initChars:
            raise ParseException(instring, loc, self.errmsg, self)

        start = loc
        loc += 1
        instrlen = len(instring)
        bodychars = self.bodyChars
        maxloc = start + self.maxLen
        maxloc = min(maxloc, instrlen)
        while loc < maxloc and instring[loc] in bodychars:
            loc += 1

        throwException = False
        if loc - start < self.minLen:
            throwException = True
        elif self.maxSpecified and loc < instrlen and instring[loc] in bodychars:
            throwException = True
        elif self.asKeyword:
            if (
                start > 0
                and instring[start - 1] in bodychars
                or loc < instrlen
                and instring[loc] in bodychars
            ):
                throwException = True

        if throwException:
            raise ParseException(instring, loc, self.errmsg, self)

        return loc, instring[start:loc]

    def parseImpl_regex(self, instring, loc, doActions=True):
        result = self.re_match(instring, loc)
        if not result:
            raise ParseException(instring, loc, self.errmsg, self)

        loc = result.end()
        return loc, result.group()


class Char(Word):
    """A short-cut class for defining :class:`Word` ``(characters, exact=1)``,
    when defining a match of any single character in a string of
    characters.
    """

    def __init__(
        self,
        charset: str,
        as_keyword: bool = False,
        exclude_chars: typing.Optional[str] = None,
        *,
        asKeyword: bool = False,
        excludeChars: typing.Optional[str] = None,
    ):
        asKeyword = asKeyword or as_keyword
        excludeChars = excludeChars or exclude_chars
        super().__init__(
            charset, exact=1, as_keyword=asKeyword, exclude_chars=excludeChars
        )


class Regex(Token):
    r"""Token for matching strings that match a given regular
    expression. Defined with string specifying the regular expression in
    a form recognized by the stdlib Python  `re module <https://docs.python.org/3/library/re.html>`_.
    If the given regex contains named groups (defined using ``(?P<name>...)``),
    these will be preserved as named :class:`ParseResults`.

    If instead of the Python stdlib ``re`` module you wish to use a different RE module
    (such as the ``regex`` module), you can do so by building your ``Regex`` object with
    a compiled RE that was compiled using ``regex``.

    Example::

        realnum = Regex(r"[+-]?\d+\.\d*")
        # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression
        roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})")

        # named fields in a regex will be returned as named results
        date = Regex(r'(?P<year>\d{4})-(?P<month>\d\d?)-(?P<day>\d\d?)')

        # the Regex class will accept re's compiled using the regex module
        import regex
        parser = pp.Regex(regex.compile(r'[0-9]'))
    """

    def __init__(
        self,
        pattern: Any,
        flags: Union[re.RegexFlag, int] = 0,
        as_group_list: bool = False,
        as_match: bool = False,
        *,
        asGroupList: bool = False,
        asMatch: bool = False,
    ):
        """The parameters ``pattern`` and ``flags`` are passed
        to the ``re.compile()`` function as-is. See the Python
        `re module <https://docs.python.org/3/library/re.html>`_ module for an
        explanation of the acceptable patterns and flags.
        """
        super().__init__()
        asGroupList = asGroupList or as_group_list
        asMatch = asMatch or as_match

        if isinstance(pattern, str_type):
            if not pattern:
                raise ValueError("null string passed to Regex; use Empty() instead")

            self._re = None
            self.reString = self.pattern = pattern
            self.flags = flags

        elif hasattr(pattern, "pattern") and hasattr(pattern, "match"):
            self._re = pattern
            self.pattern = self.reString = pattern.pattern
            self.flags = flags

        else:
            raise TypeError(
                "Regex may only be constructed with a string or a compiled RE object"
            )

        self.errmsg = "Expected " + self.name
        self.mayIndexError = False
        self.asGroupList = asGroupList
        self.asMatch = asMatch
        if self.asGroupList:
            self.parseImpl = self.parseImplAsGroupList  # type: ignore [assignment]
        if self.asMatch:
            self.parseImpl = self.parseImplAsMatch  # type: ignore [assignment]

    @cached_property
    def re(self):
        if self._re:
            return self._re
        else:
            try:
                return re.compile(self.pattern, self.flags)
            except re.error:
                raise ValueError(f"invalid pattern ({self.pattern!r}) passed to Regex")

    @cached_property
    def re_match(self):
        return self.re.match

    @cached_property
    def mayReturnEmpty(self):
        return self.re_match("") is not None

    def _generateDefaultName(self) -> str:
        return "Re:({})".format(repr(self.pattern).replace("\\\\", "\\"))

    def parseImpl(self, instring, loc, doActions=True):
        result = self.re_match(instring, loc)
        if not result:
            raise ParseException(instring, loc, self.errmsg, self)

        loc = result.end()
        ret = ParseResults(result.group())
        d = result.groupdict()
        if d:
            for k, v in d.items():
                ret[k] = v
        return loc, ret

    def parseImplAsGroupList(self, instring, loc, doActions=True):
        result = self.re_match(instring, loc)
        if not result:
            raise ParseException(instring, loc, self.errmsg, self)

        loc = result.end()
        ret = result.groups()
        return loc, ret

    def parseImplAsMatch(self, instring, loc, doActions=True):
        result = self.re_match(instring, loc)
        if not result:
            raise ParseException(instring, loc, self.errmsg, self)

        loc = result.end()
        ret = result
        return loc, ret

    def sub(self, repl: str) -> ParserElement:
        r"""
        Return :class:`Regex` with an attached parse action to transform the parsed
        result as if called using `re.sub(expr, repl, string) <https://docs.python.org/3/library/re.html#re.sub>`_.

        Example::

            make_html = Regex(r"(\w+):(.*?):").sub(r"<\1>\2</\1>")
            print(make_html.transform_string("h1:main title:"))
            # prints "<h1>main title</h1>"
        """
        if self.asGroupList:
            raise TypeError("cannot use sub() with Regex(as_group_list=True)")

        if self.asMatch and callable(repl):
            raise TypeError(
                "cannot use sub() with a callable with Regex(as_match=True)"
            )

        if self.asMatch:

            def pa(tokens):
                return tokens[0].expand(repl)

        else:

            def pa(tokens):
                return self.re.sub(repl, tokens[0])

        return self.add_parse_action(pa)


class QuotedString(Token):
    r"""
    Token for matching strings that are delimited by quoting characters.

    Defined with the following parameters:

    - ``quote_char`` - string of one or more characters defining the
      quote delimiting string
    - ``esc_char`` - character to re_escape quotes, typically backslash
      (default= ``None``)
    - ``esc_quote`` - special quote sequence to re_escape an embedded quote
      string (such as SQL's ``""`` to re_escape an embedded ``"``)
      (default= ``None``)
    - ``multiline`` - boolean indicating whether quotes can span
      multiple lines (default= ``False``)
    - ``unquote_results`` - boolean indicating whether the matched text
      should be unquoted (default= ``True``)
    - ``end_quote_char`` - string of one or more characters defining the
      end of the quote delimited string (default= ``None``  => same as
      quote_char)
    - ``convert_whitespace_escapes`` - convert escaped whitespace
      (``'\t'``, ``'\n'``, etc.) to actual whitespace
      (default= ``True``)

    Example::

        qs = QuotedString('"')
        print(qs.search_string('lsjdf "This is the quote" sldjf'))
        complex_qs = QuotedString('{{', end_quote_char='}}')
        print(complex_qs.search_string('lsjdf {{This is the "quote"}} sldjf'))
        sql_qs = QuotedString('"', esc_quote='""')
        print(sql_qs.search_string('lsjdf "This is the quote with ""embedded"" quotes" sldjf'))

    prints::

        [['This is the quote']]
        [['This is the "quote"']]
        [['This is the quote with "embedded" quotes']]
    """
    ws_map = dict(((r"\t", "\t"), (r"\n", "\n"), (r"\f", "\f"), (r"\r", "\r")))

    def __init__(
        self,
        quote_char: str = "",
        esc_char: typing.Optional[str] = None,
        esc_quote: typing.Optional[str] = None,
        multiline: bool = False,
        unquote_results: bool = True,
        end_quote_char: typing.Optional[str] = None,
        convert_whitespace_escapes: bool = True,
        *,
        quoteChar: str = "",
        escChar: typing.Optional[str] = None,
        escQuote: typing.Optional[str] = None,
        unquoteResults: bool = True,
        endQuoteChar: typing.Optional[str] = None,
        convertWhitespaceEscapes: bool = True,
    ):
        super().__init__()
        escChar = escChar or esc_char
        escQuote = escQuote or esc_quote
        unquoteResults = unquoteResults and unquote_results
        endQuoteChar = endQuoteChar or end_quote_char
        convertWhitespaceEscapes = (
            convertWhitespaceEscapes and convert_whitespace_escapes
        )
        quote_char = quoteChar or quote_char

        # remove white space from quote chars - wont work anyway
        quote_char = quote_char.strip()
        if not quote_char:
            raise ValueError("quote_char cannot be the empty string")

        if endQuoteChar is None:
            endQuoteChar = quote_char
        else:
            endQuoteChar = endQuoteChar.strip()
            if not endQuoteChar:
                raise ValueError("end_quote_char cannot be the empty string")

        self.quoteChar: str = quote_char
        self.quoteCharLen: int = len(quote_char)
        self.firstQuoteChar: str = quote_char[0]
        self.endQuoteChar: str = endQuoteChar
        self.endQuoteCharLen: int = len(endQuoteChar)
        self.escChar: str = escChar or ""
        self.escQuote: str = escQuote or ""
        self.unquoteResults: bool = unquoteResults
        self.convertWhitespaceEscapes: bool = convertWhitespaceEscapes
        self.multiline = multiline

        sep = ""
        inner_pattern = ""

        if escQuote:
            inner_pattern += rf"{sep}(?:{re.escape(escQuote)})"
            sep = "|"

        if escChar:
            inner_pattern += rf"{sep}(?:{re.escape(escChar)}.)"
            sep = "|"
            self.escCharReplacePattern = re.escape(escChar) + "(.)"

        if len(self.endQuoteChar) > 1:
            inner_pattern += (
                f"{sep}(?:"
                + "|".join(
                    f"(?:{re.escape(self.endQuoteChar[:i])}(?!{re.escape(self.endQuoteChar[i:])}))"
                    for i in range(len(self.endQuoteChar) - 1, 0, -1)
                )
                + ")"
            )
            sep = "|"

        self.flags = re.RegexFlag(0)

        if multiline:
            self.flags = re.MULTILINE | re.DOTALL
            inner_pattern += (
                rf"{sep}(?:[^{_escape_regex_range_chars(self.endQuoteChar[0])}"
                rf"{(_escape_regex_range_chars(escChar) if escChar is not None else '')}])"
            )
        else:
            inner_pattern += (
                rf"{sep}(?:[^{_escape_regex_range_chars(self.endQuoteChar[0])}\n\r"
                rf"{(_escape_regex_range_chars(escChar) if escChar is not None else '')}])"
            )

        self.pattern = "".join(
            [
                re.escape(self.quoteChar),
                "(?:",
                inner_pattern,
                ")*",
                re.escape(self.endQuoteChar),
            ]
        )

        if self.unquoteResults:
            if self.convertWhitespaceEscapes:
                self.unquote_scan_re = re.compile(
                    rf"({'|'.join(re.escape(k) for k in self.ws_map)})|({re.escape(self.escChar)}.)|(\n|.)",
                    flags=self.flags,
                )
            else:
                self.unquote_scan_re = re.compile(
                    rf"({re.escape(self.escChar)}.)|(\n|.)", flags=self.flags
                )

        try:
            self.re = re.compile(self.pattern, self.flags)
            self.reString = self.pattern
            self.re_match = self.re.match
        except re.error:
            raise ValueError(f"invalid pattern {self.pattern!r} passed to Regex")

        self.errmsg = "Expected " + self.name
        self.mayIndexError = False
        self.mayReturnEmpty = True

    def _generateDefaultName(self) -> str:
        if self.quoteChar == self.endQuoteChar and isinstance(self.quoteChar, str_type):
            return f"string enclosed in {self.quoteChar!r}"

        return f"quoted string, starting with {self.quoteChar} ending with {self.endQuoteChar}"

    def parseImpl(self, instring, loc, doActions=True):
        result = (
            instring[loc] == self.firstQuoteChar
            and self.re_match(instring, loc)
            or None
        )
        if not result:
            raise ParseException(instring, loc, self.errmsg, self)

        loc = result.end()
        ret = result.group()

        if self.unquoteResults:
            # strip off quotes
            ret = ret[self.quoteCharLen : -self.endQuoteCharLen]

            if isinstance(ret, str_type):
                if self.convertWhitespaceEscapes:
                    ret = "".join(
                        self.ws_map[match.group(1)]
                        if match.group(1)
                        else match.group(2)[-1]
                        if match.group(2)
                        else match.group(3)
                        for match in self.unquote_scan_re.finditer(ret)
                    )
                else:
                    ret = "".join(
                        match.group(1)[-1] if match.group(1) else match.group(2)
                        for match in self.unquote_scan_re.finditer(ret)
                    )

                # replace escaped quotes
                if self.escQuote:
                    ret = ret.replace(self.escQuote, self.endQuoteChar)

        return loc, ret


class CharsNotIn(Token):
    """Token for matching words composed of characters *not* in a given
    set (will include whitespace in matched characters if not listed in
    the provided exclusion set - see example). Defined with string
    containing all disallowed characters, and an optional minimum,
    maximum, and/or exact length.  The default value for ``min`` is
    1 (a minimum value < 1 is not valid); the default values for
    ``max`` and ``exact`` are 0, meaning no maximum or exact
    length restriction.

    Example::

        # define a comma-separated-value as anything that is not a ','
        csv_value = CharsNotIn(',')
        print(DelimitedList(csv_value).parse_string("dkls,lsdkjf,s12 34,@!#,213"))

    prints::

        ['dkls', 'lsdkjf', 's12 34', '@!#', '213']
    """

    def __init__(
        self,
        not_chars: str = "",
        min: int = 1,
        max: int = 0,
        exact: int = 0,
        *,
        notChars: str = "",
    ):
        super().__init__()
        self.skipWhitespace = False
        self.notChars = not_chars or notChars
        self.notCharsSet = set(self.notChars)

        if min < 1:
            raise ValueError(
                "cannot specify a minimum length < 1; use "
                "Opt(CharsNotIn()) if zero-length char group is permitted"
            )

        self.minLen = min

        if max > 0:
            self.maxLen = max
        else:
            self.maxLen = _MAX_INT

        if exact > 0:
            self.maxLen = exact
            self.minLen = exact

        self.errmsg = "Expected " + self.name
        self.mayReturnEmpty = self.minLen == 0
        self.mayIndexError = False

    def _generateDefaultName(self) -> str:
        not_chars_str = _collapse_string_to_ranges(self.notChars)
        if len(not_chars_str) > 16:
            return f"!W:({self.notChars[: 16 - 3]}...)"
        else:
            return f"!W:({self.notChars})"

    def parseImpl(self, instring, loc, doActions=True):
        notchars = self.notCharsSet
        if instring[loc] in notchars:
            raise ParseException(instring, loc, self.errmsg, self)

        start = loc
        loc += 1
        maxlen = min(start + self.maxLen, len(instring))
        while loc < maxlen and instring[loc] not in notchars:
            loc += 1

        if loc - start < self.minLen:
            raise ParseException(instring, loc, self.errmsg, self)

        return loc, instring[start:loc]


class White(Token):
    """Special matching class for matching whitespace.  Normally,
    whitespace is ignored by pyparsing grammars.  This class is included
    when some whitespace structures are significant.  Define with
    a string containing the whitespace characters to be matched; default
    is ``" \\t\\r\\n"``.  Also takes optional ``min``,
    ``max``, and ``exact`` arguments, as defined for the
    :class:`Word` class.
    """

    whiteStrs = {
        " ": "<SP>",
        "\t": "<TAB>",
        "\n": "<LF>",
        "\r": "<CR>",
        "\f": "<FF>",
        "\u00A0": "<NBSP>",
        "\u1680": "<OGHAM_SPACE_MARK>",
        "\u180E": "<MONGOLIAN_VOWEL_SEPARATOR>",
        "\u2000": "<EN_QUAD>",
        "\u2001": "<EM_QUAD>",
        "\u2002": "<EN_SPACE>",
        "\u2003": "<EM_SPACE>",
        "\u2004": "<THREE-PER-EM_SPACE>",
        "\u2005": "<FOUR-PER-EM_SPACE>",
        "\u2006": "<SIX-PER-EM_SPACE>",
        "\u2007": "<FIGURE_SPACE>",
        "\u2008": "<PUNCTUATION_SPACE>",
        "\u2009": "<THIN_SPACE>",
        "\u200A": "<HAIR_SPACE>",
        "\u200B": "<ZERO_WIDTH_SPACE>",
        "\u202F": "<NNBSP>",
        "\u205F": "<MMSP>",
        "\u3000": "<IDEOGRAPHIC_SPACE>",
    }

    def __init__(self, ws: str = " \t\r\n", min: int = 1, max: int = 0, exact: int = 0):
        super().__init__()
        self.matchWhite = ws
        self.set_whitespace_chars(
            "".join(c for c in self.whiteStrs if c not in self.matchWhite),
            copy_defaults=True,
        )
        # self.leave_whitespace()
        self.mayReturnEmpty = True
        self.errmsg = "Expected " + self.name

        self.minLen = min

        if max > 0:
            self.maxLen = max
        else:
            self.maxLen = _MAX_INT

        if exact > 0:
            self.maxLen = exact
            self.minLen = exact

    def _generateDefaultName(self) -> str:
        return "".join(White.whiteStrs[c] for c in self.matchWhite)

    def parseImpl(self, instring, loc, doActions=True):
        if instring[loc] not in self.matchWhite:
            raise ParseException(instring, loc, self.errmsg, self)
        start = loc
        loc += 1
        maxloc = start + self.maxLen
        maxloc = min(maxloc, len(instring))
        while loc < maxloc and instring[loc] in self.matchWhite:
            loc += 1

        if loc - start < self.minLen:
            raise ParseException(instring, loc, self.errmsg, self)

        return loc, instring[start:loc]


class PositionToken(Token):
    def __init__(self):
        super().__init__()
        self.mayReturnEmpty = True
        self.mayIndexError = False


class GoToColumn(PositionToken):
    """Token to advance to a specific column of input text; useful for
    tabular report scraping.
    """

    def __init__(self, colno: int):
        super().__init__()
        self.col = colno

    def preParse(self, instring: str, loc: int) -> int:
        if col(loc, instring) != self.col:
            instrlen = len(instring)
            if self.ignoreExprs:
                loc = self._skipIgnorables(instring, loc)
            while (
                loc < instrlen
                and instring[loc].isspace()
                and col(loc, instring) != self.col
            ):
                loc += 1
        return loc

    def parseImpl(self, instring, loc, doActions=True):
        thiscol = col(loc, instring)
        if thiscol > self.col:
            raise ParseException(instring, loc, "Text not in expected column", self)
        newloc = loc + self.col - thiscol
        ret = instring[loc:newloc]
        return newloc, ret


class LineStart(PositionToken):
    r"""Matches if current position is at the beginning of a line within
    the parse string

    Example::

        test = '''\
        AAA this line
        AAA and this line
          AAA but not this one
        B AAA and definitely not this one
        '''

        for t in (LineStart() + 'AAA' + rest_of_line).search_string(test):
            print(t)

    prints::

        ['AAA', ' this line']
        ['AAA', ' and this line']

    """

    def __init__(self):
        super().__init__()
        self.leave_whitespace()
        self.orig_whiteChars = set() | self.whiteChars
        self.whiteChars.discard("\n")
        self.skipper = Empty().set_whitespace_chars(self.whiteChars)
        self.errmsg = "Expected start of line"

    def preParse(self, instring: str, loc: int) -> int:
        if loc == 0:
            return loc
        else:
            ret = self.skipper.preParse(instring, loc)
            if "\n" in self.orig_whiteChars:
                while instring[ret : ret + 1] == "\n":
                    ret = self.skipper.preParse(instring, ret + 1)
            return ret

    def parseImpl(self, instring, loc, doActions=True):
        if col(loc, instring) == 1:
            return loc, []
        raise ParseException(instring, loc, self.errmsg, self)


class LineEnd(PositionToken):
    """Matches if current position is at the end of a line within the
    parse string
    """

    def __init__(self):
        super().__init__()
        self.whiteChars.discard("\n")
        self.set_whitespace_chars(self.whiteChars, copy_defaults=False)
        self.errmsg = "Expected end of line"

    def parseImpl(self, instring, loc, doActions=True):
        if loc < len(instring):
            if instring[loc] == "\n":
                return loc + 1, "\n"
            else:
                raise ParseException(instring, loc, self.errmsg, self)
        elif loc == len(instring):
            return loc + 1, []
        else:
            raise ParseException(instring, loc, self.errmsg, self)


class StringStart(PositionToken):
    """Matches if current position is at the beginning of the parse
    string
    """

    def __init__(self):
        super().__init__()
        self.errmsg = "Expected start of text"

    def parseImpl(self, instring, loc, doActions=True):
        if loc != 0:
            # see if entire string up to here is just whitespace and ignoreables
            if loc != self.preParse(instring, 0):
                raise ParseException(instring, loc, self.errmsg, self)
        return loc, []


class StringEnd(PositionToken):
    """
    Matches if current position is at the end of the parse string
    """

    def __init__(self):
        super().__init__()
        self.errmsg = "Expected end of text"

    def parseImpl(self, instring, loc, doActions=True):
        if loc < len(instring):
            raise ParseException(instring, loc, self.errmsg, self)
        elif loc == len(instring):
            return loc + 1, []
        elif loc > len(instring):
            return loc, []
        else:
            raise ParseException(instring, loc, self.errmsg, self)


class WordStart(PositionToken):
    """Matches if the current position is at the beginning of a
    :class:`Word`, and is not preceded by any character in a given
    set of ``word_chars`` (default= ``printables``). To emulate the
    ``\b`` behavior of regular expressions, use
    ``WordStart(alphanums)``. ``WordStart`` will also match at
    the beginning of the string being parsed, or at the beginning of
    a line.
    """

    def __init__(self, word_chars: str = printables, *, wordChars: str = printables):
        wordChars = word_chars if wordChars == printables else wordChars
        super().__init__()
        self.wordChars = set(wordChars)
        self.errmsg = "Not at the start of a word"

    def parseImpl(self, instring, loc, doActions=True):
        if loc != 0:
            if (
                instring[loc - 1] in self.wordChars
                or instring[loc] not in self.wordChars
            ):
                raise ParseException(instring, loc, self.errmsg, self)
        return loc, []


class WordEnd(PositionToken):
    """Matches if the current position is at the end of a :class:`Word`,
    and is not followed by any character in a given set of ``word_chars``
    (default= ``printables``). To emulate the ``\b`` behavior of
    regular expressions, use ``WordEnd(alphanums)``. ``WordEnd``
    will also match at the end of the string being parsed, or at the end
    of a line.
    """

    def __init__(self, word_chars: str = printables, *, wordChars: str = printables):
        wordChars = word_chars if wordChars == printables else wordChars
        super().__init__()
        self.wordChars = set(wordChars)
        self.skipWhitespace = False
        self.errmsg = "Not at the end of a word"

    def parseImpl(self, instring, loc, doActions=True):
        instrlen = len(instring)
        if instrlen > 0 and loc < instrlen:
            if (
                instring[loc] in self.wordChars
                or instring[loc - 1] not in self.wordChars
            ):
                raise ParseException(instring, loc, self.errmsg, self)
        return loc, []


class ParseExpression(ParserElement):
    """Abstract subclass of ParserElement, for combining and
    post-processing parsed tokens.
    """

    def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False):
        super().__init__(savelist)
        self.exprs: List[ParserElement]
        if isinstance(exprs, _generatorType):
            exprs = list(exprs)

        if isinstance(exprs, str_type):
            self.exprs = [self._literalStringClass(exprs)]
        elif isinstance(exprs, ParserElement):
            self.exprs = [exprs]
        elif isinstance(exprs, Iterable):
            exprs = list(exprs)
            # if sequence of strings provided, wrap with Literal
            if any(isinstance(expr, str_type) for expr in exprs):
                exprs = (
                    self._literalStringClass(e) if isinstance(e, str_type) else e
                    for e in exprs
                )
            self.exprs = list(exprs)
        else:
            try:
                self.exprs = list(exprs)
            except TypeError:
                self.exprs = [exprs]
        self.callPreparse = False

    def recurse(self) -> List[ParserElement]:
        return self.exprs[:]

    def append(self, other) -> ParserElement:
        self.exprs.append(other)
        self._defaultName = None
        return self

    def leave_whitespace(self, recursive: bool = True) -> ParserElement:
        """
        Extends ``leave_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on
           all contained expressions.
        """
        super().leave_whitespace(recursive)

        if recursive:
            self.exprs = [e.copy() for e in self.exprs]
            for e in self.exprs:
                e.leave_whitespace(recursive)
        return self

    def ignore_whitespace(self, recursive: bool = True) -> ParserElement:
        """
        Extends ``ignore_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on
           all contained expressions.
        """
        super().ignore_whitespace(recursive)
        if recursive:
            self.exprs = [e.copy() for e in self.exprs]
            for e in self.exprs:
                e.ignore_whitespace(recursive)
        return self

    def ignore(self, other) -> ParserElement:
        if isinstance(other, Suppress):
            if other not in self.ignoreExprs:
                super().ignore(other)
                for e in self.exprs:
                    e.ignore(self.ignoreExprs[-1])
        else:
            super().ignore(other)
            for e in self.exprs:
                e.ignore(self.ignoreExprs[-1])
        return self

    def _generateDefaultName(self) -> str:
        return f"{self.__class__.__name__}:({str(self.exprs)})"

    def streamline(self) -> ParserElement:
        if self.streamlined:
            return self

        super().streamline()

        for e in self.exprs:
            e.streamline()

        # collapse nested :class:`And`'s of the form ``And(And(And(a, b), c), d)`` to ``And(a, b, c, d)``
        # but only if there are no parse actions or resultsNames on the nested And's
        # (likewise for :class:`Or`'s and :class:`MatchFirst`'s)
        if len(self.exprs) == 2:
            other = self.exprs[0]
            if (
                isinstance(other, self.__class__)
                and not other.parseAction
                and other.resultsName is None
                and not other.debug
            ):
                self.exprs = other.exprs[:] + [self.exprs[1]]
                self._defaultName = None
                self.mayReturnEmpty |= other.mayReturnEmpty
                self.mayIndexError |= other.mayIndexError

            other = self.exprs[-1]
            if (
                isinstance(other, self.__class__)
                and not other.parseAction
                and other.resultsName is None
                and not other.debug
            ):
                self.exprs = self.exprs[:-1] + other.exprs[:]
                self._defaultName = None
                self.mayReturnEmpty |= other.mayReturnEmpty
                self.mayIndexError |= other.mayIndexError

        self.errmsg = "Expected " + str(self)

        return self

    def validate(self, validateTrace=None) -> None:
        warnings.warn(
            "ParserElement.validate() is deprecated, and should not be used to check for left recursion",
            DeprecationWarning,
            stacklevel=2,
        )
        tmp = (validateTrace if validateTrace is not None else [])[:] + [self]
        for e in self.exprs:
            e.validate(tmp)
        self._checkRecursion([])

    def copy(self) -> ParserElement:
        ret = super().copy()
        ret = typing.cast(ParseExpression, ret)
        ret.exprs = [e.copy() for e in self.exprs]
        return ret

    def _setResultsName(self, name, listAllMatches=False):
        if (
            __diag__.warn_ungrouped_named_tokens_in_collection
            and Diagnostics.warn_ungrouped_named_tokens_in_collection
            not in self.suppress_warnings_
        ):
            for e in self.exprs:
                if (
                    isinstance(e, ParserElement)
                    and e.resultsName
                    and Diagnostics.warn_ungrouped_named_tokens_in_collection
                    not in e.suppress_warnings_
                ):
                    warnings.warn(
                        "{}: setting results name {!r} on {} expression "
                        "collides with {!r} on contained expression".format(
                            "warn_ungrouped_named_tokens_in_collection",
                            name,
                            type(self).__name__,
                            e.resultsName,
                        ),
                        stacklevel=3,
                    )

        return super()._setResultsName(name, listAllMatches)

    # Compatibility synonyms
    # fmt: off
    @replaced_by_pep8(leave_whitespace)
    def leaveWhitespace(self): ...

    @replaced_by_pep8(ignore_whitespace)
    def ignoreWhitespace(self): ...
    # fmt: on


class And(ParseExpression):
    """
    Requires all given :class:`ParseExpression` s to be found in the given order.
    Expressions may be separated by whitespace.
    May be constructed using the ``'+'`` operator.
    May also be constructed using the ``'-'`` operator, which will
    suppress backtracking.

    Example::

        integer = Word(nums)
        name_expr = Word(alphas)[1, ...]

        expr = And([integer("id"), name_expr("name"), integer("age")])
        # more easily written as:
        expr = integer("id") + name_expr("name") + integer("age")
    """

    class _ErrorStop(Empty):
        def __init__(self, *args, **kwargs):
            super().__init__(*args, **kwargs)
            self.leave_whitespace()

        def _generateDefaultName(self) -> str:
            return "-"

    def __init__(
        self, exprs_arg: typing.Iterable[ParserElement], savelist: bool = True
    ):
        exprs: List[ParserElement] = list(exprs_arg)
        if exprs and Ellipsis in exprs:
            tmp = []
            for i, expr in enumerate(exprs):
                if expr is Ellipsis:
                    if i < len(exprs) - 1:
                        skipto_arg: ParserElement = typing.cast(
                            ParseExpression, (Empty() + exprs[i + 1])
                        ).exprs[-1]
                        tmp.append(SkipTo(skipto_arg)("_skipped*"))
                    else:
                        raise Exception(
                            "cannot construct And with sequence ending in ..."
                        )
                else:
                    tmp.append(expr)
            exprs[:] = tmp
        super().__init__(exprs, savelist)
        if self.exprs:
            self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs)
            if not isinstance(self.exprs[0], White):
                self.set_whitespace_chars(
                    self.exprs[0].whiteChars,
                    copy_defaults=self.exprs[0].copyDefaultWhiteChars,
                )
                self.skipWhitespace = self.exprs[0].skipWhitespace
            else:
                self.skipWhitespace = False
        else:
            self.mayReturnEmpty = True
        self.callPreparse = True

    def streamline(self) -> ParserElement:
        # collapse any _PendingSkip's
        if self.exprs:
            if any(
                isinstance(e, ParseExpression)
                and e.exprs
                and isinstance(e.exprs[-1], _PendingSkip)
                for e in self.exprs[:-1]
            ):
                deleted_expr_marker = NoMatch()
                for i, e in enumerate(self.exprs[:-1]):
                    if e is deleted_expr_marker:
                        continue
                    if (
                        isinstance(e, ParseExpression)
                        and e.exprs
                        and isinstance(e.exprs[-1], _PendingSkip)
                    ):
                        e.exprs[-1] = e.exprs[-1] + self.exprs[i + 1]
                        self.exprs[i + 1] = deleted_expr_marker
                self.exprs = [e for e in self.exprs if e is not deleted_expr_marker]

        super().streamline()

        # link any IndentedBlocks to the prior expression
        prev: ParserElement
        cur: ParserElement
        for prev, cur in zip(self.exprs, self.exprs[1:]):
            # traverse cur or any first embedded expr of cur looking for an IndentedBlock
            # (but watch out for recursive grammar)
            seen = set()
            while True:
                if id(cur) in seen:
                    break
                seen.add(id(cur))
                if isinstance(cur, IndentedBlock):
                    prev.add_parse_action(
                        lambda s, l, t, cur_=cur: setattr(
                            cur_, "parent_anchor", col(l, s)
                        )
                    )
                    break
                subs = cur.recurse()
                next_first = next(iter(subs), None)
                if next_first is None:
                    break
                cur = typing.cast(ParserElement, next_first)

        self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs)
        return self

    def parseImpl(self, instring, loc, doActions=True):
        # pass False as callPreParse arg to _parse for first element, since we already
        # pre-parsed the string as part of our And pre-parsing
        loc, resultlist = self.exprs[0]._parse(
            instring, loc, doActions, callPreParse=False
        )
        errorStop = False
        for e in self.exprs[1:]:
            # if isinstance(e, And._ErrorStop):
            if type(e) is And._ErrorStop:
                errorStop = True
                continue
            if errorStop:
                try:
                    loc, exprtokens = e._parse(instring, loc, doActions)
                except ParseSyntaxException:
                    raise
                except ParseBaseException as pe:
                    pe.__traceback__ = None
                    raise ParseSyntaxException._from_exception(pe)
                except IndexError:
                    raise ParseSyntaxException(
                        instring, len(instring), self.errmsg, self
                    )
            else:
                loc, exprtokens = e._parse(instring, loc, doActions)
            resultlist += exprtokens
        return loc, resultlist

    def __iadd__(self, other):
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return self.append(other)  # And([self, other])

    def _checkRecursion(self, parseElementList):
        subRecCheckList = parseElementList[:] + [self]
        for e in self.exprs:
            e._checkRecursion(subRecCheckList)
            if not e.mayReturnEmpty:
                break

    def _generateDefaultName(self) -> str:
        inner = " ".join(str(e) for e in self.exprs)
        # strip off redundant inner {}'s
        while len(inner) > 1 and inner[0 :: len(inner) - 1] == "{}":
            inner = inner[1:-1]
        return "{" + inner + "}"


class Or(ParseExpression):
    """Requires that at least one :class:`ParseExpression` is found. If
    two expressions match, the expression that matches the longest
    string will be used. May be constructed using the ``'^'``
    operator.

    Example::

        # construct Or using '^' operator

        number = Word(nums) ^ Combine(Word(nums) + '.' + Word(nums))
        print(number.search_string("123 3.1416 789"))

    prints::

        [['123'], ['3.1416'], ['789']]
    """

    def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False):
        super().__init__(exprs, savelist)
        if self.exprs:
            self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs)
            self.skipWhitespace = all(e.skipWhitespace for e in self.exprs)
        else:
            self.mayReturnEmpty = True

    def streamline(self) -> ParserElement:
        super().streamline()
        if self.exprs:
            self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs)
            self.saveAsList = any(e.saveAsList for e in self.exprs)
            self.skipWhitespace = all(
                e.skipWhitespace and not isinstance(e, White) for e in self.exprs
            )
        else:
            self.saveAsList = False
        return self

    def parseImpl(self, instring, loc, doActions=True):
        maxExcLoc = -1
        maxException = None
        matches = []
        fatals = []
        if all(e.callPreparse for e in self.exprs):
            loc = self.preParse(instring, loc)
        for e in self.exprs:
            try:
                loc2 = e.try_parse(instring, loc, raise_fatal=True)
            except ParseFatalException as pfe:
                pfe.__traceback__ = None
                pfe.parser_element = e
                fatals.append(pfe)
                maxException = None
                maxExcLoc = -1
            except ParseException as err:
                if not fatals:
                    err.__traceback__ = None
                    if err.loc > maxExcLoc:
                        maxException = err
                        maxExcLoc = err.loc
            except IndexError:
                if len(instring) > maxExcLoc:
                    maxException = ParseException(
                        instring, len(instring), e.errmsg, self
                    )
                    maxExcLoc = len(instring)
            else:
                # save match among all matches, to retry longest to shortest
                matches.append((loc2, e))

        if matches:
            # re-evaluate all matches in descending order of length of match, in case attached actions
            # might change whether or how much they match of the input.
            matches.sort(key=itemgetter(0), reverse=True)

            if not doActions:
                # no further conditions or parse actions to change the selection of
                # alternative, so the first match will be the best match
                best_expr = matches[0][1]
                return best_expr._parse(instring, loc, doActions)

            longest = -1, None
            for loc1, expr1 in matches:
                if loc1 <= longest[0]:
                    # already have a longer match than this one will deliver, we are done
                    return longest

                try:
                    loc2, toks = expr1._parse(instring, loc, doActions)
                except ParseException as err:
                    err.__traceback__ = None
                    if err.loc > maxExcLoc:
                        maxException = err
                        maxExcLoc = err.loc
                else:
                    if loc2 >= loc1:
                        return loc2, toks
                    # didn't match as much as before
                    elif loc2 > longest[0]:
                        longest = loc2, toks

            if longest != (-1, None):
                return longest

        if fatals:
            if len(fatals) > 1:
                fatals.sort(key=lambda e: -e.loc)
                if fatals[0].loc == fatals[1].loc:
                    fatals.sort(key=lambda e: (-e.loc, -len(str(e.parser_element))))
            max_fatal = fatals[0]
            raise max_fatal

        if maxException is not None:
            # infer from this check that all alternatives failed at the current position
            # so emit this collective error message instead of any single error message
            if maxExcLoc == loc:
                maxException.msg = self.errmsg
            raise maxException
        else:
            raise ParseException(
                instring, loc, "no defined alternatives to match", self
            )

    def __ixor__(self, other):
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return self.append(other)  # Or([self, other])

    def _generateDefaultName(self) -> str:
        return "{" + " ^ ".join(str(e) for e in self.exprs) + "}"

    def _setResultsName(self, name, listAllMatches=False):
        if (
            __diag__.warn_multiple_tokens_in_named_alternation
            and Diagnostics.warn_multiple_tokens_in_named_alternation
            not in self.suppress_warnings_
        ):
            if any(
                isinstance(e, And)
                and Diagnostics.warn_multiple_tokens_in_named_alternation
                not in e.suppress_warnings_
                for e in self.exprs
            ):
                warnings.warn(
                    "{}: setting results name {!r} on {} expression "
                    "will return a list of all parsed tokens in an And alternative, "
                    "in prior versions only the first token was returned; enclose "
                    "contained argument in Group".format(
                        "warn_multiple_tokens_in_named_alternation",
                        name,
                        type(self).__name__,
                    ),
                    stacklevel=3,
                )

        return super()._setResultsName(name, listAllMatches)


class MatchFirst(ParseExpression):
    """Requires that at least one :class:`ParseExpression` is found. If
    more than one expression matches, the first one listed is the one that will
    match. May be constructed using the ``'|'`` operator.

    Example::

        # construct MatchFirst using '|' operator

        # watch the order of expressions to match
        number = Word(nums) | Combine(Word(nums) + '.' + Word(nums))
        print(number.search_string("123 3.1416 789")) #  Fail! -> [['123'], ['3'], ['1416'], ['789']]

        # put more selective expression first
        number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums)
        print(number.search_string("123 3.1416 789")) #  Better -> [['123'], ['3.1416'], ['789']]
    """

    def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False):
        super().__init__(exprs, savelist)
        if self.exprs:
            self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs)
            self.skipWhitespace = all(e.skipWhitespace for e in self.exprs)
        else:
            self.mayReturnEmpty = True

    def streamline(self) -> ParserElement:
        if self.streamlined:
            return self

        super().streamline()
        if self.exprs:
            self.saveAsList = any(e.saveAsList for e in self.exprs)
            self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs)
            self.skipWhitespace = all(
                e.skipWhitespace and not isinstance(e, White) for e in self.exprs
            )
        else:
            self.saveAsList = False
            self.mayReturnEmpty = True
        return self

    def parseImpl(self, instring, loc, doActions=True):
        maxExcLoc = -1
        maxException = None

        for e in self.exprs:
            try:
                return e._parse(
                    instring,
                    loc,
                    doActions,
                )
            except ParseFatalException as pfe:
                pfe.__traceback__ = None
                pfe.parser_element = e
                raise
            except ParseException as err:
                if err.loc > maxExcLoc:
                    maxException = err
                    maxExcLoc = err.loc
            except IndexError:
                if len(instring) > maxExcLoc:
                    maxException = ParseException(
                        instring, len(instring), e.errmsg, self
                    )
                    maxExcLoc = len(instring)

        if maxException is not None:
            # infer from this check that all alternatives failed at the current position
            # so emit this collective error message instead of any individual error message
            if maxExcLoc == loc:
                maxException.msg = self.errmsg
            raise maxException
        else:
            raise ParseException(
                instring, loc, "no defined alternatives to match", self
            )

    def __ior__(self, other):
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return self.append(other)  # MatchFirst([self, other])

    def _generateDefaultName(self) -> str:
        return "{" + " | ".join(str(e) for e in self.exprs) + "}"

    def _setResultsName(self, name, listAllMatches=False):
        if (
            __diag__.warn_multiple_tokens_in_named_alternation
            and Diagnostics.warn_multiple_tokens_in_named_alternation
            not in self.suppress_warnings_
        ):
            if any(
                isinstance(e, And)
                and Diagnostics.warn_multiple_tokens_in_named_alternation
                not in e.suppress_warnings_
                for e in self.exprs
            ):
                warnings.warn(
                    "{}: setting results name {!r} on {} expression "
                    "will return a list of all parsed tokens in an And alternative, "
                    "in prior versions only the first token was returned; enclose "
                    "contained argument in Group".format(
                        "warn_multiple_tokens_in_named_alternation",
                        name,
                        type(self).__name__,
                    ),
                    stacklevel=3,
                )

        return super()._setResultsName(name, listAllMatches)


class Each(ParseExpression):
    """Requires all given :class:`ParseExpression` s to be found, but in
    any order. Expressions may be separated by whitespace.

    May be constructed using the ``'&'`` operator.

    Example::

        color = one_of("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN")
        shape_type = one_of("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON")
        integer = Word(nums)
        shape_attr = "shape:" + shape_type("shape")
        posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn")
        color_attr = "color:" + color("color")
        size_attr = "size:" + integer("size")

        # use Each (using operator '&') to accept attributes in any order
        # (shape and posn are required, color and size are optional)
        shape_spec = shape_attr & posn_attr & Opt(color_attr) & Opt(size_attr)

        shape_spec.run_tests('''
            shape: SQUARE color: BLACK posn: 100, 120
            shape: CIRCLE size: 50 color: BLUE posn: 50,80
            color:GREEN size:20 shape:TRIANGLE posn:20,40
            '''
            )

    prints::

        shape: SQUARE color: BLACK posn: 100, 120
        ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']]
        - color: BLACK
        - posn: ['100', ',', '120']
          - x: 100
          - y: 120
        - shape: SQUARE


        shape: CIRCLE size: 50 color: BLUE posn: 50,80
        ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']]
        - color: BLUE
        - posn: ['50', ',', '80']
          - x: 50
          - y: 80
        - shape: CIRCLE
        - size: 50


        color: GREEN size: 20 shape: TRIANGLE posn: 20,40
        ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']]
        - color: GREEN
        - posn: ['20', ',', '40']
          - x: 20
          - y: 40
        - shape: TRIANGLE
        - size: 20
    """

    def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = True):
        super().__init__(exprs, savelist)
        if self.exprs:
            self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs)
        else:
            self.mayReturnEmpty = True
        self.skipWhitespace = True
        self.initExprGroups = True
        self.saveAsList = True

    def __iand__(self, other):
        if isinstance(other, str_type):
            other = self._literalStringClass(other)
        if not isinstance(other, ParserElement):
            return NotImplemented
        return self.append(other)  # Each([self, other])

    def streamline(self) -> ParserElement:
        super().streamline()
        if self.exprs:
            self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs)
        else:
            self.mayReturnEmpty = True
        return self

    def parseImpl(self, instring, loc, doActions=True):
        if self.initExprGroups:
            self.opt1map = dict(
                (id(e.expr), e) for e in self.exprs if isinstance(e, Opt)
            )
            opt1 = [e.expr for e in self.exprs if isinstance(e, Opt)]
            opt2 = [
                e
                for e in self.exprs
                if e.mayReturnEmpty and not isinstance(e, (Opt, Regex, ZeroOrMore))
            ]
            self.optionals = opt1 + opt2
            self.multioptionals = [
                e.expr.set_results_name(e.resultsName, list_all_matches=True)
                for e in self.exprs
                if isinstance(e, _MultipleMatch)
            ]
            self.multirequired = [
                e.expr.set_results_name(e.resultsName, list_all_matches=True)
                for e in self.exprs
                if isinstance(e, OneOrMore)
            ]
            self.required = [
                e for e in self.exprs if not isinstance(e, (Opt, ZeroOrMore, OneOrMore))
            ]
            self.required += self.multirequired
            self.initExprGroups = False

        tmpLoc = loc
        tmpReqd = self.required[:]
        tmpOpt = self.optionals[:]
        multis = self.multioptionals[:]
        matchOrder = []

        keepMatching = True
        failed = []
        fatals = []
        while keepMatching:
            tmpExprs = tmpReqd + tmpOpt + multis
            failed.clear()
            fatals.clear()
            for e in tmpExprs:
                try:
                    tmpLoc = e.try_parse(instring, tmpLoc, raise_fatal=True)
                except ParseFatalException as pfe:
                    pfe.__traceback__ = None
                    pfe.parser_element = e
                    fatals.append(pfe)
                    failed.append(e)
                except ParseException:
                    failed.append(e)
                else:
                    matchOrder.append(self.opt1map.get(id(e), e))
                    if e in tmpReqd:
                        tmpReqd.remove(e)
                    elif e in tmpOpt:
                        tmpOpt.remove(e)
            if len(failed) == len(tmpExprs):
                keepMatching = False

        # look for any ParseFatalExceptions
        if fatals:
            if len(fatals) > 1:
                fatals.sort(key=lambda e: -e.loc)
                if fatals[0].loc == fatals[1].loc:
                    fatals.sort(key=lambda e: (-e.loc, -len(str(e.parser_element))))
            max_fatal = fatals[0]
            raise max_fatal

        if tmpReqd:
            missing = ", ".join([str(e) for e in tmpReqd])
            raise ParseException(
                instring,
                loc,
                f"Missing one or more required elements ({missing})",
            )

        # add any unmatched Opts, in case they have default values defined
        matchOrder += [e for e in self.exprs if isinstance(e, Opt) and e.expr in tmpOpt]

        total_results = ParseResults([])
        for e in matchOrder:
            loc, results = e._parse(instring, loc, doActions)
            total_results += results

        return loc, total_results

    def _generateDefaultName(self) -> str:
        return "{" + " & ".join(str(e) for e in self.exprs) + "}"


class ParseElementEnhance(ParserElement):
    """Abstract subclass of :class:`ParserElement`, for combining and
    post-processing parsed tokens.
    """

    def __init__(self, expr: Union[ParserElement, str], savelist: bool = False):
        super().__init__(savelist)
        if isinstance(expr, str_type):
            expr_str = typing.cast(str, expr)
            if issubclass(self._literalStringClass, Token):
                expr = self._literalStringClass(expr_str)  # type: ignore[call-arg]
            elif issubclass(type(self), self._literalStringClass):
                expr = Literal(expr_str)
            else:
                expr = self._literalStringClass(Literal(expr_str))  # type: ignore[assignment, call-arg]
        expr = typing.cast(ParserElement, expr)
        self.expr = expr
        if expr is not None:
            self.mayIndexError = expr.mayIndexError
            self.mayReturnEmpty = expr.mayReturnEmpty
            self.set_whitespace_chars(
                expr.whiteChars, copy_defaults=expr.copyDefaultWhiteChars
            )
            self.skipWhitespace = expr.skipWhitespace
            self.saveAsList = expr.saveAsList
            self.callPreparse = expr.callPreparse
            self.ignoreExprs.extend(expr.ignoreExprs)

    def recurse(self) -> List[ParserElement]:
        return [self.expr] if self.expr is not None else []

    def parseImpl(self, instring, loc, doActions=True):
        if self.expr is not None:
            try:
                return self.expr._parse(instring, loc, doActions, callPreParse=False)
            except ParseBaseException as pbe:
                pbe.msg = self.errmsg
                raise
        else:
            raise ParseException(instring, loc, "No expression defined", self)

    def leave_whitespace(self, recursive: bool = True) -> ParserElement:
        super().leave_whitespace(recursive)

        if recursive:
            if self.expr is not None:
                self.expr = self.expr.copy()
                self.expr.leave_whitespace(recursive)
        return self

    def ignore_whitespace(self, recursive: bool = True) -> ParserElement:
        super().ignore_whitespace(recursive)

        if recursive:
            if self.expr is not None:
                self.expr = self.expr.copy()
                self.expr.ignore_whitespace(recursive)
        return self

    def ignore(self, other) -> ParserElement:
        if isinstance(other, Suppress):
            if other not in self.ignoreExprs:
                super().ignore(other)
                if self.expr is not None:
                    self.expr.ignore(self.ignoreExprs[-1])
        else:
            super().ignore(other)
            if self.expr is not None:
                self.expr.ignore(self.ignoreExprs[-1])
        return self

    def streamline(self) -> ParserElement:
        super().streamline()
        if self.expr is not None:
            self.expr.streamline()
        return self

    def _checkRecursion(self, parseElementList):
        if self in parseElementList:
            raise RecursiveGrammarException(parseElementList + [self])
        subRecCheckList = parseElementList[:] + [self]
        if self.expr is not None:
            self.expr._checkRecursion(subRecCheckList)

    def validate(self, validateTrace=None) -> None:
        warnings.warn(
            "ParserElement.validate() is deprecated, and should not be used to check for left recursion",
            DeprecationWarning,
            stacklevel=2,
        )
        if validateTrace is None:
            validateTrace = []
        tmp = validateTrace[:] + [self]
        if self.expr is not None:
            self.expr.validate(tmp)
        self._checkRecursion([])

    def _generateDefaultName(self) -> str:
        return f"{self.__class__.__name__}:({str(self.expr)})"

    # Compatibility synonyms
    # fmt: off
    @replaced_by_pep8(leave_whitespace)
    def leaveWhitespace(self): ...

    @replaced_by_pep8(ignore_whitespace)
    def ignoreWhitespace(self): ...
    # fmt: on


class IndentedBlock(ParseElementEnhance):
    """
    Expression to match one or more expressions at a given indentation level.
    Useful for parsing text where structure is implied by indentation (like Python source code).
    """

    class _Indent(Empty):
        def __init__(self, ref_col: int):
            super().__init__()
            self.errmsg = f"expected indent at column {ref_col}"
            self.add_condition(lambda s, l, t: col(l, s) == ref_col)

    class _IndentGreater(Empty):
        def __init__(self, ref_col: int):
            super().__init__()
            self.errmsg = f"expected indent at column greater than {ref_col}"
            self.add_condition(lambda s, l, t: col(l, s) > ref_col)

    def __init__(
        self, expr: ParserElement, *, recursive: bool = False, grouped: bool = True
    ):
        super().__init__(expr, savelist=True)
        # if recursive:
        #     raise NotImplementedError("IndentedBlock with recursive is not implemented")
        self._recursive = recursive
        self._grouped = grouped
        self.parent_anchor = 1

    def parseImpl(self, instring, loc, doActions=True):
        # advance parse position to non-whitespace by using an Empty()
        # this should be the column to be used for all subsequent indented lines
        anchor_loc = Empty().preParse(instring, loc)

        # see if self.expr matches at the current location - if not it will raise an exception
        # and no further work is necessary
        self.expr.try_parse(instring, anchor_loc, do_actions=doActions)

        indent_col = col(anchor_loc, instring)
        peer_detect_expr = self._Indent(indent_col)

        inner_expr = Empty() + peer_detect_expr + self.expr
        if self._recursive:
            sub_indent = self._IndentGreater(indent_col)
            nested_block = IndentedBlock(
                self.expr, recursive=self._recursive, grouped=self._grouped
            )
            nested_block.set_debug(self.debug)
            nested_block.parent_anchor = indent_col
            inner_expr += Opt(sub_indent + nested_block)

        inner_expr.set_name(f"inner {hex(id(inner_expr))[-4:].upper()}@{indent_col}")
        block = OneOrMore(inner_expr)

        trailing_undent = self._Indent(self.parent_anchor) | StringEnd()

        if self._grouped:
            wrapper = Group
        else:
            wrapper = lambda expr: expr
        return (wrapper(block) + Optional(trailing_undent)).parseImpl(
            instring, anchor_loc, doActions
        )


class AtStringStart(ParseElementEnhance):
    """Matches if expression matches at the beginning of the parse
    string::

        AtStringStart(Word(nums)).parse_string("123")
        # prints ["123"]

        AtStringStart(Word(nums)).parse_string("    123")
        # raises ParseException
    """

    def __init__(self, expr: Union[ParserElement, str]):
        super().__init__(expr)
        self.callPreparse = False

    def parseImpl(self, instring, loc, doActions=True):
        if loc != 0:
            raise ParseException(instring, loc, "not found at string start")
        return super().parseImpl(instring, loc, doActions)


class AtLineStart(ParseElementEnhance):
    r"""Matches if an expression matches at the beginning of a line within
    the parse string

    Example::

        test = '''\
        AAA this line
        AAA and this line
          AAA but not this one
        B AAA and definitely not this one
        '''

        for t in (AtLineStart('AAA') + rest_of_line).search_string(test):
            print(t)

    prints::

        ['AAA', ' this line']
        ['AAA', ' and this line']

    """

    def __init__(self, expr: Union[ParserElement, str]):
        super().__init__(expr)
        self.callPreparse = False

    def parseImpl(self, instring, loc, doActions=True):
        if col(loc, instring) != 1:
            raise ParseException(instring, loc, "not found at line start")
        return super().parseImpl(instring, loc, doActions)


class FollowedBy(ParseElementEnhance):
    """Lookahead matching of the given parse expression.
    ``FollowedBy`` does *not* advance the parsing position within
    the input string, it only verifies that the specified parse
    expression matches at the current position.  ``FollowedBy``
    always returns a null token list. If any results names are defined
    in the lookahead expression, those *will* be returned for access by
    name.

    Example::

        # use FollowedBy to match a label only if it is followed by a ':'
        data_word = Word(alphas)
        label = data_word + FollowedBy(':')
        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))

        attr_expr[1, ...].parse_string("shape: SQUARE color: BLACK posn: upper left").pprint()

    prints::

        [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']]
    """

    def __init__(self, expr: Union[ParserElement, str]):
        super().__init__(expr)
        self.mayReturnEmpty = True

    def parseImpl(self, instring, loc, doActions=True):
        # by using self._expr.parse and deleting the contents of the returned ParseResults list
        # we keep any named results that were defined in the FollowedBy expression
        _, ret = self.expr._parse(instring, loc, doActions=doActions)
        del ret[:]

        return loc, ret


class PrecededBy(ParseElementEnhance):
    """Lookbehind matching of the given parse expression.
    ``PrecededBy`` does not advance the parsing position within the
    input string, it only verifies that the specified parse expression
    matches prior to the current position.  ``PrecededBy`` always
    returns a null token list, but if a results name is defined on the
    given expression, it is returned.

    Parameters:

    - ``expr`` - expression that must match prior to the current parse
      location
    - ``retreat`` - (default= ``None``) - (int) maximum number of characters
      to lookbehind prior to the current parse location

    If the lookbehind expression is a string, :class:`Literal`,
    :class:`Keyword`, or a :class:`Word` or :class:`CharsNotIn`
    with a specified exact or maximum length, then the retreat
    parameter is not required. Otherwise, retreat must be specified to
    give a maximum number of characters to look back from
    the current parse position for a lookbehind match.

    Example::

        # VB-style variable names with type prefixes
        int_var = PrecededBy("#") + pyparsing_common.identifier
        str_var = PrecededBy("$") + pyparsing_common.identifier

    """

    def __init__(
        self, expr: Union[ParserElement, str], retreat: typing.Optional[int] = None
    ):
        super().__init__(expr)
        self.expr = self.expr().leave_whitespace()
        self.mayReturnEmpty = True
        self.mayIndexError = False
        self.exact = False
        if isinstance(expr, str_type):
            expr = typing.cast(str, expr)
            retreat = len(expr)
            self.exact = True
        elif isinstance(expr, (Literal, Keyword)):
            retreat = expr.matchLen
            self.exact = True
        elif isinstance(expr, (Word, CharsNotIn)) and expr.maxLen != _MAX_INT:
            retreat = expr.maxLen
            self.exact = True
        elif isinstance(expr, PositionToken):
            retreat = 0
            self.exact = True
        self.retreat = retreat
        self.errmsg = "not preceded by " + str(expr)
        self.skipWhitespace = False
        self.parseAction.append(lambda s, l, t: t.__delitem__(slice(None, None)))

    def parseImpl(self, instring, loc=0, doActions=True):
        if self.exact:
            if loc < self.retreat:
                raise ParseException(instring, loc, self.errmsg)
            start = loc - self.retreat
            _, ret = self.expr._parse(instring, start)
        else:
            # retreat specified a maximum lookbehind window, iterate
            test_expr = self.expr + StringEnd()
            instring_slice = instring[max(0, loc - self.retreat) : loc]
            last_expr = ParseException(instring, loc, self.errmsg)
            for offset in range(1, min(loc, self.retreat + 1) + 1):
                try:
                    # print('trying', offset, instring_slice, repr(instring_slice[loc - offset:]))
                    _, ret = test_expr._parse(
                        instring_slice, len(instring_slice) - offset
                    )
                except ParseBaseException as pbe:
                    last_expr = pbe
                else:
                    break
            else:
                raise last_expr
        return loc, ret


class Located(ParseElementEnhance):
    """
    Decorates a returned token with its starting and ending
    locations in the input string.

    This helper adds the following results names:

    - ``locn_start`` - location where matched expression begins
    - ``locn_end`` - location where matched expression ends
    - ``value`` - the actual parsed results

    Be careful if the input text contains ``<TAB>`` characters, you
    may want to call :class:`ParserElement.parse_with_tabs`

    Example::

        wd = Word(alphas)
        for match in Located(wd).search_string("ljsdf123lksdjjf123lkkjj1222"):
            print(match)

    prints::

        [0, ['ljsdf'], 5]
        [8, ['lksdjjf'], 15]
        [18, ['lkkjj'], 23]

    """

    def parseImpl(self, instring, loc, doActions=True):
        start = loc
        loc, tokens = self.expr._parse(instring, start, doActions, callPreParse=False)
        ret_tokens = ParseResults([start, tokens, loc])
        ret_tokens["locn_start"] = start
        ret_tokens["value"] = tokens
        ret_tokens["locn_end"] = loc
        if self.resultsName:
            # must return as a list, so that the name will be attached to the complete group
            return loc, [ret_tokens]
        else:
            return loc, ret_tokens


class NotAny(ParseElementEnhance):
    """
    Lookahead to disallow matching with the given parse expression.
    ``NotAny`` does *not* advance the parsing position within the
    input string, it only verifies that the specified parse expression
    does *not* match at the current position.  Also, ``NotAny`` does
    *not* skip over leading whitespace. ``NotAny`` always returns
    a null token list.  May be constructed using the ``'~'`` operator.

    Example::

        AND, OR, NOT = map(CaselessKeyword, "AND OR NOT".split())

        # take care not to mistake keywords for identifiers
        ident = ~(AND | OR | NOT) + Word(alphas)
        boolean_term = Opt(NOT) + ident

        # very crude boolean expression - to support parenthesis groups and
        # operation hierarchy, use infix_notation
        boolean_expr = boolean_term + ((AND | OR) + boolean_term)[...]

        # integers that are followed by "." are actually floats
        integer = Word(nums) + ~Char(".")
    """

    def __init__(self, expr: Union[ParserElement, str]):
        super().__init__(expr)
        # do NOT use self.leave_whitespace(), don't want to propagate to exprs
        # self.leave_whitespace()
        self.skipWhitespace = False

        self.mayReturnEmpty = True
        self.errmsg = "Found unwanted token, " + str(self.expr)

    def parseImpl(self, instring, loc, doActions=True):
        if self.expr.can_parse_next(instring, loc, do_actions=doActions):
            raise ParseException(instring, loc, self.errmsg, self)
        return loc, []

    def _generateDefaultName(self) -> str:
        return "~{" + str(self.expr) + "}"


class _MultipleMatch(ParseElementEnhance):
    def __init__(
        self,
        expr: Union[str, ParserElement],
        stop_on: typing.Optional[Union[ParserElement, str]] = None,
        *,
        stopOn: typing.Optional[Union[ParserElement, str]] = None,
    ):
        super().__init__(expr)
        stopOn = stopOn or stop_on
        self.saveAsList = True
        ender = stopOn
        if isinstance(ender, str_type):
            ender = self._literalStringClass(ender)
        self.stopOn(ender)

    def stopOn(self, ender) -> ParserElement:
        if isinstance(ender, str_type):
            ender = self._literalStringClass(ender)
        self.not_ender = ~ender if ender is not None else None
        return self

    def parseImpl(self, instring, loc, doActions=True):
        self_expr_parse = self.expr._parse
        self_skip_ignorables = self._skipIgnorables
        check_ender = self.not_ender is not None
        if check_ender:
            try_not_ender = self.not_ender.try_parse

        # must be at least one (but first see if we are the stopOn sentinel;
        # if so, fail)
        if check_ender:
            try_not_ender(instring, loc)
        loc, tokens = self_expr_parse(instring, loc, doActions)
        try:
            hasIgnoreExprs = not not self.ignoreExprs
            while 1:
                if check_ender:
                    try_not_ender(instring, loc)
                if hasIgnoreExprs:
                    preloc = self_skip_ignorables(instring, loc)
                else:
                    preloc = loc
                loc, tmptokens = self_expr_parse(instring, preloc, doActions)
                tokens += tmptokens
        except (ParseException, IndexError):
            pass

        return loc, tokens

    def _setResultsName(self, name, listAllMatches=False):
        if (
            __diag__.warn_ungrouped_named_tokens_in_collection
            and Diagnostics.warn_ungrouped_named_tokens_in_collection
            not in self.suppress_warnings_
        ):
            for e in [self.expr] + self.expr.recurse():
                if (
                    isinstance(e, ParserElement)
                    and e.resultsName
                    and Diagnostics.warn_ungrouped_named_tokens_in_collection
                    not in e.suppress_warnings_
                ):
                    warnings.warn(
                        "{}: setting results name {!r} on {} expression "
                        "collides with {!r} on contained expression".format(
                            "warn_ungrouped_named_tokens_in_collection",
                            name,
                            type(self).__name__,
                            e.resultsName,
                        ),
                        stacklevel=3,
                    )

        return super()._setResultsName(name, listAllMatches)


class OneOrMore(_MultipleMatch):
    """
    Repetition of one or more of the given expression.

    Parameters:

    - ``expr`` - expression that must match one or more times
    - ``stop_on`` - (default= ``None``) - expression for a terminating sentinel
      (only required if the sentinel would ordinarily match the repetition
      expression)

    Example::

        data_word = Word(alphas)
        label = data_word + FollowedBy(':')
        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).set_parse_action(' '.join))

        text = "shape: SQUARE posn: upper left color: BLACK"
        attr_expr[1, ...].parse_string(text).pprint()  # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']]

        # use stop_on attribute for OneOrMore to avoid reading label string as part of the data
        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))
        OneOrMore(attr_expr).parse_string(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']]

        # could also be written as
        (attr_expr * (1,)).parse_string(text).pprint()
    """

    def _generateDefaultName(self) -> str:
        return "{" + str(self.expr) + "}..."


class ZeroOrMore(_MultipleMatch):
    """
    Optional repetition of zero or more of the given expression.

    Parameters:

    - ``expr`` - expression that must match zero or more times
    - ``stop_on`` - expression for a terminating sentinel
      (only required if the sentinel would ordinarily match the repetition
      expression) - (default= ``None``)

    Example: similar to :class:`OneOrMore`
    """

    def __init__(
        self,
        expr: Union[str, ParserElement],
        stop_on: typing.Optional[Union[ParserElement, str]] = None,
        *,
        stopOn: typing.Optional[Union[ParserElement, str]] = None,
    ):
        super().__init__(expr, stopOn=stopOn or stop_on)
        self.mayReturnEmpty = True

    def parseImpl(self, instring, loc, doActions=True):
        try:
            return super().parseImpl(instring, loc, doActions)
        except (ParseException, IndexError):
            return loc, ParseResults([], name=self.resultsName)

    def _generateDefaultName(self) -> str:
        return "[" + str(self.expr) + "]..."


class DelimitedList(ParseElementEnhance):
    def __init__(
        self,
        expr: Union[str, ParserElement],
        delim: Union[str, ParserElement] = ",",
        combine: bool = False,
        min: typing.Optional[int] = None,
        max: typing.Optional[int] = None,
        *,
        allow_trailing_delim: bool = False,
    ):
        """Helper to define a delimited list of expressions - the delimiter
        defaults to ','. By default, the list elements and delimiters can
        have intervening whitespace, and comments, but this can be
        overridden by passing ``combine=True`` in the constructor. If
        ``combine`` is set to ``True``, the matching tokens are
        returned as a single token string, with the delimiters included;
        otherwise, the matching tokens are returned as a list of tokens,
        with the delimiters suppressed.

        If ``allow_trailing_delim`` is set to True, then the list may end with
        a delimiter.

        Example::

            DelimitedList(Word(alphas)).parse_string("aa,bb,cc") # -> ['aa', 'bb', 'cc']
            DelimitedList(Word(hexnums), delim=':', combine=True).parse_string("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE']
        """
        if isinstance(expr, str_type):
            expr = ParserElement._literalStringClass(expr)
        expr = typing.cast(ParserElement, expr)

        if min is not None:
            if min < 1:
                raise ValueError("min must be greater than 0")
        if max is not None:
            if min is not None and max < min:
                raise ValueError("max must be greater than, or equal to min")

        self.content = expr
        self.raw_delim = str(delim)
        self.delim = delim
        self.combine = combine
        if not combine:
            self.delim = Suppress(delim)
        self.min = min or 1
        self.max = max
        self.allow_trailing_delim = allow_trailing_delim

        delim_list_expr = self.content + (self.delim + self.content) * (
            self.min - 1,
            None if self.max is None else self.max - 1,
        )
        if self.allow_trailing_delim:
            delim_list_expr += Opt(self.delim)

        if self.combine:
            delim_list_expr = Combine(delim_list_expr)

        super().__init__(delim_list_expr, savelist=True)

    def _generateDefaultName(self) -> str:
        return "{0} [{1} {0}]...".format(self.content.streamline(), self.raw_delim)


class _NullToken:
    def __bool__(self):
        return False

    def __str__(self):
        return ""


class Opt(ParseElementEnhance):
    """
    Optional matching of the given expression.

    Parameters:

    - ``expr`` - expression that must match zero or more times
    - ``default`` (optional) - value to be returned if the optional expression is not found.

    Example::

        # US postal code can be a 5-digit zip, plus optional 4-digit qualifier
        zip = Combine(Word(nums, exact=5) + Opt('-' + Word(nums, exact=4)))
        zip.run_tests('''
            # traditional ZIP code
            12345

            # ZIP+4 form
            12101-0001

            # invalid ZIP
            98765-
            ''')

    prints::

        # traditional ZIP code
        12345
        ['12345']

        # ZIP+4 form
        12101-0001
        ['12101-0001']

        # invalid ZIP
        98765-
             ^
        FAIL: Expected end of text (at char 5), (line:1, col:6)
    """

    __optionalNotMatched = _NullToken()

    def __init__(
        self, expr: Union[ParserElement, str], default: Any = __optionalNotMatched
    ):
        super().__init__(expr, savelist=False)
        self.saveAsList = self.expr.saveAsList
        self.defaultValue = default
        self.mayReturnEmpty = True

    def parseImpl(self, instring, loc, doActions=True):
        self_expr = self.expr
        try:
            loc, tokens = self_expr._parse(instring, loc, doActions, callPreParse=False)
        except (ParseException, IndexError):
            default_value = self.defaultValue
            if default_value is not self.__optionalNotMatched:
                if self_expr.resultsName:
                    tokens = ParseResults([default_value])
                    tokens[self_expr.resultsName] = default_value
                else:
                    tokens = [default_value]
            else:
                tokens = []
        return loc, tokens

    def _generateDefaultName(self) -> str:
        inner = str(self.expr)
        # strip off redundant inner {}'s
        while len(inner) > 1 and inner[0 :: len(inner) - 1] == "{}":
            inner = inner[1:-1]
        return "[" + inner + "]"


Optional = Opt


class SkipTo(ParseElementEnhance):
    """
    Token for skipping over all undefined text until the matched
    expression is found.

    Parameters:

    - ``expr`` - target expression marking the end of the data to be skipped
    - ``include`` - if ``True``, the target expression is also parsed
      (the skipped text and target expression are returned as a 2-element
      list) (default= ``False``).
    - ``ignore`` - (default= ``None``) used to define grammars (typically quoted strings and
      comments) that might contain false matches to the target expression
    - ``fail_on`` - (default= ``None``) define expressions that are not allowed to be
      included in the skipped test; if found before the target expression is found,
      the :class:`SkipTo` is not a match

    Example::

        report = '''
            Outstanding Issues Report - 1 Jan 2000

               # | Severity | Description                               |  Days Open
            -----+----------+-------------------------------------------+-----------
             101 | Critical | Intermittent system crash                 |          6
              94 | Cosmetic | Spelling error on Login ('log|n')         |         14
              79 | Minor    | System slow when running too many reports |         47
            '''
        integer = Word(nums)
        SEP = Suppress('|')
        # use SkipTo to simply match everything up until the next SEP
        # - ignore quoted strings, so that a '|' character inside a quoted string does not match
        # - parse action will call token.strip() for each matched token, i.e., the description body
        string_data = SkipTo(SEP, ignore=quoted_string)
        string_data.set_parse_action(token_map(str.strip))
        ticket_expr = (integer("issue_num") + SEP
                      + string_data("sev") + SEP
                      + string_data("desc") + SEP
                      + integer("days_open"))

        for tkt in ticket_expr.search_string(report):
            print tkt.dump()

    prints::

        ['101', 'Critical', 'Intermittent system crash', '6']
        - days_open: '6'
        - desc: 'Intermittent system crash'
        - issue_num: '101'
        - sev: 'Critical'
        ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14']
        - days_open: '14'
        - desc: "Spelling error on Login ('log|n')"
        - issue_num: '94'
        - sev: 'Cosmetic'
        ['79', 'Minor', 'System slow when running too many reports', '47']
        - days_open: '47'
        - desc: 'System slow when running too many reports'
        - issue_num: '79'
        - sev: 'Minor'
    """

    def __init__(
        self,
        other: Union[ParserElement, str],
        include: bool = False,
        ignore: typing.Optional[Union[ParserElement, str]] = None,
        fail_on: typing.Optional[Union[ParserElement, str]] = None,
        *,
        failOn: typing.Optional[Union[ParserElement, str]] = None,
    ):
        super().__init__(other)
        failOn = failOn or fail_on
        if ignore is not None:
            self.ignore(ignore)
        self.mayReturnEmpty = True
        self.mayIndexError = False
        self.includeMatch = include
        self.saveAsList = False
        if isinstance(failOn, str_type):
            self.failOn = self._literalStringClass(failOn)
        else:
            self.failOn = failOn
        self.errmsg = "No match found for " + str(self.expr)

    def parseImpl(self, instring, loc, doActions=True):
        startloc = loc
        instrlen = len(instring)
        self_expr_parse = self.expr._parse
        self_failOn_canParseNext = (
            self.failOn.canParseNext if self.failOn is not None else None
        )
        self_preParse = self.preParse if self.callPreparse else None

        tmploc = loc
        while tmploc <= instrlen:
            if self_failOn_canParseNext is not None:
                # break if failOn expression matches
                if self_failOn_canParseNext(instring, tmploc):
                    break

            if self_preParse is not None:
                # skip grammar-ignored expressions
                tmploc = self_preParse(instring, tmploc)

            try:
                self_expr_parse(instring, tmploc, doActions=False, callPreParse=False)
            except (ParseException, IndexError):
                # no match, advance loc in string
                tmploc += 1
            else:
                # matched skipto expr, done
                break

        else:
            # ran off the end of the input string without matching skipto expr, fail
            raise ParseException(instring, loc, self.errmsg, self)

        # build up return values
        loc = tmploc
        skiptext = instring[startloc:loc]
        skipresult = ParseResults(skiptext)

        if self.includeMatch:
            loc, mat = self_expr_parse(instring, loc, doActions, callPreParse=False)
            skipresult += mat

        return loc, skipresult


class Forward(ParseElementEnhance):
    """
    Forward declaration of an expression to be defined later -
    used for recursive grammars, such as algebraic infix notation.
    When the expression is known, it is assigned to the ``Forward``
    variable using the ``'<<'`` operator.

    Note: take care when assigning to ``Forward`` not to overlook
    precedence of operators.

    Specifically, ``'|'`` has a lower precedence than ``'<<'``, so that::

        fwd_expr << a | b | c

    will actually be evaluated as::

        (fwd_expr << a) | b | c

    thereby leaving b and c out as parseable alternatives.  It is recommended that you
    explicitly group the values inserted into the ``Forward``::

        fwd_expr << (a | b | c)

    Converting to use the ``'<<='`` operator instead will avoid this problem.

    See :class:`ParseResults.pprint` for an example of a recursive
    parser created using ``Forward``.
    """

    def __init__(self, other: typing.Optional[Union[ParserElement, str]] = None):
        self.caller_frame = traceback.extract_stack(limit=2)[0]
        super().__init__(other, savelist=False)  # type: ignore[arg-type]
        self.lshift_line = None

    def __lshift__(self, other) -> "Forward":
        if hasattr(self, "caller_frame"):
            del self.caller_frame
        if isinstance(other, str_type):
            other = self._literalStringClass(other)

        if not isinstance(other, ParserElement):
            return NotImplemented

        self.expr = other
        self.streamlined = other.streamlined
        self.mayIndexError = self.expr.mayIndexError
        self.mayReturnEmpty = self.expr.mayReturnEmpty
        self.set_whitespace_chars(
            self.expr.whiteChars, copy_defaults=self.expr.copyDefaultWhiteChars
        )
        self.skipWhitespace = self.expr.skipWhitespace
        self.saveAsList = self.expr.saveAsList
        self.ignoreExprs.extend(self.expr.ignoreExprs)
        self.lshift_line = traceback.extract_stack(limit=2)[-2]  # type: ignore[assignment]
        return self

    def __ilshift__(self, other) -> "Forward":
        if not isinstance(other, ParserElement):
            return NotImplemented

        return self << other

    def __or__(self, other) -> "ParserElement":
        caller_line = traceback.extract_stack(limit=2)[-2]
        if (
            __diag__.warn_on_match_first_with_lshift_operator
            and caller_line == self.lshift_line
            and Diagnostics.warn_on_match_first_with_lshift_operator
            not in self.suppress_warnings_
        ):
            warnings.warn(
                "using '<<' operator with '|' is probably an error, use '<<='",
                stacklevel=2,
            )
        ret = super().__or__(other)
        return ret

    def __del__(self):
        # see if we are getting dropped because of '=' reassignment of var instead of '<<=' or '<<'
        if (
            self.expr is None
            and __diag__.warn_on_assignment_to_Forward
            and Diagnostics.warn_on_assignment_to_Forward not in self.suppress_warnings_
        ):
            warnings.warn_explicit(
                "Forward defined here but no expression attached later using '<<=' or '<<'",
                UserWarning,
                filename=self.caller_frame.filename,
                lineno=self.caller_frame.lineno,
            )

    def parseImpl(self, instring, loc, doActions=True):
        if (
            self.expr is None
            and __diag__.warn_on_parse_using_empty_Forward
            and Diagnostics.warn_on_parse_using_empty_Forward
            not in self.suppress_warnings_
        ):
            # walk stack until parse_string, scan_string, search_string, or transform_string is found
            parse_fns = (
                "parse_string",
                "scan_string",
                "search_string",
                "transform_string",
            )
            tb = traceback.extract_stack(limit=200)
            for i, frm in enumerate(reversed(tb), start=1):
                if frm.name in parse_fns:
                    stacklevel = i + 1
                    break
            else:
                stacklevel = 2
            warnings.warn(
                "Forward expression was never assigned a value, will not parse any input",
                stacklevel=stacklevel,
            )
        if not ParserElement._left_recursion_enabled:
            return super().parseImpl(instring, loc, doActions)
        # ## Bounded Recursion algorithm ##
        # Recursion only needs to be processed at ``Forward`` elements, since they are
        # the only ones that can actually refer to themselves. The general idea is
        # to handle recursion stepwise: We start at no recursion, then recurse once,
        # recurse twice, ..., until more recursion offers no benefit (we hit the bound).
        #
        # The "trick" here is that each ``Forward`` gets evaluated in two contexts
        # - to *match* a specific recursion level, and
        # - to *search* the bounded recursion level
        # and the two run concurrently. The *search* must *match* each recursion level
        # to find the best possible match. This is handled by a memo table, which
        # provides the previous match to the next level match attempt.
        #
        # See also "Left Recursion in Parsing Expression Grammars", Medeiros et al.
        #
        # There is a complication since we not only *parse* but also *transform* via
        # actions: We do not want to run the actions too often while expanding. Thus,
        # we expand using `doActions=False` and only run `doActions=True` if the next
        # recursion level is acceptable.
        with ParserElement.recursion_lock:
            memo = ParserElement.recursion_memos
            try:
                # we are parsing at a specific recursion expansion - use it as-is
                prev_loc, prev_result = memo[loc, self, doActions]
                if isinstance(prev_result, Exception):
                    raise prev_result
                return prev_loc, prev_result.copy()
            except KeyError:
                act_key = (loc, self, True)
                peek_key = (loc, self, False)
                # we are searching for the best recursion expansion - keep on improving
                # both `doActions` cases must be tracked separately here!
                prev_loc, prev_peek = memo[peek_key] = (
                    loc - 1,
                    ParseException(
                        instring, loc, "Forward recursion without base case", self
                    ),
                )
                if doActions:
                    memo[act_key] = memo[peek_key]
                while True:
                    try:
                        new_loc, new_peek = super().parseImpl(instring, loc, False)
                    except ParseException:
                        # we failed before getting any match – do not hide the error
                        if isinstance(prev_peek, Exception):
                            raise
                        new_loc, new_peek = prev_loc, prev_peek
                    # the match did not get better: we are done
                    if new_loc <= prev_loc:
                        if doActions:
                            # replace the match for doActions=False as well,
                            # in case the action did backtrack
                            prev_loc, prev_result = memo[peek_key] = memo[act_key]
                            del memo[peek_key], memo[act_key]
                            return prev_loc, prev_result.copy()
                        del memo[peek_key]
                        return prev_loc, prev_peek.copy()
                    # the match did get better: see if we can improve further
                    else:
                        if doActions:
                            try:
                                memo[act_key] = super().parseImpl(instring, loc, True)
                            except ParseException as e:
                                memo[peek_key] = memo[act_key] = (new_loc, e)
                                raise
                        prev_loc, prev_peek = memo[peek_key] = new_loc, new_peek

    def leave_whitespace(self, recursive: bool = True) -> ParserElement:
        self.skipWhitespace = False
        return self

    def ignore_whitespace(self, recursive: bool = True) -> ParserElement:
        self.skipWhitespace = True
        return self

    def streamline(self) -> ParserElement:
        if not self.streamlined:
            self.streamlined = True
            if self.expr is not None:
                self.expr.streamline()
        return self

    def validate(self, validateTrace=None) -> None:
        warnings.warn(
            "ParserElement.validate() is deprecated, and should not be used to check for left recursion",
            DeprecationWarning,
            stacklevel=2,
        )
        if validateTrace is None:
            validateTrace = []

        if self not in validateTrace:
            tmp = validateTrace[:] + [self]
            if self.expr is not None:
                self.expr.validate(tmp)
        self._checkRecursion([])

    def _generateDefaultName(self) -> str:
        # Avoid infinite recursion by setting a temporary _defaultName
        self._defaultName = ": ..."

        # Use the string representation of main expression.
        retString = "..."
        try:
            if self.expr is not None:
                retString = str(self.expr)[:1000]
            else:
                retString = "None"
        finally:
            return self.__class__.__name__ + ": " + retString

    def copy(self) -> ParserElement:
        if self.expr is not None:
            return super().copy()
        else:
            ret = Forward()
            ret <<= self
            return ret

    def _setResultsName(self, name, list_all_matches=False):
        if (
            __diag__.warn_name_set_on_empty_Forward
            and Diagnostics.warn_name_set_on_empty_Forward
            not in self.suppress_warnings_
        ):
            if self.expr is None:
                warnings.warn(
                    "{}: setting results name {!r} on {} expression "
                    "that has no contained expression".format(
                        "warn_name_set_on_empty_Forward", name, type(self).__name__
                    ),
                    stacklevel=3,
                )

        return super()._setResultsName(name, list_all_matches)

    # Compatibility synonyms
    # fmt: off
    @replaced_by_pep8(leave_whitespace)
    def leaveWhitespace(self): ...

    @replaced_by_pep8(ignore_whitespace)
    def ignoreWhitespace(self): ...
    # fmt: on


class TokenConverter(ParseElementEnhance):
    """
    Abstract subclass of :class:`ParseExpression`, for converting parsed results.
    """

    def __init__(self, expr: Union[ParserElement, str], savelist=False):
        super().__init__(expr)  # , savelist)
        self.saveAsList = False


class Combine(TokenConverter):
    """Converter to concatenate all matching tokens to a single string.
    By default, the matching patterns must also be contiguous in the
    input string; this can be disabled by specifying
    ``'adjacent=False'`` in the constructor.

    Example::

        real = Word(nums) + '.' + Word(nums)
        print(real.parse_string('3.1416')) # -> ['3', '.', '1416']
        # will also erroneously match the following
        print(real.parse_string('3. 1416')) # -> ['3', '.', '1416']

        real = Combine(Word(nums) + '.' + Word(nums))
        print(real.parse_string('3.1416')) # -> ['3.1416']
        # no match when there are internal spaces
        print(real.parse_string('3. 1416')) # -> Exception: Expected W:(0123...)
    """

    def __init__(
        self,
        expr: ParserElement,
        join_string: str = "",
        adjacent: bool = True,
        *,
        joinString: typing.Optional[str] = None,
    ):
        super().__init__(expr)
        joinString = joinString if joinString is not None else join_string
        # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself
        if adjacent:
            self.leave_whitespace()
        self.adjacent = adjacent
        self.skipWhitespace = True
        self.joinString = joinString
        self.callPreparse = True

    def ignore(self, other) -> ParserElement:
        if self.adjacent:
            ParserElement.ignore(self, other)
        else:
            super().ignore(other)
        return self

    def postParse(self, instring, loc, tokenlist):
        retToks = tokenlist.copy()
        del retToks[:]
        retToks += ParseResults(
            ["".join(tokenlist._asStringList(self.joinString))], modal=self.modalResults
        )

        if self.resultsName and retToks.haskeys():
            return [retToks]
        else:
            return retToks


class Group(TokenConverter):
    """Converter to return the matched tokens as a list - useful for
    returning tokens of :class:`ZeroOrMore` and :class:`OneOrMore` expressions.

    The optional ``aslist`` argument when set to True will return the
    parsed tokens as a Python list instead of a pyparsing ParseResults.

    Example::

        ident = Word(alphas)
        num = Word(nums)
        term = ident | num
        func = ident + Opt(DelimitedList(term))
        print(func.parse_string("fn a, b, 100"))
        # -> ['fn', 'a', 'b', '100']

        func = ident + Group(Opt(DelimitedList(term)))
        print(func.parse_string("fn a, b, 100"))
        # -> ['fn', ['a', 'b', '100']]
    """

    def __init__(self, expr: ParserElement, aslist: bool = False):
        super().__init__(expr)
        self.saveAsList = True
        self._asPythonList = aslist

    def postParse(self, instring, loc, tokenlist):
        if self._asPythonList:
            return ParseResults.List(
                tokenlist.asList()
                if isinstance(tokenlist, ParseResults)
                else list(tokenlist)
            )
        else:
            return [tokenlist]


class Dict(TokenConverter):
    """Converter to return a repetitive expression as a list, but also
    as a dictionary. Each element can also be referenced using the first
    token in the expression as its key. Useful for tabular report
    scraping when the first column can be used as a item key.

    The optional ``asdict`` argument when set to True will return the
    parsed tokens as a Python dict instead of a pyparsing ParseResults.

    Example::

        data_word = Word(alphas)
        label = data_word + FollowedBy(':')

        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))

        # print attributes as plain groups
        print(attr_expr[1, ...].parse_string(text).dump())

        # instead of OneOrMore(expr), parse using Dict(Group(expr)[1, ...]) - Dict will auto-assign names
        result = Dict(Group(attr_expr)[1, ...]).parse_string(text)
        print(result.dump())

        # access named fields as dict entries, or output as dict
        print(result['shape'])
        print(result.as_dict())

    prints::

        ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap']
        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
        - color: 'light blue'
        - posn: 'upper left'
        - shape: 'SQUARE'
        - texture: 'burlap'
        SQUARE
        {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'}

    See more examples at :class:`ParseResults` of accessing fields by results name.
    """

    def __init__(self, expr: ParserElement, asdict: bool = False):
        super().__init__(expr)
        self.saveAsList = True
        self._asPythonDict = asdict

    def postParse(self, instring, loc, tokenlist):
        for i, tok in enumerate(tokenlist):
            if len(tok) == 0:
                continue

            ikey = tok[0]
            if isinstance(ikey, int):
                ikey = str(ikey).strip()

            if len(tok) == 1:
                tokenlist[ikey] = _ParseResultsWithOffset("", i)

            elif len(tok) == 2 and not isinstance(tok[1], ParseResults):
                tokenlist[ikey] = _ParseResultsWithOffset(tok[1], i)

            else:
                try:
                    dictvalue = tok.copy()  # ParseResults(i)
                except Exception:
                    exc = TypeError(
                        "could not extract dict values from parsed results"
                        " - Dict expression must contain Grouped expressions"
                    )
                    raise exc from None

                del dictvalue[0]

                if len(dictvalue) != 1 or (
                    isinstance(dictvalue, ParseResults) and dictvalue.haskeys()
                ):
                    tokenlist[ikey] = _ParseResultsWithOffset(dictvalue, i)
                else:
                    tokenlist[ikey] = _ParseResultsWithOffset(dictvalue[0], i)

        if self._asPythonDict:
            return [tokenlist.as_dict()] if self.resultsName else tokenlist.as_dict()
        else:
            return [tokenlist] if self.resultsName else tokenlist


class Suppress(TokenConverter):
    """Converter for ignoring the results of a parsed expression.

    Example::

        source = "a, b, c,d"
        wd = Word(alphas)
        wd_list1 = wd + (',' + wd)[...]
        print(wd_list1.parse_string(source))

        # often, delimiters that are useful during parsing are just in the
        # way afterward - use Suppress to keep them out of the parsed output
        wd_list2 = wd + (Suppress(',') + wd)[...]
        print(wd_list2.parse_string(source))

        # Skipped text (using '...') can be suppressed as well
        source = "lead in START relevant text END trailing text"
        start_marker = Keyword("START")
        end_marker = Keyword("END")
        find_body = Suppress(...) + start_marker + ... + end_marker
        print(find_body.parse_string(source)

    prints::

        ['a', ',', 'b', ',', 'c', ',', 'd']
        ['a', 'b', 'c', 'd']
        ['START', 'relevant text ', 'END']

    (See also :class:`DelimitedList`.)
    """

    def __init__(self, expr: Union[ParserElement, str], savelist: bool = False):
        if expr is ...:
            expr = _PendingSkip(NoMatch())
        super().__init__(expr)

    def __add__(self, other) -> "ParserElement":
        if isinstance(self.expr, _PendingSkip):
            return Suppress(SkipTo(other)) + other
        else:
            return super().__add__(other)

    def __sub__(self, other) -> "ParserElement":
        if isinstance(self.expr, _PendingSkip):
            return Suppress(SkipTo(other)) - other
        else:
            return super().__sub__(other)

    def postParse(self, instring, loc, tokenlist):
        return []

    def suppress(self) -> ParserElement:
        return self


def trace_parse_action(f: ParseAction) -> ParseAction:
    """Decorator for debugging parse actions.

    When the parse action is called, this decorator will print
    ``">> entering method-name(line:<current_source_line>, <parse_location>, <matched_tokens>)"``.
    When the parse action completes, the decorator will print
    ``"<<"`` followed by the returned value, or any exception that the parse action raised.

    Example::

        wd = Word(alphas)

        @trace_parse_action
        def remove_duplicate_chars(tokens):
            return ''.join(sorted(set(''.join(tokens))))

        wds = wd[1, ...].set_parse_action(remove_duplicate_chars)
        print(wds.parse_string("slkdjs sld sldd sdlf sdljf"))

    prints::

        >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {}))
        <<leaving remove_duplicate_chars (ret: 'dfjkls')
        ['dfjkls']
    """
    f = _trim_arity(f)

    def z(*paArgs):
        thisFunc = f.__name__
        s, l, t = paArgs[-3:]
        if len(paArgs) > 3:
            thisFunc = paArgs[0].__class__.__name__ + "." + thisFunc
        sys.stderr.write(f">>entering {thisFunc}(line: {line(l, s)!r}, {l}, {t!r})\n")
        try:
            ret = f(*paArgs)
        except Exception as exc:
            sys.stderr.write(f"<<leaving {thisFunc} (exception: {exc})\n")
            raise
        sys.stderr.write(f"<<leaving {thisFunc} (ret: {ret!r})\n")
        return ret

    z.__name__ = f.__name__
    return z


# convenience constants for positional expressions
empty = Empty().set_name("empty")
line_start = LineStart().set_name("line_start")
line_end = LineEnd().set_name("line_end")
string_start = StringStart().set_name("string_start")
string_end = StringEnd().set_name("string_end")

_escapedPunc = Regex(r"\\[\\[\]\/\-\*\.\$\+\^\?()~ ]").set_parse_action(
    lambda s, l, t: t[0][1]
)
_escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").set_parse_action(
    lambda s, l, t: chr(int(t[0].lstrip(r"\0x"), 16))
)
_escapedOctChar = Regex(r"\\0[0-7]+").set_parse_action(
    lambda s, l, t: chr(int(t[0][1:], 8))
)
_singleChar = (
    _escapedPunc | _escapedHexChar | _escapedOctChar | CharsNotIn(r"\]", exact=1)
)
_charRange = Group(_singleChar + Suppress("-") + _singleChar)
_reBracketExpr = (
    Literal("[")
    + Opt("^").set_results_name("negate")
    + Group(OneOrMore(_charRange | _singleChar)).set_results_name("body")
    + Literal("]")
)


def srange(s: str) -> str:
    r"""Helper to easily define string ranges for use in :class:`Word`
    construction. Borrows syntax from regexp ``'[]'`` string range
    definitions::

        srange("[0-9]")   -> "0123456789"
        srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"
        srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"

    The input string must be enclosed in []'s, and the returned string
    is the expanded character set joined into a single string. The
    values enclosed in the []'s may be:

    - a single character
    - an escaped character with a leading backslash (such as ``\-``
      or ``\]``)
    - an escaped hex character with a leading ``'\x'``
      (``\x21``, which is a ``'!'`` character) (``\0x##``
      is also supported for backwards compatibility)
    - an escaped octal character with a leading ``'\0'``
      (``\041``, which is a ``'!'`` character)
    - a range of any of the above, separated by a dash (``'a-z'``,
      etc.)
    - any combination of the above (``'aeiouy'``,
      ``'a-zA-Z0-9_$'``, etc.)
    """
    _expanded = (
        lambda p: p
        if not isinstance(p, ParseResults)
        else "".join(chr(c) for c in range(ord(p[0]), ord(p[1]) + 1))
    )
    try:
        return "".join(_expanded(part) for part in _reBracketExpr.parse_string(s).body)
    except Exception as e:
        return ""


def token_map(func, *args) -> ParseAction:
    """Helper to define a parse action by mapping a function to all
    elements of a :class:`ParseResults` list. If any additional args are passed,
    they are forwarded to the given function as additional arguments
    after the token, as in
    ``hex_integer = Word(hexnums).set_parse_action(token_map(int, 16))``,
    which will convert the parsed data to an integer using base 16.

    Example (compare the last to example in :class:`ParserElement.transform_string`::

        hex_ints = Word(hexnums)[1, ...].set_parse_action(token_map(int, 16))
        hex_ints.run_tests('''
            00 11 22 aa FF 0a 0d 1a
            ''')

        upperword = Word(alphas).set_parse_action(token_map(str.upper))
        upperword[1, ...].run_tests('''
            my kingdom for a horse
            ''')

        wd = Word(alphas).set_parse_action(token_map(str.title))
        wd[1, ...].set_parse_action(' '.join).run_tests('''
            now is the winter of our discontent made glorious summer by this sun of york
            ''')

    prints::

        00 11 22 aa FF 0a 0d 1a
        [0, 17, 34, 170, 255, 10, 13, 26]

        my kingdom for a horse
        ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE']

        now is the winter of our discontent made glorious summer by this sun of york
        ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York']
    """

    def pa(s, l, t):
        return [func(tokn, *args) for tokn in t]

    func_name = getattr(func, "__name__", getattr(func, "__class__").__name__)
    pa.__name__ = func_name

    return pa


def autoname_elements() -> None:
    """
    Utility to simplify mass-naming of parser elements, for
    generating railroad diagram with named subdiagrams.
    """
    calling_frame = sys._getframe().f_back
    if calling_frame is None:
        return
    calling_frame = typing.cast(types.FrameType, calling_frame)
    for name, var in calling_frame.f_locals.items():
        if isinstance(var, ParserElement) and not var.customName:
            var.set_name(name)


dbl_quoted_string = Combine(
    Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*') + '"'
).set_name("string enclosed in double quotes")

sgl_quoted_string = Combine(
    Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*") + "'"
).set_name("string enclosed in single quotes")

quoted_string = Combine(
    (Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*') + '"').set_name(
        "double quoted string"
    )
    | (Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*") + "'").set_name(
        "single quoted string"
    )
).set_name("quoted string using single or double quotes")

python_quoted_string = Combine(
    (Regex(r'"""(?:[^"\\]|""(?!")|"(?!"")|\\.)*', flags=re.MULTILINE) + '"""').set_name(
        "multiline double quoted string"
    )
    ^ (
        Regex(r"'''(?:[^'\\]|''(?!')|'(?!'')|\\.)*", flags=re.MULTILINE) + "'''"
    ).set_name("multiline single quoted string")
    ^ (Regex(r'"(?:[^"\n\r\\]|(?:\\")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*') + '"').set_name(
        "double quoted string"
    )
    ^ (Regex(r"'(?:[^'\n\r\\]|(?:\\')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*") + "'").set_name(
        "single quoted string"
    )
).set_name("Python quoted string")

unicode_string = Combine("u" + quoted_string.copy()).set_name("unicode string literal")


alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]")
punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]")

# build list of built-in expressions, for future reference if a global default value
# gets updated
_builtin_exprs: List[ParserElement] = [
    v for v in vars().values() if isinstance(v, ParserElement)
]

# backward compatibility names
# fmt: off
sglQuotedString = sgl_quoted_string
dblQuotedString = dbl_quoted_string
quotedString = quoted_string
unicodeString = unicode_string
lineStart = line_start
lineEnd = line_end
stringStart = string_start
stringEnd = string_end

@replaced_by_pep8(null_debug_action)
def nullDebugAction(): ...

@replaced_by_pep8(trace_parse_action)
def traceParseAction(): ...

@replaced_by_pep8(condition_as_parse_action)
def conditionAsParseAction(): ...

@replaced_by_pep8(token_map)
def tokenMap(): ...
# fmt: on
python3.12/site-packages/pip/_vendor/pyparsing/exceptions.py000064400000022463151732702400020114 0ustar00# exceptions.py

import re
import sys
import typing

from .util import (
    col,
    line,
    lineno,
    _collapse_string_to_ranges,
    replaced_by_pep8,
)
from .unicode import pyparsing_unicode as ppu


class ExceptionWordUnicode(ppu.Latin1, ppu.LatinA, ppu.LatinB, ppu.Greek, ppu.Cyrillic):
    pass


_extract_alphanums = _collapse_string_to_ranges(ExceptionWordUnicode.alphanums)
_exception_word_extractor = re.compile("([" + _extract_alphanums + "]{1,16})|.")


class ParseBaseException(Exception):
    """base exception class for all parsing runtime exceptions"""

    loc: int
    msg: str
    pstr: str
    parser_element: typing.Any  # "ParserElement"
    args: typing.Tuple[str, int, typing.Optional[str]]

    __slots__ = (
        "loc",
        "msg",
        "pstr",
        "parser_element",
        "args",
    )

    # Performance tuning: we construct a *lot* of these, so keep this
    # constructor as small and fast as possible
    def __init__(
        self,
        pstr: str,
        loc: int = 0,
        msg: typing.Optional[str] = None,
        elem=None,
    ):
        self.loc = loc
        if msg is None:
            self.msg = pstr
            self.pstr = ""
        else:
            self.msg = msg
            self.pstr = pstr
        self.parser_element = elem
        self.args = (pstr, loc, msg)

    @staticmethod
    def explain_exception(exc, depth=16):
        """
        Method to take an exception and translate the Python internal traceback into a list
        of the pyparsing expressions that caused the exception to be raised.

        Parameters:

        - exc - exception raised during parsing (need not be a ParseException, in support
          of Python exceptions that might be raised in a parse action)
        - depth (default=16) - number of levels back in the stack trace to list expression
          and function names; if None, the full stack trace names will be listed; if 0, only
          the failing input line, marker, and exception string will be shown

        Returns a multi-line string listing the ParserElements and/or function names in the
        exception's stack trace.
        """
        import inspect
        from .core import ParserElement

        if depth is None:
            depth = sys.getrecursionlimit()
        ret = []
        if isinstance(exc, ParseBaseException):
            ret.append(exc.line)
            ret.append(" " * (exc.column - 1) + "^")
        ret.append(f"{type(exc).__name__}: {exc}")

        if depth > 0:
            callers = inspect.getinnerframes(exc.__traceback__, context=depth)
            seen = set()
            for i, ff in enumerate(callers[-depth:]):
                frm = ff[0]

                f_self = frm.f_locals.get("self", None)
                if isinstance(f_self, ParserElement):
                    if not frm.f_code.co_name.startswith(
                        ("parseImpl", "_parseNoCache")
                    ):
                        continue
                    if id(f_self) in seen:
                        continue
                    seen.add(id(f_self))

                    self_type = type(f_self)
                    ret.append(
                        f"{self_type.__module__}.{self_type.__name__} - {f_self}"
                    )

                elif f_self is not None:
                    self_type = type(f_self)
                    ret.append(f"{self_type.__module__}.{self_type.__name__}")

                else:
                    code = frm.f_code
                    if code.co_name in ("wrapper", "<module>"):
                        continue

                    ret.append(code.co_name)

                depth -= 1
                if not depth:
                    break

        return "\n".join(ret)

    @classmethod
    def _from_exception(cls, pe):
        """
        internal factory method to simplify creating one type of ParseException
        from another - avoids having __init__ signature conflicts among subclasses
        """
        return cls(pe.pstr, pe.loc, pe.msg, pe.parser_element)

    @property
    def line(self) -> str:
        """
        Return the line of text where the exception occurred.
        """
        return line(self.loc, self.pstr)

    @property
    def lineno(self) -> int:
        """
        Return the 1-based line number of text where the exception occurred.
        """
        return lineno(self.loc, self.pstr)

    @property
    def col(self) -> int:
        """
        Return the 1-based column on the line of text where the exception occurred.
        """
        return col(self.loc, self.pstr)

    @property
    def column(self) -> int:
        """
        Return the 1-based column on the line of text where the exception occurred.
        """
        return col(self.loc, self.pstr)

    # pre-PEP8 compatibility
    @property
    def parserElement(self):
        return self.parser_element

    @parserElement.setter
    def parserElement(self, elem):
        self.parser_element = elem

    def __str__(self) -> str:
        if self.pstr:
            if self.loc >= len(self.pstr):
                foundstr = ", found end of text"
            else:
                # pull out next word at error location
                found_match = _exception_word_extractor.match(self.pstr, self.loc)
                if found_match is not None:
                    found = found_match.group(0)
                else:
                    found = self.pstr[self.loc : self.loc + 1]
                foundstr = (", found %r" % found).replace(r"\\", "\\")
        else:
            foundstr = ""
        return f"{self.msg}{foundstr}  (at char {self.loc}), (line:{self.lineno}, col:{self.column})"

    def __repr__(self):
        return str(self)

    def mark_input_line(
        self, marker_string: typing.Optional[str] = None, *, markerString: str = ">!<"
    ) -> str:
        """
        Extracts the exception line from the input string, and marks
        the location of the exception with a special symbol.
        """
        markerString = marker_string if marker_string is not None else markerString
        line_str = self.line
        line_column = self.column - 1
        if markerString:
            line_str = "".join(
                (line_str[:line_column], markerString, line_str[line_column:])
            )
        return line_str.strip()

    def explain(self, depth=16) -> str:
        """
        Method to translate the Python internal traceback into a list
        of the pyparsing expressions that caused the exception to be raised.

        Parameters:

        - depth (default=16) - number of levels back in the stack trace to list expression
          and function names; if None, the full stack trace names will be listed; if 0, only
          the failing input line, marker, and exception string will be shown

        Returns a multi-line string listing the ParserElements and/or function names in the
        exception's stack trace.

        Example::

            expr = pp.Word(pp.nums) * 3
            try:
                expr.parse_string("123 456 A789")
            except pp.ParseException as pe:
                print(pe.explain(depth=0))

        prints::

            123 456 A789
                    ^
            ParseException: Expected W:(0-9), found 'A'  (at char 8), (line:1, col:9)

        Note: the diagnostic output will include string representations of the expressions
        that failed to parse. These representations will be more helpful if you use `set_name` to
        give identifiable names to your expressions. Otherwise they will use the default string
        forms, which may be cryptic to read.

        Note: pyparsing's default truncation of exception tracebacks may also truncate the
        stack of expressions that are displayed in the ``explain`` output. To get the full listing
        of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True``
        """
        return self.explain_exception(self, depth)

    # fmt: off
    @replaced_by_pep8(mark_input_line)
    def markInputline(self): ...
    # fmt: on


class ParseException(ParseBaseException):
    """
    Exception thrown when a parse expression doesn't match the input string

    Example::

        try:
            Word(nums).set_name("integer").parse_string("ABC")
        except ParseException as pe:
            print(pe)
            print("column: {}".format(pe.column))

    prints::

       Expected integer (at char 0), (line:1, col:1)
        column: 1

    """


class ParseFatalException(ParseBaseException):
    """
    User-throwable exception thrown when inconsistent parse content
    is found; stops all parsing immediately
    """


class ParseSyntaxException(ParseFatalException):
    """
    Just like :class:`ParseFatalException`, but thrown internally
    when an :class:`ErrorStop<And._ErrorStop>` ('-' operator) indicates
    that parsing is to stop immediately because an unbacktrackable
    syntax error has been found.
    """


class RecursiveGrammarException(Exception):
    """
    Exception thrown by :class:`ParserElement.validate` if the
    grammar could be left-recursive; parser may need to enable
    left recursion using :class:`ParserElement.enable_left_recursion<ParserElement.enable_left_recursion>`
    """

    def __init__(self, parseElementList):
        self.parseElementTrace = parseElementList

    def __str__(self) -> str:
        return f"RecursiveGrammarException: {self.parseElementTrace}"
python3.12/site-packages/pip/_vendor/pyparsing/diagram/__pycache__/__init__.cpython-312.pyc000064400000064354151732702400025444 0ustar00�

R`i�^���ddlZddlmZddlZddlmZmZmZmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlZdZe
e�Zeddefd	ej(ej*fd
efg�Z	ed�ZGd�d
ej2�ZGd�dej2�ZGd�dee�Zd,deedefd�Zdddefd�Z				d-dej>dej(e dede!de!deefd�Z"dedeej>de!fd �Z#Gd!�d"�Z$Gd#�d$�Z%dej>de!fd%�Z&d&�Z'deej>fd'�Z(e'						d.dej>d(ej(ed)e%ded
ed*ede!de!dej(efd+��Z)y)/�N)�	pyparsing)�List�
NamedTuple�Generic�TypeVar�Dict�Callable�Set�Iterable)�Template)�StringIOa�{% if not embed %}
<!DOCTYPE html>
<html>
<head>
{% endif %}
    {% if not head %}
        <style>
            .railroad-heading {
                font-family: monospace;
            }
        </style>
    {% else %}
        {{ head | safe }}
    {% endif %}
{% if not embed %}
</head>
<body>
{% endif %}
{{ body | safe }}
{% for diagram in diagrams %}
    <div class="railroad-group">
        <h1 class="railroad-heading">{{ diagram.title }}</h1>
        <div class="railroad-description">{{ diagram.text }}</div>
        <div class="railroad-svg">
            {{ diagram.svg }}
        </div>
    </div>
{% endfor %}
{% if not embed %}
</body>
</html>
{% endif %}
�NamedDiagram�name�diagram�index�Tc�&��eZdZdZdZ�fd�Z�xZS)�EachItemz�
    Custom railroad item to compose a:
    - Group containing a
      - OneOrMore containing a
        - Choice of the elements in the Each
    with the group label indicating that all must be matched
    z[ALL]c���tjt|�dz
g|���}tj|��}t�|�||j��y)N���item)�label)�railroad�Choice�len�	OneOrMore�super�__init__�	all_label)�self�items�choice_item�one_or_more_item�	__class__s    ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyparsing/diagram/__init__.pyrzEachItem.__init__PsF����o�o�c�%�j�1�n�=�u�=��#�-�-�;�?��
���)�����@�)�__name__�
__module__�__qualname__�__doc__r r�
__classcell__�r%s@r&rrEs�����I�A�Ar'rc�(��eZdZdZdef�fd�Z�xZS)�
AnnotatedItemzC
    Simple subclass of Group that creates an annotation label
    rc�Z��t�|�||rdj|���y|��y)Nz[{}]�rr)rr�format)r!rrr%s   �r&rzAnnotatedItem.__init__[s(���
���d�%�&�-�-��*>��S�U��Sr')r(r)r*r+�strrr,r-s@r&r/r/Vs����T�c�T�Tr'r/c�n�eZdZdZdedefdedefd�Ze	dedefddfd	��Z
ed
��Zdefd�Z
y)
�EditablePartialz�
    Acts like a functools.partial, but can be edited. In other words, it represents a type that hasn't yet been
    constructed.
    �func.�args�kwargsc�.�||_||_||_y�N�r6r7r8)r!r6r7r8s    r&rzEditablePartial.__init__hs����	���	���r'�return�EditablePartial[T]c�0�t|t|�|��S)z�
        If you call this function in the same way that you would call the constructor, it will store the arguments
        as you expect. For example EditablePartial.from_call(Fraction, 1, 3)() == Fraction(1, 3)
        r;)r5�list)�clsr6r7r8s    r&�	from_callzEditablePartial.from_callms���D�t�D�z�&�I�Ir'c� �|jdS)Nr)r8�r!s r&rzEditablePartial.nameus���{�{�6�"�"r'c�8�|jj�}|jj�}tj|j
�}|j|jvr||j|j�z
}|j
|i|��S)z<
        Evaluate the partial and return the result
        )r7�copyr8�inspect�getfullargspecr6�varargs�pop)r!r7r8�arg_specs    r&�__call__zEditablePartial.__call__ys}���y�y�~�~������!�!�#���)�)�$�)�)�4�����t�{�{�*��F�J�J�x�/�/�0�0�D��t�y�y�$�)�&�)�)r'N)r(r)r*r+r	rr?�dictr�classmethodrA�propertyrrK�r'r&r5r5_sz����X�c�1�f�-��T��4��
�J�X�c�1�f�-�J�CW�J��J��#��#�
*�!�
*r'r5�diagramsr<c���g}|D]�}|j��t�}	|jd�}|jj|j|��|j}|jdk(r|dz
}|j|d|j�d����tjd||d�|��S#t
$r(|jj
|j�Y��wxYw)	z�
    Given a list of NamedDiagram, produce a single HTML string that visualises those diagrams
    :params kwargs: kwargs to be passed in to the template
    �css)rRrz (root)�)�title�text�svg)rP�embedrO)
rr
�get�writeStandalone�write�AttributeError�writeSvgrr�append�getvalue�template�render)rPrWr8�datar�iorRrTs        r&�railroad_to_htmlrc�s���
�D����?�?�"��
�Z��	/��*�*�U�#�C��O�O�+�+�B�H�H�#�+�>������=�=�A���Y��E����e�R����
�F�G���?�?�@�D��@��@�@���	/��O�O�$�$�R�X�X�.�	/�s�8B5�5.C&�%C&�partialr=c�~�t|t�r;t|j�|_t|j�|_|�St|t
�r|D�cgc]
}t|���c}St|t�r-|j�D��cic]\}}|t|���c}}S|Scc}wcc}}w)zS
    Recursively resolves a collection of Partials into whatever type they are
    )�
isinstancer5�resolve_partialr7r8r?rLr")rd�x�keys   r&rgrg�s����'�?�+�&�w�|�|�4���(����8����y��	�G�T�	"�,3�4�G�q���"�G�4�4�	�G�T�	"�6=�m�m�o�F�o�F�C���_�Q�'�'�o�F�F����	5��Fs� B4�B9�element�diagram_kwargs�vertical�show_results_names�show_groupsc��t|xsi��}t||d|||��t|�}||vr-|js
d||_||j||d��t
|jj��}t|�dkDr�t�}g}	|D]Z}
|
jdk(r�|
j�� |
j|vs�/|j|
j�|	j|
��\|	D�cgc]
}t|���}}n|D�cgc]
}t|���}}t|d	��
�Scc}wcc}w)a�
    Convert a pyparsing element tree into a list of diagrams. This is the recommended entrypoint to diagram
    creation if you want to access the Railroad tree before it is converted to HTML
    :param element: base element of the parser being diagrammed
    :param diagram_kwargs: kwargs to pass to the Diagram() constructor
    :param vertical: (optional) - int - limit at which number of alternatives should be
       shown vertically instead of horizontally
    :param show_results_names - bool to indicate whether results name annotations should be
       included in the diagram
    :param show_groups - bool to indicate whether groups should be highlighted with an unlabeled
       surrounding box
    )rkN)�lookup�parentrlrmrnrST)�forcerz...c��|jSr:�r)�diags r&�<lambda>zto_railroad.<locals>.<lambda>�s��T�Z�Zr')ri)�ConverterState�_to_diagram_element�id�
customNamer�mark_for_extractionr?rP�valuesr�set�addr]rg�sorted)
rjrkrlrmrnrp�root_id�diags�seen�
deduped_diags�drd�resolveds
             r&�to_railroadr��s;��(�>�+?�R�
@�F������-��
���k�G��&���!�!�#%�F�7�O� ��w��+�+�G�V�4�+�H�
����'�'�)�*�E�
�5�z�A�~��u���
��A��v�v�����v�v�!�a�f�f�D�&8������� ��$�$�Q�'�
�=J�J�M��O�G�,�M��J�=B�B�E��O�G�,�E��B��(� 7�8�8��K��Cs�>D9�D>�
specification�exprsc�6�|�ytt|��|k\S)zF
    Returns true if we should return a vertical list of elements
    F)r�_visible_exprs)r�r�s  r&�_should_verticalr��s"������>�%�(�)�]�:�:r'c��eZdZdZ		ddej
dedededede	jefd	�Z	dd
eddded
efd�Z
y)�ElementStatez<
    State recorded for an individual pyparsing Element
    Nrj�	convertedrq�numberr�parent_indexc�t�||_||_||_||_||_||_d|_d|_y�NF)rjrr�rqr�r��extract�complete)r!rjr�rqr�rr�s       r&rzElementState.__init__�s=��18���*.��	�*3���'-���!���2>���"���#��
r'�el_id�staterwrrc��d|_|jsC|r||_n9|jjr|jj|_nd|_|s!|jr(t|j�r|j
|�yyy)a�
        Called when this instance has been seen twice, and thus should eventually be extracted into a sub-diagram
        :param el_id: id of the element
        :param state: element/diagram state tracker
        :param name: name to use for this element's text
        :param force: If true, force extraction now, regardless of the state of this. Only useful for extracting the
        root element when we know we're finished
        TrSN)r�rrjrzr��_worth_extracting�extract_into_diagram)r!r�r�rrrs     r&r{z ElementState.mark_for_extractionsp������y�y�� ��	����(�(� �L�L�3�3��	���	�
�T�]�]�'8����'F��&�&�u�-�(G�]r')NNr�)r(r)r*r+r�
ParserElementr5�intr3�typing�Optionalr�boolr{rOr'r&r�r��s�����-1�$��(�(�$�#�$� �	$�
�$��
$��o�o�c�*�$�6TY�.��.�!1�.�9<�.�LP�.r'r�c��eZdZdZddej
efd�Zdede	fd�Z
dede	fd	�Zdefd
�Zdefd�Z
defd�Zdefd
�Zdefd�Zy)rwzR
    Stores some state that persists between recursions into the element tree
    Nrkc�p�i|_i|_d|_d|_|xsi|_t�|_y)Nrr)�_element_diagram_statesrP�
unnamed_indexrrkr}�extracted_diagram_names)r!rks  r&rzConverterState.__init__9s7��@B��$�BD��
�"#�����
�$2�$8�b���14���$r'ri�valuec�"�||j|<yr:�r�)r!rir�s   r&�__setitem__zConverterState.__setitem__Fs��,1��$�$�S�)r'r<c� �|j|Sr:r��r!ris  r&�__getitem__zConverterState.__getitem__Is���+�+�C�0�0r'c��|j|=yr:r�r�s  r&�__delitem__zConverterState.__delitem__Ls���(�(��-r'c��||jvSr:r�r�s  r&�__contains__zConverterState.__contains__Os���d�2�2�2�2r'c�D�|xjdz
c_|jS)zT
        Generate a number used in the name of an otherwise unnamed diagram
        r)r�rCs r&�generate_unnamedzConverterState.generate_unnamedRs!��	
���a����!�!�!r'c�D�|xjdz
c_|jS)z;
        Generate a number used to index a diagram
        rrtrCs r&�generate_indexzConverterState.generate_indexYs��	
�
�
�a��
��z�z�r'r�c	���||}|jr�tjtj|j
��}d|jjvr||jjd<n>d|jjvr&||jjd|j<|jjtjk(r|jjd}n|j}tjt|j
tjtj|fi|j��|j��|j|<||=y)z�
        Used when we encounter the same token twice in the same tree. When this
        happens, we replace all instances of that token with a terminal, and
        create a new subdiagram for the token
        �rUrr")rrrN)rqr5rAr�NonTerminalrr8r�r�r6�Groupr�Diagramrkr�rP)r!r��position�ret�contents     r&r�z#ConverterState.extract_into_diagram`s(����;���?�?�!�+�+�H�,@�,@�x�}�}�+�U�C�����/�/�/�14����&�&�v�.��H�O�O�2�2�2�IL����&�&�w�/��0E�0E�F����"�"�h�n�n�4��(�(�/�/��7�G��(�(�G�.�8�8�����#�-�-�� � �'��-1�-@�-@���/�/�
 9� 
��
�
�e��
��Kr'r:)r(r)r*r+r�r�rLrr�r�r�r�r�r�r�r�r�rOr'r&rwrw4s~���7�v���t�'<�7�2�s�2�<�2�1�s�1�|�1�.�s�.�3��3�"�#�"�����#�r'rwc�F�|j�}td�|D��S)z�
    Returns true if this element is worth having its own sub-diagram. Simply, if any of its children
    themselves have children, then its complex enough to extract
    c3�<K�|]}|j����y�wr:)�recurse)�.0�childs  r&�	<genexpr>z$_worth_extracting.<locals>.<genexpr>�s����5�H�5�u�}�}��H�s�)r��any)rj�childrens  r&r�r��s!��
��� �H��5�H�5�5�5r'c����						ddtjdtjtdt
dtdtdtdtdtd	tjtf�fd
�
}|S)z�
    decorator to ensure enhancements to a diagram item (such as results name annotations)
    get applied on return from _to_diagram_element (we do this since there are several
    returns in _to_diagram_element)
    rjrqrprlr�	name_hintrmrnr<c
����
||||||||�}|rI|�G|j}	|	r9|	|jrdndz
}	tjtj
||	��}|S)NrS�*r1)�resultsName�modalResultsr5rArr�)rjrqrprlrr�rmrnr��element_results_name�fns          �r&�_innerz0_apply_diagram_item_enhancements.<locals>._inner�s|������������	
���#�/�#*�#6�#6� �#�$�g�.B�.B���K�$�%�/�/��N�N��4H�0����
r'�NNrNFF)	rr�r�r�r5rwr�r3r�)r�r�s` r&� _apply_diagram_item_enhancementsr��s����"&����#(�!���(�(������0�����	�
���
�!����
����	)��B�Mr'c���tjtjtjjf}|D�cgc](}|j
s|jst||�s|��*c}Scc}wr:)r�ParseElementEnhance�
PositionToken�And�
_ErrorStoprzr�rf)r��non_diagramming_exprs�es   r&r�r��sg���%�%�����
�
� � ������A�����
�
��A�?T�1U�	
�����s�-A.rqrpr�c
���|j�}|xs$|jxs|jj}	t	|�}
|j
}|jsNt
|tjf�r3|r1|djs|	}nd}t|j|||||||��St|�r�|
|vrJ||
}
|
j|
||��tjtj |
j"��}|S|
|j$vrAtjtj |j$|
j&d��}|St
|tj(�r�|syt+t-d�|D���dk(r:tjtj.d	t1t+|���
�}�n�t3||�r'tjtj4g��}�n�tjtj6g��}�n\t
|tj8tj:f�r^|syt3||�r(tjtj<dg��}�n�tjtj>g��}�n�t
|tj@�r |sytjtBg��}�n�t
|tjD�rtjtFdd	�
�}�nbt
|tjH�rtjtFdd	�
�}�n*t
|tjJ�rtjtFdd	�
�}�n�t
|tjL�rH|rtjtFd	d	�
�}�n�tjtjLd	d	�
�}�n�t
|tjN�rmtQ|�jjS�}|dk(r'tjtj6g��}�n'tjtF|d	�
�}�n	t
|tjT�r'tjtjVd	��}�n�t
|tj.�r'tjtj.d	��}�n�t
|tjX�r'tjtjXd	��}�nFt
|tjL�r(tjtjLd|��}�nt
|tjZ�r|jsd}n�t
|tj\�r&tjtj6g��}n�t+|�dkDr)|s'tjtjLd	|	��}ndt+|�dkDr&tjtj6g��}n0tjtj^|j`�}|}|�ytc|||||je���||
<|jr ||
j|
||j�d}|D]�}d|j&vr|j&djg|d�t|||||||��}|�Ed|j&vr||j&d<�bd|j&vs�q||j&d|<|dz
}��d|j&vs��|j&d|=��|rjd|j&vrt+|j&d�dk(sd|j&vr3|j&d�$tjtj^|	�}|
|vr
d||
_4|
|vrp||
jjra||
jhrR|jm|
�|�?tjtj |j$|
j&d��}|S)ay
    Recursively converts a PyParsing Element to a railroad Element
    :param lookup: The shared converter state that keeps track of useful things
    :param index: The index of this element within the parent
    :param parent: The parent of this element in the output tree
    :param vertical: Controls at what point we make a list of elements vertical. If this is an integer (the default),
    it sets the threshold of the number of items before we go vertical. If True, always go vertical, if False, never
    do so
    :param name_hint: If provided, this will override the generated name
    :param show_results_names: bool flag indicating whether to add annotations for results names
    :returns: The converted version of the input element, but as a Partial that hasn't yet been constructed
    :param show_groups: bool flag indicating whether to show groups using bounding box
    rN)rqrprlrr�rmrn)rr�rc3�LK�|]}|j|jf���y�wr:)rr�)r�r�s  r&r�z&_to_diagram_element.<locals>.<genexpr>s����:�E�q�A�F�F�A�M�M�*�E�s�"$rrS)r�repeat)r"�NOT)rr�	LOOKAHEAD�
LOOKBEHIND�tokenconverterrr1)rjr�rqr�r�r")rqrprlrrmrnrT)7r�rzr%r(ryr�rfr�Locatedrx�exprr�r{r5rArr�rrPr8r�rr}rr3r��Stack�Sequence�Or�
MatchFirstr�HorizontalChoice�Eachr�NotAnyr/�
FollowedBy�
PrecededByr��TokenConverter�type�lower�Optr��
ZeroOrMore�Emptyr��Terminal�defaultNamer�r��insertr�r�r�)rjrqrprlrr�rmrnr�rr�r��propagated_name�	looked_upr�r�terminal�ir�rs                    r&rxrx�s���0
�O�O��E��H��*�*�H�g�.?�.?�.H�.H�D�
�w�K�E�"�.�.��������!�!�
�
���Q�x�*�*�&*�O�&*�O�*��L�L�!�!�%��-�'9� +�	�	���!��F�?��u�
�I��)�)�%��i�)�H�!�+�+�H�,@�,@�y�~�~�+�V�C��J�
�f�o�o�
%�"�+�+��$�$�6�?�?�5�+A�+H�+H��+P�,��C��J�
�'�9�=�=�)����s�:�E�:�:�;�q�@�!�+�+��"�"��C��E�
�O�,��C��h��
.�!�+�+�H�N�N�"�+�E�C�!�+�+�H�,=�,=�R�+�H�C�	�G�i�l�l�I�,@�,@�A�	B����H�e�,�!�+�+�H�O�O�Q�b�+�I�C�!�+�+�H�,E�,E�R�+�P�C�	�G�Y�^�^�	,����'�'���'�;��	�G�Y�-�-�	.��'�'�
�U��'�L��	�G�Y�1�1�	2��'�'�
�[�r�'�R��	�G�Y�1�1�	2��'�'�
�\�PR�'�S��	�G�Y�_�_�	-��!�+�+�M��"�+�M�C�!�+�+�H�N�N�"�2�+�N�C�	�G�Y�5�5�	6��W�
�&�&�,�,�.���$�$�!�+�+�H�,=�,=�R�+�H�C�!�+�+�M��R�+�P�C�	�G�Y�]�]�	+��'�'��(9�(9��'�C��	�G�Y�0�0�	1��'�'��(:�(:��'�D��	�G�Y�1�1�	2��'�'��(;�(;�"�'�E��	�G�Y�_�_�	-��'�'��N�N��-A�(�
��
�G�Y�_�_�	-�g�6H�6H���	�G�Y�:�:�	;��'�'��(9�(9��'�D��	�U��a�� 4��'�'����R�t�'�L��	�U��a���'�'��(9�(9��'�D��"�,�,�X�->�->��@S�@S�T����
�{��!������$�$�&��F�5�M�����u�
�)�)�%���9K�9K�L�	�A����c�j�j� ��J�J�w��&�&�q�$�/�"������1�#�
��������#�%)��
�
�6�"��C�J�J�&�)-��
�
�7�#�A�&��Q���
��
�
�
"��
�
�7�#�A�&�3�8�	�C�J�J�	�3�s�z�z�'�':�#;�q�#@��c�j�j� �S�Z�Z��%7�%?��'�'��(9�(9�4�@��
���!%��u�
�����6�%�=�0�0�V�E�]�5K�5K��#�#�E�*��?�!�+�+��$�$�6�?�?�5�+A�+H�+H��+P�,��C��Jr')F)N�FFr�)*r�pip._vendorrr�rrrrrr	r
r�jinja2rrbr
rF�jinja2_template_sourcer_r3r��DiagramItemr�rrr�rr/r5rcrgr�rLr�r�r�r�rwr�r�r�rxrOr'r&�<module>r�s_���!�
�	�	�	����!��F�*�+�����c�]�Y�����0D�0D� E�F��RU��W�����C�L��A�x�~�~�A�"T�H�N�N�T�'*�g�a�j�'*�TA�t�L�1�A�S�A�.
�1�
�a�
�$-1��$��79�
�
$�
$�79��O�O�D�)�79��79��	79�
�79�
�,��
79�t	;��	;�'�	�(?�(?�@�	;�	�	;�;.�;.�|K�K�\6�y�6�6�6�4�6�(�V
�(�9�#:�#:�;�
�"�"����$��L�
�
$�
$�L��O�O�O�,�L�
�L��	L�
�L��
L��L��L��_�_�_�%�L�"�Lr'python3.12/site-packages/pip/_vendor/pyparsing/diagram/__init__.py000064400000057227151732702410021105 0ustar00# mypy: ignore-errors
import railroad
from pip._vendor import pyparsing
import typing
from typing import (
    List,
    NamedTuple,
    Generic,
    TypeVar,
    Dict,
    Callable,
    Set,
    Iterable,
)
from jinja2 import Template
from io import StringIO
import inspect


jinja2_template_source = """\
{% if not embed %}
<!DOCTYPE html>
<html>
<head>
{% endif %}
    {% if not head %}
        <style>
            .railroad-heading {
                font-family: monospace;
            }
        </style>
    {% else %}
        {{ head | safe }}
    {% endif %}
{% if not embed %}
</head>
<body>
{% endif %}
{{ body | safe }}
{% for diagram in diagrams %}
    <div class="railroad-group">
        <h1 class="railroad-heading">{{ diagram.title }}</h1>
        <div class="railroad-description">{{ diagram.text }}</div>
        <div class="railroad-svg">
            {{ diagram.svg }}
        </div>
    </div>
{% endfor %}
{% if not embed %}
</body>
</html>
{% endif %}
"""

template = Template(jinja2_template_source)

# Note: ideally this would be a dataclass, but we're supporting Python 3.5+ so we can't do this yet
NamedDiagram = NamedTuple(
    "NamedDiagram",
    [("name", str), ("diagram", typing.Optional[railroad.DiagramItem]), ("index", int)],
)
"""
A simple structure for associating a name with a railroad diagram
"""

T = TypeVar("T")


class EachItem(railroad.Group):
    """
    Custom railroad item to compose a:
    - Group containing a
      - OneOrMore containing a
        - Choice of the elements in the Each
    with the group label indicating that all must be matched
    """

    all_label = "[ALL]"

    def __init__(self, *items):
        choice_item = railroad.Choice(len(items) - 1, *items)
        one_or_more_item = railroad.OneOrMore(item=choice_item)
        super().__init__(one_or_more_item, label=self.all_label)


class AnnotatedItem(railroad.Group):
    """
    Simple subclass of Group that creates an annotation label
    """

    def __init__(self, label: str, item):
        super().__init__(item=item, label="[{}]".format(label) if label else label)


class EditablePartial(Generic[T]):
    """
    Acts like a functools.partial, but can be edited. In other words, it represents a type that hasn't yet been
    constructed.
    """

    # We need this here because the railroad constructors actually transform the data, so can't be called until the
    # entire tree is assembled

    def __init__(self, func: Callable[..., T], args: list, kwargs: dict):
        self.func = func
        self.args = args
        self.kwargs = kwargs

    @classmethod
    def from_call(cls, func: Callable[..., T], *args, **kwargs) -> "EditablePartial[T]":
        """
        If you call this function in the same way that you would call the constructor, it will store the arguments
        as you expect. For example EditablePartial.from_call(Fraction, 1, 3)() == Fraction(1, 3)
        """
        return EditablePartial(func=func, args=list(args), kwargs=kwargs)

    @property
    def name(self):
        return self.kwargs["name"]

    def __call__(self) -> T:
        """
        Evaluate the partial and return the result
        """
        args = self.args.copy()
        kwargs = self.kwargs.copy()

        # This is a helpful hack to allow you to specify varargs parameters (e.g. *args) as keyword args (e.g.
        # args=['list', 'of', 'things'])
        arg_spec = inspect.getfullargspec(self.func)
        if arg_spec.varargs in self.kwargs:
            args += kwargs.pop(arg_spec.varargs)

        return self.func(*args, **kwargs)


def railroad_to_html(diagrams: List[NamedDiagram], embed=False, **kwargs) -> str:
    """
    Given a list of NamedDiagram, produce a single HTML string that visualises those diagrams
    :params kwargs: kwargs to be passed in to the template
    """
    data = []
    for diagram in diagrams:
        if diagram.diagram is None:
            continue
        io = StringIO()
        try:
            css = kwargs.get('css')
            diagram.diagram.writeStandalone(io.write, css=css)
        except AttributeError:
            diagram.diagram.writeSvg(io.write)
        title = diagram.name
        if diagram.index == 0:
            title += " (root)"
        data.append({"title": title, "text": "", "svg": io.getvalue()})

    return template.render(diagrams=data, embed=embed, **kwargs)


def resolve_partial(partial: "EditablePartial[T]") -> T:
    """
    Recursively resolves a collection of Partials into whatever type they are
    """
    if isinstance(partial, EditablePartial):
        partial.args = resolve_partial(partial.args)
        partial.kwargs = resolve_partial(partial.kwargs)
        return partial()
    elif isinstance(partial, list):
        return [resolve_partial(x) for x in partial]
    elif isinstance(partial, dict):
        return {key: resolve_partial(x) for key, x in partial.items()}
    else:
        return partial


def to_railroad(
    element: pyparsing.ParserElement,
    diagram_kwargs: typing.Optional[dict] = None,
    vertical: int = 3,
    show_results_names: bool = False,
    show_groups: bool = False,
) -> List[NamedDiagram]:
    """
    Convert a pyparsing element tree into a list of diagrams. This is the recommended entrypoint to diagram
    creation if you want to access the Railroad tree before it is converted to HTML
    :param element: base element of the parser being diagrammed
    :param diagram_kwargs: kwargs to pass to the Diagram() constructor
    :param vertical: (optional) - int - limit at which number of alternatives should be
       shown vertically instead of horizontally
    :param show_results_names - bool to indicate whether results name annotations should be
       included in the diagram
    :param show_groups - bool to indicate whether groups should be highlighted with an unlabeled
       surrounding box
    """
    # Convert the whole tree underneath the root
    lookup = ConverterState(diagram_kwargs=diagram_kwargs or {})
    _to_diagram_element(
        element,
        lookup=lookup,
        parent=None,
        vertical=vertical,
        show_results_names=show_results_names,
        show_groups=show_groups,
    )

    root_id = id(element)
    # Convert the root if it hasn't been already
    if root_id in lookup:
        if not element.customName:
            lookup[root_id].name = ""
        lookup[root_id].mark_for_extraction(root_id, lookup, force=True)

    # Now that we're finished, we can convert from intermediate structures into Railroad elements
    diags = list(lookup.diagrams.values())
    if len(diags) > 1:
        # collapse out duplicate diags with the same name
        seen = set()
        deduped_diags = []
        for d in diags:
            # don't extract SkipTo elements, they are uninformative as subdiagrams
            if d.name == "...":
                continue
            if d.name is not None and d.name not in seen:
                seen.add(d.name)
                deduped_diags.append(d)
        resolved = [resolve_partial(partial) for partial in deduped_diags]
    else:
        # special case - if just one diagram, always display it, even if
        # it has no name
        resolved = [resolve_partial(partial) for partial in diags]
    return sorted(resolved, key=lambda diag: diag.index)


def _should_vertical(
    specification: int, exprs: Iterable[pyparsing.ParserElement]
) -> bool:
    """
    Returns true if we should return a vertical list of elements
    """
    if specification is None:
        return False
    else:
        return len(_visible_exprs(exprs)) >= specification


class ElementState:
    """
    State recorded for an individual pyparsing Element
    """

    # Note: this should be a dataclass, but we have to support Python 3.5
    def __init__(
        self,
        element: pyparsing.ParserElement,
        converted: EditablePartial,
        parent: EditablePartial,
        number: int,
        name: str = None,
        parent_index: typing.Optional[int] = None,
    ):
        #: The pyparsing element that this represents
        self.element: pyparsing.ParserElement = element
        #: The name of the element
        self.name: typing.Optional[str] = name
        #: The output Railroad element in an unconverted state
        self.converted: EditablePartial = converted
        #: The parent Railroad element, which we store so that we can extract this if it's duplicated
        self.parent: EditablePartial = parent
        #: The order in which we found this element, used for sorting diagrams if this is extracted into a diagram
        self.number: int = number
        #: The index of this inside its parent
        self.parent_index: typing.Optional[int] = parent_index
        #: If true, we should extract this out into a subdiagram
        self.extract: bool = False
        #: If true, all of this element's children have been filled out
        self.complete: bool = False

    def mark_for_extraction(
        self, el_id: int, state: "ConverterState", name: str = None, force: bool = False
    ):
        """
        Called when this instance has been seen twice, and thus should eventually be extracted into a sub-diagram
        :param el_id: id of the element
        :param state: element/diagram state tracker
        :param name: name to use for this element's text
        :param force: If true, force extraction now, regardless of the state of this. Only useful for extracting the
        root element when we know we're finished
        """
        self.extract = True

        # Set the name
        if not self.name:
            if name:
                # Allow forcing a custom name
                self.name = name
            elif self.element.customName:
                self.name = self.element.customName
            else:
                self.name = ""

        # Just because this is marked for extraction doesn't mean we can do it yet. We may have to wait for children
        # to be added
        # Also, if this is just a string literal etc, don't bother extracting it
        if force or (self.complete and _worth_extracting(self.element)):
            state.extract_into_diagram(el_id)


class ConverterState:
    """
    Stores some state that persists between recursions into the element tree
    """

    def __init__(self, diagram_kwargs: typing.Optional[dict] = None):
        #: A dictionary mapping ParserElements to state relating to them
        self._element_diagram_states: Dict[int, ElementState] = {}
        #: A dictionary mapping ParserElement IDs to subdiagrams generated from them
        self.diagrams: Dict[int, EditablePartial[NamedDiagram]] = {}
        #: The index of the next unnamed element
        self.unnamed_index: int = 1
        #: The index of the next element. This is used for sorting
        self.index: int = 0
        #: Shared kwargs that are used to customize the construction of diagrams
        self.diagram_kwargs: dict = diagram_kwargs or {}
        self.extracted_diagram_names: Set[str] = set()

    def __setitem__(self, key: int, value: ElementState):
        self._element_diagram_states[key] = value

    def __getitem__(self, key: int) -> ElementState:
        return self._element_diagram_states[key]

    def __delitem__(self, key: int):
        del self._element_diagram_states[key]

    def __contains__(self, key: int):
        return key in self._element_diagram_states

    def generate_unnamed(self) -> int:
        """
        Generate a number used in the name of an otherwise unnamed diagram
        """
        self.unnamed_index += 1
        return self.unnamed_index

    def generate_index(self) -> int:
        """
        Generate a number used to index a diagram
        """
        self.index += 1
        return self.index

    def extract_into_diagram(self, el_id: int):
        """
        Used when we encounter the same token twice in the same tree. When this
        happens, we replace all instances of that token with a terminal, and
        create a new subdiagram for the token
        """
        position = self[el_id]

        # Replace the original definition of this element with a regular block
        if position.parent:
            ret = EditablePartial.from_call(railroad.NonTerminal, text=position.name)
            if "item" in position.parent.kwargs:
                position.parent.kwargs["item"] = ret
            elif "items" in position.parent.kwargs:
                position.parent.kwargs["items"][position.parent_index] = ret

        # If the element we're extracting is a group, skip to its content but keep the title
        if position.converted.func == railroad.Group:
            content = position.converted.kwargs["item"]
        else:
            content = position.converted

        self.diagrams[el_id] = EditablePartial.from_call(
            NamedDiagram,
            name=position.name,
            diagram=EditablePartial.from_call(
                railroad.Diagram, content, **self.diagram_kwargs
            ),
            index=position.number,
        )

        del self[el_id]


def _worth_extracting(element: pyparsing.ParserElement) -> bool:
    """
    Returns true if this element is worth having its own sub-diagram. Simply, if any of its children
    themselves have children, then its complex enough to extract
    """
    children = element.recurse()
    return any(child.recurse() for child in children)


def _apply_diagram_item_enhancements(fn):
    """
    decorator to ensure enhancements to a diagram item (such as results name annotations)
    get applied on return from _to_diagram_element (we do this since there are several
    returns in _to_diagram_element)
    """

    def _inner(
        element: pyparsing.ParserElement,
        parent: typing.Optional[EditablePartial],
        lookup: ConverterState = None,
        vertical: int = None,
        index: int = 0,
        name_hint: str = None,
        show_results_names: bool = False,
        show_groups: bool = False,
    ) -> typing.Optional[EditablePartial]:
        ret = fn(
            element,
            parent,
            lookup,
            vertical,
            index,
            name_hint,
            show_results_names,
            show_groups,
        )

        # apply annotation for results name, if present
        if show_results_names and ret is not None:
            element_results_name = element.resultsName
            if element_results_name:
                # add "*" to indicate if this is a "list all results" name
                element_results_name += "" if element.modalResults else "*"
                ret = EditablePartial.from_call(
                    railroad.Group, item=ret, label=element_results_name
                )

        return ret

    return _inner


def _visible_exprs(exprs: Iterable[pyparsing.ParserElement]):
    non_diagramming_exprs = (
        pyparsing.ParseElementEnhance,
        pyparsing.PositionToken,
        pyparsing.And._ErrorStop,
    )
    return [
        e
        for e in exprs
        if not (e.customName or e.resultsName or isinstance(e, non_diagramming_exprs))
    ]


@_apply_diagram_item_enhancements
def _to_diagram_element(
    element: pyparsing.ParserElement,
    parent: typing.Optional[EditablePartial],
    lookup: ConverterState = None,
    vertical: int = None,
    index: int = 0,
    name_hint: str = None,
    show_results_names: bool = False,
    show_groups: bool = False,
) -> typing.Optional[EditablePartial]:
    """
    Recursively converts a PyParsing Element to a railroad Element
    :param lookup: The shared converter state that keeps track of useful things
    :param index: The index of this element within the parent
    :param parent: The parent of this element in the output tree
    :param vertical: Controls at what point we make a list of elements vertical. If this is an integer (the default),
    it sets the threshold of the number of items before we go vertical. If True, always go vertical, if False, never
    do so
    :param name_hint: If provided, this will override the generated name
    :param show_results_names: bool flag indicating whether to add annotations for results names
    :returns: The converted version of the input element, but as a Partial that hasn't yet been constructed
    :param show_groups: bool flag indicating whether to show groups using bounding box
    """
    exprs = element.recurse()
    name = name_hint or element.customName or element.__class__.__name__

    # Python's id() is used to provide a unique identifier for elements
    el_id = id(element)

    element_results_name = element.resultsName

    # Here we basically bypass processing certain wrapper elements if they contribute nothing to the diagram
    if not element.customName:
        if isinstance(
            element,
            (
                # pyparsing.TokenConverter,
                # pyparsing.Forward,
                pyparsing.Located,
            ),
        ):
            # However, if this element has a useful custom name, and its child does not, we can pass it on to the child
            if exprs:
                if not exprs[0].customName:
                    propagated_name = name
                else:
                    propagated_name = None

                return _to_diagram_element(
                    element.expr,
                    parent=parent,
                    lookup=lookup,
                    vertical=vertical,
                    index=index,
                    name_hint=propagated_name,
                    show_results_names=show_results_names,
                    show_groups=show_groups,
                )

    # If the element isn't worth extracting, we always treat it as the first time we say it
    if _worth_extracting(element):
        if el_id in lookup:
            # If we've seen this element exactly once before, we are only just now finding out that it's a duplicate,
            # so we have to extract it into a new diagram.
            looked_up = lookup[el_id]
            looked_up.mark_for_extraction(el_id, lookup, name=name_hint)
            ret = EditablePartial.from_call(railroad.NonTerminal, text=looked_up.name)
            return ret

        elif el_id in lookup.diagrams:
            # If we have seen the element at least twice before, and have already extracted it into a subdiagram, we
            # just put in a marker element that refers to the sub-diagram
            ret = EditablePartial.from_call(
                railroad.NonTerminal, text=lookup.diagrams[el_id].kwargs["name"]
            )
            return ret

    # Recursively convert child elements
    # Here we find the most relevant Railroad element for matching pyparsing Element
    # We use ``items=[]`` here to hold the place for where the child elements will go once created
    if isinstance(element, pyparsing.And):
        # detect And's created with ``expr*N`` notation - for these use a OneOrMore with a repeat
        # (all will have the same name, and resultsName)
        if not exprs:
            return None
        if len(set((e.name, e.resultsName) for e in exprs)) == 1:
            ret = EditablePartial.from_call(
                railroad.OneOrMore, item="", repeat=str(len(exprs))
            )
        elif _should_vertical(vertical, exprs):
            ret = EditablePartial.from_call(railroad.Stack, items=[])
        else:
            ret = EditablePartial.from_call(railroad.Sequence, items=[])
    elif isinstance(element, (pyparsing.Or, pyparsing.MatchFirst)):
        if not exprs:
            return None
        if _should_vertical(vertical, exprs):
            ret = EditablePartial.from_call(railroad.Choice, 0, items=[])
        else:
            ret = EditablePartial.from_call(railroad.HorizontalChoice, items=[])
    elif isinstance(element, pyparsing.Each):
        if not exprs:
            return None
        ret = EditablePartial.from_call(EachItem, items=[])
    elif isinstance(element, pyparsing.NotAny):
        ret = EditablePartial.from_call(AnnotatedItem, label="NOT", item="")
    elif isinstance(element, pyparsing.FollowedBy):
        ret = EditablePartial.from_call(AnnotatedItem, label="LOOKAHEAD", item="")
    elif isinstance(element, pyparsing.PrecededBy):
        ret = EditablePartial.from_call(AnnotatedItem, label="LOOKBEHIND", item="")
    elif isinstance(element, pyparsing.Group):
        if show_groups:
            ret = EditablePartial.from_call(AnnotatedItem, label="", item="")
        else:
            ret = EditablePartial.from_call(railroad.Group, label="", item="")
    elif isinstance(element, pyparsing.TokenConverter):
        label = type(element).__name__.lower()
        if label == "tokenconverter":
            ret = EditablePartial.from_call(railroad.Sequence, items=[])
        else:
            ret = EditablePartial.from_call(AnnotatedItem, label=label, item="")
    elif isinstance(element, pyparsing.Opt):
        ret = EditablePartial.from_call(railroad.Optional, item="")
    elif isinstance(element, pyparsing.OneOrMore):
        ret = EditablePartial.from_call(railroad.OneOrMore, item="")
    elif isinstance(element, pyparsing.ZeroOrMore):
        ret = EditablePartial.from_call(railroad.ZeroOrMore, item="")
    elif isinstance(element, pyparsing.Group):
        ret = EditablePartial.from_call(
            railroad.Group, item=None, label=element_results_name
        )
    elif isinstance(element, pyparsing.Empty) and not element.customName:
        # Skip unnamed "Empty" elements
        ret = None
    elif isinstance(element, pyparsing.ParseElementEnhance):
        ret = EditablePartial.from_call(railroad.Sequence, items=[])
    elif len(exprs) > 0 and not element_results_name:
        ret = EditablePartial.from_call(railroad.Group, item="", label=name)
    elif len(exprs) > 0:
        ret = EditablePartial.from_call(railroad.Sequence, items=[])
    else:
        terminal = EditablePartial.from_call(railroad.Terminal, element.defaultName)
        ret = terminal

    if ret is None:
        return

    # Indicate this element's position in the tree so we can extract it if necessary
    lookup[el_id] = ElementState(
        element=element,
        converted=ret,
        parent=parent,
        parent_index=index,
        number=lookup.generate_index(),
    )
    if element.customName:
        lookup[el_id].mark_for_extraction(el_id, lookup, element.customName)

    i = 0
    for expr in exprs:
        # Add a placeholder index in case we have to extract the child before we even add it to the parent
        if "items" in ret.kwargs:
            ret.kwargs["items"].insert(i, None)

        item = _to_diagram_element(
            expr,
            parent=ret,
            lookup=lookup,
            vertical=vertical,
            index=i,
            show_results_names=show_results_names,
            show_groups=show_groups,
        )

        # Some elements don't need to be shown in the diagram
        if item is not None:
            if "item" in ret.kwargs:
                ret.kwargs["item"] = item
            elif "items" in ret.kwargs:
                # If we've already extracted the child, don't touch this index, since it's occupied by a nonterminal
                ret.kwargs["items"][i] = item
                i += 1
        elif "items" in ret.kwargs:
            # If we're supposed to skip this element, remove it from the parent
            del ret.kwargs["items"][i]

    # If all this items children are none, skip this item
    if ret and (
        ("items" in ret.kwargs and len(ret.kwargs["items"]) == 0)
        or ("item" in ret.kwargs and ret.kwargs["item"] is None)
    ):
        ret = EditablePartial.from_call(railroad.Terminal, name)

    # Mark this element as "complete", ie it has all of its children
    if el_id in lookup:
        lookup[el_id].complete = True

    if el_id in lookup and lookup[el_id].extract and lookup[el_id].complete:
        lookup.extract_into_diagram(el_id)
        if ret is not None:
            ret = EditablePartial.from_call(
                railroad.NonTerminal, text=lookup.diagrams[el_id].kwargs["name"]
            )

    return ret
python3.12/site-packages/pip/_vendor/pyparsing/util.py000064400000020736151732702410016712 0ustar00# util.py
import inspect
import warnings
import types
import collections
import itertools
from functools import lru_cache, wraps
from typing import Callable, List, Union, Iterable, TypeVar, cast

_bslash = chr(92)
C = TypeVar("C", bound=Callable)


class __config_flags:
    """Internal class for defining compatibility and debugging flags"""

    _all_names: List[str] = []
    _fixed_names: List[str] = []
    _type_desc = "configuration"

    @classmethod
    def _set(cls, dname, value):
        if dname in cls._fixed_names:
            warnings.warn(
                f"{cls.__name__}.{dname} {cls._type_desc} is {str(getattr(cls, dname)).upper()}"
                f" and cannot be overridden",
                stacklevel=3,
            )
            return
        if dname in cls._all_names:
            setattr(cls, dname, value)
        else:
            raise ValueError(f"no such {cls._type_desc} {dname!r}")

    enable = classmethod(lambda cls, name: cls._set(name, True))
    disable = classmethod(lambda cls, name: cls._set(name, False))


@lru_cache(maxsize=128)
def col(loc: int, strg: str) -> int:
    """
    Returns current column within a string, counting newlines as line separators.
    The first column is number 1.

    Note: the default parsing behavior is to expand tabs in the input string
    before starting the parsing process.  See
    :class:`ParserElement.parse_string` for more
    information on parsing strings containing ``<TAB>`` s, and suggested
    methods to maintain a consistent view of the parsed string, the parse
    location, and line and column positions within the parsed string.
    """
    s = strg
    return 1 if 0 < loc < len(s) and s[loc - 1] == "\n" else loc - s.rfind("\n", 0, loc)


@lru_cache(maxsize=128)
def lineno(loc: int, strg: str) -> int:
    """Returns current line number within a string, counting newlines as line separators.
    The first line is number 1.

    Note - the default parsing behavior is to expand tabs in the input string
    before starting the parsing process.  See :class:`ParserElement.parse_string`
    for more information on parsing strings containing ``<TAB>`` s, and
    suggested methods to maintain a consistent view of the parsed string, the
    parse location, and line and column positions within the parsed string.
    """
    return strg.count("\n", 0, loc) + 1


@lru_cache(maxsize=128)
def line(loc: int, strg: str) -> str:
    """
    Returns the line of text containing loc within a string, counting newlines as line separators.
    """
    last_cr = strg.rfind("\n", 0, loc)
    next_cr = strg.find("\n", loc)
    return strg[last_cr + 1 : next_cr] if next_cr >= 0 else strg[last_cr + 1 :]


class _UnboundedCache:
    def __init__(self):
        cache = {}
        cache_get = cache.get
        self.not_in_cache = not_in_cache = object()

        def get(_, key):
            return cache_get(key, not_in_cache)

        def set_(_, key, value):
            cache[key] = value

        def clear(_):
            cache.clear()

        self.size = None
        self.get = types.MethodType(get, self)
        self.set = types.MethodType(set_, self)
        self.clear = types.MethodType(clear, self)


class _FifoCache:
    def __init__(self, size):
        self.not_in_cache = not_in_cache = object()
        cache = {}
        keyring = [object()] * size
        cache_get = cache.get
        cache_pop = cache.pop
        keyiter = itertools.cycle(range(size))

        def get(_, key):
            return cache_get(key, not_in_cache)

        def set_(_, key, value):
            cache[key] = value
            i = next(keyiter)
            cache_pop(keyring[i], None)
            keyring[i] = key

        def clear(_):
            cache.clear()
            keyring[:] = [object()] * size

        self.size = size
        self.get = types.MethodType(get, self)
        self.set = types.MethodType(set_, self)
        self.clear = types.MethodType(clear, self)


class LRUMemo:
    """
    A memoizing mapping that retains `capacity` deleted items

    The memo tracks retained items by their access order; once `capacity` items
    are retained, the least recently used item is discarded.
    """

    def __init__(self, capacity):
        self._capacity = capacity
        self._active = {}
        self._memory = collections.OrderedDict()

    def __getitem__(self, key):
        try:
            return self._active[key]
        except KeyError:
            self._memory.move_to_end(key)
            return self._memory[key]

    def __setitem__(self, key, value):
        self._memory.pop(key, None)
        self._active[key] = value

    def __delitem__(self, key):
        try:
            value = self._active.pop(key)
        except KeyError:
            pass
        else:
            while len(self._memory) >= self._capacity:
                self._memory.popitem(last=False)
            self._memory[key] = value

    def clear(self):
        self._active.clear()
        self._memory.clear()


class UnboundedMemo(dict):
    """
    A memoizing mapping that retains all deleted items
    """

    def __delitem__(self, key):
        pass


def _escape_regex_range_chars(s: str) -> str:
    # escape these chars: ^-[]
    for c in r"\^-[]":
        s = s.replace(c, _bslash + c)
    s = s.replace("\n", r"\n")
    s = s.replace("\t", r"\t")
    return str(s)


def _collapse_string_to_ranges(
    s: Union[str, Iterable[str]], re_escape: bool = True
) -> str:
    def is_consecutive(c):
        c_int = ord(c)
        is_consecutive.prev, prev = c_int, is_consecutive.prev
        if c_int - prev > 1:
            is_consecutive.value = next(is_consecutive.counter)
        return is_consecutive.value

    is_consecutive.prev = 0  # type: ignore [attr-defined]
    is_consecutive.counter = itertools.count()  # type: ignore [attr-defined]
    is_consecutive.value = -1  # type: ignore [attr-defined]

    def escape_re_range_char(c):
        return "\\" + c if c in r"\^-][" else c

    def no_escape_re_range_char(c):
        return c

    if not re_escape:
        escape_re_range_char = no_escape_re_range_char

    ret = []
    s = "".join(sorted(set(s)))
    if len(s) > 3:
        for _, chars in itertools.groupby(s, key=is_consecutive):
            first = last = next(chars)
            last = collections.deque(
                itertools.chain(iter([last]), chars), maxlen=1
            ).pop()
            if first == last:
                ret.append(escape_re_range_char(first))
            else:
                sep = "" if ord(last) == ord(first) + 1 else "-"
                ret.append(
                    f"{escape_re_range_char(first)}{sep}{escape_re_range_char(last)}"
                )
    else:
        ret = [escape_re_range_char(c) for c in s]

    return "".join(ret)


def _flatten(ll: list) -> list:
    ret = []
    for i in ll:
        if isinstance(i, list):
            ret.extend(_flatten(i))
        else:
            ret.append(i)
    return ret


def _make_synonym_function(compat_name: str, fn: C) -> C:
    # In a future version, uncomment the code in the internal _inner() functions
    # to begin emitting DeprecationWarnings.

    # Unwrap staticmethod/classmethod
    fn = getattr(fn, "__func__", fn)

    # (Presence of 'self' arg in signature is used by explain_exception() methods, so we take
    # some extra steps to add it if present in decorated function.)
    if "self" == list(inspect.signature(fn).parameters)[0]:

        @wraps(fn)
        def _inner(self, *args, **kwargs):
            # warnings.warn(
            #     f"Deprecated - use {fn.__name__}", DeprecationWarning, stacklevel=3
            # )
            return fn(self, *args, **kwargs)

    else:

        @wraps(fn)
        def _inner(*args, **kwargs):
            # warnings.warn(
            #     f"Deprecated - use {fn.__name__}", DeprecationWarning, stacklevel=3
            # )
            return fn(*args, **kwargs)

    _inner.__doc__ = f"""Deprecated - use :class:`{fn.__name__}`"""
    _inner.__name__ = compat_name
    _inner.__annotations__ = fn.__annotations__
    if isinstance(fn, types.FunctionType):
        _inner.__kwdefaults__ = fn.__kwdefaults__
    elif isinstance(fn, type) and hasattr(fn, "__init__"):
        _inner.__kwdefaults__ = fn.__init__.__kwdefaults__
    else:
        _inner.__kwdefaults__ = None
    _inner.__qualname__ = fn.__qualname__
    return cast(C, _inner)


def replaced_by_pep8(fn: C) -> Callable[[Callable], C]:
    """
    Decorator for pre-PEP8 compatibility synonyms, to link them to the new function.
    """
    return lambda other: _make_synonym_function(other.__name__, fn)
python3.12/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-312.pyc000064400000001226151732702410025234 0ustar00�

R`i���8�dZddlmZmZmZmZmZmZmZdZ	gd�Z
y)z;Wrappers to call pyproject.toml-based build backend hooks.
�)�BackendInvalid�BackendUnavailable�BuildBackendHookCaller�HookMissing�UnsupportedOperation�default_subprocess_runner�quiet_subprocess_runnerz1.0.0)rrrrrr	rN)�__doc__�_implrrrrrrr	�__version__�__all__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__init__.py�<module>rs'���������rpython3.12/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_compat.cpython-312.pyc000064400000000647151732702410025125 0ustar00�

R`i���D�dZddlZejdk\rddlZyddlmZy))�tomllib�N)��)�tomli)�__all__�sys�version_infor�pip._vendorr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_compat.py�<module>rs!��
��
����w���,rpython3.12/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-312.pyc000064400000034626151732702420024610 0ustar00�

R`i�.���ddlZddlZddlZddlZddlmZddlmZddlmZ	ddl
mZmZm
Z
ddlmZd�Zd	�ZGd
�de�ZGd�d
e�ZGd�de�ZGd�de�Zdd�Zdd�Zd�ZGd�d�Zy)�N)�contextmanager)�abspath)�join)�STDOUT�
check_call�check_output�)�_in_proc_script_pathc�x�t|dd��5}tj||fi|��ddd�y#1swYyxYw)N�w�utf-8��encoding)�open�json�dump)�obj�path�kwargs�fs    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_impl.py�
write_jsonr
s/��	
�d�C�'�	*�a��	�	�#�q�#�F�#�
+�	*�	*�s�0�9c�r�t|d��5}tj|�cddd�S#1swYyxYw)Nr
r)rr�load)rrs  r�	read_jsonrs%��	
�d�W�	%���y�y��|�
&�	%�	%�s�-�6c��eZdZdZd�Zy)�BackendUnavailablezEWill be raised if the backend cannot be imported in the hook process.c��||_y�N��	traceback��selfr!s  r�__init__zBackendUnavailable.__init__�	��"���N��__name__�
__module__�__qualname__�__doc__r$�r&rrrs
��O�#r&rc�"��eZdZdZ�fd�Z�xZS)�BackendInvalidz)Will be raised if the backend is invalid.c�@��t�|�|�||_||_yr)�superr$�backend_name�backend_path)r#r1r2�message�	__class__s    �rr$zBackendInvalid.__init__s ���
����!�(���(��r&�r(r)r*r+r$�
__classcell__�r4s@rr.r.s���3�)�)r&r.c�"��eZdZdZ�fd�Z�xZS)�HookMissingz>Will be raised on missing hooks (if a fallback can't be used).c�2��t�|�|�||_yr)r0r$�	hook_name)r#r;r4s  �rr$zHookMissing.__init__'s���
����#�"��r&r5r7s@rr9r9%s���H�#�#r&r9c��eZdZdZd�Zy)�UnsupportedOperationzDMay be raised by build_sdist if the backend indicates that it can't.c��||_yrr r"s  rr$zUnsupportedOperation.__init__.r%r&Nr'r,r&rr=r=,s
��N�#r&r=c��tjj�}|r|j|�t	|||��y)zwThe default method of calling the wrapper subprocess.

    This uses :func:`subprocess.check_call` under the hood.
    )�cwd�envN)�os�environ�copy�updater��cmdr@�
extra_environrAs    r�default_subprocess_runnerrI2s/��

�*�*�/�/�
�C���
�
�=�!��s���%r&c��tjj�}|r|j|�t	|||t
��y)zqCall the subprocess while suppressing output.

    This uses :func:`subprocess.check_output` under the hood.
    )r@rA�stderrN)rBrCrDrErrrFs    r�quiet_subprocess_runnerrL>s1��

�*�*�/�/�
�C���
�
�=�!���#�3�v�6r&c���tjj|�rtd��tjj	|�}tjjtjj
||��}tjj|�}tjj|�}tjj||g�|k7rtd��|S)z�Normalise and check a backend path.

    Ensure that the requested backend path is specified as a relative path,
    and resolves to a location under the given source tree.

    Return an absolute version of the requested path.
    zpaths must be relativez paths must be inside source tree)	rBr�isabs�
ValueErrorr�normpathr�normcase�commonprefix)�source_tree�	requested�
abs_source�
abs_requested�norm_source�norm_requesteds      r�norm_and_checkrYJs���
�w�w�}�}�Y���1�2�2�������-�J��G�G�$�$�R�W�W�\�\�*�i�%H�I�M��'�'�"�"�:�.�K��W�W�%�%�m�4�N�	�w�w���[�.�9�:�k�I��;�<�<��r&c��eZdZdZ			dd�Zed��Zd�Zdd�Z		dd�Z			dd�Z
dd	�Z		dd
�Z		dd�Z
dd�Zdd
�Zd�Zy)�BuildBackendHookCallerzFA wrapper to call the build backend hooks for a source directory.
    Nc���|�t}t|�|_||_|r#|D�cgc]}t	|j|���}}||_||_|stj}||_	ycc}w)a�
        :param source_dir: The source directory to invoke the build backend for
        :param build_backend: The build backend spec
        :param backend_path: Additional path entries for the build backend spec
        :param runner: The :ref:`subprocess runner <Subprocess Runners>` to use
        :param python_executable:
            The Python executable used to invoke the build backend
        N)
rIr�
source_dir�
build_backendrYr2�_subprocess_runner�sys�
executable�python_executable)r#r]r^r2�runnerrb�ps       rr$zBuildBackendHookCaller.__init__fsx�� �>�.�F�!�*�-���*����<H��<H�q��t����2�L�
��)���"(��� � #����!2����s�A-c#�bK�|j}||_	d��||_y#||_wxYw�w)a,A context manager for temporarily overriding the default
        :ref:`subprocess runner <Subprocess Runners>`.

        .. code-block:: python

            hook_caller = BuildBackendHookCaller(...)
            with hook_caller.subprocess_runner(quiet_subprocess_runner):
                ...
        N)r_)r#rc�prevs   r�subprocess_runnerz(BuildBackendHookCaller.subprocess_runner�s3�����&�&��"(���	+��&*�D�#��d�D�#�s�/�#�/�	,�/c�&�|jdi�S)z>Return the list of optional features supported by the backend.�_supported_features��
_call_hook)r#s rriz*BuildBackendHookCaller._supported_features�s�����4�b�9�9r&c�*�|jdd|i�S)a6Get additional dependencies required for building a wheel.

        :returns: A list of :pep:`dependency specifiers <508>`.
        :rtype: list[str]

        .. admonition:: Fallback

            If the build backend does not defined a hook with this name, an
            empty list will be returned.
        �get_requires_for_build_wheel�config_settingsrj�r#rns  rrmz3BuildBackendHookCaller.get_requires_for_build_wheel�s#�����=���@
��	r&c�@�|jdt|�||d��S)aPrepare a ``*.dist-info`` folder with metadata for this project.

        :returns: Name of the newly created subfolder within
                  ``metadata_directory``, containing the metadata.
        :rtype: str

        .. admonition:: Fallback

            If the build backend does not define a hook with this name and
            ``_allow_fallback`` is truthy, the backend will be asked to build a
            wheel via the ``build_wheel`` hook and the dist-info extracted from
            that will be returned.
        � prepare_metadata_for_build_wheel��metadata_directoryrn�_allow_fallback�rkr�r#rsrnrts    rrqz7BuildBackendHookCaller.prepare_metadata_for_build_wheel�s-�� ���A�")�*<�"=�.�.�D
��	r&c�Z�|�t|�}|jdt|�||d��S)a�Build a wheel from this project.

        :returns:
            The name of the newly created wheel within ``wheel_directory``.

        .. admonition:: Interaction with fallback

            If the ``build_wheel`` hook was called in the fallback for
            :meth:`prepare_metadata_for_build_wheel`, the build backend would
            not be invoked. Instead, the previously built wheel will be copied
            to ``wheel_directory`` and the name of that file will be returned.
        �build_wheel��wheel_directoryrnrs�rrk�r#rzrnrss    rrxz"BuildBackendHookCaller.build_wheel�s<���)�!(�);�!<�����}�&��7�.�"4�/
��	r&c�*�|jdd|i�S)a@Get additional dependencies required for building an editable wheel.

        :returns: A list of :pep:`dependency specifiers <508>`.
        :rtype: list[str]

        .. admonition:: Fallback

            If the build backend does not defined a hook with this name, an
            empty list will be returned.
        �get_requires_for_build_editablernrjros  rr~z6BuildBackendHookCaller.get_requires_for_build_editable�s#�����@���C
��	r&c�@�|jdt|�||d��S)aPrepare a ``*.dist-info`` folder with metadata for this project.

        :returns: Name of the newly created subfolder within
                  ``metadata_directory``, containing the metadata.
        :rtype: str

        .. admonition:: Fallback

            If the build backend does not define a hook with this name and
            ``_allow_fallback`` is truthy, the backend will be asked to build a
            wheel via the ``build_editable`` hook and the dist-info
            extracted from that will be returned.
        �#prepare_metadata_for_build_editablerrrurvs    rr�z:BuildBackendHookCaller.prepare_metadata_for_build_editable�s-�� ���D�")�*<�"=�.�.�G
��	r&c�Z�|�t|�}|jdt|�||d��S)aBuild an editable wheel from this project.

        :returns:
            The name of the newly created wheel within ``wheel_directory``.

        .. admonition:: Interaction with fallback

            If the ``build_editable`` hook was called in the fallback for
            :meth:`prepare_metadata_for_build_editable`, the build backend
            would not be invoked. Instead, the previously built wheel will be
            copied to ``wheel_directory`` and the name of that file will be
            returned.
        �build_editableryr{r|s    rr�z%BuildBackendHookCaller.build_editable�s=�� �)�!(�);�!<�����/�&��7�.�"4�2
��	r&c�*�|jdd|i�S)z�Get additional dependencies required for building an sdist.

        :returns: A list of :pep:`dependency specifiers <508>`.
        :rtype: list[str]
        �get_requires_for_build_sdistrnrjros  rr�z3BuildBackendHookCaller.get_requires_for_build_sdists#�����=���@
��	r&c�>�|jdt|�|d��S)z�Build an sdist from this project.

        :returns:
            The name of the newly created sdist within ``wheel_directory``.
        �build_sdist)�sdist_directoryrnru)r#r�rns   rr�z"BuildBackendHookCaller.build_sdists'�����}�&��7�.�/
��	r&c
��d|ji}|jr.tjj	|j�}||d<tj�5}d|i}t|t|d�d��t�5}|j}|j|tt|��||g|j|��ddd�tt|d��}	|	j!d	�rt#|	j!d
d���|	j!d�rt%|	j!d
d���|	j!d
�r2t'|j|j|	j!dd����|	j!d�rt)|	j!d�xs|��|	dcddd�S#1swY��xYw#1swYyxYw)N�PEP517_BUILD_BACKEND�PEP517_BACKEND_PATHrz
input.json�)�indent)r@rHzoutput.json�unsupportedr!��
no_backend�backend_invalid�
backend_error)r1r2r3�hook_missing�missing_hook_name�
return_val)r^r2rB�pathsepr�tempfile�TemporaryDirectoryr�pjoinr
rbr_r�strr]r�getr=rr.r9)
r#r;rrHr2�td�
hook_input�script�python�datas
          rrkz!BuildBackendHookCaller._call_hook)s���/��1C�1C�D�
�����:�:�?�?�4�+<�+<�=�L�3?�M�/�0�
�
(�
(�
*�b�"�F�+�J��z�5��\�#:�1�E�&�'�6��/�/���'�'��W�S��[�1�9�b�A����"/�(��(��U�2�}�5�6�D��x�x�
�&�*�4�8�8�K��+D�E�E��x�x��%�(����+�r�)B�C�C��x�x�)�*�$�!%�!3�!3�!%�!2�!2� �H�H�_�b�9���
�x�x��'�!�$�(�(�+>�"?�"L�9�M�M���%�5+�
*�
(�'��+�
*�s&�'G�AF:�C+G�:G	�?G�G)NNNr)NT�NN)r(r)r*r+r$rrgrirmrqrxr~r�r�r�r�rkr,r&rr[r[bs}�����"�
3�>�+��+�":�
� 7;� ��.48�#��.
� 7;� ��.48�#��0�	�!&r&r[r�)rrBr`r��
contextlibr�os.pathrrr��
subprocessrrr�_in_processr
rr�	Exceptionrr.r9r=rIrLrYr[r,r&r�<module>r�sx���	�
��%��!�7�7�-�$�
�
#��#�)�Y�)�#�)�#�#�9�#�	&�	7��0h&�h&r&python3.12/site-packages/pip/_vendor/pyproject_hooks/_compat.py000064400000000212151732702420020551 0ustar00__all__ = ("tomllib",)

import sys

if sys.version_info >= (3, 11):
    import tomllib
else:
    from pip._vendor import tomli as tomllib
python3.12/site-packages/pip/_vendor/pyproject_hooks/__init__.py000064400000000753151732702420020700 0ustar00"""Wrappers to call pyproject.toml-based build backend hooks.
"""

from ._impl import (
    BackendInvalid,
    BackendUnavailable,
    BuildBackendHookCaller,
    HookMissing,
    UnsupportedOperation,
    default_subprocess_runner,
    quiet_subprocess_runner,
)

__version__ = '1.0.0'
__all__ = [
    'BackendUnavailable',
    'BackendInvalid',
    'HookMissing',
    'UnsupportedOperation',
    'default_subprocess_runner',
    'quiet_subprocess_runner',
    'BuildBackendHookCaller',
]
site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-312.pyc000064400000034102151732702420030224 0ustar00python3.12�

R`i�*��b�dZddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZd�Z
d�ZGd�d	e�ZGd
�de�ZGd�d
e�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdZd�Zd�Zd�Zd$d�Zd$d�Zd�Z Gd�de�Z!Gd�de�Z"d �Z#hd!�Z$d"�Z%e&d#k(re%�yy)%agThis is invoked in a subprocess to call the build backend hooks.

It expects:
- Command line args: hook_name, control_dir
- Environment variables:
      PEP517_BUILD_BACKEND=entry.point:spec
      PEP517_BACKEND_PATH=paths (separated with os.pathsep)
- control_dir/input.json:
  - {"kwargs": {...}}

Results:
- control_dir/output.json
  - {"return_val": ...}
�N)�glob)�
import_module)�joinc�x�t|dd��5}tj||fi|��ddd�y#1swYyxYw)N�w�utf-8��encoding)�open�json�dump)�obj�path�kwargs�fs    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py�
write_jsonrs/��	
�d�C�'�	*�a��	�	�#�q�#�F�#�
+�	*�	*�s�0�9c�r�t|d��5}tj|�cddd�S#1swYyxYw)Nrr	)rr�load)rrs  r�	read_jsonr#s%��	
�d�W�	%���y�y��|�
&�	%�	%�s�-�6c��eZdZdZd�Zy)�BackendUnavailablez&Raised if we cannot import the backendc��||_y�N��	traceback��selfrs  r�__init__zBackendUnavailable.__init__*�	��"���N��__name__�
__module__�__qualname__�__doc__r�r!rrr(s
��0�#r!rc��eZdZdZd�Zy)�BackendInvalidz Raised if the backend is invalidc��||_yr)�message)rr+s  rrzBackendInvalid.__init__0s	����r!Nr"r'r!rr)r).s
��*�r!r)c�$��eZdZdZd�fd�	Z�xZS)�HookMissingzARaised if a hook is missing and we are not executing the fallbackc�2��t�|�|�||_yr)�superr�	hook_name)rr0�	__class__s  �rrzHookMissing.__init__6s���
����#�"��r!r)r#r$r%r&r�
__classcell__)r1s@rr-r-4s���K�#�#r!r-c�:�tjjtjj|��}tjjtjj|��}tjj	||g�|k(S)z5Test if a file is located within the given directory.)�osr�normcase�abspath�commonprefix)�filename�	directorys  r�contained_inr:;sc���w�w��������� 9�:�H���� � �������!;�<�I�
�7�7����9� 5�6�)�C�Cr!c����tjjd�}|r2|jtj�}|t
jddtjd}|jd�\}}}	t|��|rt�fd�D��std��|r"|jd�D]}t�|����S#t$rttj���wxYw)	zFind and load the build backend�PEP517_BACKEND_PATHNr�PEP517_BUILD_BACKEND�:c3�J�K�|]}t�j|����y�wr)r:�__file__)�.0rrs  �r�	<genexpr>z!_build_backend.<locals>.<genexpr>Rs$�����
�'��
����t�,�'�s� #z(Backend was not loaded from backend-path�.)r4�environ�get�split�pathsep�sysr�	partitionr�ImportErrorrr�
format_exc�anyr)�getattr)�backend_path�extra_pathitems�ep�mod_path�_�obj_path�	path_partrs       @r�_build_backendrUBs�����:�:�>�>�"7�8�L��&�,�,�R�Z�Z�8��&�����!��	���*�	+�B��L�L��-��H�a��9��H�%����
�'�
�
�!�!K�L�L��!����,�I��#�y�)�C�-��J���9� ��!5�!5�!7�8�8�9�s�>C�'C7c�X�t�}g}t|d�r|jd�|S)z�Return the list of options features supported by the backend.

    Returns a list of strings.
    The only possible value is 'build_editable'.
    �build_editable)rU�hasattr�append)�backend�featuress  r�_supported_featuresr\^s.����G��H��w�(�)����(�)��Or!c�b�t�}	|j}||�S#t$rgcYSwxYw�zfInvoke the optional get_requires_for_build_wheel hook

    Returns [] if the hook is not defined.
    )rU�get_requires_for_build_wheel�AttributeError��config_settingsrZ�hooks   rr_r_k�?��
��G�%��3�3���O�$�$�����	���� �.�.c�b�t�}	|j}||�S#t$rgcYSwxYw)ziInvoke the optional get_requires_for_build_editable hook

    Returns [] if the hook is not defined.
    )rU�get_requires_for_build_editabler`ras   rrgrgys?��
��G�%��6�6���O�$�$�����	��rec��t�}	|j}|||�S#t$r|s
t��YnwxYw|j	||�}t|||�S)z�Invoke optional prepare_metadata_for_build_wheel

    Implements a fallback by building a wheel if the hook isn't defined,
    unless _allow_fallback is False in which case HookMissing is raised.
    )rU� prepare_metadata_for_build_wheelr`r-�build_wheel�_get_wheel_metadata_from_wheel)�metadata_directoryrb�_allow_fallbackrZrc�whl_basenames      rriri�sw����G�9��7�7��
�&��8�8��	� ���-��� ���&�&�'9�?�K�L�)�,�8J�*9�;�;s�!�9�9c���t�}	|j}|||�S#t$rK|s
t��	|j}|||�}t|||�cYS#t$r
td���wxYwwxYw)z�Invoke optional prepare_metadata_for_build_editable

    Implements a fallback by building an editable wheel if the hook isn't
    defined, unless _allow_fallback is False in which case HookMissing is
    raised.
    rW)r0)rU�#prepare_metadata_for_build_editabler`r-rWrk)rlrbrmrZrc�
build_hookrns       rrprp�s�����G�9��:�:���&��8�8���C���-��	C� �/�/�J�&�&8�/�J�L�1�,�2D�2A�C�
C��	�	:��(8�9�9�	:��C�s �!�A5�A�A5�A1�1A5�PEP517_ALREADY_BUILT_WHEELc��g}|j�D],}tjd|�}|s�|j|��.|r|St	d��)z6Identify the .dist-info folder inside a wheel ZipFile.z[^/\\]+-[^/\\]+\.dist-info/z#No .dist-info folder found in wheel)�namelist�re�matchrY�	Exception)�whl_zip�resr�ms    r�_dist_info_filesr{�sP��
�C�� � �"���H�H�3�T�:����J�J�t��#���
�
�9�
:�:r!c�z�ddlm}ttjj|t�d�5	ddd�tjj||�}||�5}t|�}|j||��ddd�djd�dS#1swY�oxYw#1swY�,xYw)z�Extract the metadata from a wheel.

    Fallback for when the build backend does not
    define the 'get_wheel_metadata' hook.
    r)�ZipFile�wbN)r�members�/)
�zipfiler}rr4rr�WHEEL_BUILT_MARKERr{�
extractallrF)rnrlrbr}�whl_file�zipf�	dist_infos       rrkrk�s��� �	
�b�g�g�l�l�-�/A�B�D�	I��
J��w�w�|�|�.��=�H�	��	�d�$�T�*�	����/���C�
��Q�<���c�"�1�%�%�
J�	I��
�	�s�B%�'B1�%B.�1B:c�N�|sytjj|�}tjjt	|t
��syt
tjj|d��}|std�yt|�dkDrtd�y|dS)zHCheck for a wheel already built during the get_wheel_metadata hook.
    Nz*.whlz+Found wheel built marker, but no .whl files�zHFound multiple .whl files; unspecified behaviour. Will call build_wheel.r)
r4r�dirname�isfile�pjoinr�rr�print�len)rl�metadata_parent�	whl_filess   r�_find_already_built_wheelr��s������g�g�o�o�&8�9�O�
�7�7�>�>�%��1C�D�E���R�W�W�\�\�/�7�;�<�I��
�;�<��
�9�~���
�'�	(���Q�<�r!c��t|�}|r5tj||�tjj|�St
�j|||�S)z�Invoke the mandatory build_wheel hook.

    If a wheel was already built in the
    prepare_metadata_for_build_wheel fallback, this
    will copy it rather than rebuilding the wheel.
    )r��shutil�copy2r4r�basenamerUrj)�wheel_directoryrbrl�prebuilt_whls    rrjrj�sR��-�-?�@�L�����\�?�3��w�w����-�-���'�'���(:�<�<r!c��t�}	|j}t|�}|r5tj||�t
jj|�S||||�S#t$rt��wxYw)z�Invoke the optional build_editable hook.

    If a wheel was already built in the
    prepare_metadata_for_build_editable fallback, this
    will copy it rather than rebuilding the wheel.
    )
rUrWr�r�r�r4rr�r`r-)r�rbrlrZrcr�s      rrWrW�sy����G�
J��%�%��1�1C�D����L�L���7��7�7�#�#�L�1�1��O�_�6H�I�I�����m���s�A$�$A8c�b�t�}	|j}||�S#t$rgcYSwxYwr^)rU�get_requires_for_build_sdistr`ras   rr�r�rdrec��eZdZdZy)�_DummyExceptionz(Nothing should ever raise this exceptionN)r#r$r%r&r'r!rr�r�"s��2r!r�c��eZdZdZd�Zy)�GotUnsupportedOperationz9For internal use when backend raises UnsupportedOperationc��||_yrrrs  rrz GotUnsupportedOperation.__init__(r r!Nr"r'r!rr�r�&s
��C�#r!r�c��t�}	|j||�S#t|dt�$rt	tj���wxYw)z&Invoke the mandatory build_sdist hook.�UnsupportedOperation)rU�build_sdistrMr�r�rrK)�sdist_directoryrbrZs   rr�r�,sO����G�>��"�"�?�O�D�D���7�2�O�D�>�%�i�&:�&:�&<�=�=�>�s	��2A>	r�rjrWr\r�r_rgrirpc���ttj�dkrtjd�tjd}tjd}|tvrtjd|z�t�|}t
t|d��}ddd�}	|di|d	��|d
<t|t|d�d��y#t$r}d|d<|j|d
<Yd}~�;d}~wt$r}d|d<|j|d<Yd}~�`d}~wt$r}d|d<|j|d
<Yd}~��d}~wt$r"}d|d<|jxs||d<Yd}~��d}~wwxYw)N�z"Needs args: hook_name, control_dirr��zUnknown hook: %sz
input.jsonF)�unsupported�
return_valrr�T�
no_backendr�backend_invalid�
backend_errorr��hook_missing�missing_hook_namezoutput.json)�indentr')r�rH�argv�exit�
HOOK_NAMES�globalsrr�rrr)r+r�r-r0r)r0�control_dirrc�
hook_input�json_out�es      r�mainr�BsB��
�3�8�8�}�q�����5�6������I��(�(�1�+�K��
�"����#�i�/�0��9�Y��D��5��l�;�<�J�$�D�9�H�
A�!%�!=�
�8�(<�!=�����x��{�M�:�1�E���,�!%���� !��������.�&*��"�#�$%�I�I���!��"�,�"&���� !��������A�#'��� �()���(@�y��$�%��A�s<� C�	E!�C)�)E!�5D�E!�D3�3E!�?E�E!�__main__r)'r&rr4�os.pathrur�rHrr�	importlibrrr�rrrwrr)r-r:rUr\r_rgrirpr�r{rkr�rjrWr�r�r�r�r�r�r#r'r!r�<module>r�s���
��	��	�
�
���#�!�$�
�
#��#��Y��#�)�#�D��8
�%�%�;�,9�62��	;�&�$�,
<� J�*%�3�i�3�#�i�#�>�
�
�F�<�z���F�r!site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-312.pyc000064400000002151151732702420027457 0ustar00python3.12�

R`i"��P�dZddlmZ	ejd�Zy#e$rd�ZYywxYw)z�This is a subpackage because the directory is on sys.path for _in_process.py

The subpackage should stay as empty as possible to avoid shadowing modules that
the backend might import.
�Nc�x�tjtjt�j	d��S�Nz_in_process.py)�	resources�as_file�files�__package__�joinpath����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py�_in_proc_script_pathr
s/��� � ��O�O�K�(�1�1�2B�C�E�	Erc�6�tjtd�Sr)r�pathrr
rrr
r

s���~�~�k�+;�<�<r)�__doc__�importlib.resourcesrrr
�AttributeErrorr
rr�<module>rs8���(�	E�
�O�O�E���=�=�=�s��%�%python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py000064400000025257151732702420023755 0ustar00"""This is invoked in a subprocess to call the build backend hooks.

It expects:
- Command line args: hook_name, control_dir
- Environment variables:
      PEP517_BUILD_BACKEND=entry.point:spec
      PEP517_BACKEND_PATH=paths (separated with os.pathsep)
- control_dir/input.json:
  - {"kwargs": {...}}

Results:
- control_dir/output.json
  - {"return_val": ...}
"""
import json
import os
import os.path
import re
import shutil
import sys
import traceback
from glob import glob
from importlib import import_module
from os.path import join as pjoin

# This file is run as a script, and `import wrappers` is not zip-safe, so we
# include write_json() and read_json() from wrappers.py.


def write_json(obj, path, **kwargs):
    with open(path, 'w', encoding='utf-8') as f:
        json.dump(obj, f, **kwargs)


def read_json(path):
    with open(path, encoding='utf-8') as f:
        return json.load(f)


class BackendUnavailable(Exception):
    """Raised if we cannot import the backend"""
    def __init__(self, traceback):
        self.traceback = traceback


class BackendInvalid(Exception):
    """Raised if the backend is invalid"""
    def __init__(self, message):
        self.message = message


class HookMissing(Exception):
    """Raised if a hook is missing and we are not executing the fallback"""
    def __init__(self, hook_name=None):
        super().__init__(hook_name)
        self.hook_name = hook_name


def contained_in(filename, directory):
    """Test if a file is located within the given directory."""
    filename = os.path.normcase(os.path.abspath(filename))
    directory = os.path.normcase(os.path.abspath(directory))
    return os.path.commonprefix([filename, directory]) == directory


def _build_backend():
    """Find and load the build backend"""
    # Add in-tree backend directories to the front of sys.path.
    backend_path = os.environ.get('PEP517_BACKEND_PATH')
    if backend_path:
        extra_pathitems = backend_path.split(os.pathsep)
        sys.path[:0] = extra_pathitems

    ep = os.environ['PEP517_BUILD_BACKEND']
    mod_path, _, obj_path = ep.partition(':')
    try:
        obj = import_module(mod_path)
    except ImportError:
        raise BackendUnavailable(traceback.format_exc())

    if backend_path:
        if not any(
            contained_in(obj.__file__, path)
            for path in extra_pathitems
        ):
            raise BackendInvalid("Backend was not loaded from backend-path")

    if obj_path:
        for path_part in obj_path.split('.'):
            obj = getattr(obj, path_part)
    return obj


def _supported_features():
    """Return the list of options features supported by the backend.

    Returns a list of strings.
    The only possible value is 'build_editable'.
    """
    backend = _build_backend()
    features = []
    if hasattr(backend, "build_editable"):
        features.append("build_editable")
    return features


def get_requires_for_build_wheel(config_settings):
    """Invoke the optional get_requires_for_build_wheel hook

    Returns [] if the hook is not defined.
    """
    backend = _build_backend()
    try:
        hook = backend.get_requires_for_build_wheel
    except AttributeError:
        return []
    else:
        return hook(config_settings)


def get_requires_for_build_editable(config_settings):
    """Invoke the optional get_requires_for_build_editable hook

    Returns [] if the hook is not defined.
    """
    backend = _build_backend()
    try:
        hook = backend.get_requires_for_build_editable
    except AttributeError:
        return []
    else:
        return hook(config_settings)


def prepare_metadata_for_build_wheel(
        metadata_directory, config_settings, _allow_fallback):
    """Invoke optional prepare_metadata_for_build_wheel

    Implements a fallback by building a wheel if the hook isn't defined,
    unless _allow_fallback is False in which case HookMissing is raised.
    """
    backend = _build_backend()
    try:
        hook = backend.prepare_metadata_for_build_wheel
    except AttributeError:
        if not _allow_fallback:
            raise HookMissing()
    else:
        return hook(metadata_directory, config_settings)
    # fallback to build_wheel outside the try block to avoid exception chaining
    # which can be confusing to users and is not relevant
    whl_basename = backend.build_wheel(metadata_directory, config_settings)
    return _get_wheel_metadata_from_wheel(whl_basename, metadata_directory,
                                          config_settings)


def prepare_metadata_for_build_editable(
        metadata_directory, config_settings, _allow_fallback):
    """Invoke optional prepare_metadata_for_build_editable

    Implements a fallback by building an editable wheel if the hook isn't
    defined, unless _allow_fallback is False in which case HookMissing is
    raised.
    """
    backend = _build_backend()
    try:
        hook = backend.prepare_metadata_for_build_editable
    except AttributeError:
        if not _allow_fallback:
            raise HookMissing()
        try:
            build_hook = backend.build_editable
        except AttributeError:
            raise HookMissing(hook_name='build_editable')
        else:
            whl_basename = build_hook(metadata_directory, config_settings)
            return _get_wheel_metadata_from_wheel(whl_basename,
                                                  metadata_directory,
                                                  config_settings)
    else:
        return hook(metadata_directory, config_settings)


WHEEL_BUILT_MARKER = 'PEP517_ALREADY_BUILT_WHEEL'


def _dist_info_files(whl_zip):
    """Identify the .dist-info folder inside a wheel ZipFile."""
    res = []
    for path in whl_zip.namelist():
        m = re.match(r'[^/\\]+-[^/\\]+\.dist-info/', path)
        if m:
            res.append(path)
    if res:
        return res
    raise Exception("No .dist-info folder found in wheel")


def _get_wheel_metadata_from_wheel(
        whl_basename, metadata_directory, config_settings):
    """Extract the metadata from a wheel.

    Fallback for when the build backend does not
    define the 'get_wheel_metadata' hook.
    """
    from zipfile import ZipFile
    with open(os.path.join(metadata_directory, WHEEL_BUILT_MARKER), 'wb'):
        pass  # Touch marker file

    whl_file = os.path.join(metadata_directory, whl_basename)
    with ZipFile(whl_file) as zipf:
        dist_info = _dist_info_files(zipf)
        zipf.extractall(path=metadata_directory, members=dist_info)
    return dist_info[0].split('/')[0]


def _find_already_built_wheel(metadata_directory):
    """Check for a wheel already built during the get_wheel_metadata hook.
    """
    if not metadata_directory:
        return None
    metadata_parent = os.path.dirname(metadata_directory)
    if not os.path.isfile(pjoin(metadata_parent, WHEEL_BUILT_MARKER)):
        return None

    whl_files = glob(os.path.join(metadata_parent, '*.whl'))
    if not whl_files:
        print('Found wheel built marker, but no .whl files')
        return None
    if len(whl_files) > 1:
        print('Found multiple .whl files; unspecified behaviour. '
              'Will call build_wheel.')
        return None

    # Exactly one .whl file
    return whl_files[0]


def build_wheel(wheel_directory, config_settings, metadata_directory=None):
    """Invoke the mandatory build_wheel hook.

    If a wheel was already built in the
    prepare_metadata_for_build_wheel fallback, this
    will copy it rather than rebuilding the wheel.
    """
    prebuilt_whl = _find_already_built_wheel(metadata_directory)
    if prebuilt_whl:
        shutil.copy2(prebuilt_whl, wheel_directory)
        return os.path.basename(prebuilt_whl)

    return _build_backend().build_wheel(wheel_directory, config_settings,
                                        metadata_directory)


def build_editable(wheel_directory, config_settings, metadata_directory=None):
    """Invoke the optional build_editable hook.

    If a wheel was already built in the
    prepare_metadata_for_build_editable fallback, this
    will copy it rather than rebuilding the wheel.
    """
    backend = _build_backend()
    try:
        hook = backend.build_editable
    except AttributeError:
        raise HookMissing()
    else:
        prebuilt_whl = _find_already_built_wheel(metadata_directory)
        if prebuilt_whl:
            shutil.copy2(prebuilt_whl, wheel_directory)
            return os.path.basename(prebuilt_whl)

        return hook(wheel_directory, config_settings, metadata_directory)


def get_requires_for_build_sdist(config_settings):
    """Invoke the optional get_requires_for_build_wheel hook

    Returns [] if the hook is not defined.
    """
    backend = _build_backend()
    try:
        hook = backend.get_requires_for_build_sdist
    except AttributeError:
        return []
    else:
        return hook(config_settings)


class _DummyException(Exception):
    """Nothing should ever raise this exception"""


class GotUnsupportedOperation(Exception):
    """For internal use when backend raises UnsupportedOperation"""
    def __init__(self, traceback):
        self.traceback = traceback


def build_sdist(sdist_directory, config_settings):
    """Invoke the mandatory build_sdist hook."""
    backend = _build_backend()
    try:
        return backend.build_sdist(sdist_directory, config_settings)
    except getattr(backend, 'UnsupportedOperation', _DummyException):
        raise GotUnsupportedOperation(traceback.format_exc())


HOOK_NAMES = {
    'get_requires_for_build_wheel',
    'prepare_metadata_for_build_wheel',
    'build_wheel',
    'get_requires_for_build_editable',
    'prepare_metadata_for_build_editable',
    'build_editable',
    'get_requires_for_build_sdist',
    'build_sdist',
    '_supported_features',
}


def main():
    if len(sys.argv) < 3:
        sys.exit("Needs args: hook_name, control_dir")
    hook_name = sys.argv[1]
    control_dir = sys.argv[2]
    if hook_name not in HOOK_NAMES:
        sys.exit("Unknown hook: %s" % hook_name)
    hook = globals()[hook_name]

    hook_input = read_json(pjoin(control_dir, 'input.json'))

    json_out = {'unsupported': False, 'return_val': None}
    try:
        json_out['return_val'] = hook(**hook_input['kwargs'])
    except BackendUnavailable as e:
        json_out['no_backend'] = True
        json_out['traceback'] = e.traceback
    except BackendInvalid as e:
        json_out['backend_invalid'] = True
        json_out['backend_error'] = e.message
    except GotUnsupportedOperation as e:
        json_out['unsupported'] = True
        json_out['traceback'] = e.traceback
    except HookMissing as e:
        json_out['hook_missing'] = True
        json_out['missing_hook_name'] = e.hook_name or hook_name

    write_json(json_out, pjoin(control_dir, 'output.json'), indent=2)


if __name__ == '__main__':
    main()
python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py000064400000001042151732702420023173 0ustar00"""This is a subpackage because the directory is on sys.path for _in_process.py

The subpackage should stay as empty as possible to avoid shadowing modules that
the backend might import.
"""

import importlib.resources as resources

try:
    resources.files
except AttributeError:
    # Python 3.8 compatibility
    def _in_proc_script_path():
        return resources.path(__package__, '_in_process.py')
else:
    def _in_proc_script_path():
        return resources.as_file(
            resources.files(__package__).joinpath('_in_process.py'))
python3.12/site-packages/pip/_vendor/pyproject_hooks/_impl.py000064400000027220151732702420020237 0ustar00import json
import os
import sys
import tempfile
from contextlib import contextmanager
from os.path import abspath
from os.path import join as pjoin
from subprocess import STDOUT, check_call, check_output

from ._in_process import _in_proc_script_path


def write_json(obj, path, **kwargs):
    with open(path, 'w', encoding='utf-8') as f:
        json.dump(obj, f, **kwargs)


def read_json(path):
    with open(path, encoding='utf-8') as f:
        return json.load(f)


class BackendUnavailable(Exception):
    """Will be raised if the backend cannot be imported in the hook process."""
    def __init__(self, traceback):
        self.traceback = traceback


class BackendInvalid(Exception):
    """Will be raised if the backend is invalid."""
    def __init__(self, backend_name, backend_path, message):
        super().__init__(message)
        self.backend_name = backend_name
        self.backend_path = backend_path


class HookMissing(Exception):
    """Will be raised on missing hooks (if a fallback can't be used)."""
    def __init__(self, hook_name):
        super().__init__(hook_name)
        self.hook_name = hook_name


class UnsupportedOperation(Exception):
    """May be raised by build_sdist if the backend indicates that it can't."""
    def __init__(self, traceback):
        self.traceback = traceback


def default_subprocess_runner(cmd, cwd=None, extra_environ=None):
    """The default method of calling the wrapper subprocess.

    This uses :func:`subprocess.check_call` under the hood.
    """
    env = os.environ.copy()
    if extra_environ:
        env.update(extra_environ)

    check_call(cmd, cwd=cwd, env=env)


def quiet_subprocess_runner(cmd, cwd=None, extra_environ=None):
    """Call the subprocess while suppressing output.

    This uses :func:`subprocess.check_output` under the hood.
    """
    env = os.environ.copy()
    if extra_environ:
        env.update(extra_environ)

    check_output(cmd, cwd=cwd, env=env, stderr=STDOUT)


def norm_and_check(source_tree, requested):
    """Normalise and check a backend path.

    Ensure that the requested backend path is specified as a relative path,
    and resolves to a location under the given source tree.

    Return an absolute version of the requested path.
    """
    if os.path.isabs(requested):
        raise ValueError("paths must be relative")

    abs_source = os.path.abspath(source_tree)
    abs_requested = os.path.normpath(os.path.join(abs_source, requested))
    # We have to use commonprefix for Python 2.7 compatibility. So we
    # normalise case to avoid problems because commonprefix is a character
    # based comparison :-(
    norm_source = os.path.normcase(abs_source)
    norm_requested = os.path.normcase(abs_requested)
    if os.path.commonprefix([norm_source, norm_requested]) != norm_source:
        raise ValueError("paths must be inside source tree")

    return abs_requested


class BuildBackendHookCaller:
    """A wrapper to call the build backend hooks for a source directory.
    """

    def __init__(
            self,
            source_dir,
            build_backend,
            backend_path=None,
            runner=None,
            python_executable=None,
    ):
        """
        :param source_dir: The source directory to invoke the build backend for
        :param build_backend: The build backend spec
        :param backend_path: Additional path entries for the build backend spec
        :param runner: The :ref:`subprocess runner <Subprocess Runners>` to use
        :param python_executable:
            The Python executable used to invoke the build backend
        """
        if runner is None:
            runner = default_subprocess_runner

        self.source_dir = abspath(source_dir)
        self.build_backend = build_backend
        if backend_path:
            backend_path = [
                norm_and_check(self.source_dir, p) for p in backend_path
            ]
        self.backend_path = backend_path
        self._subprocess_runner = runner
        if not python_executable:
            python_executable = sys.executable
        self.python_executable = python_executable

    @contextmanager
    def subprocess_runner(self, runner):
        """A context manager for temporarily overriding the default
        :ref:`subprocess runner <Subprocess Runners>`.

        .. code-block:: python

            hook_caller = BuildBackendHookCaller(...)
            with hook_caller.subprocess_runner(quiet_subprocess_runner):
                ...
        """
        prev = self._subprocess_runner
        self._subprocess_runner = runner
        try:
            yield
        finally:
            self._subprocess_runner = prev

    def _supported_features(self):
        """Return the list of optional features supported by the backend."""
        return self._call_hook('_supported_features', {})

    def get_requires_for_build_wheel(self, config_settings=None):
        """Get additional dependencies required for building a wheel.

        :returns: A list of :pep:`dependency specifiers <508>`.
        :rtype: list[str]

        .. admonition:: Fallback

            If the build backend does not defined a hook with this name, an
            empty list will be returned.
        """
        return self._call_hook('get_requires_for_build_wheel', {
            'config_settings': config_settings
        })

    def prepare_metadata_for_build_wheel(
            self, metadata_directory, config_settings=None,
            _allow_fallback=True):
        """Prepare a ``*.dist-info`` folder with metadata for this project.

        :returns: Name of the newly created subfolder within
                  ``metadata_directory``, containing the metadata.
        :rtype: str

        .. admonition:: Fallback

            If the build backend does not define a hook with this name and
            ``_allow_fallback`` is truthy, the backend will be asked to build a
            wheel via the ``build_wheel`` hook and the dist-info extracted from
            that will be returned.
        """
        return self._call_hook('prepare_metadata_for_build_wheel', {
            'metadata_directory': abspath(metadata_directory),
            'config_settings': config_settings,
            '_allow_fallback': _allow_fallback,
        })

    def build_wheel(
            self, wheel_directory, config_settings=None,
            metadata_directory=None):
        """Build a wheel from this project.

        :returns:
            The name of the newly created wheel within ``wheel_directory``.

        .. admonition:: Interaction with fallback

            If the ``build_wheel`` hook was called in the fallback for
            :meth:`prepare_metadata_for_build_wheel`, the build backend would
            not be invoked. Instead, the previously built wheel will be copied
            to ``wheel_directory`` and the name of that file will be returned.
        """
        if metadata_directory is not None:
            metadata_directory = abspath(metadata_directory)
        return self._call_hook('build_wheel', {
            'wheel_directory': abspath(wheel_directory),
            'config_settings': config_settings,
            'metadata_directory': metadata_directory,
        })

    def get_requires_for_build_editable(self, config_settings=None):
        """Get additional dependencies required for building an editable wheel.

        :returns: A list of :pep:`dependency specifiers <508>`.
        :rtype: list[str]

        .. admonition:: Fallback

            If the build backend does not defined a hook with this name, an
            empty list will be returned.
        """
        return self._call_hook('get_requires_for_build_editable', {
            'config_settings': config_settings
        })

    def prepare_metadata_for_build_editable(
            self, metadata_directory, config_settings=None,
            _allow_fallback=True):
        """Prepare a ``*.dist-info`` folder with metadata for this project.

        :returns: Name of the newly created subfolder within
                  ``metadata_directory``, containing the metadata.
        :rtype: str

        .. admonition:: Fallback

            If the build backend does not define a hook with this name and
            ``_allow_fallback`` is truthy, the backend will be asked to build a
            wheel via the ``build_editable`` hook and the dist-info
            extracted from that will be returned.
        """
        return self._call_hook('prepare_metadata_for_build_editable', {
            'metadata_directory': abspath(metadata_directory),
            'config_settings': config_settings,
            '_allow_fallback': _allow_fallback,
        })

    def build_editable(
            self, wheel_directory, config_settings=None,
            metadata_directory=None):
        """Build an editable wheel from this project.

        :returns:
            The name of the newly created wheel within ``wheel_directory``.

        .. admonition:: Interaction with fallback

            If the ``build_editable`` hook was called in the fallback for
            :meth:`prepare_metadata_for_build_editable`, the build backend
            would not be invoked. Instead, the previously built wheel will be
            copied to ``wheel_directory`` and the name of that file will be
            returned.
        """
        if metadata_directory is not None:
            metadata_directory = abspath(metadata_directory)
        return self._call_hook('build_editable', {
            'wheel_directory': abspath(wheel_directory),
            'config_settings': config_settings,
            'metadata_directory': metadata_directory,
        })

    def get_requires_for_build_sdist(self, config_settings=None):
        """Get additional dependencies required for building an sdist.

        :returns: A list of :pep:`dependency specifiers <508>`.
        :rtype: list[str]
        """
        return self._call_hook('get_requires_for_build_sdist', {
            'config_settings': config_settings
        })

    def build_sdist(self, sdist_directory, config_settings=None):
        """Build an sdist from this project.

        :returns:
            The name of the newly created sdist within ``wheel_directory``.
        """
        return self._call_hook('build_sdist', {
            'sdist_directory': abspath(sdist_directory),
            'config_settings': config_settings,
        })

    def _call_hook(self, hook_name, kwargs):
        extra_environ = {'PEP517_BUILD_BACKEND': self.build_backend}

        if self.backend_path:
            backend_path = os.pathsep.join(self.backend_path)
            extra_environ['PEP517_BACKEND_PATH'] = backend_path

        with tempfile.TemporaryDirectory() as td:
            hook_input = {'kwargs': kwargs}
            write_json(hook_input, pjoin(td, 'input.json'), indent=2)

            # Run the hook in a subprocess
            with _in_proc_script_path() as script:
                python = self.python_executable
                self._subprocess_runner(
                    [python, abspath(str(script)), hook_name, td],
                    cwd=self.source_dir,
                    extra_environ=extra_environ
                )

            data = read_json(pjoin(td, 'output.json'))
            if data.get('unsupported'):
                raise UnsupportedOperation(data.get('traceback', ''))
            if data.get('no_backend'):
                raise BackendUnavailable(data.get('traceback', ''))
            if data.get('backend_invalid'):
                raise BackendInvalid(
                    backend_name=self.build_backend,
                    backend_path=self.backend_path,
                    message=data.get('backend_error', '')
                )
            if data.get('hook_missing'):
                raise HookMissing(data.get('missing_hook_name') or hook_name)
            return data['return_val']
python3.12/site-packages/pip/_vendor/urllib3/connection.py000064400000047514151732702420017440 0ustar00from __future__ import absolute_import

import datetime
import logging
import os
import re
import socket
import warnings
from socket import error as SocketError
from socket import timeout as SocketTimeout

from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401
from .util.proxy import create_proxy_ssl_context

try:  # Compiled with SSL?
    import ssl

    BaseSSLError = ssl.SSLError
except (ImportError, AttributeError):  # Platform-specific: No SSL.
    ssl = None

    class BaseSSLError(BaseException):
        pass


try:
    # Python 3: not a no-op, we're adding this to the namespace so it can be imported.
    ConnectionError = ConnectionError
except NameError:
    # Python 2
    class ConnectionError(Exception):
        pass


try:  # Python 3:
    # Not a no-op, we're adding this to the namespace so it can be imported.
    BrokenPipeError = BrokenPipeError
except NameError:  # Python 2:

    class BrokenPipeError(Exception):
        pass


from ._collections import HTTPHeaderDict  # noqa (historical, removed in v2)
from ._version import __version__
from .exceptions import (
    ConnectTimeoutError,
    NewConnectionError,
    SubjectAltNameWarning,
    SystemTimeWarning,
)
from .util import SKIP_HEADER, SKIPPABLE_HEADERS, connection
from .util.ssl_ import (
    assert_fingerprint,
    create_urllib3_context,
    is_ipaddress,
    resolve_cert_reqs,
    resolve_ssl_version,
    ssl_wrap_socket,
)
from .util.ssl_match_hostname import CertificateError, match_hostname

log = logging.getLogger(__name__)

port_by_scheme = {"http": 80, "https": 443}

# When it comes time to update this value as a part of regular maintenance
# (ie test_recent_date is failing) update it to ~6 months before the current date.
RECENT_DATE = datetime.date(2022, 1, 1)

_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")


class HTTPConnection(_HTTPConnection, object):
    """
    Based on :class:`http.client.HTTPConnection` but provides an extra constructor
    backwards-compatibility layer between older and newer Pythons.

    Additional keyword parameters are used to configure attributes of the connection.
    Accepted parameters include:

    - ``strict``: See the documentation on :class:`urllib3.connectionpool.HTTPConnectionPool`
    - ``source_address``: Set the source address for the current connection.
    - ``socket_options``: Set specific options on the underlying socket. If not specified, then
      defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling
      Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy.

      For example, if you wish to enable TCP Keep Alive in addition to the defaults,
      you might pass:

      .. code-block:: python

         HTTPConnection.default_socket_options + [
             (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
         ]

      Or you may want to disable the defaults by passing an empty list (e.g., ``[]``).
    """

    default_port = port_by_scheme["http"]

    #: Disable Nagle's algorithm by default.
    #: ``[(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)]``
    default_socket_options = [(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)]

    #: Whether this connection verifies the host's certificate.
    is_verified = False

    #: Whether this proxy connection (if used) verifies the proxy host's
    #: certificate.
    proxy_is_verified = None

    def __init__(self, *args, **kw):
        if not six.PY2:
            kw.pop("strict", None)

        # Pre-set source_address.
        self.source_address = kw.get("source_address")

        #: The socket options provided by the user. If no options are
        #: provided, we use the default options.
        self.socket_options = kw.pop("socket_options", self.default_socket_options)

        # Proxy options provided by the user.
        self.proxy = kw.pop("proxy", None)
        self.proxy_config = kw.pop("proxy_config", None)

        _HTTPConnection.__init__(self, *args, **kw)

    @property
    def host(self):
        """
        Getter method to remove any trailing dots that indicate the hostname is an FQDN.

        In general, SSL certificates don't include the trailing dot indicating a
        fully-qualified domain name, and thus, they don't validate properly when
        checked against a domain name that includes the dot. In addition, some
        servers may not expect to receive the trailing dot when provided.

        However, the hostname with trailing dot is critical to DNS resolution; doing a
        lookup with the trailing dot will properly only resolve the appropriate FQDN,
        whereas a lookup without a trailing dot will search the system's search domain
        list. Thus, it's important to keep the original host around for use only in
        those cases where it's appropriate (i.e., when doing DNS lookup to establish the
        actual TCP connection across which we're going to send HTTP requests).
        """
        return self._dns_host.rstrip(".")

    @host.setter
    def host(self, value):
        """
        Setter for the `host` property.

        We assume that only urllib3 uses the _dns_host attribute; httplib itself
        only uses `host`, and it seems reasonable that other libraries follow suit.
        """
        self._dns_host = value

    def _new_conn(self):
        """Establish a socket connection and set nodelay settings on it.

        :return: New socket connection.
        """
        extra_kw = {}
        if self.source_address:
            extra_kw["source_address"] = self.source_address

        if self.socket_options:
            extra_kw["socket_options"] = self.socket_options

        try:
            conn = connection.create_connection(
                (self._dns_host, self.port), self.timeout, **extra_kw
            )

        except SocketTimeout:
            raise ConnectTimeoutError(
                self,
                "Connection to %s timed out. (connect timeout=%s)"
                % (self.host, self.timeout),
            )

        except SocketError as e:
            raise NewConnectionError(
                self, "Failed to establish a new connection: %s" % e
            )

        return conn

    def _is_using_tunnel(self):
        # Google App Engine's httplib does not define _tunnel_host
        return getattr(self, "_tunnel_host", None)

    def _prepare_conn(self, conn):
        self.sock = conn
        if self._is_using_tunnel():
            # TODO: Fix tunnel so it doesn't depend on self.sock state.
            self._tunnel()
            # Mark this connection as not reusable
            self.auto_open = 0

    def connect(self):
        conn = self._new_conn()
        self._prepare_conn(conn)

    def putrequest(self, method, url, *args, **kwargs):
        """ """
        # Empty docstring because the indentation of CPython's implementation
        # is broken but we don't want this method in our documentation.
        match = _CONTAINS_CONTROL_CHAR_RE.search(method)
        if match:
            raise ValueError(
                "Method cannot contain non-token characters %r (found at least %r)"
                % (method, match.group())
            )

        return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)

    def putheader(self, header, *values):
        """ """
        if not any(isinstance(v, str) and v == SKIP_HEADER for v in values):
            _HTTPConnection.putheader(self, header, *values)
        elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS:
            raise ValueError(
                "urllib3.util.SKIP_HEADER only supports '%s'"
                % ("', '".join(map(str.title, sorted(SKIPPABLE_HEADERS))),)
            )

    def request(self, method, url, body=None, headers=None):
        # Update the inner socket's timeout value to send the request.
        # This only triggers if the connection is re-used.
        if getattr(self, "sock", None) is not None:
            self.sock.settimeout(self.timeout)

        if headers is None:
            headers = {}
        else:
            # Avoid modifying the headers passed into .request()
            headers = headers.copy()
        if "user-agent" not in (six.ensure_str(k.lower()) for k in headers):
            headers["User-Agent"] = _get_default_user_agent()
        super(HTTPConnection, self).request(method, url, body=body, headers=headers)

    def request_chunked(self, method, url, body=None, headers=None):
        """
        Alternative to the common request method, which sends the
        body with chunked encoding and not as one block
        """
        headers = headers or {}
        header_keys = set([six.ensure_str(k.lower()) for k in headers])
        skip_accept_encoding = "accept-encoding" in header_keys
        skip_host = "host" in header_keys
        self.putrequest(
            method, url, skip_accept_encoding=skip_accept_encoding, skip_host=skip_host
        )
        if "user-agent" not in header_keys:
            self.putheader("User-Agent", _get_default_user_agent())
        for header, value in headers.items():
            self.putheader(header, value)
        if "transfer-encoding" not in header_keys:
            self.putheader("Transfer-Encoding", "chunked")
        self.endheaders()

        if body is not None:
            stringish_types = six.string_types + (bytes,)
            if isinstance(body, stringish_types):
                body = (body,)
            for chunk in body:
                if not chunk:
                    continue
                if not isinstance(chunk, bytes):
                    chunk = chunk.encode("utf8")
                len_str = hex(len(chunk))[2:]
                to_send = bytearray(len_str.encode())
                to_send += b"\r\n"
                to_send += chunk
                to_send += b"\r\n"
                self.send(to_send)

        # After the if clause, to always have a closed body
        self.send(b"0\r\n\r\n")


class HTTPSConnection(HTTPConnection):
    """
    Many of the parameters to this constructor are passed to the underlying SSL
    socket by means of :py:func:`urllib3.util.ssl_wrap_socket`.
    """

    default_port = port_by_scheme["https"]

    cert_reqs = None
    ca_certs = None
    ca_cert_dir = None
    ca_cert_data = None
    ssl_version = None
    assert_fingerprint = None
    tls_in_tls_required = False

    def __init__(
        self,
        host,
        port=None,
        key_file=None,
        cert_file=None,
        key_password=None,
        strict=None,
        timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
        ssl_context=None,
        server_hostname=None,
        **kw
    ):

        HTTPConnection.__init__(self, host, port, strict=strict, timeout=timeout, **kw)

        self.key_file = key_file
        self.cert_file = cert_file
        self.key_password = key_password
        self.ssl_context = ssl_context
        self.server_hostname = server_hostname

        # Required property for Google AppEngine 1.9.0 which otherwise causes
        # HTTPS requests to go out as HTTP. (See Issue #356)
        self._protocol = "https"

    def set_cert(
        self,
        key_file=None,
        cert_file=None,
        cert_reqs=None,
        key_password=None,
        ca_certs=None,
        assert_hostname=None,
        assert_fingerprint=None,
        ca_cert_dir=None,
        ca_cert_data=None,
    ):
        """
        This method should only be called once, before the connection is used.
        """
        # If cert_reqs is not provided we'll assume CERT_REQUIRED unless we also
        # have an SSLContext object in which case we'll use its verify_mode.
        if cert_reqs is None:
            if self.ssl_context is not None:
                cert_reqs = self.ssl_context.verify_mode
            else:
                cert_reqs = resolve_cert_reqs(None)

        self.key_file = key_file
        self.cert_file = cert_file
        self.cert_reqs = cert_reqs
        self.key_password = key_password
        self.assert_hostname = assert_hostname
        self.assert_fingerprint = assert_fingerprint
        self.ca_certs = ca_certs and os.path.expanduser(ca_certs)
        self.ca_cert_dir = ca_cert_dir and os.path.expanduser(ca_cert_dir)
        self.ca_cert_data = ca_cert_data

    def connect(self):
        # Add certificate verification
        self.sock = conn = self._new_conn()
        hostname = self.host
        tls_in_tls = False

        if self._is_using_tunnel():
            if self.tls_in_tls_required:
                self.sock = conn = self._connect_tls_proxy(hostname, conn)
                tls_in_tls = True

            # Calls self._set_hostport(), so self.host is
            # self._tunnel_host below.
            self._tunnel()
            # Mark this connection as not reusable
            self.auto_open = 0

            # Override the host with the one we're requesting data from.
            hostname = self._tunnel_host

        server_hostname = hostname
        if self.server_hostname is not None:
            server_hostname = self.server_hostname

        is_time_off = datetime.date.today() < RECENT_DATE
        if is_time_off:
            warnings.warn(
                (
                    "System time is way off (before {0}). This will probably "
                    "lead to SSL verification errors"
                ).format(RECENT_DATE),
                SystemTimeWarning,
            )

        # Wrap socket using verification with the root certs in
        # trusted_root_certs
        default_ssl_context = False
        if self.ssl_context is None:
            default_ssl_context = True
            self.ssl_context = create_urllib3_context(
                ssl_version=resolve_ssl_version(self.ssl_version),
                cert_reqs=resolve_cert_reqs(self.cert_reqs),
            )

        context = self.ssl_context
        context.verify_mode = resolve_cert_reqs(self.cert_reqs)

        # Try to load OS default certs if none are given.
        # Works well on Windows (requires Python3.4+)
        if (
            not self.ca_certs
            and not self.ca_cert_dir
            and not self.ca_cert_data
            and default_ssl_context
            and hasattr(context, "load_default_certs")
        ):
            context.load_default_certs()

        self.sock = ssl_wrap_socket(
            sock=conn,
            keyfile=self.key_file,
            certfile=self.cert_file,
            key_password=self.key_password,
            ca_certs=self.ca_certs,
            ca_cert_dir=self.ca_cert_dir,
            ca_cert_data=self.ca_cert_data,
            server_hostname=server_hostname,
            ssl_context=context,
            tls_in_tls=tls_in_tls,
        )

        # If we're using all defaults and the connection
        # is TLSv1 or TLSv1.1 we throw a DeprecationWarning
        # for the host.
        if (
            default_ssl_context
            and self.ssl_version is None
            and hasattr(self.sock, "version")
            and self.sock.version() in {"TLSv1", "TLSv1.1"}
        ):
            warnings.warn(
                "Negotiating TLSv1/TLSv1.1 by default is deprecated "
                "and will be disabled in urllib3 v2.0.0. Connecting to "
                "'%s' with '%s' can be enabled by explicitly opting-in "
                "with 'ssl_version'" % (self.host, self.sock.version()),
                DeprecationWarning,
            )

        if self.assert_fingerprint:
            assert_fingerprint(
                self.sock.getpeercert(binary_form=True), self.assert_fingerprint
            )
        elif (
            context.verify_mode != ssl.CERT_NONE
            and not getattr(context, "check_hostname", False)
            and self.assert_hostname is not False
        ):
            # While urllib3 attempts to always turn off hostname matching from
            # the TLS library, this cannot always be done. So we check whether
            # the TLS Library still thinks it's matching hostnames.
            cert = self.sock.getpeercert()
            if not cert.get("subjectAltName", ()):
                warnings.warn(
                    (
                        "Certificate for {0} has no `subjectAltName`, falling back to check for a "
                        "`commonName` for now. This feature is being removed by major browsers and "
                        "deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 "
                        "for details.)".format(hostname)
                    ),
                    SubjectAltNameWarning,
                )
            _match_hostname(cert, self.assert_hostname or server_hostname)

        self.is_verified = (
            context.verify_mode == ssl.CERT_REQUIRED
            or self.assert_fingerprint is not None
        )

    def _connect_tls_proxy(self, hostname, conn):
        """
        Establish a TLS connection to the proxy using the provided SSL context.
        """
        proxy_config = self.proxy_config
        ssl_context = proxy_config.ssl_context
        if ssl_context:
            # If the user provided a proxy context, we assume CA and client
            # certificates have already been set
            return ssl_wrap_socket(
                sock=conn,
                server_hostname=hostname,
                ssl_context=ssl_context,
            )

        ssl_context = create_proxy_ssl_context(
            self.ssl_version,
            self.cert_reqs,
            self.ca_certs,
            self.ca_cert_dir,
            self.ca_cert_data,
        )

        # If no cert was provided, use only the default options for server
        # certificate validation
        socket = ssl_wrap_socket(
            sock=conn,
            ca_certs=self.ca_certs,
            ca_cert_dir=self.ca_cert_dir,
            ca_cert_data=self.ca_cert_data,
            server_hostname=hostname,
            ssl_context=ssl_context,
        )

        if ssl_context.verify_mode != ssl.CERT_NONE and not getattr(
            ssl_context, "check_hostname", False
        ):
            # While urllib3 attempts to always turn off hostname matching from
            # the TLS library, this cannot always be done. So we check whether
            # the TLS Library still thinks it's matching hostnames.
            cert = socket.getpeercert()
            if not cert.get("subjectAltName", ()):
                warnings.warn(
                    (
                        "Certificate for {0} has no `subjectAltName`, falling back to check for a "
                        "`commonName` for now. This feature is being removed by major browsers and "
                        "deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 "
                        "for details.)".format(hostname)
                    ),
                    SubjectAltNameWarning,
                )
            _match_hostname(cert, hostname)

        self.proxy_is_verified = ssl_context.verify_mode == ssl.CERT_REQUIRED
        return socket


def _match_hostname(cert, asserted_hostname):
    # Our upstream implementation of ssl.match_hostname()
    # only applies this normalization to IP addresses so it doesn't
    # match DNS SANs so we do the same thing!
    stripped_hostname = asserted_hostname.strip("u[]")
    if is_ipaddress(stripped_hostname):
        asserted_hostname = stripped_hostname

    try:
        match_hostname(cert, asserted_hostname)
    except CertificateError as e:
        log.warning(
            "Certificate did not match expected hostname: %s. Certificate: %s",
            asserted_hostname,
            cert,
        )
        # Add cert to exception and reraise so client code can inspect
        # the cert when catching the exception, if they want to
        e._peer_cert = cert
        raise


def _get_default_user_agent():
    return "python-urllib3/%s" % __version__


class DummyConnection(object):
    """Used to detect a failed ConnectionCls import."""

    pass


if not ssl:
    HTTPSConnection = DummyConnection  # noqa: F811


VerifiedHTTPSConnection = HTTPSConnection
python3.12/site-packages/pip/_vendor/urllib3/_collections.py000064400000025073151732702420017752 0ustar00from __future__ import absolute_import

try:
    from collections.abc import Mapping, MutableMapping
except ImportError:
    from collections import Mapping, MutableMapping
try:
    from threading import RLock
except ImportError:  # Platform-specific: No threads available

    class RLock:
        def __enter__(self):
            pass

        def __exit__(self, exc_type, exc_value, traceback):
            pass


from collections import OrderedDict

from .exceptions import InvalidHeader
from .packages import six
from .packages.six import iterkeys, itervalues

__all__ = ["RecentlyUsedContainer", "HTTPHeaderDict"]


_Null = object()


class RecentlyUsedContainer(MutableMapping):
    """
    Provides a thread-safe dict-like container which maintains up to
    ``maxsize`` keys while throwing away the least-recently-used keys beyond
    ``maxsize``.

    :param maxsize:
        Maximum number of recent elements to retain.

    :param dispose_func:
        Every time an item is evicted from the container,
        ``dispose_func(value)`` is called.  Callback which will get called
    """

    ContainerCls = OrderedDict

    def __init__(self, maxsize=10, dispose_func=None):
        self._maxsize = maxsize
        self.dispose_func = dispose_func

        self._container = self.ContainerCls()
        self.lock = RLock()

    def __getitem__(self, key):
        # Re-insert the item, moving it to the end of the eviction line.
        with self.lock:
            item = self._container.pop(key)
            self._container[key] = item
            return item

    def __setitem__(self, key, value):
        evicted_value = _Null
        with self.lock:
            # Possibly evict the existing value of 'key'
            evicted_value = self._container.get(key, _Null)
            self._container[key] = value

            # If we didn't evict an existing value, we might have to evict the
            # least recently used item from the beginning of the container.
            if len(self._container) > self._maxsize:
                _key, evicted_value = self._container.popitem(last=False)

        if self.dispose_func and evicted_value is not _Null:
            self.dispose_func(evicted_value)

    def __delitem__(self, key):
        with self.lock:
            value = self._container.pop(key)

        if self.dispose_func:
            self.dispose_func(value)

    def __len__(self):
        with self.lock:
            return len(self._container)

    def __iter__(self):
        raise NotImplementedError(
            "Iteration over this class is unlikely to be threadsafe."
        )

    def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)

    def keys(self):
        with self.lock:
            return list(iterkeys(self._container))


class HTTPHeaderDict(MutableMapping):
    """
    :param headers:
        An iterable of field-value pairs. Must not contain multiple field names
        when compared case-insensitively.

    :param kwargs:
        Additional field-value pairs to pass in to ``dict.update``.

    A ``dict`` like container for storing HTTP Headers.

    Field names are stored and compared case-insensitively in compliance with
    RFC 7230. Iteration provides the first case-sensitive key seen for each
    case-insensitive pair.

    Using ``__setitem__`` syntax overwrites fields that compare equal
    case-insensitively in order to maintain ``dict``'s api. For fields that
    compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
    in a loop.

    If multiple fields that are equal case-insensitively are passed to the
    constructor or ``.update``, the behavior is undefined and some will be
    lost.

    >>> headers = HTTPHeaderDict()
    >>> headers.add('Set-Cookie', 'foo=bar')
    >>> headers.add('set-cookie', 'baz=quxx')
    >>> headers['content-length'] = '7'
    >>> headers['SET-cookie']
    'foo=bar, baz=quxx'
    >>> headers['Content-Length']
    '7'
    """

    def __init__(self, headers=None, **kwargs):
        super(HTTPHeaderDict, self).__init__()
        self._container = OrderedDict()
        if headers is not None:
            if isinstance(headers, HTTPHeaderDict):
                self._copy_from(headers)
            else:
                self.extend(headers)
        if kwargs:
            self.extend(kwargs)

    def __setitem__(self, key, val):
        self._container[key.lower()] = [key, val]
        return self._container[key.lower()]

    def __getitem__(self, key):
        val = self._container[key.lower()]
        return ", ".join(val[1:])

    def __delitem__(self, key):
        del self._container[key.lower()]

    def __contains__(self, key):
        return key.lower() in self._container

    def __eq__(self, other):
        if not isinstance(other, Mapping) and not hasattr(other, "keys"):
            return False
        if not isinstance(other, type(self)):
            other = type(self)(other)
        return dict((k.lower(), v) for k, v in self.itermerged()) == dict(
            (k.lower(), v) for k, v in other.itermerged()
        )

    def __ne__(self, other):
        return not self.__eq__(other)

    if six.PY2:  # Python 2
        iterkeys = MutableMapping.iterkeys
        itervalues = MutableMapping.itervalues

    __marker = object()

    def __len__(self):
        return len(self._container)

    def __iter__(self):
        # Only provide the originally cased names
        for vals in self._container.values():
            yield vals[0]

    def pop(self, key, default=__marker):
        """D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
        If key is not found, d is returned if given, otherwise KeyError is raised.
        """
        # Using the MutableMapping function directly fails due to the private marker.
        # Using ordinary dict.pop would expose the internal structures.
        # So let's reinvent the wheel.
        try:
            value = self[key]
        except KeyError:
            if default is self.__marker:
                raise
            return default
        else:
            del self[key]
            return value

    def discard(self, key):
        try:
            del self[key]
        except KeyError:
            pass

    def add(self, key, val):
        """Adds a (name, value) pair, doesn't overwrite the value if it already
        exists.

        >>> headers = HTTPHeaderDict(foo='bar')
        >>> headers.add('Foo', 'baz')
        >>> headers['foo']
        'bar, baz'
        """
        key_lower = key.lower()
        new_vals = [key, val]
        # Keep the common case aka no item present as fast as possible
        vals = self._container.setdefault(key_lower, new_vals)
        if new_vals is not vals:
            vals.append(val)

    def extend(self, *args, **kwargs):
        """Generic import function for any type of header-like object.
        Adapted version of MutableMapping.update in order to insert items
        with self.add instead of self.__setitem__
        """
        if len(args) > 1:
            raise TypeError(
                "extend() takes at most 1 positional "
                "arguments ({0} given)".format(len(args))
            )
        other = args[0] if len(args) >= 1 else ()

        if isinstance(other, HTTPHeaderDict):
            for key, val in other.iteritems():
                self.add(key, val)
        elif isinstance(other, Mapping):
            for key in other:
                self.add(key, other[key])
        elif hasattr(other, "keys"):
            for key in other.keys():
                self.add(key, other[key])
        else:
            for key, value in other:
                self.add(key, value)

        for key, value in kwargs.items():
            self.add(key, value)

    def getlist(self, key, default=__marker):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = self._container[key.lower()]
        except KeyError:
            if default is self.__marker:
                return []
            return default
        else:
            return vals[1:]

    # Backwards compatibility for httplib
    getheaders = getlist
    getallmatchingheaders = getlist
    iget = getlist

    # Backwards compatibility for http.cookiejar
    get_all = getlist

    def __repr__(self):
        return "%s(%s)" % (type(self).__name__, dict(self.itermerged()))

    def _copy_from(self, other):
        for key in other:
            val = other.getlist(key)
            if isinstance(val, list):
                # Don't need to convert tuples
                val = list(val)
            self._container[key.lower()] = [key] + val

    def copy(self):
        clone = type(self)()
        clone._copy_from(self)
        return clone

    def iteritems(self):
        """Iterate over all header lines, including duplicate ones."""
        for key in self:
            vals = self._container[key.lower()]
            for val in vals[1:]:
                yield vals[0], val

    def itermerged(self):
        """Iterate over all headers, merging duplicate ones together."""
        for key in self:
            val = self._container[key.lower()]
            yield val[0], ", ".join(val[1:])

    def items(self):
        return list(self.iteritems())

    @classmethod
    def from_httplib(cls, message):  # Python 2
        """Read headers from a Python 2 httplib message object."""
        # python2.7 does not expose a proper API for exporting multiheaders
        # efficiently. This function re-reads raw lines from the message
        # object and extracts the multiheaders properly.
        obs_fold_continued_leaders = (" ", "\t")
        headers = []

        for line in message.headers:
            if line.startswith(obs_fold_continued_leaders):
                if not headers:
                    # We received a header line that starts with OWS as described
                    # in RFC-7230 S3.2.4. This indicates a multiline header, but
                    # there exists no previous header to which we can attach it.
                    raise InvalidHeader(
                        "Header continuation with no previous header: %s" % line
                    )
                else:
                    key, value = headers[-1]
                    headers[-1] = (key, value + " " + line.strip())
                    continue

            key, value = line.split(":", 1)
            headers.append((key, value.strip()))

        return cls(headers)
python3.12/site-packages/pip/_vendor/urllib3/contrib/securetransport.py000064400000103220151732702430022170 0ustar00"""
SecureTranport support for urllib3 via ctypes.

This makes platform-native TLS available to urllib3 users on macOS without the
use of a compiler. This is an important feature because the Python Package
Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
that ships with macOS is not capable of doing TLSv1.2. The only way to resolve
this is to give macOS users an alternative solution to the problem, and that
solution is to use SecureTransport.

We use ctypes here because this solution must not require a compiler. That's
because pip is not allowed to require a compiler either.

This is not intended to be a seriously long-term solution to this problem.
The hope is that PEP 543 will eventually solve this issue for us, at which
point we can retire this contrib module. But in the short term, we need to
solve the impending tire fire that is Python on Mac without this kind of
contrib module. So...here we are.

To use this module, simply import and inject it::

    import pip._vendor.urllib3.contrib.securetransport as securetransport
    securetransport.inject_into_urllib3()

Happy TLSing!

This code is a bastardised version of the code found in Will Bond's oscrypto
library. An enormous debt is owed to him for blazing this trail for us. For
that reason, this code should be considered to be covered both by urllib3's
license and by oscrypto's:

.. code-block::

    Copyright (c) 2015-2016 Will Bond <will@wbond.net>

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.
"""
from __future__ import absolute_import

import contextlib
import ctypes
import errno
import os.path
import shutil
import socket
import ssl
import struct
import threading
import weakref

from pip._vendor import six

from .. import util
from ..util.ssl_ import PROTOCOL_TLS_CLIENT
from ._securetransport.bindings import CoreFoundation, Security, SecurityConst
from ._securetransport.low_level import (
    _assert_no_error,
    _build_tls_unknown_ca_alert,
    _cert_array_from_pem,
    _create_cfstring_array,
    _load_client_cert_chain,
    _temporary_keychain,
)

try:  # Platform-specific: Python 2
    from socket import _fileobject
except ImportError:  # Platform-specific: Python 3
    _fileobject = None
    from ..packages.backports.makefile import backport_makefile

__all__ = ["inject_into_urllib3", "extract_from_urllib3"]

# SNI always works
HAS_SNI = True

orig_util_HAS_SNI = util.HAS_SNI
orig_util_SSLContext = util.ssl_.SSLContext

# This dictionary is used by the read callback to obtain a handle to the
# calling wrapped socket. This is a pretty silly approach, but for now it'll
# do. I feel like I should be able to smuggle a handle to the wrapped socket
# directly in the SSLConnectionRef, but for now this approach will work I
# guess.
#
# We need to lock around this structure for inserts, but we don't do it for
# reads/writes in the callbacks. The reasoning here goes as follows:
#
#    1. It is not possible to call into the callbacks before the dictionary is
#       populated, so once in the callback the id must be in the dictionary.
#    2. The callbacks don't mutate the dictionary, they only read from it, and
#       so cannot conflict with any of the insertions.
#
# This is good: if we had to lock in the callbacks we'd drastically slow down
# the performance of this code.
_connection_refs = weakref.WeakValueDictionary()
_connection_ref_lock = threading.Lock()

# Limit writes to 16kB. This is OpenSSL's limit, but we'll cargo-cult it over
# for no better reason than we need *a* limit, and this one is right there.
SSL_WRITE_BLOCKSIZE = 16384

# This is our equivalent of util.ssl_.DEFAULT_CIPHERS, but expanded out to
# individual cipher suites. We need to do this because this is how
# SecureTransport wants them.
CIPHER_SUITES = [
    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
    SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
    SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
    SecurityConst.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
    SecurityConst.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
    SecurityConst.TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
    SecurityConst.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
    SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
    SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
    SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
    SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
    SecurityConst.TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
    SecurityConst.TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
    SecurityConst.TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
    SecurityConst.TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
    SecurityConst.TLS_AES_256_GCM_SHA384,
    SecurityConst.TLS_AES_128_GCM_SHA256,
    SecurityConst.TLS_RSA_WITH_AES_256_GCM_SHA384,
    SecurityConst.TLS_RSA_WITH_AES_128_GCM_SHA256,
    SecurityConst.TLS_AES_128_CCM_8_SHA256,
    SecurityConst.TLS_AES_128_CCM_SHA256,
    SecurityConst.TLS_RSA_WITH_AES_256_CBC_SHA256,
    SecurityConst.TLS_RSA_WITH_AES_128_CBC_SHA256,
    SecurityConst.TLS_RSA_WITH_AES_256_CBC_SHA,
    SecurityConst.TLS_RSA_WITH_AES_128_CBC_SHA,
]

# Basically this is simple: for PROTOCOL_SSLv23 we turn it into a low of
# TLSv1 and a high of TLSv1.2. For everything else, we pin to that version.
# TLSv1 to 1.2 are supported on macOS 10.8+
_protocol_to_min_max = {
    util.PROTOCOL_TLS: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12),
    PROTOCOL_TLS_CLIENT: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12),
}

if hasattr(ssl, "PROTOCOL_SSLv2"):
    _protocol_to_min_max[ssl.PROTOCOL_SSLv2] = (
        SecurityConst.kSSLProtocol2,
        SecurityConst.kSSLProtocol2,
    )
if hasattr(ssl, "PROTOCOL_SSLv3"):
    _protocol_to_min_max[ssl.PROTOCOL_SSLv3] = (
        SecurityConst.kSSLProtocol3,
        SecurityConst.kSSLProtocol3,
    )
if hasattr(ssl, "PROTOCOL_TLSv1"):
    _protocol_to_min_max[ssl.PROTOCOL_TLSv1] = (
        SecurityConst.kTLSProtocol1,
        SecurityConst.kTLSProtocol1,
    )
if hasattr(ssl, "PROTOCOL_TLSv1_1"):
    _protocol_to_min_max[ssl.PROTOCOL_TLSv1_1] = (
        SecurityConst.kTLSProtocol11,
        SecurityConst.kTLSProtocol11,
    )
if hasattr(ssl, "PROTOCOL_TLSv1_2"):
    _protocol_to_min_max[ssl.PROTOCOL_TLSv1_2] = (
        SecurityConst.kTLSProtocol12,
        SecurityConst.kTLSProtocol12,
    )


def inject_into_urllib3():
    """
    Monkey-patch urllib3 with SecureTransport-backed SSL-support.
    """
    util.SSLContext = SecureTransportContext
    util.ssl_.SSLContext = SecureTransportContext
    util.HAS_SNI = HAS_SNI
    util.ssl_.HAS_SNI = HAS_SNI
    util.IS_SECURETRANSPORT = True
    util.ssl_.IS_SECURETRANSPORT = True


def extract_from_urllib3():
    """
    Undo monkey-patching by :func:`inject_into_urllib3`.
    """
    util.SSLContext = orig_util_SSLContext
    util.ssl_.SSLContext = orig_util_SSLContext
    util.HAS_SNI = orig_util_HAS_SNI
    util.ssl_.HAS_SNI = orig_util_HAS_SNI
    util.IS_SECURETRANSPORT = False
    util.ssl_.IS_SECURETRANSPORT = False


def _read_callback(connection_id, data_buffer, data_length_pointer):
    """
    SecureTransport read callback. This is called by ST to request that data
    be returned from the socket.
    """
    wrapped_socket = None
    try:
        wrapped_socket = _connection_refs.get(connection_id)
        if wrapped_socket is None:
            return SecurityConst.errSSLInternal
        base_socket = wrapped_socket.socket

        requested_length = data_length_pointer[0]

        timeout = wrapped_socket.gettimeout()
        error = None
        read_count = 0

        try:
            while read_count < requested_length:
                if timeout is None or timeout >= 0:
                    if not util.wait_for_read(base_socket, timeout):
                        raise socket.error(errno.EAGAIN, "timed out")

                remaining = requested_length - read_count
                buffer = (ctypes.c_char * remaining).from_address(
                    data_buffer + read_count
                )
                chunk_size = base_socket.recv_into(buffer, remaining)
                read_count += chunk_size
                if not chunk_size:
                    if not read_count:
                        return SecurityConst.errSSLClosedGraceful
                    break
        except (socket.error) as e:
            error = e.errno

            if error is not None and error != errno.EAGAIN:
                data_length_pointer[0] = read_count
                if error == errno.ECONNRESET or error == errno.EPIPE:
                    return SecurityConst.errSSLClosedAbort
                raise

        data_length_pointer[0] = read_count

        if read_count != requested_length:
            return SecurityConst.errSSLWouldBlock

        return 0
    except Exception as e:
        if wrapped_socket is not None:
            wrapped_socket._exception = e
        return SecurityConst.errSSLInternal


def _write_callback(connection_id, data_buffer, data_length_pointer):
    """
    SecureTransport write callback. This is called by ST to request that data
    actually be sent on the network.
    """
    wrapped_socket = None
    try:
        wrapped_socket = _connection_refs.get(connection_id)
        if wrapped_socket is None:
            return SecurityConst.errSSLInternal
        base_socket = wrapped_socket.socket

        bytes_to_write = data_length_pointer[0]
        data = ctypes.string_at(data_buffer, bytes_to_write)

        timeout = wrapped_socket.gettimeout()
        error = None
        sent = 0

        try:
            while sent < bytes_to_write:
                if timeout is None or timeout >= 0:
                    if not util.wait_for_write(base_socket, timeout):
                        raise socket.error(errno.EAGAIN, "timed out")
                chunk_sent = base_socket.send(data)
                sent += chunk_sent

                # This has some needless copying here, but I'm not sure there's
                # much value in optimising this data path.
                data = data[chunk_sent:]
        except (socket.error) as e:
            error = e.errno

            if error is not None and error != errno.EAGAIN:
                data_length_pointer[0] = sent
                if error == errno.ECONNRESET or error == errno.EPIPE:
                    return SecurityConst.errSSLClosedAbort
                raise

        data_length_pointer[0] = sent

        if sent != bytes_to_write:
            return SecurityConst.errSSLWouldBlock

        return 0
    except Exception as e:
        if wrapped_socket is not None:
            wrapped_socket._exception = e
        return SecurityConst.errSSLInternal


# We need to keep these two objects references alive: if they get GC'd while
# in use then SecureTransport could attempt to call a function that is in freed
# memory. That would be...uh...bad. Yeah, that's the word. Bad.
_read_callback_pointer = Security.SSLReadFunc(_read_callback)
_write_callback_pointer = Security.SSLWriteFunc(_write_callback)


class WrappedSocket(object):
    """
    API-compatibility wrapper for Python's OpenSSL wrapped socket object.

    Note: _makefile_refs, _drop(), and _reuse() are needed for the garbage
    collector of PyPy.
    """

    def __init__(self, socket):
        self.socket = socket
        self.context = None
        self._makefile_refs = 0
        self._closed = False
        self._exception = None
        self._keychain = None
        self._keychain_dir = None
        self._client_cert_chain = None

        # We save off the previously-configured timeout and then set it to
        # zero. This is done because we use select and friends to handle the
        # timeouts, but if we leave the timeout set on the lower socket then
        # Python will "kindly" call select on that socket again for us. Avoid
        # that by forcing the timeout to zero.
        self._timeout = self.socket.gettimeout()
        self.socket.settimeout(0)

    @contextlib.contextmanager
    def _raise_on_error(self):
        """
        A context manager that can be used to wrap calls that do I/O from
        SecureTransport. If any of the I/O callbacks hit an exception, this
        context manager will correctly propagate the exception after the fact.
        This avoids silently swallowing those exceptions.

        It also correctly forces the socket closed.
        """
        self._exception = None

        # We explicitly don't catch around this yield because in the unlikely
        # event that an exception was hit in the block we don't want to swallow
        # it.
        yield
        if self._exception is not None:
            exception, self._exception = self._exception, None
            self.close()
            raise exception

    def _set_ciphers(self):
        """
        Sets up the allowed ciphers. By default this matches the set in
        util.ssl_.DEFAULT_CIPHERS, at least as supported by macOS. This is done
        custom and doesn't allow changing at this time, mostly because parsing
        OpenSSL cipher strings is going to be a freaking nightmare.
        """
        ciphers = (Security.SSLCipherSuite * len(CIPHER_SUITES))(*CIPHER_SUITES)
        result = Security.SSLSetEnabledCiphers(
            self.context, ciphers, len(CIPHER_SUITES)
        )
        _assert_no_error(result)

    def _set_alpn_protocols(self, protocols):
        """
        Sets up the ALPN protocols on the context.
        """
        if not protocols:
            return
        protocols_arr = _create_cfstring_array(protocols)
        try:
            result = Security.SSLSetALPNProtocols(self.context, protocols_arr)
            _assert_no_error(result)
        finally:
            CoreFoundation.CFRelease(protocols_arr)

    def _custom_validate(self, verify, trust_bundle):
        """
        Called when we have set custom validation. We do this in two cases:
        first, when cert validation is entirely disabled; and second, when
        using a custom trust DB.
        Raises an SSLError if the connection is not trusted.
        """
        # If we disabled cert validation, just say: cool.
        if not verify:
            return

        successes = (
            SecurityConst.kSecTrustResultUnspecified,
            SecurityConst.kSecTrustResultProceed,
        )
        try:
            trust_result = self._evaluate_trust(trust_bundle)
            if trust_result in successes:
                return
            reason = "error code: %d" % (trust_result,)
        except Exception as e:
            # Do not trust on error
            reason = "exception: %r" % (e,)

        # SecureTransport does not send an alert nor shuts down the connection.
        rec = _build_tls_unknown_ca_alert(self.version())
        self.socket.sendall(rec)
        # close the connection immediately
        # l_onoff = 1, activate linger
        # l_linger = 0, linger for 0 seoncds
        opts = struct.pack("ii", 1, 0)
        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, opts)
        self.close()
        raise ssl.SSLError("certificate verify failed, %s" % reason)

    def _evaluate_trust(self, trust_bundle):
        # We want data in memory, so load it up.
        if os.path.isfile(trust_bundle):
            with open(trust_bundle, "rb") as f:
                trust_bundle = f.read()

        cert_array = None
        trust = Security.SecTrustRef()

        try:
            # Get a CFArray that contains the certs we want.
            cert_array = _cert_array_from_pem(trust_bundle)

            # Ok, now the hard part. We want to get the SecTrustRef that ST has
            # created for this connection, shove our CAs into it, tell ST to
            # ignore everything else it knows, and then ask if it can build a
            # chain. This is a buuuunch of code.
            result = Security.SSLCopyPeerTrust(self.context, ctypes.byref(trust))
            _assert_no_error(result)
            if not trust:
                raise ssl.SSLError("Failed to copy trust reference")

            result = Security.SecTrustSetAnchorCertificates(trust, cert_array)
            _assert_no_error(result)

            result = Security.SecTrustSetAnchorCertificatesOnly(trust, True)
            _assert_no_error(result)

            trust_result = Security.SecTrustResultType()
            result = Security.SecTrustEvaluate(trust, ctypes.byref(trust_result))
            _assert_no_error(result)
        finally:
            if trust:
                CoreFoundation.CFRelease(trust)

            if cert_array is not None:
                CoreFoundation.CFRelease(cert_array)

        return trust_result.value

    def handshake(
        self,
        server_hostname,
        verify,
        trust_bundle,
        min_version,
        max_version,
        client_cert,
        client_key,
        client_key_passphrase,
        alpn_protocols,
    ):
        """
        Actually performs the TLS handshake. This is run automatically by
        wrapped socket, and shouldn't be needed in user code.
        """
        # First, we do the initial bits of connection setup. We need to create
        # a context, set its I/O funcs, and set the connection reference.
        self.context = Security.SSLCreateContext(
            None, SecurityConst.kSSLClientSide, SecurityConst.kSSLStreamType
        )
        result = Security.SSLSetIOFuncs(
            self.context, _read_callback_pointer, _write_callback_pointer
        )
        _assert_no_error(result)

        # Here we need to compute the handle to use. We do this by taking the
        # id of self modulo 2**31 - 1. If this is already in the dictionary, we
        # just keep incrementing by one until we find a free space.
        with _connection_ref_lock:
            handle = id(self) % 2147483647
            while handle in _connection_refs:
                handle = (handle + 1) % 2147483647
            _connection_refs[handle] = self

        result = Security.SSLSetConnection(self.context, handle)
        _assert_no_error(result)

        # If we have a server hostname, we should set that too.
        if server_hostname:
            if not isinstance(server_hostname, bytes):
                server_hostname = server_hostname.encode("utf-8")

            result = Security.SSLSetPeerDomainName(
                self.context, server_hostname, len(server_hostname)
            )
            _assert_no_error(result)

        # Setup the ciphers.
        self._set_ciphers()

        # Setup the ALPN protocols.
        self._set_alpn_protocols(alpn_protocols)

        # Set the minimum and maximum TLS versions.
        result = Security.SSLSetProtocolVersionMin(self.context, min_version)
        _assert_no_error(result)

        result = Security.SSLSetProtocolVersionMax(self.context, max_version)
        _assert_no_error(result)

        # If there's a trust DB, we need to use it. We do that by telling
        # SecureTransport to break on server auth. We also do that if we don't
        # want to validate the certs at all: we just won't actually do any
        # authing in that case.
        if not verify or trust_bundle is not None:
            result = Security.SSLSetSessionOption(
                self.context, SecurityConst.kSSLSessionOptionBreakOnServerAuth, True
            )
            _assert_no_error(result)

        # If there's a client cert, we need to use it.
        if client_cert:
            self._keychain, self._keychain_dir = _temporary_keychain()
            self._client_cert_chain = _load_client_cert_chain(
                self._keychain, client_cert, client_key
            )
            result = Security.SSLSetCertificate(self.context, self._client_cert_chain)
            _assert_no_error(result)

        while True:
            with self._raise_on_error():
                result = Security.SSLHandshake(self.context)

                if result == SecurityConst.errSSLWouldBlock:
                    raise socket.timeout("handshake timed out")
                elif result == SecurityConst.errSSLServerAuthCompleted:
                    self._custom_validate(verify, trust_bundle)
                    continue
                else:
                    _assert_no_error(result)
                    break

    def fileno(self):
        return self.socket.fileno()

    # Copy-pasted from Python 3.5 source code
    def _decref_socketios(self):
        if self._makefile_refs > 0:
            self._makefile_refs -= 1
        if self._closed:
            self.close()

    def recv(self, bufsiz):
        buffer = ctypes.create_string_buffer(bufsiz)
        bytes_read = self.recv_into(buffer, bufsiz)
        data = buffer[:bytes_read]
        return data

    def recv_into(self, buffer, nbytes=None):
        # Read short on EOF.
        if self._closed:
            return 0

        if nbytes is None:
            nbytes = len(buffer)

        buffer = (ctypes.c_char * nbytes).from_buffer(buffer)
        processed_bytes = ctypes.c_size_t(0)

        with self._raise_on_error():
            result = Security.SSLRead(
                self.context, buffer, nbytes, ctypes.byref(processed_bytes)
            )

        # There are some result codes that we want to treat as "not always
        # errors". Specifically, those are errSSLWouldBlock,
        # errSSLClosedGraceful, and errSSLClosedNoNotify.
        if result == SecurityConst.errSSLWouldBlock:
            # If we didn't process any bytes, then this was just a time out.
            # However, we can get errSSLWouldBlock in situations when we *did*
            # read some data, and in those cases we should just read "short"
            # and return.
            if processed_bytes.value == 0:
                # Timed out, no data read.
                raise socket.timeout("recv timed out")
        elif result in (
            SecurityConst.errSSLClosedGraceful,
            SecurityConst.errSSLClosedNoNotify,
        ):
            # The remote peer has closed this connection. We should do so as
            # well. Note that we don't actually return here because in
            # principle this could actually be fired along with return data.
            # It's unlikely though.
            self.close()
        else:
            _assert_no_error(result)

        # Ok, we read and probably succeeded. We should return whatever data
        # was actually read.
        return processed_bytes.value

    def settimeout(self, timeout):
        self._timeout = timeout

    def gettimeout(self):
        return self._timeout

    def send(self, data):
        processed_bytes = ctypes.c_size_t(0)

        with self._raise_on_error():
            result = Security.SSLWrite(
                self.context, data, len(data), ctypes.byref(processed_bytes)
            )

        if result == SecurityConst.errSSLWouldBlock and processed_bytes.value == 0:
            # Timed out
            raise socket.timeout("send timed out")
        else:
            _assert_no_error(result)

        # We sent, and probably succeeded. Tell them how much we sent.
        return processed_bytes.value

    def sendall(self, data):
        total_sent = 0
        while total_sent < len(data):
            sent = self.send(data[total_sent : total_sent + SSL_WRITE_BLOCKSIZE])
            total_sent += sent

    def shutdown(self):
        with self._raise_on_error():
            Security.SSLClose(self.context)

    def close(self):
        # TODO: should I do clean shutdown here? Do I have to?
        if self._makefile_refs < 1:
            self._closed = True
            if self.context:
                CoreFoundation.CFRelease(self.context)
                self.context = None
            if self._client_cert_chain:
                CoreFoundation.CFRelease(self._client_cert_chain)
                self._client_cert_chain = None
            if self._keychain:
                Security.SecKeychainDelete(self._keychain)
                CoreFoundation.CFRelease(self._keychain)
                shutil.rmtree(self._keychain_dir)
                self._keychain = self._keychain_dir = None
            return self.socket.close()
        else:
            self._makefile_refs -= 1

    def getpeercert(self, binary_form=False):
        # Urgh, annoying.
        #
        # Here's how we do this:
        #
        # 1. Call SSLCopyPeerTrust to get hold of the trust object for this
        #    connection.
        # 2. Call SecTrustGetCertificateAtIndex for index 0 to get the leaf.
        # 3. To get the CN, call SecCertificateCopyCommonName and process that
        #    string so that it's of the appropriate type.
        # 4. To get the SAN, we need to do something a bit more complex:
        #    a. Call SecCertificateCopyValues to get the data, requesting
        #       kSecOIDSubjectAltName.
        #    b. Mess about with this dictionary to try to get the SANs out.
        #
        # This is gross. Really gross. It's going to be a few hundred LoC extra
        # just to repeat something that SecureTransport can *already do*. So my
        # operating assumption at this time is that what we want to do is
        # instead to just flag to urllib3 that it shouldn't do its own hostname
        # validation when using SecureTransport.
        if not binary_form:
            raise ValueError("SecureTransport only supports dumping binary certs")
        trust = Security.SecTrustRef()
        certdata = None
        der_bytes = None

        try:
            # Grab the trust store.
            result = Security.SSLCopyPeerTrust(self.context, ctypes.byref(trust))
            _assert_no_error(result)
            if not trust:
                # Probably we haven't done the handshake yet. No biggie.
                return None

            cert_count = Security.SecTrustGetCertificateCount(trust)
            if not cert_count:
                # Also a case that might happen if we haven't handshaked.
                # Handshook? Handshaken?
                return None

            leaf = Security.SecTrustGetCertificateAtIndex(trust, 0)
            assert leaf

            # Ok, now we want the DER bytes.
            certdata = Security.SecCertificateCopyData(leaf)
            assert certdata

            data_length = CoreFoundation.CFDataGetLength(certdata)
            data_buffer = CoreFoundation.CFDataGetBytePtr(certdata)
            der_bytes = ctypes.string_at(data_buffer, data_length)
        finally:
            if certdata:
                CoreFoundation.CFRelease(certdata)
            if trust:
                CoreFoundation.CFRelease(trust)

        return der_bytes

    def version(self):
        protocol = Security.SSLProtocol()
        result = Security.SSLGetNegotiatedProtocolVersion(
            self.context, ctypes.byref(protocol)
        )
        _assert_no_error(result)
        if protocol.value == SecurityConst.kTLSProtocol13:
            raise ssl.SSLError("SecureTransport does not support TLS 1.3")
        elif protocol.value == SecurityConst.kTLSProtocol12:
            return "TLSv1.2"
        elif protocol.value == SecurityConst.kTLSProtocol11:
            return "TLSv1.1"
        elif protocol.value == SecurityConst.kTLSProtocol1:
            return "TLSv1"
        elif protocol.value == SecurityConst.kSSLProtocol3:
            return "SSLv3"
        elif protocol.value == SecurityConst.kSSLProtocol2:
            return "SSLv2"
        else:
            raise ssl.SSLError("Unknown TLS version: %r" % protocol)

    def _reuse(self):
        self._makefile_refs += 1

    def _drop(self):
        if self._makefile_refs < 1:
            self.close()
        else:
            self._makefile_refs -= 1


if _fileobject:  # Platform-specific: Python 2

    def makefile(self, mode, bufsize=-1):
        self._makefile_refs += 1
        return _fileobject(self, mode, bufsize, close=True)

else:  # Platform-specific: Python 3

    def makefile(self, mode="r", buffering=None, *args, **kwargs):
        # We disable buffering with SecureTransport because it conflicts with
        # the buffering that ST does internally (see issue #1153 for more).
        buffering = 0
        return backport_makefile(self, mode, buffering, *args, **kwargs)


WrappedSocket.makefile = makefile


class SecureTransportContext(object):
    """
    I am a wrapper class for the SecureTransport library, to translate the
    interface of the standard library ``SSLContext`` object to calls into
    SecureTransport.
    """

    def __init__(self, protocol):
        self._min_version, self._max_version = _protocol_to_min_max[protocol]
        self._options = 0
        self._verify = False
        self._trust_bundle = None
        self._client_cert = None
        self._client_key = None
        self._client_key_passphrase = None
        self._alpn_protocols = None

    @property
    def check_hostname(self):
        """
        SecureTransport cannot have its hostname checking disabled. For more,
        see the comment on getpeercert() in this file.
        """
        return True

    @check_hostname.setter
    def check_hostname(self, value):
        """
        SecureTransport cannot have its hostname checking disabled. For more,
        see the comment on getpeercert() in this file.
        """
        pass

    @property
    def options(self):
        # TODO: Well, crap.
        #
        # So this is the bit of the code that is the most likely to cause us
        # trouble. Essentially we need to enumerate all of the SSL options that
        # users might want to use and try to see if we can sensibly translate
        # them, or whether we should just ignore them.
        return self._options

    @options.setter
    def options(self, value):
        # TODO: Update in line with above.
        self._options = value

    @property
    def verify_mode(self):
        return ssl.CERT_REQUIRED if self._verify else ssl.CERT_NONE

    @verify_mode.setter
    def verify_mode(self, value):
        self._verify = True if value == ssl.CERT_REQUIRED else False

    def set_default_verify_paths(self):
        # So, this has to do something a bit weird. Specifically, what it does
        # is nothing.
        #
        # This means that, if we had previously had load_verify_locations
        # called, this does not undo that. We need to do that because it turns
        # out that the rest of the urllib3 code will attempt to load the
        # default verify paths if it hasn't been told about any paths, even if
        # the context itself was sometime earlier. We resolve that by just
        # ignoring it.
        pass

    def load_default_certs(self):
        return self.set_default_verify_paths()

    def set_ciphers(self, ciphers):
        # For now, we just require the default cipher string.
        if ciphers != util.ssl_.DEFAULT_CIPHERS:
            raise ValueError("SecureTransport doesn't support custom cipher strings")

    def load_verify_locations(self, cafile=None, capath=None, cadata=None):
        # OK, we only really support cadata and cafile.
        if capath is not None:
            raise ValueError("SecureTransport does not support cert directories")

        # Raise if cafile does not exist.
        if cafile is not None:
            with open(cafile):
                pass

        self._trust_bundle = cafile or cadata

    def load_cert_chain(self, certfile, keyfile=None, password=None):
        self._client_cert = certfile
        self._client_key = keyfile
        self._client_cert_passphrase = password

    def set_alpn_protocols(self, protocols):
        """
        Sets the ALPN protocols that will later be set on the context.

        Raises a NotImplementedError if ALPN is not supported.
        """
        if not hasattr(Security, "SSLSetALPNProtocols"):
            raise NotImplementedError(
                "SecureTransport supports ALPN only in macOS 10.12+"
            )
        self._alpn_protocols = [six.ensure_binary(p) for p in protocols]

    def wrap_socket(
        self,
        sock,
        server_side=False,
        do_handshake_on_connect=True,
        suppress_ragged_eofs=True,
        server_hostname=None,
    ):
        # So, what do we do here? Firstly, we assert some properties. This is a
        # stripped down shim, so there is some functionality we don't support.
        # See PEP 543 for the real deal.
        assert not server_side
        assert do_handshake_on_connect
        assert suppress_ragged_eofs

        # Ok, we're good to go. Now we want to create the wrapped socket object
        # and store it in the appropriate place.
        wrapped_socket = WrappedSocket(sock)

        # Now we can handshake
        wrapped_socket.handshake(
            server_hostname,
            self._verify,
            self._trust_bundle,
            self._min_version,
            self._max_version,
            self._client_cert,
            self._client_key,
            self._client_key_passphrase,
            self._alpn_protocols,
        )
        return wrapped_socket
python3.12/site-packages/pip/_vendor/urllib3/contrib/appengine.py000064400000025434151732702430020705 0ustar00"""
This module provides a pool manager that uses Google App Engine's
`URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_.

Example usage::

    from pip._vendor.urllib3 import PoolManager
    from pip._vendor.urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox

    if is_appengine_sandbox():
        # AppEngineManager uses AppEngine's URLFetch API behind the scenes
        http = AppEngineManager()
    else:
        # PoolManager uses a socket-level API behind the scenes
        http = PoolManager()

    r = http.request('GET', 'https://google.com/')

There are `limitations <https://cloud.google.com/appengine/docs/python/\
urlfetch/#Python_Quotas_and_limits>`_ to the URLFetch service and it may not be
the best choice for your application. There are three options for using
urllib3 on Google App Engine:

1. You can use :class:`AppEngineManager` with URLFetch. URLFetch is
   cost-effective in many circumstances as long as your usage is within the
   limitations.
2. You can use a normal :class:`~urllib3.PoolManager` by enabling sockets.
   Sockets also have `limitations and restrictions
   <https://cloud.google.com/appengine/docs/python/sockets/\
   #limitations-and-restrictions>`_ and have a lower free quota than URLFetch.
   To use sockets, be sure to specify the following in your ``app.yaml``::

        env_variables:
            GAE_USE_SOCKETS_HTTPLIB : 'true'

3. If you are using `App Engine Flexible
<https://cloud.google.com/appengine/docs/flexible/>`_, you can use the standard
:class:`PoolManager` without any configuration or special environment variables.
"""

from __future__ import absolute_import

import io
import logging
import warnings

from ..exceptions import (
    HTTPError,
    HTTPWarning,
    MaxRetryError,
    ProtocolError,
    SSLError,
    TimeoutError,
)
from ..packages.six.moves.urllib.parse import urljoin
from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.retry import Retry
from ..util.timeout import Timeout
from . import _appengine_environ

try:
    from google.appengine.api import urlfetch
except ImportError:
    urlfetch = None


log = logging.getLogger(__name__)


class AppEnginePlatformWarning(HTTPWarning):
    pass


class AppEnginePlatformError(HTTPError):
    pass


class AppEngineManager(RequestMethods):
    """
    Connection manager for Google App Engine sandbox applications.

    This manager uses the URLFetch service directly instead of using the
    emulated httplib, and is subject to URLFetch limitations as described in
    the App Engine documentation `here
    <https://cloud.google.com/appengine/docs/python/urlfetch>`_.

    Notably it will raise an :class:`AppEnginePlatformError` if:
        * URLFetch is not available.
        * If you attempt to use this on App Engine Flexible, as full socket
          support is available.
        * If a request size is more than 10 megabytes.
        * If a response size is more than 32 megabytes.
        * If you use an unsupported request method such as OPTIONS.

    Beyond those cases, it will raise normal urllib3 errors.
    """

    def __init__(
        self,
        headers=None,
        retries=None,
        validate_certificate=True,
        urlfetch_retries=True,
    ):
        if not urlfetch:
            raise AppEnginePlatformError(
                "URLFetch is not available in this environment."
            )

        warnings.warn(
            "urllib3 is using URLFetch on Google App Engine sandbox instead "
            "of sockets. To use sockets directly instead of URLFetch see "
            "https://urllib3.readthedocs.io/en/1.26.x/reference/urllib3.contrib.html.",
            AppEnginePlatformWarning,
        )

        RequestMethods.__init__(self, headers)
        self.validate_certificate = validate_certificate
        self.urlfetch_retries = urlfetch_retries

        self.retries = retries or Retry.DEFAULT

    def __enter__(self):
        return self

    def __exit__(self, exc_type, exc_val, exc_tb):
        # Return False to re-raise any potential exceptions
        return False

    def urlopen(
        self,
        method,
        url,
        body=None,
        headers=None,
        retries=None,
        redirect=True,
        timeout=Timeout.DEFAULT_TIMEOUT,
        **response_kw
    ):

        retries = self._get_retries(retries, redirect)

        try:
            follow_redirects = redirect and retries.redirect != 0 and retries.total
            response = urlfetch.fetch(
                url,
                payload=body,
                method=method,
                headers=headers or {},
                allow_truncated=False,
                follow_redirects=self.urlfetch_retries and follow_redirects,
                deadline=self._get_absolute_timeout(timeout),
                validate_certificate=self.validate_certificate,
            )
        except urlfetch.DeadlineExceededError as e:
            raise TimeoutError(self, e)

        except urlfetch.InvalidURLError as e:
            if "too large" in str(e):
                raise AppEnginePlatformError(
                    "URLFetch request too large, URLFetch only "
                    "supports requests up to 10mb in size.",
                    e,
                )
            raise ProtocolError(e)

        except urlfetch.DownloadError as e:
            if "Too many redirects" in str(e):
                raise MaxRetryError(self, url, reason=e)
            raise ProtocolError(e)

        except urlfetch.ResponseTooLargeError as e:
            raise AppEnginePlatformError(
                "URLFetch response too large, URLFetch only supports"
                "responses up to 32mb in size.",
                e,
            )

        except urlfetch.SSLCertificateError as e:
            raise SSLError(e)

        except urlfetch.InvalidMethodError as e:
            raise AppEnginePlatformError(
                "URLFetch does not support method: %s" % method, e
            )

        http_response = self._urlfetch_response_to_http_response(
            response, retries=retries, **response_kw
        )

        # Handle redirect?
        redirect_location = redirect and http_response.get_redirect_location()
        if redirect_location:
            # Check for redirect response
            if self.urlfetch_retries and retries.raise_on_redirect:
                raise MaxRetryError(self, url, "too many redirects")
            else:
                if http_response.status == 303:
                    method = "GET"

                try:
                    retries = retries.increment(
                        method, url, response=http_response, _pool=self
                    )
                except MaxRetryError:
                    if retries.raise_on_redirect:
                        raise MaxRetryError(self, url, "too many redirects")
                    return http_response

                retries.sleep_for_retry(http_response)
                log.debug("Redirecting %s -> %s", url, redirect_location)
                redirect_url = urljoin(url, redirect_location)
                return self.urlopen(
                    method,
                    redirect_url,
                    body,
                    headers,
                    retries=retries,
                    redirect=redirect,
                    timeout=timeout,
                    **response_kw
                )

        # Check if we should retry the HTTP response.
        has_retry_after = bool(http_response.headers.get("Retry-After"))
        if retries.is_retry(method, http_response.status, has_retry_after):
            retries = retries.increment(method, url, response=http_response, _pool=self)
            log.debug("Retry: %s", url)
            retries.sleep(http_response)
            return self.urlopen(
                method,
                url,
                body=body,
                headers=headers,
                retries=retries,
                redirect=redirect,
                timeout=timeout,
                **response_kw
            )

        return http_response

    def _urlfetch_response_to_http_response(self, urlfetch_resp, **response_kw):

        if is_prod_appengine():
            # Production GAE handles deflate encoding automatically, but does
            # not remove the encoding header.
            content_encoding = urlfetch_resp.headers.get("content-encoding")

            if content_encoding == "deflate":
                del urlfetch_resp.headers["content-encoding"]

        transfer_encoding = urlfetch_resp.headers.get("transfer-encoding")
        # We have a full response's content,
        # so let's make sure we don't report ourselves as chunked data.
        if transfer_encoding == "chunked":
            encodings = transfer_encoding.split(",")
            encodings.remove("chunked")
            urlfetch_resp.headers["transfer-encoding"] = ",".join(encodings)

        original_response = HTTPResponse(
            # In order for decoding to work, we must present the content as
            # a file-like object.
            body=io.BytesIO(urlfetch_resp.content),
            msg=urlfetch_resp.header_msg,
            headers=urlfetch_resp.headers,
            status=urlfetch_resp.status_code,
            **response_kw
        )

        return HTTPResponse(
            body=io.BytesIO(urlfetch_resp.content),
            headers=urlfetch_resp.headers,
            status=urlfetch_resp.status_code,
            original_response=original_response,
            **response_kw
        )

    def _get_absolute_timeout(self, timeout):
        if timeout is Timeout.DEFAULT_TIMEOUT:
            return None  # Defer to URLFetch's default.
        if isinstance(timeout, Timeout):
            if timeout._read is not None or timeout._connect is not None:
                warnings.warn(
                    "URLFetch does not support granular timeout settings, "
                    "reverting to total or default URLFetch timeout.",
                    AppEnginePlatformWarning,
                )
            return timeout.total
        return timeout

    def _get_retries(self, retries, redirect):
        if not isinstance(retries, Retry):
            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)

        if retries.connect or retries.read or retries.redirect:
            warnings.warn(
                "URLFetch only supports total retries and does not "
                "recognize connect, read, or redirect retry parameters.",
                AppEnginePlatformWarning,
            )

        return retries


# Alias methods from _appengine_environ to maintain public API interface.

is_appengine = _appengine_environ.is_appengine
is_appengine_sandbox = _appengine_environ.is_appengine_sandbox
is_local_appengine = _appengine_environ.is_local_appengine
is_prod_appengine = _appengine_environ.is_prod_appengine
is_prod_appengine_mvms = _appengine_environ.is_prod_appengine_mvms
python3.12/site-packages/pip/_vendor/urllib3/contrib/socks.py000064400000015671151732702430020063 0ustar00# -*- coding: utf-8 -*-
"""
This module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4, SOCKS4A (an extension of SOCKS4), and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.

The SOCKS implementation supports the full range of urllib3 features. It also
supports the following SOCKS features:

- SOCKS4A (``proxy_url='socks4a://...``)
- SOCKS4 (``proxy_url='socks4://...``)
- SOCKS5 with remote DNS (``proxy_url='socks5h://...``)
- SOCKS5 with local DNS (``proxy_url='socks5://...``)
- Usernames and passwords for the SOCKS proxy

.. note::
   It is recommended to use ``socks5h://`` or ``socks4a://`` schemes in
   your ``proxy_url`` to ensure that DNS resolution is done from the remote
   server instead of client-side when connecting to a domain name.

SOCKS4 supports IPv4 and domain names with the SOCKS4A extension. SOCKS5
supports IPv4, IPv6, and domain names.

When connecting to a SOCKS4 proxy the ``username`` portion of the ``proxy_url``
will be sent as the ``userid`` section of the SOCKS request:

.. code-block:: python

    proxy_url="socks4a://<userid>@proxy-host"

When connecting to a SOCKS5 proxy the ``username`` and ``password`` portion
of the ``proxy_url`` will be sent as the username/password to authenticate
with the proxy:

.. code-block:: python

    proxy_url="socks5h://<username>:<password>@proxy-host"

"""
from __future__ import absolute_import

try:
    import socks
except ImportError:
    import warnings

    from ..exceptions import DependencyWarning

    warnings.warn(
        (
            "SOCKS support in urllib3 requires the installation of optional "
            "dependencies: specifically, PySocks.  For more information, see "
            "https://urllib3.readthedocs.io/en/1.26.x/contrib.html#socks-proxies"
        ),
        DependencyWarning,
    )
    raise

from socket import error as SocketError
from socket import timeout as SocketTimeout

from ..connection import HTTPConnection, HTTPSConnection
from ..connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ..exceptions import ConnectTimeoutError, NewConnectionError
from ..poolmanager import PoolManager
from ..util.url import parse_url

try:
    import ssl
except ImportError:
    ssl = None


class SOCKSConnection(HTTPConnection):
    """
    A plain-text HTTP connection that connects via a SOCKS proxy.
    """

    def __init__(self, *args, **kwargs):
        self._socks_options = kwargs.pop("_socks_options")
        super(SOCKSConnection, self).__init__(*args, **kwargs)

    def _new_conn(self):
        """
        Establish a new connection via the SOCKS proxy.
        """
        extra_kw = {}
        if self.source_address:
            extra_kw["source_address"] = self.source_address

        if self.socket_options:
            extra_kw["socket_options"] = self.socket_options

        try:
            conn = socks.create_connection(
                (self.host, self.port),
                proxy_type=self._socks_options["socks_version"],
                proxy_addr=self._socks_options["proxy_host"],
                proxy_port=self._socks_options["proxy_port"],
                proxy_username=self._socks_options["username"],
                proxy_password=self._socks_options["password"],
                proxy_rdns=self._socks_options["rdns"],
                timeout=self.timeout,
                **extra_kw
            )

        except SocketTimeout:
            raise ConnectTimeoutError(
                self,
                "Connection to %s timed out. (connect timeout=%s)"
                % (self.host, self.timeout),
            )

        except socks.ProxyError as e:
            # This is fragile as hell, but it seems to be the only way to raise
            # useful errors here.
            if e.socket_err:
                error = e.socket_err
                if isinstance(error, SocketTimeout):
                    raise ConnectTimeoutError(
                        self,
                        "Connection to %s timed out. (connect timeout=%s)"
                        % (self.host, self.timeout),
                    )
                else:
                    raise NewConnectionError(
                        self, "Failed to establish a new connection: %s" % error
                    )
            else:
                raise NewConnectionError(
                    self, "Failed to establish a new connection: %s" % e
                )

        except SocketError as e:  # Defensive: PySocks should catch all these.
            raise NewConnectionError(
                self, "Failed to establish a new connection: %s" % e
            )

        return conn


# We don't need to duplicate the Verified/Unverified distinction from
# urllib3/connection.py here because the HTTPSConnection will already have been
# correctly set to either the Verified or Unverified form by that module. This
# means the SOCKSHTTPSConnection will automatically be the correct type.
class SOCKSHTTPSConnection(SOCKSConnection, HTTPSConnection):
    pass


class SOCKSHTTPConnectionPool(HTTPConnectionPool):
    ConnectionCls = SOCKSConnection


class SOCKSHTTPSConnectionPool(HTTPSConnectionPool):
    ConnectionCls = SOCKSHTTPSConnection


class SOCKSProxyManager(PoolManager):
    """
    A version of the urllib3 ProxyManager that routes connections via the
    defined SOCKS proxy.
    """

    pool_classes_by_scheme = {
        "http": SOCKSHTTPConnectionPool,
        "https": SOCKSHTTPSConnectionPool,
    }

    def __init__(
        self,
        proxy_url,
        username=None,
        password=None,
        num_pools=10,
        headers=None,
        **connection_pool_kw
    ):
        parsed = parse_url(proxy_url)

        if username is None and password is None and parsed.auth is not None:
            split = parsed.auth.split(":")
            if len(split) == 2:
                username, password = split
        if parsed.scheme == "socks5":
            socks_version = socks.PROXY_TYPE_SOCKS5
            rdns = False
        elif parsed.scheme == "socks5h":
            socks_version = socks.PROXY_TYPE_SOCKS5
            rdns = True
        elif parsed.scheme == "socks4":
            socks_version = socks.PROXY_TYPE_SOCKS4
            rdns = False
        elif parsed.scheme == "socks4a":
            socks_version = socks.PROXY_TYPE_SOCKS4
            rdns = True
        else:
            raise ValueError("Unable to determine SOCKS version from %s" % proxy_url)

        self.proxy_url = proxy_url

        socks_options = {
            "socks_version": socks_version,
            "proxy_host": parsed.host,
            "proxy_port": parsed.port,
            "username": username,
            "password": password,
            "rdns": rdns,
        }
        connection_pool_kw["_socks_options"] = socks_options

        super(SOCKSProxyManager, self).__init__(
            num_pools, headers, **connection_pool_kw
        )

        self.pool_classes_by_scheme = SOCKSProxyManager.pool_classes_by_scheme
python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/securetransport.cpython-312.pyc000064400000105341151732702430026537 0ustar00�

R`i�����dZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZddlmZdd	lmZmZmZdd
lmZmZmZmZmZmZ	ddl	mZd
dgZ#dZ$ejHZ%ejLjNZ(e
jR�Z*ejV�Z,dZ-ej\ej^ej`ejbejdejfejhejjejlejnejpejrejtejvejxejzej|ej~ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�gZLej�ej�ej�feej�ej�fiZPeQe
d�r%ej�ej�fePe
j�<eQe
d�r%ej�ej�fePe
j�<eQe
d�r%ej�ej�fePe
j�<eQe
d�r%ej�ej�fePe
j�<eQe
d�r%ej�ej�fePe
j�<d�ZZd�Z[d�Z\d�Z]ej�e\�Z_ej�e]�ZaGd�deb�Zcerd d�Zdnd!d�Zdedec_dGd�deb�Zey#e $rdZddl!m"Z"Y��#wxYw)"a�	
SecureTranport support for urllib3 via ctypes.

This makes platform-native TLS available to urllib3 users on macOS without the
use of a compiler. This is an important feature because the Python Package
Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
that ships with macOS is not capable of doing TLSv1.2. The only way to resolve
this is to give macOS users an alternative solution to the problem, and that
solution is to use SecureTransport.

We use ctypes here because this solution must not require a compiler. That's
because pip is not allowed to require a compiler either.

This is not intended to be a seriously long-term solution to this problem.
The hope is that PEP 543 will eventually solve this issue for us, at which
point we can retire this contrib module. But in the short term, we need to
solve the impending tire fire that is Python on Mac without this kind of
contrib module. So...here we are.

To use this module, simply import and inject it::

    import pip._vendor.urllib3.contrib.securetransport as securetransport
    securetransport.inject_into_urllib3()

Happy TLSing!

This code is a bastardised version of the code found in Will Bond's oscrypto
library. An enormous debt is owed to him for blazing this trail for us. For
that reason, this code should be considered to be covered both by urllib3's
license and by oscrypto's:

.. code-block::

    Copyright (c) 2015-2016 Will Bond <will@wbond.net>

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.
�)�absolute_importN)�six�)�util)�PROTOCOL_TLS_CLIENT�)�CoreFoundation�Security�
SecurityConst)�_assert_no_error�_build_tls_unknown_ca_alert�_cert_array_from_pem�_create_cfstring_array�_load_client_cert_chain�_temporary_keychain)�_fileobject��backport_makefile�inject_into_urllib3�extract_from_urllib3Ti@�PROTOCOL_SSLv2�PROTOCOL_SSLv3�PROTOCOL_TLSv1�PROTOCOL_TLSv1_1�PROTOCOL_TLSv1_2c���tt_ttj_tt_ttj_dt_dtj_y)zG
    Monkey-patch urllib3 with SecureTransport-backed SSL-support.
    TN)�SecureTransportContextr�
SSLContext�ssl_�HAS_SNI�IS_SECURETRANSPORT����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/securetransport.pyrr�s>��-�D�O�1�D�I�I���D�L��D�I�I��"�D��#'�D�I�I� r#c���tt_ttj_tt_ttj_dt_dtj_y)z>
    Undo monkey-patching by :func:`inject_into_urllib3`.
    FN)�orig_util_SSLContextrrr�orig_util_HAS_SNIr r!r"r#r$rr�s>��+�D�O�/�D�I�I��$�D�L�)�D�I�I��#�D��#(�D�I�I� r#c�~�d}	tj|�}|�tjS|j}|d}|j�}d}d}	||kr�|�|dk\r:t
j||�s$t	jtjd��||z
}	tj|	zj||z�}
|j|
|	�}||z
}|s|stjSn||kr��||d<||k7rtj&Sy#tj$rl}|j}|�T|tjk7rA||d<|tj k(s|tj"k(rtj$cYd}~S�Yd}~��d}~wwxYw#t($r#}|�||_tjcYd}~Sd}~wwxYw)zs
    SecureTransport read callback. This is called by ST to request that data
    be returned from the socket.
    Nr�	timed out)�_connection_refs�getr�errSSLInternal�socket�
gettimeoutr�
wait_for_read�error�errno�EAGAIN�ctypes�c_char�from_address�	recv_into�errSSLClosedGraceful�
ECONNRESET�EPIPE�errSSLClosedAbort�errSSLWouldBlock�	Exception�
_exception)
�
connection_id�data_buffer�data_length_pointer�wrapped_socket�base_socket�requested_length�timeoutr0�
read_count�	remaining�buffer�
chunk_size�es
             r$�_read_callbackrJ�s���
�N�.,�)�-�-�m�<���!� �/�/�/�$�+�+��.�q�1�� �+�+�-�����
�	��/�/��?�g��l��-�-�k�7�C�$�l�l�5�<�<��E�E�,�z�9�	� �-�-�)�3�A�A��*�,���)�2�2�6�9�E�
��j�(�
�!�%�,�A�A�A���/�/�0",��A���)�)� �1�1�1������	��G�G�E�� �U�e�l�l�%:�)3�#�A�&��E�,�,�,�����0D�(�:�:�:����	���,��%�()�N�%��+�+�+��,�sf�&F�%F�BD�,D�3F�F
�!AF�<F
�=F�F�F�F
�
F�	F<�F7�1F<�7F<c�4�d}	tj|�}|�tjS|j}|d}tj||�}|j�}d}d}		|	|krb|�|dk\r:tj||�s$t	jtjd��|j|�}
|	|
z
}	||
d}|	|kr�b|	|d<|	|k7rtj"Sy#tj$rl}|j}|�T|tjk7rA|	|d<|tjk(s|tjk(rtj cYd}~S�Yd}~��d}~wwxYw#t$$r#}|�||_tjcYd}~Sd}~wwxYw)zx
    SecureTransport write callback. This is called by ST to request that data
    actually be sent on the network.
    Nrr))r*r+rr,r-r3�	string_atr.r�wait_for_writer0r1r2�sendr8r9r:r;r<r=)r>r?r@rArB�bytes_to_write�datarDr0�sent�
chunk_sentrIs            r$�_write_callbackrSs���
�N�*,�)�-�-�m�<���!� �/�/�/�$�+�+��,�Q�/������^�<�� �+�+�-������	���'��?�g��l��.�.�{�G�D�$�l�l�5�<�<��E�E�(�-�-�d�3�
��
�"���J�K�(����'�&"&��A���>�!� �1�1�1������	��G�G�E�� �U�e�l�l�%:�)-�#�A�&��E�,�,�,�����0D�(�:�:�:����	���,��%�()�N�%��+�+�+��,�s`�&E+�;E+�'A&C)�E+�)E(�<AE#�E(�E+�E#�E+�#E(�(E+�+	F�4F�F�Fc��eZdZdZd�Zejd��Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zdd
�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zy)�
WrappedSocketz�
    API-compatibility wrapper for Python's OpenSSL wrapped socket object.

    Note: _makefile_refs, _drop(), and _reuse() are needed for the garbage
    collector of PyPy.
    c���||_d|_d|_d|_d|_d|_d|_d|_|jj�|_	|jjd�y�NrF)r-�context�_makefile_refs�_closedr=�	_keychain�
_keychain_dir�_client_cert_chainr.�_timeout�
settimeout)�selfr-s  r$�__init__zWrappedSocket.__init__Nse��������������������!���"&������.�.�0��
������q�!r#c#�K�d|_d��|j�&|jdc}|_|j�|�y�w)a]
        A context manager that can be used to wrap calls that do I/O from
        SecureTransport. If any of the I/O callbacks hit an exception, this
        context manager will correctly propagate the exception after the fact.
        This avoids silently swallowing those exceptions.

        It also correctly forces the socket closed.
        N)r=�close)r`�	exceptions  r$�_raise_on_errorzWrappedSocket._raise_on_error`sC�������
	��?�?�&�)-���$�&�I�t���J�J�L��O�'�s�?Ac���tjtt�zt�}tj|j
|tt��}t
|�y)a4
        Sets up the allowed ciphers. By default this matches the set in
        util.ssl_.DEFAULT_CIPHERS, at least as supported by macOS. This is done
        custom and doesn't allow changing at this time, mostly because parsing
        OpenSSL cipher strings is going to be a freaking nightmare.
        N)r
�SSLCipherSuite�len�
CIPHER_SUITES�SSLSetEnabledCiphersrXr)r`�ciphers�results   r$�_set_cipherszWrappedSocket._set_ciphersusH���*�*�S��-?�?�-�P���.�.��L�L�'�3�}�#5�
��	�� r#c���|syt|�}	tj|j|�}t	|�tj|�y#tj|�wxYw)z<
        Sets up the ALPN protocols on the context.
        N)rr
�SSLSetALPNProtocolsrXrr	�	CFRelease)r`�	protocols�
protocols_arrrls    r$�_set_alpn_protocolsz!WrappedSocket._set_alpn_protocols�sT����.�y�9�
�	4��1�1�$�,�,�
�N�F��V�$��$�$�]�3��N�$�$�]�3�s�+A�A(c��|sytjtjf}	|j|�}||vryd|fz}t|j
��}|jj|�tjddd�}|jjtjtj|�|j�tj d|z��#t$r}d|��}Yd}~��d}~wwxYw)z�
        Called when we have set custom validation. We do this in two cases:
        first, when cert validation is entirely disabled; and second, when
        using a custom trust DB.
        Raises an SSLError if the connection is not trusted.
        Nzerror code: %dzexception: �iirrzcertificate verify failed, %s)r�kSecTrustResultUnspecified�kSecTrustResultProceed�_evaluate_trustr<r
�versionr-�sendall�struct�pack�
setsockopt�
SOL_SOCKET�	SO_LINGERrc�ssl�SSLError)	r`�verify�trust_bundle�	successes�trust_result�reasonrI�rec�optss	         r$�_custom_validatezWrappedSocket._custom_validate�s�����
�4�4��0�0�
�	�	,��/�/��=�L��y�(��%���7�F�*�$�,�,�.�9�������C� ��{�{�4��A�&�������v�0�0�&�2B�2B�D�I��
�
���l�l�:�V�C�D�D���	,�()�+�F��	,�s�C-�C-�-	D�6D�Dc��tjj|�r%t|d�5}|j	�}ddd�d}tj�}	t|�}tj|jtj|��}t|�|stjd��tj||�}t|�tj |d�}t|�tj"�}tj$|tj|��}t|�|rt'j(|�|�t'j(|�|j*S#1swY��ExYw#|rt'j(|�|�t'j(|�wwxYw)N�rbzFailed to copy trust referenceT)�os�path�isfile�open�readr
�SecTrustRefr�SSLCopyPeerTrustrXr3�byrefrr�r��SecTrustSetAnchorCertificates�!SecTrustSetAnchorCertificatesOnly�SecTrustResultType�SecTrustEvaluater	rp�value)r`r��f�
cert_array�trustrlr�s       r$rxzWrappedSocket._evaluate_trust�s[��
�7�7�>�>�,�'��l�D�)�Q� �v�v�x��*��
��$�$�&��	5�-�l�;�J��.�.�t�|�|�V�\�\�%�=P�Q�F��V�$���l�l�#C�D�D��;�;�E�:�N�F��V�$��?�?��t�L�F��V�$�#�6�6�8�L��.�.�u�f�l�l�<�6P�Q�F��V�$���(�(��/��%��(�(��4��!�!�!�G*�)��:��(�(��/��%��(�(��4�&�s�F�C*F
�F
�
1F>c
�
�tjdtjtj�|_tj|j
tt�}
t|
�t5t|�dz}|tvr|dzdz}|tvr�|t|<ddd�tj|j
�}
t|
�|rVt|t�s|j!d�}tj"|j
|t%|��}
t|
�|j'�|j)|	�tj*|j
|�}
t|
�tj,|j
|�}
t|
�|r|�:tj.|j
tj0d�}
t|
�|rht3�\|_|_t9|j4||�|_tj<|j
|j:�}
t|
�	|j?�5tj@|j
�}
|
tjBk(rtEjFd��|
tjHk(r|jK||�	ddd���t|
�	ddd�y#1swY��IxYw#1swYnxYw��)z�
        Actually performs the TLS handshake. This is run automatically by
        wrapped socket, and shouldn't be needed in user code.
        Ni���rzutf-8Tzhandshake timed out)&r
�SSLCreateContextr�kSSLClientSide�kSSLStreamTyperX�
SSLSetIOFuncs�_read_callback_pointer�_write_callback_pointerr�_connection_ref_lock�idr*�SSLSetConnection�
isinstance�bytes�encode�SSLSetPeerDomainNamerhrmrs�SSLSetProtocolVersionMin�SSLSetProtocolVersionMax�SSLSetSessionOption�"kSSLSessionOptionBreakOnServerAuthrr[r\rr]�SSLSetCertificatere�SSLHandshaker;r-rD�errSSLServerAuthCompletedr�)r`�server_hostnamer�r��min_version�max_version�client_cert�
client_key�client_key_passphrase�alpn_protocolsrl�handles            r$�	handshakezWrappedSocket.handshake�s��$ �0�0��-�.�.�
�0L�0L�
����'�'��L�L�0�2I�
��	�� �
"���X�
�*�F��,�,� �1�*�
�2���,�,�'+��V�$�	"��*�*�4�<�<��@���� ���o�u�5�"1�"8�"8��"A���2�2����o�s�?�/C��F�
�V�$�	
����	
� � ��0��2�2�4�<�<��M���� ��2�2�4�<�<��M���� ���1��1�1����m�N�N�PT��F�
�V�$��1D�1F�.�D�N�D�.�&=�����Z�'�D�#��/�/����d�>U�>U�V�F��V�$���%�%�'�!�.�.�t�|�|�<���]�;�;�;� �.�.�)>�?�?��}�F�F�F��)�)�&�,�?��(�'�%�V�,��(�'�i"�
!��h(�'��s%�3'K+�	K+�A.K8�K8�+K5�8Lc�6�|jj�S�N)r-�fileno�r`s r$r�zWrappedSocket.fileno7s���{�{�!�!�#�#r#c��|jdkDr|xjdzc_|jr|j�yy)Nrr)rYrZrcr�s r$�_decref_socketioszWrappedSocket._decref_socketios;s6������"����1�$���<�<��J�J�L�r#c�^�tj|�}|j||�}|d|}|Sr�)r3�create_string_bufferr6)r`�bufsizrG�
bytes_readrPs     r$�recvzWrappedSocket.recvAs3���,�,�V�4���^�^�F�F�3�
��k�z�"���r#Nc	��|jry|�t|�}tj|zj	|�}tj
d�}|j
�5tj|j||tj|��}ddd�tjk(r0|jdk(rtjd��|jS|tj tj"fvr|j%�|jSt'|�|jS#1swY��xYw)Nrzrecv timed out)rZrhr3r4�from_buffer�c_size_trer
�SSLReadrXr�rr;r�r-rDr7�errSSLClosedNoNotifyrcr)r`rG�nbytes�processed_bytesrls     r$r6zWrappedSocket.recv_intoGs���<�<���>���[�F��-�-�&�(�5�5�f�=�� �/�/�!�,��
�
!�
!�
#��%�%����f�f�f�l�l�?�.K��F�$��]�3�3�3�
�$�$��)��n�n�%5�6�6��$�$�$���.�.��.�.�
�
�
�J�J�L��$�$�$�	
�V�$��$�$�$�=$�
#�s�"6D8�8Ec��||_yr��r^)r`rDs  r$r_zWrappedSocket.settimeoutrs	����
r#c��|jSr�r�r�s r$r.zWrappedSocket.gettimeoutus���}�}�r#c	��tjd�}|j�5tj|j
|t
|�tj|��}ddd�tjk(r$|jdk(rtjd��t|�|jS#1swY�WxYw)Nrzsend timed out)r3r�rer
�SSLWriterXrhr�rr;r�r-rDr)r`rPr�rls    r$rNzWrappedSocket.sendxs��� �/�/�!�,��
�
!�
!�
#��&�&����d�C��I�v�|�|�O�/L��F�$�
�]�3�3�3��8M�8M�QR�8R��.�.�!1�2�2��V�$��$�$�$�$�
#�s�?B;�;Cc��d}|t|�kr0|j|||tz�}||z
}|t|�kr�/yy�Nr)rhrN�SSL_WRITE_BLOCKSIZE)r`rP�
total_sentrQs    r$rzzWrappedSocket.sendall�sF���
��3�t�9�$��9�9�T�*�z�<O�/O�P�Q�D��$��J��3�t�9�$r#c��|j�5tj|j�ddd�y#1swYyxYwr�)rer
�SSLCloserXr�s r$�shutdownzWrappedSocket.shutdown�s,��
�
!�
!�
#����d�l�l�+�$�
#�
#�s	� :�Ac�D�|jdkr�d|_|jr&tj|j�d|_|j
r&tj|j
�d|_|jrktj|j�tj|j�tj|j�dx|_|_|jj�S|xjdzc_y)NrT)rYrZrXr	rpr]r[r
�SecKeychainDelete�shutil�rmtreer\r-rcr�s r$rczWrappedSocket.close�s�������"��D�L��|�|��(�(����6�#����&�&��(�(��)@�)@�A�*.��'��~�~��*�*�4�>�>�:��(�(����8��
�
�d�0�0�1�6:�:����!3��;�;�$�$�&�&����1�$�r#c�n�|std��tj�}d}d}	tj|jtj|��}t|�|s1	|rtj|�|rtj|�yytj|�}|s1	|rtj|�|rtj|�yytj|d�}|sJ�tj|�}|sJ�tj|�}tj|�}	tj|	|�}|rtj|�|rtj|�|S#|rtj|�|rtj|�wwxYw)Nz2SecureTransport only supports dumping binary certsr)�
ValueErrorr
r�r�rXr3r�rr	rp�SecTrustGetCertificateCount�SecTrustGetCertificateAtIndex�SecCertificateCopyData�CFDataGetLength�CFDataGetBytePtrrL)
r`�binary_formr��certdata�	der_bytesrl�
cert_count�leaf�data_lengthr?s
          r$�getpeercertzWrappedSocket.getpeercert�s���(��Q�R�R��$�$�&�����	�	0��.�.�t�|�|�V�\�\�%�=P�Q�F��V�$���&��(�(��2���(�(��/��'"�=�=�e�D�J�����(�(��2���(�(��/���9�9�%��C�D��K�4� �6�6�t�<�H��O�8�(�8�8��B�K�(�9�9�(�C�K��(�(��k�B�I���(�(��2���(�(��/������(�(��2���(�(��/��s�AF�F� A3F�1F4c�f�tj�}tj|jt	j
|��}t
|�|jtjk(rtjd��|jtjk(ry|jtjk(ry|jtjk(ry|jtjk(ry|jtj k(rytjd|z��)Nz(SecureTransport does not support TLS 1.3zTLSv1.2zTLSv1.1�TLSv1�SSLv3�SSLv2zUnknown TLS version: %r)r
�SSLProtocol�SSLGetNegotiatedProtocolVersionrXr3r�rr�r�kTLSProtocol13r�r��kTLSProtocol12�kTLSProtocol11�
kTLSProtocol1�
kSSLProtocol3�
kSSLProtocol2)r`�protocolrls   r$ryzWrappedSocket.version�s����'�'�)���9�9��L�L�&�,�,�x�0�
��	�� ��>�>�]�9�9�9��,�,�I�J�J�
�^�^�}�;�;�
;��
�^�^�}�;�;�
;��
�^�^�}�:�:�
:��
�^�^�}�:�:�
:��
�^�^�}�:�:�
:���,�,�8�8�C�D�Dr#c�.�|xjdz
c_y�Nr)rYr�s r$�_reusezWrappedSocket._reuse�s�����q� �r#c�n�|jdkr|j�y|xjdzc_yr�)rYrcr�s r$�_dropzWrappedSocket._drop�s*������"��J�J�L����1�$�r#r�)F)�__name__�
__module__�__qualname__�__doc__ra�
contextlib�contextmanagerrermrsr�rxr�r�r�r�r6r_r.rNrzr�rcr�ryr�r�r"r#r$rUrUFs����"�$������(!�4�!E�F&"�P[�z$���)%�V ��%�"�,�%�&8�tE�*!�%r#rUc�J�|xjdz
c_t|||d��S)NrT)rc)rYr)r`�mode�bufsizes   r$�makefilers$�����q� ���4��w�d�;�;r#c�(�d}t|||g|��i|��Sr�r)r`r�	buffering�args�kwargss     r$rrs"���	� ��t�Y�H��H��H�Hr#c���eZdZdZd�Zed��Zejd��Zed��Zejd��Zed��Z	e	jd��Z	d	�Z
d
�Zd�Zdd
�Z
dd�Zd�Z				dd�Zy)rz�
    I am a wrapper class for the SecureTransport library, to translate the
    interface of the standard library ``SSLContext`` object to calls into
    SecureTransport.
    c��t|\|_|_d|_d|_d|_d|_d|_d|_d|_	yrW)
�_protocol_to_min_max�_min_version�_max_version�_options�_verify�
_trust_bundle�_client_cert�_client_key�_client_key_passphrase�_alpn_protocols)r`r�s  r$razSecureTransportContext.__init__sM��/C�H�/M�,���4�,���
����!��� ������&*��#�#��r#c��y)��
        SecureTransport cannot have its hostname checking disabled. For more,
        see the comment on getpeercert() in this file.
        Tr"r�s r$�check_hostnamez%SecureTransportContext.check_hostname"s��r#c��y)rNr"�r`r�s  r$rz%SecureTransportContext.check_hostname*s��	
r#c��|jSr��rr�s r$�optionszSecureTransportContext.options2s���}�}�r#c��||_yr�rrs  r$rzSecureTransportContext.options<s����
r#c�Z�|jrtjStjSr�)rr��
CERT_REQUIRED�	CERT_NONEr�s r$�verify_modez"SecureTransportContext.verify_modeAs��$(�L�L�s� � �C�c�m�m�Cr#c�H�|tjk(rd|_yd|_y)NTF)r�r rrs  r$r"z"SecureTransportContext.verify_modeEs��$��(9�(9�9�t���u��r#c��yr�r"r�s r$�set_default_verify_pathsz/SecureTransportContext.set_default_verify_pathsIs��	
r#c�"�|j�Sr�)r%r�s r$�load_default_certsz)SecureTransportContext.load_default_certsUs���,�,�.�.r#c�T�|tjjk7rtd��y)Nz5SecureTransport doesn't support custom cipher strings)rr�DEFAULT_CIPHERSr�)r`rks  r$�set_ciphersz"SecureTransportContext.set_ciphersXs%���d�i�i�/�/�/��T�U�U�0r#Nc�z�|�td��|�t|�5	ddd�|xs||_y#1swY�xYw)Nz1SecureTransport does not support cert directories)r�r�r)r`�cafile�capath�cadatas    r$�load_verify_locationsz,SecureTransportContext.load_verify_locations]sB�����P�Q�Q����f����$�-�v�����s�1�:c�.�||_||_||_yr�)rr�_client_cert_passphrase)r`�certfile�keyfile�passwords    r$�load_cert_chainz&SecureTransportContext.load_cert_chainis��$���"���'/��$r#c��ttd�std��|D�cgc]}tj|���c}|_ycc}w)z�
        Sets the ALPN protocols that will later be set on the context.

        Raises a NotImplementedError if ALPN is not supported.
        roz2SecureTransport supports ALPN only in macOS 10.12+N)�hasattrr
�NotImplementedErrorr�
ensure_binaryr)r`rq�ps   r$�set_alpn_protocolsz)SecureTransportContext.set_alpn_protocolsnsG���x�!6�7�%�D��
�?H�H�i��� 1� 1�!� 4�i�H����Hs�Ac��|rJ�|sJ�|sJ�t|�}|j||j|j|j|j
|j|j|j|j�	|Sr�)
rUr�rrr
rrrrr)r`�sock�server_side�do_handshake_on_connect�suppress_ragged_eofsr�rAs       r$�wrap_socketz"SecureTransportContext.wrap_socketzs������&�&�&�#�#�#�'�t�,��	� � ���L�L�����������������'�'�� � �
	
��r#)NNN)NN)FTTN)r�r�r�r�ra�propertyr�setterrr"r%r'r*r/r5r;rAr"r#r$rrs����$��������
��
�����
�^�^�����D��D����E��E�

�/�V�

.�0�

I�� $�!��
r#r)���)�rN)fr��
__future__rrr3r1�os.pathr�r�r-r�r{�	threading�weakref�pip._vendorr�r�	util.ssl_r�_securetransport.bindingsr	r
r�_securetransport.low_levelrr
rrrrr�ImportError�packages.backports.makefiler�__all__r r'rrr&�WeakValueDictionaryr*�Lockr�r��'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384�'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256�%TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384�%TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256�-TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256�+TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256�#TLS_DHE_RSA_WITH_AES_256_GCM_SHA384�#TLS_DHE_RSA_WITH_AES_128_GCM_SHA256�'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384�$TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA�'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256�$TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA�%TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384�"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA�%TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256�"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA�#TLS_DHE_RSA_WITH_AES_256_CBC_SHA256� TLS_DHE_RSA_WITH_AES_256_CBC_SHA�#TLS_DHE_RSA_WITH_AES_128_CBC_SHA256� TLS_DHE_RSA_WITH_AES_128_CBC_SHA�TLS_AES_256_GCM_SHA384�TLS_AES_128_GCM_SHA256�TLS_RSA_WITH_AES_256_GCM_SHA384�TLS_RSA_WITH_AES_128_GCM_SHA256�TLS_AES_128_CCM_8_SHA256�TLS_AES_128_CCM_SHA256�TLS_RSA_WITH_AES_256_CBC_SHA256�TLS_RSA_WITH_AES_128_CBC_SHA256�TLS_RSA_WITH_AES_256_CBC_SHA�TLS_RSA_WITH_AES_128_CBC_SHAri�PROTOCOL_TLSr�r�rr7r�rr�rrr�rrrrrJrS�SSLReadFuncr��SSLWriteFuncr��objectrUrrr"r#r$�<module>rvs���4�j'��
���
�
�
�
�����+�N�N���@�"�
!�"8�
9�����L�L���y�y�+�+��$/�7�.�.�0��%�y�~�~�'�����9�9��9�9��7�7��7�7��?�?��=�=��5�5��5�5��9�9��6�6��9�9��6�6��7�7��4�4��7�7��4�4��5�5��2�2��5�5��2�2��(�(��(�(��1�1��1�1��*�*��(�(��1�1��1�1��.�.��.�.�=�
�J	���
�3�3�]�5Q�5Q�R��-�5�5�}�7S�7S�T���
�3� �!��#�#��#�#�0���+�+�,��3� �!��#�#��#�#�0���+�+�,��3� �!��#�#��#�#�0���+�+�,��3�"�#��$�$��$�$�2���-�-�.��3�"�#��$�$��$�$�2���-�-�.�	(�	)�4,�n0,�l.��-�-�n�=��/�(�/�/��@��v%�F�v%�r
�<�I�"�
��H�V�H��}�@��K�?�?�@�s�M7�7
N�Npython3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-312.pyc000064400000000367151732702430025035 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__init__.py�<module>rs�rpython3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/appengine.cpython-312.pyc000064400000026535151732702440025252 0ustar00�

R`i+���dZddlmZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZddl
mZddlmZddlmZdd	lmZdd
lmZddlmZ	dd
lmZej8e�ZGd�de�ZGd�de�Z Gd�de�Z!ejDZ"ejFZ#ejHZ$ejJZ%ejLZ&y#e$rdZY�ywxYw)a[
This module provides a pool manager that uses Google App Engine's
`URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_.

Example usage::

    from pip._vendor.urllib3 import PoolManager
    from pip._vendor.urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox

    if is_appengine_sandbox():
        # AppEngineManager uses AppEngine's URLFetch API behind the scenes
        http = AppEngineManager()
    else:
        # PoolManager uses a socket-level API behind the scenes
        http = PoolManager()

    r = http.request('GET', 'https://google.com/')

There are `limitations <https://cloud.google.com/appengine/docs/python/urlfetch/#Python_Quotas_and_limits>`_ to the URLFetch service and it may not be
the best choice for your application. There are three options for using
urllib3 on Google App Engine:

1. You can use :class:`AppEngineManager` with URLFetch. URLFetch is
   cost-effective in many circumstances as long as your usage is within the
   limitations.
2. You can use a normal :class:`~urllib3.PoolManager` by enabling sockets.
   Sockets also have `limitations and restrictions
   <https://cloud.google.com/appengine/docs/python/sockets/   #limitations-and-restrictions>`_ and have a lower free quota than URLFetch.
   To use sockets, be sure to specify the following in your ``app.yaml``::

        env_variables:
            GAE_USE_SOCKETS_HTTPLIB : 'true'

3. If you are using `App Engine Flexible
<https://cloud.google.com/appengine/docs/flexible/>`_, you can use the standard
:class:`PoolManager` without any configuration or special environment variables.
�)�absolute_importN�)�	HTTPError�HTTPWarning�
MaxRetryError�
ProtocolError�SSLError�TimeoutError)�urljoin)�RequestMethods)�HTTPResponse)�Retry)�Timeout�)�_appengine_environ)�urlfetchc��eZdZy)�AppEnginePlatformWarningN��__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/appengine.pyrrG���rrc��eZdZy)�AppEnginePlatformErrorNrrrrrrKrrrc�d�eZdZdZ				dd�Zd�Zd�Zddddejfd�Z	d�Z
d	�Zd
�Zy)�AppEngineManagera
    Connection manager for Google App Engine sandbox applications.

    This manager uses the URLFetch service directly instead of using the
    emulated httplib, and is subject to URLFetch limitations as described in
    the App Engine documentation `here
    <https://cloud.google.com/appengine/docs/python/urlfetch>`_.

    Notably it will raise an :class:`AppEnginePlatformError` if:
        * URLFetch is not available.
        * If you attempt to use this on App Engine Flexible, as full socket
          support is available.
        * If a request size is more than 10 megabytes.
        * If a response size is more than 32 megabytes.
        * If you use an unsupported request method such as OPTIONS.

    Beyond those cases, it will raise normal urllib3 errors.
    NTc���tstd��tjdt�tj||�||_||_|xstj|_y)Nz.URLFetch is not available in this environment.z�urllib3 is using URLFetch on Google App Engine sandbox instead of sockets. To use sockets directly instead of URLFetch see https://urllib3.readthedocs.io/en/1.26.x/reference/urllib3.contrib.html.)rr�warnings�warnrr�__init__�validate_certificate�urlfetch_retriesr�DEFAULT�retries)�self�headersr(r%r&s     rr$zAppEngineManager.__init__csb���(�@��
�	�
�
�
W�
%�		
�	����g�.�$8��!� 0����/�%�-�-��rc��|S)Nr)r)s r�	__enter__zAppEngineManager.__enter__|s���rc��y)NFr)r)�exc_type�exc_val�exc_tbs    r�__exit__zAppEngineManager.__exit__s��rc��|j||�}	|xr|jdk7xr|j}	tj||||xsid|j
xr|	|j
|�|j��}
|j(|
fd
|i|��}|xr|j+�}
|
r�|j
r|j,r
t||d��|j.dk(rd
}	|j1||||��}|j3|�t4j7d||
�t9||
�}|j:||||f|||d�|��St=|j>jAd��}|jC||j.|�rV|j1||||��}t4j7d|�|jE|�|j:||f|||||d�|��S|S#tj$r}t||��d}~wtj$r)}dt|�vrtd|��t|��d}~wtj$r+}dt|�vrt|||���t|��d}~wtj $r}td|��d}~wtj"$r}t%|��d}~wtj&$r}td	|z|��d}~wwxYw#t$r|j,r
t||d��|cYSwxYw)NrF)�payload�methodr*�allow_truncated�follow_redirects�deadliner%z	too largezOURLFetch request too large, URLFetch only supports requests up to 10mb in size.zToo many redirects)�reasonzPURLFetch response too large, URLFetch only supportsresponses up to 32mb in size.z$URLFetch does not support method: %sr(ztoo many redirectsi/�GET)�response�_poolzRedirecting %s -> %s)r(�redirect�timeoutzRetry-Afterz	Retry: %s)�bodyr*r(r<r=)#�_get_retriesr<�totalr�fetchr&�_get_absolute_timeoutr%�DeadlineExceededErrorr
�InvalidURLError�strrr�
DownloadErrorr�ResponseTooLargeError�SSLCertificateErrorr	�InvalidMethodError�#_urlfetch_response_to_http_response�get_redirect_location�raise_on_redirect�status�	increment�sleep_for_retry�log�debugr�urlopen�boolr*�get�is_retry�sleep)r)r4�urlr>r*r(r<r=�response_kwr6r:�e�
http_response�redirect_location�redirect_url�has_retry_afters                rrRzAppEngineManager.urlopen�sX���#�#�G�X�6��*	�'�S�G�,<�,<��,A�S�g�m�m���~�~�����
�2� %�!%�!6�!6�!K�;K��3�3�G�<�%)�%>�%>�	�H�TA��@�@��
�%�
�)4�
�
�
%�N��)L�)L�)N����$�$��)B�)B�#�D�#�/C�D�D� �'�'�3�.�"�F�)�%�/�/���m�4�0��G��'�'�
�6��	�	�0�#�7H�I�&�s�,=�>��#�t�|�|�� ���		�
$�%�#�	�"�	�	��}�4�4�8�8��G�H�����F�M�$8�$8�/�J��'�'���m�SW�'�X�G��I�I�k�3�'��M�M�-�(��4�<�<���	����!��	��	�	
����m�-�-�	(��t�Q�'�'���'�'�	#��c�!�f�$�,�<����
 ��"�"���%�%�	#�#�s�1�v�-�#�D�#�a�8�8���"�"���-�-�	�(�0���
���+�+�	��1�+����*�*�	�(�6��?���
��	��.%�)��0�0�+�D�#�7K�L�L�(�(�)�sf�A)G�K �K�.G:�:K�$H4�4K�
&I0�0K�J�K�(J3�3K�	K�K� $L�Lc�H�t�r-|jjd�}|dk(r
|jd=|jjd�}|dk(r@|jd�}|j	d�dj|�|jd<t
dtj|j�|j|j|jd�|��}t
dtj|j�|j|j|d�|��S)	Nzcontent-encoding�deflateztransfer-encoding�chunked�,)r>�msgr*rM)r>r*rM�original_responser)�is_prod_appenginer*rT�split�remove�joinr
�io�BytesIO�content�
header_msg�status_code)r)�
urlfetch_resprX�content_encoding�transfer_encoding�	encodingsrcs       rrJz4AppEngineManager._urlfetch_response_to_http_response�s!���� -�4�4�8�8�9K�L���9�,�!�)�)�*<�=�)�1�1�5�5�6I�J���	�)�)�/�/��4�I����Y�'�9<���)�9L�M�!�!�"5�6�(�
����M�1�1�2��(�(�!�)�)� �,�,�

��
���
����M�1�1�2�!�)�)� �,�,�/�	
�
�
�	
rc���|tjuryt|t�r>|j�|j�tjdt�|jS|S)NzdURLFetch does not support granular timeout settings, reverting to total or default URLFetch timeout.)	r�DEFAULT_TIMEOUT�
isinstance�_read�_connectr"r#rr@)r)r=s  rrBz&AppEngineManager._get_absolute_timeoutsX���g�-�-�-���g�w�'��}�}�(�G�,<�,<�,H��
�
�F�,��
�=�=� ��rc���t|t�s"tj|||j��}|js|j
s|jrtjdt�|S)N)r<�defaultzhURLFetch only supports total retries and does not recognize connect, read, or redirect retry parameters.)
rsr�from_intr(�connect�readr<r"r#r)r)r(r<s   rr?zAppEngineManager._get_retries&sS���'�5�)��n�n�W�x����V�G��?�?�g�l�l�g�.>�.>��M�M�I�(�
��r)NNTT)
rrr�__doc__r$r,r1rrrrRrJrBr?rrrr r OsR���*��!��0�2�������'�'�p�d"
�H�rr )'r{�
__future__rrh�loggingr"�
exceptionsrrrrr	r
�packages.six.moves.urllib.parser�requestrr:r
�
util.retryr�util.timeoutr�r�google.appengine.apir�ImportError�	getLoggerrrPrrr �is_appengine�is_appengine_sandbox�is_local_appenginerd�is_prod_appengine_mvmsrrr�<module>r�s���&�P'�	�����6�$�#��"� ��-�
�g����!��	�{�	�	�Y�	�b�~�b�N"�.�.��)�>�>��'�:�:��&�8�8��+�B�B���u���H��s�
C�C
�	C
python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/_appengine_environ.cpython-312.pyc000064400000003551151732702440027142 0ustar00�

R`i���.�dZddlZd�Zd�Zd�Zd�Zd�Zy)zB
This module provides means to detect the App Engine environment.
�Nc�.�t�xs
t�S)N)�is_local_appengine�is_prod_appengine����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py�is_appenginer	s����6�#4�#6�6rc�F�t�xrtjddk(S)a#Reports if the app is running in the first generation sandbox.

    The second generation runtimes are technically still in a sandbox, but it
    is much less restrictive, so generally you shouldn't need to check for it.
    see https://cloud.google.com/appengine/docs/standard/runtimes
    �APPENGINE_RUNTIME�python27)r	�os�environrrr�is_appengine_sandboxrs ���>�K�b�j�j�)<�=��K�Krc��dtjvxr/tjjdd�jd�S)Nr�SERVER_SOFTWARE�zDevelopment/�r
r�get�
startswithrrrrrs6���"�*�*�,�!�������2�2��j�� �!rc��dtjvxr/tjjdd�jd�S)NrrrzGoogle App Engine/rrrrrrs7���"�*�*�,�'�������2�2��j�%�&�'rc��y)zDeprecated.Frrrr�is_prod_appengine_mvmsr"s��r)�__doc__r
r	rrrrrrr�<module>rs)���
�7�L�!�'�rpython3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-312.pyc000064400000016610151732702440024417 0ustar00�

R`i���`�dZddlmZ	ddlZddl	m
Zddl	mZ
dd	lmZmZdd
lmZmZddlmZmZddlmZdd
lmZ	ddlZGd�de�ZGd�dee�ZGd�de�ZGd�de�ZGd�de�Zy#e$rddlZddlmZejde��wxYw#e$rdZY�iwxYw)a�
This module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4, SOCKS4A (an extension of SOCKS4), and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.

The SOCKS implementation supports the full range of urllib3 features. It also
supports the following SOCKS features:

- SOCKS4A (``proxy_url='socks4a://...``)
- SOCKS4 (``proxy_url='socks4://...``)
- SOCKS5 with remote DNS (``proxy_url='socks5h://...``)
- SOCKS5 with local DNS (``proxy_url='socks5://...``)
- Usernames and passwords for the SOCKS proxy

.. note::
   It is recommended to use ``socks5h://`` or ``socks4a://`` schemes in
   your ``proxy_url`` to ensure that DNS resolution is done from the remote
   server instead of client-side when connecting to a domain name.

SOCKS4 supports IPv4 and domain names with the SOCKS4A extension. SOCKS5
supports IPv4, IPv6, and domain names.

When connecting to a SOCKS4 proxy the ``username`` portion of the ``proxy_url``
will be sent as the ``userid`` section of the SOCKS request:

.. code-block:: python

    proxy_url="socks4a://<userid>@proxy-host"

When connecting to a SOCKS5 proxy the ``username`` and ``password`` portion
of the ``proxy_url`` will be sent as the username/password to authenticate
with the proxy:

.. code-block:: python

    proxy_url="socks5h://<username>:<password>@proxy-host"

�)�absolute_importN�)�DependencyWarningz�SOCKS support in urllib3 requires the installation of optional dependencies: specifically, PySocks.  For more information, see https://urllib3.readthedocs.io/en/1.26.x/contrib.html#socks-proxies)�error)�timeout)�HTTPConnection�HTTPSConnection)�HTTPConnectionPool�HTTPSConnectionPool)�ConnectTimeoutError�NewConnectionError)�PoolManager)�	parse_urlc�(��eZdZdZ�fd�Zd�Z�xZS)�SOCKSConnectionzG
    A plain-text HTTP connection that connects via a SOCKS proxy.
    c�X��|jd�|_tt|�|i|��y)N�_socks_options)�popr�superr�__init__)�self�args�kwargs�	__class__s   ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/socks.pyrzSOCKSConnection.__init__Ps)���$�j�j�)9�:���
�o�t�-�t�>�v�>�c�4�i}|jr|j|d<|jr|j|d<	tj|j|j
ff|jd|jd|jd|jd|jd|jd|jd	�|��}|S#t$r(t|d
|j�d|j�d���tj$rr}|jrR|j}t|t�r't|d
|j�d|j�d���t|d
|z��t|d
|z��d}~wt$r}t|d
|z��d}~wwxYw)zA
        Establish a new connection via the SOCKS proxy.
        �source_address�socket_options�
socks_version�
proxy_host�
proxy_port�username�password�rdns)�
proxy_type�
proxy_addrr"�proxy_username�proxy_password�
proxy_rdnsrzConnection to z timed out. (connect timeout=�)z(Failed to establish a new connection: %sN)rr�socks�create_connection�host�portrr�
SocketTimeoutr�
ProxyError�
socket_err�
isinstancer
�SocketError)r�extra_kw�conn�ers     r�	_new_connzSOCKSConnection._new_connTs��������)-�)<�)<�H�%�&����)-�)<�)<�H�%�&�+	��*�*����D�I�I�&�
��.�.��?��.�.�|�<��.�.�|�<�#�2�2�:�>�#�2�2�:�>��.�.�v�6����
��
�D�X���A�	�%���9�9�d�l�l�,��
����	��|�|������e�]�3�-���9�9�d�l�l�4���-��H�5�P���)��D�q�H�����	�$��@�1�D��
��	�s&�BC�AF�
A-E7�7F�F�F)�__name__�
__module__�__qualname__�__doc__rr8�
__classcell__�rs@rrrKs����?�8rrc��eZdZy)�SOCKSHTTPSConnectionN)r9r:r;�rrr@r@�s��rr@c��eZdZeZy)�SOCKSHTTPConnectionPoolN)r9r:r;r�
ConnectionClsrArrrCrC�s��#�MrrCc��eZdZeZy)�SOCKSHTTPSConnectionPoolN)r9r:r;r@rDrArrrFrF�s��(�MrrFc�6��eZdZdZeed�Z				d�fd�	Z�xZS)�SOCKSProxyManagerzh
    A version of the urllib3 ProxyManager that routes connections via the
    defined SOCKS proxy.
    )�http�httpsc�j��t|�}|�<|�:|j�.|jjd�}t|�dk(r|\}}|jdk(rt
j}	d}
nt|jdk(rt
j}	d}
nR|jdk(rt
j}	d}
n0|jdk(rt
j}	d}
ntd	|z��||_	|	|j|j|||
d
�}||d<tt|�:||fi|��tj|_y)N�:r�socks5F�socks5hT�socks4�socks4az)Unable to determine SOCKS version from %s)r r!r"r#r$r%r)r�auth�split�len�schemer,�PROXY_TYPE_SOCKS5�PROXY_TYPE_SOCKS4�
ValueError�	proxy_urlr.r/rrHr�pool_classes_by_scheme)
rrXr#r$�	num_pools�headers�connection_pool_kw�parsedrRr r%�
socks_optionsrs
            �rrzSOCKSProxyManager.__init__�s2����9�%����� 0�V�[�[�5L��K�K�%�%�c�*�E��5�z�Q��%*�"��(��=�=�H�$�!�3�3�M��D�
�]�]�i�
'�!�3�3�M��D�
�]�]�h�
&�!�3�3�M��D�
�]�]�i�
'�!�3�3�M��D��H�9�T�U�U�"���+� �+�+� �+�+� � ��

�
�0=��+�,�
���/��w�	
�"4�	
�'8�&N�&N��#r)NN�
N)	r9r:r;r<rCrFrYrr=r>s@rrHrH�s2����(�)�������
.O�.OrrH) r<�
__future__rr,�ImportError�warnings�
exceptionsr�warn�socketrr4rr0�
connectionrr	�connectionpoolr
rrr
�poolmanagerr�util.urlr�sslrr@rCrFrHrArr�<module>rks���&�N'�
�� (�+�8�D�@�%� ���
A�n�A�P	�?�O�	�$�0�$�)�2�)�9O��9O��e�

��.��H�M�M�
R�	�
�
�

��4��
�C��s�A<�B#�<$B �#B-�,B-python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-312.pyc000064400000057661151732702440025344 0ustar00�

R`i�B��~�dZddlmZddlZddlZddlmZddlm	Z
	ddlmZdd	lmZdd
lmZddlmZ	ddlmZddlZddlZddlZddlZd
dlmZd
dlmZd
dl m!Z!ejDde#d
��ddgZ$dZ%ejLejNjPe!ejNjPejRejNjTiZ+e,ed�r6e,ejNd�r#ejNjZe+ej\<e,ed�r6e,ejNd�r#ejNj^e+ej`<e,ed�r6e,ejNd�r#ejNjbe+ejd<ejfejNjhejjejNjlejnejNjlejNjpziZ9e:d�e9jw�D��Z<dZ=ejJZ>ej~j�ZAej�eC�ZDd�ZEd �ZFd!�ZGd"�ZHd#�ZIGd$�d%eJ�ZKerd*d&�ZLneZLeLeK_LGd'�d(eJ�ZMd)�ZNy#e
$rGd�de�ZY���wxYw#e
$rdZd
dlmZY��~wxYw)+a�
TLS with SNI_-support for Python 2. Follow these instructions if you would
like to verify TLS certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.

This needs the following packages installed:

* `pyOpenSSL`_ (tested with 16.0.0)
* `cryptography`_ (minimum 1.3.4, from pyopenssl)
* `idna`_ (minimum 2.0, from cryptography)

However, pyopenssl depends on cryptography, which depends on idna, so while we
use all three directly here we end up having relatively few packages required.

You can install them with the following command:

.. code-block:: bash

    $ python -m pip install pyopenssl cryptography idna

To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this:

.. code-block:: python

    try:
        import pip._vendor.urllib3.contrib.pyopenssl as pyopenssl
        pyopenssl.inject_into_urllib3()
    except ImportError:
        pass

Now you can use :mod:`urllib3` as you normally would, and it will support SNI
when the required modules are installed.

Activating this module also has the positive side effect of disabling SSL/TLS
compression in Python 2 (see `CRIME attack`_).

.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)
.. _pyopenssl: https://www.pyopenssl.org
.. _cryptography: https://cryptography.io
.. _idna: https://github.com/kjd/idna
�)�absolute_importN)�x509)�backend)�UnsupportedExtensionc��eZdZy)rN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.pyrr;s��rr)�BytesIO)�error)�timeout)�_fileobject�)�backport_makefile)�util)�six)�PROTOCOL_TLS_CLIENTz�'urllib3.contrib.pyopenssl' module is deprecated and will be removed in a future release of urllib3 2.x. Read more in this issue: https://github.com/urllib3/urllib3/issues/2680)�category�
stacklevel�inject_into_urllib3�extract_from_urllib3T�PROTOCOL_SSLv3�SSLv3_METHOD�PROTOCOL_TLSv1_1�TLSv1_1_METHOD�PROTOCOL_TLSv1_2�TLSv1_2_METHODc#�*K�|]\}}||f���
y�w�Nr)�.0�k�vs   r
�	<genexpr>r&vs���� V�4U�D�A�q�!�Q��4U�s�i@c��t�tt_ttj_t
t_t
tj_dt_dtj_y)z7Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.TN)�_validate_dependencies_met�PyOpenSSLContextr�
SSLContext�ssl_�HAS_SNI�IS_PYOPENSSLrrr
rr�sD��� �&�D�O�+�D�I�I���D�L��D�I�I���D��!�D�I�I�rc���tt_ttj_tt_ttj_dt_dtj_y)z4Undo monkey-patching by :func:`inject_into_urllib3`.FN)�orig_util_SSLContextrr*r+�orig_util_HAS_SNIr,r-rrr
rr�s>��+�D�O�/�D�I�I��$�D�L�)�D�I�I���D��"�D�I�I�rc��ddlm}t|dd��td��ddlm}|�}t|dd��td��y)	z{
    Verifies that PyOpenSSL's package-level dependencies have been met.
    Throws `ImportError` if they are not met.
    r)�
Extensions�get_extension_for_classNzX'cryptography' module missing required functionality.  Try upgrading to v1.3.4 or newer.)�X509�_x509zS'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer.)�cryptography.x509.extensionsr2�getattr�ImportError�OpenSSL.cryptor4)r2r4rs   r
r(r(�s[��8��z�4�d�;�C��
0�
�	
�$��6�D��t�W�d�#�+��
/�
�	
�,rc�v�d�}d|vr|S||�}|�ytjdk\r|jd�}|S)a%
    Converts a dNSName SubjectAlternativeName field to the form used by the
    standard library on the given Python version.

    Cryptography produces a dNSName as a unicode string that was idna-decoded
    from ASCII bytes. We need to idna-encode that string to get it back, and
    then on Python 3 we also need to convert to unicode via UTF-8 (the stdlib
    uses PyUnicode_FromStringAndSize on it, which decodes via UTF-8).

    If the name cannot be idna-encoded then we return None signalling that
    the name given should be skipped.
    c��ddlm}	dD]F}|j|�s�|t|�d}|j	d�|j	|�zcS|j	|�S#|j
j$rYywxYw)z�
        Borrowed wholesale from the Python Cryptography Project. It turns out
        that we can't just safely call `idna.encode`: it can explode for
        wildcard names. This avoids that problem.
        r)�idna)z*.�.N�ascii)�pip._vendorr<�
startswith�len�encode�core�	IDNAError)�namer<�prefixs   r
�idna_encodez'_dnsname_to_stdlib.<locals>.idna_encode�s|��	%�	�'���?�?�6�*���F��
�.�D�!�=�=��1�D�K�K��4E�E�E�(��;�;�t�$�$���y�y�"�"�	��	�s�A$�2A$�A$�$B�?B�:N)�r�utf-8)�sys�version_info�decode)rErGs  r
�_dnsname_to_stdlibrN�sH���$�d�{����t��D��|��	�	�	�V�	#��{�{�7�#���Krc��t|d�r|j�}nRtjj	tjj
|�}t
j|t�}	|jjtj�j}t)t*|j-tj.��D�cgc]}|�d|f��
}}|j1d�|j-tj2�D��|S#tj$rgcYStjttj t"f$r"}t$j'd|�gcYd}~Sd}~wwxYwcc}w)zU
    Given an PyOpenSSL certificate, provides all the subject alternative names.
    �to_cryptographyz�A problem was encountered with the certificate that prevented urllib3 from finding the SubjectAlternativeName field. This can affect certificate validation. The error was %sN�DNSc3�6K�|]}dt|�f���y�w)z
IP AddressN)�str)r#rEs  r
r&z$get_subj_alt_name.<locals>.<genexpr>
s�����.U�d��s�4�y�!�.U�s�)�hasattrrP�OpenSSL�crypto�dump_certificate�
FILETYPE_ASN1r�load_der_x509_certificate�openssl_backend�
extensionsr3�SubjectAlternativeName�value�ExtensionNotFound�DuplicateExtensionr�UnsupportedGeneralNameType�UnicodeError�log�warning�maprN�get_values_for_type�DNSName�extend�	IPAddress)�	peer_cert�cert�der�ext�erE�namess       r
�get_subj_alt_namero�sK��
�y�+�,��(�(�*���n�n�-�-�g�n�n�.J�.J�I�V���-�-�c�?�C����o�o�5�5�d�6Q�6Q�R�X�X��:�*�C�,C�,C�D�L�L�,Q�R�
�R�D���
��
�R�
�
�

�L�L��.1�.E�.E�d�n�n�.U����L��G�!�!���	������'�'��	��	���
>�
�		
��	����.
s*�13D�
F�E>�0,E>�E9�3E>�9E>c�h�eZdZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dd�Zd
�Zd�Zd�Zy)�
WrappedSocketz�API-compatibility wrapper for Python OpenSSL's Connection-class.

    Note: _makefile_refs, _drop() and _reuse() are needed for the garbage
    collector of pypy.
    c�J�||_||_||_d|_d|_y�NrF)�
connection�socket�suppress_ragged_eofs�_makefile_refs�_closed)�selfrtrurvs    r
�__init__zWrappedSocket.__init__s'��$������$8��!������rc�6�|jj�Sr")ru�fileno�rys r
r|zWrappedSocket.fileno"s���{�{�!�!�#�#rc��|jdkDr|xjdzc_|jr|j�yy)Nr�)rwrx�closer}s r
�_decref_socketioszWrappedSocket._decref_socketios&s6������"����1�$���<�<��J�J�L�rc���	|jj|i|��}|S#tjj$r9}|j
r|jdk(rYd}~ytt|���d}~wtjj$r9|jj�tjjk(rYy�tjj$rXtj|j|jj!��st#d��|j|i|��cYStjj$$r}t'j(d|z��d}~wwxYw)N����zUnexpected EOFr�The read operation timed out�read error: %r)rt�recvrU�SSL�SysCallErrorrv�args�SocketErrorrS�ZeroReturnError�get_shutdown�RECEIVED_SHUTDOWN�
WantReadErrorr�
wait_for_readru�
gettimeoutr�Error�ssl�SSLError)ryr��kwargs�datarms     r
r�zWrappedSocket.recv,s"��	�'�4�?�?�'�'��8��8�D�*�K��)�{�{�'�'�	*��(�(�Q�V�V�7M�-M��!�#�a�&�)�)���{�{�*�*�	����+�+�-����1N�1N�N����{�{�(�(�	2��%�%�d�k�k�4�;�;�3I�3I�3K�L��<�=�=� �t�y�y�$�1�&�1�1��{�{� � �	5��,�,�/�!�3�4�4��	5�s4� �E5�A1�A1�1AE5�A2E5�<E5�E0�0E5c���	|jj|i|��S#tjj$r9}|j
r|jdk(rYd}~ytt|���d}~wtjj$r9|jj�tjjk(rYy�tjj$rXtj|j|jj!��st#d��|j|i|��cYStjj$$r}t'j(d|z��d}~wwxYw)Nr�rr�r�)rt�	recv_intorUr�r�rvr�r�rSr�r�r�r�rr�rur�rr�r�r�)ryr�r�rms    r
r�zWrappedSocket.recv_intoEs��	5�,�4�?�?�,�,�d�=�f�=�=���{�{�'�'�	*��(�(�Q�V�V�7M�-M��!�#�a�&�)�)���{�{�*�*�	����+�+�-����1N�1N�N����{�{�(�(�	7��%�%�d�k�k�4�;�;�3I�3I�3K�L��<�=�=�%�t�~�~�t�6�v�6�6��{�{� � �	5��,�,�/�!�3�4�4��	5�s4��E3�A/�A/�/AE3�A2E3�:E3�E.�.E3c�8�|jj|�Sr")ru�
settimeout)ryrs  r
r�zWrappedSocket.settimeout\s���{�{�%�%�g�.�.rc�n�		|jj|�S#tjj$rEtj|j|jj��s
t��Y�~tjj$r}tt|���d}~wwxYwr")
rt�sendrUr��WantWriteErrorr�wait_for_writerur�rr�r�rS)ryr�rms   r
�_send_until_donezWrappedSocket._send_until_done_s����
*����+�+�D�1�1���;�;�-�-�
��*�*�4�;�;����8N�8N�8P�Q�!�)�O���;�;�+�+�
*�!�#�a�&�)�)��
*�s��AB4�?B4�B/�/B4c��d}|t|�kr0|j|||tz�}||z
}|t|�kr�/yy�Nr)rAr��SSL_WRITE_BLOCKSIZE)ryr��
total_sent�sents    r
�sendallzWrappedSocket.sendalljsM���
��3�t�9�$��(�(��Z�*�/B�"B�C��D�
�$��J�	�3�t�9�$rc�8�|jj�yr")rt�shutdownr}s r
r�zWrappedSocket.shutdownrs����� � �"rc���|jdkr"	d|_|jj�S|xjdzc_y#tj
j$rYywxYw)NrT)rwrxrtr�rUr�r�r}s r
r�zWrappedSocket.closevs`������"�
�#������,�,�.�.�
���1�$����;�;�$�$�
��
�s� A�A(�'A(c��|jj�}|s|S|r8tjj	tjj
|�Sd|j�jffft|�d�S)N�
commonName)�subject�subjectAltName)	rt�get_peer_certificaterUrVrWrX�get_subject�CNro)ry�binary_formrs   r
�getpeercertzWrappedSocket.getpeercert�su�����3�3�5����K���>�>�2�2�7�>�>�3O�3O�QU�V�V�'�(8��(8�(8�(:�(=�(=�>�@�B�/��5�
�	
rc�6�|jj�Sr")rt�get_protocol_version_namer}s r
�versionzWrappedSocket.version�s�����8�8�:�:rc�.�|xjdz
c_y�Nr)rwr}s r
�_reusezWrappedSocket._reuse�s�����q� �rc�n�|jdkr|j�y|xjdzc_yr�)rwr�r}s r
�_dropzWrappedSocket._drop�s*������"��J�J�L����1�$�rN)T)F)rr	r
�__doc__rzr|r�r�r�r�r�r�r�r�r�r�r�r�rrr
rqrqsM����$���25�./�	*��#�%�
�;�!�%rrqc�J�|xjdz
c_t|||d��S)NrT)r�)rwr)ry�mode�bufsizes   r
�makefiler��s$�����q� ���4��w�d�;�;rc��eZdZdZd�Zed��Zejd��Zed��Zejd��Zd�Z	d�Z
dd
�Zdd�Zd�Z
				dd
�Zy	)r)z�
    I am a wrapper class for the PyOpenSSL ``Context`` object. I am responsible
    for translating the interface of the standard library ``SSLContext`` object
    to calls into PyOpenSSL.
    c��t||_tjj	|j�|_d|_d|_yrs)�_openssl_versions�protocolrUr��Context�_ctx�_options�check_hostname)ryr�s  r
rzzPyOpenSSLContext.__init__�s7��)�(�3��
��K�K�'�'��
�
�6��	���
�#��rc��|jSr")r�r}s r
�optionszPyOpenSSLContext.options�s���}�}�rc�H�||_|jj|�yr")r�r��set_options�ryr]s  r
r�zPyOpenSSLContext.options�s����
��	�	���e�$rc�D�t|jj�Sr")�_openssl_to_stdlib_verifyr��get_verify_moder}s r
�verify_modezPyOpenSSLContext.verify_mode�s��(����)B�)B�)D�E�Erc�R�|jjt|t�yr")r��
set_verify�_stdlib_to_openssl_verify�_verify_callbackr�s  r
r�zPyOpenSSLContext.verify_mode�s���	�	���6�u�=�?O�Prc�8�|jj�yr")r��set_default_verify_pathsr}s r
r�z)PyOpenSSLContext.set_default_verify_paths�s���	�	�*�*�,rc��t|tj�r|jd�}|jj|�y)NrJ)�
isinstancer�	text_typerBr��set_cipher_list)ry�cipherss  r
�set_cipherszPyOpenSSLContext.set_ciphers�s0���g�s�}�}�-��n�n�W�-�G��	�	�!�!�'�*rNc�R�|�|jd�}|�|jd�}	|jj||�|�%|jjt|��yy#tj
j$r}tjd|z��d}~wwxYw)NrJz'unable to load trusted certificates: %r)	rBr��load_verify_locationsrrUr�r�r�r�)ry�cafile�capath�cadatarms     r
r�z&PyOpenSSLContext.load_verify_locations�s������]�]�7�+�F����]�]�7�+�F�	N��I�I�+�+�F�F�;��!��	�	�/�/����@�"���{�{� � �	N��,�,�H�1�L�M�M��	N�s�AA,�,B&�	B!�!B&c���|jj|���It�tj�s�jd��|jj
�fd��|jj|xs|�y)NrJc����Sr"r)�_�passwords �r
�<lambda>z2PyOpenSSLContext.load_cert_chain.<locals>.<lambda>�s���xr)r��use_certificate_chain_filer�r�binary_typerB�
set_passwd_cb�use_privatekey_file)ry�certfile�keyfiler�s   `r
�load_cert_chainz PyOpenSSLContext.load_cert_chain�sa����	�	�,�,�X�6����h����8�#�?�?�7�3���I�I�#�#�$7�8��	�	�%�%�g�&9��:rc��|D�cgc]}tj|���}}|jj|�Scc}wr")r�
ensure_binaryr��set_alpn_protos)ry�	protocols�ps   r
�set_alpn_protocolsz#PyOpenSSLContext.set_alpn_protocols�s;��3<�=�9�a�S�&�&�q�)�9�	�=��y�y�(�(��3�3��>s�>c�D�tjj|j|�}t	|t
j�r|jd�}|�|j|�|j�		|j�	t'||�S#tjj$r2tj||j��std��Y�mtjj $r}t#j$d|z��d}~wwxYw)NrJzselect timed outzbad handshake: %r)rUr��
Connectionr�r�rr�rB�set_tlsext_host_name�set_connect_state�do_handshaker�rr�r�rr�r�r�rq)ry�sock�server_side�do_handshake_on_connectrv�server_hostname�cnxrms        r
�wrap_socketzPyOpenSSLContext.wrap_socket�s����k�k�$�$�T�Y�Y��5���o�s�}�}�5�-�4�4�W�=�O��&��$�$�_�5������
<�� � �"�
��S�$�'�'���;�;�,�,�
��)�)�$����0A�B�!�"4�5�5���;�;�$�$�
<��l�l�#6��#:�;�;��
<�s�;B�AD�&D�D�D)NNN)NN)FTTN)rr	r
r�rz�propertyr��setterr�r�r�r�r�r�r�rrr
r)r)�s����$�����
�^�^�%��%��F��F����Q��Q�-�+�

N�;�4�� $�!��
(rr)c��|dk(Sr�r)r�r�err_no�	err_depth�return_codes     r
r�r�s���Q�;�r)r�)Or��
__future__rr9rU�OpenSSL.SSL�cryptographyr�$cryptography.hazmat.backends.opensslrrZ�cryptography.x509rr8�	Exception�iorrurr�rr�packages.backports.makefiler�loggingr�rK�warnings�r�packagesr�	util.ssl_r�warn�DeprecationWarning�__all__r,�PROTOCOL_TLSr��
SSLv23_METHOD�PROTOCOL_TLSv1�TLSv1_METHODr�rTrrrrr r�	CERT_NONE�VERIFY_NONE�
CERT_OPTIONAL�VERIFY_PEER�
CERT_REQUIRED�VERIFY_FAIL_IF_NO_PEER_CERTr��dict�itemsr�r�r0r+r*r/�	getLoggerrrbrrr(rNro�objectrqr�r)r�rrr
�<module>r"s���.�^'����K�
�6��'��@�"�
�
�
����+�
��
�
�5� ���!�"8�
9����	���w�{�{�0�0�����2�2�������0�0����3� �!�g�g�k�k�>�&J�,3�K�K�,D�,D��c�(�(�)�
�3�"�#�����=M�(N�.5�k�k�.H�.H��c�*�*�+�
�3�"�#�����=M�(N�.5�k�k�.H�.H��c�*�*�+��M�M�7�;�;�*�*����w�{�{�.�.����w�{�{�.�.�
�k�k�-�-�.���!� V�4M�4S�4S�4U� V�V�����L�L���y�y�+�+���g����!��
"�#�
�4(�V2�jD%�F�D%�N�<�
!�H�!�
��[(�v�[(�|��Y�
�
�y�
�
���@��K�?�?�@�s"�J�J+�J(�'J(�+
J<�;J<python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/ntlmpool.cpython-312.pyc000064400000013203151732702440025134 0ustar00�

R`i����dZddlmZddlZddlmZddlmZddlmZddl	m
Z
ejd	e�ee
�ZGd
�de�Zy)z
NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
�)�absolute_importN)�	getLogger)�ntlm�)�HTTPSConnectionPool)�HTTPSConnectiona#The 'urllib3.contrib.ntlmpool' module is deprecated and will be removed in urllib3 v2.0 release, urllib3 is not able to support it properly due to reasons listed in issue: https://github.com/urllib3/urllib3/issues/2282. If you are a user of this module please comment in the mentioned issue.c�B��eZdZdZdZ�fd�Zd�Z					d�fd�	Z�xZS)�NTLMConnectionPoolzQ
    Implements an NTLM authentication version of an urllib3 connection pool
    �httpsc���tt|�
|i|��||_||_|jdd�}|dj
�|_|d|_||_	y)z�
        authurl is a random URL on the server that is protected by NTLM.
        user is the Windows user, probably in the DOMAIN\username format.
        pw is the password for the user.
        �\�rN)
�superr
�__init__�authurl�rawuser�split�upper�domain�user�pw)�selfrrr�args�kwargs�
user_parts�	__class__s       ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.pyrzNTLMConnectionPool.__init__"s^���	� �$�0�$�A�&�A��������Z�Z��a�(�
� ��m�)�)�+����q�M��	����c�F�|xjdz
c_tjd|j|j|j�ddi}d}d}t|j|j��}dtj|j�z||<tjd	|�|jd
|jd|�|j�}t|j�}tjd|j|j�tjd|�tjd
|j!d��d|_||j%d�}d}|D]}	|	dddk(s�|	dd}�|�t'd|�d||����tj(|�\}
}tj*|
|j,|j.|j0|�}d|z||<tjd	|�|jd
|jd|�|j�}tjd|j|j�tjdt|j��tjd
|j!�dd�|jdk7r?|jdk(rt'd��t'd|j�d|j����d|_tjd�|S)Nrz3Starting NTLM HTTPS connection no. %d: https://%s%s�
Connection�
Keep-Alive�
Authorizationzwww-authenticate)�host�portzNTLM %szRequest headers: %s�GETzResponse status: %s %szResponse headers: %szResponse data: %s [...]�dz, �zNTLM zUnexpected z response header: ��i�z3Server rejected request: wrong username or passwordzWrong server response: � zConnection established)�num_connections�log�debugr#rrr$r�create_NTLM_NEGOTIATE_MESSAGEr�request�getresponse�dict�headers�status�reason�read�fpr�	Exception�parse_NTLM_CHALLENGE_MESSAGE� create_NTLM_AUTHENTICATE_MESSAGErrr)
rr1�
req_header�resp_header�conn�res�reshdr�auth_header_values�auth_header_value�s�ServerChallenge�NegotiateFlags�auth_msgs
             r�	_new_connzNTLMConnectionPool._new_conn0s���	
����!���	�	�A�� � ��I�I��L�L�		
� ��.��$�
�(���D�I�I�D�I�I�>��(�$�*L�*L��L�L�+
�
��
��	�	�	�'��1����U�D�L�L�$��8���� ���c�k�k�"���	�	�*�C�J�J��
�
�C��	�	�(�&�1��	�	�+�S�X�X�c�]�;����$�K�0�6�6�t�<�� ��#�A���!�u���$%�a�b�E�!�$��$��7B�F�;�DW�X��
�
+/�*K�*K��+
�'����8�8��T�Y�Y����T�W�W�n�
��(�(�2��
���	�	�'��1����U�D�L�L�$��8���� ���	�	�*�C�J�J��
�
�C��	�	�(�$�s�{�{�*;�<��	�	�+�S�X�X�Z���-=�>��:�:����z�z�S� �� U�V�V��c�j�j�#�*�*�U�V�V�����	�	�*�+��rc	�H��|�i}d|d<tt|�|||||||�S)Nr!r )rr
�urlopen)	r�method�url�bodyr1�retries�redirect�assert_same_hostrs	        �rrFzNTLMConnectionPool.urlopenss>����?��G� ,�����'��6��C��w���;K�
�	
r)NN�TT)	�__name__�
__module__�__qualname__�__doc__�schemerrDrF�
__classcell__)rs@rr
r
s6�����F��A�N�����
�
rr
)rQ�
__future__r�warnings�loggingrr�r�packages.six.moves.http_clientr�warn�DeprecationWarningrNr+r
�rr�<module>r\sR���
'����"�<�
��
�
�N�������g
�,�g
rpython3.12/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py000064400000010660151732702440020577 0ustar00"""
NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import

import warnings
from logging import getLogger

from ntlm import ntlm

from .. import HTTPSConnectionPool
from ..packages.six.moves.http_client import HTTPSConnection

warnings.warn(
    "The 'urllib3.contrib.ntlmpool' module is deprecated and will be removed "
    "in urllib3 v2.0 release, urllib3 is not able to support it properly due "
    "to reasons listed in issue: https://github.com/urllib3/urllib3/issues/2282. "
    "If you are a user of this module please comment in the mentioned issue.",
    DeprecationWarning,
)

log = getLogger(__name__)


class NTLMConnectionPool(HTTPSConnectionPool):
    """
    Implements an NTLM authentication version of an urllib3 connection pool
    """

    scheme = "https"

    def __init__(self, user, pw, authurl, *args, **kwargs):
        """
        authurl is a random URL on the server that is protected by NTLM.
        user is the Windows user, probably in the DOMAIN\\username format.
        pw is the password for the user.
        """
        super(NTLMConnectionPool, self).__init__(*args, **kwargs)
        self.authurl = authurl
        self.rawuser = user
        user_parts = user.split("\\", 1)
        self.domain = user_parts[0].upper()
        self.user = user_parts[1]
        self.pw = pw

    def _new_conn(self):
        # Performs the NTLM handshake that secures the connection. The socket
        # must be kept open while requests are performed.
        self.num_connections += 1
        log.debug(
            "Starting NTLM HTTPS connection no. %d: https://%s%s",
            self.num_connections,
            self.host,
            self.authurl,
        )

        headers = {"Connection": "Keep-Alive"}
        req_header = "Authorization"
        resp_header = "www-authenticate"

        conn = HTTPSConnection(host=self.host, port=self.port)

        # Send negotiation message
        headers[req_header] = "NTLM %s" % ntlm.create_NTLM_NEGOTIATE_MESSAGE(
            self.rawuser
        )
        log.debug("Request headers: %s", headers)
        conn.request("GET", self.authurl, None, headers)
        res = conn.getresponse()
        reshdr = dict(res.headers)
        log.debug("Response status: %s %s", res.status, res.reason)
        log.debug("Response headers: %s", reshdr)
        log.debug("Response data: %s [...]", res.read(100))

        # Remove the reference to the socket, so that it can not be closed by
        # the response object (we want to keep the socket open)
        res.fp = None

        # Server should respond with a challenge message
        auth_header_values = reshdr[resp_header].split(", ")
        auth_header_value = None
        for s in auth_header_values:
            if s[:5] == "NTLM ":
                auth_header_value = s[5:]
        if auth_header_value is None:
            raise Exception(
                "Unexpected %s response header: %s" % (resp_header, reshdr[resp_header])
            )

        # Send authentication message
        ServerChallenge, NegotiateFlags = ntlm.parse_NTLM_CHALLENGE_MESSAGE(
            auth_header_value
        )
        auth_msg = ntlm.create_NTLM_AUTHENTICATE_MESSAGE(
            ServerChallenge, self.user, self.domain, self.pw, NegotiateFlags
        )
        headers[req_header] = "NTLM %s" % auth_msg
        log.debug("Request headers: %s", headers)
        conn.request("GET", self.authurl, None, headers)
        res = conn.getresponse()
        log.debug("Response status: %s %s", res.status, res.reason)
        log.debug("Response headers: %s", dict(res.headers))
        log.debug("Response data: %s [...]", res.read()[:100])
        if res.status != 200:
            if res.status == 401:
                raise Exception("Server rejected request: wrong username or password")
            raise Exception("Wrong server response: %s %s" % (res.status, res.reason))

        res.fp = None
        log.debug("Connection established")
        return conn

    def urlopen(
        self,
        method,
        url,
        body=None,
        headers=None,
        retries=3,
        redirect=True,
        assert_same_host=True,
    ):
        if headers is None:
            headers = {}
        headers["Connection"] = "Keep-Alive"
        return super(NTLMConnectionPool, self).urlopen(
            method, url, body, headers, retries, redirect, assert_same_host
        )
python3.12/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py000064400000041271151732702440020771 0ustar00"""
TLS with SNI_-support for Python 2. Follow these instructions if you would
like to verify TLS certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.

This needs the following packages installed:

* `pyOpenSSL`_ (tested with 16.0.0)
* `cryptography`_ (minimum 1.3.4, from pyopenssl)
* `idna`_ (minimum 2.0, from cryptography)

However, pyopenssl depends on cryptography, which depends on idna, so while we
use all three directly here we end up having relatively few packages required.

You can install them with the following command:

.. code-block:: bash

    $ python -m pip install pyopenssl cryptography idna

To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this:

.. code-block:: python

    try:
        import pip._vendor.urllib3.contrib.pyopenssl as pyopenssl
        pyopenssl.inject_into_urllib3()
    except ImportError:
        pass

Now you can use :mod:`urllib3` as you normally would, and it will support SNI
when the required modules are installed.

Activating this module also has the positive side effect of disabling SSL/TLS
compression in Python 2 (see `CRIME attack`_).

.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)
.. _pyopenssl: https://www.pyopenssl.org
.. _cryptography: https://cryptography.io
.. _idna: https://github.com/kjd/idna
"""
from __future__ import absolute_import

import OpenSSL.crypto
import OpenSSL.SSL
from cryptography import x509
from cryptography.hazmat.backends.openssl import backend as openssl_backend

try:
    from cryptography.x509 import UnsupportedExtension
except ImportError:
    # UnsupportedExtension is gone in cryptography >= 2.1.0
    class UnsupportedExtension(Exception):
        pass


from io import BytesIO
from socket import error as SocketError
from socket import timeout

try:  # Platform-specific: Python 2
    from socket import _fileobject
except ImportError:  # Platform-specific: Python 3
    _fileobject = None
    from ..packages.backports.makefile import backport_makefile

import logging
import ssl
import sys
import warnings

from .. import util
from ..packages import six
from ..util.ssl_ import PROTOCOL_TLS_CLIENT

warnings.warn(
    "'urllib3.contrib.pyopenssl' module is deprecated and will be removed "
    "in a future release of urllib3 2.x. Read more in this issue: "
    "https://github.com/urllib3/urllib3/issues/2680",
    category=DeprecationWarning,
    stacklevel=2,
)

__all__ = ["inject_into_urllib3", "extract_from_urllib3"]

# SNI always works.
HAS_SNI = True

# Map from urllib3 to PyOpenSSL compatible parameter-values.
_openssl_versions = {
    util.PROTOCOL_TLS: OpenSSL.SSL.SSLv23_METHOD,
    PROTOCOL_TLS_CLIENT: OpenSSL.SSL.SSLv23_METHOD,
    ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
}

if hasattr(ssl, "PROTOCOL_SSLv3") and hasattr(OpenSSL.SSL, "SSLv3_METHOD"):
    _openssl_versions[ssl.PROTOCOL_SSLv3] = OpenSSL.SSL.SSLv3_METHOD

if hasattr(ssl, "PROTOCOL_TLSv1_1") and hasattr(OpenSSL.SSL, "TLSv1_1_METHOD"):
    _openssl_versions[ssl.PROTOCOL_TLSv1_1] = OpenSSL.SSL.TLSv1_1_METHOD

if hasattr(ssl, "PROTOCOL_TLSv1_2") and hasattr(OpenSSL.SSL, "TLSv1_2_METHOD"):
    _openssl_versions[ssl.PROTOCOL_TLSv1_2] = OpenSSL.SSL.TLSv1_2_METHOD


_stdlib_to_openssl_verify = {
    ssl.CERT_NONE: OpenSSL.SSL.VERIFY_NONE,
    ssl.CERT_OPTIONAL: OpenSSL.SSL.VERIFY_PEER,
    ssl.CERT_REQUIRED: OpenSSL.SSL.VERIFY_PEER
    + OpenSSL.SSL.VERIFY_FAIL_IF_NO_PEER_CERT,
}
_openssl_to_stdlib_verify = dict((v, k) for k, v in _stdlib_to_openssl_verify.items())

# OpenSSL will only write 16K at a time
SSL_WRITE_BLOCKSIZE = 16384

orig_util_HAS_SNI = util.HAS_SNI
orig_util_SSLContext = util.ssl_.SSLContext


log = logging.getLogger(__name__)


def inject_into_urllib3():
    "Monkey-patch urllib3 with PyOpenSSL-backed SSL-support."

    _validate_dependencies_met()

    util.SSLContext = PyOpenSSLContext
    util.ssl_.SSLContext = PyOpenSSLContext
    util.HAS_SNI = HAS_SNI
    util.ssl_.HAS_SNI = HAS_SNI
    util.IS_PYOPENSSL = True
    util.ssl_.IS_PYOPENSSL = True


def extract_from_urllib3():
    "Undo monkey-patching by :func:`inject_into_urllib3`."

    util.SSLContext = orig_util_SSLContext
    util.ssl_.SSLContext = orig_util_SSLContext
    util.HAS_SNI = orig_util_HAS_SNI
    util.ssl_.HAS_SNI = orig_util_HAS_SNI
    util.IS_PYOPENSSL = False
    util.ssl_.IS_PYOPENSSL = False


def _validate_dependencies_met():
    """
    Verifies that PyOpenSSL's package-level dependencies have been met.
    Throws `ImportError` if they are not met.
    """
    # Method added in `cryptography==1.1`; not available in older versions
    from cryptography.x509.extensions import Extensions

    if getattr(Extensions, "get_extension_for_class", None) is None:
        raise ImportError(
            "'cryptography' module missing required functionality.  "
            "Try upgrading to v1.3.4 or newer."
        )

    # pyOpenSSL 0.14 and above use cryptography for OpenSSL bindings. The _x509
    # attribute is only present on those versions.
    from OpenSSL.crypto import X509

    x509 = X509()
    if getattr(x509, "_x509", None) is None:
        raise ImportError(
            "'pyOpenSSL' module missing required functionality. "
            "Try upgrading to v0.14 or newer."
        )


def _dnsname_to_stdlib(name):
    """
    Converts a dNSName SubjectAlternativeName field to the form used by the
    standard library on the given Python version.

    Cryptography produces a dNSName as a unicode string that was idna-decoded
    from ASCII bytes. We need to idna-encode that string to get it back, and
    then on Python 3 we also need to convert to unicode via UTF-8 (the stdlib
    uses PyUnicode_FromStringAndSize on it, which decodes via UTF-8).

    If the name cannot be idna-encoded then we return None signalling that
    the name given should be skipped.
    """

    def idna_encode(name):
        """
        Borrowed wholesale from the Python Cryptography Project. It turns out
        that we can't just safely call `idna.encode`: it can explode for
        wildcard names. This avoids that problem.
        """
        from pip._vendor import idna

        try:
            for prefix in [u"*.", u"."]:
                if name.startswith(prefix):
                    name = name[len(prefix) :]
                    return prefix.encode("ascii") + idna.encode(name)
            return idna.encode(name)
        except idna.core.IDNAError:
            return None

    # Don't send IPv6 addresses through the IDNA encoder.
    if ":" in name:
        return name

    name = idna_encode(name)
    if name is None:
        return None
    elif sys.version_info >= (3, 0):
        name = name.decode("utf-8")
    return name


def get_subj_alt_name(peer_cert):
    """
    Given an PyOpenSSL certificate, provides all the subject alternative names.
    """
    # Pass the cert to cryptography, which has much better APIs for this.
    if hasattr(peer_cert, "to_cryptography"):
        cert = peer_cert.to_cryptography()
    else:
        der = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, peer_cert)
        cert = x509.load_der_x509_certificate(der, openssl_backend)

    # We want to find the SAN extension. Ask Cryptography to locate it (it's
    # faster than looping in Python)
    try:
        ext = cert.extensions.get_extension_for_class(x509.SubjectAlternativeName).value
    except x509.ExtensionNotFound:
        # No such extension, return the empty list.
        return []
    except (
        x509.DuplicateExtension,
        UnsupportedExtension,
        x509.UnsupportedGeneralNameType,
        UnicodeError,
    ) as e:
        # A problem has been found with the quality of the certificate. Assume
        # no SAN field is present.
        log.warning(
            "A problem was encountered with the certificate that prevented "
            "urllib3 from finding the SubjectAlternativeName field. This can "
            "affect certificate validation. The error was %s",
            e,
        )
        return []

    # We want to return dNSName and iPAddress fields. We need to cast the IPs
    # back to strings because the match_hostname function wants them as
    # strings.
    # Sadly the DNS names need to be idna encoded and then, on Python 3, UTF-8
    # decoded. This is pretty frustrating, but that's what the standard library
    # does with certificates, and so we need to attempt to do the same.
    # We also want to skip over names which cannot be idna encoded.
    names = [
        ("DNS", name)
        for name in map(_dnsname_to_stdlib, ext.get_values_for_type(x509.DNSName))
        if name is not None
    ]
    names.extend(
        ("IP Address", str(name)) for name in ext.get_values_for_type(x509.IPAddress)
    )

    return names


class WrappedSocket(object):
    """API-compatibility wrapper for Python OpenSSL's Connection-class.

    Note: _makefile_refs, _drop() and _reuse() are needed for the garbage
    collector of pypy.
    """

    def __init__(self, connection, socket, suppress_ragged_eofs=True):
        self.connection = connection
        self.socket = socket
        self.suppress_ragged_eofs = suppress_ragged_eofs
        self._makefile_refs = 0
        self._closed = False

    def fileno(self):
        return self.socket.fileno()

    # Copy-pasted from Python 3.5 source code
    def _decref_socketios(self):
        if self._makefile_refs > 0:
            self._makefile_refs -= 1
        if self._closed:
            self.close()

    def recv(self, *args, **kwargs):
        try:
            data = self.connection.recv(*args, **kwargs)
        except OpenSSL.SSL.SysCallError as e:
            if self.suppress_ragged_eofs and e.args == (-1, "Unexpected EOF"):
                return b""
            else:
                raise SocketError(str(e))
        except OpenSSL.SSL.ZeroReturnError:
            if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
                return b""
            else:
                raise
        except OpenSSL.SSL.WantReadError:
            if not util.wait_for_read(self.socket, self.socket.gettimeout()):
                raise timeout("The read operation timed out")
            else:
                return self.recv(*args, **kwargs)

        # TLS 1.3 post-handshake authentication
        except OpenSSL.SSL.Error as e:
            raise ssl.SSLError("read error: %r" % e)
        else:
            return data

    def recv_into(self, *args, **kwargs):
        try:
            return self.connection.recv_into(*args, **kwargs)
        except OpenSSL.SSL.SysCallError as e:
            if self.suppress_ragged_eofs and e.args == (-1, "Unexpected EOF"):
                return 0
            else:
                raise SocketError(str(e))
        except OpenSSL.SSL.ZeroReturnError:
            if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
                return 0
            else:
                raise
        except OpenSSL.SSL.WantReadError:
            if not util.wait_for_read(self.socket, self.socket.gettimeout()):
                raise timeout("The read operation timed out")
            else:
                return self.recv_into(*args, **kwargs)

        # TLS 1.3 post-handshake authentication
        except OpenSSL.SSL.Error as e:
            raise ssl.SSLError("read error: %r" % e)

    def settimeout(self, timeout):
        return self.socket.settimeout(timeout)

    def _send_until_done(self, data):
        while True:
            try:
                return self.connection.send(data)
            except OpenSSL.SSL.WantWriteError:
                if not util.wait_for_write(self.socket, self.socket.gettimeout()):
                    raise timeout()
                continue
            except OpenSSL.SSL.SysCallError as e:
                raise SocketError(str(e))

    def sendall(self, data):
        total_sent = 0
        while total_sent < len(data):
            sent = self._send_until_done(
                data[total_sent : total_sent + SSL_WRITE_BLOCKSIZE]
            )
            total_sent += sent

    def shutdown(self):
        # FIXME rethrow compatible exceptions should we ever use this
        self.connection.shutdown()

    def close(self):
        if self._makefile_refs < 1:
            try:
                self._closed = True
                return self.connection.close()
            except OpenSSL.SSL.Error:
                return
        else:
            self._makefile_refs -= 1

    def getpeercert(self, binary_form=False):
        x509 = self.connection.get_peer_certificate()

        if not x509:
            return x509

        if binary_form:
            return OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, x509)

        return {
            "subject": ((("commonName", x509.get_subject().CN),),),
            "subjectAltName": get_subj_alt_name(x509),
        }

    def version(self):
        return self.connection.get_protocol_version_name()

    def _reuse(self):
        self._makefile_refs += 1

    def _drop(self):
        if self._makefile_refs < 1:
            self.close()
        else:
            self._makefile_refs -= 1


if _fileobject:  # Platform-specific: Python 2

    def makefile(self, mode, bufsize=-1):
        self._makefile_refs += 1
        return _fileobject(self, mode, bufsize, close=True)

else:  # Platform-specific: Python 3
    makefile = backport_makefile

WrappedSocket.makefile = makefile


class PyOpenSSLContext(object):
    """
    I am a wrapper class for the PyOpenSSL ``Context`` object. I am responsible
    for translating the interface of the standard library ``SSLContext`` object
    to calls into PyOpenSSL.
    """

    def __init__(self, protocol):
        self.protocol = _openssl_versions[protocol]
        self._ctx = OpenSSL.SSL.Context(self.protocol)
        self._options = 0
        self.check_hostname = False

    @property
    def options(self):
        return self._options

    @options.setter
    def options(self, value):
        self._options = value
        self._ctx.set_options(value)

    @property
    def verify_mode(self):
        return _openssl_to_stdlib_verify[self._ctx.get_verify_mode()]

    @verify_mode.setter
    def verify_mode(self, value):
        self._ctx.set_verify(_stdlib_to_openssl_verify[value], _verify_callback)

    def set_default_verify_paths(self):
        self._ctx.set_default_verify_paths()

    def set_ciphers(self, ciphers):
        if isinstance(ciphers, six.text_type):
            ciphers = ciphers.encode("utf-8")
        self._ctx.set_cipher_list(ciphers)

    def load_verify_locations(self, cafile=None, capath=None, cadata=None):
        if cafile is not None:
            cafile = cafile.encode("utf-8")
        if capath is not None:
            capath = capath.encode("utf-8")
        try:
            self._ctx.load_verify_locations(cafile, capath)
            if cadata is not None:
                self._ctx.load_verify_locations(BytesIO(cadata))
        except OpenSSL.SSL.Error as e:
            raise ssl.SSLError("unable to load trusted certificates: %r" % e)

    def load_cert_chain(self, certfile, keyfile=None, password=None):
        self._ctx.use_certificate_chain_file(certfile)
        if password is not None:
            if not isinstance(password, six.binary_type):
                password = password.encode("utf-8")
            self._ctx.set_passwd_cb(lambda *_: password)
        self._ctx.use_privatekey_file(keyfile or certfile)

    def set_alpn_protocols(self, protocols):
        protocols = [six.ensure_binary(p) for p in protocols]
        return self._ctx.set_alpn_protos(protocols)

    def wrap_socket(
        self,
        sock,
        server_side=False,
        do_handshake_on_connect=True,
        suppress_ragged_eofs=True,
        server_hostname=None,
    ):
        cnx = OpenSSL.SSL.Connection(self._ctx, sock)

        if isinstance(server_hostname, six.text_type):  # Platform-specific: Python 3
            server_hostname = server_hostname.encode("utf-8")

        if server_hostname is not None:
            cnx.set_tlsext_host_name(server_hostname)

        cnx.set_connect_state()

        while True:
            try:
                cnx.do_handshake()
            except OpenSSL.SSL.WantReadError:
                if not util.wait_for_read(sock, sock.gettimeout()):
                    raise timeout("select timed out")
                continue
            except OpenSSL.SSL.Error as e:
                raise ssl.SSLError("bad handshake: %r" % e)
            break

        return WrappedSocket(cnx, sock)


def _verify_callback(cnx, x509, err_no, err_depth, return_code):
    return err_no == 0
python3.12/site-packages/pip/_vendor/urllib3/contrib/__init__.py000064400000000000151732702440020455 0ustar00python3.12/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py000064400000001675151732702440022606 0ustar00"""
This module provides means to detect the App Engine environment.
"""

import os


def is_appengine():
    return is_local_appengine() or is_prod_appengine()


def is_appengine_sandbox():
    """Reports if the app is running in the first generation sandbox.

    The second generation runtimes are technically still in a sandbox, but it
    is much less restrictive, so generally you shouldn't need to check for it.
    see https://cloud.google.com/appengine/docs/standard/runtimes
    """
    return is_appengine() and os.environ["APPENGINE_RUNTIME"] == "python27"


def is_local_appengine():
    return "APPENGINE_RUNTIME" in os.environ and os.environ.get(
        "SERVER_SOFTWARE", ""
    ).startswith("Development/")


def is_prod_appengine():
    return "APPENGINE_RUNTIME" in os.environ and os.environ.get(
        "SERVER_SOFTWARE", ""
    ).startswith("Google App Engine/")


def is_prod_appengine_mvms():
    """Deprecated."""
    return False
site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/__init__.cpython-312.pyc000064400000000410151732702440030346 0ustar00python3.12�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py�<module>rs�rsite-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/bindings.cpython-312.pyc000064400000042104151732702440030412 0ustar00python3.12�

R`i�D�
�L�dZddlmZddlZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZddlmZej*�dk7red	��ej.�dZeeeej9d
���Zedkreded�d
ed
����d�Zedd�Z edd�Z!eZ"eZ#eZ$eZ%eZ&eZ'eZ(eZ)eZ*eZ+eZ,ee+�Z-eZ.eZ/ee%�Z0ee&�Z1ee'�Z2ee(�Z3ee)�Z4eZ5eZ6eZ7ee�Z8eZ9eZ:ee�Z;eZ<eZ=ee�Z>eZ?eZ@ee�ZAee�ZBeZCeZDeZEeZFeZGeZH	e0e1ee9�ee:�e<ee=�e>ee2�ge j�_Je/e j�_Kge j�_Je,e j�_Kge j�_Je,e j�_Kge j�_Je,e j�_Ke.e0ge j�_Je8e j�_Ke8ge j�_Je0e j�_Ke/ege j�_Je1e j�_Ke-e8ee;�ge j�_Je/e j�_Ke
eee"eee>�ge j�_Je/e j�_Ke>ge j�_Je/e j�_Ke0e4ee2�ge j�_Je/e j�_Kee/eCeee
��ZVee/eCee	�ee
��ZWeAeVeWge j�_Je/e j�_KeAe
e
ge j�_Je/e j�_KeAe2ge j�_Je/e j�_KeAe-e"ge j�_Je/e j�_KeAeCge j�_Je/e j�_KeAe
e
ge j�_Je/e j�_KeAge j�_Je/e j�_KeAe
e
ee
�ge j�_Je/e j�_KeAe
e
ee
�ge j�_Je/e j�_KeAge j�_Je/e j�_KeAee
�ge j�_Je/e j�_KeAee@�ee
�ge j�_Je/e j�_KeAee@�e
ge j�_Je/e j�_KeAee
�ge j�_fe/e j�_KeAee@�ee
�ge j�_Je/e j�_KeAee@�ge j�_Je/e j�_KeAee?�ge j�_Je/e j�_KeAeeB�ge j�_Je/e j�_KeBe2ge j�_Je/e j�_KeBe"ge j�_me/e j�_KeBeeD�ge j�_Je/e j�_KeBge j�_Je#e j�_KeBe#ge j�_Je8e j�_Ke.eFeGge j�_JeAe j�_KeAeHe"ge j�_Je/e j�_KeAe?ge j�_Je/e j�_KeAe?ge j�_Je/e j�_K	eAe2ge j�_Je/e j�_Ke/ege j�_Je1e j�_KeVe _VeWe _WeAe _Ae?e _?e@e _@e;e _;e>e _>eBe _BeDe _De9e _9e/e _/e1j�e d�e _xe1j�e d�e _ye-ge!j�_Je-e!j�_Ke-ge!j�_Jde!j�_Ke-ge!j�_Je,e!j�_Ke.e
e$ge!j�_Je1e!j�_Ke1e$ge!j�_Je
e!j�_Ke1e
e#e$ge!j�_Jee!j�_Ke.e
e#ge!�j_Je0e!�j_Ke0ge!�j_Je#e!�j_Ke0ge!�j_Jee!�j_Ke.ee-�ee-�e#e6e7ge!�j_Je4e!�j_Ke4e-ge!�j_Je-e!�j_Ke.ee-�e#e5ge!�j
_Je2e!�j
_Ke.e#e5ge!�j_Je3e!�j_Ke3ege!�j_Jde!�j_Ke2ge!�j_Je#e!�j_Ke2e#ge!�j_Jee!�j_Ke.j�e!d�e!_�ej�e!d�e!_�ej�e!d�e!_�ej�e!d�e!_�e-e!_-e2e!_2e1e!_1e4e!_4Gd�de��Z�Gd�de��Z�y#ev$rY���wxYw#ev$r	ed��wxYw)ay
This module uses ctypes to bind a whole bunch of functions and constants from
SecureTransport. The goal here is to provide the low-level API to
SecureTransport. These are essentially the C-level functions and constants, and
they're pretty gross to work with.

This code is a bastardised version of the code found in Will Bond's oscrypto
library. An enormous debt is owed to him for blazing this trail for us. For
that reason, this code should be considered to be covered both by urllib3's
license and by oscrypto's:

    Copyright (c) 2015-2016 Will Bond <will@wbond.net>

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.
�)�absolute_importN)�CDLL�	CFUNCTYPE�POINTER�c_bool�c_byte�c_char_p�c_int32�c_long�c_size_t�c_uint32�c_ulong�c_void_p)�find_library�)�
raise_from�DarwinzOnly macOS is supported�.)�
�z,Only OS X 10.8 and newer are supported, not �c��	tdk\r|}nt|�}|st�t|d��S#t$rt	td|z�d�YywxYw)z:Loads a CDLL by name, falling back to known path on 10.16+)r�T)�	use_errnozThe library %s failed to loadN)�version_infor�OSErrorrr�ImportError)�name�macos10_16_path�paths   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py�	load_cdllr"As\��N��8�#�"�D���%�D���M��D�D�)�)���N��;�>��E�F��M�N�s�+.�!A�A�Securityz6/System/Library/Frameworks/Security.framework/Security�CoreFoundationzB/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation�kSecImportExportPassphrase�kSecImportItemIdentity�kCFAllocatorDefault�kCFTypeArrayCallBacks�kCFTypeDictionaryKeyCallBacks�kCFTypeDictionaryValueCallBackszError initializing ctypesc� �eZdZdZed�Zy)�CFConstz_
    A class object that acts as essentially a namespace for CoreFoundation
    constants.
    iN)�__name__�
__module__�__qualname__�__doc__�CFStringEncoding�kCFStringEncodingUTF8��r!r,r,�s���
-�Z�8�r4r,c�(�eZdZdZdZdZdZdZdZdZ	dZ
d	ZdZdZ
dZdZdZd
ZdZdZdZdZd
ZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(d Z)d!Z*d"Z+d#Z,d$Z-d%Z.d&Z/d'Z0d(Z1d)Z2d*Z3d+Z4d,Z5d-Z6d.Z7d/Z8d0Z9d1Z:d2Z;d3Z<d4Z=d5Z>d6Z?d7Z@d8ZAd9ZBd:ZCd;ZDd<ZEd=ZFd>ZGd?ZHd@ZIyA)B�
SecurityConstzU
    A class object that acts as essentially a namespace for Security constants.
    rr���rri�r��i���i���i���i���i���i���i���i���i���i���i���i���i���i���i���i���i���i���i ���iQ���i,���iR���i,�i0�i+�i/�i��i����i$�i(�i
�i��k�9i#�i'�i	�i��g�3���=�<�5�/iiiiN)Jr-r.r/r0�"kSSLSessionOptionBreakOnServerAuth�
kSSLProtocol2�
kSSLProtocol3�
kTLSProtocol1�kTLSProtocol11�kTLSProtocol12�kTLSProtocol13�kTLSProtocolMaxSupported�kSSLClientSide�kSSLStreamType�kSecFormatPEMSequence�kSecTrustResultInvalid�kSecTrustResultProceed�kSecTrustResultDeny�kSecTrustResultUnspecified�&kSecTrustResultRecoverableTrustFailure� kSecTrustResultFatalTrustFailure�kSecTrustResultOtherError�errSSLProtocol�errSSLWouldBlock�errSSLClosedGraceful�errSSLClosedNoNotify�errSSLClosedAbort�errSSLXCertChainInvalid�errSSLCrypto�errSSLInternal�errSSLCertExpired�errSSLCertNotYetValid�errSSLUnknownRootCert�errSSLNoRootCert�errSSLHostNameMismatch�errSSLPeerHandshakeFail�errSSLPeerUserCancelled�errSSLWeakPeerEphemeralDHKey�errSSLServerAuthCompleted�errSSLRecordOverflow�errSecVerifyFailed�errSecNoTrustSettings�errSecItemNotFound�errSecInvalidTrustSettings�'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384�%TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384�'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256�%TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256�-TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256�+TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256�#TLS_DHE_RSA_WITH_AES_256_GCM_SHA384�#TLS_DHE_RSA_WITH_AES_128_GCM_SHA256�'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384�%TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384�$TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA�"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA�#TLS_DHE_RSA_WITH_AES_256_CBC_SHA256� TLS_DHE_RSA_WITH_AES_256_CBC_SHA�'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256�%TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256�$TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA�"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA�#TLS_DHE_RSA_WITH_AES_128_CBC_SHA256� TLS_DHE_RSA_WITH_AES_128_CBC_SHA�TLS_RSA_WITH_AES_256_GCM_SHA384�TLS_RSA_WITH_AES_128_GCM_SHA256�TLS_RSA_WITH_AES_256_CBC_SHA256�TLS_RSA_WITH_AES_128_CBC_SHA256�TLS_RSA_WITH_AES_256_CBC_SHA�TLS_RSA_WITH_AES_128_CBC_SHA�TLS_AES_128_GCM_SHA256�TLS_AES_256_GCM_SHA384�TLS_AES_128_CCM_8_SHA256�TLS_AES_128_CCM_SHA256r3r4r!r6r6�s����*+�&��M��M��M��N��N��N�"���N��N���������!"��-.�*�'(�$� !���N��� �� ����#���L��N���!��!����"��#��#��#(� � %�� ����"����!'��/5�+�,2�)�.4�+�,2�)�4:�1�28�/�*0�'�*0�'�.4�+�,2�)�+1�(�)/�&�*0�'�'-�$�.4�+�,2�)�+1�(�)/�&�*0�'�'-�$�&,�#�&,�#�&,�#�&,�#�#)� �#)� �#��#��%��#�r4r6)�r0�
__future__r�platform�ctypesrrrrrr	r
rrr
rr�ctypes.utilr�packages.sixr�systemr�mac_ver�version�tuple�map�int�splitrrr"r#r$�Boolean�CFIndexr1�CFData�CFString�CFArray�CFMutableArray�CFDictionary�CFError�CFType�CFTypeID�	CFTypeRef�CFAllocatorRef�OSStatus�	CFDataRef�CFStringRef�
CFArrayRef�CFMutableArrayRef�CFDictionaryRef�CFArrayCallBacks�CFDictionaryKeyCallBacks�CFDictionaryValueCallBacks�SecCertificateRef�SecExternalFormat�SecExternalItemType�SecIdentityRef�SecItemImportExportFlags� SecItemImportExportKeyParameters�SecKeychainRef�SSLProtocol�SSLCipherSuite�
SSLContextRef�SecTrustRef�SSLConnectionRef�SecTrustResultType�SecTrustOptionFlags�SSLProtocolSide�SSLConnectionType�SSLSessionOption�
SecItemImport�argtypes�restype�SecCertificateGetTypeID�SecIdentityGetTypeID�SecKeyGetTypeID�SecCertificateCreateWithData�SecCertificateCopyData�SecCopyErrorMessageString� SecIdentityCreateWithCertificate�SecKeychainCreate�SecKeychainDelete�SecPKCS12Import�SSLReadFunc�SSLWriteFunc�
SSLSetIOFuncs�SSLSetPeerID�SSLSetCertificate�SSLSetCertificateAuthorities�SSLSetConnection�SSLSetPeerDomainName�SSLHandshake�SSLRead�SSLWrite�SSLClose�SSLGetNumberSupportedCiphers�SSLGetSupportedCiphers�SSLSetEnabledCiphers�SSLGetNumberEnabledCiphers�argtype�SSLGetEnabledCiphers�SSLGetNegotiatedCipher�SSLGetNegotiatedProtocolVersion�SSLCopyPeerTrust�SecTrustSetAnchorCertificates�!SecTrustSetAnchorCertificatesOnly�	argstypes�SecTrustEvaluate�SecTrustGetCertificateCount�SecTrustGetCertificateAtIndex�SSLCreateContext�SSLSetSessionOption�SSLSetProtocolVersionMin�SSLSetProtocolVersionMax�SSLSetALPNProtocols�AttributeError�in_dllr%r&�CFRetain�	CFRelease�CFGetTypeID�CFStringCreateWithCString�CFStringGetCStringPtr�CFStringGetCString�CFDataCreate�CFDataGetLength�CFDataGetBytePtr�CFDictionaryCreate�CFDictionaryGetValue�
CFArrayCreate�CFArrayCreateMutable�CFArrayAppendValue�CFArrayGetCount�CFArrayGetValueAtIndexr'r(r)r*�objectr,r6r3r4r!�<module>rs����>'��
�
�
�
�%�&��8�?�?��� �
�/�
0�0�
�(�
�
�
�Q�
���S��g�m�m�C�0�1�2���'��
���?�L��O�	-���
N� ��H�����H�����
����	����
������
��	�����F�O�	������F�O�	��h���
�W�
�
��N�+���,�'����#��%���H�%��������"��#��#+� ���"��������!�
��h���������������]3����!�"��#�$� ��0�1���
��	'�H���#�&.�H���"�02�H�$�$�-�/7�H�$�$�,�-/�H�!�!�*�,4�H�!�!�)�(*�H���%�'/�H���$�6D�i�5P�H�)�)�2�4E�H�)�)�1�0A�/B�H�#�#�,�.7�H�#�#�+�3;�X�2F�H�&�&�/�1<�H�&�&�.�	�����:�H�-�-�6�
9A�H�-�-�5�	��������
+�H���'�*2�H���&�+9�*:�H���'�)1�H���&�	���
��)�H���%�
(0�H���$��H�&6��'�(�BS�T�K���"�G�F�O�W�X�5F��L�(5�k�<�&P�H���#�%-�H���"�&3�X�x�%H�H���"�$,�H���!�+8�*�*E�H���'�)1�H���&�6C�Y�PW�5X�H�)�)�2�4<�H�)�)�1�*7�9I�)J�H���&�(0�H���%�.;�X�x�-P�H�!�!�*�,4�H�!�!�)�&3�_�H���"�$,�H���!�!.��(�G�H�DU� V�H����'�H����"/��8�W�X�EV�!W�H���� (�H����"/��H���� (�H����6C�W�X�EV�5W�H�)�)�2�4<�H�)�)�1�	�������0�H�#�#�,�
/7�H�#�#�+�	�����.�H�!�!�*�
-5�H�!�!�)�3@�'�(�BS�2T�H�'�'�/�2:�H�'�'�/�	�������.�H�!�!�*�
-5�H�!�!�)�0=�w�~�?V�/W�H�#�#�,�.6�H�#�#�+�	����9�H�,�,�5�8@�H�,�,�4�*7���9M�)N�H���&�(0�H���%�7B�J�6O�H�*�*�3�5=�H�*�*�2�<G��;Q�H�.�.�8�9A�H�.�.�6�*5�w�?Q�7R�)S�H���&�(0�H���%�5@�M�H�(�(�1�3:�H�(�(�0�7B�G�6L�H�*�*�3�5F�H�*�*�2�	���*�H���&�
)6�H���%�-:�<L�g�,V�H� � �)�+3�H� � �(�2?��1M�H�%�%�.�08�H�%�%�-�2?��1M�H�%�%�.�08�H�%�%�-�
�1>�
�0K��$�$�-�/7��$�$�,�
4<�X�2F�H�&�&�/�1<�H�&�&�.�&�H��(�H��*�H��&�H��,�H��,�H��,�H��&�H��"4�H��!2�H�� �H��*5�*<�*<��.�+�H�'�'2�&8�&8��*�'�H�#�
)2�{�N���$�&/�N���#�)2��N���%�'+�N���$�+4�+�N���'�)1�N���&�	���9�N�,�,�5�
8C�N�,�,�4�5@�BR�4S�N�(�(�1�3;�N�(�(�0�	����	2�N�%�%�.�17�N�%�%�-�,:�H�g�+N�N���(�*3�N���'�/8�k�N�"�"�+�-4�N�"�"�*�09�{�N�#�#�,�.6�N�#�#�+�	��	���	��� �"�
2�N�%�%�.�1@�N�%�%�-�4C�Y�3O�N�'�'�0�2;�N�'�'�/�	��	����	-�N� � �)�,6�N� � �(�	���4�N�'�'�0�
3D�N�'�'�/�2C�X�1N�N�%�%�.�04�N�%�%�-�/9�l�N�"�"�+�-4�N�"�"�*�6@�'�5J�N�)�)�2�4<�N�)�)�1�)7�)>�)>��-�*�N�&�,;�8�?�?��/�,�N�(�4C�8�?�?��7�4�N�0�6E�X�_�_��9�6�N�2� )�N�� *�N��!,�N��%4�N�"�9�f�9�W$�F�W$��G�
��
��l	�3�
�1�
2�2�3�s2�Xl�	$l	�-Nl�	l�l�l�l�l#site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/low_level.cpython-312.pyc000064400000034734151732702450030620 0ustar00python3.12�

R`ib6���dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZejdej�Zd�Zd�Zd�Zd	�Zd
�Zdd�Zd�Zd
�Zd�Zd�Zd�Zd�Zdddddd�Zd�Zy)a�
Low-level helpers for the SecureTransport bindings.

These are Python functions that are not directly related to the high-level APIs
but are necessary to get them to work. They include a whole bunch of low-level
CoreFoundation messing about and memory management. The concerns in this module
are almost entirely about trying to avoid memory leaks and providing
appropriate and useful assistance to the higher-level code.
�N�)�CFConst�CoreFoundation�Securitys;-----BEGIN CERTIFICATE-----
(.*?)
-----END CERTIFICATE-----c�^�tjtj|t|��S)zv
    Given a bytestring, create a CFData object from it. This CFData object must
    be CFReleased by the caller.
    )r�CFDataCreate�kCFAllocatorDefault�len)�
bytestrings ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py�_cf_data_from_bytesr
s(��
�&�&��*�*�J��J����c��t|�}d�|D�}d�|D�}tj|z|�}tj|z|�}tjtj|||tj
tj�S)zK
    Given a list of Python tuples, create an associated CFDictionary.
    c3�&K�|]	}|d���y�w)rN���.0�ts  r�	<genexpr>z-_cf_dictionary_from_tuples.<locals>.<genexpr>,s����!�&�Q�A�a�D�&���c3�&K�|]	}|d���y�w)rNrrs  rrz-_cf_dictionary_from_tuples.<locals>.<genexpr>-s����
#�F�q�a��d�F�r)r
r�	CFTypeRef�CFDictionaryCreater	�kCFTypeDictionaryKeyCallBacks�kCFTypeDictionaryValueCallBacks)�tuples�dictionary_size�keys�values�cf_keys�	cf_valuess      r�_cf_dictionary_from_tuplesr"%s����&�k�O�"�&�!�D�
#�F�
#�F��'�'�/�9�D�A�G��)�)�O�;�f�E�I��,�,��*�*�����4�4��6�6�
�rc��tj|�}tjtj|t
j�}|S)zi
    Given a Python binary data, create a CFString.
    The string must be CFReleased by the caller.
    )�ctypes�c_char_pr�CFStringCreateWithCStringr	r�kCFStringEncodingUTF8)�py_bstr�c_str�cf_strs   r�_cfstrr+;s>��

�O�O�G�$�E�
�
5�
5��*�*�
��%�%��F�
�Mrc��d}	tjtjdtjtj
��}|st
d��|D]F}t|�}|st
d��	tj||�tj|��H	|S#tj|�wxYw#t$r4}|rtj|�tjd|����d}~wwxYw)z�
    Given a list of Python binary data, create an associated CFMutableArray.
    The array must be CFReleased by the caller.

    Raises an ssl.SSLError on failure.
    Nr�Unable to allocate memory!zUnable to allocate array: )
r�CFArrayCreateMutabler	r$�byref�kCFTypeArrayCallBacks�MemoryErrorr+�CFArrayAppendValue�	CFRelease�
BaseException�ssl�SSLError)�lst�cf_arr�itemr*�es     r�_create_cfstring_arrayr;Is����F�B��4�4��.�.�
��L�L��=�=�>�
��
��:�;�;��D��D�\�F��!�">�?�?�
1��1�1�&�&�A��(�(��0���M���(�(��0���B���$�$�V�,��l�l�Q�@�A�A��B�s0�A0B?�5B%�B?�%B<�<B?�?	C<�/C7�7C<c��tj|tjtj��}t	j
|tj�}|�Ttjd�}t	j||dtj�}|std��|j}|�|jd�}|S)z�
    Creates a Unicode string from a CFString object. Used entirely for error
    reporting.

    Yes, it annoys me quite a lot that this function is this complex.
    iz'Error copying C string from CFStringRef�utf-8)
r$�cast�POINTER�c_void_pr�CFStringGetCStringPtrrr'�create_string_buffer�CFStringGetCString�OSError�value�decode)rE�value_as_void_p�string�buffer�results     r�_cf_string_to_unicoderKhs����k�k�%�������)H�I�O�
�
1�
1���6�6��F��~��,�,�T�2���2�2��V�T�7�+H�+H�
����C�D�D�����
�����w�'���Mrc���|dk(rytj|d�}t|�}tj|�|�|dk(rd|z}|�t
j}||��)z[
    Checks the return code and throws an exception if there is an error to
    report
    rN�zOSStatus %s)r�SecCopyErrorMessageStringrKrr3r5r6)�error�exception_class�cf_error_string�outputs    r�_assert_no_errorrS�sg��

��z���8�8���E�O�
"�?�
3�F����_�-�
�~��3���%�'�����,�,��
�&�
!�!rc�6�|jdd�}tj|�D�cgc]&}tj|jd����(}}|st
jd��tjtjdtjtj��}|st
jd��	|D]�}t|�}|st
jd��tj tj|�}tj"|�|st
jd��tj$||�tj"|���	|Scc}w#t&$rtj"|��wxYw)z�
    Given a bundle of certs in PEM format, turns them into a CFArray of certs
    that can be used to validate a cert chain.
    s
�
rzNo root certificates specifiedrr-zUnable to build cert object!)�replace�
_PEM_CERTS_RE�finditer�base64�	b64decode�groupr5r6rr.r	r$r/r0r
r�SecCertificateCreateWithDatar3r2�	Exception)�
pem_bundle�match�	der_certs�
cert_array�	der_bytes�certdata�certs       r�_cert_array_from_pemre�sf���#�#�G�U�3�J�7D�6L�6L�Z�6X��6X�U�������Q��(�6X�����l�l�;�<�<��4�4��*�*�	����^�9�9�:��J�
��l�l�7�8�8��"�I�*�9�5�H���l�l�#?�@�@��8�8��2�2�H��D�
�$�$�X�.���l�l�#A�B�B��-�-�j�$�?��$�$�T�*�#�(���G��8��	� � ��,�
��s�+E3�B$E8�8 Fc�Z�tj�}tj|�|k(S)z=
    Returns True if a given CFTypeRef is a certificate.
    )r�SecCertificateGetTypeIDr�CFGetTypeID�r9�expecteds  r�_is_certrk�s(���/�/�1�H��%�%�d�+�x�7�7rc�Z�tj�}tj|�|k(S)z;
    Returns True if a given CFTypeRef is an identity.
    )r�SecIdentityGetTypeIDrrhris  r�_is_identityrn�s(���,�,�.�H��%�%�d�+�x�7�7rc
���tjd�}tj|dd�j	d�}tj|dd�}tj�}tjj||�jd�}tj�}tj|t|�|ddtj|��}t!|�||fS)a�
    This function creates a temporary Mac keychain that we can use to work with
    credentials. This keychain uses a one-time password and a temporary file to
    store the data. We expect to have one keychain per socket. The returned
    SecKeychainRef must be freed by the caller, including calling
    SecKeychainDelete.

    Returns a tuple of the SecKeychainRef and the path to the temporary
    directory that contains it.
    �(N�r=F)�os�urandomrY�	b16encoderF�tempfile�mkdtemp�path�join�encoder�SecKeychainRef�SecKeychainCreater
r$r/rS)�random_bytes�filename�password�
tempdirectory�
keychain_path�keychain�statuss       r�_temporary_keychainr��s���"�:�:�b�>�L�����R�a� 0�1�8�8��A�H�����Q�R� 0�1�H��$�$�&�M��G�G�L�L���9�@�@��I�M��&�&�(�H�
�
'�
'��s�8�}�h��t�V�\�\�(�=S��F��V���]�"�"rc��g}g}d}t|d�5}|j�}ddd�	tjtjt|��}tj�}tj|ddddd|tj|��}t|�tj|�}	t|	�D]�}
tj||
�}tj|tj �}t#|�r'tj$|�|j'|��ot)|�s�{tj$|�|j'|���	|rtj*|�tj*|�||fS#1swY��{xYw#|rtj*|�tj*�wxYw)z�
    Given a single file, loads all the trust objects from it into arrays and
    the keychain.
    Returns a tuple of lists: the first list is a list of identities, the
    second a list of certs.
    N�rbr)�open�readrrr	r
�
CFArrayRefr�
SecItemImportr$r/rS�CFArrayGetCount�range�CFArrayGetValueAtIndexr>rrk�CFRetain�appendrnr3)r�rw�certificates�
identities�result_array�f�raw_filedata�filedatarJ�result_count�indexr9s            r�_load_items_from_filer��s����L��J��L�	
�d�D�	�Q��v�v�x��
�$+�!�.�.��.�.��c�,�>O�
��&�0�0�2���'�'�����
����L�L��&�	
��	�� �&�5�5�l�C���<�(�E�!�8�8��u�M�D��;�;�t�^�%=�%=�>�D���~��'�'��-��#�#�D�)��d�#��'�'��-��!�!�$�'�)���$�$�\�2�� � ��*���%�%�S
�	��H��$�$�\�2�� � ��*�s�F�DF*�(F*�F'�*.Gc�P�g}g}d�|D�}	|D]3}t||�\}}|j|�|j|��5|s�tj�}tj||dtj|��}t|�|j|�tj|jd��tjtjdtjtj��}	tj ||�D]}
tj"|	|
��|	tj ||�D]}tj|��S#tj ||�D]}tj|��wxYw)z�
    Load certificates and maybe keys from a number of files. Has the end goal
    of returning a CFArray containing one SecIdentityRef, and then zero or more
    SecCertificateRef objects, suitable for use as a client certificate trust
    chain.
    c3�&K�|]	}|s�|���y�w�Nr)rrws  rrz*_load_client_cert_chain.<locals>.<genexpr>Rs����,�e�d�t�T�e�s��r)r��extendr�SecIdentityRef� SecIdentityCreateWithCertificater$r/rSr�rr3�popr.r	r0�	itertools�chainr2)r��pathsr�r��	file_path�new_identities�	new_certs�new_identityr��trust_chainr9�objs            r�_load_client_cert_chainr�.sf��@�L��J�
-�e�,�E�"*��I�(=�h�	�(R�%�N�I����n�-����	�*���#�2�2�4�L��>�>��,�q�/�6�<�<��+E��F�
�V�$����l�+�
�$�$�\�%5�%5�a�%8�9�%�9�9��.�.�
��L�L��=�=�>�
��
�O�O�J��=�D�
�-�-�k�4�@�>�
��?�?�:�|�<�C��$�$�S�)�=��9�?�?�:�|�<�C��$�$�S�)�=�s�D3E3�32F%)r�)�r)r�r)r�r�)r�r�)�SSLv2�SSLv3�TLSv1zTLSv1.1zTLSv1.2c��t|\}}d}d}tjd||�}t|�}d}tjd||||�|z}|S)z6
    Builds a TLS alert record for an unknown CA.
    r��0z>BB�z>BBBH)�TLS_PROTOCOL_VERSIONS�struct�packr
)	�version�ver_maj�ver_min�severity_fatal�description_unknown_ca�msg�msg_len�record_type_alert�records	         r�_build_tls_unknown_ca_alertr��sb��-�W�5��G�W��N�!��
�+�+�e�^�-C�
D�C��#�h�G���
�[�[��"3�W�g�w�
O�RU�
U�F��Mrr�)�__doc__rYr$r�rr�rer5r�ru�bindingsrrr�compile�DOTALLrWr
r"r+r;rKrSrerkrnr�r�r�r�r�rrr�<module>r�s�����
��	�	�
�
��7�7���
�
�D�b�i�i��
�
��,��>�2"�*+�\8�8� #�F4&�nH*�X�
�
�����rpython3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py000064400000000000151732702450024060 0ustar00python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py000064400000033142151732702450024326 0ustar00"""
Low-level helpers for the SecureTransport bindings.

These are Python functions that are not directly related to the high-level APIs
but are necessary to get them to work. They include a whole bunch of low-level
CoreFoundation messing about and memory management. The concerns in this module
are almost entirely about trying to avoid memory leaks and providing
appropriate and useful assistance to the higher-level code.
"""
import base64
import ctypes
import itertools
import os
import re
import ssl
import struct
import tempfile

from .bindings import CFConst, CoreFoundation, Security

# This regular expression is used to grab PEM data out of a PEM bundle.
_PEM_CERTS_RE = re.compile(
    b"-----BEGIN CERTIFICATE-----\n(.*?)\n-----END CERTIFICATE-----", re.DOTALL
)


def _cf_data_from_bytes(bytestring):
    """
    Given a bytestring, create a CFData object from it. This CFData object must
    be CFReleased by the caller.
    """
    return CoreFoundation.CFDataCreate(
        CoreFoundation.kCFAllocatorDefault, bytestring, len(bytestring)
    )


def _cf_dictionary_from_tuples(tuples):
    """
    Given a list of Python tuples, create an associated CFDictionary.
    """
    dictionary_size = len(tuples)

    # We need to get the dictionary keys and values out in the same order.
    keys = (t[0] for t in tuples)
    values = (t[1] for t in tuples)
    cf_keys = (CoreFoundation.CFTypeRef * dictionary_size)(*keys)
    cf_values = (CoreFoundation.CFTypeRef * dictionary_size)(*values)

    return CoreFoundation.CFDictionaryCreate(
        CoreFoundation.kCFAllocatorDefault,
        cf_keys,
        cf_values,
        dictionary_size,
        CoreFoundation.kCFTypeDictionaryKeyCallBacks,
        CoreFoundation.kCFTypeDictionaryValueCallBacks,
    )


def _cfstr(py_bstr):
    """
    Given a Python binary data, create a CFString.
    The string must be CFReleased by the caller.
    """
    c_str = ctypes.c_char_p(py_bstr)
    cf_str = CoreFoundation.CFStringCreateWithCString(
        CoreFoundation.kCFAllocatorDefault,
        c_str,
        CFConst.kCFStringEncodingUTF8,
    )
    return cf_str


def _create_cfstring_array(lst):
    """
    Given a list of Python binary data, create an associated CFMutableArray.
    The array must be CFReleased by the caller.

    Raises an ssl.SSLError on failure.
    """
    cf_arr = None
    try:
        cf_arr = CoreFoundation.CFArrayCreateMutable(
            CoreFoundation.kCFAllocatorDefault,
            0,
            ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks),
        )
        if not cf_arr:
            raise MemoryError("Unable to allocate memory!")
        for item in lst:
            cf_str = _cfstr(item)
            if not cf_str:
                raise MemoryError("Unable to allocate memory!")
            try:
                CoreFoundation.CFArrayAppendValue(cf_arr, cf_str)
            finally:
                CoreFoundation.CFRelease(cf_str)
    except BaseException as e:
        if cf_arr:
            CoreFoundation.CFRelease(cf_arr)
        raise ssl.SSLError("Unable to allocate array: %s" % (e,))
    return cf_arr


def _cf_string_to_unicode(value):
    """
    Creates a Unicode string from a CFString object. Used entirely for error
    reporting.

    Yes, it annoys me quite a lot that this function is this complex.
    """
    value_as_void_p = ctypes.cast(value, ctypes.POINTER(ctypes.c_void_p))

    string = CoreFoundation.CFStringGetCStringPtr(
        value_as_void_p, CFConst.kCFStringEncodingUTF8
    )
    if string is None:
        buffer = ctypes.create_string_buffer(1024)
        result = CoreFoundation.CFStringGetCString(
            value_as_void_p, buffer, 1024, CFConst.kCFStringEncodingUTF8
        )
        if not result:
            raise OSError("Error copying C string from CFStringRef")
        string = buffer.value
    if string is not None:
        string = string.decode("utf-8")
    return string


def _assert_no_error(error, exception_class=None):
    """
    Checks the return code and throws an exception if there is an error to
    report
    """
    if error == 0:
        return

    cf_error_string = Security.SecCopyErrorMessageString(error, None)
    output = _cf_string_to_unicode(cf_error_string)
    CoreFoundation.CFRelease(cf_error_string)

    if output is None or output == u"":
        output = u"OSStatus %s" % error

    if exception_class is None:
        exception_class = ssl.SSLError

    raise exception_class(output)


def _cert_array_from_pem(pem_bundle):
    """
    Given a bundle of certs in PEM format, turns them into a CFArray of certs
    that can be used to validate a cert chain.
    """
    # Normalize the PEM bundle's line endings.
    pem_bundle = pem_bundle.replace(b"\r\n", b"\n")

    der_certs = [
        base64.b64decode(match.group(1)) for match in _PEM_CERTS_RE.finditer(pem_bundle)
    ]
    if not der_certs:
        raise ssl.SSLError("No root certificates specified")

    cert_array = CoreFoundation.CFArrayCreateMutable(
        CoreFoundation.kCFAllocatorDefault,
        0,
        ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks),
    )
    if not cert_array:
        raise ssl.SSLError("Unable to allocate memory!")

    try:
        for der_bytes in der_certs:
            certdata = _cf_data_from_bytes(der_bytes)
            if not certdata:
                raise ssl.SSLError("Unable to allocate memory!")
            cert = Security.SecCertificateCreateWithData(
                CoreFoundation.kCFAllocatorDefault, certdata
            )
            CoreFoundation.CFRelease(certdata)
            if not cert:
                raise ssl.SSLError("Unable to build cert object!")

            CoreFoundation.CFArrayAppendValue(cert_array, cert)
            CoreFoundation.CFRelease(cert)
    except Exception:
        # We need to free the array before the exception bubbles further.
        # We only want to do that if an error occurs: otherwise, the caller
        # should free.
        CoreFoundation.CFRelease(cert_array)
        raise

    return cert_array


def _is_cert(item):
    """
    Returns True if a given CFTypeRef is a certificate.
    """
    expected = Security.SecCertificateGetTypeID()
    return CoreFoundation.CFGetTypeID(item) == expected


def _is_identity(item):
    """
    Returns True if a given CFTypeRef is an identity.
    """
    expected = Security.SecIdentityGetTypeID()
    return CoreFoundation.CFGetTypeID(item) == expected


def _temporary_keychain():
    """
    This function creates a temporary Mac keychain that we can use to work with
    credentials. This keychain uses a one-time password and a temporary file to
    store the data. We expect to have one keychain per socket. The returned
    SecKeychainRef must be freed by the caller, including calling
    SecKeychainDelete.

    Returns a tuple of the SecKeychainRef and the path to the temporary
    directory that contains it.
    """
    # Unfortunately, SecKeychainCreate requires a path to a keychain. This
    # means we cannot use mkstemp to use a generic temporary file. Instead,
    # we're going to create a temporary directory and a filename to use there.
    # This filename will be 8 random bytes expanded into base64. We also need
    # some random bytes to password-protect the keychain we're creating, so we
    # ask for 40 random bytes.
    random_bytes = os.urandom(40)
    filename = base64.b16encode(random_bytes[:8]).decode("utf-8")
    password = base64.b16encode(random_bytes[8:])  # Must be valid UTF-8
    tempdirectory = tempfile.mkdtemp()

    keychain_path = os.path.join(tempdirectory, filename).encode("utf-8")

    # We now want to create the keychain itself.
    keychain = Security.SecKeychainRef()
    status = Security.SecKeychainCreate(
        keychain_path, len(password), password, False, None, ctypes.byref(keychain)
    )
    _assert_no_error(status)

    # Having created the keychain, we want to pass it off to the caller.
    return keychain, tempdirectory


def _load_items_from_file(keychain, path):
    """
    Given a single file, loads all the trust objects from it into arrays and
    the keychain.
    Returns a tuple of lists: the first list is a list of identities, the
    second a list of certs.
    """
    certificates = []
    identities = []
    result_array = None

    with open(path, "rb") as f:
        raw_filedata = f.read()

    try:
        filedata = CoreFoundation.CFDataCreate(
            CoreFoundation.kCFAllocatorDefault, raw_filedata, len(raw_filedata)
        )
        result_array = CoreFoundation.CFArrayRef()
        result = Security.SecItemImport(
            filedata,  # cert data
            None,  # Filename, leaving it out for now
            None,  # What the type of the file is, we don't care
            None,  # what's in the file, we don't care
            0,  # import flags
            None,  # key params, can include passphrase in the future
            keychain,  # The keychain to insert into
            ctypes.byref(result_array),  # Results
        )
        _assert_no_error(result)

        # A CFArray is not very useful to us as an intermediary
        # representation, so we are going to extract the objects we want
        # and then free the array. We don't need to keep hold of keys: the
        # keychain already has them!
        result_count = CoreFoundation.CFArrayGetCount(result_array)
        for index in range(result_count):
            item = CoreFoundation.CFArrayGetValueAtIndex(result_array, index)
            item = ctypes.cast(item, CoreFoundation.CFTypeRef)

            if _is_cert(item):
                CoreFoundation.CFRetain(item)
                certificates.append(item)
            elif _is_identity(item):
                CoreFoundation.CFRetain(item)
                identities.append(item)
    finally:
        if result_array:
            CoreFoundation.CFRelease(result_array)

        CoreFoundation.CFRelease(filedata)

    return (identities, certificates)


def _load_client_cert_chain(keychain, *paths):
    """
    Load certificates and maybe keys from a number of files. Has the end goal
    of returning a CFArray containing one SecIdentityRef, and then zero or more
    SecCertificateRef objects, suitable for use as a client certificate trust
    chain.
    """
    # Ok, the strategy.
    #
    # This relies on knowing that macOS will not give you a SecIdentityRef
    # unless you have imported a key into a keychain. This is a somewhat
    # artificial limitation of macOS (for example, it doesn't necessarily
    # affect iOS), but there is nothing inside Security.framework that lets you
    # get a SecIdentityRef without having a key in a keychain.
    #
    # So the policy here is we take all the files and iterate them in order.
    # Each one will use SecItemImport to have one or more objects loaded from
    # it. We will also point at a keychain that macOS can use to work with the
    # private key.
    #
    # Once we have all the objects, we'll check what we actually have. If we
    # already have a SecIdentityRef in hand, fab: we'll use that. Otherwise,
    # we'll take the first certificate (which we assume to be our leaf) and
    # ask the keychain to give us a SecIdentityRef with that cert's associated
    # key.
    #
    # We'll then return a CFArray containing the trust chain: one
    # SecIdentityRef and then zero-or-more SecCertificateRef objects. The
    # responsibility for freeing this CFArray will be with the caller. This
    # CFArray must remain alive for the entire connection, so in practice it
    # will be stored with a single SSLSocket, along with the reference to the
    # keychain.
    certificates = []
    identities = []

    # Filter out bad paths.
    paths = (path for path in paths if path)

    try:
        for file_path in paths:
            new_identities, new_certs = _load_items_from_file(keychain, file_path)
            identities.extend(new_identities)
            certificates.extend(new_certs)

        # Ok, we have everything. The question is: do we have an identity? If
        # not, we want to grab one from the first cert we have.
        if not identities:
            new_identity = Security.SecIdentityRef()
            status = Security.SecIdentityCreateWithCertificate(
                keychain, certificates[0], ctypes.byref(new_identity)
            )
            _assert_no_error(status)
            identities.append(new_identity)

            # We now want to release the original certificate, as we no longer
            # need it.
            CoreFoundation.CFRelease(certificates.pop(0))

        # We now need to build a new CFArray that holds the trust chain.
        trust_chain = CoreFoundation.CFArrayCreateMutable(
            CoreFoundation.kCFAllocatorDefault,
            0,
            ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks),
        )
        for item in itertools.chain(identities, certificates):
            # ArrayAppendValue does a CFRetain on the item. That's fine,
            # because the finally block will release our other refs to them.
            CoreFoundation.CFArrayAppendValue(trust_chain, item)

        return trust_chain
    finally:
        for obj in itertools.chain(identities, certificates):
            CoreFoundation.CFRelease(obj)


TLS_PROTOCOL_VERSIONS = {
    "SSLv2": (0, 2),
    "SSLv3": (3, 0),
    "TLSv1": (3, 1),
    "TLSv1.1": (3, 2),
    "TLSv1.2": (3, 3),
}


def _build_tls_unknown_ca_alert(version):
    """
    Builds a TLS alert record for an unknown CA.
    """
    ver_maj, ver_min = TLS_PROTOCOL_VERSIONS[version]
    severity_fatal = 0x02
    description_unknown_ca = 0x30
    msg = struct.pack(">BB", severity_fatal, description_unknown_ca)
    msg_len = len(msg)
    record_type_alert = 0x15
    record = struct.pack(">BBBH", record_type_alert, ver_maj, ver_min, msg_len) + msg
    return record
python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py000064400000042340151732702450024133 0ustar00"""
This module uses ctypes to bind a whole bunch of functions and constants from
SecureTransport. The goal here is to provide the low-level API to
SecureTransport. These are essentially the C-level functions and constants, and
they're pretty gross to work with.

This code is a bastardised version of the code found in Will Bond's oscrypto
library. An enormous debt is owed to him for blazing this trail for us. For
that reason, this code should be considered to be covered both by urllib3's
license and by oscrypto's:

    Copyright (c) 2015-2016 Will Bond <will@wbond.net>

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.
"""
from __future__ import absolute_import

import platform
from ctypes import (
    CDLL,
    CFUNCTYPE,
    POINTER,
    c_bool,
    c_byte,
    c_char_p,
    c_int32,
    c_long,
    c_size_t,
    c_uint32,
    c_ulong,
    c_void_p,
)
from ctypes.util import find_library

from ...packages.six import raise_from

if platform.system() != "Darwin":
    raise ImportError("Only macOS is supported")

version = platform.mac_ver()[0]
version_info = tuple(map(int, version.split(".")))
if version_info < (10, 8):
    raise OSError(
        "Only OS X 10.8 and newer are supported, not %s.%s"
        % (version_info[0], version_info[1])
    )


def load_cdll(name, macos10_16_path):
    """Loads a CDLL by name, falling back to known path on 10.16+"""
    try:
        # Big Sur is technically 11 but we use 10.16 due to the Big Sur
        # beta being labeled as 10.16.
        if version_info >= (10, 16):
            path = macos10_16_path
        else:
            path = find_library(name)
        if not path:
            raise OSError  # Caught and reraised as 'ImportError'
        return CDLL(path, use_errno=True)
    except OSError:
        raise_from(ImportError("The library %s failed to load" % name), None)


Security = load_cdll(
    "Security", "/System/Library/Frameworks/Security.framework/Security"
)
CoreFoundation = load_cdll(
    "CoreFoundation",
    "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation",
)


Boolean = c_bool
CFIndex = c_long
CFStringEncoding = c_uint32
CFData = c_void_p
CFString = c_void_p
CFArray = c_void_p
CFMutableArray = c_void_p
CFDictionary = c_void_p
CFError = c_void_p
CFType = c_void_p
CFTypeID = c_ulong

CFTypeRef = POINTER(CFType)
CFAllocatorRef = c_void_p

OSStatus = c_int32

CFDataRef = POINTER(CFData)
CFStringRef = POINTER(CFString)
CFArrayRef = POINTER(CFArray)
CFMutableArrayRef = POINTER(CFMutableArray)
CFDictionaryRef = POINTER(CFDictionary)
CFArrayCallBacks = c_void_p
CFDictionaryKeyCallBacks = c_void_p
CFDictionaryValueCallBacks = c_void_p

SecCertificateRef = POINTER(c_void_p)
SecExternalFormat = c_uint32
SecExternalItemType = c_uint32
SecIdentityRef = POINTER(c_void_p)
SecItemImportExportFlags = c_uint32
SecItemImportExportKeyParameters = c_void_p
SecKeychainRef = POINTER(c_void_p)
SSLProtocol = c_uint32
SSLCipherSuite = c_uint32
SSLContextRef = POINTER(c_void_p)
SecTrustRef = POINTER(c_void_p)
SSLConnectionRef = c_uint32
SecTrustResultType = c_uint32
SecTrustOptionFlags = c_uint32
SSLProtocolSide = c_uint32
SSLConnectionType = c_uint32
SSLSessionOption = c_uint32


try:
    Security.SecItemImport.argtypes = [
        CFDataRef,
        CFStringRef,
        POINTER(SecExternalFormat),
        POINTER(SecExternalItemType),
        SecItemImportExportFlags,
        POINTER(SecItemImportExportKeyParameters),
        SecKeychainRef,
        POINTER(CFArrayRef),
    ]
    Security.SecItemImport.restype = OSStatus

    Security.SecCertificateGetTypeID.argtypes = []
    Security.SecCertificateGetTypeID.restype = CFTypeID

    Security.SecIdentityGetTypeID.argtypes = []
    Security.SecIdentityGetTypeID.restype = CFTypeID

    Security.SecKeyGetTypeID.argtypes = []
    Security.SecKeyGetTypeID.restype = CFTypeID

    Security.SecCertificateCreateWithData.argtypes = [CFAllocatorRef, CFDataRef]
    Security.SecCertificateCreateWithData.restype = SecCertificateRef

    Security.SecCertificateCopyData.argtypes = [SecCertificateRef]
    Security.SecCertificateCopyData.restype = CFDataRef

    Security.SecCopyErrorMessageString.argtypes = [OSStatus, c_void_p]
    Security.SecCopyErrorMessageString.restype = CFStringRef

    Security.SecIdentityCreateWithCertificate.argtypes = [
        CFTypeRef,
        SecCertificateRef,
        POINTER(SecIdentityRef),
    ]
    Security.SecIdentityCreateWithCertificate.restype = OSStatus

    Security.SecKeychainCreate.argtypes = [
        c_char_p,
        c_uint32,
        c_void_p,
        Boolean,
        c_void_p,
        POINTER(SecKeychainRef),
    ]
    Security.SecKeychainCreate.restype = OSStatus

    Security.SecKeychainDelete.argtypes = [SecKeychainRef]
    Security.SecKeychainDelete.restype = OSStatus

    Security.SecPKCS12Import.argtypes = [
        CFDataRef,
        CFDictionaryRef,
        POINTER(CFArrayRef),
    ]
    Security.SecPKCS12Import.restype = OSStatus

    SSLReadFunc = CFUNCTYPE(OSStatus, SSLConnectionRef, c_void_p, POINTER(c_size_t))
    SSLWriteFunc = CFUNCTYPE(
        OSStatus, SSLConnectionRef, POINTER(c_byte), POINTER(c_size_t)
    )

    Security.SSLSetIOFuncs.argtypes = [SSLContextRef, SSLReadFunc, SSLWriteFunc]
    Security.SSLSetIOFuncs.restype = OSStatus

    Security.SSLSetPeerID.argtypes = [SSLContextRef, c_char_p, c_size_t]
    Security.SSLSetPeerID.restype = OSStatus

    Security.SSLSetCertificate.argtypes = [SSLContextRef, CFArrayRef]
    Security.SSLSetCertificate.restype = OSStatus

    Security.SSLSetCertificateAuthorities.argtypes = [SSLContextRef, CFTypeRef, Boolean]
    Security.SSLSetCertificateAuthorities.restype = OSStatus

    Security.SSLSetConnection.argtypes = [SSLContextRef, SSLConnectionRef]
    Security.SSLSetConnection.restype = OSStatus

    Security.SSLSetPeerDomainName.argtypes = [SSLContextRef, c_char_p, c_size_t]
    Security.SSLSetPeerDomainName.restype = OSStatus

    Security.SSLHandshake.argtypes = [SSLContextRef]
    Security.SSLHandshake.restype = OSStatus

    Security.SSLRead.argtypes = [SSLContextRef, c_char_p, c_size_t, POINTER(c_size_t)]
    Security.SSLRead.restype = OSStatus

    Security.SSLWrite.argtypes = [SSLContextRef, c_char_p, c_size_t, POINTER(c_size_t)]
    Security.SSLWrite.restype = OSStatus

    Security.SSLClose.argtypes = [SSLContextRef]
    Security.SSLClose.restype = OSStatus

    Security.SSLGetNumberSupportedCiphers.argtypes = [SSLContextRef, POINTER(c_size_t)]
    Security.SSLGetNumberSupportedCiphers.restype = OSStatus

    Security.SSLGetSupportedCiphers.argtypes = [
        SSLContextRef,
        POINTER(SSLCipherSuite),
        POINTER(c_size_t),
    ]
    Security.SSLGetSupportedCiphers.restype = OSStatus

    Security.SSLSetEnabledCiphers.argtypes = [
        SSLContextRef,
        POINTER(SSLCipherSuite),
        c_size_t,
    ]
    Security.SSLSetEnabledCiphers.restype = OSStatus

    Security.SSLGetNumberEnabledCiphers.argtype = [SSLContextRef, POINTER(c_size_t)]
    Security.SSLGetNumberEnabledCiphers.restype = OSStatus

    Security.SSLGetEnabledCiphers.argtypes = [
        SSLContextRef,
        POINTER(SSLCipherSuite),
        POINTER(c_size_t),
    ]
    Security.SSLGetEnabledCiphers.restype = OSStatus

    Security.SSLGetNegotiatedCipher.argtypes = [SSLContextRef, POINTER(SSLCipherSuite)]
    Security.SSLGetNegotiatedCipher.restype = OSStatus

    Security.SSLGetNegotiatedProtocolVersion.argtypes = [
        SSLContextRef,
        POINTER(SSLProtocol),
    ]
    Security.SSLGetNegotiatedProtocolVersion.restype = OSStatus

    Security.SSLCopyPeerTrust.argtypes = [SSLContextRef, POINTER(SecTrustRef)]
    Security.SSLCopyPeerTrust.restype = OSStatus

    Security.SecTrustSetAnchorCertificates.argtypes = [SecTrustRef, CFArrayRef]
    Security.SecTrustSetAnchorCertificates.restype = OSStatus

    Security.SecTrustSetAnchorCertificatesOnly.argstypes = [SecTrustRef, Boolean]
    Security.SecTrustSetAnchorCertificatesOnly.restype = OSStatus

    Security.SecTrustEvaluate.argtypes = [SecTrustRef, POINTER(SecTrustResultType)]
    Security.SecTrustEvaluate.restype = OSStatus

    Security.SecTrustGetCertificateCount.argtypes = [SecTrustRef]
    Security.SecTrustGetCertificateCount.restype = CFIndex

    Security.SecTrustGetCertificateAtIndex.argtypes = [SecTrustRef, CFIndex]
    Security.SecTrustGetCertificateAtIndex.restype = SecCertificateRef

    Security.SSLCreateContext.argtypes = [
        CFAllocatorRef,
        SSLProtocolSide,
        SSLConnectionType,
    ]
    Security.SSLCreateContext.restype = SSLContextRef

    Security.SSLSetSessionOption.argtypes = [SSLContextRef, SSLSessionOption, Boolean]
    Security.SSLSetSessionOption.restype = OSStatus

    Security.SSLSetProtocolVersionMin.argtypes = [SSLContextRef, SSLProtocol]
    Security.SSLSetProtocolVersionMin.restype = OSStatus

    Security.SSLSetProtocolVersionMax.argtypes = [SSLContextRef, SSLProtocol]
    Security.SSLSetProtocolVersionMax.restype = OSStatus

    try:
        Security.SSLSetALPNProtocols.argtypes = [SSLContextRef, CFArrayRef]
        Security.SSLSetALPNProtocols.restype = OSStatus
    except AttributeError:
        # Supported only in 10.12+
        pass

    Security.SecCopyErrorMessageString.argtypes = [OSStatus, c_void_p]
    Security.SecCopyErrorMessageString.restype = CFStringRef

    Security.SSLReadFunc = SSLReadFunc
    Security.SSLWriteFunc = SSLWriteFunc
    Security.SSLContextRef = SSLContextRef
    Security.SSLProtocol = SSLProtocol
    Security.SSLCipherSuite = SSLCipherSuite
    Security.SecIdentityRef = SecIdentityRef
    Security.SecKeychainRef = SecKeychainRef
    Security.SecTrustRef = SecTrustRef
    Security.SecTrustResultType = SecTrustResultType
    Security.SecExternalFormat = SecExternalFormat
    Security.OSStatus = OSStatus

    Security.kSecImportExportPassphrase = CFStringRef.in_dll(
        Security, "kSecImportExportPassphrase"
    )
    Security.kSecImportItemIdentity = CFStringRef.in_dll(
        Security, "kSecImportItemIdentity"
    )

    # CoreFoundation time!
    CoreFoundation.CFRetain.argtypes = [CFTypeRef]
    CoreFoundation.CFRetain.restype = CFTypeRef

    CoreFoundation.CFRelease.argtypes = [CFTypeRef]
    CoreFoundation.CFRelease.restype = None

    CoreFoundation.CFGetTypeID.argtypes = [CFTypeRef]
    CoreFoundation.CFGetTypeID.restype = CFTypeID

    CoreFoundation.CFStringCreateWithCString.argtypes = [
        CFAllocatorRef,
        c_char_p,
        CFStringEncoding,
    ]
    CoreFoundation.CFStringCreateWithCString.restype = CFStringRef

    CoreFoundation.CFStringGetCStringPtr.argtypes = [CFStringRef, CFStringEncoding]
    CoreFoundation.CFStringGetCStringPtr.restype = c_char_p

    CoreFoundation.CFStringGetCString.argtypes = [
        CFStringRef,
        c_char_p,
        CFIndex,
        CFStringEncoding,
    ]
    CoreFoundation.CFStringGetCString.restype = c_bool

    CoreFoundation.CFDataCreate.argtypes = [CFAllocatorRef, c_char_p, CFIndex]
    CoreFoundation.CFDataCreate.restype = CFDataRef

    CoreFoundation.CFDataGetLength.argtypes = [CFDataRef]
    CoreFoundation.CFDataGetLength.restype = CFIndex

    CoreFoundation.CFDataGetBytePtr.argtypes = [CFDataRef]
    CoreFoundation.CFDataGetBytePtr.restype = c_void_p

    CoreFoundation.CFDictionaryCreate.argtypes = [
        CFAllocatorRef,
        POINTER(CFTypeRef),
        POINTER(CFTypeRef),
        CFIndex,
        CFDictionaryKeyCallBacks,
        CFDictionaryValueCallBacks,
    ]
    CoreFoundation.CFDictionaryCreate.restype = CFDictionaryRef

    CoreFoundation.CFDictionaryGetValue.argtypes = [CFDictionaryRef, CFTypeRef]
    CoreFoundation.CFDictionaryGetValue.restype = CFTypeRef

    CoreFoundation.CFArrayCreate.argtypes = [
        CFAllocatorRef,
        POINTER(CFTypeRef),
        CFIndex,
        CFArrayCallBacks,
    ]
    CoreFoundation.CFArrayCreate.restype = CFArrayRef

    CoreFoundation.CFArrayCreateMutable.argtypes = [
        CFAllocatorRef,
        CFIndex,
        CFArrayCallBacks,
    ]
    CoreFoundation.CFArrayCreateMutable.restype = CFMutableArrayRef

    CoreFoundation.CFArrayAppendValue.argtypes = [CFMutableArrayRef, c_void_p]
    CoreFoundation.CFArrayAppendValue.restype = None

    CoreFoundation.CFArrayGetCount.argtypes = [CFArrayRef]
    CoreFoundation.CFArrayGetCount.restype = CFIndex

    CoreFoundation.CFArrayGetValueAtIndex.argtypes = [CFArrayRef, CFIndex]
    CoreFoundation.CFArrayGetValueAtIndex.restype = c_void_p

    CoreFoundation.kCFAllocatorDefault = CFAllocatorRef.in_dll(
        CoreFoundation, "kCFAllocatorDefault"
    )
    CoreFoundation.kCFTypeArrayCallBacks = c_void_p.in_dll(
        CoreFoundation, "kCFTypeArrayCallBacks"
    )
    CoreFoundation.kCFTypeDictionaryKeyCallBacks = c_void_p.in_dll(
        CoreFoundation, "kCFTypeDictionaryKeyCallBacks"
    )
    CoreFoundation.kCFTypeDictionaryValueCallBacks = c_void_p.in_dll(
        CoreFoundation, "kCFTypeDictionaryValueCallBacks"
    )

    CoreFoundation.CFTypeRef = CFTypeRef
    CoreFoundation.CFArrayRef = CFArrayRef
    CoreFoundation.CFStringRef = CFStringRef
    CoreFoundation.CFDictionaryRef = CFDictionaryRef

except (AttributeError):
    raise ImportError("Error initializing ctypes")


class CFConst(object):
    """
    A class object that acts as essentially a namespace for CoreFoundation
    constants.
    """

    kCFStringEncodingUTF8 = CFStringEncoding(0x08000100)


class SecurityConst(object):
    """
    A class object that acts as essentially a namespace for Security constants.
    """

    kSSLSessionOptionBreakOnServerAuth = 0

    kSSLProtocol2 = 1
    kSSLProtocol3 = 2
    kTLSProtocol1 = 4
    kTLSProtocol11 = 7
    kTLSProtocol12 = 8
    # SecureTransport does not support TLS 1.3 even if there's a constant for it
    kTLSProtocol13 = 10
    kTLSProtocolMaxSupported = 999

    kSSLClientSide = 1
    kSSLStreamType = 0

    kSecFormatPEMSequence = 10

    kSecTrustResultInvalid = 0
    kSecTrustResultProceed = 1
    # This gap is present on purpose: this was kSecTrustResultConfirm, which
    # is deprecated.
    kSecTrustResultDeny = 3
    kSecTrustResultUnspecified = 4
    kSecTrustResultRecoverableTrustFailure = 5
    kSecTrustResultFatalTrustFailure = 6
    kSecTrustResultOtherError = 7

    errSSLProtocol = -9800
    errSSLWouldBlock = -9803
    errSSLClosedGraceful = -9805
    errSSLClosedNoNotify = -9816
    errSSLClosedAbort = -9806

    errSSLXCertChainInvalid = -9807
    errSSLCrypto = -9809
    errSSLInternal = -9810
    errSSLCertExpired = -9814
    errSSLCertNotYetValid = -9815
    errSSLUnknownRootCert = -9812
    errSSLNoRootCert = -9813
    errSSLHostNameMismatch = -9843
    errSSLPeerHandshakeFail = -9824
    errSSLPeerUserCancelled = -9839
    errSSLWeakPeerEphemeralDHKey = -9850
    errSSLServerAuthCompleted = -9841
    errSSLRecordOverflow = -9847

    errSecVerifyFailed = -67808
    errSecNoTrustSettings = -25263
    errSecItemNotFound = -25300
    errSecInvalidTrustSettings = -25262

    # Cipher suites. We only pick the ones our default cipher string allows.
    # Source: https://developer.apple.com/documentation/security/1550981-ssl_cipher_suite_values
    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C
    TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030
    TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B
    TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F
    TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9
    TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8
    TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 0x009F
    TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 0x009E
    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = 0xC024
    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = 0xC028
    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A
    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014
    TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x006B
    TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x0039
    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0xC023
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0xC027
    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013
    TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x0067
    TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033
    TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D
    TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C
    TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x003D
    TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x003C
    TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035
    TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F
    TLS_AES_128_GCM_SHA256 = 0x1301
    TLS_AES_256_GCM_SHA384 = 0x1302
    TLS_AES_128_CCM_8_SHA256 = 0x1305
    TLS_AES_128_CCM_SHA256 = 0x1304
python3.12/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-312.pyc000064400000000413151732702450023454 0ustar00�

R`i@���dZy)z1.26.17N)�__version__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/_version.py�<module>rs
���rpython3.12/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-312.pyc000064400000102310151732702450023465 0ustar00�

R`i�w���ddlmZddlZddlZddlZddlZddlZddlmZddl	m
Zddl	mZ
dZddlmZddlmZdd	lmZmZdd
lmZmZmZmZmZmZmZmZmZm Z ddl!m"Z"ddl#m$Z$m%Z%ejLe'�Z(Gd
�de)�Z*Gd�de)�Z+Gd�de)�Z,e�Gd�de)�Z-Gd�de)�Z.d�Z/Gd�dej`�Z1y)�)�absolute_importN)�contextmanager)�error)�timeout�)�util)�HTTPHeaderDict)�BaseSSLError�
HTTPException)
�BodyNotHttplibCompatible�DecodeError�	HTTPError�IncompleteRead�InvalidChunkLength�
InvalidHeader�
ProtocolError�ReadTimeoutError�ResponseNotChunked�SSLError)�six)�is_fp_closed�is_response_to_headc��eZdZd�Zd�Zd�Zy)�DeflateDecoderc�R�d|_d|_tj�|_y)NT�)�
_first_try�_data�zlib�
decompressobj�_obj��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/response.py�__init__zDeflateDecoder.__init__$s �������
��&�&�(��	rc�.�t|j|�S�N��getattrr!�r#�names  r$�__getattr__zDeflateDecoder.__getattr__)����t�y�y�$�'�'rc���|s|S|js|jj|�S|xj|z
c_	|jj|�}|rd|_d|_|S#tj
$rbd|_t	jtj�|_	|j|j�d|_cYS#d|_wxYwwxYw)NF)rr!�
decompressrrrr �	MAX_WBITS)r#�data�decompresseds   r$r/zDeflateDecoder.decompress,s�����K�����9�9�'�'��-�-��
�
�d��
�	"��9�9�/�/��5�L��"'���!��
�����z�z�	"�#�D�O��*�*�D�N�N�?�;�D�I�
"����t�z�z�2�!��
��T��
��
	"�s%�,A/�/AC$�3C�
C$�	C � C$N��__name__�
__module__�__qualname__r%r,r/�rr$rr#s��)�
(�"rrc��eZdZdZdZdZy)�GzipDecoderStaterr�N)r4r5r6�FIRST_MEMBER�
OTHER_MEMBERS�SWALLOW_DATAr7rr$r9r9Cs���L��M��Lrr9c��eZdZd�Zd�Zd�Zy)�GzipDecoderc��tjdtjz�|_tj
|_y�N�)rr r0r!r9r;�_stater"s r$r%zGzipDecoder.__init__Ks*���&�&�r�D�N�N�':�;��	�&�3�3��rc�.�t|j|�Sr'r(r*s  r$r,zGzipDecoder.__getattr__Or-rc�$�t�}|jtjk(s|st	|�S		||j
j
|�z
}|j
j}|st	|�Stj|_tjdtjz�|_��#tj$rC|j}tj|_|tjk(r
t	|�cYS�wxYwrA)
�	bytearrayrCr9r=�bytesr!r/rrr<�unused_datar r0)r#r1�ret�previous_states    r$r/zGzipDecoder.decompressRs����k���;�;�*�7�7�7�t���:���	
��t�y�y�+�+�D�1�1���9�9�(�(�D���S�z�!�*�8�8�D�K��*�*�2����+>�?�D�I����:�:�
�!%����.�;�;���!�%5�%C�%C�C� ��:�%��
�s�B9�9AD�
DNr3r7rr$r?r?Js��4�(�@rr?c��eZdZd�Zd�Zy)�
BrotliDecoderc���tj�|_t|jd�r|jj|_y|jj
|_y)Nr/)�brotli�Decompressorr!�hasattrr/�processr"s r$r%zBrotliDecoder.__init__nsB���+�+�-�D�I��t�y�y�,�/�"&�)�)�"6�"6���"&�)�)�"3�"3��rc�d�t|jd�r|jj�Sy)N�flushr)rPr!rSr"s r$rSzBrotliDecoder.flushus$���t�y�y�'�*��y�y���(�(�rN)r4r5r6r%rSr7rr$rLrLjs��	4�	rrLc�"�eZdZdZd�Zd�Zd�Zy)�MultiDecodera
    From RFC7231:
        If one or more encodings have been applied to a representation, the
        sender that applied the encodings MUST generate a Content-Encoding
        header field that lists the content codings in the order in which
        they were applied.
    c��|jd�D�cgc]}t|j����c}|_ycc}w)N�,)�split�_get_decoder�strip�	_decoders)r#�modes�ms   r$r%zMultiDecoder.__init__�s1��;@�;�;�s�;K�L�;K�a�,�q�w�w�y�1�;K�L����Ls� =c�<�|jdj�S�Nr)r[rSr"s r$rSzMultiDecoder.flush�s���~�~�a� �&�&�(�(rc�\�t|j�D]}|j|�}�|Sr')�reversedr[r/)r#r1�ds   r$r/zMultiDecoder.decompress�s(���$�.�.�)�A��<�<��%�D�*��rN)r4r5r6�__doc__r%rSr/r7rr$rUrU{s���M�)�rrUc�|�d|vrt|�S|dk(r
t�St�|dk(r
t�St	�S)NrW�gzip�br)rUr?rNrLr)�modes r$rYrY�s@��
�d�{��D�!�!��v�~��}��
��d�d�l������rc��eZdZdZddgZe�edgz
Zgd�Z																	d'd�Zd�Zd	�Z	d
�Z
ed��Zed��Z
d
�Zd�Zd�Zd�Zeej(fZe�eej(fz
Zd�Zd�Zed��Zd�Zd(d�Zd)d�Zed��Zd�Zd*d�Z d�Z!d�Z"ed��Z#d�Z$d�Z%d�Z&d �Z'd!�Z(d"�Z)d#�Z*d+d$�Z+d%�Z,d&�Z-y),�HTTPResponsea�
    HTTP Response container.

    Backwards-compatible with :class:`http.client.HTTPResponse` but the response ``body`` is
    loaded and decoded on-demand when the ``data`` property is accessed.  This
    class is also compatible with the Python standard library's :mod:`io`
    module, and can hence be treated as a readable object in the context of that
    framework.

    Extra parameters for behaviour not present in :class:`http.client.HTTPResponse`:

    :param preload_content:
        If True, the response's body will be preloaded during construction.

    :param decode_content:
        If True, will attempt to decode the body based on the
        'content-encoding' header.

    :param original_response:
        When this HTTPResponse wrapper is generated from an :class:`http.client.HTTPResponse`
        object, it's convenient to include the original for debug purposes. It's
        otherwise unused.

    :param retries:
        The retries contains the last :class:`~urllib3.util.retry.Retry` that
        was used during the request.

    :param enforce_content_length:
        Enforce content length checking. Body returned by server must match
        value of Content-Length header, if present. Otherwise, raise error.
    re�deflateNrf)i-i.i/i3i4c���t|t�r||_nt|�|_||_||_||_||_||_|
|_||_	||_
d|_d|_d|_
|	|_d|_||_||_|r't|t$j&t(f�r||_|
|_||_t/|d�r||_
d|_d|_|jj5dd�j7�}d�|j9d�D�}d|vrd	|_|j;|�|_|r%|js|j?|�
�|_yyy)Nr�readFztransfer-encoding�c3�<K�|]}|j����y�wr')rZ)�.0�encs  r$�	<genexpr>z(HTTPResponse.__init__.<locals>.<genexpr>�s����>�,=�S�S�Y�Y�[�,=�s�rW�chunkedT��decode_content) �
isinstancer	�headers�status�version�reason�strictrt�retries�enforce_content_length�
auto_close�_decoder�_body�_fp�_original_response�_fp_bytes_read�msg�_request_urlr�string_typesrG�_pool�_connectionrPrr�
chunk_left�get�lowerrX�_init_length�length_remainingrl)r#�bodyrvrwrxryrz�preload_contentrt�original_response�pool�
connectionr�r{r|�request_method�request_urlr}�tr_enc�	encodingss                    r$r%zHTTPResponse.__init__�sX��*�g�~�.�"�D�L�)�'�2�D�L�������������,������&<��#�$�����
���
����"3���������'����J�t�c�&6�&6��%>�?��D�J���
�%����4�� ��D�H����������!�!�"5�r�:�@�@�B��>�F�L�L��,=�>�	��	�!��D�L�!%� 1� 1�.� A����4�:�:����.��A�D�J�$.�?rc�j�|j|jvr|jjd�Sy)a
        Should we redirect and where to?

        :returns: Truthy redirect location string if we got a redirect status
            code and valid location. ``None`` if redirect status and no
            location. ``False`` if not a redirect status code.
        �locationF)rw�REDIRECT_STATUSESrvr�r"s r$�get_redirect_locationz"HTTPResponse.get_redirect_locations.���;�;�$�0�0�0��<�<�#�#�J�/�/�rc��|jr|jsy|jj|j�d|_yr')r�r��	_put_connr"s r$�release_connzHTTPResponse.release_conns4���z�z��!1�!1���
�
���T�-�-�.���rc�d�	|j�y#ttttf$rYywxYw)z�
        Read and discard any remaining HTTP response data in the response connection.

        Unread data in the HTTPResponse connection blocks the connection from being released back to the pool.
        N)rlr�SocketErrorr
rr"s r$�
drain_connzHTTPResponse.drain_conns+��	��I�I�K���;��m�D�	��	�s��/�/c�p�|jr|jS|jr|jd��Sy)NT)�
cache_content)rr�rlr"s r$r1zHTTPResponse.data%s2���:�:��:�:���8�8��9�9�4�9�0�0�rc��|jSr')r�r"s r$r�zHTTPResponse.connection.s�����rc�,�t|j�Sr')rr�r"s r$�isclosedzHTTPResponse.isclosed2s���D�H�H�%�%rc��|jS)z�
        Obtain the number of bytes pulled over the wire so far. May differ from
        the amount of content returned by :meth:``urllib3.response.HTTPResponse.read``
        if bytes are encoded on the wire (e.g, compressed).
        )r�r"s r$�tellzHTTPResponse.tell5s���"�"�"rc��|jjd�}|��|jrtj	d�y	t|j
d�D�cgc]
}t|���c}�}t|�dkDrtd|z��|j�}|dkrd}		t|j�}|dvsd	|cxkrd
ksn|dk(rd}|Scc}w#t$rd}Y�BwxYw#t$rd}Y�=wxYw)zM
        Set initial length value for Response content if available.
        zcontent-lengthNz�Received response with both Content-Length and Transfer-Encoding set. This is expressly forbidden by RFC 7230 sec 3.3.2. Ignoring Content-Length and attempting to process response as Transfer-Encoding: chunked.rWrz8Content-Length contained multiple unmatching values (%s)r)��i0�d���HEAD)
rvr�rr�log�warning�setrX�int�lenr�pop�
ValueErrorrw)r#r��length�val�lengthsrws      r$r�zHTTPResponse._init_length=s�����!�!�"2�3�����|�|�������
"��6�<�<��3D�E�3D�C�s�3�x�3D�E�F���w�<�!�#�'�1�39�:���!������A�:�!�F�	�����%�F�
�Z��3�&�#6�3�#6�.�F�:R��F��
��1F���
���
���	��F�	�s6�C�C�+3C�'C,�C�C)�(C)�,C:�9C:c��|jjdd�j�}|j��||jvrt|�|_yd|vre|j
d�D�cgc].}|j�|jvr|j���0}}t|�rt|�|_yyyycc}w)z=
        Set-up the _decoder attribute if necessary.
        �content-encodingrmNrW)	rvr�r�r~�CONTENT_DECODERSrYrXrZr�)r#�content_encoding�er�s    r$�
_init_decoderzHTTPResponse._init_decoderqs��� �<�<�+�+�,>��C�I�I�K���=�=� ��4�#8�#8�8� ,�-=� >��
��(�(�.�3�3�C�8��8���w�w�y�D�$9�$9�9��G�G�I�8���
�y�>�$0�1A�$B�D�M�"�
)�!��s�-3Cc�(�|s|S	|jr|jj|�}|r||j�z
}|S#|j$r>}|jj	dd�j�}t
d|z|��d}~wwxYw)zN
        Decode the data passed in and potentially flush the decoder.
        r�rmzEReceived response with content-encoding: %s, but failed to decode it.N)r~r/�DECODER_ERROR_CLASSESrvr�r�r
�_flush_decoder)r#r1rt�
flush_decoderr�r�s      r$�_decodezHTTPResponse._decode�s�����K�		��}�}��}�}�/�/��5����D�'�'�)�)�D�����)�)�	�#�|�|�/�/�0B�B�G�M�M�O���'�)9�:���
��	�s�'A�B�9B�Bc��|jr8|jjd�}||jj�zSy)zk
        Flushes the decoder. Should only be called if the decoder is actually
        being used.
        r)r~r/rS)r#�bufs  r$r�zHTTPResponse._flush_decoder�s:��
�=�=��-�-�*�*�3�/�C�����,�,�.�.�.�rc#�BK�d}		d��d}|sL|jr|jj�|jr|jj�|jr,|jj�r|j�yyy#t$rt|jdd��t$r4}dt	|�vrt|��t|jdd��d}~wttf$r}td|z|��d}~wwxYw#|sL|jr|jj�|jr|jj�|jr,|jj�r|j�wwwxYw�w)z�
        Catch low-level python exceptions, instead re-raising urllib3
        variants, so that low-level exceptions are not leaked in the
        high-level api.

        On exit, release the connection back to the pool.
        FNzRead timed out.zread operation timed outzConnection broken: %rT)�
SocketTimeoutrr�r
�strrrr�rr��closer�r�r�)r#�
clean_exitr�s   r$�_error_catcherzHTTPResponse._error_catcher�s������
�+	$�
D��*�J���*�*��+�+�1�1�3�
�#�#��$�$�*�*�,��&�&�4�+B�+B�+K�+K�+M��!�!�#�,N�&��M!�
L�'�t�z�z�4�9J�K�K��
L�-�S��V�;�"�1�+�%�&�t�z�z�4�9J�K�K��!�;�/�
D�#�$;�a�$?��C�C��
D����*�*��+�+�1�1�3�
�#�#��$�$�*�*�,��&�&�4�+B�+B�+K�+K�+M��!�!�#�,N�&�sF�F�B�D�BF�(D�</C+�+D�=D�D�D�BF�Fc�R�|jsJ�d}|r||kDs|jr�|j|kDr�tjs�tjst
jdkr�tj�}d}|�|dk7r_|�t||�}||z}n|}|jj|�}|s	|j�S|j|�~|��Y|dk7r�_|j�S|�|jj|�S|jj�S)a_
        Read a response with the thought that reading the number of bytes
        larger than can fit in a 32-bit int at a time via SSL in some
        known cases leads to an overflow error that has to be prevented
        if `amt` or `self.length_remaining` indicate that a problem may
        happen.

        The known cases:
          * 3.8 <= CPython < 3.9.7 because of a bug
            https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900.
          * urllib3 injected with pyOpenSSL-backed SSL-support.
          * CPython < 3.10 only when `amt` does not fit 32-bit int.
        i���)��
ir)
r�r�r�IS_SECURETRANSPORT�IS_PYOPENSSL�sys�version_info�io�BytesIO�minrl�write�getvalue)r#�amt�	c_int_max�buffer�
max_chunk_amt�	chunk_amtr1s       r$�_fp_readzHTTPResponse._fp_read�s
���x�x��x��	���y���)�)�d�.C�.C�i�.O��+�+��"�"�c�&6�&6��&@��Z�Z�\�F�$�M��+�����?� #�C�� 7�I��9�$�C� -�I��x�x�}�}�Y�/�����?�?�$�$����T�"���+�����?�?�$�$�*-��4�8�8�=�=��%�M�d�h�h�m�m�o�Mrc��|j�|�|j}|j�yd}t|jdd�}|j	�5|s|j|�nd}|�d}n_d}|dk7rX|sV|jj
�d}|jr.|jdvr t|j|j��ddd�rd|xjt|�z
c_
|j�|xjt|�zc_|j|||�}|r||_
|S#1swY�qxYw)aT
        Similar to :meth:`http.client.HTTPResponse.read`, but with two additional
        parameters: ``decode_content`` and ``cache_content``.

        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the ``.data`` property to continue working
            after having ``.read()`` the file object. (Overridden if ``amt`` is
            set.)
        NF�closedrTr)rN)r�rtr�r)r�r�r�r|r�rr�r�r�r)r#r�rtr�r��	fp_closedr1s       r$rlzHTTPResponse.reads2��*	
�����!�!�0�0�N��8�8����
��D�H�H�h��6�	�
�
 �
 �
"�-6�4�=�=��%�C�D��{� $�
� %�
��1�H�T��H�H�N�N�$�$(�M��2�2�t�7L�7L�U�8�-�T�-@�-@�$�BW�BW�X�X�7#�:����3�t�9�,���$�$�0��%�%��T��2�%��<�<��n�m�D�D��!��
���O#�
"�s
�A:D?�?Ec#�K�|jr-|j�r|j||��D]}|���yt|j�s0|j||��}|r|��t|j�s�/yy�w)a_
        A generator wrapper for the read() method. A call will block until
        ``amt`` bytes have been read from the connection or until the
        connection is closed.

        :param amt:
            How much of the content to read. The generator will return up to
            much data per iteration, but may return less. This is particularly
            likely when using compressed data. However, the empty string will
            never be returned.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
        rs)r�rtN)rr�supports_chunked_reads�read_chunkedrr�rl)r#r�rt�liner1s     r$�streamzHTTPResponse.streamYsp���� �<�<�D�7�7�9��)�)�#�n�)�M���
�N�#�4�8�8�,��y�y�S��y�H����J�	#�4�8�8�,�s�A=B�Bc�2�|j}t|t�s?tjrtj
|�}nt|j
��}t|dd�}|d|||j|j|j||d�|��}|S)a
        Given an :class:`http.client.HTTPResponse` instance ``r``, return a
        corresponding :class:`urllib3.response.HTTPResponse` object.

        Remaining parameters are passed to the HTTPResponse constructor, along
        with ``original_response=r``.
        rzr)r�rvrwrxryrzr�r7)r�rur	r�PY2�from_httplib�itemsr)rwrxry)�ResponseCls�r�response_kwrvrz�resps      r$r�zHTTPResponse.from_httplibss����%�%���'�>�2��w�w�(�5�5�g�>��(�����9����H�a�(���	
����8�8��I�I��8�8���	
��	
���rc�R�tjdtd��|jS)Nz|HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.r:��category�
stacklevel)�warnings�warn�DeprecationWarningrvr"s r$�
getheaderszHTTPResponse.getheaders�s&���
�
�
O�'��		
��|�|�rc�r�tjdtd��|jj	||�S)Nz�HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).r:r�)r�r�r�rvr�)r#r+�defaults   r$�	getheaderzHTTPResponse.getheader�s3���
�
�
V�'��		
��|�|����g�.�.rc��|jSr')rvr"s r$�infozHTTPResponse.info�s���|�|�rc���|js|jj�|jr|jj�|js t
jj|�yyr')r�r�r�r�r}r��IOBaser"s r$r�zHTTPResponse.close�sN���{�{��H�H�N�N��������"�"�$�����I�I�O�O�D�!�rc�@�|js)tjjj	|�S|j
�yt
|j
d�r|j
j�St
|j
d�r|j
jSy)NTr�r�)r}r�r�r��__get__r�rPr�r"s r$r�zHTTPResponse.closed�sq������9�9�#�#�+�+�D�1�1�
�X�X�
��
�T�X�X�z�
*��8�8�$�$�&�&�
�T�X�X�x�
(��8�8�?�?�"�rc��|j�td��t|jd�r|jj�Std��)Nz-HTTPResponse has no file to get a fileno from�filenozOThe file-like object this HTTPResponse is wrapped around has no file descriptor)r��IOErrorrPr�r"s r$r�zHTTPResponse.fileno�sI���8�8���I�J�J�
�T�X�X�x�
(��8�8�?�?�$�$��0��
rc��|j�It|jd�r2t|jdd�s|jj�Syyy)NrSr�F)r�rPr)rSr"s r$rSzHTTPResponse.flush�sJ���H�H� �����'�*��D�H�H�h��6��8�8�>�>�#�#�7�+�
!rc��y)NTr7r"s r$�readablezHTTPResponse.readable�s��rc��|jt|��}t|�dk(ry||dt|�t|�Sr_)rlr�)r#�b�temps   r$�readintozHTTPResponse.readinto�s;���y�y��Q�� ���t�9��>��!�A�k��D�	�N��t�9�rc�.�t|jd�S)a
        Checks if the underlying file-like object looks like a
        :class:`http.client.HTTPResponse` object. We do this by testing for
        the fp attribute. If it is present we assume it returns raw chunks as
        processed by read_chunked().
        �fp)rPr�r"s r$r�z#HTTPResponse.supports_chunked_reads�s���t�x�x��&�&rc��|j�y|jjj�}|j	dd�d}	t|d�|_y#t$r|j�t||��wxYw)N�;rrrB)	r�r�r�readlinerXr�r�r�r)r#r�s  r$�_update_chunk_lengthz!HTTPResponse._update_chunk_length�ss���?�?�&���x�x�{�{�#�#�%���z�z�$��"�1�%��	1�!�$��m�D�O���	1��J�J�L�$�T�4�0�0�	1�s�A�&Bc�V�d}|�K|jj|j�}|}|jjd�d|_|S||jkr3|jj|�}|j|z
|_|}|S||jk(rA|jj|�}|jjd�d|_|}|S|jj|j�}|jjd�d|_|S)Nr:)r��
_safe_readr�)r#r��returned_chunk�chunk�values     r$�
_handle_chunkzHTTPResponse._handle_chunk�s
�����;��H�H�'�'����8�E�"�N��H�H����"�"�D�O����4�?�?�
"��H�H�'�'��,�E�"�o�o��3�D�O�"�N����D�O�O�
#��H�H�'�'��,�E��H�H����"�"�D�O�"�N�
��"�X�X�0�0����A�N��H�H����"�"�D�O��rc#�K�|j�|jstd��|j�st	d��|j�5|jr9t|j�r$|jj�	ddd�y|jj�
	ddd�y	|j�|jdk(rn,|j|�}|j||d��}|r|���L|r|j�}|r|��	|jjj!�}|sn|dk(rn�.|jr|jj�ddd�y#1swYyxYw�w)a�
        Similar to :meth:`HTTPResponse.read`, but with an additional
        parameter: ``decode_content``.

        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
        zHResponse is not chunked. Header 'transfer-encoding: chunked' is missing.zkBody should be http.client.HTTPResponse like. It should have have an fp attribute which returns raw chunks.NrF)rtr�s
)r�rrrr�rr�r�rr�r�rrr�rr�r�r
)r#r�rtr�decodedr�s      r$r�zHTTPResponse.read_chunkeds{����	
�����|�|�$�B��
��*�*�,�*�P��
�
�
 �
 �
"��&�&�+>�t�?V�?V�+W��'�'�-�-�/��	#�
"��x�x�{�{�"��#�
"���)�)�+��?�?�a�'���*�*�3�/���,�,��.��'����!�M����-�-�/���!�M���x�x�{�{�+�+�-�����7�?��
��&�&��'�'�-�-�/�S#�
"�
"�s7�AF
�=E>�	F
�E>�2	F
�;B:E>�5	F
�>F�F
c��|j�Bt|jj�r#|jjdjS|jS)z�
        Returns the URL that was the source of this response.
        If the request that generated this response redirected, this method
        will return the final redirect location.
        ���)r{r��history�redirect_locationr�r"s r$�geturlzHTTPResponse.geturlUsF���<�<�#��D�L�L�,@�,@�(A��<�<�'�'��+�=�=�=��$�$�$rc#�.K�g}|jd��D]d}d|vrM|jd�}dj|�|dzdz��|ddD]	}|dz���|dr|dg}�Qg}�T|j|��f|rdj|���yy�w)NTrs�
rrrr)r�rX�join�append)r#r�r�xs    r$�__iter__zHTTPResponse.__iter__`s��������[�[��[�5�E���~����E�*���h�h�v�&��q��1�E�9�9��q���A��e�)�O�%���9�#�B�i�[�F��F��
�
�e�$�6���(�(�6�"�"��s�BB)rmNrrNrTTNNNNNFNNT)NNF)iNr')NN).r4r5r6rcr�rNr�r%r�r�r��propertyr1r�r�r�r�r�r�rrr�r�r�rr�r�rlr��classmethodr�r�r�r�r�r�r�rSrrr�rrr�rrr7rr$riri�s����@�	�*��
���T�F�"��1�����������
����$����%AB�F� �	��1��1�� �� �&�#�2�hC�&%�d�j�j�1��
���&�,�,��0���,	��5$��5$�n.N�`F�P�4����@�/��"��
��
�	�$���'�1��,D0�L	%�#rri)2�
__future__rr��loggingr�r�r�
contextlibr�socketrr�rr�rNrmr�_collectionsr	r�r
r�
exceptionsrr
rrrrrrrr�packagesr�
util.responserr�	getLoggerr4r��objectrr9r?rLrUrYr�rir7rr$�<module>r+s���&�	��
���%�'�+�	
���(�3�����<��g����!��"�V�"�@�v��@�&�@�<
�����"�6��*
�R#�2�9�9�R#rpython3.12/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-312.pyc000064400000006576151732702450023407 0ustar00�

R`i
���dZddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
dd	lmZdd
lmZmZmZddlmZddlmZdd
lmZddlmZddlmZ	ddlZej>de d��dZ"dZ#e	Z	dZ$ejJe&�jOe��ejPfd�Z)[ejTdejVd��ejTdejXd��ejTdejZd��ejTdej\d��ej^fd�Z0y#e!$rY��wxYw)ze
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more
�)�absolute_importN)�NullHandler�)�
exceptions)�__version__)�HTTPConnectionPool�HTTPSConnectionPool�connection_from_url)�encode_multipart_formdata)�PoolManager�ProxyManager�proxy_from_url)�HTTPResponse)�make_headers)�Retry)�Timeout)�get_hostz�'urllib3[secure]' extra is deprecated and will be removed in a future release of urllib3 2.x. Read more in this issue: https://github.com/urllib3/urllib3/issues/2680�)�category�
stacklevelz(Andrey Petrov (andrey.petrov@shazow.net)�MIT)rr	rr
rrr�add_stderr_loggerr
�disable_warningsrrrrc��tjt�}tj�}|j	tj
d��|j
|�|j|�|jdt�|S)z�
    Helper for quickly adding a StreamHandler to the logger. Useful for
    debugging.

    Returns the handler after adding it.
    z%%(asctime)s %(levelname)s %(message)sz,Added a stderr logging handler to logger: %s)	�logging�	getLogger�__name__�
StreamHandler�setFormatter�	Formatter�
addHandler�setLevel�debug)�level�logger�handlers   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/__init__.pyrr?sj���
�
�x�
(�F��#�#�%�G�����*�*�+R�S�T�
���g��
�O�O�E��
�L�L�?��J��N��alwaysT)�append�defaultc�0�tjd|�y)z<
    Helper for quickly disabling all urllib3 warnings.
    �ignoreN)�warnings�simplefilter)rs r'rrbs��
���(�H�-r()1�__doc__�
__future__rrr.r�r�_versionr�connectionpoolrr	r
�filepostr�poolmanagerrr
r�responser�util.requestr�
util.retryr�util.timeoutr�util.urlr�urllib3_secure_extra�warn�DeprecationWarning�ImportError�
__author__�__license__�__all__rrr!�DEBUGrr/�SecurityWarning�SubjectAltNameWarning�InsecurePlatformWarning�SNIMissingWarning�HTTPWarningr�r(r'�<module>rJs<���'�����!�X�X�/�B�B�"�&��!�����H�M�M�	9�$���8�
�������"����(��&�&�{�}�5�$�M�M��&�����h�
� :� :�4�H�����i��!A�!A�$�O�����i��!C�!C�D�Q�����i��!=�!=�d�K�)�4�4�.��M�	��	�s�D?�?E�Epython3.12/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-312.pyc000064400000036765151732702450024330 0ustar00�

R`i;*���ddlmZ	ddlmZmZ	ddlmZddlm	Z	ddl
mZdd	lm
Z
dd
lmZmZddgZe�ZGd
�de�ZGd�de�Zy#e$rddlmZmZY�RwxYw#e$r
Gd�d�ZY�`wxYw)�)�absolute_import)�Mapping�MutableMapping)�RLockc��eZdZd�Zd�Zy)rc��y�N���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/_collections.py�	__enter__zRLock.__enter__����c��yr	r
)r�exc_type�	exc_value�	tracebacks    r
�__exit__zRLock.__exit__rrN)�__name__�
__module__�__qualname__rrr
rr
rrs��	�	rr)�OrderedDict�)�
InvalidHeader)�six)�iterkeys�
itervalues�RecentlyUsedContainer�HTTPHeaderDictc�F�eZdZdZeZdd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
y)ra�
    Provides a thread-safe dict-like container which maintains up to
    ``maxsize`` keys while throwing away the least-recently-used keys beyond
    ``maxsize``.

    :param maxsize:
        Maximum number of recent elements to retain.

    :param dispose_func:
        Every time an item is evicted from the container,
        ``dispose_func(value)`` is called.  Callback which will get called
    Nc�h�||_||_|j�|_t	�|_yr	)�_maxsize�dispose_func�ContainerCls�
_containerr�lock)r�maxsizer$s   r
�__init__zRecentlyUsedContainer.__init__/s*����
�(����+�+�-����G��	rc��|j5|jj|�}||j|<|cddd�S#1swYyxYwr	)r'r&�pop)r�key�items   r
�__getitem__z!RecentlyUsedContainer.__getitem__6s8��
�Y�Y��?�?�&�&�s�+�D�#'�D�O�O�C� ���Y�Y�s�,A�Ac��t}|j5|jj|t�}||j|<t	|j�|j
kDr|jj
d��\}}ddd�|jr|tur|j|�yyy#1swY�1xYw)NF)�last)�_Nullr'r&�get�lenr#�popitemr$)rr,�value�
evicted_value�_keys     r
�__setitem__z!RecentlyUsedContainer.__setitem__=s����
�
�Y�Y� �O�O�/�/��U�;�M�#(�D�O�O�C� ��4�?�?�#�d�m�m�3�&*�o�o�&=�&=�5�&=�&I�#��m������e�!;����m�,�"<���Y�s�A1B4�4B=c��|j5|jj|�}ddd�|jr|j�yy#1swY�(xYwr	)r'r&r+r$)rr,r5s   r
�__delitem__z!RecentlyUsedContainer.__delitem__LsH��
�Y�Y��O�O�'�'��,�E��������e�$���Y�s�A�Ac�p�|j5t|j�cddd�S#1swYyxYwr	)r'r3r&rs r
�__len__zRecentlyUsedContainer.__len__Ss��
�Y�Y��t���'��Y�Y�s�,�5c��td��)Nz7Iteration over this class is unlikely to be threadsafe.)�NotImplementedErrorrs r
�__iter__zRecentlyUsedContainer.__iter__Ws��!�E�
�	
rc��|j5tt|j��}|jj	�ddd�|j
rD]}|j|��yy#1swY�/xYwr	)r'�listrr&�clearr$)r�valuesr5s   r
rBzRecentlyUsedContainer.clear\sa��
�Y�Y��*�T�_�_�5�6�F��O�O�!�!�#��
������!�!�%�(� ���Y�s�9A4�4A=c��|j5tt|j��cddd�S#1swYyxYwr	)r'rArr&rs r
�keyszRecentlyUsedContainer.keysfs$��
�Y�Y������1�2��Y�Y�s�5�>)�
N)rrr�__doc__rr%r)r.r8r:r<r?rBrEr
rr
rrs6����L���
-�%�(�
�
)�3rc���eZdZdZd�fd�	Zd�Zd�Zd�Zd�Zd�Z	d�Z
ejre
jZe
jZe�Zd	�Zd
�Zefd�Zd�Zd
�Zd�Zefd�ZeZeZeZeZd�Zd�Zd�Zd�Z d�Z!d�Z"e#d��Z$�xZ%S)r ap
    :param headers:
        An iterable of field-value pairs. Must not contain multiple field names
        when compared case-insensitively.

    :param kwargs:
        Additional field-value pairs to pass in to ``dict.update``.

    A ``dict`` like container for storing HTTP Headers.

    Field names are stored and compared case-insensitively in compliance with
    RFC 7230. Iteration provides the first case-sensitive key seen for each
    case-insensitive pair.

    Using ``__setitem__`` syntax overwrites fields that compare equal
    case-insensitively in order to maintain ``dict``'s api. For fields that
    compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
    in a loop.

    If multiple fields that are equal case-insensitively are passed to the
    constructor or ``.update``, the behavior is undefined and some will be
    lost.

    >>> headers = HTTPHeaderDict()
    >>> headers.add('Set-Cookie', 'foo=bar')
    >>> headers.add('set-cookie', 'baz=quxx')
    >>> headers['content-length'] = '7'
    >>> headers['SET-cookie']
    'foo=bar, baz=quxx'
    >>> headers['Content-Length']
    '7'
    c����tt|��t�|_|�3t|t�r|j
|�n|j|�|r|j|�yyr	)�superr r)rr&�
isinstance�
_copy_from�extend)r�headers�kwargs�	__class__s   �r
r)zHTTPHeaderDict.__init__�sU���
�n�d�,�.�%�-������'�>�2�����(����G�$���K�K���rc�z�||g|j|j�<|j|j�Sr	�r&�lower�rr,�vals   r
r8zHTTPHeaderDict.__setitem__�s/��(+�S�z�����	�	��$����s�y�y�{�+�+rc�d�|j|j�}dj|dd�S)N�, r�r&rS�joinrTs   r
r.zHTTPHeaderDict.__getitem__�s+���o�o�c�i�i�k�*���y�y��Q�R��!�!rc�:�|j|j�=yr	rR�rr,s  r
r:zHTTPHeaderDict.__delitem__�s���O�O�C�I�I�K�(rc�:�|j�|jvSr	)rSr&r[s  r
�__contains__zHTTPHeaderDict.__contains__�s���y�y�{�d�o�o�-�-rc�
�t|t�s
t|d�syt|t|��st|�|�}t	d�|j�D��t	d�|j�D��k(S)NrEFc3�FK�|]\}}|j�|f���y�wr	�rS��.0�k�vs   r
�	<genexpr>z(HTTPHeaderDict.__eq__.<locals>.<genexpr>�s!����A�/@�t�q�!�Q�W�W�Y��N�/@���!c3�FK�|]\}}|j�|f���y�wr	r`ras   r
rez(HTTPHeaderDict.__eq__.<locals>.<genexpr>�s$����J
�'9�t�q�!�Q�W�W�Y��N�'9�rf)rKr�hasattr�type�dict�
itermerged�r�others  r
�__eq__zHTTPHeaderDict.__eq__�su���%��)�'�%��2H���%��d��,��D��J�u�%�E��A�t���/@�A�A�T�J
�',�'7�'7�'9�J
�F
�
�	
rc�&�|j|�Sr	)rnrls  r
�__ne__zHTTPHeaderDict.__ne__�s���;�;�u�%�%�%rc�,�t|j�Sr	)r3r&rs r
r<zHTTPHeaderDict.__len__�s���4�?�?�#�#rc#�XK�|jj�D]	}|d���y�w)Nr)r&rC)r�valss  r
r?zHTTPHeaderDict.__iter__�s&�����O�O�*�*�,�D��q�'�M�-�s�(*c�X�	||}||=|S#t$r||jur�|cYSwxYw)z�D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
        If key is not found, d is returned if given, otherwise KeyError is raised.
        )�KeyError�_HTTPHeaderDict__marker)rr,�defaultr5s    r
r+zHTTPHeaderDict.pop�sC��	���I�E��S�	��L��
�	��$�-�-�'���N�	�s��)�)c�*�	||=y#t$rYywxYwr	)rur[s  r
�discardzHTTPHeaderDict.discard�s ��	��S�	���	��	�s��	�c��|j�}||g}|jj||�}||ur|j|�yy)z�Adds a (name, value) pair, doesn't overwrite the value if it already
        exists.

        >>> headers = HTTPHeaderDict(foo='bar')
        >>> headers.add('Foo', 'baz')
        >>> headers['foo']
        'bar, baz'
        N)rSr&�
setdefault�append)rr,rU�	key_lower�new_valsrss      r
�addzHTTPHeaderDict.add�sG���I�I�K�	���:�����)�)�)�X�>���4���K�K��� rc�Z�t|�dkDr#tdjt|����t|�dk\r|dnd}t|t�r+|j�D]\}}|j
||��n�t|t�r|D]}|j
|||��nSt|d�r+|j�D]}|j
|||��n|D]\}}|j
||��|j�D]\}}|j
||��y)z�Generic import function for any type of header-like object.
        Adapted version of MutableMapping.update in order to insert items
        with self.add instead of self.__setitem__
        rz9extend() takes at most 1 positional arguments ({0} given)rr
rEN)r3�	TypeError�formatrKr �	iteritemsrrrhrE�items)r�argsrOrmr,rUr5s       r
rMzHTTPHeaderDict.extend�s��
�t�9�q�=��(�(.��s�4�y�(9��
��t�9��>��Q��r���e�^�,�!�O�O�-���S�����c�"�.�
��w�
'�������e�C�j�)��
�U�F�
#��z�z�|������e�C�j�)�$�$�
��U�����e�$�$�!�,�,�.�J�C���H�H�S�%� �)rc��	|j|j�}|ddS#t$r||jurgcYS|cYSwxYw)zmReturns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist.rN)r&rSrurv)rr,rwrss    r
�getlistzHTTPHeaderDict.getlistsO��	��?�?�3�9�9�;�/�D����8�O���	��$�-�-�'��	��N�	�s�$�A�A�Ac�f�t|�j�dt|j���d�S)N�(�))rirrjrkrs r
�__repr__zHTTPHeaderDict.__repr__s#����:�.�.��T�_�_�5F�0G�H�Hrc��|D]O}|j|�}t|t�rt|�}|g|z|j|j	�<�Qyr	)r�rKrAr&rS)rrmr,rUs    r
rLzHTTPHeaderDict._copy_fromsG���C��-�-��$�C��#�t�$��3�i��,/�5�3�;�D�O�O�C�I�I�K�(�rc�H�t|��}|j|�|Sr	)rirL)r�clones  r
�copyzHTTPHeaderDict.copy"s"����T�
���
������rc#�zK�|D]2}|j|j�}|ddD]}|d|f���
�4y�w)z8Iterate over all header lines, including duplicate ones.rNrrR)rr,rsrUs    r
r�zHTTPHeaderDict.iteritems'sB�����C��?�?�3�9�9�;�/�D��A�B�x���1�g�s�l�"� ��s�9;c#�K�|D]:}|j|j�}|ddj|dd�f���<y�w)z:Iterate over all headers, merging duplicate ones together.rrWrNrXrTs   r
rkzHTTPHeaderDict.itermerged.sB�����C��/�/�#�)�)�+�.�C��a�&�$�)�)�C���G�,�,�,��s�AAc�4�t|j��Sr	)rAr�rs r
r�zHTTPHeaderDict.items4s���D�N�N�$�%�%rc�2�d}g}|jD]}}|j|�r4|std|z��|d\}}||dz|j�zf|d<�H|j	dd�\}}|j||j�f��||�S)z4Read headers from a Python 2 httplib message object.)� �	z/Header continuation with no previous header: %s���r��:r)rN�
startswithr�strip�splitr|)�cls�message�obs_fold_continued_leadersrN�liner,r5s       r
�from_httplibzHTTPHeaderDict.from_httplib7s���&1�"����O�O�D����9�:��(�I�D�P���")���J�C��#&����d�j�j�l�(B�"C�G�B�K�����C��+�J�C���N�N�C�����/�0�$�"�7�|�rr	)&rrrrGr)r8r.r:r]rnrpr�PY2rrr�objectrvr<r?r+ryrrMr��
getheaders�getallmatchingheaders�iget�get_allr�rLr�r�rkr��classmethodr��
__classcell__)rPs@r
r r ks�����B	 �,�"�)�.�
�&��w�w�!�*�*��#�.�.�
��x�H�$��
 (��"�� !�8$,�
��J�#���D��G�I�7��
#�-�&����rN)�
__future__r�collections.abcrr�ImportError�collections�	threadingrr�
exceptionsr�packagesr�packages.sixrr�__all__r�r1rr r
rr
�<module>r�s���&�4�7�	��$�%��.�"�$4�
5��	���I3�N�I3�Xf�^�f��M�4�3�3�4�������s"�A�A&�
A#�"A#�&A8�7A8python3.12/site-packages/pip/_vendor/urllib3/__pycache__/request.cpython-312.pyc000064400000016257151732702450023335 0ustar00�

R`i#����ddlmZddlZddlmZddlmZddlmZdgZ	Gd�de
�Zejs7Gd	�d
ejej�Zeeje_yy)�)�absolute_importN�)�encode_multipart_formdata)�six)�	urlencode�RequestMethodsc�P�eZdZdZhd�Zd	d�Z				d
d�Zdd�Zdd�Z				d
d�Z	y)ra�
    Convenience mixin for classes who implement a :meth:`urlopen` method, such
    as :class:`urllib3.HTTPConnectionPool` and
    :class:`urllib3.PoolManager`.

    Provides behavior for making common types of HTTP request methods and
    decides which type of request field encoding to use.

    Specifically,

    :meth:`.request_encode_url` is for sending requests whose fields are
    encoded in the URL (such as GET, HEAD, DELETE).

    :meth:`.request_encode_body` is for sending requests whose fields are
    encoded in the *body* of the request using multipart or www-form-urlencoded
    (such as for POST, PUT, PATCH).

    :meth:`.request` is for making any kind of request, it will look up the
    appropriate encoding format and use one of the above two methods to make
    the request.

    Initializer parameters:

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
    >�GET�HEAD�DELETE�OPTIONSNc��|xsi|_y�N)�headers)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/request.py�__init__zRequestMethods.__init__+s
���}�"���c��td��)NzMClasses extending RequestMethods must implement their own ``urlopen`` method.)�NotImplementedError)r�method�url�bodyr�encode_multipart�multipart_boundary�kws        r�urlopenzRequestMethods.urlopen.s��"�
,�
�	
rc��|j�}||d<||jvr|j||f||d�|��S|j||f||d�|��S)a�
        Make a request using :meth:`urlopen` with the appropriate encoding of
        ``fields`` based on the ``method`` used.

        This is a convenience method that requires the least amount of manual
        effort. It can be used in most situations, while still having the
        option to drop down to more specific methods when necessary, such as
        :meth:`request_encode_url`, :meth:`request_encode_body`,
        or even the lowest level :meth:`urlopen`.
        �request_url)�fieldsr)�upper�_encode_url_methods�request_encode_url�request_encode_body)rrrr r�
urlopen_kws      r�requestzRequestMethods.request=s��������$'�
�=�!��T�-�-�-�*�4�*�*����$*�G��?I��
�,�4�+�+����$*�G��?I��
rc��|�|j}d|i}|j|�|r|dt|�zz
}|j||fi|��S)z�
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
        r�?)r�updaterr)rrrr rr%�extra_kws       rr#z!RequestMethods.request_encode_urlUsW��
�?��l�l�G��w�'�����
�#���3��6�*�*�*�C��t�|�|�F�C�4�8�4�4rc��|�|j}dii}|r;d|vrtd��|rt||��\}	}
n
t|�d}
}	|	|d<d|
i|d<|dj	|�|j	|�|j
||fi|��S)a�
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the body. This is useful for request methods like POST, PUT, PATCH, etc.

        When ``encode_multipart=True`` (default), then
        :func:`urllib3.encode_multipart_formdata` is used to encode
        the payload with the appropriate content type. Otherwise
        :func:`urllib.parse.urlencode` is used with the
        'application/x-www-form-urlencoded' content type.

        Multipart encoding must be used when posting files, and it's reasonably
        safe to use it in other times too. However, it may break request
        signing, such as with OAuth.

        Supports an optional ``fields`` parameter of key/value strings AND
        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
        the MIME type is optional. For example::

            fields = {
                'foo': 'bar',
                'fakefile': ('foofile.txt', 'contents of foofile'),
                'realfile': ('barfile.txt', open('realfile').read()),
                'typedfile': ('bazfile.bin', open('bazfile').read(),
                              'image/jpeg'),
                'nonamefile': 'contents of nonamefile field',
            }

        When uploading a file, providing a filename (the first parameter of the
        tuple) is optional but recommended to best mimic behavior of browsers.

        Note that if ``headers`` are supplied, the 'Content-Type' header will
        be overwritten because it depends on the dynamic random boundary string
        which is used to compose the body of the request. The random boundary
        string can be explicitly set with the ``multipart_boundary`` parameter.
        rrzFrequest got values for both 'fields' and 'body', can only specify one.)�boundaryz!application/x-www-form-urlencodedzContent-Type)r�	TypeErrorrrr)r)rrrr rrrr%r*r�content_types           rr$z"RequestMethods.request_encode_bodyes���Z�?��l�l�G��r�?�����#��\��� �%>��%7�&�"��l�
�f�%�7�#��
 $�H�V��#1�<�"@�H�Y�����"�"�7�+����
�#��t�|�|�F�C�4�8�4�4rr)NNTN)NN)
�__name__�
__module__�__qualname__�__doc__r"rrr&r#r$�rrrrsE���8?��%�����

��05�(����H5rc��eZdZd�Zy)�
RequestModulec��td��)z�
            If user tries to call this module directly urllib3 v2.x style raise an error to the user
            suggesting they may need urllib3 v2
            z�'module' object is not callable
urllib3.request() method is not supported in this release, upgrade to urllib3 v2 to use it
see https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html)r-)r�args�kwargss   r�__call__zRequestModule.__call__�s��
�W��
rN)r/r0r1r9r3rrr5r5�s��
	rr5)�
__future__r�sys�filepostr�packagesr�packages.six.moves.urllib.parser�__all__�objectr�PY2�modulesr/�	__class__r5r3rr�<module>rDsg��&�
�/��6��
��a5�V�a5�H�w�w�����H�-�7�7��'4�C�K�K���#�rpython3.12/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-312.pyc000064400000106743151732702450024676 0ustar00�

R`i6����ddlmZddlZddlZddlZddlZddlZddlZddlmZ	ddlm
Zddlm
Z
mZmZmZmZmZmZmZddlmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"ddl#m$Z$dd	l%m&Z&dd
l'm(Z(ddl)m*Z*ddl+m,Z,dd
l-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:ddl;m<Z<m=Z=ddl;m>Z?ddl;m@Z@mAZA	ddlBZBeBj�ZDe$j�j�ZHej�eJ�ZKeL�ZMGd�deL�ZNej�ej�hZQGd�deNe(�ZRGd�deR�ZSd�ZTd�Z>d �ZUy#eE$r	ddlFmDZDY��wxYw)!�)�absolute_importN)�error��timeout�)�BaseSSLError�BrokenPipeError�DummyConnection�HTTPConnection�
HTTPException�HTTPSConnection�VerifiedHTTPSConnection�port_by_scheme)
�ClosedPoolError�EmptyPoolError�HeaderParsingError�HostChangedError�InsecureRequestWarning�LocationValueError�
MaxRetryError�NewConnectionError�
ProtocolError�
ProxyError�ReadTimeoutError�SSLError�TimeoutError)�six)�queue)�RequestMethods)�HTTPResponse)�is_connection_dropped)�connection_requires_http_tunnel)�	LifoQueue)�set_file_position)�assert_header_parsing)�Retry)�CertificateError)�Timeout)�Url�_encode_target)�_normalize_host)�get_host�	parse_url)�weakref_finalizec�8�eZdZdZdZeZdd�Zd�Zd�Z	d�Z
d�Zy)	�ConnectionPoola;
    Base class for all connection pools, such as
    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.

    .. note::
       ConnectionPool.urlopen() does not normalize or percent-encode target URIs
       which is useful if your target server doesn't support percent-encoded
       target URIs.
    Nc��|std��t||j��|_|j	�|_||_y)NzNo host specified.��scheme)rr+r3�host�lower�_proxy_host�port)�selfr4r7s   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/connectionpool.py�__init__zConnectionPool.__init__Rs8���$�%9�:�:�#�D����=��	��:�:�<�����	�c�f�t|�j�d|j�d|j�d�S)Nz(host=z, port=�))�type�__name__r4r7�r8s r9�__str__zConnectionPool.__str__Zs!��)-�d��)<�)<�d�i�i����S�Sr;c��|S�N�r@s r9�	__enter__zConnectionPool.__enter__]s���r;c�$�|j�y)NF)�close)r8�exc_type�exc_val�exc_tbs    r9�__exit__zConnectionPool.__exit__`s���
�
��r;c��y�zD
        Close all pooled connections and disable the pool.
        NrDr@s r9rGzConnectionPool.closee���	
r;rC)r?�
__module__�__qualname__�__doc__r3r#�QueueClsr:rArErKrGrDr;r9r0r0Ds-����F��H��T���

r;r0c
��eZdZdZdZeZeZdde	jdddddddf
d�Zd�Zdd�Z
d	�Zd
�Zd�Zd�Zd
�Zedfd�Zd�Zd�Zd�Zdddddeddddf
d�Zy)�HTTPConnectionPoola:	
    Thread-safe connection pool for one host.

    :param host:
        Host used for this HTTP Connection (e.g. "localhost"), passed into
        :class:`http.client.HTTPConnection`.

    :param port:
        Port used for this HTTP Connection (None is equivalent to 80), passed
        into :class:`http.client.HTTPConnection`.

    :param strict:
        Causes BadStatusLine to be raised if the status line can't be parsed
        as a valid HTTP/1.0 or 1.1 status line, passed into
        :class:`http.client.HTTPConnection`.

        .. note::
           Only works in Python 2. This parameter is ignored in Python 3.

    :param timeout:
        Socket timeout in seconds for each individual connection. This can
        be a float or integer, which sets the timeout for the HTTP request,
        or an instance of :class:`urllib3.util.Timeout` which gives you more
        fine-grained control over request timeouts. After the constructor has
        been parsed, this is always a `urllib3.util.Timeout` object.

    :param maxsize:
        Number of connections to save that can be reused. More than 1 is useful
        in multithreaded situations. If ``block`` is set to False, more
        connections will be created but they will not be saved once they've
        been used.

    :param block:
        If set to True, no more than ``maxsize`` connections will be used at
        a time. When no free connections are available, the call will block
        until a connection has been released. This is a useful side effect for
        particular multithreaded situations where one does not want to use more
        than maxsize connections per host to prevent flooding.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param retries:
        Retry configuration to use by default with requests in this pool.

    :param _proxy:
        Parsed proxy URL, should not be used directly, instead, see
        :class:`urllib3.ProxyManager`

    :param _proxy_headers:
        A dictionary with proxy headers, should not be used directly,
        instead, see :class:`urllib3.ProxyManager`

    :param \**conn_kw:
        Additional parameters are used to create fresh :class:`urllib3.connection.HTTPConnection`,
        :class:`urllib3.connection.HTTPSConnection` instances.
    �httpNFrc���tj|||�tj||�||_t	|t
�stj|�}|�tj}||_	||_
|j|�|_||_
|	|_|
xsi|_||_t#|�D]}
|jj%d��d|_d|_||_|jrN|j*j-dg�|j|j*d<|j |j*d<|j}t/|t0|�y)Nr�socket_options�proxy�proxy_config)r0r:r�strict�
isinstancer(�
from_floatr&�DEFAULTr�retriesrR�pool�blockrX�
proxy_headersrY�xrange�put�num_connections�num_requests�conn_kw�
setdefaultr.�_close_pool_connections)r8r4r7rZr�maxsizer`�headersr^�_proxy�_proxy_headers�
_proxy_configrf�_r_s               r9r:zHTTPConnectionPool.__init__�s-��	����d�D�1�����g�.�����'�7�+��(�(��1�G��?��m�m�G��������M�M�'�*��	���
���
�+�1�r���)������A��I�I�M�M�$��!� !����������:�:�
�L�L�#�#�$4�b�9�$(�J�J�D�L�L��!�+/�+<�+<�D�L�L��(��y�y��	��6��=r;c�J�|xjdz
c_tjd|j|j|jxsd�|j
d|j|j|jj|jd�|j��}|S)z9
        Return a fresh :class:`HTTPConnection`.
        rz(Starting new HTTP connection (%d): %s:%s�80)r4r7rrZrD)
rd�log�debugr4r7�
ConnectionClsr�connect_timeoutrZrf�r8�conns  r9�	_new_connzHTTPConnectionPool._new_conn�s���	
����!���	�	�6�� � ��I�I��I�I���		
�"�t�!�!�
��������L�L�0�0��;�;�	
�
�l�l�
���r;c��d}	|jj|j|��}|rMt|�rBtjd|j�|j�t|dd�dk(rd}|xs|j�S#t$r
t	|d��t
j$r|jrt|d��Y��wxYw)	a�
        Get a connection. Will return a pooled connection if one is available.

        If no connections are available and :prop:`.block` is ``False``, then a
        fresh connection is returned.

        :param timeout:
            Seconds to wait before giving up and raising
            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
            :prop:`.block` is ``True``.
        N)r`rzPool is closed.z>Pool reached maximum size and no more connections are allowed.z Resetting dropped connection: %s�	auto_openrr)r_�getr`�AttributeErrorrr�Emptyrr!rqrrr4rG�getattrrw)r8rrvs   r9�	_get_connzHTTPConnectionPool._get_conns�����	��9�9�=�=�t�z�z�7�=�C�D��)�$�/��I�I�8�$�)�)�D��J�J�L��t�[�!�,��1����'�t�~�~�'�'��+�	;�!�$�(9�:�:��{�{�	��z�z�$��T���
�
	�s�'B�?C�Cc� �	|jj|d��y#t$rYnQtj$r<t
j
d|j|jj��YnwxYw|r|j�yy)a�
        Put a connection back into the pool.

        :param conn:
            Connection object for the current host and port as returned by
            :meth:`._new_conn` or :meth:`._get_conn`.

        If the pool is already full, the connection is closed and discarded
        because we exceeded maxsize. If connections are discarded frequently,
        then maxsize should be increased.

        If the pool is closed, then the connection will be closed and discarded.
        F�r`NzLConnection pool is full, discarding connection: %s. Connection pool size: %s)
r_rcr{r�Fullrq�warningr4�qsizerGrus  r9�	_put_connzHTTPConnectionPool._put_conn,ss��	��I�I�M�M�$�e�M�,����	���z�z�	��K�K�^��	�	��	�	���!�
�	����J�J�L�s� �	A9�AA9�8A9c��y)�U
        Called right before a request is made, after the socket is created.
        NrDrus  r9�_validate_connz!HTTPConnectionPool._validate_connKrNr;c��yrCrDrus  r9�_prepare_proxyz!HTTPConnectionPool._prepare_proxyQs��r;c��|tur|jj�St|t�r|j�St	j
|�S)z:Helper that always returns a :class:`urllib3.util.Timeout`)�_Defaultr�cloner[r(r\)r8rs  r9�_get_timeoutzHTTPConnectionPool._get_timeoutUsF���h���<�<�%�%�'�'��g�w�'��=�=�?�"��%�%�g�.�.r;c���t|t�rt||d|z��t|d�r"|jt
vrt||d|z��dt
|�vs
dt
|�vrt||d|z��y)zAIs the error actually a timeout? Will raise a ReadTimeout or pass�!Read timed out. (read timeout=%s)�errnoz	timed outzdid not complete (read)N)r[�
SocketTimeoutr�hasattrr��_blocking_errnos�str)r8�err�url�
timeout_values    r9�_raise_timeoutz!HTTPConnectionPool._raise_timeoutas����c�=�)�"��c�>��N��
��3�� �S�Y�Y�2B�%B�"��c�>��N��
��#�c�(�"�&?�3��D
�'
�#��c�>��N��
�'
r;c��|xjdz
c_|j|�}|j�tj|j
�|_	|j|�	|r|j||fi|��n|j||fi|��|j&}	t)|dd�rp|	dk(rt+||d|	z��|	tj,ur.|j.j1t3j4��n|j.j1|	�		|j7d��}
t)|d	d
�}tBjEd|jF|jH|jJ|||
jL|
jN�		tQ|
jR�|
S#ttf$r$}|j|||j���d}~wwxYw#t$rY��St$rG}|jtj tj"tj$hvr�Yd}~���d}~wwxYw#t8$rB	|j7�}
n,#t:$r }t=j>|d�Yd}~nd}~wwxYwY��RwxYw#ttt@f$r}|j|||	���d}~wwxYw#tTt8f$r3}tBjWd|jY|�|d�
�Yd}~|
Sd}~wwxYw)a
        Perform a request on a given urllib connection object taken from our
        pool.

        :param conn:
            a connection from one of our connection pools

        :param timeout:
            Socket timeout in seconds for the request. This can be a
            float or integer, which will set the same timeout value for
            the socket connect and the socket read, or an instance of
            :class:`urllib3.util.Timeout`, which gives you more fine-grained
            control over your timeouts.
        r)r�r�r�N�sockrr�T)�	buffering�
_http_vsn_strzHTTP/?z%s://%s:%s "%s %s %s" %s %sz$Failed to parse headers (url=%s): %s)�exc_info)-rer��
start_connectr(�resolve_default_timeoutrtrr�r�rr��request_chunked�requestr	�IOErrorr��EPIPE�	ESHUTDOWN�
EPROTOTYPE�read_timeoutr}r�DEFAULT_TIMEOUTr��
settimeout�socket�getdefaulttimeout�getresponse�	TypeError�
BaseExceptionr�
raise_from�SocketErrorrqrrr3r4r7�status�lengthr%�msgrr��
_absolute_url)
r8rv�methodr�r�chunked�httplib_request_kw�timeout_obj�er��httplib_response�http_version�hpes
             r9�
_make_requestz HTTPConnectionPool._make_requestzs���"	
���Q����'�'��0���!�!�#��6�6�{�7R�7R�S���	�����%�	��$��$�$�V�S�G�4F�G�����V�S�?�,>�?�(#�/�/���4���&��q� �&��#�B�\�Q����w�6�6�6��	�	�$�$�V�%=�%=�%?�@��	�	�$�$�\�2�	�
,�#'�#3�#3�d�#3�#C� ��t�_�h�?���	�	�)��K�K��I�I��I�I�����#�#��#�#�
	
�	�!�"2�"6�"6�7� ���w�|�,�	����A�3�d�l�l��K���	�� �	���		��w�w�������� � ���
���			��F�
,�,�'+�'7�'7�'9�$��$�,��N�N�1�d�+�+��	,��	
,���|�[�9�	����A�3�l��K���	��(#�I�.�	��K�K�6��"�"�3�'���	
�
�
� ���	�s��F*�.+G �$H>�J=�*G�9G�G� 	H;�,H;�4<H6�6H;�>	J	�I�J	�	J�"I=�8J	�=J�J	�J�J	�	J�J:� J5�5J:�=K?�(K:�:K?c�p�t|j|j|j|��jS)N)r3r4r7�path)r)r3r4r7r�)r8r�s  r9r�z HTTPConnectionPool._absolute_url�s%���$�+�+�D�I�I�D�I�I�D�Q�U�U�Ur;c�\�|j�y|jdc}|_t|�yrM)r_rh)r8�old_pools  r9rGzHTTPConnectionPool.close�s-���9�9���"�i�i����$�)�	 ��)r;c�H�|jd�ryt|�\}}}|�
t||��}|jr|st	j
|�}n&|js|t	j
|�k(rd}|||f|j|j|jfk(S)zj
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        �/TNr2)�
startswithr,r+r7rrzr3r4)r8r�r3r4r7s     r9�is_same_hostzHTTPConnectionPool.is_same_hosts���
�>�>�#���&�c�]����d���"�4��7�D��9�9�T�!�%�%�f�-�D����t�~�'9�'9�&�'A�A��D���d�#����T�Y�Y��	�	�'J�J�Jr;Tc
��
�t|�}|j}|�|j}t|t�s"t	j
|||j��}|
�|
jdd�}
|r|j|�s
t|||��|jd�rtjt|��}ntj|j�}d}|
}t|j |j"|�}|s+|j%�}|j'|j(�d}d}t+||�}	|j-|�}|j/|	��}|j0|_|j duxrt5|dd�}|r|r|j7|�|j9|||||||�	�}|
s|nd}||
d
<|j:j<|f|||d�|
��}d}|s|xr|j[�}d}|r|j]|�	|s7t^jad|||�|jb|||||||f||	|
||d�|
��S|xrje�}|r~jfdk(rd}	|jS||||��}|jm�|jo|�t^jqd||�|jb||||f|||||	|
||d�|
��Stsjjd��}|ju||jf|�rl	|jS||||��}|jm�|jY|�t^jqd|�|jb||||f|||||	|
||d�|
��S|S#t>$rd}d}�t@tBtDtFtHtJtLf$�r}d}d�}t|tH�rO|j rC||�r;|j r/|j jd
k(rtOdtK|��}nst|tHtLf�rtK|�}nQt|tDtPf�r|j r
tOd|�}n"t|tDtBf�rtGd|�}|jS||||tUjV�d��}|jY�|}Yd}~���d}~wwxYw#|s|xr|j[�}d}|r|j]|�wwxYw#th$r"|jjr|jm��|cYSwxYw#th$r"|jvr|jm��|cYSwxYw)a+
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param url:
            The URL to perform the request on.

        :param body:
            Data to send in the request body, either :class:`str`, :class:`bytes`,
            an iterable of :class:`str`/:class:`bytes`, or a file-like object.

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.

            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.

            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.

        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When ``False``, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.

        :param int body_pos:
            Position to seek to in file-like body in the event of a retry or
            redirect. Typically this won't need to be set because urllib3 will
            auto-populate the value when needed.

        :param \**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        N)�redirect�default�preload_contentTr�Frr�)r�bodyrjr��request_method)r_�
connectionr^c��djtjdt|�j	���}d|vxsd|vS)N� z[^a-z]zwrong version numberzunknown protocol)�join�re�splitr�r5)�	ssl_error�messages  r9�%_is_ssl_error_message_from_http_proxyzIHTTPConnectionPool.urlopen.<locals>._is_ssl_error_message_from_http_proxy�sB���(�(�2�8�8�H�c�)�n�6J�6J�6L�#M�N��*�g�5�V�9K�w�9V�r;�httpsz�Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxyzCannot connect to proxy.zConnection aborted.�)r�_pool�_stacktracez1Retrying (%r) after connection broken by '%r': %s)r�pool_timeout�release_connr��body_posi/�GET)�responser�zRedirecting %s -> %s)r^r��assert_same_hostrr�r�r�r�zRetry-Afterz	Retry: %s)<r-r3rjr[r&�from_intr^rzr�rr�r�
ensure_strr*r�r"rXrY�copy�updaterar$r�r~rtrr}r�r��ResponseCls�from_httplibrrrr�rrrr'rr�	increment�sysr��sleeprGr�rqr��urlopen�get_redirect_locationr�r�raise_on_redirect�
drain_conn�sleep_for_retryrr�bool�is_retry�raise_on_status)r8r�r�r�rjr^r�r�rr�r�r�r��response_kw�
parsed_url�destination_schemerv�release_this_conn�http_tunnel_requiredr��
clean_exitr��is_new_proxy_connr��
response_connr�r�r��redirect_location�has_retry_afters                              r9r�zHTTPConnectionPool.urlopens���Z�s�^�
�'�.�.���?��l�l�G��'�5�)��n�n�W�x����V�G���&�?�?�+<�d�C�L��D�$5�$5�c�$:�"�4��g�6�6��>�>�#���.�.���!4�5�C��.�.����0�C���)��>��J�J��)�)�+=� 
��$��l�l�n�G��N�N�4�-�-�.����
�%�T�8�4��w	%��+�+�G�4�K��>�>�,�>�7�D�&�6�6�D�L� $�
�
�$� 6�!�w��f�d�@�<��!�%9��#�#�D�)� $�1�1����#���� 2� ��)5�D�$�M�-3�K�(�)�5�t�'�'�4�4� ���(��	�
��H��J�@�
�,��
�
���$(�!� ����t�$���K�K�C�W�c�SV�
� �4�<�<������� �� �)�)��!����
�"%�I��)G�)G�)I������#�%���
 �!�+�+�F�C�(�RV�+�W��
���!��#�#�H�-��I�I�,�c�3D�E��4�<�<��!���	�
 �!�!1��)�)��!����
�"�x�/�/�3�3�M�B�C�����F�H�O�O�_�E�
 �!�+�+�F�C�(�RV�+�W��
���!��M�M�(�#��I�I�k�3�'��4�<�<�����	�
 �!�!1��)�)��!����
� ���A�	��J� %���
�������
�5	��J�
��1�l�+��J�J�9�!�<��J�J��J�J�%�%��0��4��Q�K����A��.>�?�@��Q�K���A��-?�@�A�d�j�j��9�1�=���A��]�;�<�!�"7��;���'�'���1�D�c�l�l�n�Q�>O�(��G�
�M�M�O��C��k5	��p�
�,��
�
���$(�!� ����t�$�	!��F!�
 ��,�,��'�'�)����	
 ��<!�
 ��*�*��'�'�)����	
 �sP�>B-N�8T�&U
�6S(�	DS#�S+�#S(�(S+�+.T�(U�U�
(U5�4U5rC)r?rOrPrQr3rrsr r�r(r�r:rwr~r�r�r�r�r�r�r�r�rGr�r�rDr;r9rTrTps���9�v�F�"�M��K�
���'�'��������>>�@�*%(�N�>
�
�
/��4*2�5�u �nV�
*�K�2����������tr;rTc�|��eZdZdZdZeZddejdddddddddddddddfd�Z	d�Z
d�Zd	�Z�fd
�Z
�xZS)�HTTPSConnectionPoola
    Same as :class:`.HTTPConnectionPool`, but HTTPS.

    :class:`.HTTPSConnection` uses one of ``assert_fingerprint``,
    ``assert_hostname`` and ``host`` in this order to verify connections.
    If ``assert_hostname`` is False, no verification is done.

    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs``,
    ``ca_cert_dir``, ``ssl_version``, ``key_password`` are only used if :mod:`ssl`
    is available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade
    the connection socket into an SSL socket.
    r�NFrc
���tj||||||||||	|
fi|��||_||_|
|_||_||_||_||_||_	||_
yrC)rTr:�key_file�	cert_file�	cert_reqs�key_password�ca_certs�ca_cert_dir�ssl_version�assert_hostname�assert_fingerprint)r8r4r7rZrrir`rjr^rkrlr�r�r�r�rrrrrrfs                     r9r:zHTTPSConnectionPool.__init__�s���0	�#�#������������
	
��
	
�!��
�"���"���(��� ��
�&���&���.���"4��r;c
��t|t�rz|j|j|j|j
|j|j|j|j|j��|j|_|S)z�
        Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
        and establish the tunnel if proxy is used.
        )r�r�r�r�rrrr)r[r�set_certr�r�r�r�rrrrrrus  r9�
_prepare_connz!HTTPSConnectionPool._prepare_conn�su���d�3�4��M�M����!�.�.��.�.��.�.���� �,�,� $� 4� 4�#'�#:�#:�
�	
� $�/�/�D���r;c���|j|j|j|j�|jj
dk(rd|_|j�y)z�
        Establishes a tunnel connection through HTTP CONNECT.

        Tunnel connection is established early because otherwise httplib would
        improperly set Host: header to proxy's IP:port.
        r�TN)�
set_tunnelr6r7rarXr3�tls_in_tls_required�connectrus  r9r�z"HTTPSConnectionPool._prepare_proxy�sG��	
����(�(�$�)�)�T�5G�5G�H��:�:����'�'+�D�$����r;c�t�|xjdz
c_tjd|j|j|jxsd�|j
r|j
turtd��|j}|j}|j�,|jj}|jj}|j
d|||jj|j|j|j|jd�|j��}|j!|�S)zF
        Return a fresh :class:`http.client.HTTPSConnection`.
        rz)Starting new HTTPS connection (%d): %s:%s�443zCCan't connect to HTTPS URL because the SSL module is not available.)r4r7rrZr�r�r�rD)rdrqrrr4r7rsr
rrXrrtrZr�r�r�rfr)r8�actual_host�actual_portrvs    r9rwzHTTPSConnectionPool._new_conn�s	��	
����!���	�	�7�� � ��I�I��I�I���		
��!�!�T�%7�%7�?�%J��U��
��i�i���i�i���:�:�!��*�*�/�/�K��*�*�/�/�K�!�t�!�!�	
����L�L�0�0��;�;��n�n��]�]��*�*�	
��l�l�	
���!�!�$�'�'r;c� ��tt|�|�t|dd�s|j	�|j
s't
jd|jzt�t|dd�durt
jdt�yy)r�r�Nz�Unverified HTTPS request is being made to host '%s'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings�proxy_is_verifiedFz�Unverified HTTPS connection done to an HTTPS proxy. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings)
�superr�r�r}r�is_verified�warnings�warnr4r)r8rv�	__class__s  �r9r�z"HTTPSConnectionPool._validate_conns����	�!�4�7��=��t�V�T�*��L�L�N�����M�M�$�'+�i�i�0�
'�
��4�,�d�3�u�<��M�M�$�
'�
�=r;)r?rOrPrQr3r
rsr(r�r:rr�rwr��
__classcell__)rs@r9r�r��sr�����F�#�M�
���'�'����������������)/5�b�(
�"(�H�r;r�c��t|�\}}}|xstj|d�}|dk(rt|fd|i|��St	|fd|i|��S)a�
    Given a url, return an :class:`.ConnectionPool` instance of its host.

    This is a shortcut for not having to parse out the scheme, host, and port
    of the url before creating an :class:`.ConnectionPool` instance.

    :param url:
        Absolute URL string that must include the scheme. Port is optional.

    :param \**kw:
        Passes additional parameters to the constructor of the appropriate
        :class:`.ConnectionPool`. Useful for specifying things like
        timeout, maxsize, headers, etc.

    Example::

        >>> conn = connection_from_url('http://google.com/')
        >>> r = conn.request('GET', '/')
    �Pr�r7)r,rrzr�rT)r��kwr3r4r7s     r9�connection_from_urlr6s]��("�#���F�D�$��1�>�%�%�f�b�1�D�
���"�4�9�d�9�b�9�9�!�$�8�T�8�R�8�8r;c�l�t||�}|jd�r|jd�r|dd}|S)z?
    Normalize hosts for comparisons and use with sockets.
    �[�]r���)�normalize_hostr��endswith)r4r3s  r9r+r+Rs9��
�$��'�D����s���
�
�c� 2��A�b�z���Kr;c��		|jd��}|r|j��%#tj$rYywxYw)z2Drains a queue of connections and closes each one.Fr�N)rzrGrr|)r_rvs  r9rhrhdsC��
���8�8�%�8�(�D���
�
�����;�;�
��
�s�&(�>�>)V�
__future__rr��loggingr�r�r�rrr�rr�r�rr	r
rrr
rr�
exceptionsrrrrrrrrrrrrr�packagesr�packages.six.movesrr�rr�r �util.connectionr!�
util.proxyr"�
util.queuer#�util.requestr$�
util.responser%�
util.retryr&�util.ssl_match_hostnamer'�util.timeoutr(�util.urlr)r*r+r r,r-�weakref�finalizer.r{�#packages.backports.weakref_finalize�movesrb�	getLoggerr?rq�objectr�r0�EAGAIN�EWOULDBLOCKr�rTr�rrhrDr;r9�<module>r9s��&���	�
�
��'�+�	�	�	������%�#�"�2�7�!�+�0��5�!�)�7�)�F���'�'��

���	�	���g����!���8��%
�V�%
�R�L�L�%�"3�"3�4��Y���Y�xg�,�g�T9�8�$
��W!�F�E�F�s�<D?�?E
�E
python3.12/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-312.pyc000064400000007735151732702450023473 0ustar00�

R`i�	���ddlmZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZejd�d	Zd
�Zd�Zd�Zdd
�Zy)�)�absolute_importN)�BytesIO�)�RequestField)�six)�bzutf-8�c��tjtjd��}tj
s|j
d�}|S)zN
    Our embarrassingly-simple replacement for mimetools.choose_boundary.
    ��ascii)�binascii�hexlify�os�urandomr�PY2�decode)�boundarys ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/filepost.py�choose_boundaryrs6������
�
�2��/�H��7�7��?�?�7�+���O�c#��K�t|t�rtj|�}nt	|�}|D]+}t|t
�r|���tj|����-y�w)z�
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    N)�
isinstance�dictr�	iteritems�iterr�from_tuples)�fields�i�fields   r�iter_field_objectsr sS�����&�$���M�M�&�!����L�����e�\�*��K��*�*�E�2�2�	�s�A#A%c�l�t|t�rd�tj|�D�Sd�|D�S)a-
    .. deprecated:: 1.6

    Iterate over fields.

    The addition of :class:`~urllib3.fields.RequestField` makes this function
    obsolete. Instead, use :func:`iter_field_objects`, which returns
    :class:`~urllib3.fields.RequestField` objects.

    Supports list of (k, v) tuples and dicts.
    c3�*K�|]\}}||f���
y�w�N���.0�k�vs   r�	<genexpr>ziter_fields.<locals>.<genexpr>:s����9�#8�4�1�a��A��#8���c3�*K�|]\}}||f���
y�wr#r$r%s   rr)ziter_fields.<locals>.<genexpr><s����&�v�t�q�!�Q��F�v�r*)rrrr)rs r�iter_fieldsr,-s-���&�$��9�3�=�=��#8�9�9�&�v�&�&rc�N�t�}|�
t�}t|�D]�}|jt	d|z��t|�j|j
��|j}t|t�rt|�}t|tj�rt|�j|�n|j|�|jd���|jt	d|z��td|z�}|j�|fS)aQ
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`urllib3.filepost.choose_boundary`.
    z--%s
s
z--%s--
z multipart/form-data; boundary=%s)rrr �writer�writer�render_headers�datar�int�strr�	text_type�getvalue)rr�bodyrr1�content_types      r�encode_multipart_formdatar8?s����9�D���"�$��#�F�+���
�
�1�Z�8�,�-�.��t����5�/�/�1�2��z�z���d�C� ��t�9�D��d�C�M�M�*��4�L���t�$��J�J�t���
�
�7��,� 	�J�J�q���*�+�,��9�H�D�E�L��=�=�?�L�(�(rr#)�
__future__rr
�codecsr�iorrr�packagesr�packages.sixr�lookupr/rr r,r8r$rr�<module>r?sF��&��
�	�� ���	����w�	��	"���3�('�$#)rpython3.12/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-312.pyc000064400000032346151732702450024023 0ustar00�

R`i ��\�ddlmZddlmZGd�de�ZGd�de�ZGd�d	e�Z	Gd
�de	�Z
Gd�d
e�ZGd�de�ZGd�de�Z
Gd�de�ZeZGd�de
�ZGd�de
�ZGd�de�ZGd�de�ZGd�dee
�ZGd�de�ZGd �d!ee	�ZGd"�d#e	�ZGd$�d%e	�ZGd&�d'ee�ZGd(�d)e�ZGd*�d+e�ZGd,�d-e�ZGd.�d/e�ZGd0�d1e�ZGd2�d3e�Z Gd4�d5e�Z!Gd6�d7e�Z"Gd8�d9e�Z#Gd:�d;e�Z$Gd<�d=ee�Z%Gd>�d?e�Z&Gd@�dAee�ZGdB�dCee�Z'GdD�dEe�Z(GdF�dGe)e�Z*GdH�dIe�Z+GdJ�dKe�Z,GdL�dMe�Z-yN)O�)�absolute_import�)�IncompleteReadc��eZdZdZy)�	HTTPErrorz#Base exception used by this module.N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/exceptions.pyrrs��-�rrc��eZdZdZy)�HTTPWarningz!Base warning used by this module.Nrr
rrrrs��+�rrc��eZdZdZd�Zd�Zy)�	PoolErrorz/Base exception for errors caused within a pool.c�H�||_tj||�d|���y)Nz: )�poolr�__init__)�selfr�messages   rrzPoolError.__init__s����	����4�T�7�!;�<rc��|jdfS)N)NN��	__class__�rs r�
__reduce__zPoolError.__reduce__s���~�~�|�+�+rN�r	r
rrrrr
rrrrs��9�=�,rrc��eZdZdZd�Zd�Zy)�RequestErrorz8Base exception for PoolErrors that have associated URLs.c�@�||_tj|||�y�N)�urlrr)rrr#rs    rrzRequestError.__init__#s��������4��w�/rc�8�|jd|jdffSr")rr#rs rrzRequestError.__reduce__'s���~�~��d�h�h��5�5�5rNrr
rrr r  s��B�0�6rr c��eZdZdZy)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nrr
rrr&r&,���C�rr&c�"��eZdZdZ�fd�Z�xZS)�
ProxyErrorz,Raised when the connection to a proxy fails.c�>��tt|�
||g|���||_yr")�superr)r�original_error)rr�error�argsrs    �rrzProxyError.__init__5s!���
�j�$�(��%�?�$�?�#��r�r	r
rrr�
__classcell__rs@rr)r)2s���6�$�$rr)c��eZdZdZy)�DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nrr
rrr2r2:���E�rr2c��eZdZdZy)�
ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nrr
rrr5r5@s��H�rr5c��eZdZdZdd�Zy)�
MaxRetryErroraRaised when the maximum number of retries is exceeded.

    :param pool: The connection pool
    :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool`
    :param string url: The requested Url
    :param exceptions.Exception reason: The underlying error

    Nc�T�||_d|�d|�d�}tj||||�y)NzMax retries exceeded with url: z (Caused by �))�reasonr r)rrr#r:rs     rrzMaxRetryError.__init__Ws'�����HK�V�T�����d�D�#�w�7rr"�r	r
rrrr
rrr7r7Ms���8rr7c��eZdZdZdd�Zy)�HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.c�L�d|z}tj||||�||_y)Nz)Tried to open a foreign host with url: %s)r r�retries)rrr#r?rs     rrzHostChangedError.__init__bs'��=��C�����d�D�#�w�7���rN)�r;r
rrr=r=_s
��I�rr=c��eZdZdZy)�TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNrr
rrrBrBhs��;�rrBc��eZdZdZy)�TimeoutErrorz�Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    Nrr
rrrDrDns���	rrDc��eZdZdZy)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNrr
rrrFrFxs��P�rrFc��eZdZdZy)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNrr
rrrHrH�s��J�rrHc��eZdZdZy)�NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.Nrr
rrrJrJ�s��R�rrJc��eZdZdZy)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nrr
rrrLrL����M�rrLc��eZdZdZy)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nrr
rrrOrO�rMrrOc��eZdZdZy)�LocationValueErrorz<Raised when there is something wrong with a given URL input.Nrr
rrrQrQ�s��F�rrQc��eZdZdZd�Zy)�LocationParseErrorz=Raised when get_host or similar fails to parse the URL input.c�H�d|z}tj||�||_y)NzFailed to parse: %s)rr�location)rrUrs   rrzLocationParseError.__init__�s#��'�(�2�����4��)� ��
rNr;r
rrrSrS�s
��G�!rrSc�"��eZdZdZ�fd�Z�xZS)�URLSchemeUnknownz2Raised when a URL input has an unsupported scheme.c�D��d|z}tt|�|�||_y)NzNot supported URL scheme %s)r+rWr�scheme�rrYrrs   �rrzURLSchemeUnknown.__init__�s$���/�&�8��
���.�w�7���rr/rs@rrWrW�s���<��rrWc��eZdZdZdZdZy)�
ResponseErrorzDUsed as a container for an error reason supplied in a MaxRetryError.ztoo many error responsesz&too many {status_code} error responsesN)r	r
rr�
GENERIC_ERROR�SPECIFIC_ERRORr
rrr\r\�s��N�.�M�=�Nrr\c��eZdZdZy)�SecurityWarningz0Warned when performing security reducing actionsNrr
rrr`r`����:�rr`c��eZdZdZy)�SubjectAltNameWarningzBWarned when connecting to a host with a certificate missing a SAN.Nrr
rrrcrc�s��L�rrcc��eZdZdZy)�InsecureRequestWarningz/Warned when making an unverified HTTPS request.Nrr
rrrere�s��9�rrec��eZdZdZy)�SystemTimeWarningz0Warned when system time is suspected to be wrongNrr
rrrgrg�rarrgc��eZdZdZy)�InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nrr
rrriri�s��S�rric��eZdZdZy)�SNIMissingWarningz9Warned when making a HTTPS request without SNI available.Nrr
rrrkrk�r'rrkc��eZdZdZy)�DependencyWarningzc
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    Nrr
rrrmrm�����
	rrmc��eZdZdZy)�ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nrr
rrrprp�r3rrpc��eZdZdZy)�BodyNotHttplibCompatiblez�
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    Nrr
rrrrrr�rnrrrc�(��eZdZdZ�fd�Zd�Z�xZS)rz�
    Response length doesn't match expected Content-Length

    Subclass of :class:`http.client.IncompleteRead` to allow int value
    for ``partial`` to avoid creating large objects on streamed reads.
    c�.��tt|�||�yr")r+rr)r�partial�expectedrs   �rrzIncompleteRead.__init__�s���
�n�d�,�W�h�?rc�8�d|j|jfzS)Nz/IncompleteRead(%i bytes read, %i more expected))rurvrs r�__repr__zIncompleteRead.__repr__s#��@��L�L��M�M�D
�
�	
r�r	r
rrrrxr0rs@rrr�s����@�
rrc�(��eZdZdZ�fd�Zd�Z�xZS)�InvalidChunkLengthz+Invalid chunk length in a chunked response.c�z��tt|�|j�|j�||_||_yr")r+r{r�tell�length_remaining�response�length)rrr�rs   �rrzInvalidChunkLength.__init__
s4���
� �$�0��M�M�O�X�6�6�	
�!��
���rc�8�d|j|jfzS)Nz0InvalidChunkLength(got length %r, %i bytes read))r�rurs rrxzInvalidChunkLength.__repr__s#��A��K�K��L�L�E
�
�	
rryrs@rr{r{s���5��
rr{c��eZdZdZy)�
InvalidHeaderz(The header provided was somehow invalid.Nrr
rrr�r�s��2�rr�c�"��eZdZdZ�fd�Z�xZS)�ProxySchemeUnknownz1ProxyManager does not support the supplied schemec�N��|dk(rd}|�d}nd|z}tt|�|�y)N�	localhostz>Proxy URL had no scheme, should start with http:// or https://zCProxy URL had unsupported scheme %s, should use http:// or https://)r+r�rrZs   �rrzProxySchemeUnknown.__init__#sA����[� ��F��>�V�G�V���
�	� �$�0��9rr/rs@rr�r�s���;�:�:rr�c��eZdZdZy)�ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNrr
rrr�r�2s��G�rr�c�"��eZdZdZ�fd�Z�xZS)�HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.c�B��|xsd�d|��}tt|�|�y)N�Unknownz, unparsed data: )r+r�r)r�defects�
unparsed_datarrs    �rrzHeaderParsingError.__init__;s%���-4�-A�	�-A�=�Q��
� �$�0��9rr/rs@rr�r�8s���X�:�:rr�c��eZdZdZy)�UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNrr
rrr�r�@r'rr�N).�
__future__r�packages.six.moves.http_clientr�httplib_IncompleteRead�	Exceptionr�Warningrrr r&r)r2r5�ConnectionErrorr7r=rBrDrFrHrJrLrO�
ValueErrorrQrSrWr\r`rcrergrirkrmrprrr{r��AssertionErrorr�r�r�r�r
rr�<module>r�s���&�T�
	�	�	�	�'�	�	,�	�	,�	6�9�	6�	�y�	�$��$�	�)�	�	�I�	� ��8�L�8�$�|��	�	�	�	�9�	�	�|�\�	�	�,�	�	�,�i�	�	�Y�	�	�i�	�	��Y�	�!�+�!��)��>�I�>�	�k�	�	�O�	�	�_�	�	��	�	�o�	�	��	�	��	�	��
�	�	�y�	�
�Y� 6�
�$
��$:�
�"	�I�	�:��)9�:�(	�Z�	�:��:�	�I�	rpython3.12/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-312.pyc000064400000024323151732702450023104 0ustar00�

R`i�!�	��ddlmZddlZddlZddlZddlmZdd�Zd�Z	ddd	�Z
e
jedd
�D�cic]'}|dvr!ej|�dj|���)c}�d
�Zd�ZeZGd�de�Zycc}w)�)�absolute_importN�)�sixc�B�|rtj|�dxs|S|S)z�
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    r)�	mimetypes�
guess_type)�filename�defaults  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/fields.py�guess_content_typer
s'����#�#�H�-�a�0�;�G�;��N�c���t�tj�r�jd��t	�fd�dD��s|�d��d�}	|jd�|Stjr�jd��tjj�d��|�d����tjr�jd���S#ttf$rY�|wxYw)a!
    Helper function to format and quote a single header parameter using the
    strategy defined in RFC 2231.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows
    `RFC 2388 Section 4.4 <https://tools.ietf.org/html/rfc2388#section-4.4>`_.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as ``bytes`` or `str``.
    :ret:
        An RFC-2231-formatted unicode string.
    �utf-8c3�&�K�|]}|�v���
y�w�N�)�.0�ch�values  �r�	<genexpr>z.format_header_param_rfc2231.<locals>.<genexpr>+s�����/�Y�r�r�U�{�Y�s�z"\
�="�"�asciiz*=)�
isinstancer�binary_type�decode�any�encode�UnicodeEncodeError�UnicodeDecodeError�PY2�email�utils�encode_rfc2231)�namer�results ` r�format_header_param_rfc2231r's���� �%����)����W�%���/�Y�/�/�#�U�+��	��M�M�'�"��M�
�w�w����W�%��
�K�K�&�&�u�g�6�E��e�$�E�
�w�w����W�%���L��!#�$6�7�	��	�s�
C�C�Cz%22z\\)r�\� )�z%{:02X}c
�����fd�}tjdj�j�D�cgc]}tj|���c}��}|j||�}|Scc}w)Nc�,���|jd�S)Nr)�group)�match�needles_and_replacementss �r�replacerz#_replace_multiple.<locals>.replacerSs���'����A��7�7r
�|)�re�compile�join�keys�escape�sub)rr/r0�needle�patternr&s `    r�_replace_multipler:Rse���8��j�j��	�	�3K�3P�3P�3R�S�3R��2�9�9�V�$�3R�S�T��G��[�[��5�
)�F��M��Ts�A.c��t|tj�r|jd�}t	|t
�}|�d|�d�S)a�
    Helper function to format and quote a single header parameter using the
    HTML5 strategy.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows the `HTML5 Working Draft
    Section 4.10.22.7`_ and matches the behavior of curl and modern browsers.

    .. _HTML5 Working Draft Section 4.10.22.7:
        https://w3c.github.io/html/sec-forms.html#multipart-form-data

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as ``bytes`` or `str``.
    :ret:
        A unicode string, stripped of troublesome characters.
    rrr)rrrrr:�_HTML5_REPLACEMENTS)r%rs  r�format_header_param_html5r=_s8��&�%����)����W�%���e�%8�9�E��u�%�%r
c�N�eZdZdZddefd�Zeefd��Zd�Zd�Z	d�Z
	d	d�Zy)
�RequestFielda
    A data container for request body parameters.

    :param name:
        The name of this request field. Must be unicode.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field. Must be unicode.
    :param headers:
        An optional dict-like object of headers to initially use for the field.
    :param header_formatter:
        An optional callable that is used to encode and format the headers. By
        default, this is :func:`format_header_param_html5`.
    Nc�n�||_||_||_i|_|rt	|�|_||_yr)�_name�	_filename�data�headers�dict�header_formatter)�selfr%rCr	rDrFs      r�__init__zRequestField.__init__�s6����
�!�����	�������=�D�L� 0��r
c��t|t�r&t|�dk(r|\}}}n|\}}t|�}nd}d}|}|||||��}|j	|��|S)a�
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from
        parameter of key/value strings AND key/filetuple. A filetuple is a
        (filename, data, MIME type) tuple where the MIME type is optional.
        For example::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        �N)r	rF)�content_type)r�tuple�lenr�make_multipart)�cls�	fieldnamerrFr	rCrK�
request_params        r�from_tupleszRequestField.from_tuples�st��$�e�U�#��5�z�Q��/4�,��$��!&���$�1�(�;���H��L��D���t�h�AQ�
�
�	�$�$�,�$�?��r
c�&�|j||�S)aI
        Overridable helper function to format a single header parameter. By
        default, this calls ``self.header_formatter``.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        )rF)rGr%rs   r�_render_partzRequestField._render_part�s���$�$�T�5�1�1r
c���g}|}t|t�r|j�}|D])\}}|��	|j|j	||���+dj|�S)aO
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
            as `k1="v1"; k2="v2"; ...`.
        �; )rrE�items�appendrTr4)rG�header_parts�parts�iterabler%rs      r�
_render_partszRequestField._render_parts�sd�������l�D�)�#�)�)�+�H�#�K�D�%�� ����T�.�.�t�U�;�<�$��z�z�%� � r
c�`�g}gd�}|D]B}|jj|d�s� |j|�d|j|����D|jj�D]#\}}||vs�|s�|j|�d|����%|jd�dj	|�S)z=
        Renders the headers for this request field.
        )�Content-Disposition�Content-Type�Content-LocationFz: z
)rD�getrXrWr4)rG�lines�	sort_keys�sort_key�header_name�header_values      r�render_headerszRequestField.render_headers�s�����O�	�!�H��|�|����%�0����(�D�L�L��4J�K�L�"�*.���);�);�)=�%�K���)�+���L�L�k�<�!H�I�*>�
	���W���|�|�E�"�"r
c��|xsd|jd<|jdxxdjd|jd|jfd|jff�g�z
cc<||jd<||jd<y	)
a|
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        z	form-datar^rV�r%r	r_r`N)rDr4r\rArB)rG�content_dispositionrK�content_locations    rrNzRequestField.make_multipart�s���/B�.Q�\����*�+����*�+�u�z�z���"�"��t�z�z�*�[�$�.�.�,I�J��
�0
�	
�+�(4����^�$�+;����'�(r
)NNN)�__name__�
__module__�__qualname__�__doc__r=rH�classmethodrRrTr\rgrNrr
rr?r?~sJ���(��2�
1� �<U�!��!�F2�!�,#�(MQ�<r
r?)zapplication/octet-stream)�
__future__r�email.utilsr"rr2�packagesrrr'r<�update�range�unichr�formatr:r=�format_header_param�objectr?)�ccs0r�<module>r{s���&���	���'�V���������h�'��'�B�
�W��	�
�
�2��
�)�)�"�-�-�'���
�&�80��T<�6�T<��is�,Bpython3.12/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-312.pyc000064400000047524151732702450024152 0ustar00�

R`i(M���ddlmZddlZddlZddlZddlmZddlmZm	Z	m
Z
ddlmZm
Z
mZmZmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZgd
�Zej<e�Z dZ!dZ"ejFde"�Z$dZ%ejFde%�Z&d�Z'ejPe'e$�ejPe'e$�d�Z)ee	d�Z*Gd�de�Z+Gd�de+�Z,d�Z-y)�)�absolute_importN�)�RecentlyUsedContainer)�HTTPConnectionPool�HTTPSConnectionPool�port_by_scheme)�LocationValueError�
MaxRetryError�ProxySchemeUnknown�ProxySchemeUnsupported�URLSchemeUnknown)�six)�urljoin)�RequestMethods)�connection_requires_http_tunnel)�Retry)�	parse_url)�PoolManager�ProxyManager�proxy_from_url)	�key_file�	cert_file�	cert_reqs�ca_certs�ssl_version�ca_cert_dir�ssl_context�key_password�server_hostname)�
key_scheme�key_host�key_port�key_timeout�key_retries�
key_strict�	key_block�key_source_address�key_key_file�key_key_password�
key_cert_file�
key_cert_reqs�key_ca_certs�key_ssl_version�key_ca_cert_dir�key_ssl_context�key_maxsize�key_headers�
key__proxy�key__proxy_headers�key__proxy_config�key_socket_options�key__socks_options�key_assert_hostname�key_assert_fingerprint�key_server_hostname�PoolKey)r�use_forwarding_for_https�ProxyConfigc���|j�}|dj�|d<|dj�|d<dD],}||vs�||��t||j��||<�.|j	d�}|�t|�|d<t
|j��D]}|j|�|d|z<�|jD]}||vs�d||<�|di|��S)a�
    Create a pool key out of a request context dictionary.

    According to RFC 3986, both the scheme and host are case-insensitive.
    Therefore, this function normalizes both before constructing the pool
    key for an HTTPS request. If you wish to change this behaviour, provide
    alternate callables to ``key_fn_by_scheme``.

    :param key_class:
        The class to use when constructing the key. This should be a namedtuple
        with the ``scheme`` and ``host`` keys at a minimum.
    :type  key_class: namedtuple
    :param request_context:
        A dictionary-like object that contain the context for a request.
    :type  request_context: dict

    :return: A namedtuple that can be used as a connection pool key.
    :rtype:  PoolKey
    �scheme�host)�headers�_proxy_headers�_socks_optionsN�socket_options�key_�)
�copy�lower�	frozenset�items�get�tuple�list�keys�pop�_fields)�	key_class�request_context�context�key�socket_opts�fields      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/poolmanager.py�_default_key_normalizerrWOs���*�"�"�$�G���)�/�/�1�G�H���f�o�+�+�-�G�F�O�?���'�>�g�c�l�6�$�W�S�\�%7�%7�%9�:�G�C�L�?��+�+�.�/�K���$)�+�$6�� �!��G�L�L�N�#�� '���C� 0������$��"�"�����!�G�E�N�#���w�����http�httpsc�r�eZdZdZdZdZdd�Zd�Zd�Zdd�Z	d�Z
dd�Zd	�Zdd
�Z
dd�Zd�Zd
�Zd�Zdd�Zy)ra$
    Allows for arbitrary requests while transparently keeping track of
    necessary connection pools for you.

    :param num_pools:
        Number of connection pools to cache before discarding the least
        recently used pool.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param \**connection_pool_kw:
        Additional parameters are used to create fresh
        :class:`urllib3.connectionpool.ConnectionPool` instances.

    Example::

        >>> manager = PoolManager(num_pools=2)
        >>> r = manager.request('GET', 'http://google.com/')
        >>> r = manager.request('GET', 'http://google.com/mail')
        >>> r = manager.request('GET', 'http://yahoo.com/')
        >>> len(manager.pools)
        2

    Nc��tj||�||_t|�|_t
|_tj�|_y�N)r�__init__�connection_pool_kwr�pools�pool_classes_by_scheme�key_fn_by_schemerF)�self�	num_poolsr@r`s    rVr_zPoolManager.__init__�sA������g�.�"4���*�9�5��
�'=��#� 0� 5� 5� 7��rXc��|Sr^rE�rds rV�	__enter__zPoolManager.__enter__�s���rXc�$�|j�y)NF)�clear)rd�exc_type�exc_val�exc_tbs    rV�__exit__zPoolManager.__exit__�s���
�
��rXc���|j|}|�|jj�}dD]}|j|d��|dk(rtD]}|j|d��|||fi|��S)a�
        Create a new :class:`urllib3.connectionpool.ConnectionPool` based on host, port, scheme, and
        any additional pool keyword arguments.

        If ``request_context`` is provided, it is provided as keyword arguments
        to the pool class used. This method is used to actually create the
        connection pools handed out by :meth:`connection_from_url` and
        companion methods. It is intended to be overridden for customization.
        N)r>r?�portrZ)rbr`rFrN�SSL_KEYWORDS)rdr>r?rprQ�pool_clsrS�kws        rV�	_new_poolzPoolManager._new_pool�s����.�.�v�6���"�"�5�5�:�:�<�O�.�C�����T�*�.��V��"���#�#�B��-�#���d�6�o�6�6rXc�8�|jj�y)z�
        Empty our store of pools and direct them all to close.

        This will not affect in-flight connections, but they will not be
        re-used after completion.
        N)rarjrgs rVrjzPoolManager.clear�s��	
�
�
���rXc���|std��|j|�}|xsd|d<|s'tj|dj	�d�}||d<||d<|j|�S)a�
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme.

        If ``port`` isn't given, it will be derived from the ``scheme`` using
        ``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is
        provided, it is merged with the instance's ``connection_pool_kw``
        variable and used to create the new connection pool, if one is
        needed.
        zNo host specified.rZr>�Prpr?)r	�_merge_pool_kwargsrrJrG�connection_from_context)rdr?rpr>�pool_kwargsrQs      rV�connection_from_hostz PoolManager.connection_from_host�sz���$�%9�:�:��1�1�+�>��$*�$4�f���!��!�%�%�o�h�&?�&E�&E�&G��L�D�"&����"&�����+�+�O�<�<rXc��|dj�}|jj|�}|st|��||�}|j	||��S)z�
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.

        ``request_context`` must at least contain the ``scheme`` key and its
        value must be a key in ``key_fn_by_scheme`` instance variable.
        r>�rQ)rGrcrJr
�connection_from_pool_key)rdrQr>�pool_key_constructor�pool_keys     rVryz#PoolManager.connection_from_context�s\��!��*�0�0�2��#�4�4�8�8��@��#�"�6�*�*�'��8���,�,�X��,�W�WrXc��|jj5|jj|�}|r|cddd�S|d}|d}|d}|j||||��}||j|<ddd�|S#1swYSxYw)a
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.

        ``pool_key`` should be a namedtuple that only contains immutable
        objects. At a minimum it must have the ``scheme``, ``host``, and
        ``port`` fields.
        Nr>r?rpr})ra�lockrJrt)rdr�rQ�poolr>r?rps       rVr~z$PoolManager.connection_from_pool_keys����Z�Z�_�_��:�:�>�>�(�+�D����_�%�X�.�F�"�6�*�D�"�6�*�D��>�>�&�$��o�>�V�D�#'�D�J�J�x� �������s�A=�3A=�=Bc�~�t|�}|j|j|j|j|��S)a�
        Similar to :func:`urllib3.connectionpool.connection_from_url`.

        If ``pool_kwargs`` is not provided and a new pool needs to be
        constructed, ``self.connection_pool_kw`` is used to initialize
        the :class:`urllib3.connectionpool.ConnectionPool`. If ``pool_kwargs``
        is provided, it is used instead. Note that if a new pool does not
        need to be created for the request, the provided ``pool_kwargs`` are
        not used.
        )rpr>rz)rr{r?rpr>)rd�urlrz�us    rV�connection_from_urlzPoolManager.connection_from_urls:��
�c�N���(�(�
�F�F�������k�)�
�	
rXc��|jj�}|r$|j�D]\}}|�	||=�
|||<�|S#t$rY�!wxYw)a
        Merge a dictionary of override values for self.connection_pool_kw.

        This does not modify self.connection_pool_kw and returns a new dict.
        Any keys in the override dictionary with a value of ``None`` are
        removed from the merged dictionary.
        )r`rFrI�KeyError)rd�override�base_pool_kwargsrS�values     rVrxzPoolManager._merge_pool_kwargs/sl�� �2�2�7�7�9���&�n�n�.�
��U��=��,�S�1�-2�$�S�)�/� ���	$����s�A�	A�Ac�t�|j�yt|j|j|j�S)z�
        Indicates if the proxy requires the complete destination URL in the
        request.  Normally this is only needed when not using an HTTP CONNECT
        tunnel.
        F)�proxyr�proxy_configr>)rd�
parsed_urls  rV�!_proxy_requires_url_absolute_formz-PoolManager._proxy_requires_url_absolute_formCs:���:�:���2��J�J��)�)�:�+<�+<�
�
�	
rXc��|j�|dk7ry|jjdk7rytjr"|jj
st
d��yy)z�
        Validates that were not attempting to do TLS in TLS connections on
        Python2 or with unsupported SSL implementations.
        Nr[zfContacting HTTPS destinations through HTTPS proxies 'via CONNECT tunnels' is not supported in Python 2)r�r>r�PY2r�r;r)rd�
url_schemes  rV�$_validate_proxy_scheme_url_selectionz0PoolManager._validate_proxy_scheme_url_selectionPs]��
�:�:���w�!6���:�:����'���7�7�4�,�,�E�E�(�E��
�F�7rXc�j�t|�}|j|j�|j|j|j
|j��}d|d<d|d<d|vr|jj�|d<|j|�r|j||fi|��}n|j||jfi|��}|xr|j�}|s|St||�}|jdk(rd}|jd�}	t|	t �st!j"|	|�	�}	|	j$rk|j'|�sZt)t+j,|d��}
|
D]4}|j/�|	j$vs� |dj1|d
��6	|	j3||||��}	|	|d<||d<t:j=d||�|j9�|j||fi|��S#t4$r"|	j6r|j9��|cYSwxYw)
aN
        Same as :meth:`urllib3.HTTPConnectionPool.urlopen`
        with custom cross-host redirect logic and only sends the request-uri
        portion of the ``url``.

        The given ``url`` parameter must be absolute, such that an appropriate
        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
        )rpr>F�assert_same_host�redirectr@i/�GET�retries)r�N)�response�_poolzRedirecting %s -> %s)rr�r>r{r?rpr@rFr��urlopen�request_uri�get_redirect_locationr�statusrJ�
isinstancer�from_int�remove_headers_on_redirect�is_same_hostrLr�iterkeysrGrN�	incrementr
�raise_on_redirect�
drain_conn�log�info)rd�methodr�r�rsr��connr��redirect_locationr�r@�headers            rVr�zPoolManager.urlopenas��
�c�N���1�1�!�(�(�;��(�(����a�f�f�Q�X�X�(�N��!&������:���B�� �L�L�-�-�/�B�y�M��1�1�!�4�#�t�|�|�F�C�6�2�6�H�#�t�|�|�F�A�M�M�@�R�@�H�$�I��)G�)G�)I�� ��O�$�C�):�;���?�?�c�!��F��&�&��#���'�5�)��n�n�W�x�@�G�
�-�-�d�6G�6G��7
��3�<�<��9�
�6�7�G�!���<�<�>�W�%G�%G�G��y�M�%�%�f�d�3�"�	��'�'���h�d�'�S�G� ��9�
�!��:�����'��.?�@������t�|�|�F�$5�<��<�<���	��(�(��#�#�%���O�		�s�-H�(H2�1H2)�
Nr^�NrZN�T)�__name__�
__module__�__qualname__�__doc__r�r�r_rhrnrtrjr{ryr~r�rxr�r�r�rErXrVrr�sV���6
�E��L�8���
7�6�=�.
X��0
�  �(
��"A=rXrc�N��eZdZdZ					d�fd�	Zd�fd�	Zdd�Zd	�fd�	Z�xZS)
ra>
    Behaves just like :class:`PoolManager`, but sends all requests through
    the defined proxy, using the CONNECT method for HTTPS URLs.

    :param proxy_url:
        The URL of the proxy to be used.

    :param proxy_headers:
        A dictionary containing headers that will be sent to the proxy. In case
        of HTTP they are being sent with each request, while in the
        HTTPS/CONNECT case they are sent only once. Could be used for proxy
        authentication.

    :param proxy_ssl_context:
        The proxy SSL context is used to establish the TLS connection to the
        proxy when using HTTPS proxies.

    :param use_forwarding_for_https:
        (Defaults to False) If set to True will forward requests to the HTTPS
        proxy to be made on behalf of the client instead of creating a TLS
        tunnel via the CONNECT method. **Enabling this flag means that request
        and response headers and content will be visible from the HTTPS proxy**
        whereas tunneling keeps request and response headers and content
        private.  IP address, target hostname, SNI, and port are always visible
        to an HTTPS proxy even when this flag is disabled.

    Example:
        >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
        >>> r1 = proxy.request('GET', 'http://google.com/')
        >>> r2 = proxy.request('GET', 'http://httpbin.org/')
        >>> len(proxy.pools)
        1
        >>> r3 = proxy.request('GET', 'https://httpbin.org/')
        >>> r4 = proxy.request('GET', 'https://twitter.com/')
        >>> len(proxy.pools)
        3

    c�"��t|t�r&d|j|j|jfz}t|�}|jdvrt
|j��|js2tj|jd�}	|j|	��}||_
|xsi|_||_t||�|_|j|d<|j|d<|j|d<tt |�F||fi|��y)Nz
%s://%s:%irYrw)rp�_proxyrA�
_proxy_config)r�rr>r?rprrrrJ�_replacer��
proxy_headers�proxy_ssl_contextr<r��superrr_)rd�	proxy_urlrer@r�r�r;r`r�rp�	__class__s          �rVr_zProxyManager.__init__�s����i�!3�4�$�� � �������(��I�
�)�$���<�<�0�0�$�U�\�\�2�2��z�z�!�%�%�e�l�l�B�7�D��N�N��N�-�E���
�*�0�b���!2���'�(9�;S�T���'+�z�z��8�$�/3�/A�/A��+�,�.2�.?�.?��?�+�
�l�D�*�9�g�T�AS�TrXc����|dk(rtt|�||||��Stt|�|jj|jj
|jj|��S)Nr[)rz)r�rr{r�r?rpr>)rdr?rpr>rzr�s     �rVr{z!ProxyManager.connection_from_host�sl����W����t�A��d�F��B��
��\�4�=��J�J�O�O�T�Z�Z�_�_�d�j�j�.?�.?�[�>�
�	
rXc�l�ddi}t|�j}|r||d<|r|j|�|S)z�
        Sets headers needed by proxies: specifically, the Accept and Host
        headers. Only sets headers not provided by the user.
        �Acceptz*/*�Host)r�netloc�update)rdr�r@�headers_r�s     rV�_set_proxy_headerszProxyManager._set_proxy_headers�s>��
�e�$���3��&�&���%�H�V����O�O�G�$��rXc���t|�}t|j|j|j�s1|jd|j�}|j||�|d<tt|�*||fd|i|��S)z@Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute.r@r�)rrr�r�r>rJr@r�r�rr�)rdr�r�r�rsr�r@r�s       �rVr�zProxyManager.urlopensq����c�N��.�t�z�z�4�;L�;L�a�h�h�W��f�f�Y����5�G� �3�3�C��A�B�y�M��\�4�0���V�x�V�SU�V�VrX)r�NNNFr�r^r�)	r�r�r�r�r_r{r�r��
__classcell__)r�s@rVrr�s7���%�T����!&�#U�J
�
�
W�
WrXrc��tdd|i|��S)Nr�rE)r)r�rss  rVrrs���,�#�,��,�,rX).�
__future__r�collections�	functools�logging�_collectionsr�connectionpoolrrr�
exceptionsr	r
rrr
�packagesr�packages.six.moves.urllib.parser�requestr�
util.proxyr�
util.retryr�util.urlr�__all__�	getLoggerr�r�rq�_key_fields�
namedtupler:�_proxy_config_fieldsr<rW�partialrcrbrrrrErXrV�<module>r�s���&����/�S�S����4�#�7���
;���g����!��
����>!�+�
 �
 ��K�
8��B��$�k�$�$�]�4H�I��. �l
�I���5�w�?�
�Y�
�
�6��
@���
#5�?R�S��V=�.�V=�rpW�;�pW�f-rXpython3.12/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-312.pyc000064400000047744151732702450024011 0ustar00�

R`iLO���ddlmZddlZddlZddlZddlZddlZddlZddlmZ	ddlm
Zddlm
Z
ddlmZddlmZdd	lmZ	ddlZej*Z	eZ	eZddlmZddl m!Z!ddl"m#Z#m$Z$m%Z%m&Z&ddl'm(Z(m)Z)m*Z*ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1ddl2m3Z3m4Z4ejje6�Z7ddd�Z8ejrddd�Z:ejvd�Z<Gd�dee=�ZGd�de�Z>d�Z?d �Z@Gd!�d"e=�ZAeseAZ>e>ZBy#eef$rdZGd
�de�ZY��wxYw#e$rGd�d
e�ZY��wxYw#e$rGd�de�ZY��wxYw)#�)�absolute_importN)�error)�timeout�)�six)�HTTPConnection)�
HTTPException)�create_proxy_ssl_contextc��eZdZy)�BaseSSLErrorN��__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/connection.pyrr���rrc��eZdZy)�ConnectionErrorNr
rrrrr!rrrc��eZdZy)�BrokenPipeErrorNr
rrrrr*rrr)�HTTPHeaderDict��__version__)�ConnectTimeoutError�NewConnectionError�SubjectAltNameWarning�SystemTimeWarning)�SKIP_HEADER�SKIPPABLE_HEADERS�
connection)�assert_fingerprint�create_urllib3_context�is_ipaddress�resolve_cert_reqs�resolve_ssl_version�ssl_wrap_socket)�CertificateError�match_hostname�Pi�)�http�httpsi�z[^-!#$%&'*+.^_`|~0-9a-zA-Z]c����eZdZdZedZejejdfgZ	dZ
dZd�Ze
d��Zejd��Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�fd�	Zdd�Z�xZS)ra5
    Based on :class:`http.client.HTTPConnection` but provides an extra constructor
    backwards-compatibility layer between older and newer Pythons.

    Additional keyword parameters are used to configure attributes of the connection.
    Accepted parameters include:

    - ``strict``: See the documentation on :class:`urllib3.connectionpool.HTTPConnectionPool`
    - ``source_address``: Set the source address for the current connection.
    - ``socket_options``: Set specific options on the underlying socket. If not specified, then
      defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling
      Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy.

      For example, if you wish to enable TCP Keep Alive in addition to the defaults,
      you might pass:

      .. code-block:: python

         HTTPConnection.default_socket_options + [
             (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
         ]

      Or you may want to disable the defaults by passing an empty list (e.g., ``[]``).
    r,rFNc�D�tjs|jdd�|jd�|_|jd|j
�|_|jdd�|_|jdd�|_tj|g|��i|��y)N�strict�source_address�socket_options�proxy�proxy_config)r�PY2�pop�getr1�default_socket_optionsr2r3r4�_HTTPConnection�__init__)�self�args�kws   rr:zHTTPConnection.__init__ss����w�w��F�F�8�T�"�!�f�f�%5�6���!�f�f�%5�t�7R�7R�S����V�V�G�T�*��
��F�F�>�4�8���� � ��3��3��3rc�8�|jjd�S)a�
        Getter method to remove any trailing dots that indicate the hostname is an FQDN.

        In general, SSL certificates don't include the trailing dot indicating a
        fully-qualified domain name, and thus, they don't validate properly when
        checked against a domain name that includes the dot. In addition, some
        servers may not expect to receive the trailing dot when provided.

        However, the hostname with trailing dot is critical to DNS resolution; doing a
        lookup with the trailing dot will properly only resolve the appropriate FQDN,
        whereas a lookup without a trailing dot will search the system's search domain
        list. Thus, it's important to keep the original host around for use only in
        those cases where it's appropriate (i.e., when doing DNS lookup to establish the
        actual TCP connection across which we're going to send HTTP requests).
        �.)�	_dns_host�rstrip�r;s r�hostzHTTPConnection.host�s��"�~�~�$�$�S�)�)rc��||_y)z�
        Setter for the `host` property.

        We assume that only urllib3 uses the _dns_host attribute; httplib itself
        only uses `host`, and it seems reasonable that other libraries follow suit.
        N)r@)r;�values  rrCzHTTPConnection.host�s����rc	��i}|jr|j|d<|jr|j|d<	tj|j|j
f|jfi|��}|S#t$r(t|d|j�d|j�d���t$r}t|d|z��d}~wwxYw)zoEstablish a socket connection and set nodelay settings on it.

        :return: New socket connection.
        r1r2zConnection to z timed out. (connect timeout=�)z(Failed to establish a new connection: %sN)r1r2r"�create_connectionr@�portr�
SocketTimeoutrrC�SocketErrorr)r;�extra_kw�conn�es    r�	_new_connzHTTPConnection._new_conn�s���
�����)-�)<�)<�H�%�&����)-�)<�)<�H�%�&�	��/�/�������+�T�\�\��=E��D� ����	�%���9�9�d�l�l�,��
��	�$��@�1�D��
��	�s�7A3�38B?�+B:�:B?c��t|dd�S)N�_tunnel_host)�getattrrBs r�_is_using_tunnelzHTTPConnection._is_using_tunnel�s���t�^�T�2�2rc�b�||_|j�r|j�d|_yy)Nr)�sockrS�_tunnel�	auto_open�r;rMs  r�
_prepare_connzHTTPConnection._prepare_conn�s*����	�� � �"��L�L�N��D�N�	#rc�F�|j�}|j|�y�N)rOrYrXs  r�connectzHTTPConnection.connect�s���~�~������4� rc��tj|�}|r td|�d|j��d���t	j
|||g|��i|��S)� z+Method cannot contain non-token characters z (found at least rG)�_CONTAINS_CONTROL_CHAR_RE�search�
ValueError�groupr9�
putrequest)r;�method�urlr<�kwargs�matchs      rrczHTTPConnection.putrequest�sU��*�0�0��8�����5�;�;�=�*��
�
�)�)�$���M�d�M�f�M�Mrc�0�td�|D��stj||g|���ytj|j��tvrCtddjttjtt����d���y)r^c3�RK�|]}t|t�xr	|tk(���!y�wr[)�
isinstance�strr )�.0�vs  r�	<genexpr>z+HTTPConnection.putheader.<locals>.<genexpr>�s%����K�F�q�:�a��%�:�!�{�*:�:�F�s�%'z(urllib3.util.SKIP_HEADER only supports 'z', '�'N)
�anyr9�	putheaderr�
ensure_str�lowerr!ra�join�maprk�title�sorted)r;�header�valuess   rrqzHTTPConnection.putheader�ss���K�F�K�K��%�%�d�F�<�V�<�
�^�^�F�L�L�N�
+�3D�
D���;�;�s�3�9�9�f�5F�.G�H�I�L��
�Erc����t|dd��%|jj|j�|�i}n|j	�}dd�|D�vr
t�|d<tt|�#||||��y)NrU�
user-agentc3�bK�|]'}tj|j�����)y�wr[)rrrrs)rl�ks  rrnz)HTTPConnection.request.<locals>.<genexpr>�s ����K�7�a����q�w�w�y� 9�7�s�-/�
User-Agent)�body�headers)	rRrU�
settimeoutr�copy�_get_default_user_agent�superr�request)r;rdrerr��	__class__s     �rr�zHTTPConnection.request�st����4���&�2��I�I� � ����.��?��G��l�l�n�G��K�7�K�K�$;�$=�G�L�!�
�n�d�+�F�C�d�G�+�Trc	��|xsi}t|D�cgc]%}tj|j����'c}�}d|v}d|v}|j	||||��d|vr|jdt
��|j�D]\}	}
|j|	|
��d|vr|jdd�|j�|��tjtfz}t||�r|f}|D]v}|s�t|t�s|jd
�}tt|��dd	}
t|
j��}|dz
}||z
}|dz
}|j!|��x|j!d
�y	cc}w)z�
        Alternative to the common request method, which sends the
        body with chunked encoding and not as one block
        zaccept-encodingrC)�skip_accept_encoding�	skip_hostr{r~ztransfer-encodingzTransfer-Encoding�chunkedN�utf8�s
s0

)�setrrrrsrcrqr��items�
endheaders�string_types�bytesrj�encode�hex�len�	bytearray�send)r;rdrerr�r}�header_keysr�r�rxrE�stringish_types�chunk�len_str�to_sends               r�request_chunkedzHTTPConnection.request_chunked�sx��
�-�R���g�F�g��3�>�>�!�'�'�)�4�g�F�G��0�K�?���k�)�	�����C�.B�i�	�	
��{�*��N�N�<�)@�)B�C�$�]�]�_�M�F�E��N�N�6�5�)�-��k�1��N�N�.�	�:�������!�.�.�%��9�O��$��0��w������!�%��/�!�L�L��0�E��c�%�j�/�!�"�-��#�G�N�N�$4�5���7�"���5� ���7�"���	�	�'�"��	
�	�	�,���?Gs�*F)NN)rrr�__doc__�port_by_scheme�default_port�socket�IPPROTO_TCP�TCP_NODELAYr8�is_verified�proxy_is_verifiedr:�propertyrC�setterrOrSrYr\rcrqr�r��
__classcell__)r�s@rrrLs�����2"�&�)�L� &�1�1�6�3E�3E�q�I�J���K���4�"�*��*�$
�[�[�����>3��!�N��
U�% rrc��eZdZdZedZdZdZdZdZ	dZ
dZdZddddde
jddfd�Z									d	d�Zd�Zd�Zy)
�HTTPSConnectionz�
    Many of the parameters to this constructor are passed to the underlying SSL
    socket by means of :py:func:`urllib3.util.ssl_wrap_socket`.
    r-NFc
��tj|||f||d�|
��||_||_||_||_|	|_d|_y)N)r0rr-)rr:�key_file�	cert_file�key_password�ssl_context�server_hostname�	_protocol)r;rCrIr�r�r�r0rr�r�r=s           rr:zHTTPSConnection.__init__.sR��	����d�D�W���W�TV�W� ��
�"���(���&���.���!��rc
�f�|�.|j�|jj}ntd�}||_||_||_||_||_||_|xrtjj|�|_|xrtjj|�|_
|	|_y)zX
        This method should only be called once, before the connection is used.
        N)r��verify_moder&r�r��	cert_reqsr��assert_hostnamer#�os�path�
expanduser�ca_certs�ca_cert_dir�ca_cert_data)
r;r�r�r�r�r�r�r#r�r�s
          r�set_certzHTTPSConnection.set_certHs���"�����+� �,�,�8�8�	�-�d�3�	� ��
�"���"���(���.���"4��� �A�R�W�W�%7�%7��%A��
�&�J�2�7�7�+=�+=�k�+J���(��rc��|j�x|_}|j}d}|j�rJ|jr|j||�x|_}d}|j
�d|_|j}|}|j�|j}tjj�tk}|r-tjdj!t�t"�d}|j$�:d}t't)|j*�t-|j.���|_|j$}t-|j.�|_|j2s6|j4s*|j6s|rt9|d�r|j;�t=||j>|j@|jB|j2|j4|j6|||��
|_|r�|j*�ut9|jd�r_|jjE�d	vrCtjd
|j�d|jjE��d�tF�|jHr1tI|jjKd�
�|jH�n�|j0tLjNk7r�tQ|dd�s}|jRduro|jjK�}|jUdd�s)tjdj!|�tV�tY||jRxs|�|j0tLjZk(xs|jHdu|_.y)NFTrzWSystem time is way off (before {0}). This will probably lead to SSL verification errors)�ssl_versionr��load_default_certs)
rU�keyfile�certfiler�r�r�r�r�r��
tls_in_tls�version>�TLSv1.1�TLSv1zjNegotiating TLSv1/TLSv1.1 by default is deprecated and will be disabled in urllib3 v2.0.0. Connecting to 'z' with 'z;' can be enabled by explicitly opting-in with 'ssl_version')�binary_form�check_hostname�subjectAltNamer��Certificate for {0} has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.))/rOrUrCrS�tls_in_tls_required�_connect_tls_proxyrVrWrQr��datetime�date�today�RECENT_DATE�warnings�warn�formatrr�r$r'r�r&r�r�r�r�r��hasattrr�r(r�r�r�r��DeprecationWarningr#�getpeercert�ssl�	CERT_NONErRr�r7r�_match_hostname�
CERT_REQUIREDr�)	r;rM�hostnamer�r��is_time_off�default_ssl_context�context�certs	         rr\zHTTPSConnection.connectis����>�>�+�+��	�D��9�9���
�� � �"��'�'�#'�#:�#:�8�T�#J�J��	�D�!�
�
�L�L�N��D�N��(�(�H�"�����+�"�2�2�O��m�m�)�)�+�k�9����M�M�6��&��%�!�
�$�����#�"&��5�/��0@�0@�A�+�D�N�N�;� �D��
�"�"��/����?���
�
�
��$�$��%�%�#���!5�6��&�&�(�#���M�M��^�^��*�*��]�]��(�(��*�*�+��!�
��	�"
 �� � �(���	�	�9�-��	�	�!�!�#�';�;��M�M�)-�	�	�4�9�9�3D�3D�3F�H�#�
��"�"���	�	�%�%�$�%�7��9P�9P�
�
���3�=�=�0��G�%5�u�=��$�$�E�1�
�9�9�(�(�*�D��8�8�,�b�1��
�
�(�)/��x�(8�)��
�D�$�"6�"6�"I�/�J�
���3�#4�#4�4�
3��&�&�d�2�	
�rc�~�|j}|j}|rt|||��St|j|j
|j|j|j�}t||j|j|j||��}|jtjk7ret|dd�sX|j�}|jdd�s)tj dj#|�t$�t'||�|jtj(k(|_|S)zY
        Establish a TLS connection to the proxy using the provided SSL context.
        )rUr�r�)rUr�r�r�r�r�r�Fr�rr�)r4r�r(r
r�r�r�r�r�r�r�r�rRr�r7r�r�r�rr�r�r�)r;r�rMr4r�r�r�s       rr�z"HTTPSConnection._connect_tls_proxy�s&���(�(��"�.�.���#�� (�'��
�/�����N�N��M�M�������
��!���]�]��(�(��*�*�$�#�

���"�"�c�m�m�3�G��)�5�=
�&�6�%�%�'�D��8�8�,�b�1��
�
�(�)/��x�(8�)��
�D�(�+�!,�!8�!8�C�<M�<M�!M����
r)	NNNNNNNNN)rrrr�r�r�r�r�r�r�r�r#r�r��_GLOBAL_DEFAULT_TIMEOUTr:r�r\r�rrrr�r�s����
"�'�*�L��I��H��K��L��K�����
������.�.���!�8���������)�Bt
�l6rr�c��|jd�}t|�r|}	t||�y#t$r$}tjd||�||_�d}~wwxYw)Nzu[]z@Certificate did not match expected hostname: %s. Certificate: %s)�stripr%r*r)�log�warning�
_peer_cert)r��asserted_hostname�stripped_hostnamerNs    rr�r�se��*�/�/��6���%�&�-����t�.�/���	����N���	
����
��	�s�-�	A�A�Ac��dtzS)Nzpython-urllib3/%srrrrr�r�.s
����,�,rc��eZdZdZy)�DummyConnectionz-Used to detect a failed ConnectionCls import.N)rrrr�rrrr�r�2s��7�rr�)C�
__future__rr��loggingr��rer�r�rrKrrJ�packagesr�packages.six.moves.http_clientrr9r	�
util.proxyr
r��SSLErrorr�ImportError�AttributeError�
BaseExceptionr�	NameError�	Exceptionr�_collectionsr�_versionr�
exceptionsrrrr�utilr r!r"�	util.ssl_r#r$r%r&r'r(�util.ssl_match_hostnamer)r*�	getLoggerrr�r�r�r��compiler_�objectr�r�r�r��VerifiedHTTPSConnectionrrr�<module>rsg��&���	�	�
��'�+��M�9�0�
���<�<�L�
�%�O�
�%�O�)�!���=�<���F��g����!���s�+���h�m�m�D�!�Q�'��&�B�J�J�'E�F��O �_�f�O �dw�n�w�t�,-�	�f�	��%�O�*���O	�^�$�
�
�C�
�}�
�
���
�
�)�
�
���
�
�)�
�
�s6�D�D�D0�D�D�D-�,D-�0E�Epython3.12/site-packages/pip/_vendor/urllib3/response.py000064400000073661151732702450017144 0ustar00from __future__ import absolute_import

import io
import logging
import sys
import warnings
import zlib
from contextlib import contextmanager
from socket import error as SocketError
from socket import timeout as SocketTimeout

brotli = None

from . import util
from ._collections import HTTPHeaderDict
from .connection import BaseSSLError, HTTPException
from .exceptions import (
    BodyNotHttplibCompatible,
    DecodeError,
    HTTPError,
    IncompleteRead,
    InvalidChunkLength,
    InvalidHeader,
    ProtocolError,
    ReadTimeoutError,
    ResponseNotChunked,
    SSLError,
)
from .packages import six
from .util.response import is_fp_closed, is_response_to_head

log = logging.getLogger(__name__)


class DeflateDecoder(object):
    def __init__(self):
        self._first_try = True
        self._data = b""
        self._obj = zlib.decompressobj()

    def __getattr__(self, name):
        return getattr(self._obj, name)

    def decompress(self, data):
        if not data:
            return data

        if not self._first_try:
            return self._obj.decompress(data)

        self._data += data
        try:
            decompressed = self._obj.decompress(data)
            if decompressed:
                self._first_try = False
                self._data = None
            return decompressed
        except zlib.error:
            self._first_try = False
            self._obj = zlib.decompressobj(-zlib.MAX_WBITS)
            try:
                return self.decompress(self._data)
            finally:
                self._data = None


class GzipDecoderState(object):

    FIRST_MEMBER = 0
    OTHER_MEMBERS = 1
    SWALLOW_DATA = 2


class GzipDecoder(object):
    def __init__(self):
        self._obj = zlib.decompressobj(16 + zlib.MAX_WBITS)
        self._state = GzipDecoderState.FIRST_MEMBER

    def __getattr__(self, name):
        return getattr(self._obj, name)

    def decompress(self, data):
        ret = bytearray()
        if self._state == GzipDecoderState.SWALLOW_DATA or not data:
            return bytes(ret)
        while True:
            try:
                ret += self._obj.decompress(data)
            except zlib.error:
                previous_state = self._state
                # Ignore data after the first error
                self._state = GzipDecoderState.SWALLOW_DATA
                if previous_state == GzipDecoderState.OTHER_MEMBERS:
                    # Allow trailing garbage acceptable in other gzip clients
                    return bytes(ret)
                raise
            data = self._obj.unused_data
            if not data:
                return bytes(ret)
            self._state = GzipDecoderState.OTHER_MEMBERS
            self._obj = zlib.decompressobj(16 + zlib.MAX_WBITS)


if brotli is not None:

    class BrotliDecoder(object):
        # Supports both 'brotlipy' and 'Brotli' packages
        # since they share an import name. The top branches
        # are for 'brotlipy' and bottom branches for 'Brotli'
        def __init__(self):
            self._obj = brotli.Decompressor()
            if hasattr(self._obj, "decompress"):
                self.decompress = self._obj.decompress
            else:
                self.decompress = self._obj.process

        def flush(self):
            if hasattr(self._obj, "flush"):
                return self._obj.flush()
            return b""


class MultiDecoder(object):
    """
    From RFC7231:
        If one or more encodings have been applied to a representation, the
        sender that applied the encodings MUST generate a Content-Encoding
        header field that lists the content codings in the order in which
        they were applied.
    """

    def __init__(self, modes):
        self._decoders = [_get_decoder(m.strip()) for m in modes.split(",")]

    def flush(self):
        return self._decoders[0].flush()

    def decompress(self, data):
        for d in reversed(self._decoders):
            data = d.decompress(data)
        return data


def _get_decoder(mode):
    if "," in mode:
        return MultiDecoder(mode)

    if mode == "gzip":
        return GzipDecoder()

    if brotli is not None and mode == "br":
        return BrotliDecoder()

    return DeflateDecoder()


class HTTPResponse(io.IOBase):
    """
    HTTP Response container.

    Backwards-compatible with :class:`http.client.HTTPResponse` but the response ``body`` is
    loaded and decoded on-demand when the ``data`` property is accessed.  This
    class is also compatible with the Python standard library's :mod:`io`
    module, and can hence be treated as a readable object in the context of that
    framework.

    Extra parameters for behaviour not present in :class:`http.client.HTTPResponse`:

    :param preload_content:
        If True, the response's body will be preloaded during construction.

    :param decode_content:
        If True, will attempt to decode the body based on the
        'content-encoding' header.

    :param original_response:
        When this HTTPResponse wrapper is generated from an :class:`http.client.HTTPResponse`
        object, it's convenient to include the original for debug purposes. It's
        otherwise unused.

    :param retries:
        The retries contains the last :class:`~urllib3.util.retry.Retry` that
        was used during the request.

    :param enforce_content_length:
        Enforce content length checking. Body returned by server must match
        value of Content-Length header, if present. Otherwise, raise error.
    """

    CONTENT_DECODERS = ["gzip", "deflate"]
    if brotli is not None:
        CONTENT_DECODERS += ["br"]
    REDIRECT_STATUSES = [301, 302, 303, 307, 308]

    def __init__(
        self,
        body="",
        headers=None,
        status=0,
        version=0,
        reason=None,
        strict=0,
        preload_content=True,
        decode_content=True,
        original_response=None,
        pool=None,
        connection=None,
        msg=None,
        retries=None,
        enforce_content_length=False,
        request_method=None,
        request_url=None,
        auto_close=True,
    ):

        if isinstance(headers, HTTPHeaderDict):
            self.headers = headers
        else:
            self.headers = HTTPHeaderDict(headers)
        self.status = status
        self.version = version
        self.reason = reason
        self.strict = strict
        self.decode_content = decode_content
        self.retries = retries
        self.enforce_content_length = enforce_content_length
        self.auto_close = auto_close

        self._decoder = None
        self._body = None
        self._fp = None
        self._original_response = original_response
        self._fp_bytes_read = 0
        self.msg = msg
        self._request_url = request_url

        if body and isinstance(body, (six.string_types, bytes)):
            self._body = body

        self._pool = pool
        self._connection = connection

        if hasattr(body, "read"):
            self._fp = body

        # Are we using the chunked-style of transfer encoding?
        self.chunked = False
        self.chunk_left = None
        tr_enc = self.headers.get("transfer-encoding", "").lower()
        # Don't incur the penalty of creating a list and then discarding it
        encodings = (enc.strip() for enc in tr_enc.split(","))
        if "chunked" in encodings:
            self.chunked = True

        # Determine length of response
        self.length_remaining = self._init_length(request_method)

        # If requested, preload the body.
        if preload_content and not self._body:
            self._body = self.read(decode_content=decode_content)

    def get_redirect_location(self):
        """
        Should we redirect and where to?

        :returns: Truthy redirect location string if we got a redirect status
            code and valid location. ``None`` if redirect status and no
            location. ``False`` if not a redirect status code.
        """
        if self.status in self.REDIRECT_STATUSES:
            return self.headers.get("location")

        return False

    def release_conn(self):
        if not self._pool or not self._connection:
            return

        self._pool._put_conn(self._connection)
        self._connection = None

    def drain_conn(self):
        """
        Read and discard any remaining HTTP response data in the response connection.

        Unread data in the HTTPResponse connection blocks the connection from being released back to the pool.
        """
        try:
            self.read()
        except (HTTPError, SocketError, BaseSSLError, HTTPException):
            pass

    @property
    def data(self):
        # For backwards-compat with earlier urllib3 0.4 and earlier.
        if self._body:
            return self._body

        if self._fp:
            return self.read(cache_content=True)

    @property
    def connection(self):
        return self._connection

    def isclosed(self):
        return is_fp_closed(self._fp)

    def tell(self):
        """
        Obtain the number of bytes pulled over the wire so far. May differ from
        the amount of content returned by :meth:``urllib3.response.HTTPResponse.read``
        if bytes are encoded on the wire (e.g, compressed).
        """
        return self._fp_bytes_read

    def _init_length(self, request_method):
        """
        Set initial length value for Response content if available.
        """
        length = self.headers.get("content-length")

        if length is not None:
            if self.chunked:
                # This Response will fail with an IncompleteRead if it can't be
                # received as chunked. This method falls back to attempt reading
                # the response before raising an exception.
                log.warning(
                    "Received response with both Content-Length and "
                    "Transfer-Encoding set. This is expressly forbidden "
                    "by RFC 7230 sec 3.3.2. Ignoring Content-Length and "
                    "attempting to process response as Transfer-Encoding: "
                    "chunked."
                )
                return None

            try:
                # RFC 7230 section 3.3.2 specifies multiple content lengths can
                # be sent in a single Content-Length header
                # (e.g. Content-Length: 42, 42). This line ensures the values
                # are all valid ints and that as long as the `set` length is 1,
                # all values are the same. Otherwise, the header is invalid.
                lengths = set([int(val) for val in length.split(",")])
                if len(lengths) > 1:
                    raise InvalidHeader(
                        "Content-Length contained multiple "
                        "unmatching values (%s)" % length
                    )
                length = lengths.pop()
            except ValueError:
                length = None
            else:
                if length < 0:
                    length = None

        # Convert status to int for comparison
        # In some cases, httplib returns a status of "_UNKNOWN"
        try:
            status = int(self.status)
        except ValueError:
            status = 0

        # Check for responses that shouldn't include a body
        if status in (204, 304) or 100 <= status < 200 or request_method == "HEAD":
            length = 0

        return length

    def _init_decoder(self):
        """
        Set-up the _decoder attribute if necessary.
        """
        # Note: content-encoding value should be case-insensitive, per RFC 7230
        # Section 3.2
        content_encoding = self.headers.get("content-encoding", "").lower()
        if self._decoder is None:
            if content_encoding in self.CONTENT_DECODERS:
                self._decoder = _get_decoder(content_encoding)
            elif "," in content_encoding:
                encodings = [
                    e.strip()
                    for e in content_encoding.split(",")
                    if e.strip() in self.CONTENT_DECODERS
                ]
                if len(encodings):
                    self._decoder = _get_decoder(content_encoding)

    DECODER_ERROR_CLASSES = (IOError, zlib.error)
    if brotli is not None:
        DECODER_ERROR_CLASSES += (brotli.error,)

    def _decode(self, data, decode_content, flush_decoder):
        """
        Decode the data passed in and potentially flush the decoder.
        """
        if not decode_content:
            return data

        try:
            if self._decoder:
                data = self._decoder.decompress(data)
        except self.DECODER_ERROR_CLASSES as e:
            content_encoding = self.headers.get("content-encoding", "").lower()
            raise DecodeError(
                "Received response with content-encoding: %s, but "
                "failed to decode it." % content_encoding,
                e,
            )
        if flush_decoder:
            data += self._flush_decoder()

        return data

    def _flush_decoder(self):
        """
        Flushes the decoder. Should only be called if the decoder is actually
        being used.
        """
        if self._decoder:
            buf = self._decoder.decompress(b"")
            return buf + self._decoder.flush()

        return b""

    @contextmanager
    def _error_catcher(self):
        """
        Catch low-level python exceptions, instead re-raising urllib3
        variants, so that low-level exceptions are not leaked in the
        high-level api.

        On exit, release the connection back to the pool.
        """
        clean_exit = False

        try:
            try:
                yield

            except SocketTimeout:
                # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
                # there is yet no clean way to get at it from this context.
                raise ReadTimeoutError(self._pool, None, "Read timed out.")

            except BaseSSLError as e:
                # FIXME: Is there a better way to differentiate between SSLErrors?
                if "read operation timed out" not in str(e):
                    # SSL errors related to framing/MAC get wrapped and reraised here
                    raise SSLError(e)

                raise ReadTimeoutError(self._pool, None, "Read timed out.")

            except (HTTPException, SocketError) as e:
                # This includes IncompleteRead.
                raise ProtocolError("Connection broken: %r" % e, e)

            # If no exception is thrown, we should avoid cleaning up
            # unnecessarily.
            clean_exit = True
        finally:
            # If we didn't terminate cleanly, we need to throw away our
            # connection.
            if not clean_exit:
                # The response may not be closed but we're not going to use it
                # anymore so close it now to ensure that the connection is
                # released back to the pool.
                if self._original_response:
                    self._original_response.close()

                # Closing the response may not actually be sufficient to close
                # everything, so if we have a hold of the connection close that
                # too.
                if self._connection:
                    self._connection.close()

            # If we hold the original response but it's closed now, we should
            # return the connection back to the pool.
            if self._original_response and self._original_response.isclosed():
                self.release_conn()

    def _fp_read(self, amt):
        """
        Read a response with the thought that reading the number of bytes
        larger than can fit in a 32-bit int at a time via SSL in some
        known cases leads to an overflow error that has to be prevented
        if `amt` or `self.length_remaining` indicate that a problem may
        happen.

        The known cases:
          * 3.8 <= CPython < 3.9.7 because of a bug
            https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900.
          * urllib3 injected with pyOpenSSL-backed SSL-support.
          * CPython < 3.10 only when `amt` does not fit 32-bit int.
        """
        assert self._fp
        c_int_max = 2 ** 31 - 1
        if (
            (
                (amt and amt > c_int_max)
                or (self.length_remaining and self.length_remaining > c_int_max)
            )
            and not util.IS_SECURETRANSPORT
            and (util.IS_PYOPENSSL or sys.version_info < (3, 10))
        ):
            buffer = io.BytesIO()
            # Besides `max_chunk_amt` being a maximum chunk size, it
            # affects memory overhead of reading a response by this
            # method in CPython.
            # `c_int_max` equal to 2 GiB - 1 byte is the actual maximum
            # chunk size that does not lead to an overflow error, but
            # 256 MiB is a compromise.
            max_chunk_amt = 2 ** 28
            while amt is None or amt != 0:
                if amt is not None:
                    chunk_amt = min(amt, max_chunk_amt)
                    amt -= chunk_amt
                else:
                    chunk_amt = max_chunk_amt
                data = self._fp.read(chunk_amt)
                if not data:
                    break
                buffer.write(data)
                del data  # to reduce peak memory usage by `max_chunk_amt`.
            return buffer.getvalue()
        else:
            # StringIO doesn't like amt=None
            return self._fp.read(amt) if amt is not None else self._fp.read()

    def read(self, amt=None, decode_content=None, cache_content=False):
        """
        Similar to :meth:`http.client.HTTPResponse.read`, but with two additional
        parameters: ``decode_content`` and ``cache_content``.

        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the ``.data`` property to continue working
            after having ``.read()`` the file object. (Overridden if ``amt`` is
            set.)
        """
        self._init_decoder()
        if decode_content is None:
            decode_content = self.decode_content

        if self._fp is None:
            return

        flush_decoder = False
        fp_closed = getattr(self._fp, "closed", False)

        with self._error_catcher():
            data = self._fp_read(amt) if not fp_closed else b""
            if amt is None:
                flush_decoder = True
            else:
                cache_content = False
                if (
                    amt != 0 and not data
                ):  # Platform-specific: Buggy versions of Python.
                    # Close the connection when no data is returned
                    #
                    # This is redundant to what httplib/http.client _should_
                    # already do.  However, versions of python released before
                    # December 15, 2012 (http://bugs.python.org/issue16298) do
                    # not properly close the connection in all cases. There is
                    # no harm in redundantly calling close.
                    self._fp.close()
                    flush_decoder = True
                    if self.enforce_content_length and self.length_remaining not in (
                        0,
                        None,
                    ):
                        # This is an edge case that httplib failed to cover due
                        # to concerns of backward compatibility. We're
                        # addressing it here to make sure IncompleteRead is
                        # raised during streaming, so all calls with incorrect
                        # Content-Length are caught.
                        raise IncompleteRead(self._fp_bytes_read, self.length_remaining)

        if data:
            self._fp_bytes_read += len(data)
            if self.length_remaining is not None:
                self.length_remaining -= len(data)

            data = self._decode(data, decode_content, flush_decoder)

            if cache_content:
                self._body = data

        return data

    def stream(self, amt=2 ** 16, decode_content=None):
        """
        A generator wrapper for the read() method. A call will block until
        ``amt`` bytes have been read from the connection or until the
        connection is closed.

        :param amt:
            How much of the content to read. The generator will return up to
            much data per iteration, but may return less. This is particularly
            likely when using compressed data. However, the empty string will
            never be returned.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
        """
        if self.chunked and self.supports_chunked_reads():
            for line in self.read_chunked(amt, decode_content=decode_content):
                yield line
        else:
            while not is_fp_closed(self._fp):
                data = self.read(amt=amt, decode_content=decode_content)

                if data:
                    yield data

    @classmethod
    def from_httplib(ResponseCls, r, **response_kw):
        """
        Given an :class:`http.client.HTTPResponse` instance ``r``, return a
        corresponding :class:`urllib3.response.HTTPResponse` object.

        Remaining parameters are passed to the HTTPResponse constructor, along
        with ``original_response=r``.
        """
        headers = r.msg

        if not isinstance(headers, HTTPHeaderDict):
            if six.PY2:
                # Python 2.7
                headers = HTTPHeaderDict.from_httplib(headers)
            else:
                headers = HTTPHeaderDict(headers.items())

        # HTTPResponse objects in Python 3 don't have a .strict attribute
        strict = getattr(r, "strict", 0)
        resp = ResponseCls(
            body=r,
            headers=headers,
            status=r.status,
            version=r.version,
            reason=r.reason,
            strict=strict,
            original_response=r,
            **response_kw
        )
        return resp

    # Backwards-compatibility methods for http.client.HTTPResponse
    def getheaders(self):
        warnings.warn(
            "HTTPResponse.getheaders() is deprecated and will be removed "
            "in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.",
            category=DeprecationWarning,
            stacklevel=2,
        )
        return self.headers

    def getheader(self, name, default=None):
        warnings.warn(
            "HTTPResponse.getheader() is deprecated and will be removed "
            "in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).",
            category=DeprecationWarning,
            stacklevel=2,
        )
        return self.headers.get(name, default)

    # Backwards compatibility for http.cookiejar
    def info(self):
        return self.headers

    # Overrides from io.IOBase
    def close(self):
        if not self.closed:
            self._fp.close()

        if self._connection:
            self._connection.close()

        if not self.auto_close:
            io.IOBase.close(self)

    @property
    def closed(self):
        if not self.auto_close:
            return io.IOBase.closed.__get__(self)
        elif self._fp is None:
            return True
        elif hasattr(self._fp, "isclosed"):
            return self._fp.isclosed()
        elif hasattr(self._fp, "closed"):
            return self._fp.closed
        else:
            return True

    def fileno(self):
        if self._fp is None:
            raise IOError("HTTPResponse has no file to get a fileno from")
        elif hasattr(self._fp, "fileno"):
            return self._fp.fileno()
        else:
            raise IOError(
                "The file-like object this HTTPResponse is wrapped "
                "around has no file descriptor"
            )

    def flush(self):
        if (
            self._fp is not None
            and hasattr(self._fp, "flush")
            and not getattr(self._fp, "closed", False)
        ):
            return self._fp.flush()

    def readable(self):
        # This method is required for `io` module compatibility.
        return True

    def readinto(self, b):
        # This method is required for `io` module compatibility.
        temp = self.read(len(b))
        if len(temp) == 0:
            return 0
        else:
            b[: len(temp)] = temp
            return len(temp)

    def supports_chunked_reads(self):
        """
        Checks if the underlying file-like object looks like a
        :class:`http.client.HTTPResponse` object. We do this by testing for
        the fp attribute. If it is present we assume it returns raw chunks as
        processed by read_chunked().
        """
        return hasattr(self._fp, "fp")

    def _update_chunk_length(self):
        # First, we'll figure out length of a chunk and then
        # we'll try to read it from socket.
        if self.chunk_left is not None:
            return
        line = self._fp.fp.readline()
        line = line.split(b";", 1)[0]
        try:
            self.chunk_left = int(line, 16)
        except ValueError:
            # Invalid chunked protocol response, abort.
            self.close()
            raise InvalidChunkLength(self, line)

    def _handle_chunk(self, amt):
        returned_chunk = None
        if amt is None:
            chunk = self._fp._safe_read(self.chunk_left)
            returned_chunk = chunk
            self._fp._safe_read(2)  # Toss the CRLF at the end of the chunk.
            self.chunk_left = None
        elif amt < self.chunk_left:
            value = self._fp._safe_read(amt)
            self.chunk_left = self.chunk_left - amt
            returned_chunk = value
        elif amt == self.chunk_left:
            value = self._fp._safe_read(amt)
            self._fp._safe_read(2)  # Toss the CRLF at the end of the chunk.
            self.chunk_left = None
            returned_chunk = value
        else:  # amt > self.chunk_left
            returned_chunk = self._fp._safe_read(self.chunk_left)
            self._fp._safe_read(2)  # Toss the CRLF at the end of the chunk.
            self.chunk_left = None
        return returned_chunk

    def read_chunked(self, amt=None, decode_content=None):
        """
        Similar to :meth:`HTTPResponse.read`, but with an additional
        parameter: ``decode_content``.

        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
        """
        self._init_decoder()
        # FIXME: Rewrite this method and make it a class with a better structured logic.
        if not self.chunked:
            raise ResponseNotChunked(
                "Response is not chunked. "
                "Header 'transfer-encoding: chunked' is missing."
            )
        if not self.supports_chunked_reads():
            raise BodyNotHttplibCompatible(
                "Body should be http.client.HTTPResponse like. "
                "It should have have an fp attribute which returns raw chunks."
            )

        with self._error_catcher():
            # Don't bother reading the body of a HEAD request.
            if self._original_response and is_response_to_head(self._original_response):
                self._original_response.close()
                return

            # If a response is already read and closed
            # then return immediately.
            if self._fp.fp is None:
                return

            while True:
                self._update_chunk_length()
                if self.chunk_left == 0:
                    break
                chunk = self._handle_chunk(amt)
                decoded = self._decode(
                    chunk, decode_content=decode_content, flush_decoder=False
                )
                if decoded:
                    yield decoded

            if decode_content:
                # On CPython and PyPy, we should never need to flush the
                # decoder. However, on Jython we *might* need to, so
                # lets defensively do it anyway.
                decoded = self._flush_decoder()
                if decoded:  # Platform-specific: Jython.
                    yield decoded

            # Chunk content ends with \r\n: discard it.
            while True:
                line = self._fp.fp.readline()
                if not line:
                    # Some sites may not end with '\r\n'.
                    break
                if line == b"\r\n":
                    break

            # We read everything; close the "file".
            if self._original_response:
                self._original_response.close()

    def geturl(self):
        """
        Returns the URL that was the source of this response.
        If the request that generated this response redirected, this method
        will return the final redirect location.
        """
        if self.retries is not None and len(self.retries.history):
            return self.retries.history[-1].redirect_location
        else:
            return self._request_url

    def __iter__(self):
        buffer = []
        for chunk in self.stream(decode_content=True):
            if b"\n" in chunk:
                chunk = chunk.split(b"\n")
                yield b"".join(buffer) + chunk[0] + b"\n"
                for x in chunk[1:-1]:
                    yield x + b"\n"
                if chunk[-1]:
                    buffer = [chunk[-1]]
                else:
                    buffer = []
            else:
                buffer.append(chunk)
        if buffer:
            yield b"".join(buffer)
python3.12/site-packages/pip/_vendor/urllib3/_version.py000064400000000100151732702450017104 0ustar00# This file is protected via CODEOWNERS
__version__ = "1.26.17"
python3.12/site-packages/pip/_vendor/urllib3/fields.py000064400000020603151732702450016540 0ustar00from __future__ import absolute_import

import email.utils
import mimetypes
import re

from .packages import six


def guess_content_type(filename, default="application/octet-stream"):
    """
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    """
    if filename:
        return mimetypes.guess_type(filename)[0] or default
    return default


def format_header_param_rfc2231(name, value):
    """
    Helper function to format and quote a single header parameter using the
    strategy defined in RFC 2231.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows
    `RFC 2388 Section 4.4 <https://tools.ietf.org/html/rfc2388#section-4.4>`_.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as ``bytes`` or `str``.
    :ret:
        An RFC-2231-formatted unicode string.
    """
    if isinstance(value, six.binary_type):
        value = value.decode("utf-8")

    if not any(ch in value for ch in '"\\\r\n'):
        result = u'%s="%s"' % (name, value)
        try:
            result.encode("ascii")
        except (UnicodeEncodeError, UnicodeDecodeError):
            pass
        else:
            return result

    if six.PY2:  # Python 2:
        value = value.encode("utf-8")

    # encode_rfc2231 accepts an encoded string and returns an ascii-encoded
    # string in Python 2 but accepts and returns unicode strings in Python 3
    value = email.utils.encode_rfc2231(value, "utf-8")
    value = "%s*=%s" % (name, value)

    if six.PY2:  # Python 2:
        value = value.decode("utf-8")

    return value


_HTML5_REPLACEMENTS = {
    u"\u0022": u"%22",
    # Replace "\" with "\\".
    u"\u005C": u"\u005C\u005C",
}

# All control characters from 0x00 to 0x1F *except* 0x1B.
_HTML5_REPLACEMENTS.update(
    {
        six.unichr(cc): u"%{:02X}".format(cc)
        for cc in range(0x00, 0x1F + 1)
        if cc not in (0x1B,)
    }
)


def _replace_multiple(value, needles_and_replacements):
    def replacer(match):
        return needles_and_replacements[match.group(0)]

    pattern = re.compile(
        r"|".join([re.escape(needle) for needle in needles_and_replacements.keys()])
    )

    result = pattern.sub(replacer, value)

    return result


def format_header_param_html5(name, value):
    """
    Helper function to format and quote a single header parameter using the
    HTML5 strategy.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows the `HTML5 Working Draft
    Section 4.10.22.7`_ and matches the behavior of curl and modern browsers.

    .. _HTML5 Working Draft Section 4.10.22.7:
        https://w3c.github.io/html/sec-forms.html#multipart-form-data

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as ``bytes`` or `str``.
    :ret:
        A unicode string, stripped of troublesome characters.
    """
    if isinstance(value, six.binary_type):
        value = value.decode("utf-8")

    value = _replace_multiple(value, _HTML5_REPLACEMENTS)

    return u'%s="%s"' % (name, value)


# For backwards-compatibility.
format_header_param = format_header_param_html5


class RequestField(object):
    """
    A data container for request body parameters.

    :param name:
        The name of this request field. Must be unicode.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field. Must be unicode.
    :param headers:
        An optional dict-like object of headers to initially use for the field.
    :param header_formatter:
        An optional callable that is used to encode and format the headers. By
        default, this is :func:`format_header_param_html5`.
    """

    def __init__(
        self,
        name,
        data,
        filename=None,
        headers=None,
        header_formatter=format_header_param_html5,
    ):
        self._name = name
        self._filename = filename
        self.data = data
        self.headers = {}
        if headers:
            self.headers = dict(headers)
        self.header_formatter = header_formatter

    @classmethod
    def from_tuples(cls, fieldname, value, header_formatter=format_header_param_html5):
        """
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from
        parameter of key/value strings AND key/filetuple. A filetuple is a
        (filename, data, MIME type) tuple where the MIME type is optional.
        For example::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        """
        if isinstance(value, tuple):
            if len(value) == 3:
                filename, data, content_type = value
            else:
                filename, data = value
                content_type = guess_content_type(filename)
        else:
            filename = None
            content_type = None
            data = value

        request_param = cls(
            fieldname, data, filename=filename, header_formatter=header_formatter
        )
        request_param.make_multipart(content_type=content_type)

        return request_param

    def _render_part(self, name, value):
        """
        Overridable helper function to format a single header parameter. By
        default, this calls ``self.header_formatter``.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        """

        return self.header_formatter(name, value)

    def _render_parts(self, header_parts):
        """
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
            as `k1="v1"; k2="v2"; ...`.
        """
        parts = []
        iterable = header_parts
        if isinstance(header_parts, dict):
            iterable = header_parts.items()

        for name, value in iterable:
            if value is not None:
                parts.append(self._render_part(name, value))

        return u"; ".join(parts)

    def render_headers(self):
        """
        Renders the headers for this request field.
        """
        lines = []

        sort_keys = ["Content-Disposition", "Content-Type", "Content-Location"]
        for sort_key in sort_keys:
            if self.headers.get(sort_key, False):
                lines.append(u"%s: %s" % (sort_key, self.headers[sort_key]))

        for header_name, header_value in self.headers.items():
            if header_name not in sort_keys:
                if header_value:
                    lines.append(u"%s: %s" % (header_name, header_value))

        lines.append(u"\r\n")
        return u"\r\n".join(lines)

    def make_multipart(
        self, content_disposition=None, content_type=None, content_location=None
    ):
        """
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        """
        self.headers["Content-Disposition"] = content_disposition or u"form-data"
        self.headers["Content-Disposition"] += u"; ".join(
            [
                u"",
                self._render_parts(
                    ((u"name", self._name), (u"filename", self._filename))
                ),
            ]
        )
        self.headers["Content-Type"] = content_type
        self.headers["Content-Location"] = content_location
python3.12/site-packages/pip/_vendor/urllib3/__init__.py000064400000006405151732702450017035 0ustar00"""
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more
"""
from __future__ import absolute_import

# Set default logging handler to avoid "No handler found" warnings.
import logging
import warnings
from logging import NullHandler

from . import exceptions
from ._version import __version__
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
from .filepost import encode_multipart_formdata
from .poolmanager import PoolManager, ProxyManager, proxy_from_url
from .response import HTTPResponse
from .util.request import make_headers
from .util.retry import Retry
from .util.timeout import Timeout
from .util.url import get_host

# === NOTE TO REPACKAGERS AND VENDORS ===
# Please delete this block, this logic is only
# for urllib3 being distributed via PyPI.
# See: https://github.com/urllib3/urllib3/issues/2680
try:
    import urllib3_secure_extra  # type: ignore # noqa: F401
except ImportError:
    pass
else:
    warnings.warn(
        "'urllib3[secure]' extra is deprecated and will be removed "
        "in a future release of urllib3 2.x. Read more in this issue: "
        "https://github.com/urllib3/urllib3/issues/2680",
        category=DeprecationWarning,
        stacklevel=2,
    )

__author__ = "Andrey Petrov (andrey.petrov@shazow.net)"
__license__ = "MIT"
__version__ = __version__

__all__ = (
    "HTTPConnectionPool",
    "HTTPSConnectionPool",
    "PoolManager",
    "ProxyManager",
    "HTTPResponse",
    "Retry",
    "Timeout",
    "add_stderr_logger",
    "connection_from_url",
    "disable_warnings",
    "encode_multipart_formdata",
    "get_host",
    "make_headers",
    "proxy_from_url",
)

logging.getLogger(__name__).addHandler(NullHandler())


def add_stderr_logger(level=logging.DEBUG):
    """
    Helper for quickly adding a StreamHandler to the logger. Useful for
    debugging.

    Returns the handler after adding it.
    """
    # This method needs to be in this __init__.py to get the __name__ correct
    # even if urllib3 is vendored within another package.
    logger = logging.getLogger(__name__)
    handler = logging.StreamHandler()
    handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s"))
    logger.addHandler(handler)
    logger.setLevel(level)
    logger.debug("Added a stderr logging handler to logger: %s", __name__)
    return handler


# ... Clean up.
del NullHandler


# All warning filters *must* be appended unless you're really certain that they
# shouldn't be: otherwise, it's very hard for users to use most Python
# mechanisms to silence them.
# SecurityWarning's always go off by default.
warnings.simplefilter("always", exceptions.SecurityWarning, append=True)
# SubjectAltNameWarning's should go off once per host
warnings.simplefilter("default", exceptions.SubjectAltNameWarning, append=True)
# InsecurePlatformWarning's don't vary between requests, so we keep it default.
warnings.simplefilter("default", exceptions.InsecurePlatformWarning, append=True)
# SNIMissingWarnings should go off only once.
warnings.simplefilter("default", exceptions.SNIMissingWarning, append=True)


def disable_warnings(category=exceptions.HTTPWarning):
    """
    Helper for quickly disabling all urllib3 warnings.
    """
    warnings.simplefilter("ignore", category)
python3.12/site-packages/pip/_vendor/urllib3/connectionpool.py000064400000116066151732702450020334 0ustar00from __future__ import absolute_import

import errno
import logging
import re
import socket
import sys
import warnings
from socket import error as SocketError
from socket import timeout as SocketTimeout

from .connection import (
    BaseSSLError,
    BrokenPipeError,
    DummyConnection,
    HTTPConnection,
    HTTPException,
    HTTPSConnection,
    VerifiedHTTPSConnection,
    port_by_scheme,
)
from .exceptions import (
    ClosedPoolError,
    EmptyPoolError,
    HeaderParsingError,
    HostChangedError,
    InsecureRequestWarning,
    LocationValueError,
    MaxRetryError,
    NewConnectionError,
    ProtocolError,
    ProxyError,
    ReadTimeoutError,
    SSLError,
    TimeoutError,
)
from .packages import six
from .packages.six.moves import queue
from .request import RequestMethods
from .response import HTTPResponse
from .util.connection import is_connection_dropped
from .util.proxy import connection_requires_http_tunnel
from .util.queue import LifoQueue
from .util.request import set_file_position
from .util.response import assert_header_parsing
from .util.retry import Retry
from .util.ssl_match_hostname import CertificateError
from .util.timeout import Timeout
from .util.url import Url, _encode_target
from .util.url import _normalize_host as normalize_host
from .util.url import get_host, parse_url

try:  # Platform-specific: Python 3
    import weakref

    weakref_finalize = weakref.finalize
except AttributeError:  # Platform-specific: Python 2
    from .packages.backports.weakref_finalize import weakref_finalize

xrange = six.moves.xrange

log = logging.getLogger(__name__)

_Default = object()


# Pool objects
class ConnectionPool(object):
    """
    Base class for all connection pools, such as
    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.

    .. note::
       ConnectionPool.urlopen() does not normalize or percent-encode target URIs
       which is useful if your target server doesn't support percent-encoded
       target URIs.
    """

    scheme = None
    QueueCls = LifoQueue

    def __init__(self, host, port=None):
        if not host:
            raise LocationValueError("No host specified.")

        self.host = _normalize_host(host, scheme=self.scheme)
        self._proxy_host = host.lower()
        self.port = port

    def __str__(self):
        return "%s(host=%r, port=%r)" % (type(self).__name__, self.host, self.port)

    def __enter__(self):
        return self

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.close()
        # Return False to re-raise any potential exceptions
        return False

    def close(self):
        """
        Close all pooled connections and disable the pool.
        """
        pass


# This is taken from http://hg.python.org/cpython/file/7aaba721ebc0/Lib/socket.py#l252
_blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK}


class HTTPConnectionPool(ConnectionPool, RequestMethods):
    """
    Thread-safe connection pool for one host.

    :param host:
        Host used for this HTTP Connection (e.g. "localhost"), passed into
        :class:`http.client.HTTPConnection`.

    :param port:
        Port used for this HTTP Connection (None is equivalent to 80), passed
        into :class:`http.client.HTTPConnection`.

    :param strict:
        Causes BadStatusLine to be raised if the status line can't be parsed
        as a valid HTTP/1.0 or 1.1 status line, passed into
        :class:`http.client.HTTPConnection`.

        .. note::
           Only works in Python 2. This parameter is ignored in Python 3.

    :param timeout:
        Socket timeout in seconds for each individual connection. This can
        be a float or integer, which sets the timeout for the HTTP request,
        or an instance of :class:`urllib3.util.Timeout` which gives you more
        fine-grained control over request timeouts. After the constructor has
        been parsed, this is always a `urllib3.util.Timeout` object.

    :param maxsize:
        Number of connections to save that can be reused. More than 1 is useful
        in multithreaded situations. If ``block`` is set to False, more
        connections will be created but they will not be saved once they've
        been used.

    :param block:
        If set to True, no more than ``maxsize`` connections will be used at
        a time. When no free connections are available, the call will block
        until a connection has been released. This is a useful side effect for
        particular multithreaded situations where one does not want to use more
        than maxsize connections per host to prevent flooding.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param retries:
        Retry configuration to use by default with requests in this pool.

    :param _proxy:
        Parsed proxy URL, should not be used directly, instead, see
        :class:`urllib3.ProxyManager`

    :param _proxy_headers:
        A dictionary with proxy headers, should not be used directly,
        instead, see :class:`urllib3.ProxyManager`

    :param \\**conn_kw:
        Additional parameters are used to create fresh :class:`urllib3.connection.HTTPConnection`,
        :class:`urllib3.connection.HTTPSConnection` instances.
    """

    scheme = "http"
    ConnectionCls = HTTPConnection
    ResponseCls = HTTPResponse

    def __init__(
        self,
        host,
        port=None,
        strict=False,
        timeout=Timeout.DEFAULT_TIMEOUT,
        maxsize=1,
        block=False,
        headers=None,
        retries=None,
        _proxy=None,
        _proxy_headers=None,
        _proxy_config=None,
        **conn_kw
    ):
        ConnectionPool.__init__(self, host, port)
        RequestMethods.__init__(self, headers)

        self.strict = strict

        if not isinstance(timeout, Timeout):
            timeout = Timeout.from_float(timeout)

        if retries is None:
            retries = Retry.DEFAULT

        self.timeout = timeout
        self.retries = retries

        self.pool = self.QueueCls(maxsize)
        self.block = block

        self.proxy = _proxy
        self.proxy_headers = _proxy_headers or {}
        self.proxy_config = _proxy_config

        # Fill the queue up so that doing get() on it will block properly
        for _ in xrange(maxsize):
            self.pool.put(None)

        # These are mostly for testing and debugging purposes.
        self.num_connections = 0
        self.num_requests = 0
        self.conn_kw = conn_kw

        if self.proxy:
            # Enable Nagle's algorithm for proxies, to avoid packet fragmentation.
            # We cannot know if the user has added default socket options, so we cannot replace the
            # list.
            self.conn_kw.setdefault("socket_options", [])

            self.conn_kw["proxy"] = self.proxy
            self.conn_kw["proxy_config"] = self.proxy_config

        # Do not pass 'self' as callback to 'finalize'.
        # Then the 'finalize' would keep an endless living (leak) to self.
        # By just passing a reference to the pool allows the garbage collector
        # to free self if nobody else has a reference to it.
        pool = self.pool

        # Close all the HTTPConnections in the pool before the
        # HTTPConnectionPool object is garbage collected.
        weakref_finalize(self, _close_pool_connections, pool)

    def _new_conn(self):
        """
        Return a fresh :class:`HTTPConnection`.
        """
        self.num_connections += 1
        log.debug(
            "Starting new HTTP connection (%d): %s:%s",
            self.num_connections,
            self.host,
            self.port or "80",
        )

        conn = self.ConnectionCls(
            host=self.host,
            port=self.port,
            timeout=self.timeout.connect_timeout,
            strict=self.strict,
            **self.conn_kw
        )
        return conn

    def _get_conn(self, timeout=None):
        """
        Get a connection. Will return a pooled connection if one is available.

        If no connections are available and :prop:`.block` is ``False``, then a
        fresh connection is returned.

        :param timeout:
            Seconds to wait before giving up and raising
            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
            :prop:`.block` is ``True``.
        """
        conn = None
        try:
            conn = self.pool.get(block=self.block, timeout=timeout)

        except AttributeError:  # self.pool is None
            raise ClosedPoolError(self, "Pool is closed.")

        except queue.Empty:
            if self.block:
                raise EmptyPoolError(
                    self,
                    "Pool reached maximum size and no more connections are allowed.",
                )
            pass  # Oh well, we'll create a new connection then

        # If this is a persistent connection, check if it got disconnected
        if conn and is_connection_dropped(conn):
            log.debug("Resetting dropped connection: %s", self.host)
            conn.close()
            if getattr(conn, "auto_open", 1) == 0:
                # This is a proxied connection that has been mutated by
                # http.client._tunnel() and cannot be reused (since it would
                # attempt to bypass the proxy)
                conn = None

        return conn or self._new_conn()

    def _put_conn(self, conn):
        """
        Put a connection back into the pool.

        :param conn:
            Connection object for the current host and port as returned by
            :meth:`._new_conn` or :meth:`._get_conn`.

        If the pool is already full, the connection is closed and discarded
        because we exceeded maxsize. If connections are discarded frequently,
        then maxsize should be increased.

        If the pool is closed, then the connection will be closed and discarded.
        """
        try:
            self.pool.put(conn, block=False)
            return  # Everything is dandy, done.
        except AttributeError:
            # self.pool is None.
            pass
        except queue.Full:
            # This should never happen if self.block == True
            log.warning(
                "Connection pool is full, discarding connection: %s. Connection pool size: %s",
                self.host,
                self.pool.qsize(),
            )
        # Connection never got put back into the pool, close it.
        if conn:
            conn.close()

    def _validate_conn(self, conn):
        """
        Called right before a request is made, after the socket is created.
        """
        pass

    def _prepare_proxy(self, conn):
        # Nothing to do for HTTP connections.
        pass

    def _get_timeout(self, timeout):
        """Helper that always returns a :class:`urllib3.util.Timeout`"""
        if timeout is _Default:
            return self.timeout.clone()

        if isinstance(timeout, Timeout):
            return timeout.clone()
        else:
            # User passed us an int/float. This is for backwards compatibility,
            # can be removed later
            return Timeout.from_float(timeout)

    def _raise_timeout(self, err, url, timeout_value):
        """Is the error actually a timeout? Will raise a ReadTimeout or pass"""

        if isinstance(err, SocketTimeout):
            raise ReadTimeoutError(
                self, url, "Read timed out. (read timeout=%s)" % timeout_value
            )

        # See the above comment about EAGAIN in Python 3. In Python 2 we have
        # to specifically catch it and throw the timeout error
        if hasattr(err, "errno") and err.errno in _blocking_errnos:
            raise ReadTimeoutError(
                self, url, "Read timed out. (read timeout=%s)" % timeout_value
            )

        # Catch possible read timeouts thrown as SSL errors. If not the
        # case, rethrow the original. We need to do this because of:
        # http://bugs.python.org/issue10272
        if "timed out" in str(err) or "did not complete (read)" in str(
            err
        ):  # Python < 2.7.4
            raise ReadTimeoutError(
                self, url, "Read timed out. (read timeout=%s)" % timeout_value
            )

    def _make_request(
        self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw
    ):
        """
        Perform a request on a given urllib connection object taken from our
        pool.

        :param conn:
            a connection from one of our connection pools

        :param timeout:
            Socket timeout in seconds for the request. This can be a
            float or integer, which will set the same timeout value for
            the socket connect and the socket read, or an instance of
            :class:`urllib3.util.Timeout`, which gives you more fine-grained
            control over your timeouts.
        """
        self.num_requests += 1

        timeout_obj = self._get_timeout(timeout)
        timeout_obj.start_connect()
        conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout)

        # Trigger any extra validation we need to do.
        try:
            self._validate_conn(conn)
        except (SocketTimeout, BaseSSLError) as e:
            # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout.
            self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
            raise

        # conn.request() calls http.client.*.request, not the method in
        # urllib3.request. It also calls makefile (recv) on the socket.
        try:
            if chunked:
                conn.request_chunked(method, url, **httplib_request_kw)
            else:
                conn.request(method, url, **httplib_request_kw)

        # We are swallowing BrokenPipeError (errno.EPIPE) since the server is
        # legitimately able to close the connection after sending a valid response.
        # With this behaviour, the received response is still readable.
        except BrokenPipeError:
            # Python 3
            pass
        except IOError as e:
            # Python 2 and macOS/Linux
            # EPIPE and ESHUTDOWN are BrokenPipeError on Python 2, and EPROTOTYPE is needed on macOS
            # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/
            if e.errno not in {
                errno.EPIPE,
                errno.ESHUTDOWN,
                errno.EPROTOTYPE,
            }:
                raise

        # Reset the timeout for the recv() on the socket
        read_timeout = timeout_obj.read_timeout

        # App Engine doesn't have a sock attr
        if getattr(conn, "sock", None):
            # In Python 3 socket.py will catch EAGAIN and return None when you
            # try and read into the file pointer created by http.client, which
            # instead raises a BadStatusLine exception. Instead of catching
            # the exception and assuming all BadStatusLine exceptions are read
            # timeouts, check for a zero timeout before making the request.
            if read_timeout == 0:
                raise ReadTimeoutError(
                    self, url, "Read timed out. (read timeout=%s)" % read_timeout
                )
            if read_timeout is Timeout.DEFAULT_TIMEOUT:
                conn.sock.settimeout(socket.getdefaulttimeout())
            else:  # None or a value
                conn.sock.settimeout(read_timeout)

        # Receive the response from the server
        try:
            try:
                # Python 2.7, use buffering of HTTP responses
                httplib_response = conn.getresponse(buffering=True)
            except TypeError:
                # Python 3
                try:
                    httplib_response = conn.getresponse()
                except BaseException as e:
                    # Remove the TypeError from the exception chain in
                    # Python 3 (including for exceptions like SystemExit).
                    # Otherwise it looks like a bug in the code.
                    six.raise_from(e, None)
        except (SocketTimeout, BaseSSLError, SocketError) as e:
            self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
            raise

        # AppEngine doesn't have a version attr.
        http_version = getattr(conn, "_http_vsn_str", "HTTP/?")
        log.debug(
            '%s://%s:%s "%s %s %s" %s %s',
            self.scheme,
            self.host,
            self.port,
            method,
            url,
            http_version,
            httplib_response.status,
            httplib_response.length,
        )

        try:
            assert_header_parsing(httplib_response.msg)
        except (HeaderParsingError, TypeError) as hpe:  # Platform-specific: Python 3
            log.warning(
                "Failed to parse headers (url=%s): %s",
                self._absolute_url(url),
                hpe,
                exc_info=True,
            )

        return httplib_response

    def _absolute_url(self, path):
        return Url(scheme=self.scheme, host=self.host, port=self.port, path=path).url

    def close(self):
        """
        Close all pooled connections and disable the pool.
        """
        if self.pool is None:
            return
        # Disable access to the pool
        old_pool, self.pool = self.pool, None

        # Close all the HTTPConnections in the pool.
        _close_pool_connections(old_pool)

    def is_same_host(self, url):
        """
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        """
        if url.startswith("/"):
            return True

        # TODO: Add optional support for socket.gethostbyname checking.
        scheme, host, port = get_host(url)
        if host is not None:
            host = _normalize_host(host, scheme=scheme)

        # Use explicit default port for comparison when none is given
        if self.port and not port:
            port = port_by_scheme.get(scheme)
        elif not self.port and port == port_by_scheme.get(scheme):
            port = None

        return (scheme, host, port) == (self.scheme, self.host, self.port)

    def urlopen(
        self,
        method,
        url,
        body=None,
        headers=None,
        retries=None,
        redirect=True,
        assert_same_host=True,
        timeout=_Default,
        pool_timeout=None,
        release_conn=None,
        chunked=False,
        body_pos=None,
        **response_kw
    ):
        """
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param url:
            The URL to perform the request on.

        :param body:
            Data to send in the request body, either :class:`str`, :class:`bytes`,
            an iterable of :class:`str`/:class:`bytes`, or a file-like object.

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.

            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.

            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.

        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When ``False``, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.

        :param int body_pos:
            Position to seek to in file-like body in the event of a retry or
            redirect. Typically this won't need to be set because urllib3 will
            auto-populate the value when needed.

        :param \\**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        """

        parsed_url = parse_url(url)
        destination_scheme = parsed_url.scheme

        if headers is None:
            headers = self.headers

        if not isinstance(retries, Retry):
            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)

        if release_conn is None:
            release_conn = response_kw.get("preload_content", True)

        # Check host
        if assert_same_host and not self.is_same_host(url):
            raise HostChangedError(self, url, retries)

        # Ensure that the URL we're connecting to is properly encoded
        if url.startswith("/"):
            url = six.ensure_str(_encode_target(url))
        else:
            url = six.ensure_str(parsed_url.url)

        conn = None

        # Track whether `conn` needs to be released before
        # returning/raising/recursing. Update this variable if necessary, and
        # leave `release_conn` constant throughout the function. That way, if
        # the function recurses, the original value of `release_conn` will be
        # passed down into the recursive call, and its value will be respected.
        #
        # See issue #651 [1] for details.
        #
        # [1] <https://github.com/urllib3/urllib3/issues/651>
        release_this_conn = release_conn

        http_tunnel_required = connection_requires_http_tunnel(
            self.proxy, self.proxy_config, destination_scheme
        )

        # Merge the proxy headers. Only done when not using HTTP CONNECT. We
        # have to copy the headers dict so we can safely change it without those
        # changes being reflected in anyone else's copy.
        if not http_tunnel_required:
            headers = headers.copy()
            headers.update(self.proxy_headers)

        # Must keep the exception bound to a separate variable or else Python 3
        # complains about UnboundLocalError.
        err = None

        # Keep track of whether we cleanly exited the except block. This
        # ensures we do proper cleanup in finally.
        clean_exit = False

        # Rewind body position, if needed. Record current position
        # for future rewinds in the event of a redirect/retry.
        body_pos = set_file_position(body, body_pos)

        try:
            # Request a connection from the queue.
            timeout_obj = self._get_timeout(timeout)
            conn = self._get_conn(timeout=pool_timeout)

            conn.timeout = timeout_obj.connect_timeout

            is_new_proxy_conn = self.proxy is not None and not getattr(
                conn, "sock", None
            )
            if is_new_proxy_conn and http_tunnel_required:
                self._prepare_proxy(conn)

            # Make the request on the httplib connection object.
            httplib_response = self._make_request(
                conn,
                method,
                url,
                timeout=timeout_obj,
                body=body,
                headers=headers,
                chunked=chunked,
            )

            # If we're going to release the connection in ``finally:``, then
            # the response doesn't need to know about the connection. Otherwise
            # it will also try to release it and we'll have a double-release
            # mess.
            response_conn = conn if not release_conn else None

            # Pass method to Response for length checking
            response_kw["request_method"] = method

            # Import httplib's response into our own wrapper object
            response = self.ResponseCls.from_httplib(
                httplib_response,
                pool=self,
                connection=response_conn,
                retries=retries,
                **response_kw
            )

            # Everything went great!
            clean_exit = True

        except EmptyPoolError:
            # Didn't get a connection from the pool, no need to clean up
            clean_exit = True
            release_this_conn = False
            raise

        except (
            TimeoutError,
            HTTPException,
            SocketError,
            ProtocolError,
            BaseSSLError,
            SSLError,
            CertificateError,
        ) as e:
            # Discard the connection for these exceptions. It will be
            # replaced during the next _get_conn() call.
            clean_exit = False

            def _is_ssl_error_message_from_http_proxy(ssl_error):
                # We're trying to detect the message 'WRONG_VERSION_NUMBER' but
                # SSLErrors are kinda all over the place when it comes to the message,
                # so we try to cover our bases here!
                message = " ".join(re.split("[^a-z]", str(ssl_error).lower()))
                return (
                    "wrong version number" in message or "unknown protocol" in message
                )

            # Try to detect a common user error with proxies which is to
            # set an HTTP proxy to be HTTPS when it should be 'http://'
            # (ie {'http': 'http://proxy', 'https': 'https://proxy'})
            # Instead we add a nice error message and point to a URL.
            if (
                isinstance(e, BaseSSLError)
                and self.proxy
                and _is_ssl_error_message_from_http_proxy(e)
                and conn.proxy
                and conn.proxy.scheme == "https"
            ):
                e = ProxyError(
                    "Your proxy appears to only use HTTP and not HTTPS, "
                    "try changing your proxy URL to be HTTP. See: "
                    "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
                    "#https-proxy-error-http-proxy",
                    SSLError(e),
                )
            elif isinstance(e, (BaseSSLError, CertificateError)):
                e = SSLError(e)
            elif isinstance(e, (SocketError, NewConnectionError)) and self.proxy:
                e = ProxyError("Cannot connect to proxy.", e)
            elif isinstance(e, (SocketError, HTTPException)):
                e = ProtocolError("Connection aborted.", e)

            retries = retries.increment(
                method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
            )
            retries.sleep()

            # Keep track of the error for the retry warning.
            err = e

        finally:
            if not clean_exit:
                # We hit some kind of exception, handled or otherwise. We need
                # to throw the connection away unless explicitly told not to.
                # Close the connection, set the variable to None, and make sure
                # we put the None back in the pool to avoid leaking it.
                conn = conn and conn.close()
                release_this_conn = True

            if release_this_conn:
                # Put the connection back to be reused. If the connection is
                # expired then it will be None, which will get replaced with a
                # fresh connection during _get_conn.
                self._put_conn(conn)

        if not conn:
            # Try again
            log.warning(
                "Retrying (%r) after connection broken by '%r': %s", retries, err, url
            )
            return self.urlopen(
                method,
                url,
                body,
                headers,
                retries,
                redirect,
                assert_same_host,
                timeout=timeout,
                pool_timeout=pool_timeout,
                release_conn=release_conn,
                chunked=chunked,
                body_pos=body_pos,
                **response_kw
            )

        # Handle redirect?
        redirect_location = redirect and response.get_redirect_location()
        if redirect_location:
            if response.status == 303:
                method = "GET"

            try:
                retries = retries.increment(method, url, response=response, _pool=self)
            except MaxRetryError:
                if retries.raise_on_redirect:
                    response.drain_conn()
                    raise
                return response

            response.drain_conn()
            retries.sleep_for_retry(response)
            log.debug("Redirecting %s -> %s", url, redirect_location)
            return self.urlopen(
                method,
                redirect_location,
                body,
                headers,
                retries=retries,
                redirect=redirect,
                assert_same_host=assert_same_host,
                timeout=timeout,
                pool_timeout=pool_timeout,
                release_conn=release_conn,
                chunked=chunked,
                body_pos=body_pos,
                **response_kw
            )

        # Check if we should retry the HTTP response.
        has_retry_after = bool(response.headers.get("Retry-After"))
        if retries.is_retry(method, response.status, has_retry_after):
            try:
                retries = retries.increment(method, url, response=response, _pool=self)
            except MaxRetryError:
                if retries.raise_on_status:
                    response.drain_conn()
                    raise
                return response

            response.drain_conn()
            retries.sleep(response)
            log.debug("Retry: %s", url)
            return self.urlopen(
                method,
                url,
                body,
                headers,
                retries=retries,
                redirect=redirect,
                assert_same_host=assert_same_host,
                timeout=timeout,
                pool_timeout=pool_timeout,
                release_conn=release_conn,
                chunked=chunked,
                body_pos=body_pos,
                **response_kw
            )

        return response


class HTTPSConnectionPool(HTTPConnectionPool):
    """
    Same as :class:`.HTTPConnectionPool`, but HTTPS.

    :class:`.HTTPSConnection` uses one of ``assert_fingerprint``,
    ``assert_hostname`` and ``host`` in this order to verify connections.
    If ``assert_hostname`` is False, no verification is done.

    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs``,
    ``ca_cert_dir``, ``ssl_version``, ``key_password`` are only used if :mod:`ssl`
    is available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade
    the connection socket into an SSL socket.
    """

    scheme = "https"
    ConnectionCls = HTTPSConnection

    def __init__(
        self,
        host,
        port=None,
        strict=False,
        timeout=Timeout.DEFAULT_TIMEOUT,
        maxsize=1,
        block=False,
        headers=None,
        retries=None,
        _proxy=None,
        _proxy_headers=None,
        key_file=None,
        cert_file=None,
        cert_reqs=None,
        key_password=None,
        ca_certs=None,
        ssl_version=None,
        assert_hostname=None,
        assert_fingerprint=None,
        ca_cert_dir=None,
        **conn_kw
    ):

        HTTPConnectionPool.__init__(
            self,
            host,
            port,
            strict,
            timeout,
            maxsize,
            block,
            headers,
            retries,
            _proxy,
            _proxy_headers,
            **conn_kw
        )

        self.key_file = key_file
        self.cert_file = cert_file
        self.cert_reqs = cert_reqs
        self.key_password = key_password
        self.ca_certs = ca_certs
        self.ca_cert_dir = ca_cert_dir
        self.ssl_version = ssl_version
        self.assert_hostname = assert_hostname
        self.assert_fingerprint = assert_fingerprint

    def _prepare_conn(self, conn):
        """
        Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
        and establish the tunnel if proxy is used.
        """

        if isinstance(conn, VerifiedHTTPSConnection):
            conn.set_cert(
                key_file=self.key_file,
                key_password=self.key_password,
                cert_file=self.cert_file,
                cert_reqs=self.cert_reqs,
                ca_certs=self.ca_certs,
                ca_cert_dir=self.ca_cert_dir,
                assert_hostname=self.assert_hostname,
                assert_fingerprint=self.assert_fingerprint,
            )
            conn.ssl_version = self.ssl_version
        return conn

    def _prepare_proxy(self, conn):
        """
        Establishes a tunnel connection through HTTP CONNECT.

        Tunnel connection is established early because otherwise httplib would
        improperly set Host: header to proxy's IP:port.
        """

        conn.set_tunnel(self._proxy_host, self.port, self.proxy_headers)

        if self.proxy.scheme == "https":
            conn.tls_in_tls_required = True

        conn.connect()

    def _new_conn(self):
        """
        Return a fresh :class:`http.client.HTTPSConnection`.
        """
        self.num_connections += 1
        log.debug(
            "Starting new HTTPS connection (%d): %s:%s",
            self.num_connections,
            self.host,
            self.port or "443",
        )

        if not self.ConnectionCls or self.ConnectionCls is DummyConnection:
            raise SSLError(
                "Can't connect to HTTPS URL because the SSL module is not available."
            )

        actual_host = self.host
        actual_port = self.port
        if self.proxy is not None:
            actual_host = self.proxy.host
            actual_port = self.proxy.port

        conn = self.ConnectionCls(
            host=actual_host,
            port=actual_port,
            timeout=self.timeout.connect_timeout,
            strict=self.strict,
            cert_file=self.cert_file,
            key_file=self.key_file,
            key_password=self.key_password,
            **self.conn_kw
        )

        return self._prepare_conn(conn)

    def _validate_conn(self, conn):
        """
        Called right before a request is made, after the socket is created.
        """
        super(HTTPSConnectionPool, self)._validate_conn(conn)

        # Force connect early to allow us to validate the connection.
        if not getattr(conn, "sock", None):  # AppEngine might not have  `.sock`
            conn.connect()

        if not conn.is_verified:
            warnings.warn(
                (
                    "Unverified HTTPS request is being made to host '%s'. "
                    "Adding certificate verification is strongly advised. See: "
                    "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
                    "#ssl-warnings" % conn.host
                ),
                InsecureRequestWarning,
            )

        if getattr(conn, "proxy_is_verified", None) is False:
            warnings.warn(
                (
                    "Unverified HTTPS connection done to an HTTPS proxy. "
                    "Adding certificate verification is strongly advised. See: "
                    "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
                    "#ssl-warnings"
                ),
                InsecureRequestWarning,
            )


def connection_from_url(url, **kw):
    """
    Given a url, return an :class:`.ConnectionPool` instance of its host.

    This is a shortcut for not having to parse out the scheme, host, and port
    of the url before creating an :class:`.ConnectionPool` instance.

    :param url:
        Absolute URL string that must include the scheme. Port is optional.

    :param \\**kw:
        Passes additional parameters to the constructor of the appropriate
        :class:`.ConnectionPool`. Useful for specifying things like
        timeout, maxsize, headers, etc.

    Example::

        >>> conn = connection_from_url('http://google.com/')
        >>> r = conn.request('GET', '/')
    """
    scheme, host, port = get_host(url)
    port = port or port_by_scheme.get(scheme, 80)
    if scheme == "https":
        return HTTPSConnectionPool(host, port=port, **kw)
    else:
        return HTTPConnectionPool(host, port=port, **kw)


def _normalize_host(host, scheme):
    """
    Normalize hosts for comparisons and use with sockets.
    """

    host = normalize_host(host, scheme)

    # httplib doesn't like it when we include brackets in IPv6 addresses
    # Specifically, if we include brackets but also pass the port then
    # httplib crazily doubles up the square brackets on the Host header.
    # Instead, we need to make sure we never pass ``None`` as the port.
    # However, for backward compatibility reasons we can't actually
    # *assert* that.  See http://bugs.python.org/issue28539
    if host.startswith("[") and host.endswith("]"):
        host = host[1:-1]
    return host


def _close_pool_connections(pool):
    """Drains a queue of connections and closes each one."""
    try:
        while True:
            conn = pool.get(block=False)
            if conn:
                conn.close()
    except queue.Empty:
        pass  # Done.
python3.12/site-packages/pip/_vendor/urllib3/request.py000064400000015043151732702450016764 0ustar00from __future__ import absolute_import

import sys

from .filepost import encode_multipart_formdata
from .packages import six
from .packages.six.moves.urllib.parse import urlencode

__all__ = ["RequestMethods"]


class RequestMethods(object):
    """
    Convenience mixin for classes who implement a :meth:`urlopen` method, such
    as :class:`urllib3.HTTPConnectionPool` and
    :class:`urllib3.PoolManager`.

    Provides behavior for making common types of HTTP request methods and
    decides which type of request field encoding to use.

    Specifically,

    :meth:`.request_encode_url` is for sending requests whose fields are
    encoded in the URL (such as GET, HEAD, DELETE).

    :meth:`.request_encode_body` is for sending requests whose fields are
    encoded in the *body* of the request using multipart or www-form-urlencoded
    (such as for POST, PUT, PATCH).

    :meth:`.request` is for making any kind of request, it will look up the
    appropriate encoding format and use one of the above two methods to make
    the request.

    Initializer parameters:

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
    """

    _encode_url_methods = {"DELETE", "GET", "HEAD", "OPTIONS"}

    def __init__(self, headers=None):
        self.headers = headers or {}

    def urlopen(
        self,
        method,
        url,
        body=None,
        headers=None,
        encode_multipart=True,
        multipart_boundary=None,
        **kw
    ):  # Abstract
        raise NotImplementedError(
            "Classes extending RequestMethods must implement "
            "their own ``urlopen`` method."
        )

    def request(self, method, url, fields=None, headers=None, **urlopen_kw):
        """
        Make a request using :meth:`urlopen` with the appropriate encoding of
        ``fields`` based on the ``method`` used.

        This is a convenience method that requires the least amount of manual
        effort. It can be used in most situations, while still having the
        option to drop down to more specific methods when necessary, such as
        :meth:`request_encode_url`, :meth:`request_encode_body`,
        or even the lowest level :meth:`urlopen`.
        """
        method = method.upper()

        urlopen_kw["request_url"] = url

        if method in self._encode_url_methods:
            return self.request_encode_url(
                method, url, fields=fields, headers=headers, **urlopen_kw
            )
        else:
            return self.request_encode_body(
                method, url, fields=fields, headers=headers, **urlopen_kw
            )

    def request_encode_url(self, method, url, fields=None, headers=None, **urlopen_kw):
        """
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
        """
        if headers is None:
            headers = self.headers

        extra_kw = {"headers": headers}
        extra_kw.update(urlopen_kw)

        if fields:
            url += "?" + urlencode(fields)

        return self.urlopen(method, url, **extra_kw)

    def request_encode_body(
        self,
        method,
        url,
        fields=None,
        headers=None,
        encode_multipart=True,
        multipart_boundary=None,
        **urlopen_kw
    ):
        """
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the body. This is useful for request methods like POST, PUT, PATCH, etc.

        When ``encode_multipart=True`` (default), then
        :func:`urllib3.encode_multipart_formdata` is used to encode
        the payload with the appropriate content type. Otherwise
        :func:`urllib.parse.urlencode` is used with the
        'application/x-www-form-urlencoded' content type.

        Multipart encoding must be used when posting files, and it's reasonably
        safe to use it in other times too. However, it may break request
        signing, such as with OAuth.

        Supports an optional ``fields`` parameter of key/value strings AND
        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
        the MIME type is optional. For example::

            fields = {
                'foo': 'bar',
                'fakefile': ('foofile.txt', 'contents of foofile'),
                'realfile': ('barfile.txt', open('realfile').read()),
                'typedfile': ('bazfile.bin', open('bazfile').read(),
                              'image/jpeg'),
                'nonamefile': 'contents of nonamefile field',
            }

        When uploading a file, providing a filename (the first parameter of the
        tuple) is optional but recommended to best mimic behavior of browsers.

        Note that if ``headers`` are supplied, the 'Content-Type' header will
        be overwritten because it depends on the dynamic random boundary string
        which is used to compose the body of the request. The random boundary
        string can be explicitly set with the ``multipart_boundary`` parameter.
        """
        if headers is None:
            headers = self.headers

        extra_kw = {"headers": {}}

        if fields:
            if "body" in urlopen_kw:
                raise TypeError(
                    "request got values for both 'fields' and 'body', can only specify one."
                )

            if encode_multipart:
                body, content_type = encode_multipart_formdata(
                    fields, boundary=multipart_boundary
                )
            else:
                body, content_type = (
                    urlencode(fields),
                    "application/x-www-form-urlencoded",
                )

            extra_kw["body"] = body
            extra_kw["headers"] = {"Content-Type": content_type}

        extra_kw["headers"].update(headers)
        extra_kw.update(urlopen_kw)

        return self.urlopen(method, url, **extra_kw)


if not six.PY2:

    class RequestModule(sys.modules[__name__].__class__):
        def __call__(self, *args, **kwargs):
            """
            If user tries to call this module directly urllib3 v2.x style raise an error to the user
            suggesting they may need urllib3 v2
            """
            raise TypeError(
                "'module' object is not callable\n"
                "urllib3.request() method is not supported in this release, "
                "upgrade to urllib3 v2 to use it\n"
                "see https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html"
            )

    sys.modules[__name__].__class__ = RequestModule
python3.12/site-packages/pip/_vendor/urllib3/util/ssl_.py000064400000041431151732702450017211 0ustar00from __future__ import absolute_import

import hmac
import os
import sys
import warnings
from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256

from ..exceptions import (
    InsecurePlatformWarning,
    ProxySchemeUnsupported,
    SNIMissingWarning,
    SSLError,
)
from ..packages import six
from .url import BRACELESS_IPV6_ADDRZ_RE, IPV4_RE

SSLContext = None
SSLTransport = None
HAS_SNI = False
IS_PYOPENSSL = False
IS_SECURETRANSPORT = False
ALPN_PROTOCOLS = ["http/1.1"]

# Maps the length of a digest to a possible hash function producing this digest
HASHFUNC_MAP = {32: md5, 40: sha1, 64: sha256}


def _const_compare_digest_backport(a, b):
    """
    Compare two digests of equal length in constant time.

    The digests must be of type str/bytes.
    Returns True if the digests match, and False otherwise.
    """
    result = abs(len(a) - len(b))
    for left, right in zip(bytearray(a), bytearray(b)):
        result |= left ^ right
    return result == 0


_const_compare_digest = getattr(hmac, "compare_digest", _const_compare_digest_backport)

try:  # Test for SSL features
    import ssl
    from ssl import CERT_REQUIRED, wrap_socket
except ImportError:
    pass

try:
    from ssl import HAS_SNI  # Has SNI?
except ImportError:
    pass

try:
    from .ssltransport import SSLTransport
except ImportError:
    pass


try:  # Platform-specific: Python 3.6
    from ssl import PROTOCOL_TLS

    PROTOCOL_SSLv23 = PROTOCOL_TLS
except ImportError:
    try:
        from ssl import PROTOCOL_SSLv23 as PROTOCOL_TLS

        PROTOCOL_SSLv23 = PROTOCOL_TLS
    except ImportError:
        PROTOCOL_SSLv23 = PROTOCOL_TLS = 2

try:
    from ssl import PROTOCOL_TLS_CLIENT
except ImportError:
    PROTOCOL_TLS_CLIENT = PROTOCOL_TLS


try:
    from ssl import OP_NO_COMPRESSION, OP_NO_SSLv2, OP_NO_SSLv3
except ImportError:
    OP_NO_SSLv2, OP_NO_SSLv3 = 0x1000000, 0x2000000
    OP_NO_COMPRESSION = 0x20000


try:  # OP_NO_TICKET was added in Python 3.6
    from ssl import OP_NO_TICKET
except ImportError:
    OP_NO_TICKET = 0x4000


# A secure default.
# Sources for more information on TLS ciphers:
#
# - https://wiki.mozilla.org/Security/Server_Side_TLS
# - https://www.ssllabs.com/projects/best-practices/index.html
# - https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
#
# The general intent is:
# - prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE),
# - prefer ECDHE over DHE for better performance,
# - prefer any AES-GCM and ChaCha20 over any AES-CBC for better performance and
#   security,
# - prefer AES-GCM over ChaCha20 because hardware-accelerated AES is common,
# - disable NULL authentication, MD5 MACs, DSS, and other
#   insecure ciphers for security reasons.
# - NOTE: TLS 1.3 cipher suites are managed through a different interface
#   not exposed by CPython (yet!) and are enabled by default if they're available.
DEFAULT_CIPHERS = ":".join(
    [
        "ECDHE+AESGCM",
        "ECDHE+CHACHA20",
        "DHE+AESGCM",
        "DHE+CHACHA20",
        "ECDH+AESGCM",
        "DH+AESGCM",
        "ECDH+AES",
        "DH+AES",
        "RSA+AESGCM",
        "RSA+AES",
        "!aNULL",
        "!eNULL",
        "!MD5",
        "!DSS",
    ]
)

try:
    from ssl import SSLContext  # Modern SSL?
except ImportError:

    class SSLContext(object):  # Platform-specific: Python 2
        def __init__(self, protocol_version):
            self.protocol = protocol_version
            # Use default values from a real SSLContext
            self.check_hostname = False
            self.verify_mode = ssl.CERT_NONE
            self.ca_certs = None
            self.options = 0
            self.certfile = None
            self.keyfile = None
            self.ciphers = None

        def load_cert_chain(self, certfile, keyfile):
            self.certfile = certfile
            self.keyfile = keyfile

        def load_verify_locations(self, cafile=None, capath=None, cadata=None):
            self.ca_certs = cafile

            if capath is not None:
                raise SSLError("CA directories not supported in older Pythons")

            if cadata is not None:
                raise SSLError("CA data not supported in older Pythons")

        def set_ciphers(self, cipher_suite):
            self.ciphers = cipher_suite

        def wrap_socket(self, socket, server_hostname=None, server_side=False):
            warnings.warn(
                "A true SSLContext object is not available. This prevents "
                "urllib3 from configuring SSL appropriately and may cause "
                "certain SSL connections to fail. You can upgrade to a newer "
                "version of Python to solve this. For more information, see "
                "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
                "#ssl-warnings",
                InsecurePlatformWarning,
            )
            kwargs = {
                "keyfile": self.keyfile,
                "certfile": self.certfile,
                "ca_certs": self.ca_certs,
                "cert_reqs": self.verify_mode,
                "ssl_version": self.protocol,
                "server_side": server_side,
            }
            return wrap_socket(socket, ciphers=self.ciphers, **kwargs)


def assert_fingerprint(cert, fingerprint):
    """
    Checks if given fingerprint matches the supplied certificate.

    :param cert:
        Certificate as bytes object.
    :param fingerprint:
        Fingerprint as string of hexdigits, can be interspersed by colons.
    """

    fingerprint = fingerprint.replace(":", "").lower()
    digest_length = len(fingerprint)
    hashfunc = HASHFUNC_MAP.get(digest_length)
    if not hashfunc:
        raise SSLError("Fingerprint of invalid length: {0}".format(fingerprint))

    # We need encode() here for py32; works on py2 and p33.
    fingerprint_bytes = unhexlify(fingerprint.encode())

    cert_digest = hashfunc(cert).digest()

    if not _const_compare_digest(cert_digest, fingerprint_bytes):
        raise SSLError(
            'Fingerprints did not match. Expected "{0}", got "{1}".'.format(
                fingerprint, hexlify(cert_digest)
            )
        )


def resolve_cert_reqs(candidate):
    """
    Resolves the argument to a numeric constant, which can be passed to
    the wrap_socket function/method from the ssl module.
    Defaults to :data:`ssl.CERT_REQUIRED`.
    If given a string it is assumed to be the name of the constant in the
    :mod:`ssl` module or its abbreviation.
    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
    If it's neither `None` nor a string we assume it is already the numeric
    constant which can directly be passed to wrap_socket.
    """
    if candidate is None:
        return CERT_REQUIRED

    if isinstance(candidate, str):
        res = getattr(ssl, candidate, None)
        if res is None:
            res = getattr(ssl, "CERT_" + candidate)
        return res

    return candidate


def resolve_ssl_version(candidate):
    """
    like resolve_cert_reqs
    """
    if candidate is None:
        return PROTOCOL_TLS

    if isinstance(candidate, str):
        res = getattr(ssl, candidate, None)
        if res is None:
            res = getattr(ssl, "PROTOCOL_" + candidate)
        return res

    return candidate


def create_urllib3_context(
    ssl_version=None, cert_reqs=None, options=None, ciphers=None
):
    """All arguments have the same meaning as ``ssl_wrap_socket``.

    By default, this function does a lot of the same work that
    ``ssl.create_default_context`` does on Python 3.4+. It:

    - Disables SSLv2, SSLv3, and compression
    - Sets a restricted set of server ciphers

    If you wish to enable SSLv3, you can do::

        from pip._vendor.urllib3.util import ssl_
        context = ssl_.create_urllib3_context()
        context.options &= ~ssl_.OP_NO_SSLv3

    You can do the same to enable compression (substituting ``COMPRESSION``
    for ``SSLv3`` in the last line above).

    :param ssl_version:
        The desired protocol version to use. This will default to
        PROTOCOL_SSLv23 which will negotiate the highest protocol that both
        the server and your installation of OpenSSL support.
    :param cert_reqs:
        Whether to require the certificate verification. This defaults to
        ``ssl.CERT_REQUIRED``.
    :param options:
        Specific OpenSSL options. These default to ``ssl.OP_NO_SSLv2``,
        ``ssl.OP_NO_SSLv3``, ``ssl.OP_NO_COMPRESSION``, and ``ssl.OP_NO_TICKET``.
    :param ciphers:
        Which cipher suites to allow the server to select.
    :returns:
        Constructed SSLContext object with specified options
    :rtype: SSLContext
    """
    # PROTOCOL_TLS is deprecated in Python 3.10
    if not ssl_version or ssl_version == PROTOCOL_TLS:
        ssl_version = PROTOCOL_TLS_CLIENT

    context = SSLContext(ssl_version)

    context.set_ciphers(ciphers or DEFAULT_CIPHERS)

    # Setting the default here, as we may have no ssl module on import
    cert_reqs = ssl.CERT_REQUIRED if cert_reqs is None else cert_reqs

    if options is None:
        options = 0
        # SSLv2 is easily broken and is considered harmful and dangerous
        options |= OP_NO_SSLv2
        # SSLv3 has several problems and is now dangerous
        options |= OP_NO_SSLv3
        # Disable compression to prevent CRIME attacks for OpenSSL 1.0+
        # (issue #309)
        options |= OP_NO_COMPRESSION
        # TLSv1.2 only. Unless set explicitly, do not request tickets.
        # This may save some bandwidth on wire, and although the ticket is encrypted,
        # there is a risk associated with it being on wire,
        # if the server is not rotating its ticketing keys properly.
        options |= OP_NO_TICKET

    context.options |= options

    # Enable post-handshake authentication for TLS 1.3, see GH #1634. PHA is
    # necessary for conditional client cert authentication with TLS 1.3.
    # The attribute is None for OpenSSL <= 1.1.0 or does not exist in older
    # versions of Python.  We only enable on Python 3.7.4+ or if certificate
    # verification is enabled to work around Python issue #37428
    # See: https://bugs.python.org/issue37428
    if (cert_reqs == ssl.CERT_REQUIRED or sys.version_info >= (3, 7, 4)) and getattr(
        context, "post_handshake_auth", None
    ) is not None:
        context.post_handshake_auth = True

    def disable_check_hostname():
        if (
            getattr(context, "check_hostname", None) is not None
        ):  # Platform-specific: Python 3.2
            # We do our own verification, including fingerprints and alternative
            # hostnames. So disable it here
            context.check_hostname = False

    # The order of the below lines setting verify_mode and check_hostname
    # matter due to safe-guards SSLContext has to prevent an SSLContext with
    # check_hostname=True, verify_mode=NONE/OPTIONAL. This is made even more
    # complex because we don't know whether PROTOCOL_TLS_CLIENT will be used
    # or not so we don't know the initial state of the freshly created SSLContext.
    if cert_reqs == ssl.CERT_REQUIRED:
        context.verify_mode = cert_reqs
        disable_check_hostname()
    else:
        disable_check_hostname()
        context.verify_mode = cert_reqs

    # Enable logging of TLS session keys via defacto standard environment variable
    # 'SSLKEYLOGFILE', if the feature is available (Python 3.8+). Skip empty values.
    if hasattr(context, "keylog_filename"):
        sslkeylogfile = os.environ.get("SSLKEYLOGFILE")
        if sslkeylogfile:
            context.keylog_filename = sslkeylogfile

    return context


def ssl_wrap_socket(
    sock,
    keyfile=None,
    certfile=None,
    cert_reqs=None,
    ca_certs=None,
    server_hostname=None,
    ssl_version=None,
    ciphers=None,
    ssl_context=None,
    ca_cert_dir=None,
    key_password=None,
    ca_cert_data=None,
    tls_in_tls=False,
):
    """
    All arguments except for server_hostname, ssl_context, and ca_cert_dir have
    the same meaning as they do when using :func:`ssl.wrap_socket`.

    :param server_hostname:
        When SNI is supported, the expected hostname of the certificate
    :param ssl_context:
        A pre-made :class:`SSLContext` object. If none is provided, one will
        be created using :func:`create_urllib3_context`.
    :param ciphers:
        A string of ciphers we wish the client to support.
    :param ca_cert_dir:
        A directory containing CA certificates in multiple separate files, as
        supported by OpenSSL's -CApath flag or the capath argument to
        SSLContext.load_verify_locations().
    :param key_password:
        Optional password if the keyfile is encrypted.
    :param ca_cert_data:
        Optional string containing CA certificates in PEM format suitable for
        passing as the cadata parameter to SSLContext.load_verify_locations()
    :param tls_in_tls:
        Use SSLTransport to wrap the existing socket.
    """
    context = ssl_context
    if context is None:
        # Note: This branch of code and all the variables in it are no longer
        # used by urllib3 itself. We should consider deprecating and removing
        # this code.
        context = create_urllib3_context(ssl_version, cert_reqs, ciphers=ciphers)

    if ca_certs or ca_cert_dir or ca_cert_data:
        try:
            context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
        except (IOError, OSError) as e:
            raise SSLError(e)

    elif ssl_context is None and hasattr(context, "load_default_certs"):
        # try to load OS default certs; works well on Windows (require Python3.4+)
        context.load_default_certs()

    # Attempt to detect if we get the goofy behavior of the
    # keyfile being encrypted and OpenSSL asking for the
    # passphrase via the terminal and instead error out.
    if keyfile and key_password is None and _is_key_file_encrypted(keyfile):
        raise SSLError("Client private key is encrypted, password is required")

    if certfile:
        if key_password is None:
            context.load_cert_chain(certfile, keyfile)
        else:
            context.load_cert_chain(certfile, keyfile, key_password)

    try:
        if hasattr(context, "set_alpn_protocols"):
            context.set_alpn_protocols(ALPN_PROTOCOLS)
    except NotImplementedError:  # Defensive: in CI, we always have set_alpn_protocols
        pass

    # If we detect server_hostname is an IP address then the SNI
    # extension should not be used according to RFC3546 Section 3.1
    use_sni_hostname = server_hostname and not is_ipaddress(server_hostname)
    # SecureTransport uses server_hostname in certificate verification.
    send_sni = (use_sni_hostname and HAS_SNI) or (
        IS_SECURETRANSPORT and server_hostname
    )
    # Do not warn the user if server_hostname is an invalid SNI hostname.
    if not HAS_SNI and use_sni_hostname:
        warnings.warn(
            "An HTTPS request has been made, but the SNI (Server Name "
            "Indication) extension to TLS is not available on this platform. "
            "This may cause the server to present an incorrect TLS "
            "certificate, which can cause validation failures. You can upgrade to "
            "a newer version of Python to solve this. For more information, see "
            "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
            "#ssl-warnings",
            SNIMissingWarning,
        )

    if send_sni:
        ssl_sock = _ssl_wrap_socket_impl(
            sock, context, tls_in_tls, server_hostname=server_hostname
        )
    else:
        ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
    return ssl_sock


def is_ipaddress(hostname):
    """Detects whether the hostname given is an IPv4 or IPv6 address.
    Also detects IPv6 addresses with Zone IDs.

    :param str hostname: Hostname to examine.
    :return: True if the hostname is an IP address, False otherwise.
    """
    if not six.PY2 and isinstance(hostname, bytes):
        # IDN A-label bytes are ASCII compatible.
        hostname = hostname.decode("ascii")
    return bool(IPV4_RE.match(hostname) or BRACELESS_IPV6_ADDRZ_RE.match(hostname))


def _is_key_file_encrypted(key_file):
    """Detects if a key file is encrypted or not."""
    with open(key_file, "r") as f:
        for line in f:
            # Look for Proc-Type: 4,ENCRYPTED
            if "ENCRYPTED" in line:
                return True

    return False


def _ssl_wrap_socket_impl(sock, ssl_context, tls_in_tls, server_hostname=None):
    if tls_in_tls:
        if not SSLTransport:
            # Import error, ssl is not available.
            raise ProxySchemeUnsupported(
                "TLS in TLS requires support for the 'ssl' module"
            )

        SSLTransport._validate_ssl_context_for_tls_in_tls(ssl_context)
        return SSLTransport(sock, ssl_context, server_hostname)

    if server_hostname:
        return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
    else:
        return ssl_context.wrap_socket(sock)
python3.12/site-packages/pip/_vendor/urllib3/util/connection.py000064400000011445151732702450020412 0ustar00from __future__ import absolute_import

import socket

from ..contrib import _appengine_environ
from ..exceptions import LocationParseError
from ..packages import six
from .wait import NoWayToWaitForSocketError, wait_for_read


def is_connection_dropped(conn):  # Platform-specific
    """
    Returns True if the connection is dropped and should be closed.

    :param conn:
        :class:`http.client.HTTPConnection` object.

    Note: For platforms like AppEngine, this will always return ``False`` to
    let the platform handle connection recycling transparently for us.
    """
    sock = getattr(conn, "sock", False)
    if sock is False:  # Platform-specific: AppEngine
        return False
    if sock is None:  # Connection already closed (such as by httplib).
        return True
    try:
        # Returns True if readable, which here means it's been dropped
        return wait_for_read(sock, timeout=0.0)
    except NoWayToWaitForSocketError:  # Platform-specific: AppEngine
        return False


# This function is copied from socket.py in the Python 2.7 standard
# library test suite. Added to its signature is only `socket_options`.
# One additional modification is that we avoid binding to IPv6 servers
# discovered in DNS if the system doesn't have IPv6 functionality.
def create_connection(
    address,
    timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
    source_address=None,
    socket_options=None,
):
    """Connect to *address* and return the socket object.

    Convenience function.  Connect to *address* (a 2-tuple ``(host,
    port)``) and return the socket object.  Passing the optional
    *timeout* parameter will set the timeout on the socket instance
    before attempting to connect.  If no *timeout* is supplied, the
    global default timeout setting returned by :func:`socket.getdefaulttimeout`
    is used.  If *source_address* is set it must be a tuple of (host, port)
    for the socket to bind as a source address before making the connection.
    An host of '' or port 0 tells the OS to use the default.
    """

    host, port = address
    if host.startswith("["):
        host = host.strip("[]")
    err = None

    # Using the value from allowed_gai_family() in the context of getaddrinfo lets
    # us select whether to work with IPv4 DNS records, IPv6 records, or both.
    # The original create_connection function always returns all records.
    family = allowed_gai_family()

    try:
        host.encode("idna")
    except UnicodeError:
        return six.raise_from(
            LocationParseError(u"'%s', label empty or too long" % host), None
        )

    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
        af, socktype, proto, canonname, sa = res
        sock = None
        try:
            sock = socket.socket(af, socktype, proto)

            # If provided, set socket level options before connecting.
            _set_socket_options(sock, socket_options)

            if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
                sock.settimeout(timeout)
            if source_address:
                sock.bind(source_address)
            sock.connect(sa)
            return sock

        except socket.error as e:
            err = e
            if sock is not None:
                sock.close()
                sock = None

    if err is not None:
        raise err

    raise socket.error("getaddrinfo returns an empty list")


def _set_socket_options(sock, options):
    if options is None:
        return

    for opt in options:
        sock.setsockopt(*opt)


def allowed_gai_family():
    """This function is designed to work in the context of
    getaddrinfo, where family=socket.AF_UNSPEC is the default and
    will perform a DNS search for both IPv6 and IPv4 records."""

    family = socket.AF_INET
    if HAS_IPV6:
        family = socket.AF_UNSPEC
    return family


def _has_ipv6(host):
    """Returns True if the system can bind an IPv6 address."""
    sock = None
    has_ipv6 = False

    # App Engine doesn't support IPV6 sockets and actually has a quota on the
    # number of sockets that can be used, so just early out here instead of
    # creating a socket needlessly.
    # See https://github.com/urllib3/urllib3/issues/1446
    if _appengine_environ.is_appengine_sandbox():
        return False

    if socket.has_ipv6:
        # has_ipv6 returns true if cPython was compiled with IPv6 support.
        # It does not tell us if the system has IPv6 support enabled. To
        # determine that we must bind to an IPv6 address.
        # https://github.com/urllib3/urllib3/pull/611
        # https://bugs.python.org/issue658327
        try:
            sock = socket.socket(socket.AF_INET6)
            sock.bind((host, 0))
            has_ipv6 = True
        except Exception:
            pass

    if sock:
        sock.close()
    return has_ipv6


HAS_IPV6 = _has_ipv6("::1")
python3.12/site-packages/pip/_vendor/urllib3/util/ssltransport.py000064400000015357151732702450021037 0ustar00import io
import socket
import ssl

from ..exceptions import ProxySchemeUnsupported
from ..packages import six

SSL_BLOCKSIZE = 16384


class SSLTransport:
    """
    The SSLTransport wraps an existing socket and establishes an SSL connection.

    Contrary to Python's implementation of SSLSocket, it allows you to chain
    multiple TLS connections together. It's particularly useful if you need to
    implement TLS within TLS.

    The class supports most of the socket API operations.
    """

    @staticmethod
    def _validate_ssl_context_for_tls_in_tls(ssl_context):
        """
        Raises a ProxySchemeUnsupported if the provided ssl_context can't be used
        for TLS in TLS.

        The only requirement is that the ssl_context provides the 'wrap_bio'
        methods.
        """

        if not hasattr(ssl_context, "wrap_bio"):
            if six.PY2:
                raise ProxySchemeUnsupported(
                    "TLS in TLS requires SSLContext.wrap_bio() which isn't "
                    "supported on Python 2"
                )
            else:
                raise ProxySchemeUnsupported(
                    "TLS in TLS requires SSLContext.wrap_bio() which isn't "
                    "available on non-native SSLContext"
                )

    def __init__(
        self, socket, ssl_context, server_hostname=None, suppress_ragged_eofs=True
    ):
        """
        Create an SSLTransport around socket using the provided ssl_context.
        """
        self.incoming = ssl.MemoryBIO()
        self.outgoing = ssl.MemoryBIO()

        self.suppress_ragged_eofs = suppress_ragged_eofs
        self.socket = socket

        self.sslobj = ssl_context.wrap_bio(
            self.incoming, self.outgoing, server_hostname=server_hostname
        )

        # Perform initial handshake.
        self._ssl_io_loop(self.sslobj.do_handshake)

    def __enter__(self):
        return self

    def __exit__(self, *_):
        self.close()

    def fileno(self):
        return self.socket.fileno()

    def read(self, len=1024, buffer=None):
        return self._wrap_ssl_read(len, buffer)

    def recv(self, len=1024, flags=0):
        if flags != 0:
            raise ValueError("non-zero flags not allowed in calls to recv")
        return self._wrap_ssl_read(len)

    def recv_into(self, buffer, nbytes=None, flags=0):
        if flags != 0:
            raise ValueError("non-zero flags not allowed in calls to recv_into")
        if buffer and (nbytes is None):
            nbytes = len(buffer)
        elif nbytes is None:
            nbytes = 1024
        return self.read(nbytes, buffer)

    def sendall(self, data, flags=0):
        if flags != 0:
            raise ValueError("non-zero flags not allowed in calls to sendall")
        count = 0
        with memoryview(data) as view, view.cast("B") as byte_view:
            amount = len(byte_view)
            while count < amount:
                v = self.send(byte_view[count:])
                count += v

    def send(self, data, flags=0):
        if flags != 0:
            raise ValueError("non-zero flags not allowed in calls to send")
        response = self._ssl_io_loop(self.sslobj.write, data)
        return response

    def makefile(
        self, mode="r", buffering=None, encoding=None, errors=None, newline=None
    ):
        """
        Python's httpclient uses makefile and buffered io when reading HTTP
        messages and we need to support it.

        This is unfortunately a copy and paste of socket.py makefile with small
        changes to point to the socket directly.
        """
        if not set(mode) <= {"r", "w", "b"}:
            raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,))

        writing = "w" in mode
        reading = "r" in mode or not writing
        assert reading or writing
        binary = "b" in mode
        rawmode = ""
        if reading:
            rawmode += "r"
        if writing:
            rawmode += "w"
        raw = socket.SocketIO(self, rawmode)
        self.socket._io_refs += 1
        if buffering is None:
            buffering = -1
        if buffering < 0:
            buffering = io.DEFAULT_BUFFER_SIZE
        if buffering == 0:
            if not binary:
                raise ValueError("unbuffered streams must be binary")
            return raw
        if reading and writing:
            buffer = io.BufferedRWPair(raw, raw, buffering)
        elif reading:
            buffer = io.BufferedReader(raw, buffering)
        else:
            assert writing
            buffer = io.BufferedWriter(raw, buffering)
        if binary:
            return buffer
        text = io.TextIOWrapper(buffer, encoding, errors, newline)
        text.mode = mode
        return text

    def unwrap(self):
        self._ssl_io_loop(self.sslobj.unwrap)

    def close(self):
        self.socket.close()

    def getpeercert(self, binary_form=False):
        return self.sslobj.getpeercert(binary_form)

    def version(self):
        return self.sslobj.version()

    def cipher(self):
        return self.sslobj.cipher()

    def selected_alpn_protocol(self):
        return self.sslobj.selected_alpn_protocol()

    def selected_npn_protocol(self):
        return self.sslobj.selected_npn_protocol()

    def shared_ciphers(self):
        return self.sslobj.shared_ciphers()

    def compression(self):
        return self.sslobj.compression()

    def settimeout(self, value):
        self.socket.settimeout(value)

    def gettimeout(self):
        return self.socket.gettimeout()

    def _decref_socketios(self):
        self.socket._decref_socketios()

    def _wrap_ssl_read(self, len, buffer=None):
        try:
            return self._ssl_io_loop(self.sslobj.read, len, buffer)
        except ssl.SSLError as e:
            if e.errno == ssl.SSL_ERROR_EOF and self.suppress_ragged_eofs:
                return 0  # eof, return 0.
            else:
                raise

    def _ssl_io_loop(self, func, *args):
        """Performs an I/O loop between incoming/outgoing and the socket."""
        should_loop = True
        ret = None

        while should_loop:
            errno = None
            try:
                ret = func(*args)
            except ssl.SSLError as e:
                if e.errno not in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE):
                    # WANT_READ, and WANT_WRITE are expected, others are not.
                    raise e
                errno = e.errno

            buf = self.outgoing.read()
            self.socket.sendall(buf)

            if errno is None:
                should_loop = False
            elif errno == ssl.SSL_ERROR_WANT_READ:
                buf = self.socket.recv(SSL_BLOCKSIZE)
                if buf:
                    self.incoming.write(buf)
                else:
                    self.incoming.write_eof()
        return ret
python3.12/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py000064400000013176151732702450022131 0ustar00"""The match_hostname() function from Python 3.3.3, essential when using SSL."""

# Note: This file is under the PSF license as the code comes from the python
# stdlib.   http://docs.python.org/3/license.html

import re
import sys

# ipaddress has been backported to 2.6+ in pypi.  If it is installed on the
# system, use it to handle IPAddress ServerAltnames (this was added in
# python-3.5) otherwise only do DNS matching.  This allows
# util.ssl_match_hostname to continue to be used in Python 2.7.
try:
    import ipaddress
except ImportError:
    ipaddress = None

__version__ = "3.5.0.1"


class CertificateError(ValueError):
    pass


def _dnsname_match(dn, hostname, max_wildcards=1):
    """Matching according to RFC 6125, section 6.4.3

    http://tools.ietf.org/html/rfc6125#section-6.4.3
    """
    pats = []
    if not dn:
        return False

    # Ported from python3-syntax:
    # leftmost, *remainder = dn.split(r'.')
    parts = dn.split(r".")
    leftmost = parts[0]
    remainder = parts[1:]

    wildcards = leftmost.count("*")
    if wildcards > max_wildcards:
        # Issue #17980: avoid denials of service by refusing more
        # than one wildcard per fragment.  A survey of established
        # policy among SSL implementations showed it to be a
        # reasonable choice.
        raise CertificateError(
            "too many wildcards in certificate DNS name: " + repr(dn)
        )

    # speed up common case w/o wildcards
    if not wildcards:
        return dn.lower() == hostname.lower()

    # RFC 6125, section 6.4.3, subitem 1.
    # The client SHOULD NOT attempt to match a presented identifier in which
    # the wildcard character comprises a label other than the left-most label.
    if leftmost == "*":
        # When '*' is a fragment by itself, it matches a non-empty dotless
        # fragment.
        pats.append("[^.]+")
    elif leftmost.startswith("xn--") or hostname.startswith("xn--"):
        # RFC 6125, section 6.4.3, subitem 3.
        # The client SHOULD NOT attempt to match a presented identifier
        # where the wildcard character is embedded within an A-label or
        # U-label of an internationalized domain name.
        pats.append(re.escape(leftmost))
    else:
        # Otherwise, '*' matches any dotless string, e.g. www*
        pats.append(re.escape(leftmost).replace(r"\*", "[^.]*"))

    # add the remaining fragments, ignore any wildcards
    for frag in remainder:
        pats.append(re.escape(frag))

    pat = re.compile(r"\A" + r"\.".join(pats) + r"\Z", re.IGNORECASE)
    return pat.match(hostname)


def _to_unicode(obj):
    if isinstance(obj, str) and sys.version_info < (3,):
        # ignored flake8 # F821 to support python 2.7 function
        obj = unicode(obj, encoding="ascii", errors="strict")  # noqa: F821
    return obj


def _ipaddress_match(ipname, host_ip):
    """Exact matching of IP addresses.

    RFC 6125 explicitly doesn't define an algorithm for this
    (section 1.7.2 - "Out of Scope").
    """
    # OpenSSL may add a trailing newline to a subjectAltName's IP address
    # Divergence from upstream: ipaddress can't handle byte str
    ip = ipaddress.ip_address(_to_unicode(ipname).rstrip())
    return ip == host_ip


def match_hostname(cert, hostname):
    """Verify that *cert* (in decoded format as returned by
    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
    rules are followed, but IP addresses are not accepted for *hostname*.

    CertificateError is raised on failure. On success, the function
    returns nothing.
    """
    if not cert:
        raise ValueError(
            "empty or no certificate, match_hostname needs a "
            "SSL socket or SSL context with either "
            "CERT_OPTIONAL or CERT_REQUIRED"
        )
    try:
        # Divergence from upstream: ipaddress can't handle byte str
        host_ip = ipaddress.ip_address(_to_unicode(hostname))
    except (UnicodeError, ValueError):
        # ValueError: Not an IP address (common case)
        # UnicodeError: Divergence from upstream: Have to deal with ipaddress not taking
        # byte strings.  addresses should be all ascii, so we consider it not
        # an ipaddress in this case
        host_ip = None
    except AttributeError:
        # Divergence from upstream: Make ipaddress library optional
        if ipaddress is None:
            host_ip = None
        else:  # Defensive
            raise
    dnsnames = []
    san = cert.get("subjectAltName", ())
    for key, value in san:
        if key == "DNS":
            if host_ip is None and _dnsname_match(value, hostname):
                return
            dnsnames.append(value)
        elif key == "IP Address":
            if host_ip is not None and _ipaddress_match(value, host_ip):
                return
            dnsnames.append(value)
    if not dnsnames:
        # The subject is only checked when there is no dNSName entry
        # in subjectAltName
        for sub in cert.get("subject", ()):
            for key, value in sub:
                # XXX according to RFC 2818, the most specific Common Name
                # must be used.
                if key == "commonName":
                    if _dnsname_match(value, hostname):
                        return
                    dnsnames.append(value)
    if len(dnsnames) > 1:
        raise CertificateError(
            "hostname %r "
            "doesn't match either of %s" % (hostname, ", ".join(map(repr, dnsnames)))
        )
    elif len(dnsnames) == 1:
        raise CertificateError("hostname %r doesn't match %r" % (hostname, dnsnames[0]))
    else:
        raise CertificateError(
            "no appropriate commonName or subjectAltName fields were found"
        )
python3.12/site-packages/pip/_vendor/urllib3/util/url.py000064400000033730151732702450017056 0ustar00from __future__ import absolute_import

import re
from collections import namedtuple

from ..exceptions import LocationParseError
from ..packages import six

url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"]

# We only want to normalize urls with an HTTP(S) scheme.
# urllib3 infers URLs without a scheme (None) to be http.
NORMALIZABLE_SCHEMES = ("http", "https", None)

# Almost all of these patterns were derived from the
# 'rfc3986' module: https://github.com/python-hyper/rfc3986
PERCENT_RE = re.compile(r"%[a-fA-F0-9]{2}")
SCHEME_RE = re.compile(r"^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)")
URI_RE = re.compile(
    r"^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?"
    r"(?://([^\\/?#]*))?"
    r"([^?#]*)"
    r"(?:\?([^#]*))?"
    r"(?:#(.*))?$",
    re.UNICODE | re.DOTALL,
)

IPV4_PAT = r"(?:[0-9]{1,3}\.){3}[0-9]{1,3}"
HEX_PAT = "[0-9A-Fa-f]{1,4}"
LS32_PAT = "(?:{hex}:{hex}|{ipv4})".format(hex=HEX_PAT, ipv4=IPV4_PAT)
_subs = {"hex": HEX_PAT, "ls32": LS32_PAT}
_variations = [
    #                            6( h16 ":" ) ls32
    "(?:%(hex)s:){6}%(ls32)s",
    #                       "::" 5( h16 ":" ) ls32
    "::(?:%(hex)s:){5}%(ls32)s",
    # [               h16 ] "::" 4( h16 ":" ) ls32
    "(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)s",
    # [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
    "(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)s",
    # [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
    "(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)s",
    # [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
    "(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)s",
    # [ *4( h16 ":" ) h16 ] "::"              ls32
    "(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)s",
    # [ *5( h16 ":" ) h16 ] "::"              h16
    "(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)s",
    # [ *6( h16 ":" ) h16 ] "::"
    "(?:(?:%(hex)s:){0,6}%(hex)s)?::",
]

UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~"
IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")"
ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+"
IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]"
REG_NAME_PAT = r"(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*"
TARGET_RE = re.compile(r"^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$")

IPV4_RE = re.compile("^" + IPV4_PAT + "$")
IPV6_RE = re.compile("^" + IPV6_PAT + "$")
IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$")
BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$")
ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$")

_HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*?(|0|[1-9][0-9]{0,4}))?$") % (
    REG_NAME_PAT,
    IPV4_PAT,
    IPV6_ADDRZ_PAT,
)
_HOST_PORT_RE = re.compile(_HOST_PORT_PAT, re.UNICODE | re.DOTALL)

UNRESERVED_CHARS = set(
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~"
)
SUB_DELIM_CHARS = set("!$&'()*+,;=")
USERINFO_CHARS = UNRESERVED_CHARS | SUB_DELIM_CHARS | {":"}
PATH_CHARS = USERINFO_CHARS | {"@", "/"}
QUERY_CHARS = FRAGMENT_CHARS = PATH_CHARS | {"?"}


class Url(namedtuple("Url", url_attrs)):
    """
    Data structure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`. Both the scheme and host are normalized as they are
    both case-insensitive according to RFC 3986.
    """

    __slots__ = ()

    def __new__(
        cls,
        scheme=None,
        auth=None,
        host=None,
        port=None,
        path=None,
        query=None,
        fragment=None,
    ):
        if path and not path.startswith("/"):
            path = "/" + path
        if scheme is not None:
            scheme = scheme.lower()
        return super(Url, cls).__new__(
            cls, scheme, auth, host, port, path, query, fragment
        )

    @property
    def hostname(self):
        """For backwards-compatibility with urlparse. We're nice like that."""
        return self.host

    @property
    def request_uri(self):
        """Absolute path including the query string."""
        uri = self.path or "/"

        if self.query is not None:
            uri += "?" + self.query

        return uri

    @property
    def netloc(self):
        """Network location including host and port"""
        if self.port:
            return "%s:%d" % (self.host, self.port)
        return self.host

    @property
    def url(self):
        """
        Convert self into a url

        This function should more or less round-trip with :func:`.parse_url`. The
        returned url may not be exactly the same as the url inputted to
        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
        with a blank port will have : removed).

        Example: ::

            >>> U = parse_url('http://google.com/mail/')
            >>> U.url
            'http://google.com/mail/'
            >>> Url('http', 'username:password', 'host.com', 80,
            ... '/path', 'query', 'fragment').url
            'http://username:password@host.com:80/path?query#fragment'
        """
        scheme, auth, host, port, path, query, fragment = self
        url = u""

        # We use "is not None" we want things to happen with empty strings (or 0 port)
        if scheme is not None:
            url += scheme + u"://"
        if auth is not None:
            url += auth + u"@"
        if host is not None:
            url += host
        if port is not None:
            url += u":" + str(port)
        if path is not None:
            url += path
        if query is not None:
            url += u"?" + query
        if fragment is not None:
            url += u"#" + fragment

        return url

    def __str__(self):
        return self.url


def split_first(s, delims):
    """
    .. deprecated:: 1.25

    Given a string and an iterable of delimiters, split on the first found
    delimiter. Return two split parts and the matched delimiter.

    If not found, then the first part is the full input string.

    Example::

        >>> split_first('foo/bar?baz', '?/=')
        ('foo', 'bar?baz', '/')
        >>> split_first('foo/bar?baz', '123')
        ('foo/bar?baz', '', None)

    Scales linearly with number of delims. Not ideal for large number of delims.
    """
    min_idx = None
    min_delim = None
    for d in delims:
        idx = s.find(d)
        if idx < 0:
            continue

        if min_idx is None or idx < min_idx:
            min_idx = idx
            min_delim = d

    if min_idx is None or min_idx < 0:
        return s, "", None

    return s[:min_idx], s[min_idx + 1 :], min_delim


def _encode_invalid_chars(component, allowed_chars, encoding="utf-8"):
    """Percent-encodes a URI component without reapplying
    onto an already percent-encoded component.
    """
    if component is None:
        return component

    component = six.ensure_text(component)

    # Normalize existing percent-encoded bytes.
    # Try to see if the component we're encoding is already percent-encoded
    # so we can skip all '%' characters but still encode all others.
    component, percent_encodings = PERCENT_RE.subn(
        lambda match: match.group(0).upper(), component
    )

    uri_bytes = component.encode("utf-8", "surrogatepass")
    is_percent_encoded = percent_encodings == uri_bytes.count(b"%")
    encoded_component = bytearray()

    for i in range(0, len(uri_bytes)):
        # Will return a single character bytestring on both Python 2 & 3
        byte = uri_bytes[i : i + 1]
        byte_ord = ord(byte)
        if (is_percent_encoded and byte == b"%") or (
            byte_ord < 128 and byte.decode() in allowed_chars
        ):
            encoded_component += byte
            continue
        encoded_component.extend(b"%" + (hex(byte_ord)[2:].encode().zfill(2).upper()))

    return encoded_component.decode(encoding)


def _remove_path_dot_segments(path):
    # See http://tools.ietf.org/html/rfc3986#section-5.2.4 for pseudo-code
    segments = path.split("/")  # Turn the path into a list of segments
    output = []  # Initialize the variable to use to store output

    for segment in segments:
        # '.' is the current directory, so ignore it, it is superfluous
        if segment == ".":
            continue
        # Anything other than '..', should be appended to the output
        elif segment != "..":
            output.append(segment)
        # In this case segment == '..', if we can, we should pop the last
        # element
        elif output:
            output.pop()

    # If the path starts with '/' and the output is empty or the first string
    # is non-empty
    if path.startswith("/") and (not output or output[0]):
        output.insert(0, "")

    # If the path starts with '/.' or '/..' ensure we add one more empty
    # string to add a trailing '/'
    if path.endswith(("/.", "/..")):
        output.append("")

    return "/".join(output)


def _normalize_host(host, scheme):
    if host:
        if isinstance(host, six.binary_type):
            host = six.ensure_str(host)

        if scheme in NORMALIZABLE_SCHEMES:
            is_ipv6 = IPV6_ADDRZ_RE.match(host)
            if is_ipv6:
                # IPv6 hosts of the form 'a::b%zone' are encoded in a URL as
                # such per RFC 6874: 'a::b%25zone'. Unquote the ZoneID
                # separator as necessary to return a valid RFC 4007 scoped IP.
                match = ZONE_ID_RE.search(host)
                if match:
                    start, end = match.span(1)
                    zone_id = host[start:end]

                    if zone_id.startswith("%25") and zone_id != "%25":
                        zone_id = zone_id[3:]
                    else:
                        zone_id = zone_id[1:]
                    zone_id = "%" + _encode_invalid_chars(zone_id, UNRESERVED_CHARS)
                    return host[:start].lower() + zone_id + host[end:]
                else:
                    return host.lower()
            elif not IPV4_RE.match(host):
                return six.ensure_str(
                    b".".join([_idna_encode(label) for label in host.split(".")])
                )
    return host


def _idna_encode(name):
    if name and any(ord(x) >= 128 for x in name):
        try:
            from pip._vendor import idna
        except ImportError:
            six.raise_from(
                LocationParseError("Unable to parse URL without the 'idna' module"),
                None,
            )
        try:
            return idna.encode(name.lower(), strict=True, std3_rules=True)
        except idna.IDNAError:
            six.raise_from(
                LocationParseError(u"Name '%s' is not a valid IDNA label" % name), None
            )
    return name.lower().encode("ascii")


def _encode_target(target):
    """Percent-encodes a request target so that there are no invalid characters"""
    path, query = TARGET_RE.match(target).groups()
    target = _encode_invalid_chars(path, PATH_CHARS)
    query = _encode_invalid_chars(query, QUERY_CHARS)
    if query is not None:
        target += "?" + query
    return target


def parse_url(url):
    """
    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.
    This parser is RFC 3986 and RFC 6874 compliant.

    The parser logic and helper functions are based heavily on
    work done in the ``rfc3986`` module.

    :param str url: URL to parse into a :class:`.Url` namedtuple.

    Partly backwards-compatible with :mod:`urlparse`.

    Example::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/mail/', ...)
        >>> parse_url('google.com:80')
        Url(scheme=None, host='google.com', port=80, path=None, ...)
        >>> parse_url('/foo?bar')
        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    """
    if not url:
        # Empty
        return Url()

    source_url = url
    if not SCHEME_RE.search(url):
        url = "//" + url

    try:
        scheme, authority, path, query, fragment = URI_RE.match(url).groups()
        normalize_uri = scheme is None or scheme.lower() in NORMALIZABLE_SCHEMES

        if scheme:
            scheme = scheme.lower()

        if authority:
            auth, _, host_port = authority.rpartition("@")
            auth = auth or None
            host, port = _HOST_PORT_RE.match(host_port).groups()
            if auth and normalize_uri:
                auth = _encode_invalid_chars(auth, USERINFO_CHARS)
            if port == "":
                port = None
        else:
            auth, host, port = None, None, None

        if port is not None:
            port = int(port)
            if not (0 <= port <= 65535):
                raise LocationParseError(url)

        host = _normalize_host(host, scheme)

        if normalize_uri and path:
            path = _remove_path_dot_segments(path)
            path = _encode_invalid_chars(path, PATH_CHARS)
        if normalize_uri and query:
            query = _encode_invalid_chars(query, QUERY_CHARS)
        if normalize_uri and fragment:
            fragment = _encode_invalid_chars(fragment, FRAGMENT_CHARS)

    except (ValueError, AttributeError):
        return six.raise_from(LocationParseError(source_url), None)

    # For the sake of backwards compatibility we put empty
    # string values for path if there are any defined values
    # beyond the path in the URL.
    # TODO: Remove this when we break backwards compatibility.
    if not path:
        if query is not None or fragment is not None:
            path = ""
        else:
            path = None

    # Ensure that each part of the URL is a `str` for
    # backwards compatibility.
    if isinstance(url, six.text_type):
        ensure_func = six.ensure_text
    else:
        ensure_func = six.ensure_str

    def ensure_type(x):
        return x if x is None else ensure_func(x)

    return Url(
        scheme=ensure_type(scheme),
        auth=ensure_type(auth),
        host=ensure_type(host),
        port=port,
        path=ensure_type(path),
        query=ensure_type(query),
        fragment=ensure_type(fragment),
    )


def get_host(url):
    """
    Deprecated. Use :func:`parse_url` instead.
    """
    p = parse_url(url)
    return p.scheme or "http", p.hostname, p.port
python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-312.pyc000064400000005741151732702450024454 0ustar00�

R`i�
��J�ddlmZddlmZmZddlmZddlmZ	d�Z
d�Zd�Zy	)
�)�absolute_import)�!MultipartInvariantViolationDefect�StartBoundaryNotFoundDefect�)�HeaderParsingError)�http_clientc���	|j�S#t$rYnwxYw	|jS#t$rYnwxYw	|jduS#t$r
Yt	d��wxYw)zt
    Checks whether a given file-like object is closed.

    :param obj:
        The file-like object to check.
    Nz)Unable to determine whether fp is closed.)�isclosed�AttributeError�closed�fp�
ValueError)�objs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/response.py�is_fp_closedr	s{��
��|�|�~����
��
��
��z�z����
��
��
��v�v��~����
��
�@�
A�A�
�s)��	��.�	:�:�
A�	A"�!A"c��t|tj�s#tdj	t|����t
|dd�}t
|dd�}d}|r/|j�s|�}t|ttf�r|}|r%|D�cgc]}t|ttf�s|��}}|s|r
t||���ycc}w)a>
    Asserts whether all headers have been successfully parsed.
    Extracts encountered errors from the result of parsing headers.

    Only works on Python 3.

    :param http.client.HTTPMessage headers: Headers to verify.

    :raises urllib3.exceptions.HeaderParsingError:
        If parsing errors are found.
    z"expected httplib.Message, got {0}.�defectsN�get_payload)r�
unparsed_data)
�
isinstance�httplib�HTTPMessage�	TypeError�format�type�getattr�is_multipart�bytes�strrrr)�headersrrr�payload�defects      r�assert_header_parsingr#(s����g�w�2�2�3��<�C�C�D��M�R�S�S��g�y�$�/�G��'�=�$�7�K��M���#�#�%�!�m�G��'�E�3�<�0� '�
��"�
�!����4�6W�X��
�!�	�
��-� ��
�N�N� ��
s�Cc�j�|j}t|t�r|dk(S|j�dk(S)z�
    Checks whether the request of a response has been a HEAD-request.
    Handles the quirks of AppEngine.

    :param http.client.HTTPResponse response:
        Response to check if the originating request
        used 'HEAD' as a method.
    ��HEAD)�_methodr�int�upper)�response�methods  r�is_response_to_headr,^s4���
�
�F��&�#����{���<�<�>�V�#�#�N)
�
__future__r�email.errorsrr�
exceptionsr�packages.six.movesrrrr#r,�r-r�<module>r3s#��&�W�+�7�B�>3O�l
$r-python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-312.pyc000064400000002253151732702450024350 0ustar00�

R`i����ddlmZddlmZddlmZmZmZddlm	Z	ddl
mZddlm
Z
mZmZmZmZmZmZmZmZmZddlmZmZdd	lmZmZmZmZdd
lm Z m!Z!dZ"y)
�)�absolute_import�)�is_connection_dropped)�SKIP_HEADER�SKIPPABLE_HEADERS�make_headers)�is_fp_closed)�Retry)
�ALPN_PROTOCOLS�HAS_SNI�IS_PYOPENSSL�IS_SECURETRANSPORT�PROTOCOL_TLS�
SSLContext�assert_fingerprint�resolve_cert_reqs�resolve_ssl_version�ssl_wrap_socket)�Timeout�current_time)�Url�get_host�	parse_url�split_first)�
wait_for_read�wait_for_write)rr
rrrrr
rrrrrr	rrrrrrrrrrrN)#�
__future__r�
connectionr�requestrrr�responser	�retryr
�ssl_rrr
rrrrrrr�timeoutrr�urlrrrr�waitrr�__all__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__init__.py�<module>r*s=��&�.�A�A�"�����+�6�6�/��r(python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-312.pyc000064400000011754151732702450026472 0ustar00�

R`i~��p�dZddlZddlZ	ddlZdZGd�de�Zd
d�Zd�Z	d�Z
d	�Zy#e$rdZY�$wxYw)zJThe match_hostname() function from Python 3.3.3, essential when using SSL.�Nz3.5.0.1c��eZdZy)�CertificateErrorN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.pyrrs��r	rc���g}|sy|jd�}|d}|dd}|jd�}||kDrtdt|�z��|s!|j	�|j	�k(S|dk(r|jd�n{|j
d	�s|j
d	�r%|jtj|��n4|jtj|�jd
d��|D]&}|jtj|���(tjdd
j|�zdztj�}	|	j|�S)zhMatching according to RFC 6125, section 6.4.3

    http://tools.ietf.org/html/rfc6125#section-6.4.3
    F�.r�N�*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)�split�countr�repr�lower�append�
startswith�re�escape�replace�compile�join�
IGNORECASE�match)
�dn�hostname�
max_wildcards�pats�parts�leftmost�	remainder�	wildcards�frag�pats
          r
�_dnsname_matchr&sE��
�D�
��
�H�H�T�N�E��Q�x�H��a�b�	�I����s�#�I��=� �
�:�T�"�X�E�
�	
�
��x�x�z�X�^�^�-�-�-�
�3��	
���G��	�	�	�V�	$��(;�(;�F�(C�
	
���B�I�I�h�'�(�	
���B�I�I�h�'�/�/��w�?�@������B�I�I�d�O�$��
�*�*�U�U�Z�Z��-�-��5�r�}�}�
E�C��9�9�X��r	c�h�t|t�r!tjdkrt	|dd��}|S)N)��ascii�strict)�encoding�errors)�
isinstance�str�sys�version_info�unicode)�objs r
�_to_unicoder3Os,���#�s��� 0� 0�4� 7��c�G�H�=���Jr	c�d�tjt|�j��}||k(S)z�Exact matching of IP addresses.

    RFC 6125 explicitly doesn't define an algorithm for this
    (section 1.7.2 - "Out of Scope").
    )�	ipaddress�
ip_addressr3�rstrip)�ipname�host_ip�ips   r
�_ipaddress_matchr;Vs,��
�	�	�k�&�1�8�8�:�	;�B�
��=�r	c���|std��	tjt|��}g}|j
dd�}|D]S\}}|dk(r"|�t||�ry|j|��-|dk(s�3|�t||�ry|j|��U|sG|j
dd�D]2}|D]+\}}|dk(s�t||�ry|j|��-�4t|�d	kDr.td
|�ddjtt|������t|�d	k(rtd
|�d
|d����td��#ttf$rd}Y��2t
$rt�d}n�Y��GwxYw)a)Verify that *cert* (in decoded format as returned by
    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
    rules are followed, but IP addresses are not accepted for *hostname*.

    CertificateError is raised on failure. On success, the function
    returns nothing.
    ztempty or no certificate, match_hostname needs a SSL socket or SSL context with either CERT_OPTIONAL or CERT_REQUIREDN�subjectAltNamer�DNSz
IP Address�subject�
commonNamer
z	hostname z doesn't match either of z, z doesn't match rz=no appropriate commonName or subjectAltName fields were found)�
ValueErrorr5r6r3�UnicodeError�AttributeError�getr&rr;�lenrr�mapr)�certrr9�dnsnames�san�key�value�subs        r
�match_hostnamerMbs�����
-�
�	
�
��&�&�{�8�'<�=���H�
�(�(�#�R�
(�C��
��U��%�<���>�%��#B���O�O�E�"�
�L�
 ��"�'7��w�'G���O�O�E�"����8�8�I�r�*�C�!�
��U��,�&�%�e�X�6���O�O�E�*�
"�+��8�}�q���,4�d�i�i��D�(�@S�6T�
V�
�	
�

�X��!�	���8�TU�;�W�X�X��K�
�	
��U
�*�%��
�������G��
��s�E�E5�E5�4E5)r
)�__doc__rr/r5�ImportError�__version__rArr&r3r;rMrr	r
�<module>rQsW��P�

�
�����	�z�	�3�l�	�=
��g���I��s�+�5�5python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-312.pyc000064400000052366151732702450023770 0ustar00�

R`i�U��8�ddlmZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZddlmZej*e�Zedgd	��Ze�ZGd
�de�Zej:e�Gd�d
e��Zed�e_y)�)�absolute_importN)�
namedtuple)�	takewhile�)�ConnectTimeoutError�
InvalidHeader�
MaxRetryError�
ProtocolError�
ProxyError�ReadTimeoutError�
ResponseError)�six�RequestHistory)�method�url�error�status�redirect_locationc��eZdZed��Zej
d��Zed��Zej
d��Zed��Zej
d��Zy)�
_RetryMetac�N�tjdt�|jS�Nz}Using 'Retry.DEFAULT_METHOD_WHITELIST' is deprecated and will be removed in v2.0. Use 'Retry.DEFAULT_ALLOWED_METHODS' instead��warnings�warn�DeprecationWarning�DEFAULT_ALLOWED_METHODS��clss ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/retry.py�DEFAULT_METHOD_WHITELISTz#_RetryMeta.DEFAULT_METHOD_WHITELIST$s%���
�
�
S��	
�
�*�*�*�c�F�tjdt�||_yrr�r�values  r r!z#_RetryMeta.DEFAULT_METHOD_WHITELIST-s!���
�
�
S��	
�
',��#r"c�N�tjdt�|jS�Nz�Using 'Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST' is deprecated and will be removed in v2.0. Use 'Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT' instead�rrr�"DEFAULT_REMOVE_HEADERS_ON_REDIRECTrs r �"DEFAULT_REDIRECT_HEADERS_BLACKLISTz-_RetryMeta.DEFAULT_REDIRECT_HEADERS_BLACKLIST6s%���
�
�
^��	
�
�5�5�5r"c�F�tjdt�||_yr'r(r$s  r r*z-_RetryMeta.DEFAULT_REDIRECT_HEADERS_BLACKLIST?s!���
�
�
^��	
�
27��.r"c�N�tjdt�|jS�NzlUsing 'Retry.BACKOFF_MAX' is deprecated and will be removed in v2.0. Use 'Retry.DEFAULT_BACKOFF_MAX' instead�rrr�DEFAULT_BACKOFF_MAXrs r �BACKOFF_MAXz_RetryMeta.BACKOFF_MAXHs%���
�
�
O��	
�
�&�&�&r"c�F�tjdt�||_yr-r.r$s  r r0z_RetryMeta.BACKOFF_MAXQs!���
�
�
O��	
�
#(��r"N)�__name__�
__module__�__qualname__�propertyr!�setterr*r0�r"r rr#s���
�+��+��$�$�,�%�,��6��6�(�.�.�7�/�7��'��'����(��(r"rc���eZdZdZegd��Zegd��Zeddg�ZdZdddddde	dd	d
d
dd
e	e	fd�Z
d�Zedd
��Z
d�Zd�Zd�Zdd�Zd�Zdd�Zd�Zd�Zd�Zdd�Zd�Z						dd�Zd�Z�fd�Z�xZS) �RetryaJRetry configuration.

    Each retry attempt will create a new Retry object with updated values, so
    they can be safely reused.

    Retries can be defined as a default for a pool::

        retries = Retry(connect=5, read=2, redirect=5)
        http = PoolManager(retries=retries)
        response = http.request('GET', 'http://example.com/')

    Or per-request (which overrides the default for the pool)::

        response = http.request('GET', 'http://example.com/', retries=Retry(10))

    Retries can be disabled by passing ``False``::

        response = http.request('GET', 'http://example.com/', retries=False)

    Errors will be wrapped in :class:`~urllib3.exceptions.MaxRetryError` unless
    retries are disabled, in which case the causing exception will be raised.

    :param int total:
        Total number of retries to allow. Takes precedence over other counts.

        Set to ``None`` to remove this constraint and fall back on other
        counts.

        Set to ``0`` to fail on the first retry.

        Set to ``False`` to disable and imply ``raise_on_redirect=False``.

    :param int connect:
        How many connection-related errors to retry on.

        These are errors raised before the request is sent to the remote server,
        which we assume has not triggered the server to process the request.

        Set to ``0`` to fail on the first retry of this type.

    :param int read:
        How many times to retry on read errors.

        These errors are raised after the request was sent to the server, so the
        request may have side-effects.

        Set to ``0`` to fail on the first retry of this type.

    :param int redirect:
        How many redirects to perform. Limit this to avoid infinite redirect
        loops.

        A redirect is a HTTP response with a status code 301, 302, 303, 307 or
        308.

        Set to ``0`` to fail on the first retry of this type.

        Set to ``False`` to disable and imply ``raise_on_redirect=False``.

    :param int status:
        How many times to retry on bad status codes.

        These are retries made on responses, where status code matches
        ``status_forcelist``.

        Set to ``0`` to fail on the first retry of this type.

    :param int other:
        How many times to retry on other errors.

        Other errors are errors that are not connect, read, redirect or status errors.
        These errors might be raised after the request was sent to the server, so the
        request might have side-effects.

        Set to ``0`` to fail on the first retry of this type.

        If ``total`` is not set, it's a good idea to set this to 0 to account
        for unexpected edge cases and avoid infinite retry loops.

    :param iterable allowed_methods:
        Set of uppercased HTTP method verbs that we should retry on.

        By default, we only retry on methods which are considered to be
        idempotent (multiple requests with the same parameters end with the
        same state). See :attr:`Retry.DEFAULT_ALLOWED_METHODS`.

        Set to a ``False`` value to retry on any verb.

        .. warning::

            Previously this parameter was named ``method_whitelist``, that
            usage is deprecated in v1.26.0 and will be removed in v2.0.

    :param iterable status_forcelist:
        A set of integer HTTP status codes that we should force a retry on.
        A retry is initiated if the request method is in ``allowed_methods``
        and the response status code is in ``status_forcelist``.

        By default, this is disabled with ``None``.

    :param float backoff_factor:
        A backoff factor to apply between attempts after the second try
        (most errors are resolved immediately by a second try without a
        delay). urllib3 will sleep for::

            {backoff factor} * (2 ** ({number of total retries} - 1))

        seconds. If the backoff_factor is 0.1, then :func:`.sleep` will sleep
        for [0.0s, 0.2s, 0.4s, ...] between retries. It will never be longer
        than :attr:`Retry.DEFAULT_BACKOFF_MAX`.

        By default, backoff is disabled (set to 0).

    :param bool raise_on_redirect: Whether, if the number of redirects is
        exhausted, to raise a MaxRetryError, or to return a response with a
        response code in the 3xx range.

    :param bool raise_on_status: Similar meaning to ``raise_on_redirect``:
        whether we should raise an exception, or return a response,
        if status falls in ``status_forcelist`` range and retries have
        been exhausted.

    :param tuple history: The history of the request encountered during
        each call to :meth:`~Retry.increment`. The list is in the order
        the requests occurred. Each list item is of class :class:`RequestHistory`.

    :param bool respect_retry_after_header:
        Whether to respect Retry-After header on status codes defined as
        :attr:`Retry.RETRY_AFTER_STATUS_CODES` or not.

    :param iterable remove_headers_on_redirect:
        Sequence of headers to remove from the request when a response
        indicating a redirect is returned before firing off the redirected
        request.
    )�HEAD�GET�PUT�DELETE�OPTIONS�TRACE)i�i�i��Cookie�
Authorization�x�
NrTc�&�|tur1|turtd��tjdtd��|}|tur|j
}|tur|j}||_||_||_	||_
||_|dus|durd}d}
||_|xs
t�|_||_|	|_|
|_||_|xs
t'�|_|
|_t-|D�cgc]}|j/���c}�|_ycc}w)NzoUsing both 'allowed_methods' and 'method_whitelist' together is not allowed. Instead only use 'allowed_methods'�lUsing 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' insteadr)�
stacklevelFr)�_Default�
ValueErrorrrrrr)�total�connect�readr�other�redirect�set�status_forcelist�allowed_methods�backoff_factor�raise_on_redirect�raise_on_status�tuple�history�respect_retry_after_header�	frozenset�lower�remove_headers_on_redirect)�selfrIrJrKrMrrLrPrOrQrRrSrUrVrY�method_whitelist�hs                 r �__init__zRetry.__init__�s ��(�8�+��h�.� �9���

�M�M�I�"��	
�/�O��h�&�"�:�:�O�%��1�)-�)P�)P�&���
������	������
��u������H� %�� ��
� 0� 9�C�E���.���,���!2���.����)�%�'���*D��'�*3� :�;� :�1�Q�W�W�Y� :�;�+
��'��;s�*Dc��t|j|j|j|j|j
|j|j|j|j|j|j|j|j��
}d|vrKd|vrGd|jvr*tj dt"�|j$|d<n|j$|d<|j'|�t)|�di|��S)N)
rIrJrKrMrrLrOrQrRrSrUrYrVr[rPrEr7)�dictrIrJrKrMrrLrOrQrRrSrUrYrV�__dict__rrrrP�update�type)rZ�kw�paramss   r �newz	Retry.new0s�����*�*��L�L�����]�]��;�;��*�*�!�2�2��.�.�"�4�4� �0�0��L�L�'+�'F�'F�'+�'F�'F�
��*�R�'�,=�R�,G�!�T�]�]�2��
�
�M�&��
.2�-A�-A��)�*�,0�,@�,@��(�)��
�
�b���t�D�z�#�F�#�#r"c��|�|�|n|j}t|t�r|St|�xrd}|||��}tjd||�|S)z3Backwards-compatibility for the old retries format.N)rMz!Converted retries value: %r -> %r)�DEFAULT�
isinstancer9�bool�log�debug)r�retriesrM�default�new_retriess     r �from_intzRetry.from_intTsY���?�!(�!4�g�#�+�+�G��g�u�%��N���>�*�d���'�H�5���	�	�5�w��L��r"c
���tttd�t|j����}|dkry|j
d|dz
zz}t
|j|�S)zIFormula for computing the current backoff

        :rtype: float
        c��|jduS�N)r)�xs r �<lambda>z(Retry.get_backoff_time.<locals>.<lambda>js��A�$7�$7�4�$?r"�rr)�len�listr�reversedrUrQ�minr/)rZ�consecutive_errors_len�
backoff_values   r �get_backoff_timezRetry.get_backoff_timebsf��"%���?��$�,�,�AW�X�
�"
��
"�Q�&���+�+�q�5K�a�5O�/P�Q�
��4�+�+�]�;�;r"c�H�tjd|�rt|�}nxtjj|�}|�t
d|z��|d�|dddz|ddz}tjj|�}|tj�z
}|dkrd}|S)Nz^\s*[0-9]+\s*$zInvalid Retry-After header: %s�	)rrCr)	�re�match�int�email�utils�parsedate_tzr�	mktime_tz�time)rZ�retry_after�seconds�retry_date_tuple�
retry_dates     r �parse_retry_afterzRetry.parse_retry_afterss���
�8�8�%�{�3��+�&�G�$�{�{�7�7��D���'�#�$D�{�$R�S�S���"�*�
$4�B�Q�#7�$�#>�AQ�RT�RU�AV�#V� ����.�.�/?�@�J� �4�9�9�;�.�G��Q�;��G��r"c�`�|jjd�}|�y|j|�S)z(Get the value of Retry-After in seconds.zRetry-AfterN)�headers�getr��rZ�responser�s   r �get_retry_afterzRetry.get_retry_after�s4���&�&�*�*�=�9������%�%�k�2�2r"c�V�|j|�}|rtj|�yy)NTF)r�r��sleepr�s   r �sleep_for_retryzRetry.sleep_for_retry�s'���*�*�8�4����J�J�{�#��r"c�Z�|j�}|dkrytj|�y)Nr)r|r�r�)rZ�backoffs  r �_sleep_backoffzRetry._sleep_backoff�s&���'�'�)���a�<���
�
�7�r"c�h�|jr|r|j|�}|ry|j�y)aBSleep between retry attempts.

        This method will respect a server's ``Retry-After`` response header
        and sleep the duration of the time requested. If that is not present, it
        will use an exponential backoff. By default, the backoff factor is 0 and
        this method will return immediately.
        N)rVr�r�)rZr��slepts   r r�zRetry.sleep�s1���*�*�x��(�(��2�E������r"c�Z�t|t�r|j}t|t�S)zzErrors when we're fairly sure that the server did not receive the
        request, so it should be safe to retry.
        )rhr�original_errorr�rZ�errs  r �_is_connection_errorzRetry._is_connection_error�s'���c�:�&��$�$�C��#�2�3�3r"c�.�t|ttf�S)zErrors that occur after the request has been started, so we should
        assume that the server began processing it.
        )rhrr
r�s  r �_is_read_errorzRetry._is_read_error�s���#� 0�-�@�A�Ar"c��d|jvr'tjdt�|j}n|j
}|r|j
�|vryy)zyChecks if a given HTTP method should be retried upon, depending if
        it is included in the allowed_methods
        r[rEFT)r`rrrr[rP�upper)rZrrPs   r �_is_method_retryablezRetry._is_method_retryable�sS������.��M�M�I�"�
�
#�3�3�O�"�2�2�O��v�|�|�~�_�D��r"c��|j|�sy|jr||jvry|jxr |jxr|xr||jvS)awIs this method/status code retryable? (Based on allowlists and control
        variables such as the number of total retries to allow, whether to
        respect the Retry-After header, whether this header is present, and
        whether the returned status code is on the list of status codes to
        be retried upon on the presence of the aforementioned header)
        FT)r�rOrIrV�RETRY_AFTER_STATUS_CODES)rZr�status_code�has_retry_afters    r �is_retryzRetry.is_retry�sg���(�(��0��� � �[�D�4I�4I�%I��
�J�J�
?��/�/�
?��
?��� =� =�=�		
r"c���|j|j|j|j|j|j
f}t
td|��}|syt|�dkS)zAre we out of retries?NFr)	rIrJrKrMrrLrw�filterry)rZ�retry_countss  r �is_exhaustedzRetry.is_exhausted�s^��
�J�J��L�L��I�I��M�M��K�K��J�J�

���F�4��6�7�����<� �1�$�$r"c	�T�|jdur"|r tjt|�||��|j}|�|dz}|j}|j
}	|j}
|j}|j}d}
d}d}|r=|j|�r,|dur tjt|�||��|��|dz}n�|rN|j|�r=|	dus|j|�s tjt|�||��|	��|	dz}	n�|r|��|dz}n�|r6|j�r&|
�|
dz}
d}
|j�}|j}n[tj}
|rI|jr=|�|dz}tjj!|j��}
|j}|j"t%|||||�fz}|j'|||	|
|||��}|j)�rt+|||xst|
���t,j/d||�|S)	a�Return a new Retry object with incremented retry counters.

        :param response: A response object, or None, if the server did not
            return a response.
        :type response: :class:`~urllib3.response.HTTPResponse`
        :param Exception error: An error encountered during the request, or
            None if the response was received successfully.

        :return: A new ``Retry`` object.
        FNru�unknownztoo many redirects)r�)rIrJrKrMrrLrUz$Incremented Retry for (url='%s'): %r)rIr�reraiserbrJrKrMrrLr�r�r��get_redirect_locationr
�
GENERIC_ERROR�SPECIFIC_ERROR�formatrUrrer�r	rjrk)rZrrr�r�_pool�_stacktracerIrJrKrM�status_countrL�causerrrU�	new_retrys                  r �	incrementzRetry.increment�s*��&�:�:���5��+�+�d�5�k�5�+�>�>��
�
�����Q�J�E��,�,���y�y���=�=���{�{���
�
������ ���T�.�.�u�5��%���k�k�$�u�+�u�k�B�B��$��1���
�t�*�*�5�1��u�}�D�$=�$=�f�$E��k�k�$�u�+�u�k�B�B��!���	��
�� ���
��
�(�8�8�:��#��A�
��(�E� (� >� >� @���_�_�F�
"�/�/�E��H�O�O��+� �A�%�L�%�4�4�;�;����;�X��!�����,�,��6�3��v�7H�I�"
�
���H�H���������
�	��!�!�#���s�E�,I�]�5�5I�J�J��	�	�8�#�y�I��r"c�:�djt|�|��S)Nz|{cls.__name__}(total={self.total}, connect={self.connect}, read={self.read}, redirect={self.redirect}, status={self.status}))rrZ)r�rb)rZs r �__repr__zRetry.__repr__Vs��
P�
�&�T�$�Z�d�&�
+�	,r"c����|dk(r&tjdt�|jS	t	tt|�|�S#t$rt	t|�cYSwxYw)Nr[rE)rrrrP�getattr�superr9�AttributeError)rZ�item�	__class__s  �r �__getattr__zRetry.__getattr__\sd����%�%��M�M�I�"�
�
�'�'�'�	(��5���-�t�4�4���	(��5�$�'�'�	(�s�A�A$�#A$)TNrr)F)NNNNNN)r2r3r4�__doc__rWrr�r)r/rGr]re�classmethodror|r�r�r�r�r�r�r�r�r�r�r�r�r��
__classcell__)r�s@r r9r9[s����F�R(�<���
 )��9��*3�H�o�3N�)O�&�����
���� ������#'�#+�!�#;
�z"$�H����<�"�.3���� 4�B��(
�(%�$������\�|,�(�(r"r9�) �
__future__rr��loggingrr�r�collectionsr�	itertoolsr�
exceptionsrrr	r
rrr
�packagesr�	getLoggerr2rjr�objectrGrbr�
add_metaclassr9rgr7r"r �<module>r�s���&���	���"�������g����!����O����8��5(��5(�p����:��L(�F�L(��L(�`�a���
r"python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-312.pyc000064400000010544151732702460023560 0ustar00�

R`i����ddlZddlZddlZddlmZ	ddlmZgd�ZGd�de	�Z
ejdk\rd	�Znd
�Zdd�Z
dd�Zd
�Zd�Zd�add�Zdd�Zy#e$r	ddlmZY�LwxYw)�N)�partial)�	monotonic)�time)�NoWayToWaitForSocketError�
wait_for_read�wait_for_writec��eZdZy)rN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/wait.pyrrs��rr)��c��||�S�Nr
)�fn�timeouts  r�_retry_on_intrr*s���'�{�rc�"�|�td�}n
t�|z}		||�S#ttjf$rO}|j
dtjk7r�|t�z
}|dkrd}|td�k(rd}Yd}~�md}~wwxYw)N�infr)�floatr�OSError�select�error�args�errno�EINTR)rr�deadline�es    rrr/s����?��U�|�H� �{�W�,�H��

��'�{�"���V�\�\�*�

��6�6�!�9����+��&���4�G���{�"#���%��,�.�"&����

�s�&�B�AB	�	Bc���|s
|std��g}g}|r|j|�|r|j|�ttj|||�}t	||�\}}}	t|xs|xs|	�S)N�2must specify at least one of read=True, write=True)�RuntimeError�appendrrr�bool)
�sock�read�writer�rcheck�wcheckr�rready�wready�xreadys
          r�select_wait_for_socketr/Fsy�����O�P�P�
�F�
�F���
�
�d����
�
�d��
�������	7�B�+�B��8��F�F�F���*�&�*�F�+�+rc���|s
|std��d}|r|tjz}|r|tjz}tj���j||��fd�}t
t||��S)Nr#rc�4��|�|dz}�j|�S)Ni�)�poll)�t�poll_objs �r�do_pollz%poll_wait_for_socket.<locals>.do_polles ����=�
��I�A��}�}�Q��r)r$r�POLLIN�POLLOUTr2�registerr&r)r'r(r)r�maskr5r4s      @r�poll_wait_for_socketr:Yso������O�P�P��D����
�
�����������{�{�}�H����d�D�!� �
��w��0�1�1rc��td��)Nzno select-equivalent available)r�r�kwargss  r�null_wait_for_socketr>ms��
#�$D�
E�Erc��	tj�}t|jd�y#ttf$rYywxYw)NrTF)rr2r�AttributeErrorr)r4s r�_have_working_pollrAqs>����;�;�=���x�}�}�a�(���
�G�$����s�*-�?�?c�t�t�rtanttd�rt
antat|i|��S)Nr)rAr:�wait_for_socket�hasattrrr/r>r<s  rrCrC~s3����.��	���	"�0��.���D�+�F�+�+rc��t|d|��S)z�Waits for reading to be available on a given socket.
    Returns True if the socket is readable, or False if the timeout expired.
    T)r(r�rC�r'rs  rrr�s���4�d�G�<�<rc��t|d|��S)z�Waits for writing to be available on a given socket.
    Returns True if the socket is readable, or False if the timeout expired.
    T)r)rrFrGs  rrr�s���4�t�W�=�=r)FFNr)rr�sys�	functoolsrrr�ImportError�__all__�	Exceptionr�version_inforr/r:r>rArCrrr
rr�<module>rOs����
�
��'��K��	�	�	�4���v���
�.,�&2�(F�
�,�=�>��Y�'�&�'�s�A�A'�&A'python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-312.pyc000064400000010210151732702460024272 0ustar00�

R`i����ddlmZddlmZddlmZddlmZmZdZ	e
gd��ZdZe
�Z						d
d
�Zd�Zd�Zy	)�)�absolute_import)�	b64encode�)�UnrewindableBodyError)�b�
integer_typesz@@@SKIP_HEADER@@@)�accept-encoding�host�
user-agentzgzip,deflateNc�`�i}|r>t|t�rn(t|t�rdj|�}nt}||d<|r||d<|rd|d<|r)dtt
|��jd�z|d<|r)dtt
|��jd�z|d	<|rd
|d<|S)a
    Shortcuts for generating request headers.

    :param keep_alive:
        If ``True``, adds 'connection: keep-alive' header.

    :param accept_encoding:
        Can be a boolean, list, or string.
        ``True`` translates to 'gzip,deflate'.
        List will get joined by comma.
        String will be used as provided.

    :param user_agent:
        String representing the user-agent you want, such as
        "python-urllib3/0.6"

    :param basic_auth:
        Colon-separated username:password string for 'authorization: basic ...'
        auth header.

    :param proxy_basic_auth:
        Colon-separated username:password string for 'proxy-authorization: basic ...'
        auth header.

    :param disable_cache:
        If ``True``, adds 'cache-control: no-cache' header.

    Example::

        >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
        {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
        >>> make_headers(accept_encoding=True)
        {'accept-encoding': 'gzip,deflate'}
    �,r	rz
keep-alive�
connectionzBasic zutf-8�
authorizationzproxy-authorizationzno-cachez
cache-control)�
isinstance�str�list�join�ACCEPT_ENCODINGrr�decode)�
keep_alive�accept_encoding�
user_agent�
basic_auth�proxy_basic_auth�
disable_cache�headerss       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/request.py�make_headersrs���T�G���o�s�+��
���
.�!�h�h��7�O�-�O�%4��!�"�� *����� ,�����#+�i��*�
�.F�.M�.M�g�.V�#V��� ��)1�I�
���5
�
�&��/�*��%�&��#-��� ��N�c��|�t||�|St|dd��	|j�}|S|S#ttf$r
t
}Y|SwxYw)z
    If a position is provided, move file to that point.
    Otherwise, we'll attempt to record a position for future use.
    N�tell)�rewind_body�getattrr!�IOError�OSError�_FAILEDTELL)�body�poss  r�set_file_positionr)\sh��
���D�#���J�
��v�t�	$�	0�	��)�)�+�C��J�3�J����!�	��C��J�	�s�3�A�Ac���t|dd�}|�t|t�r
	||�y|turtd��tdt|�z��#ttf$rtd��wxYw)z�
    Attempt to rewind body to a certain position.
    Primarily used for request redirects and retries.

    :param body:
        File-like object that supports seek.

    :param int pos:
        Position to seek to in file.
    �seekNzAAn error occurred when rewinding request body for redirect/retry.zRUnable to record file position for rewinding request body during a redirect/retry.z4body_pos must be of type integer, instead it was %s.)	r#rrr$r%rr&�
ValueError�type)r'�body_pos�	body_seeks   rr"r"ns�����f�d�+�I����H�m�!D�	��h��

�[�	 �#�
4�
�	
�
�B�T�(�^�S�
�	
����!�	�'�S��
�	�s�A�A/)NNNNNN)�
__future__r�base64r�
exceptionsr�packages.sixrr�SKIP_HEADER�	frozenset�SKIPPABLE_HEADERSr�objectr&rr)r"�rr�<module>r9sU��&��.�+�"���G�H�� ���h��������
E�P�$
rpython3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-312.pyc000064400000025062151732702460025373 0ustar00�

R`i���L�ddlZddlZddlZddlmZddlmZdZGd�d�Zy)�N�)�ProxySchemeUnsupported)�sixi@c���eZdZdZed��Z	dd�Zd�Zd�Zd�Z	dd�Z
dd	�Zdd
�Zd d�Z
d d�Z	d!d
�Zd�Zd�Zd"d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd#d�Zd�Zy)$�SSLTransportaL
    The SSLTransport wraps an existing socket and establishes an SSL connection.

    Contrary to Python's implementation of SSLSocket, it allows you to chain
    multiple TLS connections together. It's particularly useful if you need to
    implement TLS within TLS.

    The class supports most of the socket API operations.
    c�h�t|d�s&tjrtd��td��y)z�
        Raises a ProxySchemeUnsupported if the provided ssl_context can't be used
        for TLS in TLS.

        The only requirement is that the ssl_context provides the 'wrap_bio'
        methods.
        �wrap_biozKTLS in TLS requires SSLContext.wrap_bio() which isn't supported on Python 2zXTLS in TLS requires SSLContext.wrap_bio() which isn't available on non-native SSLContextN)�hasattrr�PY2r)�ssl_contexts ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssltransport.py�$_validate_ssl_context_for_tls_in_tlsz1SSLTransport._validate_ssl_context_for_tls_in_tlss@���{�J�/��w�w�,�,���
-�9���0�Nc�(�tj�|_tj�|_||_||_|j
|j|j|��|_|j|jj�y)zV
        Create an SSLTransport around socket using the provided ssl_context.
        )�server_hostnameN)
�ssl�	MemoryBIO�incoming�outgoing�suppress_ragged_eofs�socketr	�sslobj�_ssl_io_loop�do_handshake)�selfrrrrs     r
�__init__zSSLTransport.__init__,sm���
�
���
��
�
���
�$8��!����!�*�*��M�M�4�=�=�/�+�
���
	
���$�+�+�2�2�3rc��|S�N��rs r
�	__enter__zSSLTransport.__enter__?s���rc�$�|j�yr)�close)r�_s  r
�__exit__zSSLTransport.__exit__Bs���
�
�rc�6�|jj�Sr)r�filenor s r
r'zSSLTransport.filenoE����{�{�!�!�#�#rc�&�|j||�Sr)�_wrap_ssl_read)r�len�buffers   r
�readzSSLTransport.readHs���"�"�3��/�/rc�D�|dk7rtd��|j|�S)Nrz+non-zero flags not allowed in calls to recv)�
ValueErrorr*)rr+�flagss   r
�recvzSSLTransport.recvKs&���A�:��J�K�K��"�"�3�'�'rc�n�|dk7rtd��|r|�t|�}n|�d}|j||�S)Nrz0non-zero flags not allowed in calls to recv_into�)r/r+r-)rr,�nbytesr0s    r
�	recv_intozSSLTransport.recv_intoPs@���A�:��O�P�P��v�~���[�F�
�^��F��y�y���(�(rc��|dk7rtd��d}t|�5}|jd�5}t|�}||kr|j	||d�}||z
}||kr�ddd�ddd�y#1swY�xYw#1swYyxYw)Nrz.non-zero flags not allowed in calls to sendall�B)r/�
memoryview�castr+�send)r�datar0�count�view�	byte_view�amount�vs        r
�sendallzSSLTransport.sendallYs~���A�:��M�N�N���
��
��t�y�y��~����^�F��&�.��I�I�i���/�0����
���&�.�(6�
�
�~�~��
�
�s"�A=�/A1� A=�1A:	�6A=�=Bc�r�|dk7rtd��|j|jj|�}|S)Nrz+non-zero flags not allowed in calls to send)r/rr�write)rr;r0�responses    r
r:zSSLTransport.sendcs6���A�:��J�K�K��$�$�T�[�[�%6�%6��=���rc�:�t|�hd�kstd|�d���d|v}d|vxs|}|s|sJ�d|v}d}	|r|	dz
}	|r|	dz
}	tj||	�}
|jxjdz
c_|�d	}|d
krt
j}|d
k(r|std��|
S|r|rtj|
|
|�}n3|rtj|
|�}n|sJ�tj|
|�}|r|Stj||||�}||_|S)a
        Python's httpclient uses makefile and buffered io when reading HTTP
        messages and we need to support it.

        This is unfortunately a copy and paste of socket.py makefile with small
        changes to point to the socket directly.
        >�b�r�wz
invalid mode z (only r, w, b allowed)rHrGrF�����rz!unbuffered streams must be binary)�setr/r�SocketIO�_io_refs�io�DEFAULT_BUFFER_SIZE�BufferedRWPair�BufferedReader�BufferedWriter�
TextIOWrapper�mode)
rrU�	buffering�encoding�errors�newline�writing�reading�binary�rawmode�rawr,�texts
             r
�makefilezSSLTransport.makefileis6���4�y�O�+���O�P�P���+����+�,�W����'�!�!���������s�N�G���s�N�G��o�o�d�G�,��������!�����I��q�=��.�.�I���>�� �!D�E�E��J��w��&�&�s�C��;�F�
��&�&�s�I�6�F��N�7��&�&�s�I�6�F���M������&�'�B����	��rc�N�|j|jj�yr)rr�unwrapr s r
rbzSSLTransport.unwrap�s�����$�+�+�,�,�-rc�8�|jj�yr)rr#r s r
r#zSSLTransport.close�s�������rc�8�|jj|�Sr)r�getpeercert)r�binary_forms  r
rezSSLTransport.getpeercert�s���{�{�&�&�{�3�3rc�6�|jj�Sr)r�versionr s r
rhzSSLTransport.version�s���{�{�"�"�$�$rc�6�|jj�Sr)r�cipherr s r
rjzSSLTransport.cipher�r(rc�6�|jj�Sr)r�selected_alpn_protocolr s r
rlz#SSLTransport.selected_alpn_protocol�s���{�{�1�1�3�3rc�6�|jj�Sr)r�selected_npn_protocolr s r
rnz"SSLTransport.selected_npn_protocol�s���{�{�0�0�2�2rc�6�|jj�Sr)r�shared_ciphersr s r
rpzSSLTransport.shared_ciphers�s���{�{�)�)�+�+rc�6�|jj�Sr)r�compressionr s r
rrzSSLTransport.compression�s���{�{�&�&�(�(rc�:�|jj|�yr)r�
settimeout)r�values  r
rtzSSLTransport.settimeout�s�������u�%rc�6�|jj�Sr)r�
gettimeoutr s r
rwzSSLTransport.gettimeout�s���{�{�%�%�'�'rc�8�|jj�yr)r�_decref_socketiosr s r
ryzSSLTransport._decref_socketios�s�����%�%�'rc���	|j|jj||�S#tj$r4}|j
tjk(r|jrYd}~y�d}~wwxYw�Nr)rrr-r�SSLError�errno�
SSL_ERROR_EOFr)rr+r,�es    r
r*zSSLTransport._wrap_ssl_read�sZ��	��$�$�T�[�[�%5�%5�s�F�C�C���|�|�	��w�w�#�+�+�+��0I�0I����		�s�&)�A0�)A+�*A+�+A0c�$�d}d}|r�d}	||�}|j
j
�}|jj|�|�d}nj|tjk(rW|jjt�}|r|jj|�n|jj�|r��|S#tj$rD}|jtjtjfvr|�|j}Yd}~��d}~wwxYw)z>Performs an I/O loop between incoming/outgoing and the socket.TNF)rr|r}�SSL_ERROR_WANT_READ�SSL_ERROR_WANT_WRITErr-rrAr1�
SSL_BLOCKSIZErrC�	write_eof)r�func�args�should_loop�retr}r�bufs        r
rzSSLTransport._ssl_io_loop�s���������E�
 ��D�k���-�-�$�$�&�C��K�K����$��}�#���#�1�1�1��k�k�&�&�}�5����M�M�'�'��,��M�M�+�+�-�)�*�
��#�<�<�
 ��7�7�3�#:�#:�C�<T�<T�"U�U��G������	
 �s�B8�8D�:D
�
D)NT)r3N)r3rr{)r)rGNNNN)Fr)�__name__�
__module__�__qualname__�__doc__�staticmethodrrr!r%r'r-r1r5rAr:r`rbr#rerhrjrlrnrprrrtrwryr*rrrr
rrs��������,OS�4�&��$�0�(�
)���MQ�+�Z.��4�%�$�4�3�,�)�&�(�(��rr)	rOrr�
exceptionsr�packagesrr�rrrr
�<module>r�s%��	�
�
�/���
�R�Rrpython3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-312.pyc000064400000003101151732702460023764 0ustar00�

R`iE��,�ddlmZmZmZ	dd�Z	dd�Zy)�)�create_urllib3_context�resolve_cert_reqs�resolve_ssl_versionNc�R�|�y|dk(ry|jdk(r|r
|jryy)a?
    Returns True if the connection requires an HTTP CONNECT through the proxy.

    :param URL proxy_url:
        URL of the proxy.
    :param ProxyConfig proxy_config:
        Proxy configuration from poolmanager.py
    :param str destination_scheme:
        The scheme of the destination. (i.e https, http, etc)
    F�http�httpsT)�scheme�use_forwarding_for_https)�	proxy_url�proxy_config�destination_schemes   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/proxy.py�connection_requires_http_tunnelrs>������V�#��	���G�#���1�1���c��tt|�t|���}|s |s|st|d�r|j	�|S)z\
    Generates a default proxy ssl context if one hasn't been provided by the
    user.
    )�ssl_version�	cert_reqs�load_default_certs)rrr�hasattrr)rr�ca_certs�ca_cert_dir�ca_cert_data�ssl_contexts      r�create_proxy_ssl_contextr%sF��)�'��4�#�I�.��K�
����K�!5�6��&�&�(��r)NNN)�ssl_rrrrr�rr�<module>rs"��P�P�;?��DKO�rpython3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-312.pyc000064400000036732151732702460023425 0ustar00�

R`i�7����ddlmZddlZddlmZddlmZddlmZgd�Z	dZ
ejd	�Zejd
�Z
ejdejejz�ZdZd
Zdj'ee��Zeed�Zgd�ZdZddj1eD�cgc]}|ez��	c}�zdzZdezdzZdezdzezdzZdZejd�Zejdezdz�Zejdezdz�Zejdezdz�Z ejdeddzdz�Z!ejdezd z�Z"d!e�de�de�d"�Z#eje#ejejz�Z$e%d#�Z&e%d$�Z'e&e'zd%hzZ(e(d&d'hzZ)e)d(hzxZ*Z+Gd)�d*ed*e	��Z,d+�Z-d3d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4ycc}w)4�)�absolute_importN)�
namedtuple�)�LocationParseError)�six��scheme�auth�host�port�path�query�fragment)�http�httpsNz%[a-fA-F0-9]{2}z^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)zS^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?(?://([^\\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$z(?:[0-9]{1,3}\.){3}[0-9]{1,3}z[0-9A-Fa-f]{1,4}z(?:{hex}:{hex}|{ipv4}))�hex�ipv4)r�ls32)	z(?:%(hex)s:){6}%(ls32)sz::(?:%(hex)s:){5}%(ls32)sz%(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)sz2(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)sz6(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)sz/(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)sz'(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)sz&(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)sz(?:(?:%(hex)s:){0,6}%(hex)s)?::zCABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~z(?:�|�)z
(?:%25|%)(?:[z]|%[a-fA-F0-9]{2})+z\[z)?\]z!(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*z!^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$�^�$����(z)\]$z^(z)(?::0*?(|0|[1-9][0-9]{0,4}))?$zBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~z!$&'()*+,;=�:�@�/�?c�|��eZdZdZdZ							d	�fd�	Zed��Zed��Zed��Z	ed��Z
d�Z�xZS)
�Urlz�
    Data structure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`. Both the scheme and host are normalized as they are
    both case-insensitive according to RFC 3986.
    �c
���|r|jd�sd|z}|�|j�}tt|�||||||||�S)Nr)�
startswith�lower�superr �__new__)	�clsr	r
rrr
rr�	__class__s	        ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/url.pyr&zUrl.__new__[sR��������,���:�D����\�\�^�F��S�#�&����t�T�4���
�	
�c��|jS)z@For backwards-compatibility with urlparse. We're nice like that.)r��selfs r)�hostnamezUrl.hostnamems���y�y�r*c�b�|jxsd}|j�|d|jzz
}|S)z)Absolute path including the query string.rr)r
r)r-�uris  r)�request_urizUrl.request_urirs4���i�i��3���:�:�!��3����#�#�C��
r*c�h�|jrd|j|jfzS|jS)z(Network location including host and portz%s:%d)rrr,s r)�netlocz
Url.netloc|s-���9�9��d�i�i����3�3�3��y�y�r*c��|\}}}}}}}d}|�||dzz
}|�||dzz
}|�||z
}|�|dt|�zz
}|�||z
}|�|d|zz
}|�|d|zz
}|S)a�
        Convert self into a url

        This function should more or less round-trip with :func:`.parse_url`. The
        returned url may not be exactly the same as the url inputted to
        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
        with a blank port will have : removed).

        Example: ::

            >>> U = parse_url('http://google.com/mail/')
            >>> U.url
            'http://google.com/mail/'
            >>> Url('http', 'username:password', 'host.com', 80,
            ... '/path', 'query', 'fragment').url
            'http://username:password@host.com:80/path?query#fragment'
        �z://rrr�#)�str)	r-r	r
rrr
rr�urls	         r)r8zUrl.url�s���&;?�7���d�D�$��x������6�F�?�"�C����4�$�;��C����4�K�C����4�#�d�)�#�#�C����4�K�C����4�%�<��C����4�(�?�"�C��
r*c��|jS�N)r8r,s r)�__str__zUrl.__str__�s���x�x�r*)NNNNNNN)
�__name__�
__module__�__qualname__�__doc__�	__slots__r&�propertyr.r1r3r8r;�
__classcell__)r(s@r)r r Rs������I��
�
�
�
���
�$�������������%��%�Nr*r c��d}d}|D]%}|j|�}|dkr�|�||ks�"|}|}�'|�|dkr|ddfS|d|||dzd|fS)a�
    .. deprecated:: 1.25

    Given a string and an iterable of delimiters, split on the first found
    delimiter. Return two split parts and the matched delimiter.

    If not found, then the first part is the full input string.

    Example::

        >>> split_first('foo/bar?baz', '?/=')
        ('foo', 'bar?baz', '/')
        >>> split_first('foo/bar?baz', '123')
        ('foo/bar?baz', '', None)

    Scales linearly with number of delims. Not ideal for large number of delims.
    Nrr5�)�find)�s�delims�min_idx�	min_delim�d�idxs      r)�split_firstrL�s{��$�G��I�
���f�f�Q�i����7���?�c�G�m��G��I����'�A�+��"�d�{���X�g�;��'�A�+�-�(�)�3�3r*c�"�|�|Stj|�}tjd�|�\}}|j	dd�}||jd�k(}t
�}tdt|��D]�}|||dz}t|�}	|r|dk(s|	dkr|j�|vr||z
}�:|jdt|	�d	dj	�jd	�j�z���|j|�S)
zfPercent-encodes a URI component without reapplying
    onto an already percent-encoded component.
    Nc�@�|jd�j�S)Nr)�group�upper)�matchs r)�<lambda>z'_encode_invalid_chars.<locals>.<lambda>�s��e�k�k�!�n�*�*�,r*�utf-8�
surrogatepass�%rrD�r)r�ensure_text�
PERCENT_RE�subn�encode�count�	bytearray�range�len�ord�decode�extendr�zfillrP)
�	component�
allowed_chars�encoding�percent_encodings�	uri_bytes�is_percent_encoded�encoded_component�i�byte�byte_ords
          r)�_encode_invalid_charsrm�s���������	�*�I�
$.�?�?�,�i�$� �I� �� � ��/�:�I�*�i�o�o�d�.C�C��!���
�1�c�)�n�
%����Q��U�#���t�9���4�4�<��s�N�t�{�{�}�
�=���%���� � ���X��q�r�):�)A�)A�)C�)I�)I�!�)L�)R�)R�)T�!U�V�&��#�#�H�-�-r*c�P�|jd�}g}|D]2}|dk(r�	|dk7r|j|�� |s�#|j��4|jd�r|r|dr|j	dd�|jd�r|jd�dj
|�S)Nr�.z..rr5)z/.z/..)�split�append�popr#�insert�endswith�join)r
�segments�output�segments    r)�_remove_path_dot_segmentsry�s����z�z�#��H�
�F����c�>��
��_��M�M�'�"���J�J�L�����s��V�v�a�y��
�
�a����}�}�]�#��
�
�b���8�8�F��r*c
��|�r>t|tj�rtj|�}|tv�rt
j
|�}|r�tj|�}|ri|jd�\}}|||}|jd�r|dk7r|dd}n|dd}dt|t�z}|d|j�|z||dzS|j�Stj
|�sJtjdj|j!d�D�cgc]
}t#|���c}��S|Scc}w)NrDz%25��%�.ro)�
isinstancer�binary_type�
ensure_str�NORMALIZABLE_SCHEMES�
IPV6_ADDRZ_RErQ�
ZONE_ID_RE�search�spanr#rm�UNRESERVED_CHARSr$�IPV4_RErurp�_idna_encode)rr	�is_ipv6rQ�start�end�zone_id�labels        r)�_normalize_hostr�s/����d�C�O�O�,��>�>�$�'�D��)�)�#�)�)�$�/�G��#�)�)�$�/���!&���A��J�E�3�"�5��o�G��)�)�%�0�W��5E�")�!�"�+��")�!�"�+��!�$9�'�CS�$T�T�G����<�-�-�/�'�9�D���J�F�F��:�:�<�'��]�]�4�(��~�~��I�I��
�
�3��P��u�|�E�2��P�Q����K��Qs�%Ec��|r<td�|D��r*	ddlm}	j|j�dd��S|j�jd�S#t$r"t	j
t
d�d�Y�lwxYw#j$r%t	j
t
d|z�d�Y��wxYw)	Nc3�8K�|]}t|�dk\���y�w)rVN)r_)�.0�xs  r)�	<genexpr>z_idna_encode.<locals>.<genexpr>2s����0�4�a�C��F�c�M�4�s�r)�idnaz-Unable to parse URL without the 'idna' moduleT)�strict�
std3_rulesz#Name '%s' is not a valid IDNA label�ascii)
�any�pip._vendorr��ImportErrorr�
raise_fromrrZr$�	IDNAError)�namer�s  r)r�r�1s�����0�4�0�0�	�(�	��;�;�t�z�z�|�D�T�;�J�J�
�:�:�<���w�'�'���	��N�N�"�#R�S��
�	���~�~�	��N�N�"�#I�D�#P�Q�SW�
�	�s"�A�!B�(B	�B	�1C�?Cc��tj|�j�\}}t|t�}t|t
�}|�|d|zz
}|S)zHPercent-encodes a request target so that there are no invalid charactersr)�	TARGET_RErQ�groupsrm�
PATH_CHARS�QUERY_CHARS)�targetr
rs   r)�_encode_targetr�CsN���/�/�&�)�0�0�2�K�D�%�
"�4��
4�F�!�%��5�E����#��+����Mr*c�<��|s
t�S|}tj|�sd|z}	tj	|�j�\}}}}}|duxs|j
�tv}|r|j
�}|r]|jd�\}}	}
|xsd}tj	|
�j�\}}|r|rt|t�}|dk(r	d}nd\}}}|�-t|�}d|cxkrdkst|��t|��t||�}|r|rt|�}t|t �}|r|rt|t"�}|r|rt|t$�}|s	|�|�d}nd}t/|t*j0�rt*j2�nt*j4��fd�}
t|
|�|
|�|
|�||
|�|
|�|
|��	�S#t&t(f$r"t+j,t|�d�cYSwxYw)
a
    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.
    This parser is RFC 3986 and RFC 6874 compliant.

    The parser logic and helper functions are based heavily on
    work done in the ``rfc3986`` module.

    :param str url: URL to parse into a :class:`.Url` namedtuple.

    Partly backwards-compatible with :mod:`urlparse`.

    Example::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/mail/', ...)
        >>> parse_url('google.com:80')
        Url(scheme=None, host='google.com', port=80, path=None, ...)
        >>> parse_url('/foo?bar')
        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    z//Nrr5)NNNri��c���|�|S�|�Sr:r!)r��ensure_funcs �r)�ensure_typezparse_url.<locals>.ensure_type�s����I�q�1�;�q�>�1r*r)r �	SCHEME_REr��URI_RErQr�r$r��
rpartition�
_HOST_PORT_RErm�USERINFO_CHARS�intrr�ryr�r��FRAGMENT_CHARS�
ValueError�AttributeErrorrr�r~�	text_typerWr�)r8�
source_urlr	�	authorityr
rr�
normalize_urir
�_�	host_portrrr�r�s              @r)�	parse_urlr�Ms���,��u���J����C� ��S�j��"D�39�<�<��3D�3K�3K�3M�0��	�4����$��P�&�,�,�.�<P�*P�
���\�\�^�F��!*�!5�!5�c�!:��D�!�Y��<�4�D�&�,�,�Y�7�>�>�@�J�D�$��
�,�T�>�B���r�z���/��D�$�����t�9�D���&��&�(��-�-�'�(��-�-��t�V�,���T�,�T�2�D�(��z�:�D��U�)�%��=�E��X�,�X�~�F�H����� 4��D��D��#�s�}�}�%��o�o���n�n��2���6�"�
��
�
��
�
�
��
��%� ��X�&����/
��'�D��~�~�0��<�d�C�C�D�s�D>G*�*.H�Hc�f�t|�}|jxsd|j|jfS)z4
    Deprecated. Use :func:`parse_url` instead.
    r)r�r	r.r)r8�ps  r)�get_hostr��s+��	�#��A��8�8��v�q�z�z�1�6�6�1�1r*)rS)5�
__future__r�re�collectionsr�
exceptionsr�packagesr�	url_attrsr��compilerXr��UNICODE�DOTALLr��IPV4_PAT�HEX_PAT�format�LS32_PAT�_subs�_variations�UNRESERVED_PATru�IPV6_PAT�ZONE_ID_PAT�IPV6_ADDRZ_PAT�REG_NAME_PATr�r��IPV6_REr��BRACELESS_IPV6_ADDRZ_REr��_HOST_PORT_PATr��setr��SUB_DELIM_CHARSr�r�r�r�r rLrmryr�r�r�r�r�)r�s0r)�<module>r�s]��&�	�"�+��K�	�/���R�Z�Z�*�
+�
��B�J�J�8�9�	�	�����
�J�J�����

��,��
��#�*�*�w�X�*�F����*����*X���3�8�8��<��1�Q��Y��<�=�=��C����.�1F�F����!�F�*�[�8�7�B��3���B�J�J�;�<�	�
�"�*�*�S�8�^�c�)�
*��
�"�*�*�S�8�^�c�)�
*����
�
�3��/�#�5�6�
�$�"�*�*�S�>�!�B�+?�%?�#�%E�F��
�R�Z�Z��k�)�G�3�
4�
������
��
�
�>�2�:�:��	�	�+A�B�
��H����m�$��!�O�3�s�e�;��
�s�C�j�
(�
�)�S�E�1�1��n�Z�*�U�I�
&�Z�z 4�F.�D�<�>(�$�^�B2��q=s�#G*
python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-312.pyc000064400000035435151732702470023563 0ustar00�

R`iC����ddlmZddlZddlZddlZddlZddlmZmZddl	m
Z
mZmZddl
mZmZmZmZddlmZdd	lmZmZdZdZd
Zd
Zd
ZdgZe
eed�Zd
�Zeede�Z 	ddl!Z!ddl!m"Z"m#Z#	ddl!mZ	ddl%mZ	ddl!m&Z&e&Z'	ddl!m(Z(	ddl!m)Z)m*Z*m+Z+	ddl!m,Z,dj[gd��Z.	ddl!mZd�Z0d �Z1d!�Z2	d'd"�Z3												d(d#�Z4d$�Z5d%�Z6d)d&�Z7y#e$$rY�zwxYw#e$$rY�~wxYw#e$$rY��wxYw#e$$r	ddl!m'Z&e&Z'n#e$$rdxZ'Z&YnwxYwY��wxYw#e$$re&Z(Y��wxYw#e$$r
d\Z*Z+dZ)Y��wxYw#e$$rdZ,Y��wxYw#e$$rGd�de/�ZY��wxYw)*�)�absolute_importN)�hexlify�	unhexlify)�md5�sha1�sha256�)�InsecurePlatformWarning�ProxySchemeUnsupported�SNIMissingWarning�SSLError)�six�)�BRACELESS_IPV6_ADDRZ_RE�IPV4_REFzhttp/1.1)� �(�@c��tt|�t|�z
�}tt|�t|��D]
\}}|||zz}�|dk(S)z�
    Compare two digests of equal length in constant time.

    The digests must be of type str/bytes.
    Returns True if the digests match, and False otherwise.
    r)�abs�len�zip�	bytearray)�a�b�result�left�rights     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssl_.py�_const_compare_digest_backportr sO����Q��#�a�&��
!�F��9�Q�<��1��6���e��$��,���7��Q�;���compare_digest)�
CERT_REQUIRED�wrap_socket)�HAS_SNI)�SSLTransport)�PROTOCOL_TLS)�PROTOCOL_SSLv23)�PROTOCOL_TLS_CLIENT)�OP_NO_COMPRESSION�OP_NO_SSLv2�OP_NO_SSLv3)iii)�OP_NO_TICKETi@�:)zECDHE+AESGCMzECDHE+CHACHA20z
DHE+AESGCMzDHE+CHACHA20zECDH+AESGCMz	DH+AESGCMzECDH+AESzDH+AESz
RSA+AESGCMzRSA+AESz!aNULLz!eNULLz!MD5z!DSS)�
SSLContextc�.�eZdZd�Zd�Zdd�Zd�Zdd�Zy)	r/c��||_d|_tj|_d|_d|_d|_d|_d|_	y)NFr)
�protocol�check_hostname�ssl�	CERT_NONE�verify_mode�ca_certs�options�certfile�keyfile�ciphers)�self�protocol_versions  r�__init__zSSLContext.__init__�s@��,�D�M�"'�D��"�}�}�D�� �D�M��D�L� �D�M��D�L��D�Lr!c� �||_||_y�N)r9r:)r<r9r:s   r�load_cert_chainzSSLContext.load_cert_chain�s��$�D�M�"�D�Lr!Nc�F�||_|�td��|�td��y)Nz-CA directories not supported in older Pythonsz&CA data not supported in older Pythons)r7r
)r<�cafile�capath�cadatas    r�load_verify_locationsz SSLContext.load_verify_locations�s2��"�D�M��!��N�O�O��!��G�H�H�"r!c��||_yr@�r;)r<�cipher_suites  r�set_cipherszSSLContext.set_ciphers�s	��'�D�Lr!c���tjdt�|j|j|j
|j|j|d�}t|fd|ji|��S)Na2A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings)r:r9r7�	cert_reqs�ssl_version�server_sider;)
�warnings�warnr
r:r9r7r6r2r$r;)r<�socket�server_hostnamerN�kwargss     rr$zSSLContext.wrap_socket�sd���M�M� �(�
� �<�<� �M�M� �M�M�!�-�-�#�}�}�*�
�F��v�F�t�|�|�F�v�F�Fr!)NNN)NF)�__name__�
__module__�__qualname__r>rArFrJr$�r!rr/r/�s��		 �	#�	I�	(�	Gr!r/c�z�|jdd�j�}t|�}tj	|�}|stdj
|���t|j��}||�j�}t||�s$tdj
|t|����y)z�
    Checks if given fingerprint matches the supplied certificate.

    :param cert:
        Certificate as bytes object.
    :param fingerprint:
        Fingerprint as string of hexdigits, can be interspersed by colons.
    r.�z"Fingerprint of invalid length: {0}z6Fingerprints did not match. Expected "{0}", got "{1}".N)�replace�lowerr�HASHFUNC_MAP�getr
�formatr�encode�digest�_const_compare_digestr)�cert�fingerprint�
digest_length�hashfunc�fingerprint_bytes�cert_digests      r�assert_fingerprintrh�s����%�%�c�2�.�4�4�6�K���$�M����
�.�H���;�B�B�;�O�P�P�"�+�"4�"4�"6�7���4�.�'�'�)�K� ��.?�@��D�K�K��W�[�1�
�
�	
�Ar!c��|�tSt|t�r(tt|d�}|�ttd|z�}|S|S)a�
    Resolves the argument to a numeric constant, which can be passed to
    the wrap_socket function/method from the ssl module.
    Defaults to :data:`ssl.CERT_REQUIRED`.
    If given a string it is assumed to be the name of the constant in the
    :mod:`ssl` module or its abbreviation.
    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
    If it's neither `None` nor a string we assume it is already the numeric
    constant which can directly be passed to wrap_socket.
    N�CERT_)r#�
isinstance�str�getattrr4��	candidate�ress  r�resolve_cert_reqsrq�sI�������)�S�!��c�9�d�+���;��#�w��2�3�C��
��r!c��|�tSt|t�r(tt|d�}|�ttd|z�}|S|S)z 
    like resolve_cert_reqs
    N�	PROTOCOL_)r'rkrlrmr4rns  r�resolve_ssl_versionrt�sI�������)�S�!��c�9�d�+���;��#�{�Y�6�7�C��
��r!c�\��|r	|tk(rt}t|���j|xst�|�t
jn|}|�&d}|tz}|tz}|tz}|tz}�xj|zc_|t
jk(stjdk\rt�dd�	�d�_�fd�}|t
jk(r|�_|�n|�|�_t#�d�r(t$j&j)d�}|r|�_�S)	aAll arguments have the same meaning as ``ssl_wrap_socket``.

    By default, this function does a lot of the same work that
    ``ssl.create_default_context`` does on Python 3.4+. It:

    - Disables SSLv2, SSLv3, and compression
    - Sets a restricted set of server ciphers

    If you wish to enable SSLv3, you can do::

        from pip._vendor.urllib3.util import ssl_
        context = ssl_.create_urllib3_context()
        context.options &= ~ssl_.OP_NO_SSLv3

    You can do the same to enable compression (substituting ``COMPRESSION``
    for ``SSLv3`` in the last line above).

    :param ssl_version:
        The desired protocol version to use. This will default to
        PROTOCOL_SSLv23 which will negotiate the highest protocol that both
        the server and your installation of OpenSSL support.
    :param cert_reqs:
        Whether to require the certificate verification. This defaults to
        ``ssl.CERT_REQUIRED``.
    :param options:
        Specific OpenSSL options. These default to ``ssl.OP_NO_SSLv2``,
        ``ssl.OP_NO_SSLv3``, ``ssl.OP_NO_COMPRESSION``, and ``ssl.OP_NO_TICKET``.
    :param ciphers:
        Which cipher suites to allow the server to select.
    :returns:
        Constructed SSLContext object with specified options
    :rtype: SSLContext
    Nr)����post_handshake_authTc�0��t�dd��d�_yy)Nr3F)rmr3)�contexts�r�disable_check_hostnamez6create_urllib3_context.<locals>.disable_check_hostnameEs#����G�-�t�4�@�&+�G�"�	
Ar!�keylog_filename�
SSLKEYLOGFILE)r'r)r/rJ�DEFAULT_CIPHERSr4r#r+r,r*r-r8�sys�version_informryr6�hasattr�os�environr]r})rMrLr8r;r|�
sslkeylogfiler{s      @r�create_urllib3_contextr��s+���J�+��5�)����%�G�����2�?�3�&/�%6��!�!�I�I������;����;���	�$�$��
	�<����O�O�w��O�	�S�&�&�&�#�*:�*:�i�*G�W��&��N�
�N�'+��#�+��C�%�%�%�'���� �� �'����w�)�*��
�
����7�
��&3�G�#��Nr!c
��|}
|
�t|||��}
|s|	s|r	|
j||	|�n|�t|
d�r|
j
�|r|
�t|�rt	d��|r(|
�|
j||�n|
j|||
�	t|
d�r|
jt�|xrt|�}|xrtxs
txr|}ts|rtj dt"�|rt%||
||��}|St%||
|�}|S#ttf$r}t	|��d}~wwxYw#t$rY��wxYw)a
    All arguments except for server_hostname, ssl_context, and ca_cert_dir have
    the same meaning as they do when using :func:`ssl.wrap_socket`.

    :param server_hostname:
        When SNI is supported, the expected hostname of the certificate
    :param ssl_context:
        A pre-made :class:`SSLContext` object. If none is provided, one will
        be created using :func:`create_urllib3_context`.
    :param ciphers:
        A string of ciphers we wish the client to support.
    :param ca_cert_dir:
        A directory containing CA certificates in multiple separate files, as
        supported by OpenSSL's -CApath flag or the capath argument to
        SSLContext.load_verify_locations().
    :param key_password:
        Optional password if the keyfile is encrypted.
    :param ca_cert_data:
        Optional string containing CA certificates in PEM format suitable for
        passing as the cadata parameter to SSLContext.load_verify_locations()
    :param tls_in_tls:
        Use SSLTransport to wrap the existing socket.
    NrH�load_default_certsz5Client private key is encrypted, password is required�set_alpn_protocolsa�An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings�rR)r�rF�IOError�OSErrorr
r�r��_is_key_file_encryptedrAr��ALPN_PROTOCOLS�NotImplementedError�is_ipaddressr%�IS_SECURETRANSPORTrOrPr�_ssl_wrap_socket_impl)�sockr:r9rLr7rRrMr;�ssl_context�ca_cert_dir�key_password�ca_cert_data�
tls_in_tlsr{�e�use_sni_hostname�send_sni�ssl_socks                  r�ssl_wrap_socketr�csx��L�G���)��i��Q���;�,�	��)�)�(�K��N�
�	���2F�!G��"�"�$�
�<�'�,B�7�,K��N�O�O�����#�#�H�g�6��#�#�H�g�|�D�
��7�0�1��&�&�~�6�'�L�|�O�/L�+L�� �,�W���.��
��'��
�
�
�
�		
��(��'�:��
��
�O�)��w�
�C���O��g��!�	��1�+���	��,�
��
�s)�D�!D>�D;�+D6�6D;�>	E
�	E
c���tjs!t|t�r|j	d�}tt
j|�xstj|��S)z�Detects whether the hostname given is an IPv4 or IPv6 address.
    Also detects IPv6 addresses with Zone IDs.

    :param str hostname: Hostname to examine.
    :return: True if the hostname is an IP address, False otherwise.
    �ascii)	r�PY2rk�bytes�decode�boolr�matchr)�hostnames rr�r��sG���7�7�z�(�E�2��?�?�7�+����
�
�h�'�R�+B�+H�+H��+R�S�Sr!c�r�t|d�5}|D]}d|vs�ddd�y	ddd�y#1swYyxYw)z*Detects if a key file is encrypted or not.�r�	ENCRYPTEDNTF)�open)�key_file�f�lines   rr�r��s>��	
�h��	���D��d�"��	
�	��
��

��s�
-�-�-�6c��|r3tstd��tj|�t|||�S|r|j||��S|j|�S)Nz0TLS in TLS requires support for the 'ssl' moduler�)r&r�$_validate_ssl_context_for_tls_in_tlsr$)r�r�r�rRs    rr�r��sa����(�B��
�	�9�9�+�F��D�+��?�?���&�&�t�_�&�M�M��&�&�t�,�,r!)NNNN)NNNNNNNNNNNFr@)8�
__future__r�hmacr�r�rO�binasciirr�hashlibrrr�
exceptionsr
rrr
�packagesr�urlrrr/r&r%�IS_PYOPENSSLr�r�r\r rmrar4r#r$�ImportError�ssltransportr'r(r)r*r+r,r-�joinr�objectrhrqrtr�r�r�r�r�rWr!r�<module>r�s��&��	�
��'�%�%����1�
�
���
����������T�v�.��
� ��&6�8V�W��	��.�	��	�*�

+� �"�O�'�'�
 �?�?�� �,�(�(����&2G��h
�:�.
�"=A�f�V
�
��
���������c�L
T��-��c
�	��	��
�	��	��
�	��	���+�+�7�&����+�)*�*��,�+��+���'�&��'��� �3��K���� �����L���T�0G�.G�V�.G�0G�s��$C#�1C.�8C9�?D�D(�
D5�E�4E�#C+�*C+�.C6�5C6�9D�D�D%�
D�D%�	D�D%�D�D%�$D%�(D2�1D2�5E�E�E�E�E'�&E'python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-312.pyc000064400000025664151732702470024314 0ustar00�

R`i�'���ddlmZddlZddlmZmZddlmZe�Z	e
edej�ZGd�de�Zy)	�)�absolute_importN)�_GLOBAL_DEFAULT_TIMEOUT�getdefaulttimeout�)�TimeoutStateError�	monotonicc��eZdZdZeZdeefd�Zd�ZeZ	e
d��Ze
d��Ze
d��Z
d�Zd	�Zd
�Zed��Zed��Zy)
�Timeouta2Timeout configuration.

    Timeouts can be defined as a default for a pool:

    .. code-block:: python

       timeout = Timeout(connect=2.0, read=7.0)
       http = PoolManager(timeout=timeout)
       response = http.request('GET', 'http://example.com/')

    Or per-request (which overrides the default for the pool):

    .. code-block:: python

       response = http.request('GET', 'http://example.com/', timeout=Timeout(10))

    Timeouts can be disabled by setting all the parameters to ``None``:

    .. code-block:: python

       no_timeout = Timeout(connect=None, read=None)
       response = http.request('GET', 'http://example.com/, timeout=no_timeout)


    :param total:
        This combines the connect and read timeouts into one; the read timeout
        will be set to the time leftover from the connect attempt. In the
        event that both a connect timeout and a total are specified, or a read
        timeout and a total are specified, the shorter timeout will be applied.

        Defaults to None.

    :type total: int, float, or None

    :param connect:
        The maximum amount of time (in seconds) to wait for a connection
        attempt to a server to succeed. Omitting the parameter will default the
        connect timeout to the system default, probably `the global default
        timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout for connection attempts.

    :type connect: int, float, or None

    :param read:
        The maximum amount of time (in seconds) to wait between consecutive
        read operations for a response from the server. Omitting the parameter
        will default the read timeout to the system default, probably `the
        global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout.

    :type read: int, float, or None

    .. note::

        Many factors can affect the total amount of time for urllib3 to return
        an HTTP response.

        For example, Python's DNS resolver does not obey the timeout specified
        on the socket. Other factors that can affect total request time include
        high CPU load, high swap, the program running at a low priority level,
        or other behaviors.

        In addition, the read and total timeouts only measure the time between
        read operations on the socket connecting the client and the server,
        not the total amount of time for the request to return a complete
        response. For most requests, the timeout is raised because the server
        has not sent the first byte in the specified time. This is not always
        the case; if a server streams one byte every fifteen seconds, a timeout
        of 20 seconds will not trigger, even though the request will take
        several minutes to complete.

        If your goal is to cut off any request after a set amount of wall clock
        time, consider having a second "watcher" thread to cut off a slow
        request.
    Nc��|j|d�|_|j|d�|_|j|d�|_d|_y)N�connect�read�total)�_validate_timeout�_connect�_readr�_start_connect)�selfrrr
s    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/timeout.py�__init__zTimeout.__init__esF���.�.�w�	�B��
��+�+�D�&�9��
��+�+�E�7�;��
�"���c��t|�j�d|j�d|j�d|j�d�S)Nz	(connect=z, read=z, total=�))�type�__name__rrr�rs r�__repr__zTimeout.__repr__ks.����J����M�M��J�J��J�J�	
�	
rc�6�||jur
t�S|S)N)�DEFAULT_TIMEOUTr��cls�timeouts  r�resolve_default_timeoutzTimeout.resolve_default_timeoutvs��&-��1D�1D�&D� �"�Q�'�Qrc�Z�|tur|jS|�||jur|St|t�rt	d��	t|�	|dkrt	d|�d|�d���	|S#ttf$rt	d|�d|�d���wxYw#t$rt	d|�d|�d���wxYw)	a�Check that a timeout attribute is valid.

        :param value: The timeout value to validate
        :param name: The name of the timeout attribute to validate. This is
            used to specify in error messages.
        :return: The validated and casted version of the given value.
        :raises ValueError: If it is a numeric value less than or equal to
            zero, or the type is not an integer, float, or None.
        zDTimeout cannot be a boolean value. It must be an int, float or None.zTimeout value z was z', but it must be an int, float or None.rzAttempted to set z timeout to zC, but the timeout cannot be set to a value less than or equal to 0.)�_Defaultr�
isinstance�bool�
ValueError�float�	TypeError)r �value�names   rrzTimeout._validate_timeoutzs����H���&�&�&��=�E�S�%8�%8�8��L��e�T�"��,��
�	��%�L�	���z� �.2�5�:�������)�:�&�	��)-�u�6��
�	���	��)-�u�6��
�	�s�A)�B�)"B�B*c��t||��S)a�Create a new Timeout from a legacy timeout value.

        The timeout value used by httplib.py sets the same timeout on the
        connect(), and recv() socket requests. This creates a :class:`Timeout`
        object that sets the individual timeouts to the ``timeout`` value
        passed to this function.

        :param timeout: The legacy timeout value.
        :type timeout: integer, float, sentinel default object, or None
        :return: Timeout object
        :rtype: :class:`Timeout`
        )r
r)r
rs  r�
from_floatzTimeout.from_float�s���G�W�5�5rc�Z�t|j|j|j��S)aCreate a copy of the timeout object

        Timeout properties are stored per-pool but each request needs a fresh
        Timeout object to ensure each one has its own start/stop configured.

        :return: a copy of the timeout object
        :rtype: :class:`Timeout`
        )rr
r)r
rrrrs r�clonez
Timeout.clone�s���t�}�}�4�:�:�T�Z�Z�P�Prc�f�|j�td��t�|_|jS)z�Start the timeout clock, used during a connect() attempt

        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to start a timer that has been started already.
        z'Timeout timer has already been started.�rr�current_timers r�
start_connectzTimeout.start_connect�s2�����*�#�$M�N�N�*�n����"�"�"rc�^�|j�td��t�|jz
S)aGets the time elapsed since the call to :meth:`start_connect`.

        :return: Elapsed time in seconds.
        :rtype: float
        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to get duration for a timer that hasn't been started.
        z:Can't get connect duration for timer that has not started.r1rs r�get_connect_durationzTimeout.get_connect_duration�s5�����&�#�L��
��~�� 3� 3�3�3rc���|j�|jS|j�|j|jur|jSt|j|j�S)a!Get the value to use when setting a connection timeout.

        This will be a positive float or integer, the value None
        (never timeout), or the default system timeout.

        :return: Connect timeout.
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        )rrr�minrs r�connect_timeoutzTimeout.connect_timeout�sR���:�:���=�=� ��=�=� �D�M�M�T�5I�5I�$I��:�:���4�=�=�$�*�*�-�-rc���|j��|j|jurw|j�k|j|jurS|j�|jSt	dt|j|j
�z
|j��S|j�?|j|jur't	d|j|j
�z
�S|jS)a�Get the value for the read timeout.

        This assumes some time has elapsed in the connection timeout and
        computes the read timeout appropriately.

        If self.total is set, the read timeout is dependent on the amount of
        time taken by the connect timeout. If the connection time has not been
        established, a :exc:`~urllib3.exceptions.TimeoutStateError` will be
        raised.

        :return: Value to use for the read timeout.
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        :raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
            has not yet been called on this object.
        r)rrrr�maxr7r5rs r�read_timeoutzTimeout.read_timeout�s���$
�J�J�"��
�
�$�"6�"6�6��
�
�&��
�
�$�"6�"6�6��"�"�*��z�z�!��q�#�d�j�j�4�+D�+D�+F�F��
�
�S�T�T�
�Z�Z�
#��
�
�$�:N�:N�(N��q�$�*�*�t�'@�'@�'B�B�C�C��:�:�r)r�
__module__�__qualname__�__doc__rrr$rr�__str__�classmethodr"rr-r/r3r5�propertyr8r;�rrr
r
s���L�^.�O�!�8�(�#�
��G��R��R��+��+�Z�
6��
6�Q�	#�4��.��.�"���rr
)
�
__future__r�time�socketrr�
exceptionsr�objectr$�getattrr2r
rBrr�<module>rIs>��&��>�*��8���t�[�$�)�)�4��|�f�|rpython3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-312.pyc000064400000011274151732702470024755 0ustar00�

R`i%���ddlmZddlZddlmZddlmZddlmZddl	m
Z
mZd	�Zejddfd
�Zd�Zd�Zd
�Zed�Zy)�)�absolute_importN�)�_appengine_environ)�LocationParseError)�six�)�NoWayToWaitForSocketError�
wait_for_readc�f�t|dd�}|dury|�y	t|d��S#t$rYywxYw)a$
    Returns True if the connection is dropped and should be closed.

    :param conn:
        :class:`http.client.HTTPConnection` object.

    Note: For platforms like AppEngine, this will always return ``False`` to
    let the platform handle connection recycling transparently for us.
    �sockFTg)�timeout)�getattrr
r	)�connrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/connection.py�is_connection_droppedrsH���4���'�D��u�}���|����T�3�/�/��$����s�$�	0�0c���|\}}|jd�r|jd�}d}t�}	|jd�tj|||tj�D]z}|\}	}
}}}
d}	tj|	|
|�}t||�|tjur|j|�|r|j|�|j|
�|cS|�|�tj d��#t$r%tjtd|z�d�cYSwxYw#tj $r }|}|�|j#�d}Yd}~��d}~wwxYw)akConnect to *address* and return the socket object.

    Convenience function.  Connect to *address* (a 2-tuple ``(host,
    port)``) and return the socket object.  Passing the optional
    *timeout* parameter will set the timeout on the socket instance
    before attempting to connect.  If no *timeout* is supplied, the
    global default timeout setting returned by :func:`socket.getdefaulttimeout`
    is used.  If *source_address* is set it must be a tuple of (host, port)
    for the socket to bind as a source address before making the connection.
    An host of '' or port 0 tells the OS to use the default.
    �[z[]N�idnaz'%s', label empty or too longz!getaddrinfo returns an empty list)�
startswith�strip�allowed_gai_family�encode�UnicodeErrorr�
raise_fromr�socket�getaddrinfo�SOCK_STREAM�_set_socket_options�_GLOBAL_DEFAULT_TIMEOUT�
settimeout�bind�connect�error�close)�addressr
�source_address�socket_options�host�port�err�family�res�af�socktype�proto�	canonname�sar�es                r�create_connectionr3%sZ��$�J�D�$����s���z�z�$���
�C�
 �
!�F�
����F���!�!�$��f�f�6H�6H�I��-0�*��H�e�Y����	��=�=��X�u�5�D�
 ��n�5��f�<�<�<�����(���	�	�.�)��L�L����K�J�,���	�
�,�,�:�
;�;��=�
��~�~��?�$�F�G��
�	
�
��*�|�|�	��C����
�
������		�s*�D�:A+D3�+D0�/D0�3E&�E!�!E&c�6�|�y|D]}|j|��y)N)�
setsockopt)r�options�opts   rrrds"��������������c�R�tj}trtj}|S)z�This function is designed to work in the context of
    getaddrinfo, where family=socket.AF_UNSPEC is the default and
    will perform a DNS search for both IPv6 and IPv4 records.)r�AF_INET�HAS_IPV6�	AF_UNSPEC)r+s rrrls ��
�^�^�F���!�!���Mr8c��d}d}tj�rytjr9	tjtj�}|j|df�d}|r|j�|S#t$rY�wxYw)z4Returns True if the system can bind an IPv6 address.NFrT)r�is_appengine_sandboxr�has_ipv6�AF_INET6r!�	Exceptionr$)r(rr?s   r�	_has_ipv6rBwsw���D��H��.�.�0��
���	��=�=����1�D��I�I�t�Q�i� ��H���
�
���O���	��	�s�8A7�7	B�Bz::1)�
__future__rr�contribr�
exceptionsr�packagesr�waitr	r
rrr3rrrBr;�r8r�<module>rIsN��&�
�(�+��:��8
�*�*���	<<�~���<�U��r8python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/queue.cpython-312.pyc000064400000002571151732702470023742 0ustar00�

R`i���n�ddlZddlmZddlmZej
rddlZGd�dej�Zy)�N�)�six��queuec�(�eZdZd�Zefd�Zd�Zd�Zy)�	LifoQueuec�6�tj�|_y�N)�collections�dequer)�self�_s  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/util/queue.py�_initzLifoQueue._inits�� �&�&�(��
�c�&�||j�Sr
r)r
�lens  r�_qsizezLifoQueue._qsizes���4�:�:��rc�:�|jj|�yr
)r�append)r
�items  r�_putzLifoQueue._puts���
�
���$�rc�6�|jj�Sr
)r�pop)r
s r�_getzLifoQueue._gets���z�z�~�~��rN)�__name__�
__module__�__qualname__rrrrr�rrrrs��)��� � rr)	r�packagesr�packages.six.movesr�PY2�Queue�_unused_module_Queuerrrr�<module>r%s(����&��7�7�(� ���� rpython3.12/site-packages/pip/_vendor/urllib3/util/proxy.py000064400000003105151732702470017430 0ustar00from .ssl_ import create_urllib3_context, resolve_cert_reqs, resolve_ssl_version


def connection_requires_http_tunnel(
    proxy_url=None, proxy_config=None, destination_scheme=None
):
    """
    Returns True if the connection requires an HTTP CONNECT through the proxy.

    :param URL proxy_url:
        URL of the proxy.
    :param ProxyConfig proxy_config:
        Proxy configuration from poolmanager.py
    :param str destination_scheme:
        The scheme of the destination. (i.e https, http, etc)
    """
    # If we're not using a proxy, no way to use a tunnel.
    if proxy_url is None:
        return False

    # HTTP destinations never require tunneling, we always forward.
    if destination_scheme == "http":
        return False

    # Support for forwarding with HTTPS proxies and HTTPS destinations.
    if (
        proxy_url.scheme == "https"
        and proxy_config
        and proxy_config.use_forwarding_for_https
    ):
        return False

    # Otherwise always use a tunnel.
    return True


def create_proxy_ssl_context(
    ssl_version, cert_reqs, ca_certs=None, ca_cert_dir=None, ca_cert_data=None
):
    """
    Generates a default proxy ssl context if one hasn't been provided by the
    user.
    """
    ssl_context = create_urllib3_context(
        ssl_version=resolve_ssl_version(ssl_version),
        cert_reqs=resolve_cert_reqs(cert_reqs),
    )

    if (
        not ca_certs
        and not ca_cert_dir
        and not ca_cert_data
        and hasattr(ssl_context, "load_default_certs")
    ):
        ssl_context.load_default_certs()

    return ssl_context
python3.12/site-packages/pip/_vendor/urllib3/util/response.py000064400000006666151732702470020124 0ustar00from __future__ import absolute_import

from email.errors import MultipartInvariantViolationDefect, StartBoundaryNotFoundDefect

from ..exceptions import HeaderParsingError
from ..packages.six.moves import http_client as httplib


def is_fp_closed(obj):
    """
    Checks whether a given file-like object is closed.

    :param obj:
        The file-like object to check.
    """

    try:
        # Check `isclosed()` first, in case Python3 doesn't set `closed`.
        # GH Issue #928
        return obj.isclosed()
    except AttributeError:
        pass

    try:
        # Check via the official file-like-object way.
        return obj.closed
    except AttributeError:
        pass

    try:
        # Check if the object is a container for another file-like object that
        # gets released on exhaustion (e.g. HTTPResponse).
        return obj.fp is None
    except AttributeError:
        pass

    raise ValueError("Unable to determine whether fp is closed.")


def assert_header_parsing(headers):
    """
    Asserts whether all headers have been successfully parsed.
    Extracts encountered errors from the result of parsing headers.

    Only works on Python 3.

    :param http.client.HTTPMessage headers: Headers to verify.

    :raises urllib3.exceptions.HeaderParsingError:
        If parsing errors are found.
    """

    # This will fail silently if we pass in the wrong kind of parameter.
    # To make debugging easier add an explicit check.
    if not isinstance(headers, httplib.HTTPMessage):
        raise TypeError("expected httplib.Message, got {0}.".format(type(headers)))

    defects = getattr(headers, "defects", None)
    get_payload = getattr(headers, "get_payload", None)

    unparsed_data = None
    if get_payload:
        # get_payload is actually email.message.Message.get_payload;
        # we're only interested in the result if it's not a multipart message
        if not headers.is_multipart():
            payload = get_payload()

            if isinstance(payload, (bytes, str)):
                unparsed_data = payload
    if defects:
        # httplib is assuming a response body is available
        # when parsing headers even when httplib only sends
        # header data to parse_headers() This results in
        # defects on multipart responses in particular.
        # See: https://github.com/urllib3/urllib3/issues/800

        # So we ignore the following defects:
        # - StartBoundaryNotFoundDefect:
        #     The claimed start boundary was never found.
        # - MultipartInvariantViolationDefect:
        #     A message claimed to be a multipart but no subparts were found.
        defects = [
            defect
            for defect in defects
            if not isinstance(
                defect, (StartBoundaryNotFoundDefect, MultipartInvariantViolationDefect)
            )
        ]

    if defects or unparsed_data:
        raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)


def is_response_to_head(response):
    """
    Checks whether the request of a response has been a HEAD-request.
    Handles the quirks of AppEngine.

    :param http.client.HTTPResponse response:
        Response to check if the originating request
        used 'HEAD' as a method.
    """
    # FIXME: Can we do this somehow without accessing private httplib _method?
    method = response._method
    if isinstance(method, int):  # Platform-specific: Appengine
        return method == 3
    return method.upper() == "HEAD"
python3.12/site-packages/pip/_vendor/urllib3/util/timeout.py000064400000023670151732702470017746 0ustar00from __future__ import absolute_import

import time

# The default socket timeout, used by httplib to indicate that no timeout was; specified by the user
from socket import _GLOBAL_DEFAULT_TIMEOUT, getdefaulttimeout

from ..exceptions import TimeoutStateError

# A sentinel value to indicate that no timeout was specified by the user in
# urllib3
_Default = object()


# Use time.monotonic if available.
current_time = getattr(time, "monotonic", time.time)


class Timeout(object):
    """Timeout configuration.

    Timeouts can be defined as a default for a pool:

    .. code-block:: python

       timeout = Timeout(connect=2.0, read=7.0)
       http = PoolManager(timeout=timeout)
       response = http.request('GET', 'http://example.com/')

    Or per-request (which overrides the default for the pool):

    .. code-block:: python

       response = http.request('GET', 'http://example.com/', timeout=Timeout(10))

    Timeouts can be disabled by setting all the parameters to ``None``:

    .. code-block:: python

       no_timeout = Timeout(connect=None, read=None)
       response = http.request('GET', 'http://example.com/, timeout=no_timeout)


    :param total:
        This combines the connect and read timeouts into one; the read timeout
        will be set to the time leftover from the connect attempt. In the
        event that both a connect timeout and a total are specified, or a read
        timeout and a total are specified, the shorter timeout will be applied.

        Defaults to None.

    :type total: int, float, or None

    :param connect:
        The maximum amount of time (in seconds) to wait for a connection
        attempt to a server to succeed. Omitting the parameter will default the
        connect timeout to the system default, probably `the global default
        timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout for connection attempts.

    :type connect: int, float, or None

    :param read:
        The maximum amount of time (in seconds) to wait between consecutive
        read operations for a response from the server. Omitting the parameter
        will default the read timeout to the system default, probably `the
        global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout.

    :type read: int, float, or None

    .. note::

        Many factors can affect the total amount of time for urllib3 to return
        an HTTP response.

        For example, Python's DNS resolver does not obey the timeout specified
        on the socket. Other factors that can affect total request time include
        high CPU load, high swap, the program running at a low priority level,
        or other behaviors.

        In addition, the read and total timeouts only measure the time between
        read operations on the socket connecting the client and the server,
        not the total amount of time for the request to return a complete
        response. For most requests, the timeout is raised because the server
        has not sent the first byte in the specified time. This is not always
        the case; if a server streams one byte every fifteen seconds, a timeout
        of 20 seconds will not trigger, even though the request will take
        several minutes to complete.

        If your goal is to cut off any request after a set amount of wall clock
        time, consider having a second "watcher" thread to cut off a slow
        request.
    """

    #: A sentinel object representing the default timeout value
    DEFAULT_TIMEOUT = _GLOBAL_DEFAULT_TIMEOUT

    def __init__(self, total=None, connect=_Default, read=_Default):
        self._connect = self._validate_timeout(connect, "connect")
        self._read = self._validate_timeout(read, "read")
        self.total = self._validate_timeout(total, "total")
        self._start_connect = None

    def __repr__(self):
        return "%s(connect=%r, read=%r, total=%r)" % (
            type(self).__name__,
            self._connect,
            self._read,
            self.total,
        )

    # __str__ provided for backwards compatibility
    __str__ = __repr__

    @classmethod
    def resolve_default_timeout(cls, timeout):
        return getdefaulttimeout() if timeout is cls.DEFAULT_TIMEOUT else timeout

    @classmethod
    def _validate_timeout(cls, value, name):
        """Check that a timeout attribute is valid.

        :param value: The timeout value to validate
        :param name: The name of the timeout attribute to validate. This is
            used to specify in error messages.
        :return: The validated and casted version of the given value.
        :raises ValueError: If it is a numeric value less than or equal to
            zero, or the type is not an integer, float, or None.
        """
        if value is _Default:
            return cls.DEFAULT_TIMEOUT

        if value is None or value is cls.DEFAULT_TIMEOUT:
            return value

        if isinstance(value, bool):
            raise ValueError(
                "Timeout cannot be a boolean value. It must "
                "be an int, float or None."
            )
        try:
            float(value)
        except (TypeError, ValueError):
            raise ValueError(
                "Timeout value %s was %s, but it must be an "
                "int, float or None." % (name, value)
            )

        try:
            if value <= 0:
                raise ValueError(
                    "Attempted to set %s timeout to %s, but the "
                    "timeout cannot be set to a value less "
                    "than or equal to 0." % (name, value)
                )
        except TypeError:
            # Python 3
            raise ValueError(
                "Timeout value %s was %s, but it must be an "
                "int, float or None." % (name, value)
            )

        return value

    @classmethod
    def from_float(cls, timeout):
        """Create a new Timeout from a legacy timeout value.

        The timeout value used by httplib.py sets the same timeout on the
        connect(), and recv() socket requests. This creates a :class:`Timeout`
        object that sets the individual timeouts to the ``timeout`` value
        passed to this function.

        :param timeout: The legacy timeout value.
        :type timeout: integer, float, sentinel default object, or None
        :return: Timeout object
        :rtype: :class:`Timeout`
        """
        return Timeout(read=timeout, connect=timeout)

    def clone(self):
        """Create a copy of the timeout object

        Timeout properties are stored per-pool but each request needs a fresh
        Timeout object to ensure each one has its own start/stop configured.

        :return: a copy of the timeout object
        :rtype: :class:`Timeout`
        """
        # We can't use copy.deepcopy because that will also create a new object
        # for _GLOBAL_DEFAULT_TIMEOUT, which socket.py uses as a sentinel to
        # detect the user default.
        return Timeout(connect=self._connect, read=self._read, total=self.total)

    def start_connect(self):
        """Start the timeout clock, used during a connect() attempt

        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to start a timer that has been started already.
        """
        if self._start_connect is not None:
            raise TimeoutStateError("Timeout timer has already been started.")
        self._start_connect = current_time()
        return self._start_connect

    def get_connect_duration(self):
        """Gets the time elapsed since the call to :meth:`start_connect`.

        :return: Elapsed time in seconds.
        :rtype: float
        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to get duration for a timer that hasn't been started.
        """
        if self._start_connect is None:
            raise TimeoutStateError(
                "Can't get connect duration for timer that has not started."
            )
        return current_time() - self._start_connect

    @property
    def connect_timeout(self):
        """Get the value to use when setting a connection timeout.

        This will be a positive float or integer, the value None
        (never timeout), or the default system timeout.

        :return: Connect timeout.
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        """
        if self.total is None:
            return self._connect

        if self._connect is None or self._connect is self.DEFAULT_TIMEOUT:
            return self.total

        return min(self._connect, self.total)

    @property
    def read_timeout(self):
        """Get the value for the read timeout.

        This assumes some time has elapsed in the connection timeout and
        computes the read timeout appropriately.

        If self.total is set, the read timeout is dependent on the amount of
        time taken by the connect timeout. If the connection time has not been
        established, a :exc:`~urllib3.exceptions.TimeoutStateError` will be
        raised.

        :return: Value to use for the read timeout.
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        :raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
            has not yet been called on this object.
        """
        if (
            self.total is not None
            and self.total is not self.DEFAULT_TIMEOUT
            and self._read is not None
            and self._read is not self.DEFAULT_TIMEOUT
        ):
            # In case the connect timeout has not yet been established.
            if self._start_connect is None:
                return self._read
            return max(0, min(self.total - self.get_connect_duration(), self._read))
        elif self.total is not None and self.total is not self.DEFAULT_TIMEOUT:
            return max(0, self.total - self.get_connect_duration())
        else:
            return self._read
python3.12/site-packages/pip/_vendor/urllib3/util/retry.py000064400000052775151732702500017427 0ustar00from __future__ import absolute_import

import email
import logging
import re
import time
import warnings
from collections import namedtuple
from itertools import takewhile

from ..exceptions import (
    ConnectTimeoutError,
    InvalidHeader,
    MaxRetryError,
    ProtocolError,
    ProxyError,
    ReadTimeoutError,
    ResponseError,
)
from ..packages import six

log = logging.getLogger(__name__)


# Data structure for representing the metadata of requests that result in a retry.
RequestHistory = namedtuple(
    "RequestHistory", ["method", "url", "error", "status", "redirect_location"]
)


# TODO: In v2 we can remove this sentinel and metaclass with deprecated options.
_Default = object()


class _RetryMeta(type):
    @property
    def DEFAULT_METHOD_WHITELIST(cls):
        warnings.warn(
            "Using 'Retry.DEFAULT_METHOD_WHITELIST' is deprecated and "
            "will be removed in v2.0. Use 'Retry.DEFAULT_ALLOWED_METHODS' instead",
            DeprecationWarning,
        )
        return cls.DEFAULT_ALLOWED_METHODS

    @DEFAULT_METHOD_WHITELIST.setter
    def DEFAULT_METHOD_WHITELIST(cls, value):
        warnings.warn(
            "Using 'Retry.DEFAULT_METHOD_WHITELIST' is deprecated and "
            "will be removed in v2.0. Use 'Retry.DEFAULT_ALLOWED_METHODS' instead",
            DeprecationWarning,
        )
        cls.DEFAULT_ALLOWED_METHODS = value

    @property
    def DEFAULT_REDIRECT_HEADERS_BLACKLIST(cls):
        warnings.warn(
            "Using 'Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST' is deprecated and "
            "will be removed in v2.0. Use 'Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT' instead",
            DeprecationWarning,
        )
        return cls.DEFAULT_REMOVE_HEADERS_ON_REDIRECT

    @DEFAULT_REDIRECT_HEADERS_BLACKLIST.setter
    def DEFAULT_REDIRECT_HEADERS_BLACKLIST(cls, value):
        warnings.warn(
            "Using 'Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST' is deprecated and "
            "will be removed in v2.0. Use 'Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT' instead",
            DeprecationWarning,
        )
        cls.DEFAULT_REMOVE_HEADERS_ON_REDIRECT = value

    @property
    def BACKOFF_MAX(cls):
        warnings.warn(
            "Using 'Retry.BACKOFF_MAX' is deprecated and "
            "will be removed in v2.0. Use 'Retry.DEFAULT_BACKOFF_MAX' instead",
            DeprecationWarning,
        )
        return cls.DEFAULT_BACKOFF_MAX

    @BACKOFF_MAX.setter
    def BACKOFF_MAX(cls, value):
        warnings.warn(
            "Using 'Retry.BACKOFF_MAX' is deprecated and "
            "will be removed in v2.0. Use 'Retry.DEFAULT_BACKOFF_MAX' instead",
            DeprecationWarning,
        )
        cls.DEFAULT_BACKOFF_MAX = value


@six.add_metaclass(_RetryMeta)
class Retry(object):
    """Retry configuration.

    Each retry attempt will create a new Retry object with updated values, so
    they can be safely reused.

    Retries can be defined as a default for a pool::

        retries = Retry(connect=5, read=2, redirect=5)
        http = PoolManager(retries=retries)
        response = http.request('GET', 'http://example.com/')

    Or per-request (which overrides the default for the pool)::

        response = http.request('GET', 'http://example.com/', retries=Retry(10))

    Retries can be disabled by passing ``False``::

        response = http.request('GET', 'http://example.com/', retries=False)

    Errors will be wrapped in :class:`~urllib3.exceptions.MaxRetryError` unless
    retries are disabled, in which case the causing exception will be raised.

    :param int total:
        Total number of retries to allow. Takes precedence over other counts.

        Set to ``None`` to remove this constraint and fall back on other
        counts.

        Set to ``0`` to fail on the first retry.

        Set to ``False`` to disable and imply ``raise_on_redirect=False``.

    :param int connect:
        How many connection-related errors to retry on.

        These are errors raised before the request is sent to the remote server,
        which we assume has not triggered the server to process the request.

        Set to ``0`` to fail on the first retry of this type.

    :param int read:
        How many times to retry on read errors.

        These errors are raised after the request was sent to the server, so the
        request may have side-effects.

        Set to ``0`` to fail on the first retry of this type.

    :param int redirect:
        How many redirects to perform. Limit this to avoid infinite redirect
        loops.

        A redirect is a HTTP response with a status code 301, 302, 303, 307 or
        308.

        Set to ``0`` to fail on the first retry of this type.

        Set to ``False`` to disable and imply ``raise_on_redirect=False``.

    :param int status:
        How many times to retry on bad status codes.

        These are retries made on responses, where status code matches
        ``status_forcelist``.

        Set to ``0`` to fail on the first retry of this type.

    :param int other:
        How many times to retry on other errors.

        Other errors are errors that are not connect, read, redirect or status errors.
        These errors might be raised after the request was sent to the server, so the
        request might have side-effects.

        Set to ``0`` to fail on the first retry of this type.

        If ``total`` is not set, it's a good idea to set this to 0 to account
        for unexpected edge cases and avoid infinite retry loops.

    :param iterable allowed_methods:
        Set of uppercased HTTP method verbs that we should retry on.

        By default, we only retry on methods which are considered to be
        idempotent (multiple requests with the same parameters end with the
        same state). See :attr:`Retry.DEFAULT_ALLOWED_METHODS`.

        Set to a ``False`` value to retry on any verb.

        .. warning::

            Previously this parameter was named ``method_whitelist``, that
            usage is deprecated in v1.26.0 and will be removed in v2.0.

    :param iterable status_forcelist:
        A set of integer HTTP status codes that we should force a retry on.
        A retry is initiated if the request method is in ``allowed_methods``
        and the response status code is in ``status_forcelist``.

        By default, this is disabled with ``None``.

    :param float backoff_factor:
        A backoff factor to apply between attempts after the second try
        (most errors are resolved immediately by a second try without a
        delay). urllib3 will sleep for::

            {backoff factor} * (2 ** ({number of total retries} - 1))

        seconds. If the backoff_factor is 0.1, then :func:`.sleep` will sleep
        for [0.0s, 0.2s, 0.4s, ...] between retries. It will never be longer
        than :attr:`Retry.DEFAULT_BACKOFF_MAX`.

        By default, backoff is disabled (set to 0).

    :param bool raise_on_redirect: Whether, if the number of redirects is
        exhausted, to raise a MaxRetryError, or to return a response with a
        response code in the 3xx range.

    :param bool raise_on_status: Similar meaning to ``raise_on_redirect``:
        whether we should raise an exception, or return a response,
        if status falls in ``status_forcelist`` range and retries have
        been exhausted.

    :param tuple history: The history of the request encountered during
        each call to :meth:`~Retry.increment`. The list is in the order
        the requests occurred. Each list item is of class :class:`RequestHistory`.

    :param bool respect_retry_after_header:
        Whether to respect Retry-After header on status codes defined as
        :attr:`Retry.RETRY_AFTER_STATUS_CODES` or not.

    :param iterable remove_headers_on_redirect:
        Sequence of headers to remove from the request when a response
        indicating a redirect is returned before firing off the redirected
        request.
    """

    #: Default methods to be used for ``allowed_methods``
    DEFAULT_ALLOWED_METHODS = frozenset(
        ["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE"]
    )

    #: Default status codes to be used for ``status_forcelist``
    RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503])

    #: Default headers to be used for ``remove_headers_on_redirect``
    DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Cookie", "Authorization"])

    #: Maximum backoff time.
    DEFAULT_BACKOFF_MAX = 120

    def __init__(
        self,
        total=10,
        connect=None,
        read=None,
        redirect=None,
        status=None,
        other=None,
        allowed_methods=_Default,
        status_forcelist=None,
        backoff_factor=0,
        raise_on_redirect=True,
        raise_on_status=True,
        history=None,
        respect_retry_after_header=True,
        remove_headers_on_redirect=_Default,
        # TODO: Deprecated, remove in v2.0
        method_whitelist=_Default,
    ):

        if method_whitelist is not _Default:
            if allowed_methods is not _Default:
                raise ValueError(
                    "Using both 'allowed_methods' and "
                    "'method_whitelist' together is not allowed. "
                    "Instead only use 'allowed_methods'"
                )
            warnings.warn(
                "Using 'method_whitelist' with Retry is deprecated and "
                "will be removed in v2.0. Use 'allowed_methods' instead",
                DeprecationWarning,
                stacklevel=2,
            )
            allowed_methods = method_whitelist
        if allowed_methods is _Default:
            allowed_methods = self.DEFAULT_ALLOWED_METHODS
        if remove_headers_on_redirect is _Default:
            remove_headers_on_redirect = self.DEFAULT_REMOVE_HEADERS_ON_REDIRECT

        self.total = total
        self.connect = connect
        self.read = read
        self.status = status
        self.other = other

        if redirect is False or total is False:
            redirect = 0
            raise_on_redirect = False

        self.redirect = redirect
        self.status_forcelist = status_forcelist or set()
        self.allowed_methods = allowed_methods
        self.backoff_factor = backoff_factor
        self.raise_on_redirect = raise_on_redirect
        self.raise_on_status = raise_on_status
        self.history = history or tuple()
        self.respect_retry_after_header = respect_retry_after_header
        self.remove_headers_on_redirect = frozenset(
            [h.lower() for h in remove_headers_on_redirect]
        )

    def new(self, **kw):
        params = dict(
            total=self.total,
            connect=self.connect,
            read=self.read,
            redirect=self.redirect,
            status=self.status,
            other=self.other,
            status_forcelist=self.status_forcelist,
            backoff_factor=self.backoff_factor,
            raise_on_redirect=self.raise_on_redirect,
            raise_on_status=self.raise_on_status,
            history=self.history,
            remove_headers_on_redirect=self.remove_headers_on_redirect,
            respect_retry_after_header=self.respect_retry_after_header,
        )

        # TODO: If already given in **kw we use what's given to us
        # If not given we need to figure out what to pass. We decide
        # based on whether our class has the 'method_whitelist' property
        # and if so we pass the deprecated 'method_whitelist' otherwise
        # we use 'allowed_methods'. Remove in v2.0
        if "method_whitelist" not in kw and "allowed_methods" not in kw:
            if "method_whitelist" in self.__dict__:
                warnings.warn(
                    "Using 'method_whitelist' with Retry is deprecated and "
                    "will be removed in v2.0. Use 'allowed_methods' instead",
                    DeprecationWarning,
                )
                params["method_whitelist"] = self.allowed_methods
            else:
                params["allowed_methods"] = self.allowed_methods

        params.update(kw)
        return type(self)(**params)

    @classmethod
    def from_int(cls, retries, redirect=True, default=None):
        """Backwards-compatibility for the old retries format."""
        if retries is None:
            retries = default if default is not None else cls.DEFAULT

        if isinstance(retries, Retry):
            return retries

        redirect = bool(redirect) and None
        new_retries = cls(retries, redirect=redirect)
        log.debug("Converted retries value: %r -> %r", retries, new_retries)
        return new_retries

    def get_backoff_time(self):
        """Formula for computing the current backoff

        :rtype: float
        """
        # We want to consider only the last consecutive errors sequence (Ignore redirects).
        consecutive_errors_len = len(
            list(
                takewhile(lambda x: x.redirect_location is None, reversed(self.history))
            )
        )
        if consecutive_errors_len <= 1:
            return 0

        backoff_value = self.backoff_factor * (2 ** (consecutive_errors_len - 1))
        return min(self.DEFAULT_BACKOFF_MAX, backoff_value)

    def parse_retry_after(self, retry_after):
        # Whitespace: https://tools.ietf.org/html/rfc7230#section-3.2.4
        if re.match(r"^\s*[0-9]+\s*$", retry_after):
            seconds = int(retry_after)
        else:
            retry_date_tuple = email.utils.parsedate_tz(retry_after)
            if retry_date_tuple is None:
                raise InvalidHeader("Invalid Retry-After header: %s" % retry_after)
            if retry_date_tuple[9] is None:  # Python 2
                # Assume UTC if no timezone was specified
                # On Python2.7, parsedate_tz returns None for a timezone offset
                # instead of 0 if no timezone is given, where mktime_tz treats
                # a None timezone offset as local time.
                retry_date_tuple = retry_date_tuple[:9] + (0,) + retry_date_tuple[10:]

            retry_date = email.utils.mktime_tz(retry_date_tuple)
            seconds = retry_date - time.time()

        if seconds < 0:
            seconds = 0

        return seconds

    def get_retry_after(self, response):
        """Get the value of Retry-After in seconds."""

        retry_after = response.headers.get("Retry-After")

        if retry_after is None:
            return None

        return self.parse_retry_after(retry_after)

    def sleep_for_retry(self, response=None):
        retry_after = self.get_retry_after(response)
        if retry_after:
            time.sleep(retry_after)
            return True

        return False

    def _sleep_backoff(self):
        backoff = self.get_backoff_time()
        if backoff <= 0:
            return
        time.sleep(backoff)

    def sleep(self, response=None):
        """Sleep between retry attempts.

        This method will respect a server's ``Retry-After`` response header
        and sleep the duration of the time requested. If that is not present, it
        will use an exponential backoff. By default, the backoff factor is 0 and
        this method will return immediately.
        """

        if self.respect_retry_after_header and response:
            slept = self.sleep_for_retry(response)
            if slept:
                return

        self._sleep_backoff()

    def _is_connection_error(self, err):
        """Errors when we're fairly sure that the server did not receive the
        request, so it should be safe to retry.
        """
        if isinstance(err, ProxyError):
            err = err.original_error
        return isinstance(err, ConnectTimeoutError)

    def _is_read_error(self, err):
        """Errors that occur after the request has been started, so we should
        assume that the server began processing it.
        """
        return isinstance(err, (ReadTimeoutError, ProtocolError))

    def _is_method_retryable(self, method):
        """Checks if a given HTTP method should be retried upon, depending if
        it is included in the allowed_methods
        """
        # TODO: For now favor if the Retry implementation sets its own method_whitelist
        # property outside of our constructor to avoid breaking custom implementations.
        if "method_whitelist" in self.__dict__:
            warnings.warn(
                "Using 'method_whitelist' with Retry is deprecated and "
                "will be removed in v2.0. Use 'allowed_methods' instead",
                DeprecationWarning,
            )
            allowed_methods = self.method_whitelist
        else:
            allowed_methods = self.allowed_methods

        if allowed_methods and method.upper() not in allowed_methods:
            return False
        return True

    def is_retry(self, method, status_code, has_retry_after=False):
        """Is this method/status code retryable? (Based on allowlists and control
        variables such as the number of total retries to allow, whether to
        respect the Retry-After header, whether this header is present, and
        whether the returned status code is on the list of status codes to
        be retried upon on the presence of the aforementioned header)
        """
        if not self._is_method_retryable(method):
            return False

        if self.status_forcelist and status_code in self.status_forcelist:
            return True

        return (
            self.total
            and self.respect_retry_after_header
            and has_retry_after
            and (status_code in self.RETRY_AFTER_STATUS_CODES)
        )

    def is_exhausted(self):
        """Are we out of retries?"""
        retry_counts = (
            self.total,
            self.connect,
            self.read,
            self.redirect,
            self.status,
            self.other,
        )
        retry_counts = list(filter(None, retry_counts))
        if not retry_counts:
            return False

        return min(retry_counts) < 0

    def increment(
        self,
        method=None,
        url=None,
        response=None,
        error=None,
        _pool=None,
        _stacktrace=None,
    ):
        """Return a new Retry object with incremented retry counters.

        :param response: A response object, or None, if the server did not
            return a response.
        :type response: :class:`~urllib3.response.HTTPResponse`
        :param Exception error: An error encountered during the request, or
            None if the response was received successfully.

        :return: A new ``Retry`` object.
        """
        if self.total is False and error:
            # Disabled, indicate to re-raise the error.
            raise six.reraise(type(error), error, _stacktrace)

        total = self.total
        if total is not None:
            total -= 1

        connect = self.connect
        read = self.read
        redirect = self.redirect
        status_count = self.status
        other = self.other
        cause = "unknown"
        status = None
        redirect_location = None

        if error and self._is_connection_error(error):
            # Connect retry?
            if connect is False:
                raise six.reraise(type(error), error, _stacktrace)
            elif connect is not None:
                connect -= 1

        elif error and self._is_read_error(error):
            # Read retry?
            if read is False or not self._is_method_retryable(method):
                raise six.reraise(type(error), error, _stacktrace)
            elif read is not None:
                read -= 1

        elif error:
            # Other retry?
            if other is not None:
                other -= 1

        elif response and response.get_redirect_location():
            # Redirect retry?
            if redirect is not None:
                redirect -= 1
            cause = "too many redirects"
            redirect_location = response.get_redirect_location()
            status = response.status

        else:
            # Incrementing because of a server error like a 500 in
            # status_forcelist and the given method is in the allowed_methods
            cause = ResponseError.GENERIC_ERROR
            if response and response.status:
                if status_count is not None:
                    status_count -= 1
                cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status)
                status = response.status

        history = self.history + (
            RequestHistory(method, url, error, status, redirect_location),
        )

        new_retry = self.new(
            total=total,
            connect=connect,
            read=read,
            redirect=redirect,
            status=status_count,
            other=other,
            history=history,
        )

        if new_retry.is_exhausted():
            raise MaxRetryError(_pool, url, error or ResponseError(cause))

        log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)

        return new_retry

    def __repr__(self):
        return (
            "{cls.__name__}(total={self.total}, connect={self.connect}, "
            "read={self.read}, redirect={self.redirect}, status={self.status})"
        ).format(cls=type(self), self=self)

    def __getattr__(self, item):
        if item == "method_whitelist":
            # TODO: Remove this deprecated alias in v2.0
            warnings.warn(
                "Using 'method_whitelist' with Retry is deprecated and "
                "will be removed in v2.0. Use 'allowed_methods' instead",
                DeprecationWarning,
            )
            return self.allowed_methods
        try:
            return getattr(super(Retry, self), item)
        except AttributeError:
            return getattr(Retry, item)


# For backwards compatibility (equivalent to pre-v1.9):
Retry.DEFAULT = Retry(3)
python3.12/site-packages/pip/_vendor/urllib3/util/__init__.py000064400000002203151732702500017776 0ustar00from __future__ import absolute_import

# For backwards compatibility, provide imports that used to be here.
from .connection import is_connection_dropped
from .request import SKIP_HEADER, SKIPPABLE_HEADERS, make_headers
from .response import is_fp_closed
from .retry import Retry
from .ssl_ import (
    ALPN_PROTOCOLS,
    HAS_SNI,
    IS_PYOPENSSL,
    IS_SECURETRANSPORT,
    PROTOCOL_TLS,
    SSLContext,
    assert_fingerprint,
    resolve_cert_reqs,
    resolve_ssl_version,
    ssl_wrap_socket,
)
from .timeout import Timeout, current_time
from .url import Url, get_host, parse_url, split_first
from .wait import wait_for_read, wait_for_write

__all__ = (
    "HAS_SNI",
    "IS_PYOPENSSL",
    "IS_SECURETRANSPORT",
    "SSLContext",
    "PROTOCOL_TLS",
    "ALPN_PROTOCOLS",
    "Retry",
    "Timeout",
    "Url",
    "assert_fingerprint",
    "current_time",
    "is_connection_dropped",
    "is_fp_closed",
    "get_host",
    "parse_url",
    "make_headers",
    "resolve_cert_reqs",
    "resolve_ssl_version",
    "split_first",
    "ssl_wrap_socket",
    "wait_for_read",
    "wait_for_write",
    "SKIP_HEADER",
    "SKIPPABLE_HEADERS",
)
python3.12/site-packages/pip/_vendor/urllib3/util/queue.py000064400000000762151732702500017373 0ustar00import collections

from ..packages import six
from ..packages.six.moves import queue

if six.PY2:
    # Queue is imported for side effects on MS Windows. See issue #229.
    import Queue as _unused_module_Queue  # noqa: F401


class LifoQueue(queue.Queue):
    def _init(self, _):
        self.queue = collections.deque()

    def _qsize(self, len=len):
        return len(self.queue)

    def _put(self, item):
        self.queue.append(item)

    def _get(self):
        return self.queue.pop()
python3.12/site-packages/pip/_vendor/urllib3/util/request.py000064400000007635151732702500017745 0ustar00from __future__ import absolute_import

from base64 import b64encode

from ..exceptions import UnrewindableBodyError
from ..packages.six import b, integer_types

# Pass as a value within ``headers`` to skip
# emitting some HTTP headers that are added automatically.
# The only headers that are supported are ``Accept-Encoding``,
# ``Host``, and ``User-Agent``.
SKIP_HEADER = "@@@SKIP_HEADER@@@"
SKIPPABLE_HEADERS = frozenset(["accept-encoding", "host", "user-agent"])

ACCEPT_ENCODING = "gzip,deflate"

_FAILEDTELL = object()


def make_headers(
    keep_alive=None,
    accept_encoding=None,
    user_agent=None,
    basic_auth=None,
    proxy_basic_auth=None,
    disable_cache=None,
):
    """
    Shortcuts for generating request headers.

    :param keep_alive:
        If ``True``, adds 'connection: keep-alive' header.

    :param accept_encoding:
        Can be a boolean, list, or string.
        ``True`` translates to 'gzip,deflate'.
        List will get joined by comma.
        String will be used as provided.

    :param user_agent:
        String representing the user-agent you want, such as
        "python-urllib3/0.6"

    :param basic_auth:
        Colon-separated username:password string for 'authorization: basic ...'
        auth header.

    :param proxy_basic_auth:
        Colon-separated username:password string for 'proxy-authorization: basic ...'
        auth header.

    :param disable_cache:
        If ``True``, adds 'cache-control: no-cache' header.

    Example::

        >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
        {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
        >>> make_headers(accept_encoding=True)
        {'accept-encoding': 'gzip,deflate'}
    """
    headers = {}
    if accept_encoding:
        if isinstance(accept_encoding, str):
            pass
        elif isinstance(accept_encoding, list):
            accept_encoding = ",".join(accept_encoding)
        else:
            accept_encoding = ACCEPT_ENCODING
        headers["accept-encoding"] = accept_encoding

    if user_agent:
        headers["user-agent"] = user_agent

    if keep_alive:
        headers["connection"] = "keep-alive"

    if basic_auth:
        headers["authorization"] = "Basic " + b64encode(b(basic_auth)).decode("utf-8")

    if proxy_basic_auth:
        headers["proxy-authorization"] = "Basic " + b64encode(
            b(proxy_basic_auth)
        ).decode("utf-8")

    if disable_cache:
        headers["cache-control"] = "no-cache"

    return headers


def set_file_position(body, pos):
    """
    If a position is provided, move file to that point.
    Otherwise, we'll attempt to record a position for future use.
    """
    if pos is not None:
        rewind_body(body, pos)
    elif getattr(body, "tell", None) is not None:
        try:
            pos = body.tell()
        except (IOError, OSError):
            # This differentiates from None, allowing us to catch
            # a failed `tell()` later when trying to rewind the body.
            pos = _FAILEDTELL

    return pos


def rewind_body(body, body_pos):
    """
    Attempt to rewind body to a certain position.
    Primarily used for request redirects and retries.

    :param body:
        File-like object that supports seek.

    :param int pos:
        Position to seek to in file.
    """
    body_seek = getattr(body, "seek", None)
    if body_seek is not None and isinstance(body_pos, integer_types):
        try:
            body_seek(body_pos)
        except (IOError, OSError):
            raise UnrewindableBodyError(
                "An error occurred when rewinding request body for redirect/retry."
            )
    elif body_pos is _FAILEDTELL:
        raise UnrewindableBodyError(
            "Unable to record file position for rewinding "
            "request body during a redirect/retry."
        )
    else:
        raise ValueError(
            "body_pos must be of type integer, instead it was %s." % type(body_pos)
        )
python3.12/site-packages/pip/_vendor/urllib3/util/wait.py000064400000012433151732702500017211 0ustar00import errno
import select
import sys
from functools import partial

try:
    from time import monotonic
except ImportError:
    from time import time as monotonic

__all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"]


class NoWayToWaitForSocketError(Exception):
    pass


# How should we wait on sockets?
#
# There are two types of APIs you can use for waiting on sockets: the fancy
# modern stateful APIs like epoll/kqueue, and the older stateless APIs like
# select/poll. The stateful APIs are more efficient when you have a lots of
# sockets to keep track of, because you can set them up once and then use them
# lots of times. But we only ever want to wait on a single socket at a time
# and don't want to keep track of state, so the stateless APIs are actually
# more efficient. So we want to use select() or poll().
#
# Now, how do we choose between select() and poll()? On traditional Unixes,
# select() has a strange calling convention that makes it slow, or fail
# altogether, for high-numbered file descriptors. The point of poll() is to fix
# that, so on Unixes, we prefer poll().
#
# On Windows, there is no poll() (or at least Python doesn't provide a wrapper
# for it), but that's OK, because on Windows, select() doesn't have this
# strange calling convention; plain select() works fine.
#
# So: on Windows we use select(), and everywhere else we use poll(). We also
# fall back to select() in case poll() is somehow broken or missing.

if sys.version_info >= (3, 5):
    # Modern Python, that retries syscalls by default
    def _retry_on_intr(fn, timeout):
        return fn(timeout)

else:
    # Old and broken Pythons.
    def _retry_on_intr(fn, timeout):
        if timeout is None:
            deadline = float("inf")
        else:
            deadline = monotonic() + timeout

        while True:
            try:
                return fn(timeout)
            # OSError for 3 <= pyver < 3.5, select.error for pyver <= 2.7
            except (OSError, select.error) as e:
                # 'e.args[0]' incantation works for both OSError and select.error
                if e.args[0] != errno.EINTR:
                    raise
                else:
                    timeout = deadline - monotonic()
                    if timeout < 0:
                        timeout = 0
                    if timeout == float("inf"):
                        timeout = None
                    continue


def select_wait_for_socket(sock, read=False, write=False, timeout=None):
    if not read and not write:
        raise RuntimeError("must specify at least one of read=True, write=True")
    rcheck = []
    wcheck = []
    if read:
        rcheck.append(sock)
    if write:
        wcheck.append(sock)
    # When doing a non-blocking connect, most systems signal success by
    # marking the socket writable. Windows, though, signals success by marked
    # it as "exceptional". We paper over the difference by checking the write
    # sockets for both conditions. (The stdlib selectors module does the same
    # thing.)
    fn = partial(select.select, rcheck, wcheck, wcheck)
    rready, wready, xready = _retry_on_intr(fn, timeout)
    return bool(rready or wready or xready)


def poll_wait_for_socket(sock, read=False, write=False, timeout=None):
    if not read and not write:
        raise RuntimeError("must specify at least one of read=True, write=True")
    mask = 0
    if read:
        mask |= select.POLLIN
    if write:
        mask |= select.POLLOUT
    poll_obj = select.poll()
    poll_obj.register(sock, mask)

    # For some reason, poll() takes timeout in milliseconds
    def do_poll(t):
        if t is not None:
            t *= 1000
        return poll_obj.poll(t)

    return bool(_retry_on_intr(do_poll, timeout))


def null_wait_for_socket(*args, **kwargs):
    raise NoWayToWaitForSocketError("no select-equivalent available")


def _have_working_poll():
    # Apparently some systems have a select.poll that fails as soon as you try
    # to use it, either due to strange configuration or broken monkeypatching
    # from libraries like eventlet/greenlet.
    try:
        poll_obj = select.poll()
        _retry_on_intr(poll_obj.poll, 0)
    except (AttributeError, OSError):
        return False
    else:
        return True


def wait_for_socket(*args, **kwargs):
    # We delay choosing which implementation to use until the first time we're
    # called. We could do it at import time, but then we might make the wrong
    # decision if someone goes wild with monkeypatching select.poll after
    # we're imported.
    global wait_for_socket
    if _have_working_poll():
        wait_for_socket = poll_wait_for_socket
    elif hasattr(select, "select"):
        wait_for_socket = select_wait_for_socket
    else:  # Platform-specific: Appengine.
        wait_for_socket = null_wait_for_socket
    return wait_for_socket(*args, **kwargs)


def wait_for_read(sock, timeout=None):
    """Waits for reading to be available on a given socket.
    Returns True if the socket is readable, or False if the timeout expired.
    """
    return wait_for_socket(sock, read=True, timeout=timeout)


def wait_for_write(sock, timeout=None):
    """Waits for writing to be available on a given socket.
    Returns True if the socket is readable, or False if the timeout expired.
    """
    return wait_for_socket(sock, write=True, timeout=timeout)
python3.12/site-packages/pip/_vendor/urllib3/exceptions.py000064400000020031151732702500017442 0ustar00from __future__ import absolute_import

from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead

# Base Exceptions


class HTTPError(Exception):
    """Base exception used by this module."""

    pass


class HTTPWarning(Warning):
    """Base warning used by this module."""

    pass


class PoolError(HTTPError):
    """Base exception for errors caused within a pool."""

    def __init__(self, pool, message):
        self.pool = pool
        HTTPError.__init__(self, "%s: %s" % (pool, message))

    def __reduce__(self):
        # For pickling purposes.
        return self.__class__, (None, None)


class RequestError(PoolError):
    """Base exception for PoolErrors that have associated URLs."""

    def __init__(self, pool, url, message):
        self.url = url
        PoolError.__init__(self, pool, message)

    def __reduce__(self):
        # For pickling purposes.
        return self.__class__, (None, self.url, None)


class SSLError(HTTPError):
    """Raised when SSL certificate fails in an HTTPS connection."""

    pass


class ProxyError(HTTPError):
    """Raised when the connection to a proxy fails."""

    def __init__(self, message, error, *args):
        super(ProxyError, self).__init__(message, error, *args)
        self.original_error = error


class DecodeError(HTTPError):
    """Raised when automatic decoding based on Content-Type fails."""

    pass


class ProtocolError(HTTPError):
    """Raised when something unexpected happens mid-request/response."""

    pass


#: Renamed to ProtocolError but aliased for backwards compatibility.
ConnectionError = ProtocolError


# Leaf Exceptions


class MaxRetryError(RequestError):
    """Raised when the maximum number of retries is exceeded.

    :param pool: The connection pool
    :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool`
    :param string url: The requested Url
    :param exceptions.Exception reason: The underlying error

    """

    def __init__(self, pool, url, reason=None):
        self.reason = reason

        message = "Max retries exceeded with url: %s (Caused by %r)" % (url, reason)

        RequestError.__init__(self, pool, url, message)


class HostChangedError(RequestError):
    """Raised when an existing pool gets a request for a foreign host."""

    def __init__(self, pool, url, retries=3):
        message = "Tried to open a foreign host with url: %s" % url
        RequestError.__init__(self, pool, url, message)
        self.retries = retries


class TimeoutStateError(HTTPError):
    """Raised when passing an invalid state to a timeout"""

    pass


class TimeoutError(HTTPError):
    """Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    """

    pass


class ReadTimeoutError(TimeoutError, RequestError):
    """Raised when a socket timeout occurs while receiving data from a server"""

    pass


# This timeout error does not have a URL attached and needs to inherit from the
# base HTTPError
class ConnectTimeoutError(TimeoutError):
    """Raised when a socket timeout occurs while connecting to a server"""

    pass


class NewConnectionError(ConnectTimeoutError, PoolError):
    """Raised when we fail to establish a new connection. Usually ECONNREFUSED."""

    pass


class EmptyPoolError(PoolError):
    """Raised when a pool runs out of connections and no more are allowed."""

    pass


class ClosedPoolError(PoolError):
    """Raised when a request enters a pool after the pool has been closed."""

    pass


class LocationValueError(ValueError, HTTPError):
    """Raised when there is something wrong with a given URL input."""

    pass


class LocationParseError(LocationValueError):
    """Raised when get_host or similar fails to parse the URL input."""

    def __init__(self, location):
        message = "Failed to parse: %s" % location
        HTTPError.__init__(self, message)

        self.location = location


class URLSchemeUnknown(LocationValueError):
    """Raised when a URL input has an unsupported scheme."""

    def __init__(self, scheme):
        message = "Not supported URL scheme %s" % scheme
        super(URLSchemeUnknown, self).__init__(message)

        self.scheme = scheme


class ResponseError(HTTPError):
    """Used as a container for an error reason supplied in a MaxRetryError."""

    GENERIC_ERROR = "too many error responses"
    SPECIFIC_ERROR = "too many {status_code} error responses"


class SecurityWarning(HTTPWarning):
    """Warned when performing security reducing actions"""

    pass


class SubjectAltNameWarning(SecurityWarning):
    """Warned when connecting to a host with a certificate missing a SAN."""

    pass


class InsecureRequestWarning(SecurityWarning):
    """Warned when making an unverified HTTPS request."""

    pass


class SystemTimeWarning(SecurityWarning):
    """Warned when system time is suspected to be wrong"""

    pass


class InsecurePlatformWarning(SecurityWarning):
    """Warned when certain TLS/SSL configuration is not available on a platform."""

    pass


class SNIMissingWarning(HTTPWarning):
    """Warned when making a HTTPS request without SNI available."""

    pass


class DependencyWarning(HTTPWarning):
    """
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    """

    pass


class ResponseNotChunked(ProtocolError, ValueError):
    """Response needs to be chunked in order to read it as chunks."""

    pass


class BodyNotHttplibCompatible(HTTPError):
    """
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    """

    pass


class IncompleteRead(HTTPError, httplib_IncompleteRead):
    """
    Response length doesn't match expected Content-Length

    Subclass of :class:`http.client.IncompleteRead` to allow int value
    for ``partial`` to avoid creating large objects on streamed reads.
    """

    def __init__(self, partial, expected):
        super(IncompleteRead, self).__init__(partial, expected)

    def __repr__(self):
        return "IncompleteRead(%i bytes read, %i more expected)" % (
            self.partial,
            self.expected,
        )


class InvalidChunkLength(HTTPError, httplib_IncompleteRead):
    """Invalid chunk length in a chunked response."""

    def __init__(self, response, length):
        super(InvalidChunkLength, self).__init__(
            response.tell(), response.length_remaining
        )
        self.response = response
        self.length = length

    def __repr__(self):
        return "InvalidChunkLength(got length %r, %i bytes read)" % (
            self.length,
            self.partial,
        )


class InvalidHeader(HTTPError):
    """The header provided was somehow invalid."""

    pass


class ProxySchemeUnknown(AssertionError, URLSchemeUnknown):
    """ProxyManager does not support the supplied scheme"""

    # TODO(t-8ch): Stop inheriting from AssertionError in v2.0.

    def __init__(self, scheme):
        # 'localhost' is here because our URL parser parses
        # localhost:8080 -> scheme=localhost, remove if we fix this.
        if scheme == "localhost":
            scheme = None
        if scheme is None:
            message = "Proxy URL had no scheme, should start with http:// or https://"
        else:
            message = (
                "Proxy URL had unsupported scheme %s, should use http:// or https://"
                % scheme
            )
        super(ProxySchemeUnknown, self).__init__(message)


class ProxySchemeUnsupported(ValueError):
    """Fetching HTTPS resources through HTTPS proxies is unsupported"""

    pass


class HeaderParsingError(HTTPError):
    """Raised by assert_header_parsing, but we convert it to a log.warning statement."""

    def __init__(self, defects, unparsed_data):
        message = "%s, unparsed data: %r" % (defects or "Unknown", unparsed_data)
        super(HeaderParsingError, self).__init__(message)


class UnrewindableBodyError(HTTPError):
    """urllib3 encountered an error when trying to rewind a body"""

    pass
python3.12/site-packages/pip/_vendor/urllib3/poolmanager.py000064400000046450151732702500017602 0ustar00from __future__ import absolute_import

import collections
import functools
import logging

from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
from .exceptions import (
    LocationValueError,
    MaxRetryError,
    ProxySchemeUnknown,
    ProxySchemeUnsupported,
    URLSchemeUnknown,
)
from .packages import six
from .packages.six.moves.urllib.parse import urljoin
from .request import RequestMethods
from .util.proxy import connection_requires_http_tunnel
from .util.retry import Retry
from .util.url import parse_url

__all__ = ["PoolManager", "ProxyManager", "proxy_from_url"]


log = logging.getLogger(__name__)

SSL_KEYWORDS = (
    "key_file",
    "cert_file",
    "cert_reqs",
    "ca_certs",
    "ssl_version",
    "ca_cert_dir",
    "ssl_context",
    "key_password",
    "server_hostname",
)

# All known keyword arguments that could be provided to the pool manager, its
# pools, or the underlying connections. This is used to construct a pool key.
_key_fields = (
    "key_scheme",  # str
    "key_host",  # str
    "key_port",  # int
    "key_timeout",  # int or float or Timeout
    "key_retries",  # int or Retry
    "key_strict",  # bool
    "key_block",  # bool
    "key_source_address",  # str
    "key_key_file",  # str
    "key_key_password",  # str
    "key_cert_file",  # str
    "key_cert_reqs",  # str
    "key_ca_certs",  # str
    "key_ssl_version",  # str
    "key_ca_cert_dir",  # str
    "key_ssl_context",  # instance of ssl.SSLContext or urllib3.util.ssl_.SSLContext
    "key_maxsize",  # int
    "key_headers",  # dict
    "key__proxy",  # parsed proxy url
    "key__proxy_headers",  # dict
    "key__proxy_config",  # class
    "key_socket_options",  # list of (level (int), optname (int), value (int or str)) tuples
    "key__socks_options",  # dict
    "key_assert_hostname",  # bool or string
    "key_assert_fingerprint",  # str
    "key_server_hostname",  # str
)

#: The namedtuple class used to construct keys for the connection pool.
#: All custom key schemes should include the fields in this key at a minimum.
PoolKey = collections.namedtuple("PoolKey", _key_fields)

_proxy_config_fields = ("ssl_context", "use_forwarding_for_https")
ProxyConfig = collections.namedtuple("ProxyConfig", _proxy_config_fields)


def _default_key_normalizer(key_class, request_context):
    """
    Create a pool key out of a request context dictionary.

    According to RFC 3986, both the scheme and host are case-insensitive.
    Therefore, this function normalizes both before constructing the pool
    key for an HTTPS request. If you wish to change this behaviour, provide
    alternate callables to ``key_fn_by_scheme``.

    :param key_class:
        The class to use when constructing the key. This should be a namedtuple
        with the ``scheme`` and ``host`` keys at a minimum.
    :type  key_class: namedtuple
    :param request_context:
        A dictionary-like object that contain the context for a request.
    :type  request_context: dict

    :return: A namedtuple that can be used as a connection pool key.
    :rtype:  PoolKey
    """
    # Since we mutate the dictionary, make a copy first
    context = request_context.copy()
    context["scheme"] = context["scheme"].lower()
    context["host"] = context["host"].lower()

    # These are both dictionaries and need to be transformed into frozensets
    for key in ("headers", "_proxy_headers", "_socks_options"):
        if key in context and context[key] is not None:
            context[key] = frozenset(context[key].items())

    # The socket_options key may be a list and needs to be transformed into a
    # tuple.
    socket_opts = context.get("socket_options")
    if socket_opts is not None:
        context["socket_options"] = tuple(socket_opts)

    # Map the kwargs to the names in the namedtuple - this is necessary since
    # namedtuples can't have fields starting with '_'.
    for key in list(context.keys()):
        context["key_" + key] = context.pop(key)

    # Default to ``None`` for keys missing from the context
    for field in key_class._fields:
        if field not in context:
            context[field] = None

    return key_class(**context)


#: A dictionary that maps a scheme to a callable that creates a pool key.
#: This can be used to alter the way pool keys are constructed, if desired.
#: Each PoolManager makes a copy of this dictionary so they can be configured
#: globally here, or individually on the instance.
key_fn_by_scheme = {
    "http": functools.partial(_default_key_normalizer, PoolKey),
    "https": functools.partial(_default_key_normalizer, PoolKey),
}

pool_classes_by_scheme = {"http": HTTPConnectionPool, "https": HTTPSConnectionPool}


class PoolManager(RequestMethods):
    """
    Allows for arbitrary requests while transparently keeping track of
    necessary connection pools for you.

    :param num_pools:
        Number of connection pools to cache before discarding the least
        recently used pool.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param \\**connection_pool_kw:
        Additional parameters are used to create fresh
        :class:`urllib3.connectionpool.ConnectionPool` instances.

    Example::

        >>> manager = PoolManager(num_pools=2)
        >>> r = manager.request('GET', 'http://google.com/')
        >>> r = manager.request('GET', 'http://google.com/mail')
        >>> r = manager.request('GET', 'http://yahoo.com/')
        >>> len(manager.pools)
        2

    """

    proxy = None
    proxy_config = None

    def __init__(self, num_pools=10, headers=None, **connection_pool_kw):
        RequestMethods.__init__(self, headers)
        self.connection_pool_kw = connection_pool_kw
        self.pools = RecentlyUsedContainer(num_pools)

        # Locally set the pool classes and keys so other PoolManagers can
        # override them.
        self.pool_classes_by_scheme = pool_classes_by_scheme
        self.key_fn_by_scheme = key_fn_by_scheme.copy()

    def __enter__(self):
        return self

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.clear()
        # Return False to re-raise any potential exceptions
        return False

    def _new_pool(self, scheme, host, port, request_context=None):
        """
        Create a new :class:`urllib3.connectionpool.ConnectionPool` based on host, port, scheme, and
        any additional pool keyword arguments.

        If ``request_context`` is provided, it is provided as keyword arguments
        to the pool class used. This method is used to actually create the
        connection pools handed out by :meth:`connection_from_url` and
        companion methods. It is intended to be overridden for customization.
        """
        pool_cls = self.pool_classes_by_scheme[scheme]
        if request_context is None:
            request_context = self.connection_pool_kw.copy()

        # Although the context has everything necessary to create the pool,
        # this function has historically only used the scheme, host, and port
        # in the positional args. When an API change is acceptable these can
        # be removed.
        for key in ("scheme", "host", "port"):
            request_context.pop(key, None)

        if scheme == "http":
            for kw in SSL_KEYWORDS:
                request_context.pop(kw, None)

        return pool_cls(host, port, **request_context)

    def clear(self):
        """
        Empty our store of pools and direct them all to close.

        This will not affect in-flight connections, but they will not be
        re-used after completion.
        """
        self.pools.clear()

    def connection_from_host(self, host, port=None, scheme="http", pool_kwargs=None):
        """
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme.

        If ``port`` isn't given, it will be derived from the ``scheme`` using
        ``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is
        provided, it is merged with the instance's ``connection_pool_kw``
        variable and used to create the new connection pool, if one is
        needed.
        """

        if not host:
            raise LocationValueError("No host specified.")

        request_context = self._merge_pool_kwargs(pool_kwargs)
        request_context["scheme"] = scheme or "http"
        if not port:
            port = port_by_scheme.get(request_context["scheme"].lower(), 80)
        request_context["port"] = port
        request_context["host"] = host

        return self.connection_from_context(request_context)

    def connection_from_context(self, request_context):
        """
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.

        ``request_context`` must at least contain the ``scheme`` key and its
        value must be a key in ``key_fn_by_scheme`` instance variable.
        """
        scheme = request_context["scheme"].lower()
        pool_key_constructor = self.key_fn_by_scheme.get(scheme)
        if not pool_key_constructor:
            raise URLSchemeUnknown(scheme)
        pool_key = pool_key_constructor(request_context)

        return self.connection_from_pool_key(pool_key, request_context=request_context)

    def connection_from_pool_key(self, pool_key, request_context=None):
        """
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.

        ``pool_key`` should be a namedtuple that only contains immutable
        objects. At a minimum it must have the ``scheme``, ``host``, and
        ``port`` fields.
        """
        with self.pools.lock:
            # If the scheme, host, or port doesn't match existing open
            # connections, open a new ConnectionPool.
            pool = self.pools.get(pool_key)
            if pool:
                return pool

            # Make a fresh ConnectionPool of the desired type
            scheme = request_context["scheme"]
            host = request_context["host"]
            port = request_context["port"]
            pool = self._new_pool(scheme, host, port, request_context=request_context)
            self.pools[pool_key] = pool

        return pool

    def connection_from_url(self, url, pool_kwargs=None):
        """
        Similar to :func:`urllib3.connectionpool.connection_from_url`.

        If ``pool_kwargs`` is not provided and a new pool needs to be
        constructed, ``self.connection_pool_kw`` is used to initialize
        the :class:`urllib3.connectionpool.ConnectionPool`. If ``pool_kwargs``
        is provided, it is used instead. Note that if a new pool does not
        need to be created for the request, the provided ``pool_kwargs`` are
        not used.
        """
        u = parse_url(url)
        return self.connection_from_host(
            u.host, port=u.port, scheme=u.scheme, pool_kwargs=pool_kwargs
        )

    def _merge_pool_kwargs(self, override):
        """
        Merge a dictionary of override values for self.connection_pool_kw.

        This does not modify self.connection_pool_kw and returns a new dict.
        Any keys in the override dictionary with a value of ``None`` are
        removed from the merged dictionary.
        """
        base_pool_kwargs = self.connection_pool_kw.copy()
        if override:
            for key, value in override.items():
                if value is None:
                    try:
                        del base_pool_kwargs[key]
                    except KeyError:
                        pass
                else:
                    base_pool_kwargs[key] = value
        return base_pool_kwargs

    def _proxy_requires_url_absolute_form(self, parsed_url):
        """
        Indicates if the proxy requires the complete destination URL in the
        request.  Normally this is only needed when not using an HTTP CONNECT
        tunnel.
        """
        if self.proxy is None:
            return False

        return not connection_requires_http_tunnel(
            self.proxy, self.proxy_config, parsed_url.scheme
        )

    def _validate_proxy_scheme_url_selection(self, url_scheme):
        """
        Validates that were not attempting to do TLS in TLS connections on
        Python2 or with unsupported SSL implementations.
        """
        if self.proxy is None or url_scheme != "https":
            return

        if self.proxy.scheme != "https":
            return

        if six.PY2 and not self.proxy_config.use_forwarding_for_https:
            raise ProxySchemeUnsupported(
                "Contacting HTTPS destinations through HTTPS proxies "
                "'via CONNECT tunnels' is not supported in Python 2"
            )

    def urlopen(self, method, url, redirect=True, **kw):
        """
        Same as :meth:`urllib3.HTTPConnectionPool.urlopen`
        with custom cross-host redirect logic and only sends the request-uri
        portion of the ``url``.

        The given ``url`` parameter must be absolute, such that an appropriate
        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
        """
        u = parse_url(url)
        self._validate_proxy_scheme_url_selection(u.scheme)

        conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)

        kw["assert_same_host"] = False
        kw["redirect"] = False

        if "headers" not in kw:
            kw["headers"] = self.headers.copy()

        if self._proxy_requires_url_absolute_form(u):
            response = conn.urlopen(method, url, **kw)
        else:
            response = conn.urlopen(method, u.request_uri, **kw)

        redirect_location = redirect and response.get_redirect_location()
        if not redirect_location:
            return response

        # Support relative URLs for redirecting.
        redirect_location = urljoin(url, redirect_location)

        # RFC 7231, Section 6.4.4
        if response.status == 303:
            method = "GET"

        retries = kw.get("retries")
        if not isinstance(retries, Retry):
            retries = Retry.from_int(retries, redirect=redirect)

        # Strip headers marked as unsafe to forward to the redirected location.
        # Check remove_headers_on_redirect to avoid a potential network call within
        # conn.is_same_host() which may use socket.gethostbyname() in the future.
        if retries.remove_headers_on_redirect and not conn.is_same_host(
            redirect_location
        ):
            headers = list(six.iterkeys(kw["headers"]))
            for header in headers:
                if header.lower() in retries.remove_headers_on_redirect:
                    kw["headers"].pop(header, None)

        try:
            retries = retries.increment(method, url, response=response, _pool=conn)
        except MaxRetryError:
            if retries.raise_on_redirect:
                response.drain_conn()
                raise
            return response

        kw["retries"] = retries
        kw["redirect"] = redirect

        log.info("Redirecting %s -> %s", url, redirect_location)

        response.drain_conn()
        return self.urlopen(method, redirect_location, **kw)


class ProxyManager(PoolManager):
    """
    Behaves just like :class:`PoolManager`, but sends all requests through
    the defined proxy, using the CONNECT method for HTTPS URLs.

    :param proxy_url:
        The URL of the proxy to be used.

    :param proxy_headers:
        A dictionary containing headers that will be sent to the proxy. In case
        of HTTP they are being sent with each request, while in the
        HTTPS/CONNECT case they are sent only once. Could be used for proxy
        authentication.

    :param proxy_ssl_context:
        The proxy SSL context is used to establish the TLS connection to the
        proxy when using HTTPS proxies.

    :param use_forwarding_for_https:
        (Defaults to False) If set to True will forward requests to the HTTPS
        proxy to be made on behalf of the client instead of creating a TLS
        tunnel via the CONNECT method. **Enabling this flag means that request
        and response headers and content will be visible from the HTTPS proxy**
        whereas tunneling keeps request and response headers and content
        private.  IP address, target hostname, SNI, and port are always visible
        to an HTTPS proxy even when this flag is disabled.

    Example:
        >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
        >>> r1 = proxy.request('GET', 'http://google.com/')
        >>> r2 = proxy.request('GET', 'http://httpbin.org/')
        >>> len(proxy.pools)
        1
        >>> r3 = proxy.request('GET', 'https://httpbin.org/')
        >>> r4 = proxy.request('GET', 'https://twitter.com/')
        >>> len(proxy.pools)
        3

    """

    def __init__(
        self,
        proxy_url,
        num_pools=10,
        headers=None,
        proxy_headers=None,
        proxy_ssl_context=None,
        use_forwarding_for_https=False,
        **connection_pool_kw
    ):

        if isinstance(proxy_url, HTTPConnectionPool):
            proxy_url = "%s://%s:%i" % (
                proxy_url.scheme,
                proxy_url.host,
                proxy_url.port,
            )
        proxy = parse_url(proxy_url)

        if proxy.scheme not in ("http", "https"):
            raise ProxySchemeUnknown(proxy.scheme)

        if not proxy.port:
            port = port_by_scheme.get(proxy.scheme, 80)
            proxy = proxy._replace(port=port)

        self.proxy = proxy
        self.proxy_headers = proxy_headers or {}
        self.proxy_ssl_context = proxy_ssl_context
        self.proxy_config = ProxyConfig(proxy_ssl_context, use_forwarding_for_https)

        connection_pool_kw["_proxy"] = self.proxy
        connection_pool_kw["_proxy_headers"] = self.proxy_headers
        connection_pool_kw["_proxy_config"] = self.proxy_config

        super(ProxyManager, self).__init__(num_pools, headers, **connection_pool_kw)

    def connection_from_host(self, host, port=None, scheme="http", pool_kwargs=None):
        if scheme == "https":
            return super(ProxyManager, self).connection_from_host(
                host, port, scheme, pool_kwargs=pool_kwargs
            )

        return super(ProxyManager, self).connection_from_host(
            self.proxy.host, self.proxy.port, self.proxy.scheme, pool_kwargs=pool_kwargs
        )

    def _set_proxy_headers(self, url, headers=None):
        """
        Sets headers needed by proxies: specifically, the Accept and Host
        headers. Only sets headers not provided by the user.
        """
        headers_ = {"Accept": "*/*"}

        netloc = parse_url(url).netloc
        if netloc:
            headers_["Host"] = netloc

        if headers:
            headers_.update(headers)
        return headers_

    def urlopen(self, method, url, redirect=True, **kw):
        "Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute."
        u = parse_url(url)
        if not connection_requires_http_tunnel(self.proxy, self.proxy_config, u.scheme):
            # For connections using HTTP CONNECT, httplib sets the necessary
            # headers on the CONNECT to the proxy. If we're not using CONNECT,
            # we'll definitely need to set 'Host' at the very least.
            headers = kw.get("headers", self.headers)
            kw["headers"] = self._set_proxy_headers(url, headers)

        return super(ProxyManager, self).urlopen(method, url, redirect=redirect, **kw)


def proxy_from_url(url, **kw):
    return ProxyManager(proxy_url=url, **kw)
python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/__init__.cpython-312.pyc000064400000000402151732702500027127 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py�<module>rs�rpython3.12/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/makefile.cpython-312.pyc000064400000003522151732702510027154 0ustar00�

R`i���&�dZddlZddlmZ	dd�Zy)z�
backports.makefile
~~~~~~~~~~~~~~~~~~

Backports the Python 3 ``socket.makefile`` method for use with anything that
wants to create a "fake" socket object.
�N)�SocketIOc��t|�hd�kstd|�d���d|v}d|vxs|}|s|sJ�d|v}d}	|r|	dz
}	|r|	dz
}	t||	�}
|xjdz
c_|�d	}|d
krtj
}|d
k(r|std��|
S|r|rt	j|
|
|�}n3|rt	j|
|�}n|sJ�t	j|
|�}|r|St	j||||�}||_
|S)z:
    Backport of ``socket.makefile`` from Python 3.5.
    >�b�r�wz
invalid mode z (only r, w, b allowed)rrr�����rz!unbuffered streams must be binary)�set�
ValueErrorr�_makefile_refs�io�DEFAULT_BUFFER_SIZE�BufferedRWPair�BufferedReader�BufferedWriter�
TextIOWrapper�mode)
�selfr�	buffering�encoding�errors�newline�writing�reading�binary�rawmode�raw�buffer�texts
             ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py�backport_makefiler"
s.���t�9��'��T�K�L�L��T�k�G��T�k�(��[�G��g���
�D�[�F��G���3�����3���
�4��
!�C����1������	��1�}��*�*�	��A�~���@�A�A��
��7��"�"�3��Y�7��	��"�"�3�	�2����w��"�"�3�	�2��
��
�
���F�H�f�g�>�D��D�I��K�)rNNNN)�__doc__r�socketrr"�r#r!�<module>r's���
��IM�&r#site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/weakref_finalize.cpython-312.pyc000064400000016331151732702510030627 0ustar00python3.12�

R`i���L�dZddlmZddlZddlZddlmZdgZGd�de�Z	y)zd
backports.weakref_finalize
~~~~~~~~~~~~~~~~~~

Backports the Python 3 ``weakref.finalize`` method.
�)�absolute_importN)�ref�weakref_finalizec���eZdZdZdZiZdZej�Z	dZ
dZGd�de�Z
d�Zdd�Zd	�Zd
�Zed��Zed��Zej*d
��Zd�Zed��Zed��Zy)raClass for finalization of weakrefable objects
    finalize(obj, func, *args, **kwargs) returns a callable finalizer
    object which will be called when obj is garbage collected. The
    first time the finalizer is called it evaluates func(*arg, **kwargs)
    and returns the result. After this the finalizer is dead, and
    calling it just returns None.
    When the program exits any remaining finalizers for which the
    atexit attribute is true will be run in reverse order of creation.
    By default atexit is true.
    �Fc��eZdZdZy)�weakref_finalize._Info)�weakref�func�args�kwargs�atexit�indexN)�__name__�
__module__�__qualname__�	__slots__r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py�_Infor	(s��L�	rrc�Z�|js*ddl}|j|j�dt_|j�}t
||�|_||_||_	|xsd|_
d|_t|j�|_
||j|<dt_y)NrT)�_registered_with_atexitr�register�	_exitfuncrrrr
rrr
�next�_index_iterr�	_registry�_dirty)�self�objrrr
r�infos       r�__init__zweakref_finalize.__init__+s����+�+�
��O�O�D�N�N�+�7;��4��z�z�|���3��~�����	���	��n��������$�*�*�+��
�#����t��"&��rNc��|jj|d�}|r7|js*|j|ji|j
xsi��Syy)zZIf alive then mark as dead and return func(*args, **kwargs);
        otherwise return NoneN)r�pop�	_shutdownrrr
)r�_r!s   r�__call__zweakref_finalize.__call__=sM���~�~�!�!�$��-�������4�9�9�d�i�i�?�D�K�K�,=�2�?�?�'�4rc���|jj|�}|xr|j�}|�E|jj|d�r(||j|j
|jxsifSyy)z^If alive then mark as dead and return (obj, func, args, kwargs);
        otherwise return NoneN)r�getr
r$rrr
�rr!r s   r�detachzweakref_finalize.detachDsg���~�~�!�!�$�'���%�t�|�|�~���?�t�~�~�1�1�$��=�����D�I�I�t�{�{�/@�b�A�A� >�?rc��|jj|�}|xr|j�}|�(||j|j|j
xsifSy)zMIf alive then return (obj, func, args, kwargs);
        otherwise return NoneN)rr)r
rrr
r*s   r�peekzweakref_finalize.peekLsR���~�~�!�!�$�'���%�t�|�|�~���?�����D�I�I�t�{�{�/@�b�A�A�rc��||jvS)zWhether finalizer is alive)r)rs r�alivezweakref_finalize.aliveTs���t�~�~�%�%rc�j�|jj|�}t|�xr|jS)z*Whether finalizer should be called at exit�rr)�boolr)rr!s  rrzweakref_finalize.atexitYs+���~�~�!�!�$�'���D�z�)�d�k�k�)rc�`�|jj|�}|rt|�|_yy�Nr1)r�valuer!s   rrzweakref_finalize.atexit_s)���~�~�!�!�$�'����u�+�D�K�rc�,�|jj|�}|xr|j�}|�#dt|�jt|�fzSdt|�jt|�t|�jt|�fzS)Nz<%s object at %#x; dead>z!<%s object at %#x; for %r at %#x>)rr)r
�typer�idr*s   r�__repr__zweakref_finalize.__repr__es����~�~�!�!�$�'���%�t�|�|�~���;�-��d��1D�1D�b��h�0O�O�O�6��T�
�#�#��4���S�	�"�"��3��	:��
rc���|jj�D��cgc]\}}|js�||f��}}}|jd���|D��cgc]\}}|��	c}}Scc}}wcc}}w)Nc� �|djS)N�)r)�items r�<lambda>z3weakref_finalize._select_for_exit.<locals>.<lambda>vs���Q��
�
r)�key)r�itemsr�sort)�cls�f�i�Ls    r�_select_for_exitz!weakref_finalize._select_for_exitrsf��#&�-�-�"5�"5�"7�D�"7���A�1�8�8�a��V�"7��D�	���-��.� !�"��f�q�!���"�"��
E��"s�A$�A$�A*c��d}	|jr�ddl}|j�rd}|j�d}	|�tj
r|j
�}dt_|sn)|j�}	|�||jvsJ��Ydt_|rj�yy#t$r'tjtj��Y�_wxYw#dt_|rj�wwxYw)NFrT)r�gc�	isenabled�disablerrrFr$�	Exception�sys�
excepthook�exc_infor%�enable)rB�reenable_gcrH�pendingrCs     rrzweakref_finalize._exitfuncys���
��	��}�}���<�<�>�"&�K��J�J�L������*:�*A�*A�"%�"6�"6�"8��27�(�/�"�����
�A�8�
���C�M�M�1�1�1��$*.��&���	�	����
%�8��������7�8��
*.��&���	�	���s0�A5C$�:B1�C$�1-C!�C$� C!�!C$�$ Dr4)rrr�__doc__rrr%�	itertools�countrrr�objectrr"r'r+r-�propertyr/r�setterr9�classmethodrFrrrrrrs���	��I��I��I�!�)�/�/�#�K�
�F�#��M��M�'�$@�B�B��&��&��*��*�
�]�]�&��&�
��#��#��!��!r)
rR�
__future__rrSrLr
r�__all__rUrrrr�<module>r[s.���'��
���
��J�v�Jrpython3.12/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py000064400000000000151732702520022562 0ustar00python3.12/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py000064400000002611151732702520022612 0ustar00# -*- coding: utf-8 -*-
"""
backports.makefile
~~~~~~~~~~~~~~~~~~

Backports the Python 3 ``socket.makefile`` method for use with anything that
wants to create a "fake" socket object.
"""
import io
from socket import SocketIO


def backport_makefile(
    self, mode="r", buffering=None, encoding=None, errors=None, newline=None
):
    """
    Backport of ``socket.makefile`` from Python 3.5.
    """
    if not set(mode) <= {"r", "w", "b"}:
        raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,))
    writing = "w" in mode
    reading = "r" in mode or not writing
    assert reading or writing
    binary = "b" in mode
    rawmode = ""
    if reading:
        rawmode += "r"
    if writing:
        rawmode += "w"
    raw = SocketIO(self, rawmode)
    self._makefile_refs += 1
    if buffering is None:
        buffering = -1
    if buffering < 0:
        buffering = io.DEFAULT_BUFFER_SIZE
    if buffering == 0:
        if not binary:
            raise ValueError("unbuffered streams must be binary")
        return raw
    if reading and writing:
        buffer = io.BufferedRWPair(raw, raw, buffering)
    elif reading:
        buffer = io.BufferedReader(raw, buffering)
    else:
        assert writing
        buffer = io.BufferedWriter(raw, buffering)
    if binary:
        return buffer
    text = io.TextIOWrapper(buffer, encoding, errors, newline)
    text.mode = mode
    return text
python3.12/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py000064400000012337151732702520024350 0ustar00# -*- coding: utf-8 -*-
"""
backports.weakref_finalize
~~~~~~~~~~~~~~~~~~

Backports the Python 3 ``weakref.finalize`` method.
"""
from __future__ import absolute_import

import itertools
import sys
from weakref import ref

__all__ = ["weakref_finalize"]


class weakref_finalize(object):
    """Class for finalization of weakrefable objects
    finalize(obj, func, *args, **kwargs) returns a callable finalizer
    object which will be called when obj is garbage collected. The
    first time the finalizer is called it evaluates func(*arg, **kwargs)
    and returns the result. After this the finalizer is dead, and
    calling it just returns None.
    When the program exits any remaining finalizers for which the
    atexit attribute is true will be run in reverse order of creation.
    By default atexit is true.
    """

    # Finalizer objects don't have any state of their own.  They are
    # just used as keys to lookup _Info objects in the registry.  This
    # ensures that they cannot be part of a ref-cycle.

    __slots__ = ()
    _registry = {}
    _shutdown = False
    _index_iter = itertools.count()
    _dirty = False
    _registered_with_atexit = False

    class _Info(object):
        __slots__ = ("weakref", "func", "args", "kwargs", "atexit", "index")

    def __init__(self, obj, func, *args, **kwargs):
        if not self._registered_with_atexit:
            # We may register the exit function more than once because
            # of a thread race, but that is harmless
            import atexit

            atexit.register(self._exitfunc)
            weakref_finalize._registered_with_atexit = True
        info = self._Info()
        info.weakref = ref(obj, self)
        info.func = func
        info.args = args
        info.kwargs = kwargs or None
        info.atexit = True
        info.index = next(self._index_iter)
        self._registry[self] = info
        weakref_finalize._dirty = True

    def __call__(self, _=None):
        """If alive then mark as dead and return func(*args, **kwargs);
        otherwise return None"""
        info = self._registry.pop(self, None)
        if info and not self._shutdown:
            return info.func(*info.args, **(info.kwargs or {}))

    def detach(self):
        """If alive then mark as dead and return (obj, func, args, kwargs);
        otherwise return None"""
        info = self._registry.get(self)
        obj = info and info.weakref()
        if obj is not None and self._registry.pop(self, None):
            return (obj, info.func, info.args, info.kwargs or {})

    def peek(self):
        """If alive then return (obj, func, args, kwargs);
        otherwise return None"""
        info = self._registry.get(self)
        obj = info and info.weakref()
        if obj is not None:
            return (obj, info.func, info.args, info.kwargs or {})

    @property
    def alive(self):
        """Whether finalizer is alive"""
        return self in self._registry

    @property
    def atexit(self):
        """Whether finalizer should be called at exit"""
        info = self._registry.get(self)
        return bool(info) and info.atexit

    @atexit.setter
    def atexit(self, value):
        info = self._registry.get(self)
        if info:
            info.atexit = bool(value)

    def __repr__(self):
        info = self._registry.get(self)
        obj = info and info.weakref()
        if obj is None:
            return "<%s object at %#x; dead>" % (type(self).__name__, id(self))
        else:
            return "<%s object at %#x; for %r at %#x>" % (
                type(self).__name__,
                id(self),
                type(obj).__name__,
                id(obj),
            )

    @classmethod
    def _select_for_exit(cls):
        # Return live finalizers marked for exit, oldest first
        L = [(f, i) for (f, i) in cls._registry.items() if i.atexit]
        L.sort(key=lambda item: item[1].index)
        return [f for (f, i) in L]

    @classmethod
    def _exitfunc(cls):
        # At shutdown invoke finalizers for which atexit is true.
        # This is called once all other non-daemonic threads have been
        # joined.
        reenable_gc = False
        try:
            if cls._registry:
                import gc

                if gc.isenabled():
                    reenable_gc = True
                    gc.disable()
                pending = None
                while True:
                    if pending is None or weakref_finalize._dirty:
                        pending = cls._select_for_exit()
                        weakref_finalize._dirty = False
                    if not pending:
                        break
                    f = pending.pop()
                    try:
                        # gc is disabled, so (assuming no daemonic
                        # threads) the following is the only line in
                        # this function which might trigger creation
                        # of a new finalizer
                        f()
                    except Exception:
                        sys.excepthook(*sys.exc_info())
                    assert f not in cls._registry
        finally:
            # prevent any more finalizers from executing during shutdown
            weakref_finalize._shutdown = True
            if reenable_gc:
                gc.enable()
python3.12/site-packages/pip/_vendor/urllib3/packages/__pycache__/__init__.cpython-312.pyc000064400000000370151732702530025146 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__init__.py�<module>rs�rpython3.12/site-packages/pip/_vendor/urllib3/packages/__pycache__/six.cpython-312.pyc000064400000120530151732702530024213 0ustar00�

R`ii���N�dZddlmZddlZddlZddlZddlZddlZdZdZ	ejddk(Zejddk(Zejdddk\Z
erefZefZefZeZeZej.Zn_efZeefZeej6fZeZeZej:j=d	�r	ed
�Zn"Gd�de�Z 	e!e ��ed
�Z[ e
rddl#m$Z$ndZ$d�Z%d�Z&Gd�de�Z'Gd�de'�Z(Gd�dejR�Z*Gd�de'�Z+Gd�de�Z,e,e-�Z.Gd�de*�Z/ge+dddd��e+d d!d"d#d ��e+d$d!d!d%d$��e+d&d'd"d(d&��e+d)d'd*��e+d+d!d"d,d+��e+d-d.d.d/d-��e+d0d.d.d-d0��e+d1d2d3��e+d4d'd"d5d4��e+d6d'e
rd7nd8d9��e+d:d'd;��e+d<d=d>d?��e+ddd��e+d@d@dA��e+dBdBdA��e+dCdCdA��e+d5d'd"d5d4��e+dDd!d"dEdD��e+dFd!d!dGdF��e(d"d'��e(dHdI��e(dJdAejdKk\rdLndA��e(dMdN��e(dOdPdQ��e(dRdSdT��e(dUdVejdWkrdUndX��e(dYdZd[��e(d\d]d^��e(d_d`da��e(dbdcdd��e(dedfdg��e(dhdidj��e(dkdldm��e(dndodp��e(dqdrds��e(dtdudv��e(dwdwdx��e(dydydx��e(dzdzdx��e(d{d{d|��e(d}d~��e(dd���e(d�d���e(dXd�dX��e(d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�d�d���e(d�e-d�zd���e(d�e-d�zd���e(d�e-d�ze-d�z��e(d�d�d���e(d�d�d���e(d�d�d���Z0ej:d�k(r
e0e(d�d��gz
Z0e0D]?Z1e2e/e1jfe1�e4e1e(�s�!e.jke1d�e1jfz��A[1e0e/_0e/e-d�z�Z6e.jke6dīGdńd�e*�Z7e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d?d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d�d�dԫe+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��gZ8e8D]Z1e2e7e1jfe1��[1e8e7_0e.jke7e-d�z�d�d�Gd�d�e*�Z9e+d�d�d��e+d�d�d��e+d�d�d��gZ:e:D]Z1e2e9e1jfe1��[1e:e9_0e.jke9e-d�z�d�d�Gd�d�e*�Z;ge+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+d�d�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�dd�d��e+�d	d�d��e+�d
d�d��e+�dd�d��e+�dd�d��e+�d
d�d��e+�dd�d��e+�dd�d��Z<e<D]Z1e2e;e1jfe1��[1e<e;_0e.jke;e-�dz��d�d�G�d��de*�Z=e+�dd��d�e+�dd��d�e+�dd��d�e+�dd��d�gZ>e>D]Z1e2e=e1jfe1��[1e>e=_0e.jke=e-�dz��d�d�G�d��de*�Z?e+�dd�d��gZ@e@D]Z1e2e?e1jfe1��[1e@e?_0e.jke?e-�d z��d!�d"�G�d#��d$ejR�ZAe.jkeAe-d�z��d%��d&�ZB�d'�ZCer�d(ZD�d)ZE�d*ZF�d+ZG�d,ZH�d-ZIn�d.ZD�d/ZE�d0ZF�d1ZG�d2ZH�d3ZI	eJZKeKZJ	eMZMer�d6�ZNej�ZP�d7�ZQeZRn�d8�ZN�d9�ZP�d:�ZQG�d;��d<e�ZReMZMe%eN�d=�ej�eD�ZTej�eE�ZUej�eF�ZVej�eG�ZWej�eH�ZXej�eI�ZYerJ�d>�ZZ�d?�Z[�d@�Z\�dA�Z]ej��dB�Z_ej��dC�Z`ej��dD�ZanI�dE�ZZ�dF�Z[�dG�Z\�dH�Z]ej��dI�Z_ej��dJ�Z`ej��dK�Zae%eZ�dL�e%e[�dM�e%e\�dN�e%e]�dO�er��dP�Zb�dQ�ZcedZeddlfZfefj��dR�j�Zi[fej�d�Zkej�ZmenZoddlpZpepj�Zqepj�Zr[p�dSZsej�dT�dTkr
�dUZt�dVZu�dWZvnY�dXZt�dYZu�dZZvnO�d[�Zb�d\�ZceeZeedZi�d]�Zk�d^�Zmej�ej�ey�ZoddlqZqeqj�xZqZr�d_Zs�dUZt�dVZu�dWZve%eb�d`�e%ec�da��db�Zz�dc�Z{�dd�Z|�de�Z}ere~e6j��df�Z��dz�dg�Z�n�d{�dh�Z�e��di�ejdd�djkDr
e��dk�n�dl�Z�e~e6j��dmd�Z�e���dn�Z�ejdddKkre�Z��do�Z�e%e��dp�ejdddkrse�j
e�jf�dq�Z�e�jje�_e�j
e�jf�dr�Z�e�jje�_n
e�jZ��ds�Z��dt�Z��d|�du�Z��d|�dv�Z��d|�dw�Z��dx�Z�gZ�e-Z�e���j'�dy��ge�_�e�j,rRe�e�j,�D]:\Z�Z�ee��jZdk(s�e�jfe-k(s�,e�j,e�=n[�[�e�j,�j5e.�y#e"$red
�ZY���wxYw#eL$r�d4�ZKY��owxYw#eL$r�d5�ZMY��zwxYw(}z6Utilities for writing code that runs on Python 2 and 3�)�absolute_importNz'Benjamin Peterson <benjamin@python.org>z1.16.0��)r��javai���c��eZdZd�Zy)�Xc��y)Nl���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/six.py�__len__z	X.__len__=s���N)�__name__�
__module__�__qualname__rrrrr	r	<s��
rr	l����)�spec_from_loaderc��||_y)z Add documentation to a function.N)�__doc__)�func�docs  r�_add_docrPs	���D�Lrc�>�t|�tj|S)z7Import module, returning the module after the last dot.)�
__import__�sys�modules��names r�_import_moduler Us���t���;�;�t��rc��eZdZd�Zd�Zy)�
_LazyDescrc��||_y�Nr)r
rs  r�__init__z_LazyDescr.__init__\s	����	rc��|j�}t||j|�	t|j|j�|S#t
$rY|SwxYwr$)�_resolve�setattrr�delattr�	__class__�AttributeError)r
�obj�tp�results    r�__get__z_LazyDescr.__get___sV���������T�Y�Y��'�	�
�C�M�M�4�9�9�-��
���	���
�	�s� A�	A�AN)rrrr%r/rrrr"r"[s���	rr"c�,��eZdZd�fd�	Zd�Zd�Z�xZS)�MovedModulec�^��tt|�|�tr|�|}||_y||_yr$)�superr1r%�PY3�mod)r
r�old�newr*s    �rr%zMovedModule.__init__ls-���
�k�4�)�$�/���{����D�H��D�Hrc�,�t|j�Sr$)r r5rs rr'zMovedModule._resolveus���d�h�h�'�'rc�X�|j�}t||�}t|||�|Sr$)r'�getattrr()r
�attr�_module�values    r�__getattr__zMovedModule.__getattr__xs*���-�-�/�����&����d�E�"��rr$)rrrr%r'r>�
__classcell__�r*s@rr1r1ks����(�rr1c�(��eZdZ�fd�Zd�ZgZ�xZS)�_LazyModulec�b��tt|�|�|jj|_yr$)r3rBr%r*r)r
rr*s  �rr%z_LazyModule.__init__�s#���
�k�4�)�$�/��~�~�-�-��rc�f�ddg}||jD�cgc]}|j��c}z
}|Scc}w)Nrr)�_moved_attributesr)r
�attrsr;s   r�__dir__z_LazyModule.__dir__�s<���J�'��
��(>�(>�?�(>��$�)�)�(>�?�?�����@s�.)rrrr%rGrEr?r@s@rrBrBs���.���rrBc�&��eZdZd�fd�	Zd�Z�xZS)�MovedAttributec���tt|�|�tr#|�|}||_|�|�
|}||_y|}||_y||_|�|}||_yr$)r3rIr%r4r5r;)r
r�old_mod�new_mod�old_attr�new_attrr*s      �rr%zMovedAttribute.__init__�sg���
�n�d�,�T�2�������D�H����#�#�H�!�D�I� (�H� �D�I��D�H����� �D�Irc�X�t|j�}t||j�Sr$)r r5r:r;�r
�modules  rr'zMovedAttribute._resolve�s!������)���v�t�y�y�)�)r�NN)rrrr%r'r?r@s@rrIrI�s
���!�$*rrIc�Z�eZdZdZd�Zd�Zd�Zdd�Zdd�Zd�Z	d	�Z
d
�Zd�ZeZ
d�Zd
�Zy)�_SixMetaPathImporterz�
    A meta path importer to import six.moves and its submodules.

    This class implements a PEP302 finder and loader. It should be compatible
    with Python 2.5 and all existing versions of Python3
    c� �||_i|_yr$)r�
known_modules)r
�six_module_names  rr%z_SixMetaPathImporter.__init__�s��#��	���rc�P�|D]!}||j|jdz|z<�#y�N�.�rVr)r
r5�	fullnames�fullnames    r�_add_modulez _SixMetaPathImporter._add_module�s)��!�H�=@�D���t�y�y�3���9�:�"rc�@�|j|jdz|zSrYr[�r
r]s  r�_get_modulez _SixMetaPathImporter._get_module�s ���!�!�$�)�)�c�/�H�"<�=�=rNc�$�||jvr|Syr$)rV)r
r]�paths   r�find_modulez _SixMetaPathImporter.find_module�s���t�)�)�)��K�rc�8�||jvrt||�Syr$)rVr)r
r]rc�targets    r�	find_specz_SixMetaPathImporter.find_spec�s ���t�)�)�)�#�H�d�3�3�rc�X�	|j|S#t$rtd|z��wxYw)Nz!This loader does not know module )rV�KeyError�ImportErrorr`s  r�__get_modulez!_SixMetaPathImporter.__get_module�s;��	N��%�%�h�/�/���	N��A�H�L�M�M�	N�s��)c���	tj|S#t$rYnwxYw|j|�}t	|t
�r|j
�}n||_|tj|<|Sr$)rrri� _SixMetaPathImporter__get_module�
isinstancer1r'�
__loader__)r
r]r5s   r�load_modulez _SixMetaPathImporter.load_module�sg��	��;�;�x�(�(���	��	������)���c�;�'��,�,�.�C�!�C�N� #����H���
s��	!�!c�8�t|j|�d�S)z�
        Return true, if the named module is a package.

        We need this method to get correct spec objects with
        Python 3.4 (see PEP451)
        �__path__)�hasattrrmr`s  r�
is_packagez_SixMetaPathImporter.is_package�s���t�(�(��2�J�?�?rc�&�|j|�y)z;Return None

        Required, if is_package is implementedN)rmr`s  r�get_codez_SixMetaPathImporter.get_code�s��	
���(�#�rc�8�|j|j�Sr$)rpr)r
�specs  r�
create_modulez"_SixMetaPathImporter.create_module�s������	�	�*�*rc��yr$rrPs  r�exec_modulez _SixMetaPathImporter.exec_module�s��rr$)rrrrr%r^rardrgrmrprtrv�
get_sourceryr{rrrrTrT�sH��� �A�>��
�
N��@���J�+�
rrTc��eZdZdZgZy)�_MovedItemszLazy loading of moved objectsN)rrrrrrrrrr~r~�s
��'��Hrr~�	cStringIO�io�StringIO�filter�	itertools�builtins�ifilter�filterfalse�ifilterfalse�input�__builtin__�	raw_input�internr�map�imap�getcwd�os�getcwdu�getcwdb�	getoutput�commands�
subprocess�range�xrange�
reload_module�	importlib�imp�reload�reduce�	functools�shlex_quote�pipes�shlex�quote�UserDict�collections�UserList�
UserString�zip�izip�zip_longest�izip_longest�configparser�ConfigParser�collections_abc)rrzcollections.abc�copyreg�copy_reg�dbm_gnu�gdbmzdbm.gnu�dbm_ndbm�dbmzdbm.ndbm�
_dummy_thread�dummy_thread)r�	�_thread�http_cookiejar�	cookielibzhttp.cookiejar�http_cookies�Cookiezhttp.cookies�
html_entities�htmlentitydefsz
html.entities�html_parser�
HTMLParserzhtml.parser�http_client�httplibzhttp.client�email_mime_basezemail.MIMEBasezemail.mime.base�email_mime_imagezemail.MIMEImagezemail.mime.image�email_mime_multipartzemail.MIMEMultipartzemail.mime.multipart�email_mime_nonmultipartzemail.MIMENonMultipartzemail.mime.nonmultipart�email_mime_textzemail.MIMETextzemail.mime.text�BaseHTTPServerzhttp.server�
CGIHTTPServer�SimpleHTTPServer�cPickle�pickle�queue�Queue�reprlib�repr�socketserver�SocketServer�thread�tkinter�Tkinter�tkinter_dialog�Dialogztkinter.dialog�tkinter_filedialog�
FileDialogztkinter.filedialog�tkinter_scrolledtext�ScrolledTextztkinter.scrolledtext�tkinter_simpledialog�SimpleDialogztkinter.simpledialog�tkinter_tix�Tixztkinter.tix�tkinter_ttk�ttkztkinter.ttk�tkinter_constants�Tkconstantsztkinter.constants�tkinter_dnd�Tkdndztkinter.dnd�tkinter_colorchooser�tkColorChooserztkinter.colorchooser�tkinter_commondialog�tkCommonDialogztkinter.commondialog�tkinter_tkfiledialog�tkFileDialog�tkinter_font�tkFontztkinter.font�tkinter_messagebox�tkMessageBoxztkinter.messagebox�tkinter_tksimpledialog�tkSimpleDialog�urllib_parsez.moves.urllib_parsezurllib.parse�urllib_errorz.moves.urllib_errorzurllib.error�urllibz
.moves.urllib�urllib_robotparser�robotparserzurllib.robotparser�
xmlrpc_client�	xmlrpclibz
xmlrpc.client�
xmlrpc_server�SimpleXMLRPCServerz
xmlrpc.server�win32�winreg�_winregzmoves.z.moves�movesc��eZdZdZy)�Module_six_moves_urllib_parsez7Lazy loading of moved objects in six.moves.urllib_parseN�rrrrrrrr�r�`���Arr��ParseResult�urlparse�SplitResult�parse_qs�	parse_qsl�	urldefrag�urljoin�urlsplit�
urlunparse�
urlunsplit�
quote_plus�unquote�unquote_plus�unquote_to_bytes�	urlencode�
splitquery�splittag�	splituser�
splitvalue�
uses_fragment�uses_netloc�uses_params�
uses_query�
uses_relative�moves.urllib_parsezmoves.urllib.parsec��eZdZdZy)�Module_six_moves_urllib_errorz7Lazy loading of moved objects in six.moves.urllib_errorNr�rrrrr�r�rr�URLError�urllib2�	HTTPError�ContentTooShortErrorz.moves.urllib.error�moves.urllib_errorzmoves.urllib.errorc��eZdZdZy)�Module_six_moves_urllib_requestz9Lazy loading of moved objects in six.moves.urllib_requestNr�rrrr!r!�s��Crr!�urlopenzurllib.request�install_opener�build_opener�pathname2url�url2pathname�
getproxies�Request�OpenerDirector�HTTPDefaultErrorHandler�HTTPRedirectHandler�HTTPCookieProcessor�ProxyHandler�BaseHandler�HTTPPasswordMgr�HTTPPasswordMgrWithDefaultRealm�AbstractBasicAuthHandler�HTTPBasicAuthHandler�ProxyBasicAuthHandler�AbstractDigestAuthHandler�HTTPDigestAuthHandler�ProxyDigestAuthHandler�HTTPHandler�HTTPSHandler�FileHandler�
FTPHandler�CacheFTPHandler�UnknownHandler�HTTPErrorProcessor�urlretrieve�
urlcleanup�	URLopener�FancyURLopener�proxy_bypass�parse_http_list�parse_keqv_listz.moves.urllib.request�moves.urllib_requestzmoves.urllib.requestc��eZdZdZy)� Module_six_moves_urllib_responsez:Lazy loading of moved objects in six.moves.urllib_responseNr�rrrrGrG�s��DrrG�addbasezurllib.response�addclosehook�addinfo�
addinfourlz.moves.urllib.response�moves.urllib_responsezmoves.urllib.responsec��eZdZdZy)�#Module_six_moves_urllib_robotparserz=Lazy loading of moved objects in six.moves.urllib_robotparserNr�rrrrNrN�s��GrrN�RobotFileParserz.moves.urllib.robotparser�moves.urllib_robotparserzmoves.urllib.robotparserc���eZdZdZgZej
d�Zej
d�Zej
d�Z	ej
d�Z
ej
d�Zd�Zy)	�Module_six_moves_urllibzICreate a six.moves.urllib namespace that resembles the Python 3 namespacerrrErLrPc�
�gd�S)N)�parse�error�request�responser�rrs rrGzModule_six_moves_urllib.__dir__s��G�GrN)
rrrrrr�	_importerrarTrUrVrWr�rGrrrrRrRse��S��H��!�!�"6�7�E��!�!�"6�7�E��#�#�$:�;�G��$�$�%<�=�H��'�'�(B�C�K�HrrRzmoves.urllibc�:�tt|j|�y)zAdd an item to six.moves.N)r(r~r)�moves r�add_mover[ s���K����D�)rc��	tt|�y#t$r0	tj|=Yy#t
$rtd|����wxYwwxYw)zRemove item from six.moves.zno such move, N)r)r~r+r��__dict__rirs r�remove_mover^%sN��?���T�"���?�	?����t�$���	?� �t�!=�>�>�	?��?�s��	A�0�A�A�__func__�__self__�__closure__�__code__�__defaults__�__globals__�im_func�im_self�func_closure�	func_code�
func_defaults�func_globalsc�"�|j�Sr$)�next)�its r�advance_iteratorrnFs���w�w�y�rc�L�td�t|�jD��S)Nc3�8K�|]}d|jv���y�w)�__call__N)r])�.0�klasss  r�	<genexpr>zcallable.<locals>.<genexpr>Rs����O�=N�E�:����/�=N�s�)�any�type�__mro__)r,s r�callablerxQs���O�T�#�Y�=N�=N�O�O�Orc��|Sr$r��unbounds r�get_unbound_functionr|Ws���rc��|Sr$r�r�clss  r�create_unbound_methodr�\s���rc��|jSr$)rerzs rr|r|bs�����rc�D�tj|||j�Sr$)�types�
MethodTyper*)rr,s  r�create_bound_methodr�es������c�3�=�=�9�9rc�0�tj|d|�Sr$)r�r�r~s  rr�r�hs������d�C�0�0rc��eZdZd�Zy)�Iteratorc�6�t|�j|�Sr$)rv�__next__rs rrlz
Iterator.nextls����:�&�&�t�,�,rN)rrrrlrrrr�r�ks��	-rr�z3Get the function out of a possibly unbound functionc�8�t|jdi|���S�Nr)�iter�keys��d�kws  r�iterkeysr�s���F�A�F�F�L�R�L�!�!rc�8�t|jdi|���Sr�)r��valuesr�s  r�
itervaluesr��s���H�A�H�H�N�r�N�#�#rc�8�t|jdi|���Sr�)r��itemsr�s  r�	iteritemsr������G�A�G�G�M�b�M�"�"rc�8�t|jdi|���Sr�)r��listsr�s  r�	iterlistsr��r�rr�r�r�c�&�|jdi|��Sr�)r�r�s  rr�r��s���q�z�z��B��rc�&�|jdi|��Sr�)r�r�s  rr�r��s���q�|�|�!�b�!�!rc�&�|jdi|��Sr�)r�r�s  rr�r������q�{�{� �R� � rc�&�|jdi|��Sr�)r�r�s  rr�r��r�r�viewkeys�
viewvalues�	viewitemsz1Return an iterator over the keys of a dictionary.z3Return an iterator over the values of a dictionary.z?Return an iterator over the (key, value) pairs of a dictionary.zBReturn an iterator over the (key, [values]) pairs of a dictionary.c�$�|jd�S)Nzlatin-1)�encode��ss r�br��s���x�x�	�"�"rc��|Sr$rr�s r�ur������rz>B�assertCountEqual��assertRaisesRegexp�assertRegexpMatches�assertNotRegexpMatches�assertRaisesRegex�assertRegex�assertNotRegexc��|Sr$rr�s rr�r��r�rc�:�t|jdd�d�S)Nz\\z\\\\�unicode_escape)�unicode�replacer�s rr�r��s���q�y�y���0�2B�C�Crc��t|d�S)Nr��ord)�bss r�byte2intr��s���2�a�5�z�rc��t||�Sr$r�)�buf�is  r�
indexbytesr��s���3�q�6�{�r�assertItemsEqualzByte literalzText literalc�.�t|t�|i|��Sr$)r:�_assertCountEqual�r
�args�kwargss   rr�r��s��+�7�4�*�+�T�<�V�<�<rc�.�t|t�|i|��Sr$)r:�_assertRaisesRegexr�s   rr�r��s��,�7�4�+�,�d�=�f�=�=rc�.�t|t�|i|��Sr$)r:�_assertRegexr�s   rr�r��s��&�7�4��&��7��7�7rc�.�t|t�|i|��Sr$)r:�_assertNotRegexr�s   rr�r��s��)�7�4��)�4�:�6�:�:r�execc�j�	|�|�}|j|ur|j|��|�#d}d}wxYwr$)�
__traceback__�with_traceback)r-r=�tbs   r�reraiser��sC��	��}�����"�"�"�,��*�*�2�.�.��K���E��B�s�*,�2c��|�1tjd�}|j}|�|j}~n|�|}t	d�y)zExecute code in a namespace.Nr�zexec _code_ in _globs_, _locs_)r�	_getframe�	f_globals�f_localsr�)�_code_�_globs_�_locs_�frames    r�exec_r�	sB���?��M�M�!�$�E��o�o�G��~������
�^��F��2�3rzedef reraise(tp, value, tb=None):
    try:
        raise tp, value, tb
    finally:
        tb = None
)rzrdef raise_from(value, from_value):
    try:
        raise value from from_value
    finally:
        value = None
c��|�r$r)r=�
from_values  r�
raise_fromr�*s���r�printc�Z�
�|jdtj��
�
�y�
fd�}d}|jdd�}|�.t|t�rd}nt|t
�st
d��|jdd�}|�.t|t�rd}nt|t
�st
d	��|rt
d
��|s|D]}t|t�s�d}n|rt	d�}t	d�}nd}d}|�|}|�|}t|�D]\}	}|	r||�||��||�y)
z4The new-style print function for Python 2.4 and 2.5.�fileNc���t|t�st|�}t�t�rIt|t�r9�j
�-t
�dd�}|�d}|j�j
|�}�j|�y)N�errors�strict)	rn�
basestring�strr�r��encodingr:r��write)�datar��fps  �rr�zprint_.<locals>.write7sm����d�J�/��4�y���2�t�$��t�W�-��K�K�+� ��X�t�4���>�%�F��{�{�2�;�;��7���H�H�T�NrF�sepTzsep must be None or a string�endzend must be None or a stringz$invalid keyword arguments to print()�
� )�popr�stdoutrnr�r��	TypeError�	enumerate)r�r�r��want_unicoder�r��arg�newline�spacer�r�s          @r�print_r�1s.���
�Z�Z���
�
�
+��
�:��
	����j�j���%���?��#�w�'�#����S�)�� >�?�?��j�j���%���?��#�w�'�#����S�)�� >�?�?���B�C�C�����c�7�+�#'�L�����d�m�G��C�L�E��G��E��;��C��;��C���o�F�A�s���c�
��#�J�&�	�c�
rc��|jdtj�}|jdd�}t	|i|��|r|�|j�yyy)Nr��flushF)�getrr�r��_printr�)r�r�r�r�s    rr�r�nsJ��
�Z�Z���
�
�
+���
�
�7�E�*��������R�^��H�H�J�$�5rzReraise an exception.c���|D]}	t||�}t|||��|D](}t||�jt||i���*||_|S#t$rY�`wxYwr$)r:r(r+�update�__wrapped__)�wrapper�wrapped�assigned�updatedr;r=s      r�_update_wrapperr~sx���D�
.����.�����u�-�
��D��G�T�"�)�)�'�'�4��*D�E��%������"�
��
�s�A�	A$�#A$c�<�tjt|||��S)N�rrr)r��partialrrs   r�wrapsr	�s ��
� � ��W�x��
�	
rc�Z���G��fd�dt�}tj|ddi�S)z%Create a base class with a metaclass.c�0��eZdZ��fd�Ze��fd��Zy)�!with_metaclass.<locals>.metaclassc���tjdddk\rtj��}|�ur�|d<n�}�|||�S)Nr)r��__orig_bases__)r�version_infor��
resolve_bases)rr�
this_basesr��resolved_bases�bases�metas     ��r�__new__z)with_metaclass.<locals>.metaclass.__new__�sQ��������#�v�-�"'�!4�!4�U�!;��!��.�*/�A�&�'�!&����n�a�0�0rc�(���j|��Sr$)�__prepare__)rrrrrs   ��rrz-with_metaclass.<locals>.metaclass.__prepare__�s����#�#�D�%�0�0rN)rrrr�classmethodr)rrs��r�	metaclassr�s���		1�
�	1�
�	1rr�temporary_classr)rvr)rrrs`` r�with_metaclassr�s'���
1�D�1� �<�<�	�#4�b�"�=�=rc����fd�}|S)z6Class decorator for creating a class with a metaclass.c�n��|jj�}|jd�}|�+t|t�r|g}|D]}|j|��|jdd�|jdd�t
|d�r|j|d<�|j|j|�S)N�	__slots__r]�__weakref__r)
r]�copyr�rnr�r�rsrr�	__bases__)r�	orig_vars�slots�	slots_varrs    �rrzadd_metaclass.<locals>.wrapper�s�����L�L�%�%�'�	��
�
�k�*�����%��%����"�	��
�
�i�(�#��
�
�j�$�'��
�
�m�T�*��3��'�(+�(8�(8�I�n�%�����s�}�}�i�@�@rr)rrs` r�
add_metaclassr&�s���A��Nrc��t|t�r|St|t�r|j||�St	dt|�z��)z�Coerce **s** to six.binary_type.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> encoded to `bytes`
      - `bytes` -> `bytes`
    �not expecting type '%s')rn�binary_type�	text_typer�r�rv�r�r�r�s   r�
ensure_binaryr,�sC���!�[�!����!�Y���x�x��&�)�)�
�-��Q��7�
8�8rc�&�t|�tur|Str"t|t�r|j||�Str"t|t�r|j||�St|ttf�stdt|�z��|S)z�Coerce *s* to `str`.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    r()
rvr��PY2rnr*r�r4r)�decoder�r+s   r�
ensure_strr0�sw���A�w�#�~���
�z�!�Y�'��x�x��&�)�)�	��A�{�+��x�x��&�)�)�
��I�{�3�
4��1�D��G�;�<�<��Hrc��t|t�r|j||�St|t�r|St	dt|�z��)z�Coerce *s* to six.text_type.

    For Python 2:
      - `unicode` -> `unicode`
      - `str` -> `unicode`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    r()rnr)r/r*r�rvr+s   r�ensure_textr2�sC���!�[�!��x�x��&�)�)�	�A�y�	!����1�D��G�;�<�<rc��tr?d|jvrtd|jz��|j|_d�|_|S)a
    A class decorator that defines __unicode__ and __str__ methods under Python 2.
    Under Python 3 it does nothing.

    To support Python 2 and 3 with a single code base, define a __str__ method
    returning text and apply this decorator to the class.
    �__str__zY@python_2_unicode_compatible cannot be applied to %s because it doesn't define __str__().c�@�|j�jd�S)N�utf-8)�__unicode__r�rs r�<lambda>z-python_2_unicode_compatible.<locals>.<lambda>s��T�%5�%5�%7�%>�%>�w�%Gr)r.r]�
ValueErrorrr4r7)rss r�python_2_unicode_compatibler:	sL����E�N�N�*��=�?D�~�~�N��
�"�M�M���G��
��Lr�__spec__r$rR)r6r�)�r�
__future__rr�r��operatorrr��
__author__�__version__rr.r4�PY34r��string_types�int�
integer_typesrv�class_typesr*�bytesr)�maxsize�MAXSIZEr��long�	ClassTyper��platform�
startswith�objectr	�len�
OverflowError�importlib.utilrrr r"r1�
ModuleTyperBrIrTrrXr~rEr;r(rrnr^r�r��_urllib_parse_moved_attributesr�_urllib_error_moved_attributesr!� _urllib_request_moved_attributesrG�!_urllib_response_moved_attributesrN�$_urllib_robotparser_moved_attributesrRr[r^�
_meth_func�
_meth_self�
_func_closure�
_func_code�_func_defaults�
_func_globalsrlrn�	NameErrorrxr|r�r�r�r��
attrgetter�get_method_function�get_method_self�get_function_closure�get_function_code�get_function_defaults�get_function_globalsr�r�r�r��methodcallerr�r�r�r�r��chr�unichr�struct�Struct�pack�int2byte�
itemgetterr��getitemr�r��	iterbytesr�r��BytesIOr�r�r�r�rr�r�r�r�r�r�r:r�r�r�r�r�r��WRAPPER_ASSIGNMENTS�WRAPPER_UPDATESr�update_wrapperr	rr&r,r0r2r:rr�__package__�globalsr�r;�submodule_search_locations�	meta_pathr�r��importer�appendrrr�<module>rxs��*=�&����
��
6�
���
���q��Q���	���q��Q���
����!���&����6�L��F�M��'�K��I��K��k�k�G��=�L��$�K�M�����)�K��I��K�
�|�|���v�&��m�$��	��	�	)����H��-�(�G�
��/����
�
��
� �*��(�%�"�"��*�Z�*�0H
�6�H
�V
!��*�	��+��S��;��T�:�>�S��8�[�*�i��J�S���{�K����S��7�M�:�{�G�L�
S��8�]�E�2�S��5�+�z�6�5�A�S��8�T�4��H�=�S��9�d�D�(�I�>�S��;�
�L�9�S��7�M�:�x��I�S����t�����S� �8�]�K�8�!S�"�=�'�7�G�<�#S�$�:�z�4�0�%S�&�:�z�=�9�'S�(�:�z�=�9�)S�*�<��}�=�+S�,�8�]�J��'�J�-S�.�5�+�z�6�5�A�/S�0��{�K����1S�6�
�M�*�7S�8���/�9S�:��� �-�-��7��]��;S�D�	�:�&�ES�F�	�6�9�-�GS�H�
�E�:�.�IS�J����+�+�f�4��)��KS�T� �+�/?�@�US�V���.�9�WS�X��!1�?�C�YS�Z�
�|�]�;�[S�\�
�y�-�8�]S�^�!�#3�5F�G�_S�`�"�$5�7I�J�aS�b�&�(=�?U�V�cS�d�!�#;�=V��eS�j�!�#3�5F�G�kS�l� �"2�M�B�mS�n���-�@�oS�p�"�$6�
�F�qS�r�	�9�h�/�sS�t���!�uS�v�	�6�"�wS�x���/�yS�z�	�8�Y�/�{S�|�	�9�%�}S�~� �(�,<�=�S�@�$�l�4H�I�AS�B�&��8N�O�CS�D�&��8N�O�ES�F�
�u�m�4�GS�H�
�u�m�4�IS�J�#�]�4G�H�KS�L�
�w�
�6�MS�N�&�(8�:P�Q�OS�P�&�(8�:P�Q�QS�R�&��8L�M�SS�T���.�9�US�V�$�n�6J�K�WS�X�(�*:�<R�S�YS�Z���+@� @�.�Q�[S�\���+@� @�.�Q�]S�^��(�_�4�h��6P�Q�_S�`�$�m�5I�J�aS�b���o�>�cS�d��!5��G�eS��j�<�<�7����H�i�(����
�D��K����D�)��$��$����d�H�t�y�y�$8�9�
�	� 1����H�x�'�(��	���e�W�%�B�K�B��=�*�n�=��=�*�n�=��:�z�>�:��;�
�N�;��;�
�N�;��9�j�.�9��:�z�>�:��:�z�>�:��<��^�<��<��^�<��7�H�n�5��<��>�:��9�h��7��>�8�^�<���H�n�i�AS���;��.�9��<��>�:��:�x��8��;��.�9��<��>�:��?�J��?��=�*�n�=��=�*�n�=��<��^�<��?�J��?�7"��:
+�D��)�4�9�9�d�;�
+��2P��/�	���!�(�-B�"B�C����B�K�B��:�y�.�9��;�	�>�:��)�8�^�D�"��

+�D��)�4�9�9�d�;�
+��2P��/�	���!�(�-B�"B�C����D�k�D�
$$��9�i�)9�:�$$��#�Y�0@�A�$$��>�9�.>�?�$$��>�8�-=�>�	$$�
�>�8�-=�>�$$��<��+;�<�
$$��9�i�)9�:�$$��#�Y�0@�A�$$��,�i�9I�J�$$��(�)�5E�F�$$��(�)�5E�F�$$��>�9�.>�?�$$��=�)�-=�>�$$��$�i�1A�B�$$��4�i�AQ�R�$$� �-�y�:J�K�!$$�"�)�9�6F�G�#$$�$�*�I�7G�H�%$$�&�.�	�;K�L�'$$�(�*�I�7G�H�)$$�*�+�Y�8H�I�+$$�,�=�)�-=�>�-$$�.�>�9�.>�?�/$$�0�=�)�-=�>�1$$�2�<��,<�=�3$$�4�$�i�1A�B�5$$�6�#�Y�0@�A�7$$�8�'��4D�E�9$$�:�=�(�,<�=�;$$�<�<��+;�<�=$$�>�;��*:�;�?$$�@�#�X�/?�@�A$$�B�>�8�-=�>�C$$�D�$�i�1A�B�E$$�F�$�i�1A�B�G$$� �J
-�D��+�T�Y�Y��=�
-��4T��1�	���#�H�/F�$F�G����E�{�E��9�h�(9�:��>�8�->�?��9�h�(9�:��<��+<�=�	%�!�
.�D��,�d�i�i��>�
.��5V� �2�	���$�X�0H�%H�I����H�+�H��$�m�5I�J�(�$�
1�D��/����D�A�
1��)�$�5�
���'��3N�(N�O����H�e�.�.�H�
����H��6�7���
*�
?���J��J�!�M��J�#�N�!�M��J��J�"�M��J�$�N�"�M������P��H��� �*�*����H��:�1�-�6�-��H���S��
*�h�)�)�*�5��%�(�%�%�j�1��*�x�*�*�=�9��'�H�'�'�
�3��+��+�+�N�;��*�x�*�*�=�9���"�$�#�#�%�x�$�$�V�,�H�&��&�&�x�0�J�%��%�%�g�.�I� �"�!�!�%�x�$�$�Z�0�H�&��&�&�|�4�J�%��%�%�k�2�I���F�G���J�K���U�V��
�S��
�#���F���v�}�}�T�"�'�'�H��"�x�"�"�1�%�H��!�!�J��I�
��{�{�H��j�j�G�
�*��
�����a��1��,��2��0��$��*���
D��F��H���"�	�!�!�)�.�.�#�6�I��!�*�*�*�H�w�*��-��(�L�.�O���������=�>�8�;���E�N�N�F�+�E�	�
4�
�	�����B�Q��$��	�	���
�����$�	/��	�>�7�t���B�Q��&� �
�F��	��-�.����A�a��6�!��.�.��)�)�	�$(�6�6�>�>�O���.�.��)�)�
��O�O�+�+�E�M�
�O�O�E�>�0�(9�$
�.=�&�,����
�9�=�=���(�*,�H�'��=�=� ����/���8�
��N�#�#�'=�=��
�
��)��
�
�a� ��0�	
�8��
�
���Y���e�	)��-�(�G�	)��D������P�P�P�s6�<
u3�"v�'v�3
v�v�	v�v�	v$�#v$python3.12/site-packages/pip/_vendor/urllib3/packages/six.py000064400000103551151732702540017657 0ustar00# Copyright (c) 2010-2020 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""Utilities for writing code that runs on Python 2 and 3"""

from __future__ import absolute_import

import functools
import itertools
import operator
import sys
import types

__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.16.0"


# Useful for very coarse version differentiation.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
PY34 = sys.version_info[0:2] >= (3, 4)

if PY3:
    string_types = (str,)
    integer_types = (int,)
    class_types = (type,)
    text_type = str
    binary_type = bytes

    MAXSIZE = sys.maxsize
else:
    string_types = (basestring,)
    integer_types = (int, long)
    class_types = (type, types.ClassType)
    text_type = unicode
    binary_type = str

    if sys.platform.startswith("java"):
        # Jython always uses 32 bits.
        MAXSIZE = int((1 << 31) - 1)
    else:
        # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
        class X(object):
            def __len__(self):
                return 1 << 31

        try:
            len(X())
        except OverflowError:
            # 32-bit
            MAXSIZE = int((1 << 31) - 1)
        else:
            # 64-bit
            MAXSIZE = int((1 << 63) - 1)
        del X

if PY34:
    from importlib.util import spec_from_loader
else:
    spec_from_loader = None


def _add_doc(func, doc):
    """Add documentation to a function."""
    func.__doc__ = doc


def _import_module(name):
    """Import module, returning the module after the last dot."""
    __import__(name)
    return sys.modules[name]


class _LazyDescr(object):
    def __init__(self, name):
        self.name = name

    def __get__(self, obj, tp):
        result = self._resolve()
        setattr(obj, self.name, result)  # Invokes __set__.
        try:
            # This is a bit ugly, but it avoids running this again by
            # removing this descriptor.
            delattr(obj.__class__, self.name)
        except AttributeError:
            pass
        return result


class MovedModule(_LazyDescr):
    def __init__(self, name, old, new=None):
        super(MovedModule, self).__init__(name)
        if PY3:
            if new is None:
                new = name
            self.mod = new
        else:
            self.mod = old

    def _resolve(self):
        return _import_module(self.mod)

    def __getattr__(self, attr):
        _module = self._resolve()
        value = getattr(_module, attr)
        setattr(self, attr, value)
        return value


class _LazyModule(types.ModuleType):
    def __init__(self, name):
        super(_LazyModule, self).__init__(name)
        self.__doc__ = self.__class__.__doc__

    def __dir__(self):
        attrs = ["__doc__", "__name__"]
        attrs += [attr.name for attr in self._moved_attributes]
        return attrs

    # Subclasses should override this
    _moved_attributes = []


class MovedAttribute(_LazyDescr):
    def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
        super(MovedAttribute, self).__init__(name)
        if PY3:
            if new_mod is None:
                new_mod = name
            self.mod = new_mod
            if new_attr is None:
                if old_attr is None:
                    new_attr = name
                else:
                    new_attr = old_attr
            self.attr = new_attr
        else:
            self.mod = old_mod
            if old_attr is None:
                old_attr = name
            self.attr = old_attr

    def _resolve(self):
        module = _import_module(self.mod)
        return getattr(module, self.attr)


class _SixMetaPathImporter(object):

    """
    A meta path importer to import six.moves and its submodules.

    This class implements a PEP302 finder and loader. It should be compatible
    with Python 2.5 and all existing versions of Python3
    """

    def __init__(self, six_module_name):
        self.name = six_module_name
        self.known_modules = {}

    def _add_module(self, mod, *fullnames):
        for fullname in fullnames:
            self.known_modules[self.name + "." + fullname] = mod

    def _get_module(self, fullname):
        return self.known_modules[self.name + "." + fullname]

    def find_module(self, fullname, path=None):
        if fullname in self.known_modules:
            return self
        return None

    def find_spec(self, fullname, path, target=None):
        if fullname in self.known_modules:
            return spec_from_loader(fullname, self)
        return None

    def __get_module(self, fullname):
        try:
            return self.known_modules[fullname]
        except KeyError:
            raise ImportError("This loader does not know module " + fullname)

    def load_module(self, fullname):
        try:
            # in case of a reload
            return sys.modules[fullname]
        except KeyError:
            pass
        mod = self.__get_module(fullname)
        if isinstance(mod, MovedModule):
            mod = mod._resolve()
        else:
            mod.__loader__ = self
        sys.modules[fullname] = mod
        return mod

    def is_package(self, fullname):
        """
        Return true, if the named module is a package.

        We need this method to get correct spec objects with
        Python 3.4 (see PEP451)
        """
        return hasattr(self.__get_module(fullname), "__path__")

    def get_code(self, fullname):
        """Return None

        Required, if is_package is implemented"""
        self.__get_module(fullname)  # eventually raises ImportError
        return None

    get_source = get_code  # same as get_code

    def create_module(self, spec):
        return self.load_module(spec.name)

    def exec_module(self, module):
        pass


_importer = _SixMetaPathImporter(__name__)


class _MovedItems(_LazyModule):

    """Lazy loading of moved objects"""

    __path__ = []  # mark as package


_moved_attributes = [
    MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
    MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
    MovedAttribute(
        "filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"
    ),
    MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
    MovedAttribute("intern", "__builtin__", "sys"),
    MovedAttribute("map", "itertools", "builtins", "imap", "map"),
    MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
    MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
    MovedAttribute("getoutput", "commands", "subprocess"),
    MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute(
        "reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"
    ),
    MovedAttribute("reduce", "__builtin__", "functools"),
    MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
    MovedAttribute("StringIO", "StringIO", "io"),
    MovedAttribute("UserDict", "UserDict", "collections"),
    MovedAttribute("UserList", "UserList", "collections"),
    MovedAttribute("UserString", "UserString", "collections"),
    MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
    MovedAttribute(
        "zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"
    ),
    MovedModule("builtins", "__builtin__"),
    MovedModule("configparser", "ConfigParser"),
    MovedModule(
        "collections_abc",
        "collections",
        "collections.abc" if sys.version_info >= (3, 3) else "collections",
    ),
    MovedModule("copyreg", "copy_reg"),
    MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
    MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),
    MovedModule(
        "_dummy_thread",
        "dummy_thread",
        "_dummy_thread" if sys.version_info < (3, 9) else "_thread",
    ),
    MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
    MovedModule("http_cookies", "Cookie", "http.cookies"),
    MovedModule("html_entities", "htmlentitydefs", "html.entities"),
    MovedModule("html_parser", "HTMLParser", "html.parser"),
    MovedModule("http_client", "httplib", "http.client"),
    MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
    MovedModule("email_mime_image", "email.MIMEImage", "email.mime.image"),
    MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
    MovedModule(
        "email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"
    ),
    MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
    MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
    MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
    MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
    MovedModule("cPickle", "cPickle", "pickle"),
    MovedModule("queue", "Queue"),
    MovedModule("reprlib", "repr"),
    MovedModule("socketserver", "SocketServer"),
    MovedModule("_thread", "thread", "_thread"),
    MovedModule("tkinter", "Tkinter"),
    MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
    MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
    MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
    MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
    MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
    MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
    MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
    MovedModule("tkinter_colorchooser", "tkColorChooser", "tkinter.colorchooser"),
    MovedModule("tkinter_commondialog", "tkCommonDialog", "tkinter.commondialog"),
    MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_font", "tkFont", "tkinter.font"),
    MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
    MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", "tkinter.simpledialog"),
    MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
    MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
    MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
    MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
    MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
    MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
]
# Add windows specific modules.
if sys.platform == "win32":
    _moved_attributes += [
        MovedModule("winreg", "_winreg"),
    ]

for attr in _moved_attributes:
    setattr(_MovedItems, attr.name, attr)
    if isinstance(attr, MovedModule):
        _importer._add_module(attr, "moves." + attr.name)
del attr

_MovedItems._moved_attributes = _moved_attributes

moves = _MovedItems(__name__ + ".moves")
_importer._add_module(moves, "moves")


class Module_six_moves_urllib_parse(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_parse"""


_urllib_parse_moved_attributes = [
    MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
    MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
    MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
    MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
    MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
    MovedAttribute("urljoin", "urlparse", "urllib.parse"),
    MovedAttribute("urlparse", "urlparse", "urllib.parse"),
    MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
    MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
    MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
    MovedAttribute("quote", "urllib", "urllib.parse"),
    MovedAttribute("quote_plus", "urllib", "urllib.parse"),
    MovedAttribute("unquote", "urllib", "urllib.parse"),
    MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
    MovedAttribute(
        "unquote_to_bytes", "urllib", "urllib.parse", "unquote", "unquote_to_bytes"
    ),
    MovedAttribute("urlencode", "urllib", "urllib.parse"),
    MovedAttribute("splitquery", "urllib", "urllib.parse"),
    MovedAttribute("splittag", "urllib", "urllib.parse"),
    MovedAttribute("splituser", "urllib", "urllib.parse"),
    MovedAttribute("splitvalue", "urllib", "urllib.parse"),
    MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
    MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
    MovedAttribute("uses_params", "urlparse", "urllib.parse"),
    MovedAttribute("uses_query", "urlparse", "urllib.parse"),
    MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
]
for attr in _urllib_parse_moved_attributes:
    setattr(Module_six_moves_urllib_parse, attr.name, attr)
del attr

Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes

_importer._add_module(
    Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"),
    "moves.urllib_parse",
    "moves.urllib.parse",
)


class Module_six_moves_urllib_error(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_error"""


_urllib_error_moved_attributes = [
    MovedAttribute("URLError", "urllib2", "urllib.error"),
    MovedAttribute("HTTPError", "urllib2", "urllib.error"),
    MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
]
for attr in _urllib_error_moved_attributes:
    setattr(Module_six_moves_urllib_error, attr.name, attr)
del attr

Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes

_importer._add_module(
    Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"),
    "moves.urllib_error",
    "moves.urllib.error",
)


class Module_six_moves_urllib_request(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_request"""


_urllib_request_moved_attributes = [
    MovedAttribute("urlopen", "urllib2", "urllib.request"),
    MovedAttribute("install_opener", "urllib2", "urllib.request"),
    MovedAttribute("build_opener", "urllib2", "urllib.request"),
    MovedAttribute("pathname2url", "urllib", "urllib.request"),
    MovedAttribute("url2pathname", "urllib", "urllib.request"),
    MovedAttribute("getproxies", "urllib", "urllib.request"),
    MovedAttribute("Request", "urllib2", "urllib.request"),
    MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
    MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
    MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
    MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
    MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
    MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
    MovedAttribute("FileHandler", "urllib2", "urllib.request"),
    MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
    MovedAttribute("urlretrieve", "urllib", "urllib.request"),
    MovedAttribute("urlcleanup", "urllib", "urllib.request"),
    MovedAttribute("URLopener", "urllib", "urllib.request"),
    MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
    MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
    MovedAttribute("parse_http_list", "urllib2", "urllib.request"),
    MovedAttribute("parse_keqv_list", "urllib2", "urllib.request"),
]
for attr in _urllib_request_moved_attributes:
    setattr(Module_six_moves_urllib_request, attr.name, attr)
del attr

Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes

_importer._add_module(
    Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"),
    "moves.urllib_request",
    "moves.urllib.request",
)


class Module_six_moves_urllib_response(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_response"""


_urllib_response_moved_attributes = [
    MovedAttribute("addbase", "urllib", "urllib.response"),
    MovedAttribute("addclosehook", "urllib", "urllib.response"),
    MovedAttribute("addinfo", "urllib", "urllib.response"),
    MovedAttribute("addinfourl", "urllib", "urllib.response"),
]
for attr in _urllib_response_moved_attributes:
    setattr(Module_six_moves_urllib_response, attr.name, attr)
del attr

Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes

_importer._add_module(
    Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"),
    "moves.urllib_response",
    "moves.urllib.response",
)


class Module_six_moves_urllib_robotparser(_LazyModule):

    """Lazy loading of moved objects in six.moves.urllib_robotparser"""


_urllib_robotparser_moved_attributes = [
    MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
]
for attr in _urllib_robotparser_moved_attributes:
    setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
del attr

Module_six_moves_urllib_robotparser._moved_attributes = (
    _urllib_robotparser_moved_attributes
)

_importer._add_module(
    Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"),
    "moves.urllib_robotparser",
    "moves.urllib.robotparser",
)


class Module_six_moves_urllib(types.ModuleType):

    """Create a six.moves.urllib namespace that resembles the Python 3 namespace"""

    __path__ = []  # mark as package
    parse = _importer._get_module("moves.urllib_parse")
    error = _importer._get_module("moves.urllib_error")
    request = _importer._get_module("moves.urllib_request")
    response = _importer._get_module("moves.urllib_response")
    robotparser = _importer._get_module("moves.urllib_robotparser")

    def __dir__(self):
        return ["parse", "error", "request", "response", "robotparser"]


_importer._add_module(
    Module_six_moves_urllib(__name__ + ".moves.urllib"), "moves.urllib"
)


def add_move(move):
    """Add an item to six.moves."""
    setattr(_MovedItems, move.name, move)


def remove_move(name):
    """Remove item from six.moves."""
    try:
        delattr(_MovedItems, name)
    except AttributeError:
        try:
            del moves.__dict__[name]
        except KeyError:
            raise AttributeError("no such move, %r" % (name,))


if PY3:
    _meth_func = "__func__"
    _meth_self = "__self__"

    _func_closure = "__closure__"
    _func_code = "__code__"
    _func_defaults = "__defaults__"
    _func_globals = "__globals__"
else:
    _meth_func = "im_func"
    _meth_self = "im_self"

    _func_closure = "func_closure"
    _func_code = "func_code"
    _func_defaults = "func_defaults"
    _func_globals = "func_globals"


try:
    advance_iterator = next
except NameError:

    def advance_iterator(it):
        return it.next()


next = advance_iterator


try:
    callable = callable
except NameError:

    def callable(obj):
        return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)


if PY3:

    def get_unbound_function(unbound):
        return unbound

    create_bound_method = types.MethodType

    def create_unbound_method(func, cls):
        return func

    Iterator = object
else:

    def get_unbound_function(unbound):
        return unbound.im_func

    def create_bound_method(func, obj):
        return types.MethodType(func, obj, obj.__class__)

    def create_unbound_method(func, cls):
        return types.MethodType(func, None, cls)

    class Iterator(object):
        def next(self):
            return type(self).__next__(self)

    callable = callable
_add_doc(
    get_unbound_function, """Get the function out of a possibly unbound function"""
)


get_method_function = operator.attrgetter(_meth_func)
get_method_self = operator.attrgetter(_meth_self)
get_function_closure = operator.attrgetter(_func_closure)
get_function_code = operator.attrgetter(_func_code)
get_function_defaults = operator.attrgetter(_func_defaults)
get_function_globals = operator.attrgetter(_func_globals)


if PY3:

    def iterkeys(d, **kw):
        return iter(d.keys(**kw))

    def itervalues(d, **kw):
        return iter(d.values(**kw))

    def iteritems(d, **kw):
        return iter(d.items(**kw))

    def iterlists(d, **kw):
        return iter(d.lists(**kw))

    viewkeys = operator.methodcaller("keys")

    viewvalues = operator.methodcaller("values")

    viewitems = operator.methodcaller("items")
else:

    def iterkeys(d, **kw):
        return d.iterkeys(**kw)

    def itervalues(d, **kw):
        return d.itervalues(**kw)

    def iteritems(d, **kw):
        return d.iteritems(**kw)

    def iterlists(d, **kw):
        return d.iterlists(**kw)

    viewkeys = operator.methodcaller("viewkeys")

    viewvalues = operator.methodcaller("viewvalues")

    viewitems = operator.methodcaller("viewitems")

_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.")
_add_doc(itervalues, "Return an iterator over the values of a dictionary.")
_add_doc(iteritems, "Return an iterator over the (key, value) pairs of a dictionary.")
_add_doc(
    iterlists, "Return an iterator over the (key, [values]) pairs of a dictionary."
)


if PY3:

    def b(s):
        return s.encode("latin-1")

    def u(s):
        return s

    unichr = chr
    import struct

    int2byte = struct.Struct(">B").pack
    del struct
    byte2int = operator.itemgetter(0)
    indexbytes = operator.getitem
    iterbytes = iter
    import io

    StringIO = io.StringIO
    BytesIO = io.BytesIO
    del io
    _assertCountEqual = "assertCountEqual"
    if sys.version_info[1] <= 1:
        _assertRaisesRegex = "assertRaisesRegexp"
        _assertRegex = "assertRegexpMatches"
        _assertNotRegex = "assertNotRegexpMatches"
    else:
        _assertRaisesRegex = "assertRaisesRegex"
        _assertRegex = "assertRegex"
        _assertNotRegex = "assertNotRegex"
else:

    def b(s):
        return s

    # Workaround for standalone backslash

    def u(s):
        return unicode(s.replace(r"\\", r"\\\\"), "unicode_escape")

    unichr = unichr
    int2byte = chr

    def byte2int(bs):
        return ord(bs[0])

    def indexbytes(buf, i):
        return ord(buf[i])

    iterbytes = functools.partial(itertools.imap, ord)
    import StringIO

    StringIO = BytesIO = StringIO.StringIO
    _assertCountEqual = "assertItemsEqual"
    _assertRaisesRegex = "assertRaisesRegexp"
    _assertRegex = "assertRegexpMatches"
    _assertNotRegex = "assertNotRegexpMatches"
_add_doc(b, """Byte literal""")
_add_doc(u, """Text literal""")


def assertCountEqual(self, *args, **kwargs):
    return getattr(self, _assertCountEqual)(*args, **kwargs)


def assertRaisesRegex(self, *args, **kwargs):
    return getattr(self, _assertRaisesRegex)(*args, **kwargs)


def assertRegex(self, *args, **kwargs):
    return getattr(self, _assertRegex)(*args, **kwargs)


def assertNotRegex(self, *args, **kwargs):
    return getattr(self, _assertNotRegex)(*args, **kwargs)


if PY3:
    exec_ = getattr(moves.builtins, "exec")

    def reraise(tp, value, tb=None):
        try:
            if value is None:
                value = tp()
            if value.__traceback__ is not tb:
                raise value.with_traceback(tb)
            raise value
        finally:
            value = None
            tb = None

else:

    def exec_(_code_, _globs_=None, _locs_=None):
        """Execute code in a namespace."""
        if _globs_ is None:
            frame = sys._getframe(1)
            _globs_ = frame.f_globals
            if _locs_ is None:
                _locs_ = frame.f_locals
            del frame
        elif _locs_ is None:
            _locs_ = _globs_
        exec ("""exec _code_ in _globs_, _locs_""")

    exec_(
        """def reraise(tp, value, tb=None):
    try:
        raise tp, value, tb
    finally:
        tb = None
"""
    )


if sys.version_info[:2] > (3,):
    exec_(
        """def raise_from(value, from_value):
    try:
        raise value from from_value
    finally:
        value = None
"""
    )
else:

    def raise_from(value, from_value):
        raise value


print_ = getattr(moves.builtins, "print", None)
if print_ is None:

    def print_(*args, **kwargs):
        """The new-style print function for Python 2.4 and 2.5."""
        fp = kwargs.pop("file", sys.stdout)
        if fp is None:
            return

        def write(data):
            if not isinstance(data, basestring):
                data = str(data)
            # If the file has an encoding, encode unicode with it.
            if (
                isinstance(fp, file)
                and isinstance(data, unicode)
                and fp.encoding is not None
            ):
                errors = getattr(fp, "errors", None)
                if errors is None:
                    errors = "strict"
                data = data.encode(fp.encoding, errors)
            fp.write(data)

        want_unicode = False
        sep = kwargs.pop("sep", None)
        if sep is not None:
            if isinstance(sep, unicode):
                want_unicode = True
            elif not isinstance(sep, str):
                raise TypeError("sep must be None or a string")
        end = kwargs.pop("end", None)
        if end is not None:
            if isinstance(end, unicode):
                want_unicode = True
            elif not isinstance(end, str):
                raise TypeError("end must be None or a string")
        if kwargs:
            raise TypeError("invalid keyword arguments to print()")
        if not want_unicode:
            for arg in args:
                if isinstance(arg, unicode):
                    want_unicode = True
                    break
        if want_unicode:
            newline = unicode("\n")
            space = unicode(" ")
        else:
            newline = "\n"
            space = " "
        if sep is None:
            sep = space
        if end is None:
            end = newline
        for i, arg in enumerate(args):
            if i:
                write(sep)
            write(arg)
        write(end)


if sys.version_info[:2] < (3, 3):
    _print = print_

    def print_(*args, **kwargs):
        fp = kwargs.get("file", sys.stdout)
        flush = kwargs.pop("flush", False)
        _print(*args, **kwargs)
        if flush and fp is not None:
            fp.flush()


_add_doc(reraise, """Reraise an exception.""")

if sys.version_info[0:2] < (3, 4):
    # This does exactly the same what the :func:`py3:functools.update_wrapper`
    # function does on Python versions after 3.2. It sets the ``__wrapped__``
    # attribute on ``wrapper`` object and it doesn't raise an error if any of
    # the attributes mentioned in ``assigned`` and ``updated`` are missing on
    # ``wrapped`` object.
    def _update_wrapper(
        wrapper,
        wrapped,
        assigned=functools.WRAPPER_ASSIGNMENTS,
        updated=functools.WRAPPER_UPDATES,
    ):
        for attr in assigned:
            try:
                value = getattr(wrapped, attr)
            except AttributeError:
                continue
            else:
                setattr(wrapper, attr, value)
        for attr in updated:
            getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
        wrapper.__wrapped__ = wrapped
        return wrapper

    _update_wrapper.__doc__ = functools.update_wrapper.__doc__

    def wraps(
        wrapped,
        assigned=functools.WRAPPER_ASSIGNMENTS,
        updated=functools.WRAPPER_UPDATES,
    ):
        return functools.partial(
            _update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated
        )

    wraps.__doc__ = functools.wraps.__doc__

else:
    wraps = functools.wraps


def with_metaclass(meta, *bases):
    """Create a base class with a metaclass."""
    # This requires a bit of explanation: the basic idea is to make a dummy
    # metaclass for one level of class instantiation that replaces itself with
    # the actual metaclass.
    class metaclass(type):
        def __new__(cls, name, this_bases, d):
            if sys.version_info[:2] >= (3, 7):
                # This version introduced PEP 560 that requires a bit
                # of extra care (we mimic what is done by __build_class__).
                resolved_bases = types.resolve_bases(bases)
                if resolved_bases is not bases:
                    d["__orig_bases__"] = bases
            else:
                resolved_bases = bases
            return meta(name, resolved_bases, d)

        @classmethod
        def __prepare__(cls, name, this_bases):
            return meta.__prepare__(name, bases)

    return type.__new__(metaclass, "temporary_class", (), {})


def add_metaclass(metaclass):
    """Class decorator for creating a class with a metaclass."""

    def wrapper(cls):
        orig_vars = cls.__dict__.copy()
        slots = orig_vars.get("__slots__")
        if slots is not None:
            if isinstance(slots, str):
                slots = [slots]
            for slots_var in slots:
                orig_vars.pop(slots_var)
        orig_vars.pop("__dict__", None)
        orig_vars.pop("__weakref__", None)
        if hasattr(cls, "__qualname__"):
            orig_vars["__qualname__"] = cls.__qualname__
        return metaclass(cls.__name__, cls.__bases__, orig_vars)

    return wrapper


def ensure_binary(s, encoding="utf-8", errors="strict"):
    """Coerce **s** to six.binary_type.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> encoded to `bytes`
      - `bytes` -> `bytes`
    """
    if isinstance(s, binary_type):
        return s
    if isinstance(s, text_type):
        return s.encode(encoding, errors)
    raise TypeError("not expecting type '%s'" % type(s))


def ensure_str(s, encoding="utf-8", errors="strict"):
    """Coerce *s* to `str`.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    """
    # Optimization: Fast return for the common case.
    if type(s) is str:
        return s
    if PY2 and isinstance(s, text_type):
        return s.encode(encoding, errors)
    elif PY3 and isinstance(s, binary_type):
        return s.decode(encoding, errors)
    elif not isinstance(s, (text_type, binary_type)):
        raise TypeError("not expecting type '%s'" % type(s))
    return s


def ensure_text(s, encoding="utf-8", errors="strict"):
    """Coerce *s* to six.text_type.

    For Python 2:
      - `unicode` -> `unicode`
      - `str` -> `unicode`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    """
    if isinstance(s, binary_type):
        return s.decode(encoding, errors)
    elif isinstance(s, text_type):
        return s
    else:
        raise TypeError("not expecting type '%s'" % type(s))


def python_2_unicode_compatible(klass):
    """
    A class decorator that defines __unicode__ and __str__ methods under Python 2.
    Under Python 3 it does nothing.

    To support Python 2 and 3 with a single code base, define a __str__ method
    returning text and apply this decorator to the class.
    """
    if PY2:
        if "__str__" not in klass.__dict__:
            raise ValueError(
                "@python_2_unicode_compatible cannot be applied "
                "to %s because it doesn't define __str__()." % klass.__name__
            )
        klass.__unicode__ = klass.__str__
        klass.__str__ = lambda self: self.__unicode__().encode("utf-8")
    return klass


# Complete the moves implementation.
# This code is at the end of this module to speed up module loading.
# Turn this module into a package.
__path__ = []  # required for PEP 302 and PEP 451
__package__ = __name__  # see PEP 366 @ReservedAssignment
if globals().get("__spec__") is not None:
    __spec__.submodule_search_locations = []  # PEP 451 @UndefinedVariable
# Remove other six meta path importers, since they cause problems. This can
# happen if six is removed from sys.modules and then reloaded. (Setuptools does
# this for some reason.)
if sys.meta_path:
    for i, importer in enumerate(sys.meta_path):
        # Here's some real nastiness: Another "instance" of the six module might
        # be floating around. Therefore, we can't use isinstance() to check for
        # the six meta path importer, since the other six instance will have
        # inserted an importer with different class.
        if (
            type(importer).__name__ == "_SixMetaPathImporter"
            and importer.name == __name__
        ):
            del sys.meta_path[i]
            break
    del i, importer
# Finally, add the importer to the meta path import hook.
sys.meta_path.append(_importer)
python3.12/site-packages/pip/_vendor/urllib3/packages/__init__.py000064400000000000151732702540020574 0ustar00python3.12/site-packages/pip/_vendor/urllib3/filepost.py000064400000004610151732702540017117 0ustar00from __future__ import absolute_import

import binascii
import codecs
import os
from io import BytesIO

from .fields import RequestField
from .packages import six
from .packages.six import b

writer = codecs.lookup("utf-8")[3]


def choose_boundary():
    """
    Our embarrassingly-simple replacement for mimetools.choose_boundary.
    """
    boundary = binascii.hexlify(os.urandom(16))
    if not six.PY2:
        boundary = boundary.decode("ascii")
    return boundary


def iter_field_objects(fields):
    """
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    """
    if isinstance(fields, dict):
        i = six.iteritems(fields)
    else:
        i = iter(fields)

    for field in i:
        if isinstance(field, RequestField):
            yield field
        else:
            yield RequestField.from_tuples(*field)


def iter_fields(fields):
    """
    .. deprecated:: 1.6

    Iterate over fields.

    The addition of :class:`~urllib3.fields.RequestField` makes this function
    obsolete. Instead, use :func:`iter_field_objects`, which returns
    :class:`~urllib3.fields.RequestField` objects.

    Supports list of (k, v) tuples and dicts.
    """
    if isinstance(fields, dict):
        return ((k, v) for k, v in six.iteritems(fields))

    return ((k, v) for k, v in fields)


def encode_multipart_formdata(fields, boundary=None):
    """
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`urllib3.filepost.choose_boundary`.
    """
    body = BytesIO()
    if boundary is None:
        boundary = choose_boundary()

    for field in iter_field_objects(fields):
        body.write(b("--%s\r\n" % (boundary)))

        writer(body).write(field.render_headers())
        data = field.data

        if isinstance(data, int):
            data = str(data)  # Backwards compatibility

        if isinstance(data, six.text_type):
            writer(body).write(data)
        else:
            body.write(data)

        body.write(b"\r\n")

    body.write(b("--%s--\r\n" % (boundary)))

    content_type = str("multipart/form-data; boundary=%s" % boundary)

    return body.getvalue(), content_type
python3.12/site-packages/pip/_vendor/webencodings.pyi000064400000000032151732702550016531 0ustar00from webencodings import *python3.12/site-packages/pip/_vendor/requests/compat.py000064400000002406151732702550017056 0ustar00"""
requests.compat
~~~~~~~~~~~~~~~

This module previously handled import compatibility issues
between Python 2 and Python 3. It remains for backwards
compatibility until the next major version.
"""

from pip._vendor import chardet

import sys

# -------
# Pythons
# -------

# Syntax sugar.
_ver = sys.version_info

#: Python 2.x?
is_py2 = _ver[0] == 2

#: Python 3.x?
is_py3 = _ver[0] == 3

# Note: We've patched out simplejson support in pip because it prevents
#       upgrading simplejson on Windows.
import json
from json import JSONDecodeError

# Keep OrderedDict for backwards compatibility.
from collections import OrderedDict
from collections.abc import Callable, Mapping, MutableMapping
from http import cookiejar as cookielib
from http.cookies import Morsel
from io import StringIO

# --------------
# Legacy Imports
# --------------
from urllib.parse import (
    quote,
    quote_plus,
    unquote,
    unquote_plus,
    urldefrag,
    urlencode,
    urljoin,
    urlparse,
    urlsplit,
    urlunparse,
)
from urllib.request import (
    getproxies,
    getproxies_environment,
    parse_http_list,
    proxy_bypass,
    proxy_bypass_environment,
)

builtin_str = str
str = str
bytes = bytes
basestring = (str, bytes)
numeric_types = (int, float)
integer_types = (int,)
python3.12/site-packages/pip/_vendor/requests/certs.py000064400000001077151732702550016716 0ustar00#!/usr/bin/env python

"""
requests.certs
~~~~~~~~~~~~~~

This module returns the preferred default CA certificate bundle. There is
only one — the one from the certifi package.

If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.
"""

import os

if "_PIP_STANDALONE_CERT" not in os.environ:
    from pip._vendor.certifi import where
else:
    def where():
        return os.environ["_PIP_STANDALONE_CERT"]

if __name__ == "__main__":
    print(where())
python3.12/site-packages/pip/_vendor/requests/models.py000064400000104730151732702550017061 0ustar00"""
requests.models
~~~~~~~~~~~~~~~

This module contains the primary objects that power Requests.
"""

import datetime

# Import encoding now, to avoid implicit import later.
# Implicit import within threads may cause LookupError when standard library is in a ZIP,
# such as in Embedded Python. See https://github.com/psf/requests/issues/3578.
import encodings.idna  # noqa: F401
from io import UnsupportedOperation

from pip._vendor.urllib3.exceptions import (
    DecodeError,
    LocationParseError,
    ProtocolError,
    ReadTimeoutError,
    SSLError,
)
from pip._vendor.urllib3.fields import RequestField
from pip._vendor.urllib3.filepost import encode_multipart_formdata
from pip._vendor.urllib3.util import parse_url

from ._internal_utils import to_native_string, unicode_is_ascii
from .auth import HTTPBasicAuth
from .compat import (
    Callable,
    JSONDecodeError,
    Mapping,
    basestring,
    builtin_str,
    chardet,
    cookielib,
)
from .compat import json as complexjson
from .compat import urlencode, urlsplit, urlunparse
from .cookies import _copy_cookie_jar, cookiejar_from_dict, get_cookie_header
from .exceptions import (
    ChunkedEncodingError,
    ConnectionError,
    ContentDecodingError,
    HTTPError,
    InvalidJSONError,
    InvalidURL,
)
from .exceptions import JSONDecodeError as RequestsJSONDecodeError
from .exceptions import MissingSchema
from .exceptions import SSLError as RequestsSSLError
from .exceptions import StreamConsumedError
from .hooks import default_hooks
from .status_codes import codes
from .structures import CaseInsensitiveDict
from .utils import (
    check_header_validity,
    get_auth_from_url,
    guess_filename,
    guess_json_utf,
    iter_slices,
    parse_header_links,
    requote_uri,
    stream_decode_response_unicode,
    super_len,
    to_key_val_list,
)

#: The set of HTTP status codes that indicate an automatically
#: processable redirect.
REDIRECT_STATI = (
    codes.moved,  # 301
    codes.found,  # 302
    codes.other,  # 303
    codes.temporary_redirect,  # 307
    codes.permanent_redirect,  # 308
)

DEFAULT_REDIRECT_LIMIT = 30
CONTENT_CHUNK_SIZE = 10 * 1024
ITER_CHUNK_SIZE = 512


class RequestEncodingMixin:
    @property
    def path_url(self):
        """Build the path URL to use."""

        url = []

        p = urlsplit(self.url)

        path = p.path
        if not path:
            path = "/"

        url.append(path)

        query = p.query
        if query:
            url.append("?")
            url.append(query)

        return "".join(url)

    @staticmethod
    def _encode_params(data):
        """Encode parameters in a piece of data.

        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        """

        if isinstance(data, (str, bytes)):
            return data
        elif hasattr(data, "read"):
            return data
        elif hasattr(data, "__iter__"):
            result = []
            for k, vs in to_key_val_list(data):
                if isinstance(vs, basestring) or not hasattr(vs, "__iter__"):
                    vs = [vs]
                for v in vs:
                    if v is not None:
                        result.append(
                            (
                                k.encode("utf-8") if isinstance(k, str) else k,
                                v.encode("utf-8") if isinstance(v, str) else v,
                            )
                        )
            return urlencode(result, doseq=True)
        else:
            return data

    @staticmethod
    def _encode_files(files, data):
        """Build the body for a multipart/form-data request.

        Will successfully encode files when passed as a dict or a list of
        tuples. Order is retained if data is a list of tuples but arbitrary
        if parameters are supplied as a dict.
        The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype)
        or 4-tuples (filename, fileobj, contentype, custom_headers).
        """
        if not files:
            raise ValueError("Files must be provided.")
        elif isinstance(data, basestring):
            raise ValueError("Data must not be a string.")

        new_fields = []
        fields = to_key_val_list(data or {})
        files = to_key_val_list(files or {})

        for field, val in fields:
            if isinstance(val, basestring) or not hasattr(val, "__iter__"):
                val = [val]
            for v in val:
                if v is not None:
                    # Don't call str() on bytestrings: in Py3 it all goes wrong.
                    if not isinstance(v, bytes):
                        v = str(v)

                    new_fields.append(
                        (
                            field.decode("utf-8")
                            if isinstance(field, bytes)
                            else field,
                            v.encode("utf-8") if isinstance(v, str) else v,
                        )
                    )

        for (k, v) in files:
            # support for explicit filename
            ft = None
            fh = None
            if isinstance(v, (tuple, list)):
                if len(v) == 2:
                    fn, fp = v
                elif len(v) == 3:
                    fn, fp, ft = v
                else:
                    fn, fp, ft, fh = v
            else:
                fn = guess_filename(v) or k
                fp = v

            if isinstance(fp, (str, bytes, bytearray)):
                fdata = fp
            elif hasattr(fp, "read"):
                fdata = fp.read()
            elif fp is None:
                continue
            else:
                fdata = fp

            rf = RequestField(name=k, data=fdata, filename=fn, headers=fh)
            rf.make_multipart(content_type=ft)
            new_fields.append(rf)

        body, content_type = encode_multipart_formdata(new_fields)

        return body, content_type


class RequestHooksMixin:
    def register_hook(self, event, hook):
        """Properly register a hook."""

        if event not in self.hooks:
            raise ValueError(f'Unsupported event specified, with event name "{event}"')

        if isinstance(hook, Callable):
            self.hooks[event].append(hook)
        elif hasattr(hook, "__iter__"):
            self.hooks[event].extend(h for h in hook if isinstance(h, Callable))

    def deregister_hook(self, event, hook):
        """Deregister a previously registered hook.
        Returns True if the hook existed, False if not.
        """

        try:
            self.hooks[event].remove(hook)
            return True
        except ValueError:
            return False


class Request(RequestHooksMixin):
    """A user-created :class:`Request <Request>` object.

    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach to the request. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param json: json for the body to attach to the request (if files or data is not specified).
    :param params: URL parameters to append to the URL. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>
    """

    def __init__(
        self,
        method=None,
        url=None,
        headers=None,
        files=None,
        data=None,
        params=None,
        auth=None,
        cookies=None,
        hooks=None,
        json=None,
    ):

        # Default empty dicts for dict params.
        data = [] if data is None else data
        files = [] if files is None else files
        headers = {} if headers is None else headers
        params = {} if params is None else params
        hooks = {} if hooks is None else hooks

        self.hooks = default_hooks()
        for (k, v) in list(hooks.items()):
            self.register_hook(event=k, hook=v)

        self.method = method
        self.url = url
        self.headers = headers
        self.files = files
        self.data = data
        self.json = json
        self.params = params
        self.auth = auth
        self.cookies = cookies

    def __repr__(self):
        return f"<Request [{self.method}]>"

    def prepare(self):
        """Constructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it."""
        p = PreparedRequest()
        p.prepare(
            method=self.method,
            url=self.url,
            headers=self.headers,
            files=self.files,
            data=self.data,
            json=self.json,
            params=self.params,
            auth=self.auth,
            cookies=self.cookies,
            hooks=self.hooks,
        )
        return p


class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
    """The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.

    Instances are generated from a :class:`Request <Request>` object, and
    should not be instantiated manually; doing so may produce undesirable
    effects.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> r = req.prepare()
      >>> r
      <PreparedRequest [GET]>

      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>
    """

    def __init__(self):
        #: HTTP verb to send to the server.
        self.method = None
        #: HTTP URL to send the request to.
        self.url = None
        #: dictionary of HTTP headers.
        self.headers = None
        # The `CookieJar` used to create the Cookie header will be stored here
        # after prepare_cookies is called
        self._cookies = None
        #: request body to send to the server.
        self.body = None
        #: dictionary of callback hooks, for internal usage.
        self.hooks = default_hooks()
        #: integer denoting starting position of a readable file-like body.
        self._body_position = None

    def prepare(
        self,
        method=None,
        url=None,
        headers=None,
        files=None,
        data=None,
        params=None,
        auth=None,
        cookies=None,
        hooks=None,
        json=None,
    ):
        """Prepares the entire request with the given parameters."""

        self.prepare_method(method)
        self.prepare_url(url, params)
        self.prepare_headers(headers)
        self.prepare_cookies(cookies)
        self.prepare_body(data, files, json)
        self.prepare_auth(auth, url)

        # Note that prepare_auth must be last to enable authentication schemes
        # such as OAuth to work on a fully prepared request.

        # This MUST go after prepare_auth. Authenticators could add a hook
        self.prepare_hooks(hooks)

    def __repr__(self):
        return f"<PreparedRequest [{self.method}]>"

    def copy(self):
        p = PreparedRequest()
        p.method = self.method
        p.url = self.url
        p.headers = self.headers.copy() if self.headers is not None else None
        p._cookies = _copy_cookie_jar(self._cookies)
        p.body = self.body
        p.hooks = self.hooks
        p._body_position = self._body_position
        return p

    def prepare_method(self, method):
        """Prepares the given HTTP method."""
        self.method = method
        if self.method is not None:
            self.method = to_native_string(self.method.upper())

    @staticmethod
    def _get_idna_encoded_host(host):
        from pip._vendor import idna

        try:
            host = idna.encode(host, uts46=True).decode("utf-8")
        except idna.IDNAError:
            raise UnicodeError
        return host

    def prepare_url(self, url, params):
        """Prepares the given HTTP URL."""
        #: Accept objects that have string representations.
        #: We're unable to blindly call unicode/str functions
        #: as this will include the bytestring indicator (b'')
        #: on python 3.x.
        #: https://github.com/psf/requests/pull/2238
        if isinstance(url, bytes):
            url = url.decode("utf8")
        else:
            url = str(url)

        # Remove leading whitespaces from url
        url = url.lstrip()

        # Don't do any URL preparation for non-HTTP schemes like `mailto`,
        # `data` etc to work around exceptions from `url_parse`, which
        # handles RFC 3986 only.
        if ":" in url and not url.lower().startswith("http"):
            self.url = url
            return

        # Support for unicode domain names and paths.
        try:
            scheme, auth, host, port, path, query, fragment = parse_url(url)
        except LocationParseError as e:
            raise InvalidURL(*e.args)

        if not scheme:
            raise MissingSchema(
                f"Invalid URL {url!r}: No scheme supplied. "
                f"Perhaps you meant https://{url}?"
            )

        if not host:
            raise InvalidURL(f"Invalid URL {url!r}: No host supplied")

        # In general, we want to try IDNA encoding the hostname if the string contains
        # non-ASCII characters. This allows users to automatically get the correct IDNA
        # behaviour. For strings containing only ASCII characters, we need to also verify
        # it doesn't start with a wildcard (*), before allowing the unencoded hostname.
        if not unicode_is_ascii(host):
            try:
                host = self._get_idna_encoded_host(host)
            except UnicodeError:
                raise InvalidURL("URL has an invalid label.")
        elif host.startswith(("*", ".")):
            raise InvalidURL("URL has an invalid label.")

        # Carefully reconstruct the network location
        netloc = auth or ""
        if netloc:
            netloc += "@"
        netloc += host
        if port:
            netloc += f":{port}"

        # Bare domains aren't valid URLs.
        if not path:
            path = "/"

        if isinstance(params, (str, bytes)):
            params = to_native_string(params)

        enc_params = self._encode_params(params)
        if enc_params:
            if query:
                query = f"{query}&{enc_params}"
            else:
                query = enc_params

        url = requote_uri(urlunparse([scheme, netloc, path, None, query, fragment]))
        self.url = url

    def prepare_headers(self, headers):
        """Prepares the given HTTP headers."""

        self.headers = CaseInsensitiveDict()
        if headers:
            for header in headers.items():
                # Raise exception on invalid header value.
                check_header_validity(header)
                name, value = header
                self.headers[to_native_string(name)] = value

    def prepare_body(self, data, files, json=None):
        """Prepares the given HTTP body data."""

        # Check if file, fo, generator, iterator.
        # If not, run through normal process.

        # Nottin' on you.
        body = None
        content_type = None

        if not data and json is not None:
            # urllib3 requires a bytes-like body. Python 2's json.dumps
            # provides this natively, but Python 3 gives a Unicode string.
            content_type = "application/json"

            try:
                body = complexjson.dumps(json, allow_nan=False)
            except ValueError as ve:
                raise InvalidJSONError(ve, request=self)

            if not isinstance(body, bytes):
                body = body.encode("utf-8")

        is_stream = all(
            [
                hasattr(data, "__iter__"),
                not isinstance(data, (basestring, list, tuple, Mapping)),
            ]
        )

        if is_stream:
            try:
                length = super_len(data)
            except (TypeError, AttributeError, UnsupportedOperation):
                length = None

            body = data

            if getattr(body, "tell", None) is not None:
                # Record the current file position before reading.
                # This will allow us to rewind a file in the event
                # of a redirect.
                try:
                    self._body_position = body.tell()
                except OSError:
                    # This differentiates from None, allowing us to catch
                    # a failed `tell()` later when trying to rewind the body
                    self._body_position = object()

            if files:
                raise NotImplementedError(
                    "Streamed bodies and files are mutually exclusive."
                )

            if length:
                self.headers["Content-Length"] = builtin_str(length)
            else:
                self.headers["Transfer-Encoding"] = "chunked"
        else:
            # Multi-part file uploads.
            if files:
                (body, content_type) = self._encode_files(files, data)
            else:
                if data:
                    body = self._encode_params(data)
                    if isinstance(data, basestring) or hasattr(data, "read"):
                        content_type = None
                    else:
                        content_type = "application/x-www-form-urlencoded"

            self.prepare_content_length(body)

            # Add content-type if it wasn't explicitly provided.
            if content_type and ("content-type" not in self.headers):
                self.headers["Content-Type"] = content_type

        self.body = body

    def prepare_content_length(self, body):
        """Prepare Content-Length header based on request method and body"""
        if body is not None:
            length = super_len(body)
            if length:
                # If length exists, set it. Otherwise, we fallback
                # to Transfer-Encoding: chunked.
                self.headers["Content-Length"] = builtin_str(length)
        elif (
            self.method not in ("GET", "HEAD")
            and self.headers.get("Content-Length") is None
        ):
            # Set Content-Length to 0 for methods that can have a body
            # but don't provide one. (i.e. not GET or HEAD)
            self.headers["Content-Length"] = "0"

    def prepare_auth(self, auth, url=""):
        """Prepares the given HTTP auth data."""

        # If no Auth is explicitly provided, extract it from the URL first.
        if auth is None:
            url_auth = get_auth_from_url(self.url)
            auth = url_auth if any(url_auth) else None

        if auth:
            if isinstance(auth, tuple) and len(auth) == 2:
                # special-case basic HTTP auth
                auth = HTTPBasicAuth(*auth)

            # Allow auth to make its changes.
            r = auth(self)

            # Update self to reflect the auth changes.
            self.__dict__.update(r.__dict__)

            # Recompute Content-Length
            self.prepare_content_length(self.body)

    def prepare_cookies(self, cookies):
        """Prepares the given HTTP cookie data.

        This function eventually generates a ``Cookie`` header from the
        given cookies using cookielib. Due to cookielib's design, the header
        will not be regenerated if it already exists, meaning this function
        can only be called once for the life of the
        :class:`PreparedRequest <PreparedRequest>` object. Any subsequent calls
        to ``prepare_cookies`` will have no actual effect, unless the "Cookie"
        header is removed beforehand.
        """
        if isinstance(cookies, cookielib.CookieJar):
            self._cookies = cookies
        else:
            self._cookies = cookiejar_from_dict(cookies)

        cookie_header = get_cookie_header(self._cookies, self)
        if cookie_header is not None:
            self.headers["Cookie"] = cookie_header

    def prepare_hooks(self, hooks):
        """Prepares the given hooks."""
        # hooks can be passed as None to the prepare method and to this
        # method. To prevent iterating over None, simply use an empty list
        # if hooks is False-y
        hooks = hooks or []
        for event in hooks:
            self.register_hook(event, hooks[event])


class Response:
    """The :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    """

    __attrs__ = [
        "_content",
        "status_code",
        "headers",
        "url",
        "history",
        "encoding",
        "reason",
        "cookies",
        "elapsed",
        "request",
    ]

    def __init__(self):
        self._content = False
        self._content_consumed = False
        self._next = None

        #: Integer Code of responded HTTP Status, e.g. 404 or 200.
        self.status_code = None

        #: Case-insensitive Dictionary of Response Headers.
        #: For example, ``headers['content-encoding']`` will return the
        #: value of a ``'Content-Encoding'`` response header.
        self.headers = CaseInsensitiveDict()

        #: File-like object representation of response (for advanced usage).
        #: Use of ``raw`` requires that ``stream=True`` be set on the request.
        #: This requirement does not apply for use internally to Requests.
        self.raw = None

        #: Final URL location of Response.
        self.url = None

        #: Encoding to decode with when accessing r.text.
        self.encoding = None

        #: A list of :class:`Response <Response>` objects from
        #: the history of the Request. Any redirect responses will end
        #: up here. The list is sorted from the oldest to the most recent request.
        self.history = []

        #: Textual reason of responded HTTP Status, e.g. "Not Found" or "OK".
        self.reason = None

        #: A CookieJar of Cookies the server sent back.
        self.cookies = cookiejar_from_dict({})

        #: The amount of time elapsed between sending the request
        #: and the arrival of the response (as a timedelta).
        #: This property specifically measures the time taken between sending
        #: the first byte of the request and finishing parsing the headers. It
        #: is therefore unaffected by consuming the response content or the
        #: value of the ``stream`` keyword argument.
        self.elapsed = datetime.timedelta(0)

        #: The :class:`PreparedRequest <PreparedRequest>` object to which this
        #: is a response.
        self.request = None

    def __enter__(self):
        return self

    def __exit__(self, *args):
        self.close()

    def __getstate__(self):
        # Consume everything; accessing the content attribute makes
        # sure the content has been fully read.
        if not self._content_consumed:
            self.content

        return {attr: getattr(self, attr, None) for attr in self.__attrs__}

    def __setstate__(self, state):
        for name, value in state.items():
            setattr(self, name, value)

        # pickled objects do not have .raw
        setattr(self, "_content_consumed", True)
        setattr(self, "raw", None)

    def __repr__(self):
        return f"<Response [{self.status_code}]>"

    def __bool__(self):
        """Returns True if :attr:`status_code` is less than 400.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code, is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        """
        return self.ok

    def __nonzero__(self):
        """Returns True if :attr:`status_code` is less than 400.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code, is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        """
        return self.ok

    def __iter__(self):
        """Allows you to use a response as an iterator."""
        return self.iter_content(128)

    @property
    def ok(self):
        """Returns True if :attr:`status_code` is less than 400, False if not.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        """
        try:
            self.raise_for_status()
        except HTTPError:
            return False
        return True

    @property
    def is_redirect(self):
        """True if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        """
        return "location" in self.headers and self.status_code in REDIRECT_STATI

    @property
    def is_permanent_redirect(self):
        """True if this Response one of the permanent versions of redirect."""
        return "location" in self.headers and self.status_code in (
            codes.moved_permanently,
            codes.permanent_redirect,
        )

    @property
    def next(self):
        """Returns a PreparedRequest for the next request in a redirect chain, if there is one."""
        return self._next

    @property
    def apparent_encoding(self):
        """The apparent encoding, provided by the charset_normalizer or chardet libraries."""
        return chardet.detect(self.content)["encoding"]

    def iter_content(self, chunk_size=1, decode_unicode=False):
        """Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        chunk_size must be of type int or None. A value of None will
        function differently depending on the value of `stream`.
        stream=True will read data as it arrives in whatever size the
        chunks are received. If stream=False, data is returned as
        a single chunk.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        """

        def generate():
            # Special case for urllib3.
            if hasattr(self.raw, "stream"):
                try:
                    yield from self.raw.stream(chunk_size, decode_content=True)
                except ProtocolError as e:
                    raise ChunkedEncodingError(e)
                except DecodeError as e:
                    raise ContentDecodingError(e)
                except ReadTimeoutError as e:
                    raise ConnectionError(e)
                except SSLError as e:
                    raise RequestsSSLError(e)
            else:
                # Standard file-like object.
                while True:
                    chunk = self.raw.read(chunk_size)
                    if not chunk:
                        break
                    yield chunk

            self._content_consumed = True

        if self._content_consumed and isinstance(self._content, bool):
            raise StreamConsumedError()
        elif chunk_size is not None and not isinstance(chunk_size, int):
            raise TypeError(
                f"chunk_size must be an int, it is instead a {type(chunk_size)}."
            )
        # simulate reading small chunks of the content
        reused_chunks = iter_slices(self._content, chunk_size)

        stream_chunks = generate()

        chunks = reused_chunks if self._content_consumed else stream_chunks

        if decode_unicode:
            chunks = stream_decode_response_unicode(chunks, self)

        return chunks

    def iter_lines(
        self, chunk_size=ITER_CHUNK_SIZE, decode_unicode=False, delimiter=None
    ):
        """Iterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.

        .. note:: This method is not reentrant safe.
        """

        pending = None

        for chunk in self.iter_content(
            chunk_size=chunk_size, decode_unicode=decode_unicode
        ):

            if pending is not None:
                chunk = pending + chunk

            if delimiter:
                lines = chunk.split(delimiter)
            else:
                lines = chunk.splitlines()

            if lines and lines[-1] and chunk and lines[-1][-1] == chunk[-1]:
                pending = lines.pop()
            else:
                pending = None

            yield from lines

        if pending is not None:
            yield pending

    @property
    def content(self):
        """Content of the response, in bytes."""

        if self._content is False:
            # Read the contents.
            if self._content_consumed:
                raise RuntimeError("The content for this response was already consumed")

            if self.status_code == 0 or self.raw is None:
                self._content = None
            else:
                self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""

        self._content_consumed = True
        # don't need to release the connection; that's been handled by urllib3
        # since we exhausted the data.
        return self._content

    @property
    def text(self):
        """Content of the response, in unicode.

        If Response.encoding is None, encoding will be guessed using
        ``charset_normalizer`` or ``chardet``.

        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        """

        # Try charset from content-type
        content = None
        encoding = self.encoding

        if not self.content:
            return ""

        # Fallback to auto-detected encoding.
        if self.encoding is None:
            encoding = self.apparent_encoding

        # Decode unicode from given encoding.
        try:
            content = str(self.content, encoding, errors="replace")
        except (LookupError, TypeError):
            # A LookupError is raised if the encoding was not found which could
            # indicate a misspelling or similar mistake.
            #
            # A TypeError can be raised if encoding is None
            #
            # So we try blindly encoding.
            content = str(self.content, errors="replace")

        return content

    def json(self, **kwargs):
        r"""Returns the json-encoded content of a response, if any.

        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        :raises requests.exceptions.JSONDecodeError: If the response body does not
            contain valid json.
        """

        if not self.encoding and self.content and len(self.content) > 3:
            # No encoding set. JSON RFC 4627 section 3 states we should expect
            # UTF-8, -16 or -32. Detect which one to use; If the detection or
            # decoding fails, fall back to `self.text` (using charset_normalizer to make
            # a best guess).
            encoding = guess_json_utf(self.content)
            if encoding is not None:
                try:
                    return complexjson.loads(self.content.decode(encoding), **kwargs)
                except UnicodeDecodeError:
                    # Wrong UTF codec detected; usually because it's not UTF-8
                    # but some other 8-bit codec.  This is an RFC violation,
                    # and the server didn't bother to tell us what codec *was*
                    # used.
                    pass
                except JSONDecodeError as e:
                    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

        try:
            return complexjson.loads(self.text, **kwargs)
        except JSONDecodeError as e:
            # Catch JSON-related errors and raise as requests.JSONDecodeError
            # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
            raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

    @property
    def links(self):
        """Returns the parsed header links of the response, if any."""

        header = self.headers.get("link")

        resolved_links = {}

        if header:
            links = parse_header_links(header)

            for link in links:
                key = link.get("rel") or link.get("url")
                resolved_links[key] = link

        return resolved_links

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""

        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason

        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )

        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )

        if http_error_msg:
            raise HTTPError(http_error_msg, response=self)

    def close(self):
        """Releases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.

        *Note: Should not normally need to be called explicitly.*
        """
        if not self._content_consumed:
            self.raw.close()

        release_conn = getattr(self.raw, "release_conn", None)
        if release_conn is not None:
            release_conn()
python3.12/site-packages/pip/_vendor/requests/packages.py000064400000001267151732702560017356 0ustar00import sys

# This code exists for backwards compatibility reasons.
# I don't like it either. Just look the other way. :)

for package in ('urllib3', 'idna', 'chardet'):
    vendored_package = "pip._vendor." + package
    locals()[package] = __import__(vendored_package)
    # This traversal is apparently necessary such that the identities are
    # preserved (requests.packages.urllib3.* is urllib3.*)
    for mod in list(sys.modules):
        if mod == vendored_package or mod.startswith(vendored_package + '.'):
            unprefixed_mod = mod[len("pip._vendor."):]
            sys.modules['pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod]

# Kinda cool, though, right?
python3.12/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-312.pyc000064400000001713151732702560023255 0ustar00�

R`i?��f�dZddlZdejvrddlmZnd�Zedk(ree��yy)uF
requests.certs
~~~~~~~~~~~~~~

This module returns the preferred default CA certificate bundle. There is
only one — the one from the certifi package.

If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.
�N�_PIP_STANDALONE_CERT)�wherec�(�tjdS)Nr)�os�environ����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/certs.pyrrs���z�z�0�1�1r	�__main__)�__doc__rr�pip._vendor.certifir�__name__�printrr	r
�<module>rs;��
�
�����+�)�2��z��	�%�'�N�r	python3.12/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-312.pyc000064400000012576151732702560023705 0ustar00�

R`i1��F�dZddlZddlmZddlmZdZ	ddlmZ	d�Zd�Z	eeje	e�	dd
lmZese
d��	ddlZeedd
�s%ddlmZej.�ddlmZee�ddlmZej8de�ddlZddlmZddlm Z m!Z!ddlm"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*mZddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3ddlm4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=ddl>m?Z?m@Z@mAZAddlBmCZCmDZDddlEmFZFej�eH�j�e��ej8de6d��y#e
$rdZ	Y��-wxYw#e
ef$r2ejd	j!eje	e�e�Y��NwxYw#e
$rdZY��FwxYw#e
$rY��#wxYw)a�
Requests HTTP Library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human beings.
Basic GET usage:

   >>> import requests
   >>> r = requests.get('https://www.python.org')
   >>> r.status_code
   200
   >>> b'Python is a programming language' in r.content
   True

... or POST:

   >>> payload = dict(key1='value1', key2='value2')
   >>> r = requests.post('https://httpbin.org/post', data=payload)
   >>> print(r.text)
   {
     ...
     "form": {
       "key1": "value1",
       "key2": "value2"
     },
     ...
   }

The other HTTP methods are supported - see `requests.api`. Full documentation
is at <https://requests.readthedocs.io>.

:copyright: (c) 2017 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.
�N)�urllib3�)�RequestsDependencyWarning)�__version__c�:�|jd�}|dgk7sJ�t|�dk(r|jd�|\}}}t|�t|�t|�}}}|dk\sJ�|dk(r|dk\sJ�|rN|jd�dd\}}}t|�t|�t|�}}}d|||fcxkrd	ksJ�J�y|rM|jd�dd\}}}t|�t|�t|�}}}d
|||fcxkrdksJ�J�yt	d��)
N�.�dev��0r��)r
rr
)�rr)r
rr)�rrz7You need either charset_normalizer or chardet installed)�split�len�append�int�	Exception)�urllib3_version�chardet_version�charset_normalizer_version�major�minor�patchs      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/__init__.py�check_compatibilityr7sI��%�+�+�C�0�O��u�g�%�%�%��?��q� ����s�#�*��E�5�%��e�*�c�%�j�#�e�*�%�5�E��A�:��:���z���{��{��3�o�3�3�C�8��!�<���u�e�!�%�j�#�e�*�c�%�j�e�u���U�E�5�1�=�I�=�=�=�=�=�	#�8�>�>�s�C�B�Q�G���u�e�!�%�j�#�e�*�c�%�j�e�u���U�E�5�1�=�I�=�=�=�=�=��Q�R�R�c���	ttt|jd���}|gd�kr,dj|�}t
j|t�yy#t$rYywxYw)Nr)rr
rz4Old version of cryptography ({}) may cause slowdown.)	�list�maprr�
ValueError�format�warnings�warnr)�cryptography_version�warnings  r�_check_cryptographyr'Vso���#�C��-G�-A�-G�-G��-L�$M�N���i�'�H�O�O� �
��	�
�
�g�8�9�	(������s�)A�	A+�*A+zWurllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported version!)�WINDOWSz3pip internals: don't import cryptography on Windows�HAS_SNIF)�	pyopenssl)�DependencyWarning�ignore)�NullHandler)�packages�utils)
�
__author__�__author_email__�	__build__�__cake__�
__copyright__�__description__�__license__�	__title__�__url__r)�delete�get�head�optionsr�post�put�request)
�ConnectionError�ConnectTimeout�FileModeWarning�	HTTPError�JSONDecodeError�ReadTimeout�RequestException�Timeout�TooManyRedirects�URLRequired)�PreparedRequest�Request�Response)�Session�session)�codes�defaultT)r)J�__doc__r#�pip._vendorr�
exceptionsrr�pip._vendor.chardetrr�ImportErrorrr'�AssertionErrorr!r$r"�pip._internal.utils.compatr(�ssl�getattr�pip._vendor.urllib3.contribr*�inject_into_urllib3�cryptographyr%�pip._vendor.urllib3.exceptionsr+�simplefilter�loggingr-�r.r/r0r1r2r3r4r5r6r7r8�apir9r:r;r<rr=r>r?r@rArBrCrDrErFrGrHrI�modelsrJrKrL�sessionsrMrN�status_codesrO�	getLogger�__name__�
addHandler�rr�<module>ris���!�F��1�!���B�
S�>:������_�.H��	�3���O�P�P����3�	�5�)�9�%�	�%�%�'�	E��0�1�
=�����h� 1�2�������G�F�F����7�6�&������(��&�&�{�}�5�����i���>��G���O���l	�
�#���H�M�M�	��6�����2L�
�	"����(�������	��	�sW�D?�E
�F�	F	�
/F�?E
�	E
�
5F�F�	F�F�F�F�F �F python3.12/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-312.pyc000064400000002114151732702560023254 0ustar00�

R`i����dZdgZd�Zd�Zy)z�
requests.hooks
~~~~~~~~~~~~~~

This module provides the capabilities for the Requests hooks system.

Available hooks:

``response``:
    The response generated from a Request.
�responsec�6�tD�cic]}|g��c}Scc}w)N)�HOOKS)�events ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/hooks.py�
default_hooksrs��#(�)�5�%�E�2�I�5�)�)��)s�
c��|xsi}|j|�}|r$t|d�r|g}|D]}||fi|��}|��|}�|S)z6Dispatches a hook dictionary on a given piece of data.�__call__)�get�hasattr)�key�hooks�	hook_data�kwargs�hook�
_hook_datas      r�
dispatch_hookrsX���K�R�E��I�I�c�N�E���5�*�%��G�E��D��i�2�6�2�J��%�&�	����N)�__doc__rrr�rr�<module>rs��
�
���*�rpython3.12/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-312.pyc000064400000013050151732702560024355 0ustar00�

R`i`��P�dZddlmZddlmZmZGd�de�ZGd�de�Zy	)
zO
requests.structures
~~~~~~~~~~~~~~~~~~~

Data structures that power Requests.
�)�OrderedDict�)�Mapping�MutableMappingc�N�eZdZdZd
d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
y)�CaseInsensitiveDicta�A case-insensitive ``dict``-like object.

    Implements all methods and operations of
    ``MutableMapping`` as well as dict's ``copy``. Also
    provides ``lower_items``.

    All keys are expected to be strings. The structure remembers the
    case of the last key to be set, and ``iter(instance)``,
    ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()``
    will contain case-sensitive keys. However, querying and contains
    testing is case insensitive::

        cid = CaseInsensitiveDict()
        cid['Accept'] = 'application/json'
        cid['aCCEPT'] == 'application/json'  # True
        list(cid) == ['Accept']  # True

    For example, ``headers['content-encoding']`` will return the
    value of a ``'Content-Encoding'`` response header, regardless
    of how the header name was originally stored.

    If the constructor, ``.update``, or equality comparison
    operations are given keys that have equal ``.lower()``s, the
    behavior is undefined.
    Nc�P�t�|_|�i}|j|fi|��y�N)r�_store�update)�self�data�kwargss   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/structures.py�__init__zCaseInsensitiveDict.__init__(s(��!�m����<��D�����D�#�F�#�c�B�||f|j|j�<yr
�r�lower)r
�key�values   r�__setitem__zCaseInsensitiveDict.__setitem__.s��%(��<����C�I�I�K� rc�B�|j|j�dS)Nrr�r
rs  r�__getitem__zCaseInsensitiveDict.__getitem__3s���{�{�3�9�9�;�'��*�*rc�:�|j|j�=yr
rrs  r�__delitem__zCaseInsensitiveDict.__delitem__6s���K�K��	�	��$rc�D�d�|jj�D�S)Nc3�&K�|]	\}}|���y�wr
�)�.0�casedkey�mappedvalues   r�	<genexpr>z/CaseInsensitiveDict.__iter__.<locals>.<genexpr>:s����K�6J�2�X�{��6J�s�)r�values�r
s r�__iter__zCaseInsensitiveDict.__iter__9s��K�d�k�k�6H�6H�6J�K�Krc�,�t|j�Sr
)�lenrr&s r�__len__zCaseInsensitiveDict.__len__<s���4�;�;��rc�D�d�|jj�D�S)z.Like iteritems(), but with all lowercase keys.c3�0K�|]\}}||df���y�w)rNr )r!�lowerkey�keyvals   rr$z2CaseInsensitiveDict.lower_items.<locals>.<genexpr>As!����T�@S�*<�8�V��6�!�9�%�@S�s�)r�itemsr&s r�lower_itemszCaseInsensitiveDict.lower_items?s��T����@Q�@Q�@S�T�Trc��t|t�rt|�}ntSt	|j��t	|j��k(Sr
)�
isinstancerr�NotImplemented�dictr0)r
�others  r�__eq__zCaseInsensitiveDict.__eq__CsC���e�W�%�'��.�E�!�!��D�$�$�&�'�4��0A�0A�0C�+D�D�Drc�H�t|jj��Sr
)rrr%r&s r�copyzCaseInsensitiveDict.copyLs��"�4�;�;�#5�#5�#7�8�8rc�F�tt|j���Sr
)�strr4r/r&s r�__repr__zCaseInsensitiveDict.__repr__Os���4��
�
��%�&�&rr
)�__name__�
__module__�__qualname__�__doc__rrrrr'r*r0r6r8r;r rrrr
s<���4$�0�
+�%�L� �U�E�9�'rrc�8��eZdZdZd�fd�	Zd�Zd�Zdd�Z�xZS)�
LookupDictzDictionary lookup object.c�0��||_t�|�	�yr
)�name�superr)r
rC�	__class__s  �rrzLookupDict.__init__Vs�����	�
���rc�"�d|j�d�S)Nz	<lookup 'z'>)rCr&s rr;zLookupDict.__repr__Zs���4�9�9�+�R�(�(rc�:�|jj|d�Sr
��__dict__�getrs  rrzLookupDict.__getitem__]s���}�}� � ��d�+�+rc�:�|jj||�Sr
rH)r
r�defaults   rrJzLookupDict.getbs���}�}� � ��g�.�.rr
)	r<r=r>r?rr;rrJ�
__classcell__)rEs@rrArASs���#��)�,�
/rrAN)	r?�collectionsr�compatrrrr4rAr rr�<module>rPs-���$�+�C'�.�C'�L/��/rpython3.12/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-312.pyc000064400000013560151732702560024640 0ustar00�

R`i�����daddlmZidd�dd�dd�d	d
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd �d!d"�d#d$�id%d&�d'd(�d)d*�d+d,�d-d.�d/d0�d1d2�d3d4�d5d6�d7d8�d9d:�d;d<�d=d>�d?d@�dAdB�dCdD�dEdF��idGdH�dIdJ�dKdL�dMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]d^�d_d`�dadb�dcdd�dedf�dgdh��ididj�dkdl�dmdn�dodp�dqdr�dsdt�dudv�dwdx�dydz�d{d|�d}d~�dd��d�d��d�d��d�d��d�d��d�d���Zed����Zd��Ze�y�)�a
The ``codes`` object defines a mapping from common names for HTTP statuses
to their numerical codes, accessible either as attributes or as dictionary
items.

Example::

    >>> import requests
    >>> requests.codes['temporary_redirect']
    307
    >>> requests.codes.teapot
    418
    >>> requests.codes['\o/']
    200

Some codes have multiple names, and both upper- and lower-case versions of
the names are allowed. For example, ``codes.ok``, ``codes.OK``, and
``codes.okay`` all correspond to the HTTP status code 200.
�)�
LookupDict�d)�continue�e)�switching_protocols�f)�
processing�g)�
checkpoint�z)�uri_too_long�request_uri_too_long��)�ok�okay�all_ok�all_okay�all_goodz\o/u✓��)�created��)�accepted��)�non_authoritative_info�non_authoritative_information��)�
no_content��)�
reset_content�reset��)�partial_content�partial��)�multi_status�multiple_status�multi_stati�multiple_stati��)�already_reported��)�im_usedi,)�multiple_choicesi-)�moved_permanently�movedz\o-i.)�foundi/)�	see_other�otheri0)�not_modifiedi1)�	use_proxyi2)�switch_proxyi3)�temporary_redirect�temporary_moved�	temporaryi4)�permanent_redirect�resume_incomplete�resumei�)�bad_request�badi�)�unauthorizedi�)�payment_required�paymenti�)�	forbiddeni�)�	not_foundz-o-i�)�method_not_allowed�not_allowedi�)�not_acceptablei�)�proxy_authentication_required�
proxy_auth�proxy_authenticationi�)�request_timeout�timeouti�)�conflicti�)�gonei�)�length_requiredi�)�precondition_failed�preconditioni�)�request_entity_too_largei�)�request_uri_too_largei�)�unsupported_media_type�unsupported_media�
media_typei�)�requested_range_not_satisfiable�requested_range�range_not_satisfiablei�)�expectation_failedi�)�im_a_teapot�teapot�
i_am_a_teapoti�)�misdirected_requesti�)�unprocessable_entity�
unprocessablei�)�lockedi�)�failed_dependency�
dependencyi�)�unordered_collection�	unorderedi�)�upgrade_required�upgradei�)�precondition_requiredrOi�)�too_many_requests�too_manyi�)�header_fields_too_large�fields_too_largei�)�no_response�nonei�)�
retry_with�retryi�)�$blocked_by_windows_parental_controls�parental_controlsi�)�unavailable_for_legal_reasons�
legal_reasonsi�)�client_closed_requesti�)�internal_server_error�server_errorz/o\u✗i�)�not_implementedi�)�bad_gatewayi�)�service_unavailable�unavailablei�)�gateway_timeouti�)�http_version_not_supported�http_versioni�)�variant_also_negotiatesi�)�insufficient_storagei�)�bandwidth_limit_exceeded�	bandwidthi�)�not_extendedi�)�network_authentication_required�network_auth�network_authentication�status_codes)�namec�J��tj�D]N\}}|D]D}tt||�|j	d�r�&tt|j�|��F�Pd��t�2tdzdj�fd�tt�D��zayday)N)�\�/c�N�djd�t|D��}d||fzS)Nz, c3�(K�|]
}d|�d����y�w)z``N�)�.0�ns  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/status_codes.py�	<genexpr>z%_init.<locals>.doc.<locals>.<genexpr>us����;�l��B�q�c��*�l�s�z* %d: %s)�join�_codes)�code�namess  r��docz_init.<locals>.docts)���	�	�;�f�T�l�;�;���T�5�M�)�)��
c3�.�K�|]}�|����y�w)Nr�)r�r�r�s  �r�r�z_init.<locals>.<genexpr>zs�����"H���3�t�9��s�)	r��items�setattr�codes�
startswith�upper�__doc__r��sorted)r��titles�titler�s   @r��_initr�ms����������f��E��E�5�$�'��#�#�K�0���u�{�{�}�d�3��'�*���	�$�����"H����"H�H�H���r�N)r��
structuresrr�r�r�r�r�r��<module>r�s5���(#�Q
���Q
��	!�Q
���	Q
�
��Q
��	1�
Q
��	H�Q
���Q
���Q
��	D�Q
���Q
��	#�Q
��	'�Q
��	M�Q
��	�Q
� ��!Q
�$�	�%Q
�&�	/�'Q
�(��)Q
�*�	�+Q
�,�	�-Q
�.��/Q
�0�	�1Q
�2�	?�3Q
�4�
�5Q
�@�	�AQ
�B�	�CQ
�D�	(�EQ
�F��GQ
�H�	�IQ
�J�	.�KQ
�L�	�MQ
�N�	P�OQ
�P�	'�QQ
�R��SQ
�T��UQ
�V�	�WQ
�X�	0�YQ
�Z�	&�[Q
�\�	#�]Q
�^�	F�_Q
�`�
�aQ
�j�	 �kQ
�l�	3�mQ
�n�	!�oQ
�p�	2�qQ
�r��sQ
�t�	,�uQ
�v�	.�wQ
�x�	(�yQ
�z�	2�{Q
�|�	*�}Q
�~�	8�Q
�@�	 �AQ
�B�	 �CQ
�D�	F�EQ
�F�	;�GQ
�H�	#�IQ
�L�	A�MQ
�N�	�OQ
�P�	�QQ
�R�	/�SQ
�T�	�UQ
�V�	7�WQ
�X�	%�YQ
�Z�	"�[Q
�\�	2�]Q
�^�	�_Q
�`�	V�aQ
��f	��'���&�r�python3.12/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-312.pyc000064400000003024151732702560023415 0ustar00�

R`i���dZddlmZddlZejZeddk(Zeddk(ZddlZddlm	Z	ddl
mZddlm
Z
mZmZdd	lmZdd
lmZddlmZddlmZmZmZmZmZmZmZmZm Z m!Z!dd
l"m#Z#m$Z$m%Z%m&Z&m'Z'e(Z)e(Z(e*Z*e(e*fZ+e,e-fZ.e,fZ/y)z�
requests.compat
~~~~~~~~~~~~~~~

This module previously handled import compatibility issues
between Python 2 and Python 3. It remains for backwards
compatibility until the next major version.
�)�chardetN��)�JSONDecodeError)�OrderedDict)�Callable�Mapping�MutableMapping)�	cookiejar)�Morsel)�StringIO)
�quote�
quote_plus�unquote�unquote_plus�	urldefrag�	urlencode�urljoin�urlparse�urlsplit�
urlunparse)�
getproxies�getproxies_environment�parse_http_list�proxy_bypass�proxy_bypass_environment)0�__doc__�pip._vendorr�sys�version_info�_ver�is_py2�is_py3�jsonr�collectionsr�collections.abcrr	r
�httpr�	cookielib�http.cookiesr�ior
�urllib.parserrrrrrrrrr�urllib.requestrrrrr�str�builtin_str�bytes�
basestring�int�float�
numeric_types�
integer_types����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/compat.py�<module>r8s���� �
�����
�a��A���
�a��A���� �$�=�=�'���
�������	��
���5�\�
��e��
���
r6python3.12/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-312.pyc000064400000051513151732702560023743 0ustar00�

R`i�L���dZddlZddlZddlmZmZddlmZddlm	Z
ddlmZmZm
Z
mZddlmZddlmZmZdd	lmZdd
lmZmZddlmZddlmZdd
lmZddlmZddl m!Z!m"Z"ddl#m$Z$ddl%m&Z&m'Z'm	Z	m(Z(m)Z)m*Z*mZm+Z+m,Z,mZddl-m.Z.ddl/m0Z0ddl1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8	ddl9m:Z:dZ<dZ=dZ>dZ?Gd�d�Z@Gd�de@�ZAy#e;$rd�Z:Y�(wxYw)z�
requests.adapters
~~~~~~~~~~~~~~~~~

This module contains the transport adapters that Requests uses to define
and maintain connections.
�N)�ClosedPoolError�ConnectTimeoutError)�	HTTPError)�
InvalidHeader)�LocationValueError�
MaxRetryError�NewConnectionError�
ProtocolError)�
ProxyError)�ReadTimeoutError�
ResponseError)�SSLError)�PoolManager�proxy_from_url)�Timeout)�	parse_url)�Retry�)�_basic_auth_str)�
basestring�urlparse)�extract_cookies_to_jar)
�ConnectionError�ConnectTimeoutr�InvalidProxyURL�
InvalidSchema�
InvalidURLr�ReadTimeout�
RetryErrorr)�Response)�CaseInsensitiveDict)�DEFAULT_CA_BUNDLE_PATH�extract_zipped_paths�get_auth_from_url�get_encoding_from_headers�prepend_scheme_if_needed�select_proxy�
urldefragauth)�SOCKSProxyManagerc��td��)Nz'Missing dependencies for SOCKS support.)r)�args�kwargss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/adapters.pyr)r)<s���E�F�F�F�
c�2��eZdZdZ�fd�Z	dd�Zd�Z�xZS)�BaseAdapterzThe Base Transport Adapterc�"��t�|��y�N)�super�__init__)�self�	__class__s �r-r5zBaseAdapter.__init__Is���
���r.c��t�)aCSends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        ��NotImplementedError)r6�request�stream�timeout�verify�cert�proxiess       r-�sendzBaseAdapter.sendLs
��""�!r.c��t�)z!Cleans up adapter specific items.r9)r6s r-�closezBaseAdapter.close_s��!�!r.�FNTNN)�__name__�
__module__�__qualname__�__doc__r5rArC�
__classcell__�r7s@r-r1r1Fs���$��TX�"�&"r.r1c���eZdZdZgd�Zeeeef�fd�	Zd�Z	d�Z
efd�Zd�Zd�Z
d	�Zdd
�Zd�Zd�Zd
�Zd�Z	dd�Z�xZS)�HTTPAdaptera�The built-in HTTP Adapter for urllib3.

    Provides a general-case interface for Requests sessions to contact HTTP and
    HTTPS urls by implementing the Transport Adapter interface. This class will
    usually be created by the :class:`Session <Session>` class under the
    covers.

    :param pool_connections: The number of urllib3 connection pools to cache.
    :param pool_maxsize: The maximum number of connections to save in the pool.
    :param max_retries: The maximum number of retries each connection
        should attempt. Note, this applies only to failed DNS lookups, socket
        connections and connection timeouts, never to requests where data has
        made it to the server. By default, Requests does not retry failed
        connections. If you need granular control over the conditions under
        which we retry a request, import urllib3's ``Retry`` class and pass
        that instead.
    :param pool_block: Whether the connection pool should block for connections.

    Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> a = requests.adapters.HTTPAdapter(max_retries=3)
      >>> s.mount('http://', a)
    )�max_retries�config�_pool_connections�
_pool_maxsize�_pool_blockc���|tk(rtdd��|_ntj|�|_i|_i|_t�|��||_||_	||_
|j|||��y)NrF)�read��block)�DEFAULT_RETRIESrrM�from_intrN�
proxy_managerr4r5rOrPrQ�init_poolmanager)r6�pool_connections�pool_maxsizerM�
pool_blockr7s     �r-r5zHTTPAdapter.__init__�su����/�)�$�Q�U�3�D��$�~�~�k�:�D��������
����!1���)���%������.��J��Or.c	�X�|jD�cic]}|t||d���c}Scc}wr3)�	__attrs__�getattr)r6�attrs  r-�__getstate__zHTTPAdapter.__getstate__�s,��<@�N�N�K�N�D��g�d�D�$�/�/�N�K�K��Ks�'c���i|_i|_|j�D]\}}t|||��|j	|j
|j|j��y)NrT)rXrN�items�setattrrYrOrPrQ)r6�stater`�values    r-�__setstate__zHTTPAdapter.__setstate__�sa�� ������ �;�;�=�K�D�%��D�$��&�)�	
����"�"�D�$6�$6�d�>N�>N�	�	
r.c�V�||_||_||_td|||d�|��|_y)aInitializes a urllib3 PoolManager.

        This method should not be called from user code, and is only
        exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param connections: The number of urllib3 connection pools to cache.
        :param maxsize: The maximum number of connections to save in the pool.
        :param block: Block when no free connections are available.
        :param pool_kwargs: Extra keyword arguments used to initialize the Pool Manager.
        )�	num_pools�maxsizerUN�)rOrPrQr�poolmanager)r6�connectionsrjrU�pool_kwargss     r-rYzHTTPAdapter.init_poolmanager�sA��"-���$��� ���&�
�!���
��	
��r.c	��||jvr|j|}|S|j�jd�rOt|�\}}t	|f|||j
|j|jd�|��x}|j|<|S|j|�}t|f||j
|j|jd�|��x}|j|<|S)a�Return urllib3 ProxyManager for the given proxy.

        This method should not be called from user code, and is only
        exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxy: The proxy to return a urllib3 ProxyManager for.
        :param proxy_kwargs: Extra keyword arguments used to configure the Proxy Manager.
        :returns: ProxyManager
        :rtype: urllib3.ProxyManager
        �socks)�username�passwordrirjrU)�
proxy_headersrirjrU)
rX�lower�
startswithr$r)rOrPrQrsr)r6�proxy�proxy_kwargs�managerrqrrrss       r-�proxy_manager_forzHTTPAdapter.proxy_manager_for�s	���D�&�&�&��(�(��/�G�.��-�[�[�]�
%�
%�g�
.�!2�5�!9��H�h�2C��3�!�!��0�0��*�*��&�&�
3��3�
�G�d�(�(��/�(��!�.�.�u�5�M�2@��3�+��0�0��*�*��&�&�3��
3�
�G�d�(�(��/��r.c��|j�jd�r�|r~d}|dur|}|stt�}|rtj
j
|�std|����d|_tj
j|�s||_
n||_nd|_d|_
d|_|r�t|t�s|d|_|d|_n||_d|_|jrAtj
j
|j�std	|j����|jrBtj
j
|j�std
|j����yyy)aAVerify a SSL certificate. This method should not be called from user
        code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param conn: The urllib3 connection object associated with the cert.
        :param url: The requested URL.
        :param verify: Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use
        :param cert: The SSL certificate to verify.
        �httpsNTzCCould not find a suitable TLS CA certificate bundle, invalid path: �
CERT_REQUIRED�	CERT_NONErrz7Could not find the TLS certificate file, invalid path: z/Could not find the TLS key file, invalid path: )rtrur#r"�os�path�exists�OSError�	cert_reqs�isdir�ca_certs�ca_cert_dir�
isinstancer�	cert_file�key_file)r6�conn�urlr>r?�cert_locs      r-�cert_verifyzHTTPAdapter.cert_verify�sX���9�9�;�!�!�'�*�v��H��T�!�!���/�0F�G���2�7�7�>�>�(�#;��%�%-�J�0���
-�D�N��7�7�=�=��*� (��
�#+�� �(�D�N� �D�M�#�D����d�J�/�!%�a���� $�Q���
�!%��� $��
��~�~�b�g�g�n�n�T�^�^�&D��%�%)�^�^�$4�6����}�}�R�W�W�^�^�D�M�M�%B��E�d�m�m�_�U���&C�}�r.c���t�}t|dd�|_tt|di��|_t|j�|_||_|jj|_t|jt�r!|jjd�|_
n|j|_
t|j||�||_||_|S)a�Builds a :class:`Response <requests.Response>` object from a urllib3
        response. This should not be called from user code, and is only exposed
        for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`

        :param req: The :class:`PreparedRequest <PreparedRequest>` used to generate the response.
        :param resp: The urllib3 response object.
        :rtype: requests.Response
        �statusN�headerszutf-8)r r_�status_coder!r�r%�encoding�raw�reasonr�r��bytes�decoder�cookiesr;�
connection)r6�req�resp�responses    r-�build_responsezHTTPAdapter.build_response&s����:�� '�t�X�t�<���/�w�t�Y��/K�L���6�h�6F�6F�G������"�,�,�-�-����c�g�g�u�%��7�7�>�>�'�2�H�L��7�7�H�L�	�x�/�/��d�;����"����r.c�2�t||�}|rRt|d�}t|�}|jst	d��|j|�}|j
|�}|St|�}|j�}|jj
|�}|S)a�Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        :rtype: urllib3.ConnectionPool
        �httpzFPlease check proxy URL. It is malformed and could be missing the host.)
r'r&r�hostrry�connection_from_urlr�geturlrl)r6r�r@rv�	proxy_urlrXr��parseds        r-�get_connectionzHTTPAdapter.get_connectionKs����S�'�*���,�U�F�;�E�!�%�(�I��>�>�%�5���!�2�2�5�9�M� �4�4�S�9�D���	�c�]�F��-�-�/�C��#�#�7�7��<�D��r.c��|jj�|jj�D]}|j��y)z�Disposes of any internal state.

        Currently, this closes the PoolManager and any active ProxyManager,
        which closes any pooled connections.
        N)rl�clearrX�values)r6rvs  r-rCzHTTPAdapter.closehs8��	
����� ��'�'�.�.�0�E��K�K�M�1r.c�<�t|j|�}t|j�j}|xr|dk7}d}|r4t|�jj	�}|jd�}|j}|r|st|j�}|S)a?Obtain the url to use when making the final request.

        If the message is being sent through a HTTP proxy, the full URL has to
        be used. Otherwise, we should only use the path portion of the URL.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.
        :rtype: str
        r{Frp)r'r�r�schemertru�path_urlr()	r6r;r@rvr��is_proxied_http_request�using_socks_proxy�proxy_schemer�s	         r-�request_urlzHTTPAdapter.request_urlrs����W�[�[�'�2���'�+�+�&�-�-��"'�"=�F�g�,=��!���#�E�?�1�1�7�7�9�L� ,� 7� 7�� @������"�+<�����,�C��
r.c��y)a"Add any headers needed by the connection. As of v2.0 this does
        nothing by default, but is left for overriding by users that subclass
        the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
        :param kwargs: The keyword arguments from the call to send().
        Nrk)r6r;r,s   r-�add_headerszHTTPAdapter.add_headers�s��	
r.c�H�i}t|�\}}|rt||�|d<|S)aReturns a dictionary of the headers to add to any request sent
        through a proxy. This works with urllib3 magic to ensure that they are
        correctly sent to the proxy, rather than in a tunnelled request if
        CONNECT is being used.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxy: The url of the proxy being used for this request.
        :rtype: dict
        zProxy-Authorization)r$r)r6rvr�rqrrs     r-rszHTTPAdapter.proxy_headers�s2����.�u�5���(��-<�X�x�-P�G�)�*��r.c
���	|j|j|�}|j	||j||�|j||�}	|j
||||||��|jduxsd|jv}
t|t�r	|\}}t||��}nt|t�rn
t||��}	|j|j|	|j|jdddd|j||
�	�}
|jI||
�S#t$r}t||���d}~wwxYw#t$rtd|�d���wxYw#t t"f$r}t%||���d}~wt&$r�}t|j(t*�r't|j(t,�s
t/||���t|j(t0�r
t3||���t|j(t4�r
t7||���t|j(t8�r
t;||���t%||���d}~wt<$r}t%||���d}~wt4$r}t7|��d}~wt8t>f$r]}t|t8�r
t;||���t|t@�r
tC||���t|tD�r
tG||����d}~wwxYw)
aSends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls whether
            we verify the server's TLS certificate, or a string, in which case it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        :rtype: requests.Response
        )r;N)r<r=r>r?r@zContent-Length)�connectrSzInvalid timeout za. Pass a (connect, read) timeout tuple, or a single float to set both timeouts to the same value.F)�methodr��bodyr��redirect�assert_same_host�preload_content�decode_content�retriesr=�chunked)%r�r�rrr�r�r�r�r�r��tuple�TimeoutSauce�
ValueError�urlopenr�rMr
r�rrr�rr	rr
r�_ProxyErrorr�	_SSLErrorrr�
_HTTPErrorrr�_InvalidHeaderrr�)r6r;r<r=r>r?r@r��er�r�r�rSr��errs               r-rAzHTTPAdapter.send�s���&	1��&�&�w�{�{�G�<�D�	
����w�{�{�F�D�9����w��0�����������
	�	
��|�|�t�+�R�/?�7�?�?�/R�S���g�u�%�
� '�
���&�w�T�B�����
.��"�7��A�G�3	��<�<��~�~���\�\�����!&� %�$��(�(��� ��D�h�"�"�7�D�1�1��g"�	1��Q��0�0��	1��(�
� �&�w�i�0P�Q���
��2�w�'�	8�!�#�w�7�7���	6��!�(�(�$7�8�!�!�(�(�,>�?�(��G�<�<��!�(�(�M�2� ��G�4�4��!�(�(�K�0� ��G�4�4��!�(�(�I�.��q�'�2�2�!�!�W�5�5���	6�!�!�W�5�5���	 ��Q�-����:�&�		��!�Y�'��q�'�2�2��A�/�0�!�!�W�5�5��A�~�.�#�A�w�7�7���		�sn�D�D;�AE�	D8�&
D3�3D8�;E�K!�&
E3�3K!�?CI�K!�
I�K!�'I2�2K!�AK�K!r3rD)rErFrGrHr^�DEFAULT_POOLSIZErV�DEFAULT_POOLBLOCKr5rargrYryr�r�r�rCr�r�rsrArIrJs@r-rLrLdsp����4�I�*�%�#�$�P�,L�
�+<�
�4$�L7�r#�J�:��:
��,TX�h2r.rL)BrH�os.pathr~�socket�pip._vendor.urllib3.exceptionsrrrr�rr�rrr	r
rr�rr
rr��pip._vendor.urllib3.poolmanagerrr�pip._vendor.urllib3.utilrr�r�pip._vendor.urllib3.util.retryr�authr�compatrrr�r�
exceptionsrrrrrrr�modelsr �
structuresr!�utilsr"r#r$r%r&r'r(�!pip._vendor.urllib3.contrib.socksr)�ImportErrorr�r�rV�DEFAULT_POOL_TIMEOUTr1rLrkr.r-�<module>r�s�����
�O�B�J���E�J�@�G�<�.�0�!�(�+�����+����G�C���������"�"�<v2�+�v2��U�G�G�G�s�$C�C�Cpython3.12/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-312.pyc000064400000001447151732702570023720 0ustar00�

R`i����ddlZdD]rZdezZee�e�e<eej�D]FZeek(sejedz�s�ee	d�dZ
ejeejde
z<�H�ty)�N)�urllib3�idna�chardetzpip._vendor.�.zpip._vendor.requests.packages.)�sys�package�vendored_package�
__import__�locals�list�modules�mod�
startswith�len�unprefixed_mod����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/packages.py�<module>rs���
�
.�G�%��/��"�#3�4�F�H�W���C�K�K� ���"�"�c�n�n�5E��5K�&L� ��^�!4�!5�6�N�MP�[�[�Y\�M]�C�K�K�8�>�I�J�!�.rpython3.12/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-312.pyc000064400000033222151732702570023077 0ustar00�

R`i�'����dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZm
Z
mZddlmZddlmZd	Zd
Zd�ZGd�d
�ZGd�de�ZGd�de�ZGd�de�Zy)z]
requests.auth
~~~~~~~~~~~~~

This module contains the authentication handlers for Requests.
�N)�	b64encode�)�to_native_string)�
basestring�str�urlparse)�extract_cookies_to_jar)�parse_dict_headerz!application/x-www-form-urlencodedzmultipart/form-datac	��t|t�s5tjdj	|�t
��t
|�}t|t�s>tjdj	t|��t
��t
|�}t|t�r|jd�}t|t�r|jd�}dttdj||f��j��z}|S)zReturns a Basic Auth string.z�Non-string usernames will no longer be supported in Requests 3.0.0. Please convert the object you've passed in ({!r}) to a string or bytes object in the near future to avoid problems.)�categoryz�Non-string passwords will no longer be supported in Requests 3.0.0. Please convert the object you've passed in ({!r}) to a string or bytes object in the near future to avoid problems.�latin1zBasic �:)
�
isinstancer�warnings�warn�format�DeprecationWarningr�type�encoderr�join�strip)�username�password�authstrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/auth.py�_basic_auth_strrs����h�
�+��
�
�
���x�(�'�	
��x�=���h�
�+��
�
�
���t�H�~�.�'�	
��x�=���(�C� ��?�?�8�,���(�C� ��?�?�8�,���)��$�)�)�X�x�0�1�2�8�8�:���G��N�c��eZdZdZd�Zy)�AuthBasez4Base class that all auth implementations derive fromc��td��)NzAuth hooks must be callable.)�NotImplementedError��self�rs  r�__call__zAuthBase.__call__Hs��!�"@�A�ArN��__name__�
__module__�__qualname__�__doc__r%�rrrrEs��>�Brrc�(�eZdZdZd�Zd�Zd�Zd�Zy)�
HTTPBasicAuthz?Attaches HTTP Basic Authentication to the given Request object.c� �||_||_y�N)rr�r#rrs   r�__init__zHTTPBasicAuth.__init__Os�� ��
� ��
rc	�|�t|jt|dd�k(|jt|dd�k(g�S�Nrr��allr�getattrr�r#�others  r�__eq__zHTTPBasicAuth.__eq__S�>����
�
���
�D�!A�A��
�
���
�D�!A�A�
�
�	
rc��||k(Sr/r+r7s  r�__ne__zHTTPBasicAuth.__ne__[����5�=� � rc�`�t|j|j�|jd<|S)N�
Authorization�rrr�headersr"s  rr%zHTTPBasicAuth.__call__^s$��%4�T�]�]�D�M�M�%R��	�	�/�"��rN)r'r(r)r*r1r9r<r%r+rrr-r-Ls��I�!�
�!�rr-c��eZdZdZd�Zy)�
HTTPProxyAuthz=Attaches HTTP Proxy Authentication to a given Request object.c�`�t|j|j�|jd<|S)NzProxy-Authorizationr@r"s  rr%zHTTPProxyAuth.__call__fs%��+:�4�=�=�$�-�-�+X��	�	�'�(��rNr&r+rrrCrCcs
��G�rrCc�@�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)�HTTPDigestAuthz@Attaches HTTP Digest Authentication to the given Request object.c�R�||_||_tj�|_yr/)rr�	threading�local�
_thread_localr0s   rr1zHTTPDigestAuth.__init__ns�� ��
� ��
�&�_�_�.��rc��t|jd�sgd|j_d|j_d|j_i|j_d|j_d|j_yy)N�initT�r)�hasattrrJrL�
last_nonce�nonce_count�chal�pos�
num_401_calls)r#s r�init_per_thread_statez$HTTPDigestAuth.init_per_thread_statetsk���t�)�)�6�2�&*�D���#�,.�D���)�-.�D���*�&(�D���#�%)�D���"�/3�D���,�
3rc�B��|jjd}|jjd}|jjjd�}|jjjd�}|jjjd�}d�|�d}n|j�}|dk(s|dk(rd	�}	|	�n |d
k(rd�}
|
�n|dk(rd
�}|�n
|dk(rd�}|��fd�}
��yd}t	|�}|j
xsd}|jr|d|j��z
}|j�d|�d|j��}|�d|��}�|�}�|�}||jjk(r |jxjdz
c_
nd|j_
|jjd�}t|jj�jd�}||jd�z
}|tj�jd�z
}|tj d�z
}t#j$|�j'�dd}|dk(r�|�d|�d|���}|s|
||�d|���}n0|dk(sd|j)d�vr|�d|�d|�d|��}|
||�}ny||j_	d|j�d|�d|�d|�d |�d!�}|r	|d"|�d!�z
}|r	|d#|�d!�z
}|r	|d$|�d!�z
}|r|d%|�d&|�d!�z
}d'|��S)(z
        :rtype: str
        �realm�nonce�qop�	algorithm�opaqueN�MD5zMD5-SESSc��t|t�r|jd�}tj|�j�S�N�utf-8)rrr�hashlib�md5�	hexdigest��xs r�md5_utf8z4HTTPDigestAuth.build_digest_header.<locals>.md5_utf8�s1���a��%�����)�A��{�{�1�~�/�/�1�1r�SHAc��t|t�r|jd�}tj|�j�Sr])rrrr_�sha1rarbs r�sha_utf8z4HTTPDigestAuth.build_digest_header.<locals>.sha_utf8�s1���a��%�����)�A��|�|�A��0�0�2�2rzSHA-256c��t|t�r|jd�}tj|�j�Sr])rrrr_�sha256rarbs r�sha256_utf8z7HTTPDigestAuth.build_digest_header.<locals>.sha256_utf8��2���a��%�����)�A��~�~�a�(�2�2�4�4rzSHA-512c��t|t�r|jd�}tj|�j�Sr])rrrr_�sha512rarbs r�sha512_utf8z7HTTPDigestAuth.build_digest_header.<locals>.sha512_utf8�rlrc����|�d|���S)N�:r+)�s�d�	hash_utf8s  �r�<lambda>z4HTTPDigestAuth.build_digest_header.<locals>.<lambda>�s���)�q�c��1�#�J�/r�/�?rqr�08xr^���auth�,z:auth:z
username="z
", realm="z
", nonce="z", uri="z
", response="�"z
, opaque="z
, algorithm="z
, digest="z, qop="auth", nc=z
, cnonce="zDigest )rJrQ�get�upperr�path�queryrrrOrPrr�time�ctime�os�urandomr_rgra�split)r#�method�urlrVrWrXrYrZ�
_algorithmrdrhrkro�KD�entdig�p_parsedr��A1�A2�HA1�HA2�ncvaluerr�cnonce�respdig�noncebit�baserts                           @r�build_digest_headerz"HTTPDigestAuth.build_digest_header~s����
�"�"�'�'��0���"�"�'�'��0��� � �%�%�)�)�%�0���&�&�+�+�/�/��<�	��#�#�(�(�,�,�X�6���	����J�"���*�J����*�
�":�
2�
!�I�
�5�
 �
3�
!�I�
�9�
$�
5�
$�I�
�9�
$�
5�
$�I�
/��������C�=���}�}�#����>�>��a����'�(�(�D��
�
��a��w�a��
�
��
7���x�q���
����m����m���D�&�&�1�1�1����*�*�a�/�*�-.�D���*��'�'�3�3�C�8����"�"�.�.�/�6�6�w�?��	�U�\�\�'�
"�"��	�T�Z�Z�\�
 �
 ��
)�)��	�R�Z�Z��]������a��*�*�,�S�b�1����#��s�e�1�U�G�1�V�H�5�6�C������q���.�/�G�
�F�]�f��	�	�#��6����'��!�F�8�6�#��?�H���h�'�G��(-����%������z�%��
�5�'�J��6��w�i�q�
2�	
���j����*�*�D���m�I�;�a�0�0�D���j����*�*�D���'��y�
�6�(�!�D�D�D�����rc�@�|jrd|j_yy)z)Reset num_401_calls counter on redirects.rN)�is_redirectrJrS)r#r$�kwargss   r�handle_redirectzHTTPDigestAuth.handle_redirect�s���=�=�/0�D���,�rc�l�d|jcxkrdksnd|j_|S|jj�9|jj
j
|jj�|jjdd�}d|j�v�rz|jjdk�r`|jxjdz
c_tjdtj�	�}t|jd|d�
��|j_|j |j#�|jj%�}t'|j(|j|j*�|j-|j(�|j/|j0|j2�|jd<|j4j6|fi|��}|j8j;|�||_|Sd|j_|S)zo
        Takes the given response and tries digest-auth, if needed.

        :rtype: requests.Response
        i�i�rzwww-authenticaterM�digest�zdigest )�flags)�countr?)�status_coderJrSrR�request�body�seekrAr~�lower�re�compile�
IGNORECASEr
�subrQ�content�close�copyr	�_cookies�raw�prepare_cookiesr�r�r��
connection�send�history�append)r#r$r��s_auth�pat�prep�_rs       r�
handle_401zHTTPDigestAuth.handle_401�s����a�m�m�)�c�)�/0�D���,��H����!�!�-�
�I�I�N�N���� 2� 2� 6� 6�7������1�2�6���v�|�|�~�%�$�*<�*<�*J�*J�Q�*N����,�,��1�,��*�*�Z�r�}�}�=�C�&7�����F�RS��8T�&U�D���#�
�I�I�
�G�G�I��9�9�>�>�#�D�"�4�=�=�!�)�)�Q�U�U�C�� � ����/�,0�,D�,D����T�X�X�-�D�L�L��)�#����"�"�4�2�6�2�B��J�J���a� ��B�J��I�+,����(��rc���|j�|jjr3|j|j|j
�|jd<	|jj�|j_	|jd|j�|jd|j�d|j_|S#t$rd|j_	Y�gwxYw)Nr?�responser)rTrJrOr�r�r�rAr��tellrR�AttributeError�
register_hookr�r�rSr"s  rr%zHTTPDigestAuth.__call__s����"�"�$����(�(�)-�)A�)A�!�(�(�A�E�E�)R�A�I�I�o�&�	*�%&�V�V�[�[�]�D���"�	
���
�D�O�O�4�	���
�D�$8�$8�9�+,����(�����	*�
&*�D���"�	*�s�)C�C,�+C,c	�|�t|jt|dd�k(|jt|dd�k(g�Sr3r4r7s  rr9zHTTPDigestAuth.__eq__2r:rc��||k(Sr/r+r7s  rr<zHTTPDigestAuth.__ne__:r=rN)r'r(r)r*r1rTr�r�r�r%r9r<r+rrrFrFks0��J�/�4�l �\1�
+�Z�(
�!rrF)r*r_r�r�rHr�r�base64r�_internal_utilsr�compatrrr�cookiesr	�utilsr
�CONTENT_TYPE_FORM_URLENCODED�CONTENT_TYPE_MULTI_PARTrrr-rCrFr+rr�<module>r�st����	�	�����-�-�-�+�$�B��/��)�XB�B��H��.�M��P!�X�P!rpython3.12/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-312.pyc000064400000001171151732702570024415 0ustar00�

R`i���,�dZdZdZdZdZdZdZdZdZd	Z	y
)�requestszPython HTTP for Humans.zhttps://requests.readthedocs.ioz2.31.0i1z
Kenneth Reitzzme@kennethreitz.orgz
Apache 2.0zCopyright Kenneth Reitzu✨ 🍰 ✨N)
�	__title__�__description__�__url__�__version__�	__build__�
__author__�__author_email__�__license__�
__copyright__�__cake__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/__version__.py�<module>rs:��

�	�+��
+�����	�
�
�(����)�
�%�rpython3.12/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-312.pyc000064400000066172151732702600024010 0ustar00�

R`i�v���dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZmZmZmZdd
lmZmZmZmZddlmZmZmZmZddlmZmZdd
l m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3ejhdk(r
ejjZ6nejZ6efd�Z7efd�Z8Gd�d�Z9Gd�de9�Z:d�Z;y)z�
requests.sessions
~~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
�N)�OrderedDict)�	timedelta�)�to_native_string)�HTTPAdapter)�_basic_auth_str)�Mapping�	cookielib�urljoin�urlparse)�RequestsCookieJar�cookiejar_from_dict�extract_cookies_to_jar�
merge_cookies)�ChunkedEncodingError�ContentDecodingError�
InvalidSchema�TooManyRedirects)�
default_hooks�
dispatch_hook)�DEFAULT_REDIRECT_LIMIT�REDIRECT_STATI�PreparedRequest�Request)�codes)�CaseInsensitiveDict)
�
DEFAULT_PORTS�default_headers�get_auth_from_url�get_environ_proxies�get_netrc_auth�requote_uri�resolve_proxies�rewind_body�should_bypass_proxies�to_key_val_list�win32c��|�|S|�|St|t�rt|t�s|S|t|��}|jt|��|j	�D��cgc]
\}}|��	|��}}}|D]}||=�|Scc}}w)z�Determines appropriate setting for a given request, taking into account
    the explicit setting on that request, and the setting in the session. If a
    setting is a dictionary, they will be merged together using `dict_class`
    )�
isinstancer	r&�update�items)�request_setting�session_setting�
dict_class�merged_setting�k�v�	none_keys�keys        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/sessions.py�
merge_settingr5=s�����������	�?�G�,��O�W�1U������ @�A�N����/�/�:�;�"0�!5�!5�!7�E�!7�v��1�1�9��!7�I�E����3������	Fs�)
B�4Bc�|�|�|jd�gk(r|S|�|jd�gk(r|St|||�S)z�Properly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    �response)�getr5)�
request_hooks�
session_hooksr.s   r4�merge_hooksr;[sO����
� 1� 1�*� =�� C�����
� 1� 1�*� =�� C�����
�z�B�B�c�>�eZdZd�Zd�Z						dd�Zd�Zd�Zd�Zy)	�SessionRedirectMixinc�t�|jr,|jd}|jd�}t|d�Sy)z7Receives a Response. Returns a redirect URI or ``None``�location�latin1�utf8N)�is_redirect�headers�encoder)�self�respr@s   r4�get_redirect_targetz(SessionRedirectMixin.get_redirect_targetks;������|�|�J�/�H� ���x�0�H�#�H�f�5�5�r<c���t|�}t|�}|j|jk7ry|jdk(r,|jdvr|jdk(r|jdvry|j|jk7}|j|jk7}t	j
|jd�df}|s|j|vr|j|vry|xs|S)zFDecide whether Authorization header should be removed when redirectingT�http)�PN�https)i�NFN)r�hostname�scheme�portrr8)rF�old_url�new_url�
old_parsed�
new_parsed�changed_port�changed_scheme�default_ports        r4�should_strip_authz&SessionRedirectMixin.should_strip_auths����g�&�
��g�&�
����*�"5�"5�5��
����'����:�-��!�!�W�,����;�.��"���*�/�/�9��#�*�*�j�.?�.?�?��%�)�)�*�*;�*;�T�B�D�I������<�/����<�/���-�~�-r<Nc	
+��K�g}
|j|�}t|j�j}|�r�|j	�}
|
j|�|
dd|_	|jt|j�|jk\rtd|j�d�|���|j!�|j#d�r;t|j�}d	j%t'|j(�|g�}t|�}|jd
k(r|r|j+|��}n|jr|j}|j-�}|j.s t1|jt3|��}nt3|�}t'|�|
_|j5|
|�|j6t8j:t8j<fvr,d}|D]}|
j>jA|d�� d|
_!|
j>}|jAd
d�tE|
jF||j�tI|
jF|jJ�|
jM|
jF�|jO|
|�}|jQ|
|�|
jRduxr
d|vxsd|v}|rtU|
�|
}|r|��nP|jV|f|||||dd�|	��}tE|jJ|
|j�|j|�}|��|r���yy#tttf$r |jjd��Y���wxYw�w)zBReceives a Response. Returns a generator of Responses or Requests.rNF)�decode_contentz	Exceeded z redirects.)r7z//�:�)�fragment)�Content-LengthzContent-Type�Transfer-Encoding�Cookier]r^)�stream�timeout�verify�cert�proxies�allow_redirects),rHr�urlr\�copy�append�history�contentrr�RuntimeError�raw�read�len�
max_redirectsr�close�
startswith�joinrrN�_replace�geturl�netlocrr"�rebuild_method�status_coder�temporary_redirect�permanent_redirectrD�pop�bodyr�_cookiesr�cookies�prepare_cookies�rebuild_proxies�rebuild_auth�_body_positionr$�send)rFrG�reqr`rarbrcrd�yield_requests�adapter_kwargs�histrf�previous_fragment�prepared_request�parsed_rurl�parsed�purged_headers�headerrD�
rewindables                    r4�resolve_redirectsz&SessionRedirectMixin.resolve_redirects�s/�������&�&�t�,��$�S�W�W�-�6�6���"�x�x�z��
�K�K������8�D�L�
4�����4�<�<� �D�$6�$6�6�&��� 2� 2�3�;�?�$���

�J�J�L��~�~�d�#�&�t�x�x�0���h�h� 0��1C�1C� D�c�J�K���c�]�F����"�$�):����2C��D�����$*�O�O�!��-�-�/�C�
�=�=��d�h�h��C�(8�9��!�#�&��#3�C�#8�� ���� 0�$�7�����(�(��(�(�(��
"Y��,�F�$�,�,�0�0���>�-�(,� �%�&�.�.�G��K�K��$�'�

#�#3�#<�#<�c�4�8�8�L��*�3�3�T�\�\�B��,�,�-=�-F�-F�G��*�*�+;�W�E�G����.��5�
*�8�8��D�� �G�+�M�/B�g�/M�
�
��,�-�#�C���	�!�t�y�y��	�!�#�!��#�$)�	�%�	��'�t�|�|�5E�t�x�x�P��.�.�t�4���
�Q��)�*>��M�
4����
�
�U�
�3�
4�s1�A!M,�$L5�0KM,�3M,�50M)�%M,�(M)�)M,c���|j}|j}d|vr)|j|jj|�r|d=|jrt|�nd}|�|j
|�yy)z�When being redirected we may want to strip authentication from the
        request to avoid leaking credentials. This method intelligently removes
        and reapplies authentication where possible to avoid credential loss.
        �
AuthorizationN)rDrfrW�request�	trust_envr!�prepare_auth)rFr�r7rDrf�new_auths      r4r�z!SessionRedirectMixin.rebuild_authsw��
#�*�*���"�"���g�%�$�*@�*@���� � �#�+
�
��(�+/�.�.�>�#�&�d�����)�)�(�3� r<c�,�|j}t|j�j}t	|||j
�}d|vr|d=	t
||�\}}|jd�s|r|rt||�|d<|S#t$rd\}}Y�6wxYw)a�This method re-evaluates the proxy configuration by considering the
        environment variables. If we are redirected to a URL covered by
        NO_PROXY, we strip the proxy configuration. Otherwise, we set missing
        proxy keys for this URL (in case they were stripped by a previous
        redirect).

        This method also replaces the Proxy-Authorization header where
        necessary.

        :rtype: dict
        zProxy-Authorization�NNrL)
rDrrfrNr#r�r�KeyErrorrqr)rFr�rdrDrN�new_proxies�username�passwords        r4rz$SessionRedirectMixin.rebuild_proxies/s���#�*�*���*�.�.�/�6�6��%�&6�����P�� �G�+��-�.�	,�!2�;�v�3F�!G��H�h�� � ��)�h�8�-<�X�x�-P�G�)�*�����	,�!+��H�h�	,�s�B�B�Bc��|j}|jtjk(r|dk7rd}|jtjk(r|dk7rd}|jtj
k(r|dk(rd}||_y)z�When being redirected we may want to change the method of the request
        based on certain specs or browser behavior.
        �HEAD�GET�POSTN)�methodrwr�	see_other�found�moved)rFr�r7r�s    r4rvz#SessionRedirectMixin.rebuild_methodNsx��"�(�(�����5�?�?�2�v��7G��F����5�;�;�.�6�V�3C��F����5�;�;�.�6�V�3C��F�"(��r<)FNTNNF)	�__name__�
__module__�__qualname__rHrWr�r�rrv�r<r4r>r>js7���(.�H���
���z�x4�(�>)r<r>c��eZdZdZgd�Zd�Zd�Zd�Zd�Z														dd�Z	d	�Z
d
�Zd�Zdd�Z
dd
�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�Sessiona�A Requests session.

    Provides cookie persistence, connection-pooling, and configuration.

    Basic Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> s.get('https://httpbin.org/get')
      <Response [200]>

    Or as a context manager::

      >>> with requests.Session() as s:
      ...     s.get('https://httpbin.org/get')
      <Response [200]>
    )rDr}�authrd�hooks�paramsrbrc�adaptersr`r�roc�^�t�|_d|_i|_t	�|_i|_d|_d|_d|_	t|_d|_ti�|_t�|_|j#dt%��|j#dt%��y)NFTzhttps://zhttp://)rrDr�rdrr�r�r`rbrcrror�rr}rr��mountr�rFs r4�__init__zSession.__init__�s���
'�(�����	�
���#�_��
�
�����������	�4������+�2�.���$�
��
��
�
�:�{�}�-��
�
�9�k�m�,r<c��|S�Nr�r�s r4�	__enter__zSession.__enter__�s���r<c�$�|j�yr�)rp)rF�argss  r4�__exit__zSession.__exit__�s���
�
�r<c���|jxsi}t|tj�st	|�}ttt
�|j�|�}|j}|jr#|s!|jst|j�}t�}|j|jj�|j|j|j |j"t%|j&|j&t(��t%|j*|j*�t%||j�|t-|j.|j.���
|S)a�Constructs a :class:`PreparedRequest <PreparedRequest>` for
        transmission and returns it. The :class:`PreparedRequest` has settings
        merged from the :class:`Request <Request>` instance and those of the
        :class:`Session`.

        :param request: :class:`Request` instance to prepare with this
            session's settings.
        :rtype: requests.PreparedRequest
        )r.)
r�rf�files�data�jsonrDr�r�r}r�)r}r)r
�	CookieJarrrr
r�r�r!rfr�preparer��upperr�r�r�r5rDrr�r;r�)rFr�r}�merged_cookiesr��ps      r4�prepare_requestzSession.prepare_request�s���/�/�'�R���'�9�#6�#6�7�)�'�2�G�'��+�-�t�|�|�<�g�
��
�|�|���>�>�$�t�y�y�!�'�+�+�.�D����	�	�	��>�>�'�'�)�����-�-�������!�������:M��!�������=��t�T�Y�Y�/�"��g�m�m�T�Z�Z�8�	�
	
��r<Nc��t|j�||||xsi||xsi|||��
}|j|�}|xsi}|j|j||
||�}|	|
d�}|j|�|j|fi|��}|S)aw	Constructs a :class:`Request <Request>`, prepares it and sends it.
        Returns :class:`Response <Response>` object.

        :param method: method for the new :class:`Request` object.
        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of ``'filename': file-like-objects``
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple
        :param allow_redirects: (optional) Set to True by default.
        :type allow_redirects: bool
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use. Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair.
        :rtype: requests.Response
        )
r�rfrDr�r�r�r�r�r}r�)rare)rr�r��merge_environment_settingsrfr*r�)rFr�rfr�r�rDr}r�r�rarerdr�r`rbrcr�r��prep�settings�send_kwargsrGs                      r4r�zSession.request�s���z��<�<�>���������<�R����
���#�#�C�(���-�R���2�2��H�H�g�v�v�t�
���.�
��	���8�$��t�y�y��-��-���r<c�N�|jdd�|jd|fi|��S)z�Sends a GET request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        reTr���
setdefaultr��rFrf�kwargss   r4r8zSession.getQs-��	���+�T�2��t�|�|�E�3�1�&�1�1r<c�N�|jdd�|jd|fi|��S)z�Sends a OPTIONS request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        reT�OPTIONSr�r�s   r4�optionszSession.options\s-��	���+�T�2��t�|�|�I�s�5�f�5�5r<c�N�|jdd�|jd|fi|��S)z�Sends a HEAD request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        reFr�r�r�s   r4�headzSession.headgs-��	���+�U�3��t�|�|�F�C�2�6�2�2r<c�0�|jd|f||d�|��S)a�Sends a POST request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        r�)r�r��r�)rFrfr�r�r�s     r4�postzSession.postrs#���t�|�|�F�C�H�d��H��H�Hr<c�.�|jd|fd|i|��S)auSends a PUT request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        �PUTr�r��rFrfr�r�s    r4�putzSession.puts!���t�|�|�E�3�<�T�<�V�<�<r<c�.�|jd|fd|i|��S)awSends a PATCH request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        �PATCHr�r�r�s    r4�patchz
Session.patch�s!���t�|�|�G�S�>�t�>�v�>�>r<c�*�|jd|fi|��S)z�Sends a DELETE request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        �DELETEr�r�s   r4�deletezSession.delete�s���t�|�|�H�c�4�V�4�4r<c�f�|jd|j�|jd|j�|jd|j�d|vr$t	||j
|j�|d<t|t�rtd��|jdd�}|jd�}|j}|j|j��}t�}|j |fi|��}t�|z
}	t#|	�	�|_t'd
||fi|��}|j(r<|j(D]-}
t+|j,|
j.|
j0��/t+|j,||j0�|r$|j2||fi|��}|D�
cgc]}
|
��}}
ng}|r)|j5d|�|j�}||_|s%	t7|j2||fddi|���|_|s|j<|Scc}
w#t:$rY� wxYw)
zISend a given PreparedRequest.

        :rtype: requests.Response
        r`rbrcrdz#You can only send PreparedRequests.reT)rf)�secondsr7rr�)r�r`rbrcr#rdr�r)r�
ValueErrorrzr8r��get_adapterrf�preferred_clockr�r�elapsedrrirr}r�rlr��insert�next�_next�
StopIterationrj)
rFr�r�rer`r��adapter�start�rr�rG�genris
             r4r�zSession.send�s��	���(�D�K�K�0����(�D�K�K�0����&�$�)�)�,��F�"� /�����t�~�~� V�F�9���g�w�'��B�C�C�!�*�*�%6��=�����H�%���
�
���"�"�w�{�{�"�3�� �!��
�G�L�L��+�F�+��"�#�e�+���g�.��	�
�*�e�Q�9�&�9��
�9�9��	�	��&�t�|�|�T�\�\�4�8�8�L�"�	�t�|�|�W�a�e�e�<��(�$�(�(��G�>�v�>�C�(+�,���t��G�,��G���N�N�1�a� ����
�A��A�I��
��*�D�*�*�1�g�U�d�U�f�U�����
�I�I����1-��$!�
��
�s�/	H�+$H$�$	H0�/H0c��|jr�|�|jd�nd}t||��}|j�D]\}}	|j	||	��|dus|�Dt
jjd�xs#t
jjd�xs|}t||j�}t||j�}t||j�}t||j�}||||d�S)z^
        Check the environment and merge it with some settings.

        :rtype: dict
        N�no_proxy)r�T�REQUESTS_CA_BUNDLE�CURL_CA_BUNDLE)rdr`rbrc)r�r8r r+r��os�environr5rdr`rbrc)
rFrfrdr`rbrcr��env_proxiesr0r1s
          r4r�z"Session.merge_environment_settings�s����>�>�29�2E�w�{�{�:�.�4�H�-�c�H�E�K�%�+�+�-���A��"�"�1�a�(�.�
��~����J�J�N�N�#7�8���z�z�~�~�&6�7���� �����6���v�t�{�{�3���v�t�{�{�3���T�4�9�9�-��"�f��PT�U�Ur<c���|jj�D]6\}}|j�j|j��s�4|cSt	d|����)z~
        Returns the appropriate connection adapter for the given URL.

        :rtype: requests.adapters.BaseAdapter
        z&No connection adapters were found for )r�r+�lowerrqr)rFrf�prefixr�s    r4r�zSession.get_adaptersT��"&���!4�!4�!6��V�W��y�y�{�%�%�f�l�l�n�5���"7��D�S�G�L�M�Mr<c�b�|jj�D]}|j��y)z+Closes all adapters and as such the sessionN)r��valuesrp)rFr1s  r4rpz
Session.closes"�����%�%�'�A�
�G�G�I�(r<c���||j|<|jD�cgc]}t|�t|�ks�|��}}|D]*}|jj|�|j|<�,ycc}w)zwRegisters a connection adapter to a prefix.

        Adapters are sorted in descending order by prefix length.
        N)r�rnrz)rFr�r�r0�keys_to_mover3s      r4r�z
Session.mount!sf��
!(��
�
�f��#'�=�=�I�=�a�C��F�S��[�4H��=��I��C�!%���!2�!2�3�!7�D�M�M�#�� ��Js
�A1�A1c	�Z�|jD�cic]}|t||d���}}|Scc}wr�)�	__attrs__�getattr)rF�attr�states   r4�__getstate__zSession.__getstate__,s3��=A�^�^�L�^�T��w�t�T�4�0�0�^��L����Ms�(c�N�|j�D]\}}t|||��yr�)r+�setattr)rFr�r��values    r4�__setstate__zSession.__setstate__0s"�� �;�;�=�K�D�%��D�$��&�)r<)NNNNNNNTNNNNNNr�r�)r�r�r��__doc__r�r�r�r�r�r�r8r�r�r�r�r�r�r�r�r�rpr�r�rr�r<r4r�r�es����$
�I�<-�|��)�^�
����
�������
�
�#Y�v	2�	6�	3�I�
=�
?�5�L�\V�>N��
	8��'r<r�c��t�S)aZ
    Returns a :class:`Session` for context-management.

    .. deprecated:: 1.0.0

        This method has been deprecated since version 1.0.0 and is only kept for
        backwards compatibility. New code should use :class:`~requests.sessions.Session`
        to create a session. This may be removed at a future date.

    :rtype: Session
    )r�r�r<r4�sessionr5s���9�r<)<rr��sys�time�collectionsr�datetimer�_internal_utilsrr�rr�r�compatr	r
rrr}r
rrr�
exceptionsrrrrr�rr�modelsrrrr�status_codesr�
structuresr�utilsrrrr r!r"r#r$r%r&�platform�perf_counterr�r5r;r>r�rr�r<r4�<module>rs����
�
��#��-�!�!�9�9�����0��� �+�����<�<�7���'�'�O��i�i�O�@K��<:E�C�x)�x)�vM'�"�M'�`r<python3.12/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-312.pyc000064400000004031151732702600025317 0ustar00�

R`i�����dZddlZddlmZejd�Zejd�Zejd�Zejd�ZeefZ	eefZ
ee
ee	iZ
dd	�Zd
�Zy)z�
requests._internal_utils
~~~~~~~~~~~~~~

Provides utility functions that are consumed internally by Requests
which depend on extremely few external helpers (such as compat)
�N�)�builtin_strs^[^:\s][^:\r\n]*$z^[^:\s][^:\r\n]*$s^\S[^\r\n]*$|^$z^\S[^\r\n]*$|^$c�P�t|t�r|}|S|j|�}|S)z�Given a string object, regardless of type, returns a representation of
    that string in the native string type, encoding and decoding where
    necessary. This assumes ASCII unless told otherwise.
    )�
isinstancer�decode)�string�encoding�outs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/_internal_utils.py�to_native_stringrs/��
�&�+�&����J��m�m�H�%���J�c�j�t|t�sJ�	|jd�y#t$rYywxYw)z�Determine if unicode string only contains ASCII characters.

    :param str u_string: unicode string to check. Must be unicode
        and not Python 2 `str`.
    :rtype: bool
    �asciiTF)r�str�encode�UnicodeEncodeError)�u_strings r�unicode_is_asciir&s:���h��$�$�$������ �������s�&�	2�2)r)�__doc__�re�compatr�compile�_VALID_HEADER_NAME_RE_BYTE�_VALID_HEADER_NAME_RE_STR�_VALID_HEADER_VALUE_RE_BYTE�_VALID_HEADER_VALUE_RE_STR�_HEADER_VALIDATORS_STR�_HEADER_VALIDATORS_BYTE�bytesr�HEADER_VALIDATORSrr�r
r�<module>r"s����
��'�R�Z�Z�(=�>��&�B�J�J�';�<��(�b�j�j�)<�=��'�R�Z�Z�(:�;��3�5O�P��5�7R�S��	�"��	���
�r
python3.12/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-312.pyc000064400000015670151732702600024320 0ustar00�

R`i���X�dZddlmZddlmZGd�de�ZGd�de�Z	Gd	�d
e	e�ZGd�de�ZGd
�de�Z
Gd�de
�ZGd�de
�ZGd�de�Z
Gd�de
e
�ZGd�de
�ZGd�de�ZGd�de�ZGd�dee�ZGd�d ee�ZGd!�d"ee�ZGd#�d$ee�ZGd%�d&e�ZGd'�d(e�ZGd)�d*ee�ZGd+�d,ee�ZGd-�d.e�ZGd/�d0e�ZGd1�d2e�ZGd3�d4ee �Z!Gd5�d6e�Z"y7)8z`
requests.exceptions
~~~~~~~~~~~~~~~~~~~

This module contains the set of Requests' exceptions.
�)�	HTTPError�)�JSONDecodeErrorc�"��eZdZdZ�fd�Z�xZS)�RequestExceptionzTThere was an ambiguous exception that occurred while handling your
    request.
    c����|jdd�}||_|jdd�|_|�3|js't|d�r|jj|_t	�|�|i|��y)zBInitialize RequestException with `request` and `response` objects.�responseN�request)�popr	r
�hasattr�super�__init__)�self�args�kwargsr	�	__class__s    ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/exceptions.pyrzRequestException.__init__sd����:�:�j�$�/�� ��
��z�z�)�T�2����������9�9U��=�=�0�0�D�L�
���$�)�&�)�)�__name__�
__module__�__qualname__�__doc__r�
__classcell__)rs@rrrs����*�*rrc��eZdZdZy)�InvalidJSONErrorzA JSON error occurred.N�rrrr�rrrr��� rrc��eZdZdZd�Zy)rz"Couldn't decode the text into jsonc�v�tj|g|���tj|g|j��i|��y)a
        Construct the JSONDecodeError instance first with all
        args. Then use it's args to construct the IOError so that
        the json specific args aren't used as IOError specific args
        and the error message from JSONDecodeError is preserved.
        N)�CompatJSONDecodeErrorrrr)rrrs   rrzJSONDecodeError.__init__"s3��	�&�&�t�3�d�3��!�!�$�=����=�f�=rN)rrrrrrrrrrs
��,�>rrc��eZdZdZy)rzAn HTTP error occurred.Nrrrrrr-���!rrc��eZdZdZy)�ConnectionErrorzA Connection error occurred.Nrrrrr%r%1s��&rr%c��eZdZdZy)�
ProxyErrorzA proxy error occurred.Nrrrrr'r'5r#rr'c��eZdZdZy)�SSLErrorzAn SSL error occurred.Nrrrrr)r)9rrr)c��eZdZdZy)�Timeoutz�The request timed out.

    Catching this error will catch both
    :exc:`~requests.exceptions.ConnectTimeout` and
    :exc:`~requests.exceptions.ReadTimeout` errors.
    Nrrrrr+r+=s��rr+c��eZdZdZy)�ConnectTimeoutz�The request timed out while trying to connect to the remote server.

    Requests that produced this error are safe to retry.
    Nrrrrr-r-Fs��rr-c��eZdZdZy)�ReadTimeoutz@The server did not send any data in the allotted amount of time.Nrrrrr/r/M���Jrr/c��eZdZdZy)�URLRequiredz*A valid URL is required to make a request.Nrrrrr2r2Qs��4rr2c��eZdZdZy)�TooManyRedirectszToo many redirects.Nrrrrr4r4Us��rr4c��eZdZdZy)�
MissingSchemaz/The URL scheme (e.g. http or https) is missing.Nrrrrr6r6Ys��9rr6c��eZdZdZy)�
InvalidSchemaz9The URL scheme provided is either invalid or unsupported.Nrrrrr8r8]s��Crr8c��eZdZdZy)�
InvalidURLz%The URL provided was somehow invalid.Nrrrrr:r:as��/rr:c��eZdZdZy)�
InvalidHeaderz.The header value provided was somehow invalid.Nrrrrr<r<es��8rr<c��eZdZdZy)�InvalidProxyURLz"The proxy URL provided is invalid.Nrrrrr>r>i���,rr>c��eZdZdZy)�ChunkedEncodingErrorz?The server declared chunked encoding but sent an invalid chunk.NrrrrrArAms��IrrAc��eZdZdZy)�ContentDecodingErrorz"Failed to decode response content.NrrrrrCrCqr?rrCc��eZdZdZy)�StreamConsumedErrorz3The content for this response was already consumed.NrrrrrErEus��=rrEc��eZdZdZy)�
RetryErrorzCustom retries logic failedNrrrrrGrGys��%rrGc��eZdZdZy)�UnrewindableBodyErrorz;Requests encountered an error when trying to rewind a body.NrrrrrIrI}s��ErrIc��eZdZdZy)�RequestsWarningzBase warning for Requests.NrrrrrKrK�s��$rrKc��eZdZdZy)�FileModeWarningzJA file was opened in text mode, but Requests determined its binary length.NrrrrrMrM�s��TrrMc��eZdZdZy)�RequestsDependencyWarningz@An imported dependency doesn't match the expected version range.NrrrrrOrO�r0rrON)#r�pip._vendor.urllib3.exceptionsr�
BaseHTTPError�compatrr!�IOErrorrrr%r'r)r+r-r/r2r4�
ValueErrorr6r8r:r<r>rArC�	TypeErrorrErGrI�WarningrK�DeprecationWarningrMrOrrr�<module>rXso���F�<�*�w�*�!�'�!�>�&�(=�>�"� �"�'�&�'�"��"�!��!�����_�g��K�'�K�5�"�5��'��:�$�j�:�D�$�j�D�0�!�:�0�9�$�j�9�-�j�-�J�+�J�-�+�]�-�>�*�I�>�&�!�&�F�,�F�%�g�%�U�o�'9�U�K��Krpython3.12/site-packages/pip/_vendor/requests/__pycache__/api.cpython-312.pyc000064400000016110151732702610022677 0ustar00�

R`i1��L�dZddlmZd�Zdd�Zd�Zd�Zd
d�Zdd	�Zdd
�Z	d�Z
y)z�
requests.api
~~~~~~~~~~~~

This module implements the Requests API.

:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.
�)�sessionsc��tj�5}|jd||d�|��cddd�S#1swYyxYw)a�	Constructs and sends a :class:`Request <Request>`.

    :param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary, list of tuples or bytes to send
        in the query string for the :class:`Request`.
    :param data: (optional) Dictionary, list of tuples, bytes, or file-like
        object to send in the body of the :class:`Request`.
    :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
    :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
    :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
    :param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
        ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
        or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content-type'`` is a string
        defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
        to add for the file.
    :param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
    :param timeout: (optional) How many seconds to wait for the server to send data
        before giving up, as a float, or a :ref:`(connect timeout, read
        timeout) <timeouts>` tuple.
    :type timeout: float or tuple
    :param allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.
    :type allow_redirects: bool
    :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
    :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use. Defaults to ``True``.
    :param stream: (optional) if ``False``, the response content will be immediately downloaded.
    :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response

    Usage::

      >>> import requests
      >>> req = requests.request('GET', 'https://httpbin.org/get')
      >>> req
      <Response [200]>
    )�method�urlN�)r�Session�request)rr�kwargs�sessions    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/api.pyr	r	s7��X
�	�	�	�w��w���@�f�#�@��@�
�	�	�s�4�=Nc� �td|fd|i|��S)adSends a GET request.

    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary, list of tuples or bytes to send
        in the query string for the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    �get�params�r	)rrr
s   rrr>s���5�#�7�f�7��7�7�c��td|fi|��S)z�Sends an OPTIONS request.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    �optionsr�rr
s  rrrLs���9�c�,�V�,�,rc�@�|jdd�td|fi|��S)akSends a HEAD request.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes. If
        `allow_redirects` is not provided, it will be set to `False` (as
        opposed to the default :meth:`request` behavior).
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    �allow_redirectsF�head)�
setdefaultr	rs  rrrXs'�����'��/��6�3�)�&�)�)rc�"�td|f||d�|��S)a�Sends a POST request.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, list of tuples, bytes, or file-like
        object to send in the body of the :class:`Request`.
    :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    �post)�data�jsonr)rrrr
s    rrrgs���6�3�?�T��?��?�?rc� �td|fd|i|��S)a�Sends a PUT request.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, list of tuples, bytes, or file-like
        object to send in the body of the :class:`Request`.
    :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    �putrr�rrr
s   rrrvs���5�#�3�D�3�F�3�3rc� �td|fd|i|��S)a�Sends a PATCH request.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, list of tuples, bytes, or file-like
        object to send in the body of the :class:`Request`.
    :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    �patchrrrs   rr!r!�s���7�C�5�d�5�f�5�5rc��td|fi|��S)z�Sends a DELETE request.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    �deleterrs  rr#r#�s���8�S�+�F�+�+r)N)NN)�__doc__�rr	rrrrrr!r#rrr�<module>r&s:����-A�`8�	-�*�@�4�6�	,rpython3.12/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-312.pyc000064400000106614151732702610023277 0ustar00�

R`i����Z�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZmZddlmZddlmZddlmZmZmZmZdd	lmZmZmZmZmZmZdd
lm Z!ddlm"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(ddl)m*Z*dd
l+m,Z,m-Z-m.Z.m/Z/ddl0m1Z1dZ2ejf�Z4ddd�Z5djmejnded��d��Z8ejrdk(rd�Z:d�Z"d�Z;d�Z<dHd�Z=d�Z>d�Z?ej�d ��ZAd!�ZBd"�ZCd#�ZDd$�ZEdHd%�ZFd&�ZGd'�ZHd(�ZId)�ZJd*�ZKd+�ZLd,�ZMd-�ZNeOd.�ZPd/�ZQd0�ZRd1�ZSd2�ZTd3�ZUd4�ZVej�d5��ZWd6�ZXdId7�ZYd8�ZZdJd9�Z[dKd:�Z\d;�Z]d<�Z^d=j�d>�Z`e`d?zZae`d@zZbdA�ZcdB�ZddC�ZedD�ZfdE�ZgdF�ZhdG�Ziy)Lz�
requests.utils
~~~~~~~~~~~~~~

This module provides utility functions that are used within Requests
that are also useful for external consumption.
�N)�OrderedDict)�make_headers�	parse_url�)�certs��__version__)�_HEADER_VALIDATORS_BYTE�_HEADER_VALIDATORS_STR�HEADER_VALIDATORS�to_native_string)�Mapping�
basestring�bytes�
getproxies�getproxies_environment�
integer_types)�parse_http_list)�proxy_bypass�proxy_bypass_environment�quote�str�unquote�urlparse�
urlunparse��cookiejar_from_dict)�FileModeWarning�
InvalidHeader�
InvalidURL�UnrewindableBodyError)�CaseInsensitiveDict)z.netrc�_netrc�Pi�)�http�httpsz, z,\s*T)�accept_encodingzaccept-encoding�win32c��	ddl}	|j|jd�}t	|j|d�d�}|j|d�d}|r|sy|jd�}|D]j}|dk(rd|vry	|jdd
�}|jdd�}|jd
d�}tj||tj�s�jy	y#t$rYywxYw#ttf$rYywxYw)NrFz;Software\Microsoft\Windows\CurrentVersion\Internet Settings�ProxyEnable�
ProxyOverride�;z<local>�.Tz\.�*z.*�?)
�winreg�ImportError�OpenKey�HKEY_CURRENT_USER�int�QueryValueEx�OSError�
ValueError�split�replace�re�match�I)�hostr0�internetSettings�proxyEnable�
proxyOverride�tests      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/utils.py�proxy_bypass_registryrCLs��	��
	�%�~�~��(�(�N� ��
�f�1�1�2B�M�R�ST�U�V�K�"�/�/�0@�/�R�ST�U�M��-��
&�+�+�C�0�
�!�D��y� ��d�?���<�<��U�+�D��<�<��U�+�D��<�<��T�*�D��x�x��d�B�D�D�)��"���?�	��	����$�	��	�s#�C�AC+�	C(�'C(�+C=�<C=c�B�t�rt|�St|�S)z�Return True, if the host should be bypassed.

        Checks proxy settings gathered from the environment, if specified,
        or the registry.
        )rrrC)r=s rBrrps ��"�#�+�D�1�1�(��.�.�c�>�t|d�r|j�}|S)z/Returns an internal sequence dictionary update.�items)�hasattrrG)�ds rB�dict_to_sequencerJ|s���q�'��
�G�G�I���HrEc��d}d}t|d�rt|�}n~t|d�r
|j}net|d�rY	|j�}tj|�j
}d|jvrtjdt�	t|d�rW	|j�}t|d�r:|�8	|jdd	�|j�}|j|xsd�|�d}t!d||z
�S#tjtf$rY��wxYw#t$rd}Y�?wxYw#t$r|�|}Y�RwxYw)
Nr�__len__�len�fileno�ba%Requests has determined the content-length for this request using the binary size of the file: however, the file has been opened in text mode (i.e. without the 'b' flag in the mode). This may lead to an incorrect content-length. In Requests 3.0, support will be removed for files in text mode.�tell�seek�)rHrMrN�os�fstat�st_size�mode�warnings�warnr�io�UnsupportedOperation�AttributeErrorrPrQr6�max)�o�total_length�current_positionrNs    rB�	super_lenr`�s]���L����q�)���1�v��	��E�	��u�u��	��H�	�	��X�X�Z�F��8�8�F�+�3�3�L��!�&�&� ��
�
�2�$�
��q�&��	%� �v�v�x���q�&�!�l�&:�	%��F�F�1�a�L�#$�6�6�8�L��F�F�+�0�q�1������q�,�!1�1�2�2��e�'�'��8�	�
�		��X�%�#$�L�%��%�	0�
�'�#/� ��
	0�s6�D�(E�7D0�D-�,D-�0D>�=D>�
E�Ec�|�tjjd�}|�|f}n
d�tD�}	ddlm}m}d}|D]E}	tjj|�}tjj|�s�C|}n|�yt|�}	d}
t|t�r|
jd�}
|	jj|
�d}	||�j!|�}|r|drdnd}
||
|d	fSy#t$rYywxYw#|t"f$r|r�YywxYw#t$t&f$rYywxYw)
z;Returns the Requests tuple auth for a given url from netrc.�NETRCNc3�&K�|]	}d|�����y�w)z~/N�)�.0�fs  rB�	<genexpr>z!get_netrc_auth.<locals>.<genexpr>�s����9�[��R��s�8�[�s�r)�NetrcParseError�netrc�:�asciirrR)rS�environ�get�NETRC_FILESrirh�path�
expanduser�KeyError�existsr�
isinstancer�decode�netlocr8�authenticatorsr6r1r[)�url�raise_errors�
netrc_file�netrc_locationsrhri�
netrc_pathrf�loc�ri�splitstrr=r#�login_is              rB�get_netrc_authr��sS��������(�J���%�-��9�[�9��-
�0��
� �A�
��g�g�(�(��+���w�w�~�~�c�"� �
��!����
�c�]�����c�3�����w�/�H��y�y���x�(��+��
	��:�&�5�5�d�;�F��%�a�y�!�a���w�����3�3���3�
��	
��: ��)�	����	��
��(�
��
�s`�D)�D�#D)�D)�AD)�+D�	D�D)�D�D)�D&�#D)�%D&�&D)�)D;�:D;c��t|dd�}|rBt|t�r1|ddk7r(|ddk7rtjj|�Syyyy)z0Tries to guess the filename of the given object.�nameNr�<����>)�getattrrsrrSro�basename)�objr�s  rB�guess_filenamer�sT���3���%�D��
�4��,��a��C��D��H�PS�O��w�w����%�%�ET��,�trEc�R�tjj|�r|Stjj|�\}}|rytjj|�sZtjj|�\}}|sn5dj	||g�}|r tjj|�s�Ztj|�s|Stj|�}||j�vr|Stj�}tjj	||jd�d�}tjj|�s6t|�5}|j|j|��ddd�|S|S#1swY|SxYw)z�Replace nonexistent paths that look like they refer to a member of a zip
    archive with the location of an extracted copy of the target, or else
    just return the provided path unchanged.
    �/r�N)rSrorrr8�join�zipfile�
is_zipfile�ZipFile�namelist�tempfile�
gettempdir�atomic_open�write�read)ro�archive�member�prefix�zip_file�tmp�extracted_path�file_handlers        rB�extract_zipped_pathsr�s@��

�w�w�~�~�d�����g�g�m�m�D�)�O�G�V�
�"�'�'�.�.��1��'�'�-�-��0�����
����6�6�*�+��
�"�'�'�.�.��1����g�&������w�'�H�
�X�&�&�(�(����
�
�
�C��W�W�\�\�#�v�|�|�C�'8��'<�=�N�
�7�7�>�>�.�)�
��
(�L����x�}�}�V�4�5�)���>��)���s�/!F�F&c#�JK�tjtjj	|���\}}	tj
|d�5}|��ddd�tj||�y#1swY� xYw#t$rtj|��wxYw�w)z-Write a file to the disk in an atomic fashion)�dir�wbN)	r��mkstemprSro�dirname�fdopenr9�
BaseException�remove)�filename�tmp_descriptor�tmp_name�tmp_handlers    rBr�r�,s���� (�/�/�B�G�G�O�O�H�4M�N��N�H��
�Y�Y�~�t�
,����-�
�
�
�8�X�&�-�
,����
�	�	�(��
��s4�7B#�B�A4�B�3B#�4A=�9B� B � B#c�t�|�yt|ttttf�rtd��t
|�S)aTake an object and test to see if it can be represented as a
    dictionary. Unless it can not be represented as such, return an
    OrderedDict, e.g.,

    ::

        >>> from_key_val_list([('key', 'val')])
        OrderedDict([('key', 'val')])
        >>> from_key_val_list('string')
        Traceback (most recent call last):
        ...
        ValueError: cannot encode objects that are not 2-tuples
        >>> from_key_val_list({'key': 'val'})
        OrderedDict([('key', 'val')])

    :rtype: OrderedDict
    N�+cannot encode objects that are not 2-tuples)rsrr�boolr4r7r��values rB�from_key_val_listr�9s6��$
�}���%�#�u�d�C�0�1��F�G�G��u��rEc��|�yt|ttttf�rtd��t|t�r|j�}t|�S)a�Take an object and test to see if it can be represented as a
    dictionary. If it can be, return a list of tuples, e.g.,

    ::

        >>> to_key_val_list([('key', 'val')])
        [('key', 'val')]
        >>> to_key_val_list({'key': 'val'})
        [('key', 'val')]
        >>> to_key_val_list('string')
        Traceback (most recent call last):
        ...
        ValueError: cannot encode objects that are not 2-tuples

    :rtype: list
    Nr�)	rsrrr�r4r7rrG�listr�s rB�to_key_val_listr�TsJ��"
�}���%�#�u�d�C�0�1��F�G�G��%��!����
����;�rEc��g}t|�D]5}|dd|ddcxk(rdk(rnnt|dd�}|j|��7|S)aParse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Quotes are removed automatically after parsing.

    It basically works like :func:`parse_set_header` just that items
    may appear multiple times and case sensitivity is preserved.

    The return value is a standard :class:`list`:

    >>> parse_list_header('token, "quoted value"')
    ['token', 'quoted value']

    To create a header from the :class:`list` again, use the
    :func:`dump_header` function.

    :param value: a string with a list header.
    :return: :class:`list`
    :rtype: list
    Nrr��")�_parse_list_header�unquote_header_value�append)r��result�items   rB�parse_list_headerr�rsT��.�F�"�5�)�����8�t�B�C�y�'�C�'�'��Q�r�
�3�D��
�
�d��*��MrEc��i}t|�D]H}d|vrd||<�
|jdd�\}}|dd|ddcxk(rdk(rnnt|dd�}|||<�J|S)a^Parse lists of key, value pairs as described by RFC 2068 Section 2 and
    convert them into a python dict:

    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
    >>> type(d) is dict
    True
    >>> sorted(d.items())
    [('bar', 'as well'), ('foo', 'is a fish')]

    If there is no value for a key it will be `None`:

    >>> parse_dict_header('key_without_value')
    {'key_without_value': None}

    To create a header from the :class:`dict` again, use the
    :func:`dump_header` function.

    :param value: a string with a dict header.
    :return: :class:`dict`
    :rtype: dict
    �=Nrr�r�)r�r8r�)r�r�r�r�s    rB�parse_dict_headerr��sx��,�F�"�5�)���d�?��F�4�L���j�j��a�(���e���!�9��b�c�
�)�c�)�(��q���5�E���t��*��MrEc��|rF|d|dcxk(rdk(r5n|S|dd}|r|dddk7r"|jdd�jd	d�S|S)
z�Unquotes a header value.  (Reversal of :func:`quote_header_value`).
    This does not use the real unquoting but what browsers are actually
    using for quoting.

    :param value: the header value to unquote.
    :rtype: str
    rr�r�rNrRz\\�\z\")r9)r��is_filenames  rBr�r��sd��
��q��U�2�Y�-�#�-��L��a�����e�B�Q�i�6�1��=�=���.�6�6�u�c�B�B��LrEc�J�i}|D]}|j||j<�|S)z�Returns a key/value dictionary from a CookieJar.

    :param cj: CookieJar object to extract cookies from.
    :rtype: dict
    )r�r�)�cj�cookie_dict�cookies   rB�dict_from_cookiejarr��s-���K���#)�<�<��F�K�K� ���rEc��t||�S)z�Returns a CookieJar from a key/value dictionary.

    :param cj: CookieJar to insert cookies into.
    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :rtype: CookieJar
    r)r�r�s  rB�add_dict_to_cookiejarr��s���{�B�/�/rEc�^�tjdt�tjdtj
��}tjdtj
��}tjd�}|j
|�|j
|�z|j
|�zS)zlReturns encodings from given content string.

    :param content: bytestring to extract encodings from.
    z�In requests 3.0, get_encodings_from_content will be removed. For more information, please see the discussion on issue #2266. (This warning should only appear once.)z!<meta.*?charset=["\']*(.+?)["\'>])�flagsz+<meta.*?content=["\']*;?charset=(.+?)["\'>]z$^<\?xml.*?encoding=["\']*(.+?)["\'>])rWrX�DeprecationWarningr:�compiler<�findall)�content�
charset_re�	pragma_re�xml_res    rB�get_encodings_from_contentr��s���

�M�M�
1�	�
����@����M�J��
�
�I�QS�QU�QU�V�I�
�Z�Z�?�
@�F�	���7�#�
�
�
�G�
$�	%�
�.�.��
!�	"�rEc�H�|jd�}|dj�|dd}}i}d}|D]m}|j�}|s�|d}}|jd�}	|	dk7r+|d|	j|�}||	dzdj|�}|||j�<�o||fS)	z�Returns content type and parameters from given header

    :param header: string
    :return: tuple containing content type and dictionary of
         parameters
    r,rrNz"' Tr�r�)r8�strip�find�lower)
�header�tokens�content_type�params�params_dict�items_to_strip�param�keyr��index_of_equalss
          rB�_parse_content_type_headerr�s����\�\�#�
�F�!�!�9�?�?�,�f�Q�R�j�&�L��K��N������
������C�#�j�j��o�O��"�$��,�_�-�3�3�N�C���o��1�3�4�:�:�>�J��',�K��	�	��$����$�$rEc��|jd�}|syt|�\}}d|vr|djd�Sd|vryd|vryy)	z}Returns encodings from given HTTP Header Dict.

    :param headers: dictionary to extract encoding from.
    :rtype: str
    zcontent-typeN�charsetz'"�textz
ISO-8859-1zapplication/json�utf-8)rmr�r�)�headersr�r�s   rB�get_encoding_from_headersr�s`���;�;�~�.�L���5�l�C��L�&��F���i� �&�&�u�-�-�
�����\�)��*rEc#�K�|j�|Ed{���ytj|j�d��}|D]}|j|�}|s�|���|jdd��}|r|��yy7�e�w)zStream decodes an iterator.Nr9��errorsrET)�final)�encoding�codecs�getincrementaldecoderrt)�iterator�r�decoder�chunk�rvs     rB�stream_decode_response_unicoder�3s����	�z�z������6�f�*�*�1�:�:�6�i�H�G���
�^�^�E�
"��
��H��
����4��	(�B�	���
�	�s�A<�A:�AA<�"A<c#�K�d}|�|dkrt|�}|t|�kr||||z��||z
}|t|�kr�yy�w)z Iterate over slices of a string.rN)rM)�string�slice_length�poss   rB�iter_slicesr�DsW����
�C���|�q�0��6�{��

��F��
��S�3��-�.�.��|�����F��
�s�AA�Ac�>�tjdt�g}t|j�}|r	t|j|�S	t|j|d��S#t$r|j|�Y�5wxYw#t$r|jcYSwxYw)z�Returns the requested content back in unicode.

    :param r: Response object to get unicode content from.

    Tried:

    1. charset from content-type
    2. fall back and replace all unicode characters

    :rtype: str
    z�In requests 3.0, get_unicode_from_response will be removed. For more information, please see the discussion on issue #2266. (This warning should only appear once.)r9r�)
rWrXr�r�r�rr��UnicodeErrorr��	TypeError)r��tried_encodingsr�s   rB�get_unicode_from_responser�Ns���
�M�M�
1�	�
��O�)����3�H��	-��q�y�y�(�+�+�
��1�9�9�h�y�9�9���	-��"�"�8�,�	-�����y�y���s#�A$�B�$B�B�B�BzBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~c��|jd�}tdt|��D]l}||dd}t|�dk(rI|j�r9	t	t|d��}|tvr|||ddz||<�Vd||��||<�bd||��||<�nd	j|�S#t$rtd|�d���wxYw)
z�Un-escape any percent-escape sequences in a URI that are unreserved
    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.

    :rtype: str
    �%rrrR�z"Invalid percent-escape sequence: '�'N�)
r8�rangerM�isalnum�chrr4r7r �UNRESERVED_SETr�)�uri�parts�i�h�cs     rB�unquote_unreservedr{s���
�I�I�c�N�E�
�1�c�%�j�
!���!�H�Q�q�M���q�6�Q�;�1�9�9�;�
L���A�r�
�O���N�"��u�Q�x���|�+��a���u�Q�x�j�>��a���5��8�*�~�E�!�H�"��7�7�5�>����
L� �#E�a�S��!J�K�K�
L�s�B'�'Cc�p�d}d}	tt|�|��S#t$rt||��cYSwxYw)z�Re-quote the given URI.

    This function passes the given URI through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.

    :rtype: str
    z!#$%&'()*+,/:;=?@[]~z!#$&'()*+,/:;=?@[]~)�safe)rrr )r�safe_with_percent�safe_without_percents   rB�requote_urir�sJ��/��0��	5��'��,�3D�E�E���5��S�3�4�4�	5�s��5�5c
�r�tjdtj|��d}|j	d�\}}tjdtjtt
|����d}tjdtj|��d|z}||z||zk(S)z�This function allows you to check if an IP belongs to a network subnet

    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24

    :rtype: bool
    z=Lrr�)�struct�unpack�socket�	inet_atonr8�dotted_netmaskr4)�ip�net�ipaddr�netaddr�bits�netmask�networks       rB�address_in_networkr�s����]�]�4��!1�!1�"�!5�
6�q�
9�F��I�I�c�N�M�G�T��m�m�D�&�"2�"2�>�#�d�)�3L�"M�N�q�Q�G��m�m�D�&�"2�"2�7�";�<�Q�?�'�I�G��W��'�G�"3�4�4rEc�p�ddd|z
zdz
z}tjtjd|��S)z�Converts mask from /xx format to xxx.xxx.xxx.xxx

    Example: if mask is 24 function returns 255.255.255.0

    :rtype: str
    l��r� z>I)r�	inet_ntoar�pack)�maskrs  rBrr�s7����b�4�i��1�,�,�D����F�K�K��d�3�4�4rEc�N�	tj|�y#t$rYywxYw)z
    :rtype: bool
    FT)rrr6)�	string_ips rB�is_ipv4_addressr&�s.�������#�������s��	$�$c��|jd�dk(rR	t|jd�d�}|dks|dkDry	t	j
|jd�d�yy#t$rYywxYw#t$rYywxYw)zV
    Very simple check of the cidr format in no_proxy variable.

    :rtype: bool
    r�rFr rT)�countr4r8r7rrr6)�string_networkr#s  rB�
is_valid_cidrr*�s������C� �A�%�	��~�+�+�C�0��3�4�D��!�8�t�b�y��	����^�1�1�#�6�q�9�:�
����	��	���	��	�s"�A(�'A7�(	A4�3A4�7	B�Bc#�8K�|du}|r2tjj|�}|tj|<	d��|r(�tj|=y|tj|<yy#|r(�tj|=w|tj|<wwxYw�w)z�Set the environment variable 'env_name' to 'value'

    Save previous value, yield, and then restore the previous value stored in
    the environment variable 'env_name'.

    If 'value' is None, do nothingN)rSrlrm)�env_namer��
value_changed�	old_values    rB�set_environr/�s�������%�M���J�J�N�N�8�,�	�$��
�
�8��1�
��� ��J�J�x�(�'0��
�
�8�$�	��=�� ��J�J�x�(�'0��
�
�8�$�	�s�9B�A+�+B�+,B�Bc��d�}|}|�|d�}t|�}|j�y|r�d�|jdd�jd�D�}t	|j�r=|D]7}t|�rt
|j|�s�%y|j|k(s�7yn_|j}|jr|d	|j��z
}|D]0}|jj|�s|j|�s�0ytd|�5	t|j�}ddd�ryy
#ttjf$rd
}Y�)wxYw#1swY�.xYw)zL
    Returns whether we should bypass proxies or not.

    :rtype: bool
    c��tjj|�xs-tjj|j��S�N)rSrlrm�upper)r�s rB�	get_proxyz(should_bypass_proxies.<locals>.get_proxys-���z�z�~�~�c�"�A�b�j�j�n�n�S�Y�Y�[�&A�ArEN�no_proxyTc3�&K�|]	}|s�|���y�wr2rd)rer=s  rBrgz(should_bypass_proxies.<locals>.<genexpr>s����R�%I�T�T�D�%I�s��� r�,�:F)r�hostnamer9r8r&r*r�port�endswithr/rr�r�gaierror)	rwr5r4�no_proxy_arg�parsed�proxy_ip�host_with_portr=�bypasss	         rB�should_bypass_proxiesrC�sI��B�
�L����Z�(��
�c�]�F�
������S�X�%5�%5�c�2�%>�%D�%D�S�%I�R���6�?�?�+�$�� ��*�)�&�/�/�8�D�#��_�_��0� �%�$�_�_�N��{�{��A�f�k�k�]�"3�3�� ���?�?�+�+�D�1�^�5L�5L�T�5R� �	!�
�Z��	.�	�!�&�/�/�2�F�
/�����
�6�?�?�+�	��F�	��	
/�	.�s*�E�D2�2E�
E�E�E�Ec�4�t||��riSt�S)zA
    Return a dict of environment proxies.

    :rtype: dict
    �r5)rCr)rwr5s  rB�get_environ_proxiesrF8s���S�8�4��	��|�rEc�.�|xsi}t|�}|j�+|j|j|jd��S|jdz|jz|jd|jzdg}d}|D]}||vs�||}|S|S)z�Select a proxy for the url, if applicable.

    :param url: The url being for the request
    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
    N�allz://zall://)rr:rm�scheme)rw�proxies�urlparts�
proxy_keys�proxy�	proxy_keys      rB�select_proxyrODs����m��G���}�H���� ��{�{�8�?�?�G�K�K��,>�?�?�	���%��(�"3�"3�3�����8�$�$�$�
�	�J�
�E��	�����I�&�E���L� �
�LrEc�8�|�|ni}|j}t|�j}|jd�}|j	�}|rOt||��sBt
||��}|j||jd��}|r|j||�|S)a�This method takes proxy information from a request and configuration
    input to resolve a mapping of target proxies. This will consider settings
    such a NO_PROXY to strip proxy configurations.

    :param request: Request or PreparedRequest
    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
    :param trust_env: Boolean declaring whether to trust environment configs

    :rtype: dict
    r5rErH)rwrrIrm�copyrCrF�
setdefault)	�requestrJ�	trust_envrwrIr5�new_proxies�environ_proxiesrMs	         rB�resolve_proxiesrW^s���!�,�g�"�G�
�+�+�C�
�c�]�
!�
!�F��{�{�:�&�H��,�,�.�K��.�s�X�F�-�c�H�E���#�#�F�O�,?�,?��,F�G����"�"�6�5�1��rEc��|�dt��S)zO
    Return a string representing the default user agent.

    :rtype: str
    r�r)r�s rB�default_user_agentrYys���V�1�[�M�"�"rEc�:�tt�tddd��S)z9
    :rtype: requests.structures.CaseInsensitiveDict
    z*/*z
keep-alive)z
User-AgentzAccept-Encoding�Accept�
Connection)r"rY�DEFAULT_ACCEPT_ENCODINGrdrErB�default_headersr^�s%���,�.�6��&�		
��rEc���g}d}|j|�}|s|Stjd|�D]�}	|jdd�\}}d|jd�i}|jd�D]:}	|jd�\}}|j|�||j|�<�<|j	|���|S#t$r|d}}Y��wxYw#t$rY�4wxYw)	z�Return a list of parsed link headers proxies.

    i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

    :rtype: list
    z '"z, *<r,rrrwz<> '"r�)r�r:r8r7r�)	r��links�
replace_chars�valrwr��linkr�r�s	         rB�parse_header_linksrd�s���
�E��M��K�K�
�&�E�����x�x���&��	"��)�)�C��+�K�C���s�y�y��*�+���\�\�#�&�E�
�"�[�[��-�
��U�.3�[�[��-G�D����=�)�*�
'�	���T��!'�$�L���	"��r��C�	"���
��
�s#�B?�1C�?
C�C�	C�C�rkrR�c��|dd}|tjtjfvry|ddtjk(ry|ddtjtj
fvry|j
t�}|dk(ry	|dk(r |ddd�tk(ry
|ddd�tk(ry|dk(r|ddtk(ry
|ddtk(ryy)z
    :rtype: str
    N�zutf-32rfz	utf-8-sigrRzutf-16rr�z	utf-16-berz	utf-16-lez	utf-32-bez	utf-32-le)
r��BOM_UTF32_LE�BOM_UTF32_BE�BOM_UTF8�BOM_UTF16_LE�BOM_UTF16_BEr(�_null�_null2�_null3)�data�sample�	nullcounts   rB�guess_json_utfrt�s����"�1�X�F�
�&�%�%�v�':�':�;�;��
�b�q�z�V�_�_�$��
�b�q�z�f�)�)�6�+>�+>�?�?�����U�#�I��A�~���A�~��#�A�#�;�&� ���!�$�Q�$�<�6�!���A�~��"�1�:�����!�"�:����rEc��t|�}|\}}}}}}}	|j}
|
s||
}}
|rdj||
g�}
|�|}|�d}t||
|d||	f�S)z�Given a URL that may or may not have a scheme, prepend the given scheme.
    Does not replace a present scheme with the one provided as an argument.

    :rtype: str
    �@r)rrur�r)rw�
new_schemer?rI�authr=r;ro�query�fragmentrus           rB�prepend_scheme_if_neededr{�s{���s�^�F�6<�3�F�D�$��d�E�8��]�]�F���V�������4��.�)��
�~����|����v�v�t�R���A�B�BrEc��t|�}	t|j�t|j�f}|S#tt
f$rd}Y|SwxYw)z{Given a url with authentication components, extract them into a tuple of
    username,password.

    :rtype: (str,str)
    )rr)rr�username�passwordr[r�)rwr?rxs   rB�get_auth_from_urlr�sU���c�]�F������(�'�&�/�/�*B�C���K��
�I�&�����K��s�*9�A�
Ac�B�|\}}t||d�t||d�y)z�Verifies that header parts don't contain leading whitespace
    reserved characters, or return characters.

    :param header: tuple, in the format (name, value).
    rrN)�_validate_header_part)r�r�r�s   rB�check_header_validityr�s%���K�D�%��&�$��*��&�%��+rEc
��t|t�r
t|}n7t|t�r
t|}ntd|�d|�dt
|�����|j|�s|dk(rdnd}td|�d|����y)	Nz
Header part (z) from z# must be of type str or bytes, not rr�r�zSInvalid leading whitespace, reserved character(s), or returncharacter(s) in header z: )rsrrrr
r�typer;)r��header_part�header_validator_index�	validator�header_kinds     rBr�r�s����+�s�#�*�+A�B�	�	�K��	'�+�,B�C�	���K�?�'�&��:1�15�k�1B�0C�
E�
�	
�
�?�?�;�'� 6�!� ;�f����&�&1�]�"�[�O�
E�
�	
�(rEc�~�t|�\}}}}}}|s||}}|jdd�d}t|||||df�S)zW
    Given a url remove the fragment and the authentication part.

    :rtype: str
    rvrr�r)r�rsplitr)rwrIruror�ryrzs       rB�
urldefragauthr�&sU��5=�S�M�1�F�F�D�&�%����V���
�]�]�3��
"�2�
&�F��v�v�t�V�U�B�?�@�@rEc���t|jdd�}|�.t|jt�r	||j�yt
d��#t
$rt
d��wxYw)zfMove file pointer back to its recorded starting position
    so it can be read again on redirect.
    rQNz;An error occurred when rewinding request body for redirect.z+Unable to rewind request body for redirect.)r��bodyrs�_body_positionrr6r!)�prepared_request�	body_seeks  rB�rewind_bodyr�7st���(�-�-�v�t�<�I�����'�'��"�	��&�5�5�6�$�$Q�R�R���	�'�M��
�	�s�A�A()Fr2)T)zpython-requests)j�__doc__r��
contextlibrYrSr:rr�sysr�rWr��collectionsr�pip._vendor.urllib3.utilrrrrr	�_internal_utilsr
rrr
�compatrrrrrrrr�rrrrrrr�cookiesr�
exceptionsrrr r!�
structuresr"rn�where�DEFAULT_CA_BUNDLE_PATH�
DEFAULT_PORTSr�r8r]�platformrCrJr`r�r�r��contextmanagerr�r�r�r�r�r�r�r�r�r�r�r�r�r��	frozensetrrrrrr&r*r/rCrFrOrWrYr^rd�encodernrorprtr{rr�r�r�r�rdrErB�<module>r�s�����	�	�	�
�
�
����#�<��$�����:����)���,�"��$�������c�*�
��)�)��B�H�H�W�l�4�8�9J�K�L���
�<�<�7��"�H	/�
�?3�D6
�r&�"�J���	��	��6�<�@�F�2�0��2%�2�2�"�$�P�M���
�05�,5�5���0���1��1�*9�x	��4�6#��"�L	�
�
�g���	����	�����@C�:
� ,�
�&A�"SrEpython3.12/site-packages/pip/_vendor/requests/__pycache__/help.cpython-312.pyc000064400000010411151732702610023054 0ustar00�

R`i'����dZddlZddlZddlZddlZddlmZddlmZddlm	Z
dZ	ddlmZ	ddlmZddlZddlZd	�Zd
�Zd�Zedk(re�yy#e
$rdZY�/wxYw#e
$r	dZdZdZY�1wxYw)
z'Module containing bug report helper(s).�N)�idna)�urllib3�)�__version__)�chardet)�	pyopensslc�&�tj�}|dk(rtj�}n�|dk(r�djtj
jtj
jtj
j�}tj
jdk7rbdj|tj
jg�}n6|dk(rtj�}n|dk(rtj�}nd}||d	�S)
a�Return a dict with the Python implementation and version.

    Provide both the name and the version of the Python implementation
    currently running. For example, on CPython 3.10.3 it will return
    {'name': 'CPython', 'version': '3.10.3'}.

    This function works best on CPython and PyPy: in particular, it probably
    doesn't work for Jython or IronPython. Future investigation should be done
    to work out the correct shape of the code for those platforms.
    �CPython�PyPyz{}.{}.{}�final��Jython�
IronPython�Unknown)�name�version)�platform�python_implementation�python_version�format�sys�pypy_version_info�major�minor�micro�releaselevel�join)�implementation�implementation_versions  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/help.py�_implementationr!s����3�3�5�N���"�!)�!8�!8�!:��	�6�	!�!+�!2�!2��!�!�'�'��!�!�'�'��!�!�'�'�"
��
� � �-�-��8�%'�W�W�'��)>�)>�)K�)K�L�&�"�
�8�	#�!)�!8�!8�!:��	�<�	'�!)�!8�!8�!:��!*��"�/E�F�F�c
�X�	tj�tj�d�}t	�}dt
ji}ddi}ddi}trdtji}trdtji}ddd�}tr-tjtjjd�d�}dttdd�i}dttdd�i}tj}d|�|d�ndi}	|||	t dutdu||||||dt"id	�S#t$rddd�}Y��wxYw)
z&Generate information for a bug report.)�system�releaserrNr
)r�openssl_version�xr)rr�
system_ssl�using_pyopenssl�using_charset_normalizer�	pyOpenSSLrr�charset_normalizer�cryptographyr�requests)rr$r%�OSErrorr!rrr,r�OpenSSL�SSL�OPENSSL_VERSION_NUMBER�getattrr-r�sslr�requests_version)
�
platform_info�implementation_info�urllib3_info�charset_normalizer_info�chardet_info�pyopenssl_info�cryptography_info�	idna_infor(�system_ssl_infos
          r �infor?Bsd��	
��o�o�'��'�'�)�
�
�*�+���w�2�2�3�L�(�$�/���t�$�L��#,�.@�.L�.L�"M���!�7�#6�#6�7�����N���*�*�")�+�+�"D�"D�Q�!G�
��
	�7�<���;���	�7�4���3��I��+�+�J� �z�7M�Z��N�SU�V�O�"�-�%�$�D�0�$+�t�O�#���5�)���'�
����E�
�� �
�
�
�s�)D�D)�(D)c�V�ttjt�dd���y)z)Pretty-print the bug information as JSON.T�)�	sort_keys�indentN)�print�json�dumpsr?�r"r �mainrH}s��	�$�*�*�T�V�t�A�
6�7r"�__main__)�__doc__rErr4r�pip._vendorrrr
rr5r,r�ImportError�pip._vendor.urllib3.contribrr-r0r!r?rH�__name__rGr"r �<module>rOs���-���
�
���-����#��5��� G�F8�v8�
�z���F���c���G���
���I��G��L��s"�A�A!�A�A�!A/�.A/python3.12/site-packages/pip/_vendor/requests/__pycache__/models.cpython-312.pyc000064400000105167151732702620023425 0ustar00�

R`i؉��d�dZddlZddlZddlmZddlmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZdd	lmZmZdd
lmZddlmZmZmZmZmZmZmZddlmZ dd
lm!Z!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'ddl(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.ddl(mZ/ddl(m0Z0ddl(mZ1ddl(m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCe6j�e6j�e6j�e6j�e6j�fZIdZJdZKdZLGd�d�ZMGd�d�ZNGd�d eN�ZOGd!�d"eMeN�ZPGd#�d$�ZQy)%z`
requests.models
~~~~~~~~~~~~~~~

This module contains the primary objects that power Requests.
�N)�UnsupportedOperation)�DecodeError�LocationParseError�
ProtocolError�ReadTimeoutError�SSLError)�RequestField)�encode_multipart_formdata)�	parse_url�)�to_native_string�unicode_is_ascii)�
HTTPBasicAuth)�Callable�JSONDecodeError�Mapping�
basestring�builtin_str�chardet�	cookielib)�json)�	urlencode�urlsplit�
urlunparse)�_copy_cookie_jar�cookiejar_from_dict�get_cookie_header)�ChunkedEncodingError�ConnectionError�ContentDecodingError�	HTTPError�InvalidJSONError�
InvalidURL)r)�
MissingSchema)r)�StreamConsumedError)�
default_hooks)�codes)�CaseInsensitiveDict)
�check_header_validity�get_auth_from_url�guess_filename�guess_json_utf�iter_slices�parse_header_links�requote_uri�stream_decode_response_unicode�	super_len�to_key_val_list�i(ic�<�eZdZed��Zed��Zed��Zy)�RequestEncodingMixinc���g}t|j�}|j}|sd}|j|�|j}|r"|jd�|j|�dj|�S)zBuild the path URL to use.�/�?�)r�url�path�append�query�join)�selfr:�pr;r=s     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/models.py�path_urlzRequestEncodingMixin.path_urlUse�����T�X�X����v�v����D��
�
�4��������J�J�s�O��J�J�u���w�w�s�|��c	��t|ttf�r|St|d�r|St|d�r�g}t	|�D]�\}}t|t
�st|d�s|g}|D]Z}|��|j
t|t�r|jd�n|t|t�r|jd�n|f��\��t|d��S|S)z�Encode parameters in a piece of data.

        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        �read�__iter__�utf-8T)�doseq)	�
isinstance�str�bytes�hasattrr2rr<�encoder)�data�result�k�vs�vs     rA�_encode_paramsz#RequestEncodingMixin._encode_paramsjs����d�S�%�L�)��K�
�T�6�
"��K�
�T�:�
&��F�(��.���2��b�*�-�W�R��5L���B��A��}��
�
�5?��3�5G����� 1�Q�5?��3�5G����� 1�Q����/��V�4�0�0��KrCc	��|std��t|t�rtd��g}t|xsi�}t|xsi�}|D]�\}}t|t�st	|d�s|g}|D]u}|��t|t
�st
|�}|jt|t
�r|jd�n|t|t�r|jd�n|f��w��|D]�\}}d}d}	t|ttf�r1t|�dk(r|\}
}n.t|�dk(r|\}
}}n|\}
}}}	nt|�xs|}
|}t|tt
tf�r|}n"t	|d�r|j�}n|���|}t!|||
|	�	�}
|
j#|�
�|j|
���t%|�\}}||fS)a�Build the body for a multipart/form-data request.

        Will successfully encode files when passed as a dict or a list of
        tuples. Order is retained if data is a list of tuples but arbitrary
        if parameters are supplied as a dict.
        The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype)
        or 4-tuples (filename, fileobj, contentype, custom_headers).
        zFiles must be provided.zData must not be a string.rFNrG��rE)�namerN�filename�headers)�content_type)�
ValueErrorrIrr2rLrKrJr<�decoderM�tuple�list�lenr+�	bytearrayrEr	�make_multipartr
)�filesrN�
new_fields�fields�field�valrRrP�ft�fh�fn�fp�fdata�rf�bodyrZs                rA�
_encode_filesz"RequestEncodingMixin._encode_files�s�����6�7�7�
��j�
)��9�:�:��
� ����,������,�� �J�E�3��#�z�*�'�#�z�2J��e�����=�%�a��/���F���%�%� *�%��7�"�L�L��1�!&�1;�A�s�1C�A�H�H�W�-��	��
�!�$�F�Q���B��B��!�e�T�]�+��q�6�Q�;��F�B����V�q�[�!"�J�B��B�%&�N�B��B��#�A�&�+�!�����"�s�E�9�5�6�����V�$����	��������1�5�2�r�J�B����2��.����b�!�5�87�z�B���l��\�!�!rCN)�__name__�
__module__�__qualname__�propertyrB�staticmethodrSrn�rCrAr5r5Ts>��
����(����:�B"��B"rCr5c��eZdZd�Zd�Zy)�RequestHooksMixinc��||jvrtd|�d���t|t�r|j|j	|�yt|d�r&|j|j
d�|D��yy)zProperly register a hook.z.Unsupported event specified, with event name "�"rFc3�BK�|]}t|t�s�|���y�w�N)rIr)�.0�hs  rA�	<genexpr>z2RequestHooksMixin.register_hook.<locals>.<genexpr>�s����$P��1�
�1�h�8O�Q��s��N)�hooksr[rIrr<rL�extend�r?�event�hooks   rA�
register_hookzRequestHooksMixin.register_hook�ss����
�
�"��M�e�W�TU�V�W�W��d�H�%��J�J�u��$�$�T�*�
�T�:�
&��J�J�u��$�$�$P��$P�P�'rCc�`�	|j|j|�y#t$rYywxYw)ziDeregister a previously registered hook.
        Returns True if the hook existed, False if not.
        TF)r~�remover[r�s   rA�deregister_hookz!RequestHooksMixin.deregister_hook�s3��
	��J�J�u��$�$�T�*����	��	�s�!�	-�-N)rorprqr�r�rtrCrArvrv�s
��	Q�	rCrvc�8�eZdZdZ										dd�Zd�Zd�Zy)�Requesta{A user-created :class:`Request <Request>` object.

    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach to the request. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param json: json for the body to attach to the request (if files or data is not specified).
    :param params: URL parameters to append to the URL. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>
    Nc�D�|�gn|}|�gn|}|�in|}|�in|}|	�in|	}	t�|_t|	j��D]\}}|j	||���||_||_||_||_||_	|
|_
||_||_||_
y)N)r�r�)r&r~r^�itemsr��methodr:rYrbrNr�params�auth�cookies)
r?r�r:rYrbrNr�r�r�r~rrPrRs
             rA�__init__zRequest.__init__s����\�r�t���m������"�W���~��6���m����"�_��
��5�;�;�=�)�F�Q�����Q�Q��/�*������������
���	���	������	���rCc�"�d|j�d�S)Nz
<Request [�]>�r��r?s rA�__repr__zRequest.__repr__%s���D�K�K�=��+�+rCc��t�}|j|j|j|j|j
|j|j|j|j|j|j��
|S)zXConstructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it.)
r�r:rYrbrNrr�r�r�r~)�PreparedRequest�preparer�r:rYrbrNrr�r�r�r~�r?r@s  rAr�zRequest.prepare(sh�����	�	�	��;�;�����L�L��*�*��������;�;�����L�L��*�*�	�	
��rC�
NNNNNNNNNN)rorprq�__doc__r�r�r�rtrCrAr�r��s7���:����
��
���
�!�F,�rCr�c��eZdZdZd�Z										dd�Zd�Zd�Zd�Ze	d��Z
d	�Zd
�Zdd�Z
d�Zdd
�Zd�Zd�Zy)r�a)The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.

    Instances are generated from a :class:`Request <Request>` object, and
    should not be instantiated manually; doing so may produce undesirable
    effects.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> r = req.prepare()
      >>> r
      <PreparedRequest [GET]>

      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>
    c�v�d|_d|_d|_d|_d|_t�|_d|_yrz)r�r:rY�_cookiesrmr&r~�_body_positionr�s rAr�zPreparedRequest.__init__Os8�������������
���	�"�_��
�"��rCNc��|j|�|j||�|j|�|j|�|j	|||
�|j||�|j
|	�y)z6Prepares the entire request with the given parameters.N)�prepare_method�prepare_url�prepare_headers�prepare_cookies�prepare_body�prepare_auth�
prepare_hooks)r?r�r:rYrbrNr�r�r�r~rs           rAr�zPreparedRequest.prepare`sp��	
���F�#�����f�%����W�%����W�%����$��t�,����$��$�	
���5�!rCc�"�d|j�d�S)Nz<PreparedRequest [r�r�r�s rAr�zPreparedRequest.__repr__|s��#�D�K�K�=��3�3rCc�R�t�}|j|_|j|_|j�|jj	�nd|_t|j�|_|j|_|j|_|j|_	|Srz)
r�r�r:rY�copyrr�rmr~r�r�s  rAr�zPreparedRequest.copysx������;�;��������+/�<�<�+C�D�L�L�%�%�'���	�%�d�m�m�4��
�������*�*����.�.����rCc�|�||_|j�)t|jj��|_yy)zPrepares the given HTTP method.N)r�r
�upper)r?r�s  rAr�zPreparedRequest.prepare_method�s1������;�;�"�*�4�;�;�+<�+<�+>�?�D�K�#rCc��ddlm}	|j|d��jd�}|S#|j$rt
�wxYw)Nr)�idnaT)�uts46rG)�pip._vendorr�rMr\�	IDNAError�UnicodeError)�hostr�s  rA�_get_idna_encoded_hostz&PreparedRequest._get_idna_encoded_host�sI��$�	��;�;�t�4�;�0�7�7��@�D�����~�~�	���	�s	�",�Ac
�2�t|t�r|jd�}nt|�}|j	�}d|vr'|j�j
d�s||_y	t|�\}}}}}}}	|std|�d|�d���|std|�d���t|�s	|j|�}n|j
d
�rtd	��|xsd}|r|dz
}||z
}|r|d|��z
}|sd
}t|ttf�rt!|�}|j#|�}|r|r|�d|��}n|}t%t'|||d||	g��}||_y#t$r}
t|
j��d}
~
wwxYw#t$rtd	��wxYw)zPrepares the given HTTP URL.�utf8�:�httpNzInvalid URL z0: No scheme supplied. Perhaps you meant https://r8z: No host suppliedzURL has an invalid label.)�*�.r9�@r7�&)rIrKr\rJ�lstrip�lower�
startswithr:rrr#�argsr$rr�r�r
rSr/r)
r?r:r��schemer�r��portr;r=�fragment�e�netloc�
enc_paramss
             rAr�zPreparedRequest.prepare_url�s����c�5�!��*�*�V�$�C��c�(�C��j�j�l��
�#�:�c�i�i�k�4�4�V�<��D�H��	&�>G��n�;�F�D�$��d�E�8����s�g�&-�-0�E��4��
�
��|�C�7�2D�E�F�F� ��%�
>��2�2�4�8���_�_�Z�
(��8�9�9�������c�M�F��$������$��j� �F���D��f�s�E�l�+�%�f�-�F��(�(��0�
��� �'��:�,�/��"���*�f�f�d�D�%��%R�S�T������_"�	&��a�f�f�%�%��	&��& �
>� �!<�=�=�
>�s$�*E�.F�	E>�'E9�9E>�Fc��t�|_|r>|j�D]*}t|�|\}}||jt	|�<�,yy)z Prepares the given HTTP headers.N)r(rYr�r)r
)r?rY�headerrW�values     rAr�zPreparedRequest.prepare_headers�sK��+�,����!�-�-�/��%�f�-�$���e�7<����-�d�3�4�	*�rCc
��d}d}|s=|�;d}	tj|d��}t	|t
�s|j
d�}tt|d�t	|ttttf�g�}|rw	t|�}|}t#|dd��	|j%�|_|rt-d	��|r t/|�|j0d
<||_yd|j0d<||_y|r|j3||�\}}n4|r2|j5|�}t	|t�st|d
�rd}nd}|j7|�|rd|j0vr||j0d<||_y#t$r}t||���d}~wwxYw#ttt f$rd}Y��&wxYw#t($rt+�|_Y�� wxYw)z"Prepares the given HTTP body data.Nzapplication/jsonF)�	allow_nan)�requestrGrF�tellz1Streamed bodies and files are mutually exclusive.�Content-Length�chunkedzTransfer-EncodingrEz!application/x-www-form-urlencodedzcontent-typezContent-Type)�complexjson�dumpsr[r"rIrKrM�allrLrr^r]rr1�	TypeError�AttributeErrorr�getattrr�r��OSError�object�NotImplementedErrorrrYrnrS�prepare_content_lengthrm)	r?rNrbrrmrZ�ve�	is_stream�lengths	         rAr�zPreparedRequest.prepare_body�s���������(�.�L�
9�"�(�(���?���d�E�*��{�{�7�+�����j�)��t�j�$��w�%G�H�H�
�
�	��
�"�4����D��t�V�T�*�6�3�*.�)�)�+�D�'��)�G����1<�V�1D����-�.�*��	�'5>����0�1�&��	�!�'+�'9�'9�%��'F�$��|���.�.�t�4�D�!�$�
�3�w�t�V�7L�'+��'J���'�'��-���t�|�|�!C�/;����^�,���	��w�
9�&�r�4�8�8��
9�� �~�/C�D�
���
���3�+1�(�D�'�3�s;�E7�=F�F2�7	F�
F
�
F�F/�.F/�2G�
Gc���|�'t|�}|rt|�|jd<yy|jdvr,|jj	d��d|jd<yyy)z>Prepare Content-Length header based on request method and bodyNr�)�GET�HEAD�0)r1rrYr��get)r?rmr�s   rAr�z&PreparedRequest.prepare_content_length=sn�����t�_�F��2=�V�1D����-�.��

�K�K��.���� � �!1�2�:�.1�D�L�L�)�*�	;�
/rCc�2�|�$t|j�}t|�r|nd}|rot|t�rt|�dk(rt
|�}||�}|jj|j�|j|j�yy)z"Prepares the given HTTP auth data.NrU)r*r:�anyrIr]r_r�__dict__�updater�rm)r?r�r:�url_auth�rs     rAr�zPreparedRequest.prepare_authMs����<�(����2�H�"�8�}�8�$�D���$��&�3�t�9��>�$�d�+���T�
�A�
�M�M� � ����,�
�'�'��	�	�2�rCc��t|tj�r||_nt	|�|_t|j|�}|�||jd<yy)aPrepares the given HTTP cookie data.

        This function eventually generates a ``Cookie`` header from the
        given cookies using cookielib. Due to cookielib's design, the header
        will not be regenerated if it already exists, meaning this function
        can only be called once for the life of the
        :class:`PreparedRequest <PreparedRequest>` object. Any subsequent calls
        to ``prepare_cookies`` will have no actual effect, unless the "Cookie"
        header is removed beforehand.
        N�Cookie)rIr�	CookieJarr�rrrY)r?r��
cookie_headers   rAr�zPreparedRequest.prepare_cookiescsP���g�y�2�2�3�#�D�M�/��8�D�M�)�$�-�-��>�
��$�%2�D�L�L��"�%rCc�H�|xsg}|D]}|j|||��y)zPrepares the given hooks.N)r�)r?r~r�s   rAr�zPreparedRequest.prepare_hooksws+��
�����E����u�e�E�l�3�rCr�rz)r9)rorprqr�r�r�r�r�r�rsr�r�r�r�r�r�r�r�rtrCrAr�r�:s|���(#�&����
��
���
�"�84�	�@�����H�T	=�L�\1� 3�,3�(4rCr�c��eZdZdZgd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ed��Zed
��Zed��Zed��Zed��Zdd�Zeddfd�Zed��Zed��Zd�Zed��Zd�Zd�Zy)�ResponsezhThe :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    )
�_content�status_coderYr:�history�encoding�reasonr��elapsedr�c��d|_d|_d|_d|_t	�|_d|_d|_d|_g|_	d|_
ti�|_tjd�|_d|_y)NFr)r��_content_consumed�_nextr�r(rY�rawr:r�r�r�rr��datetime�	timedeltar�r�r�s rAr�zResponse.__init__�s�����
�!&�����
� ���
+�,���
��������
�
������+�2�.��� �)�)�!�,�����rCc��|Srzrtr�s rA�	__enter__zResponse.__enter__�s���rCc�$�|j�yrz)�close)r?r�s  rA�__exit__zResponse.__exit__�s���
�
�rCc	��|js|j|jD�cic]}|t||d���c}Scc}wrz)r��content�	__attrs__r�)r?�attrs  rA�__getstate__zResponse.__getstate__�s>���%�%��L�L�<@�N�N�K�N�D��g�d�D�$�/�/�N�K�K��Ks�?c��|j�D]\}}t|||��t|dd�t|dd�y)Nr�Tr�)r��setattr)r?�staterWr�s    rA�__setstate__zResponse.__setstate__�s=�� �;�;�=�K�D�%��D�$��&�)�	��)�4�0���e�T�"rCc�"�d|j�d�S)Nz<Response [r�)r�r�s rAr�zResponse.__repr__�s���T�-�-�.�b�1�1rCc��|jS�akReturns True if :attr:`status_code` is less than 400.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code, is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        ��okr�s rA�__bool__zResponse.__bool__��
���w�w�rCc��|jSr
rr�s rA�__nonzero__zResponse.__nonzero__�rrCc�$�|jd�S)z,Allows you to use a response as an iterator.�)�iter_contentr�s rArFzResponse.__iter__�s��� � ��%�%rCc�D�	|j�y#t$rYywxYw)axReturns True if :attr:`status_code` is less than 400, False if not.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        FT)�raise_for_statusr!r�s rArzResponse.ok�s,��	��!�!�#����	��	�s��	�c�F�d|jvxr|jtvS)z�True if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        �location)rYr��REDIRECT_STATIr�s rA�is_redirectzResponse.is_redirects#��
�T�\�\�)�P�d�.>�.>�.�.P�PrCc�z�d|jvxr,|jtjtjfvS)z@True if this Response one of the permanent versions of redirect.r)rYr�r'�moved_permanently�permanent_redirectr�s rA�is_permanent_redirectzResponse.is_permanent_redirect	s?���T�\�\�)�
�d�.>�.>��#�#��$�$�C
�/
�	
rCc��|jS)zTReturns a PreparedRequest for the next request in a redirect chain, if there is one.)r�r�s rA�nextz
Response.nexts���z�z�rCc�F�tj|j�dS)zOThe apparent encoding, provided by the charset_normalizer or chardet libraries.r�)r�detectrr�s rA�apparent_encodingzResponse.apparent_encodings���~�~�d�l�l�+�J�7�7rCFc�@�����fd�}�jr$t�jt�r
t	����(t�t
�st
dt���d���t�j��}|�}�jr|n|}|rt|��}|S)a�Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        chunk_size must be of type int or None. A value of None will
        function differently depending on the value of `stream`.
        stream=True will read data as it arrives in whatever size the
        chunks are received. If stream=False, data is returned as
        a single chunk.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        c3��K�t�jd�r.	�jj�d��Ed{���d�_y	�jj��}|s		d�_y|���+7�8#t$r}t	|��d}~wt
$r}t
|��d}~wt$r}t|��d}~wt$r}t|��d}~wwxYw�w)N�streamT)�decode_content)
rLr�r%rrrr rrr�RequestsSSLErrorrEr�)r��chunk�
chunk_sizer?s  ��rA�generatez'Response.iter_content.<locals>.generate,s�������t�x�x��*�	.�#�x�x���z�$��O�O�O�"&*�D�"�
� �H�H�M�M�*�5�E� ��&*�D�"� �K�	�P��$�2�.�q�1�1��"�2�.�q�1�1��'�-�)�!�,�,���.�*�1�-�-��.�s\�C� A6�A4�A6�4C�4A6�6	C�?B
�
C�B!�!C�-B8�8C�C�C�Cz+chunk_size must be an int, it is instead a r�)
r�rIr��boolr%�intr��typer-r0)r?r)�decode_unicoder*�
reused_chunks�
stream_chunks�chunkss``     rArzResponse.iter_contents����"	*�.�!�!�j�����&E�%�'�'�
�
#�J�z�3�,G��=�d�:�>N�=O�q�Q��
�$�D�M�M�:�>�
� �
�
�"&�"8�"8��m���3�F�D�A�F��
rCNc#�K�d}|j||��D]a}|�||z}|r|j|�}n|j�}|r&|dr!|r|dd|dk(r|j�}nd}|Ed{����c|�|��yy7��w)z�Iterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.

        .. note:: This method is not reentrant safe.
        N)r)r.���)r�split�
splitlines�pop)r?r)r.�	delimiter�pendingr(�liness       rA�
iter_lineszResponse.iter_linesUs��������&�&�!�.�'�
�E��"��%�������I�.���(�(�*����r��u��r��2��%��)�1K��)�)�+�������#
�&���M��
�s�A3B�5B�6Bc��|jdurg|jrtd��|jdk(s|j�d|_n-dj|j
t��xsd|_d|_|jS)z"Content of the response, in bytes.Fz2The content for this response was already consumedrNrCT)r�r��RuntimeErrorr�r�r>r�CONTENT_CHUNK_SIZEr�s rArzResponse.contentwsy���=�=�E�!��%�%�"�#W�X�X����1�$����(8� $��
� #����):�):�;M�)N� O� V�SV��
�!%����}�}�rCc��d}|j}|jsy|j�|j}	t|j|d��}|S#tt
f$rt|jd��}Y|SwxYw)a�Content of the response, in unicode.

        If Response.encoding is None, encoding will be guessed using
        ``charset_normalizer`` or ``chardet``.

        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        Nr9�replace)�errors)r�rr"rJ�LookupErrorr�)r?rr�s   rA�textz
Response.text�s~�����=�=���|�|���=�=� ��-�-�H�		:��$�,�,���C�G�����Y�'�	:��$�,�,�y�9�G���	:�s�A�&A9�8A9c�6�|jsk|jr_t|j�dkDrGt|j�}|�0	t	j
|jj
|�fi|��S	t	j
|jfi|��S#t$rY�,t$r0}t|j|j|j��d}~wwxYw#t$r0}t|j|j|j��d}~wwxYw)z�Returns the json-encoded content of a response, if any.

        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        :raises requests.exceptions.JSONDecodeError: If the response body does not
            contain valid json.
        rVN)r�rr_r,r��loadsr\�UnicodeDecodeErrorr�RequestsJSONDecodeError�msg�doc�posrB)r?�kwargsr�r�s    rArz
Response.json�s����}�}����#�d�l�l�2C�a�2G�
&�d�l�l�3�H��#�	G�&�,�,�T�\�\�-@�-@��-J�U�f�U�U�	?��$�$�T�Y�Y�9�&�9�9��*��
�&�G�1�!�%�%�������F�F��G��
�	?�*�!�%�%�������>�>��	?�s6�	.B�9C�	C�$C�,+C�C�	D�(+D�Dc��|jjd�}i}|r;t|�}|D]+}|jd�xs|jd�}|||<�-|S)z8Returns the parsed header links of the response, if any.�link�relr:)rYr�r.)r?r��resolved_links�linksrL�keys      rArOzResponse.links�s`�����!�!�&�)�����&�v�.�E����h�h�u�o�8����%���&*��s�#���rCc���d}t|jt�r	|jjd�}n|j}d|j
cxkrdkr"nn|j
�d|�d|j��}n6d|j
cxkrdkr!nn|j
�d	|�d|j��}|r
t||�
��y#t$r|jjd�}Y��wxYw)z+Raises :class:`HTTPError`, if one occurred.r9rGz
iso-8859-1i�i�z Client Error: z
 for url: iXz Server Error: )�responseN)rIr�rKr\rEr�r:r!)r?�http_error_msgr�s   rArzResponse.raise_for_status�s������d�k�k�5�)�

:����+�+�G�4���[�[�F��$�"�"�(�S�(��#�#�$�O�F�8�:�d�h�h�Z�P�
��D�$�$�
*�s�
*��#�#�$�O�F�8�:�d�h�h�Z�P�
���N�T�:�:���&�
:����+�+�L�9��
:�s�C�$C*�)C*c��|js|jj�t|jdd�}|�|�yy)z�Releases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.

        *Note: Should not normally need to be called explicitly.*
        �release_connN)r�r�r�r�)r?rUs  rAr�zResponse.close�s=���%�%��H�H�N�N���t�x�x���>���#��N�$rC)rF)rorprqr�rr�r�r�rrr�r
rrFrrrrrrr"r�ITER_CHUNK_SIZEr:rrBrrOrr�rtrCrAr�r��s����I�-�^��L�#�2���&������Q��Q��
��
������8��8�8�v)��$� �D����$�#��#�J?�B���� ;�:rCr�)Rr�r��encodings.idna�	encodings�ior�pip._vendor.urllib3.exceptionsrrrrr�pip._vendor.urllib3.fieldsr	�pip._vendor.urllib3.filepostr
�pip._vendor.urllib3.utilr�_internal_utilsr
rr�r�compatrrrrrrrrr�rrrr�rrr�
exceptionsrrr r!r"r#rFr$r'r%r~r&�status_codesr'�
structuresr(�utilsr)r*r+r,r-r.r/r0r1r2�moved�found�other�temporary_redirectrr�DEFAULT_REDIRECT_LIMITr=rVr5rvr�r�r�rtrCrA�<module>ris����
�#���4�B�.�?�����(�3�3�M�M���C�%�4�+� ��+���� 
�K�K�	�K�K�	�K�K�	���	�����������w"�w"�t��0Q��Q�hD4�*�,=�D4�N
I�IrCpython3.12/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-312.pyc000064400000061201151732702620023564 0ustar00�

R`i�H���dZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZ	ddlZGd�d�ZGd�d	�Zd
�Zd�Zdd�ZGd
�de�ZGd�de	j,e�Zd�Zd�Zd�Zdd�Zd�Zy#e
$rddlZY�[wxYw)z�
requests.cookies
~~~~~~~~~~~~~~~~

Compatibility code to be able to use `cookielib.CookieJar` with requests.

requests.utils imports from here, so be careful with imports.
�N�)�to_native_string)�Morsel�MutableMapping�	cookielib�urlparse�
urlunparsec��eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
dd
�Zd�Zd�Z
d
�Zed��Zed��Zed��Zy	)�MockRequesta�Wraps a `requests.Request` to mimic a `urllib2.Request`.

    The code in `cookielib.CookieJar` expects this interface in order to correctly
    manage cookie policies, i.e., determine whether a cookie can be set, given the
    domains of the request and the cookie.

    The original request object is read-only. The client is responsible for collecting
    the new headers via `get_new_headers()` and interpreting them appropriately. You
    probably want `get_cookie_header`, defined below.
    c�|�||_i|_t|jj�j|_y�N)�_r�_new_headersr�url�scheme�type)�self�requests  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/cookies.py�__init__zMockRequest.__init__#s+���������T�W�W�[�[�)�0�0��	�c��|jSr
)r�rs r�get_typezMockRequest.get_type(s���y�y�rc�T�t|jj�jSr
)rrr�netlocrs r�get_hostzMockRequest.get_host+s��������$�+�+�+rc�"�|j�Sr
�rrs r�get_origin_req_hostzMockRequest.get_origin_req_host.s���}�}��rc��|jjjd�s|jjSt	|jjdd��}t|jj�}t
|j||j|j|j|jg�S)N�Hostzutf-8)�encoding)r�headers�getrrrr	r�path�params�query�fragment)r�host�parseds   r�get_full_urlzMockRequest.get_full_url1s����w�w���"�"�6�*��7�7�;�;��������� 7�'�J���$�'�'�+�+�&����
�
������
�
�������

�	
�		
rc��y�NT�rs r�is_unverifiablezMockRequest.is_unverifiableEs��rc�R�||jjvxs||jvSr
)rr$r�r�names  r�
has_headerzMockRequest.has_headerHs%���t�w�w���&�C�$�$�2C�2C�*C�CrNc��|jjj||jj||��Sr
)rr$r%r)rr3�defaults   r�
get_headerzMockRequest.get_headerKs0���w�w���"�"�4��):�):�)>�)>�t�W�)M�N�Nrc��td��)zMcookielib has no legitimate use for this method; add it back if you find one.z=Cookie headers should be added with add_unredirected_header())�NotImplementedError)r�key�vals   r�
add_headerzMockRequest.add_headerNs��!�K�
�	
rc�"�||j|<yr
�r�rr3�values   r�add_unredirected_headerz#MockRequest.add_unredirected_headerTs��"'����$�rc��|jSr
r>rs r�get_new_headerszMockRequest.get_new_headersWs��� � � rc�"�|j�Sr
)r0rs r�unverifiablezMockRequest.unverifiableZs���#�#�%�%rc�"�|j�Sr
)r rs r�origin_req_hostzMockRequest.origin_req_host^s���'�'�)�)rc�"�|j�Sr
rrs rr*zMockRequest.hostbs���}�}��rr
)�__name__�
__module__�__qualname__�__doc__rrrr r,r0r4r7r<rArC�propertyrErGr*r/rrrrs|��	�1�
�,��
�(�D�O�
�(�!��&��&��*��*����rrc�"�eZdZdZd�Zd�Zd�Zy)�MockResponsez�Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.

    ...what? Basically, expose the parsed HTTP headers from the server response
    the way `cookielib` expects to see them.
    c��||_y)z�Make a MockResponse for `cookielib` to read.

        :param headers: a httplib.HTTPMessage or analogous carrying the headers
        N��_headers)rr$s  rrzMockResponse.__init__ns��
 ��
rc��|jSr
rQrs r�infozMockResponse.infous���}�}�rc�:�|jj|�yr
)rR�
getheadersr2s  rrVzMockResponse.getheadersxs���
�
� � ��&rN)rIrJrKrLrrTrVr/rrrOrOgs��� ��'rrOc��t|d�r|jsyt|�}t|jj�}|j||�y)z�Extract the cookies from the response into a CookieJar.

    :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)
    :param request: our own requests.Request object
    :param response: urllib3.HTTPResponse object
    �_original_responseN)�hasattrrXrrO�msg�extract_cookies)�jarr�response�req�ress     r�extract_cookies_to_jarr`|sJ��
�H�2�3��8S�8S��
�g�
�C�
�x�2�2�6�6�
7�C�����S�!rc�x�t|�}|j|�|j�jd�S)zj
    Produce an appropriate Cookie header string to be sent with `request`, or None.

    :rtype: str
    �Cookie)r�add_cookie_headerrCr%)r\r�rs   r�get_cookie_headerre�s6��	�G��A����!������"�"�8�,�,rc��g}|D]h}|j|k7r�|�||jk7r�%|�||jk7r�7|j|j|j|jf��j|D]\}}}|j	|||��y)zkUnsets a cookie by name, by default over all domains and paths.

    Wraps CookieJar.clear(), is O(n).
    N)r3�domainr&�append�clear)�	cookiejarr3rgr&�
clearables�cookies      r�remove_cookie_by_namerm�s���
�J����;�;�$�����&�F�M�M�"9�������� 3�����6�=�=�&�+�+�v�{�{�C�D��)����d������d�+�)rc��eZdZdZy)�CookieConflictErrorz�There are two cookies that meet the criteria specified in the cookie jar.
    Use .get and .set and include domain and path args in order to be more specific.
    N)rIrJrKrLr/rrroro�s��rroc���eZdZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zdd
�Z�fd�Zd�Zd�Zd�Z�fd�Z�fd�Zdd�Zdd�Zd�Zd�Zd�Zd�Z�xZS)�RequestsCookieJara�Compatibility class; is a cookielib.CookieJar, but exposes a dict
    interface.

    This is the CookieJar we create by default for requests and sessions that
    don't specify one, since some clients may expect response.cookies and
    session.cookies to support dict operations.

    Requests does not use the dict interface internally; it's just for
    compatibility with external client code. All requests code should work
    out of the box with externally provided instances of ``CookieJar``, e.g.
    ``LWPCookieJar`` and ``FileCookieJar``.

    Unlike a regular CookieJar, this class is pickleable.

    .. warning:: dictionary operations that are normally O(1) may be O(n).
    c�L�	|j|||�S#t$r|cYSwxYw)z�Dict-like get() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains.

        .. warning:: operation is O(n), not O(1).
        )�_find_no_duplicates�KeyError)rr3r6rgr&s     rr%zRequestsCookieJar.get�s0��	��+�+�D�&�$�?�?���	��N�	�s��#�#c���|�.t|||jd�|jd���yt|t�rt	|�}n
t||fi|��}|j
|�|S)z�Dict-like set() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains.
        Nrgr&)rgr&)rmr%�
isinstancer�morsel_to_cookie�
create_cookie�
set_cookie)rr3r@�kwargs�cs     r�setzRequestsCookieJar.set�sg���=�!��d�6�:�:�h�#7�f�j�j��>P�
�
��e�V�$� ��'�A��d�E�4�V�4�A�������rc#�HK�t|�D]}|j���y�w)z�Dict-like iterkeys() that returns an iterator of names of cookies
        from the jar.

        .. seealso:: itervalues() and iteritems().
        N)�iterr3�rrls  r�iterkeyszRequestsCookieJar.iterkeys�s �����4�j�F��+�+��!��� "c�4�t|j��S)z�Dict-like keys() that returns a list of names of cookies from the
        jar.

        .. seealso:: values() and items().
        )�listr�rs r�keyszRequestsCookieJar.keys�s���D�M�M�O�$�$rc#�HK�t|�D]}|j���y�w)z�Dict-like itervalues() that returns an iterator of values of cookies
        from the jar.

        .. seealso:: iterkeys() and iteritems().
        N)r~r@rs  r�
itervalueszRequestsCookieJar.itervalues�s �����4�j�F��,�,��!�r�c�4�t|j��S)z�Dict-like values() that returns a list of values of cookies from the
        jar.

        .. seealso:: keys() and items().
        )r�r�rs r�valueszRequestsCookieJar.values�s���D�O�O�%�&�&rc#�`K�t|�D]}|j|jf���y�w)z�Dict-like iteritems() that returns an iterator of name-value tuples
        from the jar.

        .. seealso:: iterkeys() and itervalues().
        N)r~r3r@rs  r�	iteritemszRequestsCookieJar.iteritemss)�����4�j�F��+�+�v�|�|�+�+�!�s�,.c�4�t|j��S)z�Dict-like items() that returns a list of name-value tuples from the
        jar. Allows client-code to call ``dict(RequestsCookieJar)`` and get a
        vanilla python dict of key value pairs.

        .. seealso:: keys() and values().
        )r�r�rs r�itemszRequestsCookieJar.itemss���D�N�N�$�%�%rc�~�g}t|�D],}|j|vs�|j|j��.|S)z2Utility method to list all the domains in the jar.�r~rgrh�r�domainsrls   r�list_domainszRequestsCookieJar.list_domainss8�����4�j�F��}�}�G�+����v�}�}�-�!��rc�~�g}t|�D],}|j|vs�|j|j��.|S)z0Utility method to list all the paths in the jar.)r~r&rh)r�pathsrls   r�
list_pathszRequestsCookieJar.list_pathss8�����4�j�F��{�{�%�'����V�[�[�)�!��rc��g}t|�D]9}|j�|j|vry|j|j��;y)zvReturns True if there are multiple domains in the jar.
        Returns False otherwise.

        :rtype: bool
        TFr�r�s   r�multiple_domainsz"RequestsCookieJar.multiple_domains%sD�����4�j�F��}�}�(�V�]�]�g�-E���N�N�6�=�=�)�!�rc��i}t|�D]?}|�|j|k(s�|�|j|k(s�'|j||j<�A|S)z�Takes as an argument an optional domain and path and returns a plain
        old Python dict of name-value pairs of cookies that meet the
        requirements.

        :rtype: dict
        )r~rgr&r@r3)rrgr&�
dictionaryrls     r�get_dictzRequestsCookieJar.get_dict2sQ���
��4�j�F���&�-�-�6�"9������t� 3�*0�,�,�
�6�;�;�'�	!�
�rc�B��	t�|�|�S#t$rYywxYwr.)�super�__contains__ro)rr3�	__class__s  �rr�zRequestsCookieJar.__contains__As*���	��7�'��-�-��"�	��	�s��	�c�$�|j|�S)z�Dict-like __getitem__() for compatibility with client code. Throws
        exception if there are more than one cookie with name. In that case,
        use the more explicit get() method instead.

        .. warning:: operation is O(n), not O(1).
        )rsr2s  r�__getitem__zRequestsCookieJar.__getitem__Gs���'�'��-�-rc�(�|j||�y)z�Dict-like __setitem__ for compatibility with client code. Throws
        exception if there is already a cookie of that name in the jar. In that
        case, use the more explicit set() method instead.
        N)r|r?s   r�__setitem__zRequestsCookieJar.__setitem__Ps��
	
����u�rc��t||�y)zlDeletes a cookie given a name. Wraps ``cookielib.CookieJar``'s
        ``remove_cookie_by_name()``.
        N)rmr2s  r�__delitem__zRequestsCookieJar.__delitem__Ws��	�d�D�)rc���t|jd�rW|jjd�r<|jjd�r!|jj	dd�|_t�|�|g|��i|��S)N�
startswith�"z\"�)rYr@r��endswith�replacer�ry)rrl�argsrzr�s    �rryzRequestsCookieJar.set_cookie]sg����F�L�L�,�/����'�'��,����%�%�c�*�!�<�<�/�/��r�:�F�L��w�!�&�:�4�:�6�:�:rc���t|tj�r,|D]&}|jt	j|���(yt
�|�|�y)zAUpdates this jar with cookies from another CookieJar or dict-likeN)rvr�	CookieJarry�copyr��update)r�otherrlr�s   �rr�zRequestsCookieJar.updatefs@����e�Y�0�0�1�������	�	�&� 1�2� �
�G�N�5�!rc���t|�D]C}|j|k(s�|�|j|k(s�%|�|j|k(s�7|jcStd|�d|�d|����)a�Requests uses this method internally to get cookie values.

        If there are conflicting cookies, _find arbitrarily chooses one.
        See _find_no_duplicates if you want an exception thrown if there are
        conflicting cookies.

        :param name: a string containing name of cookie
        :param domain: (optional) string containing domain of cookie
        :param path: (optional) string containing path of cookie
        :return: cookie.value
        �name=�	, domain=�, path=)r~r3rgr&r@rt)rr3rgr&rls     r�_findzRequestsCookieJar._findnsh���4�j�F��{�{�d�"��>�V�]�]�f�%<��|�v�{�{�d�':�%�|�|�+�	!���t�h�i��z����I�J�Jrc��d}t|�D]R}|j|k(s�|�|j|k(s�%|�|j|k(s�7|�t	d|����|j
}�T|r|St
d|�d|�d|����)a�Both ``__get_item__`` and ``get`` call this function: it's never
        used elsewhere in Requests.

        :param name: a string containing name of cookie
        :param domain: (optional) string containing domain of cookie
        :param path: (optional) string containing path of cookie
        :raises KeyError: if cookie is not found
        :raises CookieConflictError: if there are multiple cookies
            that match name and optionally domain and path
        :return: cookie.value
        Nz&There are multiple cookies with name, r�r�r�)r~r3rgr&ror@rt)rr3rgr&�toReturnrls      rrsz%RequestsCookieJar._find_no_duplicates�s������4�j�F��{�{�d�"��>�V�]�]�f�%<��|�v�{�{�d�':�#�/�"5�"H��� Q�#��$*�<�<��!���O���t�h�i��z����I�J�Jrc�\�|jj�}|jd�|S)�4Unlike a normal CookieJar, this class is pickleable.�
_cookies_lock)�__dict__r��pop�r�states  r�__getstate__zRequestsCookieJar.__getstate__�s%���
�
�"�"�$��
�	�	�/�"��rc��|jj|�d|jvrtj�|_yy)r�r�N)r�r��	threading�RLockr�r�s  r�__setstate__zRequestsCookieJar.__setstate__�s4���
�
���U�#��$�-�-�/�!*���!2�D��0rc�z�t�}|j|j��|j|�|S)z(Return a copy of this RequestsCookieJar.)rq�
set_policy�
get_policyr�)r�new_cjs  rr�zRequestsCookieJar.copy�s0��"�$�����$�/�/�+�,��
�
�d���
rc��|jS)z&Return the CookiePolicy instance used.)�_policyrs rr�zRequestsCookieJar.get_policy�s���|�|�r)NNN�NN)rIrJrKrLr%r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�r�rsr�r�r�r��
__classcell__)r�s@rrqrq�s�����"
��&�%��'�,�&����
��.��*�;�"�K�(K�:�3��rrqc���|�yt|d�r|j�Stj|�}|j�|D]&}|jtj|���(|S)Nr�)rYr�riry)r\�new_jarrls   r�_copy_cookie_jarr��s\��
�{���s�F���x�x�z���i�i��n�G��M�M�O������4�9�9�V�,�-���Nrc�f�d||ddddddddddidd�
}t|�t|�z
}|rtd	t|�����|j|�t	|d
�|d<t	|d�|d
<|djd�|d<t	|d�|d<t
jdi|��S)z�Make a cookie from underspecified parameters.

    By default, the pair of `name` and `value` will be set for the domain ''
    and sent on every request (this is sometimes called a "supercookie").
    rNr��/FT�HttpOnly)
�versionr3r@�portrgr&�secure�expires�discard�comment�comment_url�rest�rfc2109z2create_cookie() got unexpected keyword arguments: r��port_specifiedrg�domain_specified�.�domain_initial_dotr&�path_specifiedr/)r|�	TypeErrorr�r��boolr�rrb)r3r@rz�result�badargss     rrxrx�s���������������T�"���F� �&�k�C��K�'�G���@��g���P�
�	
��M�M�&��#�F�6�N�3�F���!%�f�X�&6�!7�F���#)�(�#3�#>�#>�s�#C�F�� �#�F�6�N�3�F������%�f�%�%rc���d}|dr.	ttj�t|d�z�}n3|dr.d}t	j
tj|d|��}t|dt|d�d|d	||j|d
dd|didt|d
�|j|dxsd��
S#t$rtd|d�d���wxYw)zBConvert a Morsel object into a Cookie containing the one k/v pair.Nzmax-agez	max-age: z must be integerr�z%a, %d-%b-%Y %H:%M:%S GMTr�Frgr&r��httponlyr�r�r)
r�r�r�rgr�r3r&r�r�r�r�r@r�)�int�time�
ValueErrorr��calendar�timegm�strptimerxr�r:r@)�morselr��
time_templates   rrwrw�s���G�
�i��	M��$�)�)�+��F�9�,=�(>�>�?�G�
�	�	�3�
��/�/�$�-�-��y�0A�=�"Q�R����y�!���	�*�+���h���
�Z�Z�
�F�^�
��&��,�
-���F�8�$�%��l�l��y�!�&�Q�����	M��i��y�(9�':�:J�K�L�L�	M�s�,C�Cc��|�
t�}|�E|D�cgc]}|j��}}|D]'}|s||vs�
|jt|||���)|Scc}w)aCReturns a CookieJar from a key/value dictionary.

    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :param cookiejar: (optional) A cookiejar to add the cookies to.
    :param overwrite: (optional) If False, will not replace cookies
        already in the jar with new ones.
    :rtype: CookieJar
    )rqr3ryrx)�cookie_dictrj�	overwriterl�names_from_jarr3s      r�cookiejar_from_dictr�	sk����%�'�	���4=�>�I�&�&�+�+�I��>��D��T��7��$�$�]�4��T�9J�%K�L� ����?s�Ac�<�t|tj�std��t|t�rt||d��}|St|tj�r	|j
|�|S|S#t$r|D]}|j|��Y|SwxYw)z�Add cookies to cookiejar and returns a merged CookieJar.

    :param cookiejar: CookieJar object to add the cookies to.
    :param cookies: Dictionary or CookieJar object to be added.
    :rtype: CookieJar
    z!You can only merge into CookieJarF)rjr�)	rvrr�r��dictr�r��AttributeErrorry)rj�cookies�
cookie_in_jars   r�
merge_cookiesr�s����i��!4�!4�5��<�=�=��'�4� �'��9�PU�V�	���
�G�Y�0�0�	1�	4����W�%�
��9���	�	4�!(�
��$�$�]�3�")���		4�s�!A6�6!B�Br�r.)rLr�r�r��_internal_utilsr�compatrrrrr	r��ImportError�dummy_threadingrrOr`rerm�RuntimeErrorror�rqr�rxrwr�r�r/rr�<module>r�s�������-�K�K�(��
M�M�`'�'�*
"� -�,�&�,��E�	�+�+�^�E�P�"&�J�:�*��W�(�'�(�s�A8�8	B�Bpython3.12/site-packages/pip/_vendor/requests/status_codes.py000064400000010213151732702630020265 0ustar00r"""
The ``codes`` object defines a mapping from common names for HTTP statuses
to their numerical codes, accessible either as attributes or as dictionary
items.

Example::

    >>> import requests
    >>> requests.codes['temporary_redirect']
    307
    >>> requests.codes.teapot
    418
    >>> requests.codes['\o/']
    200

Some codes have multiple names, and both upper- and lower-case versions of
the names are allowed. For example, ``codes.ok``, ``codes.OK``, and
``codes.okay`` all correspond to the HTTP status code 200.
"""

from .structures import LookupDict

_codes = {
    # Informational.
    100: ("continue",),
    101: ("switching_protocols",),
    102: ("processing",),
    103: ("checkpoint",),
    122: ("uri_too_long", "request_uri_too_long"),
    200: ("ok", "okay", "all_ok", "all_okay", "all_good", "\\o/", "✓"),
    201: ("created",),
    202: ("accepted",),
    203: ("non_authoritative_info", "non_authoritative_information"),
    204: ("no_content",),
    205: ("reset_content", "reset"),
    206: ("partial_content", "partial"),
    207: ("multi_status", "multiple_status", "multi_stati", "multiple_stati"),
    208: ("already_reported",),
    226: ("im_used",),
    # Redirection.
    300: ("multiple_choices",),
    301: ("moved_permanently", "moved", "\\o-"),
    302: ("found",),
    303: ("see_other", "other"),
    304: ("not_modified",),
    305: ("use_proxy",),
    306: ("switch_proxy",),
    307: ("temporary_redirect", "temporary_moved", "temporary"),
    308: (
        "permanent_redirect",
        "resume_incomplete",
        "resume",
    ),  # "resume" and "resume_incomplete" to be removed in 3.0
    # Client Error.
    400: ("bad_request", "bad"),
    401: ("unauthorized",),
    402: ("payment_required", "payment"),
    403: ("forbidden",),
    404: ("not_found", "-o-"),
    405: ("method_not_allowed", "not_allowed"),
    406: ("not_acceptable",),
    407: ("proxy_authentication_required", "proxy_auth", "proxy_authentication"),
    408: ("request_timeout", "timeout"),
    409: ("conflict",),
    410: ("gone",),
    411: ("length_required",),
    412: ("precondition_failed", "precondition"),
    413: ("request_entity_too_large",),
    414: ("request_uri_too_large",),
    415: ("unsupported_media_type", "unsupported_media", "media_type"),
    416: (
        "requested_range_not_satisfiable",
        "requested_range",
        "range_not_satisfiable",
    ),
    417: ("expectation_failed",),
    418: ("im_a_teapot", "teapot", "i_am_a_teapot"),
    421: ("misdirected_request",),
    422: ("unprocessable_entity", "unprocessable"),
    423: ("locked",),
    424: ("failed_dependency", "dependency"),
    425: ("unordered_collection", "unordered"),
    426: ("upgrade_required", "upgrade"),
    428: ("precondition_required", "precondition"),
    429: ("too_many_requests", "too_many"),
    431: ("header_fields_too_large", "fields_too_large"),
    444: ("no_response", "none"),
    449: ("retry_with", "retry"),
    450: ("blocked_by_windows_parental_controls", "parental_controls"),
    451: ("unavailable_for_legal_reasons", "legal_reasons"),
    499: ("client_closed_request",),
    # Server Error.
    500: ("internal_server_error", "server_error", "/o\\", "✗"),
    501: ("not_implemented",),
    502: ("bad_gateway",),
    503: ("service_unavailable", "unavailable"),
    504: ("gateway_timeout",),
    505: ("http_version_not_supported", "http_version"),
    506: ("variant_also_negotiates",),
    507: ("insufficient_storage",),
    509: ("bandwidth_limit_exceeded", "bandwidth"),
    510: ("not_extended",),
    511: ("network_authentication_required", "network_auth", "network_authentication"),
}

codes = LookupDict(name="status_codes")


def _init():
    for code, titles in _codes.items():
        for title in titles:
            setattr(codes, title, code)
            if not title.startswith(("\\", "/")):
                setattr(codes, title.upper(), code)

    def doc(code):
        names = ", ".join(f"``{n}``" for n in _codes[code])
        return "* %d: %s" % (code, names)

    global __doc__
    __doc__ = (
        __doc__ + "\n" + "\n".join(doc(code) for code in sorted(_codes))
        if __doc__ is not None
        else None
    )


_init()
python3.12/site-packages/pip/_vendor/requests/structures.py000064400000005540151732702630020017 0ustar00"""
requests.structures
~~~~~~~~~~~~~~~~~~~

Data structures that power Requests.
"""

from collections import OrderedDict

from .compat import Mapping, MutableMapping


class CaseInsensitiveDict(MutableMapping):
    """A case-insensitive ``dict``-like object.

    Implements all methods and operations of
    ``MutableMapping`` as well as dict's ``copy``. Also
    provides ``lower_items``.

    All keys are expected to be strings. The structure remembers the
    case of the last key to be set, and ``iter(instance)``,
    ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()``
    will contain case-sensitive keys. However, querying and contains
    testing is case insensitive::

        cid = CaseInsensitiveDict()
        cid['Accept'] = 'application/json'
        cid['aCCEPT'] == 'application/json'  # True
        list(cid) == ['Accept']  # True

    For example, ``headers['content-encoding']`` will return the
    value of a ``'Content-Encoding'`` response header, regardless
    of how the header name was originally stored.

    If the constructor, ``.update``, or equality comparison
    operations are given keys that have equal ``.lower()``s, the
    behavior is undefined.
    """

    def __init__(self, data=None, **kwargs):
        self._store = OrderedDict()
        if data is None:
            data = {}
        self.update(data, **kwargs)

    def __setitem__(self, key, value):
        # Use the lowercased key for lookups, but store the actual
        # key alongside the value.
        self._store[key.lower()] = (key, value)

    def __getitem__(self, key):
        return self._store[key.lower()][1]

    def __delitem__(self, key):
        del self._store[key.lower()]

    def __iter__(self):
        return (casedkey for casedkey, mappedvalue in self._store.values())

    def __len__(self):
        return len(self._store)

    def lower_items(self):
        """Like iteritems(), but with all lowercase keys."""
        return ((lowerkey, keyval[1]) for (lowerkey, keyval) in self._store.items())

    def __eq__(self, other):
        if isinstance(other, Mapping):
            other = CaseInsensitiveDict(other)
        else:
            return NotImplemented
        # Compare insensitively
        return dict(self.lower_items()) == dict(other.lower_items())

    # Copy is required
    def copy(self):
        return CaseInsensitiveDict(self._store.values())

    def __repr__(self):
        return str(dict(self.items()))


class LookupDict(dict):
    """Dictionary lookup object."""

    def __init__(self, name=None):
        self.name = name
        super().__init__()

    def __repr__(self):
        return f"<lookup '{self.name}'>"

    def __getitem__(self, key):
        # We allow fall-through here, so values default to None

        return self.__dict__.get(key, None)

    def get(self, key, default=None):
        return self.__dict__.get(key, default)
python3.12/site-packages/pip/_vendor/requests/sessions.py000064400000073245151732702640017452 0ustar00"""
requests.sessions
~~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
"""
import os
import sys
import time
from collections import OrderedDict
from datetime import timedelta

from ._internal_utils import to_native_string
from .adapters import HTTPAdapter
from .auth import _basic_auth_str
from .compat import Mapping, cookielib, urljoin, urlparse
from .cookies import (
    RequestsCookieJar,
    cookiejar_from_dict,
    extract_cookies_to_jar,
    merge_cookies,
)
from .exceptions import (
    ChunkedEncodingError,
    ContentDecodingError,
    InvalidSchema,
    TooManyRedirects,
)
from .hooks import default_hooks, dispatch_hook

# formerly defined here, reexposed here for backward compatibility
from .models import (  # noqa: F401
    DEFAULT_REDIRECT_LIMIT,
    REDIRECT_STATI,
    PreparedRequest,
    Request,
)
from .status_codes import codes
from .structures import CaseInsensitiveDict
from .utils import (  # noqa: F401
    DEFAULT_PORTS,
    default_headers,
    get_auth_from_url,
    get_environ_proxies,
    get_netrc_auth,
    requote_uri,
    resolve_proxies,
    rewind_body,
    should_bypass_proxies,
    to_key_val_list,
)

# Preferred clock, based on which one is more accurate on a given system.
if sys.platform == "win32":
    preferred_clock = time.perf_counter
else:
    preferred_clock = time.time


def merge_setting(request_setting, session_setting, dict_class=OrderedDict):
    """Determines appropriate setting for a given request, taking into account
    the explicit setting on that request, and the setting in the session. If a
    setting is a dictionary, they will be merged together using `dict_class`
    """

    if session_setting is None:
        return request_setting

    if request_setting is None:
        return session_setting

    # Bypass if not a dictionary (e.g. verify)
    if not (
        isinstance(session_setting, Mapping) and isinstance(request_setting, Mapping)
    ):
        return request_setting

    merged_setting = dict_class(to_key_val_list(session_setting))
    merged_setting.update(to_key_val_list(request_setting))

    # Remove keys that are set to None. Extract keys first to avoid altering
    # the dictionary during iteration.
    none_keys = [k for (k, v) in merged_setting.items() if v is None]
    for key in none_keys:
        del merged_setting[key]

    return merged_setting


def merge_hooks(request_hooks, session_hooks, dict_class=OrderedDict):
    """Properly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    """
    if session_hooks is None or session_hooks.get("response") == []:
        return request_hooks

    if request_hooks is None or request_hooks.get("response") == []:
        return session_hooks

    return merge_setting(request_hooks, session_hooks, dict_class)


class SessionRedirectMixin:
    def get_redirect_target(self, resp):
        """Receives a Response. Returns a redirect URI or ``None``"""
        # Due to the nature of how requests processes redirects this method will
        # be called at least once upon the original response and at least twice
        # on each subsequent redirect response (if any).
        # If a custom mixin is used to handle this logic, it may be advantageous
        # to cache the redirect location onto the response object as a private
        # attribute.
        if resp.is_redirect:
            location = resp.headers["location"]
            # Currently the underlying http module on py3 decode headers
            # in latin1, but empirical evidence suggests that latin1 is very
            # rarely used with non-ASCII characters in HTTP headers.
            # It is more likely to get UTF8 header rather than latin1.
            # This causes incorrect handling of UTF8 encoded location headers.
            # To solve this, we re-encode the location in latin1.
            location = location.encode("latin1")
            return to_native_string(location, "utf8")
        return None

    def should_strip_auth(self, old_url, new_url):
        """Decide whether Authorization header should be removed when redirecting"""
        old_parsed = urlparse(old_url)
        new_parsed = urlparse(new_url)
        if old_parsed.hostname != new_parsed.hostname:
            return True
        # Special case: allow http -> https redirect when using the standard
        # ports. This isn't specified by RFC 7235, but is kept to avoid
        # breaking backwards compatibility with older versions of requests
        # that allowed any redirects on the same host.
        if (
            old_parsed.scheme == "http"
            and old_parsed.port in (80, None)
            and new_parsed.scheme == "https"
            and new_parsed.port in (443, None)
        ):
            return False

        # Handle default port usage corresponding to scheme.
        changed_port = old_parsed.port != new_parsed.port
        changed_scheme = old_parsed.scheme != new_parsed.scheme
        default_port = (DEFAULT_PORTS.get(old_parsed.scheme, None), None)
        if (
            not changed_scheme
            and old_parsed.port in default_port
            and new_parsed.port in default_port
        ):
            return False

        # Standard case: root URI must match
        return changed_port or changed_scheme

    def resolve_redirects(
        self,
        resp,
        req,
        stream=False,
        timeout=None,
        verify=True,
        cert=None,
        proxies=None,
        yield_requests=False,
        **adapter_kwargs,
    ):
        """Receives a Response. Returns a generator of Responses or Requests."""

        hist = []  # keep track of history

        url = self.get_redirect_target(resp)
        previous_fragment = urlparse(req.url).fragment
        while url:
            prepared_request = req.copy()

            # Update history and keep track of redirects.
            # resp.history must ignore the original request in this loop
            hist.append(resp)
            resp.history = hist[1:]

            try:
                resp.content  # Consume socket so it can be released
            except (ChunkedEncodingError, ContentDecodingError, RuntimeError):
                resp.raw.read(decode_content=False)

            if len(resp.history) >= self.max_redirects:
                raise TooManyRedirects(
                    f"Exceeded {self.max_redirects} redirects.", response=resp
                )

            # Release the connection back into the pool.
            resp.close()

            # Handle redirection without scheme (see: RFC 1808 Section 4)
            if url.startswith("//"):
                parsed_rurl = urlparse(resp.url)
                url = ":".join([to_native_string(parsed_rurl.scheme), url])

            # Normalize url case and attach previous fragment if needed (RFC 7231 7.1.2)
            parsed = urlparse(url)
            if parsed.fragment == "" and previous_fragment:
                parsed = parsed._replace(fragment=previous_fragment)
            elif parsed.fragment:
                previous_fragment = parsed.fragment
            url = parsed.geturl()

            # Facilitate relative 'location' headers, as allowed by RFC 7231.
            # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')
            # Compliant with RFC3986, we percent encode the url.
            if not parsed.netloc:
                url = urljoin(resp.url, requote_uri(url))
            else:
                url = requote_uri(url)

            prepared_request.url = to_native_string(url)

            self.rebuild_method(prepared_request, resp)

            # https://github.com/psf/requests/issues/1084
            if resp.status_code not in (
                codes.temporary_redirect,
                codes.permanent_redirect,
            ):
                # https://github.com/psf/requests/issues/3490
                purged_headers = ("Content-Length", "Content-Type", "Transfer-Encoding")
                for header in purged_headers:
                    prepared_request.headers.pop(header, None)
                prepared_request.body = None

            headers = prepared_request.headers
            headers.pop("Cookie", None)

            # Extract any cookies sent on the response to the cookiejar
            # in the new request. Because we've mutated our copied prepared
            # request, use the old one that we haven't yet touched.
            extract_cookies_to_jar(prepared_request._cookies, req, resp.raw)
            merge_cookies(prepared_request._cookies, self.cookies)
            prepared_request.prepare_cookies(prepared_request._cookies)

            # Rebuild auth and proxy information.
            proxies = self.rebuild_proxies(prepared_request, proxies)
            self.rebuild_auth(prepared_request, resp)

            # A failed tell() sets `_body_position` to `object()`. This non-None
            # value ensures `rewindable` will be True, allowing us to raise an
            # UnrewindableBodyError, instead of hanging the connection.
            rewindable = prepared_request._body_position is not None and (
                "Content-Length" in headers or "Transfer-Encoding" in headers
            )

            # Attempt to rewind consumed file-like object.
            if rewindable:
                rewind_body(prepared_request)

            # Override the original request.
            req = prepared_request

            if yield_requests:
                yield req
            else:

                resp = self.send(
                    req,
                    stream=stream,
                    timeout=timeout,
                    verify=verify,
                    cert=cert,
                    proxies=proxies,
                    allow_redirects=False,
                    **adapter_kwargs,
                )

                extract_cookies_to_jar(self.cookies, prepared_request, resp.raw)

                # extract redirect url, if any, for the next loop
                url = self.get_redirect_target(resp)
                yield resp

    def rebuild_auth(self, prepared_request, response):
        """When being redirected we may want to strip authentication from the
        request to avoid leaking credentials. This method intelligently removes
        and reapplies authentication where possible to avoid credential loss.
        """
        headers = prepared_request.headers
        url = prepared_request.url

        if "Authorization" in headers and self.should_strip_auth(
            response.request.url, url
        ):
            # If we get redirected to a new host, we should strip out any
            # authentication headers.
            del headers["Authorization"]

        # .netrc might have more auth for us on our new host.
        new_auth = get_netrc_auth(url) if self.trust_env else None
        if new_auth is not None:
            prepared_request.prepare_auth(new_auth)

    def rebuild_proxies(self, prepared_request, proxies):
        """This method re-evaluates the proxy configuration by considering the
        environment variables. If we are redirected to a URL covered by
        NO_PROXY, we strip the proxy configuration. Otherwise, we set missing
        proxy keys for this URL (in case they were stripped by a previous
        redirect).

        This method also replaces the Proxy-Authorization header where
        necessary.

        :rtype: dict
        """
        headers = prepared_request.headers
        scheme = urlparse(prepared_request.url).scheme
        new_proxies = resolve_proxies(prepared_request, proxies, self.trust_env)

        if "Proxy-Authorization" in headers:
            del headers["Proxy-Authorization"]

        try:
            username, password = get_auth_from_url(new_proxies[scheme])
        except KeyError:
            username, password = None, None

        # urllib3 handles proxy authorization for us in the standard adapter.
        # Avoid appending this to TLS tunneled requests where it may be leaked.
        if not scheme.startswith('https') and username and password:
            headers["Proxy-Authorization"] = _basic_auth_str(username, password)

        return new_proxies

    def rebuild_method(self, prepared_request, response):
        """When being redirected we may want to change the method of the request
        based on certain specs or browser behavior.
        """
        method = prepared_request.method

        # https://tools.ietf.org/html/rfc7231#section-6.4.4
        if response.status_code == codes.see_other and method != "HEAD":
            method = "GET"

        # Do what the browsers do, despite standards...
        # First, turn 302s into GETs.
        if response.status_code == codes.found and method != "HEAD":
            method = "GET"

        # Second, if a POST is responded to with a 301, turn it into a GET.
        # This bizarre behaviour is explained in Issue 1704.
        if response.status_code == codes.moved and method == "POST":
            method = "GET"

        prepared_request.method = method


class Session(SessionRedirectMixin):
    """A Requests session.

    Provides cookie persistence, connection-pooling, and configuration.

    Basic Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> s.get('https://httpbin.org/get')
      <Response [200]>

    Or as a context manager::

      >>> with requests.Session() as s:
      ...     s.get('https://httpbin.org/get')
      <Response [200]>
    """

    __attrs__ = [
        "headers",
        "cookies",
        "auth",
        "proxies",
        "hooks",
        "params",
        "verify",
        "cert",
        "adapters",
        "stream",
        "trust_env",
        "max_redirects",
    ]

    def __init__(self):

        #: A case-insensitive dictionary of headers to be sent on each
        #: :class:`Request <Request>` sent from this
        #: :class:`Session <Session>`.
        self.headers = default_headers()

        #: Default Authentication tuple or object to attach to
        #: :class:`Request <Request>`.
        self.auth = None

        #: Dictionary mapping protocol or protocol and host to the URL of the proxy
        #: (e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'}) to
        #: be used on each :class:`Request <Request>`.
        self.proxies = {}

        #: Event-handling hooks.
        self.hooks = default_hooks()

        #: Dictionary of querystring data to attach to each
        #: :class:`Request <Request>`. The dictionary values may be lists for
        #: representing multivalued query parameters.
        self.params = {}

        #: Stream response content default.
        self.stream = False

        #: SSL Verification default.
        #: Defaults to `True`, requiring requests to verify the TLS certificate at the
        #: remote end.
        #: If verify is set to `False`, requests will accept any TLS certificate
        #: presented by the server, and will ignore hostname mismatches and/or
        #: expired certificates, which will make your application vulnerable to
        #: man-in-the-middle (MitM) attacks.
        #: Only set this to `False` for testing.
        self.verify = True

        #: SSL client certificate default, if String, path to ssl client
        #: cert file (.pem). If Tuple, ('cert', 'key') pair.
        self.cert = None

        #: Maximum number of redirects allowed. If the request exceeds this
        #: limit, a :class:`TooManyRedirects` exception is raised.
        #: This defaults to requests.models.DEFAULT_REDIRECT_LIMIT, which is
        #: 30.
        self.max_redirects = DEFAULT_REDIRECT_LIMIT

        #: Trust environment settings for proxy configuration, default
        #: authentication and similar.
        self.trust_env = True

        #: A CookieJar containing all currently outstanding cookies set on this
        #: session. By default it is a
        #: :class:`RequestsCookieJar <requests.cookies.RequestsCookieJar>`, but
        #: may be any other ``cookielib.CookieJar`` compatible object.
        self.cookies = cookiejar_from_dict({})

        # Default connection adapters.
        self.adapters = OrderedDict()
        self.mount("https://", HTTPAdapter())
        self.mount("http://", HTTPAdapter())

    def __enter__(self):
        return self

    def __exit__(self, *args):
        self.close()

    def prepare_request(self, request):
        """Constructs a :class:`PreparedRequest <PreparedRequest>` for
        transmission and returns it. The :class:`PreparedRequest` has settings
        merged from the :class:`Request <Request>` instance and those of the
        :class:`Session`.

        :param request: :class:`Request` instance to prepare with this
            session's settings.
        :rtype: requests.PreparedRequest
        """
        cookies = request.cookies or {}

        # Bootstrap CookieJar.
        if not isinstance(cookies, cookielib.CookieJar):
            cookies = cookiejar_from_dict(cookies)

        # Merge with session cookies
        merged_cookies = merge_cookies(
            merge_cookies(RequestsCookieJar(), self.cookies), cookies
        )

        # Set environment's basic authentication if not explicitly set.
        auth = request.auth
        if self.trust_env and not auth and not self.auth:
            auth = get_netrc_auth(request.url)

        p = PreparedRequest()
        p.prepare(
            method=request.method.upper(),
            url=request.url,
            files=request.files,
            data=request.data,
            json=request.json,
            headers=merge_setting(
                request.headers, self.headers, dict_class=CaseInsensitiveDict
            ),
            params=merge_setting(request.params, self.params),
            auth=merge_setting(auth, self.auth),
            cookies=merged_cookies,
            hooks=merge_hooks(request.hooks, self.hooks),
        )
        return p

    def request(
        self,
        method,
        url,
        params=None,
        data=None,
        headers=None,
        cookies=None,
        files=None,
        auth=None,
        timeout=None,
        allow_redirects=True,
        proxies=None,
        hooks=None,
        stream=None,
        verify=None,
        cert=None,
        json=None,
    ):
        """Constructs a :class:`Request <Request>`, prepares it and sends it.
        Returns :class:`Response <Response>` object.

        :param method: method for the new :class:`Request` object.
        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of ``'filename': file-like-objects``
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple
        :param allow_redirects: (optional) Set to True by default.
        :type allow_redirects: bool
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use. Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair.
        :rtype: requests.Response
        """
        # Create the Request.
        req = Request(
            method=method.upper(),
            url=url,
            headers=headers,
            files=files,
            data=data or {},
            json=json,
            params=params or {},
            auth=auth,
            cookies=cookies,
            hooks=hooks,
        )
        prep = self.prepare_request(req)

        proxies = proxies or {}

        settings = self.merge_environment_settings(
            prep.url, proxies, stream, verify, cert
        )

        # Send the request.
        send_kwargs = {
            "timeout": timeout,
            "allow_redirects": allow_redirects,
        }
        send_kwargs.update(settings)
        resp = self.send(prep, **send_kwargs)

        return resp

    def get(self, url, **kwargs):
        r"""Sends a GET request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        """

        kwargs.setdefault("allow_redirects", True)
        return self.request("GET", url, **kwargs)

    def options(self, url, **kwargs):
        r"""Sends a OPTIONS request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        """

        kwargs.setdefault("allow_redirects", True)
        return self.request("OPTIONS", url, **kwargs)

    def head(self, url, **kwargs):
        r"""Sends a HEAD request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        """

        kwargs.setdefault("allow_redirects", False)
        return self.request("HEAD", url, **kwargs)

    def post(self, url, data=None, json=None, **kwargs):
        r"""Sends a POST request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        """

        return self.request("POST", url, data=data, json=json, **kwargs)

    def put(self, url, data=None, **kwargs):
        r"""Sends a PUT request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        """

        return self.request("PUT", url, data=data, **kwargs)

    def patch(self, url, data=None, **kwargs):
        r"""Sends a PATCH request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        """

        return self.request("PATCH", url, data=data, **kwargs)

    def delete(self, url, **kwargs):
        r"""Sends a DELETE request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        """

        return self.request("DELETE", url, **kwargs)

    def send(self, request, **kwargs):
        """Send a given PreparedRequest.

        :rtype: requests.Response
        """
        # Set defaults that the hooks can utilize to ensure they always have
        # the correct parameters to reproduce the previous request.
        kwargs.setdefault("stream", self.stream)
        kwargs.setdefault("verify", self.verify)
        kwargs.setdefault("cert", self.cert)
        if "proxies" not in kwargs:
            kwargs["proxies"] = resolve_proxies(request, self.proxies, self.trust_env)

        # It's possible that users might accidentally send a Request object.
        # Guard against that specific failure case.
        if isinstance(request, Request):
            raise ValueError("You can only send PreparedRequests.")

        # Set up variables needed for resolve_redirects and dispatching of hooks
        allow_redirects = kwargs.pop("allow_redirects", True)
        stream = kwargs.get("stream")
        hooks = request.hooks

        # Get the appropriate adapter to use
        adapter = self.get_adapter(url=request.url)

        # Start time (approximately) of the request
        start = preferred_clock()

        # Send the request
        r = adapter.send(request, **kwargs)

        # Total elapsed time of the request (approximately)
        elapsed = preferred_clock() - start
        r.elapsed = timedelta(seconds=elapsed)

        # Response manipulation hooks
        r = dispatch_hook("response", hooks, r, **kwargs)

        # Persist cookies
        if r.history:

            # If the hooks create history then we want those cookies too
            for resp in r.history:
                extract_cookies_to_jar(self.cookies, resp.request, resp.raw)

        extract_cookies_to_jar(self.cookies, request, r.raw)

        # Resolve redirects if allowed.
        if allow_redirects:
            # Redirect resolving generator.
            gen = self.resolve_redirects(r, request, **kwargs)
            history = [resp for resp in gen]
        else:
            history = []

        # Shuffle things around if there's history.
        if history:
            # Insert the first (original) request at the start
            history.insert(0, r)
            # Get the last request made
            r = history.pop()
            r.history = history

        # If redirects aren't being followed, store the response on the Request for Response.next().
        if not allow_redirects:
            try:
                r._next = next(
                    self.resolve_redirects(r, request, yield_requests=True, **kwargs)
                )
            except StopIteration:
                pass

        if not stream:
            r.content

        return r

    def merge_environment_settings(self, url, proxies, stream, verify, cert):
        """
        Check the environment and merge it with some settings.

        :rtype: dict
        """
        # Gather clues from the surrounding environment.
        if self.trust_env:
            # Set environment's proxies.
            no_proxy = proxies.get("no_proxy") if proxies is not None else None
            env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
            for (k, v) in env_proxies.items():
                proxies.setdefault(k, v)

            # Look for requests environment configuration
            # and be compatible with cURL.
            if verify is True or verify is None:
                verify = (
                    os.environ.get("REQUESTS_CA_BUNDLE")
                    or os.environ.get("CURL_CA_BUNDLE")
                    or verify
                )

        # Merge all the kwargs.
        proxies = merge_setting(proxies, self.proxies)
        stream = merge_setting(stream, self.stream)
        verify = merge_setting(verify, self.verify)
        cert = merge_setting(cert, self.cert)

        return {"proxies": proxies, "stream": stream, "verify": verify, "cert": cert}

    def get_adapter(self, url):
        """
        Returns the appropriate connection adapter for the given URL.

        :rtype: requests.adapters.BaseAdapter
        """
        for (prefix, adapter) in self.adapters.items():

            if url.lower().startswith(prefix.lower()):
                return adapter

        # Nothing matches :-/
        raise InvalidSchema(f"No connection adapters were found for {url!r}")

    def close(self):
        """Closes all adapters and as such the session"""
        for v in self.adapters.values():
            v.close()

    def mount(self, prefix, adapter):
        """Registers a connection adapter to a prefix.

        Adapters are sorted in descending order by prefix length.
        """
        self.adapters[prefix] = adapter
        keys_to_move = [k for k in self.adapters if len(k) < len(prefix)]

        for key in keys_to_move:
            self.adapters[key] = self.adapters.pop(key)

    def __getstate__(self):
        state = {attr: getattr(self, attr, None) for attr in self.__attrs__}
        return state

    def __setstate__(self, state):
        for attr, value in state.items():
            setattr(self, attr, value)


def session():
    """
    Returns a :class:`Session` for context-management.

    .. deprecated:: 1.0.0

        This method has been deprecated since version 1.0.0 and is only kept for
        backwards compatibility. New code should use :class:`~requests.sessions.Session`
        to create a session. This may be removed at a future date.

    :rtype: Session
    """
    return Session()
python3.12/site-packages/pip/_vendor/requests/api.py000064400000014461151732702650016351 0ustar00"""
requests.api
~~~~~~~~~~~~

This module implements the Requests API.

:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.
"""

from . import sessions


def request(method, url, **kwargs):
    """Constructs and sends a :class:`Request <Request>`.

    :param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary, list of tuples or bytes to send
        in the query string for the :class:`Request`.
    :param data: (optional) Dictionary, list of tuples, bytes, or file-like
        object to send in the body of the :class:`Request`.
    :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
    :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
    :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
    :param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
        ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
        or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content-type'`` is a string
        defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
        to add for the file.
    :param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
    :param timeout: (optional) How many seconds to wait for the server to send data
        before giving up, as a float, or a :ref:`(connect timeout, read
        timeout) <timeouts>` tuple.
    :type timeout: float or tuple
    :param allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.
    :type allow_redirects: bool
    :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
    :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use. Defaults to ``True``.
    :param stream: (optional) if ``False``, the response content will be immediately downloaded.
    :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response

    Usage::

      >>> import requests
      >>> req = requests.request('GET', 'https://httpbin.org/get')
      >>> req
      <Response [200]>
    """

    # By using the 'with' statement we are sure the session is closed, thus we
    # avoid leaving sockets open which can trigger a ResourceWarning in some
    # cases, and look like a memory leak in others.
    with sessions.Session() as session:
        return session.request(method=method, url=url, **kwargs)


def get(url, params=None, **kwargs):
    r"""Sends a GET request.

    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary, list of tuples or bytes to send
        in the query string for the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    return request("get", url, params=params, **kwargs)


def options(url, **kwargs):
    r"""Sends an OPTIONS request.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    return request("options", url, **kwargs)


def head(url, **kwargs):
    r"""Sends a HEAD request.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes. If
        `allow_redirects` is not provided, it will be set to `False` (as
        opposed to the default :meth:`request` behavior).
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    kwargs.setdefault("allow_redirects", False)
    return request("head", url, **kwargs)


def post(url, data=None, json=None, **kwargs):
    r"""Sends a POST request.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, list of tuples, bytes, or file-like
        object to send in the body of the :class:`Request`.
    :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    return request("post", url, data=data, json=json, **kwargs)


def put(url, data=None, **kwargs):
    r"""Sends a PUT request.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, list of tuples, bytes, or file-like
        object to send in the body of the :class:`Request`.
    :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    return request("put", url, data=data, **kwargs)


def patch(url, data=None, **kwargs):
    r"""Sends a PATCH request.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, list of tuples, bytes, or file-like
        object to send in the body of the :class:`Request`.
    :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    return request("patch", url, data=data, **kwargs)


def delete(url, **kwargs):
    r"""Sends a DELETE request.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    return request("delete", url, **kwargs)
python3.12/site-packages/pip/_vendor/requests/__init__.py000064400000012061151732702650017331 0ustar00#   __
#  /__)  _  _     _   _ _/   _
# / (   (- (/ (/ (- _)  /  _)
#          /

"""
Requests HTTP Library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human beings.
Basic GET usage:

   >>> import requests
   >>> r = requests.get('https://www.python.org')
   >>> r.status_code
   200
   >>> b'Python is a programming language' in r.content
   True

... or POST:

   >>> payload = dict(key1='value1', key2='value2')
   >>> r = requests.post('https://httpbin.org/post', data=payload)
   >>> print(r.text)
   {
     ...
     "form": {
       "key1": "value1",
       "key2": "value2"
     },
     ...
   }

The other HTTP methods are supported - see `requests.api`. Full documentation
is at <https://requests.readthedocs.io>.

:copyright: (c) 2017 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.
"""

import warnings

from pip._vendor import urllib3

from .exceptions import RequestsDependencyWarning

charset_normalizer_version = None

try:
    from pip._vendor.chardet import __version__ as chardet_version
except ImportError:
    chardet_version = None


def check_compatibility(urllib3_version, chardet_version, charset_normalizer_version):
    urllib3_version = urllib3_version.split(".")
    assert urllib3_version != ["dev"]  # Verify urllib3 isn't installed from git.

    # Sometimes, urllib3 only reports its version as 16.1.
    if len(urllib3_version) == 2:
        urllib3_version.append("0")

    # Check urllib3 for compatibility.
    major, minor, patch = urllib3_version  # noqa: F811
    major, minor, patch = int(major), int(minor), int(patch)
    # urllib3 >= 1.21.1
    assert major >= 1
    if major == 1:
        assert minor >= 21

    # Check charset_normalizer for compatibility.
    if chardet_version:
        major, minor, patch = chardet_version.split(".")[:3]
        major, minor, patch = int(major), int(minor), int(patch)
        # chardet_version >= 3.0.2, < 6.0.0
        assert (3, 0, 2) <= (major, minor, patch) < (6, 0, 0)
    elif charset_normalizer_version:
        major, minor, patch = charset_normalizer_version.split(".")[:3]
        major, minor, patch = int(major), int(minor), int(patch)
        # charset_normalizer >= 2.0.0 < 4.0.0
        assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0)
    else:
        raise Exception("You need either charset_normalizer or chardet installed")


def _check_cryptography(cryptography_version):
    # cryptography < 1.3.4
    try:
        cryptography_version = list(map(int, cryptography_version.split(".")))
    except ValueError:
        return

    if cryptography_version < [1, 3, 4]:
        warning = "Old version of cryptography ({}) may cause slowdown.".format(
            cryptography_version
        )
        warnings.warn(warning, RequestsDependencyWarning)


# Check imported dependencies for compatibility.
try:
    check_compatibility(
        urllib3.__version__, chardet_version, charset_normalizer_version
    )
except (AssertionError, ValueError):
    warnings.warn(
        "urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
        "version!".format(
            urllib3.__version__, chardet_version, charset_normalizer_version
        ),
        RequestsDependencyWarning,
    )

# Attempt to enable urllib3's fallback for SNI support
# if the standard library doesn't support SNI or the
# 'ssl' library isn't available.
try:
    # Note: This logic prevents upgrading cryptography on Windows, if imported
    #       as part of pip.
    from pip._internal.utils.compat import WINDOWS
    if not WINDOWS:
        raise ImportError("pip internals: don't import cryptography on Windows")
    try:
        import ssl
    except ImportError:
        ssl = None

    if not getattr(ssl, "HAS_SNI", False):
        from pip._vendor.urllib3.contrib import pyopenssl

        pyopenssl.inject_into_urllib3()

        # Check cryptography version
        from cryptography import __version__ as cryptography_version

        _check_cryptography(cryptography_version)
except ImportError:
    pass

# urllib3's DependencyWarnings should be silenced.
from pip._vendor.urllib3.exceptions import DependencyWarning

warnings.simplefilter("ignore", DependencyWarning)

# Set default logging handler to avoid "No handler found" warnings.
import logging
from logging import NullHandler

from . import packages, utils
from .__version__ import (
    __author__,
    __author_email__,
    __build__,
    __cake__,
    __copyright__,
    __description__,
    __license__,
    __title__,
    __url__,
    __version__,
)
from .api import delete, get, head, options, patch, post, put, request
from .exceptions import (
    ConnectionError,
    ConnectTimeout,
    FileModeWarning,
    HTTPError,
    JSONDecodeError,
    ReadTimeout,
    RequestException,
    Timeout,
    TooManyRedirects,
    URLRequired,
)
from .models import PreparedRequest, Request, Response
from .sessions import Session, session
from .status_codes import codes

logging.getLogger(__name__).addHandler(NullHandler())

# FileModeWarnings go off per the default.
warnings.simplefilter("default", FileModeWarning, append=True)
python3.12/site-packages/pip/_vendor/requests/auth.py000064400000023713151732702650016541 0ustar00"""
requests.auth
~~~~~~~~~~~~~

This module contains the authentication handlers for Requests.
"""

import hashlib
import os
import re
import threading
import time
import warnings
from base64 import b64encode

from ._internal_utils import to_native_string
from .compat import basestring, str, urlparse
from .cookies import extract_cookies_to_jar
from .utils import parse_dict_header

CONTENT_TYPE_FORM_URLENCODED = "application/x-www-form-urlencoded"
CONTENT_TYPE_MULTI_PART = "multipart/form-data"


def _basic_auth_str(username, password):
    """Returns a Basic Auth string."""

    # "I want us to put a big-ol' comment on top of it that
    # says that this behaviour is dumb but we need to preserve
    # it because people are relying on it."
    #    - Lukasa
    #
    # These are here solely to maintain backwards compatibility
    # for things like ints. This will be removed in 3.0.0.
    if not isinstance(username, basestring):
        warnings.warn(
            "Non-string usernames will no longer be supported in Requests "
            "3.0.0. Please convert the object you've passed in ({!r}) to "
            "a string or bytes object in the near future to avoid "
            "problems.".format(username),
            category=DeprecationWarning,
        )
        username = str(username)

    if not isinstance(password, basestring):
        warnings.warn(
            "Non-string passwords will no longer be supported in Requests "
            "3.0.0. Please convert the object you've passed in ({!r}) to "
            "a string or bytes object in the near future to avoid "
            "problems.".format(type(password)),
            category=DeprecationWarning,
        )
        password = str(password)
    # -- End Removal --

    if isinstance(username, str):
        username = username.encode("latin1")

    if isinstance(password, str):
        password = password.encode("latin1")

    authstr = "Basic " + to_native_string(
        b64encode(b":".join((username, password))).strip()
    )

    return authstr


class AuthBase:
    """Base class that all auth implementations derive from"""

    def __call__(self, r):
        raise NotImplementedError("Auth hooks must be callable.")


class HTTPBasicAuth(AuthBase):
    """Attaches HTTP Basic Authentication to the given Request object."""

    def __init__(self, username, password):
        self.username = username
        self.password = password

    def __eq__(self, other):
        return all(
            [
                self.username == getattr(other, "username", None),
                self.password == getattr(other, "password", None),
            ]
        )

    def __ne__(self, other):
        return not self == other

    def __call__(self, r):
        r.headers["Authorization"] = _basic_auth_str(self.username, self.password)
        return r


class HTTPProxyAuth(HTTPBasicAuth):
    """Attaches HTTP Proxy Authentication to a given Request object."""

    def __call__(self, r):
        r.headers["Proxy-Authorization"] = _basic_auth_str(self.username, self.password)
        return r


class HTTPDigestAuth(AuthBase):
    """Attaches HTTP Digest Authentication to the given Request object."""

    def __init__(self, username, password):
        self.username = username
        self.password = password
        # Keep state in per-thread local storage
        self._thread_local = threading.local()

    def init_per_thread_state(self):
        # Ensure state is initialized just once per-thread
        if not hasattr(self._thread_local, "init"):
            self._thread_local.init = True
            self._thread_local.last_nonce = ""
            self._thread_local.nonce_count = 0
            self._thread_local.chal = {}
            self._thread_local.pos = None
            self._thread_local.num_401_calls = None

    def build_digest_header(self, method, url):
        """
        :rtype: str
        """

        realm = self._thread_local.chal["realm"]
        nonce = self._thread_local.chal["nonce"]
        qop = self._thread_local.chal.get("qop")
        algorithm = self._thread_local.chal.get("algorithm")
        opaque = self._thread_local.chal.get("opaque")
        hash_utf8 = None

        if algorithm is None:
            _algorithm = "MD5"
        else:
            _algorithm = algorithm.upper()
        # lambdas assume digest modules are imported at the top level
        if _algorithm == "MD5" or _algorithm == "MD5-SESS":

            def md5_utf8(x):
                if isinstance(x, str):
                    x = x.encode("utf-8")
                return hashlib.md5(x).hexdigest()

            hash_utf8 = md5_utf8
        elif _algorithm == "SHA":

            def sha_utf8(x):
                if isinstance(x, str):
                    x = x.encode("utf-8")
                return hashlib.sha1(x).hexdigest()

            hash_utf8 = sha_utf8
        elif _algorithm == "SHA-256":

            def sha256_utf8(x):
                if isinstance(x, str):
                    x = x.encode("utf-8")
                return hashlib.sha256(x).hexdigest()

            hash_utf8 = sha256_utf8
        elif _algorithm == "SHA-512":

            def sha512_utf8(x):
                if isinstance(x, str):
                    x = x.encode("utf-8")
                return hashlib.sha512(x).hexdigest()

            hash_utf8 = sha512_utf8

        KD = lambda s, d: hash_utf8(f"{s}:{d}")  # noqa:E731

        if hash_utf8 is None:
            return None

        # XXX not implemented yet
        entdig = None
        p_parsed = urlparse(url)
        #: path is request-uri defined in RFC 2616 which should not be empty
        path = p_parsed.path or "/"
        if p_parsed.query:
            path += f"?{p_parsed.query}"

        A1 = f"{self.username}:{realm}:{self.password}"
        A2 = f"{method}:{path}"

        HA1 = hash_utf8(A1)
        HA2 = hash_utf8(A2)

        if nonce == self._thread_local.last_nonce:
            self._thread_local.nonce_count += 1
        else:
            self._thread_local.nonce_count = 1
        ncvalue = f"{self._thread_local.nonce_count:08x}"
        s = str(self._thread_local.nonce_count).encode("utf-8")
        s += nonce.encode("utf-8")
        s += time.ctime().encode("utf-8")
        s += os.urandom(8)

        cnonce = hashlib.sha1(s).hexdigest()[:16]
        if _algorithm == "MD5-SESS":
            HA1 = hash_utf8(f"{HA1}:{nonce}:{cnonce}")

        if not qop:
            respdig = KD(HA1, f"{nonce}:{HA2}")
        elif qop == "auth" or "auth" in qop.split(","):
            noncebit = f"{nonce}:{ncvalue}:{cnonce}:auth:{HA2}"
            respdig = KD(HA1, noncebit)
        else:
            # XXX handle auth-int.
            return None

        self._thread_local.last_nonce = nonce

        # XXX should the partial digests be encoded too?
        base = (
            f'username="{self.username}", realm="{realm}", nonce="{nonce}", '
            f'uri="{path}", response="{respdig}"'
        )
        if opaque:
            base += f', opaque="{opaque}"'
        if algorithm:
            base += f', algorithm="{algorithm}"'
        if entdig:
            base += f', digest="{entdig}"'
        if qop:
            base += f', qop="auth", nc={ncvalue}, cnonce="{cnonce}"'

        return f"Digest {base}"

    def handle_redirect(self, r, **kwargs):
        """Reset num_401_calls counter on redirects."""
        if r.is_redirect:
            self._thread_local.num_401_calls = 1

    def handle_401(self, r, **kwargs):
        """
        Takes the given response and tries digest-auth, if needed.

        :rtype: requests.Response
        """

        # If response is not 4xx, do not auth
        # See https://github.com/psf/requests/issues/3772
        if not 400 <= r.status_code < 500:
            self._thread_local.num_401_calls = 1
            return r

        if self._thread_local.pos is not None:
            # Rewind the file position indicator of the body to where
            # it was to resend the request.
            r.request.body.seek(self._thread_local.pos)
        s_auth = r.headers.get("www-authenticate", "")

        if "digest" in s_auth.lower() and self._thread_local.num_401_calls < 2:

            self._thread_local.num_401_calls += 1
            pat = re.compile(r"digest ", flags=re.IGNORECASE)
            self._thread_local.chal = parse_dict_header(pat.sub("", s_auth, count=1))

            # Consume content and release the original connection
            # to allow our new request to reuse the same one.
            r.content
            r.close()
            prep = r.request.copy()
            extract_cookies_to_jar(prep._cookies, r.request, r.raw)
            prep.prepare_cookies(prep._cookies)

            prep.headers["Authorization"] = self.build_digest_header(
                prep.method, prep.url
            )
            _r = r.connection.send(prep, **kwargs)
            _r.history.append(r)
            _r.request = prep

            return _r

        self._thread_local.num_401_calls = 1
        return r

    def __call__(self, r):
        # Initialize per-thread state, if needed
        self.init_per_thread_state()
        # If we have a saved nonce, skip the 401
        if self._thread_local.last_nonce:
            r.headers["Authorization"] = self.build_digest_header(r.method, r.url)
        try:
            self._thread_local.pos = r.body.tell()
        except AttributeError:
            # In the case of HTTPDigestAuth being reused and the body of
            # the previous request was a file-like object, pos has the
            # file position of the previous body. Ensure it's set to
            # None.
            self._thread_local.pos = None
        r.register_hook("response", self.handle_401)
        r.register_hook("response", self.handle_redirect)
        self._thread_local.num_401_calls = 1

        return r

    def __eq__(self, other):
        return all(
            [
                self.username == getattr(other, "username", None),
                self.password == getattr(other, "password", None),
            ]
        )

    def __ne__(self, other):
        return not self == other
python3.12/site-packages/pip/_vendor/requests/_internal_utils.py000064400000002727151732702660020776 0ustar00"""
requests._internal_utils
~~~~~~~~~~~~~~

Provides utility functions that are consumed internally by Requests
which depend on extremely few external helpers (such as compat)
"""
import re

from .compat import builtin_str

_VALID_HEADER_NAME_RE_BYTE = re.compile(rb"^[^:\s][^:\r\n]*$")
_VALID_HEADER_NAME_RE_STR = re.compile(r"^[^:\s][^:\r\n]*$")
_VALID_HEADER_VALUE_RE_BYTE = re.compile(rb"^\S[^\r\n]*$|^$")
_VALID_HEADER_VALUE_RE_STR = re.compile(r"^\S[^\r\n]*$|^$")

_HEADER_VALIDATORS_STR = (_VALID_HEADER_NAME_RE_STR, _VALID_HEADER_VALUE_RE_STR)
_HEADER_VALIDATORS_BYTE = (_VALID_HEADER_NAME_RE_BYTE, _VALID_HEADER_VALUE_RE_BYTE)
HEADER_VALIDATORS = {
    bytes: _HEADER_VALIDATORS_BYTE,
    str: _HEADER_VALIDATORS_STR,
}


def to_native_string(string, encoding="ascii"):
    """Given a string object, regardless of type, returns a representation of
    that string in the native string type, encoding and decoding where
    necessary. This assumes ASCII unless told otherwise.
    """
    if isinstance(string, builtin_str):
        out = string
    else:
        out = string.decode(encoding)

    return out


def unicode_is_ascii(u_string):
    """Determine if unicode string only contains ASCII characters.

    :param str u_string: unicode string to check. Must be unicode
        and not Python 2 `str`.
    :rtype: bool
    """
    assert isinstance(u_string, str)
    try:
        u_string.encode("ascii")
        return True
    except UnicodeEncodeError:
        return False
python3.12/site-packages/pip/_vendor/requests/hooks.py000064400000001335151732702660016720 0ustar00"""
requests.hooks
~~~~~~~~~~~~~~

This module provides the capabilities for the Requests hooks system.

Available hooks:

``response``:
    The response generated from a Request.
"""
HOOKS = ["response"]


def default_hooks():
    return {event: [] for event in HOOKS}


# TODO: response is the only one


def dispatch_hook(key, hooks, hook_data, **kwargs):
    """Dispatches a hook dictionary on a given piece of data."""
    hooks = hooks or {}
    hooks = hooks.get(key)
    if hooks:
        if hasattr(hooks, "__call__"):
            hooks = [hooks]
        for hook in hooks:
            _hook_data = hook(hook_data, **kwargs)
            if _hook_data is not None:
                hook_data = _hook_data
    return hook_data
python3.12/site-packages/pip/_vendor/requests/adapters.py000064400000046361151732702660017410 0ustar00"""
requests.adapters
~~~~~~~~~~~~~~~~~

This module contains the transport adapters that Requests uses to define
and maintain connections.
"""

import os.path
import socket  # noqa: F401

from pip._vendor.urllib3.exceptions import ClosedPoolError, ConnectTimeoutError
from pip._vendor.urllib3.exceptions import HTTPError as _HTTPError
from pip._vendor.urllib3.exceptions import InvalidHeader as _InvalidHeader
from pip._vendor.urllib3.exceptions import (
    LocationValueError,
    MaxRetryError,
    NewConnectionError,
    ProtocolError,
)
from pip._vendor.urllib3.exceptions import ProxyError as _ProxyError
from pip._vendor.urllib3.exceptions import ReadTimeoutError, ResponseError
from pip._vendor.urllib3.exceptions import SSLError as _SSLError
from pip._vendor.urllib3.poolmanager import PoolManager, proxy_from_url
from pip._vendor.urllib3.util import Timeout as TimeoutSauce
from pip._vendor.urllib3.util import parse_url
from pip._vendor.urllib3.util.retry import Retry

from .auth import _basic_auth_str
from .compat import basestring, urlparse
from .cookies import extract_cookies_to_jar
from .exceptions import (
    ConnectionError,
    ConnectTimeout,
    InvalidHeader,
    InvalidProxyURL,
    InvalidSchema,
    InvalidURL,
    ProxyError,
    ReadTimeout,
    RetryError,
    SSLError,
)
from .models import Response
from .structures import CaseInsensitiveDict
from .utils import (
    DEFAULT_CA_BUNDLE_PATH,
    extract_zipped_paths,
    get_auth_from_url,
    get_encoding_from_headers,
    prepend_scheme_if_needed,
    select_proxy,
    urldefragauth,
)

try:
    from pip._vendor.urllib3.contrib.socks import SOCKSProxyManager
except ImportError:

    def SOCKSProxyManager(*args, **kwargs):
        raise InvalidSchema("Missing dependencies for SOCKS support.")


DEFAULT_POOLBLOCK = False
DEFAULT_POOLSIZE = 10
DEFAULT_RETRIES = 0
DEFAULT_POOL_TIMEOUT = None


class BaseAdapter:
    """The Base Transport Adapter"""

    def __init__(self):
        super().__init__()

    def send(
        self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
    ):
        """Sends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        """
        raise NotImplementedError

    def close(self):
        """Cleans up adapter specific items."""
        raise NotImplementedError


class HTTPAdapter(BaseAdapter):
    """The built-in HTTP Adapter for urllib3.

    Provides a general-case interface for Requests sessions to contact HTTP and
    HTTPS urls by implementing the Transport Adapter interface. This class will
    usually be created by the :class:`Session <Session>` class under the
    covers.

    :param pool_connections: The number of urllib3 connection pools to cache.
    :param pool_maxsize: The maximum number of connections to save in the pool.
    :param max_retries: The maximum number of retries each connection
        should attempt. Note, this applies only to failed DNS lookups, socket
        connections and connection timeouts, never to requests where data has
        made it to the server. By default, Requests does not retry failed
        connections. If you need granular control over the conditions under
        which we retry a request, import urllib3's ``Retry`` class and pass
        that instead.
    :param pool_block: Whether the connection pool should block for connections.

    Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> a = requests.adapters.HTTPAdapter(max_retries=3)
      >>> s.mount('http://', a)
    """

    __attrs__ = [
        "max_retries",
        "config",
        "_pool_connections",
        "_pool_maxsize",
        "_pool_block",
    ]

    def __init__(
        self,
        pool_connections=DEFAULT_POOLSIZE,
        pool_maxsize=DEFAULT_POOLSIZE,
        max_retries=DEFAULT_RETRIES,
        pool_block=DEFAULT_POOLBLOCK,
    ):
        if max_retries == DEFAULT_RETRIES:
            self.max_retries = Retry(0, read=False)
        else:
            self.max_retries = Retry.from_int(max_retries)
        self.config = {}
        self.proxy_manager = {}

        super().__init__()

        self._pool_connections = pool_connections
        self._pool_maxsize = pool_maxsize
        self._pool_block = pool_block

        self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block)

    def __getstate__(self):
        return {attr: getattr(self, attr, None) for attr in self.__attrs__}

    def __setstate__(self, state):
        # Can't handle by adding 'proxy_manager' to self.__attrs__ because
        # self.poolmanager uses a lambda function, which isn't pickleable.
        self.proxy_manager = {}
        self.config = {}

        for attr, value in state.items():
            setattr(self, attr, value)

        self.init_poolmanager(
            self._pool_connections, self._pool_maxsize, block=self._pool_block
        )

    def init_poolmanager(
        self, connections, maxsize, block=DEFAULT_POOLBLOCK, **pool_kwargs
    ):
        """Initializes a urllib3 PoolManager.

        This method should not be called from user code, and is only
        exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param connections: The number of urllib3 connection pools to cache.
        :param maxsize: The maximum number of connections to save in the pool.
        :param block: Block when no free connections are available.
        :param pool_kwargs: Extra keyword arguments used to initialize the Pool Manager.
        """
        # save these values for pickling
        self._pool_connections = connections
        self._pool_maxsize = maxsize
        self._pool_block = block

        self.poolmanager = PoolManager(
            num_pools=connections,
            maxsize=maxsize,
            block=block,
            **pool_kwargs,
        )

    def proxy_manager_for(self, proxy, **proxy_kwargs):
        """Return urllib3 ProxyManager for the given proxy.

        This method should not be called from user code, and is only
        exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxy: The proxy to return a urllib3 ProxyManager for.
        :param proxy_kwargs: Extra keyword arguments used to configure the Proxy Manager.
        :returns: ProxyManager
        :rtype: urllib3.ProxyManager
        """
        if proxy in self.proxy_manager:
            manager = self.proxy_manager[proxy]
        elif proxy.lower().startswith("socks"):
            username, password = get_auth_from_url(proxy)
            manager = self.proxy_manager[proxy] = SOCKSProxyManager(
                proxy,
                username=username,
                password=password,
                num_pools=self._pool_connections,
                maxsize=self._pool_maxsize,
                block=self._pool_block,
                **proxy_kwargs,
            )
        else:
            proxy_headers = self.proxy_headers(proxy)
            manager = self.proxy_manager[proxy] = proxy_from_url(
                proxy,
                proxy_headers=proxy_headers,
                num_pools=self._pool_connections,
                maxsize=self._pool_maxsize,
                block=self._pool_block,
                **proxy_kwargs,
            )

        return manager

    def cert_verify(self, conn, url, verify, cert):
        """Verify a SSL certificate. This method should not be called from user
        code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param conn: The urllib3 connection object associated with the cert.
        :param url: The requested URL.
        :param verify: Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use
        :param cert: The SSL certificate to verify.
        """
        if url.lower().startswith("https") and verify:

            cert_loc = None

            # Allow self-specified cert location.
            if verify is not True:
                cert_loc = verify

            if not cert_loc:
                cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)

            if not cert_loc or not os.path.exists(cert_loc):
                raise OSError(
                    f"Could not find a suitable TLS CA certificate bundle, "
                    f"invalid path: {cert_loc}"
                )

            conn.cert_reqs = "CERT_REQUIRED"

            if not os.path.isdir(cert_loc):
                conn.ca_certs = cert_loc
            else:
                conn.ca_cert_dir = cert_loc
        else:
            conn.cert_reqs = "CERT_NONE"
            conn.ca_certs = None
            conn.ca_cert_dir = None

        if cert:
            if not isinstance(cert, basestring):
                conn.cert_file = cert[0]
                conn.key_file = cert[1]
            else:
                conn.cert_file = cert
                conn.key_file = None
            if conn.cert_file and not os.path.exists(conn.cert_file):
                raise OSError(
                    f"Could not find the TLS certificate file, "
                    f"invalid path: {conn.cert_file}"
                )
            if conn.key_file and not os.path.exists(conn.key_file):
                raise OSError(
                    f"Could not find the TLS key file, invalid path: {conn.key_file}"
                )

    def build_response(self, req, resp):
        """Builds a :class:`Response <requests.Response>` object from a urllib3
        response. This should not be called from user code, and is only exposed
        for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`

        :param req: The :class:`PreparedRequest <PreparedRequest>` used to generate the response.
        :param resp: The urllib3 response object.
        :rtype: requests.Response
        """
        response = Response()

        # Fallback to None if there's no status_code, for whatever reason.
        response.status_code = getattr(resp, "status", None)

        # Make headers case-insensitive.
        response.headers = CaseInsensitiveDict(getattr(resp, "headers", {}))

        # Set encoding.
        response.encoding = get_encoding_from_headers(response.headers)
        response.raw = resp
        response.reason = response.raw.reason

        if isinstance(req.url, bytes):
            response.url = req.url.decode("utf-8")
        else:
            response.url = req.url

        # Add new cookies from the server.
        extract_cookies_to_jar(response.cookies, req, resp)

        # Give the Response some context.
        response.request = req
        response.connection = self

        return response

    def get_connection(self, url, proxies=None):
        """Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        :rtype: urllib3.ConnectionPool
        """
        proxy = select_proxy(url, proxies)

        if proxy:
            proxy = prepend_scheme_if_needed(proxy, "http")
            proxy_url = parse_url(proxy)
            if not proxy_url.host:
                raise InvalidProxyURL(
                    "Please check proxy URL. It is malformed "
                    "and could be missing the host."
                )
            proxy_manager = self.proxy_manager_for(proxy)
            conn = proxy_manager.connection_from_url(url)
        else:
            # Only scheme should be lower case
            parsed = urlparse(url)
            url = parsed.geturl()
            conn = self.poolmanager.connection_from_url(url)

        return conn

    def close(self):
        """Disposes of any internal state.

        Currently, this closes the PoolManager and any active ProxyManager,
        which closes any pooled connections.
        """
        self.poolmanager.clear()
        for proxy in self.proxy_manager.values():
            proxy.clear()

    def request_url(self, request, proxies):
        """Obtain the url to use when making the final request.

        If the message is being sent through a HTTP proxy, the full URL has to
        be used. Otherwise, we should only use the path portion of the URL.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.
        :rtype: str
        """
        proxy = select_proxy(request.url, proxies)
        scheme = urlparse(request.url).scheme

        is_proxied_http_request = proxy and scheme != "https"
        using_socks_proxy = False
        if proxy:
            proxy_scheme = urlparse(proxy).scheme.lower()
            using_socks_proxy = proxy_scheme.startswith("socks")

        url = request.path_url
        if is_proxied_http_request and not using_socks_proxy:
            url = urldefragauth(request.url)

        return url

    def add_headers(self, request, **kwargs):
        """Add any headers needed by the connection. As of v2.0 this does
        nothing by default, but is left for overriding by users that subclass
        the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
        :param kwargs: The keyword arguments from the call to send().
        """
        pass

    def proxy_headers(self, proxy):
        """Returns a dictionary of the headers to add to any request sent
        through a proxy. This works with urllib3 magic to ensure that they are
        correctly sent to the proxy, rather than in a tunnelled request if
        CONNECT is being used.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxy: The url of the proxy being used for this request.
        :rtype: dict
        """
        headers = {}
        username, password = get_auth_from_url(proxy)

        if username:
            headers["Proxy-Authorization"] = _basic_auth_str(username, password)

        return headers

    def send(
        self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
    ):
        """Sends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls whether
            we verify the server's TLS certificate, or a string, in which case it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        :rtype: requests.Response
        """

        try:
            conn = self.get_connection(request.url, proxies)
        except LocationValueError as e:
            raise InvalidURL(e, request=request)

        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )

        chunked = not (request.body is None or "Content-Length" in request.headers)

        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)

        try:
            resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )

        except (ProtocolError, OSError) as err:
            raise ConnectionError(err, request=request)

        except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)

            if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)

            if isinstance(e.reason, _ProxyError):
                raise ProxyError(e, request=request)

            if isinstance(e.reason, _SSLError):
                # This branch is for urllib3 v1.22 and later.
                raise SSLError(e, request=request)

            raise ConnectionError(e, request=request)

        except ClosedPoolError as e:
            raise ConnectionError(e, request=request)

        except _ProxyError as e:
            raise ProxyError(e)

        except (_SSLError, _HTTPError) as e:
            if isinstance(e, _SSLError):
                # This branch is for urllib3 versions earlier than v1.22
                raise SSLError(e, request=request)
            elif isinstance(e, ReadTimeoutError):
                raise ReadTimeout(e, request=request)
            elif isinstance(e, _InvalidHeader):
                raise InvalidHeader(e, request=request)
            else:
                raise

        return self.build_response(request, resp)
python3.12/site-packages/pip/_vendor/requests/cookies.py000064400000044200151732702660017227 0ustar00"""
requests.cookies
~~~~~~~~~~~~~~~~

Compatibility code to be able to use `cookielib.CookieJar` with requests.

requests.utils imports from here, so be careful with imports.
"""

import calendar
import copy
import time

from ._internal_utils import to_native_string
from .compat import Morsel, MutableMapping, cookielib, urlparse, urlunparse

try:
    import threading
except ImportError:
    import dummy_threading as threading


class MockRequest:
    """Wraps a `requests.Request` to mimic a `urllib2.Request`.

    The code in `cookielib.CookieJar` expects this interface in order to correctly
    manage cookie policies, i.e., determine whether a cookie can be set, given the
    domains of the request and the cookie.

    The original request object is read-only. The client is responsible for collecting
    the new headers via `get_new_headers()` and interpreting them appropriately. You
    probably want `get_cookie_header`, defined below.
    """

    def __init__(self, request):
        self._r = request
        self._new_headers = {}
        self.type = urlparse(self._r.url).scheme

    def get_type(self):
        return self.type

    def get_host(self):
        return urlparse(self._r.url).netloc

    def get_origin_req_host(self):
        return self.get_host()

    def get_full_url(self):
        # Only return the response's URL if the user hadn't set the Host
        # header
        if not self._r.headers.get("Host"):
            return self._r.url
        # If they did set it, retrieve it and reconstruct the expected domain
        host = to_native_string(self._r.headers["Host"], encoding="utf-8")
        parsed = urlparse(self._r.url)
        # Reconstruct the URL as we expect it
        return urlunparse(
            [
                parsed.scheme,
                host,
                parsed.path,
                parsed.params,
                parsed.query,
                parsed.fragment,
            ]
        )

    def is_unverifiable(self):
        return True

    def has_header(self, name):
        return name in self._r.headers or name in self._new_headers

    def get_header(self, name, default=None):
        return self._r.headers.get(name, self._new_headers.get(name, default))

    def add_header(self, key, val):
        """cookielib has no legitimate use for this method; add it back if you find one."""
        raise NotImplementedError(
            "Cookie headers should be added with add_unredirected_header()"
        )

    def add_unredirected_header(self, name, value):
        self._new_headers[name] = value

    def get_new_headers(self):
        return self._new_headers

    @property
    def unverifiable(self):
        return self.is_unverifiable()

    @property
    def origin_req_host(self):
        return self.get_origin_req_host()

    @property
    def host(self):
        return self.get_host()


class MockResponse:
    """Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.

    ...what? Basically, expose the parsed HTTP headers from the server response
    the way `cookielib` expects to see them.
    """

    def __init__(self, headers):
        """Make a MockResponse for `cookielib` to read.

        :param headers: a httplib.HTTPMessage or analogous carrying the headers
        """
        self._headers = headers

    def info(self):
        return self._headers

    def getheaders(self, name):
        self._headers.getheaders(name)


def extract_cookies_to_jar(jar, request, response):
    """Extract the cookies from the response into a CookieJar.

    :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)
    :param request: our own requests.Request object
    :param response: urllib3.HTTPResponse object
    """
    if not (hasattr(response, "_original_response") and response._original_response):
        return
    # the _original_response field is the wrapped httplib.HTTPResponse object,
    req = MockRequest(request)
    # pull out the HTTPMessage with the headers and put it in the mock:
    res = MockResponse(response._original_response.msg)
    jar.extract_cookies(res, req)


def get_cookie_header(jar, request):
    """
    Produce an appropriate Cookie header string to be sent with `request`, or None.

    :rtype: str
    """
    r = MockRequest(request)
    jar.add_cookie_header(r)
    return r.get_new_headers().get("Cookie")


def remove_cookie_by_name(cookiejar, name, domain=None, path=None):
    """Unsets a cookie by name, by default over all domains and paths.

    Wraps CookieJar.clear(), is O(n).
    """
    clearables = []
    for cookie in cookiejar:
        if cookie.name != name:
            continue
        if domain is not None and domain != cookie.domain:
            continue
        if path is not None and path != cookie.path:
            continue
        clearables.append((cookie.domain, cookie.path, cookie.name))

    for domain, path, name in clearables:
        cookiejar.clear(domain, path, name)


class CookieConflictError(RuntimeError):
    """There are two cookies that meet the criteria specified in the cookie jar.
    Use .get and .set and include domain and path args in order to be more specific.
    """


class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
    """Compatibility class; is a cookielib.CookieJar, but exposes a dict
    interface.

    This is the CookieJar we create by default for requests and sessions that
    don't specify one, since some clients may expect response.cookies and
    session.cookies to support dict operations.

    Requests does not use the dict interface internally; it's just for
    compatibility with external client code. All requests code should work
    out of the box with externally provided instances of ``CookieJar``, e.g.
    ``LWPCookieJar`` and ``FileCookieJar``.

    Unlike a regular CookieJar, this class is pickleable.

    .. warning:: dictionary operations that are normally O(1) may be O(n).
    """

    def get(self, name, default=None, domain=None, path=None):
        """Dict-like get() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains.

        .. warning:: operation is O(n), not O(1).
        """
        try:
            return self._find_no_duplicates(name, domain, path)
        except KeyError:
            return default

    def set(self, name, value, **kwargs):
        """Dict-like set() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains.
        """
        # support client code that unsets cookies by assignment of a None value:
        if value is None:
            remove_cookie_by_name(
                self, name, domain=kwargs.get("domain"), path=kwargs.get("path")
            )
            return

        if isinstance(value, Morsel):
            c = morsel_to_cookie(value)
        else:
            c = create_cookie(name, value, **kwargs)
        self.set_cookie(c)
        return c

    def iterkeys(self):
        """Dict-like iterkeys() that returns an iterator of names of cookies
        from the jar.

        .. seealso:: itervalues() and iteritems().
        """
        for cookie in iter(self):
            yield cookie.name

    def keys(self):
        """Dict-like keys() that returns a list of names of cookies from the
        jar.

        .. seealso:: values() and items().
        """
        return list(self.iterkeys())

    def itervalues(self):
        """Dict-like itervalues() that returns an iterator of values of cookies
        from the jar.

        .. seealso:: iterkeys() and iteritems().
        """
        for cookie in iter(self):
            yield cookie.value

    def values(self):
        """Dict-like values() that returns a list of values of cookies from the
        jar.

        .. seealso:: keys() and items().
        """
        return list(self.itervalues())

    def iteritems(self):
        """Dict-like iteritems() that returns an iterator of name-value tuples
        from the jar.

        .. seealso:: iterkeys() and itervalues().
        """
        for cookie in iter(self):
            yield cookie.name, cookie.value

    def items(self):
        """Dict-like items() that returns a list of name-value tuples from the
        jar. Allows client-code to call ``dict(RequestsCookieJar)`` and get a
        vanilla python dict of key value pairs.

        .. seealso:: keys() and values().
        """
        return list(self.iteritems())

    def list_domains(self):
        """Utility method to list all the domains in the jar."""
        domains = []
        for cookie in iter(self):
            if cookie.domain not in domains:
                domains.append(cookie.domain)
        return domains

    def list_paths(self):
        """Utility method to list all the paths in the jar."""
        paths = []
        for cookie in iter(self):
            if cookie.path not in paths:
                paths.append(cookie.path)
        return paths

    def multiple_domains(self):
        """Returns True if there are multiple domains in the jar.
        Returns False otherwise.

        :rtype: bool
        """
        domains = []
        for cookie in iter(self):
            if cookie.domain is not None and cookie.domain in domains:
                return True
            domains.append(cookie.domain)
        return False  # there is only one domain in jar

    def get_dict(self, domain=None, path=None):
        """Takes as an argument an optional domain and path and returns a plain
        old Python dict of name-value pairs of cookies that meet the
        requirements.

        :rtype: dict
        """
        dictionary = {}
        for cookie in iter(self):
            if (domain is None or cookie.domain == domain) and (
                path is None or cookie.path == path
            ):
                dictionary[cookie.name] = cookie.value
        return dictionary

    def __contains__(self, name):
        try:
            return super().__contains__(name)
        except CookieConflictError:
            return True

    def __getitem__(self, name):
        """Dict-like __getitem__() for compatibility with client code. Throws
        exception if there are more than one cookie with name. In that case,
        use the more explicit get() method instead.

        .. warning:: operation is O(n), not O(1).
        """
        return self._find_no_duplicates(name)

    def __setitem__(self, name, value):
        """Dict-like __setitem__ for compatibility with client code. Throws
        exception if there is already a cookie of that name in the jar. In that
        case, use the more explicit set() method instead.
        """
        self.set(name, value)

    def __delitem__(self, name):
        """Deletes a cookie given a name. Wraps ``cookielib.CookieJar``'s
        ``remove_cookie_by_name()``.
        """
        remove_cookie_by_name(self, name)

    def set_cookie(self, cookie, *args, **kwargs):
        if (
            hasattr(cookie.value, "startswith")
            and cookie.value.startswith('"')
            and cookie.value.endswith('"')
        ):
            cookie.value = cookie.value.replace('\\"', "")
        return super().set_cookie(cookie, *args, **kwargs)

    def update(self, other):
        """Updates this jar with cookies from another CookieJar or dict-like"""
        if isinstance(other, cookielib.CookieJar):
            for cookie in other:
                self.set_cookie(copy.copy(cookie))
        else:
            super().update(other)

    def _find(self, name, domain=None, path=None):
        """Requests uses this method internally to get cookie values.

        If there are conflicting cookies, _find arbitrarily chooses one.
        See _find_no_duplicates if you want an exception thrown if there are
        conflicting cookies.

        :param name: a string containing name of cookie
        :param domain: (optional) string containing domain of cookie
        :param path: (optional) string containing path of cookie
        :return: cookie.value
        """
        for cookie in iter(self):
            if cookie.name == name:
                if domain is None or cookie.domain == domain:
                    if path is None or cookie.path == path:
                        return cookie.value

        raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}")

    def _find_no_duplicates(self, name, domain=None, path=None):
        """Both ``__get_item__`` and ``get`` call this function: it's never
        used elsewhere in Requests.

        :param name: a string containing name of cookie
        :param domain: (optional) string containing domain of cookie
        :param path: (optional) string containing path of cookie
        :raises KeyError: if cookie is not found
        :raises CookieConflictError: if there are multiple cookies
            that match name and optionally domain and path
        :return: cookie.value
        """
        toReturn = None
        for cookie in iter(self):
            if cookie.name == name:
                if domain is None or cookie.domain == domain:
                    if path is None or cookie.path == path:
                        if toReturn is not None:
                            # if there are multiple cookies that meet passed in criteria
                            raise CookieConflictError(
                                f"There are multiple cookies with name, {name!r}"
                            )
                        # we will eventually return this as long as no cookie conflict
                        toReturn = cookie.value

        if toReturn:
            return toReturn
        raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}")

    def __getstate__(self):
        """Unlike a normal CookieJar, this class is pickleable."""
        state = self.__dict__.copy()
        # remove the unpickleable RLock object
        state.pop("_cookies_lock")
        return state

    def __setstate__(self, state):
        """Unlike a normal CookieJar, this class is pickleable."""
        self.__dict__.update(state)
        if "_cookies_lock" not in self.__dict__:
            self._cookies_lock = threading.RLock()

    def copy(self):
        """Return a copy of this RequestsCookieJar."""
        new_cj = RequestsCookieJar()
        new_cj.set_policy(self.get_policy())
        new_cj.update(self)
        return new_cj

    def get_policy(self):
        """Return the CookiePolicy instance used."""
        return self._policy


def _copy_cookie_jar(jar):
    if jar is None:
        return None

    if hasattr(jar, "copy"):
        # We're dealing with an instance of RequestsCookieJar
        return jar.copy()
    # We're dealing with a generic CookieJar instance
    new_jar = copy.copy(jar)
    new_jar.clear()
    for cookie in jar:
        new_jar.set_cookie(copy.copy(cookie))
    return new_jar


def create_cookie(name, value, **kwargs):
    """Make a cookie from underspecified parameters.

    By default, the pair of `name` and `value` will be set for the domain ''
    and sent on every request (this is sometimes called a "supercookie").
    """
    result = {
        "version": 0,
        "name": name,
        "value": value,
        "port": None,
        "domain": "",
        "path": "/",
        "secure": False,
        "expires": None,
        "discard": True,
        "comment": None,
        "comment_url": None,
        "rest": {"HttpOnly": None},
        "rfc2109": False,
    }

    badargs = set(kwargs) - set(result)
    if badargs:
        raise TypeError(
            f"create_cookie() got unexpected keyword arguments: {list(badargs)}"
        )

    result.update(kwargs)
    result["port_specified"] = bool(result["port"])
    result["domain_specified"] = bool(result["domain"])
    result["domain_initial_dot"] = result["domain"].startswith(".")
    result["path_specified"] = bool(result["path"])

    return cookielib.Cookie(**result)


def morsel_to_cookie(morsel):
    """Convert a Morsel object into a Cookie containing the one k/v pair."""

    expires = None
    if morsel["max-age"]:
        try:
            expires = int(time.time() + int(morsel["max-age"]))
        except ValueError:
            raise TypeError(f"max-age: {morsel['max-age']} must be integer")
    elif morsel["expires"]:
        time_template = "%a, %d-%b-%Y %H:%M:%S GMT"
        expires = calendar.timegm(time.strptime(morsel["expires"], time_template))
    return create_cookie(
        comment=morsel["comment"],
        comment_url=bool(morsel["comment"]),
        discard=False,
        domain=morsel["domain"],
        expires=expires,
        name=morsel.key,
        path=morsel["path"],
        port=None,
        rest={"HttpOnly": morsel["httponly"]},
        rfc2109=False,
        secure=bool(morsel["secure"]),
        value=morsel.value,
        version=morsel["version"] or 0,
    )


def cookiejar_from_dict(cookie_dict, cookiejar=None, overwrite=True):
    """Returns a CookieJar from a key/value dictionary.

    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :param cookiejar: (optional) A cookiejar to add the cookies to.
    :param overwrite: (optional) If False, will not replace cookies
        already in the jar with new ones.
    :rtype: CookieJar
    """
    if cookiejar is None:
        cookiejar = RequestsCookieJar()

    if cookie_dict is not None:
        names_from_jar = [cookie.name for cookie in cookiejar]
        for name in cookie_dict:
            if overwrite or (name not in names_from_jar):
                cookiejar.set_cookie(create_cookie(name, cookie_dict[name]))

    return cookiejar


def merge_cookies(cookiejar, cookies):
    """Add cookies to cookiejar and returns a merged CookieJar.

    :param cookiejar: CookieJar object to add the cookies to.
    :param cookies: Dictionary or CookieJar object to be added.
    :rtype: CookieJar
    """
    if not isinstance(cookiejar, cookielib.CookieJar):
        raise ValueError("You can only merge into CookieJar")

    if isinstance(cookies, dict):
        cookiejar = cookiejar_from_dict(cookies, cookiejar=cookiejar, overwrite=False)
    elif isinstance(cookies, cookielib.CookieJar):
        try:
            cookiejar.update(cookies)
        except AttributeError:
            for cookie_in_jar in cookies:
                cookiejar.set_cookie(cookie_in_jar)

    return cookiejar
python3.12/site-packages/pip/_vendor/requests/exceptions.py000064400000007357151732702660017770 0ustar00"""
requests.exceptions
~~~~~~~~~~~~~~~~~~~

This module contains the set of Requests' exceptions.
"""
from pip._vendor.urllib3.exceptions import HTTPError as BaseHTTPError

from .compat import JSONDecodeError as CompatJSONDecodeError


class RequestException(IOError):
    """There was an ambiguous exception that occurred while handling your
    request.
    """

    def __init__(self, *args, **kwargs):
        """Initialize RequestException with `request` and `response` objects."""
        response = kwargs.pop("response", None)
        self.response = response
        self.request = kwargs.pop("request", None)
        if response is not None and not self.request and hasattr(response, "request"):
            self.request = self.response.request
        super().__init__(*args, **kwargs)


class InvalidJSONError(RequestException):
    """A JSON error occurred."""


class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError):
    """Couldn't decode the text into json"""

    def __init__(self, *args, **kwargs):
        """
        Construct the JSONDecodeError instance first with all
        args. Then use it's args to construct the IOError so that
        the json specific args aren't used as IOError specific args
        and the error message from JSONDecodeError is preserved.
        """
        CompatJSONDecodeError.__init__(self, *args)
        InvalidJSONError.__init__(self, *self.args, **kwargs)


class HTTPError(RequestException):
    """An HTTP error occurred."""


class ConnectionError(RequestException):
    """A Connection error occurred."""


class ProxyError(ConnectionError):
    """A proxy error occurred."""


class SSLError(ConnectionError):
    """An SSL error occurred."""


class Timeout(RequestException):
    """The request timed out.

    Catching this error will catch both
    :exc:`~requests.exceptions.ConnectTimeout` and
    :exc:`~requests.exceptions.ReadTimeout` errors.
    """


class ConnectTimeout(ConnectionError, Timeout):
    """The request timed out while trying to connect to the remote server.

    Requests that produced this error are safe to retry.
    """


class ReadTimeout(Timeout):
    """The server did not send any data in the allotted amount of time."""


class URLRequired(RequestException):
    """A valid URL is required to make a request."""


class TooManyRedirects(RequestException):
    """Too many redirects."""


class MissingSchema(RequestException, ValueError):
    """The URL scheme (e.g. http or https) is missing."""


class InvalidSchema(RequestException, ValueError):
    """The URL scheme provided is either invalid or unsupported."""


class InvalidURL(RequestException, ValueError):
    """The URL provided was somehow invalid."""


class InvalidHeader(RequestException, ValueError):
    """The header value provided was somehow invalid."""


class InvalidProxyURL(InvalidURL):
    """The proxy URL provided is invalid."""


class ChunkedEncodingError(RequestException):
    """The server declared chunked encoding but sent an invalid chunk."""


class ContentDecodingError(RequestException, BaseHTTPError):
    """Failed to decode response content."""


class StreamConsumedError(RequestException, TypeError):
    """The content for this response was already consumed."""


class RetryError(RequestException):
    """Custom retries logic failed"""


class UnrewindableBodyError(RequestException):
    """Requests encountered an error when trying to rewind a body."""


# Warnings


class RequestsWarning(Warning):
    """Base warning for Requests."""


class FileModeWarning(RequestsWarning, DeprecationWarning):
    """A file was opened in text mode, but Requests determined its binary length."""


class RequestsDependencyWarning(RequestsWarning):
    """An imported dependency doesn't match the expected version range."""
python3.12/site-packages/pip/_vendor/requests/help.py000064400000007447151732702660016537 0ustar00"""Module containing bug report helper(s)."""

import json
import platform
import ssl
import sys

from pip._vendor import idna
from pip._vendor import urllib3

from . import __version__ as requests_version

charset_normalizer = None

try:
    from pip._vendor import chardet
except ImportError:
    chardet = None

try:
    from pip._vendor.urllib3.contrib import pyopenssl
except ImportError:
    pyopenssl = None
    OpenSSL = None
    cryptography = None
else:
    import cryptography
    import OpenSSL


def _implementation():
    """Return a dict with the Python implementation and version.

    Provide both the name and the version of the Python implementation
    currently running. For example, on CPython 3.10.3 it will return
    {'name': 'CPython', 'version': '3.10.3'}.

    This function works best on CPython and PyPy: in particular, it probably
    doesn't work for Jython or IronPython. Future investigation should be done
    to work out the correct shape of the code for those platforms.
    """
    implementation = platform.python_implementation()

    if implementation == "CPython":
        implementation_version = platform.python_version()
    elif implementation == "PyPy":
        implementation_version = "{}.{}.{}".format(
            sys.pypy_version_info.major,
            sys.pypy_version_info.minor,
            sys.pypy_version_info.micro,
        )
        if sys.pypy_version_info.releaselevel != "final":
            implementation_version = "".join(
                [implementation_version, sys.pypy_version_info.releaselevel]
            )
    elif implementation == "Jython":
        implementation_version = platform.python_version()  # Complete Guess
    elif implementation == "IronPython":
        implementation_version = platform.python_version()  # Complete Guess
    else:
        implementation_version = "Unknown"

    return {"name": implementation, "version": implementation_version}


def info():
    """Generate information for a bug report."""
    try:
        platform_info = {
            "system": platform.system(),
            "release": platform.release(),
        }
    except OSError:
        platform_info = {
            "system": "Unknown",
            "release": "Unknown",
        }

    implementation_info = _implementation()
    urllib3_info = {"version": urllib3.__version__}
    charset_normalizer_info = {"version": None}
    chardet_info = {"version": None}
    if charset_normalizer:
        charset_normalizer_info = {"version": charset_normalizer.__version__}
    if chardet:
        chardet_info = {"version": chardet.__version__}

    pyopenssl_info = {
        "version": None,
        "openssl_version": "",
    }
    if OpenSSL:
        pyopenssl_info = {
            "version": OpenSSL.__version__,
            "openssl_version": f"{OpenSSL.SSL.OPENSSL_VERSION_NUMBER:x}",
        }
    cryptography_info = {
        "version": getattr(cryptography, "__version__", ""),
    }
    idna_info = {
        "version": getattr(idna, "__version__", ""),
    }

    system_ssl = ssl.OPENSSL_VERSION_NUMBER
    system_ssl_info = {"version": f"{system_ssl:x}" if system_ssl is not None else ""}

    return {
        "platform": platform_info,
        "implementation": implementation_info,
        "system_ssl": system_ssl_info,
        "using_pyopenssl": pyopenssl is not None,
        "using_charset_normalizer": chardet is None,
        "pyOpenSSL": pyopenssl_info,
        "urllib3": urllib3_info,
        "chardet": chardet_info,
        "charset_normalizer": charset_normalizer_info,
        "cryptography": cryptography_info,
        "idna": idna_info,
        "requests": {
            "version": requests_version,
        },
    }


def main():
    """Pretty-print the bug information as JSON."""
    print(json.dumps(info(), sort_keys=True, indent=2))


if __name__ == "__main__":
    main()
python3.12/site-packages/pip/_vendor/requests/__version__.py000064400000000663151732702660020061 0ustar00# .-. .-. .-. . . .-. .-. .-. .-.
# |(  |-  |.| | | |-  `-.  |  `-.
# ' ' `-' `-`.`-' `-' `-'  '  `-'

__title__ = "requests"
__description__ = "Python HTTP for Humans."
__url__ = "https://requests.readthedocs.io"
__version__ = "2.31.0"
__build__ = 0x023100
__author__ = "Kenneth Reitz"
__author_email__ = "me@kennethreitz.org"
__license__ = "Apache 2.0"
__copyright__ = "Copyright Kenneth Reitz"
__cake__ = "\u2728 \U0001f370 \u2728"
python3.12/site-packages/pip/_vendor/requests/utils.py000064400000101264151732702660016737 0ustar00"""
requests.utils
~~~~~~~~~~~~~~

This module provides utility functions that are used within Requests
that are also useful for external consumption.
"""

import codecs
import contextlib
import io
import os
import re
import socket
import struct
import sys
import tempfile
import warnings
import zipfile
from collections import OrderedDict

from pip._vendor.urllib3.util import make_headers, parse_url

from . import certs
from .__version__ import __version__

# to_native_string is unused here, but imported here for backwards compatibility
from ._internal_utils import (  # noqa: F401
    _HEADER_VALIDATORS_BYTE,
    _HEADER_VALIDATORS_STR,
    HEADER_VALIDATORS,
    to_native_string,
)
from .compat import (
    Mapping,
    basestring,
    bytes,
    getproxies,
    getproxies_environment,
    integer_types,
)
from .compat import parse_http_list as _parse_list_header
from .compat import (
    proxy_bypass,
    proxy_bypass_environment,
    quote,
    str,
    unquote,
    urlparse,
    urlunparse,
)
from .cookies import cookiejar_from_dict
from .exceptions import (
    FileModeWarning,
    InvalidHeader,
    InvalidURL,
    UnrewindableBodyError,
)
from .structures import CaseInsensitiveDict

NETRC_FILES = (".netrc", "_netrc")

DEFAULT_CA_BUNDLE_PATH = certs.where()

DEFAULT_PORTS = {"http": 80, "https": 443}

# Ensure that ', ' is used to preserve previous delimiter behavior.
DEFAULT_ACCEPT_ENCODING = ", ".join(
    re.split(r",\s*", make_headers(accept_encoding=True)["accept-encoding"])
)


if sys.platform == "win32":
    # provide a proxy_bypass version on Windows without DNS lookups

    def proxy_bypass_registry(host):
        try:
            import winreg
        except ImportError:
            return False

        try:
            internetSettings = winreg.OpenKey(
                winreg.HKEY_CURRENT_USER,
                r"Software\Microsoft\Windows\CurrentVersion\Internet Settings",
            )
            # ProxyEnable could be REG_SZ or REG_DWORD, normalizing it
            proxyEnable = int(winreg.QueryValueEx(internetSettings, "ProxyEnable")[0])
            # ProxyOverride is almost always a string
            proxyOverride = winreg.QueryValueEx(internetSettings, "ProxyOverride")[0]
        except (OSError, ValueError):
            return False
        if not proxyEnable or not proxyOverride:
            return False

        # make a check value list from the registry entry: replace the
        # '<local>' string by the localhost entry and the corresponding
        # canonical entry.
        proxyOverride = proxyOverride.split(";")
        # now check if we match one of the registry values.
        for test in proxyOverride:
            if test == "<local>":
                if "." not in host:
                    return True
            test = test.replace(".", r"\.")  # mask dots
            test = test.replace("*", r".*")  # change glob sequence
            test = test.replace("?", r".")  # change glob char
            if re.match(test, host, re.I):
                return True
        return False

    def proxy_bypass(host):  # noqa
        """Return True, if the host should be bypassed.

        Checks proxy settings gathered from the environment, if specified,
        or the registry.
        """
        if getproxies_environment():
            return proxy_bypass_environment(host)
        else:
            return proxy_bypass_registry(host)


def dict_to_sequence(d):
    """Returns an internal sequence dictionary update."""

    if hasattr(d, "items"):
        d = d.items()

    return d


def super_len(o):
    total_length = None
    current_position = 0

    if hasattr(o, "__len__"):
        total_length = len(o)

    elif hasattr(o, "len"):
        total_length = o.len

    elif hasattr(o, "fileno"):
        try:
            fileno = o.fileno()
        except (io.UnsupportedOperation, AttributeError):
            # AttributeError is a surprising exception, seeing as how we've just checked
            # that `hasattr(o, 'fileno')`.  It happens for objects obtained via
            # `Tarfile.extractfile()`, per issue 5229.
            pass
        else:
            total_length = os.fstat(fileno).st_size

            # Having used fstat to determine the file length, we need to
            # confirm that this file was opened up in binary mode.
            if "b" not in o.mode:
                warnings.warn(
                    (
                        "Requests has determined the content-length for this "
                        "request using the binary size of the file: however, the "
                        "file has been opened in text mode (i.e. without the 'b' "
                        "flag in the mode). This may lead to an incorrect "
                        "content-length. In Requests 3.0, support will be removed "
                        "for files in text mode."
                    ),
                    FileModeWarning,
                )

    if hasattr(o, "tell"):
        try:
            current_position = o.tell()
        except OSError:
            # This can happen in some weird situations, such as when the file
            # is actually a special file descriptor like stdin. In this
            # instance, we don't know what the length is, so set it to zero and
            # let requests chunk it instead.
            if total_length is not None:
                current_position = total_length
        else:
            if hasattr(o, "seek") and total_length is None:
                # StringIO and BytesIO have seek but no usable fileno
                try:
                    # seek to end of file
                    o.seek(0, 2)
                    total_length = o.tell()

                    # seek back to current position to support
                    # partially read file-like objects
                    o.seek(current_position or 0)
                except OSError:
                    total_length = 0

    if total_length is None:
        total_length = 0

    return max(0, total_length - current_position)


def get_netrc_auth(url, raise_errors=False):
    """Returns the Requests tuple auth for a given url from netrc."""

    netrc_file = os.environ.get("NETRC")
    if netrc_file is not None:
        netrc_locations = (netrc_file,)
    else:
        netrc_locations = (f"~/{f}" for f in NETRC_FILES)

    try:
        from netrc import NetrcParseError, netrc

        netrc_path = None

        for f in netrc_locations:
            try:
                loc = os.path.expanduser(f)
            except KeyError:
                # os.path.expanduser can fail when $HOME is undefined and
                # getpwuid fails. See https://bugs.python.org/issue20164 &
                # https://github.com/psf/requests/issues/1846
                return

            if os.path.exists(loc):
                netrc_path = loc
                break

        # Abort early if there isn't one.
        if netrc_path is None:
            return

        ri = urlparse(url)

        # Strip port numbers from netloc. This weird `if...encode`` dance is
        # used for Python 3.2, which doesn't support unicode literals.
        splitstr = b":"
        if isinstance(url, str):
            splitstr = splitstr.decode("ascii")
        host = ri.netloc.split(splitstr)[0]

        try:
            _netrc = netrc(netrc_path).authenticators(host)
            if _netrc:
                # Return with login / password
                login_i = 0 if _netrc[0] else 1
                return (_netrc[login_i], _netrc[2])
        except (NetrcParseError, OSError):
            # If there was a parsing error or a permissions issue reading the file,
            # we'll just skip netrc auth unless explicitly asked to raise errors.
            if raise_errors:
                raise

    # App Engine hackiness.
    except (ImportError, AttributeError):
        pass


def guess_filename(obj):
    """Tries to guess the filename of the given object."""
    name = getattr(obj, "name", None)
    if name and isinstance(name, basestring) and name[0] != "<" and name[-1] != ">":
        return os.path.basename(name)


def extract_zipped_paths(path):
    """Replace nonexistent paths that look like they refer to a member of a zip
    archive with the location of an extracted copy of the target, or else
    just return the provided path unchanged.
    """
    if os.path.exists(path):
        # this is already a valid path, no need to do anything further
        return path

    # find the first valid part of the provided path and treat that as a zip archive
    # assume the rest of the path is the name of a member in the archive
    archive, member = os.path.split(path)
    while archive and not os.path.exists(archive):
        archive, prefix = os.path.split(archive)
        if not prefix:
            # If we don't check for an empty prefix after the split (in other words, archive remains unchanged after the split),
            # we _can_ end up in an infinite loop on a rare corner case affecting a small number of users
            break
        member = "/".join([prefix, member])

    if not zipfile.is_zipfile(archive):
        return path

    zip_file = zipfile.ZipFile(archive)
    if member not in zip_file.namelist():
        return path

    # we have a valid zip archive and a valid member of that archive
    tmp = tempfile.gettempdir()
    extracted_path = os.path.join(tmp, member.split("/")[-1])
    if not os.path.exists(extracted_path):
        # use read + write to avoid the creating nested folders, we only want the file, avoids mkdir racing condition
        with atomic_open(extracted_path) as file_handler:
            file_handler.write(zip_file.read(member))
    return extracted_path


@contextlib.contextmanager
def atomic_open(filename):
    """Write a file to the disk in an atomic fashion"""
    tmp_descriptor, tmp_name = tempfile.mkstemp(dir=os.path.dirname(filename))
    try:
        with os.fdopen(tmp_descriptor, "wb") as tmp_handler:
            yield tmp_handler
        os.replace(tmp_name, filename)
    except BaseException:
        os.remove(tmp_name)
        raise


def from_key_val_list(value):
    """Take an object and test to see if it can be represented as a
    dictionary. Unless it can not be represented as such, return an
    OrderedDict, e.g.,

    ::

        >>> from_key_val_list([('key', 'val')])
        OrderedDict([('key', 'val')])
        >>> from_key_val_list('string')
        Traceback (most recent call last):
        ...
        ValueError: cannot encode objects that are not 2-tuples
        >>> from_key_val_list({'key': 'val'})
        OrderedDict([('key', 'val')])

    :rtype: OrderedDict
    """
    if value is None:
        return None

    if isinstance(value, (str, bytes, bool, int)):
        raise ValueError("cannot encode objects that are not 2-tuples")

    return OrderedDict(value)


def to_key_val_list(value):
    """Take an object and test to see if it can be represented as a
    dictionary. If it can be, return a list of tuples, e.g.,

    ::

        >>> to_key_val_list([('key', 'val')])
        [('key', 'val')]
        >>> to_key_val_list({'key': 'val'})
        [('key', 'val')]
        >>> to_key_val_list('string')
        Traceback (most recent call last):
        ...
        ValueError: cannot encode objects that are not 2-tuples

    :rtype: list
    """
    if value is None:
        return None

    if isinstance(value, (str, bytes, bool, int)):
        raise ValueError("cannot encode objects that are not 2-tuples")

    if isinstance(value, Mapping):
        value = value.items()

    return list(value)


# From mitsuhiko/werkzeug (used with permission).
def parse_list_header(value):
    """Parse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Quotes are removed automatically after parsing.

    It basically works like :func:`parse_set_header` just that items
    may appear multiple times and case sensitivity is preserved.

    The return value is a standard :class:`list`:

    >>> parse_list_header('token, "quoted value"')
    ['token', 'quoted value']

    To create a header from the :class:`list` again, use the
    :func:`dump_header` function.

    :param value: a string with a list header.
    :return: :class:`list`
    :rtype: list
    """
    result = []
    for item in _parse_list_header(value):
        if item[:1] == item[-1:] == '"':
            item = unquote_header_value(item[1:-1])
        result.append(item)
    return result


# From mitsuhiko/werkzeug (used with permission).
def parse_dict_header(value):
    """Parse lists of key, value pairs as described by RFC 2068 Section 2 and
    convert them into a python dict:

    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
    >>> type(d) is dict
    True
    >>> sorted(d.items())
    [('bar', 'as well'), ('foo', 'is a fish')]

    If there is no value for a key it will be `None`:

    >>> parse_dict_header('key_without_value')
    {'key_without_value': None}

    To create a header from the :class:`dict` again, use the
    :func:`dump_header` function.

    :param value: a string with a dict header.
    :return: :class:`dict`
    :rtype: dict
    """
    result = {}
    for item in _parse_list_header(value):
        if "=" not in item:
            result[item] = None
            continue
        name, value = item.split("=", 1)
        if value[:1] == value[-1:] == '"':
            value = unquote_header_value(value[1:-1])
        result[name] = value
    return result


# From mitsuhiko/werkzeug (used with permission).
def unquote_header_value(value, is_filename=False):
    r"""Unquotes a header value.  (Reversal of :func:`quote_header_value`).
    This does not use the real unquoting but what browsers are actually
    using for quoting.

    :param value: the header value to unquote.
    :rtype: str
    """
    if value and value[0] == value[-1] == '"':
        # this is not the real unquoting, but fixing this so that the
        # RFC is met will result in bugs with internet explorer and
        # probably some other browsers as well.  IE for example is
        # uploading files with "C:\foo\bar.txt" as filename
        value = value[1:-1]

        # if this is a filename and the starting characters look like
        # a UNC path, then just return the value without quotes.  Using the
        # replace sequence below on a UNC path has the effect of turning
        # the leading double slash into a single slash and then
        # _fix_ie_filename() doesn't work correctly.  See #458.
        if not is_filename or value[:2] != "\\\\":
            return value.replace("\\\\", "\\").replace('\\"', '"')
    return value


def dict_from_cookiejar(cj):
    """Returns a key/value dictionary from a CookieJar.

    :param cj: CookieJar object to extract cookies from.
    :rtype: dict
    """

    cookie_dict = {}

    for cookie in cj:
        cookie_dict[cookie.name] = cookie.value

    return cookie_dict


def add_dict_to_cookiejar(cj, cookie_dict):
    """Returns a CookieJar from a key/value dictionary.

    :param cj: CookieJar to insert cookies into.
    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :rtype: CookieJar
    """

    return cookiejar_from_dict(cookie_dict, cj)


def get_encodings_from_content(content):
    """Returns encodings from given content string.

    :param content: bytestring to extract encodings from.
    """
    warnings.warn(
        (
            "In requests 3.0, get_encodings_from_content will be removed. For "
            "more information, please see the discussion on issue #2266. (This"
            " warning should only appear once.)"
        ),
        DeprecationWarning,
    )

    charset_re = re.compile(r'<meta.*?charset=["\']*(.+?)["\'>]', flags=re.I)
    pragma_re = re.compile(r'<meta.*?content=["\']*;?charset=(.+?)["\'>]', flags=re.I)
    xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]')

    return (
        charset_re.findall(content)
        + pragma_re.findall(content)
        + xml_re.findall(content)
    )


def _parse_content_type_header(header):
    """Returns content type and parameters from given header

    :param header: string
    :return: tuple containing content type and dictionary of
         parameters
    """

    tokens = header.split(";")
    content_type, params = tokens[0].strip(), tokens[1:]
    params_dict = {}
    items_to_strip = "\"' "

    for param in params:
        param = param.strip()
        if param:
            key, value = param, True
            index_of_equals = param.find("=")
            if index_of_equals != -1:
                key = param[:index_of_equals].strip(items_to_strip)
                value = param[index_of_equals + 1 :].strip(items_to_strip)
            params_dict[key.lower()] = value
    return content_type, params_dict


def get_encoding_from_headers(headers):
    """Returns encodings from given HTTP Header Dict.

    :param headers: dictionary to extract encoding from.
    :rtype: str
    """

    content_type = headers.get("content-type")

    if not content_type:
        return None

    content_type, params = _parse_content_type_header(content_type)

    if "charset" in params:
        return params["charset"].strip("'\"")

    if "text" in content_type:
        return "ISO-8859-1"

    if "application/json" in content_type:
        # Assume UTF-8 based on RFC 4627: https://www.ietf.org/rfc/rfc4627.txt since the charset was unset
        return "utf-8"


def stream_decode_response_unicode(iterator, r):
    """Stream decodes an iterator."""

    if r.encoding is None:
        yield from iterator
        return

    decoder = codecs.getincrementaldecoder(r.encoding)(errors="replace")
    for chunk in iterator:
        rv = decoder.decode(chunk)
        if rv:
            yield rv
    rv = decoder.decode(b"", final=True)
    if rv:
        yield rv


def iter_slices(string, slice_length):
    """Iterate over slices of a string."""
    pos = 0
    if slice_length is None or slice_length <= 0:
        slice_length = len(string)
    while pos < len(string):
        yield string[pos : pos + slice_length]
        pos += slice_length


def get_unicode_from_response(r):
    """Returns the requested content back in unicode.

    :param r: Response object to get unicode content from.

    Tried:

    1. charset from content-type
    2. fall back and replace all unicode characters

    :rtype: str
    """
    warnings.warn(
        (
            "In requests 3.0, get_unicode_from_response will be removed. For "
            "more information, please see the discussion on issue #2266. (This"
            " warning should only appear once.)"
        ),
        DeprecationWarning,
    )

    tried_encodings = []

    # Try charset from content-type
    encoding = get_encoding_from_headers(r.headers)

    if encoding:
        try:
            return str(r.content, encoding)
        except UnicodeError:
            tried_encodings.append(encoding)

    # Fall back:
    try:
        return str(r.content, encoding, errors="replace")
    except TypeError:
        return r.content


# The unreserved URI characters (RFC 3986)
UNRESERVED_SET = frozenset(
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789-._~"
)


def unquote_unreserved(uri):
    """Un-escape any percent-escape sequences in a URI that are unreserved
    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.

    :rtype: str
    """
    parts = uri.split("%")
    for i in range(1, len(parts)):
        h = parts[i][0:2]
        if len(h) == 2 and h.isalnum():
            try:
                c = chr(int(h, 16))
            except ValueError:
                raise InvalidURL(f"Invalid percent-escape sequence: '{h}'")

            if c in UNRESERVED_SET:
                parts[i] = c + parts[i][2:]
            else:
                parts[i] = f"%{parts[i]}"
        else:
            parts[i] = f"%{parts[i]}"
    return "".join(parts)


def requote_uri(uri):
    """Re-quote the given URI.

    This function passes the given URI through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.

    :rtype: str
    """
    safe_with_percent = "!#$%&'()*+,/:;=?@[]~"
    safe_without_percent = "!#$&'()*+,/:;=?@[]~"
    try:
        # Unquote only the unreserved characters
        # Then quote only illegal characters (do not quote reserved,
        # unreserved, or '%')
        return quote(unquote_unreserved(uri), safe=safe_with_percent)
    except InvalidURL:
        # We couldn't unquote the given URI, so let's try quoting it, but
        # there may be unquoted '%'s in the URI. We need to make sure they're
        # properly quoted so they do not cause issues elsewhere.
        return quote(uri, safe=safe_without_percent)


def address_in_network(ip, net):
    """This function allows you to check if an IP belongs to a network subnet

    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24

    :rtype: bool
    """
    ipaddr = struct.unpack("=L", socket.inet_aton(ip))[0]
    netaddr, bits = net.split("/")
    netmask = struct.unpack("=L", socket.inet_aton(dotted_netmask(int(bits))))[0]
    network = struct.unpack("=L", socket.inet_aton(netaddr))[0] & netmask
    return (ipaddr & netmask) == (network & netmask)


def dotted_netmask(mask):
    """Converts mask from /xx format to xxx.xxx.xxx.xxx

    Example: if mask is 24 function returns 255.255.255.0

    :rtype: str
    """
    bits = 0xFFFFFFFF ^ (1 << 32 - mask) - 1
    return socket.inet_ntoa(struct.pack(">I", bits))


def is_ipv4_address(string_ip):
    """
    :rtype: bool
    """
    try:
        socket.inet_aton(string_ip)
    except OSError:
        return False
    return True


def is_valid_cidr(string_network):
    """
    Very simple check of the cidr format in no_proxy variable.

    :rtype: bool
    """
    if string_network.count("/") == 1:
        try:
            mask = int(string_network.split("/")[1])
        except ValueError:
            return False

        if mask < 1 or mask > 32:
            return False

        try:
            socket.inet_aton(string_network.split("/")[0])
        except OSError:
            return False
    else:
        return False
    return True


@contextlib.contextmanager
def set_environ(env_name, value):
    """Set the environment variable 'env_name' to 'value'

    Save previous value, yield, and then restore the previous value stored in
    the environment variable 'env_name'.

    If 'value' is None, do nothing"""
    value_changed = value is not None
    if value_changed:
        old_value = os.environ.get(env_name)
        os.environ[env_name] = value
    try:
        yield
    finally:
        if value_changed:
            if old_value is None:
                del os.environ[env_name]
            else:
                os.environ[env_name] = old_value


def should_bypass_proxies(url, no_proxy):
    """
    Returns whether we should bypass proxies or not.

    :rtype: bool
    """
    # Prioritize lowercase environment variables over uppercase
    # to keep a consistent behaviour with other http projects (curl, wget).
    def get_proxy(key):
        return os.environ.get(key) or os.environ.get(key.upper())

    # First check whether no_proxy is defined. If it is, check that the URL
    # we're getting isn't in the no_proxy list.
    no_proxy_arg = no_proxy
    if no_proxy is None:
        no_proxy = get_proxy("no_proxy")
    parsed = urlparse(url)

    if parsed.hostname is None:
        # URLs don't always have hostnames, e.g. file:/// urls.
        return True

    if no_proxy:
        # We need to check whether we match here. We need to see if we match
        # the end of the hostname, both with and without the port.
        no_proxy = (host for host in no_proxy.replace(" ", "").split(",") if host)

        if is_ipv4_address(parsed.hostname):
            for proxy_ip in no_proxy:
                if is_valid_cidr(proxy_ip):
                    if address_in_network(parsed.hostname, proxy_ip):
                        return True
                elif parsed.hostname == proxy_ip:
                    # If no_proxy ip was defined in plain IP notation instead of cidr notation &
                    # matches the IP of the index
                    return True
        else:
            host_with_port = parsed.hostname
            if parsed.port:
                host_with_port += f":{parsed.port}"

            for host in no_proxy:
                if parsed.hostname.endswith(host) or host_with_port.endswith(host):
                    # The URL does match something in no_proxy, so we don't want
                    # to apply the proxies on this URL.
                    return True

    with set_environ("no_proxy", no_proxy_arg):
        # parsed.hostname can be `None` in cases such as a file URI.
        try:
            bypass = proxy_bypass(parsed.hostname)
        except (TypeError, socket.gaierror):
            bypass = False

    if bypass:
        return True

    return False


def get_environ_proxies(url, no_proxy=None):
    """
    Return a dict of environment proxies.

    :rtype: dict
    """
    if should_bypass_proxies(url, no_proxy=no_proxy):
        return {}
    else:
        return getproxies()


def select_proxy(url, proxies):
    """Select a proxy for the url, if applicable.

    :param url: The url being for the request
    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
    """
    proxies = proxies or {}
    urlparts = urlparse(url)
    if urlparts.hostname is None:
        return proxies.get(urlparts.scheme, proxies.get("all"))

    proxy_keys = [
        urlparts.scheme + "://" + urlparts.hostname,
        urlparts.scheme,
        "all://" + urlparts.hostname,
        "all",
    ]
    proxy = None
    for proxy_key in proxy_keys:
        if proxy_key in proxies:
            proxy = proxies[proxy_key]
            break

    return proxy


def resolve_proxies(request, proxies, trust_env=True):
    """This method takes proxy information from a request and configuration
    input to resolve a mapping of target proxies. This will consider settings
    such a NO_PROXY to strip proxy configurations.

    :param request: Request or PreparedRequest
    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
    :param trust_env: Boolean declaring whether to trust environment configs

    :rtype: dict
    """
    proxies = proxies if proxies is not None else {}
    url = request.url
    scheme = urlparse(url).scheme
    no_proxy = proxies.get("no_proxy")
    new_proxies = proxies.copy()

    if trust_env and not should_bypass_proxies(url, no_proxy=no_proxy):
        environ_proxies = get_environ_proxies(url, no_proxy=no_proxy)

        proxy = environ_proxies.get(scheme, environ_proxies.get("all"))

        if proxy:
            new_proxies.setdefault(scheme, proxy)
    return new_proxies


def default_user_agent(name="python-requests"):
    """
    Return a string representing the default user agent.

    :rtype: str
    """
    return f"{name}/{__version__}"


def default_headers():
    """
    :rtype: requests.structures.CaseInsensitiveDict
    """
    return CaseInsensitiveDict(
        {
            "User-Agent": default_user_agent(),
            "Accept-Encoding": DEFAULT_ACCEPT_ENCODING,
            "Accept": "*/*",
            "Connection": "keep-alive",
        }
    )


def parse_header_links(value):
    """Return a list of parsed link headers proxies.

    i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

    :rtype: list
    """

    links = []

    replace_chars = " '\""

    value = value.strip(replace_chars)
    if not value:
        return links

    for val in re.split(", *<", value):
        try:
            url, params = val.split(";", 1)
        except ValueError:
            url, params = val, ""

        link = {"url": url.strip("<> '\"")}

        for param in params.split(";"):
            try:
                key, value = param.split("=")
            except ValueError:
                break

            link[key.strip(replace_chars)] = value.strip(replace_chars)

        links.append(link)

    return links


# Null bytes; no need to recreate these on each call to guess_json_utf
_null = "\x00".encode("ascii")  # encoding to ASCII for Python 3
_null2 = _null * 2
_null3 = _null * 3


def guess_json_utf(data):
    """
    :rtype: str
    """
    # JSON always starts with two ASCII characters, so detection is as
    # easy as counting the nulls and from their location and count
    # determine the encoding. Also detect a BOM, if present.
    sample = data[:4]
    if sample in (codecs.BOM_UTF32_LE, codecs.BOM_UTF32_BE):
        return "utf-32"  # BOM included
    if sample[:3] == codecs.BOM_UTF8:
        return "utf-8-sig"  # BOM included, MS style (discouraged)
    if sample[:2] in (codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE):
        return "utf-16"  # BOM included
    nullcount = sample.count(_null)
    if nullcount == 0:
        return "utf-8"
    if nullcount == 2:
        if sample[::2] == _null2:  # 1st and 3rd are null
            return "utf-16-be"
        if sample[1::2] == _null2:  # 2nd and 4th are null
            return "utf-16-le"
        # Did not detect 2 valid UTF-16 ascii-range characters
    if nullcount == 3:
        if sample[:3] == _null3:
            return "utf-32-be"
        if sample[1:] == _null3:
            return "utf-32-le"
        # Did not detect a valid UTF-32 ascii-range character
    return None


def prepend_scheme_if_needed(url, new_scheme):
    """Given a URL that may or may not have a scheme, prepend the given scheme.
    Does not replace a present scheme with the one provided as an argument.

    :rtype: str
    """
    parsed = parse_url(url)
    scheme, auth, host, port, path, query, fragment = parsed

    # A defect in urlparse determines that there isn't a netloc present in some
    # urls. We previously assumed parsing was overly cautious, and swapped the
    # netloc and path. Due to a lack of tests on the original defect, this is
    # maintained with parse_url for backwards compatibility.
    netloc = parsed.netloc
    if not netloc:
        netloc, path = path, netloc

    if auth:
        # parse_url doesn't provide the netloc with auth
        # so we'll add it ourselves.
        netloc = "@".join([auth, netloc])
    if scheme is None:
        scheme = new_scheme
    if path is None:
        path = ""

    return urlunparse((scheme, netloc, path, "", query, fragment))


def get_auth_from_url(url):
    """Given a url with authentication components, extract them into a tuple of
    username,password.

    :rtype: (str,str)
    """
    parsed = urlparse(url)

    try:
        auth = (unquote(parsed.username), unquote(parsed.password))
    except (AttributeError, TypeError):
        auth = ("", "")

    return auth


def check_header_validity(header):
    """Verifies that header parts don't contain leading whitespace
    reserved characters, or return characters.

    :param header: tuple, in the format (name, value).
    """
    name, value = header
    _validate_header_part(header, name, 0)
    _validate_header_part(header, value, 1)


def _validate_header_part(header, header_part, header_validator_index):
    if isinstance(header_part, str):
        validator = _HEADER_VALIDATORS_STR[header_validator_index]
    elif isinstance(header_part, bytes):
        validator = _HEADER_VALIDATORS_BYTE[header_validator_index]
    else:
        raise InvalidHeader(
            f"Header part ({header_part!r}) from {header} "
            f"must be of type str or bytes, not {type(header_part)}"
        )

    if not validator.match(header_part):
        header_kind = "name" if header_validator_index == 0 else "value"
        raise InvalidHeader(
            f"Invalid leading whitespace, reserved character(s), or return"
            f"character(s) in header {header_kind}: {header_part!r}"
        )


def urldefragauth(url):
    """
    Given a url remove the fragment and the authentication part.

    :rtype: str
    """
    scheme, netloc, path, params, query, fragment = urlparse(url)

    # see func:`prepend_scheme_if_needed`
    if not netloc:
        netloc, path = path, netloc

    netloc = netloc.rsplit("@", 1)[-1]

    return urlunparse((scheme, netloc, path, params, query, ""))


def rewind_body(prepared_request):
    """Move file pointer back to its recorded starting position
    so it can be read again on redirect.
    """
    body_seek = getattr(prepared_request.body, "seek", None)
    if body_seek is not None and isinstance(
        prepared_request._body_position, integer_types
    ):
        try:
            body_seek(prepared_request._body_position)
        except OSError:
            raise UnrewindableBodyError(
                "An error occurred when rewinding request body for redirect."
            )
    else:
        raise UnrewindableBodyError("Unable to rewind request body for redirect.")
python3.12/site-packages/pip/_vendor/webencodings/labels.py000064400000021423151732702660017633 0ustar00"""

    webencodings.labels
    ~~~~~~~~~~~~~~~~~~~

    Map encoding labels to their name.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

# XXX Do not edit!
# This file is automatically generated by mklabels.py

LABELS = {
    'unicode-1-1-utf-8':   'utf-8',
    'utf-8':               'utf-8',
    'utf8':                'utf-8',
    '866':                 'ibm866',
    'cp866':               'ibm866',
    'csibm866':            'ibm866',
    'ibm866':              'ibm866',
    'csisolatin2':         'iso-8859-2',
    'iso-8859-2':          'iso-8859-2',
    'iso-ir-101':          'iso-8859-2',
    'iso8859-2':           'iso-8859-2',
    'iso88592':            'iso-8859-2',
    'iso_8859-2':          'iso-8859-2',
    'iso_8859-2:1987':     'iso-8859-2',
    'l2':                  'iso-8859-2',
    'latin2':              'iso-8859-2',
    'csisolatin3':         'iso-8859-3',
    'iso-8859-3':          'iso-8859-3',
    'iso-ir-109':          'iso-8859-3',
    'iso8859-3':           'iso-8859-3',
    'iso88593':            'iso-8859-3',
    'iso_8859-3':          'iso-8859-3',
    'iso_8859-3:1988':     'iso-8859-3',
    'l3':                  'iso-8859-3',
    'latin3':              'iso-8859-3',
    'csisolatin4':         'iso-8859-4',
    'iso-8859-4':          'iso-8859-4',
    'iso-ir-110':          'iso-8859-4',
    'iso8859-4':           'iso-8859-4',
    'iso88594':            'iso-8859-4',
    'iso_8859-4':          'iso-8859-4',
    'iso_8859-4:1988':     'iso-8859-4',
    'l4':                  'iso-8859-4',
    'latin4':              'iso-8859-4',
    'csisolatincyrillic':  'iso-8859-5',
    'cyrillic':            'iso-8859-5',
    'iso-8859-5':          'iso-8859-5',
    'iso-ir-144':          'iso-8859-5',
    'iso8859-5':           'iso-8859-5',
    'iso88595':            'iso-8859-5',
    'iso_8859-5':          'iso-8859-5',
    'iso_8859-5:1988':     'iso-8859-5',
    'arabic':              'iso-8859-6',
    'asmo-708':            'iso-8859-6',
    'csiso88596e':         'iso-8859-6',
    'csiso88596i':         'iso-8859-6',
    'csisolatinarabic':    'iso-8859-6',
    'ecma-114':            'iso-8859-6',
    'iso-8859-6':          'iso-8859-6',
    'iso-8859-6-e':        'iso-8859-6',
    'iso-8859-6-i':        'iso-8859-6',
    'iso-ir-127':          'iso-8859-6',
    'iso8859-6':           'iso-8859-6',
    'iso88596':            'iso-8859-6',
    'iso_8859-6':          'iso-8859-6',
    'iso_8859-6:1987':     'iso-8859-6',
    'csisolatingreek':     'iso-8859-7',
    'ecma-118':            'iso-8859-7',
    'elot_928':            'iso-8859-7',
    'greek':               'iso-8859-7',
    'greek8':              'iso-8859-7',
    'iso-8859-7':          'iso-8859-7',
    'iso-ir-126':          'iso-8859-7',
    'iso8859-7':           'iso-8859-7',
    'iso88597':            'iso-8859-7',
    'iso_8859-7':          'iso-8859-7',
    'iso_8859-7:1987':     'iso-8859-7',
    'sun_eu_greek':        'iso-8859-7',
    'csiso88598e':         'iso-8859-8',
    'csisolatinhebrew':    'iso-8859-8',
    'hebrew':              'iso-8859-8',
    'iso-8859-8':          'iso-8859-8',
    'iso-8859-8-e':        'iso-8859-8',
    'iso-ir-138':          'iso-8859-8',
    'iso8859-8':           'iso-8859-8',
    'iso88598':            'iso-8859-8',
    'iso_8859-8':          'iso-8859-8',
    'iso_8859-8:1988':     'iso-8859-8',
    'visual':              'iso-8859-8',
    'csiso88598i':         'iso-8859-8-i',
    'iso-8859-8-i':        'iso-8859-8-i',
    'logical':             'iso-8859-8-i',
    'csisolatin6':         'iso-8859-10',
    'iso-8859-10':         'iso-8859-10',
    'iso-ir-157':          'iso-8859-10',
    'iso8859-10':          'iso-8859-10',
    'iso885910':           'iso-8859-10',
    'l6':                  'iso-8859-10',
    'latin6':              'iso-8859-10',
    'iso-8859-13':         'iso-8859-13',
    'iso8859-13':          'iso-8859-13',
    'iso885913':           'iso-8859-13',
    'iso-8859-14':         'iso-8859-14',
    'iso8859-14':          'iso-8859-14',
    'iso885914':           'iso-8859-14',
    'csisolatin9':         'iso-8859-15',
    'iso-8859-15':         'iso-8859-15',
    'iso8859-15':          'iso-8859-15',
    'iso885915':           'iso-8859-15',
    'iso_8859-15':         'iso-8859-15',
    'l9':                  'iso-8859-15',
    'iso-8859-16':         'iso-8859-16',
    'cskoi8r':             'koi8-r',
    'koi':                 'koi8-r',
    'koi8':                'koi8-r',
    'koi8-r':              'koi8-r',
    'koi8_r':              'koi8-r',
    'koi8-u':              'koi8-u',
    'csmacintosh':         'macintosh',
    'mac':                 'macintosh',
    'macintosh':           'macintosh',
    'x-mac-roman':         'macintosh',
    'dos-874':             'windows-874',
    'iso-8859-11':         'windows-874',
    'iso8859-11':          'windows-874',
    'iso885911':           'windows-874',
    'tis-620':             'windows-874',
    'windows-874':         'windows-874',
    'cp1250':              'windows-1250',
    'windows-1250':        'windows-1250',
    'x-cp1250':            'windows-1250',
    'cp1251':              'windows-1251',
    'windows-1251':        'windows-1251',
    'x-cp1251':            'windows-1251',
    'ansi_x3.4-1968':      'windows-1252',
    'ascii':               'windows-1252',
    'cp1252':              'windows-1252',
    'cp819':               'windows-1252',
    'csisolatin1':         'windows-1252',
    'ibm819':              'windows-1252',
    'iso-8859-1':          'windows-1252',
    'iso-ir-100':          'windows-1252',
    'iso8859-1':           'windows-1252',
    'iso88591':            'windows-1252',
    'iso_8859-1':          'windows-1252',
    'iso_8859-1:1987':     'windows-1252',
    'l1':                  'windows-1252',
    'latin1':              'windows-1252',
    'us-ascii':            'windows-1252',
    'windows-1252':        'windows-1252',
    'x-cp1252':            'windows-1252',
    'cp1253':              'windows-1253',
    'windows-1253':        'windows-1253',
    'x-cp1253':            'windows-1253',
    'cp1254':              'windows-1254',
    'csisolatin5':         'windows-1254',
    'iso-8859-9':          'windows-1254',
    'iso-ir-148':          'windows-1254',
    'iso8859-9':           'windows-1254',
    'iso88599':            'windows-1254',
    'iso_8859-9':          'windows-1254',
    'iso_8859-9:1989':     'windows-1254',
    'l5':                  'windows-1254',
    'latin5':              'windows-1254',
    'windows-1254':        'windows-1254',
    'x-cp1254':            'windows-1254',
    'cp1255':              'windows-1255',
    'windows-1255':        'windows-1255',
    'x-cp1255':            'windows-1255',
    'cp1256':              'windows-1256',
    'windows-1256':        'windows-1256',
    'x-cp1256':            'windows-1256',
    'cp1257':              'windows-1257',
    'windows-1257':        'windows-1257',
    'x-cp1257':            'windows-1257',
    'cp1258':              'windows-1258',
    'windows-1258':        'windows-1258',
    'x-cp1258':            'windows-1258',
    'x-mac-cyrillic':      'x-mac-cyrillic',
    'x-mac-ukrainian':     'x-mac-cyrillic',
    'chinese':             'gbk',
    'csgb2312':            'gbk',
    'csiso58gb231280':     'gbk',
    'gb2312':              'gbk',
    'gb_2312':             'gbk',
    'gb_2312-80':          'gbk',
    'gbk':                 'gbk',
    'iso-ir-58':           'gbk',
    'x-gbk':               'gbk',
    'gb18030':             'gb18030',
    'hz-gb-2312':          'hz-gb-2312',
    'big5':                'big5',
    'big5-hkscs':          'big5',
    'cn-big5':             'big5',
    'csbig5':              'big5',
    'x-x-big5':            'big5',
    'cseucpkdfmtjapanese': 'euc-jp',
    'euc-jp':              'euc-jp',
    'x-euc-jp':            'euc-jp',
    'csiso2022jp':         'iso-2022-jp',
    'iso-2022-jp':         'iso-2022-jp',
    'csshiftjis':          'shift_jis',
    'ms_kanji':            'shift_jis',
    'shift-jis':           'shift_jis',
    'shift_jis':           'shift_jis',
    'sjis':                'shift_jis',
    'windows-31j':         'shift_jis',
    'x-sjis':              'shift_jis',
    'cseuckr':             'euc-kr',
    'csksc56011987':       'euc-kr',
    'euc-kr':              'euc-kr',
    'iso-ir-149':          'euc-kr',
    'korean':              'euc-kr',
    'ks_c_5601-1987':      'euc-kr',
    'ks_c_5601-1989':      'euc-kr',
    'ksc5601':             'euc-kr',
    'ksc_5601':            'euc-kr',
    'windows-949':         'euc-kr',
    'csiso2022kr':         'iso-2022-kr',
    'iso-2022-kr':         'iso-2022-kr',
    'utf-16be':            'utf-16be',
    'utf-16':              'utf-16le',
    'utf-16le':            'utf-16le',
    'x-user-defined':      'x-user-defined',
}
python3.12/site-packages/pip/_vendor/webencodings/mklabels.py000064400000002431151732702660020161 0ustar00"""

    webencodings.mklabels
    ~~~~~~~~~~~~~~~~~~~~~

    Regenarate the webencodings.labels module.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

import json
try:
    from urllib import urlopen
except ImportError:
    from urllib.request import urlopen


def assert_lower(string):
    assert string == string.lower()
    return string


def generate(url):
    parts = ['''\
"""

    webencodings.labels
    ~~~~~~~~~~~~~~~~~~~

    Map encoding labels to their name.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

# XXX Do not edit!
# This file is automatically generated by mklabels.py

LABELS = {
''']
    labels = [
        (repr(assert_lower(label)).lstrip('u'),
         repr(encoding['name']).lstrip('u'))
        for category in json.loads(urlopen(url).read().decode('ascii'))
        for encoding in category['encodings']
        for label in encoding['labels']]
    max_len = max(len(label) for label, name in labels)
    parts.extend(
        '    %s:%s %s,\n' % (label, ' ' * (max_len - len(label)), name)
        for label, name in labels)
    parts.append('}')
    return ''.join(parts)


if __name__ == '__main__':
    print(generate('http://encoding.spec.whatwg.org/encodings.json'))
python3.12/site-packages/pip/_vendor/webencodings/__pycache__/__init__.cpython-312.pyc000064400000027403151732702670024476 0ustar00�

R`iS)���dZddlmZddlZddlmZdZddd	d
d�ZiZd�Z	d
�Z
d�ZGd�de�Z
e
d�Ze
d�Ze
d�Zd d�Zd�Zedfd�Zd d�Zd�Zedfd�Zd�ZGd�de�ZGd�de�Zy)!a

    webencodings
    ~~~~~~~~~~~~

    This is a Python implementation of the `WHATWG Encoding standard
    <http://encoding.spec.whatwg.org/>`. See README for details.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

�)�unicode_literalsN�)�LABELSz0.5.1z
iso-8859-8zmac-cyrillicz	mac-roman�cp874)ziso-8859-8-izx-mac-cyrillic�	macintoshzwindows-874c�^�|jd�j�jd�S)a9Transform (only) ASCII letters to lower case: A-Z is mapped to a-z.

    :param string: An Unicode string.
    :returns: A new Unicode string.

    This is used for `ASCII case-insensitive
    <http://encoding.spec.whatwg.org/#ascii-case-insensitive>`_
    matching of encoding labels.
    The same matching is also used, among other things,
    for `CSS keywords <http://dev.w3.org/csswg/css-values/#keywords>`_.

    This is different from the :meth:`~py:str.lower` method of Unicode strings
    which also affect non-ASCII characters,
    sometimes mapping them into the ASCII range:

        >>> keyword = u'Bac\N{KELVIN SIGN}ground'
        >>> assert keyword.lower() == u'background'
        >>> assert ascii_lower(keyword) != keyword.lower()
        >>> assert ascii_lower(keyword) == u'bac\N{KELVIN SIGN}ground'

    �utf8)�encode�lower�decode)�strings ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/webencodings/__init__.py�ascii_lowerr#s'��.�=�=�� �&�&�(�/�/��7�7�c�0�t|jd��}tj|�}|�ytj|�}|�L|dk(rddlm}n+tj||�}tj|�}t||�}|t|<|S)u<
    Look for an encoding by its label.
    This is the spec’s `get an encoding
    <http://encoding.spec.whatwg.org/#concept-encoding-get>`_ algorithm.
    Supported labels are listed there.

    :param label: A string.
    :returns:
        An :class:`Encoding` object, or :obj:`None` for an unknown label.

    z	

 Nzx-user-definedr)�
codec_info)r�stripr�get�CACHE�x_user_definedr�PYTHON_NAMES�codecs�lookup�Encoding)�label�name�encodingr�python_names     rrr=s���
����K�0�1�E��:�:�e��D��|���y�y���H����#�#�2�&�*�*�4��6�K����{�3�J��D�*�-����d���Orc�X�t|d�r|St|�}|�td|z��|S)z�
    Accept either an encoding object or label.

    :param encoding: An :class:`Encoding` object or a label string.
    :returns: An :class:`Encoding` object.
    :raises: :exc:`~exceptions.LookupError` for an unknown label.

    rzUnknown encoding label: %r)�hasattrr�LookupError)�encoding_or_labelrs  r�
_get_encodingr#[s=��� �,�/� � ��'�(�H����6�9J�J�K�K��Orc��eZdZdZd�Zd�Zy)raOReresents a character encoding such as UTF-8,
    that can be used for decoding or encoding.

    .. attribute:: name

        Canonical name of the encoding

    .. attribute:: codec_info

        The actual implementation of the encoding,
        a stdlib :class:`~codecs.CodecInfo` object.
        See :func:`codecs.register`.

    c� �||_||_y�N)rr)�selfrrs   r�__init__zEncoding.__init__|s����	�$��rc� �d|jzS)Nz
<Encoding %s>)r)r's r�__repr__zEncoding.__repr__�s������*�*rN)�__name__�
__module__�__qualname__�__doc__r(r*�rrrrms��
�%�+rrzutf-8zutf-16lezutf-16bec��t|�}t|�\}}|xs|}|jj||�d|fS)a�
    Decode a single string.

    :param input: A byte string
    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :return:
        A ``(output, encoding)`` tuple of an Unicode string
        and an :obj:`Encoding`.

    r)r#�_detect_bomrr)�input�fallback_encoding�errors�bom_encodingrs     rrr�sM�� &�&7�8��%�e�,��L�%��0�0�H����%�%�e�V�4�Q�7��A�Arc��|jd�rt|ddfS|jd�rt|ddfS|jd�rt|ddfSd|fS)zBReturn (bom_encoding, input), with any BOM removed from the input.s���Ns��s�)�
startswith�_UTF16LE�_UTF16BE�UTF8)r2s rr1r1�sh������$���q�r��"�"�����$���q�r��"�"�����(��U�1�2�Y�����;�r�strictc�R�t|�jj||�dS)a;
    Encode a single string.

    :param input: An Unicode string.
    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :return: A byte string.

    r)r#rr
)r2rr4s   rr
r
�s'����"�-�-�4�4�U�F�C�A�F�Frc�P�t||�}t||�}t|�}||fS)a�
    "Pull"-based decoder.

    :param input:
        An iterable of byte strings.

        The input is first consumed just enough to determine the encoding
        based on the precense of a BOM,
        then consumed on demand when the return value is.
    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :returns:
        An ``(output, encoding)`` tuple.
        :obj:`output` is an iterable of Unicode strings,
        :obj:`encoding` is the :obj:`Encoding` that is being used.

    )�IncrementalDecoder�_iter_decode_generator�next)r2r3r4�decoder�	generatorrs      r�iter_decoderE�s1��,!�!2�F�;�G�&�u�g�6�I��I��H��h��rc#�HK�|j}t|�}|D].}||�}|s�|j�J�|j��|��n.|dd��}|j�J�|j��|r|��y|D]}||�}|s�|���|dd��}|r|��yy�w)zqReturn a generator that first yields the :obj:`Encoding`,
    then yields output chukns as Unicode strings.

    NrT��final)r�iterr)r2rCr�chunck�outputs     rrArA�s�����
�^�^�F���K�E���������#�#�/�/�/��"�"�"��L��
���4�(�����+�+�+�������L����������L���C�t�
$�F�
����s�'B"�AB"�
B"c�F�t||�j}t||�S)uY
    “Pull”-based encoder.

    :param input: An iterable of Unicode strings.
    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :returns: An iterable of byte strings.

    )�IncrementalEncoderr
�_iter_encode_generator)r2rr4r
s    r�iter_encoderO�s#�� ��&�
1�
8�
8�F�!�%��0�0rc#�ZK�|D]}||�}|s�|���|dd��}|r|��yy�w)N�TrGr/)r2r
rJrKs    rrNrNs<������������L���B�d�
#�F�
����s�+�+c� �eZdZdZdd�Zdd�Zy)r@uO
    “Push”-based decoder.

    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.

    c�\�t|�|_||_d|_d|_d|_y)Nr)r#�_fallback_encoding�_errors�_buffer�_decoderr)r'r3r4s   rr(zIncrementalDecoder.__init__s.��"/�0A�"B�����������
�
��
rc�B�|j}|�	|||�S|j|z}t|�\}}|�$t|�dkr
|s||_y|j}|j
j
|j�j}||_||_	|||�S)z�Decode one chunk of the input.

        :param input: A byte string.
        :param final:
            Indicate that no more input is available.
            Must be :obj:`True` if this is the last call.
        :returns: An Unicode string.

        r8rQ)
rWrVr1�lenrTr�incrementaldecoderrUrr)r'r2rHrCrs     rrzIncrementalDecoder.decode's����-�-�����5�%�(�(����u�$��%�e�,���%����5�z�A�~�e�$�����2�2���%�%�8�8����F�M�M����
� ��
��u�e�$�$rN��replace)F)r+r,r-r.r(rr/rrr@r@s��	�
�%rr@c��eZdZdZedfd�Zy)rMu�
    “Push”-based encoder.

    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.

    .. method:: encode(input, final=False)

        :param input: An Unicode string.
        :param final:
            Indicate that no more input is available.
            Must be :obj:`True` if this is the last call.
        :returns: A byte string.

    r=c�n�t|�}|jj|�j|_yr&)r#r�incrementalencoderr
)r'rr4s   rr(zIncrementalEncoder.__init__Ts*�� ��*���)�)�<�<�V�D�K�K��rN)r+r,r-r.r<r(r/rrrMrMCs��� !%�X�LrrMr[)r.�
__future__rr�labelsr�VERSIONrrrrr#�objectrr<r:r;rr1r
rErArOrNr@rMr/rr�<module>rds����(�
����
!�$���	��	��8�4�<�$+�v�+�0�g����*����*���B�,� ��G��8�@!%�X�
1� �0%��0%�fL��Lrpython3.12/site-packages/pip/_vendor/webencodings/__pycache__/labels.cpython-312.pyc000064400000016015151732702670024176 0ustar00�

R`i#���dZidd�dd�dd�dd�dd�dd�dd�dd	�d	d	�d
d	�dd	�dd	�d
d	�dd	�dd	�dd	�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d��id#d$�d%d$�d$d$�d&d$�d'd$�d(d$�d)d$�d*d$�d+d,�d-d,�d.d,�d/d,�d0d,�d1d,�d,d,�d2d,�d3d,��id4d,�d5d,�d6d,�d7d,�d8d,�d9d:�d;d:�d<d:�d=d:�d>d:�d:d:�d?d:�d@d:�dAd:�dBd:�dCd:�dDd:��idEdF�dGdF�dHdF�dFdF�dIdF�dJdF�dKdF�dLdF�dMdF�dNdF�dOdF�dPdQ�dQdQ�dRdQ�dSdT�dTdT�dUdT��idVdT�dWdT�dXdT�dYdT�dZdZ�d[dZ�d\dZ�d]d]�d^d]�d_d]�d`da�dada�dbda�dcda�ddda�deda�dfdf��idgdh�didh�djdh�dhdh�dkdh�dldl�dmdn�dodn�dndn�dpdn�dqdr�dsdr�dtdr�dudr�dvdr�drdr�dwdx��idxdx�dydx�dzd{�d{d{�d|d{�d}d~�dd~�d�d~�d�d~�d�d~�d�d~�d�d~�d�d~�d�d~�d�d~�d�d~�d�d~��id�d~�d�d~�d�d~�d~d~�d�d~�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dȓd�dȓd�dȓd�dȓd�dȓd�dȓ�d�d�d�d�d�d�d�d�d�d�dќ
�Zy�)�z�

    webencodings.labels
    ~~~~~~~~~~~~~~~~~~~

    Map encoding labels to their name.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

zunicode-1-1-utf-8zutf-8�utf8�866�ibm866�cp866�csibm866�csisolatin2z
iso-8859-2z
iso-ir-101z	iso8859-2�iso88592z
iso_8859-2ziso_8859-2:1987�l2�latin2�csisolatin3z
iso-8859-3z
iso-ir-109z	iso8859-3�iso88593z
iso_8859-3ziso_8859-3:1988�l3�latin3�csisolatin4z
iso-8859-4z
iso-ir-110z	iso8859-4�iso88594z
iso_8859-4ziso_8859-4:1988�l4�latin4�csisolatincyrillicz
iso-8859-5�cyrillicz
iso-ir-144z	iso8859-5�iso88595z
iso_8859-5ziso_8859-5:1988�arabicz
iso-8859-6zasmo-708�csiso88596e�csiso88596i�csisolatinarabiczecma-114ziso-8859-6-eziso-8859-6-iz
iso-ir-127z	iso8859-6�iso88596z
iso_8859-6ziso_8859-6:1987�csisolatingreekz
iso-8859-7zecma-118�elot_928�greek�greek8z
iso-ir-126z	iso8859-7�iso88597z
iso_8859-7ziso_8859-7:1987�sun_eu_greek�csiso88598ez
iso-8859-8�csisolatinhebrew�hebrewziso-8859-8-ez
iso-ir-138z	iso8859-8�iso88598z
iso_8859-8ziso_8859-8:1988�visual�csiso88598iziso-8859-8-i�logical�csisolatin6ziso-8859-10z
iso-ir-157z
iso8859-10�	iso885910�l6�latin6ziso-8859-13z
iso8859-13�	iso885913ziso-8859-14z
iso8859-14�	iso885914�csisolatin9ziso-8859-15z
iso8859-15�	iso885915ziso_8859-15�l9ziso-8859-16�cskoi8rzkoi8-r�koi�koi8�koi8_rzkoi8-u�csmacintosh�	macintosh�maczx-mac-romanzdos-874zwindows-874ziso-8859-11z
iso8859-11�	iso885911ztis-620�cp1250zwindows-1250zx-cp1250�cp1251zwindows-1251zx-cp1251zansi_x3.4-1968zwindows-1252�ascii�cp1252�cp819�csisolatin1�ibm819z
iso-8859-1z
iso-ir-100z	iso8859-1�iso88591z
iso_8859-1ziso_8859-1:1987�l1�latin1zus-asciizx-cp1252�cp1253zwindows-1253zx-cp1253�cp1254zwindows-1254�csisolatin5z
iso-8859-9z
iso-ir-148z	iso8859-9�iso88599z
iso_8859-9ziso_8859-9:1989�l5�latin5zx-cp1254�cp1255zwindows-1255zx-cp1255�cp1256zwindows-1256zx-cp1256�cp1257zwindows-1257zx-cp1257�cp1258zwindows-1258zx-cp1258zx-mac-cyrilliczx-mac-ukrainian�chinese�gbk�csgb2312�csiso58gb231280�gb2312�gb_2312z
gb_2312-80z	iso-ir-58zx-gbk�gb18030z
hz-gb-2312�big5z
big5-hkscszcn-big5�csbig5zx-x-big5�cseucpkdfmtjapanesezeuc-jpzx-euc-jp�csiso2022jpziso-2022-jp�
csshiftjis�	shift_jis�ms_kanjiz	shift-jis�sjiszwindows-31jzx-sjis�cseuckrzeuc-kr�
csksc56011987z
iso-ir-149�koreanzks_c_5601-1987�iso-2022-kr�utf-16be�utf-16le�x-user-defined)
zks_c_5601-1989�ksc5601�ksc_5601zwindows-949�csiso2022krr_r`zutf-16rarbN)�__doc__�LABELS����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/webencodings/labels.py�<module>rks���
�W
��7�W
��7�W
��7�W
�
�8�	W
�
�8�W
��8�
W
�
�8�W
��<�W
��<�W
��<�W
��<�W
��<�W
��<�W
��<�W
�	�<�W
� 
�<�!W
�"�<�#W
�$�<�%W
�&�<�'W
�(�<�)W
�*�<�+W
�,�<�-W
�.�<�/W
�0	�<�1W
�2
�<�3W
�4�<�5W
�6�<�7W
�8�<�9W
�:�<�;W
�<�<�=W
�>�<�?W
�@�<�AW
�B	�<�CW
�D
�<�EW
�F�<�GW
�H�<�IW
�J�<�KW
�L�<�MW
�N�<�OW
�P�<�QW
�R�<�SW
�T�<�UW
�V
�<�WW
�X�<�YW
�Z�<�[W
�\�<�]W
�^�<�_W
�`�<�aW
�b�<�cW
�d�<�eW
�f�<�gW
�h�<�iW
�j�<�kW
�l�<�mW
�n�<�oW
�p�<�qW
�r�<�sW
�t�<�uW
�v�<�wW
�x�<�yW
�z
�<�{W
�|�<�}W
�~�<�W
�@�<�AW
�B�<�CW
�D�<�EW
�F�<�GW
�H�<�IW
�J�<�KW
�L�<�MW
�N
�<�OW
�P�<�QW
�R�<�SW
�T�<�UW
�V�<�WW
�X�<�YW
�Z�<�[W
�\�<�]W
�^
�<�_W
�`�>�aW
�b�>�cW
�d�>�eW
�f�=�gW
�h�=�iW
�j�=�kW
�l�=�mW
�n�=�oW
�p	�=�qW
�r
�=�sW
�t�=�uW
�v�=�wW
�x�=�yW
�z�=�{W
�|�=�}W
�~�=�W
�@�=�AW
�B�=�CW
�D�=�EW
�F�=�GW
�H�=�IW
�J	�=�KW
�L�=�MW
�N�8�OW
�P
�8�QW
�R�8�SW
�T
�8�UW
�V
�8�WW
�X
�8�YW
�Z�;�[W
�\
�;�]W
�^�;�_W
�`�;�aW
�b�=�cW
�d�=�eW
�f�=�gW
�h�=�iW
�j�=�kW
�l�=�mW
�n
�>�oW
�p�>�qW
�r�>�sW
�t
�>�uW
�v�>�wW
�x�>�yW
�z�>�{W
�|�>�}W
�~
�>�W
�@�>�AW
�B�>�CW
�D
�>�EW
�F�>�GW
�H�>�IW
�J�>�KW
�L�>�MW
�N�>�OW
�P�>�QW
�R	�>�SW
�T
�>�UW
�V�>�WW
�X�>�YW
�Z�>�[W
�\
�>�]W
�^�>�_W
�`�>�aW
�b
�>�cW
�d�>�eW
�f�>�gW
�h�>�iW
�j�>�kW
�l�>�mW
�n�>�oW
�p�>�qW
�r	�>�sW
�t
�>�uW
�v�>�wW
�x�>�yW
�z
�>�{W
�|�>�}W
�~�>�W
�@
�>�AW
�B�>�CW
�D�>�EW
�F
�>�GW
�H�>�IW
�J�>�KW
�L
�>�MW
�N�>�OW
�P�>�QW
�R�+�SW
�T�+�UW
�V�5�WW
�X�5�YW
�Z�5�[W
�\
�5�]W
�^�5�_W
�`�5�aW
�b
�5�cW
�d�5�eW
�f�5�gW
�h�9�iW
�j�<�kW
�l�6�mW
�n�6�oW
�p�6�qW
�r
�6�sW
�t�6�uW
�v�8�wW
�x
�8�yW
�z�8�{W
�|�=�}W
�~�=�W
�@�;�AW
�B�;�CW
�D�;�EW
�F�;�GW
�H�;�IW
�J�;�KW
�L
�;�MW
�N�8�OW
�P�8�QW
�R
�8�SW
�T�8�UW
�V
�8�WW
�X�8�YW
�Z$�#�#�#�(�(�%�%�%�+�mW
�ripython3.12/site-packages/pip/_vendor/webencodings/__pycache__/tests.cpython-312.pyc000064400000022103151732702670024071 0ustar00�

R`i���v�dZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZd�Z
d�Zd�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zy)z�

    webencodings.tests
    ~~~~~~~~~~~~~~~~~~

    A basic test suite for Encoding.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

�)�unicode_literals�)	�lookup�LABELS�decode�encode�iter_decode�iter_encode�IncrementalDecoder�IncrementalEncoder�UTF8c�F�	||i|��td|z��#|$rYywxYw)NzDid not raise %s.)�AssertionError)�	exception�function�args�kwargss    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/webencodings/tests.py�
assert_raisesrs;��>��$�!�&�!��0�9�<�=�=������s�� � c��td�jdk(sJ�td�jdk(sJ�td�jdk(sJ�td�jdk(sJ�td�jdk(sJ�td�jdk(sJ�td�jdk(sJ�td��J�td��J�td	�jd
k(sJ�td�jd
k(sJ�td�jd
k(sJ�td
�jd
k(sJ�td��J�td��J�y)Nzutf-8zUtf-8zUTF-8�utf8zutf8 z 
utf8	�u8uutf-8 zUS-ASCIIzwindows-1252z
iso-8859-1�latin1�LATIN1zlatin-1uLATİN1)r�name��r�test_labelsrsR���'�?���7�*�*�*��'�?���7�*�*�*��'�?���7�*�*�*��&�>���'�)�)�)��&�>���'�)�)�)��'�?���7�*�*�*��-� �%�%��0�0�0��$�<�����)��$�$�$��*��"�"�n�4�4�4��,��$�$��6�6�6��(�� � �N�2�2�2��(�� � �N�2�2�2��)��$�$�$��)��$�$�$rc�`�tD]�}td|�dt|�fk(sJ�td|�dk(sJ�dD]C}t	dg|z|�\}}t|�gk(sJ�tt
dg|z|��gk(r�CJ�t|�}|jd�dk(sJ�|jdd��dk(sJ�t|�}|jd�dk(sJ�|jdd��dk(r��J�ttj��D]}t|�j|k(r�J�y)Nr�)rr�T)�final)rrrrr	�listr
rr�set�valuesr)�label�repeat�output�_�decoder�encoderrs       r�test_all_labelsr,0s:�����c�5�!�b�&��-�%8�8�8�8��b�%� �C�'�'�'� �F�#�S�E�F�N�E�:�I�F�A���<�2�%�%�%���R�D�6�M�5�9�:�b�@�@�@�!�%�U�+���~�~�c�"�b�(�(�(��~�~�c��~�.�"�4�4�4�$�U�+���~�~�b�!�S�(�(�(��~�~�b��~�-��4�4�4���F�M�M�O�$���d�|� � �D�(�(�(�%rc��tttdd�tttdd�tttgd�ttt
gd�tttd�tttd�y)N�é�invalid�é)r�LookupErrorrrr	r
rrrrr�test_invalid_labelr2CsU���+�v�'>�	�J��+�v�t�Y�7��+�{�B�	�:��+�{�B�	�:��+�1�9�=��+�1�9�=rc��tdd�dtd�fk(sJ�tdtd��dtd�fk(sJ�tdd�dtd�fk(sJ�tdt�dtd�fk(sJ�tdd�dtd�fk(sJ�td	d�dtd�fk(sJ�td
d�dtd�fk(sJ�tdd�dtd
�fk(sJ�tdd�dtd�fk(sJ�tdd�dtd
�fk(sJ�tdd�dtd�fk(sJ�tdd�dtd
�fk(sJ�tdd�dtd
�fk(sJ�tdd�dtd�fk(sJ�tdd�dtd
�fk(sJ�tdd�dtd
�fk(sJ�y)N��ru€�érr0�ascii�ér.����utf-16be�����utf-16les���us�����zUTF-16BE��zUTF-16LEzUTF-16)rrr
rrr�test_decoder>Ls����'�8�$���x�0@�(A�A�A�A��'�6�(�+�,���x�8H�0I�I�I�I��+�v�&�4����*@�@�@�@��+�t�$��v�f�~�(>�>�>�>��+�w�'�F�F�7�O�+D�D�D�D��)�7�3��f�V�n�7M�M�M�M��%�w�/�D�&��:L�3M�M�M�M��%�w�/�D�&��:L�3M�M�M�M��%�w�/�H�f�Z�>P�3Q�Q�Q�Q��%�w�/�H�f�Z�>P�3Q�Q�Q�Q��+�z�*�t�V�J�5G�.H�H�H�H��+�z�*�t�V�J�5G�.H�H�H�H��+�x�(�T�6�*�3E�,F�F�F�F��+�z�*�x��
�9K�.L�L�L�L��+�z�*�x��
�9K�.L�L�L�L��+�x�(�X�v�j�7I�,J�J�J�Jrc���tdd�dk(sJ�tdd�dk(sJ�tdd�dk(sJ�tdd�dk(sJ�tdd�dk(sJ�tdd	�d
k(sJ�y)Nr0r��rr5�utf-16r=r;r9r<)rrrr�test_encoderBbs����$��!�W�,�,�,��$���;�.�.�.��$���;�.�.�.��$��!�[�0�0�0��$�
�#�{�2�2�2��$�
�#�{�2�2�2rc��d�}|gd�dk(sJ�|dgd�dk(sJ�|dgd�dk(sJ�|dgd�dk(sJ�|d	d
gd�dk(sJ�|ddgd�dk(sJ�|d
gd�dk(sJ�|dgd�dk(sJ�|gd�d�dk(sJ�|gd�d�dk(sJ�|gd�d�dk(sJ�|dgd�dk(sJ�|dgd�dk(sJ�|dgd�dk(sJ�|dgd�dk(sJ�|gd�d�dk(sJ�|gd�d�dk(sJ�y)Nc�B�t||�\}}dj|�S)Nr )r	�join)�input�fallback_encodingr(�	_encodings    r�iter_decode_to_stringz/test_iter_decode.<locals>.iter_decode_to_stringls"��'��/@�A���	��w�w�v��rrr rr@r0shello�helloshe�lloshell�or5r7r.)�����)rM�arNua�)r��rrs���rOrMs�uï»r8r:)r��rrs���)rsh�rK�x-user-defineduhllor)rIs r�test_iter_decoderUks����!��X�.�"�4�4�4� �#���1�R�7�7�7� �'��H�5��=�=�=� �(��X�6�'�A�A�A� �%���(�;�w�F�F�F� �'�4��(�;�w�F�F�F� �+���9�V�C�C�C� �"9�!:�H�E��M�M�M� �"+�,4�6�9=�>�>�>� �"(�)1�3�6?�@�@�@� �":�;C�E�HL�M�M�M� �/�!2�H�=��C�C�C� �+���9�V�C�C�C� �"5�!6��A�T�I�I�I� �"5�!6��A�T�I�I�I� �"6�7?�A�DH�I�I�I� �"� 0�2�5A�B�B�Brc��djtgd��dk(sJ�djtdgd��dk(sJ�djtdgd��dk(sJ�djtgd�d��dk(sJ�djtgd�d��dk(sJ�djtgd�d	��dk(sJ�djtgd�d
��dk(sJ�djtgd�d
��dk(sJ�y)Nrrr r0r@)r r0r r rAr=r;r9r<)r uhr �llorTsh�llo)rEr
rrr�test_iter_encoderX�s���8�8�K��H�-�.�#�5�5�5��8�8�K���h�/�0�C�7�7�7��8�8�K����1�2�g�=�=�=��8�8�K� 2�H�=�>�'�I�I�I��8�8�K� 2�H�=�>�+�M�M�M��8�8�K� 2�J�?�@�K�O�O�O��8�8�K� 2�J�?�@�K�O�O�O��8�8�K�!"�#3�5�6�9D�E�E�Erc�n�d}d}d}d}t|d�|td�fk(sJ�t|d�|k(sJ�y)Ns2,O�#�ɻtϨ�u2,O#tsaa�aarT)rrr)�encoded�decodeds  r�test_x_user_definedr]�sM��B�G�O�G��G��G��'�+�,��&�AQ�:R�0S�S�S�S��'�+�,��7�7�7rN)�__doc__�
__future__rr rrrrr	r
rrr
rrr,r2r>rBrUrXr]rrr�<module>r`sN��
�(�=�=�=�>�%�&)�&>�K�,3�B�8	E�8rpython3.12/site-packages/pip/_vendor/webencodings/__pycache__/x_user_defined.cpython-312.pyc000064400000006420151732702670025716 0ustar00�

R`i��	��dZddlmZddlZGd�dej�ZGd�dej
�ZGd�d	ej�ZGd
�deej�ZGd�d
eej�Zejde�je�jeeee��ZdZ
eje
�Zy)z�

    webencodings.x_user_defined
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    An implementation of the x-user-defined encoding.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

�)�unicode_literalsNc��eZdZdd�Zdd�Zy)�Codecc�8�tj||t�S�N)�codecs�charmap_encode�encoding_table��self�input�errorss   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/webencodings/x_user_defined.py�encodezCodec.encode����$�$�U�F�N�C�C�c�8�tj||t�Sr)r�charmap_decode�decoding_tablers   r�decodezCodec.decoderrN)�strict)�__name__�
__module__�__qualname__rr�rrrrs��D�Drrc��eZdZdd�Zy)�IncrementalEncoderc�R�tj||jt�dS�Nr)rr	rr
�rr
�finals   rrzIncrementalEncoder.encode� ���$�$�U�D�K�K��H��K�KrN�F)rrrrrrrrr���Lrrc��eZdZdd�Zy)�IncrementalDecoderc�R�tj||jt�dSr)rrrrr s   rrzIncrementalDecoder.decode$r"rNr#)rrrrrrrr&r&#r$rr&c��eZdZy)�StreamWriterN�rrrrrrr)r)(���rr)c��eZdZy)�StreamReaderNr*rrrr-r-,r+rr-zx-user-defined)�namerr�incrementalencoder�incrementaldecoder�streamreader�streamwriteru	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)�__doc__�
__future__rrrrr&r)r-�	CodecInforr�
codec_infor�
charmap_buildr
rrr�<module>r8s���
�(�
�
D�F�L�L�D�L��2�2�L�
L��2�2�L�
	�5�&�-�-�	�	�5�&�-�-�	��V�
�
�	��7�>�>��7�>�>�)�)����
� 
��H&��%�%�n�5�rpython3.12/site-packages/pip/_vendor/webencodings/__pycache__/mklabels.cpython-312.pyc000064400000005254151732702670024531 0ustar00�

R`i��t�dZddlZ	ddlmZd�Zd�Zedk(re	ed��yy#e$r	ddlmZY�(wxYw)z�

    webencodings.mklabels
    ~~~~~~~~~~~~~~~~~~~~~

    Regenarate the webencodings.labels module.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

�N)�urlopenc�0�||j�k(sJ�|S�N)�lower)�strings ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/webencodings/mklabels.py�assert_lowerr	s���V�\�\�^�#�#�#��M�c����dg}tjt|�j�j	d��D���cgc]V}|dD]L}|dD]B}tt
|��jd�t|d�jd�f��D�N�X}}}}td�|D���|j�fd�|D��|jd	�d
j|�Scc}}}w)Na"""

    webencodings.labels
    ~~~~~~~~~~~~~~~~~~~

    Map encoding labels to their name.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

# XXX Do not edit!
# This file is automatically generated by mklabels.py

LABELS = {
�ascii�	encodings�labels�u�namec3�8K�|]\}}t|����y�wr��len)�.0�labelrs   r�	<genexpr>zgenerate.<locals>.<genexpr>2s����7�����#�e�*��s�c	3�Z�K�|]"\}}d|�dd�t|�z
z�d|�d����$y�w)z    �:� z,
Nr)rrr�max_lens   �rrzgenerate.<locals>.<genexpr>3s2�����#�!�K�E�4�#�C�7�S��Z�+?�$@�$�G�!�s�(+�}�)�json�loadsr�read�decode�reprr	�lstrip�max�extend�append�join)�url�parts�category�encodingrrrs      @r�generater+s�����
�E�*�
�
�7�3�<�#4�#4�#6�#=�#=�g�#F�G�)�H�H� ��-�H��h�'�E�	
�l�5�!�	"�	)�	)�#�	.�	
�h�v��	�	&�	&�s�	+�	-�(�		-�.�	-�G��)��7��7�7�G�	�L�L�#�!�#�#�
�L�L���
�7�7�5�>���)s�AC1�__main__z.http://encoding.spec.whatwg.org/encodings.json)
�__doc__r�urllibr�ImportError�urllib.requestr	r+�__name__�print�r
r�<module>r4sT��
��'��
�
�B�z��	�(�C�
D�E���U�'�&�'�s�)�7�7python3.12/site-packages/pip/_vendor/webencodings/x_user_defined.py000064400000010323151732702700021344 0ustar00# coding: utf-8
"""

    webencodings.x_user_defined
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    An implementation of the x-user-defined encoding.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

from __future__ import unicode_literals

import codecs


### Codec APIs

class Codec(codecs.Codec):

    def encode(self, input, errors='strict'):
        return codecs.charmap_encode(input, errors, encoding_table)

    def decode(self, input, errors='strict'):
        return codecs.charmap_decode(input, errors, decoding_table)


class IncrementalEncoder(codecs.IncrementalEncoder):
    def encode(self, input, final=False):
        return codecs.charmap_encode(input, self.errors, encoding_table)[0]


class IncrementalDecoder(codecs.IncrementalDecoder):
    def decode(self, input, final=False):
        return codecs.charmap_decode(input, self.errors, decoding_table)[0]


class StreamWriter(Codec, codecs.StreamWriter):
    pass


class StreamReader(Codec, codecs.StreamReader):
    pass


### encodings module API

codec_info = codecs.CodecInfo(
    name='x-user-defined',
    encode=Codec().encode,
    decode=Codec().decode,
    incrementalencoder=IncrementalEncoder,
    incrementaldecoder=IncrementalDecoder,
    streamreader=StreamReader,
    streamwriter=StreamWriter,
)


### Decoding Table

# Python 3:
# for c in range(256): print('    %r' % chr(c if c < 128 else c + 0xF700))
decoding_table = (
    '\x00'
    '\x01'
    '\x02'
    '\x03'
    '\x04'
    '\x05'
    '\x06'
    '\x07'
    '\x08'
    '\t'
    '\n'
    '\x0b'
    '\x0c'
    '\r'
    '\x0e'
    '\x0f'
    '\x10'
    '\x11'
    '\x12'
    '\x13'
    '\x14'
    '\x15'
    '\x16'
    '\x17'
    '\x18'
    '\x19'
    '\x1a'
    '\x1b'
    '\x1c'
    '\x1d'
    '\x1e'
    '\x1f'
    ' '
    '!'
    '"'
    '#'
    '$'
    '%'
    '&'
    "'"
    '('
    ')'
    '*'
    '+'
    ','
    '-'
    '.'
    '/'
    '0'
    '1'
    '2'
    '3'
    '4'
    '5'
    '6'
    '7'
    '8'
    '9'
    ':'
    ';'
    '<'
    '='
    '>'
    '?'
    '@'
    'A'
    'B'
    'C'
    'D'
    'E'
    'F'
    'G'
    'H'
    'I'
    'J'
    'K'
    'L'
    'M'
    'N'
    'O'
    'P'
    'Q'
    'R'
    'S'
    'T'
    'U'
    'V'
    'W'
    'X'
    'Y'
    'Z'
    '['
    '\\'
    ']'
    '^'
    '_'
    '`'
    'a'
    'b'
    'c'
    'd'
    'e'
    'f'
    'g'
    'h'
    'i'
    'j'
    'k'
    'l'
    'm'
    'n'
    'o'
    'p'
    'q'
    'r'
    's'
    't'
    'u'
    'v'
    'w'
    'x'
    'y'
    'z'
    '{'
    '|'
    '}'
    '~'
    '\x7f'
    '\uf780'
    '\uf781'
    '\uf782'
    '\uf783'
    '\uf784'
    '\uf785'
    '\uf786'
    '\uf787'
    '\uf788'
    '\uf789'
    '\uf78a'
    '\uf78b'
    '\uf78c'
    '\uf78d'
    '\uf78e'
    '\uf78f'
    '\uf790'
    '\uf791'
    '\uf792'
    '\uf793'
    '\uf794'
    '\uf795'
    '\uf796'
    '\uf797'
    '\uf798'
    '\uf799'
    '\uf79a'
    '\uf79b'
    '\uf79c'
    '\uf79d'
    '\uf79e'
    '\uf79f'
    '\uf7a0'
    '\uf7a1'
    '\uf7a2'
    '\uf7a3'
    '\uf7a4'
    '\uf7a5'
    '\uf7a6'
    '\uf7a7'
    '\uf7a8'
    '\uf7a9'
    '\uf7aa'
    '\uf7ab'
    '\uf7ac'
    '\uf7ad'
    '\uf7ae'
    '\uf7af'
    '\uf7b0'
    '\uf7b1'
    '\uf7b2'
    '\uf7b3'
    '\uf7b4'
    '\uf7b5'
    '\uf7b6'
    '\uf7b7'
    '\uf7b8'
    '\uf7b9'
    '\uf7ba'
    '\uf7bb'
    '\uf7bc'
    '\uf7bd'
    '\uf7be'
    '\uf7bf'
    '\uf7c0'
    '\uf7c1'
    '\uf7c2'
    '\uf7c3'
    '\uf7c4'
    '\uf7c5'
    '\uf7c6'
    '\uf7c7'
    '\uf7c8'
    '\uf7c9'
    '\uf7ca'
    '\uf7cb'
    '\uf7cc'
    '\uf7cd'
    '\uf7ce'
    '\uf7cf'
    '\uf7d0'
    '\uf7d1'
    '\uf7d2'
    '\uf7d3'
    '\uf7d4'
    '\uf7d5'
    '\uf7d6'
    '\uf7d7'
    '\uf7d8'
    '\uf7d9'
    '\uf7da'
    '\uf7db'
    '\uf7dc'
    '\uf7dd'
    '\uf7de'
    '\uf7df'
    '\uf7e0'
    '\uf7e1'
    '\uf7e2'
    '\uf7e3'
    '\uf7e4'
    '\uf7e5'
    '\uf7e6'
    '\uf7e7'
    '\uf7e8'
    '\uf7e9'
    '\uf7ea'
    '\uf7eb'
    '\uf7ec'
    '\uf7ed'
    '\uf7ee'
    '\uf7ef'
    '\uf7f0'
    '\uf7f1'
    '\uf7f2'
    '\uf7f3'
    '\uf7f4'
    '\uf7f5'
    '\uf7f6'
    '\uf7f7'
    '\uf7f8'
    '\uf7f9'
    '\uf7fa'
    '\uf7fb'
    '\uf7fc'
    '\uf7fd'
    '\uf7fe'
    '\uf7ff'
)

### Encoding table
encoding_table = codecs.charmap_build(decoding_table)
python3.12/site-packages/pip/_vendor/webencodings/__init__.py000064400000024523151732702700020127 0ustar00# coding: utf-8
"""

    webencodings
    ~~~~~~~~~~~~

    This is a Python implementation of the `WHATWG Encoding standard
    <http://encoding.spec.whatwg.org/>`. See README for details.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

from __future__ import unicode_literals

import codecs

from .labels import LABELS


VERSION = '0.5.1'


# Some names in Encoding are not valid Python aliases. Remap these.
PYTHON_NAMES = {
    'iso-8859-8-i': 'iso-8859-8',
    'x-mac-cyrillic': 'mac-cyrillic',
    'macintosh': 'mac-roman',
    'windows-874': 'cp874'}

CACHE = {}


def ascii_lower(string):
    r"""Transform (only) ASCII letters to lower case: A-Z is mapped to a-z.

    :param string: An Unicode string.
    :returns: A new Unicode string.

    This is used for `ASCII case-insensitive
    <http://encoding.spec.whatwg.org/#ascii-case-insensitive>`_
    matching of encoding labels.
    The same matching is also used, among other things,
    for `CSS keywords <http://dev.w3.org/csswg/css-values/#keywords>`_.

    This is different from the :meth:`~py:str.lower` method of Unicode strings
    which also affect non-ASCII characters,
    sometimes mapping them into the ASCII range:

        >>> keyword = u'Bac\N{KELVIN SIGN}ground'
        >>> assert keyword.lower() == u'background'
        >>> assert ascii_lower(keyword) != keyword.lower()
        >>> assert ascii_lower(keyword) == u'bac\N{KELVIN SIGN}ground'

    """
    # This turns out to be faster than unicode.translate()
    return string.encode('utf8').lower().decode('utf8')


def lookup(label):
    """
    Look for an encoding by its label.
    This is the spec’s `get an encoding
    <http://encoding.spec.whatwg.org/#concept-encoding-get>`_ algorithm.
    Supported labels are listed there.

    :param label: A string.
    :returns:
        An :class:`Encoding` object, or :obj:`None` for an unknown label.

    """
    # Only strip ASCII whitespace: U+0009, U+000A, U+000C, U+000D, and U+0020.
    label = ascii_lower(label.strip('\t\n\f\r '))
    name = LABELS.get(label)
    if name is None:
        return None
    encoding = CACHE.get(name)
    if encoding is None:
        if name == 'x-user-defined':
            from .x_user_defined import codec_info
        else:
            python_name = PYTHON_NAMES.get(name, name)
            # Any python_name value that gets to here should be valid.
            codec_info = codecs.lookup(python_name)
        encoding = Encoding(name, codec_info)
        CACHE[name] = encoding
    return encoding


def _get_encoding(encoding_or_label):
    """
    Accept either an encoding object or label.

    :param encoding: An :class:`Encoding` object or a label string.
    :returns: An :class:`Encoding` object.
    :raises: :exc:`~exceptions.LookupError` for an unknown label.

    """
    if hasattr(encoding_or_label, 'codec_info'):
        return encoding_or_label

    encoding = lookup(encoding_or_label)
    if encoding is None:
        raise LookupError('Unknown encoding label: %r' % encoding_or_label)
    return encoding


class Encoding(object):
    """Reresents a character encoding such as UTF-8,
    that can be used for decoding or encoding.

    .. attribute:: name

        Canonical name of the encoding

    .. attribute:: codec_info

        The actual implementation of the encoding,
        a stdlib :class:`~codecs.CodecInfo` object.
        See :func:`codecs.register`.

    """
    def __init__(self, name, codec_info):
        self.name = name
        self.codec_info = codec_info

    def __repr__(self):
        return '<Encoding %s>' % self.name


#: The UTF-8 encoding. Should be used for new content and formats.
UTF8 = lookup('utf-8')

_UTF16LE = lookup('utf-16le')
_UTF16BE = lookup('utf-16be')


def decode(input, fallback_encoding, errors='replace'):
    """
    Decode a single string.

    :param input: A byte string
    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :return:
        A ``(output, encoding)`` tuple of an Unicode string
        and an :obj:`Encoding`.

    """
    # Fail early if `encoding` is an invalid label.
    fallback_encoding = _get_encoding(fallback_encoding)
    bom_encoding, input = _detect_bom(input)
    encoding = bom_encoding or fallback_encoding
    return encoding.codec_info.decode(input, errors)[0], encoding


def _detect_bom(input):
    """Return (bom_encoding, input), with any BOM removed from the input."""
    if input.startswith(b'\xFF\xFE'):
        return _UTF16LE, input[2:]
    if input.startswith(b'\xFE\xFF'):
        return _UTF16BE, input[2:]
    if input.startswith(b'\xEF\xBB\xBF'):
        return UTF8, input[3:]
    return None, input


def encode(input, encoding=UTF8, errors='strict'):
    """
    Encode a single string.

    :param input: An Unicode string.
    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :return: A byte string.

    """
    return _get_encoding(encoding).codec_info.encode(input, errors)[0]


def iter_decode(input, fallback_encoding, errors='replace'):
    """
    "Pull"-based decoder.

    :param input:
        An iterable of byte strings.

        The input is first consumed just enough to determine the encoding
        based on the precense of a BOM,
        then consumed on demand when the return value is.
    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :returns:
        An ``(output, encoding)`` tuple.
        :obj:`output` is an iterable of Unicode strings,
        :obj:`encoding` is the :obj:`Encoding` that is being used.

    """

    decoder = IncrementalDecoder(fallback_encoding, errors)
    generator = _iter_decode_generator(input, decoder)
    encoding = next(generator)
    return generator, encoding


def _iter_decode_generator(input, decoder):
    """Return a generator that first yields the :obj:`Encoding`,
    then yields output chukns as Unicode strings.

    """
    decode = decoder.decode
    input = iter(input)
    for chunck in input:
        output = decode(chunck)
        if output:
            assert decoder.encoding is not None
            yield decoder.encoding
            yield output
            break
    else:
        # Input exhausted without determining the encoding
        output = decode(b'', final=True)
        assert decoder.encoding is not None
        yield decoder.encoding
        if output:
            yield output
        return

    for chunck in input:
        output = decode(chunck)
        if output:
            yield output
    output = decode(b'', final=True)
    if output:
        yield output


def iter_encode(input, encoding=UTF8, errors='strict'):
    """
    “Pull”-based encoder.

    :param input: An iterable of Unicode strings.
    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
    :returns: An iterable of byte strings.

    """
    # Fail early if `encoding` is an invalid label.
    encode = IncrementalEncoder(encoding, errors).encode
    return _iter_encode_generator(input, encode)


def _iter_encode_generator(input, encode):
    for chunck in input:
        output = encode(chunck)
        if output:
            yield output
    output = encode('', final=True)
    if output:
        yield output


class IncrementalDecoder(object):
    """
    “Push”-based decoder.

    :param fallback_encoding:
        An :class:`Encoding` object or a label string.
        The encoding to use if :obj:`input` does note have a BOM.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.

    """
    def __init__(self, fallback_encoding, errors='replace'):
        # Fail early if `encoding` is an invalid label.
        self._fallback_encoding = _get_encoding(fallback_encoding)
        self._errors = errors
        self._buffer = b''
        self._decoder = None
        #: The actual :class:`Encoding` that is being used,
        #: or :obj:`None` if that is not determined yet.
        #: (Ie. if there is not enough input yet to determine
        #: if there is a BOM.)
        self.encoding = None  # Not known yet.

    def decode(self, input, final=False):
        """Decode one chunk of the input.

        :param input: A byte string.
        :param final:
            Indicate that no more input is available.
            Must be :obj:`True` if this is the last call.
        :returns: An Unicode string.

        """
        decoder = self._decoder
        if decoder is not None:
            return decoder(input, final)

        input = self._buffer + input
        encoding, input = _detect_bom(input)
        if encoding is None:
            if len(input) < 3 and not final:  # Not enough data yet.
                self._buffer = input
                return ''
            else:  # No BOM
                encoding = self._fallback_encoding
        decoder = encoding.codec_info.incrementaldecoder(self._errors).decode
        self._decoder = decoder
        self.encoding = encoding
        return decoder(input, final)


class IncrementalEncoder(object):
    """
    “Push”-based encoder.

    :param encoding: An :class:`Encoding` object or a label string.
    :param errors: Type of error handling. See :func:`codecs.register`.
    :raises: :exc:`~exceptions.LookupError` for an unknown encoding label.

    .. method:: encode(input, final=False)

        :param input: An Unicode string.
        :param final:
            Indicate that no more input is available.
            Must be :obj:`True` if this is the last call.
        :returns: A byte string.

    """
    def __init__(self, encoding=UTF8, errors='strict'):
        encoding = _get_encoding(encoding)
        self.encode = encoding.codec_info.incrementalencoder(errors).encode
python3.12/site-packages/pip/_vendor/webencodings/tests.py000064400000014643151732702700017534 0ustar00# coding: utf-8
"""

    webencodings.tests
    ~~~~~~~~~~~~~~~~~~

    A basic test suite for Encoding.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

from __future__ import unicode_literals

from . import (lookup, LABELS, decode, encode, iter_decode, iter_encode,
               IncrementalDecoder, IncrementalEncoder, UTF8)


def assert_raises(exception, function, *args, **kwargs):
    try:
        function(*args, **kwargs)
    except exception:
        return
    else:  # pragma: no cover
        raise AssertionError('Did not raise %s.' % exception)


def test_labels():
    assert lookup('utf-8').name == 'utf-8'
    assert lookup('Utf-8').name == 'utf-8'
    assert lookup('UTF-8').name == 'utf-8'
    assert lookup('utf8').name == 'utf-8'
    assert lookup('utf8').name == 'utf-8'
    assert lookup('utf8 ').name == 'utf-8'
    assert lookup(' \r\nutf8\t').name == 'utf-8'
    assert lookup('u8') is None  # Python label.
    assert lookup('utf-8 ') is None  # Non-ASCII white space.

    assert lookup('US-ASCII').name == 'windows-1252'
    assert lookup('iso-8859-1').name == 'windows-1252'
    assert lookup('latin1').name == 'windows-1252'
    assert lookup('LATIN1').name == 'windows-1252'
    assert lookup('latin-1') is None
    assert lookup('LATİN1') is None  # ASCII-only case insensitivity.


def test_all_labels():
    for label in LABELS:
        assert decode(b'', label) == ('', lookup(label))
        assert encode('', label) == b''
        for repeat in [0, 1, 12]:
            output, _ = iter_decode([b''] * repeat, label)
            assert list(output) == []
            assert list(iter_encode([''] * repeat, label)) == []
        decoder = IncrementalDecoder(label)
        assert decoder.decode(b'') == ''
        assert decoder.decode(b'', final=True) == ''
        encoder = IncrementalEncoder(label)
        assert encoder.encode('') == b''
        assert encoder.encode('', final=True) == b''
    # All encoding names are valid labels too:
    for name in set(LABELS.values()):
        assert lookup(name).name == name


def test_invalid_label():
    assert_raises(LookupError, decode, b'\xEF\xBB\xBF\xc3\xa9', 'invalid')
    assert_raises(LookupError, encode, 'é', 'invalid')
    assert_raises(LookupError, iter_decode, [], 'invalid')
    assert_raises(LookupError, iter_encode, [], 'invalid')
    assert_raises(LookupError, IncrementalDecoder, 'invalid')
    assert_raises(LookupError, IncrementalEncoder, 'invalid')


def test_decode():
    assert decode(b'\x80', 'latin1') == ('€', lookup('latin1'))
    assert decode(b'\x80', lookup('latin1')) == ('€', lookup('latin1'))
    assert decode(b'\xc3\xa9', 'utf8') == ('é', lookup('utf8'))
    assert decode(b'\xc3\xa9', UTF8) == ('é', lookup('utf8'))
    assert decode(b'\xc3\xa9', 'ascii') == ('é', lookup('ascii'))
    assert decode(b'\xEF\xBB\xBF\xc3\xa9', 'ascii') == ('é', lookup('utf8'))  # UTF-8 with BOM

    assert decode(b'\xFE\xFF\x00\xe9', 'ascii') == ('é', lookup('utf-16be'))  # UTF-16-BE with BOM
    assert decode(b'\xFF\xFE\xe9\x00', 'ascii') == ('é', lookup('utf-16le'))  # UTF-16-LE with BOM
    assert decode(b'\xFE\xFF\xe9\x00', 'ascii') == ('\ue900', lookup('utf-16be'))
    assert decode(b'\xFF\xFE\x00\xe9', 'ascii') == ('\ue900', lookup('utf-16le'))

    assert decode(b'\x00\xe9', 'UTF-16BE') == ('é', lookup('utf-16be'))
    assert decode(b'\xe9\x00', 'UTF-16LE') == ('é', lookup('utf-16le'))
    assert decode(b'\xe9\x00', 'UTF-16') == ('é', lookup('utf-16le'))

    assert decode(b'\xe9\x00', 'UTF-16BE') == ('\ue900', lookup('utf-16be'))
    assert decode(b'\x00\xe9', 'UTF-16LE') == ('\ue900', lookup('utf-16le'))
    assert decode(b'\x00\xe9', 'UTF-16') == ('\ue900', lookup('utf-16le'))


def test_encode():
    assert encode('é', 'latin1') == b'\xe9'
    assert encode('é', 'utf8') == b'\xc3\xa9'
    assert encode('é', 'utf8') == b'\xc3\xa9'
    assert encode('é', 'utf-16') == b'\xe9\x00'
    assert encode('é', 'utf-16le') == b'\xe9\x00'
    assert encode('é', 'utf-16be') == b'\x00\xe9'


def test_iter_decode():
    def iter_decode_to_string(input, fallback_encoding):
        output, _encoding = iter_decode(input, fallback_encoding)
        return ''.join(output)
    assert iter_decode_to_string([], 'latin1') == ''
    assert iter_decode_to_string([b''], 'latin1') == ''
    assert iter_decode_to_string([b'\xe9'], 'latin1') == 'é'
    assert iter_decode_to_string([b'hello'], 'latin1') == 'hello'
    assert iter_decode_to_string([b'he', b'llo'], 'latin1') == 'hello'
    assert iter_decode_to_string([b'hell', b'o'], 'latin1') == 'hello'
    assert iter_decode_to_string([b'\xc3\xa9'], 'latin1') == 'é'
    assert iter_decode_to_string([b'\xEF\xBB\xBF\xc3\xa9'], 'latin1') == 'é'
    assert iter_decode_to_string([
        b'\xEF\xBB\xBF', b'\xc3', b'\xa9'], 'latin1') == 'é'
    assert iter_decode_to_string([
        b'\xEF\xBB\xBF', b'a', b'\xc3'], 'latin1') == 'a\uFFFD'
    assert iter_decode_to_string([
        b'', b'\xEF', b'', b'', b'\xBB\xBF\xc3', b'\xa9'], 'latin1') == 'é'
    assert iter_decode_to_string([b'\xEF\xBB\xBF'], 'latin1') == ''
    assert iter_decode_to_string([b'\xEF\xBB'], 'latin1') == 'ï»'
    assert iter_decode_to_string([b'\xFE\xFF\x00\xe9'], 'latin1') == 'é'
    assert iter_decode_to_string([b'\xFF\xFE\xe9\x00'], 'latin1') == 'é'
    assert iter_decode_to_string([
        b'', b'\xFF', b'', b'', b'\xFE\xe9', b'\x00'], 'latin1') == 'é'
    assert iter_decode_to_string([
        b'', b'h\xe9', b'llo'], 'x-user-defined') == 'h\uF7E9llo'


def test_iter_encode():
    assert b''.join(iter_encode([], 'latin1')) == b''
    assert b''.join(iter_encode([''], 'latin1')) == b''
    assert b''.join(iter_encode(['é'], 'latin1')) == b'\xe9'
    assert b''.join(iter_encode(['', 'é', '', ''], 'latin1')) == b'\xe9'
    assert b''.join(iter_encode(['', 'é', '', ''], 'utf-16')) == b'\xe9\x00'
    assert b''.join(iter_encode(['', 'é', '', ''], 'utf-16le')) == b'\xe9\x00'
    assert b''.join(iter_encode(['', 'é', '', ''], 'utf-16be')) == b'\x00\xe9'
    assert b''.join(iter_encode([
        '', 'h\uF7E9', '', 'llo'], 'x-user-defined')) == b'h\xe9llo'


def test_x_user_defined():
    encoded = b'2,\x0c\x0b\x1aO\xd9#\xcb\x0f\xc9\xbbt\xcf\xa8\xca'
    decoded = '2,\x0c\x0b\x1aO\uf7d9#\uf7cb\x0f\uf7c9\uf7bbt\uf7cf\uf7a8\uf7ca'
    encoded = b'aa'
    decoded = 'aa'
    assert decode(encoded, 'x-user-defined') == (decoded, lookup('x-user-defined'))
    assert encode(decoded, 'x-user-defined') == encoded
python3.12/site-packages/pip/_vendor/__init__.py000064400000011601151732702700015451 0ustar00"""
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.

Files inside of pip._vendor should be considered immutable and should only be
updated to versions from upstream.
"""
from __future__ import absolute_import

import glob
import os.path
import sys

# Downstream redistributors which have debundled our dependencies should also
# patch this value to be true. This will trigger the additional patching
# to cause things like "six" to be available as pip.
DEBUNDLED = False

# By default, look in this directory for a bunch of .whl files which we will
# add to the beginning of sys.path before attempting to import anything. This
# is done to support downstream re-distributors like Debian and Fedora who
# wish to create their own Wheels for our dependencies to aid in debundling.
WHEEL_DIR = os.path.abspath(os.path.dirname(__file__))


# Define a small helper function to alias our vendored modules to the real ones
# if the vendored ones do not exist. This idea of this was taken from
# https://github.com/kennethreitz/requests/pull/2567.
def vendored(modulename):
    vendored_name = "{0}.{1}".format(__name__, modulename)

    try:
        __import__(modulename, globals(), locals(), level=0)
    except ImportError:
        # We can just silently allow import failures to pass here. If we
        # got to this point it means that ``import pip._vendor.whatever``
        # failed and so did ``import whatever``. Since we're importing this
        # upfront in an attempt to alias imports, not erroring here will
        # just mean we get a regular import error whenever pip *actually*
        # tries to import one of these modules to use it, which actually
        # gives us a better error message than we would have otherwise
        # gotten.
        pass
    else:
        sys.modules[vendored_name] = sys.modules[modulename]
        base, head = vendored_name.rsplit(".", 1)
        setattr(sys.modules[base], head, sys.modules[modulename])


# If we're operating in a debundled setup, then we want to go ahead and trigger
# the aliasing of our vendored libraries as well as looking for wheels to add
# to our sys.path. This will cause all of this code to be a no-op typically
# however downstream redistributors can enable it in a consistent way across
# all platforms.
if DEBUNDLED:
    # Actually look inside of WHEEL_DIR to find .whl files and add them to the
    # front of our sys.path.
    sys.path[:] = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.path

    # Actually alias all of our vendored dependencies.
    vendored("cachecontrol")
    vendored("certifi")
    vendored("colorama")
    vendored("distlib")
    vendored("distro")
    vendored("six")
    vendored("six.moves")
    vendored("six.moves.urllib")
    vendored("six.moves.urllib.parse")
    vendored("packaging")
    vendored("packaging.version")
    vendored("packaging.specifiers")
    vendored("pep517")
    vendored("pkg_resources")
    vendored("platformdirs")
    vendored("progress")
    vendored("requests")
    vendored("requests.exceptions")
    vendored("requests.packages")
    vendored("requests.packages.urllib3")
    vendored("requests.packages.urllib3._collections")
    vendored("requests.packages.urllib3.connection")
    vendored("requests.packages.urllib3.connectionpool")
    vendored("requests.packages.urllib3.contrib")
    vendored("requests.packages.urllib3.contrib.ntlmpool")
    vendored("requests.packages.urllib3.contrib.pyopenssl")
    vendored("requests.packages.urllib3.exceptions")
    vendored("requests.packages.urllib3.fields")
    vendored("requests.packages.urllib3.filepost")
    vendored("requests.packages.urllib3.packages")
    vendored("requests.packages.urllib3.packages.ordered_dict")
    vendored("requests.packages.urllib3.packages.six")
    vendored("requests.packages.urllib3.packages.ssl_match_hostname")
    vendored("requests.packages.urllib3.packages.ssl_match_hostname."
             "_implementation")
    vendored("requests.packages.urllib3.poolmanager")
    vendored("requests.packages.urllib3.request")
    vendored("requests.packages.urllib3.response")
    vendored("requests.packages.urllib3.util")
    vendored("requests.packages.urllib3.util.connection")
    vendored("requests.packages.urllib3.util.request")
    vendored("requests.packages.urllib3.util.response")
    vendored("requests.packages.urllib3.util.retry")
    vendored("requests.packages.urllib3.util.ssl_")
    vendored("requests.packages.urllib3.util.timeout")
    vendored("requests.packages.urllib3.util.url")
    vendored("resolvelib")
    vendored("rich")
    vendored("rich.console")
    vendored("rich.highlighter")
    vendored("rich.logging")
    vendored("rich.markup")
    vendored("rich.progress")
    vendored("rich.segment")
    vendored("rich.style")
    vendored("rich.text")
    vendored("rich.traceback")
    vendored("tenacity")
    vendored("tomli")
    vendored("truststore")
    vendored("urllib3")
python3.12/site-packages/pip/_vendor/distlib.pyi000064400000000025151732702710015514 0ustar00from distlib import *python3.12/site-packages/pip/_vendor/pygments/unistring.py000064400000173367151732702710017625 0ustar00"""
    pygments.unistring
    ~~~~~~~~~~~~~~~~~~

    Strings of all Unicode characters of a certain category.
    Used for matching in Unicode-aware languages. Run to regenerate.

    Inspired by chartypes_create.py from the MoinMoin project.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

Cc = '\x00-\x1f\x7f-\x9f'

Cf = '\xad\u0600-\u0605\u061c\u06dd\u070f\u08e2\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\U000110bd\U000110cd\U0001bca0-\U0001bca3\U0001d173-\U0001d17a\U000e0001\U000e0020-\U000e007f'

Cn = '\u0378-\u0379\u0380-\u0383\u038b\u038d\u03a2\u0530\u0557-\u0558\u058b-\u058c\u0590\u05c8-\u05cf\u05eb-\u05ee\u05f5-\u05ff\u061d\u070e\u074b-\u074c\u07b2-\u07bf\u07fb-\u07fc\u082e-\u082f\u083f\u085c-\u085d\u085f\u086b-\u089f\u08b5\u08be-\u08d2\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09bb\u09c5-\u09c6\u09c9-\u09ca\u09cf-\u09d6\u09d8-\u09db\u09de\u09e4-\u09e5\u09ff-\u0a00\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a3b\u0a3d\u0a43-\u0a46\u0a49-\u0a4a\u0a4e-\u0a50\u0a52-\u0a58\u0a5d\u0a5f-\u0a65\u0a77-\u0a80\u0a84\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abb\u0ac6\u0aca\u0ace-\u0acf\u0ad1-\u0adf\u0ae4-\u0ae5\u0af2-\u0af8\u0b00\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34\u0b3a-\u0b3b\u0b45-\u0b46\u0b49-\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b64-\u0b65\u0b78-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce-\u0bcf\u0bd1-\u0bd6\u0bd8-\u0be5\u0bfb-\u0bff\u0c0d\u0c11\u0c29\u0c3a-\u0c3c\u0c45\u0c49\u0c4e-\u0c54\u0c57\u0c5b-\u0c5f\u0c64-\u0c65\u0c70-\u0c77\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cbb\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce4-\u0ce5\u0cf0\u0cf3-\u0cff\u0d04\u0d0d\u0d11\u0d45\u0d49\u0d50-\u0d53\u0d64-\u0d65\u0d80-\u0d81\u0d84\u0d97-\u0d99\u0db2\u0dbc\u0dbe-\u0dbf\u0dc7-\u0dc9\u0dcb-\u0dce\u0dd5\u0dd7\u0de0-\u0de5\u0df0-\u0df1\u0df5-\u0e00\u0e3b-\u0e3e\u0e5c-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eba\u0ebe-\u0ebf\u0ec5\u0ec7\u0ece-\u0ecf\u0eda-\u0edb\u0ee0-\u0eff\u0f48\u0f6d-\u0f70\u0f98\u0fbd\u0fcd\u0fdb-\u0fff\u10c6\u10c8-\u10cc\u10ce-\u10cf\u1249\u124e-\u124f\u1257\u1259\u125e-\u125f\u1289\u128e-\u128f\u12b1\u12b6-\u12b7\u12bf\u12c1\u12c6-\u12c7\u12d7\u1311\u1316-\u1317\u135b-\u135c\u137d-\u137f\u139a-\u139f\u13f6-\u13f7\u13fe-\u13ff\u169d-\u169f\u16f9-\u16ff\u170d\u1715-\u171f\u1737-\u173f\u1754-\u175f\u176d\u1771\u1774-\u177f\u17de-\u17df\u17ea-\u17ef\u17fa-\u17ff\u180f\u181a-\u181f\u1879-\u187f\u18ab-\u18af\u18f6-\u18ff\u191f\u192c-\u192f\u193c-\u193f\u1941-\u1943\u196e-\u196f\u1975-\u197f\u19ac-\u19af\u19ca-\u19cf\u19db-\u19dd\u1a1c-\u1a1d\u1a5f\u1a7d-\u1a7e\u1a8a-\u1a8f\u1a9a-\u1a9f\u1aae-\u1aaf\u1abf-\u1aff\u1b4c-\u1b4f\u1b7d-\u1b7f\u1bf4-\u1bfb\u1c38-\u1c3a\u1c4a-\u1c4c\u1c89-\u1c8f\u1cbb-\u1cbc\u1cc8-\u1ccf\u1cfa-\u1cff\u1dfa\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fc5\u1fd4-\u1fd5\u1fdc\u1ff0-\u1ff1\u1ff5\u1fff\u2065\u2072-\u2073\u208f\u209d-\u209f\u20c0-\u20cf\u20f1-\u20ff\u218c-\u218f\u2427-\u243f\u244b-\u245f\u2b74-\u2b75\u2b96-\u2b97\u2bc9\u2bff\u2c2f\u2c5f\u2cf4-\u2cf8\u2d26\u2d28-\u2d2c\u2d2e-\u2d2f\u2d68-\u2d6e\u2d71-\u2d7e\u2d97-\u2d9f\u2da7\u2daf\u2db7\u2dbf\u2dc7\u2dcf\u2dd7\u2ddf\u2e4f-\u2e7f\u2e9a\u2ef4-\u2eff\u2fd6-\u2fef\u2ffc-\u2fff\u3040\u3097-\u3098\u3100-\u3104\u3130\u318f\u31bb-\u31bf\u31e4-\u31ef\u321f\u32ff\u4db6-\u4dbf\u9ff0-\u9fff\ua48d-\ua48f\ua4c7-\ua4cf\ua62c-\ua63f\ua6f8-\ua6ff\ua7ba-\ua7f6\ua82c-\ua82f\ua83a-\ua83f\ua878-\ua87f\ua8c6-\ua8cd\ua8da-\ua8df\ua954-\ua95e\ua97d-\ua97f\ua9ce\ua9da-\ua9dd\ua9ff\uaa37-\uaa3f\uaa4e-\uaa4f\uaa5a-\uaa5b\uaac3-\uaada\uaaf7-\uab00\uab07-\uab08\uab0f-\uab10\uab17-\uab1f\uab27\uab2f\uab66-\uab6f\uabee-\uabef\uabfa-\uabff\ud7a4-\ud7af\ud7c7-\ud7ca\ud7fc-\ud7ff\ufa6e-\ufa6f\ufada-\ufaff\ufb07-\ufb12\ufb18-\ufb1c\ufb37\ufb3d\ufb3f\ufb42\ufb45\ufbc2-\ufbd2\ufd40-\ufd4f\ufd90-\ufd91\ufdc8-\ufdef\ufdfe-\ufdff\ufe1a-\ufe1f\ufe53\ufe67\ufe6c-\ufe6f\ufe75\ufefd-\ufefe\uff00\uffbf-\uffc1\uffc8-\uffc9\uffd0-\uffd1\uffd8-\uffd9\uffdd-\uffdf\uffe7\uffef-\ufff8\ufffe-\uffff\U0001000c\U00010027\U0001003b\U0001003e\U0001004e-\U0001004f\U0001005e-\U0001007f\U000100fb-\U000100ff\U00010103-\U00010106\U00010134-\U00010136\U0001018f\U0001019c-\U0001019f\U000101a1-\U000101cf\U000101fe-\U0001027f\U0001029d-\U0001029f\U000102d1-\U000102df\U000102fc-\U000102ff\U00010324-\U0001032c\U0001034b-\U0001034f\U0001037b-\U0001037f\U0001039e\U000103c4-\U000103c7\U000103d6-\U000103ff\U0001049e-\U0001049f\U000104aa-\U000104af\U000104d4-\U000104d7\U000104fc-\U000104ff\U00010528-\U0001052f\U00010564-\U0001056e\U00010570-\U000105ff\U00010737-\U0001073f\U00010756-\U0001075f\U00010768-\U000107ff\U00010806-\U00010807\U00010809\U00010836\U00010839-\U0001083b\U0001083d-\U0001083e\U00010856\U0001089f-\U000108a6\U000108b0-\U000108df\U000108f3\U000108f6-\U000108fa\U0001091c-\U0001091e\U0001093a-\U0001093e\U00010940-\U0001097f\U000109b8-\U000109bb\U000109d0-\U000109d1\U00010a04\U00010a07-\U00010a0b\U00010a14\U00010a18\U00010a36-\U00010a37\U00010a3b-\U00010a3e\U00010a49-\U00010a4f\U00010a59-\U00010a5f\U00010aa0-\U00010abf\U00010ae7-\U00010aea\U00010af7-\U00010aff\U00010b36-\U00010b38\U00010b56-\U00010b57\U00010b73-\U00010b77\U00010b92-\U00010b98\U00010b9d-\U00010ba8\U00010bb0-\U00010bff\U00010c49-\U00010c7f\U00010cb3-\U00010cbf\U00010cf3-\U00010cf9\U00010d28-\U00010d2f\U00010d3a-\U00010e5f\U00010e7f-\U00010eff\U00010f28-\U00010f2f\U00010f5a-\U00010fff\U0001104e-\U00011051\U00011070-\U0001107e\U000110c2-\U000110cc\U000110ce-\U000110cf\U000110e9-\U000110ef\U000110fa-\U000110ff\U00011135\U00011147-\U0001114f\U00011177-\U0001117f\U000111ce-\U000111cf\U000111e0\U000111f5-\U000111ff\U00011212\U0001123f-\U0001127f\U00011287\U00011289\U0001128e\U0001129e\U000112aa-\U000112af\U000112eb-\U000112ef\U000112fa-\U000112ff\U00011304\U0001130d-\U0001130e\U00011311-\U00011312\U00011329\U00011331\U00011334\U0001133a\U00011345-\U00011346\U00011349-\U0001134a\U0001134e-\U0001134f\U00011351-\U00011356\U00011358-\U0001135c\U00011364-\U00011365\U0001136d-\U0001136f\U00011375-\U000113ff\U0001145a\U0001145c\U0001145f-\U0001147f\U000114c8-\U000114cf\U000114da-\U0001157f\U000115b6-\U000115b7\U000115de-\U000115ff\U00011645-\U0001164f\U0001165a-\U0001165f\U0001166d-\U0001167f\U000116b8-\U000116bf\U000116ca-\U000116ff\U0001171b-\U0001171c\U0001172c-\U0001172f\U00011740-\U000117ff\U0001183c-\U0001189f\U000118f3-\U000118fe\U00011900-\U000119ff\U00011a48-\U00011a4f\U00011a84-\U00011a85\U00011aa3-\U00011abf\U00011af9-\U00011bff\U00011c09\U00011c37\U00011c46-\U00011c4f\U00011c6d-\U00011c6f\U00011c90-\U00011c91\U00011ca8\U00011cb7-\U00011cff\U00011d07\U00011d0a\U00011d37-\U00011d39\U00011d3b\U00011d3e\U00011d48-\U00011d4f\U00011d5a-\U00011d5f\U00011d66\U00011d69\U00011d8f\U00011d92\U00011d99-\U00011d9f\U00011daa-\U00011edf\U00011ef9-\U00011fff\U0001239a-\U000123ff\U0001246f\U00012475-\U0001247f\U00012544-\U00012fff\U0001342f-\U000143ff\U00014647-\U000167ff\U00016a39-\U00016a3f\U00016a5f\U00016a6a-\U00016a6d\U00016a70-\U00016acf\U00016aee-\U00016aef\U00016af6-\U00016aff\U00016b46-\U00016b4f\U00016b5a\U00016b62\U00016b78-\U00016b7c\U00016b90-\U00016e3f\U00016e9b-\U00016eff\U00016f45-\U00016f4f\U00016f7f-\U00016f8e\U00016fa0-\U00016fdf\U00016fe2-\U00016fff\U000187f2-\U000187ff\U00018af3-\U0001afff\U0001b11f-\U0001b16f\U0001b2fc-\U0001bbff\U0001bc6b-\U0001bc6f\U0001bc7d-\U0001bc7f\U0001bc89-\U0001bc8f\U0001bc9a-\U0001bc9b\U0001bca4-\U0001cfff\U0001d0f6-\U0001d0ff\U0001d127-\U0001d128\U0001d1e9-\U0001d1ff\U0001d246-\U0001d2df\U0001d2f4-\U0001d2ff\U0001d357-\U0001d35f\U0001d379-\U0001d3ff\U0001d455\U0001d49d\U0001d4a0-\U0001d4a1\U0001d4a3-\U0001d4a4\U0001d4a7-\U0001d4a8\U0001d4ad\U0001d4ba\U0001d4bc\U0001d4c4\U0001d506\U0001d50b-\U0001d50c\U0001d515\U0001d51d\U0001d53a\U0001d53f\U0001d545\U0001d547-\U0001d549\U0001d551\U0001d6a6-\U0001d6a7\U0001d7cc-\U0001d7cd\U0001da8c-\U0001da9a\U0001daa0\U0001dab0-\U0001dfff\U0001e007\U0001e019-\U0001e01a\U0001e022\U0001e025\U0001e02b-\U0001e7ff\U0001e8c5-\U0001e8c6\U0001e8d7-\U0001e8ff\U0001e94b-\U0001e94f\U0001e95a-\U0001e95d\U0001e960-\U0001ec70\U0001ecb5-\U0001edff\U0001ee04\U0001ee20\U0001ee23\U0001ee25-\U0001ee26\U0001ee28\U0001ee33\U0001ee38\U0001ee3a\U0001ee3c-\U0001ee41\U0001ee43-\U0001ee46\U0001ee48\U0001ee4a\U0001ee4c\U0001ee50\U0001ee53\U0001ee55-\U0001ee56\U0001ee58\U0001ee5a\U0001ee5c\U0001ee5e\U0001ee60\U0001ee63\U0001ee65-\U0001ee66\U0001ee6b\U0001ee73\U0001ee78\U0001ee7d\U0001ee7f\U0001ee8a\U0001ee9c-\U0001eea0\U0001eea4\U0001eeaa\U0001eebc-\U0001eeef\U0001eef2-\U0001efff\U0001f02c-\U0001f02f\U0001f094-\U0001f09f\U0001f0af-\U0001f0b0\U0001f0c0\U0001f0d0\U0001f0f6-\U0001f0ff\U0001f10d-\U0001f10f\U0001f16c-\U0001f16f\U0001f1ad-\U0001f1e5\U0001f203-\U0001f20f\U0001f23c-\U0001f23f\U0001f249-\U0001f24f\U0001f252-\U0001f25f\U0001f266-\U0001f2ff\U0001f6d5-\U0001f6df\U0001f6ed-\U0001f6ef\U0001f6fa-\U0001f6ff\U0001f774-\U0001f77f\U0001f7d9-\U0001f7ff\U0001f80c-\U0001f80f\U0001f848-\U0001f84f\U0001f85a-\U0001f85f\U0001f888-\U0001f88f\U0001f8ae-\U0001f8ff\U0001f90c-\U0001f90f\U0001f93f\U0001f971-\U0001f972\U0001f977-\U0001f979\U0001f97b\U0001f9a3-\U0001f9af\U0001f9ba-\U0001f9bf\U0001f9c3-\U0001f9cf\U0001fa00-\U0001fa5f\U0001fa6e-\U0001ffff\U0002a6d7-\U0002a6ff\U0002b735-\U0002b73f\U0002b81e-\U0002b81f\U0002cea2-\U0002ceaf\U0002ebe1-\U0002f7ff\U0002fa1e-\U000e0000\U000e0002-\U000e001f\U000e0080-\U000e00ff\U000e01f0-\U000effff\U000ffffe-\U000fffff\U0010fffe-\U0010ffff'

Co = '\ue000-\uf8ff\U000f0000-\U000ffffd\U00100000-\U0010fffd'

Cs = '\ud800-\udbff\\\udc00\udc01-\udfff'

Ll = 'a-z\xb5\xdf-\xf6\xf8-\xff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0560-\u0588\u10d0-\u10fa\u10fd-\u10ff\u13f8-\u13fd\u1c80-\u1c88\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793-\ua795\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7af\ua7b5\ua7b7\ua7b9\ua7fa\uab30-\uab5a\uab60-\uab65\uab70-\uabbf\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\U00010428-\U0001044f\U000104d8-\U000104fb\U00010cc0-\U00010cf2\U000118c0-\U000118df\U00016e60-\U00016e7f\U0001d41a-\U0001d433\U0001d44e-\U0001d454\U0001d456-\U0001d467\U0001d482-\U0001d49b\U0001d4b6-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d4cf\U0001d4ea-\U0001d503\U0001d51e-\U0001d537\U0001d552-\U0001d56b\U0001d586-\U0001d59f\U0001d5ba-\U0001d5d3\U0001d5ee-\U0001d607\U0001d622-\U0001d63b\U0001d656-\U0001d66f\U0001d68a-\U0001d6a5\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6e1\U0001d6fc-\U0001d714\U0001d716-\U0001d71b\U0001d736-\U0001d74e\U0001d750-\U0001d755\U0001d770-\U0001d788\U0001d78a-\U0001d78f\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7c9\U0001d7cb\U0001e922-\U0001e943'

Lm = '\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua69c-\ua69d\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\ua9e6\uaa70\uaadd\uaaf3-\uaaf4\uab5c-\uab5f\uff70\uff9e-\uff9f\U00016b40-\U00016b43\U00016f93-\U00016f9f\U00016fe0-\U00016fe1'

Lo = '\xaa\xba\u01bb\u01c0-\u01c3\u0294\u05d0-\u05ea\u05ef-\u05f2\u0620-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0800-\u0815\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u09fc\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0-\u0ae1\u0af9\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60-\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0-\u0ce1\u0cf1-\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb0\u0eb2-\u0eb3\u0ebd\u0ec0-\u0ec4\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16f1-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u1878\u1880-\u1884\u1887-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5-\u1cf6\u2135-\u2138\u2d30-\u2d67\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3006\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua014\ua016-\ua48c\ua4d0-\ua4f7\ua500-\ua60b\ua610-\ua61f\ua62a-\ua62b\ua66e\ua6a0-\ua6e5\ua78f\ua7f7\ua7fb-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd-\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9e0-\ua9e4\ua9e7-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa6f\uaa71-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5-\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadc\uaae0-\uaaea\uaaf2\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff66-\uff6f\uff71-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010280-\U0001029c\U000102a0-\U000102d0\U00010300-\U0001031f\U0001032d-\U00010340\U00010342-\U00010349\U00010350-\U00010375\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U00010450-\U0001049d\U00010500-\U00010527\U00010530-\U00010563\U00010600-\U00010736\U00010740-\U00010755\U00010760-\U00010767\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010860-\U00010876\U00010880-\U0001089e\U000108e0-\U000108f2\U000108f4-\U000108f5\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00\U00010a10-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a35\U00010a60-\U00010a7c\U00010a80-\U00010a9c\U00010ac0-\U00010ac7\U00010ac9-\U00010ae4\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010b80-\U00010b91\U00010c00-\U00010c48\U00010d00-\U00010d23\U00010f00-\U00010f1c\U00010f27\U00010f30-\U00010f45\U00011003-\U00011037\U00011083-\U000110af\U000110d0-\U000110e8\U00011103-\U00011126\U00011144\U00011150-\U00011172\U00011176\U00011183-\U000111b2\U000111c1-\U000111c4\U000111da\U000111dc\U00011200-\U00011211\U00011213-\U0001122b\U00011280-\U00011286\U00011288\U0001128a-\U0001128d\U0001128f-\U0001129d\U0001129f-\U000112a8\U000112b0-\U000112de\U00011305-\U0001130c\U0001130f-\U00011310\U00011313-\U00011328\U0001132a-\U00011330\U00011332-\U00011333\U00011335-\U00011339\U0001133d\U00011350\U0001135d-\U00011361\U00011400-\U00011434\U00011447-\U0001144a\U00011480-\U000114af\U000114c4-\U000114c5\U000114c7\U00011580-\U000115ae\U000115d8-\U000115db\U00011600-\U0001162f\U00011644\U00011680-\U000116aa\U00011700-\U0001171a\U00011800-\U0001182b\U000118ff\U00011a00\U00011a0b-\U00011a32\U00011a3a\U00011a50\U00011a5c-\U00011a83\U00011a86-\U00011a89\U00011a9d\U00011ac0-\U00011af8\U00011c00-\U00011c08\U00011c0a-\U00011c2e\U00011c40\U00011c72-\U00011c8f\U00011d00-\U00011d06\U00011d08-\U00011d09\U00011d0b-\U00011d30\U00011d46\U00011d60-\U00011d65\U00011d67-\U00011d68\U00011d6a-\U00011d89\U00011d98\U00011ee0-\U00011ef2\U00012000-\U00012399\U00012480-\U00012543\U00013000-\U0001342e\U00014400-\U00014646\U00016800-\U00016a38\U00016a40-\U00016a5e\U00016ad0-\U00016aed\U00016b00-\U00016b2f\U00016b63-\U00016b77\U00016b7d-\U00016b8f\U00016f00-\U00016f44\U00016f50\U00017000-\U000187f1\U00018800-\U00018af2\U0001b000-\U0001b11e\U0001b170-\U0001b2fb\U0001bc00-\U0001bc6a\U0001bc70-\U0001bc7c\U0001bc80-\U0001bc88\U0001bc90-\U0001bc99\U0001e800-\U0001e8c4\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002b820-\U0002cea1\U0002ceb0-\U0002ebe0\U0002f800-\U0002fa1d'

Lt = '\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc'

Lu = 'A-Z\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u037f\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0528\u052a\u052c\u052e\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u13a0-\u13f5\u1c90-\u1cba\u1cbd-\u1cbf\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua698\ua69a\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua796\ua798\ua79a\ua79c\ua79e\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa-\ua7ae\ua7b0-\ua7b4\ua7b6\ua7b8\uff21-\uff3a\U00010400-\U00010427\U000104b0-\U000104d3\U00010c80-\U00010cb2\U000118a0-\U000118bf\U00016e40-\U00016e5f\U0001d400-\U0001d419\U0001d434-\U0001d44d\U0001d468-\U0001d481\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b5\U0001d4d0-\U0001d4e9\U0001d504-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d538-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d56c-\U0001d585\U0001d5a0-\U0001d5b9\U0001d5d4-\U0001d5ed\U0001d608-\U0001d621\U0001d63c-\U0001d655\U0001d670-\U0001d689\U0001d6a8-\U0001d6c0\U0001d6e2-\U0001d6fa\U0001d71c-\U0001d734\U0001d756-\U0001d76e\U0001d790-\U0001d7a8\U0001d7ca\U0001e900-\U0001e921'

Mc = '\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u1cf7\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaa7d\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec\U00011000\U00011002\U00011082\U000110b0-\U000110b2\U000110b7-\U000110b8\U0001112c\U00011145-\U00011146\U00011182\U000111b3-\U000111b5\U000111bf-\U000111c0\U0001122c-\U0001122e\U00011232-\U00011233\U00011235\U000112e0-\U000112e2\U00011302-\U00011303\U0001133e-\U0001133f\U00011341-\U00011344\U00011347-\U00011348\U0001134b-\U0001134d\U00011357\U00011362-\U00011363\U00011435-\U00011437\U00011440-\U00011441\U00011445\U000114b0-\U000114b2\U000114b9\U000114bb-\U000114be\U000114c1\U000115af-\U000115b1\U000115b8-\U000115bb\U000115be\U00011630-\U00011632\U0001163b-\U0001163c\U0001163e\U000116ac\U000116ae-\U000116af\U000116b6\U00011720-\U00011721\U00011726\U0001182c-\U0001182e\U00011838\U00011a39\U00011a57-\U00011a58\U00011a97\U00011c2f\U00011c3e\U00011ca9\U00011cb1\U00011cb4\U00011d8a-\U00011d8e\U00011d93-\U00011d94\U00011d96\U00011ef5-\U00011ef6\U00016f51-\U00016f7e\U0001d165-\U0001d166\U0001d16d-\U0001d172'

Me = '\u0488-\u0489\u1abe\u20dd-\u20e0\u20e2-\u20e4\ua670-\ua672'

Mn = '\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u09fe\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0afa-\u0aff\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c00\u0c04\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d00-\u0d01\u0d3b-\u0d3c\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u1885-\u1886\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4-\ua8c5\ua8e0-\ua8f1\ua8ff\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\U000101fd\U000102e0\U00010376-\U0001037a\U00010a01-\U00010a03\U00010a05-\U00010a06\U00010a0c-\U00010a0f\U00010a38-\U00010a3a\U00010a3f\U00010ae5-\U00010ae6\U00010d24-\U00010d27\U00010f46-\U00010f50\U00011001\U00011038-\U00011046\U0001107f-\U00011081\U000110b3-\U000110b6\U000110b9-\U000110ba\U00011100-\U00011102\U00011127-\U0001112b\U0001112d-\U00011134\U00011173\U00011180-\U00011181\U000111b6-\U000111be\U000111c9-\U000111cc\U0001122f-\U00011231\U00011234\U00011236-\U00011237\U0001123e\U000112df\U000112e3-\U000112ea\U00011300-\U00011301\U0001133b-\U0001133c\U00011340\U00011366-\U0001136c\U00011370-\U00011374\U00011438-\U0001143f\U00011442-\U00011444\U00011446\U0001145e\U000114b3-\U000114b8\U000114ba\U000114bf-\U000114c0\U000114c2-\U000114c3\U000115b2-\U000115b5\U000115bc-\U000115bd\U000115bf-\U000115c0\U000115dc-\U000115dd\U00011633-\U0001163a\U0001163d\U0001163f-\U00011640\U000116ab\U000116ad\U000116b0-\U000116b5\U000116b7\U0001171d-\U0001171f\U00011722-\U00011725\U00011727-\U0001172b\U0001182f-\U00011837\U00011839-\U0001183a\U00011a01-\U00011a0a\U00011a33-\U00011a38\U00011a3b-\U00011a3e\U00011a47\U00011a51-\U00011a56\U00011a59-\U00011a5b\U00011a8a-\U00011a96\U00011a98-\U00011a99\U00011c30-\U00011c36\U00011c38-\U00011c3d\U00011c3f\U00011c92-\U00011ca7\U00011caa-\U00011cb0\U00011cb2-\U00011cb3\U00011cb5-\U00011cb6\U00011d31-\U00011d36\U00011d3a\U00011d3c-\U00011d3d\U00011d3f-\U00011d45\U00011d47\U00011d90-\U00011d91\U00011d95\U00011d97\U00011ef3-\U00011ef4\U00016af0-\U00016af4\U00016b30-\U00016b36\U00016f8f-\U00016f92\U0001bc9d-\U0001bc9e\U0001d167-\U0001d169\U0001d17b-\U0001d182\U0001d185-\U0001d18b\U0001d1aa-\U0001d1ad\U0001d242-\U0001d244\U0001da00-\U0001da36\U0001da3b-\U0001da6c\U0001da75\U0001da84\U0001da9b-\U0001da9f\U0001daa1-\U0001daaf\U0001e000-\U0001e006\U0001e008-\U0001e018\U0001e01b-\U0001e021\U0001e023-\U0001e024\U0001e026-\U0001e02a\U0001e8d0-\U0001e8d6\U0001e944-\U0001e94a\U000e0100-\U000e01ef'

Nd = '0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0de6-\u0def\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\ua9f0-\ua9f9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19\U000104a0-\U000104a9\U00010d30-\U00010d39\U00011066-\U0001106f\U000110f0-\U000110f9\U00011136-\U0001113f\U000111d0-\U000111d9\U000112f0-\U000112f9\U00011450-\U00011459\U000114d0-\U000114d9\U00011650-\U00011659\U000116c0-\U000116c9\U00011730-\U00011739\U000118e0-\U000118e9\U00011c50-\U00011c59\U00011d50-\U00011d59\U00011da0-\U00011da9\U00016a60-\U00016a69\U00016b50-\U00016b59\U0001d7ce-\U0001d7ff\U0001e950-\U0001e959'

Nl = '\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef\U00010140-\U00010174\U00010341\U0001034a\U000103d1-\U000103d5\U00012400-\U0001246e'

No = '\xb2-\xb3\xb9\xbc-\xbe\u09f4-\u09f9\u0b72-\u0b77\u0bf0-\u0bf2\u0c78-\u0c7e\u0d58-\u0d5e\u0d70-\u0d78\u0f2a-\u0f33\u1369-\u137c\u17f0-\u17f9\u19da\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215f\u2189\u2460-\u249b\u24ea-\u24ff\u2776-\u2793\u2cfd\u3192-\u3195\u3220-\u3229\u3248-\u324f\u3251-\u325f\u3280-\u3289\u32b1-\u32bf\ua830-\ua835\U00010107-\U00010133\U00010175-\U00010178\U0001018a-\U0001018b\U000102e1-\U000102fb\U00010320-\U00010323\U00010858-\U0001085f\U00010879-\U0001087f\U000108a7-\U000108af\U000108fb-\U000108ff\U00010916-\U0001091b\U000109bc-\U000109bd\U000109c0-\U000109cf\U000109d2-\U000109ff\U00010a40-\U00010a48\U00010a7d-\U00010a7e\U00010a9d-\U00010a9f\U00010aeb-\U00010aef\U00010b58-\U00010b5f\U00010b78-\U00010b7f\U00010ba9-\U00010baf\U00010cfa-\U00010cff\U00010e60-\U00010e7e\U00010f1d-\U00010f26\U00010f51-\U00010f54\U00011052-\U00011065\U000111e1-\U000111f4\U0001173a-\U0001173b\U000118ea-\U000118f2\U00011c5a-\U00011c6c\U00016b5b-\U00016b61\U00016e80-\U00016e96\U0001d2e0-\U0001d2f3\U0001d360-\U0001d378\U0001e8c7-\U0001e8cf\U0001ec71-\U0001ecab\U0001ecad-\U0001ecaf\U0001ecb1-\U0001ecb4\U0001f100-\U0001f10c'

Pc = '_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f'

Pd = '\\-\u058a\u05be\u1400\u1806\u2010-\u2015\u2e17\u2e1a\u2e3a-\u2e3b\u2e40\u301c\u3030\u30a0\ufe31-\ufe32\ufe58\ufe63\uff0d'

Pe = ')\\]}\u0f3b\u0f3d\u169c\u2046\u207e\u208e\u2309\u230b\u232a\u2769\u276b\u276d\u276f\u2771\u2773\u2775\u27c6\u27e7\u27e9\u27eb\u27ed\u27ef\u2984\u2986\u2988\u298a\u298c\u298e\u2990\u2992\u2994\u2996\u2998\u29d9\u29db\u29fd\u2e23\u2e25\u2e27\u2e29\u3009\u300b\u300d\u300f\u3011\u3015\u3017\u3019\u301b\u301e-\u301f\ufd3e\ufe18\ufe36\ufe38\ufe3a\ufe3c\ufe3e\ufe40\ufe42\ufe44\ufe48\ufe5a\ufe5c\ufe5e\uff09\uff3d\uff5d\uff60\uff63'

Pf = '\xbb\u2019\u201d\u203a\u2e03\u2e05\u2e0a\u2e0d\u2e1d\u2e21'

Pi = '\xab\u2018\u201b-\u201c\u201f\u2039\u2e02\u2e04\u2e09\u2e0c\u2e1c\u2e20'

Po = "!-#%-'*,.-/:-;?-@\\\\\xa1\xa7\xb6-\xb7\xbf\u037e\u0387\u055a-\u055f\u0589\u05c0\u05c3\u05c6\u05f3-\u05f4\u0609-\u060a\u060c-\u060d\u061b\u061e-\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964-\u0965\u0970\u09fd\u0a76\u0af0\u0c84\u0df4\u0e4f\u0e5a-\u0e5b\u0f04-\u0f12\u0f14\u0f85\u0fd0-\u0fd4\u0fd9-\u0fda\u104a-\u104f\u10fb\u1360-\u1368\u166d-\u166e\u16eb-\u16ed\u1735-\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u1805\u1807-\u180a\u1944-\u1945\u1a1e-\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e-\u1c7f\u1cc0-\u1cc7\u1cd3\u2016-\u2017\u2020-\u2027\u2030-\u2038\u203b-\u203e\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205e\u2cf9-\u2cfc\u2cfe-\u2cff\u2d70\u2e00-\u2e01\u2e06-\u2e08\u2e0b\u2e0e-\u2e16\u2e18-\u2e19\u2e1b\u2e1e-\u2e1f\u2e2a-\u2e2e\u2e30-\u2e39\u2e3c-\u2e3f\u2e41\u2e43-\u2e4e\u3001-\u3003\u303d\u30fb\ua4fe-\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce-\ua8cf\ua8f8-\ua8fa\ua8fc\ua92e-\ua92f\ua95f\ua9c1-\ua9cd\ua9de-\ua9df\uaa5c-\uaa5f\uaade-\uaadf\uaaf0-\uaaf1\uabeb\ufe10-\ufe16\ufe19\ufe30\ufe45-\ufe46\ufe49-\ufe4c\ufe50-\ufe52\ufe54-\ufe57\ufe5f-\ufe61\ufe68\ufe6a-\ufe6b\uff01-\uff03\uff05-\uff07\uff0a\uff0c\uff0e-\uff0f\uff1a-\uff1b\uff1f-\uff20\uff3c\uff61\uff64-\uff65\U00010100-\U00010102\U0001039f\U000103d0\U0001056f\U00010857\U0001091f\U0001093f\U00010a50-\U00010a58\U00010a7f\U00010af0-\U00010af6\U00010b39-\U00010b3f\U00010b99-\U00010b9c\U00010f55-\U00010f59\U00011047-\U0001104d\U000110bb-\U000110bc\U000110be-\U000110c1\U00011140-\U00011143\U00011174-\U00011175\U000111c5-\U000111c8\U000111cd\U000111db\U000111dd-\U000111df\U00011238-\U0001123d\U000112a9\U0001144b-\U0001144f\U0001145b\U0001145d\U000114c6\U000115c1-\U000115d7\U00011641-\U00011643\U00011660-\U0001166c\U0001173c-\U0001173e\U0001183b\U00011a3f-\U00011a46\U00011a9a-\U00011a9c\U00011a9e-\U00011aa2\U00011c41-\U00011c45\U00011c70-\U00011c71\U00011ef7-\U00011ef8\U00012470-\U00012474\U00016a6e-\U00016a6f\U00016af5\U00016b37-\U00016b3b\U00016b44\U00016e97-\U00016e9a\U0001bc9f\U0001da87-\U0001da8b\U0001e95e-\U0001e95f"

Ps = '(\\[{\u0f3a\u0f3c\u169b\u201a\u201e\u2045\u207d\u208d\u2308\u230a\u2329\u2768\u276a\u276c\u276e\u2770\u2772\u2774\u27c5\u27e6\u27e8\u27ea\u27ec\u27ee\u2983\u2985\u2987\u2989\u298b\u298d\u298f\u2991\u2993\u2995\u2997\u29d8\u29da\u29fc\u2e22\u2e24\u2e26\u2e28\u2e42\u3008\u300a\u300c\u300e\u3010\u3014\u3016\u3018\u301a\u301d\ufd3f\ufe17\ufe35\ufe37\ufe39\ufe3b\ufe3d\ufe3f\ufe41\ufe43\ufe47\ufe59\ufe5b\ufe5d\uff08\uff3b\uff5b\uff5f\uff62'

Sc = '$\xa2-\xa5\u058f\u060b\u07fe-\u07ff\u09f2-\u09f3\u09fb\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20bf\ua838\ufdfc\ufe69\uff04\uffe0-\uffe1\uffe5-\uffe6\U0001ecb0'

Sk = '\\^`\xa8\xaf\xb4\xb8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384-\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd-\u1ffe\u309b-\u309c\ua700-\ua716\ua720-\ua721\ua789-\ua78a\uab5b\ufbb2-\ufbc1\uff3e\uff40\uffe3\U0001f3fb-\U0001f3ff'

Sm = '+<->|~\xac\xb1\xd7\xf7\u03f6\u0606-\u0608\u2044\u2052\u207a-\u207c\u208a-\u208c\u2118\u2140-\u2144\u214b\u2190-\u2194\u219a-\u219b\u21a0\u21a3\u21a6\u21ae\u21ce-\u21cf\u21d2\u21d4\u21f4-\u22ff\u2320-\u2321\u237c\u239b-\u23b3\u23dc-\u23e1\u25b7\u25c1\u25f8-\u25ff\u266f\u27c0-\u27c4\u27c7-\u27e5\u27f0-\u27ff\u2900-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2aff\u2b30-\u2b44\u2b47-\u2b4c\ufb29\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe9-\uffec\U0001d6c1\U0001d6db\U0001d6fb\U0001d715\U0001d735\U0001d74f\U0001d76f\U0001d789\U0001d7a9\U0001d7c3\U0001eef0-\U0001eef1'

So = '\xa6\xa9\xae\xb0\u0482\u058d-\u058e\u060e-\u060f\u06de\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0d4f\u0d79\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce-\u0fcf\u0fd5-\u0fd8\u109e-\u109f\u1390-\u1399\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2117\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u214a\u214c-\u214d\u214f\u218a-\u218b\u2195-\u2199\u219c-\u219f\u21a1-\u21a2\u21a4-\u21a5\u21a7-\u21ad\u21af-\u21cd\u21d0-\u21d1\u21d3\u21d5-\u21f3\u2300-\u2307\u230c-\u231f\u2322-\u2328\u232b-\u237b\u237d-\u239a\u23b4-\u23db\u23e2-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u25b6\u25b8-\u25c0\u25c2-\u25f7\u2600-\u266e\u2670-\u2767\u2794-\u27bf\u2800-\u28ff\u2b00-\u2b2f\u2b45-\u2b46\u2b4d-\u2b73\u2b76-\u2b95\u2b98-\u2bc8\u2bca-\u2bfe\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ua836-\ua837\ua839\uaa77-\uaa79\ufdfd\uffe4\uffe8\uffed-\uffee\ufffc-\ufffd\U00010137-\U0001013f\U00010179-\U00010189\U0001018c-\U0001018e\U00010190-\U0001019b\U000101a0\U000101d0-\U000101fc\U00010877-\U00010878\U00010ac8\U0001173f\U00016b3c-\U00016b3f\U00016b45\U0001bc9c\U0001d000-\U0001d0f5\U0001d100-\U0001d126\U0001d129-\U0001d164\U0001d16a-\U0001d16c\U0001d183-\U0001d184\U0001d18c-\U0001d1a9\U0001d1ae-\U0001d1e8\U0001d200-\U0001d241\U0001d245\U0001d300-\U0001d356\U0001d800-\U0001d9ff\U0001da37-\U0001da3a\U0001da6d-\U0001da74\U0001da76-\U0001da83\U0001da85-\U0001da86\U0001ecac\U0001f000-\U0001f02b\U0001f030-\U0001f093\U0001f0a0-\U0001f0ae\U0001f0b1-\U0001f0bf\U0001f0c1-\U0001f0cf\U0001f0d1-\U0001f0f5\U0001f110-\U0001f16b\U0001f170-\U0001f1ac\U0001f1e6-\U0001f202\U0001f210-\U0001f23b\U0001f240-\U0001f248\U0001f250-\U0001f251\U0001f260-\U0001f265\U0001f300-\U0001f3fa\U0001f400-\U0001f6d4\U0001f6e0-\U0001f6ec\U0001f6f0-\U0001f6f9\U0001f700-\U0001f773\U0001f780-\U0001f7d8\U0001f800-\U0001f80b\U0001f810-\U0001f847\U0001f850-\U0001f859\U0001f860-\U0001f887\U0001f890-\U0001f8ad\U0001f900-\U0001f90b\U0001f910-\U0001f93e\U0001f940-\U0001f970\U0001f973-\U0001f976\U0001f97a\U0001f97c-\U0001f9a2\U0001f9b0-\U0001f9b9\U0001f9c0-\U0001f9c2\U0001f9d0-\U0001f9ff\U0001fa60-\U0001fa6d'

Zl = '\u2028'

Zp = '\u2029'

Zs = ' \xa0\u1680\u2000-\u200a\u202f\u205f\u3000'

xid_continue = '0-9A-Z_a-z\xaa\xb5\xb7\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376-\u0377\u037b-\u037d\u037f\u0386-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u05d0-\u05ea\u05ef-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u07fd\u0800-\u082d\u0840-\u085b\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u08d3-\u08e1\u08e3-\u0963\u0966-\u096f\u0971-\u0983\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7-\u09c8\u09cb-\u09ce\u09d7\u09dc-\u09dd\u09df-\u09e3\u09e6-\u09f1\u09fc\u09fe\u0a01-\u0a03\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a3c\u0a3e-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0af9-\u0aff\u0b01-\u0b03\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47-\u0b48\u0b4b-\u0b4d\u0b56-\u0b57\u0b5c-\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82-\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c00-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c58-\u0c5a\u0c60-\u0c63\u0c66-\u0c6f\u0c80-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5-\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1-\u0cf2\u0d00-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d54-\u0d57\u0d5f-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82-\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2-\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18-\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1369-\u1371\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772-\u1773\u1780-\u17d3\u17d7\u17dc-\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1878\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19da\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1ab0-\u1abd\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1cd0-\u1cd2\u1cd4-\u1cf9\u1d00-\u1df9\u1dfb-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u203f-\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099-\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua827\ua840-\ua873\ua880-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua8fd-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\ua9e0-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabea\uabec-\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufc5d\ufc64-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdf9\ufe00-\ufe0f\ufe20-\ufe2f\ufe33-\ufe34\ufe4d-\ufe4f\ufe71\ufe73\ufe77\ufe79\ufe7b\ufe7d\ufe7f-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010140-\U00010174\U000101fd\U00010280-\U0001029c\U000102a0-\U000102d0\U000102e0\U00010300-\U0001031f\U0001032d-\U0001034a\U00010350-\U0001037a\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U000103d1-\U000103d5\U00010400-\U0001049d\U000104a0-\U000104a9\U000104b0-\U000104d3\U000104d8-\U000104fb\U00010500-\U00010527\U00010530-\U00010563\U00010600-\U00010736\U00010740-\U00010755\U00010760-\U00010767\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010860-\U00010876\U00010880-\U0001089e\U000108e0-\U000108f2\U000108f4-\U000108f5\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00-\U00010a03\U00010a05-\U00010a06\U00010a0c-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a35\U00010a38-\U00010a3a\U00010a3f\U00010a60-\U00010a7c\U00010a80-\U00010a9c\U00010ac0-\U00010ac7\U00010ac9-\U00010ae6\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010b80-\U00010b91\U00010c00-\U00010c48\U00010c80-\U00010cb2\U00010cc0-\U00010cf2\U00010d00-\U00010d27\U00010d30-\U00010d39\U00010f00-\U00010f1c\U00010f27\U00010f30-\U00010f50\U00011000-\U00011046\U00011066-\U0001106f\U0001107f-\U000110ba\U000110d0-\U000110e8\U000110f0-\U000110f9\U00011100-\U00011134\U00011136-\U0001113f\U00011144-\U00011146\U00011150-\U00011173\U00011176\U00011180-\U000111c4\U000111c9-\U000111cc\U000111d0-\U000111da\U000111dc\U00011200-\U00011211\U00011213-\U00011237\U0001123e\U00011280-\U00011286\U00011288\U0001128a-\U0001128d\U0001128f-\U0001129d\U0001129f-\U000112a8\U000112b0-\U000112ea\U000112f0-\U000112f9\U00011300-\U00011303\U00011305-\U0001130c\U0001130f-\U00011310\U00011313-\U00011328\U0001132a-\U00011330\U00011332-\U00011333\U00011335-\U00011339\U0001133b-\U00011344\U00011347-\U00011348\U0001134b-\U0001134d\U00011350\U00011357\U0001135d-\U00011363\U00011366-\U0001136c\U00011370-\U00011374\U00011400-\U0001144a\U00011450-\U00011459\U0001145e\U00011480-\U000114c5\U000114c7\U000114d0-\U000114d9\U00011580-\U000115b5\U000115b8-\U000115c0\U000115d8-\U000115dd\U00011600-\U00011640\U00011644\U00011650-\U00011659\U00011680-\U000116b7\U000116c0-\U000116c9\U00011700-\U0001171a\U0001171d-\U0001172b\U00011730-\U00011739\U00011800-\U0001183a\U000118a0-\U000118e9\U000118ff\U00011a00-\U00011a3e\U00011a47\U00011a50-\U00011a83\U00011a86-\U00011a99\U00011a9d\U00011ac0-\U00011af8\U00011c00-\U00011c08\U00011c0a-\U00011c36\U00011c38-\U00011c40\U00011c50-\U00011c59\U00011c72-\U00011c8f\U00011c92-\U00011ca7\U00011ca9-\U00011cb6\U00011d00-\U00011d06\U00011d08-\U00011d09\U00011d0b-\U00011d36\U00011d3a\U00011d3c-\U00011d3d\U00011d3f-\U00011d47\U00011d50-\U00011d59\U00011d60-\U00011d65\U00011d67-\U00011d68\U00011d6a-\U00011d8e\U00011d90-\U00011d91\U00011d93-\U00011d98\U00011da0-\U00011da9\U00011ee0-\U00011ef6\U00012000-\U00012399\U00012400-\U0001246e\U00012480-\U00012543\U00013000-\U0001342e\U00014400-\U00014646\U00016800-\U00016a38\U00016a40-\U00016a5e\U00016a60-\U00016a69\U00016ad0-\U00016aed\U00016af0-\U00016af4\U00016b00-\U00016b36\U00016b40-\U00016b43\U00016b50-\U00016b59\U00016b63-\U00016b77\U00016b7d-\U00016b8f\U00016e40-\U00016e7f\U00016f00-\U00016f44\U00016f50-\U00016f7e\U00016f8f-\U00016f9f\U00016fe0-\U00016fe1\U00017000-\U000187f1\U00018800-\U00018af2\U0001b000-\U0001b11e\U0001b170-\U0001b2fb\U0001bc00-\U0001bc6a\U0001bc70-\U0001bc7c\U0001bc80-\U0001bc88\U0001bc90-\U0001bc99\U0001bc9d-\U0001bc9e\U0001d165-\U0001d169\U0001d16d-\U0001d172\U0001d17b-\U0001d182\U0001d185-\U0001d18b\U0001d1aa-\U0001d1ad\U0001d242-\U0001d244\U0001d400-\U0001d454\U0001d456-\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d51e-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d552-\U0001d6a5\U0001d6a8-\U0001d6c0\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6fa\U0001d6fc-\U0001d714\U0001d716-\U0001d734\U0001d736-\U0001d74e\U0001d750-\U0001d76e\U0001d770-\U0001d788\U0001d78a-\U0001d7a8\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7cb\U0001d7ce-\U0001d7ff\U0001da00-\U0001da36\U0001da3b-\U0001da6c\U0001da75\U0001da84\U0001da9b-\U0001da9f\U0001daa1-\U0001daaf\U0001e000-\U0001e006\U0001e008-\U0001e018\U0001e01b-\U0001e021\U0001e023-\U0001e024\U0001e026-\U0001e02a\U0001e800-\U0001e8c4\U0001e8d0-\U0001e8d6\U0001e900-\U0001e94a\U0001e950-\U0001e959\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002b820-\U0002cea1\U0002ceb0-\U0002ebe0\U0002f800-\U0002fa1d\U000e0100-\U000e01ef'

xid_start = 'A-Z_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376-\u0377\u037b-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06e5-\u06e6\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4-\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u09fc\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0-\u0ae1\u0af9\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60-\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0-\u0ce1\u0cf1-\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e40-\u0e46\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb0\u0eb2\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5-\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a-\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd-\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5-\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufc5d\ufc64-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdf9\ufe71\ufe73\ufe77\ufe79\ufe7b\ufe7d\ufe7f-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc\U00010000-\U0001000b\U0001000d-\U00010026\U00010028-\U0001003a\U0001003c-\U0001003d\U0001003f-\U0001004d\U00010050-\U0001005d\U00010080-\U000100fa\U00010140-\U00010174\U00010280-\U0001029c\U000102a0-\U000102d0\U00010300-\U0001031f\U0001032d-\U0001034a\U00010350-\U00010375\U00010380-\U0001039d\U000103a0-\U000103c3\U000103c8-\U000103cf\U000103d1-\U000103d5\U00010400-\U0001049d\U000104b0-\U000104d3\U000104d8-\U000104fb\U00010500-\U00010527\U00010530-\U00010563\U00010600-\U00010736\U00010740-\U00010755\U00010760-\U00010767\U00010800-\U00010805\U00010808\U0001080a-\U00010835\U00010837-\U00010838\U0001083c\U0001083f-\U00010855\U00010860-\U00010876\U00010880-\U0001089e\U000108e0-\U000108f2\U000108f4-\U000108f5\U00010900-\U00010915\U00010920-\U00010939\U00010980-\U000109b7\U000109be-\U000109bf\U00010a00\U00010a10-\U00010a13\U00010a15-\U00010a17\U00010a19-\U00010a35\U00010a60-\U00010a7c\U00010a80-\U00010a9c\U00010ac0-\U00010ac7\U00010ac9-\U00010ae4\U00010b00-\U00010b35\U00010b40-\U00010b55\U00010b60-\U00010b72\U00010b80-\U00010b91\U00010c00-\U00010c48\U00010c80-\U00010cb2\U00010cc0-\U00010cf2\U00010d00-\U00010d23\U00010f00-\U00010f1c\U00010f27\U00010f30-\U00010f45\U00011003-\U00011037\U00011083-\U000110af\U000110d0-\U000110e8\U00011103-\U00011126\U00011144\U00011150-\U00011172\U00011176\U00011183-\U000111b2\U000111c1-\U000111c4\U000111da\U000111dc\U00011200-\U00011211\U00011213-\U0001122b\U00011280-\U00011286\U00011288\U0001128a-\U0001128d\U0001128f-\U0001129d\U0001129f-\U000112a8\U000112b0-\U000112de\U00011305-\U0001130c\U0001130f-\U00011310\U00011313-\U00011328\U0001132a-\U00011330\U00011332-\U00011333\U00011335-\U00011339\U0001133d\U00011350\U0001135d-\U00011361\U00011400-\U00011434\U00011447-\U0001144a\U00011480-\U000114af\U000114c4-\U000114c5\U000114c7\U00011580-\U000115ae\U000115d8-\U000115db\U00011600-\U0001162f\U00011644\U00011680-\U000116aa\U00011700-\U0001171a\U00011800-\U0001182b\U000118a0-\U000118df\U000118ff\U00011a00\U00011a0b-\U00011a32\U00011a3a\U00011a50\U00011a5c-\U00011a83\U00011a86-\U00011a89\U00011a9d\U00011ac0-\U00011af8\U00011c00-\U00011c08\U00011c0a-\U00011c2e\U00011c40\U00011c72-\U00011c8f\U00011d00-\U00011d06\U00011d08-\U00011d09\U00011d0b-\U00011d30\U00011d46\U00011d60-\U00011d65\U00011d67-\U00011d68\U00011d6a-\U00011d89\U00011d98\U00011ee0-\U00011ef2\U00012000-\U00012399\U00012400-\U0001246e\U00012480-\U00012543\U00013000-\U0001342e\U00014400-\U00014646\U00016800-\U00016a38\U00016a40-\U00016a5e\U00016ad0-\U00016aed\U00016b00-\U00016b2f\U00016b40-\U00016b43\U00016b63-\U00016b77\U00016b7d-\U00016b8f\U00016e40-\U00016e7f\U00016f00-\U00016f44\U00016f50\U00016f93-\U00016f9f\U00016fe0-\U00016fe1\U00017000-\U000187f1\U00018800-\U00018af2\U0001b000-\U0001b11e\U0001b170-\U0001b2fb\U0001bc00-\U0001bc6a\U0001bc70-\U0001bc7c\U0001bc80-\U0001bc88\U0001bc90-\U0001bc99\U0001d400-\U0001d454\U0001d456-\U0001d49c\U0001d49e-\U0001d49f\U0001d4a2\U0001d4a5-\U0001d4a6\U0001d4a9-\U0001d4ac\U0001d4ae-\U0001d4b9\U0001d4bb\U0001d4bd-\U0001d4c3\U0001d4c5-\U0001d505\U0001d507-\U0001d50a\U0001d50d-\U0001d514\U0001d516-\U0001d51c\U0001d51e-\U0001d539\U0001d53b-\U0001d53e\U0001d540-\U0001d544\U0001d546\U0001d54a-\U0001d550\U0001d552-\U0001d6a5\U0001d6a8-\U0001d6c0\U0001d6c2-\U0001d6da\U0001d6dc-\U0001d6fa\U0001d6fc-\U0001d714\U0001d716-\U0001d734\U0001d736-\U0001d74e\U0001d750-\U0001d76e\U0001d770-\U0001d788\U0001d78a-\U0001d7a8\U0001d7aa-\U0001d7c2\U0001d7c4-\U0001d7cb\U0001e800-\U0001e8c4\U0001e900-\U0001e943\U0001ee00-\U0001ee03\U0001ee05-\U0001ee1f\U0001ee21-\U0001ee22\U0001ee24\U0001ee27\U0001ee29-\U0001ee32\U0001ee34-\U0001ee37\U0001ee39\U0001ee3b\U0001ee42\U0001ee47\U0001ee49\U0001ee4b\U0001ee4d-\U0001ee4f\U0001ee51-\U0001ee52\U0001ee54\U0001ee57\U0001ee59\U0001ee5b\U0001ee5d\U0001ee5f\U0001ee61-\U0001ee62\U0001ee64\U0001ee67-\U0001ee6a\U0001ee6c-\U0001ee72\U0001ee74-\U0001ee77\U0001ee79-\U0001ee7c\U0001ee7e\U0001ee80-\U0001ee89\U0001ee8b-\U0001ee9b\U0001eea1-\U0001eea3\U0001eea5-\U0001eea9\U0001eeab-\U0001eebb\U00020000-\U0002a6d6\U0002a700-\U0002b734\U0002b740-\U0002b81d\U0002b820-\U0002cea1\U0002ceb0-\U0002ebe0\U0002f800-\U0002fa1d'

cats = ['Cc', 'Cf', 'Cn', 'Co', 'Cs', 'Ll', 'Lm', 'Lo', 'Lt', 'Lu', 'Mc', 'Me', 'Mn', 'Nd', 'Nl', 'No', 'Pc', 'Pd', 'Pe', 'Pf', 'Pi', 'Po', 'Ps', 'Sc', 'Sk', 'Sm', 'So', 'Zl', 'Zp', 'Zs']

# Generated from unidata 11.0.0

def combine(*args):
    return ''.join(globals()[cat] for cat in args)


def allexcept(*args):
    newcats = cats[:]
    for arg in args:
        newcats.remove(arg)
    return ''.join(globals()[cat] for cat in newcats)


def _handle_runs(char_list):  # pragma: no cover
    buf = []
    for c in char_list:
        if len(c) == 1:
            if buf and buf[-1][1] == chr(ord(c)-1):
                buf[-1] = (buf[-1][0], c)
            else:
                buf.append((c, c))
        else:
            buf.append((c, c))
    for a, b in buf:
        if a == b:
            yield a
        else:
            yield '%s-%s' % (a, b)


if __name__ == '__main__':  # pragma: no cover
    import unicodedata

    categories = {'xid_start': [], 'xid_continue': []}

    with open(__file__, encoding='utf-8') as fp:
        content = fp.read()

    header = content[:content.find('Cc =')]
    footer = content[content.find("def combine("):]

    for code in range(0x110000):
        c = chr(code)
        cat = unicodedata.category(c)
        if ord(c) == 0xdc00:
            # Hack to avoid combining this combining with the preceding high
            # surrogate, 0xdbff, when doing a repr.
            c = '\\' + c
        elif ord(c) in (0x2d, 0x5b, 0x5c, 0x5d, 0x5e):
            # Escape regex metachars.
            c = '\\' + c
        categories.setdefault(cat, []).append(c)
        # XID_START and XID_CONTINUE are special categories used for matching
        # identifiers in Python 3.
        if c.isidentifier():
            categories['xid_start'].append(c)
        if ('a' + c).isidentifier():
            categories['xid_continue'].append(c)

    with open(__file__, 'w', encoding='utf-8') as fp:
        fp.write(header)

        for cat in sorted(categories):
            val = ''.join(_handle_runs(categories[cat]))
            fp.write('%s = %a\n\n' % (cat, val))

        cats = sorted(categories)
        cats.remove('xid_start')
        cats.remove('xid_continue')
        fp.write('cats = %r\n\n' % cats)

        fp.write('# Generated from unidata %s\n\n' % (unicodedata.unidata_version,))

        fp.write(footer)
python3.12/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc000064400000112035151732702710025334 0ustar00�

R`i�	�f�dZddlZddlmZmZmZmZmZmZm	Z	ddl
mZddlm
Z
mZmZmZmZmZddlmZd�Zd�Zd	�Zd
�fd�ZGd�d
e�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Z Gd�de�Z!Gd�de�Z"eeeee e!e"ed�Z#y)z�
    pygments.filters
    ~~~~~~~~~~~~~~~~

    Module containing filter lookup functions and default
    filters.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�String�Comment�Keyword�Name�Error�
Whitespace�string_to_tokentype)�Filter)�get_list_opt�get_int_opt�get_bool_opt�get_choice_opt�
ClassNotFound�OptionError)�find_plugin_filtersc�\�|tvr	t|St�D]\}}||k(s�|cSy)z2Lookup a filter by name. Return None if not found.N��FILTERSr)�
filtername�name�clss   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__init__.py�find_filter_classrs8���W���z�"�"�(�*�	��c��:���J�+��c�H�t|�}|r|di|��Std|z��)z�Return an instantiated filter.

    Options are passed to the filter initializer if wanted.
    Raise a ClassNotFound if not found.
    zfilter %r not found�)rr)r�optionsrs   r�get_filter_by_namer s.���J�
'�C�
��~�W�~���1�J�>�?�?rc#�XK�tEd{���t�D]	\}}|���y7��w)z'Return a generator of all filter names.Nr)r�_s  r�get_all_filtersr!-s*�������&�(���a��
�)��s�
*�(�*c��|S�Nr)�xs r�<lambda>r%5s��1rc#��K�d}|j|�D]A}|j�|j�}}||k7r	||||f��|||||�f��|}�C|t|�k7r
|||df��yy�w)Nr)�finditer�start�end�len)	�ttype�value�regex�specialttype�replacefunc�last�matchr(r)s	         r�_replace_specialr24s������D�����&���[�[�]�E�I�I�K�s���D�=���t�E�*�*�*��K��e�C�(8�9�9�9���'��s�5�z���U�4�5�\�!�!��s�A1A3c��eZdZdZd�Zd�Zy)�
CodeTagFilteraOHighlight special code tags in comments and docstrings.

    Options accepted:

    `codetags` : list of strings
       A list of strings that are flagged as code tags.  The default is to
       highlight ``XXX``, ``TODO``, ``FIXME``, ``BUG`` and ``NOTE``.

    .. versionchanged:: 2.13
       Now recognizes ``FIXME`` by default.
    c��tj|fi|��t|dgd��}tjddj|D�cgc]}|s�tj|���c}�z�|_ycc}w)N�codetags)�XXX�TODO�FIXME�BUG�NOTEz\b(%s)\b�|)r
�__init__r�re�compile�join�escape�tag_re)�selfr�tags�tags    rr=zCodeTagFilter.__init__Nsm������(��(��G�Z�C�E���j�j��s�x�x�&*�9
�&*�s�c�B�I�I�c�N�d�9
�0�"�����9
s�A7�
A7c#��K�|j}|D]\\}}|tjvs|tvr7|tjvr%t|||tj�Ed{����W||f���^y7��wr#)rBr�Docr�Preprocr2�Special)rC�lexer�streamr-r+r,s      r�filterzCodeTagFilter.filterVse��������"�L�E�5���
�
�"�����G�O�O�+�+�E�5�%����Q�Q�Q��U�l�"�
#�R�s�A A3�"A1�#A3N��__name__�
__module__�__qualname__�__doc__r=rLrrrr4r4As��
��#rr4c�*�eZdZdZidd�dd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�id$d%�d&d'�d(d)�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC�dDdE��idFdG�dHdI�dJdK�dLdM�dNdO�dPdQ�dRdS�dTdU�dVdW�dXdY�dZd[�d\d]�d^d_�d`da�dbdc�ddde�dfdg��idhdi�djdk�dldm�dndo�dpdq�drds�dtdu�dvdw�dxdy�dzd{�d|d}�d~d}�dd��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d“d�dēd�dƓd�dȓd�dʓd�d̓�id�dΓd�dГd�dғd�dԓd�d֓d�dؓd�dړd�dܓd�dޓd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d��d�d��d�d��d�d��d�d��d��d��d�d��d�d��d�d��d�d��d	�d
��d�d��d
�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��d+�d,��d-�d.��d/�d0��d1�d2��i�d3�d4��d5�d6��d7�d8��d9�d:��d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��dM�dN��dO�dP��dQ�dR��dS�dT��i�dU�dV��dW�dX��dY�dZ��d[�d\��d]�d^��d_�d`��da�db��dc�dd��de�df��dg�dh��di�dj��dk�dl��dm�dn��do�dp��dq�dr��ds�dt��du�dv���dw�dx�dy�dz�d{�d|�d}�d~�d�d��	�Zi�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d��i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d“�dÐdē�i�dŐdƓ�dǐdȓ�dɐdʓ�dːd̓�d͐dΓ�dϐdГ�dѐdғ�dӐdԓ�dՐd֓�dאdؓ�dِdړ�dېdܓ�dݐdޓ�dߐd��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d��d���d��d���d��d���d��d���d��d���d��d��d�d��d�d��d�d��d�d��i�d	�d
��d�d��d
�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d ��d!�d"��d#�d$��d%�d&��d'�d(��d)�d*��i�d+�d,��d-�d.��d/�d0��d1�d2��d3�d4��d5�d6��d7�d8��d9�d:��d;�d<��d=�d>��d?�d@��dA�dB��dC�dD��dE�dF��dG�dH��dI�dJ��dK�dL��i�dM�dN��dO�dP��dQ�dR��dS�dT��dU�dV��dW�dX��dY�dZ��d[�d\��d]�d^��d_�d`��da�db��dc�dd��ded��dfd��dgd��dhd	��did��i�djd
��dkd��dld��dmd��dnd��dod��dpd��dqd��drd��dsd��dtd!��dud#��dvd%��dwd'��dxd)��dyd+��dzd-��i�d{d/��d|d1��d}d3��d~d5��dd7��d�d9��d�d;��d�d=��d�d?��d�dA��d�dC��d�dE��d��d���d��d���d��d���d��d���d��d���i�d��d���d�dG��d�dI��d�dK��d�dM��d�dO��d�dQ��d�dS��d�dU��d�dW��d�dY��d�d[��d�d]��d�d_��d�da��d�dc��d�de��i�d�dg��d�di��d�dk��d�dm��d�do��d�dq��d�ds��d�du��d�dw��d�dy��d�d{��d�d}��d�d}��d��d���d�d���d�d���d�d���i�d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�d�d���d�d���i�d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���d�d���dڐdۓ�dܐdݓ�d�d���i�d�d���d�d���d�d���d�d���d�d“�d�dē�d�dƓ�d�dȓ�d�dʓ�d�d̓�d�dΓ�d�dГ�d�dғ�d�dԓ�d�d֓�d�dؓ�d�dړ�i�d�dܓ�d�dޓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���dd���dd���i�dd���dd���d�d��d�d��d�d��d�d��d	�d
��d�d��d�d��d
�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d ��d�d��d�d"��d�d$��d�d&��d�d(��d�d*��d �d,��d!�d.��d"�d0��d#�d2��d$�d4��d%�d6��d&�d8��i�d'�d:��d(�d<��d)�d>��d*�d@��d+�dB��d,�dD��d-�dF��d.�dH��d/�dJ��d0�dL��d1�dN��d2�dP��d3�dR��d4�dT��d5�dV��d6�dX��d7�dZ��i�d8�d\��d9�d^��d:�d`��d;�db��d<�dd��d=�df��d>�dh��d?�dj��d@�dl��dA�dn��dB�dp��dC�dr��dD�dE��dF�dG��dH�dt��dI�dv��dJ�dw��i�dK�dx��dL�dy��dM�dN��dO�dP��dQ�dR��dS�dT��dU�dz��dV�d{��dW�d|��dX�d}��dY�d~��dZ�d��d[�d\��d]�d^��d_�d`��da�db��dc�dd��i�de�df��dg�dh��di�dj��dk�dl��dm�dn��do�dp��dq�dr��ds�dt��du�dv��dw�dx��dy�dz��d{�d|��d}�d~��d�d���d��d���d��d���d��d����d��d�i�Zee�d��Z�d��Z�d��Z�y�(��SymbolFiltera�Convert mathematical symbols such as \<longrightarrow> in Isabelle
    or \longrightarrow in LaTeX into Unicode characters.

    This is mostly useful for HTML or console output when you want to
    approximate the source rendering you'd see in an IDE.

    Options accepted:

    `lang` : string
       The symbol language. Must be one of ``'isabelle'`` or
       ``'latex'``.  The default is ``'isabelle'``.
    z\alphauαz\betauβz\gammauγz\deltauδz\varepsilonuεz\zetauζz\etauηz	\varthetauθz\iotauιz\kappauκz\lambdauλz\muuμz\nuuνz\xiuξz\piuπz\varrhouρz\sigmauσz\tauuτz\upsilonuυz\varphiuφz\chiuχz\psiuψz\omegauωz\GammauΓz\DeltauΔz\ThetauΘz\LambdauΛz\XiuΞz\PiuΠz\SigmauΣz\UpsilonuΥz\PhiuΦz\PsiuΨz\OmegauΩz
\leftarrowu←z\longleftarrowu⟵z\rightarrowu→z\longrightarrowu⟶z
\Leftarrowu⇐z\Longleftarrowu⟸z\Rightarrowu⇒z\Longrightarrowu⟹z\leftrightarrowu↔z\longleftrightarrowu⟷z\Leftrightarrowu⇔z\Longleftrightarrowu⟺z\mapstou↦z\longmapstou⟼z\relbaru─z\Relbaru═z\hookleftarrowu↩z\hookrightarrowu↪z\leftharpoondownu↽z\rightharpoondownu⇁z\leftharpoonupu↼z\rightharpoonupu⇀z\rightleftharpoonsu⇌z\leadstou↝z\downharpoonleftu⇃z\downharpoonrightu⇂z\upharpoonleftu↿z\upharpoonrightu↾z\restrictionz\uparrowu↑z\Uparrowu⇑z
\downarrowu↓z
\Downarrowu⇓z\updownarrowu↕z\Updownarrowu⇕z\langleu⟨z\rangleu⟩z\lceilu⌈z\rceilu⌉z\lflooru⌊z\rflooru⌋z\flqq�«z\frqq�»z\botu⊥z\topu⊤z\wedgeu∧z	\bigwedgeu⋀z\veeu∨z\bigveeu⋁z\forallu∀z\existsu∃z\nexistsu∄z\neg�¬z\Boxu□z\Diamondu◇z\vdashu⊢z\modelsu⊨z\dashvu⊣z\surdu√z\leu≤z\geu≥z\llu≪z\ggu≫z\lesssimu≲z\gtrsimu≳z\lessapproxu⪅z
\gtrapproxu⪆z\inu∈z\notinu∉z\subsetu⊂z\supsetu⊃z	\subsetequ⊆z	\supsetequ⊇z	\sqsubsetu⊏z	\sqsupsetu⊐z\sqsubsetequ⊑z\sqsupsetequ⊒z\capu∩z\bigcapu⋂z\cupu∪z\bigcupu⋃z\sqcupu⊔z	\bigsqcupu⨆z\sqcapu⊓z	\Bigsqcapu⨅z	\setminusu∖z\proptou∝z\uplusu⊎z\bigplusu⨄z\simu∼z\dotequ≐z\simequ≃z\approxu≈z\asympu≍z\congu≅z\equivu≡z\Joinu⋈z\bowtieu⨝z\precu≺z\succu≻z\precequ≼z\succequ≽z	\parallelu∥z\mid�¦z\pm�±z\mpu∓z\times�×z\div�÷z\cdotu⋅z\staru⋆z\circu∘z\daggeru†z\ddaggeru‡z\lhdu⊲z\rhdu⊳z\unlhdu⊴z\unrhdu⊵z
\triangleleftu◃z\trianglerightu▹z	\triangleu△z
\trianglequ≜z\oplusu⊕z	\bigoplusu⨁z\otimesu⊗z
\bigotimesu⨂z\odotu⊙z\bigodotu⨀z\ominusu⊖z\oslashu⊘z\dotsu…z\cdotsu⋯z\sumu∑z\produ∏z\coprodu∐z\inftyu∞z\intu∫z\ointu∮z	\clubsuitu♣z\diamondsuitu♢z
\heartsuitu♡z
\spadesuitu♠z\alephuℵz	\emptysetu∅z\nablau∇z\partialu∂z\flatu♭z\naturalu♮z\sharpu♯z\angleu∠z
\copyright�©z\textregistered�®z\textonequarter�¼z\textonehalf�½�¾�ª�ºu€�£�¥�¢�¤�°)	z\textthreequartersz\textordfemininez\textordmasculinez\euroz\poundsz\yenz	\textcentz
\textcurrencyz\textdegreez\<zero>u𝟬z\<one>u𝟭z\<two>u𝟮z\<three>u𝟯z\<four>u𝟰z\<five>u𝟱z\<six>u𝟲z\<seven>u𝟳z\<eight>u𝟴z\<nine>u𝟵z\<A>u𝒜z\<B>uℬz\<C>u𝒞z\<D>u𝒟z\<E>uℰz\<F>uℱz\<G>u𝒢z\<H>uℋz\<I>uℐz\<J>u𝒥z\<K>u𝒦z\<L>uℒz\<M>uℳz\<N>u𝒩z\<O>u𝒪z\<P>u𝒫z\<Q>u𝒬z\<R>uℛz\<S>u𝒮z\<T>u𝒯z\<U>u𝒰z\<V>u𝒱z\<W>u𝒲z\<X>u𝒳z\<Y>u𝒴z\<Z>u𝒵z\<a>u𝖺z\<b>u𝖻z\<c>u𝖼z\<d>u𝖽z\<e>u𝖾z\<f>u𝖿z\<g>u𝗀z\<h>u𝗁z\<i>u𝗂z\<j>u𝗃z\<k>u𝗄z\<l>u𝗅z\<m>u𝗆z\<n>u𝗇z\<o>u𝗈z\<p>u𝗉z\<q>u𝗊z\<r>u𝗋z\<s>u𝗌z\<t>u𝗍z\<u>u𝗎z\<v>u𝗏z\<w>u𝗐z\<x>u𝗑z\<y>u𝗒z\<z>u𝗓z\<AA>u𝔄z\<BB>u𝔅z\<CC>uℭz\<DD>u𝔇z\<EE>u𝔈z\<FF>u𝔉z\<GG>u𝔊z\<HH>uℌz\<II>uℑz\<JJ>u𝔍z\<KK>u𝔎z\<LL>u𝔏z\<MM>u𝔐z\<NN>u𝔑z\<OO>u𝔒z\<PP>u𝔓z\<QQ>u𝔔z\<RR>uℜz\<SS>u𝔖z\<TT>u𝔗z\<UU>u𝔘z\<VV>u𝔙z\<WW>u𝔚z\<XX>u𝔛z\<YY>u𝔜z\<ZZ>uℨz\<aa>u𝔞z\<bb>u𝔟z\<cc>u𝔠z\<dd>u𝔡z\<ee>u𝔢z\<ff>u𝔣z\<gg>u𝔤z\<hh>u𝔥z\<ii>u𝔦z\<jj>u𝔧z\<kk>u𝔨z\<ll>u𝔩z\<mm>u𝔪z\<nn>u𝔫z\<oo>u𝔬z\<pp>u𝔭z\<qq>u𝔮z\<rr>u𝔯z\<ss>u𝔰z\<tt>u𝔱z\<uu>u𝔲z\<vv>u𝔳z\<ww>u𝔴z\<xx>u𝔵z\<yy>u𝔶z\<zz>u𝔷z\<alpha>z\<beta>z\<gamma>z\<delta>z
\<epsilon>z\<zeta>z\<eta>z\<theta>z\<iota>z\<kappa>z	\<lambda>z\<mu>z\<nu>z\<xi>z\<pi>z\<rho>z\<sigma>z\<tau>z
\<upsilon>z\<phi>z\<chi>z\<psi>z\<omega>z\<Gamma>z\<Delta>z\<Theta>z	\<Lambda>z\<Xi>z\<Pi>z\<Sigma>z
\<Upsilon>z\<Phi>z\<Psi>z\<Omega>z\<bool>u𝔹z
\<complex>uℂz\<nat>uℕz\<rat>uℚz\<real>uℝz\<int>uℤz\<leftarrow>z\<longleftarrow>z
\<rightarrow>z\<longrightarrow>z\<Leftarrow>z\<Longleftarrow>z
\<Rightarrow>z\<Longrightarrow>z\<leftrightarrow>z\<longleftrightarrow>z\<Leftrightarrow>z\<Longleftrightarrow>z	\<mapsto>z
\<longmapsto>z\<midarrow>z\<Midarrow>z\<hookleftarrow>z\<hookrightarrow>z\<leftharpoondown>z\<rightharpoondown>z\<leftharpoonup>z\<rightharpoonup>z\<rightleftharpoons>z
\<leadsto>z\<downharpoonleft>z\<downharpoonright>z\<upharpoonleft>z\<upharpoonright>z\<restriction>z\<Colon>u∷z\<up>z\<Up>z\<down>z\<Down>z	\<updown>z	\<Updown>z	\<langle>z	\<rangle>z\<lceil>z\<rceil>z	\<lfloor>z	\<rfloor>z\<lparr>u⦇z\<rparr>u⦈z	\<lbrakk>u⟦z	\<rbrakk>u⟧z	\<lbrace>u⦃z	\<rbrace>u⦄z\<guillemotleft>z\<guillemotright>z	\<bottom>z\<top>z\<and>z\<And>z\<or>z\<Or>z	\<forall>z	\<exists>z
\<nexists>z\<not>z\<box>z
\<diamond>z\<turnstile>z\<Turnstile>z
\<tturnstile>u⊩z
\<TTurnstile>u⊫z\<stileturn>z\<surd>z\<le>z\<ge>z\<lless>z\<ggreater>z
\<lesssim>z
\<greatersim>z
\<lessapprox>z\<greaterapprox>z\<in>z\<notin>z	\<subset>z	\<supset>z\<subseteq>z\<supseteq>z\<sqsubset>z\<sqsupset>z
\<sqsubseteq>z
\<sqsupseteq>z\<inter>z\<Inter>z\<union>z\<Union>z
\<squnion>z
\<Squnion>z
\<sqinter>z
\<Sqinter>z\<setminus>z	\<propto>z\<uplus>z\<Uplus>z\<noteq>u≠z\<sim>z\<doteq>z\<simeq>z	\<approx>z\<asymp>z\<cong>z\<smile>u⌣z\<equiv>z\<frown>u⌢z\<Join>z	\<bowtie>z\<prec>z\<succ>z	\<preceq>z	\<succeq>z\<parallel>z\<bar>z\<plusminus>z\<minusplus>z\<times>z\<div>z\<cdot>z\<star>z	\<bullet>u∙z\<circ>z	\<dagger>z
\<ddagger>z\<lhd>z\<rhd>z\<unlhd>z\<unrhd>z\<triangleleft>z\<triangleright>z\<triangle>z\<triangleq>z\<oplus>z\<Oplus>z	\<otimes>z	\<Otimes>z\<odot>z\<Odot>z	\<ominus>z	\<oslash>z\<dots>z\<cdots>z\<Sum>z\<Prod>z	\<Coprod>z\<infinity>z\<integral>z\<ointegral>z\<clubsuit>z\<diamondsuit>z\<heartsuit>z\<spadesuit>z\<aleph>z\<emptyset>z\<nabla>z
\<partial>z\<flat>z
\<natural>z\<sharp>z\<angle>z\<copyright>z
\<registered>z	\<hyphen>�­z
\<inverse>�¯z
\<onequarter>z
\<onehalf>z\<threequarters>z\<ordfeminine>z\<ordmasculine>z
\<section>�§z\<paragraph>�¶z
\<exclamdown>�¡z\<questiondown>�¿z\<euro>z	\<pounds>z\<yen>z\<cent>z\<currency>z	\<degree>z\<amalg>u⨿z\<mho>u℧z
\<lozenge>u◊z\<wp>u℘z\<wrong>u≀z	\<struct>u⋄z\<acute>�´z\<index>uız\<dieresis>�¨z
\<cedilla>�¸z\<hungarumlaut>u˝z\<some>uϵz
\<newline>u⏎z\<open>u‹z\<close>u›z\<here>u⌂z\<^sub>u⇩z\<^sup>u⇧z\<^bold>u❙z\<^bsub>u⇘z\<^esub>u⇙z\<^bsup>u⇗z\<^esup>u⇖)�isabelle�latexc�x�tj|fi|��t|dddgd�}|j||_y)N�langrprq)r
r=r�lang_map�symbols)rCrrss   rr=zSymbolFilter.__init__�s<������(��(��g�v�)�7�3�Z�A���}�}�T�*��rc#�pK�|D]-\}}||jvr||j|f���(||f���/y�wr#)ru�rCrJrKr+r,s     rrLzSymbolFilter.filter�s>����"�L�E�5�����$��T�\�\�%�0�0�0��U�l�"�	#�s�46N)	rNrOrPrQ�
latex_symbols�isabelle_symbolsrtr=rLrrrrSrSas����E��<�E��<�E�	�<�E�	�<�	E�
	�<�E�	�<�
E�	�<�E�	�<�E�	�<�E�	�<�E�	�<�E�	�<�E�	�<�E�	�<�E�	�<�E� 	�<�!E�"	�<�#E�$	�<�%E�&	�<�'E�(	�<�)E�*	�<�+E�,	�<�-E�.	�<�/E�0	�<�1E�2	�<�3E�4	�<�5E�6	�<�7E�8	�<�9E�:	�<�;E�<	�<�=E�>	�<�?E�@	�<�AE�B	�<�CE�D	�<�EE�F	�<�GE�H	�<�IE�J	�<�KE�L	�<�ME�N	�<�OE�P	�<�QE�R	�<�SE�T	�<�UE�V	�<�WE�X	�<�YE�Z	�<�[E�\	�<�]E�^	�<�_E�`	�<�aE�b	�<�cE�d	�<�eE�f	�<�gE�h	�<�iE�j	�<�kE�l	�<�mE�n	�<�oE�p	�<�qE�r	�<�sE�t	�<�uE�v	�<�wE�x	�<�yE�z	�<�{E�|	�<�}E�~	�<�E�@	�<�AE�B	�<�CE�D	�<�EE�F	�<�GE�H	�<�IE�J	�<�KE�L	�<�ME�N	�<�OE�P	�<�QE�R	�<�SE�T	�<�UE�V	�<�WE�X	�<�YE�Z	�<�[E�\	�<�]E�^	�<�_E�`	�<�aE�b	�<�cE�d	�<�eE�f	�<�gE�h	�<�iE�j	�<�kE�l	�<�mE�n	�<�oE�p	�<�qE�r	�<�sE�t	�<�uE�v	�<�wE�x	�<�yE�z	�<�{E�|	�<�}E�~	�<�E�@	�<�AE�B	�<�CE�D	�<�EE�F	�<�GE�H	�<�IE�J	�<�KE�L	�<�ME�N	�<�OE�P	�<�QE�R	�<�SE�T	�<�UE�V	�<�WE�X	�<�YE�Z	�<�[E�\	�<�]E�^	�<�_E�`	�<�aE�b	�<�cE�d	�<�eE�f	�<�gE�h	�<�iE�j	�<�kE�l	�<�mE�n	�<�oE�p	�<�qE�r	�<�sE�t	�<�uE�v	�<�wE�x	�<�yE�z	�<�{E�|	�<�}E�~	�<�E�@	�<�AE�B	�<�CE�D	�<�EE�F	�<�GE�H	�<�IE�J	�<�KE�L	�<�ME�N	�<�OE�P	�<�QE�R	�<�SE�T	�<�UE�V	�<�WE�X	�<�YE�Z	�<�[E�\	�<�]E�^	�<�_E�`	�<�aE�b	�<�cE�d	�<�eE�f	�<�gE�h	�<�iE�j	�<�kE�l	�<�mE�n	�<�oE�p	�<�qE�r	�<�sE�t	�<�uE�v	�<�wE�x	�<�yE�z	�<�{E�|	�<�}E�~	�<�E�@	�<�AE�B	�<�CE�D	�<�EE�F	�<�GE�H	�<�IE�J	�<�KE�L	�<�ME�N	�<�OE�P	�<�QE�R	�<�SE�T	�<�UE�V	�<�WE�X	�<�YE�Z	�<�[E�\	�<�]E�^	�<�_E�`	�<�aE�b	�<�cE�d	�<�eE�f	�<�gE�h	�<�iE�j	�<�kE�l	�<�mE�n	�<�oE�p	�<�qE�r	�<�sE�t	�<�uE�v	�<�wE�x$0�#/�#/�#/�#/�#/�#/�#/�#/�IE�M�Ng��\�g��\�g�	�\�g�	�\�	g�
	�\�g�	�\�
g�	�\�g�	�\�g�	�\�g�	�\�g�	�\�g�	�\�g�	�\�g�	�\�g�	�\�g� 	�\�!g�"	�\�#g�$	�\�%g�&	�\�'g�(	�\�)g�*	�\�+g�,	�\�-g�.	�\�/g�0	�\�1g�2	�\�3g�4	�\�5g�6	�\�7g�8	�\�9g�:	�\�;g�<	�\�=g�>	�\�?g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	�\�Ig�J	�\�Kg�L	�\�Mg�N	�\�Og�P	�\�Qg�R	�\�Sg�T	�\�Ug�V	�\�Wg�X	�\�Yg�Z	�\�[g�\	�\�]g�^	�\�_g�`	�\�ag�b	�\�cg�d	�\�eg�f	�\�gg�h	�\�ig�j	�\�kg�l	�\�mg�n	�\�og�p	�\�qg�r	�\�sg�t	�\�ug�v	�\�wg�x	�\�yg�z	�\�{g�|	�\�}g�~	�\�g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	�\�Ig�J	�\�Kg�L	�\�Mg�N	�\�Og�P	�\�Qg�R	�\�Sg�T	�\�Ug�V	�\�Wg�X	�\�Yg�Z	�\�[g�\	�\�]g�^	�\�_g�`	�\�ag�b	�\�cg�d	�\�eg�f	�\�gg�h	�\�ig�j	�\�kg�l	�\�mg�n	�\�og�p	�\�qg�r	�\�sg�t	�\�ug�v	�\�wg�x	�\�yg�z	�\�{g�|	�\�}g�~	�\�g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	�\�Ig�J	�\�Kg�L	�\�Mg�N	�\�Og�P	�\�Qg�R	�\�Sg�T	�\�Ug�V	�\�Wg�X	�\�Yg�Z	�\�[g�\	�\�]g�^	�\�_g�`	�\�ag�b	�\�cg�d	�\�eg�f	�\�gg�h	�\�ig�j	�\�kg�l	�\�mg�n	�\�og�p	�\�qg�r	�\�sg�t	�\�ug�v	�\�wg�x	�\�yg�z	�\�{g�|	�\�}g�~	�\�g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	�\�Ig�J	�\�Kg�L	�\�Mg�N	�\�Og�P	�\�Qg�R	�\�Sg�T	�\�Ug�V	�\�Wg�X	�\�Yg�Z	�\�[g�\	�\�]g�^	�\�_g�`	�\�ag�b	�\�cg�d	�\�eg�f	�\�gg�h	�\�ig�j	�\�kg�l	�\�mg�n	�\�og�p	�\�qg�r	�\�sg�t	�\�ug�v	�\�wg�x	�\�yg�z	�\�{g�|	�\�}g�~	�\�g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	!�\�Ig�J	�\�Kg�L	!�\�Mg�N	�\�Og�P	�\�Qg�R	�\�Sg�T	�\�Ug�V	�\�Wg�X	�\�Yg�Z	�\�[g�\	�\�]g�^	�\�_g�`	�\�ag�b	 �\�cg�d	�\�eg�f	�\�gg�h	�\�ig�j	�\�kg�l	�\�mg�n	�\�og�p	�\�qg�r	�\�sg�t	�\�ug�v	�\�wg�x	�\�yg�z	�\�{g�|	�\�}g�~	�\�g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	�\�Ig�J	�\�Kg�L	�\�Mg�N	�\�Og�P	�\�Qg�R	�\�Sg�T	�\�Ug�V	�\�Wg�X	�\�Yg�Z	�\�[g�\	�\�]g�^	�\�_g�`	�\�ag�b	�\�cg�d	�\�eg�f	�\�gg�h	�\�ig�j	�\�kg�l	�\�mg�n	�\�og�p	�\�qg�r	�\�sg�t	�\�ug�v	�\�wg�x	�\�yg�z	�\�{g�|	�\�}g�~	�\�g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	�\�Ig�J	�\�Kg�L	�\�Mg�N	�\�Og�P	�\�Qg�R	�\�Sg�T	�\�Ug�V	�\�Wg�X	�\�Yg�Z	�\�[g�\	�\�]g�^	�\�_g�`	�\�ag�b	�\�cg�d	�\�eg�f	�\�gg�h	�\�ig�j	�\�kg�l	�\�mg�n	�\�og�p	�\�qg�r	�\�sg�t	�\�ug�v	�\�wg�x	�\�yg�z	�\�{g�|	�\�}g�~	�\�g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	�\�Ig�J	�\�Kg�L	�\�Mg�N	�\�Og�P	�\�Qg�R	�\�Sg�T	�\�Ug�V	�\�Wg�X	�\�Yg�Z	�\�[g�\	�\�]g�^	�\�_g�`	�\�ag�b	�\�cg�d	�\�eg�f	�\�gg�h	�\�ig�j	�\�kg�l	�\�mg�n	�\�og�p	�\�qg�r	�\�sg�t	�\�ug�v	�\�wg�x	�\�yg�z	�\�{g�|	�\�}g�~	�\�g�@		�\�A	g�B		�\�C	g�D		�\�E	g�F		�\�G	g�H		�\�I	g�J		�\�K	g�L		�\�M	g�N		�\�O	g�P		�\�Q	g�R		�\�S	g�T		�\�U	g�V		�\�W	g�X		�\�Y	g�Z		�\�[	g�\		�\�]	g�^		�\�_	g�`		�\�a	g�b		�\�c	g�d		�\�e	g�f		�\�g	g�h		�\�i	g�j		�\�k	g�l		�\�m	g�n		�\�o	g�p		�\�q	g�r		�\�s	g�t		�\�u	g�v		�\�w	g�x		�\�y	g�z		�\�{	g�|		�\�}	g�~		�\�	g�@
	�\�A
g�B
	�\�C
g�D
	�\�E
g�F
	�\�G
g�H
	�\�I
g�J
	�\�K
g�L
	�\�M
g�N
	�\�O
g�P
	�\�Q
g�R
	�\�S
g�T
	�\�U
g�V
	�\�W
g�X
	�\�Y
g�Z
	�\�[
g�\
	�\�]
g�^
	�\�_
g�`
	�\�a
g�b
	�\�c
g�d
	�\�e
g�f
	�\�g
g�h
	�\�i
g�j
	�\�k
g�l
	�\�m
g�n
	�\�o
g�p
	�\�q
g�r
	�\�s
g�t
	�\�u
g�v
	�\�w
g�x
	�\�y
g�z
	�\�{
g�|
	�\�}
g�~
	�\�
g�@	�\�Ag�B	�\�Cg�D	�\�Eg�F	�\�Gg�H	�\�Ig�J	�\�Kg�L	�\�Mg��R.��G�H�+�#rrSc��eZdZdZd�Zd�Zy)�KeywordCaseFiltera�Convert keywords to lowercase or uppercase or capitalize them, which
    means first letter uppercase, rest lowercase.

    This can be useful e.g. if you highlight Pascal code and want to adapt the
    code to your styleguide.

    Options accepted:

    `case` : string
       The casing to convert keywords to. Must be one of ``'lower'``,
       ``'upper'`` or ``'capitalize'``.  The default is ``'lower'``.
    c�z�tj|fi|��t|dgd�d�}tt|�|_y)N�case)�lower�upper�
capitalizer~)r
r=r�getattr�str�convert)rCrr}s   rr=zKeywordCaseFilter.__init__�s5������(��(��g�v�>��I���s�D�)��rc#�hK�|D])\}}|tvr||j|�f���$||f���+y�wr#)rr�rws     rrLzKeywordCaseFilter.filter�s:����"�L�E�5�����T�\�\�%�0�0�0��U�l�"�	#�s�02NrMrrrr{r{�s���*�#rr{c��eZdZdZd�Zd�Zy)�NameHighlightFiltera�Highlight a normal Name (and Name.*) token with a different token type.

    Example::

        filter = NameHighlightFilter(
            names=['foo', 'bar', 'baz'],
            tokentype=Name.Function,
        )

    This would highlight the names "foo", "bar" and "baz"
    as functions. `Name.Function` is the default token type.

    Options accepted:

    `names` : list of strings
      A list of names that should be given the different token type.
      There is no default.
    `tokentype` : TokenType or string
      A token type or a string containing a token type name that is
      used for highlighting the strings in `names`.  The default is
      `Name.Function`.
    c���tj|fi|��tt|dg��|_|jd�}|rt
|�|_ytj|_y)N�names�	tokentype)
r
r=�setrr��getr	r�r�Function)rCrr�s   rr=zNameHighlightFilter.__init__�sP������(��(���g�w��;�<��
��K�K��,�	��0��;�D�N�!�]�]�D�Nrc#�zK�|D]2\}}|tvr||jvr|j|f���-||f���4y�wr#)rr�r�rws     rrLzNameHighlightFilter.filter�s?����"�L�E�5���}��$�*�*�!4��n�n�e�+�+��U�l�"�	#�s�9;NrMrrrr�r��s���.+�#rr�c��eZdZy)�
ErrorTokenN)rNrOrPrrrr�r��s��rr�c��eZdZdZd�Zd�Zy)�RaiseOnErrorTokenFilterz�Raise an exception when the lexer generates an error token.

    Options accepted:

    `excclass` : Exception class
      The exception class to raise.
      The default is `pygments.filters.ErrorToken`.

    .. versionadded:: 0.8
    c���tj|fi|��|jdt�|_	t|jt�st�y#t$rtd��wxYw)N�excclassz)excclass option is not an exception class)	r
r=r�r��	exception�
issubclass�	Exception�	TypeErrorr�rCrs  rr=z RaiseOnErrorTokenFilter.__init__s`������(��(� ���Z��<���	K��d�n�n�i�8���9���	K��I�J�J�	K�s� A�A)c#�^K�|D]$\}}|tur|j|��||f���&y�wr#)rr�rws     rrLzRaiseOnErrorTokenFilter.filters4����"�L�E�5���~��n�n�U�+�+���,��#�s�+-NrMrrrr�r��s��	�K�rr�c��eZdZdZd�Zd�Zy)�VisibleWhitespaceFilteruTConvert tabs, newlines and/or spaces to visible characters.

    Options accepted:

    `spaces` : string or bool
      If this is a one-character string, spaces will be replaces by this string.
      If it is another true value, spaces will be replaced by ``·`` (unicode
      MIDDLE DOT).  If it is a false value, spaces will not be replaced.  The
      default is ``False``.
    `tabs` : string or bool
      The same as for `spaces`, but the default replacement character is ``»``
      (unicode RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK).  The default value
      is ``False``.  Note: this will not work if the `tabsize` option for the
      lexer is nonzero, as tabs will already have been expanded then.
    `tabsize` : int
      If tabs are to be replaced by this filter (see the `tabs` option), this
      is the total number of characters that a tab should be expanded to.
      The default is ``8``.
    `newlines` : string or bool
      The same as for `spaces`, but the default replacement character is ``¶``
      (unicode PILCROW SIGN).  The default value is ``False``.
    `wstokentype` : bool
      If true, give whitespace the special `Whitespace` token type.  This allows
      styling the visible whitespace differently (e.g. greyed out), but it can
      disrupt background colors.  The default is ``True``.

    .. versionadded:: 0.8
    c��tj|fi|��dD]X\}}|j|d�}t|t�rt|�dk(rt
|||��Dt
|||xr|xsd��Zt|dd�}|jr|xjd|dz
zz
c_|jr|xjdz
c_	t|d	d
�|_y)N))�spaces�·)�tabsrU)�newlinesrjF���tabsize�� �
�wstokentypeT)r
r=r��
isinstancer�r*�setattrrr�r�r
�wstt)rCrr�default�optr�s      rr=z VisibleWhitespaceFilter.__init__3s�������(��(�2�M�D�'��+�+�d�E�*�C��#�s�#��C��A�
���d�C�(���d�S�_�W�%:��<�2��g�y�!�4���9�9��I�I���!��,�,�I��=�=��M�M�T�!�M� ��-��>��	rc#�����	K�|jrr|jxsd�|jxsd�	|jxsd�t	j
d�}���	fd�}|D] \}}t
|||t|�Ed{����"y|j|j|jc��	�|D]G\}}�r|jd��}�	r|jd�	�}�r|jd��}||f���Iy7�y�w)Nr��	r�z\sc�2��|dk(r�S|dk(r�S|dk(r�S|S)Nr�r�r�r)�wscharr�r�r�s ���rr/z3VisibleWhitespaceFilter.filter.<locals>.replacefuncKs,����S�=�!�M��t�^��K��t�^�#�O��
r)	r�r�r�r�r>r?r2r�replace)
rCrJrKr-r/r+r,r�r�r�s
       @@@rrLzVisibleWhitespaceFilter.filterDs�������9�9��[�[�'�C�F��9�9�$��D��}�}�,��H��J�J�u�%�E�
�!'���u�+�E�5�%��,7�9�9�9�!'�&*�[�[�$�)�)�T�]�]�"�F�D�(� &���u��!�M�M�#�v�6�E��!�M�M�$��5�E��!�M�M�$��9�E��U�l�"�!'�9�s�A7C8�<C6�=A:C8NrMrrrr�r�s���:?�"#rr�c�"�eZdZdZd�Zd�Zd�Zy)�GobbleFilterazGobbles source code lines (eats initial characters).

    This filter drops the first ``n`` characters off every line of code.  This
    may be useful when the source code fed to the lexer is indented by a fixed
    amount of space that isn't desired in the output.

    Options accepted:

    `n` : int
       The number of characters to gobble.

    .. versionadded:: 1.2
    c�T�tj|fi|��t|dd�|_y)N�nr)r
r=rr�r�s  rr=zGobbleFilter.__init__rs#������(��(��W�c�1�-��rc�L�|t|�kr||ddfSd|t|�z
fS)Nrr�)r*)rCr,�lefts   r�gobblezGobbleFilter.gobblevs2���#�e�*�����<��?�"��t�c�%�j�(�(�(rc#�8K�|j}|}|D]�\}}|jd�}|j|d|�\|d<}tdt	|��D]}|j|||�\||<}�dj|�}|dk7s�~||f����y�w)Nr�rr�r�)r��splitr��ranger*r@)	rCrJrKr�r�r+r,�parts�is	         rrLzGobbleFilter.filter|s������F�F����"�L�E�5��K�K��%�E�#�{�{�5��8�T�:��U�1�X�t��1�c�%�j�)��#'�;�;�u�Q�x��#;� ��q��4�*��I�I�e�$�E���{��U�l�"�#�s�BB�	BN)rNrOrPrQr=r�rLrrrr�r�ds���.�)�#rr�c��eZdZdZd�Zd�Zy)�TokenMergeFilterzwMerges consecutive tokens with the same token type in the output
    stream of a lexer.

    .. versionadded:: 1.2
    c�0�tj|fi|��yr#)r
r=r�s  rr=zTokenMergeFilter.__init__�s������(��(rc#�fK�d}d}|D]\}}||ur||z
}�|�||f��|}|}�|�||f��yy�wr#r)rCrJrK�current_type�
current_valuer+r,s       rrLzTokenMergeFilter.filter�sc�������
�"�L�E�5���$���&�
��+�&�
�5�5�$�� %�
�#��#��
�-�-�$�s�/1NrMrrrr�r��s���
)�.rr�)�
codetagify�keywordcase�	highlight�raiseonerror�
whitespacer��
tokenmergeru)$rQr>�pip._vendor.pygments.tokenrrrrrrr	�pip._vendor.pygments.filterr
�pip._vendor.pygments.utilrrr
rrr�pip._vendor.pygments.pluginrrrr!r2r4rSr{r�r�r�r�r�r�r�rrrr�<module>r�s���	�
����.�/�/�;��
@��"-�
"�#�F�#�@K	#�6�K	#�\#��#�8&#�&�&#�R	��	��f��:L#�f�L#�^$#�6�$#�N.�v�.�2$�'�)�-�-�"�&�"�	�rpython3.12/site-packages/pip/_vendor/pygments/filters/__init__.py000064400000116702151732702710021000 0ustar00"""
    pygments.filters
    ~~~~~~~~~~~~~~~~

    Module containing filter lookup functions and default
    filters.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re

from pip._vendor.pygments.token import String, Comment, Keyword, Name, Error, Whitespace, \
    string_to_tokentype
from pip._vendor.pygments.filter import Filter
from pip._vendor.pygments.util import get_list_opt, get_int_opt, get_bool_opt, \
    get_choice_opt, ClassNotFound, OptionError
from pip._vendor.pygments.plugin import find_plugin_filters


def find_filter_class(filtername):
    """Lookup a filter by name. Return None if not found."""
    if filtername in FILTERS:
        return FILTERS[filtername]
    for name, cls in find_plugin_filters():
        if name == filtername:
            return cls
    return None


def get_filter_by_name(filtername, **options):
    """Return an instantiated filter.

    Options are passed to the filter initializer if wanted.
    Raise a ClassNotFound if not found.
    """
    cls = find_filter_class(filtername)
    if cls:
        return cls(**options)
    else:
        raise ClassNotFound('filter %r not found' % filtername)


def get_all_filters():
    """Return a generator of all filter names."""
    yield from FILTERS
    for name, _ in find_plugin_filters():
        yield name


def _replace_special(ttype, value, regex, specialttype,
                     replacefunc=lambda x: x):
    last = 0
    for match in regex.finditer(value):
        start, end = match.start(), match.end()
        if start != last:
            yield ttype, value[last:start]
        yield specialttype, replacefunc(value[start:end])
        last = end
    if last != len(value):
        yield ttype, value[last:]


class CodeTagFilter(Filter):
    """Highlight special code tags in comments and docstrings.

    Options accepted:

    `codetags` : list of strings
       A list of strings that are flagged as code tags.  The default is to
       highlight ``XXX``, ``TODO``, ``FIXME``, ``BUG`` and ``NOTE``.

    .. versionchanged:: 2.13
       Now recognizes ``FIXME`` by default.
    """

    def __init__(self, **options):
        Filter.__init__(self, **options)
        tags = get_list_opt(options, 'codetags',
                            ['XXX', 'TODO', 'FIXME', 'BUG', 'NOTE'])
        self.tag_re = re.compile(r'\b(%s)\b' % '|'.join([
            re.escape(tag) for tag in tags if tag
        ]))

    def filter(self, lexer, stream):
        regex = self.tag_re
        for ttype, value in stream:
            if ttype in String.Doc or \
               ttype in Comment and \
               ttype not in Comment.Preproc:
                yield from _replace_special(ttype, value, regex, Comment.Special)
            else:
                yield ttype, value


class SymbolFilter(Filter):
    """Convert mathematical symbols such as \\<longrightarrow> in Isabelle
    or \\longrightarrow in LaTeX into Unicode characters.

    This is mostly useful for HTML or console output when you want to
    approximate the source rendering you'd see in an IDE.

    Options accepted:

    `lang` : string
       The symbol language. Must be one of ``'isabelle'`` or
       ``'latex'``.  The default is ``'isabelle'``.
    """

    latex_symbols = {
        '\\alpha'                : '\U000003b1',
        '\\beta'                 : '\U000003b2',
        '\\gamma'                : '\U000003b3',
        '\\delta'                : '\U000003b4',
        '\\varepsilon'           : '\U000003b5',
        '\\zeta'                 : '\U000003b6',
        '\\eta'                  : '\U000003b7',
        '\\vartheta'             : '\U000003b8',
        '\\iota'                 : '\U000003b9',
        '\\kappa'                : '\U000003ba',
        '\\lambda'               : '\U000003bb',
        '\\mu'                   : '\U000003bc',
        '\\nu'                   : '\U000003bd',
        '\\xi'                   : '\U000003be',
        '\\pi'                   : '\U000003c0',
        '\\varrho'               : '\U000003c1',
        '\\sigma'                : '\U000003c3',
        '\\tau'                  : '\U000003c4',
        '\\upsilon'              : '\U000003c5',
        '\\varphi'               : '\U000003c6',
        '\\chi'                  : '\U000003c7',
        '\\psi'                  : '\U000003c8',
        '\\omega'                : '\U000003c9',
        '\\Gamma'                : '\U00000393',
        '\\Delta'                : '\U00000394',
        '\\Theta'                : '\U00000398',
        '\\Lambda'               : '\U0000039b',
        '\\Xi'                   : '\U0000039e',
        '\\Pi'                   : '\U000003a0',
        '\\Sigma'                : '\U000003a3',
        '\\Upsilon'              : '\U000003a5',
        '\\Phi'                  : '\U000003a6',
        '\\Psi'                  : '\U000003a8',
        '\\Omega'                : '\U000003a9',
        '\\leftarrow'            : '\U00002190',
        '\\longleftarrow'        : '\U000027f5',
        '\\rightarrow'           : '\U00002192',
        '\\longrightarrow'       : '\U000027f6',
        '\\Leftarrow'            : '\U000021d0',
        '\\Longleftarrow'        : '\U000027f8',
        '\\Rightarrow'           : '\U000021d2',
        '\\Longrightarrow'       : '\U000027f9',
        '\\leftrightarrow'       : '\U00002194',
        '\\longleftrightarrow'   : '\U000027f7',
        '\\Leftrightarrow'       : '\U000021d4',
        '\\Longleftrightarrow'   : '\U000027fa',
        '\\mapsto'               : '\U000021a6',
        '\\longmapsto'           : '\U000027fc',
        '\\relbar'               : '\U00002500',
        '\\Relbar'               : '\U00002550',
        '\\hookleftarrow'        : '\U000021a9',
        '\\hookrightarrow'       : '\U000021aa',
        '\\leftharpoondown'      : '\U000021bd',
        '\\rightharpoondown'     : '\U000021c1',
        '\\leftharpoonup'        : '\U000021bc',
        '\\rightharpoonup'       : '\U000021c0',
        '\\rightleftharpoons'    : '\U000021cc',
        '\\leadsto'              : '\U0000219d',
        '\\downharpoonleft'      : '\U000021c3',
        '\\downharpoonright'     : '\U000021c2',
        '\\upharpoonleft'        : '\U000021bf',
        '\\upharpoonright'       : '\U000021be',
        '\\restriction'          : '\U000021be',
        '\\uparrow'              : '\U00002191',
        '\\Uparrow'              : '\U000021d1',
        '\\downarrow'            : '\U00002193',
        '\\Downarrow'            : '\U000021d3',
        '\\updownarrow'          : '\U00002195',
        '\\Updownarrow'          : '\U000021d5',
        '\\langle'               : '\U000027e8',
        '\\rangle'               : '\U000027e9',
        '\\lceil'                : '\U00002308',
        '\\rceil'                : '\U00002309',
        '\\lfloor'               : '\U0000230a',
        '\\rfloor'               : '\U0000230b',
        '\\flqq'                 : '\U000000ab',
        '\\frqq'                 : '\U000000bb',
        '\\bot'                  : '\U000022a5',
        '\\top'                  : '\U000022a4',
        '\\wedge'                : '\U00002227',
        '\\bigwedge'             : '\U000022c0',
        '\\vee'                  : '\U00002228',
        '\\bigvee'               : '\U000022c1',
        '\\forall'               : '\U00002200',
        '\\exists'               : '\U00002203',
        '\\nexists'              : '\U00002204',
        '\\neg'                  : '\U000000ac',
        '\\Box'                  : '\U000025a1',
        '\\Diamond'              : '\U000025c7',
        '\\vdash'                : '\U000022a2',
        '\\models'               : '\U000022a8',
        '\\dashv'                : '\U000022a3',
        '\\surd'                 : '\U0000221a',
        '\\le'                   : '\U00002264',
        '\\ge'                   : '\U00002265',
        '\\ll'                   : '\U0000226a',
        '\\gg'                   : '\U0000226b',
        '\\lesssim'              : '\U00002272',
        '\\gtrsim'               : '\U00002273',
        '\\lessapprox'           : '\U00002a85',
        '\\gtrapprox'            : '\U00002a86',
        '\\in'                   : '\U00002208',
        '\\notin'                : '\U00002209',
        '\\subset'               : '\U00002282',
        '\\supset'               : '\U00002283',
        '\\subseteq'             : '\U00002286',
        '\\supseteq'             : '\U00002287',
        '\\sqsubset'             : '\U0000228f',
        '\\sqsupset'             : '\U00002290',
        '\\sqsubseteq'           : '\U00002291',
        '\\sqsupseteq'           : '\U00002292',
        '\\cap'                  : '\U00002229',
        '\\bigcap'               : '\U000022c2',
        '\\cup'                  : '\U0000222a',
        '\\bigcup'               : '\U000022c3',
        '\\sqcup'                : '\U00002294',
        '\\bigsqcup'             : '\U00002a06',
        '\\sqcap'                : '\U00002293',
        '\\Bigsqcap'             : '\U00002a05',
        '\\setminus'             : '\U00002216',
        '\\propto'               : '\U0000221d',
        '\\uplus'                : '\U0000228e',
        '\\bigplus'              : '\U00002a04',
        '\\sim'                  : '\U0000223c',
        '\\doteq'                : '\U00002250',
        '\\simeq'                : '\U00002243',
        '\\approx'               : '\U00002248',
        '\\asymp'                : '\U0000224d',
        '\\cong'                 : '\U00002245',
        '\\equiv'                : '\U00002261',
        '\\Join'                 : '\U000022c8',
        '\\bowtie'               : '\U00002a1d',
        '\\prec'                 : '\U0000227a',
        '\\succ'                 : '\U0000227b',
        '\\preceq'               : '\U0000227c',
        '\\succeq'               : '\U0000227d',
        '\\parallel'             : '\U00002225',
        '\\mid'                  : '\U000000a6',
        '\\pm'                   : '\U000000b1',
        '\\mp'                   : '\U00002213',
        '\\times'                : '\U000000d7',
        '\\div'                  : '\U000000f7',
        '\\cdot'                 : '\U000022c5',
        '\\star'                 : '\U000022c6',
        '\\circ'                 : '\U00002218',
        '\\dagger'               : '\U00002020',
        '\\ddagger'              : '\U00002021',
        '\\lhd'                  : '\U000022b2',
        '\\rhd'                  : '\U000022b3',
        '\\unlhd'                : '\U000022b4',
        '\\unrhd'                : '\U000022b5',
        '\\triangleleft'         : '\U000025c3',
        '\\triangleright'        : '\U000025b9',
        '\\triangle'             : '\U000025b3',
        '\\triangleq'            : '\U0000225c',
        '\\oplus'                : '\U00002295',
        '\\bigoplus'             : '\U00002a01',
        '\\otimes'               : '\U00002297',
        '\\bigotimes'            : '\U00002a02',
        '\\odot'                 : '\U00002299',
        '\\bigodot'              : '\U00002a00',
        '\\ominus'               : '\U00002296',
        '\\oslash'               : '\U00002298',
        '\\dots'                 : '\U00002026',
        '\\cdots'                : '\U000022ef',
        '\\sum'                  : '\U00002211',
        '\\prod'                 : '\U0000220f',
        '\\coprod'               : '\U00002210',
        '\\infty'                : '\U0000221e',
        '\\int'                  : '\U0000222b',
        '\\oint'                 : '\U0000222e',
        '\\clubsuit'             : '\U00002663',
        '\\diamondsuit'          : '\U00002662',
        '\\heartsuit'            : '\U00002661',
        '\\spadesuit'            : '\U00002660',
        '\\aleph'                : '\U00002135',
        '\\emptyset'             : '\U00002205',
        '\\nabla'                : '\U00002207',
        '\\partial'              : '\U00002202',
        '\\flat'                 : '\U0000266d',
        '\\natural'              : '\U0000266e',
        '\\sharp'                : '\U0000266f',
        '\\angle'                : '\U00002220',
        '\\copyright'            : '\U000000a9',
        '\\textregistered'       : '\U000000ae',
        '\\textonequarter'       : '\U000000bc',
        '\\textonehalf'          : '\U000000bd',
        '\\textthreequarters'    : '\U000000be',
        '\\textordfeminine'      : '\U000000aa',
        '\\textordmasculine'     : '\U000000ba',
        '\\euro'                 : '\U000020ac',
        '\\pounds'               : '\U000000a3',
        '\\yen'                  : '\U000000a5',
        '\\textcent'             : '\U000000a2',
        '\\textcurrency'         : '\U000000a4',
        '\\textdegree'           : '\U000000b0',
    }

    isabelle_symbols = {
        '\\<zero>'                 : '\U0001d7ec',
        '\\<one>'                  : '\U0001d7ed',
        '\\<two>'                  : '\U0001d7ee',
        '\\<three>'                : '\U0001d7ef',
        '\\<four>'                 : '\U0001d7f0',
        '\\<five>'                 : '\U0001d7f1',
        '\\<six>'                  : '\U0001d7f2',
        '\\<seven>'                : '\U0001d7f3',
        '\\<eight>'                : '\U0001d7f4',
        '\\<nine>'                 : '\U0001d7f5',
        '\\<A>'                    : '\U0001d49c',
        '\\<B>'                    : '\U0000212c',
        '\\<C>'                    : '\U0001d49e',
        '\\<D>'                    : '\U0001d49f',
        '\\<E>'                    : '\U00002130',
        '\\<F>'                    : '\U00002131',
        '\\<G>'                    : '\U0001d4a2',
        '\\<H>'                    : '\U0000210b',
        '\\<I>'                    : '\U00002110',
        '\\<J>'                    : '\U0001d4a5',
        '\\<K>'                    : '\U0001d4a6',
        '\\<L>'                    : '\U00002112',
        '\\<M>'                    : '\U00002133',
        '\\<N>'                    : '\U0001d4a9',
        '\\<O>'                    : '\U0001d4aa',
        '\\<P>'                    : '\U0001d4ab',
        '\\<Q>'                    : '\U0001d4ac',
        '\\<R>'                    : '\U0000211b',
        '\\<S>'                    : '\U0001d4ae',
        '\\<T>'                    : '\U0001d4af',
        '\\<U>'                    : '\U0001d4b0',
        '\\<V>'                    : '\U0001d4b1',
        '\\<W>'                    : '\U0001d4b2',
        '\\<X>'                    : '\U0001d4b3',
        '\\<Y>'                    : '\U0001d4b4',
        '\\<Z>'                    : '\U0001d4b5',
        '\\<a>'                    : '\U0001d5ba',
        '\\<b>'                    : '\U0001d5bb',
        '\\<c>'                    : '\U0001d5bc',
        '\\<d>'                    : '\U0001d5bd',
        '\\<e>'                    : '\U0001d5be',
        '\\<f>'                    : '\U0001d5bf',
        '\\<g>'                    : '\U0001d5c0',
        '\\<h>'                    : '\U0001d5c1',
        '\\<i>'                    : '\U0001d5c2',
        '\\<j>'                    : '\U0001d5c3',
        '\\<k>'                    : '\U0001d5c4',
        '\\<l>'                    : '\U0001d5c5',
        '\\<m>'                    : '\U0001d5c6',
        '\\<n>'                    : '\U0001d5c7',
        '\\<o>'                    : '\U0001d5c8',
        '\\<p>'                    : '\U0001d5c9',
        '\\<q>'                    : '\U0001d5ca',
        '\\<r>'                    : '\U0001d5cb',
        '\\<s>'                    : '\U0001d5cc',
        '\\<t>'                    : '\U0001d5cd',
        '\\<u>'                    : '\U0001d5ce',
        '\\<v>'                    : '\U0001d5cf',
        '\\<w>'                    : '\U0001d5d0',
        '\\<x>'                    : '\U0001d5d1',
        '\\<y>'                    : '\U0001d5d2',
        '\\<z>'                    : '\U0001d5d3',
        '\\<AA>'                   : '\U0001d504',
        '\\<BB>'                   : '\U0001d505',
        '\\<CC>'                   : '\U0000212d',
        '\\<DD>'                   : '\U0001d507',
        '\\<EE>'                   : '\U0001d508',
        '\\<FF>'                   : '\U0001d509',
        '\\<GG>'                   : '\U0001d50a',
        '\\<HH>'                   : '\U0000210c',
        '\\<II>'                   : '\U00002111',
        '\\<JJ>'                   : '\U0001d50d',
        '\\<KK>'                   : '\U0001d50e',
        '\\<LL>'                   : '\U0001d50f',
        '\\<MM>'                   : '\U0001d510',
        '\\<NN>'                   : '\U0001d511',
        '\\<OO>'                   : '\U0001d512',
        '\\<PP>'                   : '\U0001d513',
        '\\<QQ>'                   : '\U0001d514',
        '\\<RR>'                   : '\U0000211c',
        '\\<SS>'                   : '\U0001d516',
        '\\<TT>'                   : '\U0001d517',
        '\\<UU>'                   : '\U0001d518',
        '\\<VV>'                   : '\U0001d519',
        '\\<WW>'                   : '\U0001d51a',
        '\\<XX>'                   : '\U0001d51b',
        '\\<YY>'                   : '\U0001d51c',
        '\\<ZZ>'                   : '\U00002128',
        '\\<aa>'                   : '\U0001d51e',
        '\\<bb>'                   : '\U0001d51f',
        '\\<cc>'                   : '\U0001d520',
        '\\<dd>'                   : '\U0001d521',
        '\\<ee>'                   : '\U0001d522',
        '\\<ff>'                   : '\U0001d523',
        '\\<gg>'                   : '\U0001d524',
        '\\<hh>'                   : '\U0001d525',
        '\\<ii>'                   : '\U0001d526',
        '\\<jj>'                   : '\U0001d527',
        '\\<kk>'                   : '\U0001d528',
        '\\<ll>'                   : '\U0001d529',
        '\\<mm>'                   : '\U0001d52a',
        '\\<nn>'                   : '\U0001d52b',
        '\\<oo>'                   : '\U0001d52c',
        '\\<pp>'                   : '\U0001d52d',
        '\\<qq>'                   : '\U0001d52e',
        '\\<rr>'                   : '\U0001d52f',
        '\\<ss>'                   : '\U0001d530',
        '\\<tt>'                   : '\U0001d531',
        '\\<uu>'                   : '\U0001d532',
        '\\<vv>'                   : '\U0001d533',
        '\\<ww>'                   : '\U0001d534',
        '\\<xx>'                   : '\U0001d535',
        '\\<yy>'                   : '\U0001d536',
        '\\<zz>'                   : '\U0001d537',
        '\\<alpha>'                : '\U000003b1',
        '\\<beta>'                 : '\U000003b2',
        '\\<gamma>'                : '\U000003b3',
        '\\<delta>'                : '\U000003b4',
        '\\<epsilon>'              : '\U000003b5',
        '\\<zeta>'                 : '\U000003b6',
        '\\<eta>'                  : '\U000003b7',
        '\\<theta>'                : '\U000003b8',
        '\\<iota>'                 : '\U000003b9',
        '\\<kappa>'                : '\U000003ba',
        '\\<lambda>'               : '\U000003bb',
        '\\<mu>'                   : '\U000003bc',
        '\\<nu>'                   : '\U000003bd',
        '\\<xi>'                   : '\U000003be',
        '\\<pi>'                   : '\U000003c0',
        '\\<rho>'                  : '\U000003c1',
        '\\<sigma>'                : '\U000003c3',
        '\\<tau>'                  : '\U000003c4',
        '\\<upsilon>'              : '\U000003c5',
        '\\<phi>'                  : '\U000003c6',
        '\\<chi>'                  : '\U000003c7',
        '\\<psi>'                  : '\U000003c8',
        '\\<omega>'                : '\U000003c9',
        '\\<Gamma>'                : '\U00000393',
        '\\<Delta>'                : '\U00000394',
        '\\<Theta>'                : '\U00000398',
        '\\<Lambda>'               : '\U0000039b',
        '\\<Xi>'                   : '\U0000039e',
        '\\<Pi>'                   : '\U000003a0',
        '\\<Sigma>'                : '\U000003a3',
        '\\<Upsilon>'              : '\U000003a5',
        '\\<Phi>'                  : '\U000003a6',
        '\\<Psi>'                  : '\U000003a8',
        '\\<Omega>'                : '\U000003a9',
        '\\<bool>'                 : '\U0001d539',
        '\\<complex>'              : '\U00002102',
        '\\<nat>'                  : '\U00002115',
        '\\<rat>'                  : '\U0000211a',
        '\\<real>'                 : '\U0000211d',
        '\\<int>'                  : '\U00002124',
        '\\<leftarrow>'            : '\U00002190',
        '\\<longleftarrow>'        : '\U000027f5',
        '\\<rightarrow>'           : '\U00002192',
        '\\<longrightarrow>'       : '\U000027f6',
        '\\<Leftarrow>'            : '\U000021d0',
        '\\<Longleftarrow>'        : '\U000027f8',
        '\\<Rightarrow>'           : '\U000021d2',
        '\\<Longrightarrow>'       : '\U000027f9',
        '\\<leftrightarrow>'       : '\U00002194',
        '\\<longleftrightarrow>'   : '\U000027f7',
        '\\<Leftrightarrow>'       : '\U000021d4',
        '\\<Longleftrightarrow>'   : '\U000027fa',
        '\\<mapsto>'               : '\U000021a6',
        '\\<longmapsto>'           : '\U000027fc',
        '\\<midarrow>'             : '\U00002500',
        '\\<Midarrow>'             : '\U00002550',
        '\\<hookleftarrow>'        : '\U000021a9',
        '\\<hookrightarrow>'       : '\U000021aa',
        '\\<leftharpoondown>'      : '\U000021bd',
        '\\<rightharpoondown>'     : '\U000021c1',
        '\\<leftharpoonup>'        : '\U000021bc',
        '\\<rightharpoonup>'       : '\U000021c0',
        '\\<rightleftharpoons>'    : '\U000021cc',
        '\\<leadsto>'              : '\U0000219d',
        '\\<downharpoonleft>'      : '\U000021c3',
        '\\<downharpoonright>'     : '\U000021c2',
        '\\<upharpoonleft>'        : '\U000021bf',
        '\\<upharpoonright>'       : '\U000021be',
        '\\<restriction>'          : '\U000021be',
        '\\<Colon>'                : '\U00002237',
        '\\<up>'                   : '\U00002191',
        '\\<Up>'                   : '\U000021d1',
        '\\<down>'                 : '\U00002193',
        '\\<Down>'                 : '\U000021d3',
        '\\<updown>'               : '\U00002195',
        '\\<Updown>'               : '\U000021d5',
        '\\<langle>'               : '\U000027e8',
        '\\<rangle>'               : '\U000027e9',
        '\\<lceil>'                : '\U00002308',
        '\\<rceil>'                : '\U00002309',
        '\\<lfloor>'               : '\U0000230a',
        '\\<rfloor>'               : '\U0000230b',
        '\\<lparr>'                : '\U00002987',
        '\\<rparr>'                : '\U00002988',
        '\\<lbrakk>'               : '\U000027e6',
        '\\<rbrakk>'               : '\U000027e7',
        '\\<lbrace>'               : '\U00002983',
        '\\<rbrace>'               : '\U00002984',
        '\\<guillemotleft>'        : '\U000000ab',
        '\\<guillemotright>'       : '\U000000bb',
        '\\<bottom>'               : '\U000022a5',
        '\\<top>'                  : '\U000022a4',
        '\\<and>'                  : '\U00002227',
        '\\<And>'                  : '\U000022c0',
        '\\<or>'                   : '\U00002228',
        '\\<Or>'                   : '\U000022c1',
        '\\<forall>'               : '\U00002200',
        '\\<exists>'               : '\U00002203',
        '\\<nexists>'              : '\U00002204',
        '\\<not>'                  : '\U000000ac',
        '\\<box>'                  : '\U000025a1',
        '\\<diamond>'              : '\U000025c7',
        '\\<turnstile>'            : '\U000022a2',
        '\\<Turnstile>'            : '\U000022a8',
        '\\<tturnstile>'           : '\U000022a9',
        '\\<TTurnstile>'           : '\U000022ab',
        '\\<stileturn>'            : '\U000022a3',
        '\\<surd>'                 : '\U0000221a',
        '\\<le>'                   : '\U00002264',
        '\\<ge>'                   : '\U00002265',
        '\\<lless>'                : '\U0000226a',
        '\\<ggreater>'             : '\U0000226b',
        '\\<lesssim>'              : '\U00002272',
        '\\<greatersim>'           : '\U00002273',
        '\\<lessapprox>'           : '\U00002a85',
        '\\<greaterapprox>'        : '\U00002a86',
        '\\<in>'                   : '\U00002208',
        '\\<notin>'                : '\U00002209',
        '\\<subset>'               : '\U00002282',
        '\\<supset>'               : '\U00002283',
        '\\<subseteq>'             : '\U00002286',
        '\\<supseteq>'             : '\U00002287',
        '\\<sqsubset>'             : '\U0000228f',
        '\\<sqsupset>'             : '\U00002290',
        '\\<sqsubseteq>'           : '\U00002291',
        '\\<sqsupseteq>'           : '\U00002292',
        '\\<inter>'                : '\U00002229',
        '\\<Inter>'                : '\U000022c2',
        '\\<union>'                : '\U0000222a',
        '\\<Union>'                : '\U000022c3',
        '\\<squnion>'              : '\U00002294',
        '\\<Squnion>'              : '\U00002a06',
        '\\<sqinter>'              : '\U00002293',
        '\\<Sqinter>'              : '\U00002a05',
        '\\<setminus>'             : '\U00002216',
        '\\<propto>'               : '\U0000221d',
        '\\<uplus>'                : '\U0000228e',
        '\\<Uplus>'                : '\U00002a04',
        '\\<noteq>'                : '\U00002260',
        '\\<sim>'                  : '\U0000223c',
        '\\<doteq>'                : '\U00002250',
        '\\<simeq>'                : '\U00002243',
        '\\<approx>'               : '\U00002248',
        '\\<asymp>'                : '\U0000224d',
        '\\<cong>'                 : '\U00002245',
        '\\<smile>'                : '\U00002323',
        '\\<equiv>'                : '\U00002261',
        '\\<frown>'                : '\U00002322',
        '\\<Join>'                 : '\U000022c8',
        '\\<bowtie>'               : '\U00002a1d',
        '\\<prec>'                 : '\U0000227a',
        '\\<succ>'                 : '\U0000227b',
        '\\<preceq>'               : '\U0000227c',
        '\\<succeq>'               : '\U0000227d',
        '\\<parallel>'             : '\U00002225',
        '\\<bar>'                  : '\U000000a6',
        '\\<plusminus>'            : '\U000000b1',
        '\\<minusplus>'            : '\U00002213',
        '\\<times>'                : '\U000000d7',
        '\\<div>'                  : '\U000000f7',
        '\\<cdot>'                 : '\U000022c5',
        '\\<star>'                 : '\U000022c6',
        '\\<bullet>'               : '\U00002219',
        '\\<circ>'                 : '\U00002218',
        '\\<dagger>'               : '\U00002020',
        '\\<ddagger>'              : '\U00002021',
        '\\<lhd>'                  : '\U000022b2',
        '\\<rhd>'                  : '\U000022b3',
        '\\<unlhd>'                : '\U000022b4',
        '\\<unrhd>'                : '\U000022b5',
        '\\<triangleleft>'         : '\U000025c3',
        '\\<triangleright>'        : '\U000025b9',
        '\\<triangle>'             : '\U000025b3',
        '\\<triangleq>'            : '\U0000225c',
        '\\<oplus>'                : '\U00002295',
        '\\<Oplus>'                : '\U00002a01',
        '\\<otimes>'               : '\U00002297',
        '\\<Otimes>'               : '\U00002a02',
        '\\<odot>'                 : '\U00002299',
        '\\<Odot>'                 : '\U00002a00',
        '\\<ominus>'               : '\U00002296',
        '\\<oslash>'               : '\U00002298',
        '\\<dots>'                 : '\U00002026',
        '\\<cdots>'                : '\U000022ef',
        '\\<Sum>'                  : '\U00002211',
        '\\<Prod>'                 : '\U0000220f',
        '\\<Coprod>'               : '\U00002210',
        '\\<infinity>'             : '\U0000221e',
        '\\<integral>'             : '\U0000222b',
        '\\<ointegral>'            : '\U0000222e',
        '\\<clubsuit>'             : '\U00002663',
        '\\<diamondsuit>'          : '\U00002662',
        '\\<heartsuit>'            : '\U00002661',
        '\\<spadesuit>'            : '\U00002660',
        '\\<aleph>'                : '\U00002135',
        '\\<emptyset>'             : '\U00002205',
        '\\<nabla>'                : '\U00002207',
        '\\<partial>'              : '\U00002202',
        '\\<flat>'                 : '\U0000266d',
        '\\<natural>'              : '\U0000266e',
        '\\<sharp>'                : '\U0000266f',
        '\\<angle>'                : '\U00002220',
        '\\<copyright>'            : '\U000000a9',
        '\\<registered>'           : '\U000000ae',
        '\\<hyphen>'               : '\U000000ad',
        '\\<inverse>'              : '\U000000af',
        '\\<onequarter>'           : '\U000000bc',
        '\\<onehalf>'              : '\U000000bd',
        '\\<threequarters>'        : '\U000000be',
        '\\<ordfeminine>'          : '\U000000aa',
        '\\<ordmasculine>'         : '\U000000ba',
        '\\<section>'              : '\U000000a7',
        '\\<paragraph>'            : '\U000000b6',
        '\\<exclamdown>'           : '\U000000a1',
        '\\<questiondown>'         : '\U000000bf',
        '\\<euro>'                 : '\U000020ac',
        '\\<pounds>'               : '\U000000a3',
        '\\<yen>'                  : '\U000000a5',
        '\\<cent>'                 : '\U000000a2',
        '\\<currency>'             : '\U000000a4',
        '\\<degree>'               : '\U000000b0',
        '\\<amalg>'                : '\U00002a3f',
        '\\<mho>'                  : '\U00002127',
        '\\<lozenge>'              : '\U000025ca',
        '\\<wp>'                   : '\U00002118',
        '\\<wrong>'                : '\U00002240',
        '\\<struct>'               : '\U000022c4',
        '\\<acute>'                : '\U000000b4',
        '\\<index>'                : '\U00000131',
        '\\<dieresis>'             : '\U000000a8',
        '\\<cedilla>'              : '\U000000b8',
        '\\<hungarumlaut>'         : '\U000002dd',
        '\\<some>'                 : '\U000003f5',
        '\\<newline>'              : '\U000023ce',
        '\\<open>'                 : '\U00002039',
        '\\<close>'                : '\U0000203a',
        '\\<here>'                 : '\U00002302',
        '\\<^sub>'                 : '\U000021e9',
        '\\<^sup>'                 : '\U000021e7',
        '\\<^bold>'                : '\U00002759',
        '\\<^bsub>'                : '\U000021d8',
        '\\<^esub>'                : '\U000021d9',
        '\\<^bsup>'                : '\U000021d7',
        '\\<^esup>'                : '\U000021d6',
    }

    lang_map = {'isabelle' : isabelle_symbols, 'latex' : latex_symbols}

    def __init__(self, **options):
        Filter.__init__(self, **options)
        lang = get_choice_opt(options, 'lang',
                              ['isabelle', 'latex'], 'isabelle')
        self.symbols = self.lang_map[lang]

    def filter(self, lexer, stream):
        for ttype, value in stream:
            if value in self.symbols:
                yield ttype, self.symbols[value]
            else:
                yield ttype, value


class KeywordCaseFilter(Filter):
    """Convert keywords to lowercase or uppercase or capitalize them, which
    means first letter uppercase, rest lowercase.

    This can be useful e.g. if you highlight Pascal code and want to adapt the
    code to your styleguide.

    Options accepted:

    `case` : string
       The casing to convert keywords to. Must be one of ``'lower'``,
       ``'upper'`` or ``'capitalize'``.  The default is ``'lower'``.
    """

    def __init__(self, **options):
        Filter.__init__(self, **options)
        case = get_choice_opt(options, 'case',
                              ['lower', 'upper', 'capitalize'], 'lower')
        self.convert = getattr(str, case)

    def filter(self, lexer, stream):
        for ttype, value in stream:
            if ttype in Keyword:
                yield ttype, self.convert(value)
            else:
                yield ttype, value


class NameHighlightFilter(Filter):
    """Highlight a normal Name (and Name.*) token with a different token type.

    Example::

        filter = NameHighlightFilter(
            names=['foo', 'bar', 'baz'],
            tokentype=Name.Function,
        )

    This would highlight the names "foo", "bar" and "baz"
    as functions. `Name.Function` is the default token type.

    Options accepted:

    `names` : list of strings
      A list of names that should be given the different token type.
      There is no default.
    `tokentype` : TokenType or string
      A token type or a string containing a token type name that is
      used for highlighting the strings in `names`.  The default is
      `Name.Function`.
    """

    def __init__(self, **options):
        Filter.__init__(self, **options)
        self.names = set(get_list_opt(options, 'names', []))
        tokentype = options.get('tokentype')
        if tokentype:
            self.tokentype = string_to_tokentype(tokentype)
        else:
            self.tokentype = Name.Function

    def filter(self, lexer, stream):
        for ttype, value in stream:
            if ttype in Name and value in self.names:
                yield self.tokentype, value
            else:
                yield ttype, value


class ErrorToken(Exception):
    pass


class RaiseOnErrorTokenFilter(Filter):
    """Raise an exception when the lexer generates an error token.

    Options accepted:

    `excclass` : Exception class
      The exception class to raise.
      The default is `pygments.filters.ErrorToken`.

    .. versionadded:: 0.8
    """

    def __init__(self, **options):
        Filter.__init__(self, **options)
        self.exception = options.get('excclass', ErrorToken)
        try:
            # issubclass() will raise TypeError if first argument is not a class
            if not issubclass(self.exception, Exception):
                raise TypeError
        except TypeError:
            raise OptionError('excclass option is not an exception class')

    def filter(self, lexer, stream):
        for ttype, value in stream:
            if ttype is Error:
                raise self.exception(value)
            yield ttype, value


class VisibleWhitespaceFilter(Filter):
    """Convert tabs, newlines and/or spaces to visible characters.

    Options accepted:

    `spaces` : string or bool
      If this is a one-character string, spaces will be replaces by this string.
      If it is another true value, spaces will be replaced by ``·`` (unicode
      MIDDLE DOT).  If it is a false value, spaces will not be replaced.  The
      default is ``False``.
    `tabs` : string or bool
      The same as for `spaces`, but the default replacement character is ``»``
      (unicode RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK).  The default value
      is ``False``.  Note: this will not work if the `tabsize` option for the
      lexer is nonzero, as tabs will already have been expanded then.
    `tabsize` : int
      If tabs are to be replaced by this filter (see the `tabs` option), this
      is the total number of characters that a tab should be expanded to.
      The default is ``8``.
    `newlines` : string or bool
      The same as for `spaces`, but the default replacement character is ``¶``
      (unicode PILCROW SIGN).  The default value is ``False``.
    `wstokentype` : bool
      If true, give whitespace the special `Whitespace` token type.  This allows
      styling the visible whitespace differently (e.g. greyed out), but it can
      disrupt background colors.  The default is ``True``.

    .. versionadded:: 0.8
    """

    def __init__(self, **options):
        Filter.__init__(self, **options)
        for name, default in [('spaces',   '·'),
                              ('tabs',     '»'),
                              ('newlines', '¶')]:
            opt = options.get(name, False)
            if isinstance(opt, str) and len(opt) == 1:
                setattr(self, name, opt)
            else:
                setattr(self, name, (opt and default or ''))
        tabsize = get_int_opt(options, 'tabsize', 8)
        if self.tabs:
            self.tabs += ' ' * (tabsize - 1)
        if self.newlines:
            self.newlines += '\n'
        self.wstt = get_bool_opt(options, 'wstokentype', True)

    def filter(self, lexer, stream):
        if self.wstt:
            spaces = self.spaces or ' '
            tabs = self.tabs or '\t'
            newlines = self.newlines or '\n'
            regex = re.compile(r'\s')

            def replacefunc(wschar):
                if wschar == ' ':
                    return spaces
                elif wschar == '\t':
                    return tabs
                elif wschar == '\n':
                    return newlines
                return wschar

            for ttype, value in stream:
                yield from _replace_special(ttype, value, regex, Whitespace,
                                            replacefunc)
        else:
            spaces, tabs, newlines = self.spaces, self.tabs, self.newlines
            # simpler processing
            for ttype, value in stream:
                if spaces:
                    value = value.replace(' ', spaces)
                if tabs:
                    value = value.replace('\t', tabs)
                if newlines:
                    value = value.replace('\n', newlines)
                yield ttype, value


class GobbleFilter(Filter):
    """Gobbles source code lines (eats initial characters).

    This filter drops the first ``n`` characters off every line of code.  This
    may be useful when the source code fed to the lexer is indented by a fixed
    amount of space that isn't desired in the output.

    Options accepted:

    `n` : int
       The number of characters to gobble.

    .. versionadded:: 1.2
    """
    def __init__(self, **options):
        Filter.__init__(self, **options)
        self.n = get_int_opt(options, 'n', 0)

    def gobble(self, value, left):
        if left < len(value):
            return value[left:], 0
        else:
            return '', left - len(value)

    def filter(self, lexer, stream):
        n = self.n
        left = n  # How many characters left to gobble.
        for ttype, value in stream:
            # Remove ``left`` tokens from first line, ``n`` from all others.
            parts = value.split('\n')
            (parts[0], left) = self.gobble(parts[0], left)
            for i in range(1, len(parts)):
                (parts[i], left) = self.gobble(parts[i], n)
            value = '\n'.join(parts)

            if value != '':
                yield ttype, value


class TokenMergeFilter(Filter):
    """Merges consecutive tokens with the same token type in the output
    stream of a lexer.

    .. versionadded:: 1.2
    """
    def __init__(self, **options):
        Filter.__init__(self, **options)

    def filter(self, lexer, stream):
        current_type = None
        current_value = None
        for ttype, value in stream:
            if ttype is current_type:
                current_value += value
            else:
                if current_type is not None:
                    yield current_type, current_value
                current_type = ttype
                current_value = value
        if current_type is not None:
            yield current_type, current_value


FILTERS = {
    'codetagify':     CodeTagFilter,
    'keywordcase':    KeywordCaseFilter,
    'highlight':      NameHighlightFilter,
    'raiseonerror':   RaiseOnErrorTokenFilter,
    'whitespace':     VisibleWhitespaceFilter,
    'gobble':         GobbleFilter,
    'tokenmerge':     TokenMergeFilter,
    'symbols':        SymbolFilter,
}
python3.12/site-packages/pip/_vendor/pygments/lexer.py000064400000103472151732702710016710 0ustar00"""
    pygments.lexer
    ~~~~~~~~~~~~~~

    Base lexer classes.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re
import sys
import time

from pip._vendor.pygments.filter import apply_filters, Filter
from pip._vendor.pygments.filters import get_filter_by_name
from pip._vendor.pygments.token import Error, Text, Other, Whitespace, _TokenType
from pip._vendor.pygments.util import get_bool_opt, get_int_opt, get_list_opt, \
    make_analysator, Future, guess_decode
from pip._vendor.pygments.regexopt import regex_opt

__all__ = ['Lexer', 'RegexLexer', 'ExtendedRegexLexer', 'DelegatingLexer',
           'LexerContext', 'include', 'inherit', 'bygroups', 'using', 'this',
           'default', 'words', 'line_re']

line_re = re.compile('.*?\n')

_encoding_map = [(b'\xef\xbb\xbf', 'utf-8'),
                 (b'\xff\xfe\0\0', 'utf-32'),
                 (b'\0\0\xfe\xff', 'utf-32be'),
                 (b'\xff\xfe', 'utf-16'),
                 (b'\xfe\xff', 'utf-16be')]

_default_analyse = staticmethod(lambda x: 0.0)


class LexerMeta(type):
    """
    This metaclass automagically converts ``analyse_text`` methods into
    static methods which always return float values.
    """

    def __new__(mcs, name, bases, d):
        if 'analyse_text' in d:
            d['analyse_text'] = make_analysator(d['analyse_text'])
        return type.__new__(mcs, name, bases, d)


class Lexer(metaclass=LexerMeta):
    """
    Lexer for a specific language.

    See also :doc:`lexerdevelopment`, a high-level guide to writing
    lexers.

    Lexer classes have attributes used for choosing the most appropriate
    lexer based on various criteria.

    .. autoattribute:: name
       :no-value:
    .. autoattribute:: aliases
       :no-value:
    .. autoattribute:: filenames
       :no-value:
    .. autoattribute:: alias_filenames
    .. autoattribute:: mimetypes
       :no-value:
    .. autoattribute:: priority

    Lexers included in Pygments should have an additional attribute:

    .. autoattribute:: url
       :no-value:

    You can pass options to the constructor. The basic options recognized
    by all lexers and processed by the base `Lexer` class are:

    ``stripnl``
        Strip leading and trailing newlines from the input (default: True).
    ``stripall``
        Strip all leading and trailing whitespace from the input
        (default: False).
    ``ensurenl``
        Make sure that the input ends with a newline (default: True).  This
        is required for some lexers that consume input linewise.

        .. versionadded:: 1.3

    ``tabsize``
        If given and greater than 0, expand tabs in the input (default: 0).
    ``encoding``
        If given, must be an encoding name. This encoding will be used to
        convert the input string to Unicode, if it is not already a Unicode
        string (default: ``'guess'``, which uses a simple UTF-8 / Locale /
        Latin1 detection.  Can also be ``'chardet'`` to use the chardet
        library, if it is installed.
    ``inencoding``
        Overrides the ``encoding`` if given.
    """

    #: Full name of the lexer, in human-readable form
    name = None

    #: A list of short, unique identifiers that can be used to look
    #: up the lexer from a list, e.g., using `get_lexer_by_name()`.
    aliases = []

    #: A list of `fnmatch` patterns that match filenames which contain
    #: content for this lexer. The patterns in this list should be unique among
    #: all lexers.
    filenames = []

    #: A list of `fnmatch` patterns that match filenames which may or may not
    #: contain content for this lexer. This list is used by the
    #: :func:`.guess_lexer_for_filename()` function, to determine which lexers
    #: are then included in guessing the correct one. That means that
    #: e.g. every lexer for HTML and a template language should include
    #: ``\*.html`` in this list.
    alias_filenames = []

    #: A list of MIME types for content that can be lexed with this lexer.
    mimetypes = []

    #: Priority, should multiple lexers match and no content is provided
    priority = 0

    #: URL of the language specification/definition. Used in the Pygments
    #: documentation.
    url = None

    def __init__(self, **options):
        """
        This constructor takes arbitrary options as keyword arguments.
        Every subclass must first process its own options and then call
        the `Lexer` constructor, since it processes the basic
        options like `stripnl`.

        An example looks like this:

        .. sourcecode:: python

           def __init__(self, **options):
               self.compress = options.get('compress', '')
               Lexer.__init__(self, **options)

        As these options must all be specifiable as strings (due to the
        command line usage), there are various utility functions
        available to help with that, see `Utilities`_.
        """
        self.options = options
        self.stripnl = get_bool_opt(options, 'stripnl', True)
        self.stripall = get_bool_opt(options, 'stripall', False)
        self.ensurenl = get_bool_opt(options, 'ensurenl', True)
        self.tabsize = get_int_opt(options, 'tabsize', 0)
        self.encoding = options.get('encoding', 'guess')
        self.encoding = options.get('inencoding') or self.encoding
        self.filters = []
        for filter_ in get_list_opt(options, 'filters', ()):
            self.add_filter(filter_)

    def __repr__(self):
        if self.options:
            return '<pygments.lexers.%s with %r>' % (self.__class__.__name__,
                                                     self.options)
        else:
            return '<pygments.lexers.%s>' % self.__class__.__name__

    def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_)

    def analyse_text(text):
        """
        A static method which is called for lexer guessing.

        It should analyse the text and return a float in the range
        from ``0.0`` to ``1.0``.  If it returns ``0.0``, the lexer
        will not be selected as the most probable one, if it returns
        ``1.0``, it will be selected immediately.  This is used by
        `guess_lexer`.

        The `LexerMeta` metaclass automatically wraps this function so
        that it works like a static method (no ``self`` or ``cls``
        parameter) and the return value is automatically converted to
        `float`. If the return value is an object that is boolean `False`
        it's the same as if the return values was ``0.0``.
        """

    def get_tokens(self, text, unfiltered=False):
        """
        This method is the basic interface of a lexer. It is called by
        the `highlight()` function. It must process the text and return an
        iterable of ``(tokentype, value)`` pairs from `text`.

        Normally, you don't need to override this method. The default
        implementation processes the options recognized by all lexers
        (`stripnl`, `stripall` and so on), and then yields all tokens
        from `get_tokens_unprocessed()`, with the ``index`` dropped.

        If `unfiltered` is set to `True`, the filtering mechanism is
        bypassed even if filters are defined.
        """
        if not isinstance(text, str):
            if self.encoding == 'guess':
                text, _ = guess_decode(text)
            elif self.encoding == 'chardet':
                try:
                    from pip._vendor import chardet
                except ImportError as e:
                    raise ImportError('To enable chardet encoding guessing, '
                                      'please install the chardet library '
                                      'from http://chardet.feedparser.org/') from e
                # check for BOM first
                decoded = None
                for bom, encoding in _encoding_map:
                    if text.startswith(bom):
                        decoded = text[len(bom):].decode(encoding, 'replace')
                        break
                # no BOM found, so use chardet
                if decoded is None:
                    enc = chardet.detect(text[:1024])  # Guess using first 1KB
                    decoded = text.decode(enc.get('encoding') or 'utf-8',
                                          'replace')
                text = decoded
            else:
                text = text.decode(self.encoding)
                if text.startswith('\ufeff'):
                    text = text[len('\ufeff'):]
        else:
            if text.startswith('\ufeff'):
                text = text[len('\ufeff'):]

        # text now *is* a unicode string
        text = text.replace('\r\n', '\n')
        text = text.replace('\r', '\n')
        if self.stripall:
            text = text.strip()
        elif self.stripnl:
            text = text.strip('\n')
        if self.tabsize > 0:
            text = text.expandtabs(self.tabsize)
        if self.ensurenl and not text.endswith('\n'):
            text += '\n'

        def streamer():
            for _, t, v in self.get_tokens_unprocessed(text):
                yield t, v
        stream = streamer()
        if not unfiltered:
            stream = apply_filters(stream, self.filters, self)
        return stream

    def get_tokens_unprocessed(self, text):
        """
        This method should process the text and return an iterable of
        ``(index, tokentype, value)`` tuples where ``index`` is the starting
        position of the token within the input text.

        It must be overridden by subclasses. It is recommended to
        implement it as a generator to maximize effectiveness.
        """
        raise NotImplementedError


class DelegatingLexer(Lexer):
    """
    This lexer takes two lexer as arguments. A root lexer and
    a language lexer. First everything is scanned using the language
    lexer, afterwards all ``Other`` tokens are lexed using the root
    lexer.

    The lexers from the ``template`` lexer package use this base lexer.
    """

    def __init__(self, _root_lexer, _language_lexer, _needle=Other, **options):
        self.root_lexer = _root_lexer(**options)
        self.language_lexer = _language_lexer(**options)
        self.needle = _needle
        Lexer.__init__(self, **options)

    def get_tokens_unprocessed(self, text):
        buffered = ''
        insertions = []
        lng_buffer = []
        for i, t, v in self.language_lexer.get_tokens_unprocessed(text):
            if t is self.needle:
                if lng_buffer:
                    insertions.append((len(buffered), lng_buffer))
                    lng_buffer = []
                buffered += v
            else:
                lng_buffer.append((i, t, v))
        if lng_buffer:
            insertions.append((len(buffered), lng_buffer))
        return do_insertions(insertions,
                             self.root_lexer.get_tokens_unprocessed(buffered))


# ------------------------------------------------------------------------------
# RegexLexer and ExtendedRegexLexer
#


class include(str):  # pylint: disable=invalid-name
    """
    Indicates that a state should include rules from another state.
    """
    pass


class _inherit:
    """
    Indicates the a state should inherit from its superclass.
    """
    def __repr__(self):
        return 'inherit'

inherit = _inherit()  # pylint: disable=invalid-name


class combined(tuple):  # pylint: disable=invalid-name
    """
    Indicates a state combined from multiple states.
    """

    def __new__(cls, *args):
        return tuple.__new__(cls, args)

    def __init__(self, *args):
        # tuple.__init__ doesn't do anything
        pass


class _PseudoMatch:
    """
    A pseudo match object constructed from a string.
    """

    def __init__(self, start, text):
        self._text = text
        self._start = start

    def start(self, arg=None):
        return self._start

    def end(self, arg=None):
        return self._start + len(self._text)

    def group(self, arg=None):
        if arg:
            raise IndexError('No such group')
        return self._text

    def groups(self):
        return (self._text,)

    def groupdict(self):
        return {}


def bygroups(*args):
    """
    Callback that yields multiple actions for each group in the match.
    """
    def callback(lexer, match, ctx=None):
        for i, action in enumerate(args):
            if action is None:
                continue
            elif type(action) is _TokenType:
                data = match.group(i + 1)
                if data:
                    yield match.start(i + 1), action, data
            else:
                data = match.group(i + 1)
                if data is not None:
                    if ctx:
                        ctx.pos = match.start(i + 1)
                    for item in action(lexer,
                                       _PseudoMatch(match.start(i + 1), data), ctx):
                        if item:
                            yield item
        if ctx:
            ctx.pos = match.end()
    return callback


class _This:
    """
    Special singleton used for indicating the caller class.
    Used by ``using``.
    """

this = _This()


def using(_other, **kwargs):
    """
    Callback that processes the match with a different lexer.

    The keyword arguments are forwarded to the lexer, except `state` which
    is handled separately.

    `state` specifies the state that the new lexer will start in, and can
    be an enumerable such as ('root', 'inline', 'string') or a simple
    string which is assumed to be on top of the root state.

    Note: For that to work, `_other` must not be an `ExtendedRegexLexer`.
    """
    gt_kwargs = {}
    if 'state' in kwargs:
        s = kwargs.pop('state')
        if isinstance(s, (list, tuple)):
            gt_kwargs['stack'] = s
        else:
            gt_kwargs['stack'] = ('root', s)

    if _other is this:
        def callback(lexer, match, ctx=None):
            # if keyword arguments are given the callback
            # function has to create a new lexer instance
            if kwargs:
                # XXX: cache that somehow
                kwargs.update(lexer.options)
                lx = lexer.__class__(**kwargs)
            else:
                lx = lexer
            s = match.start()
            for i, t, v in lx.get_tokens_unprocessed(match.group(), **gt_kwargs):
                yield i + s, t, v
            if ctx:
                ctx.pos = match.end()
    else:
        def callback(lexer, match, ctx=None):
            # XXX: cache that somehow
            kwargs.update(lexer.options)
            lx = _other(**kwargs)

            s = match.start()
            for i, t, v in lx.get_tokens_unprocessed(match.group(), **gt_kwargs):
                yield i + s, t, v
            if ctx:
                ctx.pos = match.end()
    return callback


class default:
    """
    Indicates a state or state action (e.g. #pop) to apply.
    For example default('#pop') is equivalent to ('', Token, '#pop')
    Note that state tuples may be used as well.

    .. versionadded:: 2.0
    """
    def __init__(self, state):
        self.state = state


class words(Future):
    """
    Indicates a list of literal words that is transformed into an optimized
    regex that matches any of the words.

    .. versionadded:: 2.0
    """
    def __init__(self, words, prefix='', suffix=''):
        self.words = words
        self.prefix = prefix
        self.suffix = suffix

    def get(self):
        return regex_opt(self.words, prefix=self.prefix, suffix=self.suffix)


class RegexLexerMeta(LexerMeta):
    """
    Metaclass for RegexLexer, creates the self._tokens attribute from
    self.tokens on the first instantiation.
    """

    def _process_regex(cls, regex, rflags, state):
        """Preprocess the regular expression component of a token definition."""
        if isinstance(regex, Future):
            regex = regex.get()
        return re.compile(regex, rflags).match

    def _process_token(cls, token):
        """Preprocess the token component of a token definition."""
        assert type(token) is _TokenType or callable(token), \
            'token type must be simple type or callable, not %r' % (token,)
        return token

    def _process_new_state(cls, new_state, unprocessed, processed):
        """Preprocess the state transition action of a token definition."""
        if isinstance(new_state, str):
            # an existing state
            if new_state == '#pop':
                return -1
            elif new_state in unprocessed:
                return (new_state,)
            elif new_state == '#push':
                return new_state
            elif new_state[:5] == '#pop:':
                return -int(new_state[5:])
            else:
                assert False, 'unknown new state %r' % new_state
        elif isinstance(new_state, combined):
            # combine a new state from existing ones
            tmp_state = '_tmp_%d' % cls._tmpname
            cls._tmpname += 1
            itokens = []
            for istate in new_state:
                assert istate != new_state, 'circular state ref %r' % istate
                itokens.extend(cls._process_state(unprocessed,
                                                  processed, istate))
            processed[tmp_state] = itokens
            return (tmp_state,)
        elif isinstance(new_state, tuple):
            # push more than one state
            for istate in new_state:
                assert (istate in unprocessed or
                        istate in ('#pop', '#push')), \
                    'unknown new state ' + istate
            return new_state
        else:
            assert False, 'unknown new state def %r' % new_state

    def _process_state(cls, unprocessed, processed, state):
        """Preprocess a single state definition."""
        assert type(state) is str, "wrong state name %r" % state
        assert state[0] != '#', "invalid state name %r" % state
        if state in processed:
            return processed[state]
        tokens = processed[state] = []
        rflags = cls.flags
        for tdef in unprocessed[state]:
            if isinstance(tdef, include):
                # it's a state reference
                assert tdef != state, "circular state reference %r" % state
                tokens.extend(cls._process_state(unprocessed, processed,
                                                 str(tdef)))
                continue
            if isinstance(tdef, _inherit):
                # should be processed already, but may not in the case of:
                # 1. the state has no counterpart in any parent
                # 2. the state includes more than one 'inherit'
                continue
            if isinstance(tdef, default):
                new_state = cls._process_new_state(tdef.state, unprocessed, processed)
                tokens.append((re.compile('').match, None, new_state))
                continue

            assert type(tdef) is tuple, "wrong rule def %r" % tdef

            try:
                rex = cls._process_regex(tdef[0], rflags, state)
            except Exception as err:
                raise ValueError("uncompilable regex %r in state %r of %r: %s" %
                                 (tdef[0], state, cls, err)) from err

            token = cls._process_token(tdef[1])

            if len(tdef) == 2:
                new_state = None
            else:
                new_state = cls._process_new_state(tdef[2],
                                                   unprocessed, processed)

            tokens.append((rex, token, new_state))
        return tokens

    def process_tokendef(cls, name, tokendefs=None):
        """Preprocess a dictionary of token definitions."""
        processed = cls._all_tokens[name] = {}
        tokendefs = tokendefs or cls.tokens[name]
        for state in list(tokendefs):
            cls._process_state(tokendefs, processed, state)
        return processed

    def get_tokendefs(cls):
        """
        Merge tokens from superclasses in MRO order, returning a single tokendef
        dictionary.

        Any state that is not defined by a subclass will be inherited
        automatically.  States that *are* defined by subclasses will, by
        default, override that state in the superclass.  If a subclass wishes to
        inherit definitions from a superclass, it can use the special value
        "inherit", which will cause the superclass' state definition to be
        included at that point in the state.
        """
        tokens = {}
        inheritable = {}
        for c in cls.__mro__:
            toks = c.__dict__.get('tokens', {})

            for state, items in toks.items():
                curitems = tokens.get(state)
                if curitems is None:
                    # N.b. because this is assigned by reference, sufficiently
                    # deep hierarchies are processed incrementally (e.g. for
                    # A(B), B(C), C(RegexLexer), B will be premodified so X(B)
                    # will not see any inherits in B).
                    tokens[state] = items
                    try:
                        inherit_ndx = items.index(inherit)
                    except ValueError:
                        continue
                    inheritable[state] = inherit_ndx
                    continue

                inherit_ndx = inheritable.pop(state, None)
                if inherit_ndx is None:
                    continue

                # Replace the "inherit" value with the items
                curitems[inherit_ndx:inherit_ndx+1] = items
                try:
                    # N.b. this is the index in items (that is, the superclass
                    # copy), so offset required when storing below.
                    new_inh_ndx = items.index(inherit)
                except ValueError:
                    pass
                else:
                    inheritable[state] = inherit_ndx + new_inh_ndx

        return tokens

    def __call__(cls, *args, **kwds):
        """Instantiate cls after preprocessing its token definitions."""
        if '_tokens' not in cls.__dict__:
            cls._all_tokens = {}
            cls._tmpname = 0
            if hasattr(cls, 'token_variants') and cls.token_variants:
                # don't process yet
                pass
            else:
                cls._tokens = cls.process_tokendef('', cls.get_tokendefs())

        return type.__call__(cls, *args, **kwds)


class RegexLexer(Lexer, metaclass=RegexLexerMeta):
    """
    Base for simple stateful regular expression-based lexers.
    Simplifies the lexing process so that you need only
    provide a list of states and regular expressions.
    """

    #: Flags for compiling the regular expressions.
    #: Defaults to MULTILINE.
    flags = re.MULTILINE

    #: At all time there is a stack of states. Initially, the stack contains
    #: a single state 'root'. The top of the stack is called "the current state".
    #:
    #: Dict of ``{'state': [(regex, tokentype, new_state), ...], ...}``
    #:
    #: ``new_state`` can be omitted to signify no state transition.
    #: If ``new_state`` is a string, it is pushed on the stack. This ensure
    #: the new current state is ``new_state``.
    #: If ``new_state`` is a tuple of strings, all of those strings are pushed
    #: on the stack and the current state will be the last element of the list.
    #: ``new_state`` can also be ``combined('state1', 'state2', ...)``
    #: to signify a new, anonymous state combined from the rules of two
    #: or more existing ones.
    #: Furthermore, it can be '#pop' to signify going back one step in
    #: the state stack, or '#push' to push the current state on the stack
    #: again. Note that if you push while in a combined state, the combined
    #: state itself is pushed, and not only the state in which the rule is
    #: defined.
    #:
    #: The tuple can also be replaced with ``include('state')``, in which
    #: case the rules from the state named by the string are included in the
    #: current one.
    tokens = {}

    def get_tokens_unprocessed(self, text, stack=('root',)):
        """
        Split ``text`` into (tokentype, text) pairs.

        ``stack`` is the initial stack (default: ``['root']``)
        """
        pos = 0
        tokendefs = self._tokens
        statestack = list(stack)
        statetokens = tokendefs[statestack[-1]]
        while 1:
            for rexmatch, action, new_state in statetokens:
                m = rexmatch(text, pos)
                if m:
                    if action is not None:
                        if type(action) is _TokenType:
                            yield pos, action, m.group()
                        else:
                            yield from action(self, m)
                    pos = m.end()
                    if new_state is not None:
                        # state transition
                        if isinstance(new_state, tuple):
                            for state in new_state:
                                if state == '#pop':
                                    if len(statestack) > 1:
                                        statestack.pop()
                                elif state == '#push':
                                    statestack.append(statestack[-1])
                                else:
                                    statestack.append(state)
                        elif isinstance(new_state, int):
                            # pop, but keep at least one state on the stack
                            # (random code leading to unexpected pops should
                            # not allow exceptions)
                            if abs(new_state) >= len(statestack):
                                del statestack[1:]
                            else:
                                del statestack[new_state:]
                        elif new_state == '#push':
                            statestack.append(statestack[-1])
                        else:
                            assert False, "wrong state def: %r" % new_state
                        statetokens = tokendefs[statestack[-1]]
                    break
            else:
                # We are here only if all state tokens have been considered
                # and there was not a match on any of them.
                try:
                    if text[pos] == '\n':
                        # at EOL, reset state to "root"
                        statestack = ['root']
                        statetokens = tokendefs['root']
                        yield pos, Whitespace, '\n'
                        pos += 1
                        continue
                    yield pos, Error, text[pos]
                    pos += 1
                except IndexError:
                    break


class LexerContext:
    """
    A helper object that holds lexer position data.
    """

    def __init__(self, text, pos, stack=None, end=None):
        self.text = text
        self.pos = pos
        self.end = end or len(text)  # end=0 not supported ;-)
        self.stack = stack or ['root']

    def __repr__(self):
        return 'LexerContext(%r, %r, %r)' % (
            self.text, self.pos, self.stack)


class ExtendedRegexLexer(RegexLexer):
    """
    A RegexLexer that uses a context object to store its state.
    """

    def get_tokens_unprocessed(self, text=None, context=None):
        """
        Split ``text`` into (tokentype, text) pairs.
        If ``context`` is given, use this lexer context instead.
        """
        tokendefs = self._tokens
        if not context:
            ctx = LexerContext(text, 0)
            statetokens = tokendefs['root']
        else:
            ctx = context
            statetokens = tokendefs[ctx.stack[-1]]
            text = ctx.text
        while 1:
            for rexmatch, action, new_state in statetokens:
                m = rexmatch(text, ctx.pos, ctx.end)
                if m:
                    if action is not None:
                        if type(action) is _TokenType:
                            yield ctx.pos, action, m.group()
                            ctx.pos = m.end()
                        else:
                            yield from action(self, m, ctx)
                            if not new_state:
                                # altered the state stack?
                                statetokens = tokendefs[ctx.stack[-1]]
                    # CAUTION: callback must set ctx.pos!
                    if new_state is not None:
                        # state transition
                        if isinstance(new_state, tuple):
                            for state in new_state:
                                if state == '#pop':
                                    if len(ctx.stack) > 1:
                                        ctx.stack.pop()
                                elif state == '#push':
                                    ctx.stack.append(ctx.stack[-1])
                                else:
                                    ctx.stack.append(state)
                        elif isinstance(new_state, int):
                            # see RegexLexer for why this check is made
                            if abs(new_state) >= len(ctx.stack):
                                del ctx.stack[1:]
                            else:
                                del ctx.stack[new_state:]
                        elif new_state == '#push':
                            ctx.stack.append(ctx.stack[-1])
                        else:
                            assert False, "wrong state def: %r" % new_state
                        statetokens = tokendefs[ctx.stack[-1]]
                    break
            else:
                try:
                    if ctx.pos >= ctx.end:
                        break
                    if text[ctx.pos] == '\n':
                        # at EOL, reset state to "root"
                        ctx.stack = ['root']
                        statetokens = tokendefs['root']
                        yield ctx.pos, Text, '\n'
                        ctx.pos += 1
                        continue
                    yield ctx.pos, Error, text[ctx.pos]
                    ctx.pos += 1
                except IndexError:
                    break


def do_insertions(insertions, tokens):
    """
    Helper for lexers which must combine the results of several
    sublexers.

    ``insertions`` is a list of ``(index, itokens)`` pairs.
    Each ``itokens`` iterable should be inserted at position
    ``index`` into the token stream given by the ``tokens``
    argument.

    The result is a combined token stream.

    TODO: clean up the code here.
    """
    insertions = iter(insertions)
    try:
        index, itokens = next(insertions)
    except StopIteration:
        # no insertions
        yield from tokens
        return

    realpos = None
    insleft = True

    # iterate over the token stream where we want to insert
    # the tokens from the insertion list.
    for i, t, v in tokens:
        # first iteration. store the position of first item
        if realpos is None:
            realpos = i
        oldi = 0
        while insleft and i + len(v) >= index:
            tmpval = v[oldi:index - i]
            if tmpval:
                yield realpos, t, tmpval
                realpos += len(tmpval)
            for it_index, it_token, it_value in itokens:
                yield realpos, it_token, it_value
                realpos += len(it_value)
            oldi = index - i
            try:
                index, itokens = next(insertions)
            except StopIteration:
                insleft = False
                break  # not strictly necessary
        if oldi < len(v):
            yield realpos, t, v[oldi:]
            realpos += len(v) - oldi

    # leftover tokens
    while insleft:
        # no normal tokens, set realpos to zero
        realpos = realpos or 0
        for p, t, v in itokens:
            yield realpos, t, v
            realpos += len(v)
        try:
            index, itokens = next(insertions)
        except StopIteration:
            insleft = False
            break  # not strictly necessary


class ProfilingRegexLexerMeta(RegexLexerMeta):
    """Metaclass for ProfilingRegexLexer, collects regex timing info."""

    def _process_regex(cls, regex, rflags, state):
        if isinstance(regex, words):
            rex = regex_opt(regex.words, prefix=regex.prefix,
                            suffix=regex.suffix)
        else:
            rex = regex
        compiled = re.compile(rex, rflags)

        def match_func(text, pos, endpos=sys.maxsize):
            info = cls._prof_data[-1].setdefault((state, rex), [0, 0.0])
            t0 = time.time()
            res = compiled.match(text, pos, endpos)
            t1 = time.time()
            info[0] += 1
            info[1] += t1 - t0
            return res
        return match_func


class ProfilingRegexLexer(RegexLexer, metaclass=ProfilingRegexLexerMeta):
    """Drop-in replacement for RegexLexer that does profiling of its regexes."""

    _prof_data = []
    _prof_sort_index = 4  # defaults to time per call

    def get_tokens_unprocessed(self, text, stack=('root',)):
        # this needs to be a stack, since using(this) will produce nested calls
        self.__class__._prof_data.append({})
        yield from RegexLexer.get_tokens_unprocessed(self, text, stack)
        rawdata = self.__class__._prof_data.pop()
        data = sorted(((s, repr(r).strip('u\'').replace('\\\\', '\\')[:65],
                        n, 1000 * t, 1000 * t / n)
                       for ((s, r), (n, t)) in rawdata.items()),
                      key=lambda x: x[self._prof_sort_index],
                      reverse=True)
        sum_total = sum(x[3] for x in data)

        print()
        print('Profiling result for %s lexing %d chars in %.3f ms' %
              (self.__class__.__name__, len(text), sum_total))
        print('=' * 110)
        print('%-20s %-64s ncalls  tottime  percall' % ('state', 'regex'))
        print('-' * 110)
        for d in data:
            print('%-20s %-65s %5d %8.4f %8.4f' % d)
        print('=' * 110)
python3.12/site-packages/pip/_vendor/pygments/console.py000064400000003241151732702710017224 0ustar00"""
    pygments.console
    ~~~~~~~~~~~~~~~~

    Format colored console output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

esc = "\x1b["

codes = {}
codes[""] = ""
codes["reset"] = esc + "39;49;00m"

codes["bold"] = esc + "01m"
codes["faint"] = esc + "02m"
codes["standout"] = esc + "03m"
codes["underline"] = esc + "04m"
codes["blink"] = esc + "05m"
codes["overline"] = esc + "06m"

dark_colors = ["black", "red", "green", "yellow", "blue",
               "magenta", "cyan", "gray"]
light_colors = ["brightblack", "brightred", "brightgreen", "brightyellow", "brightblue",
                "brightmagenta", "brightcyan", "white"]

x = 30
for d, l in zip(dark_colors, light_colors):
    codes[d] = esc + "%im" % x
    codes[l] = esc + "%im" % (60 + x)
    x += 1

del d, l, x

codes["white"] = codes["bold"]


def reset_color():
    return codes["reset"]


def colorize(color_key, text):
    return codes[color_key] + text + codes["reset"]


def ansiformat(attr, text):
    """
    Format ``text`` with a color and/or some attributes::

        color       normal color
        *color*     bold color
        _color_     underlined color
        +color+     blinking color
    """
    result = []
    if attr[:1] == attr[-1:] == '+':
        result.append(codes['blink'])
        attr = attr[1:-1]
    if attr[:1] == attr[-1:] == '*':
        result.append(codes['bold'])
        attr = attr[1:-1]
    if attr[:1] == attr[-1:] == '_':
        result.append(codes['underline'])
        attr = attr[1:-1]
    result.append(codes[attr])
    result.append(text)
    result.append(codes['reset'])
    return ''.join(result)
python3.12/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-312.pyc000064400000011305151732702710023554 0ustar00�

R`i��:�dZddlZGd�de�ZGd�d�Zy)a
    pygments.scanner
    ~~~~~~~~~~~~~~~~

    This library implements a regex based scanner. Some languages
    like Pascal are easy to parse but have some keywords that
    depend on the context. Because of this it's impossible to lex
    that just by using a regular expression lexer like the
    `RegexLexer`.

    Have a look at the `DelphiLexer` to get an idea of how to use
    this scanner.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�Nc��eZdZdZy)�	EndOfTextzZ
    Raise if end of text is reached and the user
    tried to call a match function.
    N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/scanner.pyrrs��r
rc�b�eZdZdZd
d�Zd�Zeeej�Zd�Zd�Zd�Z	d�Z
d�Zy	)�Scannerzp
    Simple scanner

    All method patterns are regular expression strings (not
    compiled expressions!)
    c��||_t|�|_d|_d|_||_d|_d|_i|_y)z{
        :param text:    The text which should be scanned
        :param flags:   default regular expression flags
        rN)	�data�len�data_length�	start_pos�pos�flags�last�match�	_re_cache)�self�textrs   r�__init__zScanner.__init__#sA��
��	��t�9�����������
���	���
���r
c�4�|j|jk\S)z.`True` if the scanner reached the end of text.)rr�rs r�eoszScanner.eos1s���x�x�4�+�+�+�+r
c�
�|jr
t��||jvr-tj||j
�|j|<|j|j
|j|j�S)z�
        Apply `pattern` on the current position and return
        the match object. (Doesn't touch pos). Use this for
        lookahead.
        )	rrr�re�compilerrrr�r�patterns  r�checkz
Scanner.check6s`���8�8��+���$�.�.�(�&(�j�j��$�*�*�&E�D�N�N�7�#��~�~�g�&�,�,�T�Y�Y����A�Ar
c�(�|j|�duS)zdApply a pattern on the current position and check
        if it patches. Doesn't touch pos.
        N)r#r!s  r�testzScanner.testBs���z�z�'�"�$�.�.r
c��|jr
t��||jvr-tj||j
�|j|<|j|_|j|j
|j|j�}|�y|j�|_|j�|_	|j�|_y)a�
        Scan the text for the given pattern and update pos/match
        and related fields. The return value is a boolean that
        indicates if the pattern matched. The matched value is
        stored on the instance as ``match``, the last value is
        stored as ``last``. ``start_pos`` is the position of the
        pointer before the pattern was matched, ``pos`` is the
        end position.
        FT)rrrrr rrrrr�startr�end�group)rr"�ms   r�scanzScanner.scanHs����8�8��+���$�.�.�(�&(�j�j��$�*�*�&E�D�N�N�7�#��J�J��	��N�N�7�#�)�)�$�)�)�T�X�X�>���9���������5�5�7����W�W�Y��
�r
c�&�|jd�y)zScan exactly one char.�.N)r+rs r�get_charzScanner.get_char_s
���	�	�#�r
c�b�d|jj|j|jfzS)Nz
<%s %d/%d>)�	__class__rrrrs r�__repr__zScanner.__repr__cs1����N�N�#�#��H�H����
�
�	
r
N)r)rrrrrr�propertyr#r%r+r.r1r	r
rr
r
s=����,��3����
$�C�
B�/��.�
r
r
)rr�RuntimeErrorrr
r	r
r�<module>r4s'��� 
����M
�M
r
python3.12/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-312.pyc000064400000015053151732702710023267 0ustar00�

R`iq���dZddlmZmZidd�dd�dd�d	d
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd �d!d"�Zid#d�d$d�d%d�d&d	�d'd�d(d
�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d!�Zee�ZGd3�d4e�Z	Gd5�d6e	�7�Z
y8)9z�
    pygments.style
    ~~~~~~~~~~~~~~

    Basic style object.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�Token�STANDARD_TYPES�	ansiblack�000000�ansired�7f0000�	ansigreen�007f00�
ansiyellow�7f7fe0�ansiblue�00007f�ansimagenta�7f007f�ansicyan�007f7f�ansigray�e5e5e5�ansibrightblack�555555�
ansibrightred�ff0000�ansibrightgreen�00ff00�ansibrightyellow�ffff00�ansibrightblue�0000ff�ansibrightmagenta�ff00ff�ansibrightcyan�00ffff�	ansiwhite�ffffffz
#ansiblackz#ansidarkredz#ansidarkgreenz
#ansibrownz
#ansidarkbluez#ansipurplez	#ansitealz#ansilightgrayz
#ansidarkgrayz#ansiredz
#ansigreenz#ansiyellowz	#ansibluez#ansifuchsiaz#ansiturquoisez
#ansiwhitec�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�	StyleMetac��tj||||�}tD] }||jvs�d|j|<�"d�}ix}|_|jD�]b}|j�D�]K}||vr�	|j
|jd�}	|jj
|d�j�}
|	r|�gd�}	nd|
vr|tur
|tdd}	n|	dd}	|	||<|jj
|d�j�D]�}|dk(r�	|dk(rd|	d<�|dk(rd|	d<�|d	k(rd|	d
<�*|dk(rd|	d
<�5|dk(rd|	d
<�@|dk(rd|	d
<�K|dd
dk(r||d
d�|	d<�b|dddk(r||dd�|	d<�y|dk(rd|	d<��|dk(rd|	d<��|dk(rd|	d<��||�|	d<����N��e|S)N�c��|tvr|S|dddk(r=|dd}t|�dk(r|St|�dk(rD|ddz|ddzz|ddzzS|dk(ry|jd�s|jd	�r|SJd
|z��)Nr��#���r(�var�calczwrong color format %r)�
ansicolors�len�
startswith)�text�cols  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/style.py�colorformatz&StyleMeta.__new__.<locals>.colorformatBs����z�!����A�a�y�C���1�2�h���s�8�q�=��J���X��]��q�6�A�:��A���
�2�S��V�a�Z�?�?���������'�4�?�?�6�+B���8�1�D�8�8�5�)	r(rrrr(r(rrr�	noinherit�boldr*�noboldr�italicr.�noitalic�	underliner-�nounderlinezbg:��zborder:��romanr,�sans�mono�)	�type�__new__r�styles�_styles�split�get�parentr)�mcs�name�bases�dct�obj�tokenr7rJ�ttype�ndef�	styledefs�styledefs            r6rHzStyleMeta.__new__<s���l�l�3��e�S�1��#�E��C�J�J�&�$&��
�
�5�!�$�
	9�!#�"��#�+��Z�Z�E�������G�#���{�{�5�<�<��6���J�J�N�N�5�"�5�;�;�=�	��u�}�9�D� �I�-�%�u�2D�"�5�>�!�,�D���7�D�!%���� #�
�
���u�b� 9� ?� ?� A�H��;�.��!�V�+�"#��Q��!�X�-�"#��Q��!�X�-�"#��Q��!�Z�/�"#��Q��!�[�0�"#��Q��!�]�2�"#��Q��!�"�1���.�"-�h�q�r�l�";��Q��!�"�1���2�"-�h�q�r�l�";��Q��!�W�,�"#��Q��!�V�+�"#��Q��!�V�+�"#��Q��"-�h�"7��Q��5!B�'� �R�
r8c��|j|}dx}}|d}|tvr	t|}|tvr|}t|}|d}|tvr	t|}|tvr|}t|}|xsdt	|d�t	|d�t	|d�|xsd|dxsdt	|d�xsdt	|d�xsdt	|d	�xsd||d
�S)Nrr@r*r.r-rBr,rArF)�colorr:r<r>�bgcolor�borderrCrDrE�	ansicolor�bgansicolor)rJ�_deprecated_ansicolorsr1�_ansimap�bool)�clsrS�tr\r]rYrZs       r6�style_for_tokenzStyleMeta.style_for_token~s����K�K����"&�&�	�K��!����*�*�*�5�1�E��J���I��U�O�E��A�$���,�,�,�W�5�G��j� �!�K��w�'�G�"�M�T� ��1��J� ��1��J� ��1��J�#�O�t��a�D�L�D� ��1��J�.�$� ��1��J�.�$� ��1��J�.�$�%�'�
�	
r8c��t|�S�N)�list�ras r6�list_styleszStyleMeta.list_styles�s���C�y�r8c��||jvSre)rJ)rarTs  r6�styles_tokenzStyleMeta.styles_token�s������#�#r8c#�XK�|jD]}||j|�f���y�wre)rJrc)rarSs  r6�__iter__zStyleMeta.__iter__�s*�����[�[�E���,�,�U�3�3�3�!�s�(*c�,�t|j�Sre)r2rJrgs r6�__len__zStyleMeta.__len__�s���3�;�;��r8N)	�__name__�
__module__�__qualname__rHrcrhrjrlrn�r8r6r&r&:s"��@�D
�<�$�4� r8r&c�,�eZdZdZdZdZdZdZdZiZ	dZ
y)	�Stylez#ffffffz#ffffcc�inherit�transparentz#000000z#ffffc0FN)rorprq�background_color�highlight_color�line_number_color�line_number_background_color�line_number_special_color�$line_number_special_background_colorrI�web_style_gallery_excluderrr8r6rtrt�s@��!�� �O�"��$1� �!*��,5�(��F�!&�r8rt)�	metaclassN)�__doc__�pip._vendor.pygments.tokenrrr_r^�setr1rGr&rtrrr8r6�<module>r�s����=������x����	�
�(����
��8���������x���X���x������h�� ��!�"�h�#�$��%��*��+���I���k�	�
�,���Z�
��=������j���&������#���%���!�� �'�!�"�&�#�$�+�%��(��]�
�m ��m �`&�i�&r8python3.12/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-312.pyc000064400000011012151732702720024122 0ustar00�

R`iR��H�dZddlZddlmZddlmZdgZd�ZGd�d�Zy)z�
    pygments.formatter
    ~~~~~~~~~~~~~~~~~~

    Base formatter class.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�get_bool_opt)�get_style_by_name�	Formatterc�<�t|t�rt|�S|S)N)�
isinstance�strr)�styles ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatter.py�
_lookup_stylers���%��� ��'�'��L�c�4�eZdZdZdZgZgZdZd�Zdd�Z	d�Z
y)ra
    Converts a token stream to text.

    Formatters should have attributes to help selecting them. These
    are similar to the corresponding :class:`~pygments.lexer.Lexer`
    attributes.

    .. autoattribute:: name
       :no-value:

    .. autoattribute:: aliases
       :no-value:

    .. autoattribute:: filenames
       :no-value:

    You can pass options as keyword arguments to the constructor.
    All formatters accept these basic options:

    ``style``
        The style to use, can be a string or a Style subclass
        (default: "default"). Not used by e.g. the
        TerminalFormatter.
    ``full``
        Tells the formatter to output a "full" document, i.e.
        a complete self-contained document. This doesn't have
        any effect for some formatters (default: false).
    ``title``
        If ``full`` is true, the title that should be used to
        caption the document (default: '').
    ``encoding``
        If given, must be an encoding name. This will be used to
        convert the Unicode token strings to byte strings in the
        output. If it is "" or None, Unicode strings will be written
        to the output file, which most file-like objects do not
        support (default: None).
    ``outencoding``
        Overrides ``encoding`` if given.

    NTc�L�t|jdd��|_t|dd�|_|jdd�|_|jdd�xsd|_|jd	vrd
|_|jd�xs|j|_||_y)z�
        As with lexers, this constructor takes arbitrary optional arguments,
        and if you override it, you should first process your own options, then
        call the base class implementation.
        r	�default�fullF�title��encodingN)�guess�chardetzutf-8�outencoding)r�getr	rrrr�options)�selfrs  r
�__init__zFormatter.__init__Ss���#�7�;�;�w�	�#B�C��
� ��&�%�8��	��[�[��"�-��
����J��5�=���
��=�=�0�0�#�D�M����M�2�C�d�m�m��
���rc��y)a
        This method must return statements or declarations suitable to define
        the current style for subsequent highlighted text (e.g. CSS classes
        in the `HTMLFormatter`).

        The optional argument `arg` can be used to modify the generation and
        is formatter dependent (it is standardized because it can be given on
        the command line).

        This method is called by the ``-S`` :doc:`command-line option <cmdline>`,
        the `arg` is then given by the ``-a`` option.
        r�)r�args  r
�get_style_defszFormatter.get_style_defscs��rc��|jr(tj|j�d|�}|j||�S)z�
        This method must format the tokens from the `tokensource` iterable and
        write the formatted version to the file object `outfile`.

        Formatter options can control how exactly the tokens are converted.
        �)r�codecs�lookup�format_unencoded)r�tokensource�outfiles   r
�formatzFormatter.formatrs<���=�=�5�f�m�m�D�M�M�2�1�5�g�>�G��$�$�[�'�:�:r)r)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenames�
unicodeoutputrrr&rrr
rrs3��'�T�D��G�
�I��M�� 
�
;r)	r*r!�pip._vendor.pygments.utilr�pip._vendor.pygments.stylesr�__all__rrrrr
�<module>r2s-����2�9��-���c;�c;rpython3.12/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-312.pyc000064400000006314151732702720023415 0ustar00�

R`i���@�dZdd�Zd�ZGd�d�ZGd�de�Zy)	z�
    pygments.filter
    ~~~~~~~~~~~~~~~

    Module that implements the default filter.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
Nc�2���fd�}|D]}|||�}�
|S)z�
    Use this method to apply an iterable of filters to
    a stream. If lexer is given it's forwarded to the
    filter, otherwise the filter receives `None`.
    c3�F�K�|j�|�Ed{���y7��w�N)�filter)�filter_�stream�lexers  ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/filter.py�_applyzapply_filters.<locals>._applys������>�>�%��0�0�0�s�!��!�)r�filtersrr
rs  `  r	�
apply_filtersr
s#���1������(����M�c�j�t|jtft|d�|j|d��S)z�
    Decorator that converts a function into a filter::

        @simplefilter
        def lowercase(self, lexer, stream, options):
            for ttype, value in stream:
                yield ttype, value.lower()
    �
__module__)r�__doc__�function)�type�__name__�FunctionFilter�getattrr)�fs r	�simplefilterrs5����
�
�^�-��a��.��9�9��0��rc��eZdZdZd�Zd�Zy)�Filterzl
    Default filter. Subclass this class or use the `simplefilter`
    decorator to create own filters.
    c��||_yr)�options��selfrs  r	�__init__zFilter.__init__/s	����rc��t��r)�NotImplementedError�rrrs   r	rz
Filter.filter2s��!�#�#rN)rr�__qualname__rrrrrr	rr)s���
�$rrc� �eZdZdZdZd�Zd�Zy)rz�
    Abstract class used by `simplefilter` to create simple
    function filters on the fly. The `simplefilter` decorator
    automatically creates subclasses of this class for
    functions passed to it.
    Nc��t|d�s"td|jjz��t	j
|fi|��y)Nrz%r used without bound function)�hasattr�	TypeError�	__class__rrrrs  r	rzFunctionFilter.__init__?s?���t�Z�(��<� �N�N�3�3�4�5�
5�����(��(rc#�ZK�|j|||j�Ed{���y7��wr)rrr"s   r	rzFunctionFilter.filterEs �����=�=������=�=�=�s�!+�)�+)rrr#rrrrrrr	rr6s����H�)�>rrr)rr
rrrrrr	�<module>r*s*���
�
� 
$�
$�>�V�>rpython3.12/site-packages/pip/_vendor/pygments/__pycache__/cmdline.cpython-312.pyc000064400000063712151732702720023550 0ustar00�

R`i�\��h�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZmZm
Z
mZmZmZmZddlmZmZmZmZmZmZddlmZddlmZmZdd	lmZm Z m!Z!m"Z"m#Z#dd
l$m%Z%ddl&m'Z'm(Z(ddl)m*Z*m+Z+dd
l,m-Z-m.Z.d�Z/d�Z0d�Z1d�Z2d�Z3d�Z4Gd�dejj�Z5ejlfd�Z7y)z�
    pygments.cmdline
    ~~~~~~~~~~~~~~~~

    Command line interface.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�dedent)�__version__�	highlight)�
ClassNotFound�OptionError�docstring_headline�guess_decode�guess_decode_from_terminal�terminal_encoding�UnclosingTextIOWrapper)�get_all_lexers�get_lexer_by_name�guess_lexer�load_lexer_from_file�get_lexer_for_filename�find_lexer_class_for_filename)�	TextLexer)�LatexEmbeddedLexer�LatexFormatter)�get_all_formatters�get_formatter_by_name�load_formatter_from_file�get_formatter_for_filename�find_formatter_class)�TerminalFormatter)�Terminal256Formatter�TerminalTrueColorFormatter)�get_all_filters�find_filter_class)�get_all_styles�get_style_by_namec�0�i}|s|S|D]v}|j�s�|jd�}|D]M}|j�}	|jdd�\}}|j�}|j�}|||<�O�x|S#t$rd||<Y�dwxYw)N�,�=�T)�strip�split�
ValueError)�o_strs�opts�o_str�o_args�o_arg�o_key�o_vals       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/cmdline.py�_parse_optionsr1!s���
�D�������{�{�}�����S�!���E��K�K�M�E�
$�$�{�{�3��2���u����
�����
��$��U���	��K��	�
#�"��U��
#�s�5B�B�Bc��g}|s|S|D]L}d|vr3|jdd�\}}|j|t|g�f��:|j|if��N|S)N�:r%)r'�appendr1)�f_strs�filters�f_str�fname�foptss     r0�_parse_filtersr:6sc���G�������%�<� �;�;�s�A�.�L�E�5��N�N�E�>�5�'�#:�;�<��N�N�E�2�;�'���N�c��	|dk(rBt|�}td|jz�tt|j��y|dk(rBt|�}td|jz�tt|j��y|dk(r7t
|�}td|z�tt|j��y#ttf$r!td|ztj�	�Yy
wxYw)N�lexerzHelp on the %s lexer:�	formatterzHelp on the %s formatter:�filterzHelp on the %s filter:rz
%s not found!��filer%)r�print�namer�__doc__rr�AttributeErrorr(�sys�stderr)�whatrC�clss   r0�_print_helprJCs�����7�?�#�D�)�C��)�C�H�H�4�5��&����%�&���[�
 �&�t�,�C��-����8�9��&����%�&�
�	�X�
�#�D�)�C��*�T�1�2��&����%�&����J�'��
�o��$�3�:�:�6���s�AC
�	AC
�<C
�
-C=�<C=c��|dk(r�t�td�td�g}t�D]L\}}}}dj|�dz||xrddj|�zdzxsdf}|j|��N|j	�|D]}td	|z��y|d
k(r�t�td�td�g}t�D]p}t
|�}	dj|j�dz|	|jxr!ddj|j�zdzxsdf}|j|��r|j	�|D]}td	|z��y|d
k(rct�td�td�t�D]5}
t|
�}td|
zdz�tdt
|�z��7y|dk(rct�td�td�t�D]5}
t|
�}td|
zdz�tdt
|�z��7yy)Nr=zLexers:z~~~~~~~z, r3z(filenames �)�z* %s
    %s %sr>zFormatters:z~~~~~~~~~~~r?zFilters:z~~~~~~~~z* z    %s�stylezStyles:)
rBr
�joinr4�sortrr�aliases�	filenamesrrr r!)rH�info�fullname�names�exts�_�tup�irI�docrCs           r0�_print_listr[Ws���w��
��
�i��
�i����(6�(8�$�H�e�T�1��9�9�U�#�C�'���A�M�D�I�I�d�O�;�c�A�G�R�I�C��K�K���)9�	
�	�	���A��$��)�*��
��	�
��
�m��
�m����%�'�C�$�S�)�C��9�9�S�[�[�)�C�/��c�m�m�7B� �4�9�9�S�]�]�#;�;�c�A�7H�EG�I�C��K�K���	(�
	
�	�	���A��$��)�*��
��	�
��
�j��
�j��#�%�D�#�D�)�C��$��+��#�$��(�/��4�4�5�&�

���
��
�i��
�i��"�$�D�#�D�)�C��$��+��#�$��(�/��4�4�5�%�
r;c��ddl}i}d|vr$i}t�D]\}}}}|||d�||<�||d<d|vrHi}t�D]4}t|�}	|j|j
|	d�||j<�6||d<d|vr1i}t�D]}
t|
�}d	t|�i||
<�||d
<d|vr1i}t�D]}
t|
�}d	t|�i||
<�||d<|j|tj�y)
Nrr=)rQrR�	mimetypes�lexersr>)rQrRrZ�
formattersr?rZr6rN�styles)�jsonr
rrrQrRrCrrr r!�dumprF�stdout)�requested_itemsra�resultrSrTrUrRr]rIrZrCs           r0�_print_list_as_jsonrf�s<���
�F��/�!���5C�5E�1�H�e�Y�	� �&�&��D��N�6F� ��x���o�%���%�'�C�$�S�)�C��;�;� �]�]���D����N�(� $��|���?�"���#�%�D�#�D�)�C��)�#�.��D��J�&�
!��y���/�!���"�$�D�#�D�)�C��)�#�.��D��J�%�
 ��x���I�I�f�c�j�j�!r;c����&��jr|j�y�jrtdtz�y�fd�}�j
��+t
�}t��j�D]\}}|s�	|j|��|jd�|jd�|r |jtj�y�js
tddg�hd	��&�j
D�cgc]}|jd
���}}t!�&fd�|D��r |jtj�y|s�&}�js|D]
}t#|��yt%|�y�j&rg|d�s |jtj�y�j&\}}	|d
vr |jtj�yt)||	�St+�j,xsg�}
�j.xsgD]}	|j1dd�\}	}||
|	<�|
j5d|
j5d��}
|
j5d|
j5d��}�j6r6t9�j6�}|�t:}t|j<d�y�j>rOtj@jBjE�}	tG||
��}t|j<d�y�jJ}�jL}|���jN}|s |jtj�y�jPs�jRr |jtj�y	||
d<tU|fi|
��}t|jW|xsd��y�jL� |jtj�ytY�jZxsg�}t]�j^�}d}�jP}|rV|rGd|vrC	d}d}	d|vr|jadd�\}}	d|	vrd}	|r|	rtc||	fi|
��}ntc|fi|
��}n
	te|fi|
��}d}�jRr{�jhrtdtj��y�jR}	tk|d�5}|jE�}ddd�|
sto|�\}}
|s�	tq||fi|
��}n��jhsWtj@jBjE�}|
stu|tj@�\}}
|s,	tG|fi|
��}n|stdtj��y|D]\}}	|jv|fi|����jx}�jN}|rV|rGd|vrC	d}d}	d|vr|jadd�\}}	d|	vrd}	|r|	rt{||	fi|
��}nt{|fi|
��}n
	tU|fi|
��}|r|s
	t}|fi|
��}	tk|d�} n�|sgt~j�j5d d�d!vrt�d+i|
��}n9d"t~j�j5d#d�vrt�d+i|
��}nt�d+i|
��}tj�jB} |s(|r|
|_Ent�tj��|_E|satj�d$vrO|j�d%vrAt�| |j��&�} d|_E	ddlJmKcmLcmM}!|!j�| ddd'd�(�} |
j5d)d�}"t�|"�dk(r't�|t��r|"d}#|"d}$t�|#|$|�}�jhs"	t�|||| �|r| j��y		tj@jBj��}%|%snJ|
stu|%tj@�d}%t�|%||| �t�| d*�r| j���u	|r| j��yycc}w#t2$r	d|
|<Y��NwxYw#tH$r
t:}Y��~wxYw#tH$r%}t|tj��Yd}~yd}~wwxYw#tH$r&}td|tj��Yd}~yd}~wwxYw#tftHf$r&}td|tj��Yd}~yd}~wwxYw#1swY��5xYw#tl$r&}td|tj��Yd}~yd}~wwxYw#tH$r`}�jrr(	tG|fi|
��}n;#tH$rt;d+i|
��}Yn%wxYwtd|tj��Yd}~yYd}~��,d}~wtf$r&}td|tj��Yd}~yd}~wwxYw#tH$rt;d+i|
��}Y��xwxYw#tH$r'}td|tj��Yd}~yd}~wwxYw#tH$r&}td|tj��Yd}~yd}~wwxYw#tftHf$r&}td|tj��Yd}~yd}~wwxYw#tftHf$r&}td|tj��Yd}~yd}~wwxYw#tl$r&}td|tj��Yd}~yd}~wwxYw#t�$rY���wxYw#|r| j��wwxYw#t�$rY|r| j��yywxYw#|r| j��wwxYw),NruWPygments version %s, (c) 2006-2023 by Georg Brandl, Matthäus Chajdas and contributors.c�^���t�fd�t��j�D��S)Nc3�4�K�|]\}}|�k7s�|���y�w�N�)�.0�k�v�opts   �r0�	<genexpr>z5main_inner.<locals>.is_only_option.<locals>.<genexpr>�s�����G�':�V�a��a�3�h�q�':�s�
�)�any�vars�items)ro�argnss`�r0�is_only_optionz"main_inner.<locals>.is_only_option�s$����G�t�E�{�'8�'8�':�G�G�G�Gr;�Lra�rM�-V>r=rNr?r>�sc3�&�K�|]}|�v���
y�wrjrk)rl�arg�
allowed_typess  �r0rpzmain_inner.<locals>.<genexpr>�s�����9�5�C�s�-�'�5�s��H)r=r>r?r$r%T�
inencoding�encoding�outencoding)r~rNr@z.pyr3zError:z5Error: -s option not usable when input file specified�rbzError: cannot read infile:z7Error: when using -s a lexer has to be selected with -l�wbzError: cannot open outfile:�	COLORTERM)�	truecolor�24bit�256�TERM)�win32�cygwin)�Terminal�Terminal256)rF)�convertr&�	autoreset�wrap�escapeinside�flushrk)Z�help�
print_help�VrBrrv�setrrrs�add�discardrFrGra�main�rstriprqr[rfr}rJr1�O�Pr'r(�get�NrrrQ�C�stdin�buffer�readrr�S�a�f�l�	INPUTFILEr�get_style_defsr:�F�bool�x�rsplitrrrry�open�	Exceptionr	r�gr
�
add_filter�orr�os�environrrrrcrr�platformrCr�pip._vendor.colorama.initialise�_vendor�colorama�
initialise�wrap_stream�ImportError�len�
isinstancerrr�close�readline�hasattrr��KeyboardInterrupt)'�parserrtru�arg_setrmrnr{�largsrHrC�parsed_opts�p_opt�valuer~r�r=�inp�S_opt�a_opt�f_opt�fmter�err�F_opts�allow_custom_lexer_formatter�	lexername�filename�code�infn�infpr8r9�outfn�outfile�colorama_initialiser��left�right�liner|s' `                                    @r0�
main_innerr��sW
����z�z�������w�w�
�*�,7�8�	9��H�
�w�w���%����K�%�%�'�D�A�q�����A��(�	��������������c�j�j�)���z�z��"�d���A�
�,1�G�G�4�G�S����C��G��4��9�5�9�9����c�j�j�)���!�E��z�z����C� ���
 ��&��
�w�w��c�"����c�j�j�)���W�W�
��d��7�7����c�j�j�)���4��&�&�!�����B�/�K�����B���	&��+�+�c�1�-�K�D�%�!&�K���
�����{���z�/J�K�J��/�/�-�����1L�M�K�
�w�w�-�e�g�g�6���=��E�
�e�m�m�A����
�w�w��i�i���#�#�%��	���
�;�E�	�e�m�m�A����
�G�G�E��G�G�E�����������c�j�j�)���7�7�e�o�o����c�j�j�)��	�#(�K�� �)�%�?�;�?�E�
	�e�"�"�5�;�B�/�0��
�w�w�����#�*�*�%���E�G�G�M�r�
*�F�$(����=� �
�E����I��'�E�Y�,>�
������)�#�%.�%5�%5�c�1�%=�N�H�d���}� $����0��4�@�3>�@�E�1��J�k�J�E��

�)�)�C�{�C���D�����7�7��I��z�z�
#������	��d�D�!�T��y�y�{��"�
�+�D�1��D�*��

�.�t�T�I�[�I���W�W��y�y���$�$�&���9�$��	�	�J��D�*��
1�#�D�8�K�8��
��K��z�z�
#�����u�	��E���U�,�e�,��
�G�G�E��G�G�E��'�E�U�N�
������%�<�%*�\�\�#�q�%9�N�H�d���}�#����4�X�t�D�7B�D�E�5�U�J�k�J�E��

�-�e�C�{�C��

��
�2�5�H�K�H��	��5�$�'�G�
��z�z�~�~�k�"�-�1G�G�2�A�[�A���"�*�*�.�.���4�4�,�;�{�;��)�8�K�8���*�*�#�#����'�E�N�/�s�z�z�:�E�N��S�\�\�%8�8��z�z�0�0�(��5�>�>�J�����	O�I�I�*�5�5���T�U��6�O�G��?�?�>�2�6�L�
�<��A��*�U�N�"C��A����Q���"�4���6���7�7�	 ��d�E�5�'�2���
�
���	 ���y�y�'�'�0�0�2����!�5�d�C�I�I�F�q�I�D��$��u�g�6��7�G�,��M�M�O�����
�
����Y	5��>�	&�!%�K���	&��.�	��E�	��*�	��#�C�J�J�'���	��T!�
��h��#�*�*�5���
�� ��/�
��h��#�*�*�5���
��"�!���	��.��#�*�*�E���	��!�
��7�7�9� +�D� @�K� @���(�9� )� 8�K� 8��9���(�C�c�j�j�9�����
��h��#�*�*�5���
��!�
1�!�0�K�0��
1���	��(�C�c�j�j�1���	��2!�
��h��#�*�*�5���
�� ��/�
��h��#�*�*�5���
�� ��/�
��h��#�*�*�5���
��
�	��/��3�:�:�F���	��<�	��	��*��
�
���� !�	����
�
���	����
�
���s��?a�a�1
a*�b�9Ab1�<c#�d(�d�(d(�
e�'g3�h�Ai�i3�%j+�2k#�-l�#l%�A6l=�a'�&a'�*a=�<a=�	b.�	b)�)b.�1	c �:c�c �#d�2d�d�d%� d(�(	e�1e�e�	g0�#f>�0e=�<f>�=f�f>�f�f>�>g0�
g+�+g0�3h�
h�	h>�h9�9h>�	i0�
i+�+i0�3j(�j#�#j(�+k �:k�k �#	l�,l
�
l�	l"�!l"�%l:�=	m�m�m�m�m4c��eZdZdd�Zy)�
HelpFormatterNc��|�"	tj�jdz
}tj
j
|||||�y#t$rY�/wxYw)Nrw)�shutil�get_terminal_size�columnsr��argparser��__init__)�self�prog�indent_increment�max_help_position�widths     r0r�zHelpFormatter.__init__s\���=�
��0�0�2�:�:�Q�>��	���'�'��d�4D�(9�5�	B���
��
�s�!A	�		A�A)rw�N)�__name__�
__module__�__qualname__r�rkr;r0r�r�s��Br;r�c���d}tj|dt��}|jd�}|j	�}|jddd��|jd	d
d��|jd
ddd��|jddd��|jdddd��|jdddd��|jddd��|jddd �!�|jd"�}|jd#d
d$��|jd%d
d&��|jd'd
d(��|jd)d*dd
�+�|jd,�}|j	�}|jd-d.d/��|jd0d1d2d3�4�|jd5d6d7��|jd8d
d9��|jd:d;d<d=d>�?�|jd@d
dA��|jdBdCd
dD��|jdEdFdG��|j
|dHdI�}	t||�S#t$rYyJt$�r�|jr�ttj�K�tdLtj�K�tdMtj�K�tdNtj�K�tdOtj�K�tdLtj�K�ttj�K��dJdIl}	|	jtj ��}
|
dPj#�}t%|
�dQk\r.|dR|
dSj'dT�dJj#�dHdIzz
}ttj�K�tdUtj�K�t|tj�K�tdVtj�K�YyHwxYw)Wz(
    Main command line entry point.
    z?Highlight an input file and write the result to an output file.F)�description�add_help�formatter_classzMain operationz-l�LEXERz~Specify the lexer to use.  (Query names with -L.)  If not given and -g is not present, the lexer is guessed from the filename.)�metavarr�z-g�
store_truez`Guess the lexer from the file contents, or pass through as plain text if nothing can be guessed.)�actionr�z-FzFILTER[:options]r4znAdd a filter to the token stream.  (Query names with -L.) Filter options are given after a colon if necessary.)r�r�r�z-f�	FORMATTERz�Specify the formatter to use.  (Query names with -L.) If not given, the formatter is guessed from the output filename, and defaults to the terminal formatter if the output is to the terminal or an unknown file extension.z-OzOPTION=value[,OPTION=value,...]zyGive options to the lexer and formatter as a comma-separated list of key-value pairs. Example: `-O bg=light,python=cool`.z-PzOPTION=valuez�Give a single option to the lexer and formatter - with this you can pass options whose value contains commas and equal signs. Example: `-P "heading=Pygments, the Python highlighter"`.z-o�
OUTPUTFILEz8Where to write the output.  Defaults to standard output.r��?z5Where to read the input.  Defaults to standard input.)�nargsr�zOperation flagsz-vzbPrint a detailed traceback on unhandled exceptions, which is useful for debugging and bug reports.z-sa!Process lines one at a time until EOF, rather than waiting to process the entire file.  This only works for stdin, only for lexers with no line-spanning constructs, and is intended for streaming input such as you get from `tail -f`. Example usage: `tail -f sql.log | pygmentize -s -l sql`.z-xa�Allow custom lexers and formatters to be loaded from a .py file relative to the current working directory. For example, `-l ./customlexer.py -x`. By default, this option expects a file with a class named CustomLexer or CustomFormatter; you can also specify your own class name with a colon (`-l ./lexer.py:MyLexer`). Users should be very careful not to use this option with untrusted files, because it will import and run them.z--jsonz=Output as JSON. This can be only used in conjunction with -L.)r��defaultr�z*Special modes - do not do any highlightingz-SzSTYLE -f formatterzqPrint style definitions for STYLE for a formatter given with -f. The argument given by -a is formatter dependent.z-L�*�WHATz�List lexers, formatters, styles or filters -- give additional arguments for the thing(s) you want to list (e.g. "styles"), or omit them to list everything.)r�r�r�z-N�FILENAMEz�Guess and print out a lexer name based solely on the given filename. Does not take input or highlight anything. If no specific lexer can be determined, "text" is printed.z-CzXLike -N, but print out a lexer name based solely on a given content from standard input.z-H�storerw)�NAME�TYPEzrPrint detailed help for the object <name> of type <type>, where <type> is one of "lexer", "formatter" or "filter".)r�r�r�r�rxzPrint the package version.z-hz--helpzPrint this help.z-a�ARGzKFormatter-specific additional argument for the -S (print style sheet) mode.r%Nrr@zA*****************************************************************z3An unhandled exception occurred while highlighting.z9Please report the whole traceback to the issue tracker atz.<https://github.com/pygments/pygments/issues>.����z	
   (f%s)����
z*** Error while highlighting:z>*** If this is a bug you want to report, please rerun with -v.)r��ArgumentParserr��add_argument_group�add_mutually_exclusive_group�add_argument�
parse_argsr��BrokenPipeErrorr�rnrBrFrG�	traceback�format_exception�exc_infor&r�r')�args�descr��	operation�lexersel�flags�special_modes_group�
special_modesrtrrS�msgs            r0r�r�sU��M�D�
�
$�
$���5B�D�F��)�)�*:�;�I��5�5�7�H�����g�O��P�
����\�3��4�����(��?��@�����k�1��2�����7��.��/�
����n�X�D��E�
����l�
G��I�����3�
D��F�
�%�%�&7�8�E�	����\�3��4�
����\�C��D�
����\�6��7�
���x�'/�����
!�3�3�4�6��'�D�D�F�M�����*����
����C��<��=�
����j�6��7�
����\�/��0�����W�A�/?�C��D�����\�
)��+�����h�|�
��!��$�$��e��%��

���d�1�2�h�'�E���&�%�(�(��������7�7��s�z�z�"��(����,��G��z�z�
#��M��z�z�
#��B��z�z�
#��(����,��s�z�z�"���)�y�)�)�3�<�<�>�:���2�h�n�n����t�9��>��<�$�r�(�.�.��"6�q�"9�"?�"?�"A�!�"�"E�E�E�C�
�3�:�:��
�-�C�J�J�?�
�c��
�
�#�
�N��:�:�	��1�s�H+�+	O)�6F0O)�(O))8rDr�rFr�r��textwrapr�pip._vendor.pygmentsrr�pip._vendor.pygments.utilrrrr	r
rr�pip._vendor.pygments.lexersr
rrrrr�#pip._vendor.pygments.lexers.specialr�%pip._vendor.pygments.formatters.latexrr�pip._vendor.pygments.formattersrrrrr�(pip._vendor.pygments.formatters.terminalr�+pip._vendor.pygments.formatters.terminal256rr�pip._vendor.pygments.filtersrr�pip._vendor.pygments.stylesr r!r1r:rJr[rfr�r��argvr�rkr;r0�<module>rs����
�
�
���7����P�P�9�T�O�O�F�h�K�I��*
��(06�f*"�XL �^
B�H�*�*�B��h�h�Lr;python3.12/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-312.pyc000064400000006721151732702720023671 0ustar00�

R`i���>�dZddlmZmZdZdZgd�Zd�Zd
d�Zd
d	�Z	y)a
    Pygments
    ~~~~~~~~

    Pygments is a syntax highlighting package written in Python.

    It is a generic syntax highlighter for general use in all kinds of software
    such as forum systems, wikis or other applications that need to prettify
    source code. Highlights are:

    * a wide range of common languages and markup formats is supported
    * special attention is paid to details, increasing quality by a fair amount
    * support for new languages and formats are added easily
    * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image
      formats that PIL supports, and ANSI sequences
    * it is usable as a command-line tool and as a library
    * ... and it highlights even Brainfuck!

    The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``.

    .. _Pygments master branch:
       https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�StringIO�BytesIOz2.15.1�restructuredtext)�lex�format�	highlightc��	|j|�S#t$r/ddlm}t	|t
�rt
||�rtd���wxYw)z�
    Lex `code` with the `lexer` (must be a `Lexer` instance)
    and return an iterable of tokens. Currently, this only calls
    `lexer.get_tokens()`.
    r)�
RegexLexerz4lex() argument must be a lexer instance, not a class)�
get_tokens�	TypeError�pip._vendor.pygments.lexerr
�
isinstance�type�
issubclass)�code�lexerr
s   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/__init__.pyrr#sR�������%�%����9��e�T�"�z�%��'D��*�+�
+�
�
�s	��8ANc�2�	|sGt|dd�xr
t�xs
t�}|j||�|j	�S|j||�y#t
$r/ddlm}t|t�rt||�rtd���wxYw)a
    Format ``tokens`` (an iterable of tokens) with the formatter ``formatter``
    (a `Formatter` instance).

    If ``outfile`` is given and a valid file object (an object with a
    ``write`` method), the result will be written to it, otherwise it
    is returned as a string.
    �encodingNr)�	Formatterz;format() argument must be a formatter instance, not a class)�getattrrrr�getvaluer�pip._vendor.pygments.formatterrrrr)�tokens�	formatter�outfile�realoutfilers     rrr4s���
��!�)�Z��>�L�7�9�Z�PX�PZ�K����V�[�1��'�'�)�)����V�W�-����<��i��&�:�i��+K��*�+�
+�
�
�s�AA�A�8Bc�0�tt||�||�S)zp
    This is the most high-level highlighting function. It combines `lex` and
    `format` in one function.
    )rr)rrrrs    rrrMs��
�#�d�E�"�I�w�7�7�)N)
�__doc__�iorr�__version__�
__docformat__�__all__rrr�rr�<module>r&s-���4!���"�
�
(���"�28rpython3.12/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-312.pyc000064400000006541151732702720023430 0ustar00�

R`i
��6�dZdZdZdZdZd�Zd�Zd�Zd�Zd	�Z	y
)a
    pygments.plugin
    ~~~~~~~~~~~~~~~

    Pygments plugin interface. By default, this tries to use
    ``importlib.metadata``, which is in the Python standard
    library since Python 3.8, or its ``importlib_metadata``
    backport for earlier versions of Python. It falls back on
    ``pkg_resources`` if not found. Finally, if ``pkg_resources``
    is not found either, no plugins are loaded at all.

    lexer plugins::

        [pygments.lexers]
        yourlexer = yourmodule:YourLexer

    formatter plugins::

        [pygments.formatters]
        yourformatter = yourformatter:YourFormatter
        /.ext = yourformatter:YourFormatter

    As you can see, you can define extensions for the formatter
    with a leading slash.

    syntax plugins::

        [pygments.styles]
        yourstyle = yourstyle:YourStyle

    filter plugin::

        [pygments.filter]
        yourfilter = yourfilter:YourFilter


    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
zpygments.lexerszpygments.formatterszpygments.styleszpygments.filtersc�"�	ddlm}|�}t|d�r|j|��S|j|g�S#t$rF	ddlm}n;#t$r/	ddlm}||�cYcYS#ttf$r	gcYcYcYSwxYwwxYwY��wxYw)N�)�entry_points)�iter_entry_points�select)�group)
�importlib.metadatar�ImportError�importlib_metadata�pip._vendor.pkg_resourcesr�OSError�hasattrr�get)�
group_namerr�groupss    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/plugin.pyrr/s���5�3��^�F��v�x� ��}�}�:�}�.�.��z�z�*�b�)�)��%�	5�	5�7���	5�
5�G�)��4�4�� ��)�
��	�
��	5��
8�	5�sW�?�	B�	A�B�	B�A,� B�(B�,B�=B�?B�B�B�B�
Bc#�XK�tt�D]}|j����y�w�N)r�LEXER_ENTRY_POINT�load��
entrypoints r�find_plugin_lexersrGs#����'�(9�:�
��o�o���;�s�(*c#�pK�tt�D] }|j|j�f���"y�wr)r�FORMATTER_ENTRY_POINT�namerrs r�find_plugin_formattersrLs,����'�(=�>�
��o�o�z���0�0�0�?���46c#�pK�tt�D] }|j|j�f���"y�wr)r�STYLE_ENTRY_POINTrrrs r�find_plugin_stylesr Qs,����'�(9�:�
��o�o�z���0�0�0�;�rc#�pK�tt�D] }|j|j�f���"y�wr)r�FILTER_ENTRY_POINTrrrs r�find_plugin_filtersr#Vs,����'�(:�;�
��o�o�z���0�0�0�<�rN)
�__doc__rrrr"rrrr r#��r�<module>r's>��&�P&��-��%��'��*�0 �
1�
1�
1r&python3.12/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-312.pyc000064400000112575151732702720023256 0ustar00�

R`i:���X�dZddlZddlZddlZddlmZmZddlmZddl	m
Z
mZmZm
Z
mZddlmZmZmZmZmZmZddlmZgd�Zej2d	�Zgd
�Zed��ZGd�d
e�ZGd�de��Z Gd�de �Z!Gd�de"�Z#Gd�d�Z$e$�Z%Gd�de&�Z'Gd�d�Z(d�Z)Gd�d�Z*e*�Z+d�Z,Gd�d �Z-Gd!�d"e�Z.Gd#�d$e�Z/Gd%�d&e e/��Z0Gd'�d(�Z1Gd)�d*e0�Z2d+�Z3Gd,�d-e/�Z4Gd.�d/e0e4��Z5y)0z�
    pygments.lexer
    ~~~~~~~~~~~~~~

    Base lexer classes.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
apply_filters�Filter)�get_filter_by_name)�Error�Text�Other�
Whitespace�
_TokenType)�get_bool_opt�get_int_opt�get_list_opt�make_analysator�Future�guess_decode)�	regex_opt)
�Lexer�
RegexLexer�ExtendedRegexLexer�DelegatingLexer�LexerContext�include�inherit�bygroups�using�this�default�words�line_rez.*?
))s�utf-8)s��zutf-32)s��zutf-32be)s��zutf-16)s��zutf-16bec��y)N��)�xs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/lexer.py�<lambda>r%"s��#�c��eZdZdZd�Zy)�	LexerMetaz�
    This metaclass automagically converts ``analyse_text`` methods into
    static methods which always return float values.
    c�\�d|vrt|d�|d<tj||||�S)N�analyse_text)r�type�__new__)�mcs�name�bases�ds    r$r,zLexerMeta.__new__+s3���Q�� /��.�0A� B�A�n���|�|�C��u�a�0�0r&N)�__name__�
__module__�__qualname__�__doc__r,r"r&r$r(r(%s���
1r&r(c�R�eZdZdZdZgZgZgZgZdZ	dZ
d�Zd�Zd�Z
d�Zd
d�Zd	�Zy)rau
    Lexer for a specific language.

    See also :doc:`lexerdevelopment`, a high-level guide to writing
    lexers.

    Lexer classes have attributes used for choosing the most appropriate
    lexer based on various criteria.

    .. autoattribute:: name
       :no-value:
    .. autoattribute:: aliases
       :no-value:
    .. autoattribute:: filenames
       :no-value:
    .. autoattribute:: alias_filenames
    .. autoattribute:: mimetypes
       :no-value:
    .. autoattribute:: priority

    Lexers included in Pygments should have an additional attribute:

    .. autoattribute:: url
       :no-value:

    You can pass options to the constructor. The basic options recognized
    by all lexers and processed by the base `Lexer` class are:

    ``stripnl``
        Strip leading and trailing newlines from the input (default: True).
    ``stripall``
        Strip all leading and trailing whitespace from the input
        (default: False).
    ``ensurenl``
        Make sure that the input ends with a newline (default: True).  This
        is required for some lexers that consume input linewise.

        .. versionadded:: 1.3

    ``tabsize``
        If given and greater than 0, expand tabs in the input (default: 0).
    ``encoding``
        If given, must be an encoding name. This encoding will be used to
        convert the input string to Unicode, if it is not already a Unicode
        string (default: ``'guess'``, which uses a simple UTF-8 / Locale /
        Latin1 detection.  Can also be ``'chardet'`` to use the chardet
        library, if it is installed.
    ``inencoding``
        Overrides the ``encoding`` if given.
    Nrc�l�||_t|dd�|_t|dd�|_t|dd�|_t|dd�|_|jdd	�|_|jd
�xs|j|_g|_	t|dd�D]}|j|��y
)a�
        This constructor takes arbitrary options as keyword arguments.
        Every subclass must first process its own options and then call
        the `Lexer` constructor, since it processes the basic
        options like `stripnl`.

        An example looks like this:

        .. sourcecode:: python

           def __init__(self, **options):
               self.compress = options.get('compress', '')
               Lexer.__init__(self, **options)

        As these options must all be specifiable as strings (due to the
        command line usage), there are various utility functions
        available to help with that, see `Utilities`_.
        �stripnlT�stripallF�ensurenl�tabsizer�encoding�guess�
inencoding�filtersr"N)�optionsrr7r8r9rr:�getr;r>r
�
add_filter)�selfr?�filter_s   r$�__init__zLexer.__init__�s���&���#�G�Y��=���$�W�j�%�@��
�$�W�j�$�?��
�"�7�I�q�9������J��8��
����L�1�B�T�]�]��
����#�G�Y��;�G��O�O�G�$�<r&c��|jr'd|jj�d|j�d�Sd|jjzS)Nz<pygments.lexers.z with �>z<pygments.lexers.%s>)r?�	__class__r1�rBs r$�__repr__zLexer.__repr__�s@���<�<�59�^�^�5L�5L�59�\�\�C�
C�*�D�N�N�,C�,C�C�Cr&c�r�t|t�st|fi|��}|jj	|�y)z8
        Add a new stream filter to this lexer.
        N)�
isinstancerrr>�append)rBrCr?s   r$rAzLexer.add_filter�s/���'�6�*�(��<�G�<�G������G�$r&c��y)a�
        A static method which is called for lexer guessing.

        It should analyse the text and return a float in the range
        from ``0.0`` to ``1.0``.  If it returns ``0.0``, the lexer
        will not be selected as the most probable one, if it returns
        ``1.0``, it will be selected immediately.  This is used by
        `guess_lexer`.

        The `LexerMeta` metaclass automatically wraps this function so
        that it works like a static method (no ``self`` or ``cls``
        parameter) and the return value is automatically converted to
        `float`. If the return value is an object that is boolean `False`
        it's the same as if the return values was ``0.0``.
        Nr")�texts r$r*zLexer.analyse_text�s�r&c����t�t�s�jdk(rt��\�}n�jdk(r�	ddlm}d}tD]6\}}�j|�s��t|�dj|d�}n|�9|j�dd�}	�j|	jd	�xsd
d�}|�nZ�j�j���jd�r.�td�d�n�jd�r�td�d��jdd
���jdd
���jr�j��n�j r�jd
���j"dkDr�j%�j"���j&r�j)d
�s�d
z
���fd�}
|
�}|st+|�j,��}|S#t$r}t
d�|�d}~wwxYw)ae
        This method is the basic interface of a lexer. It is called by
        the `highlight()` function. It must process the text and return an
        iterable of ``(tokentype, value)`` pairs from `text`.

        Normally, you don't need to override this method. The default
        implementation processes the options recognized by all lexers
        (`stripnl`, `stripall` and so on), and then yields all tokens
        from `get_tokens_unprocessed()`, with the ``index`` dropped.

        If `unfiltered` is set to `True`, the filtering mechanism is
        bypassed even if filters are defined.
        r<�chardetr)rPzkTo enable chardet encoding guessing, please install the chardet library from http://chardet.feedparser.org/N�replaceir;ruz
�
�
c3�N�K��j��D]\}}}||f���y�w�N)�get_tokens_unprocessed)�_�t�vrBrNs   ��r$�streamerz"Lexer.get_tokens.<locals>.streamer�s+������6�6�t�<���1�a���d�
�=�s�"%)rK�strr;r�pip._vendorrP�ImportError�
_encoding_map�
startswith�len�decode�detectr@rQr8�stripr7r:�
expandtabsr9�endswithrr>)rBrN�
unfilteredrWrP�e�decoded�bomr;�encrZ�streams``          r$�
get_tokenszLexer.get_tokens�s�����$��$��}�}��'�&�t�,���a����)�+�T�3���%2�M�C�����s�+�"&�s�3�x�y�/�"8�"8��9�"M���&3�
�?�!�.�.��e�t��5�C�"�k�k�#�'�'�*�*=�*H��*3�5�G����{�{�4�=�=�1���?�?�8�,���H�
��/�D����x�(��C��M�N�+���|�|�F�D�)���|�|�D�$�'���=�=��:�:�<�D�
�\�\��:�:�d�#�D��<�<�!���?�?�4�<�<�0�D��=�=����t�!4��D�L�D�	�����"�6�4�<�<��>�F��
��U#�T�%�'L�M�RS�T��T�s�G2�2	H�;H�Hc��t�)aS
        This method should process the text and return an iterable of
        ``(index, tokentype, value)`` tuples where ``index`` is the starting
        position of the token within the input text.

        It must be overridden by subclasses. It is recommended to
        implement it as a generator to maximize effectiveness.
        )�NotImplementedError)rBrNs  r$rVzLexer.get_tokens_unprocesseds
��"�!r&)F)r1r2r3r4r.�aliases�	filenames�alias_filenames�	mimetypes�priority�urlrDrIrAr*rlrVr"r&r$rr1sY��1�h�D��G�
�I��O��I��H��C�%�<D�%��">�@	"r&r)�	metaclassc� �eZdZdZefd�Zd�Zy)ra 
    This lexer takes two lexer as arguments. A root lexer and
    a language lexer. First everything is scanned using the language
    lexer, afterwards all ``Other`` tokens are lexed using the root
    lexer.

    The lexers from the ``template`` lexer package use this base lexer.
    c�r�|di|��|_|di|��|_||_tj|fi|��y�Nr")�
root_lexer�language_lexer�needlerrD)rB�_root_lexer�_language_lexer�_needler?s     r$rDzDelegatingLexer.__init__s9��%�0��0���-�8��8������
���t�'�w�'r&c�l�d}g}g}|jj|�D]N\}}}||jur&|r|jt	|�|f�g}||z
}�;|j|||f��P|r|jt	|�|f�t||jj|��S)N�)rzrVr{rLr`�
do_insertionsry)rBrN�buffered�
insertions�
lng_buffer�irXrYs        r$rVz&DelegatingLexer.get_tokens_unprocesseds������
��
��*�*�A�A�$�G�G�A�q�!��D�K�K����%�%�s�8�}�j�&A�B�!#�J��A�
���!�!�1�a��)�,�H�����s�8�}�j�9�:��Z�!�_�_�C�C�H�M�O�	Or&N)r1r2r3r4rrDrVr"r&r$rr
s���>C�(�Or&rc��eZdZdZy)rzI
    Indicates that a state should include rules from another state.
    N�r1r2r3r4r"r&r$rr4s���	r&rc��eZdZdZd�Zy)�_inheritzC
    Indicates the a state should inherit from its superclass.
    c��y)Nrr"rHs r$rIz_inherit.__repr__?s��r&N)r1r2r3r4rIr"r&r$r�r�;s���r&r�c��eZdZdZd�Zd�Zy)�combinedz:
    Indicates a state combined from multiple states.
    c�.�tj||�SrU)�tupler,)�cls�argss  r$r,zcombined.__new__Js���}�}�S�$�'�'r&c��yrUr")rBr�s  r$rDzcombined.__init__Ms��r&N)r1r2r3r4r,rDr"r&r$r�r�Es���(�
r&r�c�:�eZdZdZd�Zd	d�Zd	d�Zd	d�Zd�Zd�Z	y)
�_PseudoMatchz:
    A pseudo match object constructed from a string.
    c� �||_||_yrU)�_text�_start)rB�startrNs   r$rDz_PseudoMatch.__init__Ws����
���r&Nc��|jSrU)r��rB�args  r$r�z_PseudoMatch.start[s���{�{�r&c�F�|jt|j�zSrU)r�r`r�r�s  r$�endz_PseudoMatch.end^s���{�{�S����_�,�,r&c�4�|rtd��|jS)Nz
No such group)�
IndexErrorr�r�s  r$�groupz_PseudoMatch.groupas����_�-�-��z�z�r&c��|jfSrU)r�rHs r$�groupsz_PseudoMatch.groupsfs���
�
�}�r&c��iSrUr"rHs r$�	groupdictz_PseudoMatch.groupdictis���	r&rU)
r1r2r3r4rDr�r�r�r�r�r"r&r$r�r�Rs%�����-��
�r&r�c���d�fd�	}|S)zL
    Callback that yields multiple actions for each group in the match.
    c
3��K�t��D]�\}}|��	t|�tur1|j|dz�}|s�1|j	|dz�||f���K|j|dz�}|��b|r|j	|dz�|_||t
|j	|dz�|�|�D]	}|s�|�����|r|j�|_yy�w)N�)�	enumerater+r
r�r��posr�r�)�lexer�match�ctxr��action�data�itemr�s       �r$�callbackzbygroups.<locals>.callbackqs������"�4��I�A�v��~���f���+��{�{�1�q�5�)����+�+�a�!�e�,�f�d�:�:��{�{�1�q�5�)���#��"'�+�+�a�!�e�"4��� &�u�'3�E�K�K��A��4F��'M�s�!T���"&�J�!T�)� ��i�i�k�C�G��s�<C�0C�1AC�8!CrUr")r�r�s` r$rrms���"�&�Or&c��eZdZdZy)�_ThiszX
    Special singleton used for indicating the caller class.
    Used by ``using``.
    Nr�r"r&r$r�r��s��r&r�c�����i�d�vr4�jd�}t|ttf�r|�d<nd|f�d<�tur	d��fd�	}|Sd���fd�	}|S)a�
    Callback that processes the match with a different lexer.

    The keyword arguments are forwarded to the lexer, except `state` which
    is handled separately.

    `state` specifies the state that the new lexer will start in, and can
    be an enumerable such as ('root', 'inline', 'string') or a simple
    string which is assumed to be on top of the root state.

    Note: For that to work, `_other` must not be an `ExtendedRegexLexer`.
    �state�stack�rootc3�*�K��	r.�	j|j�|jdi�	��}n|}|j�}|j|j�fi���D]\}}}||z||f���|r|j
�|_yy�wrx)�updater?rGr�rVr�r�r�)
r�r�r��lx�sr�rXrY�	gt_kwargs�kwargss
        ��r$r�zusing.<locals>.callback�s��������
�
�e�m�m�,�$�U�_�_�.�v�.�������
�A�4�2�4�4�U�[�[�]�P�i�P���1�a��!�e�Q��k�!�Q���)�)�+����s�BBc3��K��
j|j��di�
��}|j�}|j|j	�fi�	��D]\}}}||z||f���|r|j�|_yy�wrx)r�r?r�rVr�r�r�)r�r�r�r�r�r�rXrY�_otherr�r�s        ���r$r�zusing.<locals>.callback�s}������M�M�%�-�-�(��!�&�!�B����
�A�4�2�4�4�U�[�[�]�P�i�P���1�a��!�e�Q��k�!�Q���)�)�+����s�BBrU)�poprK�listr�r)r�r�r�r�r�s``  @r$rr�se����I��&���J�J�w����a�$���'�!"�I�g��"(�!��I�g��
��~�
	&�2�O�		&��Or&c��eZdZdZd�Zy)rz�
    Indicates a state or state action (e.g. #pop) to apply.
    For example default('#pop') is equivalent to ('', Token, '#pop')
    Note that state tuples may be used as well.

    .. versionadded:: 2.0
    c��||_yrU)r�)rBr�s  r$rDzdefault.__init__�s	����
r&N)r1r2r3r4rDr"r&r$rr�s���r&rc��eZdZdZdd�Zd�Zy)rz�
    Indicates a list of literal words that is transformed into an optimized
    regex that matches any of the words.

    .. versionadded:: 2.0
    c�.�||_||_||_yrU)r�prefix�suffix)rBrr�r�s    r$rDzwords.__init__�s����
������r&c�Z�t|j|j|j��S)N�r�r�)rrr�r�rHs r$r@z	words.get�s������D�K�K����L�Lr&N)r�r�)r1r2r3r4rDr@r"r&r$rr�s����
Mr&rc�<�eZdZdZd�Zd�Zd�Zd�Zd
d�Zd�Z	d	�Z
y)�RegexLexerMetazw
    Metaclass for RegexLexer, creates the self._tokens attribute from
    self.tokens on the first instantiation.
    c��t|t�r|j�}tj||�j
S)zBPreprocess the regular expression component of a token definition.)rKrr@�re�compiler�)r��regex�rflagsr�s    r$�_process_regexzRegexLexerMeta._process_regex�s.���e�V�$��I�I�K�E��z�z�%��(�.�.�.r&c�R�t|�tust|�s
Jd|����|S)z5Preprocess the token component of a token definition.z0token type must be simple type or callable, not )r+r
�callable)r��tokens  r$�_process_tokenzRegexLexerMeta._process_token�s.���E�{�j�(�H�U�O�	L�DI�K�	L�;��r&c���t|t�r5|dk(ry||vr|fS|dk(r|S|dddk(rt|dd�SJd|z��t|t�rfd|jz}|xjd	z
c_g}|D]3}||k7s
Jd
|z��|j|j
|||���5|||<|fSt|t�r|D]}||vr�|dvr�
Jd|z��|SJd
|z��)z=Preprocess the state transition action of a token definition.�#pop����#pushN�z#pop:zunknown new state %rz_tmp_%dr�zcircular state ref %r)r�r�zunknown new state zunknown new state def %r)rKr[�intr��_tmpname�extend�_process_stater�)r��	new_state�unprocessed�	processed�	tmp_state�itokens�istates       r$�_process_new_statez!RegexLexerMeta._process_new_state�s?���i��%��F�"���k�)�!�|�#��g�%� � ��2�A��'�)��I�a�b�M�*�*�*�@�4�y�@�@�u�
�	�8�
,�!�C�L�L�0�I��L�L�A��L��G�#����*�L�,C�f�,L�L�*����s�1�1�+�2;�V� E�F�$�$+�I�i� ��<��
�	�5�
)�#���+�-��"3�3�2�(�6�1�2�4�$���@�4�y�@�@�5r&c��t|�tus
Jd|z��|ddk7s
Jd|z��||vr||Sgx}||<|j}||D�]?}t|t�r;||k7s
Jd|z��|j|j
||t|����Ot|t�r�`t|t�rO|j|j||�}|jtjd�jd|f���t|�tus
Jd|z��	|j!|d||�}|j'|d
�}
t)|�dk(rd}n|j|d||�}|j||
|f���B|S#t"$r }	t%d	|d�d
|�d|�d|	���|	�d}	~	wwxYw)z%Preprocess a single state definition.zwrong state name %rr�#zinvalid state name %rzcircular state reference %rr�Nzwrong rule def %rzuncompilable regex z
 in state z of z: r��)r+r[�flagsrKrr�r�r�rr�r�rLr�r�r�r�r��	Exception�
ValueErrorr�r`)r�r�r�r��tokensr��tdefr��rex�errr�s           r$r�zRegexLexerMeta._process_states����E�{�c�!�@�#8�5�#@�@�!��Q�x�3��?� 7�%� ?�?���I���U�#�#�$&�&���5�!�������&�D��$��(��u�}�K�&C�e�&K�K�}��
�
�c�0�0��i�14�T��<�=���$��)���$��(��2�2�4�:�:�{�I�V�	��
�
�r�z�z�"�~�3�3�T�9�E�F����:��&�B�(;�d�(B�B�&�
F��(�(��a��&�%�@��
�&�&�t�A�w�/�E��4�y�A�~� �	��2�2�4��7�3>�	�K�	�
�M�M�3��y�1�2�C'�D�
���
F� �"&�q�'�5�#�s�"<�=�BE�F��
F�s�*F�	F=�F8�8F=Nc��ix}|j|<|xs|j|}t|�D]}|j|||��|S)z-Preprocess a dictionary of token definitions.)�_all_tokensr�r�r�)r�r.�	tokendefsr�r�s     r$�process_tokendefzRegexLexerMeta.process_tokendef?sN��,.�.�	�C�O�O�D�)��1����D�!1�	��)�_�E����y�)�U�;�%��r&c��i}i}|jD]�}|jjdi�}|j�D]t\}}|j|�}|�!|||<	|j	t
�}|||<�:|j|d�}|��O||||dz	|j	t
�}	||	z||<�v��|S#t$rY��wxYw#t$rY��wxYw)a
        Merge tokens from superclasses in MRO order, returning a single tokendef
        dictionary.

        Any state that is not defined by a subclass will be inherited
        automatically.  States that *are* defined by subclasses will, by
        default, override that state in the superclass.  If a subclass wishes to
        inherit definitions from a superclass, it can use the special value
        "inherit", which will cause the superclass' state definition to be
        included at that point in the state.
        r�Nr�)�__mro__�__dict__r@�items�indexrr�r�)
r�r��inheritable�c�toksr�r��curitems�inherit_ndx�new_inh_ndxs
          r$�
get_tokendefszRegexLexerMeta.get_tokendefsGs���������A��:�:�>�>�(�B�/�D� $�
�
����u�!�:�:�e�,���#�
%*�F�5�M�!�&+�k�k�'�&:��*5�K��&��)�o�o�e�T�:���&��7<���[��]�3�C�#(�+�+�g�"6�K�*5�{�)B�K��&�9!-��B�
��)&�!� �!��"����s$�B;�C
�;	C�C�
	C�Cc���d|jvrLi|_d|_t|d�r
|jrn%|jd|j
��|_tj|g|��i|��S)z:Instantiate cls after preprocessing its token definitions.�_tokensr�token_variantsr�)
r�r�r��hasattrrr�r�r�r+�__call__)r�r��kwdss   r$rzRegexLexerMeta.__call__xsh���C�L�L�(� �C�O��C�L��s�,�-�#�2D�2D��!�2�2�2�s�7H�7H�7J�K����}�}�S�0�4�0�4�0�0r&rU)r1r2r3r4r�r�r�r�r�r�rr"r&r$r�r��s.���
/��!A�F*�X�/�b1r&r�c�4�eZdZdZej
ZiZdd�Zy)rz�
    Base for simple stateful regular expression-based lexers.
    Simplifies the lexing process so that you need only
    provide a list of states and regular expressions.
    c#�:K�d}|j}t|�}||d}	|D�]&\}}}	|||�}
|
s�|�8t|�tur|||
j	�f��n|||
�Ed{���|
j�}|	��t
|	t�rX|	D]R}|dk(r t|�dkDs�|j��(|dk(r|j|d��B|j|��TnWt
|	t�r#t|	�t|�k\r|dd�=n*||	d�=n$|	dk(r|j|d�n
Jd|	z��||d}n7	||dk(rd	g}|d	}|tdf��|dz
}��P|t||f��|dz
}��d7��#t$rYywxYw�w)
z~
        Split ``text`` into (tokentype, text) pairs.

        ``stack`` is the initial stack (default: ``['root']``)
        rr�r�Nr�r��wrong state def: %rrRr�)r�r�r+r
r�r�rKr�r`r�rLr��absr	rr�)rBrNr�r�r��
statestack�statetokens�rexmatchr�r��mr�s            r$rVz!RegexLexer.get_tokens_unprocessed�s��������L�L�	��%�[�
��
�2��/���/:�+��&�)��T�3�'����)���<�:�5�"%�v�q�w�w�y�"8�8�'-�d�A��6�6��%�%�'�C� �,�%�i��7�)2��#(�F�?�'*�:���':�(2���(8�%*�g�%5�$.�$5�$5�j��n�$E�$.�$5�$5�e�$<�*3�(�	�3�7� #�9�~��Z��@�$.�q�r�N�$.�y�z�$:�&�'�1�&�-�-�j��n�=�K�*?�)�*K�K�5�&/�
�2��&?���C0;�J��C�y�D�(�&,�X�
�&/��&7��!�:�t�3�3��q��� ��u�d�3�i�/�/��1�H�C�_�7��P"����sM�8F�5F�0F	�1>F�0B!F� F�2F�4F�F�	F�F�F�FN�)r�)	r1r2r3r4r��	MULTILINEr�r�rVr"r&r$rr�s���
�L�L�E�0�F�;r&rc��eZdZdZdd�Zd�Zy)rz9
    A helper object that holds lexer position data.
    Nc�`�||_||_|xst|�|_|xsdg|_y)Nr�)rNr�r`r�r�)rBrNr�r�r�s     r$rDzLexerContext.__init__�s.����	�����#�#�d�)����&�v�h��
r&c�V�d|j�d|j�d|j�d�S)Nz
LexerContext(z, �))rNr�r�rHs r$rIzLexerContext.__repr__�s���I�I�t�x�x����-�	-r&�NN)r1r2r3r4rDrIr"r&r$rr�s���'�-r&rc��eZdZdZdd�Zy)rzE
    A RegexLexer that uses a context object to store its state.
    Nc#�K�|j}|st|d�}|d}n |}||jd}|j}	|D�]�\}}}|||j|j
�}	|	s�)|�lt
|�tur5|j||	j�f��|	j�|_n&|||	|�Ed{���|s||jd}|��5t|t�r�|D]�}
|
dk(r4t|j�dkDs�!|jj��<|
dk(r)|jj|jd��j|jj|
���n�t|t�rAt|�t|j�k\r|jdd�=nH|j|d�=n8|dk(r)|jj|jd�n
Jd|z��||jd}n�	|j|j
k\ry||jd	k(r9dg|_|d}|jt d	f��|xjdz
c_��;|jt"||jf��|xjdz
c_��s7���#t$$rYywxYw�w)
z
        Split ``text`` into (tokentype, text) pairs.
        If ``context`` is given, use this lexer context instead.
        rr�r�r�Nr�r�rrR)r�rr�rNr�r�r+r
r�rKr�r`r�rLr�rrrr�)rBrN�contextr�r�r	r
r�r�rr�s           r$rVz)ExtendedRegexLexer.get_tokens_unprocessed�sk����
�L�L�	���t�Q�'�C�#�F�+�K��C�#�C�I�I�b�M�2�K��8�8�D��/:�+��&�)��T�3�7�7�C�G�G�4����)���<�:�5�"%�'�'�6�1�7�7�9�"<�<�&'�e�e�g�C�G�'-�d�A�s�';�;�;�#,�.7��	�	�"�
�.F�� �,�%�i��7�)2��#(�F�?�'*�3�9�9�~��'9�(+�	�	�
�
��%*�g�%5�$'�I�I�$4�$4�S�Y�Y�r�]�$C�$'�I�I�$4�$4�U�$;�*3�(�	�3�7�"�9�~��S�Y�Y��?�$'�I�I�a�b�M�$'�I�I�i�j�$9�&�'�1��I�I�,�,�S�Y�Y�r�]�;�K�*?�)�*K�K�5�&/��	�	�"�
�&>���G0;�J
��w�w�#�'�'�)���C�G�G�}��,�%+�H��	�&/��&7��!�g�g�t�T�1�1����1��� ��'�'�5�$�s�w�w�-�7�7��G�G�q�L�G�c�<��R"����s^�A,K	�/AK	�J7�A
K	�DK	�J:�2K	�3A	J:�<K	�>7J:�5K	�:	K�K	�K�K	r)r1r2r3r4rVr"r&r$rr�s
���@r&rc#�K�t|�}	t|�\}}d}d}|D]�\}}}|�|}d}	|rx|t|�z|k\rg||	||z
}
|
r|||
f��|t|
�z
}|D]\}}}
|||
f��|t|
�z
}�||z
}		t|�\}}|r|t|�z|k\r�g|	t|�ks��||||	df��|t|�|	z
z
}��|r9|xsd}|D]\}}}|||f��|t|�z
}�	t|�\}}|r�8yy#t$r|Ed{���7YywxYw#t$rd}Y��wxYw#t$rd}YywxYw�w)ag
    Helper for lexers which must combine the results of several
    sublexers.

    ``insertions`` is a list of ``(index, itokens)`` pairs.
    Each ``itokens`` iterable should be inserted at position
    ``index`` into the token stream given by the ``tokens``
    argument.

    The result is a combined token stream.

    TODO: clean up the code here.
    NTrF)�iter�next�
StopIterationr`)r�r�r�r��realpos�insleftr�rXrY�oldi�tmpval�it_index�it_token�it_value�ps               r$r�r�?s������j�!�J���j�)���w��G��G����1�a��?��G����!�c�!�f�*��-��t�E�A�I�&�F���q�&�(�(��3�v�;�&��07�,��(�H��x��1�1��3�x�=�(��18��1�9�D�
�!%�j�!1���w��!�c�!�f�*��-��#�a�&�=��1�a���h�&�&��s�1�v��}�$�G�+�0��,�Q���G�A�q�!��1�a�-���s�1�v��G��	�!�*�-�N�E�7���E��������4!�
����
�� �	��G��	�s��E�D�A*E�D,�E�*E�9AE�?D=�
E�E�D)� D#�!D)�&E�(D)�)E�,D:�7E�9D:�:E�=E�E�
E�Ec��eZdZdZd�Zy)�ProfilingRegexLexerMetaz>Metaclass for ProfilingRegexLexer, collects regex timing info.c�������t|t�r-t|j|j|j���n|�tj�|��tjf����fd�	}|S)Nr�c����jdj�
�	fddg�}tj�}�j|||�}tj�}|dxxdz
cc<|dxx||z
z
cc<|S)Nr�rr!r�)�
_prof_data�
setdefault�timer�)rNr��endpos�info�t0�res�t1r��compiledr�r�s       ����r$�
match_funcz:ProfilingRegexLexerMeta._process_regex.<locals>.match_func�sr����>�>�"�%�0�0�%����3�x�H�D�����B��.�.��s�F�3�C�����B���G�q�L�G���G�r�B�w��G��Jr&)	rKrrr�r�r�r��sys�maxsize)r�r�r�r�r/r.r�s`  ` @@r$r�z&ProfilingRegexLexerMeta._process_regex�sZ����e�U�#��E�K�K����#(�<�<�1�C��C��:�:�c�6�*��),���	�	��r&N)r1r2r3r4r�r"r&r$r#r#s
��H�r&r#c� �eZdZdZgZdZdd�Zy)�ProfilingRegexLexerzFDrop-in replacement for RegexLexer that does profiling of its regexes.�c#�J�K��jjji�tj	�||�Ed{����jjj�}t
d�|j�D��fd�d��}td�|D��}t�td�jjt|�|fz�td�tdd	z�td
�|D]}td|z��td�y7�ݭw)Nc3�K�|]H\\}}\}}|t|�jd�jdd�dd|d|zd|z|zf���Jy�w)zu'z\\�\N�Ai�)�reprrcrQ)�.0r��r�nrXs     r$�	<genexpr>z=ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<genexpr>�sa����@�/>�+�F�Q��F�Q���4��7�=�=��/�7�7���E�c�r�J��4�!�8�T�A�X��\�3�/>�s�AAc�"��|�jSrU)�_prof_sort_index)r#rBs �r$r%z<ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<lambda>�s���A�d�&;�&;�$<r&T)�key�reversec3�&K�|]	}|d���y�w)�Nr")r:r#s  r$r=z=ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<genexpr>�s����+�d���!��d�s�z2Profiling result for %s lexing %d chars in %.3f mszn==============================================================================================================z$%-20s %-64s ncalls  tottime  percall)r�r�zn--------------------------------------------------------------------------------------------------------------z%-20s %-65s %5d %8.4f %8.4f)rGr&rLrrVr��sortedr��sum�printr1r`)rBrNr��rawdatar��	sum_totalr0s`      r$rVz*ProfilingRegexLexer.get_tokens_unprocessed�s���������!�!�(�(��,��4�4�T�4��G�G�G��.�.�+�+�/�/�1���@�/6�}�}��@�=�"�	$��
�+�d�+�+�	�
��
�B��~�~�&�&��D�	�9�=�>�	?�
�i��
�4�7I�I�J�
�i���A��/�!�3�4��
�i��#	H�s�AD#�D!�CD#Nr)r1r2r3r4r&r?rVr"r&r$r3r3�s��P��J���r&r3)6r4r�r0r(�pip._vendor.pygments.filterrr�pip._vendor.pygments.filtersr�pip._vendor.pygments.tokenrrrr	r
�pip._vendor.pygments.utilrrr
rrr�pip._vendor.pygments.regexoptr�__all__r�rr^�staticmethod�_default_analyser+r(rrr[rr�rr�r�r�rr�rrrrr�rrrr�r#r3r"r&r$�<module>rQsJ���
�
��=�;�Q�Q�*�*�3�*���"�*�*�W�
��,�
� �
�.��	1��	1�Y"�i�Y"�xO�e�O�N	�c�	����*��

�u�

���6�4��
�w��/�d	�	�
M�F�
M� e1�Y�e1�P^��.�^�B
-�
-� E��E�P=�@�n��,�*�0G�r&python3.12/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-312.pyc000064400000017772151732702720023262 0ustar00�

R`i(��	�dZGd�de�Ze�ZejZej
ZejZejZejZejZ	ejZ
ejZejZejZ
ejZejZej Zej"Zee_ee_e
e_
d�Zd�Zied�ed�ed�ed�ed�ed	�e	d
�e	j(d�e	j*d�e	j,d
�e	j.d�e	j0d�e	j2d�e
d�e
j4d�e
j6d�e
j6j.d�ie
j8d�e
j(d�e
j:d�e
j<d�e
j>d�e
j@d�e
j@jBd�e
jDd�e
jFd�e
j,d�e
jd�e
jHd �e
jJd!�e
jJj8d"�e
jJjLd#�e
jJjNd$�e
jJjBd%��ied&�ejPd'�ed(�ejRd)�ejTd*�ejVd+�ejXd,�ejZd-�ej\d.�ejd/�ej^d0�ej`d1�ejd2�ejbd3�ejdd4�ejfd5�e
d6��ie
jhd7�e
jjd8�e
jld9�e
jnd:�e
jnjpd;�e
jrd<�ed=�ejtd>�ed?�ejvd@�edA�ejxdB�ejzdC�ej|dD�ej~dE�ejddF�ej�dG��edHej�dIej�dJejdKej�dLej�dMej�dNej�dOej�dPej�dQej�dRi�ZJyS)Tz�
    pygments.token
    ~~~~~~~~~~~~~~

    Basic token types and the standard tokens.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
c�:�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
y)	�
_TokenTypeNc�r�g}|}|� |j|�|j}|�� |j�|S�N)�append�parent�reverse)�self�buf�nodes   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/token.py�splitz_TokenType.splits?���������J�J�t���;�;�D���	���
��
�c�"�t�|_yr)�set�subtypes)r	�argss  r�__init__z_TokenType.__init__s�����
rc�b�||uxs*t|�|juxr|dt|�|k(Sr)�type�	__class__�len)r	�vals  r�__contains__z_TokenType.__contains__s:���s�{�
���I����'�
$��
��T��O�t�#�	
rc���|r|dj�stj||�St||fz�}t	|||�|j
j
|�||_|S)N�)�isupper�tuple�__getattribute__r�setattrr�addr)r	r�news   r�__getattr__z_TokenType.__getattr__"s_���#�a�&�.�.�*��)�)�$��4�4������'����c�3���
�
���#����
��
rc�@�d|xrdxsdzdj|�zS)N�Token�.�)�join�r	s r�__repr__z_TokenType.__repr__+s#���$�,�3�,�"�-������>�>rc��|Sr�r(s r�__copy__z_TokenType.__copy__.����rc��|Srr+)r	�memos  r�__deepcopy__z_TokenType.__deepcopy__2r-r)�__name__�
__module__�__qualname__rr
rrr"r)r,r0r+rrrrs*��
�F���
��?��rrc�
�||vS)z�
    Return True if ``ttype`` is a subtype of ``other``.

    exists for backwards compatibility. use ``ttype in other`` now.
    r+)�ttype�others  r�is_token_subtyper7Us���E�>�rc��t|t�r|S|stSt}|jd�D]}t	||�}�|S)a}
    Convert a string into a token type::

        >>> string_to_token('String.Double')
        Token.Literal.String.Double
        >>> string_to_token('Token.Literal.Number')
        Token.Literal.Number
        >>> string_to_token('')
        Token

    Tokens that are already tokens are returned unchanged:

        >>> string_to_token(String)
        Token.Literal.String
    r%)�
isinstancerr$r
�getattr)�sr�items   r�string_to_tokentyper=^sC�� �!�Z� �������D��������t�T�"����Krr&�w�esc�err�x�k�kc�kd�kn�kp�kr�kt�n�na�nb�bp�nc�no�nd�ni�ne�nf�fm�py�nl�nn�nx�nt�nv�vc�vg�vi�vm�l�ldr;�sa�sb�sc�dl�sd�s2�se�sh�si�sx�sr�s1�ss�m�mb�mf�mh�mi�il�mo�o�ow�p�pm�c�ch�cm�cp�cpf�c1�cs�g�gd�ge�gr�gh�gi�go�gp�gs�gu�gtN)K�__doc__rrr$�Text�
Whitespace�Escape�Error�Other�Keyword�Name�Literal�String�Number�Punctuation�Operator�Comment�Genericr7r=�Constant�Declaration�	Namespace�Pseudo�Reserved�Type�	Attribute�Builtin�Class�	Decorator�Entity�	Exception�Function�Magic�Property�Label�Tag�Variable�Global�Instance�Date�Affix�Backtick�Char�	Delimiter�Doc�Double�Heredoc�Interpol�Regex�Single�Symbol�Bin�Float�Hex�Integer�Long�Oct�Word�Marker�Hashbang�	Multiline�Preproc�PreprocFile�Special�Deleted�Emph�Heading�Inserted�Output�Prompt�Strong�
Subheading�	Traceback�STANDARD_TYPESr+rr�<module>r�s���(��(�V	���
�z�z��
�_�_�
�	����
����
�����-�-���z�z��
�-�-��	����	���������>�>��
�-�-���-�-�������������:Z�	�2�Z�	�2�Z��3�	Z�
�5�Z�
�5�
Z�
�3�Z��3�Z����4�Z����4�Z����4�Z��N�N�4�Z����4�Z��L�L�4�Z�"	�3�#Z�$	�N�N�4�%Z�&	�L�L�4�'Z�(	�L�L���4�)Z�*	�J�J�4�+Z�,	�M�M�4�-Z�.	�N�N�4�/Z�0	�K�K�4�1Z�2	�N�N�4�3Z�4	�M�M�4�5Z�6	�M�M���4�7Z�8	�M�M�4�9Z�:	�J�J�4�;Z�<	�N�N�4�=Z�>	�J�J�4�?Z�@	�H�H�4�AZ�B	�M�M�4�CZ�D	�M�M���4�EZ�F	�M�M���4�GZ�H	�M�M���4�IZ�J	�M�M���4�KZ�N�3�OZ�P�L�L�4�QZ�T�3�UZ�V�L�L�4�WZ�X�O�O�4�YZ�Z�K�K�4�[Z�\���4�]Z�^�J�J�4�_Z�`�M�M�4�aZ�b�M�M�4�cZ�d�N�N�4�eZ�f�O�O�4�gZ�h�L�L�4�iZ�j�L�L�4�kZ�l�M�M�4�mZ�n�M�M�4�oZ�r�3�sZ�t�J�J�4�uZ�v�L�L�4�wZ�x�J�J�4�yZ�z�N�N�4�{Z�|�N�N���4�}Z�~�J�J�4�Z�B
�3�CZ�D
�M�M�4�EZ�H�3�IZ�J���4�KZ�N�3�OZ�P���4�QZ�R���4�SZ�T�O�O�4�UZ�V���5�WZ�X�N�N�4�YZ�Z�O�O�4�[Z�^�3��O�O�4��L�L�4��M�M�4��O�O�4����4��N�N�4��N�N�4��N�N�4����4����4�sZ�rpython3.12/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-312.pyc000064400000005156151732702720023575 0ustar00�

R`i���$�dZdZiZded<edzed<edzed<edzed<ed	zed
<edzed<ed
zed<edzed<gd�Zgd�ZdZeee�D]#\ZZedezzee<eddezzzee<edz
Z�%[[[eded<d�Z	d�Z
d�Zy)z�
    pygments.console
    ~~~~~~~~~~~~~~~~

    Format colored console output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
z[�z	39;49;00m�reset�01m�bold�02m�faint�03m�standout�04m�	underline�05m�blink�06m�overline)�black�red�green�yellow�blue�magenta�cyan�gray)�brightblack�	brightred�brightgreen�brightyellow�
brightblue�
brightmagenta�
brightcyan�white�z%im�<�rc��tdS�Nr��codes����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/console.py�reset_colorr*(s����>�r(c�.�t||ztdzSr$r%)�	color_key�texts  r)�colorizer.,s�����d�"�U�7�^�3�3r(c���g}|dd|ddcxk(rdk(r nn|jtd�|dd}|dd|ddcxk(rdk(r nn|jtd�|dd}|dd|ddcxk(rdk(r nn|jtd	�|dd}|jt|�|j|�|jtd
�dj|�S)z�
    Format ``text`` with a color and/or some attributes::

        color       normal color
        *color*     bold color
        _color_     underlined color
        +color+     blinking color
    Nr"����+r
�*r�_rrr)�appendr&�join)�attrr-�results   r)�
ansiformatr80s����F��B�Q�x�4���9�#��#��
�
�e�G�n�%��A�b�z���B�Q�x�4���9�#��#��
�
�e�F�m�$��A�b�z���B�Q�x�4���9�#��#��
�
�e�K�(�)��A�b�z��
�M�M�%��+��
�M�M�$��
�M�M�%��.�!�
�7�7�6�?�r(N)�__doc__�escr&�dark_colors�light_colors�x�zip�d�lr*r.r8r'r(r)�<module>rAs������
����b�	��{�"��g���e���f�
��u���g���%�K��j���5�[��k���u���g���%�K��j��*��8������\�*�D�A�q��U�Q�Y��E�!�H��U�b�1�f�%�%�E�!�H���F�A�
+�
�q�!��v���g���4�r(python3.12/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-312.pyc000064400000010036151732702720023761 0ustar00�

R`i���dZddlZddlmZddlmZddlmZddlmZejd�Z
ed�Zd�Zd	�Z
dd
�Zy)a
    pygments.regexopt
    ~~~~~~~~~~~~~~~~~

    An algorithm that generates optimized regexes for matching long lists of
    literal strings.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�escape)�commonprefix)�groupby)�
itemgetterz[\[\^\\\-\]]c�Z�dtjd�dj|��zdzS)N�[c�(�d|j�zS)N�\)�group)�ms ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/regexopt.py�<lambda>zmake_charset.<locals>.<lambda>s������	�)9���])�	CS_ESCAPE�sub�join)�letterss r
�make_charsetrs'������9�2�7�7�7�;K�L�L�s�R�Rrc	�r�
��|xrdxsd}|sy|d�
t|�dk(r|t�
�z|zS�
s|t|ddd�zdz|zSt�
�dk(r~g}g}|D]3}t|�dk(r|j|��#|j|��5t|�dkDr4|r!|t|d�zdzt	|�z|zS|t	|�z|zSt|�}|r:t|�}|t|�zt|D�cgc]}||d��	c}d�z|zS|D�cgc]
}|ddd	���}}t|�}	|	rAt|	��|tt
�fd
�|D��d�zt|	ddd	��z|zS|djd�t|�
fd��D��z|zScc}wcc}w)
zEReturn a regex that matches any string in the sorted list of strings.�)rr�Nz(?:�?�|���c3�*�K�|]
}|d����y�w)N�)�.0�s�slens  �r
�	<genexpr>z"regex_opt_inner.<locals>.<genexpr>Hs�����$@��1�Q�v���Y��s�c3�LK�|]}tt|d�d����y�w)rrN)�regex_opt_inner�list)rrs  r
r"z"regex_opt_inner.<locals>.<genexpr>Ms(����L�J�U�!��e�A�h���4�J�s�"$c���|d�dk(S)Nrr)r �firsts �r
rz!regex_opt_inner.<locals>.<lambda>Ns����1���q��9Ir)	�lenrr$�appendrr�sortedrr)�strings�
open_paren�close_paren�	oneletter�restr �prefix�plen�strings_rev�suffixr'r!s          @@r
r$r$s����$��*��K����A�J�E�
�7�|�q���F�5�M�)�K�7�7���O�G�A�B�K��?�?���� �	 �
�5�z�Q���	����A��1�v��{�� � ��#����A��	�
�y�>�A���!�O�D�"�$=�=��C�"�9�-�.�0;�<�<���Y� 7�7�+�E�E�
�'�
"�F�
��6�{���F�6�N�*���9��A�q���x��9�5�A�B���	�%,�,�G�q�1�T�r�T�7�G�K�,�
�+�
&�F�
��6�{����f�$@��$@�@�%�H�I��V�D�b�D�\�"�#�%0�1�	1�
����L�%�g�/I�J�L�	L�L�����:��-s�F/
�%F4c�<�t|�}|t|d�z|zS)z�Return a compiled regex that matches any string in the given list.

    The strings to match must be literal strings, not regexes.  They will be
    regex-escaped.

    *prefix* and *suffix* are pre- and appended to the final regex.
    �()r*r$)r+r0r3s   r
�	regex_optr6Rs$���W�o�G��O�G�S�1�1�F�:�:r)rr)�__doc__�rer�os.pathr�	itertoolsr�operatorr�compiler�
FIRST_ELEMENTrr$r6rrr
�<module>r>sE��	�
�� ����B�J�J��'�	��1�
�
�S�5�p	;rpython3.12/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-312.pyc000064400000033300151732702720023100 0ustar00�

R`i�'���dZddlZddlmZejd�Zejdejejzejz�Z	ejdejejzejz�Zejdej�Z
Gd�d	e�ZGd
�de�Zd d�Zd!d
�Zd!d�Zd!d�Zd�Zd�Zd�Zd�Zd�ZiZd�Zd�Zd"d�Zd#d�ZGd�d�Z d�Z!d�Z"d�Z#Gd�de�Z$y)$z�
    pygments.util
    ~~~~~~~~~~~~~

    Utility functions.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
TextIOWrapperz[/\\ ]z�
    <!DOCTYPE\s+(
     [a-zA-Z_][a-zA-Z0-9]*
     (?: \s+      # optional in HTML5
     [a-zA-Z_][a-zA-Z0-9]*\s+
     "[^"]*")?
     )
     [^>]*>
z<(.+?)(\s.*?)?>.*?</.+?>z\s*<\?xml[^>]*\?>c��eZdZdZy)�
ClassNotFoundzCRaised if one of the lookup functions didn't find a matching class.N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/util.pyrrs��Mrrc��eZdZdZy)�OptionErrorz�
    This exception will be raised by all option processing functions if
    the type or value of the argument is not correct.
    Nrrrr
rr"s��rrc��|j||�}|r|j�}||vr.td|�ddjt	t
|������|S)z}
    If the key `optname` from the dictionary is not in the sequence
    `allowed`, raise an error, otherwise return it.
    zValue for option z must be one of z, )�get�lowerr�join�map�str)�options�optname�allowed�default�normcase�strings      r
�get_choice_optr(sY��
�[�[��'�
*�F�������
�W���"�D�I�I�c�#�w�.?�$@�B�C�	C��Mrc�4�|j||�}t|t�r|St|t�rt|�St|t�std|�d|�d���|j
�dvry|j
�dvrytd|�d|�d���)	a@
    Intuitively, this is `options.get(optname, default)`, but restricted to
    Boolean value. The Booleans can be represented as string, in order to accept
    Boolean value from the command line arguments. If the key `optname` is
    present in the dictionary `options` and is not associated with a Boolean,
    raise an `OptionError`. If it is absent, `default` is returned instead.

    The valid string values for ``True`` are ``1``, ``yes``, ``true`` and
    ``on``, the ones for ``False`` are ``0``, ``no``, ``false`` and ``off``
    (matched case-insensitively).
    �
Invalid type � for option z%; use 1/0, yes/no, true/false, on/off)�1�yes�true�onT)�0�no�false�offF�Invalid value )r�
isinstance�bool�intrrr�rrrrs    r
�get_bool_optr-6s����[�[��'�
*�F��&�$���
�	�F�C�	 ��F�|��
���
$��$�g�/�0�	0�
����5�	5��	����6�	6���$�g�/�0�	0rc��|j||�}	t|�S#t$rtd|�d|�d���t$rtd|�d|�d���wxYw)z?As :func:`get_bool_opt`, but interpret the value as an integer.rrz ; you must give an integer valuer()rr+�	TypeErrorr�
ValueErrorr,s    r
�get_int_optr1Ush��
�[�[��'�
*�F�	0��6�{����0��$�g�/�0�	0��0��$�g�/�0�	0�0�s	�
�6Ac���|j||�}t|t�r|j�St|tt
f�rt	|�St
d|�d|�d���)z�
    If the key `optname` from the dictionary `options` is a string,
    split it at whitespace and return it. If it is already a list
    or a tuple, it is returned as a list.
    rrz; you must give a list value)rr)r�split�list�tupler)rrr�vals    r
�get_list_optr7csY���+�+�g�w�
'�C��#�s���y�y�{��	�C�$���	'��C�y���!�7�,�-�	-rc� �|jsyg}|jj�j�D]6}|j�r#|jd|j�z��6ndj	|�j�S)N�� )r
�strip�
splitlines�appendr�lstrip)�obj�res�lines   r
�docstring_headlinerBtsm���;�;��
�C����!�!�#�.�.�0���:�:�<��J�J�s�T�Z�Z�\�)�*��	1�
�7�7�3�<��� � rc�F���fd�}�j|_t|�S)zAReturn a static text analyser function that returns float values.c	���	�|�}|sy	tdtdt|���S#t$rYywxYw#tt
f$rYywxYw)Ngg�?)�	Exception�min�max�floatr0r/)�text�rv�fs  �r
�text_analysez%make_analysator.<locals>.text_analyse�sb���	��4��B���	��s�C��U�2�Y�/�0�0���	��	���I�&�	��	�s�.�=�	:�:�A�A)r
�staticmethod)rKrLs` r
�make_analysatorrN�s!���
��9�9�L����%�%rc���|jd�}|dk\r|d|j�}n|j�}|jd�r�	tj	|ddj��D�cgc]}|r|jd�s|��c}d}tjd	|ztj�}|j|��y
ycc}w#t$rYywxYw)a�Check if the given regular expression matches the last part of the
    shebang if one exists.

        >>> from pygments.util import shebang_matches
        >>> shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')
        True
        >>> shebang_matches('#!/usr/bin/python2.4', r'python(2\.\d)?')
        True
        >>> shebang_matches('#!/usr/bin/python-ruby', r'python(2\.\d)?')
        False
        >>> shebang_matches('#!/usr/bin/python/ruby', r'python(2\.\d)?')
        False
        >>> shebang_matches('#!/usr/bin/startsomethingwith python',
        ...                 r'python(2\.\d)?')
        True

    It also checks for common windows executable file extensions::

        >>> shebang_matches('#!C:\\Python2.4\\Python.exe', r'python(2\.\d)?')
        True

    Parameters (``'-f'`` or ``'--foo'`` are ignored so ``'perl'`` does
    the same as ``'perl -e'``)

    Note that this method automatically searches the whole string (eg:
    the regular expression is wrapped in ``'^$'``)
    �
rNz#!��-���Fz^%s(\.(exe|cmd|bat|bin))?$T)�findr�
startswith�
split_path_rer3r;�
IndexError�re�compile�
IGNORECASE�search)rI�regex�index�
first_line�x�founds      r
�shebang_matchesra�s���8
�I�I�d�O�E���z��&�5�\�'�'�)�
��Z�Z�\�
����T�"�	� -� 3� 3�J�q�r�N�4H�4H�4J� K�5� K�1��!�,�,�s�"3�� K�5�57�9�E��
�
�8�5�@�"�-�-�P���<�<���*����5���	��	�s$�
(C�5C�C�C�	C"�!C"c���tj|�}|�y|jd�}tj|tj
�j
|j��duS)z�Check if the doctype matches a regular expression (if present).

    Note that this method only checks the first part of a DOCTYPE.
    eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
    NF�)�doctype_lookup_rer[�grouprXrY�I�matchr;)rIr\�m�doctypes    r
�doctype_matchesrj�sT��	� � ��&�A��y���g�g�a�j�G�
�:�:�e�R�T�T�"�(�(�����9��E�Erc��t|d�S)z3Check if the file looks like it has a html doctype.�html)rj)rIs r
�html_doctype_matchesrm�s���4��)�)rc���tj|�ryt|�}	t|S#t$rAt
j
|�}|�Yytj
|dd�du}|t|<|cYSwxYw)z2Check if a doctype exists or if we have some tags.TNi�)�xml_decl_rerg�hash�_looks_like_xml_cache�KeyErrorrdr[�tag_re)rI�keyrhrJs    r
�looks_like_xmlru�s|��������
�t�*�C��$�S�)�)�����$�$�T�*���=��
�]�]�4���;�
'�t�
3��%'��c�"��	�
�s�,� A6�%A6�5A6c�"�d|dz	zd|dzzfS)zoGiven a unicode character code with length greater than 16 bits,
    return the two 16 bit surrogate pair.
    i���
i�i�r)�cs r
�
surrogatepairry�s!��
�a�2�g���1�u�9�!5�7�7rc�P�g}d|zdz}d|dzzdz}|j||zdz�|r|D]}|j||zdz��n5|D]0}t|dz�}|j||ddz|d	zdz��2|j|d
z�dj|�S)z)Formats a sequence of strings for output.r:�rcz = (�,�"N���rS�)rP)r=�reprr)	�var_name�seq�raw�indent_level�lines�base_indent�inner_indent�i�rs	         r
�format_linesr��s����E���$�q�(�K��,��*�+�a�/�L�	�L�L��x�'�&�0�1�
��A��L�L���)�C�/�0���A��Q��W�
�A��L�L���#�2��.��2��6��<�=��
�L�L��s�"�#��9�9�U��rc��g}t�}|D]-}||vs||vr�|j|�|j|��/|S)za
    Returns a list with duplicates removed from the iterable `it`.

    Order is preserved.
    )�setr=�add)�it�already_seen�lst�seenr�s     r
�duplicates_removedr��sH��
�C��5�D�
����9��\�)���
�
�1�
������	�
�Jrc��eZdZdZd�Zy)�Futurez�Generic class to defer some work.

    Handled specially in RegexLexerMeta, to support regex string construction at
    first use.
    c��t��N)�NotImplementedError��selfs r
rz
Future.gets��!�!rN)rrr	r
rrrr
r�r�s���
"rr�c��	|jd�}|dfS#t$rX	ddl}|j�}|j�}||fcYS#ttf$r|jd�}|dfcYcYSwxYwwxYw)z�Decode *text* with guessed encoding.

    First try UTF-8; this should fail for non-UTF-8 encodings.
    Then try the preferred locale encoding.
    Fall back to latin-1, which always works.
    zutf-8rN�latin1)�decode�UnicodeDecodeError�locale�getpreferredencoding�LookupError)rIr��prefencodings   r
�guess_decoder�s���"��{�{�7�#���W�}����"�	"��!�6�6�8�L��;�;�=�D���%�%��"�K�0�	"��;�;�x�(�D���>�!�	"��
"�s,��	A8�'A�A8�$A4�/A8�3A4�4A8c��t|dd�r*	|j|j�}||jfSt	|�S#t$r
Yt	|�SwxYw)z�Decode *text* coming from terminal *term*.

    First try the terminal encoding, if given.
    Then try UTF-8.  Then try the preferred locale encoding.
    Fall back to latin-1, which always works.
    �encodingN)�getattrr�r�r�r�)rI�terms  r
�guess_decode_from_terminalr�.sd���t�Z��&�	'��;�;�t�}�}�-�D�����&�&������	"�	������		�s�A�	A�Ac�\�t|dd�r|jSddl}|j�S)z7Return our best guess of encoding for the given *term*.r�Nr)r�r�r�r�)r�r�s  r
�terminal_encodingr�?s*���t�Z��&��}�}����&�&�(�(rc��eZdZd�Zy)�UnclosingTextIOWrapperc�$�|j�yr�)�flushr�s r
�closezUnclosingTextIOWrapper.closeIs���
�
�rN)rrr	r�rrr
r�r�Gs��rr�)NFr�)Fr)r)%r
rX�iorrYrV�DOTALL�	MULTILINE�VERBOSErdrZrsrfror0rrErrr-r1r7rBrNrarjrmrqruryr�r�r�r�r�r�r�rrr
�<module>r�s$���
����
�
�9�%�
��B�J�J� ��Y�Y������
�
�*�,��
����/��M�M�B�I�I�-����<�
>���b�j�j�-�r�t�t�4��N�J�N��)���0�>0�-�"	!�&�"*�Z
F�*�
��
� 8��&
� "�"�"�*�")��]�rpython3.12/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-312.pyc000064400000001417151732702720023647 0ustar00�

R`ia���dZddlZddlmZ	ejeej
��y#e$rejd�YywxYw)z�
    pygments.__main__
    ~~~~~~~~~~~~~~~~~

    Main entry point for ``python -m pygments``.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�main�)�__doc__�sys�pip._vendor.pygments.cmdliner�exit�argv�KeyboardInterrupt����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/__main__.py�<module>rsI����-���C�H�H�T�#�(�(�^������C�H�H�Q�K��s�"1�A�
Apython3.12/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-312.pyc000064400000100346151732702730024153 0ustar00�

R`i�����dZdZdZdZdZdZdZdZdZd	Z	d
Z
dZdZd
Z
dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Z gd!�Z!d"�Z"d#�Z#d$�Z$e%d%k(�r�d&d'l&Z&ggd(�Z'e(e)d)�*�5Z*e*jW�Z,d'd'd'�e,d'e,j[d+�Z.e,e,j[d,�d'Z/e0d-�D]�Z1e2e1�Z3e&jhe3�Z5e6e3�d.k(rd/e3zZ3ne6e3�d0vrd/e3zZ3e'joe5g�jqe3�e3js�re'd1jqe3�d2e3zjs�s��e'd3jqe3���e(e)d4d)�*�5Z*e*jue.�e;e'�D]3Z5d5jye$e'e5��Z=e*jue5�d6e=�d7���5e;e'�Z!e!j}d1�e!j}d3�e*jud8e!z�e*jud9e&j~�d7��e*jue/�d'd'd'�y'y'#1swY���xYw#1swYy'xYw):af
    pygments.unistring
    ~~~~~~~~~~~~~~~~~~

    Strings of all Unicode characters of a certain category.
    Used for matching in Unicode-aware languages. Run to regenerate.

    Inspired by chartypes_create.py from the MoinMoin project.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
u--Ÿu`­؀-؅؜۝܏࣢᠎​-‏‪-‮⁠-⁤⁦--𑂽𑃍𛲠-𛲣𝅳-𝅺󠀁󠀠-󠁿uV͸-͹΀-΃΋΍΢԰՗-՘֋-֌֐׈-׏׫-׮׵-׿؝܎݋-݌޲-޿߻-߼࠮-࠯࠿࡜-࡝࡟࡫-࢟ࢵࢾ-࣒঄঍-঎঑-঒঩঱঳-঵঺-঻৅-৆৉-৊৏-৖৘-৛৞৤-৥৿-਀਄਋-਎਑-਒਩਱਴਷਺-਻਽੃-੆੉-੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺-઻૆૊૎-૏૑-૟૤-૥૲-૸଀଄଍-଎଑-଒଩଱଴଺-଻୅-୆୉-୊୎-୕୘-୛୞୤-୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎-௏௑-௖௘-௥௻-௿఍఑఩఺-఼౅౉౎-౔౗౛-౟౤-౥౰-౷಍಑಩಴಺-಻೅೉೎-೔೗-ೝ೟೤-೥೰ೳ-೿ഄ഍഑൅൉൐-൓൤-൥඀-ඁ඄඗-඙඲඼඾-඿෇-෉෋-෎෕෗෠-෥෰-෱෵-฀฻-฾๜-຀຃຅-ຆຉ຋-ຌຎ-ຓຘຠ຤຦ຨ-ຩຬ຺຾-຿໅໇໎-໏໚-໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎-჏቉቎-቏቗቙቞-቟኉኎-኏኱኶-኷኿዁዆-዇዗጑጖-጗፛-፜፽-፿᎚-᎟᏶-᏷᏾-᏿᚝-᚟᛹-᛿ᜍ᜕-ᜟ᜷-᜿᝔-᝟᝭᝱᝴-᝿៞-៟៪-៯៺-៿᠏᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮-᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜-᨝᩟᩽-᩾᪊-᪏᪚-᪟᪮-᪯ᪿ-᫿ᭌ-᭏᭽-᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻-᲼᳈-᳏ᳺ-᳿᷺἖-἗἞-἟὆-὇὎-὏὘὚὜὞὾-὿᾵῅῔-῕῜῰-῱῵῿⁥⁲-⁳₏₝-₟⃀-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴-⭵⮖-⮗⯉⯿Ⱟⱟ⳴-⳸⴦⴨-⴬⴮-⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹏-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗-゘㄀-㄄㄰㆏ㆻ-ㆿ㇤-㇯㈟㋿䶶-䶿鿰-鿿꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ꞻ-ꟶ꠬-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎-꩏꩚-꩛꫃-꫚꫷-꬀꬇-꬈꬏-꬐꬗-꬟꬧꬯ꭦ-꭯꯮-꯯꯺-꯿힤-힯퟇-퟊퟼-퟿﩮-﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯂-﯒﵀-﵏﶐-﶑﷈-﷯﷾-﷿︚-︟﹓﹧﹬-﹯﹵﻽-﻾＀﾿-￁￈-￉￐-￑￘-￙￝-￟￧￯-￸￾-￿𐀌𐀧𐀻𐀾𐁎-𐁏𐁞-𐁿𐃻-𐃿𐄃-𐄆𐄴-𐄶𐆏𐆜-𐆟𐆡-𐇏𐇾-𐉿𐊝-𐊟𐋑-𐋟𐋼-𐋿𐌤-𐌬𐍋-𐍏𐍻-𐍿𐎞𐏄-𐏇𐏖-𐏿𐒞-𐒟𐒪-𐒯𐓔-𐓗𐓼-𐓿𐔨-𐔯𐕤-𐕮𐕰-𐗿𐜷-𐜿𐝖-𐝟𐝨-𐟿𐠆-𐠇𐠉𐠶𐠹-𐠻𐠽-𐠾𐡖𐢟-𐢦𐢰-𐣟𐣳𐣶-𐣺𐤜-𐤞𐤺-𐤾𐥀-𐥿𐦸-𐦻𐧐-𐧑𐨄𐨇-𐨋𐨔𐨘𐨶-𐨷𐨻-𐨾𐩉-𐩏𐩙-𐩟𐪠-𐪿𐫧-𐫪𐫷-𐫿𐬶-𐬸𐭖-𐭗𐭳-𐭷𐮒-𐮘𐮝-𐮨𐮰-𐯿𐱉-𐱿𐲳-𐲿𐳳-𐳹𐴨-𐴯𐴺-𐹟𐹿-𐻿𐼨-𐼯𐽚-𐿿𑁎-𑁑𑁰-𑁾𑃂-𑃌𑃎-𑃏𑃩-𑃯𑃺-𑃿𑄵𑅇-𑅏𑅷-𑅿𑇎-𑇏𑇠𑇵-𑇿𑈒𑈿-𑉿𑊇𑊉𑊎𑊞𑊪-𑊯𑋫-𑋯𑋺-𑋿𑌄𑌍-𑌎𑌑-𑌒𑌩𑌱𑌴𑌺𑍅-𑍆𑍉-𑍊𑍎-𑍏𑍑-𑍖𑍘-𑍜𑍤-𑍥𑍭-𑍯𑍵-𑏿𑑚𑑜𑑟-𑑿𑓈-𑓏𑓚-𑕿𑖶-𑖷𑗞-𑗿𑙅-𑙏𑙚-𑙟𑙭-𑙿𑚸-𑚿𑛊-𑛿𑜛-𑜜𑜬-𑜯𑝀-𑟿𑠼-𑢟𑣳-𑣾𑤀-𑧿𑩈-𑩏𑪄-𑪅𑪣-𑪿𑫹-𑯿𑰉𑰷𑱆-𑱏𑱭-𑱯𑲐-𑲑𑲨𑲷-𑳿𑴇𑴊𑴷-𑴹𑴻𑴾𑵈-𑵏𑵚-𑵟𑵦𑵩𑶏𑶒𑶙-𑶟𑶪-𑻟𑻹-𑿿𒎚-𒏿𒑯𒑵-𒑿𒕄-𒿿𓐯-𔏿𔙇-𖟿𖨹-𖨿𖩟𖩪-𖩭𖩰-𖫏𖫮-𖫯𖫶-𖫿𖭆-𖭏𖭚𖭢𖭸-𖭼𖮐-𖸿𖺛-𖻿𖽅-𖽏𖽿-𖾎𖾠-𖿟𖿢-𖿿𘟲-𘟿𘫳-𚿿𛄟-𛅯𛋼-𛯿𛱫-𛱯𛱽-𛱿𛲉-𛲏𛲚-𛲛𛲤-𜿿𝃶-𝃿𝄧-𝄨𝇩-𝇿𝉆-𝋟𝋴-𝋿𝍗-𝍟𝍹-𝏿𝑕𝒝𝒠-𝒡𝒣-𝒤𝒧-𝒨𝒭𝒺𝒼𝓄𝔆𝔋-𝔌𝔕𝔝𝔺𝔿𝕅𝕇-𝕉𝕑𝚦-𝚧𝟌-𝟍𝪌-𝪚𝪠𝪰-𝿿𞀇𞀙-𞀚𞀢𞀥𞀫-𞟿𞣅-𞣆𞣗-𞣿𞥋-𞥏𞥚-𞥝𞥠-𞱰𞲵-𞷿𞸄𞸠𞸣𞸥-𞸦𞸨𞸳𞸸𞸺𞸼-𞹁𞹃-𞹆𞹈𞹊𞹌𞹐𞹓𞹕-𞹖𞹘𞹚𞹜𞹞𞹠𞹣𞹥-𞹦𞹫𞹳𞹸𞹽𞹿𞺊𞺜-𞺠𞺤𞺪𞺼-𞻯𞻲-𞿿🀬-🀯🂔-🂟🂯-🂰🃀🃐🃶-🃿🄍-🄏🅬-🅯🆭-🇥🈃-🈏🈼-🈿🉉-🉏🉒-🉟🉦-🋿🛕-🛟🛭-🛯🛺-🛿🝴-🝿🟙-🟿🠌-🠏🡈-🡏🡚-🡟🢈-🢏🢮-🣿🤌-🤏🤿🥱-🥲🥷-🥹🥻🦣-🦯🦺-🦿🧃-🧏🨀-🩟🩮-🿿𪛗-𪛿𫜵-𫜿𫠞-𫠟𬺢-𬺯𮯡-𯟿𯨞-󠀀󠀂-󠀟󠂀-󠃿󠇰-󯿿󿿾-󿿿􏿾-􏿿u-󰀀-󿿽􀀀-􏿽u�-�\��-�u2a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꟺꬰ-ꭚꭠ-ꭥꭰ-ꮿff-stﬓ-ﬗa-z𐐨-𐑏𐓘-𐓻𐳀-𐳲𑣀-𑣟𖹠-𖹿𝐚-𝐳𝑎-𝑔𝑖-𝑧𝒂-𝒛𝒶-𝒹𝒻𝒽-𝓃𝓅-𝓏𝓪-𝔃𝔞-𝔷𝕒-𝕫𝖆-𝖟𝖺-𝗓𝗮-𝘇𝘢-𝘻𝙖-𝙯𝚊-𝚥𝛂-𝛚𝛜-𝛡𝛼-𝜔𝜖-𝜛𝜶-𝝎𝝐-𝝕𝝰-𝞈𝞊-𝞏𝞪-𝟂𝟄-𝟉𝟋𞤢-𞥃u�ʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥ-ۦߴ-ߵߺࠚࠤࠨॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼ-ⱽⵯⸯ々〱-〵〻ゝ-ゞー-ヾꀕꓸ-ꓽꘌꙿꚜ-ꚝꜗ-ꜟꝰꞈꟸ-ꟹꧏꧦꩰꫝꫳ-ꫴꭜ-ꭟー゙-゚𖭀-𖭃𖾓-𖾟𖿠-𖿡unªºƻǀ-ǃʔא-תׯ-ײؠ-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॲ-ঀঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱৼਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡૹଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠ-ౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡೱ-ೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะา-ำเ-ๅກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳱᳵ-ᳶℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪ-ꘫꙮꚠ-ꛥꞏꟷꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽ-ꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧠ-ꧤꧧ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐊀-𐊜𐊠-𐋐𐌀-𐌟𐌭-𐍀𐍂-𐍉𐍐-𐍵𐎀-𐎝𐎠-𐏃𐏈-𐏏𐑐-𐒝𐔀-𐔧𐔰-𐕣𐘀-𐜶𐝀-𐝕𐝠-𐝧𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐡠-𐡶𐢀-𐢞𐣠-𐣲𐣴-𐣵𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀𐨐-𐨓𐨕-𐨗𐨙-𐨵𐩠-𐩼𐪀-𐪜𐫀-𐫇𐫉-𐫤𐬀-𐬵𐭀-𐭕𐭠-𐭲𐮀-𐮑𐰀-𐱈𐴀-𐴣𐼀-𐼜𐼧𐼰-𐽅𑀃-𑀷𑂃-𑂯𑃐-𑃨𑄃-𑄦𑅄𑅐-𑅲𑅶𑆃-𑆲𑇁-𑇄𑇚𑇜𑈀-𑈑𑈓-𑈫𑊀-𑊆𑊈𑊊-𑊍𑊏-𑊝𑊟-𑊨𑊰-𑋞𑌅-𑌌𑌏-𑌐𑌓-𑌨𑌪-𑌰𑌲-𑌳𑌵-𑌹𑌽𑍐𑍝-𑍡𑐀-𑐴𑑇-𑑊𑒀-𑒯𑓄-𑓅𑓇𑖀-𑖮𑗘-𑗛𑘀-𑘯𑙄𑚀-𑚪𑜀-𑜚𑠀-𑠫𑣿𑨀𑨋-𑨲𑨺𑩐𑩜-𑪃𑪆-𑪉𑪝𑫀-𑫸𑰀-𑰈𑰊-𑰮𑱀𑱲-𑲏𑴀-𑴆𑴈-𑴉𑴋-𑴰𑵆𑵠-𑵥𑵧-𑵨𑵪-𑶉𑶘𑻠-𑻲𒀀-𒎙𒒀-𒕃𓀀-𓐮𔐀-𔙆𖠀-𖨸𖩀-𖩞𖫐-𖫭𖬀-𖬯𖭣-𖭷𖭽-𖮏𖼀-𖽄𖽐𗀀-𘟱𘠀-𘫲𛀀-𛄞𛅰-𛋻𛰀-𛱪𛱰-𛱼𛲀-𛲈𛲐-𛲙𞠀-𞣄𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝𫠠-𬺡𬺰-𮯠丽-𪘀u&DžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼu�A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸA-Z𐐀-𐐧𐒰-𐓓𐲀-𐲲𑢠-𑢿𖹀-𖹟𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊𞤀-𞤡u�ःऻा-ीॉ-ौॎ-ॏং-ঃা-ীে-ৈো-ৌৗਃਾ-ੀઃા-ીૉો-ૌଂ-ଃାୀେ-ୈୋ-ୌୗா-ிு-ூெ-ைொ-ௌௗఁ-ఃు-ౄಂ-ಃಾೀ-ೄೇ-ೈೊ-ೋೕ-ೖം-ഃാ-ീെ-ൈൊ-ൌൗං-ඃා-ෑෘ-ෟෲ-ෳ༾-༿ཿါ-ာေးျ-ြၖ-ၗၢ-ၤၧ-ၭႃ-ႄႇ-ႌႏႚ-ႜាើ-ៅះ-ៈᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸᨙ-ᨚᩕᩗᩡᩣ-ᩤᩭ-ᩲᬄᬵᬻᬽ-ᭁᭃ-᭄ᮂᮡᮦ-ᮧ᮪ᯧᯪ-ᯬᯮ᯲-᯳ᰤ-ᰫᰴ-ᰵ᳡ᳲ-ᳳ᳷〮-〯ꠣ-ꠤꠧꢀ-ꢁꢴ-ꣃꥒ-꥓ꦃꦴ-ꦵꦺ-ꦻꦽ-꧀ꨯ-ꨰꨳ-ꨴꩍꩻꩽꫫꫮ-ꫯꫵꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯬𑀀𑀂𑂂𑂰-𑂲𑂷-𑂸𑄬𑅅-𑅆𑆂𑆳-𑆵𑆿-𑇀𑈬-𑈮𑈲-𑈳𑈵𑋠-𑋢𑌂-𑌃𑌾-𑌿𑍁-𑍄𑍇-𑍈𑍋-𑍍𑍗𑍢-𑍣𑐵-𑐷𑑀-𑑁𑑅𑒰-𑒲𑒹𑒻-𑒾𑓁𑖯-𑖱𑖸-𑖻𑖾𑘰-𑘲𑘻-𑘼𑘾𑚬𑚮-𑚯𑚶𑜠-𑜡𑜦𑠬-𑠮𑠸𑨹𑩗-𑩘𑪗𑰯𑰾𑲩𑲱𑲴𑶊-𑶎𑶓-𑶔𑶖𑻵-𑻶𖽑-𖽾𝅥-𝅦𝅭-𝅲u҈-҉᪾⃝-⃠⃢-⃤꙰-꙲u�̀-ͯ҃-֑҇-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়ু-ৄ্ৢ-ৣ৾ਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣૺ-૿ଁ଼ିୁ-ୄ୍ୖୢ-ୣஂீ்ఀఄా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೆೌ-್ೢ-ೣഀ-ഁ഻-഼ു-ൄ്ൢ-ൣ්ි-ුූัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢅ-ᢆᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷹᷻-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙〭-゚꙯ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-𐇽𐋠︯𐍶-𐍺𐨁-𐨃𐨅-𐨆𐨌-𐨏𐨸-𐨿𐨺𐫥-𐫦𐴤-𐽆𐴧-𐽐𑀁𑀸-𑁆𑁿-𑂁𑂳-𑂶𑂹-𑂺𑄀-𑄂𑄧-𑄫𑄭-𑅳𑄴𑆀-𑆁𑆶-𑆾𑇉-𑇌𑈯-𑈱𑈴𑈶-𑈷𑈾𑋟𑋣-𑋪𑌀-𑌁𑌻-𑌼𑍀𑍦-𑍬𑍰-𑍴𑐸-𑐿𑑂-𑑄𑑆𑑞𑒳-𑒸𑒺𑒿-𑓀𑓂-𑓃𑖲-𑖵𑖼-𑖽𑖿-𑗀𑗜-𑗝𑘳-𑘺𑘽𑘿-𑙀𑚫𑚭𑚰-𑚵𑚷𑜝-𑜟𑜢-𑜥𑜧-𑜫𑠯-𑠷𑠹-𑠺𑨁-𑨊𑨳-𑨸𑨻-𑨾𑩇𑩑-𑩖𑩙-𑩛𑪊-𑪖𑪘-𑪙𑰰-𑰶𑰸-𑰽𑰿𑲒-𑲧𑲪-𑲰𑲲-𑲳𑲵-𑲶𑴱-𑴶𑴺𑴼-𑴽𑴿-𑵅𑵇𑶐-𑶑𑶕𑶗𑻳-𑻴𖫰-𖫴𖬰-𖬶𖾏-𖾒𛲝-𛲞𝅧-𝅩𝅻-𝆂𝆅-𝆋𝆪-𝆭𝉂-𝉄𝨀-𝨶𝨻-𝩬𝩵𝪄𝪛-𝪟𝪡-𝪯𞀀-𞀆𞀈-𞀘𞀛-𞀡𞀣-𞀤𞀦-𞣐𞀪-𞣖𞥄-𞥊󠄀-󠇯u�0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9𐒠-𐒩𐴰-𐴹𑁦-𑁯𑃰-𑃹𑄶-𑄿𑇐-𑇙𑋰-𑋹𑑐-𑑙𑓐-𑓙𑙐-𑙙𑛀-𑛉𑜰-𑜹𑣠-𑣩𑱐-𑱙𑵐-𑵙𑶠-𑶩𖩠-𖩩𖭐-𖭙𝟎-𝟿𞥐-𞥙uPᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ𐅀-𐅴𐍁𐍊𐏑-𐏕𒐀-𒑮u²-³¹¼-¾৴-৹୲-୷௰-௲౸-౾൘-൞൰-൸༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵𐄇-𐄳𐅵-𐅸𐆊-𐆋𐋡-𐋻𐌠-𐌣𐡘-𐡟𐡹-𐡿𐢧-𐢯𐣻-𐣿𐤖-𐤛𐦼-𐦽𐧀-𐧏𐧒-𐧿𐩀-𐩈𐩽-𐩾𐪝-𐪟𐫫-𐫯𐭘-𐭟𐭸-𐭿𐮩-𐮯𐳺-𐳿𐹠-𐹾𐼝-𐼦𐽑-𐽔𑁒-𑁥𑇡-𑇴𑜺-𑜻𑣪-𑣲𑱚-𑱬𖭛-𖭡𖺀-𖺖𝋠-𝋳𝍠-𝍸𞣇-𞣏𞱱-𞲫𞲭-𞲯𞲱-𞲴🄀-🄌u_‿-⁀⁔︳-︴﹍-﹏_u<\-֊־᐀᠆‐-―⸗⸚⸺-⸻⹀〜〰゠︱-︲﹘﹣-u�)\]}༻༽᚜⁆⁾₎⌉⌋〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩〉》」』】〕〗〙〛〞-〟﴾︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」u»’”›⸃⸅⸊⸍⸝⸡u$«‘‛-“‟‹⸂⸄⸉⸌⸜⸠u�!-#%-'*,.-/:-;?-@\\¡§¶-·¿;·՚-՟։׀׃׆׳-״؉-؊،-؍؛؞-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।-॥॰৽੶૰಄෴๏๚-๛༄-༒༔྅࿐-࿔࿙-࿚၊-၏჻፠-፨᙭-᙮᛫-᛭᜵-᜶។-៖៘-៚᠀-᠅᠇-᠊᥄-᥅᨞-᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾-᱿᳀-᳇᳓‖-‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾-⳿⵰⸀-⸁⸆-⸈⸋⸎-⸖⸘-⸙⸛⸞-⸟⸪-⸮⸰-⸹⸼-⸿⹁⹃-⹎、-〃〽・꓾-꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎-꣏꣸-꣺꣼꤮-꤯꥟꧁-꧍꧞-꧟꩜-꩟꫞-꫟꫰-꫱꯫︐-︖︙︰﹅-﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪-﹫!-#%-'*,.-/:-;?-@\。、-・𐄀-𐄂𐎟𐏐𐕯𐡗𐤟𐤿𐩐-𐩘𐩿𐫰-𐫶𐬹-𐬿𐮙-𐮜𐽕-𐽙𑁇-𑁍𑂻-𑂼𑂾-𑃁𑅀-𑅃𑅴-𑅵𑇅-𑇈𑇍𑇛𑇝-𑇟𑈸-𑈽𑊩𑑋-𑑏𑑛𑑝𑓆𑗁-𑗗𑙁-𑙃𑙠-𑙬𑜼-𑜾𑠻𑨿-𑩆𑪚-𑪜𑪞-𑪢𑱁-𑱅𑱰-𑱱𑻷-𑻸𒑰-𒑴𖩮-𖩯𖫵𖬷-𖬻𖭄𖺗-𖺚𛲟𝪇-𝪋𞥞-𞥟u�(\[{༺༼᚛‚„⁅⁽₍⌈⌊〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨⹂〈《「『【〔〖〘〚〝﴿︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「uJ$¢-¥֏؋߾-߿৲-৳৻૱௹฿៛₠-₿꠸﷼﹩$¢-£¥-₩𞲰u�\^`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄-΅᾽᾿-῁῍-῏῝-῟῭-`´-῾゛-゜꜀-꜖꜠-꜡꞉-꞊꭛﮲-﯁^` ̄🏻-🏿u#+<->|~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚-↛↠↣↦↮⇎-⇏⇒⇔⇴-⋿⌠-⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃𞻰-𞻱u�¦©®°҂֍-֎؎-؏۞۩۽-۾߶৺୰௳-௸௺౿൏൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎-࿏࿕-࿘႞-႟᎐-᎙᥀᧞-᧿᭡-᭪᭴-᭼℀-℁℃-℆℈-℉℔№-℗℞-℣℥℧℩℮℺-℻⅊⅌-⅍⅏↊-↋↕-↙↜-↟↡-↢↤-↥↧-↭↯-⇍⇐-⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-❧➔-➿⠀-⣿⬀-⬯⭅-⭆⭍-⭳⭶-⮕⮘-⯈⯊-⯾⳥-⳪⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒-〓〠〶-〷〾-〿㆐-㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㋾㌀-㏿䷀-䷿꒐-꓆꠨-꠫꠶-꠷꠹꩷-꩹﷽¦│■-○-�𐄷-𐄿𐅹-𐆉𐆌-𐆎𐆐-𐆛𐆠𐇐-𐇼𐡷-𐡸𐫈𑜿𖬼-𖬿𖭅𛲜𝀀-𝃵𝄀-𝄦𝄩-𝅘𝅥𝅲𝅪-𝅬𝆃-𝆄𝆌-𝆩𝆮-𝇨𝈀-𝉁𝉅𝌀-𝍖𝠀-𝧿𝨷-𝨺𝩭-𝩴𝩶-𝪃𝪅-𝪆𞲬🀀-🀫🀰-🂓🂠-🂮🂱-🂿🃁-🃏🃑-🃵🄐-🅫🅰-🆬🇦-🈂🈐-🈻🉀-🉈🉐-🉑🉠-🉥🌀-🏺🐀-🛔🛠-🛬🛰-🛹🜀-🝳🞀-🟘🠀-🠋🠐-🡇🡐-🡙🡠-🢇🢐-🢭🤀-🤋🤐-🤾🥀-🥰🥳-🥶🥺🥼-🦢🦰-🦹🧀-🧂🧐-🧿🩠-🩭u
u
u    -    uZ0-9A-Z_a-zªµ·ºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶ-ͷͻ-ͽͿΆ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙՠ-ֈ֑-ֽֿׁ-ׂׄ-ׇׅא-תׯ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺ߽ࠀ-࠭ࡀ-࡛ࡠ-ࡪࢠ-ࢴࢶ-ࢽ࣓-ࣣ࣡-ॣ०-९ॱ-ঃঅ-ঌএ-ঐও-নপ-রলশ-হ়-ৄে-ৈো-ৎৗড়-ঢ়য়-ৣ০-ৱৼ৾ਁ-ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹ਼ਾ-ੂੇ-ੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ૹ-૿ଁ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହ଼-ୄେ-ୈୋ-୍ୖ-ୗଡ଼-ଢ଼ୟ-ୣ୦-୯ୱஂ-ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕ-ౖౘ-ౚౠ-ౣ౦-౯ಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕ-ೖೞೠ-ೣ೦-೯ೱ-ೲഀ-ഃഅ-ഌഎ-ഐഒ-ൄെ-ൈൊ-ൎൔ-ൗൟ-ൣ൦-൯ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-ෳก-ฺเ-๎๐-๙ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘-༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟፩-፱ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲ-ᝳក-៓ៗៜ-៝០-៩᠋-᠍᠐-᠙ᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿ᳐-᳔᳒-᳹ᴀ-᷹᷻-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿-⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙-゚ゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠧꡀ-ꡳꢀ-ꣅ꣐-꣙꣠-ꣷꣻꣽ-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯪ꯬-꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﱝﱤ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷹ︀-️︠-︯︳-︴﹍-﹏ﹱﹳﹷﹹﹻﹽﹿ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐅀-𐅴𐇽𐊀-𐊜𐊠-𐋐𐋠𐌀-𐌟𐌭-𐍊𐍐-𐍺𐎀-𐎝𐎠-𐏃𐏈-𐏏𐏑-𐏕𐐀-𐒝𐒠-𐒩𐒰-𐓓𐓘-𐓻𐔀-𐔧𐔰-𐕣𐘀-𐜶𐝀-𐝕𐝠-𐝧𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐡠-𐡶𐢀-𐢞𐣠-𐣲𐣴-𐣵𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀-𐨃𐨅-𐨆𐨌-𐨓𐨕-𐨗𐨙-𐨵𐨸-𐨿𐨺𐩠-𐩼𐪀-𐪜𐫀-𐫇𐫉-𐫦𐬀-𐬵𐭀-𐭕𐭠-𐭲𐮀-𐮑𐰀-𐱈𐲀-𐲲𐳀-𐳲𐴀-𐴧𐴰-𐴹𐼀-𐼜𐼧𐼰-𐽐𑀀-𑁆𑁦-𑁯𑁿-𑂺𑃐-𑃨𑃰-𑃹𑄀-𑄴𑄶-𑄿𑅄-𑅆𑅐-𑅳𑅶𑆀-𑇄𑇉-𑇌𑇐-𑇚𑇜𑈀-𑈑𑈓-𑈷𑈾𑊀-𑊆𑊈𑊊-𑊍𑊏-𑊝𑊟-𑊨𑊰-𑋪𑋰-𑋹𑌀-𑌃𑌅-𑌌𑌏-𑌐𑌓-𑌨𑌪-𑌰𑌲-𑌳𑌵-𑌹𑌻-𑍄𑍇-𑍈𑍋-𑍍𑍐𑍗𑍝-𑍣𑍦-𑍬𑍰-𑍴𑐀-𑑊𑑐-𑑙𑑞𑒀-𑓅𑓇𑓐-𑓙𑖀-𑖵𑖸-𑗀𑗘-𑗝𑘀-𑙀𑙄𑙐-𑙙𑚀-𑚷𑛀-𑛉𑜀-𑜚𑜝-𑜫𑜰-𑜹𑠀-𑠺𑢠-𑣩𑣿𑨀-𑨾𑩇𑩐-𑪃𑪆-𑪙𑪝𑫀-𑫸𑰀-𑰈𑰊-𑰶𑰸-𑱀𑱐-𑱙𑱲-𑲏𑲒-𑲧𑲩-𑲶𑴀-𑴆𑴈-𑴉𑴋-𑴶𑴺𑴼-𑴽𑴿-𑵇𑵐-𑵙𑵠-𑵥𑵧-𑵨𑵪-𑶎𑶐-𑶑𑶓-𑶘𑶠-𑶩𑻠-𑻶𒀀-𒎙𒐀-𒑮𒒀-𒕃𓀀-𓐮𔐀-𔙆𖠀-𖨸𖩀-𖩞𖩠-𖩩𖫐-𖫭𖫰-𖫴𖬀-𖬶𖭀-𖭃𖭐-𖭙𖭣-𖭷𖭽-𖮏𖹀-𖹿𖼀-𖽄𖽐-𖽾𖾏-𖾟𖿠-𖿡𗀀-𘟱𘠀-𘫲𛀀-𛄞𛅰-𛋻𛰀-𛱪𛱰-𛱼𛲀-𛲈𛲐-𛲙𛲝-𛲞𝅥-𝅩𝅭-𝅲𝅻-𝆂𝆅-𝆋𝆪-𝆭𝉂-𝉄𝐀-𝑔𝑖-𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒹𝒻𝒽-𝓃𝓅-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔞-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕒-𝚥𝚨-𝛀𝛂-𝛚𝛜-𝛺𝛼-𝜔𝜖-𝜴𝜶-𝝎𝝐-𝝮𝝰-𝞈𝞊-𝞨𝞪-𝟂𝟄-𝟋𝟎-𝟿𝨀-𝨶𝨻-𝩬𝩵𝪄𝪛-𝪟𝪡-𝪯𞀀-𞀆𞀈-𞀘𞀛-𞀡𞀣-𞀤𞀦-𞀪𞠀-𞣄𞣐-𞣖𞤀-𞥊𞥐-𞥙𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝𫠠-𬺡𬺰-𮯠丽-𪘀󠄀-󠇯u�A-Z_a-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶ-ͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴ-ߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱৼਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡૹଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠ-ౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡೱ-ೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵ-ᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪ-ꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽ-ꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﱝﱤ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷹﹱﹳﹷﹹﹻﹽﹿ-ﻼA-Za-zヲ-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐅀-𐅴𐊀-𐊜𐊠-𐋐𐌀-𐌟𐌭-𐍊𐍐-𐍵𐎀-𐎝𐎠-𐏃𐏈-𐏏𐏑-𐏕𐐀-𐒝𐒰-𐓓𐓘-𐓻𐔀-𐔧𐔰-𐕣𐘀-𐜶𐝀-𐝕𐝠-𐝧𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐡠-𐡶𐢀-𐢞𐣠-𐣲𐣴-𐣵𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀𐨐-𐨓𐨕-𐨗𐨙-𐨵𐩠-𐩼𐪀-𐪜𐫀-𐫇𐫉-𐫤𐬀-𐬵𐭀-𐭕𐭠-𐭲𐮀-𐮑𐰀-𐱈𐲀-𐲲𐳀-𐳲𐴀-𐴣𐼀-𐼜𐼧𐼰-𐽅𑀃-𑀷𑂃-𑂯𑃐-𑃨𑄃-𑄦𑅄𑅐-𑅲𑅶𑆃-𑆲𑇁-𑇄𑇚𑇜𑈀-𑈑𑈓-𑈫𑊀-𑊆𑊈𑊊-𑊍𑊏-𑊝𑊟-𑊨𑊰-𑋞𑌅-𑌌𑌏-𑌐𑌓-𑌨𑌪-𑌰𑌲-𑌳𑌵-𑌹𑌽𑍐𑍝-𑍡𑐀-𑐴𑑇-𑑊𑒀-𑒯𑓄-𑓅𑓇𑖀-𑖮𑗘-𑗛𑘀-𑘯𑙄𑚀-𑚪𑜀-𑜚𑠀-𑠫𑢠-𑣟𑣿𑨀𑨋-𑨲𑨺𑩐𑩜-𑪃𑪆-𑪉𑪝𑫀-𑫸𑰀-𑰈𑰊-𑰮𑱀𑱲-𑲏𑴀-𑴆𑴈-𑴉𑴋-𑴰𑵆𑵠-𑵥𑵧-𑵨𑵪-𑶉𑶘𑻠-𑻲𒀀-𒎙𒐀-𒑮𒒀-𒕃𓀀-𓐮𔐀-𔙆𖠀-𖨸𖩀-𖩞𖫐-𖫭𖬀-𖬯𖭀-𖭃𖭣-𖭷𖭽-𖮏𖹀-𖹿𖼀-𖽄𖽐𖾓-𖾟𖿠-𖿡𗀀-𘟱𘠀-𘫲𛀀-𛄞𛅰-𛋻𛰀-𛱪𛱰-𛱼𛲀-𛲈𛲐-𛲙𝐀-𝑔𝑖-𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒹𝒻𝒽-𝓃𝓅-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔞-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕒-𝚥𝚨-𝛀𝛂-𝛚𝛜-𝛺𝛼-𝜔𝜖-𝜴𝜶-𝝎𝝐-𝝮𝝰-𝞈𝞊-𝞨𝞪-𝟂𝟄-𝟋𞠀-𞣄𞤀-𞥃𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝𫠠-𬺡𬺰-𮯠丽-𪘀)�Cc�Cf�Cn�Co�Cs�Ll�Lm�Lo�Lt�Lu�Mc�Me�Mn�Nd�Nl�No�Pc�Pd�Pe�Pf�Pi�Po�Ps�Sc�Sk�Sm�So�Zl�Zp�Zsc�2�djd�|D��S)N�c3�6K�|]}t�|���y�w�N��globals��.0�cats  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/unistring.py�	<genexpr>zcombine.<locals>.<genexpr>Ss����2�T�c�7�9�S�>�T���)�join)�argss r)�combiner.Rs��
�7�7�2�T�2�2�2�c�t�tdd}|D]}|j|��djd�|D��S)Nr!c3�6K�|]}t�|���y�wr#r$r&s  r)r*zallexcept.<locals>.<genexpr>Zs����5�W�c�7�9�S�>�W�r+)�cats�remover,)r-�newcats�args   r)�	allexceptr6Vs6���1�g�G������s���
�7�7�5�W�5�5�5r/c#�"K�g}|D]g}t|�dk(rD|r.|ddtt|�dz
�k(r|dd|f|d<�A|j||f��U|j||f��i|D]\}}||k(r|���|�d|�����y�w)N������-)�len�chr�ord�append)�	char_list�buf�c�a�bs     r)�_handle_runsrE]s�����
�C�
���q�6�Q�;��s�2�w�q�z�S��Q����]�2��r�7�1�:�q�/��B���
�
�A�q�6�"��J�J��1�v������1���6��G���"�"�	�s�B
B�__main__r:N)�	xid_start�xid_continuezutf-8)�encodingzCc =zdef combine(ii��\)�-�[�\�]�^rGrCrH�wr!z = z

zcats = %r

z# Generated from unidata )@�__doc__rrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrHrGr2r.r6rE�__name__�unicodedata�
categories�open�__file__�fp�read�content�find�header�footer�range�coder=rB�categoryr(r>�
setdefaultr?�isidentifier�write�sortedr,�valr3�unidata_version�r/r)�<module>rgs������[��BM��>��)��HK��W��[h��X��UI��d ��A��D@��C��o��r��;����r��A��N��m ��}��_��^��M	��@&��
��
��1��Zc��
AE�	�|��3�6�#�"�z���!�2�6�J�	
�h��	)�R��'�'�)��
*��*�g�l�l�6�*�
+�F�
�W�\�\�.�1�2�
3�F��h�����I��"�k�"�"�1�%���q�6�V���q��A�
��V�5�
5��q��A����c�2�&�-�-�a�0�
�>�>���{�#�*�*�1�-��!�G�!�!�#��~�&�-�-�a�0�! �$
�h��g�	.�"�
������*�%�C��'�'�,�z�#��7�8�C��H�H�c�3�/�0�&��j�!�����K� ����N�#�
����4�'�(�
���k�6Q�6Q�S�T�
�����
/�	.�;�

*�	)��0
/�	.�s�)H1�)B>H>�1H;�>Ipython3.12/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-312.pyc000064400000003107151732702730023722 0ustar00�

R`i���^�dZddlZdgZejdej�Zd�Zdd�Zy)z�
    pygments.modeline
    ~~~~~~~~~~~~~~~~~

    A simple modeline parser (based on pymodeline).

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N�get_filetype_from_bufferze
    (?: vi | vim | ex ) (?: [<=>]? \d* )? :
    .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ )
c�T�tj|�}|r|jd�Sy)N�)�modeline_re�search�group)�l�ms  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/modeline.py�get_filetype_from_liners(�����1��A���w�w�q�z��	�c���|j�}|d|dz
d�D]}t|�}|s�|cSt|dd�D]%}|t|�ks�t||�}|s�#|cSy)zL
    Scan the buffer for modelines and return filetype if one is found.
    ���rN)�
splitlinesr�range�len)�buf�	max_lines�linesr	�ret�is      rrrsy��
�N�N��E�
�2�y�j��l�2�%�
&��$�Q�'����J�'��9�b�"�
%���s�5�z�>�(��q��2�C���
�	&�r
)�)�__doc__�re�__all__�compile�VERBOSErrr�r
r�<module>rsA���
�%�
&���b�j�j���Z�Z����r
python3.12/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-312.pyc000064400000025461151732702730024167 0ustar00�

R`i���l�dZddlZddlmZddlmZddlmZddlm	Z	dZ
dZd	Zd
Z
Gd�de�Zd
�Zy)a
    pygments.sphinxext
    ~~~~~~~~~~~~~~~~~~

    Sphinx extension to generate automatic documentation of lexers,
    formatters and filters.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�nodes)�ViewList)�	Directive)�nested_parse_with_titlesz
.. module:: %s

%s
%s
zX
.. class:: %s

    :Short names: %s
    :Filenames:   %s
    :MIME types:  %s

    %s

zA
.. class:: %s

    :Short names: %s
    :Filenames: %s

    %s

z'
.. class:: %s

    :Name: %s

    %s

c�B�eZdZdZdZdZdZdZiZd�Z	d�Z
d�Zd�Zd	�Z
y
)�PygmentsDoczn
    A directive to collect all lexers/formatters/filters and generate
    autoclass directives for them.
    F�rc��t�|_|jddk(r|j�}nt|jddk(r|j	�}nQ|jddk(r|j�}n.|jddk(r|j
�}ntd��tj�}t|jd�d�	�}t|j||�|jD];}|jjjj j#|��=|j$S)
Nr�lexers�
formatters�filters�lexers_overviewz,invalid argument for "pygmentsdoc" directive�
�)�source)�set�	filenames�	arguments�document_lexers�document_formatters�document_filters�document_lexers_overview�	Exceptionr�compoundr�splitr�state�document�settings�record_dependencies�add�children)�self�out�node�vl�fns     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/sphinxext.py�runzPygmentsDoc.runEs�������>�>�!���(��&�&�(�C�
�^�^�A�
�,�
.��*�*�,�C�
�^�^�A�
�)�
+��'�'�)�C�
�^�^�A�
�"3�
3��/�/�1�C��J�K�K��~�~���
�c�i�i��o�b�
1�� ����R��6��.�.�B��J�J���(�(�<�<�@�@��D�!��}�}��c
����ddlm}ddlm}g}g}d�}t	|j�d���D]�\}}||d�}|j|jz}	|j||d|j�dj|	�jd	d
�jdd�xsd
dj|d�|d�d|��d����gd�}
|
D��cgc]-}t|D�cgc]}||s�	t||���c}���/c}}��fd����fd�}
|j|
��|j�dddd��|j|
��|D],}|j�|d|d|dd|d�d����.|j|
��dj|�Scc}wcc}}w)z�Generate a tabular overview of all lexers.

        The columns are the lexer name, the extensions handled by this lexer
        (or "None"), the aliases and a link to the lexer class.r��LEXERS)�find_lexer_classc��|r	d|�d|�d�S|S)N�`z <z>`_�)�name�urls  r'�format_linkz9PygmentsDoc.document_lexers_overview.<locals>.format_linkcs����4�&��3�%�s�+�+��Kr)c�.�|ddj�S)Nr	)�lower��xs r'�<lambda>z6PygmentsDoc.document_lexers_overview.<locals>.<lambda>hs��A�a�D��G�M�M�Or)��keyr	�, �*�\*�_�\�None��.)r1�
extensions�aliases�classc���g}t�|�D]<\}}|r!|j|j|���)|jd|z��>dj|�S)zFormat a table row� )�zip�append�ljust�join)�columnsr#�l�c�column_lengthss    �r'�	write_rowz7PygmentsDoc.document_lexers_overview.<locals>.write_rowwsT����C��N�G�4���1���J�J�q�w�w�q�z�*��J�J�s�1�u�%�	5��8�8�C�=� r)c�<���D�cgc]}d|z��	}}�|�Scc}w)zWrite a table separator row�=r0)rN�seprOrPs  ��r'�write_seperatorz=PygmentsDoc.document_lexers_overview.<locals>.write_seperator�s*���"0�1�.�Q�3�q�5�.�C�1��c�?�"��2s��NamezExtension(s)z
Short name(s)zLexer classr1rCrDz	:class:`~rEr/r)�$pip._vendor.pygments.lexers._mappingr,�pip._vendor.pygments.lexersr-�sorted�itemsr�alias_filenamesrIr2rK�replace�max�len)r"r,r-r#�tabler3�	classname�data�	lexer_clsrC�column_names�column�rowrTrOrPs              @@r'rz$PygmentsDoc.document_lexers_overviewXs����
	@�@�����	�
 &�f�l�l�n�:S�T�O�I�t�(��a��1�I�"�,�,�y�/H�/H�H�J��L�L�#�D��G�Y�]�]�;�"�i�i�
�3�;�;�C��G�O�O�PS�UY�Z�d�^d��9�9�T�!�W�-� ��G�9�A�i�[�1�	�
�	 U�B��(4�6�(4�f��5�P�5�C�C��K�s�3�v�;�/�5�P�Q�(4�6��		!�	#�
	�
�
�?�$�%��
�
�9�V�^�_�m�T�U��
�
�?�$�%��C��J�J�y��F���L�!��I���C��L�>��+�	-�
.��	�
�
�?�$�%��y�y��~���=Q��6s�G�,
F=�7F=�	G�=Gc
��ddlm}g}i}i}t|j�d���D�]R\}}|d}t	|dd|g�}|j
j
|j�t||�}	|	jstd|z�|	j}
t|
t�r|
jd�}
|j|g�j|dj!|d�xsd	dj!|d
�j#dd�j#d
d�xsd	dj!|d�xsd	|
f�||vs��!|j}t|t�r|jd�}|||<��Ut|j�d���D]�\}}||�t%d|����||j'�dj)�j+d�}
|jt,||
dt/|
�zfz�|D]}|jt0|z����dj!|�S)Nrr+c��|dS�Nrr0r6s r'r8z-PygmentsDoc.document_lexers.<locals>.<lambda>����A�a�Dr)r9z&Warning: %s does not have a docstring.�utf8r;rAr@�r<r=r>r?�c��|dSrgr0r6s r'r8z-PygmentsDoc.document_lexers.<locals>.<lambda>�rhr)zMissing docstring for rB�-r)rVr,rXrY�
__import__rr �__file__�getattr�__doc__�print�
isinstance�bytes�decode�
setdefaultrIrKr[r�
splitlines�strip�rstrip�	MODULEDOCr]�LEXERDOC)r"r,r#�modules�moduledocstringsr_r`�module�mod�cls�	docstring�moddocr�headings              r'rzPygmentsDoc.document_lexers�s
��?�������%�f�l�l�n�.�I�I�O�I�t��!�W�F��V�T�4�)��=�C��N�N���s�|�|�,��#�y�)�C��;�;��>��J�K����I��)�U�+�%�,�,�V�4�	����v�r�*�1�1���	�	�$�q�'�"�,�f��	�	�$�q�'�"�*�*�3��6�>�>�s�D�I�S�V��	�	�$�q�'�"�,�f��3�
��-�-������f�e�,�#�]�]�6�2�F�+1� ��(�) J�,%�W�]�]�_�.�I�N�F�F���'�/��f� F�G�G�&�v�.�9�9�;�A�>�D�D�F�M�M�c�R�G��J�J�y�F�G�S��W��5E�#F�F�G����
�
�8�d�?�+��J��w�w�s�|�r)c
�(�ddlm}g}t|j�d���D]�\}}|d}t	|dd|g�}|j
j
|j�t||�}|j}t|t�r|jd�}|j}	|jt|	dj!|d�xsddj!|d	�j#d
d�xsd|fz���dj!|�S)
Nr)�
FORMATTERSc��|dSrgr0r6s r'r8z1PygmentsDoc.document_formatters.<locals>.<lambda>�s���!�r)r9rir;rAr@rjr<r=r)�pip._vendor.pygments.formattersr�rXrYrnrr rorprqrsrtru�__name__rI�FMTERDOCrKr[)
r"r�r#r_r`r~rr�r�r�s
          r'rzPygmentsDoc.document_formatters�s���>���%�j�&6�&6�&8�n�M�O�I�t��!�W�F��V�T�4�)��=�C��N�N���s�|�|�,��#�y�)�C����I��)�U�+�%�,�,�V�4�	��l�l�G��J�J�x�7�D�I�I�d�1�g�,>�,H�&�#'�9�9�T�!�W�#5�#=�#=�c�5�#I�#S�V�#,�#.�.�
/� N��w�w�s�|�r)c��ddlm}g}|j�D]�\}}|jj	t
j|jj�|j}t|t�r|jd�}|jt|j||fz���dj!|�S)Nr)�FILTERSrir)�pip._vendor.pygments.filtersr�rYrr �sysr|�
__module__rorqrsrtrurI�	FILTERDOCr�rK)r"r�r#r1r�r�s      r'rzPygmentsDoc.document_filters�s���8��� ����I�D�#��N�N���s�{�{�3�>�>�:�C�C�D����I��)�U�+�%�,�,�V�4�	��J�J�y�C�L�L�$�	�#B�B�C�)��w�w�s�|�r)N)r�r��__qualname__rq�has_content�required_arguments�optional_arguments�final_argument_whitespace�option_specr(rrrrr0r)r'rr:s@����K����� %���K��&:�x#�J�$
r)rc�0�|jdt�y)N�pygmentsdoc)�
add_directiver)�apps r'�setupr��s�����m�[�1r))rqr��docutilsr�docutils.statemachiner�docutils.parsers.rstr�sphinx.util.nodesrrzr{r�r�rr�r0r)r'�<module>r�sK��	���*�*�6�
�	�	����
�	�[�)�[�|2r)python3.12/site-packages/pip/_vendor/pygments/__main__.py000064400000000541151732702740017305 0ustar00"""
    pygments.__main__
    ~~~~~~~~~~~~~~~~~

    Main entry point for ``python -m pygments``.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import sys
from pip._vendor.pygments.cmdline import main

try:
    sys.exit(main(sys.argv))
except KeyboardInterrupt:
    sys.exit(1)
python3.12/site-packages/pip/_vendor/pygments/plugin.py000064400000005037151732702740017070 0ustar00"""
    pygments.plugin
    ~~~~~~~~~~~~~~~

    Pygments plugin interface. By default, this tries to use
    ``importlib.metadata``, which is in the Python standard
    library since Python 3.8, or its ``importlib_metadata``
    backport for earlier versions of Python. It falls back on
    ``pkg_resources`` if not found. Finally, if ``pkg_resources``
    is not found either, no plugins are loaded at all.

    lexer plugins::

        [pygments.lexers]
        yourlexer = yourmodule:YourLexer

    formatter plugins::

        [pygments.formatters]
        yourformatter = yourformatter:YourFormatter
        /.ext = yourformatter:YourFormatter

    As you can see, you can define extensions for the formatter
    with a leading slash.

    syntax plugins::

        [pygments.styles]
        yourstyle = yourstyle:YourStyle

    filter plugin::

        [pygments.filter]
        yourfilter = yourfilter:YourFilter


    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

LEXER_ENTRY_POINT = 'pygments.lexers'
FORMATTER_ENTRY_POINT = 'pygments.formatters'
STYLE_ENTRY_POINT = 'pygments.styles'
FILTER_ENTRY_POINT = 'pygments.filters'


def iter_entry_points(group_name):
    try:
        from importlib.metadata import entry_points
    except ImportError:
        try:
            from importlib_metadata import entry_points
        except ImportError:
            try:
                from pip._vendor.pkg_resources import iter_entry_points
            except (ImportError, OSError):
                return []
            else:
                return iter_entry_points(group_name)
    groups = entry_points()
    if hasattr(groups, 'select'):
        # New interface in Python 3.10 and newer versions of the
        # importlib_metadata backport.
        return groups.select(group=group_name)
    else:
        # Older interface, deprecated in Python 3.10 and recent
        # importlib_metadata, but we need it in Python 3.8 and 3.9.
        return groups.get(group_name, [])


def find_plugin_lexers():
    for entrypoint in iter_entry_points(LEXER_ENTRY_POINT):
        yield entrypoint.load()


def find_plugin_formatters():
    for entrypoint in iter_entry_points(FORMATTER_ENTRY_POINT):
        yield entrypoint.name, entrypoint.load()


def find_plugin_styles():
    for entrypoint in iter_entry_points(STYLE_ENTRY_POINT):
        yield entrypoint.name, entrypoint.load()


def find_plugin_filters():
    for entrypoint in iter_entry_points(FILTER_ENTRY_POINT):
        yield entrypoint.name, entrypoint.load()
python3.12/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-312.pyc000064400000010607151732702740025214 0ustar00�

R`it��"�dZddlmZddlmZidd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%�id&d'�d(d)�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC�dDdE�dFdG��dHdIdIdJdKdLdMdNdOdPdQdRdSdTdU��ZdV�ZdW�ZyX)Yz�
    pygments.styles
    ~~~~~~~~~~~~~~~

    Contains built-in styles.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�find_plugin_styles)�
ClassNotFound�defaultzdefault::DefaultStyle�emacszemacs::EmacsStyle�friendlyzfriendly::FriendlyStyle�friendly_grayscalez*friendly_grayscale::FriendlyGrayscaleStyle�colorfulzcolorful::ColorfulStyle�autumnzautumn::AutumnStyle�murphyzmurphy::MurphyStyle�mannizmanni::ManniStyle�materialzmaterial::MaterialStyle�monokaizmonokai::MonokaiStyle�perldoczperldoc::PerldocStyle�pastiezpastie::PastieStyle�borlandzborland::BorlandStyle�tracztrac::TracStyle�nativeznative::NativeStyle�fruityzfruity::FruityStyle�bwzbw::BlackWhiteStyle�vimz
vim::VimStyle�vszvs::VisualStudioStyle�tangoztango::TangoStyle�rrtz
rrt::RrtStyle�xcodezxcode::XcodeStyle�igorzigor::IgorStylez
paraiso-lightz paraiso_light::ParaisoLightStylezparaiso-darkzparaiso_dark::ParaisoDarkStyle�lovelacezlovelace::LovelaceStyle�algolzalgol::AlgolStyle�algol_nuzalgol_nu::Algol_NuStyle�arduinozarduino::ArduinoStyle�rainbow_dashzrainbow_dash::RainbowDashStyle�abapzabap::AbapStylezsolarized-darkzsolarized::SolarizedDarkStylezsolarized-lightzsolarized::SolarizedLightStyle�sasz
sas::SasStylezstaroffice::StarofficeStylezstata_light::StataLightStylezstata_dark::StataDarkStylezinkpot::InkPotStylezzenburn::ZenburnStylezgruvbox::GruvboxDarkStylezgruvbox::GruvboxLightStylezdracula::DraculaStylezonedark::OneDarkStylezlilypond::LilyPondStyleznord::NordStyleznord::NordDarkerStylezgh_dark::GhDarkStyle)�
staroffice�statazstata-lightz
stata-dark�inkpot�zenburnzgruvbox-darkz
gruvbox-light�draculazone-dark�lilypond�nordznord-darkerzgithub-darkc�r�|tvrt|jd�\}}d}n2t�D]\}}||k(s�|cSd}|}|j�dz}	t	d|zdd|g�}	t||�S#t
$rt
d|z|xrdzd	z��wxYw#t$rt
d
|z��wxYw)z�
    Return a style class by its short name. The names of the builtin styles
    are listed in :data:`pygments.styles.STYLE_MAP`.

    Will raise :exc:`pygments.util.ClassNotFound` if no style of that name is
    found.
    z::�yes��Stylezpygments.styles.NzCould not find style module %rz, though it should be builtin�.z.Could not find style class %r in style module.)	�	STYLE_MAP�splitr�title�
__import__�ImportErrorr�getattr�AttributeError)�name�mod�cls�builtin�
found_name�styles      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/styles/__init__.py�get_style_by_namer=Ds����y���T�?�(�(��.���S���!3�!5��J���z�!���"6������j�j�l�W�$��N��+�c�1�4���u�E��T��s�C� � ��	�N��<�s�B�!�E�&E�G�IL�M�N�	N�N��
�T��L�s�R�S�S�T�s�A9�-B�9"B�B6c#�XK�tEd{���t�D]	\}}|���y7��w)zCReturn a generator for all styles by name, both builtin and plugin.N)r/r)r6�_s  r<�get_all_stylesr@cs*�������%�'���a��
�(��s�
*�(�*N)�__doc__�pip._vendor.pygments.pluginr�pip._vendor.pygments.utilrr/r=r@��r<�<module>rFs���;�3�1
�
�'�1
��#�1
��)�1
��F�	1
�
�)�1
�
�%�
1
�
�%�1
��#�1
��)�1
��'�1
��'�1
�
�%�1
��'�1
��!�1
�
�%�1
� 
�%�!1
�"	�%�#1
�$
��%1
�&	�'�'1
�(�#�)1
�*
��+1
�,�#�-1
�.�!�/1
�0�7�11
�2�4�31
�4�)�51
�6�#�71
�8�)�91
�:�'�;1
�<�4�=1
�>�!�?1
�@�5�A1
�B�7�C1
�D
�?�E1
�F1�1�1�/�(�&�/�1�&�'�*��*�)�a1
�	�hT�>rEpython3.12/site-packages/pip/_vendor/pygments/styles/__init__.py000064400000007164151732702750020660 0ustar00"""
    pygments.styles
    ~~~~~~~~~~~~~~~

    Contains built-in styles.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.plugin import find_plugin_styles
from pip._vendor.pygments.util import ClassNotFound

#: A dictionary of built-in styles, mapping style names to
#: ``'submodule::classname'`` strings.
STYLE_MAP = {
    'default':  'default::DefaultStyle',
    'emacs':    'emacs::EmacsStyle',
    'friendly': 'friendly::FriendlyStyle',
    'friendly_grayscale': 'friendly_grayscale::FriendlyGrayscaleStyle',
    'colorful': 'colorful::ColorfulStyle',
    'autumn':   'autumn::AutumnStyle',
    'murphy':   'murphy::MurphyStyle',
    'manni':    'manni::ManniStyle',
    'material': 'material::MaterialStyle',
    'monokai':  'monokai::MonokaiStyle',
    'perldoc':  'perldoc::PerldocStyle',
    'pastie':   'pastie::PastieStyle',
    'borland':  'borland::BorlandStyle',
    'trac':     'trac::TracStyle',
    'native':   'native::NativeStyle',
    'fruity':   'fruity::FruityStyle',
    'bw':       'bw::BlackWhiteStyle',
    'vim':      'vim::VimStyle',
    'vs':       'vs::VisualStudioStyle',
    'tango':    'tango::TangoStyle',
    'rrt':      'rrt::RrtStyle',
    'xcode':    'xcode::XcodeStyle',
    'igor':     'igor::IgorStyle',
    'paraiso-light': 'paraiso_light::ParaisoLightStyle',
    'paraiso-dark': 'paraiso_dark::ParaisoDarkStyle',
    'lovelace': 'lovelace::LovelaceStyle',
    'algol':    'algol::AlgolStyle',
    'algol_nu': 'algol_nu::Algol_NuStyle',
    'arduino':  'arduino::ArduinoStyle',
    'rainbow_dash': 'rainbow_dash::RainbowDashStyle',
    'abap':     'abap::AbapStyle',
    'solarized-dark': 'solarized::SolarizedDarkStyle',
    'solarized-light': 'solarized::SolarizedLightStyle',
    'sas':         'sas::SasStyle',
    'staroffice' : 'staroffice::StarofficeStyle',
    'stata':       'stata_light::StataLightStyle',
    'stata-light': 'stata_light::StataLightStyle',
    'stata-dark':  'stata_dark::StataDarkStyle',
    'inkpot':      'inkpot::InkPotStyle',
    'zenburn': 'zenburn::ZenburnStyle',
    'gruvbox-dark': 'gruvbox::GruvboxDarkStyle',
    'gruvbox-light': 'gruvbox::GruvboxLightStyle',
    'dracula': 'dracula::DraculaStyle',
    'one-dark': 'onedark::OneDarkStyle',
    'lilypond' : 'lilypond::LilyPondStyle',
    'nord': 'nord::NordStyle',
    'nord-darker': 'nord::NordDarkerStyle',
    'github-dark': 'gh_dark::GhDarkStyle'
}


def get_style_by_name(name):
    """
    Return a style class by its short name. The names of the builtin styles
    are listed in :data:`pygments.styles.STYLE_MAP`.

    Will raise :exc:`pygments.util.ClassNotFound` if no style of that name is
    found.
    """
    if name in STYLE_MAP:
        mod, cls = STYLE_MAP[name].split('::')
        builtin = "yes"
    else:
        for found_name, style in find_plugin_styles():
            if name == found_name:
                return style
        # perhaps it got dropped into our styles package
        builtin = ""
        mod = name
        cls = name.title() + "Style"

    try:
        mod = __import__('pygments.styles.' + mod, None, None, [cls])
    except ImportError:
        raise ClassNotFound("Could not find style module %r" % mod +
                         (builtin and ", though it should be builtin") + ".")
    try:
        return getattr(mod, cls)
    except AttributeError:
        raise ClassNotFound("Could not find style class %r in style module." % cls)


def get_all_styles():
    """Return a generator for all styles by name, both builtin and plugin."""
    yield from STYLE_MAP
    for name, _ in find_plugin_styles():
        yield name
python3.12/site-packages/pip/_vendor/pygments/filter.py000064400000003622151732702750017056 0ustar00"""
    pygments.filter
    ~~~~~~~~~~~~~~~

    Module that implements the default filter.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""


def apply_filters(stream, filters, lexer=None):
    """
    Use this method to apply an iterable of filters to
    a stream. If lexer is given it's forwarded to the
    filter, otherwise the filter receives `None`.
    """
    def _apply(filter_, stream):
        yield from filter_.filter(lexer, stream)
    for filter_ in filters:
        stream = _apply(filter_, stream)
    return stream


def simplefilter(f):
    """
    Decorator that converts a function into a filter::

        @simplefilter
        def lowercase(self, lexer, stream, options):
            for ttype, value in stream:
                yield ttype, value.lower()
    """
    return type(f.__name__, (FunctionFilter,), {
        '__module__': getattr(f, '__module__'),
        '__doc__': f.__doc__,
        'function': f,
    })


class Filter:
    """
    Default filter. Subclass this class or use the `simplefilter`
    decorator to create own filters.
    """

    def __init__(self, **options):
        self.options = options

    def filter(self, lexer, stream):
        raise NotImplementedError()


class FunctionFilter(Filter):
    """
    Abstract class used by `simplefilter` to create simple
    function filters on the fly. The `simplefilter` decorator
    automatically creates subclasses of this class for
    functions passed to it.
    """
    function = None

    def __init__(self, **options):
        if not hasattr(self, 'function'):
            raise TypeError('%r used without bound function' %
                            self.__class__.__name__)
        Filter.__init__(self, **options)

    def filter(self, lexer, stream):
        # pylint: disable=not-callable
        yield from self.function(lexer, stream, self.options)
python3.12/site-packages/pip/_vendor/pygments/sphinxext.py000064400000015342151732702760017626 0ustar00"""
    pygments.sphinxext
    ~~~~~~~~~~~~~~~~~~

    Sphinx extension to generate automatic documentation of lexers,
    formatters and filters.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import sys

from docutils import nodes
from docutils.statemachine import ViewList
from docutils.parsers.rst import Directive
from sphinx.util.nodes import nested_parse_with_titles


MODULEDOC = '''
.. module:: %s

%s
%s
'''

LEXERDOC = '''
.. class:: %s

    :Short names: %s
    :Filenames:   %s
    :MIME types:  %s

    %s

'''

FMTERDOC = '''
.. class:: %s

    :Short names: %s
    :Filenames: %s

    %s

'''

FILTERDOC = '''
.. class:: %s

    :Name: %s

    %s

'''


class PygmentsDoc(Directive):
    """
    A directive to collect all lexers/formatters/filters and generate
    autoclass directives for them.
    """
    has_content = False
    required_arguments = 1
    optional_arguments = 0
    final_argument_whitespace = False
    option_spec = {}

    def run(self):
        self.filenames = set()
        if self.arguments[0] == 'lexers':
            out = self.document_lexers()
        elif self.arguments[0] == 'formatters':
            out = self.document_formatters()
        elif self.arguments[0] == 'filters':
            out = self.document_filters()
        elif self.arguments[0] == 'lexers_overview':
            out = self.document_lexers_overview()
        else:
            raise Exception('invalid argument for "pygmentsdoc" directive')
        node = nodes.compound()
        vl = ViewList(out.split('\n'), source='')
        nested_parse_with_titles(self.state, vl, node)
        for fn in self.filenames:
            self.state.document.settings.record_dependencies.add(fn)
        return node.children

    def document_lexers_overview(self):
        """Generate a tabular overview of all lexers.

        The columns are the lexer name, the extensions handled by this lexer
        (or "None"), the aliases and a link to the lexer class."""
        from pip._vendor.pygments.lexers._mapping import LEXERS
        from pip._vendor.pygments.lexers import find_lexer_class
        out = []

        table = []

        def format_link(name, url):
            if url:
                return f'`{name} <{url}>`_'
            return name

        for classname, data in sorted(LEXERS.items(), key=lambda x: x[1][1].lower()):
            lexer_cls = find_lexer_class(data[1])
            extensions = lexer_cls.filenames + lexer_cls.alias_filenames

            table.append({
                'name': format_link(data[1], lexer_cls.url),
                'extensions': ', '.join(extensions).replace('*', '\\*').replace('_', '\\') or 'None',
                'aliases': ', '.join(data[2]),
                'class': f'{data[0]}.{classname}'
            })

        column_names = ['name', 'extensions', 'aliases', 'class']
        column_lengths = [max([len(row[column]) for row in table if row[column]])
                          for column in column_names]

        def write_row(*columns):
            """Format a table row"""
            out = []
            for l, c in zip(column_lengths, columns):
                if c:
                    out.append(c.ljust(l))
                else:
                    out.append(' '*l)

            return ' '.join(out)

        def write_seperator():
            """Write a table separator row"""
            sep = ['='*c for c in column_lengths]
            return write_row(*sep)

        out.append(write_seperator())
        out.append(write_row('Name', 'Extension(s)', 'Short name(s)', 'Lexer class'))
        out.append(write_seperator())
        for row in table:
            out.append(write_row(
                row['name'],
                row['extensions'],
                row['aliases'],
                f':class:`~{row["class"]}`'))
        out.append(write_seperator())

        return '\n'.join(out)

    def document_lexers(self):
        from pip._vendor.pygments.lexers._mapping import LEXERS
        out = []
        modules = {}
        moduledocstrings = {}
        for classname, data in sorted(LEXERS.items(), key=lambda x: x[0]):
            module = data[0]
            mod = __import__(module, None, None, [classname])
            self.filenames.add(mod.__file__)
            cls = getattr(mod, classname)
            if not cls.__doc__:
                print("Warning: %s does not have a docstring." % classname)
            docstring = cls.__doc__
            if isinstance(docstring, bytes):
                docstring = docstring.decode('utf8')
            modules.setdefault(module, []).append((
                classname,
                ', '.join(data[2]) or 'None',
                ', '.join(data[3]).replace('*', '\\*').replace('_', '\\') or 'None',
                ', '.join(data[4]) or 'None',
                docstring))
            if module not in moduledocstrings:
                moddoc = mod.__doc__
                if isinstance(moddoc, bytes):
                    moddoc = moddoc.decode('utf8')
                moduledocstrings[module] = moddoc

        for module, lexers in sorted(modules.items(), key=lambda x: x[0]):
            if moduledocstrings[module] is None:
                raise Exception("Missing docstring for %s" % (module,))
            heading = moduledocstrings[module].splitlines()[4].strip().rstrip('.')
            out.append(MODULEDOC % (module, heading, '-'*len(heading)))
            for data in lexers:
                out.append(LEXERDOC % data)

        return ''.join(out)

    def document_formatters(self):
        from pip._vendor.pygments.formatters import FORMATTERS

        out = []
        for classname, data in sorted(FORMATTERS.items(), key=lambda x: x[0]):
            module = data[0]
            mod = __import__(module, None, None, [classname])
            self.filenames.add(mod.__file__)
            cls = getattr(mod, classname)
            docstring = cls.__doc__
            if isinstance(docstring, bytes):
                docstring = docstring.decode('utf8')
            heading = cls.__name__
            out.append(FMTERDOC % (heading, ', '.join(data[2]) or 'None',
                                   ', '.join(data[3]).replace('*', '\\*') or 'None',
                                   docstring))
        return ''.join(out)

    def document_filters(self):
        from pip._vendor.pygments.filters import FILTERS

        out = []
        for name, cls in FILTERS.items():
            self.filenames.add(sys.modules[cls.__module__].__file__)
            docstring = cls.__doc__
            if isinstance(docstring, bytes):
                docstring = docstring.decode('utf8')
            out.append(FILTERDOC % (cls.__name__, name, docstring))
        return ''.join(out)


def setup(app):
    app.add_directive('pygmentsdoc', PygmentsDoc)
python3.12/site-packages/pip/_vendor/pygments/formatter.py000064400000010122151732702760017566 0ustar00"""
    pygments.formatter
    ~~~~~~~~~~~~~~~~~~

    Base formatter class.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import codecs

from pip._vendor.pygments.util import get_bool_opt
from pip._vendor.pygments.styles import get_style_by_name

__all__ = ['Formatter']


def _lookup_style(style):
    if isinstance(style, str):
        return get_style_by_name(style)
    return style


class Formatter:
    """
    Converts a token stream to text.

    Formatters should have attributes to help selecting them. These
    are similar to the corresponding :class:`~pygments.lexer.Lexer`
    attributes.

    .. autoattribute:: name
       :no-value:

    .. autoattribute:: aliases
       :no-value:

    .. autoattribute:: filenames
       :no-value:

    You can pass options as keyword arguments to the constructor.
    All formatters accept these basic options:

    ``style``
        The style to use, can be a string or a Style subclass
        (default: "default"). Not used by e.g. the
        TerminalFormatter.
    ``full``
        Tells the formatter to output a "full" document, i.e.
        a complete self-contained document. This doesn't have
        any effect for some formatters (default: false).
    ``title``
        If ``full`` is true, the title that should be used to
        caption the document (default: '').
    ``encoding``
        If given, must be an encoding name. This will be used to
        convert the Unicode token strings to byte strings in the
        output. If it is "" or None, Unicode strings will be written
        to the output file, which most file-like objects do not
        support (default: None).
    ``outencoding``
        Overrides ``encoding`` if given.

    """

    #: Full name for the formatter, in human-readable form.
    name = None

    #: A list of short, unique identifiers that can be used to lookup
    #: the formatter from a list, e.g. using :func:`.get_formatter_by_name()`.
    aliases = []

    #: A list of fnmatch patterns that match filenames for which this
    #: formatter can produce output. The patterns in this list should be unique
    #: among all formatters.
    filenames = []

    #: If True, this formatter outputs Unicode strings when no encoding
    #: option is given.
    unicodeoutput = True

    def __init__(self, **options):
        """
        As with lexers, this constructor takes arbitrary optional arguments,
        and if you override it, you should first process your own options, then
        call the base class implementation.
        """
        self.style = _lookup_style(options.get('style', 'default'))
        self.full = get_bool_opt(options, 'full', False)
        self.title = options.get('title', '')
        self.encoding = options.get('encoding', None) or None
        if self.encoding in ('guess', 'chardet'):
            # can happen for e.g. pygmentize -O encoding=guess
            self.encoding = 'utf-8'
        self.encoding = options.get('outencoding') or self.encoding
        self.options = options

    def get_style_defs(self, arg=''):
        """
        This method must return statements or declarations suitable to define
        the current style for subsequent highlighted text (e.g. CSS classes
        in the `HTMLFormatter`).

        The optional argument `arg` can be used to modify the generation and
        is formatter dependent (it is standardized because it can be given on
        the command line).

        This method is called by the ``-S`` :doc:`command-line option <cmdline>`,
        the `arg` is then given by the ``-a`` option.
        """
        return ''

    def format(self, tokensource, outfile):
        """
        This method must format the tokens from the `tokensource` iterable and
        write the formatted version to the file object `outfile`.

        Formatter options can control how exactly the tokens are converted.
        """
        if self.encoding:
            # wrap the outfile in a StreamWriter
            outfile = codecs.lookup(self.encoding)[3](outfile)
        return self.format_unencoded(tokensource, outfile)
python3.12/site-packages/pip/_vendor/pygments/cmdline.py000064400000056205151732702770017213 0ustar00"""
    pygments.cmdline
    ~~~~~~~~~~~~~~~~

    Command line interface.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import os
import sys
import shutil
import argparse
from textwrap import dedent

from pip._vendor.pygments import __version__, highlight
from pip._vendor.pygments.util import ClassNotFound, OptionError, docstring_headline, \
    guess_decode, guess_decode_from_terminal, terminal_encoding, \
    UnclosingTextIOWrapper
from pip._vendor.pygments.lexers import get_all_lexers, get_lexer_by_name, guess_lexer, \
    load_lexer_from_file, get_lexer_for_filename, find_lexer_class_for_filename
from pip._vendor.pygments.lexers.special import TextLexer
from pip._vendor.pygments.formatters.latex import LatexEmbeddedLexer, LatexFormatter
from pip._vendor.pygments.formatters import get_all_formatters, get_formatter_by_name, \
    load_formatter_from_file, get_formatter_for_filename, find_formatter_class
from pip._vendor.pygments.formatters.terminal import TerminalFormatter
from pip._vendor.pygments.formatters.terminal256 import Terminal256Formatter, TerminalTrueColorFormatter
from pip._vendor.pygments.filters import get_all_filters, find_filter_class
from pip._vendor.pygments.styles import get_all_styles, get_style_by_name


def _parse_options(o_strs):
    opts = {}
    if not o_strs:
        return opts
    for o_str in o_strs:
        if not o_str.strip():
            continue
        o_args = o_str.split(',')
        for o_arg in o_args:
            o_arg = o_arg.strip()
            try:
                o_key, o_val = o_arg.split('=', 1)
                o_key = o_key.strip()
                o_val = o_val.strip()
            except ValueError:
                opts[o_arg] = True
            else:
                opts[o_key] = o_val
    return opts


def _parse_filters(f_strs):
    filters = []
    if not f_strs:
        return filters
    for f_str in f_strs:
        if ':' in f_str:
            fname, fopts = f_str.split(':', 1)
            filters.append((fname, _parse_options([fopts])))
        else:
            filters.append((f_str, {}))
    return filters


def _print_help(what, name):
    try:
        if what == 'lexer':
            cls = get_lexer_by_name(name)
            print("Help on the %s lexer:" % cls.name)
            print(dedent(cls.__doc__))
        elif what == 'formatter':
            cls = find_formatter_class(name)
            print("Help on the %s formatter:" % cls.name)
            print(dedent(cls.__doc__))
        elif what == 'filter':
            cls = find_filter_class(name)
            print("Help on the %s filter:" % name)
            print(dedent(cls.__doc__))
        return 0
    except (AttributeError, ValueError):
        print("%s not found!" % what, file=sys.stderr)
        return 1


def _print_list(what):
    if what == 'lexer':
        print()
        print("Lexers:")
        print("~~~~~~~")

        info = []
        for fullname, names, exts, _ in get_all_lexers():
            tup = (', '.join(names)+':', fullname,
                   exts and '(filenames ' + ', '.join(exts) + ')' or '')
            info.append(tup)
        info.sort()
        for i in info:
            print(('* %s\n    %s %s') % i)

    elif what == 'formatter':
        print()
        print("Formatters:")
        print("~~~~~~~~~~~")

        info = []
        for cls in get_all_formatters():
            doc = docstring_headline(cls)
            tup = (', '.join(cls.aliases) + ':', doc, cls.filenames and
                   '(filenames ' + ', '.join(cls.filenames) + ')' or '')
            info.append(tup)
        info.sort()
        for i in info:
            print(('* %s\n    %s %s') % i)

    elif what == 'filter':
        print()
        print("Filters:")
        print("~~~~~~~~")

        for name in get_all_filters():
            cls = find_filter_class(name)
            print("* " + name + ':')
            print("    %s" % docstring_headline(cls))

    elif what == 'style':
        print()
        print("Styles:")
        print("~~~~~~~")

        for name in get_all_styles():
            cls = get_style_by_name(name)
            print("* " + name + ':')
            print("    %s" % docstring_headline(cls))


def _print_list_as_json(requested_items):
    import json
    result = {}
    if 'lexer' in requested_items:
        info = {}
        for fullname, names, filenames, mimetypes in get_all_lexers():
            info[fullname] = {
                'aliases': names,
                'filenames': filenames,
                'mimetypes': mimetypes
            }
        result['lexers'] = info

    if 'formatter' in requested_items:
        info = {}
        for cls in get_all_formatters():
            doc = docstring_headline(cls)
            info[cls.name] = {
                'aliases': cls.aliases,
                'filenames': cls.filenames,
                'doc': doc
            }
        result['formatters'] = info

    if 'filter' in requested_items:
        info = {}
        for name in get_all_filters():
            cls = find_filter_class(name)
            info[name] = {
                'doc': docstring_headline(cls)
            }
        result['filters'] = info

    if 'style' in requested_items:
        info = {}
        for name in get_all_styles():
            cls = get_style_by_name(name)
            info[name] = {
                'doc': docstring_headline(cls)
            }
        result['styles'] = info

    json.dump(result, sys.stdout)

def main_inner(parser, argns):
    if argns.help:
        parser.print_help()
        return 0

    if argns.V:
        print('Pygments version %s, (c) 2006-2023 by Georg Brandl, Matthäus '
              'Chajdas and contributors.' % __version__)
        return 0

    def is_only_option(opt):
        return not any(v for (k, v) in vars(argns).items() if k != opt)

    # handle ``pygmentize -L``
    if argns.L is not None:
        arg_set = set()
        for k, v in vars(argns).items():
            if v:
                arg_set.add(k)

        arg_set.discard('L')
        arg_set.discard('json')

        if arg_set:
            parser.print_help(sys.stderr)
            return 2

        # print version
        if not argns.json:
            main(['', '-V'])
        allowed_types = {'lexer', 'formatter', 'filter', 'style'}
        largs = [arg.rstrip('s') for arg in argns.L]
        if any(arg not in allowed_types for arg in largs):
            parser.print_help(sys.stderr)
            return 0
        if not largs:
            largs = allowed_types
        if not argns.json:
            for arg in largs:
                _print_list(arg)
        else:
            _print_list_as_json(largs)
        return 0

    # handle ``pygmentize -H``
    if argns.H:
        if not is_only_option('H'):
            parser.print_help(sys.stderr)
            return 2
        what, name = argns.H
        if what not in ('lexer', 'formatter', 'filter'):
            parser.print_help(sys.stderr)
            return 2
        return _print_help(what, name)

    # parse -O options
    parsed_opts = _parse_options(argns.O or [])

    # parse -P options
    for p_opt in argns.P or []:
        try:
            name, value = p_opt.split('=', 1)
        except ValueError:
            parsed_opts[p_opt] = True
        else:
            parsed_opts[name] = value

    # encodings
    inencoding = parsed_opts.get('inencoding', parsed_opts.get('encoding'))
    outencoding = parsed_opts.get('outencoding', parsed_opts.get('encoding'))

    # handle ``pygmentize -N``
    if argns.N:
        lexer = find_lexer_class_for_filename(argns.N)
        if lexer is None:
            lexer = TextLexer

        print(lexer.aliases[0])
        return 0

    # handle ``pygmentize -C``
    if argns.C:
        inp = sys.stdin.buffer.read()
        try:
            lexer = guess_lexer(inp, inencoding=inencoding)
        except ClassNotFound:
            lexer = TextLexer

        print(lexer.aliases[0])
        return 0

    # handle ``pygmentize -S``
    S_opt = argns.S
    a_opt = argns.a
    if S_opt is not None:
        f_opt = argns.f
        if not f_opt:
            parser.print_help(sys.stderr)
            return 2
        if argns.l or argns.INPUTFILE:
            parser.print_help(sys.stderr)
            return 2

        try:
            parsed_opts['style'] = S_opt
            fmter = get_formatter_by_name(f_opt, **parsed_opts)
        except ClassNotFound as err:
            print(err, file=sys.stderr)
            return 1

        print(fmter.get_style_defs(a_opt or ''))
        return 0

    # if no -S is given, -a is not allowed
    if argns.a is not None:
        parser.print_help(sys.stderr)
        return 2

    # parse -F options
    F_opts = _parse_filters(argns.F or [])

    # -x: allow custom (eXternal) lexers and formatters
    allow_custom_lexer_formatter = bool(argns.x)

    # select lexer
    lexer = None

    # given by name?
    lexername = argns.l
    if lexername:
        # custom lexer, located relative to user's cwd
        if allow_custom_lexer_formatter and '.py' in lexername:
            try:
                filename = None
                name = None
                if ':' in lexername:
                    filename, name = lexername.rsplit(':', 1)

                    if '.py' in name:
                        # This can happen on Windows: If the lexername is
                        # C:\lexer.py -- return to normal load path in that case
                        name = None

                if filename and name:
                    lexer = load_lexer_from_file(filename, name,
                                                 **parsed_opts)
                else:
                    lexer = load_lexer_from_file(lexername, **parsed_opts)
            except ClassNotFound as err:
                print('Error:', err, file=sys.stderr)
                return 1
        else:
            try:
                lexer = get_lexer_by_name(lexername, **parsed_opts)
            except (OptionError, ClassNotFound) as err:
                print('Error:', err, file=sys.stderr)
                return 1

    # read input code
    code = None

    if argns.INPUTFILE:
        if argns.s:
            print('Error: -s option not usable when input file specified',
                  file=sys.stderr)
            return 2

        infn = argns.INPUTFILE
        try:
            with open(infn, 'rb') as infp:
                code = infp.read()
        except Exception as err:
            print('Error: cannot read infile:', err, file=sys.stderr)
            return 1
        if not inencoding:
            code, inencoding = guess_decode(code)

        # do we have to guess the lexer?
        if not lexer:
            try:
                lexer = get_lexer_for_filename(infn, code, **parsed_opts)
            except ClassNotFound as err:
                if argns.g:
                    try:
                        lexer = guess_lexer(code, **parsed_opts)
                    except ClassNotFound:
                        lexer = TextLexer(**parsed_opts)
                else:
                    print('Error:', err, file=sys.stderr)
                    return 1
            except OptionError as err:
                print('Error:', err, file=sys.stderr)
                return 1

    elif not argns.s:  # treat stdin as full file (-s support is later)
        # read code from terminal, always in binary mode since we want to
        # decode ourselves and be tolerant with it
        code = sys.stdin.buffer.read()  # use .buffer to get a binary stream
        if not inencoding:
            code, inencoding = guess_decode_from_terminal(code, sys.stdin)
            # else the lexer will do the decoding
        if not lexer:
            try:
                lexer = guess_lexer(code, **parsed_opts)
            except ClassNotFound:
                lexer = TextLexer(**parsed_opts)

    else:  # -s option needs a lexer with -l
        if not lexer:
            print('Error: when using -s a lexer has to be selected with -l',
                  file=sys.stderr)
            return 2

    # process filters
    for fname, fopts in F_opts:
        try:
            lexer.add_filter(fname, **fopts)
        except ClassNotFound as err:
            print('Error:', err, file=sys.stderr)
            return 1

    # select formatter
    outfn = argns.o
    fmter = argns.f
    if fmter:
        # custom formatter, located relative to user's cwd
        if allow_custom_lexer_formatter and '.py' in fmter:
            try:
                filename = None
                name = None
                if ':' in fmter:
                    # Same logic as above for custom lexer
                    filename, name = fmter.rsplit(':', 1)

                    if '.py' in name:
                        name = None

                if filename and name:
                    fmter = load_formatter_from_file(filename, name,
                                                     **parsed_opts)
                else:
                    fmter = load_formatter_from_file(fmter, **parsed_opts)
            except ClassNotFound as err:
                print('Error:', err, file=sys.stderr)
                return 1
        else:
            try:
                fmter = get_formatter_by_name(fmter, **parsed_opts)
            except (OptionError, ClassNotFound) as err:
                print('Error:', err, file=sys.stderr)
                return 1

    if outfn:
        if not fmter:
            try:
                fmter = get_formatter_for_filename(outfn, **parsed_opts)
            except (OptionError, ClassNotFound) as err:
                print('Error:', err, file=sys.stderr)
                return 1
        try:
            outfile = open(outfn, 'wb')
        except Exception as err:
            print('Error: cannot open outfile:', err, file=sys.stderr)
            return 1
    else:
        if not fmter:
            if os.environ.get('COLORTERM','') in ('truecolor', '24bit'):
                fmter = TerminalTrueColorFormatter(**parsed_opts)
            elif '256' in os.environ.get('TERM', ''):
                fmter = Terminal256Formatter(**parsed_opts)
            else:
                fmter = TerminalFormatter(**parsed_opts)
        outfile = sys.stdout.buffer

    # determine output encoding if not explicitly selected
    if not outencoding:
        if outfn:
            # output file? use lexer encoding for now (can still be None)
            fmter.encoding = inencoding
        else:
            # else use terminal encoding
            fmter.encoding = terminal_encoding(sys.stdout)

    # provide coloring under Windows, if possible
    if not outfn and sys.platform in ('win32', 'cygwin') and \
       fmter.name in ('Terminal', 'Terminal256'):  # pragma: no cover
        # unfortunately colorama doesn't support binary streams on Py3
        outfile = UnclosingTextIOWrapper(outfile, encoding=fmter.encoding)
        fmter.encoding = None
        try:
            import pip._vendor.colorama.initialise as colorama_initialise
        except ImportError:
            pass
        else:
            outfile = colorama_initialise.wrap_stream(
                outfile, convert=None, strip=None, autoreset=False, wrap=True)

    # When using the LaTeX formatter and the option `escapeinside` is
    # specified, we need a special lexer which collects escaped text
    # before running the chosen language lexer.
    escapeinside = parsed_opts.get('escapeinside', '')
    if len(escapeinside) == 2 and isinstance(fmter, LatexFormatter):
        left = escapeinside[0]
        right = escapeinside[1]
        lexer = LatexEmbeddedLexer(left, right, lexer)

    # ... and do it!
    if not argns.s:
        # process whole input as per normal...
        try:
            highlight(code, lexer, fmter, outfile)
        finally:
            if outfn:
                outfile.close()
        return 0
    else:
        # line by line processing of stdin (eg: for 'tail -f')...
        try:
            while 1:
                line = sys.stdin.buffer.readline()
                if not line:
                    break
                if not inencoding:
                    line = guess_decode_from_terminal(line, sys.stdin)[0]
                highlight(line, lexer, fmter, outfile)
                if hasattr(outfile, 'flush'):
                    outfile.flush()
            return 0
        except KeyboardInterrupt:  # pragma: no cover
            return 0
        finally:
            if outfn:
                outfile.close()


class HelpFormatter(argparse.HelpFormatter):
    def __init__(self, prog, indent_increment=2, max_help_position=16, width=None):
        if width is None:
            try:
                width = shutil.get_terminal_size().columns - 2
            except Exception:
                pass
        argparse.HelpFormatter.__init__(self, prog, indent_increment,
                                        max_help_position, width)


def main(args=sys.argv):
    """
    Main command line entry point.
    """
    desc = "Highlight an input file and write the result to an output file."
    parser = argparse.ArgumentParser(description=desc, add_help=False,
                                     formatter_class=HelpFormatter)

    operation = parser.add_argument_group('Main operation')
    lexersel = operation.add_mutually_exclusive_group()
    lexersel.add_argument(
        '-l', metavar='LEXER',
        help='Specify the lexer to use.  (Query names with -L.)  If not '
        'given and -g is not present, the lexer is guessed from the filename.')
    lexersel.add_argument(
        '-g', action='store_true',
        help='Guess the lexer from the file contents, or pass through '
        'as plain text if nothing can be guessed.')
    operation.add_argument(
        '-F', metavar='FILTER[:options]', action='append',
        help='Add a filter to the token stream.  (Query names with -L.) '
        'Filter options are given after a colon if necessary.')
    operation.add_argument(
        '-f', metavar='FORMATTER',
        help='Specify the formatter to use.  (Query names with -L.) '
        'If not given, the formatter is guessed from the output filename, '
        'and defaults to the terminal formatter if the output is to the '
        'terminal or an unknown file extension.')
    operation.add_argument(
        '-O', metavar='OPTION=value[,OPTION=value,...]', action='append',
        help='Give options to the lexer and formatter as a comma-separated '
        'list of key-value pairs. '
        'Example: `-O bg=light,python=cool`.')
    operation.add_argument(
        '-P', metavar='OPTION=value', action='append',
        help='Give a single option to the lexer and formatter - with this '
        'you can pass options whose value contains commas and equal signs. '
        'Example: `-P "heading=Pygments, the Python highlighter"`.')
    operation.add_argument(
        '-o', metavar='OUTPUTFILE',
        help='Where to write the output.  Defaults to standard output.')

    operation.add_argument(
        'INPUTFILE', nargs='?',
        help='Where to read the input.  Defaults to standard input.')

    flags = parser.add_argument_group('Operation flags')
    flags.add_argument(
        '-v', action='store_true',
        help='Print a detailed traceback on unhandled exceptions, which '
        'is useful for debugging and bug reports.')
    flags.add_argument(
        '-s', action='store_true',
        help='Process lines one at a time until EOF, rather than waiting to '
        'process the entire file.  This only works for stdin, only for lexers '
        'with no line-spanning constructs, and is intended for streaming '
        'input such as you get from `tail -f`. '
        'Example usage: `tail -f sql.log | pygmentize -s -l sql`.')
    flags.add_argument(
        '-x', action='store_true',
        help='Allow custom lexers and formatters to be loaded from a .py file '
        'relative to the current working directory. For example, '
        '`-l ./customlexer.py -x`. By default, this option expects a file '
        'with a class named CustomLexer or CustomFormatter; you can also '
        'specify your own class name with a colon (`-l ./lexer.py:MyLexer`). '
        'Users should be very careful not to use this option with untrusted '
        'files, because it will import and run them.')
    flags.add_argument('--json', help='Output as JSON. This can '
        'be only used in conjunction with -L.',
        default=False,
        action='store_true')

    special_modes_group = parser.add_argument_group(
        'Special modes - do not do any highlighting')
    special_modes = special_modes_group.add_mutually_exclusive_group()
    special_modes.add_argument(
        '-S', metavar='STYLE -f formatter',
        help='Print style definitions for STYLE for a formatter '
        'given with -f. The argument given by -a is formatter '
        'dependent.')
    special_modes.add_argument(
        '-L', nargs='*', metavar='WHAT',
        help='List lexers, formatters, styles or filters -- '
        'give additional arguments for the thing(s) you want to list '
        '(e.g. "styles"), or omit them to list everything.')
    special_modes.add_argument(
        '-N', metavar='FILENAME',
        help='Guess and print out a lexer name based solely on the given '
        'filename. Does not take input or highlight anything. If no specific '
        'lexer can be determined, "text" is printed.')
    special_modes.add_argument(
        '-C', action='store_true',
        help='Like -N, but print out a lexer name based solely on '
        'a given content from standard input.')
    special_modes.add_argument(
        '-H', action='store', nargs=2, metavar=('NAME', 'TYPE'),
        help='Print detailed help for the object <name> of type <type>, '
        'where <type> is one of "lexer", "formatter" or "filter".')
    special_modes.add_argument(
        '-V', action='store_true',
        help='Print the package version.')
    special_modes.add_argument(
        '-h', '--help', action='store_true',
        help='Print this help.')
    special_modes_group.add_argument(
        '-a', metavar='ARG',
        help='Formatter-specific additional argument for the -S (print '
        'style sheet) mode.')

    argns = parser.parse_args(args[1:])

    try:
        return main_inner(parser, argns)
    except BrokenPipeError:
        # someone closed our stdout, e.g. by quitting a pager.
        return 0
    except Exception:
        if argns.v:
            print(file=sys.stderr)
            print('*' * 65, file=sys.stderr)
            print('An unhandled exception occurred while highlighting.',
                  file=sys.stderr)
            print('Please report the whole traceback to the issue tracker at',
                  file=sys.stderr)
            print('<https://github.com/pygments/pygments/issues>.',
                  file=sys.stderr)
            print('*' * 65, file=sys.stderr)
            print(file=sys.stderr)
            raise
        import traceback
        info = traceback.format_exception(*sys.exc_info())
        msg = info[-1].strip()
        if len(info) >= 3:
            # extract relevant file and position info
            msg += '\n   (f%s)' % info[-2].split('\n')[0].strip()[1:]
        print(file=sys.stderr)
        print('*** Error while highlighting:', file=sys.stderr)
        print(msg, file=sys.stderr)
        print('*** If this is a bug you want to report, please rerun with -v.',
              file=sys.stderr)
        return 1
python3.12/site-packages/pip/_vendor/pygments/style.py000064400000014161151732702770016733 0ustar00"""
    pygments.style
    ~~~~~~~~~~~~~~

    Basic style object.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.token import Token, STANDARD_TYPES

# Default mapping of ansixxx to RGB colors.
_ansimap = {
    # dark
    'ansiblack': '000000',
    'ansired': '7f0000',
    'ansigreen': '007f00',
    'ansiyellow': '7f7fe0',
    'ansiblue': '00007f',
    'ansimagenta': '7f007f',
    'ansicyan': '007f7f',
    'ansigray': 'e5e5e5',
    # normal
    'ansibrightblack': '555555',
    'ansibrightred': 'ff0000',
    'ansibrightgreen': '00ff00',
    'ansibrightyellow': 'ffff00',
    'ansibrightblue': '0000ff',
    'ansibrightmagenta': 'ff00ff',
    'ansibrightcyan': '00ffff',
    'ansiwhite': 'ffffff',
}
# mapping of deprecated #ansixxx colors to new color names
_deprecated_ansicolors = {
    # dark
    '#ansiblack': 'ansiblack',
    '#ansidarkred': 'ansired',
    '#ansidarkgreen': 'ansigreen',
    '#ansibrown': 'ansiyellow',
    '#ansidarkblue': 'ansiblue',
    '#ansipurple': 'ansimagenta',
    '#ansiteal': 'ansicyan',
    '#ansilightgray': 'ansigray',
    # normal
    '#ansidarkgray': 'ansibrightblack',
    '#ansired': 'ansibrightred',
    '#ansigreen': 'ansibrightgreen',
    '#ansiyellow': 'ansibrightyellow',
    '#ansiblue': 'ansibrightblue',
    '#ansifuchsia': 'ansibrightmagenta',
    '#ansiturquoise': 'ansibrightcyan',
    '#ansiwhite': 'ansiwhite',
}
ansicolors = set(_ansimap)


class StyleMeta(type):

    def __new__(mcs, name, bases, dct):
        obj = type.__new__(mcs, name, bases, dct)
        for token in STANDARD_TYPES:
            if token not in obj.styles:
                obj.styles[token] = ''

        def colorformat(text):
            if text in ansicolors:
                return text
            if text[0:1] == '#':
                col = text[1:]
                if len(col) == 6:
                    return col
                elif len(col) == 3:
                    return col[0] * 2 + col[1] * 2 + col[2] * 2
            elif text == '':
                return ''
            elif text.startswith('var') or text.startswith('calc'):
                return text
            assert False, "wrong color format %r" % text

        _styles = obj._styles = {}

        for ttype in obj.styles:
            for token in ttype.split():
                if token in _styles:
                    continue
                ndef = _styles.get(token.parent, None)
                styledefs = obj.styles.get(token, '').split()
                if not ndef or token is None:
                    ndef = ['', 0, 0, 0, '', '', 0, 0, 0]
                elif 'noinherit' in styledefs and token is not Token:
                    ndef = _styles[Token][:]
                else:
                    ndef = ndef[:]
                _styles[token] = ndef
                for styledef in obj.styles.get(token, '').split():
                    if styledef == 'noinherit':
                        pass
                    elif styledef == 'bold':
                        ndef[1] = 1
                    elif styledef == 'nobold':
                        ndef[1] = 0
                    elif styledef == 'italic':
                        ndef[2] = 1
                    elif styledef == 'noitalic':
                        ndef[2] = 0
                    elif styledef == 'underline':
                        ndef[3] = 1
                    elif styledef == 'nounderline':
                        ndef[3] = 0
                    elif styledef[:3] == 'bg:':
                        ndef[4] = colorformat(styledef[3:])
                    elif styledef[:7] == 'border:':
                        ndef[5] = colorformat(styledef[7:])
                    elif styledef == 'roman':
                        ndef[6] = 1
                    elif styledef == 'sans':
                        ndef[7] = 1
                    elif styledef == 'mono':
                        ndef[8] = 1
                    else:
                        ndef[0] = colorformat(styledef)

        return obj

    def style_for_token(cls, token):
        t = cls._styles[token]
        ansicolor = bgansicolor = None
        color = t[0]
        if color in _deprecated_ansicolors:
            color = _deprecated_ansicolors[color]
        if color in ansicolors:
            ansicolor = color
            color = _ansimap[color]
        bgcolor = t[4]
        if bgcolor in _deprecated_ansicolors:
            bgcolor = _deprecated_ansicolors[bgcolor]
        if bgcolor in ansicolors:
            bgansicolor = bgcolor
            bgcolor = _ansimap[bgcolor]

        return {
            'color':        color or None,
            'bold':         bool(t[1]),
            'italic':       bool(t[2]),
            'underline':    bool(t[3]),
            'bgcolor':      bgcolor or None,
            'border':       t[5] or None,
            'roman':        bool(t[6]) or None,
            'sans':         bool(t[7]) or None,
            'mono':         bool(t[8]) or None,
            'ansicolor':    ansicolor,
            'bgansicolor':  bgansicolor,
        }

    def list_styles(cls):
        return list(cls)

    def styles_token(cls, ttype):
        return ttype in cls._styles

    def __iter__(cls):
        for token in cls._styles:
            yield token, cls.style_for_token(token)

    def __len__(cls):
        return len(cls._styles)


class Style(metaclass=StyleMeta):

    #: overall background color (``None`` means transparent)
    background_color = '#ffffff'

    #: highlight background color
    highlight_color = '#ffffcc'

    #: line number font color
    line_number_color = 'inherit'

    #: line number background color
    line_number_background_color = 'transparent'

    #: special line number font color
    line_number_special_color = '#000000'

    #: special line number background color
    line_number_special_background_color = '#ffffc0'

    #: Style definitions for individual token types.
    styles = {}

    # Attribute for lexers defined within Pygments. If set
    # to True, the style is not shown in the style gallery
    # on the website. This is intended for language-specific
    # styles.
    web_style_gallery_exclude = False
python3.12/site-packages/pip/_vendor/pygments/regexopt.py000064400000006000151732703000017404 0ustar00"""
    pygments.regexopt
    ~~~~~~~~~~~~~~~~~

    An algorithm that generates optimized regexes for matching long lists of
    literal strings.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re
from re import escape
from os.path import commonprefix
from itertools import groupby
from operator import itemgetter

CS_ESCAPE = re.compile(r'[\[\^\\\-\]]')
FIRST_ELEMENT = itemgetter(0)


def make_charset(letters):
    return '[' + CS_ESCAPE.sub(lambda m: '\\' + m.group(), ''.join(letters)) + ']'


def regex_opt_inner(strings, open_paren):
    """Return a regex that matches any string in the sorted list of strings."""
    close_paren = open_paren and ')' or ''
    # print strings, repr(open_paren)
    if not strings:
        # print '-> nothing left'
        return ''
    first = strings[0]
    if len(strings) == 1:
        # print '-> only 1 string'
        return open_paren + escape(first) + close_paren
    if not first:
        # print '-> first string empty'
        return open_paren + regex_opt_inner(strings[1:], '(?:') \
            + '?' + close_paren
    if len(first) == 1:
        # multiple one-char strings? make a charset
        oneletter = []
        rest = []
        for s in strings:
            if len(s) == 1:
                oneletter.append(s)
            else:
                rest.append(s)
        if len(oneletter) > 1:  # do we have more than one oneletter string?
            if rest:
                # print '-> 1-character + rest'
                return open_paren + regex_opt_inner(rest, '') + '|' \
                    + make_charset(oneletter) + close_paren
            # print '-> only 1-character'
            return open_paren + make_charset(oneletter) + close_paren
    prefix = commonprefix(strings)
    if prefix:
        plen = len(prefix)
        # we have a prefix for all strings
        # print '-> prefix:', prefix
        return open_paren + escape(prefix) \
            + regex_opt_inner([s[plen:] for s in strings], '(?:') \
            + close_paren
    # is there a suffix?
    strings_rev = [s[::-1] for s in strings]
    suffix = commonprefix(strings_rev)
    if suffix:
        slen = len(suffix)
        # print '-> suffix:', suffix[::-1]
        return open_paren \
            + regex_opt_inner(sorted(s[:-slen] for s in strings), '(?:') \
            + escape(suffix[::-1]) + close_paren
    # recurse on common 1-string prefixes
    # print '-> last resort'
    return open_paren + \
        '|'.join(regex_opt_inner(list(group[1]), '')
                 for group in groupby(strings, lambda s: s[0] == first[0])) \
        + close_paren


def regex_opt(strings, prefix='', suffix=''):
    """Return a compiled regex that matches any string in the given list.

    The strings to match must be literal strings, not regexes.  They will be
    regex-escaped.

    *prefix* and *suffix* are pre- and appended to the final regex.
    """
    strings = sorted(strings)
    return prefix + regex_opt_inner(strings, '(') + suffix
python3.12/site-packages/pip/_vendor/pygments/__init__.py000064400000005647151732703000017326 0ustar00"""
    Pygments
    ~~~~~~~~

    Pygments is a syntax highlighting package written in Python.

    It is a generic syntax highlighter for general use in all kinds of software
    such as forum systems, wikis or other applications that need to prettify
    source code. Highlights are:

    * a wide range of common languages and markup formats is supported
    * special attention is paid to details, increasing quality by a fair amount
    * support for new languages and formats are added easily
    * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image
      formats that PIL supports, and ANSI sequences
    * it is usable as a command-line tool and as a library
    * ... and it highlights even Brainfuck!

    The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``.

    .. _Pygments master branch:
       https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""
from io import StringIO, BytesIO

__version__ = '2.15.1'
__docformat__ = 'restructuredtext'

__all__ = ['lex', 'format', 'highlight']


def lex(code, lexer):
    """
    Lex `code` with the `lexer` (must be a `Lexer` instance)
    and return an iterable of tokens. Currently, this only calls
    `lexer.get_tokens()`.
    """
    try:
        return lexer.get_tokens(code)
    except TypeError:
        # Heuristic to catch a common mistake.
        from pip._vendor.pygments.lexer import RegexLexer
        if isinstance(lexer, type) and issubclass(lexer, RegexLexer):
            raise TypeError('lex() argument must be a lexer instance, '
                            'not a class')
        raise


def format(tokens, formatter, outfile=None):  # pylint: disable=redefined-builtin
    """
    Format ``tokens`` (an iterable of tokens) with the formatter ``formatter``
    (a `Formatter` instance).

    If ``outfile`` is given and a valid file object (an object with a
    ``write`` method), the result will be written to it, otherwise it
    is returned as a string.
    """
    try:
        if not outfile:
            realoutfile = getattr(formatter, 'encoding', None) and BytesIO() or StringIO()
            formatter.format(tokens, realoutfile)
            return realoutfile.getvalue()
        else:
            formatter.format(tokens, outfile)
    except TypeError:
        # Heuristic to catch a common mistake.
        from pip._vendor.pygments.formatter import Formatter
        if isinstance(formatter, type) and issubclass(formatter, Formatter):
            raise TypeError('format() argument must be a formatter instance, '
                            'not a class')
        raise


def highlight(code, lexer, formatter, outfile=None):
    """
    This is the most high-level highlighting function. It combines `lex` and
    `format` in one function.
    """
    return format(lex(code, lexer), formatter, outfile)
python3.12/site-packages/pip/_vendor/pygments/modeline.py000064400000001732151732703010017353 0ustar00"""
    pygments.modeline
    ~~~~~~~~~~~~~~~~~

    A simple modeline parser (based on pymodeline).

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re

__all__ = ['get_filetype_from_buffer']


modeline_re = re.compile(r'''
    (?: vi | vim | ex ) (?: [<=>]? \d* )? :
    .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ )
''', re.VERBOSE)


def get_filetype_from_line(l):
    m = modeline_re.search(l)
    if m:
        return m.group(1)


def get_filetype_from_buffer(buf, max_lines=5):
    """
    Scan the buffer for modelines and return filetype if one is found.
    """
    lines = buf.splitlines()
    for l in lines[-1:-max_lines-1:-1]:
        ret = get_filetype_from_line(l)
        if ret:
            return ret
    for i in range(max_lines, -1, -1):
        if i < len(lines):
            ret = get_filetype_from_line(lines[i])
            if ret:
                return ret

    return None
python3.12/site-packages/pip/_vendor/pygments/token.py000064400000014050151732703010016674 0ustar00"""
    pygments.token
    ~~~~~~~~~~~~~~

    Basic token types and the standard tokens.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""


class _TokenType(tuple):
    parent = None

    def split(self):
        buf = []
        node = self
        while node is not None:
            buf.append(node)
            node = node.parent
        buf.reverse()
        return buf

    def __init__(self, *args):
        # no need to call super.__init__
        self.subtypes = set()

    def __contains__(self, val):
        return self is val or (
            type(val) is self.__class__ and
            val[:len(self)] == self
        )

    def __getattr__(self, val):
        if not val or not val[0].isupper():
            return tuple.__getattribute__(self, val)
        new = _TokenType(self + (val,))
        setattr(self, val, new)
        self.subtypes.add(new)
        new.parent = self
        return new

    def __repr__(self):
        return 'Token' + (self and '.' or '') + '.'.join(self)

    def __copy__(self):
        # These instances are supposed to be singletons
        return self

    def __deepcopy__(self, memo):
        # These instances are supposed to be singletons
        return self


Token = _TokenType()

# Special token types
Text = Token.Text
Whitespace = Text.Whitespace
Escape = Token.Escape
Error = Token.Error
# Text that doesn't belong to this lexer (e.g. HTML in PHP)
Other = Token.Other

# Common token types for source code
Keyword = Token.Keyword
Name = Token.Name
Literal = Token.Literal
String = Literal.String
Number = Literal.Number
Punctuation = Token.Punctuation
Operator = Token.Operator
Comment = Token.Comment

# Generic types for non-source code
Generic = Token.Generic

# String and some others are not direct children of Token.
# alias them:
Token.Token = Token
Token.String = String
Token.Number = Number


def is_token_subtype(ttype, other):
    """
    Return True if ``ttype`` is a subtype of ``other``.

    exists for backwards compatibility. use ``ttype in other`` now.
    """
    return ttype in other


def string_to_tokentype(s):
    """
    Convert a string into a token type::

        >>> string_to_token('String.Double')
        Token.Literal.String.Double
        >>> string_to_token('Token.Literal.Number')
        Token.Literal.Number
        >>> string_to_token('')
        Token

    Tokens that are already tokens are returned unchanged:

        >>> string_to_token(String)
        Token.Literal.String
    """
    if isinstance(s, _TokenType):
        return s
    if not s:
        return Token
    node = Token
    for item in s.split('.'):
        node = getattr(node, item)
    return node


# Map standard token types to short names, used in CSS class naming.
# If you add a new item, please be sure to run this file to perform
# a consistency check for duplicate values.
STANDARD_TYPES = {
    Token:                         '',

    Text:                          '',
    Whitespace:                    'w',
    Escape:                        'esc',
    Error:                         'err',
    Other:                         'x',

    Keyword:                       'k',
    Keyword.Constant:              'kc',
    Keyword.Declaration:           'kd',
    Keyword.Namespace:             'kn',
    Keyword.Pseudo:                'kp',
    Keyword.Reserved:              'kr',
    Keyword.Type:                  'kt',

    Name:                          'n',
    Name.Attribute:                'na',
    Name.Builtin:                  'nb',
    Name.Builtin.Pseudo:           'bp',
    Name.Class:                    'nc',
    Name.Constant:                 'no',
    Name.Decorator:                'nd',
    Name.Entity:                   'ni',
    Name.Exception:                'ne',
    Name.Function:                 'nf',
    Name.Function.Magic:           'fm',
    Name.Property:                 'py',
    Name.Label:                    'nl',
    Name.Namespace:                'nn',
    Name.Other:                    'nx',
    Name.Tag:                      'nt',
    Name.Variable:                 'nv',
    Name.Variable.Class:           'vc',
    Name.Variable.Global:          'vg',
    Name.Variable.Instance:        'vi',
    Name.Variable.Magic:           'vm',

    Literal:                       'l',
    Literal.Date:                  'ld',

    String:                        's',
    String.Affix:                  'sa',
    String.Backtick:               'sb',
    String.Char:                   'sc',
    String.Delimiter:              'dl',
    String.Doc:                    'sd',
    String.Double:                 's2',
    String.Escape:                 'se',
    String.Heredoc:                'sh',
    String.Interpol:               'si',
    String.Other:                  'sx',
    String.Regex:                  'sr',
    String.Single:                 's1',
    String.Symbol:                 'ss',

    Number:                        'm',
    Number.Bin:                    'mb',
    Number.Float:                  'mf',
    Number.Hex:                    'mh',
    Number.Integer:                'mi',
    Number.Integer.Long:           'il',
    Number.Oct:                    'mo',

    Operator:                      'o',
    Operator.Word:                 'ow',

    Punctuation:                   'p',
    Punctuation.Marker:            'pm',

    Comment:                       'c',
    Comment.Hashbang:              'ch',
    Comment.Multiline:             'cm',
    Comment.Preproc:               'cp',
    Comment.PreprocFile:           'cpf',
    Comment.Single:                'c1',
    Comment.Special:               'cs',

    Generic:                       'g',
    Generic.Deleted:               'gd',
    Generic.Emph:                  'ge',
    Generic.Error:                 'gr',
    Generic.Heading:               'gh',
    Generic.Inserted:              'gi',
    Generic.Output:                'go',
    Generic.Prompt:                'gp',
    Generic.Strong:                'gs',
    Generic.Subheading:            'gu',
    Generic.Traceback:             'gt',
}
python3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-312.pyc000064400000123275151732703010024752 0ustar00�

R`i����z�dZddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZddlmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZddl m!Z"gd�Z#Gd�d	e�Z$e$Z%Gd
�de�Z&Gd�d
e�Z'Gd�de�Z(Gd�de�Z)e)Z*Gd�de�Z+Gd�de�Z,Gd�de�Z-Gd�de$�Z.y)z�
    pygments.lexers.python
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Python and related languages.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�DelegatingLexer�Lexer�
RegexLexer�include�bygroups�using�default�words�combined�
do_insertions�this�line_re)�get_bool_opt�shebang_matches)�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Generic�Other�Error�
Whitespace)�	unistring)�PythonLexer�PythonConsoleLexer�PythonTracebackLexer�Python2Lexer�Python2TracebackLexer�CythonLexer�DgLexer�
NumPyLexerc"��eZdZdZdZdZgd�Zgd�Zgd�Zde	j�de	j�d	�Zd
�Z
d�Zidd
efdeeej$ej&�fdeeej$ej&�fdej*fdej,fdefdefed�ed�deee�dfdeee�dfdeej4e�dfdeej4e�dfed�g�ddeej$ej6�ed d!�fd"eej$ej,�ed d#�fd$eej$ej6�ed d%�fd&eej$ej,�ed d'�fd(eej$ej6�ed)d!�fd*eej$ej,�ed)d#�fd+eej$ej6�ed)d%�fd,eej$ej,�ed)d'�fd-eej$ej6�d.fd/eej$ej,�d0fd1eej$ej6�d2fd3eej$ej,�d4fd5eej$ej6�ed6d.�fd7eej$ej,�ed6d0�fd8eej$ej6�ed6d2�fd9eej$ej,�ed6d4�fd:eej$ej6�ed;d.�fd<eej$ej,�ed;d0�fd=eej$ej6�ed;d2�fd>eej$ej,�ed;d4�fd?efed@�dAefdBefdCej>fedD�edE�edF�edG�edH�g�dIdJedKfdLej@dMfdNej@dMfdOefed�g�dKdJedKfdPedMfdOefed�g�dDe!dQdR�S�efe!dTdR�S�ejDfg�de!dUdR�S�efe!dTdR�S�ejDfg�ddVdWjGe$jJ�zdXzeee�dYfg�dYdZeee&e'�e�fe(dM�g�dEe!d[d\dR�]�e)jTfd^e)jTjVfe!d_d\dR�]�e)jXfg�dFe!d`dR�S�e)jZj\fg�dGe!dadR�S�e)j^j\fg�d@dbe0jbfdce0jbfdde0jdfdee0jffdfe0jhfdge0jjfg�dHdheze)jlfdhefee)fg�dedF�ee)jZdMfe(dM�g�dee)jndMfg�ddieeee�fdje)j4fee)j4fdkeeee�fe(dM�g�ddleeej4�dMfdje)j4fdmejDdMfee)j4fe(dM�g�id dnejpfdoejpfg�d)ed �ed6�g�d;dpejpfg�d6dqejpfed;�g�dreej,��dseej6��dte
ej,��due
ej6��d%dvej6dMfdwejpfeds�g�d'dxej,dMfdyejpfedr�g�d2dvej6dMfdwejpfedu�g�d4dxej,dMfdyejpfedt�g�d!dzej6dMfeds�d
ej6fg�d#d{ej,dMfedr�d
ej,fg�d.dzej6dMfedu�d
ej6fg�d0d{ej,dMfedt�d
ej,fg��Z9d|�Z:y})~rz�
    For Python source code (version 3.x).

    .. versionadded:: 0.10

    .. versionchanged:: 2.5
       This is now the default ``PythonLexer``.  It is still available as the
       alias ``Python3Lexer``.
    �Python�http://www.python.org)�python�py�sage�python3�py3)z*.pyz*.pywz*.pyiz*.jyz*.sagez*.sc�
SConstruct�
SConscriptz*.bzl�BUCK�BUILDzBUILD.bazel�	WORKSPACEz*.tac)z
text/x-pythonzapplication/x-pythonztext/x-python3zapplication/x-python3�[z][z]*c�\�dtjfdtjfd|fd|fd|fgS)NzH%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsaux%]zg\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}z
[^\\\'"%{\n]+�[\'"\\]z%|(\{{1,2})�r�Interpol��ttypes ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/python.py�innerstring_ruleszPythonLexer.innerstring_rulesCsJ��'�(.���
9���O�O�	
%��u�%�
���
�U�#�
�	
�c�X�dtjfdtjdfd|fd|fgS)Nz\}z\{�expr-inside-fstringz
[^\\\'"{}\n]+r5r6r8s r:�
fstring_ruleszPythonLexer.fstring_rulesWs9���F�O�O�$�
�F�O�O�%:�;�
�u�%�
���
�	
r<�root�\n�&^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")�&^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')�\A#!.+$�#.*$�\\\n�\\�keywordsz
soft-keywords�(def)((?:\s|\\\s)+)�funcname�(class)((?:\s|\\\s)+)�	classname�(from)((?:\s|\\\s)+)�
fromimport�(import)((?:\s|\\\s)+)�import�exprz(?i)(rf|fr)(""")�rfstringescape�tdqfz(?i)(rf|fr)(''')�tsqfz(?i)(rf|fr)(")�dqfz(?i)(rf|fr)(')�sqfz([fF])(""")�
fstringescapez([fF])(''')z	([fF])(")z	([fF])(')z(?i)(rb|br|r)(""")�tdqsz(?i)(rb|br|r)(''')�tsqsz(?i)(rb|br|r)(")�dqsz(?i)(rb|br|r)(')�sqsz([uU]?)(""")�stringescapez([uU]?)(''')z
([uU]?)(")z
([uU]?)(')z([bB])(""")�bytesescapez([bB])(''')z	([bB])(")z	([bB])(')�[^\S\n]+�numbersz!=|==|<<|>>|:=|[-~+/*%=<>&^|.]�[]{}:(),;[]�(in|is|and|or|not)\bz
expr-keywords�builtins�
magicfuncs�	magicvars�namer>z[{([]zexpr-inside-fstring-innerz(=\s*)?(\![sraf])?\}�#popz(=\s*)?(\![sraf])?:�\s+z[])}])z	async for�await�else�for�if�lambda�yield�
yield from�\b��suffix)�True�False�None)�assert�asyncrh�break�continue�del�elifri�except�finallyrj�globalrkrl�pass�raise�nonlocal�return�try�whilermrn�as�withz6(^[ \t]*)(match|case)\b(?![ \t]*(?:[:,;=^&|@~)\]}]|(?:�|z)\b))zsoft-keywords-innerz(\s+)([^\n_]*)(_\b))C�
__import__�abs�aiter�all�any�bin�bool�	bytearray�
breakpoint�bytes�callable�chr�classmethod�compile�complex�delattr�dict�dir�divmod�	enumerate�eval�filter�float�format�	frozenset�getattr�globals�hasattr�hash�hex�id�input�int�
isinstance�
issubclass�iter�len�list�locals�map�max�
memoryview�min�next�object�oct�open�ord�pow�print�property�range�repr�reversed�round�set�setattr�slice�sorted�staticmethod�str�sum�super�tuple�type�vars�zip�(?<!\.)��prefixrqz+(?<!\.)(self|Ellipsis|NotImplemented|cls)\b)E�ArithmeticError�AssertionError�AttributeError�
BaseException�BufferError�BytesWarning�DeprecationWarning�EOFError�EnvironmentError�	Exception�FloatingPointError�
FutureWarning�
GeneratorExit�IOError�ImportError�
ImportWarning�IndentationError�
IndexError�KeyError�KeyboardInterrupt�LookupError�MemoryError�	NameError�NotImplementedError�OSError�
OverflowError�PendingDeprecationWarning�ReferenceError�ResourceWarning�RuntimeError�RuntimeWarning�
StopIteration�SyntaxError�
SyntaxWarning�SystemError�
SystemExit�TabError�	TypeError�UnboundLocalError�UnicodeDecodeError�UnicodeEncodeError�UnicodeError�UnicodeTranslateError�UnicodeWarning�UserWarning�
ValueError�VMSError�Warning�WindowsError�ZeroDivisionError�BlockingIOError�ChildProcessError�ConnectionError�BrokenPipeError�ConnectionAbortedError�ConnectionRefusedError�ConnectionResetError�FileExistsError�FileNotFoundError�InterruptedError�IsADirectoryError�NotADirectoryError�PermissionError�ProcessLookupError�TimeoutError�StopAsyncIteration�ModuleNotFoundError�RecursionError�EncodingWarning)^�__abs__�__add__�
__aenter__�	__aexit__�	__aiter__�__and__�	__anext__�	__await__�__bool__�	__bytes__�__call__�__complex__�__contains__�__del__�__delattr__�
__delete__�__delitem__�__dir__�
__divmod__�	__enter__�__eq__�__exit__�	__float__�__floordiv__�
__format__�__ge__�__get__�__getattr__�__getattribute__�__getitem__�__gt__�__hash__�__iadd__�__iand__�
__ifloordiv__�__ilshift__�__imatmul__�__imod__�__imul__�	__index__�__init__�__instancecheck__�__int__�
__invert__�__ior__�__ipow__�__irshift__�__isub__�__iter__�__itruediv__�__ixor__�__le__�__len__�__length_hint__�
__lshift__�__lt__�
__matmul__�__missing__�__mod__�__mul__�__ne__�__neg__�__new__�__next__�__or__�__pos__�__pow__�__prepare__�__radd__�__rand__�__rdivmod__�__repr__�__reversed__�
__rfloordiv__�__rlshift__�__rmatmul__�__rmod__�__rmul__�__ror__�	__round__�__rpow__�__rrshift__�
__rshift__�__rsub__�__rtruediv__�__rxor__�__set__�__setattr__�__setitem__�__str__�__sub__�__subclasscheck__�__truediv__�__xor__)�__annotations__�	__bases__�	__class__�__closure__�__code__�__defaults__�__dict__�__doc__�__file__�__func__�__globals__�__kwdefaults__�
__module__�__mro__�__name__�__objclass__�__qualname__�__self__�	__slots__�__weakref__zT(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)([eE][+-]?\d(?:_?\d)*)?z!\d(?:_?\d)*[eE][+-]?\d(?:_?\d)*j?z0[oO](?:_?[0-7])+z0[bB](?:_?[01])+z0[xX](?:_?[a-fA-F0-9])+z\d(?:_?\d)*�@�(\s+)(as)(\s+)z\.�
(\s*)(,)(\s*)z(\s+)(import)\b�None\bz\{\{z\}\}z0\\([\\abfnrtv"\']|\n|x[a-fA-F0-9]{2}|[0-7]{1,3})z,\\(N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8})zfstrings-singlezfstrings-double�strings-single�strings-double�"�
\\\\|\\"|\\\n�'�
\\\\|\\'|\\\n�"""�'''c�,�t|d�xsd|ddvS)N�pythonw?(3(\.\d)?)?�import ���r��texts r:�analyse_textzPythonLexer.analyse_text�s%���t�%;�<�%���e�t��$�	%r<N);r~r|r�rwre�url�aliases�	filenames�	mimetypes�uni�	xid_start�xid_continue�uni_namer;r?rrr�Affix�Docr�Hashbang�Singlerrr�	Namespace�Doublerrr�Wordr7r
�Constant�join�keyword�kwlistrr
r	r�Builtin�Pseudor��Function�Magic�Variabler�Float�Oct�Bin�Hex�Integer�	Decorator�Class�Escape�tokensr��r<r:rrs�
����D�
!�C�8�G��I�,<�I�"�m�m�S�-=�-=�>�H�
�(
�r��
�J��
6�
�j�&�,�,��
�
�
;�
=�
6�
�j�&�,�,��
�
�
;�
=�
��)�)�*�
�g�n�n�%�
�d�O�
�D�M��J���O�$�
#�X�g�t�%<�j�I�
%�x���'>��L�
$�h�w�/@�/@�$�&G�
�
�
&���1B�1B�D�(I�
�
��F�O�%
�r�*	�
�
�f�l�l�F�M�M�
2�
�&��
/�
1� �
�f�l�l�F�M�M�
2�
�&��
/�
1��
�f�l�l�F�M�M�
2�
�&��
.�
0��
�f�l�l�F�M�M�
2�
�&��
.�
0��H�V�\�\�6�=�=�A�
�o�v�
.�
0�
�H�V�\�\�6�=�=�A�
�o�v�
.�
0�
�(�6�<�<����?�
�o�u�
-�
/�
�(�6�<�<����?�
�o�u�
-�
/�"�
�f�l�l�F�M�M�
2�F�
<�
!�
�f�l�l�F�M�M�
2�F�
<�
�
�f�l�l�F�M�M�
2�E�
;�
�
�f�l�l�F�M�M�
2�E�
;��X�f�l�l�F�M�M�B�
�n�f�
-�
/�
�X�f�l�l�F�M�M�B�
�n�f�
-�
/�
�8�F�L�L�&�-�-�@�
�n�e�
,�
.�
�8�F�L�L�&�-�-�@�
�n�e�
,�
.��H�V�\�\�6�=�=�A�
�m�V�
,�
.�
�H�V�\�\�6�=�=�A�
�m�V�
,�
.�
�(�6�<�<����?�
�m�U�
+�
-�
�(�6�<�<����?�
�m�U�
+�
-��$���I��
.��9�
�[�)�
$�h�m�m�4��O�$��J���L�!��K� ��F�O�y=
�+r�f	�
�{�$?�@���O�O�V�
-�
��?�?�F�
,��Z� ��F�O�
 
�gr�B	$�
�{�$?�@�
�{�F�+�
�Z� ��F�O�	&
�Cr�N	�
�'�/4�6��
��,�U�
;�W�=M�=M�N�

�Or�^	�
�,�5:�	;�
�
��,�U�
;�W�=M�=M�N�
�_r�p	�$��Y�Y�w�~�~�
&�	'�*2�	2�
�d�G�
$�&;�
=�
�qr�B	�
#�X�j�%��+�w�%O�P��F�O� 
�Cr�L	�
�
0�9C�5�
R��\�\�
�<�T�\�\�=P�=P�Q�
�#�0"�%�11�2�^�^�3
�(
�Mr�^	�
��*$)�+*�,�]�]�
 �
 �-
"�
�_r�P	�
�8�
AF�G��]�]�
 �
 �

"�
�Qr�b	�(�)/���
7�
1�6�<�<�@�
!�6�:�:�.�
 �&�*�*�-�
'����4�
�V�^�^�,�
�cr�t	�
�H�_�d�n�n�-�
�8��
�t��
�ur�~	��L�!�
�t�}�}�f�-��F�O�
�r�H	�
�t�z�z�6�*�
�Ir�N	�
���w�� =�>�
�D�N�N�#�
�t�~�~�&�
�x��h��=�>��F�O�
�Or�\	�
��$��0A�0A�!B�F�K�
�D�N�N�#���(�(�&�1�
�t�~�~�&��F�O�
�]r�n	�
�f�m�m�$�
�f�m�m�$�
�or�v	��$�%��N�#�
�wr�~	�
@�&�-�-�P�
�r�D	�
<�f�m�m�L��M�"�
�Er�L	�=����7�Mr�N	�=����7�Or�P	�+�F�M�M�:�Qr�R	�+�F�M�M�:�Sr�T	�
�6�=�=�&�)�
�v�}�}�-��%�&�
�Ur�^	�
�6�=�=�&�)�
�v�}�}�-��%�&�
�_r�h	�
�6�=�=�&�)�
�v�}�}�-��$�%�
�ir�r	�
�6�=�=�&�)�
�v�}�}�-��$�%�
�sr�|	�
�V�]�]�F�+��%�&�
�F�M�M�"�
�}r�F		�
�V�]�]�F�+��%�&�
�F�M�M�"�
�G	r�P		�
�V�]�]�F�+��$�%�
�F�M�M�"�
�Q	r�Z		�
�V�]�]�F�+��$�%�
�F�M�M�"�
�[	r�F�h	%r<rc#�F	�eZdZdZdZdZddgZgZddgZd�Z	id	d
e
fdee
ejej�fdee
ejej�fd
efdej"fdej$fdefdefdefdej*fdefed�deee�dfdeee�dfdeej0e�dfdeej0e�dfed�ed�ed �ed!�d"eejej2�d#fd$eejej$�d%fd&eejej2�d'fd(eejej$�d)fd*eejej2�ed+d#�fd,eejej$�ed+d%�fd-eejej2�ed+d'�fd.eejej$�ed+d)�fed/�ed0�g�ded1d2�3�efg�ded4d5d2�6�ej:fd7ej:j<fed8d5d2�6�ej>fg�ded9d2�3�ej@jBfg�d ed:d2�3�ejDjBfg�d0d;e#jHfd<e#jHfd=e#jJfd>e#jLfd?e#jNfd@e#jPjRfdAe#jPfg�d!dBejTfg�d/dCejVfdDefg�ded�dDej@dEfe,dE�g�ddDejZdEfg�ddFefdGej0fdHefdIej0fe,dE�g�ddFefdJej0dEfdKej:j<dEfdLej0fe,dE�g�d+dMej\fg�dNe	ej$��dOe	ej2��d'dPej2dEfdQej\fedO�g�d)dRej$dEfdSej\fedN�g�dTej2dEfedO�d
ej2fgdUej$dEfedN�d
ej$fgdV��Z/dW�Z0yX)Yr!a
    For Python 2.x source code.

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonLexer``.  ``PythonLexer`` now
       refers to the Python 3 variant.  File name patterns like ``*.py`` have
       been moved to Python 3 as well.
    z
Python 2.xr(�python2�py2ztext/x-python2zapplication/x-python2c�:�dtjfd|fd|fd|fgS)N�G%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]�[^\\\'"%\n]+r5�%r6r8s r:r;zPython2Lexer.innerstring_rules�s6��&�'-���
8��e�$�
���
�5�M�

�
	
r<r@rArBrCr^rDrEr`rFrGraz!=|==|<<|>>|[-~+/*%=<>&^|.]rHrIrJrKrLrMrNrOrPrbrcrd�backtickz!([rR]|[uUbB][rR]|[rR][uUbB])(""")rXz!([rR]|[uUbB][rR]|[rR][uUbB])(''')rYz([rR]|[uUbB][rR]|[rR][uUbB])(")rZz([rR]|[uUbB][rR]|[rR][uUbB])(')r[z([uUbB]?)(""")r\z([uUbB]?)(''')z([uUbB]?)(")z([uUbB]?)(')rer_)rurwrxryrzrir{�execr|rjr}rkrlr~r�rr�r�r�rmrnr�r�rorp)Nr�r�r�r��apply�
basestringr�r��bufferr�r�r�r�r��cmp�coercer�r�r�r�r�r�r�r��execfile�exit�filer�r�r�r�r�r�r�r�r�r�r��internr�r�r�r�r�r��longr�r�r�r�r�r�r�r�r�r�r��	raw_input�reduce�reloadr�r�r�r�r�r�r�r�r�r�r�r�r��unichr�unicoder��xranger�r�r�z;(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls)\b)1r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��OverflowWarningr�r�r�r��
StandardErrorr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)_rrrr�__cmp__�
__coerce__rrrr r!r"�__delslice__�__div__r$r%r&r'r(r)r+r,r-r.r/�__getslice__r0r1�__hex__r2r3�__idiv__r4r5r7r8r9r:r;r<r=�__iop__r>r?r@rArBrCrDrErF�__long__rHrIrKrLrMrNrOrP�__nonzero__�__oct__�__op__rRrSrTrVrW�__rcmp__�__rdiv__rXrYrZr[r\r^r_�__rop__r`rbrcrdrerfrgrhrirj�__setslice__rkrlrmrn�__unicode__ro)rqrrrsrtrurvrwrxryrz�
__metaclass__r|r}r~r�r�r�z'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?z\d+[eE][+-]?[0-9]+j?z	0[0-7]+j?z
0[bB][01]+�0[xX][a-fA-F0-9]+�\d+Lz\d+j?�`.*?`z@[\w.]+�[a-zA-Z_]\w*rfz(?:[ \t]|\\\n)+�as\b�,�[a-zA-Z_][\w.]*zimport\br��[a-zA-Z_.][\w.]*�Y\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})r�r�r�r�r�r�r�r�)rXrYc��t|d�S)Nzpythonw?2(\.\d)?r�r�s r:r�zPython2Lexer.analyse_text{s���t�%8�9�9r<N)1r~r|r�rwrer�r�r�r�r;rrrr�r�rrr�r�rrr�rrr�r�rr
rr�r�r�r�r�r�rr�r�r�r�r��Long�Backtickr�r	r�r�r�r�r�r<r:r!r!�s%����D�
!�C��%� �G��I�!�#:�;�I�
�{��
�J��
6�
�j�&�,�,��
�
�
;�
=�
6�
�j�&�,�,��
�
�
;�
=�
�$��
��)�)�*�
�g�n�n�%�
�[�)�
�d�O�
�D�M�
$�h�m�m�4�
+�X�6��J��
#�X�g�t�%<�j�I�
%�x���'>��L�
$�h�w�/@�/@�$�&G�
�
�
&���1B�1B�D�(I�
�
��J���L�!��K� ��J��
0�
�f�l�l�F�M�M�
2�F�
<�
0�
�f�l�l�F�M�M�
2�F�
<�
.�
�f�l�l�F�M�M�
2�E�
;�
.�
�f�l�l�F�M�M�
2�E�
;�
�x����f�m�m�D�
�n�f�
-�
/�
�x����f�m�m�D�
�n�f�
-�
/�
�X�f�l�l�F�M�M�B�
�n�e�
,�
.�
�X�f�l�l�F�M�M�B�
�n�e�
,�
.��F�O��I��U+
�{�Z	�
�,�5:�	;�
�
�
�[{�j	�
�>�"�%�1��\�\�

���\�\�(�(�
*�
�5�>H�PU�W��^�^�
�#!
�k{�n	�
�*�$38�%9�&�]�]�
 �
 �'
"�
�o{�Z	�
�,�
���]�]�
 �
 �

"�
�[{�l	�
7����F�
$�f�l�l�3�
�6�:�:�&�
�F�J�J�'�
!�6�:�:�.�
�f�n�n�)�)�*�
�v�~�~�&�
�m{�~	�
�f�o�o�&�
�{�D	�
����(�
�d�#�
�E{�L	��L�!�
�d�m�m�V�4��F�O�
�M{�V	�
�d�j�j�&�1�
�W{�\	�
��&�
�g�'�'�(�
�8��
����0��F�O�
�]{�j	�
��&�
�'�+�+�V�4�����+�+�V�4�
 �$�.�.�1�
�F�O�
�k{�B	�<�=C�]�]�
L�
�C{�J	�+�F�M�M�:�K{�L	�+�F�M�M�:�M{�N	�
�6�=�=�&�)�
�v�}�}�-��$�%�
�O{�X	�
�6�=�=�&�)�
�v�}�}�-��$�%�
�Y{�d�V�]�]�F�+��$�%�
�F�M�M�"�
��V�]�]�F�+��$�%�
�F�M�M�"�
�m{�F�z:r<r!c��eZdZdZdgZdgZ	deeje	j�dfdeeje�fde	jdfd	e	jdfd
ejfgdeeje	j�fdeeje�fed
�gded
fdeej"e�fd
e	jfgd�Zy)�_PythonConsoleLexerBase�Python console session�pycon�text/x-python-doctestz(>>> )(.*\n)�
continuationsz	(>>>)(\n)z,(\^C)?Traceback \(most recent call last\):\n�	tracebackz  File "[^"]+", line \d+z.*\nz(\.\.\. )(.*\n)z(\.\.\.)(\n)rfz(?=>>>( |$))z(KeyboardInterrupt)(\n))r@r�r�N)r~r|r�rer�r�rr�Promptr�Coder�	Traceback�Outputr	rrr�r�r�r<r:r�r�~s���#�D��i�G�(�)�I���h�w�~�~�u�z�z�B�O�T��8�G�N�N�J�?�@�
<�e�o�o�{�[�
(�%�/�/�;�G�
�g�n�n�%�	
� ��'�.�.�%�*�*�!E�F�
�h�w�~�~�z�B�C��F�O�	
��d�F�+�
'��$�*�*�j�)I�J�
�e�o�o�&�
�#�Fr<r�c�2��eZdZdZdZdgZdgZ�fd�Z�xZS)ra�
    For Python console output or doctests, such as:

    .. sourcecode:: pycon

        >>> a = 'foo'
        >>> print(a)
        foo
        >>> 1 / 0
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        ZeroDivisionError: integer division or modulo by zero

    Additional options:

    `python3`
        Use Python 3 lexer for code.  Default is ``True``.

        .. versionadded:: 1.0
        .. versionchanged:: 2.5
           Now defaults to ``True``.
    r�r�r�c����t|dd�}|r
t�t}nt�t}G�fd�dt
�}t
�|�||tjfi|��y)Nr,Tc�"���eZdZ��fd�Z�xZS)�6PythonConsoleLexer.__init__.<locals>._ReplaceInnerCodec�N��t�|��ttjfi|��y�N)r�r:r�rr�)�self�optionsrr�pylexers  ��r:r:z?PythonConsoleLexer.__init__.<locals>._ReplaceInnerCode.__init__�s����� ��*A�5�:�:�Y�QX�Yr<)r~r|r�r:�
__classcell__)rrrs@�r:�_ReplaceInnerCoder�s���
Z�
Zr<r)
rrr r!r"rr�r:rr�)rrr,�tblexerrrrrs     @�r:r:zPythonConsoleLexer.__init__�sS����w�	�4�8���!�G�*�G�"�G�+�G�	Z��	Z�	����"3�U�_�_�P��Pr<)	r~r|r�rwrer�r�r:r)rrs@r:rr�s*����.$�D��i�G�(�)�I�Q�Qr<rc���eZdZdZdZddgZddgZddgZd	efd
e	jdfde	jfd
e	jfde	jdfdefgdee
eje
ee
ee�fdee
eje
ee�fdeeee�e�dfdeeee�fdee	j(e
ee�dfdee	j(e�dfed�gdeeej.e�dfed�gd�Zy)r a
    For Python 3.x tracebacks, with support for chained exceptions.

    .. versionadded:: 1.0

    .. versionchanged:: 2.5
       This is now the default ``PythonTracebackLexer``.  It is still available
       as the alias ``Python3TracebackLexer``.
    zPython Traceback�pytb�py3tbz*.pytbz*.py3tbztext/x-python-tracebackztext/x-python3-tracebackrAz-^(\^C)?Traceback \(most recent call last\):\n�intbzH^During handling of the above exception, another exception occurred:\n\nzI^The above exception was the direct cause of the following exception:\n\n�^(?=  File "[^"]+", line \d+)�^.*\n�0^(  File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)�%^(  File )("[^"]+")(, line )(\d+)(\n)�^(    )(.+)(\n)�markers�^([ \t]*)(\.\.\.)(\n)�^([^:]+)(: )(.+)(\n)rfz^([a-zA-Z_][\w.]*)(:?\n)z^( {4,})([~^]+)(\n))r@r
rN)r~r|r�rwrer�r�r�rrr�rrrrr�rrrrrr	r�Markerr�r�r<r:r r �sq����D��w��G��9�%�I�*�,F�G�I��J��
=�w�?P�?P�RX�Y�(�)0�):�):�
<�)�*1�*;�*;�
=�
-�w�/@�/@�&�I�
�u��	
�A�
�d�D�L�L�$���d�J�
O�
Q�
5�
�d�D�L�L�$��
�
C�
E�
�
�j�%��"4�j�
A�9�
N�
%�
�j�'�:�
6�
8�
$�
�g�m�m�T�4��
<�f�
F�
(�
�g�m�m�Z�
0�&�
:��F�O�
�&$�
�j�+�"4�"4�j�
A�
�
�
�F�O�
�5#�Fr<r c��eZdZdZdZdgZdgZdgZdee	e
j�dfde
jdfd	efgd
ee	e
je	ee	e
e�fdee	e
je	ee�fdee	ee�e�d
fdee	ee�fdee
j(e	e
e�dfdee
j(e�dfgdee	ej,�dfed�gd�Zy)r"z�
    For Python tracebacks.

    .. versionadded:: 0.7

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonTracebackLexer``.
       ``PythonTracebackLexer`` now refers to the Python 3 variant.
    zPython 2.x Traceback�py2tbz*.py2tbztext/x-python2-tracebackz^(\^C)?(Traceback.*\n)r
rrrrr�markerrrrfz^([a-zA-Z_]\w*)(:?\n)z( {4,})(\^))r@r
rN)r~r|r�rwrer�r�r�rrrr�rrr�rrrr!rrrrr	r�r�r<r:r"r"	s6���"�D��i�G���I�+�,�I�'�
�d�G�-�-�
.��
8�.�w�/@�/@�&�I�
�u��
�A�
�d�D�L�L�$���d�J�
O�
Q�
5�
�d�D�L�L�$��
�
C�
E�
�
�d�E�,�/��
<�h�
H�
%�
�d�G�Z�
0�
2�
$�
�g�m�m�T�4��
<�f�
F�
%�
�g�m�m�Z�
0�&�
:�

� �X�d�K�,>�,>�?��H��F�O�
�1�Fr<r"c
��eZdZdZdZdZgd�Zgd�ZddgZidgd	e	f�d
e
e	ej�f�de
e	ej�f�de
f�d
ef�def�de	f�de
f�dej"f�de
eej&e�f�def�de
eej*eeeee�f�ed��de
ee
�df�de
ee
�df�de
ee�f�de
ee
�df�de
ee
�df�de
ee
�d f�ed!��ed"��d#ed$f�d%ed&f�d'ed(f�d)ed*f�d+eed,d$�f�d-eed,d&�f�d.eed,d(�f�d/eed,d*�f�ed0��ed1���ded2d3�4�efd5ej4fg�d!ed6d7d3�8�ej6fd9ej6j8fed:d7d3�8�ej:fg�d1d;ej<fd<ej>fd=ej@fd>ej*jBfd?ej*fg�d"d@ejDfg�d0dAejFfdBefg�ddBejHdCfg�ddDejJfdEefdFe
ejHe
�dCfdGe
ejHe
e�fdHedCfdIefdJedCfdKe
dCfdBej&fdLe
fg
�ddBejLdCfg�d dMe
e
ee
�fdNejNfdOe
e
ee
�fe(dC�g�ddPe
e
e�dCfdQejNfe(dC�g�d,dRejRfg�dSdTejTfdUefdVefdWefg�dXd	efg�d(dYedCfdZejRfedS�g�d*d[edCfd\ejRfedS�g�d$d]edCfedS�edX�g�d&d^edCfedS�edX�gi�Z+y_)`r#zF
    For Pyrex and Cython source code.

    .. versionadded:: 1.1
    �Cythonzhttp://cython.org)�cython�pyx�pyrex)z*.pyxz*.pxdz*.pxiz
text/x-cythonzapplication/x-cythonr@rAz^(\s*)("""(?:.|\n)*?""")z^(\s*)('''(?:.|\n)*?''')r^rEr`rFrGraz(<)([a-zA-Z0-9.?]+)(>)z!=|==|<<|>>|[-~+/*%=<>&^|.?]z(from)(\d+)(<=)(\s+)(<)(\d+)(:)rHz(def|property)(\s+)rJz
(cp?def)(\s+)�cdefz	(cdef)(:)z(class|struct)(\s+)rLz(from)(\s+)rNz(c?import)(\s+)rPrbr�z(?:[rR]|[uU][rR]|[rR][uU])"""rXz(?:[rR]|[uU][rR]|[rR][uU])'''rYz(?:[rR]|[uU][rR]|[rR][uU])"rZz(?:[rR]|[uU][rR]|[rR][uU])'r[z[uU]?"""r\z[uU]?'''z[uU]?"z[uU]?'rer_)rurvrhrw�byrx�ctypedefryrzrir{zexcept?r�r|rj�fused�gilr}rkrrl�nogilr~r�rr�r�r�rmr�r�rorpz(DEF|IF|ELIF|ELSE)\b)Qr�r�r�r�r�r�r��bintr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��
Py_ssize_tr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��unsignedr�r�r�r�r�z<(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|NULL)\b)0r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��NotImplementedr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�z&(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?z0\d+r�r�z\d+r�z@\w+r�rfz%(public|readonly|extern|api|inline)\bz(struct|enum|union|class)\bz([a-zA-Z_]\w*)(\s*)(?=[(:#=]|$)z([a-zA-Z_]\w*)(\s*)(,)zfrom\br��:z	(?=["\'])�.r�r�r�z(\s+)(c?import)\br�r��stringszP%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]r�r5r��nlr�r�r�r�r�r�N),r~r|r�rwrer�r�r�r�rrrr�rrrrr�r�Typerr�rrrr
�Preprocr�r�r�r�r�r�r�r�r�r��Reservedr�r�r	r�r7r�r�r<r:r#r#9sx����D�
�C�(�G�+�I� �"8�9�I�d��$
�
�J��$
�
(�(�:�v�z�z�*J�K�$
�)�(�:�v�z�z�*J�K�$
��$��	$
�
�g��$
��[�)�
$
��j�!�$
��D�M�$
�%�h�m�m�4�$
�'�
�k�7�<�<��
=�
?�$
�-�h�7�$
�0�
�g�v�~�~�x��x��K�)�
*�$
� 
�J��!$
�"$�X�g�t�%<�j�I�#$
�$�x���6��?�%$
�(�8�G�[�9�:�)$
�*$�X�g�t�%<�k�J�+$
�,�X�g�t�4�l�C�-$
�. ��'�4�!8�(�C�/$
�0
�J��1$
�2
�J��3$
�4-�f�f�=�5$
�6-�f�f�=�7$
�8+�F�E�:�9$
�:+�F�E�:�;$
�<���.�&�!A�B�=$
�>���.�&�!A�B�?$
�@�v�x���>�?�A$
�B�v�x���>�?�C$
�D
�F�O�E$
�F
�I��G$
�d�L	�
�J�SX�	Y�
�
�%�g�o�o�6�
�Md�^	�
�)�2<�E�K��\�\�

���\�\�(�(�
*�
�%�.8��G��^�^�
�#!
�_d�b	�
6����E�
�f�j�j�!�
!�6�:�:�.�
�f�n�n�)�)�*�
�V�^�^�$�
�cd�p	�
�f�o�o�&�
�qd�v	�
�d�n�n�%�
�d�#�
�wd�~	�
�d�m�m�V�4�
�d�D	�
5�w�7G�7G�H�
+�W�5�
/�
�d�m�m�T�
*�F�
4�
&�
�d�m�m�T�;�
7�
9�
���(�
�g��
�;��'�
�4��(�
�g�l�l�+�
�4�L�

�Ed�`	�
�d�j�j�&�1�
�ad�f	�
���w�� =�>�
����0�
�x��h��=�>��F�O�	
�gd�r	�
!�8�D�'�#:�F�C�
 �$�.�.�1��F�O�	
�sd�~	�<�=C�]�]�
L�
�d�F	�&�'-���
8�
�f�%�
�� �
�6�N�	
�Gd�Z	
�
�F�O�
�[d�`	�
�6�6�"�
�v�}�}�-��I��
�ad�j	�
�6�6�"�
�v�}�}�-��I��
�kd�t	�
�V�V�$��I���D�M�
�ud�~	�
�V�V�$��I���D�M�
�d�Fr<r#c���eZdZdZdZdgZdgZdgZdefde	jfdejfdejfd	ejfd
ejfdejfdej fd
eeddd�fdeeddd�fdeeddd�fdeeddd�fdefdej(fdefeddd��ej.feddd��ej.fdej.j0fd ej2fd!ej2fd"ej6fd#efd$ej8fd%efd&efd'efgd(ej>fgd)ej@fd*efd+efd,efd-efgd.ed/fgd0ed/fgd1ed/fgd2ed/fgd3�Z!y4)5r$z�
    Lexer for dg,
    a functional and object-oriented programming language
    running on the CPython 3 VM.

    .. versionadded:: 1.6
    �dgz*.dgz	text/x-dgrgz#.*?$z(?i)0b[01]+z(?i)0o[0-7]+z(?i)0x[0-9a-f]+z((?i)[+-]?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?j?z(?i)[+-]?[0-9]+e[+-]?\d+j?z(?i)[+-]?[0-9]+j?z(?i)(br|r?b?)'''r\rY�stringz(?i)(br|r?b?)"""rXz(?i)(br|r?b?)'r[z(?i)(br|r?b?)"rZz`\w+'*`z\b(and|in|is|or|where)\bz[!$%&*+\-./:<-@\\^|~;,]+)r�r�r�r�r�r�zdict'r�r�r�r�zlist'r�r�r�r�r�zset'r�r�r�r�r�ztuple'r�r�z
(?![\'\w])r�)=r�r�r�r�r��bindr�r�r�r�r�r�r��drop�	dropwhiler�r��exhaustr��flipzfoldl1?r��fstr�r�r�r��headr�r��initr�r�r�r��iterate�lastr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�zscanl1?�sndr�r��tail�take�	takewhiler�r�z>(?<!\.)(self|Ellipsis|NotImplemented|None|True|False)(?!['\w])z3(?<!\.)[A-Z]\w*(Error|Exception|Warning)'*(?!['\w])zT(?<!\.)(Exception|GeneratorExit|KeyboardInterrupt|StopIteration|SystemExit)(?!['\w])z_(?<![\w.])(except|finally|for|if|import|not|otherwise|raise|subclass|while|with|yield)(?!['\w])z[A-Z_]+'*(?!['\w])z[A-Z]\w+'*(?!['\w])z\w+'*z[()]r*r�r�r�r5r�rAr�rfr�r�r�)r@r\r2rZr[rXrYN)"r~r|r�rwrer�r�r�rrr�rr�r�r�r�r�rrrr�r
rr�r�r�rr/r-rrr�r7r�r�r<r:r$r$�sJ����D��f�G���I��
�I��T�N�
�w�~�~�&�
�V�Z�Z�(�
�f�j�j�)�
����,�
8�&�,�,�G�
*�F�L�L�9�
!�6�>�>�2�
 �&�(�>�6�8�*T�U�
 �&�(�>�6�8�*T�U�
������(Q�R�
������(Q�R�
��"�
(�(�-�-�8�
(�(�3�
�5�
%�]�<��\�\�

��M�%�]�	<��\�\�

�O�
�\�\�
 �
 �
"�D�
�^�^�
�%�&*�n�n�
6�4�5<�5E�5E�
G�#�D�)�
#�W�\�\�2�
�t��
�k�"�
�5�M�m7
�r<�=C�]�]�
L�
�
&�'-���
8�
�f�%�
�� �
�6�N�
�F�O�	
��6�6�"�
��6�6�"�
��V�V�$�
��V�V�$�
�aS�Fr<r$c�:�eZdZdZdZdZdgZgZgZhd�Z	d�Z
d�Zy)	r%z[
    A Python lexer recognizing Numerical Python builtins.

    .. versionadded:: 0.10
    �NumPyzhttps://numpy.org/�numpy>��c_�i0�r_�s_r��addr�r��cos�cov�dot�exp�eye�fft�fix�inf�inv�ix_�log�matr�r��mod�nan�ptp�put�sin�stdr��svd�tan�tri�var�who�alen�amax�amin�beta�bmat�ceil�clip�conj�copy�cosh�diag�diff�disp�dump�fabs�fill�flat�fmod�ifft�imag�info�item�kron�less�load�log2�mean�modf�ndim�ones�pinv�poly�prod�ranf�rank�real�rint�roll�seed�sign�sinc�sinh�size�sort�sqrtr?�tanh�test�tile�tril�triu�vdot�view�angle�arrayr��cross�dtype�dumps�empty�equal�expm1�finfo�floor�frexp�hypot�inner�isinf�isnan�ldexp�loads�log10�log1p�lstsq�mgrid�msort�ogrid�outer�place�power�ravel�roots�rot90r��shaper��solve�split�trace�trapz�where�zeros�append�arange�arccos�arcsin�arctan�argmax�argmin�around�astype�choose�cumsum�delete�divide�dsplit�dstack�fliplr�flipud�geterr�gumbel�hsplit�hstack�insert�interp�invert�isreal�kaiser�matrix�median�nanmax�nanmin�nansum�poly1dr��repeat�resize�round_�sample�select�seterr�source�square�tofile�tolist�unique�unwrap�vander�vsplit�vstack�alltrue�arccosh�arcsinh�arctan2�arctanh�argsort�asarray�average�cumprod�ediff1d�extract�fftfreq�flatten�generic�greater�hamming�hanning�indices�itemset�lexsort�loadtxt�maximum�minimum�ndindex�newaxis�nonzero�pkgload�poisson�polyadd�polyder�polydiv�polyfit�polyint�polymul�polysub�polyval�product�putmask�randint�require�reshape�savetxt�shuffle�signbit�squeeze�uniform�union1d�weibull�absolute�allclose�alterdot�argwhere�asfarray�asmatrix�asscalar�bartlett�bincount�binomial�blackman�byteswap�can_cast�compress�convolve�corrcoef�diagflat�diagonal�digitize�fftshift�fromfile�fromiter�getfield�gradient�identity�isfinite�isneginf�isposinf�isscalar�issctype�iterable�linspace�logspace�meshgrid�multiply�negative�recarray�rollaxis�setfield�setflags�setxor1d�sometrue�subtract�swapaxes�tostring�typeDict�typename�unique1d�vonmises�	array_str�	base_repr�	broadcast�	conjugate�	correlate�	deprecate�	getbuffer�	geterrobj�	histogram�	index_exp�	iscomplex�	isfortran�	isrealobj�	nanargmax�	nanargmin�	newbuffer�	not_equal�	ones_like�	piecewise�	remainder�	row_stack�	setdiff1d�	seterrobj�	tensordot�	transpose�	vectorize�
accumulate�
array_repr�
arrayrange�
asanyarray�
atleast_1d�
atleast_2d�
atleast_3d�
bitwise_or�
cumproduct�
empty_like�
fromarrays�
frombuffer�
frompyfunc�
fromstring�
getbufsize�
geterrcall�
issubdtype�
left_shift�
less_equal�
logical_or�
nan_to_num�
obj2sctype�
reciprocal�
restoredot�
setbufsize�
seterrcall�
trim_zeros�
zeros_like�array_equal�array_equiv�array_split�binary_repr�bitwise_and�bitwise_not�bitwise_xor�byte_bounds�common_type�concatenate�expand_dims�flatnonzero�get_include�histogram2d�histogramdd�intersect1d�issubclass_�issubsctype�logical_and�logical_not�logical_xor�mintypecode�ndenumerate�permutation�right_shift�sctype2char�setmember1d�show_config�true_divide�array2string�column_stack�floor_divide�fromfunction�int_asbuffer�iscomplexobj�newbyteorder�searchsorted�sort_complex�
greater_equal�
random_sample�
real_if_close�
unravel_index�asfortranarray�get_array_wrap�intersect1d_nu�maximum_sctype�apply_over_axes�random_integers�set_numeric_ops�standard_normal�apply_along_axis�get_printoptions�may_share_memory�set_printoptions�asarray_chkfinite�ascontiguousarray�get_numpy_include�compare_chararrays�set_string_function�fastCopyAndTranspose�get_numarray_includec#�K�tj||�D]9\}}}|tur$||jvr|tj
|f���3|||f���;y�wr)r�get_tokens_unprocessedr�EXTRA_KEYWORDSrr�)rr��index�token�values     r:r�z!NumPyLexer.get_tokens_unprocessed�sX�����2�2�4��>�
 �E�5�%���}��$�*=�*=�!=��W�^�^�U�2�2��U�E�)�)�	?�s�AAc�H�|dd}t|d�xsd|vxr
d|vxsd|vS)Nr�r�r�zimport numpyzfrom numpy importr�)r��ltexts  r:r�zNumPyLexer.analyse_text�sD���U�d�����&<�=�#��U�"�J��5�(�H�,?�5�,H�	Jr<N)r~r|r�rwrer�r�r�r�r�r�r�r�r<r:r%r%Ps:����D�
�C��i�G��I��I�A�N�F*�Jr<r%)/rw�rer��pip._vendor.pygments.lexerrrrrrrr	r
rrr
r�pip._vendor.pygments.utilrr�pip._vendor.pygments.tokenrrrrrrrrrrrr�pip._vendor.pygmentsrr��__all__r�Python3Lexerr!r�rr �Python3TracebackLexerr"r#r$r%r�r<r:�<module>r�s����
��L�L�L�L�C�;�;�;�;�1�3��
A%�*�A%�H��[:�:�[:�z"�j�"�H,Q��,Q�\3�:�3�l-��-�J�-�`q�*�q�h`�j�`�F^J��^Jr<python3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-312.pyc000064400000034373151732703020025171 0ustar00�

R`ib/����dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZmZdd	d
�Zgd�ee�zee�zZiZiZd�Zd
�Zdd�Zd�Zd�Zd�Zdd�Zdd�Zdd�Zd�Zdd�Zd�Z d�Z!Gd�dejD�Z#ejHe%Z&e#e%�Z'e'jPjSe&jP�e'ejHe%<e'`'e'`&e'`e'`y)z�
    pygments.lexers
    ~~~~~~~~~~~~~~~

    Pygments lexers.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�basename)�LEXERS)�get_filetype_from_buffer)�find_plugin_lexers)�
ClassNotFound�guess_decode�PythonLexer�PythonTracebackLexer)�Python3Lexer�Python3TracebackLexer)�get_lexer_by_name�get_lexer_for_filename�find_lexer_class�guess_lexer�load_lexer_from_filec���|tvrBtjtj|��x}t|<|j|�St|j|�S)zBReturn whether the supplied file name fn matches pattern filename.)�_pattern_cache�re�compile�fnmatch�	translate�match)�fn�glob�patterns   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__init__.py�_fn_matchesr"sR���>�!�)+���G�4E�4E�d�4K�)L�L��.��&��}�}�R� � ��$��%�%�b�)�)�c��t|dddg�}|jD]!}t||�}|t|j<�#y)z0Load a lexer (and all others in the module too).N�__all__)�
__import__r �getattr�_lexer_cache�name)�module_name�mod�
lexer_name�clss    r�_load_lexersr)*s<��
�[�$��y�k�
:�C��k�k�
��c�:�&��!$��S�X�X��"rc#��K�tj�D]	}|dd���|r@t�D]2}|j|j|j
|jf���4yy�w)aReturn a generator of tuples in the form ``(name, aliases,
    filenames, mimetypes)`` of all know lexers.

    If *plugins* is true (the default), plugin lexers supplied by entrypoints
    are also returned.  Otherwise, only builtin ones are considered.
    �N)r�valuesrr$�aliases�	filenames�	mimetypes)�plugins�item�lexers   r�get_all_lexersr32sW�����
�
����1�2�h�� ��'�)�E��*�*�e�m�m�U�_�_�e�o�o�M�M�*��s�A$A&c���|tvr	t|Stj�D]#\}}}}}||k(s�t|�t|cSt	�D]}|j
|k(s�|cSy)zi
    Return the `Lexer` subclass that with the *name* attribute as given by
    the *name* argument.
    N)r#rr,r)rr$)r$r%�lnamer-�_r(s      rrr@sl��
�|���D�!�!�-3�]�]�_�)��U�G�Q���5�=���%���%�%�.=�
"�#���8�8�t���J�$rc�:�|std|z��tj�D]8\}}}}}|j�|vs�|tvrt|�t|cSt
�D]"}|j�|jvs� |cStd|z��)a$
    Return the `Lexer` subclass that has `alias` in its aliases list, without
    instantiating it.

    Like `get_lexer_by_name`, but does not instantiate the class.

    Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is
    found.

    .. versionadded:: 2.2
    �no lexer for alias %r found�rrr,�lowerr#r)rr-)�_aliasr%r$r-r6r(s      r�find_lexer_class_by_namer<Rs�����9�F�B�C�C�,2�M�M�O�(��T�7�A�q��<�<�>�W�$��<�'��[�)���%�%�	-<�"�#���<�<�>�S�[�[�(��J�$��5��>�
?�?rc�P�|std|z��tj�D]=\}}}}}|j�|vs�|tvrt|�t	|di|��cSt
�D](}|j�|jvs� |di|��cStd|z��)z�
    Return an instance of a `Lexer` subclass that has `alias` in its
    aliases list. The lexer is given the `options` at its
    instantiation.

    Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is
    found.
    r8�r9)r;�optionsr%r$r-r6r(s       rr
r
ms�����9�F�B�C�C�-3�M�M�O�(��T�7�A�q��<�<�>�W�$��<�'��[�)���%�0��0�0�	-<�"�#���<�<�>�S�[�[�(��>��>�!�$��5��>�
?�?rc�L�	i}t|d�5}t|j�|�ddd�||vrtd|�d|����||}|di|��S#1swY�+xYw#t$r}td|�d|����d}~wt$r�t
$r}td|z��d}~wwxYw)	aLoad a lexer from a file.

    This method expects a file located relative to the current working
    directory, which contains a Lexer class. By default, it expects the
    Lexer to be name CustomLexer; you can specify your own class name
    as the second argument to this function.

    Users should be very careful with the input, because this method
    is equivalent to running eval on the input file.

    Raises ClassNotFound if there are any problems importing the Lexer.

    .. versionadded:: 2.2
    �rbNz	no valid z class found in zcannot read z: z#error when loading custom lexer: %sr>)�open�exec�readr�OSError�	Exception)�filename�	lexernamer?�custom_namespace�f�lexer_class�errs       rrr�s���I���
�(�D�
!�Q������+�,�"��,�,��!*�H�!6�7�
7�&�y�1���%�W�%�%�"�
!���D��H�c�B�C�C����
��I��A�C�G�H�H��I�s9�A!�A�)A!�A�A!�!	B#�*A;�;B#�B�B#c����g}t|�}tj�D]I\}}}}}|D]<}t||�s�|tvrt|�|j
t||f��>�Kt�D]3}	|	jD]"}t||�s�|j
|	|f��$�5t�t�rt����fd�}
|r|j|
��|ddSy)z�Get a lexer for a filename.

    If multiple lexers match the filename pattern, use ``analyse_text()`` to
    figure out which one is more appropriate.

    Returns None if not found.
    c���|\}}d|vxrdxsd}�r |j��|z|jfS|j|z|jfS)N�*g�?r)�analyse_text�__name__�priority)�infor(rG�bonus�codes    �r�
get_ratingz1find_lexer_class_for_filename.<locals>.get_rating�s\����
��X��8�#�+��0�q��
��#�#�D�)�E�1�3�<�<�?�?��|�|�e�#�S�\�\�1�1r��key���rN)
rrr,rr#r)�appendrr.�
isinstance�bytesr�sort)�_fnrU�matchesr�modnamer$r6r.rGr(rVs `         r�find_lexer_class_for_filenamera�s�����G�	�#��B�*0�-�-�/�&���q�)�Q�!�H��2�x�(��|�+� ��)�����T� 2�H�=�>�	"�+:�"�#���
�
�H��2�x�(�����X��/�&�$�
�$����D�!��
2�������$��r�{�1�~��rc�J�t||�}|std|z��|di|��S)a�Get a lexer for a filename.

    Return a `Lexer` subclass instance that has a filename pattern
    matching `fn`. The lexer is given the `options` at its
    instantiation.

    Raise :exc:`pygments.util.ClassNotFound` if no lexer for that filename
    is found.

    If multiple lexers match the filename pattern, use their ``analyse_text()``
    methods to figure out which one is more appropriate.
    �no lexer for filename %r foundr>)rar)r^rUr?�ress    rrr�s0��(��T�
2�C���<�s�B�C�C��>��>�rc��tj�D]/\}}}}}||vs�|tvrt|�t|di|��cSt	�D]}||j
vs�|di|��cSt
d|z��)z�
    Return a `Lexer` subclass instance that has `mime` in its mimetype
    list. The lexer is given the `options` at its instantiation.

    Will raise :exc:`pygments.util.ClassNotFound` if not lexer for that mimetype
    is found.
    zno lexer for mimetype %r foundr>)rr,r#r)rr/r)�_mimer?r`r$r6r/r(s       r�get_lexer_for_mimetyperg�s���+1�-�-�/�&���q�!�Y��I���<�'��W�%���%�0��0�0�	+:�
"�#���C�M�M�!��>��>�!�$��8�5�@�
A�Arc#�K�tt�D]/}t|dd\}}|tvrt|�t|���1|rt	�Ed{���yy7��w)z*Return an iterator over all lexer classes.N�)�sortedrr#r)r)r0rXr%r$s    r�_iter_lexerclassesrk�s\�����f�~��"�3�K���O���T��|�#���%��4� � �	�
�%�'�'�'��'�s�AA�A�Ac�J�
�t|�}i�
t�}t�D]j}|jD]%}t	||�s�|j|�d�
|<�'|jD]%}t	||�s�|j|�d�
|<�'�l|std|z��t|�dk(r|j�d	i|��Sg}|D]5}|j|�}|dk(r
|d	i|��cS|j||f��7�
fd�}	|j|	��|ddd	i|��S)
a

    As :func:`guess_lexer()`, but only lexers which have a pattern in `filenames`
    or `alias_filenames` that matches `filename` are taken into consideration.

    :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can
    handle the content.
    TFrcr+��?c�V��|d�|d|dj|djfS�Nrr+)rRrQ)�t�primarys �r�	type_sortz+guess_lexer_for_filename.<locals>.type_sort$s0����!��g�a��d�m�Q�q�T�]�]�A�a�D�M�M�B�BrrWrYr>)
r�setrkr.r�add�alias_filenamesr�len�poprPrZr])r^�_textr?r�matching_lexersr2rG�result�rvrrrqs          @r�guess_lexer_for_filenamer|s7���
�#��B��G��e�O�#�%�����H��2�x�(��#�#�E�*�!%����(��-�-�H��2�x�(��#�#�E�*�!&����.�&���<�r�A�B�B�
�?��q� �$��"�"�$�/�w�/�/�
�F� ��
�
�
��
&��
��9��#�7�#�#��
�
�r�5�k�"�	!�C��K�K�I�K���6�"�:�a�=�#�7�#�#rc���t|t�sG|jd|jd��}|r|j|xsd�}nt	|�\}}t|�}|�
	t
|fi|��Sddg}t�D]2}|j|�}|dk(r
|d
i|��cS||dkDs�,||f|dd�4|dr|d�td	��|dd
i|��S#t$rY�nwxYw)a�
    Return a `Lexer` subclass instance that's guessed from the text in
    `text`. For that, the :meth:`.analyse_text()` method of every known lexer
    class is called with the text as argument, and the lexer which returned the
    highest value will be instantiated and returned.

    :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can
    handle the content.
    �
inencoding�encoding�utf8Ngrmrr+z no lexer matching the text foundr>)
r[�str�get�decoderrr
rrkrP)rxr?r~r6�ft�
best_lexerr2r{s        rrr0s
���e�S�!��[�[��w�{�{�:�/F�G�
���L�L��!5�v�6�E�#�E�*�H�E�1�
"�%�	(�B�	�~�	�$�R�3�7�3�3��t��J�#�%��
�
�
��
&��
��9��#�7�#�#�
�
�1�
����K�J�q�M�&��a�=�J�q�M�1��>�?�?��:�a�=�#�7�#�#���	��	�s�&C�	C!� C!c��eZdZdZd�Zy)�_automodulezAutomatically import lexers.c���tj|�}|r)t|d�t|d}t	|||�|S|t
vrt
|t
|�St|��ro)rr�r)r#�setattr�COMPATr"�AttributeError)�selfr$rSr(s    r�__getattr__z_automodule.__getattr__Zsa���z�z�$������a��!��t�A�w�'�C��D�$��$��J��6�>��4����.�.��T�"�"rN)rQ�
__module__�__qualname__�__doc__r�r>rrr�r�Ws
��&�	#rr�)T)�CustomLexer)N)*r�r�sys�typesr�os.pathr�$pip._vendor.pygments.lexers._mappingr�pip._vendor.pygments.modeliner�pip._vendor.pygments.pluginr�pip._vendor.pygments.utilrrr��listr r#rrr)r3rr<r
rrarrgrkr|r�
ModuleTyper��modulesrQ�oldmod�newmod�__dict__�updater>rr�<module>r�s���
�
����7�B�:�A�"�3�
��
2�48��L�A�CG��<�P������*�%�N��$@�6@�2 I�F(�V�&B�&(�($�V$$�N#�%�"�"�#�

���X�	��	�X�	�������v���'�����H��
�M�6�=�&�*�f�lrpython3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-312.pyc000064400000175705151732703020025231 0ustar00�

R`iY���idd�dd�dd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�id"d#�d$d%�d&d'�d(d)�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC��idDdE�dFdG�dHdI�dJdK�dLdM�dNdO�dPdQ�dRdS�dTdU�dVdW�dXdY�dZd[�d\d]�d^d_�d`da�dbdc�ddde��idfdg�dhdi�djdk�dldm�dndo�dpdq�drds�dtdu�dvdw�dxdy�dzd{�d|d}�d~d�d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dÓd�dœd�dǓd�dɓd�d˓�id�d͓d�dϓd�dѓd�dӓd�dՓd�dדd�dٓd�dۓd�dݓd�dߓd�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d��d�d��d�d��d�d��d�d��d�d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��i�d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��i�dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��i�dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�i�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���i�d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��i�dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��i�dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�i�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��i�d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��i�dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��i�dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�i�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���i�d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?���d@�dA�dB�dC�dD�dE�dF�dG�dH�dI�dJ�
�Z�yK(L�	ABAPLexer)�$pip._vendor.pygments.lexers.business�ABAP)�abap)z*.abapz*.ABAP)ztext/x-abap�AMDGPULexer)z"pip._vendor.pygments.lexers.amdgpu�AMDGPU)�amdgpu)z*.isa��APLLexer)zpip._vendor.pygments.lexers.apl�APL)�apl)z*.aplz*.aplfz*.aploz*.aplnz*.aplcz*.apliz*.dyalogr	�	AbnfLexer)�,pip._vendor.pygments.lexers.grammar_notation�ABNF)�abnf)z*.abnf)ztext/x-abnf�ActionScript3Lexer)�(pip._vendor.pygments.lexers.actionscriptzActionScript 3)�
actionscript3�as3�z*.as)zapplication/x-actionscript3ztext/x-actionscript3ztext/actionscript3�ActionScriptLexer)r�ActionScript)�actionscript�asr)zapplication/x-actionscriptztext/x-actionscriptztext/actionscript�AdaLexer)zpip._vendor.pygments.lexers.ada�Ada)�ada�ada95�ada2005)z*.adbz*.adsz*.ada)z
text/x-ada�AdlLexer)�%pip._vendor.pygments.lexers.archetype�ADL)�adl)z*.adlz*.adlsz*.adlfz*.adlxr	�	AgdaLexer)�#pip._vendor.pygments.lexers.haskell�Agda)�agda)z*.agda)ztext/x-agda�
AheuiLexer)�$pip._vendor.pygments.lexers.esoteric�Aheui)�aheui)z*.aheuir	�
AlloyLexer)� pip._vendor.pygments.lexers.dsls�Alloy)�alloy)z*.als)ztext/x-alloy�AmbientTalkLexer)z#pip._vendor.pygments.lexers.ambient�AmbientTalk)�ambienttalkz
ambienttalk/2�at)z*.at)ztext/x-ambienttalk�	AmplLexer)z pip._vendor.pygments.lexers.ampl�Ampl)�ampl)z*.runr	�Angular2HtmlLexer)�%pip._vendor.pygments.lexers.templateszHTML + Angular2)zhtml+ng2)z*.ng2r	�
Angular2Lexer)r7�Angular2)�ng2r	r	�AntlrActionScriptLexer)�#pip._vendor.pygments.lexers.parserszANTLR With ActionScript Target)zantlr-actionscriptzantlr-as�z*.G�*.gr	�AntlrCSharpLexer)r<zANTLR With C# Target)zantlr-csharpzantlr-c#r=r	�
AntlrCppLexer)r<zANTLR With CPP Target)z	antlr-cppr=r	�AntlrJavaLexer)r<zANTLR With Java Target)z
antlr-javar=r	�
AntlrLexer)r<�ANTLR)�antlrr	r	�AntlrObjectiveCLexer)r<zANTLR With ObjectiveC Target)z
antlr-objcr=r	�AntlrPerlLexer)r<zANTLR With Perl Target)z
antlr-perlr=r	�AntlrPythonLexer)r<zANTLR With Python Target)zantlr-pythonr=r	�AntlrRubyLexer)r<zANTLR With Ruby Target)z
antlr-rubyzantlr-rbr=r	�ApacheConfLexer)�#pip._vendor.pygments.lexers.configs�
ApacheConf)�
apacheconf�aconf�apache)z	.htaccesszapache.confzapache2.conf)ztext/x-apacheconf�AppleScriptLexer)�%pip._vendor.pygments.lexers.scripting�AppleScript)�applescript)z
*.applescriptr	�ArduinoLexer)�"pip._vendor.pygments.lexers.c_like�Arduino)�arduino)z*.ino)ztext/x-arduino�
ArrowLexer)z!pip._vendor.pygments.lexers.arrow�Arrow)�arrow)z*.arwr	�ArturoLexer)z"pip._vendor.pygments.lexers.arturo�Arturo)�arturo�art)z*.artr	�AscLexer)zpip._vendor.pygments.lexers.ascz
ASCII armored)�asc�pem)z*.ascz*.pem�id_dsa�id_ecdsa�id_ecdsa_sk�
id_ed25519�
id_ed25519_sk�id_rsa)zapplication/pgp-keyszapplication/pgp-encryptedzapplication/pgp-signature�AspectJLexer)�pip._vendor.pygments.lexers.jvm�AspectJ)�aspectj)z*.aj)ztext/x-aspectj�AsymptoteLexer)�$pip._vendor.pygments.lexers.graphics�	Asymptote)�	asymptote�asy)z*.asy)ztext/x-asymptote�AugeasLexer)rJ�Augeas)�augeas)z*.augr	�AutoItLexer)�&pip._vendor.pygments.lexers.automation�AutoIt)�autoit)z*.au3)z
text/x-autoit�AutohotkeyLexer)rt�
autohotkey)rx�ahk)z*.ahkz*.ahkl)ztext/x-autohotkey�AwkLexer)�$pip._vendor.pygments.lexers.textedit�Awk)�awk�gawk�mawk�nawk)z*.awk)zapplication/x-awk�
BBCBasicLexer)�!pip._vendor.pygments.lexers.basicz	BBC Basic)�bbcbasic)z*.bbcr	�BBCodeLexer)�"pip._vendor.pygments.lexers.markup�BBCode)�bbcoder	)z
text/x-bbcode�BCLexer)�#pip._vendor.pygments.lexers.algebra�BC)�bc)z*.bcr	�BSTLexer)�"pip._vendor.pygments.lexers.bibtex�BST)�bstz
bst-pybtex)z*.bstr	�	BareLexer)z pip._vendor.pygments.lexers.bare�BARE)�bare)z*.barer	�BaseMakefileLexer)� pip._vendor.pygments.lexers.makez
Base Makefile)�basemaker	r	�	BashLexer)�!pip._vendor.pygments.lexers.shell�Bash)�bash�sh�ksh�zsh�shell)z*.shz*.kshz*.bashz*.ebuildz*.eclassz*.exheres-0z*.exlibz*.zshz.bashrc�bashrcz.bash_*zbash_*�zshrcz.zshrcz.kshrc�kshrc�PKGBUILD)zapplication/x-shzapplication/x-shellscriptztext/x-shellscript�BashSessionLexer)r�zBash Session)�consolez
shell-session)z*.sh-sessionz*.shell-session)zapplication/x-shell-sessionzapplication/x-sh-session�
BatchLexer)r��	Batchfile)�batch�bat�dosbatch�winbatch)z*.batz*.cmd)zapplication/x-dos-batch�BddLexer)zpip._vendor.pygments.lexers.bdd�Bdd)�bdd�z	*.feature)z
text/x-bdd�BefungeLexer)r(�Befunge)�befunge)z	*.befunge)zapplication/x-befunge�
BerryLexer)z!pip._vendor.pygments.lexers.berry�Berry)�berry�be)z*.be)ztext/x-berryzapplication/x-berry�BibTeXLexer)r��BibTeX)�bibtex�bib)z*.bib)z
text/x-bibtex�BlitzBasicLexer)r��
BlitzBasic)�
blitzbasic�b3d�bplus)z*.bbz*.decls)z	text/x-bb�
BlitzMaxLexer)r��BlitzMax)�blitzmax�bmax)z*.bmx)z
text/x-bmx�BnfLexer)r�BNF)�bnf)z*.bnf)z
text/x-bnf�BoaLexer)zpip._vendor.pygments.lexers.boa�Boa)�boa)z*.boar	�BooLexer)�"pip._vendor.pygments.lexers.dotnet�Boo)�boo)z*.boo)z
text/x-boo�BoogieLexer)�(pip._vendor.pygments.lexers.verification�Boogie)�boogie)z*.bplr	�BrainfuckLexer)r(�	Brainfuck)�	brainfuck�bf)z*.bf�*.b)zapplication/x-brainfuck�	BugsLexer)�$pip._vendor.pygments.lexers.modeling�BUGS)�bugs�winbugs�openbugs)�*.bugr	�CAmkESLexer)r(�CAmkES)�camkes�idl4)z*.camkesz*.idl4r	�CLexer)�!pip._vendor.pygments.lexers.c_cpp�C)�c)z*.c�*.hz*.idcz*.x[bp]m)ztext/x-chdrztext/x-csrczimage/x-xbitmapzimage/x-xpixmap�
CMakeLexer)r��CMake)�cmake)z*.cmakezCMakeLists.txt)ztext/x-cmake�
CObjdumpLexer)�pip._vendor.pygments.lexers.asm�	c-objdump)r�)z*.c-objdump)ztext/x-c-objdump�	CPSALexer)� pip._vendor.pygments.lexers.lisp�CPSA)�cpsa)z*.cpsar	�CSSUL4Lexer)�pip._vendor.pygments.lexers.ul4zCSS+UL4)zcss+ul4)z*.cssul4r	�CSharpAspxLexer)r��aspx-cs)r��z*.aspxz*.asaxz*.ascxz*.ashxz*.asmxz*.axdr	�CSharpLexer)r�zC#)�csharpzc#�cs)z*.cs)z
text/x-csharp�	Ca65Lexer)r�zca65 assembler)�ca65)�*.sr	�	CadlLexer)r �cADL)�cadl)z*.cadlr	�
CapDLLexer)r(�CapDL)�capdl)z*.cdlr	�CapnProtoLexer)z%pip._vendor.pygments.lexers.capnprotozCap'n Proto)�capnp)z*.capnpr	�CarbonLexer)z"pip._vendor.pygments.lexers.carbon�Carbon)�carbon)z*.carbon)z
text/x-carbon�CbmBasicV2Lexer)r�zCBM BASIC V2)�cbmbas)�*.basr	�	CddlLexer)z pip._vendor.pygments.lexers.cddl�CDDL)�cddl)z*.cddl)ztext/x-cddl�CeylonLexer)rh�Ceylon)�ceylon)z*.ceylon)z
text/x-ceylon�Cfengine3Lexer)rJ�	CFEngine3)�	cfengine3�cf3)z*.cfr	�ChaiscriptLexer)rP�
ChaiScript)�
chaiscript�chai)z*.chai)ztext/x-chaiscriptzapplication/x-chaiscript�ChapelLexer)z"pip._vendor.pygments.lexers.chapel�Chapel)�chapel�chpl)z*.chplr	�CharmciLexer)rT�Charmci)�charmci)z*.cir	�CheetahHtmlLexer)r7zHTML+Cheetah)zhtml+cheetahz
html+spitfire�htmlcheetahr	)ztext/html+cheetahztext/html+spitfire�CheetahJavascriptLexer)r7zJavaScript+Cheetah)zjavascript+cheetahz
js+cheetahzjavascript+spitfirezjs+spitfirer	)z application/x-javascript+cheetahztext/x-javascript+cheetahztext/javascript+cheetahz!application/x-javascript+spitfireztext/x-javascript+spitfireztext/javascript+spitfire�CheetahLexer)r7�Cheetah)�cheetah�spitfire)z*.tmplz*.spt)zapplication/x-cheetahzapplication/x-spitfire�CheetahXmlLexer)r7zXML+Cheetah)zxml+cheetahzxml+spitfirer	)zapplication/xml+cheetahzapplication/xml+spitfire�
CirruLexer)�#pip._vendor.pygments.lexers.webmisc�Cirru)�cirru)z*.cirru)ztext/x-cirru�	ClayLexer)rT�Clay)�clay)z*.clay)ztext/x-clay�
CleanLexer)z!pip._vendor.pygments.lexers.clean�Clean)�clean)z*.iclz*.dclr	�ClojureLexer)rh�Clojure)�clojure�clj)z*.cljz*.cljc)ztext/x-clojurezapplication/x-clojure�ClojureScriptLexer)rh�
ClojureScript)�
clojurescript�cljs)z*.cljs)ztext/x-clojurescriptzapplication/x-clojurescript�CobolFreeformatLexer)r�	COBOLFree)�	cobolfree)z*.cblz*.CBLr	�
CobolLexer)r�COBOL)�cobol)z*.cobz*.COBz*.cpyz*.CPY)ztext/x-cobol�CoffeeScriptLexer)�&pip._vendor.pygments.lexers.javascript�CoffeeScript)�coffeescriptz
coffee-script�coffee)z*.coffee)ztext/coffeescript�ColdfusionCFCLexer)r7zColdfusion CFC)�cfc)z*.cfcr	�ColdfusionHtmlLexer)r7zColdfusion HTML)�cfm)z*.cfmz*.cfml)zapplication/x-coldfusion�ColdfusionLexer)r7�cfstatement)�cfsr	r	�Comal80Lexer)z!pip._vendor.pygments.lexers.comalzCOMAL-80)�comal�comal80)z*.cmlz*.comalr	�CommonLispLexer)r�zCommon Lisp)zcommon-lisp�cl�lisp)z*.clz*.lisp)ztext/x-common-lisp�ComponentPascalLexer)z"pip._vendor.pygments.lexers.oberonzComponent Pascal)�componentpascal�cp)�*.cpz*.cps)ztext/x-component-pascal�CoqLexer)�#pip._vendor.pygments.lexers.theorem�Coq)�coq�z*.v)z
text/x-coq�CplintLexer)z"pip._vendor.pygments.lexers.cplint�cplint)rY)�*.ecl�*.prolog�*.pro�*.plz*.Pz*.lpadz*.cpl)z
text/x-cplint�CppLexer)r�zC++)�cppzc++)
z*.cppz*.hppz*.c++z*.h++z*.cc�*.hhz*.cxxz*.hxxz*.Cz*.HrRz*.CPPz*.tpp)z
text/x-c++hdrz
text/x-c++src�CppObjdumpLexer)r��cpp-objdump)rbzc++-objdumbzcxx-objdump)z
*.cpp-objdumpz
*.c++-objdumpz
*.cxx-objdump)ztext/x-cpp-objdump�
CrmshLexer)r,�Crmsh)�crmsh�pcmk)z*.crmshz*.pcmkr	�	CrocLexer)�pip._vendor.pygments.lexers.d�Croc)�croc)z*.croc)ztext/x-crocsrc�CryptolLexer)r$�Cryptol)�cryptol�cry)z*.cry)ztext/x-cryptol�CrystalLexer)z#pip._vendor.pygments.lexers.crystal�Crystal)�cr�crystal)z*.cr)ztext/x-crystal�CsoundDocumentLexer)�"pip._vendor.pygments.lexers.csoundzCsound Document)zcsound-documentz
csound-csd)z*.csdr	�CsoundOrchestraLexer)rtzCsound Orchestra)�csoundz
csound-orc)z*.orcz*.udor	�CsoundScoreLexer)rtzCsound Score)zcsound-scorez
csound-sco)z*.scor	�CssDjangoLexer)r7zCSS+Django/Jinja)z
css+djangoz	css+jinja)z*.css.j2z*.css.jinja2)ztext/css+djangoztext/css+jinja�CssErbLexer)r7zCSS+Ruby)zcss+rubyzcss+erbr	)z
text/css+ruby�CssGenshiLexer)r7zCSS+Genshi Text)zcss+genshitextz
css+genshir	)ztext/css+genshi�CssLexer)�pip._vendor.pygments.lexers.css�CSS)�css)z*.css)ztext/css�CssPhpLexer)r7zCSS+PHP)zcss+phpr	)ztext/css+php�CssSmartyLexer)r7z
CSS+Smarty)z
css+smartyr	)ztext/css+smarty�	CudaLexer)rT�CUDA)�cuda�cu)z*.cuz*.cuh)ztext/x-cuda�CypherLexer)z!pip._vendor.pygments.lexers.graph�Cypher)�cypher)z*.cypz*.cypherr	�CythonLexer)�"pip._vendor.pygments.lexers.python�Cython)�cython�pyx�pyrex)z*.pyxz*.pxdz*.pxi)z
text/x-cythonzapplication/x-cython�DLexer)rh�D)�d)z*.dz*.di)ztext/x-dsrc�
DObjdumpLexer)r��	d-objdump)r�)z*.d-objdump)ztext/x-d-objdump�DarcsPatchLexer)� pip._vendor.pygments.lexers.diffzDarcs Patch)�dpatch)z*.dpatchz*.darcspatchr	�	DartLexer)r>�Dart)�dart)z*.dart)ztext/x-dart�Dasm16Lexer)r��DASM16)�dasm16)z*.dasm16z*.dasm)z
text/x-dasm16�DaxLexer)zpip._vendor.pygments.lexers.dax�Dax)�dax)z*.daxr	�DebianControlLexer)�&pip._vendor.pygments.lexers.installerszDebian Control file)�
debcontrol�control)r�r	�DelphiLexer)�"pip._vendor.pygments.lexers.pascal�Delphi)�delphi�pas�pascal�objectpascal)z*.pasz*.dpr)z
text/x-pascal�DevicetreeLexer)z&pip._vendor.pygments.lexers.devicetree�
Devicetree)�
devicetree�dts)z*.dtsz*.dtsi)ztext/x-c�DgLexer)r��dg)r�)z*.dg)z	text/x-dg�	DiffLexer)r��Diff)�diff�udiff)z*.diffz*.patch)ztext/x-diffztext/x-patch�DjangoLexer)r7zDjango/Jinja)�django�jinjar	)zapplication/x-django-templatingzapplication/x-jinja�DockerLexer)rJ�Docker)�docker�
dockerfile)�
Dockerfilez*.docker)ztext/x-dockerfile-config�DtdLexer)� pip._vendor.pygments.lexers.html�DTD)�dtd)z*.dtd)zapplication/xml-dtd�	DuelLexer)r&�Duel)�duel�jbstz
jsonml+bst)z*.duelz*.jbst)ztext/x-duelztext/x-jbst�DylanConsoleLexer)�!pip._vendor.pygments.lexers.dylanz
Dylan session)z
dylan-consolez
dylan-repl)z*.dylan-console)ztext/x-dylan-console�
DylanLexer)r��Dylan)�dylan)z*.dylanz*.dylz*.intr)ztext/x-dylan�
DylanLidLexer)r��DylanLID)z	dylan-lid�lid)z*.lidz*.hdp)ztext/x-dylan-lid�ECLLexer)zpip._vendor.pygments.lexers.ecl�ECL)�ecl)rZ)zapplication/x-ecl�ECLexer)rT�eC)�ec)z*.ecz*.eh)ztext/x-echdrztext/x-ecsrc�
EarlGreyLexer)r>z	Earl Grey)z	earl-grey�earlgrey�eg)z*.eg)ztext/x-earl-grey�EasytrieveLexer)rP�
Easytrieve)�
easytrieve)z*.ezt�*.mac)ztext/x-easytrieve�	EbnfLexer)r<�EBNF)�ebnf)z*.ebnf)ztext/x-ebnf�EiffelLexer)z"pip._vendor.pygments.lexers.eiffel�Eiffel)�eiffel)z*.e)z
text/x-eiffel�ElixirConsoleLexer)�"pip._vendor.pygments.lexers.erlangzElixir iex session)�iexr	)ztext/x-elixir-shellsession�ElixirLexer)r��Elixir)�elixir�ex�exs)z*.exz*.eexz*.exsz*.leex)z
text/x-elixir�ElmLexer)zpip._vendor.pygments.lexers.elm�Elm)�elm)z*.elm)z
text/x-elm�	ElpiLexer)z pip._vendor.pygments.lexers.elpi�Elpi)�elpi)z*.elpi)ztext/x-elpi�EmacsLispLexer)r��	EmacsLisp)z
emacs-lisp�elisp�emacs)z*.el)ztext/x-elispzapplication/x-elisp�
EmailLexer)z!pip._vendor.pygments.lexers.emailzE-mail)�email�eml)z*.eml)zmessage/rfc822�ErbLexer)r7�ERB)�erbr	)zapplication/x-ruby-templating�ErlangLexer)r��Erlang)�erlang)z*.erlz*.hrlz*.esz	*.escript)z
text/x-erlang�ErlangShellLexer)r�zErlang erl session)�erl)z*.erl-sh)ztext/x-erl-shellsession�EvoqueHtmlLexer)r7zHTML+Evoque)zhtml+evoque)�*.html)ztext/html+evoque�EvoqueLexer)r7�Evoque)�evoque)z*.evoque)zapplication/x-evoque�EvoqueXmlLexer)r7z
XML+Evoque)z
xml+evoque)�*.xml)zapplication/xml+evoque�
ExeclineLexer)r��execline)r)z*.execr	�
EzhilLexer)z!pip._vendor.pygments.lexers.ezhil�Ezhil)�ezhil�z*.n)ztext/x-ezhil�FSharpLexer)r�zF#)�fsharpzf#)�*.fsz*.fsiz*.fsx)z
text/x-fsharp�
FStarLexer)�pip._vendor.pygments.lexers.ml�FStar)�fstar)z*.fstz*.fsti)ztext/x-fstar�FactorLexer)z"pip._vendor.pygments.lexers.factor�Factor)�factor)z*.factor)z
text/x-factor�
FancyLexer)� pip._vendor.pygments.lexers.ruby�Fancy)�fancy�fy)z*.fyz*.fancypack)ztext/x-fancysrc�FantomLexer)z"pip._vendor.pygments.lexers.fantom�Fantom)�fan)z*.fan)zapplication/x-fantom�
FelixLexer)z!pip._vendor.pygments.lexers.felix�Felix)�felix�flx)z*.flxz*.flxh)ztext/x-felix�FennelLexer)r��Fennel)�fennel�fnl)z*.fnlr	�	FiftLexer)z pip._vendor.pygments.lexers.fift�Fift)�fift�fif)z*.fifr	�FishShellLexer)r��Fish)�fish�	fishshell)z*.fishz*.load)zapplication/x-fish�
FlatlineLexer)r,�Flatline)�flatliner	)ztext/x-flatline�FloScriptLexer)z%pip._vendor.pygments.lexers.floscript�	FloScript)�	floscript�flo)z*.flor	�
ForthLexer)z!pip._vendor.pygments.lexers.forth�Forth)�forth)z*.frtr)zapplication/x-forth�FortranFixedLexer)�#pip._vendor.pygments.lexers.fortran�FortranFixed)�fortranfixed)z*.fz*.Fr	�FortranLexer)r6�Fortran)�fortran�f90)z*.f03z*.f90z*.F03z*.F90)ztext/x-fortran�FoxProLexer)z"pip._vendor.pygments.lexers.foxpro�FoxPro)�foxpro�vfp�clipper�xbase)z*.PRGz*.prgr	�FreeFemLexer)z#pip._vendor.pygments.lexers.freefem�Freefem)�freefem)z*.edp)ztext/x-freefem�	FuncLexer)z pip._vendor.pygments.lexers.func�FunC)�func�fc)z*.fcz*.funcr	�FutharkLexer)z#pip._vendor.pygments.lexers.futhark�Futhark)�futhark)z*.fut)ztext/x-futhark�GAPConsoleLexer)r�zGAP session)zgap-consolezgap-repl)�*.tstr	�GAPLexer)r��GAP)�gap)r>�*.gdz*.giz*.gapr	�
GDScriptLexer)z$pip._vendor.pygments.lexers.gdscript�GDScript)�gdscript�gd)rR)ztext/x-gdscriptzapplication/x-gdscript�
GLShaderLexer)rl�GLSL)�glsl)z*.vertz*.fragz*.geo)ztext/x-glslsrc�	GSQLLexer)z pip._vendor.pygments.lexers.gsql�GSQL)�gsql)z*.gsqlr	�GasLexer)r��GAS)�gas�asm)r��*.S)z
text/x-gas�
GcodeLexer)z&pip._vendor.pygments.lexers.gcodelexerzg-code)�gcode)z*.gcoder	�GenshiLexer)r7�Genshi)�genshi�kidz
xml+genshizxml+kid)z*.kid)zapplication/x-genshizapplication/x-kid�GenshiTextLexer)r7zGenshi Text)�
genshitextr	)zapplication/x-genshi-textz
text/x-genshi�GettextLexer)�$pip._vendor.pygments.lexers.textfmtszGettext Catalog)�pot�po)z*.potz*.po)zapplication/x-gettextztext/x-gettextztext/gettext�GherkinLexer)�#pip._vendor.pygments.lexers.testing�Gherkin)�gherkin�cucumberr�)ztext/x-gherkin�GnuplotLexer)rl�Gnuplot)�gnuplot)z*.plotz*.plt)ztext/x-gnuplot�GoLexer)zpip._vendor.pygments.lexers.go�Go)�go�golang)z*.go)ztext/x-gosrc�	GoloLexer)rh�Golo)�golo)z*.golor	�GoodDataCLLexer)rzGoodData-CL)zgooddata-cl)z*.gdc)ztext/x-gooddata-cl�	GosuLexer)rh�Gosu)�gosu)z*.gsz*.gsxz*.gspz*.vark)ztext/x-gosu�GosuTemplateLexer)rhz
Gosu Template)�gst)z*.gst)ztext/x-gosu-template�
GraphvizLexer)z$pip._vendor.pygments.lexers.graphviz�Graphviz)�graphviz�dot)z*.gvz*.dot)ztext/x-graphvizztext/vnd.graphviz�
GroffLexer)r��Groff)�groff�nroff�man)z*.[1-9]z*.manz*.1pz*.3pm)zapplication/x-troffz
text/troff�GroovyLexer)rh�Groovy)�groovy)z*.groovyz*.gradle)z
text/x-groovy�HLSLShaderLexer)rl�HLSL)�hlsl)z*.hlslz*.hlsli)ztext/x-hlsl�HTMLUL4Lexer)r�zHTML+UL4)zhtml+ul4)z	*.htmlul4r	�	HamlLexer)r��Haml)�haml)z*.haml)ztext/x-haml�HandlebarsHtmlLexer)r7zHTML+Handlebars)zhtml+handlebars)z*.handlebarsz*.hbs)ztext/html+handlebarsztext/x-handlebars-template�HandlebarsLexer)r7�
Handlebars)�
handlebarsr	r	�HaskellLexer)r$�Haskell)�haskell�hs)z*.hs)ztext/x-haskell�	HaxeLexer)� pip._vendor.pygments.lexers.haxe�Haxe)�haxe�hxsl�hx)z*.hxz*.hxsl)z	text/haxeztext/x-haxez	text/x-hx�HexdumpLexer)z#pip._vendor.pygments.lexers.hexdump�Hexdump)�hexdumpr	r	�
HsailLexer)r��HSAIL)�hsail�hsa)z*.hsail)ztext/x-hsail�
HspecLexer)r$�Hspec)�hspec)z*Spec.hsr	�HtmlDjangoLexer)r7zHTML+Django/Jinja)zhtml+djangoz
html+jinja�
htmldjango)z	*.html.j2z*.htm.j2z
*.xhtml.j2z
*.html.jinja2z*.htm.jinja2z*.xhtml.jinja2)ztext/html+djangoztext/html+jinja�HtmlGenshiLexer)r7zHTML+Genshi)zhtml+genshizhtml+kidr	)ztext/html+genshi�	HtmlLexer)r��HTML)�html)r�z*.htmz*.xhtml�*.xslt)z	text/htmlzapplication/xhtml+xml�HtmlPhpLexer)r7zHTML+PHP)zhtml+php)z*.phtml)zapplication/x-phpzapplication/x-httpd-phpzapplication/x-httpd-php3zapplication/x-httpd-php4zapplication/x-httpd-php5�HtmlSmartyLexer)r7zHTML+Smarty)zhtml+smartyr	)ztext/html+smarty�	HttpLexer)rk�HTTP)�httpr	r	�	HxmlLexer)r��Hxml)�haxeml�hxml)z*.hxmlr	�HyLexer)r��Hy)�hylang)�*.hy)z	text/x-hyzapplication/x-hy�HybrisLexer)rP�Hybris)�hybris�hy)r�z*.hyb)z
text/x-hybriszapplication/x-hybris�IDLLexer)zpip._vendor.pygments.lexers.idl�IDL)�idl)r\)ztext/idl�	IconLexer)�"pip._vendor.pygments.lexers.unicon�Icon)�icon)z*.iconz*.ICONr	�
IdrisLexer)r$�Idris)�idris�idr)z*.idr)ztext/x-idris�	IgorLexer)z pip._vendor.pygments.lexers.igor�Igor)�igor�igorpro)z*.ipf)ztext/ipf�Inform6Lexer)�'pip._vendor.pygments.lexers.int_fictionzInform 6)�inform6�i6)�*.infr	�Inform6TemplateLexer)r�zInform 6 template)�i6t)z*.i6tr	�Inform7Lexer)r�zInform 7)�inform7�i7)z*.niz*.i7xr	�IniLexer)rJ�INI)�ini�cfg�dosini)z*.iniz*.cfgr�z
.editorconfigz	*.servicez*.socketz*.devicez*.mountz*.automountz*.swapz*.targetz*.pathz*.timerz*.slicez*.scope)z
text/x-iniztext/inf�IoLexer)z"pip._vendor.pygments.lexers.iolang�Io)�io)z*.io)ztext/x-iosrc�	IokeLexer)rh�Ioke)�ioke�ik)z*.ik)ztext/x-iokesrc�IrcLogsLexer)rkzIRC logs)�irc)z*.weechatlog)z
text/x-irclog�
IsabelleLexer)rT�Isabelle)�isabelle)z*.thy)ztext/x-isabelle�JLexer)zpip._vendor.pygments.lexers.j�J)�j)z*.ijs)ztext/x-j�
JMESPathLexer)z$pip._vendor.pygments.lexers.jmespath�JMESPath)�jmespath�jp)z*.jpr	�	JSLTLexer)z pip._vendor.pygments.lexers.jslt�JSLT)�jslt)z*.jslt)ztext/x-jslt�	JagsLexer)r��JAGS)�jags)z*.jagr�r	�JasminLexer)rh�Jasmin)�jasmin�jasminxt�z*.jr	�	JavaLexer)rh�Java)�java)z*.java)ztext/x-java�JavascriptDjangoLexer)r7zJavaScript+Django/Jinja)zjavascript+djangoz	js+djangozjavascript+jinjazjs+jinja)z*.js.j2z*.js.jinja2)zapplication/x-javascript+djangozapplication/x-javascript+jinjaztext/x-javascript+djangoztext/x-javascript+jinjaztext/javascript+djangoztext/javascript+jinja�JavascriptErbLexer)r7zJavaScript+Ruby)zjavascript+rubyzjs+rubyzjavascript+erbzjs+erbr	)zapplication/x-javascript+rubyztext/x-javascript+rubyztext/javascript+ruby�JavascriptGenshiLexer)r7zJavaScript+Genshi Text)z
js+genshitextz	js+genshizjavascript+genshitextzjavascript+genshir	)zapplication/x-javascript+genshiztext/x-javascript+genshiztext/javascript+genshi�JavascriptLexer)r>�
JavaScript)�
javascript�js)z*.jsz*.jsmz*.mjsz*.cjs)zapplication/javascriptzapplication/x-javascriptztext/x-javascriptztext/javascript�JavascriptPhpLexer)r7zJavaScript+PHP)zjavascript+phpzjs+phpr	)zapplication/x-javascript+phpztext/x-javascript+phpztext/javascript+php�JavascriptSmartyLexer)r7zJavaScript+Smarty)zjavascript+smartyz	js+smartyr	)zapplication/x-javascript+smartyztext/x-javascript+smartyztext/javascript+smarty�JavascriptUL4Lexer)r�zJavascript+UL4)zjs+ul4)z*.jsul4r	�JclLexer)rP�JCL)�jcl)z*.jcl)z
text/x-jcl�	JsgfLexer)r�JSGF)�jsgf)z*.jsgf)zapplication/jsgfzapplication/x-jsgfz	text/jsgf�JsonBareObjectLexer)� pip._vendor.pygments.lexers.data�JSONBareObjectr	r	r	�JsonLdLexer)rzJSON-LD)�jsonldzjson-ld)z*.jsonld)zapplication/ld+json�	JsonLexer)r�JSON)�jsonzjson-object)z*.jsonzPipfile.lock)zapplication/jsonzapplication/json-object�JsonnetLexer)z#pip._vendor.pygments.lexers.jsonnet�Jsonnet)�jsonnet)z	*.jsonnetz*.libsonnetr	�JspLexer)r7zJava Server Page)�jsp)z*.jsp)zapplication/x-jsp�JuliaConsoleLexer)�!pip._vendor.pygments.lexers.juliaz
Julia console)�jlconz
julia-replr	r	�
JuliaLexer)r#�Julia)�julia�jl)z*.jl)ztext/x-juliazapplication/x-julia�JuttleLexer)r>�Juttle)�juttle)z*.juttle)zapplication/juttlezapplication/x-juttlez
text/x-juttleztext/juttle�KLexer)�pip._vendor.pygments.lexers.q�K)�k)z*.kr	�KalLexer)r>�Kal)�kal)z*.kal)ztext/kalzapplication/kal�KconfigLexer)rJ�Kconfig)�kconfig�
menuconfigzlinux-configz
kernel-config)zKconfig*z*Config.in*zexternal.in*zstandard-modules.in)ztext/x-kconfig�KernelLogLexer)rkz
Kernel log)�kmsg�dmesg)z*.kmsgz*.dmesgr	�	KokaLexer)r$�Koka)�koka)z*.kkz*.kki)ztext/x-koka�KotlinLexer)rh�Kotlin)�kotlin)z*.ktz*.kts)z
text/x-kotlin�	KuinLexer)z pip._vendor.pygments.lexers.kuin�Kuin)�kuin)z*.knr	�LSLLexer)rP�LSL)�lsl)z*.lsl)z
text/x-lsl�
LassoCssLexer)r7z	CSS+Lasso)z	css+lassor	)ztext/css+lasso�LassoHtmlLexer)r7z
HTML+Lasso)z
html+lassor	)ztext/html+lassozapplication/x-httpd-lassozapplication/x-httpd-lasso[89]�LassoJavascriptLexer)r7zJavaScript+Lasso)zjavascript+lassozjs+lassor	)zapplication/x-javascript+lassoztext/x-javascript+lassoztext/javascript+lasso�
LassoLexer)r>�Lasso)�lasso�lassoscript)z*.lassoz*.lasso[89])ztext/x-lasso�
LassoXmlLexer)r7z	XML+Lasso)z	xml+lassor	)zapplication/xml+lasso�	LeanLexer)rT�Lean)�lean)z*.lean)ztext/x-lean�LessCssLexer)r|�LessCss)�less)z*.less)ztext/x-less-css�LighttpdConfLexer)rJzLighttpd configuration file)�lighttpd�lighty)z
lighttpd.conf)ztext/x-lighttpd-conf�
LilyPondLexer)z$pip._vendor.pygments.lexers.lilypond�LilyPond)�lilypond)z*.lyr	�
LimboLexer)z#pip._vendor.pygments.lexers.inferno�Limbo)�limbo)r�)z
text/limbo�LiquidLexer)r7�liquid)r^)z*.liquidr	�LiterateAgdaLexer)r$z
Literate Agda)z
literate-agda�lagda)z*.lagda)ztext/x-literate-agda�LiterateCryptolLexer)r$zLiterate Cryptol)zliterate-cryptol�lcryptol�lcry)z*.lcry)ztext/x-literate-cryptol�LiterateHaskellLexer)r$zLiterate Haskell)zliterate-haskell�lhaskell�lhs)z*.lhs)ztext/x-literate-haskell�LiterateIdrisLexer)r$zLiterate Idris)zliterate-idris�lidris�lidr)z*.lidr)ztext/x-literate-idris�LiveScriptLexer)r>�
LiveScript)�
livescriptzlive-script)z*.ls)ztext/livescript�	LlvmLexer)r��LLVM)�llvm)z*.ll)ztext/x-llvm�LlvmMirBodyLexer)r�z
LLVM-MIR Body)z
llvm-mir-bodyr	r	�LlvmMirLexer)r�zLLVM-MIR)zllvm-mir)z*.mirr	�
LogosLexer)�%pip._vendor.pygments.lexers.objective�Logos)�logos)z*.xz*.xiz*.xmz*.xmi)ztext/x-logos�LogtalkLexer)�"pip._vendor.pygments.lexers.prolog�Logtalk)�logtalk)z*.lgtz	*.logtalk)ztext/x-logtalk�LuaLexer)rP�Lua)�lua)z*.luaz*.wlua)z
text/x-luazapplication/x-lua�MCFunctionLexer)�%pip._vendor.pygments.lexers.minecraft�
MCFunction)�
mcfunction�mcf)z*.mcfunction)ztext/mcfunction�
MCSchemaLexer)r~�MCSchema)�mcschema)z
*.mcschema)z
text/mcschema�	MIMELexer)z pip._vendor.pygments.lexers.mime�MIME)�mimer	)zmultipart/mixedzmultipart/relatedzmultipart/alternative�	MIPSLexer)z pip._vendor.pygments.lexers.mips�MIPS)�mips)z*.mipsz*.MIPSr	�MOOCodeLexer)rP�MOOCode)�moocode�moo)z*.moo)ztext/x-moocode�MSDOSSessionLexer)r�z
MSDOS Session)�dosconr	r	�Macaulay2Lexer)z%pip._vendor.pygments.lexers.macaulay2�	Macaulay2)�	macaulay2)z*.m2r	�
MakefileLexer)r��Makefile)�make�makefile�mf�bsdmake)z*.makz*.mkr�r�z
Makefile.*�GNUmakefile)ztext/x-makefile�MakoCssLexer)r7zCSS+Mako)zcss+makor	)z
text/css+mako�
MakoHtmlLexer)r7z	HTML+Mako)z	html+makor	)ztext/html+mako�MakoJavascriptLexer)r7zJavaScript+Mako)zjavascript+makozjs+makor	)zapplication/x-javascript+makoztext/x-javascript+makoztext/javascript+mako�	MakoLexer)r7�Mako)�mako)z*.mao)zapplication/x-mako�MakoXmlLexer)r7zXML+Mako)zxml+makor	)zapplication/xml+mako�	MaqlLexer)r�MAQL)�maql)z*.maql)ztext/x-gooddata-maqlzapplication/x-gooddata-maql�
MarkdownLexer)r��Markdown)�markdown�md)z*.mdz
*.markdown)ztext/x-markdown�	MaskLexer)r>�Mask)�mask)z*.mask)ztext/x-mask�
MasonLexer)r7�Mason)�mason)�*.mz*.mhtmlz*.mcz*.mi�autohandler�dhandler)zapplication/x-mason�MathematicaLexer)r��Mathematica)�mathematica�mma�nb)z*.nbz*.cdfz*.nbpz*.ma)zapplication/mathematicaz#application/vnd.wolfram.mathematicaz+application/vnd.wolfram.mathematica.packagezapplication/vnd.wolfram.cdf�MatlabLexer)�"pip._vendor.pygments.lexers.matlab�Matlab)�matlab�r�)ztext/matlab�MatlabSessionLexer)r�zMatlab session)�
matlabsessionr	r	�MaximaLexer)z"pip._vendor.pygments.lexers.maxima�Maxima)�maxima�macsyma)r�z*.maxr	�
MesonLexer)z!pip._vendor.pygments.lexers.meson�Meson)�meson�meson.build)r�zmeson_options.txt)ztext/x-meson�
MiniDLexer)rh�MiniD)�minidr	)ztext/x-minidsrc�MiniScriptLexer)rP�
MiniScript)�
miniscript�ms)z*.ms)ztext/x-minicriptzapplication/x-miniscript�
ModelicaLexer)r��Modelica)�modelica)z*.mo)ztext/x-modelica�Modula2Lexer)z#pip._vendor.pygments.lexers.modula2zModula-2)�modula2�m2)�*.defz*.mod)ztext/x-modula2�
MoinWikiLexer)r�zMoinMoin/Trac Wiki markup)z	trac-wiki�moinr	)ztext/x-trac-wiki�MonkeyLexer)r��Monkey)�monkey)z*.monkey)z
text/x-monkey�
MonteLexer)z!pip._vendor.pygments.lexers.monte�Monte)�monte)z*.mtr	�MoonScriptLexer)rP�
MoonScript)�
moonscript�moon)z*.moon)ztext/x-moonscriptzapplication/x-moonscript�
MoselLexer)z!pip._vendor.pygments.lexers.mosel�Mosel)�mosel)z*.mosr	�MozPreprocCssLexer)r�zCSS+mozpreproc)zcss+mozpreproc)z*.css.inr	�MozPreprocHashLexer)r��mozhashpreproc)r�r	r	�MozPreprocJavascriptLexer)r�zJavascript+mozpreproc)zjavascript+mozpreproc)z*.js.inr	�MozPreprocPercentLexer)r��mozpercentpreproc)r�r	r	�MozPreprocXulLexer)r�zXUL+mozpreproc)zxul+mozpreproc)z*.xul.inr	�MqlLexer)rT�MQL)�mql�mq4�mq5�mql4�mql5)z*.mq4z*.mq5z*.mqh)z
text/x-mql�MscgenLexer)r,�Mscgen)�mscgen�msc)z*.mscr	�
MuPADLexer)r��MuPAD)�mupad)z*.mur	�	MxmlLexer)r�MXML)�mxml)z*.mxmlr	�
MySqlLexer)�pip._vendor.pygments.lexers.sql�MySQL)�mysqlr	)ztext/x-mysql�MyghtyCssLexer)r7z
CSS+Myghty)z
css+myghtyr	)ztext/css+myghty�MyghtyHtmlLexer)r7zHTML+Myghty)zhtml+myghtyr	)ztext/html+myghty�MyghtyJavascriptLexer)r7zJavaScript+Myghty)zjavascript+myghtyz	js+myghtyr	)zapplication/x-javascript+myghtyztext/x-javascript+myghtyztext/javascript+mygthy�MyghtyLexer)r7�Myghty)�myghty)z*.myt�autodelegate)zapplication/x-myghty�MyghtyXmlLexer)r7z
XML+Myghty)z
xml+myghtyr	)zapplication/xml+myghty�NCLLexer)zpip._vendor.pygments.lexers.ncl�NCL)�ncl)z*.ncl)ztext/ncl�	NSISLexer)r��NSIS)�nsis�nsi�nsh)z*.nsiz*.nsh)ztext/x-nsis�	NasmLexer)r��NASM)�nasm)�*.asm�*.ASMz*.nasm)ztext/x-nasm�NasmObjdumpLexer)r��objdump-nasm)r)z*.objdump-intel)ztext/x-nasm-objdump�NemerleLexer)r��Nemerle)�nemerler)ztext/x-nemerle�	NesCLexer)rT�nesC)�nesc)z*.nc)ztext/x-nescsrc�NestedTextLexer)rJ�
NestedText)�
nestedtext�nt)z*.ntr	�NewLispLexer)r��NewLisp)�newlisp)z*.lspz*.nlz*.kif)ztext/x-newlispzapplication/x-newlisp�
NewspeakLexer)�%pip._vendor.pygments.lexers.smalltalk�Newspeak)�newspeak)z*.ns2)ztext/x-newspeak�NginxConfLexer)rJzNginx configuration file)�nginx)z
nginx.conf)ztext/x-nginx-conf�NimrodLexer)z"pip._vendor.pygments.lexers.nimrod�Nimrod)�nimrod�nim)z*.nimz*.nimrod)z
text/x-nim�NitLexer)zpip._vendor.pygments.lexers.nit�Nit)�nit)z*.nitr	�NixLexer)zpip._vendor.pygments.lexers.nix�Nix)�nixos�nix)z*.nix)z
text/x-nix�NodeConsoleLexer)r>zNode.js REPL console session)�
nodejsreplr	)ztext/x-nodejsrepl�NotmuchLexer)rk�Notmuch)�notmuchr	r	�
NuSMVLexer)zpip._vendor.pygments.lexers.smv�NuSMV)�nusmv)z*.smvr	�
NumPyLexer)r��NumPy)�numpyr	r	�ObjdumpLexer)r��objdump)r@)z	*.objdump)ztext/x-objdump�ObjectiveCLexer)rszObjective-C)zobjective-c�
objectiveczobj-c�objc)r�r�)ztext/x-objective-c�ObjectiveCppLexer)rsz
Objective-C++)z
objective-c++zobjectivec++zobj-c++zobjc++)z*.mmr`)ztext/x-objective-c++�ObjectiveJLexer)r>zObjective-J)zobjective-j�
objectivejzobj-j�objjr)ztext/x-objective-j�
OcamlLexer)r
�OCaml)�ocaml)z*.mlz*.mliz*.mllz*.mly)ztext/x-ocaml�OctaveLexer)r��Octave)�octaver�)ztext/octave�	OdinLexer)r �ODIN)�odin)z*.odin)z	text/odin�OmgIdlLexer)rTz!OMG Interface Definition Language)zomg-idl)z*.idlz*.pidlr	�OocLexer)zpip._vendor.pygments.lexers.ooc�Ooc)�ooc)z*.ooc)z
text/x-ooc�OpaLexer)r
�Opa)�opa)z*.opa)z
text/x-opa�
OpenEdgeLexer)rzOpenEdge ABL)�openedge�abl�progress)�*.pz*.cls)ztext/x-openedgezapplication/x-openedge�OutputLexer)�#pip._vendor.pygments.lexers.specialzText output)�outputr	r	�PacmanConfLexer)rJ�
PacmanConf)�
pacmanconf)zpacman.confr	�PanLexer)r,�Pan)�pan)z*.panr	�
ParaSailLexer)z$pip._vendor.pygments.lexers.parasail�ParaSail)�parasail)z*.psiz*.psl)ztext/x-parasail�	PawnLexer)� pip._vendor.pygments.lexers.pawn�Pawn)�pawn)r\z*.pwn�*.inc)ztext/x-pawn�PegLexer)r�PEG)�peg)z*.peg)z
text/x-peg�
Perl6Lexer)� pip._vendor.pygments.lexers.perl�Perl6)�perl6�pl6�raku)r]�*.pmz*.nqpz*.p6z*.6plz*.p6lz*.pl6z*.6pmz*.p6mz*.pm6�*.tz*.rakuz	*.rakumodz
*.rakutestz	*.rakudoc)ztext/x-perl6zapplication/x-perl6�	PerlLexer)rr�Perl)�perl�pl)r]rwrxz*.perl)ztext/x-perlzapplication/x-perl�	PhixLexer)z pip._vendor.pygments.lexers.phix�Phix)�phix)z*.exw)ztext/x-phix�PhpLexer)�pip._vendor.pygments.lexers.php�PHP)�php�php3�php4�php5)z*.phpz
*.php[345]rm)z
text/x-php�PigLexer)rh�Pig)�pig)z*.pig)z
text/x-pig�	PikeLexer)rT�Pike)�pike)z*.pikez*.pmod)ztext/x-pike�PkgConfigLexer)rJ�	PkgConfig)�	pkgconfig)z*.pcr	�PlPgsqlLexer)r�zPL/pgSQL)�plpgsqlr	)ztext/x-plpgsql�PointlessLexer)z%pip._vendor.pygments.lexers.pointless�	Pointless)�	pointless)z*.ptlsr	�	PonyLexer)z pip._vendor.pygments.lexers.pony�Pony)�pony)z*.ponyr	�
PortugolLexer)r��Portugol)�portugol)z*.algz
*.portugolr	�PostScriptLexer)rl�
PostScript)�
postscript�postscr)z*.psz*.eps)zapplication/postscript�PostgresConsoleLexer)r�zPostgreSQL console (psql))�psqlzpostgresql-consolezpostgres-consoler	)ztext/x-postgresql-psql�PostgresExplainLexer)r�zPostgreSQL EXPLAIN dialect)zpostgres-explain)z	*.explain)ztext/x-postgresql-explain�
PostgresLexer)r�zPostgreSQL SQL dialect)�
postgresql�postgresr	)ztext/x-postgresql�PovrayLexer)rl�POVRay)�pov)z*.povrm)z
text/x-povray�PowerShellLexer)r��
PowerShell)�
powershell�pwsh�posh�ps1�psm1)z*.ps1z*.psm1)ztext/x-powershell�PowerShellSessionLexer)r�zPowerShell Session)zpwsh-session�ps1conr	r	�
PraatLexer)z!pip._vendor.pygments.lexers.praat�Praat)�praat)z*.praatz*.procz*.pscr	�
ProcfileLexer)z$pip._vendor.pygments.lexers.procfile�Procfile)�procfile)r�r	�PrologLexer)rw�Prolog)�prolog)rZr[r\r])z
text/x-prolog�PromQLLexer)z"pip._vendor.pygments.lexers.promql�PromQL)�promql)z*.promqlr	�PropertiesLexer)rJ�
Properties)�
properties�jproperties)z*.properties)ztext/x-java-properties�
ProtoBufLexer)r,zProtocol Buffer)�protobuf�proto)z*.protor	�PsyshConsoleLexer)r�zPsySH console session for PHP)�psyshr	r	�PugLexer)r��Pug)�pug�jade)z*.pugz*.jade)z
text/x-pugztext/x-jade�PuppetLexer)r,�Puppet)�puppet)z*.ppr	�PyPyLogLexer)�#pip._vendor.pygments.lexers.consolezPyPy Log)�pypylog�pypy)z	*.pypylog)zapplication/x-pypylog�Python2Lexer)r�z
Python 2.x)�python2�py2r	)ztext/x-python2zapplication/x-python2�Python2TracebackLexer)r�zPython 2.x Traceback)�py2tb)z*.py2tb)ztext/x-python2-traceback�PythonConsoleLexer)r�zPython console session)�pyconr	)ztext/x-python-doctest�PythonLexer)r��Python)�python�py�sage�python3�py3)z*.pyz*.pywz*.pyiz*.jyz*.sage�*.sc�
SConstruct�
SConscriptz*.bzl�BUCK�BUILDzBUILD.bazel�	WORKSPACEz*.tac)z
text/x-pythonzapplication/x-pythonztext/x-python3zapplication/x-python3�PythonTracebackLexer)r�zPython Traceback)�pytb�py3tb)z*.pytbz*.py3tb)ztext/x-python-tracebackztext/x-python3-traceback�PythonUL4Lexer)r�z
Python+UL4)zpy+ul4)z*.pyul4r	�QBasicLexer)r��QBasic)�qbasic�basic)z*.BASr)z
text/basic�QLexer)r-�Q)�q)z*.qr	�	QVToLexer)zpip._vendor.pygments.lexers.qvt�QVTO)�qvto�qvt)z*.qvtor	�	QlikLexer)z pip._vendor.pygments.lexers.qlik�Qlik)�qlik�qlikview�	qliksense�
qlikscript)z*.qvsz*.qvwr	�QmlLexer)r&�QML)�qml�qbs)z*.qmlz*.qbs)zapplication/x-qmlzapplication/x-qt.qbs+qml�
RConsoleLexer)�pip._vendor.pygments.lexers.r�RConsole)�rconsole�rout)z*.Routr	�RNCCompactLexer)zpip._vendor.pygments.lexers.rnczRelax-NG Compact)zrng-compact�rnc)z*.rncr	�RPMSpecLexer)r��RPMSpec)�spec)z*.spec)ztext/x-rpm-spec�RacketLexer)r��Racket)�racket�rkt)z*.rktz*.rktdz*.rktl)z
text/x-racketzapplication/x-racket�RagelCLexer)r<zRagel in C Host)zragel-c�z*.rlr	�
RagelCppLexer)r<zRagel in CPP Host)z	ragel-cppr
r	�RagelDLexer)r<zRagel in D Host)zragel-dr
r	�RagelEmbeddedLexer)r<zEmbedded Ragel)zragel-emr
r	�RagelJavaLexer)r<zRagel in Java Host)z
ragel-javar
r	�
RagelLexer)r<�Ragel)�ragelr	r	�RagelObjectiveCLexer)r<zRagel in Objective C Host)z
ragel-objcr
r	�RagelRubyLexer)r<zRagel in Ruby Host)z
ragel-rubyzragel-rbr
r	�
RawTokenLexer)r^zRaw token datar	r	)zapplication/x-pygments-tokens�RdLexer)r��Rd)�rd)z*.Rd)ztext/x-r-doc�ReasonLexer)r
�ReasonML)�reasonml�reason)z*.rez*.rei)ztext/x-reasonml�
RebolLexer)�!pip._vendor.pygments.lexers.rebol�REBOL)�rebol)z*.rz*.r3z*.reb)ztext/x-rebol�RedLexer)r �Red)�redz
red/system)z*.redz*.reds)z
text/x-redztext/x-red-system�RedcodeLexer)r(�Redcode)�redcode)z*.cwr	�RegeditLexer)rJ�reg)�registry)z*.reg)ztext/x-windows-registry�
ResourceLexer)z$pip._vendor.pygments.lexers.resource�ResourceBundle)�resourcebundle�resourcer	r	�	RexxLexer)rP�Rexx)�rexx�arexx)z*.rexxz*.rexz*.rxz*.arexx)ztext/x-rexx�
RhtmlLexer)r7�RHTML)�rhtmlzhtml+erbz	html+ruby)z*.rhtml)ztext/html+ruby�	RideLexer)z pip._vendor.pygments.lexers.ride�Ride)�ride)z*.ride)ztext/x-ride�	RitaLexer)z pip._vendor.pygments.lexers.rita�Rita)�rita)z*.rita)z	text/rita�RoboconfGraphLexer)�$pip._vendor.pygments.lexers.roboconfzRoboconf Graph)zroboconf-graph)z*.graphr	�RoboconfInstancesLexer)r>zRoboconf Instances)zroboconf-instances)z*.instancesr	�RobotFrameworkLexer)z*pip._vendor.pygments.lexers.robotframework�RobotFramework)�robotframework)z*.robotz
*.resource)ztext/x-robotframework�RqlLexer)r��RQL)�rql)z*.rql)z
text/x-rql�RslLexer)r,�RSL)�rsl)z*.rsl)ztext/rsl�RstLexer)r��reStructuredText)�restructuredtext�rst�rest)z*.rstz*.rest)z
text/x-rstztext/prs.fallenstein.rst�RtsLexer)z)pip._vendor.pygments.lexers.trafficscript�
TrafficScript)�
trafficscript�rts)z*.rtsr	�RubyConsoleLexer)rzRuby irb session)�rbcon�irbr	)ztext/x-ruby-shellsession�	RubyLexer)r�Ruby)�ruby�rb�duby)	z*.rbz*.rbw�Rakefilez*.rakez	*.gemspecz*.rbxz*.duby�Gemfile�Vagrantfile)ztext/x-rubyzapplication/x-ruby�	RustLexer)z pip._vendor.pygments.lexers.rust�Rust)�rust�rs)z*.rsz*.rs.in)z	text/rustztext/x-rust�SASLexer)zpip._vendor.pygments.lexers.sas�SAS)�sas)z*.SASz*.sas)z
text/x-sasztext/saszapplication/x-sas�SLexer)r��S)�splus�s�r)raz*.Rz	.Rhistoryz	.Rprofilez	.Renviron)ztext/S-plusztext/Sztext/x-r-sourceztext/x-rztext/x-Rztext/x-r-historyztext/x-r-profile�SMLLexer)r
zStandard ML)�sml)z*.smlz*.sigz*.fun)ztext/x-standardmlzapplication/x-standardml�	SNBTLexer)r~�SNBT)�snbt)z*.snbt)z	text/snbt�	SarlLexer)rh�SARL)�sarl)z*.sarl)ztext/x-sarl�	SassLexer)r|�Sass)�sass)z*.sass)ztext/x-sass�	SaviLexer)z pip._vendor.pygments.lexers.savi�Savi)�savi)z*.savir	�
ScalaLexer)rh�Scala)�scala)z*.scala)ztext/x-scala�
ScamlLexer)r��Scaml)�scaml)z*.scaml)ztext/x-scaml�
ScdocLexer)z!pip._vendor.pygments.lexers.scdoc�scdoc)r~�scd)�*.scdz*.scdocr	�SchemeLexer)r��Scheme)�scheme�scm)z*.scmz*.ss)z
text/x-schemezapplication/x-scheme�ScilabLexer)r��Scilab)�scilab)z*.sciz*.scerN)ztext/scilab�	ScssLexer)r|�SCSS)�scss)z*.scss)ztext/x-scss�SedLexer)r{�Sed)�sed�gsed�ssed)z*.sedz	*.[gs]sed)z
text/x-sed�
ShExCLexer)�pip._vendor.pygments.lexers.rdf�ShExC)�shexc�shex)z*.shex)z	text/shex�	ShenLexer)r��Shen)�shen)z*.shen)ztext/x-shenzapplication/x-shen�
SieveLexer)z!pip._vendor.pygments.lexers.sieve�Sieve)�sieve)z*.sivz*.siever	�SilverLexer)r��Silver)�silver)z*.silz*.vprr	�SingularityLexer)rJ�Singularity)�singularity)r�r�r	�
SlashLexer)z!pip._vendor.pygments.lexers.slash�Slash)�slash)z*.slar	�	SlimLexer)r&�Slim)�slim)z*.slim)ztext/x-slim�SlurmBashLexer)r��Slurm)�slurm�sbatch)z*.slr	�
SmaliLexer)z"pip._vendor.pygments.lexers.dalvik�Smali)�smali)z*.smali)z
text/smali�SmalltalkLexer)r$�	Smalltalk)�	smalltalk�squeak�st)z*.st)ztext/x-smalltalk�SmartGameFormatLexer)zpip._vendor.pygments.lexers.sgf�SmartGameFormat)�sgf)z*.sgfr	�SmartyLexer)r7�Smarty)�smarty)z*.tpl)zapplication/x-smarty�SmithyLexer)z"pip._vendor.pygments.lexers.smithy�Smithy)�smithy)z*.smithyr	�SnobolLexer)z"pip._vendor.pygments.lexers.snobol�Snobol)�snobol)z*.snobol)z
text/x-snobol�
SnowballLexer)r,�Snowball)�snowball)z*.sblr	�
SolidityLexer)z$pip._vendor.pygments.lexers.solidity�Solidity)�solidity)z*.solr	�SophiaLexer)z"pip._vendor.pygments.lexers.sophia�Sophia)�sophia)z*.aesr	�SourcePawnLexer)rj�
SourcePawn)�sp)z*.sp)ztext/x-sourcepawn�SourcesListLexer)r�zDebian Sourcelist)�
debsources�sourceslist�sources.list)r�r	�SparqlLexer)r��SPARQL)�sparql)z*.rqz*.sparql)zapplication/sparql-query�
SpiceLexer)z!pip._vendor.pygments.lexers.spice�Spice)�spice�	spicelang)z*.spice)ztext/x-spice�
SqlJinjaLexer)r7z	SQL+Jinja)z	sql+jinja)�*.sqlz*.sql.j2z*.sql.jinja2r	�SqlLexer)r��SQL)�sql�r�)z
text/x-sql�SqliteConsoleLexer)r��
sqlite3con)�sqlite3)z*.sqlite3-console)ztext/x-sqlite3-console�SquidConfLexer)rJ�	SquidConf)�	squidconf�
squid.conf�squid)r�)ztext/x-squidconf�SrcinfoLexer)z#pip._vendor.pygments.lexers.srcinfo�Srcinfo)�srcinfo)z.SRCINFOr	�SspLexer)r7zScalate Server Page)�ssp)z*.ssp)zapplication/x-ssp�	StanLexer)r��Stan)�stan)z*.stanr	�
StataLexer)z!pip._vendor.pygments.lexers.stata�Stata)�stata�do)z*.doz*.ado)ztext/x-stataz
text/statazapplication/x-stata�SuperColliderLexer)z)pip._vendor.pygments.lexers.supercollider�
SuperCollider)�
supercollider�sc)r�r�)zapplication/supercolliderztext/supercollider�
SwiftLexer)rs�Swift)�swift)z*.swift)ztext/x-swift�	SwigLexer)rT�SWIG)�swig)z*.swgz*.i)z	text/swig�SystemVerilogLexer)�pip._vendor.pygments.lexers.hdl�
systemverilog)r��sv)z*.svz*.svh)ztext/x-systemverilog�TAPLexer)ro�TAP)�tap)z*.tapr	�TNTLexer)zpip._vendor.pygments.lexers.tntzTypographic Number Theory)�tnt)z*.tntr	�	TOMLLexer)rJ�TOML)�toml)z*.toml�Pipfilezpoetry.lockr	�
Tads3Lexer)r�zTADS 3)�tads3)rxr	�TalLexer)zpip._vendor.pygments.lexers.tal�Tal)�tal�uxntal)z*.tal)z
text/x-uxntal�	TasmLexer)r��TASM)�tasm)rrz*.tasm)ztext/x-tasm�TclLexer)zpip._vendor.pygments.lexers.tcl�Tcl)�tcl)z*.tclz*.rvt)z
text/x-tclztext/x-script.tclzapplication/x-tcl�	TcshLexer)r��Tcsh)�tcsh�csh)z*.tcshz*.csh)zapplication/x-csh�TcshSessionLexer)r�zTcsh Session)�tcshconr	r	�TeaTemplateLexer)r7�Tea)�tea)z*.tea)z
text/x-tea�	TealLexer)z pip._vendor.pygments.lexers.teal�teal)r)z*.tealr	�
TeraTermLexer)z$pip._vendor.pygments.lexers.teratermzTera Term macro)�
teratermmacro�teraterm�ttl�z*.ttl)ztext/x-teratermmacro�TermcapLexer)rJ�Termcap)�termcap)r%ztermcap.srcr	�
TerminfoLexer)rJ�Terminfo)�terminfo)r(zterminfo.srcr	�TerraformLexer)rJ�	Terraform)�	terraform�tf�hcl)z*.tfz*.hcl)zapplication/x-tfzapplication/x-terraform�TexLexer)r��TeX)�tex�latex)z*.texz*.aux�*.toc)z
text/x-texztext/x-latex�	TextLexer)r^z	Text only)�text)z*.txt)z
text/plain�
ThingsDBLexer)z$pip._vendor.pygments.lexers.thingsdb�ThingsDB)�ti�thingsdb)z*.tir	�ThriftLexer)r,�Thrift)�thrift)z*.thrift)zapplication/x-thrift�TiddlyWiki5Lexer)r��tiddler)�tid)z*.tid)ztext/vnd.tiddlywiki�TlbLexer)zpip._vendor.pygments.lexers.tlbzTl-b)�tlb)z*.tlbr	�TodotxtLexer)rk�Todotxt)�todotxt)ztodo.txtz	*.todotxt)ztext/x-todo�TransactSqlLexer)r�zTransact-SQL)�tsqlzt-sqlr�)ztext/x-tsql�TreetopLexer)r<�Treetop)�treetop)z	*.treetopz*.ttr	�TurtleLexer)r��Turtle)�turtler")ztext/turtlezapplication/x-turtle�
TwigHtmlLexer)r7z	HTML+Twig)z	html+twig)z*.twig)ztext/html+twig�	TwigLexer)r7�Twig)�twigr	)zapplication/x-twig�TypeScriptLexer)r>�
TypeScript)�
typescript�ts)z*.ts)zapplication/x-typescriptztext/x-typescript�TypoScriptCssDataLexer)�&pip._vendor.pygments.lexers.typoscript�TypoScriptCssData)�typoscriptcssdatar	r	�TypoScriptHtmlDataLexer)rU�TypoScriptHtmlData)�typoscripthtmldatar	r	�TypoScriptLexer)rU�
TypoScript)�
typoscript)z*.typoscript)ztext/x-typoscript�UL4Lexer)r��UL4)�ul4)z*.ul4r	�
UcodeLexer)r��ucode)rb)�*.uz*.u1z*.u2r	�UniconLexer)r��Unicon)�unicon)z*.icn)ztext/unicon�UnixConfigLexer)rJzUnix/Linux config files)�
unixconfig�linuxconfigr	r	�UrbiscriptLexer)z pip._vendor.pygments.lexers.urbi�
UrbiScript)�
urbiscript)rc)zapplication/x-urbiscript�UsdLexer)zpip._vendor.pygments.lexers.usd�USD)�usd�usda)z*.usdz*.usdar	�
VBScriptLexer)r��VBScript)�vbscript)z*.vbsz*.VBSr	�VCLLexer)�#pip._vendor.pygments.lexers.varnish�VCL)�vcl)z*.vcl)z
text/x-vclsrc�VCLSnippetLexer)ru�VCLSnippets)�vclsnippets�
vclsnippetr	)ztext/x-vclsnippet�VCTreeStatusLexer)r��VCTreeStatus)�vctreestatusr	r	�VGLLexer)r,�VGL)�vgl)z*.rpfr	�	ValaLexer)rT�Vala)�vala�vapi)z*.valaz*.vapi)ztext/x-vala�VbNetAspxLexer)r��aspx-vb)r�r�r	�
VbNetLexer)r�zVB.net)zvb.net�vbnet�lobas�oobas�sobas)z*.vbr)ztext/x-vbnetz
text/x-vba�VelocityHtmlLexer)r7z
HTML+Velocity)z
html+velocityr	)ztext/html+velocity�
VelocityLexer)r7�Velocity)�velocity)z*.vmz*.fhtmlr	�VelocityXmlLexer)r7zXML+Velocity)zxml+velocityr	)zapplication/xml+velocity�VerilogLexer)r��verilog)r��vrW)ztext/x-verilog�	VhdlLexer)r��vhdl)r�)z*.vhdlz*.vhd)ztext/x-vhdl�VimLexer)r{�VimL)�vim)	z*.vimz.vimrcz.exrcz.gvimrc�_vimrc�_exrc�_gvimrc�vimrc�gvimrc)z
text/x-vim�
WDiffLexer)r��WDiff)�wdiff)z*.wdiffr	�WatLexer)z'pip._vendor.pygments.lexers.webassembly�WebAssembly)�wast�wat)z*.watz*.wastr	�WebIDLLexer)z"pip._vendor.pygments.lexers.webidlzWeb IDL)�webidl)z*.webidlr	�	WgslLexer)z pip._vendor.pygments.lexers.wgslzWebGPU Shading Language)�wgsl)z*.wgsl)z	text/wgsl�WhileyLexer)z"pip._vendor.pygments.lexers.whiley�Whiley)�whiley)z*.whiley)z
text/x-whiley�
WikitextLexer)r��Wikitext)�wikitext�	mediawikir	)ztext/x-wiki�WoWTocLexer)z"pip._vendor.pygments.lexers.wowtoczWorld of Warcraft TOC)�wowtoc)r2r	�	WrenLexer)z pip._vendor.pygments.lexers.wren�Wren)�wren)z*.wrenr	�X10Lexer)zpip._vendor.pygments.lexers.x10�X10)�x10�xten)z*.x10)z
text/x-x10�XMLUL4Lexer)r�zXML+UL4)zxml+ul4)z*.xmlul4r	�XQueryLexer)r&�XQuery)�xquery�xqy�xq�xql�xqm)z*.xqyz*.xqueryz*.xqz*.xqlz*.xqm)ztext/xqueryzapplication/xquery�XmlDjangoLexer)r7zXML+Django/Jinja)z
xml+djangoz	xml+jinja)z*.xml.j2z*.xml.jinja2)zapplication/xml+djangozapplication/xml+jinja�XmlErbLexer)r7zXML+Ruby)zxml+rubyzxml+erbr	)zapplication/xml+ruby�XmlLexer)r��XML)�xml)r�*.xslz*.rssr�z*.xsdz*.wsdlz*.wsf)ztext/xmlzapplication/xmlz
image/svg+xmlzapplication/rss+xmlzapplication/atom+xml�XmlPhpLexer)r7zXML+PHP)zxml+phpr	)zapplication/xml+php�XmlSmartyLexer)r7z
XML+Smarty)z
xml+smartyr	)zapplication/xml+smarty�	XorgLexer)z pip._vendor.pygments.lexers.xorg�Xorg�z	xorg.confr�r	�XppLexer)r�zX++)�xppzx++)z*.xppr	)r��XSLT)�xslt)r�r�z*.xpl)zapplication/xsl+xmlzapplication/xslt+xml)rh�Xtend)�xtend)z*.xtend)ztext/x-xtend)r��xtlang)�	extempore)z*.xtmr	)r7z
YAML+Jinja)z
yaml+jinja�salt�sls)z*.slsz	*.yaml.j2z*.yml.j2z
*.yaml.jinja2z*.yml.jinja2)ztext/x-yaml+jinjaz
text/x-sls)r�YAML)�yaml)z*.yamlz*.yml)ztext/x-yaml)z pip._vendor.pygments.lexers.yang�YANG)�yang)z*.yang)zapplication/yang)r,�Zeek)�zeek�bro)z*.zeekz*.bror	)r��Zephir)�zephir)z*.zepr	)zpip._vendor.pygments.lexers.zig�Zig)�zig)z*.zig)ztext/zig)z$pip._vendor.pygments.lexers.apdlexerz ANSYS parametric design language)�ansys�apdl)z*.ansr	)
�	XsltLexer�
XtendLexer�XtlangLexer�YamlJinjaLexer�	YamlLexer�	YangLexer�	ZeekLexer�ZephirLexer�ZigLexer�apdlexerN)�LEXERSr	���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/_mapping.py�<module>r�sU$��k
��t�k
��`�k
��R�k
��s�	k
�
�M�k
��E�
k
��F�k
��w�k
��j�k
��a�k
��j�k
��[�k
��X�k
��t�k
��\�k
� �`�!k
�"�J�#k
�$�y�%k
�&�|�'k
�(�V�)k
�*�I�+k
�,�|�-k
�.�C�/k
�0�H�1k
�2�v�3k
�4�z�5k
�6�t�7k
�8�\�9k
�:�f�;k
�<�K�=k
�>�p�?k
�@�E�Ak
�B�a�Ck
�D�t�Ek
�F�T�Gk
�H�E�Ik
�J�f�Kk
�L�h�Mk
�N�T�Ok
�P�d�Qk
�R�Y�Sk
�T�e�Uk
�V�c�Wk
�X�N�Yk
�Z�a�[k
�\�e�]k
�^�B�_k
�`�F�ak
�b�v�ck
�d�P�ek
�f�y�gk
�h�n�ik
�j�T�kk
�l�d�mk
�n�f�ok
�p�P�qk
�r�r�sk
�t�u�uk
�v
�l�wk
�x�}�yk
�z�~�{k
�|�Y�}k
�~�b�k
�@�X�Ak
�B�v�Ck
�D�_�Ek
�F�^�Gk
�H�_�Ik
�J�l�Kk
�L�s�Mk
�N�i�Ok
�P�g�Qk
�R�p�Sk
�T�o�Uk
�V�g�Wk
�X�h�Yk
�Z�b�[k
�\�u�]k
�^�k�_k
�`�l�ak
�b�n�ck
�d�o�ek
�f�i�gk
�h�d�ik
�j�Y�kk
�l�p�mk
�n�y�ok
�p�I�qk
�r�h�sk
�t�o�uk
�v�V�wk
�x�a�yk
�z�u�{k
�|�W�}k
�~�c�k
�@�c�Ak
�B�g�Ck
�D�a�Ek
�F�G�Gk
�H�m�Ik
�J�g�Kk
�L�{�Mk
�N�y�Ok
�P�H�Qk
�R�I�Sk
�T�~�Uk
�V�v�Wk
�X�y�Yk
�Z�O�[k
�\�_�]k
�^�l�_k
�`�x�ak
�b�t�ck
�d�j�ek
�f�h�gk
�h
�_�ik
�j�~�kk
�l�y�mk
�n�m�ok
�p�y�qk
�r�T�sk
�t�I�uk
�v�Y�wk
�x�K�yk
�z�_�{k
�|�I�}k
�~�b�k
�@�Z�Ak
�B�k�Ck
�D�W�Ek
�F�b�Gk
�H��Ik
�J�H�Kk
�L�h�Mk
�N�x�Ok
�P�P�Qk
�R�L�Sk
�T�j�Uk
�V�n�Wk
�X�F�Yk
�Z�W�[k
�\�a�]k
�^�g�_k
�`�^�ak
�b�t�ck
�d�r�ek
�f�N�gk
�h�L�ik
�j�F�kk
�l�}�mk
�n�H�ok
�p�f�qk
�r�i�sk
�t�B�uk
�v�q�wk
�x�s�yk
�z��{k
�|�t�}k
�~�z�k
�@�d�Ak
�B�^�Ck
�D�J�Ek
�F�n�Gk
�H�r�Ik
�J�y�Kk
�L�w�Mk
�N�V�Ok
�P�C�Qk
�R�u�Sk
�T�e�Uk
�V�u�Wk
�X�z�Yk
�Z�n�[k
�\�X�]k
�^�E�_k
�`�Y�ak
�b�k�ck
�d�d�ek
�f�n�gk
�h�U�ik
�j�o�kk
�l�E�mk
�n��ok
�p�g�qk
�r�X�sk
�t�F�uk
�v��wk
�x�~�yk
�z�\�{k
�|�k�}k
�~�{�k
�@�{�Ak
�B�f�Ck
�D�g�Ek
�F�A�Gk
�H�g�Ik
�J�y�Kk
�L�U�Mk
�N�\�Ok
�P�q�Qk
�R�a�Sk
�T�H�Uk
�V�H�Wk
�X�[�Yk
�Z�m�[k
�\�|�]k
�^�T�_k
�`�b�ak
�b�t�ck
�d�W�ek
�f�_�gk
�h�d�ik
�j�s�kk
�l�m�mk
�n�n�ok
�p�v�qk
�r�u�sk
�t�c�uk
�v�b�wk
�x�l�yk
�z�y�{k
�|�y�}k
�~
�W�k
�@�l�Ak
�B�g�Ck
�D�d�Ek
�F�f�Gk
�H�f�Ik
�J�s�Kk
�L�l�Mk
�N�N�Ok
�P�k�Qk
�R�J�Sk
�T�_�Uk
�V�n�Wk
�X�g�Yk
�Z�[�[k
�\�]�]k
�^�C�_k
�`�d�ak
�b�v�ck
�d�{�ek
�f�p�gk
�h�F�ik
�j�t�kk
�l
�J�mk
�n�x�ok
�p�\�qk
�r�z�sk
�t�p�uk
�v�t�wk
�x�W�yk
�z�g�{k
�|�t�}k
�~�v�k
�@�X�Ak
�B�O�Ck
�D�{�Ek
�F�j�Gk
�H�p�Ik
�J�g�Kk
�L�g�Mk
�N�i�Ok
�P�f�Qk
�R�W�Sk
�T�m�Uk
�V�k�Wk
�X�c�Yk
�Z�P�[k
�\�d�]k
�^�h�_k
�`�b�ak
�b�F�ck
�d�A�ek
�f�E�gk
�h�O�ik
�j�~�kk
�l�P�mk
�n�b�ok
�p�}�qk
�r�d�sk
�t�k�uk
�v�K�wk
�x�p�yk
�z�t�{k
�|�Q�}k
�~�r�k
�@	�w�A	k
�B	�S�C	k
�D	�J�E	k
�F	�m�G	k
�H	�j�I	k
�J	�c�K	k
�L	�l�M	k
�N	�n�O	k
�P	�r�Q	k
�R	�T�S	k
�T	�b�U	k
�V	�b�W	k
�X	�y�Y	k
�Z	�D�[	k
�\	�K�]	k
�^	�r�_	k
�`	�[�a	k
�b	�g�c	k
�d	�\�e	k
�f	�z�g	k
�h	�p�i	k
�j	 �"O�k	k
�l	�y�m	k
�n	�z�o	k
�p	�S�q	k
�r	�d�s	k
�t	�]�u	k
�v	�a�w	k
�x	�a�y	k
�z	�x�{	k
�|	�|�}	k
�~	�_�	k
�@
�J�A
k
�B
��C
k
�D
�_�E
k
�F
�B�G
k
�H
�w�I
k
�J
�O�K
k
�L
�r�M
k
�N
�j�O
k
�P
�q�Q
k
�R
�[�S
k
�T
�{�U
k
�V
�O�W
k
�X
�~�Y
k
�Z
�T�[
k
�\
�i�]
k
�^
�P�_
k
�`
�]�a
k
�b
�Z�c
k
�d
�U�e
k
�f
�u�g
k
�h
�i�i
k
�j
�y�k
k
�l
�d�m
k
�n
�B�o
k
�p
�l�q
k
�r
�j�s
k
�t
�F�u
k
�v
�a�w
k
�x
�`�y
k
�z
�p�{
k
�|
�^�}
k
�~
�s�
k
�@�U�Ak
�B�C�Ck
�D�u�Ek
�F�n�Gk
�H�U�Ik
�J�X�Kk
�L�f�Mk
�N�O�Ok
�P�a�Qk
�R�r�Sk
�T�i�Uk
�V�j�Wk
�X�m�Yk
�Z�Y�[k
�\�s�]k
�^�Y�_k
�`�r�ak
�b�e�ck
�d�K�ek
�f�w�gk
�h�g�ik
�j�}�kk
�l�p�mk
�n�k�ok
�p�M�qk
�r�c�sk
�t�\�uk
�v�u�wk
�x�q�yk
�z�A�{k
�|�]�}k
�~�I�k
�@�N�Ak
�B�U�Ck
�D�G�Ek
�F�W�Gk
�H�z�Ik
�J�f�Kk
�L�|�Mk
�N
�J�Ok
�P�^�Qk
�R�G�Sk
�T�V�Uk
�V�i�Wk
�X�v�Yk
�Z�w�[k
�\�_�]k
�^�j�_k
�`�p�ak
�b�j�ck
�d�q�ek
�f�s�gk
�h�V�ik
�j�A�kk
�l�~�mk
�n�z�ok
�p�]�qk
�r�C�sk
�t�y�uk
�v�N�wk
�x�d�yk
�z�{�{k
�|�w�}k
�~�P�k
�@
�L�A
k
�B
�g�C
k
�D
�e�E
k
�F
�{�G
k
�H
�L�I
k
�J
�h�K
k
�L
�a�M
k
�N
�`�O
k
�P
�q�Q
k
�R
�x�S
k
�T
�F�U
k
�V
�`�W
k
�X
�A�Y
k
�Z
�J�[
k
�\

�o�]
k
�^
�\�_
k
�`
�j�a
k
�b
�f�c
k
�d
�f�e
k
�f
�Y�g
k
�h
�k�i
k
�j
�l�k
k
�l
�l�m
k
�n
�S�o
k
�p
��q
k
�r
�f�s
k
�t
�B�u
k
�v
�n�w
k
�x
�|�y
k
�z
�f�{
k
�|
�n�}
k
�~
�~�
k
�@�\�Ak
�B�j�Ck
�D�h�Ek
�F�l�Gk
�H�N�Ik
�J�l�Kk
�L�z�Mk
�N�c�Ok
�P�s�Qk
�R�d�Sk
�T�h�Uk
�V�`�Wk
�X�u�Yk
�Z�^�[k
�\�C�]k
�^�y�_k
�`�G�ak
�b�a�ck
�d�O�ek
�f�Y�gk
�h�g�ik
�j�~�kk
�l�]�mk
�n�\�ok
�p�z�qk
�r�q�sk
�t�l�uk
�v�V�wk
�x�X�yk
�z�j�{k
�|�u�}k
�~�a�k
�@�m�Ak
�B�w�Ck
�D�S�Ek
�F�|�Gk
�H�c�Ik
�J�o�Kk
�L�Y�Mk
�N�^�Ok
�P�t�Qk
�R�y�Sk
�T�k�Uk
�V�M�Wk
�X�m�Yk
�Z�l�[k
�\�x�]k
�^�y�_k
�`�U�ak
�b�C�ck
�d�|�ek
�f�o�gk
�h�C�ik
�j�}�kk
�l�j�mk
�n�d�ok
�p�}�qk
�r� A�sk
�t�L�uk
�v�T�wk
�x�j�yk
�z�n�{k
�|�A�}k
�~�D�k
�@�d�Ak
�B�m�Ck
�D�h�Ek
�F�I�Gk
�H�k�Ik
�J�U�Kk
�L�y�Mk
�N�W�Ok
�P�f�Qk
�R�E�Sk
�T�r�Uk
�V�H�Wk
�X�s�Yk
�Z�n�[k
�\�v�]k
�^�]�_k
�`�t�ak
�b�d�ck
�d�x�ek
�f�s�gk
�h�x�ik
�j�o�kk
�l�Y�mk
�n�h�ok
�p�b�qk
�r�D�sk
�t�D�uk
�v�A�wk
�x�j�yk
�z�s�{k
�|��}k
�~�a�k
�@�]�Ak
�BX�k�a�W�o�l�g�]�_��Uk
�r�python3.12/site-packages/pip/_vendor/pygments/lexers/_mapping.py000064400000215131151732703020020654 0ustar00# Automatically generated by scripts/gen_mapfiles.py.
# DO NOT EDIT BY HAND; run `tox -e mapfiles` instead.

LEXERS = {
    'ABAPLexer': ('pip._vendor.pygments.lexers.business', 'ABAP', ('abap',), ('*.abap', '*.ABAP'), ('text/x-abap',)),
    'AMDGPULexer': ('pip._vendor.pygments.lexers.amdgpu', 'AMDGPU', ('amdgpu',), ('*.isa',), ()),
    'APLLexer': ('pip._vendor.pygments.lexers.apl', 'APL', ('apl',), ('*.apl', '*.aplf', '*.aplo', '*.apln', '*.aplc', '*.apli', '*.dyalog'), ()),
    'AbnfLexer': ('pip._vendor.pygments.lexers.grammar_notation', 'ABNF', ('abnf',), ('*.abnf',), ('text/x-abnf',)),
    'ActionScript3Lexer': ('pip._vendor.pygments.lexers.actionscript', 'ActionScript 3', ('actionscript3', 'as3'), ('*.as',), ('application/x-actionscript3', 'text/x-actionscript3', 'text/actionscript3')),
    'ActionScriptLexer': ('pip._vendor.pygments.lexers.actionscript', 'ActionScript', ('actionscript', 'as'), ('*.as',), ('application/x-actionscript', 'text/x-actionscript', 'text/actionscript')),
    'AdaLexer': ('pip._vendor.pygments.lexers.ada', 'Ada', ('ada', 'ada95', 'ada2005'), ('*.adb', '*.ads', '*.ada'), ('text/x-ada',)),
    'AdlLexer': ('pip._vendor.pygments.lexers.archetype', 'ADL', ('adl',), ('*.adl', '*.adls', '*.adlf', '*.adlx'), ()),
    'AgdaLexer': ('pip._vendor.pygments.lexers.haskell', 'Agda', ('agda',), ('*.agda',), ('text/x-agda',)),
    'AheuiLexer': ('pip._vendor.pygments.lexers.esoteric', 'Aheui', ('aheui',), ('*.aheui',), ()),
    'AlloyLexer': ('pip._vendor.pygments.lexers.dsls', 'Alloy', ('alloy',), ('*.als',), ('text/x-alloy',)),
    'AmbientTalkLexer': ('pip._vendor.pygments.lexers.ambient', 'AmbientTalk', ('ambienttalk', 'ambienttalk/2', 'at'), ('*.at',), ('text/x-ambienttalk',)),
    'AmplLexer': ('pip._vendor.pygments.lexers.ampl', 'Ampl', ('ampl',), ('*.run',), ()),
    'Angular2HtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML + Angular2', ('html+ng2',), ('*.ng2',), ()),
    'Angular2Lexer': ('pip._vendor.pygments.lexers.templates', 'Angular2', ('ng2',), (), ()),
    'AntlrActionScriptLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR With ActionScript Target', ('antlr-actionscript', 'antlr-as'), ('*.G', '*.g'), ()),
    'AntlrCSharpLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR With C# Target', ('antlr-csharp', 'antlr-c#'), ('*.G', '*.g'), ()),
    'AntlrCppLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR With CPP Target', ('antlr-cpp',), ('*.G', '*.g'), ()),
    'AntlrJavaLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR With Java Target', ('antlr-java',), ('*.G', '*.g'), ()),
    'AntlrLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR', ('antlr',), (), ()),
    'AntlrObjectiveCLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR With ObjectiveC Target', ('antlr-objc',), ('*.G', '*.g'), ()),
    'AntlrPerlLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR With Perl Target', ('antlr-perl',), ('*.G', '*.g'), ()),
    'AntlrPythonLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR With Python Target', ('antlr-python',), ('*.G', '*.g'), ()),
    'AntlrRubyLexer': ('pip._vendor.pygments.lexers.parsers', 'ANTLR With Ruby Target', ('antlr-ruby', 'antlr-rb'), ('*.G', '*.g'), ()),
    'ApacheConfLexer': ('pip._vendor.pygments.lexers.configs', 'ApacheConf', ('apacheconf', 'aconf', 'apache'), ('.htaccess', 'apache.conf', 'apache2.conf'), ('text/x-apacheconf',)),
    'AppleScriptLexer': ('pip._vendor.pygments.lexers.scripting', 'AppleScript', ('applescript',), ('*.applescript',), ()),
    'ArduinoLexer': ('pip._vendor.pygments.lexers.c_like', 'Arduino', ('arduino',), ('*.ino',), ('text/x-arduino',)),
    'ArrowLexer': ('pip._vendor.pygments.lexers.arrow', 'Arrow', ('arrow',), ('*.arw',), ()),
    'ArturoLexer': ('pip._vendor.pygments.lexers.arturo', 'Arturo', ('arturo', 'art'), ('*.art',), ()),
    'AscLexer': ('pip._vendor.pygments.lexers.asc', 'ASCII armored', ('asc', 'pem'), ('*.asc', '*.pem', 'id_dsa', 'id_ecdsa', 'id_ecdsa_sk', 'id_ed25519', 'id_ed25519_sk', 'id_rsa'), ('application/pgp-keys', 'application/pgp-encrypted', 'application/pgp-signature')),
    'AspectJLexer': ('pip._vendor.pygments.lexers.jvm', 'AspectJ', ('aspectj',), ('*.aj',), ('text/x-aspectj',)),
    'AsymptoteLexer': ('pip._vendor.pygments.lexers.graphics', 'Asymptote', ('asymptote', 'asy'), ('*.asy',), ('text/x-asymptote',)),
    'AugeasLexer': ('pip._vendor.pygments.lexers.configs', 'Augeas', ('augeas',), ('*.aug',), ()),
    'AutoItLexer': ('pip._vendor.pygments.lexers.automation', 'AutoIt', ('autoit',), ('*.au3',), ('text/x-autoit',)),
    'AutohotkeyLexer': ('pip._vendor.pygments.lexers.automation', 'autohotkey', ('autohotkey', 'ahk'), ('*.ahk', '*.ahkl'), ('text/x-autohotkey',)),
    'AwkLexer': ('pip._vendor.pygments.lexers.textedit', 'Awk', ('awk', 'gawk', 'mawk', 'nawk'), ('*.awk',), ('application/x-awk',)),
    'BBCBasicLexer': ('pip._vendor.pygments.lexers.basic', 'BBC Basic', ('bbcbasic',), ('*.bbc',), ()),
    'BBCodeLexer': ('pip._vendor.pygments.lexers.markup', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)),
    'BCLexer': ('pip._vendor.pygments.lexers.algebra', 'BC', ('bc',), ('*.bc',), ()),
    'BSTLexer': ('pip._vendor.pygments.lexers.bibtex', 'BST', ('bst', 'bst-pybtex'), ('*.bst',), ()),
    'BareLexer': ('pip._vendor.pygments.lexers.bare', 'BARE', ('bare',), ('*.bare',), ()),
    'BaseMakefileLexer': ('pip._vendor.pygments.lexers.make', 'Base Makefile', ('basemake',), (), ()),
    'BashLexer': ('pip._vendor.pygments.lexers.shell', 'Bash', ('bash', 'sh', 'ksh', 'zsh', 'shell'), ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass', '*.exheres-0', '*.exlib', '*.zsh', '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc', '.kshrc', 'kshrc', 'PKGBUILD'), ('application/x-sh', 'application/x-shellscript', 'text/x-shellscript')),
    'BashSessionLexer': ('pip._vendor.pygments.lexers.shell', 'Bash Session', ('console', 'shell-session'), ('*.sh-session', '*.shell-session'), ('application/x-shell-session', 'application/x-sh-session')),
    'BatchLexer': ('pip._vendor.pygments.lexers.shell', 'Batchfile', ('batch', 'bat', 'dosbatch', 'winbatch'), ('*.bat', '*.cmd'), ('application/x-dos-batch',)),
    'BddLexer': ('pip._vendor.pygments.lexers.bdd', 'Bdd', ('bdd',), ('*.feature',), ('text/x-bdd',)),
    'BefungeLexer': ('pip._vendor.pygments.lexers.esoteric', 'Befunge', ('befunge',), ('*.befunge',), ('application/x-befunge',)),
    'BerryLexer': ('pip._vendor.pygments.lexers.berry', 'Berry', ('berry', 'be'), ('*.be',), ('text/x-berry', 'application/x-berry')),
    'BibTeXLexer': ('pip._vendor.pygments.lexers.bibtex', 'BibTeX', ('bibtex', 'bib'), ('*.bib',), ('text/x-bibtex',)),
    'BlitzBasicLexer': ('pip._vendor.pygments.lexers.basic', 'BlitzBasic', ('blitzbasic', 'b3d', 'bplus'), ('*.bb', '*.decls'), ('text/x-bb',)),
    'BlitzMaxLexer': ('pip._vendor.pygments.lexers.basic', 'BlitzMax', ('blitzmax', 'bmax'), ('*.bmx',), ('text/x-bmx',)),
    'BnfLexer': ('pip._vendor.pygments.lexers.grammar_notation', 'BNF', ('bnf',), ('*.bnf',), ('text/x-bnf',)),
    'BoaLexer': ('pip._vendor.pygments.lexers.boa', 'Boa', ('boa',), ('*.boa',), ()),
    'BooLexer': ('pip._vendor.pygments.lexers.dotnet', 'Boo', ('boo',), ('*.boo',), ('text/x-boo',)),
    'BoogieLexer': ('pip._vendor.pygments.lexers.verification', 'Boogie', ('boogie',), ('*.bpl',), ()),
    'BrainfuckLexer': ('pip._vendor.pygments.lexers.esoteric', 'Brainfuck', ('brainfuck', 'bf'), ('*.bf', '*.b'), ('application/x-brainfuck',)),
    'BugsLexer': ('pip._vendor.pygments.lexers.modeling', 'BUGS', ('bugs', 'winbugs', 'openbugs'), ('*.bug',), ()),
    'CAmkESLexer': ('pip._vendor.pygments.lexers.esoteric', 'CAmkES', ('camkes', 'idl4'), ('*.camkes', '*.idl4'), ()),
    'CLexer': ('pip._vendor.pygments.lexers.c_cpp', 'C', ('c',), ('*.c', '*.h', '*.idc', '*.x[bp]m'), ('text/x-chdr', 'text/x-csrc', 'image/x-xbitmap', 'image/x-xpixmap')),
    'CMakeLexer': ('pip._vendor.pygments.lexers.make', 'CMake', ('cmake',), ('*.cmake', 'CMakeLists.txt'), ('text/x-cmake',)),
    'CObjdumpLexer': ('pip._vendor.pygments.lexers.asm', 'c-objdump', ('c-objdump',), ('*.c-objdump',), ('text/x-c-objdump',)),
    'CPSALexer': ('pip._vendor.pygments.lexers.lisp', 'CPSA', ('cpsa',), ('*.cpsa',), ()),
    'CSSUL4Lexer': ('pip._vendor.pygments.lexers.ul4', 'CSS+UL4', ('css+ul4',), ('*.cssul4',), ()),
    'CSharpAspxLexer': ('pip._vendor.pygments.lexers.dotnet', 'aspx-cs', ('aspx-cs',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()),
    'CSharpLexer': ('pip._vendor.pygments.lexers.dotnet', 'C#', ('csharp', 'c#', 'cs'), ('*.cs',), ('text/x-csharp',)),
    'Ca65Lexer': ('pip._vendor.pygments.lexers.asm', 'ca65 assembler', ('ca65',), ('*.s',), ()),
    'CadlLexer': ('pip._vendor.pygments.lexers.archetype', 'cADL', ('cadl',), ('*.cadl',), ()),
    'CapDLLexer': ('pip._vendor.pygments.lexers.esoteric', 'CapDL', ('capdl',), ('*.cdl',), ()),
    'CapnProtoLexer': ('pip._vendor.pygments.lexers.capnproto', "Cap'n Proto", ('capnp',), ('*.capnp',), ()),
    'CarbonLexer': ('pip._vendor.pygments.lexers.carbon', 'Carbon', ('carbon',), ('*.carbon',), ('text/x-carbon',)),
    'CbmBasicV2Lexer': ('pip._vendor.pygments.lexers.basic', 'CBM BASIC V2', ('cbmbas',), ('*.bas',), ()),
    'CddlLexer': ('pip._vendor.pygments.lexers.cddl', 'CDDL', ('cddl',), ('*.cddl',), ('text/x-cddl',)),
    'CeylonLexer': ('pip._vendor.pygments.lexers.jvm', 'Ceylon', ('ceylon',), ('*.ceylon',), ('text/x-ceylon',)),
    'Cfengine3Lexer': ('pip._vendor.pygments.lexers.configs', 'CFEngine3', ('cfengine3', 'cf3'), ('*.cf',), ()),
    'ChaiscriptLexer': ('pip._vendor.pygments.lexers.scripting', 'ChaiScript', ('chaiscript', 'chai'), ('*.chai',), ('text/x-chaiscript', 'application/x-chaiscript')),
    'ChapelLexer': ('pip._vendor.pygments.lexers.chapel', 'Chapel', ('chapel', 'chpl'), ('*.chpl',), ()),
    'CharmciLexer': ('pip._vendor.pygments.lexers.c_like', 'Charmci', ('charmci',), ('*.ci',), ()),
    'CheetahHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Cheetah', ('html+cheetah', 'html+spitfire', 'htmlcheetah'), (), ('text/html+cheetah', 'text/html+spitfire')),
    'CheetahJavascriptLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+Cheetah', ('javascript+cheetah', 'js+cheetah', 'javascript+spitfire', 'js+spitfire'), (), ('application/x-javascript+cheetah', 'text/x-javascript+cheetah', 'text/javascript+cheetah', 'application/x-javascript+spitfire', 'text/x-javascript+spitfire', 'text/javascript+spitfire')),
    'CheetahLexer': ('pip._vendor.pygments.lexers.templates', 'Cheetah', ('cheetah', 'spitfire'), ('*.tmpl', '*.spt'), ('application/x-cheetah', 'application/x-spitfire')),
    'CheetahXmlLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Cheetah', ('xml+cheetah', 'xml+spitfire'), (), ('application/xml+cheetah', 'application/xml+spitfire')),
    'CirruLexer': ('pip._vendor.pygments.lexers.webmisc', 'Cirru', ('cirru',), ('*.cirru',), ('text/x-cirru',)),
    'ClayLexer': ('pip._vendor.pygments.lexers.c_like', 'Clay', ('clay',), ('*.clay',), ('text/x-clay',)),
    'CleanLexer': ('pip._vendor.pygments.lexers.clean', 'Clean', ('clean',), ('*.icl', '*.dcl'), ()),
    'ClojureLexer': ('pip._vendor.pygments.lexers.jvm', 'Clojure', ('clojure', 'clj'), ('*.clj', '*.cljc'), ('text/x-clojure', 'application/x-clojure')),
    'ClojureScriptLexer': ('pip._vendor.pygments.lexers.jvm', 'ClojureScript', ('clojurescript', 'cljs'), ('*.cljs',), ('text/x-clojurescript', 'application/x-clojurescript')),
    'CobolFreeformatLexer': ('pip._vendor.pygments.lexers.business', 'COBOLFree', ('cobolfree',), ('*.cbl', '*.CBL'), ()),
    'CobolLexer': ('pip._vendor.pygments.lexers.business', 'COBOL', ('cobol',), ('*.cob', '*.COB', '*.cpy', '*.CPY'), ('text/x-cobol',)),
    'CoffeeScriptLexer': ('pip._vendor.pygments.lexers.javascript', 'CoffeeScript', ('coffeescript', 'coffee-script', 'coffee'), ('*.coffee',), ('text/coffeescript',)),
    'ColdfusionCFCLexer': ('pip._vendor.pygments.lexers.templates', 'Coldfusion CFC', ('cfc',), ('*.cfc',), ()),
    'ColdfusionHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'Coldfusion HTML', ('cfm',), ('*.cfm', '*.cfml'), ('application/x-coldfusion',)),
    'ColdfusionLexer': ('pip._vendor.pygments.lexers.templates', 'cfstatement', ('cfs',), (), ()),
    'Comal80Lexer': ('pip._vendor.pygments.lexers.comal', 'COMAL-80', ('comal', 'comal80'), ('*.cml', '*.comal'), ()),
    'CommonLispLexer': ('pip._vendor.pygments.lexers.lisp', 'Common Lisp', ('common-lisp', 'cl', 'lisp'), ('*.cl', '*.lisp'), ('text/x-common-lisp',)),
    'ComponentPascalLexer': ('pip._vendor.pygments.lexers.oberon', 'Component Pascal', ('componentpascal', 'cp'), ('*.cp', '*.cps'), ('text/x-component-pascal',)),
    'CoqLexer': ('pip._vendor.pygments.lexers.theorem', 'Coq', ('coq',), ('*.v',), ('text/x-coq',)),
    'CplintLexer': ('pip._vendor.pygments.lexers.cplint', 'cplint', ('cplint',), ('*.ecl', '*.prolog', '*.pro', '*.pl', '*.P', '*.lpad', '*.cpl'), ('text/x-cplint',)),
    'CppLexer': ('pip._vendor.pygments.lexers.c_cpp', 'C++', ('cpp', 'c++'), ('*.cpp', '*.hpp', '*.c++', '*.h++', '*.cc', '*.hh', '*.cxx', '*.hxx', '*.C', '*.H', '*.cp', '*.CPP', '*.tpp'), ('text/x-c++hdr', 'text/x-c++src')),
    'CppObjdumpLexer': ('pip._vendor.pygments.lexers.asm', 'cpp-objdump', ('cpp-objdump', 'c++-objdumb', 'cxx-objdump'), ('*.cpp-objdump', '*.c++-objdump', '*.cxx-objdump'), ('text/x-cpp-objdump',)),
    'CrmshLexer': ('pip._vendor.pygments.lexers.dsls', 'Crmsh', ('crmsh', 'pcmk'), ('*.crmsh', '*.pcmk'), ()),
    'CrocLexer': ('pip._vendor.pygments.lexers.d', 'Croc', ('croc',), ('*.croc',), ('text/x-crocsrc',)),
    'CryptolLexer': ('pip._vendor.pygments.lexers.haskell', 'Cryptol', ('cryptol', 'cry'), ('*.cry',), ('text/x-cryptol',)),
    'CrystalLexer': ('pip._vendor.pygments.lexers.crystal', 'Crystal', ('cr', 'crystal'), ('*.cr',), ('text/x-crystal',)),
    'CsoundDocumentLexer': ('pip._vendor.pygments.lexers.csound', 'Csound Document', ('csound-document', 'csound-csd'), ('*.csd',), ()),
    'CsoundOrchestraLexer': ('pip._vendor.pygments.lexers.csound', 'Csound Orchestra', ('csound', 'csound-orc'), ('*.orc', '*.udo'), ()),
    'CsoundScoreLexer': ('pip._vendor.pygments.lexers.csound', 'Csound Score', ('csound-score', 'csound-sco'), ('*.sco',), ()),
    'CssDjangoLexer': ('pip._vendor.pygments.lexers.templates', 'CSS+Django/Jinja', ('css+django', 'css+jinja'), ('*.css.j2', '*.css.jinja2'), ('text/css+django', 'text/css+jinja')),
    'CssErbLexer': ('pip._vendor.pygments.lexers.templates', 'CSS+Ruby', ('css+ruby', 'css+erb'), (), ('text/css+ruby',)),
    'CssGenshiLexer': ('pip._vendor.pygments.lexers.templates', 'CSS+Genshi Text', ('css+genshitext', 'css+genshi'), (), ('text/css+genshi',)),
    'CssLexer': ('pip._vendor.pygments.lexers.css', 'CSS', ('css',), ('*.css',), ('text/css',)),
    'CssPhpLexer': ('pip._vendor.pygments.lexers.templates', 'CSS+PHP', ('css+php',), (), ('text/css+php',)),
    'CssSmartyLexer': ('pip._vendor.pygments.lexers.templates', 'CSS+Smarty', ('css+smarty',), (), ('text/css+smarty',)),
    'CudaLexer': ('pip._vendor.pygments.lexers.c_like', 'CUDA', ('cuda', 'cu'), ('*.cu', '*.cuh'), ('text/x-cuda',)),
    'CypherLexer': ('pip._vendor.pygments.lexers.graph', 'Cypher', ('cypher',), ('*.cyp', '*.cypher'), ()),
    'CythonLexer': ('pip._vendor.pygments.lexers.python', 'Cython', ('cython', 'pyx', 'pyrex'), ('*.pyx', '*.pxd', '*.pxi'), ('text/x-cython', 'application/x-cython')),
    'DLexer': ('pip._vendor.pygments.lexers.d', 'D', ('d',), ('*.d', '*.di'), ('text/x-dsrc',)),
    'DObjdumpLexer': ('pip._vendor.pygments.lexers.asm', 'd-objdump', ('d-objdump',), ('*.d-objdump',), ('text/x-d-objdump',)),
    'DarcsPatchLexer': ('pip._vendor.pygments.lexers.diff', 'Darcs Patch', ('dpatch',), ('*.dpatch', '*.darcspatch'), ()),
    'DartLexer': ('pip._vendor.pygments.lexers.javascript', 'Dart', ('dart',), ('*.dart',), ('text/x-dart',)),
    'Dasm16Lexer': ('pip._vendor.pygments.lexers.asm', 'DASM16', ('dasm16',), ('*.dasm16', '*.dasm'), ('text/x-dasm16',)),
    'DaxLexer': ('pip._vendor.pygments.lexers.dax', 'Dax', ('dax',), ('*.dax',), ()),
    'DebianControlLexer': ('pip._vendor.pygments.lexers.installers', 'Debian Control file', ('debcontrol', 'control'), ('control',), ()),
    'DelphiLexer': ('pip._vendor.pygments.lexers.pascal', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas', '*.dpr'), ('text/x-pascal',)),
    'DevicetreeLexer': ('pip._vendor.pygments.lexers.devicetree', 'Devicetree', ('devicetree', 'dts'), ('*.dts', '*.dtsi'), ('text/x-c',)),
    'DgLexer': ('pip._vendor.pygments.lexers.python', 'dg', ('dg',), ('*.dg',), ('text/x-dg',)),
    'DiffLexer': ('pip._vendor.pygments.lexers.diff', 'Diff', ('diff', 'udiff'), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch')),
    'DjangoLexer': ('pip._vendor.pygments.lexers.templates', 'Django/Jinja', ('django', 'jinja'), (), ('application/x-django-templating', 'application/x-jinja')),
    'DockerLexer': ('pip._vendor.pygments.lexers.configs', 'Docker', ('docker', 'dockerfile'), ('Dockerfile', '*.docker'), ('text/x-dockerfile-config',)),
    'DtdLexer': ('pip._vendor.pygments.lexers.html', 'DTD', ('dtd',), ('*.dtd',), ('application/xml-dtd',)),
    'DuelLexer': ('pip._vendor.pygments.lexers.webmisc', 'Duel', ('duel', 'jbst', 'jsonml+bst'), ('*.duel', '*.jbst'), ('text/x-duel', 'text/x-jbst')),
    'DylanConsoleLexer': ('pip._vendor.pygments.lexers.dylan', 'Dylan session', ('dylan-console', 'dylan-repl'), ('*.dylan-console',), ('text/x-dylan-console',)),
    'DylanLexer': ('pip._vendor.pygments.lexers.dylan', 'Dylan', ('dylan',), ('*.dylan', '*.dyl', '*.intr'), ('text/x-dylan',)),
    'DylanLidLexer': ('pip._vendor.pygments.lexers.dylan', 'DylanLID', ('dylan-lid', 'lid'), ('*.lid', '*.hdp'), ('text/x-dylan-lid',)),
    'ECLLexer': ('pip._vendor.pygments.lexers.ecl', 'ECL', ('ecl',), ('*.ecl',), ('application/x-ecl',)),
    'ECLexer': ('pip._vendor.pygments.lexers.c_like', 'eC', ('ec',), ('*.ec', '*.eh'), ('text/x-echdr', 'text/x-ecsrc')),
    'EarlGreyLexer': ('pip._vendor.pygments.lexers.javascript', 'Earl Grey', ('earl-grey', 'earlgrey', 'eg'), ('*.eg',), ('text/x-earl-grey',)),
    'EasytrieveLexer': ('pip._vendor.pygments.lexers.scripting', 'Easytrieve', ('easytrieve',), ('*.ezt', '*.mac'), ('text/x-easytrieve',)),
    'EbnfLexer': ('pip._vendor.pygments.lexers.parsers', 'EBNF', ('ebnf',), ('*.ebnf',), ('text/x-ebnf',)),
    'EiffelLexer': ('pip._vendor.pygments.lexers.eiffel', 'Eiffel', ('eiffel',), ('*.e',), ('text/x-eiffel',)),
    'ElixirConsoleLexer': ('pip._vendor.pygments.lexers.erlang', 'Elixir iex session', ('iex',), (), ('text/x-elixir-shellsession',)),
    'ElixirLexer': ('pip._vendor.pygments.lexers.erlang', 'Elixir', ('elixir', 'ex', 'exs'), ('*.ex', '*.eex', '*.exs', '*.leex'), ('text/x-elixir',)),
    'ElmLexer': ('pip._vendor.pygments.lexers.elm', 'Elm', ('elm',), ('*.elm',), ('text/x-elm',)),
    'ElpiLexer': ('pip._vendor.pygments.lexers.elpi', 'Elpi', ('elpi',), ('*.elpi',), ('text/x-elpi',)),
    'EmacsLispLexer': ('pip._vendor.pygments.lexers.lisp', 'EmacsLisp', ('emacs-lisp', 'elisp', 'emacs'), ('*.el',), ('text/x-elisp', 'application/x-elisp')),
    'EmailLexer': ('pip._vendor.pygments.lexers.email', 'E-mail', ('email', 'eml'), ('*.eml',), ('message/rfc822',)),
    'ErbLexer': ('pip._vendor.pygments.lexers.templates', 'ERB', ('erb',), (), ('application/x-ruby-templating',)),
    'ErlangLexer': ('pip._vendor.pygments.lexers.erlang', 'Erlang', ('erlang',), ('*.erl', '*.hrl', '*.es', '*.escript'), ('text/x-erlang',)),
    'ErlangShellLexer': ('pip._vendor.pygments.lexers.erlang', 'Erlang erl session', ('erl',), ('*.erl-sh',), ('text/x-erl-shellsession',)),
    'EvoqueHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Evoque', ('html+evoque',), ('*.html',), ('text/html+evoque',)),
    'EvoqueLexer': ('pip._vendor.pygments.lexers.templates', 'Evoque', ('evoque',), ('*.evoque',), ('application/x-evoque',)),
    'EvoqueXmlLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Evoque', ('xml+evoque',), ('*.xml',), ('application/xml+evoque',)),
    'ExeclineLexer': ('pip._vendor.pygments.lexers.shell', 'execline', ('execline',), ('*.exec',), ()),
    'EzhilLexer': ('pip._vendor.pygments.lexers.ezhil', 'Ezhil', ('ezhil',), ('*.n',), ('text/x-ezhil',)),
    'FSharpLexer': ('pip._vendor.pygments.lexers.dotnet', 'F#', ('fsharp', 'f#'), ('*.fs', '*.fsi', '*.fsx'), ('text/x-fsharp',)),
    'FStarLexer': ('pip._vendor.pygments.lexers.ml', 'FStar', ('fstar',), ('*.fst', '*.fsti'), ('text/x-fstar',)),
    'FactorLexer': ('pip._vendor.pygments.lexers.factor', 'Factor', ('factor',), ('*.factor',), ('text/x-factor',)),
    'FancyLexer': ('pip._vendor.pygments.lexers.ruby', 'Fancy', ('fancy', 'fy'), ('*.fy', '*.fancypack'), ('text/x-fancysrc',)),
    'FantomLexer': ('pip._vendor.pygments.lexers.fantom', 'Fantom', ('fan',), ('*.fan',), ('application/x-fantom',)),
    'FelixLexer': ('pip._vendor.pygments.lexers.felix', 'Felix', ('felix', 'flx'), ('*.flx', '*.flxh'), ('text/x-felix',)),
    'FennelLexer': ('pip._vendor.pygments.lexers.lisp', 'Fennel', ('fennel', 'fnl'), ('*.fnl',), ()),
    'FiftLexer': ('pip._vendor.pygments.lexers.fift', 'Fift', ('fift', 'fif'), ('*.fif',), ()),
    'FishShellLexer': ('pip._vendor.pygments.lexers.shell', 'Fish', ('fish', 'fishshell'), ('*.fish', '*.load'), ('application/x-fish',)),
    'FlatlineLexer': ('pip._vendor.pygments.lexers.dsls', 'Flatline', ('flatline',), (), ('text/x-flatline',)),
    'FloScriptLexer': ('pip._vendor.pygments.lexers.floscript', 'FloScript', ('floscript', 'flo'), ('*.flo',), ()),
    'ForthLexer': ('pip._vendor.pygments.lexers.forth', 'Forth', ('forth',), ('*.frt', '*.fs'), ('application/x-forth',)),
    'FortranFixedLexer': ('pip._vendor.pygments.lexers.fortran', 'FortranFixed', ('fortranfixed',), ('*.f', '*.F'), ()),
    'FortranLexer': ('pip._vendor.pygments.lexers.fortran', 'Fortran', ('fortran', 'f90'), ('*.f03', '*.f90', '*.F03', '*.F90'), ('text/x-fortran',)),
    'FoxProLexer': ('pip._vendor.pygments.lexers.foxpro', 'FoxPro', ('foxpro', 'vfp', 'clipper', 'xbase'), ('*.PRG', '*.prg'), ()),
    'FreeFemLexer': ('pip._vendor.pygments.lexers.freefem', 'Freefem', ('freefem',), ('*.edp',), ('text/x-freefem',)),
    'FuncLexer': ('pip._vendor.pygments.lexers.func', 'FunC', ('func', 'fc'), ('*.fc', '*.func'), ()),
    'FutharkLexer': ('pip._vendor.pygments.lexers.futhark', 'Futhark', ('futhark',), ('*.fut',), ('text/x-futhark',)),
    'GAPConsoleLexer': ('pip._vendor.pygments.lexers.algebra', 'GAP session', ('gap-console', 'gap-repl'), ('*.tst',), ()),
    'GAPLexer': ('pip._vendor.pygments.lexers.algebra', 'GAP', ('gap',), ('*.g', '*.gd', '*.gi', '*.gap'), ()),
    'GDScriptLexer': ('pip._vendor.pygments.lexers.gdscript', 'GDScript', ('gdscript', 'gd'), ('*.gd',), ('text/x-gdscript', 'application/x-gdscript')),
    'GLShaderLexer': ('pip._vendor.pygments.lexers.graphics', 'GLSL', ('glsl',), ('*.vert', '*.frag', '*.geo'), ('text/x-glslsrc',)),
    'GSQLLexer': ('pip._vendor.pygments.lexers.gsql', 'GSQL', ('gsql',), ('*.gsql',), ()),
    'GasLexer': ('pip._vendor.pygments.lexers.asm', 'GAS', ('gas', 'asm'), ('*.s', '*.S'), ('text/x-gas',)),
    'GcodeLexer': ('pip._vendor.pygments.lexers.gcodelexer', 'g-code', ('gcode',), ('*.gcode',), ()),
    'GenshiLexer': ('pip._vendor.pygments.lexers.templates', 'Genshi', ('genshi', 'kid', 'xml+genshi', 'xml+kid'), ('*.kid',), ('application/x-genshi', 'application/x-kid')),
    'GenshiTextLexer': ('pip._vendor.pygments.lexers.templates', 'Genshi Text', ('genshitext',), (), ('application/x-genshi-text', 'text/x-genshi')),
    'GettextLexer': ('pip._vendor.pygments.lexers.textfmts', 'Gettext Catalog', ('pot', 'po'), ('*.pot', '*.po'), ('application/x-gettext', 'text/x-gettext', 'text/gettext')),
    'GherkinLexer': ('pip._vendor.pygments.lexers.testing', 'Gherkin', ('gherkin', 'cucumber'), ('*.feature',), ('text/x-gherkin',)),
    'GnuplotLexer': ('pip._vendor.pygments.lexers.graphics', 'Gnuplot', ('gnuplot',), ('*.plot', '*.plt'), ('text/x-gnuplot',)),
    'GoLexer': ('pip._vendor.pygments.lexers.go', 'Go', ('go', 'golang'), ('*.go',), ('text/x-gosrc',)),
    'GoloLexer': ('pip._vendor.pygments.lexers.jvm', 'Golo', ('golo',), ('*.golo',), ()),
    'GoodDataCLLexer': ('pip._vendor.pygments.lexers.business', 'GoodData-CL', ('gooddata-cl',), ('*.gdc',), ('text/x-gooddata-cl',)),
    'GosuLexer': ('pip._vendor.pygments.lexers.jvm', 'Gosu', ('gosu',), ('*.gs', '*.gsx', '*.gsp', '*.vark'), ('text/x-gosu',)),
    'GosuTemplateLexer': ('pip._vendor.pygments.lexers.jvm', 'Gosu Template', ('gst',), ('*.gst',), ('text/x-gosu-template',)),
    'GraphvizLexer': ('pip._vendor.pygments.lexers.graphviz', 'Graphviz', ('graphviz', 'dot'), ('*.gv', '*.dot'), ('text/x-graphviz', 'text/vnd.graphviz')),
    'GroffLexer': ('pip._vendor.pygments.lexers.markup', 'Groff', ('groff', 'nroff', 'man'), ('*.[1-9]', '*.man', '*.1p', '*.3pm'), ('application/x-troff', 'text/troff')),
    'GroovyLexer': ('pip._vendor.pygments.lexers.jvm', 'Groovy', ('groovy',), ('*.groovy', '*.gradle'), ('text/x-groovy',)),
    'HLSLShaderLexer': ('pip._vendor.pygments.lexers.graphics', 'HLSL', ('hlsl',), ('*.hlsl', '*.hlsli'), ('text/x-hlsl',)),
    'HTMLUL4Lexer': ('pip._vendor.pygments.lexers.ul4', 'HTML+UL4', ('html+ul4',), ('*.htmlul4',), ()),
    'HamlLexer': ('pip._vendor.pygments.lexers.html', 'Haml', ('haml',), ('*.haml',), ('text/x-haml',)),
    'HandlebarsHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Handlebars', ('html+handlebars',), ('*.handlebars', '*.hbs'), ('text/html+handlebars', 'text/x-handlebars-template')),
    'HandlebarsLexer': ('pip._vendor.pygments.lexers.templates', 'Handlebars', ('handlebars',), (), ()),
    'HaskellLexer': ('pip._vendor.pygments.lexers.haskell', 'Haskell', ('haskell', 'hs'), ('*.hs',), ('text/x-haskell',)),
    'HaxeLexer': ('pip._vendor.pygments.lexers.haxe', 'Haxe', ('haxe', 'hxsl', 'hx'), ('*.hx', '*.hxsl'), ('text/haxe', 'text/x-haxe', 'text/x-hx')),
    'HexdumpLexer': ('pip._vendor.pygments.lexers.hexdump', 'Hexdump', ('hexdump',), (), ()),
    'HsailLexer': ('pip._vendor.pygments.lexers.asm', 'HSAIL', ('hsail', 'hsa'), ('*.hsail',), ('text/x-hsail',)),
    'HspecLexer': ('pip._vendor.pygments.lexers.haskell', 'Hspec', ('hspec',), ('*Spec.hs',), ()),
    'HtmlDjangoLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Django/Jinja', ('html+django', 'html+jinja', 'htmldjango'), ('*.html.j2', '*.htm.j2', '*.xhtml.j2', '*.html.jinja2', '*.htm.jinja2', '*.xhtml.jinja2'), ('text/html+django', 'text/html+jinja')),
    'HtmlGenshiLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Genshi', ('html+genshi', 'html+kid'), (), ('text/html+genshi',)),
    'HtmlLexer': ('pip._vendor.pygments.lexers.html', 'HTML', ('html',), ('*.html', '*.htm', '*.xhtml', '*.xslt'), ('text/html', 'application/xhtml+xml')),
    'HtmlPhpLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+PHP', ('html+php',), ('*.phtml',), ('application/x-php', 'application/x-httpd-php', 'application/x-httpd-php3', 'application/x-httpd-php4', 'application/x-httpd-php5')),
    'HtmlSmartyLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Smarty', ('html+smarty',), (), ('text/html+smarty',)),
    'HttpLexer': ('pip._vendor.pygments.lexers.textfmts', 'HTTP', ('http',), (), ()),
    'HxmlLexer': ('pip._vendor.pygments.lexers.haxe', 'Hxml', ('haxeml', 'hxml'), ('*.hxml',), ()),
    'HyLexer': ('pip._vendor.pygments.lexers.lisp', 'Hy', ('hylang',), ('*.hy',), ('text/x-hy', 'application/x-hy')),
    'HybrisLexer': ('pip._vendor.pygments.lexers.scripting', 'Hybris', ('hybris', 'hy'), ('*.hy', '*.hyb'), ('text/x-hybris', 'application/x-hybris')),
    'IDLLexer': ('pip._vendor.pygments.lexers.idl', 'IDL', ('idl',), ('*.pro',), ('text/idl',)),
    'IconLexer': ('pip._vendor.pygments.lexers.unicon', 'Icon', ('icon',), ('*.icon', '*.ICON'), ()),
    'IdrisLexer': ('pip._vendor.pygments.lexers.haskell', 'Idris', ('idris', 'idr'), ('*.idr',), ('text/x-idris',)),
    'IgorLexer': ('pip._vendor.pygments.lexers.igor', 'Igor', ('igor', 'igorpro'), ('*.ipf',), ('text/ipf',)),
    'Inform6Lexer': ('pip._vendor.pygments.lexers.int_fiction', 'Inform 6', ('inform6', 'i6'), ('*.inf',), ()),
    'Inform6TemplateLexer': ('pip._vendor.pygments.lexers.int_fiction', 'Inform 6 template', ('i6t',), ('*.i6t',), ()),
    'Inform7Lexer': ('pip._vendor.pygments.lexers.int_fiction', 'Inform 7', ('inform7', 'i7'), ('*.ni', '*.i7x'), ()),
    'IniLexer': ('pip._vendor.pygments.lexers.configs', 'INI', ('ini', 'cfg', 'dosini'), ('*.ini', '*.cfg', '*.inf', '.editorconfig', '*.service', '*.socket', '*.device', '*.mount', '*.automount', '*.swap', '*.target', '*.path', '*.timer', '*.slice', '*.scope'), ('text/x-ini', 'text/inf')),
    'IoLexer': ('pip._vendor.pygments.lexers.iolang', 'Io', ('io',), ('*.io',), ('text/x-iosrc',)),
    'IokeLexer': ('pip._vendor.pygments.lexers.jvm', 'Ioke', ('ioke', 'ik'), ('*.ik',), ('text/x-iokesrc',)),
    'IrcLogsLexer': ('pip._vendor.pygments.lexers.textfmts', 'IRC logs', ('irc',), ('*.weechatlog',), ('text/x-irclog',)),
    'IsabelleLexer': ('pip._vendor.pygments.lexers.theorem', 'Isabelle', ('isabelle',), ('*.thy',), ('text/x-isabelle',)),
    'JLexer': ('pip._vendor.pygments.lexers.j', 'J', ('j',), ('*.ijs',), ('text/x-j',)),
    'JMESPathLexer': ('pip._vendor.pygments.lexers.jmespath', 'JMESPath', ('jmespath', 'jp'), ('*.jp',), ()),
    'JSLTLexer': ('pip._vendor.pygments.lexers.jslt', 'JSLT', ('jslt',), ('*.jslt',), ('text/x-jslt',)),
    'JagsLexer': ('pip._vendor.pygments.lexers.modeling', 'JAGS', ('jags',), ('*.jag', '*.bug'), ()),
    'JasminLexer': ('pip._vendor.pygments.lexers.jvm', 'Jasmin', ('jasmin', 'jasminxt'), ('*.j',), ()),
    'JavaLexer': ('pip._vendor.pygments.lexers.jvm', 'Java', ('java',), ('*.java',), ('text/x-java',)),
    'JavascriptDjangoLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+Django/Jinja', ('javascript+django', 'js+django', 'javascript+jinja', 'js+jinja'), ('*.js.j2', '*.js.jinja2'), ('application/x-javascript+django', 'application/x-javascript+jinja', 'text/x-javascript+django', 'text/x-javascript+jinja', 'text/javascript+django', 'text/javascript+jinja')),
    'JavascriptErbLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+Ruby', ('javascript+ruby', 'js+ruby', 'javascript+erb', 'js+erb'), (), ('application/x-javascript+ruby', 'text/x-javascript+ruby', 'text/javascript+ruby')),
    'JavascriptGenshiLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+Genshi Text', ('js+genshitext', 'js+genshi', 'javascript+genshitext', 'javascript+genshi'), (), ('application/x-javascript+genshi', 'text/x-javascript+genshi', 'text/javascript+genshi')),
    'JavascriptLexer': ('pip._vendor.pygments.lexers.javascript', 'JavaScript', ('javascript', 'js'), ('*.js', '*.jsm', '*.mjs', '*.cjs'), ('application/javascript', 'application/x-javascript', 'text/x-javascript', 'text/javascript')),
    'JavascriptPhpLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+PHP', ('javascript+php', 'js+php'), (), ('application/x-javascript+php', 'text/x-javascript+php', 'text/javascript+php')),
    'JavascriptSmartyLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+Smarty', ('javascript+smarty', 'js+smarty'), (), ('application/x-javascript+smarty', 'text/x-javascript+smarty', 'text/javascript+smarty')),
    'JavascriptUL4Lexer': ('pip._vendor.pygments.lexers.ul4', 'Javascript+UL4', ('js+ul4',), ('*.jsul4',), ()),
    'JclLexer': ('pip._vendor.pygments.lexers.scripting', 'JCL', ('jcl',), ('*.jcl',), ('text/x-jcl',)),
    'JsgfLexer': ('pip._vendor.pygments.lexers.grammar_notation', 'JSGF', ('jsgf',), ('*.jsgf',), ('application/jsgf', 'application/x-jsgf', 'text/jsgf')),
    'JsonBareObjectLexer': ('pip._vendor.pygments.lexers.data', 'JSONBareObject', (), (), ()),
    'JsonLdLexer': ('pip._vendor.pygments.lexers.data', 'JSON-LD', ('jsonld', 'json-ld'), ('*.jsonld',), ('application/ld+json',)),
    'JsonLexer': ('pip._vendor.pygments.lexers.data', 'JSON', ('json', 'json-object'), ('*.json', 'Pipfile.lock'), ('application/json', 'application/json-object')),
    'JsonnetLexer': ('pip._vendor.pygments.lexers.jsonnet', 'Jsonnet', ('jsonnet',), ('*.jsonnet', '*.libsonnet'), ()),
    'JspLexer': ('pip._vendor.pygments.lexers.templates', 'Java Server Page', ('jsp',), ('*.jsp',), ('application/x-jsp',)),
    'JuliaConsoleLexer': ('pip._vendor.pygments.lexers.julia', 'Julia console', ('jlcon', 'julia-repl'), (), ()),
    'JuliaLexer': ('pip._vendor.pygments.lexers.julia', 'Julia', ('julia', 'jl'), ('*.jl',), ('text/x-julia', 'application/x-julia')),
    'JuttleLexer': ('pip._vendor.pygments.lexers.javascript', 'Juttle', ('juttle',), ('*.juttle',), ('application/juttle', 'application/x-juttle', 'text/x-juttle', 'text/juttle')),
    'KLexer': ('pip._vendor.pygments.lexers.q', 'K', ('k',), ('*.k',), ()),
    'KalLexer': ('pip._vendor.pygments.lexers.javascript', 'Kal', ('kal',), ('*.kal',), ('text/kal', 'application/kal')),
    'KconfigLexer': ('pip._vendor.pygments.lexers.configs', 'Kconfig', ('kconfig', 'menuconfig', 'linux-config', 'kernel-config'), ('Kconfig*', '*Config.in*', 'external.in*', 'standard-modules.in'), ('text/x-kconfig',)),
    'KernelLogLexer': ('pip._vendor.pygments.lexers.textfmts', 'Kernel log', ('kmsg', 'dmesg'), ('*.kmsg', '*.dmesg'), ()),
    'KokaLexer': ('pip._vendor.pygments.lexers.haskell', 'Koka', ('koka',), ('*.kk', '*.kki'), ('text/x-koka',)),
    'KotlinLexer': ('pip._vendor.pygments.lexers.jvm', 'Kotlin', ('kotlin',), ('*.kt', '*.kts'), ('text/x-kotlin',)),
    'KuinLexer': ('pip._vendor.pygments.lexers.kuin', 'Kuin', ('kuin',), ('*.kn',), ()),
    'LSLLexer': ('pip._vendor.pygments.lexers.scripting', 'LSL', ('lsl',), ('*.lsl',), ('text/x-lsl',)),
    'LassoCssLexer': ('pip._vendor.pygments.lexers.templates', 'CSS+Lasso', ('css+lasso',), (), ('text/css+lasso',)),
    'LassoHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Lasso', ('html+lasso',), (), ('text/html+lasso', 'application/x-httpd-lasso', 'application/x-httpd-lasso[89]')),
    'LassoJavascriptLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+Lasso', ('javascript+lasso', 'js+lasso'), (), ('application/x-javascript+lasso', 'text/x-javascript+lasso', 'text/javascript+lasso')),
    'LassoLexer': ('pip._vendor.pygments.lexers.javascript', 'Lasso', ('lasso', 'lassoscript'), ('*.lasso', '*.lasso[89]'), ('text/x-lasso',)),
    'LassoXmlLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Lasso', ('xml+lasso',), (), ('application/xml+lasso',)),
    'LeanLexer': ('pip._vendor.pygments.lexers.theorem', 'Lean', ('lean',), ('*.lean',), ('text/x-lean',)),
    'LessCssLexer': ('pip._vendor.pygments.lexers.css', 'LessCss', ('less',), ('*.less',), ('text/x-less-css',)),
    'LighttpdConfLexer': ('pip._vendor.pygments.lexers.configs', 'Lighttpd configuration file', ('lighttpd', 'lighty'), ('lighttpd.conf',), ('text/x-lighttpd-conf',)),
    'LilyPondLexer': ('pip._vendor.pygments.lexers.lilypond', 'LilyPond', ('lilypond',), ('*.ly',), ()),
    'LimboLexer': ('pip._vendor.pygments.lexers.inferno', 'Limbo', ('limbo',), ('*.b',), ('text/limbo',)),
    'LiquidLexer': ('pip._vendor.pygments.lexers.templates', 'liquid', ('liquid',), ('*.liquid',), ()),
    'LiterateAgdaLexer': ('pip._vendor.pygments.lexers.haskell', 'Literate Agda', ('literate-agda', 'lagda'), ('*.lagda',), ('text/x-literate-agda',)),
    'LiterateCryptolLexer': ('pip._vendor.pygments.lexers.haskell', 'Literate Cryptol', ('literate-cryptol', 'lcryptol', 'lcry'), ('*.lcry',), ('text/x-literate-cryptol',)),
    'LiterateHaskellLexer': ('pip._vendor.pygments.lexers.haskell', 'Literate Haskell', ('literate-haskell', 'lhaskell', 'lhs'), ('*.lhs',), ('text/x-literate-haskell',)),
    'LiterateIdrisLexer': ('pip._vendor.pygments.lexers.haskell', 'Literate Idris', ('literate-idris', 'lidris', 'lidr'), ('*.lidr',), ('text/x-literate-idris',)),
    'LiveScriptLexer': ('pip._vendor.pygments.lexers.javascript', 'LiveScript', ('livescript', 'live-script'), ('*.ls',), ('text/livescript',)),
    'LlvmLexer': ('pip._vendor.pygments.lexers.asm', 'LLVM', ('llvm',), ('*.ll',), ('text/x-llvm',)),
    'LlvmMirBodyLexer': ('pip._vendor.pygments.lexers.asm', 'LLVM-MIR Body', ('llvm-mir-body',), (), ()),
    'LlvmMirLexer': ('pip._vendor.pygments.lexers.asm', 'LLVM-MIR', ('llvm-mir',), ('*.mir',), ()),
    'LogosLexer': ('pip._vendor.pygments.lexers.objective', 'Logos', ('logos',), ('*.x', '*.xi', '*.xm', '*.xmi'), ('text/x-logos',)),
    'LogtalkLexer': ('pip._vendor.pygments.lexers.prolog', 'Logtalk', ('logtalk',), ('*.lgt', '*.logtalk'), ('text/x-logtalk',)),
    'LuaLexer': ('pip._vendor.pygments.lexers.scripting', 'Lua', ('lua',), ('*.lua', '*.wlua'), ('text/x-lua', 'application/x-lua')),
    'MCFunctionLexer': ('pip._vendor.pygments.lexers.minecraft', 'MCFunction', ('mcfunction', 'mcf'), ('*.mcfunction',), ('text/mcfunction',)),
    'MCSchemaLexer': ('pip._vendor.pygments.lexers.minecraft', 'MCSchema', ('mcschema',), ('*.mcschema',), ('text/mcschema',)),
    'MIMELexer': ('pip._vendor.pygments.lexers.mime', 'MIME', ('mime',), (), ('multipart/mixed', 'multipart/related', 'multipart/alternative')),
    'MIPSLexer': ('pip._vendor.pygments.lexers.mips', 'MIPS', ('mips',), ('*.mips', '*.MIPS'), ()),
    'MOOCodeLexer': ('pip._vendor.pygments.lexers.scripting', 'MOOCode', ('moocode', 'moo'), ('*.moo',), ('text/x-moocode',)),
    'MSDOSSessionLexer': ('pip._vendor.pygments.lexers.shell', 'MSDOS Session', ('doscon',), (), ()),
    'Macaulay2Lexer': ('pip._vendor.pygments.lexers.macaulay2', 'Macaulay2', ('macaulay2',), ('*.m2',), ()),
    'MakefileLexer': ('pip._vendor.pygments.lexers.make', 'Makefile', ('make', 'makefile', 'mf', 'bsdmake'), ('*.mak', '*.mk', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile'), ('text/x-makefile',)),
    'MakoCssLexer': ('pip._vendor.pygments.lexers.templates', 'CSS+Mako', ('css+mako',), (), ('text/css+mako',)),
    'MakoHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Mako', ('html+mako',), (), ('text/html+mako',)),
    'MakoJavascriptLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+Mako', ('javascript+mako', 'js+mako'), (), ('application/x-javascript+mako', 'text/x-javascript+mako', 'text/javascript+mako')),
    'MakoLexer': ('pip._vendor.pygments.lexers.templates', 'Mako', ('mako',), ('*.mao',), ('application/x-mako',)),
    'MakoXmlLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Mako', ('xml+mako',), (), ('application/xml+mako',)),
    'MaqlLexer': ('pip._vendor.pygments.lexers.business', 'MAQL', ('maql',), ('*.maql',), ('text/x-gooddata-maql', 'application/x-gooddata-maql')),
    'MarkdownLexer': ('pip._vendor.pygments.lexers.markup', 'Markdown', ('markdown', 'md'), ('*.md', '*.markdown'), ('text/x-markdown',)),
    'MaskLexer': ('pip._vendor.pygments.lexers.javascript', 'Mask', ('mask',), ('*.mask',), ('text/x-mask',)),
    'MasonLexer': ('pip._vendor.pygments.lexers.templates', 'Mason', ('mason',), ('*.m', '*.mhtml', '*.mc', '*.mi', 'autohandler', 'dhandler'), ('application/x-mason',)),
    'MathematicaLexer': ('pip._vendor.pygments.lexers.algebra', 'Mathematica', ('mathematica', 'mma', 'nb'), ('*.nb', '*.cdf', '*.nbp', '*.ma'), ('application/mathematica', 'application/vnd.wolfram.mathematica', 'application/vnd.wolfram.mathematica.package', 'application/vnd.wolfram.cdf')),
    'MatlabLexer': ('pip._vendor.pygments.lexers.matlab', 'Matlab', ('matlab',), ('*.m',), ('text/matlab',)),
    'MatlabSessionLexer': ('pip._vendor.pygments.lexers.matlab', 'Matlab session', ('matlabsession',), (), ()),
    'MaximaLexer': ('pip._vendor.pygments.lexers.maxima', 'Maxima', ('maxima', 'macsyma'), ('*.mac', '*.max'), ()),
    'MesonLexer': ('pip._vendor.pygments.lexers.meson', 'Meson', ('meson', 'meson.build'), ('meson.build', 'meson_options.txt'), ('text/x-meson',)),
    'MiniDLexer': ('pip._vendor.pygments.lexers.d', 'MiniD', ('minid',), (), ('text/x-minidsrc',)),
    'MiniScriptLexer': ('pip._vendor.pygments.lexers.scripting', 'MiniScript', ('miniscript', 'ms'), ('*.ms',), ('text/x-minicript', 'application/x-miniscript')),
    'ModelicaLexer': ('pip._vendor.pygments.lexers.modeling', 'Modelica', ('modelica',), ('*.mo',), ('text/x-modelica',)),
    'Modula2Lexer': ('pip._vendor.pygments.lexers.modula2', 'Modula-2', ('modula2', 'm2'), ('*.def', '*.mod'), ('text/x-modula2',)),
    'MoinWikiLexer': ('pip._vendor.pygments.lexers.markup', 'MoinMoin/Trac Wiki markup', ('trac-wiki', 'moin'), (), ('text/x-trac-wiki',)),
    'MonkeyLexer': ('pip._vendor.pygments.lexers.basic', 'Monkey', ('monkey',), ('*.monkey',), ('text/x-monkey',)),
    'MonteLexer': ('pip._vendor.pygments.lexers.monte', 'Monte', ('monte',), ('*.mt',), ()),
    'MoonScriptLexer': ('pip._vendor.pygments.lexers.scripting', 'MoonScript', ('moonscript', 'moon'), ('*.moon',), ('text/x-moonscript', 'application/x-moonscript')),
    'MoselLexer': ('pip._vendor.pygments.lexers.mosel', 'Mosel', ('mosel',), ('*.mos',), ()),
    'MozPreprocCssLexer': ('pip._vendor.pygments.lexers.markup', 'CSS+mozpreproc', ('css+mozpreproc',), ('*.css.in',), ()),
    'MozPreprocHashLexer': ('pip._vendor.pygments.lexers.markup', 'mozhashpreproc', ('mozhashpreproc',), (), ()),
    'MozPreprocJavascriptLexer': ('pip._vendor.pygments.lexers.markup', 'Javascript+mozpreproc', ('javascript+mozpreproc',), ('*.js.in',), ()),
    'MozPreprocPercentLexer': ('pip._vendor.pygments.lexers.markup', 'mozpercentpreproc', ('mozpercentpreproc',), (), ()),
    'MozPreprocXulLexer': ('pip._vendor.pygments.lexers.markup', 'XUL+mozpreproc', ('xul+mozpreproc',), ('*.xul.in',), ()),
    'MqlLexer': ('pip._vendor.pygments.lexers.c_like', 'MQL', ('mql', 'mq4', 'mq5', 'mql4', 'mql5'), ('*.mq4', '*.mq5', '*.mqh'), ('text/x-mql',)),
    'MscgenLexer': ('pip._vendor.pygments.lexers.dsls', 'Mscgen', ('mscgen', 'msc'), ('*.msc',), ()),
    'MuPADLexer': ('pip._vendor.pygments.lexers.algebra', 'MuPAD', ('mupad',), ('*.mu',), ()),
    'MxmlLexer': ('pip._vendor.pygments.lexers.actionscript', 'MXML', ('mxml',), ('*.mxml',), ()),
    'MySqlLexer': ('pip._vendor.pygments.lexers.sql', 'MySQL', ('mysql',), (), ('text/x-mysql',)),
    'MyghtyCssLexer': ('pip._vendor.pygments.lexers.templates', 'CSS+Myghty', ('css+myghty',), (), ('text/css+myghty',)),
    'MyghtyHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Myghty', ('html+myghty',), (), ('text/html+myghty',)),
    'MyghtyJavascriptLexer': ('pip._vendor.pygments.lexers.templates', 'JavaScript+Myghty', ('javascript+myghty', 'js+myghty'), (), ('application/x-javascript+myghty', 'text/x-javascript+myghty', 'text/javascript+mygthy')),
    'MyghtyLexer': ('pip._vendor.pygments.lexers.templates', 'Myghty', ('myghty',), ('*.myt', 'autodelegate'), ('application/x-myghty',)),
    'MyghtyXmlLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Myghty', ('xml+myghty',), (), ('application/xml+myghty',)),
    'NCLLexer': ('pip._vendor.pygments.lexers.ncl', 'NCL', ('ncl',), ('*.ncl',), ('text/ncl',)),
    'NSISLexer': ('pip._vendor.pygments.lexers.installers', 'NSIS', ('nsis', 'nsi', 'nsh'), ('*.nsi', '*.nsh'), ('text/x-nsis',)),
    'NasmLexer': ('pip._vendor.pygments.lexers.asm', 'NASM', ('nasm',), ('*.asm', '*.ASM', '*.nasm'), ('text/x-nasm',)),
    'NasmObjdumpLexer': ('pip._vendor.pygments.lexers.asm', 'objdump-nasm', ('objdump-nasm',), ('*.objdump-intel',), ('text/x-nasm-objdump',)),
    'NemerleLexer': ('pip._vendor.pygments.lexers.dotnet', 'Nemerle', ('nemerle',), ('*.n',), ('text/x-nemerle',)),
    'NesCLexer': ('pip._vendor.pygments.lexers.c_like', 'nesC', ('nesc',), ('*.nc',), ('text/x-nescsrc',)),
    'NestedTextLexer': ('pip._vendor.pygments.lexers.configs', 'NestedText', ('nestedtext', 'nt'), ('*.nt',), ()),
    'NewLispLexer': ('pip._vendor.pygments.lexers.lisp', 'NewLisp', ('newlisp',), ('*.lsp', '*.nl', '*.kif'), ('text/x-newlisp', 'application/x-newlisp')),
    'NewspeakLexer': ('pip._vendor.pygments.lexers.smalltalk', 'Newspeak', ('newspeak',), ('*.ns2',), ('text/x-newspeak',)),
    'NginxConfLexer': ('pip._vendor.pygments.lexers.configs', 'Nginx configuration file', ('nginx',), ('nginx.conf',), ('text/x-nginx-conf',)),
    'NimrodLexer': ('pip._vendor.pygments.lexers.nimrod', 'Nimrod', ('nimrod', 'nim'), ('*.nim', '*.nimrod'), ('text/x-nim',)),
    'NitLexer': ('pip._vendor.pygments.lexers.nit', 'Nit', ('nit',), ('*.nit',), ()),
    'NixLexer': ('pip._vendor.pygments.lexers.nix', 'Nix', ('nixos', 'nix'), ('*.nix',), ('text/x-nix',)),
    'NodeConsoleLexer': ('pip._vendor.pygments.lexers.javascript', 'Node.js REPL console session', ('nodejsrepl',), (), ('text/x-nodejsrepl',)),
    'NotmuchLexer': ('pip._vendor.pygments.lexers.textfmts', 'Notmuch', ('notmuch',), (), ()),
    'NuSMVLexer': ('pip._vendor.pygments.lexers.smv', 'NuSMV', ('nusmv',), ('*.smv',), ()),
    'NumPyLexer': ('pip._vendor.pygments.lexers.python', 'NumPy', ('numpy',), (), ()),
    'ObjdumpLexer': ('pip._vendor.pygments.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)),
    'ObjectiveCLexer': ('pip._vendor.pygments.lexers.objective', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m', '*.h'), ('text/x-objective-c',)),
    'ObjectiveCppLexer': ('pip._vendor.pygments.lexers.objective', 'Objective-C++', ('objective-c++', 'objectivec++', 'obj-c++', 'objc++'), ('*.mm', '*.hh'), ('text/x-objective-c++',)),
    'ObjectiveJLexer': ('pip._vendor.pygments.lexers.javascript', 'Objective-J', ('objective-j', 'objectivej', 'obj-j', 'objj'), ('*.j',), ('text/x-objective-j',)),
    'OcamlLexer': ('pip._vendor.pygments.lexers.ml', 'OCaml', ('ocaml',), ('*.ml', '*.mli', '*.mll', '*.mly'), ('text/x-ocaml',)),
    'OctaveLexer': ('pip._vendor.pygments.lexers.matlab', 'Octave', ('octave',), ('*.m',), ('text/octave',)),
    'OdinLexer': ('pip._vendor.pygments.lexers.archetype', 'ODIN', ('odin',), ('*.odin',), ('text/odin',)),
    'OmgIdlLexer': ('pip._vendor.pygments.lexers.c_like', 'OMG Interface Definition Language', ('omg-idl',), ('*.idl', '*.pidl'), ()),
    'OocLexer': ('pip._vendor.pygments.lexers.ooc', 'Ooc', ('ooc',), ('*.ooc',), ('text/x-ooc',)),
    'OpaLexer': ('pip._vendor.pygments.lexers.ml', 'Opa', ('opa',), ('*.opa',), ('text/x-opa',)),
    'OpenEdgeLexer': ('pip._vendor.pygments.lexers.business', 'OpenEdge ABL', ('openedge', 'abl', 'progress'), ('*.p', '*.cls'), ('text/x-openedge', 'application/x-openedge')),
    'OutputLexer': ('pip._vendor.pygments.lexers.special', 'Text output', ('output',), (), ()),
    'PacmanConfLexer': ('pip._vendor.pygments.lexers.configs', 'PacmanConf', ('pacmanconf',), ('pacman.conf',), ()),
    'PanLexer': ('pip._vendor.pygments.lexers.dsls', 'Pan', ('pan',), ('*.pan',), ()),
    'ParaSailLexer': ('pip._vendor.pygments.lexers.parasail', 'ParaSail', ('parasail',), ('*.psi', '*.psl'), ('text/x-parasail',)),
    'PawnLexer': ('pip._vendor.pygments.lexers.pawn', 'Pawn', ('pawn',), ('*.p', '*.pwn', '*.inc'), ('text/x-pawn',)),
    'PegLexer': ('pip._vendor.pygments.lexers.grammar_notation', 'PEG', ('peg',), ('*.peg',), ('text/x-peg',)),
    'Perl6Lexer': ('pip._vendor.pygments.lexers.perl', 'Perl6', ('perl6', 'pl6', 'raku'), ('*.pl', '*.pm', '*.nqp', '*.p6', '*.6pl', '*.p6l', '*.pl6', '*.6pm', '*.p6m', '*.pm6', '*.t', '*.raku', '*.rakumod', '*.rakutest', '*.rakudoc'), ('text/x-perl6', 'application/x-perl6')),
    'PerlLexer': ('pip._vendor.pygments.lexers.perl', 'Perl', ('perl', 'pl'), ('*.pl', '*.pm', '*.t', '*.perl'), ('text/x-perl', 'application/x-perl')),
    'PhixLexer': ('pip._vendor.pygments.lexers.phix', 'Phix', ('phix',), ('*.exw',), ('text/x-phix',)),
    'PhpLexer': ('pip._vendor.pygments.lexers.php', 'PHP', ('php', 'php3', 'php4', 'php5'), ('*.php', '*.php[345]', '*.inc'), ('text/x-php',)),
    'PigLexer': ('pip._vendor.pygments.lexers.jvm', 'Pig', ('pig',), ('*.pig',), ('text/x-pig',)),
    'PikeLexer': ('pip._vendor.pygments.lexers.c_like', 'Pike', ('pike',), ('*.pike', '*.pmod'), ('text/x-pike',)),
    'PkgConfigLexer': ('pip._vendor.pygments.lexers.configs', 'PkgConfig', ('pkgconfig',), ('*.pc',), ()),
    'PlPgsqlLexer': ('pip._vendor.pygments.lexers.sql', 'PL/pgSQL', ('plpgsql',), (), ('text/x-plpgsql',)),
    'PointlessLexer': ('pip._vendor.pygments.lexers.pointless', 'Pointless', ('pointless',), ('*.ptls',), ()),
    'PonyLexer': ('pip._vendor.pygments.lexers.pony', 'Pony', ('pony',), ('*.pony',), ()),
    'PortugolLexer': ('pip._vendor.pygments.lexers.pascal', 'Portugol', ('portugol',), ('*.alg', '*.portugol'), ()),
    'PostScriptLexer': ('pip._vendor.pygments.lexers.graphics', 'PostScript', ('postscript', 'postscr'), ('*.ps', '*.eps'), ('application/postscript',)),
    'PostgresConsoleLexer': ('pip._vendor.pygments.lexers.sql', 'PostgreSQL console (psql)', ('psql', 'postgresql-console', 'postgres-console'), (), ('text/x-postgresql-psql',)),
    'PostgresExplainLexer': ('pip._vendor.pygments.lexers.sql', 'PostgreSQL EXPLAIN dialect', ('postgres-explain',), ('*.explain',), ('text/x-postgresql-explain',)),
    'PostgresLexer': ('pip._vendor.pygments.lexers.sql', 'PostgreSQL SQL dialect', ('postgresql', 'postgres'), (), ('text/x-postgresql',)),
    'PovrayLexer': ('pip._vendor.pygments.lexers.graphics', 'POVRay', ('pov',), ('*.pov', '*.inc'), ('text/x-povray',)),
    'PowerShellLexer': ('pip._vendor.pygments.lexers.shell', 'PowerShell', ('powershell', 'pwsh', 'posh', 'ps1', 'psm1'), ('*.ps1', '*.psm1'), ('text/x-powershell',)),
    'PowerShellSessionLexer': ('pip._vendor.pygments.lexers.shell', 'PowerShell Session', ('pwsh-session', 'ps1con'), (), ()),
    'PraatLexer': ('pip._vendor.pygments.lexers.praat', 'Praat', ('praat',), ('*.praat', '*.proc', '*.psc'), ()),
    'ProcfileLexer': ('pip._vendor.pygments.lexers.procfile', 'Procfile', ('procfile',), ('Procfile',), ()),
    'PrologLexer': ('pip._vendor.pygments.lexers.prolog', 'Prolog', ('prolog',), ('*.ecl', '*.prolog', '*.pro', '*.pl'), ('text/x-prolog',)),
    'PromQLLexer': ('pip._vendor.pygments.lexers.promql', 'PromQL', ('promql',), ('*.promql',), ()),
    'PropertiesLexer': ('pip._vendor.pygments.lexers.configs', 'Properties', ('properties', 'jproperties'), ('*.properties',), ('text/x-java-properties',)),
    'ProtoBufLexer': ('pip._vendor.pygments.lexers.dsls', 'Protocol Buffer', ('protobuf', 'proto'), ('*.proto',), ()),
    'PsyshConsoleLexer': ('pip._vendor.pygments.lexers.php', 'PsySH console session for PHP', ('psysh',), (), ()),
    'PugLexer': ('pip._vendor.pygments.lexers.html', 'Pug', ('pug', 'jade'), ('*.pug', '*.jade'), ('text/x-pug', 'text/x-jade')),
    'PuppetLexer': ('pip._vendor.pygments.lexers.dsls', 'Puppet', ('puppet',), ('*.pp',), ()),
    'PyPyLogLexer': ('pip._vendor.pygments.lexers.console', 'PyPy Log', ('pypylog', 'pypy'), ('*.pypylog',), ('application/x-pypylog',)),
    'Python2Lexer': ('pip._vendor.pygments.lexers.python', 'Python 2.x', ('python2', 'py2'), (), ('text/x-python2', 'application/x-python2')),
    'Python2TracebackLexer': ('pip._vendor.pygments.lexers.python', 'Python 2.x Traceback', ('py2tb',), ('*.py2tb',), ('text/x-python2-traceback',)),
    'PythonConsoleLexer': ('pip._vendor.pygments.lexers.python', 'Python console session', ('pycon',), (), ('text/x-python-doctest',)),
    'PythonLexer': ('pip._vendor.pygments.lexers.python', 'Python', ('python', 'py', 'sage', 'python3', 'py3'), ('*.py', '*.pyw', '*.pyi', '*.jy', '*.sage', '*.sc', 'SConstruct', 'SConscript', '*.bzl', 'BUCK', 'BUILD', 'BUILD.bazel', 'WORKSPACE', '*.tac'), ('text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3')),
    'PythonTracebackLexer': ('pip._vendor.pygments.lexers.python', 'Python Traceback', ('pytb', 'py3tb'), ('*.pytb', '*.py3tb'), ('text/x-python-traceback', 'text/x-python3-traceback')),
    'PythonUL4Lexer': ('pip._vendor.pygments.lexers.ul4', 'Python+UL4', ('py+ul4',), ('*.pyul4',), ()),
    'QBasicLexer': ('pip._vendor.pygments.lexers.basic', 'QBasic', ('qbasic', 'basic'), ('*.BAS', '*.bas'), ('text/basic',)),
    'QLexer': ('pip._vendor.pygments.lexers.q', 'Q', ('q',), ('*.q',), ()),
    'QVToLexer': ('pip._vendor.pygments.lexers.qvt', 'QVTO', ('qvto', 'qvt'), ('*.qvto',), ()),
    'QlikLexer': ('pip._vendor.pygments.lexers.qlik', 'Qlik', ('qlik', 'qlikview', 'qliksense', 'qlikscript'), ('*.qvs', '*.qvw'), ()),
    'QmlLexer': ('pip._vendor.pygments.lexers.webmisc', 'QML', ('qml', 'qbs'), ('*.qml', '*.qbs'), ('application/x-qml', 'application/x-qt.qbs+qml')),
    'RConsoleLexer': ('pip._vendor.pygments.lexers.r', 'RConsole', ('rconsole', 'rout'), ('*.Rout',), ()),
    'RNCCompactLexer': ('pip._vendor.pygments.lexers.rnc', 'Relax-NG Compact', ('rng-compact', 'rnc'), ('*.rnc',), ()),
    'RPMSpecLexer': ('pip._vendor.pygments.lexers.installers', 'RPMSpec', ('spec',), ('*.spec',), ('text/x-rpm-spec',)),
    'RacketLexer': ('pip._vendor.pygments.lexers.lisp', 'Racket', ('racket', 'rkt'), ('*.rkt', '*.rktd', '*.rktl'), ('text/x-racket', 'application/x-racket')),
    'RagelCLexer': ('pip._vendor.pygments.lexers.parsers', 'Ragel in C Host', ('ragel-c',), ('*.rl',), ()),
    'RagelCppLexer': ('pip._vendor.pygments.lexers.parsers', 'Ragel in CPP Host', ('ragel-cpp',), ('*.rl',), ()),
    'RagelDLexer': ('pip._vendor.pygments.lexers.parsers', 'Ragel in D Host', ('ragel-d',), ('*.rl',), ()),
    'RagelEmbeddedLexer': ('pip._vendor.pygments.lexers.parsers', 'Embedded Ragel', ('ragel-em',), ('*.rl',), ()),
    'RagelJavaLexer': ('pip._vendor.pygments.lexers.parsers', 'Ragel in Java Host', ('ragel-java',), ('*.rl',), ()),
    'RagelLexer': ('pip._vendor.pygments.lexers.parsers', 'Ragel', ('ragel',), (), ()),
    'RagelObjectiveCLexer': ('pip._vendor.pygments.lexers.parsers', 'Ragel in Objective C Host', ('ragel-objc',), ('*.rl',), ()),
    'RagelRubyLexer': ('pip._vendor.pygments.lexers.parsers', 'Ragel in Ruby Host', ('ragel-ruby', 'ragel-rb'), ('*.rl',), ()),
    'RawTokenLexer': ('pip._vendor.pygments.lexers.special', 'Raw token data', (), (), ('application/x-pygments-tokens',)),
    'RdLexer': ('pip._vendor.pygments.lexers.r', 'Rd', ('rd',), ('*.Rd',), ('text/x-r-doc',)),
    'ReasonLexer': ('pip._vendor.pygments.lexers.ml', 'ReasonML', ('reasonml', 'reason'), ('*.re', '*.rei'), ('text/x-reasonml',)),
    'RebolLexer': ('pip._vendor.pygments.lexers.rebol', 'REBOL', ('rebol',), ('*.r', '*.r3', '*.reb'), ('text/x-rebol',)),
    'RedLexer': ('pip._vendor.pygments.lexers.rebol', 'Red', ('red', 'red/system'), ('*.red', '*.reds'), ('text/x-red', 'text/x-red-system')),
    'RedcodeLexer': ('pip._vendor.pygments.lexers.esoteric', 'Redcode', ('redcode',), ('*.cw',), ()),
    'RegeditLexer': ('pip._vendor.pygments.lexers.configs', 'reg', ('registry',), ('*.reg',), ('text/x-windows-registry',)),
    'ResourceLexer': ('pip._vendor.pygments.lexers.resource', 'ResourceBundle', ('resourcebundle', 'resource'), (), ()),
    'RexxLexer': ('pip._vendor.pygments.lexers.scripting', 'Rexx', ('rexx', 'arexx'), ('*.rexx', '*.rex', '*.rx', '*.arexx'), ('text/x-rexx',)),
    'RhtmlLexer': ('pip._vendor.pygments.lexers.templates', 'RHTML', ('rhtml', 'html+erb', 'html+ruby'), ('*.rhtml',), ('text/html+ruby',)),
    'RideLexer': ('pip._vendor.pygments.lexers.ride', 'Ride', ('ride',), ('*.ride',), ('text/x-ride',)),
    'RitaLexer': ('pip._vendor.pygments.lexers.rita', 'Rita', ('rita',), ('*.rita',), ('text/rita',)),
    'RoboconfGraphLexer': ('pip._vendor.pygments.lexers.roboconf', 'Roboconf Graph', ('roboconf-graph',), ('*.graph',), ()),
    'RoboconfInstancesLexer': ('pip._vendor.pygments.lexers.roboconf', 'Roboconf Instances', ('roboconf-instances',), ('*.instances',), ()),
    'RobotFrameworkLexer': ('pip._vendor.pygments.lexers.robotframework', 'RobotFramework', ('robotframework',), ('*.robot', '*.resource'), ('text/x-robotframework',)),
    'RqlLexer': ('pip._vendor.pygments.lexers.sql', 'RQL', ('rql',), ('*.rql',), ('text/x-rql',)),
    'RslLexer': ('pip._vendor.pygments.lexers.dsls', 'RSL', ('rsl',), ('*.rsl',), ('text/rsl',)),
    'RstLexer': ('pip._vendor.pygments.lexers.markup', 'reStructuredText', ('restructuredtext', 'rst', 'rest'), ('*.rst', '*.rest'), ('text/x-rst', 'text/prs.fallenstein.rst')),
    'RtsLexer': ('pip._vendor.pygments.lexers.trafficscript', 'TrafficScript', ('trafficscript', 'rts'), ('*.rts',), ()),
    'RubyConsoleLexer': ('pip._vendor.pygments.lexers.ruby', 'Ruby irb session', ('rbcon', 'irb'), (), ('text/x-ruby-shellsession',)),
    'RubyLexer': ('pip._vendor.pygments.lexers.ruby', 'Ruby', ('ruby', 'rb', 'duby'), ('*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec', '*.rbx', '*.duby', 'Gemfile', 'Vagrantfile'), ('text/x-ruby', 'application/x-ruby')),
    'RustLexer': ('pip._vendor.pygments.lexers.rust', 'Rust', ('rust', 'rs'), ('*.rs', '*.rs.in'), ('text/rust', 'text/x-rust')),
    'SASLexer': ('pip._vendor.pygments.lexers.sas', 'SAS', ('sas',), ('*.SAS', '*.sas'), ('text/x-sas', 'text/sas', 'application/x-sas')),
    'SLexer': ('pip._vendor.pygments.lexers.r', 'S', ('splus', 's', 'r'), ('*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'), ('text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', 'text/x-R', 'text/x-r-history', 'text/x-r-profile')),
    'SMLLexer': ('pip._vendor.pygments.lexers.ml', 'Standard ML', ('sml',), ('*.sml', '*.sig', '*.fun'), ('text/x-standardml', 'application/x-standardml')),
    'SNBTLexer': ('pip._vendor.pygments.lexers.minecraft', 'SNBT', ('snbt',), ('*.snbt',), ('text/snbt',)),
    'SarlLexer': ('pip._vendor.pygments.lexers.jvm', 'SARL', ('sarl',), ('*.sarl',), ('text/x-sarl',)),
    'SassLexer': ('pip._vendor.pygments.lexers.css', 'Sass', ('sass',), ('*.sass',), ('text/x-sass',)),
    'SaviLexer': ('pip._vendor.pygments.lexers.savi', 'Savi', ('savi',), ('*.savi',), ()),
    'ScalaLexer': ('pip._vendor.pygments.lexers.jvm', 'Scala', ('scala',), ('*.scala',), ('text/x-scala',)),
    'ScamlLexer': ('pip._vendor.pygments.lexers.html', 'Scaml', ('scaml',), ('*.scaml',), ('text/x-scaml',)),
    'ScdocLexer': ('pip._vendor.pygments.lexers.scdoc', 'scdoc', ('scdoc', 'scd'), ('*.scd', '*.scdoc'), ()),
    'SchemeLexer': ('pip._vendor.pygments.lexers.lisp', 'Scheme', ('scheme', 'scm'), ('*.scm', '*.ss'), ('text/x-scheme', 'application/x-scheme')),
    'ScilabLexer': ('pip._vendor.pygments.lexers.matlab', 'Scilab', ('scilab',), ('*.sci', '*.sce', '*.tst'), ('text/scilab',)),
    'ScssLexer': ('pip._vendor.pygments.lexers.css', 'SCSS', ('scss',), ('*.scss',), ('text/x-scss',)),
    'SedLexer': ('pip._vendor.pygments.lexers.textedit', 'Sed', ('sed', 'gsed', 'ssed'), ('*.sed', '*.[gs]sed'), ('text/x-sed',)),
    'ShExCLexer': ('pip._vendor.pygments.lexers.rdf', 'ShExC', ('shexc', 'shex'), ('*.shex',), ('text/shex',)),
    'ShenLexer': ('pip._vendor.pygments.lexers.lisp', 'Shen', ('shen',), ('*.shen',), ('text/x-shen', 'application/x-shen')),
    'SieveLexer': ('pip._vendor.pygments.lexers.sieve', 'Sieve', ('sieve',), ('*.siv', '*.sieve'), ()),
    'SilverLexer': ('pip._vendor.pygments.lexers.verification', 'Silver', ('silver',), ('*.sil', '*.vpr'), ()),
    'SingularityLexer': ('pip._vendor.pygments.lexers.configs', 'Singularity', ('singularity',), ('*.def', 'Singularity'), ()),
    'SlashLexer': ('pip._vendor.pygments.lexers.slash', 'Slash', ('slash',), ('*.sla',), ()),
    'SlimLexer': ('pip._vendor.pygments.lexers.webmisc', 'Slim', ('slim',), ('*.slim',), ('text/x-slim',)),
    'SlurmBashLexer': ('pip._vendor.pygments.lexers.shell', 'Slurm', ('slurm', 'sbatch'), ('*.sl',), ()),
    'SmaliLexer': ('pip._vendor.pygments.lexers.dalvik', 'Smali', ('smali',), ('*.smali',), ('text/smali',)),
    'SmalltalkLexer': ('pip._vendor.pygments.lexers.smalltalk', 'Smalltalk', ('smalltalk', 'squeak', 'st'), ('*.st',), ('text/x-smalltalk',)),
    'SmartGameFormatLexer': ('pip._vendor.pygments.lexers.sgf', 'SmartGameFormat', ('sgf',), ('*.sgf',), ()),
    'SmartyLexer': ('pip._vendor.pygments.lexers.templates', 'Smarty', ('smarty',), ('*.tpl',), ('application/x-smarty',)),
    'SmithyLexer': ('pip._vendor.pygments.lexers.smithy', 'Smithy', ('smithy',), ('*.smithy',), ()),
    'SnobolLexer': ('pip._vendor.pygments.lexers.snobol', 'Snobol', ('snobol',), ('*.snobol',), ('text/x-snobol',)),
    'SnowballLexer': ('pip._vendor.pygments.lexers.dsls', 'Snowball', ('snowball',), ('*.sbl',), ()),
    'SolidityLexer': ('pip._vendor.pygments.lexers.solidity', 'Solidity', ('solidity',), ('*.sol',), ()),
    'SophiaLexer': ('pip._vendor.pygments.lexers.sophia', 'Sophia', ('sophia',), ('*.aes',), ()),
    'SourcePawnLexer': ('pip._vendor.pygments.lexers.pawn', 'SourcePawn', ('sp',), ('*.sp',), ('text/x-sourcepawn',)),
    'SourcesListLexer': ('pip._vendor.pygments.lexers.installers', 'Debian Sourcelist', ('debsources', 'sourceslist', 'sources.list'), ('sources.list',), ()),
    'SparqlLexer': ('pip._vendor.pygments.lexers.rdf', 'SPARQL', ('sparql',), ('*.rq', '*.sparql'), ('application/sparql-query',)),
    'SpiceLexer': ('pip._vendor.pygments.lexers.spice', 'Spice', ('spice', 'spicelang'), ('*.spice',), ('text/x-spice',)),
    'SqlJinjaLexer': ('pip._vendor.pygments.lexers.templates', 'SQL+Jinja', ('sql+jinja',), ('*.sql', '*.sql.j2', '*.sql.jinja2'), ()),
    'SqlLexer': ('pip._vendor.pygments.lexers.sql', 'SQL', ('sql',), ('*.sql',), ('text/x-sql',)),
    'SqliteConsoleLexer': ('pip._vendor.pygments.lexers.sql', 'sqlite3con', ('sqlite3',), ('*.sqlite3-console',), ('text/x-sqlite3-console',)),
    'SquidConfLexer': ('pip._vendor.pygments.lexers.configs', 'SquidConf', ('squidconf', 'squid.conf', 'squid'), ('squid.conf',), ('text/x-squidconf',)),
    'SrcinfoLexer': ('pip._vendor.pygments.lexers.srcinfo', 'Srcinfo', ('srcinfo',), ('.SRCINFO',), ()),
    'SspLexer': ('pip._vendor.pygments.lexers.templates', 'Scalate Server Page', ('ssp',), ('*.ssp',), ('application/x-ssp',)),
    'StanLexer': ('pip._vendor.pygments.lexers.modeling', 'Stan', ('stan',), ('*.stan',), ()),
    'StataLexer': ('pip._vendor.pygments.lexers.stata', 'Stata', ('stata', 'do'), ('*.do', '*.ado'), ('text/x-stata', 'text/stata', 'application/x-stata')),
    'SuperColliderLexer': ('pip._vendor.pygments.lexers.supercollider', 'SuperCollider', ('supercollider', 'sc'), ('*.sc', '*.scd'), ('application/supercollider', 'text/supercollider')),
    'SwiftLexer': ('pip._vendor.pygments.lexers.objective', 'Swift', ('swift',), ('*.swift',), ('text/x-swift',)),
    'SwigLexer': ('pip._vendor.pygments.lexers.c_like', 'SWIG', ('swig',), ('*.swg', '*.i'), ('text/swig',)),
    'SystemVerilogLexer': ('pip._vendor.pygments.lexers.hdl', 'systemverilog', ('systemverilog', 'sv'), ('*.sv', '*.svh'), ('text/x-systemverilog',)),
    'TAPLexer': ('pip._vendor.pygments.lexers.testing', 'TAP', ('tap',), ('*.tap',), ()),
    'TNTLexer': ('pip._vendor.pygments.lexers.tnt', 'Typographic Number Theory', ('tnt',), ('*.tnt',), ()),
    'TOMLLexer': ('pip._vendor.pygments.lexers.configs', 'TOML', ('toml',), ('*.toml', 'Pipfile', 'poetry.lock'), ()),
    'Tads3Lexer': ('pip._vendor.pygments.lexers.int_fiction', 'TADS 3', ('tads3',), ('*.t',), ()),
    'TalLexer': ('pip._vendor.pygments.lexers.tal', 'Tal', ('tal', 'uxntal'), ('*.tal',), ('text/x-uxntal',)),
    'TasmLexer': ('pip._vendor.pygments.lexers.asm', 'TASM', ('tasm',), ('*.asm', '*.ASM', '*.tasm'), ('text/x-tasm',)),
    'TclLexer': ('pip._vendor.pygments.lexers.tcl', 'Tcl', ('tcl',), ('*.tcl', '*.rvt'), ('text/x-tcl', 'text/x-script.tcl', 'application/x-tcl')),
    'TcshLexer': ('pip._vendor.pygments.lexers.shell', 'Tcsh', ('tcsh', 'csh'), ('*.tcsh', '*.csh'), ('application/x-csh',)),
    'TcshSessionLexer': ('pip._vendor.pygments.lexers.shell', 'Tcsh Session', ('tcshcon',), (), ()),
    'TeaTemplateLexer': ('pip._vendor.pygments.lexers.templates', 'Tea', ('tea',), ('*.tea',), ('text/x-tea',)),
    'TealLexer': ('pip._vendor.pygments.lexers.teal', 'teal', ('teal',), ('*.teal',), ()),
    'TeraTermLexer': ('pip._vendor.pygments.lexers.teraterm', 'Tera Term macro', ('teratermmacro', 'teraterm', 'ttl'), ('*.ttl',), ('text/x-teratermmacro',)),
    'TermcapLexer': ('pip._vendor.pygments.lexers.configs', 'Termcap', ('termcap',), ('termcap', 'termcap.src'), ()),
    'TerminfoLexer': ('pip._vendor.pygments.lexers.configs', 'Terminfo', ('terminfo',), ('terminfo', 'terminfo.src'), ()),
    'TerraformLexer': ('pip._vendor.pygments.lexers.configs', 'Terraform', ('terraform', 'tf', 'hcl'), ('*.tf', '*.hcl'), ('application/x-tf', 'application/x-terraform')),
    'TexLexer': ('pip._vendor.pygments.lexers.markup', 'TeX', ('tex', 'latex'), ('*.tex', '*.aux', '*.toc'), ('text/x-tex', 'text/x-latex')),
    'TextLexer': ('pip._vendor.pygments.lexers.special', 'Text only', ('text',), ('*.txt',), ('text/plain',)),
    'ThingsDBLexer': ('pip._vendor.pygments.lexers.thingsdb', 'ThingsDB', ('ti', 'thingsdb'), ('*.ti',), ()),
    'ThriftLexer': ('pip._vendor.pygments.lexers.dsls', 'Thrift', ('thrift',), ('*.thrift',), ('application/x-thrift',)),
    'TiddlyWiki5Lexer': ('pip._vendor.pygments.lexers.markup', 'tiddler', ('tid',), ('*.tid',), ('text/vnd.tiddlywiki',)),
    'TlbLexer': ('pip._vendor.pygments.lexers.tlb', 'Tl-b', ('tlb',), ('*.tlb',), ()),
    'TodotxtLexer': ('pip._vendor.pygments.lexers.textfmts', 'Todotxt', ('todotxt',), ('todo.txt', '*.todotxt'), ('text/x-todo',)),
    'TransactSqlLexer': ('pip._vendor.pygments.lexers.sql', 'Transact-SQL', ('tsql', 't-sql'), ('*.sql',), ('text/x-tsql',)),
    'TreetopLexer': ('pip._vendor.pygments.lexers.parsers', 'Treetop', ('treetop',), ('*.treetop', '*.tt'), ()),
    'TurtleLexer': ('pip._vendor.pygments.lexers.rdf', 'Turtle', ('turtle',), ('*.ttl',), ('text/turtle', 'application/x-turtle')),
    'TwigHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Twig', ('html+twig',), ('*.twig',), ('text/html+twig',)),
    'TwigLexer': ('pip._vendor.pygments.lexers.templates', 'Twig', ('twig',), (), ('application/x-twig',)),
    'TypeScriptLexer': ('pip._vendor.pygments.lexers.javascript', 'TypeScript', ('typescript', 'ts'), ('*.ts',), ('application/x-typescript', 'text/x-typescript')),
    'TypoScriptCssDataLexer': ('pip._vendor.pygments.lexers.typoscript', 'TypoScriptCssData', ('typoscriptcssdata',), (), ()),
    'TypoScriptHtmlDataLexer': ('pip._vendor.pygments.lexers.typoscript', 'TypoScriptHtmlData', ('typoscripthtmldata',), (), ()),
    'TypoScriptLexer': ('pip._vendor.pygments.lexers.typoscript', 'TypoScript', ('typoscript',), ('*.typoscript',), ('text/x-typoscript',)),
    'UL4Lexer': ('pip._vendor.pygments.lexers.ul4', 'UL4', ('ul4',), ('*.ul4',), ()),
    'UcodeLexer': ('pip._vendor.pygments.lexers.unicon', 'ucode', ('ucode',), ('*.u', '*.u1', '*.u2'), ()),
    'UniconLexer': ('pip._vendor.pygments.lexers.unicon', 'Unicon', ('unicon',), ('*.icn',), ('text/unicon',)),
    'UnixConfigLexer': ('pip._vendor.pygments.lexers.configs', 'Unix/Linux config files', ('unixconfig', 'linuxconfig'), (), ()),
    'UrbiscriptLexer': ('pip._vendor.pygments.lexers.urbi', 'UrbiScript', ('urbiscript',), ('*.u',), ('application/x-urbiscript',)),
    'UsdLexer': ('pip._vendor.pygments.lexers.usd', 'USD', ('usd', 'usda'), ('*.usd', '*.usda'), ()),
    'VBScriptLexer': ('pip._vendor.pygments.lexers.basic', 'VBScript', ('vbscript',), ('*.vbs', '*.VBS'), ()),
    'VCLLexer': ('pip._vendor.pygments.lexers.varnish', 'VCL', ('vcl',), ('*.vcl',), ('text/x-vclsrc',)),
    'VCLSnippetLexer': ('pip._vendor.pygments.lexers.varnish', 'VCLSnippets', ('vclsnippets', 'vclsnippet'), (), ('text/x-vclsnippet',)),
    'VCTreeStatusLexer': ('pip._vendor.pygments.lexers.console', 'VCTreeStatus', ('vctreestatus',), (), ()),
    'VGLLexer': ('pip._vendor.pygments.lexers.dsls', 'VGL', ('vgl',), ('*.rpf',), ()),
    'ValaLexer': ('pip._vendor.pygments.lexers.c_like', 'Vala', ('vala', 'vapi'), ('*.vala', '*.vapi'), ('text/x-vala',)),
    'VbNetAspxLexer': ('pip._vendor.pygments.lexers.dotnet', 'aspx-vb', ('aspx-vb',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()),
    'VbNetLexer': ('pip._vendor.pygments.lexers.dotnet', 'VB.net', ('vb.net', 'vbnet', 'lobas', 'oobas', 'sobas'), ('*.vb', '*.bas'), ('text/x-vbnet', 'text/x-vba')),
    'VelocityHtmlLexer': ('pip._vendor.pygments.lexers.templates', 'HTML+Velocity', ('html+velocity',), (), ('text/html+velocity',)),
    'VelocityLexer': ('pip._vendor.pygments.lexers.templates', 'Velocity', ('velocity',), ('*.vm', '*.fhtml'), ()),
    'VelocityXmlLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Velocity', ('xml+velocity',), (), ('application/xml+velocity',)),
    'VerilogLexer': ('pip._vendor.pygments.lexers.hdl', 'verilog', ('verilog', 'v'), ('*.v',), ('text/x-verilog',)),
    'VhdlLexer': ('pip._vendor.pygments.lexers.hdl', 'vhdl', ('vhdl',), ('*.vhdl', '*.vhd'), ('text/x-vhdl',)),
    'VimLexer': ('pip._vendor.pygments.lexers.textedit', 'VimL', ('vim',), ('*.vim', '.vimrc', '.exrc', '.gvimrc', '_vimrc', '_exrc', '_gvimrc', 'vimrc', 'gvimrc'), ('text/x-vim',)),
    'WDiffLexer': ('pip._vendor.pygments.lexers.diff', 'WDiff', ('wdiff',), ('*.wdiff',), ()),
    'WatLexer': ('pip._vendor.pygments.lexers.webassembly', 'WebAssembly', ('wast', 'wat'), ('*.wat', '*.wast'), ()),
    'WebIDLLexer': ('pip._vendor.pygments.lexers.webidl', 'Web IDL', ('webidl',), ('*.webidl',), ()),
    'WgslLexer': ('pip._vendor.pygments.lexers.wgsl', 'WebGPU Shading Language', ('wgsl',), ('*.wgsl',), ('text/wgsl',)),
    'WhileyLexer': ('pip._vendor.pygments.lexers.whiley', 'Whiley', ('whiley',), ('*.whiley',), ('text/x-whiley',)),
    'WikitextLexer': ('pip._vendor.pygments.lexers.markup', 'Wikitext', ('wikitext', 'mediawiki'), (), ('text/x-wiki',)),
    'WoWTocLexer': ('pip._vendor.pygments.lexers.wowtoc', 'World of Warcraft TOC', ('wowtoc',), ('*.toc',), ()),
    'WrenLexer': ('pip._vendor.pygments.lexers.wren', 'Wren', ('wren',), ('*.wren',), ()),
    'X10Lexer': ('pip._vendor.pygments.lexers.x10', 'X10', ('x10', 'xten'), ('*.x10',), ('text/x-x10',)),
    'XMLUL4Lexer': ('pip._vendor.pygments.lexers.ul4', 'XML+UL4', ('xml+ul4',), ('*.xmlul4',), ()),
    'XQueryLexer': ('pip._vendor.pygments.lexers.webmisc', 'XQuery', ('xquery', 'xqy', 'xq', 'xql', 'xqm'), ('*.xqy', '*.xquery', '*.xq', '*.xql', '*.xqm'), ('text/xquery', 'application/xquery')),
    'XmlDjangoLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Django/Jinja', ('xml+django', 'xml+jinja'), ('*.xml.j2', '*.xml.jinja2'), ('application/xml+django', 'application/xml+jinja')),
    'XmlErbLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Ruby', ('xml+ruby', 'xml+erb'), (), ('application/xml+ruby',)),
    'XmlLexer': ('pip._vendor.pygments.lexers.html', 'XML', ('xml',), ('*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl', '*.wsf'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml')),
    'XmlPhpLexer': ('pip._vendor.pygments.lexers.templates', 'XML+PHP', ('xml+php',), (), ('application/xml+php',)),
    'XmlSmartyLexer': ('pip._vendor.pygments.lexers.templates', 'XML+Smarty', ('xml+smarty',), (), ('application/xml+smarty',)),
    'XorgLexer': ('pip._vendor.pygments.lexers.xorg', 'Xorg', ('xorg.conf',), ('xorg.conf',), ()),
    'XppLexer': ('pip._vendor.pygments.lexers.dotnet', 'X++', ('xpp', 'x++'), ('*.xpp',), ()),
    'XsltLexer': ('pip._vendor.pygments.lexers.html', 'XSLT', ('xslt',), ('*.xsl', '*.xslt', '*.xpl'), ('application/xsl+xml', 'application/xslt+xml')),
    'XtendLexer': ('pip._vendor.pygments.lexers.jvm', 'Xtend', ('xtend',), ('*.xtend',), ('text/x-xtend',)),
    'XtlangLexer': ('pip._vendor.pygments.lexers.lisp', 'xtlang', ('extempore',), ('*.xtm',), ()),
    'YamlJinjaLexer': ('pip._vendor.pygments.lexers.templates', 'YAML+Jinja', ('yaml+jinja', 'salt', 'sls'), ('*.sls', '*.yaml.j2', '*.yml.j2', '*.yaml.jinja2', '*.yml.jinja2'), ('text/x-yaml+jinja', 'text/x-sls')),
    'YamlLexer': ('pip._vendor.pygments.lexers.data', 'YAML', ('yaml',), ('*.yaml', '*.yml'), ('text/x-yaml',)),
    'YangLexer': ('pip._vendor.pygments.lexers.yang', 'YANG', ('yang',), ('*.yang',), ('application/yang',)),
    'ZeekLexer': ('pip._vendor.pygments.lexers.dsls', 'Zeek', ('zeek', 'bro'), ('*.zeek', '*.bro'), ()),
    'ZephirLexer': ('pip._vendor.pygments.lexers.php', 'Zephir', ('zephir',), ('*.zep',), ()),
    'ZigLexer': ('pip._vendor.pygments.lexers.zig', 'Zig', ('zig',), ('*.zig',), ('text/zig',)),
    'apdlexer': ('pip._vendor.pygments.lexers.apdlexer', 'ANSYS parametric design language', ('ansys', 'apdl'), ('*.ans',), ()),
}
python3.12/site-packages/pip/_vendor/pygments/lexers/__init__.py000064400000027542151732703020020630 0ustar00"""
    pygments.lexers
    ~~~~~~~~~~~~~~~

    Pygments lexers.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re
import sys
import types
import fnmatch
from os.path import basename

from pip._vendor.pygments.lexers._mapping import LEXERS
from pip._vendor.pygments.modeline import get_filetype_from_buffer
from pip._vendor.pygments.plugin import find_plugin_lexers
from pip._vendor.pygments.util import ClassNotFound, guess_decode

COMPAT = {
    'Python3Lexer': 'PythonLexer',
    'Python3TracebackLexer': 'PythonTracebackLexer',
}

__all__ = ['get_lexer_by_name', 'get_lexer_for_filename', 'find_lexer_class',
           'guess_lexer', 'load_lexer_from_file'] + list(LEXERS) + list(COMPAT)

_lexer_cache = {}
_pattern_cache = {}


def _fn_matches(fn, glob):
    """Return whether the supplied file name fn matches pattern filename."""
    if glob not in _pattern_cache:
        pattern = _pattern_cache[glob] = re.compile(fnmatch.translate(glob))
        return pattern.match(fn)
    return _pattern_cache[glob].match(fn)


def _load_lexers(module_name):
    """Load a lexer (and all others in the module too)."""
    mod = __import__(module_name, None, None, ['__all__'])
    for lexer_name in mod.__all__:
        cls = getattr(mod, lexer_name)
        _lexer_cache[cls.name] = cls


def get_all_lexers(plugins=True):
    """Return a generator of tuples in the form ``(name, aliases,
    filenames, mimetypes)`` of all know lexers.

    If *plugins* is true (the default), plugin lexers supplied by entrypoints
    are also returned.  Otherwise, only builtin ones are considered.
    """
    for item in LEXERS.values():
        yield item[1:]
    if plugins:
        for lexer in find_plugin_lexers():
            yield lexer.name, lexer.aliases, lexer.filenames, lexer.mimetypes


def find_lexer_class(name):
    """
    Return the `Lexer` subclass that with the *name* attribute as given by
    the *name* argument.
    """
    if name in _lexer_cache:
        return _lexer_cache[name]
    # lookup builtin lexers
    for module_name, lname, aliases, _, _ in LEXERS.values():
        if name == lname:
            _load_lexers(module_name)
            return _lexer_cache[name]
    # continue with lexers from setuptools entrypoints
    for cls in find_plugin_lexers():
        if cls.name == name:
            return cls


def find_lexer_class_by_name(_alias):
    """
    Return the `Lexer` subclass that has `alias` in its aliases list, without
    instantiating it.

    Like `get_lexer_by_name`, but does not instantiate the class.

    Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is
    found.

    .. versionadded:: 2.2
    """
    if not _alias:
        raise ClassNotFound('no lexer for alias %r found' % _alias)
    # lookup builtin lexers
    for module_name, name, aliases, _, _ in LEXERS.values():
        if _alias.lower() in aliases:
            if name not in _lexer_cache:
                _load_lexers(module_name)
            return _lexer_cache[name]
    # continue with lexers from setuptools entrypoints
    for cls in find_plugin_lexers():
        if _alias.lower() in cls.aliases:
            return cls
    raise ClassNotFound('no lexer for alias %r found' % _alias)


def get_lexer_by_name(_alias, **options):
    """
    Return an instance of a `Lexer` subclass that has `alias` in its
    aliases list. The lexer is given the `options` at its
    instantiation.

    Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is
    found.
    """
    if not _alias:
        raise ClassNotFound('no lexer for alias %r found' % _alias)

    # lookup builtin lexers
    for module_name, name, aliases, _, _ in LEXERS.values():
        if _alias.lower() in aliases:
            if name not in _lexer_cache:
                _load_lexers(module_name)
            return _lexer_cache[name](**options)
    # continue with lexers from setuptools entrypoints
    for cls in find_plugin_lexers():
        if _alias.lower() in cls.aliases:
            return cls(**options)
    raise ClassNotFound('no lexer for alias %r found' % _alias)


def load_lexer_from_file(filename, lexername="CustomLexer", **options):
    """Load a lexer from a file.

    This method expects a file located relative to the current working
    directory, which contains a Lexer class. By default, it expects the
    Lexer to be name CustomLexer; you can specify your own class name
    as the second argument to this function.

    Users should be very careful with the input, because this method
    is equivalent to running eval on the input file.

    Raises ClassNotFound if there are any problems importing the Lexer.

    .. versionadded:: 2.2
    """
    try:
        # This empty dict will contain the namespace for the exec'd file
        custom_namespace = {}
        with open(filename, 'rb') as f:
            exec(f.read(), custom_namespace)
        # Retrieve the class `lexername` from that namespace
        if lexername not in custom_namespace:
            raise ClassNotFound('no valid %s class found in %s' %
                                (lexername, filename))
        lexer_class = custom_namespace[lexername]
        # And finally instantiate it with the options
        return lexer_class(**options)
    except OSError as err:
        raise ClassNotFound('cannot read %s: %s' % (filename, err))
    except ClassNotFound:
        raise
    except Exception as err:
        raise ClassNotFound('error when loading custom lexer: %s' % err)


def find_lexer_class_for_filename(_fn, code=None):
    """Get a lexer for a filename.

    If multiple lexers match the filename pattern, use ``analyse_text()`` to
    figure out which one is more appropriate.

    Returns None if not found.
    """
    matches = []
    fn = basename(_fn)
    for modname, name, _, filenames, _ in LEXERS.values():
        for filename in filenames:
            if _fn_matches(fn, filename):
                if name not in _lexer_cache:
                    _load_lexers(modname)
                matches.append((_lexer_cache[name], filename))
    for cls in find_plugin_lexers():
        for filename in cls.filenames:
            if _fn_matches(fn, filename):
                matches.append((cls, filename))

    if isinstance(code, bytes):
        # decode it, since all analyse_text functions expect unicode
        code = guess_decode(code)

    def get_rating(info):
        cls, filename = info
        # explicit patterns get a bonus
        bonus = '*' not in filename and 0.5 or 0
        # The class _always_ defines analyse_text because it's included in
        # the Lexer class.  The default implementation returns None which
        # gets turned into 0.0.  Run scripts/detect_missing_analyse_text.py
        # to find lexers which need it overridden.
        if code:
            return cls.analyse_text(code) + bonus, cls.__name__
        return cls.priority + bonus, cls.__name__

    if matches:
        matches.sort(key=get_rating)
        # print "Possible lexers, after sort:", matches
        return matches[-1][0]


def get_lexer_for_filename(_fn, code=None, **options):
    """Get a lexer for a filename.

    Return a `Lexer` subclass instance that has a filename pattern
    matching `fn`. The lexer is given the `options` at its
    instantiation.

    Raise :exc:`pygments.util.ClassNotFound` if no lexer for that filename
    is found.

    If multiple lexers match the filename pattern, use their ``analyse_text()``
    methods to figure out which one is more appropriate.
    """
    res = find_lexer_class_for_filename(_fn, code)
    if not res:
        raise ClassNotFound('no lexer for filename %r found' % _fn)
    return res(**options)


def get_lexer_for_mimetype(_mime, **options):
    """
    Return a `Lexer` subclass instance that has `mime` in its mimetype
    list. The lexer is given the `options` at its instantiation.

    Will raise :exc:`pygments.util.ClassNotFound` if not lexer for that mimetype
    is found.
    """
    for modname, name, _, _, mimetypes in LEXERS.values():
        if _mime in mimetypes:
            if name not in _lexer_cache:
                _load_lexers(modname)
            return _lexer_cache[name](**options)
    for cls in find_plugin_lexers():
        if _mime in cls.mimetypes:
            return cls(**options)
    raise ClassNotFound('no lexer for mimetype %r found' % _mime)


def _iter_lexerclasses(plugins=True):
    """Return an iterator over all lexer classes."""
    for key in sorted(LEXERS):
        module_name, name = LEXERS[key][:2]
        if name not in _lexer_cache:
            _load_lexers(module_name)
        yield _lexer_cache[name]
    if plugins:
        yield from find_plugin_lexers()


def guess_lexer_for_filename(_fn, _text, **options):
    """
    As :func:`guess_lexer()`, but only lexers which have a pattern in `filenames`
    or `alias_filenames` that matches `filename` are taken into consideration.

    :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can
    handle the content.
    """
    fn = basename(_fn)
    primary = {}
    matching_lexers = set()
    for lexer in _iter_lexerclasses():
        for filename in lexer.filenames:
            if _fn_matches(fn, filename):
                matching_lexers.add(lexer)
                primary[lexer] = True
        for filename in lexer.alias_filenames:
            if _fn_matches(fn, filename):
                matching_lexers.add(lexer)
                primary[lexer] = False
    if not matching_lexers:
        raise ClassNotFound('no lexer for filename %r found' % fn)
    if len(matching_lexers) == 1:
        return matching_lexers.pop()(**options)
    result = []
    for lexer in matching_lexers:
        rv = lexer.analyse_text(_text)
        if rv == 1.0:
            return lexer(**options)
        result.append((rv, lexer))

    def type_sort(t):
        # sort by:
        # - analyse score
        # - is primary filename pattern?
        # - priority
        # - last resort: class name
        return (t[0], primary[t[1]], t[1].priority, t[1].__name__)
    result.sort(key=type_sort)

    return result[-1][1](**options)


def guess_lexer(_text, **options):
    """
    Return a `Lexer` subclass instance that's guessed from the text in
    `text`. For that, the :meth:`.analyse_text()` method of every known lexer
    class is called with the text as argument, and the lexer which returned the
    highest value will be instantiated and returned.

    :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can
    handle the content.
    """

    if not isinstance(_text, str):
        inencoding = options.get('inencoding', options.get('encoding'))
        if inencoding:
            _text = _text.decode(inencoding or 'utf8')
        else:
            _text, _ = guess_decode(_text)

    # try to get a vim modeline first
    ft = get_filetype_from_buffer(_text)

    if ft is not None:
        try:
            return get_lexer_by_name(ft, **options)
        except ClassNotFound:
            pass

    best_lexer = [0.0, None]
    for lexer in _iter_lexerclasses():
        rv = lexer.analyse_text(_text)
        if rv == 1.0:
            return lexer(**options)
        if rv > best_lexer[0]:
            best_lexer[:] = (rv, lexer)
    if not best_lexer[0] or best_lexer[1] is None:
        raise ClassNotFound('no lexer matching the text found')
    return best_lexer[1](**options)


class _automodule(types.ModuleType):
    """Automatically import lexers."""

    def __getattr__(self, name):
        info = LEXERS.get(name)
        if info:
            _load_lexers(info[0])
            cls = _lexer_cache[info[1]]
            setattr(self, name, cls)
            return cls
        if name in COMPAT:
            return getattr(self, COMPAT[name])
        raise AttributeError(name)


oldmod = sys.modules[__name__]
newmod = _automodule(__name__)
newmod.__dict__.update(oldmod.__dict__)
sys.modules[__name__] = newmod
del newmod.newmod, newmod.oldmod, newmod.sys, newmod.types
python3.12/site-packages/pip/_vendor/pygments/lexers/python.py000064400000150260151732703020020404 0ustar00"""
    pygments.lexers.python
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Python and related languages.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re
import keyword

from pip._vendor.pygments.lexer import DelegatingLexer, Lexer, RegexLexer, include, \
    bygroups, using, default, words, combined, do_insertions, this, line_re
from pip._vendor.pygments.util import get_bool_opt, shebang_matches
from pip._vendor.pygments.token import Text, Comment, Operator, Keyword, Name, String, \
    Number, Punctuation, Generic, Other, Error, Whitespace
from pip._vendor.pygments import unistring as uni

__all__ = ['PythonLexer', 'PythonConsoleLexer', 'PythonTracebackLexer',
           'Python2Lexer', 'Python2TracebackLexer',
           'CythonLexer', 'DgLexer', 'NumPyLexer']


class PythonLexer(RegexLexer):
    """
    For Python source code (version 3.x).

    .. versionadded:: 0.10

    .. versionchanged:: 2.5
       This is now the default ``PythonLexer``.  It is still available as the
       alias ``Python3Lexer``.
    """

    name = 'Python'
    url = 'http://www.python.org'
    aliases = ['python', 'py', 'sage', 'python3', 'py3']
    filenames = [
        '*.py',
        '*.pyw',
        # Type stubs
        '*.pyi',
        # Jython
        '*.jy',
        # Sage
        '*.sage',
        # SCons
        '*.sc',
        'SConstruct',
        'SConscript',
        # Skylark/Starlark (used by Bazel, Buck, and Pants)
        '*.bzl',
        'BUCK',
        'BUILD',
        'BUILD.bazel',
        'WORKSPACE',
        # Twisted Application infrastructure
        '*.tac',
    ]
    mimetypes = ['text/x-python', 'application/x-python',
                 'text/x-python3', 'application/x-python3']

    uni_name = "[%s][%s]*" % (uni.xid_start, uni.xid_continue)

    def innerstring_rules(ttype):
        return [
            # the old style '%s' % (...) string formatting (still valid in Py3)
            (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?'
             '[hlL]?[E-GXc-giorsaux%]', String.Interpol),
            # the new style '{}'.format(...) string formatting
            (r'\{'
             r'((\w+)((\.\w+)|(\[[^\]]+\]))*)?'  # field name
             r'(\![sra])?'                       # conversion
             r'(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?'
             r'\}', String.Interpol),

            # backslashes, quotes and formatting signs must be parsed one at a time
            (r'[^\\\'"%{\n]+', ttype),
            (r'[\'"\\]', ttype),
            # unhandled string formatting sign
            (r'%|(\{{1,2})', ttype)
            # newlines are an error (use "nl" state)
        ]

    def fstring_rules(ttype):
        return [
            # Assuming that a '}' is the closing brace after format specifier.
            # Sadly, this means that we won't detect syntax error. But it's
            # more important to parse correct syntax correctly, than to
            # highlight invalid syntax.
            (r'\}', String.Interpol),
            (r'\{', String.Interpol, 'expr-inside-fstring'),
            # backslashes, quotes and formatting signs must be parsed one at a time
            (r'[^\\\'"{}\n]+', ttype),
            (r'[\'"\\]', ttype),
            # newlines are an error (use "nl" state)
        ]

    tokens = {
        'root': [
            (r'\n', Whitespace),
            (r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")',
             bygroups(Whitespace, String.Affix, String.Doc)),
            (r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')",
             bygroups(Whitespace, String.Affix, String.Doc)),
            (r'\A#!.+$', Comment.Hashbang),
            (r'#.*$', Comment.Single),
            (r'\\\n', Text),
            (r'\\', Text),
            include('keywords'),
            include('soft-keywords'),
            (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'funcname'),
            (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'classname'),
            (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text),
             'fromimport'),
            (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text),
             'import'),
            include('expr'),
        ],
        'expr': [
            # raw f-strings
            ('(?i)(rf|fr)(""")',
             bygroups(String.Affix, String.Double),
             combined('rfstringescape', 'tdqf')),
            ("(?i)(rf|fr)(''')",
             bygroups(String.Affix, String.Single),
             combined('rfstringescape', 'tsqf')),
            ('(?i)(rf|fr)(")',
             bygroups(String.Affix, String.Double),
             combined('rfstringescape', 'dqf')),
            ("(?i)(rf|fr)(')",
             bygroups(String.Affix, String.Single),
             combined('rfstringescape', 'sqf')),
            # non-raw f-strings
            ('([fF])(""")', bygroups(String.Affix, String.Double),
             combined('fstringescape', 'tdqf')),
            ("([fF])(''')", bygroups(String.Affix, String.Single),
             combined('fstringescape', 'tsqf')),
            ('([fF])(")', bygroups(String.Affix, String.Double),
             combined('fstringescape', 'dqf')),
            ("([fF])(')", bygroups(String.Affix, String.Single),
             combined('fstringescape', 'sqf')),
            # raw bytes and strings
            ('(?i)(rb|br|r)(""")',
             bygroups(String.Affix, String.Double), 'tdqs'),
            ("(?i)(rb|br|r)(''')",
             bygroups(String.Affix, String.Single), 'tsqs'),
            ('(?i)(rb|br|r)(")',
             bygroups(String.Affix, String.Double), 'dqs'),
            ("(?i)(rb|br|r)(')",
             bygroups(String.Affix, String.Single), 'sqs'),
            # non-raw strings
            ('([uU]?)(""")', bygroups(String.Affix, String.Double),
             combined('stringescape', 'tdqs')),
            ("([uU]?)(''')", bygroups(String.Affix, String.Single),
             combined('stringescape', 'tsqs')),
            ('([uU]?)(")', bygroups(String.Affix, String.Double),
             combined('stringescape', 'dqs')),
            ("([uU]?)(')", bygroups(String.Affix, String.Single),
             combined('stringescape', 'sqs')),
            # non-raw bytes
            ('([bB])(""")', bygroups(String.Affix, String.Double),
             combined('bytesescape', 'tdqs')),
            ("([bB])(''')", bygroups(String.Affix, String.Single),
             combined('bytesescape', 'tsqs')),
            ('([bB])(")', bygroups(String.Affix, String.Double),
             combined('bytesescape', 'dqs')),
            ("([bB])(')", bygroups(String.Affix, String.Single),
             combined('bytesescape', 'sqs')),

            (r'[^\S\n]+', Text),
            include('numbers'),
            (r'!=|==|<<|>>|:=|[-~+/*%=<>&^|.]', Operator),
            (r'[]{}:(),;[]', Punctuation),
            (r'(in|is|and|or|not)\b', Operator.Word),
            include('expr-keywords'),
            include('builtins'),
            include('magicfuncs'),
            include('magicvars'),
            include('name'),
        ],
        'expr-inside-fstring': [
            (r'[{([]', Punctuation, 'expr-inside-fstring-inner'),
            # without format specifier
            (r'(=\s*)?'         # debug (https://bugs.python.org/issue36817)
             r'(\![sraf])?'     # conversion
             r'\}', String.Interpol, '#pop'),
            # with format specifier
            # we'll catch the remaining '}' in the outer scope
            (r'(=\s*)?'         # debug (https://bugs.python.org/issue36817)
             r'(\![sraf])?'     # conversion
             r':', String.Interpol, '#pop'),
            (r'\s+', Whitespace),  # allow new lines
            include('expr'),
        ],
        'expr-inside-fstring-inner': [
            (r'[{([]', Punctuation, 'expr-inside-fstring-inner'),
            (r'[])}]', Punctuation, '#pop'),
            (r'\s+', Whitespace),  # allow new lines
            include('expr'),
        ],
        'expr-keywords': [
            # Based on https://docs.python.org/3/reference/expressions.html
            (words((
                'async for', 'await', 'else', 'for', 'if', 'lambda',
                'yield', 'yield from'), suffix=r'\b'),
             Keyword),
            (words(('True', 'False', 'None'), suffix=r'\b'), Keyword.Constant),
        ],
        'keywords': [
            (words((
                'assert', 'async', 'await', 'break', 'continue', 'del', 'elif',
                'else', 'except', 'finally', 'for', 'global', 'if', 'lambda',
                'pass', 'raise', 'nonlocal', 'return', 'try', 'while', 'yield',
                'yield from', 'as', 'with'), suffix=r'\b'),
             Keyword),
            (words(('True', 'False', 'None'), suffix=r'\b'), Keyword.Constant),
        ],
        'soft-keywords': [
            # `match`, `case` and `_` soft keywords
            (r'(^[ \t]*)'              # at beginning of line + possible indentation
             r'(match|case)\b'         # a possible keyword
             r'(?![ \t]*(?:'           # not followed by...
             r'[:,;=^&|@~)\]}]|(?:' +  # characters and keywords that mean this isn't
             r'|'.join(keyword.kwlist) + r')\b))',                 # pattern matching
             bygroups(Text, Keyword), 'soft-keywords-inner'),
        ],
        'soft-keywords-inner': [
            # optional `_` keyword
            (r'(\s+)([^\n_]*)(_\b)', bygroups(Whitespace, using(this), Keyword)),
            default('#pop')
        ],
        'builtins': [
            (words((
                '__import__', 'abs', 'aiter', 'all', 'any', 'bin', 'bool', 'bytearray',
                'breakpoint', 'bytes', 'callable', 'chr', 'classmethod', 'compile',
                'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval',
                'filter', 'float', 'format', 'frozenset', 'getattr', 'globals',
                'hasattr', 'hash', 'hex', 'id', 'input', 'int', 'isinstance',
                'issubclass', 'iter', 'len', 'list', 'locals', 'map', 'max',
                'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow',
                'print', 'property', 'range', 'repr', 'reversed', 'round', 'set',
                'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super',
                'tuple', 'type', 'vars', 'zip'), prefix=r'(?<!\.)', suffix=r'\b'),
             Name.Builtin),
            (r'(?<!\.)(self|Ellipsis|NotImplemented|cls)\b', Name.Builtin.Pseudo),
            (words((
                'ArithmeticError', 'AssertionError', 'AttributeError',
                'BaseException', 'BufferError', 'BytesWarning', 'DeprecationWarning',
                'EOFError', 'EnvironmentError', 'Exception', 'FloatingPointError',
                'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError',
                'ImportWarning', 'IndentationError', 'IndexError', 'KeyError',
                'KeyboardInterrupt', 'LookupError', 'MemoryError', 'NameError',
                'NotImplementedError', 'OSError', 'OverflowError',
                'PendingDeprecationWarning', 'ReferenceError', 'ResourceWarning',
                'RuntimeError', 'RuntimeWarning', 'StopIteration',
                'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit',
                'TabError', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError',
                'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError',
                'UnicodeWarning', 'UserWarning', 'ValueError', 'VMSError',
                'Warning', 'WindowsError', 'ZeroDivisionError',
                # new builtin exceptions from PEP 3151
                'BlockingIOError', 'ChildProcessError', 'ConnectionError',
                'BrokenPipeError', 'ConnectionAbortedError', 'ConnectionRefusedError',
                'ConnectionResetError', 'FileExistsError', 'FileNotFoundError',
                'InterruptedError', 'IsADirectoryError', 'NotADirectoryError',
                'PermissionError', 'ProcessLookupError', 'TimeoutError',
                # others new in Python 3
                'StopAsyncIteration', 'ModuleNotFoundError', 'RecursionError',
                'EncodingWarning'),
                prefix=r'(?<!\.)', suffix=r'\b'),
             Name.Exception),
        ],
        'magicfuncs': [
            (words((
                '__abs__', '__add__', '__aenter__', '__aexit__', '__aiter__',
                '__and__', '__anext__', '__await__', '__bool__', '__bytes__',
                '__call__', '__complex__', '__contains__', '__del__', '__delattr__',
                '__delete__', '__delitem__', '__dir__', '__divmod__', '__enter__',
                '__eq__', '__exit__', '__float__', '__floordiv__', '__format__',
                '__ge__', '__get__', '__getattr__', '__getattribute__',
                '__getitem__', '__gt__', '__hash__', '__iadd__', '__iand__',
                '__ifloordiv__', '__ilshift__', '__imatmul__', '__imod__',
                '__imul__', '__index__', '__init__', '__instancecheck__',
                '__int__', '__invert__', '__ior__', '__ipow__', '__irshift__',
                '__isub__', '__iter__', '__itruediv__', '__ixor__', '__le__',
                '__len__', '__length_hint__', '__lshift__', '__lt__', '__matmul__',
                '__missing__', '__mod__', '__mul__', '__ne__', '__neg__',
                '__new__', '__next__', '__or__', '__pos__', '__pow__',
                '__prepare__', '__radd__', '__rand__', '__rdivmod__', '__repr__',
                '__reversed__', '__rfloordiv__', '__rlshift__', '__rmatmul__',
                '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__',
                '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__',
                '__rxor__', '__set__', '__setattr__', '__setitem__', '__str__',
                '__sub__', '__subclasscheck__', '__truediv__',
                '__xor__'), suffix=r'\b'),
             Name.Function.Magic),
        ],
        'magicvars': [
            (words((
                '__annotations__', '__bases__', '__class__', '__closure__',
                '__code__', '__defaults__', '__dict__', '__doc__', '__file__',
                '__func__', '__globals__', '__kwdefaults__', '__module__',
                '__mro__', '__name__', '__objclass__', '__qualname__',
                '__self__', '__slots__', '__weakref__'), suffix=r'\b'),
             Name.Variable.Magic),
        ],
        'numbers': [
            (r'(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)'
             r'([eE][+-]?\d(?:_?\d)*)?', Number.Float),
            (r'\d(?:_?\d)*[eE][+-]?\d(?:_?\d)*j?', Number.Float),
            (r'0[oO](?:_?[0-7])+', Number.Oct),
            (r'0[bB](?:_?[01])+', Number.Bin),
            (r'0[xX](?:_?[a-fA-F0-9])+', Number.Hex),
            (r'\d(?:_?\d)*', Number.Integer),
        ],
        'name': [
            (r'@' + uni_name, Name.Decorator),
            (r'@', Operator),  # new matrix multiplication operator
            (uni_name, Name),
        ],
        'funcname': [
            include('magicfuncs'),
            (uni_name, Name.Function, '#pop'),
            default('#pop'),
        ],
        'classname': [
            (uni_name, Name.Class, '#pop'),
        ],
        'import': [
            (r'(\s+)(as)(\s+)', bygroups(Text, Keyword, Text)),
            (r'\.', Name.Namespace),
            (uni_name, Name.Namespace),
            (r'(\s*)(,)(\s*)', bygroups(Text, Operator, Text)),
            default('#pop')  # all else: go back
        ],
        'fromimport': [
            (r'(\s+)(import)\b', bygroups(Text, Keyword.Namespace), '#pop'),
            (r'\.', Name.Namespace),
            # if None occurs here, it's "raise x from None", since None can
            # never be a module name
            (r'None\b', Keyword.Constant, '#pop'),
            (uni_name, Name.Namespace),
            default('#pop'),
        ],
        'rfstringescape': [
            (r'\{\{', String.Escape),
            (r'\}\}', String.Escape),
        ],
        'fstringescape': [
            include('rfstringescape'),
            include('stringescape'),
        ],
        'bytesescape': [
            (r'\\([\\abfnrtv"\']|\n|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape)
        ],
        'stringescape': [
            (r'\\(N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8})', String.Escape),
            include('bytesescape')
        ],
        'fstrings-single': fstring_rules(String.Single),
        'fstrings-double': fstring_rules(String.Double),
        'strings-single': innerstring_rules(String.Single),
        'strings-double': innerstring_rules(String.Double),
        'dqf': [
            (r'"', String.Double, '#pop'),
            (r'\\\\|\\"|\\\n', String.Escape),  # included here for raw strings
            include('fstrings-double')
        ],
        'sqf': [
            (r"'", String.Single, '#pop'),
            (r"\\\\|\\'|\\\n", String.Escape),  # included here for raw strings
            include('fstrings-single')
        ],
        'dqs': [
            (r'"', String.Double, '#pop'),
            (r'\\\\|\\"|\\\n', String.Escape),  # included here for raw strings
            include('strings-double')
        ],
        'sqs': [
            (r"'", String.Single, '#pop'),
            (r"\\\\|\\'|\\\n", String.Escape),  # included here for raw strings
            include('strings-single')
        ],
        'tdqf': [
            (r'"""', String.Double, '#pop'),
            include('fstrings-double'),
            (r'\n', String.Double)
        ],
        'tsqf': [
            (r"'''", String.Single, '#pop'),
            include('fstrings-single'),
            (r'\n', String.Single)
        ],
        'tdqs': [
            (r'"""', String.Double, '#pop'),
            include('strings-double'),
            (r'\n', String.Double)
        ],
        'tsqs': [
            (r"'''", String.Single, '#pop'),
            include('strings-single'),
            (r'\n', String.Single)
        ],
    }

    def analyse_text(text):
        return shebang_matches(text, r'pythonw?(3(\.\d)?)?') or \
            'import ' in text[:1000]


Python3Lexer = PythonLexer


class Python2Lexer(RegexLexer):
    """
    For Python 2.x source code.

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonLexer``.  ``PythonLexer`` now
       refers to the Python 3 variant.  File name patterns like ``*.py`` have
       been moved to Python 3 as well.
    """

    name = 'Python 2.x'
    url = 'http://www.python.org'
    aliases = ['python2', 'py2']
    filenames = []  # now taken over by PythonLexer (3.x)
    mimetypes = ['text/x-python2', 'application/x-python2']

    def innerstring_rules(ttype):
        return [
            # the old style '%s' % (...) string formatting
            (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?'
             '[hlL]?[E-GXc-giorsux%]', String.Interpol),
            # backslashes, quotes and formatting signs must be parsed one at a time
            (r'[^\\\'"%\n]+', ttype),
            (r'[\'"\\]', ttype),
            # unhandled string formatting sign
            (r'%', ttype),
            # newlines are an error (use "nl" state)
        ]

    tokens = {
        'root': [
            (r'\n', Whitespace),
            (r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")',
             bygroups(Whitespace, String.Affix, String.Doc)),
            (r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')",
             bygroups(Whitespace, String.Affix, String.Doc)),
            (r'[^\S\n]+', Text),
            (r'\A#!.+$', Comment.Hashbang),
            (r'#.*$', Comment.Single),
            (r'[]{}:(),;[]', Punctuation),
            (r'\\\n', Text),
            (r'\\', Text),
            (r'(in|is|and|or|not)\b', Operator.Word),
            (r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator),
            include('keywords'),
            (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'funcname'),
            (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'classname'),
            (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text),
             'fromimport'),
            (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text),
             'import'),
            include('builtins'),
            include('magicfuncs'),
            include('magicvars'),
            include('backtick'),
            ('([rR]|[uUbB][rR]|[rR][uUbB])(""")',
             bygroups(String.Affix, String.Double), 'tdqs'),
            ("([rR]|[uUbB][rR]|[rR][uUbB])(''')",
             bygroups(String.Affix, String.Single), 'tsqs'),
            ('([rR]|[uUbB][rR]|[rR][uUbB])(")',
             bygroups(String.Affix, String.Double), 'dqs'),
            ("([rR]|[uUbB][rR]|[rR][uUbB])(')",
             bygroups(String.Affix, String.Single), 'sqs'),
            ('([uUbB]?)(""")', bygroups(String.Affix, String.Double),
             combined('stringescape', 'tdqs')),
            ("([uUbB]?)(''')", bygroups(String.Affix, String.Single),
             combined('stringescape', 'tsqs')),
            ('([uUbB]?)(")', bygroups(String.Affix, String.Double),
             combined('stringescape', 'dqs')),
            ("([uUbB]?)(')", bygroups(String.Affix, String.Single),
             combined('stringescape', 'sqs')),
            include('name'),
            include('numbers'),
        ],
        'keywords': [
            (words((
                'assert', 'break', 'continue', 'del', 'elif', 'else', 'except',
                'exec', 'finally', 'for', 'global', 'if', 'lambda', 'pass',
                'print', 'raise', 'return', 'try', 'while', 'yield',
                'yield from', 'as', 'with'), suffix=r'\b'),
             Keyword),
        ],
        'builtins': [
            (words((
                '__import__', 'abs', 'all', 'any', 'apply', 'basestring', 'bin',
                'bool', 'buffer', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod',
                'cmp', 'coerce', 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod',
                'enumerate', 'eval', 'execfile', 'exit', 'file', 'filter', 'float',
                'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'hex', 'id',
                'input', 'int', 'intern', 'isinstance', 'issubclass', 'iter', 'len',
                'list', 'locals', 'long', 'map', 'max', 'min', 'next', 'object',
                'oct', 'open', 'ord', 'pow', 'property', 'range', 'raw_input', 'reduce',
                'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',
                'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type',
                'unichr', 'unicode', 'vars', 'xrange', 'zip'),
                prefix=r'(?<!\.)', suffix=r'\b'),
             Name.Builtin),
            (r'(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls'
             r')\b', Name.Builtin.Pseudo),
            (words((
                'ArithmeticError', 'AssertionError', 'AttributeError',
                'BaseException', 'DeprecationWarning', 'EOFError', 'EnvironmentError',
                'Exception', 'FloatingPointError', 'FutureWarning', 'GeneratorExit',
                'IOError', 'ImportError', 'ImportWarning', 'IndentationError',
                'IndexError', 'KeyError', 'KeyboardInterrupt', 'LookupError',
                'MemoryError', 'NameError',
                'NotImplementedError', 'OSError', 'OverflowError', 'OverflowWarning',
                'PendingDeprecationWarning', 'ReferenceError',
                'RuntimeError', 'RuntimeWarning', 'StandardError', 'StopIteration',
                'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit',
                'TabError', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError',
                'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError',
                'UnicodeWarning', 'UserWarning', 'ValueError', 'VMSError', 'Warning',
                'WindowsError', 'ZeroDivisionError'), prefix=r'(?<!\.)', suffix=r'\b'),
             Name.Exception),
        ],
        'magicfuncs': [
            (words((
                '__abs__', '__add__', '__and__', '__call__', '__cmp__', '__coerce__',
                '__complex__', '__contains__', '__del__', '__delattr__', '__delete__',
                '__delitem__', '__delslice__', '__div__', '__divmod__', '__enter__',
                '__eq__', '__exit__', '__float__', '__floordiv__', '__ge__', '__get__',
                '__getattr__', '__getattribute__', '__getitem__', '__getslice__', '__gt__',
                '__hash__', '__hex__', '__iadd__', '__iand__', '__idiv__', '__ifloordiv__',
                '__ilshift__', '__imod__', '__imul__', '__index__', '__init__',
                '__instancecheck__', '__int__', '__invert__', '__iop__', '__ior__',
                '__ipow__', '__irshift__', '__isub__', '__iter__', '__itruediv__',
                '__ixor__', '__le__', '__len__', '__long__', '__lshift__', '__lt__',
                '__missing__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__',
                '__nonzero__', '__oct__', '__op__', '__or__', '__pos__', '__pow__',
                '__radd__', '__rand__', '__rcmp__', '__rdiv__', '__rdivmod__', '__repr__',
                '__reversed__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__',
                '__rop__', '__ror__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__',
                '__rtruediv__', '__rxor__', '__set__', '__setattr__', '__setitem__',
                '__setslice__', '__str__', '__sub__', '__subclasscheck__', '__truediv__',
                '__unicode__', '__xor__'), suffix=r'\b'),
             Name.Function.Magic),
        ],
        'magicvars': [
            (words((
                '__bases__', '__class__', '__closure__', '__code__', '__defaults__',
                '__dict__', '__doc__', '__file__', '__func__', '__globals__',
                '__metaclass__', '__module__', '__mro__', '__name__', '__self__',
                '__slots__', '__weakref__'),
                suffix=r'\b'),
             Name.Variable.Magic),
        ],
        'numbers': [
            (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float),
            (r'\d+[eE][+-]?[0-9]+j?', Number.Float),
            (r'0[0-7]+j?', Number.Oct),
            (r'0[bB][01]+', Number.Bin),
            (r'0[xX][a-fA-F0-9]+', Number.Hex),
            (r'\d+L', Number.Integer.Long),
            (r'\d+j?', Number.Integer)
        ],
        'backtick': [
            ('`.*?`', String.Backtick),
        ],
        'name': [
            (r'@[\w.]+', Name.Decorator),
            (r'[a-zA-Z_]\w*', Name),
        ],
        'funcname': [
            include('magicfuncs'),
            (r'[a-zA-Z_]\w*', Name.Function, '#pop'),
            default('#pop'),
        ],
        'classname': [
            (r'[a-zA-Z_]\w*', Name.Class, '#pop')
        ],
        'import': [
            (r'(?:[ \t]|\\\n)+', Text),
            (r'as\b', Keyword.Namespace),
            (r',', Operator),
            (r'[a-zA-Z_][\w.]*', Name.Namespace),
            default('#pop')  # all else: go back
        ],
        'fromimport': [
            (r'(?:[ \t]|\\\n)+', Text),
            (r'import\b', Keyword.Namespace, '#pop'),
            # if None occurs here, it's "raise x from None", since None can
            # never be a module name
            (r'None\b', Name.Builtin.Pseudo, '#pop'),
            # sadly, in "raise x from y" y will be highlighted as namespace too
            (r'[a-zA-Z_.][\w.]*', Name.Namespace),
            # anything else here also means "raise x from y" and is therefore
            # not an error
            default('#pop'),
        ],
        'stringescape': [
            (r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|'
             r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape)
        ],
        'strings-single': innerstring_rules(String.Single),
        'strings-double': innerstring_rules(String.Double),
        'dqs': [
            (r'"', String.Double, '#pop'),
            (r'\\\\|\\"|\\\n', String.Escape),  # included here for raw strings
            include('strings-double')
        ],
        'sqs': [
            (r"'", String.Single, '#pop'),
            (r"\\\\|\\'|\\\n", String.Escape),  # included here for raw strings
            include('strings-single')
        ],
        'tdqs': [
            (r'"""', String.Double, '#pop'),
            include('strings-double'),
            (r'\n', String.Double)
        ],
        'tsqs': [
            (r"'''", String.Single, '#pop'),
            include('strings-single'),
            (r'\n', String.Single)
        ],
    }

    def analyse_text(text):
        return shebang_matches(text, r'pythonw?2(\.\d)?')

class _PythonConsoleLexerBase(RegexLexer):
    name = 'Python console session'
    aliases = ['pycon']
    mimetypes = ['text/x-python-doctest']

    """Auxiliary lexer for `PythonConsoleLexer`.

    Code tokens are output as ``Token.Other.Code``, traceback tokens as
    ``Token.Other.Traceback``.
    """
    tokens = {
        'root': [
            (r'(>>> )(.*\n)', bygroups(Generic.Prompt, Other.Code), 'continuations'),
            # This happens, e.g., when tracebacks are embedded in documentation;
            # trailing whitespaces are often stripped in such contexts.
            (r'(>>>)(\n)', bygroups(Generic.Prompt, Whitespace)),
            (r'(\^C)?Traceback \(most recent call last\):\n', Other.Traceback, 'traceback'),
            # SyntaxError starts with this
            (r'  File "[^"]+", line \d+', Other.Traceback, 'traceback'),
            (r'.*\n', Generic.Output),
        ],
        'continuations': [
            (r'(\.\.\. )(.*\n)', bygroups(Generic.Prompt, Other.Code)),
            # See above.
            (r'(\.\.\.)(\n)', bygroups(Generic.Prompt, Whitespace)),
            default('#pop'),
        ],
        'traceback': [
            # As soon as we see a traceback, consume everything until the next
            # >>> prompt.
            (r'(?=>>>( |$))', Text, '#pop'),
            (r'(KeyboardInterrupt)(\n)', bygroups(Name.Class, Whitespace)),
            (r'.*\n', Other.Traceback),
        ],
    }

class PythonConsoleLexer(DelegatingLexer):
    """
    For Python console output or doctests, such as:

    .. sourcecode:: pycon

        >>> a = 'foo'
        >>> print(a)
        foo
        >>> 1 / 0
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        ZeroDivisionError: integer division or modulo by zero

    Additional options:

    `python3`
        Use Python 3 lexer for code.  Default is ``True``.

        .. versionadded:: 1.0
        .. versionchanged:: 2.5
           Now defaults to ``True``.
    """

    name = 'Python console session'
    aliases = ['pycon']
    mimetypes = ['text/x-python-doctest']

    def __init__(self, **options):
        python3 = get_bool_opt(options, 'python3', True)
        if python3:
            pylexer = PythonLexer
            tblexer = PythonTracebackLexer
        else:
            pylexer = Python2Lexer
            tblexer = Python2TracebackLexer
        # We have two auxiliary lexers. Use DelegatingLexer twice with
        # different tokens.  TODO: DelegatingLexer should support this
        # directly, by accepting a tuplet of auxiliary lexers and a tuple of
        # distinguishing tokens. Then we wouldn't need this intermediary
        # class.
        class _ReplaceInnerCode(DelegatingLexer):
            def __init__(self, **options):
                super().__init__(pylexer, _PythonConsoleLexerBase, Other.Code, **options)
        super().__init__(tblexer, _ReplaceInnerCode, Other.Traceback, **options)

class PythonTracebackLexer(RegexLexer):
    """
    For Python 3.x tracebacks, with support for chained exceptions.

    .. versionadded:: 1.0

    .. versionchanged:: 2.5
       This is now the default ``PythonTracebackLexer``.  It is still available
       as the alias ``Python3TracebackLexer``.
    """

    name = 'Python Traceback'
    aliases = ['pytb', 'py3tb']
    filenames = ['*.pytb', '*.py3tb']
    mimetypes = ['text/x-python-traceback', 'text/x-python3-traceback']

    tokens = {
        'root': [
            (r'\n', Whitespace),
            (r'^(\^C)?Traceback \(most recent call last\):\n', Generic.Traceback, 'intb'),
            (r'^During handling of the above exception, another '
             r'exception occurred:\n\n', Generic.Traceback),
            (r'^The above exception was the direct cause of the '
             r'following exception:\n\n', Generic.Traceback),
            (r'^(?=  File "[^"]+", line \d+)', Generic.Traceback, 'intb'),
            (r'^.*\n', Other),
        ],
        'intb': [
            (r'^(  File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)',
             bygroups(Text, Name.Builtin, Text, Number, Text, Name, Whitespace)),
            (r'^(  File )("[^"]+")(, line )(\d+)(\n)',
             bygroups(Text, Name.Builtin, Text, Number, Whitespace)),
            (r'^(    )(.+)(\n)',
             bygroups(Whitespace, using(PythonLexer), Whitespace), 'markers'),
            (r'^([ \t]*)(\.\.\.)(\n)',
             bygroups(Whitespace, Comment, Whitespace)),  # for doctests...
            (r'^([^:]+)(: )(.+)(\n)',
             bygroups(Generic.Error, Text, Name, Whitespace), '#pop'),
            (r'^([a-zA-Z_][\w.]*)(:?\n)',
             bygroups(Generic.Error, Whitespace), '#pop'),
            default('#pop'),
        ],
        'markers': [
            # Either `PEP 657 <https://www.python.org/dev/peps/pep-0657/>`
            # error locations in Python 3.11+, or single-caret markers
            # for syntax errors before that.
            (r'^( {4,})([~^]+)(\n)',
             bygroups(Whitespace, Punctuation.Marker, Whitespace),
             '#pop'),
            default('#pop'),
        ],
    }


Python3TracebackLexer = PythonTracebackLexer


class Python2TracebackLexer(RegexLexer):
    """
    For Python tracebacks.

    .. versionadded:: 0.7

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonTracebackLexer``.
       ``PythonTracebackLexer`` now refers to the Python 3 variant.
    """

    name = 'Python 2.x Traceback'
    aliases = ['py2tb']
    filenames = ['*.py2tb']
    mimetypes = ['text/x-python2-traceback']

    tokens = {
        'root': [
            # Cover both (most recent call last) and (innermost last)
            # The optional ^C allows us to catch keyboard interrupt signals.
            (r'^(\^C)?(Traceback.*\n)',
             bygroups(Text, Generic.Traceback), 'intb'),
            # SyntaxError starts with this.
            (r'^(?=  File "[^"]+", line \d+)', Generic.Traceback, 'intb'),
            (r'^.*\n', Other),
        ],
        'intb': [
            (r'^(  File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)',
             bygroups(Text, Name.Builtin, Text, Number, Text, Name, Whitespace)),
            (r'^(  File )("[^"]+")(, line )(\d+)(\n)',
             bygroups(Text, Name.Builtin, Text, Number, Whitespace)),
            (r'^(    )(.+)(\n)',
             bygroups(Text, using(Python2Lexer), Whitespace), 'marker'),
            (r'^([ \t]*)(\.\.\.)(\n)',
             bygroups(Text, Comment, Whitespace)),  # for doctests...
            (r'^([^:]+)(: )(.+)(\n)',
             bygroups(Generic.Error, Text, Name, Whitespace), '#pop'),
            (r'^([a-zA-Z_]\w*)(:?\n)',
             bygroups(Generic.Error, Whitespace), '#pop')
        ],
        'marker': [
            # For syntax errors.
            (r'( {4,})(\^)', bygroups(Text, Punctuation.Marker), '#pop'),
            default('#pop'),
        ],
    }


class CythonLexer(RegexLexer):
    """
    For Pyrex and Cython source code.

    .. versionadded:: 1.1
    """

    name = 'Cython'
    url = 'http://cython.org'
    aliases = ['cython', 'pyx', 'pyrex']
    filenames = ['*.pyx', '*.pxd', '*.pxi']
    mimetypes = ['text/x-cython', 'application/x-cython']

    tokens = {
        'root': [
            (r'\n', Whitespace),
            (r'^(\s*)("""(?:.|\n)*?""")', bygroups(Whitespace, String.Doc)),
            (r"^(\s*)('''(?:.|\n)*?''')", bygroups(Whitespace, String.Doc)),
            (r'[^\S\n]+', Text),
            (r'#.*$', Comment),
            (r'[]{}:(),;[]', Punctuation),
            (r'\\\n', Whitespace),
            (r'\\', Text),
            (r'(in|is|and|or|not)\b', Operator.Word),
            (r'(<)([a-zA-Z0-9.?]+)(>)',
             bygroups(Punctuation, Keyword.Type, Punctuation)),
            (r'!=|==|<<|>>|[-~+/*%=<>&^|.?]', Operator),
            (r'(from)(\d+)(<=)(\s+)(<)(\d+)(:)',
             bygroups(Keyword, Number.Integer, Operator, Name, Operator,
                      Name, Punctuation)),
            include('keywords'),
            (r'(def|property)(\s+)', bygroups(Keyword, Text), 'funcname'),
            (r'(cp?def)(\s+)', bygroups(Keyword, Text), 'cdef'),
            # (should actually start a block with only cdefs)
            (r'(cdef)(:)', bygroups(Keyword, Punctuation)),
            (r'(class|struct)(\s+)', bygroups(Keyword, Text), 'classname'),
            (r'(from)(\s+)', bygroups(Keyword, Text), 'fromimport'),
            (r'(c?import)(\s+)', bygroups(Keyword, Text), 'import'),
            include('builtins'),
            include('backtick'),
            ('(?:[rR]|[uU][rR]|[rR][uU])"""', String, 'tdqs'),
            ("(?:[rR]|[uU][rR]|[rR][uU])'''", String, 'tsqs'),
            ('(?:[rR]|[uU][rR]|[rR][uU])"', String, 'dqs'),
            ("(?:[rR]|[uU][rR]|[rR][uU])'", String, 'sqs'),
            ('[uU]?"""', String, combined('stringescape', 'tdqs')),
            ("[uU]?'''", String, combined('stringescape', 'tsqs')),
            ('[uU]?"', String, combined('stringescape', 'dqs')),
            ("[uU]?'", String, combined('stringescape', 'sqs')),
            include('name'),
            include('numbers'),
        ],
        'keywords': [
            (words((
                'assert', 'async', 'await', 'break', 'by', 'continue', 'ctypedef', 'del', 'elif',
                'else', 'except', 'except?', 'exec', 'finally', 'for', 'fused', 'gil',
                'global', 'if', 'include', 'lambda', 'nogil', 'pass', 'print',
                'raise', 'return', 'try', 'while', 'yield', 'as', 'with'), suffix=r'\b'),
             Keyword),
            (r'(DEF|IF|ELIF|ELSE)\b', Comment.Preproc),
        ],
        'builtins': [
            (words((
                '__import__', 'abs', 'all', 'any', 'apply', 'basestring', 'bin', 'bint',
                'bool', 'buffer', 'bytearray', 'bytes', 'callable', 'chr',
                'classmethod', 'cmp', 'coerce', 'compile', 'complex', 'delattr',
                'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', 'exit',
                'file', 'filter', 'float', 'frozenset', 'getattr', 'globals',
                'hasattr', 'hash', 'hex', 'id', 'input', 'int', 'intern', 'isinstance',
                'issubclass', 'iter', 'len', 'list', 'locals', 'long', 'map', 'max',
                'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'Py_ssize_t',
                'range', 'raw_input', 'reduce', 'reload', 'repr', 'reversed',
                'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod',
                'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 'unsigned',
                'vars', 'xrange', 'zip'), prefix=r'(?<!\.)', suffix=r'\b'),
             Name.Builtin),
            (r'(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|NULL'
             r')\b', Name.Builtin.Pseudo),
            (words((
                'ArithmeticError', 'AssertionError', 'AttributeError',
                'BaseException', 'DeprecationWarning', 'EOFError', 'EnvironmentError',
                'Exception', 'FloatingPointError', 'FutureWarning', 'GeneratorExit',
                'IOError', 'ImportError', 'ImportWarning', 'IndentationError',
                'IndexError', 'KeyError', 'KeyboardInterrupt', 'LookupError',
                'MemoryError', 'NameError', 'NotImplemented', 'NotImplementedError',
                'OSError', 'OverflowError', 'OverflowWarning',
                'PendingDeprecationWarning', 'ReferenceError', 'RuntimeError',
                'RuntimeWarning', 'StandardError', 'StopIteration', 'SyntaxError',
                'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError',
                'TypeError', 'UnboundLocalError', 'UnicodeDecodeError',
                'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError',
                'UnicodeWarning', 'UserWarning', 'ValueError', 'Warning',
                'ZeroDivisionError'), prefix=r'(?<!\.)', suffix=r'\b'),
             Name.Exception),
        ],
        'numbers': [
            (r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
            (r'0\d+', Number.Oct),
            (r'0[xX][a-fA-F0-9]+', Number.Hex),
            (r'\d+L', Number.Integer.Long),
            (r'\d+', Number.Integer)
        ],
        'backtick': [
            ('`.*?`', String.Backtick),
        ],
        'name': [
            (r'@\w+', Name.Decorator),
            (r'[a-zA-Z_]\w*', Name),
        ],
        'funcname': [
            (r'[a-zA-Z_]\w*', Name.Function, '#pop')
        ],
        'cdef': [
            (r'(public|readonly|extern|api|inline)\b', Keyword.Reserved),
            (r'(struct|enum|union|class)\b', Keyword),
            (r'([a-zA-Z_]\w*)(\s*)(?=[(:#=]|$)',
             bygroups(Name.Function, Text), '#pop'),
            (r'([a-zA-Z_]\w*)(\s*)(,)',
             bygroups(Name.Function, Text, Punctuation)),
            (r'from\b', Keyword, '#pop'),
            (r'as\b', Keyword),
            (r':', Punctuation, '#pop'),
            (r'(?=["\'])', Text, '#pop'),
            (r'[a-zA-Z_]\w*', Keyword.Type),
            (r'.', Text),
        ],
        'classname': [
            (r'[a-zA-Z_]\w*', Name.Class, '#pop')
        ],
        'import': [
            (r'(\s+)(as)(\s+)', bygroups(Text, Keyword, Text)),
            (r'[a-zA-Z_][\w.]*', Name.Namespace),
            (r'(\s*)(,)(\s*)', bygroups(Text, Operator, Text)),
            default('#pop')  # all else: go back
        ],
        'fromimport': [
            (r'(\s+)(c?import)\b', bygroups(Text, Keyword), '#pop'),
            (r'[a-zA-Z_.][\w.]*', Name.Namespace),
            # ``cdef foo from "header"``, or ``for foo from 0 < i < 10``
            default('#pop'),
        ],
        'stringescape': [
            (r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|'
             r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape)
        ],
        'strings': [
            (r'%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?'
             '[hlL]?[E-GXc-giorsux%]', String.Interpol),
            (r'[^\\\'"%\n]+', String),
            # quotes, percents and backslashes must be parsed one at a time
            (r'[\'"\\]', String),
            # unhandled string formatting sign
            (r'%', String)
            # newlines are an error (use "nl" state)
        ],
        'nl': [
            (r'\n', String)
        ],
        'dqs': [
            (r'"', String, '#pop'),
            (r'\\\\|\\"|\\\n', String.Escape),  # included here again for raw strings
            include('strings')
        ],
        'sqs': [
            (r"'", String, '#pop'),
            (r"\\\\|\\'|\\\n", String.Escape),  # included here again for raw strings
            include('strings')
        ],
        'tdqs': [
            (r'"""', String, '#pop'),
            include('strings'),
            include('nl')
        ],
        'tsqs': [
            (r"'''", String, '#pop'),
            include('strings'),
            include('nl')
        ],
    }


class DgLexer(RegexLexer):
    """
    Lexer for dg,
    a functional and object-oriented programming language
    running on the CPython 3 VM.

    .. versionadded:: 1.6
    """
    name = 'dg'
    aliases = ['dg']
    filenames = ['*.dg']
    mimetypes = ['text/x-dg']

    tokens = {
        'root': [
            (r'\s+', Text),
            (r'#.*?$', Comment.Single),

            (r'(?i)0b[01]+', Number.Bin),
            (r'(?i)0o[0-7]+', Number.Oct),
            (r'(?i)0x[0-9a-f]+', Number.Hex),
            (r'(?i)[+-]?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?j?', Number.Float),
            (r'(?i)[+-]?[0-9]+e[+-]?\d+j?', Number.Float),
            (r'(?i)[+-]?[0-9]+j?', Number.Integer),

            (r"(?i)(br|r?b?)'''", String, combined('stringescape', 'tsqs', 'string')),
            (r'(?i)(br|r?b?)"""', String, combined('stringescape', 'tdqs', 'string')),
            (r"(?i)(br|r?b?)'", String, combined('stringescape', 'sqs', 'string')),
            (r'(?i)(br|r?b?)"', String, combined('stringescape', 'dqs', 'string')),

            (r"`\w+'*`", Operator),
            (r'\b(and|in|is|or|where)\b', Operator.Word),
            (r'[!$%&*+\-./:<-@\\^|~;,]+', Operator),

            (words((
                'bool', 'bytearray', 'bytes', 'classmethod', 'complex', 'dict', 'dict\'',
                'float', 'frozenset', 'int', 'list', 'list\'', 'memoryview', 'object',
                'property', 'range', 'set', 'set\'', 'slice', 'staticmethod', 'str',
                'super', 'tuple', 'tuple\'', 'type'),
                   prefix=r'(?<!\.)', suffix=r'(?![\'\w])'),
             Name.Builtin),
            (words((
                '__import__', 'abs', 'all', 'any', 'bin', 'bind', 'chr', 'cmp', 'compile',
                'complex', 'delattr', 'dir', 'divmod', 'drop', 'dropwhile', 'enumerate',
                'eval', 'exhaust', 'filter', 'flip', 'foldl1?', 'format', 'fst',
                'getattr', 'globals', 'hasattr', 'hash', 'head', 'hex', 'id', 'init',
                'input', 'isinstance', 'issubclass', 'iter', 'iterate', 'last', 'len',
                'locals', 'map', 'max', 'min', 'next', 'oct', 'open', 'ord', 'pow',
                'print', 'repr', 'reversed', 'round', 'setattr', 'scanl1?', 'snd',
                'sorted', 'sum', 'tail', 'take', 'takewhile', 'vars', 'zip'),
                   prefix=r'(?<!\.)', suffix=r'(?![\'\w])'),
             Name.Builtin),
            (r"(?<!\.)(self|Ellipsis|NotImplemented|None|True|False)(?!['\w])",
             Name.Builtin.Pseudo),

            (r"(?<!\.)[A-Z]\w*(Error|Exception|Warning)'*(?!['\w])",
             Name.Exception),
            (r"(?<!\.)(Exception|GeneratorExit|KeyboardInterrupt|StopIteration|"
             r"SystemExit)(?!['\w])", Name.Exception),

            (r"(?<![\w.])(except|finally|for|if|import|not|otherwise|raise|"
             r"subclass|while|with|yield)(?!['\w])", Keyword.Reserved),

            (r"[A-Z_]+'*(?!['\w])", Name),
            (r"[A-Z]\w+'*(?!['\w])", Keyword.Type),
            (r"\w+'*", Name),

            (r'[()]', Punctuation),
            (r'.', Error),
        ],
        'stringescape': [
            (r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|'
             r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape)
        ],
        'string': [
            (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?'
             '[hlL]?[E-GXc-giorsux%]', String.Interpol),
            (r'[^\\\'"%\n]+', String),
            # quotes, percents and backslashes must be parsed one at a time
            (r'[\'"\\]', String),
            # unhandled string formatting sign
            (r'%', String),
            (r'\n', String)
        ],
        'dqs': [
            (r'"', String, '#pop')
        ],
        'sqs': [
            (r"'", String, '#pop')
        ],
        'tdqs': [
            (r'"""', String, '#pop')
        ],
        'tsqs': [
            (r"'''", String, '#pop')
        ],
    }


class NumPyLexer(PythonLexer):
    """
    A Python lexer recognizing Numerical Python builtins.

    .. versionadded:: 0.10
    """

    name = 'NumPy'
    url = 'https://numpy.org/'
    aliases = ['numpy']

    # override the mimetypes to not inherit them from python
    mimetypes = []
    filenames = []

    EXTRA_KEYWORDS = {
        'abs', 'absolute', 'accumulate', 'add', 'alen', 'all', 'allclose',
        'alltrue', 'alterdot', 'amax', 'amin', 'angle', 'any', 'append',
        'apply_along_axis', 'apply_over_axes', 'arange', 'arccos', 'arccosh',
        'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh', 'argmax', 'argmin',
        'argsort', 'argwhere', 'around', 'array', 'array2string', 'array_equal',
        'array_equiv', 'array_repr', 'array_split', 'array_str', 'arrayrange',
        'asanyarray', 'asarray', 'asarray_chkfinite', 'ascontiguousarray',
        'asfarray', 'asfortranarray', 'asmatrix', 'asscalar', 'astype',
        'atleast_1d', 'atleast_2d', 'atleast_3d', 'average', 'bartlett',
        'base_repr', 'beta', 'binary_repr', 'bincount', 'binomial',
        'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'blackman',
        'bmat', 'broadcast', 'byte_bounds', 'bytes', 'byteswap', 'c_',
        'can_cast', 'ceil', 'choose', 'clip', 'column_stack', 'common_type',
        'compare_chararrays', 'compress', 'concatenate', 'conj', 'conjugate',
        'convolve', 'copy', 'corrcoef', 'correlate', 'cos', 'cosh', 'cov',
        'cross', 'cumprod', 'cumproduct', 'cumsum', 'delete', 'deprecate',
        'diag', 'diagflat', 'diagonal', 'diff', 'digitize', 'disp', 'divide',
        'dot', 'dsplit', 'dstack', 'dtype', 'dump', 'dumps', 'ediff1d', 'empty',
        'empty_like', 'equal', 'exp', 'expand_dims', 'expm1', 'extract', 'eye',
        'fabs', 'fastCopyAndTranspose', 'fft', 'fftfreq', 'fftshift', 'fill',
        'finfo', 'fix', 'flat', 'flatnonzero', 'flatten', 'fliplr', 'flipud',
        'floor', 'floor_divide', 'fmod', 'frexp', 'fromarrays', 'frombuffer',
        'fromfile', 'fromfunction', 'fromiter', 'frompyfunc', 'fromstring',
        'generic', 'get_array_wrap', 'get_include', 'get_numarray_include',
        'get_numpy_include', 'get_printoptions', 'getbuffer', 'getbufsize',
        'geterr', 'geterrcall', 'geterrobj', 'getfield', 'gradient', 'greater',
        'greater_equal', 'gumbel', 'hamming', 'hanning', 'histogram',
        'histogram2d', 'histogramdd', 'hsplit', 'hstack', 'hypot', 'i0',
        'identity', 'ifft', 'imag', 'index_exp', 'indices', 'inf', 'info',
        'inner', 'insert', 'int_asbuffer', 'interp', 'intersect1d',
        'intersect1d_nu', 'inv', 'invert', 'iscomplex', 'iscomplexobj',
        'isfinite', 'isfortran', 'isinf', 'isnan', 'isneginf', 'isposinf',
        'isreal', 'isrealobj', 'isscalar', 'issctype', 'issubclass_',
        'issubdtype', 'issubsctype', 'item', 'itemset', 'iterable', 'ix_',
        'kaiser', 'kron', 'ldexp', 'left_shift', 'less', 'less_equal', 'lexsort',
        'linspace', 'load', 'loads', 'loadtxt', 'log', 'log10', 'log1p', 'log2',
        'logical_and', 'logical_not', 'logical_or', 'logical_xor', 'logspace',
        'lstsq', 'mat', 'matrix', 'max', 'maximum', 'maximum_sctype',
        'may_share_memory', 'mean', 'median', 'meshgrid', 'mgrid', 'min',
        'minimum', 'mintypecode', 'mod', 'modf', 'msort', 'multiply', 'nan',
        'nan_to_num', 'nanargmax', 'nanargmin', 'nanmax', 'nanmin', 'nansum',
        'ndenumerate', 'ndim', 'ndindex', 'negative', 'newaxis', 'newbuffer',
        'newbyteorder', 'nonzero', 'not_equal', 'obj2sctype', 'ogrid', 'ones',
        'ones_like', 'outer', 'permutation', 'piecewise', 'pinv', 'pkgload',
        'place', 'poisson', 'poly', 'poly1d', 'polyadd', 'polyder', 'polydiv',
        'polyfit', 'polyint', 'polymul', 'polysub', 'polyval', 'power', 'prod',
        'product', 'ptp', 'put', 'putmask', 'r_', 'randint', 'random_integers',
        'random_sample', 'ranf', 'rank', 'ravel', 'real', 'real_if_close',
        'recarray', 'reciprocal', 'reduce', 'remainder', 'repeat', 'require',
        'reshape', 'resize', 'restoredot', 'right_shift', 'rint', 'roll',
        'rollaxis', 'roots', 'rot90', 'round', 'round_', 'row_stack', 's_',
        'sample', 'savetxt', 'sctype2char', 'searchsorted', 'seed', 'select',
        'set_numeric_ops', 'set_printoptions', 'set_string_function',
        'setbufsize', 'setdiff1d', 'seterr', 'seterrcall', 'seterrobj',
        'setfield', 'setflags', 'setmember1d', 'setxor1d', 'shape',
        'show_config', 'shuffle', 'sign', 'signbit', 'sin', 'sinc', 'sinh',
        'size', 'slice', 'solve', 'sometrue', 'sort', 'sort_complex', 'source',
        'split', 'sqrt', 'square', 'squeeze', 'standard_normal', 'std',
        'subtract', 'sum', 'svd', 'swapaxes', 'take', 'tan', 'tanh', 'tensordot',
        'test', 'tile', 'tofile', 'tolist', 'tostring', 'trace', 'transpose',
        'trapz', 'tri', 'tril', 'trim_zeros', 'triu', 'true_divide', 'typeDict',
        'typename', 'uniform', 'union1d', 'unique', 'unique1d', 'unravel_index',
        'unwrap', 'vander', 'var', 'vdot', 'vectorize', 'view', 'vonmises',
        'vsplit', 'vstack', 'weibull', 'where', 'who', 'zeros', 'zeros_like'
    }

    def get_tokens_unprocessed(self, text):
        for index, token, value in \
                PythonLexer.get_tokens_unprocessed(self, text):
            if token is Name and value in self.EXTRA_KEYWORDS:
                yield index, Keyword.Pseudo, value
            else:
                yield index, token, value

    def analyse_text(text):
        ltext = text[:1000]
        return (shebang_matches(text, r'pythonw?(3(\.\d)?)?') or
                'import ' in ltext) \
            and ('import numpy' in ltext or 'from numpy import' in ltext)
python3.12/site-packages/pip/_vendor/pygments/scanner.py000064400000006024151732703030017211 0ustar00"""
    pygments.scanner
    ~~~~~~~~~~~~~~~~

    This library implements a regex based scanner. Some languages
    like Pascal are easy to parse but have some keywords that
    depend on the context. Because of this it's impossible to lex
    that just by using a regular expression lexer like the
    `RegexLexer`.

    Have a look at the `DelphiLexer` to get an idea of how to use
    this scanner.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""
import re


class EndOfText(RuntimeError):
    """
    Raise if end of text is reached and the user
    tried to call a match function.
    """


class Scanner:
    """
    Simple scanner

    All method patterns are regular expression strings (not
    compiled expressions!)
    """

    def __init__(self, text, flags=0):
        """
        :param text:    The text which should be scanned
        :param flags:   default regular expression flags
        """
        self.data = text
        self.data_length = len(text)
        self.start_pos = 0
        self.pos = 0
        self.flags = flags
        self.last = None
        self.match = None
        self._re_cache = {}

    def eos(self):
        """`True` if the scanner reached the end of text."""
        return self.pos >= self.data_length
    eos = property(eos, eos.__doc__)

    def check(self, pattern):
        """
        Apply `pattern` on the current position and return
        the match object. (Doesn't touch pos). Use this for
        lookahead.
        """
        if self.eos:
            raise EndOfText()
        if pattern not in self._re_cache:
            self._re_cache[pattern] = re.compile(pattern, self.flags)
        return self._re_cache[pattern].match(self.data, self.pos)

    def test(self, pattern):
        """Apply a pattern on the current position and check
        if it patches. Doesn't touch pos.
        """
        return self.check(pattern) is not None

    def scan(self, pattern):
        """
        Scan the text for the given pattern and update pos/match
        and related fields. The return value is a boolean that
        indicates if the pattern matched. The matched value is
        stored on the instance as ``match``, the last value is
        stored as ``last``. ``start_pos`` is the position of the
        pointer before the pattern was matched, ``pos`` is the
        end position.
        """
        if self.eos:
            raise EndOfText()
        if pattern not in self._re_cache:
            self._re_cache[pattern] = re.compile(pattern, self.flags)
        self.last = self.match
        m = self._re_cache[pattern].match(self.data, self.pos)
        if m is None:
            return False
        self.start_pos = m.start()
        self.pos = m.end()
        self.match = m.group()
        return True

    def get_char(self):
        """Scan exactly one char."""
        self.scan('.')

    def __repr__(self):
        return '<%s %d/%d>' % (
            self.__class__.__name__,
            self.pos,
            self.data_length
        )
python3.12/site-packages/pip/_vendor/pygments/util.py000064400000023766151732703030016551 0ustar00"""
    pygments.util
    ~~~~~~~~~~~~~

    Utility functions.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re
from io import TextIOWrapper


split_path_re = re.compile(r'[/\\ ]')
doctype_lookup_re = re.compile(r'''
    <!DOCTYPE\s+(
     [a-zA-Z_][a-zA-Z0-9]*
     (?: \s+      # optional in HTML5
     [a-zA-Z_][a-zA-Z0-9]*\s+
     "[^"]*")?
     )
     [^>]*>
''', re.DOTALL | re.MULTILINE | re.VERBOSE)
tag_re = re.compile(r'<(.+?)(\s.*?)?>.*?</.+?>',
                    re.IGNORECASE | re.DOTALL | re.MULTILINE)
xml_decl_re = re.compile(r'\s*<\?xml[^>]*\?>', re.I)


class ClassNotFound(ValueError):
    """Raised if one of the lookup functions didn't find a matching class."""


class OptionError(Exception):
    """
    This exception will be raised by all option processing functions if
    the type or value of the argument is not correct.
    """

def get_choice_opt(options, optname, allowed, default=None, normcase=False):
    """
    If the key `optname` from the dictionary is not in the sequence
    `allowed`, raise an error, otherwise return it.
    """
    string = options.get(optname, default)
    if normcase:
        string = string.lower()
    if string not in allowed:
        raise OptionError('Value for option %s must be one of %s' %
                          (optname, ', '.join(map(str, allowed))))
    return string


def get_bool_opt(options, optname, default=None):
    """
    Intuitively, this is `options.get(optname, default)`, but restricted to
    Boolean value. The Booleans can be represented as string, in order to accept
    Boolean value from the command line arguments. If the key `optname` is
    present in the dictionary `options` and is not associated with a Boolean,
    raise an `OptionError`. If it is absent, `default` is returned instead.

    The valid string values for ``True`` are ``1``, ``yes``, ``true`` and
    ``on``, the ones for ``False`` are ``0``, ``no``, ``false`` and ``off``
    (matched case-insensitively).
    """
    string = options.get(optname, default)
    if isinstance(string, bool):
        return string
    elif isinstance(string, int):
        return bool(string)
    elif not isinstance(string, str):
        raise OptionError('Invalid type %r for option %s; use '
                          '1/0, yes/no, true/false, on/off' % (
                              string, optname))
    elif string.lower() in ('1', 'yes', 'true', 'on'):
        return True
    elif string.lower() in ('0', 'no', 'false', 'off'):
        return False
    else:
        raise OptionError('Invalid value %r for option %s; use '
                          '1/0, yes/no, true/false, on/off' % (
                              string, optname))


def get_int_opt(options, optname, default=None):
    """As :func:`get_bool_opt`, but interpret the value as an integer."""
    string = options.get(optname, default)
    try:
        return int(string)
    except TypeError:
        raise OptionError('Invalid type %r for option %s; you '
                          'must give an integer value' % (
                              string, optname))
    except ValueError:
        raise OptionError('Invalid value %r for option %s; you '
                          'must give an integer value' % (
                              string, optname))

def get_list_opt(options, optname, default=None):
    """
    If the key `optname` from the dictionary `options` is a string,
    split it at whitespace and return it. If it is already a list
    or a tuple, it is returned as a list.
    """
    val = options.get(optname, default)
    if isinstance(val, str):
        return val.split()
    elif isinstance(val, (list, tuple)):
        return list(val)
    else:
        raise OptionError('Invalid type %r for option %s; you '
                          'must give a list value' % (
                              val, optname))


def docstring_headline(obj):
    if not obj.__doc__:
        return ''
    res = []
    for line in obj.__doc__.strip().splitlines():
        if line.strip():
            res.append(" " + line.strip())
        else:
            break
    return ''.join(res).lstrip()


def make_analysator(f):
    """Return a static text analyser function that returns float values."""
    def text_analyse(text):
        try:
            rv = f(text)
        except Exception:
            return 0.0
        if not rv:
            return 0.0
        try:
            return min(1.0, max(0.0, float(rv)))
        except (ValueError, TypeError):
            return 0.0
    text_analyse.__doc__ = f.__doc__
    return staticmethod(text_analyse)


def shebang_matches(text, regex):
    r"""Check if the given regular expression matches the last part of the
    shebang if one exists.

        >>> from pygments.util import shebang_matches
        >>> shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')
        True
        >>> shebang_matches('#!/usr/bin/python2.4', r'python(2\.\d)?')
        True
        >>> shebang_matches('#!/usr/bin/python-ruby', r'python(2\.\d)?')
        False
        >>> shebang_matches('#!/usr/bin/python/ruby', r'python(2\.\d)?')
        False
        >>> shebang_matches('#!/usr/bin/startsomethingwith python',
        ...                 r'python(2\.\d)?')
        True

    It also checks for common windows executable file extensions::

        >>> shebang_matches('#!C:\\Python2.4\\Python.exe', r'python(2\.\d)?')
        True

    Parameters (``'-f'`` or ``'--foo'`` are ignored so ``'perl'`` does
    the same as ``'perl -e'``)

    Note that this method automatically searches the whole string (eg:
    the regular expression is wrapped in ``'^$'``)
    """
    index = text.find('\n')
    if index >= 0:
        first_line = text[:index].lower()
    else:
        first_line = text.lower()
    if first_line.startswith('#!'):
        try:
            found = [x for x in split_path_re.split(first_line[2:].strip())
                     if x and not x.startswith('-')][-1]
        except IndexError:
            return False
        regex = re.compile(r'^%s(\.(exe|cmd|bat|bin))?$' % regex, re.IGNORECASE)
        if regex.search(found) is not None:
            return True
    return False


def doctype_matches(text, regex):
    """Check if the doctype matches a regular expression (if present).

    Note that this method only checks the first part of a DOCTYPE.
    eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
    """
    m = doctype_lookup_re.search(text)
    if m is None:
        return False
    doctype = m.group(1)
    return re.compile(regex, re.I).match(doctype.strip()) is not None


def html_doctype_matches(text):
    """Check if the file looks like it has a html doctype."""
    return doctype_matches(text, r'html')


_looks_like_xml_cache = {}


def looks_like_xml(text):
    """Check if a doctype exists or if we have some tags."""
    if xml_decl_re.match(text):
        return True
    key = hash(text)
    try:
        return _looks_like_xml_cache[key]
    except KeyError:
        m = doctype_lookup_re.search(text)
        if m is not None:
            return True
        rv = tag_re.search(text[:1000]) is not None
        _looks_like_xml_cache[key] = rv
        return rv


def surrogatepair(c):
    """Given a unicode character code with length greater than 16 bits,
    return the two 16 bit surrogate pair.
    """
    # From example D28 of:
    # http://www.unicode.org/book/ch03.pdf
    return (0xd7c0 + (c >> 10), (0xdc00 + (c & 0x3ff)))


def format_lines(var_name, seq, raw=False, indent_level=0):
    """Formats a sequence of strings for output."""
    lines = []
    base_indent = ' ' * indent_level * 4
    inner_indent = ' ' * (indent_level + 1) * 4
    lines.append(base_indent + var_name + ' = (')
    if raw:
        # These should be preformatted reprs of, say, tuples.
        for i in seq:
            lines.append(inner_indent + i + ',')
    else:
        for i in seq:
            # Force use of single quotes
            r = repr(i + '"')
            lines.append(inner_indent + r[:-2] + r[-1] + ',')
    lines.append(base_indent + ')')
    return '\n'.join(lines)


def duplicates_removed(it, already_seen=()):
    """
    Returns a list with duplicates removed from the iterable `it`.

    Order is preserved.
    """
    lst = []
    seen = set()
    for i in it:
        if i in seen or i in already_seen:
            continue
        lst.append(i)
        seen.add(i)
    return lst


class Future:
    """Generic class to defer some work.

    Handled specially in RegexLexerMeta, to support regex string construction at
    first use.
    """
    def get(self):
        raise NotImplementedError


def guess_decode(text):
    """Decode *text* with guessed encoding.

    First try UTF-8; this should fail for non-UTF-8 encodings.
    Then try the preferred locale encoding.
    Fall back to latin-1, which always works.
    """
    try:
        text = text.decode('utf-8')
        return text, 'utf-8'
    except UnicodeDecodeError:
        try:
            import locale
            prefencoding = locale.getpreferredencoding()
            text = text.decode()
            return text, prefencoding
        except (UnicodeDecodeError, LookupError):
            text = text.decode('latin1')
            return text, 'latin1'


def guess_decode_from_terminal(text, term):
    """Decode *text* coming from terminal *term*.

    First try the terminal encoding, if given.
    Then try UTF-8.  Then try the preferred locale encoding.
    Fall back to latin-1, which always works.
    """
    if getattr(term, 'encoding', None):
        try:
            text = text.decode(term.encoding)
        except UnicodeDecodeError:
            pass
        else:
            return text, term.encoding
    return guess_decode(text)


def terminal_encoding(term):
    """Return our best guess of encoding for the given *term*."""
    if getattr(term, 'encoding', None):
        return term.encoding
    import locale
    return locale.getpreferredencoding()


class UnclosingTextIOWrapper(TextIOWrapper):
    # Don't close underlying buffer on destruction.
    def close(self):
        self.flush()
python3.12/site-packages/pip/_vendor/pygments/formatters/other.py000064400000011721151732703030021067 0ustar00"""
    pygments.formatters.other
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Other formatters: NullFormatter, RawTokenFormatter.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.util import get_choice_opt
from pip._vendor.pygments.token import Token
from pip._vendor.pygments.console import colorize

__all__ = ['NullFormatter', 'RawTokenFormatter', 'TestcaseFormatter']


class NullFormatter(Formatter):
    """
    Output the text unchanged without any formatting.
    """
    name = 'Text only'
    aliases = ['text', 'null']
    filenames = ['*.txt']

    def format(self, tokensource, outfile):
        enc = self.encoding
        for ttype, value in tokensource:
            if enc:
                outfile.write(value.encode(enc))
            else:
                outfile.write(value)


class RawTokenFormatter(Formatter):
    r"""
    Format tokens as a raw representation for storing token streams.

    The format is ``tokentype<TAB>repr(tokenstring)\n``. The output can later
    be converted to a token stream with the `RawTokenLexer`, described in the
    :doc:`lexer list <lexers>`.

    Only two options are accepted:

    `compress`
        If set to ``'gz'`` or ``'bz2'``, compress the output with the given
        compression algorithm after encoding (default: ``''``).
    `error_color`
        If set to a color name, highlight error tokens using that color.  If
        set but with no value, defaults to ``'red'``.

        .. versionadded:: 0.11

    """
    name = 'Raw tokens'
    aliases = ['raw', 'tokens']
    filenames = ['*.raw']

    unicodeoutput = False

    def __init__(self, **options):
        Formatter.__init__(self, **options)
        # We ignore self.encoding if it is set, since it gets set for lexer
        # and formatter if given with -Oencoding on the command line.
        # The RawTokenFormatter outputs only ASCII. Override here.
        self.encoding = 'ascii'  # let pygments.format() do the right thing
        self.compress = get_choice_opt(options, 'compress',
                                       ['', 'none', 'gz', 'bz2'], '')
        self.error_color = options.get('error_color', None)
        if self.error_color is True:
            self.error_color = 'red'
        if self.error_color is not None:
            try:
                colorize(self.error_color, '')
            except KeyError:
                raise ValueError("Invalid color %r specified" %
                                 self.error_color)

    def format(self, tokensource, outfile):
        try:
            outfile.write(b'')
        except TypeError:
            raise TypeError('The raw tokens formatter needs a binary '
                            'output file')
        if self.compress == 'gz':
            import gzip
            outfile = gzip.GzipFile('', 'wb', 9, outfile)

            write = outfile.write
            flush = outfile.close
        elif self.compress == 'bz2':
            import bz2
            compressor = bz2.BZ2Compressor(9)

            def write(text):
                outfile.write(compressor.compress(text))

            def flush():
                outfile.write(compressor.flush())
                outfile.flush()
        else:
            write = outfile.write
            flush = outfile.flush

        if self.error_color:
            for ttype, value in tokensource:
                line = b"%r\t%r\n" % (ttype, value)
                if ttype is Token.Error:
                    write(colorize(self.error_color, line))
                else:
                    write(line)
        else:
            for ttype, value in tokensource:
                write(b"%r\t%r\n" % (ttype, value))
        flush()


TESTCASE_BEFORE = '''\
    def testNeedsName(lexer):
        fragment = %r
        tokens = [
'''
TESTCASE_AFTER = '''\
        ]
        assert list(lexer.get_tokens(fragment)) == tokens
'''


class TestcaseFormatter(Formatter):
    """
    Format tokens as appropriate for a new testcase.

    .. versionadded:: 2.0
    """
    name = 'Testcase'
    aliases = ['testcase']

    def __init__(self, **options):
        Formatter.__init__(self, **options)
        if self.encoding is not None and self.encoding != 'utf-8':
            raise ValueError("Only None and utf-8 are allowed encodings.")

    def format(self, tokensource, outfile):
        indentation = ' ' * 12
        rawbuf = []
        outbuf = []
        for ttype, value in tokensource:
            rawbuf.append(value)
            outbuf.append('%s(%s, %r),\n' % (indentation, ttype, value))

        before = TESTCASE_BEFORE % (''.join(rawbuf),)
        during = ''.join(outbuf)
        after = TESTCASE_AFTER
        if self.encoding is None:
            outfile.write(before + during + after)
        else:
            outfile.write(before.encode('utf-8'))
            outfile.write(during.encode('utf-8'))
            outfile.write(after.encode('utf-8'))
        outfile.flush()
python3.12/site-packages/pip/_vendor/pygments/formatters/latex.py000064400000045627151732703030021077 0ustar00"""
    pygments.formatters.latex
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for LaTeX fancyvrb output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from io import StringIO

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.lexer import Lexer, do_insertions
from pip._vendor.pygments.token import Token, STANDARD_TYPES
from pip._vendor.pygments.util import get_bool_opt, get_int_opt


__all__ = ['LatexFormatter']


def escape_tex(text, commandprefix):
    return text.replace('\\', '\x00'). \
                replace('{', '\x01'). \
                replace('}', '\x02'). \
                replace('\x00', r'\%sZbs{}' % commandprefix). \
                replace('\x01', r'\%sZob{}' % commandprefix). \
                replace('\x02', r'\%sZcb{}' % commandprefix). \
                replace('^', r'\%sZca{}' % commandprefix). \
                replace('_', r'\%sZus{}' % commandprefix). \
                replace('&', r'\%sZam{}' % commandprefix). \
                replace('<', r'\%sZlt{}' % commandprefix). \
                replace('>', r'\%sZgt{}' % commandprefix). \
                replace('#', r'\%sZsh{}' % commandprefix). \
                replace('%', r'\%sZpc{}' % commandprefix). \
                replace('$', r'\%sZdl{}' % commandprefix). \
                replace('-', r'\%sZhy{}' % commandprefix). \
                replace("'", r'\%sZsq{}' % commandprefix). \
                replace('"', r'\%sZdq{}' % commandprefix). \
                replace('~', r'\%sZti{}' % commandprefix)


DOC_TEMPLATE = r'''
\documentclass{%(docclass)s}
\usepackage{fancyvrb}
\usepackage{color}
\usepackage[%(encoding)s]{inputenc}
%(preamble)s

%(styledefs)s

\begin{document}

\section*{%(title)s}

%(code)s
\end{document}
'''

## Small explanation of the mess below :)
#
# The previous version of the LaTeX formatter just assigned a command to
# each token type defined in the current style.  That obviously is
# problematic if the highlighted code is produced for a different style
# than the style commands themselves.
#
# This version works much like the HTML formatter which assigns multiple
# CSS classes to each <span> tag, from the most specific to the least
# specific token type, thus falling back to the parent token type if one
# is not defined.  Here, the classes are there too and use the same short
# forms given in token.STANDARD_TYPES.
#
# Highlighted code now only uses one custom command, which by default is
# \PY and selectable by the commandprefix option (and in addition the
# escapes \PYZat, \PYZlb and \PYZrb which haven't been renamed for
# backwards compatibility purposes).
#
# \PY has two arguments: the classes, separated by +, and the text to
# render in that style.  The classes are resolved into the respective
# style commands by magic, which serves to ignore unknown classes.
#
# The magic macros are:
# * \PY@it, \PY@bf, etc. are unconditionally wrapped around the text
#   to render in \PY@do.  Their definition determines the style.
# * \PY@reset resets \PY@it etc. to do nothing.
# * \PY@toks parses the list of classes, using magic inspired by the
#   keyval package (but modified to use plusses instead of commas
#   because fancyvrb redefines commas inside its environments).
# * \PY@tok processes one class, calling the \PY@tok@classname command
#   if it exists.
# * \PY@tok@classname sets the \PY@it etc. to reflect the chosen style
#   for its class.
# * \PY resets the style, parses the classnames and then calls \PY@do.
#
# Tip: to read this code, print it out in substituted form using e.g.
# >>> print STYLE_TEMPLATE % {'cp': 'PY'}

STYLE_TEMPLATE = r'''
\makeatletter
\def\%(cp)s@reset{\let\%(cp)s@it=\relax \let\%(cp)s@bf=\relax%%
    \let\%(cp)s@ul=\relax \let\%(cp)s@tc=\relax%%
    \let\%(cp)s@bc=\relax \let\%(cp)s@ff=\relax}
\def\%(cp)s@tok#1{\csname %(cp)s@tok@#1\endcsname}
\def\%(cp)s@toks#1+{\ifx\relax#1\empty\else%%
    \%(cp)s@tok{#1}\expandafter\%(cp)s@toks\fi}
\def\%(cp)s@do#1{\%(cp)s@bc{\%(cp)s@tc{\%(cp)s@ul{%%
    \%(cp)s@it{\%(cp)s@bf{\%(cp)s@ff{#1}}}}}}}
\def\%(cp)s#1#2{\%(cp)s@reset\%(cp)s@toks#1+\relax+\%(cp)s@do{#2}}

%(styles)s

\def\%(cp)sZbs{\char`\\}
\def\%(cp)sZus{\char`\_}
\def\%(cp)sZob{\char`\{}
\def\%(cp)sZcb{\char`\}}
\def\%(cp)sZca{\char`\^}
\def\%(cp)sZam{\char`\&}
\def\%(cp)sZlt{\char`\<}
\def\%(cp)sZgt{\char`\>}
\def\%(cp)sZsh{\char`\#}
\def\%(cp)sZpc{\char`\%%}
\def\%(cp)sZdl{\char`\$}
\def\%(cp)sZhy{\char`\-}
\def\%(cp)sZsq{\char`\'}
\def\%(cp)sZdq{\char`\"}
\def\%(cp)sZti{\char`\~}
%% for compatibility with earlier versions
\def\%(cp)sZat{@}
\def\%(cp)sZlb{[}
\def\%(cp)sZrb{]}
\makeatother
'''


def _get_ttype_name(ttype):
    fname = STANDARD_TYPES.get(ttype)
    if fname:
        return fname
    aname = ''
    while fname is None:
        aname = ttype[-1] + aname
        ttype = ttype.parent
        fname = STANDARD_TYPES.get(ttype)
    return fname + aname


class LatexFormatter(Formatter):
    r"""
    Format tokens as LaTeX code. This needs the `fancyvrb` and `color`
    standard packages.

    Without the `full` option, code is formatted as one ``Verbatim``
    environment, like this:

    .. sourcecode:: latex

        \begin{Verbatim}[commandchars=\\\{\}]
        \PY{k}{def }\PY{n+nf}{foo}(\PY{n}{bar}):
            \PY{k}{pass}
        \end{Verbatim}

    Wrapping can be disabled using the `nowrap` option.

    The special command used here (``\PY``) and all the other macros it needs
    are output by the `get_style_defs` method.

    With the `full` option, a complete LaTeX document is output, including
    the command definitions in the preamble.

    The `get_style_defs()` method of a `LatexFormatter` returns a string
    containing ``\def`` commands defining the macros needed inside the
    ``Verbatim`` environments.

    Additional options accepted:

    `nowrap`
        If set to ``True``, don't wrap the tokens at all, not even inside a
        ``\begin{Verbatim}`` environment. This disables most other options
        (default: ``False``).

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `full`
        Tells the formatter to output a "full" document, i.e. a complete
        self-contained document (default: ``False``).

    `title`
        If `full` is true, the title that should be used to caption the
        document (default: ``''``).

    `docclass`
        If the `full` option is enabled, this is the document class to use
        (default: ``'article'``).

    `preamble`
        If the `full` option is enabled, this can be further preamble commands,
        e.g. ``\usepackage`` (default: ``''``).

    `linenos`
        If set to ``True``, output line numbers (default: ``False``).

    `linenostart`
        The line number for the first line (default: ``1``).

    `linenostep`
        If set to a number n > 1, only every nth line number is printed.

    `verboptions`
        Additional options given to the Verbatim environment (see the *fancyvrb*
        docs for possible values) (default: ``''``).

    `commandprefix`
        The LaTeX commands used to produce colored output are constructed
        using this prefix and some letters (default: ``'PY'``).

        .. versionadded:: 0.7
        .. versionchanged:: 0.10
           The default is now ``'PY'`` instead of ``'C'``.

    `texcomments`
        If set to ``True``, enables LaTeX comment lines.  That is, LaTex markup
        in comment tokens is not escaped so that LaTeX can render it (default:
        ``False``).

        .. versionadded:: 1.2

    `mathescape`
        If set to ``True``, enables LaTeX math mode escape in comments. That
        is, ``'$...$'`` inside a comment will trigger math mode (default:
        ``False``).

        .. versionadded:: 1.2

    `escapeinside`
        If set to a string of length 2, enables escaping to LaTeX. Text
        delimited by these 2 characters is read as LaTeX code and
        typeset accordingly. It has no effect in string literals. It has
        no effect in comments if `texcomments` or `mathescape` is
        set. (default: ``''``).

        .. versionadded:: 2.0

    `envname`
        Allows you to pick an alternative environment name replacing Verbatim.
        The alternate environment still has to support Verbatim's option syntax.
        (default: ``'Verbatim'``).

        .. versionadded:: 2.0
    """
    name = 'LaTeX'
    aliases = ['latex', 'tex']
    filenames = ['*.tex']

    def __init__(self, **options):
        Formatter.__init__(self, **options)
        self.nowrap = get_bool_opt(options, 'nowrap', False)
        self.docclass = options.get('docclass', 'article')
        self.preamble = options.get('preamble', '')
        self.linenos = get_bool_opt(options, 'linenos', False)
        self.linenostart = abs(get_int_opt(options, 'linenostart', 1))
        self.linenostep = abs(get_int_opt(options, 'linenostep', 1))
        self.verboptions = options.get('verboptions', '')
        self.nobackground = get_bool_opt(options, 'nobackground', False)
        self.commandprefix = options.get('commandprefix', 'PY')
        self.texcomments = get_bool_opt(options, 'texcomments', False)
        self.mathescape = get_bool_opt(options, 'mathescape', False)
        self.escapeinside = options.get('escapeinside', '')
        if len(self.escapeinside) == 2:
            self.left = self.escapeinside[0]
            self.right = self.escapeinside[1]
        else:
            self.escapeinside = ''
        self.envname = options.get('envname', 'Verbatim')

        self._create_stylesheet()

    def _create_stylesheet(self):
        t2n = self.ttype2name = {Token: ''}
        c2d = self.cmd2def = {}
        cp = self.commandprefix

        def rgbcolor(col):
            if col:
                return ','.join(['%.2f' % (int(col[i] + col[i + 1], 16) / 255.0)
                                 for i in (0, 2, 4)])
            else:
                return '1,1,1'

        for ttype, ndef in self.style:
            name = _get_ttype_name(ttype)
            cmndef = ''
            if ndef['bold']:
                cmndef += r'\let\$$@bf=\textbf'
            if ndef['italic']:
                cmndef += r'\let\$$@it=\textit'
            if ndef['underline']:
                cmndef += r'\let\$$@ul=\underline'
            if ndef['roman']:
                cmndef += r'\let\$$@ff=\textrm'
            if ndef['sans']:
                cmndef += r'\let\$$@ff=\textsf'
            if ndef['mono']:
                cmndef += r'\let\$$@ff=\textsf'
            if ndef['color']:
                cmndef += (r'\def\$$@tc##1{\textcolor[rgb]{%s}{##1}}' %
                           rgbcolor(ndef['color']))
            if ndef['border']:
                cmndef += (r'\def\$$@bc##1{{\setlength{\fboxsep}{\string -\fboxrule}'
                           r'\fcolorbox[rgb]{%s}{%s}{\strut ##1}}}' %
                           (rgbcolor(ndef['border']),
                            rgbcolor(ndef['bgcolor'])))
            elif ndef['bgcolor']:
                cmndef += (r'\def\$$@bc##1{{\setlength{\fboxsep}{0pt}'
                           r'\colorbox[rgb]{%s}{\strut ##1}}}' %
                           rgbcolor(ndef['bgcolor']))
            if cmndef == '':
                continue
            cmndef = cmndef.replace('$$', cp)
            t2n[ttype] = name
            c2d[name] = cmndef

    def get_style_defs(self, arg=''):
        """
        Return the command sequences needed to define the commands
        used to format text in the verbatim environment. ``arg`` is ignored.
        """
        cp = self.commandprefix
        styles = []
        for name, definition in self.cmd2def.items():
            styles.append(r'\@namedef{%s@tok@%s}{%s}' % (cp, name, definition))
        return STYLE_TEMPLATE % {'cp': self.commandprefix,
                                 'styles': '\n'.join(styles)}

    def format_unencoded(self, tokensource, outfile):
        # TODO: add support for background colors
        t2n = self.ttype2name
        cp = self.commandprefix

        if self.full:
            realoutfile = outfile
            outfile = StringIO()

        if not self.nowrap:
            outfile.write('\\begin{' + self.envname + '}[commandchars=\\\\\\{\\}')
            if self.linenos:
                start, step = self.linenostart, self.linenostep
                outfile.write(',numbers=left' +
                              (start and ',firstnumber=%d' % start or '') +
                              (step and ',stepnumber=%d' % step or ''))
            if self.mathescape or self.texcomments or self.escapeinside:
                outfile.write(',codes={\\catcode`\\$=3\\catcode`\\^=7'
                              '\\catcode`\\_=8\\relax}')
            if self.verboptions:
                outfile.write(',' + self.verboptions)
            outfile.write(']\n')

        for ttype, value in tokensource:
            if ttype in Token.Comment:
                if self.texcomments:
                    # Try to guess comment starting lexeme and escape it ...
                    start = value[0:1]
                    for i in range(1, len(value)):
                        if start[0] != value[i]:
                            break
                        start += value[i]

                    value = value[len(start):]
                    start = escape_tex(start, cp)

                    # ... but do not escape inside comment.
                    value = start + value
                elif self.mathescape:
                    # Only escape parts not inside a math environment.
                    parts = value.split('$')
                    in_math = False
                    for i, part in enumerate(parts):
                        if not in_math:
                            parts[i] = escape_tex(part, cp)
                        in_math = not in_math
                    value = '$'.join(parts)
                elif self.escapeinside:
                    text = value
                    value = ''
                    while text:
                        a, sep1, text = text.partition(self.left)
                        if sep1:
                            b, sep2, text = text.partition(self.right)
                            if sep2:
                                value += escape_tex(a, cp) + b
                            else:
                                value += escape_tex(a + sep1 + b, cp)
                        else:
                            value += escape_tex(a, cp)
                else:
                    value = escape_tex(value, cp)
            elif ttype not in Token.Escape:
                value = escape_tex(value, cp)
            styles = []
            while ttype is not Token:
                try:
                    styles.append(t2n[ttype])
                except KeyError:
                    # not in current style
                    styles.append(_get_ttype_name(ttype))
                ttype = ttype.parent
            styleval = '+'.join(reversed(styles))
            if styleval:
                spl = value.split('\n')
                for line in spl[:-1]:
                    if line:
                        outfile.write("\\%s{%s}{%s}" % (cp, styleval, line))
                    outfile.write('\n')
                if spl[-1]:
                    outfile.write("\\%s{%s}{%s}" % (cp, styleval, spl[-1]))
            else:
                outfile.write(value)

        if not self.nowrap:
            outfile.write('\\end{' + self.envname + '}\n')

        if self.full:
            encoding = self.encoding or 'utf8'
            # map known existings encodings from LaTeX distribution
            encoding = {
                'utf_8': 'utf8',
                'latin_1': 'latin1',
                'iso_8859_1': 'latin1',
            }.get(encoding.replace('-', '_'), encoding)
            realoutfile.write(DOC_TEMPLATE %
                dict(docclass  = self.docclass,
                     preamble  = self.preamble,
                     title     = self.title,
                     encoding  = encoding,
                     styledefs = self.get_style_defs(),
                     code      = outfile.getvalue()))


class LatexEmbeddedLexer(Lexer):
    """
    This lexer takes one lexer as argument, the lexer for the language
    being formatted, and the left and right delimiters for escaped text.

    First everything is scanned using the language lexer to obtain
    strings and comments. All other consecutive tokens are merged and
    the resulting text is scanned for escaped segments, which are given
    the Token.Escape type. Finally text that is not escaped is scanned
    again with the language lexer.
    """
    def __init__(self, left, right, lang, **options):
        self.left = left
        self.right = right
        self.lang = lang
        Lexer.__init__(self, **options)

    def get_tokens_unprocessed(self, text):
        # find and remove all the escape tokens (replace with an empty string)
        # this is very similar to DelegatingLexer.get_tokens_unprocessed.
        buffered = ''
        insertions = []
        insertion_buf = []
        for i, t, v in self._find_safe_escape_tokens(text):
            if t is None:
                if insertion_buf:
                    insertions.append((len(buffered), insertion_buf))
                    insertion_buf = []
                buffered += v
            else:
                insertion_buf.append((i, t, v))
        if insertion_buf:
            insertions.append((len(buffered), insertion_buf))
        return do_insertions(insertions,
                             self.lang.get_tokens_unprocessed(buffered))

    def _find_safe_escape_tokens(self, text):
        """ find escape tokens that are not in strings or comments """
        for i, t, v in self._filter_to(
            self.lang.get_tokens_unprocessed(text),
            lambda t: t in Token.Comment or t in Token.String
        ):
            if t is None:
                for i2, t2, v2 in self._find_escape_tokens(v):
                    yield i + i2, t2, v2
            else:
                yield i, None, v

    def _filter_to(self, it, pred):
        """ Keep only the tokens that match `pred`, merge the others together """
        buf = ''
        idx = 0
        for i, t, v in it:
            if pred(t):
                if buf:
                    yield idx, None, buf
                    buf = ''
                yield i, t, v
            else:
                if not buf:
                    idx = i
                buf += v
        if buf:
            yield idx, None, buf

    def _find_escape_tokens(self, text):
        """ Find escape tokens within text, give token=None otherwise """
        index = 0
        while text:
            a, sep1, text = text.partition(self.left)
            if a:
                yield index, None, a
                index += len(a)
            if sep1:
                b, sep2, text = text.partition(self.right)
                if sep2:
                    yield index + len(sep1), Token.Escape, b
                    index += len(sep1) + len(b) + len(sep2)
                else:
                    yield index, Token.Error, sep1
                    index += len(sep1)
                    text = b
python3.12/site-packages/pip/_vendor/pygments/formatters/bbcode.py000064400000006362151732703030021171 0ustar00"""
    pygments.formatters.bbcode
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    BBcode formatter.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""


from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.util import get_bool_opt

__all__ = ['BBCodeFormatter']


class BBCodeFormatter(Formatter):
    """
    Format tokens with BBcodes. These formatting codes are used by many
    bulletin boards, so you can highlight your sourcecode with pygments before
    posting it there.

    This formatter has no support for background colors and borders, as there
    are no common BBcode tags for that.

    Some board systems (e.g. phpBB) don't support colors in their [code] tag,
    so you can't use the highlighting together with that tag.
    Text in a [code] tag usually is shown with a monospace font (which this
    formatter can do with the ``monofont`` option) and no spaces (which you
    need for indentation) are removed.

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `codetag`
        If set to true, put the output into ``[code]`` tags (default:
        ``false``)

    `monofont`
        If set to true, add a tag to show the code with a monospace font
        (default: ``false``).
    """
    name = 'BBCode'
    aliases = ['bbcode', 'bb']
    filenames = []

    def __init__(self, **options):
        Formatter.__init__(self, **options)
        self._code = get_bool_opt(options, 'codetag', False)
        self._mono = get_bool_opt(options, 'monofont', False)

        self.styles = {}
        self._make_styles()

    def _make_styles(self):
        for ttype, ndef in self.style:
            start = end = ''
            if ndef['color']:
                start += '[color=#%s]' % ndef['color']
                end = '[/color]' + end
            if ndef['bold']:
                start += '[b]'
                end = '[/b]' + end
            if ndef['italic']:
                start += '[i]'
                end = '[/i]' + end
            if ndef['underline']:
                start += '[u]'
                end = '[/u]' + end
            # there are no common BBcodes for background-color and border

            self.styles[ttype] = start, end

    def format_unencoded(self, tokensource, outfile):
        if self._code:
            outfile.write('[code]')
        if self._mono:
            outfile.write('[font=monospace]')

        lastval = ''
        lasttype = None

        for ttype, value in tokensource:
            while ttype not in self.styles:
                ttype = ttype.parent
            if ttype == lasttype:
                lastval += value
            else:
                if lastval:
                    start, end = self.styles[lasttype]
                    outfile.write(''.join((start, lastval, end)))
                lastval = value
                lasttype = ttype

        if lastval:
            start, end = self.styles[lasttype]
            outfile.write(''.join((start, lastval, end)))

        if self._mono:
            outfile.write('[/font]')
        if self._code:
            outfile.write('[/code]')
        if self._code or self._mono:
            outfile.write('\n')
python3.12/site-packages/pip/_vendor/pygments/formatters/rtf.py000064400000011626151732703030020545 0ustar00"""
    pygments.formatters.rtf
    ~~~~~~~~~~~~~~~~~~~~~~~

    A formatter that generates RTF files.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.util import get_int_opt, surrogatepair


__all__ = ['RtfFormatter']


class RtfFormatter(Formatter):
    """
    Format tokens as RTF markup. This formatter automatically outputs full RTF
    documents with color information and other useful stuff. Perfect for Copy and
    Paste into Microsoft(R) Word(R) documents.

    Please note that ``encoding`` and ``outencoding`` options are ignored.
    The RTF format is ASCII natively, but handles unicode characters correctly
    thanks to escape sequences.

    .. versionadded:: 0.6

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `fontface`
        The used font family, for example ``Bitstream Vera Sans``. Defaults to
        some generic font which is supposed to have fixed width.

    `fontsize`
        Size of the font used. Size is specified in half points. The
        default is 24 half-points, giving a size 12 font.

        .. versionadded:: 2.0
    """
    name = 'RTF'
    aliases = ['rtf']
    filenames = ['*.rtf']

    def __init__(self, **options):
        r"""
        Additional options accepted:

        ``fontface``
            Name of the font used. Could for example be ``'Courier New'``
            to further specify the default which is ``'\fmodern'``. The RTF
            specification claims that ``\fmodern`` are "Fixed-pitch serif
            and sans serif fonts". Hope every RTF implementation thinks
            the same about modern...

        """
        Formatter.__init__(self, **options)
        self.fontface = options.get('fontface') or ''
        self.fontsize = get_int_opt(options, 'fontsize', 0)

    def _escape(self, text):
        return text.replace('\\', '\\\\') \
                   .replace('{', '\\{') \
                   .replace('}', '\\}')

    def _escape_text(self, text):
        # empty strings, should give a small performance improvement
        if not text:
            return ''

        # escape text
        text = self._escape(text)

        buf = []
        for c in text:
            cn = ord(c)
            if cn < (2**7):
                # ASCII character
                buf.append(str(c))
            elif (2**7) <= cn < (2**16):
                # single unicode escape sequence
                buf.append('{\\u%d}' % cn)
            elif (2**16) <= cn:
                # RTF limits unicode to 16 bits.
                # Force surrogate pairs
                buf.append('{\\u%d}{\\u%d}' % surrogatepair(cn))

        return ''.join(buf).replace('\n', '\\par\n')

    def format_unencoded(self, tokensource, outfile):
        # rtf 1.8 header
        outfile.write('{\\rtf1\\ansi\\uc0\\deff0'
                      '{\\fonttbl{\\f0\\fmodern\\fprq1\\fcharset0%s;}}'
                      '{\\colortbl;' % (self.fontface and
                                        ' ' + self._escape(self.fontface) or
                                        ''))

        # convert colors and save them in a mapping to access them later.
        color_mapping = {}
        offset = 1
        for _, style in self.style:
            for color in style['color'], style['bgcolor'], style['border']:
                if color and color not in color_mapping:
                    color_mapping[color] = offset
                    outfile.write('\\red%d\\green%d\\blue%d;' % (
                        int(color[0:2], 16),
                        int(color[2:4], 16),
                        int(color[4:6], 16)
                    ))
                    offset += 1
        outfile.write('}\\f0 ')
        if self.fontsize:
            outfile.write('\\fs%d' % self.fontsize)

        # highlight stream
        for ttype, value in tokensource:
            while not self.style.styles_token(ttype) and ttype.parent:
                ttype = ttype.parent
            style = self.style.style_for_token(ttype)
            buf = []
            if style['bgcolor']:
                buf.append('\\cb%d' % color_mapping[style['bgcolor']])
            if style['color']:
                buf.append('\\cf%d' % color_mapping[style['color']])
            if style['bold']:
                buf.append('\\b')
            if style['italic']:
                buf.append('\\i')
            if style['underline']:
                buf.append('\\ul')
            if style['border']:
                buf.append('\\chbrdr\\chcfpat%d' %
                           color_mapping[style['border']])
            start = ''.join(buf)
            if start:
                outfile.write('{%s ' % start)
            outfile.write(self._escape_text(value))
            if start:
                outfile.write('}')

        outfile.write('}')
python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-312.pyc000064400000013354151732703040026127 0ustar00�

R`iB���dZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZdgZied�e
d�ed�ej&d	�ed
�ej(d	�e
j*d�ej,d	�ej.d�ej0d
�ej2d�ej4d	�ej6d�ej8d�ej:d�ej<d	�ej>d�ede	d
ej@dejBdejDdejFdejHdejdedi	�Z%Gd�de�Z&y)z�
    pygments.formatters.terminal
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for terminal output with ANSI sequences.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)
�Keyword�Name�Comment�String�Error�Number�Operator�Generic�Token�
Whitespace)�
ansiformat)�get_choice_opt�TerminalFormatter)�r)�gray�brightblack)�cyan�
brightcyan)�blue�
brightblue)�magenta�
brightmagenta)�green�brightgreen)�_cyan_�_brightcyan_)�_green_�
_brightgreen_)rr)�red�	brightred)rr)�yellowr")r!r!)�**r#)z	*magenta*z*brightmagenta*)�_brightred_r$c�>�eZdZdZdZddgZgZd�Zd�Zd�Z	d�Z
d	�Zy
)ra�
    Format tokens with ANSI color sequences, for output in a text console.
    Color sequences are terminated at newlines, so that paging the output
    works correctly.

    The `get_style_defs()` method doesn't do anything special since there is
    no support for common styles.

    Options accepted:

    `bg`
        Set to ``"light"`` or ``"dark"`` depending on the terminal's background
        (default: ``"light"``).

    `colorscheme`
        A dictionary mapping token types to (lightbg, darkbg) color names or
        ``None`` (default: ``None`` = use builtin colorscheme).

    `linenos`
        Set to ``True`` to have line numbers on the terminal output as well
        (default: ``False`` = no line numbers).
    �Terminal�terminal�consolec���tj|fi|��t|dddgd�dk(|_|j	dd�xst
|_|j	dd�|_d|_y)N�bg�light�dark�colorscheme�linenosFr)	r�__init__r�darkbg�get�TERMINAL_COLORSr-r.�_lineno)�self�optionss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/terminal.pyr/zTerminalFormatter.__init__Ssj�����4�+�7�+�$�W�d�&-�v�%6��A�DJ�K���"�;�;�}�d�;�N�����{�{�9�e�4������c�0�tj|||�S�N)r�format)r4�tokensource�outfiles   r6r:zTerminalFormatter.format[s������k�7�;�;r7c��|xjdz
c_|jd|jdk7xrdxsd|jfz�y)N�z%s%04d: �
r)r3�write)r4r<s  r6�
_write_linenozTerminalFormatter._write_lineno^s=���������
�
�j�D�L�L�A�$5�$>�$�$D�"�d�l�l�#S�S�Tr7c��|jj|�}|�*|j}|jj|�}|��*||jSr9)r-r1�parentr0)r4�ttype�colorss   r6�
_get_colorzTerminalFormatter._get_colorbsV���!�!�%�%�e�,���n��L�L�E��%�%�)�)�%�0�F��n��d�k�k�"�"r7c
��|jr|j|�|D]�\}}|j|�}|jd�D]�}|r+|j	t||j
d���n |j	|j
d��|jd�s�b|jr|j|���|j	d�����|jr|j	d�yy)NTr?)r.rArF�
splitlinesr@r�rstrip�endswith)r4r;r<rD�value�color�lines       r6�format_unencodedz"TerminalFormatter.format_unencodedls����<�<����w�'�'�L�E�5��O�O�E�*�E��(�(��.����M�M�*�U�D�K�K��4E�"F�G��M�M�$�+�+�d�"3�4��=�=��&��|�|��*�*�7�3��
�
�d�+�/�(��<�<��M�M�$��r7N)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesr/r:rArFrN�r7r6rr8s7���,�D��9�%�G��I��<�U�#� r7N)'rR�pip._vendor.pygments.formatterr�pip._vendor.pygments.tokenrrrrrr	r
rrr
�pip._vendor.pygments.consoler�pip._vendor.pygments.utilr�__all__�Preproc�Type�Word�Builtin�Function�	Namespace�Class�	Exception�	Decorator�Variable�Constant�	Attribute�Tag�Deleted�Inserted�Heading�
Subheading�Promptr2rrVr7r6�<module>rns����5�1�1�1�3�4��
��
�	�+���1���1�	�
�O�O�5���1�
��L�L�5��
�M�M�9��	�L�L�5��	�M�M�2��	�N�N�7��	�J�J�4��	�N�N�5��	�N�N�2��	�M�M�0�� 	�M�M�0�!�"	�N�N�5�#�$	�H�H�;�%�&�2�
�1��O�O�9����1��O�O�,����:��N�N�,��M�M�9�	�;�;��BG �	�G r7python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc000064400000015414151732703040026052 0ustar00�

R`i0��v�dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZgd�e
e�zZiZiZd�Zd	�Zd
�Zd�Zd�Zdd
�Zd�ZGd�dej0�Zej4eZee�Zej<j?ej<�eej4e<e`e`e`e`y)z�
    pygments.formatters
    ~~~~~~~~~~~~~~~~~~~

    Pygments formatters.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�basename)�
FORMATTERS)�find_plugin_formatters)�
ClassNotFound)�get_formatter_by_name�get_formatter_for_filename�get_all_formatters�load_formatter_from_filec���|tvrBtjtj|��x}t|<|j|�St|j|�S)zBReturn whether the supplied file name fn matches pattern filename.)�_pattern_cache�re�compile�fnmatch�	translate�match)�fn�glob�patterns   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__init__.py�_fn_matchesrsR���>�!�)+���G�4E�4E�d�4K�)L�L��.��&��}�}�R� � ��$��%�%�b�)�)�c��t|dddg�}|jD]!}t||�}|t|j<�#y)z4Load a formatter (and all others in the module too).N�__all__)�
__import__r�getattr�_formatter_cache�name)�module_name�mod�formatter_name�clss    r�_load_formattersr"$s=��
�[�$��y�k�
:�C��+�+���c�>�*��%(�����"�&rc#�K�tj�D])}|dtvrt|d�t|d���+t	�D]	\}}|���y�w)z-Return a generator for all formatter classes.�rN)r�valuesrr"r)�info�_�	formatters   rr	r	,s[�����!�!�#����7�*�*��T�!�W�%��t�A�w�'�'�$�/�0���9���1�s�AAc���tj�D]*\}}}}}||vs�|tvrt|�t|cSt	�D]\}}||j
vs�|cSy)zALookup a formatter by alias.

    Returns None if not found.
    N)rr%rr"r�aliases)�aliasrrr*r'r!s      r�find_formatter_classr,7sk��
-7�,=�,=�,?�(��T�7�A�q��G���+�+� ��-�#�D�)�)�	-@�
)�*���3��C�K�K���J�+rc�H�t|�}|�td|z��|di|��S)a
    Return an instance of a :class:`.Formatter` subclass that has `alias` in its
    aliases list. The formatter is given the `options` at its instantiation.

    Will raise :exc:`pygments.util.ClassNotFound` if no formatter with that
    alias is found.
    zno formatter found for name %r�)r,r)�_alias�optionsr!s   rrrFs0���v�
&�C�
�{��<�v�E�F�F��>��>�rc�L�	i}t|d�5}t|j�|�ddd�||vrtd|�d|����||}|di|��S#1swY�+xYw#t$r}td|�d|����d}~wt$r�t
$r}td|z��d}~wwxYw)	a#
    Return a `Formatter` subclass instance loaded from the provided file, relative
    to the current directory.

    The file is expected to contain a Formatter class named ``formattername``
    (by default, CustomFormatter). Users should be very careful with the input, because
    this method is equivalent to running ``eval()`` on the input file. The formatter is
    given the `options` at its instantiation.

    :exc:`pygments.util.ClassNotFound` is raised if there are any errors loading
    the formatter.

    .. versionadded:: 2.2
    �rbNz	no valid z class found in zcannot read z: z'error when loading custom formatter: %sr.)�open�exec�readr�OSError�	Exception)�filename�
formatternamer0�custom_namespace�f�formatter_class�errs       rr
r
Ts���M���
�(�D�
!�Q������+�,�"�� 0�0��!.��!:�;�
;�*�=�9���)��)�)�"�
!���D��H�c�B�C�C����
��M��E��K�L�L��M�s9�A!�A�)A!�A�A!�!	B#�*A;�;B#�B�B#c�R�t|�}tj�D]@\}}}}}|D]3}t||�s�|tvrt|�t	|di|��ccS�Bt
�D]+}|jD]}t||�s�|di|��ccS�-td|z��)a
    Return a :class:`.Formatter` subclass instance that has a filename pattern
    matching `fn`. The formatter is given the `options` at its instantiation.

    Will raise :exc:`pygments.util.ClassNotFound` if no formatter for that filename
    is found.
    z#no formatter found for file name %rr.)	rrr%rrr"r�	filenamesr)rr0�modnamerr'r?r8r!s        rrrws���
�"��B�*4�*;�*;�*=�&���q�)�Q�!�H��2�x�(��/�/�$�W�-�'��-�8��8�8�	"�+>�&�'���
�
�H��2�x�(��~�W�~�%�&�(��=��B�
C�Crc��eZdZdZd�Zy)�_automodulez Automatically import formatters.c��tj|�}|r)t|d�t|d}t	|||�|St|��)Nrr$)r�getr"r�setattr�AttributeError)�selfrr&r!s    r�__getattr__z_automodule.__getattr__�sI���~�~�d�#����T�!�W�%�"�4��7�+�C��D�$��$��J��T�"�"rN)�__name__�
__module__�__qualname__�__doc__rHr.rrrBrB�s
��*�#rrB)�CustomFormatter) rLr
�sys�typesr�os.pathr�(pip._vendor.pygments.formatters._mappingr�pip._vendor.pygments.pluginr�pip._vendor.pygments.utilr�listrrrrr"r	r,rr
r�
ModuleTyperB�modulesrI�oldmod�newmod�__dict__�updater.rr�<module>r[s����
�
����?�>�3�=�?C�J�?O�P������*�)���� M�FD�,
#�%�"�"�
#�

���X�	��	�X�	�������v���'�����H��
�M�6�=�&�*�f�lrpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/groff.cpython-312.pyc000064400000016152151732703040025416 0ustar00�

R`i���H�dZddlZddlmZddlmZmZdgZGd�de�Zy)z�
    pygments.formatters.groff
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for groff output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�	Formatter)�get_bool_opt�get_int_opt�GroffFormatterc�J�eZdZdZdZgd�ZgZd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
y)ra
    Format tokens with groff escapes to change their color and font style.

    .. versionadded:: 2.11

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `monospaced`
        If set to true, monospace font will be used (default: ``true``).

    `linenos`
        If set to true, print the line numbers (default: ``false``).

    `wrap`
        Wrap lines to the specified number of characters. Disabled if set to 0
        (default: ``0``).
    �groff)r�troff�roffc���tj|fi|��t|dd�|_t|dd�|_d|_t
|dd�|_d|_i|_	|j�y)N�
monospacedT�linenosFr�wrap)r�__init__rrr
�_linenorr�_linelen�styles�_make_styles)�self�optionss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/groff.pyrzGroffFormatter.__init__-sf�����4�+�7�+�&�w��d�C���#�G�Y��>����������3��	���
��������c�F�|jrdnd}|jrdnd}|jrdnd}|jD]b\}}dx}}|dr|d	|dzz
}d
|z}|dr
||z
}||z}|dr
||z
}||z}|d
r|d|d
zz
}d|z}||f|j|<�dy)Nz\f[CR]z\f[R]z\f[CB]z\f[B]z\f[CI]z\f[I]��colorz\m[%s]z\m[]�bold�italic�bgcolorz\M[%s]z\M[])r�styler)r�regularrr�ttype�ndef�start�ends        rrzGroffFormatter._make_styles:s���#���)�H�� �O�O�y���"�o�o��8���:�:�K�E�4���E�C��G�}���T�'�]�2�2����m���F�|���
����m���H�~�������m���I����T�)�_�4�4����m��!&���D�K�K���&rc���t�}|jD]\}}|d��|j|d��!t|�D]}|j	d|zdz|zdz��!y)Nrz
.defcolor z rgb #�
)�setr�add�sorted�write)r�outfile�colors�_r!rs      r�_define_colorszGroffFormatter._define_colorsQse������z�z�G�A�t��G�}�(��
�
�4��=�)�"��F�^�E��M�M�,��.��9�E�A�D�H�I�$rc��|xjdz
c_|jd|jdk7xrdxsd|jfz�y)N�z%s% 4d r%r)rr))rr*s  r�
_write_linenozGroffFormatter._write_lineno[s=���������
�
�i�4�<�<�1�#4�#=��#C��T�\�\�"R�R�Src�&�t|jd��}|jrdnd}d}||jkDr�t	dtj||jz��D]9}|||jz||jz|jz}||dz|zz
}�;||jz}|dkDr|||dz
dz
}||_|S|j|z|jkDrd|z|z}||_|S|}|xj|z
c_|S)Nr%z     rrr/)�len�rstripr
r�range�math�floorr)r�line�length�space�newline�i�chunk�	remainders        r�
_wrap_linezGroffFormatter._wrap_line`s���T�[�[��&�'���<�<��R�����D�I�I���1�d�j�j��$�)�)�);�<�=���Q�t�y�y�[��4�9�9��T�Y�Y�)>�?���E�D�L�5�0�1��>�����*�I��1�}��4��
�1��
�.�.�� )��
����]�]�V�
#�d�i�i�
/��e�|�t�+�G�"�D�M�
���G��M�M�V�#�M��rc��|jdd�jdd�jdd�jdd�jd	d
�}|}|D]�}t|�t|j��k7s�)|jd�j�ddjd
d�j	�}|j|d|ddzdz�}��|S)N�\z\[u005C]�.z	\[char46]�'z\[u0027]�`z\[u0060]�~z\[u007E]�unicode_escaper/�x�u00z\[u�])�replacer2�encode�decode�upper)r�text�copy�char�unis     r�
_escape_charszGroffFormatter._escape_charsws����|�|�D�+�.��G�C��.��G�D�+�.��G�C��-��G�C��-�		
�
���D��4�y�C����
�.�.��k�k�"2�3��V�X�a�b�"��W�S�%�(��U�W���|�|�D�&�3�q�r�7�*:�S�*@�A��
��rc	�4�|j|�|jd�|jr|j|�|D�]B\}}||jvr|j
}||jvr�|j|\}}|j
d�D]�}|jdkDr|j|�}|rK|rI|j|jd��}|dk7rS|jdj|||f��n/|j|j|jd���|jd�s��|jr|j|�d|_
��|jd�d|_
����E|jd�y)Nz.nf
\f[CR]
Trr%rz
.fi)r-r)r
r0r�parent�
splitlinesrr>rQr3�join�endswithr)	r�tokensourcer*r �valuer"r#r7rMs	         r�format_unencodedzGroffFormatter.format_unencoded�sM�����G�$��
�
�&�'��<�<����w�'�'�L�E�5��t�{�{�*������t�{�{�*����U�+�J�E�3��(�(��.���9�9�q�=��?�?�4�0�D��S��-�-�d�k�k�$�.?�@�D��r�z��
�
�b�g�g�u�d�C�.@�&A�B��M�M�$�"4�"4�T�[�[��5F�"G�H��=�=��&��|�|��*�*�7�3�()��
��
�
�d�+�()��
�#/�(�0	�
�
�g�rN)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesrrr-r0r>rQrY�rrrrs=���,�D�&�G��I�
�,�.J�T�
�.�& r)	r]r5�pip._vendor.pygments.formatterr�pip._vendor.pygments.utilrr�__all__rrarr�<module>res+����4�?��
��X�Y�Xrpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal256.cpython-312.pyc000064400000035477151732703040026376 0ustar00�

R`i�-��t�dZddlmZddlmZddlmZddgZGd�d�ZGd	�de�Z	Gd
�de	�Z
y)a�
    pygments.formatters.terminal256
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for 256-color terminal output with ANSI sequences.

    RGB-to-XTERM color conversion routines adapted from xterm256-conv
    tool (http://frexx.de/xterm-256-notes/data/xterm256-conv2.tar.bz2)
    by Wolfgang Frisch.

    Formatter version 1.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)�codes)�
ansicolors�Terminal256Formatter�TerminalTrueColorFormatterc�,�eZdZdd�Zd�Zd�Zd�Zd�Zy)�EscapeSequenceNc�J�||_||_||_||_||_y�N)�fg�bg�bold�	underline�italic)�selfrr
rrrs      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/terminal256.py�__init__zEscapeSequence.__init__#s%����������	�"������c�H�t|�rddj|�zdzSy)Nz[�;�m�)�len�join�r�attrss  r�escapezEscapeSequence.escape*s$���u�:��S�X�X�e�_�,�s�2�2�rc	���g}|j�v|jtvrCt|jjdd�}d|vrd|_|j|dd�n!|j
ddd	|jzf�|j��|jtvrMt|jjdd�}|jtt|dd�d
z��n!|j
ddd	|jzf�|jr|jd�|jr|jd
�|jr|jd�|j|�S)N�ansirz;01mT���38�5z%i�
�48�01�04�03)
rrr�replacer�append�extendr
�str�intrrr)rr�escs   r�color_stringzEscapeSequence.color_string/s#�����7�7���w�w�*�$��D�G�G�O�O�F�2�6�7���S�=� $�D�I����S��1�X�&����d�C������8�9��7�7���w�w�*�$��D�G�G�O�O�F�2�6�7�����S��S��1�X��r�!1�2�3����d�C������8�9��9�9��L�L����>�>��L�L����;�;��L�L����{�{�5�!�!rc
�f�g}|jrX|jddt|jd�t|jd�t|jd�f�|jrX|jddt|jd�t|jd�t|jd�f�|jr|jd�|jr|jd�|jr|jd	�|j|�S)
Nr"�2r�r r%r&r'r()	rr+r,r
rr*rrrrs  r�true_color_stringz EscapeSequence.true_color_stringIs������7�7��L�L�$��S������_�c�$�'�'�!�*�o�s�4�7�7�ST�:��W�X��7�7��L�L�$��S������_�c�$�'�'�!�*�o�s�4�7�7�ST�:��W�X��9�9��L�L����>�>��L�L����;�;��L�L����{�{�5�!�!rc��g}|j�|jd�|j�|jd�|js|js|j
r|jd�|j
|�S)N�39�49�00)rr*r
rrrrrs  r�reset_stringzEscapeSequence.reset_stringWsa�����7�7���L�L����7�7���L�L����9�9����$�+�+��L�L����{�{�5�!�!r)NNFFF)�__name__�
__module__�__qualname__rrr/r3r8�rrr	r	"s����
"�4"�"rr	c�P�eZdZdZdZgd�ZgZd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zy)
ra�
    Format tokens with ANSI color sequences, for output in a 256-color
    terminal or console.  Like in `TerminalFormatter` color sequences
    are terminated at newlines, so that paging the output works correctly.

    The formatter takes colors from a style defined by the `style` option
    and converts them to nearest ANSI 256-color escape sequences. Bold and
    underline attributes from the style are preserved (and displayed).

    .. versionadded:: 0.9

    .. versionchanged:: 2.2
       If the used style defines foreground colors in the form ``#ansi*``, then
       `Terminal256Formatter` will map these to non extended foreground color.
       See :ref:`AnsiTerminalStyle` for more information.

    .. versionchanged:: 2.4
       The ANSI color names have been updated with names that are easier to
       understand and align with colornames of other projects and terminals.
       See :ref:`this table <new-ansi-color-names>` for more information.


    Options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `linenos`
        Set to ``True`` to have line numbers on the terminal output as well
        (default: ``False`` = no line numbers).
    �Terminal256)�terminal256�
console256�256c��tj|fi|��g|_i|_i|_d|v|_d|v|_d|v|_|j�|j�|jdd�|_d|_y)N�nobold�nounderline�noitalic�linenosFr)
rr�xterm_colors�
best_match�style_string�usebold�useunderline�	useitalic�_build_color_table�
_setup_styles�getrF�_lineno)r�optionss  rrzTerminal256Formatter.__init__�s������4�+�7�+�����������w�.���)��8���#�7�2������!������{�{�9�e�4�����rc�n�|jjd�|jjd�|jjd�|jjd�|jjd�|jjd�|jjd�|jjd�|jjd	�|jjd
�|jjd�|jjd�|jjd
�|jjd�|jjd�|jjd�d}td�D]>}||dzdz}||dzdz}||dz}|jj|||f��@tdd�D](}d|dzz}|jj|||f��*y)N)rrr)��rr)rrSr)rSrSr)rr��)rSrrS)rrSrS)��rUrU)�rVrV)�rr)rrWr)rWrWr)�\rXrW)rWrrW)rrWrW)rWrWrW)r�_����rW���$�r2��r$)rGr*�range)r�
valuerange�i�r�g�b�vs       rrMz'Terminal256Formatter._build_color_table�s���	
��� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4���� � �!3�4�:�
��s��A��A��G�q�=�)�A��A��F�a�<�(�A��1�q�5�!�A����$�$�a��A�Y�/�	��q�"��A��A��F�
�A����$�$�a��A�Y�/�rc��d}d}tdd�D]D}|j|}||dz
}||dz
}	||dz
}
||z|	|	zz|
|
zz}||ks�A|}|}�F|S)Nir�r2r )rbrG)rrerfrg�distance�matchrd�values�rd�gd�bd�ds            r�_closest_colorz#Terminal256Formatter._closest_color�s��������q�#��A��&�&�q�)�F��V�A�Y��B��V�A�Y��B��V�A�Y��B��2���2��
��2��%�A��8�|�������rc�0�|jj|d�}|tvr|}||j|<|�M	tt	|�d�}|dz	dz}|dz	dz}|dz}|j
|||�}||j|<|S#t
$rd}Y�FwxYw)N�rrWra)rHrOrr-r,�
ValueErrorrr)r�color�index�rgbrerfrgs       r�_color_indexz!Terminal256Formatter._color_index�s������#�#�E�4�0���J���E�%*�D�O�O�E�"��=�
��#�e�*�b�)�����d�"�A����T�!�A��d�
�A��'�'��1�a�0�E�%*�D�O�O�E�"�����
���
�s�B�B�Bc�4�|jD�]\}}t�}|dr|j|d�|_n|dr|j|d�|_|dr|j|d�|_n|dr|j|d�|_|j
r|drd|_|jr|drd|_|jr|drd|_
|j�|j�f|jt|�<��y)	N�	ansicolorrv�bgansicolor�bgcolorrTrr)�styler	ryrr
rJrrKrrLrr/r8rIr,�r�ttype�ndefrs    rrNz"Terminal256Formatter._setup_styles�s���:�:�K�E�4�#�%�F��K� � �-�-�d�;�.?�@��	��g�� �-�-�d�7�m�<��	��M�"� �-�-�d�=�.A�B��	��i�� �-�-�d�9�o�>��	��|�|��V��"���� � �T�+�%6�#'�� ��~�~�$�x�.� $��
�-3�-@�-@�-B�-3�-@�-@�-B�-D�D���c�%�j�)�#&rc��|xjdz
c_|jd|jdk7xrdxsd|jfz�y)Nr2z%s%04d: �
r)rP�write)r�outfiles  r�
_write_linenoz"Terminal256Formatter._write_lineno�s=���������
�
�j�D�L�L�A�$5�$>�$�$D�"�d�l�l�#S�S�Trc�0�tj|||�Sr)r�format)r�tokensourcer�s   rr�zTerminal256Formatter.format�s������k�7�;�;rc�B�|jr|j|�|D]�\}}d}|r�|r�	|jt|�\}}|j	d�}|ddD]J}	|	r|j||	z|z�|jr|j|��:|jd��L|dr|j||dz|z�d}|r|r��|s��|j|���|jr|jd�yy#t$r|j}Y�QwxYw)NTr����F)rFr�rIr,�splitr��KeyError�parent)
rr�r�r��value�	not_found�on�off�spl�lines
          r�format_unencodedz%Terminal256Formatter.format_unencoded�s���<�<����w�'�'�L�E�5��I��I�)�"�/�/��E�
�;�G�B�� �+�+�d�+�C� #�C�R����#�M�M�"�t�)�c�/�:��<�<� �.�.�w�7�#�M�M�$�/�
!)��2�w��
�
�b�3�r�7�l�S�&8�9� %�I�'�I�6��
�
�e�$�=(�@�<�<��M�M�$���� �)�!�L�L�E�)�s�BD�D�DN)r9r:r;�__doc__�name�aliases�	filenamesrrMrrryrNr�r�r�r<rrrrbsD���@�D�2�G��I��""0�H�"�&D�*U�<�% rc�2�eZdZdZdZgd�ZgZd�Zd�Zd�Z	y)ra}
    Format tokens with ANSI color sequences, for output in a true-color
    terminal or console.  Like in `TerminalFormatter` color sequences
    are terminated at newlines, so that paging the output works correctly.

    .. versionadded:: 2.1

    Options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).
    �TerminalTrueColor)�terminal16m�
console16m�16mc��yrr<)rs rrMz-TerminalTrueColorFormatter._build_color_table7s��rc��	tt|�d�}|dz	dz}|dz	dz}|dz}|||fS#t$rYywxYw)NrtrWra)r-r,ru)rrvrxrerfrgs      r�_color_tuplez'TerminalTrueColorFormatter._color_tuple:s^��	��c�%�j�"�%�C��B�Y�$���
�A�X�����$�J���1�a�y����	��	�s�1�	=�=c��|jD]�\}}t�}|dr|j|d�|_|dr|j|d�|_|j
r|drd|_|jr|drd|_|jr|drd|_
|j�|j�f|jt|�<��y)Nrvr}rTrr)r~r	r�rr
rJrrKrrLrr3r8rIr,rs    rrNz(TerminalTrueColorFormatter._setup_stylesDs����:�:�K�E�4�#�%�F��G�}� �-�-�d�7�m�<��	��I�� �-�-�d�9�o�>��	��|�|��V��"���� � �T�+�%6�#'�� ��~�~�$�x�.� $��
�-3�-E�-E�-G�-3�-@�-@�-B�-D�D���c�%�j�)�&rN)
r9r:r;r�r�r�r�rMr�rNr<rrrr%s(����D�2�G��I�
��DrN)r��pip._vendor.pygments.formatterr�pip._vendor.pygments.consoler�pip._vendor.pygments.styler�__all__r	rrr<rr�<module>r�sK���25�.�1�"�#?�
@��="�="�@ �9� �F-D�!5�-Drpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/irc.cpython-312.pyc000064400000013730151732703040025067 0ustar00�

R`iu����dZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZdgZied�e
d�ed�ej"d�ed	�ej$d�e
j&d
�ej(d�ej*d�ej,d�ej.d
�ej0d�ej2d�ej4d�ej6d�ej8d�ej:d�ede	d	ej<dej>dej@dejBdejdedi�Z"idd�dd�dd�dd�dd�dd �d!d"�d#d$�d%d$�d&d'�d(d)�d*d)�d+d,�d-d.�d/d.�d0d1�d2d3�d4d5d��Z#d6�Z$Gd7�de�Z%y8)9z�
    pygments.formatters.irc
    ~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for IRC output

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)
�Keyword�Name�Comment�String�Error�Number�Operator�Generic�Token�
Whitespace)�get_choice_opt�IRCFormatter)�r)�gray�brightblack)�cyan�
brightcyan)�blue�
brightblue)�magentar)�green�brightgreen)�_cyan_�_brightcyan_)�_green_�
_brightgreen_)rr)�red�	brightred)rr)�yellowr )rr)�**r!)z	*magenta*z*brightmagenta*)�_brightred_r"�white�black�r�r�r�r �r��orange�r�brightyellow��
lightgreen�	rr�
�	lightblue�rr��
brightmagenta�
��c�*�t|�dkr|Sdx}}d|vr|dz
}d|z}|jd�}d|vr|dz
}d|z}|jd�}t|�dkDr,|dtt|�j	d	�zz
}d|z}||z|zS)
Nr%r�_��*�r�r&)�len�strip�str�
IRC_COLOR_MAP�zfill)�color�text�add�subs    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/irc.py�	ircformatrILs���
�5�z�A�~����N�C�#�
�e�|��v�
���s�l�����C� ��
�e�|��v�
���s�l�����C� ���5�z�A�~��v��M�%�0�1�7�7��:�:�:���s�l����:����c�2�eZdZdZdZddgZgZd�Zd�Zd�Z	y)raS
    Format tokens with IRC color sequences

    The `get_style_defs()` method doesn't do anything special since there is
    no support for common styles.

    Options accepted:

    `bg`
        Set to ``"light"`` or ``"dark"`` depending on the terminal's background
        (default: ``"light"``).

    `colorscheme`
        A dictionary mapping token types to (lightbg, darkbg) color names or
        ``None`` (default: ``None`` = use builtin colorscheme).

    `linenos`
        Set to ``True`` to have line numbers in the output as well
        (default: ``False`` = no line numbers).
    �IRC�ircc���tj|fi|��t|dddgd�dk(|_|j	dd�xst
|_|j	dd�|_d|_y)N�bg�light�dark�colorscheme�linenosFr)	r�__init__r�darkbg�get�
IRC_COLORSrRrS�_lineno)�self�optionss  rHrTzIRCFormatter.__init__zsj�����4�+�7�+�$�W�d�&-�v�%6��A�DJ�K���"�;�;�}�d�;�I�z����{�{�9�e�4�����rJc��|jr4|xjdz
c_|jd|jz�yy)Nr%z%04d: )rSrX�write)rY�outfiles  rH�
_write_linenozIRCFormatter._write_lineno�s1���<�<��L�L�A��L��M�M�(�T�\�\�1�2�rJc��|j|�|D]�\}}|jj|�}|�#|dd}|jj|�}|��#|r�||j}|j	d�}|ddD]A}|r|jt
||��|jd�|j|��C|ds��|jt
||d����|j|���y)N����
)r^rRrVrU�splitr\rI)rY�tokensourcer]�ttype�valuerD�spl�lines        rH�format_unencodedzIRCFormatter.format_unencoded�s������7�#�'�L�E�5��$�$�(�(��/�E��-��c�r�
���(�(�,�,�U�3���-���d�k�k�*���k�k�$�'�����H�D���
�
�i��t�&<�=��M�M�$�'��&�&�w�/�	%�
�r�7��M�M�)�E�3�r�7�";�<��
�
�e�$�!(rJN)
�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesrTr^rh�rJrHrras+���(�D��e�n�G��I��3�
%rJN)&rl�pip._vendor.pygments.formatterr�pip._vendor.pygments.tokenrrrrrr	r
rrr
�pip._vendor.pygments.utilr�__all__�Preproc�Type�Word�Builtin�Function�	Namespace�Class�	Exception�	Decorator�Variable�Constant�	Attribute�Tag�Deleted�Inserted�Heading�
SubheadingrWrBrIrrprJrH�<module>r�s~���5�1�1�1�4��
��
�	�+���1���1�	�
�O�O�5���1�
��L�L�5��
�M�M�6��	�L�L�5��	�M�M�2��	�N�N�7��	�J�J�4��	�N�N�5��	�N�N�2��	�M�M�0�� 	�M�M�0�!�"	�N�N�5�#�$	�H�H�;�%�&�2�
�1��O�O�9����1��O�O�,����:��M�M�9�	�;�9�
�@��Q���Q���A���1�	�
���
�a�
��q��
�a���Q���A���!���!���B�����
�2�� �"�!�"�R�#�$��'�
�,)�*9%�9�9%rJpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/svg.cpython-312.pyc000064400000021617151732703040025114 0ustar00�

R`i���V�dZddlmZddlmZddlmZmZdgZd�Z	iZ
Gd�de�Zy)	z�
    pygments.formatters.svg
    ~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for SVG output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)�Comment)�get_bool_opt�get_int_opt�SvgFormatterc��|jdd�jdd�jdd�jdd�jd	d
�S)z<Escape &, <, > as well as single and double quotes for HTML.�&z&amp;�<z&lt;�>z&gt;�"z&quot;�'z&#39;)�replace)�texts ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/svg.py�escape_htmlrsE���<�<��W�%����V�$����V�$����X�&����W�%�	&�c�2�eZdZdZdZdgZdgZd�Zd�Zd�Z	y)	ra&	
    Format tokens as an SVG graphics file.  This formatter is still experimental.
    Each line of code is a ``<text>`` element with explicit ``x`` and ``y``
    coordinates containing ``<tspan>`` elements with the individual token styles.

    By default, this formatter outputs a full SVG document including doctype
    declaration and the ``<svg>`` root element.

    .. versionadded:: 0.9

    Additional options accepted:

    `nowrap`
        Don't wrap the SVG ``<text>`` elements in ``<svg><g>`` elements and
        don't add a XML declaration and a doctype.  If true, the `fontfamily`
        and `fontsize` options are ignored.  Defaults to ``False``.

    `fontfamily`
        The value to give the wrapping ``<g>`` element's ``font-family``
        attribute, defaults to ``"monospace"``.

    `fontsize`
        The value to give the wrapping ``<g>`` element's ``font-size``
        attribute, defaults to ``"14px"``.

    `linenos`
        If ``True``, add line numbers (default: ``False``).

    `linenostart`
        The line number for the first line (default: ``1``).

    `linenostep`
        If set to a number n > 1, only every nth line number is printed.
        
    `linenowidth`
        Maximum width devoted to line numbers (default: ``3*ystep``, sufficient
        for up to 4-digit line numbers. Increase width for longer code blocks).  
        
    `xoffset`
        Starting offset in X direction, defaults to ``0``.

    `yoffset`
        Starting offset in Y direction, defaults to the font size if it is given
        in pixels, or ``20`` else.  (This is necessary since text coordinates
        refer to the text baseline, not the top edge.)

    `ystep`
        Offset to add to the Y coordinate for each subsequent line.  This should
        roughly be the text size plus 5.  It defaults to that value if the text
        size is given in pixels, or ``25`` else.

    `spacehack`
        Convert spaces in the source to ``&#160;``, which are non-breaking
        spaces.  SVG provides the ``xml:space`` attribute to control how
        whitespace inside tags is handled, in theory, the ``preserve`` value
        could be used to keep all whitespace as-is.  However, many current SVG
        viewers don't obey that rule, so this option is provided as a workaround
        and defaults to ``True``.
    �SVG�svgz*.svgc��tj|fi|��t|dd�|_|j	dd�|_|j	dd�|_t|dd�|_|jj�}|jd	�r|dd
j�}	t|�}t|d|�|_t|d
|dz�|_
t|dd�|_t|dd�|_t|dd�|_t|dd�|_t|dd|jz�|_i|_y#d}Y��xYw)N�nowrapF�
fontfamily�	monospace�fontsize�14px�xoffsetr�px�����yoffset�ystep��	spacehackT�linenos�linenostart��
linenostep�linenowidth�)r�__init__rr�getrrrr�strip�endswith�intr r!r#r$r%r'r(�_stylecache)�self�options�fs�int_fss    rr*zSvgFormatter.__init__]s)�����4�+�7�+�"�7�H�e�<���!�+�+�l�K�@������J��7��
�"�7�I�q�9���
�]�]�
 �
 �
"��
�;�;�t��2�c�r�7�=�=�?�b�	���W�F�#�7�I�v�>��� ��'�6�A�:�>��
�%�g�{�D�A���#�G�I�e�<���&�w�}�Q�?���%�g�l�1�=���&�w�}�a��
�
�l�K�������	��F�s�(E	�	Ec
�x�|j}|j}|js�|jr|j	d|jz�n|j	d�|j	d�|j	d�|j	d|j
�d|j�d��|j}|j}|jt�}|}|jrT||zdk(r+|j	d	||jz�d
|�d|�d|�d
�	�||j|jzz
}|dz
}|j	d	|�d
|�d��|D�]0\}	}
|j|	�}|xrd|zdzxsd}|xrdxsd}
t|
�}
|jr |
j!�j#dd�}
|
j%d�}|ddD]�}|j	||z|
z�||jz
}|j	d�|jr3||zdk(r+|j	d	||jz�d
|�d|�d|�d
�	�|dz
}|j	d	|�d
|�d����|j	||dz|
z���3|j	d
�|js|j	d�yy)z�
        Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
        tuples and write it into ``outfile``.

        For our implementation we put all lines in their own 'line group'.
        z$<?xml version="1.0" encoding="%s"?>
z<?xml version="1.0"?>
zk<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
z)<svg xmlns="http://www.w3.org/2000/svg">
z<g font-family="z
" font-size="z">
rz	<text x="z" y="z" z text-anchor="end">z</text>r&z" xml:space="preserve">z<tspanr�z</tspan>� z&#160;�
N���z</text>
z" text-anchor="end" z</g></svg>
)rr r�encoding�writerrr%r'�
_get_stylerr$r(r!rr#�
expandtabsr�split)r0�tokensource�outfile�x�y�counter�counter_step�
counter_style�line_x�ttype�value�style�tspan�tspanend�parts�parts                r�format_unencodedzSvgFormatter.format_unencodedrsy��
�L�L���L�L���{�{��}�}��
�
�E�"�m�m�,�-��
�
�7�8��M�M�*�
+�
�M�M�F�G��M�M��?�?�D�M�M�;�
<��"�"����������0�
����<�<���%��*��
�
��t�'�'�'��-��A�B��d�&�&����3�3�F��q�L�G��
�
�V�Q�O�P�'�L�E�5��O�O�E�*�E��4�h��.��4�:��E��+��1�r�H���&�E��~�~��(�(�*�2�2�3��A���K�K��%�E��c�r�
���
�
�e�d�l�X�5�6��T�Z�Z����
�
�k�*��<�<�G�l�$:�a�$?��M�M��4�+�+�+�A�m�G�#E�F��1����
�
�PV�WX�Y�Z�#�
�M�M�%�%��)�+�h�6�7�%(�&	�
�
�i� ��{�{��M�M�.�)�rc�j�||jvr|j|S|}|jj|�s(|j}|jj|�s�(|jj	|�}d}|drd|dzdz}|dr|dz
}|dr|dz
}||j|<|S)	Nr5�colorz fill="#r�boldz font-weight="bold"�italicz font-style="italic")r/rH�styles_token�parent�style_for_token)r0�	tokentype�
otokentyperG�results     rr;zSvgFormatter._get_style�s�����(�(�(��#�#�I�.�.��
��*�*�)�)�)�4�!�(�(�I��*�*�)�)�)�4��
�
�*�*�9�5������>��%��.�0�3�6�F���=��+�+�F���?��,�,�F�'-�����$��
rN)
�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesr*rMr;�rrrrs-��:�v�D��g�G��	�I��*9*�vrN)r[�pip._vendor.pygments.formatterr�pip._vendor.pygments.tokenr�pip._vendor.pygments.utilrr�__all__r�class2stylerr_rr�<module>res7���5�.�?��
��&���_�9�_rpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc000064400000010250151732703040026076 0ustar00�

R`iP��v�idd�dd�dd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#i�Zy$)%�BBCodeFormatter)zpygments.formatters.bbcode�BBCode)�bbcode�bb�z�Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight your sourcecode with pygments before posting it there.�BmpImageFormatter)�pygments.formatters.img�img_bmp)�bmp�bitmap)z*.bmpzwCreate a bitmap image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.�GifImageFormatter)r�img_gif)�gif)z*.gifztCreate a GIF image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.�GroffFormatter)zpygments.formatters.groff�groff)r�troff�roffrzFFormat tokens with groff escapes to change their color and font style.�
HtmlFormatter)zpygments.formatters.html�HTML)�html)z*.htmlz*.htmz�Format tokens as HTML 4 ``<span>`` tags. By default, the content is enclosed in a ``<pre>`` tag, itself wrapped in a ``<div>`` tag (but see the `nowrap` option). The ``<div>``'s CSS class can be set by the `cssclass` option.�IRCFormatter)zpygments.formatters.irc�IRC)�ircrrz&Format tokens with IRC color sequences�ImageFormatter)r�img)r�IMG�png)z*.pngztCreate a PNG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.�JpgImageFormatter)r�img_jpg)�jpg�jpeg)z*.jpgzuCreate a JPEG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.�LatexFormatter)zpygments.formatters.latex�LaTeX)�latex�tex)z*.texzUFormat tokens as LaTeX code. This needs the `fancyvrb` and `color` standard packages.�
NullFormatter)�pygments.formatters.otherz	Text only)�text�null)z*.txtz1Output the text unchanged without any formatting.�PangoMarkupFormatter)zpygments.formatters.pangomarkupzPango Markup)�pango�pangomarkuprzFFormat tokens as Pango Markup code. It can then be rendered to an SVG.�RawTokenFormatter)r&z
Raw tokens)�raw�tokens)z*.rawz@Format tokens as a raw representation for storing token streams.�RtfFormatter)zpygments.formatters.rtf�RTF)�rtf)z*.rtfz�Format tokens as RTF markup. This formatter automatically outputs full RTF documents with color information and other useful stuff. Perfect for Copy and Paste into Microsoft(R) Word(R) documents.�SvgFormatter)zpygments.formatters.svg�SVG)�svg)z*.svgz�Format tokens as an SVG graphics file.  This formatter is still experimental. Each line of code is a ``<text>`` element with explicit ``x`` and ``y`` coordinates containing ``<tspan>`` elements with the individual token styles.�Terminal256Formatter)�pygments.formatters.terminal256�Terminal256)�terminal256�
console256�256rz�Format tokens with ANSI color sequences, for output in a 256-color terminal or console.  Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.�TerminalFormatter)zpygments.formatters.terminal�Terminal)�terminal�consolerz�Format tokens with ANSI color sequences, for output in a text console. Color sequences are terminated at newlines, so that paging the output works correctly.�TerminalTrueColorFormatter)r6�TerminalTrueColor)�terminal16m�
console16m�16mrz�Format tokens with ANSI color sequences, for output in a true-color terminal or console.  Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.�TestcaseFormatter)r&�Testcase)�testcaserz0Format tokens as appropriate for a new testcase.N)�
FORMATTERSr���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/_mapping.py�<module>rJs%����z���Z���N���g�	�
�~���t�
��T���V���t���S���x���h���T���t���H�� �D�!�"!�#U�#�$�J�%�
rHpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/html.cpython-312.pyc000064400000117146151732703040025264 0ustar00�

R`i���.�dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZmZddl
mZmZmZ	ddlZdgZed�d	ed
�ded�d
ed�ded�diZefd�Zd�Zd�ZdZdezdzZdZdZGd�de�Zy#e$rdZY�[wxYw)z�
    pygments.formatters.html
    ~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for HTML output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�StringIO)�	Formatter)�Token�Text�STANDARD_TYPES)�get_bool_opt�get_int_opt�get_list_opt�
HtmlFormatter�&z&amp;�<z&lt;�>z&gt;�"z&quot;�'z&#39;c�$�|j|�S)z<Escape &, <, > as well as single and double quotes for HTML.)�	translate)�text�tables  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/html.py�escape_htmlr&s���>�>�%� � �c�T�|jd�s|jd�r|Sd|zS)N�calc�var�#)�
startswith)�colors r�webifyr+s,�������5�#3�#3�E�#:����U�{�rc��tj|�}|r|Sd}|�/d|dz|z}|j}tj|�}|��/||zS)N��-���)r�get�parent)�ttype�fname�anames   r�_get_ttype_classr(2sb�����u�%�E�����E�
�-��e�B�i��%�'�������"�"�5�)���-��5�=�rz�/*
generated by Pygments <https://pygments.org/>
Copyright 2006-2023 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
*/
%(styledefs)s
a�<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<!--
generated by Pygments <https://pygments.org/>
Copyright 2006-2023 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
-->
<html>
<head>
  <title>%(title)s</title>
  <meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
  <style type="text/css">
z/
  </style>
</head>
<body>
<h2>%(title)s</h2>

a5<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
  <title>%(title)s</title>
  <meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
  <link rel="stylesheet" href="%(cssfile)s" type="text/css">
</head>
<body>
<h2>%(title)s</h2>

z</body>
</html>
c��eZdZdZdZdgZddgZd�Zd�Zd�Z	d	�Z
d
�Zd%d�Zd%d
�Z
d%d�Zd�Zd�Zed��Zed��Zed��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zej>d��d��Z d �Z!d!�Z"d"�Z#d#�Z$d$�Z%y)&rae,
    Format tokens as HTML 4 ``<span>`` tags. By default, the content is enclosed
    in a ``<pre>`` tag, itself wrapped in a ``<div>`` tag (but see the `nowrap` option).
    The ``<div>``'s CSS class can be set by the `cssclass` option.

    If the `linenos` option is set to ``"table"``, the ``<pre>`` is
    additionally wrapped inside a ``<table>`` which has one row and two
    cells: one containing the line numbers and one containing the code.
    Example:

    .. sourcecode:: html

        <div class="highlight" >
        <table><tr>
          <td class="linenos" title="click to toggle"
            onclick="with (this.firstChild.style)
                     { display = (display == '') ? 'none' : '' }">
            <pre>1
            2</pre>
          </td>
          <td class="code">
            <pre><span class="Ke">def </span><span class="NaFu">foo</span>(bar):
              <span class="Ke">pass</span>
            </pre>
          </td>
        </tr></table></div>

    (whitespace added to improve clarity).

    A list of lines can be specified using the `hl_lines` option to make these
    lines highlighted (as of Pygments 0.11).

    With the `full` option, a complete HTML 4 document is output, including
    the style definitions inside a ``<style>`` tag, or in a separate file if
    the `cssfile` option is given.

    When `tagsfile` is set to the path of a ctags index file, it is used to
    generate hyperlinks from names to their definition.  You must enable
    `lineanchors` and run ctags with the `-n` option for this to work.  The
    `python-ctags` module from PyPI must be installed to use this feature;
    otherwise a `RuntimeError` will be raised.

    The `get_style_defs(arg='')` method of a `HtmlFormatter` returns a string
    containing CSS rules for the CSS classes used by the formatter. The
    argument `arg` can be used to specify additional CSS selectors that
    are prepended to the classes. A call `fmter.get_style_defs('td .code')`
    would result in the following CSS classes:

    .. sourcecode:: css

        td .code .kw { font-weight: bold; color: #00FF00 }
        td .code .cm { color: #999999 }
        ...

    If you have Pygments 0.6 or higher, you can also pass a list or tuple to the
    `get_style_defs()` method to request multiple prefixes for the tokens:

    .. sourcecode:: python

        formatter.get_style_defs(['div.syntax pre', 'pre.syntax'])

    The output would then look like this:

    .. sourcecode:: css

        div.syntax pre .kw,
        pre.syntax .kw { font-weight: bold; color: #00FF00 }
        div.syntax pre .cm,
        pre.syntax .cm { color: #999999 }
        ...

    Additional options accepted:

    `nowrap`
        If set to ``True``, don't add a ``<pre>`` and a ``<div>`` tag
        around the tokens. This disables most other options (default: ``False``).

    `full`
        Tells the formatter to output a "full" document, i.e. a complete
        self-contained document (default: ``False``).

    `title`
        If `full` is true, the title that should be used to caption the
        document (default: ``''``).

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``). This option has no effect if the `cssfile`
        and `noclobber_cssfile` option are given and the file specified in
        `cssfile` exists.

    `noclasses`
        If set to true, token ``<span>`` tags (as well as line number elements)
        will not use CSS classes, but inline styles. This is not recommended
        for larger pieces of code since it increases output size by quite a bit
        (default: ``False``).

    `classprefix`
        Since the token types use relatively short class names, they may clash
        with some of your own class names. In this case you can use the
        `classprefix` option to give a string to prepend to all Pygments-generated
        CSS class names for token types.
        Note that this option also affects the output of `get_style_defs()`.

    `cssclass`
        CSS class for the wrapping ``<div>`` tag (default: ``'highlight'``).
        If you set this option, the default selector for `get_style_defs()`
        will be this class.

        .. versionadded:: 0.9
           If you select the ``'table'`` line numbers, the wrapping table will
           have a CSS class of this string plus ``'table'``, the default is
           accordingly ``'highlighttable'``.

    `cssstyles`
        Inline CSS styles for the wrapping ``<div>`` tag (default: ``''``).

    `prestyles`
        Inline CSS styles for the ``<pre>`` tag (default: ``''``).

        .. versionadded:: 0.11

    `cssfile`
        If the `full` option is true and this option is given, it must be the
        name of an external file. If the filename does not include an absolute
        path, the file's path will be assumed to be relative to the main output
        file's path, if the latter can be found. The stylesheet is then written
        to this file instead of the HTML file.

        .. versionadded:: 0.6

    `noclobber_cssfile`
        If `cssfile` is given and the specified file exists, the css file will
        not be overwritten. This allows the use of the `full` option in
        combination with a user specified css file. Default is ``False``.

        .. versionadded:: 1.1

    `linenos`
        If set to ``'table'``, output line numbers as a table with two cells,
        one containing the line numbers, the other the whole code.  This is
        copy-and-paste-friendly, but may cause alignment problems with some
        browsers or fonts.  If set to ``'inline'``, the line numbers will be
        integrated in the ``<pre>`` tag that contains the code (that setting
        is *new in Pygments 0.8*).

        For compatibility with Pygments 0.7 and earlier, every true value
        except ``'inline'`` means the same as ``'table'`` (in particular, that
        means also ``True``).

        The default value is ``False``, which means no line numbers at all.

        **Note:** with the default ("table") line number mechanism, the line
        numbers and code can have different line heights in Internet Explorer
        unless you give the enclosing ``<pre>`` tags an explicit ``line-height``
        CSS property (you get the default line spacing with ``line-height:
        125%``).

    `hl_lines`
        Specify a list of lines to be highlighted. The line numbers are always
        relative to the input (i.e. the first line is line 1) and are
        independent of `linenostart`.

        .. versionadded:: 0.11

    `linenostart`
        The line number for the first line (default: ``1``).

    `linenostep`
        If set to a number n > 1, only every nth line number is printed.

    `linenospecial`
        If set to a number n > 0, every nth line number is given the CSS
        class ``"special"`` (default: ``0``).

    `nobackground`
        If set to ``True``, the formatter won't output the background color
        for the wrapping element (this automatically defaults to ``False``
        when there is no wrapping element [eg: no argument for the
        `get_syntax_defs` method given]) (default: ``False``).

        .. versionadded:: 0.6

    `lineseparator`
        This string is output between lines of code. It defaults to ``"\n"``,
        which is enough to break a line inside ``<pre>`` tags, but you can
        e.g. set it to ``"<br>"`` to get HTML line breaks.

        .. versionadded:: 0.7

    `lineanchors`
        If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
        output line in an anchor tag with an ``id`` (and `name`) of ``foo-linenumber``.
        This allows easy linking to certain lines.

        .. versionadded:: 0.9

    `linespans`
        If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
        output line in a span tag with an ``id`` of ``foo-linenumber``.
        This allows easy access to lines via javascript.

        .. versionadded:: 1.6

    `anchorlinenos`
        If set to `True`, will wrap line numbers in <a> tags. Used in
        combination with `linenos` and `lineanchors`.

    `tagsfile`
        If set to the path of a ctags file, wrap names in anchor tags that
        link to their definitions. `lineanchors` should be used, and the
        tags file should specify line numbers (see the `-n` option to ctags).

        .. versionadded:: 1.6

    `tagurlformat`
        A string formatting pattern used to generate links to ctags definitions.
        Available variables are `%(path)s`, `%(fname)s` and `%(fext)s`.
        Defaults to an empty string, resulting in just `#prefix-number` links.

        .. versionadded:: 1.6

    `filename`
        A string used to generate a filename when rendering ``<pre>`` blocks,
        for example if displaying source code. If `linenos` is set to
        ``'table'`` then the filename will be rendered in an initial row
        containing a single `<th>` which spans both columns.

        .. versionadded:: 2.1

    `wrapcode`
        Wrap the code inside ``<pre>`` blocks using ``<code>``, as recommended
        by the HTML5 specification.

        .. versionadded:: 2.4

    `debug_token_types`
        Add ``title`` attributes to all token ``<span>`` tags that show the
        name of the token.

        .. versionadded:: 2.10


    **Subclassing the HTML formatter**

    .. versionadded:: 0.7

    The HTML formatter is now built in a way that allows easy subclassing, thus
    customizing the output HTML code. The `format()` method calls
    `self._format_lines()` which returns a generator that yields tuples of ``(1,
    line)``, where the ``1`` indicates that the ``line`` is a line of the
    formatted source code.

    If the `nowrap` option is set, the generator is the iterated over and the
    resulting HTML is output.

    Otherwise, `format()` calls `self.wrap()`, which wraps the generator with
    other generators. These may add some HTML code to the one generated by
    `_format_lines()`, either by modifying the lines generated by the latter,
    then yielding them again with ``(1, line)``, and/or by yielding other HTML
    code before or after the lines, with ``(0, html)``. The distinction between
    source lines and other code makes it possible to wrap the generator multiple
    times.

    The default `wrap()` implementation adds a ``<div>`` and a ``<pre>`` tag.

    A custom `HtmlFormatter` subclass could look like this:

    .. sourcecode:: python

        class CodeHtmlFormatter(HtmlFormatter):

            def wrap(self, source, *, include_div):
                return self._wrap_code(source)

            def _wrap_code(self, source):
                yield 0, '<code>'
                for i, t in source:
                    if i == 1:
                        # it's a line of formatted code
                        t += '<br>'
                    yield i, t
                yield 0, '</code>'

    This results in wrapping the formatted lines with a ``<code>`` tag, where the
    source lines are broken using ``<br>`` tags.

    After calling `wrap()`, the `format()` method also adds the "line numbers"
    and/or "full document" wrappers if the respective options are set. Then, all
    HTML yielded by the wrapped generator is output.
    �HTML�htmlz*.htmlz*.htmc��tj|fi|��|j|j�|_t	|dd�|_t	|dd�|_|jdd�|_|j|jdd��|_	|j|jdd��|_
|j|jd	d��|_|j|jd
d��|_t	|dd�|_
|j|jdd��|_|j|jd
d��|_|j|jdd��|_t	|dd�|_i|_t	|dd�|_|jr5t(st+d��t)j,|j�|_|jdd�}|dk(rd|_n|rd|_nd|_t3t5|dd��|_t3t5|dd��|_t3t5|dd��|_t	|dd�|_|jdd�|_|jdd�|_ |jdd�|_!t	|dd�|_"tG�|_$tK|d g�D]'}	|jHjMtO|���)|jS�y#tP$rY�FwxYw)!N�nowrapF�	noclasses�classprefixr �cssclass�	highlight�	cssstyles�	prestyles�cssfile�noclobber_cssfile�tagsfile�tagurlformat�filename�wrapcode�debug_token_typeszRThe "ctags" package must to be installed to be able to use the "tagsfile" feature.�linenos�inline��r�linenostart�
linenostep�
linenospecial�nobackground�
lineseparator�
�lineanchors�	linespans�
anchorlinenos�hl_lines)*r�__init__�_decodeifneeded�titlerr-r.r#r/r0r2r3r4r5r6r7r8r9�span_element_openersr:�ctags�RuntimeError�CTags�_ctagsr;�absr	r?r@rArBrCrErFrG�setrHr
�add�int�
ValueError�_create_stylesheet)�self�optionsr;�linenos    rrIzHtmlFormatter.__init__�s������4�+�7�+��)�)�$�*�*�5��
�"�7�H�e�<���%�g�{�E�B���"�;�;�}�b�9����,�,�W�[�[��[�-Q�R��
��-�-�g�k�k�+�r�.J�K����-�-�g�k�k�+�r�.J�K����+�+�G�K�K�	�2�,F�G���!-�g�7J�E�!R����,�,�W�[�[��R�-H�I��
� �0�0����^�R�1P�Q����,�,�W�[�[��R�-H�I��
�$�W�j�%�@��
�$&��!�!-�g�7J�E�!R����=�=��"�$O�P�P��+�+�d�m�m�4�D�K��+�+�i��/���h���D�L�
��D�L��D�L��{�7�M�1�E�F����k�'�<��C�D��� ��W�o�q�!I�J���(��.�%�H���$�[�[��$�?���"�;�;�}�b�9��� ���[�"�5���)�'�?�E�J������
�"�7�J��;�F�
��
�
�!�!�#�f�+�.�<�	
���!���
��
�s�$L;�;	M�Mc�<�t|�}|r|j|zSy)zUReturn the css class of this token type prefixed with
        the classprefix option.r )r(r/)rWr%�
ttypeclasss   r�_get_css_classzHtmlFormatter._get_css_class�s%��&�e�,�
���#�#�j�0�0�rc��|j|�}|tvr,|j}|j|�dz|z}|tvr�,|xsdS)zOReturn the CSS classes of this token type prefixed with the classprefix option.� r )r\rr$)rWr%�clss   r�_get_css_classeszHtmlFormatter._get_css_classes�sS���!�!�%�(���>�)��L�L�E��%�%�e�,�s�2�S�8�C��>�)��y�b�rc��|jj|�}|�*|j}|jj|�}|��*|xsdS)z1Return the inline CSS styles for this token type.r )�ttype2classr#r$)rWr%�cclasss   r�_get_css_inline_stylesz$HtmlFormatter._get_css_inline_styles�sO���!�!�%�%�e�,���n��L�L�E��%�%�)�)�%�0�F��n��|��rc��tdix}|_ix}|_|jD]�\}}|j	|�}d}|dr|dt|d�zz
}|dr|dz
}|dr|dz
}|dr|d	z
}|d
r|dt|d
�zz
}|dr|d
t|d�zz
}|s��|||<|dd|t
|�f||<��y)Nr rzcolor: %s; �boldzfont-weight: bold; �italiczfont-style: italic; �	underlineztext-decoration: underline; �bgcolorzbackground-color: %s; �borderzborder: 1px solid %s; ���)rrb�class2style�styler\r�len)rW�t2c�c2sr%�ndef�namerms       rrVz HtmlFormatter._create_stylesheet�s��"'���,��d��!#�#��d���:�:�K�E�4��&�&�u�-�D��E��G�}�����W�
�)>�>�>���F�|��.�.���H�~��/�/���K� ��7�7���I���1�F�4�	�?�4K�K�K���H�~��1�F�4��>�4J�J�J���!��E�
�#�3�B�Z���E�
�;��D�	�'&rNc���g}|j|j��|j|j|��|j|j|��dj	|�S)z�
        Return CSS style definitions for the classes produced by the current
        highlighting style. ``arg`` can be a string or list of selectors to
        insert before the token type classes.
        rD)�extend�get_linenos_style_defs�get_background_style_defs�get_token_style_defs�join)rW�arg�style_liness   r�get_style_defszHtmlFormatter.get_style_defs�sa�������4�6�6�8�9����4�9�9�#�>�?����4�4�4�S�9�:��y�y��%�%rc
�J�|j|�}|jj�D����cgc]\}\}}}|r|r||||f��}}}}}|j�|D����cgc]$\}}}}||��d|�dt	|�dd�d���&}}}}}|Scc}}}}wcc}}}}w)Nz { z } /* �z */)�get_css_prefixrl�items�sort�repr)	rWry�prefixr_rmr%�level�styles�liness	         rrwz"HtmlFormatter.get_token_style_defs	s����$�$�S�)��/3�.>�.>�.D�.D�.F�
�.F�*��*�e�U�E��u��E�3��&�.F�	�
�
	���
�/5�
�.4�*���s�E�%+�3�K���U��A�B��H�.4�	�
�
���
��
s�B
�%)B
c	��|j|�}|jj}|jj}g}|ri|js]|�[d}t
|jvr&d|j|jt
dz}|jd|d��d|�d|�d��|�|jd|d��d|�d��|S)	Nr r^rz{ background: �;z }�hllz { background-color: )	r~rm�background_color�highlight_colorrBrrbrl�insert)rWryr��bg_color�hl_colorr��
text_styles       rrvz'HtmlFormatter.get_background_style_defss����$�$�S�)���:�:�.�.���:�:�-�-�����t�(�(�X�-A��J��t�'�'�'� �4�#3�#3�D�4D�4D�T�4J�#K�A�#N�N�
��L�L���2�J��*��
�
���L�L��F�5�M�8�L�
��rc��d|jzd|jzd|jzd|jzd|jzg}|S)Nz
pre { %s }ztd.linenos .normal { %s }zspan.linenos { %s }ztd.linenos .special { %s }zspan.linenos.special { %s })�
_pre_style�_linenos_style�_linenos_special_style)rWr�s  rruz$HtmlFormatter.get_linenos_style_defs1sT���4�?�?�*�'�$�*=�*=�=�!�D�$7�$7�7�(�4�+F�+F�F�)�D�,G�,G�G�
���rc���|�#d|jvxrd|jzxsd}t|t�r|g�nt	|���fd�}|S)Nr0�.r c���|rd|z}g}�D]!}|j|xr|dzxsd|z��#dj|�S)Nr�r^r z, )�appendrx)r_�tmpry�argss   �rr�z,HtmlFormatter.get_css_prefix.<locals>.prefixDsK�����C�i���C����
�
�C�-�C�#�I�3��s�:�;���9�9�S�>�!r)rXr0�
isinstance�str�list)rWryr�r�s   @rr~zHtmlFormatter.get_css_prefix<sO����;�����-�C�#�d�m�m�2C�I�r�C��c�3���5�D���9�D�	"��
rc��y)Nzline-height: 125%;��rWs rr�zHtmlFormatter._pre_styleNs��#rc�d�d|jj�d|jj�d�S�Nzcolor: z; background-color: z(; padding-left: 5px; padding-right: 5px;)rm�line_number_color�line_number_background_colorr�s rr�zHtmlFormatter._linenos_styleRs(��
�J�J�(�(��J�J�3�3�
�	
rc�d�d|jj�d|jj�d�Sr�)rm�line_number_special_color�$line_number_special_background_colorr�s rr�z$HtmlFormatter._linenos_special_styleYs(��
�J�J�0�0��J�J�;�;�
�	
rc��t|t�r7|jr|j|j�S|j�S|S�N)r��bytes�encoding�decode�rW�values  rrJzHtmlFormatter._decodeifneeded`s7���e�U�#��}�}��|�|�D�M�M�2�2��<�<�>�!��rc#�K�|j�r>tjj|j�r
|j}nd	|j}|r|ddk(rt
�tjj
tjj|�|j�}	tjj|�r|js@t|dd��5}|jtd|j!d	�iz�ddd�dt&t)|j*|j|j,��zf��n<dt.t)|j*|j!d	�|j,��zf��|Ed{���dt0f��y#t
$r+tdtj��|j}Y��(wxYw#1swY��xYw#t"$r}d
|j$z|_�d}~wwxYw7�x�w)
Nrr
z^Note: Cannot determine output file name, using current directory as base for the CSS file name)�file�wzutf-8)r��	styledefs�bodyzError writing CSS file: )rKr4r�)rKr�r�)r4�os�path�isabsrr�AttributeErrorrx�dirname�print�sys�stderr�existsr5�open�write�CSSFILE_TEMPLATEr{�OSError�strerror�DOC_HEADER_EXTERNALCSS�dictrKr��
DOC_HEADER�
DOC_FOOTER)rW�inner�outfile�cssfilenamer8�cf�errs       r�
_wrap_fullzHtmlFormatter._wrap_fullgs������<�<��w�w�}�}�T�\�\�*�"�l�l��/�&�|�|�H�#�x��{�c�'9�,�,�"$�'�'�,�,�r�w�w���x�/H�/3�|�|�#=�K�
��w�w�~�~�k�2�$�:P�:P��k�3��A�R����!1�"-�t�/B�/B�6�/J�!K�"L�M�B��,�����#'�<�<�$(�M�M�3�3�4�
4�
�j�����%)�%8�%8��%@�$(�M�M�3�3�4�
4�
�����m���5&�/��R�"�z�z�+�#'�,�,�K�	/��B�A���
�9�C�L�L�H�����
��	�sn�AH
�A#F�+9G"�$*G�G"�A9H
�H�H
�0G�H
�G�H
�G�G"�"	H�+H�H�H
c#�>K�t�}d}|D]\}}|r|dz
}|j|��|j}tt	||zdz
��}|j
}|j}	|jxs|j}
|j}|j}g}
t|||z�D]v}||	zdk(}|xr||zdk(}|rd||fz}|rd|
||fz}nd|z}|r"|rd|jz}nd|jz}n|rd}nd}|r	d	|�d
|�d�}|
j|��xdj|
�}d
}|j rd|j zdz}dd|j"�d�|zdz|zdzf��d��d|j%�f��d��d��y�w)Nrr>�%*d�<a href="#%s-%d">%s</a>r^� style="%s"z class="special"z class="normal"�<spanr�</span>rDr z<<tr><th colspan="2" class="filename"><span class="filename">z</span></th></tr>z<table class="ztable">z4<tr><td class="linenos"><div class="linenodiv"><pre>z"</pre></div></td><td class="code">)rz<div>)rz</div>)rz</td></tr></table>)rr�r?rnr�rAr@rErFrGr.�ranger�r�r�rxr8r0�getvalue)rWr��dummyoutfile�lncount�t�line�fl�mw�sp�st�anchor_name�aln�noclsr��i�
print_line�special_linerm�ls�filename_trs                    r�_wrap_tablelinenosz HtmlFormatter._wrap_tablelinenos�s������z�����G�A�t���1������t�$��
�
�
��
��W�r�\�A�%�&�
'��
�
�
��
�_�_���&�&�8�$�.�.��� � ���������r�2�g�:�&�A��R��1��J��-�!�b�&�A�+�L����A�w����4��Q��7M�M�D��R�x����)�D�,G�,G�G�E�)�D�,?�,?�?�E��.�E�-�E��.3�T�:���L�L���3'�6�Y�Y�u�
�����=�=�*�,0�M�M�:�=��
��N�4�=�=�/��9�K�G�B�C���5�6�7�	7�����&�&�(�(�(���%�%�s�FFc#� K�t|�}|j}|j}|j}t	tt	|�|zdz
��}|jxs|j}|j}|j}	|D]�\}
}||zdk(}|xr||zdk(}
|rd||fz}nd|z}|	r"|
rd|jz}nd|jz}n|
rd}nd}|r
d|�d	|�d
�}n|}|rdd|||fz|zf��n	d||zf��|dz
}��y�w)Nr>rr�r^r�z class="linenos special"z class="linenos"r�rr�r�)r�rAr@r?rnr�rErFrGr.r�r�)rWr��inner_linesr�r��numr�r�r�r��_�
inner_liner�r�r�rmr;s                 r�_wrap_inlinelinenosz!HtmlFormatter._wrap_inlinelinenos�sB�����5�k��
�
�
��
�_�_������
��S��%��+�a�/�0�
1���&�&�8�$�.�.��� � ������(�M�A�z��r��Q��J��/�#��(�a�-�L����C�y�(���R�x����)�D�,G�,G�G�E�)�D�,?�,?�?�E��6�E�.�E��16��=������3�{�C��6Q�Q�$�%�&�&���:�-�-�-��1�H�C�=)�s�DDc#�K�|j}|jdz
}|D]9\}}|r,|dz
}|jrdnd||fz}dd|||||fz|zf���4d|f���;y�w)Nr>r z href="#%s-%d"z!<a id="%s-%d" name="%s-%d"%s></a>r)rEr?r;)rWr��sr�r�r��hrefs       r�_wrap_lineanchorszHtmlFormatter._wrap_lineanchors�s}�����������q� ���G�A�t���Q���!�\�\�r�/?�1�a�&�/H���<��1�a��D�?Q�Q�TX�X�X�X���g�
�
�s�AAc#�K�|j}|jdz
}|D]\}}|r|dz
}dd|||fzf���d|f���!y�w)Nr>z<span id="%s-%d">%s</span>r)rFr?)rWr�r�r�r�r�s      r�_wrap_linespanszHtmlFormatter._wrap_linespanssY�����N�N�����q� ���G�A�t���Q����5��A�t��D�D�D���g�
��s�AAc#�K�g}|jrJ|js>|jj�(|j	d|jj���|j
r|j	|j
�dj
|�}dd|jxrd|jzz|xrd|zzdzf��|Ed{���d��y7�	�w)	Nzbackground: �; rz<divz class="%s"r�r)rz</div>
)r.rBrmr�r�r2rxr0�rWr�rms   r�	_wrap_divzHtmlFormatter._wrap_divs��������N�N�4�#4�#4��
�
�+�+�7��L�L�T�Z�Z�-H�-H�J�K��>�>��L�L����(��	�	�%� ���&�D�M�M�K�m�d�m�m�.K�L��4�m�e�3�6�8;�<�=�	=������	�s�CC�	C�

Cc#�vK�g}|jr|j|j�|jr|j|j�dj	|�}|j
r%|jdk7rdd|j
zdzf��dd|xrd|zzdzf��|Ed{���d	��y7�	�w)
Nr�r>rz<span class="filename">r�z<prer�z><span></span>)rz</pre>)r3r�r.r�rxr8r;r�s   r�	_wrap_prezHtmlFormatter._wrap_pre#s��������>�>��L�L����(��>�>��L�L����)��	�	�%� ���=�=�T�\�\�Q�.��/�$�-�-�?�)�K�L�L��&�E�;�m�e�&;�<�?O�O�P�P������	�s�B+B9�-B7�.
B9c#�4K�d��|Ed{���d��y7�	�w)N)rz<code>)rz</code>r�)rWr�s  r�
_wrap_codezHtmlFormatter._wrap_code4s �����������	�s�
��
�d)�maxsizec�J�|jt�jd�S)z-HTML-escape a value and split it by newlines.rD)r�_escape_html_table�splitr�s  r�_translate_partszHtmlFormatter._translate_parts9s�����1�2�8�8��>�>rc	#�FK�|j}|j}|j}d}g}|D�]�\}}	|j|}	|j|�}
|r�|tjvr�|j|�\}}|r�tjj!|�\}}|r|d	z
}tjj#|�\}}|j$|||d
�z}d||j&||
dfz|
d<|
dd
z|
d<|
ddD]�}|rV||	k7r!|r|j)|xrd|	||	xrd|f�n|j)||xrd|f�ddj
|�f��g}�[|rddj
|	||	xrd|f�f���{d|f����|r?|
dr:||	k7r|j)|xrd|	|
df�|	}���|j+|
d����|
ds���|	|
dg}|	}���|r-|j)|xrd|f�ddj
|�f��yy#t$r�|j
rddj
|�znd}
|r2|j|�}|r|j|d}d|�d|
�d�}	n"d}	n|j|�}|r
d|�d|
�d�}	nd}	|	|j|<Y��YwxYw�w)zd
        Just format the tokens, without any wrapping tags.
        Yield individual lines.
        r z title="%s"r�rz
<span style="rrz
<span class="�/)r�r&�fextz<a href="%s#%s-%d">%sr"z</a>Nr�r>)r.rCr6rL�KeyErrorr:rxrdrlr`r�r�Name�_lookup_ctagr�r�r��splitextr7rErtr�)rW�tokensourcer��lsepr6�lspanr�r%r��cspanrK�	css_style�	css_class�partsr8�
linenumber�base�	extension�url�parts                    r�
_format_lineszHtmlFormatter._format_lines>s�����
�����!�!���=�=������'�L�E�5�
9��1�1�%�8��$�)�)�%�0�E��E�U�Z�Z�/�'+�'8�'8��'?�$��*��%'�W�W�]�]�8�%<�N�D�(������*,�'�'�*:�*:�8�*D�'�H�i��+�+�t�h�7@�/B�B�C�8��d�.�.�
�E�!�H�E� F�E�!�H� %�b�	�F� 2�E�"�I��c�r�
�����~�$����e�&9�	�E�4�&+�&9�	�D�%B�C����T�E�,?�i�$�$G�H��R�W�W�T�]�*�*��D���R�W�W�e�T�E�4G�i�$�%O�P�P�P��T�'�M�#� ��b�	��E�>��K�K�%�"5�I��u�R�y� I�J�!�E��K�K��b�	�*��r���u�R�y�)����y(�~��K�K�%�-�I��5�6��R�W�W�T�]�"�"���y�
9�;?�;Q�;Q�
������7�WY��� $� ;� ;�E� B�I� �$(�$4�$4�Y�$?��$B�	�9B�E� J�� "�� $� 5� 5�e� <�I� �9B�E� J�� "��38��)�)�%�0�
9�s0�2J!�H
�FJ!�<J!�
B
J�J!�J�J!c��tj�}|jj||j	�d�r
|d|dfSy)Nrr��
lineNumber)NN)rM�TagEntryrP�find�encode)rW�token�entrys   rrzHtmlFormatter._lookup_ctag�sA����� ���;�;���E�5�<�<�>�1�5���=�%��"5�5�5�rc#�,K�|j}t|�D]v\}\}}|dk7r||f��|dz|vrV|jr@d}|jj�d|jj�d�}dd|�d|�d�f���gdd	|zf���qd|f���xy�w)
z�
        Highlighted the lines specified in the `hl_lines` option by
        post-processing the token stream coming from `_format_lines`.
        r>r Nz style="background-color: rr�rr�z<span class="hll">%s</span>)rH�	enumerater.rmr�)rWr�hlsr�r�r�rms       r�_highlight_lineszHtmlFormatter._highlight_lines�s�����
�m�m��&�{�3�M�A�z��5��A�v���h���1�u��|��>�>��E��z�z�1�1�=�"&�*�*�"<�"<�"?���E�5�A�A�A��:�U�B�B�B���h��4�s�BBc�f�|}|jr|j|�}|j|�}|S)z�
        Wrap the ``source``, which is a generator yielding
        individual lines, in custom generators. See docstring
        for `format`. Can be overridden.
        )r9r�r�)rW�source�outputs   r�wrapzHtmlFormatter.wrap�s1�����=�=��_�_�V�,�F�����'���
rc�:�|j|�}|js |jdk(r|j|�}|jr|j|�}|js�|jr|j|�}|jr|j|�}|j|�}|jdk(r|j|�}|j|�}|jr|j||�}|D]\}}|j|��y)aW
        The formatting process uses several nested generators; which of
        them are used is determined by the user's options.

        Each generator should take at least one argument, ``inner``,
        and wrap the pieces of text generated by this.

        Always yield 2-tuples: (code, text). If "code" is 1, the text
        is part of the original tokensource being highlighted, if it's
        0, the text is some piece of wrapping. This makes it possible to
        use several different wrappers that process the original source
        linewise, e.g. line number generators.
        r=r>N)rr-r;r�rHrrEr�rFr�rr�r��fullr�r�)rWrr�rr��pieces      r�format_unencodedzHtmlFormatter.format_unencoded�s����#�#�K�0���{�{�t�|�|�q�0��-�-�f�5�F��=�=��*�*�6�2�F��{�{�����/�/��7���~�~��-�-�f�5���Y�Y�v�&�F��|�|�q� ��0�0��8���^�^�F�+�F��y�y������9���H�A�u��M�M�%� �rr�)&�__name__�
__module__�__qualname__�__doc__rr�aliases�	filenamesrIr\r`rdrVr{rwrvrur~�propertyr�r�r�rJr�r�r�r�r�r�r�r��	functools�	lru_cacher�rrrrr#r�rrrrqs���b�H	�D��h�G��7�#�I�/"�b���<�0&��"�.	��$�$��$��
��
��
��
��'�RA&�H)�V
����"�
�Y����%�?�&�?�L#�\��,
�%!r)r'r+r�r��os.path�ior�pip._vendor.pygments.formatterr�pip._vendor.pygments.tokenrrr�pip._vendor.pygments.utilrr	r
rM�ImportError�__all__�ordr�rrr(r�r�r�r�rr�rr�<module>r5s�����	�
���4�B�B�M�M����
����H�g���H�f���H�f���H�h���H�g���/�!�
�	���
��
���
�*
���
�l
!�I�l
!��u���E��s�B
�
B�Bpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/bbcode.cpython-312.pyc000064400000010211151732703050025520 0ustar00�

R`i���<�dZddlmZddlmZdgZGd�de�Zy)z�
    pygments.formatters.bbcode
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    BBcode formatter.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)�get_bool_opt�BBCodeFormatterc�2�eZdZdZdZddgZgZd�Zd�Zd�Z	y)	ra�
    Format tokens with BBcodes. These formatting codes are used by many
    bulletin boards, so you can highlight your sourcecode with pygments before
    posting it there.

    This formatter has no support for background colors and borders, as there
    are no common BBcode tags for that.

    Some board systems (e.g. phpBB) don't support colors in their [code] tag,
    so you can't use the highlighting together with that tag.
    Text in a [code] tag usually is shown with a monospace font (which this
    formatter can do with the ``monofont`` option) and no spaces (which you
    need for indentation) are removed.

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `codetag`
        If set to true, put the output into ``[code]`` tags (default:
        ``false``)

    `monofont`
        If set to true, add a tag to show the code with a monospace font
        (default: ``false``).
    �BBCode�bbcode�bbc��tj|fi|��t|dd�|_t|dd�|_i|_|j
�y)N�codetagF�monofont)r�__init__r�_code�_mono�styles�_make_styles)�self�optionss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/bbcode.pyr
zBBCodeFormatter.__init__3sH�����4�+�7�+�!�'�9�e�<��
�!�'�:�u�=��
��������c���|jD]\\}}dx}}|dr|d|dzz
}d|z}|dr
|dz
}d|z}|dr
|d	z
}d
|z}|dr
|dz
}d
|z}||f|j|<�^y)N��colorz[color=#%s]z[/color]�boldz[b]z[/b]�italicz[i]z[/i]�	underlinez[u]z[/u])�styler)r�ttype�ndef�start�ends     rrzBBCodeFormatter._make_styles;s����:�:�K�E�4���E�C��G�}����g��6�6�� �3�&���F�|������s�l���H�~������s�l���K� ������s�l��"'���D�K�K���!&rc��|jr|jd�|jr|jd�d}d}|D]t\}}||jvr|j}||jvr�||k(r||z
}�:|r5|j|\}}|jdj|||f��|}|}�v|r5|j|\}}|jdj|||f��|jr|jd�|jr|jd�|js|jr|jd�yy)Nz[code]z[font=monospace]rz[/font]z[/code]�
)r�writerr�parent�join)	r�tokensource�outfile�lastval�lasttyper�valuerr s	         r�format_unencodedz BBCodeFormatter.format_unencodedNs(���:�:��M�M�(�#��:�:��M�M�,�-�����'�L�E�5��t�{�{�*������t�{�{�*��� ��5� ���!%���X�!6�J�E�3��M�M�"�'�'�5�'�3�*?�"@�A��� ��(�����X�.�J�E�3��M�M�"�'�'�5�'�3�"7�8�9��:�:��M�M�)�$��:�:��M�M�)�$��:�:�����M�M�$��$rN)
�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesr
rr+�rrrrs,���8�D����G��I��,�& rN)r/�pip._vendor.pygments.formatterr�pip._vendor.pygments.utilr�__all__rr3rr�<module>r7s(���5�2��
��Z �i�Z rpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/other.cpython-312.pyc000064400000015377151732703050025445 0ustar00�

R`i����dZddlmZddlmZddlmZddlmZgd�Z	Gd�de�Z
Gd	�d
e�ZdZdZ
Gd
�de�Zy)z�
    pygments.formatters.other
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Other formatters: NullFormatter, RawTokenFormatter.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)�get_choice_opt)�Token)�colorize)�
NullFormatter�RawTokenFormatter�TestcaseFormatterc�(�eZdZdZdZddgZdgZd�Zy)rz;
    Output the text unchanged without any formatting.
    z	Text only�text�nullz*.txtc��|j}|D]9\}}|r!|j|j|���)|j|��;y�N)�encoding�write�encode)�self�tokensource�outfile�enc�ttype�values      ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/other.py�formatzNullFormatter.formats=���m�m��'�L�E�5���
�
�e�l�l�3�/�0��
�
�e�$�	(�N)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesr�rrrrs$����D��v��G��	�I�%rrc�2�eZdZdZdZddgZdgZdZd�Zd�Z	y	)
ra}
    Format tokens as a raw representation for storing token streams.

    The format is ``tokentype<TAB>repr(tokenstring)\n``. The output can later
    be converted to a token stream with the `RawTokenLexer`, described in the
    :doc:`lexer list <lexers>`.

    Only two options are accepted:

    `compress`
        If set to ``'gz'`` or ``'bz2'``, compress the output with the given
        compression algorithm after encoding (default: ``''``).
    `error_color`
        If set to a color name, highlight error tokens using that color.  If
        set but with no value, defaults to ``'red'``.

        .. versionadded:: 0.11

    z
Raw tokens�raw�tokensz*.rawFc�R�tj|fi|��d|_t|dgd�d�|_|jdd�|_|jdurd|_|j�	t|jd�yy#t$rtd|jz��wxYw)	N�ascii�compress)��none�gz�bz2r)�error_colorT�redzInvalid color %r specified)
r�__init__rrr(�getr-r�KeyError�
ValueError�r�optionss  rr/zRawTokenFormatter.__init__>s������4�+�7�+� ��
�&�w�
�'@�"�F��
�"�;�;�}�d�;������t�#�$�D�����'�
3���)�)�2�.�(���
3� �!=�!%�!1�!1�"2�3�3�
3�s�,B�"B&c�T��
�	�jd�|jdk(r1ddl}|j	ddd����j}�j
}nI|jdk(r"ddl}|jd��
�
�fd	�}�
�fd
�}n�j}�j}|jrI|D]C\}}d||fz}	|tjur|t|j|	���<||	��En|D]\}}|d||fz��|�y#t$rtd��wxYw)Nrz3The raw tokens formatter needs a binary output filer+rr)�wb�	r,c�F���j�j|��yr)rr()r�
compressorrs ��rrz'RawTokenFormatter.format.<locals>.write`s����
�
�j�1�1�$�7�8rc�d���j�j���j�yr)r�flush)r9rs��rr;z'RawTokenFormatter.format.<locals>.flushcs!����
�
�j�.�.�0�1��
�
�rs%r	%r
)
r�	TypeErrorr(�gzip�GzipFile�closer,�
BZ2Compressorr;r-r�Errorr)rrrr=rr;r,rr�liner9s  `       @rrzRawTokenFormatter.formatPs���	+��M�M�#���=�=�D� ���m�m�B��a��9�G��M�M�E��M�M�E�
�]�]�e�
#���*�*�1�-�J�
9�
 ��M�M�E��M�M�E���� +���u�"�e�U�^�3���E�K�K�'��(�4�#3�#3�T�:�;��$�K�!,�!,���u��k�U�E�N�2�3�!,�
���C�	+��*�+�
+�	+�s�D�D'N)
rrrrrr r!�
unicodeoutputr/rr"rrrr$s.���&�D��h��G��	�I��M�3�$$rrzG    def testNeedsName(lexer):
        fragment = %r
        tokens = [
zD        ]
        assert list(lexer.get_tokens(fragment)) == tokens
c�&�eZdZdZdZdgZd�Zd�Zy)r	zU
    Format tokens as appropriate for a new testcase.

    .. versionadded:: 2.0
    �Testcase�testcasec�~�tj|fi|��|j�|jdk7rtd��yy)N�utf-8z*Only None and utf-8 are allowed encodings.)rr/rr2r3s  rr/zTestcaseFormatter.__init__�s?�����4�+�7�+��=�=�$����'�)A��I�J�J�*B�$rc	��d}g}g}|D]0\}}|j|�|j|�d|�d|�d���2tdj|�fz}dj|�}	t}
|j�|j||	z|
z�n`|j|j
d��|j|	j
d��|j|
j
d��|j�y)Nz            �(z, z),
r)rH)�append�TESTCASE_BEFORE�join�TESTCASE_AFTERrrrr;)rrr�indentation�rawbuf�outbufrr�before�during�afters           rrzTestcaseFormatter.format�s���������'�L�E�5��M�M�%� ��M�M�[�%��G�H�(�!�B�G�G�F�O�#5�5�����������=�=� ��M�M�&�6�/�E�1�2��M�M�&�-�-��0�1��M�M�&�-�-��0�1��M�M�%�,�,�w�/�0��
�
�rN)rrrrrr r/rr"rrr	r	�s ���
�D��l�G�K�
rr	N)r�pip._vendor.pygments.formatterr�pip._vendor.pygments.utilr�pip._vendor.pygments.tokenr�pip._vendor.pygments.consoler�__all__rrrLrNr	r"rr�<module>rZsR���5�4�,�1�
E��%�I�%�"P�	�P�f��
���	�rpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/pangomarkup.cpython-312.pyc000064400000005631151732703050026640 0ustar00�

R`i���^�dZddlmZdgZed�ded�diZefd�ZGd	�de�Zy
)z�
    pygments.formatters.pangomarkup
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for Pango markup output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter�PangoMarkupFormatter�&z&amp;�<z&lt;c�$�|j|�S)z Escape & and < for Pango Markup.)�	translate)�text�tables  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/pangomarkup.py�escape_special_charsrs���>�>�%� � �c�,�eZdZdZdZddgZgZd�Zd�Zy)rzk
    Format tokens as Pango Markup code. It can then be rendered to an SVG.

    .. versionadded:: 2.9
    zPango Markup�pango�pangomarkupc��tj|fi|��i|_|jD]\\}}d}d}|dr|d|dzz
}d|z}|dr
|dz
}d|z}|dr
|d	z
}d
|z}|dr
|dz
}d
|z}||f|j|<�^y)N��colorz<span fgcolor="#%s">z</span>�boldz<b>z</b>�italicz<i>z</i>�	underlinez<u>z</u>)r�__init__�styles�style)�self�options�tokenr�start�ends      rrzPangoMarkupFormatter.__init__'s������4�+�7�+���� �J�J�L�E�5��E��C��W�~��/�%��.�@�@���#�o���V�}������s�l���X�������s�l���[�!������s�l��"'���D�K�K���'r
c��d}d}|jd�|D]z\}}||jvr|j}||jvr�||k(r|t|�z
}�C|r)|j|\}}|j||z|z�t|�}|}�||r)|j|\}}|j||z|z�|jd�y)Nrz<tt>z</tt>)�writer�parentr)	r�tokensource�outfile�lastval�lasttype�ttype�value�
stylebegin�styleends	         r�format_unencodedz%PangoMarkupFormatter.format_unencoded=s��������
�
�f��'�L�E�5��t�{�{�*������t�{�{�*��� ��/��6�6���+/�;�;�x�+@�(�J���M�M�*�w�"6��"A�B�.�u�5�� ��(��#'�;�;�x�#8� �J���M�M�*�w�.��9�:��
�
�g�r
N)	�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesrr*�r
rrrs'����D��
�&�G��I�.�,r
N)r.�pip._vendor.pygments.formatterr�__all__�ord�
_escape_tablerrr2r
r�<module>r7sJ���5�"�
"����H�g���H�f��
�&3�!�
7�9�7r
python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc000064400000014012151732703050025100 0ustar00�

R`i���@�dZddlmZddlmZmZdgZGd�de�Zy)z�
    pygments.formatters.rtf
    ~~~~~~~~~~~~~~~~~~~~~~~

    A formatter that generates RTF files.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)�get_int_opt�
surrogatepair�RtfFormatterc�8�eZdZdZdZdgZdgZd�Zd�Zd�Z	d�Z
y	)
ra�
    Format tokens as RTF markup. This formatter automatically outputs full RTF
    documents with color information and other useful stuff. Perfect for Copy and
    Paste into Microsoft(R) Word(R) documents.

    Please note that ``encoding`` and ``outencoding`` options are ignored.
    The RTF format is ASCII natively, but handles unicode characters correctly
    thanks to escape sequences.

    .. versionadded:: 0.6

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `fontface`
        The used font family, for example ``Bitstream Vera Sans``. Defaults to
        some generic font which is supposed to have fixed width.

    `fontsize`
        Size of the font used. Size is specified in half points. The
        default is 24 half-points, giving a size 12 font.

        .. versionadded:: 2.0
    �RTF�rtfz*.rtfc��tj|fi|��|jd�xsd|_t	|dd�|_y)a�
        Additional options accepted:

        ``fontface``
            Name of the font used. Could for example be ``'Courier New'``
            to further specify the default which is ``'\fmodern'``. The RTF
            specification claims that ``\fmodern`` are "Fixed-pitch serif
            and sans serif fonts". Hope every RTF implementation thinks
            the same about modern...

        �fontface��fontsizerN)r�__init__�getrrr
)�self�optionss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/rtf.pyrzRtfFormatter.__init__2s<��	���4�+�7�+����J�/�5�2��
�#�G�Z��;��
�c�f�|jdd�jdd�jdd�S)N�\z\\�{z\{�}z\})�replace)r�texts  r�_escapezRtfFormatter._escapeBs-���|�|�D�&�)��G�C��'��G�C��'�	(rc�`�|sy|j|�}g}|D]s}t|�}|dkr|jt|���.d|cxkrdkrnn|jd|z��Qd|ks�W|jdt	|�z��udj|�j
dd�S)Nr�iz{\u%d}z{\u%d}{\u%d}�
z\par
)r�ord�append�strr�joinr)rr�buf�c�cns     r�_escape_textzRtfFormatter._escape_textGs������|�|�D�!�����A��Q��B��T�{��
�
�3�q�6�"��2�'��'��
�
�9�r�>�*��B���
�
�+�m�B�.?�?�@���w�w�s�|�#�#�D�)�4�4rc��|jd|jxrd|j|j�zxsdz�i}d}|jD]h\}}|d|d|dfD]R}|s�||vs�|||<|jdt	|d	d
d�t	|d
dd�t	|dd
d�fz�|dz
}�T�j|jd�|j
r|jd|j
z�|D�]y\}}	|jj
|�s@|jr4|j}|jj
|�s
|jr�4|jj|�}g}
|dr|
jd||dz�|dr|
jd||dz�|dr|
jd�|dr|
jd�|dr|
jd�|dr|
jd||dz�dj|
�}|r|jd|z�|j|j|	��|s��i|jd���||jd�y)NzJ{\rtf1\ansi\uc0\deff0{\fonttbl{\f0\fmodern\fprq1\fcharset0%s;}}{\colortbl;� r��color�bgcolor�borderz\red%d\green%d\blue%d;r����z}\f0 z\fs%dz\cb%dz\cf%d�boldz\b�italicz\i�	underlinez\ulz\chbrdr\chcfpat%dz{%s r)�writerr�style�intr
�styles_token�parent�style_for_tokenrr!r%)r�tokensource�outfile�
color_mapping�offset�_r4r)�ttype�valuer"�starts            r�format_unencodedzRtfFormatter.format_unencoded_so���
�
�%�(,�
�
�)J�(+�d�l�l�4�=�=�.I�(I�)+�(*�	,�	-��
����
�
�H�A�u��w���y�)9�5��?�J���U�-�7�+1�M�%�(��M�M�"=��E�!�A�J��+��E�!�A�J��+��E�!�A�J��+�A�#��
�a�K�F�K�#�	�
�
�h���=�=��M�M�(�T�]�]�2�3�(�L�E�5��j�j�-�-�e�4���������j�j�-�-�e�4�����J�J�.�.�u�5�E��C��Y���
�
�8�m�E�)�4D�&E�E�F��W�~��
�
�8�m�E�'�N�&C�C�D��V�}��
�
�5�!��X���
�
�5�!��[�!��
�
�6�"��X���
�
�0�(��x��9�:�;��G�G�C�L�E���
�
�f�u�n�-��M�M�$�+�+�E�2�3���
�
�c�"�/(�2	�
�
�c�rN)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesrrr%rA�rrrrs0���6�D��g�G��	�I�<� (�
5�03rN)rE�pip._vendor.pygments.formatterr�pip._vendor.pygments.utilrr�__all__rrIrr�<module>rMs*���5�@��
��@�9�@rpython3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/latex.cpython-312.pyc000064400000046765151732703050025446 0ustar00�

R`i�K���dZddlmZddlmZddlmZmZddlm	Z	m
Z
ddlmZm
Z
dgZd�Zd	Zd
Zd�ZGd�de�ZGd
�de�Zy)z�
    pygments.formatters.latex
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for LaTeX fancyvrb output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�StringIO)�	Formatter)�Lexer�
do_insertions)�Token�STANDARD_TYPES)�get_bool_opt�get_int_opt�LatexFormatterc��|jdd�jdd�jdd�jdd|z�jdd|z�jdd	|z�jd
d|z�jdd
|z�jdd|z�jdd|z�jdd|z�jdd|z�jdd|z�jdd|z�jdd|z�jdd|z�jdd|z�jd d!|z�S)"N�\��{��}�z\%sZbs{}z\%sZob{}z\%sZcb{}�^z\%sZca{}�_z\%sZus{}�&z\%sZam{}�<z\%sZlt{}�>z\%sZgt{}�#z\%sZsh{}�%z\%sZpc{}�$z\%sZdl{}�-z\%sZhy{}�'z\%sZsq{}�"z\%sZdq{}�~z\%sZti{})�replace)�text�
commandprefixs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/latex.py�
escape_texr#s,���<�<��f�%����V�$����V�$�����m� ;�<�����m� ;�<�����m� ;�<����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9����[�=�8�9�#:�z�
\documentclass{%(docclass)s}
\usepackage{fancyvrb}
\usepackage{color}
\usepackage[%(encoding)s]{inputenc}
%(preamble)s

%(styledefs)s

\begin{document}

\section*{%(title)s}

%(code)s
\end{document}
a�
\makeatletter
\def\%(cp)s@reset{\let\%(cp)s@it=\relax \let\%(cp)s@bf=\relax%%
    \let\%(cp)s@ul=\relax \let\%(cp)s@tc=\relax%%
    \let\%(cp)s@bc=\relax \let\%(cp)s@ff=\relax}
\def\%(cp)s@tok#1{\csname %(cp)s@tok@#1\endcsname}
\def\%(cp)s@toks#1+{\ifx\relax#1\empty\else%%
    \%(cp)s@tok{#1}\expandafter\%(cp)s@toks\fi}
\def\%(cp)s@do#1{\%(cp)s@bc{\%(cp)s@tc{\%(cp)s@ul{%%
    \%(cp)s@it{\%(cp)s@bf{\%(cp)s@ff{#1}}}}}}}
\def\%(cp)s#1#2{\%(cp)s@reset\%(cp)s@toks#1+\relax+\%(cp)s@do{#2}}

%(styles)s

\def\%(cp)sZbs{\char`\\}
\def\%(cp)sZus{\char`\_}
\def\%(cp)sZob{\char`\{}
\def\%(cp)sZcb{\char`\}}
\def\%(cp)sZca{\char`\^}
\def\%(cp)sZam{\char`\&}
\def\%(cp)sZlt{\char`\<}
\def\%(cp)sZgt{\char`\>}
\def\%(cp)sZsh{\char`\#}
\def\%(cp)sZpc{\char`\%%}
\def\%(cp)sZdl{\char`\$}
\def\%(cp)sZhy{\char`\-}
\def\%(cp)sZsq{\char`\'}
\def\%(cp)sZdq{\char`\"}
\def\%(cp)sZti{\char`\~}
%% for compatibility with earlier versions
\def\%(cp)sZat{@}
\def\%(cp)sZlb{[}
\def\%(cp)sZrb{]}
\makeatother
c��tj|�}|r|Sd}|�,|d|z}|j}tj|�}|��,||zS)N����)r�get�parent)�ttype�fname�anames   r"�_get_ttype_namer-�s^�����u�%�E�����E�
�-��b�	�E�!�������"�"�5�)���-��5�=�r$c�<�eZdZdZdZddgZdgZd�Zd�Zdd�Z	d	�Z
y
)ra�

    Format tokens as LaTeX code. This needs the `fancyvrb` and `color`
    standard packages.

    Without the `full` option, code is formatted as one ``Verbatim``
    environment, like this:

    .. sourcecode:: latex

        \begin{Verbatim}[commandchars=\\\{\}]
        \PY{k}{def }\PY{n+nf}{foo}(\PY{n}{bar}):
            \PY{k}{pass}
        \end{Verbatim}

    Wrapping can be disabled using the `nowrap` option.

    The special command used here (``\PY``) and all the other macros it needs
    are output by the `get_style_defs` method.

    With the `full` option, a complete LaTeX document is output, including
    the command definitions in the preamble.

    The `get_style_defs()` method of a `LatexFormatter` returns a string
    containing ``\def`` commands defining the macros needed inside the
    ``Verbatim`` environments.

    Additional options accepted:

    `nowrap`
        If set to ``True``, don't wrap the tokens at all, not even inside a
        ``\begin{Verbatim}`` environment. This disables most other options
        (default: ``False``).

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `full`
        Tells the formatter to output a "full" document, i.e. a complete
        self-contained document (default: ``False``).

    `title`
        If `full` is true, the title that should be used to caption the
        document (default: ``''``).

    `docclass`
        If the `full` option is enabled, this is the document class to use
        (default: ``'article'``).

    `preamble`
        If the `full` option is enabled, this can be further preamble commands,
        e.g. ``\usepackage`` (default: ``''``).

    `linenos`
        If set to ``True``, output line numbers (default: ``False``).

    `linenostart`
        The line number for the first line (default: ``1``).

    `linenostep`
        If set to a number n > 1, only every nth line number is printed.

    `verboptions`
        Additional options given to the Verbatim environment (see the *fancyvrb*
        docs for possible values) (default: ``''``).

    `commandprefix`
        The LaTeX commands used to produce colored output are constructed
        using this prefix and some letters (default: ``'PY'``).

        .. versionadded:: 0.7
        .. versionchanged:: 0.10
           The default is now ``'PY'`` instead of ``'C'``.

    `texcomments`
        If set to ``True``, enables LaTeX comment lines.  That is, LaTex markup
        in comment tokens is not escaped so that LaTeX can render it (default:
        ``False``).

        .. versionadded:: 1.2

    `mathescape`
        If set to ``True``, enables LaTeX math mode escape in comments. That
        is, ``'$...$'`` inside a comment will trigger math mode (default:
        ``False``).

        .. versionadded:: 1.2

    `escapeinside`
        If set to a string of length 2, enables escaping to LaTeX. Text
        delimited by these 2 characters is read as LaTeX code and
        typeset accordingly. It has no effect in string literals. It has
        no effect in comments if `texcomments` or `mathescape` is
        set. (default: ``''``).

        .. versionadded:: 2.0

    `envname`
        Allows you to pick an alternative environment name replacing Verbatim.
        The alternate environment still has to support Verbatim's option syntax.
        (default: ``'Verbatim'``).

        .. versionadded:: 2.0
    �LaTeX�latex�texz*.texc��tj|fi|��t|dd�|_|j	dd�|_|j	dd�|_t|dd�|_tt|dd	��|_
tt|d
d	��|_|j	dd�|_t|dd�|_
|j	d
d�|_t|dd�|_t|dd�|_|j	dd�|_t%|j"�dk(r)|j"d|_|j"d	|_nd|_|j	dd�|_|j-�y)N�nowrapF�docclass�article�preambler&�linenos�linenostart��
linenostep�verboptions�nobackgroundr!�PY�texcomments�
mathescape�escapeinside�r�envname�Verbatim)r�__init__r	r3r(r4r6r7�absr
r8r:r;r<r!r>r?r@�len�left�rightrB�_create_stylesheet)�self�optionss  r"rDzLatexFormatter.__init__sL�����4�+�7�+�"�7�H�e�<������J�	�:��
����J��3��
�#�G�Y��>����{�7�M�1�E�F����k�'�<��C�D���"�;�;�}�b�9���(��.�%�H���$�[�[��$�?���'����F���&�w��e�D���#�K�K���;����t� � �!�Q�&��)�)�!�,�D�I��*�*�1�-�D�J� "�D���{�{�9�j�9������!r$c	���tdix}|_ix}|_|j}d�}|jD]�\}}t|�}d}|dr|dz
}|dr|dz
}|dr|dz
}|d	r|d
z
}|dr|dz
}|d
r|dz
}|dr|d||d�zz
}|dr|d||d��d||d��d�z
}n|dr|d||d�zz
}|dk(r��|j
d|�}|||<|||<��y)Nr&c��|r;djdD�cgc] }dt||||dzzd�dzz��"c}�Sycc}w)N�,)rrA�z%.2fr9�g�o@z1,1,1)�join�int)�col�is  r"�rgbcolorz3LatexFormatter._create_stylesheet.<locals>.rgbcolors]����x�x�*3�!5�*3�Q�"(�3�s�1�v��A��E�
�/B�B�+G�%�+O�!P�*3�!5�6�6���!5s�%?�boldz\let\$$@bf=\textbf�italicz\let\$$@it=\textit�	underlinez\let\$$@ul=\underline�romanz\let\$$@ff=\textrm�sansz\let\$$@ff=\textsf�mono�colorz'\def\$$@tc##1{\textcolor[rgb]{%s}{##1}}�borderzG\def\$$@bc##1{{\setlength{\fboxsep}{\string -\fboxrule}\fcolorbox[rgb]{�}{�bgcolorz}{\strut ##1}}}zH\def\$$@bc##1{{\setlength{\fboxsep}{0pt}\colorbox[rgb]{%s}{\strut ##1}}}z$$)r�
ttype2name�cmd2defr!�styler-r)	rJ�t2n�c2d�cprUr*�ndef�name�cmndefs	         r"rIz!LatexFormatter._create_stylesheetsh��!&���+��d�o����d�l�
�
�
��	� �:�:�K�E�4�"�5�)�D��F��F�|��/�/���H�~��/�/���K� ��2�2���G�}��/�/���F�|��/�/���F�|��/�/���G�}��E�#�D��M�2�3�4���H�~��$�T�(�^�4�$�T�)�_�5�7�8���i���?�#�D��O�4�5�6����|���^�^�D�"�-�F��C��J��C��I�?&r$c
���|j}g}|jj�D] \}}|jd|�d|�d|�d���"t|jdj|�d�zS)z�
        Return the command sequences needed to define the commands
        used to format text in the verbatim environment. ``arg`` is ignored.
        z
\@namedef{z@tok@r^r�
)re�styles)r!ra�items�append�STYLE_TEMPLATErQ)rJ�argrerkrg�
definitions      r"�get_style_defszLatexFormatter.get_style_defsDsi��
�
�
���� $��� 2� 2� 4��D�*��M�M��T�:�N�O�!5��t�'9�'9�+/�9�9�V�+<�!>�>�	>r$c��|j}|j}|jr|}t�}|js�|jd|jzdz�|jrE|j|j}}|jd|xrd|zxsdz|xrd|zxsdz�|js|js|jr|jd�|jr|jd|jz�|jd	�|D�]^\}}	|tjv�rV|jrU|	d
d}t!dt#|	��D]}
|d
|	|
k7rn
||	|
z
}�|	t#|�d}	t%||�}||	z}	�n|jrL|	j'd�}d
}t)|�D]\}
}
|st%|
|�||
<|}�dj+|�}	n�|jr�|	}d}	|r�|j-|j.�\}}}|rJ|j-|j0�\}}}|r|	t%||�|zz
}	n%|	t%||z|z|�z
}	n|	t%||�z
}	|r�}n+t%|	|�}	n|tj2vrt%|	|�}	g}|tur*	|j5||�|j:}|tur�*dj+t=|��}|rp|	j'd�}|ddD]0}|r|jd|�d|�d|�d��|jd��2|ds��.|jd|�d|�d|d�d����N|j|	���a|js!|jd|jzdz�|jr�|j>xsd}dddd�jA|jCdd�|�}jtDtG|jH|jJ|jL||jO�|jQ���z�yy#t6$r|j5t9|��Y���wxYw)Nz\begin{z}[commandchars=\\\{\}z
,numbers=leftz,firstnumber=%dr&z,stepnumber=%dz6,codes={\catcode`\$=3\catcode`\^=7\catcode`\_=8\relax}rNz]
rr9rF�+rjr'r
rr^rz\end{z}
�utf8�latin1)�utf_8�latin_1�
iso_8859_1rr)r4r6�title�encoding�	styledefs�code))r`r!�fullrr3�writerBr7r8r:r?r>r@r;r�Comment�rangerFr#�split�	enumeraterQ�	partitionrGrH�Escaperm�KeyErrorr-r)�reversedrzr(r�DOC_TEMPLATE�dictr4r6ryrq�getvalue)rJ�tokensource�outfilercre�realoutfile�start�stepr*�valuerT�parts�in_math�partr �a�sep1�b�sep2rk�styleval�spl�linerzs                        r"�format_unencodedzLatexFormatter.format_unencodedPs0���o�o��
�
�
���9�9�!�K��j�G��{�{��M�M�*�t�|�|�3�6Q�Q�R��|�|�"�.�.����t���
�
�o�$�B�):�U�)B�H�b�J�#�?�(8�4�(?�E�2�G�H����$�"2�"2�d�6G�6G��
�
�8�9�����
�
�c�D�$4�$4�4�5��M�M�%� �'�L�E�5���
�
�%��#�#�!�!�A�J�E�"�1�c�%�j�1�� ��8�u�Q�x�/�!���q��)��2�
"�#�e�*�+�.�E�&�u�b�1�E�"�E�M�E��_�_�!�K�K��,�E�#�G�#,�U�#3���4�&�'1�$��';�E�!�H�&-�+��$4� �H�H�U�O�E��&�&� �D��E��(,���t�y�y�(A�
��4���,0�N�N�4�:�:�,F�M�A�t�T�#� %��A�r�):�Q�)>� >�� %��A��H�q�L�"�)E� E��!�Z��2�%6�6�E��'�u�b�1�E��e�l�l�*�"�5�"�-���F��u�$�:��M�M�#�e�*�-�����
�u�$��x�x��� 0�1�H���k�k�$�'�����H�D���
�
��H�d�&K�L��M�M�$�'�%��r�7��M�M�B��#�b�'�"J�K��
�
�e�$�w(�z�{�{��M�M�(�T�\�\�1�E�9�:��9�9��}�}�.��H� �#�&���c�(�"�"�3��,�h�7�	
�

���l�����!%���!%���!)�!%�!4�!4�!6�!(�!1�!1�!3�5�5�
6���' �:��M�M�/�%�"8�9�:�s�:Q�#Q<�;Q<N)r&)�__name__�
__module__�__qualname__�__doc__rg�aliases�	filenamesrDrIrqr��r$r"rr�s7��g�P�D����G��	�I�"�.+�Z
>�e6r$c�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�LatexEmbeddedLexera�
    This lexer takes one lexer as argument, the lexer for the language
    being formatted, and the left and right delimiters for escaped text.

    First everything is scanned using the language lexer to obtain
    strings and comments. All other consecutive tokens are merged and
    the resulting text is scanned for escaped segments, which are given
    the Token.Escape type. Finally text that is not escaped is scanned
    again with the language lexer.
    c�Z�||_||_||_tj|fi|��y�N)rGrH�langrrD)rJrGrHr�rKs     r"rDzLatexEmbeddedLexer.__init__�s(����	���
���	�
���t�'�w�'r$c�@�d}g}g}|j|�D]B\}}}|�&|r|jt|�|f�g}||z
}�/|j|||f��D|r|jt|�|f�t||jj|��S)Nr&)�_find_safe_escape_tokensrmrFrr��get_tokens_unprocessed)rJr �buffered�
insertions�
insertion_bufrT�t�vs        r"r�z)LatexEmbeddedLexer.get_tokens_unprocessed�s������
��
��4�4�T�:�G�A�q�!��y� ��%�%�s�8�}�m�&D�E�$&�M��A�
���$�$�a��A�Y�/�;�����s�8�}�m�<�=��Z�!�Y�Y�=�=�h�G�I�	Ir$c#��K�|j|jj|�d��D]4\}}}|�%|j|�D]\}}}||z||f����.|d|f���6y�w)z8 find escape tokens that are not in strings or comments c�N�|tjvxs|tjvSr�)rr�String)r�s r"�<lambda>z=LatexEmbeddedLexer._find_safe_escape_tokens.<locals>.<lambda>�s��a�5�=�=�(�=�A����,=�=r$N)�
_filter_tor�r��_find_escape_tokens)rJr rTr�r��i2�t2�v2s        r"r�z+LatexEmbeddedLexer._find_safe_escape_tokens�st��������I�I�,�,�T�2�=�
�G�A�q�!��y�"&�":�":�1�"=�J�B��B��b�&�"�b�.�(�#>���q�j� �
�s�A%A'c#�K�d}d}|D]*\}}}||�r|r	|d|f��d}|||f���"|s|}||z
}�,|r|d|f��yy�w)zC Keep only the tokens that match `pred`, merge the others together r&rNr�)rJ�it�pred�buf�idxrTr�r�s        r"r�zLatexEmbeddedLexer._filter_to�sm���������G�A�q�!��A�w���t�S�.�(��C���A�g�
���C��q������t�S�.� ��s�?Ac#�K�d}|r�|j|j�\}}}|r|d|f��|t|�z
}|r�|j|j�\}}}|rH|t|�ztj
|f��|t|�t|�zt|�zz
}n%|tj|f��|t|�z
}|}|r��yy�w)z; Find escape tokens within text, give token=None otherwise rN)r�rGrFrHrr��Error)rJr �indexr�r�r�r�s       r"r�z&LatexEmbeddedLexer._find_escape_tokens�s�������� �N�N�4�9�9�5�M�A�t�T���T�1�n�$���Q����� $���t�z�z� :�
��4����#�d�)�+�U�\�\�1�<�<��S��Y��Q��/�#�d�)�;�;�E�����d�2�2��S��Y�&�E��D��s�C
C�CN)	r�r�r�r�rDr�r�r�r�r�r$r"r�r��s!��	�(�I�&
!�!�"r$r�N)r��ior�pip._vendor.pygments.formatterr�pip._vendor.pygments.lexerrr�pip._vendor.pygments.tokenrr�pip._vendor.pygments.utilr	r
�__all__r#r�rnr-rr�r�r$r"�<module>r�s\����4�;�<�?��
��:�*��n"��J	�b6�Y�b6�J	Q��Qr$python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/img.cpython-312.pyc000064400000064571151732703050025100 0ustar00�

R`i�U���dZddlZddlZddlmZddlmZmZmZm	Z	ddl
Z
	ddlmZm
Z
mZdZ	ddlZgd�Zgd	�d
dgdgd
dgd�ZdZdZdZGd�de�ZGd�de�ZGd�d�ZGd�de�ZGd�de�ZGd�de�ZGd�d e�Zy#e$rdZY�swxYw#e$r	ddlZn
#e$rdZYnwxYwY��wxYw)!z�
    pygments.formatters.img
    ~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for Pixmap output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�	Formatter)�get_bool_opt�get_int_opt�get_list_opt�get_choice_opt)�Image�	ImageDraw�	ImageFontTF)�ImageFormatter�GifImageFormatter�JpgImageFormatter�BmpImageFormatter)��Roman�Book�Normal�Regular�Medium�Oblique�Italic�BoldzBold ObliquezBold Italic)�NORMAL�ITALIC�BOLD�
BOLDITALICzDejaVu Sans MonozCourier New�Menloc��eZdZdZy)�PilNotAvailablez,When Python imaging library is not availableN��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/img.pyrr5s��6r%rc��eZdZdZy)�FontNotFoundz(When there are no usable fonts specifiedNrr$r%r&r(r(9s��2r%r(c�P�eZdZdZd
d�Zd�Zd�Zd�Zd�Zdd�Z	d�Z
d	�Zd
�Zd�Z
y)�FontManagerz>
    Manages a set of fonts: normal, italic, bold, etc...
    c�j�||_||_i|_d|_tj
j
d�r|st|_|j�ytj
j
d�r|st|_|j�y|st|_|j�y)N�win�darwin)
�	font_name�	font_size�fonts�encoding�sys�platform�
startswith�DEFAULT_FONT_NAME_WIN�_create_win�DEFAULT_FONT_NAME_MAC�_create_mac�DEFAULT_FONT_NAME_NIX�_create_nix)�selfr.r/s   r&�__init__zFontManager.__init__Bs���"���"�����
���
��<�<�"�"�5�)��!6�������
�\�\�
$�
$�X�
.��!6��������!6������r%c�^�tjd|�d|��dgtjd��}|j�\}}|jdk(r]|j�}|D]G}|j
d�r�|j�j�jd�}|s�E|cSyy)Nzfc-listz:style=�file)�stdout�stderrrsFontconfig warning:�:)	�
subprocess�Popen�PIPE�communicate�
returncode�
splitlinesr4�decode�strip)	r;�name�style�procr?�_�lines�line�paths	         r&�_get_nix_font_pathzFontManager._get_nix_font_pathTs�������T�5�,I�6� R�'1���t�E���$�$�&�	����?�?�a���%�%�'�E����?�?�#9�:���{�{�}�*�*�,�2�2�3�7����K��� r%c�*�tdD]O}|j|j|�}|��"tj||j
�|jd<ntd|jz��dD]�}t|D]O}|j|j|�}|��"tj||j
�|j|<�]|dk(r|jd|j|<��|jd|j|<��y)Nr�No usable fonts named: "%s"�rrrrr)�STYLESrQr.r
�truetyper/r0r()r;rJrPrK�	stylenames     r&r:zFontManager._create_nixbs����8�$�D��*�*�4�>�>�4�@�D���'0�'9�'9�$����'O��
�
�8�$��	%��<�#�~�~� .�/�
/�5�E�#�E�]�	��.�.�t�~�~�y�I���#�(1�(:�(:�4����(P�D�J�J�u�%��	+��L�(�(,�
�
�6�(:�D�J�J�u�%�(,�
�
�8�(<�D�J�J�u�%�6r%c�h�|j|dz|zj�j��S)N� )�getrI�lower)r;�font_maprJrKs    r&�_get_mac_font_pathzFontManager._get_mac_font_pathws,���|�|�T�C�Z�%�/�6�6�8�>�>�@�A�Ar%c���i}tjjtjd�d�ddfD]/�|j	�fd�tj
��D���1tdD]P}|j||j|�}|��#tj||j�|jd<ntd|jz��dD]�}t|D]P}|j||j|�}|��#tj||j�|j|<�^|d	k(r|jd
|j|<��|jd|j|<��y)N�HOMEzLibrary/Fonts/z/Library/Fonts/z/System/Library/Fonts/c3��K�|]s}|j�jd�rRtjj	|�dj�tjj�|�f���uy�w))�ttf�ttcrN)r[�endswith�osrP�splitext�join)�.0�f�font_dirs  �r&�	<genexpr>z*FontManager._create_mac.<locals>.<genexpr>~s^�����7�-�A��7�7�9�%�%�n�5����!�!�!�$�Q�'�-�-�/������h��1J�K�-�s�A9A<rrSrTrr)rdrPrf�getenv�update�listdirrUr]r.r
rVr/r0r()r;r\rJrPrKrWris      @r&r8zFontManager._create_maczsY����������b�i�i��&7�9I�J�*�,D�F�H��O�O�7����H�-�7�
7�F��8�$�D��*�*�8�T�^�^�T�J�D���'0�'9�'9�$����'O��
�
�8�$��	%��<�#�~�~� .�/�
/�5�E�#�E�]�	��.�.�x�����S���#�(1�(:�(:�4����(P�D�J�J�u�%��	+��L�(�(,�
�
�6�(:�D�J�J�u�%�(,�
�
�8�(<�D�J�J�u�%�6r%c���dD]7}|D]0}	|�|xrd|z�|��}tj||�\}}	|ccS�9|rtd|�d|d�d���y#t$rY�XwxYw)N)rz (TrueType)rYzFont z (rz) not found in registry)�_winreg�QueryValueEx�OSErrorr()
r;�key�basename�styles�fail�suffixrK�valname�valrMs
          r&�_lookup_winzFontManager._lookup_win�s���)�F����*2�E�4G�c�%�i�4G��P�G�$�1�1�#�w�?�F�C���J�	 �*��"�$,�f�Q�i�$9�:�:���
����s�)A�	A!� A!c��d}tjdftjdftjdftjdfg}|D�]}	tj|�}	|j	||j
tdd�}tj||j�|jd<dD]�}|j	||j
t|�}|r.tj||j�|j|<�W|dk(r|jd|j|<�y|jd|j|<��	tj|�y|r|�td��#t$r}|}Yd}~nd}~wwxYw	tj|�n#tj|�wxYw��v#t$rY���wxYw)	Nz2Software\Microsoft\Windows NT\CurrentVersion\Fontsz/Software\Microsoft\Windows\CurrentVersion\FontsrTrTrrz$Can't open Windows font registry key)ro�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�OpenKeyryr.rUr
rVr/r0�CloseKeyr(rq)r;�lookuperror�keynames�keynamerrrPrK�errs        r&r6zFontManager._create_win�s������/�/�1f�g��/�/�1c�d��0�0�2g�h��0�0�2d�e�h�� �G�
��o�o�w�/��*��+�+�C������AQ�SW�X�D�+4�+=�+=�d�D�N�N�+S�D�J�J�x�(�!A��#�/�/��T�^�^�V�E�]�S���09�0B�0B�4����0X�D�J�J�u�-�$��4�48�J�J�v�4F��
�
�5� 1�48�J�J�x�4H��
�
�5� 1�"B���$�$�S�)�' �:�!�!��F�G�G��$�&�"%�K��&����$�$�S�)��G�$�$�S�)��)���
��
�sO�G�#C+E6�G�6	F�?F�F%�F�F%�G�%F<�<G�	G�
Gc�$�|jd�S)z)
        Get the character size.
        �M)�
get_text_size�r;s r&�
get_char_sizezFontManager.get_char_size�s���!�!�#�&�&r%c��|jd}t|d�r|j|�ddS|j|�S)z4
        Get the text size (width, height).
        r�getbbox��)r0�hasattrr��getsize)r;�text�fonts   r&r�zFontManager.get_text_size�sA���z�z�(�#���4��#��<�<��%�a��*�*��<�<��%�%r%c��|r|r|jdS|r|jdS|r|jdS|jdS)z>
        Get the font based on bold and italic flags.
        rrrr)r0)r;�bold�obliques   r&�get_fontzFontManager.get_font�sK���G��:�:�l�+�+�
��:�:�f�%�%�
��:�:�h�'�'��:�:�h�'�'r%N)�)F)r r!r"r#r<rQr:r]r8ryr6r�r�r�r$r%r&r*r*=s<����$�=�*B�=�:
�%H�N'�&�(r%r*c��eZdZdZdZgd�ZdgZdZdZd�Z	dd�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)ra�	
    Create a PNG image from source code. This uses the Python Imaging Library to
    generate a pixmap from the source code.

    .. versionadded:: 0.10

    Additional options accepted:

    `image_format`
        An image format to output to that is recognised by PIL, these include:

        * "PNG" (default)
        * "JPEG"
        * "BMP"
        * "GIF"

    `line_pad`
        The extra spacing (in pixels) between each line of text.

        Default: 2

    `font_name`
        The font name to be used as the base font from which others, such as
        bold and italic fonts will be generated.  This really should be a
        monospace font to look sane.

        Default: "Courier New" on Windows, "Menlo" on Mac OS, and
                 "DejaVu Sans Mono" on \*nix

    `font_size`
        The font size in points to be used.

        Default: 14

    `image_pad`
        The padding, in pixels to be used at each edge of the resulting image.

        Default: 10

    `line_numbers`
        Whether line numbers should be shown: True/False

        Default: True

    `line_number_start`
        The line number of the first line.

        Default: 1

    `line_number_step`
        The step used when printing line numbers.

        Default: 1

    `line_number_bg`
        The background colour (in "#123456" format) of the line number bar, or
        None to use the style background color.

        Default: "#eed"

    `line_number_fg`
        The text color of the line numbers (in "#123456"-like format).

        Default: "#886"

    `line_number_chars`
        The number of columns of line numbers allowable in the line number
        margin.

        Default: 2

    `line_number_bold`
        Whether line numbers will be bold: True/False

        Default: False

    `line_number_italic`
        Whether line numbers will be italicized: True/False

        Default: False

    `line_number_separator`
        Whether a line will be drawn between the line number area and the
        source code area: True/False

        Default: True

    `line_number_pad`
        The horizontal padding (in pixels) between the line number margin, and
        the source code area.

        Default: 6

    `hl_lines`
        Specify a list of lines to be highlighted.

        .. versionadded:: 1.2

        Default: empty list

    `hl_color`
        Specify the color for highlighting lines.

        .. versionadded:: 1.2

        Default: highlight color of the selected style
    �img)r��IMG�pngz*.pngFr�c�D�tstd��tj|fi|��d|_t|j�|_|jj�d|_n|jj|_t|dgd�|jd��|_t|d	d
�|_
t|dd�|_t|d
d�}t|j!dd�|�|_|j"j%�\|_|_|j!dd�|_|j!dd�|_t|dd�|_t1|dd�|_t1|dd�|_t|dd�|_t1|dd�|_t1|dd�|_t|dd�|_t|dd�|_|j8r/|j&|j.z|j6dzz|_ nd |_ g|_!tE|d!g�}|D]'}	|jBjGtI|���)|j!d"|jjL�xsd#|_'g|_(y#tJ$rY�lwxYw)$zE
        See the class docstring for explanation of options.
        z5Python Imaging Library is required for this formatter�latin1Nz#fff�image_format)r��jpeg�gif�bmpT)�normcase�	image_pad�
�line_padr�r/r�r.r�line_number_fgz#886�line_number_bgz#eed�line_number_chars�line_number_boldF�line_number_italic�line_number_pad��line_numbers�line_number_separator�line_number_step��line_number_startr�hl_lines�hl_colorz#f90))�
pil_availablerrr<r1�dictrKrt�background_colorr�default_image_formatr�rr�r�r*rZr0r��fontw�fonthr�r�r�rr�r�r�r�r�r�r��line_number_widthr�r�append�int�
ValueError�highlight_colorr��	drawables)r;�options�fontsize�hl_lines_strrOs     r&r<zImageFormatter.__init__ast���!�G�I�
I����4�+�7�+� ��
��4�:�:�&����:�:�&�&�.�$*�D�!�$(�J�J�$?�$?�D�!�*��^�%B��%�%��6���%�W�k�2�>���#�G�Z��;��
��w��R�8�� ����[�"�!=�x�H��
�!%���!9�!9�!;���
�D�J�%�k�k�*:�F�C���%�k�k�*:�F�C���!,�W�-@�!�"E��� ,�W�-?��!H���".�w�/C�U�#L���*�7�4E�q�I���(��.�$�G���%1�'�2I�4�&Q��"� +�G�5G�� K���!,�W�6I�1�!M������&*�j�j�4�3I�3I�&I�&*�&:�&:�Q�&>�'?�D�"�&'�D�"���
�#�G�Z��<�� �D�
��
�
�$�$�S��Y�/�!�
 ���J�$(�J�J�$>�$>�@�J�CI�	
�
�����	�
��
�s�6$J�	J�Jc��td��)NzWThe -S option is meaningless for the image formatter. Use -O style=<stylename> instead.)�NotImplementedError)r;�args  r&�get_style_defszImageFormatter.get_style_defs�s��!�#Q�R�	Rr%c�4�|j|jzS)z+
        Get the height of a line.
        )r�r�r�s r&�_get_line_heightzImageFormatter._get_line_height�s���z�z�D�M�M�)�)r%c�B�||j�z|jzS)z8
        Get the Y coordinate of a line number.
        )r�r��r;�linenos  r&�_get_line_yzImageFormatter._get_line_y�s!����-�-�/�/�$�.�.�@�@r%c��|jS)z/
        Get the width of a character.
        )r�r�s r&�_get_char_widthzImageFormatter._get_char_width�s���z�z�r%c�:�||jz|jzS)z?
        Get the X coordinate of a character position.
        )r�r�)r;�
linelengths  r&�_get_char_xzImageFormatter._get_char_x�s���D�N�N�*�T�-C�-C�C�Cr%c�F�|j|�|j|�fS)zL
        Get the actual position for a character and line position.
        )r�r�)r;r�r�s   r&�
_get_text_poszImageFormatter._get_text_pos�s%�����
�+�T�-=�-=�f�-E�E�Er%c�<�|j|j|�fS)zI
        Get the actual position for the start of a line number.
        )r�r�r�s  r&�_get_linenumber_posz"ImageFormatter._get_linenumber_pos�s������ 0� 0�� 8�9�9r%c�(�|d�
d|dz}|Sd}|S)zE
        Get the correct color for the token from the style.
        �color�#z#000r$)r;rK�fills   r&�_get_text_colorzImageFormatter._get_text_color�s/����>�%���w��'�D����D��r%c�(�|d�
d|dz}|Sd}|S)zP
        Get the correct background color for the token from the style.
        �bgcolorNr�r$)r;rK�bg_colors   r&�_get_text_bg_colorz!ImageFormatter._get_text_bg_color�s1�����'��U�9�-�-�H����H��r%c�F�|jj|d|d�S)z5
        Get the correct font for the style.
        r��italic)r0r�)r;rKs  r&�_get_style_fontzImageFormatter._get_style_font�s#���z�z�"�"�5��=�%��/�B�Br%c��|j|�|jz|j|dz�|jzfS)z.
        Get the required image size.
        r)r�r�r�)r;�
maxlinelength�	maxlinenos   r&�_get_image_sizezImageFormatter._get_image_size�sB��� � ��/�$�.�.�@�� � ��Q��/�$�.�.�@�B�	Br%c��|j|j|�t|�j|j�|j
j
|j|j�|jd��y)zA
        Remember a line number drawable to paint later.
        N�r��text_fg�text_bg)
�
_draw_textr��str�rjustr�r0r�r�r�r�)r;�posnor�s   r&�_draw_linenumberzImageFormatter._draw_linenumber�sj��	
����$�$�U�+���K���d�4�4�5����$�$�T�%:�%:�%)�%<�%<�>��'�'��
	�	
r%c�D�|jj|||||f�y)zB
        Remember a single drawable tuple to paint later.
        N)r�r�)r;�posr�r�r�r�s      r&r�zImageFormatter._draw_text�s!��	
�����s�D�$���A�Br%c���dx}x}}dx}}|D�]=\}}||jvr|j}||jvr�|j|}	|jd�}|jd�}
t	|
�D]�\}}|jd�}
|
r�|j
|j||�|
|j|	�|j|	�|j|	���|jj|
�\}}||z
}t||�}|t|
�z
}t||�}|jd�s��d}d}|dz
}����@||_||_||_y)z9
        Create drawables for the token content.
        rr�T�
r�r�N)rt�parent�
expandtabsrG�	enumerate�rstripr�r�r�r�r�r0r��max�lenrcr��	maxcharnor�)r;�tokensourcer��charnor�r�r��ttype�valuerKrN�irO�temp�
temp_widthrMs                r&�_create_drawablesz ImageFormatter._create_drawables�sq��'(�'��'��)�%&�&�
�
�'�L�E�5��t�{�{�*������t�{�{�*��K�K��&�E��$�$�Q�'�E��$�$�T�*�E�$�U�+���4��{�{�4�(����O�O��*�*�:�v�>��#�3�3�E�:�"&�"6�"6�u�"=�"&�"9�"9�%�"@�$��%)�J�J�$<�$<�T�$B�M�J���*�,�J�$'�
�z�$B�M��c�$�i�'�F� #�I�v� 6�I��=�=��&�!"�J��F��a�K�F�',�(�<+���"�����r%c��|jsyt|j�D]6}||jz}||jzdk(s�%|j||��8y)z8
        Create drawables for the line numbers.
        Nr)r��ranger�r�r�r�)r;�p�ns   r&�_draw_line_numbersz!ImageFormatter._draw_line_numberssV��� � ���t�~�~�&�A��D�*�*�*�A��D�)�)�)�a�/��%�%�a��+�'r%c�n�|jsy|j�ytj|�}|jd}|j
|jz|jz
}|jd||fg|j��|jr#|j|df||fg|j��~y)z@
        Paint the line number background on the image.
        N���)rr�r�r)r�r�r	�Draw�sizer�r�r��	rectangler�r�rO)r;�im�draw�recth�rectws     r&�_paint_line_number_bgz$ImageFormatter._paint_line_number_bg(s���� � �����&���~�~�b�!������������!7�!7�7�$�:N�:N�N���������/� �/�/�	�	1��%�%��I�I��q�z�E�5�>�2��9L�9L�I�M�r%c	��|j|�|j�tjd|j	|j
|j�|j�}|j|�tj|�}|jr�|j|jz|jz
dz}|j�}|j d|z
}|jD]?}|j#|dz
�}	|j%||	f||z|	|zfg|j&���A|j(D]a\}
}}}
}|rB|j+||��}|j%|
d|
d|
d|dz|
d|dzg|��|j-|
|||
���c|j/||j0j3��y)a 
        Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
        tuples and write it into ``outfile``.

        This implementation calculates where it should draw each token on the
        pixmap, then calculates the required pixmap size and draws the items.
        �RGBr�rr)r�r�)r�r�N)r�rr�newr�r�r�r�rr	rr�r�r�r�r�rr�r	r�r��textsizer��saver��upper)r;r��outfiler
r�xrr
�
linenumber�yr�r�r�r�r��	text_sizes                r&�formatzImageFormatter.format9s���	
���{�+����!�
�Y�Y��� � ��!3�!3�T�^�^�D��!�!�
��
	
�"�"�2�&��~�~�b�!���=�=�����!7�!7�7�$�:N�:N�N�QR�R�A��)�)�+�E��G�G�A�J��N�E�"�m�m�
��$�$�Z�!�^�4������A���U��A��I�(>�?�$(�M�M��3�,�37�.�.�.�C���g�w�� �M�M�u�4�M�@�	�����A���A���A���1��0E�s�1�v�PY�Z[�P\�G\�]�dk��l��I�I�c�5�t�'�I�:�	3A�
	�����*�*�0�0�2�3r%N)r)r r!r"r#rJ�aliases�	filenames�
unicodeoutputr�r<r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr$r%r&rr�s���j�Z�D�#�G��	�I��M� ��6�pR�*�A��D�F�:���C�B�
�C�& �P	,��"4r%rc�$�eZdZdZdZdgZdgZdZy)rz�
    Create a GIF image from source code. This uses the Python Imaging Library to
    generate a pixmap from the source code.

    .. versionadded:: 1.0
    �img_gifr�z*.gifN�r r!r"r#rJrrr�r$r%r&rr^s"����D��g�G��	�I� �r%rc�&�eZdZdZdZddgZdgZdZy)r
z�
    Create a JPEG image from source code. This uses the Python Imaging Library to
    generate a pixmap from the source code.

    .. versionadded:: 1.0
    �img_jpg�jpgr�z*.jpgNr r$r%r&r
r
ls$����D��f�o�G��	�I�!�r%r
c�&�eZdZdZdZddgZdgZdZy)rz�
    Create a bitmap image from source code. This uses the Python Imaging Library to
    generate a pixmap from the source code.

    .. versionadded:: 1.0
    �img_bmpr��bitmapz*.bmpNr r$r%r&rrzs%����D��h��G��	�I� �r%r) r#rdr2�pip._vendor.pygments.formatterr�pip._vendor.pygments.utilrrrrrB�PILrr	r
r��ImportErrorro�winreg�__all__rUr9r5r7r�	Exceptionr(r*rrr
rr$r%r&�<module>r.s���
�
�4�����/�/��M��� ��G��h�'��(�!�=�1�	
��+��%����7�k�7�3�9�3�k(�k(�\m4�Y�m4�f!��!�"��"�!��!��E���M���
��� ���������sF�B�B%�B"�!B"�%C�+B0�/C�0B:�7C�9B:�:C�?Cpython3.12/site-packages/pip/_vendor/pygments/formatters/groff.py000064400000011746151732703060021063 0ustar00"""
    pygments.formatters.groff
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for groff output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import math
from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.util import get_bool_opt, get_int_opt

__all__ = ['GroffFormatter']


class GroffFormatter(Formatter):
    """
    Format tokens with groff escapes to change their color and font style.

    .. versionadded:: 2.11

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `monospaced`
        If set to true, monospace font will be used (default: ``true``).

    `linenos`
        If set to true, print the line numbers (default: ``false``).

    `wrap`
        Wrap lines to the specified number of characters. Disabled if set to 0
        (default: ``0``).
    """

    name = 'groff'
    aliases = ['groff','troff','roff']
    filenames = []

    def __init__(self, **options):
        Formatter.__init__(self, **options)

        self.monospaced = get_bool_opt(options, 'monospaced', True)
        self.linenos = get_bool_opt(options, 'linenos', False)
        self._lineno = 0
        self.wrap = get_int_opt(options, 'wrap', 0)
        self._linelen = 0

        self.styles = {}
        self._make_styles()


    def _make_styles(self):
        regular = '\\f[CR]' if self.monospaced else '\\f[R]'
        bold = '\\f[CB]' if self.monospaced else '\\f[B]'
        italic = '\\f[CI]' if self.monospaced else '\\f[I]'

        for ttype, ndef in self.style:
            start = end = ''
            if ndef['color']:
                start += '\\m[%s]' % ndef['color']
                end = '\\m[]' + end
            if ndef['bold']:
                start += bold
                end = regular + end
            if ndef['italic']:
                start += italic
                end = regular + end
            if ndef['bgcolor']:
                start += '\\M[%s]' % ndef['bgcolor']
                end = '\\M[]' + end

            self.styles[ttype] = start, end


    def _define_colors(self, outfile):
        colors = set()
        for _, ndef in self.style:
            if ndef['color'] is not None:
                colors.add(ndef['color'])

        for color in sorted(colors):
            outfile.write('.defcolor ' + color + ' rgb #' + color + '\n')


    def _write_lineno(self, outfile):
        self._lineno += 1
        outfile.write("%s% 4d " % (self._lineno != 1 and '\n' or '', self._lineno))


    def _wrap_line(self, line):
        length = len(line.rstrip('\n'))
        space = '     ' if self.linenos else ''
        newline = ''

        if length > self.wrap:
            for i in range(0, math.floor(length / self.wrap)):
                chunk = line[i*self.wrap:i*self.wrap+self.wrap]
                newline += (chunk + '\n' + space)
            remainder = length % self.wrap
            if remainder > 0:
                newline += line[-remainder-1:]
                self._linelen = remainder
        elif self._linelen + length > self.wrap:
            newline = ('\n' + space) + line
            self._linelen = length
        else:
            newline = line
            self._linelen += length

        return newline


    def _escape_chars(self, text):
        text = text.replace('\\', '\\[u005C]'). \
                    replace('.', '\\[char46]'). \
                    replace('\'', '\\[u0027]'). \
                    replace('`', '\\[u0060]'). \
                    replace('~', '\\[u007E]')
        copy = text

        for char in copy:
            if len(char) != len(char.encode()):
                uni = char.encode('unicode_escape') \
                    .decode()[1:] \
                    .replace('x', 'u00') \
                    .upper()
                text = text.replace(char, '\\[u' + uni[1:] + ']')

        return text


    def format_unencoded(self, tokensource, outfile):
        self._define_colors(outfile)

        outfile.write('.nf\n\\f[CR]\n')

        if self.linenos:
            self._write_lineno(outfile)

        for ttype, value in tokensource:
            while ttype not in self.styles:
                ttype = ttype.parent
            start, end = self.styles[ttype]

            for line in value.splitlines(True):
                if self.wrap > 0:
                    line = self._wrap_line(line)

                if start and end:
                    text = self._escape_chars(line.rstrip('\n'))
                    if text != '':
                        outfile.write(''.join((start, text, end)))
                else:
                    outfile.write(self._escape_chars(line.rstrip('\n')))

                if line.endswith('\n'):
                    if self.linenos:
                        self._write_lineno(outfile)
                        self._linelen = 0
                    else:
                        outfile.write('\n')
                        self._linelen = 0

        outfile.write('\n.fi')
python3.12/site-packages/pip/_vendor/pygments/formatters/img.py000064400000052662151732703060020536 0ustar00"""
    pygments.formatters.img
    ~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for Pixmap output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import os
import sys

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.util import get_bool_opt, get_int_opt, get_list_opt, \
    get_choice_opt

import subprocess

# Import this carefully
try:
    from PIL import Image, ImageDraw, ImageFont
    pil_available = True
except ImportError:
    pil_available = False

try:
    import _winreg
except ImportError:
    try:
        import winreg as _winreg
    except ImportError:
        _winreg = None

__all__ = ['ImageFormatter', 'GifImageFormatter', 'JpgImageFormatter',
           'BmpImageFormatter']


# For some unknown reason every font calls it something different
STYLES = {
    'NORMAL':     ['', 'Roman', 'Book', 'Normal', 'Regular', 'Medium'],
    'ITALIC':     ['Oblique', 'Italic'],
    'BOLD':       ['Bold'],
    'BOLDITALIC': ['Bold Oblique', 'Bold Italic'],
}

# A sane default for modern systems
DEFAULT_FONT_NAME_NIX = 'DejaVu Sans Mono'
DEFAULT_FONT_NAME_WIN = 'Courier New'
DEFAULT_FONT_NAME_MAC = 'Menlo'


class PilNotAvailable(ImportError):
    """When Python imaging library is not available"""


class FontNotFound(Exception):
    """When there are no usable fonts specified"""


class FontManager:
    """
    Manages a set of fonts: normal, italic, bold, etc...
    """

    def __init__(self, font_name, font_size=14):
        self.font_name = font_name
        self.font_size = font_size
        self.fonts = {}
        self.encoding = None
        if sys.platform.startswith('win'):
            if not font_name:
                self.font_name = DEFAULT_FONT_NAME_WIN
            self._create_win()
        elif sys.platform.startswith('darwin'):
            if not font_name:
                self.font_name = DEFAULT_FONT_NAME_MAC
            self._create_mac()
        else:
            if not font_name:
                self.font_name = DEFAULT_FONT_NAME_NIX
            self._create_nix()

    def _get_nix_font_path(self, name, style):
        proc = subprocess.Popen(['fc-list', "%s:style=%s" % (name, style), 'file'],
                                stdout=subprocess.PIPE, stderr=None)
        stdout, _ = proc.communicate()
        if proc.returncode == 0:
            lines = stdout.splitlines()
            for line in lines:
                if line.startswith(b'Fontconfig warning:'):
                    continue
                path = line.decode().strip().strip(':')
                if path:
                    return path
            return None

    def _create_nix(self):
        for name in STYLES['NORMAL']:
            path = self._get_nix_font_path(self.font_name, name)
            if path is not None:
                self.fonts['NORMAL'] = ImageFont.truetype(path, self.font_size)
                break
        else:
            raise FontNotFound('No usable fonts named: "%s"' %
                               self.font_name)
        for style in ('ITALIC', 'BOLD', 'BOLDITALIC'):
            for stylename in STYLES[style]:
                path = self._get_nix_font_path(self.font_name, stylename)
                if path is not None:
                    self.fonts[style] = ImageFont.truetype(path, self.font_size)
                    break
            else:
                if style == 'BOLDITALIC':
                    self.fonts[style] = self.fonts['BOLD']
                else:
                    self.fonts[style] = self.fonts['NORMAL']

    def _get_mac_font_path(self, font_map, name, style):
        return font_map.get((name + ' ' + style).strip().lower())

    def _create_mac(self):
        font_map = {}
        for font_dir in (os.path.join(os.getenv("HOME"), 'Library/Fonts/'),
                         '/Library/Fonts/', '/System/Library/Fonts/'):
            font_map.update(
                (os.path.splitext(f)[0].lower(), os.path.join(font_dir, f))
                for f in os.listdir(font_dir)
                if f.lower().endswith(('ttf', 'ttc')))

        for name in STYLES['NORMAL']:
            path = self._get_mac_font_path(font_map, self.font_name, name)
            if path is not None:
                self.fonts['NORMAL'] = ImageFont.truetype(path, self.font_size)
                break
        else:
            raise FontNotFound('No usable fonts named: "%s"' %
                               self.font_name)
        for style in ('ITALIC', 'BOLD', 'BOLDITALIC'):
            for stylename in STYLES[style]:
                path = self._get_mac_font_path(font_map, self.font_name, stylename)
                if path is not None:
                    self.fonts[style] = ImageFont.truetype(path, self.font_size)
                    break
            else:
                if style == 'BOLDITALIC':
                    self.fonts[style] = self.fonts['BOLD']
                else:
                    self.fonts[style] = self.fonts['NORMAL']

    def _lookup_win(self, key, basename, styles, fail=False):
        for suffix in ('', ' (TrueType)'):
            for style in styles:
                try:
                    valname = '%s%s%s' % (basename, style and ' '+style, suffix)
                    val, _ = _winreg.QueryValueEx(key, valname)
                    return val
                except OSError:
                    continue
        else:
            if fail:
                raise FontNotFound('Font %s (%s) not found in registry' %
                                   (basename, styles[0]))
            return None

    def _create_win(self):
        lookuperror = None
        keynames = [ (_winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Windows NT\CurrentVersion\Fonts'),
                     (_winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Windows\CurrentVersion\Fonts'),
                     (_winreg.HKEY_LOCAL_MACHINE, r'Software\Microsoft\Windows NT\CurrentVersion\Fonts'),
                     (_winreg.HKEY_LOCAL_MACHINE, r'Software\Microsoft\Windows\CurrentVersion\Fonts') ]
        for keyname in keynames:
            try:
                key = _winreg.OpenKey(*keyname)
                try:
                    path = self._lookup_win(key, self.font_name, STYLES['NORMAL'], True)
                    self.fonts['NORMAL'] = ImageFont.truetype(path, self.font_size)
                    for style in ('ITALIC', 'BOLD', 'BOLDITALIC'):
                        path = self._lookup_win(key, self.font_name, STYLES[style])
                        if path:
                            self.fonts[style] = ImageFont.truetype(path, self.font_size)
                        else:
                            if style == 'BOLDITALIC':
                                self.fonts[style] = self.fonts['BOLD']
                            else:
                                self.fonts[style] = self.fonts['NORMAL']
                    return
                except FontNotFound as err:
                    lookuperror = err
                finally:
                    _winreg.CloseKey(key)
            except OSError:
                pass
        else:
            # If we get here, we checked all registry keys and had no luck
            # We can be in one of two situations now:
            # * All key lookups failed. In this case lookuperror is None and we
            #   will raise a generic error
            # * At least one lookup failed with a FontNotFound error. In this
            #   case, we will raise that as a more specific error
            if lookuperror:
                raise lookuperror
            raise FontNotFound('Can\'t open Windows font registry key')

    def get_char_size(self):
        """
        Get the character size.
        """
        return self.get_text_size('M')

    def get_text_size(self, text):
        """
        Get the text size (width, height).
        """
        font = self.fonts['NORMAL']
        if hasattr(font, 'getbbox'):  # Pillow >= 9.2.0
            return font.getbbox(text)[2:4]
        else:
            return font.getsize(text)

    def get_font(self, bold, oblique):
        """
        Get the font based on bold and italic flags.
        """
        if bold and oblique:
            return self.fonts['BOLDITALIC']
        elif bold:
            return self.fonts['BOLD']
        elif oblique:
            return self.fonts['ITALIC']
        else:
            return self.fonts['NORMAL']


class ImageFormatter(Formatter):
    """
    Create a PNG image from source code. This uses the Python Imaging Library to
    generate a pixmap from the source code.

    .. versionadded:: 0.10

    Additional options accepted:

    `image_format`
        An image format to output to that is recognised by PIL, these include:

        * "PNG" (default)
        * "JPEG"
        * "BMP"
        * "GIF"

    `line_pad`
        The extra spacing (in pixels) between each line of text.

        Default: 2

    `font_name`
        The font name to be used as the base font from which others, such as
        bold and italic fonts will be generated.  This really should be a
        monospace font to look sane.

        Default: "Courier New" on Windows, "Menlo" on Mac OS, and
                 "DejaVu Sans Mono" on \\*nix

    `font_size`
        The font size in points to be used.

        Default: 14

    `image_pad`
        The padding, in pixels to be used at each edge of the resulting image.

        Default: 10

    `line_numbers`
        Whether line numbers should be shown: True/False

        Default: True

    `line_number_start`
        The line number of the first line.

        Default: 1

    `line_number_step`
        The step used when printing line numbers.

        Default: 1

    `line_number_bg`
        The background colour (in "#123456" format) of the line number bar, or
        None to use the style background color.

        Default: "#eed"

    `line_number_fg`
        The text color of the line numbers (in "#123456"-like format).

        Default: "#886"

    `line_number_chars`
        The number of columns of line numbers allowable in the line number
        margin.

        Default: 2

    `line_number_bold`
        Whether line numbers will be bold: True/False

        Default: False

    `line_number_italic`
        Whether line numbers will be italicized: True/False

        Default: False

    `line_number_separator`
        Whether a line will be drawn between the line number area and the
        source code area: True/False

        Default: True

    `line_number_pad`
        The horizontal padding (in pixels) between the line number margin, and
        the source code area.

        Default: 6

    `hl_lines`
        Specify a list of lines to be highlighted.

        .. versionadded:: 1.2

        Default: empty list

    `hl_color`
        Specify the color for highlighting lines.

        .. versionadded:: 1.2

        Default: highlight color of the selected style
    """

    # Required by the pygments mapper
    name = 'img'
    aliases = ['img', 'IMG', 'png']
    filenames = ['*.png']

    unicodeoutput = False

    default_image_format = 'png'

    def __init__(self, **options):
        """
        See the class docstring for explanation of options.
        """
        if not pil_available:
            raise PilNotAvailable(
                'Python Imaging Library is required for this formatter')
        Formatter.__init__(self, **options)
        self.encoding = 'latin1'  # let pygments.format() do the right thing
        # Read the style
        self.styles = dict(self.style)
        if self.style.background_color is None:
            self.background_color = '#fff'
        else:
            self.background_color = self.style.background_color
        # Image options
        self.image_format = get_choice_opt(
            options, 'image_format', ['png', 'jpeg', 'gif', 'bmp'],
            self.default_image_format, normcase=True)
        self.image_pad = get_int_opt(options, 'image_pad', 10)
        self.line_pad = get_int_opt(options, 'line_pad', 2)
        # The fonts
        fontsize = get_int_opt(options, 'font_size', 14)
        self.fonts = FontManager(options.get('font_name', ''), fontsize)
        self.fontw, self.fonth = self.fonts.get_char_size()
        # Line number options
        self.line_number_fg = options.get('line_number_fg', '#886')
        self.line_number_bg = options.get('line_number_bg', '#eed')
        self.line_number_chars = get_int_opt(options,
                                             'line_number_chars', 2)
        self.line_number_bold = get_bool_opt(options,
                                             'line_number_bold', False)
        self.line_number_italic = get_bool_opt(options,
                                               'line_number_italic', False)
        self.line_number_pad = get_int_opt(options, 'line_number_pad', 6)
        self.line_numbers = get_bool_opt(options, 'line_numbers', True)
        self.line_number_separator = get_bool_opt(options,
                                                  'line_number_separator', True)
        self.line_number_step = get_int_opt(options, 'line_number_step', 1)
        self.line_number_start = get_int_opt(options, 'line_number_start', 1)
        if self.line_numbers:
            self.line_number_width = (self.fontw * self.line_number_chars +
                                      self.line_number_pad * 2)
        else:
            self.line_number_width = 0
        self.hl_lines = []
        hl_lines_str = get_list_opt(options, 'hl_lines', [])
        for line in hl_lines_str:
            try:
                self.hl_lines.append(int(line))
            except ValueError:
                pass
        self.hl_color = options.get('hl_color',
                                    self.style.highlight_color) or '#f90'
        self.drawables = []

    def get_style_defs(self, arg=''):
        raise NotImplementedError('The -S option is meaningless for the image '
                                  'formatter. Use -O style=<stylename> instead.')

    def _get_line_height(self):
        """
        Get the height of a line.
        """
        return self.fonth + self.line_pad

    def _get_line_y(self, lineno):
        """
        Get the Y coordinate of a line number.
        """
        return lineno * self._get_line_height() + self.image_pad

    def _get_char_width(self):
        """
        Get the width of a character.
        """
        return self.fontw

    def _get_char_x(self, linelength):
        """
        Get the X coordinate of a character position.
        """
        return linelength + self.image_pad + self.line_number_width

    def _get_text_pos(self, linelength, lineno):
        """
        Get the actual position for a character and line position.
        """
        return self._get_char_x(linelength), self._get_line_y(lineno)

    def _get_linenumber_pos(self, lineno):
        """
        Get the actual position for the start of a line number.
        """
        return (self.image_pad, self._get_line_y(lineno))

    def _get_text_color(self, style):
        """
        Get the correct color for the token from the style.
        """
        if style['color'] is not None:
            fill = '#' + style['color']
        else:
            fill = '#000'
        return fill

    def _get_text_bg_color(self, style):
        """
        Get the correct background color for the token from the style.
        """
        if style['bgcolor'] is not None:
            bg_color = '#' + style['bgcolor']
        else:
            bg_color = None
        return bg_color

    def _get_style_font(self, style):
        """
        Get the correct font for the style.
        """
        return self.fonts.get_font(style['bold'], style['italic'])

    def _get_image_size(self, maxlinelength, maxlineno):
        """
        Get the required image size.
        """
        return (self._get_char_x(maxlinelength) + self.image_pad,
                self._get_line_y(maxlineno + 0) + self.image_pad)

    def _draw_linenumber(self, posno, lineno):
        """
        Remember a line number drawable to paint later.
        """
        self._draw_text(
            self._get_linenumber_pos(posno),
            str(lineno).rjust(self.line_number_chars),
            font=self.fonts.get_font(self.line_number_bold,
                                     self.line_number_italic),
            text_fg=self.line_number_fg,
            text_bg=None,
        )

    def _draw_text(self, pos, text, font, text_fg, text_bg):
        """
        Remember a single drawable tuple to paint later.
        """
        self.drawables.append((pos, text, font, text_fg, text_bg))

    def _create_drawables(self, tokensource):
        """
        Create drawables for the token content.
        """
        lineno = charno = maxcharno = 0
        maxlinelength = linelength = 0
        for ttype, value in tokensource:
            while ttype not in self.styles:
                ttype = ttype.parent
            style = self.styles[ttype]
            # TODO: make sure tab expansion happens earlier in the chain.  It
            # really ought to be done on the input, as to do it right here is
            # quite complex.
            value = value.expandtabs(4)
            lines = value.splitlines(True)
            # print lines
            for i, line in enumerate(lines):
                temp = line.rstrip('\n')
                if temp:
                    self._draw_text(
                        self._get_text_pos(linelength, lineno),
                        temp,
                        font = self._get_style_font(style),
                        text_fg = self._get_text_color(style),
                        text_bg = self._get_text_bg_color(style),
                    )
                    temp_width, _ = self.fonts.get_text_size(temp)
                    linelength += temp_width
                    maxlinelength = max(maxlinelength, linelength)
                    charno += len(temp)
                    maxcharno = max(maxcharno, charno)
                if line.endswith('\n'):
                    # add a line for each extra line in the value
                    linelength = 0
                    charno = 0
                    lineno += 1
        self.maxlinelength = maxlinelength
        self.maxcharno = maxcharno
        self.maxlineno = lineno

    def _draw_line_numbers(self):
        """
        Create drawables for the line numbers.
        """
        if not self.line_numbers:
            return
        for p in range(self.maxlineno):
            n = p + self.line_number_start
            if (n % self.line_number_step) == 0:
                self._draw_linenumber(p, n)

    def _paint_line_number_bg(self, im):
        """
        Paint the line number background on the image.
        """
        if not self.line_numbers:
            return
        if self.line_number_fg is None:
            return
        draw = ImageDraw.Draw(im)
        recth = im.size[-1]
        rectw = self.image_pad + self.line_number_width - self.line_number_pad
        draw.rectangle([(0, 0), (rectw, recth)],
                       fill=self.line_number_bg)
        if self.line_number_separator:
            draw.line([(rectw, 0), (rectw, recth)], fill=self.line_number_fg)
        del draw

    def format(self, tokensource, outfile):
        """
        Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
        tuples and write it into ``outfile``.

        This implementation calculates where it should draw each token on the
        pixmap, then calculates the required pixmap size and draws the items.
        """
        self._create_drawables(tokensource)
        self._draw_line_numbers()
        im = Image.new(
            'RGB',
            self._get_image_size(self.maxlinelength, self.maxlineno),
            self.background_color
        )
        self._paint_line_number_bg(im)
        draw = ImageDraw.Draw(im)
        # Highlight
        if self.hl_lines:
            x = self.image_pad + self.line_number_width - self.line_number_pad + 1
            recth = self._get_line_height()
            rectw = im.size[0] - x
            for linenumber in self.hl_lines:
                y = self._get_line_y(linenumber - 1)
                draw.rectangle([(x, y), (x + rectw, y + recth)],
                               fill=self.hl_color)
        for pos, value, font, text_fg, text_bg in self.drawables:
            if text_bg:
                text_size = draw.textsize(text=value, font=font)
                draw.rectangle([pos[0], pos[1], pos[0] + text_size[0], pos[1] + text_size[1]], fill=text_bg)
            draw.text(pos, value, font=font, fill=text_fg)
        im.save(outfile, self.image_format.upper())


# Add one formatter per format, so that the "-f gif" option gives the correct result
# when used in pygmentize.

class GifImageFormatter(ImageFormatter):
    """
    Create a GIF image from source code. This uses the Python Imaging Library to
    generate a pixmap from the source code.

    .. versionadded:: 1.0
    """

    name = 'img_gif'
    aliases = ['gif']
    filenames = ['*.gif']
    default_image_format = 'gif'


class JpgImageFormatter(ImageFormatter):
    """
    Create a JPEG image from source code. This uses the Python Imaging Library to
    generate a pixmap from the source code.

    .. versionadded:: 1.0
    """

    name = 'img_jpg'
    aliases = ['jpg', 'jpeg']
    filenames = ['*.jpg']
    default_image_format = 'jpeg'


class BmpImageFormatter(ImageFormatter):
    """
    Create a bitmap image from source code. This uses the Python Imaging Library to
    generate a pixmap from the source code.

    .. versionadded:: 1.0
    """

    name = 'img_bmp'
    aliases = ['bmp', 'bitmap']
    filenames = ['*.bmp']
    default_image_format = 'bmp'
python3.12/site-packages/pip/_vendor/pygments/formatters/terminal256.py000064400000026751151732703060022032 0ustar00"""
    pygments.formatters.terminal256
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for 256-color terminal output with ANSI sequences.

    RGB-to-XTERM color conversion routines adapted from xterm256-conv
    tool (http://frexx.de/xterm-256-notes/data/xterm256-conv2.tar.bz2)
    by Wolfgang Frisch.

    Formatter version 1.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

# TODO:
#  - Options to map style's bold/underline/italic/border attributes
#    to some ANSI attrbutes (something like 'italic=underline')
#  - An option to output "style RGB to xterm RGB/index" conversion table
#  - An option to indicate that we are running in "reverse background"
#    xterm. This means that default colors are white-on-black, not
#    black-on-while, so colors like "white background" need to be converted
#    to "white background, black foreground", etc...

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.console import codes
from pip._vendor.pygments.style import ansicolors


__all__ = ['Terminal256Formatter', 'TerminalTrueColorFormatter']


class EscapeSequence:
    def __init__(self, fg=None, bg=None, bold=False, underline=False, italic=False):
        self.fg = fg
        self.bg = bg
        self.bold = bold
        self.underline = underline
        self.italic = italic

    def escape(self, attrs):
        if len(attrs):
            return "\x1b[" + ";".join(attrs) + "m"
        return ""

    def color_string(self):
        attrs = []
        if self.fg is not None:
            if self.fg in ansicolors:
                esc = codes[self.fg.replace('ansi','')]
                if ';01m' in esc:
                    self.bold = True
                # extract fg color code.
                attrs.append(esc[2:4])
            else:
                attrs.extend(("38", "5", "%i" % self.fg))
        if self.bg is not None:
            if self.bg in ansicolors:
                esc = codes[self.bg.replace('ansi','')]
                # extract fg color code, add 10 for bg.
                attrs.append(str(int(esc[2:4])+10))
            else:
                attrs.extend(("48", "5", "%i" % self.bg))
        if self.bold:
            attrs.append("01")
        if self.underline:
            attrs.append("04")
        if self.italic:
            attrs.append("03")
        return self.escape(attrs)

    def true_color_string(self):
        attrs = []
        if self.fg:
            attrs.extend(("38", "2", str(self.fg[0]), str(self.fg[1]), str(self.fg[2])))
        if self.bg:
            attrs.extend(("48", "2", str(self.bg[0]), str(self.bg[1]), str(self.bg[2])))
        if self.bold:
            attrs.append("01")
        if self.underline:
            attrs.append("04")
        if self.italic:
            attrs.append("03")
        return self.escape(attrs)

    def reset_string(self):
        attrs = []
        if self.fg is not None:
            attrs.append("39")
        if self.bg is not None:
            attrs.append("49")
        if self.bold or self.underline or self.italic:
            attrs.append("00")
        return self.escape(attrs)


class Terminal256Formatter(Formatter):
    """
    Format tokens with ANSI color sequences, for output in a 256-color
    terminal or console.  Like in `TerminalFormatter` color sequences
    are terminated at newlines, so that paging the output works correctly.

    The formatter takes colors from a style defined by the `style` option
    and converts them to nearest ANSI 256-color escape sequences. Bold and
    underline attributes from the style are preserved (and displayed).

    .. versionadded:: 0.9

    .. versionchanged:: 2.2
       If the used style defines foreground colors in the form ``#ansi*``, then
       `Terminal256Formatter` will map these to non extended foreground color.
       See :ref:`AnsiTerminalStyle` for more information.

    .. versionchanged:: 2.4
       The ANSI color names have been updated with names that are easier to
       understand and align with colornames of other projects and terminals.
       See :ref:`this table <new-ansi-color-names>` for more information.


    Options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `linenos`
        Set to ``True`` to have line numbers on the terminal output as well
        (default: ``False`` = no line numbers).
    """
    name = 'Terminal256'
    aliases = ['terminal256', 'console256', '256']
    filenames = []

    def __init__(self, **options):
        Formatter.__init__(self, **options)

        self.xterm_colors = []
        self.best_match = {}
        self.style_string = {}

        self.usebold = 'nobold' not in options
        self.useunderline = 'nounderline' not in options
        self.useitalic = 'noitalic' not in options

        self._build_color_table()  # build an RGB-to-256 color conversion table
        self._setup_styles()  # convert selected style's colors to term. colors

        self.linenos = options.get('linenos', False)
        self._lineno = 0

    def _build_color_table(self):
        # colors 0..15: 16 basic colors

        self.xterm_colors.append((0x00, 0x00, 0x00))  # 0
        self.xterm_colors.append((0xcd, 0x00, 0x00))  # 1
        self.xterm_colors.append((0x00, 0xcd, 0x00))  # 2
        self.xterm_colors.append((0xcd, 0xcd, 0x00))  # 3
        self.xterm_colors.append((0x00, 0x00, 0xee))  # 4
        self.xterm_colors.append((0xcd, 0x00, 0xcd))  # 5
        self.xterm_colors.append((0x00, 0xcd, 0xcd))  # 6
        self.xterm_colors.append((0xe5, 0xe5, 0xe5))  # 7
        self.xterm_colors.append((0x7f, 0x7f, 0x7f))  # 8
        self.xterm_colors.append((0xff, 0x00, 0x00))  # 9
        self.xterm_colors.append((0x00, 0xff, 0x00))  # 10
        self.xterm_colors.append((0xff, 0xff, 0x00))  # 11
        self.xterm_colors.append((0x5c, 0x5c, 0xff))  # 12
        self.xterm_colors.append((0xff, 0x00, 0xff))  # 13
        self.xterm_colors.append((0x00, 0xff, 0xff))  # 14
        self.xterm_colors.append((0xff, 0xff, 0xff))  # 15

        # colors 16..232: the 6x6x6 color cube

        valuerange = (0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff)

        for i in range(217):
            r = valuerange[(i // 36) % 6]
            g = valuerange[(i // 6) % 6]
            b = valuerange[i % 6]
            self.xterm_colors.append((r, g, b))

        # colors 233..253: grayscale

        for i in range(1, 22):
            v = 8 + i * 10
            self.xterm_colors.append((v, v, v))

    def _closest_color(self, r, g, b):
        distance = 257*257*3  # "infinity" (>distance from #000000 to #ffffff)
        match = 0

        for i in range(0, 254):
            values = self.xterm_colors[i]

            rd = r - values[0]
            gd = g - values[1]
            bd = b - values[2]
            d = rd*rd + gd*gd + bd*bd

            if d < distance:
                match = i
                distance = d
        return match

    def _color_index(self, color):
        index = self.best_match.get(color, None)
        if color in ansicolors:
            # strip the `ansi/#ansi` part and look up code
            index = color
            self.best_match[color] = index
        if index is None:
            try:
                rgb = int(str(color), 16)
            except ValueError:
                rgb = 0

            r = (rgb >> 16) & 0xff
            g = (rgb >> 8) & 0xff
            b = rgb & 0xff
            index = self._closest_color(r, g, b)
            self.best_match[color] = index
        return index

    def _setup_styles(self):
        for ttype, ndef in self.style:
            escape = EscapeSequence()
            # get foreground from ansicolor if set
            if ndef['ansicolor']:
                escape.fg = self._color_index(ndef['ansicolor'])
            elif ndef['color']:
                escape.fg = self._color_index(ndef['color'])
            if ndef['bgansicolor']:
                escape.bg = self._color_index(ndef['bgansicolor'])
            elif ndef['bgcolor']:
                escape.bg = self._color_index(ndef['bgcolor'])
            if self.usebold and ndef['bold']:
                escape.bold = True
            if self.useunderline and ndef['underline']:
                escape.underline = True
            if self.useitalic and ndef['italic']:
                escape.italic = True
            self.style_string[str(ttype)] = (escape.color_string(),
                                             escape.reset_string())

    def _write_lineno(self, outfile):
        self._lineno += 1
        outfile.write("%s%04d: " % (self._lineno != 1 and '\n' or '', self._lineno))

    def format(self, tokensource, outfile):
        return Formatter.format(self, tokensource, outfile)

    def format_unencoded(self, tokensource, outfile):
        if self.linenos:
            self._write_lineno(outfile)

        for ttype, value in tokensource:
            not_found = True
            while ttype and not_found:
                try:
                    # outfile.write( "<" + str(ttype) + ">" )
                    on, off = self.style_string[str(ttype)]

                    # Like TerminalFormatter, add "reset colors" escape sequence
                    # on newline.
                    spl = value.split('\n')
                    for line in spl[:-1]:
                        if line:
                            outfile.write(on + line + off)
                        if self.linenos:
                            self._write_lineno(outfile)
                        else:
                            outfile.write('\n')

                    if spl[-1]:
                        outfile.write(on + spl[-1] + off)

                    not_found = False
                    # outfile.write( '#' + str(ttype) + '#' )

                except KeyError:
                    # ottype = ttype
                    ttype = ttype.parent
                    # outfile.write( '!' + str(ottype) + '->' + str(ttype) + '!' )

            if not_found:
                outfile.write(value)

        if self.linenos:
            outfile.write("\n")



class TerminalTrueColorFormatter(Terminal256Formatter):
    r"""
    Format tokens with ANSI color sequences, for output in a true-color
    terminal or console.  Like in `TerminalFormatter` color sequences
    are terminated at newlines, so that paging the output works correctly.

    .. versionadded:: 2.1

    Options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).
    """
    name = 'TerminalTrueColor'
    aliases = ['terminal16m', 'console16m', '16m']
    filenames = []

    def _build_color_table(self):
        pass

    def _color_tuple(self, color):
        try:
            rgb = int(str(color), 16)
        except ValueError:
            return None
        r = (rgb >> 16) & 0xff
        g = (rgb >> 8) & 0xff
        b = rgb & 0xff
        return (r, g, b)

    def _setup_styles(self):
        for ttype, ndef in self.style:
            escape = EscapeSequence()
            if ndef['color']:
                escape.fg = self._color_tuple(ndef['color'])
            if ndef['bgcolor']:
                escape.bg = self._color_tuple(ndef['bgcolor'])
            if self.usebold and ndef['bold']:
                escape.bold = True
            if self.useunderline and ndef['underline']:
                escape.underline = True
            if self.useitalic and ndef['italic']:
                escape.italic = True
            self.style_string[str(ttype)] = (escape.true_color_string(),
                                             escape.reset_string())
python3.12/site-packages/pip/_vendor/pygments/formatters/_mapping.py000064400000010120151732703070021534 0ustar00# Automatically generated by scripts/gen_mapfiles.py.
# DO NOT EDIT BY HAND; run `tox -e mapfiles` instead.

FORMATTERS = {
    'BBCodeFormatter': ('pygments.formatters.bbcode', 'BBCode', ('bbcode', 'bb'), (), 'Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight your sourcecode with pygments before posting it there.'),
    'BmpImageFormatter': ('pygments.formatters.img', 'img_bmp', ('bmp', 'bitmap'), ('*.bmp',), 'Create a bitmap image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'),
    'GifImageFormatter': ('pygments.formatters.img', 'img_gif', ('gif',), ('*.gif',), 'Create a GIF image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'),
    'GroffFormatter': ('pygments.formatters.groff', 'groff', ('groff', 'troff', 'roff'), (), 'Format tokens with groff escapes to change their color and font style.'),
    'HtmlFormatter': ('pygments.formatters.html', 'HTML', ('html',), ('*.html', '*.htm'), "Format tokens as HTML 4 ``<span>`` tags. By default, the content is enclosed in a ``<pre>`` tag, itself wrapped in a ``<div>`` tag (but see the `nowrap` option). The ``<div>``'s CSS class can be set by the `cssclass` option."),
    'IRCFormatter': ('pygments.formatters.irc', 'IRC', ('irc', 'IRC'), (), 'Format tokens with IRC color sequences'),
    'ImageFormatter': ('pygments.formatters.img', 'img', ('img', 'IMG', 'png'), ('*.png',), 'Create a PNG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'),
    'JpgImageFormatter': ('pygments.formatters.img', 'img_jpg', ('jpg', 'jpeg'), ('*.jpg',), 'Create a JPEG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'),
    'LatexFormatter': ('pygments.formatters.latex', 'LaTeX', ('latex', 'tex'), ('*.tex',), 'Format tokens as LaTeX code. This needs the `fancyvrb` and `color` standard packages.'),
    'NullFormatter': ('pygments.formatters.other', 'Text only', ('text', 'null'), ('*.txt',), 'Output the text unchanged without any formatting.'),
    'PangoMarkupFormatter': ('pygments.formatters.pangomarkup', 'Pango Markup', ('pango', 'pangomarkup'), (), 'Format tokens as Pango Markup code. It can then be rendered to an SVG.'),
    'RawTokenFormatter': ('pygments.formatters.other', 'Raw tokens', ('raw', 'tokens'), ('*.raw',), 'Format tokens as a raw representation for storing token streams.'),
    'RtfFormatter': ('pygments.formatters.rtf', 'RTF', ('rtf',), ('*.rtf',), 'Format tokens as RTF markup. This formatter automatically outputs full RTF documents with color information and other useful stuff. Perfect for Copy and Paste into Microsoft(R) Word(R) documents.'),
    'SvgFormatter': ('pygments.formatters.svg', 'SVG', ('svg',), ('*.svg',), 'Format tokens as an SVG graphics file.  This formatter is still experimental. Each line of code is a ``<text>`` element with explicit ``x`` and ``y`` coordinates containing ``<tspan>`` elements with the individual token styles.'),
    'Terminal256Formatter': ('pygments.formatters.terminal256', 'Terminal256', ('terminal256', 'console256', '256'), (), 'Format tokens with ANSI color sequences, for output in a 256-color terminal or console.  Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.'),
    'TerminalFormatter': ('pygments.formatters.terminal', 'Terminal', ('terminal', 'console'), (), 'Format tokens with ANSI color sequences, for output in a text console. Color sequences are terminated at newlines, so that paging the output works correctly.'),
    'TerminalTrueColorFormatter': ('pygments.formatters.terminal256', 'TerminalTrueColor', ('terminal16m', 'console16m', '16m'), (), 'Format tokens with ANSI color sequences, for output in a true-color terminal or console.  Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.'),
    'TestcaseFormatter': ('pygments.formatters.other', 'Testcase', ('testcase',), (), 'Format tokens as appropriate for a new testcase.'),
}
python3.12/site-packages/pip/_vendor/pygments/formatters/__init__.py000064400000012460151732703070021512 0ustar00"""
    pygments.formatters
    ~~~~~~~~~~~~~~~~~~~

    Pygments formatters.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re
import sys
import types
import fnmatch
from os.path import basename

from pip._vendor.pygments.formatters._mapping import FORMATTERS
from pip._vendor.pygments.plugin import find_plugin_formatters
from pip._vendor.pygments.util import ClassNotFound

__all__ = ['get_formatter_by_name', 'get_formatter_for_filename',
           'get_all_formatters', 'load_formatter_from_file'] + list(FORMATTERS)

_formatter_cache = {}  # classes by name
_pattern_cache = {}


def _fn_matches(fn, glob):
    """Return whether the supplied file name fn matches pattern filename."""
    if glob not in _pattern_cache:
        pattern = _pattern_cache[glob] = re.compile(fnmatch.translate(glob))
        return pattern.match(fn)
    return _pattern_cache[glob].match(fn)


def _load_formatters(module_name):
    """Load a formatter (and all others in the module too)."""
    mod = __import__(module_name, None, None, ['__all__'])
    for formatter_name in mod.__all__:
        cls = getattr(mod, formatter_name)
        _formatter_cache[cls.name] = cls


def get_all_formatters():
    """Return a generator for all formatter classes."""
    # NB: this returns formatter classes, not info like get_all_lexers().
    for info in FORMATTERS.values():
        if info[1] not in _formatter_cache:
            _load_formatters(info[0])
        yield _formatter_cache[info[1]]
    for _, formatter in find_plugin_formatters():
        yield formatter


def find_formatter_class(alias):
    """Lookup a formatter by alias.

    Returns None if not found.
    """
    for module_name, name, aliases, _, _ in FORMATTERS.values():
        if alias in aliases:
            if name not in _formatter_cache:
                _load_formatters(module_name)
            return _formatter_cache[name]
    for _, cls in find_plugin_formatters():
        if alias in cls.aliases:
            return cls


def get_formatter_by_name(_alias, **options):
    """
    Return an instance of a :class:`.Formatter` subclass that has `alias` in its
    aliases list. The formatter is given the `options` at its instantiation.

    Will raise :exc:`pygments.util.ClassNotFound` if no formatter with that
    alias is found.
    """
    cls = find_formatter_class(_alias)
    if cls is None:
        raise ClassNotFound("no formatter found for name %r" % _alias)
    return cls(**options)


def load_formatter_from_file(filename, formattername="CustomFormatter", **options):
    """
    Return a `Formatter` subclass instance loaded from the provided file, relative
    to the current directory.

    The file is expected to contain a Formatter class named ``formattername``
    (by default, CustomFormatter). Users should be very careful with the input, because
    this method is equivalent to running ``eval()`` on the input file. The formatter is
    given the `options` at its instantiation.

    :exc:`pygments.util.ClassNotFound` is raised if there are any errors loading
    the formatter.

    .. versionadded:: 2.2
    """
    try:
        # This empty dict will contain the namespace for the exec'd file
        custom_namespace = {}
        with open(filename, 'rb') as f:
            exec(f.read(), custom_namespace)
        # Retrieve the class `formattername` from that namespace
        if formattername not in custom_namespace:
            raise ClassNotFound('no valid %s class found in %s' %
                                (formattername, filename))
        formatter_class = custom_namespace[formattername]
        # And finally instantiate it with the options
        return formatter_class(**options)
    except OSError as err:
        raise ClassNotFound('cannot read %s: %s' % (filename, err))
    except ClassNotFound:
        raise
    except Exception as err:
        raise ClassNotFound('error when loading custom formatter: %s' % err)


def get_formatter_for_filename(fn, **options):
    """
    Return a :class:`.Formatter` subclass instance that has a filename pattern
    matching `fn`. The formatter is given the `options` at its instantiation.

    Will raise :exc:`pygments.util.ClassNotFound` if no formatter for that filename
    is found.
    """
    fn = basename(fn)
    for modname, name, _, filenames, _ in FORMATTERS.values():
        for filename in filenames:
            if _fn_matches(fn, filename):
                if name not in _formatter_cache:
                    _load_formatters(modname)
                return _formatter_cache[name](**options)
    for cls in find_plugin_formatters():
        for filename in cls.filenames:
            if _fn_matches(fn, filename):
                return cls(**options)
    raise ClassNotFound("no formatter found for file name %r" % fn)


class _automodule(types.ModuleType):
    """Automatically import formatters."""

    def __getattr__(self, name):
        info = FORMATTERS.get(name)
        if info:
            _load_formatters(info[0])
            cls = _formatter_cache[info[1]]
            setattr(self, name, cls)
            return cls
        raise AttributeError(name)


oldmod = sys.modules[__name__]
newmod = _automodule(__name__)
newmod.__dict__.update(oldmod.__dict__)
sys.modules[__name__] = newmod
del newmod.newmod, newmod.oldmod, newmod.sys, newmod.types
python3.12/site-packages/pip/_vendor/pygments/formatters/svg.py000064400000016247151732703070020561 0ustar00"""
    pygments.formatters.svg
    ~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for SVG output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.token import Comment
from pip._vendor.pygments.util import get_bool_opt, get_int_opt

__all__ = ['SvgFormatter']


def escape_html(text):
    """Escape &, <, > as well as single and double quotes for HTML."""
    return text.replace('&', '&amp;').  \
                replace('<', '&lt;').   \
                replace('>', '&gt;').   \
                replace('"', '&quot;'). \
                replace("'", '&#39;')


class2style = {}

class SvgFormatter(Formatter):
    """
    Format tokens as an SVG graphics file.  This formatter is still experimental.
    Each line of code is a ``<text>`` element with explicit ``x`` and ``y``
    coordinates containing ``<tspan>`` elements with the individual token styles.

    By default, this formatter outputs a full SVG document including doctype
    declaration and the ``<svg>`` root element.

    .. versionadded:: 0.9

    Additional options accepted:

    `nowrap`
        Don't wrap the SVG ``<text>`` elements in ``<svg><g>`` elements and
        don't add a XML declaration and a doctype.  If true, the `fontfamily`
        and `fontsize` options are ignored.  Defaults to ``False``.

    `fontfamily`
        The value to give the wrapping ``<g>`` element's ``font-family``
        attribute, defaults to ``"monospace"``.

    `fontsize`
        The value to give the wrapping ``<g>`` element's ``font-size``
        attribute, defaults to ``"14px"``.

    `linenos`
        If ``True``, add line numbers (default: ``False``).

    `linenostart`
        The line number for the first line (default: ``1``).

    `linenostep`
        If set to a number n > 1, only every nth line number is printed.
        
    `linenowidth`
        Maximum width devoted to line numbers (default: ``3*ystep``, sufficient
        for up to 4-digit line numbers. Increase width for longer code blocks).  
        
    `xoffset`
        Starting offset in X direction, defaults to ``0``.

    `yoffset`
        Starting offset in Y direction, defaults to the font size if it is given
        in pixels, or ``20`` else.  (This is necessary since text coordinates
        refer to the text baseline, not the top edge.)

    `ystep`
        Offset to add to the Y coordinate for each subsequent line.  This should
        roughly be the text size plus 5.  It defaults to that value if the text
        size is given in pixels, or ``25`` else.

    `spacehack`
        Convert spaces in the source to ``&#160;``, which are non-breaking
        spaces.  SVG provides the ``xml:space`` attribute to control how
        whitespace inside tags is handled, in theory, the ``preserve`` value
        could be used to keep all whitespace as-is.  However, many current SVG
        viewers don't obey that rule, so this option is provided as a workaround
        and defaults to ``True``.
    """
    name = 'SVG'
    aliases = ['svg']
    filenames = ['*.svg']

    def __init__(self, **options):
        Formatter.__init__(self, **options)
        self.nowrap = get_bool_opt(options, 'nowrap', False)
        self.fontfamily = options.get('fontfamily', 'monospace')
        self.fontsize = options.get('fontsize', '14px')
        self.xoffset = get_int_opt(options, 'xoffset', 0)
        fs = self.fontsize.strip()
        if fs.endswith('px'): fs = fs[:-2].strip()
        try:
            int_fs = int(fs)
        except:
            int_fs = 20
        self.yoffset = get_int_opt(options, 'yoffset', int_fs)
        self.ystep = get_int_opt(options, 'ystep', int_fs + 5)
        self.spacehack = get_bool_opt(options, 'spacehack', True)
        self.linenos = get_bool_opt(options,'linenos',False)
        self.linenostart = get_int_opt(options,'linenostart',1)
        self.linenostep = get_int_opt(options,'linenostep',1)
        self.linenowidth = get_int_opt(options,'linenowidth', 3*self.ystep)
        self._stylecache = {}

    def format_unencoded(self, tokensource, outfile):
        """
        Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
        tuples and write it into ``outfile``.

        For our implementation we put all lines in their own 'line group'.
        """
        x = self.xoffset
        y = self.yoffset
        if not self.nowrap:
            if self.encoding:
                outfile.write('<?xml version="1.0" encoding="%s"?>\n' %
                              self.encoding)
            else:
                outfile.write('<?xml version="1.0"?>\n')
            outfile.write('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" '
                          '"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/'
                          'svg10.dtd">\n')
            outfile.write('<svg xmlns="http://www.w3.org/2000/svg">\n')
            outfile.write('<g font-family="%s" font-size="%s">\n' %
                          (self.fontfamily, self.fontsize))
        
        counter = self.linenostart 
        counter_step = self.linenostep
        counter_style = self._get_style(Comment)
        line_x = x
        
        if self.linenos:
            if counter % counter_step == 0:
                outfile.write('<text x="%s" y="%s" %s text-anchor="end">%s</text>' %
                    (x+self.linenowidth,y,counter_style,counter))
            line_x += self.linenowidth + self.ystep
            counter += 1

        outfile.write('<text x="%s" y="%s" xml:space="preserve">' % (line_x, y))
        for ttype, value in tokensource:
            style = self._get_style(ttype)
            tspan = style and '<tspan' + style + '>' or ''
            tspanend = tspan and '</tspan>' or ''
            value = escape_html(value)
            if self.spacehack:
                value = value.expandtabs().replace(' ', '&#160;')
            parts = value.split('\n')
            for part in parts[:-1]:
                outfile.write(tspan + part + tspanend)
                y += self.ystep
                outfile.write('</text>\n')
                if self.linenos and counter % counter_step == 0:
                    outfile.write('<text x="%s" y="%s" text-anchor="end" %s>%s</text>' %
                        (x+self.linenowidth,y,counter_style,counter))
                
                counter += 1
                outfile.write('<text x="%s" y="%s" ' 'xml:space="preserve">' % (line_x,y))
            outfile.write(tspan + parts[-1] + tspanend)
        outfile.write('</text>')

        if not self.nowrap:
            outfile.write('</g></svg>\n')

    def _get_style(self, tokentype):
        if tokentype in self._stylecache:
            return self._stylecache[tokentype]
        otokentype = tokentype
        while not self.style.styles_token(tokentype):
            tokentype = tokentype.parent
        value = self.style.style_for_token(tokentype)
        result = ''
        if value['color']:
            result = ' fill="#' + value['color'] + '"'
        if value['bold']:
            result += ' font-weight="bold"'
        if value['italic']:
            result += ' font-style="italic"'
        self._stylecache[otokentype] = result
        return result
python3.12/site-packages/pip/_vendor/pygments/formatters/terminal.py000064400000011102151732703070021556 0ustar00"""
    pygments.formatters.terminal
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for terminal output with ANSI sequences.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.token import Keyword, Name, Comment, String, Error, \
    Number, Operator, Generic, Token, Whitespace
from pip._vendor.pygments.console import ansiformat
from pip._vendor.pygments.util import get_choice_opt


__all__ = ['TerminalFormatter']


#: Map token types to a tuple of color values for light and dark
#: backgrounds.
TERMINAL_COLORS = {
    Token:              ('',            ''),

    Whitespace:         ('gray',   'brightblack'),
    Comment:            ('gray',   'brightblack'),
    Comment.Preproc:    ('cyan',        'brightcyan'),
    Keyword:            ('blue',    'brightblue'),
    Keyword.Type:       ('cyan',        'brightcyan'),
    Operator.Word:      ('magenta',      'brightmagenta'),
    Name.Builtin:       ('cyan',        'brightcyan'),
    Name.Function:      ('green',   'brightgreen'),
    Name.Namespace:     ('_cyan_',      '_brightcyan_'),
    Name.Class:         ('_green_', '_brightgreen_'),
    Name.Exception:     ('cyan',        'brightcyan'),
    Name.Decorator:     ('brightblack',    'gray'),
    Name.Variable:      ('red',     'brightred'),
    Name.Constant:      ('red',     'brightred'),
    Name.Attribute:     ('cyan',        'brightcyan'),
    Name.Tag:           ('brightblue',        'brightblue'),
    String:             ('yellow',       'yellow'),
    Number:             ('blue',    'brightblue'),

    Generic.Deleted:    ('brightred',        'brightred'),
    Generic.Inserted:   ('green',  'brightgreen'),
    Generic.Heading:    ('**',         '**'),
    Generic.Subheading: ('*magenta*',   '*brightmagenta*'),
    Generic.Prompt:     ('**',         '**'),
    Generic.Error:      ('brightred',        'brightred'),

    Error:              ('_brightred_',      '_brightred_'),
}


class TerminalFormatter(Formatter):
    r"""
    Format tokens with ANSI color sequences, for output in a text console.
    Color sequences are terminated at newlines, so that paging the output
    works correctly.

    The `get_style_defs()` method doesn't do anything special since there is
    no support for common styles.

    Options accepted:

    `bg`
        Set to ``"light"`` or ``"dark"`` depending on the terminal's background
        (default: ``"light"``).

    `colorscheme`
        A dictionary mapping token types to (lightbg, darkbg) color names or
        ``None`` (default: ``None`` = use builtin colorscheme).

    `linenos`
        Set to ``True`` to have line numbers on the terminal output as well
        (default: ``False`` = no line numbers).
    """
    name = 'Terminal'
    aliases = ['terminal', 'console']
    filenames = []

    def __init__(self, **options):
        Formatter.__init__(self, **options)
        self.darkbg = get_choice_opt(options, 'bg',
                                     ['light', 'dark'], 'light') == 'dark'
        self.colorscheme = options.get('colorscheme', None) or TERMINAL_COLORS
        self.linenos = options.get('linenos', False)
        self._lineno = 0

    def format(self, tokensource, outfile):
        return Formatter.format(self, tokensource, outfile)

    def _write_lineno(self, outfile):
        self._lineno += 1
        outfile.write("%s%04d: " % (self._lineno != 1 and '\n' or '', self._lineno))

    def _get_color(self, ttype):
        # self.colorscheme is a dict containing usually generic types, so we
        # have to walk the tree of dots.  The base Token type must be a key,
        # even if it's empty string, as in the default above.
        colors = self.colorscheme.get(ttype)
        while colors is None:
            ttype = ttype.parent
            colors = self.colorscheme.get(ttype)
        return colors[self.darkbg]

    def format_unencoded(self, tokensource, outfile):
        if self.linenos:
            self._write_lineno(outfile)

        for ttype, value in tokensource:
            color = self._get_color(ttype)

            for line in value.splitlines(True):
                if color:
                    outfile.write(ansiformat(color, line.rstrip('\n')))
                else:
                    outfile.write(line.rstrip('\n'))
                if line.endswith('\n'):
                    if self.linenos:
                        self._write_lineno(outfile)
                    else:
                        outfile.write('\n')

        if self.linenos:
            outfile.write("\n")
python3.12/site-packages/pip/_vendor/pygments/formatters/html.py000064400000105432151732703070020721 0ustar00"""
    pygments.formatters.html
    ~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for HTML output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import functools
import os
import sys
import os.path
from io import StringIO

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.token import Token, Text, STANDARD_TYPES
from pip._vendor.pygments.util import get_bool_opt, get_int_opt, get_list_opt

try:
    import ctags
except ImportError:
    ctags = None

__all__ = ['HtmlFormatter']


_escape_html_table = {
    ord('&'): '&amp;',
    ord('<'): '&lt;',
    ord('>'): '&gt;',
    ord('"'): '&quot;',
    ord("'"): '&#39;',
}


def escape_html(text, table=_escape_html_table):
    """Escape &, <, > as well as single and double quotes for HTML."""
    return text.translate(table)


def webify(color):
    if color.startswith('calc') or color.startswith('var'):
        return color
    else:
        return '#' + color


def _get_ttype_class(ttype):
    fname = STANDARD_TYPES.get(ttype)
    if fname:
        return fname
    aname = ''
    while fname is None:
        aname = '-' + ttype[-1] + aname
        ttype = ttype.parent
        fname = STANDARD_TYPES.get(ttype)
    return fname + aname


CSSFILE_TEMPLATE = '''\
/*
generated by Pygments <https://pygments.org/>
Copyright 2006-2023 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
*/
%(styledefs)s
'''

DOC_HEADER = '''\
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<!--
generated by Pygments <https://pygments.org/>
Copyright 2006-2023 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
-->
<html>
<head>
  <title>%(title)s</title>
  <meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
  <style type="text/css">
''' + CSSFILE_TEMPLATE + '''
  </style>
</head>
<body>
<h2>%(title)s</h2>

'''

DOC_HEADER_EXTERNALCSS = '''\
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
  <title>%(title)s</title>
  <meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
  <link rel="stylesheet" href="%(cssfile)s" type="text/css">
</head>
<body>
<h2>%(title)s</h2>

'''

DOC_FOOTER = '''\
</body>
</html>
'''


class HtmlFormatter(Formatter):
    r"""
    Format tokens as HTML 4 ``<span>`` tags. By default, the content is enclosed
    in a ``<pre>`` tag, itself wrapped in a ``<div>`` tag (but see the `nowrap` option).
    The ``<div>``'s CSS class can be set by the `cssclass` option.

    If the `linenos` option is set to ``"table"``, the ``<pre>`` is
    additionally wrapped inside a ``<table>`` which has one row and two
    cells: one containing the line numbers and one containing the code.
    Example:

    .. sourcecode:: html

        <div class="highlight" >
        <table><tr>
          <td class="linenos" title="click to toggle"
            onclick="with (this.firstChild.style)
                     { display = (display == '') ? 'none' : '' }">
            <pre>1
            2</pre>
          </td>
          <td class="code">
            <pre><span class="Ke">def </span><span class="NaFu">foo</span>(bar):
              <span class="Ke">pass</span>
            </pre>
          </td>
        </tr></table></div>

    (whitespace added to improve clarity).

    A list of lines can be specified using the `hl_lines` option to make these
    lines highlighted (as of Pygments 0.11).

    With the `full` option, a complete HTML 4 document is output, including
    the style definitions inside a ``<style>`` tag, or in a separate file if
    the `cssfile` option is given.

    When `tagsfile` is set to the path of a ctags index file, it is used to
    generate hyperlinks from names to their definition.  You must enable
    `lineanchors` and run ctags with the `-n` option for this to work.  The
    `python-ctags` module from PyPI must be installed to use this feature;
    otherwise a `RuntimeError` will be raised.

    The `get_style_defs(arg='')` method of a `HtmlFormatter` returns a string
    containing CSS rules for the CSS classes used by the formatter. The
    argument `arg` can be used to specify additional CSS selectors that
    are prepended to the classes. A call `fmter.get_style_defs('td .code')`
    would result in the following CSS classes:

    .. sourcecode:: css

        td .code .kw { font-weight: bold; color: #00FF00 }
        td .code .cm { color: #999999 }
        ...

    If you have Pygments 0.6 or higher, you can also pass a list or tuple to the
    `get_style_defs()` method to request multiple prefixes for the tokens:

    .. sourcecode:: python

        formatter.get_style_defs(['div.syntax pre', 'pre.syntax'])

    The output would then look like this:

    .. sourcecode:: css

        div.syntax pre .kw,
        pre.syntax .kw { font-weight: bold; color: #00FF00 }
        div.syntax pre .cm,
        pre.syntax .cm { color: #999999 }
        ...

    Additional options accepted:

    `nowrap`
        If set to ``True``, don't add a ``<pre>`` and a ``<div>`` tag
        around the tokens. This disables most other options (default: ``False``).

    `full`
        Tells the formatter to output a "full" document, i.e. a complete
        self-contained document (default: ``False``).

    `title`
        If `full` is true, the title that should be used to caption the
        document (default: ``''``).

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``). This option has no effect if the `cssfile`
        and `noclobber_cssfile` option are given and the file specified in
        `cssfile` exists.

    `noclasses`
        If set to true, token ``<span>`` tags (as well as line number elements)
        will not use CSS classes, but inline styles. This is not recommended
        for larger pieces of code since it increases output size by quite a bit
        (default: ``False``).

    `classprefix`
        Since the token types use relatively short class names, they may clash
        with some of your own class names. In this case you can use the
        `classprefix` option to give a string to prepend to all Pygments-generated
        CSS class names for token types.
        Note that this option also affects the output of `get_style_defs()`.

    `cssclass`
        CSS class for the wrapping ``<div>`` tag (default: ``'highlight'``).
        If you set this option, the default selector for `get_style_defs()`
        will be this class.

        .. versionadded:: 0.9
           If you select the ``'table'`` line numbers, the wrapping table will
           have a CSS class of this string plus ``'table'``, the default is
           accordingly ``'highlighttable'``.

    `cssstyles`
        Inline CSS styles for the wrapping ``<div>`` tag (default: ``''``).

    `prestyles`
        Inline CSS styles for the ``<pre>`` tag (default: ``''``).

        .. versionadded:: 0.11

    `cssfile`
        If the `full` option is true and this option is given, it must be the
        name of an external file. If the filename does not include an absolute
        path, the file's path will be assumed to be relative to the main output
        file's path, if the latter can be found. The stylesheet is then written
        to this file instead of the HTML file.

        .. versionadded:: 0.6

    `noclobber_cssfile`
        If `cssfile` is given and the specified file exists, the css file will
        not be overwritten. This allows the use of the `full` option in
        combination with a user specified css file. Default is ``False``.

        .. versionadded:: 1.1

    `linenos`
        If set to ``'table'``, output line numbers as a table with two cells,
        one containing the line numbers, the other the whole code.  This is
        copy-and-paste-friendly, but may cause alignment problems with some
        browsers or fonts.  If set to ``'inline'``, the line numbers will be
        integrated in the ``<pre>`` tag that contains the code (that setting
        is *new in Pygments 0.8*).

        For compatibility with Pygments 0.7 and earlier, every true value
        except ``'inline'`` means the same as ``'table'`` (in particular, that
        means also ``True``).

        The default value is ``False``, which means no line numbers at all.

        **Note:** with the default ("table") line number mechanism, the line
        numbers and code can have different line heights in Internet Explorer
        unless you give the enclosing ``<pre>`` tags an explicit ``line-height``
        CSS property (you get the default line spacing with ``line-height:
        125%``).

    `hl_lines`
        Specify a list of lines to be highlighted. The line numbers are always
        relative to the input (i.e. the first line is line 1) and are
        independent of `linenostart`.

        .. versionadded:: 0.11

    `linenostart`
        The line number for the first line (default: ``1``).

    `linenostep`
        If set to a number n > 1, only every nth line number is printed.

    `linenospecial`
        If set to a number n > 0, every nth line number is given the CSS
        class ``"special"`` (default: ``0``).

    `nobackground`
        If set to ``True``, the formatter won't output the background color
        for the wrapping element (this automatically defaults to ``False``
        when there is no wrapping element [eg: no argument for the
        `get_syntax_defs` method given]) (default: ``False``).

        .. versionadded:: 0.6

    `lineseparator`
        This string is output between lines of code. It defaults to ``"\n"``,
        which is enough to break a line inside ``<pre>`` tags, but you can
        e.g. set it to ``"<br>"`` to get HTML line breaks.

        .. versionadded:: 0.7

    `lineanchors`
        If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
        output line in an anchor tag with an ``id`` (and `name`) of ``foo-linenumber``.
        This allows easy linking to certain lines.

        .. versionadded:: 0.9

    `linespans`
        If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
        output line in a span tag with an ``id`` of ``foo-linenumber``.
        This allows easy access to lines via javascript.

        .. versionadded:: 1.6

    `anchorlinenos`
        If set to `True`, will wrap line numbers in <a> tags. Used in
        combination with `linenos` and `lineanchors`.

    `tagsfile`
        If set to the path of a ctags file, wrap names in anchor tags that
        link to their definitions. `lineanchors` should be used, and the
        tags file should specify line numbers (see the `-n` option to ctags).

        .. versionadded:: 1.6

    `tagurlformat`
        A string formatting pattern used to generate links to ctags definitions.
        Available variables are `%(path)s`, `%(fname)s` and `%(fext)s`.
        Defaults to an empty string, resulting in just `#prefix-number` links.

        .. versionadded:: 1.6

    `filename`
        A string used to generate a filename when rendering ``<pre>`` blocks,
        for example if displaying source code. If `linenos` is set to
        ``'table'`` then the filename will be rendered in an initial row
        containing a single `<th>` which spans both columns.

        .. versionadded:: 2.1

    `wrapcode`
        Wrap the code inside ``<pre>`` blocks using ``<code>``, as recommended
        by the HTML5 specification.

        .. versionadded:: 2.4

    `debug_token_types`
        Add ``title`` attributes to all token ``<span>`` tags that show the
        name of the token.

        .. versionadded:: 2.10


    **Subclassing the HTML formatter**

    .. versionadded:: 0.7

    The HTML formatter is now built in a way that allows easy subclassing, thus
    customizing the output HTML code. The `format()` method calls
    `self._format_lines()` which returns a generator that yields tuples of ``(1,
    line)``, where the ``1`` indicates that the ``line`` is a line of the
    formatted source code.

    If the `nowrap` option is set, the generator is the iterated over and the
    resulting HTML is output.

    Otherwise, `format()` calls `self.wrap()`, which wraps the generator with
    other generators. These may add some HTML code to the one generated by
    `_format_lines()`, either by modifying the lines generated by the latter,
    then yielding them again with ``(1, line)``, and/or by yielding other HTML
    code before or after the lines, with ``(0, html)``. The distinction between
    source lines and other code makes it possible to wrap the generator multiple
    times.

    The default `wrap()` implementation adds a ``<div>`` and a ``<pre>`` tag.

    A custom `HtmlFormatter` subclass could look like this:

    .. sourcecode:: python

        class CodeHtmlFormatter(HtmlFormatter):

            def wrap(self, source, *, include_div):
                return self._wrap_code(source)

            def _wrap_code(self, source):
                yield 0, '<code>'
                for i, t in source:
                    if i == 1:
                        # it's a line of formatted code
                        t += '<br>'
                    yield i, t
                yield 0, '</code>'

    This results in wrapping the formatted lines with a ``<code>`` tag, where the
    source lines are broken using ``<br>`` tags.

    After calling `wrap()`, the `format()` method also adds the "line numbers"
    and/or "full document" wrappers if the respective options are set. Then, all
    HTML yielded by the wrapped generator is output.
    """

    name = 'HTML'
    aliases = ['html']
    filenames = ['*.html', '*.htm']

    def __init__(self, **options):
        Formatter.__init__(self, **options)
        self.title = self._decodeifneeded(self.title)
        self.nowrap = get_bool_opt(options, 'nowrap', False)
        self.noclasses = get_bool_opt(options, 'noclasses', False)
        self.classprefix = options.get('classprefix', '')
        self.cssclass = self._decodeifneeded(options.get('cssclass', 'highlight'))
        self.cssstyles = self._decodeifneeded(options.get('cssstyles', ''))
        self.prestyles = self._decodeifneeded(options.get('prestyles', ''))
        self.cssfile = self._decodeifneeded(options.get('cssfile', ''))
        self.noclobber_cssfile = get_bool_opt(options, 'noclobber_cssfile', False)
        self.tagsfile = self._decodeifneeded(options.get('tagsfile', ''))
        self.tagurlformat = self._decodeifneeded(options.get('tagurlformat', ''))
        self.filename = self._decodeifneeded(options.get('filename', ''))
        self.wrapcode = get_bool_opt(options, 'wrapcode', False)
        self.span_element_openers = {}
        self.debug_token_types = get_bool_opt(options, 'debug_token_types', False)

        if self.tagsfile:
            if not ctags:
                raise RuntimeError('The "ctags" package must to be installed '
                                   'to be able to use the "tagsfile" feature.')
            self._ctags = ctags.CTags(self.tagsfile)

        linenos = options.get('linenos', False)
        if linenos == 'inline':
            self.linenos = 2
        elif linenos:
            # compatibility with <= 0.7
            self.linenos = 1
        else:
            self.linenos = 0
        self.linenostart = abs(get_int_opt(options, 'linenostart', 1))
        self.linenostep = abs(get_int_opt(options, 'linenostep', 1))
        self.linenospecial = abs(get_int_opt(options, 'linenospecial', 0))
        self.nobackground = get_bool_opt(options, 'nobackground', False)
        self.lineseparator = options.get('lineseparator', '\n')
        self.lineanchors = options.get('lineanchors', '')
        self.linespans = options.get('linespans', '')
        self.anchorlinenos = get_bool_opt(options, 'anchorlinenos', False)
        self.hl_lines = set()
        for lineno in get_list_opt(options, 'hl_lines', []):
            try:
                self.hl_lines.add(int(lineno))
            except ValueError:
                pass

        self._create_stylesheet()

    def _get_css_class(self, ttype):
        """Return the css class of this token type prefixed with
        the classprefix option."""
        ttypeclass = _get_ttype_class(ttype)
        if ttypeclass:
            return self.classprefix + ttypeclass
        return ''

    def _get_css_classes(self, ttype):
        """Return the CSS classes of this token type prefixed with the classprefix option."""
        cls = self._get_css_class(ttype)
        while ttype not in STANDARD_TYPES:
            ttype = ttype.parent
            cls = self._get_css_class(ttype) + ' ' + cls
        return cls or ''

    def _get_css_inline_styles(self, ttype):
        """Return the inline CSS styles for this token type."""
        cclass = self.ttype2class.get(ttype)
        while cclass is None:
            ttype = ttype.parent
            cclass = self.ttype2class.get(ttype)
        return cclass or ''

    def _create_stylesheet(self):
        t2c = self.ttype2class = {Token: ''}
        c2s = self.class2style = {}
        for ttype, ndef in self.style:
            name = self._get_css_class(ttype)
            style = ''
            if ndef['color']:
                style += 'color: %s; ' % webify(ndef['color'])
            if ndef['bold']:
                style += 'font-weight: bold; '
            if ndef['italic']:
                style += 'font-style: italic; '
            if ndef['underline']:
                style += 'text-decoration: underline; '
            if ndef['bgcolor']:
                style += 'background-color: %s; ' % webify(ndef['bgcolor'])
            if ndef['border']:
                style += 'border: 1px solid %s; ' % webify(ndef['border'])
            if style:
                t2c[ttype] = name
                # save len(ttype) to enable ordering the styles by
                # hierarchy (necessary for CSS cascading rules!)
                c2s[name] = (style[:-2], ttype, len(ttype))

    def get_style_defs(self, arg=None):
        """
        Return CSS style definitions for the classes produced by the current
        highlighting style. ``arg`` can be a string or list of selectors to
        insert before the token type classes.
        """
        style_lines = []

        style_lines.extend(self.get_linenos_style_defs())
        style_lines.extend(self.get_background_style_defs(arg))
        style_lines.extend(self.get_token_style_defs(arg))

        return '\n'.join(style_lines)

    def get_token_style_defs(self, arg=None):
        prefix = self.get_css_prefix(arg)

        styles = [
            (level, ttype, cls, style)
            for cls, (style, ttype, level) in self.class2style.items()
            if cls and style
        ]
        styles.sort()

        lines = [
            '%s { %s } /* %s */' % (prefix(cls), style, repr(ttype)[6:])
            for (level, ttype, cls, style) in styles
        ]

        return lines

    def get_background_style_defs(self, arg=None):
        prefix = self.get_css_prefix(arg)
        bg_color = self.style.background_color
        hl_color = self.style.highlight_color

        lines = []

        if arg and not self.nobackground and bg_color is not None:
            text_style = ''
            if Text in self.ttype2class:
                text_style = ' ' + self.class2style[self.ttype2class[Text]][0]
            lines.insert(
                0, '%s{ background: %s;%s }' % (
                    prefix(''), bg_color, text_style
                )
            )
        if hl_color is not None:
            lines.insert(
                0, '%s { background-color: %s }' % (prefix('hll'), hl_color)
            )

        return lines

    def get_linenos_style_defs(self):
        lines = [
            'pre { %s }' % self._pre_style,
            'td.linenos .normal { %s }' % self._linenos_style,
            'span.linenos { %s }' % self._linenos_style,
            'td.linenos .special { %s }' % self._linenos_special_style,
            'span.linenos.special { %s }' % self._linenos_special_style,
        ]

        return lines

    def get_css_prefix(self, arg):
        if arg is None:
            arg = ('cssclass' in self.options and '.'+self.cssclass or '')
        if isinstance(arg, str):
            args = [arg]
        else:
            args = list(arg)

        def prefix(cls):
            if cls:
                cls = '.' + cls
            tmp = []
            for arg in args:
                tmp.append((arg and arg + ' ' or '') + cls)
            return ', '.join(tmp)

        return prefix

    @property
    def _pre_style(self):
        return 'line-height: 125%;'

    @property
    def _linenos_style(self):
        return 'color: %s; background-color: %s; padding-left: 5px; padding-right: 5px;' % (
            self.style.line_number_color,
            self.style.line_number_background_color
        )

    @property
    def _linenos_special_style(self):
        return 'color: %s; background-color: %s; padding-left: 5px; padding-right: 5px;' % (
            self.style.line_number_special_color,
            self.style.line_number_special_background_color
        )

    def _decodeifneeded(self, value):
        if isinstance(value, bytes):
            if self.encoding:
                return value.decode(self.encoding)
            return value.decode()
        return value

    def _wrap_full(self, inner, outfile):
        if self.cssfile:
            if os.path.isabs(self.cssfile):
                # it's an absolute filename
                cssfilename = self.cssfile
            else:
                try:
                    filename = outfile.name
                    if not filename or filename[0] == '<':
                        # pseudo files, e.g. name == '<fdopen>'
                        raise AttributeError
                    cssfilename = os.path.join(os.path.dirname(filename),
                                               self.cssfile)
                except AttributeError:
                    print('Note: Cannot determine output file name, '
                          'using current directory as base for the CSS file name',
                          file=sys.stderr)
                    cssfilename = self.cssfile
            # write CSS file only if noclobber_cssfile isn't given as an option.
            try:
                if not os.path.exists(cssfilename) or not self.noclobber_cssfile:
                    with open(cssfilename, "w", encoding="utf-8") as cf:
                        cf.write(CSSFILE_TEMPLATE %
                                 {'styledefs': self.get_style_defs('body')})
            except OSError as err:
                err.strerror = 'Error writing CSS file: ' + err.strerror
                raise

            yield 0, (DOC_HEADER_EXTERNALCSS %
                      dict(title=self.title,
                           cssfile=self.cssfile,
                           encoding=self.encoding))
        else:
            yield 0, (DOC_HEADER %
                      dict(title=self.title,
                           styledefs=self.get_style_defs('body'),
                           encoding=self.encoding))

        yield from inner
        yield 0, DOC_FOOTER

    def _wrap_tablelinenos(self, inner):
        dummyoutfile = StringIO()
        lncount = 0
        for t, line in inner:
            if t:
                lncount += 1
            dummyoutfile.write(line)

        fl = self.linenostart
        mw = len(str(lncount + fl - 1))
        sp = self.linenospecial
        st = self.linenostep
        anchor_name = self.lineanchors or self.linespans
        aln = self.anchorlinenos
        nocls = self.noclasses

        lines = []

        for i in range(fl, fl+lncount):
            print_line = i % st == 0
            special_line = sp and i % sp == 0

            if print_line:
                line = '%*d' % (mw, i)
                if aln:
                    line = '<a href="#%s-%d">%s</a>' % (anchor_name, i, line)
            else:
                line = ' ' * mw

            if nocls:
                if special_line:
                    style = ' style="%s"' % self._linenos_special_style
                else:
                    style = ' style="%s"' % self._linenos_style
            else:
                if special_line:
                    style = ' class="special"'
                else:
                    style = ' class="normal"'

            if style:
                line = '<span%s>%s</span>' % (style, line)

            lines.append(line)

        ls = '\n'.join(lines)

        # If a filename was specified, we can't put it into the code table as it
        # would misalign the line numbers. Hence we emit a separate row for it.
        filename_tr = ""
        if self.filename:
            filename_tr = (
                '<tr><th colspan="2" class="filename">'
                '<span class="filename">' + self.filename + '</span>'
                '</th></tr>')

        # in case you wonder about the seemingly redundant <div> here: since the
        # content in the other cell also is wrapped in a div, some browsers in
        # some configurations seem to mess up the formatting...
        yield 0, (f'<table class="{self.cssclass}table">' + filename_tr +
            '<tr><td class="linenos"><div class="linenodiv"><pre>' +
            ls + '</pre></div></td><td class="code">')
        yield 0, '<div>'
        yield 0, dummyoutfile.getvalue()
        yield 0, '</div>'
        yield 0, '</td></tr></table>'


    def _wrap_inlinelinenos(self, inner):
        # need a list of lines since we need the width of a single number :(
        inner_lines = list(inner)
        sp = self.linenospecial
        st = self.linenostep
        num = self.linenostart
        mw = len(str(len(inner_lines) + num - 1))
        anchor_name = self.lineanchors or self.linespans
        aln = self.anchorlinenos
        nocls = self.noclasses

        for _, inner_line in inner_lines:
            print_line = num % st == 0
            special_line = sp and num % sp == 0

            if print_line:
                line = '%*d' % (mw, num)
            else:
                line = ' ' * mw

            if nocls:
                if special_line:
                    style = ' style="%s"' % self._linenos_special_style
                else:
                    style = ' style="%s"' % self._linenos_style
            else:
                if special_line:
                    style = ' class="linenos special"'
                else:
                    style = ' class="linenos"'

            if style:
                linenos = '<span%s>%s</span>' % (style, line)
            else:
                linenos = line

            if aln:
                yield 1, ('<a href="#%s-%d">%s</a>' % (anchor_name, num, linenos) +
                          inner_line)
            else:
                yield 1, linenos + inner_line
            num += 1

    def _wrap_lineanchors(self, inner):
        s = self.lineanchors
        # subtract 1 since we have to increment i *before* yielding
        i = self.linenostart - 1
        for t, line in inner:
            if t:
                i += 1
                href = "" if self.linenos else ' href="#%s-%d"' % (s, i)
                yield 1, '<a id="%s-%d" name="%s-%d"%s></a>' % (s, i, s, i, href) + line
            else:
                yield 0, line

    def _wrap_linespans(self, inner):
        s = self.linespans
        i = self.linenostart - 1
        for t, line in inner:
            if t:
                i += 1
                yield 1, '<span id="%s-%d">%s</span>' % (s, i, line)
            else:
                yield 0, line

    def _wrap_div(self, inner):
        style = []
        if (self.noclasses and not self.nobackground and
                self.style.background_color is not None):
            style.append('background: %s' % (self.style.background_color,))
        if self.cssstyles:
            style.append(self.cssstyles)
        style = '; '.join(style)

        yield 0, ('<div' + (self.cssclass and ' class="%s"' % self.cssclass) +
                  (style and (' style="%s"' % style)) + '>')
        yield from inner
        yield 0, '</div>\n'

    def _wrap_pre(self, inner):
        style = []
        if self.prestyles:
            style.append(self.prestyles)
        if self.noclasses:
            style.append(self._pre_style)
        style = '; '.join(style)

        if self.filename and self.linenos != 1:
            yield 0, ('<span class="filename">' + self.filename + '</span>')

        # the empty span here is to keep leading empty lines from being
        # ignored by HTML parsers
        yield 0, ('<pre' + (style and ' style="%s"' % style) + '><span></span>')
        yield from inner
        yield 0, '</pre>'

    def _wrap_code(self, inner):
        yield 0, '<code>'
        yield from inner
        yield 0, '</code>'

    @functools.lru_cache(maxsize=100)
    def _translate_parts(self, value):
        """HTML-escape a value and split it by newlines."""
        return value.translate(_escape_html_table).split('\n')

    def _format_lines(self, tokensource):
        """
        Just format the tokens, without any wrapping tags.
        Yield individual lines.
        """
        nocls = self.noclasses
        lsep = self.lineseparator
        tagsfile = self.tagsfile

        lspan = ''
        line = []
        for ttype, value in tokensource:
            try:
                cspan = self.span_element_openers[ttype]
            except KeyError:
                title = ' title="%s"' % '.'.join(ttype) if self.debug_token_types else ''
                if nocls:
                    css_style = self._get_css_inline_styles(ttype)
                    if css_style:
                        css_style = self.class2style[css_style][0]
                        cspan = '<span style="%s"%s>' % (css_style, title)
                    else:
                        cspan = ''
                else:
                    css_class = self._get_css_classes(ttype)
                    if css_class:
                        cspan = '<span class="%s"%s>' % (css_class, title)
                    else:
                        cspan = ''
                self.span_element_openers[ttype] = cspan

            parts = self._translate_parts(value)

            if tagsfile and ttype in Token.Name:
                filename, linenumber = self._lookup_ctag(value)
                if linenumber:
                    base, filename = os.path.split(filename)
                    if base:
                        base += '/'
                    filename, extension = os.path.splitext(filename)
                    url = self.tagurlformat % {'path': base, 'fname': filename,
                                               'fext': extension}
                    parts[0] = "<a href=\"%s#%s-%d\">%s" % \
                        (url, self.lineanchors, linenumber, parts[0])
                    parts[-1] = parts[-1] + "</a>"

            # for all but the last line
            for part in parts[:-1]:
                if line:
                    # Also check for part being non-empty, so we avoid creating
                    # empty <span> tags
                    if lspan != cspan and part:
                        line.extend(((lspan and '</span>'), cspan, part,
                                     (cspan and '</span>'), lsep))
                    else:  # both are the same, or the current part was empty
                        line.extend((part, (lspan and '</span>'), lsep))
                    yield 1, ''.join(line)
                    line = []
                elif part:
                    yield 1, ''.join((cspan, part, (cspan and '</span>'), lsep))
                else:
                    yield 1, lsep
            # for the last line
            if line and parts[-1]:
                if lspan != cspan:
                    line.extend(((lspan and '</span>'), cspan, parts[-1]))
                    lspan = cspan
                else:
                    line.append(parts[-1])
            elif parts[-1]:
                line = [cspan, parts[-1]]
                lspan = cspan
            # else we neither have to open a new span nor set lspan

        if line:
            line.extend(((lspan and '</span>'), lsep))
            yield 1, ''.join(line)

    def _lookup_ctag(self, token):
        entry = ctags.TagEntry()
        if self._ctags.find(entry, token.encode(), 0):
            return entry['file'], entry['lineNumber']
        else:
            return None, None

    def _highlight_lines(self, tokensource):
        """
        Highlighted the lines specified in the `hl_lines` option by
        post-processing the token stream coming from `_format_lines`.
        """
        hls = self.hl_lines

        for i, (t, value) in enumerate(tokensource):
            if t != 1:
                yield t, value
            if i + 1 in hls:  # i + 1 because Python indexes start at 0
                if self.noclasses:
                    style = ''
                    if self.style.highlight_color is not None:
                        style = (' style="background-color: %s"' %
                                 (self.style.highlight_color,))
                    yield 1, '<span%s>%s</span>' % (style, value)
                else:
                    yield 1, '<span class="hll">%s</span>' % value
            else:
                yield 1, value

    def wrap(self, source):
        """
        Wrap the ``source``, which is a generator yielding
        individual lines, in custom generators. See docstring
        for `format`. Can be overridden.
        """

        output = source
        if self.wrapcode:
            output = self._wrap_code(output)

        output = self._wrap_pre(output)

        return output

    def format_unencoded(self, tokensource, outfile):
        """
        The formatting process uses several nested generators; which of
        them are used is determined by the user's options.

        Each generator should take at least one argument, ``inner``,
        and wrap the pieces of text generated by this.

        Always yield 2-tuples: (code, text). If "code" is 1, the text
        is part of the original tokensource being highlighted, if it's
        0, the text is some piece of wrapping. This makes it possible to
        use several different wrappers that process the original source
        linewise, e.g. line number generators.
        """
        source = self._format_lines(tokensource)

        # As a special case, we wrap line numbers before line highlighting
        # so the line numbers get wrapped in the highlighting tag.
        if not self.nowrap and self.linenos == 2:
            source = self._wrap_inlinelinenos(source)

        if self.hl_lines:
            source = self._highlight_lines(source)

        if not self.nowrap:
            if self.lineanchors:
                source = self._wrap_lineanchors(source)
            if self.linespans:
                source = self._wrap_linespans(source)
            source = self.wrap(source)
            if self.linenos == 1:
                source = self._wrap_tablelinenos(source)
            source = self._wrap_div(source)
            if self.full:
                source = self._wrap_full(source, outfile)

        for t, piece in source:
            outfile.write(piece)
python3.12/site-packages/pip/_vendor/pygments/formatters/pangomarkup.py000064400000004244151732703070022300 0ustar00"""
    pygments.formatters.pangomarkup
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for Pango markup output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.formatter import Formatter


__all__ = ['PangoMarkupFormatter']


_escape_table = {
    ord('&'): '&amp;',
    ord('<'): '&lt;',
}


def escape_special_chars(text, table=_escape_table):
    """Escape & and < for Pango Markup."""
    return text.translate(table)


class PangoMarkupFormatter(Formatter):
    """
    Format tokens as Pango Markup code. It can then be rendered to an SVG.

    .. versionadded:: 2.9
    """

    name = 'Pango Markup'
    aliases = ['pango', 'pangomarkup']
    filenames = []

    def __init__(self, **options):
        Formatter.__init__(self, **options)

        self.styles = {}

        for token, style in self.style:
            start = ''
            end = ''
            if style['color']:
                start += '<span fgcolor="#%s">' % style['color']
                end = '</span>' + end
            if style['bold']:
                start += '<b>'
                end = '</b>' + end
            if style['italic']:
                start += '<i>'
                end = '</i>' + end
            if style['underline']:
                start += '<u>'
                end = '</u>' + end
            self.styles[token] = (start, end)

    def format_unencoded(self, tokensource, outfile):
        lastval = ''
        lasttype = None

        outfile.write('<tt>')

        for ttype, value in tokensource:
            while ttype not in self.styles:
                ttype = ttype.parent
            if ttype == lasttype:
                lastval += escape_special_chars(value)
            else:
                if lastval:
                    stylebegin, styleend = self.styles[lasttype]
                    outfile.write(stylebegin + lastval + styleend)
                lastval = escape_special_chars(value)
                lasttype = ttype

        if lastval:
            stylebegin, styleend = self.styles[lasttype]
            outfile.write(stylebegin + lastval + styleend)

        outfile.write('</tt>')
python3.12/site-packages/pip/_vendor/pygments/formatters/irc.py000064400000011565151732703070020535 0ustar00"""
    pygments.formatters.irc
    ~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for IRC output

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.token import Keyword, Name, Comment, String, Error, \
    Number, Operator, Generic, Token, Whitespace
from pip._vendor.pygments.util import get_choice_opt


__all__ = ['IRCFormatter']


#: Map token types to a tuple of color values for light and dark
#: backgrounds.
IRC_COLORS = {
    Token:              ('',            ''),

    Whitespace:         ('gray',   'brightblack'),
    Comment:            ('gray',   'brightblack'),
    Comment.Preproc:    ('cyan',        'brightcyan'),
    Keyword:            ('blue',    'brightblue'),
    Keyword.Type:       ('cyan',        'brightcyan'),
    Operator.Word:      ('magenta',      'brightcyan'),
    Name.Builtin:       ('cyan',        'brightcyan'),
    Name.Function:      ('green',   'brightgreen'),
    Name.Namespace:     ('_cyan_',      '_brightcyan_'),
    Name.Class:         ('_green_', '_brightgreen_'),
    Name.Exception:     ('cyan',        'brightcyan'),
    Name.Decorator:     ('brightblack',    'gray'),
    Name.Variable:      ('red',     'brightred'),
    Name.Constant:      ('red',     'brightred'),
    Name.Attribute:     ('cyan',        'brightcyan'),
    Name.Tag:           ('brightblue',        'brightblue'),
    String:             ('yellow',       'yellow'),
    Number:             ('blue',    'brightblue'),

    Generic.Deleted:    ('brightred',        'brightred'),
    Generic.Inserted:   ('green',  'brightgreen'),
    Generic.Heading:    ('**',         '**'),
    Generic.Subheading: ('*magenta*',   '*brightmagenta*'),
    Generic.Error:      ('brightred',        'brightred'),

    Error:              ('_brightred_',      '_brightred_'),
}


IRC_COLOR_MAP = {
    'white': 0,
    'black': 1,
    'blue': 2,
    'brightgreen': 3,
    'brightred': 4,
    'yellow': 5,
    'magenta': 6,
    'orange': 7,
    'green': 7, #compat w/ ansi
    'brightyellow': 8,
    'lightgreen': 9,
    'brightcyan': 9, # compat w/ ansi
    'cyan': 10,
    'lightblue': 11,
    'red': 11, # compat w/ ansi
    'brightblue': 12,
    'brightmagenta': 13,
    'brightblack': 14,
    'gray': 15,
}

def ircformat(color, text):
    if len(color) < 1:
        return text
    add = sub = ''
    if '_' in color: # italic
        add += '\x1D'
        sub = '\x1D' + sub
        color = color.strip('_')
    if '*' in color: # bold
        add += '\x02'
        sub = '\x02' + sub
        color = color.strip('*')
    # underline (\x1F) not supported
    # backgrounds (\x03FF,BB) not supported
    if len(color) > 0: # actual color - may have issues with ircformat("red", "blah")+"10" type stuff
        add += '\x03' + str(IRC_COLOR_MAP[color]).zfill(2)
        sub = '\x03' + sub
    return add + text + sub
    return '<'+add+'>'+text+'</'+sub+'>'


class IRCFormatter(Formatter):
    r"""
    Format tokens with IRC color sequences

    The `get_style_defs()` method doesn't do anything special since there is
    no support for common styles.

    Options accepted:

    `bg`
        Set to ``"light"`` or ``"dark"`` depending on the terminal's background
        (default: ``"light"``).

    `colorscheme`
        A dictionary mapping token types to (lightbg, darkbg) color names or
        ``None`` (default: ``None`` = use builtin colorscheme).

    `linenos`
        Set to ``True`` to have line numbers in the output as well
        (default: ``False`` = no line numbers).
    """
    name = 'IRC'
    aliases = ['irc', 'IRC']
    filenames = []

    def __init__(self, **options):
        Formatter.__init__(self, **options)
        self.darkbg = get_choice_opt(options, 'bg',
                                     ['light', 'dark'], 'light') == 'dark'
        self.colorscheme = options.get('colorscheme', None) or IRC_COLORS
        self.linenos = options.get('linenos', False)
        self._lineno = 0

    def _write_lineno(self, outfile):
        if self.linenos:
            self._lineno += 1
            outfile.write("%04d: " % self._lineno)

    def format_unencoded(self, tokensource, outfile):
        self._write_lineno(outfile)

        for ttype, value in tokensource:
            color = self.colorscheme.get(ttype)
            while color is None:
                ttype = ttype[:-1]
                color = self.colorscheme.get(ttype)
            if color:
                color = color[self.darkbg]
                spl = value.split('\n')
                for line in spl[:-1]:
                    if line:
                        outfile.write(ircformat(color, line))
                    outfile.write('\n')
                    self._write_lineno(outfile)
                if spl[-1]:
                    outfile.write(ircformat(color, spl[-1]))
            else:
                outfile.write(value)
python3.12/site-packages/pip/_vendor/typing_extensions.pyi000064400000000037151732703070017656 0ustar00from typing_extensions import *python3.12/site-packages/pip/_vendor/typing_extensions.py000064400000331032151732703070017507 0ustar00import abc
import collections
import collections.abc
import functools
import inspect
import operator
import sys
import types as _types
import typing
import warnings

__all__ = [
    # Super-special typing primitives.
    'Any',
    'ClassVar',
    'Concatenate',
    'Final',
    'LiteralString',
    'ParamSpec',
    'ParamSpecArgs',
    'ParamSpecKwargs',
    'Self',
    'Type',
    'TypeVar',
    'TypeVarTuple',
    'Unpack',

    # ABCs (from collections.abc).
    'Awaitable',
    'AsyncIterator',
    'AsyncIterable',
    'Coroutine',
    'AsyncGenerator',
    'AsyncContextManager',
    'Buffer',
    'ChainMap',

    # Concrete collection types.
    'ContextManager',
    'Counter',
    'Deque',
    'DefaultDict',
    'NamedTuple',
    'OrderedDict',
    'TypedDict',

    # Structural checks, a.k.a. protocols.
    'SupportsAbs',
    'SupportsBytes',
    'SupportsComplex',
    'SupportsFloat',
    'SupportsIndex',
    'SupportsInt',
    'SupportsRound',

    # One-off things.
    'Annotated',
    'assert_never',
    'assert_type',
    'clear_overloads',
    'dataclass_transform',
    'deprecated',
    'get_overloads',
    'final',
    'get_args',
    'get_origin',
    'get_original_bases',
    'get_protocol_members',
    'get_type_hints',
    'IntVar',
    'is_protocol',
    'is_typeddict',
    'Literal',
    'NewType',
    'overload',
    'override',
    'Protocol',
    'reveal_type',
    'runtime',
    'runtime_checkable',
    'Text',
    'TypeAlias',
    'TypeAliasType',
    'TypeGuard',
    'TYPE_CHECKING',
    'Never',
    'NoReturn',
    'Required',
    'NotRequired',

    # Pure aliases, have always been in typing
    'AbstractSet',
    'AnyStr',
    'BinaryIO',
    'Callable',
    'Collection',
    'Container',
    'Dict',
    'ForwardRef',
    'FrozenSet',
    'Generator',
    'Generic',
    'Hashable',
    'IO',
    'ItemsView',
    'Iterable',
    'Iterator',
    'KeysView',
    'List',
    'Mapping',
    'MappingView',
    'Match',
    'MutableMapping',
    'MutableSequence',
    'MutableSet',
    'Optional',
    'Pattern',
    'Reversible',
    'Sequence',
    'Set',
    'Sized',
    'TextIO',
    'Tuple',
    'Union',
    'ValuesView',
    'cast',
    'no_type_check',
    'no_type_check_decorator',
]

# for backward compatibility
PEP_560 = True
GenericMeta = type

# The functions below are modified copies of typing internal helpers.
# They are needed by _ProtocolMeta and they provide support for PEP 646.


class _Sentinel:
    def __repr__(self):
        return "<sentinel>"


_marker = _Sentinel()


def _check_generic(cls, parameters, elen=_marker):
    """Check correct count for parameters of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
    """
    if not elen:
        raise TypeError(f"{cls} is not a generic class")
    if elen is _marker:
        if not hasattr(cls, "__parameters__") or not cls.__parameters__:
            raise TypeError(f"{cls} is not a generic class")
        elen = len(cls.__parameters__)
    alen = len(parameters)
    if alen != elen:
        if hasattr(cls, "__parameters__"):
            parameters = [p for p in cls.__parameters__ if not _is_unpack(p)]
            num_tv_tuples = sum(isinstance(p, TypeVarTuple) for p in parameters)
            if (num_tv_tuples > 0) and (alen >= elen - num_tv_tuples):
                return
        raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for {cls};"
                        f" actual {alen}, expected {elen}")


if sys.version_info >= (3, 10):
    def _should_collect_from_parameters(t):
        return isinstance(
            t, (typing._GenericAlias, _types.GenericAlias, _types.UnionType)
        )
elif sys.version_info >= (3, 9):
    def _should_collect_from_parameters(t):
        return isinstance(t, (typing._GenericAlias, _types.GenericAlias))
else:
    def _should_collect_from_parameters(t):
        return isinstance(t, typing._GenericAlias) and not t._special


def _collect_type_vars(types, typevar_types=None):
    """Collect all type variable contained in types in order of
    first appearance (lexicographic order). For example::

        _collect_type_vars((T, List[S, T])) == (T, S)
    """
    if typevar_types is None:
        typevar_types = typing.TypeVar
    tvars = []
    for t in types:
        if (
            isinstance(t, typevar_types) and
            t not in tvars and
            not _is_unpack(t)
        ):
            tvars.append(t)
        if _should_collect_from_parameters(t):
            tvars.extend([t for t in t.__parameters__ if t not in tvars])
    return tuple(tvars)


NoReturn = typing.NoReturn

# Some unconstrained type variables.  These are used by the container types.
# (These are not for export.)
T = typing.TypeVar('T')  # Any type.
KT = typing.TypeVar('KT')  # Key type.
VT = typing.TypeVar('VT')  # Value type.
T_co = typing.TypeVar('T_co', covariant=True)  # Any type covariant containers.
T_contra = typing.TypeVar('T_contra', contravariant=True)  # Ditto contravariant.


if sys.version_info >= (3, 11):
    from typing import Any
else:

    class _AnyMeta(type):
        def __instancecheck__(self, obj):
            if self is Any:
                raise TypeError("typing_extensions.Any cannot be used with isinstance()")
            return super().__instancecheck__(obj)

        def __repr__(self):
            if self is Any:
                return "typing_extensions.Any"
            return super().__repr__()

    class Any(metaclass=_AnyMeta):
        """Special type indicating an unconstrained type.
        - Any is compatible with every type.
        - Any assumed to have all methods.
        - All values assumed to be instances of Any.
        Note that all the above statements are true from the point of view of
        static type checkers. At runtime, Any should not be used with instance
        checks.
        """
        def __new__(cls, *args, **kwargs):
            if cls is Any:
                raise TypeError("Any cannot be instantiated")
            return super().__new__(cls, *args, **kwargs)


ClassVar = typing.ClassVar


class _ExtensionsSpecialForm(typing._SpecialForm, _root=True):
    def __repr__(self):
        return 'typing_extensions.' + self._name


# On older versions of typing there is an internal class named "Final".
# 3.8+
if hasattr(typing, 'Final') and sys.version_info[:2] >= (3, 7):
    Final = typing.Final
# 3.7
else:
    class _FinalForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return typing._GenericAlias(self, (item,))

    Final = _FinalForm('Final',
                       doc="""A special typing construct to indicate that a name
                       cannot be re-assigned or overridden in a subclass.
                       For example:

                           MAX_SIZE: Final = 9000
                           MAX_SIZE += 1  # Error reported by type checker

                           class Connection:
                               TIMEOUT: Final[int] = 10
                           class FastConnector(Connection):
                               TIMEOUT = 1  # Error reported by type checker

                       There is no runtime checking of these properties.""")

if sys.version_info >= (3, 11):
    final = typing.final
else:
    # @final exists in 3.8+, but we backport it for all versions
    # before 3.11 to keep support for the __final__ attribute.
    # See https://bugs.python.org/issue46342
    def final(f):
        """This decorator can be used to indicate to type checkers that
        the decorated method cannot be overridden, and decorated class
        cannot be subclassed. For example:

            class Base:
                @final
                def done(self) -> None:
                    ...
            class Sub(Base):
                def done(self) -> None:  # Error reported by type checker
                    ...
            @final
            class Leaf:
                ...
            class Other(Leaf):  # Error reported by type checker
                ...

        There is no runtime checking of these properties. The decorator
        sets the ``__final__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.
        """
        try:
            f.__final__ = True
        except (AttributeError, TypeError):
            # Skip the attribute silently if it is not writable.
            # AttributeError happens if the object has __slots__ or a
            # read-only property, TypeError if it's a builtin class.
            pass
        return f


def IntVar(name):
    return typing.TypeVar(name)


# A Literal bug was fixed in 3.11.0, 3.10.1 and 3.9.8
if sys.version_info >= (3, 10, 1):
    Literal = typing.Literal
else:
    def _flatten_literal_params(parameters):
        """An internal helper for Literal creation: flatten Literals among parameters"""
        params = []
        for p in parameters:
            if isinstance(p, _LiteralGenericAlias):
                params.extend(p.__args__)
            else:
                params.append(p)
        return tuple(params)

    def _value_and_type_iter(params):
        for p in params:
            yield p, type(p)

    class _LiteralGenericAlias(typing._GenericAlias, _root=True):
        def __eq__(self, other):
            if not isinstance(other, _LiteralGenericAlias):
                return NotImplemented
            these_args_deduped = set(_value_and_type_iter(self.__args__))
            other_args_deduped = set(_value_and_type_iter(other.__args__))
            return these_args_deduped == other_args_deduped

        def __hash__(self):
            return hash(frozenset(_value_and_type_iter(self.__args__)))

    class _LiteralForm(_ExtensionsSpecialForm, _root=True):
        def __init__(self, doc: str):
            self._name = 'Literal'
            self._doc = self.__doc__ = doc

        def __getitem__(self, parameters):
            if not isinstance(parameters, tuple):
                parameters = (parameters,)

            parameters = _flatten_literal_params(parameters)

            val_type_pairs = list(_value_and_type_iter(parameters))
            try:
                deduped_pairs = set(val_type_pairs)
            except TypeError:
                # unhashable parameters
                pass
            else:
                # similar logic to typing._deduplicate on Python 3.9+
                if len(deduped_pairs) < len(val_type_pairs):
                    new_parameters = []
                    for pair in val_type_pairs:
                        if pair in deduped_pairs:
                            new_parameters.append(pair[0])
                            deduped_pairs.remove(pair)
                    assert not deduped_pairs, deduped_pairs
                    parameters = tuple(new_parameters)

            return _LiteralGenericAlias(self, parameters)

    Literal = _LiteralForm(doc="""\
                           A type that can be used to indicate to type checkers
                           that the corresponding value has a value literally equivalent
                           to the provided parameter. For example:

                               var: Literal[4] = 4

                           The type checker understands that 'var' is literally equal to
                           the value 4 and no other value.

                           Literal[...] cannot be subclassed. There is no runtime
                           checking verifying that the parameter is actually a value
                           instead of a type.""")


_overload_dummy = typing._overload_dummy


if hasattr(typing, "get_overloads"):  # 3.11+
    overload = typing.overload
    get_overloads = typing.get_overloads
    clear_overloads = typing.clear_overloads
else:
    # {module: {qualname: {firstlineno: func}}}
    _overload_registry = collections.defaultdict(
        functools.partial(collections.defaultdict, dict)
    )

    def overload(func):
        """Decorator for overloaded functions/methods.

        In a stub file, place two or more stub definitions for the same
        function in a row, each decorated with @overload.  For example:

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...

        In a non-stub file (i.e. a regular .py file), do the same but
        follow it with an implementation.  The implementation should *not*
        be decorated with @overload.  For example:

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...
        def utf8(value):
            # implementation goes here

        The overloads for a function can be retrieved at runtime using the
        get_overloads() function.
        """
        # classmethod and staticmethod
        f = getattr(func, "__func__", func)
        try:
            _overload_registry[f.__module__][f.__qualname__][
                f.__code__.co_firstlineno
            ] = func
        except AttributeError:
            # Not a normal function; ignore.
            pass
        return _overload_dummy

    def get_overloads(func):
        """Return all defined overloads for *func* as a sequence."""
        # classmethod and staticmethod
        f = getattr(func, "__func__", func)
        if f.__module__ not in _overload_registry:
            return []
        mod_dict = _overload_registry[f.__module__]
        if f.__qualname__ not in mod_dict:
            return []
        return list(mod_dict[f.__qualname__].values())

    def clear_overloads():
        """Clear all overloads in the registry."""
        _overload_registry.clear()


# This is not a real generic class.  Don't use outside annotations.
Type = typing.Type

# Various ABCs mimicking those in collections.abc.
# A few are simply re-exported for completeness.


Awaitable = typing.Awaitable
Coroutine = typing.Coroutine
AsyncIterable = typing.AsyncIterable
AsyncIterator = typing.AsyncIterator
Deque = typing.Deque
ContextManager = typing.ContextManager
AsyncContextManager = typing.AsyncContextManager
DefaultDict = typing.DefaultDict

# 3.7.2+
if hasattr(typing, 'OrderedDict'):
    OrderedDict = typing.OrderedDict
# 3.7.0-3.7.2
else:
    OrderedDict = typing._alias(collections.OrderedDict, (KT, VT))

Counter = typing.Counter
ChainMap = typing.ChainMap
AsyncGenerator = typing.AsyncGenerator
Text = typing.Text
TYPE_CHECKING = typing.TYPE_CHECKING


_PROTO_ALLOWLIST = {
    'collections.abc': [
        'Callable', 'Awaitable', 'Iterable', 'Iterator', 'AsyncIterable',
        'Hashable', 'Sized', 'Container', 'Collection', 'Reversible', 'Buffer',
    ],
    'contextlib': ['AbstractContextManager', 'AbstractAsyncContextManager'],
    'typing_extensions': ['Buffer'],
}


_EXCLUDED_ATTRS = {
    "__abstractmethods__", "__annotations__", "__weakref__", "_is_protocol",
    "_is_runtime_protocol", "__dict__", "__slots__", "__parameters__",
    "__orig_bases__", "__module__", "_MutableMapping__marker", "__doc__",
    "__subclasshook__", "__orig_class__", "__init__", "__new__",
    "__protocol_attrs__", "__callable_proto_members_only__",
}

if sys.version_info < (3, 8):
    _EXCLUDED_ATTRS |= {
        "_gorg", "__next_in_mro__", "__extra__", "__tree_hash__", "__args__",
        "__origin__"
    }

if sys.version_info >= (3, 9):
    _EXCLUDED_ATTRS.add("__class_getitem__")

if sys.version_info >= (3, 12):
    _EXCLUDED_ATTRS.add("__type_params__")

_EXCLUDED_ATTRS = frozenset(_EXCLUDED_ATTRS)


def _get_protocol_attrs(cls):
    attrs = set()
    for base in cls.__mro__[:-1]:  # without object
        if base.__name__ in {'Protocol', 'Generic'}:
            continue
        annotations = getattr(base, '__annotations__', {})
        for attr in (*base.__dict__, *annotations):
            if (not attr.startswith('_abc_') and attr not in _EXCLUDED_ATTRS):
                attrs.add(attr)
    return attrs


def _maybe_adjust_parameters(cls):
    """Helper function used in Protocol.__init_subclass__ and _TypedDictMeta.__new__.

    The contents of this function are very similar
    to logic found in typing.Generic.__init_subclass__
    on the CPython main branch.
    """
    tvars = []
    if '__orig_bases__' in cls.__dict__:
        tvars = _collect_type_vars(cls.__orig_bases__)
        # Look for Generic[T1, ..., Tn] or Protocol[T1, ..., Tn].
        # If found, tvars must be a subset of it.
        # If not found, tvars is it.
        # Also check for and reject plain Generic,
        # and reject multiple Generic[...] and/or Protocol[...].
        gvars = None
        for base in cls.__orig_bases__:
            if (isinstance(base, typing._GenericAlias) and
                    base.__origin__ in (typing.Generic, Protocol)):
                # for error messages
                the_base = base.__origin__.__name__
                if gvars is not None:
                    raise TypeError(
                        "Cannot inherit from Generic[...]"
                        " and/or Protocol[...] multiple types.")
                gvars = base.__parameters__
        if gvars is None:
            gvars = tvars
        else:
            tvarset = set(tvars)
            gvarset = set(gvars)
            if not tvarset <= gvarset:
                s_vars = ', '.join(str(t) for t in tvars if t not in gvarset)
                s_args = ', '.join(str(g) for g in gvars)
                raise TypeError(f"Some type variables ({s_vars}) are"
                                f" not listed in {the_base}[{s_args}]")
            tvars = gvars
    cls.__parameters__ = tuple(tvars)


def _caller(depth=2):
    try:
        return sys._getframe(depth).f_globals.get('__name__', '__main__')
    except (AttributeError, ValueError):  # For platforms without _getframe()
        return None


# The performance of runtime-checkable protocols is significantly improved on Python 3.12,
# so we backport the 3.12 version of Protocol to Python <=3.11
if sys.version_info >= (3, 12):
    Protocol = typing.Protocol
else:
    def _allow_reckless_class_checks(depth=3):
        """Allow instance and class checks for special stdlib modules.
        The abc and functools modules indiscriminately call isinstance() and
        issubclass() on the whole MRO of a user class, which may contain protocols.
        """
        return _caller(depth) in {'abc', 'functools', None}

    def _no_init(self, *args, **kwargs):
        if type(self)._is_protocol:
            raise TypeError('Protocols cannot be instantiated')

    if sys.version_info >= (3, 8):
        # Inheriting from typing._ProtocolMeta isn't actually desirable,
        # but is necessary to allow typing.Protocol and typing_extensions.Protocol
        # to mix without getting TypeErrors about "metaclass conflict"
        _typing_Protocol = typing.Protocol
        _ProtocolMetaBase = type(_typing_Protocol)
    else:
        _typing_Protocol = _marker
        _ProtocolMetaBase = abc.ABCMeta

    class _ProtocolMeta(_ProtocolMetaBase):
        # This metaclass is somewhat unfortunate,
        # but is necessary for several reasons...
        #
        # NOTE: DO NOT call super() in any methods in this class
        # That would call the methods on typing._ProtocolMeta on Python 3.8-3.11
        # and those are slow
        def __new__(mcls, name, bases, namespace, **kwargs):
            if name == "Protocol" and len(bases) < 2:
                pass
            elif {Protocol, _typing_Protocol} & set(bases):
                for base in bases:
                    if not (
                        base in {object, typing.Generic, Protocol, _typing_Protocol}
                        or base.__name__ in _PROTO_ALLOWLIST.get(base.__module__, [])
                        or is_protocol(base)
                    ):
                        raise TypeError(
                            f"Protocols can only inherit from other protocols, "
                            f"got {base!r}"
                        )
            return abc.ABCMeta.__new__(mcls, name, bases, namespace, **kwargs)

        def __init__(cls, *args, **kwargs):
            abc.ABCMeta.__init__(cls, *args, **kwargs)
            if getattr(cls, "_is_protocol", False):
                cls.__protocol_attrs__ = _get_protocol_attrs(cls)
                # PEP 544 prohibits using issubclass()
                # with protocols that have non-method members.
                cls.__callable_proto_members_only__ = all(
                    callable(getattr(cls, attr, None)) for attr in cls.__protocol_attrs__
                )

        def __subclasscheck__(cls, other):
            if cls is Protocol:
                return type.__subclasscheck__(cls, other)
            if (
                getattr(cls, '_is_protocol', False)
                and not _allow_reckless_class_checks()
            ):
                if not isinstance(other, type):
                    # Same error message as for issubclass(1, int).
                    raise TypeError('issubclass() arg 1 must be a class')
                if (
                    not cls.__callable_proto_members_only__
                    and cls.__dict__.get("__subclasshook__") is _proto_hook
                ):
                    raise TypeError(
                        "Protocols with non-method members don't support issubclass()"
                    )
                if not getattr(cls, '_is_runtime_protocol', False):
                    raise TypeError(
                        "Instance and class checks can only be used with "
                        "@runtime_checkable protocols"
                    )
            return abc.ABCMeta.__subclasscheck__(cls, other)

        def __instancecheck__(cls, instance):
            # We need this method for situations where attributes are
            # assigned in __init__.
            if cls is Protocol:
                return type.__instancecheck__(cls, instance)
            if not getattr(cls, "_is_protocol", False):
                # i.e., it's a concrete subclass of a protocol
                return abc.ABCMeta.__instancecheck__(cls, instance)

            if (
                not getattr(cls, '_is_runtime_protocol', False) and
                not _allow_reckless_class_checks()
            ):
                raise TypeError("Instance and class checks can only be used with"
                                " @runtime_checkable protocols")

            if abc.ABCMeta.__instancecheck__(cls, instance):
                return True

            for attr in cls.__protocol_attrs__:
                try:
                    val = inspect.getattr_static(instance, attr)
                except AttributeError:
                    break
                if val is None and callable(getattr(cls, attr, None)):
                    break
            else:
                return True

            return False

        def __eq__(cls, other):
            # Hack so that typing.Generic.__class_getitem__
            # treats typing_extensions.Protocol
            # as equivalent to typing.Protocol on Python 3.8+
            if abc.ABCMeta.__eq__(cls, other) is True:
                return True
            return (
                cls is Protocol and other is getattr(typing, "Protocol", object())
            )

        # This has to be defined, or the abc-module cache
        # complains about classes with this metaclass being unhashable,
        # if we define only __eq__!
        def __hash__(cls) -> int:
            return type.__hash__(cls)

    @classmethod
    def _proto_hook(cls, other):
        if not cls.__dict__.get('_is_protocol', False):
            return NotImplemented

        for attr in cls.__protocol_attrs__:
            for base in other.__mro__:
                # Check if the members appears in the class dictionary...
                if attr in base.__dict__:
                    if base.__dict__[attr] is None:
                        return NotImplemented
                    break

                # ...or in annotations, if it is a sub-protocol.
                annotations = getattr(base, '__annotations__', {})
                if (
                    isinstance(annotations, collections.abc.Mapping)
                    and attr in annotations
                    and is_protocol(other)
                ):
                    break
            else:
                return NotImplemented
        return True

    if sys.version_info >= (3, 8):
        class Protocol(typing.Generic, metaclass=_ProtocolMeta):
            __doc__ = typing.Protocol.__doc__
            __slots__ = ()
            _is_protocol = True
            _is_runtime_protocol = False

            def __init_subclass__(cls, *args, **kwargs):
                super().__init_subclass__(*args, **kwargs)

                # Determine if this is a protocol or a concrete subclass.
                if not cls.__dict__.get('_is_protocol', False):
                    cls._is_protocol = any(b is Protocol for b in cls.__bases__)

                # Set (or override) the protocol subclass hook.
                if '__subclasshook__' not in cls.__dict__:
                    cls.__subclasshook__ = _proto_hook

                # Prohibit instantiation for protocol classes
                if cls._is_protocol and cls.__init__ is Protocol.__init__:
                    cls.__init__ = _no_init

    else:
        class Protocol(metaclass=_ProtocolMeta):
            # There is quite a lot of overlapping code with typing.Generic.
            # Unfortunately it is hard to avoid this on Python <3.8,
            # as the typing module on Python 3.7 doesn't let us subclass typing.Generic!
            """Base class for protocol classes. Protocol classes are defined as::

                class Proto(Protocol):
                    def meth(self) -> int:
                        ...

            Such classes are primarily used with static type checkers that recognize
            structural subtyping (static duck-typing), for example::

                class C:
                    def meth(self) -> int:
                        return 0

                def func(x: Proto) -> int:
                    return x.meth()

                func(C())  # Passes static type check

            See PEP 544 for details. Protocol classes decorated with
            @typing_extensions.runtime_checkable act
            as simple-minded runtime-checkable protocols that check
            only the presence of given attributes, ignoring their type signatures.

            Protocol classes can be generic, they are defined as::

                class GenProto(Protocol[T]):
                    def meth(self) -> T:
                        ...
            """
            __slots__ = ()
            _is_protocol = True
            _is_runtime_protocol = False

            def __new__(cls, *args, **kwds):
                if cls is Protocol:
                    raise TypeError("Type Protocol cannot be instantiated; "
                                    "it can only be used as a base class")
                return super().__new__(cls)

            @typing._tp_cache
            def __class_getitem__(cls, params):
                if not isinstance(params, tuple):
                    params = (params,)
                if not params and cls is not typing.Tuple:
                    raise TypeError(
                        f"Parameter list to {cls.__qualname__}[...] cannot be empty")
                msg = "Parameters to generic types must be types."
                params = tuple(typing._type_check(p, msg) for p in params)
                if cls is Protocol:
                    # Generic can only be subscripted with unique type variables.
                    if not all(isinstance(p, typing.TypeVar) for p in params):
                        i = 0
                        while isinstance(params[i], typing.TypeVar):
                            i += 1
                        raise TypeError(
                            "Parameters to Protocol[...] must all be type variables."
                            f" Parameter {i + 1} is {params[i]}")
                    if len(set(params)) != len(params):
                        raise TypeError(
                            "Parameters to Protocol[...] must all be unique")
                else:
                    # Subscripting a regular Generic subclass.
                    _check_generic(cls, params, len(cls.__parameters__))
                return typing._GenericAlias(cls, params)

            def __init_subclass__(cls, *args, **kwargs):
                if '__orig_bases__' in cls.__dict__:
                    error = typing.Generic in cls.__orig_bases__
                else:
                    error = typing.Generic in cls.__bases__
                if error:
                    raise TypeError("Cannot inherit from plain Generic")
                _maybe_adjust_parameters(cls)

                # Determine if this is a protocol or a concrete subclass.
                if not cls.__dict__.get('_is_protocol', None):
                    cls._is_protocol = any(b is Protocol for b in cls.__bases__)

                # Set (or override) the protocol subclass hook.
                if '__subclasshook__' not in cls.__dict__:
                    cls.__subclasshook__ = _proto_hook

                # Prohibit instantiation for protocol classes
                if cls._is_protocol and cls.__init__ is Protocol.__init__:
                    cls.__init__ = _no_init


if sys.version_info >= (3, 8):
    runtime_checkable = typing.runtime_checkable
else:
    def runtime_checkable(cls):
        """Mark a protocol class as a runtime protocol, so that it
        can be used with isinstance() and issubclass(). Raise TypeError
        if applied to a non-protocol class.

        This allows a simple-minded structural check very similar to the
        one-offs in collections.abc such as Hashable.
        """
        if not (
            (isinstance(cls, _ProtocolMeta) or issubclass(cls, typing.Generic))
            and getattr(cls, "_is_protocol", False)
        ):
            raise TypeError('@runtime_checkable can be only applied to protocol classes,'
                            f' got {cls!r}')
        cls._is_runtime_protocol = True
        return cls


# Exists for backwards compatibility.
runtime = runtime_checkable


# Our version of runtime-checkable protocols is faster on Python 3.7-3.11
if sys.version_info >= (3, 12):
    SupportsInt = typing.SupportsInt
    SupportsFloat = typing.SupportsFloat
    SupportsComplex = typing.SupportsComplex
    SupportsBytes = typing.SupportsBytes
    SupportsIndex = typing.SupportsIndex
    SupportsAbs = typing.SupportsAbs
    SupportsRound = typing.SupportsRound
else:
    @runtime_checkable
    class SupportsInt(Protocol):
        """An ABC with one abstract method __int__."""
        __slots__ = ()

        @abc.abstractmethod
        def __int__(self) -> int:
            pass

    @runtime_checkable
    class SupportsFloat(Protocol):
        """An ABC with one abstract method __float__."""
        __slots__ = ()

        @abc.abstractmethod
        def __float__(self) -> float:
            pass

    @runtime_checkable
    class SupportsComplex(Protocol):
        """An ABC with one abstract method __complex__."""
        __slots__ = ()

        @abc.abstractmethod
        def __complex__(self) -> complex:
            pass

    @runtime_checkable
    class SupportsBytes(Protocol):
        """An ABC with one abstract method __bytes__."""
        __slots__ = ()

        @abc.abstractmethod
        def __bytes__(self) -> bytes:
            pass

    @runtime_checkable
    class SupportsIndex(Protocol):
        __slots__ = ()

        @abc.abstractmethod
        def __index__(self) -> int:
            pass

    @runtime_checkable
    class SupportsAbs(Protocol[T_co]):
        """
        An ABC with one abstract method __abs__ that is covariant in its return type.
        """
        __slots__ = ()

        @abc.abstractmethod
        def __abs__(self) -> T_co:
            pass

    @runtime_checkable
    class SupportsRound(Protocol[T_co]):
        """
        An ABC with one abstract method __round__ that is covariant in its return type.
        """
        __slots__ = ()

        @abc.abstractmethod
        def __round__(self, ndigits: int = 0) -> T_co:
            pass


def _ensure_subclassable(mro_entries):
    def inner(func):
        if sys.implementation.name == "pypy" and sys.version_info < (3, 9):
            cls_dict = {
                "__call__": staticmethod(func),
                "__mro_entries__": staticmethod(mro_entries)
            }
            t = type(func.__name__, (), cls_dict)
            return functools.update_wrapper(t(), func)
        else:
            func.__mro_entries__ = mro_entries
            return func
    return inner


if sys.version_info >= (3, 13):
    # The standard library TypedDict in Python 3.8 does not store runtime information
    # about which (if any) keys are optional.  See https://bugs.python.org/issue38834
    # The standard library TypedDict in Python 3.9.0/1 does not honour the "total"
    # keyword with old-style TypedDict().  See https://bugs.python.org/issue42059
    # The standard library TypedDict below Python 3.11 does not store runtime
    # information about optional and required keys when using Required or NotRequired.
    # Generic TypedDicts are also impossible using typing.TypedDict on Python <3.11.
    # Aaaand on 3.12 we add __orig_bases__ to TypedDict
    # to enable better runtime introspection.
    # On 3.13 we deprecate some odd ways of creating TypedDicts.
    TypedDict = typing.TypedDict
    _TypedDictMeta = typing._TypedDictMeta
    is_typeddict = typing.is_typeddict
else:
    # 3.10.0 and later
    _TAKES_MODULE = "module" in inspect.signature(typing._type_check).parameters

    if sys.version_info >= (3, 8):
        _fake_name = "Protocol"
    else:
        _fake_name = "_Protocol"

    class _TypedDictMeta(type):
        def __new__(cls, name, bases, ns, total=True):
            """Create new typed dict class object.

            This method is called when TypedDict is subclassed,
            or when TypedDict is instantiated. This way
            TypedDict supports all three syntax forms described in its docstring.
            Subclasses and instances of TypedDict return actual dictionaries.
            """
            for base in bases:
                if type(base) is not _TypedDictMeta and base is not typing.Generic:
                    raise TypeError('cannot inherit from both a TypedDict type '
                                    'and a non-TypedDict base class')

            if any(issubclass(b, typing.Generic) for b in bases):
                generic_base = (typing.Generic,)
            else:
                generic_base = ()

            # typing.py generally doesn't let you inherit from plain Generic, unless
            # the name of the class happens to be "Protocol" (or "_Protocol" on 3.7).
            tp_dict = type.__new__(_TypedDictMeta, _fake_name, (*generic_base, dict), ns)
            tp_dict.__name__ = name
            if tp_dict.__qualname__ == _fake_name:
                tp_dict.__qualname__ = name

            if not hasattr(tp_dict, '__orig_bases__'):
                tp_dict.__orig_bases__ = bases

            annotations = {}
            own_annotations = ns.get('__annotations__', {})
            msg = "TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type"
            if _TAKES_MODULE:
                own_annotations = {
                    n: typing._type_check(tp, msg, module=tp_dict.__module__)
                    for n, tp in own_annotations.items()
                }
            else:
                own_annotations = {
                    n: typing._type_check(tp, msg)
                    for n, tp in own_annotations.items()
                }
            required_keys = set()
            optional_keys = set()

            for base in bases:
                annotations.update(base.__dict__.get('__annotations__', {}))
                required_keys.update(base.__dict__.get('__required_keys__', ()))
                optional_keys.update(base.__dict__.get('__optional_keys__', ()))

            annotations.update(own_annotations)
            for annotation_key, annotation_type in own_annotations.items():
                annotation_origin = get_origin(annotation_type)
                if annotation_origin is Annotated:
                    annotation_args = get_args(annotation_type)
                    if annotation_args:
                        annotation_type = annotation_args[0]
                        annotation_origin = get_origin(annotation_type)

                if annotation_origin is Required:
                    required_keys.add(annotation_key)
                elif annotation_origin is NotRequired:
                    optional_keys.add(annotation_key)
                elif total:
                    required_keys.add(annotation_key)
                else:
                    optional_keys.add(annotation_key)

            tp_dict.__annotations__ = annotations
            tp_dict.__required_keys__ = frozenset(required_keys)
            tp_dict.__optional_keys__ = frozenset(optional_keys)
            if not hasattr(tp_dict, '__total__'):
                tp_dict.__total__ = total
            return tp_dict

        __call__ = dict  # static method

        def __subclasscheck__(cls, other):
            # Typed dicts are only for static structural subtyping.
            raise TypeError('TypedDict does not support instance and class checks')

        __instancecheck__ = __subclasscheck__

    _TypedDict = type.__new__(_TypedDictMeta, 'TypedDict', (), {})

    @_ensure_subclassable(lambda bases: (_TypedDict,))
    def TypedDict(__typename, __fields=_marker, *, total=True, **kwargs):
        """A simple typed namespace. At runtime it is equivalent to a plain dict.

        TypedDict creates a dictionary type such that a type checker will expect all
        instances to have a certain set of keys, where each key is
        associated with a value of a consistent type. This expectation
        is not checked at runtime.

        Usage::

            class Point2D(TypedDict):
                x: int
                y: int
                label: str

            a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
            b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

            assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

        The type info can be accessed via the Point2D.__annotations__ dict, and
        the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
        TypedDict supports an additional equivalent form::

            Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

        By default, all keys must be present in a TypedDict. It is possible
        to override this by specifying totality::

            class Point2D(TypedDict, total=False):
                x: int
                y: int

        This means that a Point2D TypedDict can have any of the keys omitted. A type
        checker is only expected to support a literal False or True as the value of
        the total argument. True is the default, and makes all items defined in the
        class body be required.

        The Required and NotRequired special forms can also be used to mark
        individual keys as being required or not required::

            class Point2D(TypedDict):
                x: int  # the "x" key must always be present (Required is the default)
                y: NotRequired[int]  # the "y" key can be omitted

        See PEP 655 for more details on Required and NotRequired.
        """
        if __fields is _marker or __fields is None:
            if __fields is _marker:
                deprecated_thing = "Failing to pass a value for the 'fields' parameter"
            else:
                deprecated_thing = "Passing `None` as the 'fields' parameter"

            example = f"`{__typename} = TypedDict({__typename!r}, {{}})`"
            deprecation_msg = (
                f"{deprecated_thing} is deprecated and will be disallowed in "
                "Python 3.15. To create a TypedDict class with 0 fields "
                "using the functional syntax, pass an empty dictionary, e.g. "
            ) + example + "."
            warnings.warn(deprecation_msg, DeprecationWarning, stacklevel=2)
            __fields = kwargs
        elif kwargs:
            raise TypeError("TypedDict takes either a dict or keyword arguments,"
                            " but not both")
        if kwargs:
            warnings.warn(
                "The kwargs-based syntax for TypedDict definitions is deprecated "
                "in Python 3.11, will be removed in Python 3.13, and may not be "
                "understood by third-party type checkers.",
                DeprecationWarning,
                stacklevel=2,
            )

        ns = {'__annotations__': dict(__fields)}
        module = _caller()
        if module is not None:
            # Setting correct module is necessary to make typed dict classes pickleable.
            ns['__module__'] = module

        td = _TypedDictMeta(__typename, (), ns, total=total)
        td.__orig_bases__ = (TypedDict,)
        return td

    if hasattr(typing, "_TypedDictMeta"):
        _TYPEDDICT_TYPES = (typing._TypedDictMeta, _TypedDictMeta)
    else:
        _TYPEDDICT_TYPES = (_TypedDictMeta,)

    def is_typeddict(tp):
        """Check if an annotation is a TypedDict class

        For example::
            class Film(TypedDict):
                title: str
                year: int

            is_typeddict(Film)  # => True
            is_typeddict(Union[list, str])  # => False
        """
        # On 3.8, this would otherwise return True
        if hasattr(typing, "TypedDict") and tp is typing.TypedDict:
            return False
        return isinstance(tp, _TYPEDDICT_TYPES)


if hasattr(typing, "assert_type"):
    assert_type = typing.assert_type

else:
    def assert_type(__val, __typ):
        """Assert (to the type checker) that the value is of the given type.

        When the type checker encounters a call to assert_type(), it
        emits an error if the value is not of the specified type::

            def greet(name: str) -> None:
                assert_type(name, str)  # ok
                assert_type(name, int)  # type checker error

        At runtime this returns the first argument unchanged and otherwise
        does nothing.
        """
        return __val


if hasattr(typing, "Required"):
    get_type_hints = typing.get_type_hints
else:
    # replaces _strip_annotations()
    def _strip_extras(t):
        """Strips Annotated, Required and NotRequired from a given type."""
        if isinstance(t, _AnnotatedAlias):
            return _strip_extras(t.__origin__)
        if hasattr(t, "__origin__") and t.__origin__ in (Required, NotRequired):
            return _strip_extras(t.__args__[0])
        if isinstance(t, typing._GenericAlias):
            stripped_args = tuple(_strip_extras(a) for a in t.__args__)
            if stripped_args == t.__args__:
                return t
            return t.copy_with(stripped_args)
        if hasattr(_types, "GenericAlias") and isinstance(t, _types.GenericAlias):
            stripped_args = tuple(_strip_extras(a) for a in t.__args__)
            if stripped_args == t.__args__:
                return t
            return _types.GenericAlias(t.__origin__, stripped_args)
        if hasattr(_types, "UnionType") and isinstance(t, _types.UnionType):
            stripped_args = tuple(_strip_extras(a) for a in t.__args__)
            if stripped_args == t.__args__:
                return t
            return functools.reduce(operator.or_, stripped_args)

        return t

    def get_type_hints(obj, globalns=None, localns=None, include_extras=False):
        """Return type hints for an object.

        This is often the same as obj.__annotations__, but it handles
        forward references encoded as string literals, adds Optional[t] if a
        default value equal to None is set and recursively replaces all
        'Annotated[T, ...]', 'Required[T]' or 'NotRequired[T]' with 'T'
        (unless 'include_extras=True').

        The argument may be a module, class, method, or function. The annotations
        are returned as a dictionary. For classes, annotations include also
        inherited members.

        TypeError is raised if the argument is not of a type that can contain
        annotations, and an empty dictionary is returned if no annotations are
        present.

        BEWARE -- the behavior of globalns and localns is counterintuitive
        (unless you are familiar with how eval() and exec() work).  The
        search order is locals first, then globals.

        - If no dict arguments are passed, an attempt is made to use the
          globals from obj (or the respective module's globals for classes),
          and these are also used as the locals.  If the object does not appear
          to have globals, an empty dictionary is used.

        - If one dict argument is passed, it is used for both globals and
          locals.

        - If two dict arguments are passed, they specify globals and
          locals, respectively.
        """
        if hasattr(typing, "Annotated"):
            hint = typing.get_type_hints(
                obj, globalns=globalns, localns=localns, include_extras=True
            )
        else:
            hint = typing.get_type_hints(obj, globalns=globalns, localns=localns)
        if include_extras:
            return hint
        return {k: _strip_extras(t) for k, t in hint.items()}


# Python 3.9+ has PEP 593 (Annotated)
if hasattr(typing, 'Annotated'):
    Annotated = typing.Annotated
    # Not exported and not a public API, but needed for get_origin() and get_args()
    # to work.
    _AnnotatedAlias = typing._AnnotatedAlias
# 3.7-3.8
else:
    class _AnnotatedAlias(typing._GenericAlias, _root=True):
        """Runtime representation of an annotated type.

        At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
        with extra annotations. The alias behaves like a normal typing alias,
        instantiating is the same as instantiating the underlying type, binding
        it to types is also the same.
        """
        def __init__(self, origin, metadata):
            if isinstance(origin, _AnnotatedAlias):
                metadata = origin.__metadata__ + metadata
                origin = origin.__origin__
            super().__init__(origin, origin)
            self.__metadata__ = metadata

        def copy_with(self, params):
            assert len(params) == 1
            new_type = params[0]
            return _AnnotatedAlias(new_type, self.__metadata__)

        def __repr__(self):
            return (f"typing_extensions.Annotated[{typing._type_repr(self.__origin__)}, "
                    f"{', '.join(repr(a) for a in self.__metadata__)}]")

        def __reduce__(self):
            return operator.getitem, (
                Annotated, (self.__origin__,) + self.__metadata__
            )

        def __eq__(self, other):
            if not isinstance(other, _AnnotatedAlias):
                return NotImplemented
            if self.__origin__ != other.__origin__:
                return False
            return self.__metadata__ == other.__metadata__

        def __hash__(self):
            return hash((self.__origin__, self.__metadata__))

    class Annotated:
        """Add context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to the
        hypothetical runtime_check module that this type is an unsigned int.
        Every other consumer of this type can ignore this metadata and treat
        this type as int.

        The first argument to Annotated must be a valid type (and will be in
        the __origin__ field), the remaining arguments are kept as a tuple in
        the __extra__ field.

        Details:

        - It's an error to call `Annotated` with less than two arguments.
        - Nested Annotated are flattened::

            Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

        - Instantiating an annotated type is equivalent to instantiating the
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can be used as a generic type alias::

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
        """

        __slots__ = ()

        def __new__(cls, *args, **kwargs):
            raise TypeError("Type Annotated cannot be instantiated.")

        @typing._tp_cache
        def __class_getitem__(cls, params):
            if not isinstance(params, tuple) or len(params) < 2:
                raise TypeError("Annotated[...] should be used "
                                "with at least two arguments (a type and an "
                                "annotation).")
            allowed_special_forms = (ClassVar, Final)
            if get_origin(params[0]) in allowed_special_forms:
                origin = params[0]
            else:
                msg = "Annotated[t, ...]: t must be a type."
                origin = typing._type_check(params[0], msg)
            metadata = tuple(params[1:])
            return _AnnotatedAlias(origin, metadata)

        def __init_subclass__(cls, *args, **kwargs):
            raise TypeError(
                f"Cannot subclass {cls.__module__}.Annotated"
            )

# Python 3.8 has get_origin() and get_args() but those implementations aren't
# Annotated-aware, so we can't use those. Python 3.9's versions don't support
# ParamSpecArgs and ParamSpecKwargs, so only Python 3.10's versions will do.
if sys.version_info[:2] >= (3, 10):
    get_origin = typing.get_origin
    get_args = typing.get_args
# 3.7-3.9
else:
    try:
        # 3.9+
        from typing import _BaseGenericAlias
    except ImportError:
        _BaseGenericAlias = typing._GenericAlias
    try:
        # 3.9+
        from typing import GenericAlias as _typing_GenericAlias
    except ImportError:
        _typing_GenericAlias = typing._GenericAlias

    def get_origin(tp):
        """Get the unsubscripted version of a type.

        This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
        and Annotated. Return None for unsupported types. Examples::

            get_origin(Literal[42]) is Literal
            get_origin(int) is None
            get_origin(ClassVar[int]) is ClassVar
            get_origin(Generic) is Generic
            get_origin(Generic[T]) is Generic
            get_origin(Union[T, int]) is Union
            get_origin(List[Tuple[T, T]][int]) == list
            get_origin(P.args) is P
        """
        if isinstance(tp, _AnnotatedAlias):
            return Annotated
        if isinstance(tp, (typing._GenericAlias, _typing_GenericAlias, _BaseGenericAlias,
                           ParamSpecArgs, ParamSpecKwargs)):
            return tp.__origin__
        if tp is typing.Generic:
            return typing.Generic
        return None

    def get_args(tp):
        """Get type arguments with all substitutions performed.

        For unions, basic simplifications used by Union constructor are performed.
        Examples::
            get_args(Dict[str, int]) == (str, int)
            get_args(int) == ()
            get_args(Union[int, Union[T, int], str][int]) == (int, str)
            get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
            get_args(Callable[[], T][int]) == ([], int)
        """
        if isinstance(tp, _AnnotatedAlias):
            return (tp.__origin__,) + tp.__metadata__
        if isinstance(tp, (typing._GenericAlias, _typing_GenericAlias)):
            if getattr(tp, "_special", False):
                return ()
            res = tp.__args__
            if get_origin(tp) is collections.abc.Callable and res[0] is not Ellipsis:
                res = (list(res[:-1]), res[-1])
            return res
        return ()


# 3.10+
if hasattr(typing, 'TypeAlias'):
    TypeAlias = typing.TypeAlias
# 3.9
elif sys.version_info[:2] >= (3, 9):
    @_ExtensionsSpecialForm
    def TypeAlias(self, parameters):
        """Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example above.
        """
        raise TypeError(f"{self} is not subscriptable")
# 3.7-3.8
else:
    TypeAlias = _ExtensionsSpecialForm(
        'TypeAlias',
        doc="""Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example
        above."""
    )


def _set_default(type_param, default):
    if isinstance(default, (tuple, list)):
        type_param.__default__ = tuple((typing._type_check(d, "Default must be a type")
                                        for d in default))
    elif default != _marker:
        type_param.__default__ = typing._type_check(default, "Default must be a type")
    else:
        type_param.__default__ = None


def _set_module(typevarlike):
    # for pickling:
    def_mod = _caller(depth=3)
    if def_mod != 'typing_extensions':
        typevarlike.__module__ = def_mod


class _DefaultMixin:
    """Mixin for TypeVarLike defaults."""

    __slots__ = ()
    __init__ = _set_default


# Classes using this metaclass must provide a _backported_typevarlike ClassVar
class _TypeVarLikeMeta(type):
    def __instancecheck__(cls, __instance: Any) -> bool:
        return isinstance(__instance, cls._backported_typevarlike)


# Add default and infer_variance parameters from PEP 696 and 695
class TypeVar(metaclass=_TypeVarLikeMeta):
    """Type variable."""

    _backported_typevarlike = typing.TypeVar

    def __new__(cls, name, *constraints, bound=None,
                covariant=False, contravariant=False,
                default=_marker, infer_variance=False):
        if hasattr(typing, "TypeAliasType"):
            # PEP 695 implemented, can pass infer_variance to typing.TypeVar
            typevar = typing.TypeVar(name, *constraints, bound=bound,
                                     covariant=covariant, contravariant=contravariant,
                                     infer_variance=infer_variance)
        else:
            typevar = typing.TypeVar(name, *constraints, bound=bound,
                                     covariant=covariant, contravariant=contravariant)
            if infer_variance and (covariant or contravariant):
                raise ValueError("Variance cannot be specified with infer_variance.")
            typevar.__infer_variance__ = infer_variance
        _set_default(typevar, default)
        _set_module(typevar)
        return typevar

    def __init_subclass__(cls) -> None:
        raise TypeError(f"type '{__name__}.TypeVar' is not an acceptable base type")


# Python 3.10+ has PEP 612
if hasattr(typing, 'ParamSpecArgs'):
    ParamSpecArgs = typing.ParamSpecArgs
    ParamSpecKwargs = typing.ParamSpecKwargs
# 3.7-3.9
else:
    class _Immutable:
        """Mixin to indicate that object should not be copied."""
        __slots__ = ()

        def __copy__(self):
            return self

        def __deepcopy__(self, memo):
            return self

    class ParamSpecArgs(_Immutable):
        """The args for a ParamSpec object.

        Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.

        ParamSpecArgs objects have a reference back to their ParamSpec:

        P.args.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        """
        def __init__(self, origin):
            self.__origin__ = origin

        def __repr__(self):
            return f"{self.__origin__.__name__}.args"

        def __eq__(self, other):
            if not isinstance(other, ParamSpecArgs):
                return NotImplemented
            return self.__origin__ == other.__origin__

    class ParamSpecKwargs(_Immutable):
        """The kwargs for a ParamSpec object.

        Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.

        ParamSpecKwargs objects have a reference back to their ParamSpec:

        P.kwargs.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        """
        def __init__(self, origin):
            self.__origin__ = origin

        def __repr__(self):
            return f"{self.__origin__.__name__}.kwargs"

        def __eq__(self, other):
            if not isinstance(other, ParamSpecKwargs):
                return NotImplemented
            return self.__origin__ == other.__origin__

# 3.10+
if hasattr(typing, 'ParamSpec'):

    # Add default parameter - PEP 696
    class ParamSpec(metaclass=_TypeVarLikeMeta):
        """Parameter specification."""

        _backported_typevarlike = typing.ParamSpec

        def __new__(cls, name, *, bound=None,
                    covariant=False, contravariant=False,
                    infer_variance=False, default=_marker):
            if hasattr(typing, "TypeAliasType"):
                # PEP 695 implemented, can pass infer_variance to typing.TypeVar
                paramspec = typing.ParamSpec(name, bound=bound,
                                             covariant=covariant,
                                             contravariant=contravariant,
                                             infer_variance=infer_variance)
            else:
                paramspec = typing.ParamSpec(name, bound=bound,
                                             covariant=covariant,
                                             contravariant=contravariant)
                paramspec.__infer_variance__ = infer_variance

            _set_default(paramspec, default)
            _set_module(paramspec)
            return paramspec

        def __init_subclass__(cls) -> None:
            raise TypeError(f"type '{__name__}.ParamSpec' is not an acceptable base type")

# 3.7-3.9
else:

    # Inherits from list as a workaround for Callable checks in Python < 3.9.2.
    class ParamSpec(list, _DefaultMixin):
        """Parameter specification variable.

        Usage::

           P = ParamSpec('P')

        Parameter specification variables exist primarily for the benefit of static
        type checkers.  They are used to forward the parameter types of one
        callable to another callable, a pattern commonly found in higher order
        functions and decorators.  They are only valid when used in ``Concatenate``,
        or s the first argument to ``Callable``. In Python 3.10 and higher,
        they are also supported in user-defined Generics at runtime.
        See class Generic for more information on generic types.  An
        example for annotating a decorator::

           T = TypeVar('T')
           P = ParamSpec('P')

           def add_logging(f: Callable[P, T]) -> Callable[P, T]:
               '''A type-safe decorator to add logging to a function.'''
               def inner(*args: P.args, **kwargs: P.kwargs) -> T:
                   logging.info(f'{f.__name__} was called')
                   return f(*args, **kwargs)
               return inner

           @add_logging
           def add_two(x: float, y: float) -> float:
               '''Add two numbers together.'''
               return x + y

        Parameter specification variables defined with covariant=True or
        contravariant=True can be used to declare covariant or contravariant
        generic types.  These keyword arguments are valid, but their actual semantics
        are yet to be decided.  See PEP 612 for details.

        Parameter specification variables can be introspected. e.g.:

           P.__name__ == 'T'
           P.__bound__ == None
           P.__covariant__ == False
           P.__contravariant__ == False

        Note that only parameter specification variables defined in global scope can
        be pickled.
        """

        # Trick Generic __parameters__.
        __class__ = typing.TypeVar

        @property
        def args(self):
            return ParamSpecArgs(self)

        @property
        def kwargs(self):
            return ParamSpecKwargs(self)

        def __init__(self, name, *, bound=None, covariant=False, contravariant=False,
                     infer_variance=False, default=_marker):
            super().__init__([self])
            self.__name__ = name
            self.__covariant__ = bool(covariant)
            self.__contravariant__ = bool(contravariant)
            self.__infer_variance__ = bool(infer_variance)
            if bound:
                self.__bound__ = typing._type_check(bound, 'Bound must be a type.')
            else:
                self.__bound__ = None
            _DefaultMixin.__init__(self, default)

            # for pickling:
            def_mod = _caller()
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

        def __repr__(self):
            if self.__infer_variance__:
                prefix = ''
            elif self.__covariant__:
                prefix = '+'
            elif self.__contravariant__:
                prefix = '-'
            else:
                prefix = '~'
            return prefix + self.__name__

        def __hash__(self):
            return object.__hash__(self)

        def __eq__(self, other):
            return self is other

        def __reduce__(self):
            return self.__name__

        # Hack to get typing._type_check to pass.
        def __call__(self, *args, **kwargs):
            pass


# 3.7-3.9
if not hasattr(typing, 'Concatenate'):
    # Inherits from list as a workaround for Callable checks in Python < 3.9.2.
    class _ConcatenateGenericAlias(list):

        # Trick Generic into looking into this for __parameters__.
        __class__ = typing._GenericAlias

        # Flag in 3.8.
        _special = False

        def __init__(self, origin, args):
            super().__init__(args)
            self.__origin__ = origin
            self.__args__ = args

        def __repr__(self):
            _type_repr = typing._type_repr
            return (f'{_type_repr(self.__origin__)}'
                    f'[{", ".join(_type_repr(arg) for arg in self.__args__)}]')

        def __hash__(self):
            return hash((self.__origin__, self.__args__))

        # Hack to get typing._type_check to pass in Generic.
        def __call__(self, *args, **kwargs):
            pass

        @property
        def __parameters__(self):
            return tuple(
                tp for tp in self.__args__ if isinstance(tp, (typing.TypeVar, ParamSpec))
            )


# 3.7-3.9
@typing._tp_cache
def _concatenate_getitem(self, parameters):
    if parameters == ():
        raise TypeError("Cannot take a Concatenate of no types.")
    if not isinstance(parameters, tuple):
        parameters = (parameters,)
    if not isinstance(parameters[-1], ParamSpec):
        raise TypeError("The last parameter to Concatenate should be a "
                        "ParamSpec variable.")
    msg = "Concatenate[arg, ...]: each arg must be a type."
    parameters = tuple(typing._type_check(p, msg) for p in parameters)
    return _ConcatenateGenericAlias(self, parameters)


# 3.10+
if hasattr(typing, 'Concatenate'):
    Concatenate = typing.Concatenate
    _ConcatenateGenericAlias = typing._ConcatenateGenericAlias  # noqa: F811
# 3.9
elif sys.version_info[:2] >= (3, 9):
    @_ExtensionsSpecialForm
    def Concatenate(self, parameters):
        """Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        """
        return _concatenate_getitem(self, parameters)
# 3.7-8
else:
    class _ConcatenateForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
            return _concatenate_getitem(self, parameters)

    Concatenate = _ConcatenateForm(
        'Concatenate',
        doc="""Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        """)

# 3.10+
if hasattr(typing, 'TypeGuard'):
    TypeGuard = typing.TypeGuard
# 3.9
elif sys.version_info[:2] >= (3, 9):
    @_ExtensionsSpecialForm
    def TypeGuard(self, parameters):
        """Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        """
        item = typing._type_check(parameters, f'{self} accepts only a single type.')
        return typing._GenericAlias(self, (item,))
# 3.7-3.8
else:
    class _TypeGuardForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type')
            return typing._GenericAlias(self, (item,))

    TypeGuard = _TypeGuardForm(
        'TypeGuard',
        doc="""Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        """)


# Vendored from cpython typing._SpecialFrom
class _SpecialForm(typing._Final, _root=True):
    __slots__ = ('_name', '__doc__', '_getitem')

    def __init__(self, getitem):
        self._getitem = getitem
        self._name = getitem.__name__
        self.__doc__ = getitem.__doc__

    def __getattr__(self, item):
        if item in {'__name__', '__qualname__'}:
            return self._name

        raise AttributeError(item)

    def __mro_entries__(self, bases):
        raise TypeError(f"Cannot subclass {self!r}")

    def __repr__(self):
        return f'typing_extensions.{self._name}'

    def __reduce__(self):
        return self._name

    def __call__(self, *args, **kwds):
        raise TypeError(f"Cannot instantiate {self!r}")

    def __or__(self, other):
        return typing.Union[self, other]

    def __ror__(self, other):
        return typing.Union[other, self]

    def __instancecheck__(self, obj):
        raise TypeError(f"{self} cannot be used with isinstance()")

    def __subclasscheck__(self, cls):
        raise TypeError(f"{self} cannot be used with issubclass()")

    @typing._tp_cache
    def __getitem__(self, parameters):
        return self._getitem(self, parameters)


if hasattr(typing, "LiteralString"):
    LiteralString = typing.LiteralString
else:
    @_SpecialForm
    def LiteralString(self, params):
        """Represents an arbitrary literal string.

        Example::

          from pip._vendor.typing_extensions import LiteralString

          def query(sql: LiteralString) -> ...:
              ...

          query("SELECT * FROM table")  # ok
          query(f"SELECT * FROM {input()}")  # not ok

        See PEP 675 for details.

        """
        raise TypeError(f"{self} is not subscriptable")


if hasattr(typing, "Self"):
    Self = typing.Self
else:
    @_SpecialForm
    def Self(self, params):
        """Used to spell the type of "self" in classes.

        Example::

          from typing import Self

          class ReturnsSelf:
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        """

        raise TypeError(f"{self} is not subscriptable")


if hasattr(typing, "Never"):
    Never = typing.Never
else:
    @_SpecialForm
    def Never(self, params):
        """The bottom type, a type that has no members.

        This can be used to define a function that should never be
        called, or a function that never returns::

            from pip._vendor.typing_extensions import Never

            def never_call_me(arg: Never) -> None:
                pass

            def int_or_str(arg: int | str) -> None:
                never_call_me(arg)  # type checker error
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                    case _:
                        never_call_me(arg)  # ok, arg is of type Never

        """

        raise TypeError(f"{self} is not subscriptable")


if hasattr(typing, 'Required'):
    Required = typing.Required
    NotRequired = typing.NotRequired
elif sys.version_info[:2] >= (3, 9):
    @_ExtensionsSpecialForm
    def Required(self, parameters):
        """A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        """
        item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
        return typing._GenericAlias(self, (item,))

    @_ExtensionsSpecialForm
    def NotRequired(self, parameters):
        """A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        """
        item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
        return typing._GenericAlias(self, (item,))

else:
    class _RequiredForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return typing._GenericAlias(self, (item,))

    Required = _RequiredForm(
        'Required',
        doc="""A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        """)
    NotRequired = _RequiredForm(
        'NotRequired',
        doc="""A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        """)


_UNPACK_DOC = """\
Type unpack operator.

The type unpack operator takes the child types from some container type,
such as `tuple[int, str]` or a `TypeVarTuple`, and 'pulls them out'. For
example:

  # For some generic class `Foo`:
  Foo[Unpack[tuple[int, str]]]  # Equivalent to Foo[int, str]

  Ts = TypeVarTuple('Ts')
  # Specifies that `Bar` is generic in an arbitrary number of types.
  # (Think of `Ts` as a tuple of an arbitrary number of individual
  #  `TypeVar`s, which the `Unpack` is 'pulling out' directly into the
  #  `Generic[]`.)
  class Bar(Generic[Unpack[Ts]]): ...
  Bar[int]  # Valid
  Bar[int, str]  # Also valid

From Python 3.11, this can also be done using the `*` operator:

    Foo[*tuple[int, str]]
    class Bar(Generic[*Ts]): ...

The operator can also be used along with a `TypedDict` to annotate
`**kwargs` in a function signature. For instance:

  class Movie(TypedDict):
    name: str
    year: int

  # This function expects two keyword arguments - *name* of type `str` and
  # *year* of type `int`.
  def foo(**kwargs: Unpack[Movie]): ...

Note that there is only some runtime checking of this operator. Not
everything the runtime allows may be accepted by static type checkers.

For more information, see PEP 646 and PEP 692.
"""


if sys.version_info >= (3, 12):  # PEP 692 changed the repr of Unpack[]
    Unpack = typing.Unpack

    def _is_unpack(obj):
        return get_origin(obj) is Unpack

elif sys.version_info[:2] >= (3, 9):
    class _UnpackSpecialForm(_ExtensionsSpecialForm, _root=True):
        def __init__(self, getitem):
            super().__init__(getitem)
            self.__doc__ = _UNPACK_DOC

    class _UnpackAlias(typing._GenericAlias, _root=True):
        __class__ = typing.TypeVar

    @_UnpackSpecialForm
    def Unpack(self, parameters):
        item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
        return _UnpackAlias(self, (item,))

    def _is_unpack(obj):
        return isinstance(obj, _UnpackAlias)

else:
    class _UnpackAlias(typing._GenericAlias, _root=True):
        __class__ = typing.TypeVar

    class _UnpackForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return _UnpackAlias(self, (item,))

    Unpack = _UnpackForm('Unpack', doc=_UNPACK_DOC)

    def _is_unpack(obj):
        return isinstance(obj, _UnpackAlias)


if hasattr(typing, "TypeVarTuple"):  # 3.11+

    # Add default parameter - PEP 696
    class TypeVarTuple(metaclass=_TypeVarLikeMeta):
        """Type variable tuple."""

        _backported_typevarlike = typing.TypeVarTuple

        def __new__(cls, name, *, default=_marker):
            tvt = typing.TypeVarTuple(name)
            _set_default(tvt, default)
            _set_module(tvt)
            return tvt

        def __init_subclass__(self, *args, **kwds):
            raise TypeError("Cannot subclass special typing classes")

else:
    class TypeVarTuple(_DefaultMixin):
        """Type variable tuple.

        Usage::

            Ts = TypeVarTuple('Ts')

        In the same way that a normal type variable is a stand-in for a single
        type such as ``int``, a type variable *tuple* is a stand-in for a *tuple*
        type such as ``Tuple[int, str]``.

        Type variable tuples can be used in ``Generic`` declarations.
        Consider the following example::

            class Array(Generic[*Ts]): ...

        The ``Ts`` type variable tuple here behaves like ``tuple[T1, T2]``,
        where ``T1`` and ``T2`` are type variables. To use these type variables
        as type parameters of ``Array``, we must *unpack* the type variable tuple using
        the star operator: ``*Ts``. The signature of ``Array`` then behaves
        as if we had simply written ``class Array(Generic[T1, T2]): ...``.
        In contrast to ``Generic[T1, T2]``, however, ``Generic[*Shape]`` allows
        us to parameterise the class with an *arbitrary* number of type parameters.

        Type variable tuples can be used anywhere a normal ``TypeVar`` can.
        This includes class definitions, as shown above, as well as function
        signatures and variable annotations::

            class Array(Generic[*Ts]):

                def __init__(self, shape: Tuple[*Ts]):
                    self._shape: Tuple[*Ts] = shape

                def get_shape(self) -> Tuple[*Ts]:
                    return self._shape

            shape = (Height(480), Width(640))
            x: Array[Height, Width] = Array(shape)
            y = abs(x)  # Inferred type is Array[Height, Width]
            z = x + x   #        ...    is Array[Height, Width]
            x.get_shape()  #     ...    is tuple[Height, Width]

        """

        # Trick Generic __parameters__.
        __class__ = typing.TypeVar

        def __iter__(self):
            yield self.__unpacked__

        def __init__(self, name, *, default=_marker):
            self.__name__ = name
            _DefaultMixin.__init__(self, default)

            # for pickling:
            def_mod = _caller()
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

            self.__unpacked__ = Unpack[self]

        def __repr__(self):
            return self.__name__

        def __hash__(self):
            return object.__hash__(self)

        def __eq__(self, other):
            return self is other

        def __reduce__(self):
            return self.__name__

        def __init_subclass__(self, *args, **kwds):
            if '_root' not in kwds:
                raise TypeError("Cannot subclass special typing classes")


if hasattr(typing, "reveal_type"):
    reveal_type = typing.reveal_type
else:
    def reveal_type(__obj: T) -> T:
        """Reveal the inferred type of a variable.

        When a static type checker encounters a call to ``reveal_type()``,
        it will emit the inferred type of the argument::

            x: int = 1
            reveal_type(x)

        Running a static type checker (e.g., ``mypy``) on this example
        will produce output similar to 'Revealed type is "builtins.int"'.

        At runtime, the function prints the runtime type of the
        argument and returns it unchanged.

        """
        print(f"Runtime type is {type(__obj).__name__!r}", file=sys.stderr)
        return __obj


if hasattr(typing, "assert_never"):
    assert_never = typing.assert_never
else:
    def assert_never(__arg: Never) -> Never:
        """Assert to the type checker that a line of code is unreachable.

        Example::

            def int_or_str(arg: int | str) -> None:
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                    case _:
                        assert_never(arg)

        If a type checker finds that a call to assert_never() is
        reachable, it will emit an error.

        At runtime, this throws an exception when called.

        """
        raise AssertionError("Expected code to be unreachable")


if sys.version_info >= (3, 12):
    # dataclass_transform exists in 3.11 but lacks the frozen_default parameter
    dataclass_transform = typing.dataclass_transform
else:
    def dataclass_transform(
        *,
        eq_default: bool = True,
        order_default: bool = False,
        kw_only_default: bool = False,
        frozen_default: bool = False,
        field_specifiers: typing.Tuple[
            typing.Union[typing.Type[typing.Any], typing.Callable[..., typing.Any]],
            ...
        ] = (),
        **kwargs: typing.Any,
    ) -> typing.Callable[[T], T]:
        """Decorator that marks a function, class, or metaclass as providing
        dataclass-like behavior.

        Example:

            from pip._vendor.typing_extensions import dataclass_transform

            _T = TypeVar("_T")

            # Used on a decorator function
            @dataclass_transform()
            def create_model(cls: type[_T]) -> type[_T]:
                ...
                return cls

            @create_model
            class CustomerModel:
                id: int
                name: str

            # Used on a base class
            @dataclass_transform()
            class ModelBase: ...

            class CustomerModel(ModelBase):
                id: int
                name: str

            # Used on a metaclass
            @dataclass_transform()
            class ModelMeta(type): ...

            class ModelBase(metaclass=ModelMeta): ...

            class CustomerModel(ModelBase):
                id: int
                name: str

        Each of the ``CustomerModel`` classes defined in this example will now
        behave similarly to a dataclass created with the ``@dataclasses.dataclass``
        decorator. For example, the type checker will synthesize an ``__init__``
        method.

        The arguments to this decorator can be used to customize this behavior:
        - ``eq_default`` indicates whether the ``eq`` parameter is assumed to be
          True or False if it is omitted by the caller.
        - ``order_default`` indicates whether the ``order`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``kw_only_default`` indicates whether the ``kw_only`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``frozen_default`` indicates whether the ``frozen`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``field_specifiers`` specifies a static list of supported classes
          or functions that describe fields, similar to ``dataclasses.field()``.

        At runtime, this decorator records its arguments in the
        ``__dataclass_transform__`` attribute on the decorated object.

        See PEP 681 for details.

        """
        def decorator(cls_or_fn):
            cls_or_fn.__dataclass_transform__ = {
                "eq_default": eq_default,
                "order_default": order_default,
                "kw_only_default": kw_only_default,
                "frozen_default": frozen_default,
                "field_specifiers": field_specifiers,
                "kwargs": kwargs,
            }
            return cls_or_fn
        return decorator


if hasattr(typing, "override"):
    override = typing.override
else:
    _F = typing.TypeVar("_F", bound=typing.Callable[..., typing.Any])

    def override(__arg: _F) -> _F:
        """Indicate that a method is intended to override a method in a base class.

        Usage:

            class Base:
                def method(self) -> None: ...
                    pass

            class Child(Base):
                @override
                def method(self) -> None:
                    super().method()

        When this decorator is applied to a method, the type checker will
        validate that it overrides a method with the same name on a base class.
        This helps prevent bugs that may occur when a base class is changed
        without an equivalent change to a child class.

        There is no runtime checking of these properties. The decorator
        sets the ``__override__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.

        See PEP 698 for details.

        """
        try:
            __arg.__override__ = True
        except (AttributeError, TypeError):
            # Skip the attribute silently if it is not writable.
            # AttributeError happens if the object has __slots__ or a
            # read-only property, TypeError if it's a builtin class.
            pass
        return __arg


if hasattr(typing, "deprecated"):
    deprecated = typing.deprecated
else:
    _T = typing.TypeVar("_T")

    def deprecated(
        __msg: str,
        *,
        category: typing.Optional[typing.Type[Warning]] = DeprecationWarning,
        stacklevel: int = 1,
    ) -> typing.Callable[[_T], _T]:
        """Indicate that a class, function or overload is deprecated.

        Usage:

            @deprecated("Use B instead")
            class A:
                pass

            @deprecated("Use g instead")
            def f():
                pass

            @overload
            @deprecated("int support is deprecated")
            def g(x: int) -> int: ...
            @overload
            def g(x: str) -> int: ...

        When this decorator is applied to an object, the type checker
        will generate a diagnostic on usage of the deprecated object.

        The warning specified by ``category`` will be emitted on use
        of deprecated objects. For functions, that happens on calls;
        for classes, on instantiation. If the ``category`` is ``None``,
        no warning is emitted. The ``stacklevel`` determines where the
        warning is emitted. If it is ``1`` (the default), the warning
        is emitted at the direct caller of the deprecated object; if it
        is higher, it is emitted further up the stack.

        The decorator sets the ``__deprecated__``
        attribute on the decorated object to the deprecation message
        passed to the decorator. If applied to an overload, the decorator
        must be after the ``@overload`` decorator for the attribute to
        exist on the overload as returned by ``get_overloads()``.

        See PEP 702 for details.

        """
        def decorator(__arg: _T) -> _T:
            if category is None:
                __arg.__deprecated__ = __msg
                return __arg
            elif isinstance(__arg, type):
                original_new = __arg.__new__
                has_init = __arg.__init__ is not object.__init__

                @functools.wraps(original_new)
                def __new__(cls, *args, **kwargs):
                    warnings.warn(__msg, category=category, stacklevel=stacklevel + 1)
                    if original_new is not object.__new__:
                        return original_new(cls, *args, **kwargs)
                    # Mirrors a similar check in object.__new__.
                    elif not has_init and (args or kwargs):
                        raise TypeError(f"{cls.__name__}() takes no arguments")
                    else:
                        return original_new(cls)

                __arg.__new__ = staticmethod(__new__)
                __arg.__deprecated__ = __new__.__deprecated__ = __msg
                return __arg
            elif callable(__arg):
                @functools.wraps(__arg)
                def wrapper(*args, **kwargs):
                    warnings.warn(__msg, category=category, stacklevel=stacklevel + 1)
                    return __arg(*args, **kwargs)

                __arg.__deprecated__ = wrapper.__deprecated__ = __msg
                return wrapper
            else:
                raise TypeError(
                    "@deprecated decorator with non-None category must be applied to "
                    f"a class or callable, not {__arg!r}"
                )

        return decorator


# We have to do some monkey patching to deal with the dual nature of
# Unpack/TypeVarTuple:
# - We want Unpack to be a kind of TypeVar so it gets accepted in
#   Generic[Unpack[Ts]]
# - We want it to *not* be treated as a TypeVar for the purposes of
#   counting generic parameters, so that when we subscript a generic,
#   the runtime doesn't try to substitute the Unpack with the subscripted type.
if not hasattr(typing, "TypeVarTuple"):
    typing._collect_type_vars = _collect_type_vars
    typing._check_generic = _check_generic


# Backport typing.NamedTuple as it exists in Python 3.12.
# In 3.11, the ability to define generic `NamedTuple`s was supported.
# This was explicitly disallowed in 3.9-3.10, and only half-worked in <=3.8.
# On 3.12, we added __orig_bases__ to call-based NamedTuples
# On 3.13, we deprecated kwargs-based NamedTuples
if sys.version_info >= (3, 13):
    NamedTuple = typing.NamedTuple
else:
    def _make_nmtuple(name, types, module, defaults=()):
        fields = [n for n, t in types]
        annotations = {n: typing._type_check(t, f"field {n} annotation must be a type")
                       for n, t in types}
        nm_tpl = collections.namedtuple(name, fields,
                                        defaults=defaults, module=module)
        nm_tpl.__annotations__ = nm_tpl.__new__.__annotations__ = annotations
        # The `_field_types` attribute was removed in 3.9;
        # in earlier versions, it is the same as the `__annotations__` attribute
        if sys.version_info < (3, 9):
            nm_tpl._field_types = annotations
        return nm_tpl

    _prohibited_namedtuple_fields = typing._prohibited
    _special_namedtuple_fields = frozenset({'__module__', '__name__', '__annotations__'})

    class _NamedTupleMeta(type):
        def __new__(cls, typename, bases, ns):
            assert _NamedTuple in bases
            for base in bases:
                if base is not _NamedTuple and base is not typing.Generic:
                    raise TypeError(
                        'can only inherit from a NamedTuple type and Generic')
            bases = tuple(tuple if base is _NamedTuple else base for base in bases)
            types = ns.get('__annotations__', {})
            default_names = []
            for field_name in types:
                if field_name in ns:
                    default_names.append(field_name)
                elif default_names:
                    raise TypeError(f"Non-default namedtuple field {field_name} "
                                    f"cannot follow default field"
                                    f"{'s' if len(default_names) > 1 else ''} "
                                    f"{', '.join(default_names)}")
            nm_tpl = _make_nmtuple(
                typename, types.items(),
                defaults=[ns[n] for n in default_names],
                module=ns['__module__']
            )
            nm_tpl.__bases__ = bases
            if typing.Generic in bases:
                if hasattr(typing, '_generic_class_getitem'):  # 3.12+
                    nm_tpl.__class_getitem__ = classmethod(typing._generic_class_getitem)
                else:
                    class_getitem = typing.Generic.__class_getitem__.__func__
                    nm_tpl.__class_getitem__ = classmethod(class_getitem)
            # update from user namespace without overriding special namedtuple attributes
            for key in ns:
                if key in _prohibited_namedtuple_fields:
                    raise AttributeError("Cannot overwrite NamedTuple attribute " + key)
                elif key not in _special_namedtuple_fields and key not in nm_tpl._fields:
                    setattr(nm_tpl, key, ns[key])
            if typing.Generic in bases:
                nm_tpl.__init_subclass__()
            return nm_tpl

    _NamedTuple = type.__new__(_NamedTupleMeta, 'NamedTuple', (), {})

    def _namedtuple_mro_entries(bases):
        assert NamedTuple in bases
        return (_NamedTuple,)

    @_ensure_subclassable(_namedtuple_mro_entries)
    def NamedTuple(__typename, __fields=_marker, **kwargs):
        """Typed version of namedtuple.

        Usage::

            class Employee(NamedTuple):
                name: str
                id: int

        This is equivalent to::

            Employee = collections.namedtuple('Employee', ['name', 'id'])

        The resulting class has an extra __annotations__ attribute, giving a
        dict that maps field names to types.  (The field names are also in
        the _fields attribute, which is part of the namedtuple API.)
        An alternative equivalent functional syntax is also accepted::

            Employee = NamedTuple('Employee', [('name', str), ('id', int)])
        """
        if __fields is _marker:
            if kwargs:
                deprecated_thing = "Creating NamedTuple classes using keyword arguments"
                deprecation_msg = (
                    "{name} is deprecated and will be disallowed in Python {remove}. "
                    "Use the class-based or functional syntax instead."
                )
            else:
                deprecated_thing = "Failing to pass a value for the 'fields' parameter"
                example = f"`{__typename} = NamedTuple({__typename!r}, [])`"
                deprecation_msg = (
                    "{name} is deprecated and will be disallowed in Python {remove}. "
                    "To create a NamedTuple class with 0 fields "
                    "using the functional syntax, "
                    "pass an empty list, e.g. "
                ) + example + "."
        elif __fields is None:
            if kwargs:
                raise TypeError(
                    "Cannot pass `None` as the 'fields' parameter "
                    "and also specify fields using keyword arguments"
                )
            else:
                deprecated_thing = "Passing `None` as the 'fields' parameter"
                example = f"`{__typename} = NamedTuple({__typename!r}, [])`"
                deprecation_msg = (
                    "{name} is deprecated and will be disallowed in Python {remove}. "
                    "To create a NamedTuple class with 0 fields "
                    "using the functional syntax, "
                    "pass an empty list, e.g. "
                ) + example + "."
        elif kwargs:
            raise TypeError("Either list of fields or keywords"
                            " can be provided to NamedTuple, not both")
        if __fields is _marker or __fields is None:
            warnings.warn(
                deprecation_msg.format(name=deprecated_thing, remove="3.15"),
                DeprecationWarning,
                stacklevel=2,
            )
            __fields = kwargs.items()
        nt = _make_nmtuple(__typename, __fields, module=_caller())
        nt.__orig_bases__ = (NamedTuple,)
        return nt

    # On 3.8+, alter the signature so that it matches typing.NamedTuple.
    # The signature of typing.NamedTuple on >=3.8 is invalid syntax in Python 3.7,
    # so just leave the signature as it is on 3.7.
    if sys.version_info >= (3, 8):
        _new_signature = '(typename, fields=None, /, **kwargs)'
        if isinstance(NamedTuple, _types.FunctionType):
            NamedTuple.__text_signature__ = _new_signature
        else:
            NamedTuple.__call__.__text_signature__ = _new_signature


if hasattr(collections.abc, "Buffer"):
    Buffer = collections.abc.Buffer
else:
    class Buffer(abc.ABC):
        """Base class for classes that implement the buffer protocol.

        The buffer protocol allows Python objects to expose a low-level
        memory buffer interface. Before Python 3.12, it is not possible
        to implement the buffer protocol in pure Python code, or even
        to check whether a class implements the buffer protocol. In
        Python 3.12 and higher, the ``__buffer__`` method allows access
        to the buffer protocol from Python code, and the
        ``collections.abc.Buffer`` ABC allows checking whether a class
        implements the buffer protocol.

        To indicate support for the buffer protocol in earlier versions,
        inherit from this ABC, either in a stub file or at runtime,
        or use ABC registration. This ABC provides no methods, because
        there is no Python-accessible methods shared by pre-3.12 buffer
        classes. It is useful primarily for static checks.

        """

    # As a courtesy, register the most common stdlib buffer classes.
    Buffer.register(memoryview)
    Buffer.register(bytearray)
    Buffer.register(bytes)


# Backport of types.get_original_bases, available on 3.12+ in CPython
if hasattr(_types, "get_original_bases"):
    get_original_bases = _types.get_original_bases
else:
    def get_original_bases(__cls):
        """Return the class's "original" bases prior to modification by `__mro_entries__`.

        Examples::

            from typing import TypeVar, Generic
            from pip._vendor.typing_extensions import NamedTuple, TypedDict

            T = TypeVar("T")
            class Foo(Generic[T]): ...
            class Bar(Foo[int], float): ...
            class Baz(list[str]): ...
            Eggs = NamedTuple("Eggs", [("a", int), ("b", str)])
            Spam = TypedDict("Spam", {"a": int, "b": str})

            assert get_original_bases(Bar) == (Foo[int], float)
            assert get_original_bases(Baz) == (list[str],)
            assert get_original_bases(Eggs) == (NamedTuple,)
            assert get_original_bases(Spam) == (TypedDict,)
            assert get_original_bases(int) == (object,)
        """
        try:
            return __cls.__orig_bases__
        except AttributeError:
            try:
                return __cls.__bases__
            except AttributeError:
                raise TypeError(
                    f'Expected an instance of type, not {type(__cls).__name__!r}'
                ) from None


# NewType is a class on Python 3.10+, making it pickleable
# The error message for subclassing instances of NewType was improved on 3.11+
if sys.version_info >= (3, 11):
    NewType = typing.NewType
else:
    class NewType:
        """NewType creates simple unique types with almost zero
        runtime overhead. NewType(name, tp) is considered a subtype of tp
        by static type checkers. At runtime, NewType(name, tp) returns
        a dummy callable that simply returns its argument. Usage::
            UserId = NewType('UserId', int)
            def name_by_id(user_id: UserId) -> str:
                ...
            UserId('user')          # Fails type check
            name_by_id(42)          # Fails type check
            name_by_id(UserId(42))  # OK
            num = UserId(5) + 1     # type: int
        """

        def __call__(self, obj):
            return obj

        def __init__(self, name, tp):
            self.__qualname__ = name
            if '.' in name:
                name = name.rpartition('.')[-1]
            self.__name__ = name
            self.__supertype__ = tp
            def_mod = _caller()
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

        def __mro_entries__(self, bases):
            # We defined __mro_entries__ to get a better error message
            # if a user attempts to subclass a NewType instance. bpo-46170
            supercls_name = self.__name__

            class Dummy:
                def __init_subclass__(cls):
                    subcls_name = cls.__name__
                    raise TypeError(
                        f"Cannot subclass an instance of NewType. "
                        f"Perhaps you were looking for: "
                        f"`{subcls_name} = NewType({subcls_name!r}, {supercls_name})`"
                    )

            return (Dummy,)

        def __repr__(self):
            return f'{self.__module__}.{self.__qualname__}'

        def __reduce__(self):
            return self.__qualname__

        if sys.version_info >= (3, 10):
            # PEP 604 methods
            # It doesn't make sense to have these methods on Python <3.10

            def __or__(self, other):
                return typing.Union[self, other]

            def __ror__(self, other):
                return typing.Union[other, self]


if hasattr(typing, "TypeAliasType"):
    TypeAliasType = typing.TypeAliasType
else:
    def _is_unionable(obj):
        """Corresponds to is_unionable() in unionobject.c in CPython."""
        return obj is None or isinstance(obj, (
            type,
            _types.GenericAlias,
            _types.UnionType,
            TypeAliasType,
        ))

    class TypeAliasType:
        """Create named, parameterized type aliases.

        This provides a backport of the new `type` statement in Python 3.12:

            type ListOrSet[T] = list[T] | set[T]

        is equivalent to:

            T = TypeVar("T")
            ListOrSet = TypeAliasType("ListOrSet", list[T] | set[T], type_params=(T,))

        The name ListOrSet can then be used as an alias for the type it refers to.

        The type_params argument should contain all the type parameters used
        in the value of the type alias. If the alias is not generic, this
        argument is omitted.

        Static type checkers should only support type aliases declared using
        TypeAliasType that follow these rules:

        - The first argument (the name) must be a string literal.
        - The TypeAliasType instance must be immediately assigned to a variable
          of the same name. (For example, 'X = TypeAliasType("Y", int)' is invalid,
          as is 'X, Y = TypeAliasType("X", int), TypeAliasType("Y", int)').

        """

        def __init__(self, name: str, value, *, type_params=()):
            if not isinstance(name, str):
                raise TypeError("TypeAliasType name must be a string")
            self.__value__ = value
            self.__type_params__ = type_params

            parameters = []
            for type_param in type_params:
                if isinstance(type_param, TypeVarTuple):
                    parameters.extend(type_param)
                else:
                    parameters.append(type_param)
            self.__parameters__ = tuple(parameters)
            def_mod = _caller()
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod
            # Setting this attribute closes the TypeAliasType from further modification
            self.__name__ = name

        def __setattr__(self, __name: str, __value: object) -> None:
            if hasattr(self, "__name__"):
                self._raise_attribute_error(__name)
            super().__setattr__(__name, __value)

        def __delattr__(self, __name: str) -> Never:
            self._raise_attribute_error(__name)

        def _raise_attribute_error(self, name: str) -> Never:
            # Match the Python 3.12 error messages exactly
            if name == "__name__":
                raise AttributeError("readonly attribute")
            elif name in {"__value__", "__type_params__", "__parameters__", "__module__"}:
                raise AttributeError(
                    f"attribute '{name}' of 'typing.TypeAliasType' objects "
                    "is not writable"
                )
            else:
                raise AttributeError(
                    f"'typing.TypeAliasType' object has no attribute '{name}'"
                )

        def __repr__(self) -> str:
            return self.__name__

        def __getitem__(self, parameters):
            if not isinstance(parameters, tuple):
                parameters = (parameters,)
            parameters = [
                typing._type_check(
                    item, f'Subscripting {self.__name__} requires a type.'
                )
                for item in parameters
            ]
            return typing._GenericAlias(self, tuple(parameters))

        def __reduce__(self):
            return self.__name__

        def __init_subclass__(cls, *args, **kwargs):
            raise TypeError(
                "type 'typing_extensions.TypeAliasType' is not an acceptable base type"
            )

        # The presence of this method convinces typing._type_check
        # that TypeAliasTypes are types.
        def __call__(self):
            raise TypeError("Type alias is not callable")

        if sys.version_info >= (3, 10):
            def __or__(self, right):
                # For forward compatibility with 3.12, reject Unions
                # that are not accepted by the built-in Union.
                if not _is_unionable(right):
                    return NotImplemented
                return typing.Union[self, right]

            def __ror__(self, left):
                if not _is_unionable(left):
                    return NotImplemented
                return typing.Union[left, self]


if hasattr(typing, "is_protocol"):
    is_protocol = typing.is_protocol
    get_protocol_members = typing.get_protocol_members
else:
    def is_protocol(__tp: type) -> bool:
        """Return True if the given type is a Protocol.

        Example::

            >>> from typing_extensions import Protocol, is_protocol
            >>> class P(Protocol):
            ...     def a(self) -> str: ...
            ...     b: int
            >>> is_protocol(P)
            True
            >>> is_protocol(int)
            False
        """
        return (
            isinstance(__tp, type)
            and getattr(__tp, '_is_protocol', False)
            and __tp is not Protocol
            and __tp is not getattr(typing, "Protocol", object())
        )

    def get_protocol_members(__tp: type) -> typing.FrozenSet[str]:
        """Return the set of members defined in a Protocol.

        Example::

            >>> from typing_extensions import Protocol, get_protocol_members
            >>> class P(Protocol):
            ...     def a(self) -> str: ...
            ...     b: int
            >>> get_protocol_members(P)
            frozenset({'a', 'b'})

        Raise a TypeError for arguments that are not Protocols.
        """
        if not is_protocol(__tp):
            raise TypeError(f'{__tp!r} is not a Protocol')
        if hasattr(__tp, '__protocol_attrs__'):
            return frozenset(__tp.__protocol_attrs__)
        return frozenset(_get_protocol_attrs(__tp))


# Aliases for items that have always been in typing.
# Explicitly assign these (rather than using `from typing import *` at the top),
# so that we get a CI error if one of these is deleted from typing.py
# in a future version of Python
AbstractSet = typing.AbstractSet
AnyStr = typing.AnyStr
BinaryIO = typing.BinaryIO
Callable = typing.Callable
Collection = typing.Collection
Container = typing.Container
Dict = typing.Dict
ForwardRef = typing.ForwardRef
FrozenSet = typing.FrozenSet
Generator = typing.Generator
Generic = typing.Generic
Hashable = typing.Hashable
IO = typing.IO
ItemsView = typing.ItemsView
Iterable = typing.Iterable
Iterator = typing.Iterator
KeysView = typing.KeysView
List = typing.List
Mapping = typing.Mapping
MappingView = typing.MappingView
Match = typing.Match
MutableMapping = typing.MutableMapping
MutableSequence = typing.MutableSequence
MutableSet = typing.MutableSet
Optional = typing.Optional
Pattern = typing.Pattern
Reversible = typing.Reversible
Sequence = typing.Sequence
Set = typing.Set
Sized = typing.Sized
TextIO = typing.TextIO
Tuple = typing.Tuple
Union = typing.Union
ValuesView = typing.ValuesView
cast = typing.cast
no_type_check = typing.no_type_check
no_type_check_decorator = typing.no_type_check_decorator
python3.12/site-packages/pip/_vendor/requests.pyi000064400000000026151732703100015730 0ustar00from requests import *python3.12/site-packages/pip/_vendor/cachecontrol/serialize.py000064400000016005151732703100020343 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import io
from typing import IO, TYPE_CHECKING, Any, Mapping, cast

from pip._vendor import msgpack
from pip._vendor.requests.structures import CaseInsensitiveDict
from pip._vendor.urllib3 import HTTPResponse

if TYPE_CHECKING:
    from pip._vendor.requests import PreparedRequest


class Serializer:
    serde_version = "4"

    def dumps(
        self,
        request: PreparedRequest,
        response: HTTPResponse,
        body: bytes | None = None,
    ) -> bytes:
        response_headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(
            response.headers
        )

        if body is None:
            # When a body isn't passed in, we'll read the response. We
            # also update the response with a new file handler to be
            # sure it acts as though it was never read.
            body = response.read(decode_content=False)
            response._fp = io.BytesIO(body)  # type: ignore[attr-defined]
            response.length_remaining = len(body)

        data = {
            "response": {
                "body": body,  # Empty bytestring if body is stored separately
                "headers": {str(k): str(v) for k, v in response.headers.items()},  # type: ignore[no-untyped-call]
                "status": response.status,
                "version": response.version,
                "reason": str(response.reason),
                "decode_content": response.decode_content,
            }
        }

        # Construct our vary headers
        data["vary"] = {}
        if "vary" in response_headers:
            varied_headers = response_headers["vary"].split(",")
            for header in varied_headers:
                header = str(header).strip()
                header_value = request.headers.get(header, None)
                if header_value is not None:
                    header_value = str(header_value)
                data["vary"][header] = header_value

        return b",".join([f"cc={self.serde_version}".encode(), self.serialize(data)])

    def serialize(self, data: dict[str, Any]) -> bytes:
        return cast(bytes, msgpack.dumps(data, use_bin_type=True))

    def loads(
        self,
        request: PreparedRequest,
        data: bytes,
        body_file: IO[bytes] | None = None,
    ) -> HTTPResponse | None:
        # Short circuit if we've been given an empty set of data
        if not data:
            return None

        # Determine what version of the serializer the data was serialized
        # with
        try:
            ver, data = data.split(b",", 1)
        except ValueError:
            ver = b"cc=0"

        # Make sure that our "ver" is actually a version and isn't a false
        # positive from a , being in the data stream.
        if ver[:3] != b"cc=":
            data = ver + data
            ver = b"cc=0"

        # Get the version number out of the cc=N
        verstr = ver.split(b"=", 1)[-1].decode("ascii")

        # Dispatch to the actual load method for the given version
        try:
            return getattr(self, f"_loads_v{verstr}")(request, data, body_file)  # type: ignore[no-any-return]

        except AttributeError:
            # This is a version we don't have a loads function for, so we'll
            # just treat it as a miss and return None
            return None

    def prepare_response(
        self,
        request: PreparedRequest,
        cached: Mapping[str, Any],
        body_file: IO[bytes] | None = None,
    ) -> HTTPResponse | None:
        """Verify our vary headers match and construct a real urllib3
        HTTPResponse object.
        """
        # Special case the '*' Vary value as it means we cannot actually
        # determine if the cached response is suitable for this request.
        # This case is also handled in the controller code when creating
        # a cache entry, but is left here for backwards compatibility.
        if "*" in cached.get("vary", {}):
            return None

        # Ensure that the Vary headers for the cached response match our
        # request
        for header, value in cached.get("vary", {}).items():
            if request.headers.get(header, None) != value:
                return None

        body_raw = cached["response"].pop("body")

        headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(
            data=cached["response"]["headers"]
        )
        if headers.get("transfer-encoding", "") == "chunked":
            headers.pop("transfer-encoding")

        cached["response"]["headers"] = headers

        try:
            body: IO[bytes]
            if body_file is None:
                body = io.BytesIO(body_raw)
            else:
                body = body_file
        except TypeError:
            # This can happen if cachecontrol serialized to v1 format (pickle)
            # using Python 2. A Python 2 str(byte string) will be unpickled as
            # a Python 3 str (unicode string), which will cause the above to
            # fail with:
            #
            #     TypeError: 'str' does not support the buffer interface
            body = io.BytesIO(body_raw.encode("utf8"))

        # Discard any `strict` parameter serialized by older version of cachecontrol.
        cached["response"].pop("strict", None)

        return HTTPResponse(body=body, preload_content=False, **cached["response"])

    def _loads_v0(
        self,
        request: PreparedRequest,
        data: bytes,
        body_file: IO[bytes] | None = None,
    ) -> None:
        # The original legacy cache data. This doesn't contain enough
        # information to construct everything we need, so we'll treat this as
        # a miss.
        return None

    def _loads_v1(
        self,
        request: PreparedRequest,
        data: bytes,
        body_file: IO[bytes] | None = None,
    ) -> HTTPResponse | None:
        # The "v1" pickled cache format. This is no longer supported
        # for security reasons, so we treat it as a miss.
        return None

    def _loads_v2(
        self,
        request: PreparedRequest,
        data: bytes,
        body_file: IO[bytes] | None = None,
    ) -> HTTPResponse | None:
        # The "v2" compressed base64 cache format.
        # This has been removed due to age and poor size/performance
        # characteristics, so we treat it as a miss.
        return None

    def _loads_v3(
        self,
        request: PreparedRequest,
        data: bytes,
        body_file: IO[bytes] | None = None,
    ) -> None:
        # Due to Python 2 encoding issues, it's impossible to know for sure
        # exactly how to load v3 entries, thus we'll treat these as a miss so
        # that they get rewritten out as v4 entries.
        return None

    def _loads_v4(
        self,
        request: PreparedRequest,
        data: bytes,
        body_file: IO[bytes] | None = None,
    ) -> HTTPResponse | None:
        try:
            cached = msgpack.loads(data, raw=False)
        except ValueError:
            return None

        return self.prepare_response(request, cached, body_file)
python3.12/site-packages/pip/_vendor/cachecontrol/cache.py000064400000003640151732703100017420 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0

"""
The cache object API for implementing caches. The default is a thread
safe in-memory dictionary.
"""
from __future__ import annotations

from threading import Lock
from typing import IO, TYPE_CHECKING, MutableMapping

if TYPE_CHECKING:
    from datetime import datetime


class BaseCache:
    def get(self, key: str) -> bytes | None:
        raise NotImplementedError()

    def set(
        self, key: str, value: bytes, expires: int | datetime | None = None
    ) -> None:
        raise NotImplementedError()

    def delete(self, key: str) -> None:
        raise NotImplementedError()

    def close(self) -> None:
        pass


class DictCache(BaseCache):
    def __init__(self, init_dict: MutableMapping[str, bytes] | None = None) -> None:
        self.lock = Lock()
        self.data = init_dict or {}

    def get(self, key: str) -> bytes | None:
        return self.data.get(key, None)

    def set(
        self, key: str, value: bytes, expires: int | datetime | None = None
    ) -> None:
        with self.lock:
            self.data.update({key: value})

    def delete(self, key: str) -> None:
        with self.lock:
            if key in self.data:
                self.data.pop(key)


class SeparateBodyBaseCache(BaseCache):
    """
    In this variant, the body is not stored mixed in with the metadata, but is
    passed in (as a bytes-like object) in a separate call to ``set_body()``.

    That is, the expected interaction pattern is::

        cache.set(key, serialized_metadata)
        cache.set_body(key)

    Similarly, the body should be loaded separately via ``get_body()``.
    """

    def set_body(self, key: str, body: bytes) -> None:
        raise NotImplementedError()

    def get_body(self, key: str) -> IO[bytes] | None:
        """
        Return the body as file-like object.
        """
        raise NotImplementedError()
python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-312.pyc000064400000015126151732703100025102 0ustar00�

R`i�����ddlmZddlZddlZddlmZmZmZddlmZm	Z	m
Z
ddlmZm
Z
mZerddlmZdZddd�Zdd	�ZGd
�d�ZGd�d
e�ZGd�de�ZGd�de�Zy)�)�annotationsN)�datetime�	timedelta�timezone)�
formatdate�	parsedate�parsedate_tz)�
TYPE_CHECKING�Any�Mapping)�HTTPResponsez%a, %d %b %Y %H:%M:%S GMTc�Z�|xs#tjtj�}||zS�N)r�nowr�utc)�delta�dates  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/heuristics.py�expire_afterrs#���-�8�<�<����-�D��%�<��c�Z�ttj|j���Sr)r�calendar�timegm�	timetuple)�dts r�datetime_to_headerrs���h�o�o�b�l�l�n�5�6�6rc�$�eZdZdd�Zdd�Zdd�Zy)�
BaseHeuristicc��y)a!
        Return a valid 1xx warning header value describing the cache
        adjustments.

        The response is provided too allow warnings like 113
        http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need
        to explicitly say response is over 24 hours old.
        z110 - "Response is Stale"���self�responses  r�warningzBaseHeuristic.warnings��+rc��iS)z�Update the response headers with any new headers.

        NOTE: This SHOULD always include some Warning header to
              signify that the response was cached by the client, not
              by way of the provided headers.
        r r!s  r�update_headerszBaseHeuristic.update_headers's	���	rc���|j|�}|rK|jj|�|j|�}|�|jjd|i�|S)N�Warning)r&�headers�updater$)r"r#�updated_headers�warning_header_values    r�applyzBaseHeuristic.apply0s]���-�-�h�7������#�#�O�4�#'�<�<��#9� �#�/�� � �'�'��4H�(I�J��rN�r#r
�return�
str | None�r#r
r/�dict[str, str])r#r
r/r
)�__name__�
__module__�__qualname__r$r&r-r rrrrs��	+��	rrc��eZdZdZdd�Zy)�OneDayCachezM
    Cache the response by providing an expires 1 day in the
    future.
    c���i}d|jvr\t|jd�}ttd��t	|dddt
ji���}t|�|d<d|d	<|S)
N�expiresr�)�days��tzinfo)r�public�
cache-control)r)rrrrrrr)r"r#r)rr9s     rr&zOneDayCache.update_headersBsp�����H�,�,�,��X�-�-�f�5�6�D�"�9�!�#4�8�T�"�1�X�;c�V^�Vb�Vb�;c�d�G�!3�G�!<�G�I��'/�G�O�$��rNr1)r3r4r5�__doc__r&r rrr7r7<s���
rr7c�(�eZdZdZdd�Zdd�Zdd�Zy)	�ExpiresAfterz;
    Cache **all** requests for a defined time period.
    c�$�tdi|��|_y)Nr )rr)r"�kws  r�__init__zExpiresAfter.__init__Rs���_��_��
rc�H�t|j�}t|�dd�S)Nr>)r9r?)rrr)r"r#r9s   rr&zExpiresAfter.update_headersUs ���t�z�z�*��-�g�6��R�Rrc�$�d}||jzS)Nz:110 - Automatically cached for %s. Response might be stale)r)r"r#�tmpls   rr$zExpiresAfter.warningYs��K���d�j�j� � rN)rDrr/�Noner1r.)r3r4r5r@rEr&r$r rrrBrBMs���%�S�!rrBc�(�eZdZdZhd�Zdd�Zdd�Zy)�LastModifieda�
    If there is no Expires header already, fall back on Last-Modified
    using the heuristic from
    http://tools.ietf.org/html/rfc7234#section-4.2.2
    to calculate a reasonable value.

    Firefox also does something like this per
    https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ
    http://lxr.mozilla.org/mozilla-release/source/netwerk/protocol/http/nsHttpResponseHead.cpp#397
    Unlike mozilla we limit this to 24-hr.
    >�,�-�������������c� �|j}d|vriSd|vr
|ddk7riS|j|jvriSd|vsd|vriSt|d�}|�J�t	j
|dd�}t
|d�}|�iStj�}td||z
�}|t	j
|�z
}tdt|dzd	��}	|	|kriS||	z}
dtjttj|
��iS)
Nr9r?r>rz
last-modifiedr<r�
i�Q)
r)�status�cacheable_by_default_statusesr	rrr�time�max�min�strftime�TIME_FMT�gmtime)r"�respr)�
time_tupler�
last_modifiedr�current_ager�freshness_lifetimer9s           rr&zLastModified.update_headersys!��%)�\�\������I��g�%�'�/�*B�h�*N��I��;�;�d�@�@�@��I��� �O�7�$B��I�!�'�&�/�2�
��%�%�%����z�"�1�~�.��!�'�/�":�;�
�� ��I��i�i�k���!�S�4�Z�(���x���}�5�5�� ��C���
�I�$>�?����,��I��+�+���4�=�=��4�;�;�w�3G�H�I�Irc��yrr )r"ras  rr$zLastModified.warning�s��rN)rar
r/r2)rar
r/r0)r3r4r5r@rZr&r$r rrrKrK^s��
�%�!�J�@rrKr)rrrzdatetime | Noner/r)rrr/�str)�
__future__rrr[rrr�email.utilsrrr	�typingr
rr�pip._vendor.urllib3r
r_rrrr7rBrKr rr�<module>rlsf��#���2�2�;�;�.�.��0�&���
7���B�-��"!�=�!�"<�=�<rpython3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-312.pyc000064400000001666151732703100024463 0ustar00�

R`i����dZdZdZdZddlmZddlmZddlm	Z	gd�Z
dd	lZeje
�jej��y	)
zbCacheControl import Interface.

Make it easy to import from cachecontrol without long namespaces.
zEric Larsonzeric@ionrock.orgz0.13.1�)�CacheControlAdapter)�CacheController)�CacheControl)�
__author__�	__email__�__version__rrrN)�__doc__rrr� pip._vendor.cachecontrol.adapterr�#pip._vendor.cachecontrol.controllerr� pip._vendor.cachecontrol.wrapperr�__all__�logging�	getLogger�__name__�
addHandler�NullHandler����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py�<module>rsW��
��
��	���@�?�9��������(��&�&�':�w�':�':�'<�=rpython3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/controller.cpython-312.pyc000064400000037527151732703100025114 0ustar00�

R`i�G���dZddlmZddlZddlZddlZddlZddlmZddl	m
Z
mZmZddl
mZddlmZmZddlmZe
rdd	l	mZdd
lmZddlmZddlmZej4e�Zej:d
�ZdZdd�Z Gd�d�Z!y)z7
The httplib2 algorithms ported for use with requests.
�)�annotationsN)�parsedate_tz)�
TYPE_CHECKING�
Collection�Mapping)�CaseInsensitiveDict)�	DictCache�SeparateBodyBaseCache)�
Serializer)�Literal)�PreparedRequest)�HTTPResponse)�	BaseCachez9^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?)�-�4c��tj|�}|�J�|j�}|d|d|d|d|dfS)z�Parses a URI using the regex given in Appendix B of RFC 3986.

    (scheme, authority, path, query, fragment) = parse_uri(uri)
    �����)�URI�match�groups)�urirrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py�	parse_urir%sM��

�I�I�c�N�E�����
�\�\�^�F��1�I�v�a�y�&��)�V�A�Y��q�	�B�B�c���eZdZdZ				d
							dd�Zedd��Zedd��Zdd�Zdd�Z	dd�Z
dd	�Z		d											dd
�Z		d									dd�Z
						dd�Zy)�CacheControllerz4An interface to see if request should cached or not.Nc�t�|�
t�n||_||_|xs
t�|_|xsd|_y)N)����i,rr)r	�cache�cache_etagsr�
serializer�cacheable_status_codes)�selfr$r%r&�status_codess     r�__init__zCacheController.__init__3s7��%*�M�Y�[�u��
�&���$�4�
����&2�&O�6O��#rc���t|�\}}}}}|r|std|z��|j�}|j�}|sd}|xrdj||g�xs|}|dz|z|z}|S)z4Normalize the URL to create a safe key for the cachez(Only absolute URIs are allowed. uri = %s�/�?z://)r�	Exception�lower�join)	�clsr�scheme�	authority�path�query�fragment�request_uri�
defrag_uris	         r�_urlnormzCacheController._urlnorm?s���6?�s�^�2���D�%���Y��F��L�M�M�������O�O�%�	���D��7����$��� 7�?�4���e�^�i�/�+�=�
��rc�$�|j|�S)N)r9)r1rs  r�	cache_urlzCacheController.cache_urlSs���|�|�C� � rc
��tdftdftdfddddddddtdfd�}|jd|jdd��}i}|jd�D]j}|j�s�|jd	d
�}|dj�}	||\}}	|r|	sd||<|s�N	||d
j��||<�l|S#t$rt
j
d|�Y��wxYw#t$r|	rt
j
d
|�Y��t$r$t
j
d||j�Y��wxYw)NTF)NF)�max-agez	max-stale�	min-fresh�no-cache�no-storezno-transformzonly-if-cachedzmust-revalidate�public�privatezproxy-revalidatezs-maxagez
cache-controlz
Cache-Control��,�=rrz,Ignoring unknown cache-control directive: %sz-Missing value for cache-control directive: %sz8Invalid value for cache-control directive %s, must be %s)
�int�get�split�strip�KeyError�logger�debug�
IndexError�
ValueError�__name__)
r(�headers�known_directives�
cc_headers�retval�cc_directive�parts�	directive�typ�requireds
          r�parse_cache_controlz#CacheController.parse_cache_controlWsa���T�{��u���t��%�%�)�+�,�#�$� -��d��
�� �[�[��'�+�+�o�r�2R�S�
�(*��&�,�,�S�1�L��%�%�'�� �&�&�s�A�.�E��a����(�I�
� 0�� ;�
��X�
�h�$(��y�!��
�(+�E�!�H�N�N�,<�(=�F�9�%�#2�>�
��-�
����K�Y�W��
��"������N�%���"���L�L�U�!������s*�C�,C1�C.�-C.�1!E�)E�?Ec�d�|j}|�J�|jj|�}|�tj	d�yt|jt�r|jj|�}nd}|jj|||�}|�tjd�|S)zO
        Load a cached response, or return None if it's not available.
        NzNo cache entry availablez1Cache entry deserialization failed, entry ignored)�urlr$rGrKrL�
isinstancer
�get_bodyr&�loads�warning)r(�requestr;�
cache_data�	body_file�results      r�_load_from_cachez CacheController._load_from_cache�s����K�K�	��$�$�$��Z�Z�^�^�I�.�
����L�L�3�4���d�j�j�"7�8��
�
�+�+�I�6�I��I����&�&�w�
�I�F���>��N�N�N�O��
rc���|j�J�|j|j�}tjd|�|j	|j
�}d|vrtjd�yd|vr|ddk(rtjd�y|j
|�}|syt|j�tvrd	}tj|�|St|j
�}|rd
|vrJd|vr0tjd�|jj|�tjd
�ytj�}t|d
�}|�J�tj |dd�}	t#d||	z
�}
tjd|
�|j	|�}d}|j%d�}
|
�|
}tjd|�nQd|vrMt|d�}|�=tj |dd�|	z
}t#d|�}tjd|�|j%d�}
|
�|
}tjd|�|j%d�}|�|
|z
}
tjd|
�||
kDr.tjd�tjd||
�|Sd|vr0tjd�|jj|�y)ze
        Return a cached response if it exists in the cache, otherwise
        return False.
        NzLooking up "%s" in the cacher?z-Request header has "no-cache", cache bypassedFr=rz1Request header has "max_age" as 0, cache bypassedzQReturning cached permanent redirect response (ignoring date and etag information)�date�etagz(Purging cached response: no date or etagz!Ignoring cached response: no daterzCurrent age based on date: %iz#Freshness lifetime from max-age: %i�expiresz#Freshness lifetime from expires: %iz+Freshness lifetime from request max-age: %ir>z'Adjusted current age from min-fresh: %iz2The response is "fresh", returning cached responsez%i > %iz4The cached response is "stale" with no etag, purging)r[r;rKrLrYrPrdrF�status�PERMANENT_REDIRECT_STATUSESrr$�delete�timer�calendar�timegm�maxrG)r(r`r;�cc�resp�msgrP�now�
time_tuplerf�current_age�resp_cc�freshness_lifetime�max_agerh�expire_time�	min_freshs                 r�cached_requestzCacheController.cached_request�s���
�{�{�&�&�&��N�N�7�;�;�/�	����3�Y�?�
�
%�
%�g�o�o�
6������L�L�H�I����?�r�)�}��1��L�L�L�M���$�$�W�-�����t�{�{��:�:�7�
�
�L�L����K�,?����,M���&��/��W�$����G�H��
�
�!�!�)�,��L�L�<�=���i�i�k��!�'�&�/�2�
��%�%�%����z�"�1�~�.���!�S�4�Z�(�����4�k�B��*�*�7�3�����+�+�i�(����!(���L�L�>�@R�S��'�
!�"�7�9�#5�6�G��"�&�o�o�g�b�q�k�:�T�A��%(��K�%8�"����B�DV�W��&�&��#����!(���L�L�=�?Q�
��F�F�;�'�	�� ��9�$�K��L�L�B�K�P���+��L�L�M�N��L�L��$6��D��K��� ��L�L�O�P��J�J���i�(�rc��|j|�}i}|r-t|j�}d|vr|d|d<d|vr|d|d<|S)Nrg�ETagz
If-None-Matchz
last-modifiedz
Last-ModifiedzIf-Modified-Since)rdrrP)r(r`rq�new_headersrPs     r�conditional_headersz#CacheController.conditional_headerss\���$�$�W�-�����0C�D�L�L�0Q�G��� �/6�v���O�,��'�)�3:�?�3K��/�0��rc�\�t|jt�rY|jj||jj||d�|��|�|jj
||�yy|jj||jj|||�|��y)z.
        Store the data in the cache.
        r)rhN)r\r$r
�setr&�dumps�set_body)r(r;r`�response�body�expires_times      r�
_cache_setzCacheController._cache_sets����d�j�j�"7�8�
�J�J�N�N�����%�%�g�x��=�$�
�
����
�
�#�#�I�t�4� �
�J�J�N�N�����%�%�g�x��>�$�
�
rc�D�|xs|j}|j|vr"tjd|j|�yt	|j
�}d|vr+t
|d�}|�J�tj|dd�}nd}|�2d|vr.|dj�rt|d�t|�k7ry|j|j
�}	|j|�}
|j�J�|j|j�}tjd|�d}d	|
vrd
}tjd�d	|	vrd
}tjd�|rK|jj!|�r0tjd
�|jj#|�|ryd|j!dd�vrtjd�y|j$r�d|vr�d}
|j!d�r+t
|d�}|�tj|dd�|z
}
t'|
d�}
tjd|
�d��tjd�|j)|||||
�yt|j�t*vr*tjd�|j)|||d�yd|vr�t
|d�}|�J�tj|dd�}|
j!d�}|�2|dkDr-tjd�|}
|j)|||||
�yd|vrn|drht
|d�}|�tj|dd�|z
}
nd}
tjdj-|
��|j)|||||
�yyyy)zc
        Algorithm for caching requests.

        This assumes a requests Response object.
        zStatus code %s not in %sNrfrr�content-lengthz&Updating cache with response from "%s"Fr@TzResponse header has "no-store"zRequest header has "no-store"z0Purging existing cache entry to honor "no-store"�*�varyrCzResponse header has "Vary: *"rgrhiuzetag object cached for z secondszCaching due to etagzCaching permanent redirectrr=z'Caching b/c date exists and max-age > 0z4Caching b/c of expires header. expires in {} seconds)r'rirKrLrrPrrmrn�isdigitrF�lenrYr[r;r$rGrkr%ror�rj�format)r(r`r�r�r)r'�response_headersrtrf�cc_reqrpr;�no_storer�rhrxs                r�cache_responsezCacheController.cache_response=s���".�!L��1L�1L���?�?�"8�8��L�L�*�H�O�O�=S�
�
�5H����6
���%�%�%�&6�v�&>�?�J��)�)�)��?�?�:�b�q�>�2�D��D�
�� �$4�4� �!1�2�:�:�<��$�%5�6�7�3�t�9�D���)�)�'�/�/�:��
�
%�
%�&6�
7���{�{�&�&�&��N�N�7�;�;�/�	����=�y�I�������H��L�L�9�:�����H��L�L�8�9���
�
���y�1��L�L�K�L��J�J���i�(����"�&�&�v�r�2�2��L�L�8�9������*:� :��L��#�#�I�.�&�'7�	�'B�C���&�#+�?�?�7�2�A�;�#?�$�#F�L��|�Z�8�L��L�L�2�<�.��I�J��L�L�.�/��O�O�I�w��$��M�����
!�%@�
@��L�L�5�6��O�O�I�w��#�>�
�'�
'�%�&6�v�&>�?�J��)�)�)��?�?�:�b�q�>�2�D��f�f�Y�'�G��"�w��{����F�G�&��������� ���.�.�#�I�.�*�+;�I�+F�G�G��*�'/���w�r��{�'C�d�'J��'+���L�L�N�U�U�(���
�O�O�!�� ��$��/�/�'(rc�z�|j�J�|j|j�}|j|�}|s|Sdg}|jj	|jj�D��cic]\}}|j
�|vr||��c}}�d|_|j|||�|Scc}}w)z�On a 304 we will get a new set of headers that we want to
        update our cached value with, assuming we have one.

        This should only ever be called when we've sent an ETag and
        gotten a 304 as the response.
        r�r")	r[r;rdrP�update�itemsr/rir�)r(r`r�r;�cached_response�excluded_headers�k�vs        r�update_cached_responsez&CacheController.update_cached_response�s����{�{�&�&�&��N�N�7�;�;�/�	��/�/��8����O�-�-�����&�&�%�,�,�2�2�4�
�4�D�A�q��7�7�9�$4�4��1��4�
�	
�"%���	
���	�7�O�<����
s�4B7
)NTNN)r$zBaseCache | Noner%�boolr&zSerializer | Noner)�Collection[int] | None)r�str�returnr�)rPzMapping[str, str]r�zdict[str, int | None])r`r
r�zHTTPResponse | None)r`r
r�zHTTPResponse | Literal[False])r`r
r�zdict[str, str])NN)r;r�r`r
r�rr��bytes | Noner�z
int | Noner��None)
r`r
r�rr�r�r)r�r�r�)r`r
r�rr�r)rO�
__module__�__qualname__�__doc__r*�classmethodr9r;rYrdr{rr�r�r��rrr r 0s+��>�#'� �(,�/3�
P��
P��
P�&�	
P�
-�
P�����&�!��!�4�l�*l�\
�("�#'�
���!���	�
��!�
�
��D"�/3�G� �G��G��	G�
-�G�
�
G�R(�&�(�2>�(�	�(rr )rr�r�ztuple[str, str, str, str, str])"r��
__future__rrm�logging�rerl�email.utilsr�typingrrr�pip._vendor.requests.structuresr�pip._vendor.cachecontrol.cacher	r
�"pip._vendor.cachecontrol.serializerr�pip._vendor.requestsr
�pip._vendor.urllib3rr�	getLoggerrOrK�compilerrjrr r�rr�<module>r�sw��
�#���	��$�5�5�?�K�9���4�0�8�	��	�	�8�	$���b�j�j�M�N��(��C�~�~rpython3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-312.pyc000064400000003272151732703110024400 0ustar00�

R`i����ddlmZddlmZmZddlmZddlmZerddl	m
Z
ddlmZddlm
Z
ddlmZdd	lmZ							d																	d
d�Zy
)�)�annotations)�
TYPE_CHECKING�
Collection)�CacheControlAdapter)�	DictCache)�requests)�	BaseCache)�CacheController)�
BaseHeuristic)�
SerializerNc��|�
t�n|}|xst}|||||||��}|jd|�|jd|�|S)N)�cache_etags�
serializer�	heuristic�controller_class�cacheable_methodszhttp://zhttps://)rr�mount)	�sess�cacherrrr�
adapter_classr�adapters	         ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py�CacheControlrs[��!�=�I�K�e�E�!�8�%8�M��
����)�+�
�G�	�J�J�y�'�"��J�J�z�7�#��K�)NTNNNNN)r�requests.SessionrzBaseCache | Noner�boolrzSerializer | NonerzBaseHeuristic | Nonerztype[CacheController] | Nonerz type[CacheControlAdapter] | NonerzCollection[str] | None�returnr)�
__future__r�typingrr� pip._vendor.cachecontrol.adapterr�pip._vendor.cachecontrol.cacher�pip._vendorrr	�#pip._vendor.cachecontrol.controllerr
�#pip._vendor.cachecontrol.heuristicsr�"pip._vendor.cachecontrol.serializerr�rr�<module>r's���#�,�@�4��$�8�C�A�=�
#��$(�&*�59�6:�04��
������"�	�
$��3�
�4��.���rpython3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-312.pyc000064400000007373151732703110023771 0ustar00�

R`i����dZddlmZddlmZddlmZmZmZerddl	m	Z	Gd�d�Z
Gd�d	e
�ZGd
�de
�Zy)
zb
The cache object API for implementing caches. The default is a thread
safe in-memory dictionary.
�)�annotations)�Lock)�IO�
TYPE_CHECKING�MutableMapping)�datetimec�>�eZdZdd�Z	d							dd�Zd	d�Zd
d�Zy)�	BaseCachec��t���N��NotImplementedError��self�keys  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py�getz
BaseCache.get���!�#�#�Nc��t��rr
�rr�value�expiress    r�setz
BaseCache.sets
��"�#�#rc��t��rr
rs  r�deletezBaseCache.deleterrc��yr�)rs r�closezBaseCache.closes��r�r�str�returnzbytes | Noner�rr!r�bytesrzint | datetime | Noner"�None�rr!r"r%)r"r%)�__name__�
__module__�__qualname__rrrrrrrr
r
s=��$�HL�$��$�$�$�/D�$�	
�$�
$�
rr
c�@�eZdZddd�Zdd�Z	d							d	d�Zd
d�Zy)�	DictCacheNc�8�t�|_|xsi|_yr)r�lock�data)r�	init_dicts  r�__init__zDictCache.__init__#s���F��	��O���	rc�:�|jj|d�Sr)r.rrs  rrz
DictCache.get's���y�y�}�}�S�$�'�'rc��|j5|jj||i�ddd�y#1swYyxYwr)r-r.�updaters    rrz
DictCache.set*s+���Y�Y��I�I���c�5�\�*��Y�Y�s�4�=c��|j5||jvr|jj|�ddd�y#1swYyxYwr)r-r.�poprs  rrzDictCache.delete0s/��
�Y�Y��d�i�i���	�	�
�
�c�"��Y�Y�s�*A�A	r)r/z!MutableMapping[str, bytes] | Noner"r%r r#r&)r'r(r)r0rrrrrrr+r+"s=��$�(�HL�+��+�$�+�/D�+�	
�+�#rr+c� �eZdZdZdd�Zdd�Zy)�SeparateBodyBaseCacheag
    In this variant, the body is not stored mixed in with the metadata, but is
    passed in (as a bytes-like object) in a separate call to ``set_body()``.

    That is, the expected interaction pattern is::

        cache.set(key, serialized_metadata)
        cache.set_body(key)

    Similarly, the body should be loaded separately via ``get_body()``.
    c��t��rr
)rr�bodys   r�set_bodyzSeparateBodyBaseCache.set_bodyCrrc��t��)z6
        Return the body as file-like object.
        r
rs  r�get_bodyzSeparateBodyBaseCache.get_bodyFs
��"�#�#rN)rr!r9r$r"r%)rr!r"zIO[bytes] | None)r'r(r)�__doc__r:r<rrrr7r76s��
�$�$rr7N)
r=�
__future__r�	threadingr�typingrrrrr
r+r7rrr�<module>rAs@��
�#��4�4��!�

�

� #�	�#�($�I�$rpython3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/adapter.cpython-312.pyc000064400000014560151732703110024342 0ustar00�

R`i�����ddlmZddlZddlZddlZddlmZmZmZm	Z	ddl
mZddlm
Z
ddlmZmZddlmZer ddlmZmZdd	lmZdd
lmZddlmZddlmZGd
�de�Zy)�)�annotationsN)�
TYPE_CHECKING�Any�
Collection�Mapping)�HTTPAdapter)�	DictCache)�PERMANENT_REDIRECT_STATUSES�CacheController)�CallbackFileWrapper)�PreparedRequest�Response)�HTTPResponse)�	BaseCache)�
BaseHeuristic)�
Serializerc���eZdZhd�Z						d																	d�fd�
Z						d															d	�fd�
Z		d
									d�fd�
Zd�fd�Z�xZS)
�CacheControlAdapter>�PUT�PATCH�DELETEc���t�
|�|i|��|�
t�n||_||_|xsd|_|xst}	|	|j||��|_y)N)�GET)�cache_etags�
serializer)�super�__init__r	�cache�	heuristic�cacheable_methodsr�
controller)�selfrr�controller_classrrr �args�kw�controller_factory�	__class__s          ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.pyrzCacheControlAdapter.__init__s\���	���$�%�"�%�$)�M�Y�[�u��
�"���!2�!>�h���-�@���,��J�J�K�J�
���c�n��|xs|j}|j|vrf	|jj|�}	|	r|j
||	d��S|jj|jj|��t�|�-||||||�}
|
S#tj
$rd}	Y�wwxYw)z�
        Send a request. Use the request information to see if it
        exists in the cache and cache the response if we need to and can.
        NT)�
from_cache)r �methodr!�cached_request�zlib�error�build_response�headers�update�conditional_headersr�send)r"�request�stream�timeout�verify�cert�proxiesr �	cacheable�cached_response�respr's           �r(r4zCacheControlAdapter.send2s����&�?��)?�)?�	��>�>�Y�&�
'�"&�/�/�"@�"@��"I����*�*�7�O�PT�*�U�U�
�O�O�"�"�4�?�?�#F�#F�w�#O�P��w�|�G�V�W�f�d�G�L������:�:�
'�"&��
'�s�B�B4�3B4c����
�|xs|j}|�sA|j|v�r2|jr|jj|�}|jdk(rG|j
j
||�}||urd}|jd��|j�|}n�t|j�tvr|j
j||�n}t|jtj|j
j||��|_
|j r-|j"�
d�
fd�}t%j&||�|_t(�|�U||�}|j|j,vrZ|j.rN|j0�J�|j
j3|j0�}	|j4j7|	�||_|S)z�
        Build a response by making a request or using the cache.

        This will end up calling send and returning a potentially
        cached response
        i0TF)�decode_contentc�h����|jdk(r|jj�yy)Nr)�
chunk_left�_fp�_close)r"�super_update_chunk_lengths �r(�_update_chunk_lengthz@CacheControlAdapter.build_response.<locals>._update_chunk_length�s(���1�3��?�?�a�/� �H�H�O�O�-�0r))r"r�return�None)r r,r�apply�statusr!�update_cached_response�read�release_conn�intr
�cache_responserrB�	functools�partial�chunkedrE�types�
MethodTyperr0�invalidating_methods�ok�url�	cache_urlr�deleter+)r"r5�responser+r r;r<rEr=rWrDr's          @�r(r0z"CacheControlAdapter.build_responsePs����&�?��)?�)?�	��g�n�n�	�9��~�~��>�>�/�/��9�����#�%�
#'�/�/�"H�"H��X�#��#�(�2�!%�J��
�
�U�
�3��%�%�'�*���X�_�_�%�)D�D����.�.�w��A� 3��L�L��%�%����6�6���� ����#�#�08�0M�0M�-�.�
5:�4D�4D�,�h�5�H�1���/���B���>�>�T�6�6�6�4�7�7��;�;�*�*�*����1�1�'�+�+�>�I��J�J���i�(�%����r)c�V��|jj�t�|��y)N)r�closer)r"r's �r(r[zCacheControlAdapter.close�s����
�
����
��
�r))NTNNNN)rzBaseCache | Noner�boolr#ztype[CacheController] | NonerzSerializer | NonerzBaseHeuristic | Noner �Collection[str] | Noner$rr%rrFrG)FNTNNN)r5r
r6r\r7z7None | float | tuple[float, float] | tuple[float, None]r8z
bool | strr9z4None | bytes | str | tuple[bytes | str, bytes | str]r:zMapping[str, str] | Noner r]rFr)FN)
r5r
rYrr+r\r r]rFr)rFrG)	�__name__�
__module__�__qualname__rTrr4r0r[�
__classcell__)r's@r(rrs2���5��#'� �9=�(,�*.�48�
��
��
�7�	
�
&�
�(�

�2�
��
��
�
�
�0�KO�!�GK�,0�48�� ����I�	�
��D�
�*��2��
��D!�48�M� �M��M��	M�
2�M�
�
M�^�r)r)�
__future__rrOrRr.�typingrrrr�pip._vendor.requests.adaptersr�pip._vendor.cachecontrol.cacher	�#pip._vendor.cachecontrol.controllerr
r�$pip._vendor.cachecontrol.filewrapperr�pip._vendor.requestsr
r�pip._vendor.urllib3rr�#pip._vendor.cachecontrol.heuristicsr�"pip._vendor.cachecontrol.serializerr�r)r(�<module>rmsE��#����:�:�5�4�\�D��>�0�8�A�=�G�+�Gr)python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/serialize.cpython-312.pyc000064400000014461151732703110024711 0ustar00�

R`i��|�ddlmZddlZddlmZmZmZmZmZddl	m
Z
ddlmZddl
mZerddlmZGd�d	�Zy)
�)�annotationsN)�IO�
TYPE_CHECKING�Any�Mapping�cast)�msgpack)�CaseInsensitiveDict)�HTTPResponse)�PreparedRequestc���eZdZdZ	d							d
d�Zdd�Z	d							dd�Z	d							dd�Z	d							dd�Z	d							dd�Z		d							dd	�Z
	d							dd
�Z	d							dd�Zy)�
Serializer�4Nc
��t|j�}|�<|jd��}tj|�|_t
|�|_d||jj�D��cic]\}}t|�t|���c}}|j|jt|j�|jd�i}i|d<d|vre|djd�}|D]L}	t|	�j�}	|jj!|	d�}
|
�t|
�}
|
|d|	<�Ndj#d|j$��j'�|j)|�g�Scc}}w)	NF)�decode_content�response)�body�headers�status�version�reasonr�vary�,�,zcc=)r
r�read�io�BytesIO�_fp�len�length_remaining�items�strrrrr�split�strip�get�join�
serde_version�encode�	serialize)�self�requestrr�response_headers�k�v�data�varied_headers�header�header_values           ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/serialize.py�dumpszSerializer.dumpsso��6I����6
���<��=�=��=�6�D��:�:�d�+�H�L�(+�D�	�H�%�
��7?�7G�7G�7M�7M�7O�P�7O�t�q�!�C��F�C��F�N�7O�P�"�/�/�#�+�+��h�o�o�.�"*�"9�"9�
�	
����V���%�%�-�f�5�;�;�C�@�N�(���V��*�*�,��&���2�2�6�4�@���+�#&�|�#4�L�'3��V��V�$�)��y�y�C�� 2� 2�3�4�;�;�=�t�~�~�d�?S�T�U�U��'Qs�3E9
c�L�tttj|d���S)NT)�use_bin_type)r�bytesr	r4)r*r/s  r3r)zSerializer.serialize>s���E�7�=�=��D�A�B�B�c�
�|sy	|jdd�\}}|dddk7r||z}d}|jdd�djd�}	t|d	|���|||�S#t$rd}Y�XwxYw#t$rYywxYw)
Nr�scc=0�scc=�=����ascii�_loads_v)r#�
ValueError�decode�getattr�AttributeError)r*r+r/�	body_file�ver�verstrs      r3�loadszSerializer.loadsAs�����	��
�
�4��+�I�C���r��7�f����:�D��C����4��#�B�'�.�.�w�7��	�5�7�4�8�F�8�!4�5�g�t�Y�O�O���	��C�	�� �	��	�s#�A%�A6�%A3�2A3�6	B�Bc�N�d|jdi�vry|jdi�j�D]&\}}|jj|d�|k7s�&y|djd�}t	|dd��}|jdd	�d
k(r|jd�||dd<	|�tj|�}n|}|djdd�td|d
d�|d��S#t$r'tj|jd��}Y�UwxYw)z`Verify our vary headers match and construct a real urllib3
        HTTPResponse object.
        �*rNrrr)r/ztransfer-encoding��chunked�utf8�strictF)r�preload_content�)
r%r!r�popr
rr�	TypeErrorr(r)	r*r+�cachedrDr1�value�body_rawrrs	         r3�prepare_responsezSerializer.prepare_responseds3���&�*�*�V�R�(�(��$�Z�Z���3�9�9�;�M�F�E����"�"�6�4�0�E�9��<��*�%�)�)�&�1��,?��
�#�I�.�-
���;�;�*�B�/�9�<��K�K�+�,�(/��z��9�%�
	7�� ��z�z�(�+�� ��	�z����x��.��S��u�S��z�@R�S�S���	7��:�:�h�o�o�f�5�6�D�	7�s�4C4�4-D$�#D$c��y�NrO�r*r+r/rDs    r3�	_loads_v0zSerializer._loads_v0����r8c��yrWrOrXs    r3�	_loads_v1zSerializer._loads_v1�s��r8c��yrWrOrXs    r3�	_loads_v2zSerializer._loads_v2�rZr8c��yrWrOrXs    r3�	_loads_v3zSerializer._loads_v3�rZr8c�v�	tj|d��}|j|||�S#t$rYywxYw)NF)�raw)r	rGr@rU)r*r+r/rDrRs     r3�	_loads_v4zSerializer._loads_v4�sB��	��]�]�4�U�3�F��$�$�W�f�i�@�@���	��	�s�,�	8�8rW)r+rrrrzbytes | None�returnr7)r/zdict[str, Any]rdr7)r+rr/r7rD�IO[bytes] | Nonerd�HTTPResponse | None)r+rrRzMapping[str, Any]rDrerdrf)r+rr/r7rDrerd�None)
�__name__�
__module__�__qualname__r'r4r)rGrUrYr\r^r`rcrOr8r3rrs����M�"�	(V� �(V��(V��	(V�

�(V�TC�'+�	!� �!��!�$�	!�

�!�N'+�	2T� �2T�"�2T�$�	2T�

�2T�p'+�		� �	��	�$�		�

�	�'+�	� ����$�	�

��'+�		� �	��	�$�		�

�	�'+�		� �	��	�$�		�

�	�'+�	A� �A��A�$�	A�

�Ar8r)�
__future__rr�typingrrrrr�pip._vendorr	�pip._vendor.requests.structuresr
�pip._vendor.urllib3r�pip._vendor.requestsrrrOr8r3�<module>rqs0��#�	�8�8��?�,��4�}A�}Ar8python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-312.pyc000064400000005206151732703110023621 0ustar00�

R`i����ddlmZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZerdd	lmZdd
l
mZdd�Zdd�Zdd
�Zdd�Zedk(re�yy)�)�annotationsN)�ArgumentParser)�
TYPE_CHECKING)�requests)�CacheControlAdapter)�	DictCache)�logger)�	Namespace)�CacheControllerc��tjtj�tj�}tj
|�y)N)r	�setLevel�logging�DEBUG�
StreamHandler�
addHandler)�handlers ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py�
setup_loggingrs.��
�O�O�G�M�M�"��#�#�%�G�
���g��c���tt�ddd��}tj�}|j	d|�|j	d|�|j
|_|S)NT)�cache_etags�
serializer�	heuristiczhttp://zhttps://)rrr�Session�mount�
controller�cache_controller)�adapter�sesss  r�get_sessionr sV��!����$�$��G�����D��J�J�y�'�"��J�J�z�7�#�#�.�.�D���Krc�\�t�}|jdd��|j�S)N�urlzThe URL to try and cache)�help)r�add_argument�
parse_args)�parsers r�get_argsr'(s-��
�
�F�
����$>��?�����rc�>�t�}t�}|j|j�}t	�|j
}|j
|j|j�|j|j�rtd�ytd�y)NzCached!z
Not cached :()r'r �getr"rr�cache_response�request�raw�cached_request�print)�argsr�resprs    r�mainr1.sy���:�D��=�D��8�8�D�H�H��D��O�	
�����#�#�D�L�L�$�(�(�;��&�&�t�|�|�4�
�i��
�o�r�__main__)�return�None)r3zrequests.Session)r3r
)�
__future__rr�argparser�typingr�pip._vendorr� pip._vendor.cachecontrol.adapterr�pip._vendor.cachecontrol.cacher�#pip._vendor.cachecontrol.controllerr	r
rrr r'r1�__name__�rr�<module>r>sP��#��#� � �@�4�6��"�C��	���.�z���F�rpython3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-312.pyc000064400000010453151732703120025240 0ustar00�

R`i���\�ddlmZddlZddlmZddlmZmZmZerddl	m
Z
Gd�d�Zy)�)�annotationsN)�NamedTemporaryFile)�
TYPE_CHECKING�Any�Callable)�HTTPResponsec�N�eZdZdZ						d	d�Zd
d�Zdd�Zdd�Zd
dd�Zdd�Z	y)�CallbackFileWrappera
    Small wrapper around a fp object which will tee everything read into a
    buffer, and when that file is closed it will execute a callback with the
    contents of that buffer.

    All attributes are proxied to the underlying file object.

    This class uses members with a double underscore (__) leading prefix so as
    not to accidentally shadow an attribute.

    The data is stored in a temporary file until it is all available.  As long
    as the temporary files directory is disk-based (sometimes it's a
    memory-backed-``tmpfs`` on Linux), data will be unloaded to disk if memory
    pressure is high.  For small files the disk usually won't be used at all,
    it'll all be in the filesystem memory cache, so there should be no
    performance impact.
    c�D�tdd��|_||_||_y)Nzrb+T)�delete)r�_CallbackFileWrapper__buf�_CallbackFileWrapper__fp�_CallbackFileWrapper__callback)�self�fp�callbacks   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py�__init__zCallbackFileWrapper.__init__!s ��(��d�;��
���	�"���c�<�|jd�}t||�S)Nr)�__getattribute__�getattr)r�namers   r�__getattr__zCallbackFileWrapper.__getattr__(s"���
"�
"�#=�
>���r�4� � rc��	|jjduS#t$rYnwxYw	|jj}|S#t$rYywxYw)NF)rr�AttributeError�closed)rrs  r�__is_fp_closedz"CallbackFileWrapper.__is_fp_closed4s\��	��9�9�<�<�4�'�'���	��	��	��9�9�+�+�F��M���	���	�s��	&�&�A�	A�
Ac��|jr�|jj�dk(rd}nc|jjdd�t	tj
|jj
�dt
j���}|j|�d|_|jj�y)Nrr)�access)	rr
�tell�seek�
memoryview�mmap�fileno�ACCESS_READ�close)r�results  r�_closezCallbackFileWrapper._closeFs����?�?��z�z��� �A�%����
�
����1�%�#��I�I�d�j�j�/�/�1�1�T�=M�=M�N���
�O�O�F�#����	
�
�
���rNc��|jj|�}|r|jj|�|j	�r|j�|S�N)r�readr
�write�"_CallbackFileWrapper__is_fp_closedr)�r�amt�datas   rr,zCallbackFileWrapper.readasE���i�i�n�n�S�)���
�J�J���T�"���� ��K�K�M��rc���|jj|�}|dk(r|dk(r|S|jj|�|j	�r|j�|S)N�s
)r�
_safe_readr
r-r.r)r/s   rr4zCallbackFileWrapper._safe_readlsV���i�i�*�*�3�/���!�8�����K��
�
�������� ��K�K�M��r)rrrzCallable[[bytes], None] | None�return�None)r�strr5r)r5�bool)r5r6r+)r0z
int | Noner5�bytes)r0�intr5r9)
�__name__�
__module__�__qualname__�__doc__rrr.r)r,r4�rrr
r
s=���$#��#�*H�#�	
�#�
!��$�6	�rr
)�
__future__rr$�tempfiler�typingrrr�http.clientrr
r?rr�<module>rDs(��#��'�/�/��(�i�irpython3.12/site-packages/pip/_vendor/cachecontrol/controller.py000064400000043720151732703120020545 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0

"""
The httplib2 algorithms ported for use with requests.
"""
from __future__ import annotations

import calendar
import logging
import re
import time
from email.utils import parsedate_tz
from typing import TYPE_CHECKING, Collection, Mapping

from pip._vendor.requests.structures import CaseInsensitiveDict

from pip._vendor.cachecontrol.cache import DictCache, SeparateBodyBaseCache
from pip._vendor.cachecontrol.serialize import Serializer

if TYPE_CHECKING:
    from typing import Literal

    from pip._vendor.requests import PreparedRequest
    from pip._vendor.urllib3 import HTTPResponse

    from pip._vendor.cachecontrol.cache import BaseCache

logger = logging.getLogger(__name__)

URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?")

PERMANENT_REDIRECT_STATUSES = (301, 308)


def parse_uri(uri: str) -> tuple[str, str, str, str, str]:
    """Parses a URI using the regex given in Appendix B of RFC 3986.

    (scheme, authority, path, query, fragment) = parse_uri(uri)
    """
    match = URI.match(uri)
    assert match is not None
    groups = match.groups()
    return (groups[1], groups[3], groups[4], groups[6], groups[8])


class CacheController:
    """An interface to see if request should cached or not."""

    def __init__(
        self,
        cache: BaseCache | None = None,
        cache_etags: bool = True,
        serializer: Serializer | None = None,
        status_codes: Collection[int] | None = None,
    ):
        self.cache = DictCache() if cache is None else cache
        self.cache_etags = cache_etags
        self.serializer = serializer or Serializer()
        self.cacheable_status_codes = status_codes or (200, 203, 300, 301, 308)

    @classmethod
    def _urlnorm(cls, uri: str) -> str:
        """Normalize the URL to create a safe key for the cache"""
        (scheme, authority, path, query, fragment) = parse_uri(uri)
        if not scheme or not authority:
            raise Exception("Only absolute URIs are allowed. uri = %s" % uri)

        scheme = scheme.lower()
        authority = authority.lower()

        if not path:
            path = "/"

        # Could do syntax based normalization of the URI before
        # computing the digest. See Section 6.2.2 of Std 66.
        request_uri = query and "?".join([path, query]) or path
        defrag_uri = scheme + "://" + authority + request_uri

        return defrag_uri

    @classmethod
    def cache_url(cls, uri: str) -> str:
        return cls._urlnorm(uri)

    def parse_cache_control(self, headers: Mapping[str, str]) -> dict[str, int | None]:
        known_directives = {
            # https://tools.ietf.org/html/rfc7234#section-5.2
            "max-age": (int, True),
            "max-stale": (int, False),
            "min-fresh": (int, True),
            "no-cache": (None, False),
            "no-store": (None, False),
            "no-transform": (None, False),
            "only-if-cached": (None, False),
            "must-revalidate": (None, False),
            "public": (None, False),
            "private": (None, False),
            "proxy-revalidate": (None, False),
            "s-maxage": (int, True),
        }

        cc_headers = headers.get("cache-control", headers.get("Cache-Control", ""))

        retval: dict[str, int | None] = {}

        for cc_directive in cc_headers.split(","):
            if not cc_directive.strip():
                continue

            parts = cc_directive.split("=", 1)
            directive = parts[0].strip()

            try:
                typ, required = known_directives[directive]
            except KeyError:
                logger.debug("Ignoring unknown cache-control directive: %s", directive)
                continue

            if not typ or not required:
                retval[directive] = None
            if typ:
                try:
                    retval[directive] = typ(parts[1].strip())
                except IndexError:
                    if required:
                        logger.debug(
                            "Missing value for cache-control " "directive: %s",
                            directive,
                        )
                except ValueError:
                    logger.debug(
                        "Invalid value for cache-control directive " "%s, must be %s",
                        directive,
                        typ.__name__,
                    )

        return retval

    def _load_from_cache(self, request: PreparedRequest) -> HTTPResponse | None:
        """
        Load a cached response, or return None if it's not available.
        """
        cache_url = request.url
        assert cache_url is not None
        cache_data = self.cache.get(cache_url)
        if cache_data is None:
            logger.debug("No cache entry available")
            return None

        if isinstance(self.cache, SeparateBodyBaseCache):
            body_file = self.cache.get_body(cache_url)
        else:
            body_file = None

        result = self.serializer.loads(request, cache_data, body_file)
        if result is None:
            logger.warning("Cache entry deserialization failed, entry ignored")
        return result

    def cached_request(self, request: PreparedRequest) -> HTTPResponse | Literal[False]:
        """
        Return a cached response if it exists in the cache, otherwise
        return False.
        """
        assert request.url is not None
        cache_url = self.cache_url(request.url)
        logger.debug('Looking up "%s" in the cache', cache_url)
        cc = self.parse_cache_control(request.headers)

        # Bail out if the request insists on fresh data
        if "no-cache" in cc:
            logger.debug('Request header has "no-cache", cache bypassed')
            return False

        if "max-age" in cc and cc["max-age"] == 0:
            logger.debug('Request header has "max_age" as 0, cache bypassed')
            return False

        # Check whether we can load the response from the cache:
        resp = self._load_from_cache(request)
        if not resp:
            return False

        # If we have a cached permanent redirect, return it immediately. We
        # don't need to test our response for other headers b/c it is
        # intrinsically "cacheable" as it is Permanent.
        #
        # See:
        #   https://tools.ietf.org/html/rfc7231#section-6.4.2
        #
        # Client can try to refresh the value by repeating the request
        # with cache busting headers as usual (ie no-cache).
        if int(resp.status) in PERMANENT_REDIRECT_STATUSES:
            msg = (
                "Returning cached permanent redirect response "
                "(ignoring date and etag information)"
            )
            logger.debug(msg)
            return resp

        headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(resp.headers)
        if not headers or "date" not in headers:
            if "etag" not in headers:
                # Without date or etag, the cached response can never be used
                # and should be deleted.
                logger.debug("Purging cached response: no date or etag")
                self.cache.delete(cache_url)
            logger.debug("Ignoring cached response: no date")
            return False

        now = time.time()
        time_tuple = parsedate_tz(headers["date"])
        assert time_tuple is not None
        date = calendar.timegm(time_tuple[:6])
        current_age = max(0, now - date)
        logger.debug("Current age based on date: %i", current_age)

        # TODO: There is an assumption that the result will be a
        #       urllib3 response object. This may not be best since we
        #       could probably avoid instantiating or constructing the
        #       response until we know we need it.
        resp_cc = self.parse_cache_control(headers)

        # determine freshness
        freshness_lifetime = 0

        # Check the max-age pragma in the cache control header
        max_age = resp_cc.get("max-age")
        if max_age is not None:
            freshness_lifetime = max_age
            logger.debug("Freshness lifetime from max-age: %i", freshness_lifetime)

        # If there isn't a max-age, check for an expires header
        elif "expires" in headers:
            expires = parsedate_tz(headers["expires"])
            if expires is not None:
                expire_time = calendar.timegm(expires[:6]) - date
                freshness_lifetime = max(0, expire_time)
                logger.debug("Freshness lifetime from expires: %i", freshness_lifetime)

        # Determine if we are setting freshness limit in the
        # request. Note, this overrides what was in the response.
        max_age = cc.get("max-age")
        if max_age is not None:
            freshness_lifetime = max_age
            logger.debug(
                "Freshness lifetime from request max-age: %i", freshness_lifetime
            )

        min_fresh = cc.get("min-fresh")
        if min_fresh is not None:
            # adjust our current age by our min fresh
            current_age += min_fresh
            logger.debug("Adjusted current age from min-fresh: %i", current_age)

        # Return entry if it is fresh enough
        if freshness_lifetime > current_age:
            logger.debug('The response is "fresh", returning cached response')
            logger.debug("%i > %i", freshness_lifetime, current_age)
            return resp

        # we're not fresh. If we don't have an Etag, clear it out
        if "etag" not in headers:
            logger.debug('The cached response is "stale" with no etag, purging')
            self.cache.delete(cache_url)

        # return the original handler
        return False

    def conditional_headers(self, request: PreparedRequest) -> dict[str, str]:
        resp = self._load_from_cache(request)
        new_headers = {}

        if resp:
            headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(resp.headers)

            if "etag" in headers:
                new_headers["If-None-Match"] = headers["ETag"]

            if "last-modified" in headers:
                new_headers["If-Modified-Since"] = headers["Last-Modified"]

        return new_headers

    def _cache_set(
        self,
        cache_url: str,
        request: PreparedRequest,
        response: HTTPResponse,
        body: bytes | None = None,
        expires_time: int | None = None,
    ) -> None:
        """
        Store the data in the cache.
        """
        if isinstance(self.cache, SeparateBodyBaseCache):
            # We pass in the body separately; just put a placeholder empty
            # string in the metadata.
            self.cache.set(
                cache_url,
                self.serializer.dumps(request, response, b""),
                expires=expires_time,
            )
            # body is None can happen when, for example, we're only updating
            # headers, as is the case in update_cached_response().
            if body is not None:
                self.cache.set_body(cache_url, body)
        else:
            self.cache.set(
                cache_url,
                self.serializer.dumps(request, response, body),
                expires=expires_time,
            )

    def cache_response(
        self,
        request: PreparedRequest,
        response: HTTPResponse,
        body: bytes | None = None,
        status_codes: Collection[int] | None = None,
    ) -> None:
        """
        Algorithm for caching requests.

        This assumes a requests Response object.
        """
        # From httplib2: Don't cache 206's since we aren't going to
        #                handle byte range requests
        cacheable_status_codes = status_codes or self.cacheable_status_codes
        if response.status not in cacheable_status_codes:
            logger.debug(
                "Status code %s not in %s", response.status, cacheable_status_codes
            )
            return

        response_headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(
            response.headers
        )

        if "date" in response_headers:
            time_tuple = parsedate_tz(response_headers["date"])
            assert time_tuple is not None
            date = calendar.timegm(time_tuple[:6])
        else:
            date = 0

        # If we've been given a body, our response has a Content-Length, that
        # Content-Length is valid then we can check to see if the body we've
        # been given matches the expected size, and if it doesn't we'll just
        # skip trying to cache it.
        if (
            body is not None
            and "content-length" in response_headers
            and response_headers["content-length"].isdigit()
            and int(response_headers["content-length"]) != len(body)
        ):
            return

        cc_req = self.parse_cache_control(request.headers)
        cc = self.parse_cache_control(response_headers)

        assert request.url is not None
        cache_url = self.cache_url(request.url)
        logger.debug('Updating cache with response from "%s"', cache_url)

        # Delete it from the cache if we happen to have it stored there
        no_store = False
        if "no-store" in cc:
            no_store = True
            logger.debug('Response header has "no-store"')
        if "no-store" in cc_req:
            no_store = True
            logger.debug('Request header has "no-store"')
        if no_store and self.cache.get(cache_url):
            logger.debug('Purging existing cache entry to honor "no-store"')
            self.cache.delete(cache_url)
        if no_store:
            return

        # https://tools.ietf.org/html/rfc7234#section-4.1:
        # A Vary header field-value of "*" always fails to match.
        # Storing such a response leads to a deserialization warning
        # during cache lookup and is not allowed to ever be served,
        # so storing it can be avoided.
        if "*" in response_headers.get("vary", ""):
            logger.debug('Response header has "Vary: *"')
            return

        # If we've been given an etag, then keep the response
        if self.cache_etags and "etag" in response_headers:
            expires_time = 0
            if response_headers.get("expires"):
                expires = parsedate_tz(response_headers["expires"])
                if expires is not None:
                    expires_time = calendar.timegm(expires[:6]) - date

            expires_time = max(expires_time, 14 * 86400)

            logger.debug(f"etag object cached for {expires_time} seconds")
            logger.debug("Caching due to etag")
            self._cache_set(cache_url, request, response, body, expires_time)

        # Add to the cache any permanent redirects. We do this before looking
        # that the Date headers.
        elif int(response.status) in PERMANENT_REDIRECT_STATUSES:
            logger.debug("Caching permanent redirect")
            self._cache_set(cache_url, request, response, b"")

        # Add to the cache if the response headers demand it. If there
        # is no date header then we can't do anything about expiring
        # the cache.
        elif "date" in response_headers:
            time_tuple = parsedate_tz(response_headers["date"])
            assert time_tuple is not None
            date = calendar.timegm(time_tuple[:6])
            # cache when there is a max-age > 0
            max_age = cc.get("max-age")
            if max_age is not None and max_age > 0:
                logger.debug("Caching b/c date exists and max-age > 0")
                expires_time = max_age
                self._cache_set(
                    cache_url,
                    request,
                    response,
                    body,
                    expires_time,
                )

            # If the request can expire, it means we should cache it
            # in the meantime.
            elif "expires" in response_headers:
                if response_headers["expires"]:
                    expires = parsedate_tz(response_headers["expires"])
                    if expires is not None:
                        expires_time = calendar.timegm(expires[:6]) - date
                    else:
                        expires_time = None

                    logger.debug(
                        "Caching b/c of expires header. expires in {} seconds".format(
                            expires_time
                        )
                    )
                    self._cache_set(
                        cache_url,
                        request,
                        response,
                        body,
                        expires_time,
                    )

    def update_cached_response(
        self, request: PreparedRequest, response: HTTPResponse
    ) -> HTTPResponse:
        """On a 304 we will get a new set of headers that we want to
        update our cached value with, assuming we have one.

        This should only ever be called when we've sent an ETag and
        gotten a 304 as the response.
        """
        assert request.url is not None
        cache_url = self.cache_url(request.url)
        cached_response = self._load_from_cache(request)

        if not cached_response:
            # we didn't have a cached response
            return response

        # Lets update our headers with the headers from the new request:
        # http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-26#section-4.1
        #
        # The server isn't supposed to send headers that would make
        # the cached body invalid. But... just in case, we'll be sure
        # to strip out ones we know that might be problmatic due to
        # typical assumptions.
        excluded_headers = ["content-length"]

        cached_response.headers.update(
            {
                k: v
                for k, v in response.headers.items()  # type: ignore[no-untyped-call]
                if k.lower() not in excluded_headers
            }
        )

        # we want a 200 b/c we have content via the cache
        cached_response.status = 200

        # update our cache
        self._cache_set(cache_url, request, cached_response)

        return cached_response
python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py000064400000001244151732703120020114 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0

"""CacheControl import Interface.

Make it easy to import from cachecontrol without long namespaces.
"""
__author__ = "Eric Larson"
__email__ = "eric@ionrock.org"
__version__ = "0.13.1"

from pip._vendor.cachecontrol.adapter import CacheControlAdapter
from pip._vendor.cachecontrol.controller import CacheController
from pip._vendor.cachecontrol.wrapper import CacheControl

__all__ = [
    "__author__",
    "__email__",
    "__version__",
    "CacheControlAdapter",
    "CacheController",
    "CacheControl",
]

import logging

logging.getLogger(__name__).addHandler(logging.NullHandler())
python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-312.pyc000064400000000743151732703120025706 0ustar00�

R`i/��(�ddlmZmZddlmZgd�Zy)�)�	FileCache�SeparateBodyFileCache)�
RedisCache)rrrN)�*pip._vendor.cachecontrol.caches.file_cacherr�+pip._vendor.cachecontrol.caches.redis_cacher�__all__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py�<module>rs��
X�B�
>�r
python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-312.pyc000064400000005335151732703120026402 0ustar00�

R`ij��^�ddlmZddlmZmZddlmZddlmZerddlm	Z	Gd�de�Z
y)	�)�annotations)�datetime�timezone)�
TYPE_CHECKING)�	BaseCache)�Redisc�N�eZdZdd�Zd	d�Z	d
							dd�Zdd�Zd
d�Zd
d�Zy)�
RedisCachec��||_y�N)�conn)�selfr
s  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py�__init__zRedisCache.__init__s	����	�c�8�|jj|�Sr)r
�get�r�keys  rrzRedisCache.gets���y�y�}�}�S�!�!rNc��|s|jj||�yt|t�r{tjt
j�}|j�|jd��}||z
}|jj|t|j��|�y|jj|||�y)N)�tzinfo)r
�set�
isinstancer�nowr�utcr�replace�setex�int�
total_seconds)rr�value�expires�now_utc�deltas      rrzRedisCache.sets�����I�I�M�M�#�u�%�
���
*��l�l�8�<�<�0�G��~�~�%�!�/�/��/�6���g�%�E��I�I�O�O�C��U�%8�%8�%:�!;�U�C��I�I�O�O�C��%�0rc�:�|jj|�yr)r
�deleters  rr%zRedisCache.delete%s���	�	����rc�x�|jj�D]}|jj|��y)zIHelper for clearing all the keys in a database. Use with
        caution!N)r
�keysr%rs  r�clearzRedisCache.clear(s+���9�9�>�>�#�C��I�I���S�!�$rc��y)z?Redis uses connection pooling, no need to close the connection.N�)rs r�closezRedisCache.close.s��r)r
zRedis[bytes]�return�None)r�strr,zbytes | Noner)rr.r �bytesr!zint | datetime | Noner,r-)rr.r,r-)r,r-)	�__name__�
__module__�__qualname__rrrr%r(r+r*rrr
r
sG���"�HL�1��1�$�1�/D�1�	
�1��"�
rr
N)�
__future__rrr�typingr�pip._vendor.cachecontrol.cacher�redisrr
r*rr�<module>r7s'��#�(� �4��� 
�� 
rpython3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-312.pyc000064400000017065151732703120026216 0ustar00�

R`i�����ddlmZddlZddlZddlmZddlmZmZddl	m
Z
mZddlm
Z
erddlmZddlmZdd	�ZGd
�d�ZGd�d
ee
�ZGd�dee�Zdd�Zy)�)�annotationsN)�dedent)�IO�
TYPE_CHECKING)�	BaseCache�SeparateBodyBaseCache)�CacheController)�datetime)�BaseFileLockc���tj}|tjtjzz}t	td�r|tj
z}t	td�r|tjz}	tj|�tj|||�}	tj|d�S#t$rY�9wxYw#tj|��xYw)N�
O_NOFOLLOW�O_BINARY�wb)�os�O_WRONLY�O_CREAT�O_EXCL�hasattrr
r�remove�OSError�open�fdopen�close)�filename�fmode�flags�fds    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py�_secure_open_writers����K�K�E�
�R�Z�Z�"�)�)�
#�#�E��r�<� �
�������r�:��
������
�
�	�	�(��
����5�%�	(�B���y�y��T�"�"���
��
���
�����
�s�<B?�)C�?	C�
C�C&c��eZdZdZ				d
											dd�Zedd��Zd
d�Zdd�Z	d							dd�Z	dd�Z
dd	�Zy)�_FileCacheMixinz2Shared implementation for both FileCache variants.Nc��	|�ddlm}|}||_||_||_||_||_y#t$rtd�}t|��wxYw)Nr)�FileLockz�
            NOTE: In order to use the FileCache you must have
            filelock installed. You can install it via pip:
              pip install filelock
            )	�filelockr#�ImportErrorr�	directory�forever�filemode�dirmode�
lock_class)�selfr&r'r(r)r*r#�notices        r�__init__z_FileCacheMixin.__init__@sg��
	&��!�-�%�
�#������ ��
����$�����	&����F��f�%�%�	&�s	�
0� Ac�d�tj|j��j�S�N)�hashlib�sha224�encode�	hexdigest)�xs rr2z_FileCacheMixin.encode]s ���~�~�a�h�h�j�)�3�3�5�5�c��|j|�}t|dd�|gz}tjj|j
g|���S)N�)r2�listr�path�joinr&)r+�name�hashed�partss    r�_fnz_FileCacheMixin._fnasE�����T�"���V�B�Q�Z� �F�8�+���w�w�|�|�D�N�N�3�U�3�3r5c��|j|�}	t|d�5}|j�cddd�S#1swYyxYw#t$rYywxYw)N�rb)r>r�read�FileNotFoundError)r+�keyr;�fhs    r�getz_FileCacheMixin.gethsH���x�x��}��	��d�D�!�R��w�w�y�"�!�!��!�	��	�s*�A�9�	A�A�A�A�	A�Ac�J�|j|�}|j||�yr/�r>�_write)r+rC�value�expiresr;s     r�setz_FileCacheMixin.setqs���x�x��}�����D�%� r5c�h�	tjtjj|�|j�|j
|dz�5t||j�5}|j|�ddd�ddd�y#t
$rY�YwxYw#1swY�!xYw#1swYyxYw)z:
        Safely write the data to the given path.
        z.lockN)
r�makedirsr9�dirnamer)rr*rr(�write)r+r9�datarDs    rrHz_FileCacheMixin._writews���
	��K�K�������-�t�|�|�<��_�_�T�G�^�
,�#�D�$�-�-�8�B������9�-�
,���	��	��
9�8��-�
,�s5�=B
�B(�*B�<B(�
	B�B�B%	�!B(�(B1c��|j|�|z}|js	tj|�yy#t$rYywxYwr/)r>r'rrrB)r+rC�suffixr;s    r�_deletez_FileCacheMixin._delete�sD���x�x��}�v�%���|�|�
��	�	�$����%�
��
�s�9�	A�A)Fi�i�N)r&�strr'�boolr(�intr)rVr*ztype[BaseFileLock] | None�return�None)r4rTrWrT)r;rTrWrT)rCrTrWzbytes | Noner/)rCrTrI�bytesrJzint | datetime | NonerWrX)r9rTrPrYrWrX)rCrTrRrTrWrX)�__name__�
__module__�__qualname__�__doc__r-�staticmethodr2r>rErKrHrS�r5rr!r!=s���<�
���04�
%��%��%��	%�
�%�.�
%�
�%�:�6��6�4��HL�!��!�$�!�/D�!�	
�!�
�r5r!c��eZdZdZdd�Zy)�	FileCachezc
    Traditional FileCache: body is stored in memory, so not suitable for large
    downloads.
    c�(�|j|d�y)N��rS�r+rCs  r�deletezFileCache.delete�s�����S�"�r5N�rCrTrWrX)rZr[r\r]rfr_r5rrara�s���
r5rac�(�eZdZdZdd�Zdd�Zdd�Zy)	�SeparateBodyFileCachezh
    Memory-efficient FileCache: body is stored in a separate file, reducing
    peak memory usage.
    c�b�|j|�dz}	t|d�S#t$rYywxYw)N�.bodyr@)r>rrB)r+rCr;s   r�get_bodyzSeparateBodyFileCache.get_body�s8���x�x��}�w�&��	���d�#�#�� �	��	�s�"�	.�.c�P�|j|�dz}|j||�y)NrkrG)r+rC�bodyr;s    r�set_bodyzSeparateBodyFileCache.set_body�s"���x�x��}�w�&�����D�$�r5c�L�|j|d�|j|d�y)Nrcrkrdres  rrfzSeparateBodyFileCache.delete�s�����S�"�����S�'�"r5N)rCrTrWzIO[bytes] | None)rCrTrnrYrWrXrg)rZr[r\r]rlrorfr_r5rriri�s���
� �#r5ric�N�tj|�}|j|�S)z\Return the file cache path based on the URL.

    This does not ensure the file exists!
    )r	�	cache_urlr>)�url�	filecacherCs   r�url_to_file_pathru�s#��
�
#�
#�C�
(�C��=�=���r5)rrTrrVrWz	IO[bytes])rsrTrtrarWrT)�
__future__rr0r�textwrapr�typingrr�pip._vendor.cachecontrol.cacherr�#pip._vendor.cachecontrol.controllerr	r
r$rrr!rarirur_r5r�<module>r{sZ��#��	��$�K�?��!�%�&�RO�O�d����#�O�-B�#�,r5python3.12/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py000064400000002552151732703120022037 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations


from datetime import datetime, timezone
from typing import TYPE_CHECKING

from pip._vendor.cachecontrol.cache import BaseCache

if TYPE_CHECKING:
    from redis import Redis


class RedisCache(BaseCache):
    def __init__(self, conn: Redis[bytes]) -> None:
        self.conn = conn

    def get(self, key: str) -> bytes | None:
        return self.conn.get(key)

    def set(
        self, key: str, value: bytes, expires: int | datetime | None = None
    ) -> None:
        if not expires:
            self.conn.set(key, value)
        elif isinstance(expires, datetime):
            now_utc = datetime.now(timezone.utc)
            if expires.tzinfo is None:
                now_utc = now_utc.replace(tzinfo=None)
            delta = expires - now_utc
            self.conn.setex(key, int(delta.total_seconds()), value)
        else:
            self.conn.setex(key, expires, value)

    def delete(self, key: str) -> None:
        self.conn.delete(key)

    def clear(self) -> None:
        """Helper for clearing all the keys in a database. Use with
        caution!"""
        for key in self.conn.keys():
            self.conn.delete(key)

    def close(self) -> None:
        """Redis uses connection pooling, no need to close the connection."""
        pass
python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py000064400000000457151732703120021347 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0

from pip._vendor.cachecontrol.caches.file_cache import FileCache, SeparateBodyFileCache
from pip._vendor.cachecontrol.caches.redis_cache import RedisCache

__all__ = ["FileCache", "SeparateBodyFileCache", "RedisCache"]
python3.12/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py000064400000012350151732703130021646 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import hashlib
import os
from textwrap import dedent
from typing import IO, TYPE_CHECKING

from pip._vendor.cachecontrol.cache import BaseCache, SeparateBodyBaseCache
from pip._vendor.cachecontrol.controller import CacheController

if TYPE_CHECKING:
    from datetime import datetime

    from filelock import BaseFileLock


def _secure_open_write(filename: str, fmode: int) -> IO[bytes]:
    # We only want to write to this file, so open it in write only mode
    flags = os.O_WRONLY

    # os.O_CREAT | os.O_EXCL will fail if the file already exists, so we only
    #  will open *new* files.
    # We specify this because we want to ensure that the mode we pass is the
    # mode of the file.
    flags |= os.O_CREAT | os.O_EXCL

    # Do not follow symlinks to prevent someone from making a symlink that
    # we follow and insecurely open a cache file.
    if hasattr(os, "O_NOFOLLOW"):
        flags |= os.O_NOFOLLOW

    # On Windows we'll mark this file as binary
    if hasattr(os, "O_BINARY"):
        flags |= os.O_BINARY

    # Before we open our file, we want to delete any existing file that is
    # there
    try:
        os.remove(filename)
    except OSError:
        # The file must not exist already, so we can just skip ahead to opening
        pass

    # Open our file, the use of os.O_CREAT | os.O_EXCL will ensure that if a
    # race condition happens between the os.remove and this line, that an
    # error will be raised. Because we utilize a lockfile this should only
    # happen if someone is attempting to attack us.
    fd = os.open(filename, flags, fmode)
    try:
        return os.fdopen(fd, "wb")

    except:
        # An error occurred wrapping our FD in a file object
        os.close(fd)
        raise


class _FileCacheMixin:
    """Shared implementation for both FileCache variants."""

    def __init__(
        self,
        directory: str,
        forever: bool = False,
        filemode: int = 0o0600,
        dirmode: int = 0o0700,
        lock_class: type[BaseFileLock] | None = None,
    ) -> None:
        try:
            if lock_class is None:
                from filelock import FileLock

                lock_class = FileLock
        except ImportError:
            notice = dedent(
                """
            NOTE: In order to use the FileCache you must have
            filelock installed. You can install it via pip:
              pip install filelock
            """
            )
            raise ImportError(notice)

        self.directory = directory
        self.forever = forever
        self.filemode = filemode
        self.dirmode = dirmode
        self.lock_class = lock_class

    @staticmethod
    def encode(x: str) -> str:
        return hashlib.sha224(x.encode()).hexdigest()

    def _fn(self, name: str) -> str:
        # NOTE: This method should not change as some may depend on it.
        #       See: https://github.com/ionrock/cachecontrol/issues/63
        hashed = self.encode(name)
        parts = list(hashed[:5]) + [hashed]
        return os.path.join(self.directory, *parts)

    def get(self, key: str) -> bytes | None:
        name = self._fn(key)
        try:
            with open(name, "rb") as fh:
                return fh.read()

        except FileNotFoundError:
            return None

    def set(
        self, key: str, value: bytes, expires: int | datetime | None = None
    ) -> None:
        name = self._fn(key)
        self._write(name, value)

    def _write(self, path: str, data: bytes) -> None:
        """
        Safely write the data to the given path.
        """
        # Make sure the directory exists
        try:
            os.makedirs(os.path.dirname(path), self.dirmode)
        except OSError:
            pass

        with self.lock_class(path + ".lock"):
            # Write our actual file
            with _secure_open_write(path, self.filemode) as fh:
                fh.write(data)

    def _delete(self, key: str, suffix: str) -> None:
        name = self._fn(key) + suffix
        if not self.forever:
            try:
                os.remove(name)
            except FileNotFoundError:
                pass


class FileCache(_FileCacheMixin, BaseCache):
    """
    Traditional FileCache: body is stored in memory, so not suitable for large
    downloads.
    """

    def delete(self, key: str) -> None:
        self._delete(key, "")


class SeparateBodyFileCache(_FileCacheMixin, SeparateBodyBaseCache):
    """
    Memory-efficient FileCache: body is stored in a separate file, reducing
    peak memory usage.
    """

    def get_body(self, key: str) -> IO[bytes] | None:
        name = self._fn(key) + ".body"
        try:
            return open(name, "rb")
        except FileNotFoundError:
            return None

    def set_body(self, key: str, body: bytes) -> None:
        name = self._fn(key) + ".body"
        self._write(name, body)

    def delete(self, key: str) -> None:
        self._delete(key, "")
        self._delete(key, ".body")


def url_to_file_path(url: str, filecache: FileCache) -> str:
    """Return the file cache path based on the URL.

    This does not ensure the file exists!
    """
    key = CacheController.cache_url(url)
    return filecache._fn(key)
python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py000064400000002611151732703130020035 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from typing import TYPE_CHECKING, Collection

from pip._vendor.cachecontrol.adapter import CacheControlAdapter
from pip._vendor.cachecontrol.cache import DictCache

if TYPE_CHECKING:
    from pip._vendor import requests

    from pip._vendor.cachecontrol.cache import BaseCache
    from pip._vendor.cachecontrol.controller import CacheController
    from pip._vendor.cachecontrol.heuristics import BaseHeuristic
    from pip._vendor.cachecontrol.serialize import Serializer


def CacheControl(
    sess: requests.Session,
    cache: BaseCache | None = None,
    cache_etags: bool = True,
    serializer: Serializer | None = None,
    heuristic: BaseHeuristic | None = None,
    controller_class: type[CacheController] | None = None,
    adapter_class: type[CacheControlAdapter] | None = None,
    cacheable_methods: Collection[str] | None = None,
) -> requests.Session:
    cache = DictCache() if cache is None else cache
    adapter_class = adapter_class or CacheControlAdapter
    adapter = adapter_class(
        cache,
        cache_etags=cache_etags,
        serializer=serializer,
        heuristic=heuristic,
        controller_class=controller_class,
        cacheable_methods=cacheable_methods,
    )
    sess.mount("http://", adapter)
    sess.mount("https://", adapter)

    return sess
python3.12/site-packages/pip/_vendor/cachecontrol/heuristics.py000064400000011334151732703130020541 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import calendar
import time
from datetime import datetime, timedelta, timezone
from email.utils import formatdate, parsedate, parsedate_tz
from typing import TYPE_CHECKING, Any, Mapping

if TYPE_CHECKING:
    from pip._vendor.urllib3 import HTTPResponse

TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT"


def expire_after(delta: timedelta, date: datetime | None = None) -> datetime:
    date = date or datetime.now(timezone.utc)
    return date + delta


def datetime_to_header(dt: datetime) -> str:
    return formatdate(calendar.timegm(dt.timetuple()))


class BaseHeuristic:
    def warning(self, response: HTTPResponse) -> str | None:
        """
        Return a valid 1xx warning header value describing the cache
        adjustments.

        The response is provided too allow warnings like 113
        http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need
        to explicitly say response is over 24 hours old.
        """
        return '110 - "Response is Stale"'

    def update_headers(self, response: HTTPResponse) -> dict[str, str]:
        """Update the response headers with any new headers.

        NOTE: This SHOULD always include some Warning header to
              signify that the response was cached by the client, not
              by way of the provided headers.
        """
        return {}

    def apply(self, response: HTTPResponse) -> HTTPResponse:
        updated_headers = self.update_headers(response)

        if updated_headers:
            response.headers.update(updated_headers)
            warning_header_value = self.warning(response)
            if warning_header_value is not None:
                response.headers.update({"Warning": warning_header_value})

        return response


class OneDayCache(BaseHeuristic):
    """
    Cache the response by providing an expires 1 day in the
    future.
    """

    def update_headers(self, response: HTTPResponse) -> dict[str, str]:
        headers = {}

        if "expires" not in response.headers:
            date = parsedate(response.headers["date"])
            expires = expire_after(timedelta(days=1), date=datetime(*date[:6], tzinfo=timezone.utc))  # type: ignore[misc]
            headers["expires"] = datetime_to_header(expires)
            headers["cache-control"] = "public"
        return headers


class ExpiresAfter(BaseHeuristic):
    """
    Cache **all** requests for a defined time period.
    """

    def __init__(self, **kw: Any) -> None:
        self.delta = timedelta(**kw)

    def update_headers(self, response: HTTPResponse) -> dict[str, str]:
        expires = expire_after(self.delta)
        return {"expires": datetime_to_header(expires), "cache-control": "public"}

    def warning(self, response: HTTPResponse) -> str | None:
        tmpl = "110 - Automatically cached for %s. Response might be stale"
        return tmpl % self.delta


class LastModified(BaseHeuristic):
    """
    If there is no Expires header already, fall back on Last-Modified
    using the heuristic from
    http://tools.ietf.org/html/rfc7234#section-4.2.2
    to calculate a reasonable value.

    Firefox also does something like this per
    https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ
    http://lxr.mozilla.org/mozilla-release/source/netwerk/protocol/http/nsHttpResponseHead.cpp#397
    Unlike mozilla we limit this to 24-hr.
    """

    cacheable_by_default_statuses = {
        200,
        203,
        204,
        206,
        300,
        301,
        404,
        405,
        410,
        414,
        501,
    }

    def update_headers(self, resp: HTTPResponse) -> dict[str, str]:
        headers: Mapping[str, str] = resp.headers

        if "expires" in headers:
            return {}

        if "cache-control" in headers and headers["cache-control"] != "public":
            return {}

        if resp.status not in self.cacheable_by_default_statuses:
            return {}

        if "date" not in headers or "last-modified" not in headers:
            return {}

        time_tuple = parsedate_tz(headers["date"])
        assert time_tuple is not None
        date = calendar.timegm(time_tuple[:6])
        last_modified = parsedate(headers["last-modified"])
        if last_modified is None:
            return {}

        now = time.time()
        current_age = max(0, now - date)
        delta = date - calendar.timegm(last_modified)
        freshness_lifetime = max(0, min(delta / 10, 24 * 3600))
        if freshness_lifetime <= current_age:
            return {}

        expires = date + freshness_lifetime
        return {"expires": time.strftime(TIME_FMT, time.gmtime(expires))}

    def warning(self, resp: HTTPResponse) -> str | None:
        return None
python3.12/site-packages/pip/_vendor/cachecontrol/py.typed000064400000000000151732703130017470 0ustar00python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py000064400000010304151732703130020673 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import mmap
from tempfile import NamedTemporaryFile
from typing import TYPE_CHECKING, Any, Callable

if TYPE_CHECKING:
    from http.client import HTTPResponse


class CallbackFileWrapper:
    """
    Small wrapper around a fp object which will tee everything read into a
    buffer, and when that file is closed it will execute a callback with the
    contents of that buffer.

    All attributes are proxied to the underlying file object.

    This class uses members with a double underscore (__) leading prefix so as
    not to accidentally shadow an attribute.

    The data is stored in a temporary file until it is all available.  As long
    as the temporary files directory is disk-based (sometimes it's a
    memory-backed-``tmpfs`` on Linux), data will be unloaded to disk if memory
    pressure is high.  For small files the disk usually won't be used at all,
    it'll all be in the filesystem memory cache, so there should be no
    performance impact.
    """

    def __init__(
        self, fp: HTTPResponse, callback: Callable[[bytes], None] | None
    ) -> None:
        self.__buf = NamedTemporaryFile("rb+", delete=True)
        self.__fp = fp
        self.__callback = callback

    def __getattr__(self, name: str) -> Any:
        # The vaguaries of garbage collection means that self.__fp is
        # not always set.  By using __getattribute__ and the private
        # name[0] allows looking up the attribute value and raising an
        # AttributeError when it doesn't exist. This stop thigns from
        # infinitely recursing calls to getattr in the case where
        # self.__fp hasn't been set.
        #
        # [0] https://docs.python.org/2/reference/expressions.html#atom-identifiers
        fp = self.__getattribute__("_CallbackFileWrapper__fp")
        return getattr(fp, name)

    def __is_fp_closed(self) -> bool:
        try:
            return self.__fp.fp is None

        except AttributeError:
            pass

        try:
            closed: bool = self.__fp.closed
            return closed

        except AttributeError:
            pass

        # We just don't cache it then.
        # TODO: Add some logging here...
        return False

    def _close(self) -> None:
        if self.__callback:
            if self.__buf.tell() == 0:
                # Empty file:
                result = b""
            else:
                # Return the data without actually loading it into memory,
                # relying on Python's buffer API and mmap(). mmap() just gives
                # a view directly into the filesystem's memory cache, so it
                # doesn't result in duplicate memory use.
                self.__buf.seek(0, 0)
                result = memoryview(
                    mmap.mmap(self.__buf.fileno(), 0, access=mmap.ACCESS_READ)
                )
            self.__callback(result)

        # We assign this to None here, because otherwise we can get into
        # really tricky problems where the CPython interpreter dead locks
        # because the callback is holding a reference to something which
        # has a __del__ method. Setting this to None breaks the cycle
        # and allows the garbage collector to do it's thing normally.
        self.__callback = None

        # Closing the temporary file releases memory and frees disk space.
        # Important when caching big files.
        self.__buf.close()

    def read(self, amt: int | None = None) -> bytes:
        data: bytes = self.__fp.read(amt)
        if data:
            # We may be dealing with b'', a sign that things are over:
            # it's passed e.g. after we've already closed self.__buf.
            self.__buf.write(data)
        if self.__is_fp_closed():
            self._close()

        return data

    def _safe_read(self, amt: int) -> bytes:
        data: bytes = self.__fp._safe_read(amt)  # type: ignore[attr-defined]
        if amt == 2 and data == b"\r\n":
            # urllib executes this read to toss the CRLF at the end
            # of the chunk.
            return data

        self.__buf.write(data)
        if self.__is_fp_closed():
            self._close()

        return data
python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py000064400000014370151732703130020002 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import functools
import types
import zlib
from typing import TYPE_CHECKING, Any, Collection, Mapping

from pip._vendor.requests.adapters import HTTPAdapter

from pip._vendor.cachecontrol.cache import DictCache
from pip._vendor.cachecontrol.controller import PERMANENT_REDIRECT_STATUSES, CacheController
from pip._vendor.cachecontrol.filewrapper import CallbackFileWrapper

if TYPE_CHECKING:
    from pip._vendor.requests import PreparedRequest, Response
    from pip._vendor.urllib3 import HTTPResponse

    from pip._vendor.cachecontrol.cache import BaseCache
    from pip._vendor.cachecontrol.heuristics import BaseHeuristic
    from pip._vendor.cachecontrol.serialize import Serializer


class CacheControlAdapter(HTTPAdapter):
    invalidating_methods = {"PUT", "PATCH", "DELETE"}

    def __init__(
        self,
        cache: BaseCache | None = None,
        cache_etags: bool = True,
        controller_class: type[CacheController] | None = None,
        serializer: Serializer | None = None,
        heuristic: BaseHeuristic | None = None,
        cacheable_methods: Collection[str] | None = None,
        *args: Any,
        **kw: Any,
    ) -> None:
        super().__init__(*args, **kw)
        self.cache = DictCache() if cache is None else cache
        self.heuristic = heuristic
        self.cacheable_methods = cacheable_methods or ("GET",)

        controller_factory = controller_class or CacheController
        self.controller = controller_factory(
            self.cache, cache_etags=cache_etags, serializer=serializer
        )

    def send(
        self,
        request: PreparedRequest,
        stream: bool = False,
        timeout: None | float | tuple[float, float] | tuple[float, None] = None,
        verify: bool | str = True,
        cert: (None | bytes | str | tuple[bytes | str, bytes | str]) = None,
        proxies: Mapping[str, str] | None = None,
        cacheable_methods: Collection[str] | None = None,
    ) -> Response:
        """
        Send a request. Use the request information to see if it
        exists in the cache and cache the response if we need to and can.
        """
        cacheable = cacheable_methods or self.cacheable_methods
        if request.method in cacheable:
            try:
                cached_response = self.controller.cached_request(request)
            except zlib.error:
                cached_response = None
            if cached_response:
                return self.build_response(request, cached_response, from_cache=True)

            # check for etags and add headers if appropriate
            request.headers.update(self.controller.conditional_headers(request))

        resp = super().send(request, stream, timeout, verify, cert, proxies)

        return resp

    def build_response(
        self,
        request: PreparedRequest,
        response: HTTPResponse,
        from_cache: bool = False,
        cacheable_methods: Collection[str] | None = None,
    ) -> Response:
        """
        Build a response by making a request or using the cache.

        This will end up calling send and returning a potentially
        cached response
        """
        cacheable = cacheable_methods or self.cacheable_methods
        if not from_cache and request.method in cacheable:
            # Check for any heuristics that might update headers
            # before trying to cache.
            if self.heuristic:
                response = self.heuristic.apply(response)

            # apply any expiration heuristics
            if response.status == 304:
                # We must have sent an ETag request. This could mean
                # that we've been expired already or that we simply
                # have an etag. In either case, we want to try and
                # update the cache if that is the case.
                cached_response = self.controller.update_cached_response(
                    request, response
                )

                if cached_response is not response:
                    from_cache = True

                # We are done with the server response, read a
                # possible response body (compliant servers will
                # not return one, but we cannot be 100% sure) and
                # release the connection back to the pool.
                response.read(decode_content=False)
                response.release_conn()

                response = cached_response

            # We always cache the 301 responses
            elif int(response.status) in PERMANENT_REDIRECT_STATUSES:
                self.controller.cache_response(request, response)
            else:
                # Wrap the response file with a wrapper that will cache the
                #   response when the stream has been consumed.
                response._fp = CallbackFileWrapper(  # type: ignore[attr-defined]
                    response._fp,  # type: ignore[attr-defined]
                    functools.partial(
                        self.controller.cache_response, request, response
                    ),
                )
                if response.chunked:
                    super_update_chunk_length = response._update_chunk_length  # type: ignore[attr-defined]

                    def _update_chunk_length(self: HTTPResponse) -> None:
                        super_update_chunk_length()
                        if self.chunk_left == 0:
                            self._fp._close()  # type: ignore[attr-defined]

                    response._update_chunk_length = types.MethodType(  # type: ignore[attr-defined]
                        _update_chunk_length, response
                    )

        resp: Response = super().build_response(request, response)  # type: ignore[no-untyped-call]

        # See if we should invalidate the cache.
        if request.method in self.invalidating_methods and resp.ok:
            assert request.url is not None
            cache_url = self.controller.cache_url(request.url)
            self.cache.delete(cache_url)

        # Give the request a from_cache attr to let people use it
        resp.from_cache = from_cache  # type: ignore[attr-defined]

        return resp

    def close(self) -> None:
        self.cache.close()
        super().close()  # type: ignore[no-untyped-call]
python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py000064400000003311151732703130017255 0ustar00# SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import logging
from argparse import ArgumentParser
from typing import TYPE_CHECKING

from pip._vendor import requests

from pip._vendor.cachecontrol.adapter import CacheControlAdapter
from pip._vendor.cachecontrol.cache import DictCache
from pip._vendor.cachecontrol.controller import logger

if TYPE_CHECKING:
    from argparse import Namespace

    from pip._vendor.cachecontrol.controller import CacheController


def setup_logging() -> None:
    logger.setLevel(logging.DEBUG)
    handler = logging.StreamHandler()
    logger.addHandler(handler)


def get_session() -> requests.Session:
    adapter = CacheControlAdapter(
        DictCache(), cache_etags=True, serializer=None, heuristic=None
    )
    sess = requests.Session()
    sess.mount("http://", adapter)
    sess.mount("https://", adapter)

    sess.cache_controller = adapter.controller  # type: ignore[attr-defined]
    return sess


def get_args() -> Namespace:
    parser = ArgumentParser()
    parser.add_argument("url", help="The URL to try and cache")
    return parser.parse_args()


def main() -> None:
    args = get_args()
    sess = get_session()

    # Make a request to get a response
    resp = sess.get(args.url)

    # Turn on logging
    setup_logging()

    # try setting the cache
    cache_controller: CacheController = (
        sess.cache_controller  # type: ignore[attr-defined]
    )
    cache_controller.cache_response(resp.request, resp.raw)

    # Now try to get it
    if cache_controller.cached_request(resp.request):
        print("Cached!")
    else:
        print("Not cached :(")


if __name__ == "__main__":
    main()
python3.12/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-312.pyc000064400000001760151732703130023321 0ustar00�

R`i���x�ddlmZmZmZmZmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZgd�ZeZy)�)�NORMALIZED_DISTRO_ID�NORMALIZED_LSB_ID�NORMALIZED_OS_ID�LinuxDistribution�__version__�build_number�codename�distro_release_attr�distro_release_info�id�info�like�linux_distribution�lsb_release_attr�lsb_release_info�
major_version�
minor_version�name�os_release_attr�os_release_info�
uname_attr�
uname_info�version�
version_parts)rrrrrr	r
rrr
rrrrrrrrrrrrrN)�distrorrrrrrr	r
rrr
rrrrrrrrrrrrr�__all__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py�<module>r s6���������6��4�rpython3.12/site-packages/pip/_vendor/distro/__pycache__/distro.cpython-312.pyc000064400000150765151732703140023101 0ustar00�

R`i�����dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZm
Z
mZmZmZmZmZmZ	ddl
mZdZGd�de�ZGd�d	e�Zej4j7d
d�Zej4j7dd
�ZdZddd�Zdddddd�Z ddiZ!ejDd�Z#ejDd�Z$gd�Z%dddedddfZ&d=de'dee(e(e(ffd �Z)de(fd!�Z*d>d"e'de(fd#�Z+d?d"e'd$e'de(fd%�Z,d>d$e'dee(e(e(ffd&�Z-d>d$e'de(fd'�Z.d>d$e'de(fd(�Z/d>d$e'de(fd)�Z0de(fd*�Z1de(fd+�Z2d?d"e'd$e'defd,�Z3de
e(e(ffd-�Z4de
e(e(ffd.�Z5de
e(e(ffd/�Z6de
e(e(ffd0�Z7d1e(de(fd2�Z8d1e(de(fd3�Z9d1e(de(fd4�Z:d1e(de(fd5�Z;	dd6l<m=Z=Gd9�d:�Z>e>�Z?d@d;�Z@eAd<k(re@�yy#e$reZY��~wxYw#e$r
Gd7�d8�Z=Y�BwxYw)Aa�
The ``distro`` package (``distro`` stands for Linux Distribution) provides
information about the Linux distribution it runs on, such as a reliable
machine-readable distro ID, or version information.

It is the recommended replacement for Python's original
:py:func:`platform.linux_distribution` function, but it provides much more
functionality. An alternative implementation became necessary because Python
3.5 deprecated this function, and Python 3.8 removed it altogether. Its
predecessor function :py:func:`platform.dist` was already deprecated since
Python 2.6 and removed in Python 3.8. Still, there are many cases in which
access to OS distribution information is needed. See `Python issue 1322
<https://bugs.python.org/issue1322>`_ for more information.
�N)	�Any�Callable�Dict�Iterable�Optional�Sequence�TextIO�Tuple�Type)�	TypedDictz1.8.0c�,�eZdZUeed<eed<eed<y)�VersionDict�major�minor�build_numberN)�__name__�
__module__�__qualname__�str�__annotations__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distro/distro.pyrr=s���J��J��rrc�@�eZdZUeed<eed<eed<eed<eed<y)�InfoDict�id�version�
version_parts�like�codenameN)rrrrrrrrrrrCs���G�
�L���

�I��Mrr�UNIXCONFDIRz/etc�
UNIXUSRLIBDIRz/usr/libz
os-release�oracle�opensuse)�olz
opensuse-leap�rhel)�enterpriseenterpriseas�enterpriseenterpriseserver�redhatenterpriseworkstation�redhatenterpriseserver�redhatenterprisecomputenode�redhatzA(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)z(\w+)[-_](release|version)$)zSuSE-releasezarch-releasezbase-releasezcentos-releasezfedora-releasezgentoo-releasezmageia-releasezmandrake-releasezmandriva-releasezmandrivalinux-releasezmanjaro-releasezoracle-releasezredhat-releasez
rocky-releasez
sl-releasezslackware-version�debian_versionzlsb-releasezoem-releasezsystem-releasez
plesk-releaseziredmail-release�full_distribution_name�returnc�d�tjdtd��tj	|�S)a�
    .. deprecated:: 1.6.0

        :func:`distro.linux_distribution()` is deprecated. It should only be
        used as a compatibility shim with Python's
        :py:func:`platform.linux_distribution()`. Please use :func:`distro.id`,
        :func:`distro.version` and :func:`distro.name` instead.

    Return information about the current OS distribution as a tuple
    ``(id_name, version, codename)`` with items as follows:

    * ``id_name``:  If *full_distribution_name* is false, the result of
      :func:`distro.id`. Otherwise, the result of :func:`distro.name`.

    * ``version``:  The result of :func:`distro.version`.

    * ``codename``:  The extra item (usually in parentheses) after the
      os-release version number, or the result of :func:`distro.codename`.

    The interface of this function is compatible with the original
    :py:func:`platform.linux_distribution` function, supporting a subset of
    its parameters.

    The data it returns may not exactly be the same, because it uses more data
    sources than the original function, and that may lead to different data if
    the OS distribution is not consistent across multiple data sources it
    provides (there are indeed such distributions ...).

    Another reason for differences is the fact that the :func:`distro.id`
    method normalizes the distro ID string to a reliable machine-readable value
    for a number of popular OS distributions.
    z�distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python's platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.�)�
stacklevel)�warnings�warn�DeprecationWarning�_distro�linux_distribution)r.s rr7r7�s3��B
�M�M�	C�	����%�%�&<�=�=rc�*�tj�S)a�
    Return the distro ID of the current distribution, as a
    machine-readable string.

    For a number of OS distributions, the returned distro ID value is
    *reliable*, in the sense that it is documented and that it does not change
    across releases of the distribution.

    This package maintains the following reliable distro ID values:

    ==============  =========================================
    Distro ID       Distribution
    ==============  =========================================
    "ubuntu"        Ubuntu
    "debian"        Debian
    "rhel"          RedHat Enterprise Linux
    "centos"        CentOS
    "fedora"        Fedora
    "sles"          SUSE Linux Enterprise Server
    "opensuse"      openSUSE
    "amzn"          Amazon Linux
    "arch"          Arch Linux
    "buildroot"     Buildroot
    "cloudlinux"    CloudLinux OS
    "exherbo"       Exherbo Linux
    "gentoo"        GenToo Linux
    "ibm_powerkvm"  IBM PowerKVM
    "kvmibm"        KVM for IBM z Systems
    "linuxmint"     Linux Mint
    "mageia"        Mageia
    "mandriva"      Mandriva Linux
    "parallels"     Parallels
    "pidora"        Pidora
    "raspbian"      Raspbian
    "oracle"        Oracle Linux (and Oracle Enterprise Linux)
    "scientific"    Scientific Linux
    "slackware"     Slackware
    "xenserver"     XenServer
    "openbsd"       OpenBSD
    "netbsd"        NetBSD
    "freebsd"       FreeBSD
    "midnightbsd"   MidnightBSD
    "rocky"         Rocky Linux
    "aix"           AIX
    "guix"          Guix System
    ==============  =========================================

    If you have a need to get distros for reliable IDs added into this set,
    or if you find that the :func:`distro.id` function returns a different
    distro ID for one of the listed distros, please create an issue in the
    `distro issue tracker`_.

    **Lookup hierarchy and transformations:**

    First, the ID is obtained from the following sources, in the specified
    order. The first available and non-empty value is used:

    * the value of the "ID" attribute of the os-release file,

    * the value of the "Distributor ID" attribute returned by the lsb_release
      command,

    * the first part of the file name of the distro release file,

    The so determined ID value then passes the following transformations,
    before it is returned by this method:

    * it is translated to lower case,

    * blanks (which should not be there anyway) are translated to underscores,

    * a normalization of the ID is performed, based upon
      `normalization tables`_. The purpose of this normalization is to ensure
      that the ID is as reliable as possible, even across incompatible changes
      in the OS distributions. A common reason for an incompatible change is
      the addition of an os-release file, or the addition of the lsb_release
      command, with ID values that differ from what was previously determined
      from the distro release file name.
    )r6rrrrrr�s��`�:�:�<�r�prettyc�,�tj|�S)ak
    Return the name of the current OS distribution, as a human-readable
    string.

    If *pretty* is false, the name is returned without version or codename.
    (e.g. "CentOS Linux")

    If *pretty* is true, the version and codename are appended.
    (e.g. "CentOS Linux 7.1.1503 (Core)")

    **Lookup hierarchy:**

    The name is obtained from the following sources, in the specified order.
    The first available and non-empty value is used:

    * If *pretty* is false:

      - the value of the "NAME" attribute of the os-release file,

      - the value of the "Distributor ID" attribute returned by the lsb_release
        command,

      - the value of the "<name>" field of the distro release file.

    * If *pretty* is true:

      - the value of the "PRETTY_NAME" attribute of the os-release file,

      - the value of the "Description" attribute returned by the lsb_release
        command,

      - the value of the "<name>" field of the distro release file, appended
        with the value of the pretty version ("<version_id>" and "<codename>"
        fields) of the distro release file, if available.
    )r6�name�r9s rr;r;s��H�<�<���r�bestc�.�tj||�S)aN
    Return the version of the current OS distribution, as a human-readable
    string.

    If *pretty* is false, the version is returned without codename (e.g.
    "7.0").

    If *pretty* is true, the codename in parenthesis is appended, if the
    codename is non-empty (e.g. "7.0 (Maipo)").

    Some distributions provide version numbers with different precisions in
    the different sources of distribution information. Examining the different
    sources in a fixed priority order does not always yield the most precise
    version (e.g. for Debian 8.2, or CentOS 7.1).

    Some other distributions may not provide this kind of information. In these
    cases, an empty string would be returned. This behavior can be observed
    with rolling releases distributions (e.g. Arch Linux).

    The *best* parameter can be used to control the approach for the returned
    version:

    If *best* is false, the first non-empty version number in priority order of
    the examined sources is returned.

    If *best* is true, the most precise version number out of all examined
    sources is returned.

    **Lookup hierarchy:**

    In all cases, the version number is obtained from the following sources.
    If *best* is false, this order represents the priority order:

    * the value of the "VERSION_ID" attribute of the os-release file,
    * the value of the "Release" attribute returned by the lsb_release
      command,
    * the version number parsed from the "<version_id>" field of the first line
      of the distro release file,
    * the version number parsed from the "PRETTY_NAME" attribute of the
      os-release file, if it follows the format of the distro release files.
    * the version number parsed from the "Description" attribute returned by
      the lsb_release command, if it follows the format of the distro release
      files.
    )r6r�r9r=s  rrrBs��Z�?�?�6�4�(�(rc�,�tj|�S)a�
    Return the version of the current OS distribution as a tuple
    ``(major, minor, build_number)`` with items as follows:

    * ``major``:  The result of :func:`distro.major_version`.

    * ``minor``:  The result of :func:`distro.minor_version`.

    * ``build_number``:  The result of :func:`distro.build_number`.

    For a description of the *best* parameter, see the :func:`distro.version`
    method.
    )r6r�r=s rrrrs��� � ��&�&rc�,�tj|�S)a5
    Return the major version of the current OS distribution, as a string,
    if provided.
    Otherwise, the empty string is returned. The major version is the first
    part of the dot-separated version string.

    For a description of the *best* parameter, see the :func:`distro.version`
    method.
    )r6�
major_versionrAs rrCrC����� � ��&�&rc�,�tj|�S)a6
    Return the minor version of the current OS distribution, as a string,
    if provided.
    Otherwise, the empty string is returned. The minor version is the second
    part of the dot-separated version string.

    For a description of the *best* parameter, see the :func:`distro.version`
    method.
    )r6�
minor_versionrAs rrFrF�rDrc�,�tj|�S)a3
    Return the build number of the current OS distribution, as a string,
    if provided.
    Otherwise, the empty string is returned. The build number is the third part
    of the dot-separated version string.

    For a description of the *best* parameter, see the :func:`distro.version`
    method.
    )r6rrAs rrr�s������%�%rc�*�tj�S)a
    Return a space-separated list of distro IDs of distributions that are
    closely related to the current OS distribution in regards to packaging
    and programming interfaces, for example distributions the current
    distribution is a derivative from.

    **Lookup hierarchy:**

    This information item is only provided by the os-release file.
    For details, see the description of the "ID_LIKE" attribute in the
    `os-release man page
    <http://www.freedesktop.org/software/systemd/man/os-release.html>`_.
    )r6rrrrrr�s���<�<�>�rc�*�tj�S)a�
    Return the codename for the release of the current OS distribution,
    as a string.

    If the distribution does not have a codename, an empty string is returned.

    Note that the returned codename is not always really a codename. For
    example, openSUSE returns "x86_64". This function does not handle such
    cases in any special way and just returns the string it finds, if any.

    **Lookup hierarchy:**

    * the codename within the "VERSION" attribute of the os-release file, if
      provided,

    * the value of the "Codename" attribute returned by the lsb_release
      command,

    * the value of the "<codename>" field of the distro release file.
    )r6r rrrr r �s��*����rc�.�tj||�S)a�
    Return certain machine-readable information items about the current OS
    distribution in a dictionary, as shown in the following example:

    .. sourcecode:: python

        {
            'id': 'rhel',
            'version': '7.0',
            'version_parts': {
                'major': '7',
                'minor': '0',
                'build_number': ''
            },
            'like': 'fedora',
            'codename': 'Maipo'
        }

    The dictionary structure and keys are always the same, regardless of which
    information items are available in the underlying data sources. The values
    for the various keys are as follows:

    * ``id``:  The result of :func:`distro.id`.

    * ``version``:  The result of :func:`distro.version`.

    * ``version_parts -> major``:  The result of :func:`distro.major_version`.

    * ``version_parts -> minor``:  The result of :func:`distro.minor_version`.

    * ``version_parts -> build_number``:  The result of
      :func:`distro.build_number`.

    * ``like``:  The result of :func:`distro.like`.

    * ``codename``:  The result of :func:`distro.codename`.

    For a description of the *pretty* and *best* parameters, see the
    :func:`distro.version` method.
    )r6�infor?s  rrKrK�s��R�<�<���%�%rc�*�tj�S)z�
    Return a dictionary containing key-value pairs for the information items
    from the os-release file data source of the current OS distribution.

    See `os-release file`_ for details about these information items.
    )r6�os_release_inforrrrMrM�s���"�"�$�$rc�*�tj�S)z�
    Return a dictionary containing key-value pairs for the information items
    from the lsb_release command data source of the current OS distribution.

    See `lsb_release command output`_ for details about these information
    items.
    )r6�lsb_release_inforrrrOrO	s���#�#�%�%rc�*�tj�S)z�
    Return a dictionary containing key-value pairs for the information items
    from the distro release file data source of the current OS distribution.

    See `distro release file`_ for details about these information items.
    )r6�distro_release_inforrrrQrQs���&�&�(�(rc�*�tj�S)z�
    Return a dictionary containing key-value pairs for the information items
    from the distro release file data source of the current OS distribution.
    )r6�
uname_inforrrrSrSs��
����r�	attributec�,�tj|�S)a�
    Return a single named information item from the os-release file data source
    of the current OS distribution.

    Parameters:

    * ``attribute`` (string): Key of the information item.

    Returns:

    * (string): Value of the information item, if the item exists.
      The empty string, if the item does not exist.

    See `os-release file`_ for details about these information items.
    )r6�os_release_attr�rTs rrVrV&s�� �"�"�9�-�-rc�,�tj|�S)a�
    Return a single named information item from the lsb_release command output
    data source of the current OS distribution.

    Parameters:

    * ``attribute`` (string): Key of the information item.

    Returns:

    * (string): Value of the information item, if the item exists.
      The empty string, if the item does not exist.

    See `lsb_release command output`_ for details about these information
    items.
    )r6�lsb_release_attrrWs rrYrY9s��"�#�#�I�.�.rc�,�tj|�S)a�
    Return a single named information item from the distro release file
    data source of the current OS distribution.

    Parameters:

    * ``attribute`` (string): Key of the information item.

    Returns:

    * (string): Value of the information item, if the item exists.
      The empty string, if the item does not exist.

    See `distro release file`_ for details about these information items.
    )r6�distro_release_attrrWs rr[r[Ms�� �&�&�y�1�1rc�,�tj|�S)aZ
    Return a single named information item from the distro release file
    data source of the current OS distribution.

    Parameters:

    * ``attribute`` (string): Key of the information item.

    Returns:

    * (string): Value of the information item, if the item exists.
                The empty string, if the item does not exist.
    )r6�
uname_attrrWs rr]r]`s�����i�(�(r)�cached_propertyc�F�eZdZdZdeegefddfd�Zdedeedefd�Zy)	r^z�A version of @property which caches the value.  On access, it calls the
        underlying function and sets the value in `__dict__` so future accesses
        will not re-call the property.
        �fr/Nc�4�|j|_||_y�N)r�_fname�_f)�selfr`s  r�__init__zcached_property.__init__{s���*�*�D�K��D�Gr�obj�ownerc��|�Jd|j�d���|j|�x}|j|j<|S)Nzcall z on an instance)rcrd�__dict__)rergrh�rets    r�__get__zcached_property.__get__sB���?�H�e�D�K�K�=��$H�H�?�.2�g�g�c�l�:�C�#�,�,�t�{�{�+��Jr)	rrr�__doc__rrrfrrlrrrr^r^usC��	�
	�h��u�c�z�2�	�t�	�	�s�	�4��9�	��	rr^c�\�eZdZdZ						d4deedededeedeedeed	dfd
�Zd	efd�Z	d5ded	e	eeeffd
�Z
d	efd�Zd6ded	efd�Zd7deded	efd�Z
d6ded	e	eeeffd�Zd6ded	efd�Zd6ded	efd�Zd6ded	efd�Zd	efd�Zd	efd�Zd7deded	efd�Zd	eeeffd�Zd	eeeffd�Zd	eeeffd�Zd	eeeffd�Zd	efd�Zded	efd �Zded	efd!�Zded	efd"�Zded	efd#�Ze d	eeeffd$��Z!e"d%e#d	eeeffd&��Z$e d	eeeffd'��Z%e"d%e&ed	eeeffd(��Z'e d	eeeffd)��Z(e d	efd*��Z)e d	efd+��Z*e"d%e+ed	eeeffd,��Z,e"d-e-d	efd.��Z.e d	eeeffd/��Z/d0ed	eeeffd1�Z0e"d2ed	eeeffd3��Z1y)8�LinuxDistributiona
    Provides information about a OS distribution.

    This package creates a private module-global instance of this class with
    default initialization arguments, that is used by the
    `consolidated accessor functions`_ and `single source accessor functions`_.
    By using default initialization arguments, that module-global instance
    returns data about the current OS distribution (i.e. the distro this
    package runs on).

    Normally, it is not necessary to create additional instances of this class.
    However, in situations where control is needed over the exact data sources
    that are used, instances of this class can be created with a specific
    distro release file, or a specific os-release file, or without invoking the
    lsb_release command.
    N�include_lsb�os_release_file�distro_release_file�
include_uname�root_dir�include_oslevelr/c���||_|r tjj|d�nt|_|r tjj|d�nt|_|r||_n�tjj|j
t�}tjj|jt�}tjj|�stjj|�s||_n||_|xsd|_|du}	|	r|s|s|rtd��|�|n|	|_
|�|n|	|_|�||_y|	|_y)ah
        The initialization method of this class gathers information from the
        available data sources, and stores that in private instance attributes.
        Subsequent access to the information items uses these private instance
        attributes, so that the data sources are read only once.

        Parameters:

        * ``include_lsb`` (bool): Controls whether the
          `lsb_release command output`_ is included as a data source.

          If the lsb_release command is not available in the program execution
          path, the data source for the lsb_release command will be empty.

        * ``os_release_file`` (string): The path name of the
          `os-release file`_ that is to be used as a data source.

          An empty string (the default) will cause the default path name to
          be used (see `os-release file`_ for details).

          If the specified or defaulted os-release file does not exist, the
          data source for the os-release file will be empty.

        * ``distro_release_file`` (string): The path name of the
          `distro release file`_ that is to be used as a data source.

          An empty string (the default) will cause a default search algorithm
          to be used (see `distro release file`_ for details).

          If the specified distro release file does not exist, or if no default
          distro release file can be found, the data source for the distro
          release file will be empty.

        * ``include_uname`` (bool): Controls whether uname command output is
          included as a data source. If the uname command is not available in
          the program execution path the data source for the uname command will
          be empty.

        * ``root_dir`` (string): The absolute path to the root directory to use
          to find distro-related information files. Note that ``include_*``
          parameters must not be enabled in combination with ``root_dir``.

        * ``include_oslevel`` (bool): Controls whether (AIX) oslevel command
          output is included as a data source. If the oslevel command is not
          available in the program execution path the data source will be
          empty.

        Public instance attributes:

        * ``os_release_file`` (string): The path name of the
          `os-release file`_ that is actually used as a data source. The
          empty string if no distro release file is used as a data source.

        * ``distro_release_file`` (string): The path name of the
          `distro release file`_ that is actually used as a data source. The
          empty string if no distro release file is used as a data source.

        * ``include_lsb`` (bool): The result of the ``include_lsb`` parameter.
          This controls whether the lsb information will be loaded.

        * ``include_uname`` (bool): The result of the ``include_uname``
          parameter. This controls whether the uname information will
          be loaded.

        * ``include_oslevel`` (bool): The result of the ``include_oslevel``
          parameter. This controls whether (AIX) oslevel information will be
          loaded.

        * ``root_dir`` (string): The result of the ``root_dir`` parameter.
          The absolute path to the root directory to use to find distro-related
          information files.

        Raises:

        * :py:exc:`ValueError`: Initialization parameters combination is not
           supported.

        * :py:exc:`OSError`: Some I/O issue with an os-release file or distro
          release file.

        * :py:exc:`UnicodeError`: A data source has unexpected characters or
          uses an unexpected encoding.
        �etczusr/lib�NzcIncluding subprocess data sources from specific root_dir is disallowed to prevent false information)rt�os�path�join�_UNIXCONFDIR�etc_dir�_UNIXUSRLIBDIR�usr_lib_dirrq�_OS_RELEASE_BASENAME�isfilerr�
ValueErrorrprsru)
rerprqrrrsrtru�etc_dir_os_release_file�usr_lib_os_release_file�is_root_dir_defineds
          rrfzLinuxDistribution.__init__�sD��x!��
�8@�r�w�w�|�|�H�e�4�l���19�B�G�G�L�L��9�-�~�	
���#2�D� �&(�g�g�l�l�4�<�<�AU�&V�#�&(�g�g�l�l�� � �"6�'�#��w�w�~�~�5�6�b�g�g�n�n�'�?�(?��$�'>��$�#6�#<�"�� �&�d�2���K�=�O��0��
�
'�2�K�<O�8O�	
��+�6�M�@S�<S�	
�� /�:�O�	
��DW�@W�	
�rc�&�dj|��S)zReturn repr of all infoa�LinuxDistribution(os_release_file={self.os_release_file!r}, distro_release_file={self.distro_release_file!r}, include_lsb={self.include_lsb!r}, include_uname={self.include_uname!r}, include_oslevel={self.include_oslevel!r}, root_dir={self.root_dir!r}, _os_release_info={self._os_release_info!r}, _lsb_release_info={self._lsb_release_info!r}, _distro_release_info={self._distro_release_info!r}, _uname_info={self._uname_info!r}, _oslevel_info={self._oslevel_info!r})�re)�formatr�s r�__repr__zLinuxDistribution.__repr__s��
4�5;�F��F�4E�
	
rr.c��|r|j�n|j�|j�|jj	d�xs|j�fS)z�
        Return information about the OS distribution that is compatible
        with Python's :func:`platform.linux_distribution`, supporting a subset
        of its parameters.

        For details, see :func:`distro.linux_distribution`.
        �release_codename)r;rr�_os_release_info�getr )rer.s  rr7z$LinuxDistribution.linux_distribution-sJ��2�D�I�I�K�t�w�w�y��L�L�N��!�!�%�%�&8�9�L�T�]�]�_�
�	
rc�J�dtdtttfdtfd�}|jd�}|r
||t�S|j	d�}|r
||t
�S|j
d�}|r
||t�S|jd�}|r
||t�Sy)zoReturn the distro ID of the OS distribution, as a string.

        For details, see :func:`distro.id`.
        �	distro_id�tabler/c�f�|j�jdd�}|j||�S)N� �_)�lower�replacer�)r�r�s  r�	normalizez'LinuxDistribution.id.<locals>.normalizeCs,��!���)�1�1�#�s�;�I��9�9�Y�	�2�2rr�distributor_idrx)	rrrV�NORMALIZED_OS_IDrY�NORMALIZED_LSB_IDr[�NORMALIZED_DISTRO_IDr])rer�r�s   rrzLinuxDistribution.id=s���	3��	3�T�#�s�(�^�	3��	3��(�(��.�	���Y�(8�9�9��)�)�*:�;�	���Y�(9�:�:��,�,�T�2�	���Y�(<�=�=��O�O�D�)�	���Y�(<�=�=�rr9c�p�|jd�xs7|jd�xs$|jd�xs|jd�}|re|jd�xs|jd�}|s?|jd�xs|jd�}|j	d��}|r|�d|��}|xsdS)	zu
        Return the name of the OS distribution, as a string.

        For details, see :func:`distro.name`.
        r;r��pretty_name�descriptionTr<r�rx)rVrYr[r]r)rer9r;rs    rr;zLinuxDistribution.nameYs���
� � ��(�
'��$�$�%5�6�
'��'�'��/�
'����v�&�		
���'�'�
�6��$�:O�:O��;�D���/�/��7�R�4�?�?�6�;R���,�,�d�,�3���"�V�1�W�I�.�D��z�r�rr=c	�F�|jd�|jd�|jd�|j|jd��j	dd�|j|jd��j	dd�|jd�g}|jd�j
d�r!|jd|j��nN|j�d	k(s d	|j�j�vr|j|j�d}|r3|D]-}|jd
�|jd
�kDs|dk(s�,|}�/n|D]}|dk7s�	|}n|r(|r&|j�r|�d|j��d�}|S)
z{
        Return the version of the OS distribution, as a string.

        For details, see :func:`distro.version`.
        �
version_id�releaser�rxr�r�aixr�debian�.z (�))rVrYr[�_parse_distro_release_contentr�r]�
startswith�insert�oslevel_inforr�split�append�_debian_version�countr )rer9r=�versionsr�vs      rrzLinuxDistribution.versionpsz��
� � ��.��!�!�)�,��$�$�\�2��.�.�t�/C�/C�M�/R�S�W�W��b�
�
�.�.��%�%�m�4�
��c�,��#��O�O�I�&�
���?�?�4� �+�+�E�2��O�O�A�t�0�0�2�3�
�W�W�Y�(�
"�h�$�)�)�+�2C�2C�2E�&E��O�O�D�0�0�1����
���7�7�3�<�'�-�-��"4�4��2�
��G������7��G����g�$�-�-�/� �	��D�M�M�O�#4�A�6�G��rc��|j|��}|rItjd�}|j|�}|r!|j	�\}}}||xsd|xsdfSy)z�
        Return the version of the OS distribution, as a tuple of version
        numbers.

        For details, see :func:`distro.version_parts`.
        rAz(\d+)\.?(\d+)?\.?(\d+)?rx)rxrxrx)r�re�compile�match�groups)rer=�version_str�
version_regex�matchesrrrs        rrzLinuxDistribution.version_parts�se���l�l��l�-����J�J�'A�B�M�#�)�)�+�6�G��-4�^�^�-=�*��u�l��e�k�r�<�+=�2�=�=�rc�*�|j|�dS)z�
        Return the major version number of the current distribution.

        For details, see :func:`distro.major_version`.
        r�r�rer=s  rrCzLinuxDistribution.major_version�����!�!�$�'��*�*rc�*�|j|�dS)z�
        Return the minor version number of the current distribution.

        For details, see :func:`distro.minor_version`.
        �r�r�s  rrFzLinuxDistribution.minor_version�r�rc�*�|j|�dS)z}
        Return the build number of the current distribution.

        For details, see :func:`distro.build_number`.
        r1r�r�s  rrzLinuxDistribution.build_number�r�rc�,�|jd�xsdS)z�
        Return the IDs of distributions that are like the OS distribution.

        For details, see :func:`distro.like`.
        �id_likerx)rVr�s rrzLinuxDistribution.like�s���#�#�I�.�4�"�4rc��	|jdS#t$r+|jd�xs|jd�xsdcYSwxYw)zp
        Return the codename of the OS distribution.

        For details, see :func:`distro.codename`.
        r rx)r��KeyErrorrYr[r�s rr zLinuxDistribution.codename�sW��		��(�(��4�4���	��%�%�j�1���+�+�J�7���
�	�s��1A�Ac��t|j�|j||�t|j|�|j	|�|j|���|j
�|j���S)z�
        Return certain machine-readable information about the OS
        distribution.

        For details, see :func:`distro.info`.
        )rrr)rrrrr )�dictrrrCrFrrr )rer9r=s   rrKzLinuxDistribution.info�sn����w�w�y��L�L���.���(�(��.��(�(��.�!�.�.�t�4��
�����]�]�_�

�
	
rc��|jS)z�
        Return a dictionary containing key-value pairs for the information
        items from the os-release file data source of the OS distribution.

        For details, see :func:`distro.os_release_info`.
        )r�r�s rrMz!LinuxDistribution.os_release_info�s���$�$�$rc��|jS)z�
        Return a dictionary containing key-value pairs for the information
        items from the lsb_release command data source of the OS
        distribution.

        For details, see :func:`distro.lsb_release_info`.
        )�_lsb_release_infor�s rrOz"LinuxDistribution.lsb_release_info�s���%�%�%rc��|jS)z�
        Return a dictionary containing key-value pairs for the information
        items from the distro release file data source of the OS
        distribution.

        For details, see :func:`distro.distro_release_info`.
        )�_distro_release_infor�s rrQz%LinuxDistribution.distro_release_infos���(�(�(rc��|jS)z�
        Return a dictionary containing key-value pairs for the information
        items from the uname command data source of the OS distribution.

        For details, see :func:`distro.uname_info`.
        )�_uname_infor�s rrSzLinuxDistribution.uname_infos�����rc��|jS)z5
        Return AIX' oslevel command output.
        )�
_oslevel_infor�s rr�zLinuxDistribution.oslevel_infos���!�!�!rrTc�:�|jj|d�S)z�
        Return a single named information item from the os-release file data
        source of the OS distribution.

        For details, see :func:`distro.os_release_attr`.
        rx)r�r��rerTs  rrVz!LinuxDistribution.os_release_attrs���$�$�(�(��B�7�7rc�:�|jj|d�S)z�
        Return a single named information item from the lsb_release command
        output data source of the OS distribution.

        For details, see :func:`distro.lsb_release_attr`.
        rx)r�r�r�s  rrYz"LinuxDistribution.lsb_release_attr#s���%�%�)�)�)�R�8�8rc�:�|jj|d�S)z�
        Return a single named information item from the distro release file
        data source of the OS distribution.

        For details, see :func:`distro.distro_release_attr`.
        rx)r�r�r�s  rr[z%LinuxDistribution.distro_release_attr,s���(�(�,�,�Y��;�;rc�:�|jj|d�S)z�
        Return a single named information item from the uname command
        output data source of the OS distribution.

        For details, see :func:`distro.uname_attr`.
        rx)r�r�r�s  rr]zLinuxDistribution.uname_attr5s�����#�#�I�r�2�2rc���tjj|j�r2t	|jd��5}|j|�cddd�SiS#1swYiSxYw)z�
        Get the information items from the specified os-release file.

        Returns:
            A dictionary containing all information items.
        �utf-8��encodingN)ryrzr�rq�open�_parse_os_release_content)re�release_files  rr�z"LinuxDistribution._os_release_info>sR���7�7�>�>�$�.�.�/��d�*�*�W�=���5�5�l�C�>�=��	�>��	�s�A�A(�linesc��i}tj|d��}d|_t|�}|D]/}d|vs�|jdd�\}}|||j	�<�1d|vrItjd|d�}|r.|jd�xs|jd�}|x|d<|d	<d
|vr
|d
|d<|Sd|vr|d|d<|S)aD
        Parse the lines of an os-release file.

        Parameters:

        * lines: Iterable through the lines in the os-release file.
                 Each line must be a unicode string or a UTF-8 encoded byte
                 string.

        Returns:
            A dictionary containing all information items.
        T)�posix�=r�rz\((\D+)\)|,\s*(\D+)r1r r��version_codename�ubuntu_codename)�shlex�whitespace_split�listr�r�r��search�group)	r��props�lexer�tokens�token�kr�r�r�s	         rr�z+LinuxDistribution._parse_os_release_contentKs��������E��.��!%����e����E��e�|��{�{�3��*���1�#$��a�g�g�i� ������I�I�4�e�I�6F�G�E��#(�;�;�q�>�#C�U�[�[��^� �@P�P��j�!�E�*<�$=���&�
!&�&8� 9�E�*��
��	�%�
'� %�&7� 8�E�*���rc��|jsiS	d}tj|tj��}|j
|�j�}|j|�S#ttj
f$ricYSwxYw)z�
        Get the information items from the lsb_release command output.

        Returns:
            A dictionary containing all information items.
        )�lsb_releasez-a��stderr)	rp�
subprocess�check_output�DEVNULL�OSError�CalledProcessError�_to_str�
splitlines�_parse_lsb_release_content�re�cmd�stdout�contents    rr�z#LinuxDistribution._lsb_release_info}s������I�	�'�C��,�,�S��9K�9K�L�F��,�,�v�&�1�1�3���.�.�w�7�7����6�6�7�	��I�	�s�'A'�'B�Bc��i}|D]v}|jd�jdd�}t|�dk7r�3|\}}|j|j	dd�j�|j�i��x|S)aM
        Parse the output of the lsb_release command.

        Parameters:

        * lines: Iterable through the lines of the lsb_release output.
                 Each line must be a unicode string or a UTF-8 encoded byte
                 string.

        Returns:
            A dictionary containing all information items.
        �
�:r�r1r�r�)�stripr��len�updater�r�)r�r��line�kvr�r�s      rr�z,LinuxDistribution._parse_lsb_release_content�sw�����D����D�!�'�'��Q�/�B��2�w�!�|���D�A�q��L�L�!�)�)�C��-�3�3�5�q�w�w�y�A�B�
��rc���|jsiS	d}tj|tj��}|j|�j
�}|j|�S#t$ricYSwxYw)N)�unamez-rsr�)rsr�r�r�r�r�r��_parse_uname_contentr�s    rr�zLinuxDistribution._uname_info�sr���!�!��I�	�"�C��,�,�S��9K�9K�L�F��,�,�v�&�1�1�3���(�(��1�1���	��I�	�s�'A'�'A5�4A5c���|jsy	tjdtj��}|j
|�j�S#ttj
f$rYywxYw)Nrx�oslevelr�)rur�r�r�r�r�r�r�)rer�s  rr�zLinuxDistribution._oslevel_info�sd���#�#��	��,�,�Y�z�?Q�?Q�R�F��|�|�F�#�)�)�+�+����6�6�7�	��	�s�%A�A/�.A/c���	ttjj|jd�d��5}|j�j
�cddd�S#1swYyxYw#t$rYywxYw)Nr-�asciir�rx)r�ryrzr{r}�readline�rstrip�FileNotFoundError)re�fps  rr�z!LinuxDistribution._debian_version�s`��	�������T�\�\�+;�<�w����{�{�}�+�+�-�����!�	��	�s.�5A+�A�	A+�A(�$A+�(A+�+	A7�6A7c���|siSi}tjd|dj��}|r7|j�\}}|dk(riS|j	�|d<||d<||d<|S)Nz^([^\s]+)\s+([\d\.]+)r�Linuxrr;r�)r�r�r�r�r�)r�r�r�r;rs     rrz&LinuxDistribution._parse_uname_content�sr����I����	�	�2�E�!�H�N�N�4D�E���!�L�L�N�M�D�'�
�w���	��*�*�,�E�$�K� �E�&�M�&�E�)���r�
bytestringc�L�tj�}|j|�Srb)�sys�getfilesystemencoding�decode)rr�s  rr�zLinuxDistribution._to_str�s!���,�,�.��� � ��*�*rc	�j�|jrZ|j|j�}tjj	|j�}t
j
|�}n�	tj|j�D�cgc]S}|tvrItjjtjj|j|��r|��U}}|j�|D]b}t
j
|�}|��tjj|j|�}|j|�}d|vr�[||_niS|�|jd�|d<d|j!dd�j#�vrd|d<|Scc}w#t$r	t}Y��wxYw)z�
        Get the information items from the specified distro release file.

        Returns:
            A dictionary containing all information items.
        r;r�r�
cloudlinuxrx)rr�_parse_distro_release_fileryrz�basename� _DISTRO_RELEASE_BASENAME_PATTERNr��listdirr}� _DISTRO_RELEASE_IGNORE_BASENAMESr�r{�sortr��_DISTRO_RELEASE_BASENAMESr�r�r�)re�distro_inforr��	basenames�filepaths      rr�z&LinuxDistribution._distro_release_info�s����#�#��9�9�$�:R�:R�S�K��w�w�'�'��(@�(@�A�H�
5�:�:�8�D�E�
6�%'�J�J�t�|�|�$<��$<���'G�G������r�w�w�|�|�D�L�L�(�'K�L��$<������ �&��8�>�>�x�H���=���7�7�<�<����h�?��"�=�=�h�G����,��+3��(��&��	��� %���A��K����;�?�?�6�2�6�<�<�>�>� ,�K������K���
6�
6�	�
6�s%�(!F �	AF�!F �F � F2�1F2rc��	t|d��5}|j|j��cddd�S#1swYyxYw#t$ricYSwxYw)z�
        Parse a distro release file.

        Parameters:

        * filepath: Path name of the distro release file.

        Returns:
            A dictionary containing all information items.
        r�r�N)r�r�rr�)rerrs   rrz,LinuxDistribution._parse_distro_release_filesL��		��h��1�R��9�9�"�+�+�-�H�2�1�1���	��I�		�s*�
A�8�	A�A�A�A�A�Ar�c�n�tj|j�ddd��}i}|rr|jd�ddd�|d<|jd�r|jd�ddd�|d<|jd�r|jd�ddd�|d<|S|r|j�|d<|S)	a
        Parse a line from a distro release file.

        Parameters:
        * line: Line from the distro release file. Must be a unicode string
                or a UTF-8 encoded byte string.

        Returns:
            A dictionary containing all information items.
        N����r;r1r�r�r )�(_DISTRO_RELEASE_CONTENT_REVERSED_PATTERNr�r�r�)r�r�rs   rr�z/LinuxDistribution._parse_distro_release_content1s���;�@�@�����d�PR�d�AS�T�����")�-�-��"2�4�R�4�"8�K����}�}�Q��,3�M�M�!�,<�T�r�T�,B��L�)��}�}�Q��*1�-�-��*:�4�R�4�*@��J�'����"&�*�*�,�K����r)NrxrxNNN�T�F�FF)2rrrrmr�boolrrfr�r
r7rr;rrrCrFrrr rrKrrMrOrQrSr�rVrYr[r]r^r��staticmethodr	r�r�rr�r�r�r�rr�bytesr�r�rr�rrrroro�s����&'+�!�#%�(,�"&�*.�C
��d�^�C
��C
�!�	C
�
 ��~�C
��3�-�
C
�"�$��C
�
�C
�J
�#�
�$.2�
�&*�
�	�s�C��}�	�
� �C��8�4��C��.(�d�(�$�(�3�(�T�$��5��c�3��3G�� +�$�+�3�+�+�$�+�3�+�+��+�#�+�5�c�5��#��"
�4�
�t�
��
�&%��c�3�h��%�&�$�s�C�x�.�&�)�T�#�s�(�^�)� �D��c��N� �"�c�"�8��8��8�9�#�9�#�9�<�S�<�S�<�3�C�3�C�3��
�$�s�C�x�.�
��
��/��/�D��c��N�/��/�b�8�4��S��>�8��8�$��(�3�-��D��c��N����.�	2�T�#�s�(�^�	2��	2��,�s�,��,���������H�S�M��d�3��8�n����$�+�E�+�c�+��+��8�d�3��8�n�8��8�t�3��4��S��>��,��C��D��c��N���rroc�.�tjt�}|jtj�|jtjtj��tjd��}|jdddd��|jdd	td
d��|j�}|jrtd
d
d
|j��}nt }|j"r6|j%t#j&|j%�dd���y|j%d|j)d���|j+d��}|j%d|�|j-�}|j%d|�y)NzOS distro info tool)r�z--jsonz-jz!Output in machine readable format�
store_true)�help�actionz
--root-dirz-rrtz5Path to the root filesystem directory (defaults to /))�type�destr,F)rprsrurt�T)�indent�	sort_keyszName: %sr<zVersion: %szCodename: %s)�logging�	getLoggerr�setLevel�DEBUG�
addHandler�
StreamHandlerrr��argparse�ArgumentParser�add_argumentr�
parse_argsrtror6�jsonrK�dumpsr;rr )�logger�parser�args�dist�distribution_version�distribution_codenames      r�mainrENsC��
�
�
�x�
(�F�
�O�O�G�M�M�"�
���g�+�+�C�J�J�7�8�
�
$�
$�1F�
G�F�
����$�@���������
�
�
D�������D��}�}� ���!��]�]�	
�����y�y����D�J�J�t�y�y�{�1��E�F����J��	�	��	� 6�7�#�|�|�4�|�8�����M�#7�8� $�
�
������N�$9�:r�__main__r$r%r&)r/N)Brmr9r=r3ryr�r�r�rr3�typingrrrrrrr	r
rr�ImportErrorr��__version__rr�environr�r|r~r�r�r�r�r�r#rrrr'rr7rr;rrrCrFrrr rKrMrOrQrSrVrYr[r]�	functoolsr^ror6rErrrr�<module>rLs�� 
����	�	���
��
�
�
�� �
���)���y���z�z�~�~�m�V�4���������<��#������'�"*�#)�$�#)��� 
�f���
,6�2�:�:�H�,�(�
$.�2�:�:�.L�#M� ���*�������$� �(>�t�(>�u�S�#�s�]�?S�(>�VP�C�P�f$ ��$ �#�$ �N-)�D�-)��-)��-)�`'��'��s�C��}�)=�'�"
'��
'��
'�
'��
'��
'�
&�t�
&��
&��c��"�#��0)&��)&�T�)&�h�)&�X%��c�3�h��%�&�$�s�C�x�.�&�)�T�#�s�(�^�)� �D��c��N� �.�s�.�s�.�&/��/��/�(2�3�2�3�2�&)�#�)�#�)�"�)�&C�C�L�
��%;�P�z���F���A*���I���z��
�
��s#�F8�G�8G�G�G�Gpython3.12/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-312.pyc000064400000000524151732703140023300 0ustar00�

R`i@��*�ddlmZedk(re�yy)�)�main�__main__N)�distror�__name__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/distro/__main__.py�<module>r
s����z���F�rpython3.12/site-packages/pip/_vendor/distro/__main__.py000064400000000100151732703140016725 0ustar00from .distro import main

if __name__ == "__main__":
    main()
python3.12/site-packages/pip/_vendor/distro/__init__.py000064400000001725151732703140016762 0ustar00from .distro import (
    NORMALIZED_DISTRO_ID,
    NORMALIZED_LSB_ID,
    NORMALIZED_OS_ID,
    LinuxDistribution,
    __version__,
    build_number,
    codename,
    distro_release_attr,
    distro_release_info,
    id,
    info,
    like,
    linux_distribution,
    lsb_release_attr,
    lsb_release_info,
    major_version,
    minor_version,
    name,
    os_release_attr,
    os_release_info,
    uname_attr,
    uname_info,
    version,
    version_parts,
)

__all__ = [
    "NORMALIZED_DISTRO_ID",
    "NORMALIZED_LSB_ID",
    "NORMALIZED_OS_ID",
    "LinuxDistribution",
    "build_number",
    "codename",
    "distro_release_attr",
    "distro_release_info",
    "id",
    "info",
    "like",
    "linux_distribution",
    "lsb_release_attr",
    "lsb_release_info",
    "major_version",
    "minor_version",
    "name",
    "os_release_attr",
    "os_release_info",
    "uname_attr",
    "uname_info",
    "version",
    "version_parts",
]

__version__ = __version__
python3.12/site-packages/pip/_vendor/distro/py.typed000064400000000000151732703140016331 0ustar00python3.12/site-packages/pip/_vendor/distro/distro.py000064400000140262151732703140016527 0ustar00#!/usr/bin/env python
# Copyright 2015,2016,2017 Nir Cohen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
The ``distro`` package (``distro`` stands for Linux Distribution) provides
information about the Linux distribution it runs on, such as a reliable
machine-readable distro ID, or version information.

It is the recommended replacement for Python's original
:py:func:`platform.linux_distribution` function, but it provides much more
functionality. An alternative implementation became necessary because Python
3.5 deprecated this function, and Python 3.8 removed it altogether. Its
predecessor function :py:func:`platform.dist` was already deprecated since
Python 2.6 and removed in Python 3.8. Still, there are many cases in which
access to OS distribution information is needed. See `Python issue 1322
<https://bugs.python.org/issue1322>`_ for more information.
"""

import argparse
import json
import logging
import os
import re
import shlex
import subprocess
import sys
import warnings
from typing import (
    Any,
    Callable,
    Dict,
    Iterable,
    Optional,
    Sequence,
    TextIO,
    Tuple,
    Type,
)

try:
    from typing import TypedDict
except ImportError:
    # Python 3.7
    TypedDict = dict

__version__ = "1.8.0"


class VersionDict(TypedDict):
    major: str
    minor: str
    build_number: str


class InfoDict(TypedDict):
    id: str
    version: str
    version_parts: VersionDict
    like: str
    codename: str


_UNIXCONFDIR = os.environ.get("UNIXCONFDIR", "/etc")
_UNIXUSRLIBDIR = os.environ.get("UNIXUSRLIBDIR", "/usr/lib")
_OS_RELEASE_BASENAME = "os-release"

#: Translation table for normalizing the "ID" attribute defined in os-release
#: files, for use by the :func:`distro.id` method.
#:
#: * Key: Value as defined in the os-release file, translated to lower case,
#:   with blanks translated to underscores.
#:
#: * Value: Normalized value.
NORMALIZED_OS_ID = {
    "ol": "oracle",  # Oracle Linux
    "opensuse-leap": "opensuse",  # Newer versions of OpenSuSE report as opensuse-leap
}

#: Translation table for normalizing the "Distributor ID" attribute returned by
#: the lsb_release command, for use by the :func:`distro.id` method.
#:
#: * Key: Value as returned by the lsb_release command, translated to lower
#:   case, with blanks translated to underscores.
#:
#: * Value: Normalized value.
NORMALIZED_LSB_ID = {
    "enterpriseenterpriseas": "oracle",  # Oracle Enterprise Linux 4
    "enterpriseenterpriseserver": "oracle",  # Oracle Linux 5
    "redhatenterpriseworkstation": "rhel",  # RHEL 6, 7 Workstation
    "redhatenterpriseserver": "rhel",  # RHEL 6, 7 Server
    "redhatenterprisecomputenode": "rhel",  # RHEL 6 ComputeNode
}

#: Translation table for normalizing the distro ID derived from the file name
#: of distro release files, for use by the :func:`distro.id` method.
#:
#: * Key: Value as derived from the file name of a distro release file,
#:   translated to lower case, with blanks translated to underscores.
#:
#: * Value: Normalized value.
NORMALIZED_DISTRO_ID = {
    "redhat": "rhel",  # RHEL 6.x, 7.x
}

# Pattern for content of distro release file (reversed)
_DISTRO_RELEASE_CONTENT_REVERSED_PATTERN = re.compile(
    r"(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)"
)

# Pattern for base file name of distro release file
_DISTRO_RELEASE_BASENAME_PATTERN = re.compile(r"(\w+)[-_](release|version)$")

# Base file names to be looked up for if _UNIXCONFDIR is not readable.
_DISTRO_RELEASE_BASENAMES = [
    "SuSE-release",
    "arch-release",
    "base-release",
    "centos-release",
    "fedora-release",
    "gentoo-release",
    "mageia-release",
    "mandrake-release",
    "mandriva-release",
    "mandrivalinux-release",
    "manjaro-release",
    "oracle-release",
    "redhat-release",
    "rocky-release",
    "sl-release",
    "slackware-version",
]

# Base file names to be ignored when searching for distro release file
_DISTRO_RELEASE_IGNORE_BASENAMES = (
    "debian_version",
    "lsb-release",
    "oem-release",
    _OS_RELEASE_BASENAME,
    "system-release",
    "plesk-release",
    "iredmail-release",
)


def linux_distribution(full_distribution_name: bool = True) -> Tuple[str, str, str]:
    """
    .. deprecated:: 1.6.0

        :func:`distro.linux_distribution()` is deprecated. It should only be
        used as a compatibility shim with Python's
        :py:func:`platform.linux_distribution()`. Please use :func:`distro.id`,
        :func:`distro.version` and :func:`distro.name` instead.

    Return information about the current OS distribution as a tuple
    ``(id_name, version, codename)`` with items as follows:

    * ``id_name``:  If *full_distribution_name* is false, the result of
      :func:`distro.id`. Otherwise, the result of :func:`distro.name`.

    * ``version``:  The result of :func:`distro.version`.

    * ``codename``:  The extra item (usually in parentheses) after the
      os-release version number, or the result of :func:`distro.codename`.

    The interface of this function is compatible with the original
    :py:func:`platform.linux_distribution` function, supporting a subset of
    its parameters.

    The data it returns may not exactly be the same, because it uses more data
    sources than the original function, and that may lead to different data if
    the OS distribution is not consistent across multiple data sources it
    provides (there are indeed such distributions ...).

    Another reason for differences is the fact that the :func:`distro.id`
    method normalizes the distro ID string to a reliable machine-readable value
    for a number of popular OS distributions.
    """
    warnings.warn(
        "distro.linux_distribution() is deprecated. It should only be used as a "
        "compatibility shim with Python's platform.linux_distribution(). Please use "
        "distro.id(), distro.version() and distro.name() instead.",
        DeprecationWarning,
        stacklevel=2,
    )
    return _distro.linux_distribution(full_distribution_name)


def id() -> str:
    """
    Return the distro ID of the current distribution, as a
    machine-readable string.

    For a number of OS distributions, the returned distro ID value is
    *reliable*, in the sense that it is documented and that it does not change
    across releases of the distribution.

    This package maintains the following reliable distro ID values:

    ==============  =========================================
    Distro ID       Distribution
    ==============  =========================================
    "ubuntu"        Ubuntu
    "debian"        Debian
    "rhel"          RedHat Enterprise Linux
    "centos"        CentOS
    "fedora"        Fedora
    "sles"          SUSE Linux Enterprise Server
    "opensuse"      openSUSE
    "amzn"          Amazon Linux
    "arch"          Arch Linux
    "buildroot"     Buildroot
    "cloudlinux"    CloudLinux OS
    "exherbo"       Exherbo Linux
    "gentoo"        GenToo Linux
    "ibm_powerkvm"  IBM PowerKVM
    "kvmibm"        KVM for IBM z Systems
    "linuxmint"     Linux Mint
    "mageia"        Mageia
    "mandriva"      Mandriva Linux
    "parallels"     Parallels
    "pidora"        Pidora
    "raspbian"      Raspbian
    "oracle"        Oracle Linux (and Oracle Enterprise Linux)
    "scientific"    Scientific Linux
    "slackware"     Slackware
    "xenserver"     XenServer
    "openbsd"       OpenBSD
    "netbsd"        NetBSD
    "freebsd"       FreeBSD
    "midnightbsd"   MidnightBSD
    "rocky"         Rocky Linux
    "aix"           AIX
    "guix"          Guix System
    ==============  =========================================

    If you have a need to get distros for reliable IDs added into this set,
    or if you find that the :func:`distro.id` function returns a different
    distro ID for one of the listed distros, please create an issue in the
    `distro issue tracker`_.

    **Lookup hierarchy and transformations:**

    First, the ID is obtained from the following sources, in the specified
    order. The first available and non-empty value is used:

    * the value of the "ID" attribute of the os-release file,

    * the value of the "Distributor ID" attribute returned by the lsb_release
      command,

    * the first part of the file name of the distro release file,

    The so determined ID value then passes the following transformations,
    before it is returned by this method:

    * it is translated to lower case,

    * blanks (which should not be there anyway) are translated to underscores,

    * a normalization of the ID is performed, based upon
      `normalization tables`_. The purpose of this normalization is to ensure
      that the ID is as reliable as possible, even across incompatible changes
      in the OS distributions. A common reason for an incompatible change is
      the addition of an os-release file, or the addition of the lsb_release
      command, with ID values that differ from what was previously determined
      from the distro release file name.
    """
    return _distro.id()


def name(pretty: bool = False) -> str:
    """
    Return the name of the current OS distribution, as a human-readable
    string.

    If *pretty* is false, the name is returned without version or codename.
    (e.g. "CentOS Linux")

    If *pretty* is true, the version and codename are appended.
    (e.g. "CentOS Linux 7.1.1503 (Core)")

    **Lookup hierarchy:**

    The name is obtained from the following sources, in the specified order.
    The first available and non-empty value is used:

    * If *pretty* is false:

      - the value of the "NAME" attribute of the os-release file,

      - the value of the "Distributor ID" attribute returned by the lsb_release
        command,

      - the value of the "<name>" field of the distro release file.

    * If *pretty* is true:

      - the value of the "PRETTY_NAME" attribute of the os-release file,

      - the value of the "Description" attribute returned by the lsb_release
        command,

      - the value of the "<name>" field of the distro release file, appended
        with the value of the pretty version ("<version_id>" and "<codename>"
        fields) of the distro release file, if available.
    """
    return _distro.name(pretty)


def version(pretty: bool = False, best: bool = False) -> str:
    """
    Return the version of the current OS distribution, as a human-readable
    string.

    If *pretty* is false, the version is returned without codename (e.g.
    "7.0").

    If *pretty* is true, the codename in parenthesis is appended, if the
    codename is non-empty (e.g. "7.0 (Maipo)").

    Some distributions provide version numbers with different precisions in
    the different sources of distribution information. Examining the different
    sources in a fixed priority order does not always yield the most precise
    version (e.g. for Debian 8.2, or CentOS 7.1).

    Some other distributions may not provide this kind of information. In these
    cases, an empty string would be returned. This behavior can be observed
    with rolling releases distributions (e.g. Arch Linux).

    The *best* parameter can be used to control the approach for the returned
    version:

    If *best* is false, the first non-empty version number in priority order of
    the examined sources is returned.

    If *best* is true, the most precise version number out of all examined
    sources is returned.

    **Lookup hierarchy:**

    In all cases, the version number is obtained from the following sources.
    If *best* is false, this order represents the priority order:

    * the value of the "VERSION_ID" attribute of the os-release file,
    * the value of the "Release" attribute returned by the lsb_release
      command,
    * the version number parsed from the "<version_id>" field of the first line
      of the distro release file,
    * the version number parsed from the "PRETTY_NAME" attribute of the
      os-release file, if it follows the format of the distro release files.
    * the version number parsed from the "Description" attribute returned by
      the lsb_release command, if it follows the format of the distro release
      files.
    """
    return _distro.version(pretty, best)


def version_parts(best: bool = False) -> Tuple[str, str, str]:
    """
    Return the version of the current OS distribution as a tuple
    ``(major, minor, build_number)`` with items as follows:

    * ``major``:  The result of :func:`distro.major_version`.

    * ``minor``:  The result of :func:`distro.minor_version`.

    * ``build_number``:  The result of :func:`distro.build_number`.

    For a description of the *best* parameter, see the :func:`distro.version`
    method.
    """
    return _distro.version_parts(best)


def major_version(best: bool = False) -> str:
    """
    Return the major version of the current OS distribution, as a string,
    if provided.
    Otherwise, the empty string is returned. The major version is the first
    part of the dot-separated version string.

    For a description of the *best* parameter, see the :func:`distro.version`
    method.
    """
    return _distro.major_version(best)


def minor_version(best: bool = False) -> str:
    """
    Return the minor version of the current OS distribution, as a string,
    if provided.
    Otherwise, the empty string is returned. The minor version is the second
    part of the dot-separated version string.

    For a description of the *best* parameter, see the :func:`distro.version`
    method.
    """
    return _distro.minor_version(best)


def build_number(best: bool = False) -> str:
    """
    Return the build number of the current OS distribution, as a string,
    if provided.
    Otherwise, the empty string is returned. The build number is the third part
    of the dot-separated version string.

    For a description of the *best* parameter, see the :func:`distro.version`
    method.
    """
    return _distro.build_number(best)


def like() -> str:
    """
    Return a space-separated list of distro IDs of distributions that are
    closely related to the current OS distribution in regards to packaging
    and programming interfaces, for example distributions the current
    distribution is a derivative from.

    **Lookup hierarchy:**

    This information item is only provided by the os-release file.
    For details, see the description of the "ID_LIKE" attribute in the
    `os-release man page
    <http://www.freedesktop.org/software/systemd/man/os-release.html>`_.
    """
    return _distro.like()


def codename() -> str:
    """
    Return the codename for the release of the current OS distribution,
    as a string.

    If the distribution does not have a codename, an empty string is returned.

    Note that the returned codename is not always really a codename. For
    example, openSUSE returns "x86_64". This function does not handle such
    cases in any special way and just returns the string it finds, if any.

    **Lookup hierarchy:**

    * the codename within the "VERSION" attribute of the os-release file, if
      provided,

    * the value of the "Codename" attribute returned by the lsb_release
      command,

    * the value of the "<codename>" field of the distro release file.
    """
    return _distro.codename()


def info(pretty: bool = False, best: bool = False) -> InfoDict:
    """
    Return certain machine-readable information items about the current OS
    distribution in a dictionary, as shown in the following example:

    .. sourcecode:: python

        {
            'id': 'rhel',
            'version': '7.0',
            'version_parts': {
                'major': '7',
                'minor': '0',
                'build_number': ''
            },
            'like': 'fedora',
            'codename': 'Maipo'
        }

    The dictionary structure and keys are always the same, regardless of which
    information items are available in the underlying data sources. The values
    for the various keys are as follows:

    * ``id``:  The result of :func:`distro.id`.

    * ``version``:  The result of :func:`distro.version`.

    * ``version_parts -> major``:  The result of :func:`distro.major_version`.

    * ``version_parts -> minor``:  The result of :func:`distro.minor_version`.

    * ``version_parts -> build_number``:  The result of
      :func:`distro.build_number`.

    * ``like``:  The result of :func:`distro.like`.

    * ``codename``:  The result of :func:`distro.codename`.

    For a description of the *pretty* and *best* parameters, see the
    :func:`distro.version` method.
    """
    return _distro.info(pretty, best)


def os_release_info() -> Dict[str, str]:
    """
    Return a dictionary containing key-value pairs for the information items
    from the os-release file data source of the current OS distribution.

    See `os-release file`_ for details about these information items.
    """
    return _distro.os_release_info()


def lsb_release_info() -> Dict[str, str]:
    """
    Return a dictionary containing key-value pairs for the information items
    from the lsb_release command data source of the current OS distribution.

    See `lsb_release command output`_ for details about these information
    items.
    """
    return _distro.lsb_release_info()


def distro_release_info() -> Dict[str, str]:
    """
    Return a dictionary containing key-value pairs for the information items
    from the distro release file data source of the current OS distribution.

    See `distro release file`_ for details about these information items.
    """
    return _distro.distro_release_info()


def uname_info() -> Dict[str, str]:
    """
    Return a dictionary containing key-value pairs for the information items
    from the distro release file data source of the current OS distribution.
    """
    return _distro.uname_info()


def os_release_attr(attribute: str) -> str:
    """
    Return a single named information item from the os-release file data source
    of the current OS distribution.

    Parameters:

    * ``attribute`` (string): Key of the information item.

    Returns:

    * (string): Value of the information item, if the item exists.
      The empty string, if the item does not exist.

    See `os-release file`_ for details about these information items.
    """
    return _distro.os_release_attr(attribute)


def lsb_release_attr(attribute: str) -> str:
    """
    Return a single named information item from the lsb_release command output
    data source of the current OS distribution.

    Parameters:

    * ``attribute`` (string): Key of the information item.

    Returns:

    * (string): Value of the information item, if the item exists.
      The empty string, if the item does not exist.

    See `lsb_release command output`_ for details about these information
    items.
    """
    return _distro.lsb_release_attr(attribute)


def distro_release_attr(attribute: str) -> str:
    """
    Return a single named information item from the distro release file
    data source of the current OS distribution.

    Parameters:

    * ``attribute`` (string): Key of the information item.

    Returns:

    * (string): Value of the information item, if the item exists.
      The empty string, if the item does not exist.

    See `distro release file`_ for details about these information items.
    """
    return _distro.distro_release_attr(attribute)


def uname_attr(attribute: str) -> str:
    """
    Return a single named information item from the distro release file
    data source of the current OS distribution.

    Parameters:

    * ``attribute`` (string): Key of the information item.

    Returns:

    * (string): Value of the information item, if the item exists.
                The empty string, if the item does not exist.
    """
    return _distro.uname_attr(attribute)


try:
    from functools import cached_property
except ImportError:
    # Python < 3.8
    class cached_property:  # type: ignore
        """A version of @property which caches the value.  On access, it calls the
        underlying function and sets the value in `__dict__` so future accesses
        will not re-call the property.
        """

        def __init__(self, f: Callable[[Any], Any]) -> None:
            self._fname = f.__name__
            self._f = f

        def __get__(self, obj: Any, owner: Type[Any]) -> Any:
            assert obj is not None, f"call {self._fname} on an instance"
            ret = obj.__dict__[self._fname] = self._f(obj)
            return ret


class LinuxDistribution:
    """
    Provides information about a OS distribution.

    This package creates a private module-global instance of this class with
    default initialization arguments, that is used by the
    `consolidated accessor functions`_ and `single source accessor functions`_.
    By using default initialization arguments, that module-global instance
    returns data about the current OS distribution (i.e. the distro this
    package runs on).

    Normally, it is not necessary to create additional instances of this class.
    However, in situations where control is needed over the exact data sources
    that are used, instances of this class can be created with a specific
    distro release file, or a specific os-release file, or without invoking the
    lsb_release command.
    """

    def __init__(
        self,
        include_lsb: Optional[bool] = None,
        os_release_file: str = "",
        distro_release_file: str = "",
        include_uname: Optional[bool] = None,
        root_dir: Optional[str] = None,
        include_oslevel: Optional[bool] = None,
    ) -> None:
        """
        The initialization method of this class gathers information from the
        available data sources, and stores that in private instance attributes.
        Subsequent access to the information items uses these private instance
        attributes, so that the data sources are read only once.

        Parameters:

        * ``include_lsb`` (bool): Controls whether the
          `lsb_release command output`_ is included as a data source.

          If the lsb_release command is not available in the program execution
          path, the data source for the lsb_release command will be empty.

        * ``os_release_file`` (string): The path name of the
          `os-release file`_ that is to be used as a data source.

          An empty string (the default) will cause the default path name to
          be used (see `os-release file`_ for details).

          If the specified or defaulted os-release file does not exist, the
          data source for the os-release file will be empty.

        * ``distro_release_file`` (string): The path name of the
          `distro release file`_ that is to be used as a data source.

          An empty string (the default) will cause a default search algorithm
          to be used (see `distro release file`_ for details).

          If the specified distro release file does not exist, or if no default
          distro release file can be found, the data source for the distro
          release file will be empty.

        * ``include_uname`` (bool): Controls whether uname command output is
          included as a data source. If the uname command is not available in
          the program execution path the data source for the uname command will
          be empty.

        * ``root_dir`` (string): The absolute path to the root directory to use
          to find distro-related information files. Note that ``include_*``
          parameters must not be enabled in combination with ``root_dir``.

        * ``include_oslevel`` (bool): Controls whether (AIX) oslevel command
          output is included as a data source. If the oslevel command is not
          available in the program execution path the data source will be
          empty.

        Public instance attributes:

        * ``os_release_file`` (string): The path name of the
          `os-release file`_ that is actually used as a data source. The
          empty string if no distro release file is used as a data source.

        * ``distro_release_file`` (string): The path name of the
          `distro release file`_ that is actually used as a data source. The
          empty string if no distro release file is used as a data source.

        * ``include_lsb`` (bool): The result of the ``include_lsb`` parameter.
          This controls whether the lsb information will be loaded.

        * ``include_uname`` (bool): The result of the ``include_uname``
          parameter. This controls whether the uname information will
          be loaded.

        * ``include_oslevel`` (bool): The result of the ``include_oslevel``
          parameter. This controls whether (AIX) oslevel information will be
          loaded.

        * ``root_dir`` (string): The result of the ``root_dir`` parameter.
          The absolute path to the root directory to use to find distro-related
          information files.

        Raises:

        * :py:exc:`ValueError`: Initialization parameters combination is not
           supported.

        * :py:exc:`OSError`: Some I/O issue with an os-release file or distro
          release file.

        * :py:exc:`UnicodeError`: A data source has unexpected characters or
          uses an unexpected encoding.
        """
        self.root_dir = root_dir
        self.etc_dir = os.path.join(root_dir, "etc") if root_dir else _UNIXCONFDIR
        self.usr_lib_dir = (
            os.path.join(root_dir, "usr/lib") if root_dir else _UNIXUSRLIBDIR
        )

        if os_release_file:
            self.os_release_file = os_release_file
        else:
            etc_dir_os_release_file = os.path.join(self.etc_dir, _OS_RELEASE_BASENAME)
            usr_lib_os_release_file = os.path.join(
                self.usr_lib_dir, _OS_RELEASE_BASENAME
            )

            # NOTE: The idea is to respect order **and** have it set
            #       at all times for API backwards compatibility.
            if os.path.isfile(etc_dir_os_release_file) or not os.path.isfile(
                usr_lib_os_release_file
            ):
                self.os_release_file = etc_dir_os_release_file
            else:
                self.os_release_file = usr_lib_os_release_file

        self.distro_release_file = distro_release_file or ""  # updated later

        is_root_dir_defined = root_dir is not None
        if is_root_dir_defined and (include_lsb or include_uname or include_oslevel):
            raise ValueError(
                "Including subprocess data sources from specific root_dir is disallowed"
                " to prevent false information"
            )
        self.include_lsb = (
            include_lsb if include_lsb is not None else not is_root_dir_defined
        )
        self.include_uname = (
            include_uname if include_uname is not None else not is_root_dir_defined
        )
        self.include_oslevel = (
            include_oslevel if include_oslevel is not None else not is_root_dir_defined
        )

    def __repr__(self) -> str:
        """Return repr of all info"""
        return (
            "LinuxDistribution("
            "os_release_file={self.os_release_file!r}, "
            "distro_release_file={self.distro_release_file!r}, "
            "include_lsb={self.include_lsb!r}, "
            "include_uname={self.include_uname!r}, "
            "include_oslevel={self.include_oslevel!r}, "
            "root_dir={self.root_dir!r}, "
            "_os_release_info={self._os_release_info!r}, "
            "_lsb_release_info={self._lsb_release_info!r}, "
            "_distro_release_info={self._distro_release_info!r}, "
            "_uname_info={self._uname_info!r}, "
            "_oslevel_info={self._oslevel_info!r})".format(self=self)
        )

    def linux_distribution(
        self, full_distribution_name: bool = True
    ) -> Tuple[str, str, str]:
        """
        Return information about the OS distribution that is compatible
        with Python's :func:`platform.linux_distribution`, supporting a subset
        of its parameters.

        For details, see :func:`distro.linux_distribution`.
        """
        return (
            self.name() if full_distribution_name else self.id(),
            self.version(),
            self._os_release_info.get("release_codename") or self.codename(),
        )

    def id(self) -> str:
        """Return the distro ID of the OS distribution, as a string.

        For details, see :func:`distro.id`.
        """

        def normalize(distro_id: str, table: Dict[str, str]) -> str:
            distro_id = distro_id.lower().replace(" ", "_")
            return table.get(distro_id, distro_id)

        distro_id = self.os_release_attr("id")
        if distro_id:
            return normalize(distro_id, NORMALIZED_OS_ID)

        distro_id = self.lsb_release_attr("distributor_id")
        if distro_id:
            return normalize(distro_id, NORMALIZED_LSB_ID)

        distro_id = self.distro_release_attr("id")
        if distro_id:
            return normalize(distro_id, NORMALIZED_DISTRO_ID)

        distro_id = self.uname_attr("id")
        if distro_id:
            return normalize(distro_id, NORMALIZED_DISTRO_ID)

        return ""

    def name(self, pretty: bool = False) -> str:
        """
        Return the name of the OS distribution, as a string.

        For details, see :func:`distro.name`.
        """
        name = (
            self.os_release_attr("name")
            or self.lsb_release_attr("distributor_id")
            or self.distro_release_attr("name")
            or self.uname_attr("name")
        )
        if pretty:
            name = self.os_release_attr("pretty_name") or self.lsb_release_attr(
                "description"
            )
            if not name:
                name = self.distro_release_attr("name") or self.uname_attr("name")
                version = self.version(pretty=True)
                if version:
                    name = f"{name} {version}"
        return name or ""

    def version(self, pretty: bool = False, best: bool = False) -> str:
        """
        Return the version of the OS distribution, as a string.

        For details, see :func:`distro.version`.
        """
        versions = [
            self.os_release_attr("version_id"),
            self.lsb_release_attr("release"),
            self.distro_release_attr("version_id"),
            self._parse_distro_release_content(self.os_release_attr("pretty_name")).get(
                "version_id", ""
            ),
            self._parse_distro_release_content(
                self.lsb_release_attr("description")
            ).get("version_id", ""),
            self.uname_attr("release"),
        ]
        if self.uname_attr("id").startswith("aix"):
            # On AIX platforms, prefer oslevel command output.
            versions.insert(0, self.oslevel_info())
        elif self.id() == "debian" or "debian" in self.like().split():
            # On Debian-like, add debian_version file content to candidates list.
            versions.append(self._debian_version)
        version = ""
        if best:
            # This algorithm uses the last version in priority order that has
            # the best precision. If the versions are not in conflict, that
            # does not matter; otherwise, using the last one instead of the
            # first one might be considered a surprise.
            for v in versions:
                if v.count(".") > version.count(".") or version == "":
                    version = v
        else:
            for v in versions:
                if v != "":
                    version = v
                    break
        if pretty and version and self.codename():
            version = f"{version} ({self.codename()})"
        return version

    def version_parts(self, best: bool = False) -> Tuple[str, str, str]:
        """
        Return the version of the OS distribution, as a tuple of version
        numbers.

        For details, see :func:`distro.version_parts`.
        """
        version_str = self.version(best=best)
        if version_str:
            version_regex = re.compile(r"(\d+)\.?(\d+)?\.?(\d+)?")
            matches = version_regex.match(version_str)
            if matches:
                major, minor, build_number = matches.groups()
                return major, minor or "", build_number or ""
        return "", "", ""

    def major_version(self, best: bool = False) -> str:
        """
        Return the major version number of the current distribution.

        For details, see :func:`distro.major_version`.
        """
        return self.version_parts(best)[0]

    def minor_version(self, best: bool = False) -> str:
        """
        Return the minor version number of the current distribution.

        For details, see :func:`distro.minor_version`.
        """
        return self.version_parts(best)[1]

    def build_number(self, best: bool = False) -> str:
        """
        Return the build number of the current distribution.

        For details, see :func:`distro.build_number`.
        """
        return self.version_parts(best)[2]

    def like(self) -> str:
        """
        Return the IDs of distributions that are like the OS distribution.

        For details, see :func:`distro.like`.
        """
        return self.os_release_attr("id_like") or ""

    def codename(self) -> str:
        """
        Return the codename of the OS distribution.

        For details, see :func:`distro.codename`.
        """
        try:
            # Handle os_release specially since distros might purposefully set
            # this to empty string to have no codename
            return self._os_release_info["codename"]
        except KeyError:
            return (
                self.lsb_release_attr("codename")
                or self.distro_release_attr("codename")
                or ""
            )

    def info(self, pretty: bool = False, best: bool = False) -> InfoDict:
        """
        Return certain machine-readable information about the OS
        distribution.

        For details, see :func:`distro.info`.
        """
        return dict(
            id=self.id(),
            version=self.version(pretty, best),
            version_parts=dict(
                major=self.major_version(best),
                minor=self.minor_version(best),
                build_number=self.build_number(best),
            ),
            like=self.like(),
            codename=self.codename(),
        )

    def os_release_info(self) -> Dict[str, str]:
        """
        Return a dictionary containing key-value pairs for the information
        items from the os-release file data source of the OS distribution.

        For details, see :func:`distro.os_release_info`.
        """
        return self._os_release_info

    def lsb_release_info(self) -> Dict[str, str]:
        """
        Return a dictionary containing key-value pairs for the information
        items from the lsb_release command data source of the OS
        distribution.

        For details, see :func:`distro.lsb_release_info`.
        """
        return self._lsb_release_info

    def distro_release_info(self) -> Dict[str, str]:
        """
        Return a dictionary containing key-value pairs for the information
        items from the distro release file data source of the OS
        distribution.

        For details, see :func:`distro.distro_release_info`.
        """
        return self._distro_release_info

    def uname_info(self) -> Dict[str, str]:
        """
        Return a dictionary containing key-value pairs for the information
        items from the uname command data source of the OS distribution.

        For details, see :func:`distro.uname_info`.
        """
        return self._uname_info

    def oslevel_info(self) -> str:
        """
        Return AIX' oslevel command output.
        """
        return self._oslevel_info

    def os_release_attr(self, attribute: str) -> str:
        """
        Return a single named information item from the os-release file data
        source of the OS distribution.

        For details, see :func:`distro.os_release_attr`.
        """
        return self._os_release_info.get(attribute, "")

    def lsb_release_attr(self, attribute: str) -> str:
        """
        Return a single named information item from the lsb_release command
        output data source of the OS distribution.

        For details, see :func:`distro.lsb_release_attr`.
        """
        return self._lsb_release_info.get(attribute, "")

    def distro_release_attr(self, attribute: str) -> str:
        """
        Return a single named information item from the distro release file
        data source of the OS distribution.

        For details, see :func:`distro.distro_release_attr`.
        """
        return self._distro_release_info.get(attribute, "")

    def uname_attr(self, attribute: str) -> str:
        """
        Return a single named information item from the uname command
        output data source of the OS distribution.

        For details, see :func:`distro.uname_attr`.
        """
        return self._uname_info.get(attribute, "")

    @cached_property
    def _os_release_info(self) -> Dict[str, str]:
        """
        Get the information items from the specified os-release file.

        Returns:
            A dictionary containing all information items.
        """
        if os.path.isfile(self.os_release_file):
            with open(self.os_release_file, encoding="utf-8") as release_file:
                return self._parse_os_release_content(release_file)
        return {}

    @staticmethod
    def _parse_os_release_content(lines: TextIO) -> Dict[str, str]:
        """
        Parse the lines of an os-release file.

        Parameters:

        * lines: Iterable through the lines in the os-release file.
                 Each line must be a unicode string or a UTF-8 encoded byte
                 string.

        Returns:
            A dictionary containing all information items.
        """
        props = {}
        lexer = shlex.shlex(lines, posix=True)
        lexer.whitespace_split = True

        tokens = list(lexer)
        for token in tokens:
            # At this point, all shell-like parsing has been done (i.e.
            # comments processed, quotes and backslash escape sequences
            # processed, multi-line values assembled, trailing newlines
            # stripped, etc.), so the tokens are now either:
            # * variable assignments: var=value
            # * commands or their arguments (not allowed in os-release)
            # Ignore any tokens that are not variable assignments
            if "=" in token:
                k, v = token.split("=", 1)
                props[k.lower()] = v

        if "version" in props:
            # extract release codename (if any) from version attribute
            match = re.search(r"\((\D+)\)|,\s*(\D+)", props["version"])
            if match:
                release_codename = match.group(1) or match.group(2)
                props["codename"] = props["release_codename"] = release_codename

        if "version_codename" in props:
            # os-release added a version_codename field.  Use that in
            # preference to anything else Note that some distros purposefully
            # do not have code names.  They should be setting
            # version_codename=""
            props["codename"] = props["version_codename"]
        elif "ubuntu_codename" in props:
            # Same as above but a non-standard field name used on older Ubuntus
            props["codename"] = props["ubuntu_codename"]

        return props

    @cached_property
    def _lsb_release_info(self) -> Dict[str, str]:
        """
        Get the information items from the lsb_release command output.

        Returns:
            A dictionary containing all information items.
        """
        if not self.include_lsb:
            return {}
        try:
            cmd = ("lsb_release", "-a")
            stdout = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
        # Command not found or lsb_release returned error
        except (OSError, subprocess.CalledProcessError):
            return {}
        content = self._to_str(stdout).splitlines()
        return self._parse_lsb_release_content(content)

    @staticmethod
    def _parse_lsb_release_content(lines: Iterable[str]) -> Dict[str, str]:
        """
        Parse the output of the lsb_release command.

        Parameters:

        * lines: Iterable through the lines of the lsb_release output.
                 Each line must be a unicode string or a UTF-8 encoded byte
                 string.

        Returns:
            A dictionary containing all information items.
        """
        props = {}
        for line in lines:
            kv = line.strip("\n").split(":", 1)
            if len(kv) != 2:
                # Ignore lines without colon.
                continue
            k, v = kv
            props.update({k.replace(" ", "_").lower(): v.strip()})
        return props

    @cached_property
    def _uname_info(self) -> Dict[str, str]:
        if not self.include_uname:
            return {}
        try:
            cmd = ("uname", "-rs")
            stdout = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
        except OSError:
            return {}
        content = self._to_str(stdout).splitlines()
        return self._parse_uname_content(content)

    @cached_property
    def _oslevel_info(self) -> str:
        if not self.include_oslevel:
            return ""
        try:
            stdout = subprocess.check_output("oslevel", stderr=subprocess.DEVNULL)
        except (OSError, subprocess.CalledProcessError):
            return ""
        return self._to_str(stdout).strip()

    @cached_property
    def _debian_version(self) -> str:
        try:
            with open(
                os.path.join(self.etc_dir, "debian_version"), encoding="ascii"
            ) as fp:
                return fp.readline().rstrip()
        except FileNotFoundError:
            return ""

    @staticmethod
    def _parse_uname_content(lines: Sequence[str]) -> Dict[str, str]:
        if not lines:
            return {}
        props = {}
        match = re.search(r"^([^\s]+)\s+([\d\.]+)", lines[0].strip())
        if match:
            name, version = match.groups()

            # This is to prevent the Linux kernel version from
            # appearing as the 'best' version on otherwise
            # identifiable distributions.
            if name == "Linux":
                return {}
            props["id"] = name.lower()
            props["name"] = name
            props["release"] = version
        return props

    @staticmethod
    def _to_str(bytestring: bytes) -> str:
        encoding = sys.getfilesystemencoding()
        return bytestring.decode(encoding)

    @cached_property
    def _distro_release_info(self) -> Dict[str, str]:
        """
        Get the information items from the specified distro release file.

        Returns:
            A dictionary containing all information items.
        """
        if self.distro_release_file:
            # If it was specified, we use it and parse what we can, even if
            # its file name or content does not match the expected pattern.
            distro_info = self._parse_distro_release_file(self.distro_release_file)
            basename = os.path.basename(self.distro_release_file)
            # The file name pattern for user-specified distro release files
            # is somewhat more tolerant (compared to when searching for the
            # file), because we want to use what was specified as best as
            # possible.
            match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
        else:
            try:
                basenames = [
                    basename
                    for basename in os.listdir(self.etc_dir)
                    if basename not in _DISTRO_RELEASE_IGNORE_BASENAMES
                    and os.path.isfile(os.path.join(self.etc_dir, basename))
                ]
                # We sort for repeatability in cases where there are multiple
                # distro specific files; e.g. CentOS, Oracle, Enterprise all
                # containing `redhat-release` on top of their own.
                basenames.sort()
            except OSError:
                # This may occur when /etc is not readable but we can't be
                # sure about the *-release files. Check common entries of
                # /etc for information. If they turn out to not be there the
                # error is handled in `_parse_distro_release_file()`.
                basenames = _DISTRO_RELEASE_BASENAMES
            for basename in basenames:
                match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
                if match is None:
                    continue
                filepath = os.path.join(self.etc_dir, basename)
                distro_info = self._parse_distro_release_file(filepath)
                # The name is always present if the pattern matches.
                if "name" not in distro_info:
                    continue
                self.distro_release_file = filepath
                break
            else:  # the loop didn't "break": no candidate.
                return {}

        if match is not None:
            distro_info["id"] = match.group(1)

        # CloudLinux < 7: manually enrich info with proper id.
        if "cloudlinux" in distro_info.get("name", "").lower():
            distro_info["id"] = "cloudlinux"

        return distro_info

    def _parse_distro_release_file(self, filepath: str) -> Dict[str, str]:
        """
        Parse a distro release file.

        Parameters:

        * filepath: Path name of the distro release file.

        Returns:
            A dictionary containing all information items.
        """
        try:
            with open(filepath, encoding="utf-8") as fp:
                # Only parse the first line. For instance, on SLES there
                # are multiple lines. We don't want them...
                return self._parse_distro_release_content(fp.readline())
        except OSError:
            # Ignore not being able to read a specific, seemingly version
            # related file.
            # See https://github.com/python-distro/distro/issues/162
            return {}

    @staticmethod
    def _parse_distro_release_content(line: str) -> Dict[str, str]:
        """
        Parse a line from a distro release file.

        Parameters:
        * line: Line from the distro release file. Must be a unicode string
                or a UTF-8 encoded byte string.

        Returns:
            A dictionary containing all information items.
        """
        matches = _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN.match(line.strip()[::-1])
        distro_info = {}
        if matches:
            # regexp ensures non-None
            distro_info["name"] = matches.group(3)[::-1]
            if matches.group(2):
                distro_info["version_id"] = matches.group(2)[::-1]
            if matches.group(1):
                distro_info["codename"] = matches.group(1)[::-1]
        elif line:
            distro_info["name"] = line.strip()
        return distro_info


_distro = LinuxDistribution()


def main() -> None:
    logger = logging.getLogger(__name__)
    logger.setLevel(logging.DEBUG)
    logger.addHandler(logging.StreamHandler(sys.stdout))

    parser = argparse.ArgumentParser(description="OS distro info tool")
    parser.add_argument(
        "--json", "-j", help="Output in machine readable format", action="store_true"
    )

    parser.add_argument(
        "--root-dir",
        "-r",
        type=str,
        dest="root_dir",
        help="Path to the root filesystem directory (defaults to /)",
    )

    args = parser.parse_args()

    if args.root_dir:
        dist = LinuxDistribution(
            include_lsb=False,
            include_uname=False,
            include_oslevel=False,
            root_dir=args.root_dir,
        )
    else:
        dist = _distro

    if args.json:
        logger.info(json.dumps(dist.info(), indent=4, sort_keys=True))
    else:
        logger.info("Name: %s", dist.name(pretty=True))
        distribution_version = dist.version(pretty=True)
        logger.info("Version: %s", distribution_version)
        distribution_codename = dist.codename()
        logger.info("Codename: %s", distribution_codename)


if __name__ == "__main__":
    main()
python3.12/site-packages/pip/_vendor/colorama/ansitowin32.py000064400000025570151732703140017700 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys
import os

from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style, BEL
from .winterm import enable_vt_processing, WinTerm, WinColor, WinStyle
from .win32 import windll, winapi_test


winterm = None
if windll is not None:
    winterm = WinTerm()


class StreamWrapper(object):
    '''
    Wraps a stream (such as stdout), acting as a transparent proxy for all
    attribute access apart from method 'write()', which is delegated to our
    Converter instance.
    '''
    def __init__(self, wrapped, converter):
        # double-underscore everything to prevent clashes with names of
        # attributes on the wrapped stream object.
        self.__wrapped = wrapped
        self.__convertor = converter

    def __getattr__(self, name):
        return getattr(self.__wrapped, name)

    def __enter__(self, *args, **kwargs):
        # special method lookup bypasses __getattr__/__getattribute__, see
        # https://stackoverflow.com/questions/12632894/why-doesnt-getattr-work-with-exit
        # thus, contextlib magic methods are not proxied via __getattr__
        return self.__wrapped.__enter__(*args, **kwargs)

    def __exit__(self, *args, **kwargs):
        return self.__wrapped.__exit__(*args, **kwargs)

    def __setstate__(self, state):
        self.__dict__ = state

    def __getstate__(self):
        return self.__dict__

    def write(self, text):
        self.__convertor.write(text)

    def isatty(self):
        stream = self.__wrapped
        if 'PYCHARM_HOSTED' in os.environ:
            if stream is not None and (stream is sys.__stdout__ or stream is sys.__stderr__):
                return True
        try:
            stream_isatty = stream.isatty
        except AttributeError:
            return False
        else:
            return stream_isatty()

    @property
    def closed(self):
        stream = self.__wrapped
        try:
            return stream.closed
        # AttributeError in the case that the stream doesn't support being closed
        # ValueError for the case that the stream has already been detached when atexit runs
        except (AttributeError, ValueError):
            return True


class AnsiToWin32(object):
    '''
    Implements a 'write()' method which, on Windows, will strip ANSI character
    sequences from the text, and if outputting to a tty, will convert them into
    win32 function calls.
    '''
    ANSI_CSI_RE = re.compile('\001?\033\\[((?:\\d|;)*)([a-zA-Z])\002?')   # Control Sequence Introducer
    ANSI_OSC_RE = re.compile('\001?\033\\]([^\a]*)(\a)\002?')             # Operating System Command

    def __init__(self, wrapped, convert=None, strip=None, autoreset=False):
        # The wrapped stream (normally sys.stdout or sys.stderr)
        self.wrapped = wrapped

        # should we reset colors to defaults after every .write()
        self.autoreset = autoreset

        # create the proxy wrapping our output stream
        self.stream = StreamWrapper(wrapped, self)

        on_windows = os.name == 'nt'
        # We test if the WinAPI works, because even if we are on Windows
        # we may be using a terminal that doesn't support the WinAPI
        # (e.g. Cygwin Terminal). In this case it's up to the terminal
        # to support the ANSI codes.
        conversion_supported = on_windows and winapi_test()
        try:
            fd = wrapped.fileno()
        except Exception:
            fd = -1
        system_has_native_ansi = not on_windows or enable_vt_processing(fd)
        have_tty = not self.stream.closed and self.stream.isatty()
        need_conversion = conversion_supported and not system_has_native_ansi

        # should we strip ANSI sequences from our output?
        if strip is None:
            strip = need_conversion or not have_tty
        self.strip = strip

        # should we should convert ANSI sequences into win32 calls?
        if convert is None:
            convert = need_conversion and have_tty
        self.convert = convert

        # dict of ansi codes to win32 functions and parameters
        self.win32_calls = self.get_win32_calls()

        # are we wrapping stderr?
        self.on_stderr = self.wrapped is sys.stderr

    def should_wrap(self):
        '''
        True if this class is actually needed. If false, then the output
        stream will not be affected, nor will win32 calls be issued, so
        wrapping stdout is not actually required. This will generally be
        False on non-Windows platforms, unless optional functionality like
        autoreset has been requested using kwargs to init()
        '''
        return self.convert or self.strip or self.autoreset

    def get_win32_calls(self):
        if self.convert and winterm:
            return {
                AnsiStyle.RESET_ALL: (winterm.reset_all, ),
                AnsiStyle.BRIGHT: (winterm.style, WinStyle.BRIGHT),
                AnsiStyle.DIM: (winterm.style, WinStyle.NORMAL),
                AnsiStyle.NORMAL: (winterm.style, WinStyle.NORMAL),
                AnsiFore.BLACK: (winterm.fore, WinColor.BLACK),
                AnsiFore.RED: (winterm.fore, WinColor.RED),
                AnsiFore.GREEN: (winterm.fore, WinColor.GREEN),
                AnsiFore.YELLOW: (winterm.fore, WinColor.YELLOW),
                AnsiFore.BLUE: (winterm.fore, WinColor.BLUE),
                AnsiFore.MAGENTA: (winterm.fore, WinColor.MAGENTA),
                AnsiFore.CYAN: (winterm.fore, WinColor.CYAN),
                AnsiFore.WHITE: (winterm.fore, WinColor.GREY),
                AnsiFore.RESET: (winterm.fore, ),
                AnsiFore.LIGHTBLACK_EX: (winterm.fore, WinColor.BLACK, True),
                AnsiFore.LIGHTRED_EX: (winterm.fore, WinColor.RED, True),
                AnsiFore.LIGHTGREEN_EX: (winterm.fore, WinColor.GREEN, True),
                AnsiFore.LIGHTYELLOW_EX: (winterm.fore, WinColor.YELLOW, True),
                AnsiFore.LIGHTBLUE_EX: (winterm.fore, WinColor.BLUE, True),
                AnsiFore.LIGHTMAGENTA_EX: (winterm.fore, WinColor.MAGENTA, True),
                AnsiFore.LIGHTCYAN_EX: (winterm.fore, WinColor.CYAN, True),
                AnsiFore.LIGHTWHITE_EX: (winterm.fore, WinColor.GREY, True),
                AnsiBack.BLACK: (winterm.back, WinColor.BLACK),
                AnsiBack.RED: (winterm.back, WinColor.RED),
                AnsiBack.GREEN: (winterm.back, WinColor.GREEN),
                AnsiBack.YELLOW: (winterm.back, WinColor.YELLOW),
                AnsiBack.BLUE: (winterm.back, WinColor.BLUE),
                AnsiBack.MAGENTA: (winterm.back, WinColor.MAGENTA),
                AnsiBack.CYAN: (winterm.back, WinColor.CYAN),
                AnsiBack.WHITE: (winterm.back, WinColor.GREY),
                AnsiBack.RESET: (winterm.back, ),
                AnsiBack.LIGHTBLACK_EX: (winterm.back, WinColor.BLACK, True),
                AnsiBack.LIGHTRED_EX: (winterm.back, WinColor.RED, True),
                AnsiBack.LIGHTGREEN_EX: (winterm.back, WinColor.GREEN, True),
                AnsiBack.LIGHTYELLOW_EX: (winterm.back, WinColor.YELLOW, True),
                AnsiBack.LIGHTBLUE_EX: (winterm.back, WinColor.BLUE, True),
                AnsiBack.LIGHTMAGENTA_EX: (winterm.back, WinColor.MAGENTA, True),
                AnsiBack.LIGHTCYAN_EX: (winterm.back, WinColor.CYAN, True),
                AnsiBack.LIGHTWHITE_EX: (winterm.back, WinColor.GREY, True),
            }
        return dict()

    def write(self, text):
        if self.strip or self.convert:
            self.write_and_convert(text)
        else:
            self.wrapped.write(text)
            self.wrapped.flush()
        if self.autoreset:
            self.reset_all()


    def reset_all(self):
        if self.convert:
            self.call_win32('m', (0,))
        elif not self.strip and not self.stream.closed:
            self.wrapped.write(Style.RESET_ALL)


    def write_and_convert(self, text):
        '''
        Write the given text to our wrapped stream, stripping any ANSI
        sequences from the text, and optionally converting them into win32
        calls.
        '''
        cursor = 0
        text = self.convert_osc(text)
        for match in self.ANSI_CSI_RE.finditer(text):
            start, end = match.span()
            self.write_plain_text(text, cursor, start)
            self.convert_ansi(*match.groups())
            cursor = end
        self.write_plain_text(text, cursor, len(text))


    def write_plain_text(self, text, start, end):
        if start < end:
            self.wrapped.write(text[start:end])
            self.wrapped.flush()


    def convert_ansi(self, paramstring, command):
        if self.convert:
            params = self.extract_params(command, paramstring)
            self.call_win32(command, params)


    def extract_params(self, command, paramstring):
        if command in 'Hf':
            params = tuple(int(p) if len(p) != 0 else 1 for p in paramstring.split(';'))
            while len(params) < 2:
                # defaults:
                params = params + (1,)
        else:
            params = tuple(int(p) for p in paramstring.split(';') if len(p) != 0)
            if len(params) == 0:
                # defaults:
                if command in 'JKm':
                    params = (0,)
                elif command in 'ABCD':
                    params = (1,)

        return params


    def call_win32(self, command, params):
        if command == 'm':
            for param in params:
                if param in self.win32_calls:
                    func_args = self.win32_calls[param]
                    func = func_args[0]
                    args = func_args[1:]
                    kwargs = dict(on_stderr=self.on_stderr)
                    func(*args, **kwargs)
        elif command in 'J':
            winterm.erase_screen(params[0], on_stderr=self.on_stderr)
        elif command in 'K':
            winterm.erase_line(params[0], on_stderr=self.on_stderr)
        elif command in 'Hf':     # cursor position - absolute
            winterm.set_cursor_position(params, on_stderr=self.on_stderr)
        elif command in 'ABCD':   # cursor position - relative
            n = params[0]
            # A - up, B - down, C - forward, D - back
            x, y = {'A': (0, -n), 'B': (0, n), 'C': (n, 0), 'D': (-n, 0)}[command]
            winterm.cursor_adjust(x, y, on_stderr=self.on_stderr)


    def convert_osc(self, text):
        for match in self.ANSI_OSC_RE.finditer(text):
            start, end = match.span()
            text = text[:start] + text[end:]
            paramstring, command = match.groups()
            if command == BEL:
                if paramstring.count(";") == 1:
                    params = paramstring.split(";")
                    # 0 - change title and icon (we will only change title)
                    # 1 - change icon (we don't support this)
                    # 2 - change title
                    if params[0] in '02':
                        winterm.set_title(params[1])
        return text


    def flush(self):
        self.wrapped.flush()
python3.12/site-packages/pip/_vendor/colorama/__pycache__/win32.cpython-312.pyc000064400000017767151732703140023034 0ustar00�

R`i%����dZdZdZ	ddlZddlmZeej
�ZddlmZddlmZm	Z	m
Z
mZejZ
Gd�d	e	�Zejj Zej$ge_ej(e_ejj,Zej(ee�ge_ej0e_ejj2Zej(ej6ge_ej0e_ejj8Zej(e
ge_ej0e_ejj<Zej(e
ej$e
eej$�ge_ej0e_ejj@Z!ej(ej6ej$e
eej$�ge!_ej0e!_ejjDZ#ejHge#_ej0e#_ejjJZ&ej(eej$�ge&_ej0e&_ejjNZ(ej(ej$ge(_ej0e(_d
�Z)d�Z*efd�Zd
�Zdd�Zd�Z+d�Z d�Z,d�Z%d�Z'y#e-e.f$rdZd�Zd�Z*YywxYw)i����i���N)�
LibraryLoader)�wintypes)�byref�	Structure�c_char�POINTERc�`�eZdZdZdefdefdejfdejfdefgZd�Z	y)	�CONSOLE_SCREEN_BUFFER_INFOzstruct in wincon.h.�dwSize�dwCursorPosition�wAttributes�srWindow�dwMaximumWindowSizec���d|jj|jj|jj|jj|j|j
j|j
j|j
j|j
j|jj|jjfzS)Nz"(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d))r�Y�Xr
rr�Top�Left�Bottom�Rightr)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/win32.py�__str__z"CONSOLE_SCREEN_BUFFER_INFO.__str__ s���7����
�
�t�{�{�}�}��'�'�)�)�4�+@�+@�+B�+B��"�"��-�-�#�#�T�]�]�%7�%7����9M�9M�t�}�}�Ob�Ob��*�*�,�,�d�.F�.F�.H�.H�;��
�N)
�__name__�
__module__�__qualname__�__doc__�COORDr�WORD�
SMALL_RECT�_fields_r�rrrrsC��!�
�u��
��'�
�H�M�M�*�
��,�,�-�
"�E�*�
��	rrc�V�t�}t|t|��}t|�S�N)r�_GetConsoleScreenBufferInfor�bool)�handle�csbi�successs   r�_winapi_testr,ls'��)�+��-��E�$�K�!���G�}�rc�^�td�tt�tt�fD��S)Nc3�2K�|]}t|����y�wr&)r,)�.0�hs  r�	<genexpr>zwinapi_test.<locals>.<genexpr>ss����C�A�()�<��?�A�s�)�any�
_GetStdHandle�STDOUT�STDERRr$rr�winapi_testr6rs/���C�!�&�)�=��+@�A�C�C�	Crc�Z�t|�}t�}t|t|��}|Sr&)r3rr'r)�	stream_idr)r*r+s    r�GetConsoleScreenBufferInfor9vs,���y�)��)�+��-��E�$�K�!���rc�0�t|�}t||�Sr&)r3�_SetConsoleTextAttribute)r8�attrsr)s   r�SetConsoleTextAttributer=}s���y�)��'���6�6rc�|�t|�}|jdks|jdkryt|jdz
|jdz
�}|rWtt�j
}|xj|jz
c_|xj|jz
c_t|�}t||�S)Nr�)
r rrr9r4rrrr3�_SetConsoleCursorPosition)r8�position�adjust�adjusted_position�srr)s      r�SetConsoleCursorPositionrE�s����(�#���:�:��?�h�j�j�A�o��"�(�*�*�q�.�(�*�*�q�.�A���+�F�3�<�<�B����2�6�6�)�����2�7�7�*���y�)��(��1B�C�Crc	���t|�}t|j��}tj|�}tjd�}t||||t
|��}|jS)Nr)r3r�encoder�DWORD�_FillConsoleOutputCharacterAr�value)r8�char�length�startr)�num_writtenr+s       r�FillConsoleOutputCharacterrO�s^���y�)���d�k�k�m�$������'���n�n�Q�'��.��D�&�%��{�);�=��� � � rc	���t|�}tj|�}tj|�}tjd�}t	||||t|��S)za FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )r)r3rr!rH�_FillConsoleOutputAttributer)r8�attrrLrMr)�	attributerNs       r�FillConsoleOutputAttributerT�sU���y�)���M�M�$�'�	�����'���n�n�Q�'��*��I�v�u�e�K�.@�B�	Brc��t|�Sr&)�_SetConsoleTitleW)�titles r�SetConsoleTitlerX�s
�� ��'�'rc��tj�}t|t|��}|st	j
��|jSr&)rrH�_GetConsoleModer�ctypes�WinErrorrJ�r)�moder+s   r�GetConsoleModer_�s8���~�~���!�&�%��+�6����/�/�#�#��z�z�rc�H�t||�}|stj��yr&)�_SetConsoleModer[r\r]s   r�SetConsoleModerb�s#��!�&�$�/����/�/�#�#�rc��yr&r$��_s r�<lambda>rfs��rc��yr&r$rds rrfrfs��Tr)T)/r4r5�"ENABLE_VIRTUAL_TERMINAL_PROCESSINGr[r�WinDLL�windllrrrrr	�_COORDr r�kernel32�GetStdHandler3rH�argtypes�HANDLE�restyper9r'�BOOLr=r;r!rEr@�FillConsoleOutputCharacterArIrTrQ�SetConsoleTitleWrV�LPCWSTRr_rZrbrar,r6rOrX�AttributeError�ImportErrorr$rr�<module>rws���

��	��%+�"�k$��$�
�6�=�=�
)�F��9�8��O�O�E��Y��$�O�O�0�0�M�����M��%�O�O�M��"(�/�/�"L�"L������*�+�,��(�+3�-�-��'�%���F�F������
�
�)��%�(0�}�}��$� &��� H� H�����
�*��&�)1�
�
��%�#)�?�?�#N�#N� ��������
������-� �)�,4�=�=� �(�"(�/�/�"L�"L������
�
����
������,��(�+3�-�-��'����8�8�����"���!)�
�
����o�o�4�4�O��������� �O��'�m�m�O���o�o�4�4�O������� �O��'�m�m�O���C�.4��7�D�$!�B�(��$��G	��$�"�
�F�-��!�K�"�s�"K%�%K7�6K7python3.12/site-packages/pip/_vendor/colorama/__pycache__/__init__.cpython-312.pyc000064400000001034151732703140023605 0ustar00�

R`i
��H�ddlmZmZmZmZmZddlmZmZm	Z	m
Z
ddlmZdZ
y)�)�init�deinit�reinit�
colorama_text�just_fix_windows_console)�Fore�Back�Style�Cursor)�AnsiToWin32z0.4.6N)�
initialiserrrrr�ansirr	r
r�ansitowin32r�__version__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/__init__.py�<module>rs��U�U�+�+�$��rpython3.12/site-packages/pip/_vendor/colorama/__pycache__/winterm.cpython-312.pyc000064400000021660151732703150023543 0ustar00�

R`i����	ddlmZddlmZGd�de�ZGd�de�ZGd	�d
e�Zd�Z	y#e$rd�ZY�5wxYw)
�)�
get_osfhandlec��td��)NzThis isn't windows!)�OSError)�_s ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/winterm.pyrrs���+�,�,��)�win32c�,�eZdZdZdZdZdZdZdZdZ	dZ
y	)
�WinColorrr	������N)�__name__�
__module__�__qualname__�BLACK�BLUE�GREEN�CYAN�RED�MAGENTA�YELLOW�GREY�rrrrs*���E��D��E��D��C��G��F��Drrc��eZdZdZdZdZy)�WinStyler��N)rrr�NORMAL�BRIGHT�BRIGHT_BACKGROUNDrrrr r s���F��F��rr c�r�eZdZd�Zd�Zd�Zdd�Zdd�Zdd�Zdd�Z	dd	�Z
d
�Zdd�Zdd�Z
dd
�Zdd�Zd�Zy)�WinTermc��tjtj�j|_|j|j�|j|_|j|_	|j|_d|_y)Nr)
r
�GetConsoleScreenBufferInfo�STDOUT�wAttributes�_default�	set_attrs�_fore�
_default_fore�_back�
_default_back�_style�_default_style�_light��selfs r�__init__zWinTerm.__init__s[���8�8����F�R�R��
����t�}�}�%�!�Z�Z���!�Z�Z���"�k�k���
��rc�n�|j|jdzz|j|jzzS)N�)r.r0r2r4r5s r�	get_attrszWinTerm.get_attrs*s+���z�z�D�J�J��O�+�t�{�{�T�[�[�/H�I�Irc��|dz|_|dz	dz|_|tjtjzz|_y)Nrr)r.r0r r$r%r2)r6�values  rr-zWinTerm.set_attrs-s8���Q�Y��
��q�j�A�%��
��x����1K�1K�K�L��rNc��|j|j�|j|j��d|_y)N)�attrsr)r-r,�set_consoler4)r6�	on_stderrs  r�	reset_allzWinTerm.reset_all2s.�����t�}�}�%����t�}�}��-���rc���|�|j}||_|r$|xjtjzc_n$|xjtjzc_|j|��y�N)r@)r/r.r4r r$r?)r6�fore�lightr@s    rrDzWinTerm.fore7sT���<��%�%�D���
���K�K�8�?�?�*�K��K�K�H�O�O�+�+�K����9��-rc���|�|j}||_|r$|xjtjzc_n$|xjtjzc_|j|��yrC)r1r0r4r r%r?)r6�backrEr@s    rrGzWinTerm.backBsX���<��%�%�D���
���K�K�8�5�5�5�K��K�K�H�6�6�6�6�K����9��-rc�R�|�|j}||_|j|��yrC)r3r2r?)r6�styler@s   rrIz
WinTerm.styleMs*���=��'�'�E�������9��-rc��|�|j�}tj}|rtj}tj||�y�N)r:r
r*�STDERR�SetConsoleTextAttribute)r6r>r@�handles    rr?zWinTerm.set_consoleSs8���=��N�N�$�E�������\�\�F�
�%�%�f�e�4rc��tj|�j}|xjdz
c_|xjdz
c_|S)Nr	)r
r)�dwCursorPosition�X�Y)r6rN�positions   r�get_positionzWinTerm.get_position[s9���3�3�F�;�L�L��	�
�
�a��
��
�
�a��
��rc�z�|�ytj}|rtj}tj||�yrK)r
r*rL�SetConsoleCursorPosition)r6rSr@rNs    r�set_cursor_positionzWinTerm.set_cursor_positioncs2����
�������\�\�F�
�&�&�v�x�8rc���tj}|rtj}|j|�}|j|z|j
|zf}tj||d��y)NF)�adjust)r
r*rLrTrRrQrV)r6�x�yr@rNrS�adjusted_positions       r�
cursor_adjustzWinTerm.cursor_adjustmsU��������\�\�F��$�$�V�,��%�Z�Z�!�^�X�Z�Z�!�^�<��
�&�&�v�/@��Orc��tj}|rtj}tj|�}|jj
|jjz}|jj
|jjz|jj
z}|dk(r|j}||z
}n=|dk(rtjdd�}|}n|dk(rtjdd�}|}nytj|d||�tj||j�||�|dk(rtj|d�yy)Nrr	r
� )r	r	)
r
r*rLr)�dwSizerQrRrP�COORD�FillConsoleOutputCharacter�FillConsoleOutputAttributer:rV)	r6�moder@rN�csbi�cells_in_screen�cells_before_cursor�
from_coord�cells_to_erases	         r�erase_screenzWinTerm.erase_screenus��������\�\�F��/�/��7���+�+�-�-�$�+�+�-�-�7��"�k�k�m�m�d�.C�.C�.E�.E�E��H]�H]�H_�H_�_���1�9��.�.�J�,�/B�B�N�
�Q�Y����Q��*�J�0�N�
�Q�Y����Q��*�J�,�N�
�
�(�(���n�j�Q�
�(�(�����1A�>�S]�^��1�9��*�*�6�6�:�rc��tj}|rtj}tj|�}|dk(r:|j}|j
j|jjz
}n�|dk(rAtjd|jj�}|jj}nG|dk(rAtjd|jj�}|j
j}nytj|d||�tj||j�||�y)Nrr	r
r_)r
r*rLr)rPr`rQrarRrbrcr:)r6rdr@rNrerhris       r�
erase_linezWinTerm.erase_line�s���������\�\�F��/�/��7���1�9��.�.�J�!�[�[�]�]�T�-B�-B�-D�-D�D�N�
�Q�Y����Q��(=�(=�(?�(?�@�J�!�2�2�4�4�N�
�Q�Y����Q��(=�(=�(?�(?�@�J�!�[�[�]�]�N�
�
�(�(���n�j�Q�
�(�(�����1A�>�S]�^rc�.�tj|�yrK)r
�SetConsoleTitle)r6�titles  r�	set_titlezWinTerm.set_title�s��
���e�$rrK)NFF)NF)F)rF)rrrr7r:r-rArDrGrIr?rTrWr]rjrlrprrrr'r'sM��
�J�M�
�
	.�	.�.�5��9�P�;�@_�2%rr'c�Z�tj�tj�sy	t|�}tj|�}tj
||tjz�tj|�}|tjzryy#ttf$rYywxYw)NFT)	r
�windll�winapi_testr�GetConsoleMode�SetConsoleMode�"ENABLE_VIRTUAL_TERMINAL_PROCESSINGr�	TypeError)�fdrNrds   r�enable_vt_processingry�s����|�|��5�#4�#4�#6��
��r�"���#�#�F�+��
�����5�;�;�;�	
�
�#�#�F�+���%�:�:�:��;��
�Y�����s�A/B�B*�)B*N)
�msvcrtr�ImportError�r
�objectrr r'ryrrr�<module>r~sU��-�$���v���v��
S%�f�S%�l��]�-�-�-�s�3�>�>python3.12/site-packages/pip/_vendor/colorama/__pycache__/ansi.cpython-312.pyc000064400000007631151732703150023012 0ustar00�

R`i�	����dZdZdZdZd�Zd�Zdd�Zdd�ZGd�d	e�Z	Gd
�de�Z
Gd�d
e	�ZGd�de	�ZGd�de	�Z
e�Ze�Ze
�Ze
�Zy)z�
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
z]�c�,�tt|�zdzS)N�m��CSI�str)�codes ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/ansi.py�
code_to_charsr
�����T��?�S� � �c�(�tdz|ztzS)Nz2;)�OSC�BEL)�titles r	�	set_titlers����:����#�#rc�,�tt|�zdzS)N�Jr��modes r	�clear_screenrrrc�,�tt|�zdzS)N�Krrs r	�
clear_linerrrc��eZdZd�Zy)�	AnsiCodesc��t|�D]6}|jd�r�t||�}t||t	|���8y)N�_)�dir�
startswith�getattr�setattrr
)�self�name�values   r	�__init__zAnsiCodes.__init__s;����I�D��?�?�3�'���d�+����d�M�%�$8�9�rN)�__name__�
__module__�__qualname__r%�rr	rrs��:rrc�4�eZdZdd�Zdd�Zdd�Zdd�Zdd�Zy)	�
AnsiCursorc�,�tt|�zdzS)N�Ar�r"�ns  r	�UPz
AnsiCursor.UP%����S��V�|�c�!�!rc�,�tt|�zdzS)N�Brr.s  r	�DOWNzAnsiCursor.DOWN'r1rc�,�tt|�zdzS)N�Crr.s  r	�FORWARDzAnsiCursor.FORWARD)r1rc�,�tt|�zdzS)N�Drr.s  r	�BACKzAnsiCursor.BACK+r1rc�J�tt|�zdzt|�zdzS)N�;�Hr)r"�x�ys   r	�POSzAnsiCursor.POS-s#���S��V�|�c�!�C��F�*�S�0�0rN)�)rArA)r&r'r(r0r4r7r:r@r)rr	r+r+$s��"�"�"�"�1rr+c�P�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZy)�AnsiFore��� �!�"�#�$�%�'�Z�[�\�]�^�_�`�aN�r&r'r(�BLACK�RED�GREEN�YELLOW�BLUE�MAGENTA�CYAN�WHITE�RESET�
LIGHTBLACK_EX�LIGHTRED_EX�
LIGHTGREEN_EX�LIGHTYELLOW_EX�LIGHTBLUE_EX�LIGHTMAGENTA_EX�LIGHTCYAN_EX�
LIGHTWHITE_EXr)rr	rCrC1sY���E��C��E��F��D��G��D��E��E��M��K��M��N��L��O��L��MrrCc�P�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZy)�AnsiBack�(�)�*�+�,�-�.�/�1�d�e�f�g�h�i�j�kNrUr)rr	rhrhGsY���E��C��E��F��D��G��D��E��E��M��K��M��N��L��O��L��Mrrhc��eZdZdZdZdZdZy)�	AnsiStylerA���N)r&r'r(�BRIGHT�DIM�NORMAL�	RESET_ALLr)rr	r{r{]s���F��C��F��Irr{N)r|)�__doc__rrrr
rrr�objectrr+rCrhr{�Fore�Back�Style�Cursorr)rr	�<module>r�s����
��
��
��!�$�!�!�:��:�
1��
1��y��,�y��,�	��
���	���	���	��rpython3.12/site-packages/pip/_vendor/colorama/__pycache__/ansitowin32.cpython-312.pyc000064400000040114151732703150024231 0ustar00�

R`ix+���ddlZddlZddlZddlmZmZmZmZmZddl	m
Z
mZmZm
Z
ddlmZmZdZ	e�e�Z	Gd�de�ZGd�d	e�Zy)
�N�)�AnsiFore�AnsiBack�	AnsiStyle�Style�BEL)�enable_vt_processing�WinTerm�WinColor�WinStyle)�windll�winapi_testc�P�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zed
��Z
y)�
StreamWrapperz�
    Wraps a stream (such as stdout), acting as a transparent proxy for all
    attribute access apart from method 'write()', which is delegated to our
    Converter instance.
    c� �||_||_y�N)�_StreamWrapper__wrapped�_StreamWrapper__convertor)�self�wrapped�	converters   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/ansitowin32.py�__init__zStreamWrapper.__init__s��!���$���c�.�t|j|�Sr)�getattrr)r�names  r�__getattr__zStreamWrapper.__getattr__s���t�~�~�t�,�,rc�:�|jj|i|��Sr)r�	__enter__�r�args�kwargss   rr zStreamWrapper.__enter__s ��(�t�~�~�'�'��8��8�8rc�:�|jj|i|��Sr)r�__exit__r!s   rr%zStreamWrapper.__exit__%s��&�t�~�~�&�&��7��7�7rc��||_yr��__dict__)r�states  r�__setstate__zStreamWrapper.__setstate__(s	����
rc��|jSrr'�rs r�__getstate__zStreamWrapper.__getstate__+s���}�}�rc�:�|jj|�yr)r�write�r�texts  rr/zStreamWrapper.write.s�������t�$rc���|j}dtjvr'|�%|tjus|tj
ury	|j}|�S#t$rYywxYw)N�PYCHARM_HOSTEDTF)r�os�environ�sys�
__stdout__�
__stderr__�isatty�AttributeError)r�stream�
stream_isattys   rr9zStreamWrapper.isatty1sb�������r�z�z�)��!�v����'?�6�S�^�^�C[��	#�"�M�M�M�!�?�"���	��	�s�A�	A&�%A&c�^�|j}	|jS#ttf$rYywxYw�NT)r�closedr:�
ValueError)rr;s  rr?zStreamWrapper.closed=s3������	��=�=� ���
�+�	��	�s��,�,N)�__name__�
__module__�__qualname__�__doc__rrr r%r*r-r/r9�propertyr?�rrrrsC���
%�-�9�8���%�
#����rrc��eZdZdZej
d�Zej
d�Zdd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zy)�AnsiToWin32z�
    Implements a 'write()' method which, on Windows, will strip ANSI character
    sequences from the text, and if outputting to a tty, will convert them into
    win32 function calls.
    z?\[((?:\d|;)*)([a-zA-Z])?z?\]([^]*)()?Nc��||_||_t||�|_tj
dk(}|xr
t
�}	|j�}|xst|�}|jjxr|jj�}	|xr|}
|�|
xs|	}||_|�|
xr|	}||_
|j�|_|jt j"u|_y#t$rd}Y��wxYw)N�nt���)r�	autoresetrr;r4rr�fileno�	Exceptionr	r?r9�strip�convert�get_win32_calls�win32_callsr6�stderr�	on_stderr)rrrPrOrL�
on_windows�conversion_supported�fd�system_has_native_ansi�have_tty�need_conversions           rrzAnsiToWin32.__init__Qs�����#���$�G�T�2����W�W��_�
�
 *�;�k�m��	����!�B�&0��!K�3G��3K���{�{�)�)�)�B�d�k�k�.@�.@�.B��.�M�7M�3M���=�#�3�8�|�E���
��?�%�2�(�G���� �/�/�1���������3����)�	��B�	�s�C2�2D�?Dc�R�|jxs|jxs|jS)aj
        True if this class is actually needed. If false, then the output
        stream will not be affected, nor will win32 calls be issued, so
        wrapping stdout is not actually required. This will generally be
        False on non-Windows platforms, unless optional functionality like
        autoreset has been requested using kwargs to init()
        )rPrOrLr,s r�should_wrapzAnsiToWin32.should_wrapys ���|�|�;�t�z�z�;�T�^�^�;rc�
�|j�r�t�r�itjtjf�tj
tjtj
f�tjtjtjf�tjtjtjf�tjtjtjf�tjtjtjf�tjtjtjf�tj tjtj f�tj"tjtj"f�tj$tjtj$f�tj&tjtj&f�tj(tjtj*f�tj,tjf�tj.tjtjdf�tj0tjtjdf�tj2tjtjdf�tj4tjtj df�itj6tjtj"df�tj8tjtj$df�tj:tjtj&df�tj<tjtj*df�t>jtj@tjf�t>jtj@tjf�t>jtj@tjf�t>j tj@tj f�t>j"tj@tj"f�t>j$tj@tj$f�t>j&tj@tj&f�t>j(tj@tj*f�t>j,tj@f�t>j.tj@tjdf�t>j0tj@tjdf�t>j2tj@tjdf�t>j4tj@tj df��t>j6tj@tj"dft>j8tj@tj$dft>j:tj@tj&dft>j<tj@tj*dfi�StC�Sr>)"rP�wintermr�	RESET_ALL�	reset_all�BRIGHT�styler�DIM�NORMALr�BLACK�forer�RED�GREEN�YELLOW�BLUE�MAGENTA�CYAN�WHITE�GREY�RESET�
LIGHTBLACK_EX�LIGHTRED_EX�
LIGHTGREEN_EX�LIGHTYELLOW_EX�LIGHTBLUE_EX�LIGHTMAGENTA_EX�LIGHTCYAN_EX�
LIGHTWHITE_EXr�back�dictr,s rrQzAnsiToWin32.get_win32_calls�s����<�<�G�'��#�#�g�&7�&7�%:�'�� � �7�=�=�(�/�/�"B�'��
�
��
�
�x���?�'�� � �7�=�=�(�/�/�"B�	'�
������x�~�~� >�'����w�|�|�X�\�\�:�
'�������x�~�~� >�'����'�,�,����!@�'��
�
����h�m�m�<�'�� � �7�<�<��1A�1A�"B�'��
�
����h�m�m�<�'�������x�}�}� =�'������� 0�'��&�&����x�~�~�t�(L�'��$�$�w�|�|�X�\�\�4�&H�'� �&�&����x�~�~�t�(L�!'�"�'�'�'�,�,�����)N�#'�$�%�%����h�m�m�T�'J�%'�&�(�(�7�<�<��9I�9I�4�*P�''�(�%�%����h�m�m�T�'J�)'�*�&�&����x�}�}�d�(K�+'�,������x�~�~� >�-'�.���w�|�|�X�\�\�:�/'�0������x�~�~� >�1'�2���'�,�,����!@�3'�4�
�
����h�m�m�<�5'�6� � �7�<�<��1A�1A�"B�7'�8�
�
����h�m�m�<�9'�:������x�}�}� =�;'�<������ 0�='�>�&�&����x�~�~�t�(L�?'�@�$�$�w�|�|�X�\�\�4�&H�A'�B�&�&����x�~�~�t�(L�C'�D�'�'�'�,�,�����)N�E'�F�%�%����h�m�m�T�'J��(�(�7�<�<��9I�9I�4�*P��%�%����h�m�m�T�'J��&�&����x�}�}�d�(K�M'�'
�P�v�
rc��|js|jr|j|�n5|jj	|�|jj�|jr|j�yyr)rOrP�write_and_convertrr/�flushrLr`r0s  rr/zAnsiToWin32.write�sU���:�:�����"�"�4�(��L�L���t�$��L�L��� ��>�>��N�N��rc���|jr|jdd�y|jsA|jjs*|j
j
tj�yyy)N�m�r)	rP�
call_win32rOr;r?rr/rr_r,s rr`zAnsiToWin32.reset_all�sG���<�<��O�O�C��&����D�K�K�$6�$6��L�L���u���/�%7�rc�,�d}|j|�}|jj|�D]G}|j�\}}|j	|||�|j
|j
��|}�I|j	||t|��y)z�
        Write the given text to our wrapped stream, stripping any ANSI
        sequences from the text, and optionally converting them into win32
        calls.
        rN)�convert_osc�ANSI_CSI_RE�finditer�span�write_plain_text�convert_ansi�groups�len)rr1�cursor�match�start�ends      rr{zAnsiToWin32.write_and_convert�s���������%���%�%�.�.�t�4�E�����J�E�3��!�!�$���6��D���u�|�|�~�.��F�	5�
	
���d�F�C��I�6rc��||kr9|jj|||�|jj�yyr)rr/r|)rr1r�r�s    rr�zAnsiToWin32.write_plain_text�s6���3�;��L�L���t�E�#��/��L�L��� �rc�f�|jr%|j||�}|j||�yyr)rP�extract_paramsr�)r�paramstring�command�paramss    rr�zAnsiToWin32.convert_ansi�s.���<�<��(�(��+�>�F��O�O�G�V�,�rc��|dvrEtd�|jd�D��}t|�dkr|dz}t|�dkr�|Std�|jd�D��}t|�dk(r|dvrd	}|S|d
vrd}|S)N�Hfc3�RK�|]}t|�dk7rt|�nd���!y�w)rrN�r��int��.0�ps  r�	<genexpr>z-AnsiToWin32.extract_params.<locals>.<genexpr>�s&����X�AW�A�S��V�q�[�3�q�6�a�7�AW�s�%'�;�)rc3�PK�|]}t|�dk7s�t|���� y�w)rNr�r�s  rr�z-AnsiToWin32.extract_params.<locals>.<genexpr>�s!����Q�+A�a�S��V�q�[�3�q�6�+A�s�&�&r�JKmr�ABCD)�tuple�splitr�)rr�r�r�s    rr�zAnsiToWin32.extract_params�s����d�?��X��AR�AR�SV�AW�X�X�F��f�+��/��$����f�+��/��
��Q�;�+<�+<�S�+A�Q�Q�F��6�{�a���e�#�!�F��
���&�!�F��
rc� �|dk(rN|D]H}||jvs�|j|}|d}|dd}t|j��}||i|���Jy|dvr%tj	|d|j��y|dvr%tj|d|j��y|dvr"tj
||j��y|dvr?|d}d|fd|f|df|dfd	�|\}	}
tj|	|
|j��yy)
Nr~rr)rT�J�Kr�r�)�A�B�C�D)rRryrTr^�erase_screen�
erase_line�set_cursor_position�
cursor_adjust)rr�r��param�	func_args�funcr"r#�n�x�ys           rr�zAnsiToWin32.call_win32�s���c�>����D�,�,�,� $� 0� 0�� 7�I�$�Q�<�D�$�Q�R�=�D�!�D�N�N�;�F��$�)�&�)�
 ���^�� � ����d�n�n� �E�
��^����v�a�y�D�N�N��C�
��_��'�'��$�.�.�'�I�
��
��q�	�A��a�R���1�v�Q��F�1�"�a��I�'�R�D�A�q��!�!�!�Q�$�.�.�!�A�	rc�H�|jj|�D]�}|j�\}}|d|||dz}|j�\}}|tk(s�>|jd�dk(s�S|j
d�}|ddvs�ltj|d���|S)Nr�rr�02)	�ANSI_OSC_REr�r�r�r�countr�r^�	set_title)rr1r�r�r�r�r�r�s        rr�zAnsiToWin32.convert_oscs����%�%�.�.�t�4�E�����J�E�3����<�$�s�t�*�,�D�#(�<�<�>� �K���#�~��$�$�S�)�Q�.�(�.�.�s�3�F��a�y�D�(��)�)�&��)�4�5��rc�8�|jj�yr)rr|r,s rr|zAnsiToWin32.flushs�������r)NNF)rArBrCrD�re�compiler�r�rr\rQr/r`r{r�r�r�r�r�r|rFrrrHrHHsj���
�"�*�*�F�G�K��"�*�*�<�=�K�&4�P<�*�X�0�
7� !�-��$B�,
� rrH)r�r6r4�ansirrrrrr^r	r
rr�win32r
r�objectrrHrFrr�<module>r�sL��	�
�	�;�;�F�F�&���	���i�G�5�F�5�pM�&�Mrpython3.12/site-packages/pip/_vendor/colorama/__pycache__/initialise.cpython-312.pyc000064400000007016151732703150024207 0ustar00�

R`i����ddlZddlZddlZddlmZd�Zd�Zdd�Zd�Zd�Z	ejd	��Zd
�Zd�Z
e�y)
�N�)�AnsiToWin32c�n�dadadadadada	t
jt�y#t$rYywxYw)NF)
�orig_stdout�orig_stderr�wrapped_stdout�wrapped_stderr�atexit_done�fixed_windows_console�atexit�
unregister�	reset_all�AttributeError����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/initialise.py�_wipe_internal_state_for_testsr	sL���K��K��N��N��K�"��
����)�$���
��
�s�(�	4�4c�L�t�tt�j�yy�N)rrrrrrrr s�����K� �*�*�,�rc��|st|||g�rtd��tjatj
atj�dantt||||�xt_atj
�da	ntt||||�xt_a	tstjt�da
yy)Nz,wrap=False conflicts with any other arg=TrueT)�any�
ValueError�sys�stdoutr�stderrrr�wrap_streamr	r
r�registerr)�	autoreset�convert�strip�wraps    r�initr"%s����C��G�U�3�4��G�H�H�
�*�*�K��*�*�K�
�z�z����
��W�e�Y��E�	F��
�^�
�z�z����
��W�e�Y��E�	F��
�^�����	�"���rc�Z�t�tt_t�tt_yyr)rrrrrrrr�deinitr$As!���� ��
��� ��
�rc�(�tjdk7rytryt�t�yttjddd��}|jr|t_ttjddd��}|jr|t_day)N�win32F�rr rT)	r�platformrrr	rrrr)�
new_stdout�
new_stderrs  r�just_fix_windows_consoler+Hsw���|�|�w������!�^�%?��
�S�Z�Z��T�U�S�J������
��S�Z�Z��T�U�S�J������
� �rc/�^K�t|i|��	d��t�y#t�wxYw�wr)r"r$)�args�kwargss  r�
colorama_textr/_s%�����$��&���
������s�-��-�*�-c�Z�t�tt_t�tt_yyr)rrrr	rrrr�reinitr1hs!���!�#��
��!�#��
�"rc�`�|r+t||||��}|j�r|j}|S)Nr')r�should_wrap�stream)r4rr rr!�wrappers      rrros2����f��5�I�?����� ��^�^�F��Mr)FNNT)r�
contextlibr�ansitowin32rrrr"r$r+�contextmanagerr/r1rrrr�<module>r9sV��
��
�$�
�.-�
�8!�!�.������$��� rpython3.12/site-packages/pip/_vendor/colorama/tests/ansitowin32_test.py000064400000024666151732703150022107 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from io import StringIO, TextIOWrapper
from unittest import TestCase, main
try:
    from contextlib import ExitStack
except ImportError:
    # python 2
    from contextlib2 import ExitStack

try:
    from unittest.mock import MagicMock, Mock, patch
except ImportError:
    from mock import MagicMock, Mock, patch

from ..ansitowin32 import AnsiToWin32, StreamWrapper
from ..win32 import ENABLE_VIRTUAL_TERMINAL_PROCESSING
from .utils import osname


class StreamWrapperTest(TestCase):

    def testIsAProxy(self):
        mockStream = Mock()
        wrapper = StreamWrapper(mockStream, None)
        self.assertTrue( wrapper.random_attr is mockStream.random_attr )

    def testDelegatesWrite(self):
        mockStream = Mock()
        mockConverter = Mock()
        wrapper = StreamWrapper(mockStream, mockConverter)
        wrapper.write('hello')
        self.assertTrue(mockConverter.write.call_args, (('hello',), {}))

    def testDelegatesContext(self):
        mockConverter = Mock()
        s = StringIO()
        with StreamWrapper(s, mockConverter) as fp:
            fp.write(u'hello')
        self.assertTrue(s.closed)

    def testProxyNoContextManager(self):
        mockStream = MagicMock()
        mockStream.__enter__.side_effect = AttributeError()
        mockConverter = Mock()
        with self.assertRaises(AttributeError) as excinfo:
            with StreamWrapper(mockStream, mockConverter) as wrapper:
                wrapper.write('hello')

    def test_closed_shouldnt_raise_on_closed_stream(self):
        stream = StringIO()
        stream.close()
        wrapper = StreamWrapper(stream, None)
        self.assertEqual(wrapper.closed, True)

    def test_closed_shouldnt_raise_on_detached_stream(self):
        stream = TextIOWrapper(StringIO())
        stream.detach()
        wrapper = StreamWrapper(stream, None)
        self.assertEqual(wrapper.closed, True)

class AnsiToWin32Test(TestCase):

    def testInit(self):
        mockStdout = Mock()
        auto = Mock()
        stream = AnsiToWin32(mockStdout, autoreset=auto)
        self.assertEqual(stream.wrapped, mockStdout)
        self.assertEqual(stream.autoreset, auto)

    @patch('colorama.ansitowin32.winterm', None)
    @patch('colorama.ansitowin32.winapi_test', lambda *_: True)
    def testStripIsTrueOnWindows(self):
        with osname('nt'):
            mockStdout = Mock()
            stream = AnsiToWin32(mockStdout)
            self.assertTrue(stream.strip)

    def testStripIsFalseOffWindows(self):
        with osname('posix'):
            mockStdout = Mock(closed=False)
            stream = AnsiToWin32(mockStdout)
            self.assertFalse(stream.strip)

    def testWriteStripsAnsi(self):
        mockStdout = Mock()
        stream = AnsiToWin32(mockStdout)
        stream.wrapped = Mock()
        stream.write_and_convert = Mock()
        stream.strip = True

        stream.write('abc')

        self.assertFalse(stream.wrapped.write.called)
        self.assertEqual(stream.write_and_convert.call_args, (('abc',), {}))

    def testWriteDoesNotStripAnsi(self):
        mockStdout = Mock()
        stream = AnsiToWin32(mockStdout)
        stream.wrapped = Mock()
        stream.write_and_convert = Mock()
        stream.strip = False
        stream.convert = False

        stream.write('abc')

        self.assertFalse(stream.write_and_convert.called)
        self.assertEqual(stream.wrapped.write.call_args, (('abc',), {}))

    def assert_autoresets(self, convert, autoreset=True):
        stream = AnsiToWin32(Mock())
        stream.convert = convert
        stream.reset_all = Mock()
        stream.autoreset = autoreset
        stream.winterm = Mock()

        stream.write('abc')

        self.assertEqual(stream.reset_all.called, autoreset)

    def testWriteAutoresets(self):
        self.assert_autoresets(convert=True)
        self.assert_autoresets(convert=False)
        self.assert_autoresets(convert=True, autoreset=False)
        self.assert_autoresets(convert=False, autoreset=False)

    def testWriteAndConvertWritesPlainText(self):
        stream = AnsiToWin32(Mock())
        stream.write_and_convert( 'abc' )
        self.assertEqual( stream.wrapped.write.call_args, (('abc',), {}) )

    def testWriteAndConvertStripsAllValidAnsi(self):
        stream = AnsiToWin32(Mock())
        stream.call_win32 = Mock()
        data = [
            'abc\033[mdef',
            'abc\033[0mdef',
            'abc\033[2mdef',
            'abc\033[02mdef',
            'abc\033[002mdef',
            'abc\033[40mdef',
            'abc\033[040mdef',
            'abc\033[0;1mdef',
            'abc\033[40;50mdef',
            'abc\033[50;30;40mdef',
            'abc\033[Adef',
            'abc\033[0Gdef',
            'abc\033[1;20;128Hdef',
        ]
        for datum in data:
            stream.wrapped.write.reset_mock()
            stream.write_and_convert( datum )
            self.assertEqual(
               [args[0] for args in stream.wrapped.write.call_args_list],
               [ ('abc',), ('def',) ]
            )

    def testWriteAndConvertSkipsEmptySnippets(self):
        stream = AnsiToWin32(Mock())
        stream.call_win32 = Mock()
        stream.write_and_convert( '\033[40m\033[41m' )
        self.assertFalse( stream.wrapped.write.called )

    def testWriteAndConvertCallsWin32WithParamsAndCommand(self):
        stream = AnsiToWin32(Mock())
        stream.convert = True
        stream.call_win32 = Mock()
        stream.extract_params = Mock(return_value='params')
        data = {
            'abc\033[adef':         ('a', 'params'),
            'abc\033[;;bdef':       ('b', 'params'),
            'abc\033[0cdef':        ('c', 'params'),
            'abc\033[;;0;;Gdef':    ('G', 'params'),
            'abc\033[1;20;128Hdef': ('H', 'params'),
        }
        for datum, expected in data.items():
            stream.call_win32.reset_mock()
            stream.write_and_convert( datum )
            self.assertEqual( stream.call_win32.call_args[0], expected )

    def test_reset_all_shouldnt_raise_on_closed_orig_stdout(self):
        stream = StringIO()
        converter = AnsiToWin32(stream)
        stream.close()

        converter.reset_all()

    def test_wrap_shouldnt_raise_on_closed_orig_stdout(self):
        stream = StringIO()
        stream.close()
        with \
            patch("colorama.ansitowin32.os.name", "nt"), \
            patch("colorama.ansitowin32.winapi_test", lambda: True):
                converter = AnsiToWin32(stream)
        self.assertTrue(converter.strip)
        self.assertFalse(converter.convert)

    def test_wrap_shouldnt_raise_on_missing_closed_attr(self):
        with \
            patch("colorama.ansitowin32.os.name", "nt"), \
            patch("colorama.ansitowin32.winapi_test", lambda: True):
                converter = AnsiToWin32(object())
        self.assertTrue(converter.strip)
        self.assertFalse(converter.convert)

    def testExtractParams(self):
        stream = AnsiToWin32(Mock())
        data = {
            '':               (0,),
            ';;':             (0,),
            '2':              (2,),
            ';;002;;':        (2,),
            '0;1':            (0, 1),
            ';;003;;456;;':   (3, 456),
            '11;22;33;44;55': (11, 22, 33, 44, 55),
        }
        for datum, expected in data.items():
            self.assertEqual(stream.extract_params('m', datum), expected)

    def testCallWin32UsesLookup(self):
        listener = Mock()
        stream = AnsiToWin32(listener)
        stream.win32_calls = {
            1: (lambda *_, **__: listener(11),),
            2: (lambda *_, **__: listener(22),),
            3: (lambda *_, **__: listener(33),),
        }
        stream.call_win32('m', (3, 1, 99, 2))
        self.assertEqual(
            [a[0][0] for a in listener.call_args_list],
            [33, 11, 22] )

    def test_osc_codes(self):
        mockStdout = Mock()
        stream = AnsiToWin32(mockStdout, convert=True)
        with patch('colorama.ansitowin32.winterm') as winterm:
            data = [
                '\033]0\x07',                      # missing arguments
                '\033]0;foo\x08',                  # wrong OSC command
                '\033]0;colorama_test_title\x07',  # should work
                '\033]1;colorama_test_title\x07',  # wrong set command
                '\033]2;colorama_test_title\x07',  # should work
                '\033]' + ';' * 64 + '\x08',       # see issue #247
            ]
            for code in data:
                stream.write(code)
            self.assertEqual(winterm.set_title.call_count, 2)

    def test_native_windows_ansi(self):
        with ExitStack() as stack:
            def p(a, b):
                stack.enter_context(patch(a, b, create=True))
            # Pretend to be on Windows
            p("colorama.ansitowin32.os.name", "nt")
            p("colorama.ansitowin32.winapi_test", lambda: True)
            p("colorama.win32.winapi_test", lambda: True)
            p("colorama.winterm.win32.windll", "non-None")
            p("colorama.winterm.get_osfhandle", lambda _: 1234)

            # Pretend that our mock stream has native ANSI support
            p(
                "colorama.winterm.win32.GetConsoleMode",
                lambda _: ENABLE_VIRTUAL_TERMINAL_PROCESSING,
            )
            SetConsoleMode = Mock()
            p("colorama.winterm.win32.SetConsoleMode", SetConsoleMode)

            stdout = Mock()
            stdout.closed = False
            stdout.isatty.return_value = True
            stdout.fileno.return_value = 1

            # Our fake console says it has native vt support, so AnsiToWin32 should
            # enable that support and do nothing else.
            stream = AnsiToWin32(stdout)
            SetConsoleMode.assert_called_with(1234, ENABLE_VIRTUAL_TERMINAL_PROCESSING)
            self.assertFalse(stream.strip)
            self.assertFalse(stream.convert)
            self.assertFalse(stream.should_wrap())

            # Now let's pretend we're on an old Windows console, that doesn't have
            # native ANSI support.
            p("colorama.winterm.win32.GetConsoleMode", lambda _: 0)
            SetConsoleMode = Mock()
            p("colorama.winterm.win32.SetConsoleMode", SetConsoleMode)

            stream = AnsiToWin32(stdout)
            SetConsoleMode.assert_called_with(1234, ENABLE_VIRTUAL_TERMINAL_PROCESSING)
            self.assertTrue(stream.strip)
            self.assertTrue(stream.convert)
            self.assertTrue(stream.should_wrap())


if __name__ == '__main__':
    main()
python3.12/site-packages/pip/_vendor/colorama/tests/isatty_test.py000064400000003512151732703160021230 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import sys
from unittest import TestCase, main

from ..ansitowin32 import StreamWrapper, AnsiToWin32
from .utils import pycharm, replace_by, replace_original_by, StreamTTY, StreamNonTTY


def is_a_tty(stream):
    return StreamWrapper(stream, None).isatty()

class IsattyTest(TestCase):

    def test_TTY(self):
        tty = StreamTTY()
        self.assertTrue(is_a_tty(tty))
        with pycharm():
            self.assertTrue(is_a_tty(tty))

    def test_nonTTY(self):
        non_tty = StreamNonTTY()
        self.assertFalse(is_a_tty(non_tty))
        with pycharm():
            self.assertFalse(is_a_tty(non_tty))

    def test_withPycharm(self):
        with pycharm():
            self.assertTrue(is_a_tty(sys.stderr))
            self.assertTrue(is_a_tty(sys.stdout))

    def test_withPycharmTTYOverride(self):
        tty = StreamTTY()
        with pycharm(), replace_by(tty):
            self.assertTrue(is_a_tty(tty))

    def test_withPycharmNonTTYOverride(self):
        non_tty = StreamNonTTY()
        with pycharm(), replace_by(non_tty):
            self.assertFalse(is_a_tty(non_tty))

    def test_withPycharmNoneOverride(self):
        with pycharm():
            with replace_by(None), replace_original_by(None):
                self.assertFalse(is_a_tty(None))
                self.assertFalse(is_a_tty(StreamNonTTY()))
                self.assertTrue(is_a_tty(StreamTTY()))

    def test_withPycharmStreamWrapped(self):
        with pycharm():
            self.assertTrue(AnsiToWin32(StreamTTY()).stream.isatty())
            self.assertFalse(AnsiToWin32(StreamNonTTY()).stream.isatty())
            self.assertTrue(AnsiToWin32(sys.stdout).stream.isatty())
            self.assertTrue(AnsiToWin32(sys.stderr).stream.isatty())


if __name__ == '__main__':
    main()
python3.12/site-packages/pip/_vendor/colorama/tests/winterm_test.py000064400000007175151732703160021411 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import sys
from unittest import TestCase, main, skipUnless

try:
    from unittest.mock import Mock, patch
except ImportError:
    from mock import Mock, patch

from ..winterm import WinColor, WinStyle, WinTerm


class WinTermTest(TestCase):

    @patch('colorama.winterm.win32')
    def testInit(self, mockWin32):
        mockAttr = Mock()
        mockAttr.wAttributes = 7 + 6 * 16 + 8
        mockWin32.GetConsoleScreenBufferInfo.return_value = mockAttr
        term = WinTerm()
        self.assertEqual(term._fore, 7)
        self.assertEqual(term._back, 6)
        self.assertEqual(term._style, 8)

    @skipUnless(sys.platform.startswith("win"), "requires Windows")
    def testGetAttrs(self):
        term = WinTerm()

        term._fore = 0
        term._back = 0
        term._style = 0
        self.assertEqual(term.get_attrs(), 0)

        term._fore = WinColor.YELLOW
        self.assertEqual(term.get_attrs(), WinColor.YELLOW)

        term._back = WinColor.MAGENTA
        self.assertEqual(
            term.get_attrs(),
            WinColor.YELLOW + WinColor.MAGENTA * 16)

        term._style = WinStyle.BRIGHT
        self.assertEqual(
            term.get_attrs(),
            WinColor.YELLOW + WinColor.MAGENTA * 16 + WinStyle.BRIGHT)

    @patch('colorama.winterm.win32')
    def testResetAll(self, mockWin32):
        mockAttr = Mock()
        mockAttr.wAttributes = 1 + 2 * 16 + 8
        mockWin32.GetConsoleScreenBufferInfo.return_value = mockAttr
        term = WinTerm()

        term.set_console = Mock()
        term._fore = -1
        term._back = -1
        term._style = -1

        term.reset_all()

        self.assertEqual(term._fore, 1)
        self.assertEqual(term._back, 2)
        self.assertEqual(term._style, 8)
        self.assertEqual(term.set_console.called, True)

    @skipUnless(sys.platform.startswith("win"), "requires Windows")
    def testFore(self):
        term = WinTerm()
        term.set_console = Mock()
        term._fore = 0

        term.fore(5)

        self.assertEqual(term._fore, 5)
        self.assertEqual(term.set_console.called, True)

    @skipUnless(sys.platform.startswith("win"), "requires Windows")
    def testBack(self):
        term = WinTerm()
        term.set_console = Mock()
        term._back = 0

        term.back(5)

        self.assertEqual(term._back, 5)
        self.assertEqual(term.set_console.called, True)

    @skipUnless(sys.platform.startswith("win"), "requires Windows")
    def testStyle(self):
        term = WinTerm()
        term.set_console = Mock()
        term._style = 0

        term.style(22)

        self.assertEqual(term._style, 22)
        self.assertEqual(term.set_console.called, True)

    @patch('colorama.winterm.win32')
    def testSetConsole(self, mockWin32):
        mockAttr = Mock()
        mockAttr.wAttributes = 0
        mockWin32.GetConsoleScreenBufferInfo.return_value = mockAttr
        term = WinTerm()
        term.windll = Mock()

        term.set_console()

        self.assertEqual(
            mockWin32.SetConsoleTextAttribute.call_args,
            ((mockWin32.STDOUT, term.get_attrs()), {})
        )

    @patch('colorama.winterm.win32')
    def testSetConsoleOnStderr(self, mockWin32):
        mockAttr = Mock()
        mockAttr.wAttributes = 0
        mockWin32.GetConsoleScreenBufferInfo.return_value = mockAttr
        term = WinTerm()
        term.windll = Mock()

        term.set_console(on_stderr=True)

        self.assertEqual(
            mockWin32.SetConsoleTextAttribute.call_args,
            ((mockWin32.STDERR, term.get_attrs()), {})
        )


if __name__ == '__main__':
    main()
python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/initialise_test.cpython-312.pyc000064400000026666151732703160026425 0ustar00�

R`iU���ddlZddlmZmZmZ	ddlmZmZddl
mZddlm
Z
mZmZddlmZmZej&Zej*ZGd	�d
e�ZGd�de�Zed
k(re�yy#e$rddl	mZmZY�cwxYw)�N)�TestCase�main�
skipUnless)�patch�Mock�)�
StreamWrapper)�init�just_fix_windows_console�_wipe_internal_state_for_tests�)�osname�
replace_byc�z�eZdZeej
j
�d�d��Zd�Zd�Z	d�Z
ed�edd��ed	d
��d����Zed�edd��d
���Z
d�Zd�Zd�Zd�Zd�Zed�ed�d���Zed�d��Zed�d��Zy)�InitTestzsys.stdout is not a ttyc�$�|j�y�N)�assertNotWrapped��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/tests/initialise_test.py�setUpzInitTest.setUps��	
����c�T�t�tt_tt_yr�r�orig_stdout�sys�stdout�orig_stderr�stderrrs r�tearDownzInitTest.tearDown���&�(� ��
� ��
rc�P�|jtjtd�|jtjt
d�|j
ttjt�d�|j
ttjt�d�y)Nzstdout should be wrappedzstderr should be wrappedzbad stdout wrapperzbad stderr wrapper)	�assertIsNotrrrr r�
assertTrue�
isinstancer	rs r�
assertWrappedzInitTest.assertWrappedsh��������[�2L�M�������[�2L�M����
�3�:�:�}�=� �	"����
�3�:�:�}�=� �	"rc��|jtjtd�|jtjt
d�y)Nzstdout should not be wrappedzstderr should not be wrapped)�assertIsrrrr rrs rrzInitTest.assertNotWrapped&s,���
�
�c�j�j�+�/M�N��
�
�c�j�j�+�/M�Nrzcolorama.initialise.reset_all� colorama.ansitowin32.winapi_testc��y�NT���_s r�<lambda>zInitTest.<lambda>+s��$r�)colorama.ansitowin32.enable_vt_processingc��y�NFr-r.s rr0zInitTest.<lambda>,s��5rc�x�td�5t�|j�ddd�y#1swYyxYw�N�nt�rr
r'�rr/s  r�testInitWrapsOnWindowszInitTest.testInitWrapsOnWindows*s&���D�\��F���� ��\�\���0�9c��yr3r-r.s rr0zInitTest.<lambda>3s��%rc�x�td�5t�|j�ddd�y#1swYyxYwr5�rr
rr8s  r�#testInitDoesntWrapOnEmulatedWindowsz,InitTest.testInitDoesntWrapOnEmulatedWindows2s&���D�\��F��!�!�#��\�\�r:c�x�td�5t�|j�ddd�y#1swYyxYw)N�posixr=rs r�testInitDoesntWrapOnNonWindowsz'InitTest.testInitDoesntWrapOnNonWindows9s$��
�G�_��F��!�!�#��_�_�r:c���td�5t�|jtj�|jtj
�ddd�y#1swYyxYwr)rr
�assertIsNonerrr rs r�testInitDoesntWrapIfNonez!InitTest.testInitDoesntWrapIfNone>sA��
��
��F�
���c�j�j�)����c�j�j�)��
�
�s�A	A�A'c�|�td�5td��|j�ddd�y#1swYyxYw)Nr@T��	autoresetr7rs r�&testInitAutoresetOnWrapsOnAllPlatformsz/InitTest.testInitAutoresetOnWrapsOnAllPlatformsFs'��
�G�_��4� ���� ��_�_���2�;c�|�td�5td��|j�ddd�y#1swYyxYw)Nr6F)�wrapr=rs r�"testInitWrapOffDoesntWrapOnWindowsz+InitTest.testInitWrapOffDoesntWrapOnWindowsKs'��
�D�\��e���!�!�#��\�\�rIc�2�|jtd��y)Nc��tdd��S)NTF)rGrK)r
r-rrr0zEInitTest.testInitWrapOffIncompatibleWithAutoresetOn.<locals>.<lambda>Qs��d�T��.Nr)�assertRaises�
ValueErrorrs r�*testInitWrapOffIncompatibleWithAutoresetOnz3InitTest.testInitWrapOffIncompatibleWithAutoresetOnPs�����*�&N�Orz&colorama.win32.SetConsoleTextAttributezcolorama.initialise.AnsiToWin32c�:�td�5td��|jt|j�d�|j|jdddd�|j|jdddd�ddd�y#1swYyxYw)Nr6TrFrr
rGr�rr
�assertEqual�len�call_args_list)r�	mockATW32r/s   r�testAutoResetPassedOnzInitTest.testAutoResetPassedOnSs����D�\��4� ����S��!9�!9�:�A�>����Y�5�5�a�8��;�K�H�$�O����Y�5�5�a�8��;�K�H�$�O�	�\�\�s�A<B�Bc�@�td�5t�td��|jt|j�d�|j|jdddd�|j|jdddd�t�|jt|j�d	�|j|jdddd
�|j|jdddd
�ddd�y#1swYyxYw)Nr6TrF�rr
rG��F�rS)rrWs  r�testAutoResetChangeablez InitTest.testAutoResetChangeable\s���
�D�\��F��4� ����S��!9�!9�:�A�>����Y�5�5�a�8��;�K�H�$�O����Y�5�5�a�8��;�K�H�$�O��F����S��!9�!9�:�A�>�����(�(��+�A�.�{�;�U�
D�����(�(��+�A�.�{�;�U�
D��\�\�s�C?D�Dz#colorama.initialise.atexit.registerc��t�|j|j�|j�t�|j	|j�yr)r
r%�called�
reset_mock�assertFalse)r�mockRegisters  r�testAtexitRegisteredOnlyOncez%InitTest.testAtexitRegisteredOnlyOncens>��������+�+�,����!�������,�,�-rN)�__name__�
__module__�__qualname__rrr�isattyrr!r'rrr9r>rArDrHrLrQrXr^rdr-rrrrs����
�
�!�!�#�%>�?� �@� �!�
"�O��*�+�
�-��?�
�6�8H�I�!�J�@�,�!�
�*�+�
�-�/?�@�$�A�,�$�
$�
*�!�
$�
P��3�4�
�,�-�P�.�5�P��,�-�D�.�D�"�0�1�.�2�.rrc�8�eZdZd�Zd�Zedd��d��Zy)�JustFixWindowsConsoleTestc�T�t�tt_tt_yrrrs r�_resetz JustFixWindowsConsoleTest._resetxr"rc�$�|j�yr)rlrs rr!z"JustFixWindowsConsoleTest.tearDown}s�����
rr*c��yr,r-r-rrr0z"JustFixWindowsConsoleTest.<lambda>�s��trc�f��tjdk7rSt�|jtjt
�|jtjt�yd�}dD�]��td�fd��5|j�|�tj}tj}t�|jtj|��r!|jtj|�n |jtj|�tj}tj}t�|jtj|�|jtj|�|j�|�t�tj}tj}t�|j|tj�|j|tj�ddd����y#1swY���xYw)N�win32c��t�}d|_d|j_d|j_|t
_t�}d|_d|j_d|j_|t
_y)NFr
Tr)r�closedrh�return_value�filenorrr )rr s  r�fake_stdzEJustFixWindowsConsoleTest.testJustFixWindowsConsole.<locals>.fake_std�s^����� %��
�-2��
�
�*�-.��
�
�*�#��
���� %��
�-1��
�
�*�-.��
�
�*�#��
r)FTr1c����Srr-)r/�native_ansis �rr0zEJustFixWindowsConsoleTest.testJustFixWindowsConsole.<locals>.<lambda>�s���{r)r�platformrr)rrr rrrlr$r
)rru�prev_stdout�prev_stderrrws    @r�testJustFixWindowsConsolez3JustFixWindowsConsoleTest.testJustFixWindowsConsole�sb����<�<�7�"�$�&��M�M�#�*�*�k�2��M�M�#�*�*�k�2�

$� -���?�*���K�K�M��J�#&�*�*�K�"%�*�*�K�,�.��M�M�#�*�*�k�:�"��
�
�c�j�j�+�>��(�(����[�A�#&�*�*�K�"%�*�*�K�,�.��M�M�#�*�*�k�:��M�M�#�*�*�k�:��K�K�M��J��F�"%�*�*�K�"%�*�*�K�,�.��M�M�+�s�z�z�:��M�M�+�s�z�z�:�C�� -���s
�FH&�&H0	N)rerfrgrlr!rr{r-rrrjrjws(��!�
��-�|�<�8;�=�8;rrj�__main__)r�unittestrrr�
unittest.mockrr�ImportError�mock�ansitowin32r	�
initialiser
rr�utilsrrrrr rrrjrer-rr�<module>r�s���
�/�/�!�)�(�W�W�%��j�j���j�j��b.�x�b.�JB;��B;�J�z���F���k�!� � �!�s�A,�,
A<�;A<python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/__init__.cpython-312.pyc000064400000000366151732703160024760 0ustar00�

R`iK���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__init__.py�<module>rs�rpython3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/isatty_test.cpython-312.pyc000064400000011335151732703160025573 0ustar00�

R`iJ��~�ddlZddlmZmZddlmZmZddlmZm	Z	m
Z
mZmZd�Z
Gd�d	e�Zed
k(re�yy)�N)�TestCase�main�)�
StreamWrapper�AnsiToWin32�)�pycharm�
replace_by�replace_original_by�	StreamTTY�StreamNonTTYc�6�t|d�j�S�N)r�isatty)�streams ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/tests/isatty_test.py�is_a_ttyr	s�����&�-�-�/�/�c�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�
IsattyTestc��t�}|jt|��t�5|jt|��ddd�y#1swYyxYwr)r�
assertTruerr	��self�ttys  r�test_TTYzIsattyTest.test_TTYs8���k�������
�&�
�Y��O�O�H�S�M�*��Y�Y���A�Ac��t�}|jt|��t�5|jt|��ddd�y#1swYyxYwr)r
�assertFalserr	�r�non_ttys  r�test_nonTTYzIsattyTest.test_nonTTYs>���.������'�*�+�
�Y����X�g�.�/��Y�Y�rc���t�5|jttj��|jttj
��ddd�y#1swYyxYwr)r	rr�sys�stderr�stdout�rs r�test_withPycharmzIsattyTest.test_withPycharms;��
�Y��O�O�H�S�Z�Z�0�1��O�O�H�S�Z�Z�0�1��Y�Y�s�AA%�%A.c���t�}t�5t|�5|jt	|��ddd�ddd�y#1swY�xYw#1swYyxYwr)rr	r
rrrs  r�test_withPycharmTTYOverridez&IsattyTest.test_withPycharmTTYOverrides7���k��
�Y�
�3���O�O�H�S�M�*�(�Y�Y����Y�Y��!�A�A
�A�
A	�A�A"c���t�}t�5t|�5|jt	|��ddd�ddd�y#1swY�xYw#1swYyxYwr)r
r	r
rrr s  r�test_withPycharmNonTTYOverridez)IsattyTest.test_withPycharmNonTTYOverride$s=���.��
�Y�
�7�+����X�g�.�/�,�Y�Y�+�+��Y�Y�r+c	�~�t�5td�5td�5|jt	d��|jt	t���|j
t	t���ddd�ddd�ddd�y#1swY�xYw#1swY�xYw#1swYyxYwr)r	r
rrrr
rrr's r�test_withPycharmNoneOverridez'IsattyTest.test_withPycharmNoneOverride)sv��
�Y��D�!�#6�t�#<�� � ��$��0�� � ��,�.�!9�:������� 5�6�$=�!��Y�#<�#<��!�!���Y�s:�B3�B'�AB�B'�
B3�B$� B'�'B0	�,B3�3B<c�*�t�5|jtt��jj��|j
tt��jj��|jttj�jj��|jttj�jj��ddd�y#1swYyxYwr)r	rrrrrrr
r$r&r%r's r�test_withPycharmStreamWrappedz(IsattyTest.test_withPycharmStreamWrapped0s���
�Y��O�O�K�	��4�;�;�B�B�D�E����[���8�?�?�F�F�H�I��O�O�K��
�
�3�:�:�A�A�C�D��O�O�K��
�
�3�:�:�A�A�C�D�	�Y�Y�s�C5D	�	DN)
�__name__�
__module__�__qualname__rr"r(r*r-r/r1�rrrrs&��+�0�2�
+�
0�
7�Err�__main__)r$�unittestrr�ansitowin32rr�utilsr	r
rrr
rrr2r5rr�<module>r:s<��
�#�4�T�T�0�)E��)E�X�z���F�rpython3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/ansi_test.cpython-312.pyc000064400000012613151732703160025210 0ustar00�

R`i���ddlZddlmZmZddlmZmZmZddlm	Z	ejZejZ
Gd�de�Zedk(re�yy)	�N)�TestCase�main�)�Back�Fore�Style)�AnsiToWin32c�*�eZdZd�Zd�Zd�Zd�Zd�Zy)�AnsiTestc��|jttj�t�|jttj
�t�y�N)�assertNotEqual�type�sys�stdoutr	�stderr��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/tests/ansi_test.py�setUpzAnsiTest.setUps6��	
���D����,�k�:����D����,�k�:�c�@�tt_tt_yr
)�stdout_origrr�stderr_origrrs r�tearDownzAnsiTest.tearDowns�� ��
� ��
rc�D�|jtjd�|jtjd�|jtjd�|jtj
d�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd	�|jtjd
�|jtjd�|jtjd�|jtjd
�|jtjd�|jtj d�|jtj"d�|jtj$d�y)Nzzzzzzzzzzzzzzzzz)�assertEqualr�BLACK�RED�GREEN�YELLOW�BLUE�MAGENTA�CYAN�WHITE�RESET�
LIGHTBLACK_EX�LIGHTRED_EX�
LIGHTGREEN_EX�LIGHTYELLOW_EX�LIGHTBLUE_EX�LIGHTMAGENTA_EX�LIGHTCYAN_EX�
LIGHTWHITE_EXrs r�testForeAttributeszAnsiTest.testForeAttributessh��������Z�0�������:�.�������Z�0�������j�1�������J�/�������z�2�������J�/�������Z�0�������Z�0�	
����+�+�Z�8�����)�)�:�6�����+�+�Z�8�����,�,�j�9�����*�*�J�7�����-�-�z�:�����*�*�J�7�����+�+�Z�8rc�D�|jtjd�|jtjd�|jtjd�|jtj
d�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd	�|jtjd
�|jtjd�|jtjd�|jtjd
�|jtjd�|jtj d�|jtj"d�|jtj$d�y)Nzzzzzzzzzzzzzzzzz)rrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.rs r�testBackAttributeszAnsiTest.testBackAttributes/sh��������Z�0�������:�.�������Z�0�������j�1�������J�/�������z�2�������J�/�������Z�0�������Z�0�	
����+�+�[�9�����)�)�;�7�����+�+�[�9�����,�,�k�:�����*�*�K�8�����-�-�{�;�����*�*�K�8�����+�+�[�9rc���|jtjd�|jtjd�|jtjd�y)Nzzz)rr�DIM�NORMAL�BRIGHTrs r�testStyleAttributeszAnsiTest.testStyleAttributesEs>��������I�.�������z�2�������y�1rN)�__name__�
__module__�__qualname__rrr/r1r6�rrrrs��;�!�
9�,:�,2rr�__main__)r�unittestrr�ansirrr�ansitowin32r	rrrrrr7r:rr�<module>r?sG��
�#�$�$�%��j�j���j�j��<2�x�<2�~�z���F�rpython3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/utils.cpython-312.pyc000064400000004726151732703160024365 0ustar00�

R`i7���ddlmZddlmZddlZddlZGd�de�ZGd�de�Zed��Zed	��Z	ed
��Z
ed��Zy)�)�contextmanager)�StringIONc��eZdZd�Zy)�	StreamTTYc��y)NT���selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/tests/utils.py�isattyzStreamTTY.isatty	s���N��__name__�
__module__�__qualname__rrr
rrrs��r
rc��eZdZd�Zy)�StreamNonTTYc��y)NFrr	s rrzStreamNonTTY.isatty
s��r
Nrrr
rrrs��r
rc#�`K�tj}|t_d��|t_y�w�N)�os�name)r�origs  r�osnamers ����
�7�7�D��B�G�	��B�G�s�,.c#�K�tj}tj}|t_|t_d��|t_|t_y�wr)�sys�stdout�stderr��stream�orig_stdout�orig_stderrs   r�
replace_byr#s7�����*�*�K��*�*�K��C�J��C�J�	��C�J��C�J���AAc#�K�tj}tj}|t_|t_d��|t_|t_y�wr)r�
__stdout__�
__stderr__rs   r�replace_original_byr(!s7�����.�.�K��.�.�K��C�N��C�N�	� �C�N� �C�N�r$c#��K�dtjd<t�}t|�5t	|�5d��ddd�ddd�tjd=y#1swY�#xYw#1swY�'xYw�w)N�1�PYCHARM_HOSTED)r�environrr#r()�non_ttys r�pycharmr.+sS����#&�B�J�J�� ��n�G�	�G�	�1�'�:�
�;�	�
�
�
�#�$�;�:��	�	�s2�)A6�A*�A�A*�A6�A'	�#A*�*A3�/A6)�
contextlibr�iorrrrrrr#r(r.rr
r�<module>r1sy��%��
�	�����8�����������!��!��%��%r
python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/ansitowin32_test.cpython-312.pyc000064400000043206151732703160026440 0ustar00�

R`i�)���ddlmZmZddlmZmZ	ddlmZ	ddl
mZmZm
Z
ddlmZmZddlmZdd	lmZGd
�de�ZGd�d
e�Zedk(re�yy#e$r	ddl	mZY�PwxYw#e$r
ddlmZmZm
Z
Y�ZwxYw)�)�StringIO�
TextIOWrapper)�TestCase�main)�	ExitStack)�	MagicMock�Mock�patch�)�AnsiToWin32�
StreamWrapper��"ENABLE_VIRTUAL_TERMINAL_PROCESSING�)�osnamec�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�StreamWrapperTestc�~�t�}t|d�}|j|j|ju�y�N)r	r
�
assertTrue�random_attr)�self�
mockStream�wrappers   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/tests/ansitowin32_test.py�testIsAProxyzStreamWrapperTest.testIsAProxys2���V�
��
�D�1������,�,�
�0F�0F�F�H�c��t�}t�}t||�}|jd�|j|jjdif�y)N�hello)r)r	r
�writer�	call_args)rr�
mockConverterrs    r�testDelegatesWritez$StreamWrapperTest.testDelegatesWritesG���V�
���
��
�M�:���
�
�g�����
�+�+�5�5�
�B�7G�Hrc���t�}t�}t||�5}|jd�ddd�|j	|j
�y#1swY�%xYw�Nr)r	rr
r r�closed)rr"�s�fps    r�testDelegatesContextz&StreamWrapperTest.testDelegatesContext"sF����
��J��
�1�m�
,���H�H�X��-�������!�-�
,�s�A�A c��t�}t�|j_t	�}|jt�5}t
||�5}|jd�ddd�ddd�y#1swY�xYw#1swYyxYwr%)r�AttributeError�	__enter__�side_effectr	�assertRaisesr
r )rrr"�excinfors     r�testProxyNoContextManagerz+StreamWrapperTest.testProxyNoContextManager)sf���[�
�+9�+;�
���(���
�
�
�
�~�
.�'��z�=�9�W��
�
�g�&�:�/�
.�9�9��/�
.�s$�
A?�A3�"A?�3A<	�8A?�?Bc��t�}|j�t|d�}|j|jd�y�NT)r�closer
�assertEqualr&�r�streamrs   r�+test_closed_shouldnt_raise_on_closed_streamz=StreamWrapperTest.test_closed_shouldnt_raise_on_closed_stream1s2������������-���������.rc��tt��}|j�t|d�}|j	|j
d�yr2)rr�detachr
r4r&r5s   r�-test_closed_shouldnt_raise_on_detached_streamz?StreamWrapperTest.test_closed_shouldnt_raise_on_detached_stream7s7���x�z�*���
�
�����-���������.rN)	�__name__�
__module__�__qualname__rr#r)r0r7r:�rrrrs"��I�
I�"�'�/�/rrc��eZdZd�Zedd�edd��d���Zd�Zd�Zd	�Zdd
�Z	d�Z
d�Zd
�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�AnsiToWin32Testc��t�}t�}t||��}|j|j|�|j|j|�y)N)�	autoreset)r	rr4�wrappedrB)r�
mockStdout�autor6s    r�testInitzAnsiToWin32Test.testInit?sF���V�
��v���Z�4�8���������4�����)�)�4�0r�colorama.ansitowin32.wintermN� colorama.ansitowin32.winapi_testc��yr2r>��_s r�<lambda>zAnsiToWin32Test.<lambda>G���$rc��td�5t�}t|�}|j|j�ddd�y#1swYyxYw)N�nt)rr	rr�strip�rrDr6s   r�testStripIsTrueOnWindowsz(AnsiToWin32Test.testStripIsTrueOnWindowsFs6���D�\���J� ��,�F��O�O�F�L�L�)��\�\�s�1A�Ac��td�5td��}t|�}|j|j�ddd�y#1swYyxYw)N�posixF)r&)rr	r�assertFalserPrQs   r�testStripIsFalseOffWindowsz*AnsiToWin32Test.testStripIsFalseOffWindowsNs9��
�G�_��U�+�J� ��,�F����V�\�\�*��_�_�s�3A�Ac�H�t�}t|�}t�|_t�|_d|_|jd�|j
|jj
j�|j|jjdif�y)NT�abc�rX)
r	rrC�write_and_convertrPr rU�calledr4r!rQs   r�testWriteStripsAnsiz#AnsiToWin32Test.testWriteStripsAnsiTsw���V�
��Z�(������#'�6�� �������U��������-�-�4�4�5�����1�1�;�;�h��^�Lrc�V�t�}t|�}t�|_t�|_d|_d|_|j
d�|j|jj�|j|jjjdif�y)NFrXrY)r	rrCrZrP�convertr rUr[r4r!rQs   r�testWriteDoesNotStripAnsiz)AnsiToWin32Test.testWriteDoesNotStripAnsi`s~���V�
��Z�(������#'�6�� ����������U������1�1�8�8�9�������-�-�7�7�(�B��Hrc���tt��}||_t�|_||_t�|_|j
d�|j|jj|�y)NrX)	rr	r^�	reset_allrB�wintermr r4r[)rr^rBr6s    r�assert_autoresetsz!AnsiToWin32Test.assert_autoresetsmsX���T�V�$�� ����6���$����������U������)�)�0�0�)�<rc��|jd��|jd��|jdd��|jdd��y)NT�r^F)r^rB)rc)rs r�testWriteAutoresetsz#AnsiToWin32Test.testWriteAutoresetsxsJ�����t��,����u��-����t�u��=����u���>rc��tt��}|jd�|j|jj
jdif�y)NrXrY)rr	rZr4rCr r!�rr6s  r�"testWriteAndConvertWritesPlainTextz2AnsiToWin32Test.testWriteAndConvertWritesPlainText~s@���T�V�$��� � �%�)����&�.�.�.�.�8�8�8�R�.�Jrc�X�tt��}t�|_gd�}|D]z}|jjj�|j
|�|j|jjjD�cgc]}|d��	c}ddg��|ycc}w)N)
z	abcdefz
abcdefz
abcdefzabcdefzabcdefzabcdefzabcdefzabcdefzabcdefzabcdefz	abcdefz
abcdef�abcdefrrY)�def)	rr	�
call_win32rCr �
reset_mockrZr4�call_args_list)rr6�data�datum�argss     r�%testWriteAndConvertStripsAllValidAnsiz5AnsiToWin32Test.testWriteAndConvertStripsAllValidAnsi�s����T�V�$�� �F���
���E��N�N� � �+�+�-��$�$�e�-����$*�N�N�$8�$8�$G�$G�H�$G�D��Q��$G�H��8�%�
���Is�B'
c���tt��}t�|_|jd�|j	|j
jj�y)Nz
)rr	rmrZrUrCr r[rhs  r�%testWriteAndConvertSkipsEmptySnippetsz5AnsiToWin32Test.testWriteAndConvertSkipsEmptySnippets�sE���T�V�$�� �F���� � �"4�6����&�.�.�.�.�5�5�7rc�`�tt��}d|_t�|_td��|_dddddd	�}|j�D]Y\}}|jj
�|j|�|j|jjd
|��[y)NT�params)�return_value)�arw)�brw)�crw)�Grw)�Hrw)z	abcdefzabcdefz
abcdefzabcdefrkr)
rr	r^rm�extract_params�itemsrnrZr4r!�rr6rprq�expecteds     r�1testWriteAndConvertCallsWin32WithParamsAndCommandzAAnsiToWin32Test.testWriteAndConvertCallsWin32WithParamsAndCommand�s����T�V�$����� �F��� $�(� ;���$3�$3�$3�$3�$3�
�� $�z�z�|�O�E�8����(�(�*��$�$�e�-����f�/�/�9�9�!�<�h�H� ,rc�n�t�}t|�}|j�|j�yr)rrr3ra�rr6�	converters   r�3test_reset_all_shouldnt_raise_on_closed_orig_stdoutzCAnsiToWin32Test.test_reset_all_shouldnt_raise_on_closed_orig_stdout�s(�������'�	��������rc�@�t�}|j�tdd�5tdd��5t|�}ddd�ddd�|j	j
�|j
|j�y#1swY�HxYw#1swY�LxYw)N�colorama.ansitowin32.os.namerOrHc��yr2r>r>rrrLzPAnsiToWin32Test.test_wrap_shouldnt_raise_on_closed_orig_stdout.<locals>.<lambda>����dr)rr3r
rrrPrUr^r�s   r�.test_wrap_shouldnt_raise_on_closed_orig_stdoutz>AnsiToWin32Test.test_wrap_shouldnt_raise_on_closed_orig_stdout�sv����������0�$�7��4�l�C�'��/�	�
D�
8�	
���	���(�����*�*�+�
D�C��
8�7�s"�B�B�B�B	�
B�Bc��tdd�5tdd��5tt��}ddd�ddd�|jj�|j|j�y#1swY�HxYw#1swY�LxYw)Nr�rOrHc��yr2r>r>rrrLzQAnsiToWin32Test.test_wrap_shouldnt_raise_on_missing_closed_attr.<locals>.<lambda>�r�r)r
r�objectrrPrUr^)rr�s  r�/test_wrap_shouldnt_raise_on_missing_closed_attrz?AnsiToWin32Test.test_wrap_shouldnt_raise_on_missing_closed_attr�sh���0�$�7��4�l�C�'���1�	�
D�
8�	
���	���(�����*�*�+�
D�C��
8�7�s!�B�A6�B�6A?	�;B�Bc��tt��}dddddddd�}|j�D]'\}}|j|j	d|�|��)y)N)r)r)rr)�i�)���!�,�7)�z;;�2z;;002;;z0;1z;;003;;456;;z11;22;33;44;55�m)rr	rr4r~r�s     r�testExtractParamsz!AnsiToWin32Test.testExtractParams�s]���T�V�$��"�"�"�"�$�&�2�
�� $�z�z�|�O�E�8����V�2�2�3��>��I� ,rc����t��t��}�fd�f�fd�f�fd�fd�|_|jdd�|j	�j
D�cgc]
}|dd��c}gd��ycc}w)	Nc����d�S)Nr�r>�rK�__�listeners  �rrLz9AnsiToWin32Test.testCallWin32UsesLookup.<locals>.<lambda>��	����"�rc����d�S)Nr�r>r�s  �rrLz9AnsiToWin32Test.testCallWin32UsesLookup.<locals>.<lambda>�r�rc����d�S)Nr�r>r�s  �rrLz9AnsiToWin32Test.testCallWin32UsesLookup.<locals>.<lambda>�r�r)rrr�r�)r�r�crr)r�r�r�)r	r�win32_callsrmr4ro)rr6ryr�s   @r�testCallWin32UsesLookupz'AnsiToWin32Test.testCallWin32UsesLookup�sx����6���X�&��-�/�-�/�-�/�
���
	���#�}�-����&�5�5�6�5��Q�q�T�!�W�5�6��	��6s�A3c��t�}t|d��}td�5}gd�}|D]}|j|��|j	|j
jd�ddd�y#1swYyxYw)NTrerG)z]0z]0;fooz]0;colorama_test_titlez]1;colorama_test_titlez]2;colorama_test_titlezC];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;r)r	rr
r r4�	set_title�
call_count)rrDr6rbrp�codes      r�test_osc_codeszAnsiToWin32Test.test_osc_codes�sg���V�
��Z��6��
�1�
2�g��D������T�"�����W�.�.�9�9�1�=�3�
2�
2�s�AA/�/A8c�`��t�5��fd�}|dd�|dd��|dd��|dd	�|d
d��|dd
��t�}|d|�t�}d|_d|j_d|j
_t
|�}|jdt�|j|j�|j|j�|j|j��|dd��t�}|d|�t
|�}|jdt�|j|j�|j|j�|j|j��ddd�y#1swYyxYw)Nc�@���jt||d���y)NT)�create)�
enter_contextr
)ryrz�stacks  �r�pz3AnsiToWin32Test.test_native_windows_ansi.<locals>.p�s����#�#�E�!�Q�t�$<�=rr�rOrHc��yr2r>r>rrrLz:AnsiToWin32Test.test_native_windows_ansi.<locals>.<lambda>�rMrzcolorama.win32.winapi_testc��yr2r>r>rrrLz:AnsiToWin32Test.test_native_windows_ansi.<locals>.<lambda>�s��Drzcolorama.winterm.win32.windllznon-Nonezcolorama.winterm.get_osfhandlec��y)N��r>rJs rrLz:AnsiToWin32Test.test_native_windows_ansi.<locals>.<lambda>rMrz%colorama.winterm.win32.GetConsoleModec��tSrrrJs rrLz:AnsiToWin32Test.test_native_windows_ansi.<locals>.<lambda>s��<rz%colorama.winterm.win32.SetConsoleModeFTrr�c��y)Nrr>rJs rrLz:AnsiToWin32Test.test_native_windows_ansi.<locals>.<lambda>s��r)rr	r&�isattyrx�filenor�assert_called_withrrUrPr^�should_wrapr)rr��SetConsoleMode�stdoutr6r�s     @r�test_native_windows_ansiz(AnsiToWin32Test.test_native_windows_ansi�sd���
�[�E�
>�
�,�d�3�
�0�,�?�
�*�L�9�
�-�z�:�
�.��?�
�7�<�
�"�V�N�
�5�~�F��V�F�!�F�M�)-�F�M�M�&�)*�F�M�M�&�!��(�F��-�-�d�4V�W����V�\�\�*����V�^�^�,����V�/�/�1�2�
�5�{�C�!�V�N�
�5�~�F� ��(�F��-�-�d�4V�W��O�O�F�L�L�)��O�O�F�N�N�+��O�O�F�.�.�0�1�S�[�[�s�FF$�$F-)T)r;r<r=rFr
rRrVr\r_rcrfrirsrur�r�r�r�r�r�r�r�r>rrr@r@=s���1��)�4�0�
�-��?�*�@�1�*�+�
M�I�	=�?�K�
�48�I�"�,�,�J��>� *2rr@�__main__N)�iorr�unittestrr�
contextlibr�ImportError�contextlib2�
unittest.mockrr	r
�mock�ansitowin32rr
�win32r�utilsrrr@r;r>rr�<module>r�s���&�#�&�$�
,�4�4�5�6��'/��'/�Re2�h�e2�P�z���F����&�%�&���,�+�+�,�s"�A�
A,�A)�(A)�,A>�=A>python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/winterm_test.cpython-312.pyc000064400000015004151732703170025741 0ustar00�

R`i}���ddlZddlmZmZmZ	ddlmZmZddl
mZmZm
Z
Gd�de�Zedk(re�yy#e$rddl	mZmZY�2wxYw)	�N)�TestCase�main�
skipUnless)�Mock�patch�)�WinColor�WinStyle�WinTermc��eZdZed�d��Zeejjd�d�d��Z	ed�d��Z
eejjd�d�d��Zeejjd�d�d��Zeejjd�d�d	��Z
ed�d
��Zed�d��Zy)
�WinTermTestzcolorama.winterm.win32c��t�}d|_||j_t	�}|j|jd�|j|jd�|j|jd�y)N�o���)	r�wAttributes�GetConsoleScreenBufferInfo�return_valuer�assertEqual�_fore�_back�_style��self�	mockWin32�mockAttr�terms    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/colorama/tests/winterm_test.py�testInitzWinTermTest.testInitsb���6��-���<D�	�,�,�9��y��������Q�'�������Q�'�������a�(��winzrequires Windowsc��t�}d|_d|_d|_|j	|j�d�tj|_|j	|j�tj�tj|_|j	|j�tjtjdzz�tj|_|j	|j�tjtjdzztjz�y)Nr�)rrrrr�	get_attrsr	�YELLOW�MAGENTAr
�BRIGHT�rrs  r�testGetAttrszWinTermTest.testGetAttrss����y����
���
����������)�1�-��_�_��
�������)�8�?�?�;��%�%��
�����N�N���O�O�h�.�.��3�3�	5��o�o�������N�N���O�O�h�.�.��3�3�h�o�o�E�	Gr!c��t�}d|_||j_t	�}t�|_d|_d|_d|_|j�|j|jd�|j|jd�|j|jd�|j|j
jd�y)N�)����rrT)rrrrr�set_consolerrr�	reset_allr�calledrs    r�testResetAllzWinTermTest.testResetAll/s����6��-���<D�	�,�,�9��y���6�����
���
��������������Q�'�������Q�'�������a�(�����)�)�0�0�$�7r!c���t�}t�|_d|_|j	d�|j|jd�|j|jjd�y�Nr�T)rrr/r�forerr1r)s  r�testForezWinTermTest.testForeB�U���y���6�����
��	�	�!��������Q�'�����)�)�0�0�$�7r!c���t�}t�|_d|_|j	d�|j|jd�|j|jjd�yr4)rrr/r�backrr1r)s  r�testBackzWinTermTest.testBackMr8r!c���t�}t�|_d|_|j	d�|j|jd�|j|jjd�y)Nr�T)rrr/r�stylerr1r)s  r�	testStylezWinTermTest.testStyleXsU���y���6�������
�
�2��������b�)�����)�)�0�0�$�7r!c��t�}d|_||j_t	�}t�|_|j
�|j|jj|j|j�fif�y)Nr)rrrrr�windllr/r�SetConsoleTextAttribute�	call_args�STDOUTr%rs    r�testSetConsolezWinTermTest.testSetConsolecsr���6�� ���<D�	�,�,�9��y���f�����������-�-�7�7������� 0�
1�2�6�	
r!c�"�t�}d|_||j_t	�}t�|_|j
d��|j|jj|j|j�fif�y)NrT)�	on_stderr)rrrrrrAr/rrBrC�STDERRr%rs    r�testSetConsoleOnStderrz"WinTermTest.testSetConsoleOnStderrrsw���6�� ���<D�	�,�,�9��y���f������4��(�����-�-�7�7������� 0�
1�2�6�	
r!N)�__name__�
__module__�__qualname__rr r�sys�platform�
startswithr*r2r7r;r?rErI�r!rr
r

s��
�#�$�)�%�)�����'�'��.�0B�C�G�D�G�*�#�$�8�%�8�$����'�'��.�0B�C�8�D�8�����'�'��.�0B�C�8�D�8�����'�'��.�0B�C�8�D�8��#�$�
�%�
��#�$�
�%�
r!r
�__main__)rM�unittestrrr�
unittest.mockrr�ImportError�mock�wintermr	r
rr
rJrPr!r�<module>rWsY��
�/�/�!�)�2�1�r
�(�r
�j�z���F���w�!� � �!�s�;�
A�
Apython3.12/site-packages/pip/_vendor/colorama/tests/__init__.py000064400000000113151732703170020406 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
python3.12/site-packages/pip/_vendor/colorama/tests/ansi_test.py000064400000005427151732703170020655 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import sys
from unittest import TestCase, main

from ..ansi import Back, Fore, Style
from ..ansitowin32 import AnsiToWin32

stdout_orig = sys.stdout
stderr_orig = sys.stderr


class AnsiTest(TestCase):

    def setUp(self):
        # sanity check: stdout should be a file or StringIO object.
        # It will only be AnsiToWin32 if init() has previously wrapped it
        self.assertNotEqual(type(sys.stdout), AnsiToWin32)
        self.assertNotEqual(type(sys.stderr), AnsiToWin32)

    def tearDown(self):
        sys.stdout = stdout_orig
        sys.stderr = stderr_orig


    def testForeAttributes(self):
        self.assertEqual(Fore.BLACK, '\033[30m')
        self.assertEqual(Fore.RED, '\033[31m')
        self.assertEqual(Fore.GREEN, '\033[32m')
        self.assertEqual(Fore.YELLOW, '\033[33m')
        self.assertEqual(Fore.BLUE, '\033[34m')
        self.assertEqual(Fore.MAGENTA, '\033[35m')
        self.assertEqual(Fore.CYAN, '\033[36m')
        self.assertEqual(Fore.WHITE, '\033[37m')
        self.assertEqual(Fore.RESET, '\033[39m')

        # Check the light, extended versions.
        self.assertEqual(Fore.LIGHTBLACK_EX, '\033[90m')
        self.assertEqual(Fore.LIGHTRED_EX, '\033[91m')
        self.assertEqual(Fore.LIGHTGREEN_EX, '\033[92m')
        self.assertEqual(Fore.LIGHTYELLOW_EX, '\033[93m')
        self.assertEqual(Fore.LIGHTBLUE_EX, '\033[94m')
        self.assertEqual(Fore.LIGHTMAGENTA_EX, '\033[95m')
        self.assertEqual(Fore.LIGHTCYAN_EX, '\033[96m')
        self.assertEqual(Fore.LIGHTWHITE_EX, '\033[97m')


    def testBackAttributes(self):
        self.assertEqual(Back.BLACK, '\033[40m')
        self.assertEqual(Back.RED, '\033[41m')
        self.assertEqual(Back.GREEN, '\033[42m')
        self.assertEqual(Back.YELLOW, '\033[43m')
        self.assertEqual(Back.BLUE, '\033[44m')
        self.assertEqual(Back.MAGENTA, '\033[45m')
        self.assertEqual(Back.CYAN, '\033[46m')
        self.assertEqual(Back.WHITE, '\033[47m')
        self.assertEqual(Back.RESET, '\033[49m')

        # Check the light, extended versions.
        self.assertEqual(Back.LIGHTBLACK_EX, '\033[100m')
        self.assertEqual(Back.LIGHTRED_EX, '\033[101m')
        self.assertEqual(Back.LIGHTGREEN_EX, '\033[102m')
        self.assertEqual(Back.LIGHTYELLOW_EX, '\033[103m')
        self.assertEqual(Back.LIGHTBLUE_EX, '\033[104m')
        self.assertEqual(Back.LIGHTMAGENTA_EX, '\033[105m')
        self.assertEqual(Back.LIGHTCYAN_EX, '\033[106m')
        self.assertEqual(Back.LIGHTWHITE_EX, '\033[107m')


    def testStyleAttributes(self):
        self.assertEqual(Style.DIM, '\033[2m')
        self.assertEqual(Style.NORMAL, '\033[22m')
        self.assertEqual(Style.BRIGHT, '\033[1m')


if __name__ == '__main__':
    main()
python3.12/site-packages/pip/_vendor/colorama/tests/initialise_test.py000064400000015125151732703170022051 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import sys
from unittest import TestCase, main, skipUnless

try:
    from unittest.mock import patch, Mock
except ImportError:
    from mock import patch, Mock

from ..ansitowin32 import StreamWrapper
from ..initialise import init, just_fix_windows_console, _wipe_internal_state_for_tests
from .utils import osname, replace_by

orig_stdout = sys.stdout
orig_stderr = sys.stderr


class InitTest(TestCase):

    @skipUnless(sys.stdout.isatty(), "sys.stdout is not a tty")
    def setUp(self):
        # sanity check
        self.assertNotWrapped()

    def tearDown(self):
        _wipe_internal_state_for_tests()
        sys.stdout = orig_stdout
        sys.stderr = orig_stderr

    def assertWrapped(self):
        self.assertIsNot(sys.stdout, orig_stdout, 'stdout should be wrapped')
        self.assertIsNot(sys.stderr, orig_stderr, 'stderr should be wrapped')
        self.assertTrue(isinstance(sys.stdout, StreamWrapper),
            'bad stdout wrapper')
        self.assertTrue(isinstance(sys.stderr, StreamWrapper),
            'bad stderr wrapper')

    def assertNotWrapped(self):
        self.assertIs(sys.stdout, orig_stdout, 'stdout should not be wrapped')
        self.assertIs(sys.stderr, orig_stderr, 'stderr should not be wrapped')

    @patch('colorama.initialise.reset_all')
    @patch('colorama.ansitowin32.winapi_test', lambda *_: True)
    @patch('colorama.ansitowin32.enable_vt_processing', lambda *_: False)
    def testInitWrapsOnWindows(self, _):
        with osname("nt"):
            init()
            self.assertWrapped()

    @patch('colorama.initialise.reset_all')
    @patch('colorama.ansitowin32.winapi_test', lambda *_: False)
    def testInitDoesntWrapOnEmulatedWindows(self, _):
        with osname("nt"):
            init()
            self.assertNotWrapped()

    def testInitDoesntWrapOnNonWindows(self):
        with osname("posix"):
            init()
            self.assertNotWrapped()

    def testInitDoesntWrapIfNone(self):
        with replace_by(None):
            init()
            # We can't use assertNotWrapped here because replace_by(None)
            # changes stdout/stderr already.
            self.assertIsNone(sys.stdout)
            self.assertIsNone(sys.stderr)

    def testInitAutoresetOnWrapsOnAllPlatforms(self):
        with osname("posix"):
            init(autoreset=True)
            self.assertWrapped()

    def testInitWrapOffDoesntWrapOnWindows(self):
        with osname("nt"):
            init(wrap=False)
            self.assertNotWrapped()

    def testInitWrapOffIncompatibleWithAutoresetOn(self):
        self.assertRaises(ValueError, lambda: init(autoreset=True, wrap=False))

    @patch('colorama.win32.SetConsoleTextAttribute')
    @patch('colorama.initialise.AnsiToWin32')
    def testAutoResetPassedOn(self, mockATW32, _):
        with osname("nt"):
            init(autoreset=True)
            self.assertEqual(len(mockATW32.call_args_list), 2)
            self.assertEqual(mockATW32.call_args_list[1][1]['autoreset'], True)
            self.assertEqual(mockATW32.call_args_list[0][1]['autoreset'], True)

    @patch('colorama.initialise.AnsiToWin32')
    def testAutoResetChangeable(self, mockATW32):
        with osname("nt"):
            init()

            init(autoreset=True)
            self.assertEqual(len(mockATW32.call_args_list), 4)
            self.assertEqual(mockATW32.call_args_list[2][1]['autoreset'], True)
            self.assertEqual(mockATW32.call_args_list[3][1]['autoreset'], True)

            init()
            self.assertEqual(len(mockATW32.call_args_list), 6)
            self.assertEqual(
                mockATW32.call_args_list[4][1]['autoreset'], False)
            self.assertEqual(
                mockATW32.call_args_list[5][1]['autoreset'], False)


    @patch('colorama.initialise.atexit.register')
    def testAtexitRegisteredOnlyOnce(self, mockRegister):
        init()
        self.assertTrue(mockRegister.called)
        mockRegister.reset_mock()
        init()
        self.assertFalse(mockRegister.called)


class JustFixWindowsConsoleTest(TestCase):
    def _reset(self):
        _wipe_internal_state_for_tests()
        sys.stdout = orig_stdout
        sys.stderr = orig_stderr

    def tearDown(self):
        self._reset()

    @patch("colorama.ansitowin32.winapi_test", lambda: True)
    def testJustFixWindowsConsole(self):
        if sys.platform != "win32":
            # just_fix_windows_console should be a no-op
            just_fix_windows_console()
            self.assertIs(sys.stdout, orig_stdout)
            self.assertIs(sys.stderr, orig_stderr)
        else:
            def fake_std():
                # Emulate stdout=not a tty, stderr=tty
                # to check that we handle both cases correctly
                stdout = Mock()
                stdout.closed = False
                stdout.isatty.return_value = False
                stdout.fileno.return_value = 1
                sys.stdout = stdout

                stderr = Mock()
                stderr.closed = False
                stderr.isatty.return_value = True
                stderr.fileno.return_value = 2
                sys.stderr = stderr

            for native_ansi in [False, True]:
                with patch(
                    'colorama.ansitowin32.enable_vt_processing',
                    lambda *_: native_ansi
                ):
                    self._reset()
                    fake_std()

                    # Regular single-call test
                    prev_stdout = sys.stdout
                    prev_stderr = sys.stderr
                    just_fix_windows_console()
                    self.assertIs(sys.stdout, prev_stdout)
                    if native_ansi:
                        self.assertIs(sys.stderr, prev_stderr)
                    else:
                        self.assertIsNot(sys.stderr, prev_stderr)

                    # second call without resetting is always a no-op
                    prev_stdout = sys.stdout
                    prev_stderr = sys.stderr
                    just_fix_windows_console()
                    self.assertIs(sys.stdout, prev_stdout)
                    self.assertIs(sys.stderr, prev_stderr)

                    self._reset()
                    fake_std()

                    # If init() runs first, just_fix_windows_console should be a no-op
                    init()
                    prev_stdout = sys.stdout
                    prev_stderr = sys.stderr
                    just_fix_windows_console()
                    self.assertIs(prev_stdout, sys.stdout)
                    self.assertIs(prev_stderr, sys.stderr)


if __name__ == '__main__':
    main()
python3.12/site-packages/pip/_vendor/colorama/tests/utils.py000064400000002067151732703170020021 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from contextlib import contextmanager
from io import StringIO
import sys
import os


class StreamTTY(StringIO):
    def isatty(self):
        return True

class StreamNonTTY(StringIO):
    def isatty(self):
        return False

@contextmanager
def osname(name):
    orig = os.name
    os.name = name
    yield
    os.name = orig

@contextmanager
def replace_by(stream):
    orig_stdout = sys.stdout
    orig_stderr = sys.stderr
    sys.stdout = stream
    sys.stderr = stream
    yield
    sys.stdout = orig_stdout
    sys.stderr = orig_stderr

@contextmanager
def replace_original_by(stream):
    orig_stdout = sys.__stdout__
    orig_stderr = sys.__stderr__
    sys.__stdout__ = stream
    sys.__stderr__ = stream
    yield
    sys.__stdout__ = orig_stdout
    sys.__stderr__ = orig_stderr

@contextmanager
def pycharm():
    os.environ["PYCHARM_HOSTED"] = "1"
    non_tty = StreamNonTTY()
    with replace_by(non_tty), replace_original_by(non_tty):
        yield
    del os.environ["PYCHARM_HOSTED"]
python3.12/site-packages/pip/_vendor/colorama/win32.py000064400000014045151732703170016460 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.

# from winbase.h
STDOUT = -11
STDERR = -12

ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004

try:
    import ctypes
    from ctypes import LibraryLoader
    windll = LibraryLoader(ctypes.WinDLL)
    from ctypes import wintypes
except (AttributeError, ImportError):
    windll = None
    SetConsoleTextAttribute = lambda *_: None
    winapi_test = lambda *_: None
else:
    from ctypes import byref, Structure, c_char, POINTER

    COORD = wintypes._COORD

    class CONSOLE_SCREEN_BUFFER_INFO(Structure):
        """struct in wincon.h."""
        _fields_ = [
            ("dwSize", COORD),
            ("dwCursorPosition", COORD),
            ("wAttributes", wintypes.WORD),
            ("srWindow", wintypes.SMALL_RECT),
            ("dwMaximumWindowSize", COORD),
        ]
        def __str__(self):
            return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % (
                self.dwSize.Y, self.dwSize.X
                , self.dwCursorPosition.Y, self.dwCursorPosition.X
                , self.wAttributes
                , self.srWindow.Top, self.srWindow.Left, self.srWindow.Bottom, self.srWindow.Right
                , self.dwMaximumWindowSize.Y, self.dwMaximumWindowSize.X
            )

    _GetStdHandle = windll.kernel32.GetStdHandle
    _GetStdHandle.argtypes = [
        wintypes.DWORD,
    ]
    _GetStdHandle.restype = wintypes.HANDLE

    _GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo
    _GetConsoleScreenBufferInfo.argtypes = [
        wintypes.HANDLE,
        POINTER(CONSOLE_SCREEN_BUFFER_INFO),
    ]
    _GetConsoleScreenBufferInfo.restype = wintypes.BOOL

    _SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute
    _SetConsoleTextAttribute.argtypes = [
        wintypes.HANDLE,
        wintypes.WORD,
    ]
    _SetConsoleTextAttribute.restype = wintypes.BOOL

    _SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition
    _SetConsoleCursorPosition.argtypes = [
        wintypes.HANDLE,
        COORD,
    ]
    _SetConsoleCursorPosition.restype = wintypes.BOOL

    _FillConsoleOutputCharacterA = windll.kernel32.FillConsoleOutputCharacterA
    _FillConsoleOutputCharacterA.argtypes = [
        wintypes.HANDLE,
        c_char,
        wintypes.DWORD,
        COORD,
        POINTER(wintypes.DWORD),
    ]
    _FillConsoleOutputCharacterA.restype = wintypes.BOOL

    _FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute
    _FillConsoleOutputAttribute.argtypes = [
        wintypes.HANDLE,
        wintypes.WORD,
        wintypes.DWORD,
        COORD,
        POINTER(wintypes.DWORD),
    ]
    _FillConsoleOutputAttribute.restype = wintypes.BOOL

    _SetConsoleTitleW = windll.kernel32.SetConsoleTitleW
    _SetConsoleTitleW.argtypes = [
        wintypes.LPCWSTR
    ]
    _SetConsoleTitleW.restype = wintypes.BOOL

    _GetConsoleMode = windll.kernel32.GetConsoleMode
    _GetConsoleMode.argtypes = [
        wintypes.HANDLE,
        POINTER(wintypes.DWORD)
    ]
    _GetConsoleMode.restype = wintypes.BOOL

    _SetConsoleMode = windll.kernel32.SetConsoleMode
    _SetConsoleMode.argtypes = [
        wintypes.HANDLE,
        wintypes.DWORD
    ]
    _SetConsoleMode.restype = wintypes.BOOL

    def _winapi_test(handle):
        csbi = CONSOLE_SCREEN_BUFFER_INFO()
        success = _GetConsoleScreenBufferInfo(
            handle, byref(csbi))
        return bool(success)

    def winapi_test():
        return any(_winapi_test(h) for h in
                   (_GetStdHandle(STDOUT), _GetStdHandle(STDERR)))

    def GetConsoleScreenBufferInfo(stream_id=STDOUT):
        handle = _GetStdHandle(stream_id)
        csbi = CONSOLE_SCREEN_BUFFER_INFO()
        success = _GetConsoleScreenBufferInfo(
            handle, byref(csbi))
        return csbi

    def SetConsoleTextAttribute(stream_id, attrs):
        handle = _GetStdHandle(stream_id)
        return _SetConsoleTextAttribute(handle, attrs)

    def SetConsoleCursorPosition(stream_id, position, adjust=True):
        position = COORD(*position)
        # If the position is out of range, do nothing.
        if position.Y <= 0 or position.X <= 0:
            return
        # Adjust for Windows' SetConsoleCursorPosition:
        #    1. being 0-based, while ANSI is 1-based.
        #    2. expecting (x,y), while ANSI uses (y,x).
        adjusted_position = COORD(position.Y - 1, position.X - 1)
        if adjust:
            # Adjust for viewport's scroll position
            sr = GetConsoleScreenBufferInfo(STDOUT).srWindow
            adjusted_position.Y += sr.Top
            adjusted_position.X += sr.Left
        # Resume normal processing
        handle = _GetStdHandle(stream_id)
        return _SetConsoleCursorPosition(handle, adjusted_position)

    def FillConsoleOutputCharacter(stream_id, char, length, start):
        handle = _GetStdHandle(stream_id)
        char = c_char(char.encode())
        length = wintypes.DWORD(length)
        num_written = wintypes.DWORD(0)
        # Note that this is hard-coded for ANSI (vs wide) bytes.
        success = _FillConsoleOutputCharacterA(
            handle, char, length, start, byref(num_written))
        return num_written.value

    def FillConsoleOutputAttribute(stream_id, attr, length, start):
        ''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )'''
        handle = _GetStdHandle(stream_id)
        attribute = wintypes.WORD(attr)
        length = wintypes.DWORD(length)
        num_written = wintypes.DWORD(0)
        # Note that this is hard-coded for ANSI (vs wide) bytes.
        return _FillConsoleOutputAttribute(
            handle, attribute, length, start, byref(num_written))

    def SetConsoleTitle(title):
        return _SetConsoleTitleW(title)

    def GetConsoleMode(handle):
        mode = wintypes.DWORD()
        success = _GetConsoleMode(handle, byref(mode))
        if not success:
            raise ctypes.WinError()
        return mode.value

    def SetConsoleMode(handle, mode):
        success = _SetConsoleMode(handle, mode)
        if not success:
            raise ctypes.WinError()
python3.12/site-packages/pip/_vendor/colorama/initialise.py000064400000006375151732703170017657 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import atexit
import contextlib
import sys

from .ansitowin32 import AnsiToWin32


def _wipe_internal_state_for_tests():
    global orig_stdout, orig_stderr
    orig_stdout = None
    orig_stderr = None

    global wrapped_stdout, wrapped_stderr
    wrapped_stdout = None
    wrapped_stderr = None

    global atexit_done
    atexit_done = False

    global fixed_windows_console
    fixed_windows_console = False

    try:
        # no-op if it wasn't registered
        atexit.unregister(reset_all)
    except AttributeError:
        # python 2: no atexit.unregister. Oh well, we did our best.
        pass


def reset_all():
    if AnsiToWin32 is not None:    # Issue #74: objects might become None at exit
        AnsiToWin32(orig_stdout).reset_all()


def init(autoreset=False, convert=None, strip=None, wrap=True):

    if not wrap and any([autoreset, convert, strip]):
        raise ValueError('wrap=False conflicts with any other arg=True')

    global wrapped_stdout, wrapped_stderr
    global orig_stdout, orig_stderr

    orig_stdout = sys.stdout
    orig_stderr = sys.stderr

    if sys.stdout is None:
        wrapped_stdout = None
    else:
        sys.stdout = wrapped_stdout = \
            wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
    if sys.stderr is None:
        wrapped_stderr = None
    else:
        sys.stderr = wrapped_stderr = \
            wrap_stream(orig_stderr, convert, strip, autoreset, wrap)

    global atexit_done
    if not atexit_done:
        atexit.register(reset_all)
        atexit_done = True


def deinit():
    if orig_stdout is not None:
        sys.stdout = orig_stdout
    if orig_stderr is not None:
        sys.stderr = orig_stderr


def just_fix_windows_console():
    global fixed_windows_console

    if sys.platform != "win32":
        return
    if fixed_windows_console:
        return
    if wrapped_stdout is not None or wrapped_stderr is not None:
        # Someone already ran init() and it did stuff, so we won't second-guess them
        return

    # On newer versions of Windows, AnsiToWin32.__init__ will implicitly enable the
    # native ANSI support in the console as a side-effect. We only need to actually
    # replace sys.stdout/stderr if we're in the old-style conversion mode.
    new_stdout = AnsiToWin32(sys.stdout, convert=None, strip=None, autoreset=False)
    if new_stdout.convert:
        sys.stdout = new_stdout
    new_stderr = AnsiToWin32(sys.stderr, convert=None, strip=None, autoreset=False)
    if new_stderr.convert:
        sys.stderr = new_stderr

    fixed_windows_console = True

@contextlib.contextmanager
def colorama_text(*args, **kwargs):
    init(*args, **kwargs)
    try:
        yield
    finally:
        deinit()


def reinit():
    if wrapped_stdout is not None:
        sys.stdout = wrapped_stdout
    if wrapped_stderr is not None:
        sys.stderr = wrapped_stderr


def wrap_stream(stream, convert, strip, autoreset, wrap):
    if wrap:
        wrapper = AnsiToWin32(stream,
            convert=convert, strip=strip, autoreset=autoreset)
        if wrapper.should_wrap():
            stream = wrapper.stream
    return stream


# Use this for initial setup as well, to reduce code duplication
_wipe_internal_state_for_tests()
python3.12/site-packages/pip/_vendor/colorama/__init__.py000064400000000412151732703170017246 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from .initialise import init, deinit, reinit, colorama_text, just_fix_windows_console
from .ansi import Fore, Back, Style, Cursor
from .ansitowin32 import AnsiToWin32

__version__ = '0.4.6'

python3.12/site-packages/pip/_vendor/colorama/winterm.py000064400000015736151732703170017213 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
try:
    from msvcrt import get_osfhandle
except ImportError:
    def get_osfhandle(_):
        raise OSError("This isn't windows!")


from . import win32

# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4
    MAGENTA = 5
    YELLOW  = 6
    GREY    = 7

# from wincon.h
class WinStyle(object):
    NORMAL              = 0x00 # dim text, dim background
    BRIGHT              = 0x08 # bright text, dim background
    BRIGHT_BACKGROUND   = 0x80 # dim text, bright background

class WinTerm(object):

    def __init__(self):
        self._default = win32.GetConsoleScreenBufferInfo(win32.STDOUT).wAttributes
        self.set_attrs(self._default)
        self._default_fore = self._fore
        self._default_back = self._back
        self._default_style = self._style
        # In order to emulate LIGHT_EX in windows, we borrow the BRIGHT style.
        # So that LIGHT_EX colors and BRIGHT style do not clobber each other,
        # we track them separately, since LIGHT_EX is overwritten by Fore/Back
        # and BRIGHT is overwritten by Style codes.
        self._light = 0

    def get_attrs(self):
        return self._fore + self._back * 16 + (self._style | self._light)

    def set_attrs(self, value):
        self._fore = value & 7
        self._back = (value >> 4) & 7
        self._style = value & (WinStyle.BRIGHT | WinStyle.BRIGHT_BACKGROUND)

    def reset_all(self, on_stderr=None):
        self.set_attrs(self._default)
        self.set_console(attrs=self._default)
        self._light = 0

    def fore(self, fore=None, light=False, on_stderr=False):
        if fore is None:
            fore = self._default_fore
        self._fore = fore
        # Emulate LIGHT_EX with BRIGHT Style
        if light:
            self._light |= WinStyle.BRIGHT
        else:
            self._light &= ~WinStyle.BRIGHT
        self.set_console(on_stderr=on_stderr)

    def back(self, back=None, light=False, on_stderr=False):
        if back is None:
            back = self._default_back
        self._back = back
        # Emulate LIGHT_EX with BRIGHT_BACKGROUND Style
        if light:
            self._light |= WinStyle.BRIGHT_BACKGROUND
        else:
            self._light &= ~WinStyle.BRIGHT_BACKGROUND
        self.set_console(on_stderr=on_stderr)

    def style(self, style=None, on_stderr=False):
        if style is None:
            style = self._default_style
        self._style = style
        self.set_console(on_stderr=on_stderr)

    def set_console(self, attrs=None, on_stderr=False):
        if attrs is None:
            attrs = self.get_attrs()
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        win32.SetConsoleTextAttribute(handle, attrs)

    def get_position(self, handle):
        position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition
        # Because Windows coordinates are 0-based,
        # and win32.SetConsoleCursorPosition expects 1-based.
        position.X += 1
        position.Y += 1
        return position

    def set_cursor_position(self, position=None, on_stderr=False):
        if position is None:
            # I'm not currently tracking the position, so there is no default.
            # position = self.get_position()
            return
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        win32.SetConsoleCursorPosition(handle, position)

    def cursor_adjust(self, x, y, on_stderr=False):
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        position = self.get_position(handle)
        adjusted_position = (position.Y + y, position.X + x)
        win32.SetConsoleCursorPosition(handle, adjusted_position, adjust=False)

    def erase_screen(self, mode=0, on_stderr=False):
        # 0 should clear from the cursor to the end of the screen.
        # 1 should clear from the cursor to the beginning of the screen.
        # 2 should clear the entire screen, and move cursor to (1,1)
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        csbi = win32.GetConsoleScreenBufferInfo(handle)
        # get the number of character cells in the current buffer
        cells_in_screen = csbi.dwSize.X * csbi.dwSize.Y
        # get number of character cells before current cursor position
        cells_before_cursor = csbi.dwSize.X * csbi.dwCursorPosition.Y + csbi.dwCursorPosition.X
        if mode == 0:
            from_coord = csbi.dwCursorPosition
            cells_to_erase = cells_in_screen - cells_before_cursor
        elif mode == 1:
            from_coord = win32.COORD(0, 0)
            cells_to_erase = cells_before_cursor
        elif mode == 2:
            from_coord = win32.COORD(0, 0)
            cells_to_erase = cells_in_screen
        else:
            # invalid mode
            return
        # fill the entire screen with blanks
        win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord)
        # now set the buffer's attributes accordingly
        win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord)
        if mode == 2:
            # put the cursor where needed
            win32.SetConsoleCursorPosition(handle, (1, 1))

    def erase_line(self, mode=0, on_stderr=False):
        # 0 should clear from the cursor to the end of the line.
        # 1 should clear from the cursor to the beginning of the line.
        # 2 should clear the entire line.
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        csbi = win32.GetConsoleScreenBufferInfo(handle)
        if mode == 0:
            from_coord = csbi.dwCursorPosition
            cells_to_erase = csbi.dwSize.X - csbi.dwCursorPosition.X
        elif mode == 1:
            from_coord = win32.COORD(0, csbi.dwCursorPosition.Y)
            cells_to_erase = csbi.dwCursorPosition.X
        elif mode == 2:
            from_coord = win32.COORD(0, csbi.dwCursorPosition.Y)
            cells_to_erase = csbi.dwSize.X
        else:
            # invalid mode
            return
        # fill the entire screen with blanks
        win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord)
        # now set the buffer's attributes accordingly
        win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord)

    def set_title(self, title):
        win32.SetConsoleTitle(title)


def enable_vt_processing(fd):
    if win32.windll is None or not win32.winapi_test():
        return False

    try:
        handle = get_osfhandle(fd)
        mode = win32.GetConsoleMode(handle)
        win32.SetConsoleMode(
            handle,
            mode | win32.ENABLE_VIRTUAL_TERMINAL_PROCESSING,
        )

        mode = win32.GetConsoleMode(handle)
        if mode & win32.ENABLE_VIRTUAL_TERMINAL_PROCESSING:
            return True
    # Can get TypeError in testsuite where 'fd' is a Mock()
    except (OSError, TypeError):
        return False
python3.12/site-packages/pip/_vendor/colorama/ansi.py000064400000004732151732703200016444 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
'''
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
'''

CSI = '\033['
OSC = '\033]'
BEL = '\a'


def code_to_chars(code):
    return CSI + str(code) + 'm'

def set_title(title):
    return OSC + '2;' + title + BEL

def clear_screen(mode=2):
    return CSI + str(mode) + 'J'

def clear_line(mode=2):
    return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):
        # the subclasses declare class attributes which are numbers.
        # Upon instantiation we define instance attributes, which are the same
        # as the class attributes but wrapped with the ANSI escape sequence
        for name in dir(self):
            if not name.startswith('_'):
                value = getattr(self, name)
                setattr(self, name, code_to_chars(value))


class AnsiCursor(object):
    def UP(self, n=1):
        return CSI + str(n) + 'A'
    def DOWN(self, n=1):
        return CSI + str(n) + 'B'
    def FORWARD(self, n=1):
        return CSI + str(n) + 'C'
    def BACK(self, n=1):
        return CSI + str(n) + 'D'
    def POS(self, x=1, y=1):
        return CSI + str(y) + ';' + str(x) + 'H'


class AnsiFore(AnsiCodes):
    BLACK           = 30
    RED             = 31
    GREEN           = 32
    YELLOW          = 33
    BLUE            = 34
    MAGENTA         = 35
    CYAN            = 36
    WHITE           = 37
    RESET           = 39

    # These are fairly well supported, but not part of the standard.
    LIGHTBLACK_EX   = 90
    LIGHTRED_EX     = 91
    LIGHTGREEN_EX   = 92
    LIGHTYELLOW_EX  = 93
    LIGHTBLUE_EX    = 94
    LIGHTMAGENTA_EX = 95
    LIGHTCYAN_EX    = 96
    LIGHTWHITE_EX   = 97


class AnsiBack(AnsiCodes):
    BLACK           = 40
    RED             = 41
    GREEN           = 42
    YELLOW          = 43
    BLUE            = 44
    MAGENTA         = 45
    CYAN            = 46
    WHITE           = 47
    RESET           = 49

    # These are fairly well supported, but not part of the standard.
    LIGHTBLACK_EX   = 100
    LIGHTRED_EX     = 101
    LIGHTGREEN_EX   = 102
    LIGHTYELLOW_EX  = 103
    LIGHTBLUE_EX    = 104
    LIGHTMAGENTA_EX = 105
    LIGHTCYAN_EX    = 106
    LIGHTWHITE_EX   = 107


class AnsiStyle(AnsiCodes):
    BRIGHT    = 1
    DIM       = 2
    NORMAL    = 22
    RESET_ALL = 0

Fore   = AnsiFore()
Back   = AnsiBack()
Style  = AnsiStyle()
Cursor = AnsiCursor()
python3.12/site-packages/pip/_vendor/chardet/gb2312prober.py000064400000003337151732703200017441 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .chardistribution import GB2312DistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import GB2312_SM_MODEL


class GB2312Prober(MultiByteCharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(GB2312_SM_MODEL)
        self.distribution_analyzer = GB2312DistributionAnalysis()
        self.reset()

    @property
    def charset_name(self) -> str:
        return "GB2312"

    @property
    def language(self) -> str:
        return "Chinese"
python3.12/site-packages/pip/_vendor/chardet/langgreekmodel.py000064400000300264151732703200020306 0ustar00from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel

# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative

GREEK_LANG_MODEL = {
    60: {  # 'e'
        60: 2,  # 'e'
        55: 1,  # 'o'
        58: 2,  # 't'
        36: 1,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 1,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    55: {  # 'o'
        60: 0,  # 'e'
        55: 2,  # 'o'
        58: 2,  # 't'
        36: 1,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 1,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 1,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    58: {  # 't'
        60: 2,  # 'e'
        55: 1,  # 'o'
        58: 1,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 1,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    36: {  # '·'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    61: {  # 'Ά'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 1,  # 'γ'
        21: 2,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 1,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    46: {  # 'Έ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 2,  # 'β'
        20: 2,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 2,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 3,  # 'ν'
        30: 2,  # 'ξ'
        4: 0,  # 'ο'
        9: 2,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 1,  # 'σ'
        2: 2,  # 'τ'
        12: 0,  # 'υ'
        28: 2,  # 'φ'
        23: 3,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    54: {  # 'Ό'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 2,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 2,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 2,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 2,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    31: {  # 'Α'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 2,  # 'Β'
        43: 2,  # 'Γ'
        41: 1,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 2,  # 'Θ'
        47: 2,  # 'Ι'
        44: 2,  # 'Κ'
        53: 2,  # 'Λ'
        38: 2,  # 'Μ'
        49: 2,  # 'Ν'
        59: 1,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 2,  # 'Π'
        48: 2,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 2,  # 'Τ'
        45: 2,  # 'Υ'
        56: 2,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 2,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 1,  # 'θ'
        5: 0,  # 'ι'
        11: 2,  # 'κ'
        16: 3,  # 'λ'
        10: 2,  # 'μ'
        6: 3,  # 'ν'
        30: 2,  # 'ξ'
        4: 0,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 2,  # 'ς'
        7: 2,  # 'σ'
        2: 0,  # 'τ'
        12: 3,  # 'υ'
        28: 2,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 2,  # 'ύ'
        27: 0,  # 'ώ'
    },
    51: {  # 'Β'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 1,  # 'Ε'
        40: 1,  # 'Η'
        52: 0,  # 'Θ'
        47: 1,  # 'Ι'
        44: 0,  # 'Κ'
        53: 1,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 2,  # 'έ'
        22: 2,  # 'ή'
        15: 0,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    43: {  # 'Γ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 1,  # 'Α'
        51: 0,  # 'Β'
        43: 2,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 1,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 1,  # 'Κ'
        53: 1,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 1,  # 'Ο'
        35: 0,  # 'Π'
        48: 2,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 2,  # 'Υ'
        56: 0,  # 'Φ'
        50: 1,  # 'Χ'
        57: 2,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 2,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    41: {  # 'Δ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 2,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 2,  # 'ή'
        15: 2,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 2,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 2,  # 'ω'
        19: 1,  # 'ό'
        26: 2,  # 'ύ'
        27: 2,  # 'ώ'
    },
    34: {  # 'Ε'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 2,  # 'Γ'
        41: 2,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 2,  # 'Κ'
        53: 2,  # 'Λ'
        38: 2,  # 'Μ'
        49: 2,  # 'Ν'
        59: 1,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 2,  # 'Π'
        48: 2,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 2,  # 'Τ'
        45: 2,  # 'Υ'
        56: 0,  # 'Φ'
        50: 2,  # 'Χ'
        57: 2,  # 'Ω'
        17: 3,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 3,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 3,  # 'γ'
        21: 2,  # 'δ'
        3: 1,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 1,  # 'θ'
        5: 2,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 2,  # 'μ'
        6: 3,  # 'ν'
        30: 2,  # 'ξ'
        4: 0,  # 'ο'
        9: 3,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 2,  # 'σ'
        2: 2,  # 'τ'
        12: 2,  # 'υ'
        28: 2,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 1,  # 'ύ'
        27: 0,  # 'ώ'
    },
    40: {  # 'Η'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 1,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 2,  # 'Θ'
        47: 0,  # 'Ι'
        44: 2,  # 'Κ'
        53: 0,  # 'Λ'
        38: 2,  # 'Μ'
        49: 2,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 2,  # 'Π'
        48: 2,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 2,  # 'Τ'
        45: 1,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 1,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 1,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    52: {  # 'Θ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 1,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 1,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 2,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 2,  # 'ύ'
        27: 0,  # 'ώ'
    },
    47: {  # 'Ι'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 1,  # 'Β'
        43: 1,  # 'Γ'
        41: 2,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 2,  # 'Κ'
        53: 2,  # 'Λ'
        38: 2,  # 'Μ'
        49: 2,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 2,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 2,  # 'Τ'
        45: 0,  # 'Υ'
        56: 2,  # 'Φ'
        50: 0,  # 'Χ'
        57: 2,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 2,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 1,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 2,  # 'σ'
        2: 1,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 1,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    44: {  # 'Κ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 1,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 1,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 2,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 1,  # 'Τ'
        45: 2,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 1,  # 'Ω'
        17: 3,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 2,  # 'ό'
        26: 2,  # 'ύ'
        27: 2,  # 'ώ'
    },
    53: {  # 'Λ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 0,  # 'Κ'
        53: 2,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 0,  # 'Τ'
        45: 2,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 2,  # 'Ω'
        17: 2,  # 'ά'
        18: 2,  # 'έ'
        22: 0,  # 'ή'
        15: 2,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 1,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 2,  # 'ό'
        26: 2,  # 'ύ'
        27: 0,  # 'ώ'
    },
    38: {  # 'Μ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 2,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 2,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 2,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 2,  # 'έ'
        22: 2,  # 'ή'
        15: 2,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 2,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 3,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 2,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    49: {  # 'Ν'
        60: 2,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 2,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 2,  # 'Ω'
        17: 0,  # 'ά'
        18: 2,  # 'έ'
        22: 0,  # 'ή'
        15: 2,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 1,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 1,  # 'ω'
        19: 2,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    59: {  # 'Ξ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 1,  # 'Ε'
        40: 1,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 1,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 2,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    39: {  # 'Ο'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 1,  # 'Β'
        43: 2,  # 'Γ'
        41: 2,  # 'Δ'
        34: 2,  # 'Ε'
        40: 1,  # 'Η'
        52: 2,  # 'Θ'
        47: 2,  # 'Ι'
        44: 2,  # 'Κ'
        53: 2,  # 'Λ'
        38: 2,  # 'Μ'
        49: 2,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 2,  # 'Π'
        48: 2,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 2,  # 'Τ'
        45: 2,  # 'Υ'
        56: 2,  # 'Φ'
        50: 2,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 2,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 2,  # 'κ'
        16: 2,  # 'λ'
        10: 2,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 2,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 2,  # 'τ'
        12: 2,  # 'υ'
        28: 1,  # 'φ'
        23: 1,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 2,  # 'ύ'
        27: 0,  # 'ώ'
    },
    35: {  # 'Π'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 0,  # 'Κ'
        53: 2,  # 'Λ'
        38: 1,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 2,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 1,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 1,  # 'Χ'
        57: 2,  # 'Ω'
        17: 2,  # 'ά'
        18: 1,  # 'έ'
        22: 1,  # 'ή'
        15: 2,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 2,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 2,  # 'χ'
        42: 0,  # 'ψ'
        24: 2,  # 'ω'
        19: 2,  # 'ό'
        26: 0,  # 'ύ'
        27: 3,  # 'ώ'
    },
    48: {  # 'Ρ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 1,  # 'Γ'
        41: 1,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 2,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 2,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 1,  # 'Τ'
        45: 1,  # 'Υ'
        56: 0,  # 'Φ'
        50: 1,  # 'Χ'
        57: 1,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 2,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 1,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 3,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 2,  # 'ω'
        19: 0,  # 'ό'
        26: 2,  # 'ύ'
        27: 0,  # 'ώ'
    },
    37: {  # 'Σ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 1,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 2,  # 'Κ'
        53: 0,  # 'Λ'
        38: 2,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 2,  # 'Τ'
        45: 2,  # 'Υ'
        56: 0,  # 'Φ'
        50: 2,  # 'Χ'
        57: 2,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 2,  # 'ή'
        15: 2,  # 'ί'
        1: 2,  # 'α'
        29: 2,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 2,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 2,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 0,  # 'φ'
        23: 2,  # 'χ'
        42: 0,  # 'ψ'
        24: 2,  # 'ω'
        19: 0,  # 'ό'
        26: 2,  # 'ύ'
        27: 2,  # 'ώ'
    },
    33: {  # 'Τ'
        60: 0,  # 'e'
        55: 1,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 2,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 2,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 2,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 1,  # 'Τ'
        45: 1,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 2,  # 'Ω'
        17: 2,  # 'ά'
        18: 2,  # 'έ'
        22: 0,  # 'ή'
        15: 2,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 2,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 2,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 2,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 2,  # 'ό'
        26: 2,  # 'ύ'
        27: 3,  # 'ώ'
    },
    45: {  # 'Υ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 2,  # 'Γ'
        41: 0,  # 'Δ'
        34: 1,  # 'Ε'
        40: 2,  # 'Η'
        52: 2,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 1,  # 'Λ'
        38: 2,  # 'Μ'
        49: 2,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 2,  # 'Π'
        48: 1,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 2,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 1,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 3,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    56: {  # 'Φ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 1,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 1,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 2,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 2,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 1,  # 'ύ'
        27: 1,  # 'ώ'
    },
    50: {  # 'Χ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 1,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 2,  # 'Ε'
        40: 2,  # 'Η'
        52: 0,  # 'Θ'
        47: 2,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 1,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 1,  # 'Ο'
        35: 0,  # 'Π'
        48: 2,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 1,  # 'Χ'
        57: 1,  # 'Ω'
        17: 2,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 2,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 2,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 2,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    57: {  # 'Ω'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 1,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 1,  # 'Λ'
        38: 0,  # 'Μ'
        49: 2,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 2,  # 'Ρ'
        37: 2,  # 'Σ'
        33: 2,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 2,  # 'ρ'
        14: 2,  # 'ς'
        7: 2,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 1,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    17: {  # 'ά'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 2,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 3,  # 'β'
        20: 3,  # 'γ'
        21: 3,  # 'δ'
        3: 3,  # 'ε'
        32: 3,  # 'ζ'
        13: 0,  # 'η'
        25: 3,  # 'θ'
        5: 2,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 3,  # 'ξ'
        4: 0,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 3,  # 'φ'
        23: 3,  # 'χ'
        42: 3,  # 'ψ'
        24: 2,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    18: {  # 'έ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 3,  # 'α'
        29: 2,  # 'β'
        20: 3,  # 'γ'
        21: 2,  # 'δ'
        3: 3,  # 'ε'
        32: 2,  # 'ζ'
        13: 0,  # 'η'
        25: 3,  # 'θ'
        5: 0,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 3,  # 'ξ'
        4: 3,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 3,  # 'φ'
        23: 3,  # 'χ'
        42: 3,  # 'ψ'
        24: 2,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    22: {  # 'ή'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 1,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 3,  # 'γ'
        21: 3,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 3,  # 'θ'
        5: 0,  # 'ι'
        11: 3,  # 'κ'
        16: 2,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 2,  # 'ξ'
        4: 0,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 2,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    15: {  # 'ί'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 3,  # 'α'
        29: 2,  # 'β'
        20: 3,  # 'γ'
        21: 3,  # 'δ'
        3: 3,  # 'ε'
        32: 3,  # 'ζ'
        13: 3,  # 'η'
        25: 3,  # 'θ'
        5: 0,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 3,  # 'ξ'
        4: 3,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 1,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 3,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    1: {  # 'α'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 2,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 2,  # 'έ'
        22: 0,  # 'ή'
        15: 3,  # 'ί'
        1: 0,  # 'α'
        29: 3,  # 'β'
        20: 3,  # 'γ'
        21: 3,  # 'δ'
        3: 2,  # 'ε'
        32: 3,  # 'ζ'
        13: 1,  # 'η'
        25: 3,  # 'θ'
        5: 3,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 3,  # 'ξ'
        4: 2,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 3,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 0,  # 'ω'
        19: 2,  # 'ό'
        26: 2,  # 'ύ'
        27: 0,  # 'ώ'
    },
    29: {  # 'β'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 2,  # 'έ'
        22: 3,  # 'ή'
        15: 2,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 2,  # 'γ'
        21: 2,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 2,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 3,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 2,  # 'ω'
        19: 2,  # 'ό'
        26: 2,  # 'ύ'
        27: 2,  # 'ώ'
    },
    20: {  # 'γ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 3,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 3,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 3,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 2,  # 'ύ'
        27: 3,  # 'ώ'
    },
    21: {  # 'δ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 3,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 3,  # 'ώ'
    },
    3: {  # 'ε'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 2,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 3,  # 'ί'
        1: 2,  # 'α'
        29: 3,  # 'β'
        20: 3,  # 'γ'
        21: 3,  # 'δ'
        3: 2,  # 'ε'
        32: 2,  # 'ζ'
        13: 0,  # 'η'
        25: 3,  # 'θ'
        5: 3,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 3,  # 'ξ'
        4: 2,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 3,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 3,  # 'ω'
        19: 2,  # 'ό'
        26: 3,  # 'ύ'
        27: 2,  # 'ώ'
    },
    32: {  # 'ζ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 2,  # 'έ'
        22: 2,  # 'ή'
        15: 2,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 1,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 2,  # 'ό'
        26: 0,  # 'ύ'
        27: 2,  # 'ώ'
    },
    13: {  # 'η'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 2,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 3,  # 'γ'
        21: 2,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 3,  # 'θ'
        5: 0,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 2,  # 'ξ'
        4: 0,  # 'ο'
        9: 2,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 2,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    25: {  # 'θ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 2,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 1,  # 'λ'
        10: 3,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 3,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 3,  # 'ώ'
    },
    5: {  # 'ι'
        60: 0,  # 'e'
        55: 1,  # 'o'
        58: 0,  # 't'
        36: 2,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 1,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 0,  # 'ί'
        1: 3,  # 'α'
        29: 3,  # 'β'
        20: 3,  # 'γ'
        21: 3,  # 'δ'
        3: 3,  # 'ε'
        32: 2,  # 'ζ'
        13: 3,  # 'η'
        25: 3,  # 'θ'
        5: 0,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 3,  # 'ξ'
        4: 3,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 2,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 0,  # 'ύ'
        27: 3,  # 'ώ'
    },
    11: {  # 'κ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 3,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 2,  # 'θ'
        5: 3,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 2,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 2,  # 'φ'
        23: 2,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 3,  # 'ώ'
    },
    16: {  # 'λ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 1,  # 'β'
        20: 2,  # 'γ'
        21: 1,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 2,  # 'θ'
        5: 3,  # 'ι'
        11: 2,  # 'κ'
        16: 3,  # 'λ'
        10: 2,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 3,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 2,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 3,  # 'ώ'
    },
    10: {  # 'μ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 1,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 3,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 3,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 2,  # 'υ'
        28: 3,  # 'φ'
        23: 0,  # 'χ'
        42: 2,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 2,  # 'ύ'
        27: 2,  # 'ώ'
    },
    6: {  # 'ν'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 2,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 3,  # 'δ'
        3: 3,  # 'ε'
        32: 2,  # 'ζ'
        13: 3,  # 'η'
        25: 3,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 1,  # 'λ'
        10: 0,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 3,  # 'ώ'
    },
    30: {  # 'ξ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 2,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 3,  # 'τ'
        12: 2,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 2,  # 'ό'
        26: 3,  # 'ύ'
        27: 1,  # 'ώ'
    },
    4: {  # 'ο'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 2,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 2,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 2,  # 'α'
        29: 3,  # 'β'
        20: 3,  # 'γ'
        21: 3,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 3,  # 'θ'
        5: 3,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 2,  # 'ξ'
        4: 2,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 3,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 2,  # 'ω'
        19: 1,  # 'ό'
        26: 3,  # 'ύ'
        27: 2,  # 'ώ'
    },
    9: {  # 'π'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 3,  # 'λ'
        10: 0,  # 'μ'
        6: 2,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 2,  # 'ς'
        7: 0,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 0,  # 'φ'
        23: 2,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 2,  # 'ύ'
        27: 3,  # 'ώ'
    },
    8: {  # 'ρ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 2,  # 'β'
        20: 3,  # 'γ'
        21: 2,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 3,  # 'θ'
        5: 3,  # 'ι'
        11: 3,  # 'κ'
        16: 1,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 2,  # 'ξ'
        4: 3,  # 'ο'
        9: 2,  # 'π'
        8: 2,  # 'ρ'
        14: 0,  # 'ς'
        7: 2,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 3,  # 'φ'
        23: 3,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 3,  # 'ώ'
    },
    14: {  # 'ς'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 2,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 0,  # 'θ'
        5: 0,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 0,  # 'τ'
        12: 0,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    7: {  # 'σ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 2,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 3,  # 'β'
        20: 0,  # 'γ'
        21: 2,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 3,  # 'θ'
        5: 3,  # 'ι'
        11: 3,  # 'κ'
        16: 2,  # 'λ'
        10: 3,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 3,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 3,  # 'φ'
        23: 3,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 2,  # 'ώ'
    },
    2: {  # 'τ'
        60: 0,  # 'e'
        55: 2,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 2,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 3,  # 'ι'
        11: 2,  # 'κ'
        16: 2,  # 'λ'
        10: 3,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 2,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 3,  # 'ώ'
    },
    12: {  # 'υ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 2,  # 'έ'
        22: 3,  # 'ή'
        15: 2,  # 'ί'
        1: 3,  # 'α'
        29: 2,  # 'β'
        20: 3,  # 'γ'
        21: 2,  # 'δ'
        3: 2,  # 'ε'
        32: 2,  # 'ζ'
        13: 2,  # 'η'
        25: 3,  # 'θ'
        5: 2,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 3,  # 'ξ'
        4: 3,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 2,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 2,  # 'ω'
        19: 2,  # 'ό'
        26: 0,  # 'ύ'
        27: 2,  # 'ώ'
    },
    28: {  # 'φ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 3,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 2,  # 'η'
        25: 2,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 0,  # 'μ'
        6: 1,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 1,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 2,  # 'ύ'
        27: 2,  # 'ώ'
    },
    23: {  # 'χ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 3,  # 'ά'
        18: 2,  # 'έ'
        22: 3,  # 'ή'
        15: 3,  # 'ί'
        1: 3,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 2,  # 'η'
        25: 2,  # 'θ'
        5: 3,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 2,  # 'μ'
        6: 3,  # 'ν'
        30: 0,  # 'ξ'
        4: 3,  # 'ο'
        9: 0,  # 'π'
        8: 3,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 3,  # 'τ'
        12: 3,  # 'υ'
        28: 0,  # 'φ'
        23: 2,  # 'χ'
        42: 0,  # 'ψ'
        24: 3,  # 'ω'
        19: 3,  # 'ό'
        26: 3,  # 'ύ'
        27: 3,  # 'ώ'
    },
    42: {  # 'ψ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 2,  # 'ά'
        18: 2,  # 'έ'
        22: 1,  # 'ή'
        15: 2,  # 'ί'
        1: 2,  # 'α'
        29: 0,  # 'β'
        20: 0,  # 'γ'
        21: 0,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 3,  # 'η'
        25: 0,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 0,  # 'λ'
        10: 0,  # 'μ'
        6: 0,  # 'ν'
        30: 0,  # 'ξ'
        4: 2,  # 'ο'
        9: 0,  # 'π'
        8: 0,  # 'ρ'
        14: 0,  # 'ς'
        7: 0,  # 'σ'
        2: 2,  # 'τ'
        12: 1,  # 'υ'
        28: 0,  # 'φ'
        23: 0,  # 'χ'
        42: 0,  # 'ψ'
        24: 2,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    24: {  # 'ω'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 1,  # 'ά'
        18: 0,  # 'έ'
        22: 2,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 2,  # 'β'
        20: 3,  # 'γ'
        21: 2,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 0,  # 'η'
        25: 3,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 0,  # 'ξ'
        4: 0,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 2,  # 'φ'
        23: 2,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    19: {  # 'ό'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 3,  # 'β'
        20: 3,  # 'γ'
        21: 3,  # 'δ'
        3: 1,  # 'ε'
        32: 2,  # 'ζ'
        13: 2,  # 'η'
        25: 2,  # 'θ'
        5: 2,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 1,  # 'ξ'
        4: 2,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 2,  # 'φ'
        23: 3,  # 'χ'
        42: 2,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    26: {  # 'ύ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 2,  # 'α'
        29: 2,  # 'β'
        20: 2,  # 'γ'
        21: 1,  # 'δ'
        3: 3,  # 'ε'
        32: 0,  # 'ζ'
        13: 2,  # 'η'
        25: 3,  # 'θ'
        5: 0,  # 'ι'
        11: 3,  # 'κ'
        16: 3,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 2,  # 'ξ'
        4: 3,  # 'ο'
        9: 3,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 2,  # 'φ'
        23: 2,  # 'χ'
        42: 2,  # 'ψ'
        24: 2,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
    27: {  # 'ώ'
        60: 0,  # 'e'
        55: 0,  # 'o'
        58: 0,  # 't'
        36: 0,  # '·'
        61: 0,  # 'Ά'
        46: 0,  # 'Έ'
        54: 0,  # 'Ό'
        31: 0,  # 'Α'
        51: 0,  # 'Β'
        43: 0,  # 'Γ'
        41: 0,  # 'Δ'
        34: 0,  # 'Ε'
        40: 0,  # 'Η'
        52: 0,  # 'Θ'
        47: 0,  # 'Ι'
        44: 0,  # 'Κ'
        53: 0,  # 'Λ'
        38: 0,  # 'Μ'
        49: 0,  # 'Ν'
        59: 0,  # 'Ξ'
        39: 0,  # 'Ο'
        35: 0,  # 'Π'
        48: 0,  # 'Ρ'
        37: 0,  # 'Σ'
        33: 0,  # 'Τ'
        45: 0,  # 'Υ'
        56: 0,  # 'Φ'
        50: 0,  # 'Χ'
        57: 0,  # 'Ω'
        17: 0,  # 'ά'
        18: 0,  # 'έ'
        22: 0,  # 'ή'
        15: 0,  # 'ί'
        1: 0,  # 'α'
        29: 1,  # 'β'
        20: 0,  # 'γ'
        21: 3,  # 'δ'
        3: 0,  # 'ε'
        32: 0,  # 'ζ'
        13: 1,  # 'η'
        25: 2,  # 'θ'
        5: 2,  # 'ι'
        11: 0,  # 'κ'
        16: 2,  # 'λ'
        10: 3,  # 'μ'
        6: 3,  # 'ν'
        30: 1,  # 'ξ'
        4: 0,  # 'ο'
        9: 2,  # 'π'
        8: 3,  # 'ρ'
        14: 3,  # 'ς'
        7: 3,  # 'σ'
        2: 3,  # 'τ'
        12: 0,  # 'υ'
        28: 1,  # 'φ'
        23: 1,  # 'χ'
        42: 0,  # 'ψ'
        24: 0,  # 'ω'
        19: 0,  # 'ό'
        26: 0,  # 'ύ'
        27: 0,  # 'ώ'
    },
}

# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters

# Character Mapping Table(s):
WINDOWS_1253_GREEK_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 82,  # 'A'
    66: 100,  # 'B'
    67: 104,  # 'C'
    68: 94,  # 'D'
    69: 98,  # 'E'
    70: 101,  # 'F'
    71: 116,  # 'G'
    72: 102,  # 'H'
    73: 111,  # 'I'
    74: 187,  # 'J'
    75: 117,  # 'K'
    76: 92,  # 'L'
    77: 88,  # 'M'
    78: 113,  # 'N'
    79: 85,  # 'O'
    80: 79,  # 'P'
    81: 118,  # 'Q'
    82: 105,  # 'R'
    83: 83,  # 'S'
    84: 67,  # 'T'
    85: 114,  # 'U'
    86: 119,  # 'V'
    87: 95,  # 'W'
    88: 99,  # 'X'
    89: 109,  # 'Y'
    90: 188,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 72,  # 'a'
    98: 70,  # 'b'
    99: 80,  # 'c'
    100: 81,  # 'd'
    101: 60,  # 'e'
    102: 96,  # 'f'
    103: 93,  # 'g'
    104: 89,  # 'h'
    105: 68,  # 'i'
    106: 120,  # 'j'
    107: 97,  # 'k'
    108: 77,  # 'l'
    109: 86,  # 'm'
    110: 69,  # 'n'
    111: 55,  # 'o'
    112: 78,  # 'p'
    113: 115,  # 'q'
    114: 65,  # 'r'
    115: 66,  # 's'
    116: 58,  # 't'
    117: 76,  # 'u'
    118: 106,  # 'v'
    119: 103,  # 'w'
    120: 87,  # 'x'
    121: 107,  # 'y'
    122: 112,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 255,  # '€'
    129: 255,  # None
    130: 255,  # '‚'
    131: 255,  # 'ƒ'
    132: 255,  # '„'
    133: 255,  # '…'
    134: 255,  # '†'
    135: 255,  # '‡'
    136: 255,  # None
    137: 255,  # '‰'
    138: 255,  # None
    139: 255,  # '‹'
    140: 255,  # None
    141: 255,  # None
    142: 255,  # None
    143: 255,  # None
    144: 255,  # None
    145: 255,  # '‘'
    146: 255,  # '’'
    147: 255,  # '“'
    148: 255,  # '”'
    149: 255,  # '•'
    150: 255,  # '–'
    151: 255,  # '—'
    152: 255,  # None
    153: 255,  # '™'
    154: 255,  # None
    155: 255,  # '›'
    156: 255,  # None
    157: 255,  # None
    158: 255,  # None
    159: 255,  # None
    160: 253,  # '\xa0'
    161: 233,  # '΅'
    162: 61,  # 'Ά'
    163: 253,  # '£'
    164: 253,  # '¤'
    165: 253,  # '¥'
    166: 253,  # '¦'
    167: 253,  # '§'
    168: 253,  # '¨'
    169: 253,  # '©'
    170: 253,  # None
    171: 253,  # '«'
    172: 253,  # '¬'
    173: 74,  # '\xad'
    174: 253,  # '®'
    175: 253,  # '―'
    176: 253,  # '°'
    177: 253,  # '±'
    178: 253,  # '²'
    179: 253,  # '³'
    180: 247,  # '΄'
    181: 253,  # 'µ'
    182: 253,  # '¶'
    183: 36,  # '·'
    184: 46,  # 'Έ'
    185: 71,  # 'Ή'
    186: 73,  # 'Ί'
    187: 253,  # '»'
    188: 54,  # 'Ό'
    189: 253,  # '½'
    190: 108,  # 'Ύ'
    191: 123,  # 'Ώ'
    192: 110,  # 'ΐ'
    193: 31,  # 'Α'
    194: 51,  # 'Β'
    195: 43,  # 'Γ'
    196: 41,  # 'Δ'
    197: 34,  # 'Ε'
    198: 91,  # 'Ζ'
    199: 40,  # 'Η'
    200: 52,  # 'Θ'
    201: 47,  # 'Ι'
    202: 44,  # 'Κ'
    203: 53,  # 'Λ'
    204: 38,  # 'Μ'
    205: 49,  # 'Ν'
    206: 59,  # 'Ξ'
    207: 39,  # 'Ο'
    208: 35,  # 'Π'
    209: 48,  # 'Ρ'
    210: 250,  # None
    211: 37,  # 'Σ'
    212: 33,  # 'Τ'
    213: 45,  # 'Υ'
    214: 56,  # 'Φ'
    215: 50,  # 'Χ'
    216: 84,  # 'Ψ'
    217: 57,  # 'Ω'
    218: 120,  # 'Ϊ'
    219: 121,  # 'Ϋ'
    220: 17,  # 'ά'
    221: 18,  # 'έ'
    222: 22,  # 'ή'
    223: 15,  # 'ί'
    224: 124,  # 'ΰ'
    225: 1,  # 'α'
    226: 29,  # 'β'
    227: 20,  # 'γ'
    228: 21,  # 'δ'
    229: 3,  # 'ε'
    230: 32,  # 'ζ'
    231: 13,  # 'η'
    232: 25,  # 'θ'
    233: 5,  # 'ι'
    234: 11,  # 'κ'
    235: 16,  # 'λ'
    236: 10,  # 'μ'
    237: 6,  # 'ν'
    238: 30,  # 'ξ'
    239: 4,  # 'ο'
    240: 9,  # 'π'
    241: 8,  # 'ρ'
    242: 14,  # 'ς'
    243: 7,  # 'σ'
    244: 2,  # 'τ'
    245: 12,  # 'υ'
    246: 28,  # 'φ'
    247: 23,  # 'χ'
    248: 42,  # 'ψ'
    249: 24,  # 'ω'
    250: 64,  # 'ϊ'
    251: 75,  # 'ϋ'
    252: 19,  # 'ό'
    253: 26,  # 'ύ'
    254: 27,  # 'ώ'
    255: 253,  # None
}

WINDOWS_1253_GREEK_MODEL = SingleByteCharSetModel(
    charset_name="windows-1253",
    language="Greek",
    char_to_order_map=WINDOWS_1253_GREEK_CHAR_TO_ORDER,
    language_model=GREEK_LANG_MODEL,
    typical_positive_ratio=0.982851,
    keep_ascii_letters=False,
    alphabet="ΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩάέήίαβγδεζηθικλμνξοπρςστυφχψωόύώ",
)

ISO_8859_7_GREEK_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 82,  # 'A'
    66: 100,  # 'B'
    67: 104,  # 'C'
    68: 94,  # 'D'
    69: 98,  # 'E'
    70: 101,  # 'F'
    71: 116,  # 'G'
    72: 102,  # 'H'
    73: 111,  # 'I'
    74: 187,  # 'J'
    75: 117,  # 'K'
    76: 92,  # 'L'
    77: 88,  # 'M'
    78: 113,  # 'N'
    79: 85,  # 'O'
    80: 79,  # 'P'
    81: 118,  # 'Q'
    82: 105,  # 'R'
    83: 83,  # 'S'
    84: 67,  # 'T'
    85: 114,  # 'U'
    86: 119,  # 'V'
    87: 95,  # 'W'
    88: 99,  # 'X'
    89: 109,  # 'Y'
    90: 188,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 72,  # 'a'
    98: 70,  # 'b'
    99: 80,  # 'c'
    100: 81,  # 'd'
    101: 60,  # 'e'
    102: 96,  # 'f'
    103: 93,  # 'g'
    104: 89,  # 'h'
    105: 68,  # 'i'
    106: 120,  # 'j'
    107: 97,  # 'k'
    108: 77,  # 'l'
    109: 86,  # 'm'
    110: 69,  # 'n'
    111: 55,  # 'o'
    112: 78,  # 'p'
    113: 115,  # 'q'
    114: 65,  # 'r'
    115: 66,  # 's'
    116: 58,  # 't'
    117: 76,  # 'u'
    118: 106,  # 'v'
    119: 103,  # 'w'
    120: 87,  # 'x'
    121: 107,  # 'y'
    122: 112,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 255,  # '\x80'
    129: 255,  # '\x81'
    130: 255,  # '\x82'
    131: 255,  # '\x83'
    132: 255,  # '\x84'
    133: 255,  # '\x85'
    134: 255,  # '\x86'
    135: 255,  # '\x87'
    136: 255,  # '\x88'
    137: 255,  # '\x89'
    138: 255,  # '\x8a'
    139: 255,  # '\x8b'
    140: 255,  # '\x8c'
    141: 255,  # '\x8d'
    142: 255,  # '\x8e'
    143: 255,  # '\x8f'
    144: 255,  # '\x90'
    145: 255,  # '\x91'
    146: 255,  # '\x92'
    147: 255,  # '\x93'
    148: 255,  # '\x94'
    149: 255,  # '\x95'
    150: 255,  # '\x96'
    151: 255,  # '\x97'
    152: 255,  # '\x98'
    153: 255,  # '\x99'
    154: 255,  # '\x9a'
    155: 255,  # '\x9b'
    156: 255,  # '\x9c'
    157: 255,  # '\x9d'
    158: 255,  # '\x9e'
    159: 255,  # '\x9f'
    160: 253,  # '\xa0'
    161: 233,  # '‘'
    162: 90,  # '’'
    163: 253,  # '£'
    164: 253,  # '€'
    165: 253,  # '₯'
    166: 253,  # '¦'
    167: 253,  # '§'
    168: 253,  # '¨'
    169: 253,  # '©'
    170: 253,  # 'ͺ'
    171: 253,  # '«'
    172: 253,  # '¬'
    173: 74,  # '\xad'
    174: 253,  # None
    175: 253,  # '―'
    176: 253,  # '°'
    177: 253,  # '±'
    178: 253,  # '²'
    179: 253,  # '³'
    180: 247,  # '΄'
    181: 248,  # '΅'
    182: 61,  # 'Ά'
    183: 36,  # '·'
    184: 46,  # 'Έ'
    185: 71,  # 'Ή'
    186: 73,  # 'Ί'
    187: 253,  # '»'
    188: 54,  # 'Ό'
    189: 253,  # '½'
    190: 108,  # 'Ύ'
    191: 123,  # 'Ώ'
    192: 110,  # 'ΐ'
    193: 31,  # 'Α'
    194: 51,  # 'Β'
    195: 43,  # 'Γ'
    196: 41,  # 'Δ'
    197: 34,  # 'Ε'
    198: 91,  # 'Ζ'
    199: 40,  # 'Η'
    200: 52,  # 'Θ'
    201: 47,  # 'Ι'
    202: 44,  # 'Κ'
    203: 53,  # 'Λ'
    204: 38,  # 'Μ'
    205: 49,  # 'Ν'
    206: 59,  # 'Ξ'
    207: 39,  # 'Ο'
    208: 35,  # 'Π'
    209: 48,  # 'Ρ'
    210: 250,  # None
    211: 37,  # 'Σ'
    212: 33,  # 'Τ'
    213: 45,  # 'Υ'
    214: 56,  # 'Φ'
    215: 50,  # 'Χ'
    216: 84,  # 'Ψ'
    217: 57,  # 'Ω'
    218: 120,  # 'Ϊ'
    219: 121,  # 'Ϋ'
    220: 17,  # 'ά'
    221: 18,  # 'έ'
    222: 22,  # 'ή'
    223: 15,  # 'ί'
    224: 124,  # 'ΰ'
    225: 1,  # 'α'
    226: 29,  # 'β'
    227: 20,  # 'γ'
    228: 21,  # 'δ'
    229: 3,  # 'ε'
    230: 32,  # 'ζ'
    231: 13,  # 'η'
    232: 25,  # 'θ'
    233: 5,  # 'ι'
    234: 11,  # 'κ'
    235: 16,  # 'λ'
    236: 10,  # 'μ'
    237: 6,  # 'ν'
    238: 30,  # 'ξ'
    239: 4,  # 'ο'
    240: 9,  # 'π'
    241: 8,  # 'ρ'
    242: 14,  # 'ς'
    243: 7,  # 'σ'
    244: 2,  # 'τ'
    245: 12,  # 'υ'
    246: 28,  # 'φ'
    247: 23,  # 'χ'
    248: 42,  # 'ψ'
    249: 24,  # 'ω'
    250: 64,  # 'ϊ'
    251: 75,  # 'ϋ'
    252: 19,  # 'ό'
    253: 26,  # 'ύ'
    254: 27,  # 'ώ'
    255: 253,  # None
}

ISO_8859_7_GREEK_MODEL = SingleByteCharSetModel(
    charset_name="ISO-8859-7",
    language="Greek",
    char_to_order_map=ISO_8859_7_GREEK_CHAR_TO_ORDER,
    language_model=GREEK_LANG_MODEL,
    typical_positive_ratio=0.982851,
    keep_ascii_letters=False,
    alphabet="ΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩάέήίαβγδεζηθικλμνξοπρςστυφχψωόύώ",
)
python3.12/site-packages/pip/_vendor/chardet/langrussianmodel.py000064400000372043151732703200020701 0ustar00from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel

# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative

RUSSIAN_LANG_MODEL = {
    37: {  # 'А'
        37: 0,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 1,  # 'Ж'
        51: 1,  # 'З'
        42: 1,  # 'И'
        60: 1,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 2,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 1,  # 'Ф'
        55: 1,  # 'Х'
        58: 1,  # 'Ц'
        50: 1,  # 'Ч'
        57: 1,  # 'Ш'
        63: 1,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 1,  # 'Ю'
        43: 1,  # 'Я'
        3: 1,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 2,  # 'г'
        13: 2,  # 'д'
        2: 0,  # 'е'
        24: 1,  # 'ж'
        20: 1,  # 'з'
        4: 0,  # 'и'
        23: 1,  # 'й'
        11: 2,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 2,  # 'н'
        1: 0,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 2,  # 'у'
        39: 2,  # 'ф'
        26: 2,  # 'х'
        28: 0,  # 'ц'
        22: 1,  # 'ч'
        25: 2,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 1,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    44: {  # 'Б'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 1,  # 'Я'
        3: 2,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 1,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 2,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 2,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    33: {  # 'В'
        37: 2,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 0,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 1,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 1,  # 'Я'
        3: 2,  # 'а'
        21: 1,  # 'б'
        10: 1,  # 'в'
        19: 1,  # 'г'
        13: 2,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 2,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 1,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 2,  # 'н'
        1: 3,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 3,  # 'с'
        6: 2,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 1,  # 'х'
        28: 1,  # 'ц'
        22: 2,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 1,  # 'ъ'
        18: 3,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 0,  # 'ю'
        16: 1,  # 'я'
    },
    46: {  # 'Г'
        37: 1,  # 'А'
        44: 1,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 0,  # 'б'
        10: 1,  # 'в'
        19: 0,  # 'г'
        13: 2,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 1,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 1,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    41: {  # 'Д'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 2,  # 'Е'
        56: 1,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 0,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 1,  # 'Ц'
        50: 1,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 1,  # 'Я'
        3: 3,  # 'а'
        21: 0,  # 'б'
        10: 2,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 3,  # 'ж'
        20: 1,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 1,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    48: {  # 'Е'
        37: 1,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 1,  # 'Ж'
        51: 1,  # 'З'
        42: 1,  # 'И'
        60: 1,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 2,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 2,  # 'Р'
        32: 2,  # 'С'
        40: 1,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 1,  # 'Х'
        58: 1,  # 'Ц'
        50: 1,  # 'Ч'
        57: 1,  # 'Ш'
        63: 1,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 1,  # 'Я'
        3: 0,  # 'а'
        21: 0,  # 'б'
        10: 2,  # 'в'
        19: 2,  # 'г'
        13: 2,  # 'д'
        2: 2,  # 'е'
        24: 1,  # 'ж'
        20: 1,  # 'з'
        4: 0,  # 'и'
        23: 2,  # 'й'
        11: 1,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 1,  # 'н'
        1: 0,  # 'о'
        15: 1,  # 'п'
        9: 1,  # 'р'
        7: 3,  # 'с'
        6: 0,  # 'т'
        14: 0,  # 'у'
        39: 1,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 1,  # 'ш'
        29: 2,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    56: {  # 'Ж'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 1,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 1,  # 'б'
        10: 0,  # 'в'
        19: 1,  # 'г'
        13: 1,  # 'д'
        2: 2,  # 'е'
        24: 1,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 1,  # 'м'
        5: 0,  # 'н'
        1: 2,  # 'о'
        15: 0,  # 'п'
        9: 1,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 2,  # 'ю'
        16: 0,  # 'я'
    },
    51: {  # 'З'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 2,  # 'в'
        19: 0,  # 'г'
        13: 2,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 1,  # 'л'
        12: 1,  # 'м'
        5: 2,  # 'н'
        1: 2,  # 'о'
        15: 0,  # 'п'
        9: 1,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 1,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 1,  # 'я'
    },
    42: {  # 'И'
        37: 1,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 1,  # 'Д'
        48: 2,  # 'Е'
        56: 1,  # 'Ж'
        51: 1,  # 'З'
        42: 1,  # 'И'
        60: 1,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 2,  # 'С'
        40: 1,  # 'Т'
        52: 0,  # 'У'
        53: 1,  # 'Ф'
        55: 1,  # 'Х'
        58: 1,  # 'Ц'
        50: 1,  # 'Ч'
        57: 0,  # 'Ш'
        63: 1,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 1,  # 'Ю'
        43: 1,  # 'Я'
        3: 1,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 2,  # 'г'
        13: 2,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 2,  # 'з'
        4: 1,  # 'и'
        23: 0,  # 'й'
        11: 1,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 2,  # 'н'
        1: 1,  # 'о'
        15: 1,  # 'п'
        9: 2,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 1,  # 'у'
        39: 1,  # 'ф'
        26: 2,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 1,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    60: {  # 'Й'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 1,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 1,  # 'Х'
        58: 1,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 0,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 1,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 0,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 2,  # 'о'
        15: 0,  # 'п'
        9: 0,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 0,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    36: {  # 'К'
        37: 2,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 1,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 1,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 2,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 1,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 0,  # 'б'
        10: 1,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 2,  # 'л'
        12: 0,  # 'м'
        5: 1,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    49: {  # 'Л'
        37: 2,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 1,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 1,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 0,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 0,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 1,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 0,  # 'Э'
        59: 1,  # 'Ю'
        43: 1,  # 'Я'
        3: 2,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 1,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 1,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 1,  # 'л'
        12: 0,  # 'м'
        5: 1,  # 'н'
        1: 2,  # 'о'
        15: 0,  # 'п'
        9: 0,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 2,  # 'ю'
        16: 1,  # 'я'
    },
    38: {  # 'М'
        37: 1,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 1,  # 'Ф'
        55: 1,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 0,  # 'Ь'
        47: 1,  # 'Э'
        59: 0,  # 'Ю'
        43: 1,  # 'Я'
        3: 3,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 1,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 1,  # 'л'
        12: 1,  # 'м'
        5: 2,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 1,  # 'р'
        7: 1,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 3,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    31: {  # 'Н'
        37: 2,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 1,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 1,  # 'З'
        42: 2,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 1,  # 'Ф'
        55: 1,  # 'Х'
        58: 1,  # 'Ц'
        50: 1,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 1,  # 'Э'
        59: 0,  # 'Ю'
        43: 1,  # 'Я'
        3: 3,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 1,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 3,  # 'у'
        39: 0,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 2,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    34: {  # 'О'
        37: 0,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 2,  # 'Д'
        48: 1,  # 'Е'
        56: 1,  # 'Ж'
        51: 1,  # 'З'
        42: 1,  # 'И'
        60: 1,  # 'Й'
        36: 1,  # 'К'
        49: 2,  # 'Л'
        38: 1,  # 'М'
        31: 2,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 2,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 1,  # 'Ф'
        55: 1,  # 'Х'
        58: 0,  # 'Ц'
        50: 1,  # 'Ч'
        57: 1,  # 'Ш'
        63: 1,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 1,  # 'Я'
        3: 1,  # 'а'
        21: 2,  # 'б'
        10: 1,  # 'в'
        19: 2,  # 'г'
        13: 2,  # 'д'
        2: 0,  # 'е'
        24: 1,  # 'ж'
        20: 1,  # 'з'
        4: 0,  # 'и'
        23: 1,  # 'й'
        11: 2,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 3,  # 'н'
        1: 0,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 1,  # 'у'
        39: 1,  # 'ф'
        26: 2,  # 'х'
        28: 1,  # 'ц'
        22: 2,  # 'ч'
        25: 2,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    35: {  # 'П'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 1,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 2,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 1,  # 'Я'
        3: 2,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 2,  # 'л'
        12: 0,  # 'м'
        5: 1,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 3,  # 'р'
        7: 1,  # 'с'
        6: 1,  # 'т'
        14: 2,  # 'у'
        39: 1,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 2,  # 'ь'
        30: 1,  # 'э'
        27: 0,  # 'ю'
        16: 2,  # 'я'
    },
    45: {  # 'Р'
        37: 2,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 1,  # 'Д'
        48: 2,  # 'Е'
        56: 1,  # 'Ж'
        51: 0,  # 'З'
        42: 2,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 2,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 1,  # 'Х'
        58: 1,  # 'Ц'
        50: 1,  # 'Ч'
        57: 1,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 1,  # 'Э'
        59: 1,  # 'Ю'
        43: 1,  # 'Я'
        3: 3,  # 'а'
        21: 0,  # 'б'
        10: 1,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 1,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 1,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 2,  # 'ы'
        17: 0,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 2,  # 'я'
    },
    32: {  # 'С'
        37: 1,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 2,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 1,  # 'Х'
        58: 1,  # 'Ц'
        50: 1,  # 'Ч'
        57: 1,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 1,  # 'Э'
        59: 1,  # 'Ю'
        43: 1,  # 'Я'
        3: 2,  # 'а'
        21: 1,  # 'б'
        10: 2,  # 'в'
        19: 1,  # 'г'
        13: 2,  # 'д'
        2: 3,  # 'е'
        24: 1,  # 'ж'
        20: 1,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 2,  # 'н'
        1: 2,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 1,  # 'с'
        6: 3,  # 'т'
        14: 2,  # 'у'
        39: 1,  # 'ф'
        26: 1,  # 'х'
        28: 1,  # 'ц'
        22: 1,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 1,  # 'ъ'
        18: 1,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    40: {  # 'Т'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 2,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 1,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 1,  # 'Ь'
        47: 1,  # 'Э'
        59: 1,  # 'Ю'
        43: 1,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 2,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 1,  # 'к'
        8: 1,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 1,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 3,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    52: {  # 'У'
        37: 1,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 1,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 1,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 1,  # 'Х'
        58: 0,  # 'Ц'
        50: 1,  # 'Ч'
        57: 1,  # 'Ш'
        63: 1,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 1,  # 'Ю'
        43: 0,  # 'Я'
        3: 1,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 1,  # 'г'
        13: 2,  # 'д'
        2: 1,  # 'е'
        24: 2,  # 'ж'
        20: 2,  # 'з'
        4: 2,  # 'и'
        23: 1,  # 'й'
        11: 1,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 1,  # 'н'
        1: 2,  # 'о'
        15: 1,  # 'п'
        9: 2,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 0,  # 'у'
        39: 1,  # 'ф'
        26: 1,  # 'х'
        28: 1,  # 'ц'
        22: 2,  # 'ч'
        25: 1,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    53: {  # 'Ф'
        37: 1,  # 'А'
        44: 1,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 1,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 2,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 2,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 0,  # 'с'
        6: 1,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    55: {  # 'Х'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 0,  # 'б'
        10: 2,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 0,  # 'н'
        1: 2,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 1,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 1,  # 'ь'
        30: 1,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    58: {  # 'Ц'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 1,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 1,  # 'а'
        21: 0,  # 'б'
        10: 1,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 0,  # 'о'
        15: 0,  # 'п'
        9: 0,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 1,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    50: {  # 'Ч'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 1,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 1,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 1,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 1,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 1,  # 'о'
        15: 0,  # 'п'
        9: 1,  # 'р'
        7: 0,  # 'с'
        6: 3,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 1,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    57: {  # 'Ш'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 1,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 0,  # 'б'
        10: 1,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 1,  # 'и'
        23: 0,  # 'й'
        11: 1,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 1,  # 'н'
        1: 2,  # 'о'
        15: 2,  # 'п'
        9: 1,  # 'р'
        7: 0,  # 'с'
        6: 2,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 1,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    63: {  # 'Щ'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 1,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 1,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 1,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 1,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 1,  # 'о'
        15: 0,  # 'п'
        9: 0,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 1,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    62: {  # 'Ы'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 1,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 1,  # 'Х'
        58: 1,  # 'Ц'
        50: 0,  # 'Ч'
        57: 1,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 0,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 0,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 0,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 0,  # 'о'
        15: 0,  # 'п'
        9: 0,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 0,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    61: {  # 'Ь'
        37: 0,  # 'А'
        44: 1,  # 'Б'
        33: 1,  # 'В'
        46: 0,  # 'Г'
        41: 1,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 0,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 1,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 1,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 1,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 1,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 1,  # 'Ю'
        43: 1,  # 'Я'
        3: 0,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 0,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 0,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 0,  # 'о'
        15: 0,  # 'п'
        9: 0,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 0,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    47: {  # 'Э'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 0,  # 'Г'
        41: 1,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 1,  # 'Й'
        36: 1,  # 'К'
        49: 1,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 1,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 1,  # 'а'
        21: 1,  # 'б'
        10: 2,  # 'в'
        19: 1,  # 'г'
        13: 2,  # 'д'
        2: 0,  # 'е'
        24: 1,  # 'ж'
        20: 0,  # 'з'
        4: 0,  # 'и'
        23: 2,  # 'й'
        11: 2,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 2,  # 'н'
        1: 0,  # 'о'
        15: 1,  # 'п'
        9: 2,  # 'р'
        7: 1,  # 'с'
        6: 3,  # 'т'
        14: 1,  # 'у'
        39: 1,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    59: {  # 'Ю'
        37: 1,  # 'А'
        44: 1,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 1,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 0,  # 'С'
        40: 1,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 1,  # 'Ч'
        57: 0,  # 'Ш'
        63: 1,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 0,  # 'а'
        21: 1,  # 'б'
        10: 0,  # 'в'
        19: 1,  # 'г'
        13: 1,  # 'д'
        2: 0,  # 'е'
        24: 1,  # 'ж'
        20: 0,  # 'з'
        4: 0,  # 'и'
        23: 0,  # 'й'
        11: 1,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 2,  # 'н'
        1: 0,  # 'о'
        15: 1,  # 'п'
        9: 1,  # 'р'
        7: 1,  # 'с'
        6: 0,  # 'т'
        14: 0,  # 'у'
        39: 0,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    43: {  # 'Я'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 1,  # 'В'
        46: 1,  # 'Г'
        41: 0,  # 'Д'
        48: 1,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 1,  # 'С'
        40: 1,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 1,  # 'Х'
        58: 0,  # 'Ц'
        50: 1,  # 'Ч'
        57: 0,  # 'Ш'
        63: 1,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 1,  # 'Ю'
        43: 1,  # 'Я'
        3: 0,  # 'а'
        21: 1,  # 'б'
        10: 1,  # 'в'
        19: 1,  # 'г'
        13: 1,  # 'д'
        2: 0,  # 'е'
        24: 0,  # 'ж'
        20: 1,  # 'з'
        4: 0,  # 'и'
        23: 1,  # 'й'
        11: 1,  # 'к'
        8: 1,  # 'л'
        12: 1,  # 'м'
        5: 2,  # 'н'
        1: 0,  # 'о'
        15: 1,  # 'п'
        9: 1,  # 'р'
        7: 1,  # 'с'
        6: 0,  # 'т'
        14: 0,  # 'у'
        39: 0,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 1,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    3: {  # 'а'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 1,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 3,  # 'б'
        10: 3,  # 'в'
        19: 3,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 3,  # 'ж'
        20: 3,  # 'з'
        4: 3,  # 'и'
        23: 3,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 2,  # 'о'
        15: 3,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 3,  # 'у'
        39: 2,  # 'ф'
        26: 3,  # 'х'
        28: 3,  # 'ц'
        22: 3,  # 'ч'
        25: 3,  # 'ш'
        29: 3,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 2,  # 'э'
        27: 3,  # 'ю'
        16: 3,  # 'я'
    },
    21: {  # 'б'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 1,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 1,  # 'г'
        13: 2,  # 'д'
        2: 3,  # 'е'
        24: 2,  # 'ж'
        20: 1,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 1,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 2,  # 'т'
        14: 3,  # 'у'
        39: 0,  # 'ф'
        26: 2,  # 'х'
        28: 1,  # 'ц'
        22: 1,  # 'ч'
        25: 2,  # 'ш'
        29: 3,  # 'щ'
        54: 2,  # 'ъ'
        18: 3,  # 'ы'
        17: 2,  # 'ь'
        30: 1,  # 'э'
        27: 2,  # 'ю'
        16: 3,  # 'я'
    },
    10: {  # 'в'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 2,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 1,  # 'ж'
        20: 3,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 3,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 3,  # 'у'
        39: 1,  # 'ф'
        26: 2,  # 'х'
        28: 2,  # 'ц'
        22: 2,  # 'ч'
        25: 3,  # 'ш'
        29: 2,  # 'щ'
        54: 2,  # 'ъ'
        18: 3,  # 'ы'
        17: 3,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 3,  # 'я'
    },
    19: {  # 'г'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 2,  # 'в'
        19: 1,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 1,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 3,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 3,  # 'у'
        39: 1,  # 'ф'
        26: 1,  # 'х'
        28: 1,  # 'ц'
        22: 2,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 1,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    13: {  # 'д'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 3,  # 'в'
        19: 2,  # 'г'
        13: 2,  # 'д'
        2: 3,  # 'е'
        24: 2,  # 'ж'
        20: 2,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 2,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 3,  # 'у'
        39: 1,  # 'ф'
        26: 2,  # 'х'
        28: 3,  # 'ц'
        22: 2,  # 'ч'
        25: 2,  # 'ш'
        29: 1,  # 'щ'
        54: 2,  # 'ъ'
        18: 3,  # 'ы'
        17: 3,  # 'ь'
        30: 1,  # 'э'
        27: 2,  # 'ю'
        16: 3,  # 'я'
    },
    2: {  # 'е'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 3,  # 'б'
        10: 3,  # 'в'
        19: 3,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 3,  # 'ж'
        20: 3,  # 'з'
        4: 2,  # 'и'
        23: 3,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 3,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 2,  # 'у'
        39: 2,  # 'ф'
        26: 3,  # 'х'
        28: 3,  # 'ц'
        22: 3,  # 'ч'
        25: 3,  # 'ш'
        29: 3,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 1,  # 'э'
        27: 2,  # 'ю'
        16: 3,  # 'я'
    },
    24: {  # 'ж'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 1,  # 'в'
        19: 2,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 2,  # 'ж'
        20: 1,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 3,  # 'н'
        1: 2,  # 'о'
        15: 1,  # 'п'
        9: 2,  # 'р'
        7: 2,  # 'с'
        6: 1,  # 'т'
        14: 3,  # 'у'
        39: 1,  # 'ф'
        26: 0,  # 'х'
        28: 1,  # 'ц'
        22: 2,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 2,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    20: {  # 'з'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 3,  # 'б'
        10: 3,  # 'в'
        19: 3,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 2,  # 'ж'
        20: 2,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 3,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 3,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 1,  # 'ц'
        22: 2,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 2,  # 'ъ'
        18: 3,  # 'ы'
        17: 2,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 3,  # 'я'
    },
    4: {  # 'и'
        37: 1,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 3,  # 'б'
        10: 3,  # 'в'
        19: 3,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 3,  # 'ж'
        20: 3,  # 'з'
        4: 3,  # 'и'
        23: 3,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 3,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 2,  # 'у'
        39: 2,  # 'ф'
        26: 3,  # 'х'
        28: 3,  # 'ц'
        22: 3,  # 'ч'
        25: 3,  # 'ш'
        29: 3,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 2,  # 'э'
        27: 3,  # 'ю'
        16: 3,  # 'я'
    },
    23: {  # 'й'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 1,  # 'а'
        21: 1,  # 'б'
        10: 1,  # 'в'
        19: 2,  # 'г'
        13: 3,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 2,  # 'з'
        4: 1,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 2,  # 'о'
        15: 1,  # 'п'
        9: 2,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 1,  # 'у'
        39: 2,  # 'ф'
        26: 1,  # 'х'
        28: 2,  # 'ц'
        22: 3,  # 'ч'
        25: 2,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 2,  # 'я'
    },
    11: {  # 'к'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 3,  # 'в'
        19: 1,  # 'г'
        13: 1,  # 'д'
        2: 3,  # 'е'
        24: 2,  # 'ж'
        20: 2,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 3,  # 'л'
        12: 1,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 3,  # 'у'
        39: 1,  # 'ф'
        26: 2,  # 'х'
        28: 2,  # 'ц'
        22: 1,  # 'ч'
        25: 2,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 1,  # 'ы'
        17: 1,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    8: {  # 'л'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 3,  # 'г'
        13: 2,  # 'д'
        2: 3,  # 'е'
        24: 3,  # 'ж'
        20: 2,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 2,  # 'п'
        9: 1,  # 'р'
        7: 3,  # 'с'
        6: 2,  # 'т'
        14: 3,  # 'у'
        39: 2,  # 'ф'
        26: 2,  # 'х'
        28: 1,  # 'ц'
        22: 3,  # 'ч'
        25: 2,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 3,  # 'ы'
        17: 3,  # 'ь'
        30: 1,  # 'э'
        27: 3,  # 'ю'
        16: 3,  # 'я'
    },
    12: {  # 'м'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 2,  # 'г'
        13: 1,  # 'д'
        2: 3,  # 'е'
        24: 1,  # 'ж'
        20: 1,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 3,  # 'с'
        6: 2,  # 'т'
        14: 3,  # 'у'
        39: 2,  # 'ф'
        26: 2,  # 'х'
        28: 2,  # 'ц'
        22: 2,  # 'ч'
        25: 1,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 3,  # 'ы'
        17: 2,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 3,  # 'я'
    },
    5: {  # 'н'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 3,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 2,  # 'ж'
        20: 2,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 1,  # 'п'
        9: 2,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 3,  # 'у'
        39: 2,  # 'ф'
        26: 2,  # 'х'
        28: 3,  # 'ц'
        22: 3,  # 'ч'
        25: 2,  # 'ш'
        29: 2,  # 'щ'
        54: 1,  # 'ъ'
        18: 3,  # 'ы'
        17: 3,  # 'ь'
        30: 1,  # 'э'
        27: 3,  # 'ю'
        16: 3,  # 'я'
    },
    1: {  # 'о'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 3,  # 'б'
        10: 3,  # 'в'
        19: 3,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 3,  # 'ж'
        20: 3,  # 'з'
        4: 3,  # 'и'
        23: 3,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 3,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 2,  # 'у'
        39: 2,  # 'ф'
        26: 3,  # 'х'
        28: 2,  # 'ц'
        22: 3,  # 'ч'
        25: 3,  # 'ш'
        29: 3,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 2,  # 'э'
        27: 3,  # 'ю'
        16: 3,  # 'я'
    },
    15: {  # 'п'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 3,  # 'л'
        12: 1,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 2,  # 'п'
        9: 3,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 3,  # 'у'
        39: 1,  # 'ф'
        26: 0,  # 'х'
        28: 2,  # 'ц'
        22: 2,  # 'ч'
        25: 1,  # 'ш'
        29: 1,  # 'щ'
        54: 0,  # 'ъ'
        18: 3,  # 'ы'
        17: 2,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 3,  # 'я'
    },
    9: {  # 'р'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 3,  # 'в'
        19: 3,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 3,  # 'ж'
        20: 2,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 2,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 3,  # 'у'
        39: 2,  # 'ф'
        26: 3,  # 'х'
        28: 2,  # 'ц'
        22: 2,  # 'ч'
        25: 3,  # 'ш'
        29: 2,  # 'щ'
        54: 0,  # 'ъ'
        18: 3,  # 'ы'
        17: 3,  # 'ь'
        30: 2,  # 'э'
        27: 2,  # 'ю'
        16: 3,  # 'я'
    },
    7: {  # 'с'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 1,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 3,  # 'в'
        19: 2,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 2,  # 'ж'
        20: 2,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 3,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 3,  # 'у'
        39: 2,  # 'ф'
        26: 3,  # 'х'
        28: 2,  # 'ц'
        22: 3,  # 'ч'
        25: 2,  # 'ш'
        29: 1,  # 'щ'
        54: 2,  # 'ъ'
        18: 3,  # 'ы'
        17: 3,  # 'ь'
        30: 2,  # 'э'
        27: 3,  # 'ю'
        16: 3,  # 'я'
    },
    6: {  # 'т'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 2,  # 'б'
        10: 3,  # 'в'
        19: 2,  # 'г'
        13: 2,  # 'д'
        2: 3,  # 'е'
        24: 1,  # 'ж'
        20: 1,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 2,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 2,  # 'т'
        14: 3,  # 'у'
        39: 2,  # 'ф'
        26: 2,  # 'х'
        28: 2,  # 'ц'
        22: 2,  # 'ч'
        25: 2,  # 'ш'
        29: 2,  # 'щ'
        54: 2,  # 'ъ'
        18: 3,  # 'ы'
        17: 3,  # 'ь'
        30: 2,  # 'э'
        27: 2,  # 'ю'
        16: 3,  # 'я'
    },
    14: {  # 'у'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 3,  # 'б'
        10: 3,  # 'в'
        19: 3,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 3,  # 'ж'
        20: 3,  # 'з'
        4: 2,  # 'и'
        23: 2,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 2,  # 'о'
        15: 3,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 1,  # 'у'
        39: 2,  # 'ф'
        26: 3,  # 'х'
        28: 2,  # 'ц'
        22: 3,  # 'ч'
        25: 3,  # 'ш'
        29: 3,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 2,  # 'э'
        27: 3,  # 'ю'
        16: 2,  # 'я'
    },
    39: {  # 'ф'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 0,  # 'в'
        19: 1,  # 'г'
        13: 0,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 1,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 1,  # 'н'
        1: 3,  # 'о'
        15: 1,  # 'п'
        9: 2,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 2,  # 'у'
        39: 2,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 1,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 2,  # 'ы'
        17: 1,  # 'ь'
        30: 2,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    26: {  # 'х'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 0,  # 'б'
        10: 3,  # 'в'
        19: 1,  # 'г'
        13: 1,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 1,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 1,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 1,  # 'п'
        9: 3,  # 'р'
        7: 2,  # 'с'
        6: 2,  # 'т'
        14: 2,  # 'у'
        39: 1,  # 'ф'
        26: 1,  # 'х'
        28: 1,  # 'ц'
        22: 1,  # 'ч'
        25: 2,  # 'ш'
        29: 0,  # 'щ'
        54: 1,  # 'ъ'
        18: 0,  # 'ы'
        17: 1,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    28: {  # 'ц'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 2,  # 'в'
        19: 1,  # 'г'
        13: 1,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 1,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 2,  # 'к'
        8: 1,  # 'л'
        12: 1,  # 'м'
        5: 1,  # 'н'
        1: 3,  # 'о'
        15: 0,  # 'п'
        9: 1,  # 'р'
        7: 0,  # 'с'
        6: 1,  # 'т'
        14: 3,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 1,  # 'ц'
        22: 0,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 3,  # 'ы'
        17: 1,  # 'ь'
        30: 0,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    22: {  # 'ч'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 1,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 3,  # 'е'
        24: 1,  # 'ж'
        20: 0,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 2,  # 'л'
        12: 1,  # 'м'
        5: 3,  # 'н'
        1: 2,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 1,  # 'с'
        6: 3,  # 'т'
        14: 3,  # 'у'
        39: 1,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 1,  # 'ч'
        25: 2,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 3,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    25: {  # 'ш'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 1,  # 'б'
        10: 2,  # 'в'
        19: 1,  # 'г'
        13: 0,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 2,  # 'м'
        5: 3,  # 'н'
        1: 3,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 1,  # 'с'
        6: 2,  # 'т'
        14: 3,  # 'у'
        39: 2,  # 'ф'
        26: 1,  # 'х'
        28: 1,  # 'ц'
        22: 1,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 3,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 0,  # 'я'
    },
    29: {  # 'щ'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 3,  # 'а'
        21: 0,  # 'б'
        10: 1,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 3,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 3,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 1,  # 'м'
        5: 2,  # 'н'
        1: 1,  # 'о'
        15: 0,  # 'п'
        9: 2,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 2,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 2,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 0,  # 'я'
    },
    54: {  # 'ъ'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 0,  # 'а'
        21: 0,  # 'б'
        10: 0,  # 'в'
        19: 0,  # 'г'
        13: 0,  # 'д'
        2: 2,  # 'е'
        24: 0,  # 'ж'
        20: 0,  # 'з'
        4: 0,  # 'и'
        23: 0,  # 'й'
        11: 0,  # 'к'
        8: 0,  # 'л'
        12: 0,  # 'м'
        5: 0,  # 'н'
        1: 0,  # 'о'
        15: 0,  # 'п'
        9: 0,  # 'р'
        7: 0,  # 'с'
        6: 0,  # 'т'
        14: 0,  # 'у'
        39: 0,  # 'ф'
        26: 0,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 0,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 1,  # 'ю'
        16: 2,  # 'я'
    },
    18: {  # 'ы'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 0,  # 'а'
        21: 3,  # 'б'
        10: 3,  # 'в'
        19: 2,  # 'г'
        13: 2,  # 'д'
        2: 3,  # 'е'
        24: 2,  # 'ж'
        20: 2,  # 'з'
        4: 2,  # 'и'
        23: 3,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 1,  # 'о'
        15: 3,  # 'п'
        9: 3,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 1,  # 'у'
        39: 0,  # 'ф'
        26: 3,  # 'х'
        28: 2,  # 'ц'
        22: 3,  # 'ч'
        25: 3,  # 'ш'
        29: 2,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 0,  # 'ю'
        16: 2,  # 'я'
    },
    17: {  # 'ь'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 0,  # 'а'
        21: 2,  # 'б'
        10: 2,  # 'в'
        19: 2,  # 'г'
        13: 2,  # 'д'
        2: 3,  # 'е'
        24: 1,  # 'ж'
        20: 3,  # 'з'
        4: 2,  # 'и'
        23: 0,  # 'й'
        11: 3,  # 'к'
        8: 0,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 2,  # 'о'
        15: 2,  # 'п'
        9: 1,  # 'р'
        7: 3,  # 'с'
        6: 2,  # 'т'
        14: 0,  # 'у'
        39: 2,  # 'ф'
        26: 1,  # 'х'
        28: 2,  # 'ц'
        22: 2,  # 'ч'
        25: 3,  # 'ш'
        29: 2,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 1,  # 'э'
        27: 3,  # 'ю'
        16: 3,  # 'я'
    },
    30: {  # 'э'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 1,  # 'М'
        31: 1,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 1,  # 'Р'
        32: 1,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 1,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 0,  # 'а'
        21: 1,  # 'б'
        10: 1,  # 'в'
        19: 1,  # 'г'
        13: 2,  # 'д'
        2: 1,  # 'е'
        24: 0,  # 'ж'
        20: 1,  # 'з'
        4: 0,  # 'и'
        23: 2,  # 'й'
        11: 2,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 2,  # 'н'
        1: 0,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 2,  # 'с'
        6: 3,  # 'т'
        14: 1,  # 'у'
        39: 2,  # 'ф'
        26: 1,  # 'х'
        28: 0,  # 'ц'
        22: 0,  # 'ч'
        25: 1,  # 'ш'
        29: 0,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 1,  # 'э'
        27: 1,  # 'ю'
        16: 1,  # 'я'
    },
    27: {  # 'ю'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 2,  # 'а'
        21: 3,  # 'б'
        10: 1,  # 'в'
        19: 2,  # 'г'
        13: 3,  # 'д'
        2: 1,  # 'е'
        24: 2,  # 'ж'
        20: 2,  # 'з'
        4: 1,  # 'и'
        23: 1,  # 'й'
        11: 2,  # 'к'
        8: 2,  # 'л'
        12: 2,  # 'м'
        5: 2,  # 'н'
        1: 1,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 0,  # 'у'
        39: 1,  # 'ф'
        26: 2,  # 'х'
        28: 2,  # 'ц'
        22: 2,  # 'ч'
        25: 2,  # 'ш'
        29: 3,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 1,  # 'э'
        27: 2,  # 'ю'
        16: 1,  # 'я'
    },
    16: {  # 'я'
        37: 0,  # 'А'
        44: 0,  # 'Б'
        33: 0,  # 'В'
        46: 0,  # 'Г'
        41: 0,  # 'Д'
        48: 0,  # 'Е'
        56: 0,  # 'Ж'
        51: 0,  # 'З'
        42: 0,  # 'И'
        60: 0,  # 'Й'
        36: 0,  # 'К'
        49: 0,  # 'Л'
        38: 0,  # 'М'
        31: 0,  # 'Н'
        34: 0,  # 'О'
        35: 0,  # 'П'
        45: 0,  # 'Р'
        32: 0,  # 'С'
        40: 0,  # 'Т'
        52: 0,  # 'У'
        53: 0,  # 'Ф'
        55: 0,  # 'Х'
        58: 0,  # 'Ц'
        50: 0,  # 'Ч'
        57: 0,  # 'Ш'
        63: 0,  # 'Щ'
        62: 0,  # 'Ы'
        61: 0,  # 'Ь'
        47: 0,  # 'Э'
        59: 0,  # 'Ю'
        43: 0,  # 'Я'
        3: 0,  # 'а'
        21: 2,  # 'б'
        10: 3,  # 'в'
        19: 2,  # 'г'
        13: 3,  # 'д'
        2: 3,  # 'е'
        24: 3,  # 'ж'
        20: 3,  # 'з'
        4: 2,  # 'и'
        23: 2,  # 'й'
        11: 3,  # 'к'
        8: 3,  # 'л'
        12: 3,  # 'м'
        5: 3,  # 'н'
        1: 0,  # 'о'
        15: 2,  # 'п'
        9: 2,  # 'р'
        7: 3,  # 'с'
        6: 3,  # 'т'
        14: 1,  # 'у'
        39: 1,  # 'ф'
        26: 3,  # 'х'
        28: 2,  # 'ц'
        22: 2,  # 'ч'
        25: 2,  # 'ш'
        29: 3,  # 'щ'
        54: 0,  # 'ъ'
        18: 0,  # 'ы'
        17: 0,  # 'ь'
        30: 0,  # 'э'
        27: 2,  # 'ю'
        16: 2,  # 'я'
    },
}

# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters

# Character Mapping Table(s):
IBM866_RUSSIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 142,  # 'A'
    66: 143,  # 'B'
    67: 144,  # 'C'
    68: 145,  # 'D'
    69: 146,  # 'E'
    70: 147,  # 'F'
    71: 148,  # 'G'
    72: 149,  # 'H'
    73: 150,  # 'I'
    74: 151,  # 'J'
    75: 152,  # 'K'
    76: 74,  # 'L'
    77: 153,  # 'M'
    78: 75,  # 'N'
    79: 154,  # 'O'
    80: 155,  # 'P'
    81: 156,  # 'Q'
    82: 157,  # 'R'
    83: 158,  # 'S'
    84: 159,  # 'T'
    85: 160,  # 'U'
    86: 161,  # 'V'
    87: 162,  # 'W'
    88: 163,  # 'X'
    89: 164,  # 'Y'
    90: 165,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 71,  # 'a'
    98: 172,  # 'b'
    99: 66,  # 'c'
    100: 173,  # 'd'
    101: 65,  # 'e'
    102: 174,  # 'f'
    103: 76,  # 'g'
    104: 175,  # 'h'
    105: 64,  # 'i'
    106: 176,  # 'j'
    107: 177,  # 'k'
    108: 77,  # 'l'
    109: 72,  # 'm'
    110: 178,  # 'n'
    111: 69,  # 'o'
    112: 67,  # 'p'
    113: 179,  # 'q'
    114: 78,  # 'r'
    115: 73,  # 's'
    116: 180,  # 't'
    117: 181,  # 'u'
    118: 79,  # 'v'
    119: 182,  # 'w'
    120: 183,  # 'x'
    121: 184,  # 'y'
    122: 185,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 37,  # 'А'
    129: 44,  # 'Б'
    130: 33,  # 'В'
    131: 46,  # 'Г'
    132: 41,  # 'Д'
    133: 48,  # 'Е'
    134: 56,  # 'Ж'
    135: 51,  # 'З'
    136: 42,  # 'И'
    137: 60,  # 'Й'
    138: 36,  # 'К'
    139: 49,  # 'Л'
    140: 38,  # 'М'
    141: 31,  # 'Н'
    142: 34,  # 'О'
    143: 35,  # 'П'
    144: 45,  # 'Р'
    145: 32,  # 'С'
    146: 40,  # 'Т'
    147: 52,  # 'У'
    148: 53,  # 'Ф'
    149: 55,  # 'Х'
    150: 58,  # 'Ц'
    151: 50,  # 'Ч'
    152: 57,  # 'Ш'
    153: 63,  # 'Щ'
    154: 70,  # 'Ъ'
    155: 62,  # 'Ы'
    156: 61,  # 'Ь'
    157: 47,  # 'Э'
    158: 59,  # 'Ю'
    159: 43,  # 'Я'
    160: 3,  # 'а'
    161: 21,  # 'б'
    162: 10,  # 'в'
    163: 19,  # 'г'
    164: 13,  # 'д'
    165: 2,  # 'е'
    166: 24,  # 'ж'
    167: 20,  # 'з'
    168: 4,  # 'и'
    169: 23,  # 'й'
    170: 11,  # 'к'
    171: 8,  # 'л'
    172: 12,  # 'м'
    173: 5,  # 'н'
    174: 1,  # 'о'
    175: 15,  # 'п'
    176: 191,  # '░'
    177: 192,  # '▒'
    178: 193,  # '▓'
    179: 194,  # '│'
    180: 195,  # '┤'
    181: 196,  # '╡'
    182: 197,  # '╢'
    183: 198,  # '╖'
    184: 199,  # '╕'
    185: 200,  # '╣'
    186: 201,  # '║'
    187: 202,  # '╗'
    188: 203,  # '╝'
    189: 204,  # '╜'
    190: 205,  # '╛'
    191: 206,  # '┐'
    192: 207,  # '└'
    193: 208,  # '┴'
    194: 209,  # '┬'
    195: 210,  # '├'
    196: 211,  # '─'
    197: 212,  # '┼'
    198: 213,  # '╞'
    199: 214,  # '╟'
    200: 215,  # '╚'
    201: 216,  # '╔'
    202: 217,  # '╩'
    203: 218,  # '╦'
    204: 219,  # '╠'
    205: 220,  # '═'
    206: 221,  # '╬'
    207: 222,  # '╧'
    208: 223,  # '╨'
    209: 224,  # '╤'
    210: 225,  # '╥'
    211: 226,  # '╙'
    212: 227,  # '╘'
    213: 228,  # '╒'
    214: 229,  # '╓'
    215: 230,  # '╫'
    216: 231,  # '╪'
    217: 232,  # '┘'
    218: 233,  # '┌'
    219: 234,  # '█'
    220: 235,  # '▄'
    221: 236,  # '▌'
    222: 237,  # '▐'
    223: 238,  # '▀'
    224: 9,  # 'р'
    225: 7,  # 'с'
    226: 6,  # 'т'
    227: 14,  # 'у'
    228: 39,  # 'ф'
    229: 26,  # 'х'
    230: 28,  # 'ц'
    231: 22,  # 'ч'
    232: 25,  # 'ш'
    233: 29,  # 'щ'
    234: 54,  # 'ъ'
    235: 18,  # 'ы'
    236: 17,  # 'ь'
    237: 30,  # 'э'
    238: 27,  # 'ю'
    239: 16,  # 'я'
    240: 239,  # 'Ё'
    241: 68,  # 'ё'
    242: 240,  # 'Є'
    243: 241,  # 'є'
    244: 242,  # 'Ї'
    245: 243,  # 'ї'
    246: 244,  # 'Ў'
    247: 245,  # 'ў'
    248: 246,  # '°'
    249: 247,  # '∙'
    250: 248,  # '·'
    251: 249,  # '√'
    252: 250,  # '№'
    253: 251,  # '¤'
    254: 252,  # '■'
    255: 255,  # '\xa0'
}

IBM866_RUSSIAN_MODEL = SingleByteCharSetModel(
    charset_name="IBM866",
    language="Russian",
    char_to_order_map=IBM866_RUSSIAN_CHAR_TO_ORDER,
    language_model=RUSSIAN_LANG_MODEL,
    typical_positive_ratio=0.976601,
    keep_ascii_letters=False,
    alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)

WINDOWS_1251_RUSSIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 142,  # 'A'
    66: 143,  # 'B'
    67: 144,  # 'C'
    68: 145,  # 'D'
    69: 146,  # 'E'
    70: 147,  # 'F'
    71: 148,  # 'G'
    72: 149,  # 'H'
    73: 150,  # 'I'
    74: 151,  # 'J'
    75: 152,  # 'K'
    76: 74,  # 'L'
    77: 153,  # 'M'
    78: 75,  # 'N'
    79: 154,  # 'O'
    80: 155,  # 'P'
    81: 156,  # 'Q'
    82: 157,  # 'R'
    83: 158,  # 'S'
    84: 159,  # 'T'
    85: 160,  # 'U'
    86: 161,  # 'V'
    87: 162,  # 'W'
    88: 163,  # 'X'
    89: 164,  # 'Y'
    90: 165,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 71,  # 'a'
    98: 172,  # 'b'
    99: 66,  # 'c'
    100: 173,  # 'd'
    101: 65,  # 'e'
    102: 174,  # 'f'
    103: 76,  # 'g'
    104: 175,  # 'h'
    105: 64,  # 'i'
    106: 176,  # 'j'
    107: 177,  # 'k'
    108: 77,  # 'l'
    109: 72,  # 'm'
    110: 178,  # 'n'
    111: 69,  # 'o'
    112: 67,  # 'p'
    113: 179,  # 'q'
    114: 78,  # 'r'
    115: 73,  # 's'
    116: 180,  # 't'
    117: 181,  # 'u'
    118: 79,  # 'v'
    119: 182,  # 'w'
    120: 183,  # 'x'
    121: 184,  # 'y'
    122: 185,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 191,  # 'Ђ'
    129: 192,  # 'Ѓ'
    130: 193,  # '‚'
    131: 194,  # 'ѓ'
    132: 195,  # '„'
    133: 196,  # '…'
    134: 197,  # '†'
    135: 198,  # '‡'
    136: 199,  # '€'
    137: 200,  # '‰'
    138: 201,  # 'Љ'
    139: 202,  # '‹'
    140: 203,  # 'Њ'
    141: 204,  # 'Ќ'
    142: 205,  # 'Ћ'
    143: 206,  # 'Џ'
    144: 207,  # 'ђ'
    145: 208,  # '‘'
    146: 209,  # '’'
    147: 210,  # '“'
    148: 211,  # '”'
    149: 212,  # '•'
    150: 213,  # '–'
    151: 214,  # '—'
    152: 215,  # None
    153: 216,  # '™'
    154: 217,  # 'љ'
    155: 218,  # '›'
    156: 219,  # 'њ'
    157: 220,  # 'ќ'
    158: 221,  # 'ћ'
    159: 222,  # 'џ'
    160: 223,  # '\xa0'
    161: 224,  # 'Ў'
    162: 225,  # 'ў'
    163: 226,  # 'Ј'
    164: 227,  # '¤'
    165: 228,  # 'Ґ'
    166: 229,  # '¦'
    167: 230,  # '§'
    168: 231,  # 'Ё'
    169: 232,  # '©'
    170: 233,  # 'Є'
    171: 234,  # '«'
    172: 235,  # '¬'
    173: 236,  # '\xad'
    174: 237,  # '®'
    175: 238,  # 'Ї'
    176: 239,  # '°'
    177: 240,  # '±'
    178: 241,  # 'І'
    179: 242,  # 'і'
    180: 243,  # 'ґ'
    181: 244,  # 'µ'
    182: 245,  # '¶'
    183: 246,  # '·'
    184: 68,  # 'ё'
    185: 247,  # '№'
    186: 248,  # 'є'
    187: 249,  # '»'
    188: 250,  # 'ј'
    189: 251,  # 'Ѕ'
    190: 252,  # 'ѕ'
    191: 253,  # 'ї'
    192: 37,  # 'А'
    193: 44,  # 'Б'
    194: 33,  # 'В'
    195: 46,  # 'Г'
    196: 41,  # 'Д'
    197: 48,  # 'Е'
    198: 56,  # 'Ж'
    199: 51,  # 'З'
    200: 42,  # 'И'
    201: 60,  # 'Й'
    202: 36,  # 'К'
    203: 49,  # 'Л'
    204: 38,  # 'М'
    205: 31,  # 'Н'
    206: 34,  # 'О'
    207: 35,  # 'П'
    208: 45,  # 'Р'
    209: 32,  # 'С'
    210: 40,  # 'Т'
    211: 52,  # 'У'
    212: 53,  # 'Ф'
    213: 55,  # 'Х'
    214: 58,  # 'Ц'
    215: 50,  # 'Ч'
    216: 57,  # 'Ш'
    217: 63,  # 'Щ'
    218: 70,  # 'Ъ'
    219: 62,  # 'Ы'
    220: 61,  # 'Ь'
    221: 47,  # 'Э'
    222: 59,  # 'Ю'
    223: 43,  # 'Я'
    224: 3,  # 'а'
    225: 21,  # 'б'
    226: 10,  # 'в'
    227: 19,  # 'г'
    228: 13,  # 'д'
    229: 2,  # 'е'
    230: 24,  # 'ж'
    231: 20,  # 'з'
    232: 4,  # 'и'
    233: 23,  # 'й'
    234: 11,  # 'к'
    235: 8,  # 'л'
    236: 12,  # 'м'
    237: 5,  # 'н'
    238: 1,  # 'о'
    239: 15,  # 'п'
    240: 9,  # 'р'
    241: 7,  # 'с'
    242: 6,  # 'т'
    243: 14,  # 'у'
    244: 39,  # 'ф'
    245: 26,  # 'х'
    246: 28,  # 'ц'
    247: 22,  # 'ч'
    248: 25,  # 'ш'
    249: 29,  # 'щ'
    250: 54,  # 'ъ'
    251: 18,  # 'ы'
    252: 17,  # 'ь'
    253: 30,  # 'э'
    254: 27,  # 'ю'
    255: 16,  # 'я'
}

WINDOWS_1251_RUSSIAN_MODEL = SingleByteCharSetModel(
    charset_name="windows-1251",
    language="Russian",
    char_to_order_map=WINDOWS_1251_RUSSIAN_CHAR_TO_ORDER,
    language_model=RUSSIAN_LANG_MODEL,
    typical_positive_ratio=0.976601,
    keep_ascii_letters=False,
    alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)

IBM855_RUSSIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 142,  # 'A'
    66: 143,  # 'B'
    67: 144,  # 'C'
    68: 145,  # 'D'
    69: 146,  # 'E'
    70: 147,  # 'F'
    71: 148,  # 'G'
    72: 149,  # 'H'
    73: 150,  # 'I'
    74: 151,  # 'J'
    75: 152,  # 'K'
    76: 74,  # 'L'
    77: 153,  # 'M'
    78: 75,  # 'N'
    79: 154,  # 'O'
    80: 155,  # 'P'
    81: 156,  # 'Q'
    82: 157,  # 'R'
    83: 158,  # 'S'
    84: 159,  # 'T'
    85: 160,  # 'U'
    86: 161,  # 'V'
    87: 162,  # 'W'
    88: 163,  # 'X'
    89: 164,  # 'Y'
    90: 165,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 71,  # 'a'
    98: 172,  # 'b'
    99: 66,  # 'c'
    100: 173,  # 'd'
    101: 65,  # 'e'
    102: 174,  # 'f'
    103: 76,  # 'g'
    104: 175,  # 'h'
    105: 64,  # 'i'
    106: 176,  # 'j'
    107: 177,  # 'k'
    108: 77,  # 'l'
    109: 72,  # 'm'
    110: 178,  # 'n'
    111: 69,  # 'o'
    112: 67,  # 'p'
    113: 179,  # 'q'
    114: 78,  # 'r'
    115: 73,  # 's'
    116: 180,  # 't'
    117: 181,  # 'u'
    118: 79,  # 'v'
    119: 182,  # 'w'
    120: 183,  # 'x'
    121: 184,  # 'y'
    122: 185,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 191,  # 'ђ'
    129: 192,  # 'Ђ'
    130: 193,  # 'ѓ'
    131: 194,  # 'Ѓ'
    132: 68,  # 'ё'
    133: 195,  # 'Ё'
    134: 196,  # 'є'
    135: 197,  # 'Є'
    136: 198,  # 'ѕ'
    137: 199,  # 'Ѕ'
    138: 200,  # 'і'
    139: 201,  # 'І'
    140: 202,  # 'ї'
    141: 203,  # 'Ї'
    142: 204,  # 'ј'
    143: 205,  # 'Ј'
    144: 206,  # 'љ'
    145: 207,  # 'Љ'
    146: 208,  # 'њ'
    147: 209,  # 'Њ'
    148: 210,  # 'ћ'
    149: 211,  # 'Ћ'
    150: 212,  # 'ќ'
    151: 213,  # 'Ќ'
    152: 214,  # 'ў'
    153: 215,  # 'Ў'
    154: 216,  # 'џ'
    155: 217,  # 'Џ'
    156: 27,  # 'ю'
    157: 59,  # 'Ю'
    158: 54,  # 'ъ'
    159: 70,  # 'Ъ'
    160: 3,  # 'а'
    161: 37,  # 'А'
    162: 21,  # 'б'
    163: 44,  # 'Б'
    164: 28,  # 'ц'
    165: 58,  # 'Ц'
    166: 13,  # 'д'
    167: 41,  # 'Д'
    168: 2,  # 'е'
    169: 48,  # 'Е'
    170: 39,  # 'ф'
    171: 53,  # 'Ф'
    172: 19,  # 'г'
    173: 46,  # 'Г'
    174: 218,  # '«'
    175: 219,  # '»'
    176: 220,  # '░'
    177: 221,  # '▒'
    178: 222,  # '▓'
    179: 223,  # '│'
    180: 224,  # '┤'
    181: 26,  # 'х'
    182: 55,  # 'Х'
    183: 4,  # 'и'
    184: 42,  # 'И'
    185: 225,  # '╣'
    186: 226,  # '║'
    187: 227,  # '╗'
    188: 228,  # '╝'
    189: 23,  # 'й'
    190: 60,  # 'Й'
    191: 229,  # '┐'
    192: 230,  # '└'
    193: 231,  # '┴'
    194: 232,  # '┬'
    195: 233,  # '├'
    196: 234,  # '─'
    197: 235,  # '┼'
    198: 11,  # 'к'
    199: 36,  # 'К'
    200: 236,  # '╚'
    201: 237,  # '╔'
    202: 238,  # '╩'
    203: 239,  # '╦'
    204: 240,  # '╠'
    205: 241,  # '═'
    206: 242,  # '╬'
    207: 243,  # '¤'
    208: 8,  # 'л'
    209: 49,  # 'Л'
    210: 12,  # 'м'
    211: 38,  # 'М'
    212: 5,  # 'н'
    213: 31,  # 'Н'
    214: 1,  # 'о'
    215: 34,  # 'О'
    216: 15,  # 'п'
    217: 244,  # '┘'
    218: 245,  # '┌'
    219: 246,  # '█'
    220: 247,  # '▄'
    221: 35,  # 'П'
    222: 16,  # 'я'
    223: 248,  # '▀'
    224: 43,  # 'Я'
    225: 9,  # 'р'
    226: 45,  # 'Р'
    227: 7,  # 'с'
    228: 32,  # 'С'
    229: 6,  # 'т'
    230: 40,  # 'Т'
    231: 14,  # 'у'
    232: 52,  # 'У'
    233: 24,  # 'ж'
    234: 56,  # 'Ж'
    235: 10,  # 'в'
    236: 33,  # 'В'
    237: 17,  # 'ь'
    238: 61,  # 'Ь'
    239: 249,  # '№'
    240: 250,  # '\xad'
    241: 18,  # 'ы'
    242: 62,  # 'Ы'
    243: 20,  # 'з'
    244: 51,  # 'З'
    245: 25,  # 'ш'
    246: 57,  # 'Ш'
    247: 30,  # 'э'
    248: 47,  # 'Э'
    249: 29,  # 'щ'
    250: 63,  # 'Щ'
    251: 22,  # 'ч'
    252: 50,  # 'Ч'
    253: 251,  # '§'
    254: 252,  # '■'
    255: 255,  # '\xa0'
}

IBM855_RUSSIAN_MODEL = SingleByteCharSetModel(
    charset_name="IBM855",
    language="Russian",
    char_to_order_map=IBM855_RUSSIAN_CHAR_TO_ORDER,
    language_model=RUSSIAN_LANG_MODEL,
    typical_positive_ratio=0.976601,
    keep_ascii_letters=False,
    alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)

KOI8_R_RUSSIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 142,  # 'A'
    66: 143,  # 'B'
    67: 144,  # 'C'
    68: 145,  # 'D'
    69: 146,  # 'E'
    70: 147,  # 'F'
    71: 148,  # 'G'
    72: 149,  # 'H'
    73: 150,  # 'I'
    74: 151,  # 'J'
    75: 152,  # 'K'
    76: 74,  # 'L'
    77: 153,  # 'M'
    78: 75,  # 'N'
    79: 154,  # 'O'
    80: 155,  # 'P'
    81: 156,  # 'Q'
    82: 157,  # 'R'
    83: 158,  # 'S'
    84: 159,  # 'T'
    85: 160,  # 'U'
    86: 161,  # 'V'
    87: 162,  # 'W'
    88: 163,  # 'X'
    89: 164,  # 'Y'
    90: 165,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 71,  # 'a'
    98: 172,  # 'b'
    99: 66,  # 'c'
    100: 173,  # 'd'
    101: 65,  # 'e'
    102: 174,  # 'f'
    103: 76,  # 'g'
    104: 175,  # 'h'
    105: 64,  # 'i'
    106: 176,  # 'j'
    107: 177,  # 'k'
    108: 77,  # 'l'
    109: 72,  # 'm'
    110: 178,  # 'n'
    111: 69,  # 'o'
    112: 67,  # 'p'
    113: 179,  # 'q'
    114: 78,  # 'r'
    115: 73,  # 's'
    116: 180,  # 't'
    117: 181,  # 'u'
    118: 79,  # 'v'
    119: 182,  # 'w'
    120: 183,  # 'x'
    121: 184,  # 'y'
    122: 185,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 191,  # '─'
    129: 192,  # '│'
    130: 193,  # '┌'
    131: 194,  # '┐'
    132: 195,  # '└'
    133: 196,  # '┘'
    134: 197,  # '├'
    135: 198,  # '┤'
    136: 199,  # '┬'
    137: 200,  # '┴'
    138: 201,  # '┼'
    139: 202,  # '▀'
    140: 203,  # '▄'
    141: 204,  # '█'
    142: 205,  # '▌'
    143: 206,  # '▐'
    144: 207,  # '░'
    145: 208,  # '▒'
    146: 209,  # '▓'
    147: 210,  # '⌠'
    148: 211,  # '■'
    149: 212,  # '∙'
    150: 213,  # '√'
    151: 214,  # '≈'
    152: 215,  # '≤'
    153: 216,  # '≥'
    154: 217,  # '\xa0'
    155: 218,  # '⌡'
    156: 219,  # '°'
    157: 220,  # '²'
    158: 221,  # '·'
    159: 222,  # '÷'
    160: 223,  # '═'
    161: 224,  # '║'
    162: 225,  # '╒'
    163: 68,  # 'ё'
    164: 226,  # '╓'
    165: 227,  # '╔'
    166: 228,  # '╕'
    167: 229,  # '╖'
    168: 230,  # '╗'
    169: 231,  # '╘'
    170: 232,  # '╙'
    171: 233,  # '╚'
    172: 234,  # '╛'
    173: 235,  # '╜'
    174: 236,  # '╝'
    175: 237,  # '╞'
    176: 238,  # '╟'
    177: 239,  # '╠'
    178: 240,  # '╡'
    179: 241,  # 'Ё'
    180: 242,  # '╢'
    181: 243,  # '╣'
    182: 244,  # '╤'
    183: 245,  # '╥'
    184: 246,  # '╦'
    185: 247,  # '╧'
    186: 248,  # '╨'
    187: 249,  # '╩'
    188: 250,  # '╪'
    189: 251,  # '╫'
    190: 252,  # '╬'
    191: 253,  # '©'
    192: 27,  # 'ю'
    193: 3,  # 'а'
    194: 21,  # 'б'
    195: 28,  # 'ц'
    196: 13,  # 'д'
    197: 2,  # 'е'
    198: 39,  # 'ф'
    199: 19,  # 'г'
    200: 26,  # 'х'
    201: 4,  # 'и'
    202: 23,  # 'й'
    203: 11,  # 'к'
    204: 8,  # 'л'
    205: 12,  # 'м'
    206: 5,  # 'н'
    207: 1,  # 'о'
    208: 15,  # 'п'
    209: 16,  # 'я'
    210: 9,  # 'р'
    211: 7,  # 'с'
    212: 6,  # 'т'
    213: 14,  # 'у'
    214: 24,  # 'ж'
    215: 10,  # 'в'
    216: 17,  # 'ь'
    217: 18,  # 'ы'
    218: 20,  # 'з'
    219: 25,  # 'ш'
    220: 30,  # 'э'
    221: 29,  # 'щ'
    222: 22,  # 'ч'
    223: 54,  # 'ъ'
    224: 59,  # 'Ю'
    225: 37,  # 'А'
    226: 44,  # 'Б'
    227: 58,  # 'Ц'
    228: 41,  # 'Д'
    229: 48,  # 'Е'
    230: 53,  # 'Ф'
    231: 46,  # 'Г'
    232: 55,  # 'Х'
    233: 42,  # 'И'
    234: 60,  # 'Й'
    235: 36,  # 'К'
    236: 49,  # 'Л'
    237: 38,  # 'М'
    238: 31,  # 'Н'
    239: 34,  # 'О'
    240: 35,  # 'П'
    241: 43,  # 'Я'
    242: 45,  # 'Р'
    243: 32,  # 'С'
    244: 40,  # 'Т'
    245: 52,  # 'У'
    246: 56,  # 'Ж'
    247: 33,  # 'В'
    248: 61,  # 'Ь'
    249: 62,  # 'Ы'
    250: 51,  # 'З'
    251: 57,  # 'Ш'
    252: 47,  # 'Э'
    253: 63,  # 'Щ'
    254: 50,  # 'Ч'
    255: 70,  # 'Ъ'
}

KOI8_R_RUSSIAN_MODEL = SingleByteCharSetModel(
    charset_name="KOI8-R",
    language="Russian",
    char_to_order_map=KOI8_R_RUSSIAN_CHAR_TO_ORDER,
    language_model=RUSSIAN_LANG_MODEL,
    typical_positive_ratio=0.976601,
    keep_ascii_letters=False,
    alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)

MACCYRILLIC_RUSSIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 142,  # 'A'
    66: 143,  # 'B'
    67: 144,  # 'C'
    68: 145,  # 'D'
    69: 146,  # 'E'
    70: 147,  # 'F'
    71: 148,  # 'G'
    72: 149,  # 'H'
    73: 150,  # 'I'
    74: 151,  # 'J'
    75: 152,  # 'K'
    76: 74,  # 'L'
    77: 153,  # 'M'
    78: 75,  # 'N'
    79: 154,  # 'O'
    80: 155,  # 'P'
    81: 156,  # 'Q'
    82: 157,  # 'R'
    83: 158,  # 'S'
    84: 159,  # 'T'
    85: 160,  # 'U'
    86: 161,  # 'V'
    87: 162,  # 'W'
    88: 163,  # 'X'
    89: 164,  # 'Y'
    90: 165,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 71,  # 'a'
    98: 172,  # 'b'
    99: 66,  # 'c'
    100: 173,  # 'd'
    101: 65,  # 'e'
    102: 174,  # 'f'
    103: 76,  # 'g'
    104: 175,  # 'h'
    105: 64,  # 'i'
    106: 176,  # 'j'
    107: 177,  # 'k'
    108: 77,  # 'l'
    109: 72,  # 'm'
    110: 178,  # 'n'
    111: 69,  # 'o'
    112: 67,  # 'p'
    113: 179,  # 'q'
    114: 78,  # 'r'
    115: 73,  # 's'
    116: 180,  # 't'
    117: 181,  # 'u'
    118: 79,  # 'v'
    119: 182,  # 'w'
    120: 183,  # 'x'
    121: 184,  # 'y'
    122: 185,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 37,  # 'А'
    129: 44,  # 'Б'
    130: 33,  # 'В'
    131: 46,  # 'Г'
    132: 41,  # 'Д'
    133: 48,  # 'Е'
    134: 56,  # 'Ж'
    135: 51,  # 'З'
    136: 42,  # 'И'
    137: 60,  # 'Й'
    138: 36,  # 'К'
    139: 49,  # 'Л'
    140: 38,  # 'М'
    141: 31,  # 'Н'
    142: 34,  # 'О'
    143: 35,  # 'П'
    144: 45,  # 'Р'
    145: 32,  # 'С'
    146: 40,  # 'Т'
    147: 52,  # 'У'
    148: 53,  # 'Ф'
    149: 55,  # 'Х'
    150: 58,  # 'Ц'
    151: 50,  # 'Ч'
    152: 57,  # 'Ш'
    153: 63,  # 'Щ'
    154: 70,  # 'Ъ'
    155: 62,  # 'Ы'
    156: 61,  # 'Ь'
    157: 47,  # 'Э'
    158: 59,  # 'Ю'
    159: 43,  # 'Я'
    160: 191,  # '†'
    161: 192,  # '°'
    162: 193,  # 'Ґ'
    163: 194,  # '£'
    164: 195,  # '§'
    165: 196,  # '•'
    166: 197,  # '¶'
    167: 198,  # 'І'
    168: 199,  # '®'
    169: 200,  # '©'
    170: 201,  # '™'
    171: 202,  # 'Ђ'
    172: 203,  # 'ђ'
    173: 204,  # '≠'
    174: 205,  # 'Ѓ'
    175: 206,  # 'ѓ'
    176: 207,  # '∞'
    177: 208,  # '±'
    178: 209,  # '≤'
    179: 210,  # '≥'
    180: 211,  # 'і'
    181: 212,  # 'µ'
    182: 213,  # 'ґ'
    183: 214,  # 'Ј'
    184: 215,  # 'Є'
    185: 216,  # 'є'
    186: 217,  # 'Ї'
    187: 218,  # 'ї'
    188: 219,  # 'Љ'
    189: 220,  # 'љ'
    190: 221,  # 'Њ'
    191: 222,  # 'њ'
    192: 223,  # 'ј'
    193: 224,  # 'Ѕ'
    194: 225,  # '¬'
    195: 226,  # '√'
    196: 227,  # 'ƒ'
    197: 228,  # '≈'
    198: 229,  # '∆'
    199: 230,  # '«'
    200: 231,  # '»'
    201: 232,  # '…'
    202: 233,  # '\xa0'
    203: 234,  # 'Ћ'
    204: 235,  # 'ћ'
    205: 236,  # 'Ќ'
    206: 237,  # 'ќ'
    207: 238,  # 'ѕ'
    208: 239,  # '–'
    209: 240,  # '—'
    210: 241,  # '“'
    211: 242,  # '”'
    212: 243,  # '‘'
    213: 244,  # '’'
    214: 245,  # '÷'
    215: 246,  # '„'
    216: 247,  # 'Ў'
    217: 248,  # 'ў'
    218: 249,  # 'Џ'
    219: 250,  # 'џ'
    220: 251,  # '№'
    221: 252,  # 'Ё'
    222: 68,  # 'ё'
    223: 16,  # 'я'
    224: 3,  # 'а'
    225: 21,  # 'б'
    226: 10,  # 'в'
    227: 19,  # 'г'
    228: 13,  # 'д'
    229: 2,  # 'е'
    230: 24,  # 'ж'
    231: 20,  # 'з'
    232: 4,  # 'и'
    233: 23,  # 'й'
    234: 11,  # 'к'
    235: 8,  # 'л'
    236: 12,  # 'м'
    237: 5,  # 'н'
    238: 1,  # 'о'
    239: 15,  # 'п'
    240: 9,  # 'р'
    241: 7,  # 'с'
    242: 6,  # 'т'
    243: 14,  # 'у'
    244: 39,  # 'ф'
    245: 26,  # 'х'
    246: 28,  # 'ц'
    247: 22,  # 'ч'
    248: 25,  # 'ш'
    249: 29,  # 'щ'
    250: 54,  # 'ъ'
    251: 18,  # 'ы'
    252: 17,  # 'ь'
    253: 30,  # 'э'
    254: 27,  # 'ю'
    255: 255,  # '€'
}

MACCYRILLIC_RUSSIAN_MODEL = SingleByteCharSetModel(
    charset_name="MacCyrillic",
    language="Russian",
    char_to_order_map=MACCYRILLIC_RUSSIAN_CHAR_TO_ORDER,
    language_model=RUSSIAN_LANG_MODEL,
    typical_positive_ratio=0.976601,
    keep_ascii_letters=False,
    alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)

ISO_8859_5_RUSSIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 142,  # 'A'
    66: 143,  # 'B'
    67: 144,  # 'C'
    68: 145,  # 'D'
    69: 146,  # 'E'
    70: 147,  # 'F'
    71: 148,  # 'G'
    72: 149,  # 'H'
    73: 150,  # 'I'
    74: 151,  # 'J'
    75: 152,  # 'K'
    76: 74,  # 'L'
    77: 153,  # 'M'
    78: 75,  # 'N'
    79: 154,  # 'O'
    80: 155,  # 'P'
    81: 156,  # 'Q'
    82: 157,  # 'R'
    83: 158,  # 'S'
    84: 159,  # 'T'
    85: 160,  # 'U'
    86: 161,  # 'V'
    87: 162,  # 'W'
    88: 163,  # 'X'
    89: 164,  # 'Y'
    90: 165,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 71,  # 'a'
    98: 172,  # 'b'
    99: 66,  # 'c'
    100: 173,  # 'd'
    101: 65,  # 'e'
    102: 174,  # 'f'
    103: 76,  # 'g'
    104: 175,  # 'h'
    105: 64,  # 'i'
    106: 176,  # 'j'
    107: 177,  # 'k'
    108: 77,  # 'l'
    109: 72,  # 'm'
    110: 178,  # 'n'
    111: 69,  # 'o'
    112: 67,  # 'p'
    113: 179,  # 'q'
    114: 78,  # 'r'
    115: 73,  # 's'
    116: 180,  # 't'
    117: 181,  # 'u'
    118: 79,  # 'v'
    119: 182,  # 'w'
    120: 183,  # 'x'
    121: 184,  # 'y'
    122: 185,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 191,  # '\x80'
    129: 192,  # '\x81'
    130: 193,  # '\x82'
    131: 194,  # '\x83'
    132: 195,  # '\x84'
    133: 196,  # '\x85'
    134: 197,  # '\x86'
    135: 198,  # '\x87'
    136: 199,  # '\x88'
    137: 200,  # '\x89'
    138: 201,  # '\x8a'
    139: 202,  # '\x8b'
    140: 203,  # '\x8c'
    141: 204,  # '\x8d'
    142: 205,  # '\x8e'
    143: 206,  # '\x8f'
    144: 207,  # '\x90'
    145: 208,  # '\x91'
    146: 209,  # '\x92'
    147: 210,  # '\x93'
    148: 211,  # '\x94'
    149: 212,  # '\x95'
    150: 213,  # '\x96'
    151: 214,  # '\x97'
    152: 215,  # '\x98'
    153: 216,  # '\x99'
    154: 217,  # '\x9a'
    155: 218,  # '\x9b'
    156: 219,  # '\x9c'
    157: 220,  # '\x9d'
    158: 221,  # '\x9e'
    159: 222,  # '\x9f'
    160: 223,  # '\xa0'
    161: 224,  # 'Ё'
    162: 225,  # 'Ђ'
    163: 226,  # 'Ѓ'
    164: 227,  # 'Є'
    165: 228,  # 'Ѕ'
    166: 229,  # 'І'
    167: 230,  # 'Ї'
    168: 231,  # 'Ј'
    169: 232,  # 'Љ'
    170: 233,  # 'Њ'
    171: 234,  # 'Ћ'
    172: 235,  # 'Ќ'
    173: 236,  # '\xad'
    174: 237,  # 'Ў'
    175: 238,  # 'Џ'
    176: 37,  # 'А'
    177: 44,  # 'Б'
    178: 33,  # 'В'
    179: 46,  # 'Г'
    180: 41,  # 'Д'
    181: 48,  # 'Е'
    182: 56,  # 'Ж'
    183: 51,  # 'З'
    184: 42,  # 'И'
    185: 60,  # 'Й'
    186: 36,  # 'К'
    187: 49,  # 'Л'
    188: 38,  # 'М'
    189: 31,  # 'Н'
    190: 34,  # 'О'
    191: 35,  # 'П'
    192: 45,  # 'Р'
    193: 32,  # 'С'
    194: 40,  # 'Т'
    195: 52,  # 'У'
    196: 53,  # 'Ф'
    197: 55,  # 'Х'
    198: 58,  # 'Ц'
    199: 50,  # 'Ч'
    200: 57,  # 'Ш'
    201: 63,  # 'Щ'
    202: 70,  # 'Ъ'
    203: 62,  # 'Ы'
    204: 61,  # 'Ь'
    205: 47,  # 'Э'
    206: 59,  # 'Ю'
    207: 43,  # 'Я'
    208: 3,  # 'а'
    209: 21,  # 'б'
    210: 10,  # 'в'
    211: 19,  # 'г'
    212: 13,  # 'д'
    213: 2,  # 'е'
    214: 24,  # 'ж'
    215: 20,  # 'з'
    216: 4,  # 'и'
    217: 23,  # 'й'
    218: 11,  # 'к'
    219: 8,  # 'л'
    220: 12,  # 'м'
    221: 5,  # 'н'
    222: 1,  # 'о'
    223: 15,  # 'п'
    224: 9,  # 'р'
    225: 7,  # 'с'
    226: 6,  # 'т'
    227: 14,  # 'у'
    228: 39,  # 'ф'
    229: 26,  # 'х'
    230: 28,  # 'ц'
    231: 22,  # 'ч'
    232: 25,  # 'ш'
    233: 29,  # 'щ'
    234: 54,  # 'ъ'
    235: 18,  # 'ы'
    236: 17,  # 'ь'
    237: 30,  # 'э'
    238: 27,  # 'ю'
    239: 16,  # 'я'
    240: 239,  # '№'
    241: 68,  # 'ё'
    242: 240,  # 'ђ'
    243: 241,  # 'ѓ'
    244: 242,  # 'є'
    245: 243,  # 'ѕ'
    246: 244,  # 'і'
    247: 245,  # 'ї'
    248: 246,  # 'ј'
    249: 247,  # 'љ'
    250: 248,  # 'њ'
    251: 249,  # 'ћ'
    252: 250,  # 'ќ'
    253: 251,  # '§'
    254: 252,  # 'ў'
    255: 255,  # 'џ'
}

ISO_8859_5_RUSSIAN_MODEL = SingleByteCharSetModel(
    charset_name="ISO-8859-5",
    language="Russian",
    char_to_order_map=ISO_8859_5_RUSSIAN_CHAR_TO_ORDER,
    language_model=RUSSIAN_LANG_MODEL,
    typical_positive_ratio=0.976601,
    keep_ascii_letters=False,
    alphabet="ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё",
)
python3.12/site-packages/pip/_vendor/chardet/version.py000064400000000364151732703200017011 0ustar00"""
This module exists only to simplify retrieving the version number of chardet
from within setuptools and from chardet subpackages.

:author: Dan Blanchard (dan.blanchard@gmail.com)
"""

__version__ = "5.1.0"
VERSION = __version__.split(".")
python3.12/site-packages/pip/_vendor/chardet/langhungarianmodel.py000064400000305763151732703200021176 0ustar00from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel

# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative

HUNGARIAN_LANG_MODEL = {
    28: {  # 'A'
        28: 0,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 2,  # 'D'
        32: 1,  # 'E'
        50: 1,  # 'F'
        49: 2,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 2,  # 'K'
        41: 2,  # 'L'
        34: 1,  # 'M'
        35: 2,  # 'N'
        47: 1,  # 'O'
        46: 2,  # 'P'
        43: 2,  # 'R'
        33: 2,  # 'S'
        37: 2,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 2,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 2,  # 'd'
        1: 1,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 1,  # 'i'
        22: 1,  # 'j'
        7: 2,  # 'k'
        6: 2,  # 'l'
        13: 2,  # 'm'
        4: 2,  # 'n'
        8: 0,  # 'o'
        23: 2,  # 'p'
        10: 2,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 1,  # 'u'
        19: 1,  # 'v'
        62: 1,  # 'x'
        16: 0,  # 'y'
        11: 3,  # 'z'
        51: 1,  # 'Á'
        44: 0,  # 'É'
        61: 1,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    40: {  # 'B'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 0,  # 'M'
        35: 1,  # 'N'
        47: 2,  # 'O'
        46: 0,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 3,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 2,  # 'i'
        22: 1,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 3,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 0,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    54: {  # 'C'
        28: 1,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 1,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 0,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 2,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 0,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 1,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 1,  # 'h'
        9: 1,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 3,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 1,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    45: {  # 'D'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 0,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 0,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 2,  # 'O'
        46: 0,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 3,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 1,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 1,  # 'o'
        23: 0,  # 'p'
        10: 2,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 2,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 1,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 0,  # 'ű'
    },
    32: {  # 'E'
        28: 1,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 1,  # 'E'
        50: 1,  # 'F'
        49: 2,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 2,  # 'K'
        41: 2,  # 'L'
        34: 2,  # 'M'
        35: 2,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 2,  # 'R'
        33: 2,  # 'S'
        37: 2,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 1,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 2,  # 'd'
        1: 1,  # 'e'
        27: 1,  # 'f'
        12: 3,  # 'g'
        20: 1,  # 'h'
        9: 1,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 2,  # 'l'
        13: 2,  # 'm'
        4: 2,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 2,  # 's'
        3: 1,  # 't'
        21: 2,  # 'u'
        19: 1,  # 'v'
        62: 1,  # 'x'
        16: 0,  # 'y'
        11: 3,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 0,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 0,  # 'Ú'
        63: 1,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 1,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    50: {  # 'F'
        28: 1,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 1,  # 'E'
        50: 1,  # 'F'
        49: 0,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 0,  # 'P'
        43: 1,  # 'R'
        33: 0,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 0,  # 'V'
        55: 1,  # 'Y'
        52: 0,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 1,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 2,  # 'i'
        22: 1,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 2,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 0,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 0,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 0,  # 'Ú'
        63: 1,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 2,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    49: {  # 'G'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 2,  # 'Y'
        52: 1,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 1,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 2,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 2,  # 'y'
        11: 0,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 0,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 0,  # 'ű'
    },
    38: {  # 'H'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 0,  # 'D'
        32: 1,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 1,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 1,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 1,  # 'O'
        46: 0,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 0,  # 'V'
        55: 1,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 2,  # 'i'
        22: 1,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 0,  # 'n'
        8: 3,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 2,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 0,  # 'z'
        51: 2,  # 'Á'
        44: 2,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 1,  # 'é'
        30: 2,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    39: {  # 'I'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 1,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 2,  # 'K'
        41: 2,  # 'L'
        34: 1,  # 'M'
        35: 2,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 2,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 2,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 2,  # 'd'
        1: 0,  # 'e'
        27: 1,  # 'f'
        12: 2,  # 'g'
        20: 1,  # 'h'
        9: 0,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 2,  # 'l'
        13: 2,  # 'm'
        4: 1,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 2,  # 's'
        3: 2,  # 't'
        21: 0,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 1,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 0,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    53: {  # 'J'
        28: 2,  # 'A'
        40: 0,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 1,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 1,  # 'o'
        23: 0,  # 'p'
        10: 0,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 2,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 0,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 0,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 1,  # 'é'
        30: 0,  # 'í'
        25: 2,  # 'ó'
        24: 2,  # 'ö'
        31: 1,  # 'ú'
        29: 0,  # 'ü'
        42: 1,  # 'ő'
        56: 0,  # 'ű'
    },
    36: {  # 'K'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 0,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 2,  # 'O'
        46: 0,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 0,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 1,  # 'f'
        12: 0,  # 'g'
        20: 1,  # 'h'
        9: 3,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 2,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 0,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 2,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 2,  # 'ö'
        31: 1,  # 'ú'
        29: 2,  # 'ü'
        42: 1,  # 'ő'
        56: 0,  # 'ű'
    },
    41: {  # 'L'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 2,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 2,  # 'O'
        46: 0,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 2,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 3,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 2,  # 'i'
        22: 1,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 0,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 2,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 0,  # 'z'
        51: 2,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 0,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    34: {  # 'M'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 0,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 3,  # 'a'
        18: 0,  # 'b'
        26: 1,  # 'c'
        17: 0,  # 'd'
        1: 3,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 3,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 3,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 2,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 0,  # 'z'
        51: 2,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 1,  # 'ű'
    },
    35: {  # 'N'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 2,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 2,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 2,  # 'Y'
        52: 1,  # 'Z'
        2: 3,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 3,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 2,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 0,  # 'm'
        4: 1,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 0,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 2,  # 'y'
        11: 0,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 1,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 1,  # 'ő'
        56: 0,  # 'ű'
    },
    47: {  # 'O'
        28: 1,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 1,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 2,  # 'K'
        41: 2,  # 'L'
        34: 2,  # 'M'
        35: 2,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 2,  # 'R'
        33: 2,  # 'S'
        37: 2,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 1,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 1,  # 'i'
        22: 1,  # 'j'
        7: 2,  # 'k'
        6: 2,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 1,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 1,  # 's'
        3: 2,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 1,  # 'x'
        16: 0,  # 'y'
        11: 1,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 0,  # 'Í'
        58: 1,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    46: {  # 'P'
        28: 1,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 1,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 0,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 2,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 1,  # 'f'
        12: 0,  # 'g'
        20: 1,  # 'h'
        9: 2,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 1,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 2,  # 'r'
        5: 1,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 0,  # 'z'
        51: 2,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 0,  # 'Ú'
        63: 1,  # 'Ü'
        14: 3,  # 'á'
        15: 2,  # 'é'
        30: 0,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 0,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 0,  # 'ű'
    },
    43: {  # 'R'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 2,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 2,  # 'S'
        37: 2,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 1,  # 'h'
        9: 2,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 0,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 0,  # 'z'
        51: 2,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 2,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 2,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    33: {  # 'S'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 2,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 2,  # 'S'
        37: 2,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 3,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 1,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 1,  # 'h'
        9: 2,  # 'i'
        22: 0,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 1,  # 'p'
        10: 0,  # 'r'
        5: 0,  # 's'
        3: 1,  # 't'
        21: 1,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 3,  # 'z'
        51: 2,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    37: {  # 'T'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 2,  # 'O'
        46: 1,  # 'P'
        43: 2,  # 'R'
        33: 1,  # 'S'
        37: 2,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 2,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 1,  # 'h'
        9: 2,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 1,  # 's'
        3: 0,  # 't'
        21: 2,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 1,  # 'z'
        51: 2,  # 'Á'
        44: 2,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 2,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    57: {  # 'U'
        28: 1,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 1,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 2,  # 'S'
        37: 1,  # 'T'
        57: 0,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 1,  # 'e'
        27: 0,  # 'f'
        12: 2,  # 'g'
        20: 0,  # 'h'
        9: 0,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 1,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 0,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 1,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    48: {  # 'V'
        28: 2,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 0,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 2,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 2,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 2,  # 'o'
        23: 0,  # 'p'
        10: 0,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 0,  # 'z'
        51: 2,  # 'Á'
        44: 2,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 0,  # 'Ú'
        63: 1,  # 'Ü'
        14: 2,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 0,  # 'ó'
        24: 1,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    55: {  # 'Y'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 1,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 2,  # 'Z'
        2: 1,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 1,  # 'd'
        1: 1,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 0,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        8: 1,  # 'o'
        23: 1,  # 'p'
        10: 0,  # 'r'
        5: 0,  # 's'
        3: 0,  # 't'
        21: 0,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 0,  # 'z'
        51: 1,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    52: {  # 'Z'
        28: 2,  # 'A'
        40: 1,  # 'B'
        54: 0,  # 'C'
        45: 1,  # 'D'
        32: 2,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 2,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 2,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 2,  # 'S'
        37: 1,  # 'T'
        57: 1,  # 'U'
        48: 1,  # 'V'
        55: 1,  # 'Y'
        52: 1,  # 'Z'
        2: 1,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 1,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 1,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 0,  # 'm'
        4: 1,  # 'n'
        8: 1,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 2,  # 's'
        3: 0,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 0,  # 'z'
        51: 2,  # 'Á'
        44: 1,  # 'É'
        61: 1,  # 'Í'
        58: 1,  # 'Ó'
        59: 1,  # 'Ö'
        60: 1,  # 'Ú'
        63: 1,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    2: {  # 'a'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 3,  # 'b'
        26: 3,  # 'c'
        17: 3,  # 'd'
        1: 2,  # 'e'
        27: 2,  # 'f'
        12: 3,  # 'g'
        20: 3,  # 'h'
        9: 3,  # 'i'
        22: 3,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 2,  # 'o'
        23: 3,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 3,  # 'v'
        62: 1,  # 'x'
        16: 2,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    18: {  # 'b'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 3,  # 'i'
        22: 2,  # 'j'
        7: 2,  # 'k'
        6: 2,  # 'l'
        13: 1,  # 'm'
        4: 2,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 3,  # 'r'
        5: 2,  # 's'
        3: 1,  # 't'
        21: 3,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 3,  # 'ó'
        24: 2,  # 'ö'
        31: 2,  # 'ú'
        29: 2,  # 'ü'
        42: 2,  # 'ő'
        56: 1,  # 'ű'
    },
    26: {  # 'c'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 1,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 1,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 2,  # 'a'
        18: 1,  # 'b'
        26: 2,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 3,  # 'h'
        9: 3,  # 'i'
        22: 1,  # 'j'
        7: 2,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 3,  # 's'
        3: 2,  # 't'
        21: 2,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 2,  # 'á'
        15: 2,  # 'é'
        30: 2,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    17: {  # 'd'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 2,  # 'b'
        26: 1,  # 'c'
        17: 2,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 3,  # 'j'
        7: 2,  # 'k'
        6: 1,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 2,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 3,  # 'í'
        25: 3,  # 'ó'
        24: 3,  # 'ö'
        31: 2,  # 'ú'
        29: 2,  # 'ü'
        42: 2,  # 'ő'
        56: 1,  # 'ű'
    },
    1: {  # 'e'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 2,  # 'a'
        18: 3,  # 'b'
        26: 3,  # 'c'
        17: 3,  # 'd'
        1: 2,  # 'e'
        27: 3,  # 'f'
        12: 3,  # 'g'
        20: 3,  # 'h'
        9: 3,  # 'i'
        22: 3,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 2,  # 'o'
        23: 3,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 2,  # 'u'
        19: 3,  # 'v'
        62: 2,  # 'x'
        16: 2,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    27: {  # 'f'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 2,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 3,  # 'i'
        22: 2,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 3,  # 'o'
        23: 0,  # 'p'
        10: 3,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 2,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 0,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 3,  # 'ö'
        31: 1,  # 'ú'
        29: 2,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    12: {  # 'g'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 2,  # 'c'
        17: 2,  # 'd'
        1: 3,  # 'e'
        27: 2,  # 'f'
        12: 3,  # 'g'
        20: 3,  # 'h'
        9: 3,  # 'i'
        22: 3,  # 'j'
        7: 2,  # 'k'
        6: 3,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 3,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 3,  # 'ó'
        24: 2,  # 'ö'
        31: 2,  # 'ú'
        29: 2,  # 'ü'
        42: 2,  # 'ő'
        56: 1,  # 'ű'
    },
    20: {  # 'h'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 0,  # 'd'
        1: 3,  # 'e'
        27: 0,  # 'f'
        12: 1,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 3,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 2,  # 's'
        3: 1,  # 't'
        21: 3,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 2,  # 'y'
        11: 0,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 3,  # 'í'
        25: 2,  # 'ó'
        24: 2,  # 'ö'
        31: 2,  # 'ú'
        29: 1,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    9: {  # 'i'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 3,  # 'c'
        17: 3,  # 'd'
        1: 3,  # 'e'
        27: 3,  # 'f'
        12: 3,  # 'g'
        20: 3,  # 'h'
        9: 2,  # 'i'
        22: 2,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 2,  # 'o'
        23: 2,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 3,  # 'v'
        62: 1,  # 'x'
        16: 1,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 3,  # 'ó'
        24: 1,  # 'ö'
        31: 2,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 1,  # 'ű'
    },
    22: {  # 'j'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 2,  # 'b'
        26: 1,  # 'c'
        17: 3,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 2,  # 'h'
        9: 1,  # 'i'
        22: 2,  # 'j'
        7: 2,  # 'k'
        6: 2,  # 'l'
        13: 1,  # 'm'
        4: 2,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 2,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 1,  # 'í'
        25: 3,  # 'ó'
        24: 3,  # 'ö'
        31: 3,  # 'ú'
        29: 2,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    7: {  # 'k'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 2,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 2,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 1,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 2,  # 'v'
        62: 0,  # 'x'
        16: 2,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 3,  # 'í'
        25: 2,  # 'ó'
        24: 3,  # 'ö'
        31: 1,  # 'ú'
        29: 3,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    6: {  # 'l'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 1,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 1,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 2,  # 'b'
        26: 3,  # 'c'
        17: 3,  # 'd'
        1: 3,  # 'e'
        27: 3,  # 'f'
        12: 3,  # 'g'
        20: 3,  # 'h'
        9: 3,  # 'i'
        22: 3,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 2,  # 'p'
        10: 2,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 3,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 3,  # 'í'
        25: 3,  # 'ó'
        24: 3,  # 'ö'
        31: 2,  # 'ú'
        29: 2,  # 'ü'
        42: 3,  # 'ő'
        56: 1,  # 'ű'
    },
    13: {  # 'm'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 2,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 2,  # 'j'
        7: 1,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        8: 3,  # 'o'
        23: 3,  # 'p'
        10: 2,  # 'r'
        5: 2,  # 's'
        3: 2,  # 't'
        21: 3,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 2,  # 'ó'
        24: 2,  # 'ö'
        31: 2,  # 'ú'
        29: 2,  # 'ü'
        42: 1,  # 'ő'
        56: 2,  # 'ű'
    },
    4: {  # 'n'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 3,  # 'c'
        17: 3,  # 'd'
        1: 3,  # 'e'
        27: 2,  # 'f'
        12: 3,  # 'g'
        20: 3,  # 'h'
        9: 3,  # 'i'
        22: 2,  # 'j'
        7: 3,  # 'k'
        6: 2,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 2,  # 'p'
        10: 2,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 2,  # 'v'
        62: 1,  # 'x'
        16: 3,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 2,  # 'ó'
        24: 3,  # 'ö'
        31: 2,  # 'ú'
        29: 3,  # 'ü'
        42: 2,  # 'ő'
        56: 1,  # 'ű'
    },
    8: {  # 'o'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 1,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 2,  # 'a'
        18: 3,  # 'b'
        26: 3,  # 'c'
        17: 3,  # 'd'
        1: 2,  # 'e'
        27: 2,  # 'f'
        12: 3,  # 'g'
        20: 3,  # 'h'
        9: 2,  # 'i'
        22: 2,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 1,  # 'o'
        23: 3,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 2,  # 'u'
        19: 3,  # 'v'
        62: 1,  # 'x'
        16: 1,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 1,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    23: {  # 'p'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 1,  # 'b'
        26: 2,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 2,  # 'j'
        7: 2,  # 'k'
        6: 3,  # 'l'
        13: 1,  # 'm'
        4: 2,  # 'n'
        8: 3,  # 'o'
        23: 3,  # 'p'
        10: 3,  # 'r'
        5: 2,  # 's'
        3: 2,  # 't'
        21: 3,  # 'u'
        19: 2,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 2,  # 'ó'
        24: 2,  # 'ö'
        31: 1,  # 'ú'
        29: 2,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    10: {  # 'r'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 3,  # 'c'
        17: 3,  # 'd'
        1: 3,  # 'e'
        27: 2,  # 'f'
        12: 3,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 3,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 2,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 3,  # 'v'
        62: 1,  # 'x'
        16: 2,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 3,  # 'ó'
        24: 3,  # 'ö'
        31: 3,  # 'ú'
        29: 3,  # 'ü'
        42: 2,  # 'ő'
        56: 2,  # 'ű'
    },
    5: {  # 's'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 2,  # 'c'
        17: 2,  # 'd'
        1: 3,  # 'e'
        27: 2,  # 'f'
        12: 2,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 1,  # 'j'
        7: 3,  # 'k'
        6: 2,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 2,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 2,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 3,  # 'í'
        25: 3,  # 'ó'
        24: 3,  # 'ö'
        31: 3,  # 'ú'
        29: 3,  # 'ü'
        42: 2,  # 'ő'
        56: 1,  # 'ű'
    },
    3: {  # 't'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 3,  # 'b'
        26: 2,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 2,  # 'f'
        12: 1,  # 'g'
        20: 3,  # 'h'
        9: 3,  # 'i'
        22: 3,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 3,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 3,  # 'ó'
        24: 3,  # 'ö'
        31: 3,  # 'ú'
        29: 3,  # 'ü'
        42: 3,  # 'ő'
        56: 2,  # 'ű'
    },
    21: {  # 'u'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 2,  # 'b'
        26: 2,  # 'c'
        17: 3,  # 'd'
        1: 2,  # 'e'
        27: 1,  # 'f'
        12: 3,  # 'g'
        20: 2,  # 'h'
        9: 2,  # 'i'
        22: 2,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 1,  # 'o'
        23: 2,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 1,  # 'u'
        19: 3,  # 'v'
        62: 1,  # 'x'
        16: 1,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 2,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 0,  # 'ö'
        31: 1,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    19: {  # 'v'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 2,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 3,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 1,  # 'r'
        5: 2,  # 's'
        3: 2,  # 't'
        21: 2,  # 'u'
        19: 2,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 2,  # 'ó'
        24: 2,  # 'ö'
        31: 1,  # 'ú'
        29: 2,  # 'ü'
        42: 1,  # 'ő'
        56: 1,  # 'ű'
    },
    62: {  # 'x'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 0,  # 'd'
        1: 1,  # 'e'
        27: 1,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 1,  # 'i'
        22: 0,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 1,  # 'o'
        23: 1,  # 'p'
        10: 1,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 1,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 0,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 1,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    16: {  # 'y'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 2,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 3,  # 'e'
        27: 2,  # 'f'
        12: 2,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 2,  # 'j'
        7: 2,  # 'k'
        6: 2,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 2,  # 'p'
        10: 2,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 2,  # 'í'
        25: 2,  # 'ó'
        24: 3,  # 'ö'
        31: 2,  # 'ú'
        29: 2,  # 'ü'
        42: 1,  # 'ő'
        56: 2,  # 'ű'
    },
    11: {  # 'z'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 3,  # 'a'
        18: 2,  # 'b'
        26: 1,  # 'c'
        17: 3,  # 'd'
        1: 3,  # 'e'
        27: 1,  # 'f'
        12: 2,  # 'g'
        20: 2,  # 'h'
        9: 3,  # 'i'
        22: 1,  # 'j'
        7: 3,  # 'k'
        6: 2,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 3,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 3,  # 'u'
        19: 2,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 3,  # 'á'
        15: 3,  # 'é'
        30: 3,  # 'í'
        25: 3,  # 'ó'
        24: 3,  # 'ö'
        31: 2,  # 'ú'
        29: 3,  # 'ü'
        42: 2,  # 'ő'
        56: 1,  # 'ű'
    },
    51: {  # 'Á'
        28: 0,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 0,  # 'E'
        50: 1,  # 'F'
        49: 2,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 2,  # 'L'
        34: 1,  # 'M'
        35: 2,  # 'N'
        47: 0,  # 'O'
        46: 1,  # 'P'
        43: 2,  # 'R'
        33: 2,  # 'S'
        37: 1,  # 'T'
        57: 0,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 0,  # 'e'
        27: 0,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 0,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 2,  # 'l'
        13: 2,  # 'm'
        4: 0,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 1,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 0,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 1,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    44: {  # 'É'
        28: 0,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 1,  # 'E'
        50: 0,  # 'F'
        49: 2,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 2,  # 'L'
        34: 1,  # 'M'
        35: 2,  # 'N'
        47: 0,  # 'O'
        46: 1,  # 'P'
        43: 2,  # 'R'
        33: 2,  # 'S'
        37: 2,  # 'T'
        57: 0,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 0,  # 'e'
        27: 0,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 0,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 2,  # 'l'
        13: 1,  # 'm'
        4: 2,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 3,  # 's'
        3: 1,  # 't'
        21: 0,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 0,  # 'z'
        51: 0,  # 'Á'
        44: 1,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    61: {  # 'Í'
        28: 0,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 0,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 1,  # 'J'
        36: 0,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 0,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 0,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 0,  # 'e'
        27: 0,  # 'f'
        12: 2,  # 'g'
        20: 0,  # 'h'
        9: 0,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 1,  # 'm'
        4: 0,  # 'n'
        8: 0,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 0,  # 's'
        3: 1,  # 't'
        21: 0,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    58: {  # 'Ó'
        28: 1,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 0,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 1,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 2,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 0,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 0,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 0,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 2,  # 'h'
        9: 0,  # 'i'
        22: 0,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 1,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 1,  # 'r'
        5: 1,  # 's'
        3: 0,  # 't'
        21: 0,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 1,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    59: {  # 'Ö'
        28: 0,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 0,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 0,  # 'O'
        46: 1,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 0,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 0,  # 'b'
        26: 1,  # 'c'
        17: 1,  # 'd'
        1: 0,  # 'e'
        27: 0,  # 'f'
        12: 0,  # 'g'
        20: 0,  # 'h'
        9: 0,  # 'i'
        22: 0,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        8: 0,  # 'o'
        23: 0,  # 'p'
        10: 2,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 0,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    60: {  # 'Ú'
        28: 0,  # 'A'
        40: 1,  # 'B'
        54: 1,  # 'C'
        45: 1,  # 'D'
        32: 0,  # 'E'
        50: 1,  # 'F'
        49: 1,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 0,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 0,  # 'b'
        26: 0,  # 'c'
        17: 0,  # 'd'
        1: 0,  # 'e'
        27: 0,  # 'f'
        12: 2,  # 'g'
        20: 0,  # 'h'
        9: 0,  # 'i'
        22: 2,  # 'j'
        7: 0,  # 'k'
        6: 0,  # 'l'
        13: 0,  # 'm'
        4: 1,  # 'n'
        8: 0,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 0,  # 'u'
        19: 0,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 0,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    63: {  # 'Ü'
        28: 0,  # 'A'
        40: 1,  # 'B'
        54: 0,  # 'C'
        45: 1,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 1,  # 'G'
        38: 1,  # 'H'
        39: 0,  # 'I'
        53: 1,  # 'J'
        36: 1,  # 'K'
        41: 1,  # 'L'
        34: 1,  # 'M'
        35: 1,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 1,  # 'R'
        33: 1,  # 'S'
        37: 1,  # 'T'
        57: 0,  # 'U'
        48: 1,  # 'V'
        55: 0,  # 'Y'
        52: 1,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 0,  # 'c'
        17: 1,  # 'd'
        1: 0,  # 'e'
        27: 0,  # 'f'
        12: 1,  # 'g'
        20: 0,  # 'h'
        9: 0,  # 'i'
        22: 0,  # 'j'
        7: 0,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 1,  # 'n'
        8: 0,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 0,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 1,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    14: {  # 'á'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 3,  # 'b'
        26: 3,  # 'c'
        17: 3,  # 'd'
        1: 1,  # 'e'
        27: 2,  # 'f'
        12: 3,  # 'g'
        20: 2,  # 'h'
        9: 2,  # 'i'
        22: 3,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 1,  # 'o'
        23: 2,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 2,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 1,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 1,  # 'á'
        15: 2,  # 'é'
        30: 1,  # 'í'
        25: 0,  # 'ó'
        24: 1,  # 'ö'
        31: 0,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    15: {  # 'é'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 3,  # 'b'
        26: 2,  # 'c'
        17: 3,  # 'd'
        1: 1,  # 'e'
        27: 1,  # 'f'
        12: 3,  # 'g'
        20: 3,  # 'h'
        9: 2,  # 'i'
        22: 2,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 1,  # 'o'
        23: 3,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 0,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    30: {  # 'í'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 0,  # 'a'
        18: 1,  # 'b'
        26: 2,  # 'c'
        17: 1,  # 'd'
        1: 0,  # 'e'
        27: 1,  # 'f'
        12: 3,  # 'g'
        20: 0,  # 'h'
        9: 0,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 2,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 3,  # 'r'
        5: 2,  # 's'
        3: 3,  # 't'
        21: 0,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    25: {  # 'ó'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 2,  # 'a'
        18: 3,  # 'b'
        26: 2,  # 'c'
        17: 3,  # 'd'
        1: 1,  # 'e'
        27: 2,  # 'f'
        12: 2,  # 'g'
        20: 2,  # 'h'
        9: 2,  # 'i'
        22: 2,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        8: 1,  # 'o'
        23: 2,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 1,  # 'u'
        19: 2,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 0,  # 'ó'
        24: 1,  # 'ö'
        31: 1,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    24: {  # 'ö'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 0,  # 'a'
        18: 3,  # 'b'
        26: 1,  # 'c'
        17: 2,  # 'd'
        1: 0,  # 'e'
        27: 1,  # 'f'
        12: 2,  # 'g'
        20: 1,  # 'h'
        9: 0,  # 'i'
        22: 1,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        8: 0,  # 'o'
        23: 2,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 3,  # 't'
        21: 0,  # 'u'
        19: 3,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 3,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    31: {  # 'ú'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 1,  # 'b'
        26: 2,  # 'c'
        17: 1,  # 'd'
        1: 1,  # 'e'
        27: 2,  # 'f'
        12: 3,  # 'g'
        20: 1,  # 'h'
        9: 1,  # 'i'
        22: 3,  # 'j'
        7: 1,  # 'k'
        6: 3,  # 'l'
        13: 1,  # 'm'
        4: 2,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 3,  # 'r'
        5: 3,  # 's'
        3: 2,  # 't'
        21: 1,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 1,  # 'á'
        15: 1,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    29: {  # 'ü'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 1,  # 'b'
        26: 1,  # 'c'
        17: 2,  # 'd'
        1: 1,  # 'e'
        27: 1,  # 'f'
        12: 3,  # 'g'
        20: 2,  # 'h'
        9: 1,  # 'i'
        22: 1,  # 'j'
        7: 3,  # 'k'
        6: 3,  # 'l'
        13: 1,  # 'm'
        4: 3,  # 'n'
        8: 0,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 2,  # 's'
        3: 2,  # 't'
        21: 0,  # 'u'
        19: 2,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 1,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    42: {  # 'ő'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 2,  # 'b'
        26: 1,  # 'c'
        17: 2,  # 'd'
        1: 1,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 1,  # 'i'
        22: 1,  # 'j'
        7: 2,  # 'k'
        6: 3,  # 'l'
        13: 1,  # 'm'
        4: 2,  # 'n'
        8: 1,  # 'o'
        23: 1,  # 'p'
        10: 2,  # 'r'
        5: 2,  # 's'
        3: 2,  # 't'
        21: 1,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 1,  # 'é'
        30: 1,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 1,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
    56: {  # 'ű'
        28: 0,  # 'A'
        40: 0,  # 'B'
        54: 0,  # 'C'
        45: 0,  # 'D'
        32: 0,  # 'E'
        50: 0,  # 'F'
        49: 0,  # 'G'
        38: 0,  # 'H'
        39: 0,  # 'I'
        53: 0,  # 'J'
        36: 0,  # 'K'
        41: 0,  # 'L'
        34: 0,  # 'M'
        35: 0,  # 'N'
        47: 0,  # 'O'
        46: 0,  # 'P'
        43: 0,  # 'R'
        33: 0,  # 'S'
        37: 0,  # 'T'
        57: 0,  # 'U'
        48: 0,  # 'V'
        55: 0,  # 'Y'
        52: 0,  # 'Z'
        2: 1,  # 'a'
        18: 1,  # 'b'
        26: 0,  # 'c'
        17: 1,  # 'd'
        1: 1,  # 'e'
        27: 1,  # 'f'
        12: 1,  # 'g'
        20: 1,  # 'h'
        9: 1,  # 'i'
        22: 1,  # 'j'
        7: 1,  # 'k'
        6: 1,  # 'l'
        13: 0,  # 'm'
        4: 2,  # 'n'
        8: 0,  # 'o'
        23: 0,  # 'p'
        10: 1,  # 'r'
        5: 1,  # 's'
        3: 1,  # 't'
        21: 0,  # 'u'
        19: 1,  # 'v'
        62: 0,  # 'x'
        16: 0,  # 'y'
        11: 2,  # 'z'
        51: 0,  # 'Á'
        44: 0,  # 'É'
        61: 0,  # 'Í'
        58: 0,  # 'Ó'
        59: 0,  # 'Ö'
        60: 0,  # 'Ú'
        63: 0,  # 'Ü'
        14: 0,  # 'á'
        15: 0,  # 'é'
        30: 0,  # 'í'
        25: 0,  # 'ó'
        24: 0,  # 'ö'
        31: 0,  # 'ú'
        29: 0,  # 'ü'
        42: 0,  # 'ő'
        56: 0,  # 'ű'
    },
}

# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters

# Character Mapping Table(s):
WINDOWS_1250_HUNGARIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 28,  # 'A'
    66: 40,  # 'B'
    67: 54,  # 'C'
    68: 45,  # 'D'
    69: 32,  # 'E'
    70: 50,  # 'F'
    71: 49,  # 'G'
    72: 38,  # 'H'
    73: 39,  # 'I'
    74: 53,  # 'J'
    75: 36,  # 'K'
    76: 41,  # 'L'
    77: 34,  # 'M'
    78: 35,  # 'N'
    79: 47,  # 'O'
    80: 46,  # 'P'
    81: 72,  # 'Q'
    82: 43,  # 'R'
    83: 33,  # 'S'
    84: 37,  # 'T'
    85: 57,  # 'U'
    86: 48,  # 'V'
    87: 64,  # 'W'
    88: 68,  # 'X'
    89: 55,  # 'Y'
    90: 52,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 2,  # 'a'
    98: 18,  # 'b'
    99: 26,  # 'c'
    100: 17,  # 'd'
    101: 1,  # 'e'
    102: 27,  # 'f'
    103: 12,  # 'g'
    104: 20,  # 'h'
    105: 9,  # 'i'
    106: 22,  # 'j'
    107: 7,  # 'k'
    108: 6,  # 'l'
    109: 13,  # 'm'
    110: 4,  # 'n'
    111: 8,  # 'o'
    112: 23,  # 'p'
    113: 67,  # 'q'
    114: 10,  # 'r'
    115: 5,  # 's'
    116: 3,  # 't'
    117: 21,  # 'u'
    118: 19,  # 'v'
    119: 65,  # 'w'
    120: 62,  # 'x'
    121: 16,  # 'y'
    122: 11,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 161,  # '€'
    129: 162,  # None
    130: 163,  # '‚'
    131: 164,  # None
    132: 165,  # '„'
    133: 166,  # '…'
    134: 167,  # '†'
    135: 168,  # '‡'
    136: 169,  # None
    137: 170,  # '‰'
    138: 171,  # 'Š'
    139: 172,  # '‹'
    140: 173,  # 'Ś'
    141: 174,  # 'Ť'
    142: 175,  # 'Ž'
    143: 176,  # 'Ź'
    144: 177,  # None
    145: 178,  # '‘'
    146: 179,  # '’'
    147: 180,  # '“'
    148: 78,  # '”'
    149: 181,  # '•'
    150: 69,  # '–'
    151: 182,  # '—'
    152: 183,  # None
    153: 184,  # '™'
    154: 185,  # 'š'
    155: 186,  # '›'
    156: 187,  # 'ś'
    157: 188,  # 'ť'
    158: 189,  # 'ž'
    159: 190,  # 'ź'
    160: 191,  # '\xa0'
    161: 192,  # 'ˇ'
    162: 193,  # '˘'
    163: 194,  # 'Ł'
    164: 195,  # '¤'
    165: 196,  # 'Ą'
    166: 197,  # '¦'
    167: 76,  # '§'
    168: 198,  # '¨'
    169: 199,  # '©'
    170: 200,  # 'Ş'
    171: 201,  # '«'
    172: 202,  # '¬'
    173: 203,  # '\xad'
    174: 204,  # '®'
    175: 205,  # 'Ż'
    176: 81,  # '°'
    177: 206,  # '±'
    178: 207,  # '˛'
    179: 208,  # 'ł'
    180: 209,  # '´'
    181: 210,  # 'µ'
    182: 211,  # '¶'
    183: 212,  # '·'
    184: 213,  # '¸'
    185: 214,  # 'ą'
    186: 215,  # 'ş'
    187: 216,  # '»'
    188: 217,  # 'Ľ'
    189: 218,  # '˝'
    190: 219,  # 'ľ'
    191: 220,  # 'ż'
    192: 221,  # 'Ŕ'
    193: 51,  # 'Á'
    194: 83,  # 'Â'
    195: 222,  # 'Ă'
    196: 80,  # 'Ä'
    197: 223,  # 'Ĺ'
    198: 224,  # 'Ć'
    199: 225,  # 'Ç'
    200: 226,  # 'Č'
    201: 44,  # 'É'
    202: 227,  # 'Ę'
    203: 228,  # 'Ë'
    204: 229,  # 'Ě'
    205: 61,  # 'Í'
    206: 230,  # 'Î'
    207: 231,  # 'Ď'
    208: 232,  # 'Đ'
    209: 233,  # 'Ń'
    210: 234,  # 'Ň'
    211: 58,  # 'Ó'
    212: 235,  # 'Ô'
    213: 66,  # 'Ő'
    214: 59,  # 'Ö'
    215: 236,  # '×'
    216: 237,  # 'Ř'
    217: 238,  # 'Ů'
    218: 60,  # 'Ú'
    219: 70,  # 'Ű'
    220: 63,  # 'Ü'
    221: 239,  # 'Ý'
    222: 240,  # 'Ţ'
    223: 241,  # 'ß'
    224: 84,  # 'ŕ'
    225: 14,  # 'á'
    226: 75,  # 'â'
    227: 242,  # 'ă'
    228: 71,  # 'ä'
    229: 82,  # 'ĺ'
    230: 243,  # 'ć'
    231: 73,  # 'ç'
    232: 244,  # 'č'
    233: 15,  # 'é'
    234: 85,  # 'ę'
    235: 79,  # 'ë'
    236: 86,  # 'ě'
    237: 30,  # 'í'
    238: 77,  # 'î'
    239: 87,  # 'ď'
    240: 245,  # 'đ'
    241: 246,  # 'ń'
    242: 247,  # 'ň'
    243: 25,  # 'ó'
    244: 74,  # 'ô'
    245: 42,  # 'ő'
    246: 24,  # 'ö'
    247: 248,  # '÷'
    248: 249,  # 'ř'
    249: 250,  # 'ů'
    250: 31,  # 'ú'
    251: 56,  # 'ű'
    252: 29,  # 'ü'
    253: 251,  # 'ý'
    254: 252,  # 'ţ'
    255: 253,  # '˙'
}

WINDOWS_1250_HUNGARIAN_MODEL = SingleByteCharSetModel(
    charset_name="windows-1250",
    language="Hungarian",
    char_to_order_map=WINDOWS_1250_HUNGARIAN_CHAR_TO_ORDER,
    language_model=HUNGARIAN_LANG_MODEL,
    typical_positive_ratio=0.947368,
    keep_ascii_letters=True,
    alphabet="ABCDEFGHIJKLMNOPRSTUVZabcdefghijklmnoprstuvzÁÉÍÓÖÚÜáéíóöúüŐőŰű",
)

ISO_8859_2_HUNGARIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 28,  # 'A'
    66: 40,  # 'B'
    67: 54,  # 'C'
    68: 45,  # 'D'
    69: 32,  # 'E'
    70: 50,  # 'F'
    71: 49,  # 'G'
    72: 38,  # 'H'
    73: 39,  # 'I'
    74: 53,  # 'J'
    75: 36,  # 'K'
    76: 41,  # 'L'
    77: 34,  # 'M'
    78: 35,  # 'N'
    79: 47,  # 'O'
    80: 46,  # 'P'
    81: 71,  # 'Q'
    82: 43,  # 'R'
    83: 33,  # 'S'
    84: 37,  # 'T'
    85: 57,  # 'U'
    86: 48,  # 'V'
    87: 64,  # 'W'
    88: 68,  # 'X'
    89: 55,  # 'Y'
    90: 52,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 2,  # 'a'
    98: 18,  # 'b'
    99: 26,  # 'c'
    100: 17,  # 'd'
    101: 1,  # 'e'
    102: 27,  # 'f'
    103: 12,  # 'g'
    104: 20,  # 'h'
    105: 9,  # 'i'
    106: 22,  # 'j'
    107: 7,  # 'k'
    108: 6,  # 'l'
    109: 13,  # 'm'
    110: 4,  # 'n'
    111: 8,  # 'o'
    112: 23,  # 'p'
    113: 67,  # 'q'
    114: 10,  # 'r'
    115: 5,  # 's'
    116: 3,  # 't'
    117: 21,  # 'u'
    118: 19,  # 'v'
    119: 65,  # 'w'
    120: 62,  # 'x'
    121: 16,  # 'y'
    122: 11,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 159,  # '\x80'
    129: 160,  # '\x81'
    130: 161,  # '\x82'
    131: 162,  # '\x83'
    132: 163,  # '\x84'
    133: 164,  # '\x85'
    134: 165,  # '\x86'
    135: 166,  # '\x87'
    136: 167,  # '\x88'
    137: 168,  # '\x89'
    138: 169,  # '\x8a'
    139: 170,  # '\x8b'
    140: 171,  # '\x8c'
    141: 172,  # '\x8d'
    142: 173,  # '\x8e'
    143: 174,  # '\x8f'
    144: 175,  # '\x90'
    145: 176,  # '\x91'
    146: 177,  # '\x92'
    147: 178,  # '\x93'
    148: 179,  # '\x94'
    149: 180,  # '\x95'
    150: 181,  # '\x96'
    151: 182,  # '\x97'
    152: 183,  # '\x98'
    153: 184,  # '\x99'
    154: 185,  # '\x9a'
    155: 186,  # '\x9b'
    156: 187,  # '\x9c'
    157: 188,  # '\x9d'
    158: 189,  # '\x9e'
    159: 190,  # '\x9f'
    160: 191,  # '\xa0'
    161: 192,  # 'Ą'
    162: 193,  # '˘'
    163: 194,  # 'Ł'
    164: 195,  # '¤'
    165: 196,  # 'Ľ'
    166: 197,  # 'Ś'
    167: 75,  # '§'
    168: 198,  # '¨'
    169: 199,  # 'Š'
    170: 200,  # 'Ş'
    171: 201,  # 'Ť'
    172: 202,  # 'Ź'
    173: 203,  # '\xad'
    174: 204,  # 'Ž'
    175: 205,  # 'Ż'
    176: 79,  # '°'
    177: 206,  # 'ą'
    178: 207,  # '˛'
    179: 208,  # 'ł'
    180: 209,  # '´'
    181: 210,  # 'ľ'
    182: 211,  # 'ś'
    183: 212,  # 'ˇ'
    184: 213,  # '¸'
    185: 214,  # 'š'
    186: 215,  # 'ş'
    187: 216,  # 'ť'
    188: 217,  # 'ź'
    189: 218,  # '˝'
    190: 219,  # 'ž'
    191: 220,  # 'ż'
    192: 221,  # 'Ŕ'
    193: 51,  # 'Á'
    194: 81,  # 'Â'
    195: 222,  # 'Ă'
    196: 78,  # 'Ä'
    197: 223,  # 'Ĺ'
    198: 224,  # 'Ć'
    199: 225,  # 'Ç'
    200: 226,  # 'Č'
    201: 44,  # 'É'
    202: 227,  # 'Ę'
    203: 228,  # 'Ë'
    204: 229,  # 'Ě'
    205: 61,  # 'Í'
    206: 230,  # 'Î'
    207: 231,  # 'Ď'
    208: 232,  # 'Đ'
    209: 233,  # 'Ń'
    210: 234,  # 'Ň'
    211: 58,  # 'Ó'
    212: 235,  # 'Ô'
    213: 66,  # 'Ő'
    214: 59,  # 'Ö'
    215: 236,  # '×'
    216: 237,  # 'Ř'
    217: 238,  # 'Ů'
    218: 60,  # 'Ú'
    219: 69,  # 'Ű'
    220: 63,  # 'Ü'
    221: 239,  # 'Ý'
    222: 240,  # 'Ţ'
    223: 241,  # 'ß'
    224: 82,  # 'ŕ'
    225: 14,  # 'á'
    226: 74,  # 'â'
    227: 242,  # 'ă'
    228: 70,  # 'ä'
    229: 80,  # 'ĺ'
    230: 243,  # 'ć'
    231: 72,  # 'ç'
    232: 244,  # 'č'
    233: 15,  # 'é'
    234: 83,  # 'ę'
    235: 77,  # 'ë'
    236: 84,  # 'ě'
    237: 30,  # 'í'
    238: 76,  # 'î'
    239: 85,  # 'ď'
    240: 245,  # 'đ'
    241: 246,  # 'ń'
    242: 247,  # 'ň'
    243: 25,  # 'ó'
    244: 73,  # 'ô'
    245: 42,  # 'ő'
    246: 24,  # 'ö'
    247: 248,  # '÷'
    248: 249,  # 'ř'
    249: 250,  # 'ů'
    250: 31,  # 'ú'
    251: 56,  # 'ű'
    252: 29,  # 'ü'
    253: 251,  # 'ý'
    254: 252,  # 'ţ'
    255: 253,  # '˙'
}

ISO_8859_2_HUNGARIAN_MODEL = SingleByteCharSetModel(
    charset_name="ISO-8859-2",
    language="Hungarian",
    char_to_order_map=ISO_8859_2_HUNGARIAN_CHAR_TO_ORDER,
    language_model=HUNGARIAN_LANG_MODEL,
    typical_positive_ratio=0.947368,
    keep_ascii_letters=True,
    alphabet="ABCDEFGHIJKLMNOPRSTUVZabcdefghijklmnoprstuvzÁÉÍÓÖÚÜáéíóöúüŐőŰű",
)
python3.12/site-packages/pip/_vendor/chardet/mbcssm.py000064400000073267151732703210016625 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .codingstatemachinedict import CodingStateMachineDict
from .enums import MachineState

# BIG5

# fmt: off
BIG5_CLS = (
    1, 1, 1, 1, 1, 1, 1, 1,  # 00 - 07    #allow 0x00 as legal value
    1, 1, 1, 1, 1, 1, 0, 0,  # 08 - 0f
    1, 1, 1, 1, 1, 1, 1, 1,  # 10 - 17
    1, 1, 1, 0, 1, 1, 1, 1,  # 18 - 1f
    1, 1, 1, 1, 1, 1, 1, 1,  # 20 - 27
    1, 1, 1, 1, 1, 1, 1, 1,  # 28 - 2f
    1, 1, 1, 1, 1, 1, 1, 1,  # 30 - 37
    1, 1, 1, 1, 1, 1, 1, 1,  # 38 - 3f
    2, 2, 2, 2, 2, 2, 2, 2,  # 40 - 47
    2, 2, 2, 2, 2, 2, 2, 2,  # 48 - 4f
    2, 2, 2, 2, 2, 2, 2, 2,  # 50 - 57
    2, 2, 2, 2, 2, 2, 2, 2,  # 58 - 5f
    2, 2, 2, 2, 2, 2, 2, 2,  # 60 - 67
    2, 2, 2, 2, 2, 2, 2, 2,  # 68 - 6f
    2, 2, 2, 2, 2, 2, 2, 2,  # 70 - 77
    2, 2, 2, 2, 2, 2, 2, 1,  # 78 - 7f
    4, 4, 4, 4, 4, 4, 4, 4,  # 80 - 87
    4, 4, 4, 4, 4, 4, 4, 4,  # 88 - 8f
    4, 4, 4, 4, 4, 4, 4, 4,  # 90 - 97
    4, 4, 4, 4, 4, 4, 4, 4,  # 98 - 9f
    4, 3, 3, 3, 3, 3, 3, 3,  # a0 - a7
    3, 3, 3, 3, 3, 3, 3, 3,  # a8 - af
    3, 3, 3, 3, 3, 3, 3, 3,  # b0 - b7
    3, 3, 3, 3, 3, 3, 3, 3,  # b8 - bf
    3, 3, 3, 3, 3, 3, 3, 3,  # c0 - c7
    3, 3, 3, 3, 3, 3, 3, 3,  # c8 - cf
    3, 3, 3, 3, 3, 3, 3, 3,  # d0 - d7
    3, 3, 3, 3, 3, 3, 3, 3,  # d8 - df
    3, 3, 3, 3, 3, 3, 3, 3,  # e0 - e7
    3, 3, 3, 3, 3, 3, 3, 3,  # e8 - ef
    3, 3, 3, 3, 3, 3, 3, 3,  # f0 - f7
    3, 3, 3, 3, 3, 3, 3, 0  # f8 - ff
)

BIG5_ST = (
    MachineState.ERROR,MachineState.START,MachineState.START,     3,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#00-07
    MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,#08-0f
    MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START#10-17
)
# fmt: on

BIG5_CHAR_LEN_TABLE = (0, 1, 1, 2, 0)

BIG5_SM_MODEL: CodingStateMachineDict = {
    "class_table": BIG5_CLS,
    "class_factor": 5,
    "state_table": BIG5_ST,
    "char_len_table": BIG5_CHAR_LEN_TABLE,
    "name": "Big5",
}

# CP949
# fmt: off
CP949_CLS  = (
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,  # 00 - 0f
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,  # 10 - 1f
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  # 20 - 2f
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  # 30 - 3f
    1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,  # 40 - 4f
    4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1,  # 50 - 5f
    1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,  # 60 - 6f
    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1,  # 70 - 7f
    0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,  # 80 - 8f
    6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,  # 90 - 9f
    6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8,  # a0 - af
    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,  # b0 - bf
    7, 7, 7, 7, 7, 7, 9, 2, 2, 3, 2, 2, 2, 2, 2, 2,  # c0 - cf
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  # d0 - df
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  # e0 - ef
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,  # f0 - ff
)

CP949_ST = (
#cls=    0      1      2      3      4      5      6      7      8      9  # previous state =
    MachineState.ERROR,MachineState.START,     3,MachineState.ERROR,MachineState.START,MachineState.START,     4,     5,MachineState.ERROR,     6, # MachineState.START
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, # MachineState.ERROR
    MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME, # MachineState.ITS_ME
    MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START, # 3
    MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START, # 4
    MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START, # 5
    MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START, # 6
)
# fmt: on

CP949_CHAR_LEN_TABLE = (0, 1, 2, 0, 1, 1, 2, 2, 0, 2)

CP949_SM_MODEL: CodingStateMachineDict = {
    "class_table": CP949_CLS,
    "class_factor": 10,
    "state_table": CP949_ST,
    "char_len_table": CP949_CHAR_LEN_TABLE,
    "name": "CP949",
}

# EUC-JP
# fmt: off
EUCJP_CLS = (
    4, 4, 4, 4, 4, 4, 4, 4,  # 00 - 07
    4, 4, 4, 4, 4, 4, 5, 5,  # 08 - 0f
    4, 4, 4, 4, 4, 4, 4, 4,  # 10 - 17
    4, 4, 4, 5, 4, 4, 4, 4,  # 18 - 1f
    4, 4, 4, 4, 4, 4, 4, 4,  # 20 - 27
    4, 4, 4, 4, 4, 4, 4, 4,  # 28 - 2f
    4, 4, 4, 4, 4, 4, 4, 4,  # 30 - 37
    4, 4, 4, 4, 4, 4, 4, 4,  # 38 - 3f
    4, 4, 4, 4, 4, 4, 4, 4,  # 40 - 47
    4, 4, 4, 4, 4, 4, 4, 4,  # 48 - 4f
    4, 4, 4, 4, 4, 4, 4, 4,  # 50 - 57
    4, 4, 4, 4, 4, 4, 4, 4,  # 58 - 5f
    4, 4, 4, 4, 4, 4, 4, 4,  # 60 - 67
    4, 4, 4, 4, 4, 4, 4, 4,  # 68 - 6f
    4, 4, 4, 4, 4, 4, 4, 4,  # 70 - 77
    4, 4, 4, 4, 4, 4, 4, 4,  # 78 - 7f
    5, 5, 5, 5, 5, 5, 5, 5,  # 80 - 87
    5, 5, 5, 5, 5, 5, 1, 3,  # 88 - 8f
    5, 5, 5, 5, 5, 5, 5, 5,  # 90 - 97
    5, 5, 5, 5, 5, 5, 5, 5,  # 98 - 9f
    5, 2, 2, 2, 2, 2, 2, 2,  # a0 - a7
    2, 2, 2, 2, 2, 2, 2, 2,  # a8 - af
    2, 2, 2, 2, 2, 2, 2, 2,  # b0 - b7
    2, 2, 2, 2, 2, 2, 2, 2,  # b8 - bf
    2, 2, 2, 2, 2, 2, 2, 2,  # c0 - c7
    2, 2, 2, 2, 2, 2, 2, 2,  # c8 - cf
    2, 2, 2, 2, 2, 2, 2, 2,  # d0 - d7
    2, 2, 2, 2, 2, 2, 2, 2,  # d8 - df
    0, 0, 0, 0, 0, 0, 0, 0,  # e0 - e7
    0, 0, 0, 0, 0, 0, 0, 0,  # e8 - ef
    0, 0, 0, 0, 0, 0, 0, 0,  # f0 - f7
    0, 0, 0, 0, 0, 0, 0, 5  # f8 - ff
)

EUCJP_ST = (
          3,     4,     3,     5,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#00-07
     MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
     MachineState.ITS_ME,MachineState.ITS_ME,MachineState.START,MachineState.ERROR,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#10-17
     MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,     3,MachineState.ERROR,#18-1f
          3,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START#20-27
)
# fmt: on

EUCJP_CHAR_LEN_TABLE = (2, 2, 2, 3, 1, 0)

EUCJP_SM_MODEL: CodingStateMachineDict = {
    "class_table": EUCJP_CLS,
    "class_factor": 6,
    "state_table": EUCJP_ST,
    "char_len_table": EUCJP_CHAR_LEN_TABLE,
    "name": "EUC-JP",
}

# EUC-KR
# fmt: off
EUCKR_CLS  = (
    1, 1, 1, 1, 1, 1, 1, 1,  # 00 - 07
    1, 1, 1, 1, 1, 1, 0, 0,  # 08 - 0f
    1, 1, 1, 1, 1, 1, 1, 1,  # 10 - 17
    1, 1, 1, 0, 1, 1, 1, 1,  # 18 - 1f
    1, 1, 1, 1, 1, 1, 1, 1,  # 20 - 27
    1, 1, 1, 1, 1, 1, 1, 1,  # 28 - 2f
    1, 1, 1, 1, 1, 1, 1, 1,  # 30 - 37
    1, 1, 1, 1, 1, 1, 1, 1,  # 38 - 3f
    1, 1, 1, 1, 1, 1, 1, 1,  # 40 - 47
    1, 1, 1, 1, 1, 1, 1, 1,  # 48 - 4f
    1, 1, 1, 1, 1, 1, 1, 1,  # 50 - 57
    1, 1, 1, 1, 1, 1, 1, 1,  # 58 - 5f
    1, 1, 1, 1, 1, 1, 1, 1,  # 60 - 67
    1, 1, 1, 1, 1, 1, 1, 1,  # 68 - 6f
    1, 1, 1, 1, 1, 1, 1, 1,  # 70 - 77
    1, 1, 1, 1, 1, 1, 1, 1,  # 78 - 7f
    0, 0, 0, 0, 0, 0, 0, 0,  # 80 - 87
    0, 0, 0, 0, 0, 0, 0, 0,  # 88 - 8f
    0, 0, 0, 0, 0, 0, 0, 0,  # 90 - 97
    0, 0, 0, 0, 0, 0, 0, 0,  # 98 - 9f
    0, 2, 2, 2, 2, 2, 2, 2,  # a0 - a7
    2, 2, 2, 2, 2, 3, 3, 3,  # a8 - af
    2, 2, 2, 2, 2, 2, 2, 2,  # b0 - b7
    2, 2, 2, 2, 2, 2, 2, 2,  # b8 - bf
    2, 2, 2, 2, 2, 2, 2, 2,  # c0 - c7
    2, 3, 2, 2, 2, 2, 2, 2,  # c8 - cf
    2, 2, 2, 2, 2, 2, 2, 2,  # d0 - d7
    2, 2, 2, 2, 2, 2, 2, 2,  # d8 - df
    2, 2, 2, 2, 2, 2, 2, 2,  # e0 - e7
    2, 2, 2, 2, 2, 2, 2, 2,  # e8 - ef
    2, 2, 2, 2, 2, 2, 2, 2,  # f0 - f7
    2, 2, 2, 2, 2, 2, 2, 0   # f8 - ff
)

EUCKR_ST = (
    MachineState.ERROR,MachineState.START,     3,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#00-07
    MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START #08-0f
)
# fmt: on

EUCKR_CHAR_LEN_TABLE = (0, 1, 2, 0)

EUCKR_SM_MODEL: CodingStateMachineDict = {
    "class_table": EUCKR_CLS,
    "class_factor": 4,
    "state_table": EUCKR_ST,
    "char_len_table": EUCKR_CHAR_LEN_TABLE,
    "name": "EUC-KR",
}

# JOHAB
# fmt: off
JOHAB_CLS = (
    4,4,4,4,4,4,4,4,  # 00 - 07
    4,4,4,4,4,4,0,0,  # 08 - 0f
    4,4,4,4,4,4,4,4,  # 10 - 17
    4,4,4,0,4,4,4,4,  # 18 - 1f
    4,4,4,4,4,4,4,4,  # 20 - 27
    4,4,4,4,4,4,4,4,  # 28 - 2f
    4,3,3,3,3,3,3,3,  # 30 - 37
    3,3,3,3,3,3,3,3,  # 38 - 3f
    3,1,1,1,1,1,1,1,  # 40 - 47
    1,1,1,1,1,1,1,1,  # 48 - 4f
    1,1,1,1,1,1,1,1,  # 50 - 57
    1,1,1,1,1,1,1,1,  # 58 - 5f
    1,1,1,1,1,1,1,1,  # 60 - 67
    1,1,1,1,1,1,1,1,  # 68 - 6f
    1,1,1,1,1,1,1,1,  # 70 - 77
    1,1,1,1,1,1,1,2,  # 78 - 7f
    6,6,6,6,8,8,8,8,  # 80 - 87
    8,8,8,8,8,8,8,8,  # 88 - 8f
    8,7,7,7,7,7,7,7,  # 90 - 97
    7,7,7,7,7,7,7,7,  # 98 - 9f
    7,7,7,7,7,7,7,7,  # a0 - a7
    7,7,7,7,7,7,7,7,  # a8 - af
    7,7,7,7,7,7,7,7,  # b0 - b7
    7,7,7,7,7,7,7,7,  # b8 - bf
    7,7,7,7,7,7,7,7,  # c0 - c7
    7,7,7,7,7,7,7,7,  # c8 - cf
    7,7,7,7,5,5,5,5,  # d0 - d7
    5,9,9,9,9,9,9,5,  # d8 - df
    9,9,9,9,9,9,9,9,  # e0 - e7
    9,9,9,9,9,9,9,9,  # e8 - ef
    9,9,9,9,9,9,9,9,  # f0 - f7
    9,9,5,5,5,5,5,0   # f8 - ff
)

JOHAB_ST = (
# cls = 0                   1                   2                   3                   4                   5                   6                   7                   8                   9
    MachineState.ERROR ,MachineState.START ,MachineState.START ,MachineState.START ,MachineState.START ,MachineState.ERROR ,MachineState.ERROR ,3                  ,3                  ,4                  ,  # MachineState.START
    MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,  # MachineState.ITS_ME
    MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,MachineState.ERROR ,  # MachineState.ERROR
    MachineState.ERROR ,MachineState.START ,MachineState.START ,MachineState.ERROR ,MachineState.ERROR ,MachineState.START ,MachineState.START ,MachineState.START ,MachineState.START ,MachineState.START ,  # 3
    MachineState.ERROR ,MachineState.START ,MachineState.ERROR ,MachineState.START ,MachineState.ERROR ,MachineState.START ,MachineState.ERROR ,MachineState.START ,MachineState.ERROR ,MachineState.START ,  # 4
)
# fmt: on

JOHAB_CHAR_LEN_TABLE = (0, 1, 1, 1, 1, 0, 0, 2, 2, 2)

JOHAB_SM_MODEL: CodingStateMachineDict = {
    "class_table": JOHAB_CLS,
    "class_factor": 10,
    "state_table": JOHAB_ST,
    "char_len_table": JOHAB_CHAR_LEN_TABLE,
    "name": "Johab",
}

# EUC-TW
# fmt: off
EUCTW_CLS = (
    2, 2, 2, 2, 2, 2, 2, 2,  # 00 - 07
    2, 2, 2, 2, 2, 2, 0, 0,  # 08 - 0f
    2, 2, 2, 2, 2, 2, 2, 2,  # 10 - 17
    2, 2, 2, 0, 2, 2, 2, 2,  # 18 - 1f
    2, 2, 2, 2, 2, 2, 2, 2,  # 20 - 27
    2, 2, 2, 2, 2, 2, 2, 2,  # 28 - 2f
    2, 2, 2, 2, 2, 2, 2, 2,  # 30 - 37
    2, 2, 2, 2, 2, 2, 2, 2,  # 38 - 3f
    2, 2, 2, 2, 2, 2, 2, 2,  # 40 - 47
    2, 2, 2, 2, 2, 2, 2, 2,  # 48 - 4f
    2, 2, 2, 2, 2, 2, 2, 2,  # 50 - 57
    2, 2, 2, 2, 2, 2, 2, 2,  # 58 - 5f
    2, 2, 2, 2, 2, 2, 2, 2,  # 60 - 67
    2, 2, 2, 2, 2, 2, 2, 2,  # 68 - 6f
    2, 2, 2, 2, 2, 2, 2, 2,  # 70 - 77
    2, 2, 2, 2, 2, 2, 2, 2,  # 78 - 7f
    0, 0, 0, 0, 0, 0, 0, 0,  # 80 - 87
    0, 0, 0, 0, 0, 0, 6, 0,  # 88 - 8f
    0, 0, 0, 0, 0, 0, 0, 0,  # 90 - 97
    0, 0, 0, 0, 0, 0, 0, 0,  # 98 - 9f
    0, 3, 4, 4, 4, 4, 4, 4,  # a0 - a7
    5, 5, 1, 1, 1, 1, 1, 1,  # a8 - af
    1, 1, 1, 1, 1, 1, 1, 1,  # b0 - b7
    1, 1, 1, 1, 1, 1, 1, 1,  # b8 - bf
    1, 1, 3, 1, 3, 3, 3, 3,  # c0 - c7
    3, 3, 3, 3, 3, 3, 3, 3,  # c8 - cf
    3, 3, 3, 3, 3, 3, 3, 3,  # d0 - d7
    3, 3, 3, 3, 3, 3, 3, 3,  # d8 - df
    3, 3, 3, 3, 3, 3, 3, 3,  # e0 - e7
    3, 3, 3, 3, 3, 3, 3, 3,  # e8 - ef
    3, 3, 3, 3, 3, 3, 3, 3,  # f0 - f7
    3, 3, 3, 3, 3, 3, 3, 0   # f8 - ff
)

EUCTW_ST = (
    MachineState.ERROR,MachineState.ERROR,MachineState.START,     3,     3,     3,     4,MachineState.ERROR,#00-07
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
    MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.START,MachineState.ERROR,#10-17
    MachineState.START,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#18-1f
         5,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.ERROR,MachineState.START,MachineState.START,#20-27
    MachineState.START,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START #28-2f
)
# fmt: on

EUCTW_CHAR_LEN_TABLE = (0, 0, 1, 2, 2, 2, 3)

EUCTW_SM_MODEL: CodingStateMachineDict = {
    "class_table": EUCTW_CLS,
    "class_factor": 7,
    "state_table": EUCTW_ST,
    "char_len_table": EUCTW_CHAR_LEN_TABLE,
    "name": "x-euc-tw",
}

# GB2312
# fmt: off
GB2312_CLS = (
    1, 1, 1, 1, 1, 1, 1, 1,  # 00 - 07
    1, 1, 1, 1, 1, 1, 0, 0,  # 08 - 0f
    1, 1, 1, 1, 1, 1, 1, 1,  # 10 - 17
    1, 1, 1, 0, 1, 1, 1, 1,  # 18 - 1f
    1, 1, 1, 1, 1, 1, 1, 1,  # 20 - 27
    1, 1, 1, 1, 1, 1, 1, 1,  # 28 - 2f
    3, 3, 3, 3, 3, 3, 3, 3,  # 30 - 37
    3, 3, 1, 1, 1, 1, 1, 1,  # 38 - 3f
    2, 2, 2, 2, 2, 2, 2, 2,  # 40 - 47
    2, 2, 2, 2, 2, 2, 2, 2,  # 48 - 4f
    2, 2, 2, 2, 2, 2, 2, 2,  # 50 - 57
    2, 2, 2, 2, 2, 2, 2, 2,  # 58 - 5f
    2, 2, 2, 2, 2, 2, 2, 2,  # 60 - 67
    2, 2, 2, 2, 2, 2, 2, 2,  # 68 - 6f
    2, 2, 2, 2, 2, 2, 2, 2,  # 70 - 77
    2, 2, 2, 2, 2, 2, 2, 4,  # 78 - 7f
    5, 6, 6, 6, 6, 6, 6, 6,  # 80 - 87
    6, 6, 6, 6, 6, 6, 6, 6,  # 88 - 8f
    6, 6, 6, 6, 6, 6, 6, 6,  # 90 - 97
    6, 6, 6, 6, 6, 6, 6, 6,  # 98 - 9f
    6, 6, 6, 6, 6, 6, 6, 6,  # a0 - a7
    6, 6, 6, 6, 6, 6, 6, 6,  # a8 - af
    6, 6, 6, 6, 6, 6, 6, 6,  # b0 - b7
    6, 6, 6, 6, 6, 6, 6, 6,  # b8 - bf
    6, 6, 6, 6, 6, 6, 6, 6,  # c0 - c7
    6, 6, 6, 6, 6, 6, 6, 6,  # c8 - cf
    6, 6, 6, 6, 6, 6, 6, 6,  # d0 - d7
    6, 6, 6, 6, 6, 6, 6, 6,  # d8 - df
    6, 6, 6, 6, 6, 6, 6, 6,  # e0 - e7
    6, 6, 6, 6, 6, 6, 6, 6,  # e8 - ef
    6, 6, 6, 6, 6, 6, 6, 6,  # f0 - f7
    6, 6, 6, 6, 6, 6, 6, 0   # f8 - ff
)

GB2312_ST = (
    MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,     3,MachineState.ERROR,#00-07
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
    MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.START,#10-17
         4,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#18-1f
    MachineState.ERROR,MachineState.ERROR,     5,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,#20-27
    MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START #28-2f
)
# fmt: on

# To be accurate, the length of class 6 can be either 2 or 4.
# But it is not necessary to discriminate between the two since
# it is used for frequency analysis only, and we are validating
# each code range there as well. So it is safe to set it to be
# 2 here.
GB2312_CHAR_LEN_TABLE = (0, 1, 1, 1, 1, 1, 2)

GB2312_SM_MODEL: CodingStateMachineDict = {
    "class_table": GB2312_CLS,
    "class_factor": 7,
    "state_table": GB2312_ST,
    "char_len_table": GB2312_CHAR_LEN_TABLE,
    "name": "GB2312",
}

# Shift_JIS
# fmt: off
SJIS_CLS = (
    1, 1, 1, 1, 1, 1, 1, 1,  # 00 - 07
    1, 1, 1, 1, 1, 1, 0, 0,  # 08 - 0f
    1, 1, 1, 1, 1, 1, 1, 1,  # 10 - 17
    1, 1, 1, 0, 1, 1, 1, 1,  # 18 - 1f
    1, 1, 1, 1, 1, 1, 1, 1,  # 20 - 27
    1, 1, 1, 1, 1, 1, 1, 1,  # 28 - 2f
    1, 1, 1, 1, 1, 1, 1, 1,  # 30 - 37
    1, 1, 1, 1, 1, 1, 1, 1,  # 38 - 3f
    2, 2, 2, 2, 2, 2, 2, 2,  # 40 - 47
    2, 2, 2, 2, 2, 2, 2, 2,  # 48 - 4f
    2, 2, 2, 2, 2, 2, 2, 2,  # 50 - 57
    2, 2, 2, 2, 2, 2, 2, 2,  # 58 - 5f
    2, 2, 2, 2, 2, 2, 2, 2,  # 60 - 67
    2, 2, 2, 2, 2, 2, 2, 2,  # 68 - 6f
    2, 2, 2, 2, 2, 2, 2, 2,  # 70 - 77
    2, 2, 2, 2, 2, 2, 2, 1,  # 78 - 7f
    3, 3, 3, 3, 3, 2, 2, 3,  # 80 - 87
    3, 3, 3, 3, 3, 3, 3, 3,  # 88 - 8f
    3, 3, 3, 3, 3, 3, 3, 3,  # 90 - 97
    3, 3, 3, 3, 3, 3, 3, 3,  # 98 - 9f
    #0xa0 is illegal in sjis encoding, but some pages does
    #contain such byte. We need to be more error forgiven.
    2, 2, 2, 2, 2, 2, 2, 2,  # a0 - a7
    2, 2, 2, 2, 2, 2, 2, 2,  # a8 - af
    2, 2, 2, 2, 2, 2, 2, 2,  # b0 - b7
    2, 2, 2, 2, 2, 2, 2, 2,  # b8 - bf
    2, 2, 2, 2, 2, 2, 2, 2,  # c0 - c7
    2, 2, 2, 2, 2, 2, 2, 2,  # c8 - cf
    2, 2, 2, 2, 2, 2, 2, 2,  # d0 - d7
    2, 2, 2, 2, 2, 2, 2, 2,  # d8 - df
    3, 3, 3, 3, 3, 3, 3, 3,  # e0 - e7
    3, 3, 3, 3, 3, 4, 4, 4,  # e8 - ef
    3, 3, 3, 3, 3, 3, 3, 3,  # f0 - f7
    3, 3, 3, 3, 3, 0, 0, 0,  # f8 - ff
)

SJIS_ST = (
    MachineState.ERROR,MachineState.START,MachineState.START,     3,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#00-07
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
    MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START #10-17
)
# fmt: on

SJIS_CHAR_LEN_TABLE = (0, 1, 1, 2, 0, 0)

SJIS_SM_MODEL: CodingStateMachineDict = {
    "class_table": SJIS_CLS,
    "class_factor": 6,
    "state_table": SJIS_ST,
    "char_len_table": SJIS_CHAR_LEN_TABLE,
    "name": "Shift_JIS",
}

# UCS2-BE
# fmt: off
UCS2BE_CLS = (
    0, 0, 0, 0, 0, 0, 0, 0,  # 00 - 07
    0, 0, 1, 0, 0, 2, 0, 0,  # 08 - 0f
    0, 0, 0, 0, 0, 0, 0, 0,  # 10 - 17
    0, 0, 0, 3, 0, 0, 0, 0,  # 18 - 1f
    0, 0, 0, 0, 0, 0, 0, 0,  # 20 - 27
    0, 3, 3, 3, 3, 3, 0, 0,  # 28 - 2f
    0, 0, 0, 0, 0, 0, 0, 0,  # 30 - 37
    0, 0, 0, 0, 0, 0, 0, 0,  # 38 - 3f
    0, 0, 0, 0, 0, 0, 0, 0,  # 40 - 47
    0, 0, 0, 0, 0, 0, 0, 0,  # 48 - 4f
    0, 0, 0, 0, 0, 0, 0, 0,  # 50 - 57
    0, 0, 0, 0, 0, 0, 0, 0,  # 58 - 5f
    0, 0, 0, 0, 0, 0, 0, 0,  # 60 - 67
    0, 0, 0, 0, 0, 0, 0, 0,  # 68 - 6f
    0, 0, 0, 0, 0, 0, 0, 0,  # 70 - 77
    0, 0, 0, 0, 0, 0, 0, 0,  # 78 - 7f
    0, 0, 0, 0, 0, 0, 0, 0,  # 80 - 87
    0, 0, 0, 0, 0, 0, 0, 0,  # 88 - 8f
    0, 0, 0, 0, 0, 0, 0, 0,  # 90 - 97
    0, 0, 0, 0, 0, 0, 0, 0,  # 98 - 9f
    0, 0, 0, 0, 0, 0, 0, 0,  # a0 - a7
    0, 0, 0, 0, 0, 0, 0, 0,  # a8 - af
    0, 0, 0, 0, 0, 0, 0, 0,  # b0 - b7
    0, 0, 0, 0, 0, 0, 0, 0,  # b8 - bf
    0, 0, 0, 0, 0, 0, 0, 0,  # c0 - c7
    0, 0, 0, 0, 0, 0, 0, 0,  # c8 - cf
    0, 0, 0, 0, 0, 0, 0, 0,  # d0 - d7
    0, 0, 0, 0, 0, 0, 0, 0,  # d8 - df
    0, 0, 0, 0, 0, 0, 0, 0,  # e0 - e7
    0, 0, 0, 0, 0, 0, 0, 0,  # e8 - ef
    0, 0, 0, 0, 0, 0, 0, 0,  # f0 - f7
    0, 0, 0, 0, 0, 0, 4, 5   # f8 - ff
)

UCS2BE_ST  = (
          5,     7,     7,MachineState.ERROR,     4,     3,MachineState.ERROR,MachineState.ERROR,#00-07
     MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
     MachineState.ITS_ME,MachineState.ITS_ME,     6,     6,     6,     6,MachineState.ERROR,MachineState.ERROR,#10-17
          6,     6,     6,     6,     6,MachineState.ITS_ME,     6,     6,#18-1f
          6,     6,     6,     6,     5,     7,     7,MachineState.ERROR,#20-27
          5,     8,     6,     6,MachineState.ERROR,     6,     6,     6,#28-2f
          6,     6,     6,     6,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START #30-37
)
# fmt: on

UCS2BE_CHAR_LEN_TABLE = (2, 2, 2, 0, 2, 2)

UCS2BE_SM_MODEL: CodingStateMachineDict = {
    "class_table": UCS2BE_CLS,
    "class_factor": 6,
    "state_table": UCS2BE_ST,
    "char_len_table": UCS2BE_CHAR_LEN_TABLE,
    "name": "UTF-16BE",
}

# UCS2-LE
# fmt: off
UCS2LE_CLS = (
    0, 0, 0, 0, 0, 0, 0, 0,  # 00 - 07
    0, 0, 1, 0, 0, 2, 0, 0,  # 08 - 0f
    0, 0, 0, 0, 0, 0, 0, 0,  # 10 - 17
    0, 0, 0, 3, 0, 0, 0, 0,  # 18 - 1f
    0, 0, 0, 0, 0, 0, 0, 0,  # 20 - 27
    0, 3, 3, 3, 3, 3, 0, 0,  # 28 - 2f
    0, 0, 0, 0, 0, 0, 0, 0,  # 30 - 37
    0, 0, 0, 0, 0, 0, 0, 0,  # 38 - 3f
    0, 0, 0, 0, 0, 0, 0, 0,  # 40 - 47
    0, 0, 0, 0, 0, 0, 0, 0,  # 48 - 4f
    0, 0, 0, 0, 0, 0, 0, 0,  # 50 - 57
    0, 0, 0, 0, 0, 0, 0, 0,  # 58 - 5f
    0, 0, 0, 0, 0, 0, 0, 0,  # 60 - 67
    0, 0, 0, 0, 0, 0, 0, 0,  # 68 - 6f
    0, 0, 0, 0, 0, 0, 0, 0,  # 70 - 77
    0, 0, 0, 0, 0, 0, 0, 0,  # 78 - 7f
    0, 0, 0, 0, 0, 0, 0, 0,  # 80 - 87
    0, 0, 0, 0, 0, 0, 0, 0,  # 88 - 8f
    0, 0, 0, 0, 0, 0, 0, 0,  # 90 - 97
    0, 0, 0, 0, 0, 0, 0, 0,  # 98 - 9f
    0, 0, 0, 0, 0, 0, 0, 0,  # a0 - a7
    0, 0, 0, 0, 0, 0, 0, 0,  # a8 - af
    0, 0, 0, 0, 0, 0, 0, 0,  # b0 - b7
    0, 0, 0, 0, 0, 0, 0, 0,  # b8 - bf
    0, 0, 0, 0, 0, 0, 0, 0,  # c0 - c7
    0, 0, 0, 0, 0, 0, 0, 0,  # c8 - cf
    0, 0, 0, 0, 0, 0, 0, 0,  # d0 - d7
    0, 0, 0, 0, 0, 0, 0, 0,  # d8 - df
    0, 0, 0, 0, 0, 0, 0, 0,  # e0 - e7
    0, 0, 0, 0, 0, 0, 0, 0,  # e8 - ef
    0, 0, 0, 0, 0, 0, 0, 0,  # f0 - f7
    0, 0, 0, 0, 0, 0, 4, 5   # f8 - ff
)

UCS2LE_ST = (
          6,     6,     7,     6,     4,     3,MachineState.ERROR,MachineState.ERROR,#00-07
     MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#08-0f
     MachineState.ITS_ME,MachineState.ITS_ME,     5,     5,     5,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,#10-17
          5,     5,     5,MachineState.ERROR,     5,MachineState.ERROR,     6,     6,#18-1f
          7,     6,     8,     8,     5,     5,     5,MachineState.ERROR,#20-27
          5,     5,     5,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,     5,     5,#28-2f
          5,     5,     5,MachineState.ERROR,     5,MachineState.ERROR,MachineState.START,MachineState.START #30-37
)
# fmt: on

UCS2LE_CHAR_LEN_TABLE = (2, 2, 2, 2, 2, 2)

UCS2LE_SM_MODEL: CodingStateMachineDict = {
    "class_table": UCS2LE_CLS,
    "class_factor": 6,
    "state_table": UCS2LE_ST,
    "char_len_table": UCS2LE_CHAR_LEN_TABLE,
    "name": "UTF-16LE",
}

# UTF-8
# fmt: off
UTF8_CLS = (
    1, 1, 1, 1, 1, 1, 1, 1,  # 00 - 07  #allow 0x00 as a legal value
    1, 1, 1, 1, 1, 1, 0, 0,  # 08 - 0f
    1, 1, 1, 1, 1, 1, 1, 1,  # 10 - 17
    1, 1, 1, 0, 1, 1, 1, 1,  # 18 - 1f
    1, 1, 1, 1, 1, 1, 1, 1,  # 20 - 27
    1, 1, 1, 1, 1, 1, 1, 1,  # 28 - 2f
    1, 1, 1, 1, 1, 1, 1, 1,  # 30 - 37
    1, 1, 1, 1, 1, 1, 1, 1,  # 38 - 3f
    1, 1, 1, 1, 1, 1, 1, 1,  # 40 - 47
    1, 1, 1, 1, 1, 1, 1, 1,  # 48 - 4f
    1, 1, 1, 1, 1, 1, 1, 1,  # 50 - 57
    1, 1, 1, 1, 1, 1, 1, 1,  # 58 - 5f
    1, 1, 1, 1, 1, 1, 1, 1,  # 60 - 67
    1, 1, 1, 1, 1, 1, 1, 1,  # 68 - 6f
    1, 1, 1, 1, 1, 1, 1, 1,  # 70 - 77
    1, 1, 1, 1, 1, 1, 1, 1,  # 78 - 7f
    2, 2, 2, 2, 3, 3, 3, 3,  # 80 - 87
    4, 4, 4, 4, 4, 4, 4, 4,  # 88 - 8f
    4, 4, 4, 4, 4, 4, 4, 4,  # 90 - 97
    4, 4, 4, 4, 4, 4, 4, 4,  # 98 - 9f
    5, 5, 5, 5, 5, 5, 5, 5,  # a0 - a7
    5, 5, 5, 5, 5, 5, 5, 5,  # a8 - af
    5, 5, 5, 5, 5, 5, 5, 5,  # b0 - b7
    5, 5, 5, 5, 5, 5, 5, 5,  # b8 - bf
    0, 0, 6, 6, 6, 6, 6, 6,  # c0 - c7
    6, 6, 6, 6, 6, 6, 6, 6,  # c8 - cf
    6, 6, 6, 6, 6, 6, 6, 6,  # d0 - d7
    6, 6, 6, 6, 6, 6, 6, 6,  # d8 - df
    7, 8, 8, 8, 8, 8, 8, 8,  # e0 - e7
    8, 8, 8, 8, 8, 9, 8, 8,  # e8 - ef
    10, 11, 11, 11, 11, 11, 11, 11,  # f0 - f7
    12, 13, 13, 13, 14, 15, 0, 0    # f8 - ff
)

UTF8_ST = (
    MachineState.ERROR,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,     12,   10,#00-07
         9,     11,     8,     7,     6,     5,     4,    3,#08-0f
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#10-17
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#18-1f
    MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#20-27
    MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,#28-2f
    MachineState.ERROR,MachineState.ERROR,     5,     5,     5,     5,MachineState.ERROR,MachineState.ERROR,#30-37
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#38-3f
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,     5,     5,     5,MachineState.ERROR,MachineState.ERROR,#40-47
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#48-4f
    MachineState.ERROR,MachineState.ERROR,     7,     7,     7,     7,MachineState.ERROR,MachineState.ERROR,#50-57
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#58-5f
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,     7,     7,MachineState.ERROR,MachineState.ERROR,#60-67
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#68-6f
    MachineState.ERROR,MachineState.ERROR,     9,     9,     9,     9,MachineState.ERROR,MachineState.ERROR,#70-77
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#78-7f
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,     9,MachineState.ERROR,MachineState.ERROR,#80-87
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#88-8f
    MachineState.ERROR,MachineState.ERROR,    12,    12,    12,    12,MachineState.ERROR,MachineState.ERROR,#90-97
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#98-9f
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,    12,MachineState.ERROR,MachineState.ERROR,#a0-a7
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#a8-af
    MachineState.ERROR,MachineState.ERROR,    12,    12,    12,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#b0-b7
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,#b8-bf
    MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,#c0-c7
    MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR #c8-cf
)
# fmt: on

UTF8_CHAR_LEN_TABLE = (0, 1, 0, 0, 0, 0, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6)

UTF8_SM_MODEL: CodingStateMachineDict = {
    "class_table": UTF8_CLS,
    "class_factor": 16,
    "state_table": UTF8_ST,
    "char_len_table": UTF8_CHAR_LEN_TABLE,
    "name": "UTF-8",
}
python3.12/site-packages/pip/_vendor/chardet/langthaimodel.py000064400000310566151732703210020145 0ustar00from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel

# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative

THAI_LANG_MODEL = {
    5: {  # 'ก'
        5: 2,  # 'ก'
        30: 2,  # 'ข'
        24: 2,  # 'ค'
        8: 2,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 3,  # 'ฎ'
        57: 2,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 2,  # 'ณ'
        20: 2,  # 'ด'
        19: 3,  # 'ต'
        44: 0,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 2,  # 'น'
        17: 1,  # 'บ'
        25: 2,  # 'ป'
        39: 1,  # 'ผ'
        62: 1,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 2,  # 'ม'
        16: 1,  # 'ย'
        2: 3,  # 'ร'
        61: 2,  # 'ฤ'
        15: 3,  # 'ล'
        12: 3,  # 'ว'
        42: 2,  # 'ศ'
        46: 3,  # 'ษ'
        18: 2,  # 'ส'
        21: 2,  # 'ห'
        4: 3,  # 'อ'
        63: 1,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 3,  # 'ำ'
        23: 3,  # 'ิ'
        13: 3,  # 'ี'
        40: 0,  # 'ึ'
        27: 2,  # 'ื'
        32: 2,  # 'ุ'
        35: 1,  # 'ู'
        11: 2,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 1,  # 'ใ'
        33: 2,  # 'ไ'
        50: 1,  # 'ๆ'
        37: 3,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    30: {  # 'ข'
        5: 1,  # 'ก'
        30: 0,  # 'ข'
        24: 1,  # 'ค'
        8: 1,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 2,  # 'ณ'
        20: 0,  # 'ด'
        19: 2,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 2,  # 'น'
        17: 1,  # 'บ'
        25: 1,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 2,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 2,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 1,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 2,  # 'ี'
        40: 3,  # 'ึ'
        27: 1,  # 'ื'
        32: 1,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 1,  # '็'
        6: 2,  # '่'
        7: 3,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    24: {  # 'ค'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 2,  # 'ค'
        8: 2,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 2,  # 'ณ'
        20: 2,  # 'ด'
        19: 2,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 0,  # 'บ'
        25: 1,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 2,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 3,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 0,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 2,  # 'า'
        36: 3,  # 'ำ'
        23: 3,  # 'ิ'
        13: 2,  # 'ี'
        40: 0,  # 'ึ'
        27: 3,  # 'ื'
        32: 3,  # 'ุ'
        35: 2,  # 'ู'
        11: 1,  # 'เ'
        28: 0,  # 'แ'
        41: 3,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 1,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 3,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    8: {  # 'ง'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 3,  # 'ค'
        8: 2,  # 'ง'
        26: 2,  # 'จ'
        52: 1,  # 'ฉ'
        34: 2,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 2,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 3,  # 'ท'
        48: 1,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 2,  # 'ป'
        39: 2,  # 'ผ'
        62: 1,  # 'ฝ'
        31: 2,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 2,  # 'ม'
        16: 1,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 2,  # 'ว'
        42: 2,  # 'ศ'
        46: 1,  # 'ษ'
        18: 3,  # 'ส'
        21: 3,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 1,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 2,  # 'ิ'
        13: 1,  # 'ี'
        40: 0,  # 'ึ'
        27: 1,  # 'ื'
        32: 1,  # 'ุ'
        35: 0,  # 'ู'
        11: 3,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 3,  # 'ๆ'
        37: 0,  # '็'
        6: 2,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    26: {  # 'จ'
        5: 2,  # 'ก'
        30: 1,  # 'ข'
        24: 0,  # 'ค'
        8: 2,  # 'ง'
        26: 3,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 2,  # 'ด'
        19: 1,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 1,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 1,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 1,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 3,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 3,  # 'ำ'
        23: 2,  # 'ิ'
        13: 1,  # 'ี'
        40: 3,  # 'ึ'
        27: 1,  # 'ื'
        32: 3,  # 'ุ'
        35: 2,  # 'ู'
        11: 1,  # 'เ'
        28: 1,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 2,  # '่'
        7: 2,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    52: {  # 'ฉ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 3,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 3,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 1,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 1,  # 'ะ'
        10: 1,  # 'ั'
        1: 1,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 1,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 1,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    34: {  # 'ช'
        5: 1,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 1,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 1,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 1,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 2,  # 'ั'
        1: 3,  # 'า'
        36: 1,  # 'ำ'
        23: 3,  # 'ิ'
        13: 2,  # 'ี'
        40: 0,  # 'ึ'
        27: 3,  # 'ื'
        32: 3,  # 'ุ'
        35: 1,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 1,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    51: {  # 'ซ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 1,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 0,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 1,  # 'ั'
        1: 1,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 2,  # 'ี'
        40: 3,  # 'ึ'
        27: 2,  # 'ื'
        32: 1,  # 'ุ'
        35: 1,  # 'ู'
        11: 1,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 1,  # '็'
        6: 1,  # '่'
        7: 2,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    47: {  # 'ญ'
        5: 1,  # 'ก'
        30: 1,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 3,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 1,  # 'บ'
        25: 1,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 2,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 1,  # 'ะ'
        10: 2,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 1,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 1,  # 'เ'
        28: 1,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 0,  # 'ไ'
        50: 1,  # 'ๆ'
        37: 0,  # '็'
        6: 2,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    58: {  # 'ฎ'
        5: 2,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 1,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 2,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    57: {  # 'ฏ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 3,  # 'ิ'
        13: 1,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    49: {  # 'ฐ'
        5: 1,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 2,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 1,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    53: {  # 'ฑ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 2,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 3,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    55: {  # 'ฒ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    43: {  # 'ณ'
        5: 1,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 3,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 3,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 1,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 3,  # 'ะ'
        10: 0,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 2,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 1,  # 'เ'
        28: 1,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 3,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    20: {  # 'ด'
        5: 2,  # 'ก'
        30: 2,  # 'ข'
        24: 2,  # 'ค'
        8: 3,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 1,  # 'น'
        17: 1,  # 'บ'
        25: 1,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 2,  # 'ม'
        16: 3,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 2,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 2,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 3,  # 'ั'
        1: 2,  # 'า'
        36: 2,  # 'ำ'
        23: 3,  # 'ิ'
        13: 3,  # 'ี'
        40: 1,  # 'ึ'
        27: 2,  # 'ื'
        32: 3,  # 'ุ'
        35: 2,  # 'ู'
        11: 2,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 2,  # 'ๆ'
        37: 2,  # '็'
        6: 1,  # '่'
        7: 3,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    19: {  # 'ต'
        5: 2,  # 'ก'
        30: 1,  # 'ข'
        24: 1,  # 'ค'
        8: 0,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 1,  # 'ต'
        44: 2,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 2,  # 'น'
        17: 1,  # 'บ'
        25: 1,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 2,  # 'ภ'
        9: 1,  # 'ม'
        16: 1,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 3,  # 'ส'
        21: 0,  # 'ห'
        4: 3,  # 'อ'
        63: 1,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 2,  # 'ำ'
        23: 3,  # 'ิ'
        13: 2,  # 'ี'
        40: 1,  # 'ึ'
        27: 1,  # 'ื'
        32: 3,  # 'ุ'
        35: 2,  # 'ู'
        11: 1,  # 'เ'
        28: 1,  # 'แ'
        41: 1,  # 'โ'
        29: 1,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 2,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    44: {  # 'ถ'
        5: 1,  # 'ก'
        30: 0,  # 'ข'
        24: 1,  # 'ค'
        8: 0,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 1,  # 'น'
        17: 2,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 0,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 2,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 2,  # 'ิ'
        13: 1,  # 'ี'
        40: 3,  # 'ึ'
        27: 2,  # 'ื'
        32: 2,  # 'ุ'
        35: 3,  # 'ู'
        11: 1,  # 'เ'
        28: 1,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 2,  # '่'
        7: 3,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    14: {  # 'ท'
        5: 1,  # 'ก'
        30: 1,  # 'ข'
        24: 3,  # 'ค'
        8: 1,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 2,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 3,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 2,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 2,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 3,  # 'ย'
        2: 3,  # 'ร'
        61: 1,  # 'ฤ'
        15: 1,  # 'ล'
        12: 2,  # 'ว'
        42: 3,  # 'ศ'
        46: 1,  # 'ษ'
        18: 1,  # 'ส'
        21: 0,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 3,  # 'ำ'
        23: 2,  # 'ิ'
        13: 3,  # 'ี'
        40: 2,  # 'ึ'
        27: 1,  # 'ื'
        32: 3,  # 'ุ'
        35: 1,  # 'ู'
        11: 0,  # 'เ'
        28: 1,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 1,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    48: {  # 'ธ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 1,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 1,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 2,  # 'า'
        36: 0,  # 'ำ'
        23: 3,  # 'ิ'
        13: 3,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 2,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 3,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    3: {  # 'น'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 3,  # 'ค'
        8: 1,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 1,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 3,  # 'ด'
        19: 3,  # 'ต'
        44: 2,  # 'ถ'
        14: 3,  # 'ท'
        48: 3,  # 'ธ'
        3: 2,  # 'น'
        17: 2,  # 'บ'
        25: 2,  # 'ป'
        39: 2,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 2,  # 'พ'
        54: 1,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 2,  # 'ม'
        16: 2,  # 'ย'
        2: 2,  # 'ร'
        61: 1,  # 'ฤ'
        15: 2,  # 'ล'
        12: 3,  # 'ว'
        42: 1,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 2,  # 'ห'
        4: 3,  # 'อ'
        63: 1,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 3,  # 'ำ'
        23: 3,  # 'ิ'
        13: 3,  # 'ี'
        40: 3,  # 'ึ'
        27: 3,  # 'ื'
        32: 3,  # 'ุ'
        35: 2,  # 'ู'
        11: 3,  # 'เ'
        28: 2,  # 'แ'
        41: 3,  # 'โ'
        29: 3,  # 'ใ'
        33: 3,  # 'ไ'
        50: 2,  # 'ๆ'
        37: 1,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    17: {  # 'บ'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 2,  # 'ค'
        8: 1,  # 'ง'
        26: 1,  # 'จ'
        52: 1,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 3,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 2,  # 'ป'
        39: 2,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 1,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 1,  # 'ม'
        16: 0,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 3,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 2,  # 'ห'
        4: 2,  # 'อ'
        63: 1,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 2,  # 'ำ'
        23: 2,  # 'ิ'
        13: 2,  # 'ี'
        40: 0,  # 'ึ'
        27: 2,  # 'ื'
        32: 3,  # 'ุ'
        35: 2,  # 'ู'
        11: 2,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 1,  # '็'
        6: 2,  # '่'
        7: 2,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    25: {  # 'ป'
        5: 2,  # 'ก'
        30: 0,  # 'ข'
        24: 1,  # 'ค'
        8: 0,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 1,  # 'ฎ'
        57: 3,  # 'ฏ'
        49: 1,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 1,  # 'ต'
        44: 1,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 2,  # 'น'
        17: 0,  # 'บ'
        25: 1,  # 'ป'
        39: 1,  # 'ผ'
        62: 1,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 0,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 1,  # 'ษ'
        18: 2,  # 'ส'
        21: 1,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 1,  # 'ะ'
        10: 3,  # 'ั'
        1: 1,  # 'า'
        36: 0,  # 'ำ'
        23: 2,  # 'ิ'
        13: 3,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 1,  # 'ุ'
        35: 0,  # 'ู'
        11: 1,  # 'เ'
        28: 2,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 2,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 3,  # '็'
        6: 1,  # '่'
        7: 2,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    39: {  # 'ผ'
        5: 1,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 1,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 2,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 2,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 1,  # 'ะ'
        10: 1,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 2,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 1,  # 'ื'
        32: 0,  # 'ุ'
        35: 3,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 1,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    62: {  # 'ฝ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 1,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 1,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 1,  # 'ี'
        40: 2,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 2,  # '่'
        7: 1,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    31: {  # 'พ'
        5: 1,  # 'ก'
        30: 1,  # 'ข'
        24: 1,  # 'ค'
        8: 1,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 1,  # 'ณ'
        20: 1,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 2,  # 'ท'
        48: 1,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 0,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 2,  # 'ย'
        2: 3,  # 'ร'
        61: 2,  # 'ฤ'
        15: 2,  # 'ล'
        12: 2,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 1,  # 'ห'
        4: 2,  # 'อ'
        63: 1,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 3,  # 'ิ'
        13: 2,  # 'ี'
        40: 1,  # 'ึ'
        27: 3,  # 'ื'
        32: 1,  # 'ุ'
        35: 2,  # 'ู'
        11: 1,  # 'เ'
        28: 1,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 1,  # '็'
        6: 0,  # '่'
        7: 1,  # '้'
        38: 3,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    54: {  # 'ฟ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 2,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 0,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 2,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 1,  # 'ี'
        40: 0,  # 'ึ'
        27: 1,  # 'ื'
        32: 1,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 1,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 2,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    45: {  # 'ภ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 1,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 3,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 2,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    9: {  # 'ม'
        5: 2,  # 'ก'
        30: 2,  # 'ข'
        24: 2,  # 'ค'
        8: 2,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 1,  # 'ณ'
        20: 2,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 1,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 2,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 3,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 2,  # 'ม'
        16: 1,  # 'ย'
        2: 2,  # 'ร'
        61: 2,  # 'ฤ'
        15: 2,  # 'ล'
        12: 2,  # 'ว'
        42: 1,  # 'ศ'
        46: 1,  # 'ษ'
        18: 3,  # 'ส'
        21: 3,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 1,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 3,  # 'ิ'
        13: 3,  # 'ี'
        40: 0,  # 'ึ'
        27: 3,  # 'ื'
        32: 3,  # 'ุ'
        35: 3,  # 'ู'
        11: 2,  # 'เ'
        28: 2,  # 'แ'
        41: 2,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 1,  # 'ๆ'
        37: 1,  # '็'
        6: 3,  # '่'
        7: 2,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    16: {  # 'ย'
        5: 3,  # 'ก'
        30: 1,  # 'ข'
        24: 2,  # 'ค'
        8: 3,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 2,  # 'ช'
        51: 0,  # 'ซ'
        47: 2,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 2,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 1,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 1,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 2,  # 'ม'
        16: 0,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 3,  # 'ว'
        42: 1,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 1,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 2,  # 'ิ'
        13: 3,  # 'ี'
        40: 1,  # 'ึ'
        27: 2,  # 'ื'
        32: 2,  # 'ุ'
        35: 3,  # 'ู'
        11: 2,  # 'เ'
        28: 1,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 2,  # 'ๆ'
        37: 1,  # '็'
        6: 3,  # '่'
        7: 2,  # '้'
        38: 3,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    2: {  # 'ร'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 2,  # 'ค'
        8: 3,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 2,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 3,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 3,  # 'ณ'
        20: 2,  # 'ด'
        19: 2,  # 'ต'
        44: 3,  # 'ถ'
        14: 3,  # 'ท'
        48: 1,  # 'ธ'
        3: 2,  # 'น'
        17: 2,  # 'บ'
        25: 3,  # 'ป'
        39: 2,  # 'ผ'
        62: 1,  # 'ฝ'
        31: 2,  # 'พ'
        54: 1,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 3,  # 'ม'
        16: 2,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 3,  # 'ว'
        42: 2,  # 'ศ'
        46: 2,  # 'ษ'
        18: 2,  # 'ส'
        21: 2,  # 'ห'
        4: 3,  # 'อ'
        63: 1,  # 'ฯ'
        22: 3,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 3,  # 'ิ'
        13: 3,  # 'ี'
        40: 2,  # 'ึ'
        27: 3,  # 'ื'
        32: 3,  # 'ุ'
        35: 3,  # 'ู'
        11: 3,  # 'เ'
        28: 3,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 3,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 3,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    61: {  # 'ฤ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 2,  # 'ต'
        44: 0,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 2,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    15: {  # 'ล'
        5: 2,  # 'ก'
        30: 3,  # 'ข'
        24: 1,  # 'ค'
        8: 3,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 2,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 1,  # 'น'
        17: 2,  # 'บ'
        25: 2,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 1,  # 'ม'
        16: 3,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 1,  # 'ห'
        4: 3,  # 'อ'
        63: 2,  # 'ฯ'
        22: 3,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 2,  # 'ำ'
        23: 3,  # 'ิ'
        13: 3,  # 'ี'
        40: 2,  # 'ึ'
        27: 3,  # 'ื'
        32: 2,  # 'ุ'
        35: 3,  # 'ู'
        11: 2,  # 'เ'
        28: 1,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 2,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    12: {  # 'ว'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 1,  # 'ค'
        8: 3,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 1,  # 'ณ'
        20: 2,  # 'ด'
        19: 1,  # 'ต'
        44: 1,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 1,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 1,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 3,  # 'ม'
        16: 3,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 2,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 3,  # 'ิ'
        13: 2,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 2,  # 'ุ'
        35: 0,  # 'ู'
        11: 3,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 1,  # 'ใ'
        33: 2,  # 'ไ'
        50: 1,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    42: {  # 'ศ'
        5: 1,  # 'ก'
        30: 0,  # 'ข'
        24: 1,  # 'ค'
        8: 0,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 1,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 2,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 2,  # 'ว'
        42: 1,  # 'ศ'
        46: 2,  # 'ษ'
        18: 1,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 2,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 2,  # 'ิ'
        13: 0,  # 'ี'
        40: 3,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 2,  # 'ู'
        11: 0,  # 'เ'
        28: 1,  # 'แ'
        41: 0,  # 'โ'
        29: 1,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    46: {  # 'ษ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 2,  # 'ฎ'
        57: 1,  # 'ฏ'
        49: 2,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 3,  # 'ณ'
        20: 0,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 1,  # 'ม'
        16: 2,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 1,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 2,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 1,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 1,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    18: {  # 'ส'
        5: 2,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 2,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 3,  # 'ด'
        19: 3,  # 'ต'
        44: 3,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 1,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 2,  # 'ภ'
        9: 3,  # 'ม'
        16: 1,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 2,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 2,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 3,  # 'ำ'
        23: 3,  # 'ิ'
        13: 3,  # 'ี'
        40: 2,  # 'ึ'
        27: 3,  # 'ื'
        32: 3,  # 'ุ'
        35: 3,  # 'ู'
        11: 2,  # 'เ'
        28: 0,  # 'แ'
        41: 1,  # 'โ'
        29: 0,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 1,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    21: {  # 'ห'
        5: 3,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 1,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 2,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 3,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 0,  # 'บ'
        25: 1,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 3,  # 'ม'
        16: 2,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 2,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 1,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 0,  # 'ำ'
        23: 1,  # 'ิ'
        13: 1,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 1,  # 'ุ'
        35: 1,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 3,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    4: {  # 'อ'
        5: 3,  # 'ก'
        30: 1,  # 'ข'
        24: 2,  # 'ค'
        8: 3,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 3,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 1,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 1,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 1,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 3,  # 'ม'
        16: 3,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 2,  # 'ว'
        42: 1,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 2,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 2,  # 'ะ'
        10: 3,  # 'ั'
        1: 3,  # 'า'
        36: 2,  # 'ำ'
        23: 2,  # 'ิ'
        13: 3,  # 'ี'
        40: 0,  # 'ึ'
        27: 3,  # 'ื'
        32: 3,  # 'ุ'
        35: 0,  # 'ู'
        11: 3,  # 'เ'
        28: 1,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 1,  # 'ๆ'
        37: 1,  # '็'
        6: 2,  # '่'
        7: 2,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    63: {  # 'ฯ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    22: {  # 'ะ'
        5: 3,  # 'ก'
        30: 1,  # 'ข'
        24: 2,  # 'ค'
        8: 1,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 3,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 3,  # 'ด'
        19: 3,  # 'ต'
        44: 1,  # 'ถ'
        14: 3,  # 'ท'
        48: 1,  # 'ธ'
        3: 2,  # 'น'
        17: 3,  # 'บ'
        25: 2,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 2,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 3,  # 'ม'
        16: 2,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 2,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 3,  # 'ส'
        21: 3,  # 'ห'
        4: 2,  # 'อ'
        63: 1,  # 'ฯ'
        22: 1,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 3,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    10: {  # 'ั'
        5: 3,  # 'ก'
        30: 0,  # 'ข'
        24: 1,  # 'ค'
        8: 3,  # 'ง'
        26: 3,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 3,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 2,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 3,  # 'ฒ'
        43: 3,  # 'ณ'
        20: 3,  # 'ด'
        19: 3,  # 'ต'
        44: 0,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 1,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 2,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 3,  # 'ม'
        16: 3,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 3,  # 'ว'
        42: 2,  # 'ศ'
        46: 0,  # 'ษ'
        18: 3,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    1: {  # 'า'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 3,  # 'ค'
        8: 3,  # 'ง'
        26: 3,  # 'จ'
        52: 0,  # 'ฉ'
        34: 3,  # 'ช'
        51: 1,  # 'ซ'
        47: 2,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 3,  # 'ณ'
        20: 3,  # 'ด'
        19: 3,  # 'ต'
        44: 1,  # 'ถ'
        14: 3,  # 'ท'
        48: 2,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 2,  # 'ป'
        39: 1,  # 'ผ'
        62: 1,  # 'ฝ'
        31: 3,  # 'พ'
        54: 1,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 3,  # 'ม'
        16: 3,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 3,  # 'ว'
        42: 2,  # 'ศ'
        46: 3,  # 'ษ'
        18: 3,  # 'ส'
        21: 3,  # 'ห'
        4: 2,  # 'อ'
        63: 1,  # 'ฯ'
        22: 3,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 3,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 1,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    36: {  # 'ำ'
        5: 2,  # 'ก'
        30: 1,  # 'ข'
        24: 3,  # 'ค'
        8: 2,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 1,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 1,  # 'ต'
        44: 1,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 1,  # 'บ'
        25: 1,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 1,  # 'ม'
        16: 0,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 3,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 3,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    23: {  # 'ิ'
        5: 3,  # 'ก'
        30: 1,  # 'ข'
        24: 2,  # 'ค'
        8: 3,  # 'ง'
        26: 3,  # 'จ'
        52: 0,  # 'ฉ'
        34: 3,  # 'ช'
        51: 0,  # 'ซ'
        47: 2,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 3,  # 'ด'
        19: 3,  # 'ต'
        44: 1,  # 'ถ'
        14: 3,  # 'ท'
        48: 3,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 2,  # 'ป'
        39: 2,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 3,  # 'พ'
        54: 1,  # 'ฟ'
        45: 2,  # 'ภ'
        9: 3,  # 'ม'
        16: 2,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 3,  # 'ว'
        42: 3,  # 'ศ'
        46: 2,  # 'ษ'
        18: 2,  # 'ส'
        21: 3,  # 'ห'
        4: 1,  # 'อ'
        63: 1,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 3,  # 'เ'
        28: 1,  # 'แ'
        41: 1,  # 'โ'
        29: 1,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 2,  # '้'
        38: 2,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    13: {  # 'ี'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 2,  # 'ค'
        8: 0,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 2,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 1,  # 'น'
        17: 2,  # 'บ'
        25: 2,  # 'ป'
        39: 1,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 2,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 3,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 2,  # 'ว'
        42: 1,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 1,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 2,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 1,  # 'ใ'
        33: 1,  # 'ไ'
        50: 1,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    40: {  # 'ึ'
        5: 3,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 3,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 1,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    27: {  # 'ื'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 2,  # 'น'
        17: 3,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    32: {  # 'ุ'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 3,  # 'ค'
        8: 3,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 2,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 1,  # 'ฒ'
        43: 3,  # 'ณ'
        20: 3,  # 'ด'
        19: 3,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 1,  # 'ธ'
        3: 2,  # 'น'
        17: 2,  # 'บ'
        25: 2,  # 'ป'
        39: 2,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 3,  # 'ม'
        16: 1,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 1,  # 'ว'
        42: 1,  # 'ศ'
        46: 2,  # 'ษ'
        18: 1,  # 'ส'
        21: 1,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 1,  # 'เ'
        28: 0,  # 'แ'
        41: 1,  # 'โ'
        29: 0,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 2,  # '้'
        38: 1,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    35: {  # 'ู'
        5: 3,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 2,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 2,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 1,  # 'ณ'
        20: 2,  # 'ด'
        19: 2,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 2,  # 'น'
        17: 0,  # 'บ'
        25: 3,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 0,  # 'ย'
        2: 1,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 1,  # 'เ'
        28: 1,  # 'แ'
        41: 1,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 3,  # '่'
        7: 3,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    11: {  # 'เ'
        5: 3,  # 'ก'
        30: 3,  # 'ข'
        24: 3,  # 'ค'
        8: 2,  # 'ง'
        26: 3,  # 'จ'
        52: 3,  # 'ฉ'
        34: 3,  # 'ช'
        51: 2,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 1,  # 'ณ'
        20: 3,  # 'ด'
        19: 3,  # 'ต'
        44: 1,  # 'ถ'
        14: 3,  # 'ท'
        48: 1,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 3,  # 'ป'
        39: 2,  # 'ผ'
        62: 1,  # 'ฝ'
        31: 3,  # 'พ'
        54: 1,  # 'ฟ'
        45: 3,  # 'ภ'
        9: 3,  # 'ม'
        16: 2,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 3,  # 'ว'
        42: 2,  # 'ศ'
        46: 0,  # 'ษ'
        18: 3,  # 'ส'
        21: 3,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    28: {  # 'แ'
        5: 3,  # 'ก'
        30: 2,  # 'ข'
        24: 2,  # 'ค'
        8: 1,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 2,  # 'ด'
        19: 3,  # 'ต'
        44: 2,  # 'ถ'
        14: 3,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 2,  # 'ป'
        39: 3,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 2,  # 'พ'
        54: 2,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 2,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 2,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 3,  # 'ส'
        21: 3,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    41: {  # 'โ'
        5: 2,  # 'ก'
        30: 1,  # 'ข'
        24: 2,  # 'ค'
        8: 0,  # 'ง'
        26: 1,  # 'จ'
        52: 1,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 3,  # 'ด'
        19: 2,  # 'ต'
        44: 0,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 1,  # 'บ'
        25: 3,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 1,  # 'ฟ'
        45: 1,  # 'ภ'
        9: 1,  # 'ม'
        16: 2,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 3,  # 'ล'
        12: 0,  # 'ว'
        42: 1,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 0,  # 'ห'
        4: 2,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    29: {  # 'ใ'
        5: 2,  # 'ก'
        30: 0,  # 'ข'
        24: 1,  # 'ค'
        8: 0,  # 'ง'
        26: 3,  # 'จ'
        52: 0,  # 'ฉ'
        34: 3,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 3,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 1,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 3,  # 'ส'
        21: 3,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    33: {  # 'ไ'
        5: 1,  # 'ก'
        30: 2,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 3,  # 'ด'
        19: 1,  # 'ต'
        44: 0,  # 'ถ'
        14: 3,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 1,  # 'บ'
        25: 3,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 2,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 3,  # 'ม'
        16: 0,  # 'ย'
        2: 3,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 3,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 2,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    50: {  # 'ๆ'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    37: {  # '็'
        5: 2,  # 'ก'
        30: 1,  # 'ข'
        24: 2,  # 'ค'
        8: 2,  # 'ง'
        26: 3,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 1,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 2,  # 'ต'
        44: 0,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 3,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 1,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 2,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 0,  # 'ห'
        4: 1,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 1,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    6: {  # '่'
        5: 2,  # 'ก'
        30: 1,  # 'ข'
        24: 2,  # 'ค'
        8: 3,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 1,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 1,  # 'ธ'
        3: 3,  # 'น'
        17: 1,  # 'บ'
        25: 2,  # 'ป'
        39: 2,  # 'ผ'
        62: 1,  # 'ฝ'
        31: 1,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 3,  # 'ม'
        16: 3,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 2,  # 'ล'
        12: 3,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 1,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 1,  # 'ะ'
        10: 0,  # 'ั'
        1: 3,  # 'า'
        36: 2,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 3,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 1,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    7: {  # '้'
        5: 2,  # 'ก'
        30: 1,  # 'ข'
        24: 2,  # 'ค'
        8: 3,  # 'ง'
        26: 2,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 1,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 1,  # 'ด'
        19: 2,  # 'ต'
        44: 1,  # 'ถ'
        14: 2,  # 'ท'
        48: 0,  # 'ธ'
        3: 3,  # 'น'
        17: 2,  # 'บ'
        25: 2,  # 'ป'
        39: 2,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 1,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 3,  # 'ม'
        16: 2,  # 'ย'
        2: 2,  # 'ร'
        61: 0,  # 'ฤ'
        15: 1,  # 'ล'
        12: 3,  # 'ว'
        42: 1,  # 'ศ'
        46: 0,  # 'ษ'
        18: 2,  # 'ส'
        21: 2,  # 'ห'
        4: 3,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 3,  # 'า'
        36: 2,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 2,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 2,  # 'ใ'
        33: 2,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    38: {  # '์'
        5: 2,  # 'ก'
        30: 1,  # 'ข'
        24: 1,  # 'ค'
        8: 0,  # 'ง'
        26: 1,  # 'จ'
        52: 0,  # 'ฉ'
        34: 1,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 2,  # 'ด'
        19: 1,  # 'ต'
        44: 1,  # 'ถ'
        14: 1,  # 'ท'
        48: 0,  # 'ธ'
        3: 1,  # 'น'
        17: 1,  # 'บ'
        25: 1,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 1,  # 'พ'
        54: 1,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 2,  # 'ม'
        16: 0,  # 'ย'
        2: 1,  # 'ร'
        61: 1,  # 'ฤ'
        15: 1,  # 'ล'
        12: 1,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 1,  # 'ส'
        21: 1,  # 'ห'
        4: 2,  # 'อ'
        63: 1,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 2,  # 'เ'
        28: 2,  # 'แ'
        41: 1,  # 'โ'
        29: 1,  # 'ใ'
        33: 1,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 0,  # '๑'
        59: 0,  # '๒'
        60: 0,  # '๕'
    },
    56: {  # '๑'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 2,  # '๑'
        59: 1,  # '๒'
        60: 1,  # '๕'
    },
    59: {  # '๒'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 1,  # '๑'
        59: 1,  # '๒'
        60: 3,  # '๕'
    },
    60: {  # '๕'
        5: 0,  # 'ก'
        30: 0,  # 'ข'
        24: 0,  # 'ค'
        8: 0,  # 'ง'
        26: 0,  # 'จ'
        52: 0,  # 'ฉ'
        34: 0,  # 'ช'
        51: 0,  # 'ซ'
        47: 0,  # 'ญ'
        58: 0,  # 'ฎ'
        57: 0,  # 'ฏ'
        49: 0,  # 'ฐ'
        53: 0,  # 'ฑ'
        55: 0,  # 'ฒ'
        43: 0,  # 'ณ'
        20: 0,  # 'ด'
        19: 0,  # 'ต'
        44: 0,  # 'ถ'
        14: 0,  # 'ท'
        48: 0,  # 'ธ'
        3: 0,  # 'น'
        17: 0,  # 'บ'
        25: 0,  # 'ป'
        39: 0,  # 'ผ'
        62: 0,  # 'ฝ'
        31: 0,  # 'พ'
        54: 0,  # 'ฟ'
        45: 0,  # 'ภ'
        9: 0,  # 'ม'
        16: 0,  # 'ย'
        2: 0,  # 'ร'
        61: 0,  # 'ฤ'
        15: 0,  # 'ล'
        12: 0,  # 'ว'
        42: 0,  # 'ศ'
        46: 0,  # 'ษ'
        18: 0,  # 'ส'
        21: 0,  # 'ห'
        4: 0,  # 'อ'
        63: 0,  # 'ฯ'
        22: 0,  # 'ะ'
        10: 0,  # 'ั'
        1: 0,  # 'า'
        36: 0,  # 'ำ'
        23: 0,  # 'ิ'
        13: 0,  # 'ี'
        40: 0,  # 'ึ'
        27: 0,  # 'ื'
        32: 0,  # 'ุ'
        35: 0,  # 'ู'
        11: 0,  # 'เ'
        28: 0,  # 'แ'
        41: 0,  # 'โ'
        29: 0,  # 'ใ'
        33: 0,  # 'ไ'
        50: 0,  # 'ๆ'
        37: 0,  # '็'
        6: 0,  # '่'
        7: 0,  # '้'
        38: 0,  # '์'
        56: 2,  # '๑'
        59: 1,  # '๒'
        60: 0,  # '๕'
    },
}

# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters

# Character Mapping Table(s):
TIS_620_THAI_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 182,  # 'A'
    66: 106,  # 'B'
    67: 107,  # 'C'
    68: 100,  # 'D'
    69: 183,  # 'E'
    70: 184,  # 'F'
    71: 185,  # 'G'
    72: 101,  # 'H'
    73: 94,  # 'I'
    74: 186,  # 'J'
    75: 187,  # 'K'
    76: 108,  # 'L'
    77: 109,  # 'M'
    78: 110,  # 'N'
    79: 111,  # 'O'
    80: 188,  # 'P'
    81: 189,  # 'Q'
    82: 190,  # 'R'
    83: 89,  # 'S'
    84: 95,  # 'T'
    85: 112,  # 'U'
    86: 113,  # 'V'
    87: 191,  # 'W'
    88: 192,  # 'X'
    89: 193,  # 'Y'
    90: 194,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 64,  # 'a'
    98: 72,  # 'b'
    99: 73,  # 'c'
    100: 114,  # 'd'
    101: 74,  # 'e'
    102: 115,  # 'f'
    103: 116,  # 'g'
    104: 102,  # 'h'
    105: 81,  # 'i'
    106: 201,  # 'j'
    107: 117,  # 'k'
    108: 90,  # 'l'
    109: 103,  # 'm'
    110: 78,  # 'n'
    111: 82,  # 'o'
    112: 96,  # 'p'
    113: 202,  # 'q'
    114: 91,  # 'r'
    115: 79,  # 's'
    116: 84,  # 't'
    117: 104,  # 'u'
    118: 105,  # 'v'
    119: 97,  # 'w'
    120: 98,  # 'x'
    121: 92,  # 'y'
    122: 203,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 209,  # '\x80'
    129: 210,  # '\x81'
    130: 211,  # '\x82'
    131: 212,  # '\x83'
    132: 213,  # '\x84'
    133: 88,  # '\x85'
    134: 214,  # '\x86'
    135: 215,  # '\x87'
    136: 216,  # '\x88'
    137: 217,  # '\x89'
    138: 218,  # '\x8a'
    139: 219,  # '\x8b'
    140: 220,  # '\x8c'
    141: 118,  # '\x8d'
    142: 221,  # '\x8e'
    143: 222,  # '\x8f'
    144: 223,  # '\x90'
    145: 224,  # '\x91'
    146: 99,  # '\x92'
    147: 85,  # '\x93'
    148: 83,  # '\x94'
    149: 225,  # '\x95'
    150: 226,  # '\x96'
    151: 227,  # '\x97'
    152: 228,  # '\x98'
    153: 229,  # '\x99'
    154: 230,  # '\x9a'
    155: 231,  # '\x9b'
    156: 232,  # '\x9c'
    157: 233,  # '\x9d'
    158: 234,  # '\x9e'
    159: 235,  # '\x9f'
    160: 236,  # None
    161: 5,  # 'ก'
    162: 30,  # 'ข'
    163: 237,  # 'ฃ'
    164: 24,  # 'ค'
    165: 238,  # 'ฅ'
    166: 75,  # 'ฆ'
    167: 8,  # 'ง'
    168: 26,  # 'จ'
    169: 52,  # 'ฉ'
    170: 34,  # 'ช'
    171: 51,  # 'ซ'
    172: 119,  # 'ฌ'
    173: 47,  # 'ญ'
    174: 58,  # 'ฎ'
    175: 57,  # 'ฏ'
    176: 49,  # 'ฐ'
    177: 53,  # 'ฑ'
    178: 55,  # 'ฒ'
    179: 43,  # 'ณ'
    180: 20,  # 'ด'
    181: 19,  # 'ต'
    182: 44,  # 'ถ'
    183: 14,  # 'ท'
    184: 48,  # 'ธ'
    185: 3,  # 'น'
    186: 17,  # 'บ'
    187: 25,  # 'ป'
    188: 39,  # 'ผ'
    189: 62,  # 'ฝ'
    190: 31,  # 'พ'
    191: 54,  # 'ฟ'
    192: 45,  # 'ภ'
    193: 9,  # 'ม'
    194: 16,  # 'ย'
    195: 2,  # 'ร'
    196: 61,  # 'ฤ'
    197: 15,  # 'ล'
    198: 239,  # 'ฦ'
    199: 12,  # 'ว'
    200: 42,  # 'ศ'
    201: 46,  # 'ษ'
    202: 18,  # 'ส'
    203: 21,  # 'ห'
    204: 76,  # 'ฬ'
    205: 4,  # 'อ'
    206: 66,  # 'ฮ'
    207: 63,  # 'ฯ'
    208: 22,  # 'ะ'
    209: 10,  # 'ั'
    210: 1,  # 'า'
    211: 36,  # 'ำ'
    212: 23,  # 'ิ'
    213: 13,  # 'ี'
    214: 40,  # 'ึ'
    215: 27,  # 'ื'
    216: 32,  # 'ุ'
    217: 35,  # 'ู'
    218: 86,  # 'ฺ'
    219: 240,  # None
    220: 241,  # None
    221: 242,  # None
    222: 243,  # None
    223: 244,  # '฿'
    224: 11,  # 'เ'
    225: 28,  # 'แ'
    226: 41,  # 'โ'
    227: 29,  # 'ใ'
    228: 33,  # 'ไ'
    229: 245,  # 'ๅ'
    230: 50,  # 'ๆ'
    231: 37,  # '็'
    232: 6,  # '่'
    233: 7,  # '้'
    234: 67,  # '๊'
    235: 77,  # '๋'
    236: 38,  # '์'
    237: 93,  # 'ํ'
    238: 246,  # '๎'
    239: 247,  # '๏'
    240: 68,  # '๐'
    241: 56,  # '๑'
    242: 59,  # '๒'
    243: 65,  # '๓'
    244: 69,  # '๔'
    245: 60,  # '๕'
    246: 70,  # '๖'
    247: 80,  # '๗'
    248: 71,  # '๘'
    249: 87,  # '๙'
    250: 248,  # '๚'
    251: 249,  # '๛'
    252: 250,  # None
    253: 251,  # None
    254: 252,  # None
    255: 253,  # None
}

TIS_620_THAI_MODEL = SingleByteCharSetModel(
    charset_name="TIS-620",
    language="Thai",
    char_to_order_map=TIS_620_THAI_CHAR_TO_ORDER,
    language_model=THAI_LANG_MODEL,
    typical_positive_ratio=0.926386,
    keep_ascii_letters=False,
    alphabet="กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛",
)
python3.12/site-packages/pip/_vendor/chardet/eucjpprober.py000064400000007536151732703210017655 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import Union

from .chardistribution import EUCJPDistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .enums import MachineState, ProbingState
from .jpcntx import EUCJPContextAnalysis
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import EUCJP_SM_MODEL


class EUCJPProber(MultiByteCharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(EUCJP_SM_MODEL)
        self.distribution_analyzer = EUCJPDistributionAnalysis()
        self.context_analyzer = EUCJPContextAnalysis()
        self.reset()

    def reset(self) -> None:
        super().reset()
        self.context_analyzer.reset()

    @property
    def charset_name(self) -> str:
        return "EUC-JP"

    @property
    def language(self) -> str:
        return "Japanese"

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        assert self.coding_sm is not None
        assert self.distribution_analyzer is not None

        for i, byte in enumerate(byte_str):
            # PY3K: byte_str is a byte array, so byte is an int, not a byte
            coding_state = self.coding_sm.next_state(byte)
            if coding_state == MachineState.ERROR:
                self.logger.debug(
                    "%s %s prober hit error at byte %s",
                    self.charset_name,
                    self.language,
                    i,
                )
                self._state = ProbingState.NOT_ME
                break
            if coding_state == MachineState.ITS_ME:
                self._state = ProbingState.FOUND_IT
                break
            if coding_state == MachineState.START:
                char_len = self.coding_sm.get_current_charlen()
                if i == 0:
                    self._last_char[1] = byte
                    self.context_analyzer.feed(self._last_char, char_len)
                    self.distribution_analyzer.feed(self._last_char, char_len)
                else:
                    self.context_analyzer.feed(byte_str[i - 1 : i + 1], char_len)
                    self.distribution_analyzer.feed(byte_str[i - 1 : i + 1], char_len)

        self._last_char[0] = byte_str[-1]

        if self.state == ProbingState.DETECTING:
            if self.context_analyzer.got_enough_data() and (
                self.get_confidence() > self.SHORTCUT_THRESHOLD
            ):
                self._state = ProbingState.FOUND_IT

        return self.state

    def get_confidence(self) -> float:
        assert self.distribution_analyzer is not None

        context_conf = self.context_analyzer.get_confidence()
        distrib_conf = self.distribution_analyzer.get_confidence()
        return max(context_conf, distrib_conf)
python3.12/site-packages/pip/_vendor/chardet/big5freq.py000064400000075052151732703210017037 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Big5 frequency table
# by Taiwan's Mandarin Promotion Council
# <http://www.edu.tw:81/mandr/>
#
# 128  --> 0.42261
# 256  --> 0.57851
# 512  --> 0.74851
# 1024 --> 0.89384
# 2048 --> 0.97583
#
# Ideal Distribution Ratio = 0.74851/(1-0.74851) =2.98
# Random Distribution Ration = 512/(5401-512)=0.105
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR

BIG5_TYPICAL_DISTRIBUTION_RATIO = 0.75

# Char to FreqOrder table
BIG5_TABLE_SIZE = 5376
# fmt: off
BIG5_CHAR_TO_FREQ_ORDER = (
   1,1801,1506, 255,1431, 198,   9,  82,   6,5008, 177, 202,3681,1256,2821, 110, #   16
3814,  33,3274, 261,  76,  44,2114,  16,2946,2187,1176, 659,3971,  26,3451,2653, #   32
1198,3972,3350,4202, 410,2215, 302, 590, 361,1964,   8, 204,  58,4510,5009,1932, #   48
  63,5010,5011, 317,1614,  75, 222, 159,4203,2417,1480,5012,3555,3091, 224,2822, #   64
3682,   3,  10,3973,1471,  29,2787,1135,2866,1940, 873, 130,3275,1123, 312,5013, #   80
4511,2052, 507, 252, 682,5014, 142,1915, 124, 206,2947,  34,3556,3204,  64, 604, #   96
5015,2501,1977,1978, 155,1991, 645, 641,1606,5016,3452, 337,  72, 406,5017,  80, #  112
 630, 238,3205,1509, 263, 939,1092,2654, 756,1440,1094,3453, 449,  69,2987, 591, #  128
 179,2096, 471, 115,2035,1844,  60,  50,2988, 134, 806,1869, 734,2036,3454, 180, #  144
 995,1607, 156, 537,2907, 688,5018, 319,1305, 779,2145, 514,2379, 298,4512, 359, #  160
2502,  90,2716,1338, 663,  11, 906,1099,2553,  20,2441, 182, 532,1716,5019, 732, #  176
1376,4204,1311,1420,3206,  25,2317,1056, 113, 399, 382,1950, 242,3455,2474, 529, #  192
3276, 475,1447,3683,5020, 117,  21, 656, 810,1297,2300,2334,3557,5021, 126,4205, #  208
 706, 456, 150, 613,4513,  71,1118,2037,4206, 145,3092,  85, 835, 486,2115,1246, #  224
1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,5022,2128,2359, 347,3815, 221, #  240
3558,3135,5023,1956,1153,4207,  83, 296,1199,3093, 192, 624,  93,5024, 822,1898, #  256
2823,3136, 795,2065, 991,1554,1542,1592,  27,  43,2867, 859, 139,1456, 860,4514, #  272
 437, 712,3974, 164,2397,3137, 695, 211,3037,2097, 195,3975,1608,3559,3560,3684, #  288
3976, 234, 811,2989,2098,3977,2233,1441,3561,1615,2380, 668,2077,1638, 305, 228, #  304
1664,4515, 467, 415,5025, 262,2099,1593, 239, 108, 300, 200,1033, 512,1247,2078, #  320
5026,5027,2176,3207,3685,2682, 593, 845,1062,3277,  88,1723,2038,3978,1951, 212, #  336
 266, 152, 149, 468,1899,4208,4516,  77, 187,5028,3038,  37,   5,2990,5029,3979, #  352
5030,5031,  39,2524,4517,2908,3208,2079,  55, 148,  74,4518, 545, 483,1474,1029, #  368
1665, 217,1870,1531,3138,1104,2655,4209,  24, 172,3562, 900,3980,3563,3564,4519, #  384
  32,1408,2824,1312, 329, 487,2360,2251,2717, 784,2683,   4,3039,3351,1427,1789, #  400
 188, 109, 499,5032,3686,1717,1790, 888,1217,3040,4520,5033,3565,5034,3352,1520, #  416
3687,3981, 196,1034, 775,5035,5036, 929,1816, 249, 439,  38,5037,1063,5038, 794, #  432
3982,1435,2301,  46, 178,3278,2066,5039,2381,5040, 214,1709,4521, 804,  35, 707, #  448
 324,3688,1601,2554, 140, 459,4210,5041,5042,1365, 839, 272, 978,2262,2580,3456, #  464
2129,1363,3689,1423, 697, 100,3094,  48,  70,1231, 495,3139,2196,5043,1294,5044, #  480
2080, 462, 586,1042,3279, 853, 256, 988, 185,2382,3457,1698, 434,1084,5045,3458, #  496
 314,2625,2788,4522,2335,2336, 569,2285, 637,1817,2525, 757,1162,1879,1616,3459, #  512
 287,1577,2116, 768,4523,1671,2868,3566,2526,1321,3816, 909,2418,5046,4211, 933, #  528
3817,4212,2053,2361,1222,4524, 765,2419,1322, 786,4525,5047,1920,1462,1677,2909, #  544
1699,5048,4526,1424,2442,3140,3690,2600,3353,1775,1941,3460,3983,4213, 309,1369, #  560
1130,2825, 364,2234,1653,1299,3984,3567,3985,3986,2656, 525,1085,3041, 902,2001, #  576
1475, 964,4527, 421,1845,1415,1057,2286, 940,1364,3141, 376,4528,4529,1381,   7, #  592
2527, 983,2383, 336,1710,2684,1846, 321,3461, 559,1131,3042,2752,1809,1132,1313, #  608
 265,1481,1858,5049, 352,1203,2826,3280, 167,1089, 420,2827, 776, 792,1724,3568, #  624
4214,2443,3281,5050,4215,5051, 446, 229, 333,2753, 901,3818,1200,1557,4530,2657, #  640
1921, 395,2754,2685,3819,4216,1836, 125, 916,3209,2626,4531,5052,5053,3820,5054, #  656
5055,5056,4532,3142,3691,1133,2555,1757,3462,1510,2318,1409,3569,5057,2146, 438, #  672
2601,2910,2384,3354,1068, 958,3043, 461, 311,2869,2686,4217,1916,3210,4218,1979, #  688
 383, 750,2755,2627,4219, 274, 539, 385,1278,1442,5058,1154,1965, 384, 561, 210, #  704
  98,1295,2556,3570,5059,1711,2420,1482,3463,3987,2911,1257, 129,5060,3821, 642, #  720
 523,2789,2790,2658,5061, 141,2235,1333,  68, 176, 441, 876, 907,4220, 603,2602, #  736
 710, 171,3464, 404, 549,  18,3143,2398,1410,3692,1666,5062,3571,4533,2912,4534, #  752
5063,2991, 368,5064, 146, 366,  99, 871,3693,1543, 748, 807,1586,1185,  22,2263, #  768
 379,3822,3211,5065,3212, 505,1942,2628,1992,1382,2319,5066, 380,2362, 218, 702, #  784
1818,1248,3465,3044,3572,3355,3282,5067,2992,3694, 930,3283,3823,5068,  59,5069, #  800
 585, 601,4221, 497,3466,1112,1314,4535,1802,5070,1223,1472,2177,5071, 749,1837, #  816
 690,1900,3824,1773,3988,1476, 429,1043,1791,2236,2117, 917,4222, 447,1086,1629, #  832
5072, 556,5073,5074,2021,1654, 844,1090, 105, 550, 966,1758,2828,1008,1783, 686, #  848
1095,5075,2287, 793,1602,5076,3573,2603,4536,4223,2948,2302,4537,3825, 980,2503, #  864
 544, 353, 527,4538, 908,2687,2913,5077, 381,2629,1943,1348,5078,1341,1252, 560, #  880
3095,5079,3467,2870,5080,2054, 973, 886,2081, 143,4539,5081,5082, 157,3989, 496, #  896
4224,  57, 840, 540,2039,4540,4541,3468,2118,1445, 970,2264,1748,1966,2082,4225, #  912
3144,1234,1776,3284,2829,3695, 773,1206,2130,1066,2040,1326,3990,1738,1725,4226, #  928
 279,3145,  51,1544,2604, 423,1578,2131,2067, 173,4542,1880,5083,5084,1583, 264, #  944
 610,3696,4543,2444, 280, 154,5085,5086,5087,1739, 338,1282,3096, 693,2871,1411, #  960
1074,3826,2445,5088,4544,5089,5090,1240, 952,2399,5091,2914,1538,2688, 685,1483, #  976
4227,2475,1436, 953,4228,2055,4545, 671,2400,  79,4229,2446,3285, 608, 567,2689, #  992
3469,4230,4231,1691, 393,1261,1792,2401,5092,4546,5093,5094,5095,5096,1383,1672, # 1008
3827,3213,1464, 522,1119, 661,1150, 216, 675,4547,3991,1432,3574, 609,4548,2690, # 1024
2402,5097,5098,5099,4232,3045,   0,5100,2476, 315, 231,2447, 301,3356,4549,2385, # 1040
5101, 233,4233,3697,1819,4550,4551,5102,  96,1777,1315,2083,5103, 257,5104,1810, # 1056
3698,2718,1139,1820,4234,2022,1124,2164,2791,1778,2659,5105,3097, 363,1655,3214, # 1072
5106,2993,5107,5108,5109,3992,1567,3993, 718, 103,3215, 849,1443, 341,3357,2949, # 1088
1484,5110,1712, 127,  67, 339,4235,2403, 679,1412, 821,5111,5112, 834, 738, 351, # 1104
2994,2147, 846, 235,1497,1881, 418,1993,3828,2719, 186,1100,2148,2756,3575,1545, # 1120
1355,2950,2872,1377, 583,3994,4236,2581,2995,5113,1298,3699,1078,2557,3700,2363, # 1136
  78,3829,3830, 267,1289,2100,2002,1594,4237, 348, 369,1274,2197,2178,1838,4552, # 1152
1821,2830,3701,2757,2288,2003,4553,2951,2758, 144,3358, 882,4554,3995,2759,3470, # 1168
4555,2915,5114,4238,1726, 320,5115,3996,3046, 788,2996,5116,2831,1774,1327,2873, # 1184
3997,2832,5117,1306,4556,2004,1700,3831,3576,2364,2660, 787,2023, 506, 824,3702, # 1200
 534, 323,4557,1044,3359,2024,1901, 946,3471,5118,1779,1500,1678,5119,1882,4558, # 1216
 165, 243,4559,3703,2528, 123, 683,4239, 764,4560,  36,3998,1793, 589,2916, 816, # 1232
 626,1667,3047,2237,1639,1555,1622,3832,3999,5120,4000,2874,1370,1228,1933, 891, # 1248
2084,2917, 304,4240,5121, 292,2997,2720,3577, 691,2101,4241,1115,4561, 118, 662, # 1264
5122, 611,1156, 854,2386,1316,2875,   2, 386, 515,2918,5123,5124,3286, 868,2238, # 1280
1486, 855,2661, 785,2216,3048,5125,1040,3216,3578,5126,3146, 448,5127,1525,5128, # 1296
2165,4562,5129,3833,5130,4242,2833,3579,3147, 503, 818,4001,3148,1568, 814, 676, # 1312
1444, 306,1749,5131,3834,1416,1030, 197,1428, 805,2834,1501,4563,5132,5133,5134, # 1328
1994,5135,4564,5136,5137,2198,  13,2792,3704,2998,3149,1229,1917,5138,3835,2132, # 1344
5139,4243,4565,2404,3580,5140,2217,1511,1727,1120,5141,5142, 646,3836,2448, 307, # 1360
5143,5144,1595,3217,5145,5146,5147,3705,1113,1356,4002,1465,2529,2530,5148, 519, # 1376
5149, 128,2133,  92,2289,1980,5150,4003,1512, 342,3150,2199,5151,2793,2218,1981, # 1392
3360,4244, 290,1656,1317, 789, 827,2365,5152,3837,4566, 562, 581,4004,5153, 401, # 1408
4567,2252,  94,4568,5154,1399,2794,5155,1463,2025,4569,3218,1944,5156, 828,1105, # 1424
4245,1262,1394,5157,4246, 605,4570,5158,1784,2876,5159,2835, 819,2102, 578,2200, # 1440
2952,5160,1502, 436,3287,4247,3288,2836,4005,2919,3472,3473,5161,2721,2320,5162, # 1456
5163,2337,2068,  23,4571, 193, 826,3838,2103, 699,1630,4248,3098, 390,1794,1064, # 1472
3581,5164,1579,3099,3100,1400,5165,4249,1839,1640,2877,5166,4572,4573, 137,4250, # 1488
 598,3101,1967, 780, 104, 974,2953,5167, 278, 899, 253, 402, 572, 504, 493,1339, # 1504
5168,4006,1275,4574,2582,2558,5169,3706,3049,3102,2253, 565,1334,2722, 863,  41, # 1520
5170,5171,4575,5172,1657,2338,  19, 463,2760,4251, 606,5173,2999,3289,1087,2085, # 1536
1323,2662,3000,5174,1631,1623,1750,4252,2691,5175,2878, 791,2723,2663,2339, 232, # 1552
2421,5176,3001,1498,5177,2664,2630, 755,1366,3707,3290,3151,2026,1609, 119,1918, # 1568
3474, 862,1026,4253,5178,4007,3839,4576,4008,4577,2265,1952,2477,5179,1125, 817, # 1584
4254,4255,4009,1513,1766,2041,1487,4256,3050,3291,2837,3840,3152,5180,5181,1507, # 1600
5182,2692, 733,  40,1632,1106,2879, 345,4257, 841,2531, 230,4578,3002,1847,3292, # 1616
3475,5183,1263, 986,3476,5184, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562, # 1632
4010,4011,2954, 967,2761,2665,1349, 592,2134,1692,3361,3003,1995,4258,1679,4012, # 1648
1902,2188,5185, 739,3708,2724,1296,1290,5186,4259,2201,2202,1922,1563,2605,2559, # 1664
1871,2762,3004,5187, 435,5188, 343,1108, 596,  17,1751,4579,2239,3477,3709,5189, # 1680
4580, 294,3582,2955,1693, 477, 979, 281,2042,3583, 643,2043,3710,2631,2795,2266, # 1696
1031,2340,2135,2303,3584,4581, 367,1249,2560,5190,3585,5191,4582,1283,3362,2005, # 1712
 240,1762,3363,4583,4584, 836,1069,3153, 474,5192,2149,2532, 268,3586,5193,3219, # 1728
1521,1284,5194,1658,1546,4260,5195,3587,3588,5196,4261,3364,2693,1685,4262, 961, # 1744
1673,2632, 190,2006,2203,3841,4585,4586,5197, 570,2504,3711,1490,5198,4587,2633, # 1760
3293,1957,4588, 584,1514, 396,1045,1945,5199,4589,1968,2449,5200,5201,4590,4013, # 1776
 619,5202,3154,3294, 215,2007,2796,2561,3220,4591,3221,4592, 763,4263,3842,4593, # 1792
5203,5204,1958,1767,2956,3365,3712,1174, 452,1477,4594,3366,3155,5205,2838,1253, # 1808
2387,2189,1091,2290,4264, 492,5206, 638,1169,1825,2136,1752,4014, 648, 926,1021, # 1824
1324,4595, 520,4596, 997, 847,1007, 892,4597,3843,2267,1872,3713,2405,1785,4598, # 1840
1953,2957,3103,3222,1728,4265,2044,3714,4599,2008,1701,3156,1551,  30,2268,4266, # 1856
5207,2027,4600,3589,5208, 501,5209,4267, 594,3478,2166,1822,3590,3479,3591,3223, # 1872
 829,2839,4268,5210,1680,3157,1225,4269,5211,3295,4601,4270,3158,2341,5212,4602, # 1888
4271,5213,4015,4016,5214,1848,2388,2606,3367,5215,4603, 374,4017, 652,4272,4273, # 1904
 375,1140, 798,5216,5217,5218,2366,4604,2269, 546,1659, 138,3051,2450,4605,5219, # 1920
2254, 612,1849, 910, 796,3844,1740,1371, 825,3845,3846,5220,2920,2562,5221, 692, # 1936
 444,3052,2634, 801,4606,4274,5222,1491, 244,1053,3053,4275,4276, 340,5223,4018, # 1952
1041,3005, 293,1168,  87,1357,5224,1539, 959,5225,2240, 721, 694,4277,3847, 219, # 1968
1478, 644,1417,3368,2666,1413,1401,1335,1389,4019,5226,5227,3006,2367,3159,1826, # 1984
 730,1515, 184,2840,  66,4607,5228,1660,2958, 246,3369, 378,1457, 226,3480, 975, # 2000
4020,2959,1264,3592, 674, 696,5229, 163,5230,1141,2422,2167, 713,3593,3370,4608, # 2016
4021,5231,5232,1186,  15,5233,1079,1070,5234,1522,3224,3594, 276,1050,2725, 758, # 2032
1126, 653,2960,3296,5235,2342, 889,3595,4022,3104,3007, 903,1250,4609,4023,3481, # 2048
3596,1342,1681,1718, 766,3297, 286,  89,2961,3715,5236,1713,5237,2607,3371,3008, # 2064
5238,2962,2219,3225,2880,5239,4610,2505,2533, 181, 387,1075,4024, 731,2190,3372, # 2080
5240,3298, 310, 313,3482,2304, 770,4278,  54,3054, 189,4611,3105,3848,4025,5241, # 2096
1230,1617,1850, 355,3597,4279,4612,3373, 111,4280,3716,1350,3160,3483,3055,4281, # 2112
2150,3299,3598,5242,2797,4026,4027,3009, 722,2009,5243,1071, 247,1207,2343,2478, # 2128
1378,4613,2010, 864,1437,1214,4614, 373,3849,1142,2220, 667,4615, 442,2763,2563, # 2144
3850,4028,1969,4282,3300,1840, 837, 170,1107, 934,1336,1883,5244,5245,2119,4283, # 2160
2841, 743,1569,5246,4616,4284, 582,2389,1418,3484,5247,1803,5248, 357,1395,1729, # 2176
3717,3301,2423,1564,2241,5249,3106,3851,1633,4617,1114,2086,4285,1532,5250, 482, # 2192
2451,4618,5251,5252,1492, 833,1466,5253,2726,3599,1641,2842,5254,1526,1272,3718, # 2208
4286,1686,1795, 416,2564,1903,1954,1804,5255,3852,2798,3853,1159,2321,5256,2881, # 2224
4619,1610,1584,3056,2424,2764, 443,3302,1163,3161,5257,5258,4029,5259,4287,2506, # 2240
3057,4620,4030,3162,2104,1647,3600,2011,1873,4288,5260,4289, 431,3485,5261, 250, # 2256
  97,  81,4290,5262,1648,1851,1558, 160, 848,5263, 866, 740,1694,5264,2204,2843, # 2272
3226,4291,4621,3719,1687, 950,2479, 426, 469,3227,3720,3721,4031,5265,5266,1188, # 2288
 424,1996, 861,3601,4292,3854,2205,2694, 168,1235,3602,4293,5267,2087,1674,4622, # 2304
3374,3303, 220,2565,1009,5268,3855, 670,3010, 332,1208, 717,5269,5270,3603,2452, # 2320
4032,3375,5271, 513,5272,1209,2882,3376,3163,4623,1080,5273,5274,5275,5276,2534, # 2336
3722,3604, 815,1587,4033,4034,5277,3605,3486,3856,1254,4624,1328,3058,1390,4035, # 2352
1741,4036,3857,4037,5278, 236,3858,2453,3304,5279,5280,3723,3859,1273,3860,4625, # 2368
5281, 308,5282,4626, 245,4627,1852,2480,1307,2583, 430, 715,2137,2454,5283, 270, # 2384
 199,2883,4038,5284,3606,2727,1753, 761,1754, 725,1661,1841,4628,3487,3724,5285, # 2400
5286, 587,  14,3305, 227,2608, 326, 480,2270, 943,2765,3607, 291, 650,1884,5287, # 2416
1702,1226, 102,1547,  62,3488, 904,4629,3489,1164,4294,5288,5289,1224,1548,2766, # 2432
 391, 498,1493,5290,1386,1419,5291,2056,1177,4630, 813, 880,1081,2368, 566,1145, # 2448
4631,2291,1001,1035,2566,2609,2242, 394,1286,5292,5293,2069,5294,  86,1494,1730, # 2464
4039, 491,1588, 745, 897,2963, 843,3377,4040,2767,2884,3306,1768, 998,2221,2070, # 2480
 397,1827,1195,1970,3725,3011,3378, 284,5295,3861,2507,2138,2120,1904,5296,4041, # 2496
2151,4042,4295,1036,3490,1905, 114,2567,4296, 209,1527,5297,5298,2964,2844,2635, # 2512
2390,2728,3164, 812,2568,5299,3307,5300,1559, 737,1885,3726,1210, 885,  28,2695, # 2528
3608,3862,5301,4297,1004,1780,4632,5302, 346,1982,2222,2696,4633,3863,1742, 797, # 2544
1642,4043,1934,1072,1384,2152, 896,4044,3308,3727,3228,2885,3609,5303,2569,1959, # 2560
4634,2455,1786,5304,5305,5306,4045,4298,1005,1308,3728,4299,2729,4635,4636,1528, # 2576
2610, 161,1178,4300,1983, 987,4637,1101,4301, 631,4046,1157,3229,2425,1343,1241, # 2592
1016,2243,2570, 372, 877,2344,2508,1160, 555,1935, 911,4047,5307, 466,1170, 169, # 2608
1051,2921,2697,3729,2481,3012,1182,2012,2571,1251,2636,5308, 992,2345,3491,1540, # 2624
2730,1201,2071,2406,1997,2482,5309,4638, 528,1923,2191,1503,1874,1570,2369,3379, # 2640
3309,5310, 557,1073,5311,1828,3492,2088,2271,3165,3059,3107, 767,3108,2799,4639, # 2656
1006,4302,4640,2346,1267,2179,3730,3230, 778,4048,3231,2731,1597,2667,5312,4641, # 2672
5313,3493,5314,5315,5316,3310,2698,1433,3311, 131,  95,1504,4049, 723,4303,3166, # 2688
1842,3610,2768,2192,4050,2028,2105,3731,5317,3013,4051,1218,5318,3380,3232,4052, # 2704
4304,2584, 248,1634,3864, 912,5319,2845,3732,3060,3865, 654,  53,5320,3014,5321, # 2720
1688,4642, 777,3494,1032,4053,1425,5322, 191, 820,2121,2846, 971,4643, 931,3233, # 2736
 135, 664, 783,3866,1998, 772,2922,1936,4054,3867,4644,2923,3234, 282,2732, 640, # 2752
1372,3495,1127, 922, 325,3381,5323,5324, 711,2045,5325,5326,4055,2223,2800,1937, # 2768
4056,3382,2224,2255,3868,2305,5327,4645,3869,1258,3312,4057,3235,2139,2965,4058, # 2784
4059,5328,2225, 258,3236,4646, 101,1227,5329,3313,1755,5330,1391,3314,5331,2924, # 2800
2057, 893,5332,5333,5334,1402,4305,2347,5335,5336,3237,3611,5337,5338, 878,1325, # 2816
1781,2801,4647, 259,1385,2585, 744,1183,2272,4648,5339,4060,2509,5340, 684,1024, # 2832
4306,5341, 472,3612,3496,1165,3315,4061,4062, 322,2153, 881, 455,1695,1152,1340, # 2848
 660, 554,2154,4649,1058,4650,4307, 830,1065,3383,4063,4651,1924,5342,1703,1919, # 2864
5343, 932,2273, 122,5344,4652, 947, 677,5345,3870,2637, 297,1906,1925,2274,4653, # 2880
2322,3316,5346,5347,4308,5348,4309,  84,4310, 112, 989,5349, 547,1059,4064, 701, # 2896
3613,1019,5350,4311,5351,3497, 942, 639, 457,2306,2456, 993,2966, 407, 851, 494, # 2912
4654,3384, 927,5352,1237,5353,2426,3385, 573,4312, 680, 921,2925,1279,1875, 285, # 2928
 790,1448,1984, 719,2168,5354,5355,4655,4065,4066,1649,5356,1541, 563,5357,1077, # 2944
5358,3386,3061,3498, 511,3015,4067,4068,3733,4069,1268,2572,3387,3238,4656,4657, # 2960
5359, 535,1048,1276,1189,2926,2029,3167,1438,1373,2847,2967,1134,2013,5360,4313, # 2976
1238,2586,3109,1259,5361, 700,5362,2968,3168,3734,4314,5363,4315,1146,1876,1907, # 2992
4658,2611,4070, 781,2427, 132,1589, 203, 147, 273,2802,2407, 898,1787,2155,4071, # 3008
4072,5364,3871,2803,5365,5366,4659,4660,5367,3239,5368,1635,3872, 965,5369,1805, # 3024
2699,1516,3614,1121,1082,1329,3317,4073,1449,3873,  65,1128,2848,2927,2769,1590, # 3040
3874,5370,5371,  12,2668,  45, 976,2587,3169,4661, 517,2535,1013,1037,3240,5372, # 3056
3875,2849,5373,3876,5374,3499,5375,2612, 614,1999,2323,3877,3110,2733,2638,5376, # 3072
2588,4316, 599,1269,5377,1811,3735,5378,2700,3111, 759,1060, 489,1806,3388,3318, # 3088
1358,5379,5380,2391,1387,1215,2639,2256, 490,5381,5382,4317,1759,2392,2348,5383, # 3104
4662,3878,1908,4074,2640,1807,3241,4663,3500,3319,2770,2349, 874,5384,5385,3501, # 3120
3736,1859,  91,2928,3737,3062,3879,4664,5386,3170,4075,2669,5387,3502,1202,1403, # 3136
3880,2969,2536,1517,2510,4665,3503,2511,5388,4666,5389,2701,1886,1495,1731,4076, # 3152
2370,4667,5390,2030,5391,5392,4077,2702,1216, 237,2589,4318,2324,4078,3881,4668, # 3168
4669,2703,3615,3504, 445,4670,5393,5394,5395,5396,2771,  61,4079,3738,1823,4080, # 3184
5397, 687,2046, 935, 925, 405,2670, 703,1096,1860,2734,4671,4081,1877,1367,2704, # 3200
3389, 918,2106,1782,2483, 334,3320,1611,1093,4672, 564,3171,3505,3739,3390, 945, # 3216
2641,2058,4673,5398,1926, 872,4319,5399,3506,2705,3112, 349,4320,3740,4082,4674, # 3232
3882,4321,3741,2156,4083,4675,4676,4322,4677,2408,2047, 782,4084, 400, 251,4323, # 3248
1624,5400,5401, 277,3742, 299,1265, 476,1191,3883,2122,4324,4325,1109, 205,5402, # 3264
2590,1000,2157,3616,1861,5403,5404,5405,4678,5406,4679,2573, 107,2484,2158,4085, # 3280
3507,3172,5407,1533, 541,1301, 158, 753,4326,2886,3617,5408,1696, 370,1088,4327, # 3296
4680,3618, 579, 327, 440, 162,2244, 269,1938,1374,3508, 968,3063,  56,1396,3113, # 3312
2107,3321,3391,5409,1927,2159,4681,3016,5410,3619,5411,5412,3743,4682,2485,5413, # 3328
2804,5414,1650,4683,5415,2613,5416,5417,4086,2671,3392,1149,3393,4087,3884,4088, # 3344
5418,1076,  49,5419, 951,3242,3322,3323, 450,2850, 920,5420,1812,2805,2371,4328, # 3360
1909,1138,2372,3885,3509,5421,3243,4684,1910,1147,1518,2428,4685,3886,5422,4686, # 3376
2393,2614, 260,1796,3244,5423,5424,3887,3324, 708,5425,3620,1704,5426,3621,1351, # 3392
1618,3394,3017,1887, 944,4329,3395,4330,3064,3396,4331,5427,3744, 422, 413,1714, # 3408
3325, 500,2059,2350,4332,2486,5428,1344,1911, 954,5429,1668,5430,5431,4089,2409, # 3424
4333,3622,3888,4334,5432,2307,1318,2512,3114, 133,3115,2887,4687, 629,  31,2851, # 3440
2706,3889,4688, 850, 949,4689,4090,2970,1732,2089,4335,1496,1853,5433,4091, 620, # 3456
3245, 981,1242,3745,3397,1619,3746,1643,3326,2140,2457,1971,1719,3510,2169,5434, # 3472
3246,5435,5436,3398,1829,5437,1277,4690,1565,2048,5438,1636,3623,3116,5439, 869, # 3488
2852, 655,3890,3891,3117,4092,3018,3892,1310,3624,4691,5440,5441,5442,1733, 558, # 3504
4692,3747, 335,1549,3065,1756,4336,3748,1946,3511,1830,1291,1192, 470,2735,2108, # 3520
2806, 913,1054,4093,5443,1027,5444,3066,4094,4693, 982,2672,3399,3173,3512,3247, # 3536
3248,1947,2807,5445, 571,4694,5446,1831,5447,3625,2591,1523,2429,5448,2090, 984, # 3552
4695,3749,1960,5449,3750, 852, 923,2808,3513,3751, 969,1519, 999,2049,2325,1705, # 3568
5450,3118, 615,1662, 151, 597,4095,2410,2326,1049, 275,4696,3752,4337, 568,3753, # 3584
3626,2487,4338,3754,5451,2430,2275, 409,3249,5452,1566,2888,3514,1002, 769,2853, # 3600
 194,2091,3174,3755,2226,3327,4339, 628,1505,5453,5454,1763,2180,3019,4096, 521, # 3616
1161,2592,1788,2206,2411,4697,4097,1625,4340,4341, 412,  42,3119, 464,5455,2642, # 3632
4698,3400,1760,1571,2889,3515,2537,1219,2207,3893,2643,2141,2373,4699,4700,3328, # 3648
1651,3401,3627,5456,5457,3628,2488,3516,5458,3756,5459,5460,2276,2092, 460,5461, # 3664
4701,5462,3020, 962, 588,3629, 289,3250,2644,1116,  52,5463,3067,1797,5464,5465, # 3680
5466,1467,5467,1598,1143,3757,4342,1985,1734,1067,4702,1280,3402, 465,4703,1572, # 3696
 510,5468,1928,2245,1813,1644,3630,5469,4704,3758,5470,5471,2673,1573,1534,5472, # 3712
5473, 536,1808,1761,3517,3894,3175,2645,5474,5475,5476,4705,3518,2929,1912,2809, # 3728
5477,3329,1122, 377,3251,5478, 360,5479,5480,4343,1529, 551,5481,2060,3759,1769, # 3744
2431,5482,2930,4344,3330,3120,2327,2109,2031,4706,1404, 136,1468,1479, 672,1171, # 3760
3252,2308, 271,3176,5483,2772,5484,2050, 678,2736, 865,1948,4707,5485,2014,4098, # 3776
2971,5486,2737,2227,1397,3068,3760,4708,4709,1735,2931,3403,3631,5487,3895, 509, # 3792
2854,2458,2890,3896,5488,5489,3177,3178,4710,4345,2538,4711,2309,1166,1010, 552, # 3808
 681,1888,5490,5491,2972,2973,4099,1287,1596,1862,3179, 358, 453, 736, 175, 478, # 3824
1117, 905,1167,1097,5492,1854,1530,5493,1706,5494,2181,3519,2292,3761,3520,3632, # 3840
4346,2093,4347,5495,3404,1193,2489,4348,1458,2193,2208,1863,1889,1421,3331,2932, # 3856
3069,2182,3521, 595,2123,5496,4100,5497,5498,4349,1707,2646, 223,3762,1359, 751, # 3872
3121, 183,3522,5499,2810,3021, 419,2374, 633, 704,3897,2394, 241,5500,5501,5502, # 3888
 838,3022,3763,2277,2773,2459,3898,1939,2051,4101,1309,3122,2246,1181,5503,1136, # 3904
2209,3899,2375,1446,4350,2310,4712,5504,5505,4351,1055,2615, 484,3764,5506,4102, # 3920
 625,4352,2278,3405,1499,4353,4103,5507,4104,4354,3253,2279,2280,3523,5508,5509, # 3936
2774, 808,2616,3765,3406,4105,4355,3123,2539, 526,3407,3900,4356, 955,5510,1620, # 3952
4357,2647,2432,5511,1429,3766,1669,1832, 994, 928,5512,3633,1260,5513,5514,5515, # 3968
1949,2293, 741,2933,1626,4358,2738,2460, 867,1184, 362,3408,1392,5516,5517,4106, # 3984
4359,1770,1736,3254,2934,4713,4714,1929,2707,1459,1158,5518,3070,3409,2891,1292, # 4000
1930,2513,2855,3767,1986,1187,2072,2015,2617,4360,5519,2574,2514,2170,3768,2490, # 4016
3332,5520,3769,4715,5521,5522, 666,1003,3023,1022,3634,4361,5523,4716,1814,2257, # 4032
 574,3901,1603, 295,1535, 705,3902,4362, 283, 858, 417,5524,5525,3255,4717,4718, # 4048
3071,1220,1890,1046,2281,2461,4107,1393,1599, 689,2575, 388,4363,5526,2491, 802, # 4064
5527,2811,3903,2061,1405,2258,5528,4719,3904,2110,1052,1345,3256,1585,5529, 809, # 4080
5530,5531,5532, 575,2739,3524, 956,1552,1469,1144,2328,5533,2329,1560,2462,3635, # 4096
3257,4108, 616,2210,4364,3180,2183,2294,5534,1833,5535,3525,4720,5536,1319,3770, # 4112
3771,1211,3636,1023,3258,1293,2812,5537,5538,5539,3905, 607,2311,3906, 762,2892, # 4128
1439,4365,1360,4721,1485,3072,5540,4722,1038,4366,1450,2062,2648,4367,1379,4723, # 4144
2593,5541,5542,4368,1352,1414,2330,2935,1172,5543,5544,3907,3908,4724,1798,1451, # 4160
5545,5546,5547,5548,2936,4109,4110,2492,2351, 411,4111,4112,3637,3333,3124,4725, # 4176
1561,2674,1452,4113,1375,5549,5550,  47,2974, 316,5551,1406,1591,2937,3181,5552, # 4192
1025,2142,3125,3182, 354,2740, 884,2228,4369,2412, 508,3772, 726,3638, 996,2433, # 4208
3639, 729,5553, 392,2194,1453,4114,4726,3773,5554,5555,2463,3640,2618,1675,2813, # 4224
 919,2352,2975,2353,1270,4727,4115,  73,5556,5557, 647,5558,3259,2856,2259,1550, # 4240
1346,3024,5559,1332, 883,3526,5560,5561,5562,5563,3334,2775,5564,1212, 831,1347, # 4256
4370,4728,2331,3909,1864,3073, 720,3910,4729,4730,3911,5565,4371,5566,5567,4731, # 4272
5568,5569,1799,4732,3774,2619,4733,3641,1645,2376,4734,5570,2938, 669,2211,2675, # 4288
2434,5571,2893,5572,5573,1028,3260,5574,4372,2413,5575,2260,1353,5576,5577,4735, # 4304
3183, 518,5578,4116,5579,4373,1961,5580,2143,4374,5581,5582,3025,2354,2355,3912, # 4320
 516,1834,1454,4117,2708,4375,4736,2229,2620,1972,1129,3642,5583,2776,5584,2976, # 4336
1422, 577,1470,3026,1524,3410,5585,5586, 432,4376,3074,3527,5587,2594,1455,2515, # 4352
2230,1973,1175,5588,1020,2741,4118,3528,4737,5589,2742,5590,1743,1361,3075,3529, # 4368
2649,4119,4377,4738,2295, 895, 924,4378,2171, 331,2247,3076, 166,1627,3077,1098, # 4384
5591,1232,2894,2231,3411,4739, 657, 403,1196,2377, 542,3775,3412,1600,4379,3530, # 4400
5592,4740,2777,3261, 576, 530,1362,4741,4742,2540,2676,3776,4120,5593, 842,3913, # 4416
5594,2814,2032,1014,4121, 213,2709,3413, 665, 621,4380,5595,3777,2939,2435,5596, # 4432
2436,3335,3643,3414,4743,4381,2541,4382,4744,3644,1682,4383,3531,1380,5597, 724, # 4448
2282, 600,1670,5598,1337,1233,4745,3126,2248,5599,1621,4746,5600, 651,4384,5601, # 4464
1612,4385,2621,5602,2857,5603,2743,2312,3078,5604, 716,2464,3079, 174,1255,2710, # 4480
4122,3645, 548,1320,1398, 728,4123,1574,5605,1891,1197,3080,4124,5606,3081,3082, # 4496
3778,3646,3779, 747,5607, 635,4386,4747,5608,5609,5610,4387,5611,5612,4748,5613, # 4512
3415,4749,2437, 451,5614,3780,2542,2073,4388,2744,4389,4125,5615,1764,4750,5616, # 4528
4390, 350,4751,2283,2395,2493,5617,4391,4126,2249,1434,4127, 488,4752, 458,4392, # 4544
4128,3781, 771,1330,2396,3914,2576,3184,2160,2414,1553,2677,3185,4393,5618,2494, # 4560
2895,2622,1720,2711,4394,3416,4753,5619,2543,4395,5620,3262,4396,2778,5621,2016, # 4576
2745,5622,1155,1017,3782,3915,5623,3336,2313, 201,1865,4397,1430,5624,4129,5625, # 4592
5626,5627,5628,5629,4398,1604,5630, 414,1866, 371,2595,4754,4755,3532,2017,3127, # 4608
4756,1708, 960,4399, 887, 389,2172,1536,1663,1721,5631,2232,4130,2356,2940,1580, # 4624
5632,5633,1744,4757,2544,4758,4759,5634,4760,5635,2074,5636,4761,3647,3417,2896, # 4640
4400,5637,4401,2650,3418,2815, 673,2712,2465, 709,3533,4131,3648,4402,5638,1148, # 4656
 502, 634,5639,5640,1204,4762,3649,1575,4763,2623,3783,5641,3784,3128, 948,3263, # 4672
 121,1745,3916,1110,5642,4403,3083,2516,3027,4132,3785,1151,1771,3917,1488,4133, # 4688
1987,5643,2438,3534,5644,5645,2094,5646,4404,3918,1213,1407,2816, 531,2746,2545, # 4704
3264,1011,1537,4764,2779,4405,3129,1061,5647,3786,3787,1867,2897,5648,2018, 120, # 4720
4406,4407,2063,3650,3265,2314,3919,2678,3419,1955,4765,4134,5649,3535,1047,2713, # 4736
1266,5650,1368,4766,2858, 649,3420,3920,2546,2747,1102,2859,2679,5651,5652,2000, # 4752
5653,1111,3651,2977,5654,2495,3921,3652,2817,1855,3421,3788,5655,5656,3422,2415, # 4768
2898,3337,3266,3653,5657,2577,5658,3654,2818,4135,1460, 856,5659,3655,5660,2899, # 4784
2978,5661,2900,3922,5662,4408, 632,2517, 875,3923,1697,3924,2296,5663,5664,4767, # 4800
3028,1239, 580,4768,4409,5665, 914, 936,2075,1190,4136,1039,2124,5666,5667,5668, # 4816
5669,3423,1473,5670,1354,4410,3925,4769,2173,3084,4137, 915,3338,4411,4412,3339, # 4832
1605,1835,5671,2748, 398,3656,4413,3926,4138, 328,1913,2860,4139,3927,1331,4414, # 4848
3029, 937,4415,5672,3657,4140,4141,3424,2161,4770,3425, 524, 742, 538,3085,1012, # 4864
5673,5674,3928,2466,5675, 658,1103, 225,3929,5676,5677,4771,5678,4772,5679,3267, # 4880
1243,5680,4142, 963,2250,4773,5681,2714,3658,3186,5682,5683,2596,2332,5684,4774, # 4896
5685,5686,5687,3536, 957,3426,2547,2033,1931,2941,2467, 870,2019,3659,1746,2780, # 4912
2781,2439,2468,5688,3930,5689,3789,3130,3790,3537,3427,3791,5690,1179,3086,5691, # 4928
3187,2378,4416,3792,2548,3188,3131,2749,4143,5692,3428,1556,2549,2297, 977,2901, # 4944
2034,4144,1205,3429,5693,1765,3430,3189,2125,1271, 714,1689,4775,3538,5694,2333, # 4960
3931, 533,4417,3660,2184, 617,5695,2469,3340,3539,2315,5696,5697,3190,5698,5699, # 4976
3932,1988, 618, 427,2651,3540,3431,5700,5701,1244,1690,5702,2819,4418,4776,5703, # 4992
3541,4777,5704,2284,1576, 473,3661,4419,3432, 972,5705,3662,5706,3087,5707,5708, # 5008
4778,4779,5709,3793,4145,4146,5710, 153,4780, 356,5711,1892,2902,4420,2144, 408, # 5024
 803,2357,5712,3933,5713,4421,1646,2578,2518,4781,4782,3934,5714,3935,4422,5715, # 5040
2416,3433, 752,5716,5717,1962,3341,2979,5718, 746,3030,2470,4783,4423,3794, 698, # 5056
4784,1893,4424,3663,2550,4785,3664,3936,5719,3191,3434,5720,1824,1302,4147,2715, # 5072
3937,1974,4425,5721,4426,3192, 823,1303,1288,1236,2861,3542,4148,3435, 774,3938, # 5088
5722,1581,4786,1304,2862,3939,4787,5723,2440,2162,1083,3268,4427,4149,4428, 344, # 5104
1173, 288,2316, 454,1683,5724,5725,1461,4788,4150,2597,5726,5727,4789, 985, 894, # 5120
5728,3436,3193,5729,1914,2942,3795,1989,5730,2111,1975,5731,4151,5732,2579,1194, # 5136
 425,5733,4790,3194,1245,3796,4429,5734,5735,2863,5736, 636,4791,1856,3940, 760, # 5152
1800,5737,4430,2212,1508,4792,4152,1894,1684,2298,5738,5739,4793,4431,4432,2213, # 5168
 479,5740,5741, 832,5742,4153,2496,5743,2980,2497,3797, 990,3132, 627,1815,2652, # 5184
4433,1582,4434,2126,2112,3543,4794,5744, 799,4435,3195,5745,4795,2113,1737,3031, # 5200
1018, 543, 754,4436,3342,1676,4796,4797,4154,4798,1489,5746,3544,5747,2624,2903, # 5216
4155,5748,5749,2981,5750,5751,5752,5753,3196,4799,4800,2185,1722,5754,3269,3270, # 5232
1843,3665,1715, 481, 365,1976,1857,5755,5756,1963,2498,4801,5757,2127,3666,3271, # 5248
 433,1895,2064,2076,5758, 602,2750,5759,5760,5761,5762,5763,3032,1628,3437,5764, # 5264
3197,4802,4156,2904,4803,2519,5765,2551,2782,5766,5767,5768,3343,4804,2905,5769, # 5280
4805,5770,2864,4806,4807,1221,2982,4157,2520,5771,5772,5773,1868,1990,5774,5775, # 5296
5776,1896,5777,5778,4808,1897,4158, 318,5779,2095,4159,4437,5780,5781, 485,5782, # 5312
 938,3941, 553,2680, 116,5783,3942,3667,5784,3545,2681,2783,3438,3344,2820,5785, # 5328
3668,2943,4160,1747,2944,2983,5786,5787, 207,5788,4809,5789,4810,2521,5790,3033, # 5344
 890,3669,3943,5791,1878,3798,3439,5792,2186,2358,3440,1652,5793,5794,5795, 941, # 5360
2299, 208,3546,4161,2020, 330,4438,3944,2906,2499,3799,4439,4811,5796,5797,5798, # 5376
)
# fmt: on
python3.12/site-packages/pip/_vendor/chardet/__pycache__/johabfreq.cpython-312.pyc000064400000242153151732703210023633 0ustar00�

R`i����[�idd�dd�dd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�id"d#�d$d%�d&d'�d(d)�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC��idDdE�dFdG�dHdI�dJdK�dLdM�dNdO�dPdQ�dRdS�dTdU�dVdW�dXdY�dZd[�d\d]�d^d_�d`da�dbdc�ddde��idfdg�dhdi�djdk�dldm�dndo�dpdq�drds�dtdu�dvdw�dxdy�dzd{�d|d}�d~d�d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dÓd�dœd�dǓd�dɓd�d˓�id�d͓d�dϓd�dѓd�dӓd�dՓd�dדd�dٓd�dۓd�dݓd�dߓd�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d��d�d��d�d��d�d��d�d��d�d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��i�d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��i�dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��i�dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�i�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���i�d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��i�dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��i�dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�i�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��i�d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��i�dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��i�dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�i�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���i�d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��i�d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��i�db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�i�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��i�d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��i�d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��i�dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��i�dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�i�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���i�d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��i�d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��i�d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�i�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��i�d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��i�d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��i�dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��i�dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�i�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���i�d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��i�d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��i�d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�i�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���	d�	d��	d�	d��	d�	d��	d�	d��i�	d�	d	��	d
�	d��	d�	d
��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d �	d!��	d"�	d#��	d$�	d%��	d&�	d'��	d(�	d)��i�	d*�	d+��	d,�	d-��	d.�	d/��	d0�	d1��	d2�	d3��	d4�	d5��	d6�	d7��	d8�	d9��	d:�	d;��	d<�	d=��	d>�	d?��	d@�	dA��	dB�	dC��	dD�	dE��	dF�	dG��	dH�	dI��	dJ�	dK��i�	dL�	dM��	dN�	dO��	dP�	dQ��	dR�	dS��	dT�	dU��	dV�	dW��	dX�	dY��	dZ�	d[��	d\�	d]��	d^�	d_��	d`�	da��	db�	dc��	dd�	de��	df�	dg��	dh�	di��	dj�	dk��	dl�	dm��i�	dn�	do��	dp�	dq��	dr�	ds��	dt�	du��	dv�	dw��	dx�	dy��	dz�	d{��	d|�	d}��	d~�	d��	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���i�	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���i�	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���	d	dÓ�	dĐ	dœ�	dƐ	dǓ�	dȐ	dɓ�	dʐ	d˓�	d̐	d͓�	dΐ	dϓ�	dА	dѓ�	dҐ	dӓ�i�	dԐ	dՓ�	d֐	dד�	dؐ	dٓ�	dڐ	dۓ�	dܐ	dݓ�	dސ	dߓ�	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d��	d�	d���i�	d��	d���	d��	d���	d��	d���	d��	d���	d��	d���
d�
d��
d�
d��
d�
d��
d�
d��
d�
d	��
d
�
d��
d�
d
��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��i�
d�
d��
d�
d��
d�
d��
d�
d��
d �
d!��
d"�
d#��
d$�
d%��
d&�
d'��
d(�
d)��
d*�
d+��
d,�
d-��
d.�
d/��
d0�
d1��
d2�
d3��
d4�
d5��
d6�
d7��
d8�
d9��i�
d:�
d;��
d<�
d=��
d>�
d?��
d@�
dA��
dB�
dC��
dD�
dE��
dF�
dG��
dH�
dI��
dJ�
dK��
dL�
dM��
dN�
dO��
dP�
dQ��
dR�
dS��
dT�
dU��
dV�
dW��
dX�
dY��
dZ�
d[��i�
d\�
d]��
d^�
d_��
d`�
da��
db�
dc��
dd�
de��
df�
dg��
dh�
di��
dj�
dk��
dl�
dm��
dn�
do��
dp�
dq��
dr�
ds��
dt�
du��
dv�
dw��
dx�
dy��
dz�
d{��
d|�
d}��i�
d~�
d��
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���i�
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���i�
d
dÓ�
dĐ
dœ�
dƐ
dǓ�
dȐ
dɓ�
dʐ
d˓�
d̐
d͓�
dΐ
dϓ�
dА
dѓ�
dҐ
dӓ�
dԐ
dՓ�
d֐
dד�
dؐ
dٓ�
dڐ
dۓ�
dܐ
dݓ�
dސ
dߓ�
d�
d��
d�
d��i�
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���d�d��d�d��d�d��i�d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��i�d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��i�dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��i�dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�i�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��i�d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��i�dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��i�d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���
d�
d��
d�
d��i�
d�
d��
d�
d��
d�
d	��
d
�
d��
d�
d
��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d �
d!��
d"�
d#��
d$�
d%��i�
d&�
d'��
d(�
d)��
d*�
d+��
d,�
d-��
d.�
d/��
d0�
d1��
d2�
d3��
d4�
d5��
d6�
d7��
d8�
d9��
d:�
d;��
d<�
d=��
d>�
d?��
d@�
dA��
dB�
dC��
dD�
dE��
dF�
dG��i�
dH�
dI��
dJ�
dK��
dL�
dM��
dN�
dO��
dP�
dQ��
dR�
dS��
dT�
dU��
dV�
dW��
dX�
dY��
dZ�
d[��
d\�
d]��
d^�
d_��
d`�
da��
db�
dc��
dd�
de��
df�
dg��
dh�
di��i�
dj�
dk��
dl�
dm��
dn�
do��
dp�
dq��
dr�
ds��
dt�
du��
dv�
dw��
dx�
dy��
dz�
d{��
d|�
d}��
d~�
d��
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���i�
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���i�
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���
d
dÓ�
dĐ
dœ�
dƐ
dǓ�
dȐ
dɓ�
dʐ
d˓�
d̐
d͓�
dΐ
dϓ�i�
dА
dѓ�
dҐ
dӓ�
dԐ
dՓ�
d֐
dד�
dؐ
dٓ�
dڐ
dۓ�
dܐ
dݓ�
dސ
dߓ�
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��
d�
d��i�
d�
d��
d�
d���
d��
d���
d��
d���
d��
d���
d��
d���
d��
d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��i�d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��i�dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��i�dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��i�d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��i�d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��i�dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��i�dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�i�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��i�d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��i�dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��i�dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�i�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���i�d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��i�d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��i�dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS��dT�dU��dV�dW��dX�dY��dZ�d[��d\�d]��d^�d_��d`�da��db�dc��dd�de��i�df�dg��dh�di��dj�dk��dl�dm��dn�do��dp�dq��dr�ds��dt�du��dv�dw��dx�dy��dz�d{��d|�d}��d~�d��d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���i�d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���d��d���ddÓ�dĐdœ�dƐdǓ�dȐdɓ�dʐd˓�i�d̐d͓�dΐdϓ�dАdѓ�dҐdӓ�dԐdՓ�d֐dד�dؐdٓ�dڐdۓ�dܐdݓ�dސdߓ�d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d�d��d�d��d�d��d�d���d��d���d��d���d��d���d��d���d��d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��i�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��i�d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA��dB�dC��dD�dE��dF�dG��dH�dI��dJ�dK��dL�dM��dN�dO��dP�dQ��dR�dS���dT�dU�dV�dW�dX��Z�yY(Zia��ib��ie��ih��ii��ij��ik��iq��is��it��	iu��
iv��iw��ix��
iy��i{��i|��i}��i���i���i���i���i���i���i���i���i���i���i���i���i���i���i��� i���!iň�"iɈ�#i��$i��%i��&i��'i��(i��)i��*i��+i���,i���-i���.i���/i���0i���1i���2iA��3iE��4iI��5iQ��6iS��7iU��8iV��9iW��:ia��;ib��<ic��=ie��>ih��?ii��@iq��Ais��Biu��Civ��Diw��Ei{��Fi���Gi���Hi���Ii���Ji���Ki���Li���Mi���Ni���Oi���Pi���Qi���Ri���Si���Ti���Ui���Vi���Wi���Xi���Yi‰�Ziʼn�[iɉ�\iˉ�]iщ�^iӉ�_iՉ�`i׉�ai��bi��ci��di��ei���fi���giA��hiB��iiE��jiI��kiQ��liS��miU��niW��oia��pie��qii��ris��siu��ti���ui���vi���wi���xi���yi���zi���{i���|i���}i���~i���i���i���i���i���i���i���i���i���i���iՊ�i��i��i��i��i��i��i���iA��iE��iI��ia��ib��ie��ih��ii��ij��iq��is��iu��iw��i���i���i���i���i���i���i���i���i���i���i���i���i���ia��ib��ic��ie��ii��ik��iq��is��iu��iv��iw��i{��i���i���i���i���i���i���i���i���i���i���i���i����i���i���i���i���i���i���i���i����i����i����iA���iB���iE���iQ���iU���iW���ia���ie���ii���iu���iv���i{���i����i����i����i����i����i����i����i����i����i����i����i����i����i��iɍ��i֍��i׍��i���i���i����iA���iE���iI���iQ���iS���iW���ia���i����i���i���i���i���i���i���i���i���i���i���i���i���i��ii��iiŽiiŎiiɎiiюiiӎii֎ii�i	i�i
i�ii�ii�i
iA�iia�iib�iie�iig�iii�iik�iip�iiq�iis�iiu�iiw�ii{�ii��ii��ii��ii��ii��ii��i i��i!i��i"ia�i#ib�i$ic�i%ie�i&ih�i'ii�i(ij�i)ik�i*iq�i+is�i,iu�i-iv�i.iw�i/ix�i0iy�i1i{�i2i}�i3i��i4i��i5i��i6i��i7i��i8i��i9i��i:i��i;i��i<i��i=i��i>i��i?i��i@i��iAi��iBi�iCi�iDi�iEi�iFi�iGi�iHi�iIi�iJi�iKi��iLi��iMi��iNi��iOiA�iPiB�iQiE�iRiI�iSiQ�iTiS�iUiU�iViV�iWiW�iXia�iYib�iZie�i[ii�i\iq�i]is�i^iv�i_iw�i`iz�iai��ibi��ici��idi��iei��ifi��igi��ihi��iii��iji��iki��ili��imi��ini��ioiőipiɑiqi֑iriA�isiE�itiI�iuiQ�iviS�iwiU�ixia�iyib�izie�i{ii�i|is�i}iu�i~iw�ii��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i�i�i�i�i�i�i�i�i�i�iA�i�iB�i�iI�i�iQ�i�iS�i�iW�i�ia�i�ib�i�ie�i�ii�i�ij�i�ik�i�iq�i�is�i�iu�i�iw�i�ix�i�i|�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�ia�i�ib�i�ic�i�ie�i�ih�i�ii�i�ij�i�ik�i�il�i�ip�i�iq�i�is�i�iu�i�iv�i�iw�i�ix�i�iy�i�i}�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i��i�i��i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iV�i�iW�i�ia�i�ie�i�ii�i�iv�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iŕi�iɕi�i�i�i��i�iA�i�iE�i�iI�i�iQ�i�iS�iiU�iia�ii��ii��ii��ii��ii��ii��ii��i	i��i
i��ii��ii��i
iזii�ii�ii�ii�ii��ii��iiA�iiE�iiI�iiQ�iiW�iia�iib�iie�iih�iii�iik�iiq�i is�i!iu�i"iw�i#i��i$i��i%i��i&i��i'i��i(i��i)i��i*i��i+i��i,i��i-i��i.i��i/ia�i0ib�i1ie�i2ii�i3iq�i4is�i5iu�i6iv�i7iw�i8i}�i9i��i:i��i;i��i<i��i=i��i>i��i?i��i@i��iAi��iBi�iCi�iDi�iEi�iFi�iGi�iHi�iIi�iJi��iKi��iLi��iMi��iNiA�iOiB�iPiE�iQiI�iRiQ�iSiS�iTiU�iUiV�iViW�iWia�iXiv�iYi��iZi��i[i��i\i��i]i��i^i��i_iəi`i�iaiA�ibiE�ici��idi��iei��ifi��igi��ihi��iii��iji��iki�ili�imi�ini�ioi�ipi��iqia�irib�isie�itih�iuii�iviq�iwis�ixiu�iyi��izi��i{i��i|i��i}i��i~i��ii��i�i��i�i��i�i��i�i��i�i��i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�iv�i�iw�i�ix�i�i|�i�i}�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i�i�i�i�i�i�i�i�i�i�i�i�i��i�i��i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�iv�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iŝi�iםi�i��i�iA�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�ia�i�ie�i�ii�i�is�i�iu�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i�i�i�i�i�i�i�i�i�i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�iw�i�ix�i�i{�i�i|�i�i��i�i��i�i��i�i��ii��ii��ii��ii��iia�iib�iie�iig�iih�i	ii�i
ij�iik�iiq�i
is�iiu�iiw�iix�ii{�ii}�ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��i i��i!i�i"i�i#i�i$i�i%i�i&i�i'i�i(i��i)i��i*i��i+i��i,iA�i-iB�i.iE�i/iI�i0iQ�i1iS�i2iU�i3iV�i4iW�i5ia�i6ib�i7ie�i8ii�i9iu�i:iv�i;iw�i<iy�i=i��i>i��i?i��i@i��iAi��iBi��iCi��iDi��iEi��iFi��iGi��iHi��iIišiJi֡iKiסiLiA�iMiE�iNiI�iOiS�iPiU�iQiW�iRia�iSie�iTii�iUis�iViu�iWi��iXi��iYi��iZi��i[i��i\i��i]i��i^i��i_i��i`i��iai��ibi��ici��idi��iei��ifi��igi��ihi��iii��iji��iki�ili�imi�iniA�ioiE�ipiI�iqiQ�iriU�isia�itie�iuii�iviq�iwiu�ixi��iyi��izi��i{i��i|i��i}i��i~i��ii��i�i��i�i��i�i��i�i��i�i��i�ia�i�ib�i�ic�i�id�i�ie�i�ih�i�ii�i�ij�i�ik�i�il�i�iq�i�is�i�iu�i�iw�i�i{�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i��i�i��i�i��i�iA�i�iB�i�iE�i�iH�i�iI�i�iQ�i�iS�i�iU�i�iV�i�iW�i�ia�i�ib�i�ie�i�ii�i�is�i�iu�i�iv�i�iw�i�i{�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iťi�i֥i�i�i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�ia�i�ie�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i�i�i�i�i�i�i�i�i��i�iA�i�iE�i�iI�i�iQ�i�iU�i�iW�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�i��i�i��i�i��i�i��i�i��ii��ii��ii��ii��ii��ii��iia�iib�iie�i	ii�i
ik�iiq�iis�i
iu�iiv�iiw�ii}�ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii�ii�ii�i i�i!i�i"i�i#i��i$i��i%i��i&iA�i'iW�i(ia�i)ib�i*iq�i+is�i,iu�i-iv�i.iw�i/i��i0i��i1i��i2i��i3i��i4i��i5i��i6iA�i7ia�i8iw�i9i��i:i��i;i��i<i��i=i��i>i��i?i��i@iA�iAiW�iBia�iCie�iDii�iEiq�iFis�iGi��iHi��iIi��iJi��iKi��iLi��iMi��iNi��iOia�iPib�iQid�iRie�iSih�iTii�iUij�iVik�iWiq�iXis�iYiu�iZiv�i[iw�i\i{�i]i��i^i��i_i��i`i��iai��ibi��ici��idi��iei��ifi��igi��ihi��iii��iji��iki��ili��imi��ini��ioiŬipiɬiqiѬiri׬isi�iti�iui�ivi�iwi�ixi�iyi�izi�i{i�i|i�i}i�i~i��ii��i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iV�i�iW�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�iv�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i­i�iŭi�iɭi�i׭i�i�i�i�i�i�i�i�i�i��i�i��i�iA�i�iE�i�iI�i�iQ�i�iS�i�iU�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i®i�iŮi�iɮi�iѮi�i׮i�i�i�i�i�i�i�i�i�i�i�i�i�i��i�i��i�iA�i�iB�i�iI�i�iQ�i�iU�i�iW�i�ia�i�ib�i�ie�i�ii�i�ij�i�iq�i�is�i�iu�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�ia�i�ib�i�id�i�ie�i�ii�i�iq�i�is�i�iv�i�iw�i�i}�i�i��i�i��i�i��i�i��ii��ii��ii��ii��ii��ii�ii�ii�ii�i	i�i
i�ii�ii��i
i��iiA�iiE�iiI�ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii±iiűiiֱii�i i��i!iA�i"iE�i#iI�i$iQ�i%iS�i&ia�i'i��i(i��i)i��i*i��i+i��i,i��i-i��i.i��i/i��i0i��i1i�i2i�i3iW�i4ia�i5ib�i6ie�i7ii�i8ik�i9ip�i:iq�i;is�i<i��i=i��i>i��i?i��i@i��iAi��iBi��iCi��iDi��iEi��iFi��iGi��iHia�iIib�iJie�iKif�iLig�iMii�iNij�iOik�iPip�iQiq�iRis�iSiu�iTiv�iUiw�iVi{�iWi|�iXi��iYi��iZi��i[i��i\i��i]i��i^i��i_i��i`i��iai��ibi��ici��idi��iei��ifi��igi��ihi��iii��iji��iki��ili��imiŴiniɴioiӴipi�iqi�iri�isi�iti�iui�ivi�iwi�ixi�iyi�izi�i{i��i|i��i}i��i~i��ii��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�ia�i�ib�i�ic�i�ie�i�ii�i�ik�i�il�i�iq�i�is�i�it�i�iu�i�iv�i�iw�i�i{�i�i|�i�i}�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iµi�iŵi�iɵi�iѵi�iӵi�iյi�iֵi�i׵i�i�i�i�i�i�i�i�i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i¶i�iŶi�iɶi�iѶi�iӶi�i׶i�i�i�i�i�i�i�i�i�i�i�i�i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�iY�i�ia�i�ib�i�ie�i�ii�i�io�i�iq�i�is�i�iu�i�iw�i�ix�iiy�iiz�ii{�ii|�ii}�ii��ii��ii��ii��i	i��i
i��ii��ii��i
i��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��iia�iib�iie�iig�iih�iii�iik�iiq�i is�i!iu�i"iv�i#iw�i$ix�i%i��i&i��i'i��i(i��i)i��i*i��i+i��i,i��i-i��i.i��i/i��i0i��i1i��i2i��i3i��i4i��i5i��i6iŸi7iɸi8i�i9i�i:i�i;i�i<i�i=i�i>i�i?i��i@i��iAi��iBiA�iCiB�iDiE�iEiI�iFiQ�iGiS�iHiU�iIiW�iJia�iKie�iLii�iMiq�iNis�iOiv�iPiw�iQi��iRi��iSi��iTi��iUi��iVi��iWi��iXi��iYi��iZi��i[i��i\i��i]i��i^i��i_i¹i`iɹiaiӹibiչici׹idi�iei��ifi��igiA�ihiE�iiiI�ijiQ�ikiS�iliU�imiW�inia�ioib�ipie�iqiw�iri��isi��iti��iui��ivi��iwi��ixi��iyi��izi��i{i��i|i��i}i��i~i��ii�i�i�i�i�i�i�i�i�i�i�i�i��i�iA�i�iE�i�iI�i�iQ�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�ia�i�ib�i�ie�i�ig�i�ii�i�il�i�iq�i�is�i�iu�i�iv�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i�i�i�i�i�i�i�i�i�i�i�i�i��i�i��i�i��i�iA�i�iW�i�ia�i�iv�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i½i�iɽi�iֽi�i�i�i��i�iA�i�iE�i�iI�i�iQ�i�iS�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i�i�iA�i�ia�i�iq�i�iu�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�ia�i�ib�i�ie�i�ig�i�ii�i�iq�i�is�i�iu�i�iv�i�iw�i�ix�i�i��i�i��i�i��i�i��ii��ii��ii��ii��ii��ii��ii��ii��ii��i	i��i
i��ii�ii�i
i�ii�ii�ii�ii��ii��ii��iiA�iiB�iiE�iiI�iiQ�iiS�iiU�iiW�iia�iie�iiv�ii��i i��i!i��i"i��i#i��i$i��i%i��i&i��i'i��i(i��i)i��i*i��i+i�i,i�i-i�i.iA�i/iE�i0iI�i1iQ�i2iS�i3iU�i4iW�i5ia�i6iq�i7i��i8i��i9i��i:i��i;i��i<i��i=i��i>i��i?i��i@i��iAi��iBi��iCi��iDi��iEi��iFi��iGi��iHi��iIi��iJiA�iKiE�iLiI�iMiQ�iNiW�iOia�iPib�iQie�iRii�iSiq�iTis�iUiu�iViw�iWi��iXi��iYi��iZi��i[i��i\i��i]i��i^i��i_i��i`i��iaia�ibib�icie�idii�ieiq�ifis�igiu�ihiw�iii��iji��iki��ili��imi��ini��ioi��ipi��iqi��iri��isi��iti��iui��ivi��iwi��ixi��iyi��izi��i{i��i|i��i}i��i~i��iiA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�ia�i�ie�i�ii�i�iq�i�is�i�iu�i�iv�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iA�i�iI�i�ia�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iA�i�iE�i�iI�i�iQ�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�ia�i�ib�i�ie�i�ii�i�ij�i�iq�i�is�i�iu�i�iv�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�ia�i�ie�i�iv�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��ii��ii��ii��ii��iiA�iiE�iiU�iiW�iia�i	i��i
i��ii��ii��i
i��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��ii��iiA�iiE�iiI�iiQ�iiW�i ia�i!ib�i"ie�i#ih�i$ii�i%ik�i&iq�i'is�i(iu�i)i��i*i��i+i��i,i��i-i��i.i��i/i��i0i��i1i��i2i��i3i��i4i��i5i��i6ia�i7ib�i8ic�i9ie�i:ii�i;ik�i<iq�i=is�i>iu�i?iv�i@iw�iAi{�iBi��iCi��iDi��iEi��iFi��iGi��iHi��iIi��iJi��iKi��iLi��iMi��iNi��iOi��iPi��iQi��iRi��iSi��iTi��iUi��iViA�iWiB�iXiE�iYiI�iZiQ�i[iS�i\iU�i]iW�i^ia�i_ie�i`ii�iaiq�ibis�iciv�idiw�iei��ifi��igi��ihi��iii��iji��iki��ili��imi��ini��ioi��ipi��iqi��iri��isiA�itiE�iuia�ivie�iwii�ixis�iyiu�izi��i{i��i|i��i}i��i~i��ii��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iA�i�iE�i�iI�i�iQ�i�iU�i�iW�i�ia�i�ie�i�ii�i�iq�i�is�i�iu�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�ia�i�ib�i�ie�i�ii�i�in�i�iq�i�is�i�iu�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iQ�i�iS�i�iU�i�iW�i�ia�i�ib�i�ie�i�ii�i�iq�i�is�i�iu�i�iv�i�iw�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�iA�i�iB�i�iE�i�iI�i�iS�i�iU�i�iW�i�ia�i�ie�i�ii�i�is�i�iu�i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i�i��i	i��i	i��i	i��i	i��i	i��i	i��i	i��i	i��i	i��i		i��i
	i��i	i��i	iA�i
	iB�i	iE�i	iI�i	iQ�i	iU�i	iW�i	ia�i	ib�i	ie�i	ig�i	ih�i	ii�i	ij�i	iq�i	is�i	iu�i	iw�i	i{�i	i��i 	i��i!	i��i"	i��i#	i��i$	i��i%	i��i&	i��i'	i��i(	i��i)	i*	i+	i,	i-	)i��i��i��i��N)�JOHAB_TO_EUCKR_ORDER_TABLE����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/johabfreq.py�<module>rs����>o$�
�A�o$�
�A�o$��A�o$��A�	o$�
�A�o$��A�
o$��A�o$��A�o$��A�o$��A�o$��B�o$��B�o$��B�o$��B�o$��B�o$� �B�!o$�"�B�#o$�$�B�%o$�&�B�'o$�(�B�)o$�*�B�+o$�,�B�-o$�.�B�/o$�0�B�1o$�2�B�3o$�4�B�5o$�6�B�7o$�8�B�9o$�:�B�;o$�<�B�=o$�>�B�?o$�@�B�Ao$�B�B�Co$�D�B�Eo$�F�B�Go$�H�B�Io$�J�B�Ko$�L�B�Mo$�N�B�Oo$�P�B�Qo$�R�B�So$�T�B�Uo$�V�B�Wo$�X�B�Yo$�Z�B�[o$�\�B�]o$�^�B�_o$�`�B�ao$�b�B�co$�d�B�eo$�f�B�go$�h�B�io$�j�B�ko$�l�B�mo$�n�B�oo$�p�B�qo$�r�B�so$�t�B�uo$�v�B�wo$�x�B�yo$�z�B�{o$�|�B�}o$�~�B�o$�@�B�Ao$�B�B�Co$�D�B�Eo$�F�B�Go$�H�B�Io$�J�B�Ko$�L�B�Mo$�N�B�Oo$�P�B�Qo$�R�B�So$�T�B�Uo$�V�B�Wo$�X�B�Yo$�Z�B�[o$�\�B�]o$�^�B�_o$�`�B�ao$�b�B�co$�d�B�eo$�f�B�go$�h�B�io$�j�B�ko$�l�B�mo$�n�B�oo$�p�B�qo$�r�B�so$�t�B�uo$�v�B�wo$�x�B�yo$�z�B�{o$�|�B�}o$�~�B�o$�@�B�Ao$�B�B�Co$�D�B�Eo$�F�B�Go$�H�B�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@	�C�A	o$�B	�C�C	o$�D	�C�E	o$�F	�C�G	o$�H	�C�I	o$�J	�C�K	o$�L	�C�M	o$�N	�C�O	o$�P	�C�Q	o$�R	�C�S	o$�T	�C�U	o$�V	�C�W	o$�X	�C�Y	o$�Z	�C�[	o$�\	�C�]	o$�^	�C�_	o$�`	�C�a	o$�b	�C�c	o$�d	�C�e	o$�f	�C�g	o$�h	�C�i	o$�j	�C�k	o$�l	�C�m	o$�n	�C�o	o$�p	�C�q	o$�r	�C�s	o$�t	�C�u	o$�v	�C�w	o$�x	�C�y	o$�z	�C�{	o$�|	�C�}	o$�~	�C�	o$�@
�C�A
o$�B
�C�C
o$�D
�C�E
o$�F
�C�G
o$�H
�C�I
o$�J
�C�K
o$�L
�C�M
o$�N
�C�O
o$�P
�C�Q
o$�R
�C�S
o$�T
�C�U
o$�V
�C�W
o$�X
�C�Y
o$�Z
�C�[
o$�\
�C�]
o$�^
�C�_
o$�`
�C�a
o$�b
�C�c
o$�d
�C�e
o$�f
�C�g
o$�h
�C�i
o$�j
�C�k
o$�l
�C�m
o$�n
�C�o
o$�p
�C�q
o$�r
�C�s
o$�t
�C�u
o$�v
�C�w
o$�x
�C�y
o$�z
�C�{
o$�|
�C�}
o$�~
�C�
o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@
�C�A
o$�B
�C�C
o$�D
�C�E
o$�F
�C�G
o$�H
�C�I
o$�J
�C�K
o$�L
�C�M
o$�N
�C�O
o$�P
�C�Q
o$�R
�C�S
o$�T
�C�U
o$�V
�C�W
o$�X
�C�Y
o$�Z
�C�[
o$�\
�C�]
o$�^
�C�_
o$�`
�C�a
o$�b
�C�c
o$�d
�C�e
o$�f
�C�g
o$�h
�C�i
o$�j
�C�k
o$�l
�C�m
o$�n
�C�o
o$�p
�C�q
o$�r
�C�s
o$�t
�C�u
o$�v
�C�w
o$�x
�C�y
o$�z
�C�{
o$�|
�C�}
o$�~
�C�
o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�C�So$�T�C�Uo$�V�C�Wo$�X�C�Yo$�Z�C�[o$�\�C�]o$�^�C�_o$�`�C�ao$�b�C�co$�d�C�eo$�f�C�go$�h�C�io$�j�C�ko$�l�C�mo$�n�C�oo$�p�C�qo$�r�C�so$�t�C�uo$�v�C�wo$�x�C�yo$�z�C�{o$�|�C�}o$�~�C�o$�@�C�Ao$�B�C�Co$�D�C�Eo$�F�C�Go$�H�C�Io$�J�C�Ko$�L�C�Mo$�N�C�Oo$�P�C�Qo$�R�D�So$�T�D�Uo$�V�D�Wo$�X�D�Yo$�Z�D�[o$�\�D�]o$�^�D�_o$�`�D�ao$�b�D�co$�d�D�eo$�f�D�go$�h�D�io$�j�D�ko$�l�D�mo$�n�D�oo$�p�D�qo$�r�D�so$�t�D�uo$�v�D�wo$�x�D�yo$�z�D�{o$�|�D�}o$�~�D�o$�@ �D�A o$�B �D�C o$�D �D�E o$�F �D�G o$�H �D�I o$�J �D�K o$�L �D�M o$�N �D�O o$�P �D�Q o$�R �D�S o$�T �D�U o$�V �D�W o$�X �D�Y o$�Z �D�[ o$�\ �D�] o$�^ �D�_ o$�` �D�a o$�b �D�c o$�d �D�e o$�f �D�g o$�h �D�i o$�j �D�k o$�l �D�m o$�n �D�o o$�p �D�q o$�r �D�s o$�t �D�u o$�v �D�w o$�x �D�y o$�z �D�{ o$�| �D�} o$�~ �D� o$�@!�D�A!o$�B!�D�C!o$�D!�D�E!o$�F!�D�G!o$�H!�D�I!o$�J!�D�K!o$�L!�D�M!o$�N!�D�O!o$�P!�D�Q!o$�R!�D�S!o$�T!�D�U!o$�V!�D�W!o$�X!�D�Y!o$�Z!�D�[!o$�\!�D�]!o$�^!�D�_!o$�`!�D�a!o$�b!�D�c!o$�d!�D�e!o$�f!�D�g!o$�h!�D�i!o$�j!�D�k!o$�l!�D�m!o$�n!�D�o!o$�p!�D�q!o$�r!�D�s!o$�t!�D�u!o$�v!�D�w!o$�x!�D�y!o$�z!�D�{!o$�|!�D�}!o$�~!�D�!o$�@"�D�A"o$�B"�D�C"o$�D"�D�E"o$�F"�D�G"o$�H"�D�I"o$�J"�D�K"o$�L"�D�M"o$�N"�D�O"o$�P"�D�Q"o$�R"�D�S"o$�T"�D�U"o$�V"�D�W"o$�X"�D�Y"o$�Z"�D�["o$�\"�D�]"o$�^"�D�_"o$�`"�D�a"o$�b"�D�c"o$�d"�D�e"o$�f"�D�g"o$�h"�D�i"o$�j"�D�k"o$�l"�D�m"o$�n"�D�o"o$�p"�D�q"o$�r"�D�s"o$�t"�D�u"o$�v"�D�w"o$�x"�D�y"o$�z"�D�{"o$�|"�D�}"o$�~"�D�"o$�@#�D�A#o$�B#�D�C#o$�D#�D�E#o$�F#�D�G#o$�H#�D�I#o$�J#�D�K#o$�L#�D�M#o$�N#�D�O#o$�P#�D�Q#o$�R#�D�S#o$�T#�D�U#o$�V#�D�W#o$�X#�D�Y#o$�Z#�D�[#o$�\#�D�]#o$�^#�D�_#o$�`#�D�a#o$�b#�D�c#o$�d#�D�e#o$�f#�D�g#o$�h#�D�i#o$�j#�D�k#o$�l#�D�m#o$�n#�D�o#o$�p#�D�q#o$�r#�D�s#o$�t#�D�u#o$�v#�D�w#o$�x#�D�y#o$�z#�D�{#o$�|#�D�}#o$�~#�D�#o$�@$�D�A$o$�B$�D�C$o$�D$�D�E$o$�F$�D�G$o$�H$�D�I$o$�J$�D�K$o$�L$�D�M$o$�N$�D�O$o$�P$�D�Q$o$�R$�D�S$o$�T$�D�U$o$�V$�D�W$o$�X$�D�Y$o$�Z$�D�[$o$�\$�D�]$o$�^$�D�_$o$�`$�D�a$o$�b$�D�c$o$�d$�D�e$o$�f$�D�g$o$�h$�D�i$o$�j$�D�k$o$�l$�D�m$o$�n$�D�o$o$�p$�D�q$o$�r$�D�s$o$�t$�D�u$o$�v$�D�w$o$�x$�D�y$o$�z$�D�{$o$�|$�D�}$o$�~$�D�$o$�@%�D�A%o$�B%�D�C%o$�D%�D�E%o$�F%�D�G%o$�H%�D�I%o$�J%�D�K%o$�L%�D�M%o$�N%�D�O%o$�P%�D�Q%o$�R%�D�S%o$�T%�D�U%o$�V%�D�W%o$�X%�D�Y%o$�Z%�D�[%o$�\%�D�]%o$�^%�D�_%o$�`%�D�a%o$�b%�D�c%o$�d%�D�e%o$�f%�D�g%o$�h%�D�i%o$�j%�D�k%o$�l%�D�m%o$�n%�D�o%o$�p%�D�q%o$�r%�D�s%o$�t%�D�u%o$�v%�D�w%o$�x%�D�y%o$�z%�D�{%o$�|%�D�}%o$�~%�D�%o$�@&�D�A&o$�B&�D�C&o$�D&�D�E&o$�F&�D�G&o$�H&�D�I&o$�J&�D�K&o$�L&�D�M&o$�N&�D�O&o$�P&�D�Q&o$�R&�D�S&o$�T&�D�U&o$�V&�D�W&o$�X&�D�Y&o$�Z&�D�[&o$�\&�D�]&o$�^&�D�_&o$�`&�D�a&o$�b&�D�c&o$�d&�D�e&o$�f&�D�g&o$�h&�D�i&o$�j&�D�k&o$�l&�D�m&o$�n&�D�o&o$�p&�D�q&o$�r&�D�s&o$�t&�D�u&o$�v&�D�w&o$�x&�D�y&o$�z&�D�{&o$�|&�D�}&o$�~&�D�&o$�@'�D�A'o$�B'�D�C'o$�D'�D�E'o$�F'�D�G'o$�H'�D�I'o$�J'�D�K'o$�L'�D�M'o$�N'�D�O'o$�P'�D�Q'o$�R'�D�S'o$�T'�D�U'o$�V'�D�W'o$�X'�D�Y'o$�Z'�D�['o$�\'�D�]'o$�^'�D�_'o$�`'�D�a'o$�b'�D�c'o$�d'�D�e'o$�f'�D�g'o$�h'�D�i'o$�j'�D�k'o$�l'�D�m'o$�n'�D�o'o$�p'�D�q'o$�r'�D�s'o$�t'�D�u'o$�v'�D�w'o$�x'�D�y'o$�z'�D�{'o$�|'�D�}'o$�~'�D�'o$�@(�D�A(o$�B(�D�C(o$�D(�D�E(o$�F(�D�G(o$�H(�D�I(o$�J(�D�K(o$�L(�D�M(o$�N(�D�O(o$�P(�D�Q(o$�R(�D�S(o$�T(�D�U(o$�V(�D�W(o$�X(�D�Y(o$�Z(�D�[(o$�\(�D�](o$�^(�D�_(o$�`(�D�a(o$�b(�D�c(o$�d(�D�e(o$�f(�D�g(o$�h(�D�i(o$�j(�D�k(o$�l(�D�m(o$�n(�D�o(o$�p(�D�q(o$�r(�D�s(o$�t(�D�u(o$�v(�D�w(o$�x(�D�y(o$�z(�D�{(o$�|(�D�}(o$�~(�D�(o$�@)�D�A)o$�B)�D�C)o$�D)�D�E)o$�F)�D�G)o$�H)�D�I)o$�J)�D�K)o$�L)�D�M)o$�N)�D�O)o$�P)�D�Q)o$�R)�D�S)o$�T)�D�U)o$�V)�D�W)o$�X)�D�Y)o$�Z)�D�[)o$�\)�D�])o$�^)�D�_)o$�`)�D�a)o$�b)�D�c)o$�d)�D�e)o$�f)�D�g)o$�h)�D�i)o$�j)�D�k)o$�l)�D�m)o$�n)�D�o)o$�p)�D�q)o$�r)�D�s)o$�t)�D�u)o$�v)�D�w)o$�x)�D�y)o$�z)�D�{)o$�|)�D�})o$�~)�D�)o$�@*�D�A*o$�B*�D�C*o$�D*�D�E*o$�F*�D�G*o$�H*�D�I*o$�J*�D�K*o$�L*�D�M*o$�N*�D�O*o$�P*�D�Q*o$�R*�D�S*o$�T*�D�U*o$�V*�D�W*o$�X*�D�Y*o$�Z*�D�[*o$�\*�D�]*o$�^*�D�_*o$�`*�D�a*o$�b*�D�c*o$�d*�D�e*o$�f*�D�g*o$�h*�D�i*o$�j*�D�k*o$�l*�D�m*o$�n*�D�o*o$�p*�D�q*o$�r*�D�s*o$�t*�D�u*o$�v*�D�w*o$�x*�D�y*o$�z*�D�{*o$�|*�D�}*o$�~*�D�*o$�@+�D�A+o$�B+�D�C+o$�D+�D�E+o$�F+�D�G+o$�H+�D�I+o$�J+�D�K+o$�L+�D�M+o$�N+�D�O+o$�P+�D�Q+o$�R+�D�S+o$�T+�D�U+o$�V+�D�W+o$�X+�D�Y+o$�Z+�D�[+o$�\+�D�]+o$�^+�D�_+o$�`+�D�a+o$�b+�D�c+o$�d+�D�e+o$�f+�D�g+o$�h+�D�i+o$�j+�D�k+o$�l+�D�m+o$�n+�D�o+o$�p+�D�q+o$�r+�D�s+o$�t+�D�u+o$�v+�D�w+o$�x+�D�y+o$�z+�D�{+o$�|+�D�}+o$�~+�D�+o$�@,�D�A,o$�B,�D�C,o$�D,�D�E,o$�F,�D�G,o$�H,�D�I,o$�J,�D�K,o$�L,�D�M,o$�N,�D�O,o$�P,�D�Q,o$�R,�D�S,o$�T,�D�U,o$�V,�D�W,o$�X,�D�Y,o$�Z,�D�[,o$�\,�D�],o$�^,�D�_,o$�`,�D�a,o$�b,�D�c,o$�d,�D�e,o$�f,�D�g,o$�h,�D�i,o$�j,�D�k,o$�l,�D�m,o$�n,�D�o,o$�p,�D�q,o$�r,�D�s,o$�t,�D�u,o$�v,�D�w,o$�x,�D�y,o$�z,�D�{,o$�|,�D�},o$�~,�D�,o$�@-�D�A-o$�B-�D�C-o$�D-�D�E-o$�F-�D�G-o$�H-�D�I-o$�J-�D�K-o$�L-�D�M-o$�N-�D�O-o$�P-�D�Q-o$�R-�D�S-o$�T-�D�U-o$�V-�D�W-o$�X-�D�Y-o$�Z-�D�[-o$�\-�D�]-o$�^-�D�_-o$�`-�D�a-o$�b-�D�c-o$�d-�D�e-o$�f-�D�g-o$�h-�D�i-o$�j-�D�k-o$�l-�D�m-o$�n-�D�o-o$�p-�D�q-o$�r-�D�s-o$�t-�D�u-o$�v-�D�w-o$�x-�D�y-o$�z-�D�{-o$�|-�D�}-o$�~-�D�-o$�@.�D�A.o$�B.�D�C.o$�D.�D�E.o$�F.�D�G.o$�H.�D�I.o$�J.�D�K.o$�L.�D�M.o$�N.�D�O.o$�P.�D�Q.o$�R.�D�S.o$�T.�D�U.o$�V.�D�W.o$�X.�D�Y.o$�Z.�D�[.o$�\.�D�].o$�^.�D�_.o$�`.�D�a.o$�b.�D�c.o$�d.�D�e.o$�f.�D�g.o$�h.�D�i.o$�j.�D�k.o$�l.�D�m.o$�n.�D�o.o$�p.�D�q.o$�r.�D�s.o$�t.�D�u.o$�v.�D�w.o$�x.�D�y.o$�z.�D�{.o$�|.�D�}.o$�~.�D�.o$�@/�D�A/o$�B/�D�C/o$�D/�D�E/o$�F/�D�G/o$�H/�D�I/o$�J/�D�K/o$�L/�D�M/o$�N/�D�O/o$�P/�D�Q/o$�R/�D�S/o$�T/�D�U/o$�V/�D�W/o$�X/�D�Y/o$�Z/�D�[/o$�\/�D�]/o$�^/�D�_/o$�`/�D�a/o$�b/�D�c/o$�d/�D�e/o$�f/�D�g/o$�h/�D�i/o$�j/�D�k/o$�l/�D�m/o$�n/�D�o/o$�p/�D�q/o$�r/�D�s/o$�t/�D�u/o$�v/�D�w/o$�x/�D�y/o$�z/�D�{/o$�|/�D�}/o$�~/�D�/o$�@0�D�A0o$�B0�D�C0o$�D0�D�E0o$�F0�D�G0o$�H0�D�I0o$�J0�D�K0o$�L0�D�M0o$�N0�D�O0o$�P0�D�Q0o$�R0�D�S0o$�T0�D�U0o$�V0�D�W0o$�X0�D�Y0o$�Z0�D�[0o$�\0�D�]0o$�^0�D�_0o$�`0�D�a0o$�b0�D�c0o$�d0�D�e0o$�f0�D�g0o$�h0�D�i0o$�j0�D�k0o$�l0�D�m0o$�n0�D�o0o$�p0�D�q0o$�r0�D�s0o$�t0�D�u0o$�v0�D�w0o$�x0�D�y0o$�z0�D�{0o$�|0�D�}0o$�~0�D�0o$�@1�D�A1o$�B1�D�C1o$�D1�D�E1o$�F1�D�G1o$�H1�D�I1o$�J1�D�K1o$�L1�D�M1o$�N1�D�O1o$�P1�D�Q1o$�R1�D�S1o$�T1�D�U1o$�V1�D�W1o$�X1�D�Y1o$�Z1�D�[1o$�\1�D�]1o$�^1�D�_1o$�`1�D�a1o$�b1�D�c1o$�d1�D�e1o$�f1�D�g1o$�h1�D�i1o$�j1�D�k1o$�l1�D�m1o$�n1�D�o1o$�p1�D�q1o$�r1�D�s1o$�t1�D�u1o$�v1�D�w1o$�x1�D�y1o$�z1�D�{1o$�|1�D�}1o$�~1�D�1o$�@2�D�A2o$�B2�D�C2o$�D2�D�E2o$�F2�D�G2o$�H2�D�I2o$�J2�D�K2o$�L2�D�M2o$�N2�D�O2o$�P2�D�Q2o$�R2�D�S2o$�T2�D�U2o$�V2�D�W2o$�X2�D�Y2o$�Z2�D�[2o$�\2�D�]2o$�^2�D�_2o$�`2�D�a2o$�b2�D�c2o$�d2�D�e2o$�f2�D�g2o$�h2�D�i2o$�j2�D�k2o$�l2�D�m2o$�n2�D�o2o$�p2�D�q2o$�r2�D�s2o$�t2�D�u2o$�v2�D�w2o$�x2�D�y2o$�z2�D�{2o$�|2�D�}2o$�~2�D�2o$�@3�D�A3o$�B3�D�C3o$�D3�D�E3o$�F3�D�G3o$�H3�D�I3o$�J3�D�K3o$�L3�D�M3o$�N3�D�O3o$�P3�D�Q3o$�R3�D�S3o$�T3�D�U3o$�V3�D�W3o$�X3�D�Y3o$�Z3�D�[3o$�\3�D�]3o$�^3�D�_3o$�`3�D�a3o$�b3�D�c3o$�d3�D�e3o$�f3�D�g3o$�h3�D�i3o$�j3�D�k3o$�l3�D�m3o$�n3�D�o3o$�p3�D�q3o$�r3�D�s3o$�t3�D�u3o$�v3�D�w3o$�x3�D�y3o$�z3�D�{3o$�|3�D�}3o$�~3�D�3o$�@4�D�A4o$�B4�D�C4o$�D4�D�E4o$�F4�D�G4o$�H4�D�I4o$�J4�D�K4o$�L4�D�M4o$�N4�D�O4o$�P4�D�Q4o$�R4�D�S4o$�T4�D�U4o$�V4�D�W4o$�X4�D�Y4o$�Z4�D�[4o$�\4�D�]4o$�^4�D�_4o$�`4�D�a4o$�b4�D�c4o$�d4�D�e4o$�f4�D�g4o$�h4�D�i4o$�j4�D�k4o$�l4�D�m4o$�n4�D�o4o$�p4�D�q4o$�r4�D�s4o$�t4�D�u4o$�v4�D�w4o$�x4�D�y4o$�z4�D�{4o$�|4�D�}4o$�~4�D�4o$�@5�D�A5o$�B5�D�C5o$�D5�D�E5o$�F5�D�G5o$�H5�D�I5o$�J5�D�K5o$�L5�D�M5o$�N5�D�O5o$�P5�D�Q5o$�R5�D�S5o$�T5�D�U5o$�V5�D�W5o$�X5�D�Y5o$�Z5�D�[5o$�\5�D�]5o$�^5�D�_5o$�`5�D�a5o$�b5�D�c5o$�d5�D�e5o$�f5�D�g5o$�h5�D�i5o$�j5�D�k5o$�l5�D�m5o$�n5�D�o5o$�p5�D�q5o$�r5�D�s5o$�t5�D�u5o$�v5�D�w5o$�x5�D�y5o$�z5�D�{5o$�|5�D�}5o$�~5�D�5o$�@6�D�A6o$�B6�D�C6o$�D6�D�E6o$�F6�D�G6o$�H6�D�I6o$�J6�D�K6o$�L6�D�M6o$�N6�D�O6o$�P6�D�Q6o$�R6�D�S6o$�T6�D�U6o$�V6�D�W6o$�X6�D�Y6o$�Z6�D�[6o$�\6�D�]6o$�^6�D�_6o$�`6�D�a6o$�b6�D�c6o$�d6�D�e6o$�f6�D�g6o$�h6�D�i6o$�j6�D�k6o$�l6�D�m6o$�n6�D�o6o$�p6�D�q6o$�r6�D�s6o$�t6�D�u6o$�v6�D�w6o$�x6�D�y6o$�z6�D�{6o$�|6�D�}6o$�~6�D�6o$�@7�D�A7o$�B7�D�C7o$�D7�D�E7o$�F7�D�G7o$�H7�D�I7o$�J7�D�K7o$�L7�D�M7o$�N7�D�O7o$�P7�D�Q7o$�R7�D�S7o$�T7�D�U7o$�V7�D�W7o$�X7�D�Y7o$�Z7�D�[7o$�\7�D�]7o$�^7�D�_7o$�`7�D�a7o$�b7�D�c7o$�d7�D�e7o$�f7�D�g7o$�h7�D�i7o$�j7�D�k7o$�l7�D�m7o$�n7�D�o7o$�p7�D�q7o$�r7�D�s7o$�t7�D�u7o$�v7�D�w7o$�x7�D�y7o$�z7�D�{7o$�|7�D�}7o$�~7�D�7o$�@8�D�A8o$�B8�D�C8o$�D8�D�E8o$�F8�D�G8o$�H8�D�I8o$�J8�D�K8o$�L8�D�M8o$�N8�D�O8o$�P8�D�Q8o$�R8�D�S8o$�T8�D�U8o$�V8�D�W8o$�X8�D�Y8o$�Z8�D�[8o$�\8�D�]8o$�^8�D�_8o$�`8�D�a8o$�b8�D�c8o$�d8�D�e8o$�f8�D�g8o$�h8�D�i8o$�j8�D�k8o$�l8�D�m8o$�n8�D�o8o$�p8�D�q8o$�r8�D�s8o$�t8�D�u8o$�v8�D�w8o$�x8�D�y8o$�z8�D�{8o$�|8�D�}8o$�~8�D�8o$�@9�D�A9o$�B9�D�C9o$�D9�D�E9o$�F9�D�G9o$�H9�D�I9o$�J9�D�K9o$�L9�D�M9o$�N9�D�O9o$�P9�D�Q9o$�R9�D�S9o$�T9�D�U9o$�V9�D�W9o$�X9�D�Y9o$�Z9�D�[9o$�\9�D�]9o$�^9�D�_9o$�`9�D�a9o$�b9�D�c9o$�d9�D�e9o$�f9�D�g9o$�h9�D�i9o$�j9�D�k9o$�l9�D�m9o$�n9�D�o9o$�p9�D�q9o$�r9�D�s9o$�t9�D�u9o$�v9�D�w9o$�x9�D�y9o$�z9�D�{9o$�|9�D�}9o$�~9�D�9o$�@:�D�A:o$�B:�D�C:o$�D:�D�E:o$�F:�D�G:o$�H:�D�I:o$�J:�D�K:o$�L:�D�M:o$�N:�D�O:o$�P:�D�Q:o$�R:�D�S:o$�T:�D�U:o$�V:�D�W:o$�X:�D�Y:o$�Z:�D�[:o$�\:�D�]:o$�^:�D�_:o$�`:�D�a:o$�b:�D�c:o$�d:�D�e:o$�f:�D�g:o$�h:�D�i:o$�j:�D�k:o$�l:�D�m:o$�n:�D�o:o$�p:�D�q:o$�r:�D�s:o$�t:�D�u:o$�v:�D�w:o$�x:�D�y:o$�z:�D�{:o$�|:�D�}:o$�~:�D�:o$�@;�D�A;o$�B;�D�C;o$�D;�D�E;o$�F;�D�G;o$�H;�D�I;o$�J;�D�K;o$�L;�D�M;o$�N;�D�O;o$�P;�D�Q;o$�R;�D�S;o$�T;�D�U;o$�V;�D�W;o$�X;�D�Y;o$�Z;�D�[;o$�\;�D�];o$�^;�D�_;o$�`;�D�a;o$�b;�D�c;o$�d;�D�e;o$�f;�D�g;o$�h;�D�i;o$�j;�D�k;o$�l;�D�m;o$�n;�D�o;o$�p;�D�q;o$�r;�D�s;o$�t;�D�u;o$�v;�D�w;o$�x;�D�y;o$�z;�D�{;o$�|;�D�};o$�~;�D�;o$�@<�D�A<o$�B<�D�C<o$�D<�D�E<o$�F<�D�G<o$�H<�D�I<o$�J<�D�K<o$�L<�D�M<o$�N<�D�O<o$�P<�D�Q<o$�R<�D�S<o$�T<�D�U<o$�V<�D�W<o$�X<�D�Y<o$�Z<�D�[<o$�\<�D�]<o$�^<�D�_<o$�`<�D�a<o$�b<�D�c<o$�d<�D�e<o$�f<�D�g<o$�h<�D�i<o$�j<�D�k<o$�l<�D�m<o$�n<�D�o<o$�p<�D�q<o$�r<�D�s<o$�t<�D�u<o$�v<�D�w<o$�x<�D�y<o$�z<�D�{<o$�|<�D�}<o$�~<�D�<o$�@=�D�A=o$�B=�D�C=o$�D=�D�E=o$�F=�D�G=o$�H=�D�I=o$�J=�D�K=o$�L=�D�M=o$�N=�D�O=o$�P=�D�Q=o$�R=�D�S=o$�T=�D�U=o$�V=�D�W=o$�X=�D�Y=o$�Z=�D�[=o$�\=�D�]=o$�^=�D�_=o$�`=�D�a=o$�b=�D�c=o$�d=�D�e=o$�f=�D�g=o$�h=�D�i=o$�j=�D�k=o$�l=�D�m=o$�n=�D�o=o$�p=�D�q=o$�r=�D�s=o$�t=�D�u=o$�v=�D�w=o$�x=�D�y=o$�z=�D�{=o$�|=�D�}=o$�~=�D�=o$�@>�D�A>o$�B>�D�C>o$�D>�D�E>o$�F>�D�G>o$�H>�D�I>o$�J>�D�K>o$�L>�D�M>o$�N>�D�O>o$�P>�D�Q>o$�R>�D�S>o$�T>�D�U>o$�V>�D�W>o$�X>�D�Y>o$�Z>�D�[>o$�\>�D�]>o$�^>�D�_>o$�`>�D�a>o$�b>�D�c>o$�d>�D�e>o$�f>�D�g>o$�h>�D�i>o$�j>�D�k>o$�l>�D�m>o$�n>�D�o>o$�p>�D�q>o$�r>�D�s>o$�t>�D�u>o$�v>�D�w>o$�x>�D�y>o$�z>�D�{>o$�|>�D�}>o$�~>�D�>o$�@?�D�A?o$�B?�D�C?o$�D?�D�E?o$�F?�D�G?o$�H?�D�I?o$�J?�D�K?o$�L?�D�M?o$�N?�D�O?o$�P?�D�Q?o$�R?�D�S?o$�T?�D�U?o$�V?�D�W?o$�X?�D�Y?o$�Z?�D�[?o$�\?�D�]?o$�^?�D�_?o$�`?�D�a?o$�b?�D�c?o$�d?�D�e?o$�f?�D�g?o$�h?�D�i?o$�j?�D�k?o$�l?�D�m?o$�n?�D�o?o$�p?�D�q?o$�r?�D�s?o$�t?�D�u?o$�v?�D�w?o$�x?�D�y?o$�z?�D�{?o$�|?�D�}?o$�~?�D�?o$�@@�D�A@o$�B@�D�C@o$�D@�D�E@o$�F@�D�G@o$�H@�D�I@o$�J@�D�K@o$�L@�D�M@o$�N@�D�O@o$�P@�D�Q@o$�R@�D�S@o$�T@�D�U@o$�V@�D�W@o$�X@�D�Y@o$�Z@�D�[@o$�\@�D�]@o$�^@�D�_@o$�`@�D�a@o$�b@�D�c@o$�d@�D�e@o$�f@�D�g@o$�h@�D�i@o$�j@�D�k@o$�l@�D�m@o$�n@�D�o@o$�p@�D�q@o$�r@�D�s@o$�t@�D�u@o$�v@�D�w@o$�x@�D�y@o$�z@�D�{@o$�|@�D�}@o$�~@�D�@o$�@A�D�AAo$�BA�D�CAo$�DA�D�EAo$�FA�D�GAo$�HA�D�IAo$�JA�D�KAo$�LA�D�MAo$�NA�D�OAo$�PA�D�QAo$�RA�D�SAo$�TA�D�UAo$�VA�D�WAo$�XA�D�YAo$�ZA�D�[Ao$�\A�D�]Ao$�^A�D�_Ao$�`A�D�aAo$�bA�D�cAo$�dA�D�eAo$�fA�D�gAo$�hA�D�iAo$�jA�D�kAo$�lA�D�mAo$�nA�D�oAo$�pA�D�qAo$�rA�D�sAo$�tA�D�uAo$�vA�D�wAo$�xA�D�yAo$�zA�D�{Ao$�|A�D�}Ao$�~A�D�Ao$�@B�D�ABo$�BB�D�CBo$�DB�D�EBo$�FB�D�GBo$�HB�D�IBo$�JB�D�KBo$�LB�D�MBo$�NB�D�OBo$�PB�D�QBo$�RB�D�SBo$�TB�D�UBo$�VB�D�WBo$�XB�D�YBo$�ZB�D�[Bo$�\B�D�]Bo$�^B�D�_Bo$�`B�D�aBo$�bB�D�cBo$�dB�D�eBo$�fB�D�gBo$�hB�D�iBo$�jB�D�kBo$�lB�D�mBo$�nB�D�oBo$�pB�D�qBo$�rB�D�sBo$�tB�D�uBo$�vB�D�wBo$�xB�D�yBo$�zB�D�{Bo$�|B�D�}Bo$�~B�D�Bo$�@C�D�ACo$�BC�D�CCo$�DC�D�ECo$�FC�D�GCo$�HC�D�ICo$�JC�D�KCo$�LC�D�MCo$�NC�D�OCo$�PC�D�QCo$�RC�D�SCo$�TC�D�UCo$�VC�D�WCo$�XC�D�YCo$�ZC�D�[Co$�\C�D�]Co$�^C�D�_Co$�`C�D�aCo$�bC�D�cCo$�dC�D�eCo$�fC�D�gCo$�hC�D�iCo$�jC�D�kCo$�lC�D�mCo$�nC�D�oCo$�pC�D�qCo$�rC�D�sCo$�tC�D�uCo$�vC�D�wCo$�xC�D�yCo$�zC�D�{Co$�|C�D�}Co$�~C�D�Co$�@D�D�ADo$�BD�D�CDo$�DD�D�EDo$�FD�D�GDo$�HD�D�IDo$�JD�D�KDo$�LD�D�MDo$�ND�D�ODo$�PD�D�QDo$�RD�D�SDo$�TD�D�UDo$�VD�D�WDo$�XD�D�YDo$�ZD�D�[Do$�\D�D�]Do$�^D�D�_Do$�`D�D�aDo$�bD�D�cDo$�dD�D�eDo$�fD�D�gDo$�hD�D�iDo$�jD�D�kDo$�lD�D�mDo$�nD�D�oDo$�pD�D�qDo$�rD�D�sDo$�tD�D�uDo$�vD�D�wDo$�xD�D�yDo$�zD�D�{Do$�|D�D�}Do$�~D�D�Do$�@E�D�AEo$�BE�D�CEo$�DE�D�EEo$�FE�D�GEo$�HE�D�IEo$�JE�D�KEo$�LE�D�MEo$�NE�D�OEo$�PE�D�QEo$�RE�D�SEo$�TE�D�UEo$�VE�D�WEo$�XE�D�YEo$�ZE�D�[Eo$�\E�D�]Eo$�^E�D�_Eo$�`E�D�aEo$�bE�D�cEo$�dE�D�eEo$�fE�D�gEo$�hE�D�iEo$�jE�D�kEo$�lE�D�mEo$�nE�D�oEo$�pE�D�qEo$�rE�D�sEo$�tE�D�uEo$�vE�D�wEo$�xE�D�yEo$�zE�D�{Eo$�|E�D�}Eo$�~E�D�Eo$�@F�D�AFo$�BF�D�CFo$�DF�D�EFo$�FF�D�GFo$�HF�D�IFo$�JF�D�KFo$�LF�D�MFo$�NF�D�OFo$�PF�D�QFo$�RF�D�SFo$�TF�D�UFo$�VF�D�WFo$�XF�D�YFo$�ZF�D�[Fo$�\F�D�]Fo$�^F�D�_Fo$�`F�D�aFo$�bF�D�cFo$�dF�D�eFo$�fF�D�gFo$�hF�D�iFo$�jF�D�kFo$�lF�D�mFo$�nF�D�oFo$�pF�D�qFo$�rF�D�sFo$�tF�D�uFo$�vF�D�wFo$�xF�D�yFo$�zF�D�{Fo$�|F�D�}Fo$�~F�D�Fo$�@G�D�AGo$�BG�D�CGo$�DG�D�EGo$�FG�D�GGo$�HG�D�IGo$�JG�D�KGo$�LG�D�MGo$�NG�D�OGo$�PG�D�QGo$�RG�D�SGo$�TG�D�UGo$�VG�D�WGo$�XG�D�YGo$�ZG�D�[Go$�\G�D�]Go$�^G�D�_Go$�`G�D�aGo$�bG�D�cGo$�dG�D�eGo$�fG�D�gGo$�hG�D�iGo$�jG�D�kGo$�lG�D�mGo$�nG�D�oGo$�pG�D�qGo$�rG�D�sGo$�tG�D�uGo$�vG�D�wGo$�xG�D�yGo$�zG�D�{Go$�|G�D�}Go$�~G�D�Go$�@H�D�AHo$�BH�D�CHo$�DH�D�EHo$�FH�D�GHo$�HH�D�IHo$�JH�D�KHo$�LH�D�MHo$�NH�D�OHo$�PH�D�QHo$�RH�D�SHo$�TH�D�UHo$�VH�D�WHo$�XH�D�YHo$�ZH�D�[Ho$�\H�D�]Ho$�^H�D�_Ho$�`H�D�aHo$�bH�D�cHo$�dH�D�eHo$�fH�D�gHo$�hH�D�iHo$�jH�D�kHo$�lH�D�mHo$�nH�D�oHo$�pH�D�qHo$�rH�D�sHo$�tH�D�uHo$�vH�D�wHo$�xH�D�yHo$�zH�D�{Ho$�|H�D�}Ho$�~H�D�Ho$�@I�D�AIo$�BI�D�CIo$�DI�D�EIo$�FI�D�GIo$�HI�D�IIo$�JI�D�KIo$�LI�D�MIo$�NI�D�OIo$�PI�D�QIo$�RI�D�SIo$�TI�D�UIo$�VI
����]Io$�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/langthaimodel.cpython-312.pyc000064400000227635151732703210024512 0ustar00�

R`iv���\�ddlmZididd�dd�dd�dd�dd�dd�d	d
�dd
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd
�dd�dd
�dd
�dd
�dd�dd
�d d�d!d
�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d
�d4d��dd
d
dd
dddddddd5���didd
�dd�dd
�dd
�dd
�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd
�dd�dd�dd
�dd
�dd�dd�dd�dd�dd�d d�d!d�dd
�d"d�d#d�d$d��id%d�d&d�d'd
�d(d
�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d
�d2d
�d3d�d4d��ddd
ddd
ddd
dddd5���didd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd
�dd�dd�dd�dd
�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd
�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d
��dddddd
ddddddd5���didd�dd�dd�dd�dd�dd
�d	d�dd
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd
�dd�dd
�dd�dd�dd�dd�dd
�dd�dd�dd
�d d�d!d
�dd�d"d�d#d�d$d��id%d�d&d
�d'd�d(d�d)d�d*d�d+d�d,d
�d
d�d-d�d.d�d/d
�d0d�d1d
�d2d
�d3d�d4d��dd
ddddddddddd5���didd�dd
�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd
�idd
�dd�dd�dd�dd
�dd�dd�dd�dd
�dd�dd�d d
�d!d
�dd�d"d�d#d�d$d
��id%d�d&d�d'd�d(d
�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d
�d0d�d1d
�d2d�d3d�d4d
��d
dd
d
ddddddddd5���didd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d
�d!d
�dd�d"d�d#d�d$d
��id%d�d&d�d'd�d(d�d)d�d*d�d+d
�d,d
�d
d
�d-d�d.d
�d/d
�d0d�d1d�d2d
�d3d�d4d��ddddddddddddd5���d	idd
�dd�dd�dd
�dd�dd�d	d�dd�dd
�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d
�dd
�d"d�d#d�d$d
��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d
�d.d�d/d�d0d�d1d�d2d�d3d
�d4d��dddddd
ddddddd5���didd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd
�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d
�d$d��id%d�d&d�d'd
�d(d�d)d�d*d�d+d�d,d
�d
d
�d-d�d.d
�d/d�d0d�d1d�d2d
�d3d
�d4d
��dddddd
d
dd
dddd5���didd
�dd
�dd�dd�dd�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd
�dd�dd�dd
�dd
�dd�dd�dd�dd�dd�d d
�d!d�dd�d"d�d#d
�d$d��id%d�d&d�d'd
�d(d�d)d
�d*d�d+d
�d,d�d
d�d-d�d.d
�d/d
�d0d�d1d�d2d�d3d�d4d
��d
dd
dd
dddddddd5���d
idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d
�d)d�d*d�d+d�d,d�d
d�d-d�d.d
�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d
�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd
�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d
�d&d�d'd�d(d�d)d
�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddd
dddd5���didd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd
�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d
�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd
�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd
�d"d�d#d�d$d
��id%d�d&d�d'd
�d(d
�d)d�d*d�d+d�d,d�d
d�d-d�d.d
�d/d�d0d�d1d�d2d�d3d�d4d
��d
dd
d
ddddddddd5���didd�dd�dd�dd�dd�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd
�dd�idd
�dd�dd�dd
�dd
�dd
�dd
�dd�dd
�dd�dd
�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d
�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d
�d1d�d2d�d3d�d4d��dd
ddddd
dd
dddd5���didd�dd
�dd
�dd�dd
�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd
�dd
�idd�dd
�dd�dd�dd
�dd
�dd
�dd�dd
�dd�dd�d d
�d!d
�dd�d"d�d#d�d$d
��id%d�d&d�d'd�d(d�d)d�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d
�d1d
�d2d�d3d�d4d
��d
d
d
d
ddddddddd5���ididd
�dd�dd
�dd�dd
�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd
�idd�dd
�dd�dd
�dd�dd�dd�dd�dd
�dd�dd�d d�d!d�dd
�d"d�d#d
�d$d
��id%d�d&d�d'd
�d(d�d)d
�d*d�d+d�d,d�d
d�d-d�d.d�d/d
�d0d�d1d�d2d�d3d�d4d
��d
dd
d
ddddddddd5���didd
�dd
�dd�dd
�dd
�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd
�idd�dd
�dd�dd�dd�dd�dd
�dd�dd�dd�dd�d d
�d!d�dd�d"d
�d#d
�d$d��id%d�d&d
�d'd
�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d
�d2d�d3d
�d4d��d
dd
ddd
ddddddd5���didd�dd�dd�dd
�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd
�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd
�dd�dd�d	d
�dd
�dd�d
d�dd�dd
�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd
�dd
�d d�d!d�dd�d"d
�d#d�d$d��id%d
�d&d�d'd�d(d�d)d�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddd
ddddddd5���didd�dd�dd�dd
�dd
�dd
�d	d
�dd
�dd�d
d�dd�dd�dd�dd�dd�dd
�dd�idd
�dd�dd�dd�dd�dd�dd�dd�dd
�dd
�dd
�d d
�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
dddd
ddddddd5���didd�dd�dd
�dd�dd
�dd�d	d�dd
�dd�d
d
�dd�dd
�dd�dd�dd�dd
�dd
�idd
�dd
�dd�dd�dd�dd
�dd
�dd
�dd
�dd�dd�d d
�d!d�dd�d"d�d#d�d$d
��id%d�d&d
�d'd�d(d
�d)d�d*d�d+d
�d,d�d
d
�d-d�d.d�d/d�d0d�d1d�d2d
�d3d�d4d
��ddd
dddd
dd
dddd5���didd
�dd�dd�dd
�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d
�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd
�d(d�d)d�d*d�d+d
�d,d
�d
d�d-d�d.d�d/d�d0d�d1d
�d2d�d3d�d4d��dddddddd
ddddd5���didd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd
�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd
�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d
�d
d�d-d�d.d�d/d
�d0d�d1d�d2d�d3d�d4d��dddddddd
ddddd5���didd
�dd
�dd
�dd
�dd
�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd
�dd
�dd
�idd�dd�dd
�dd�dd�dd�dd
�dd�dd
�dd�dd�d d
�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd
�d(d
�d)d�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d
�d1d�d2d
�d3d�d4d
��d
dd
d
dd
dd
ddddd5���didd�dd�dd�dd�dd�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd
�idd�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd
�d"d�d#d�d$d��id%d�d&d�d'd
�d(d�d)d
�d*d�d+d�d,d�d
d�d-d�d.d
�d/d
�d0d�d1d
�d2d
�d3d�d4d��d
dddddddddddd5���didd�dd�dd
�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd
�dd�dd�d d�d!d�dd
�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d
�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddd
dddd5���d idd�dd�dd�dd�dd�dd�d	d
�dd
�dd�d
d�dd�dd�dd�dd�dd
�dd�dd�idd
�dd�dd
�dd�dd�dd�dd
�dd�dd�dd�dd
�d d�d!d
�dd�d"d�d#d�d$d��id%d
�d&d
�d'd�d(d�d)d�d*d�d+d
�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddd
d
ddd
dddd5���d!idd�dd
�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd
�dd�dd
�dd�dd�dd
�dd
�dd�dd
�dd�dd
�d d�d!d�dd�d"d�d#d
�d$d��id%d
�d&d�d'd�d(d
�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d
�d1d�d2d�d3d�d4d��d
d
dddd
ddddddd5���didd�dd�dd�dd�dd�dd�d	d�dd
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd
�dd�dd�dd�dd�dd
�dd�dd
�dd
�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
dd
ddddddddd5���d"idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d
�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d#idd�dd�dd
�dd�dd
�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd
�dd�dd�dd
�dd�dd�dd
�dd�dd�dd�dd
�d d
�d!d�dd
�d"d�d#d
�d$d
��id%d�d&d�d'd�d(d
�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��d
d
dd
ddddddddd5���d$idd�dd�dd
�dd�dd�dd�d	d
�dd
�dd�d
d�dd�dd�dd�dd�dd
�dd�dd
�idd
�dd
�dd�dd�dd�dd
�dd
�dd�dd
�dd
�dd�d d�d!d�dd�d"d�d#d�d$d
��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
d
dd
dddd
dddd5����id%idd
�dd�dd
�dd�dd
�dd�d	d�dd�dd
�d
d�dd�dd�dd�dd�dd�dd�dd
�idd�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d
�d&d�d'd
�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��d
dd
d
ddddd
dddd5���d&idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd
�dd�dd�dd�dd�dd�dd
�idd�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd
�d d
�d!d�dd�d"d�d#d�d$d��id%d
�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d
�d0d�d1d�d2d�d3d�d4d
��ddddddddddddd5���d'idd�dd�dd�dd�dd
�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd
�dd�dd�dd�dd�dd�d d�d!d
�dd�d"d�d#d
�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
dd
dddd
ddddd5���d(idd�dd�dd�dd
�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd
�dd�idd�dd�dd�dd�dd�dd
�dd�dd�dd
�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d
�d,d�d
d�d-d�d.d
�d/d
�d0d�d1d�d2d
�d3d
�d4d��ddddddddddddd5���d)idd�dd
�dd�dd�dd
�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd
�dd�dd
�dd�dd�dd
�dd
�dd�dd
�dd
�dd
�d d�d!d�dd�d"d�d#d�d$d��id%d
�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��d
d
ddd
d
ddddddd5���d*idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d+idd�dd
�dd�dd
�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd
�dd�dd
�dd�dd�dd�dd
�dd�dd�dd�dd
�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d
�d+d
�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
ddddddddddd5���d,idd�dd�dd
�dd�dd�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd
�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�dd�d	d�dd
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd
�dd�dd�dd�dd�dd�dd
�dd
�dd�dd
�dd
�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
ddd
dddddddd5���d-idd�dd
�dd�dd�dd
�dd�d	d�dd�dd�d
d�dd�dd
�dd�dd�dd�dd
�dd
�idd
�dd
�dd�dd�dd
�dd
�dd
�dd�dd
�dd�dd
�d d
�d!d�dd�d"d�d#d�d$d
��id%d�d&d�d'd
�d(d�d)d
�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
ddddddddddd5���d.idd�dd
�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd
�dd�dd�dd�dd�dd�dd�dd�dd�dd
�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d
�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��d
d
d
dddddddddd5���d/idd�dd�dd�dd�dd
�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd
�idd�dd�dd�dd
�dd�dd�dd
�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d
�d$d��id%d
�d&d�d'd�d(d
�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
d
d
d
dddddddd5���d0idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd
�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d
�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d1idd�dd�dd�dd�dd�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd
�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d2idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd
�dd�dd�dd�idd
�dd�dd
�dd�dd�dd�dd�dd�dd
�dd�dd
�d d�d!d
�dd�d"d�d#d�d$d
��id%d
�d&d�d'd
�d(d
�d)d
�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d
��dd
dd
ddddd
dddd5���d3idd�dd�dd�dd�dd
�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd
�dd�dd�idd�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd
�d"d�d#d�d$d
��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d
��d
d
ddddddddddd5���d4idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd
�dd�dd�idd
�dd�dd
�dd�dd�dd�dd�dd
�dd�dd
�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5����idd�dd�dd�dd
�dd�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d
�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd
�dd�dd�dd
�dd
�d	d
�dd
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd
�dd�dd�dd�dd
�dd
�dd
�d d
�d!d�dd�d"d�d#d�d$d��id%d
�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd
�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd
�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d
�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd
�dd�dd�dd�dd�dd�d	d
�dd
�dd�d
d�dd�dd�dd�dd�dd�dd�dd
�idd�dd�dd�dd�dd
�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d
�d$d��id%d�d&d�d'd
�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd
�dd�dd�dd�dd�d	d�dd�dd
�d
d�dd�dd�dd�dd�dd�dd
�dd�idd�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d
�dd�d"d�d#d�d$d��id%d�d&d�d'd
�d(d�d)d
�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d
��dddd
ddddddddd5��idd�dd
�dd�dd�dd�dd�d	d
�dd
�dd�d
d�dd�dd
�dd�dd�dd�dd
�dd�idd
�dd�dd
�dd�dd
�dd�dd�dd
�dd
�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d
�d)d�d*d�d+d
�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
ddd
dddddddd5��idd�dd
�dd�dd�dd�dd�d	d
�dd
�dd�d
d�dd�dd�dd�dd�dd�dd
�dd�idd
�dd�dd�dd�dd�dd�dd�dd�dd
�dd
�dd�d d�d!d�dd�d"d�d#d
�d$d��id%d
�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
ddddddddddd5��idd�dd
�dd
�dd�dd
�dd�d	d
�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd
�idd
�dd
�dd�dd
�dd
�dd
�dd�dd�dd
�dd
�dd�d d�d!d�dd
�d"d
�d#d
�d$d
��id%d�d&d�d'd
�d(d
�d)d�d*d
�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dd
d
d
ddddddddd5��idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddd
d
d5��idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddddd
d
dd5��idd�dd�dd�dd�dd�dd�d	d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d�d$d��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d
d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddd
dd5��d5��Zidd6�d
d6�dd6�dd6�d)d6�dd6�d7d6�d8d6�dd6�d d6�d,d9�d4d6�d$d6�d/d9�dd6�d#d6�d!d6�idd6�d'd6�dd6�dd6�d(d6�d+d6�d.d6�dd6�dd6�dd6�d1d6�d:d6�d;d6�dd6�dd6�d2d<�d=d<��id	d<�d3d<�d-d<�d>d<�d?d<�dd<�d0d<�d@d<�d%d<�dd<�dd<�dd<�d&d<�dd<�ddA�ddA�dBdA��iddA�ddA�ddA�ddA�ddA�dCdA�ddA�d
d<�dDd<�dEd<�d"d<�dd<�d*d<�dFd<�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]d^�d_d`�dadb�dcdd�dedf�dgdh�didj�dkdl�dmdn��idodp�dqdr�dsdt�dudv�dldw�dxdy�dzd<�d{d<�d|d<�dXd<�dnd<�d}d<�d~dF�ddU�d�dW�dNd��dVdY��id�d��d�d��d�d��d�dg�dJd��dLd��d^dx�d`d��dbda�dddi�dpd}�drd��d�dz�d�dc�d�dm�d�d��d�d���id�d~�d�d�d�d{�d�d��d�d<�d�d<�d�d<�d�d<�d�d<�d�d��d�d��d�d��d�d��d�d��d�du�d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�do�d�dk�d�d��d�d��d�d��d�d“�id�dēd�dƓd�dȓd�dʓd�d̓d�dΓd�dГd�dғd�d�d�d�d�d֓d�d�d�dٓd�d[�d�d�d�d�d�d��id�d	�d�d�d�d��d�d�d�d
�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dHd�dPd�dRd�dTd�dZd��id\d�dfd�dhd�djd�dtd�dvd�dwd �dyd!�d�d�d�d"�d�d#�d�d�d�d$�d�d%�d�d&�d�d'�d�d(��id�d]�d�d)�d�dI�d�d*�d�d+�d�d,�d�d
�d�d-�d�d.�d�d/�d�d0�d�d1�d�d2�d�d3�d�dq�d�d��d�d���id�d��d�d��d�d��d�d4�d�d:�d�d@�d�d;�d�d=�d�d��d�dB�d�d>�d�d7�d�d8�d�dK�d�d_�d�d?�d�d|��id�d��d�d��d�dM�d�dC�d�dD�d�dG�d�dO�d�dE�d�dQ�d�de�d�dS�d�ds��dd���dd��dA�d�d<�d�d9dA��d6d<i�Ze�d�dee�d�d�d���Z�y(	�)�SingleByteCharSetModel�������4�"��3�/�:��9�1�5�7�+���,��0���'�>��6�-�	��=���*�.����?��
�$��
�(�� �#�)��)��!�2�%���&�8�;�<�r=r>�r7r9�r:r<r?r8�r;r@rArB�@�A��B�j�C�k�D�d�E��F��G��H�e�I�^�J��K��L�l�M�m�N�n�O�o�P��Q��R��S�Y�T�_�U�p�V�q�W��X���Z���[�\�]�`�a�b�c�r�f�s�g�t�h�i���u���v�w�x�y�z���{�|�}�~������������������������������������������������������������������������������������������������������������������������������������������������������������zTIS-620�Thaig��@��?Fuกขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛)�charset_name�language�char_to_order_map�language_model�typical_positive_ratio�keep_ascii_letters�alphabetN)�#pip._vendor.chardet.sbcharsetproberr�THAI_LANG_MODEL�TIS_620_THAI_CHAR_TO_ORDER�TIS_620_THAI_MODEL����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/langthaimodel.py�<module>rs����F�@@��@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�@@�D�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�E@@�F�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�G@@�H�@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�I@@�J�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�K@@�L
�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�M
@@�N�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�O@@�P�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�Q@@�R�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�S@@�T�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�U@@�V�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�W@@�X�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�Y@@�Z�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�[@@�\�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�]@@�^�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�_@@�`�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�a@@�b �@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�c @@�d"�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�e"@@�f$�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�g$@@�h&�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�i&@@�j(�@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�k(@@�l*�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�m*@@�n,�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�o,@@�p.�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�q.@@�r0�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�s0@@�t2�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�u2@@�v4�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�w4@@�x6�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�y6@@�z8�@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�{8@@�|:�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�}:@@�~<�@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�<@@�@?�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�A?@@�BA�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�CA@@�DC�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�EC@@�FE�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�GE@@�HG�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�IG@@�JI�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�KI@@�LK�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�MK@@�NM�@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�OM@@�PO�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�QO@@�RQ�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�SQ@@�TS�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�US@@�VU�@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�WU@@�XW�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�YW@@�ZY�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�[Y@@�\[�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�][@@�^]�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�_]@@�`_�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�a_@@�ba�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�ca@@�dc�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�ec@@�fe�@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�ge@@�hg@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�B@�	�1�@�
�A�@�	�A�@�	
�1�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	
�1�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	
�1�?@�@	�A�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	�A�K@�L	�A�M@�N	
�1�O@�P	�A�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
���
�
�
�
�@�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�B@	�	�1�@	�
�A�@	�	�A�@	�	
�1�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	
�1�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	
�1�?@	�@	�A�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	�A�K@	�L	�A�M@	�N	
�1�O@	�P	�A�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
���
�
�
�
�@	�}@@��R@A��s�A��s�A��s�A��s�	A�
�s�A��s�
A��s�A��s�A��s�A��s�A���A���A���A���A���A� ��!A�"��#A�$��%A�&��'A�(��)A�*��+A�,��-A�.��/A�0��1A�2��3A�4��5A�6��7A�8��9A�:��;A�<��=A�>��?A�@��AA�B��CA�D��EA�F��GA�H��IA�J��KA�L��MA�N��OA�P��QA�R��SA�T��UA�V��WA�X��YA�Z��[A�\��]A�^��_A�`��aA�b��cA�d��eA�f��gA�h��iA�j��kA�l��mA�n��oA�p��qA�r��sA�t��uA�v��wA�x��yA�z��{A�|��}A�~��A�@��AA�B��CA�D��EA�F��GA�H��IA�J��KA�L��MA�N��OA�P��QA�R��SA�T��UA�V��WA�X��YA�Z��[A�\��]A�^��_A�`��aA�b��cA�d��eA�f��gA�h��iA�j��kA�l��mA�n��oA�p��qA�r��sA�t��uA�v��wA�x��yA�z��{A�|��}A�~��A�@��AA�B��CA�D��EA�F��GA�H��IA�J��KA�L��MA�N��OA�P��QA�R��SA�T��UA�V��WA�X��YA�Z��[A�\��]A�^��_A�`��aA�b��cA�d��eA�f��gA�h��iA�j��kA�l��mA�n��oA�p��qA�r��sA�t��uA�v��wA�x��yA�z��{A�|��}A�~��A�@��AA�B��CA�D��EA�F��GA�H��IA�J��KA�L��MA�N��OA�P��QA�R��SA�T��UA�V��WA�X��YA�Z��[A�\��]A�^��_A�`��aA�b��cA�d��eA�f��gA�h��iA�j��kA�l��mA�n��oA�p��qA�r��sA�t��uA�v��wA�x��yA�z��{A�|��}A�~��A�@��AA�B��CA�D��EA�F��GA�H��IA�J��KA�L��MA�N��OA�P��QA�R��SA�T��UA�V��WA�X��YA�Z��[A�\��]A�^��_A�`��aA�b��cA�d��eA�f��gA�h��iA�j��kA�l��mA�n��oA�p��qA�r��sA�t��uA�v��wA�x��yA�z��{A�|��}A�~��A�@��AA�B��CA�D��EA�F��GA�H��IA�J��KA�L��MA�N��OA�P��QA�R��SA�T��UA�V��WA�X��YA�Z��[A�\��]A�^��_A�`��aA�b��cA�d��eA�f��gA�h��iA�j��kA�l��mA�n��oA�p��qA�r��sA�t��uA�v��wA�x��yA�z��{A�|��}A�~��A�@��AA�B��CA�D��EA�F��GA�H��IA�J��KA�L��MA�N��OA�P��QA�R��SA�T��UA�V��WA�X��YA�Z��[A�\��]A�^��_A�`��aA�b��cA�d��eA�f��gA�h��iA�j��kA�l��mA�n��oA�p��qA�r��sA�t��uA�v��wA�x��yA�z��{A�|��}A�~��A�@��AA��F,��
�0�"�#��U��rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/big5prober.cpython-312.pyc000064400000002633151732703210023727 0ustar00�

R`i���J�ddlmZddlmZddlmZddlmZGd�de�Zy)�)�Big5DistributionAnalysis)�CodingStateMachine)�MultiByteCharSetProber)�
BIG5_SM_MODELc�L��eZdZd�fd�Zedefd��Zedefd��Z�xZS)�
Big5Prober�returnc���t�|��tt�|_t�|_|j�y)N)�super�__init__rr�	coding_smr�distribution_analyzer�reset)�self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/big5prober.pyrzBig5Prober.__init__#s.���
����+�M�:���%=�%?��"��
�
��c��y)N�Big5��rs r�charset_namezBig5Prober.charset_name)s��rc��y)N�Chineserrs r�languagezBig5Prober.language-s��r)r	N)	�__name__�
__module__�__qualname__r�property�strrr�
__classcell__)rs@rrr"s>������c������#���rrN)	�chardistributionr�codingstatemachiner�mbcharsetproberr�mbcssmrrrrr�<module>r&s ��87�2�3�!�
�'�
rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/langhebrewmodel.cpython-312.pyc000064400000227353151732703220025037 0ustar00�

R`i���\�ddlmZididd�dd�dd�dd�dd�dd	�d
d	�dd�dd	�d
d�dd	�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd	�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd	�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd	�dd�dd�dd	�d
d	�dd�dd	�d
d	�dd	�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddd	ddddd5���didd�dd	�dd�dd�dd�dd�d
d	�dd	�dd�d
d	�dd	�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd	�dd	�dd	�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd	�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddd	ddddd5���didd�dd�dd�dd�dd�dd�d
d	�dd�dd	�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd	�dd�dd�dd	�dd�dd�d
d�dd	�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddd	ddddd5���d
idd�dd�dd�dd	�dd�dd�d
d�dd�dd�d
d�dd	�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddddd	dd	d5���didd�dd�dd�dd	�dd	�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddd	ddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d	�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd	�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d	�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd	�d*d�d+d�d,d�d-d�d.d	�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd	�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���ididd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d	�d#d	�d$d	�d%d	��id&d	�d	d	�d'd	�d(d	�d)d	�dd	�d*d	�d+d	�d,d	�d-d�d.d	�d/d�d0d	�d1d	�d2d	�d3d�d4d	��dd	d	d	d	d	ddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d	�d-d�d.d	�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d	�d$d�d%d	��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d	�d-d�d.d	�d/d�d0d	�d1d�d2d�d3d�d4d��dd	dd	d	dddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d	�d$d	�d%d	��id&d�d	d�d'd	�d(d�d)d�dd&�d*d�d+d	�d,d	�d-d	�d.d	�d/d	�d0d	�d1d	�d2d�d3d�d4d	��dd	d	d	d	d	ddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d	�d#d	�d$d�d%d	��id&d	�d	d�d'd�d(d	�d)d�dd&�d*d	�d+d�d,d	�d-d	�d.d�d/d	�d0d	�d1d�d2d	�d3d�d4d��dddd	d	d	ddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d	�d#d	�d$d�d%d	��id&d	�d	d�d'd�d(d	�d)d�dd	�d*d	�d+d�d,d	�d-d	�d.d	�d/d	�d0d	�d1d	�d2d�d3d�d4d��d	ddd	d	d	ddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd	�dd�dd�dd�d d�d!d�d"d	�d#d	�d$d	�d%d	��id&d	�d	d�d'd	�d(d	�d)d	�dd&�d*d�d+d	�d,d	�d-d	�d.d	�d/d	�d0d	�d1d	�d2d	�d3d	�d4d	��dd	d	d	d	d	ddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd	�dd�dd�dd�d d�d!d�d"d	�d#d	�d$d	�d%d	��id&d&�d	d	�d'd	�d(d	�d)d�dd	�d*d	�d+d	�d,d	�d-d	�d.d	�d/d	�d0d	�d1d�d2d	�d3d�d4d	��dd	d	d	d	d	ddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d	�d#d	�d$d�d%d	��id&d	�d	d�d'd�d(d�d)d�dd�d*d�d+d	�d,d	�d-d	�d.d	�d/d	�d0d	�d1d	�d2d	�d3d�d4d	��dd	d	d	d	d	ddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d	�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd&�dd�dd�dd&�dd	�dd	�dd&�dd&�dd	�dd�dd�d d	�d!d�d"d	�d#d	�d$d�d%d	��id&d�d	d	�d'd�d(d�d)d�dd	�d*d	�d+d	�d,d	�d-d�d.d	�d/d�d0d	�d1d�d2d	�d3d�d4d��dddd	d	d	ddddddd5���d idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd	�dd	�dd	�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d	�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d!idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd�dd	�dd�dd	�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d	�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d"idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd	�dd	�dd	�dd	�dd	�dd	�dd	�dd	�dd�dd�d d�d!d�d"d	�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d	�d3d&�d4d&��dd&d&d&d&d&ddddddd5���d#idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd	�dd	�dd	�dd	�dd�dd&�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d	�d+d&�d,d&�d-d	�d.d&�d/d&�d0d&�d1d&�d2d&�d3d�d4d&��d	d&d&d&d&d&ddddddd5���d$idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd	�dd�dd�dd�idd	�dd�dd�dd�dd�dd�dd	�dd	�dd�dd�dd	�d d�d!d�d"d	�d#d&�d$d	�d%d&��id&d&�d	d&�d'd&�d(d	�d)d	�dd&�d*d�d+d�d,d&�d-d&�d.d&�d/d&�d0d&�d1d	�d2d&�d3d	�d4d	��dddd&d&d&ddddddd5���d%idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd	�dd	�dd	�dd	�dd�dd	�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd�d(d	�d)d	�dd&�d*d	�d+d	�d,d&�d-d&�d.d&�d/d	�d0d&�d1d	�d2d&�d3d	�d4d&��dd	d&d&d&d&ddddddd5����id&idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd	�dd	�dd	�dd	�dd&�dd	�dd�dd�dd	�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d�d4d&��dd&d&d&d&d&dddddd	d5���d	idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd�dd�dd	�dd	�dd&�dd�dd&�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d&�d4d&��d&d&d&d&d&d&dddddd	d5���d'idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd�dd	�dd	�dd	�dd	�dd�dd�dd	�d d�d!d�d"d&�d#d	�d$d	�d%d	��id&d&�d	d&�d'd	�d(d	�d)d�dd&�d*d�d+d&�d,d&�d-d	�d.d&�d/d	�d0d	�d1d�d2d	�d3d�d4d��dd	d&d&dd	ddddddd5���d(idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd	�dd	�dd	�dd	�dd	�dd	�dd	�dd�dd�d d�d!d�d"d	�d#d&�d$d	�d%d&��id&d&�d	d&�d'd&�d(d	�d)d	�dd&�d*d�d+d	�d,d&�d-d&�d.d&�d/d	�d0d&�d1d&�d2d�d3d	�d4d	��d	d&d&d&d&d&ddddddd5���d)idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd�dd�dd	�dd�dd�dd�dd�d d�d!d�d"d&�d#d&�d$d&�d%d��id&d&�d	d&�d'd	�d(d&�d)d	�dd&�d*d�d+d	�d,d&�d-d	�d.d	�d/d	�d0d&�d1d	�d2d&�d3d	�d4d&��dd	d	d&d	d&ddddddd5���didd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd�dd	�dd	�dd	�dd�dd	�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d&�d4d&��d&d&d&d&d&d&dddddd	d5���d*idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd�dd�dd�dd�dd	�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d+idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd	�dd	�dd	�dd�dd�dd&�d d�d!d�d"d&�d#d&�d$d	�d%d&��id&d&�d	d&�d'd&�d(d&�d)d	�dd&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d	�d3d&�d4d&��dd	d	d&d&d&ddddddd5���d,idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd&�dd�dd�dd	�dd	�dd	�dd	�dd	�dd	�dd�dd	�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d	�d0d&�d1d&�d2d&�d3d	�d4d&��d	d&d&d&d&d&ddddddd5���d-idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddddddd	d5���d.idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd	�dd	�dd	�dd	�dd�dd	�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d	�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d�d4d&��d	d&d&d&d&d&ddddddd5���d/idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddddddd	d5���d0idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd	�dd	�dd	�dd�dd�dd	�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d	�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d	�d4d&��d	d&d&d&d&d&ddddddd5���d1idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd�dd	�dd	�dd�dd�dd	�dd	�d d�d!d�d"d	�d#d&�d$d&�d%d&��id&d&�d	d&�d'd�d(d&�d)d&�dd&�d*d	�d+d&�d,d&�d-d	�d.d&�d/d	�d0d&�d1d	�d2d&�d3d&�d4d&��dd	d&d&dd&ddddddd5���d2idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd	�dd	�dd	�dd	�dd	�dd	�dd	�dd�dd�d d�d!d�d"d	�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d�d)d&�dd&�d*d	�d+d	�d,d&�d-d&�d.d&�d/d	�d0d&�d1d&�d2d	�d3d�d4d	��d	d&d&d&d&d&ddddddd5���d3idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d4idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd�dd	�dd�dd	�dd�dd�dd	�d d�d!d�d"d&�d#d	�d$d&�d%d	��id&d&�d	d&�d'd	�d(d&�d)d&�dd&�d*d	�d+d&�d,d&�d-d	�d.d	�d/d&�d0d&�d1d&�d2d&�d3d	�d4d	��d	d&d&d&d&d&ddddddd5����idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd�dd	�dd	�dd�dd�dd	�d d�d!d�d"d&�d#d&�d$d	�d%d&��id&d&�d	d&�d'd�d(d&�d)d	�dd&�d*d�d+d�d,d&�d-d	�d.d&�d/d	�d0d&�d1d�d2d&�d3d	�d4d&��d	d	d&d&dd&ddddddd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd�dd	�dd	�dd	�dd�dd	�d d�d!d�d"d&�d#d&�d$d	�d%d&��id&d&�d	d&�d'd	�d(d&�d)d&�dd&�d*d�d+d�d,d&�d-d	�d.d&�d/d	�d0d&�d1d&�d2d&�d3d	�d4d&��d	d&d	d&d&d&ddddddd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd	�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd	�dd	�dd	�dd	�dd�dd�d d�d!d�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd&�d(d&�d)d&�dd&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d	�d4d&��d&d&d&d&d&d&dddddd	d5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd	�d d&�d!d	�d"d&�d#d&�d$d&�d%d&��id&d&�d	d&�d'd	�d(d&�d)d&�dd&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d	�d0d&�d1d	�d2d&�d3d	�d4d&��dd	d&d&d&d&ddddddd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd	�dd�dd�dd	�dd	�dd	�dd	�dd	�dd�dd�dd	�d d�d!d�d"d&�d#d&�d$d&�d%d	��id&d&�d	d&�d'd	�d(d&�d)d	�dd&�d*d	�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d	�d2d&�d3d	�d4d&��dd	d&d&d&d&dddddd	d5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d	�dd	�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d	�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddd	dd5��idd�dd�dd�dd�dd�dd�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d	d�d'd�d(d�d)d�dd�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddddddddddd	d5��d5��Zidd6�dd6�d	d6�d&d6�d,d6�d7d6�d.d6�d8d6�d#d6�d"d6�d9d:�d-d6�d0d6�d2d:�d(d6�d+d6�d%d6�id;d6�d4d6�d1d6�d$d6�d<d6�d)d6�d/d6�d'd6�d*d6�d3d6�d=d6�dd6�dd6�dd6�dd6�d>d?�dd?��idd?�dd?�dd?�dd?�d d?�dd?�d@d?�dd?�dd?�d
d?�dd?�d!d?�dAd?�dBd?�ddC�ddC�ddC��iddC�dDdC�ddC�d
dC�ddC�ddC�ddC�dEd?�dd?�dd?�dd?�dd?�dd?�dFd?�dGdH�dIdJ�dKdL��idMdN�dHdO�dPdQ�dRdS�dTdU�dVdM�dWdX�dYdZ�d[d\�d]dV�d^d_�dLd`�dNd^�dadb�d\dc�dddR�dedK��id`df�dcdg�dhde�didj�dQdk�dUdl�dJd?�dOd?�dmd?�dnd?�d_d?�dod?�dSd�dpdW�dqd�drd�dsd��idfd[�dkdP�dtdF�dud�dvdu�dgdm�dwd�dxdG�dyd
�dXd�dZdI�dzdy�djd�dld
�d{d�d|d�d}da��id~d]�ddp�dbdY�d�dw�d�d?�d�d?�d�d?�d�d?�d�d?�d�d��d�d��d�d��d�d��d�d��d�d@�d�dE�d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dd�d�dD�d�dB�d�dA�d�dT�d�d>�d�dn�d�d���id�dz�d�d��d�dx�d�d��d�d��d�d��d�d��d�d�d�d{�d�d��d�d}�d�dr�d�d��d�dÓd�d|�d�d~�d�dt��id�d��d�dɓd�d˓d�dh�d�dq�d�dϓd�dv�d�d��d�d��d�dԓd�d�d�dדd�dٓd�ds�d�dܓd�dޓd�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�di�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d��d�d�d�d�d�d �d�d!�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d��d�d�d"�d�d#�d�d$�d�d%�d�d&�d�d	�d�d'�d�d(�d�d)�d�d�d�d*�d�d+�d�d,�d�d-��id�d.�d�d/�d�d0�d�d1�d�d2�d�d3�d�d4�d�d=�d�d<�d�d;�d�d8�d�d9��dd7��d�d�dCdC�d?d��d:do��d6d?i�Ze�d�dee�d�d�d���Z�y(	�)�SingleByteCharSetModel�2�<��=�*�5�8��6�1�3�+�,�?�"�7�0�'�9��;�)�!�%�$���#�>��&�-�	����������������
��)�����
�� �4�/�.�:�(�r<r:r;�r9r8r7r=�rBr@r?�r>rA�@�A�E�B�[�C�O�D�P�\�F�Y�G�a�H�Z�I�J�o�K�p�L�R�M�N�_�U�Q�y�V�S�T�f�k�W�X�r�g�s�]�^�`�b�c�d�e�h�i�j�l�m�n�q�t�u�v�w�x�z�{�|�}�~��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zwindows-1255�HebrewgC��|�?Fu<אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ)�charset_name�language�char_to_order_map�language_model�typical_positive_ratio�keep_ascii_letters�alphabetN)�#pip._vendor.chardet.sbcharsetproberr�HEBREW_LANG_MODEL�!WINDOWS_1255_HEBREW_CHAR_TO_ORDER�WINDOWS_1255_HEBREW_MODEL����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/langhebrewmodel.py�<module>rs����F�@@��@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�@@�D�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�E@@�F�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�G@@�H�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�I@@�J�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�K@@�L
�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�M
@@�N�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�O@@�P�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�Q@@�R�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�S@@�T�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�U@@�V�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�W@@�X�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�Y@@�Z�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�[@@�\�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�]@@�^�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�_@@�`�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�a@@�b �@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�c @@�d"�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�e"@@�f$�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�g$@@�h&�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�i&@@�j(�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�k(@@�l*�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�m*@@�n,�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�o,@@�p.�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�q.@@�r0�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�s0@@�t2�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�u2@@�v4�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�w4@@�x6�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�y6@@�z8�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�{8@@�|:�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�}:@@�~<�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�<@@�@?�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�A?@@�BA�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�CA@@�DC�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�EC@@�FE�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�GE@@�HG�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�IG@@�JI�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�KI@@�LK�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�MK@@�NM�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�OM@@�PO�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�QO@@�RQ�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�SQ@@�TS�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�US@@�VU�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�WU@@�XW�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�YW@@�ZY�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�[Y@@�\[�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�][@@�^]�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�_]@@�`_�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�a_@@�ba�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�ca@@�dc�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�ec@@�fe�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�ge@@�hg@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	
�1�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	
�1�G@�H	
�1�I@�J	�A�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
��
��
�
�
�
�
�
�@�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	
�1�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	
�1�G@	�H	
�1�I@	�J	�A�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
��
��
�
�
�
�
�
�@	�}@@��R@A%��s�A%��s�A%��s�A%��s�	A%�
�s�A%��s�
A%��s�A%��s�A%��s�A%��s�A%���A%���A%���A%���A%���A%� ��!A%�"��#A%�$��%A%�&��'A%�(��)A%�*��+A%�,��-A%�.��/A%�0��1A%�2��3A%�4��5A%�6��7A%�8��9A%�:��;A%�<��=A%�>��?A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�!�F3��
�7�$�#��
K��rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/mbcssm.cpython-312.pyc000064400000113445151732703220023160 0ustar00�

R`i�v��3�UddlmZddlmZdZej
ejejdej
ej
ej
ej
ej
ej
ejejejejejej
ej
ejejejejejejejfZdZ	edee	dd�Z
eed	<d
Zgej
�ej�d�ej
�ej�ej�d�d�ej
�d�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej
�ej
�ej�ej�ej
�ej
�ej
�ej�ej�ej�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej�ej
�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej
�ej�ej�ej�ej�ej
�ej
�ej�ej�ej��Z
d
Zede
edd�Zeed<dZgd�d�d�d�ej�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej
�ej�ej
�ej
�ej
�ej
�ej
�ej�ej
�ej
�ej
�d�ej
�d�ej
�ej
�ej
�ej�ej�ej�ej��ZdZedeedd�Zeed<dZej
ejdej
ej
ej
ej
ej
ejejejejej
ej
ejejfZdZedeedd�Zeed<dZgej
�ej�ej�ej�ej�ej
�ej
�d�d�d�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej
�ej
�ej�ej�ej�ej�ej�ej
�ej�ej
�ej�ej
�ej�ej
�ej�ej
�ej��ZdZedeedd�Zeed<dZgej
�ej
�ej�d�d�d�d�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej
�ej�ej
�ej�ej�ej�ej
�ej
�ej
�ej
�ej
�d�ej
�ej
�ej
�ej�ej
�ej�ej�ej�ej
�ej�ej�ej�ej�ej�ej��ZdZedeed d�Zeed!<d"Z gej
�ej�ej�ej�ej�ej�d�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej
�ej
�ej�d�ej
�ej�ej�ej
�ej
�ej
�ej
�ej
�ej
�d�ej
�ej
�ej
�ej�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej��Z!d#Z"e de!e"d$d�Z#eed%<d&Z$ej
ejejdej
ej
ej
ej
ej
ej
ej
ej
ejejejejejejej
ej
ejejejejfZ%d'Z&e$de%e&d(d�Z'eed)<d*Z(gd�d�d�ej
�d�d�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�d�d�d�d�ej
�ej
�d�d�d�d�d�ej�d�d�d�d�d�d�d�d�d�ej
�d�d+�d�d�ej
�d�d�d�d�d�d�d�ej
�ej
�ej�ej��Z)d,Z*e(de)e*d-d�Z+eed.<d*Z,gd�d�d�d�d�d�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�d�d�d�ej
�ej�ej
�d�d�d�ej
�d�ej
�d�d�d�d�d+�d+�d�d�d�ej
�d�d�d�ej
�ej
�ej
�d�d�d�d�d�ej
�d�ej
�ej�ej��Z-d/Z.e,de-e.d0d�Z/eed1<d2Z0gej
�ej�ej
�ej
�ej
�ej
�d3�d�d4�d5�d+�d�d�d�d�d�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej
�ej
�d�d�d�d�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�d�d�d�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�d�d�d�d�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�d�d�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�d4�d4�d4�d4�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�d4�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�d3�d3�d3�d3�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�d3�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�d3�d3�d3�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej
��Z1d6Z2e0d7e1e2d8d�Z3eed9<y:);�)�CodingStateMachineDict)�MachineState(rrrrrrrrrrrrrr�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrr��Big5)�class_table�class_factor�state_table�char_len_table�name�
BIG5_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	r	r	r	r	r	rrrrrrr	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	rrrrrr�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�rrrrrrrrrrr�rrrrrrrrrrrrrrrrrrrrrrrr�	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)
rrrrrrrrrr�
�CP949�CP949_SM_MODEL(rrrrrrrrrrrrrrr	r	rrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	r	r	r	r	r	r	r	r	r	r	rrr	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	)rrrrrrzEUC-JP�EUCJP_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrzEUC-KR�EUCKR_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	r	rrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	r	r)
rrrrrrrrrr�Johab�JOHAB_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrrrrrzx-euc-tw�EUCTW_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrrrr�GB2312�GB2312_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrrr�	Shift_JIS�
SJIS_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r)rrrrrrzUTF-16BE�UCS2BE_SM_MODEL)rrrrrrzUTF-16LE�UCS2LE_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�r#r#r#r#r#r#��
r%r%��rrr$rr#)rrrrrrrrrrrrr	r	rr�zUTF-8�
UTF8_SM_MODELN)4�codingstatemachinedictr�enumsr�BIG5_CLS�ERROR�START�ITS_ME�BIG5_ST�BIG5_CHAR_LEN_TABLEr�__annotations__�	CP949_CLS�CP949_ST�CP949_CHAR_LEN_TABLEr�	EUCJP_CLS�EUCJP_ST�EUCJP_CHAR_LEN_TABLEr�	EUCKR_CLS�EUCKR_ST�EUCKR_CHAR_LEN_TABLEr�	JOHAB_CLS�JOHAB_ST�JOHAB_CHAR_LEN_TABLEr�	EUCTW_CLS�EUCTW_ST�EUCTW_CHAR_LEN_TABLEr�
GB2312_CLS�	GB2312_ST�GB2312_CHAR_LEN_TABLEr�SJIS_CLS�SJIS_ST�SJIS_CHAR_LEN_TABLEr �
UCS2BE_CLS�	UCS2BE_ST�UCS2BE_CHAR_LEN_TABLEr!�
UCS2LE_CLS�	UCS2LE_ST�UCS2LE_CHAR_LEN_TABLEr"�UTF8_CLS�UTF8_ST�UTF8_CHAR_LEN_TABLEr)����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/mbcssm.py�<module>rTs�*��8;��
!��H���|�)�)�,�*<�*<�!�L�DV�DV�Wc�Wi�Wi�jv�j|�j|�~J�~P�~P����|�)�)�,�*=�*=�l�>Q�>Q�R^�Re�Re�fr�fy�fy�{G�{N�{N�O[�Oa�Oa����|�)�)�,�*<�*<�\�=O�=O�P\�Pb�Pb�co�cu�cu�wC�wI�wI�JV�J\�J\���&�����)��)�
�%���	�&	����	�#�)�)�	�/0�	�1=�1C�1C�	�DP�DV�DV�	�Wc�Wi�Wi�	�op�	�vw�	�yE�yK�yK�	�QR�	����	�$�)�)�	�+7�*<�*<�	�>J�=O�=O�	�Q]�Pb�Pb�	�dp�cu�cu�	�wC�wI�wI�	�JV�J\�J\�	�]i�]o�]o�	�p|�pB�pB�	����		�%�+�+�		�-9�,?�,?�		�AM�@S�@S�		�Ua�Tg�Tg�		�iu�h{�h{�		�}I�}P�}P�		�Q]�Qd�Qd�		�eq�ex�ex�		�yE�yL�yL�		�
���	�
$�)�)�	�
+7�*<�*<�	�
>J�=O�=O�	�
Q]�Pb�Pb�	�
dp�cu�cu�	�
wC�wI�wI�	�
JV�J\�J\�	�
]i�]o�]o�	�
p|�pB�pB�	����
	�$�)�)�
	�+7�*<�*<�
	�>J�=O�=O�
	�Q]�Pb�Pb�
	�dp�cu�cu�
	�wC�wI�wI�
	�JV�J\�J\�
	�]i�]o�]o�
	�p|�pB�pB�
	����	�$�)�)�	�+7�*<�*<�	�>J�=O�=O�	�Q]�Pb�Pb�	�dp�cu�cu�	�wC�wI�wI�	�JV�J\�J\�	�]i�]o�]o�	�p|�pB�pB�	����	�$�)�)�	�+7�*<�*<�	�>J�=O�=O�	�Q]�Pb�Pb�	�dp�cu�cu�	�wC�wI�wI�	�JV�J\�J\�	�]i�]o�]o�	�p|�pB�pB�	��6�����*��*��&��!
�	�F�
������ ��!-�!3�!3��4@�4F�4F��GS�GY�GY��Zf�Zl�Zl������$�*�*��+7�+=�+=��>J�>P�>P��Q]�Qd�Qd��eq�ex�ex��zF�zM�zM��NZ�Na�Na������&�,�,��.:�-?�-?��AM�@R�@R��T`�Se�Se��gs�fx�fx��zF�zL�zL��MY�M_�M_�����	�%�*�*�	�,8�+=�+=�	�?K�>P�>P�	�R^�Qc�Qc�	�eq�dv�dv�	�}~�	�K�Q�Q�	�
��

����
 ,�1�1��
3?�2D�2D��
FR�EW�EW��
Ye�Xj�Xj��
lx�k}�k}��
K�Q�Q���*�����*��*��&��!�	�H���|�)�)�q��1C�1C�L�DV�DV�Wc�Wi�Wi�jv�j|�j|�~J�~P�~P�����+�+�L�,?�,?��@S�@S�T`�Tf�Tf�gs�gy�gy�{G�{M�{M�NZ�N`�N`���$�����*��*��&��!
�	�F�����$�*�*��,8�,>�,>��@L�@R�@R��T`�Tf�Tf��ht�hz�hz��}I�}O�}O��QR��ef��yz������%�+�+��-9�,?�,?��AM�@S�@S��Ua�Tg�Tg��iu�h{�h{��}I�}P�}P��Q]�Qd�Qd��eq�ex�ex��yE�yL�yL�����	�%�*�*�	�-9�,>�,>�	�AM�@R�@R�	�Ua�Tf�Tf�	�iu�hz�hz�	�}I�}O�}O�	�Q]�Qc�Qc�	�eq�ew�ew�	�yE�yK�yK�	�
����
%�*�*��
-9�,>�,>��
AM�@R�@R��
Ua�Tf�Tf��
iu�hz�hz��
}I�}O�}O��
Q]�Qc�Qc��
eq�ew�ew��
yE�yK�yK�����
�%�*�*�
�-9�,>�,>�
�AM�@R�@R�
�Ua�Tf�Tf�
�iu�hz�hz�
�}I�}O�}O�
�Q]�Qc�Qc�
�eq�ew�ew�
�yE�yK�yK�
��6�����*��*��&��!
�	�F�����#�)�)��*6�*<�*<��BC��IJ��PQ��WX��Ye�Yk�Yk������#�)�)��*6�*<�*<��=I�=O�=O��P\�Pb�Pb��co�cu�cu��wC�wJ�wJ��KW�K^�K^������%�+�+��-9�,?�,?��AM�@S�@S��Ua�Tg�Tg��iu�hz�hz��|H�|N�|N��O[�Oa�Oa�����	�$�)�)�	�+7�*<�*<�	�>J�=O�=O�	�Q]�Pb�Pb�	�dp�cu�cu�	�wC�wI�wI�	�JV�J\�J\�	�

��
����
+�0�0��
2>�1C�1C��
EQ�DV�DV��
Xd�Wi�Wi��
kw�j|�j|��
~J�~P�~P�����
�$�)�)�
�+7�*<�*<�
�>J�=O�=O�
�Q]�Pb�Pb�
�dp�cu�cu�
�wC�wI�wI�
�JV�J\�J\�
��-�����*��*��&��!�
�F
����
�#�)�)�
�*6�*<�*<�
�=I�=O�=O�
�P\�Pb�Pb�
�co�cu�cu�
�{|�
�~J�~P�~P�
����
�#�)�)�
�*6�*<�*<�
�=I�=O�=O�
�P\�Pb�Pb�
�co�cu�cu�
�wC�wJ�wJ�
�KW�K^�K^�
����
�%�+�+�
�-9�,?�,?�
�AM�@S�@S�
�Ua�Tg�Tg�
�iu�hz�hz�
�|H�|N�|N�
�O[�Oa�Oa�
�
�	
����	
�+�0�0�	
�2>�1C�1C�	
�EQ�DV�DV�	
�Xd�Wi�Wi�	
�kw�j|�j|�	
�~J�~P�~P�	
�
���
�
$�)�)�
�
01�
�
2>�1C�1C�
�
EQ�DV�DV�
�
Xd�Wi�Wi�
�
kw�j}�j}�
�
K�Q�Q�
����

�$�)�)�

�+7�*<�*<�

�>J�=O�=O�

�Q]�Pb�Pb�

�dp�cu�cu�

�wC�wI�wI�

�JV�J\�J\�

�	�.�����+��+��'��#��L���|�)�)�,�*<�*<�!�L�DV�DV�Wc�Wi�Wi�jv�j|�j|�~J�~P�~P����|�)�)�,�*<�*<�\�=O�=O�P\�Pc�Pc�dp�dw�dw�yE�yL�yL�MY�M`�M`�����+�+�L�,>�,>�|�?Q�?Q�R^�Rd�Rd�eq�ew�ew�yE�yK�yK�LX�L^�L^���)�����)��)�
�%��!�
�F�
������&�,�,��23��9:��;G�;M�;M��NZ�N`�N`������$�*�*��+7�+=�+=��>J�>P�>P��Q]�Qd�Qd��eq�ex�ex��zF�zM�zM��NZ�Na�Na������&�,�,��34��:;��AB��HI��JV�I[�I[��]i�\n�\n���	��	��	� !�	�'(�	�)5�(;�(;�	�BC�	�IJ�	�
��
��
��
 !��
'(��
./��
56��
7C�6H�6H���
��
��
� !�
�".�!3�!3�
�:;�
�AB�
�HI�
������� !��".�!3�!3��5A�4F�4F��HT�GY�GY��[g�Zl�Zl��	�+�����+��+��'��!�
�F
�
�
��
��
� �
�&'�
�-.�
�/;�/A�/A�
�BN�BT�BT�
����
�$�*�*�
�+7�+=�+=�
�>J�>P�>P�
�Q]�Qd�Qd�
�eq�ex�ex�
�zF�zM�zM�
�NZ�Na�Na�
����
�&�,�,�
�34�
�:;�
�AB�
�CO�BT�BT�
�Vb�Uh�Uh�
�jv�i{�i{�
��	
��	
��	
�'�,�,�	
�34�	
�5A�4F�4F�	
�MN�	
�TU�	
�
�
�
�
�
�
�
 !�
�
'(�
�
./�
�
56�
�
7C�6H�6H�
��

��

��

�'�,�,�

�.:�-?�-?�

�AM�@R�@R�

�YZ�

�`a�

��
��
��
�'�,�,�
�34�
�5A�4F�4F�
�HT�GY�GY�
�[g�Zl�Zl�
�	�+�����+��+��'��!��F�����#�)�)��*6�*<�*<��=I�=O�=O��P\�Pb�Pb��co�cu�cu��{}��BD��	
������ ��&'��-.��45��:;������$�)�)��+7�*<�*<��>J�=O�=O��Q]�Pb�Pb��dp�cu�cu��wC�wI�wI��JV�J\�J\�����	�$�)�)�	�+7�*<�*<�	�>J�=O�=O�	�Q]�Pb�Pb�	�dp�cu�cu�	�wC�wI�wI�	�JV�J\�J\�	�
����
%�+�+��
-9�,?�,?��
AM�@S�@S��
Ua�Tg�Tg��
iu�h{�h{��
}I�}P�}P��
Q]�Qd�Qd�����
�%�+�+�
�-9�,?�,?�
�AM�@S�@S�
�Ua�Tg�Tg�
�iu�h{�h{�
�}I�}P�}P�
�Q]�Qd�Qd�
�����$�)�)��01��78��>?��EF��GS�FX�FX��Zf�Yk�Yk������$�)�)��+7�*<�*<��>J�=O�=O��Q]�Pb�Pb��dp�cu�cu��wC�wI�wI��JV�J\�J\������$�)�)��+7�*<�*<��CD��JK��QR��S_�Rd�Rd��fr�ew�ew������$�)�)��+7�*<�*<��>J�=O�=O��Q]�Pb�Pb��dp�cu�cu��wC�wI�wI��JV�J\�J\������$�)�)��01��78��>?��EF��GS�FX�FX��Zf�Yk�Yk������$�)�)��+7�*<�*<��>J�=O�=O��Q]�Pb�Pb��dp�cu�cu��wC�wI�wI��JV�J\�J\������$�)�)��+7�*<�*<��>J�=O�=O��VW��]^��_k�^p�^p��r~�rD�rD������$�)�)��+7�*<�*<��>J�=O�=O��Q]�Pb�Pb��dp�cu�cu��wC�wI�wI��JV�J\�J\������$�)�)��01��78��>?��EF��GS�FX�FX��Zf�Yk�Yk�� ���!� $�)�)�!� +7�*<�*<�!� >J�=O�=O�!� Q]�Pb�Pb�!� dp�cu�cu�!� wC�wI�wI�!� JV�J\�J\�!�"���#�"$�)�)�#�"+7�*<�*<�#�">J�=O�=O�#�"Q]�Pb�Pb�#�"ij�#�"kw�j|�j|�#�"~J�~P�~P�#�$���%�$$�)�)�%�$+7�*<�*<�%�$>J�=O�=O�%�$Q]�Pb�Pb�%�$dp�cu�cu�%�$wC�wI�wI�%�$JV�J\�J\�%�&���'�&$�)�)�'�&/1�'�&68�'�&=?�'�&DF�'�&GS�FX�FX�'�&Zf�Yk�Yk�'�(���)�($�)�)�)�(+7�*<�*<�)�(>J�=O�=O�)�(Q]�Pb�Pb�)�(dp�cu�cu�)�(wC�wI�wI�)�(JV�J\�J\�)�*���+�*$�)�)�+�*+7�*<�*<�+�*>J�=O�=O�+�*Q]�Pb�Pb�+�*hj�+�*kw�j|�j|�+�*~J�~P�~P�+�,���-�,$�)�)�-�,+7�*<�*<�-�,>J�=O�=O�-�,Q]�Pb�Pb�-�,dp�cu�cu�-�,wC�wI�wI�-�,JV�J\�J\�-�.���/�.$�)�)�/�./1�/�.68�/�.=?�/�.@L�?Q�?Q�/�.S_�Rd�Rd�/�.fr�ew�ew�/�0���1�0$�)�)�1�0+7�*<�*<�1�0>J�=O�=O�1�0Q]�Pb�Pb�1�0dp�cu�cu�1�0wC�wI�wI�1�0JV�J\�J\�1�2���3�2$�)�)�3�2+7�*<�*<�3�2>J�=O�=O�3�2Q]�Pb�Pb�3�2dp�cu�cu�3�2wC�wI�wI�3�2JV�J\�J\�3�4���5�4$�)�)�5�4+7�*<�*<�5�4>J�=O�=O�5�4Q]�Pb�Pb�5�4dp�cu�cu�5�4wC�wI�wI�5�4JV�J\�J\�5��<G�����)��)�
�%�rRpython3.12/site-packages/pip/_vendor/chardet/__pycache__/eucjpprober.cpython-312.pyc000064400000010510151732703220024201 0ustar00�

R`i^��r�ddlmZddlmZddlmZddlmZmZddl	m
Z
ddlmZddl
mZGd	�d
e�Zy)�)�Union�)�EUCJPDistributionAnalysis)�CodingStateMachine)�MachineState�ProbingState)�EUCJPContextAnalysis)�MultiByteCharSetProber)�EUCJP_SM_MODELc�~��eZdZd	�fd�Zd	�fd�Zedefd��Zedefd��Zde	e
efdefd�Z
defd�Z�xZS)
�EUCJPProber�returnc���t�|��tt�|_t�|_t�|_|j�y�N)
�super�__init__rr�	coding_smr�distribution_analyzerr	�context_analyzer�reset��self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/eucjpprober.pyrzEUCJPProber.__init__'s9���
����+�N�;���%>�%@��"� 4� 6����
�
��c�V��t�|��|jj�yr)rrrrs �rrzEUCJPProber.reset.s���
��
�����#�#�%rc��y)NzEUC-JP��rs r�charset_namezEUCJPProber.charset_name2s��rc��y)N�Japaneserrs r�languagezEUCJPProber.language6s��r�byte_strc�j�|j�J�|j�J�t|�D�]�\}}|jj|�}|tj
k(rJ|jjd|j|j|�tj|_�n|tjk(rtj|_n�|tjk(s��|jj!�}|dk(r]||j"d<|j$j'|j"|�|jj'|j"|���9|j$j'||dz
|dz|�|jj'||dz
|dz|����|d|j"d<|j(tj*k(rL|j$j-�r2|j/�|j0kDrtj|_|j(S)Nz!%s %s prober hit error at byte %srr���)rr�	enumerate�
next_stater�ERROR�logger�debugr r#r�NOT_ME�_state�ITS_ME�FOUND_IT�START�get_current_charlen�
_last_charr�feed�state�	DETECTING�got_enough_data�get_confidence�SHORTCUT_THRESHOLD)rr$�i�byte�coding_state�char_lens      rr3zEUCJPProber.feed:s����~�~�)�)�)��)�)�5�5�5� ��*�G�A�t��>�>�4�4�T�:�L��|�1�1�1����!�!�7��%�%��M�M��	�+�1�1�����|�2�2�2�*�3�3�����|�1�1�1��>�>�=�=�?����6�)-�D�O�O�A�&��)�)�.�.�t����I��.�.�3�3�D�O�O�X�N��)�)�.�.�x��A���A��/F��Q��.�.�3�3�H�Q��U�Q��U�4K�X�V�/+�2&�b�\�������:�:��/�/�/��$�$�4�4�6��#�#�%��(?�(?�?�*�3�3����z�z�rc��|j�J�|jj�}|jj�}t||�Sr)rrr7�max)r�context_conf�distrib_confs   rr7zEUCJPProber.get_confidenceasI���)�)�5�5�5��,�,�;�;�=���1�1�@�@�B���<��.�.r)rN)�__name__�
__module__�__qualname__rr�property�strr r#r�bytes�	bytearrayrr3�floatr7�
__classcell__)rs@rr
r
&sm����&���c������#����%�U�5�)�#3�4�%��%�N/��/rr
N)�typingr�chardistributionr�codingstatemachiner�enumsrr�jpcntxr	�mbcharsetproberr
�mbcssmrr
rrr�<module>rQs+��8�7�2�-�(�3�"�@/�(�@/rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/__init__.cpython-312.pyc000064400000010775151732703220023435 0ustar00�

R`i��
��ddlmZmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZmZgd	�Z	dd
eeefdede
fd
�Z		dd
eeefdededee
fd�Zy)�)�List�Union�)�CharSetGroupProber)�
CharSetProber)�
InputState)�
ResultDict)�UniversalDetector)�VERSION�__version__)r
�detect�
detect_allrr�byte_str�should_rename_legacy�returnc���t|t�s2t|t�stdt	|�����t|�}t|��}|j
|�|j�S)aV
    Detect the encoding of the given byte string.

    :param byte_str:     The byte sequence to examine.
    :type byte_str:      ``bytes`` or ``bytearray``
    :param should_rename_legacy:  Should we rename legacy encodings
                                  to their more modern equivalents?
    :type should_rename_legacy:   ``bool``
    �1Expected object of type bytes or bytearray, got: �r)�
isinstance�	bytearray�bytes�	TypeError�typer
�feed�close)rr�detectors   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/__init__.pyr
r
sd���h�	�*��(�E�*��C�D��N�CS�T��
��X�&�� �6J�K�H��M�M�(���>�>����ignore_thresholdc���t|t�s2t|t�stdt	|�����t|�}t|��}|j
|�|j�|jtjk(�rNg}g}|jD]F}t|t�r#|jd�|jD���6|j|��H|D]�}|s|j!�|j"kDs�#|j$xsd}|j'�}|j)d�r(|j*r|j,j/||�}|r*|j0j/|j'�|�}|j||j!�|j2d����t5|�dkDrt7|d��	�S|j8gS)
aD
    Detect all the possible encodings of the given byte string.

    :param byte_str:          The byte sequence to examine.
    :type byte_str:           ``bytes`` or ``bytearray``
    :param ignore_threshold:  Include encodings that are below
                              ``UniversalDetector.MINIMUM_THRESHOLD``
                              in results.
    :type ignore_threshold:   ``bool``
    :param should_rename_legacy:  Should we rename legacy encodings
                                  to their more modern equivalents?
    :type should_rename_legacy:   ``bool``
    rrc3� K�|]}|���y�w)N�)�.0�ps  r�	<genexpr>zdetect_all.<locals>.<genexpr>Ws����9�.�Q�q�.�s��ziso-8859)�encoding�
confidence�languagerc��|dS)Nr(r")�results r�<lambda>zdetect_all.<locals>.<lambda>qs��v�l�7K�6Kr)�key)rrrrrr
rr�input_stater�	HIGH_BYTE�charset_probersr�extend�probers�append�get_confidence�MINIMUM_THRESHOLD�charset_name�lower�
startswith�
has_win_bytes�ISO_WIN_MAP�get�
LEGACY_MAPr)�len�sortedr+)	rrrr�resultsr2�proberr6�lower_charset_names	         rrr5s���$�h�	�*��(�E�*��C�D��N�CS�T��
��X�&�� �6J�K�H��M�M�(���N�N�����z�3�3�3�$&��')���.�.�F��&�"4�5����9�&�.�.�9�9����v�&�	/�
�F��6�#8�#8�#:�X�=W�=W�#W�%�2�2�8�b��%1�%7�%7�%9�"�&�0�0��<��AW�AW�#+�#7�#7�#;�#;�*�L�$�L�(�#+�#6�#6�#:�#:�$�*�*�,�l�$�L����$0�&,�&;�&;�&=�$*�O�O����,�w�<�!���'�'K�L�L��O�O��rN)F)FF)�typingrr�charsetgroupproberr�
charsetproberr�enumsr�
resultdictr	�universaldetectorr
�versionrr�__all__rr�boolr
rr"rr�<module>rKs���$�2�(��"�0�)�
Q��EJ���E�9�$�%��=A����2#�!&�>��E�9�$�%�>��>��>�
�*��	>rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/gb2312prober.cpython-312.pyc000064400000002653151732703220024004 0ustar00�

R`i���J�ddlmZddlmZddlmZddlmZGd�de�Zy)�)�GB2312DistributionAnalysis)�CodingStateMachine)�MultiByteCharSetProber)�GB2312_SM_MODELc�L��eZdZd�fd�Zedefd��Zedefd��Z�xZS)�GB2312Prober�returnc���t�|��tt�|_t�|_|j�y)N)�super�__init__rr�	coding_smr�distribution_analyzer�reset)�self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/gb2312prober.pyrzGB2312Prober.__init__#s.���
����+�O�<���%?�%A��"��
�
��c��y)N�GB2312��rs r�charset_namezGB2312Prober.charset_name)s��rc��y)N�Chineserrs r�languagezGB2312Prober.language-s��r)r	N)	�__name__�
__module__�__qualname__r�property�strrr�
__classcell__)rs@rrr"s>������c������#���rrN)	�chardistributionr�codingstatemachiner�mbcharsetproberr�mbcssmrrrrr�<module>r&s ��89�2�3�#�
�)�
rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/chardistribution.cpython-312.pyc000064400000022726151732703230025253 0ustar00�

R`i0'��2�ddlmZmZddlmZmZmZddlmZm	Z	m
Z
ddlmZm
Z
mZddlmZmZmZddlmZmZmZddlmZGd	�d
�ZGd�de�ZGd
�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Z y)�)�Tuple�Union�)�BIG5_CHAR_TO_FREQ_ORDER�BIG5_TABLE_SIZE�BIG5_TYPICAL_DISTRIBUTION_RATIO)�EUCKR_CHAR_TO_FREQ_ORDER�EUCKR_TABLE_SIZE� EUCKR_TYPICAL_DISTRIBUTION_RATIO)�EUCTW_CHAR_TO_FREQ_ORDER�EUCTW_TABLE_SIZE� EUCTW_TYPICAL_DISTRIBUTION_RATIO)�GB2312_CHAR_TO_FREQ_ORDER�GB2312_TABLE_SIZE�!GB2312_TYPICAL_DISTRIBUTION_RATIO)�JIS_CHAR_TO_FREQ_ORDER�JIS_TABLE_SIZE�JIS_TYPICAL_DISTRIBUTION_RATIO)�JOHAB_TO_EUCKR_ORDER_TABLEc�|�eZdZdZdZdZdZdd�Zdd�Zd	e	e
efd
eddfd�Z
defd�Zdefd
�Zde	e
efdefd�Zy)�CharDistributionAnalysisig�G�z��?g{�G�z�?��returnNc��t�|_d|_d|_d|_d|_d|_|j�y)NrgF)�tuple�_char_to_freq_order�_table_size�typical_distribution_ratio�_done�_total_chars�_freq_chars�reset��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/chardistribution.py�__init__z!CharDistributionAnalysis.__init__@s@��5:�G�� ����
+.��'���
��������
�
��c�.�d|_d|_d|_y)zreset analyser, clear any stateFrN)rr r!r#s r%r"zCharDistributionAnalysis.resetOs����
������r'�char�char_lenc���|dk(r|j|�}nd}|dk\rN|xjdz
c_||jkr)d|j|kDr|xjdz
c_yyyy)z"feed a character with known length����rriN)�	get_orderr rrr!)r$r)r*�orders    r%�feedzCharDistributionAnalysis.feedXsu���q�=��N�N�4�(�E��E��A�:�����"���t�'�'�'���1�1�%�8�8��$�$��)�$�9�(�r'c�<�|jdks|j|jkr|jS|j|jk7rD|j|j|jz
|jzz}||j
kr|S|j
S)z(return confidence based on existing datar)r r!�MINIMUM_DATA_THRESHOLD�SURE_NOr�SURE_YES)r$�rs  r%�get_confidencez'CharDistributionAnalysis.get_confidencefs�������!�T�%5�%5��9T�9T�%T��<�<������ 0� 0�0�� � ��"�"�T�%5�%5�5��9X�9X�X��A��4�=�=� ����}�}�r'c�4�|j|jkDS�N)r �ENOUGH_DATA_THRESHOLDr#s r%�got_enough_dataz(CharDistributionAnalysis.got_enough_dataws��� � �4�#=�#=�=�=r'�_c��y)Nr-�)r$r;s  r%r.z"CharDistributionAnalysis.get_order|s��
r'�rN)�__name__�
__module__�__qualname__r9r4r3r2r&r"r�bytes�	bytearray�intr0�floatr6�boolr:r.r=r'r%rr:s{�� ���H��G���
��*��u�i�/�0�*�C�*�D�*����">��>�
�5��	�!1�2��s�r'rc�:��eZdZd�fd�Zdeeefdefd�Z�xZ	S)�EUCTWDistributionAnalysisrc�d��t�|��t|_t|_t|_yr8)�superr&rrr
rrr�r$�	__class__s �r%r&z"EUCTWDistributionAnalysis.__init__��&���
����#;�� �+���*J��'r'�byte_strc�:�|d}|dk\rd|dz
z|dzdz
Sy)Nr���^r�r-r=�r$rN�
first_chars   r%r.z#EUCTWDistributionAnalysis.get_order��6��
�a�[�
������d�*�+�h�q�k�9�D�@�@�r'r>�
r?r@rAr&rrBrCrDr.�
__classcell__�rLs@r%rHrH��&���K��%��y�(8�"9��c�r'rHc�:��eZdZd�fd�Zdeeefdefd�Z�xZ	S)�EUCKRDistributionAnalysisrc�d��t�|��t|_t|_t|_yr8�rJr&r	rr
rrrrKs �r%r&z"EUCKRDistributionAnalysis.__init__�rMr'rNc�:�|d}|dk\rd|dz
z|dzdz
Sy)Nr�rQrrRr-r=rSs   r%r.z#EUCKRDistributionAnalysis.get_order�rUr'r>rVrXs@r%r[r[�rYr'r[c�:��eZdZd�fd�Zdeeefdefd�Z�xZ	S)�JOHABDistributionAnalysisrc�d��t�|��t|_t|_t|_yr8r]rKs �r%r&z"JOHABDistributionAnalysis.__init__�rMr'rNc�l�|d}d|cxkrdkr$ny|dz|dz}tj|d�Sy)Nr����rr-)r�get)r$rNrT�codes    r%r.z#JOHABDistributionAnalysis.get_order�sH���a�[�
��:�$��$����#�h�q�k�1�D�-�1�1�$��;�;�r'r>rVrXs@r%rara�s&���K��%��y�(8�"9��c�r'rac�:��eZdZd�fd�Zdeeefdefd�Z�xZ	S)�GB2312DistributionAnalysisrc�d��t�|��t|_t|_t|_yr8)rJr&rrrrrrrKs �r%r&z#GB2312DistributionAnalysis.__init__�s&���
����#<�� �,���*K��'r'rNc�H�|d|d}}|dk\r|dk\rd|dz
z|zdz
Sy)Nrrr_rRrQr-r=�r$rNrT�second_chars    r%r.z$GB2312DistributionAnalysis.get_order�sA��
#+�1�+�x��{�K�
��$��[�D�%8���d�*�+�k�9�D�@�@�r'r>rVrXs@r%rjrj�s&���L��%��y�(8�"9��c�r'rjc�:��eZdZd�fd�Zdeeefdefd�Z�xZ	S)�Big5DistributionAnalysisrc�d��t�|��t|_t|_t|_yr8)rJr&rrrrrrrKs �r%r&z!Big5DistributionAnalysis.__init__�s&���
����#:�� �*���*I��'r'rNc�j�|d|d}}|dk\r$|dk\rd|dz
z|zdz
dzSd|dz
z|zdz
Sy)	Nrr�rR��?�@r-r=rms    r%r.z"Big5DistributionAnalysis.get_order�sa��
#+�1�+�x��{�K�
�����d�"��j�4�/�0�;�>��E��J�J��*�t�+�,�{�:�T�A�A�r'r>rVrXs@r%rprp�s&���J�
�%��y�(8�"9�
�c�
r'rpc�:��eZdZd�fd�Zdeeefdefd�Z�xZ	S)�SJISDistributionAnalysisrc�d��t�|��t|_t|_t|_yr8�rJr&rrrrrrrKs �r%r&z!SJISDistributionAnalysis.__init__��&���
����#9�� �)���*H��'r'rNc��|d|d}}d|cxkrdkrnn	d|dz
z}nd|cxkrdkrny	d|dz
dzz}ny	||zd
z
}|dkDrd	}|S)Nrr��������r-rv�r=)r$rNrTrnr/s     r%r.z"SJISDistributionAnalysis.get_order�s}��
#+�1�+�x��{�K�
��:�%��%��:��,�-�E�
�Z�
'�4�
'���:��,�r�1�2�E����#�d�*������E��r'r>rVrXs@r%rxrx�s&���I��%��y�(8�"9��c�r'rxc�:��eZdZd�fd�Zdeeefdefd�Z�xZ	S)�EUCJPDistributionAnalysisrc�d��t�|��t|_t|_t|_yr8rzrKs �r%r&z"EUCJPDistributionAnalysis.__init__�r{r'rNc�:�|d}|dk\rd|dz
z|dzdz
Sy)Nr�rQrRrr-r=)r$rNr)s   r%r.z#EUCJPDistributionAnalysis.get_order�s4��
��{���4�<�����%����3�d�:�:�r'r>rVrXs@r%r�r��s&���I��%��y�(8�"9��c�r'r�N)!�typingrr�big5freqrrr�	euckrfreqr	r
r�	euctwfreqrr
r�
gb2312freqrrr�jisfreqrrr�	johabfreqrrrHr[rarjrprxr�r=r'r%�<module>r�s���8 ���
��
��
��
��
2�G�G�T� 8��$� 8��$� 8���!9��$�7��(�7��2� 8�r'python3.12/site-packages/pip/_vendor/chardet/__pycache__/mbcharsetprober.cpython-312.pyc000064400000007550151732703230025056 0ustar00�

R`i���b�ddlmZmZddlmZddlmZddlmZddl	m
Z
mZmZGd�de�Z
y	)
�)�Optional�Union�)�CharDistributionAnalysis)�
CharSetProber)�CodingStateMachine)�LanguageFilter�MachineState�ProbingStatec�v��eZdZdZej
fdeddf�fd�
Zd
�fd�Zdee	e
fdefd�Zde
fd	�Z�xZS)�MultiByteCharSetProberz 
    MultiByteCharSetProber
    �lang_filter�returnNc�b��t�|�|��d|_d|_t	d�|_y)N)r�)�super�__init__�distribution_analyzer�	coding_sm�	bytearray�
_last_char)�selfr�	__class__s  ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/mbcharsetprober.pyrzMultiByteCharSetProber.__init__+s.���
���[��1�IM��"�7;���#�G�,���c����t�|��|jr|jj�|jr|jj�t	d�|_y)Nr)r�resetrrrr)rrs �rrzMultiByteCharSetProber.reset1sJ���
��
���>�>��N�N� � �"��%�%��&�&�,�,�.�#�G�,��r�byte_strc���|j�J�|j�J�t|�D�]6\}}|jj|�}|tj
k(rI|jjd|j|j|�tj|_n�|tjk(rtj|_n�|tjk(s��|jj!�}|dk(r7||j"d<|jj%|j"|���|jj%||dz
|dz|���9|d|j"d<|j&tj(k(rL|jj+�r2|j-�|j.kDrtj|_|j&S)Nz!%s %s prober hit error at byte %srr���)rr�	enumerate�
next_stater
�ERROR�logger�debug�charset_name�languager�NOT_ME�_state�ITS_ME�FOUND_IT�START�get_current_charlenr�feed�state�	DETECTING�got_enough_data�get_confidence�SHORTCUT_THRESHOLD)rr�i�byte�coding_state�char_lens      rr.zMultiByteCharSetProber.feed9s����~�~�)�)�)��)�)�5�5�5� ��*�G�A�t��>�>�4�4�T�:�L��|�1�1�1����!�!�7��%�%��M�M��	�+�1�1�����|�2�2�2�*�3�3�����|�1�1�1��>�>�=�=�?����6�)-�D�O�O�A�&��.�.�3�3�D�O�O�X�N��.�.�3�3�H�Q��U�Q��U�4K�X�V�)+�,&�b�\�������:�:��/�/�/��)�)�9�9�;��#�#�%��(?�(?�?�*�3�3����z�z�rc�R�|j�J�|jj�S)N)rr2)rs rr2z%MultiByteCharSetProber.get_confidence]s)���)�)�5�5�5��)�)�8�8�:�:r)rN)�__name__�
__module__�__qualname__�__doc__r	�NONErrr�bytesrrr.�floatr2�
__classcell__)rs@rr
r
&sV����6D�5H�5H�-�N�-�T�-�-�"�U�5�)�#3�4�"��"�H;��;rr
N)�typingrr�chardistributionr�
charsetproberr�codingstatemachiner�enumsr	r
rr
�rr�<module>rGs%��<#�6�(�2�=�=�9;�]�9;rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/langturkishmodel.cpython-312.pyc000064400000227374151732703230025260 0ustar00�

R`i�t��\�ddlmZididd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d	idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���ididd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d!idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d"idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d#idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5����id$idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d%idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d&idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d'idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d(idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d)idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d*idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d+idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d,idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d-idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d.idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d/idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d0idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d1idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d2idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d3idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d4idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5����idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�dd�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��d5��Zidd6�dd6�dd6�dd6�d'd6�d%d6�d7d6�d*d6�d+d6�d,d6�d$d6�d1d6�dd6�d&d6�d-d6�d(d6�dd6�id8d6�d d6�d9d6�dd6�dd6�d2d6�dd6�d#d6�d"d6�d)d6�d!d6�dd6�dd6�d:d6�dd6�d.d6�d;d6��id<d6�dd6�dd6�dd6�dd6�dd6�d=d6�d>d6�dd6�dd6�dd6�d	d6�dd6�dd6�dd6�d
d6�d?d6��idd6�dd6�d
d6�d4d6�d@d6�dd6�d/d6�d0d6�dAd6�dd6�dBd6�dd6�d3d6�dCd6�dDd�dEd�dFd��idGd�dHd�dId�dJd�dKd	�dLd
�dMd�dNd�dOd
�dPd�dQd�dRd�dSd�dTdH�dUd�dVd�dWd��idXd�dYd�dZd�d[dD�d\d�d]d�d^d6�d_d6�d`d6�dad6�dbd6�dcd6�ddd�ded�dfd�dgd�dhd��idid �djd!�dkd"�dld�dmd#�dnd$�dod%�dpd&�dqd'�drd(�dsd)�dtdC�dud*�dvd+�dwd,�dxd-�dyd.��idzd/�d{d0�d|d1�d}d2�d~d6�dd6�d�d6�d�d6�d�d6�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dh�d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�dm�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dg�d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�da�d�dS�d�d`�d�d��d�dl�d�d��d�d��d�d3�d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d�d�dk�d�dL�d�df�d�dR�d�dX�d�d~�d�d4�d�d}�d�de�d�d_�d�d|��id�d{�d�d^�d�dj�d�dz�d�dG�d�dy�d�dx�d�dd�d�dw�d�dv�d�d?�d�d]�d�du�d�dt�d�ds�d�dr�d�d@��id�d>�d�d=�d�dY�d�d\�d�dI�d�dA�d�dQ�d�dJ�d�dU�d�d[�d�d;�d�dP�d�dE�d�dW�d�dV�d�dq�d�dN��id�dB�d�dc�d�d:�d�dF�d�dp�d�dM�d�dZ�d�di�d�d<�d�db�d�dT�d�do�d�dO�d�dK�d�d8��dd7��dd9��d6dni�Ze�d�dee�d�d�d���Z�y(	�)�SingleByteCharSetModel��%�/�'��4�$�-�5�<��1��.�*�0�,�#��3�&�>�+�8�����������
��
������	�� �9�:���?�6)�2�7�;�!�=�"���)��(��r@r=rBr>r:r<rAr?r7r8r9r;�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������z
ISO-8859-9�Turkishg�X4���?TuRABCDEFGHIJKLMNOPRSTUVYZabcdefghijklmnoprstuvyzÂÇÎÖÛÜâçîöûüĞğİıŞş)�charset_name�language�char_to_order_map�language_model�typical_positive_ratio�keep_ascii_letters�alphabetN)�#pip._vendor.chardet.sbcharsetproberr�TURKISH_LANG_MODEL� ISO_8859_9_TURKISH_CHAR_TO_ORDER�ISO_8859_9_TURKISH_MODEL����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/langturkishmodel.py�<module>rs����F�@@��@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�@@�D�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�E@@�F�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�G@@�H�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�I@@�J�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�K@@�L
�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�M
@@�N�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�O@@�P�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�Q@@�R�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�S@@�T�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�U@@�V�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�W@@�X�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�Y@@�Z�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�[@@�\�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�]@@�^�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�_@@�`�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�a@@�b �@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�c @@�d"�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�e"@@�f$�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�g$@@�h&�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�i&@@�j(�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�k(@@�l*�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�m*@@�n,�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�o,@@�p.�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�q.@@�r0�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�s0@@�t2�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�u2@@�v4�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�w4@@�x6�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�y6@@�z8�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�{8@@�|:�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�}:@@�~<�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�<@@�@?�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�A?@@�BA�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�CA@@�DC�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�EC@@�FE�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�GE@@�HG�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�IG@@�JI�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�KI@@�LK�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�MK@@�NM�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�OM@@�PO�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�QO@@�RQ�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�SQ@@�TS�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�US@@�VU�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�WU@@�XW�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�YW@@�ZY�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�[Y@@�\[�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�][@@�^]�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�_]@@�`_�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�a_@@�ba�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�ca@@�dc�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�ec@@�fe�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�ge@@�hg@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	
�1�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	
�1�;@�<	�A�=@�>	�A�?@�@	�A�A@�B	
�1�C@�D	�A�E@�F	�A�G@�H	
�1�I@�J	�A�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	
�1�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
��
�
�@�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	
�1�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	
�1�;@	�<	�A�=@	�>	�A�?@	�@	�A�A@	�B	
�1�C@	�D	�A�E@	�F	�A�G@	�H	
�1�I@	�J	�A�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	
�1�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
��
�
�@	�}@@��R@A$��s�A$��s�A$��s�A$��s�	A$�
�s�A$��s�
A$��s�A$��s�A$��s�A$��s�A$���A$���A$���A$���A$���A$� ��!A$�"��#A$�$��%A$�&��'A$�(��)A$�*��+A$�,��-A$�.��/A$�0��1A$�2��3A$�4��5A$�6��7A$�8��9A$�:��;A$�<��=A$�>��?A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$� �F2��
�6�%�"��
a��rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/sjisprober.cpython-312.pyc000064400000010670151732703230024053 0ustar00�

R`i���r�ddlmZddlmZddlmZddlmZmZddl	m
Z
ddlmZddl
mZGd	�d
e�Zy)�)�Union�)�SJISDistributionAnalysis)�CodingStateMachine)�MachineState�ProbingState)�SJISContextAnalysis)�MultiByteCharSetProber)�
SJIS_SM_MODELc�~��eZdZd	�fd�Zd	�fd�Zedefd��Zedefd��Zde	e
efdefd�Z
defd�Z�xZS)
�
SJISProber�returnc���t�|��tt�|_t�|_t�|_|j�y�N)
�super�__init__rr�	coding_smr�distribution_analyzerr	�context_analyzer�reset��self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/sjisprober.pyrzSJISProber.__init__'s9���
����+�M�:���%=�%?��"� 3� 5����
�
��c�V��t�|��|jj�yr)rrrrs �rrzSJISProber.reset.s���
��
�����#�#�%rc�.�|jjSr)r�charset_name�rs rrzSJISProber.charset_name2s���$�$�1�1�1rc��y)N�Japanese�rs r�languagezSJISProber.language6s��r�byte_strc��|j�J�|j�J�t|�D�]�\}}|jj|�}|tj
k(rJ|jjd|j|j|�tj|_�n|tjk(rtj|_n�|tjk(s��|jj!�}|dk(rc||j"d<|j$j'|j"d|z
d|�|jj'|j"|���?|j$j'||dz|z
|dz|z
|�|jj'||dz
|dz|����|d|j"d<|j(tj*k(rL|j$j-�r2|j/�|j0kDrtj|_|j(S)Nz!%s %s prober hit error at byte %srr�����)rr�	enumerate�
next_stater�ERROR�logger�debugrr#r�NOT_ME�_state�ITS_ME�FOUND_IT�START�get_current_charlen�
_last_charr�feed�state�	DETECTING�got_enough_data�get_confidence�SHORTCUT_THRESHOLD)rr$�i�byte�coding_state�char_lens      rr5zSJISProber.feed:s����~�~�)�)�)��)�)�5�5�5� ��*�G�A�t��>�>�4�4�T�:�L��|�1�1�1����!�!�7��%�%��M�M��	�+�1�1�����|�2�2�2�*�3�3�����|�1�1�1��>�>�=�=�?����6�)-�D�O�O�A�&��)�)�.�.�����H���7����.�.�3�3�D�O�O�X�N��)�)�.�.� ��Q���!1�A��E�H�4D�E�x���.�.�3�3�H�Q��U�Q��U�4K�X�V�5+�8&�b�\�������:�:��/�/�/��$�$�4�4�6��#�#�%��(?�(?�?�*�3�3����z�z�rc��|j�J�|jj�}|jj�}t||�Sr)rrr9�max)r�context_conf�distrib_confs   rr9zSJISProber.get_confidencedsI���)�)�5�5�5��,�,�;�;�=���1�1�@�@�B���<��.�.r)rN)�__name__�
__module__�__qualname__rr�property�strrr#r�bytes�	bytearrayrr5�floatr9�
__classcell__)rs@rr
r
&sm����&��2�c�2��2���#����(�U�5�)�#3�4�(��(�T/��/rr
N)�typingr�chardistributionr�codingstatemachiner�enumsrr�jpcntxr	�mbcharsetproberr
�mbcssmrr
r"rr�<module>rSs+��8�6�2�-�'�3�!�C/�'�C/rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/hebrewprober.cpython-312.pyc000064400000013351151732703240024357 0ustar00�

R`i�8��N�ddlmZmZddlmZddlmZddlmZGd�de�Z	y)	�)�Optional�Union�)�
CharSetProber)�ProbingState)�SingleByteCharSetProberc����eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZd�fd�Zdd�Zdededdfd�Zdedefd�Zdedefd�Zdeeefdefd�Zede fd��Z!ede fd��Z"edefd��Z#�xZ$S) �HebrewProber� �������������������g{�G�z�?z
ISO-8859-8zwindows-1255�returnNc���t�|��d|_d|_|j|_|j|_d|_d|_|j�y�Nr)
�super�__init__�_final_char_logical_score�_final_char_visual_score�SPACE�_prev�_before_prev�_logical_prober�_visual_prober�reset)�self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/hebrewprober.pyrzHebrewProber.__init__�sN���
����)*��&�()��%��Z�Z��
� �J�J���BF���AE����
�
��c�d�d|_d|_|j|_|j|_yr)rrrrr �r$s r&r#zHebrewProber.reset�s+��)*��&�()��%��Z�Z��
� �J�J��r'�logical_prober�
visual_proberc� �||_||_y�N)r!r")r$r*r+s   r&�set_model_proberszHebrewProber.set_model_probers�s��
 .���+��r'�cc�x�||j|j|j|j|jfvSr-)�	FINAL_KAF�	FINAL_MEM�	FINAL_NUN�FINAL_PE�FINAL_TSADI�r$r/s  r&�is_finalzHebrewProber.is_final�s9����N�N��N�N��N�N��M�M����
�
�	
r'c�b�||j|j|j|jfvSr-)�
NORMAL_KAF�
NORMAL_MEM�
NORMAL_NUN�	NORMAL_PEr6s  r&�is_non_finalzHebrewProber.is_non_final�s(���T�_�_�d�o�o�t������W�W�Wr'�byte_strc��|jtjk(rtjS|j|�}|D]�}||jk(r{|j
|jk7r�|j
|j�r|xjdz
c_n�|j|j�rn|xjdz
c_
nX|j
|jk(r?|j
|j�r$||jk7r|xjdz
c_
|j|_||_��tjS)Nr)�stater�NOT_ME�filter_high_byte_onlyrr r7rrr=r�	DETECTING)r$r>�curs   r&�feedzHebrewProber.feed�s��6�:�:��,�,�,��&�&�&��-�-�h�7���C��d�j�j� ��$�$��
�
�2��}�}�T�Z�Z�0��6�6�!�;�6��*�*�4�:�:�6��5�5��:�5��&�&�$�*�*�4����t�z�z�2���
�
�*��1�1�Q�6�1� $�
�
�D���D�J�/�6�%�%�%r'c���|j�J�|j�J�|j|jz
}||jk\r|j
S||jkr|jS|jj�|jj�z
}||jkDr|j
S||jkr|jS|dkr|jS|j
S)Ng)	r!r"rr�MIN_FINAL_CHAR_DISTANCE�LOGICAL_HEBREW_NAME�VISUAL_HEBREW_NAME�get_confidence�MIN_MODEL_DISTANCE)r$�finalsub�modelsubs   r&�charset_namezHebrewProber.charset_names����#�#�/�/�/��"�"�.�.�.��1�1�D�4Q�4Q�Q���t�3�3�3��+�+�+���4�4�4�4��*�*�*�
� � �/�/�1�D�4G�4G�4V�4V�4X�X�	��d�-�-�-��+�+�+��t�.�.�.�.��*�*�*��c�>��*�*�*��'�'�'r'c��y)N�Hebrew�r)s r&�languagezHebrewProber.language.s��r'c��|j�J�|j�J�|jjtjk(r7|jjtjk(rtjStj
Sr-)r!r"r@rrArCr)s r&r@zHebrewProber.state2st���#�#�/�/�/��"�"�.�.�.�
� � �&�&�,�*=�*=�=����%�%��)<�)<�<��&�&�&��%�%�%r')rN)%�__name__�
__module__�__qualname__rr1r9r2r:r3r;r4r<r5�NORMAL_TSADIrGrKrIrHrr#rr.�int�boolr7r=r�bytes�	bytearrayrrE�property�strrNrRr@�
__classcell__)r%s@r&r
r
�s����E��I��J��I��J��I��J��H��I��K��L�
 ��
��%��(���'�,�/�,�/�,�
�	,�
�#�
�$�
�X�c�X�d�X�<&�U�5�)�#3�4�<&��<&�|�(�c�(��(�<��#�����	&�|�	&��	&r'r
N)
�typingrr�
charsetproberr�enumsr�sbcharsetproberrr
rQr'r&�<module>rcs"��8#�(��4�Hx&�=�x&r'python3.12/site-packages/pip/_vendor/chardet/__pycache__/big5freq.cpython-312.pyc000064400000065157151732703240023410 0ustar00�

R`i*z���dZdZdZy)g�?�(�i	i��i����	�R�i����iai�i�ni��!i�i�L�,iB�i�i�i�i�i��i{
i]
i�i�i
iji�i�i.iNiii�����:i�i�i��?i�i�i=iN�K���ikiq	i�i�i�
i��iib��
i�i��i�
ioi2i�ii�i�ici8i�i�ii��i�i��i{�|��i��"i�
i��@i\i�i�	i�i��i�i�i�iFi�i|
iQ�Hi�i��Piv��i�i�ii�iDi^
i�i�iFi}
i��Ei�iO�i0i��si�i4�<�2i��i&iMi�i�i~
�i�iG�ii[i�i�i?iiiaiiK	i*i�igi�	�Zi�
i:i��i�iKi�	�i�	�ii�i�i�i`ilii�i��i
	i �qi�i~i���i
i�	ii�i�i�ici��u�i�i*ii�i	i�
i��~imi�i��iei��Gi^i�in�i�UiCi�iCi�i�i�i�ii�i �jioi/ii�iPi7	i[i���i�
i?i�i�i�io�Si(i�i�ip�]i�i6ijii@iii�iii8��+i3i[�i�i\i�i�i�i��i]	iAi���i�i1��i�iHi�
i�
idi���i+i�i2i�i�i�i�
iOiL	i�iifi1��i�i�i�i�i�ii3i9���li,��i	ii�ii�i�i�i�ieiz
iQiMi&i��Xi�i�i�i���i
��i�ikipi��M�i�i��%�i�i�i�i�i��'i�	i�i\i�i�7��Ji�i!i�i�ii���iNi�iBiPi_
iq��i�
i�i�i�
i�
i�� i�ii iIi�i8	i�i�
ii{
�i�i
i�i���mi�i�ifi�i�ixi�i�i�i�i�
i�i
i�igi���i
ii�i�i�i�i��&i�i'i�ii�i�i��.�i�ii�iM	i���i�i�i$�#i�iDihiAi�	�i�iri�i�iUiGii�i�i
i�
iQiSiii�i��di�0�Fi�i�iCi�i�ii�i i�iJii�iU�i��iN	i�
i�i�i<i�i�
i:iA
i�
i�i	i 	i9i�i}ii�	i�i�iWiPi�
ii)iDii�i�i4i�
i�	i)i�i�ir	i�isi�i�itii9	i�i�i�is	i*ii�i�i�i�i�i]i�i�i�i�i�	iDiji(
i
i�i�i�
i�iui5iYiji	ili�iuii�i�
i�i�i`
i
i=i�i�i�i�i�i�i�i5i�i!i�i�iTiEixi�i�ie�i�	i�iO	iPi�i|
i6iAi�
i/iki�i�
iili!i	i�iBi�i`i�i
i��iAi�iiii�i�
ivi�	i�i�iwi�i���iMi�
i�i�i�ii�ia
i�i�i�
i}
i�ixi,�}i�i�iB
i�i�i�i�i�i�i�i�iFikimi�	i�i�
i�i	i�i�
i�ibi�i)
i^iP	i
i,i�i�i�i7i5i~
iyi|i�izi�ii�i�
iC
i{iii�i�i�i�i�i�i�i1���bii�	i�
i�i�it	i�i�
i�i_i��i�i�i�ii�
i�
ib
i��i�i5�D�i�ili�i|i[i*
i��i�
i�i%�iGi^	i�ili�i�i�
i�i`i�i�i�ipi��in�cigimii�i'i2i��i�i{i�i�i�i�i�i�iD
i�ifi	i�i|i:	��i�ii�i�
i�i�
i
i�i�i�ini�i�i�i��;i�iIiYi}i�i�
iXi"i�i
i�i�i�i�i�i�i-i�ili�i�i�i�i�ii�i�iEi�i~i�i>i]i�i,i�i�i�iviLiB�ii&i�i�ii�i�i�iGi�i�iiBi�i�
i+
i�ii�i�i�i�i�i�	i iaii�i�i
iai�i}iE
i�iDi�i=i�i0ii�i�
i6i�ii�ivi!�i�i�i��i�i�i��9iHii�i�i�i�
iFi�i�i�i�i�i"i�iHi�i�i�i
ioii�iRi*i�i.i�i�i�i�iiI�3ii,
i�i*iSi�i�iXi�i�i/iibipi�i�	i�i�i�i�i�iRiii�i7i�i2i�i�	i�i�i�i�i�i�i_	i�ibii�
i�i�i�i�	i�i�i�ii�i�i`	�Oi�i�	i�i`i7i�
i�
i�i�i�i�i�iia	i�i�i�i�i�i�igi�i�i�i�i
i_i�i~��i�i�i�i�i�
iai�i�
ib	i�i�i�i�i��i�i�	i;��i�	i-i
i�iQ	i���i�iqii�i�i��`i�i#i#i�ii�iiri�
isii�i�iditi�
i�ic
i�iikiwi�i�i�i�i�i�i�ii�i��gi�iQi�iUi
i�i�i�i���CiSi�ic	i�i�i5i�i�iBi�i_i�iciN��i�iYi�i�i�i�
�iLidi�
i�
i	iKi�i8iaiGi�i�i
i�i�iisi6i�	iti;	�Ni�i�ii	i4i�i:i�i\iqi�i�i�i.i�iiiui�
i�i�i�i�i�
�i
iri�i�i�
i�
i�ici�i�i�i@i�i�i�ii�i�ii�i/i9i�ii�ii�i�i�i�i�
i<	id
ii�i�i8iviiCi�ii
i�imi�i�
i�i�i�i�i�iZi����i�iwi�	�{i�i�i�i��$i�iiMidi0iri�i�i�igiiVi�i�ii�i:iZi�i�i{i$iei0i�ii$i�i�
i�
i�i5i�i[i��vi�iici�iViR	i$i;�i�iifiii�idi�i�iWie
ii�i�iii�i�
iiJi�ii�iiui�i	i�i
i�ii�
iKi�i2i�iLi i.i�i�i2i�ii�i�i��i�i%ii�i�ii
ii�ii�iii��
i�
ixi�iMi�i}ii�iTii�i�id	i�
ii�i�i�i`iii�i�i�	i3iii;i�iiiiyiYiLi�i�i�	i�	iii�iU�\i�i�ii�i�iViNi�ii�
i�i�i 
i�i"ixi%ii;i=	i i�i�i2iEi�i!i�i�i��^i�i"iwi�
i#i�i�i�i�i�i$i<iQi�i�iri%i�i]i�i&i�i<i'ii3i6iBi�i�i(i�i�i�i�i�ii�igi�
i�
i)i�
i	i*i+i!	i�i��i:i�i7i�i^i�ii�ii(i�
i,i+iiixi-i�i/ihi=i.i�i��i�iVii�i�hi�i�i/ii��i�i<i�i�i;i0i�i�i�i
i�	i1izi�ii�i5i6i�
i_�)i2i3i�i4iyi"	�i�i�
i�i^i5i�i�i?i%i+if
i�i6i_iWi�i�i�
i7i>ii�
ig
i#	��iu	i8i�i�i9ih
iF
i�iVi{i�iOi�iI�wi~i�
i^ii�i:i�i�i�i�i�i�i�i�	i;iei1i�i�i�i�i�i�i�i�i�i�iiiPi<i=i�i>i�
i��(i`iRi?iYi�iIi�	��i�i�i7i�i�
i?i�i�i�
i@i�io�iqiYinii�ilii�i�i�i�i�
ii
iEiPiVi�i!
i�i�i�i�i�ini�iAi�i|i�
ii
iBi�i�i�i�ii-
i�	iOi�
i�iCi�iDiWiTiT�i�i�i�i�
i}iEi�i&i�
i�i�i�i�ii�i�
i�i�i~iG
i�
i�ii$	iWi�ii�ioi�i
iFiiGi�ii"
i���i�i#
i�i�iDi-iQi�iHiei�	iiiIi�i�iiJizi
i�iKiiiLi�i$
i�
i�i�i�i�iH
�i�i�ii�i�iMi:i�	ii�iNi�iI
i�i�i�iHi�i�ii�iOi�i�i�	iPiQi�i�ikiRiRi���i�i�
i
i�i�i�i�i�i�ii�iSiTi�i�i�i%
i�i�i�i�i�i&
iSiUii�iS	i�iCi�i�i�iVi~i�i!iXi�i�i�i�i�i,i�ii�i�iOi�i|i�ii�iPi�ie	i�i�i�i�ii�i�i�i�i�i�i�i�iTi�i�i�iWi�i�iiXi�iYi�iRi�
iviii�
ii�i=ii�iZi�iUi�i�i[i�i�i�iVi%	i\i�i�i]i�i�i^i8iT	i.
i'
i_i�ivi�i�i�i�iwitii`iaibi>	i�i�i"i{�i�i�	i�ici�idi9i�iii�i[i9iiidihi
iei�i�i�iJ
i!i�i�ifi���ii�i�i�iTigi�ii�i%i��WiMihii�iii�i�i�i�i��i�i�i�i(
ij
i�iyi7imi�ijiki�i?	iWi"i�i��i�Bi�ili|i��i)
izi���i�
i�i�i�i�ii�i�im�iniuiv	iwi�i	i*
ii�ioipi��iqi7i.iri�i�i
iii�
i�ifi�i�i�isi&	iyii�i i�i�i�ii�i�
ii>i�i�i�i�i�Yi�i�iti�iui/
i+
i�ivi�i�i�i@iwii�	i�	�i�i3i�i�i�i,
ixi�i6i9i�
i	ii��6i��ii!ii�iyi�iQi:ici
i�ii-
�oi�i�iFiXi�
i�i�ifi�iizi�
i�i�i�i�i�i{i/�i�i'	i�	ibii�i`i�i�iiui	ivi�i�ii�i�
i
i
i�i�i�i�i0iE�iSi�i8i[i|i}iGi�ii�i!i~ii�iFiU	i�i�
iii�ieisi�i�i�iw	ii�i�i"iiai	iZi&i�i�i�i�i�	i
i�i�i�iAi�i�i�
iiiii�i�i�i�i�i�ii�i
ioi�ii�ii�
i
i�i	i�iAiiJi0i�ix	i�
i�i�i�iYi�i�i�i�i�i�	i�ii�iZi8ioii�iQi�i�i�i�i�
i���a�Qi�i�ipi;i�iPi�ibi�i�i�i�ii�i�i
i�i�i�i�	i�i�i�i�i�i�i�i�i�i�i�i]ii�ii�i�
�i�ii�i�i'i�ii.
i���i
i�i�ii�i�iLi�i�i�i�ii�	i�i/
i�ii�i�iBi0
i[ii8i�i�i�i�i�	i�ii/i3i�i�i�ii�
ii�ii0i�ini�i�i�ii�i���ii�	i�i�i�i�ii�iii�i4i�i�ii<i�	ii
i�i�iYi�	i�i��iCi�i�ii�
i�i�i�i�i}i1ii�
i�i�i�iK�i���i0
iFi�i�i�i�
ii#i�i\i�i�i��fi�>i�
i�ii�
i�i�i�i�i�ii�
i�i�i�i�iji�i�ii�ii-ipi9i@	i6iyii�i�ii
i1
i�i�ii�i�ii��Vi�i�i�i�i4i�i�i�iKi1
i�i�
iDi�i�i�i�ii�i#i�i�i�i�i2
ii�ii�	iZiHipi�i�igi�i�ii�
iq�ri
i���i�i�i�i�iiK
iV	i�
i\i,i
i�i�i�ii�i]i�i�iu�i�
iii�i�i�i�ii�iZi�i�i�
iii�iiji�i�i0ihihi�i�i�i�i�iEii�i	
i�ii�	i�i�i�i�i�i�i�ii�i�i�
iii�i2
�i�i�i�i�iiMi�iwi�i�i�iy	i?i�i�i�i

itimi(	i�	i�i+i�i�i�i�i�i��iiii�
i�i�	i�i�i�i
i�iL
i�i�i)	i�
ii�
i�iif	i�i�	i�iii�i�i�iRi"iA	i3
i�i�i-i1i�i$i�
i(i�i]i�i#i�i$i�
ii�i�i i*	i�i�i�i�i
i�i�i�
i=ik
i�i!i�i�
i�i�i�i�i�
i�i���_i�i�i�i�i^i2ii�
i�i�i�i9i�i�i�i�i�i�i4
i�i�i�i
�ibii�i�ii�i�ii��5i�i�i�i�i"i	i�
ii�i�i��i4iIii�i#i�i��i�iii�iiji�i�ii$iki�ii�
i�i\i�
igi�iEi5
i�i�i�i�i�i�i�i�i�
i�i�i6
i�i�ii	i�i%ii�i�i�i�i[i�i�i�i�i�ii�i&�ei�i�i�i�i�ioi�i�ili	i}i�i�i�izi�i+	i�i�i�ii�i�ini-i�i�
i'iiii
i�i�i�i(i�i�i�	i�i�ii�i�i�ii�
i�i�i�i�iBiiiqi�i�i�i<i�i*iji)i"i*i�i>i)i7
i�i+i�i�i�ii�i�i��zi�i,i�i�i�iiM
i)iri�i�i-i	i�i�i�i�i�i��Ti��pi�i�i#i#i�i�ii�i�i�i�i�
i�ii�i	i�	i�i�i�iSi�i.i8
i�i�i�i�iz	i9
i=i�i�i�imi�iSiii�i�i�ixi�i�i/i�i�iqi�ii3i�i5i�i:
i�i�
i�i�i�i�i�i�i�i
i;
i�i0i1i�iii�i�ini�i_i�i]ii�ini�i�i�i�i
i%i�i�i�i�i�i`i�i�i�i�iziTisi2i3
i�i
i{	�i5���ii�
ig	i�i�iki�i�i�ii�
i�i�i3i4i�i�i�ici i�i�i
i�
i�iiai:i1i�i�i�i!�Aihi ioi�
i6i"i�i��il
�-i�i
iai5ii�	i�i
i�i�i#i!i�i$i�i�
i�i4
ifi�i	i%i&i�
iN
ri
i�iWi�iii�ii�
i'i�i$i�ii<
i�iNiiiW	iki�iO
i�i�iii�i�iX	i,	ii6i&iti�iP
ii�i7i�
i�i�
i-	ijii	i�
i�iC�[ipi�i�i'i8i
ibi�im
ii�
i�i{i(i�i�	i�i�	i9i�
i�	ii:i
i�
i^i�i�i�iB	i;ii�iii�i�
i���i
i�i	i�i)i<i=i�
ii�
i�i>iiiii�
�=i�i�ii�ii�i�i�i�i�in
i�iHiDi�
i?i�iUiWi�
i=
i�i:i�i�	iNi�iKiEi@i4ici�
i�i>
i�iQ
i
iAii�ihi�ii�
i�
i(i]i�i�i�iBi*i�i�ili�iCiDi�iEih	i�ii�i��i�iXiiii�i+i�i�i�i+iJi�i�iU��ii
i�imi iEiiiiFiiGi
�ki�	ini�i�
idii�ii�i�i�iFi!i i�iri@i�iHi"iCiGi��i�i
i�i^i�
i�i��8iti)i;i�i?
i!i�ioiIi�i"i#i#i$i�iJi�	i%i�
i&iriKi'i5
i(i)i�io
i@
i}iA
i�i,i�i*i4�1i+i�i�i�i�i�i"i�i,ii�
iC	i�iuiriD	i-i�
i-i�iLivi{i�i|	iMi.i.iNiY	i6
iii�i/i0i/i�i�i1i$i�i2i%iGiRiB
i�i_i�i�iC
i�i�iD
i�i3i�i�i�i�i�i�ii.	i�i�	i4i@iwi�i5i�i6i7i�ii	i�i&i0i�i8i	i&i�	i*�i+iGiOiu�i#i�
i1iPiRi�iQi�i�i�i)i�i�i=i9i�ili�i�i�i�iE
iSi�iki�i\i�	i�i�i�
iyi:i�i;i<iF
i%i=i�iRiii>idi'i,i?iei$i�i2i3i-i�i�i4ii(iSi@iAiBi�i.iTi�iOi
i�i�i�i�i�i�
i&ii�i�i�
i<i�
i�ii�iCiiDi�i�iUi�ip
iG
iei�
i�i�i�i�
iEi;iViFi'iGi)i
i�i}	iHi*i�iWi�i�iIi�iTi�i�
i�
i�i�i�i�ii	i�iJi.igi~�iUi�ij	i	iiiXi�i�i8i�i*i�	i�i�iKi~	i�i�i�iLiiHi�
i�ii%��i+ifi�i�i�i�iti�iMiNi�i�i�ii	i�i 
i�i�ik	iYiiYi�i�i��*i/i�iOiR
iZiH
i�i#iIi�
i�	i�i�i5iS
i]iE	i[i\i
isiI
i+iPiQi,i�	i�
iRi�iSiTi�i,i�iUi]iVi�i�iLi-i!i�iT
i\�4iWi�iiXiYiZi�i[i>iwi�i�i�i�i+i^iiJ
i�i_i$i�i\i�i�iili.i]i`i�i^i_iq
i%i�i`iaiii�i�
i6igiU
ibicidiai�
iqixi�
iei
ibiyi�ifihigihi�i�i'iiii�i�i	ijiri�i
i0i	i=i�ibi|�i�i�i�i�i�i	iihiki�
ilii�i�
iai�icimi�ii�ini�
i�iui�i�idiei�isiK
i/ioi7i�i&i�	iJi8ipiqiiijifi�i�	igi	i�i�i(i�i`irisi�i�iii<iFikifi�i��i�i]i�i�iIiti>i�iui�ivi�i�
i�i�i�
i0i�i-i�iwiL
i�i�	i�i�i�i�iGiai�i
iti�i�i�
iSiKixiiyizi�i�iV
��i�iOi�i1�i�
i{i�
i�i�iF	iyi�i9iZ	��i|i}i~iFi�i�i�i�
i�	i:i�iiii2i�i�iipi�i;iG	i�i�i	ihi�i�i�ii7
i�i�i�iiqii�iM
i�iii�iii�i�i�i�
i�i�i�
i(i8
i�iN
i	ii3i�	iiO
i<ii�i�iTiiW
i�	i�i�i�i�i(i�i�i�i1i�i�i�i�i�i�i�iuiZii�
i�	ici�ijiP
ipi�i�i
ii�i�i�iviiiji�i�
i�i�i�i�iQ
iKii�i�	i'i�i�i�ii�i9
ii�i
i�	izi�i�	i
i�i�iki�i�i�i�i�i�i2i	i�ilii�i>i=iCi'i�i�i>i
iiZi�i�i�i�imini�i�ibii�i�	iiqi?i�i
i�ii�i�	i"i�i�
i?i
i}i�i�ioi@i>iiAi�i1i�i)i�i�i�i?i�
i�
i�ii�ixi	i�i	ii�	i3i�iihi�iili�i�i�i)i�i�
ipi�i'i�i�i�i4i�i�i
i�
i�i�i�iAi_i	iBi�iLi�i
iPiqi�ii�iriii�iiX
iicisi!
i�i�iiHi�i	iwi�i�i�iCiDitii�i�i�i�i�ixi
ii�	i/	i�iii5i
i4iuiir
i�ii_i�i��/i�i<i�i~i7iyimi�ii^i5inibi�
iti�iil	i�i�i�i6i�i�	i7i�i�i�i�i�iivi�i�i�i�	i8i:
i�i�
i�i0	i�i1	i�iwi�Ii�i�i�i�i�i(i�iiBi�i�i4isi�
i�i�i�i�i
i�
i�i�i?iCiixi	iEiHii�iFiyiziGi�ii�i�i{i�i�ii|i�i;
i}i9imiH	i~i�izi�i�is
i�	i�iMi�i�ii�i�iim	i�i�iIi�i�iioii�ii�ii�i�i_ii�i�i�i2	i3	iHii*i�ii�
ii�i�i<
i�iii:i�i�
i�i�i�iAi�i�i�iR
i�i�i�iii�
i�i"
i�i�	i�i�i�i�i�i�
ii�
i�i�i�
i�i�iQii�
iY
iii�i�ii�ii{iKi�i�i[iiJi�i�iNi�iS
i�i�i�i�iI	ii�iT
i@ii�
i�i�i�
i�i@iiRi�i�i�	it
i�ii�iJiIi�i�
i�i�i��i�
iU
i�imii�i�i{i�	i�i�	i
i;iV
i�ii�	ii�i<i�ii�
idi�i�i�iXi�i�i9i�i�i6i�i�iUi�i�i�i i�iLi!i=
i�i)i�i�
i	ii�i�i�	i�i�i�
ii=i$i(ivi�ii&i�ici�iii�i	i
i�i>i�i�i�i{i"i�i�i�i�i#i�i�i�i�iW
i�i�	i�i�i�i�	ii$i�
i%ii�i�i�i�i&i^i�i�i[	i�	i�i'ii�i�ii�i�i�i(i i�ii2i\	iJi
ipipin	iiu
iqi)i�i�	iOi>
i�i�
i*iX
i�i�i�	i+i�i�i,i�
i�i�i�
i�i�i�i�iKi�i
i		��iIi-i�i�i!i�i�i�i�i�i.iDi�i�iJisi#
i�i�i�
i�i7i�i�i�i/iwi�i|iii�i�i�i"i4	i|i,iii�i�i�	i�i�ii�iiii�i?iY
iPi0ii1iZ
iZ
i�
i�i�
i�	i�i�
i#i@i2ii|i�iziii�i�iAi'i�i?
i�i	i�i8i�i��yi�iLiVi
i3ii�	i�i$i�ii�iMi�i%i�ii�	i�
ii
i.ii4iNi�iiii�
i�	i�i�ii�i�
i5i9i%ii�i�iKiQii��xi6i7iiBi�i
	iOiv
i[
i�i�i&ii�
ii�
i�iiXi�i*i�i\
iPi�	i�
iNi+iw
iii�iiWiCi�ii�	iQiDii?i]
i�iii^
io	iRi	
i�iEii
iiFii'i�iXiiGiiSi�iiTiRii8ixi�	ikiSi�iTi�ii i�i�i�iDi�i9i!i�i�ii�i(iiLi"i#i$i%i_
i�i&iJi:iUi�i}ii)i�i

i;i<i
iEi+i'i�
i�iHi=iVi*iHiyi,i+iWi3i>i�i�i?i(iIi,i-i`
iqi�ia
ii�ii
i�i)i*iXi�	i+i�iO��iYi,i-i�i.i�i/i�i�i0i.i�i�i�i1i�
iJiri2i3i$
i	i4i�i5i6i7i�
i�ib
i�	i�i�i}i�	ifi�iKi�i�
i�
i�	i�	i8iZi9i�i:i�i�
ic
i�i:i�ii;isiJ	i@i�i�	iti;i�
i/i<id
ii�	i�i�iUi�i0i�ie
i=i�if
iuiMi�i�i�i�i�
i>i	i[iiAiLi�iii?i�	i
i�
i	i@iAiviBiCi\i�iji�i[
i�
ig
iDiEi�i�iFiiBi�iGi�
i�iHi�i(i�iMiCih
i�iIiNiJiiKiLi�i�iMi�i1i2iN�i�idiOidiViDi`i�i#i5	iPi]iQiEini
i�	i�i�i^iRi_iFiSip	ii
i�iTiUi�i

i�iVi�i�i�	i�iGi�i�i�ieiHiOi�	i�iPi`iWiwij
iXi ii3i�
iai�iIiYiJixi7iii�i-i�
i4ik
iibiZi-i�ii.ici�i[i�	iri;i�iKi5iLiXi�i i	i�i�i\i]i�i�i6i%
i^i_i�i�i~i`il
iyiaizi~i�i�ibi?i�ici7idi
i�i�iei�izi�i�iMifigi/ihi|i�i@idi�iiiiNi�i�i�i8ifi�i�ijiki�iOiPi�i�ilimi@ini9i�	ioi�i�	i�i�i<isii\
iQi.iRiNi@i�
i�ipiiSi{iqi�iAi�i�i�ii�iTi
i�i�i�i:i�i�iri�
isi@
iWi;itiui�iviwixiyi|i�i�i�i�izi�i�i3iQi�i�imi�iAi{i|i�i�	i�i}iOiRi�i�igiii~iZi�
ii�i�i�i�i�i\im
i�i}i�i<iXi�i�	i�i�	i�
i�i�i�i
i�iYi�i�i�i0i�i�i�i�i=i�	i�i�i�iLi�i�i�i�ihi�i�i�iii>i>i�i/i?iUi�i�i�i�i�iei)ix
�ti�ifiSi�i�
iy
i�
in
i
ii�iTii@i�i�i�i�i���i�i�i�i�i�	i�i�iziUigi�iVi�io
i�i�i6	ip
iti�i�i�i�i���i�
iAi�iJiVihiZi�	i�iWi�i�i�i�N)�BIG5_TYPICAL_DISTRIBUTION_RATIO�BIG5_TABLE_SIZE�BIG5_CHAR_TO_FREQ_ORDER����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/big5freq.py�<module>r
s��V#'����Q�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/escprober.cpython-312.pyc000064400000010767151732703240023665 0ustar00�

R`i���n�ddlmZmZddlmZddlmZddlmZm	Z	m
Z
ddlmZm
Z
mZmZGd�de�Zy	)
�)�Optional�Union�)�
CharSetProber)�CodingStateMachine)�LanguageFilter�MachineState�ProbingState)�HZ_SM_MODEL�ISO2022CN_SM_MODEL�ISO2022JP_SM_MODEL�ISO2022KR_SM_MODELc���eZdZdZej
fdeddf�fd�
Zd�fd�Zede	e
fd��Zede	e
fd��Zde
fd	�Zd
eeefdefd�Z�xZS)
�EscCharSetProberz�
    This CharSetProber uses a "code scheme" approach for detecting encodings,
    whereby easily recognizable escape or shift sequences are relied on to
    identify these encodings.
    �lang_filter�returnNc���t�|�|��g|_|jtj
zrP|jj
tt��|jj
tt��|jtjzr(|jj
tt��|jtjzr(|jj
tt��d|_d|_d|_t"j$|_|j)�y)N)rr)�super�__init__�	coding_smrr�CHINESE_SIMPLIFIED�appendrrr�JAPANESEr
�KOREANr�active_sm_count�_detected_charset�_detected_languager
�	DETECTING�_state�reset)�selfr�	__class__s  ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/escprober.pyrzEscCharSetProber.__init__0s����
���[��1�������n�?�?�?��N�N�!�!�"4�[�"A�B��N�N�!�!�"4�5G�"H�I����n�5�5�5��N�N�!�!�"4�5G�"H�I����n�3�3�3��N�N�!�!�"4�5G�"H�I� ���04���15���"�,�,����
�
��c����t�|��|jD]}d|_|j��t	|j�|_d|_d|_y)NT)rr r�active�lenrrr)r!rr"s  �r#r zEscCharSetProber.reset@sO���
��
�����I�#�I���O�O��(� #�4�>�>�2���!%���"&��r$c��|jS�N�r�r!s r#�charset_namezEscCharSetProber.charset_nameIs���%�%�%r$c��|jSr))rr+s r#�languagezEscCharSetProber.languageMs���&�&�&r$c�"�|jrdSdS)Ng�G�z��?gr*r+s r#�get_confidencezEscCharSetProber.get_confidenceQs���-�-�t�7�4�7r$�byte_strc�
�|D]�}|jD]�}|js�|j|�}|tjk(rQd|_|xj
dzc_|j
dks�`tj|_|jccS|tjk(s��tj|_|j�|_
|j|_|jccS��|jS)NFrr)rr&�
next_stater	�ERRORrr
�NOT_MEr�state�ITS_ME�FOUND_IT�get_coding_state_machinerr.r)r!r1�cr�coding_states     r#�feedzEscCharSetProber.feedTs����A�!�^�^�	� �'�'��(�3�3�A�6���<�#5�#5�5�',�I�$��(�(�A�-�(��+�+�q�0�&2�&9�&9���#�z�z�)�!�\�%8�%8�8�".�"7�"7�D�K�-6�-O�-O�-Q�D�*�.7�.@�.@�D�+��:�:�%�,��"�z�z�r$)rN)�__name__�
__module__�__qualname__�__doc__r�NONErr �propertyr�strr,r.�floatr0r�bytes�	bytearrayr
r<�
__classcell__)r"s@r#rr)s�����6D�5H�5H��N��T�� '��&�h�s�m�&��&��'�(�3�-�'��'�8��8��U�5�)�#3�4���r$rN)�typingrr�
charsetproberr�codingstatemachiner�enumsrr	r
�escsmrrr
rr�r$r#�<module>rNs,��8#�(�2�=�=���=�}�=r$python3.12/site-packages/pip/_vendor/chardet/__pycache__/charsetprober.cpython-312.pyc000064400000011700151732703240024530 0ustar00�

R`i,��l�ddlZddlZddlmZmZddlmZmZejd�Z	Gd�d�Z
y)�N)�Optional�Union�)�LanguageFilter�ProbingStates%[a-zA-Z]*[�-�]+[a-zA-Z]*[^a-zA-Z�-�]?c� �eZdZdZej
fdeddfd�Zdd�Zede	e
fd��Zede	e
fd��Zd	e
eefdefd
�Zedefd��Zdefd�Zed
e
eefdefd��Zed
e
eefdefd��Zed
e
eefdefd��Zy)�
CharSetProbergffffff�?�lang_filter�returnNc��tj|_d|_||_tjt�|_y)NT)	r�	DETECTING�_state�activer
�logging�	getLogger�__name__�logger)�selfr
s  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/charsetprober.py�__init__zCharSetProber.__init__,s0��"�,�,������&����'�'��1���c�.�tj|_y�N)rr
r�rs r�resetzCharSetProber.reset2s��"�,�,��rc��yr�rs r�charset_namezCharSetProber.charset_name5s��rc��t�r��NotImplementedErrorrs r�languagezCharSetProber.language9s��!�!r�byte_strc��t�rr )rr#s  r�feedzCharSetProber.feed=s��!�!rc��|jSr)rrs r�statezCharSetProber.state@s���{�{�rc��y)Ngrrs r�get_confidencezCharSetProber.get_confidenceDs��r�bufc�4�tjdd|�}|S)Ns([-])+� )�re�sub)r*s r�filter_high_byte_onlyz#CharSetProber.filter_high_byte_onlyGs���f�f�&��c�2���
rc���t�}tj|�}|D]C}|j|dd�|dd}|j	�s|dkrd}|j|��E|S)u7
        We define three types of bytes:
        alphabet: english alphabets [a-zA-Z]
        international: international characters [€-ÿ]
        marker: everything else [^a-zA-Z€-ÿ]
        The input buffer can be thought to contain a series of words delimited
        by markers. This function works to filter all words that contain at
        least one international character. All contiguous sequences of markers
        are replaced by a single space ascii character.
        This filter applies to all scripts which do not use English characters.
        N�����r,)�	bytearray�INTERNATIONAL_WORDS_PATTERN�findall�extend�isalpha)r*�filtered�words�word�	last_chars     r�filter_international_wordsz(CharSetProber.filter_international_wordsLsq���;��
,�3�3�C�8���D��O�O�D��"�I�&��R�S�	�I��$�$�&�9�w�+>� �	��O�O�I�&���rc�*�t�}d}d}t|�jd�}t|�D]F\}}|dk(r|dz}d}�|dk(s�||kDr'|s%|j	|||�|j	d�d}�H|s|j	||d	�|S)
a[
        Returns a copy of ``buf`` that retains only the sequences of English
        alphabet and high byte characters that are not between <> characters.
        This filter can be applied to all scripts which contain both English
        characters and extended ASCII characters, but is currently only used by
        ``Latin1Prober``.
        Fr�c�>r�<r,TN)r3�
memoryview�cast�	enumerater6)r*r8�in_tag�prev�curr�buf_chars      r�remove_xml_tagszCharSetProber.remove_xml_tagsns����;��������o�"�"�3�'��'��n�N�D�(��4���a�x�����T�!��$�;�v��O�O�C��T�N�3��O�O�D�)���-�$�
�O�O�C���J�'��r)rN)r�
__module__�__qualname__�SHORTCUT_THRESHOLDr�NONErr�propertyr�strrr"r�bytesr3rr%r'�floatr)�staticmethodr/r<rHrrrr	r	(s0����5C�5H�5H�2�N�2�T�2�-���h�s�m�����"�(�3�-�"��"�"�U�5�)�#3�4�"��"���|���������5��	�)9�#:��u�������e�Y�.>�(?��I����B�$�U�5�)�#3�4�$��$��$rr	)rr-�typingrr�enumsrr�compiler4r	rrr�<module>rUs3��:�	�"�/�(�b�j�j�8���
k�krpython3.12/site-packages/pip/_vendor/chardet/__pycache__/jpcntx.cpython-312.pyc000064400000115255151732703240023205 0ustar00�

R`i�i��\�ddlmZmZmZdZGd�d�ZGd�de�ZGd�de�Zy	)
�)�List�Tuple�Union)S)Srrr�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)Sr�rrr�rrrr	rrrrrr	r	rr	rr	r	rrr	r	r	rrrrr	r	r�rr	rr	rr	r
r	rr	r
rrrr	rrr	r	rr	r	rrrrrr	rr	r	rrrrrr	r
r
r
r
rrrrrr	r)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)Srrrr
rr
rrrrr
rrr	r
r	r
rr
r	rr	rrr	rr	r	rr	r
rrr	r
r
r	r
r
r
r	r
r
r	rr
r
r	rr	rrr	rrrrrrrrr
r	rr	r
rrrrrr
rrr
rr
rrrrrr�Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)Srr	rrrr	rr	rrr
rr	r	r	r	rr	r
rrr	r
rrr	rr	rrrrr
r	rrr	rr
r
rr
r
rrr
rr	rr	r	rr	r	rrrrr	r	rr
r	r	r	r
rrrr	rrrr	rr	r	rrrrr	r)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)Srrrr	rr	rrrr	rrr	rrrrrr	rr	r	r	r	r	rr	rr	r	r
r	r	rrr	rr
rr	r	r
rrr	rrr
rrrrrrrrrrrrrr
rrrrrr	rrrrrr	r
rr	rrrrrr	)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)Srr	rr
rrrrrrrrrrrrrrrr	r	r	rr	r	r	r	rrrr	r	r	rrrrrrrr	r	rrrrr	rrr	r	rr	rrrrrr	r	rrrrr	rrrrr	rrrr
r	rrrr	rrrr)Srrrrrrrrrr	r
rrr	rr	r
rr	r	rr	r
rrrrr	rrrr	r	rr
rr	rrr
rr
r
rrr
rrrr	rrr	r	rrr	rr	rrrr	r	rr
rr	rrrrr
r
rr
rrrrrr
r)Srr
rr
rrrr	rrrr	rr	r	r	rrrrrr	rr	rr	r	rrrrr	rrr
rrrr
rrr
r	rrr	rr	rrrr	r	r	rr	rrrr	r	rr	r	r	rrrrr	rrr
rrrr	rrrrrr	)Srr	rrrr	rrrr	rrr	rrrr	r	rr	rr	rr	rrr	rr	rr
rrrrrr	r
rrr	r
r
rr	rrr	rrr	rrrrr	rrr	rrr
r	r	r	rr	r	r	r	rrrrr
rrrr	r	rrr	)Srrrr	rrrrrrr	rrrrrrrrrr	r	r	rrr	rrrrrrrrr	r	rrr	r	rrr	r	rr	r	rrrrrrrrrrrrrrrrrrr	rrrrr	r	r	rrr	rrr	rrr	r	)Srrrrrr	rr	rrrrr	r	r	r	r	r	rr	rrrr	rr	r	rrr	rr
rrrr
r	r
rr
r	r
rrr	r
r
r	rr	r	rrr	rr	rrr	r	rrr	r	r	rrrrr	rrr
rrr
r	rrrrr	r)Srrrr	rr	rrrrrrrrrrrrr	rr	rr	rrr	rrr	rr	r	r	rr	r	r	rrr	rr	rrrr	rrrr	rrrrrrr	rrrrr	r	rrr	rrrrrr	rr	rr	r	rr	rrrr	)Srr	rr	rrrrrr	r	rr	rr	rrrr	rrr	rr	r	r	rrr	rr
rr	rrr	rr
r
rrrrr	r	rrrrrrrr	rrrrrrrrrrr	r	r	rr	rrrrrrr
r
r	rrrrrr)Srrrrrr	rr	rrr	r	r	rr	rrrr	rr	rr	rr	rrrrrrrrrrr	rrr	rrrrr	rr	rr	rrrrrrrrrrrrrrrrrrrr	rrrr	rrrr	rrrrrr	r	)Srrrrrr
rrrrrrrr	r	rr	r	r
r	r	r	rr	rrr	rrr	r	r	rrrr	rrr
r
r	rr
rr	r
rrrr	r	rrr	rrrrrr	rrr	r	r	r	rr	rrrr	rrrr
r
rr	rrrr
)Srrrr	rr	rrrrr	rr	rrrrrr	rr	rr	rr	rrr	r	rr	rr	rrr	rrrrrrrrrr	r	rrrrrrrrrrrrrrr	rrr	r	rrrrrrr	r	rrrrr	rrrr	)Srrrr
rrrrrrrrrr	rr	r	r	rrrr	rr	rrr
rr	r	r	r	rrrr	rrr	rrrrr	r	rrr	rrr	rrrrrrrr	r	rrr	r	r	rrrrrrr	r
r	rr
rrr	rrrr
)Srr	rrrrrrrrr	rrrr	rr	rrrrrr	rrrrrrrrrrrr	rrrrrrr	rrrrr	rrrrrrr	rrrrrrrrrrr	rrr	rrrrrrrr	rrrrrrr)Srrrr
rr	rr	rrr
rrr	r
r	r	rrr	rrr	r	r	r	rrrrr
rr	rrrr	r
rrr	r
rr	r	rrrrr	r	rrr	rr	rrr	r	rr
rrrrrrr	r	r
rrr	r	r
rrr	rrrr)Srrrr	rrrrrrr	r	r	rrrr	rr	rr	rrrrrrrrrrr	rrrr	rrrrrrr	rrr	r	rrrrrrr	rrrrrrrrr	rrr	r
rr	r	r	rr	r	rr	r	rrrrr	r	)Srrrrrr	rrrrr
r
r	rrrrrrr	r	rrr	rr	rr	r	rrr	rr	rr	rr	rrrrrrrr
r	r	rrrrrrrrr
rr	r	rrr	r	r	rrr	rrrrrr	r
r
rrr	rrr	r	)Srr	rrrr	rrrr	rr	r	rr	r	r	rr	rr	rrr	r	rrrr	rr	r	rrrrrrr
rr	r	r
rr	r	rr	rrrrrrrrr	rrrrr	r	rr	r	rr	rrrrr	r	rrrrrrrrr	)Srrrrrrrr	rrr	r	r	rr	rrrr	rr	r	rr	rrrrrrrr	rrrr	rr
r	r	rrrrr	r	r	rrrr	rrrrrrrrrrrrr	r	r	rr	rrrrrrr
r	rrr	r	rr	r
)Srrrr	rrrr	rrr	rrrrrrrr	rrr	r	rrr	rrr	rrr	rrr	rrr	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrr)Srr	rr	rr
rrrrrr	rr	r	rrrr
rrrr
rrrrrr	r	rrr	rrr	rrr	r	rr	r	rrr
r	rrr	r	rrrrrrrr	rrrrr	r	r	rrrrrr	rrrr
rrr	rrr	r
)Srr	rr	rr	rrrr	r	r	r	rr	rrrrrrrrrrrrrrrrrrrr	rrrr	r	rrr	rrr	r	rrrrrrrrrrrrrrrr	rrr	rr	rrrr	rrrrr	rrrrr	r	)Srrrr
rr	rr	rrr
r
rr	r
r	rr	r
r	r	rr
r	rrrr	rr	rr
r
r	rrr	rrr
rrrr	rr
r
rrr	rrr	rrr	r	rrr	rrr	r	r
r
rr	rr	rr
r
r
r
rrrrrrrr)Srrrrrr	rr	rr	r
rrrr	rr
rr	rr
rrrr	rr	r	rr	r	r	r	rr
rrr	r	r
r	rrrrrr	rrr	rrrr	rrr	rr	rrrr	rr	rrr	rrrrrrr	rr
rrrrr	r)Srr	rr	rr	rrrr	rrr	r	r	rrrrr	r	rr	r	r	rrrr	rrr	rr	rrrrrrr	rrr	rrrr	rr	r	rr	r	rrrrrrrrr	rr	r	r
rr	r	r
rrr	r	rrrr	rrrr)Srrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrr	rrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrr)Srrrrrrrrrrrrrrrrr	rrrr	rrrr	rr	rrrr
rrrrr	rr
rr
rrrrrrrrrrrr	rrr	rrr	rrrrrrrrrrrrrrrrrrrrrrrrr)Srrrr
rr	rrrr	r
rrr	rr	r
r	rr	r	rrr	r	r	r	r	r	rrrr	rr	rrr
rrr	rrrr	r
rr	r	r	rrrr	r	rr	rr	r	r	r
r	r	rr
rr	rr	rr	rr	rrr	rr	rrrr	)Srrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrr	rrrrr	rrrrrrrrrrrrrrrrrrrrr	rrrrr	rrrrrrrrrrr	rr	r	rrrrrrr)Srr
rr
rr	rr	rr
rrr
rr
r	r	rrr	rr	r
r	rr	r	rrr	rr	r	rr	r	rrrr	rrrr	rr
r
r	rr	rrr	r	rr	rrr	r	rrr
r	r	r
rrrr	rrrr	r
r	r	rr	rrrr	)Srr
rr
rr	rrrrrr	r
rrr	r	r	rrrr	r
r	r
r	r	rrrrr	r	rr	r	rrrrrr
rr	r	r
r
r	rr	rrr	rrrrrr	rrrrr	rr
rrrr	rrr	rr	rrrr	r	rr	r	)Srrrr
rr
rrrrr
r
r
r	rr	r	rr
rrr	r
r	r
r	rrrr	rrr	rrrr	rr
rrr
r
rr	r
r
rrr	r	rr	r	rr	rrrr	rrrr	rr
rrrrrrr	rrr	r	rrrrr
r
)Srrrrrr
rrrr	r	rrr	rrr	rr
rr	rr	rr	rrrr	rr	r	rrrr	rrrrr	rrrr	r
rrrr	rrrr	rr	rrr	rrr	rrr	r
rr	rrrr	rr	r	rrrrrrrr)Srrrr
rrrr	rrr
r
rr	r
r	r
r	r
r	r
rr
r	rr	r	rr	rr
r	rrr
rr	rr	rr
r	rrrr
rr	rr	r	rr	rrrr	rrrrr	rr	r	r
rr	rrrrr
r
r
rr	rrrrr	r
)Srr
rrrrrrrr
rr	rr	rr	r	r	rr	rrr
r	r
r	rrrr	rrrrr	r
rrrrrr
r	rr	rr
r	r	r	r	r	r	r	rrrrr	r	rrr	r	r	r
r	rrr	r	r
r	rrrrrrr	rr	r	)Srrrr	rr	rrrrr	r	r	rr	r	r	rr	rrrr	rr	rrrrrrr	rrr	rrrrrrr	r	rrr	r	r	rrrrrrrrr	rr	rrr	rrrr	rrrrrr	r	rr	r	rrrrrr	r	)Srrrr	rrrrrrrr	rrr	rrrrrr	rrr	rr	rrrrrr	rr	r	r	rrrr	r	r	r	rrr	rrrrrrrrrrrrrrrr	rr	rrrrrrrrr	r	r	rrrrrrrr	)Srr
rrrr
rrrrr
r
r	r	rr	r	rr
rrrrrrr	rrrr	r
r
rr	r	rr	r	r
r
rr
r
rr	rr
r	rrr	rr	r	rr	r	rrr	rrr
r	r	r
rrrr	rr
r	r	rrr	rrrrr
r	)Srr
rr
rrrrrrrr	rr	r	r	r	r	r
rrrrrrr
r	r	r
rrrrr	rrr	r	rrr
r
r	r	rr	rr	r	rr	r	r	r	rrrrrr	r	r
rrr	rrrrr	rrrrrrrrrrrrr)Srrrrrr	rrrr	r
rr	rr	rrrrrr	r	rrrr	r	rrrr	r	r	rr	r	rrr	r	r	r
r	r	r	r	r	rrrrrrrrrrrrrrr	rrrr	rr	rrrrrr	r	rrrr	rrrr)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rr	rr	rrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrr)Srrrr	rrrrrr	r	r	r	rr	rr	r	r	r	r	r	rrrrrrrrrr	rr	r	r	rrr	r
rr	r	r	r	r	r	r	rrr	rrrrrrrrrrrrrrr	rr	r	rr	r	rrr	rrrrrrrr	)Srr	rr	rrrr	rrr	r	r	rr	rrrr	r	rr	r	rr	rr	rr	rrr	rrr	r	rrr	r	rr	rr	rr	r	rrrrrrrrrrrrrrrrrrr	rr	rrrr	r	r	r	r	rrrrrr	r	)Srrrrrrrrrrr	rrrr	rrrrrrrr	rrrrrrrr	rr	rr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrr	rrrrrrrrr	)Srrrr	rr	rr	rrr	r	r	rr	rr	rr	rr	r	r	rr	rrr	rrrr	r	rr	r	rrrrrr	r	rrrrr	rrr	rr	rrrr	rrrrr	r	rrr	rr	rrrr	rrrr	rrr	rrr	r	)Srrrrrrrrrrr	rrrr	rrrr	rr	rr	rrrrrrrr	r	r	rr	r	rrrr	rr	r	rrr	rrrrrrrrrrr	rrrrrrrrr	rr	rrrr	rrrr	rrrrrrr)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrr	)Srr	rr	rrrr	rr	r	r	rr	rrrrr	rr	r	r	rr	r	rrr	rr	rrrrr	rrr	rr	r	rr	rr
rrrr	rrrr	rr	rrrrrr	rr	rr	rr	rrrr	r	rrrrrrrrrr)Srrrr	rrrrrrrrr
rrrrrrrr	rrrrrrrrrrrrrr	r	rr
rr	rr	r	rrr	rr	rrrrrrrrrrrrrrrrrr	rrrrrr	r	r	rr	r	rrrrrr	)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	)Srrrr	rrrr	rrrr	rrr	rrrr	rrrr	rrrrrr	rrrrrr	rrr	rr
r
rrrrr	rrrr	rrrrrrrrr	rrrrrr	rrrrrrrr	r	rrr	rrrrrr)Srrrrrr	rr	rrrrrrrrr	rr	rr	rr	rr	rrrr	rr	rr	rr	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	rrrrrr)Srrrr	rr	rrrrr	rrrr	rrrrrrrrrrrrrrrr	rrrrr	rrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrr	)Srrrr
rr
rrrr	rr	r	r	rr	r	r	rr	rrr
rr
r
r
rr	rr
r
rrr
rr	rr
rr	rrr	r	rr	r	rr	rrrr	rr	rrr	r	rr
r	rr	r	rr	rr	rr	rr
rr
r	rrr	rr	r)Srr	rr	rr	rr	rr	r	rr	rr	rr	rrr	r	r	r	r	r	r	r	rr	rrr	r	rr	rr	rrrr	rrr	rrrrrrrrrrrrrrr	rrr
r	rrr	rr	rrrrr	rrr	r	rr	rrrr)Srr	rr	rrrrrrrr	r	rr	rr	rrrr	rrrr	rr	rrrr	r	r	rr	r	r	rr	rrr	r	rr	rr	r	rrrrrrrrrrr	rrr	rrrr	rrrrrrr	r	rr	r	rrrrr	r	)Srr	rrrrrr	rr	rr	r	rr	r	r	rr	rr	r	rr	r	r	rrr	rr
r	r	rr	r	rr
rr	r	rr
r	rr
r	rrrrrrrrrrrrrrrrrrr	rr	rrrrrr	r
r	rrrrrr	r)Srr
rrrr
rrrrrr	r	rr	r	r	rrr	rrr
r	rr	rrrrrr	rrr
rrrrrrr
rrr	r
rrrrrrr	rrr	rrr	rrrr	r	r	rrrrr	rrrrr	r	r	rrrrr	r)Srrrrrr	rrrr	r	r	rrr	r	rrr	r	rrr	rrrrrr	rrrrrr	rrrrr	r	rr	rr	r	rrrrrr	rrrrr	rrrrr	rrr	r	rr	rrrrr	r	rr	r	rrrrrr)Srrrrrrrrrr	rrr	rrrr	rr	r	r	rrr	rrr	rrrr	r	rrr
rrrr	rr	rr	rr	r	rrrrrrr	r	rrrrr	rrrrr	rr	rrrrrrrrrrrrr	rrr	r	)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)Srrrr	rrrrrrr	r	r	rrrrrrrrrrrr	rrrrrr	rrrr	r	rrrrrrrrrrrrrrrrr	rrrrrrrrrrrr	rrrrrrrr	r	rr	rrrrr	rr)Srrrr	rr
rrrrrrrrr	rrrr	rrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrr	rrrrrr	)Srrrr
rr
rrrrrr	r	rr
rr	rr	r	r	rrrrrr	rrrrrrrr
r	rrrrrr	rrr	r	r	rrrrrrrrrrrr	rrrr	rrr	rrrrrrr	r
rrrrr	rrrr	)Srrrr
rrrrrrr
rr	r	rr	r	r	rr	rrr
r	rr
rrrrr	rr	rrrrr	r
rrr
r
rrr
r
r
rr	r	rrr	rr	r	rr	r	rrr	rrrrr	rrrr	r	rrr
rrrr	rrr
)Srrrrrr	rr	rr	rrrr	r	rrr	rr	rr	r
r	rr	rrrrrrr	rr	rrrr
r
r	rr
rrr
rr	rr	rrr	rrr	rrr	r	r	r
r	r	r	r
rrrr	r	rr	r	r	rrrr	rrrr	)Srrrr
rrrr	rr	r
r
r	rrr	rrr
rrrrrrr	r	r	rr	r
r
rr	r	rrrr
r
r	r
r
rr	r
r
rrr	rrr	r	rrr
rrrrrr	rr	r
rrrr	rr
rr	rr	rrrrrrr)Srr	rrrrrrrrr
r
r	r	r	r	r	rrrr	rrrr	rrrr	rr
rr	r	r	r	rr
r
rr
r
r
rr	r
r
r
rr	rrrrrr	rrrrrr
rr	rrrr	rr	rrr
rr
rr	rrrrr
r)Srr	rrrr
rr	rr	rrr	rr	rr	r	r	r	r	rrr	r	rrrr	r	r	r	r	rr	r	r	rrrr	rrrrrrrrr	rrrrrrrrrr	rr	r	rr	rrr	rrrr	rr	rrrrrrrrrr)Srr	rr	rrrr	rrr
rr	r	r	rrrrrr	rrrrrr
rr	rrr	rrrr	r	r	rr	rr
r	rr	rrr	rrr	rrrrrrrrrrrrrr	rrrrrrr	rrrr
rrrrrrr	)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrr	rrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrr)Srrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrr)Srrrrrrrr	rrrr	rrrr	rrrrrr	r
r	r
r	r	rrrrr	rr	rrrrr	rrrr	r	r	rrrr	rrr	rr	rrrrr	r	r	rrr	r	r
rrrr	rrr	r	r	rrrr	rrr	r	)Srrrr	rr	rr	rr	r
r
r	r	r	r	rr	rr	r	r	rrrr	r	r	r	rr	r
r	r	rr	rrr
r
r
r
rr	rr
r
r	rrr	r	r	r	rr	r	rrr	rrr	r	r	rrrrrrrr	rrrrrr	rrrrc��eZdZdZdZdZdZdZdd�Zdd	�Z	d
e
eefde
ddfd�Zdefd
�Zdefd�Zde
eefdee
e
ffd�Zy)�JapaneseContextAnalysis�����di�r�returnNc�j�d|_g|_d|_d|_d|_|j�y�NrrF)�
_total_rel�_rel_sample�_need_to_skip_char_num�_last_char_order�_done�reset��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/jpcntx.py�__init__z JapaneseContextAnalysis.__init__s1�����&(���&'��#� "�����
��
�
��c�f�d|_dg|jz|_d|_d|_d|_yr)r�NUM_OF_CATEGORYrrrrrs rrzJapaneseContextAnalysis.reset�s9������3��!5�!5�5���'(��#� "�����
r�byte_str�	num_bytesc��|jry|j}||kr�|j|||dz�\}}||z
}||kDr||z
|_d|_n||dk7rp|jdk7ra|xjdz
c_|j|j
kDrd|_y|jt|j|xxdz
cc<||_||kr��yy)NrrrT)rr�	get_orderrr�MAX_REL_THRESHOLDr�jp2_char_context)rr!r"�i�order�char_lens      r�feedzJapaneseContextAnalysis.feed�s����:�:��
�'�'���)�m�"�n�n�X�a�!�a�%�-@�A�O�E�8�
��M�A��9�}�./�)�m��+�(*��%��R�K�d�&;�&;�r�&A��O�O�q�(�O�����)?�)?�?�%)��
���$�$�(��)>�)>�?��F�����).��%��)�mrc�4�|j|jkDS�N)r�ENOUGH_REL_THRESHOLDrs r�got_enough_dataz'JapaneseContextAnalysis.got_enough_data�s������!:�!:�:�:rc��|j|jkDr)|j|jdz
|jzS|jS)Nr)r�MINIMUM_DATA_THRESHOLDr�	DONT_KNOWrs r�get_confidencez&JapaneseContextAnalysis.get_confidence�sA���?�?�T�8�8�8��O�O�d�&6�&6�q�&9�9�T�_�_�L�L��~�~�r�_c��y)N�rr�)rr3s  rr$z!JapaneseContextAnalysis.get_order�s��r�rN)�__name__�
__module__�__qualname__r r1r-r%r0rrr�bytes�	bytearray�intr*�boolr.�floatr2rr$r6rrr
r
xs����O��I��������
�.�U�5�)�#3�4�.��.��.�:;��;�����5��	�!1�2��u�S�#�X��rr
c�Z��eZdZd�fd�Zedefd��Zdeee	fde
eeffd�Z�xZ
S)�SJISContextAnalysisrc�0��t�|��d|_y)N�	SHIFT_JIS)�superr�
_charset_name)r�	__class__s �rrzSJISContextAnalysis.__init__�s���
����(��rc��|jSr,)rErs r�charset_namez SJISContextAnalysis.charset_name�s���!�!�!rr!c���|sy|d}d|cxkrdksnd|cxkrdkr nnd}|dk(sd	|cxkrdkr
nn
d
|_nd}t|�dkDr"|d}|dk(rd|cxkrd
kr
nd|fS|dz
|fSd|fS)Nr5r�����r���CP932r����r)rE�len�rr!�
first_charr)�second_chars     rr$zSJISContextAnalysis.get_order�s������a�[�
��J�&�$�&�D�J�,F�$�,F��H��d�"��
�(B�d�(B�%,��"��H��x�=�1��"�1�+�K��c�!���(C�t�(C��8�|��#�T�)�8�3�3��8�|�rr7)r8r9r:r�property�strrHrr;r<rr=r$�
__classcell__)rFs@rrArA�sH���)��"�c�"��"��%��y�(8�"9��e�C��H�o�rrAc�0�eZdZdeeefdeeeffd�Zy)�EUCJPContextAnalysisr!rc��|sy|d}|dk(sd|cxkrdkrnnd}n
|dk(rd}nd	}t|�d	kDr"|d	}|d
k(rd|cxkrdkr
nd|fS|dz
|fSd|fS)
Nr5r���r�r	r���r)rSrTs     rr$zEUCJPContextAnalysis.get_order�s������a�[�
��$��D�J�$>�$�$>��H�
�4�
��H��H��x�=�1��"�1�+�K��d�"���)D��)D��8�|��#�T�)�8�3�3��8�|�rN)	r8r9r:rr;r<rr=r$r6rrr[r[�s'���%��y�(8�"9��e�C��H�o�rr[N)�typingrrrr&r
rAr[r6rr�<module>rds>��8&�%�T��pB�B�J�1��<�2�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/euckrprober.cpython-312.pyc000064400000002636151732703240024220 0ustar00�

R`i���J�ddlmZddlmZddlmZddlmZGd�de�Zy)�)�EUCKRDistributionAnalysis)�CodingStateMachine)�MultiByteCharSetProber)�EUCKR_SM_MODELc�L��eZdZd�fd�Zedefd��Zedefd��Z�xZS)�EUCKRProber�returnc���t�|��tt�|_t�|_|j�y)N)�super�__init__rr�	coding_smr�distribution_analyzer�reset)�self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/euckrprober.pyrzEUCKRProber.__init__#s.���
����+�N�;���%>�%@��"��
�
��c��y)NzEUC-KR��rs r�charset_namezEUCKRProber.charset_name)���rc��y)N�Koreanrrs r�languagezEUCKRProber.language-rr)r	N)	�__name__�
__module__�__qualname__r�property�strrr�
__classcell__)rs@rrr"s>������c������#���rrN)	�chardistributionr�codingstatemachiner�mbcharsetproberr�mbcssmrrrrr�<module>r&s ��88�2�3�"�
�(�
rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/sbcharsetprober.cpython-312.pyc000064400000014436151732703250025067 0ustar00�

R`i��l�ddlmZmZmZmZmZddlmZddlm	Z	m
Z
mZGd�de�ZGd�de�Z
y	)
�)�Dict�List�
NamedTuple�Optional�Union�)�
CharSetProber)�CharacterCategory�ProbingState�SequenceLikelihoodc�r�eZdZUeed<eed<eeefed<eeeeeffed<eed<eed<eed<y)	�SingleByteCharSetModel�charset_name�language�char_to_order_map�language_model�typical_positive_ratio�keep_ascii_letters�alphabetN)	�__name__�
__module__�__qualname__�str�__annotations__r�int�float�bool����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/sbcharsetprober.pyrr#sD�����M��C��H�~�%���d�3��8�n�,�-�-�!�!����Mrrc	���eZdZdZdZdZdZ		ddedede	e
d	df�fd
�
Zd�fd�Ze
d	e	efd��Ze
d	e	efd
��Zdeeefd	efd�Zd	efd�Z�xZS)�SingleByteCharSetProber�@igffffff�?g�������?N�model�is_reversed�name_prober�returnc���t�|��||_||_||_d|_g|_d|_d|_d|_	d|_
|j�y�N�r)�super�__init__�_model�	_reversed�_name_prober�_last_order�
_seq_counters�_total_seqs�_total_char�
_control_char�
_freq_char�reset)�selfr$r%r&�	__class__s    �r r,z SingleByteCharSetProber.__init__3s^���	�������$���'������(*����������������
�
�rc���t�|��d|_dgtj�z|_d|_d|_d|_d|_	yr))
r+r6r0r�get_num_categoriesr1r2r3r4r5)r7r8s �r r6zSingleByteCharSetProber.resetGsL���
��
������S�#5�#H�#H�#J�J��������������rc�r�|jr|jjS|jjS�N)r/rr-�r7s r rz$SingleByteCharSetProber.charset_nameRs-������$�$�1�1�1��{�{�'�'�'rc�r�|jr|jjS|jjSr<)r/rr-r=s r rz SingleByteCharSetProber.languageXs-������$�$�-�-�-��{�{�#�#�#r�byte_strc���|jjs|j|�}n|j|�}|s|jS|jj
}|jj}|D]�}|j|tj�}|tjkr|xjdz
c_||jkr�|xjdz
c_
|j|jkr]|xjdz
c_|j s||j|}n|||j}|j"|xxdz
cc<||_��|jj$}|jt&j(k(r�|j|j*kDr�|j-�}||j.kDr>|j0j3d||�t&j4|_|jS||j8kr=|j0j3d|||j8�t&j:|_|jS)Nrz$%s confidence = %s, we have a winnerz8%s confidence = %s, below negative shortcut threshold %s)r-r�filter_international_words�remove_xml_tags�staterr�getr
�	UNDEFINED�CONTROLr3�SAMPLE_SIZEr5r0r2r.r1rr�	DETECTING�SB_ENOUGH_REL_THRESHOLD�get_confidence�POSITIVE_SHORTCUT_THRESHOLD�logger�debug�FOUND_IT�_state�NEGATIVE_SHORTCUT_THRESHOLD�NOT_ME)	r7r?rr�char�order�lm_catr�
confidences	         r �feedzSingleByteCharSetProber.feed^s���{�{�-�-��6�6�x�@�H��+�+�H�5�H���:�:�� �K�K�9�9�����3�3���D�%�)�)�$�0A�0K�0K�L�E��(�0�0�0�� � �A�%� ��t�'�'�'����1�$���#�#�d�&6�&6�6��$�$��)�$��>�>�!/��0@�0@�!A�%�!H��!/��!6�t�7G�7G�!H���&�&�v�.�!�3�.�$�D��%�(�{�{�/�/���:�:��/�/�/����$�">�">�>�!�0�0�2�
��� @� @�@��K�K�%�%�>��j��#/�"7�"7�D�K��z�z�� �$�"B�"B�B��K�K�%�%�R�$�"��8�8�	�#/�"5�"5�D�K��z�z�rc��d}|jdkDr�|jtjd|jtjzz|jz|j
jz}||j|jz
z|jz}||jz|jz}|dk\rd}|S)Ng{�G�z�?rg�?g�?g�G�z��?)
r2r1r�POSITIVE�LIKELYr-rr3r4r5)r7�rs  r rJz&SingleByteCharSetProber.get_confidence�s��������a���&�&�'9�'B�'B�C��T�/�/�0B�0I�0I�J�J�K��"�"�	#�
�+�+�4�4�5�
��T�%�%��(:�(:�:�;�d�>N�>N�N�A��D�O�O�#�d�&6�&6�6�A��C�x����r)FN)r'N)rrrrGrIrKrPrrrr	r,r6�propertyrrrr�bytes�	bytearrayrrVrrJ�
__classcell__)r8s@r r"r"-s�����K�"��"&��"&��
"�/3�	�%�����m�,�	�

��(	��(�h�s�m�(��(�
�$�(�3�-�$��$�
0�U�5�)�#3�4�0��0�d��rr"N)�typingrrrrr�
charsetproberr	�enumsr
rrrr"rrr �<module>rbs0��:;�:�(�F�F��Z��u�m�urpython3.12/site-packages/pip/_vendor/chardet/__pycache__/sbcsgroupprober.cpython-312.pyc000064400000004545151732703250025120 0ustar00�

R`i)���ddlmZddlmZddlmZmZddlmZm	Z	ddl
mZddlm
Z
mZmZmZmZmZddlmZddlmZdd	lmZGd
�de�Zy)
�)�CharSetGroupProber)�HebrewProber)�ISO_8859_5_BULGARIAN_MODEL�WINDOWS_1251_BULGARIAN_MODEL)�ISO_8859_7_GREEK_MODEL�WINDOWS_1253_GREEK_MODEL)�WINDOWS_1255_HEBREW_MODEL)�IBM855_RUSSIAN_MODEL�IBM866_RUSSIAN_MODEL�ISO_8859_5_RUSSIAN_MODEL�KOI8_R_RUSSIAN_MODEL�MACCYRILLIC_RUSSIAN_MODEL�WINDOWS_1251_RUSSIAN_MODEL)�TIS_620_THAI_MODEL)�ISO_8859_9_TURKISH_MODEL)�SingleByteCharSetProberc� ��eZdZd�fd�Z�xZS)�SBCSGroupProberc�&��t�|��t�}ttd|��}ttd|��}|j||�tt�tt�tt�tt�tt�tt�tt�tt�tt�tt�tt �tt"�|||g|_|j'�y)NF)�is_reversed�name_proberT)�super�__init__rrr	�set_model_probersrr
rrrr
rrrrrr�probers�reset)�self�
hebrew_prober�logical_hebrew_prober�visual_hebrew_prober�	__class__s    ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/sbcsgroupprober.pyrzSBCSGroupProber.__init__3s����
����$��
� 7�%�5�m�!
��
 7�%�4�]� 
��	�'�'�(=�?S�T�
$�$>�?�#�$8�9�#�$<�=�#�$=�>�#�$8�9�#�$8�9�#�$:�;�#�$<�=�#�$>�?�#�$@�A�

$�$6�7�#�$<�=��!� �'
���*	
�
�
��)�returnN)�__name__�
__module__�__qualname__r�
__classcell__)r!s@r"rr2s
���%�%r#rN)�charsetgroupproberr�hebrewproberr�langbulgarianmodelrr�langgreekmodelrr�langhebrewmodelr	�langrussianmodelr
rrr
rr�
langthaimodelr�langturkishmodelr�sbcharsetproberrr�r#r"�<module>r3s8��:3�&�X�L�6���.�6�4�&�(�&r#python3.12/site-packages/pip/_vendor/chardet/__pycache__/macromanprober.cpython-312.pyc000064400000016071151732703250024703 0ustar00�

R`i���x�ddlmZmZddlmZddlmZdZdZdZ	dZ
dZdZdZ
d	Zd
ZdZdZge	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e	�e	�e	�e	�e	�e	�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e	�e	�e	�e	�e	�e�e�e
�e�e
�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e	�e	�e	�e	�e	�e	�e	�e�e	�e	�e�e�e	�e	�e�e�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e�e�e	�e	�e�e	�e�e	�e	�e	�e	�e	�e	�e�e�e�e�e�e	�e	�e	�e	�e	�e	�e	�e�e�e�e�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e��Zd
ZGd�de�Zy)�)�List�Union�)�
CharSetProber)�ProbingState��������	)Qrrrrrrrrrrr
r
r
r
r
r
r
rrr
r
r
r
r
r
r
rrr
r
r
rrr
r
rrr
r
r
rr	rr	rrr
r
r
r
r
r
r
rrr
rr
rrrr
rrr
rr
rrr
r
rrrrrrrrrrc�~��eZdZd	�fd�Zd	�fd�Zedefd��Zedefd��Zde	e
efdefd�Z
defd�Z�xZS)
�MacRomanProber�returnc�f��t�|��t|_g|_|j�y)N)�super�__init__�OTH�_last_char_class�
_freq_counter�reset��self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/macromanprober.pyrzMacRomanProber.__init__ns'���
���� #���(*����
�
��c�t��t|_dgtz|_d|jd<t�|��y)Nr�
r	)rr�FREQ_CAT_NUMrrrrs �rrzMacRomanProber.resetts5��� #����S�<�/���
!#����1��
��
�rc��y)N�MacRoman��rs r�charset_namezMacRomanProber.charset_names��rc��y)N�r$r%s r�languagezMacRomanProber.language�s��r�byte_strc� �|j|�}|D]m}t|}t|jtz|z}|dk(r"t
j|_|jS|j|xxdz
cc<||_�o|jS)Nrr)
�remove_xml_tags�MacRoman_CharToClass�MacRomanClassModelr�	CLASS_NUMr�NOT_ME�_stater�state)rr*�c�
char_class�freqs     r�feedzMacRomanProber.feed�s����'�'��1���A�-�a�0�J�%�t�'<�'<�y�'H�J�&V�W�D��q�y�*�1�1�����z�z��
���t�$��)�$�$.�D�!���z�z�rc���|jtjk(ryt|j�}|dkrdn$|jd|jddzz
|z}t|d�}|dz}|S)Ng{�G�z�?gr
rg4@g\��(\�?)r2rr0�sumr�max)r�total�
confidences   r�get_confidencezMacRomanProber.get_confidence�s����:�:��,�,�,���D�&�&�'���t�|�
��$�$�Q�'�$�*<�*<�Q�*?�$�*F�F�%�O�	�
��S�)�
�	�d��
��r)rN)�__name__�
__module__�__qualname__rr�property�strr&r)r�bytes�	bytearrayrr6�floatr<�
__classcell__)rs@rrrmsl����	���c������#�����U�5�)�#3�4������rrN)�typingrr�
charsetproberr�enumsrr!�UDFr�ASC�ASS�ACV�ACO�ASV�ASO�ODDr/r-r.rr$rr�<module>rQsT
��>�(����������������������
�	�!��!�	�!��!��!��!� �!�"%�!�'*�!��!�	�!��!��!��!� �!�"%�!�'*�!��!�

�!��!��!��!�!�!�#&�!�(+�!��	!�

�	!��	!��	!��	!�!�	!�#&�	!�(+�	!�
�!�


�!�
�!�
�!�
�!�
!�!�
#&�!�
(+�!��
!�

�
!��
!��
!��
!�!�
!�#&�
!�(+�
!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!� �!!� 

�!!� �!!� �!!� �!!� !�!!� #&�!!� (+�!!�"�#!�"

�#!�"�#!�"�#!�"�#!�"!�#!�"#&�#!�"(+�#!�$�%!�$

�%!�$�%!�$�%!�$�%!�$!�%!�$#&�%!�$(+�%!�&�'!�&

�'!�&�'!�&�'!�&�'!�&!�'!�&#&�'!�&(+�'!�(�)!�(

�)!�(�)!�(�)!�(�)!�(!�)!�(#&�)!�((+�)!�*�+!�*

�+!�*�+!�*�+!�*�+!�*!�+!�*#&�+!�*(+�+!�,�-!�,

�-!�,�-!�,�-!�,�-!�,!�-!�,#&�-!�,(+�-!�.�/!�.

�/!�.�/!�.�/!�.�/!�.!�/!�.#&�/!�.(+�/!�0�1!�0

�1!�0�1!�0�1!�0�1!�0!�1!�0#&�1!�0(+�1!�2�3!�2

�3!�2�3!�2�3!�2�3!�2!�3!�2#&�3!�2(+�3!�4�5!�4

�5!�4�5!�4�5!�4�5!�4!�5!�4#&�5!�4(+�5!�6�7!�6

�7!�6�7!�6�7!�6�7!�6!�7!�6#&�7!�6(+�7!�8�9!�8

�9!�8�9!�8�9!�8�9!�8!�9!�8#&�9!�8(+�9!�:�;!�:

�;!�:�;!�:�;!�:�;!�:!�;!�:#&�;!�:(+�;!�<�=!�<

�=!�<�=!�<�=!�<�=!�<!�=!�<#&�=!�<(+�=!�>�?!�>

�?!�>�?!�>�?!�>�?!�>!�?!�>#&�?!�>(+�?!�@�A!�@

�A!�@�A!�@�A!�@�A!�@!�A!�@#&�A!�@(+�A!��N��5�]�5rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/langhungarianmodel.cpython-312.pyc000064400000242264151732703250025540 0ustar00�

R`i���b�ddlmZididd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d+�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d+�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5���d	idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd+�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d+�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d��id$d�d%d�d&d�d'd+�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd+�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+ddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���ididd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd+�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd+�dd+�dd+�dd�dd�dd+�d d+�d!d+�d"d+�d#d+��id$d+�d%d+�d&d+�d'd�d(d+�d)d+�d*d+�d+d+�d,d+�d-d+�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d��id$d�d%d�d&d�d'd+�d(d�d)d+�d*d�d+d�d,d+�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+dd+dddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�dd�dd�d d+�d!d+�d"d�d#d��id$d�d%d�d&d�d'd+�d(d�d)d�d*d+�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd+�dd�dd�d d�d!d+�d"d+�d#d��id$d�d%d�d&d+�d'd+�d(d�d)d+�d*d+�d+d+�d,d+�d-d+�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+d+d+d+ddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd+�dd+�dd+�dd�dd+�dd+�d d+�d!d+�d"d+�d#d+��id$d+�d%d+�d&d+�d'd�d(d+�d)d+�d*d+�d+d+�d,d�d-d+�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��dddd+ddddddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d��id$d�d%d�d&d�d'd+�d(d�d)d+�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+ddd+ddddd5���didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd�dd�dd+�dd�dd+�d d+�d!d+�d"d+�d#d��id$d+�d%d�d&d+�d'd+�d(d�d)d+�d*d+�d+d+�d,d+�d-d+�d.d�d/d+�d0d�d1d�d2d�d3d�d4d��dddd+d+dd+dddddd5���d idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d��id$d�d%d�d&d�d'd+�d(d�d)d�d*d�d+d�d,d+�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+d+ddddddd5���d!idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd+�dd+�dd+�dd+�dd+�d d+�d!d�d"d�d#d+��id$d+�d%d+�d&d+�d'd�d(d�d)d+�d*d+�d+d+�d,d+�d-d+�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��dddd+ddd+dddddd5���d"idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd+�dd+�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd+�d(d�d)d�d*d�d+d+�d,d+�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+dd+d+d+dddd5���d#idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d+��id$d+�d%d�d&d+�d'd+�d(d�d)d+�d*d+�d+d+�d,d+�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+d+dd+dd+ddd5����id$idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd+�dd+�dd+�dd+�dd+�d d+�d!d+�d"d+�d#d+��id$d+�d%d+�d&d+�d'd+�d(d�d)d�d*d+�d+d+�d,d+�d-d+�d.d�d/d+�d0d�d1d�d2d�d3d�d4d��dddd+d+d+d+d+ddd+dd5���d%idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d��id$d+�d%d+�d&d�d'd+�d(d+�d)d�d*d�d+d�d,d+�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+dddddddd5���d&idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd+�dd+�dd+�dd�dd+�d d+�d!d+�d"d�d#d+��id$d�d%d�d&d+�d'd+�d(d�d)d�d*d+�d+d+�d,d+�d-d�d.d�d/d+�d0d+�d1d�d2d�d3d�d4d��dddd+d+ddd+dd+ddd5���d'idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd+�dd+�dd+�dd�dd�dd+�d d+�d!d�d"d�d#d+��id$d+�d%d+�d&d+�d'd�d(d+�d)d+�d*d+�d+d+�d,d�d-d+�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5���d(idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d��id$d+�d%d�d&d�d'd+�d(d+�d)d+�d*d�d+d�d,d+�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+dddddddd5���d)idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd+�dd+�dd+�dd�dd+�d d�d!d+�d"d+�d#d+��id$d+�d%d+�d&d+�d'd+�d(d�d)d+�d*d+�d+d+�d,d+�d-d+�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��dddd+d+dd+d+d+d+ddd5���d*idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d+��id$d�d%d+�d&d+�d'd+�d(d�d)d+�d*d+�d+d+�d,d+�d-d�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��dddd+d+d+d+d+d+d+ddd5���d+idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd+�dd�dd�dd+�dd�dd�d d+�d!d+�d"d+�d#d+��id$d+�d%d�d&d+�d'd+�d(d�d)d+�d*d+�d+d+�d,d+�d-d+�d.d�d/d+�d0d�d1d�d2d�d3d�d4d��dddd+d+dd+d+d+d+d+dd5���d,idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�dd�dd�dd+�d d�d!d�d"d�d#d+��id$d+�d%d+�d&d+�d'd�d(d�d)d+�d*d+�d+d+�d,d�d-d+�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d-idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d��id$d�d%d�d&d�d'd+�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+dddddddd5���d.idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d/idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd+�dd�dd�d d�d!d+�d"d�d#d��id$d�d%d�d&d+�d'd+�d(d�d)d�d*d+�d+d+�d,d+�d-d+�d.d�d/d�d0d�d1d�d2d�d3d�d4d��dddd+d+ddd+ddddd5���d0idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd+�dd�dd�dd+�dd+�dd�dd�d d�d!d+�d"d�d#d+��id$d�d%d+�d&d+�d'd+�d(d�d)d�d*d+�d+d+�d,d+�d-d�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��dddd+d+d+d+d+dd+ddd5���d1idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d2idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d+�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d3idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d4idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5����idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd+�dd+�dd+�dd�dd�dd+�d d�d!d�d"d+�d#d+��id$d+�d%d+�d&d+�d'd�d(d�d)d+�d*d+�d+d+�d,d�d-d+�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd+�dd�dd+�dd�dd�dd+�d d+�d!d�d"d�d#d+��id$d+�d%d+�d&d+�d'd�d(d+�d)d+�d*d+�d+d+�d,d�d-d+�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�d d�d!d�d"d�d#d��id$d�d%d�d&d+�d'd�d(d�d)d+�d*d�d+d+�d,d�d-d+�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd+�dd�dd+�dd�dd�dd�d d�d!d�d"d�d#d+��id$d+�d%d�d&d+�d'd�d(d�d)d+�d*d+�d+d+�d,d�d-d�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd+�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d+��id$d+�d%d+�d&d+�d'd�d(d�d)d+�d*d+�d+d+�d,d�d-d+�d.d�d/d�d0d+�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�d d�d!d�d"d+�d#d��id$d+�d%d�d&d�d'd�d(d�d)d+�d*d+�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd+�d d�d!d�d"d�d#d+��id$d+�d%d�d&d+�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d+�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��d5��Zidd6�dd6�dd6�d+d6�d&d6�d*d6�d$d6�d#d6�d'd6�d!d6�d)d7�d0d6�dd6�d%d7�d8d6�d9d6�d/d6�idd6�dd6�d-d6�d d6�d,d6�d"d6�d(d6�d:d6�d;d6�dd6�dd6�dd6�d<d6�d=d6�d>d6�dd?�dd?��idd?�dd?�dd?�dd?�dd?�dd?�dd?�dd?�d@d?�dd?�d2d?�dd?�dd?�dd?�ddA�d
dA�d	dA��id1dA�ddA�d
dA�ddA�ddA�dBdA�ddA�d4d?�dCd?�dDd?�d3d?�d.d?�dEd?�dFd?�dGd�dHd�dId��idJd�dKd�dLd	�dMd
�dNd�dOd�dPd
�dQd�dRd�dSd�dTd�dUd�dVd�dWdN�dXd�dYd�dZd��id[d�d\d�d]dF�d^dJ�d_d�d`d�dad?�dbd?�dcd?�ddd?�ded?�dfd?�dgd�dhd�did�djd�dkd��idld�dmd�dnd �dod!�dpd"�dqd#�drd$�dsd%�dtd&�dud'�dvd(�dwdI�dxd)�dyd*�dzd+�d{d,�d|d-��id}dG�d~d.�dd/�d�d0�d�d?�d�d?�d�d?�d�d?�d�d?�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dT�d�d��d�dK�d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�dÓd�dœd�dƓd�dǓd�dȓd�dɓd�dʓd�d˓d�dR�d�d̓d�d͓�id�dΓd�dϓd�dГd�dѓd�dғd�dӓd�dW�d�dԓd�dՓd�d֓d�dדd�dؓd�dٓd�dړd�dۓd�dܓd�dݓ�id�dޓd�dߓd�d�d�d�d�d�d�d�d�d1�d�dY�d�d�d�dV�d�d�d�d�d�d�d�d�d�d2�d�d�d�d��id�d�d�d3�d�d�d�d�d�d�d�d�d�d�d�d4�d�d�d�dH�d�dC�d�d�d�d�d�d�d�dD�d�dL�d�dE��id�d��d�d��d�d��d�dZ�d�d8�d�dQ�d�d��d�dM�d�dX�d�d��d�dO�d�d��d�d9�d�d[�d�dU�d�d\�d�d=��id�dS�d�d]�d�d��d�d��d�d��d�d;�d�dP�d�d@�d�d:�d�d��d�d��d��d��dd>��ddB�dAd<�d?�d�d7dA��d6d?i�Ze�d�dee�d�d�d���Zidd6�dd6�dd6�d+d6�d&d6�d*d6�d$d6�d#d6�d'd6�d!d6�d)d7�d0d6�dd6�d%d7�d8d6�d9d6�d/d6�idd6�dd6�d-d6�d d6�d,d6�d"d6�d(d6�d:d6�d;d6�dd6�dd6�dd6�d<d6�d=d6�d>d6�dd?�dd?��idd?�dd?�dd?�dd?�dd?�dd?�dd?�dd?�d@d?�dd?�d2d?�dd?�dd?�dd?�ddA�d
dA�d	dA��id1dA�ddA�d
dA�ddA�ddA�dBdA�ddA�d4d?�dCd?�dDd?�d3d?�d.d?�dEd?�dFd?�dGd�dHd�dId��idJd�dKd�dLd	�dMd
�dNd�dOd�dPd
�dQd�dRd�dSd�dTd�dUd�dVd�dWdM�dXd�dYd�dZd��id[d�d\d�d]dF�d^dJ�d_d�d`d�dad?�dbd?�dcd?�ddd?�ded?�dfd?�dgd�dhd�did�djd�dkd��idld�dmd�dnd �dod!�dpd"�dqd#�drd$�dsd%�dtd&�dud'�dvd(�dwdI�dxd)�dyd*�dzd+�d{d,�d|d-��id}dG�d~d.�dd/�d�d0�d�d?�d�d?�d�d?�d�d?�d�d?�d�d“d�dēd�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�dÓd�dœd�dƓd�dǓd�dȓd�dɓd�dʓd�d˓d�dQ�d�d̓d�d͓�id�dΓd�dϓd�dГd�dѓd�dғd�dӓd�dU�d�dԓd�dՓd�d֓d�dדd�dؓd�dٓd�dړd�dۓd�dܓd�dݓ�id�dޓd�dߓd�d�d�d�d�d�d�d�d�d1�d�dW�d�d�d�dT�d�d�d�d�d�d�d�d�d�d2�d�d�d�d��id�d�d�d3�d�d�d�d�d�d�d�d�d�d�d�d4�d�d�d�dH�d�dC�d�d�d�d�d�d�d�dD�d�dK�d�dE��id�d��d�d��d�d��d�dX�d�d8�d�dP�d�d��d�dL�d�dV�d�d��d�dN�d�d��d�d9�d�dY�d�dS�d�dZ�d�d=��id�dR�d�d[�d�d��d�d��d�d��d�d;�d�dO�d�d@�d�d:�d�d��d�d��d��d��dd>��ddB�dAd<�d?�d�d7dA��d6d?i�Ze�d�dee�d�d�d���Z�y	(
�)�SingleByteCharSetModel��(��6�-�� �2�1�&�'�5�$�)�"�#�/�.�+�!�%�9�0�7�4�������	����
����
�����>���3�,�=�:)�;�<�?��������*�8��r:r;r>r=r@r<r?�rA�rBr7r8r9�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zwindows-1250�	Hungariang��(��P�?TuPABCDEFGHIJKLMNOPRSTUVZabcdefghijklmnoprstuvzÁÉÍÓÖÚÜáéíóöúüŐőŰű)�charset_name�language�char_to_order_map�language_model�typical_positive_ratio�keep_ascii_letters�alphabetz
ISO-8859-2N)�#pip._vendor.chardet.sbcharsetproberr�HUNGARIAN_LANG_MODEL�$WINDOWS_1250_HUNGARIAN_CHAR_TO_ORDER�WINDOWS_1250_HUNGARIAN_MODEL�"ISO_8859_2_HUNGARIAN_CHAR_TO_ORDER�ISO_8859_2_HUNGARIAN_MODEL����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/langhungarianmodel.py�<module>rs����F�@@��@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�@@�D�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�E@@�F�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�G@@�H�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�I@@�J�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�K@@�L
�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�M
@@�N�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�O@@�P�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�Q@@�R�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�S@@�T�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�U@@�V�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�W@@�X�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�Y@@�Z�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�[@@�\�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�]@@�^�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�_@@�`�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�a@@�b �@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�c @@�d"�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�e"@@�f$�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�g$@@�h&�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�i&@@�j(�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�k(@@�l*�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�m*@@�n,�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�o,@@�p.�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�q.@@�r0�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�s0@@�t2�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�u2@@�v4�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�w4@@�x6�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�y6@@�z8�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�{8@@�|:�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�}:@@�~<�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�<@@�@?�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�A?@@�BA�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�CA@@�DC�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�EC@@�FE�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�GE@@�HG�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�IG@@�JI�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�KI@@�LK�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�MK@@�NM�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�OM@@�PO�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�QO@@�RQ�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�SQ@@�TS�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	
�1�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	
�1�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	
�1�G@�H	�A�I@�J	
�1�K@�L	
�1�M@�N	�A�O@�P	�A�Q@�R	
�1�S@�T	
�1�U@�V	�A�W@�X	�A�Y@�Z	�A�[@�\	�A�]@�^	�A�_@�`	�A�a@�b	�A�c@�d	�A�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�US@@�VU�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�WU@@�XW�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�YW@@�ZY�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�[Y@@�\[�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�][@@�^]�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�_]@@�`_�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�a_@@�ba�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�ca@@�dc�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�ec@@�fe�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�ge@@�hg@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	
�1�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	
�1�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	
�1�G@	�H	�A�I@	�J	
�1�K@	�L	
�1�M@	�N	�A�O@	�P	�A�Q@	�R	
�1�S@	�T	
�1�U@	�V	�A�W@	�X	�A�Y@	�Z	�A�[@	�\	�A�]@	�^	�A�_@	�`	�A�a@	�b	�A�c@	�d	�A�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�}@@��R@A(��s�A(��s�A(��s�A(��s�	A(�
�s�A(��s�
A(��s�A(��s�A(��s�A(��s�A(���A(���A(���A(���A(���A(� ��!A(�"��#A(�$��%A(�&��'A(�(��)A(�*��+A(�,��-A(�.��/A(�0��1A(�2��3A(�4��5A(�6��7A(�8��9A(�:��;A(�<��=A(�>��?A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�$�F 6��
�:�'�#��
_� ��A&��s�A&��s�A&��s�A&��s�	A&�
�s�A&��s�
A&��s�A&��s�A&��s�A&��s�A&���A&���A&���A&���A&���A&� ��!A&�"��#A&�$��%A&�&��'A&�(��)A&�*��+A&�,��-A&�.��/A&�0��1A&�2��3A&�4��5A&�6��7A&�8��9A&�:��;A&�<��=A&�>��?A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�"�F4��
�8�'�#��
_��rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/enums.cpython-312.pyc000064400000005744151732703260023031 0ustar00�

R`i����dZddlmZmZGd�d�ZGd�de�ZGd�de�ZGd	�d
�ZGd�d�ZGd
�d�Z	y)zr
All of the Enums that are used throughout the chardet package.

:author: Dan Blanchard (dan.blanchard@gmail.com)
�)�Enum�Flagc��eZdZdZdZdZdZy)�
InputStatezS
    This enum represents the different states a universal detector can be in.
    r��N)�__name__�
__module__�__qualname__�__doc__�
PURE_ASCII�	ESC_ASCII�	HIGH_BYTE����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/enums.pyrr
s����J��I��Irrc�F�eZdZdZdZdZdZdZdZdZ	dZ
eezZeezezZy	)
�LanguageFilterzj
    This enum represents the different language filters we can apply to a
    ``UniversalDetector``.
    rrr����N)
r	r
rr�NONE�CHINESE_SIMPLIFIED�CHINESE_TRADITIONAL�JAPANESE�KOREAN�NON_CJK�ALL�CHINESE�CJKrrrrrsH���
�D������H�
�F��G�
�C� �#6�6�G�
�H�
�v�
%�Crrc��eZdZdZdZdZdZy)�ProbingStatezG
    This enum represents the different states a prober can be in.
    rrrN)r	r
rr�	DETECTING�FOUND_IT�NOT_MErrrr#r#%s����I��H�
�Frr#c��eZdZdZdZdZdZy)�MachineStatezN
    This enum represents the different states a state machine can be in.
    rrrN)r	r
rr�START�ERROR�ITS_MErrrr(r(/s���
�E�
�E�
�Frr(c�6�eZdZdZdZdZdZdZede	fd��Z
y)	�SequenceLikelihoodzX
    This enum represents the likelihood of a character following the previous one.
    rrr��returnc��y)z::returns: The number of likelihood categories in the enum.rr)�clss r�get_num_categoriesz%SequenceLikelihood.get_num_categoriesCs��rN)r	r
rr�NEGATIVE�UNLIKELY�LIKELY�POSITIVE�classmethod�intr2rrrr-r-9s6����H��H�
�F��H���3���rr-c�$�eZdZdZdZdZdZdZdZy)�CharacterCategoryz�
    This enum represents the different categories language models for
    ``SingleByteCharsetProber`` put characters into.

    Anything less than CONTROL is considered a letter.
    �����N)	r	r
rr�	UNDEFINED�
LINE_BREAK�SYMBOL�DIGIT�CONTROLrrrr:r:Is"����I��J�
�F��E��Grr:N)
r�enumrrrrr#r(r-r:rrr�<module>rFsO������&�T�&�"�4����
�
� �rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/utf1632prober.cpython-312.pyc000064400000023446151732703260024225 0ustar00�

R`i9!��B�ddlmZmZddlmZddlmZGd�de�Zy)�)�List�Union�)�
CharSetProber)�ProbingStatec���eZdZdZdZdZd�fd�Zd�fd�Zede	fd��Z
ede	fd	��Zdefd
�Z
defd�Zdefd�Zdefd
�Zdefd�Zdefd�Zdeeddfd�Zdeeddfd�Zdeeefdefd�Zedefd��Zdefd�Z�xZS)�
UTF1632Proberad
    This class simply looks for occurrences of zero bytes, and infers
    whether the file is UTF16 or UTF32 (low-endian or big-endian)
    For instance, files looking like (    [nonzero] )+
    have a good probability to be UTF32BE.  Files looking like (  [nonzero] )+
    may be guessed to be UTF16BE, and inversely for little-endian varieties.
    �g�G�z�?�returnNc���t�|��d|_dgdz|_dgdz|_t
j|_gd�|_d|_	d|_
d|_d|_d|_
d|_|j�y)Nr��rrrrF)�super�__init__�position�zeros_at_mod�nonzeros_at_modr�	DETECTING�_state�quad�invalid_utf16be�invalid_utf16le�invalid_utf32be�invalid_utf32le�'first_half_surrogate_pair_detected_16be�'first_half_surrogate_pair_detected_16le�reset��self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/utf1632prober.pyrzUTF1632Prober.__init__)s~���
������
��C�!�G��� !�s�Q�w���"�,�,��� ��	�$���$���$���$���7<��4�7<��4��
�
��c����t�|��d|_dgdz|_dgdz|_t
j|_d|_d|_	d|_
d|_d|_d|_
gd�|_y)Nrr
Fr)rrrrrrrrrrrrrrrrs �r!rzUTF1632Prober.reset8ss���
��
����
��C�!�G��� !�s�Q�w���"�,�,���$���$���$���$���7<��4�7<��4� ��	r"c��|j�ry|j�ry|j�ry|j�ryy)Nzutf-32bezutf-32lezutf-16bezutf-16lezutf-16)�is_likely_utf32be�is_likely_utf32le�is_likely_utf16be�is_likely_utf16le�rs r!�charset_namezUTF1632Prober.charset_nameFsA���!�!�#���!�!�#���!�!�#���!�!�#��r"c��y)N��r)s r!�languagezUTF1632Prober.languageSs��r"c�4�td|jdz�S)N��?g@��maxrr)s r!�approx_32bit_charsz UTF1632Prober.approx_32bit_charsW����3��
�
��+�,�,r"c�4�td|jdz�S)Nr0g@r1r)s r!�approx_16bit_charsz UTF1632Prober.approx_16bit_charsZr4r"c�f�|j�}||jk\xr�|jd|z|jkDxrp|jd|z|jkDxrO|jd|z|jkDxr.|jd|z|jkDxr
|j
S�Nrr��)r3�MIN_CHARS_FOR_DETECTIONr�EXPECTED_RATIOrr�r�approx_charss  r!r%zUTF1632Prober.is_likely_utf32be]s����.�.�0���t�;�;�;�
����a� �<�/�$�2E�2E�E�
)��!�!�!�$�|�3�d�6I�6I�I�
)��!�!�!�$�|�3�d�6I�6I�I�
)��$�$�Q�'�,�6��9L�9L�L�
)��(�(�(�	
r"c�f�|j�}||jk\xr�|jd|z|jkDxrp|jd|z|jkDxrO|jd|z|jkDxr.|jd|z|jkDxr
|j
Sr8)r3r;rr<rrr=s  r!r&zUTF1632Prober.is_likely_utf32legs����.�.�0���t�;�;�;�
�� � ��#�l�2�T�5H�5H�H�
)��!�!�!�$�|�3�d�6I�6I�I�
)��!�!�!�$�|�3�d�6I�6I�I�
)��!�!�!�$�|�3�d�6I�6I�I�
)��(�(�(�	
r"c�"�|j�}||jk\xro|jd|jdz|z|jkDxr>|jd|jdz|z|jkDxr
|j
S)Nrr:rr9)r6r;rr<rrr=s  r!r'zUTF1632Prober.is_likely_utf16beq����.�.�0���t�;�;�;�
�
�
!�
!�!�
$�t�';�';�A�'>�
>�,�N��!�!�
"�
)��"�"�1�%��(9�(9�!�(<�<��L��!�!�"�
)��(�(�(�	
r"c�"�|j�}||jk\xro|jd|jdz|z|jkDxr>|jd|jdz|z|jkDxr
|j
S)Nrr9rr:)r6r;rr<rrr=s  r!r(zUTF1632Prober.is_likely_utf16le{rAr"rc���|ddk7s)|ddkDs!|ddk(r |ddk(rd|dcxkrdkr
nnd|_|ddk7s)|ddkDs!|ddk(r#|ddk(rd|dcxkrdkrny	d|_y	y	y	y	)
z�
        Validate if the quad of bytes is valid UTF-32.

        UTF-32 is valid in the range 0x00000000 - 0x0010FFFF
        excluding 0x0000D800 - 0x0000DFFF

        https://en.wikipedia.org/wiki/UTF-32
        rr���r9��Tr:N)rr)rrs  r!�validate_utf32_charactersz'UTF1632Prober.validate_utf32_characters�s���
��G�q�L��A�w��~��Q��1���a��A��$�$�q�'�2I�T�2I�#'�D� ���G�q�L��A�w��~��Q��1���a��A��$�$�q�'�2I�T�2I�#'�D� �3J��r"�pairc�z�|js2d|dcxkrdkrnnd|_n9d|dcxkrdkr+nn(d|_n d|dcxkrdkrnnd|_nd|_|js3d|dcxkrdkrnnd|_y	d|dcxkrdkrny	d|_y	y	d|dcxkrdkr	d|_y	d|_y	)
a9
        Validate if the pair of bytes is  valid UTF-16.

        UTF-16 is valid in the range 0x0000 - 0xFFFF excluding 0xD800 - 0xFFFF
        with an exception for surrogate pairs, which must be in the range
        0xD800-0xDBFF followed by 0xDC00-0xDFFF

        https://en.wikipedia.org/wiki/UTF-16
        rEr��T��rFFrN)rrrr)rrHs  r!�validate_utf16_charactersz'UTF1632Prober.validate_utf16_characters�s����;�;��t�A�w�&�$�&�?C��<���a��(�D�(�'+��$��t�A�w�&�$�&�?D��<�'+��$��;�;��t�A�w�&�$�&�?C��<���a��(�D�(�'+��$�)��t�A�w�&�$�&�?D��<�'�(,��$r"�byte_strc��|D]�}|jdz}||j|<|dk(rW|j|j�|j|jdd�|j|jdd�|dk(r|j|xxdz
cc<n|j
|xxdz
cc<|xjdz
c_��|jS)Nr
r:rr9r)rrrGrLrr�state)rrM�c�mod4s    r!�feedzUTF1632Prober.feed�s����A��=�=�1�$�D��D�I�I�d�O��q�y��.�.�t�y�y�9��.�.�t�y�y��1�~�>��.�.�t�y�y��1�~�>��A�v��!�!�$�'�1�,�'��$�$�T�*�a�/�*��M�M�Q��M���z�z�r"c�:�|jtjtjhvr|jS|j	�dkDr!tj|_|jS|j
dkDrtj|_|jS)Ng�������?i)rr�NOT_ME�FOUND_IT�get_confidencerr)s r!rOzUTF1632Prober.state�sz���;�;�<�.�.��0E�0E�F�F��;�;����� �4�'�&�/�/�D�K�
�{�{��	�]�]�X�
%�'�-�-�D�K��{�{�r"c��|j�s0|j�s |j�s|j�rdSdS)Ng333333�?g)r(r'r&r%r)s r!rVzUTF1632Prober.get_confidence�sH���&�&�(��)�)�+��)�)�+��)�)�+�
�		
��		
r")rN) �__name__�
__module__�__qualname__�__doc__r;r<rr�property�strr*r.�floatr3r6�boolr%r&r'r(r�intrGrLr�bytes�	bytearrayrrRrOrV�
__classcell__)r s@r!r	r	s����!���N�
�!��
�c�
��
���#����-�E�-�-�E�-�
�4�
�
�4�
�
�4�
�
�4�
�(�d�3�i�(�D�(�,,�d�3�i�,�D�,�@
�U�5�)�#3�4�
��
��
�|�
��
�

��

r"r	N)�typingrr�
charsetproberr�enumsrr	r-r"r!�<module>rgs��*�(��F
�M�F
r"python3.12/site-packages/pip/_vendor/chardet/__pycache__/codingstatemachinedict.cpython-312.pyc000064400000001505151732703260026366 0ustar00�

R`i��D�ddlmZmZerddlmZGd�ded��ZyeZy)�)�
TYPE_CHECKING�Tuple)�	TypedDictc�h�eZdZUeedfed<eed<eedfed<eedfed<eed<eed<y)	�CodingStateMachineDict.�class_table�class_factor�state_table�char_len_table�name�languageN)�__name__�
__module__�__qualname__r�int�__annotations__�str����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/codingstatemachinedict.pyrr
s<���3��8�_�$����3��8�_�$��c�3�h��'��	��
rrF)�totalN)�typingrrrr�dictrrr�<module>rs&��'��
!���%��"�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/version.cpython-312.pyc000064400000001030151732703260023347 0ustar00�

R`i���.�dZdZejd�Zy)z�
This module exists only to simplify retrieving the version number of chardet
from within setuptools and from chardet subpackages.

:author: Dan Blanchard (dan.blanchard@gmail.com)
z5.1.0�.N)�__doc__�__version__�split�VERSION����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/version.py�<module>r
s!�����
�
�
�C�
 �rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/resultdict.cpython-312.pyc000064400000001250151732703260024050 0ustar00�

R`i���@�ddlmZmZerddlmZGd�de�ZyeZy)�)�
TYPE_CHECKING�Optional)�	TypedDictc�8�eZdZUeeed<eed<eeed<y)�
ResultDict�encoding�
confidence�languageN)�__name__�
__module__�__qualname__r�str�__annotations__�float����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/resultdict.pyrr
s���3�-�����3�-�rrN)�typingrrrr�dictrrr�<module>rs#��*��
!� �Y� ��Jrpython3.12/site-packages/pip/_vendor/chardet/__pycache__/jisfreq.cpython-312.pyc000064400000053273151732703270023346 0ustar00�

R`i�d���dZdZdZy)g@i(�(�����i'iOii}i�i�i�i�i]i�
i�
ii�
i�i�i�i�i�i�i���i�iXi}i�i�ik�ig
i�
i�iki�����iiiii�i�i%i&�0�1�,�-i�i�iii�ii�i�i�i<ii�ipi�i�i�i�i�i�igi�ii�iWiXi�i�ih
i"i�i�i�i�i
i	ii\i�i�i�
i/
i�i�i�i�ii�i0
i�i�
ihi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii ii!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i�iViji4i�ii�iBii�i8i9i:i;i<i=i>ivi�i�i�iSi�ieiifi�i�id	i+i�i�iaiwi�i�i�iIi�i~i�i�
ii?i@iAiBiCiDi
ii-iiiii�i�
iiEi^i.i�i3iii
iFi/iYi�i�ii�iji�
iiGiHiIiJiq�i1
�iY�ik�/i�2���#i����*�������[��\�5i��!i!�	�%�@il��'iA����4�
�������<i��i-�ii7�S�i��~iKi=��E��;���7i7i8�m�&���
��OiK�=i~id��iLiMiNiOiPiQiRiSiTiUiV�Y�>�J�"ip	�p���i��Ti_�i��.�X�i��Lij�ei�9�P� il�yi��i�D���i��)ihi��F�?��+iiig�ci���B�]iN����8�j�:i5iii7���Ri4�G�d���i��ni�hit�6�3�$�W�Ci��i:
ixi��i*iV	iiWiXiYiZi[i\i]i^i_i`iiaibicidieifigihiiijikiliminioipiqirisiti�
iuiviwixiyizi{i|i�i�ii�ili}i�i~iii	i�i�
i�ii�i
i�i�ii�iiii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiki�i�
i>i�
i�
i	i�i
	ij
i��i�iZi[i\i]iiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii
i�i�i�i�ii�i2
i�i�i{iTi�ia
i�
i^i�i�i|i�i=iimik
i�i�i�i	iViyi�	i�i
iq	ii�ii�
i�	�i�i�i�i!i�i�	i�ii�i��iCiOi3ii�i�i�i�ir	i�i�ini�i+ii�i�i�
ipiqi�i;
�Ai�i�i�iCi0i�ini�
i�i�iTiCioi
i�i
i#	ii�i~iiPi�i�i�ii�i�	ii�	i�i$	izi�i�i&i�i�i�i�ii�i�i�i�i_i�iUi�i�
is	i�	i�i�iIi�i�i�ii�i�i�i3
i�ii$iWi1i5iPi�	i�ii�i�i�i�iXi�i�i�il
i�i�iHi�i�	ii�i�ii�i
i�
iWi�i~ipii$i�iii@iLi�i�	i�i�i�iuiiiJiI	iW	i�i�i_i�i�	i<i�i�ii]iDi�i�i�iihi�i�i�i�i���fi-i��}it	i�i�	i��i�i�i,��i
ibi�i�iXi�iiFii{i`i�i�i+i3iqi�imi�i4
i�i�i�i�i�iBiliX	i�
ii%
i�i�i%	i2iui�i�	i�	i�iJii|iri�i@ii�iii�i�i�
i�i�	iL
iiiii�i�ib
iJ	iici�i�i��i�i�ii4	iRi�im
iTi�i�ii�i�i�i�i�ie	i�ii?i
i�i�i�ii-i	i�i*iEi�i�i+i�i�i&	i�	i�i�i/i�i�i.isi[i�i+ii�
ii�
iBic
i�i�i�i�i�i	i)ii,i�iu	ii	ii9i&
iii�i�i�iv	i�iYi�i3i�i
i�i�iiDi�i�i�i�idi�i�i|i(iyii�ii�i<i8i�	iiiiiid
i5
iBi�inii�ii�i�i|i�	i!i�i)i@in
imii�	i0iai�i�i�	�zi'��i�i�	iWi�i[ivi�i�i�	i�i�i	io
ii�	i�i
ii�i'
i�ii"i�i�i9ii�ii�iJi�i�ihi�i�ie
i�i\i��iip
i@iiQi9i�i���i	�i�i�iw	iiiEi�iJiIi�	i�i�i�i�iifi�i�i�i
i�i1i�i�i
i�i�i'	iri
i�i�i�i�
i�i�ici�	iqi�ixi�ii
i2i�i�ii�i�	i*i�i�ibiFi�ivi�idi�
i�i�i!iRi�i�iQi�ii�iPi�iii�ii�i�i(	i�i�i_ii`i�i�if
i�i6
i�iAii�iai�i�iuiTii2i�i�iii�ii^iCi�i�
i�i[i�i�
ivi%i�i�i�ini!iFi�iZi^i�ii�idii�i�ix	i�i�i]i�iBiici�
i�i�i�iPiqi	iiHiY	i�i�i(
i�i�
i�igi}iKi�	i�ii4i�iWi�i�i�iCig
i-idi�ikii4i}i�iq
i~i+i�	i�i�ihi@	i�	ii@iA	iDi:i�i�iei�
i�iqiwi�i�i�i�i�i�i�idi�iZi�i*iM
i[i�i�isiZi�
i�i�i>i�i'i-i�i�
iii�i)	ii�i�i�itiFi7
i�iti#i�i�i�i�iiYi�i�ifikibi1i�i�
i�i6ioiciiqi�	i�i�i�i�
iui�i:i�i�iN
i�iUi=i�	ivi�il�Ni�i�i�i]i�i;i�i�i�
i�i�iliLi	i}i�i�ii�iB	�i8
iQi�i#i`iTi�i�	ixiiri�	iii�i�i�i�	i�i3inii�ii�ii�i{i�i�i@i�i�ii�i9
��i�i5ih
idiZ	��i�iiii�i�i�iisi-ir
i�iii�i[i�i0iii�i�i.iSi	iRiO
i�ii�i�i;i�i4iy	i�
i;i�iz	i�ipi�i�i i�i�i:
i(i|i�
i�i"i�i�i�i�i�i�iOi�iei�i��i
iC	iti)
ii6�Ki�i�i8i�iP
iihi�i�i�ii�i3i$i�i�i*
i=�bieii�
i4i�i�i�	i.i7i�i\i�i�iiji�ii�i�i�i�i��i/i�i�i�i=i�i^i�i5	i�i�i�	i\i�ii�i�i9i#i+i�
is
i,i�i7ii�iYi�i�i�
iMi�i+
ii
iQi��i6	i�i�i�i�iiyi�iisi#i{	i�
iUifi<i�i�ivi�i�i)i�
ii�ii�i�imi<iii�	i�i�igi�i�	�li�i iD	ibiui�
i�iDiBi�i�i�
i[	i�ii8i�i�i>ii�ii�i�i�i�ii]i�iDi���i�i6iZi�i�	i5i�i�
i�
i<imi�
i,i�	i�iui^i�	i�i�igi�i��Ii�i�igi�i�i\i:i
iM�ti�	i�iEi��o��i�i�i�iEiRi�ii�iEij
i��giWi�i�iKi�	iCi�i=i�i]i$i!i�i�	ii�i��`iKiviii0ii��^��i�i3i�i"ii���i�i�aik
ii;
iwi�i�i�i�i�i�i�
iyii�i�i�iPii�i�	iwi��i�it
i�i�i�ii�i�iJiaii�i]i�i�i�i�	�ii�iiLihii�i�i�
iu
iji�ii#iCi�i�i	ia��i!�si|	i�i	iYi�i
i�i�i�ihiOi5i�i�iziii�
iSi�iLi�i.i�i&ii	i<
i7i�isiAi�i�iMi�
i�isi�i*i,
i%i�
i�	i�iki�i&if��iOiji"i�i(i-i�i[i�i�i�i�i-i=i�i}	i�i��MiSi�i�i�ii�iii�i�i�i�
i
ii
i�i~	i�iJitikivieiyi��i�i<
i�ifi�iM�ki�
ii�ioi���i�iwiv
ili�i]i�ii.i�
i�i�i�i/if	iqi$igi�iG��ini�i>i6i=
i�i�i�i�i�iNi�	ixi�iei*	iihii�i�i$i�i�i�ioibi,ii�i�iiti�i�i	i�ii�
iVi�i�
iiii�i�i�iw
iiipiHi��Vi�iii<iZi�	i8�riwi�i&��i�i�i/i�i�i�i�i>i�i>
iE	ixi�i&iei�iwi	i�i�i5i�i�i�
ii\i��i�iSiiii��i�i2�i�iii+i'i�i%i�i�ix
iOi�i
iQ
i�i�iii�i�i_�Hi�i�ii�igii�iy
i�i�
i0i&i+	ii�ii�i�il
i'i�i'izi�i	i	i�i_i�i�ii�i�i�i?
i�
i�i�	�iz
i�im
i|i
ii	ig	i0i�i�i i�i*i�i�i
i`iwii�i
i#��ici)i�i�iR
i���i�iT�i�iriiVi�i�i�i_ii�ii�iri�i�i�
i`ixi�i�i
i�i�ifi�iin
i=
i*iAii�	i(��ix�iS
i��{iT
i�i9ii�iMi�ir��ii;ii(ii%i�i[iaibii�iDi�i�ii-
i\	i�iii�io
iEimi)i�i!i�iici�i,	i1ii]	i��i�i>iI�i�i�	iTii�i�i�i�i�iyiikizixi�iNi	i�i�i�i	i5i�i�i"i�iHi<idi�i
i�i�ih	i�	i�i
ip
i�i�i:iLi1i�i�i�
ii�i>
i�iq
i?iZiMiIi�iiBiK	iDi�i#i
i
iYi>�i�iii`i�i�i�i�ii�i�i�ii�i�i�i i�i�ici�ii�i�i���iTi�iaii2iyi/i�i"iU
����ibi�i�i�i/i�i�	i�ii
i{i
i�ij�i��i5i*i�i�i�i�iaixi�i�i�	iiFi�i�i�i7i�i�i�	i?i��wi�iii�i�i+i�i8i�i�
iNi�
i�i�i,i�ini�i
ii�ioisi_i?i�i�	i�i�ii�	i�i�i?i0i�	i�	i�iyi3ifi�i=i�i�ilii�	iivi]i�i	i	i�i�izi�
i�iyijiiui�i�ipi�ij�ii	
iiizii�ir
ii�i�i�i�i�iiiFi�i'i�	i{
iniix�ui$ii�i�iMi��i�ikiipi�
i^	iqi
i`i|i�i�	ii

i|
i�	i�
ii�i�	i
i�i�i�i�	iGii�i-i�iZi1iYi�i-	i	iei�i�i[iC�i�i�iei�i.i-ii�i�i	i�i�i�
i�
i7	ibili	�i�i�i{i�i.i	i�i�izi�i�
i�
i�i?
i�ii9ii�
i�ii�i}i�i�
iai�i�	i
�Qi�	idi;iV
i�i/i^iDi�i?imi�
i�
i9iIi�
i�i�i
ii�i�
i{i}i i�ii�i��i&i�i~i�iXi�i�i}
i�
i�i9i�i�i:i�i"i\ii�i
i_	��i8iWi~
i^i%iPisi�iwi�i�ii8	i�iLi�ii.
i�i�i�
i�iiN��i�iPi�iSi�i�i�i:iRi'i0ibii�i�
i�i�i�i�izii�	iiiiiKi���i�i�
iri�iqi
i�i�iniL	ii�ii�i�i�i�i�i�iXi@
i�ig�i�i�i4i�i:ii�i�iri�	i�iQi�
ii	i;i'i�i>i�ibimi�iw��i�i�is
i�ii�iA
i�it
i9	ii�iii�	ioi^i�i�i2i�ici�i��i�iiri�i�i�i!iitii1i{i�i�i�i��i�isii�i�i�i�i��xi�viaipi�i�i
i�iLiOi�iiUi�i.i��i)i.	i�iEi�	i"iiyii	i�i�i��i(i�
ii�iqiEi6i
i�
i2iui6i�i�i�i�i.i�ii	ii�iVi�iisi�
i�i�iGiGijiti�iWii�	i�i�i`i�i�i�iui�ii�
i�i{iQii�	iOiCi�i�i�
i�iJi�	i	i	i$i�i�i�i/	i�ii_ii�iij	iRi�i7ii�i/
ii3iDiu
i6iXi4i�i�iii�ii>i�iii0
i`i`	i
i�i�i�iUi�i i�
irii�i)i�i5i�iHi�i 
i�ii~iri�i�
i�i�i�i�i�	�ii]i�i�ii�ii�ii@
i�i�i�
iai�ivi�i�i�i/i!i6i�i�i�i7iwi�i	i3ici8ixii�i�iB
i�i�iM	i��iF	i�igii�i�i(i�i
i:	ii�iHi�i�
if��i�i"i�
i~i�i�i�i�
iyiii�i�i i!iNi�
i4iA
i�idie���izii�i�i�i�i�i�i0	i�i�ii�i�i�ii�i{i�i�i�i�
i�ifi(ili�iGi�	i���i^iB
imiFi|iiUi�i�i2iRi�i�i#i�i�
i�i�iF��i�Ui�i�i�i1i�iciki�iN	iSi�	���i�
i�i�i$iO	i�iiYi�i�i�i
i�iGiii�iW
i	iC
i?i�i�i~i�i�iUiFi�i�i�ii�i�i�i�
iC
i�	i�i�iiei
i�i�i�ii/iQi_iv
i;i�i�iPi)��iGimi�	i�i�iGi,iIiz�_i�	��i	i9ini�i�
iAi�	i�
iX
i�i#iVi)i<i%i�i}i�i�iHiw
i5i�ipi.ii�i�imii�i�i�
i#ihi|ibi�i�i�i@i(i^izi�iiAi�
i ii"iigi�i|i�i�i��i�i6i�iXi�i�i,i�i�i		ii�i$i#iIik	i�ii�i�i:i	i�iQiioihiVi$i�
i�iti�i�i�iY
i,i�ii
i�iD
i�i�	i~i�
i�
i�i�i%i�ii i��i�ii�i�
i i7i/i
	�i���i�	iEiVi�i�
iE
iui�i&i�i�ii�i�	i�ioi�i�iZi�iii�i�i	ii�i��i!i�ini8i�i'i��i�ii�ii�i�	i�iGi�iRi2i�ii:i�i,��iiZ
ili�i(iXiP	i?i�ii�	ioi�ii�i�i�i�iWi*i��i;i8i�i&i)i�i�i
ioi�ii�i�iHi_i�i�i0i�ix
i�i0i�i;	i�i
i�i�iXi�i	��i�i1i��Zi*i%i�	�i�|idi`ii�iSiji}i\ii�i�iG	i�ii�	if�qi%iBi�i1
ipi�i"ii�i�i�i�i|i�i�ii�	i�il	i2
�i�
i�
ii�i@ihi�i;i��ii	i�i	i�i�i&ii�i�i}i�i%i�i�iii?i�i�	i�ia	iy
ii�
i�i�i�	i�i=i1i�i<i�i{i#i��i�i�i�
iAi�i
i�iti�i�i�	i�i>i
iKi3
i�i�i=��ii\i�i�i'iAi+igi�ib	iKi�i�i�i�i
i�i
i�i4
i�i*i�im	i�	i�i�
ioiNii0i(iii�i$i4i i{ii�i�iQ	i�i�iUi�i�i�i,i`ii�	i�ii�
iji)i i�i-i6��i�	iF
i2i)ii
i*i�iYN)�JIS_TYPICAL_DISTRIBUTION_RATIO�JIS_TABLE_SIZE�JIS_CHAR_TO_FREQ_ORDER����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/jisfreq.py�<module>r	s��X"%����R�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/utf8prober.cpython-312.pyc000064400000006222151732703270023773 0ustar00�

R`i�
��Z�ddlmZddlmZddlmZddlmZmZddl	m
Z
Gd�de�Zy	)
�)�Union�)�
CharSetProber)�CodingStateMachine)�MachineState�ProbingState)�
UTF8_SM_MODELc���eZdZdZd
�fd�Zd
�fd�Zedefd��Zedefd��Z	de
eefde
fd�Zdefd	�Z�xZS)�
UTF8Proberg�?�returnc�x��t�|��tt�|_d|_|j
�y�Nr)�super�__init__rr	�	coding_sm�
_num_mb_chars�reset��self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/utf8prober.pyrzUTF8Prober.__init__'s+���
����+�M�:�������
�
��c�d��t�|��|jj�d|_yr)rrrrrs �rrzUTF8Prober.reset-s$���
��
����������rc��y)Nzutf-8��rs r�charset_namezUTF8Prober.charset_name2s��rc��y)N�rrs r�languagezUTF8Prober.language6s��r�byte_strc�2�|D]�}|jj|�}|tjk(rtj
|_ns|tjk(rtj|_nI|tjk(s��|jj�dk\s��|xjdz
c_��|jtjk(r2|j�|jkDrtj|_|jS)N�r)r�
next_stater�ERRORr�NOT_ME�_state�ITS_ME�FOUND_IT�START�get_current_charlenr�state�	DETECTING�get_confidence�SHORTCUT_THRESHOLD)rr!�c�coding_states    r�feedzUTF8Prober.feed:s����A��>�>�4�4�Q�7�L��|�1�1�1�*�1�1�����|�2�2�2�*�3�3�����|�1�1�1��>�>�5�5�7�1�<��&�&�!�+�&���:�:��/�/�/��"�"�$�t�'>�'>�>�*�3�3����z�z�rc�j�d}|jdkr!||j|jzz}d|z
S|S)Ng�G�z��?�g�?)r�
ONE_CHAR_PROB)r�unlikes  rr.zUTF8Prober.get_confidenceMs?��������!��d�(�(�$�*<�*<�<�<�F���<���
r)rN)�__name__�
__module__�__qualname__r5rr�property�strrr r�bytes�	bytearrayrr2�floatr.�
__classcell__)rs@rrr$sq����M���
��c������#�����U�5�)�#3�4����&��rrN)�typingr�
charsetproberr�codingstatemachiner�enumsrr�mbcssmr	rrrr�<module>rEs"��8�(�2�-�!�.��.rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/langbulgarianmodel.cpython-312.pyc000064400000242342151732703270025527 0ustar00�

R`ir���b�ddlmZididd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd)�dd�d	d)�d
d)�dd�dd)�d
d�dd�dd�dd)�dd�dd)�dd�idd)�dd)�dd)�dd)�dd�dd)�dd�dd�dd�dd�dd)�dd�d d�d!d�dd�d"d)�d#d)��id$d)�d%d)�d&d�d'd�d(d)�d)d�d*d)�d+d)�d,d&�d-d)�d.d&�d/d�d0d)�d1d)�d2d)�d3d)�d4d��d)dddddddddddd5���didd�dd�dd)�dd)�dd�dd�d	d)�d
d�dd�dd)�d
d�dd�dd�dd�dd�dd)�dd)�idd�dd�dd)�dd)�dd�dd)�dd�dd�dd�dd�dd�dd)�d d�d!d�dd&�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d)�d*d�d+d�d,d)�d-d�d.d�d/d&�d0d�d1d)�d2d�d3d�d4d)��ddddddd&ddd)ddd5���didd�dd�dd)�dd�dd�dd�d	d�d
d)�dd�dd�d
d)�dd�dd�dd�dd�dd�dd�idd�dd)�dd)�dd�dd�dd)�dd�dd�dd�dd�dd�dd�d d�d!d)�dd&�d"d�d#d��id$d�d%d�d&d&�d'd�d(d)�d)d&�d*d�d+d�d,d)�d-d�d.d)�d/d)�d0d�d1d)�d2d)�d3d)�d4d��dddd)ddd)dddddd5���didd�dd�dd)�dd�dd�dd�d	d�d
d)�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d)�d*d�d+d�d,d)�d-d�d.d�d/d)�d0d�d1d)�d2d�d3d�d4d)��ddddddd)dddddd5���d	idd�dd�dd)�dd�dd)�dd�d	d)�d
d)�dd)�dd�d
d)�dd�dd�dd�dd�dd�dd)�idd)�dd�dd)�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d)��id$d�d%d�d&d&�d'd&�d(d�d)d&�d*d�d+d�d,d�d-d�d.d)�d/d&�d0d�d1d)�d2d�d3d�d4d)��ddddddd)dd)dddd5���d
idd�dd�dd�dd�dd)�dd�d	d�d
d�dd�dd�d
d�dd�dd)�dd)�dd�dd)�dd)�idd�dd)�dd)�dd)�dd�dd)�dd�dd)�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d)��id$d�d%d)�d&d�d'd�d(d�d)d�d*d�d+d)�d,d)�d-d)�d.d)�d/d�d0d�d1d)�d2d)�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d��id$d�d%d�d&d)�d'd�d(d�d)d)�d*d�d+d�d,d�d-d�d.d�d/d)�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd)�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd)�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d)��id$d�d%d)�d&d)�d'd�d(d�d)d�d*d�d+d�d,d)�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�dd�d	d�d
d)�dd�dd)�d
d�dd�dd)�dd)�dd)�dd)�dd�idd�dd)�dd)�dd)�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d)�dd�d"d�d#d&��id$d)�d%d�d&d�d'd�d(d&�d)d�d*d�d+d�d,d)�d-d)�d.d)�d/d�d0d�d1d)�d2d)�d3d)�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d)�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd)�dd�dd�dd�d	d�d
d�dd�dd�d
d)�dd�dd�dd�dd�dd)�dd)�idd)�dd�dd)�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d�d%d�d&d)�d'd�d(d�d)d)�d*d�d+d�d,d)�d-d�d.d)�d/d&�d0d�d1d&�d2d�d3d�d4d)��ddddddd)dd)dddd5���didd�dd�dd)�dd�dd�dd)�d	d�d
d)�dd�dd�d
d)�dd�dd�dd�dd�dd�dd)�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d)�d*d�d+d�d,d�d-d�d.d�d/d)�d0d�d1d�d2d�d3d�d4d)��ddddddddd)dddd5���didd�dd�dd)�dd�dd)�dd�d	d�d
d�dd�dd�d
d)�dd�dd�dd�dd�dd�dd)�idd�dd�dd)�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d�d,d)�d-d�d.d)�d/d&�d0d�d1d�d2d�d3d�d4d)��ddddddd)dd)dddd5���didd�dd�dd)�dd)�dd�dd�d	d)�d
d)�dd�dd�d
d)�dd�dd)�dd�dd�dd�dd)�idd�dd�dd)�dd)�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d�d,d�d-d�d.d�d/d&�d0d�d1d�d2d�d3d�d4d��ddddddddd)d)ddd5���didd�dd�dd�dd�dd)�dd�d	d)�d
d�dd�dd�d
d�dd�dd)�dd)�dd)�dd)�dd)�idd�dd)�dd)�dd)�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d)�d#d)��id$d)�d%d�d&d�d'd�d(d�d)d�d*d�d+d)�d,d)�d-d�d.d�d/d�d0d)�d1d)�d2d)�d3d&�d4d��dddd)dd)ddddddd5���ididd�dd�dd)�dd�dd�dd�d	d�d
d�dd�dd�d
d)�dd�dd�dd�dd�dd�dd)�idd)�dd)�dd)�dd�dd)�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d�d%d)�d&d&�d'd�d(d�d)d)�d*d�d+d�d,d&�d-d�d.d�d/d&�d0d�d1d&�d2d�d3d�d4d)��ddddddd)dddddd5���didd�dd�dd)�dd�dd�dd)�d	d)�d
d)�dd�dd�d
d)�dd�dd�dd�dd�dd�dd)�idd)�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d�d%d�d&d)�d'd�d(d�d)d)�d*d�d+d�d,d�d-d�d.d�d/d&�d0d�d1d�d2d�d3d�d4d&��ddddddddddddd5���didd�dd�dd&�dd)�dd)�dd�d	d)�d
d)�dd�dd�d
d)�dd�dd)�dd�dd�dd�dd)�idd)�dd�dd)�dd)�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d)��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d)�d,d&�d-d)�d.d�d/d&�d0d&�d1d)�d2d�d3d&�d4d)��d)dddddd&dddddd5���didd�dd�dd)�dd)�dd�dd�d	d�d
d)�dd�dd�d
d)�dd�dd)�dd�dd�dd�dd)�idd�dd)�dd)�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d)�d*d�d+d�d,d�d-d�d.d�d/d&�d0d�d1d&�d2d�d3d�d4d)��ddddddd)ddd)ddd5���didd�dd�dd�dd�dd�dd�d	d�d
d)�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd)�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d)��id$d�d%d�d&d)�d'd�d(d�d)d)�d*d�d+d)�d,d�d-d�d.d)�d/d)�d0d�d1d�d2d)�d3d�d4d��dddd)ddddddddd5���didd�dd�dd)�dd�dd�dd�d	d�d
d�dd�dd�d
d)�dd�dd�dd�dd�dd�dd�idd)�dd�dd)�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d��id$d�d%d�d&d)�d'd�d(d�d)d)�d*d�d+d�d,d)�d-d�d.d�d/d)�d0d�d1d)�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d��id$d�d%d�d&d)�d'd�d(d�d)d)�d*d�d+d�d,d�d-d�d.d�d/d)�d0d�d1d)�d2d�d3d�d4d)��ddddddd)dddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d)�dd�dd)�dd�dd�dd�dd�idd�dd�dd)�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d)��id$d�d%d�d&d)�d'd�d(d�d)d)�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd)�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d)�d*d�d+d�d,d�d-d�d.d�d/d)�d0d�d1d�d2d�d3d�d4d)��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d)��id$d�d%d�d&d)�d'd�d(d�d)d)�d*d�d+d�d,d�d-d�d.d�d/d)�d0d�d1d�d2d�d3d�d4d)��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d�d#d��id$d�d%d�d&d)�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd)�dd�dd�dd�idd�dd)�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d)�d%d�d&d�d'd)�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d!idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd)�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d)�d.d)�d/d�d0d)�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d&�d#d&��id$d&�d%d&�d&d&�d'd&�d(d&�d)d&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d)�d0d&�d1d&�d2d&�d3d&�d4d&��d&d&d&d&d&d&dddd&ddd5���d"idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d&��id$d�d%d)�d&d&�d'd�d(d�d)d&�d*d�d+d�d,d&�d-d)�d.d&�d/d&�d0d�d1d&�d2d&�d3d�d4d&��dd)dddd&d&dd)d&ddd5���d#idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d)�d%d&�d&d&�d'd�d(d&�d)d&�d*d�d+d&�d,d&�d-d)�d.d&�d/d&�d0d)�d1d&�d2d&�d3d&�d4d)��dd)d)d&d)dd&dd)d&ddd5����id$idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d)��id$d�d%d)�d&d&�d'd�d(d�d)d&�d*d�d+d�d,d&�d-d�d.d&�d/d&�d0d�d1d&�d2d)�d3d)�d4d&��ddddddd&dddddd5���d%idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d)�d#d&��id$d)�d%d)�d&d&�d'd&�d(d)�d)d&�d*d�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d�d4d&��dd)d)d)ddd&ddd&ddd5���d&idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d&�d#d&��id$d&�d%d&�d&d)�d'd&�d(d&�d)d)�d*d&�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d&�d4d)��d&d&d&d&d&d&dddd&ddd5���d'idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d&�d#d)��id$d�d%d&�d&d&�d'd�d(d�d)d&�d*d�d+d)�d,d�d-d�d.d&�d/d)�d0d�d1d�d2d�d3d�d4d)��ddddddd)dddddd5���d(idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d&�d#d&��id$d&�d%d&�d&d&�d'd�d(d�d)d&�d*d�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d&�d4d&��dd)d)d)d)dd)ddd)ddd5���d)idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d&�d#d&��id$d&�d%d&�d&d&�d'd&�d(d&�d)d&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d&�d4d)��d&d&d&d&d&d&d)ddd&ddd5���d*idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d)�d#d)��id$d�d%d)�d&d)�d'd�d(d)�d)d�d*d�d+d&�d,d)�d-d)�d.d&�d/d)�d0d�d1d)�d2d&�d3d&�d4d��d)dd)d)ddddddddd5���d+idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d&��id$d)�d%d�d&d&�d'd�d(d)�d)d&�d*d�d+d�d,d&�d-d)�d.d&�d/d&�d0d�d1d&�d2d&�d3d&�d4d&��ddd&d)ddd&dd)dddd5���d,idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d&�d#d&��id$d&�d%d)�d&d&�d'd&�d(d)�d)d&�d*d�d+d&�d,d�d-d)�d.d&�d/d&�d0d)�d1d)�d2d&�d3d&�d4d&��d)d)d)d)d)dd&d)d&d&ddd5���d-idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d&�d#d&��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d)�d,d&�d-d�d.d&�d/d&�d0d&�d1d)�d2d)�d3d�d4d&��d)dd)d)d)dd&dd)d&ddd5���d.idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d)�d#d)��id$d&�d%d&�d&d&�d'd)�d(d)�d)d&�d*d�d+d&�d,d)�d-d�d.d&�d/d&�d0d�d1d)�d2d&�d3d&�d4d&��d&d)d&d&d)dd&d)d)d&ddd5���d/idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd)�d"d&�d#d&��id$d&�d%d&�d&d&�d'd&�d(d&�d)d&�d*d&�d+d&�d,d&�d-d&�d.d&�d/d)�d0d&�d1d&�d2d&�d3d&�d4d)��d&d&d&d&d&d&dddd&ddd5���d0idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d)��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d)�d,d&�d-d�d.d)�d/d&�d0d�d1d&�d2d)�d3d)�d4d&��ddd)d)ddd&dd)d)ddd5���d1idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d&�d#d&��id$d&�d%d&�d&d&�d'd&�d(d)�d)d&�d*d�d+d&�d,d&�d-d&�d.d&�d/d&�d0d)�d1d�d2d&�d3d&�d4d&��d)d&d&d)d&dd&dd)d&ddd5���d2idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d)�d#d&��id$d)�d%d)�d&d&�d'd�d(d�d)d&�d*d�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d�d3d&�d4d&��d)d)d)d)d)dd&d)d)d&ddd5���d3idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d&�d#d&��id$d)�d%d)�d&d&�d'd�d(d�d)d&�d*d�d+d&�d,d&�d-d)�d.d&�d/d&�d0d)�d1d&�d2d&�d3d&�d4d&��dd)d)d)ddd&d)d)d&ddd5���d4idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d&�d#d&��id$d&�d%d&�d&d)�d'd&�d(d&�d)d)�d*d)�d+d&�d,d&�d-d&�d.d&�d/d)�d0d&�d1d&�d2d&�d3d&�d4d��d)d)d)d&d&d)ddddddd5����idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d)�d,d)�d-d�d.d�d/d&�d0d�d1d)�d2d)�d3d)�d4d)��ddddddd)d)ddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d&��id$d�d%d�d&d)�d'd�d(d�d)d&�d*d�d+d�d,d)�d-d)�d.d&�d/d&�d0d�d1d&�d2d�d3d)�d4d&��ddddddd)dddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d)��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d)�d,d�d-d�d.d�d/d)�d0d�d1d�d2d�d3d�d4d)��ddddddd)ddd)ddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d&��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d&�d,d)�d-d)�d.d&�d/d&�d0d�d1d)�d2d�d3d)�d4d&��ddddddd)dddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d)��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d&�d,d)�d-d�d.d&�d/d)�d0d)�d1d�d2d�d3d�d4d)��ddddddd)dddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd&�d"d�d#d��id$d�d%d�d&d&�d'd�d(d�d)d&�d*d�d+d�d,d�d-d�d.d)�d/d&�d0d�d1d�d2d�d3d)�d4d&��dddddddddd)ddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d&�d#d&��id$d&�d%d&�d&d)�d'd&�d(d&�d)d�d*d)�d+d&�d,d&�d-d&�d.d&�d/d&�d0d&�d1d&�d2d&�d3d&�d4d��dd)d)d&d)d&ddd)dddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d&�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d)�d#d��id$d)�d%d)�d&d�d'd)�d(d)�d)d�d*d�d+d)�d,d)�d-d)�d.d)�d/d�d0d�d1d)�d2d)�d3d)�d4d��ddd)d&ddddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d&�d#d&��id$d)�d%d&�d&d)�d'd�d(d)�d)d�d*d)�d+d&�d,d&�d-d&�d.d&�d/d�d0d)�d1d)�d2d&�d3d&�d4d��dd&d)ddd)ddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�dd�d"d�d#d��id$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��d5��Zidd6�dd6�d)d6�d&d6�d/d6�d3d6�d.d6�d1d6�d2d6�d#d6�d,d7�d%d6�d+d6�d0d7�d-d6�d(d6�d8d6�id9d6�d"d6�d4d6�d$d6�d:d6�d;d6�d'd6�d<d6�d=d6�d*d6�d>d6�dd6�d?d6�dd6�dd6�dd@�dd@��idd@�dd@�dd@�d	d@�dd@�dd@�d
d@�dd@�dAd@�dd@�d
d@�dd@�dd@�dd@�ddB�ddB�ddB��iddB�dCdB�ddB�ddB�ddB�d!dB�ddB�dDd@�dd@�d d@�dd@�dEd@�dd@�dFd@�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dPdU�dVdW�dXdY�dZd[�d\d]�dHd\�d^d_�dWd`�dadb�d[dc�d`dd�dedf�dgdX��idhdi�djdg�dkdl�dmdn�dodp�dJdq�dfd@�drd@�dsd@�d_d@�dtd@�dld@�dudG�dvdO�dLdQ�dNdI�dUd��id]dM�dwdx�dydw�dzdr�d{d|�dTdy�dddt�dRdj�dbdk�dndS�dxd}�d~d�d�dh�dqds�d}du�d�d~�d�d���idid��d�d��d�d��d�d��d�d@�d�d@�d�d@�d�d@�d�d@�d�d|�d�d�d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d“d�dēd�dƓd�dȓd�d[�d�d˓d�d͓d�dϓd�dѓd�dӓd�dz�d�d֓d�dؓd�dړ�id�dܓd�dޓd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d	�d�d
�d�d�d�d�d�d
�dYd�dcd��idpd�d�d�d�d�d�d�d�d�d�d�d�d�d|d�dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d���id�dK�d�d��d�d �d�d!�d�d�d�d"�d�d#�d�d$�d�d%�d�d&�d�d'�d�d(�d�d)�d�d*�d�d+�d�d,�d�d-��id�d.�d�d/�d�d0�d�d1�d�d2�d�d3�d�d4�d�d?�d�d=�d�d;�d�d:�d�d>�d�d<�d�d9�d�dZ�d�dC�d�d���id�dA�d�d8�d�dE�d�d��d�d��d�d��d�dD�d�d��d�dv�d�d��d�d��d�d���dd���d�d�dB�d�d@df�d7dB��d6d@i�Ze�d�dee�d�d�d���Zidd6�dd6�d)d6�d&d6�d/d6�d3d6�d.d6�d1d6�d2d6�d#d6�d,d7�d%d6�d+d6�d0d7�d-d6�d(d6�d8d6�id9d6�d"d6�d4d6�d$d6�d:d6�d;d6�d'd6�d<d6�d=d6�d*d6�d>d6�dd6�d?d6�dd6�dd6�dd@�dd@��idd@�dd@�dd@�d	d@�dd@�dd@�d
d@�dd@�dAd@�dd@�d
d@�dd@�dd@�dd@�ddB�ddB�ddB��iddB�dCdB�ddB�ddB�ddB�d!dB�ddB�dDd@�dd@�d d@�dd@�dEd@�dd@�dFd@�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dPdU�dVdW�dXdY�dZd[�d\d]�dHd\�d^d_�dWd`�dadb�d[dc�d`dd�dedf�dgdX��idhdi�djdg�dkdl�dmdn�dodp�dJdq�dfd@�drd@�dsd@�d_d@�dtd@�dld@�dudG�dvdO�dLdQ�dNdI�dUd��id]dM�dwdx�dydw�dzdr�d{d|�dTdy�dddt�dRdj�dbdk�dndS�dxd}�d~d�d�dh�dqds�d}du�d�d~�d�d���idid��d�d��d�d��d�d��d�d@�d�d@�d�d@�d�d@�d�d@�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d^�d�dF�d�de�d�d��d�dv�d�d��d�dz�d�d“�id�dēd�dƓd�dȓd�d˓d�d͓d�dϓd�dѓd�dm�d�dӓd�d֓d�dؓd�dړd�d��d�do�d�d{�d�dܓd�dޓ�id�d�d�d�d�d�d�d�d�d��d�d��d�dV�d�da�d�d��d�d��d�d��d�d��d�d��d�d��d�d��dYdE�dcdD��idpd��d�d��d�d��d�d��d�d�d�d�d�d�d|d�dd�d�d	�d�d
�d�d�d�d�d�d
�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��d�d�dK��id�dB�d�d �d�d!�d�d�d�d"�d�d#�d�d$�d�d%�d�d&�d�d'�d�d(�d�d)�d�d*�d�d+�d�d,�d�d-�d�d.��id�d/�d�d0�d�d1�d�d2�d�d3�d�d4�d�d?�d�d=�d�d;�d�d:�d�d>�d�d<��dd9��ddZ�dBdC�d@d@�d7dA��d6d8i�Ze�d�dee�d�d�d���Z�y	(
�)�SingleByteCharSetModel�?��-�� �#�+�%�,�7�/�(�;�!�.�&�$�)��'��"�3�0�1�5�2�6�9�=�<�8��	���������
����
����)��������4�*��:�>��r@r=r:r9r<r8r;r7�r?�r>rArB�@�A�M�B�Z�C�c�D�d�E�H�F�m�G�k�e�I�O�J��K�Q�L�f�N�^�R�P�n��l�S�[�T�U�w�V�W�`�X�o�Y��s�\�]�_�a�b�g�p�h�i�j���t�q���r�u�v�����x���y���z���{�|�}�~���������������������������������������������������������������������������������������������������������������������������������������������������������������z
ISO-8859-5�	Bulgariang! _B�?FuxАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя)�charset_name�language�char_to_order_map�language_model�typical_positive_ratio�keep_ascii_letters�alphabetzwindows-1251N)�#pip._vendor.chardet.sbcharsetproberr�BULGARIAN_LANG_MODEL�"ISO_8859_5_BULGARIAN_CHAR_TO_ORDER�ISO_8859_5_BULGARIAN_MODEL�$WINDOWS_1251_BULGARIAN_CHAR_TO_ORDER�WINDOWS_1251_BULGARIAN_MODEL����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/langbulgarianmodel.py�<module>rs����F�@@��@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�@@�D�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�E@@�F�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�G@@�H�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�I@@�J�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�K@@�L
�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�M
@@�N�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�O@@�P�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�Q@@�R�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�S@@�T�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�U@@�V�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�W@@�X�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�Y@@�Z�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�[@@�\�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�]@@�^�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�_@@�`�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�a@@�b �@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�c @@�d"�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�e"@@�f$�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�g$@@�h&�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�i&@@�j(�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�k(@@�l*�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�m*@@�n,�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�o,@@�p.�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�q.@@�r0�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�s0@@�t2�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�u2@@�v4�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�w4@@�x6�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�y6@@�z8�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�{8@@�|:�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�}:@@�~<�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�<@@�@?�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�A?@@�BA�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�CA@@�DC�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�EC@@�FE�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�GE@@�HG�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�IG@@�JI�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�KI@@�LK�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�MK@@�NM�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�OM@@�PO�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�QO@@�RQ�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�SQ@@�TS�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�US@@�VU�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�WU@@�XW�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�YW@@�ZY�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�[Y@@�\[�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�][@@�^]�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�_]@@�`_�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�a_@@�ba�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�ca@@�dc�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	
�1�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	�A�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�ec@@�fe�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�ge@@�hg@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	
�1�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	�A�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�}@@��R@A&��s�A&��s�A&��s�A&��s�	A&�
�s�A&��s�
A&��s�A&��s�A&��s�A&��s�A&���A&���A&���A&���A&���A&� ��!A&�"��#A&�$��%A&�&��'A&�(��)A&�*��+A&�,��-A&�.��/A&�0��1A&�2��3A&�4��5A&�6��7A&�8��9A&�:��;A&�<��=A&�>��?A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�"�F4��
�8�'�#��H���A(��s�A(��s�A(��s�A(��s�	A(�
�s�A(��s�
A(��s�A(��s�A(��s�A(��s�A(���A(���A(���A(���A(���A(� ��!A(�"��#A(�$��%A(�&��'A(�(��)A(�*��+A(�,��-A(�.��/A(�0��1A(�2��3A(�4��5A(�6��7A(�8��9A(�:��;A(�<��=A(�>��?A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�B��CA(�D��EA(�F��GA(�H��IA(�J��KA(�L��MA(�N��OA(�P��QA(�R��SA(�T��UA(�V��WA(�X��YA(�Z��[A(�\��]A(�^��_A(�`��aA(�b��cA(�d��eA(�f��gA(�h��iA(�j��kA(�l��mA(�n��oA(�p��qA(�r��sA(�t��uA(�v��wA(�x��yA(�z��{A(�|��}A(�~��A(�@��AA(�$�F 6��
�:�'�#��H� �rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/euctwfreq.cpython-312.pyc000064400000065164151732703270023712 0ustar00�

R`i1����dZdZdZy)g�?i(�ii��i����	�R�i����ii�i�
�ni��!i�i�L�,iA�isi�i�i�i�iL
iS
i�ii�i�i�i�i.iNiii�����:i�i�i��?i�i�i=iN�K���i�il	i�i�i�
i���i�
i ��
ii��i�
ioi$i�ii�i�ici8i�i�ii��i�i��iz�|��it�"i�
ie�@i\i�i�	i�i��i�i�i�iFi�iM
iQ�Hi�i��Piv��ifi�ii�iDiT
i�i�iFiN
i��Ei�iO�i/i��si�i3�<�2i��i&iLi�i�iO
�i�iG�iiMi�i�i?iii`iiF	i*i�igi�	�Zi�
i:i��i�iKi�	�i�	�ii�i�i�i`i�ii�ig�i	i �qi�i~i���iP
i�	ii�i�i�i!i��u�i�i*ii�i	i�
i��~i�i�i��iei��Gi^i�i��i��UiCi�iBi�i�i�i�ii�i �jioi/ii�iOi2	i[i���i�
i&i�i�i�i��Si(i�i��ip�]i�i6iii�
i'iii�iii8��+i%i[�i�i\i�i�i�i�iX	i(i���i�i0��i iHi�
i�
i"i!��i+i�i1i"i�i�i�
iOiG	i�iifi1��i�i�i�i�i�ii2i9���li,��i	ii�ii�i�i}ihi#iq
iQiMi&i��Xi�i�i#i���i
��i�iji�i��M�i�i��%�i�i�i$i�i��'i�	i�iNiii�7��Ji�i!i�i�ii���iMi�i)iPiU
i���i�
i�i%i�
i�
i�� i�i�
i iIi�i3	i�i�
iir
�i�i�i�i���mi�i�i$i�i�ixi�i�i�i�i�
i�i�i�i%i&��i
ii�i�i�i�i��&i�i'i�ii'i�i��.�i�ii�iH	i���i�i�i$�#i�iDi&iAi�	�i�i�i�i�iUiGii�i�i
iQ
iPiSi'i�i��di��0�Fi�i�i*i�i�ii�ii�iJii�iU�i��iI	iR
i�i�i<i�iS
i:i7
i�
i�i	i	i9i�i}ii�	i�i�iViPiT
ii)iCii�i�i&i�
i�	i)i�i�im	i�i�i�i�i�ii4	i�i�i�in	i*ii�i�ii�i�iOi�i�i�i�i�	i+i(i
i�i�i�iU
i(i�i5iYiji�
ili�iuii)i�
i*i+iV
i
i=i�i�i�i�i�i�i�i4i�i!i�i�iTi,ixi�i�ie�i�	i�iJ	iPi�is
i5iAiV
i/iki�i�
iili!i	i�iAi�i`i�i�
i��iAi�i�
iii�i�
i�i�	i�i�i�i�i���iMi�
i�i�i�ii�iW
i�i�i�
it
i�i�i+�}i�iji8
i�i�i�i�i�i�i�i�i-i)imi�	i�iW
i�i		i�i�
i�iai�i
iPiK	i�i,i�i�i�i7i'iu
i�i{iki�i�ii�i�
i9
i�iii�i�i�i�i�i�i�i1���bii�	i�
i�i�io	i�iX
i,iQi��i�i�i�ii�
i�
iX
i��i�i5�D�i�ili�i�i[i 
i��iY
i�i%�i.iY	i�i*i�i�i�
i�iRi�i�i�ipi��in�cigi+ii�i'i2i��i�i{i�ili�imi�i�i:
i�ifi
	i�i|i5	��i�ii�iZ
i�i�
i�i�i�i�i,i�i�i�i��;i�iIiYi�i�i[
iXi"i�i	i�i�i�i~i�i�i,i�iki�i�i-i�i�ii�i�iDi�i�i�i>i]i�i,i�i�i�iviLiB�ii&i�i�i�
i�i�i�iGi�i�iiBi�i�
i!
i�i�iui�i�i�i�i�	i iaii�i�iv
iSi�i}i;
i�iDi�i=i�i0ii�i\
i(i�ii�ivi �i�i�i��i.i�i��9iHii�i�i�i]
iEi�i�i�i�i�i!i�i/i�i�i�ii-ii�iQi*i�i.i/i�i�i�ii0�3ii"
i�i*iRi�i�iWi�i�i/iibi.i�i�	i�i�i�i�i�iRiii�i)i�i2i�i�	i�i�i�i�i�i�iZ	i�iTiiw
i�i�i�i�	i�i�i�ii�i�i[	�Oi�i�	i�i`i7ix
i^
i�i�i�i�i�i�i\	i�i�i�i�i�i�igi�i�ini�i
i_i�i~��i�i�i0i�i�
iai�iy
i]	i�i�i�i�i��i�i�	i;��i�	i-i�i�iL	i���i�i/ii�i�i��`i�i#i"i�ii�ii0i�
isii�i�idisi�
i�iY
i�iikiwioi�i�i�i�i�i1ii2i��gipiQi�iUi�ivi�i�i���CiSi�i^	i�i�i5i�i�iBi�i_i�ibiN��i�iXi�i�i�i�
�iLici�
i�
i	iKiwi*iaiGi3i�i
i�i�ii1i6i�	i2i6	�Ni�i�ii	i3i�i:i�i\iqi�i�ii-i�iii3i�
i�i�i�ixi�
�i�iri�i4i�
i_
i�iUi�i�i�i@i�i5i�ii�i�ii�i/i+i6ii�ii�i�i�i�i�
i7	iZ
ii�i�i8i4iiCi�ii�i�ili�i`
i�i�i�i�i�iYi����i�i5i�	�{i�ii�i��$i7iiMiVi0iri�i�i�igiiVi�i8i�i9i,iZi�i�i{i#iWi0iii$i�i�
i�
i�i4ii[i��vi�iici�iViM	i$i-�i�iiXiii�idi�i�iWi[
ii�i�iiiqi�
ii1i�ii�iiti�ii�i	iii�
i2i�i2i:i3i i.i�i�i2i�i
i�i�i��i�i%ii�i�iii
i�ii�iii��
i�
i6i�i4i�i|ii�iSiii�i_	i�
ii�i�i�i`iii�i�i�	i3iii;iriiii7iYiLi;i�i�	i�	iii�iT�\i�i�ii<i�iVi5i�ii�
i�i�i�ii"ixi%ii;i8	i i�ii2iEi=i!i�ii��^iiwi�
i"i�i�iisi�i#i<iQii�iri$ii]ii%i�i.i&ii3i5iBi�iyi'i�i�i�ii�ii>iYia
ib
i(i�
i	i)i*i	i�i�i:i�i6i�i^iii�ii(i�
i+i+iiixi,i	i.ihi/i-ii�i
iVii�i�hi�izi.ii��i�i<i�i�i;i/i?i�ii
i�	i0i8i�ii�i5i6i�
i_�)i1i2i	i3iyi	�i�i�
ii^i4i�i�i?i$i+i\
i�i5i_iWi�iiz
i6i0ii�
i]
i	��ip	i7i�i�i8i^
i<
i�iVi9i�i6i�iI�wi}ic
i^ii
i9i@i�i
iAii�i�i�	i:iei1iiiBi�i�i�i�ii�i�ii�i7i;i<i�i=i{
i��(i`iRi1iYiiIi�	��ii�i6i�id
i>i�i�ie
i?i�io�iqiYinii�iliiCiDi{i�i�
i_
iEiPiUi�i�i�i�ii�iEimi�i@i�i:i�
ii
iAii�i�i�ii#
i�	iNi�
i�iBi�iCiWiTiT�i�i
i�if
i;iDii&i�
i|i�i�i�ii�i�
i�i�i<i=
i�
i�ii	iVi�i�
iioi�i�	iEi�
iFiii�i���i�i�iiiDi-i8i�iGidi�	ii�
iHiti�iiIizi
iiJi�
i�
iKii�i|
i�ii�i�i>
�i�i�i�iiiLi:i�	i=i�iMii?
i�i�iiHi�i�ii�iNii�i�	iOiPiiFikiQi9i���i�i�
i�	iuiivii�ii�iiRiSi�i�i}i
i>i�i�i�ii
i:iTi	i�iN	i�iCi�ii�iUi~i�i iWi�iGi�i�i�i,iiii�iOi�i|ii�i�iOi?iVi`	i�i i�i~iiwi�ii�i@i!i�i�i;i�i�iiWi�i"i�
iXi�iYiiRig
iuii�
ih
i�
ixi=i
iiZi�i<i�ii[i�i#ii=i 	i\i$ii]iHiIi^i7iO	i$
i
i_i%iviJi�i i!iwitii`iaibi9	i&i�i"i{�i�i�	i'ici�idi8i�ii�i�i[i9i�i�idiZi�	iei�i�i�i@
i!i(i"ifi���ii�i#i$iTigiKii�i%i��WiMihii�iii�i�i�i%i���i�i�i�i
i`
i�iyi7imiLijiki�i:	i>i!i�i��i�Bi)ili|i�i
izi���ii
i�iMi�i�i�
i�i�im�iniuiq	ivi�i�
i
i*iNioipi��iqi7i.iri�iyi�
iii�
i�ifi�i�i�isi!	iyi�
iOi	i�i�i�i+iPij
i�
i>i�i�i�i�i�Yi�iAiti�iui%
i
i�ivi�i�izi2iwi,i�	i�	�i�i3iQi�i�i
ixi�i6i9ik
i�ii&�6i��i-i
i�iRiyi�iQi9ici�
i'i.i
�oi(iBiFi?il
i�i)iei�i�
izi�
iSiTi�i�i�i{i/�i�i"	i�	ibi/i�i`i�i�i0iui�ivi�i�i1i�i�
i�	i�iUi�i*i�i/iE�iSi�i8iZi|i}iFi+ii�i!i~i2i,iFiP	i�im
ii
i�ieisi�iCi�ir	ii�i�ii�iai3iZi%i-i�i�i�i�	i4i�i�i�iAi�i�i�
i�
iii
i�i�i�iDi.i�ii�i�	ini�ii�i�i�
i�i�i	i�i3i5iJi0i�is	i�
i�i�i�i@i�i�iVi�i/i�	i�i6iWiAi7ioi�
i�iPi0i�i1i�in
i���a�Qi2i�ipi:i�iPi�ibi�i�i�i�ii{i3i7iEi�i�i�	i�i�i|iFiGiXi�i�i�i�i�i]i�
i4i�i�i}
�i�i�
i5i�i&i�i8i	
i���i�	i�i�i�i�i�iLi�i�i�i�i�
i�	iYi

i�ii�i�i4i
iBi9i8i�i�i�i�i�	iHi�
i/i3iZi[i�i�
io
i�i�i:i0i�ini\i�i]i�i^i���i�i�	i�i�i�iIi�i�i�i;i�i4i�i<�i=i;i�	ii
i�i�iXi�	i�i��i5i_i�i�
i�
i�i�i�i�i}i0i>ip
iJi�i�iK�i���i&
iFi�i�i�i�
i�
i#i�i[i�i�i��fi�>iq
i�i?ir
i�i6i�i�i�ii�
i�i�i�i�iji�i�ii�i@i-ipi9i;	i6iyiAi�i�ii�	i'
i�i�ii�i�ii��Vi�i�i`i�i4i�i�i�iKi
iai�
i6i�i�i�i�ii�i"i�i�iKi�i

ii�i�i�	iYiGioi�ibifici7iis
ip�ri�	i8��i�i�i�i�iiA
iQ	i�
iCi,i
i�i�i�ii�i\iLi�iu�i~
i�
i�i�i9i�i�iBi�iZi�i�i
iCi�i�iijidi�i0ihigi�iei�iMi}i7i�
i�i
i�iDi�	i�i�i�i�ifi:i�iiNi;i�
iEiFi�i(
�i�i<i�i�iGiMi=iwigi�i~it	i?i�i�i�i
itimi#	i�	i�i+i�i�ihi�i�i��ii[i�
iOi�	i�i�i�i
i�iB
i�i�i$	it
ii�
i�iia	i�i�	i�iHii�i�i�iQi"i<	i
i�i�i-i1i�i#iu
i'i�iDi�ii�i
i�
iIi�i>iJi%	i�i�iPii
iii�i�
i=ia
i�iKi�iv
i�i�i�i�i�
i�i���_i�iji�i?iEi1i�
i�
i�iki�i8iQi�i�ili�i�i
i�imi@i
�ibi�i�i�iiRi�i�i��5i�i�i�i�iLi	iw
iini�i��i4iHii�iMi�i��i�ii�i�ii\i�ioi�iNi]i�ii�
i�i\ix
igi�iEi
i�i�i�i�i�i�ipi�i�
i�iqi
i�i�i�i�i�iOi�i�i�iri�iZi�isiti�i�ii�iP�ei�i�i�i�i�ioi�i�i^ii}i�i�i�iziAi&	i�i�i�i�
i�i�ini-i�i�
iQiiii
i�i�i�iRi�iui�	i�i�iiBi�i�i�
iy
i�i�iviwiBihiqi�i�i�i<i�i*iiiSi"iTiCi>i)i
ixiUi�i�i�i~i�i�i��zi�iVi�i�i�i�iC
i)iqi�i�iWi
	i�i�i�iDi�iE�TiF�pi�i�i#i#iyi�i�
i�i�iGi�iz
i�ii�i�i�	i�i�i�iSi�iXi
i�i�i�i�iu	i
i=iHi�i�i_i�iRiii�i�i�iwi�i�iYizi{iqi�ii3i�i5i�i
i�i{
i�i�i|i}iSi~i�i
i
i�iZi[i�iii�i�i`i�iFi�i]ii�ini�i�iIi�i
ii�i�i�i�i�iGiTiJi�iKiziSiri\i)
ii
iv	�i5���ii�
ib	i�i�iji�i�i�i�i�
i�i�i]i^i�i�i�ici�i�i�ii�
i�i�
iai:i1i�i�i�i��Aihiiai�
i6i�i�i��ib
�-i�i
iHi_ii�	i�i
i�i�i�ii�i�i�i|
i�i*
ifi�i	i�ii�
iD
ii
iLiWi�iiiUii�
ii�i$i�i
i
i�iNiiiR	iki�iE
i�i�iiiMi�iS	i'	ii`i�isi�iF
ii�iai}
i�i�
i(	ijii	i~
iViB�[ibiWi�i�ibi
iIi�ic
ii
i�i{i�i�i�	i�i�	ici�
i�	iidi
i�
i]i�i�i�i=	ieii�iii�i�
i���i
iNi	i�i�ifigi�
i�
i�
i�ihiiiii�
�=i�iXii�ii�i�i�i�i�id
i�iHiCi�
iii�iTiWi�
i
i�i9i�i�	iNi�iKiEiji4iJi�
iYi
i�iG
i	ikii�ihiOii�
i�
ii]iPiZi�ili�iQi[iki�iminiRioic	i�ii�i��iSiXiiii\i+i�i�i�i�iIiTiUiU��ii
i�ili�
iDiiiipiiqi
�ki�	imi�i�
iKii�ii�i�iVi8i�
i i�iri@iWiri�
iCiGi��i�i
i�i^i�
i�i��8itii:i�i
i!i�inisi�i"i�
i#i$i]iti�	i%i�
i&iriui'i+
i(i)i�ie
i
i}i
i�i�i�i*i4�1i+i�i�i�i�i�ii�i,ii�
i>	iXitiri?	i�i�
i-i�iviui{i�iw	iwi�i.ixiT	i,
iii�i/i0i�i�i�i1i�
i�i2i�
iGiRi
i�i^i�iYi
iZi�i
i[i3i^i�i�i�i�i�i
i)	i\i�	i4i@ivi�i5i�i6i7i�id	i]i�
i�i^i8i�i&i�	i�ii9iyiu�ii�
i�iziRi�i{i�i�i�i(i_i�i<i9i�ili�i�i�i_i 
iSi`iki�i[i�	i�i�i�
ixi:i�i;i<i!
i$i=i�i|ii�i>idi�
ii?ieii�i�i�ii�i�i�ii�
i}i@iAiBi�i.i~iaiOi
i�i�i`ibi�i�
i%ii�i�i�
i;i�
i�ii�iCiiDi�i�ii�if
i"
iLi�
i�i�i�i�
iEi;i�iFi&iGi�
i
i�ix	iHi)i�i�ici�iIidiTi�i�
i�
iei�i�i�ii	i�iJiigi~�iUi�ie	i	iii�ifiai8igi�
i�	ibihiKiy	i�i�i�iLii:i�
i�ii��i*iMiii�i�iciti�iMiNi�i�i�i�i	i�i
i�i�if	i�i�iYidiei��*ii�iOiH
i�i#
i�i#i;i�
i�	i�i�i�iI
i\i@	i�i�i�isi$
i�
iPiQi�
i�	i�
iRijiSiTi�i+i�iUi�iVi�i�iLi�
i!i�iJ
i\�4iWi�iiXiYiZi�i[i>iwikifi�i�i+i�ii%
i�i�i$i�i\i�i�iili�
i]i�ili^i_ig
i%i�i`iaigiii�i�
i�iNiK
ibicidi�i�
iciwi�
iei�ibiyi�ifihigihihi�i'iiiimi�iz	ijidiii�ii	i<i�i�i|�i�i�i�i�i�i�iiOiki�
ilii�i�
iai�i�imi�i�i�ini�
i�iui�ini�i�i�iei&
i�
ioi�i�ii�	i<i�ipiqiPiQi�iji�	i�i	i�i�i(i�i_irisi�i�i�ii<iEiRifi�i��i�i]i�i�iIiti=i�iui�ivi�i�
i�ioi�
i�
iki,iliwi'
i�i�	imi�i�i�iFi`i�i�ifi�i�i�
iSiJixi�iyizini�iL
��ipiOi�i�i�
i{i�
i�i�iA	iyi�i�iU	��i|i}i~iFi�iqi�i�
i�	i�i�ii�iii�i�iipi�i�iB	i�ioi	i�i�i�ipii-
i�iri�i�iqiqi�i(
i�iri�i�i�isi�i�i�i�
i�i�i�
i(i.
isi)
i�itii�	ii*
i�iui�i�iTiviM
i{	i�i�iti�i'i�i�i�i�
i�i�i�i�i�i�i�igiZiwi�
i�	ici�iji+
ipi�i�i�ixi�i�i�ihi�i�i�i�
i�i�i�i�i,
i=ii�i�	iiui�i�ii�i/
iyi�i
i�	iyivi�	i�i�iwi�i�i�i�i�i�i�i�
izi�i�ii�i>i�iCi'i�i�i�i{iiZi�i�i�i�i�i�i�i�iaii�i�	i�iqi?i�i
i�i|i�i�	i"i�i�
i�ii}i�i�i�i�i=iiAi�i1i�i)i�i�i�i?i�
i�
i�ii�ixi	i�i	ii�	i�
i�i�ihi�iSi�i�i�i(i�i�
i�i�i'ixiyi�i�
i�i�i
i�
i�i�i�i�i_i	i�i�i>i�i}iPi�i�i�i�i�ii~i�i
iN
iici�i
i�i�i�iHi�i	iii�i�i�i�i�i�ii�i�i�i�i�iji�i�i�	i*	i�i�i�i�
i�ii�iih
i�i�i_i�i��/i�i<i�i~i7ikiTi�ii]iiUibi�
iti�i�ig	i�izi�i�
i�i|	ii�i�i�i�i�i�i�i{i�i�i�	ii0
i�i�
i�i+	i�i,	i�i�i��Ii�i�i�i�i�ii�iiBi�i�i4isi�
i�i�i�i�i�i�
i�i�i?iCi�i�i	i�iGi�i�i�i�i�i�i�i�i�i�i�i�i�ii�i|i1
i�iimiC	i�i�ili�i�ii
i}	i�i?i�i�ii�i�i�ih	i�i�iIi�i�i�iVii�i�i�i�i�i�i^i�i�i�i�i-	i.	i�ii)i�i�i�
i�i�i�i2
i�iiii�i�
i�i�i�iAi�i�i�i-
i�i�i�i�i�i�
i�i
i�i�	i�i�i�i�i�i�
i�i�
i�i�i�
i�i�iQi�i�
iO
i�i�i�i�ii�i�iziKi�i��i[i�iJi�i�i@i�i.
i�i�i�i�iD	ii}i/
i@i�i�
i�i�i�
i�i@iiRi�i�i�	ij
i~i�i�iJi�i�i�
i�i�i���i�
i0
i�imi�i�iimi~	i�i	i�ii1
i�i�i�	i�i�ii�i�i�
idi�i�i�iXi�i�i9i�i�ii�i�iUi�i�i�i�i�iLi�i3
i�ii�i�
i	i�i�i�i�	i��i�i�
i�ii$i(ivi�i�i&i�ibi�i�i�i�i�i�i�ii�i�i�i{i�i�i�i�i�i�i�i�i�i�i2
i�i�	i�i�i�i�	ii�i�
i�i�i�i�i�i�i�i^i�i�iV	i�	i�i�i�i�i�i�i�i�i�i�i�i�ii2iW	i�i
iWioii	iik
iXi�i�i�	iAi4
i�i�
i�i3
i�i�i�	i�i�i�i�i�
i�i�i�
i�i�i�i�i�i�i�i	��iHi�i�i�i�i�iiiii�iDii�iIisi
i�i�i�
i�i i�i�i�i�iwi�i{iii�ii�i�i/	ini,iiii�i	i�	i�i�i
i�iiii
ii4
iBi�ii�iP
i5
i�
i�i�
i�	i�i�
i�i	i�ii|i�iziii�i�i
i'i�i5
i�ii�i!i�i��yi�i�iVii�i�i�	i�i�i�ii�i�i�i�i�ii�	i�
iii-ii�i�i�ii�
ii�
i�	i�i�iii�
i�i"i%ii�i�iJiCii��xi�i�iii�i	iil
i6
i�i�iii�
ii�
i�iiXi�ii�i7
ii�	i�
iNiim
iii�i iWii�i!i�	ii
i�
i>i8
i�i"i#i9
ij	iDi�i�ii$i	
i%ii�
i�i�iXi&ii'iEi�i(iFii)i�ixi�	ikii�ii�i*i+i�i�i�iDi�i�i,i�i�ii�i�iiKi-i.i/i:
i�i0iJi�ii1i|i�i�i�i�i�i�i�iEi*i2i�
i�ii�ii�iHixii�ii3i�i�i�i�i3ii�i�i;
ipi�i<
ii�ii�i�i4i5i	i�	i6i�iO��i
i7i8i�i9i�i:i�i�i;i�i�i�i�i<i�
iiYi=i>i
i	i?i�i@iAiBi�
i�i�i=
i�	i�i�ioi�	ifi�ii�i�
i�
i�	i�	iCiiDi�i#i�i�
i>
i�iEi�i�iFiZiE	i�i�i�	i[i$i�
i�iGi?
ii�	i�i�iGi�i�i�i@
iHi�iA
i\iLi�i�i�i�i�
iIi	iii�ii�iiiJi�	i�i�
i	iKiLi]iMiNi
i�iji�iQ
i�
iB
iOiPi�i�iQi�
i�i�iRi�
iSiTi�i(i�ii�iC
i�iUiiVi�iWiXi�i�iYi�i�i�iZ�i�idi[iciHi�i_i�i#i0	i\ii]i�ini

i�	i�i�ii^ii�i_ik	iD
i�i`iai�i�ibi�i�i�	ici�i�i�i�idi�ii�	i�iiidi^iE
ieiii�i�
ii�i�ifi�i_i7iii�i i�
i�iF
iiigi-i�ii!ii�ihi�	iqi;i�i�i�i�iXi�i i	i�i�iiiji�i�i�i
ikili�i�i~imiG
i`iniyipi�i�ioi>i�ipi�iqi
i�i�iri�iai�i�i�isiti"iui|i�i?ii�iivi�i�i�i�i�iei�i�iwixiyi�i�i�i�izi{i@i|i�i�	i}i�i�	i�i�i%isiiR
i�i.i�iMi?i�
i�i~ii�ibii�i@i�i�i�ii�i�i�i�i�i�i�i�i�i�i�
i�i6
iIi�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i2ii�i�imi�i@i�i�i�i�	i�i�iNii�i�ifiii�iZi�
i�i�i�i�i�i�i\iH
i�idi�i�iJi�i�	i�i�	i�
i�i�i�i�i�iKi�i�i�i#i�i�i�i�i�i�	i�i�i�iKi�i�i�i�igi�i�i�ihi�i>i�i.i�i�i�i�i�i�i�ii)in
�ti�iii�i�
io
i�
iI
i�i�
i�iiqi�i�iri�i�i���i�i�ip
i�i�	i�i�iziii�iUi�iJ
i�i�i1	iK
iti�i�i�i�i���i�
i�i�iJi�iiLi�	i�i�i�i�i�i�N)� EUCTW_TYPICAL_DISTRIBUTION_RATIO�EUCTW_TABLE_SIZE�EUCTW_CHAR_TO_FREQ_ORDER����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/euctwfreq.py�<module>r	s��X$(� ���Q�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/universaldetector.cpython-312.pyc000064400000030004151732703270025430 0ustar00�

R`i:����dZddlZddlZddlZddlmZmZmZddlm	Z	ddl
mZddlm
Z
mZmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZGd�d�Zy)a
Module containing the UniversalDetector detector class, which is the primary
class a user of ``chardet`` should use.

:author: Mark Pilgrim (initial port to Python)
:author: Shy Shalom (original C code)
:author: Dan Blanchard (major refactoring for 3.0)
:author: Ian Cordasco
�N)�List�Optional�Union�)�CharSetGroupProber)�
CharSetProber)�
InputState�LanguageFilter�ProbingState)�EscCharSetProber)�Latin1Prober)�MacRomanProber)�MBCSGroupProber)�
ResultDict)�SBCSGroupProber)�
UTF1632Proberc	�N�eZdZdZdZejd�Zejd�Zejd�Z	dddd	d
ddd
d�Z
dddddddd�Zejdfdededdfd�Zedefd��Zedefd��Zedeefd��Zd!d�Zdeeefddfd�Zdefd �Zy)"�UniversalDetectoraq
    The ``UniversalDetector`` class underlies the ``chardet.detect`` function
    and coordinates all of the different charset probers.

    To get a ``dict`` containing an encoding and its confidence, you can simply
    run:

    .. code::

            u = UniversalDetector()
            u.feed(some_bytes)
            u.close()
            detected = u.result

    g�������?s[�-�]s(|~{)s[�-�]zWindows-1252zWindows-1250zWindows-1251zWindows-1256zWindows-1253zWindows-1255zWindows-1254zWindows-1257)�
iso-8859-1z
iso-8859-2z
iso-8859-5z
iso-8859-6z
iso-8859-7z
iso-8859-8�
iso-8859-9ziso-8859-13zISO-8859-11�GB18030�CP949�UTF-16)�asciirztis-620r�gb2312zeuc-krzutf-16leF�lang_filter�should_rename_legacy�returnNc��d|_d|_g|_dddd�|_d|_d|_tj|_d|_	||_
tjt�|_d|_||_|j#�y)N���encoding�
confidence�languageF�)�_esc_charset_prober�_utf1632_prober�_charset_probers�result�done�	_got_datar	�
PURE_ASCII�_input_state�
_last_charr�logging�	getLogger�__name__�logger�_has_win_bytesr�reset)�selfrrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/universaldetector.py�__init__zUniversalDetector.__init__ds���
@D�� �8<���57������#
���
��	����&�1�1������&����'�'��1���#���$8��!��
�
�r%c��|jS�N)r-�r5s r6�input_statezUniversalDetector.input_state{s��� � � r%c��|jSr9)r3r:s r6�
has_win_byteszUniversalDetector.has_win_bytess���"�"�"r%c��|jSr9)r(r:s r6�charset_probersz!UniversalDetector.charset_probers�s���$�$�$r%c�V�dddd�|_d|_d|_d|_tj
|_d|_|jr|jj�|jr|jj�|jD]}|j��y)z�
        Reset the UniversalDetector and all of its probers back to their
        initial states.  This is called by ``__init__``, so you only need to
        call this directly in between analyses of different documents.
        Nr r!Fr%)r)r*r+r3r	r,r-r.r&r4r'r()r5�probers  r6r4zUniversalDetector.reset�s���$(�s��M�����	����#���&�1�1�������#�#��$�$�*�*�,����� � �&�&�(��+�+�F��L�L�N�,r%�byte_strc�V	�|jry|syt|t�st|�}|js�|j	t
j�rdddd�|_n�|j	t
jt
jf�rdddd�|_nt|j	d�rdddd�|_nW|j	d	�rd
ddd�|_n:|j	t
jt
jf�rdddd�|_d|_|jd
�d|_y|jtjk(r�|jj!|�rtj"|_nZ|jtjk(r=|j$j!|j&|z�rtj(|_|dd|_|j*st-�|_|j*j.t0j2k(rk|j*j5|�t0j6k(r?|j*j8|j*j;�dd�|_d|_y|jtj(k(r�|j<st?|j@�|_|j<j5|�t0j6k(rS|j<j8|j<j;�|j<jBd�|_d|_yy|jtj"k(�r:|jDs�tG|j@�g|_"|j@tHjJzr#|jDjMtO��|jDjMtQ��|jDjMtS��|jDD]Z}|j5|�t0j6k(s�&|j8|j;�|jBd�|_d|_n|jTj!|�rd|_+yyy)a�
        Takes a chunk of a document and feeds it through all of the relevant
        charset probers.

        After calling ``feed``, you can check the value of the ``done``
        attribute to see if you need to continue feeding the
        ``UniversalDetector`` more data, or if it has made a prediction
        (in the ``result`` attribute).

        .. note::
           You should always call ``close`` when you're done feeding in your
           document if ``done`` is not already ``True``.
        Nz	UTF-8-SIG��?�r!zUTF-32s��zX-ISO-10646-UCS-4-3412s��zX-ISO-10646-UCS-4-2143rTr"���),r*�
isinstance�	bytearrayr+�
startswith�codecs�BOM_UTF8r)�BOM_UTF32_LE�BOM_UTF32_BE�BOM_LE�BOM_BEr-r	r,�HIGH_BYTE_DETECTOR�search�	HIGH_BYTE�ESC_DETECTORr.�	ESC_ASCIIr'r�stater�	DETECTING�feed�FOUND_IT�charset_name�get_confidencer&rrr$r(rr
�NON_CJK�appendrr
r�WIN_BYTE_DETECTORr3)r5rBrAs   r6rWzUniversalDetector.feed�s����9�9�����(�I�.� ��*�H��~�~��"�"�6�?�?�3�!,�"%� "����
�$�$�f�&9�&9�6�;N�;N�%O�P�,4�3�TV�W����$�$�%8�9�!9�"%� "�	����$�$�%8�9�!9�"%� "�	����$�$�f�m�m�V�]�]�%C�D�,4�3�TV�W���!�D�N��{�{�:�&�2� ��	�����
� 5� 5�5��&�&�-�-�h�7�$.�$8�$8��!��!�!�Z�%:�%:�:��%�%�,�,�T�_�_�x�-G�H�$.�$8�$8��!�"�2�3�-����#�#�#0�?�D� ����%�%��)?�)?�?��#�#�(�(��2�l�6K�6K�K� $� 4� 4� A� A�"&�"6�"6�"E�"E�"G� "����
!��	�����
� 4� 4�4��+�+�+;�D�<L�<L�+M��(��'�'�,�,�X�6�,�:O�:O�O� $� 8� 8� E� E�"&�":�":�"I�"I�"K� $� 8� 8� A� A����
!��	�
P��
�
�*�"6�"6�
6��(�(�)8��9I�9I�)J�(K��%��#�#�n�&<�&<�<��)�)�0�0��1B�C��%�%�,�,�\�^�<��%�%�,�,�^�-=�>��/�/���;�;�x�(�L�,A�,A�A�$*�$7�$7�&,�&;�&;�&=�$*�O�O�#�D�K�
!%�D�I��0��%�%�,�,�X�6�&*��#�7�#7r%c	�H�|jr|jSd|_|js|jj	d��nD|j
tjk(r
dddd�|_�n|j
tjk(r�d}d}d}|jD]}|s�|j�}||kDs�|}|}�!|r�||jkDr�|j}|�J�|j�}|j�}|jd	�r(|jr|j j#||�}|j$r.|j&j#|xsdj�|�}|||j(d�|_|jj+�t,j.kr�|jd
��|jj	d�|jD]�}|s�t1|t2�rR|j4D]B}|jj	d|j|j(|j���D�h|jj	d|j|j(|j����|jS)
z�
        Stop analyzing the current document and come up with a final
        prediction.

        :returns:  The ``result`` attribute, a ``dict`` with the keys
                   `encoding`, `confidence`, and `language`.
        Tzno data received!rrDrEr!Nr ziso-8859r"z no probers hit minimum thresholdz%s %s confidence = %s)r*r)r+r2�debugr-r	r,rRr(rZ�MINIMUM_THRESHOLDrY�lowerrIr3�ISO_WIN_MAP�getr�
LEGACY_MAPr$�getEffectiveLevelr/�DEBUGrGr�probers)	r5�prober_confidence�max_prober_confidence�
max_proberrArY�lower_charset_namer#�group_probers	         r6�closezUniversalDetector.closesa���9�9��;�;����	��~�~��K�K���1�2��
�
�*�"7�"7�
7�'.�c�r�R�D�K��
�
�*�"6�"6�
6� $��$'�!��J��/�/����$*�$9�$9�$;�!�$�'<�<�,=�)�!'�J�
0��4�t�7M�7M�M�)�6�6��#�/�/�/�%1�%7�%7�%9�"�'�6�6�8�
�&�0�0��<��*�*�'+�'7�'7�';�';�.��(���,�,�#'�?�?�#6�#6�%�+��2�2�4�l�$�L�!-�",� *� 3� 3�����;�;�(�(�*�g�m�m�;��{�{�:�&�.����!�!�"D�E�$(�$9�$9�L�'� �!�,�0B�C�&2�&:�&:�F� �K�K�-�-� 7� &� 3� 3� &��� &� 5� 5� 7�	�';����)�)�3�(�5�5�(�1�1�(�7�7�9�	�%:�$�{�{�r%)rN)r1�
__module__�__qualname__�__doc__r`�re�compilerPrSr]rbrdr
�ALL�boolr7�property�intr;r=rrr?r4r�bytesrHrWrrm�r%r6rr8s7��� ��#����N�3���2�:�:�l�+�L�"��
�
�>�2��$�$�$�$�$�$�$�%�	�K� �$� �$�����J�'5�&8�&8�%*��#��#��
�	�.�!�S�!��!��#�t�#��#��%��m�!4�%��%��&A+�U�5�)�#3�4�A+��A+�FM�z�Mr%r)rprJr/rq�typingrrr�charsetgroupproberr�
charsetproberr�enumsr	r
r�	escproberr�latin1proberr
�macromanproberr�mbcsgroupproberr�
resultdictr�sbcsgroupproberr�
utf1632proberrrrxr%r6�<module>r�sH��8���	�(�(�2�(�;�;�'�&�*�,�"�,�(�r�rr%python3.12/site-packages/pip/_vendor/chardet/__pycache__/euctwprober.cpython-312.pyc000064400000002636151732703270024241 0ustar00�

R`i���J�ddlmZddlmZddlmZddlmZGd�de�Zy)�)�EUCTWDistributionAnalysis)�CodingStateMachine)�MultiByteCharSetProber)�EUCTW_SM_MODELc�L��eZdZd�fd�Zedefd��Zedefd��Z�xZS)�EUCTWProber�returnc���t�|��tt�|_t�|_|j�y)N)�super�__init__rr�	coding_smr�distribution_analyzer�reset)�self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/euctwprober.pyrzEUCTWProber.__init__#s.���
����+�N�;���%>�%@��"��
�
��c��y)NzEUC-TW��rs r�charset_namezEUCTWProber.charset_name)���rc��y)N�Taiwanrrs r�languagezEUCTWProber.language-rr)r	N)	�__name__�
__module__�__qualname__r�property�strrr�
__classcell__)rs@rrr"s>������c������#���rrN)	�chardistributionr�codingstatemachiner�mbcharsetproberr�mbcssmrrrrr�<module>r&s ��88�2�3�"�
�(�
rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/euckrfreq.cpython-312.pyc000064400000027542151732703270023672 0ustar00�

R`i�4���dZdZdZy)g@�0	(0	�
��xiti�i�i�iHia��i�i�i�i+i��Wiui��hii]i�i�i�i�i�i�i�i�i�i�iviwi�i�i��imiFi!ipi�ii��i�i�i�i�ixi��/i�i�i�i�i�i�i�i9ii�i��ti�i-iyi��Ki��i�i�i�i��iOi�ini�i�i�i�i�ii0�i��<i4�{i�i�i�i�i�iii�iri�i�i�i�i�i�i�i�i�i�i�iXiXi�i�i�i��Yi�i�i&i�iPi�i�i�i�i�i�i�i^i���i�i�i�i�i�i9i�i�i�i�i�i�iQi�i"�it�i��i�ii]i{i7i��i�i{i�i;i�iui�izi/i�i|��i�i�i�i7i�i�i.i�i�i�i�ii�ii�iiiiii{iiii#i|i}i�i~i�iti8ii_i	i
iii
i!iiii_ii�i�i�iii*i�iuii`i"i�ii|iii�i�iiiaiiiiiii?iiRi!i i/i�i�i!i"i=i�i�i#i�i$i%i&i'i(i)i,i�i'ibi$i*i�i+i�i-i�i,i�ii�i�i�i&iUi�i�i#ii�i-i.�'ii�ifi/isi�i0i�i�iii�i i�i9ie�[i1i�i�iiZi�i�i:i�i�i�i2i3i�iGii�i�yi4i�i�i�i5i6i7i,�wi�i�isi8i���i9i:ii�i~i;ii<i;i}i=i>i?ioi)i�i�i@i�iAiBi�i�i2iYiCiDi�i<iEiFiGiHiIi%iJiKiLiMiNiOi�`i>iPi�i=iQi�iRi�iSiTi;i�i�i�i�iiUi�iViWiXi4iY�iiZi[i�i\i]�ii^i�i�i_�"iPi�i�i`i;i�i~iHia�ivi��zi?ii�i�ibi�i�i<icid�dieific�0i�idiigiyi�i�ihii�si0iji=iki�ili�i�i�i<ibi�i��Uii�ii�iIiminioiipiqirisitiu�i�i�i�i6iviwi�i*i��]ixiyi�i�iziZi��-�:�ibi
i{i|�i&i'i�i�i5i�i�ii>i}i~iwiigi�i�i�i6i�i%i�i��(i��vi��i�iwi�i��i��Ei�i�i�i�i�i�i�i�i�if��iVi�i7i�i�i�i�iBi��Ni�i[i�i'i�i�i�i�i�i���iSi�i�i�i�i�iei�iixi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i?i�i�ii�iqi�ifi�i(i)i�i�i~i�i\i�i�i�i�i�i)ii�i�ii�ii�i�i�i�i��$i��i��i�i�ili�i�i�i�~i�i�iC�i�ii�i@i�i�i�i�i��2i���iKiiziVii�����iQirifiii��i ihi+i3ii1�ii�i�i���gi(i�i�i�izi�i�i�i�i�i�i�i�i�i�i�i���i�i�i�i�iA�i<ijii�iMigi�i2i�i�i�i�i�i�i�i�i�iVihii�iJi�i�i0��i�b��i�i�ii�i�i��iY�i�i��i���ai!�*�i���i�i�iKiDi8iiRiiB�i@i�i�i�ii�i�i�iyi�i�i�i�iiXi:i�i�i#i�i�i�iii��Gi�i�iki�i�i=i�i��i��!i�i�i��J��i��=�i�i�i}i�iijii�i�i�i�i�i�i�i�i�i�i�iEi�i�i�i��ijiO�4i��i�i�i�i�i�i�i�i	ivi]i�iCi�i�i�i�i�i�i�ioi�i��i�i
i�i��iliciAi�i�i�i�i�i�i�i�i�Ti�i�ik�����i�i�i�i3i*i��qi���i>i�ii�i�i�ii+iiiii�;i��piixii��i�iiii�i�i	i�i
ii�ii
i�i���iliii�i�ii�)��i��imi8i�iiDii�iiiiii�ii�ii�7iL�Bi�iiDii�ii�i�itiiii i!i
i"i#i$i%iRi&i'i(i)i*�i+i,�i,i-i.�mi�i
i^i/ici�iEi�i�i�iaimi0iEi1i2i3ii�i�i4iTi�i�i�i5i�ii�i�i6i7iini�i�ioi8i9iFi�i�i�i:iGi;i<i=i>i?i@iAiBiCiDiEi$iFiGi�i�i%i�i�ipiHiIiJiKiLi�i�ii�i�i�i�iMiNiOiPiQiR�i�iSi/iTi�iUi�iiiVi��IiH��ii�i�i�iWi�iX�iqiYiZi[i\i�iri�isi]i^i_i`�iviLia�i��.i�ibiFi>i�i��jic�Zi�i�iBi6i�i`idieii��|iifi�i�i5igi�ihi�ii�H�iji�i�iki�ili�i1iminioipiqiriCisitiuiviwi�ixiyizi{i�i�i|i}i~ii�i�i��iii�iOi�i�i�i�i�i�ii�i�i�i�i�iEi�i�iqi�iiIi�i\i�i-i�i�iSi�i�i��
i�iei�i�i��li�iM���Qi�Piii^ii
i-iFi�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i
i.i�iti�i�i�i�iJi�i�i�i�i�i�i�igi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i���i�i�iui�i�i�i9i	i�i�i�i	i�i$i�i�i�i�i�5i%�ik�L�i�ii�i�i�i�ii�i�iAi�i�i�i�i�i�i�i�i��R�iui�i�i�ii�i)i�i�i:i�i�i��i���i�i"i$ivi�i���ciZ�i�i�i�i��i*iWiiKi�iLi��+�i���i�i�i�ii�i	iB��i�i?i��i�ii�i�i�i��iMi[i5i�i�i�ini���i�i�i��Ci�i'i�i�i�i�i�i�i�i�i
i�i�i�i	i�ii�i�i�i�i��FiTi/i�i�i�i���8i��ui�i�i�iKi�i(iM�i�ii�i�i�i�i��i�ii�i�iTi��?i��i�i�ii�i�ei i(i�i�i�i�i�i��%i0��i��Oi�i	i8i	i	i	i	i	i��ii	i	i	�i��#���i		i����Vi
�iiPi� �MiWi�i
	ii	i�i|i	i
	�Si��i�ii�i�i�i	i	i�i�i	i	i	i	i	i	i�i	i	��9�Dii���i��i	�3i�i�i	i	i	i{i	ii�i	i	i	i�i 	i��i�ii�i!	iki�i��i�iN��iYi�i"	i#	i$	i%	i&	i'	i(	i]i)	i*	i+	i,	i-	i.	i�i/	i�i��>i���ri1	i�i�i��i\i�i2	i�i3	i�i�i4	i5	i6	iwi7	i�i8	i�i3ii�i�i9	i:	iL����i;	��i<	i�ii�ii�i�ii�i�i�i=	i�iJi>	i?	i@	i�iA	��iB	iC	iD	i�iE	i�i�iF	iG	iH	iI	i�i�i�i�i�i�iJ	iK	ii�iL	iM	iN	iiIiO	iP	i�iQ	iR	iS	i�iT	i�iU	iV	iW	iX	i�iY	iZ	i[	i\	i]	i�i�i^	i_	i`	ia	i�iib	ic	id	ie	ii�if	ig	iUi�ixi ih	i�i�ii	ij	�ii�i4i&��i�i�i!i���i�iSiyii�i�i"i
i�i#ik	i�il	im	in	�i�i�ipiQi�i.io	iU�iOi�ip	i�iq	ir	is	ixit	i�iu	iv	iw	iii$ix	i�iy	i�i`iz	i{	i|	i}	��i~	i	i�	i�	i�	i�	i�	i�	��iCi��i�i�i%iyi�iioi�	i�i�	i�	i�	i�	i�	i�	i�i�	i�	i�	i�	i�i�i�	i�i�i�	i�	i�@i�i�i�	iGi�	i�i�ii2��i�i�i�i�	i�	i�	i�	iNi�	ii�i�i�i�i�	i�	i�	i�	i�	�ri�	i�izin�i�i�iPi�	i#i�	i&iQi�	i�imi�	ici�i�i�	i'i�	iwi�	i�	��i(ili@i�i�i�i)i�i*i�	i�	i�	i�	i�i�	i�	i�	i�	i�i�i�	i�i�i�	i�	i�	iHi�i�	i�	ii�	ii�i�	i�	i�	i�i�	i�	iri�	ii��Ai�	i���i�i�i�	�}i,i�i�i:i�ii��i
iiIi�	iNi�i1i�	iW����i�i�i�i�i�i�	i+i�	i�	�1i�ibi�i�	iqi�	i,i�	i��iei�i��_iidi�	i�	i�	i�	i�	i�	�i�i2i�i�i�i�	�i�	i�	i�	i�	ii�	i�i�	i�	i�i-i�	i�i�i�	i�	i�	i�	i�	i�	i�i�	i�	i�	i�	i�	i�	i�i�	i�i�	i�	���i7i�	i�i�	ii�	i�	i�	i�	i�	i�	i�	��i�i�i�i�i�i����,iGi�ii�i�	i�i^i�	i�	i.i�	�igi�i�	i�i�	i�	i�	i�i�i�	ii�ii_i�i�	i�	i�	i��ihihii{i�	i|i�i��i3i�	i�	i�	i�i�i�	i
i
�\ii�i�ii
i
i
i
i
i
i
�i	
i

i
i
ii�i�i
iji
iii�i4ii
i
i
i
i
i
i��i
i
i
i
i��6id��i/i
i
ii�i��oi
i�iRi��i��	�&i
�k�niz���i�i�i
i�i
i����Xi�idiiSi�i}i
i}ii�i~i�i�ii�i 
i!
iNi"
i�i��i�i�i�i#
i��isi$
i%
i&
�fiDii1i'
i�ii(
i@i)
�^���i�i*
i�i+
i,
i-
i.
i/
iJi+i0
i1
i2
i�iTi�i3
i4
i5
i6
��i7
iAi.i�i�i�i8
i9
ii"i:
i;
i�i<
i=
i>
ii�i0i?
i�i@
iiA
iB
iiC
iD
iE
iF
iG
i�i�i_i[iH
iI
i�ii`iaiJ
i�ii�i�iK
iL
iM
iN
�iO
i�iiiiiiP
iQ
iR
N)� EUCKR_TYPICAL_DISTRIBUTION_RATIO�EUCKR_TABLE_SIZE�EUCKR_CHAR_TO_FREQ_ORDER����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/euckrfreq.py�<module>r
s��R$'� ���T�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/langgreekmodel.cpython-312.pyc000064400000226354151732703300024657 0ustar00�

R`i����F_�ddlmZididd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��d	idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d(�d1d�d2d�d3d�d4d�d5d��ddddd(dddddd6�
��d
idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��dd(ddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d(�d/d�d0d(�d1d�d2d�d3d(�d4d(�d5d��ddd(dddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��d
idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d(�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d(�d)d�d*d�d+d�d,d(�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d�d#d�d$d(�dd��id%d�d&d(�d'd�d(d�d)d�d*d�d+d�d,d�d-d(�d.d(�d/d�d0d(�d1d�d2d�d3d(�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd(��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d�d#d�d$d�dd(��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��ididd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d(�d)d�d*d�d+d�d,d(�d-d�d.d�d/d�d0d�d1d�d2d�d3d(�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d(�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd(��id%d�d&d�d'd�d(d(�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d(�d3d�d4d(�d5d��dddddddddd(d6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddd(dddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��dd(d(dddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd(��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d(�d3d�d4d�d5d��dddddddddd(d6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d(�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d(�d5d��ddddddddddd6�
��d idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
��d!idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d(�d&d(�d'd(�d(d(�d)d(�d*d�d+d(�d,d�d-d(�d.d(�d/d(�d0d(�d1d(�d2d�d3d(�d4d(�d5d(��d(d(dd(d(d(ddddd6�
��d"idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd(��id%d�d&d(�d'd�d(d(�d)d�d*d�d+d(�d,d�d-d(�d.d(�d/d(�d0d(�d1d(�d2d(�d3d(�d4d(�d5d(��d(d(dd(d(d(ddddd6�
��d#idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d(�d'd(�d(d�d)d�d*d�d+d(�d,d�d-d(�d.d�d/d(�d0d(�d1d�d2d�d3d(�d4d(�d5d(��d(d(ddd(dddddd6�
��d$idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd(��id%d�d&d(�d'd(�d(d(�d)d(�d*d(�d+d(�d,d�d-d(�d.d(�d/d(�d0d(�d1d(�d2d(�d3d(�d4d(�d5d(��d(d(ddd(dd(dddd6�
��didd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d(�dd��id%d(�d&d(�d'd(�d(d�d)d(�d*d�d+d(�d,d(�d-d(�d.d(�d/d(�d0d(�d1d(�d2d�d3d(�d4d(�d5d(��d(d(d(d(d(dddddd6�
���id%idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d�d#d(�d$d�dd(��id%d�d&d�d'd�d(d(�d)d�d*d�d+d�d,d(�d-d�d.d(�d/d�d0d�d1d�d2d(�d3d�d4d(�d5d��ddddddddddd6�
��d&idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d�d&d(�d'd�d(d(�d)d�d*d(�d+d�d,d(�d-d(�d.d(�d/d(�d0d(�d1d(�d2d(�d3d�d4d(�d5d��ddddd(dd(d(dd(d6�
��d'idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d(�d#d(�d$d(�dd(��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d(�d-d�d.d�d/d�d0d�d1d�d2d(�d3d�d4d(�d5d��ddd(dddd(d(d(d(d6�
��d(idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d�d#d�d$d(�dd��id%d(�d&d(�d'd(�d(d�d)d�d*d�d+d(�d,d(�d-d(�d.d(�d/d(�d0d(�d1d(�d2d�d3d(�d4d(�d5d(��d(d(d(d(d(dd(dd(dd6�
��d)idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d(�d3d�d4d�d5d��ddddddd(dddd6�
��d*idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d(�d'd�d(d�d)d�d*d�d+d(�d,d�d-d(�d.d(�d/d(�d0d(�d1d�d2d�d3d�d4d(�d5d(��d(d(ddd(dddddd6�
��d+idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d(�d#d(�d$d�dd(��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d(�d-d�d.d�d/d(�d0d�d1d�d2d(�d3d�d4d(�d5d��ddd(dddd(d(d(d(d6�
��d,idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d�dd(��id%d(�d&d(�d'd(�d(d(�d)d�d*d(�d+d(�d,d�d-d(�d.d(�d/d(�d0d(�d1d(�d2d(�d3d(�d4d(�d5d(��d(d(ddd(dd(d(dd(d6�
��d-idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d�d&d�d'd(�d(d(�d)d�d*d(�d+d�d,d(�d-d(�d.d(�d/d(�d0d�d1d�d2d(�d3d�d4d(�d5d��dd(d(dddd(d(d(d(d6�
��d.idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d(�d-d�d.d(�d/d�d0d�d1d�d2d(�d3d(�d4d�d5d��dd(d(dddd(d(d(d(d6�
��d/idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d(�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d(�d-d�d.d�d/d(�d0d(�d1d�d2d(�d3d(�d4d�d5d��dddd(ddd(d(ddd6�
��d0idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d�d&d�d'd(�d(d(�d)d�d*d(�d+d(�d,d(�d-d�d.d�d/d�d0d�d1d�d2d(�d3d�d4d�d5d��d(d(d(dddd(d(d(d(d6�
��d1idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d(�d#d(�d$d�dd(��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d(�d3d�d4d�d5d��dd(ddddd(dd(dd6�
��d2idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d(�d$d(�dd��id%d(�d&d(�d'd(�d(d(�d)d�d*d(�d+d(�d,d(�d-d(�d.d(�d/d(�d0d(�d1d�d2d�d3d(�d4d(�d5d(��d(d(d(d(d(dddd(dd6�
��d3idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d(�d-d�d.d(�d/d�d0d�d1d�d2d(�d3d�d4d(�d5d��dd(d(dddd(d(dd(d6�
��d4idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d�d&d(�d'd�d(d(�d)d�d*d(�d+d(�d,d(�d-d(�d.d�d/d(�d0d(�d1d�d2d(�d3d�d4d�d5d��dd(d(d(d(dd(d(d(d(d6�
��d5idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
���idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d(�d$d(�dd(��id%d(�d&d�d'd�d(d(�d)d�d*d(�d+d(�d,d(�d-d(�d.d�d/d(�d0d�d1d�d2d(�d3d(�d4d�d5d��d(d(d(d(d(dd(d(d(dd6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d(�d-d�d.d�d/d(�d0d�d1d�d2d(�d3d�d4d(�d5d��d(d(d(dddd(d(d(d(d6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d(�d$d�dd(��id%d�d&d(�d'd�d(d�d)d�d*d�d+d(�d,d�d-d(�d.d(�d/d(�d0d(�d1d(�d2d(�d3d(�d4d(�d5d(��d(d(ddd(dddddd6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d(�d#d(�d$d(�dd(��id%d�d&d�d'd�d(d(�d)d�d*d�d+d�d,d(�d-d�d.d�d/d�d0d�d1d�d2d(�d3d�d4d(�d5d��dd(d(dddd(d(ddd6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d(�d"d�d#d(�d$d(�dd(��id%d�d&d�d'd�d(d(�d)d�d*d�d+d�d,d(�d-d�d.d�d/d�d0d(�d1d�d2d(�d3d�d4d(�d5d��dd(d(dddd(d(d(d(d6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d(�d)d�d*d(�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d��ddddddddddd6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d(�d'd�d(d�d)d�d*d�d+d(�d,d�d-d�d.d�d/d(�d0d(�d1d�d2d�d3d(�d4d(�d5d(��d(d(ddddddddd6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d(�d&d(�d'd(�d(d�d)d�d*d�d+d�d,d�d-d(�d.d(�d/d(�d0d(�d1d�d2d�d3d(�d4d(�d5d(��d(d(ddd(dddddd6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd�d(d(�d)d�d*d�d+d(�d,d�d-d(�d.d(�d/d(�d0d(�d1d�d2d(�d3d(�d4d(�d5d(��d(d(ddddddddd6�
�idd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�dd��id%d�d&d�d'd(�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d(�d0d(�d1d�d2d�d3d�d4d(�d5d(��d(d(ddddddddd6�
�d6�
�Zidd7�dd7�dd7�d(d7�d2d7�d,d7�d0d7�d8d7�d4d7�d3d7�d/d9�d-d7�d:d7�d*d9�d5d7�d$d7�d.d7�id!d7�d"d7�d;d7�d&d7�d'd7�d#d7�d<d7�d=d7�d+d7�d>d7�d?d7�d@d7�d%d7�d1d7�dd7�d)dA�ddA��iddA�ddA�ddA�ddA�ddA�ddA�ddA�ddA�dBdA�d
dA�ddA�ddA�d	dA�ddA�ddC�ddC�ddC��iddC�ddC�ddC�d
dC�ddC�ddC�d dC�ddA�ddA�ddA�ddA�dDdA�dEdA�dFdA�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]d^�d_d`�dadb�dcdd�dedc�dfdg�dHdh�didi�djdK��idddk�dldm�dndo�d`dp�dqdr�dsdt�dudA�d^dA�dvdA�dNdA�dodA�dwdA�dxdU�dPdQ�dpde�dJdf�dRd��idVdw�dydv�dLdq�dhdM�dzd{�d|dx�d}d_�drdl�d~dO�dXd�dda�dbd��dkdG�d�dI�dTd�d\d]�dgdz��idmdy�d{dn�d�d|�d�d�d�dA�d�dA�d�dA�d�dA�d�dA�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7��id�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7��id�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�dA�d�d��d�d�d�dA�d�dA�d�dA�d�dA�d�dA�d�dA�d�dA��id�dA�d�dA�d�dA�d�dY�d�dA�d�dA�d�dA�d�dA�d�dA�d�dA�d�d��d�dA�d�dA�d�d�d�d	�d�dS�d�dW��idZdA�dtd
�d�dA�d�d}�d�d��d�d~�d�d�d�d�d�d
�d�d�d�d�d�du�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�dۓd�d�d�d�d�d�d�d�d�d�d�dj�d�d �d�d{�d�d��d�d!��id�d"�d�d#�d�d$�d�d��d�d�d�d%�d�d&�d�d'�d�d(�d�d)�d�d*�d�d+�d�d,�d�d-�d�d.�d�d/�d�d0��id�d1�d�d2�d�d3�d�d4�d�d5�d�d8�d�d�d�d:�d�d@�d�d<�d�dB��dd=�d�dF��dd[�dCd;�dAd>�d9d?��d7dAi�Ze�d�dee�d�d�d���Zidd7�dd7�dd7�d(d7�d2d7�d,d7�d0d7�d8d7�d4d7�d3d7�d/d9�d-d7�d:d7�d*d9�d5d7�d$d7�d.d7�id!d7�d"d7�d;d7�d&d7�d'd7�d#d7�d<d7�d=d7�d+d7�d>d7�d?d7�d@d7�d%d7�d1d7�dd7�d)dA�ddA��iddA�ddA�ddA�ddA�ddA�ddA�ddA�ddA�dBdA�d
dA�ddA�ddA�d	dA�ddA�ddC�ddC�ddC��iddC�ddC�ddC�d
dC�ddC�ddC�d dC�ddA�ddA�ddA�ddA�dDdA�dEdA�dFdA�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]d^�d_d`�dadb�dcdd�dedc�dfdg�dHdh�didi�djdK��idddk�dldm�dndo�d`dp�dqdr�dsdt�dudA�d^dA�dvdA�dNdA�dodA�dwdA�dxdU�dPdQ�dpde�dJdf�dRd��idVdw�dydv�dLdq�dhdM�dzd{�d|dx�d}d_�drdl�d~dO�dXd�dda�dbd��dkdG�d�dI�dTd�d\d]�dgdz��idmdy�d{dn�d�d|�d�d�d�dA�d�dA�d�dA�d�dA�d�dA�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7��id�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7��id�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�d7�d�dA�d�d��d�ds�d�dA�d�dA�d�dA�d�dA�d�dA�d�dA�d�dA��id�dA�d�dA�d�dA�d�dY�d�dA�d�dA�d�dA�d�dA�d�dA�d�dA�d�d��d�d��d�d�d�d�d�d	�d�dS�d�dW��idZdA�dtd
�d�dA�d�d}�d�d��d�d~�d�d�d�d�d�d
�d�d�d�d�d�du�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�dۓd�d�d�d�d�d�d�d�d�d�d�dj�d�d �d�d{�d�d��d�d!��id�d"�d�d#�d�d$�d�d��d�d�d�d%�d�d&�d�d'�d�d(�d�d)�d�d*�d�d+�d�d,�d�d-�d�d.�d�d/�d�d0��id�d1�d�d2�d�d3�d�d4�d�d5�d�d8�d�d�d�d:�d�d@�d�d<�d�dB��dd=�d�dF��dd[�dCd;�dAd>�d9d?��d7dAi�Ze�d�dee�d�d�d���Z�y	(
�)�SingleByteCharSetModel�<��7��:�$�=�.�6��3�+�)�"�(�4�/�,�5�&�1�;�'�#�0�%�!�-�8�2�9��������� �
�����
����	��)
�r����*�����r8�r9r>r;r=r?r@r:�r<��>�?�@�A�R�B�d�C�h�D�^�E�b�F�e�G�t�H�f�I�o�J��K�u�L�\�M�X�N�q�O�U�P�Q�v�i�S�T�r�V�w�W�_�c�Y�m�Z��[�]�`�a�g�j�x�k�l�n�p�s�y�z�{�|�}�~������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zwindows-1253�Greekg���s�?Fu~ΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩάέήίαβγδεζηθικλμνξοπρςστυφχψωόύώ)�charset_name�language�char_to_order_map�language_model�typical_positive_ratio�keep_ascii_letters�alphabetz
ISO-8859-7N)�#pip._vendor.chardet.sbcharsetproberr�GREEK_LANG_MODEL� WINDOWS_1253_GREEK_CHAR_TO_ORDER�WINDOWS_1253_GREEK_MODEL�ISO_8859_7_GREEK_CHAR_TO_ORDER�ISO_8859_7_GREEK_MODEL����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/langgreekmodel.py�<module>rs����F�D<��>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�D<�@�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�AD<�~�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�D<�|�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�}D<�z�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�{D<�x	�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�y	D<�v�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�wD<�t
�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�u
D<�r�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�sD<�p�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�qD<�n�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�oD<�l�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�mD<�j�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�kD<�h�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�iD<�f�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�gD<�d�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�eD<�b�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�cD<�`!�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�a!D<�^#�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�_#D<�\%�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�]%D<�Z'�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�['D<�X)�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�Y)D<�V+�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�W+D<�T-�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�U-D<�R/�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�S/D<�P1�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�Q1D<�N3�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�O3D<�L5�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�M5D<�J7�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�K7D<�H9�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�I9D<�F;�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�G;D<�D=�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�E=D<�B?�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�C?D<�@A�>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�AAD<�~B�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�BD<�|D�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�}DD<�zF�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�{FD<�xH�>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�yHD<�vJ�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�wJD<�tL�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�uLD<�rN�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�sND<�pP�>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�qPD<�nR�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�oRD<�lT�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�mTD<�jV�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�kVD<�hX�>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�iXD<�fZ�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�gZD<�d\�>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�e\D<�b^�>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�c^D<�``�>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�a`D<�^b�>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�_bD<�\d>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�~>�
�A�>�
�A�>�	�A�>�	�A�	>�
	�A�>�	�A�
>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>�	�A�>� 	�A�!>�"	�A�#>�$	�A�%>�&	�A�'>�(	�A�)>�*	�A�+>�,	�A�->�.	�A�/>�0	�A�1>�2	�A�3>�4	�A�5>�6	�A�7>�8	�A�9>�:	�A�;>�<	�A�=>�>	�A�?>�@	�A�A>�B	�A�C>�D	
�1�E>�F	�A�G>�H	�A�I>�J	�A�K>�L	
�1�M>�N	�A�O>�P	�A�Q>�R	�A�S>�T	
�1�U>�V	�A�W>�X	�A�Y>�Z	�A�[>�\	
�1�]>�^	�A�_>�`	
�1�a>�b	
�1�c>�d	
�1�e>�f	�A�g>�h
��
�
�
�
�
�
�
�
�{>�~>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�~>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�~>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�~>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�~>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�~>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�~>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�~>	�
�A�>	�
�A�>	�	�A�>	�	�A�	>	�
	�A�>	�	�A�
>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	�	�A�>	� 	�A�!>	�"	�A�#>	�$	�A�%>	�&	�A�'>	�(	�A�)>	�*	�A�+>	�,	�A�->	�.	�A�/>	�0	�A�1>	�2	�A�3>	�4	�A�5>	�6	�A�7>	�8	�A�9>	�:	�A�;>	�<	�A�=>	�>	�A�?>	�@	�A�A>	�B	�A�C>	�D	
�1�E>	�F	�A�G>	�H	�A�I>	�J	�A�K>	�L	
�1�M>	�N	�A�O>	�P	�A�Q>	�R	�A�S>	�T	
�1�U>	�V	�A�W>	�X	�A�Y>	�Z	�A�[>	�\	
�1�]>	�^	�A�_>	�`	
�1�a>	�b	
�1�c>	�d	
�1�e>	�f	�A�g>	�h
��
�
�
�
�
�
�
�
�{>	�KvD<��ZxA$��s�A$��s�A$��s�A$��s�	A$�
�s�A$��s�
A$��s�A$��s�A$��s�A$��s�A$���A$���A$���A$���A$���A$� ��!A$�"��#A$�$��%A$�&��'A$�(��)A$�*��+A$�,��-A$�.��/A$�0��1A$�2��3A$�4��5A$�6��7A$�8��9A$�:��;A$�<��=A$�>��?A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$� �F2��
�6�#�#��N���A"��s�A"��s�A"��s�A"��s�	A"�
�s�A"��s�
A"��s�A"��s�A"��s�A"��s�A"���A"���A"���A"���A"���A"� ��!A"�"��#A"�$��%A"�&��'A"�(��)A"�*��+A"�,��-A"�.��/A"�0��1A"�2��3A"�4��5A"�6��7A"�8��9A"�:��;A"�<��=A"�>��?A"�@��AA"�B��CA"�D��EA"�F��GA"�H��IA"�J��KA"�L��MA"�N��OA"�P��QA"�R��SA"�T��UA"�V��WA"�X��YA"�Z��[A"�\��]A"�^��_A"�`��aA"�b��cA"�d��eA"�f��gA"�h��iA"�j��kA"�l��mA"�n��oA"�p��qA"�r��sA"�t��uA"�v��wA"�x��yA"�z��{A"�|��}A"�~��A"�@��AA"�B��CA"�D��EA"�F��GA"�H��IA"�J��KA"�L��MA"�N��OA"�P��QA"�R��SA"�T��UA"�V��WA"�X��YA"�Z��[A"�\��]A"�^��_A"�`��aA"�b��cA"�d��eA"�f��gA"�h��iA"�j��kA"�l��mA"�n��oA"�p��qA"�r��sA"�t��uA"�v��wA"�x��yA"�z��{A"�|��}A"�~��A"�@��AA"�B��CA"�D��EA"�F��GA"�H��IA"�J��KA"�L��MA"�N��OA"�P��QA"�R��SA"�T��UA"�V��WA"�X��YA"�Z��[A"�\��]A"�^��_A"�`��aA"�b��cA"�d��eA"�f��gA"�h��iA"�j��kA"�l��mA"�n��oA"�p��qA"�r��sA"�t��uA"�v��wA"�x��yA"�z��{A"�|��}A"�~��A"�@��AA"�B��CA"�D��EA"�F��GA"�H��IA"�J��KA"�L��MA"�N��OA"�P��QA"�R��SA"�T��UA"�V��WA"�X��YA"�Z��[A"�\��]A"�^��_A"�`��aA"�b��cA"�d��eA"�f��gA"�h��iA"�j��kA"�l��mA"�n��oA"�p��qA"�r��sA"�t��uA"�v��wA"�x��yA"�z��{A"�|��}A"�~��A"�@��AA"�B��CA"�D��EA"�F��GA"�H��IA"�J��KA"�L��MA"�N��OA"�P��QA"�R��SA"�T��UA"�V��WA"�X��YA"�Z��[A"�\��]A"�^��_A"�`��aA"�b��cA"�d��eA"�f��gA"�h��iA"�j��kA"�l��mA"�n��oA"�p��qA"�r��sA"�t��uA"�v��wA"�x��yA"�z��{A"�|��}A"�~��A"�@��AA"�B��CA"�D��EA"�F��GA"�H��IA"�J��KA"�L��MA"�N��OA"�P��QA"�R��SA"�T��UA"�V��WA"�X��YA"�Z��[A"�\��]A"�^��_A"�`��aA"�b��cA"�d��eA"�f��gA"�h��iA"�j��kA"�l��mA"�n��oA"�p��qA"�r��sA"�t��uA"�v��wA"�x��yA"�z��{A"�|��}A"�~��A"�@��AA"�B��CA"�D��EA"�F��GA"�H��IA"�J��KA"�L��MA"�N��OA"�P��QA"�R��SA"�T��UA"�V��WA"�X��YA"�Z��[A"�\��]A"�^��_A"�`��aA"�b��cA"�d��eA"�f��gA"�h��iA"�j��kA"�l��mA"�n��oA"�p��qA"�r��sA"�t��uA"�v��wA"�x��yA"�z��{A"�|��}A"�~��A"�@��AA"��F0��
�4�#�#��N��rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/gb2312freq.cpython-312.pyc000064400000045346151732703300023455 0ustar00�

R`i�P���dZdZdZy)g�������?i�(�i�i�i�i<	iTi�i	iQi�i�
i�
i�i�i<iwi�i9	��i�	i�i�i�iZi�i�iqi�i�i�
iW
iyii�ieioi�iv
i�i�i�i�i�iiiLiBiiQ
�i�i�iQi�i�iEiifi�ii�ii�i�i�idi(iyii�i,i	i�i
iEie�i�
iWiRi�i�i|	iR
i�i�
i�i
iX
i�
ijiEi�ii+iPi�i�ii�i�;i�imi�ili�i�i�i��iieiHi�i�i�i�i^iki6i�i"�Fi�i�
i�
i�
i^	i�i�
i�i���i?i`iui$i1i�
i�i�i iUi�i1i�i�igili�ii		i�iGi�i2i�iq	i�i iPi�iL	i�i�i�iiy	i�i�
i�iMi�iki�i4	i�ii�i�i�i
i�	i@	i`i�i5��i�iN
i�i7i3i�iniiuiGi&ibihi0i�iMiNii�	i
iY	i�
i�i�	�
i��i�
�&i�
iQi
i7i^ihi�i�iJi�iPi�i�i�iri�i�i�ii�i�iT	i-iGi,iuii�	i�i$ii�i<iBii$i>ii�ixiLiWii�ini
i�iTi�iZi�i�
i�	i{ii�i�	i��ii�
i?i�
�0ibi;�Di�i��i�iCiSi�iUi>	i|igi�i�i�	i�
iK��i

i�i�i�i%
i5
i�i�ii�ili�ihi
ii�i?�i� iUi���i�i�	i�i*i<
i�i�
i�i
�i
i�i�i�
i�i�
i!	iX
i�i�i�	i�iQigi�i�i�i�	i�iri�
i�i�iqi�i�
i�iz
i�i�	i3�i�i�i�i
i�
i]iciziii7i�i_ii�iCi�i&iaiHi|
ili
i�i=i�i�iIiPi�
i�i~
i8i`i�iw	i�i�
iTi�i�
i�i�i�i�i�
i�ii�i���i[iq�ii�	igi��|iCi	i�i�iNiIi�i�i5i�
i(i�i/iHiK
i
i��ii�i9i�iIi�i�i|i��i�i�
i��iWii�i�i�i^�~iii�i�	i�i=iXi�i3i�
iIi�ii�
�i�i�i�i3ir�i���ioii�i�i{iiiiC���!iHi�	��i�i��f�i=
ii1�[i�i|iDii%i�iti�i�i�
i�i i�i.i��i�yiiTi�i�i9
i�
ii#�i�iJi��ni�ii�i
i�i>iBi"i�i�iai�i�iMiK��iiWi�i�	i�	i!
ir	iFi+	i�
i
ii�ix
�HiJi���i�i�i2�Ki�iR
i$ii9i�
it
i�i�
i�i�i��i�ii�i�ii�i�i%i~i�
i`	�i�i�i�i'iviii�i�i|i�'ii�in
i*i�i�i�iFi�i%i��)i~i�i
i�i�iJi&i�i
i!iDi�iwii[iii�	i�i	i'	i�	i��kii�i	i�
i�
��i��i�ii�i�ih
�Bi_i�i?iigihi�i'i�i�i�i�i�ii�i�i�ii�i��5i]i�ii�i�ii���i�i�i1	i�i)ia	ii�i�i�i;	ii�i_i�i��Qi/iu
i�
i�
iji[i�i}i�i
i�i�i�	ii�i�iQi^
i�iGi�izi�i�i�iViOi�ii�i�i�i�imiui�	i6i�i�i-i$i�i�iRi�i}	i
ipiri]
i�
iDiii�i�i�iiiii�i�ii1ini�i�iitiYiG	i�i�i/i|�ti0i�
i�i�ii�i\i�
i�i�ivi�i�i�ici�ii�i�
i~iAi"i�i"	i!i8�Ci8	ii�	iji�
i1i�ili>i�
ii]
i�i�
i~�iLi(i�i�iKid��viDi�i�i�i%i�	i�i�i�	i,�i2i�i�
i�i�ij�-i.i�imiKii���ioi	i;i	i�i�idi@iai	iM	i1
iLi@i2i�iwi�itiQi
i/i�i i�i~i�i�i�i�i�
i/i�i�
i_	i#i��Oi�iOiG�i�iki[iOioi���i-
i
�ii�	i!i�i�iIi�i�i�i{iri�i.ihi�
iiT
ii�i'iL
�ai�i�
i@�i�i�i�i�i�
iTi/
i�ii�i�ii�iMi�ii
ili�ii�
i{i8i#i�
i�i�i9i�iSiRi�	�wi�iZi�i0
iEigigi�i��
i��Li�i�ipi�i�iSi
i�i�i�i�i�	i@i�iI	iLi;
iOiqi�i�i)	ii:iFi�i5iJidiA
i�i
i)
iEiL�Yi�i�i�i�
im	i�i�i�i�i�i�ici�iRi�i!i�i�i�i�
��i(i�i�i]�Ii�i�
i�	i�iei�ii�i��i�i�i`i�ii�i�i
i�i[i�iC
i(iPi,i�i}iO	i'iLi\
i�
i�ii�i�iiZi�i�isi'i�	iUi�i�i�i�iN
�i�i�i�
i�i�iMi�i�i�i�i�i���i�iii�igi'i�i�i	i�i
��Pi0is	iii�ip	i�	inii�i�ii\i�
i�i�i�
i!ih���imi(i&i
iCiiBi)i5	i�i��ii�i�i
i�i��>i�i���ii�	��i{iNi�iiiEi3��Ji#i�ici�i�
ii$
��i5i�ixii]i�i�ik��i�i�i�i�iP
i�i
iiiri�iLi�izidi�i�i#i�
ii�i[iSiihiiGi�i�ii�i�
iU�+i�	iy�iwi"i�iVi2
i&izi�	i�	i�iJ
iP	i�	i�i���i�i%	iZi$ioiTiKi1i�
i�i`iVi�ii�id�i�i�i�i+i�i�iAi�i�i�i�i�i$i�i�	i_i3i\i�i�����i�ibi�if�i�i�i�i�
iAinii��x�iFi�
iOi[i�i��(i�ii
i#i7i2	ixiif	i�	i�
i!i6i{
��i�iYi��i�i+i�i�i�i�i i�i�i�i�	i	iKiei�i�i�
iTi$i�i�iihii	iRi�i�i"i�i��Zi 
i_i�i@i�iaii�ii3
i�
iki)iji�iiiei�i
iAi^i�i
iW	i�i�ihi:
iz
i)
i�i|i�i�ii�ii8ij��i�
ii�i3i�	i
izi�ipiyi�i�i2ioiD	i=i��.i�i9iaifi�i*i_i�i	i*i�ii�
i�
i�i�i-ii�
i}i�i�
i�i�i*	i�
it�iti6
�qi�i�i�i�i�i�i�iSi 	i�i�i!i)iiyi�
��iiij	i�i�	i�iViIi�i�ig
iiiLi�i�i�ipiDi�i�i�i�i%i�i�iMi�i�i�i$i�i�i�iE	i"iU	i�ie
i	i|i�	iQii�i�i�ii�i�
i1
i�i�i�i��$i i]i4i&i�i�izi�i�i`i�iwi�
iiii�
i)i%
i&i�i�i�i*i�i�i8i2i>
iSi
i�i�i1i#i�i�i
i�i#i	i�
i�i�ii�iF
iii,	i>i+i
ii�iZ�3iq�i�
i$i�i�
iVi�	i;i�i�iNi��miKiWi�i��i5i�
i�	�Ri4i�iIiiDi�i�i�i�
i�i�
i�i�i�ii%iKi|ii�i�
i��i��i9i�in	i�i�i�
i-i3i2
ipi�i?
i�i~i�i�i�i�i�iCi�i[i�i�
i�i�i�i3	i>i�ili
i`ix	i�i�i�i�i#
i�i�i�i0��i�i�i�	iL
i�i�iQi�iRi�i?i(imi�i`
i�i3ii�ii&
i�
iiisiDi�i0	ib	ifi@i�	i�i�i�
ii=i�i
i<��i�i�i�
i�i6ii�isi�i�i�iSi�i�i�
i8iZ
i�i�i�i�i�i�i�ii�
i�i�
i�ii�iNi�	i�i
iLi�
iJ	i�i�i�	ibiigii�i[
i�i�ii�ii~i�i�	i�	i�i�ifi�i�iii�
ii`i4i=	i�i�i�ili?	i�ici�ii�iiii�i�i�i�i�i�i�i�iwi�i�i�i%ii�id	i^i+i�i�i�iZ�iFiI
i�it�i�	�/i�	ii�iyi*
isi&i+ii�i)ii�i�	i�i�ii�
i�ie	i�i�iQi]	ii	i_i7	ii0�ciui�i�iLiki
i�i�i�i��#ii�ii�i��i�i?i��ii�
ini
i�i�i�i	i�i�i�	iHi�iYi�iu	i�i�
i�	i�iJi�i_i_i&i�i�ii�i�i�iZi%�i�	isi�iSiiiiVi�i�i�i�i�i1i'��i�iFi\i
i|i�	iWi�i�i|�iS�Wi�	i*i	iRiliPi#i�ii-iq
i�i��	i�i�i4i�i�i�i�i�iai�i�ii�i@
i�iXiii%i�i�i8
i3i,i�i}i�i�i��dixi�	i�i#	i�i6i�
i�
i.ii�iAi�
i�ir
i�
i�iRidi�ii+
i�i�i�i�
i{i{iHi�	i
i�i�i�i�i�ici	i
i�i�i�i,i�iI
i�icii�i�i�i�i=i�iJi.i,i>iii�iLiei]i�i�
iCi�i�i�i*i;i
i�i i�ipi�
i�i�iRi�i9i�
i�
ii�
i�i�i?i:i�	i�i�iQi'isi�iwi[i�
i�i-i�
i)i�i��Mi�i�i�i�i]�}i6i@i
iiUi�i�i�i/i�i�is
i�	i�i�ik	i?i�i,
i=
i1iMi�i�i�i/iS
id��i�io
i6	ikiui�i�i�iW�{iixiWi�i�ii�i�ixi^i��i[	i+�7i:i�iUi�i�i!i�i�i�
i.iHiTi�iYi�i�i	ii@i"iCisi	i�	iiG
�bi�i7i~i.
iUiiqi�	i�i�i�i{i�i��iYi/i�
i�i�iAi�
i�i*i:i8i'i�i�i�i�iiAi_i0i�i�i�iiii�iKi�
i�i�iti*i�i�i�
i�i�i�i�i�	i�
��i�iDii�ii>i�i�ivii

i�
i'i��Vi�i�i�
i�i�ikiii\i�i�i�i!ii��*iU
i�i�i�i�iizi�i\if
i�i�i�	i
i���i�i�i�i�i�i�i�iiB	iii�i�i�i{�i=i�
��i&i�
i�iVi�	i��"i!i�
i�	i�i�i�
i(	i=i�i�
i�
i�i9ii�i4ia��i�i-iQ	�i�
i�i�
imi�i�i�i�iCi�i�i7i}iqiDi4i��uii�	i�i�ivii�iF	i�iuia
i�iHioi�
i
	iliKiA	i�i�i�	izi4i�	i!
iH
i�i�	��i5iiji�i`i�i�
iBi:iOiai�i#i��i�id�i�i(i�
i&
i�i^imig
iE
iio	i�i(iGi$i@i
iIii�iAii�`�Xii7i�i/i�i$i�i�i�ihi�i�i�i�	iUi"iT�i�i�i�im�i�i!ii�i�ii�i i�iMi�	i��i�i�	�2iqi�i��9i�i�i��i�ii�i/i�i���i�pi@iX	i�ij�ii
i^
ibi�
i�iniiv�i�i�ioio�iivi�i�i0i�i9i�i$	i�ifiSizi
iiDi{i�iX�ii�iVi3iYi
i�i�
iAi�i��i�i�iqiUi�
i:	ii2iji�iii{	i�i�	iFi�i�
i�	ii	i��i�iciiiR	i;ik�hi�ii�
i�iYiOixi��ziZi<iv	ii�
i
i�
i�iIi�i�i4
iMi�i�i�i�ibi�ii�ii�i�i�iCi�i�
i�i�iOi�i8i�i�i�	i.i]iiVic
i�	i�i�i
iH	i�iTi�i�i�	i�i>
i
i�i�i3i�i��,i�i�ifi�i�iiliTiWiHi.i'i>ipi�i�i�i"i�i�	iJi�i�
i�
ivi2i�i�i	ixi	i2i�igi i4i�i�i�
i�
i�i�i{
iz	i�i�	i�
i�i�i�	i�i�ii�i�i?ii��i�	iJi�i�i�i�
i�	i8��iEij
�\i�i8i8
ii i�ii`i�i>ibiSii��i�i�ii�i0i�i�i�iEi�i�idi�i�i�i1�i�i�in�@i�i�i�iTii�	��i�iQ��iCi�i�iKi;iki�i�i�i�i�i_i\	ieiiwi�i�ii�iMi�i.	iriaii�i�
i�i�i�
i�i�i�igi�i�i'i�
i�iii�	�Tii�i4ioi�i�	iXiyi�ixii�	i�
i
iU
�^i:i�i�i�i�ii"i#i�i�iii�	i�i�i�iNiUi�i�ip�i"
i-i�i�	�i�i:i�i
ii�	i�i�i�i�	i��iWi
iG
iLi�i�
iGiw�oi�i�iiMir�i�ii�iQ
i�iIiN�%i
iXiii�i7
i�
iai�i�i�i�	i'
iiihi�i}iNiyi?iti�i�iDi�i�i��i��li�i�i�i	i��ieiJisi2i*iyi�i�i�i�i�ii�iqi�i�i5i}isi$i�i�i�i5
iBi�i��i#idisi}i�i~i�iib
i�iO
i/	�]i�i�i�	i]i2��iifi7i�i�iOi

iRii#
i	i[i��Ei�iif
iS
i�	idiFi�i��iC	iV
i>i�i	i�iBi�ii	i1i6im��ii	i��i�i�ip
i�ii�
i�i<izi�
i|
iX�i�i�isiei]ii��i
i�
iiOi�i+i�	iii�i�i�i:i�	iAi�ii�i�i�i(
i�
imi�4iP�i	ini�i�
ioioi�i�imiiy�ii8i	��i<i�i�i<ic	iCi�i�i&iwi
i�	i$i 
i9i&i�i�i)i`i�i�ii�i�iGibiEi�i:iQioiFi�
i�i�i�	i�
iFi|i;i�
i�ii3i4i%i��:i�	ici�ipi6
i\iCi�i0i9
i�i�i�i�i�i~	i�ii"ihi�i�i�i�	i)ii�	i�
i�i�i*
i�ii
i
i%i�i	i�i�ii�
i.i�i�i9i	i�i�i�
i�i�i	i�i"i!i�i,
i�ig	iJigiF
i�ii�i�
i�i;ii	iZiEi^iA
i�iili5i�i�i�i4i'
i�iiki	i�i�	i2i�i�
i�i	iXi7�i�i�
i{i�iBixi=�ei(i�i�i�i'i�i��i�i�ii�iiii�iD
iiikii�i�i�i-i,i�
iei7
i��i�i��i�i�ini}
ipi7iji�i�	i�i9i�i�
��i�i���i0iPi���i�i�ii�iO
i�
i�i�	��iUi
ii�i<
i�i�i�
iJi�itiNi�i)ii.i��i*iiA��ir
i]i)i�ii�i�iGi�i_
ipik
i�i�i
	i%i
i�i�
i�i>ibi_i^�?ii:iYiDi%�i�i�
i�ii�i��iYi�i�
i�i�ii�i�il
�Ai�i�	i�
i�	iDiBi�	i
i�i	i@
i(iv
i�i�i��gi�
i�	i}ivi�i�i�i�
i�ii�i�ii�i�ii�ii�i�i i-i~i�iyi%i�	i�
�_i�i�ii�i�i�jiMi�i�iGi+i�	ii���i�	i�i�ii3
i;i
�Gi)i�i
i�i�ii�i�ii�i
i
i�i,iIi�	i�i�iiXiAi\i��i�iPivi�i�	iVii=i�
i�
i6i<i�iXii�
i	ii8i-	iY
i�i�i�i�i�i��ici�i�i�i9i�	i-
iui�i	i�i�
iRi�
iii6i�i�	i�ih	i}ii?
iw
ii�i�	iai(i�i�1i�i�
i�i>i�i�i�i�i�i]i�
iXiriPi0i,ii+iji�i`i�i�i�ii.iii
i�i&	iWiB
i�ii|i7�Ui�i�	�iWi�iYi�i�
i�iw
i�
ii�ii�ii�i�iui�ibi�iq
i�i�ibi�i�i���=i$
i�iNiJi�i�iUi�ii�i�	ii��iiKi,i�i�i4iri{i�iiHi�ipi5ii�i=i�	i�iEi9i�i;i�<ii5i�
iiii�i\ii��ipi�ii�i��ri��Ni�ii^i�i�i�i�iKii�i*ii{i+
i�	i�i*i8ii�ii	ii�i�i�ij
ii@il	�6i�i2i8i�i�	i�ii�i'i�i�i�iB
i�iii\i�i�iSiV	ii~i�i�i�i�i�i�
i�iVi�
izi�i^i	i�i�i�i_
i}
iGiq�iIi�i�i��8itihiS	i�i}iRi�	i9��Sin
iPi�iBiii��si�iXi}ifi�i�ii�i�i�i�i���i�iniIi^�iTi�ixi�iri�i�i_�ibi�iOiPiQiRiSN)�!GB2312_TYPICAL_DISTRIBUTION_RATIO�GB2312_TABLE_SIZE�GB2312_CHAR_TO_FREQ_ORDER����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/gb2312freq.py�<module>r	s��T%(�!���l�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/mbcsgroupprober.cpython-312.pyc000064400000003144151732703300025100 0ustar00�

R`iS���ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZdd
lmZddlmZGd�d
e�Zy)�)�
Big5Prober)�CharSetGroupProber)�CP949Prober)�LanguageFilter)�EUCJPProber)�EUCKRProber)�EUCTWProber)�GB2312Prober)�JOHABProber)�
SJISProber)�
UTF8Proberc�@��eZdZejfdeddf�fd�
Z�xZS)�MBCSGroupProber�lang_filter�returnNc
���t�|�|��t�t�t	�t�t
�t�t�t�t�g	|_|j�y)N)r)
�super�__init__r
rrr
rrrr	r�probers�reset)�selfr�	__class__s  ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/mbcsgroupprober.pyrzMBCSGroupProber.__init__,sT���
���[��1��L��L��M��N��M��M��L��M��M�

���	
�
�
��)�__name__�
__module__�__qualname__r�NONEr�
__classcell__)rs@rrr+s$���5C�5H�5H�
�N�
�T�
�
rrN)�
big5proberr�charsetgroupproberr�cp949proberr�enumsr�eucjpproberr�euckrproberr�euctwproberr	�gb2312proberr
�johabproberr�
sjisproberr�
utf8proberr
r�rr�<module>r,s5��<#�2�$�!�$�$�$�&�$�"�"��(�rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/codingstatemachine.cpython-312.pyc000064400000007526151732703300025526 0ustar00�

R`i���8�ddlZddlmZddlmZGd�d�Zy)�N�)�CodingStateMachineDict)�MachineStatec�f�eZdZdZdeddfd�Zdd�Zdedefd�Zdefd	�Z	de
fd
�Zede
fd��Z
y)
�CodingStateMachinea�
    A state machine to verify a byte sequence for a particular encoding. For
    each byte the detector receives, it will feed that byte to every active
    state machine available, one byte at a time. The state machine changes its
    state based on its previous state and the byte it receives. There are 3
    states in a state machine that are of interest to an auto-detector:

    START state: This is the state to start with, or a legal byte sequence
                 (i.e. a valid code point) for character has been identified.

    ME state:  This indicates that the state machine identified a byte sequence
               that is specific to the charset it is designed for and that
               there is no other possible encoding which can contain this byte
               sequence. This will to lead to an immediate positive answer for
               the detector.

    ERROR state: This indicates the state machine identified an illegal byte
                 sequence for that encoding. This will lead to an immediate
                 negative answer for this encoding. Detector will exclude this
                 encoding from consideration from here on.
    �sm�returnNc���||_d|_d|_tj|_d|_tjt�|_
|j�y)NrT)�_model�_curr_byte_pos�_curr_char_lenr�START�_curr_state�active�logging�	getLogger�__name__�logger�reset)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/codingstatemachine.py�__init__zCodingStateMachine.__init__9sI�����������'�-�-�������'�'��1����
�
��c�.�tj|_y�N)rrr�rs rrzCodingStateMachine.resetBs��'�-�-��r�cc�J�|jd|}|jtjk(rd|_|jd||_|j|jdz|z}|jd||_|xjdz
c_|jS)N�class_tabler�char_len_table�class_factor�state_tabler)rrrrrr
)rr�
byte_class�
curr_states    r�
next_statezCodingStateMachine.next_stateEs����[�[��/��2�
����|�1�1�1�"#�D��"&�+�+�.>�"?�
�"K�D���%�%����N�(C�C�j�P�
��;�;�}�5�j�A������q� �����rc��|jSr)r
rs r�get_current_charlenz&CodingStateMachine.get_current_charlenRs���"�"�"rc� �|jdS)N�name�rrs r�get_coding_state_machinez+CodingStateMachine.get_coding_state_machineUs���{�{�6�"�"rc� �|jdS)N�languager*rs rr-zCodingStateMachine.languageXs���{�{�:�&�&r)r	N)r�
__module__�__qualname__�__doc__rrr�intr%r'�strr+�propertyr-�rrrr"sf���,�1��d��.� �C� �C� �#�S�#�#�#�#��'�#�'��'rr)r�codingstatemachinedictr�enumsrrr4rr�<module>r7s��8�:��8'�8'rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/escsm.cpython-312.pyc000064400000035776151732703300023017 0ustar00�

R`i�/����UddlmZddlmZdZgej
�ej�d�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej
�ej
�d�ej�d�ej�d�ej�d�d�d�ej�d�ej�d�d�d�ej�d�ej�d�ej�ej
�ej
�ej
�ej
�ej
�ej
��ZdZ	edee	d	d
d�Z
eed<d
Zgej
�d�ej�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�d�ej�ej�ej�ej�ej�ej�ej�ej�ej�d�d�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej
��Z
dZede
edd
d�Zeed<dZgej
�d�ej�ej
�ej
�ej
�ej
�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�d�ej�ej�ej�d�ej�ej�ej�ej�ej�d�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej
�ej
��ZdZedeeddd�Zeed<dZgej
�d�ej�ej
�ej
�ej
�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�ej�d�ej�ej�ej�ej�ej�ej�d�ej�ej�ej�ej�ej�ej�ej�ej
�ej
�ej
�ej
��ZdZedeeddd�Zeed<y)�)�CodingStateMachineDict)�MachineState(r�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�r��rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�rr�)rrrrrrz
HZ-GB-2312�Chinese)�class_table�class_factor�state_table�char_len_table�name�language�HZ_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)	rrrrrrrrr�	zISO-2022-CN�ISO2022CN_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr�rrrr	rrrrrrrrrrrrrrrrrrrrrrrr
rrr�rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)
rrrrrrrrrr�
zISO-2022-JP�Japanese�ISO2022JP_SM_MODEL(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrzISO-2022-KR�Korean�ISO2022KR_SM_MODELN)�codingstatemachinedictr�enumsr�HZ_CLS�START�ERROR�ITS_ME�HZ_ST�HZ_CHAR_LEN_TABLEr�__annotations__�
ISO2022CN_CLS�ISO2022CN_ST�ISO2022CN_CHAR_LEN_TABLEr�
ISO2022JP_CLS�ISO2022JP_ST�ISO2022JP_CHAR_LEN_TABLEr�
ISO2022KR_CLS�ISO2022KR_ST�ISO2022KR_CHAR_LEN_TABLEr����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/escsm.py�<module>r1sH��8;��!
��F	����	� �&�&�	�-.�	�0<�0B�0B�	�DP�DV�DV�	�Xd�Xj�Xj�	�lx�l~�l~�	�AM�AS�AS�	����	� �&�&�	�(4�(:�(:�	�<H�<N�<N�	�P\�Pc�Pc�	�eq�ex�ex�	�{G�{N�{N�	�P\�Pc�Pc�	�
���	�"�(�(�	�+7�*<�*<�	�?K�>P�>P�	�S_�Rd�Rd�	�gs�fx�fx�	�@A�	�CO�CU�CU�	��		�	���		�"#�		�%1�$6�$6�		�>?�		�FG�		�NO�		�Q]�Pb�Pb�		�
�	�
	���	�
"#�	�
*+�	�
23�	�
5A�4F�4F�	�
NO�	�
Q]�Pb�Pb�	��
	�	���
	�*�/�/�
	�2>�1C�1C�
	�FR�EW�EW�
	�Zf�Yk�Yk�
	�nz�m�m�
	�BN�BT�BT�
	��'�����'���
'��
#��!�
�F	����	��	� ,� 2� 2�	�4@�4F�4F�	�HT�HZ�HZ�	�\h�\n�\n�	�p|�qC�qC�	�EQ�EW�EW�	����	�$�*�*�	�,8�,>�,>�	�@L�@R�@R�	�T`�Tf�Tf�	�ht�hz�hz�	�}I�}O�}O�	�Q]�Qc�Qc�	����	�%�*�*�	�-9�,?�,?�	�BN�AT�AT�	�Wc�Vi�Vi�	�lx�k~�k~�	�AM�AT�AT�	�Vb�Vi�Vi�	����		�&�,�,�		�/;�.A�.A�		�DP�CU�CU�		�Xd�Wi�Wi�		�lx�k}�k}�		�EF�		�HT�HZ�HZ�		�
���	�
%�*�*�	�
-9�,>�,>�	�
AM�@S�@S�	�
Vb�Ug�Ug�	�
jv�i{�i{�	�
~J�~P�~P�	�
R^�Rd�Rd�	�	
�
	��
	� �%�%�
	�(4�'9�'9�
	�<H�;M�;M�
	�P\�Oa�Oa�
	�dp�cu�cu�
	�xD�xJ�xJ�
	����	�%�*�*�	�-9�,>�,>�	�AM�@S�@S�	�Vb�Ug�Ug�	�jv�i{�i{�	�~J�~P�~P�	�R^�Rd�Rd�	����	�%�*�*�	�-9�,>�,>�	�AM�@R�@R�	�Ua�Tf�Tf�	�iu�h{�h{�	�~J�~P�~P�	�R^�Rd�Rd�	��7��!���.���
.��*��!�
�F
����
��
� ,� 2� 2�
�4@�4F�4F�
�HT�HZ�HZ�
�\h�\n�\n�
�p|�qC�qC�
�EQ�EW�EW�
����
�$�*�*�
�,8�,>�,>�
�@L�@R�@R�
�T`�Tf�Tf�
�ht�hz�hz�
�}I�}O�}O�
�Q]�Qc�Qc�
����
�%�*�*�
�-9�,>�,>�
�AM�@R�@R�
�Ua�Tg�Tg�
�jv�i|�i|�
�K�R�R�
�T`�Tg�Tg�
����	
�&�,�,�	
�/;�.A�.A�	
�DP�CV�CV�	
�Ye�Xk�Xk�	
�nz�nA�nA�	
�CO�CU�CU�	
�Wc�Wi�Wi�	
�
���
�
�
�
!-� 2� 2�
�
5A�4F�4F�
�
IU�HZ�HZ�
�
bc�
�
eq�dv�dv�
�
yE�yK�yK�
����
�%�*�*�
�-9�,>�,>�
�FG�
�IU�H[�H[�
�^j�]o�]o�
�r~�rE�rE�
�GS�GY�GY�
����
�%�*�*�
�-9�,>�,>�
�AM�@R�@R�
�Ua�Tf�Tf�
�iu�hz�hz�
�}I�}P�}P�
�R^�Re�Re�
����
�%�*�*�
�-9�,>�,>�
�AM�@S�@S�
�Vb�Ug�Ug�
�jv�i{�i{�
�~J�~P�~P�
�R^�Rd�Rd�
����
�%�*�*�
�-9�,>�,>�
�AM�@R�@R�
�Ua�Tg�Tg�
�jv�i{�i{�
�~J�~P�~P�
�R^�Rd�Rd�
��:��!���.���
.��*��!�
�F������� ,� 2� 2��4@�4F�4F��HT�HZ�HZ��\h�\n�\n��p|�qC�qC��EQ�EW�EW������$�*�*��,8�,>�,>��@L�@R�@R��T`�Tg�Tg��iu�i|�i|��K�R�R��T`�Tg�Tg������&�,�,��/;�.@�.@��CO�BT�BT��Wc�Vh�Vh��pq��s�sE�sE��GS�GY�GY�����	�%�*�*�	�-9�,>�,>�	�AM�@R�@R�	�Z[�	�]i�\n�\n�	�q}�qC�qC�	�EQ�EW�EW�	�
����
%�*�*��
-9�,>�,>��
AM�@S�@S��
Vb�Ug�Ug��
jv�i{�i{��
~J�~P�~P��
R^�Rd�Rd���.��!���.���
.��*�r/python3.12/site-packages/pip/_vendor/chardet/__pycache__/johabprober.cpython-312.pyc000064400000002642151732703300024164 0ustar00�

R`i���J�ddlmZddlmZddlmZddlmZGd�de�Zy)�)�JOHABDistributionAnalysis)�CodingStateMachine)�MultiByteCharSetProber)�JOHAB_SM_MODELc�L��eZdZd�fd�Zedefd��Zedefd��Z�xZS)�JOHABProber�returnc���t�|��tt�|_t�|_|j�y)N)�super�__init__rr�	coding_smr�distribution_analyzer�reset)�self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/johabprober.pyrzJOHABProber.__init__#s.���
����+�N�;���%>�%@��"��
�
��c��y)N�Johab��rs r�charset_namezJOHABProber.charset_name)s��rc��y)N�Koreanrrs r�languagezJOHABProber.language-s��r)r	N)	�__name__�
__module__�__qualname__r�property�strrr�
__classcell__)rs@rrr"s>������c������#���rrN)	�chardistributionr�codingstatemachiner�mbcharsetproberr�mbcssmrrrrr�<module>r&s ��88�2�3�"�
�(�
rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/latin1prober.cpython-312.pyc000064400000015605151732703300024274 0ustar00�

R`i��t�ddlmZmZddlmZddlmZdZdZdZ	dZ
dZdZdZ
d	Zd
ZdZge	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e
�e	�e	�e	�e	�e	�e	�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e	�e	�e	�e	�e	�e	�e�e	�e�e	�e	�e	�e	�e	�e	�e
�e	�e
�e�e
�e�e�e	�e	�e	�e	�e	�e	�e	�e	�e	�e�e	�e�e�e�e
�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e	�e�e�e�e�e�e�e
�e
�e�e�e�e�e�e�e�e�e
�e
�e�e�e�e�e�e	�e�e�e�e�e�e
�e
�e
�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e�e	�e�e�e�e�e�e�e�e��ZdZGd
�de�Zy)�)�List�Union�)�
CharSetProber)�ProbingState�������)@rrrrrrrrrr
r
r
r
r
r
r
rr
r
r
r
r
r
r
rr
r
r
rrr
r
rr
r
r
rr	rr	rr
r
r
r
r
r
r
rr
rr
rrrr
rr
rr
rrr
r
c�~��eZdZd	�fd�Zd	�fd�Zedefd��Zedefd��Zde	e
efdefd�Z
defd�Z�xZS)
�Latin1Prober�returnc�f��t�|��t|_g|_|j�y)N)�super�__init__�OTH�_last_char_class�
_freq_counter�reset��self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/latin1prober.pyrzLatin1Prober.__init__es'���
���� #���(*����
�
��c�V��t|_dgtz|_t�|��y)Nr)rr�FREQ_CAT_NUMrrrrs �rrzLatin1Prober.resetks#��� #����S�<�/���
��
�rc��y)Nz
ISO-8859-1��rs r�charset_namezLatin1Prober.charset_nameps��rc��y)N�r!r"s r�languagezLatin1Prober.languagets��r�byte_strc� �|j|�}|D]m}t|}t|jtz|z}|dk(r"t
j|_|jS|j|xxdz
cc<||_�o|jS)Nrr)
�remove_xml_tags�Latin1_CharToClass�Latin1ClassModelr�	CLASS_NUMr�NOT_ME�_stater�state)rr'�c�
char_class�freqs     r�feedzLatin1Prober.feedxs����'�'��1���A�+�A�.�J�#�T�%:�%:�Y�%F�*�$T�U�D��q�y�*�1�1�����z�z��
���t�$��)�$�$.�D�!���z�z�rc���|jtjk(ryt|j�}|dkrdn$|jd|jddzz
|z}t|d�}|dz}|S)Ng{�G�z�?gr
rg4@g\��(\�?)r/rr-�sumr�max)r�total�
confidences   r�get_confidencezLatin1Prober.get_confidence�s����:�:��,�,�,���D�&�&�'���t�|�
��$�$�Q�'�$�*<�*<�Q�*?�$�*F�F�%�O�	�
��S�)�
�	�d��
��r)rN)�__name__�
__module__�__qualname__rr�property�strr#r&r�bytes�	bytearrayrr3�floatr9�
__classcell__)rs@rrrdsl�����
��c������#�����U�5�)�#3�4������rrN)�typingrr�
charsetproberr�enumsrr�UDFr�ASC�ASS�ACV�ACO�ASV�ASOr,r*r+rr!rr�<module>rMsO
��:�(��������������������
�	�!��!�	�!��!��!��!� �!�"%�!�'*�!��!�	�!��!��!��!� �!�"%�!�'*�!��!�

�!��!��!��!�!�!�#&�!�(+�!��	!�

�	!��	!��	!��	!�!�	!�#&�	!�(+�	!�
�!�


�!�
�!�
�!�
�!�
!�!�
#&�!�
(+�!��
!�

�
!��
!��
!��
!�!�
!�#&�
!�(+�
!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!��!�

�!��!��!��!�!�!�#&�!�(+�!� �!!� 

�!!� �!!� �!!� �!!� !�!!� #&�!!� (+�!!�"�#!�"

�#!�"�#!�"�#!�"�#!�"!�#!�"#&�#!�"(+�#!�$�%!�$

�%!�$�%!�$�%!�$�%!�$!�%!�$#&�%!�$(+�%!�&�'!�&

�'!�&�'!�&�'!�&�'!�&!�'!�&#&�'!�&(+�'!�(�)!�(

�)!�(�)!�(�)!�(�)!�(!�)!�(#&�)!�((+�)!�*�+!�*

�+!�*�+!�*�+!�*�+!�*!�+!�*#&�+!�*(+�+!�,�-!�,

�-!�,�-!�,�-!�,�-!�,!�-!�,#&�-!�,(+�-!�.�/!�.

�/!�.�/!�.�/!�.�/!�.!�/!�.#&�/!�.(+�/!�0�1!�0

�1!�0�1!�0�1!�0�1!�0!�1!�0#&�1!�0(+�1!�2�3!�2

�3!�2�3!�2�3!�2�3!�2!�3!�2#&�3!�2(+�3!�4�5!�4

�5!�4�5!�4�5!�4�5!�4!�5!�4#&�5!�4(+�5!�6�7!�6

�7!�6�7!�6�7!�6�7!�6!�7!�6#&�7!�6(+�7!�8�9!�8

�9!�8�9!�8�9!�8�9!�8!�9!�8#&�9!�8(+�9!�:�;!�:

�;!�:�;!�:�;!�:�;!�:!�;!�:#&�;!�:(+�;!�<�=!�<

�=!�<�=!�<�=!�<�=!�<!�=!�<#&�=!�<(+�=!�>�?!�>

�?!�>�?!�>�?!�>�?!�>!�?!�>#&�?!�>(+�?!�@�A!�@

�A!�@�A!�@�A!�@�A!�@!�A!�@#&�A!�@(+�A!��N
��/�=�/rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/langrussianmodel.cpython-312.pyc000064400000315523151732703310025244 0ustar00�

R`i#���|�ddlmZididd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d#�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d#�d3d�d4d��dddddddd#ddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd�d(d#�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d#�d3d�d4d��ddddddddddddd5���d	idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d
idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d#�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d��dddddddd#ddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d#��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d#�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d#�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���ididd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d#�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d��dddddddd#ddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d#�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d#�d4d��ddddddddddddd5���d!idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d"idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5���d#idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d#�d%d#��id&d#�d'd#�dd#�d(d#�d)d#�d*d#�d+d#�d,d#�d-d#�d.d#�d/d#�dd�d0d#�d1d#�d2d#�d3d#�d4d#��dd#d#d#d#d#ddddd#d#d5���d$idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d�d-d#�d.d�d/d#�dd#�d0d�d1d#�d2d#�d3d�d4d#��dddddd#dd#dddd#d5���d%idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd#�dd#�d(d�d)d#�d*d#�d+d�d,d#�d-d#�d.d�d/d#�dd#�d0d#�d1d#�d2d#�d3d#�d4d#��ddddd#ddd#d#ddd#d5����id&idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd#�dd#�d(d�d)d�d*d#�d+d�d,d�d-d#�d.d�d/d#�dd#�d0d�d1d#�d2d�d3d�d4d#��ddddddddddddd5���d'idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d#��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d#�d-d#�d.d�d/d#�dd#�d0d�d1d#�d2d#�d3d#�d4d#��ddd#ddddd#d#ddd#d5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d#�d%d#��id&d#�d'd#�dd#�d(d#�d)d#�d*d�d+d#�d,d#�d-d#�d.d#�d/d#�dd#�d0d#�d1d#�d2d#�d3d#�d4d��dd#d#d#d#d#dddddd#d5���d(idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd#�dd#�d(d�d)d�d*d#�d+d�d,d�d-d�d.d�d/d#�dd�d0d�d1d�d2d�d3d�d4d#��ddddddddddddd5���d)idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d#�d%d#��id&d#�d'd#�dd#�d(d�d)d�d*d#�d+d�d,d#�d-d#�d.d#�d/d#�dd#�d0d�d1d#�d2d�d3d�d4d#��dddddddd#dddd#d5���d*idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d#�d%d#��id&d#�d'd#�dd#�d(d#�d)d#�d*d#�d+d#�d,d#�d-d#�d.d#�d/d#�dd#�d0d#�d1d#�d2d#�d3d#�d4d��dd#d#d#d#d#ddddd#d#d5���d+idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd#�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d#�dd�d0d�d1d�d2d#�d3d#�d4d��dddd#ddddddddd5���d,idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d#��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d�d-d#�d.d�d/d#�dd#�d0d�d1d#�d2d#�d3d#�d4d#��ddddddddddddd5���d-idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d#�d'd�dd#�d(d#�d)d�d*d#�d+d�d,d#�d-d#�d.d�d/d#�dd#�d0d�d1d�d2d#�d3d�d4d#��dddd#dddd#d#dd#d#d5���d.idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d�d-d#�d.d�d/d#�dd#�d0d�d1d�d2d#�d3d�d4d#��dddddddd#dddd#d5���d/idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d#�d'd#�dd#�d(d�d)d�d*d#�d+d�d,d#�d-d�d.d�d/d#�dd#�d0d�d1d�d2d#�d3d#�d4d#��ddd#d#dddd#d#dd#d#d5���didd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d#�d%d#��id&d#�d'd#�dd#�d(d#�d)d#�d*d#�d+d#�d,d#�d-d#�d.d#�d/d#�dd#�d0d#�d1d#�d2d#�d3d#�d4d��dd#dd#d#d#ddddd#d#d5���d0idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d�d-d#�d.d�d/d#�dd#�d0d�d1d#�d2d�d3d�d4d#��dddddddd#dddd#d5���d1idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d#��id&d#�d'd#�dd#�d(d#�d)d�d*d#�d+d�d,d#�d-d�d.d#�d/d#�dd#�d0d�d1d�d2d#�d3d#�d4d#��dd#ddd#ddd#d#ddd#d5���d2idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d#��id&d�d'd#�dd#�d(d�d)d�d*d#�d+d�d,d#�d-d#�d.d#�d/d#�dd#�d0d#�d1d#�d2d#�d3d#�d4d#��dd#dd#dddd#d#dd#d#d5���d3idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d#��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d#�d-d#�d.d�d/d#�dd#�d0d�d1d#�d2d#�d3d�d4d#��dddddddd#d#ddd#d5���d4idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d#�d%d#��id&d#�d'd#�dd#�d(d#�d)d#�d*d�d+d�d,d#�d-d#�d.d#�d/d#�dd�d0d#�d1d#�d2d#�d3d#�d4d��dd#dd#d#d#ddddd#dd5����idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d#��id&d�d'd�dd�d(d�d)d�d*d#�d+d�d,d�d-d�d.d�d/d#�dd#�d0d�d1d#�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d�d-d�d.d�d/d�dd#�d0d�d1d�d2d�d3d�d4d#��dddddddd#ddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d#�d-d�d.d�d/d#�dd�d0d�d1d�d2d�d3d#�d4d#��ddddddddd#dddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d#�d-d#�d.d�d/d#�dd#�d0d�d1d�d2d�d3d�d4d#��ddddddddd#dddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d#�d$d�d%d��id&d�d'd�dd#�d(d�d)d�d*d#�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d#�d%d#��id&d�d'd�dd#�d(d�d)d�d*d�d+d#�d,d#�d-d#�d.d#�d/d#�dd�d0d#�d1d#�d2d#�d3d#�d4d��dd#dd#d#dddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd#�d(d�d)d#�d*d�d+d�d,d#�d-d�d.d#�d/d#�dd�d0d�d1d�d2d#�d3d�d4d��ddddd#dddddd#d#d5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d��id&d�d'd�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d�d3d#�d4d��ddddddddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d#�d%d��id&d�d'd#�dd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�dd�d0d�d1d�d2d#�d3d#�d4d��dddddd#ddddddd5��idd�dd�dd�dd�dd�dd�d	d�d
d�dd�dd�d
d�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d#��id&d�d'd#�dd#�d(d#�d)d#�d*d�d+d�d,d#�d-d#�d.d#�d/d#�dd�d0d�d1d�d2d#�d3d#�d4d��dd#dddd#ddddddd5��d5��Zidd6�dd6�dd6�d#d6�d*d6�d/d6�d3d6�d2d6�d-d6�d1d6�d%d7�d,d6�d.d6�d'd7�d4d6�d0d6�d8d6�id9d6�d:d6�d&d6�d)d6�d$d6�d;d6�d+d6�d(d6�d<d6�d=d6�d>d6�d?d6�d@d6�dAd6�dd6�ddB�ddB��iddB�ddB�d
dB�ddB�ddB�dCdB�ddB�ddB�ddB�d"dB�ddB�ddB�ddB�d dB�ddD�ddD�ddD��id
dD�ddD�ddD�dEdD�ddD�d	dD�ddD�ddB�d!dB�ddB�ddB�ddB�ddB�dFdB�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]dY�d^d_�d`d[�dadb�dcdd�dedf�dgdh�didj�dkdl��idmdn�dodp�dqdr�dsdt�dudv�dwdx�dydB�dzdB�d{dB�d|dB�d}dB�d~dB�ddS�d�d��d�dI�d�d��d�dG��id�d��d�d]�d�d��d�dF�d�d��d�d��d�d^�d�dU�d�d��d�dO�d�dK�d�d��d�d`�d�dW�d�d��d�d��d�da��id�d��d�d��d�d��d�d��d�dB�d�dB�d�dB�d�dB�d�dB�d�d�d�d�d�d�d�d�d�d�d�d�d�d	�d�d
��id�d�d�d�d�d
�d�d�d�d�d�d�dHd�dJd�dLd�dNd�dPd�dRd�dTd�dVd�dXd�dZd�d\d��id_d�dbdQ�ddd�dfd�dhd �djd!�dld"�dnd#�dpd$�drd%�dtd&�dvd'�dxd�d�d(�d�d)�d�d*�d�d+��id�d,�d�d-�d�d.�d�d/�d�d�d�d0�d�d��d�d��d�d“d�dÓd�dēd�dœd�dƓd�dǓd�dȓd�dɓd�d˓�id�d͓d�dϓd�dѓd�dӓd�dԓd�dՓd�d֓d�dדd�dؓd�dٓd�dړd�dۓd�dܓd�dݓd�dޓd�dߓd�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d1�d�d2�d�d3�d�d4�d�dC�d�d=�d�d?�d�d;�d�d<�d�d@�d�dE�d�d:�d�d9�d�dA��id�d>�d�d8�d�d��d�dM�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���dd���dd��dD�d�dB�d�d7dD��d6d6i�Ze�d�dee�d�d�d���Zidd6�dd6�dd6�d#d6�d*d6�d/d6�d3d6�d2d6�d-d6�d1d6�d%d7�d,d6�d.d6�d'd7�d4d6�d0d6�d8d6�id9d6�d:d6�d&d6�d)d6�d$d6�d;d6�d+d6�d(d6�d<d6�d=d6�d>d6�d?d6�d@d6�dAd6�dd6�ddB�ddB��iddB�ddB�d
dB�ddB�ddB�dCdB�ddB�ddB�ddB�d"dB�ddB�ddB�ddB�d dB�ddD�ddD�ddD��id
dD�ddD�ddD�dEdD�ddD�d	dD�ddD�ddB�d!dB�ddB�ddB�ddB�ddB�dFdB�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]dY�d^d_�d`d[�dadb�dcdd�dedf�dgdh�didj�dkdl��idmdn�dodp�dqdr�dsdt�dudv�dwdx�dydB�dzdB�d{dB�d|dB�d}dB�d~dB�ddS�d�d��d�dI�d�d��d�dG��id�d��d�d]�d�d��d�dF�d�d��d�d��d�d^�d�dU�d�d��d�dO�d�dK�d�d��d�d`�d�dW�d�d��d�d��d�da��id�d��d�d��d�d��d�d��d�dB�d�dB�d�dB�d�dB�d�dB�d�d��d�d��d�d“d�dÓd�dēd�dœd�dƓd�dǓ�id�dȓd�dɓd�d˓d�d͓d�dϓd�dѓdHdӓdJdԓdLdՓdNd֓dPdדdRdؓdTdٓdVdړdXdۓdZdܓd\dݓ�id_dޓdbdߓddd�dfd�dhd�djd�dld�dnd�dpd�drd�dtd�dvd�dxd�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�dM�d�d��d�d���id�d��dΐd�dАd�d�dD�d�dB�d�d�d�d�d�d�d�d�d�d�d�d�d�d	�d�d
�d�d�d�d�d�d
�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dQ�d�d�d�d��id�d �d�d!�d�d"�d�d#�d�d$�d�d%�d�d&�d�d'�d�d�d�d(�d�d)�d�d*�d�d+�d�d,�d�d-�d�d.�d�d/��id�d�d�d0�d�d1�d�d2�d�d3�d�d4�d�dC�d�d=�d�d?�d�d;�d�d<�d�d@��ddE��dd:�dDd9�dBdA�d7d>��d6d8i�Ze�d�dee�d�d�d���Zidd6�dd6�dd6�d#d6�d*d6�d/d6�d3d6�d2d6�d-d6�d1d6�d%d7�d,d6�d.d6�d'd7�d4d6�d0d6�d8d6�id9d6�d:d6�d&d6�d)d6�d$d6�d;d6�d+d6�d(d6�d<d6�d=d6�d>d6�d?d6�d@d6�dAd6�dd6�ddB�ddB��iddB�ddB�d
dB�ddB�ddB�dCdB�ddB�ddB�ddB�d"dB�ddB�ddB�ddB�d dB�ddD�ddD�ddD��id
dD�ddD�ddD�dEdD�ddD�d	dD�ddD�ddB�d!dB�ddB�ddB�ddB�ddB�dFdB�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]dY�d^d_�d`d[�dadb�dcdd�dedf�dgdh�didj�dkdl��idmdn�dodp�dqdr�dsdt�dudv�dwdx�dydB�dzdB�d{dB�d|dB�d}dB�d~dB�ddS�d�d��d�dI�d�d��d�dG��id�d��d�d]�d�d��d�dF�d�d��d�d��d�d^�d�dU�d�d��d�dO�d�dK�d�d��d�d`�d�dW�d�d��d�d��d�da��id�d��d�d��d�d��d�d��d�dB�d�dB�d�dB�d�dB�d�dB�d�d��d�d��d�d“d�dÓd�dM�d�dēd�dœd�dƓ�id�dǓd�dȓd�dɓd�d˓d�d͓d�dϓdHdѓdJdӓdLdԓdNdՓdPd֓dRdדdTdؓdVdٓdXdړdZdۓd\dܓ�id_dݓdbdޓdddߓdfd>�dhd!�djdE�dldQ�dnd#�dpd�drd$�dtd�dvd?�dxd�d�d'�d�d�d�d�d�d��id�dC�d�d�d�d&�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d=�d�d�d�d*�d�d�d�d�d�d��id�d�d�d�d�d+�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d,�d�d
�d�d�d�d�d�d�d�d���id�d��d�d��d�d��d�d��d�d-�d�d�d�d.�d�d�d�d/�d�d�d�d�d�d�d�d0�d�d��d�d��d�d��d�d���id�d�d�d8�d�d��d�d"�d�d1�d�d�d�d2�d�d�d�d3�d�d�d�d4�d�d�d�d(�d�d	�d�d%�d�d�d�d9��id�d�d�d��d��d�d�d:�d�d�d�d)�d�d
�d�d<�d�d�d�dA�d�d �d�d@��dd��dd;�dDd�dB�d�d7dD��d6d6i�Ze�d	�dee�d�d�d���Zidd6�dd6�dd6�d#d6�d*d6�d/d6�d3d6�d2d6�d-d6�d1d6�d%d7�d,d6�d.d6�d'd7�d4d6�d0d6�d8d6�id9d6�d:d6�d&d6�d)d6�d$d6�d;d6�d+d6�d(d6�d<d6�d=d6�d>d6�d?d6�d@d6�dAd6�dd6�ddB�ddB��iddB�ddB�d
dB�ddB�ddB�dCdB�ddB�ddB�ddB�d"dB�ddB�ddB�ddB�d dB�ddD�ddD�ddD��id
dD�ddD�ddD�dEdD�ddD�d	dD�ddD�ddB�d!dB�ddB�ddB�ddB�ddB�dFdB�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]dY�d^d_�d`d[�dadb�dcdd�dedf�dgdh�didj�dkdl��idmdn�dodp�dqdr�dsdt�dudv�dwdx�dydB�dzdB�d{dB�d|dB�d}dB�d~dB�ddS�d�d��d�dI�d�d��d�dG��id�d��d�d]�d�d��d�dF�d�d��d�d��d�d^�d�dU�d�d��d�dO�d�dK�d�d��d�d`�d�dW�d�d��d�d��d�da��id�d��d�d��d�d��d�d��d�dB�d�dB�d�dB�d�dB�d�dB�d�d��d�d��d�d“d�dÓd�dēd�dœd�dƓd�dǓ�id�dȓd�dɓd�d˓d�d͓d�dϓd�dѓdHdӓdJdԓdLdՓdNd֓dPdדdRdؓdTdٓdVdړdXdۓdZdܓd\dݓ�id_dޓdbdߓddd�dfd�dhd�djd�dld�dnd�dpd�drd�dtdM�dvd�dxd�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��dΐd�dАd�d�dD�d�dB�d�d>�d�d#�d�d$�d�d?�d�d'�d�d�d�dC�d�d&�d�d=�d�d*�d�d+�d�d,��id�d-�d�d.�d�d/�d�d�d�d0�d�d8�d�d1�d�d2�d�d3�d�d4�d�d(�d�d%�d�d9�d�d:�d�d)�d�d<�d�dA��id�d@�d�d;�d�dE�d�d!�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d
�d�d�d�d��id�d�d�d�d�d�d�d"�d�d�d�d�d�d�d�d�d�d	�d�d�d�d�d�d��dd
��dd�dDd �dBd�d7d��d6dQi�Z	e�d
�de	e�d�d�d���Z
idd6�dd6�dd6�d#d6�d*d6�d/d6�d3d6�d2d6�d-d6�d1d6�d%d7�d,d6�d.d6�d'd7�d4d6�d0d6�d8d6�id9d6�d:d6�d&d6�d)d6�d$d6�d;d6�d+d6�d(d6�d<d6�d=d6�d>d6�d?d6�d@d6�dAd6�dd6�ddB�ddB��iddB�ddB�d
dB�ddB�ddB�dCdB�ddB�ddB�ddB�d"dB�ddB�ddB�ddB�d dB�ddD�ddD�ddD��id
dD�ddD�ddD�dEdD�ddD�d	dD�ddD�ddB�d!dB�ddB�ddB�ddB�ddB�dFdB�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]dY�d^d_�d`d[�dadb�dcdd�dedf�dgdh�didj�dkdl��idmdn�dodp�dqdr�dsdt�dudv�dwdx�dydB�dzdB�d{dB�d|dB�d}dB�d~dB�ddS�d�d��d�dI�d�d��d�dG��id�d��d�d]�d�d��d�dF�d�d��d�d��d�d^�d�dU�d�d��d�dO�d�dK�d�d��d�d`�d�dW�d�d��d�d��d�da��id�d��d�d��d�d��d�d��d�dB�d�dB�d�dB�d�dB�d�dB�d�d�d�d�d�d�d�d�d�d�d�d�d�d	�d�d
��id�d�d�d�d�d
�d�d�d�d�d�d�dHd�dJd�dLd�dNd�dPd�dRd�dTd�dVd�dXd�dZd�d\d��id_d�dbdQ�ddd�dfd�dhd �djd!�dld"�dnd��dpd��drd“dtdÓdvdēdxdœd�dƓd�dǓd�dȓd�dɓ�id�d˓d�d͓d�dϓd�dѓd�dӓd�dԓd�dՓd�d֓d�dדd�dؓd�dٓd�dړd�dۓd�dܓd�dݓd�dޓd�dߓ�id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d�d�d��id�dD�d�dM�d�d8�d�d#�d�d$�d�d%�d�d&�d�d'�d�d�d�d(�d�d)�d�d*�d�d+�d�d,�d�d-�d�d.�d�d/��id�d�d�d0�d�d1�d�d2�d�d3�d�d4�d�dC�d�d=�d�d?�d�d;�d�d<�d�d@��ddE��dd:�dDd9�dBdA�d7d>��d6d6i�Ze�d�dee�d�d�d���Zidd6�dd6�dd6�d#d6�d*d6�d/d6�d3d6�d2d6�d-d6�d1d6�d%d7�d,d6�d.d6�d'd7�d4d6�d0d6�d8d6�id9d6�d:d6�d&d6�d)d6�d$d6�d;d6�d+d6�d(d6�d<d6�d=d6�d>d6�d?d6�d@d6�dAd6�dd6�ddB�ddB��iddB�ddB�d
dB�ddB�ddB�dCdB�ddB�ddB�ddB�d"dB�ddB�ddB�ddB�d dB�ddD�ddD�ddD��id
dD�ddD�ddD�dEdD�ddD�d	dD�ddD�ddB�d!dB�ddB�ddB�ddB�ddB�dFdB�dGdH�dIdJ�dKdL��idMdN�dOdP�dQdR�dSdT�dUdV�dWdX�dYdZ�d[d\�d]dY�d^d_�d`d[�dadb�dcdd�dedf�dgdh�didj�dkdl��idmdn�dodp�dqdr�dsdt�dudv�dwdx�dydB�dzdB�d{dB�d|dB�d}dB�d~dB�ddS�d�d��d�dI�d�d��d�dG��id�d��d�d]�d�d��d�dF�d�d��d�d��d�d^�d�dU�d�d��d�dO�d�dK�d�d��d�d`�d�dW�d�d��d�d��d�da��id�d��d�d��d�d��d�d��d�dB�d�dB�d�dB�d�dB�d�dB�d�d��d�d��d�d“d�dÓd�dēd�dœd�dƓd�dǓ�id�dȓd�dɓd�d˓d�d͓d�dϓd�dѓdHdӓdJdԓdLdՓdNd֓dPdדdRdؓdTdٓdVdړdXdۓdZdܓd\dݓ�id_dޓdbdߓddd�dfd�dhd�djd�dld�dnd�dpd�drd�dtd�dvd�dxd�d�d�d�d�d�d�d�d��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d	�d�d
�d�d�d�d�d�d
��id�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dQ�d�d��id�d�d�d �d�d!�d�d"�d�d#�d�d$�d�d%�d�d&�d�d'�d�d�d�d(�d�d)�d�d*�d�d+�d�d,�d�d-�d�d.��id�d/�d�d�d�d0�d�d1�d�d2�d�d3�d�d4�d�dC�d�d=�d�d?�d�d;�d�d<�d�d@�d�dE�d�d:�d�d9�d�dA��id�d>�d�d8�d�d��d�dM�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���dd���dd��dD�d�dB�d�d7dD��d6d6i�Z
e�d�de
e�d�d�d���Z�y
(�)�SingleByteCharSetModel�%�,��!�.�)�0�8�3�*�<�$�1�&���"�#�-� �(�4�5�7�:�2�9�?�>�=�/�;�+���
��
����������	���)�'������6�������rBr?r>r:r;r8rAr9r<r@�r7�r=�@�A��B��C��D��E��F��G��H��I��J��K��L�M��N�O��P��Q��R��S��T��U��V��W��X��Y��Z��[�\�]�^�_�`�a�b��c�d��e�f��g�h��i�j��k��l�m�n��o�p�q��r�s�t��u��v�w��x��y��z��{�|�}�~�������������������������������������������������������������������������������������������������������������������������������������������IBM866�Russiangl���P@�?Fu�ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё)�charset_name�language�char_to_order_map�language_model�typical_positive_ratio�keep_ascii_letters�alphabetzwindows-1251�IBM855zKOI8-R�MacCyrillicz
ISO-8859-5N)�#pip._vendor.chardet.sbcharsetproberr�RUSSIAN_LANG_MODEL�IBM866_RUSSIAN_CHAR_TO_ORDER�IBM866_RUSSIAN_MODEL�"WINDOWS_1251_RUSSIAN_CHAR_TO_ORDER�WINDOWS_1251_RUSSIAN_MODEL�IBM855_RUSSIAN_CHAR_TO_ORDER�IBM855_RUSSIAN_MODEL�KOI8_R_RUSSIAN_CHAR_TO_ORDER�KOI8_R_RUSSIAN_MODEL�!MACCYRILLIC_RUSSIAN_CHAR_TO_ORDER�MACCYRILLIC_RUSSIAN_MODEL� ISO_8859_5_RUSSIAN_CHAR_TO_ORDER�ISO_8859_5_RUSSIAN_MODEL����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/langrussianmodel.py�<module>rsu��F�@@��@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�@@�D�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�E@@�F�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�G@@�H�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�I@@�J�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�K@@�L
�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�M
@@�N�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�O@@�P�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�Q@@�R�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�S@@�T�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�U@@�V�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�W@@�X�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�Y@@�Z�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�[@@�\�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�]@@�^�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�_@@�`�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�a@@�b �@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�c @@�d"�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�e"@@�f$�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�g$@@�h&�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�i&@@�j(�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�k(@@�l*�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�m*@@�n,�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�o,@@�p.�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�q.@@�r0�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�s0@@�t2�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�u2@@�v4�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�w4@@�x6�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�y6@@�z8�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�{8@@�|:�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�}:@@�~<�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�<@@�@?�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�A?@@�BA�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�CA@@�DC�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�EC@@�FE�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�GE@@�HG�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�IG@@�JI�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�KI@@�LK�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�MK@@�NM�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�OM@@�PO�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�QO@@�RQ�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�SQ@@�TS�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�US@@�VU�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�WU@@�XW�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�YW@@�ZY�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�[Y@@�\[�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�][@@�^]�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�_]@@�`_�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�a_@@�ba�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�ca@@�dc�@�
�A�@�
�A�@�	�A�@�	�A�	@�
	�A�@�	�A�
@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@�	�A�@� 	�A�!@�"	�A�#@�$	�A�%@�&	�A�'@�(	�A�)@�*	�A�+@�,	�A�-@�.	�A�/@�0	�A�1@�2	�A�3@�4	�A�5@�6	�A�7@�8	�A�9@�:	�A�;@�<	�A�=@�>	�A�?@�@	
�1�A@�B	�A�C@�D	�A�E@�F	�A�G@�H	�A�I@�J	
�1�K@�L	�A�M@�N	�A�O@�P	
�1�Q@�R	�A�S@�T	�A�U@�V	
�1�W@�X	�A�Y@�Z	
�1�[@�\	
�1�]@�^	�A�_@�`	
�1�a@�b	
�1�c@�d	
�1�e@�f	�A�g@�h
�
�
�
�
�
�
�
�
�
�
�
�@�ec@@�fe�@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�ge@@�hg@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�B@	�
�A�@	�
�A�@	�	�A�@	�	�A�	@	�
	�A�@	�	�A�
@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	�	�A�@	� 	�A�!@	�"	�A�#@	�$	�A�%@	�&	�A�'@	�(	�A�)@	�*	�A�+@	�,	�A�-@	�.	�A�/@	�0	�A�1@	�2	�A�3@	�4	�A�5@	�6	�A�7@	�8	�A�9@	�:	�A�;@	�<	�A�=@	�>	�A�?@	�@	
�1�A@	�B	�A�C@	�D	�A�E@	�F	�A�G@	�H	�A�I@	�J	
�1�K@	�L	�A�M@	�N	�A�O@	�P	
�1�Q@	�R	�A�S@	�T	�A�U@	�V	
�1�W@	�X	�A�Y@	�Z	
�1�[@	�\	
�1�]@	�^	�A�_@	�`	
�1�a@	�b	
�1�c@	�d	
�1�e@	�f	�A�g@	�h
�
�
�
�
�
�
�
�
�
�
�
�@	�}@@��R@A ��s�A ��s�A ��s�A ��s�	A �
�s�A ��s�
A ��s�A ��s�A ��s�A ��s�A ���A ���A ���A ���A ���A � ��!A �"��#A �$��%A �&��'A �(��)A �*��+A �,��-A �.��/A �0��1A �2��3A �4��5A �6��7A �8��9A �:��;A �<��=A �>��?A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA ��F.��
�2�%�#��T���A&��s�A&��s�A&��s�A&��s�	A&�
�s�A&��s�
A&��s�A&��s�A&��s�A&��s�A&���A&���A&���A&���A&���A&� ��!A&�"��#A&�$��%A&�&��'A&�(��)A&�*��+A&�,��-A&�.��/A&�0��1A&�2��3A&�4��5A&�6��7A&�8��9A&�:��;A&�<��=A&�>��?A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�B��CA&�D��EA&�F��GA&�H��IA&�J��KA&�L��MA&�N��OA&�P��QA&�R��SA&�T��UA&�V��WA&�X��YA&�Z��[A&�\��]A&�^��_A&�`��aA&�b��cA&�d��eA&�f��gA&�h��iA&�j��kA&�l��mA&�n��oA&�p��qA&�r��sA&�t��uA&�v��wA&�x��yA&�z��{A&�|��}A&�~��A&�@��AA&�"�F4��
�8�%�#��T���A ��s�A ��s�A ��s�A ��s�	A �
�s�A ��s�
A ��s�A ��s�A ��s�A ��s�A ���A ���A ���A ���A ���A � ��!A �"��#A �$��%A �&��'A �(��)A �*��+A �,��-A �.��/A �0��1A �2��3A �4��5A �6��7A �8��9A �:��;A �<��=A �>��?A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA ��F.��
�2�%�#��T���A ��s�A ��s�A ��s�A ��s�	A �
�s�A ��s�
A ��s�A ��s�A ��s�A ��s�A ���A ���A ���A ���A ���A � ��!A �"��#A �$��%A �&��'A �(��)A �*��+A �,��-A �.��/A �0��1A �2��3A �4��5A �6��7A �8��9A �:��;A �<��=A �>��?A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA �B��CA �D��EA �F��GA �H��IA �J��KA �L��MA �N��OA �P��QA �R��SA �T��UA �V��WA �X��YA �Z��[A �\��]A �^��_A �`��aA �b��cA �d��eA �f��gA �h��iA �j��kA �l��mA �n��oA �p��qA �r��sA �t��uA �v��wA �x��yA �z��{A �|��}A �~��A �@��AA ��F.��
�2�%�#��T���A%��s�A%��s�A%��s�A%��s�	A%�
�s�A%��s�
A%��s�A%��s�A%��s�A%��s�A%���A%���A%���A%���A%���A%� ��!A%�"��#A%�$��%A%�&��'A%�(��)A%�*��+A%�,��-A%�.��/A%�0��1A%�2��3A%�4��5A%�6��7A%�8��9A%�:��;A%�<��=A%�>��?A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�B��CA%�D��EA%�F��GA%�H��IA%�J��KA%�L��MA%�N��OA%�P��QA%�R��SA%�T��UA%�V��WA%�X��YA%�Z��[A%�\��]A%�^��_A%�`��aA%�b��cA%�d��eA%�f��gA%�h��iA%�j��kA%�l��mA%�n��oA%�p��qA%�r��sA%�t��uA%�v��wA%�x��yA%�z��{A%�|��}A%�~��A%�@��AA%�!�F3��
�7�%�#��T���A$��s�A$��s�A$��s�A$��s�	A$�
�s�A$��s�
A$��s�A$��s�A$��s�A$��s�A$���A$���A$���A$���A$���A$� ��!A$�"��#A$�$��%A$�&��'A$�(��)A$�*��+A$�,��-A$�.��/A$�0��1A$�2��3A$�4��5A$�6��7A$�8��9A$�:��;A$�<��=A$�>��?A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$�B��CA$�D��EA$�F��GA$�H��IA$�J��KA$�L��MA$�N��OA$�P��QA$�R��SA$�T��UA$�V��WA$�X��YA$�Z��[A$�\��]A$�^��_A$�`��aA$�b��cA$�d��eA$�f��gA$�h��iA$�j��kA$�l��mA$�n��oA$�p��qA$�r��sA$�t��uA$�v��wA$�x��yA$�z��{A$�|��}A$�~��A$�@��AA$� �F2��
�6�%�#��T��rpython3.12/site-packages/pip/_vendor/chardet/__pycache__/charsetgroupprober.cpython-312.pyc000064400000010073151732703310025605 0ustar00�

R`iK��J�ddlmZmZmZddlmZddlmZmZGd�de�Z	y)�)�List�Optional�Union�)�
CharSetProber)�LanguageFilter�ProbingStatec���eZdZejfdeddf�fd�
Zd�fd�Zedee	fd��Z
edee	fd��Zdee
efdefd	�Zdefd
�Z�xZS)�CharSetGroupProber�lang_filter�returnNc�P��t�|�|��d|_g|_d|_y)N)rr)�super�__init__�_active_num�probers�_best_guess_prober)�selfr�	__class__s  ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/charsetgroupprober.pyrzCharSetGroupProber.__init__#s*���
���[��1����,.���;?���c���t�|��d|_|jD].}|j�d|_|xjdz
c_�0d|_y)NrTr)r�resetrr�activer)r�proberrs  �rrzCharSetGroupProber.reset)sM���
��
������l�l�F��L�L�N� �F�M�����!��#�#'��rc��|js|j�|jsy|jjS�N)r�get_confidence�charset_name�rs rrzCharSetGroupProber.charset_name2s5���&�&����!��*�*���&�&�3�3�3rc��|js|j�|jsy|jjSr)rr�languager s rr"zCharSetGroupProber.language:s5���&�&����!��*�*���&�&�/�/�/r�byte_strc��|jD]�}|js�|j|�}|s�$|tjk(r*||_tj|_|jcS|tjk(s�ud|_|xjdzc_	|jdks��tj|_|jcS|jS)NFrr)
rr�feedr	�FOUND_ITr�_state�state�NOT_MEr)rr#rr(s    rr%zCharSetGroupProber.feedBs����l�l�F��=�=���K�K��)�E�����-�-�-�*0��'�*�3�3����z�z�!���+�+�+� %��
�� � �A�%� ��#�#�q�(�".�"5�"5�D�K��:�:�%�#� �z�z�rc���|j}|tjk(ry|tjk(ryd}d|_|j
D]�}|js'|jjd|j��6|j�}|jjd|j|j|�||ks�~|}||_��|jsy|S)Ng�G�z��?g{�G�z�?gz
%s not activez%s %s confidence = %s)r(r	r&r)rrr�logger�debugrrr")rr(�	best_confr�confs     rrz!CharSetGroupProber.get_confidenceUs����
�
���L�)�)�)���L�'�'�'���	�"&����l�l�F��=�=����!�!�/�6�3F�3F�G���(�(�*�D��K�K���'��)<�)<�f�o�o�t�
��4�� �	�*0��'�#��&�&���r)r
N)�__name__�
__module__�__qualname__r�NONErr�propertyr�strrr"r�bytes�	bytearrayr	r%�floatr�
__classcell__)rs@rrr"s����5C�5H�5H�@�N�@�T�@�'��4�h�s�m�4��4��0�(�3�-�0��0��U�5�)�#3�4����&��rrN)
�typingrrr�
charsetproberr�enumsrr	r�rr�<module>r=s!��8)�(�(�/�H��Hrpython3.12/site-packages/pip/_vendor/chardet/__pycache__/cp949prober.cpython-312.pyc000064400000002644151732703310023754 0ustar00�

R`iD��J�ddlmZddlmZddlmZddlmZGd�de�Zy)�)�EUCKRDistributionAnalysis)�CodingStateMachine)�MultiByteCharSetProber)�CP949_SM_MODELc�L��eZdZd�fd�Zedefd��Zedefd��Z�xZS)�CP949Prober�returnc���t�|��tt�|_t�|_|j�y)N)�super�__init__rr�	coding_smr�distribution_analyzer�reset)�self�	__class__s ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/cp949prober.pyrzCP949Prober.__init__#s0���
����+�N�;���&?�%@��"��
�
��c��y)N�CP949��rs r�charset_namezCP949Prober.charset_name+s��rc��y)N�Koreanrrs r�languagezCP949Prober.language/s��r)r	N)	�__name__�
__module__�__qualname__r�property�strrr�
__classcell__)rs@rrr"s>������c������#���rrN)	�chardistributionr�codingstatemachiner�mbcharsetproberr�mbcssmrrrrr�<module>r&s ��88�2�3�"��(�rpython3.12/site-packages/pip/_vendor/chardet/macromanprober.py000064400000013675151732703310020346 0ustar00######################## BEGIN LICENSE BLOCK ########################
# This code was modified from latin1prober.py by Rob Speer <rob@lumino.so>.
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Rob Speer - adapt to MacRoman encoding
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import List, Union

from .charsetprober import CharSetProber
from .enums import ProbingState

FREQ_CAT_NUM = 4

UDF = 0  # undefined
OTH = 1  # other
ASC = 2  # ascii capital letter
ASS = 3  # ascii small letter
ACV = 4  # accent capital vowel
ACO = 5  # accent capital other
ASV = 6  # accent small vowel
ASO = 7  # accent small other
ODD = 8  # character that is unlikely to appear
CLASS_NUM = 9  # total classes

# The change from Latin1 is that we explicitly look for extended characters
# that are infrequently-occurring symbols, and consider them to always be
# improbable. This should let MacRoman get out of the way of more likely
# encodings in most situations.

# fmt: off
MacRoman_CharToClass = (
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # 00 - 07
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # 08 - 0F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # 10 - 17
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # 18 - 1F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # 20 - 27
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # 28 - 2F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # 30 - 37
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # 38 - 3F
    OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC,  # 40 - 47
    ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,  # 48 - 4F
    ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,  # 50 - 57
    ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH,  # 58 - 5F
    OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS,  # 60 - 67
    ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,  # 68 - 6F
    ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,  # 70 - 77
    ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH,  # 78 - 7F
    ACV, ACV, ACO, ACV, ACO, ACV, ACV, ASV,  # 80 - 87
    ASV, ASV, ASV, ASV, ASV, ASO, ASV, ASV,  # 88 - 8F
    ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASV,  # 90 - 97
    ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV,  # 98 - 9F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, ASO,  # A0 - A7
    OTH, OTH, ODD, ODD, OTH, OTH, ACV, ACV,  # A8 - AF
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,  # B0 - B7
    OTH, OTH, OTH, OTH, OTH, OTH, ASV, ASV,  # B8 - BF
    OTH, OTH, ODD, OTH, ODD, OTH, OTH, OTH,  # C0 - C7
    OTH, OTH, OTH, ACV, ACV, ACV, ACV, ASV,  # C8 - CF
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, ODD,  # D0 - D7
    ASV, ACV, ODD, OTH, OTH, OTH, OTH, OTH,  # D8 - DF
    OTH, OTH, OTH, OTH, OTH, ACV, ACV, ACV,  # E0 - E7
    ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV,  # E8 - EF
    ODD, ACV, ACV, ACV, ACV, ASV, ODD, ODD,  # F0 - F7
    ODD, ODD, ODD, ODD, ODD, ODD, ODD, ODD,  # F8 - FF
)

# 0 : illegal
# 1 : very unlikely
# 2 : normal
# 3 : very likely
MacRomanClassModel = (
# UDF OTH ASC ASS ACV ACO ASV ASO ODD
    0,  0,  0,  0,  0,  0,  0,  0,  0,  # UDF
    0,  3,  3,  3,  3,  3,  3,  3,  1,  # OTH
    0,  3,  3,  3,  3,  3,  3,  3,  1,  # ASC
    0,  3,  3,  3,  1,  1,  3,  3,  1,  # ASS
    0,  3,  3,  3,  1,  2,  1,  2,  1,  # ACV
    0,  3,  3,  3,  3,  3,  3,  3,  1,  # ACO
    0,  3,  1,  3,  1,  1,  1,  3,  1,  # ASV
    0,  3,  1,  3,  1,  1,  3,  3,  1,  # ASO
    0,  1,  1,  1,  1,  1,  1,  1,  1,  # ODD
)
# fmt: on


class MacRomanProber(CharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self._last_char_class = OTH
        self._freq_counter: List[int] = []
        self.reset()

    def reset(self) -> None:
        self._last_char_class = OTH
        self._freq_counter = [0] * FREQ_CAT_NUM

        # express the prior that MacRoman is a somewhat rare encoding;
        # this can be done by starting out in a slightly improbable state
        # that must be overcome
        self._freq_counter[2] = 10

        super().reset()

    @property
    def charset_name(self) -> str:
        return "MacRoman"

    @property
    def language(self) -> str:
        return ""

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        byte_str = self.remove_xml_tags(byte_str)
        for c in byte_str:
            char_class = MacRoman_CharToClass[c]
            freq = MacRomanClassModel[(self._last_char_class * CLASS_NUM) + char_class]
            if freq == 0:
                self._state = ProbingState.NOT_ME
                break
            self._freq_counter[freq] += 1
            self._last_char_class = char_class

        return self.state

    def get_confidence(self) -> float:
        if self.state == ProbingState.NOT_ME:
            return 0.01

        total = sum(self._freq_counter)
        confidence = (
            0.0
            if total < 0.01
            else (self._freq_counter[3] - self._freq_counter[1] * 20.0) / total
        )
        confidence = max(confidence, 0.0)
        # lower the confidence of MacRoman so that other more accurate
        # detector can take priority.
        confidence *= 0.73
        return confidence
python3.12/site-packages/pip/_vendor/chardet/latin1prober.py000064400000012404151732703310017726 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import List, Union

from .charsetprober import CharSetProber
from .enums import ProbingState

FREQ_CAT_NUM = 4

UDF = 0  # undefined
OTH = 1  # other
ASC = 2  # ascii capital letter
ASS = 3  # ascii small letter
ACV = 4  # accent capital vowel
ACO = 5  # accent capital other
ASV = 6  # accent small vowel
ASO = 7  # accent small other
CLASS_NUM = 8  # total classes

# fmt: off
Latin1_CharToClass = (
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 00 - 07
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 08 - 0F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 10 - 17
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 18 - 1F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 20 - 27
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 28 - 2F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 30 - 37
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 38 - 3F
    OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 40 - 47
    ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 48 - 4F
    ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 50 - 57
    ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH,   # 58 - 5F
    OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 60 - 67
    ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 68 - 6F
    ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 70 - 77
    ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH,   # 78 - 7F
    OTH, UDF, OTH, ASO, OTH, OTH, OTH, OTH,   # 80 - 87
    OTH, OTH, ACO, OTH, ACO, UDF, ACO, UDF,   # 88 - 8F
    UDF, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 90 - 97
    OTH, OTH, ASO, OTH, ASO, UDF, ASO, ACO,   # 98 - 9F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # A0 - A7
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # A8 - AF
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # B0 - B7
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # B8 - BF
    ACV, ACV, ACV, ACV, ACV, ACV, ACO, ACO,   # C0 - C7
    ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV,   # C8 - CF
    ACO, ACO, ACV, ACV, ACV, ACV, ACV, OTH,   # D0 - D7
    ACV, ACV, ACV, ACV, ACV, ACO, ACO, ACO,   # D8 - DF
    ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASO,   # E0 - E7
    ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV,   # E8 - EF
    ASO, ASO, ASV, ASV, ASV, ASV, ASV, OTH,   # F0 - F7
    ASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO,   # F8 - FF
)

# 0 : illegal
# 1 : very unlikely
# 2 : normal
# 3 : very likely
Latin1ClassModel = (
# UDF OTH ASC ASS ACV ACO ASV ASO
    0,  0,  0,  0,  0,  0,  0,  0,  # UDF
    0,  3,  3,  3,  3,  3,  3,  3,  # OTH
    0,  3,  3,  3,  3,  3,  3,  3,  # ASC
    0,  3,  3,  3,  1,  1,  3,  3,  # ASS
    0,  3,  3,  3,  1,  2,  1,  2,  # ACV
    0,  3,  3,  3,  3,  3,  3,  3,  # ACO
    0,  3,  1,  3,  1,  1,  1,  3,  # ASV
    0,  3,  1,  3,  1,  1,  3,  3,  # ASO
)
# fmt: on


class Latin1Prober(CharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self._last_char_class = OTH
        self._freq_counter: List[int] = []
        self.reset()

    def reset(self) -> None:
        self._last_char_class = OTH
        self._freq_counter = [0] * FREQ_CAT_NUM
        super().reset()

    @property
    def charset_name(self) -> str:
        return "ISO-8859-1"

    @property
    def language(self) -> str:
        return ""

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        byte_str = self.remove_xml_tags(byte_str)
        for c in byte_str:
            char_class = Latin1_CharToClass[c]
            freq = Latin1ClassModel[(self._last_char_class * CLASS_NUM) + char_class]
            if freq == 0:
                self._state = ProbingState.NOT_ME
                break
            self._freq_counter[freq] += 1
            self._last_char_class = char_class

        return self.state

    def get_confidence(self) -> float:
        if self.state == ProbingState.NOT_ME:
            return 0.01

        total = sum(self._freq_counter)
        confidence = (
            0.0
            if total < 0.01
            else (self._freq_counter[3] - self._freq_counter[1] * 20.0) / total
        )
        confidence = max(confidence, 0.0)
        # lower the confidence of latin1 so that other more accurate
        # detector can take priority.
        confidence *= 0.73
        return confidence
python3.12/site-packages/pip/_vendor/chardet/utf1632prober.py000064400000020471151732703310017653 0ustar00######################## BEGIN LICENSE BLOCK ########################
#
# Contributor(s):
#   Jason Zavaglia
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################
from typing import List, Union

from .charsetprober import CharSetProber
from .enums import ProbingState


class UTF1632Prober(CharSetProber):
    """
    This class simply looks for occurrences of zero bytes, and infers
    whether the file is UTF16 or UTF32 (low-endian or big-endian)
    For instance, files looking like ( \0 \0 \0 [nonzero] )+
    have a good probability to be UTF32BE.  Files looking like ( \0 [nonzero] )+
    may be guessed to be UTF16BE, and inversely for little-endian varieties.
    """

    # how many logical characters to scan before feeling confident of prediction
    MIN_CHARS_FOR_DETECTION = 20
    # a fixed constant ratio of expected zeros or non-zeros in modulo-position.
    EXPECTED_RATIO = 0.94

    def __init__(self) -> None:
        super().__init__()
        self.position = 0
        self.zeros_at_mod = [0] * 4
        self.nonzeros_at_mod = [0] * 4
        self._state = ProbingState.DETECTING
        self.quad = [0, 0, 0, 0]
        self.invalid_utf16be = False
        self.invalid_utf16le = False
        self.invalid_utf32be = False
        self.invalid_utf32le = False
        self.first_half_surrogate_pair_detected_16be = False
        self.first_half_surrogate_pair_detected_16le = False
        self.reset()

    def reset(self) -> None:
        super().reset()
        self.position = 0
        self.zeros_at_mod = [0] * 4
        self.nonzeros_at_mod = [0] * 4
        self._state = ProbingState.DETECTING
        self.invalid_utf16be = False
        self.invalid_utf16le = False
        self.invalid_utf32be = False
        self.invalid_utf32le = False
        self.first_half_surrogate_pair_detected_16be = False
        self.first_half_surrogate_pair_detected_16le = False
        self.quad = [0, 0, 0, 0]

    @property
    def charset_name(self) -> str:
        if self.is_likely_utf32be():
            return "utf-32be"
        if self.is_likely_utf32le():
            return "utf-32le"
        if self.is_likely_utf16be():
            return "utf-16be"
        if self.is_likely_utf16le():
            return "utf-16le"
        # default to something valid
        return "utf-16"

    @property
    def language(self) -> str:
        return ""

    def approx_32bit_chars(self) -> float:
        return max(1.0, self.position / 4.0)

    def approx_16bit_chars(self) -> float:
        return max(1.0, self.position / 2.0)

    def is_likely_utf32be(self) -> bool:
        approx_chars = self.approx_32bit_chars()
        return approx_chars >= self.MIN_CHARS_FOR_DETECTION and (
            self.zeros_at_mod[0] / approx_chars > self.EXPECTED_RATIO
            and self.zeros_at_mod[1] / approx_chars > self.EXPECTED_RATIO
            and self.zeros_at_mod[2] / approx_chars > self.EXPECTED_RATIO
            and self.nonzeros_at_mod[3] / approx_chars > self.EXPECTED_RATIO
            and not self.invalid_utf32be
        )

    def is_likely_utf32le(self) -> bool:
        approx_chars = self.approx_32bit_chars()
        return approx_chars >= self.MIN_CHARS_FOR_DETECTION and (
            self.nonzeros_at_mod[0] / approx_chars > self.EXPECTED_RATIO
            and self.zeros_at_mod[1] / approx_chars > self.EXPECTED_RATIO
            and self.zeros_at_mod[2] / approx_chars > self.EXPECTED_RATIO
            and self.zeros_at_mod[3] / approx_chars > self.EXPECTED_RATIO
            and not self.invalid_utf32le
        )

    def is_likely_utf16be(self) -> bool:
        approx_chars = self.approx_16bit_chars()
        return approx_chars >= self.MIN_CHARS_FOR_DETECTION and (
            (self.nonzeros_at_mod[1] + self.nonzeros_at_mod[3]) / approx_chars
            > self.EXPECTED_RATIO
            and (self.zeros_at_mod[0] + self.zeros_at_mod[2]) / approx_chars
            > self.EXPECTED_RATIO
            and not self.invalid_utf16be
        )

    def is_likely_utf16le(self) -> bool:
        approx_chars = self.approx_16bit_chars()
        return approx_chars >= self.MIN_CHARS_FOR_DETECTION and (
            (self.nonzeros_at_mod[0] + self.nonzeros_at_mod[2]) / approx_chars
            > self.EXPECTED_RATIO
            and (self.zeros_at_mod[1] + self.zeros_at_mod[3]) / approx_chars
            > self.EXPECTED_RATIO
            and not self.invalid_utf16le
        )

    def validate_utf32_characters(self, quad: List[int]) -> None:
        """
        Validate if the quad of bytes is valid UTF-32.

        UTF-32 is valid in the range 0x00000000 - 0x0010FFFF
        excluding 0x0000D800 - 0x0000DFFF

        https://en.wikipedia.org/wiki/UTF-32
        """
        if (
            quad[0] != 0
            or quad[1] > 0x10
            or (quad[0] == 0 and quad[1] == 0 and 0xD8 <= quad[2] <= 0xDF)
        ):
            self.invalid_utf32be = True
        if (
            quad[3] != 0
            or quad[2] > 0x10
            or (quad[3] == 0 and quad[2] == 0 and 0xD8 <= quad[1] <= 0xDF)
        ):
            self.invalid_utf32le = True

    def validate_utf16_characters(self, pair: List[int]) -> None:
        """
        Validate if the pair of bytes is  valid UTF-16.

        UTF-16 is valid in the range 0x0000 - 0xFFFF excluding 0xD800 - 0xFFFF
        with an exception for surrogate pairs, which must be in the range
        0xD800-0xDBFF followed by 0xDC00-0xDFFF

        https://en.wikipedia.org/wiki/UTF-16
        """
        if not self.first_half_surrogate_pair_detected_16be:
            if 0xD8 <= pair[0] <= 0xDB:
                self.first_half_surrogate_pair_detected_16be = True
            elif 0xDC <= pair[0] <= 0xDF:
                self.invalid_utf16be = True
        else:
            if 0xDC <= pair[0] <= 0xDF:
                self.first_half_surrogate_pair_detected_16be = False
            else:
                self.invalid_utf16be = True

        if not self.first_half_surrogate_pair_detected_16le:
            if 0xD8 <= pair[1] <= 0xDB:
                self.first_half_surrogate_pair_detected_16le = True
            elif 0xDC <= pair[1] <= 0xDF:
                self.invalid_utf16le = True
        else:
            if 0xDC <= pair[1] <= 0xDF:
                self.first_half_surrogate_pair_detected_16le = False
            else:
                self.invalid_utf16le = True

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        for c in byte_str:
            mod4 = self.position % 4
            self.quad[mod4] = c
            if mod4 == 3:
                self.validate_utf32_characters(self.quad)
                self.validate_utf16_characters(self.quad[0:2])
                self.validate_utf16_characters(self.quad[2:4])
            if c == 0:
                self.zeros_at_mod[mod4] += 1
            else:
                self.nonzeros_at_mod[mod4] += 1
            self.position += 1
        return self.state

    @property
    def state(self) -> ProbingState:
        if self._state in {ProbingState.NOT_ME, ProbingState.FOUND_IT}:
            # terminal, decided states
            return self._state
        if self.get_confidence() > 0.80:
            self._state = ProbingState.FOUND_IT
        elif self.position > 4 * 1024:
            # if we get to 4kb into the file, and we can't conclude it's UTF,
            # let's give up
            self._state = ProbingState.NOT_ME
        return self._state

    def get_confidence(self) -> float:
        return (
            0.85
            if (
                self.is_likely_utf16le()
                or self.is_likely_utf16be()
                or self.is_likely_utf32le()
                or self.is_likely_utf32be()
            )
            else 0.00
        )
python3.12/site-packages/pip/_vendor/chardet/chardistribution.py000064400000023460151732703310020705 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import Tuple, Union

from .big5freq import (
    BIG5_CHAR_TO_FREQ_ORDER,
    BIG5_TABLE_SIZE,
    BIG5_TYPICAL_DISTRIBUTION_RATIO,
)
from .euckrfreq import (
    EUCKR_CHAR_TO_FREQ_ORDER,
    EUCKR_TABLE_SIZE,
    EUCKR_TYPICAL_DISTRIBUTION_RATIO,
)
from .euctwfreq import (
    EUCTW_CHAR_TO_FREQ_ORDER,
    EUCTW_TABLE_SIZE,
    EUCTW_TYPICAL_DISTRIBUTION_RATIO,
)
from .gb2312freq import (
    GB2312_CHAR_TO_FREQ_ORDER,
    GB2312_TABLE_SIZE,
    GB2312_TYPICAL_DISTRIBUTION_RATIO,
)
from .jisfreq import (
    JIS_CHAR_TO_FREQ_ORDER,
    JIS_TABLE_SIZE,
    JIS_TYPICAL_DISTRIBUTION_RATIO,
)
from .johabfreq import JOHAB_TO_EUCKR_ORDER_TABLE


class CharDistributionAnalysis:
    ENOUGH_DATA_THRESHOLD = 1024
    SURE_YES = 0.99
    SURE_NO = 0.01
    MINIMUM_DATA_THRESHOLD = 3

    def __init__(self) -> None:
        # Mapping table to get frequency order from char order (get from
        # GetOrder())
        self._char_to_freq_order: Tuple[int, ...] = tuple()
        self._table_size = 0  # Size of above table
        # This is a constant value which varies from language to language,
        # used in calculating confidence.  See
        # http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html
        # for further detail.
        self.typical_distribution_ratio = 0.0
        self._done = False
        self._total_chars = 0
        self._freq_chars = 0
        self.reset()

    def reset(self) -> None:
        """reset analyser, clear any state"""
        # If this flag is set to True, detection is done and conclusion has
        # been made
        self._done = False
        self._total_chars = 0  # Total characters encountered
        # The number of characters whose frequency order is less than 512
        self._freq_chars = 0

    def feed(self, char: Union[bytes, bytearray], char_len: int) -> None:
        """feed a character with known length"""
        if char_len == 2:
            # we only care about 2-bytes character in our distribution analysis
            order = self.get_order(char)
        else:
            order = -1
        if order >= 0:
            self._total_chars += 1
            # order is valid
            if order < self._table_size:
                if 512 > self._char_to_freq_order[order]:
                    self._freq_chars += 1

    def get_confidence(self) -> float:
        """return confidence based on existing data"""
        # if we didn't receive any character in our consideration range,
        # return negative answer
        if self._total_chars <= 0 or self._freq_chars <= self.MINIMUM_DATA_THRESHOLD:
            return self.SURE_NO

        if self._total_chars != self._freq_chars:
            r = self._freq_chars / (
                (self._total_chars - self._freq_chars) * self.typical_distribution_ratio
            )
            if r < self.SURE_YES:
                return r

        # normalize confidence (we don't want to be 100% sure)
        return self.SURE_YES

    def got_enough_data(self) -> bool:
        # It is not necessary to receive all data to draw conclusion.
        # For charset detection, certain amount of data is enough
        return self._total_chars > self.ENOUGH_DATA_THRESHOLD

    def get_order(self, _: Union[bytes, bytearray]) -> int:
        # We do not handle characters based on the original encoding string,
        # but convert this encoding string to a number, here called order.
        # This allows multiple encodings of a language to share one frequency
        # table.
        return -1


class EUCTWDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self) -> None:
        super().__init__()
        self._char_to_freq_order = EUCTW_CHAR_TO_FREQ_ORDER
        self._table_size = EUCTW_TABLE_SIZE
        self.typical_distribution_ratio = EUCTW_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, byte_str: Union[bytes, bytearray]) -> int:
        # for euc-TW encoding, we are interested
        #   first  byte range: 0xc4 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char = byte_str[0]
        if first_char >= 0xC4:
            return 94 * (first_char - 0xC4) + byte_str[1] - 0xA1
        return -1


class EUCKRDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self) -> None:
        super().__init__()
        self._char_to_freq_order = EUCKR_CHAR_TO_FREQ_ORDER
        self._table_size = EUCKR_TABLE_SIZE
        self.typical_distribution_ratio = EUCKR_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, byte_str: Union[bytes, bytearray]) -> int:
        # for euc-KR encoding, we are interested
        #   first  byte range: 0xb0 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char = byte_str[0]
        if first_char >= 0xB0:
            return 94 * (first_char - 0xB0) + byte_str[1] - 0xA1
        return -1


class JOHABDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self) -> None:
        super().__init__()
        self._char_to_freq_order = EUCKR_CHAR_TO_FREQ_ORDER
        self._table_size = EUCKR_TABLE_SIZE
        self.typical_distribution_ratio = EUCKR_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, byte_str: Union[bytes, bytearray]) -> int:
        first_char = byte_str[0]
        if 0x88 <= first_char < 0xD4:
            code = first_char * 256 + byte_str[1]
            return JOHAB_TO_EUCKR_ORDER_TABLE.get(code, -1)
        return -1


class GB2312DistributionAnalysis(CharDistributionAnalysis):
    def __init__(self) -> None:
        super().__init__()
        self._char_to_freq_order = GB2312_CHAR_TO_FREQ_ORDER
        self._table_size = GB2312_TABLE_SIZE
        self.typical_distribution_ratio = GB2312_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, byte_str: Union[bytes, bytearray]) -> int:
        # for GB2312 encoding, we are interested
        #  first  byte range: 0xb0 -- 0xfe
        #  second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char, second_char = byte_str[0], byte_str[1]
        if (first_char >= 0xB0) and (second_char >= 0xA1):
            return 94 * (first_char - 0xB0) + second_char - 0xA1
        return -1


class Big5DistributionAnalysis(CharDistributionAnalysis):
    def __init__(self) -> None:
        super().__init__()
        self._char_to_freq_order = BIG5_CHAR_TO_FREQ_ORDER
        self._table_size = BIG5_TABLE_SIZE
        self.typical_distribution_ratio = BIG5_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, byte_str: Union[bytes, bytearray]) -> int:
        # for big5 encoding, we are interested
        #   first  byte range: 0xa4 -- 0xfe
        #   second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char, second_char = byte_str[0], byte_str[1]
        if first_char >= 0xA4:
            if second_char >= 0xA1:
                return 157 * (first_char - 0xA4) + second_char - 0xA1 + 63
            return 157 * (first_char - 0xA4) + second_char - 0x40
        return -1


class SJISDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self) -> None:
        super().__init__()
        self._char_to_freq_order = JIS_CHAR_TO_FREQ_ORDER
        self._table_size = JIS_TABLE_SIZE
        self.typical_distribution_ratio = JIS_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, byte_str: Union[bytes, bytearray]) -> int:
        # for sjis encoding, we are interested
        #   first  byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe
        #   second byte range: 0x40 -- 0x7e,  0x81 -- oxfe
        # no validation needed here. State machine has done that
        first_char, second_char = byte_str[0], byte_str[1]
        if 0x81 <= first_char <= 0x9F:
            order = 188 * (first_char - 0x81)
        elif 0xE0 <= first_char <= 0xEF:
            order = 188 * (first_char - 0xE0 + 31)
        else:
            return -1
        order = order + second_char - 0x40
        if second_char > 0x7F:
            order = -1
        return order


class EUCJPDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self) -> None:
        super().__init__()
        self._char_to_freq_order = JIS_CHAR_TO_FREQ_ORDER
        self._table_size = JIS_TABLE_SIZE
        self.typical_distribution_ratio = JIS_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, byte_str: Union[bytes, bytearray]) -> int:
        # for euc-JP encoding, we are interested
        #   first  byte range: 0xa0 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        char = byte_str[0]
        if char >= 0xA0:
            return 94 * (char - 0xA1) + byte_str[1] - 0xA1
        return -1
python3.12/site-packages/pip/_vendor/chardet/mbcsgroupprober.py000064400000004123151732703310020536 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#   Proofpoint, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .big5prober import Big5Prober
from .charsetgroupprober import CharSetGroupProber
from .cp949prober import CP949Prober
from .enums import LanguageFilter
from .eucjpprober import EUCJPProber
from .euckrprober import EUCKRProber
from .euctwprober import EUCTWProber
from .gb2312prober import GB2312Prober
from .johabprober import JOHABProber
from .sjisprober import SJISProber
from .utf8prober import UTF8Prober


class MBCSGroupProber(CharSetGroupProber):
    def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None:
        super().__init__(lang_filter=lang_filter)
        self.probers = [
            UTF8Prober(),
            SJISProber(),
            EUCJPProber(),
            GB2312Prober(),
            EUCKRProber(),
            CP949Prober(),
            Big5Prober(),
            EUCTWProber(),
            JOHABProber(),
        ]
        self.reset()
python3.12/site-packages/pip/_vendor/chardet/charsetgroupprober.py000064400000007513151732703310021251 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import List, Optional, Union

from .charsetprober import CharSetProber
from .enums import LanguageFilter, ProbingState


class CharSetGroupProber(CharSetProber):
    def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None:
        super().__init__(lang_filter=lang_filter)
        self._active_num = 0
        self.probers: List[CharSetProber] = []
        self._best_guess_prober: Optional[CharSetProber] = None

    def reset(self) -> None:
        super().reset()
        self._active_num = 0
        for prober in self.probers:
            prober.reset()
            prober.active = True
            self._active_num += 1
        self._best_guess_prober = None

    @property
    def charset_name(self) -> Optional[str]:
        if not self._best_guess_prober:
            self.get_confidence()
            if not self._best_guess_prober:
                return None
        return self._best_guess_prober.charset_name

    @property
    def language(self) -> Optional[str]:
        if not self._best_guess_prober:
            self.get_confidence()
            if not self._best_guess_prober:
                return None
        return self._best_guess_prober.language

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        for prober in self.probers:
            if not prober.active:
                continue
            state = prober.feed(byte_str)
            if not state:
                continue
            if state == ProbingState.FOUND_IT:
                self._best_guess_prober = prober
                self._state = ProbingState.FOUND_IT
                return self.state
            if state == ProbingState.NOT_ME:
                prober.active = False
                self._active_num -= 1
                if self._active_num <= 0:
                    self._state = ProbingState.NOT_ME
                    return self.state
        return self.state

    def get_confidence(self) -> float:
        state = self.state
        if state == ProbingState.FOUND_IT:
            return 0.99
        if state == ProbingState.NOT_ME:
            return 0.01
        best_conf = 0.0
        self._best_guess_prober = None
        for prober in self.probers:
            if not prober.active:
                self.logger.debug("%s not active", prober.charset_name)
                continue
            conf = prober.get_confidence()
            self.logger.debug(
                "%s %s confidence = %s", prober.charset_name, prober.language, conf
            )
            if best_conf < conf:
                best_conf = conf
                self._best_guess_prober = prober
        if not self._best_guess_prober:
            return 0.0
        return best_conf
python3.12/site-packages/pip/_vendor/chardet/codingstatemachinedict.py000064400000001036151732703320022021 0ustar00from typing import TYPE_CHECKING, Tuple

if TYPE_CHECKING:
    # TypedDict was introduced in Python 3.8.
    #
    # TODO: Remove the else block and TYPE_CHECKING check when dropping support
    # for Python 3.7.
    from typing import TypedDict

    class CodingStateMachineDict(TypedDict, total=False):
        class_table: Tuple[int, ...]
        class_factor: int
        state_table: Tuple[int, ...]
        char_len_table: Tuple[int, ...]
        name: str
        language: str  # Optional key

else:
    CodingStateMachineDict = dict
python3.12/site-packages/pip/_vendor/chardet/euctwfreq.py000064400000110061151732703320017330 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# EUCTW frequency table
# Converted from big5 work
# by Taiwan's Mandarin Promotion Council
# <http:#www.edu.tw:81/mandr/>

# 128  --> 0.42261
# 256  --> 0.57851
# 512  --> 0.74851
# 1024 --> 0.89384
# 2048 --> 0.97583
#
# Idea Distribution Ratio = 0.74851/(1-0.74851) =2.98
# Random Distribution Ration = 512/(5401-512)=0.105
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR

EUCTW_TYPICAL_DISTRIBUTION_RATIO = 0.75

# Char to FreqOrder table
EUCTW_TABLE_SIZE = 5376

# fmt: off
EUCTW_CHAR_TO_FREQ_ORDER = (
    1, 1800, 1506, 255, 1431, 198, 9, 82, 6, 7310, 177, 202, 3615, 1256, 2808, 110,  # 2742
    3735, 33, 3241, 261, 76, 44, 2113, 16, 2931, 2184, 1176, 659, 3868, 26, 3404, 2643,  # 2758
    1198, 3869, 3313, 4060, 410, 2211, 302, 590, 361, 1963, 8, 204, 58, 4296, 7311, 1931,  # 2774
    63, 7312, 7313, 317, 1614, 75, 222, 159, 4061, 2412, 1480, 7314, 3500, 3068, 224, 2809,  # 2790
    3616, 3, 10, 3870, 1471, 29, 2774, 1135, 2852, 1939, 873, 130, 3242, 1123, 312, 7315,  # 2806
    4297, 2051, 507, 252, 682, 7316, 142, 1914, 124, 206, 2932, 34, 3501, 3173, 64, 604,  # 2822
    7317, 2494, 1976, 1977, 155, 1990, 645, 641, 1606, 7318, 3405, 337, 72, 406, 7319, 80,  # 2838
    630, 238, 3174, 1509, 263, 939, 1092, 2644, 756, 1440, 1094, 3406, 449, 69, 2969, 591,  # 2854
    179, 2095, 471, 115, 2034, 1843, 60, 50, 2970, 134, 806, 1868, 734, 2035, 3407, 180,  # 2870
    995, 1607, 156, 537, 2893, 688, 7320, 319, 1305, 779, 2144, 514, 2374, 298, 4298, 359,  # 2886
    2495, 90, 2707, 1338, 663, 11, 906, 1099, 2545, 20, 2436, 182, 532, 1716, 7321, 732,  # 2902
    1376, 4062, 1311, 1420, 3175, 25, 2312, 1056, 113, 399, 382, 1949, 242, 3408, 2467, 529,  # 2918
    3243, 475, 1447, 3617, 7322, 117, 21, 656, 810, 1297, 2295, 2329, 3502, 7323, 126, 4063,  # 2934
    706, 456, 150, 613, 4299, 71, 1118, 2036, 4064, 145, 3069, 85, 835, 486, 2114, 1246,  # 2950
    1426, 428, 727, 1285, 1015, 800, 106, 623, 303, 1281, 7324, 2127, 2354, 347, 3736, 221,  # 2966
    3503, 3110, 7325, 1955, 1153, 4065, 83, 296, 1199, 3070, 192, 624, 93, 7326, 822, 1897,  # 2982
    2810, 3111, 795, 2064, 991, 1554, 1542, 1592, 27, 43, 2853, 859, 139, 1456, 860, 4300,  # 2998
    437, 712, 3871, 164, 2392, 3112, 695, 211, 3017, 2096, 195, 3872, 1608, 3504, 3505, 3618,  # 3014
    3873, 234, 811, 2971, 2097, 3874, 2229, 1441, 3506, 1615, 2375, 668, 2076, 1638, 305, 228,  # 3030
    1664, 4301, 467, 415, 7327, 262, 2098, 1593, 239, 108, 300, 200, 1033, 512, 1247, 2077,  # 3046
    7328, 7329, 2173, 3176, 3619, 2673, 593, 845, 1062, 3244, 88, 1723, 2037, 3875, 1950, 212,  # 3062
    266, 152, 149, 468, 1898, 4066, 4302, 77, 187, 7330, 3018, 37, 5, 2972, 7331, 3876,  # 3078
    7332, 7333, 39, 2517, 4303, 2894, 3177, 2078, 55, 148, 74, 4304, 545, 483, 1474, 1029,  # 3094
    1665, 217, 1869, 1531, 3113, 1104, 2645, 4067, 24, 172, 3507, 900, 3877, 3508, 3509, 4305,  # 3110
    32, 1408, 2811, 1312, 329, 487, 2355, 2247, 2708, 784, 2674, 4, 3019, 3314, 1427, 1788,  # 3126
    188, 109, 499, 7334, 3620, 1717, 1789, 888, 1217, 3020, 4306, 7335, 3510, 7336, 3315, 1520,  # 3142
    3621, 3878, 196, 1034, 775, 7337, 7338, 929, 1815, 249, 439, 38, 7339, 1063, 7340, 794,  # 3158
    3879, 1435, 2296, 46, 178, 3245, 2065, 7341, 2376, 7342, 214, 1709, 4307, 804, 35, 707,  # 3174
    324, 3622, 1601, 2546, 140, 459, 4068, 7343, 7344, 1365, 839, 272, 978, 2257, 2572, 3409,  # 3190
    2128, 1363, 3623, 1423, 697, 100, 3071, 48, 70, 1231, 495, 3114, 2193, 7345, 1294, 7346,  # 3206
    2079, 462, 586, 1042, 3246, 853, 256, 988, 185, 2377, 3410, 1698, 434, 1084, 7347, 3411,  # 3222
    314, 2615, 2775, 4308, 2330, 2331, 569, 2280, 637, 1816, 2518, 757, 1162, 1878, 1616, 3412,  # 3238
    287, 1577, 2115, 768, 4309, 1671, 2854, 3511, 2519, 1321, 3737, 909, 2413, 7348, 4069, 933,  # 3254
    3738, 7349, 2052, 2356, 1222, 4310, 765, 2414, 1322, 786, 4311, 7350, 1919, 1462, 1677, 2895,  # 3270
    1699, 7351, 4312, 1424, 2437, 3115, 3624, 2590, 3316, 1774, 1940, 3413, 3880, 4070, 309, 1369,  # 3286
    1130, 2812, 364, 2230, 1653, 1299, 3881, 3512, 3882, 3883, 2646, 525, 1085, 3021, 902, 2000,  # 3302
    1475, 964, 4313, 421, 1844, 1415, 1057, 2281, 940, 1364, 3116, 376, 4314, 4315, 1381, 7,  # 3318
    2520, 983, 2378, 336, 1710, 2675, 1845, 321, 3414, 559, 1131, 3022, 2742, 1808, 1132, 1313,  # 3334
    265, 1481, 1857, 7352, 352, 1203, 2813, 3247, 167, 1089, 420, 2814, 776, 792, 1724, 3513,  # 3350
    4071, 2438, 3248, 7353, 4072, 7354, 446, 229, 333, 2743, 901, 3739, 1200, 1557, 4316, 2647,  # 3366
    1920, 395, 2744, 2676, 3740, 4073, 1835, 125, 916, 3178, 2616, 4317, 7355, 7356, 3741, 7357,  # 3382
    7358, 7359, 4318, 3117, 3625, 1133, 2547, 1757, 3415, 1510, 2313, 1409, 3514, 7360, 2145, 438,  # 3398
    2591, 2896, 2379, 3317, 1068, 958, 3023, 461, 311, 2855, 2677, 4074, 1915, 3179, 4075, 1978,  # 3414
    383, 750, 2745, 2617, 4076, 274, 539, 385, 1278, 1442, 7361, 1154, 1964, 384, 561, 210,  # 3430
    98, 1295, 2548, 3515, 7362, 1711, 2415, 1482, 3416, 3884, 2897, 1257, 129, 7363, 3742, 642,  # 3446
    523, 2776, 2777, 2648, 7364, 141, 2231, 1333, 68, 176, 441, 876, 907, 4077, 603, 2592,  # 3462
    710, 171, 3417, 404, 549, 18, 3118, 2393, 1410, 3626, 1666, 7365, 3516, 4319, 2898, 4320,  # 3478
    7366, 2973, 368, 7367, 146, 366, 99, 871, 3627, 1543, 748, 807, 1586, 1185, 22, 2258,  # 3494
    379, 3743, 3180, 7368, 3181, 505, 1941, 2618, 1991, 1382, 2314, 7369, 380, 2357, 218, 702,  # 3510
    1817, 1248, 3418, 3024, 3517, 3318, 3249, 7370, 2974, 3628, 930, 3250, 3744, 7371, 59, 7372,  # 3526
    585, 601, 4078, 497, 3419, 1112, 1314, 4321, 1801, 7373, 1223, 1472, 2174, 7374, 749, 1836,  # 3542
    690, 1899, 3745, 1772, 3885, 1476, 429, 1043, 1790, 2232, 2116, 917, 4079, 447, 1086, 1629,  # 3558
    7375, 556, 7376, 7377, 2020, 1654, 844, 1090, 105, 550, 966, 1758, 2815, 1008, 1782, 686,  # 3574
    1095, 7378, 2282, 793, 1602, 7379, 3518, 2593, 4322, 4080, 2933, 2297, 4323, 3746, 980, 2496,  # 3590
    544, 353, 527, 4324, 908, 2678, 2899, 7380, 381, 2619, 1942, 1348, 7381, 1341, 1252, 560,  # 3606
    3072, 7382, 3420, 2856, 7383, 2053, 973, 886, 2080, 143, 4325, 7384, 7385, 157, 3886, 496,  # 3622
    4081, 57, 840, 540, 2038, 4326, 4327, 3421, 2117, 1445, 970, 2259, 1748, 1965, 2081, 4082,  # 3638
    3119, 1234, 1775, 3251, 2816, 3629, 773, 1206, 2129, 1066, 2039, 1326, 3887, 1738, 1725, 4083,  # 3654
    279, 3120, 51, 1544, 2594, 423, 1578, 2130, 2066, 173, 4328, 1879, 7386, 7387, 1583, 264,  # 3670
    610, 3630, 4329, 2439, 280, 154, 7388, 7389, 7390, 1739, 338, 1282, 3073, 693, 2857, 1411,  # 3686
    1074, 3747, 2440, 7391, 4330, 7392, 7393, 1240, 952, 2394, 7394, 2900, 1538, 2679, 685, 1483,  # 3702
    4084, 2468, 1436, 953, 4085, 2054, 4331, 671, 2395, 79, 4086, 2441, 3252, 608, 567, 2680,  # 3718
    3422, 4087, 4088, 1691, 393, 1261, 1791, 2396, 7395, 4332, 7396, 7397, 7398, 7399, 1383, 1672,  # 3734
    3748, 3182, 1464, 522, 1119, 661, 1150, 216, 675, 4333, 3888, 1432, 3519, 609, 4334, 2681,  # 3750
    2397, 7400, 7401, 7402, 4089, 3025, 0, 7403, 2469, 315, 231, 2442, 301, 3319, 4335, 2380,  # 3766
    7404, 233, 4090, 3631, 1818, 4336, 4337, 7405, 96, 1776, 1315, 2082, 7406, 257, 7407, 1809,  # 3782
    3632, 2709, 1139, 1819, 4091, 2021, 1124, 2163, 2778, 1777, 2649, 7408, 3074, 363, 1655, 3183,  # 3798
    7409, 2975, 7410, 7411, 7412, 3889, 1567, 3890, 718, 103, 3184, 849, 1443, 341, 3320, 2934,  # 3814
    1484, 7413, 1712, 127, 67, 339, 4092, 2398, 679, 1412, 821, 7414, 7415, 834, 738, 351,  # 3830
    2976, 2146, 846, 235, 1497, 1880, 418, 1992, 3749, 2710, 186, 1100, 2147, 2746, 3520, 1545,  # 3846
    1355, 2935, 2858, 1377, 583, 3891, 4093, 2573, 2977, 7416, 1298, 3633, 1078, 2549, 3634, 2358,  # 3862
    78, 3750, 3751, 267, 1289, 2099, 2001, 1594, 4094, 348, 369, 1274, 2194, 2175, 1837, 4338,  # 3878
    1820, 2817, 3635, 2747, 2283, 2002, 4339, 2936, 2748, 144, 3321, 882, 4340, 3892, 2749, 3423,  # 3894
    4341, 2901, 7417, 4095, 1726, 320, 7418, 3893, 3026, 788, 2978, 7419, 2818, 1773, 1327, 2859,  # 3910
    3894, 2819, 7420, 1306, 4342, 2003, 1700, 3752, 3521, 2359, 2650, 787, 2022, 506, 824, 3636,  # 3926
    534, 323, 4343, 1044, 3322, 2023, 1900, 946, 3424, 7421, 1778, 1500, 1678, 7422, 1881, 4344,  # 3942
    165, 243, 4345, 3637, 2521, 123, 683, 4096, 764, 4346, 36, 3895, 1792, 589, 2902, 816,  # 3958
    626, 1667, 3027, 2233, 1639, 1555, 1622, 3753, 3896, 7423, 3897, 2860, 1370, 1228, 1932, 891,  # 3974
    2083, 2903, 304, 4097, 7424, 292, 2979, 2711, 3522, 691, 2100, 4098, 1115, 4347, 118, 662,  # 3990
    7425, 611, 1156, 854, 2381, 1316, 2861, 2, 386, 515, 2904, 7426, 7427, 3253, 868, 2234,  # 4006
    1486, 855, 2651, 785, 2212, 3028, 7428, 1040, 3185, 3523, 7429, 3121, 448, 7430, 1525, 7431,  # 4022
    2164, 4348, 7432, 3754, 7433, 4099, 2820, 3524, 3122, 503, 818, 3898, 3123, 1568, 814, 676,  # 4038
    1444, 306, 1749, 7434, 3755, 1416, 1030, 197, 1428, 805, 2821, 1501, 4349, 7435, 7436, 7437,  # 4054
    1993, 7438, 4350, 7439, 7440, 2195, 13, 2779, 3638, 2980, 3124, 1229, 1916, 7441, 3756, 2131,  # 4070
    7442, 4100, 4351, 2399, 3525, 7443, 2213, 1511, 1727, 1120, 7444, 7445, 646, 3757, 2443, 307,  # 4086
    7446, 7447, 1595, 3186, 7448, 7449, 7450, 3639, 1113, 1356, 3899, 1465, 2522, 2523, 7451, 519,  # 4102
    7452, 128, 2132, 92, 2284, 1979, 7453, 3900, 1512, 342, 3125, 2196, 7454, 2780, 2214, 1980,  # 4118
    3323, 7455, 290, 1656, 1317, 789, 827, 2360, 7456, 3758, 4352, 562, 581, 3901, 7457, 401,  # 4134
    4353, 2248, 94, 4354, 1399, 2781, 7458, 1463, 2024, 4355, 3187, 1943, 7459, 828, 1105, 4101,  # 4150
    1262, 1394, 7460, 4102, 605, 4356, 7461, 1783, 2862, 7462, 2822, 819, 2101, 578, 2197, 2937,  # 4166
    7463, 1502, 436, 3254, 4103, 3255, 2823, 3902, 2905, 3425, 3426, 7464, 2712, 2315, 7465, 7466,  # 4182
    2332, 2067, 23, 4357, 193, 826, 3759, 2102, 699, 1630, 4104, 3075, 390, 1793, 1064, 3526,  # 4198
    7467, 1579, 3076, 3077, 1400, 7468, 4105, 1838, 1640, 2863, 7469, 4358, 4359, 137, 4106, 598,  # 4214
    3078, 1966, 780, 104, 974, 2938, 7470, 278, 899, 253, 402, 572, 504, 493, 1339, 7471,  # 4230
    3903, 1275, 4360, 2574, 2550, 7472, 3640, 3029, 3079, 2249, 565, 1334, 2713, 863, 41, 7473,  # 4246
    7474, 4361, 7475, 1657, 2333, 19, 463, 2750, 4107, 606, 7476, 2981, 3256, 1087, 2084, 1323,  # 4262
    2652, 2982, 7477, 1631, 1623, 1750, 4108, 2682, 7478, 2864, 791, 2714, 2653, 2334, 232, 2416,  # 4278
    7479, 2983, 1498, 7480, 2654, 2620, 755, 1366, 3641, 3257, 3126, 2025, 1609, 119, 1917, 3427,  # 4294
    862, 1026, 4109, 7481, 3904, 3760, 4362, 3905, 4363, 2260, 1951, 2470, 7482, 1125, 817, 4110,  # 4310
    4111, 3906, 1513, 1766, 2040, 1487, 4112, 3030, 3258, 2824, 3761, 3127, 7483, 7484, 1507, 7485,  # 4326
    2683, 733, 40, 1632, 1106, 2865, 345, 4113, 841, 2524, 230, 4364, 2984, 1846, 3259, 3428,  # 4342
    7486, 1263, 986, 3429, 7487, 735, 879, 254, 1137, 857, 622, 1300, 1180, 1388, 1562, 3907,  # 4358
    3908, 2939, 967, 2751, 2655, 1349, 592, 2133, 1692, 3324, 2985, 1994, 4114, 1679, 3909, 1901,  # 4374
    2185, 7488, 739, 3642, 2715, 1296, 1290, 7489, 4115, 2198, 2199, 1921, 1563, 2595, 2551, 1870,  # 4390
    2752, 2986, 7490, 435, 7491, 343, 1108, 596, 17, 1751, 4365, 2235, 3430, 3643, 7492, 4366,  # 4406
    294, 3527, 2940, 1693, 477, 979, 281, 2041, 3528, 643, 2042, 3644, 2621, 2782, 2261, 1031,  # 4422
    2335, 2134, 2298, 3529, 4367, 367, 1249, 2552, 7493, 3530, 7494, 4368, 1283, 3325, 2004, 240,  # 4438
    1762, 3326, 4369, 4370, 836, 1069, 3128, 474, 7495, 2148, 2525, 268, 3531, 7496, 3188, 1521,  # 4454
    1284, 7497, 1658, 1546, 4116, 7498, 3532, 3533, 7499, 4117, 3327, 2684, 1685, 4118, 961, 1673,  # 4470
    2622, 190, 2005, 2200, 3762, 4371, 4372, 7500, 570, 2497, 3645, 1490, 7501, 4373, 2623, 3260,  # 4486
    1956, 4374, 584, 1514, 396, 1045, 1944, 7502, 4375, 1967, 2444, 7503, 7504, 4376, 3910, 619,  # 4502
    7505, 3129, 3261, 215, 2006, 2783, 2553, 3189, 4377, 3190, 4378, 763, 4119, 3763, 4379, 7506,  # 4518
    7507, 1957, 1767, 2941, 3328, 3646, 1174, 452, 1477, 4380, 3329, 3130, 7508, 2825, 1253, 2382,  # 4534
    2186, 1091, 2285, 4120, 492, 7509, 638, 1169, 1824, 2135, 1752, 3911, 648, 926, 1021, 1324,  # 4550
    4381, 520, 4382, 997, 847, 1007, 892, 4383, 3764, 2262, 1871, 3647, 7510, 2400, 1784, 4384,  # 4566
    1952, 2942, 3080, 3191, 1728, 4121, 2043, 3648, 4385, 2007, 1701, 3131, 1551, 30, 2263, 4122,  # 4582
    7511, 2026, 4386, 3534, 7512, 501, 7513, 4123, 594, 3431, 2165, 1821, 3535, 3432, 3536, 3192,  # 4598
    829, 2826, 4124, 7514, 1680, 3132, 1225, 4125, 7515, 3262, 4387, 4126, 3133, 2336, 7516, 4388,  # 4614
    4127, 7517, 3912, 3913, 7518, 1847, 2383, 2596, 3330, 7519, 4389, 374, 3914, 652, 4128, 4129,  # 4630
    375, 1140, 798, 7520, 7521, 7522, 2361, 4390, 2264, 546, 1659, 138, 3031, 2445, 4391, 7523,  # 4646
    2250, 612, 1848, 910, 796, 3765, 1740, 1371, 825, 3766, 3767, 7524, 2906, 2554, 7525, 692,  # 4662
    444, 3032, 2624, 801, 4392, 4130, 7526, 1491, 244, 1053, 3033, 4131, 4132, 340, 7527, 3915,  # 4678
    1041, 2987, 293, 1168, 87, 1357, 7528, 1539, 959, 7529, 2236, 721, 694, 4133, 3768, 219,  # 4694
    1478, 644, 1417, 3331, 2656, 1413, 1401, 1335, 1389, 3916, 7530, 7531, 2988, 2362, 3134, 1825,  # 4710
    730, 1515, 184, 2827, 66, 4393, 7532, 1660, 2943, 246, 3332, 378, 1457, 226, 3433, 975,  # 4726
    3917, 2944, 1264, 3537, 674, 696, 7533, 163, 7534, 1141, 2417, 2166, 713, 3538, 3333, 4394,  # 4742
    3918, 7535, 7536, 1186, 15, 7537, 1079, 1070, 7538, 1522, 3193, 3539, 276, 1050, 2716, 758,  # 4758
    1126, 653, 2945, 3263, 7539, 2337, 889, 3540, 3919, 3081, 2989, 903, 1250, 4395, 3920, 3434,  # 4774
    3541, 1342, 1681, 1718, 766, 3264, 286, 89, 2946, 3649, 7540, 1713, 7541, 2597, 3334, 2990,  # 4790
    7542, 2947, 2215, 3194, 2866, 7543, 4396, 2498, 2526, 181, 387, 1075, 3921, 731, 2187, 3335,  # 4806
    7544, 3265, 310, 313, 3435, 2299, 770, 4134, 54, 3034, 189, 4397, 3082, 3769, 3922, 7545,  # 4822
    1230, 1617, 1849, 355, 3542, 4135, 4398, 3336, 111, 4136, 3650, 1350, 3135, 3436, 3035, 4137,  # 4838
    2149, 3266, 3543, 7546, 2784, 3923, 3924, 2991, 722, 2008, 7547, 1071, 247, 1207, 2338, 2471,  # 4854
    1378, 4399, 2009, 864, 1437, 1214, 4400, 373, 3770, 1142, 2216, 667, 4401, 442, 2753, 2555,  # 4870
    3771, 3925, 1968, 4138, 3267, 1839, 837, 170, 1107, 934, 1336, 1882, 7548, 7549, 2118, 4139,  # 4886
    2828, 743, 1569, 7550, 4402, 4140, 582, 2384, 1418, 3437, 7551, 1802, 7552, 357, 1395, 1729,  # 4902
    3651, 3268, 2418, 1564, 2237, 7553, 3083, 3772, 1633, 4403, 1114, 2085, 4141, 1532, 7554, 482,  # 4918
    2446, 4404, 7555, 7556, 1492, 833, 1466, 7557, 2717, 3544, 1641, 2829, 7558, 1526, 1272, 3652,  # 4934
    4142, 1686, 1794, 416, 2556, 1902, 1953, 1803, 7559, 3773, 2785, 3774, 1159, 2316, 7560, 2867,  # 4950
    4405, 1610, 1584, 3036, 2419, 2754, 443, 3269, 1163, 3136, 7561, 7562, 3926, 7563, 4143, 2499,  # 4966
    3037, 4406, 3927, 3137, 2103, 1647, 3545, 2010, 1872, 4144, 7564, 4145, 431, 3438, 7565, 250,  # 4982
    97, 81, 4146, 7566, 1648, 1850, 1558, 160, 848, 7567, 866, 740, 1694, 7568, 2201, 2830,  # 4998
    3195, 4147, 4407, 3653, 1687, 950, 2472, 426, 469, 3196, 3654, 3655, 3928, 7569, 7570, 1188,  # 5014
    424, 1995, 861, 3546, 4148, 3775, 2202, 2685, 168, 1235, 3547, 4149, 7571, 2086, 1674, 4408,  # 5030
    3337, 3270, 220, 2557, 1009, 7572, 3776, 670, 2992, 332, 1208, 717, 7573, 7574, 3548, 2447,  # 5046
    3929, 3338, 7575, 513, 7576, 1209, 2868, 3339, 3138, 4409, 1080, 7577, 7578, 7579, 7580, 2527,  # 5062
    3656, 3549, 815, 1587, 3930, 3931, 7581, 3550, 3439, 3777, 1254, 4410, 1328, 3038, 1390, 3932,  # 5078
    1741, 3933, 3778, 3934, 7582, 236, 3779, 2448, 3271, 7583, 7584, 3657, 3780, 1273, 3781, 4411,  # 5094
    7585, 308, 7586, 4412, 245, 4413, 1851, 2473, 1307, 2575, 430, 715, 2136, 2449, 7587, 270,  # 5110
    199, 2869, 3935, 7588, 3551, 2718, 1753, 761, 1754, 725, 1661, 1840, 4414, 3440, 3658, 7589,  # 5126
    7590, 587, 14, 3272, 227, 2598, 326, 480, 2265, 943, 2755, 3552, 291, 650, 1883, 7591,  # 5142
    1702, 1226, 102, 1547, 62, 3441, 904, 4415, 3442, 1164, 4150, 7592, 7593, 1224, 1548, 2756,  # 5158
    391, 498, 1493, 7594, 1386, 1419, 7595, 2055, 1177, 4416, 813, 880, 1081, 2363, 566, 1145,  # 5174
    4417, 2286, 1001, 1035, 2558, 2599, 2238, 394, 1286, 7596, 7597, 2068, 7598, 86, 1494, 1730,  # 5190
    3936, 491, 1588, 745, 897, 2948, 843, 3340, 3937, 2757, 2870, 3273, 1768, 998, 2217, 2069,  # 5206
    397, 1826, 1195, 1969, 3659, 2993, 3341, 284, 7599, 3782, 2500, 2137, 2119, 1903, 7600, 3938,  # 5222
    2150, 3939, 4151, 1036, 3443, 1904, 114, 2559, 4152, 209, 1527, 7601, 7602, 2949, 2831, 2625,  # 5238
    2385, 2719, 3139, 812, 2560, 7603, 3274, 7604, 1559, 737, 1884, 3660, 1210, 885, 28, 2686,  # 5254
    3553, 3783, 7605, 4153, 1004, 1779, 4418, 7606, 346, 1981, 2218, 2687, 4419, 3784, 1742, 797,  # 5270
    1642, 3940, 1933, 1072, 1384, 2151, 896, 3941, 3275, 3661, 3197, 2871, 3554, 7607, 2561, 1958,  # 5286
    4420, 2450, 1785, 7608, 7609, 7610, 3942, 4154, 1005, 1308, 3662, 4155, 2720, 4421, 4422, 1528,  # 5302
    2600, 161, 1178, 4156, 1982, 987, 4423, 1101, 4157, 631, 3943, 1157, 3198, 2420, 1343, 1241,  # 5318
    1016, 2239, 2562, 372, 877, 2339, 2501, 1160, 555, 1934, 911, 3944, 7611, 466, 1170, 169,  # 5334
    1051, 2907, 2688, 3663, 2474, 2994, 1182, 2011, 2563, 1251, 2626, 7612, 992, 2340, 3444, 1540,  # 5350
    2721, 1201, 2070, 2401, 1996, 2475, 7613, 4424, 528, 1922, 2188, 1503, 1873, 1570, 2364, 3342,  # 5366
    3276, 7614, 557, 1073, 7615, 1827, 3445, 2087, 2266, 3140, 3039, 3084, 767, 3085, 2786, 4425,  # 5382
    1006, 4158, 4426, 2341, 1267, 2176, 3664, 3199, 778, 3945, 3200, 2722, 1597, 2657, 7616, 4427,  # 5398
    7617, 3446, 7618, 7619, 7620, 3277, 2689, 1433, 3278, 131, 95, 1504, 3946, 723, 4159, 3141,  # 5414
    1841, 3555, 2758, 2189, 3947, 2027, 2104, 3665, 7621, 2995, 3948, 1218, 7622, 3343, 3201, 3949,  # 5430
    4160, 2576, 248, 1634, 3785, 912, 7623, 2832, 3666, 3040, 3786, 654, 53, 7624, 2996, 7625,  # 5446
    1688, 4428, 777, 3447, 1032, 3950, 1425, 7626, 191, 820, 2120, 2833, 971, 4429, 931, 3202,  # 5462
    135, 664, 783, 3787, 1997, 772, 2908, 1935, 3951, 3788, 4430, 2909, 3203, 282, 2723, 640,  # 5478
    1372, 3448, 1127, 922, 325, 3344, 7627, 7628, 711, 2044, 7629, 7630, 3952, 2219, 2787, 1936,  # 5494
    3953, 3345, 2220, 2251, 3789, 2300, 7631, 4431, 3790, 1258, 3279, 3954, 3204, 2138, 2950, 3955,  # 5510
    3956, 7632, 2221, 258, 3205, 4432, 101, 1227, 7633, 3280, 1755, 7634, 1391, 3281, 7635, 2910,  # 5526
    2056, 893, 7636, 7637, 7638, 1402, 4161, 2342, 7639, 7640, 3206, 3556, 7641, 7642, 878, 1325,  # 5542
    1780, 2788, 4433, 259, 1385, 2577, 744, 1183, 2267, 4434, 7643, 3957, 2502, 7644, 684, 1024,  # 5558
    4162, 7645, 472, 3557, 3449, 1165, 3282, 3958, 3959, 322, 2152, 881, 455, 1695, 1152, 1340,  # 5574
    660, 554, 2153, 4435, 1058, 4436, 4163, 830, 1065, 3346, 3960, 4437, 1923, 7646, 1703, 1918,  # 5590
    7647, 932, 2268, 122, 7648, 4438, 947, 677, 7649, 3791, 2627, 297, 1905, 1924, 2269, 4439,  # 5606
    2317, 3283, 7650, 7651, 4164, 7652, 4165, 84, 4166, 112, 989, 7653, 547, 1059, 3961, 701,  # 5622
    3558, 1019, 7654, 4167, 7655, 3450, 942, 639, 457, 2301, 2451, 993, 2951, 407, 851, 494,  # 5638
    4440, 3347, 927, 7656, 1237, 7657, 2421, 3348, 573, 4168, 680, 921, 2911, 1279, 1874, 285,  # 5654
    790, 1448, 1983, 719, 2167, 7658, 7659, 4441, 3962, 3963, 1649, 7660, 1541, 563, 7661, 1077,  # 5670
    7662, 3349, 3041, 3451, 511, 2997, 3964, 3965, 3667, 3966, 1268, 2564, 3350, 3207, 4442, 4443,  # 5686
    7663, 535, 1048, 1276, 1189, 2912, 2028, 3142, 1438, 1373, 2834, 2952, 1134, 2012, 7664, 4169,  # 5702
    1238, 2578, 3086, 1259, 7665, 700, 7666, 2953, 3143, 3668, 4170, 7667, 4171, 1146, 1875, 1906,  # 5718
    4444, 2601, 3967, 781, 2422, 132, 1589, 203, 147, 273, 2789, 2402, 898, 1786, 2154, 3968,  # 5734
    3969, 7668, 3792, 2790, 7669, 7670, 4445, 4446, 7671, 3208, 7672, 1635, 3793, 965, 7673, 1804,  # 5750
    2690, 1516, 3559, 1121, 1082, 1329, 3284, 3970, 1449, 3794, 65, 1128, 2835, 2913, 2759, 1590,  # 5766
    3795, 7674, 7675, 12, 2658, 45, 976, 2579, 3144, 4447, 517, 2528, 1013, 1037, 3209, 7676,  # 5782
    3796, 2836, 7677, 3797, 7678, 3452, 7679, 2602, 614, 1998, 2318, 3798, 3087, 2724, 2628, 7680,  # 5798
    2580, 4172, 599, 1269, 7681, 1810, 3669, 7682, 2691, 3088, 759, 1060, 489, 1805, 3351, 3285,  # 5814
    1358, 7683, 7684, 2386, 1387, 1215, 2629, 2252, 490, 7685, 7686, 4173, 1759, 2387, 2343, 7687,  # 5830
    4448, 3799, 1907, 3971, 2630, 1806, 3210, 4449, 3453, 3286, 2760, 2344, 874, 7688, 7689, 3454,  # 5846
    3670, 1858, 91, 2914, 3671, 3042, 3800, 4450, 7690, 3145, 3972, 2659, 7691, 3455, 1202, 1403,  # 5862
    3801, 2954, 2529, 1517, 2503, 4451, 3456, 2504, 7692, 4452, 7693, 2692, 1885, 1495, 1731, 3973,  # 5878
    2365, 4453, 7694, 2029, 7695, 7696, 3974, 2693, 1216, 237, 2581, 4174, 2319, 3975, 3802, 4454,  # 5894
    4455, 2694, 3560, 3457, 445, 4456, 7697, 7698, 7699, 7700, 2761, 61, 3976, 3672, 1822, 3977,  # 5910
    7701, 687, 2045, 935, 925, 405, 2660, 703, 1096, 1859, 2725, 4457, 3978, 1876, 1367, 2695,  # 5926
    3352, 918, 2105, 1781, 2476, 334, 3287, 1611, 1093, 4458, 564, 3146, 3458, 3673, 3353, 945,  # 5942
    2631, 2057, 4459, 7702, 1925, 872, 4175, 7703, 3459, 2696, 3089, 349, 4176, 3674, 3979, 4460,  # 5958
    3803, 4177, 3675, 2155, 3980, 4461, 4462, 4178, 4463, 2403, 2046, 782, 3981, 400, 251, 4179,  # 5974
    1624, 7704, 7705, 277, 3676, 299, 1265, 476, 1191, 3804, 2121, 4180, 4181, 1109, 205, 7706,  # 5990
    2582, 1000, 2156, 3561, 1860, 7707, 7708, 7709, 4464, 7710, 4465, 2565, 107, 2477, 2157, 3982,  # 6006
    3460, 3147, 7711, 1533, 541, 1301, 158, 753, 4182, 2872, 3562, 7712, 1696, 370, 1088, 4183,  # 6022
    4466, 3563, 579, 327, 440, 162, 2240, 269, 1937, 1374, 3461, 968, 3043, 56, 1396, 3090,  # 6038
    2106, 3288, 3354, 7713, 1926, 2158, 4467, 2998, 7714, 3564, 7715, 7716, 3677, 4468, 2478, 7717,  # 6054
    2791, 7718, 1650, 4469, 7719, 2603, 7720, 7721, 3983, 2661, 3355, 1149, 3356, 3984, 3805, 3985,  # 6070
    7722, 1076, 49, 7723, 951, 3211, 3289, 3290, 450, 2837, 920, 7724, 1811, 2792, 2366, 4184,  # 6086
    1908, 1138, 2367, 3806, 3462, 7725, 3212, 4470, 1909, 1147, 1518, 2423, 4471, 3807, 7726, 4472,  # 6102
    2388, 2604, 260, 1795, 3213, 7727, 7728, 3808, 3291, 708, 7729, 3565, 1704, 7730, 3566, 1351,  # 6118
    1618, 3357, 2999, 1886, 944, 4185, 3358, 4186, 3044, 3359, 4187, 7731, 3678, 422, 413, 1714,  # 6134
    3292, 500, 2058, 2345, 4188, 2479, 7732, 1344, 1910, 954, 7733, 1668, 7734, 7735, 3986, 2404,  # 6150
    4189, 3567, 3809, 4190, 7736, 2302, 1318, 2505, 3091, 133, 3092, 2873, 4473, 629, 31, 2838,  # 6166
    2697, 3810, 4474, 850, 949, 4475, 3987, 2955, 1732, 2088, 4191, 1496, 1852, 7737, 3988, 620,  # 6182
    3214, 981, 1242, 3679, 3360, 1619, 3680, 1643, 3293, 2139, 2452, 1970, 1719, 3463, 2168, 7738,  # 6198
    3215, 7739, 7740, 3361, 1828, 7741, 1277, 4476, 1565, 2047, 7742, 1636, 3568, 3093, 7743, 869,  # 6214
    2839, 655, 3811, 3812, 3094, 3989, 3000, 3813, 1310, 3569, 4477, 7744, 7745, 7746, 1733, 558,  # 6230
    4478, 3681, 335, 1549, 3045, 1756, 4192, 3682, 1945, 3464, 1829, 1291, 1192, 470, 2726, 2107,  # 6246
    2793, 913, 1054, 3990, 7747, 1027, 7748, 3046, 3991, 4479, 982, 2662, 3362, 3148, 3465, 3216,  # 6262
    3217, 1946, 2794, 7749, 571, 4480, 7750, 1830, 7751, 3570, 2583, 1523, 2424, 7752, 2089, 984,  # 6278
    4481, 3683, 1959, 7753, 3684, 852, 923, 2795, 3466, 3685, 969, 1519, 999, 2048, 2320, 1705,  # 6294
    7754, 3095, 615, 1662, 151, 597, 3992, 2405, 2321, 1049, 275, 4482, 3686, 4193, 568, 3687,  # 6310
    3571, 2480, 4194, 3688, 7755, 2425, 2270, 409, 3218, 7756, 1566, 2874, 3467, 1002, 769, 2840,  # 6326
    194, 2090, 3149, 3689, 2222, 3294, 4195, 628, 1505, 7757, 7758, 1763, 2177, 3001, 3993, 521,  # 6342
    1161, 2584, 1787, 2203, 2406, 4483, 3994, 1625, 4196, 4197, 412, 42, 3096, 464, 7759, 2632,  # 6358
    4484, 3363, 1760, 1571, 2875, 3468, 2530, 1219, 2204, 3814, 2633, 2140, 2368, 4485, 4486, 3295,  # 6374
    1651, 3364, 3572, 7760, 7761, 3573, 2481, 3469, 7762, 3690, 7763, 7764, 2271, 2091, 460, 7765,  # 6390
    4487, 7766, 3002, 962, 588, 3574, 289, 3219, 2634, 1116, 52, 7767, 3047, 1796, 7768, 7769,  # 6406
    7770, 1467, 7771, 1598, 1143, 3691, 4198, 1984, 1734, 1067, 4488, 1280, 3365, 465, 4489, 1572,  # 6422
    510, 7772, 1927, 2241, 1812, 1644, 3575, 7773, 4490, 3692, 7774, 7775, 2663, 1573, 1534, 7776,  # 6438
    7777, 4199, 536, 1807, 1761, 3470, 3815, 3150, 2635, 7778, 7779, 7780, 4491, 3471, 2915, 1911,  # 6454
    2796, 7781, 3296, 1122, 377, 3220, 7782, 360, 7783, 7784, 4200, 1529, 551, 7785, 2059, 3693,  # 6470
    1769, 2426, 7786, 2916, 4201, 3297, 3097, 2322, 2108, 2030, 4492, 1404, 136, 1468, 1479, 672,  # 6486
    1171, 3221, 2303, 271, 3151, 7787, 2762, 7788, 2049, 678, 2727, 865, 1947, 4493, 7789, 2013,  # 6502
    3995, 2956, 7790, 2728, 2223, 1397, 3048, 3694, 4494, 4495, 1735, 2917, 3366, 3576, 7791, 3816,  # 6518
    509, 2841, 2453, 2876, 3817, 7792, 7793, 3152, 3153, 4496, 4202, 2531, 4497, 2304, 1166, 1010,  # 6534
    552, 681, 1887, 7794, 7795, 2957, 2958, 3996, 1287, 1596, 1861, 3154, 358, 453, 736, 175,  # 6550
    478, 1117, 905, 1167, 1097, 7796, 1853, 1530, 7797, 1706, 7798, 2178, 3472, 2287, 3695, 3473,  # 6566
    3577, 4203, 2092, 4204, 7799, 3367, 1193, 2482, 4205, 1458, 2190, 2205, 1862, 1888, 1421, 3298,  # 6582
    2918, 3049, 2179, 3474, 595, 2122, 7800, 3997, 7801, 7802, 4206, 1707, 2636, 223, 3696, 1359,  # 6598
    751, 3098, 183, 3475, 7803, 2797, 3003, 419, 2369, 633, 704, 3818, 2389, 241, 7804, 7805,  # 6614
    7806, 838, 3004, 3697, 2272, 2763, 2454, 3819, 1938, 2050, 3998, 1309, 3099, 2242, 1181, 7807,  # 6630
    1136, 2206, 3820, 2370, 1446, 4207, 2305, 4498, 7808, 7809, 4208, 1055, 2605, 484, 3698, 7810,  # 6646
    3999, 625, 4209, 2273, 3368, 1499, 4210, 4000, 7811, 4001, 4211, 3222, 2274, 2275, 3476, 7812,  # 6662
    7813, 2764, 808, 2606, 3699, 3369, 4002, 4212, 3100, 2532, 526, 3370, 3821, 4213, 955, 7814,  # 6678
    1620, 4214, 2637, 2427, 7815, 1429, 3700, 1669, 1831, 994, 928, 7816, 3578, 1260, 7817, 7818,  # 6694
    7819, 1948, 2288, 741, 2919, 1626, 4215, 2729, 2455, 867, 1184, 362, 3371, 1392, 7820, 7821,  # 6710
    4003, 4216, 1770, 1736, 3223, 2920, 4499, 4500, 1928, 2698, 1459, 1158, 7822, 3050, 3372, 2877,  # 6726
    1292, 1929, 2506, 2842, 3701, 1985, 1187, 2071, 2014, 2607, 4217, 7823, 2566, 2507, 2169, 3702,  # 6742
    2483, 3299, 7824, 3703, 4501, 7825, 7826, 666, 1003, 3005, 1022, 3579, 4218, 7827, 4502, 1813,  # 6758
    2253, 574, 3822, 1603, 295, 1535, 705, 3823, 4219, 283, 858, 417, 7828, 7829, 3224, 4503,  # 6774
    4504, 3051, 1220, 1889, 1046, 2276, 2456, 4004, 1393, 1599, 689, 2567, 388, 4220, 7830, 2484,  # 6790
    802, 7831, 2798, 3824, 2060, 1405, 2254, 7832, 4505, 3825, 2109, 1052, 1345, 3225, 1585, 7833,  # 6806
    809, 7834, 7835, 7836, 575, 2730, 3477, 956, 1552, 1469, 1144, 2323, 7837, 2324, 1560, 2457,  # 6822
    3580, 3226, 4005, 616, 2207, 3155, 2180, 2289, 7838, 1832, 7839, 3478, 4506, 7840, 1319, 3704,  # 6838
    3705, 1211, 3581, 1023, 3227, 1293, 2799, 7841, 7842, 7843, 3826, 607, 2306, 3827, 762, 2878,  # 6854
    1439, 4221, 1360, 7844, 1485, 3052, 7845, 4507, 1038, 4222, 1450, 2061, 2638, 4223, 1379, 4508,  # 6870
    2585, 7846, 7847, 4224, 1352, 1414, 2325, 2921, 1172, 7848, 7849, 3828, 3829, 7850, 1797, 1451,  # 6886
    7851, 7852, 7853, 7854, 2922, 4006, 4007, 2485, 2346, 411, 4008, 4009, 3582, 3300, 3101, 4509,  # 6902
    1561, 2664, 1452, 4010, 1375, 7855, 7856, 47, 2959, 316, 7857, 1406, 1591, 2923, 3156, 7858,  # 6918
    1025, 2141, 3102, 3157, 354, 2731, 884, 2224, 4225, 2407, 508, 3706, 726, 3583, 996, 2428,  # 6934
    3584, 729, 7859, 392, 2191, 1453, 4011, 4510, 3707, 7860, 7861, 2458, 3585, 2608, 1675, 2800,  # 6950
    919, 2347, 2960, 2348, 1270, 4511, 4012, 73, 7862, 7863, 647, 7864, 3228, 2843, 2255, 1550,  # 6966
    1346, 3006, 7865, 1332, 883, 3479, 7866, 7867, 7868, 7869, 3301, 2765, 7870, 1212, 831, 1347,  # 6982
    4226, 4512, 2326, 3830, 1863, 3053, 720, 3831, 4513, 4514, 3832, 7871, 4227, 7872, 7873, 4515,  # 6998
    7874, 7875, 1798, 4516, 3708, 2609, 4517, 3586, 1645, 2371, 7876, 7877, 2924, 669, 2208, 2665,  # 7014
    2429, 7878, 2879, 7879, 7880, 1028, 3229, 7881, 4228, 2408, 7882, 2256, 1353, 7883, 7884, 4518,  # 7030
    3158, 518, 7885, 4013, 7886, 4229, 1960, 7887, 2142, 4230, 7888, 7889, 3007, 2349, 2350, 3833,  # 7046
    516, 1833, 1454, 4014, 2699, 4231, 4519, 2225, 2610, 1971, 1129, 3587, 7890, 2766, 7891, 2961,  # 7062
    1422, 577, 1470, 3008, 1524, 3373, 7892, 7893, 432, 4232, 3054, 3480, 7894, 2586, 1455, 2508,  # 7078
    2226, 1972, 1175, 7895, 1020, 2732, 4015, 3481, 4520, 7896, 2733, 7897, 1743, 1361, 3055, 3482,  # 7094
    2639, 4016, 4233, 4521, 2290, 895, 924, 4234, 2170, 331, 2243, 3056, 166, 1627, 3057, 1098,  # 7110
    7898, 1232, 2880, 2227, 3374, 4522, 657, 403, 1196, 2372, 542, 3709, 3375, 1600, 4235, 3483,  # 7126
    7899, 4523, 2767, 3230, 576, 530, 1362, 7900, 4524, 2533, 2666, 3710, 4017, 7901, 842, 3834,  # 7142
    7902, 2801, 2031, 1014, 4018, 213, 2700, 3376, 665, 621, 4236, 7903, 3711, 2925, 2430, 7904,  # 7158
    2431, 3302, 3588, 3377, 7905, 4237, 2534, 4238, 4525, 3589, 1682, 4239, 3484, 1380, 7906, 724,  # 7174
    2277, 600, 1670, 7907, 1337, 1233, 4526, 3103, 2244, 7908, 1621, 4527, 7909, 651, 4240, 7910,  # 7190
    1612, 4241, 2611, 7911, 2844, 7912, 2734, 2307, 3058, 7913, 716, 2459, 3059, 174, 1255, 2701,  # 7206
    4019, 3590, 548, 1320, 1398, 728, 4020, 1574, 7914, 1890, 1197, 3060, 4021, 7915, 3061, 3062,  # 7222
    3712, 3591, 3713, 747, 7916, 635, 4242, 4528, 7917, 7918, 7919, 4243, 7920, 7921, 4529, 7922,  # 7238
    3378, 4530, 2432, 451, 7923, 3714, 2535, 2072, 4244, 2735, 4245, 4022, 7924, 1764, 4531, 7925,  # 7254
    4246, 350, 7926, 2278, 2390, 2486, 7927, 4247, 4023, 2245, 1434, 4024, 488, 4532, 458, 4248,  # 7270
    4025, 3715, 771, 1330, 2391, 3835, 2568, 3159, 2159, 2409, 1553, 2667, 3160, 4249, 7928, 2487,  # 7286
    2881, 2612, 1720, 2702, 4250, 3379, 4533, 7929, 2536, 4251, 7930, 3231, 4252, 2768, 7931, 2015,  # 7302
    2736, 7932, 1155, 1017, 3716, 3836, 7933, 3303, 2308, 201, 1864, 4253, 1430, 7934, 4026, 7935,  # 7318
    7936, 7937, 7938, 7939, 4254, 1604, 7940, 414, 1865, 371, 2587, 4534, 4535, 3485, 2016, 3104,  # 7334
    4536, 1708, 960, 4255, 887, 389, 2171, 1536, 1663, 1721, 7941, 2228, 4027, 2351, 2926, 1580,  # 7350
    7942, 7943, 7944, 1744, 7945, 2537, 4537, 4538, 7946, 4539, 7947, 2073, 7948, 7949, 3592, 3380,  # 7366
    2882, 4256, 7950, 4257, 2640, 3381, 2802, 673, 2703, 2460, 709, 3486, 4028, 3593, 4258, 7951,  # 7382
    1148, 502, 634, 7952, 7953, 1204, 4540, 3594, 1575, 4541, 2613, 3717, 7954, 3718, 3105, 948,  # 7398
    3232, 121, 1745, 3837, 1110, 7955, 4259, 3063, 2509, 3009, 4029, 3719, 1151, 1771, 3838, 1488,  # 7414
    4030, 1986, 7956, 2433, 3487, 7957, 7958, 2093, 7959, 4260, 3839, 1213, 1407, 2803, 531, 2737,  # 7430
    2538, 3233, 1011, 1537, 7960, 2769, 4261, 3106, 1061, 7961, 3720, 3721, 1866, 2883, 7962, 2017,  # 7446
    120, 4262, 4263, 2062, 3595, 3234, 2309, 3840, 2668, 3382, 1954, 4542, 7963, 7964, 3488, 1047,  # 7462
    2704, 1266, 7965, 1368, 4543, 2845, 649, 3383, 3841, 2539, 2738, 1102, 2846, 2669, 7966, 7967,  # 7478
    1999, 7968, 1111, 3596, 2962, 7969, 2488, 3842, 3597, 2804, 1854, 3384, 3722, 7970, 7971, 3385,  # 7494
    2410, 2884, 3304, 3235, 3598, 7972, 2569, 7973, 3599, 2805, 4031, 1460, 856, 7974, 3600, 7975,  # 7510
    2885, 2963, 7976, 2886, 3843, 7977, 4264, 632, 2510, 875, 3844, 1697, 3845, 2291, 7978, 7979,  # 7526
    4544, 3010, 1239, 580, 4545, 4265, 7980, 914, 936, 2074, 1190, 4032, 1039, 2123, 7981, 7982,  # 7542
    7983, 3386, 1473, 7984, 1354, 4266, 3846, 7985, 2172, 3064, 4033, 915, 3305, 4267, 4268, 3306,  # 7558
    1605, 1834, 7986, 2739, 398, 3601, 4269, 3847, 4034, 328, 1912, 2847, 4035, 3848, 1331, 4270,  # 7574
    3011, 937, 4271, 7987, 3602, 4036, 4037, 3387, 2160, 4546, 3388, 524, 742, 538, 3065, 1012,  # 7590
    7988, 7989, 3849, 2461, 7990, 658, 1103, 225, 3850, 7991, 7992, 4547, 7993, 4548, 7994, 3236,  # 7606
    1243, 7995, 4038, 963, 2246, 4549, 7996, 2705, 3603, 3161, 7997, 7998, 2588, 2327, 7999, 4550,  # 7622
    8000, 8001, 8002, 3489, 3307, 957, 3389, 2540, 2032, 1930, 2927, 2462, 870, 2018, 3604, 1746,  # 7638
    2770, 2771, 2434, 2463, 8003, 3851, 8004, 3723, 3107, 3724, 3490, 3390, 3725, 8005, 1179, 3066,  # 7654
    8006, 3162, 2373, 4272, 3726, 2541, 3163, 3108, 2740, 4039, 8007, 3391, 1556, 2542, 2292, 977,  # 7670
    2887, 2033, 4040, 1205, 3392, 8008, 1765, 3393, 3164, 2124, 1271, 1689, 714, 4551, 3491, 8009,  # 7686
    2328, 3852, 533, 4273, 3605, 2181, 617, 8010, 2464, 3308, 3492, 2310, 8011, 8012, 3165, 8013,  # 7702
    8014, 3853, 1987, 618, 427, 2641, 3493, 3394, 8015, 8016, 1244, 1690, 8017, 2806, 4274, 4552,  # 7718
    8018, 3494, 8019, 8020, 2279, 1576, 473, 3606, 4275, 3395, 972, 8021, 3607, 8022, 3067, 8023,  # 7734
    8024, 4553, 4554, 8025, 3727, 4041, 4042, 8026, 153, 4555, 356, 8027, 1891, 2888, 4276, 2143,  # 7750
    408, 803, 2352, 8028, 3854, 8029, 4277, 1646, 2570, 2511, 4556, 4557, 3855, 8030, 3856, 4278,  # 7766
    8031, 2411, 3396, 752, 8032, 8033, 1961, 2964, 8034, 746, 3012, 2465, 8035, 4279, 3728, 698,  # 7782
    4558, 1892, 4280, 3608, 2543, 4559, 3609, 3857, 8036, 3166, 3397, 8037, 1823, 1302, 4043, 2706,  # 7798
    3858, 1973, 4281, 8038, 4282, 3167, 823, 1303, 1288, 1236, 2848, 3495, 4044, 3398, 774, 3859,  # 7814
    8039, 1581, 4560, 1304, 2849, 3860, 4561, 8040, 2435, 2161, 1083, 3237, 4283, 4045, 4284, 344,  # 7830
    1173, 288, 2311, 454, 1683, 8041, 8042, 1461, 4562, 4046, 2589, 8043, 8044, 4563, 985, 894,  # 7846
    8045, 3399, 3168, 8046, 1913, 2928, 3729, 1988, 8047, 2110, 1974, 8048, 4047, 8049, 2571, 1194,  # 7862
    425, 8050, 4564, 3169, 1245, 3730, 4285, 8051, 8052, 2850, 8053, 636, 4565, 1855, 3861, 760,  # 7878
    1799, 8054, 4286, 2209, 1508, 4566, 4048, 1893, 1684, 2293, 8055, 8056, 8057, 4287, 4288, 2210,  # 7894
    479, 8058, 8059, 832, 8060, 4049, 2489, 8061, 2965, 2490, 3731, 990, 3109, 627, 1814, 2642,  # 7910
    4289, 1582, 4290, 2125, 2111, 3496, 4567, 8062, 799, 4291, 3170, 8063, 4568, 2112, 1737, 3013,  # 7926
    1018, 543, 754, 4292, 3309, 1676, 4569, 4570, 4050, 8064, 1489, 8065, 3497, 8066, 2614, 2889,  # 7942
    4051, 8067, 8068, 2966, 8069, 8070, 8071, 8072, 3171, 4571, 4572, 2182, 1722, 8073, 3238, 3239,  # 7958
    1842, 3610, 1715, 481, 365, 1975, 1856, 8074, 8075, 1962, 2491, 4573, 8076, 2126, 3611, 3240,  # 7974
    433, 1894, 2063, 2075, 8077, 602, 2741, 8078, 8079, 8080, 8081, 8082, 3014, 1628, 3400, 8083,  # 7990
    3172, 4574, 4052, 2890, 4575, 2512, 8084, 2544, 2772, 8085, 8086, 8087, 3310, 4576, 2891, 8088,  # 8006
    4577, 8089, 2851, 4578, 4579, 1221, 2967, 4053, 2513, 8090, 8091, 8092, 1867, 1989, 8093, 8094,  # 8022
    8095, 1895, 8096, 8097, 4580, 1896, 4054, 318, 8098, 2094, 4055, 4293, 8099, 8100, 485, 8101,  # 8038
    938, 3862, 553, 2670, 116, 8102, 3863, 3612, 8103, 3498, 2671, 2773, 3401, 3311, 2807, 8104,  # 8054
    3613, 2929, 4056, 1747, 2930, 2968, 8105, 8106, 207, 8107, 8108, 2672, 4581, 2514, 8109, 3015,  # 8070
    890, 3614, 3864, 8110, 1877, 3732, 3402, 8111, 2183, 2353, 3403, 1652, 8112, 8113, 8114, 941,  # 8086
    2294, 208, 3499, 4057, 2019, 330, 4294, 3865, 2892, 2492, 3733, 4295, 8115, 8116, 8117, 8118,  # 8102
)
# fmt: on
python3.12/site-packages/pip/_vendor/chardet/enums.py000064400000003223151732703320016453 0ustar00"""
All of the Enums that are used throughout the chardet package.

:author: Dan Blanchard (dan.blanchard@gmail.com)
"""

from enum import Enum, Flag


class InputState:
    """
    This enum represents the different states a universal detector can be in.
    """

    PURE_ASCII = 0
    ESC_ASCII = 1
    HIGH_BYTE = 2


class LanguageFilter(Flag):
    """
    This enum represents the different language filters we can apply to a
    ``UniversalDetector``.
    """

    NONE = 0x00
    CHINESE_SIMPLIFIED = 0x01
    CHINESE_TRADITIONAL = 0x02
    JAPANESE = 0x04
    KOREAN = 0x08
    NON_CJK = 0x10
    ALL = 0x1F
    CHINESE = CHINESE_SIMPLIFIED | CHINESE_TRADITIONAL
    CJK = CHINESE | JAPANESE | KOREAN


class ProbingState(Enum):
    """
    This enum represents the different states a prober can be in.
    """

    DETECTING = 0
    FOUND_IT = 1
    NOT_ME = 2


class MachineState:
    """
    This enum represents the different states a state machine can be in.
    """

    START = 0
    ERROR = 1
    ITS_ME = 2


class SequenceLikelihood:
    """
    This enum represents the likelihood of a character following the previous one.
    """

    NEGATIVE = 0
    UNLIKELY = 1
    LIKELY = 2
    POSITIVE = 3

    @classmethod
    def get_num_categories(cls) -> int:
        """:returns: The number of likelihood categories in the enum."""
        return 4


class CharacterCategory:
    """
    This enum represents the different categories language models for
    ``SingleByteCharsetProber`` put characters into.

    Anything less than CONTROL is considered a letter.
    """

    UNDEFINED = 255
    LINE_BREAK = 254
    SYMBOL = 253
    DIGIT = 252
    CONTROL = 251
python3.12/site-packages/pip/_vendor/chardet/resultdict.py000064400000000622151732703320017506 0ustar00from typing import TYPE_CHECKING, Optional

if TYPE_CHECKING:
    # TypedDict was introduced in Python 3.8.
    #
    # TODO: Remove the else block and TYPE_CHECKING check when dropping support
    # for Python 3.7.
    from typing import TypedDict

    class ResultDict(TypedDict):
        encoding: Optional[str]
        confidence: float
        language: Optional[str]

else:
    ResultDict = dict
python3.12/site-packages/pip/_vendor/chardet/sbcsgroupprober.py000064400000010051151732703320020542 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetgroupprober import CharSetGroupProber
from .hebrewprober import HebrewProber
from .langbulgarianmodel import ISO_8859_5_BULGARIAN_MODEL, WINDOWS_1251_BULGARIAN_MODEL
from .langgreekmodel import ISO_8859_7_GREEK_MODEL, WINDOWS_1253_GREEK_MODEL
from .langhebrewmodel import WINDOWS_1255_HEBREW_MODEL

# from .langhungarianmodel import (ISO_8859_2_HUNGARIAN_MODEL,
#                                  WINDOWS_1250_HUNGARIAN_MODEL)
from .langrussianmodel import (
    IBM855_RUSSIAN_MODEL,
    IBM866_RUSSIAN_MODEL,
    ISO_8859_5_RUSSIAN_MODEL,
    KOI8_R_RUSSIAN_MODEL,
    MACCYRILLIC_RUSSIAN_MODEL,
    WINDOWS_1251_RUSSIAN_MODEL,
)
from .langthaimodel import TIS_620_THAI_MODEL
from .langturkishmodel import ISO_8859_9_TURKISH_MODEL
from .sbcharsetprober import SingleByteCharSetProber


class SBCSGroupProber(CharSetGroupProber):
    def __init__(self) -> None:
        super().__init__()
        hebrew_prober = HebrewProber()
        logical_hebrew_prober = SingleByteCharSetProber(
            WINDOWS_1255_HEBREW_MODEL, is_reversed=False, name_prober=hebrew_prober
        )
        # TODO: See if using ISO-8859-8 Hebrew model works better here, since
        #       it's actually the visual one
        visual_hebrew_prober = SingleByteCharSetProber(
            WINDOWS_1255_HEBREW_MODEL, is_reversed=True, name_prober=hebrew_prober
        )
        hebrew_prober.set_model_probers(logical_hebrew_prober, visual_hebrew_prober)
        # TODO: ORDER MATTERS HERE. I changed the order vs what was in master
        #       and several tests failed that did not before. Some thought
        #       should be put into the ordering, and we should consider making
        #       order not matter here, because that is very counter-intuitive.
        self.probers = [
            SingleByteCharSetProber(WINDOWS_1251_RUSSIAN_MODEL),
            SingleByteCharSetProber(KOI8_R_RUSSIAN_MODEL),
            SingleByteCharSetProber(ISO_8859_5_RUSSIAN_MODEL),
            SingleByteCharSetProber(MACCYRILLIC_RUSSIAN_MODEL),
            SingleByteCharSetProber(IBM866_RUSSIAN_MODEL),
            SingleByteCharSetProber(IBM855_RUSSIAN_MODEL),
            SingleByteCharSetProber(ISO_8859_7_GREEK_MODEL),
            SingleByteCharSetProber(WINDOWS_1253_GREEK_MODEL),
            SingleByteCharSetProber(ISO_8859_5_BULGARIAN_MODEL),
            SingleByteCharSetProber(WINDOWS_1251_BULGARIAN_MODEL),
            # TODO: Restore Hungarian encodings (iso-8859-2 and windows-1250)
            #       after we retrain model.
            # SingleByteCharSetProber(ISO_8859_2_HUNGARIAN_MODEL),
            # SingleByteCharSetProber(WINDOWS_1250_HUNGARIAN_MODEL),
            SingleByteCharSetProber(TIS_620_THAI_MODEL),
            SingleByteCharSetProber(ISO_8859_9_TURKISH_MODEL),
            hebrew_prober,
            logical_hebrew_prober,
            visual_hebrew_prober,
        ]
        self.reset()
python3.12/site-packages/pip/_vendor/chardet/jpcntx.py000064400000064657151732703320016654 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import List, Tuple, Union

# This is hiragana 2-char sequence table, the number in each cell represents its frequency category
# fmt: off
jp2_char_context = (
    (0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1),
    (2, 4, 0, 4, 0, 3, 0, 4, 0, 3, 4, 4, 4, 2, 4, 3, 3, 4, 3, 2, 3, 3, 4, 2, 3, 3, 3, 2, 4, 1, 4, 3, 3, 1, 5, 4, 3, 4, 3, 4, 3, 5, 3, 0, 3, 5, 4, 2, 0, 3, 1, 0, 3, 3, 0, 3, 3, 0, 1, 1, 0, 4, 3, 0, 3, 3, 0, 4, 0, 2, 0, 3, 5, 5, 5, 5, 4, 0, 4, 1, 0, 3, 4),
    (0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2),
    (0, 4, 0, 5, 0, 5, 0, 4, 0, 4, 5, 4, 4, 3, 5, 3, 5, 1, 5, 3, 4, 3, 4, 4, 3, 4, 3, 3, 4, 3, 5, 4, 4, 3, 5, 5, 3, 5, 5, 5, 3, 5, 5, 3, 4, 5, 5, 3, 1, 3, 2, 0, 3, 4, 0, 4, 2, 0, 4, 2, 1, 5, 3, 2, 3, 5, 0, 4, 0, 2, 0, 5, 4, 4, 5, 4, 5, 0, 4, 0, 0, 4, 4),
    (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    (0, 3, 0, 4, 0, 3, 0, 3, 0, 4, 5, 4, 3, 3, 3, 3, 4, 3, 5, 4, 4, 3, 5, 4, 4, 3, 4, 3, 4, 4, 4, 4, 5, 3, 4, 4, 3, 4, 5, 5, 4, 5, 5, 1, 4, 5, 4, 3, 0, 3, 3, 1, 3, 3, 0, 4, 4, 0, 3, 3, 1, 5, 3, 3, 3, 5, 0, 4, 0, 3, 0, 4, 4, 3, 4, 3, 3, 0, 4, 1, 1, 3, 4),
    (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    (0, 4, 0, 3, 0, 3, 0, 4, 0, 3, 4, 4, 3, 2, 2, 1, 2, 1, 3, 1, 3, 3, 3, 3, 3, 4, 3, 1, 3, 3, 5, 3, 3, 0, 4, 3, 0, 5, 4, 3, 3, 5, 4, 4, 3, 4, 4, 5, 0, 1, 2, 0, 1, 2, 0, 2, 2, 0, 1, 0, 0, 5, 2, 2, 1, 4, 0, 3, 0, 1, 0, 4, 4, 3, 5, 4, 3, 0, 2, 1, 0, 4, 3),
    (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    (0, 3, 0, 5, 0, 4, 0, 2, 1, 4, 4, 2, 4, 1, 4, 2, 4, 2, 4, 3, 3, 3, 4, 3, 3, 3, 3, 1, 4, 2, 3, 3, 3, 1, 4, 4, 1, 1, 1, 4, 3, 3, 2, 0, 2, 4, 3, 2, 0, 3, 3, 0, 3, 1, 1, 0, 0, 0, 3, 3, 0, 4, 2, 2, 3, 4, 0, 4, 0, 3, 0, 4, 4, 5, 3, 4, 4, 0, 3, 0, 0, 1, 4),
    (1, 4, 0, 4, 0, 4, 0, 4, 0, 3, 5, 4, 4, 3, 4, 3, 5, 4, 3, 3, 4, 3, 5, 4, 4, 4, 4, 3, 4, 2, 4, 3, 3, 1, 5, 4, 3, 2, 4, 5, 4, 5, 5, 4, 4, 5, 4, 4, 0, 3, 2, 2, 3, 3, 0, 4, 3, 1, 3, 2, 1, 4, 3, 3, 4, 5, 0, 3, 0, 2, 0, 4, 5, 5, 4, 5, 4, 0, 4, 0, 0, 5, 4),
    (0, 5, 0, 5, 0, 4, 0, 3, 0, 4, 4, 3, 4, 3, 3, 3, 4, 0, 4, 4, 4, 3, 4, 3, 4, 3, 3, 1, 4, 2, 4, 3, 4, 0, 5, 4, 1, 4, 5, 4, 4, 5, 3, 2, 4, 3, 4, 3, 2, 4, 1, 3, 3, 3, 2, 3, 2, 0, 4, 3, 3, 4, 3, 3, 3, 4, 0, 4, 0, 3, 0, 4, 5, 4, 4, 4, 3, 0, 4, 1, 0, 1, 3),
    (0, 3, 1, 4, 0, 3, 0, 2, 0, 3, 4, 4, 3, 1, 4, 2, 3, 3, 4, 3, 4, 3, 4, 3, 4, 4, 3, 2, 3, 1, 5, 4, 4, 1, 4, 4, 3, 5, 4, 4, 3, 5, 5, 4, 3, 4, 4, 3, 1, 2, 3, 1, 2, 2, 0, 3, 2, 0, 3, 1, 0, 5, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4, 4, 4, 5, 4, 2, 0, 3, 3, 2, 4, 3),
    (0, 2, 0, 3, 0, 1, 0, 1, 0, 0, 3, 2, 0, 0, 2, 0, 1, 0, 2, 1, 3, 3, 3, 1, 2, 3, 1, 0, 1, 0, 4, 2, 1, 1, 3, 3, 0, 4, 3, 3, 1, 4, 3, 3, 0, 3, 3, 2, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 4, 1, 0, 2, 3, 2, 2, 2, 1, 3, 3, 3, 4, 4, 3, 2, 0, 3, 1, 0, 3, 3),
    (0, 4, 0, 4, 0, 3, 0, 3, 0, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 3, 4, 2, 4, 3, 4, 3, 3, 2, 4, 3, 4, 5, 4, 1, 4, 5, 3, 5, 4, 5, 3, 5, 4, 0, 3, 5, 5, 3, 1, 3, 3, 2, 2, 3, 0, 3, 4, 1, 3, 3, 2, 4, 3, 3, 3, 4, 0, 4, 0, 3, 0, 4, 5, 4, 4, 5, 3, 0, 4, 1, 0, 3, 4),
    (0, 2, 0, 3, 0, 3, 0, 0, 0, 2, 2, 2, 1, 0, 1, 0, 0, 0, 3, 0, 3, 0, 3, 0, 1, 3, 1, 0, 3, 1, 3, 3, 3, 1, 3, 3, 3, 0, 1, 3, 1, 3, 4, 0, 0, 3, 1, 1, 0, 3, 2, 0, 0, 0, 0, 1, 3, 0, 1, 0, 0, 3, 3, 2, 0, 3, 0, 0, 0, 0, 0, 3, 4, 3, 4, 3, 3, 0, 3, 0, 0, 2, 3),
    (2, 3, 0, 3, 0, 2, 0, 1, 0, 3, 3, 4, 3, 1, 3, 1, 1, 1, 3, 1, 4, 3, 4, 3, 3, 3, 0, 0, 3, 1, 5, 4, 3, 1, 4, 3, 2, 5, 5, 4, 4, 4, 4, 3, 3, 4, 4, 4, 0, 2, 1, 1, 3, 2, 0, 1, 2, 0, 0, 1, 0, 4, 1, 3, 3, 3, 0, 3, 0, 1, 0, 4, 4, 4, 5, 5, 3, 0, 2, 0, 0, 4, 4),
    (0, 2, 0, 1, 0, 3, 1, 3, 0, 2, 3, 3, 3, 0, 3, 1, 0, 0, 3, 0, 3, 2, 3, 1, 3, 2, 1, 1, 0, 0, 4, 2, 1, 0, 2, 3, 1, 4, 3, 2, 0, 4, 4, 3, 1, 3, 1, 3, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 4, 1, 1, 1, 2, 0, 3, 0, 0, 0, 3, 4, 2, 4, 3, 2, 0, 1, 0, 0, 3, 3),
    (0, 1, 0, 4, 0, 5, 0, 4, 0, 2, 4, 4, 2, 3, 3, 2, 3, 3, 5, 3, 3, 3, 4, 3, 4, 2, 3, 0, 4, 3, 3, 3, 4, 1, 4, 3, 2, 1, 5, 5, 3, 4, 5, 1, 3, 5, 4, 2, 0, 3, 3, 0, 1, 3, 0, 4, 2, 0, 1, 3, 1, 4, 3, 3, 3, 3, 0, 3, 0, 1, 0, 3, 4, 4, 4, 5, 5, 0, 3, 0, 1, 4, 5),
    (0, 2, 0, 3, 0, 3, 0, 0, 0, 2, 3, 1, 3, 0, 4, 0, 1, 1, 3, 0, 3, 4, 3, 2, 3, 1, 0, 3, 3, 2, 3, 1, 3, 0, 2, 3, 0, 2, 1, 4, 1, 2, 2, 0, 0, 3, 3, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 3, 2, 1, 3, 3, 0, 2, 0, 2, 0, 0, 3, 3, 1, 2, 4, 0, 3, 0, 2, 2, 3),
    (2, 4, 0, 5, 0, 4, 0, 4, 0, 2, 4, 4, 4, 3, 4, 3, 3, 3, 1, 2, 4, 3, 4, 3, 4, 4, 5, 0, 3, 3, 3, 3, 2, 0, 4, 3, 1, 4, 3, 4, 1, 4, 4, 3, 3, 4, 4, 3, 1, 2, 3, 0, 4, 2, 0, 4, 1, 0, 3, 3, 0, 4, 3, 3, 3, 4, 0, 4, 0, 2, 0, 3, 5, 3, 4, 5, 2, 0, 3, 0, 0, 4, 5),
    (0, 3, 0, 4, 0, 1, 0, 1, 0, 1, 3, 2, 2, 1, 3, 0, 3, 0, 2, 0, 2, 0, 3, 0, 2, 0, 0, 0, 1, 0, 1, 1, 0, 0, 3, 1, 0, 0, 0, 4, 0, 3, 1, 0, 2, 1, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 2, 2, 3, 1, 0, 3, 0, 0, 0, 1, 4, 4, 4, 3, 0, 0, 4, 0, 0, 1, 4),
    (1, 4, 1, 5, 0, 3, 0, 3, 0, 4, 5, 4, 4, 3, 5, 3, 3, 4, 4, 3, 4, 1, 3, 3, 3, 3, 2, 1, 4, 1, 5, 4, 3, 1, 4, 4, 3, 5, 4, 4, 3, 5, 4, 3, 3, 4, 4, 4, 0, 3, 3, 1, 2, 3, 0, 3, 1, 0, 3, 3, 0, 5, 4, 4, 4, 4, 4, 4, 3, 3, 5, 4, 4, 3, 3, 5, 4, 0, 3, 2, 0, 4, 4),
    (0, 2, 0, 3, 0, 1, 0, 0, 0, 1, 3, 3, 3, 2, 4, 1, 3, 0, 3, 1, 3, 0, 2, 2, 1, 1, 0, 0, 2, 0, 4, 3, 1, 0, 4, 3, 0, 4, 4, 4, 1, 4, 3, 1, 1, 3, 3, 1, 0, 2, 0, 0, 1, 3, 0, 0, 0, 0, 2, 0, 0, 4, 3, 2, 4, 3, 5, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 0, 2, 1, 0, 3, 3),
    (0, 2, 0, 4, 0, 3, 0, 2, 0, 2, 5, 5, 3, 4, 4, 4, 4, 1, 4, 3, 3, 0, 4, 3, 4, 3, 1, 3, 3, 2, 4, 3, 0, 3, 4, 3, 0, 3, 4, 4, 2, 4, 4, 0, 4, 5, 3, 3, 2, 2, 1, 1, 1, 2, 0, 1, 5, 0, 3, 3, 2, 4, 3, 3, 3, 4, 0, 3, 0, 2, 0, 4, 4, 3, 5, 5, 0, 0, 3, 0, 2, 3, 3),
    (0, 3, 0, 4, 0, 3, 0, 1, 0, 3, 4, 3, 3, 1, 3, 3, 3, 0, 3, 1, 3, 0, 4, 3, 3, 1, 1, 0, 3, 0, 3, 3, 0, 0, 4, 4, 0, 1, 5, 4, 3, 3, 5, 0, 3, 3, 4, 3, 0, 2, 0, 1, 1, 1, 0, 1, 3, 0, 1, 2, 1, 3, 3, 2, 3, 3, 0, 3, 0, 1, 0, 1, 3, 3, 4, 4, 1, 0, 1, 2, 2, 1, 3),
    (0, 1, 0, 4, 0, 4, 0, 3, 0, 1, 3, 3, 3, 2, 3, 1, 1, 0, 3, 0, 3, 3, 4, 3, 2, 4, 2, 0, 1, 0, 4, 3, 2, 0, 4, 3, 0, 5, 3, 3, 2, 4, 4, 4, 3, 3, 3, 4, 0, 1, 3, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 4, 2, 3, 3, 3, 0, 3, 0, 0, 0, 4, 4, 4, 5, 3, 2, 0, 3, 3, 0, 3, 5),
    (0, 2, 0, 3, 0, 0, 0, 3, 0, 1, 3, 0, 2, 0, 0, 0, 1, 0, 3, 1, 1, 3, 3, 0, 0, 3, 0, 0, 3, 0, 2, 3, 1, 0, 3, 1, 0, 3, 3, 2, 0, 4, 2, 2, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 0, 1, 0, 1, 0, 0, 0, 1, 3, 1, 2, 0, 0, 0, 1, 0, 0, 1, 4),
    (0, 3, 0, 3, 0, 5, 0, 1, 0, 2, 4, 3, 1, 3, 3, 2, 1, 1, 5, 2, 1, 0, 5, 1, 2, 0, 0, 0, 3, 3, 2, 2, 3, 2, 4, 3, 0, 0, 3, 3, 1, 3, 3, 0, 2, 5, 3, 4, 0, 3, 3, 0, 1, 2, 0, 2, 2, 0, 3, 2, 0, 2, 2, 3, 3, 3, 0, 2, 0, 1, 0, 3, 4, 4, 2, 5, 4, 0, 3, 0, 0, 3, 5),
    (0, 3, 0, 3, 0, 3, 0, 1, 0, 3, 3, 3, 3, 0, 3, 0, 2, 0, 2, 1, 1, 0, 2, 0, 1, 0, 0, 0, 2, 1, 0, 0, 1, 0, 3, 2, 0, 0, 3, 3, 1, 2, 3, 1, 0, 3, 3, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 3, 1, 2, 3, 0, 3, 0, 1, 0, 3, 2, 1, 0, 4, 3, 0, 1, 1, 0, 3, 3),
    (0, 4, 0, 5, 0, 3, 0, 3, 0, 4, 5, 5, 4, 3, 5, 3, 4, 3, 5, 3, 3, 2, 5, 3, 4, 4, 4, 3, 4, 3, 4, 5, 5, 3, 4, 4, 3, 4, 4, 5, 4, 4, 4, 3, 4, 5, 5, 4, 2, 3, 4, 2, 3, 4, 0, 3, 3, 1, 4, 3, 2, 4, 3, 3, 5, 5, 0, 3, 0, 3, 0, 5, 5, 5, 5, 4, 4, 0, 4, 0, 1, 4, 4),
    (0, 4, 0, 4, 0, 3, 0, 3, 0, 3, 5, 4, 4, 2, 3, 2, 5, 1, 3, 2, 5, 1, 4, 2, 3, 2, 3, 3, 4, 3, 3, 3, 3, 2, 5, 4, 1, 3, 3, 5, 3, 4, 4, 0, 4, 4, 3, 1, 1, 3, 1, 0, 2, 3, 0, 2, 3, 0, 3, 0, 0, 4, 3, 1, 3, 4, 0, 3, 0, 2, 0, 4, 4, 4, 3, 4, 5, 0, 4, 0, 0, 3, 4),
    (0, 3, 0, 3, 0, 3, 1, 2, 0, 3, 4, 4, 3, 3, 3, 0, 2, 2, 4, 3, 3, 1, 3, 3, 3, 1, 1, 0, 3, 1, 4, 3, 2, 3, 4, 4, 2, 4, 4, 4, 3, 4, 4, 3, 2, 4, 4, 3, 1, 3, 3, 1, 3, 3, 0, 4, 1, 0, 2, 2, 1, 4, 3, 2, 3, 3, 5, 4, 3, 3, 5, 4, 4, 3, 3, 0, 4, 0, 3, 2, 2, 4, 4),
    (0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 2, 1, 3, 0, 0, 0, 0, 0, 2, 0, 1, 2, 1, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 1, 0, 1, 1, 3, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 0, 3, 4, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1),
    (0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 4, 0, 4, 1, 4, 0, 3, 0, 4, 0, 3, 0, 4, 0, 3, 0, 3, 0, 4, 1, 5, 1, 4, 0, 0, 3, 0, 5, 0, 5, 2, 0, 1, 0, 0, 0, 2, 1, 4, 0, 1, 3, 0, 0, 3, 0, 0, 3, 1, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0),
    (1, 4, 0, 5, 0, 3, 0, 2, 0, 3, 5, 4, 4, 3, 4, 3, 5, 3, 4, 3, 3, 0, 4, 3, 3, 3, 3, 3, 3, 2, 4, 4, 3, 1, 3, 4, 4, 5, 4, 4, 3, 4, 4, 1, 3, 5, 4, 3, 3, 3, 1, 2, 2, 3, 3, 1, 3, 1, 3, 3, 3, 5, 3, 3, 4, 5, 0, 3, 0, 3, 0, 3, 4, 3, 4, 4, 3, 0, 3, 0, 2, 4, 3),
    (0, 1, 0, 4, 0, 0, 0, 0, 0, 1, 4, 0, 4, 1, 4, 2, 4, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 3, 1, 1, 1, 0, 3, 0, 0, 0, 1, 2, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 3, 2, 0, 2, 2, 0, 1, 0, 0, 0, 2, 3, 2, 3, 3, 0, 0, 0, 0, 2, 1, 0),
    (0, 5, 1, 5, 0, 3, 0, 3, 0, 5, 4, 4, 5, 1, 5, 3, 3, 0, 4, 3, 4, 3, 5, 3, 4, 3, 3, 2, 4, 3, 4, 3, 3, 0, 3, 3, 1, 4, 4, 3, 4, 4, 4, 3, 4, 5, 5, 3, 2, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 3, 2, 4, 5, 3, 3, 5, 0, 4, 0, 3, 0, 4, 4, 3, 5, 3, 3, 0, 3, 4, 0, 4, 3),
    (0, 5, 0, 5, 0, 3, 0, 2, 0, 4, 4, 3, 5, 2, 4, 3, 3, 3, 4, 4, 4, 3, 5, 3, 5, 3, 3, 1, 4, 0, 4, 3, 3, 0, 3, 3, 0, 4, 4, 4, 4, 5, 4, 3, 3, 5, 5, 3, 2, 3, 1, 2, 3, 2, 0, 1, 0, 0, 3, 2, 2, 4, 4, 3, 1, 5, 0, 4, 0, 3, 0, 4, 3, 1, 3, 2, 1, 0, 3, 3, 0, 3, 3),
    (0, 4, 0, 5, 0, 5, 0, 4, 0, 4, 5, 5, 5, 3, 4, 3, 3, 2, 5, 4, 4, 3, 5, 3, 5, 3, 4, 0, 4, 3, 4, 4, 3, 2, 4, 4, 3, 4, 5, 4, 4, 5, 5, 0, 3, 5, 5, 4, 1, 3, 3, 2, 3, 3, 1, 3, 1, 0, 4, 3, 1, 4, 4, 3, 4, 5, 0, 4, 0, 2, 0, 4, 3, 4, 4, 3, 3, 0, 4, 0, 0, 5, 5),
    (0, 4, 0, 4, 0, 5, 0, 1, 1, 3, 3, 4, 4, 3, 4, 1, 3, 0, 5, 1, 3, 0, 3, 1, 3, 1, 1, 0, 3, 0, 3, 3, 4, 0, 4, 3, 0, 4, 4, 4, 3, 4, 4, 0, 3, 5, 4, 1, 0, 3, 0, 0, 2, 3, 0, 3, 1, 0, 3, 1, 0, 3, 2, 1, 3, 5, 0, 3, 0, 1, 0, 3, 2, 3, 3, 4, 4, 0, 2, 2, 0, 4, 4),
    (2, 4, 0, 5, 0, 4, 0, 3, 0, 4, 5, 5, 4, 3, 5, 3, 5, 3, 5, 3, 5, 2, 5, 3, 4, 3, 3, 4, 3, 4, 5, 3, 2, 1, 5, 4, 3, 2, 3, 4, 5, 3, 4, 1, 2, 5, 4, 3, 0, 3, 3, 0, 3, 2, 0, 2, 3, 0, 4, 1, 0, 3, 4, 3, 3, 5, 0, 3, 0, 1, 0, 4, 5, 5, 5, 4, 3, 0, 4, 2, 0, 3, 5),
    (0, 5, 0, 4, 0, 4, 0, 2, 0, 5, 4, 3, 4, 3, 4, 3, 3, 3, 4, 3, 4, 2, 5, 3, 5, 3, 4, 1, 4, 3, 4, 4, 4, 0, 3, 5, 0, 4, 4, 4, 4, 5, 3, 1, 3, 4, 5, 3, 3, 3, 3, 3, 3, 3, 0, 2, 2, 0, 3, 3, 2, 4, 3, 3, 3, 5, 3, 4, 1, 3, 3, 5, 3, 2, 0, 0, 0, 0, 4, 3, 1, 3, 3),
    (0, 1, 0, 3, 0, 3, 0, 1, 0, 1, 3, 3, 3, 2, 3, 3, 3, 0, 3, 0, 0, 0, 3, 1, 3, 0, 0, 0, 2, 2, 2, 3, 0, 0, 3, 2, 0, 1, 2, 4, 1, 3, 3, 0, 0, 3, 3, 3, 0, 1, 0, 0, 2, 1, 0, 0, 3, 0, 3, 1, 0, 3, 0, 0, 1, 3, 0, 2, 0, 1, 0, 3, 3, 1, 3, 3, 0, 0, 1, 1, 0, 3, 3),
    (0, 2, 0, 3, 0, 2, 1, 4, 0, 2, 2, 3, 1, 1, 3, 1, 1, 0, 2, 0, 3, 1, 2, 3, 1, 3, 0, 0, 1, 0, 4, 3, 2, 3, 3, 3, 1, 4, 2, 3, 3, 3, 3, 1, 0, 3, 1, 4, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 1, 0, 3, 1, 3, 2, 2, 0, 1, 0, 0, 0, 2, 3, 3, 3, 1, 0, 0, 0, 0, 0, 2, 3),
    (0, 5, 0, 4, 0, 5, 0, 2, 0, 4, 5, 5, 3, 3, 4, 3, 3, 1, 5, 4, 4, 2, 4, 4, 4, 3, 4, 2, 4, 3, 5, 5, 4, 3, 3, 4, 3, 3, 5, 5, 4, 5, 5, 1, 3, 4, 5, 3, 1, 4, 3, 1, 3, 3, 0, 3, 3, 1, 4, 3, 1, 4, 5, 3, 3, 5, 0, 4, 0, 3, 0, 5, 3, 3, 1, 4, 3, 0, 4, 0, 1, 5, 3),
    (0, 5, 0, 5, 0, 4, 0, 2, 0, 4, 4, 3, 4, 3, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4, 4, 5, 3, 3, 5, 2, 4, 4, 4, 3, 4, 4, 3, 3, 4, 4, 5, 5, 3, 3, 4, 3, 4, 3, 3, 4, 3, 3, 3, 3, 1, 2, 2, 1, 4, 3, 3, 5, 4, 4, 3, 4, 0, 4, 0, 3, 0, 4, 4, 4, 4, 4, 1, 0, 4, 2, 0, 2, 4),
    (0, 4, 0, 4, 0, 3, 0, 1, 0, 3, 5, 2, 3, 0, 3, 0, 2, 1, 4, 2, 3, 3, 4, 1, 4, 3, 3, 2, 4, 1, 3, 3, 3, 0, 3, 3, 0, 0, 3, 3, 3, 5, 3, 3, 3, 3, 3, 2, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 1, 0, 0, 3, 1, 2, 2, 3, 0, 3, 0, 2, 0, 4, 4, 3, 3, 4, 1, 0, 3, 0, 0, 2, 4),
    (0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 3, 1, 3, 0, 3, 2, 0, 0, 0, 1, 0, 3, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 2, 0, 0, 0, 0, 0, 0, 2),
    (0, 2, 1, 3, 0, 2, 0, 2, 0, 3, 3, 3, 3, 1, 3, 1, 3, 3, 3, 3, 3, 3, 4, 2, 2, 1, 2, 1, 4, 0, 4, 3, 1, 3, 3, 3, 2, 4, 3, 5, 4, 3, 3, 3, 3, 3, 3, 3, 0, 1, 3, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 4, 2, 0, 2, 3, 0, 3, 3, 0, 3, 3, 4, 2, 3, 1, 4, 0, 1, 2, 0, 2, 3),
    (0, 3, 0, 3, 0, 1, 0, 3, 0, 2, 3, 3, 3, 0, 3, 1, 2, 0, 3, 3, 2, 3, 3, 2, 3, 2, 3, 1, 3, 0, 4, 3, 2, 0, 3, 3, 1, 4, 3, 3, 2, 3, 4, 3, 1, 3, 3, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 4, 1, 1, 0, 3, 0, 3, 1, 0, 2, 3, 3, 3, 3, 3, 1, 0, 0, 2, 0, 3, 3),
    (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 3, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3),
    (0, 2, 0, 3, 1, 3, 0, 3, 0, 2, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 1, 3, 0, 2, 3, 1, 1, 4, 3, 3, 2, 3, 3, 1, 2, 2, 4, 1, 3, 3, 0, 1, 4, 2, 3, 0, 1, 3, 0, 3, 0, 0, 1, 3, 0, 2, 0, 0, 3, 3, 2, 1, 3, 0, 3, 0, 2, 0, 3, 4, 4, 4, 3, 1, 0, 3, 0, 0, 3, 3),
    (0, 2, 0, 1, 0, 2, 0, 0, 0, 1, 3, 2, 2, 1, 3, 0, 1, 1, 3, 0, 3, 2, 3, 1, 2, 0, 2, 0, 1, 1, 3, 3, 3, 0, 3, 3, 1, 1, 2, 3, 2, 3, 3, 1, 2, 3, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 2, 1, 2, 1, 3, 0, 3, 0, 0, 0, 3, 4, 4, 4, 3, 2, 0, 2, 0, 0, 2, 4),
    (0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 3),
    (0, 3, 0, 3, 0, 2, 0, 3, 0, 3, 3, 3, 2, 3, 2, 2, 2, 0, 3, 1, 3, 3, 3, 2, 3, 3, 0, 0, 3, 0, 3, 2, 2, 0, 2, 3, 1, 4, 3, 4, 3, 3, 2, 3, 1, 5, 4, 4, 0, 3, 1, 2, 1, 3, 0, 3, 1, 1, 2, 0, 2, 3, 1, 3, 1, 3, 0, 3, 0, 1, 0, 3, 3, 4, 4, 2, 1, 0, 2, 1, 0, 2, 4),
    (0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 4, 2, 5, 1, 4, 0, 2, 0, 2, 1, 3, 1, 4, 0, 2, 1, 0, 0, 2, 1, 4, 1, 1, 0, 3, 3, 0, 5, 1, 3, 2, 3, 3, 1, 0, 3, 2, 3, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 4, 0, 1, 0, 3, 0, 2, 0, 1, 0, 3, 3, 3, 4, 3, 3, 0, 0, 0, 0, 2, 3),
    (0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 0, 0, 3),
    (0, 1, 0, 3, 0, 4, 0, 3, 0, 2, 4, 3, 1, 0, 3, 2, 2, 1, 3, 1, 2, 2, 3, 1, 1, 1, 2, 1, 3, 0, 1, 2, 0, 1, 3, 2, 1, 3, 0, 5, 5, 1, 0, 0, 1, 3, 2, 1, 0, 3, 0, 0, 1, 0, 0, 0, 0, 0, 3, 4, 0, 1, 1, 1, 3, 2, 0, 2, 0, 1, 0, 2, 3, 3, 1, 2, 3, 0, 1, 0, 1, 0, 4),
    (0, 0, 0, 1, 0, 3, 0, 3, 0, 2, 2, 1, 0, 0, 4, 0, 3, 0, 3, 1, 3, 0, 3, 0, 3, 0, 1, 0, 3, 0, 3, 1, 3, 0, 3, 3, 0, 0, 1, 2, 1, 1, 1, 0, 1, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 0, 0, 2, 0, 0, 0, 0, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 4),
    (0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 3, 1, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 2, 0, 2, 3, 0, 0, 2, 2, 3, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 0, 0, 0, 2, 3),
    (2, 4, 0, 5, 0, 5, 0, 4, 0, 3, 4, 3, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 5, 2, 3, 0, 5, 5, 4, 1, 5, 4, 3, 1, 5, 4, 3, 4, 4, 3, 3, 4, 3, 3, 0, 3, 2, 0, 2, 3, 0, 3, 0, 0, 3, 3, 0, 5, 3, 2, 3, 3, 0, 3, 0, 3, 0, 3, 4, 5, 4, 5, 3, 0, 4, 3, 0, 3, 4),
    (0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 3, 4, 3, 2, 3, 2, 3, 0, 4, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 2, 4, 3, 3, 1, 3, 4, 3, 4, 4, 4, 3, 4, 4, 3, 2, 4, 4, 1, 0, 2, 0, 0, 1, 1, 0, 2, 0, 0, 3, 1, 0, 5, 3, 2, 1, 3, 0, 3, 0, 1, 2, 4, 3, 2, 4, 3, 3, 0, 3, 2, 0, 4, 4),
    (0, 3, 0, 3, 0, 1, 0, 0, 0, 1, 4, 3, 3, 2, 3, 1, 3, 1, 4, 2, 3, 2, 4, 2, 3, 4, 3, 0, 2, 2, 3, 3, 3, 0, 3, 3, 3, 0, 3, 4, 1, 3, 3, 0, 3, 4, 3, 3, 0, 1, 1, 0, 1, 0, 0, 0, 4, 0, 3, 0, 0, 3, 1, 2, 1, 3, 0, 4, 0, 1, 0, 4, 3, 3, 4, 3, 3, 0, 2, 0, 0, 3, 3),
    (0, 3, 0, 4, 0, 1, 0, 3, 0, 3, 4, 3, 3, 0, 3, 3, 3, 1, 3, 1, 3, 3, 4, 3, 3, 3, 0, 0, 3, 1, 5, 3, 3, 1, 3, 3, 2, 5, 4, 3, 3, 4, 5, 3, 2, 5, 3, 4, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 0, 4, 2, 2, 1, 3, 0, 3, 0, 2, 0, 4, 4, 3, 5, 3, 2, 0, 1, 1, 0, 3, 4),
    (0, 5, 0, 4, 0, 5, 0, 2, 0, 4, 4, 3, 3, 2, 3, 3, 3, 1, 4, 3, 4, 1, 5, 3, 4, 3, 4, 0, 4, 2, 4, 3, 4, 1, 5, 4, 0, 4, 4, 4, 4, 5, 4, 1, 3, 5, 4, 2, 1, 4, 1, 1, 3, 2, 0, 3, 1, 0, 3, 2, 1, 4, 3, 3, 3, 4, 0, 4, 0, 3, 0, 4, 4, 4, 3, 3, 3, 0, 4, 2, 0, 3, 4),
    (1, 4, 0, 4, 0, 3, 0, 1, 0, 3, 3, 3, 1, 1, 3, 3, 2, 2, 3, 3, 1, 0, 3, 2, 2, 1, 2, 0, 3, 1, 2, 1, 2, 0, 3, 2, 0, 2, 2, 3, 3, 4, 3, 0, 3, 3, 1, 2, 0, 1, 1, 3, 1, 2, 0, 0, 3, 0, 1, 1, 0, 3, 2, 2, 3, 3, 0, 3, 0, 0, 0, 2, 3, 3, 4, 3, 3, 0, 1, 0, 0, 1, 4),
    (0, 4, 0, 4, 0, 4, 0, 0, 0, 3, 4, 4, 3, 1, 4, 2, 3, 2, 3, 3, 3, 1, 4, 3, 4, 0, 3, 0, 4, 2, 3, 3, 2, 2, 5, 4, 2, 1, 3, 4, 3, 4, 3, 1, 3, 3, 4, 2, 0, 2, 1, 0, 3, 3, 0, 0, 2, 0, 3, 1, 0, 4, 4, 3, 4, 3, 0, 4, 0, 1, 0, 2, 4, 4, 4, 4, 4, 0, 3, 2, 0, 3, 3),
    (0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2),
    (0, 2, 0, 3, 0, 4, 0, 4, 0, 1, 3, 3, 3, 0, 4, 0, 2, 1, 2, 1, 1, 1, 2, 0, 3, 1, 1, 0, 1, 0, 3, 1, 0, 0, 3, 3, 2, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 2, 2, 0, 3, 1, 0, 0, 1, 0, 1, 1, 0, 1, 2, 0, 3, 0, 0, 0, 0, 1, 0, 0, 3, 3, 4, 3, 1, 0, 1, 0, 3, 0, 2),
    (0, 0, 0, 3, 0, 5, 0, 0, 0, 0, 1, 0, 2, 0, 3, 1, 0, 1, 3, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 4, 0, 0, 0, 2, 3, 0, 1, 4, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 3),
    (0, 2, 0, 5, 0, 5, 0, 1, 0, 2, 4, 3, 3, 2, 5, 1, 3, 2, 3, 3, 3, 0, 4, 1, 2, 0, 3, 0, 4, 0, 2, 2, 1, 1, 5, 3, 0, 0, 1, 4, 2, 3, 2, 0, 3, 3, 3, 2, 0, 2, 4, 1, 1, 2, 0, 1, 1, 0, 3, 1, 0, 1, 3, 1, 2, 3, 0, 2, 0, 0, 0, 1, 3, 5, 4, 4, 4, 0, 3, 0, 0, 1, 3),
    (0, 4, 0, 5, 0, 4, 0, 4, 0, 4, 5, 4, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 3, 4, 5, 4, 2, 4, 2, 3, 4, 3, 1, 4, 4, 1, 3, 5, 4, 4, 5, 5, 4, 4, 5, 5, 5, 2, 3, 3, 1, 4, 3, 1, 3, 3, 0, 3, 3, 1, 4, 3, 4, 4, 4, 0, 3, 0, 4, 0, 3, 3, 4, 4, 5, 0, 0, 4, 3, 0, 4, 5),
    (0, 4, 0, 4, 0, 3, 0, 3, 0, 3, 4, 4, 4, 3, 3, 2, 4, 3, 4, 3, 4, 3, 5, 3, 4, 3, 2, 1, 4, 2, 4, 4, 3, 1, 3, 4, 2, 4, 5, 5, 3, 4, 5, 4, 1, 5, 4, 3, 0, 3, 2, 2, 3, 2, 1, 3, 1, 0, 3, 3, 3, 5, 3, 3, 3, 5, 4, 4, 2, 3, 3, 4, 3, 3, 3, 2, 1, 0, 3, 2, 1, 4, 3),
    (0, 4, 0, 5, 0, 4, 0, 3, 0, 3, 5, 5, 3, 2, 4, 3, 4, 0, 5, 4, 4, 1, 4, 4, 4, 3, 3, 3, 4, 3, 5, 5, 2, 3, 3, 4, 1, 2, 5, 5, 3, 5, 5, 2, 3, 5, 5, 4, 0, 3, 2, 0, 3, 3, 1, 1, 5, 1, 4, 1, 0, 4, 3, 2, 3, 5, 0, 4, 0, 3, 0, 5, 4, 3, 4, 3, 0, 0, 4, 1, 0, 4, 4),
    (1, 3, 0, 4, 0, 2, 0, 2, 0, 2, 5, 5, 3, 3, 3, 3, 3, 0, 4, 2, 3, 4, 4, 4, 3, 4, 0, 0, 3, 4, 5, 4, 3, 3, 3, 3, 2, 5, 5, 4, 5, 5, 5, 4, 3, 5, 5, 5, 1, 3, 1, 0, 1, 0, 0, 3, 2, 0, 4, 2, 0, 5, 2, 3, 2, 4, 1, 3, 0, 3, 0, 4, 5, 4, 5, 4, 3, 0, 4, 2, 0, 5, 4),
    (0, 3, 0, 4, 0, 5, 0, 3, 0, 3, 4, 4, 3, 2, 3, 2, 3, 3, 3, 3, 3, 2, 4, 3, 3, 2, 2, 0, 3, 3, 3, 3, 3, 1, 3, 3, 3, 0, 4, 4, 3, 4, 4, 1, 1, 4, 4, 2, 0, 3, 1, 0, 1, 1, 0, 4, 1, 0, 2, 3, 1, 3, 3, 1, 3, 4, 0, 3, 0, 1, 0, 3, 1, 3, 0, 0, 1, 0, 2, 0, 0, 4, 4),
    (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    (0, 3, 0, 3, 0, 2, 0, 3, 0, 1, 5, 4, 3, 3, 3, 1, 4, 2, 1, 2, 3, 4, 4, 2, 4, 4, 5, 0, 3, 1, 4, 3, 4, 0, 4, 3, 3, 3, 2, 3, 2, 5, 3, 4, 3, 2, 2, 3, 0, 0, 3, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 2, 1, 1, 3, 1, 0, 2, 0, 4, 0, 3, 4, 4, 4, 5, 2, 0, 2, 0, 0, 1, 3),
    (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 4, 2, 1, 1, 0, 1, 0, 3, 2, 0, 0, 3, 1, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 4, 0, 4, 2, 1, 0, 0, 0, 0, 0, 1),
    (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 2, 0, 2, 1, 0, 0, 1, 2, 1, 0, 1, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2),
    (0, 4, 0, 4, 0, 4, 0, 3, 0, 4, 4, 3, 4, 2, 4, 3, 2, 0, 4, 4, 4, 3, 5, 3, 5, 3, 3, 2, 4, 2, 4, 3, 4, 3, 1, 4, 0, 2, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 3, 4, 1, 3, 4, 3, 2, 1, 2, 1, 3, 3, 3, 4, 4, 3, 3, 5, 0, 4, 0, 3, 0, 4, 3, 3, 3, 2, 1, 0, 3, 0, 0, 3, 3),
    (0, 4, 0, 3, 0, 3, 0, 3, 0, 3, 5, 5, 3, 3, 3, 3, 4, 3, 4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 3, 5, 3, 3, 1, 3, 2, 4, 5, 5, 5, 5, 4, 3, 4, 5, 5, 3, 2, 2, 3, 3, 3, 3, 2, 3, 3, 1, 2, 3, 2, 4, 3, 3, 3, 4, 0, 4, 0, 2, 0, 4, 3, 2, 2, 1, 2, 0, 3, 0, 0, 4, 1),
)
# fmt: on


class JapaneseContextAnalysis:
    NUM_OF_CATEGORY = 6
    DONT_KNOW = -1
    ENOUGH_REL_THRESHOLD = 100
    MAX_REL_THRESHOLD = 1000
    MINIMUM_DATA_THRESHOLD = 4

    def __init__(self) -> None:
        self._total_rel = 0
        self._rel_sample: List[int] = []
        self._need_to_skip_char_num = 0
        self._last_char_order = -1
        self._done = False
        self.reset()

    def reset(self) -> None:
        self._total_rel = 0  # total sequence received
        # category counters, each integer counts sequence in its category
        self._rel_sample = [0] * self.NUM_OF_CATEGORY
        # if last byte in current buffer is not the last byte of a character,
        # we need to know how many bytes to skip in next buffer
        self._need_to_skip_char_num = 0
        self._last_char_order = -1  # The order of previous char
        # If this flag is set to True, detection is done and conclusion has
        # been made
        self._done = False

    def feed(self, byte_str: Union[bytes, bytearray], num_bytes: int) -> None:
        if self._done:
            return

        # The buffer we got is byte oriented, and a character may span in more than one
        # buffers. In case the last one or two byte in last buffer is not
        # complete, we record how many byte needed to complete that character
        # and skip these bytes here.  We can choose to record those bytes as
        # well and analyse the character once it is complete, but since a
        # character will not make much difference, by simply skipping
        # this character will simply our logic and improve performance.
        i = self._need_to_skip_char_num
        while i < num_bytes:
            order, char_len = self.get_order(byte_str[i : i + 2])
            i += char_len
            if i > num_bytes:
                self._need_to_skip_char_num = i - num_bytes
                self._last_char_order = -1
            else:
                if (order != -1) and (self._last_char_order != -1):
                    self._total_rel += 1
                    if self._total_rel > self.MAX_REL_THRESHOLD:
                        self._done = True
                        break
                    self._rel_sample[
                        jp2_char_context[self._last_char_order][order]
                    ] += 1
                self._last_char_order = order

    def got_enough_data(self) -> bool:
        return self._total_rel > self.ENOUGH_REL_THRESHOLD

    def get_confidence(self) -> float:
        # This is just one way to calculate confidence. It works well for me.
        if self._total_rel > self.MINIMUM_DATA_THRESHOLD:
            return (self._total_rel - self._rel_sample[0]) / self._total_rel
        return self.DONT_KNOW

    def get_order(self, _: Union[bytes, bytearray]) -> Tuple[int, int]:
        return -1, 1


class SJISContextAnalysis(JapaneseContextAnalysis):
    def __init__(self) -> None:
        super().__init__()
        self._charset_name = "SHIFT_JIS"

    @property
    def charset_name(self) -> str:
        return self._charset_name

    def get_order(self, byte_str: Union[bytes, bytearray]) -> Tuple[int, int]:
        if not byte_str:
            return -1, 1
        # find out current char's byte length
        first_char = byte_str[0]
        if (0x81 <= first_char <= 0x9F) or (0xE0 <= first_char <= 0xFC):
            char_len = 2
            if (first_char == 0x87) or (0xFA <= first_char <= 0xFC):
                self._charset_name = "CP932"
        else:
            char_len = 1

        # return its order if it is hiragana
        if len(byte_str) > 1:
            second_char = byte_str[1]
            if (first_char == 202) and (0x9F <= second_char <= 0xF1):
                return second_char - 0x9F, char_len

        return -1, char_len


class EUCJPContextAnalysis(JapaneseContextAnalysis):
    def get_order(self, byte_str: Union[bytes, bytearray]) -> Tuple[int, int]:
        if not byte_str:
            return -1, 1
        # find out current char's byte length
        first_char = byte_str[0]
        if (first_char == 0x8E) or (0xA1 <= first_char <= 0xFE):
            char_len = 2
        elif first_char == 0x8F:
            char_len = 3
        else:
            char_len = 1

        # return its order if it is hiragana
        if len(byte_str) > 1:
            second_char = byte_str[1]
            if (first_char == 0xA4) and (0xA1 <= second_char <= 0xF3):
                return second_char - 0xA1, char_len

        return -1, char_len
python3.12/site-packages/pip/_vendor/chardet/cli/__pycache__/__init__.cpython-312.pyc000064400000000363151732703320024175 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/cli/__init__.py�<module>rs�rpython3.12/site-packages/pip/_vendor/chardet/cli/__pycache__/chardetect.cpython-312.pyc000064400000007722151732703320024552 0ustar00�

R`i����dZddlZddlZddlmZmZmZddlmZddl	m
Z
			ddeeded	e
d
e
deef
d�Zdd
eeeddfd�Zedk(re�yy)a
Script which takes one or more file paths and reports on their detected
encodings

Example::

    % chardetect somefile someotherfile
    somefile: windows-1252 with confidence 0.5
    someotherfile: ascii with confidence 1.0

If no paths are provided, it takes its input from stdin.

�N)�Iterable�List�Optional�)�__version__)�UniversalDetector�lines�name�minimal�should_rename_legacy�returnc��t|��}|D],}t|�}|j|�|js�,n|j	�|j
}|r|dS|dr|�d|d�d|d��S|�d�S)a�
    Return a string describing the probable encoding of a file or
    list of strings.

    :param lines: The lines to get the encoding of.
    :type lines: Iterable of bytes
    :param name: Name of file or collection of lines
    :type name: str
    :param should_rename_legacy:  Should we rename legacy encodings to
                                  their more modern equivalents?
    :type should_rename_legacy:   ``bool``
    )r�encodingz: z with confidence �
confidencez: no result)r�	bytearray�feed�done�close�result)r	r
rr�u�liners       ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/cli/chardetect.py�description_ofrs���$	�/C�D�A�������	���t���6�6����G�G�I�
�X�X�F���j�!�!�
�j����r�&��,�-�->�v�l�?S�>T�U�U��V�;����argvc	�B�tjd��}|jddtjd�dtj
jg��|jdd	d
��|jdd
dd
��|jdddt����|j|�}|jD]c}|j�rtdtj��tt||j|j|j ����ey)z�
    Handles command line arguments and gets things started.

    :param argv: List of arguments, as if specified on the command-line.
                 If None, ``sys.argv[1:]`` is used instead.
    :type argv: list of str
    zATakes one or more file paths and reports their detected encodings)�description�inputz@File whose encoding we would like to determine. (default: stdin)�rb�*)�help�type�nargs�defaultz	--minimalz*Print only the encoding to standard output�
store_true)r!�actionz-lz--legacyz,Rename legacy encodings to more modern ones.z	--version�versionz	%(prog)s )r&r'z�You are running chardetect interactively. Press CTRL-D twice at the start of a blank line to signal the end of your input. If you want help, run chardetect --help
)�file)rrN)�argparse�ArgumentParser�add_argument�FileType�sys�stdin�bufferr�
parse_argsr�isatty�print�stderrrr
r�legacy)r�parser�args�fs    r�mainr8:s���
$�
$�O��F�
����
O�
�
�
�t�
$�����!�!�"�������
9����
�����
;��	������I��;�-�/H������T�"�D�
�Z�Z���8�8�:����Z�Z�
�	���1�6�6�4�<�<�d�k�k�
�	
�r�__main__)r.FF)N)�__doc__r)r-�typingrrr�r�universaldetectorr�bytes�str�boolrr8�__name__�rr�<module>rCs�����
�+�+��1�
��!&�	 ��E�?� �

� �� ��	 �
�c�]� �D2
�x��S�	�"�2
�d�2
�j�z���F�rpython3.12/site-packages/pip/_vendor/chardet/cli/chardetect.py000064400000006252151732703320020206 0ustar00"""
Script which takes one or more file paths and reports on their detected
encodings

Example::

    % chardetect somefile someotherfile
    somefile: windows-1252 with confidence 0.5
    someotherfile: ascii with confidence 1.0

If no paths are provided, it takes its input from stdin.

"""


import argparse
import sys
from typing import Iterable, List, Optional

from .. import __version__
from ..universaldetector import UniversalDetector


def description_of(
    lines: Iterable[bytes],
    name: str = "stdin",
    minimal: bool = False,
    should_rename_legacy: bool = False,
) -> Optional[str]:
    """
    Return a string describing the probable encoding of a file or
    list of strings.

    :param lines: The lines to get the encoding of.
    :type lines: Iterable of bytes
    :param name: Name of file or collection of lines
    :type name: str
    :param should_rename_legacy:  Should we rename legacy encodings to
                                  their more modern equivalents?
    :type should_rename_legacy:   ``bool``
    """
    u = UniversalDetector(should_rename_legacy=should_rename_legacy)
    for line in lines:
        line = bytearray(line)
        u.feed(line)
        # shortcut out of the loop to save reading further - particularly useful if we read a BOM.
        if u.done:
            break
    u.close()
    result = u.result
    if minimal:
        return result["encoding"]
    if result["encoding"]:
        return f'{name}: {result["encoding"]} with confidence {result["confidence"]}'
    return f"{name}: no result"


def main(argv: Optional[List[str]] = None) -> None:
    """
    Handles command line arguments and gets things started.

    :param argv: List of arguments, as if specified on the command-line.
                 If None, ``sys.argv[1:]`` is used instead.
    :type argv: list of str
    """
    # Get command line arguments
    parser = argparse.ArgumentParser(
        description=(
            "Takes one or more file paths and reports their detected encodings"
        )
    )
    parser.add_argument(
        "input",
        help="File whose encoding we would like to determine. (default: stdin)",
        type=argparse.FileType("rb"),
        nargs="*",
        default=[sys.stdin.buffer],
    )
    parser.add_argument(
        "--minimal",
        help="Print only the encoding to standard output",
        action="store_true",
    )
    parser.add_argument(
        "-l",
        "--legacy",
        help="Rename legacy encodings to more modern ones.",
        action="store_true",
    )
    parser.add_argument(
        "--version", action="version", version=f"%(prog)s {__version__}"
    )
    args = parser.parse_args(argv)

    for f in args.input:
        if f.isatty():
            print(
                "You are running chardetect interactively. Press "
                "CTRL-D twice at the start of a blank line to signal the "
                "end of your input. If you want help, run chardetect "
                "--help\n",
                file=sys.stderr,
            )
        print(
            description_of(
                f, f.name, minimal=args.minimal, should_rename_legacy=args.legacy
            )
        )


if __name__ == "__main__":
    main()
python3.12/site-packages/pip/_vendor/chardet/cli/__init__.py000064400000000000151732703320017620 0ustar00python3.12/site-packages/pip/_vendor/chardet/__init__.py000064400000011275151732703320017071 0ustar00######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import List, Union

from .charsetgroupprober import CharSetGroupProber
from .charsetprober import CharSetProber
from .enums import InputState
from .resultdict import ResultDict
from .universaldetector import UniversalDetector
from .version import VERSION, __version__

__all__ = ["UniversalDetector", "detect", "detect_all", "__version__", "VERSION"]


def detect(
    byte_str: Union[bytes, bytearray], should_rename_legacy: bool = False
) -> ResultDict:
    """
    Detect the encoding of the given byte string.

    :param byte_str:     The byte sequence to examine.
    :type byte_str:      ``bytes`` or ``bytearray``
    :param should_rename_legacy:  Should we rename legacy encodings
                                  to their more modern equivalents?
    :type should_rename_legacy:   ``bool``
    """
    if not isinstance(byte_str, bytearray):
        if not isinstance(byte_str, bytes):
            raise TypeError(
                f"Expected object of type bytes or bytearray, got: {type(byte_str)}"
            )
        byte_str = bytearray(byte_str)
    detector = UniversalDetector(should_rename_legacy=should_rename_legacy)
    detector.feed(byte_str)
    return detector.close()


def detect_all(
    byte_str: Union[bytes, bytearray],
    ignore_threshold: bool = False,
    should_rename_legacy: bool = False,
) -> List[ResultDict]:
    """
    Detect all the possible encodings of the given byte string.

    :param byte_str:          The byte sequence to examine.
    :type byte_str:           ``bytes`` or ``bytearray``
    :param ignore_threshold:  Include encodings that are below
                              ``UniversalDetector.MINIMUM_THRESHOLD``
                              in results.
    :type ignore_threshold:   ``bool``
    :param should_rename_legacy:  Should we rename legacy encodings
                                  to their more modern equivalents?
    :type should_rename_legacy:   ``bool``
    """
    if not isinstance(byte_str, bytearray):
        if not isinstance(byte_str, bytes):
            raise TypeError(
                f"Expected object of type bytes or bytearray, got: {type(byte_str)}"
            )
        byte_str = bytearray(byte_str)

    detector = UniversalDetector(should_rename_legacy=should_rename_legacy)
    detector.feed(byte_str)
    detector.close()

    if detector.input_state == InputState.HIGH_BYTE:
        results: List[ResultDict] = []
        probers: List[CharSetProber] = []
        for prober in detector.charset_probers:
            if isinstance(prober, CharSetGroupProber):
                probers.extend(p for p in prober.probers)
            else:
                probers.append(prober)
        for prober in probers:
            if ignore_threshold or prober.get_confidence() > detector.MINIMUM_THRESHOLD:
                charset_name = prober.charset_name or ""
                lower_charset_name = charset_name.lower()
                # Use Windows encoding name instead of ISO-8859 if we saw any
                # extra Windows-specific bytes
                if lower_charset_name.startswith("iso-8859") and detector.has_win_bytes:
                    charset_name = detector.ISO_WIN_MAP.get(
                        lower_charset_name, charset_name
                    )
                # Rename legacy encodings with superset encodings if asked
                if should_rename_legacy:
                    charset_name = detector.LEGACY_MAP.get(
                        charset_name.lower(), charset_name
                    )
                results.append(
                    {
                        "encoding": charset_name,
                        "confidence": prober.get_confidence(),
                        "language": prober.language,
                    }
                )
        if len(results) > 0:
            return sorted(results, key=lambda result: -result["confidence"])

    return [detector.result]
python3.12/site-packages/pip/_vendor/chardet/johabprober.py000064400000003330151732703330017621 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .chardistribution import JOHABDistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import JOHAB_SM_MODEL


class JOHABProber(MultiByteCharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(JOHAB_SM_MODEL)
        self.distribution_analyzer = JOHABDistributionAnalysis()
        self.reset()

    @property
    def charset_name(self) -> str:
        return "Johab"

    @property
    def language(self) -> str:
        return "Korean"
python3.12/site-packages/pip/_vendor/chardet/euckrfreq.py000064400000032376151732703330017327 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Sampling from about 20M text materials include literature and computer technology

# 128  --> 0.79
# 256  --> 0.92
# 512  --> 0.986
# 1024 --> 0.99944
# 2048 --> 0.99999
#
# Idea Distribution Ratio = 0.98653 / (1-0.98653) = 73.24
# Random Distribution Ration = 512 / (2350-512) = 0.279.
#
# Typical Distribution Ratio

EUCKR_TYPICAL_DISTRIBUTION_RATIO = 6.0

EUCKR_TABLE_SIZE = 2352

# Char to FreqOrder table ,
# fmt: off
EUCKR_CHAR_TO_FREQ_ORDER = (
  13, 130, 120,1396, 481,1719,1720, 328, 609, 212,1721, 707, 400, 299,1722,  87,
1397,1723, 104, 536,1117,1203,1724,1267, 685,1268, 508,1725,1726,1727,1728,1398,
1399,1729,1730,1731, 141, 621, 326,1057, 368,1732, 267, 488,  20,1733,1269,1734,
 945,1400,1735,  47, 904,1270,1736,1737, 773, 248,1738, 409, 313, 786, 429,1739,
 116, 987, 813,1401, 683,  75,1204, 145,1740,1741,1742,1743,  16, 847, 667, 622,
 708,1744,1745,1746, 966, 787, 304, 129,1747,  60, 820, 123, 676,1748,1749,1750,
1751, 617,1752, 626,1753,1754,1755,1756, 653,1757,1758,1759,1760,1761,1762, 856,
 344,1763,1764,1765,1766,  89, 401, 418, 806, 905, 848,1767,1768,1769, 946,1205,
 709,1770,1118,1771, 241,1772,1773,1774,1271,1775, 569,1776, 999,1777,1778,1779,
1780, 337, 751,1058,  28, 628, 254,1781, 177, 906, 270, 349, 891,1079,1782,  19,
1783, 379,1784, 315,1785, 629, 754,1402, 559,1786, 636, 203,1206,1787, 710, 567,
1788, 935, 814,1789,1790,1207, 766, 528,1791,1792,1208,1793,1794,1795,1796,1797,
1403,1798,1799, 533,1059,1404,1405,1156,1406, 936, 884,1080,1800, 351,1801,1802,
1803,1804,1805, 801,1806,1807,1808,1119,1809,1157, 714, 474,1407,1810, 298, 899,
 885,1811,1120, 802,1158,1812, 892,1813,1814,1408, 659,1815,1816,1121,1817,1818,
1819,1820,1821,1822, 319,1823, 594, 545,1824, 815, 937,1209,1825,1826, 573,1409,
1022,1827,1210,1828,1829,1830,1831,1832,1833, 556, 722, 807,1122,1060,1834, 697,
1835, 900, 557, 715,1836,1410, 540,1411, 752,1159, 294, 597,1211, 976, 803, 770,
1412,1837,1838,  39, 794,1413, 358,1839, 371, 925,1840, 453, 661, 788, 531, 723,
 544,1023,1081, 869,  91,1841, 392, 430, 790, 602,1414, 677,1082, 457,1415,1416,
1842,1843, 475, 327,1024,1417, 795, 121,1844, 733, 403,1418,1845,1846,1847, 300,
 119, 711,1212, 627,1848,1272, 207,1849,1850, 796,1213, 382,1851, 519,1852,1083,
 893,1853,1854,1855, 367, 809, 487, 671,1856, 663,1857,1858, 956, 471, 306, 857,
1859,1860,1160,1084,1861,1862,1863,1864,1865,1061,1866,1867,1868,1869,1870,1871,
 282,  96, 574,1872, 502,1085,1873,1214,1874, 907,1875,1876, 827, 977,1419,1420,
1421, 268,1877,1422,1878,1879,1880, 308,1881,   2, 537,1882,1883,1215,1884,1885,
 127, 791,1886,1273,1423,1887,  34, 336, 404, 643,1888, 571, 654, 894, 840,1889,
   0, 886,1274, 122, 575, 260, 908, 938,1890,1275, 410, 316,1891,1892, 100,1893,
1894,1123,  48,1161,1124,1025,1895, 633, 901,1276,1896,1897, 115, 816,1898, 317,
1899, 694,1900, 909, 734,1424, 572, 866,1425, 691,  85, 524,1010, 543, 394, 841,
1901,1902,1903,1026,1904,1905,1906,1907,1908,1909,  30, 451, 651, 988, 310,1910,
1911,1426, 810,1216,  93,1912,1913,1277,1217,1914, 858, 759,  45,  58, 181, 610,
 269,1915,1916, 131,1062, 551, 443,1000, 821,1427, 957, 895,1086,1917,1918, 375,
1919, 359,1920, 687,1921, 822,1922, 293,1923,1924,  40, 662, 118, 692,  29, 939,
 887, 640, 482, 174,1925,  69,1162, 728,1428, 910,1926,1278,1218,1279, 386, 870,
 217, 854,1163, 823,1927,1928,1929,1930, 834,1931,  78,1932, 859,1933,1063,1934,
1935,1936,1937, 438,1164, 208, 595,1938,1939,1940,1941,1219,1125,1942, 280, 888,
1429,1430,1220,1431,1943,1944,1945,1946,1947,1280, 150, 510,1432,1948,1949,1950,
1951,1952,1953,1954,1011,1087,1955,1433,1043,1956, 881,1957, 614, 958,1064,1065,
1221,1958, 638,1001, 860, 967, 896,1434, 989, 492, 553,1281,1165,1959,1282,1002,
1283,1222,1960,1961,1962,1963,  36, 383, 228, 753, 247, 454,1964, 876, 678,1965,
1966,1284, 126, 464, 490, 835, 136, 672, 529, 940,1088,1435, 473,1967,1968, 467,
  50, 390, 227, 587, 279, 378, 598, 792, 968, 240, 151, 160, 849, 882,1126,1285,
 639,1044, 133, 140, 288, 360, 811, 563,1027, 561, 142, 523,1969,1970,1971,   7,
 103, 296, 439, 407, 506, 634, 990,1972,1973,1974,1975, 645,1976,1977,1978,1979,
1980,1981, 236,1982,1436,1983,1984,1089, 192, 828, 618, 518,1166, 333,1127,1985,
 818,1223,1986,1987,1988,1989,1990,1991,1992,1993, 342,1128,1286, 746, 842,1994,
1995, 560, 223,1287,  98,   8, 189, 650, 978,1288,1996,1437,1997,  17, 345, 250,
 423, 277, 234, 512, 226,  97, 289,  42, 167,1998, 201,1999,2000, 843, 836, 824,
 532, 338, 783,1090, 182, 576, 436,1438,1439, 527, 500,2001, 947, 889,2002,2003,
2004,2005, 262, 600, 314, 447,2006, 547,2007, 693, 738,1129,2008,  71,1440, 745,
 619, 688,2009, 829,2010,2011, 147,2012,  33, 948,2013,2014,  74, 224,2015,  61,
 191, 918, 399, 637,2016,1028,1130, 257, 902,2017,2018,2019,2020,2021,2022,2023,
2024,2025,2026, 837,2027,2028,2029,2030, 179, 874, 591,  52, 724, 246,2031,2032,
2033,2034,1167, 969,2035,1289, 630, 605, 911,1091,1168,2036,2037,2038,1441, 912,
2039, 623,2040,2041, 253,1169,1290,2042,1442, 146, 620, 611, 577, 433,2043,1224,
 719,1170, 959, 440, 437, 534,  84, 388, 480,1131, 159, 220, 198, 679,2044,1012,
 819,1066,1443, 113,1225, 194, 318,1003,1029,2045,2046,2047,2048,1067,2049,2050,
2051,2052,2053,  59, 913, 112,2054, 632,2055, 455, 144, 739,1291,2056, 273, 681,
 499,2057, 448,2058,2059, 760,2060,2061, 970, 384, 169, 245,1132,2062,2063, 414,
1444,2064,2065,  41, 235,2066, 157, 252, 877, 568, 919, 789, 580,2067, 725,2068,
2069,1292,2070,2071,1445,2072,1446,2073,2074,  55, 588,  66,1447, 271,1092,2075,
1226,2076, 960,1013, 372,2077,2078,2079,2080,2081,1293,2082,2083,2084,2085, 850,
2086,2087,2088,2089,2090, 186,2091,1068, 180,2092,2093,2094, 109,1227, 522, 606,
2095, 867,1448,1093, 991,1171, 926, 353,1133,2096, 581,2097,2098,2099,1294,1449,
1450,2100, 596,1172,1014,1228,2101,1451,1295,1173,1229,2102,2103,1296,1134,1452,
 949,1135,2104,2105,1094,1453,1454,1455,2106,1095,2107,2108,2109,2110,2111,2112,
2113,2114,2115,2116,2117, 804,2118,2119,1230,1231, 805,1456, 405,1136,2120,2121,
2122,2123,2124, 720, 701,1297, 992,1457, 927,1004,2125,2126,2127,2128,2129,2130,
  22, 417,2131, 303,2132, 385,2133, 971, 520, 513,2134,1174,  73,1096, 231, 274,
 962,1458, 673,2135,1459,2136, 152,1137,2137,2138,2139,2140,1005,1138,1460,1139,
2141,2142,2143,2144,  11, 374, 844,2145, 154,1232,  46,1461,2146, 838, 830, 721,
1233, 106,2147,  90, 428, 462, 578, 566,1175, 352,2148,2149, 538,1234, 124,1298,
2150,1462, 761, 565,2151, 686,2152, 649,2153,  72, 173,2154, 460, 415,2155,1463,
2156,1235, 305,2157,2158,2159,2160,2161,2162, 579,2163,2164,2165,2166,2167, 747,
2168,2169,2170,2171,1464, 669,2172,2173,2174,2175,2176,1465,2177,  23, 530, 285,
2178, 335, 729,2179, 397,2180,2181,2182,1030,2183,2184, 698,2185,2186, 325,2187,
2188, 369,2189, 799,1097,1015, 348,2190,1069, 680,2191, 851,1466,2192,2193,  10,
2194, 613, 424,2195, 979, 108, 449, 589,  27, 172,  81,1031,  80, 774, 281, 350,
1032, 525, 301, 582,1176,2196, 674,1045,2197,2198,1467, 730, 762,2199,2200,2201,
2202,1468,2203, 993,2204,2205, 266,1070, 963,1140,2206,2207,2208, 664,1098, 972,
2209,2210,2211,1177,1469,1470, 871,2212,2213,2214,2215,2216,1471,2217,2218,2219,
2220,2221,2222,2223,2224,2225,2226,2227,1472,1236,2228,2229,2230,2231,2232,2233,
2234,2235,1299,2236,2237, 200,2238, 477, 373,2239,2240, 731, 825, 777,2241,2242,
2243, 521, 486, 548,2244,2245,2246,1473,1300,  53, 549, 137, 875,  76, 158,2247,
1301,1474, 469, 396,1016, 278, 712,2248, 321, 442, 503, 767, 744, 941,1237,1178,
1475,2249,  82, 178,1141,1179, 973,2250,1302,2251, 297,2252,2253, 570,2254,2255,
2256,  18, 450, 206,2257, 290, 292,1142,2258, 511, 162,  99, 346, 164, 735,2259,
1476,1477,   4, 554, 343, 798,1099,2260,1100,2261,  43, 171,1303, 139, 215,2262,
2263, 717, 775,2264,1033, 322, 216,2265, 831,2266, 149,2267,1304,2268,2269, 702,
1238, 135, 845, 347, 309,2270, 484,2271, 878, 655, 238,1006,1478,2272,  67,2273,
 295,2274,2275, 461,2276, 478, 942, 412,2277,1034,2278,2279,2280, 265,2281, 541,
2282,2283,2284,2285,2286,  70, 852,1071,2287,2288,2289,2290,  21,  56, 509, 117,
 432,2291,2292, 331, 980, 552,1101, 148, 284, 105, 393,1180,1239, 755,2293, 187,
2294,1046,1479,2295, 340,2296,  63,1047, 230,2297,2298,1305, 763,1306, 101, 800,
 808, 494,2299,2300,2301, 903,2302,  37,1072,  14,   5,2303,  79, 675,2304, 312,
2305,2306,2307,2308,2309,1480,   6,1307,2310,2311,2312,   1, 470,  35,  24, 229,
2313, 695, 210,  86, 778,  15, 784, 592, 779,  32,  77, 855, 964,2314, 259,2315,
 501, 380,2316,2317,  83, 981, 153, 689,1308,1481,1482,1483,2318,2319, 716,1484,
2320,2321,2322,2323,2324,2325,1485,2326,2327, 128,  57,  68, 261,1048, 211, 170,
1240,  31,2328,  51, 435, 742,2329,2330,2331, 635,2332, 264, 456,2333,2334,2335,
 425,2336,1486, 143, 507, 263, 943,2337, 363, 920,1487, 256,1488,1102, 243, 601,
1489,2338,2339,2340,2341,2342,2343,2344, 861,2345,2346,2347,2348,2349,2350, 395,
2351,1490,1491,  62, 535, 166, 225,2352,2353, 668, 419,1241, 138, 604, 928,2354,
1181,2355,1492,1493,2356,2357,2358,1143,2359, 696,2360, 387, 307,1309, 682, 476,
2361,2362, 332,  12, 222, 156,2363, 232,2364, 641, 276, 656, 517,1494,1495,1035,
 416, 736,1496,2365,1017, 586,2366,2367,2368,1497,2369, 242,2370,2371,2372,1498,
2373, 965, 713,2374,2375,2376,2377, 740, 982,1499, 944,1500,1007,2378,2379,1310,
1501,2380,2381,2382, 785, 329,2383,2384,1502,2385,2386,2387, 932,2388,1503,2389,
2390,2391,2392,1242,2393,2394,2395,2396,2397, 994, 950,2398,2399,2400,2401,1504,
1311,2402,2403,2404,2405,1049, 749,2406,2407, 853, 718,1144,1312,2408,1182,1505,
2409,2410, 255, 516, 479, 564, 550, 214,1506,1507,1313, 413, 239, 444, 339,1145,
1036,1508,1509,1314,1037,1510,1315,2411,1511,2412,2413,2414, 176, 703, 497, 624,
 593, 921, 302,2415, 341, 165,1103,1512,2416,1513,2417,2418,2419, 376,2420, 700,
2421,2422,2423, 258, 768,1316,2424,1183,2425, 995, 608,2426,2427,2428,2429, 221,
2430,2431,2432,2433,2434,2435,2436,2437, 195, 323, 726, 188, 897, 983,1317, 377,
 644,1050, 879,2438, 452,2439,2440,2441,2442,2443,2444, 914,2445,2446,2447,2448,
 915, 489,2449,1514,1184,2450,2451, 515,  64, 427, 495,2452, 583,2453, 483, 485,
1038, 562, 213,1515, 748, 666,2454,2455,2456,2457, 334,2458, 780, 996,1008, 705,
1243,2459,2460,2461,2462,2463, 114,2464, 493,1146, 366, 163,1516, 961,1104,2465,
 291,2466,1318,1105,2467,1517, 365,2468, 355, 951,1244,2469,1319,2470, 631,2471,
2472, 218,1320, 364, 320, 756,1518,1519,1321,1520,1322,2473,2474,2475,2476, 997,
2477,2478,2479,2480, 665,1185,2481, 916,1521,2482,2483,2484, 584, 684,2485,2486,
 797,2487,1051,1186,2488,2489,2490,1522,2491,2492, 370,2493,1039,1187,  65,2494,
 434, 205, 463,1188,2495, 125, 812, 391, 402, 826, 699, 286, 398, 155, 781, 771,
 585,2496, 590, 505,1073,2497, 599, 244, 219, 917,1018, 952, 646,1523,2498,1323,
2499,2500,  49, 984, 354, 741,2501, 625,2502,1324,2503,1019, 190, 357, 757, 491,
  95, 782, 868,2504,2505,2506,2507,2508,2509, 134,1524,1074, 422,1525, 898,2510,
 161,2511,2512,2513,2514, 769,2515,1526,2516,2517, 411,1325,2518, 472,1527,2519,
2520,2521,2522,2523,2524, 985,2525,2526,2527,2528,2529,2530, 764,2531,1245,2532,
2533,  25, 204, 311,2534, 496,2535,1052,2536,2537,2538,2539,2540,2541,2542, 199,
 704, 504, 468, 758, 657,1528, 196,  44, 839,1246, 272, 750,2543, 765, 862,2544,
2545,1326,2546, 132, 615, 933,2547, 732,2548,2549,2550,1189,1529,2551, 283,1247,
1053, 607, 929,2552,2553,2554, 930, 183, 872, 616,1040,1147,2555,1148,1020, 441,
 249,1075,2556,2557,2558, 466, 743,2559,2560,2561,  92, 514, 426, 420, 526,2562,
2563,2564,2565,2566,2567,2568, 185,2569,2570,2571,2572, 776,1530, 658,2573, 362,
2574, 361, 922,1076, 793,2575,2576,2577,2578,2579,2580,1531, 251,2581,2582,2583,
2584,1532,  54, 612, 237,1327,2585,2586, 275, 408, 647, 111,2587,1533,1106, 465,
   3, 458,   9,  38,2588, 107, 110, 890, 209,  26, 737, 498,2589,1534,2590, 431,
 202,  88,1535, 356, 287,1107, 660,1149,2591, 381,1536, 986,1150, 445,1248,1151,
 974,2592,2593, 846,2594, 446, 953, 184,1249,1250, 727,2595, 923, 193, 883,2596,
2597,2598, 102, 324, 539, 817,2599, 421,1041,2600, 832,2601,  94, 175, 197, 406,
2602, 459,2603,2604,2605,2606,2607, 330, 555,2608,2609,2610, 706,1108, 389,2611,
2612,2613,2614, 233,2615, 833, 558, 931, 954,1251,2616,2617,1537, 546,2618,2619,
1009,2620,2621,2622,1538, 690,1328,2623, 955,2624,1539,2625,2626, 772,2627,2628,
2629,2630,2631, 924, 648, 863, 603,2632,2633, 934,1540, 864, 865,2634, 642,1042,
 670,1190,2635,2636,2637,2638, 168,2639, 652, 873, 542,1054,1541,2640,2641,2642,  # 512, 256
)
# fmt: on
python3.12/site-packages/pip/_vendor/chardet/escsm.py000064400000027620151732703330016446 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License,  or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not,  write to the Free Software
# Foundation,  Inc.,  51 Franklin St,  Fifth Floor,  Boston,  MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .codingstatemachinedict import CodingStateMachineDict
from .enums import MachineState

# fmt: off
HZ_CLS = (
    1, 0, 0, 0, 0, 0, 0, 0,  # 00 - 07
    0, 0, 0, 0, 0, 0, 0, 0,  # 08 - 0f
    0, 0, 0, 0, 0, 0, 0, 0,  # 10 - 17
    0, 0, 0, 1, 0, 0, 0, 0,  # 18 - 1f
    0, 0, 0, 0, 0, 0, 0, 0,  # 20 - 27
    0, 0, 0, 0, 0, 0, 0, 0,  # 28 - 2f
    0, 0, 0, 0, 0, 0, 0, 0,  # 30 - 37
    0, 0, 0, 0, 0, 0, 0, 0,  # 38 - 3f
    0, 0, 0, 0, 0, 0, 0, 0,  # 40 - 47
    0, 0, 0, 0, 0, 0, 0, 0,  # 48 - 4f
    0, 0, 0, 0, 0, 0, 0, 0,  # 50 - 57
    0, 0, 0, 0, 0, 0, 0, 0,  # 58 - 5f
    0, 0, 0, 0, 0, 0, 0, 0,  # 60 - 67
    0, 0, 0, 0, 0, 0, 0, 0,  # 68 - 6f
    0, 0, 0, 0, 0, 0, 0, 0,  # 70 - 77
    0, 0, 0, 4, 0, 5, 2, 0,  # 78 - 7f
    1, 1, 1, 1, 1, 1, 1, 1,  # 80 - 87
    1, 1, 1, 1, 1, 1, 1, 1,  # 88 - 8f
    1, 1, 1, 1, 1, 1, 1, 1,  # 90 - 97
    1, 1, 1, 1, 1, 1, 1, 1,  # 98 - 9f
    1, 1, 1, 1, 1, 1, 1, 1,  # a0 - a7
    1, 1, 1, 1, 1, 1, 1, 1,  # a8 - af
    1, 1, 1, 1, 1, 1, 1, 1,  # b0 - b7
    1, 1, 1, 1, 1, 1, 1, 1,  # b8 - bf
    1, 1, 1, 1, 1, 1, 1, 1,  # c0 - c7
    1, 1, 1, 1, 1, 1, 1, 1,  # c8 - cf
    1, 1, 1, 1, 1, 1, 1, 1,  # d0 - d7
    1, 1, 1, 1, 1, 1, 1, 1,  # d8 - df
    1, 1, 1, 1, 1, 1, 1, 1,  # e0 - e7
    1, 1, 1, 1, 1, 1, 1, 1,  # e8 - ef
    1, 1, 1, 1, 1, 1, 1, 1,  # f0 - f7
    1, 1, 1, 1, 1, 1, 1, 1,  # f8 - ff
)

HZ_ST = (
MachineState.START, MachineState.ERROR,      3, MachineState.START, MachineState.START, MachineState.START, MachineState.ERROR, MachineState.ERROR, # 00-07
MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, # 08-0f
MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.START, MachineState.START,      4, MachineState.ERROR, # 10-17
     5, MachineState.ERROR,      6, MachineState.ERROR,      5,      5,      4, MachineState.ERROR, # 18-1f
     4, MachineState.ERROR,      4,      4,      4, MachineState.ERROR,      4, MachineState.ERROR, # 20-27
     4, MachineState.ITS_ME, MachineState.START, MachineState.START, MachineState.START, MachineState.START, MachineState.START, MachineState.START, # 28-2f
)
# fmt: on

HZ_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0)

HZ_SM_MODEL: CodingStateMachineDict = {
    "class_table": HZ_CLS,
    "class_factor": 6,
    "state_table": HZ_ST,
    "char_len_table": HZ_CHAR_LEN_TABLE,
    "name": "HZ-GB-2312",
    "language": "Chinese",
}

# fmt: off
ISO2022CN_CLS = (
    2, 0, 0, 0, 0, 0, 0, 0,  # 00 - 07
    0, 0, 0, 0, 0, 0, 0, 0,  # 08 - 0f
    0, 0, 0, 0, 0, 0, 0, 0,  # 10 - 17
    0, 0, 0, 1, 0, 0, 0, 0,  # 18 - 1f
    0, 0, 0, 0, 0, 0, 0, 0,  # 20 - 27
    0, 3, 0, 0, 0, 0, 0, 0,  # 28 - 2f
    0, 0, 0, 0, 0, 0, 0, 0,  # 30 - 37
    0, 0, 0, 0, 0, 0, 0, 0,  # 38 - 3f
    0, 0, 0, 4, 0, 0, 0, 0,  # 40 - 47
    0, 0, 0, 0, 0, 0, 0, 0,  # 48 - 4f
    0, 0, 0, 0, 0, 0, 0, 0,  # 50 - 57
    0, 0, 0, 0, 0, 0, 0, 0,  # 58 - 5f
    0, 0, 0, 0, 0, 0, 0, 0,  # 60 - 67
    0, 0, 0, 0, 0, 0, 0, 0,  # 68 - 6f
    0, 0, 0, 0, 0, 0, 0, 0,  # 70 - 77
    0, 0, 0, 0, 0, 0, 0, 0,  # 78 - 7f
    2, 2, 2, 2, 2, 2, 2, 2,  # 80 - 87
    2, 2, 2, 2, 2, 2, 2, 2,  # 88 - 8f
    2, 2, 2, 2, 2, 2, 2, 2,  # 90 - 97
    2, 2, 2, 2, 2, 2, 2, 2,  # 98 - 9f
    2, 2, 2, 2, 2, 2, 2, 2,  # a0 - a7
    2, 2, 2, 2, 2, 2, 2, 2,  # a8 - af
    2, 2, 2, 2, 2, 2, 2, 2,  # b0 - b7
    2, 2, 2, 2, 2, 2, 2, 2,  # b8 - bf
    2, 2, 2, 2, 2, 2, 2, 2,  # c0 - c7
    2, 2, 2, 2, 2, 2, 2, 2,  # c8 - cf
    2, 2, 2, 2, 2, 2, 2, 2,  # d0 - d7
    2, 2, 2, 2, 2, 2, 2, 2,  # d8 - df
    2, 2, 2, 2, 2, 2, 2, 2,  # e0 - e7
    2, 2, 2, 2, 2, 2, 2, 2,  # e8 - ef
    2, 2, 2, 2, 2, 2, 2, 2,  # f0 - f7
    2, 2, 2, 2, 2, 2, 2, 2,  # f8 - ff
)

ISO2022CN_ST = (
    MachineState.START,      3, MachineState.ERROR, MachineState.START, MachineState.START, MachineState.START, MachineState.START, MachineState.START, # 00-07
    MachineState.START, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 08-0f
    MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, # 10-17
    MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR,      4, MachineState.ERROR, # 18-1f
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 20-27
        5,      6, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 28-2f
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 30-37
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.START, # 38-3f
)
# fmt: on

ISO2022CN_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0, 0, 0, 0)

ISO2022CN_SM_MODEL: CodingStateMachineDict = {
    "class_table": ISO2022CN_CLS,
    "class_factor": 9,
    "state_table": ISO2022CN_ST,
    "char_len_table": ISO2022CN_CHAR_LEN_TABLE,
    "name": "ISO-2022-CN",
    "language": "Chinese",
}

# fmt: off
ISO2022JP_CLS = (
    2, 0, 0, 0, 0, 0, 0, 0,  # 00 - 07
    0, 0, 0, 0, 0, 0, 2, 2,  # 08 - 0f
    0, 0, 0, 0, 0, 0, 0, 0,  # 10 - 17
    0, 0, 0, 1, 0, 0, 0, 0,  # 18 - 1f
    0, 0, 0, 0, 7, 0, 0, 0,  # 20 - 27
    3, 0, 0, 0, 0, 0, 0, 0,  # 28 - 2f
    0, 0, 0, 0, 0, 0, 0, 0,  # 30 - 37
    0, 0, 0, 0, 0, 0, 0, 0,  # 38 - 3f
    6, 0, 4, 0, 8, 0, 0, 0,  # 40 - 47
    0, 9, 5, 0, 0, 0, 0, 0,  # 48 - 4f
    0, 0, 0, 0, 0, 0, 0, 0,  # 50 - 57
    0, 0, 0, 0, 0, 0, 0, 0,  # 58 - 5f
    0, 0, 0, 0, 0, 0, 0, 0,  # 60 - 67
    0, 0, 0, 0, 0, 0, 0, 0,  # 68 - 6f
    0, 0, 0, 0, 0, 0, 0, 0,  # 70 - 77
    0, 0, 0, 0, 0, 0, 0, 0,  # 78 - 7f
    2, 2, 2, 2, 2, 2, 2, 2,  # 80 - 87
    2, 2, 2, 2, 2, 2, 2, 2,  # 88 - 8f
    2, 2, 2, 2, 2, 2, 2, 2,  # 90 - 97
    2, 2, 2, 2, 2, 2, 2, 2,  # 98 - 9f
    2, 2, 2, 2, 2, 2, 2, 2,  # a0 - a7
    2, 2, 2, 2, 2, 2, 2, 2,  # a8 - af
    2, 2, 2, 2, 2, 2, 2, 2,  # b0 - b7
    2, 2, 2, 2, 2, 2, 2, 2,  # b8 - bf
    2, 2, 2, 2, 2, 2, 2, 2,  # c0 - c7
    2, 2, 2, 2, 2, 2, 2, 2,  # c8 - cf
    2, 2, 2, 2, 2, 2, 2, 2,  # d0 - d7
    2, 2, 2, 2, 2, 2, 2, 2,  # d8 - df
    2, 2, 2, 2, 2, 2, 2, 2,  # e0 - e7
    2, 2, 2, 2, 2, 2, 2, 2,  # e8 - ef
    2, 2, 2, 2, 2, 2, 2, 2,  # f0 - f7
    2, 2, 2, 2, 2, 2, 2, 2,  # f8 - ff
)

ISO2022JP_ST = (
    MachineState.START,      3, MachineState.ERROR, MachineState.START, MachineState.START, MachineState.START, MachineState.START, MachineState.START, # 00-07
    MachineState.START, MachineState.START, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 08-0f
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, # 10-17
    MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, # 18-1f
    MachineState.ERROR,      5, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR,      4, MachineState.ERROR, MachineState.ERROR, # 20-27
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR,      6, MachineState.ITS_ME, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, # 28-2f
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, # 30-37
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 38-3f
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.START, MachineState.START, # 40-47
)
# fmt: on

ISO2022JP_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

ISO2022JP_SM_MODEL: CodingStateMachineDict = {
    "class_table": ISO2022JP_CLS,
    "class_factor": 10,
    "state_table": ISO2022JP_ST,
    "char_len_table": ISO2022JP_CHAR_LEN_TABLE,
    "name": "ISO-2022-JP",
    "language": "Japanese",
}

# fmt: off
ISO2022KR_CLS = (
    2, 0, 0, 0, 0, 0, 0, 0,  # 00 - 07
    0, 0, 0, 0, 0, 0, 0, 0,  # 08 - 0f
    0, 0, 0, 0, 0, 0, 0, 0,  # 10 - 17
    0, 0, 0, 1, 0, 0, 0, 0,  # 18 - 1f
    0, 0, 0, 0, 3, 0, 0, 0,  # 20 - 27
    0, 4, 0, 0, 0, 0, 0, 0,  # 28 - 2f
    0, 0, 0, 0, 0, 0, 0, 0,  # 30 - 37
    0, 0, 0, 0, 0, 0, 0, 0,  # 38 - 3f
    0, 0, 0, 5, 0, 0, 0, 0,  # 40 - 47
    0, 0, 0, 0, 0, 0, 0, 0,  # 48 - 4f
    0, 0, 0, 0, 0, 0, 0, 0,  # 50 - 57
    0, 0, 0, 0, 0, 0, 0, 0,  # 58 - 5f
    0, 0, 0, 0, 0, 0, 0, 0,  # 60 - 67
    0, 0, 0, 0, 0, 0, 0, 0,  # 68 - 6f
    0, 0, 0, 0, 0, 0, 0, 0,  # 70 - 77
    0, 0, 0, 0, 0, 0, 0, 0,  # 78 - 7f
    2, 2, 2, 2, 2, 2, 2, 2,  # 80 - 87
    2, 2, 2, 2, 2, 2, 2, 2,  # 88 - 8f
    2, 2, 2, 2, 2, 2, 2, 2,  # 90 - 97
    2, 2, 2, 2, 2, 2, 2, 2,  # 98 - 9f
    2, 2, 2, 2, 2, 2, 2, 2,  # a0 - a7
    2, 2, 2, 2, 2, 2, 2, 2,  # a8 - af
    2, 2, 2, 2, 2, 2, 2, 2,  # b0 - b7
    2, 2, 2, 2, 2, 2, 2, 2,  # b8 - bf
    2, 2, 2, 2, 2, 2, 2, 2,  # c0 - c7
    2, 2, 2, 2, 2, 2, 2, 2,  # c8 - cf
    2, 2, 2, 2, 2, 2, 2, 2,  # d0 - d7
    2, 2, 2, 2, 2, 2, 2, 2,  # d8 - df
    2, 2, 2, 2, 2, 2, 2, 2,  # e0 - e7
    2, 2, 2, 2, 2, 2, 2, 2,  # e8 - ef
    2, 2, 2, 2, 2, 2, 2, 2,  # f0 - f7
    2, 2, 2, 2, 2, 2, 2, 2,  # f8 - ff
)

ISO2022KR_ST = (
    MachineState.START,      3, MachineState.ERROR, MachineState.START, MachineState.START, MachineState.START, MachineState.ERROR, MachineState.ERROR, # 00-07
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, # 08-0f
    MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR,      4, MachineState.ERROR, MachineState.ERROR, # 10-17
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR,      5, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 18-1f
    MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.START, MachineState.START, MachineState.START, MachineState.START, # 20-27
)
# fmt: on

ISO2022KR_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0)

ISO2022KR_SM_MODEL: CodingStateMachineDict = {
    "class_table": ISO2022KR_CLS,
    "class_factor": 6,
    "state_table": ISO2022KR_ST,
    "char_len_table": ISO2022KR_CHAR_LEN_TABLE,
    "name": "ISO-2022-KR",
    "language": "Korean",
}
python3.12/site-packages/pip/_vendor/chardet/langbulgarianmodel.py000064400000314162151732703330021163 0ustar00from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel

# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative

BULGARIAN_LANG_MODEL = {
    63: {  # 'e'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 1,  # 'б'
        9: 1,  # 'в'
        20: 1,  # 'г'
        11: 1,  # 'д'
        3: 1,  # 'е'
        23: 1,  # 'ж'
        15: 1,  # 'з'
        2: 0,  # 'и'
        26: 1,  # 'й'
        12: 1,  # 'к'
        10: 1,  # 'л'
        14: 1,  # 'м'
        6: 1,  # 'н'
        4: 1,  # 'о'
        13: 1,  # 'п'
        7: 1,  # 'р'
        8: 1,  # 'с'
        5: 1,  # 'т'
        19: 0,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    45: {  # '\xad'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 0,  # 'Г'
        37: 1,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 0,  # 'Л'
        38: 1,  # 'М'
        36: 0,  # 'Н'
        41: 1,  # 'О'
        30: 1,  # 'П'
        39: 1,  # 'Р'
        28: 1,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 1,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 0,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 0,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 0,  # 'о'
        13: 0,  # 'п'
        7: 0,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 0,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    31: {  # 'А'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 1,  # 'А'
        32: 1,  # 'Б'
        35: 2,  # 'В'
        43: 1,  # 'Г'
        37: 2,  # 'Д'
        44: 2,  # 'Е'
        55: 1,  # 'Ж'
        47: 2,  # 'З'
        40: 1,  # 'И'
        59: 1,  # 'Й'
        33: 1,  # 'К'
        46: 2,  # 'Л'
        38: 1,  # 'М'
        36: 2,  # 'Н'
        41: 1,  # 'О'
        30: 2,  # 'П'
        39: 2,  # 'Р'
        28: 2,  # 'С'
        34: 2,  # 'Т'
        51: 1,  # 'У'
        48: 2,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 1,  # 'Ш'
        57: 2,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 1,  # 'Я'
        1: 1,  # 'а'
        18: 2,  # 'б'
        9: 2,  # 'в'
        20: 2,  # 'г'
        11: 2,  # 'д'
        3: 1,  # 'е'
        23: 1,  # 'ж'
        15: 2,  # 'з'
        2: 0,  # 'и'
        26: 2,  # 'й'
        12: 2,  # 'к'
        10: 3,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 0,  # 'о'
        13: 2,  # 'п'
        7: 2,  # 'р'
        8: 2,  # 'с'
        5: 2,  # 'т'
        19: 1,  # 'у'
        29: 2,  # 'ф'
        25: 1,  # 'х'
        22: 1,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    32: {  # 'Б'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 2,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 2,  # 'Д'
        44: 1,  # 'Е'
        55: 1,  # 'Ж'
        47: 2,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 2,  # 'Н'
        41: 2,  # 'О'
        30: 1,  # 'П'
        39: 1,  # 'Р'
        28: 2,  # 'С'
        34: 2,  # 'Т'
        51: 1,  # 'У'
        48: 2,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 0,  # 'Ш'
        57: 1,  # 'Щ'
        61: 2,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 1,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 2,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 2,  # 'р'
        8: 1,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 2,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    35: {  # 'В'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 0,  # 'Г'
        37: 1,  # 'Д'
        44: 2,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 1,  # 'О'
        30: 1,  # 'П'
        39: 2,  # 'Р'
        28: 2,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 2,  # 'Ф'
        49: 0,  # 'Х'
        53: 1,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 2,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 2,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 2,  # 'л'
        14: 1,  # 'м'
        6: 2,  # 'н'
        4: 2,  # 'о'
        13: 1,  # 'п'
        7: 2,  # 'р'
        8: 2,  # 'с'
        5: 2,  # 'т'
        19: 1,  # 'у'
        29: 0,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 2,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    43: {  # 'Г'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 1,  # 'Д'
        44: 2,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 0,  # 'М'
        36: 1,  # 'Н'
        41: 1,  # 'О'
        30: 0,  # 'П'
        39: 1,  # 'Р'
        28: 1,  # 'С'
        34: 0,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 1,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 1,  # 'б'
        9: 1,  # 'в'
        20: 0,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 2,  # 'л'
        14: 1,  # 'м'
        6: 1,  # 'н'
        4: 2,  # 'о'
        13: 0,  # 'п'
        7: 2,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 1,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    37: {  # 'Д'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 2,  # 'В'
        43: 1,  # 'Г'
        37: 2,  # 'Д'
        44: 2,  # 'Е'
        55: 2,  # 'Ж'
        47: 1,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 2,  # 'О'
        30: 2,  # 'П'
        39: 1,  # 'Р'
        28: 2,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 0,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 1,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 2,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 3,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 1,  # 'л'
        14: 1,  # 'м'
        6: 2,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 2,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    44: {  # 'Е'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 1,  # 'Б'
        35: 2,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 1,  # 'Е'
        55: 1,  # 'Ж'
        47: 1,  # 'З'
        40: 1,  # 'И'
        59: 1,  # 'Й'
        33: 2,  # 'К'
        46: 2,  # 'Л'
        38: 1,  # 'М'
        36: 2,  # 'Н'
        41: 2,  # 'О'
        30: 1,  # 'П'
        39: 2,  # 'Р'
        28: 2,  # 'С'
        34: 2,  # 'Т'
        51: 1,  # 'У'
        48: 2,  # 'Ф'
        49: 1,  # 'Х'
        53: 2,  # 'Ц'
        50: 1,  # 'Ч'
        54: 1,  # 'Ш'
        57: 1,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 1,  # 'Я'
        1: 0,  # 'а'
        18: 1,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 2,  # 'д'
        3: 0,  # 'е'
        23: 1,  # 'ж'
        15: 1,  # 'з'
        2: 0,  # 'и'
        26: 1,  # 'й'
        12: 2,  # 'к'
        10: 2,  # 'л'
        14: 2,  # 'м'
        6: 2,  # 'н'
        4: 0,  # 'о'
        13: 1,  # 'п'
        7: 2,  # 'р'
        8: 2,  # 'с'
        5: 1,  # 'т'
        19: 1,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    55: {  # 'Ж'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 0,  # 'Б'
        35: 1,  # 'В'
        43: 0,  # 'Г'
        37: 1,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 1,  # 'Н'
        41: 1,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 1,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 1,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 2,  # 'о'
        13: 1,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 1,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    47: {  # 'З'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 2,  # 'Н'
        41: 1,  # 'О'
        30: 1,  # 'П'
        39: 1,  # 'Р'
        28: 1,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 0,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 1,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 2,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 1,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 2,  # 'л'
        14: 1,  # 'м'
        6: 1,  # 'н'
        4: 1,  # 'о'
        13: 0,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 1,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    40: {  # 'И'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 1,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 2,  # 'Е'
        55: 1,  # 'Ж'
        47: 2,  # 'З'
        40: 1,  # 'И'
        59: 1,  # 'Й'
        33: 2,  # 'К'
        46: 2,  # 'Л'
        38: 2,  # 'М'
        36: 2,  # 'Н'
        41: 1,  # 'О'
        30: 1,  # 'П'
        39: 2,  # 'Р'
        28: 2,  # 'С'
        34: 2,  # 'Т'
        51: 0,  # 'У'
        48: 1,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 1,  # 'Ш'
        57: 1,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 2,  # 'Я'
        1: 1,  # 'а'
        18: 1,  # 'б'
        9: 3,  # 'в'
        20: 2,  # 'г'
        11: 1,  # 'д'
        3: 1,  # 'е'
        23: 0,  # 'ж'
        15: 3,  # 'з'
        2: 0,  # 'и'
        26: 1,  # 'й'
        12: 1,  # 'к'
        10: 2,  # 'л'
        14: 2,  # 'м'
        6: 2,  # 'н'
        4: 0,  # 'о'
        13: 1,  # 'п'
        7: 2,  # 'р'
        8: 2,  # 'с'
        5: 2,  # 'т'
        19: 0,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 1,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    59: {  # 'Й'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 1,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 1,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 1,  # 'С'
        34: 1,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 1,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 1,  # 'Я'
        1: 0,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 1,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 0,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 2,  # 'о'
        13: 0,  # 'п'
        7: 0,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 0,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    33: {  # 'К'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 0,  # 'М'
        36: 2,  # 'Н'
        41: 2,  # 'О'
        30: 2,  # 'П'
        39: 1,  # 'Р'
        28: 2,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 1,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 2,  # 'е'
        23: 1,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 2,  # 'л'
        14: 1,  # 'м'
        6: 2,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 3,  # 'р'
        8: 1,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    46: {  # 'Л'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 2,  # 'Г'
        37: 1,  # 'Д'
        44: 2,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 0,  # 'М'
        36: 1,  # 'Н'
        41: 2,  # 'О'
        30: 1,  # 'П'
        39: 0,  # 'Р'
        28: 1,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 0,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 1,  # 'Я'
        1: 2,  # 'а'
        18: 0,  # 'б'
        9: 1,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 2,  # 'о'
        13: 0,  # 'п'
        7: 0,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    38: {  # 'М'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 2,  # 'В'
        43: 0,  # 'Г'
        37: 1,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 2,  # 'О'
        30: 1,  # 'П'
        39: 1,  # 'Р'
        28: 2,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 0,  # 'Х'
        53: 1,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 1,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 2,  # 'л'
        14: 0,  # 'м'
        6: 2,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    36: {  # 'Н'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 2,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 2,  # 'Д'
        44: 2,  # 'Е'
        55: 1,  # 'Ж'
        47: 1,  # 'З'
        40: 2,  # 'И'
        59: 1,  # 'Й'
        33: 2,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 2,  # 'О'
        30: 1,  # 'П'
        39: 1,  # 'Р'
        28: 2,  # 'С'
        34: 2,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 1,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 1,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 1,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 0,  # 'р'
        8: 0,  # 'с'
        5: 1,  # 'т'
        19: 1,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 2,  # 'ю'
        16: 2,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    41: {  # 'О'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 1,  # 'Б'
        35: 2,  # 'В'
        43: 1,  # 'Г'
        37: 2,  # 'Д'
        44: 1,  # 'Е'
        55: 1,  # 'Ж'
        47: 1,  # 'З'
        40: 1,  # 'И'
        59: 1,  # 'Й'
        33: 2,  # 'К'
        46: 2,  # 'Л'
        38: 2,  # 'М'
        36: 2,  # 'Н'
        41: 2,  # 'О'
        30: 1,  # 'П'
        39: 2,  # 'Р'
        28: 2,  # 'С'
        34: 2,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 1,  # 'Х'
        53: 0,  # 'Ц'
        50: 1,  # 'Ч'
        54: 1,  # 'Ш'
        57: 1,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 1,  # 'Я'
        1: 1,  # 'а'
        18: 2,  # 'б'
        9: 2,  # 'в'
        20: 2,  # 'г'
        11: 1,  # 'д'
        3: 1,  # 'е'
        23: 1,  # 'ж'
        15: 1,  # 'з'
        2: 0,  # 'и'
        26: 1,  # 'й'
        12: 2,  # 'к'
        10: 2,  # 'л'
        14: 1,  # 'м'
        6: 1,  # 'н'
        4: 0,  # 'о'
        13: 2,  # 'п'
        7: 2,  # 'р'
        8: 2,  # 'с'
        5: 3,  # 'т'
        19: 1,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 1,  # 'ц'
        21: 2,  # 'ч'
        27: 0,  # 'ш'
        24: 2,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    30: {  # 'П'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 2,  # 'О'
        30: 2,  # 'П'
        39: 2,  # 'Р'
        28: 2,  # 'С'
        34: 1,  # 'Т'
        51: 2,  # 'У'
        48: 1,  # 'Ф'
        49: 0,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 1,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 2,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 3,  # 'л'
        14: 0,  # 'м'
        6: 1,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 3,  # 'р'
        8: 1,  # 'с'
        5: 1,  # 'т'
        19: 2,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    39: {  # 'Р'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 2,  # 'Г'
        37: 2,  # 'Д'
        44: 2,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 0,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 2,  # 'О'
        30: 2,  # 'П'
        39: 1,  # 'Р'
        28: 1,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 1,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 1,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 0,  # 'р'
        8: 1,  # 'с'
        5: 0,  # 'т'
        19: 3,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    28: {  # 'С'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 3,  # 'А'
        32: 2,  # 'Б'
        35: 2,  # 'В'
        43: 1,  # 'Г'
        37: 2,  # 'Д'
        44: 2,  # 'Е'
        55: 1,  # 'Ж'
        47: 1,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 2,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 2,  # 'О'
        30: 2,  # 'П'
        39: 1,  # 'Р'
        28: 2,  # 'С'
        34: 2,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 1,  # 'Ю'
        56: 1,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 2,  # 'к'
        10: 3,  # 'л'
        14: 2,  # 'м'
        6: 1,  # 'н'
        4: 3,  # 'о'
        13: 3,  # 'п'
        7: 2,  # 'р'
        8: 0,  # 'с'
        5: 3,  # 'т'
        19: 2,  # 'у'
        29: 2,  # 'ф'
        25: 1,  # 'х'
        22: 1,  # 'ц'
        21: 1,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    34: {  # 'Т'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 2,  # 'Б'
        35: 1,  # 'В'
        43: 0,  # 'Г'
        37: 1,  # 'Д'
        44: 2,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 2,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 2,  # 'О'
        30: 1,  # 'П'
        39: 2,  # 'Р'
        28: 2,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 1,  # 'Ф'
        49: 0,  # 'Х'
        53: 1,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 1,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 1,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 1,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 1,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 3,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 2,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    51: {  # 'У'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 1,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 2,  # 'Е'
        55: 1,  # 'Ж'
        47: 1,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 0,  # 'О'
        30: 1,  # 'П'
        39: 1,  # 'Р'
        28: 1,  # 'С'
        34: 2,  # 'Т'
        51: 0,  # 'У'
        48: 1,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 1,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 1,  # 'а'
        18: 1,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 1,  # 'д'
        3: 2,  # 'е'
        23: 1,  # 'ж'
        15: 1,  # 'з'
        2: 2,  # 'и'
        26: 1,  # 'й'
        12: 2,  # 'к'
        10: 1,  # 'л'
        14: 1,  # 'м'
        6: 2,  # 'н'
        4: 2,  # 'о'
        13: 1,  # 'п'
        7: 1,  # 'р'
        8: 2,  # 'с'
        5: 1,  # 'т'
        19: 1,  # 'у'
        29: 0,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 2,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    48: {  # 'Ф'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 0,  # 'М'
        36: 1,  # 'Н'
        41: 1,  # 'О'
        30: 2,  # 'П'
        39: 1,  # 'Р'
        28: 2,  # 'С'
        34: 1,  # 'Т'
        51: 1,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 2,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 2,  # 'о'
        13: 0,  # 'п'
        7: 2,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 1,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    49: {  # 'Х'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 0,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 1,  # 'О'
        30: 1,  # 'П'
        39: 1,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 1,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 0,  # 'б'
        9: 1,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 1,  # 'л'
        14: 1,  # 'м'
        6: 0,  # 'н'
        4: 2,  # 'о'
        13: 0,  # 'п'
        7: 2,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    53: {  # 'Ц'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 0,  # 'Б'
        35: 1,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 2,  # 'И'
        59: 0,  # 'Й'
        33: 2,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 1,  # 'Р'
        28: 2,  # 'С'
        34: 0,  # 'Т'
        51: 1,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 0,  # 'б'
        9: 2,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 1,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 1,  # 'о'
        13: 0,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 1,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    50: {  # 'Ч'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 2,  # 'А'
        32: 1,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 0,  # 'М'
        36: 1,  # 'Н'
        41: 1,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 1,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 1,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 2,  # 'о'
        13: 0,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 1,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    54: {  # 'Ш'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 1,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 1,  # 'Н'
        41: 1,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 1,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 0,  # 'б'
        9: 2,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 2,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 1,  # 'л'
        14: 1,  # 'м'
        6: 1,  # 'н'
        4: 2,  # 'о'
        13: 1,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 1,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 1,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    57: {  # 'Щ'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 1,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 1,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 1,  # 'о'
        13: 0,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 1,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    61: {  # 'Ъ'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 0,  # 'Г'
        37: 1,  # 'Д'
        44: 0,  # 'Е'
        55: 1,  # 'Ж'
        47: 1,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 2,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 0,  # 'О'
        30: 1,  # 'П'
        39: 2,  # 'Р'
        28: 1,  # 'С'
        34: 1,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 1,  # 'Х'
        53: 1,  # 'Ц'
        50: 1,  # 'Ч'
        54: 1,  # 'Ш'
        57: 1,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 0,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 0,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 1,  # 'л'
        14: 0,  # 'м'
        6: 1,  # 'н'
        4: 0,  # 'о'
        13: 0,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 0,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    60: {  # 'Ю'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 1,  # 'Б'
        35: 0,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 0,  # 'Е'
        55: 1,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 0,  # 'М'
        36: 1,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 1,  # 'Р'
        28: 1,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 1,  # 'б'
        9: 1,  # 'в'
        20: 2,  # 'г'
        11: 1,  # 'д'
        3: 0,  # 'е'
        23: 2,  # 'ж'
        15: 1,  # 'з'
        2: 1,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 1,  # 'л'
        14: 1,  # 'м'
        6: 1,  # 'н'
        4: 0,  # 'о'
        13: 1,  # 'п'
        7: 1,  # 'р'
        8: 1,  # 'с'
        5: 1,  # 'т'
        19: 0,  # 'у'
        29: 0,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    56: {  # 'Я'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 1,  # 'Б'
        35: 1,  # 'В'
        43: 1,  # 'Г'
        37: 1,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 1,  # 'Л'
        38: 1,  # 'М'
        36: 1,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 1,  # 'С'
        34: 2,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 1,  # 'б'
        9: 1,  # 'в'
        20: 1,  # 'г'
        11: 1,  # 'д'
        3: 0,  # 'е'
        23: 0,  # 'ж'
        15: 1,  # 'з'
        2: 1,  # 'и'
        26: 1,  # 'й'
        12: 1,  # 'к'
        10: 1,  # 'л'
        14: 2,  # 'м'
        6: 2,  # 'н'
        4: 0,  # 'о'
        13: 2,  # 'п'
        7: 1,  # 'р'
        8: 1,  # 'с'
        5: 1,  # 'т'
        19: 0,  # 'у'
        29: 0,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    1: {  # 'а'
        63: 1,  # 'e'
        45: 1,  # '\xad'
        31: 1,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 1,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 1,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 3,  # 'е'
        23: 3,  # 'ж'
        15: 3,  # 'з'
        2: 3,  # 'и'
        26: 3,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 2,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 3,  # 'у'
        29: 3,  # 'ф'
        25: 3,  # 'х'
        22: 3,  # 'ц'
        21: 3,  # 'ч'
        27: 3,  # 'ш'
        24: 3,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    18: {  # 'б'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 3,  # 'в'
        20: 1,  # 'г'
        11: 2,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 3,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 1,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 0,  # 'т'
        19: 3,  # 'у'
        29: 0,  # 'ф'
        25: 2,  # 'х'
        22: 1,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 3,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    9: {  # 'в'
        63: 1,  # 'e'
        45: 1,  # '\xad'
        31: 0,  # 'А'
        32: 1,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 1,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 0,  # 'в'
        20: 2,  # 'г'
        11: 3,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 3,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 2,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 2,  # 'х'
        22: 2,  # 'ц'
        21: 3,  # 'ч'
        27: 2,  # 'ш'
        24: 1,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    20: {  # 'г'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 2,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 3,  # 'л'
        14: 1,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 1,  # 'п'
        7: 3,  # 'р'
        8: 2,  # 'с'
        5: 2,  # 'т'
        19: 3,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 1,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    11: {  # 'д'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 2,  # 'б'
        9: 3,  # 'в'
        20: 2,  # 'г'
        11: 2,  # 'д'
        3: 3,  # 'е'
        23: 3,  # 'ж'
        15: 2,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 1,  # 'т'
        19: 3,  # 'у'
        29: 1,  # 'ф'
        25: 2,  # 'х'
        22: 2,  # 'ц'
        21: 2,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    3: {  # 'е'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 2,  # 'е'
        23: 3,  # 'ж'
        15: 3,  # 'з'
        2: 2,  # 'и'
        26: 3,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 2,  # 'у'
        29: 3,  # 'ф'
        25: 3,  # 'х'
        22: 3,  # 'ц'
        21: 3,  # 'ч'
        27: 3,  # 'ш'
        24: 3,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    23: {  # 'ж'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 3,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 3,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 2,  # 'к'
        10: 1,  # 'л'
        14: 1,  # 'м'
        6: 3,  # 'н'
        4: 2,  # 'о'
        13: 1,  # 'п'
        7: 1,  # 'р'
        8: 1,  # 'с'
        5: 1,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 1,  # 'ц'
        21: 1,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    15: {  # 'з'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 3,  # 'у'
        29: 1,  # 'ф'
        25: 2,  # 'х'
        22: 2,  # 'ц'
        21: 2,  # 'ч'
        27: 2,  # 'ш'
        24: 1,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 2,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    2: {  # 'и'
        63: 1,  # 'e'
        45: 1,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 1,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 1,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 1,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 1,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 3,  # 'е'
        23: 3,  # 'ж'
        15: 3,  # 'з'
        2: 3,  # 'и'
        26: 3,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 2,  # 'у'
        29: 3,  # 'ф'
        25: 3,  # 'х'
        22: 3,  # 'ц'
        21: 3,  # 'ч'
        27: 3,  # 'ш'
        24: 3,  # 'щ'
        17: 2,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    26: {  # 'й'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 1,  # 'а'
        18: 2,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 2,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 2,  # 'з'
        2: 1,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 2,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 2,  # 'о'
        13: 1,  # 'п'
        7: 2,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 1,  # 'у'
        29: 2,  # 'ф'
        25: 1,  # 'х'
        22: 2,  # 'ц'
        21: 2,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    12: {  # 'к'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 1,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 1,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 3,  # 'в'
        20: 2,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 2,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 3,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 1,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 3,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 3,  # 'ц'
        21: 2,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    10: {  # 'л'
        63: 1,  # 'e'
        45: 1,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 1,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 2,  # 'д'
        3: 3,  # 'е'
        23: 3,  # 'ж'
        15: 2,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 1,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 2,  # 'п'
        7: 2,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 3,  # 'у'
        29: 2,  # 'ф'
        25: 2,  # 'х'
        22: 2,  # 'ц'
        21: 2,  # 'ч'
        27: 2,  # 'ш'
        24: 1,  # 'щ'
        17: 3,  # 'ъ'
        52: 2,  # 'ь'
        42: 3,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    14: {  # 'м'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 1,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 1,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 2,  # 'к'
        10: 3,  # 'л'
        14: 1,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 3,  # 'п'
        7: 2,  # 'р'
        8: 2,  # 'с'
        5: 1,  # 'т'
        19: 3,  # 'у'
        29: 2,  # 'ф'
        25: 1,  # 'х'
        22: 2,  # 'ц'
        21: 2,  # 'ч'
        27: 2,  # 'ш'
        24: 1,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    6: {  # 'н'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 1,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 2,  # 'б'
        9: 2,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 3,  # 'е'
        23: 2,  # 'ж'
        15: 2,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 2,  # 'л'
        14: 1,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 1,  # 'п'
        7: 2,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 3,  # 'у'
        29: 3,  # 'ф'
        25: 2,  # 'х'
        22: 3,  # 'ц'
        21: 3,  # 'ч'
        27: 2,  # 'ш'
        24: 1,  # 'щ'
        17: 3,  # 'ъ'
        52: 2,  # 'ь'
        42: 2,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    4: {  # 'о'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 2,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 3,  # 'е'
        23: 3,  # 'ж'
        15: 3,  # 'з'
        2: 3,  # 'и'
        26: 3,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 2,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 2,  # 'у'
        29: 3,  # 'ф'
        25: 3,  # 'х'
        22: 3,  # 'ц'
        21: 3,  # 'ч'
        27: 3,  # 'ш'
        24: 3,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    13: {  # 'п'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 1,  # 'й'
        12: 2,  # 'к'
        10: 3,  # 'л'
        14: 1,  # 'м'
        6: 2,  # 'н'
        4: 3,  # 'о'
        13: 1,  # 'п'
        7: 3,  # 'р'
        8: 2,  # 'с'
        5: 2,  # 'т'
        19: 3,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 2,  # 'ц'
        21: 2,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 2,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    7: {  # 'р'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 3,  # 'е'
        23: 3,  # 'ж'
        15: 2,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 2,  # 'п'
        7: 1,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 3,  # 'у'
        29: 2,  # 'ф'
        25: 3,  # 'х'
        22: 3,  # 'ц'
        21: 2,  # 'ч'
        27: 3,  # 'ш'
        24: 1,  # 'щ'
        17: 3,  # 'ъ'
        52: 1,  # 'ь'
        42: 2,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    8: {  # 'с'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 2,  # 'б'
        9: 3,  # 'в'
        20: 2,  # 'г'
        11: 2,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 1,  # 'с'
        5: 3,  # 'т'
        19: 3,  # 'у'
        29: 2,  # 'ф'
        25: 2,  # 'х'
        22: 2,  # 'ц'
        21: 2,  # 'ч'
        27: 2,  # 'ш'
        24: 0,  # 'щ'
        17: 3,  # 'ъ'
        52: 2,  # 'ь'
        42: 2,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    5: {  # 'т'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 2,  # 'г'
        11: 2,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 2,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 3,  # 'у'
        29: 1,  # 'ф'
        25: 2,  # 'х'
        22: 2,  # 'ц'
        21: 2,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 3,  # 'ъ'
        52: 2,  # 'ь'
        42: 2,  # 'ю'
        16: 3,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    19: {  # 'у'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 2,  # 'е'
        23: 3,  # 'ж'
        15: 3,  # 'з'
        2: 2,  # 'и'
        26: 2,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 2,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 1,  # 'у'
        29: 2,  # 'ф'
        25: 2,  # 'х'
        22: 2,  # 'ц'
        21: 3,  # 'ч'
        27: 3,  # 'ш'
        24: 2,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    29: {  # 'ф'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 1,  # 'в'
        20: 1,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 2,  # 'к'
        10: 2,  # 'л'
        14: 1,  # 'м'
        6: 1,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 2,  # 'р'
        8: 2,  # 'с'
        5: 2,  # 'т'
        19: 2,  # 'у'
        29: 0,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 2,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    25: {  # 'х'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 3,  # 'в'
        20: 0,  # 'г'
        11: 1,  # 'д'
        3: 2,  # 'е'
        23: 0,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 2,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 1,  # 'п'
        7: 3,  # 'р'
        8: 1,  # 'с'
        5: 2,  # 'т'
        19: 3,  # 'у'
        29: 0,  # 'ф'
        25: 1,  # 'х'
        22: 0,  # 'ц'
        21: 1,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    22: {  # 'ц'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 2,  # 'в'
        20: 1,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 1,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 2,  # 'к'
        10: 1,  # 'л'
        14: 1,  # 'м'
        6: 1,  # 'н'
        4: 2,  # 'о'
        13: 1,  # 'п'
        7: 1,  # 'р'
        8: 1,  # 'с'
        5: 1,  # 'т'
        19: 2,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 1,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 0,  # 'ю'
        16: 2,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    21: {  # 'ч'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 1,  # 'б'
        9: 3,  # 'в'
        20: 1,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 1,  # 'ж'
        15: 0,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 2,  # 'л'
        14: 2,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 2,  # 'р'
        8: 0,  # 'с'
        5: 2,  # 'т'
        19: 3,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 1,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    27: {  # 'ш'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 2,  # 'в'
        20: 0,  # 'г'
        11: 1,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 3,  # 'к'
        10: 2,  # 'л'
        14: 1,  # 'м'
        6: 3,  # 'н'
        4: 2,  # 'о'
        13: 2,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 1,  # 'т'
        19: 2,  # 'у'
        29: 1,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 1,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 2,  # 'ъ'
        52: 1,  # 'ь'
        42: 1,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    24: {  # 'щ'
        63: 1,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 3,  # 'а'
        18: 0,  # 'б'
        9: 1,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 3,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 3,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 2,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 1,  # 'р'
        8: 0,  # 'с'
        5: 2,  # 'т'
        19: 3,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 1,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 2,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    17: {  # 'ъ'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 1,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 3,  # 'г'
        11: 3,  # 'д'
        3: 2,  # 'е'
        23: 3,  # 'ж'
        15: 3,  # 'з'
        2: 1,  # 'и'
        26: 2,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 3,  # 'о'
        13: 3,  # 'п'
        7: 3,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 1,  # 'у'
        29: 1,  # 'ф'
        25: 2,  # 'х'
        22: 2,  # 'ц'
        21: 3,  # 'ч'
        27: 2,  # 'ш'
        24: 3,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 2,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    52: {  # 'ь'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 1,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 0,  # 'и'
        26: 0,  # 'й'
        12: 1,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 1,  # 'н'
        4: 3,  # 'о'
        13: 0,  # 'п'
        7: 0,  # 'р'
        8: 0,  # 'с'
        5: 1,  # 'т'
        19: 0,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 1,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 1,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    42: {  # 'ю'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 1,  # 'а'
        18: 2,  # 'б'
        9: 1,  # 'в'
        20: 2,  # 'г'
        11: 2,  # 'д'
        3: 1,  # 'е'
        23: 2,  # 'ж'
        15: 2,  # 'з'
        2: 1,  # 'и'
        26: 1,  # 'й'
        12: 2,  # 'к'
        10: 2,  # 'л'
        14: 2,  # 'м'
        6: 2,  # 'н'
        4: 1,  # 'о'
        13: 1,  # 'п'
        7: 2,  # 'р'
        8: 2,  # 'с'
        5: 2,  # 'т'
        19: 1,  # 'у'
        29: 1,  # 'ф'
        25: 1,  # 'х'
        22: 2,  # 'ц'
        21: 3,  # 'ч'
        27: 1,  # 'ш'
        24: 1,  # 'щ'
        17: 1,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    16: {  # 'я'
        63: 0,  # 'e'
        45: 1,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 3,  # 'б'
        9: 3,  # 'в'
        20: 2,  # 'г'
        11: 3,  # 'д'
        3: 2,  # 'е'
        23: 1,  # 'ж'
        15: 2,  # 'з'
        2: 1,  # 'и'
        26: 2,  # 'й'
        12: 3,  # 'к'
        10: 3,  # 'л'
        14: 3,  # 'м'
        6: 3,  # 'н'
        4: 1,  # 'о'
        13: 2,  # 'п'
        7: 2,  # 'р'
        8: 3,  # 'с'
        5: 3,  # 'т'
        19: 1,  # 'у'
        29: 1,  # 'ф'
        25: 3,  # 'х'
        22: 2,  # 'ц'
        21: 1,  # 'ч'
        27: 1,  # 'ш'
        24: 2,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 1,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    58: {  # 'є'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 0,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 0,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 0,  # 'о'
        13: 0,  # 'п'
        7: 0,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 0,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
    62: {  # '№'
        63: 0,  # 'e'
        45: 0,  # '\xad'
        31: 0,  # 'А'
        32: 0,  # 'Б'
        35: 0,  # 'В'
        43: 0,  # 'Г'
        37: 0,  # 'Д'
        44: 0,  # 'Е'
        55: 0,  # 'Ж'
        47: 0,  # 'З'
        40: 0,  # 'И'
        59: 0,  # 'Й'
        33: 0,  # 'К'
        46: 0,  # 'Л'
        38: 0,  # 'М'
        36: 0,  # 'Н'
        41: 0,  # 'О'
        30: 0,  # 'П'
        39: 0,  # 'Р'
        28: 0,  # 'С'
        34: 0,  # 'Т'
        51: 0,  # 'У'
        48: 0,  # 'Ф'
        49: 0,  # 'Х'
        53: 0,  # 'Ц'
        50: 0,  # 'Ч'
        54: 0,  # 'Ш'
        57: 0,  # 'Щ'
        61: 0,  # 'Ъ'
        60: 0,  # 'Ю'
        56: 0,  # 'Я'
        1: 0,  # 'а'
        18: 0,  # 'б'
        9: 0,  # 'в'
        20: 0,  # 'г'
        11: 0,  # 'д'
        3: 0,  # 'е'
        23: 0,  # 'ж'
        15: 0,  # 'з'
        2: 0,  # 'и'
        26: 0,  # 'й'
        12: 0,  # 'к'
        10: 0,  # 'л'
        14: 0,  # 'м'
        6: 0,  # 'н'
        4: 0,  # 'о'
        13: 0,  # 'п'
        7: 0,  # 'р'
        8: 0,  # 'с'
        5: 0,  # 'т'
        19: 0,  # 'у'
        29: 0,  # 'ф'
        25: 0,  # 'х'
        22: 0,  # 'ц'
        21: 0,  # 'ч'
        27: 0,  # 'ш'
        24: 0,  # 'щ'
        17: 0,  # 'ъ'
        52: 0,  # 'ь'
        42: 0,  # 'ю'
        16: 0,  # 'я'
        58: 0,  # 'є'
        62: 0,  # '№'
    },
}

# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters

# Character Mapping Table(s):
ISO_8859_5_BULGARIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 77,  # 'A'
    66: 90,  # 'B'
    67: 99,  # 'C'
    68: 100,  # 'D'
    69: 72,  # 'E'
    70: 109,  # 'F'
    71: 107,  # 'G'
    72: 101,  # 'H'
    73: 79,  # 'I'
    74: 185,  # 'J'
    75: 81,  # 'K'
    76: 102,  # 'L'
    77: 76,  # 'M'
    78: 94,  # 'N'
    79: 82,  # 'O'
    80: 110,  # 'P'
    81: 186,  # 'Q'
    82: 108,  # 'R'
    83: 91,  # 'S'
    84: 74,  # 'T'
    85: 119,  # 'U'
    86: 84,  # 'V'
    87: 96,  # 'W'
    88: 111,  # 'X'
    89: 187,  # 'Y'
    90: 115,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 65,  # 'a'
    98: 69,  # 'b'
    99: 70,  # 'c'
    100: 66,  # 'd'
    101: 63,  # 'e'
    102: 68,  # 'f'
    103: 112,  # 'g'
    104: 103,  # 'h'
    105: 92,  # 'i'
    106: 194,  # 'j'
    107: 104,  # 'k'
    108: 95,  # 'l'
    109: 86,  # 'm'
    110: 87,  # 'n'
    111: 71,  # 'o'
    112: 116,  # 'p'
    113: 195,  # 'q'
    114: 85,  # 'r'
    115: 93,  # 's'
    116: 97,  # 't'
    117: 113,  # 'u'
    118: 196,  # 'v'
    119: 197,  # 'w'
    120: 198,  # 'x'
    121: 199,  # 'y'
    122: 200,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 194,  # '\x80'
    129: 195,  # '\x81'
    130: 196,  # '\x82'
    131: 197,  # '\x83'
    132: 198,  # '\x84'
    133: 199,  # '\x85'
    134: 200,  # '\x86'
    135: 201,  # '\x87'
    136: 202,  # '\x88'
    137: 203,  # '\x89'
    138: 204,  # '\x8a'
    139: 205,  # '\x8b'
    140: 206,  # '\x8c'
    141: 207,  # '\x8d'
    142: 208,  # '\x8e'
    143: 209,  # '\x8f'
    144: 210,  # '\x90'
    145: 211,  # '\x91'
    146: 212,  # '\x92'
    147: 213,  # '\x93'
    148: 214,  # '\x94'
    149: 215,  # '\x95'
    150: 216,  # '\x96'
    151: 217,  # '\x97'
    152: 218,  # '\x98'
    153: 219,  # '\x99'
    154: 220,  # '\x9a'
    155: 221,  # '\x9b'
    156: 222,  # '\x9c'
    157: 223,  # '\x9d'
    158: 224,  # '\x9e'
    159: 225,  # '\x9f'
    160: 81,  # '\xa0'
    161: 226,  # 'Ё'
    162: 227,  # 'Ђ'
    163: 228,  # 'Ѓ'
    164: 229,  # 'Є'
    165: 230,  # 'Ѕ'
    166: 105,  # 'І'
    167: 231,  # 'Ї'
    168: 232,  # 'Ј'
    169: 233,  # 'Љ'
    170: 234,  # 'Њ'
    171: 235,  # 'Ћ'
    172: 236,  # 'Ќ'
    173: 45,  # '\xad'
    174: 237,  # 'Ў'
    175: 238,  # 'Џ'
    176: 31,  # 'А'
    177: 32,  # 'Б'
    178: 35,  # 'В'
    179: 43,  # 'Г'
    180: 37,  # 'Д'
    181: 44,  # 'Е'
    182: 55,  # 'Ж'
    183: 47,  # 'З'
    184: 40,  # 'И'
    185: 59,  # 'Й'
    186: 33,  # 'К'
    187: 46,  # 'Л'
    188: 38,  # 'М'
    189: 36,  # 'Н'
    190: 41,  # 'О'
    191: 30,  # 'П'
    192: 39,  # 'Р'
    193: 28,  # 'С'
    194: 34,  # 'Т'
    195: 51,  # 'У'
    196: 48,  # 'Ф'
    197: 49,  # 'Х'
    198: 53,  # 'Ц'
    199: 50,  # 'Ч'
    200: 54,  # 'Ш'
    201: 57,  # 'Щ'
    202: 61,  # 'Ъ'
    203: 239,  # 'Ы'
    204: 67,  # 'Ь'
    205: 240,  # 'Э'
    206: 60,  # 'Ю'
    207: 56,  # 'Я'
    208: 1,  # 'а'
    209: 18,  # 'б'
    210: 9,  # 'в'
    211: 20,  # 'г'
    212: 11,  # 'д'
    213: 3,  # 'е'
    214: 23,  # 'ж'
    215: 15,  # 'з'
    216: 2,  # 'и'
    217: 26,  # 'й'
    218: 12,  # 'к'
    219: 10,  # 'л'
    220: 14,  # 'м'
    221: 6,  # 'н'
    222: 4,  # 'о'
    223: 13,  # 'п'
    224: 7,  # 'р'
    225: 8,  # 'с'
    226: 5,  # 'т'
    227: 19,  # 'у'
    228: 29,  # 'ф'
    229: 25,  # 'х'
    230: 22,  # 'ц'
    231: 21,  # 'ч'
    232: 27,  # 'ш'
    233: 24,  # 'щ'
    234: 17,  # 'ъ'
    235: 75,  # 'ы'
    236: 52,  # 'ь'
    237: 241,  # 'э'
    238: 42,  # 'ю'
    239: 16,  # 'я'
    240: 62,  # '№'
    241: 242,  # 'ё'
    242: 243,  # 'ђ'
    243: 244,  # 'ѓ'
    244: 58,  # 'є'
    245: 245,  # 'ѕ'
    246: 98,  # 'і'
    247: 246,  # 'ї'
    248: 247,  # 'ј'
    249: 248,  # 'љ'
    250: 249,  # 'њ'
    251: 250,  # 'ћ'
    252: 251,  # 'ќ'
    253: 91,  # '§'
    254: 252,  # 'ў'
    255: 253,  # 'џ'
}

ISO_8859_5_BULGARIAN_MODEL = SingleByteCharSetModel(
    charset_name="ISO-8859-5",
    language="Bulgarian",
    char_to_order_map=ISO_8859_5_BULGARIAN_CHAR_TO_ORDER,
    language_model=BULGARIAN_LANG_MODEL,
    typical_positive_ratio=0.969392,
    keep_ascii_letters=False,
    alphabet="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя",
)

WINDOWS_1251_BULGARIAN_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 77,  # 'A'
    66: 90,  # 'B'
    67: 99,  # 'C'
    68: 100,  # 'D'
    69: 72,  # 'E'
    70: 109,  # 'F'
    71: 107,  # 'G'
    72: 101,  # 'H'
    73: 79,  # 'I'
    74: 185,  # 'J'
    75: 81,  # 'K'
    76: 102,  # 'L'
    77: 76,  # 'M'
    78: 94,  # 'N'
    79: 82,  # 'O'
    80: 110,  # 'P'
    81: 186,  # 'Q'
    82: 108,  # 'R'
    83: 91,  # 'S'
    84: 74,  # 'T'
    85: 119,  # 'U'
    86: 84,  # 'V'
    87: 96,  # 'W'
    88: 111,  # 'X'
    89: 187,  # 'Y'
    90: 115,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 65,  # 'a'
    98: 69,  # 'b'
    99: 70,  # 'c'
    100: 66,  # 'd'
    101: 63,  # 'e'
    102: 68,  # 'f'
    103: 112,  # 'g'
    104: 103,  # 'h'
    105: 92,  # 'i'
    106: 194,  # 'j'
    107: 104,  # 'k'
    108: 95,  # 'l'
    109: 86,  # 'm'
    110: 87,  # 'n'
    111: 71,  # 'o'
    112: 116,  # 'p'
    113: 195,  # 'q'
    114: 85,  # 'r'
    115: 93,  # 's'
    116: 97,  # 't'
    117: 113,  # 'u'
    118: 196,  # 'v'
    119: 197,  # 'w'
    120: 198,  # 'x'
    121: 199,  # 'y'
    122: 200,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 206,  # 'Ђ'
    129: 207,  # 'Ѓ'
    130: 208,  # '‚'
    131: 209,  # 'ѓ'
    132: 210,  # '„'
    133: 211,  # '…'
    134: 212,  # '†'
    135: 213,  # '‡'
    136: 120,  # '€'
    137: 214,  # '‰'
    138: 215,  # 'Љ'
    139: 216,  # '‹'
    140: 217,  # 'Њ'
    141: 218,  # 'Ќ'
    142: 219,  # 'Ћ'
    143: 220,  # 'Џ'
    144: 221,  # 'ђ'
    145: 78,  # '‘'
    146: 64,  # '’'
    147: 83,  # '“'
    148: 121,  # '”'
    149: 98,  # '•'
    150: 117,  # '–'
    151: 105,  # '—'
    152: 222,  # None
    153: 223,  # '™'
    154: 224,  # 'љ'
    155: 225,  # '›'
    156: 226,  # 'њ'
    157: 227,  # 'ќ'
    158: 228,  # 'ћ'
    159: 229,  # 'џ'
    160: 88,  # '\xa0'
    161: 230,  # 'Ў'
    162: 231,  # 'ў'
    163: 232,  # 'Ј'
    164: 233,  # '¤'
    165: 122,  # 'Ґ'
    166: 89,  # '¦'
    167: 106,  # '§'
    168: 234,  # 'Ё'
    169: 235,  # '©'
    170: 236,  # 'Є'
    171: 237,  # '«'
    172: 238,  # '¬'
    173: 45,  # '\xad'
    174: 239,  # '®'
    175: 240,  # 'Ї'
    176: 73,  # '°'
    177: 80,  # '±'
    178: 118,  # 'І'
    179: 114,  # 'і'
    180: 241,  # 'ґ'
    181: 242,  # 'µ'
    182: 243,  # '¶'
    183: 244,  # '·'
    184: 245,  # 'ё'
    185: 62,  # '№'
    186: 58,  # 'є'
    187: 246,  # '»'
    188: 247,  # 'ј'
    189: 248,  # 'Ѕ'
    190: 249,  # 'ѕ'
    191: 250,  # 'ї'
    192: 31,  # 'А'
    193: 32,  # 'Б'
    194: 35,  # 'В'
    195: 43,  # 'Г'
    196: 37,  # 'Д'
    197: 44,  # 'Е'
    198: 55,  # 'Ж'
    199: 47,  # 'З'
    200: 40,  # 'И'
    201: 59,  # 'Й'
    202: 33,  # 'К'
    203: 46,  # 'Л'
    204: 38,  # 'М'
    205: 36,  # 'Н'
    206: 41,  # 'О'
    207: 30,  # 'П'
    208: 39,  # 'Р'
    209: 28,  # 'С'
    210: 34,  # 'Т'
    211: 51,  # 'У'
    212: 48,  # 'Ф'
    213: 49,  # 'Х'
    214: 53,  # 'Ц'
    215: 50,  # 'Ч'
    216: 54,  # 'Ш'
    217: 57,  # 'Щ'
    218: 61,  # 'Ъ'
    219: 251,  # 'Ы'
    220: 67,  # 'Ь'
    221: 252,  # 'Э'
    222: 60,  # 'Ю'
    223: 56,  # 'Я'
    224: 1,  # 'а'
    225: 18,  # 'б'
    226: 9,  # 'в'
    227: 20,  # 'г'
    228: 11,  # 'д'
    229: 3,  # 'е'
    230: 23,  # 'ж'
    231: 15,  # 'з'
    232: 2,  # 'и'
    233: 26,  # 'й'
    234: 12,  # 'к'
    235: 10,  # 'л'
    236: 14,  # 'м'
    237: 6,  # 'н'
    238: 4,  # 'о'
    239: 13,  # 'п'
    240: 7,  # 'р'
    241: 8,  # 'с'
    242: 5,  # 'т'
    243: 19,  # 'у'
    244: 29,  # 'ф'
    245: 25,  # 'х'
    246: 22,  # 'ц'
    247: 21,  # 'ч'
    248: 27,  # 'ш'
    249: 24,  # 'щ'
    250: 17,  # 'ъ'
    251: 75,  # 'ы'
    252: 52,  # 'ь'
    253: 253,  # 'э'
    254: 42,  # 'ю'
    255: 16,  # 'я'
}

WINDOWS_1251_BULGARIAN_MODEL = SingleByteCharSetModel(
    charset_name="windows-1251",
    language="Bulgarian",
    char_to_order_map=WINDOWS_1251_BULGARIAN_CHAR_TO_ORDER,
    language_model=BULGARIAN_LANG_MODEL,
    typical_positive_ratio=0.969392,
    keep_ascii_letters=False,
    alphabet="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя",
)
python3.12/site-packages/pip/_vendor/chardet/codingstatemachine.py000064400000007224151732703330021163 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import logging

from .codingstatemachinedict import CodingStateMachineDict
from .enums import MachineState


class CodingStateMachine:
    """
    A state machine to verify a byte sequence for a particular encoding. For
    each byte the detector receives, it will feed that byte to every active
    state machine available, one byte at a time. The state machine changes its
    state based on its previous state and the byte it receives. There are 3
    states in a state machine that are of interest to an auto-detector:

    START state: This is the state to start with, or a legal byte sequence
                 (i.e. a valid code point) for character has been identified.

    ME state:  This indicates that the state machine identified a byte sequence
               that is specific to the charset it is designed for and that
               there is no other possible encoding which can contain this byte
               sequence. This will to lead to an immediate positive answer for
               the detector.

    ERROR state: This indicates the state machine identified an illegal byte
                 sequence for that encoding. This will lead to an immediate
                 negative answer for this encoding. Detector will exclude this
                 encoding from consideration from here on.
    """

    def __init__(self, sm: CodingStateMachineDict) -> None:
        self._model = sm
        self._curr_byte_pos = 0
        self._curr_char_len = 0
        self._curr_state = MachineState.START
        self.active = True
        self.logger = logging.getLogger(__name__)
        self.reset()

    def reset(self) -> None:
        self._curr_state = MachineState.START

    def next_state(self, c: int) -> int:
        # for each byte we get its class
        # if it is first byte, we also get byte length
        byte_class = self._model["class_table"][c]
        if self._curr_state == MachineState.START:
            self._curr_byte_pos = 0
            self._curr_char_len = self._model["char_len_table"][byte_class]
        # from byte's class and state_table, we get its next state
        curr_state = self._curr_state * self._model["class_factor"] + byte_class
        self._curr_state = self._model["state_table"][curr_state]
        self._curr_byte_pos += 1
        return self._curr_state

    def get_current_charlen(self) -> int:
        return self._curr_char_len

    def get_coding_state_machine(self) -> str:
        return self._model["name"]

    @property
    def language(self) -> str:
        return self._model["language"]
python3.12/site-packages/pip/_vendor/chardet/euckrprober.py000064400000003331151732703330017650 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .chardistribution import EUCKRDistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import EUCKR_SM_MODEL


class EUCKRProber(MultiByteCharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(EUCKR_SM_MODEL)
        self.distribution_analyzer = EUCKRDistributionAnalysis()
        self.reset()

    @property
    def charset_name(self) -> str:
        return "EUC-KR"

    @property
    def language(self) -> str:
        return "Korean"
python3.12/site-packages/pip/_vendor/chardet/py.typed000064400000000000151732703330016440 0ustar00python3.12/site-packages/pip/_vendor/chardet/mbcharsetprober.py000064400000007203151732703330020511 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#   Proofpoint, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import Optional, Union

from .chardistribution import CharDistributionAnalysis
from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .enums import LanguageFilter, MachineState, ProbingState


class MultiByteCharSetProber(CharSetProber):
    """
    MultiByteCharSetProber
    """

    def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None:
        super().__init__(lang_filter=lang_filter)
        self.distribution_analyzer: Optional[CharDistributionAnalysis] = None
        self.coding_sm: Optional[CodingStateMachine] = None
        self._last_char = bytearray(b"\0\0")

    def reset(self) -> None:
        super().reset()
        if self.coding_sm:
            self.coding_sm.reset()
        if self.distribution_analyzer:
            self.distribution_analyzer.reset()
        self._last_char = bytearray(b"\0\0")

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        assert self.coding_sm is not None
        assert self.distribution_analyzer is not None

        for i, byte in enumerate(byte_str):
            coding_state = self.coding_sm.next_state(byte)
            if coding_state == MachineState.ERROR:
                self.logger.debug(
                    "%s %s prober hit error at byte %s",
                    self.charset_name,
                    self.language,
                    i,
                )
                self._state = ProbingState.NOT_ME
                break
            if coding_state == MachineState.ITS_ME:
                self._state = ProbingState.FOUND_IT
                break
            if coding_state == MachineState.START:
                char_len = self.coding_sm.get_current_charlen()
                if i == 0:
                    self._last_char[1] = byte
                    self.distribution_analyzer.feed(self._last_char, char_len)
                else:
                    self.distribution_analyzer.feed(byte_str[i - 1 : i + 1], char_len)

        self._last_char[0] = byte_str[-1]

        if self.state == ProbingState.DETECTING:
            if self.distribution_analyzer.got_enough_data() and (
                self.get_confidence() > self.SHORTCUT_THRESHOLD
            ):
                self._state = ProbingState.FOUND_IT

        return self.state

    def get_confidence(self) -> float:
        assert self.distribution_analyzer is not None
        return self.distribution_analyzer.get_confidence()
python3.12/site-packages/pip/_vendor/chardet/langturkishmodel.py000064400000272214151732703330020711 0ustar00from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel

# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative

TURKISH_LANG_MODEL = {
    23: {  # 'A'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 1,  # 'g'
        25: 1,  # 'h'
        3: 1,  # 'i'
        24: 0,  # 'j'
        10: 2,  # 'k'
        5: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 1,  # 'r'
        8: 1,  # 's'
        9: 1,  # 't'
        14: 1,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 0,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    37: {  # 'B'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 2,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 1,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 1,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 2,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 0,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 0,  # 'ı'
        40: 1,  # 'Ş'
        19: 1,  # 'ş'
    },
    47: {  # 'C'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 1,  # 'L'
        20: 0,  # 'M'
        46: 1,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 1,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 2,  # 'j'
        10: 1,  # 'k'
        5: 2,  # 'l'
        13: 2,  # 'm'
        4: 2,  # 'n'
        15: 1,  # 'o'
        26: 0,  # 'p'
        7: 2,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 1,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    39: {  # 'D'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 1,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 2,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 1,  # 'l'
        13: 3,  # 'm'
        4: 0,  # 'n'
        15: 1,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 1,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 0,  # 'İ'
        6: 1,  # 'ı'
        40: 1,  # 'Ş'
        19: 0,  # 'ş'
    },
    29: {  # 'E'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 1,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 1,  # 'g'
        25: 0,  # 'h'
        3: 1,  # 'i'
        24: 1,  # 'j'
        10: 0,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 1,  # 's'
        9: 1,  # 't'
        14: 1,  # 'u'
        32: 1,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    52: {  # 'F'
        23: 0,  # 'A'
        37: 1,  # 'B'
        47: 1,  # 'C'
        39: 1,  # 'D'
        29: 1,  # 'E'
        52: 2,  # 'F'
        36: 0,  # 'G'
        45: 2,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 1,  # 'N'
        42: 1,  # 'O'
        48: 2,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 1,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 2,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 1,  # 'b'
        28: 1,  # 'c'
        12: 1,  # 'd'
        2: 0,  # 'e'
        18: 1,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 2,  # 'i'
        24: 1,  # 'j'
        10: 0,  # 'k'
        5: 0,  # 'l'
        13: 1,  # 'm'
        4: 2,  # 'n'
        15: 1,  # 'o'
        26: 0,  # 'p'
        7: 2,  # 'r'
        8: 1,  # 's'
        9: 1,  # 't'
        14: 1,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 1,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 1,  # 'Ö'
        55: 2,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 2,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 1,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 2,  # 'ş'
    },
    36: {  # 'G'
        23: 1,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 2,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 2,  # 'N'
        42: 1,  # 'O'
        48: 1,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 2,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 1,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 1,  # 'j'
        10: 1,  # 'k'
        5: 0,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 0,  # 'r'
        8: 1,  # 's'
        9: 1,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 2,  # 'Ö'
        55: 0,  # 'Ü'
        59: 1,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 1,  # 'İ'
        6: 2,  # 'ı'
        40: 2,  # 'Ş'
        19: 1,  # 'ş'
    },
    45: {  # 'H'
        23: 0,  # 'A'
        37: 1,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 2,  # 'G'
        45: 1,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 1,  # 'L'
        20: 0,  # 'M'
        46: 1,  # 'N'
        42: 1,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 2,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 2,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 2,  # 'i'
        24: 0,  # 'j'
        10: 1,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 0,  # 'n'
        15: 1,  # 'o'
        26: 1,  # 'p'
        7: 1,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 2,  # 'ğ'
        41: 1,  # 'İ'
        6: 0,  # 'ı'
        40: 2,  # 'Ş'
        19: 1,  # 'ş'
    },
    53: {  # 'I'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 2,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 2,  # 'l'
        13: 2,  # 'm'
        4: 0,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 0,  # 'ı'
        40: 1,  # 'Ş'
        19: 1,  # 'ş'
    },
    60: {  # 'J'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 1,  # 'd'
        2: 0,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 1,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 1,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 1,  # 's'
        9: 0,  # 't'
        14: 0,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 0,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    16: {  # 'K'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 3,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 2,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 1,  # 'e'
        18: 3,  # 'f'
        27: 3,  # 'g'
        25: 3,  # 'h'
        3: 3,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 0,  # 'u'
        32: 3,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 2,  # 'ü'
        30: 0,  # 'ğ'
        41: 1,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    49: {  # 'L'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 2,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 2,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 0,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 2,  # 'i'
        24: 0,  # 'j'
        10: 1,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 2,  # 'n'
        15: 1,  # 'o'
        26: 1,  # 'p'
        7: 1,  # 'r'
        8: 1,  # 's'
        9: 1,  # 't'
        14: 0,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 2,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 1,  # 'ü'
        30: 1,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    20: {  # 'M'
        23: 1,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 1,  # 'g'
        25: 1,  # 'h'
        3: 2,  # 'i'
        24: 2,  # 'j'
        10: 2,  # 'k'
        5: 2,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 3,  # 'r'
        8: 0,  # 's'
        9: 2,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 3,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    46: {  # 'N'
        23: 0,  # 'A'
        37: 1,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 1,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 1,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 2,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 1,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 2,  # 'j'
        10: 1,  # 'k'
        5: 1,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        15: 1,  # 'o'
        26: 1,  # 'p'
        7: 1,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 1,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 1,  # 'İ'
        6: 2,  # 'ı'
        40: 1,  # 'Ş'
        19: 1,  # 'ş'
    },
    42: {  # 'O'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 0,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 1,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 2,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 0,  # 'n'
        15: 1,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 2,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 2,  # 'İ'
        6: 1,  # 'ı'
        40: 1,  # 'Ş'
        19: 1,  # 'ş'
    },
    48: {  # 'P'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 2,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 1,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 1,  # 'N'
        42: 1,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 1,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 2,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 1,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 0,  # 'n'
        15: 2,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 2,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 2,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 2,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 1,  # 'İ'
        6: 0,  # 'ı'
        40: 2,  # 'Ş'
        19: 1,  # 'ş'
    },
    44: {  # 'R'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 1,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 1,  # 'k'
        5: 2,  # 'l'
        13: 2,  # 'm'
        4: 0,  # 'n'
        15: 1,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 1,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 1,  # 'ü'
        30: 1,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 1,  # 'Ş'
        19: 1,  # 'ş'
    },
    35: {  # 'S'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 1,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 1,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 1,  # 'k'
        5: 1,  # 'l'
        13: 2,  # 'm'
        4: 1,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 1,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 2,  # 'Ç'
        50: 2,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 3,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 2,  # 'Ş'
        19: 1,  # 'ş'
    },
    31: {  # 'T'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 0,  # 'c'
        12: 1,  # 'd'
        2: 3,  # 'e'
        18: 2,  # 'f'
        27: 2,  # 'g'
        25: 0,  # 'h'
        3: 1,  # 'i'
        24: 1,  # 'j'
        10: 2,  # 'k'
        5: 2,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 2,  # 'p'
        7: 2,  # 'r'
        8: 0,  # 's'
        9: 2,  # 't'
        14: 2,  # 'u'
        32: 1,  # 'v'
        57: 1,  # 'w'
        58: 1,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    51: {  # 'U'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 1,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 1,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 1,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 1,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 2,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 1,  # 'k'
        5: 1,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 1,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    38: {  # 'V'
        23: 1,  # 'A'
        37: 1,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 1,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 2,  # 'l'
        13: 2,  # 'm'
        4: 0,  # 'n'
        15: 2,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 1,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 1,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 1,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 1,  # 'İ'
        6: 3,  # 'ı'
        40: 2,  # 'Ş'
        19: 1,  # 'ş'
    },
    62: {  # 'W'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 0,  # 'd'
        2: 0,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 0,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 0,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 0,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    43: {  # 'Y'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 0,  # 'G'
        45: 1,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 2,  # 'N'
        42: 0,  # 'O'
        48: 2,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 2,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 1,  # 'j'
        10: 1,  # 'k'
        5: 1,  # 'l'
        13: 3,  # 'm'
        4: 0,  # 'n'
        15: 2,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 2,  # 'Ö'
        55: 1,  # 'Ü'
        59: 1,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 1,  # 'İ'
        6: 0,  # 'ı'
        40: 2,  # 'Ş'
        19: 1,  # 'ş'
    },
    56: {  # 'Z'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 2,  # 'Z'
        1: 2,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 2,  # 'i'
        24: 1,  # 'j'
        10: 0,  # 'k'
        5: 0,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 1,  # 'r'
        8: 1,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 1,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    1: {  # 'a'
        23: 3,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 3,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 1,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 3,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 2,  # 'Z'
        1: 2,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 2,  # 'e'
        18: 3,  # 'f'
        27: 3,  # 'g'
        25: 3,  # 'h'
        3: 3,  # 'i'
        24: 3,  # 'j'
        10: 3,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        15: 1,  # 'o'
        26: 3,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 3,  # 'v'
        57: 2,  # 'w'
        58: 0,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 1,  # 'î'
        34: 1,  # 'ö'
        17: 3,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    21: {  # 'b'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 3,  # 'g'
        25: 1,  # 'h'
        3: 3,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 3,  # 'p'
        7: 1,  # 'r'
        8: 2,  # 's'
        9: 2,  # 't'
        14: 2,  # 'u'
        32: 1,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    28: {  # 'c'
        23: 0,  # 'A'
        37: 1,  # 'B'
        47: 1,  # 'C'
        39: 1,  # 'D'
        29: 2,  # 'E'
        52: 0,  # 'F'
        36: 2,  # 'G'
        45: 2,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 1,  # 'N'
        42: 1,  # 'O'
        48: 2,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 2,  # 'T'
        51: 2,  # 'U'
        38: 2,  # 'V'
        62: 0,  # 'W'
        43: 3,  # 'Y'
        56: 0,  # 'Z'
        1: 1,  # 'a'
        21: 1,  # 'b'
        28: 2,  # 'c'
        12: 2,  # 'd'
        2: 1,  # 'e'
        18: 1,  # 'f'
        27: 2,  # 'g'
        25: 2,  # 'h'
        3: 3,  # 'i'
        24: 1,  # 'j'
        10: 3,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        15: 2,  # 'o'
        26: 2,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 1,  # 'u'
        32: 0,  # 'v'
        57: 1,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 1,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 1,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 1,  # 'î'
        34: 2,  # 'ö'
        17: 2,  # 'ü'
        30: 2,  # 'ğ'
        41: 1,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 2,  # 'ş'
    },
    12: {  # 'd'
        23: 1,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 2,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 1,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 1,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 1,  # 'f'
        27: 3,  # 'g'
        25: 3,  # 'h'
        3: 2,  # 'i'
        24: 3,  # 'j'
        10: 2,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 1,  # 'o'
        26: 2,  # 'p'
        7: 3,  # 'r'
        8: 2,  # 's'
        9: 2,  # 't'
        14: 3,  # 'u'
        32: 1,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 3,  # 'y'
        22: 1,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    2: {  # 'e'
        23: 2,  # 'A'
        37: 0,  # 'B'
        47: 2,  # 'C'
        39: 0,  # 'D'
        29: 3,  # 'E'
        52: 1,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 1,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 1,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 1,  # 'R'
        35: 0,  # 'S'
        31: 3,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 2,  # 'e'
        18: 3,  # 'f'
        27: 3,  # 'g'
        25: 3,  # 'h'
        3: 3,  # 'i'
        24: 3,  # 'j'
        10: 3,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        15: 1,  # 'o'
        26: 3,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 3,  # 'v'
        57: 2,  # 'w'
        58: 0,  # 'x'
        11: 3,  # 'y'
        22: 1,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 3,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    18: {  # 'f'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 2,  # 'f'
        27: 1,  # 'g'
        25: 1,  # 'h'
        3: 1,  # 'i'
        24: 1,  # 'j'
        10: 1,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 2,  # 'p'
        7: 1,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 1,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 1,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 1,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    27: {  # 'g'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 1,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 2,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 1,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 2,  # 'g'
        25: 1,  # 'h'
        3: 2,  # 'i'
        24: 3,  # 'j'
        10: 2,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 2,  # 'r'
        8: 2,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 1,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 1,  # 'y'
        22: 0,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    25: {  # 'h'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 1,  # 'g'
        25: 2,  # 'h'
        3: 2,  # 'i'
        24: 3,  # 'j'
        10: 3,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 1,  # 'o'
        26: 1,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 2,  # 't'
        14: 3,  # 'u'
        32: 2,  # 'v'
        57: 1,  # 'w'
        58: 0,  # 'x'
        11: 1,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    3: {  # 'i'
        23: 2,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 0,  # 'N'
        42: 1,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 1,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 2,  # 'f'
        27: 3,  # 'g'
        25: 1,  # 'h'
        3: 3,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 1,  # 'o'
        26: 3,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 2,  # 'v'
        57: 1,  # 'w'
        58: 1,  # 'x'
        11: 3,  # 'y'
        22: 1,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 1,  # 'Ü'
        59: 0,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 3,  # 'ü'
        30: 0,  # 'ğ'
        41: 1,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    24: {  # 'j'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 2,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 1,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 2,  # 'f'
        27: 1,  # 'g'
        25: 1,  # 'h'
        3: 2,  # 'i'
        24: 1,  # 'j'
        10: 2,  # 'k'
        5: 2,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 2,  # 'r'
        8: 3,  # 's'
        9: 2,  # 't'
        14: 3,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 2,  # 'x'
        11: 1,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    10: {  # 'k'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 3,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 3,  # 'e'
        18: 1,  # 'f'
        27: 2,  # 'g'
        25: 2,  # 'h'
        3: 3,  # 'i'
        24: 2,  # 'j'
        10: 2,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 3,  # 'p'
        7: 2,  # 'r'
        8: 2,  # 's'
        9: 2,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 3,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 3,  # 'ü'
        30: 1,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    5: {  # 'l'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 3,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 1,  # 'e'
        18: 3,  # 'f'
        27: 3,  # 'g'
        25: 2,  # 'h'
        3: 3,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 1,  # 'l'
        13: 1,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 2,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 2,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 2,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    13: {  # 'm'
        23: 1,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 3,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 3,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 2,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 2,  # 'e'
        18: 3,  # 'f'
        27: 3,  # 'g'
        25: 3,  # 'h'
        3: 3,  # 'i'
        24: 3,  # 'j'
        10: 3,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        15: 1,  # 'o'
        26: 2,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 2,  # 'u'
        32: 2,  # 'v'
        57: 1,  # 'w'
        58: 0,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 3,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    4: {  # 'n'
        23: 1,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 2,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 1,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 1,  # 'f'
        27: 2,  # 'g'
        25: 3,  # 'h'
        3: 2,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 1,  # 'o'
        26: 3,  # 'p'
        7: 2,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 2,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 2,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 1,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    15: {  # 'o'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 1,  # 'G'
        45: 1,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 2,  # 'L'
        20: 0,  # 'M'
        46: 2,  # 'N'
        42: 1,  # 'O'
        48: 2,  # 'P'
        44: 1,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 1,  # 'i'
        24: 2,  # 'j'
        10: 1,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        15: 2,  # 'o'
        26: 0,  # 'p'
        7: 1,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 2,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 2,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 3,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 2,  # 'ğ'
        41: 2,  # 'İ'
        6: 3,  # 'ı'
        40: 2,  # 'Ş'
        19: 2,  # 'ş'
    },
    26: {  # 'p'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 1,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 1,  # 'g'
        25: 1,  # 'h'
        3: 2,  # 'i'
        24: 3,  # 'j'
        10: 1,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        15: 0,  # 'o'
        26: 2,  # 'p'
        7: 2,  # 'r'
        8: 1,  # 's'
        9: 1,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 1,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 3,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    7: {  # 'r'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 1,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 2,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 1,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 2,  # 'g'
        25: 3,  # 'h'
        3: 2,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 2,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 3,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    8: {  # 's'
        23: 1,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 1,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 2,  # 'g'
        25: 2,  # 'h'
        3: 2,  # 'i'
        24: 3,  # 'j'
        10: 3,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 3,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 2,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 2,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    9: {  # 't'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 2,  # 'f'
        27: 2,  # 'g'
        25: 2,  # 'h'
        3: 2,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 2,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 3,  # 'v'
        57: 0,  # 'w'
        58: 2,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 3,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 2,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    14: {  # 'u'
        23: 3,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 3,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 2,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 3,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 2,  # 'Z'
        1: 2,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 2,  # 'e'
        18: 2,  # 'f'
        27: 3,  # 'g'
        25: 3,  # 'h'
        3: 3,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 0,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 3,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 2,  # 'v'
        57: 2,  # 'w'
        58: 0,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 3,  # 'ü'
        30: 1,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    32: {  # 'v'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 1,  # 'j'
        10: 1,  # 'k'
        5: 3,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 1,  # 'r'
        8: 2,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 1,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 1,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    57: {  # 'w'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 1,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 1,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 1,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 1,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 1,  # 's'
        9: 0,  # 't'
        14: 1,  # 'u'
        32: 0,  # 'v'
        57: 2,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 0,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 0,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    58: {  # 'x'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 1,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 1,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 2,  # 'i'
        24: 2,  # 'j'
        10: 1,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 2,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 1,  # 'r'
        8: 2,  # 's'
        9: 1,  # 't'
        14: 0,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    11: {  # 'y'
        23: 1,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 2,  # 'g'
        25: 2,  # 'h'
        3: 2,  # 'i'
        24: 1,  # 'j'
        10: 2,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 2,  # 'r'
        8: 1,  # 's'
        9: 2,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 1,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 3,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 2,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    22: {  # 'z'
        23: 2,  # 'A'
        37: 2,  # 'B'
        47: 1,  # 'C'
        39: 2,  # 'D'
        29: 3,  # 'E'
        52: 1,  # 'F'
        36: 2,  # 'G'
        45: 2,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 2,  # 'N'
        42: 2,  # 'O'
        48: 2,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 3,  # 'T'
        51: 2,  # 'U'
        38: 2,  # 'V'
        62: 0,  # 'W'
        43: 2,  # 'Y'
        56: 1,  # 'Z'
        1: 1,  # 'a'
        21: 2,  # 'b'
        28: 1,  # 'c'
        12: 2,  # 'd'
        2: 2,  # 'e'
        18: 3,  # 'f'
        27: 2,  # 'g'
        25: 2,  # 'h'
        3: 3,  # 'i'
        24: 2,  # 'j'
        10: 3,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        15: 2,  # 'o'
        26: 2,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 0,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 3,  # 'y'
        22: 2,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 2,  # 'Ü'
        59: 1,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 2,  # 'ö'
        17: 2,  # 'ü'
        30: 2,  # 'ğ'
        41: 1,  # 'İ'
        6: 3,  # 'ı'
        40: 1,  # 'Ş'
        19: 2,  # 'ş'
    },
    63: {  # '·'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 0,  # 'd'
        2: 1,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 0,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 0,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    54: {  # 'Ç'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 1,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 1,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 1,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 2,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 1,  # 'b'
        28: 0,  # 'c'
        12: 1,  # 'd'
        2: 0,  # 'e'
        18: 0,  # 'f'
        27: 1,  # 'g'
        25: 0,  # 'h'
        3: 3,  # 'i'
        24: 0,  # 'j'
        10: 1,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 2,  # 'n'
        15: 1,  # 'o'
        26: 0,  # 'p'
        7: 2,  # 'r'
        8: 0,  # 's'
        9: 1,  # 't'
        14: 0,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 2,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    50: {  # 'Ö'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 1,  # 'D'
        29: 2,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 2,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 1,  # 'N'
        42: 2,  # 'O'
        48: 2,  # 'P'
        44: 1,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 2,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 2,  # 'b'
        28: 1,  # 'c'
        12: 2,  # 'd'
        2: 0,  # 'e'
        18: 1,  # 'f'
        27: 1,  # 'g'
        25: 1,  # 'h'
        3: 2,  # 'i'
        24: 0,  # 'j'
        10: 2,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 3,  # 'n'
        15: 2,  # 'o'
        26: 2,  # 'p'
        7: 3,  # 'r'
        8: 1,  # 's'
        9: 2,  # 't'
        14: 0,  # 'u'
        32: 1,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 2,  # 'ö'
        17: 2,  # 'ü'
        30: 1,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    55: {  # 'Ü'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 1,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 1,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 2,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 1,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 1,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 1,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 1,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 1,  # 'İ'
        6: 0,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    59: {  # 'â'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 1,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 2,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 0,  # 'j'
        10: 0,  # 'k'
        5: 0,  # 'l'
        13: 2,  # 'm'
        4: 0,  # 'n'
        15: 1,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 2,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 1,  # 'ı'
        40: 1,  # 'Ş'
        19: 0,  # 'ş'
    },
    33: {  # 'ç'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 3,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 0,  # 'Z'
        1: 0,  # 'a'
        21: 3,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 0,  # 'e'
        18: 2,  # 'f'
        27: 1,  # 'g'
        25: 3,  # 'h'
        3: 3,  # 'i'
        24: 0,  # 'j'
        10: 3,  # 'k'
        5: 0,  # 'l'
        13: 0,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 3,  # 'r'
        8: 2,  # 's'
        9: 3,  # 't'
        14: 0,  # 'u'
        32: 2,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 1,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    61: {  # 'î'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 0,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 0,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 1,  # 'Z'
        1: 2,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 1,  # 'j'
        10: 0,  # 'k'
        5: 0,  # 'l'
        13: 1,  # 'm'
        4: 1,  # 'n'
        15: 0,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 1,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 1,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 1,  # 'î'
        34: 0,  # 'ö'
        17: 0,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 1,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    34: {  # 'ö'
        23: 0,  # 'A'
        37: 1,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 1,  # 'G'
        45: 1,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 1,  # 'L'
        20: 0,  # 'M'
        46: 1,  # 'N'
        42: 1,  # 'O'
        48: 2,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 1,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 2,  # 'c'
        12: 1,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 2,  # 'g'
        25: 2,  # 'h'
        3: 1,  # 'i'
        24: 2,  # 'j'
        10: 1,  # 'k'
        5: 2,  # 'l'
        13: 3,  # 'm'
        4: 2,  # 'n'
        15: 2,  # 'o'
        26: 0,  # 'p'
        7: 0,  # 'r'
        8: 3,  # 's'
        9: 1,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 1,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 2,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 2,  # 'ö'
        17: 0,  # 'ü'
        30: 2,  # 'ğ'
        41: 1,  # 'İ'
        6: 1,  # 'ı'
        40: 2,  # 'Ş'
        19: 1,  # 'ş'
    },
    17: {  # 'ü'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 0,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 1,  # 'J'
        16: 1,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 0,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 0,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 0,  # 'c'
        12: 1,  # 'd'
        2: 3,  # 'e'
        18: 1,  # 'f'
        27: 2,  # 'g'
        25: 0,  # 'h'
        3: 1,  # 'i'
        24: 1,  # 'j'
        10: 2,  # 'k'
        5: 3,  # 'l'
        13: 2,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 2,  # 'p'
        7: 2,  # 'r'
        8: 3,  # 's'
        9: 2,  # 't'
        14: 3,  # 'u'
        32: 1,  # 'v'
        57: 1,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 2,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    30: {  # 'ğ'
        23: 0,  # 'A'
        37: 2,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 1,  # 'G'
        45: 0,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 1,  # 'M'
        46: 2,  # 'N'
        42: 2,  # 'O'
        48: 1,  # 'P'
        44: 1,  # 'R'
        35: 0,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 2,  # 'V'
        62: 0,  # 'W'
        43: 2,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 0,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 2,  # 'e'
        18: 0,  # 'f'
        27: 0,  # 'g'
        25: 0,  # 'h'
        3: 0,  # 'i'
        24: 3,  # 'j'
        10: 1,  # 'k'
        5: 2,  # 'l'
        13: 3,  # 'm'
        4: 0,  # 'n'
        15: 1,  # 'o'
        26: 0,  # 'p'
        7: 1,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 2,  # 'Ç'
        50: 2,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 0,  # 'î'
        34: 2,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 2,  # 'İ'
        6: 2,  # 'ı'
        40: 2,  # 'Ş'
        19: 1,  # 'ş'
    },
    41: {  # 'İ'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 1,  # 'D'
        29: 1,  # 'E'
        52: 0,  # 'F'
        36: 2,  # 'G'
        45: 2,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 1,  # 'N'
        42: 1,  # 'O'
        48: 2,  # 'P'
        44: 0,  # 'R'
        35: 1,  # 'S'
        31: 1,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 2,  # 'Y'
        56: 0,  # 'Z'
        1: 1,  # 'a'
        21: 2,  # 'b'
        28: 1,  # 'c'
        12: 2,  # 'd'
        2: 1,  # 'e'
        18: 0,  # 'f'
        27: 3,  # 'g'
        25: 2,  # 'h'
        3: 2,  # 'i'
        24: 2,  # 'j'
        10: 2,  # 'k'
        5: 0,  # 'l'
        13: 1,  # 'm'
        4: 3,  # 'n'
        15: 1,  # 'o'
        26: 1,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 2,  # 't'
        14: 0,  # 'u'
        32: 0,  # 'v'
        57: 1,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 1,  # 'Ü'
        59: 1,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 1,  # 'ö'
        17: 1,  # 'ü'
        30: 2,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 1,  # 'ş'
    },
    6: {  # 'ı'
        23: 2,  # 'A'
        37: 0,  # 'B'
        47: 0,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 2,  # 'J'
        16: 3,  # 'K'
        49: 0,  # 'L'
        20: 3,  # 'M'
        46: 1,  # 'N'
        42: 0,  # 'O'
        48: 0,  # 'P'
        44: 0,  # 'R'
        35: 0,  # 'S'
        31: 2,  # 'T'
        51: 0,  # 'U'
        38: 0,  # 'V'
        62: 0,  # 'W'
        43: 2,  # 'Y'
        56: 1,  # 'Z'
        1: 3,  # 'a'
        21: 2,  # 'b'
        28: 1,  # 'c'
        12: 3,  # 'd'
        2: 3,  # 'e'
        18: 3,  # 'f'
        27: 3,  # 'g'
        25: 2,  # 'h'
        3: 3,  # 'i'
        24: 3,  # 'j'
        10: 3,  # 'k'
        5: 3,  # 'l'
        13: 3,  # 'm'
        4: 3,  # 'n'
        15: 0,  # 'o'
        26: 3,  # 'p'
        7: 3,  # 'r'
        8: 3,  # 's'
        9: 3,  # 't'
        14: 3,  # 'u'
        32: 3,  # 'v'
        57: 1,  # 'w'
        58: 1,  # 'x'
        11: 3,  # 'y'
        22: 0,  # 'z'
        63: 1,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 2,  # 'ç'
        61: 0,  # 'î'
        34: 0,  # 'ö'
        17: 3,  # 'ü'
        30: 0,  # 'ğ'
        41: 0,  # 'İ'
        6: 3,  # 'ı'
        40: 0,  # 'Ş'
        19: 0,  # 'ş'
    },
    40: {  # 'Ş'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 1,  # 'D'
        29: 1,  # 'E'
        52: 0,  # 'F'
        36: 1,  # 'G'
        45: 2,  # 'H'
        53: 1,  # 'I'
        60: 0,  # 'J'
        16: 0,  # 'K'
        49: 0,  # 'L'
        20: 2,  # 'M'
        46: 1,  # 'N'
        42: 1,  # 'O'
        48: 2,  # 'P'
        44: 2,  # 'R'
        35: 1,  # 'S'
        31: 1,  # 'T'
        51: 0,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 2,  # 'Y'
        56: 1,  # 'Z'
        1: 0,  # 'a'
        21: 2,  # 'b'
        28: 0,  # 'c'
        12: 2,  # 'd'
        2: 0,  # 'e'
        18: 3,  # 'f'
        27: 0,  # 'g'
        25: 2,  # 'h'
        3: 3,  # 'i'
        24: 2,  # 'j'
        10: 1,  # 'k'
        5: 0,  # 'l'
        13: 1,  # 'm'
        4: 3,  # 'n'
        15: 2,  # 'o'
        26: 0,  # 'p'
        7: 3,  # 'r'
        8: 2,  # 's'
        9: 2,  # 't'
        14: 1,  # 'u'
        32: 3,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 2,  # 'y'
        22: 0,  # 'z'
        63: 0,  # '·'
        54: 0,  # 'Ç'
        50: 0,  # 'Ö'
        55: 1,  # 'Ü'
        59: 0,  # 'â'
        33: 0,  # 'ç'
        61: 0,  # 'î'
        34: 2,  # 'ö'
        17: 1,  # 'ü'
        30: 2,  # 'ğ'
        41: 0,  # 'İ'
        6: 2,  # 'ı'
        40: 1,  # 'Ş'
        19: 2,  # 'ş'
    },
    19: {  # 'ş'
        23: 0,  # 'A'
        37: 0,  # 'B'
        47: 1,  # 'C'
        39: 0,  # 'D'
        29: 0,  # 'E'
        52: 2,  # 'F'
        36: 1,  # 'G'
        45: 0,  # 'H'
        53: 0,  # 'I'
        60: 0,  # 'J'
        16: 3,  # 'K'
        49: 2,  # 'L'
        20: 0,  # 'M'
        46: 1,  # 'N'
        42: 1,  # 'O'
        48: 1,  # 'P'
        44: 1,  # 'R'
        35: 1,  # 'S'
        31: 0,  # 'T'
        51: 1,  # 'U'
        38: 1,  # 'V'
        62: 0,  # 'W'
        43: 1,  # 'Y'
        56: 0,  # 'Z'
        1: 3,  # 'a'
        21: 1,  # 'b'
        28: 2,  # 'c'
        12: 0,  # 'd'
        2: 3,  # 'e'
        18: 0,  # 'f'
        27: 2,  # 'g'
        25: 1,  # 'h'
        3: 1,  # 'i'
        24: 0,  # 'j'
        10: 2,  # 'k'
        5: 2,  # 'l'
        13: 3,  # 'm'
        4: 0,  # 'n'
        15: 0,  # 'o'
        26: 1,  # 'p'
        7: 3,  # 'r'
        8: 0,  # 's'
        9: 0,  # 't'
        14: 3,  # 'u'
        32: 0,  # 'v'
        57: 0,  # 'w'
        58: 0,  # 'x'
        11: 0,  # 'y'
        22: 2,  # 'z'
        63: 0,  # '·'
        54: 1,  # 'Ç'
        50: 2,  # 'Ö'
        55: 0,  # 'Ü'
        59: 0,  # 'â'
        33: 1,  # 'ç'
        61: 1,  # 'î'
        34: 2,  # 'ö'
        17: 0,  # 'ü'
        30: 1,  # 'ğ'
        41: 1,  # 'İ'
        6: 1,  # 'ı'
        40: 1,  # 'Ş'
        19: 1,  # 'ş'
    },
}

# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters

# Character Mapping Table(s):
ISO_8859_9_TURKISH_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 255,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 255,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 255,  # ' '
    33: 255,  # '!'
    34: 255,  # '"'
    35: 255,  # '#'
    36: 255,  # '$'
    37: 255,  # '%'
    38: 255,  # '&'
    39: 255,  # "'"
    40: 255,  # '('
    41: 255,  # ')'
    42: 255,  # '*'
    43: 255,  # '+'
    44: 255,  # ','
    45: 255,  # '-'
    46: 255,  # '.'
    47: 255,  # '/'
    48: 255,  # '0'
    49: 255,  # '1'
    50: 255,  # '2'
    51: 255,  # '3'
    52: 255,  # '4'
    53: 255,  # '5'
    54: 255,  # '6'
    55: 255,  # '7'
    56: 255,  # '8'
    57: 255,  # '9'
    58: 255,  # ':'
    59: 255,  # ';'
    60: 255,  # '<'
    61: 255,  # '='
    62: 255,  # '>'
    63: 255,  # '?'
    64: 255,  # '@'
    65: 23,  # 'A'
    66: 37,  # 'B'
    67: 47,  # 'C'
    68: 39,  # 'D'
    69: 29,  # 'E'
    70: 52,  # 'F'
    71: 36,  # 'G'
    72: 45,  # 'H'
    73: 53,  # 'I'
    74: 60,  # 'J'
    75: 16,  # 'K'
    76: 49,  # 'L'
    77: 20,  # 'M'
    78: 46,  # 'N'
    79: 42,  # 'O'
    80: 48,  # 'P'
    81: 69,  # 'Q'
    82: 44,  # 'R'
    83: 35,  # 'S'
    84: 31,  # 'T'
    85: 51,  # 'U'
    86: 38,  # 'V'
    87: 62,  # 'W'
    88: 65,  # 'X'
    89: 43,  # 'Y'
    90: 56,  # 'Z'
    91: 255,  # '['
    92: 255,  # '\\'
    93: 255,  # ']'
    94: 255,  # '^'
    95: 255,  # '_'
    96: 255,  # '`'
    97: 1,  # 'a'
    98: 21,  # 'b'
    99: 28,  # 'c'
    100: 12,  # 'd'
    101: 2,  # 'e'
    102: 18,  # 'f'
    103: 27,  # 'g'
    104: 25,  # 'h'
    105: 3,  # 'i'
    106: 24,  # 'j'
    107: 10,  # 'k'
    108: 5,  # 'l'
    109: 13,  # 'm'
    110: 4,  # 'n'
    111: 15,  # 'o'
    112: 26,  # 'p'
    113: 64,  # 'q'
    114: 7,  # 'r'
    115: 8,  # 's'
    116: 9,  # 't'
    117: 14,  # 'u'
    118: 32,  # 'v'
    119: 57,  # 'w'
    120: 58,  # 'x'
    121: 11,  # 'y'
    122: 22,  # 'z'
    123: 255,  # '{'
    124: 255,  # '|'
    125: 255,  # '}'
    126: 255,  # '~'
    127: 255,  # '\x7f'
    128: 180,  # '\x80'
    129: 179,  # '\x81'
    130: 178,  # '\x82'
    131: 177,  # '\x83'
    132: 176,  # '\x84'
    133: 175,  # '\x85'
    134: 174,  # '\x86'
    135: 173,  # '\x87'
    136: 172,  # '\x88'
    137: 171,  # '\x89'
    138: 170,  # '\x8a'
    139: 169,  # '\x8b'
    140: 168,  # '\x8c'
    141: 167,  # '\x8d'
    142: 166,  # '\x8e'
    143: 165,  # '\x8f'
    144: 164,  # '\x90'
    145: 163,  # '\x91'
    146: 162,  # '\x92'
    147: 161,  # '\x93'
    148: 160,  # '\x94'
    149: 159,  # '\x95'
    150: 101,  # '\x96'
    151: 158,  # '\x97'
    152: 157,  # '\x98'
    153: 156,  # '\x99'
    154: 155,  # '\x9a'
    155: 154,  # '\x9b'
    156: 153,  # '\x9c'
    157: 152,  # '\x9d'
    158: 151,  # '\x9e'
    159: 106,  # '\x9f'
    160: 150,  # '\xa0'
    161: 149,  # '¡'
    162: 148,  # '¢'
    163: 147,  # '£'
    164: 146,  # '¤'
    165: 145,  # '¥'
    166: 144,  # '¦'
    167: 100,  # '§'
    168: 143,  # '¨'
    169: 142,  # '©'
    170: 141,  # 'ª'
    171: 140,  # '«'
    172: 139,  # '¬'
    173: 138,  # '\xad'
    174: 137,  # '®'
    175: 136,  # '¯'
    176: 94,  # '°'
    177: 80,  # '±'
    178: 93,  # '²'
    179: 135,  # '³'
    180: 105,  # '´'
    181: 134,  # 'µ'
    182: 133,  # '¶'
    183: 63,  # '·'
    184: 132,  # '¸'
    185: 131,  # '¹'
    186: 130,  # 'º'
    187: 129,  # '»'
    188: 128,  # '¼'
    189: 127,  # '½'
    190: 126,  # '¾'
    191: 125,  # '¿'
    192: 124,  # 'À'
    193: 104,  # 'Á'
    194: 73,  # 'Â'
    195: 99,  # 'Ã'
    196: 79,  # 'Ä'
    197: 85,  # 'Å'
    198: 123,  # 'Æ'
    199: 54,  # 'Ç'
    200: 122,  # 'È'
    201: 98,  # 'É'
    202: 92,  # 'Ê'
    203: 121,  # 'Ë'
    204: 120,  # 'Ì'
    205: 91,  # 'Í'
    206: 103,  # 'Î'
    207: 119,  # 'Ï'
    208: 68,  # 'Ğ'
    209: 118,  # 'Ñ'
    210: 117,  # 'Ò'
    211: 97,  # 'Ó'
    212: 116,  # 'Ô'
    213: 115,  # 'Õ'
    214: 50,  # 'Ö'
    215: 90,  # '×'
    216: 114,  # 'Ø'
    217: 113,  # 'Ù'
    218: 112,  # 'Ú'
    219: 111,  # 'Û'
    220: 55,  # 'Ü'
    221: 41,  # 'İ'
    222: 40,  # 'Ş'
    223: 86,  # 'ß'
    224: 89,  # 'à'
    225: 70,  # 'á'
    226: 59,  # 'â'
    227: 78,  # 'ã'
    228: 71,  # 'ä'
    229: 82,  # 'å'
    230: 88,  # 'æ'
    231: 33,  # 'ç'
    232: 77,  # 'è'
    233: 66,  # 'é'
    234: 84,  # 'ê'
    235: 83,  # 'ë'
    236: 110,  # 'ì'
    237: 75,  # 'í'
    238: 61,  # 'î'
    239: 96,  # 'ï'
    240: 30,  # 'ğ'
    241: 67,  # 'ñ'
    242: 109,  # 'ò'
    243: 74,  # 'ó'
    244: 87,  # 'ô'
    245: 102,  # 'õ'
    246: 34,  # 'ö'
    247: 95,  # '÷'
    248: 81,  # 'ø'
    249: 108,  # 'ù'
    250: 76,  # 'ú'
    251: 72,  # 'û'
    252: 17,  # 'ü'
    253: 6,  # 'ı'
    254: 19,  # 'ş'
    255: 107,  # 'ÿ'
}

ISO_8859_9_TURKISH_MODEL = SingleByteCharSetModel(
    charset_name="ISO-8859-9",
    language="Turkish",
    char_to_order_map=ISO_8859_9_TURKISH_CHAR_TO_ORDER,
    language_model=TURKISH_LANG_MODEL,
    typical_positive_ratio=0.97029,
    keep_ascii_letters=True,
    alphabet="ABCDEFGHIJKLMNOPRSTUVYZabcdefghijklmnoprstuvyzÂÇÎÖÛÜâçîöûüĞğİıŞş",
)
python3.12/site-packages/pip/_vendor/chardet/johabfreq.py000064400000123002151732703330017264 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# The frequency data itself is the same as euc-kr.
# This is just a mapping table to euc-kr.

JOHAB_TO_EUCKR_ORDER_TABLE = {
    0x8861: 0,
    0x8862: 1,
    0x8865: 2,
    0x8868: 3,
    0x8869: 4,
    0x886A: 5,
    0x886B: 6,
    0x8871: 7,
    0x8873: 8,
    0x8874: 9,
    0x8875: 10,
    0x8876: 11,
    0x8877: 12,
    0x8878: 13,
    0x8879: 14,
    0x887B: 15,
    0x887C: 16,
    0x887D: 17,
    0x8881: 18,
    0x8882: 19,
    0x8885: 20,
    0x8889: 21,
    0x8891: 22,
    0x8893: 23,
    0x8895: 24,
    0x8896: 25,
    0x8897: 26,
    0x88A1: 27,
    0x88A2: 28,
    0x88A5: 29,
    0x88A9: 30,
    0x88B5: 31,
    0x88B7: 32,
    0x88C1: 33,
    0x88C5: 34,
    0x88C9: 35,
    0x88E1: 36,
    0x88E2: 37,
    0x88E5: 38,
    0x88E8: 39,
    0x88E9: 40,
    0x88EB: 41,
    0x88F1: 42,
    0x88F3: 43,
    0x88F5: 44,
    0x88F6: 45,
    0x88F7: 46,
    0x88F8: 47,
    0x88FB: 48,
    0x88FC: 49,
    0x88FD: 50,
    0x8941: 51,
    0x8945: 52,
    0x8949: 53,
    0x8951: 54,
    0x8953: 55,
    0x8955: 56,
    0x8956: 57,
    0x8957: 58,
    0x8961: 59,
    0x8962: 60,
    0x8963: 61,
    0x8965: 62,
    0x8968: 63,
    0x8969: 64,
    0x8971: 65,
    0x8973: 66,
    0x8975: 67,
    0x8976: 68,
    0x8977: 69,
    0x897B: 70,
    0x8981: 71,
    0x8985: 72,
    0x8989: 73,
    0x8993: 74,
    0x8995: 75,
    0x89A1: 76,
    0x89A2: 77,
    0x89A5: 78,
    0x89A8: 79,
    0x89A9: 80,
    0x89AB: 81,
    0x89AD: 82,
    0x89B0: 83,
    0x89B1: 84,
    0x89B3: 85,
    0x89B5: 86,
    0x89B7: 87,
    0x89B8: 88,
    0x89C1: 89,
    0x89C2: 90,
    0x89C5: 91,
    0x89C9: 92,
    0x89CB: 93,
    0x89D1: 94,
    0x89D3: 95,
    0x89D5: 96,
    0x89D7: 97,
    0x89E1: 98,
    0x89E5: 99,
    0x89E9: 100,
    0x89F3: 101,
    0x89F6: 102,
    0x89F7: 103,
    0x8A41: 104,
    0x8A42: 105,
    0x8A45: 106,
    0x8A49: 107,
    0x8A51: 108,
    0x8A53: 109,
    0x8A55: 110,
    0x8A57: 111,
    0x8A61: 112,
    0x8A65: 113,
    0x8A69: 114,
    0x8A73: 115,
    0x8A75: 116,
    0x8A81: 117,
    0x8A82: 118,
    0x8A85: 119,
    0x8A88: 120,
    0x8A89: 121,
    0x8A8A: 122,
    0x8A8B: 123,
    0x8A90: 124,
    0x8A91: 125,
    0x8A93: 126,
    0x8A95: 127,
    0x8A97: 128,
    0x8A98: 129,
    0x8AA1: 130,
    0x8AA2: 131,
    0x8AA5: 132,
    0x8AA9: 133,
    0x8AB6: 134,
    0x8AB7: 135,
    0x8AC1: 136,
    0x8AD5: 137,
    0x8AE1: 138,
    0x8AE2: 139,
    0x8AE5: 140,
    0x8AE9: 141,
    0x8AF1: 142,
    0x8AF3: 143,
    0x8AF5: 144,
    0x8B41: 145,
    0x8B45: 146,
    0x8B49: 147,
    0x8B61: 148,
    0x8B62: 149,
    0x8B65: 150,
    0x8B68: 151,
    0x8B69: 152,
    0x8B6A: 153,
    0x8B71: 154,
    0x8B73: 155,
    0x8B75: 156,
    0x8B77: 157,
    0x8B81: 158,
    0x8BA1: 159,
    0x8BA2: 160,
    0x8BA5: 161,
    0x8BA8: 162,
    0x8BA9: 163,
    0x8BAB: 164,
    0x8BB1: 165,
    0x8BB3: 166,
    0x8BB5: 167,
    0x8BB7: 168,
    0x8BB8: 169,
    0x8BBC: 170,
    0x8C61: 171,
    0x8C62: 172,
    0x8C63: 173,
    0x8C65: 174,
    0x8C69: 175,
    0x8C6B: 176,
    0x8C71: 177,
    0x8C73: 178,
    0x8C75: 179,
    0x8C76: 180,
    0x8C77: 181,
    0x8C7B: 182,
    0x8C81: 183,
    0x8C82: 184,
    0x8C85: 185,
    0x8C89: 186,
    0x8C91: 187,
    0x8C93: 188,
    0x8C95: 189,
    0x8C96: 190,
    0x8C97: 191,
    0x8CA1: 192,
    0x8CA2: 193,
    0x8CA9: 194,
    0x8CE1: 195,
    0x8CE2: 196,
    0x8CE3: 197,
    0x8CE5: 198,
    0x8CE9: 199,
    0x8CF1: 200,
    0x8CF3: 201,
    0x8CF5: 202,
    0x8CF6: 203,
    0x8CF7: 204,
    0x8D41: 205,
    0x8D42: 206,
    0x8D45: 207,
    0x8D51: 208,
    0x8D55: 209,
    0x8D57: 210,
    0x8D61: 211,
    0x8D65: 212,
    0x8D69: 213,
    0x8D75: 214,
    0x8D76: 215,
    0x8D7B: 216,
    0x8D81: 217,
    0x8DA1: 218,
    0x8DA2: 219,
    0x8DA5: 220,
    0x8DA7: 221,
    0x8DA9: 222,
    0x8DB1: 223,
    0x8DB3: 224,
    0x8DB5: 225,
    0x8DB7: 226,
    0x8DB8: 227,
    0x8DB9: 228,
    0x8DC1: 229,
    0x8DC2: 230,
    0x8DC9: 231,
    0x8DD6: 232,
    0x8DD7: 233,
    0x8DE1: 234,
    0x8DE2: 235,
    0x8DF7: 236,
    0x8E41: 237,
    0x8E45: 238,
    0x8E49: 239,
    0x8E51: 240,
    0x8E53: 241,
    0x8E57: 242,
    0x8E61: 243,
    0x8E81: 244,
    0x8E82: 245,
    0x8E85: 246,
    0x8E89: 247,
    0x8E90: 248,
    0x8E91: 249,
    0x8E93: 250,
    0x8E95: 251,
    0x8E97: 252,
    0x8E98: 253,
    0x8EA1: 254,
    0x8EA9: 255,
    0x8EB6: 256,
    0x8EB7: 257,
    0x8EC1: 258,
    0x8EC2: 259,
    0x8EC5: 260,
    0x8EC9: 261,
    0x8ED1: 262,
    0x8ED3: 263,
    0x8ED6: 264,
    0x8EE1: 265,
    0x8EE5: 266,
    0x8EE9: 267,
    0x8EF1: 268,
    0x8EF3: 269,
    0x8F41: 270,
    0x8F61: 271,
    0x8F62: 272,
    0x8F65: 273,
    0x8F67: 274,
    0x8F69: 275,
    0x8F6B: 276,
    0x8F70: 277,
    0x8F71: 278,
    0x8F73: 279,
    0x8F75: 280,
    0x8F77: 281,
    0x8F7B: 282,
    0x8FA1: 283,
    0x8FA2: 284,
    0x8FA5: 285,
    0x8FA9: 286,
    0x8FB1: 287,
    0x8FB3: 288,
    0x8FB5: 289,
    0x8FB7: 290,
    0x9061: 291,
    0x9062: 292,
    0x9063: 293,
    0x9065: 294,
    0x9068: 295,
    0x9069: 296,
    0x906A: 297,
    0x906B: 298,
    0x9071: 299,
    0x9073: 300,
    0x9075: 301,
    0x9076: 302,
    0x9077: 303,
    0x9078: 304,
    0x9079: 305,
    0x907B: 306,
    0x907D: 307,
    0x9081: 308,
    0x9082: 309,
    0x9085: 310,
    0x9089: 311,
    0x9091: 312,
    0x9093: 313,
    0x9095: 314,
    0x9096: 315,
    0x9097: 316,
    0x90A1: 317,
    0x90A2: 318,
    0x90A5: 319,
    0x90A9: 320,
    0x90B1: 321,
    0x90B7: 322,
    0x90E1: 323,
    0x90E2: 324,
    0x90E4: 325,
    0x90E5: 326,
    0x90E9: 327,
    0x90EB: 328,
    0x90EC: 329,
    0x90F1: 330,
    0x90F3: 331,
    0x90F5: 332,
    0x90F6: 333,
    0x90F7: 334,
    0x90FD: 335,
    0x9141: 336,
    0x9142: 337,
    0x9145: 338,
    0x9149: 339,
    0x9151: 340,
    0x9153: 341,
    0x9155: 342,
    0x9156: 343,
    0x9157: 344,
    0x9161: 345,
    0x9162: 346,
    0x9165: 347,
    0x9169: 348,
    0x9171: 349,
    0x9173: 350,
    0x9176: 351,
    0x9177: 352,
    0x917A: 353,
    0x9181: 354,
    0x9185: 355,
    0x91A1: 356,
    0x91A2: 357,
    0x91A5: 358,
    0x91A9: 359,
    0x91AB: 360,
    0x91B1: 361,
    0x91B3: 362,
    0x91B5: 363,
    0x91B7: 364,
    0x91BC: 365,
    0x91BD: 366,
    0x91C1: 367,
    0x91C5: 368,
    0x91C9: 369,
    0x91D6: 370,
    0x9241: 371,
    0x9245: 372,
    0x9249: 373,
    0x9251: 374,
    0x9253: 375,
    0x9255: 376,
    0x9261: 377,
    0x9262: 378,
    0x9265: 379,
    0x9269: 380,
    0x9273: 381,
    0x9275: 382,
    0x9277: 383,
    0x9281: 384,
    0x9282: 385,
    0x9285: 386,
    0x9288: 387,
    0x9289: 388,
    0x9291: 389,
    0x9293: 390,
    0x9295: 391,
    0x9297: 392,
    0x92A1: 393,
    0x92B6: 394,
    0x92C1: 395,
    0x92E1: 396,
    0x92E5: 397,
    0x92E9: 398,
    0x92F1: 399,
    0x92F3: 400,
    0x9341: 401,
    0x9342: 402,
    0x9349: 403,
    0x9351: 404,
    0x9353: 405,
    0x9357: 406,
    0x9361: 407,
    0x9362: 408,
    0x9365: 409,
    0x9369: 410,
    0x936A: 411,
    0x936B: 412,
    0x9371: 413,
    0x9373: 414,
    0x9375: 415,
    0x9377: 416,
    0x9378: 417,
    0x937C: 418,
    0x9381: 419,
    0x9385: 420,
    0x9389: 421,
    0x93A1: 422,
    0x93A2: 423,
    0x93A5: 424,
    0x93A9: 425,
    0x93AB: 426,
    0x93B1: 427,
    0x93B3: 428,
    0x93B5: 429,
    0x93B7: 430,
    0x93BC: 431,
    0x9461: 432,
    0x9462: 433,
    0x9463: 434,
    0x9465: 435,
    0x9468: 436,
    0x9469: 437,
    0x946A: 438,
    0x946B: 439,
    0x946C: 440,
    0x9470: 441,
    0x9471: 442,
    0x9473: 443,
    0x9475: 444,
    0x9476: 445,
    0x9477: 446,
    0x9478: 447,
    0x9479: 448,
    0x947D: 449,
    0x9481: 450,
    0x9482: 451,
    0x9485: 452,
    0x9489: 453,
    0x9491: 454,
    0x9493: 455,
    0x9495: 456,
    0x9496: 457,
    0x9497: 458,
    0x94A1: 459,
    0x94E1: 460,
    0x94E2: 461,
    0x94E3: 462,
    0x94E5: 463,
    0x94E8: 464,
    0x94E9: 465,
    0x94EB: 466,
    0x94EC: 467,
    0x94F1: 468,
    0x94F3: 469,
    0x94F5: 470,
    0x94F7: 471,
    0x94F9: 472,
    0x94FC: 473,
    0x9541: 474,
    0x9542: 475,
    0x9545: 476,
    0x9549: 477,
    0x9551: 478,
    0x9553: 479,
    0x9555: 480,
    0x9556: 481,
    0x9557: 482,
    0x9561: 483,
    0x9565: 484,
    0x9569: 485,
    0x9576: 486,
    0x9577: 487,
    0x9581: 488,
    0x9585: 489,
    0x95A1: 490,
    0x95A2: 491,
    0x95A5: 492,
    0x95A8: 493,
    0x95A9: 494,
    0x95AB: 495,
    0x95AD: 496,
    0x95B1: 497,
    0x95B3: 498,
    0x95B5: 499,
    0x95B7: 500,
    0x95B9: 501,
    0x95BB: 502,
    0x95C1: 503,
    0x95C5: 504,
    0x95C9: 505,
    0x95E1: 506,
    0x95F6: 507,
    0x9641: 508,
    0x9645: 509,
    0x9649: 510,
    0x9651: 511,
    0x9653: 512,
    0x9655: 513,
    0x9661: 514,
    0x9681: 515,
    0x9682: 516,
    0x9685: 517,
    0x9689: 518,
    0x9691: 519,
    0x9693: 520,
    0x9695: 521,
    0x9697: 522,
    0x96A1: 523,
    0x96B6: 524,
    0x96C1: 525,
    0x96D7: 526,
    0x96E1: 527,
    0x96E5: 528,
    0x96E9: 529,
    0x96F3: 530,
    0x96F5: 531,
    0x96F7: 532,
    0x9741: 533,
    0x9745: 534,
    0x9749: 535,
    0x9751: 536,
    0x9757: 537,
    0x9761: 538,
    0x9762: 539,
    0x9765: 540,
    0x9768: 541,
    0x9769: 542,
    0x976B: 543,
    0x9771: 544,
    0x9773: 545,
    0x9775: 546,
    0x9777: 547,
    0x9781: 548,
    0x97A1: 549,
    0x97A2: 550,
    0x97A5: 551,
    0x97A8: 552,
    0x97A9: 553,
    0x97B1: 554,
    0x97B3: 555,
    0x97B5: 556,
    0x97B6: 557,
    0x97B7: 558,
    0x97B8: 559,
    0x9861: 560,
    0x9862: 561,
    0x9865: 562,
    0x9869: 563,
    0x9871: 564,
    0x9873: 565,
    0x9875: 566,
    0x9876: 567,
    0x9877: 568,
    0x987D: 569,
    0x9881: 570,
    0x9882: 571,
    0x9885: 572,
    0x9889: 573,
    0x9891: 574,
    0x9893: 575,
    0x9895: 576,
    0x9896: 577,
    0x9897: 578,
    0x98E1: 579,
    0x98E2: 580,
    0x98E5: 581,
    0x98E9: 582,
    0x98EB: 583,
    0x98EC: 584,
    0x98F1: 585,
    0x98F3: 586,
    0x98F5: 587,
    0x98F6: 588,
    0x98F7: 589,
    0x98FD: 590,
    0x9941: 591,
    0x9942: 592,
    0x9945: 593,
    0x9949: 594,
    0x9951: 595,
    0x9953: 596,
    0x9955: 597,
    0x9956: 598,
    0x9957: 599,
    0x9961: 600,
    0x9976: 601,
    0x99A1: 602,
    0x99A2: 603,
    0x99A5: 604,
    0x99A9: 605,
    0x99B7: 606,
    0x99C1: 607,
    0x99C9: 608,
    0x99E1: 609,
    0x9A41: 610,
    0x9A45: 611,
    0x9A81: 612,
    0x9A82: 613,
    0x9A85: 614,
    0x9A89: 615,
    0x9A90: 616,
    0x9A91: 617,
    0x9A97: 618,
    0x9AC1: 619,
    0x9AE1: 620,
    0x9AE5: 621,
    0x9AE9: 622,
    0x9AF1: 623,
    0x9AF3: 624,
    0x9AF7: 625,
    0x9B61: 626,
    0x9B62: 627,
    0x9B65: 628,
    0x9B68: 629,
    0x9B69: 630,
    0x9B71: 631,
    0x9B73: 632,
    0x9B75: 633,
    0x9B81: 634,
    0x9B85: 635,
    0x9B89: 636,
    0x9B91: 637,
    0x9B93: 638,
    0x9BA1: 639,
    0x9BA5: 640,
    0x9BA9: 641,
    0x9BB1: 642,
    0x9BB3: 643,
    0x9BB5: 644,
    0x9BB7: 645,
    0x9C61: 646,
    0x9C62: 647,
    0x9C65: 648,
    0x9C69: 649,
    0x9C71: 650,
    0x9C73: 651,
    0x9C75: 652,
    0x9C76: 653,
    0x9C77: 654,
    0x9C78: 655,
    0x9C7C: 656,
    0x9C7D: 657,
    0x9C81: 658,
    0x9C82: 659,
    0x9C85: 660,
    0x9C89: 661,
    0x9C91: 662,
    0x9C93: 663,
    0x9C95: 664,
    0x9C96: 665,
    0x9C97: 666,
    0x9CA1: 667,
    0x9CA2: 668,
    0x9CA5: 669,
    0x9CB5: 670,
    0x9CB7: 671,
    0x9CE1: 672,
    0x9CE2: 673,
    0x9CE5: 674,
    0x9CE9: 675,
    0x9CF1: 676,
    0x9CF3: 677,
    0x9CF5: 678,
    0x9CF6: 679,
    0x9CF7: 680,
    0x9CFD: 681,
    0x9D41: 682,
    0x9D42: 683,
    0x9D45: 684,
    0x9D49: 685,
    0x9D51: 686,
    0x9D53: 687,
    0x9D55: 688,
    0x9D57: 689,
    0x9D61: 690,
    0x9D62: 691,
    0x9D65: 692,
    0x9D69: 693,
    0x9D71: 694,
    0x9D73: 695,
    0x9D75: 696,
    0x9D76: 697,
    0x9D77: 698,
    0x9D81: 699,
    0x9D85: 700,
    0x9D93: 701,
    0x9D95: 702,
    0x9DA1: 703,
    0x9DA2: 704,
    0x9DA5: 705,
    0x9DA9: 706,
    0x9DB1: 707,
    0x9DB3: 708,
    0x9DB5: 709,
    0x9DB7: 710,
    0x9DC1: 711,
    0x9DC5: 712,
    0x9DD7: 713,
    0x9DF6: 714,
    0x9E41: 715,
    0x9E45: 716,
    0x9E49: 717,
    0x9E51: 718,
    0x9E53: 719,
    0x9E55: 720,
    0x9E57: 721,
    0x9E61: 722,
    0x9E65: 723,
    0x9E69: 724,
    0x9E73: 725,
    0x9E75: 726,
    0x9E77: 727,
    0x9E81: 728,
    0x9E82: 729,
    0x9E85: 730,
    0x9E89: 731,
    0x9E91: 732,
    0x9E93: 733,
    0x9E95: 734,
    0x9E97: 735,
    0x9EA1: 736,
    0x9EB6: 737,
    0x9EC1: 738,
    0x9EE1: 739,
    0x9EE2: 740,
    0x9EE5: 741,
    0x9EE9: 742,
    0x9EF1: 743,
    0x9EF5: 744,
    0x9EF7: 745,
    0x9F41: 746,
    0x9F42: 747,
    0x9F45: 748,
    0x9F49: 749,
    0x9F51: 750,
    0x9F53: 751,
    0x9F55: 752,
    0x9F57: 753,
    0x9F61: 754,
    0x9F62: 755,
    0x9F65: 756,
    0x9F69: 757,
    0x9F71: 758,
    0x9F73: 759,
    0x9F75: 760,
    0x9F77: 761,
    0x9F78: 762,
    0x9F7B: 763,
    0x9F7C: 764,
    0x9FA1: 765,
    0x9FA2: 766,
    0x9FA5: 767,
    0x9FA9: 768,
    0x9FB1: 769,
    0x9FB3: 770,
    0x9FB5: 771,
    0x9FB7: 772,
    0xA061: 773,
    0xA062: 774,
    0xA065: 775,
    0xA067: 776,
    0xA068: 777,
    0xA069: 778,
    0xA06A: 779,
    0xA06B: 780,
    0xA071: 781,
    0xA073: 782,
    0xA075: 783,
    0xA077: 784,
    0xA078: 785,
    0xA07B: 786,
    0xA07D: 787,
    0xA081: 788,
    0xA082: 789,
    0xA085: 790,
    0xA089: 791,
    0xA091: 792,
    0xA093: 793,
    0xA095: 794,
    0xA096: 795,
    0xA097: 796,
    0xA098: 797,
    0xA0A1: 798,
    0xA0A2: 799,
    0xA0A9: 800,
    0xA0B7: 801,
    0xA0E1: 802,
    0xA0E2: 803,
    0xA0E5: 804,
    0xA0E9: 805,
    0xA0EB: 806,
    0xA0F1: 807,
    0xA0F3: 808,
    0xA0F5: 809,
    0xA0F7: 810,
    0xA0F8: 811,
    0xA0FD: 812,
    0xA141: 813,
    0xA142: 814,
    0xA145: 815,
    0xA149: 816,
    0xA151: 817,
    0xA153: 818,
    0xA155: 819,
    0xA156: 820,
    0xA157: 821,
    0xA161: 822,
    0xA162: 823,
    0xA165: 824,
    0xA169: 825,
    0xA175: 826,
    0xA176: 827,
    0xA177: 828,
    0xA179: 829,
    0xA181: 830,
    0xA1A1: 831,
    0xA1A2: 832,
    0xA1A4: 833,
    0xA1A5: 834,
    0xA1A9: 835,
    0xA1AB: 836,
    0xA1B1: 837,
    0xA1B3: 838,
    0xA1B5: 839,
    0xA1B7: 840,
    0xA1C1: 841,
    0xA1C5: 842,
    0xA1D6: 843,
    0xA1D7: 844,
    0xA241: 845,
    0xA245: 846,
    0xA249: 847,
    0xA253: 848,
    0xA255: 849,
    0xA257: 850,
    0xA261: 851,
    0xA265: 852,
    0xA269: 853,
    0xA273: 854,
    0xA275: 855,
    0xA281: 856,
    0xA282: 857,
    0xA283: 858,
    0xA285: 859,
    0xA288: 860,
    0xA289: 861,
    0xA28A: 862,
    0xA28B: 863,
    0xA291: 864,
    0xA293: 865,
    0xA295: 866,
    0xA297: 867,
    0xA29B: 868,
    0xA29D: 869,
    0xA2A1: 870,
    0xA2A5: 871,
    0xA2A9: 872,
    0xA2B3: 873,
    0xA2B5: 874,
    0xA2C1: 875,
    0xA2E1: 876,
    0xA2E5: 877,
    0xA2E9: 878,
    0xA341: 879,
    0xA345: 880,
    0xA349: 881,
    0xA351: 882,
    0xA355: 883,
    0xA361: 884,
    0xA365: 885,
    0xA369: 886,
    0xA371: 887,
    0xA375: 888,
    0xA3A1: 889,
    0xA3A2: 890,
    0xA3A5: 891,
    0xA3A8: 892,
    0xA3A9: 893,
    0xA3AB: 894,
    0xA3B1: 895,
    0xA3B3: 896,
    0xA3B5: 897,
    0xA3B6: 898,
    0xA3B7: 899,
    0xA3B9: 900,
    0xA3BB: 901,
    0xA461: 902,
    0xA462: 903,
    0xA463: 904,
    0xA464: 905,
    0xA465: 906,
    0xA468: 907,
    0xA469: 908,
    0xA46A: 909,
    0xA46B: 910,
    0xA46C: 911,
    0xA471: 912,
    0xA473: 913,
    0xA475: 914,
    0xA477: 915,
    0xA47B: 916,
    0xA481: 917,
    0xA482: 918,
    0xA485: 919,
    0xA489: 920,
    0xA491: 921,
    0xA493: 922,
    0xA495: 923,
    0xA496: 924,
    0xA497: 925,
    0xA49B: 926,
    0xA4A1: 927,
    0xA4A2: 928,
    0xA4A5: 929,
    0xA4B3: 930,
    0xA4E1: 931,
    0xA4E2: 932,
    0xA4E5: 933,
    0xA4E8: 934,
    0xA4E9: 935,
    0xA4EB: 936,
    0xA4F1: 937,
    0xA4F3: 938,
    0xA4F5: 939,
    0xA4F7: 940,
    0xA4F8: 941,
    0xA541: 942,
    0xA542: 943,
    0xA545: 944,
    0xA548: 945,
    0xA549: 946,
    0xA551: 947,
    0xA553: 948,
    0xA555: 949,
    0xA556: 950,
    0xA557: 951,
    0xA561: 952,
    0xA562: 953,
    0xA565: 954,
    0xA569: 955,
    0xA573: 956,
    0xA575: 957,
    0xA576: 958,
    0xA577: 959,
    0xA57B: 960,
    0xA581: 961,
    0xA585: 962,
    0xA5A1: 963,
    0xA5A2: 964,
    0xA5A3: 965,
    0xA5A5: 966,
    0xA5A9: 967,
    0xA5B1: 968,
    0xA5B3: 969,
    0xA5B5: 970,
    0xA5B7: 971,
    0xA5C1: 972,
    0xA5C5: 973,
    0xA5D6: 974,
    0xA5E1: 975,
    0xA5F6: 976,
    0xA641: 977,
    0xA642: 978,
    0xA645: 979,
    0xA649: 980,
    0xA651: 981,
    0xA653: 982,
    0xA661: 983,
    0xA665: 984,
    0xA681: 985,
    0xA682: 986,
    0xA685: 987,
    0xA688: 988,
    0xA689: 989,
    0xA68A: 990,
    0xA68B: 991,
    0xA691: 992,
    0xA693: 993,
    0xA695: 994,
    0xA697: 995,
    0xA69B: 996,
    0xA69C: 997,
    0xA6A1: 998,
    0xA6A9: 999,
    0xA6B6: 1000,
    0xA6C1: 1001,
    0xA6E1: 1002,
    0xA6E2: 1003,
    0xA6E5: 1004,
    0xA6E9: 1005,
    0xA6F7: 1006,
    0xA741: 1007,
    0xA745: 1008,
    0xA749: 1009,
    0xA751: 1010,
    0xA755: 1011,
    0xA757: 1012,
    0xA761: 1013,
    0xA762: 1014,
    0xA765: 1015,
    0xA769: 1016,
    0xA771: 1017,
    0xA773: 1018,
    0xA775: 1019,
    0xA7A1: 1020,
    0xA7A2: 1021,
    0xA7A5: 1022,
    0xA7A9: 1023,
    0xA7AB: 1024,
    0xA7B1: 1025,
    0xA7B3: 1026,
    0xA7B5: 1027,
    0xA7B7: 1028,
    0xA7B8: 1029,
    0xA7B9: 1030,
    0xA861: 1031,
    0xA862: 1032,
    0xA865: 1033,
    0xA869: 1034,
    0xA86B: 1035,
    0xA871: 1036,
    0xA873: 1037,
    0xA875: 1038,
    0xA876: 1039,
    0xA877: 1040,
    0xA87D: 1041,
    0xA881: 1042,
    0xA882: 1043,
    0xA885: 1044,
    0xA889: 1045,
    0xA891: 1046,
    0xA893: 1047,
    0xA895: 1048,
    0xA896: 1049,
    0xA897: 1050,
    0xA8A1: 1051,
    0xA8A2: 1052,
    0xA8B1: 1053,
    0xA8E1: 1054,
    0xA8E2: 1055,
    0xA8E5: 1056,
    0xA8E8: 1057,
    0xA8E9: 1058,
    0xA8F1: 1059,
    0xA8F5: 1060,
    0xA8F6: 1061,
    0xA8F7: 1062,
    0xA941: 1063,
    0xA957: 1064,
    0xA961: 1065,
    0xA962: 1066,
    0xA971: 1067,
    0xA973: 1068,
    0xA975: 1069,
    0xA976: 1070,
    0xA977: 1071,
    0xA9A1: 1072,
    0xA9A2: 1073,
    0xA9A5: 1074,
    0xA9A9: 1075,
    0xA9B1: 1076,
    0xA9B3: 1077,
    0xA9B7: 1078,
    0xAA41: 1079,
    0xAA61: 1080,
    0xAA77: 1081,
    0xAA81: 1082,
    0xAA82: 1083,
    0xAA85: 1084,
    0xAA89: 1085,
    0xAA91: 1086,
    0xAA95: 1087,
    0xAA97: 1088,
    0xAB41: 1089,
    0xAB57: 1090,
    0xAB61: 1091,
    0xAB65: 1092,
    0xAB69: 1093,
    0xAB71: 1094,
    0xAB73: 1095,
    0xABA1: 1096,
    0xABA2: 1097,
    0xABA5: 1098,
    0xABA9: 1099,
    0xABB1: 1100,
    0xABB3: 1101,
    0xABB5: 1102,
    0xABB7: 1103,
    0xAC61: 1104,
    0xAC62: 1105,
    0xAC64: 1106,
    0xAC65: 1107,
    0xAC68: 1108,
    0xAC69: 1109,
    0xAC6A: 1110,
    0xAC6B: 1111,
    0xAC71: 1112,
    0xAC73: 1113,
    0xAC75: 1114,
    0xAC76: 1115,
    0xAC77: 1116,
    0xAC7B: 1117,
    0xAC81: 1118,
    0xAC82: 1119,
    0xAC85: 1120,
    0xAC89: 1121,
    0xAC91: 1122,
    0xAC93: 1123,
    0xAC95: 1124,
    0xAC96: 1125,
    0xAC97: 1126,
    0xACA1: 1127,
    0xACA2: 1128,
    0xACA5: 1129,
    0xACA9: 1130,
    0xACB1: 1131,
    0xACB3: 1132,
    0xACB5: 1133,
    0xACB7: 1134,
    0xACC1: 1135,
    0xACC5: 1136,
    0xACC9: 1137,
    0xACD1: 1138,
    0xACD7: 1139,
    0xACE1: 1140,
    0xACE2: 1141,
    0xACE3: 1142,
    0xACE4: 1143,
    0xACE5: 1144,
    0xACE8: 1145,
    0xACE9: 1146,
    0xACEB: 1147,
    0xACEC: 1148,
    0xACF1: 1149,
    0xACF3: 1150,
    0xACF5: 1151,
    0xACF6: 1152,
    0xACF7: 1153,
    0xACFC: 1154,
    0xAD41: 1155,
    0xAD42: 1156,
    0xAD45: 1157,
    0xAD49: 1158,
    0xAD51: 1159,
    0xAD53: 1160,
    0xAD55: 1161,
    0xAD56: 1162,
    0xAD57: 1163,
    0xAD61: 1164,
    0xAD62: 1165,
    0xAD65: 1166,
    0xAD69: 1167,
    0xAD71: 1168,
    0xAD73: 1169,
    0xAD75: 1170,
    0xAD76: 1171,
    0xAD77: 1172,
    0xAD81: 1173,
    0xAD85: 1174,
    0xAD89: 1175,
    0xAD97: 1176,
    0xADA1: 1177,
    0xADA2: 1178,
    0xADA3: 1179,
    0xADA5: 1180,
    0xADA9: 1181,
    0xADAB: 1182,
    0xADB1: 1183,
    0xADB3: 1184,
    0xADB5: 1185,
    0xADB7: 1186,
    0xADBB: 1187,
    0xADC1: 1188,
    0xADC2: 1189,
    0xADC5: 1190,
    0xADC9: 1191,
    0xADD7: 1192,
    0xADE1: 1193,
    0xADE5: 1194,
    0xADE9: 1195,
    0xADF1: 1196,
    0xADF5: 1197,
    0xADF6: 1198,
    0xAE41: 1199,
    0xAE45: 1200,
    0xAE49: 1201,
    0xAE51: 1202,
    0xAE53: 1203,
    0xAE55: 1204,
    0xAE61: 1205,
    0xAE62: 1206,
    0xAE65: 1207,
    0xAE69: 1208,
    0xAE71: 1209,
    0xAE73: 1210,
    0xAE75: 1211,
    0xAE77: 1212,
    0xAE81: 1213,
    0xAE82: 1214,
    0xAE85: 1215,
    0xAE88: 1216,
    0xAE89: 1217,
    0xAE91: 1218,
    0xAE93: 1219,
    0xAE95: 1220,
    0xAE97: 1221,
    0xAE99: 1222,
    0xAE9B: 1223,
    0xAE9C: 1224,
    0xAEA1: 1225,
    0xAEB6: 1226,
    0xAEC1: 1227,
    0xAEC2: 1228,
    0xAEC5: 1229,
    0xAEC9: 1230,
    0xAED1: 1231,
    0xAED7: 1232,
    0xAEE1: 1233,
    0xAEE2: 1234,
    0xAEE5: 1235,
    0xAEE9: 1236,
    0xAEF1: 1237,
    0xAEF3: 1238,
    0xAEF5: 1239,
    0xAEF7: 1240,
    0xAF41: 1241,
    0xAF42: 1242,
    0xAF49: 1243,
    0xAF51: 1244,
    0xAF55: 1245,
    0xAF57: 1246,
    0xAF61: 1247,
    0xAF62: 1248,
    0xAF65: 1249,
    0xAF69: 1250,
    0xAF6A: 1251,
    0xAF71: 1252,
    0xAF73: 1253,
    0xAF75: 1254,
    0xAF77: 1255,
    0xAFA1: 1256,
    0xAFA2: 1257,
    0xAFA5: 1258,
    0xAFA8: 1259,
    0xAFA9: 1260,
    0xAFB0: 1261,
    0xAFB1: 1262,
    0xAFB3: 1263,
    0xAFB5: 1264,
    0xAFB7: 1265,
    0xAFBC: 1266,
    0xB061: 1267,
    0xB062: 1268,
    0xB064: 1269,
    0xB065: 1270,
    0xB069: 1271,
    0xB071: 1272,
    0xB073: 1273,
    0xB076: 1274,
    0xB077: 1275,
    0xB07D: 1276,
    0xB081: 1277,
    0xB082: 1278,
    0xB085: 1279,
    0xB089: 1280,
    0xB091: 1281,
    0xB093: 1282,
    0xB096: 1283,
    0xB097: 1284,
    0xB0B7: 1285,
    0xB0E1: 1286,
    0xB0E2: 1287,
    0xB0E5: 1288,
    0xB0E9: 1289,
    0xB0EB: 1290,
    0xB0F1: 1291,
    0xB0F3: 1292,
    0xB0F6: 1293,
    0xB0F7: 1294,
    0xB141: 1295,
    0xB145: 1296,
    0xB149: 1297,
    0xB185: 1298,
    0xB1A1: 1299,
    0xB1A2: 1300,
    0xB1A5: 1301,
    0xB1A8: 1302,
    0xB1A9: 1303,
    0xB1AB: 1304,
    0xB1B1: 1305,
    0xB1B3: 1306,
    0xB1B7: 1307,
    0xB1C1: 1308,
    0xB1C2: 1309,
    0xB1C5: 1310,
    0xB1D6: 1311,
    0xB1E1: 1312,
    0xB1F6: 1313,
    0xB241: 1314,
    0xB245: 1315,
    0xB249: 1316,
    0xB251: 1317,
    0xB253: 1318,
    0xB261: 1319,
    0xB281: 1320,
    0xB282: 1321,
    0xB285: 1322,
    0xB289: 1323,
    0xB291: 1324,
    0xB293: 1325,
    0xB297: 1326,
    0xB2A1: 1327,
    0xB2B6: 1328,
    0xB2C1: 1329,
    0xB2E1: 1330,
    0xB2E5: 1331,
    0xB357: 1332,
    0xB361: 1333,
    0xB362: 1334,
    0xB365: 1335,
    0xB369: 1336,
    0xB36B: 1337,
    0xB370: 1338,
    0xB371: 1339,
    0xB373: 1340,
    0xB381: 1341,
    0xB385: 1342,
    0xB389: 1343,
    0xB391: 1344,
    0xB3A1: 1345,
    0xB3A2: 1346,
    0xB3A5: 1347,
    0xB3A9: 1348,
    0xB3B1: 1349,
    0xB3B3: 1350,
    0xB3B5: 1351,
    0xB3B7: 1352,
    0xB461: 1353,
    0xB462: 1354,
    0xB465: 1355,
    0xB466: 1356,
    0xB467: 1357,
    0xB469: 1358,
    0xB46A: 1359,
    0xB46B: 1360,
    0xB470: 1361,
    0xB471: 1362,
    0xB473: 1363,
    0xB475: 1364,
    0xB476: 1365,
    0xB477: 1366,
    0xB47B: 1367,
    0xB47C: 1368,
    0xB481: 1369,
    0xB482: 1370,
    0xB485: 1371,
    0xB489: 1372,
    0xB491: 1373,
    0xB493: 1374,
    0xB495: 1375,
    0xB496: 1376,
    0xB497: 1377,
    0xB4A1: 1378,
    0xB4A2: 1379,
    0xB4A5: 1380,
    0xB4A9: 1381,
    0xB4AC: 1382,
    0xB4B1: 1383,
    0xB4B3: 1384,
    0xB4B5: 1385,
    0xB4B7: 1386,
    0xB4BB: 1387,
    0xB4BD: 1388,
    0xB4C1: 1389,
    0xB4C5: 1390,
    0xB4C9: 1391,
    0xB4D3: 1392,
    0xB4E1: 1393,
    0xB4E2: 1394,
    0xB4E5: 1395,
    0xB4E6: 1396,
    0xB4E8: 1397,
    0xB4E9: 1398,
    0xB4EA: 1399,
    0xB4EB: 1400,
    0xB4F1: 1401,
    0xB4F3: 1402,
    0xB4F4: 1403,
    0xB4F5: 1404,
    0xB4F6: 1405,
    0xB4F7: 1406,
    0xB4F8: 1407,
    0xB4FA: 1408,
    0xB4FC: 1409,
    0xB541: 1410,
    0xB542: 1411,
    0xB545: 1412,
    0xB549: 1413,
    0xB551: 1414,
    0xB553: 1415,
    0xB555: 1416,
    0xB557: 1417,
    0xB561: 1418,
    0xB562: 1419,
    0xB563: 1420,
    0xB565: 1421,
    0xB569: 1422,
    0xB56B: 1423,
    0xB56C: 1424,
    0xB571: 1425,
    0xB573: 1426,
    0xB574: 1427,
    0xB575: 1428,
    0xB576: 1429,
    0xB577: 1430,
    0xB57B: 1431,
    0xB57C: 1432,
    0xB57D: 1433,
    0xB581: 1434,
    0xB585: 1435,
    0xB589: 1436,
    0xB591: 1437,
    0xB593: 1438,
    0xB595: 1439,
    0xB596: 1440,
    0xB5A1: 1441,
    0xB5A2: 1442,
    0xB5A5: 1443,
    0xB5A9: 1444,
    0xB5AA: 1445,
    0xB5AB: 1446,
    0xB5AD: 1447,
    0xB5B0: 1448,
    0xB5B1: 1449,
    0xB5B3: 1450,
    0xB5B5: 1451,
    0xB5B7: 1452,
    0xB5B9: 1453,
    0xB5C1: 1454,
    0xB5C2: 1455,
    0xB5C5: 1456,
    0xB5C9: 1457,
    0xB5D1: 1458,
    0xB5D3: 1459,
    0xB5D5: 1460,
    0xB5D6: 1461,
    0xB5D7: 1462,
    0xB5E1: 1463,
    0xB5E2: 1464,
    0xB5E5: 1465,
    0xB5F1: 1466,
    0xB5F5: 1467,
    0xB5F7: 1468,
    0xB641: 1469,
    0xB642: 1470,
    0xB645: 1471,
    0xB649: 1472,
    0xB651: 1473,
    0xB653: 1474,
    0xB655: 1475,
    0xB657: 1476,
    0xB661: 1477,
    0xB662: 1478,
    0xB665: 1479,
    0xB669: 1480,
    0xB671: 1481,
    0xB673: 1482,
    0xB675: 1483,
    0xB677: 1484,
    0xB681: 1485,
    0xB682: 1486,
    0xB685: 1487,
    0xB689: 1488,
    0xB68A: 1489,
    0xB68B: 1490,
    0xB691: 1491,
    0xB693: 1492,
    0xB695: 1493,
    0xB697: 1494,
    0xB6A1: 1495,
    0xB6A2: 1496,
    0xB6A5: 1497,
    0xB6A9: 1498,
    0xB6B1: 1499,
    0xB6B3: 1500,
    0xB6B6: 1501,
    0xB6B7: 1502,
    0xB6C1: 1503,
    0xB6C2: 1504,
    0xB6C5: 1505,
    0xB6C9: 1506,
    0xB6D1: 1507,
    0xB6D3: 1508,
    0xB6D7: 1509,
    0xB6E1: 1510,
    0xB6E2: 1511,
    0xB6E5: 1512,
    0xB6E9: 1513,
    0xB6F1: 1514,
    0xB6F3: 1515,
    0xB6F5: 1516,
    0xB6F7: 1517,
    0xB741: 1518,
    0xB742: 1519,
    0xB745: 1520,
    0xB749: 1521,
    0xB751: 1522,
    0xB753: 1523,
    0xB755: 1524,
    0xB757: 1525,
    0xB759: 1526,
    0xB761: 1527,
    0xB762: 1528,
    0xB765: 1529,
    0xB769: 1530,
    0xB76F: 1531,
    0xB771: 1532,
    0xB773: 1533,
    0xB775: 1534,
    0xB777: 1535,
    0xB778: 1536,
    0xB779: 1537,
    0xB77A: 1538,
    0xB77B: 1539,
    0xB77C: 1540,
    0xB77D: 1541,
    0xB781: 1542,
    0xB785: 1543,
    0xB789: 1544,
    0xB791: 1545,
    0xB795: 1546,
    0xB7A1: 1547,
    0xB7A2: 1548,
    0xB7A5: 1549,
    0xB7A9: 1550,
    0xB7AA: 1551,
    0xB7AB: 1552,
    0xB7B0: 1553,
    0xB7B1: 1554,
    0xB7B3: 1555,
    0xB7B5: 1556,
    0xB7B6: 1557,
    0xB7B7: 1558,
    0xB7B8: 1559,
    0xB7BC: 1560,
    0xB861: 1561,
    0xB862: 1562,
    0xB865: 1563,
    0xB867: 1564,
    0xB868: 1565,
    0xB869: 1566,
    0xB86B: 1567,
    0xB871: 1568,
    0xB873: 1569,
    0xB875: 1570,
    0xB876: 1571,
    0xB877: 1572,
    0xB878: 1573,
    0xB881: 1574,
    0xB882: 1575,
    0xB885: 1576,
    0xB889: 1577,
    0xB891: 1578,
    0xB893: 1579,
    0xB895: 1580,
    0xB896: 1581,
    0xB897: 1582,
    0xB8A1: 1583,
    0xB8A2: 1584,
    0xB8A5: 1585,
    0xB8A7: 1586,
    0xB8A9: 1587,
    0xB8B1: 1588,
    0xB8B7: 1589,
    0xB8C1: 1590,
    0xB8C5: 1591,
    0xB8C9: 1592,
    0xB8E1: 1593,
    0xB8E2: 1594,
    0xB8E5: 1595,
    0xB8E9: 1596,
    0xB8EB: 1597,
    0xB8F1: 1598,
    0xB8F3: 1599,
    0xB8F5: 1600,
    0xB8F7: 1601,
    0xB8F8: 1602,
    0xB941: 1603,
    0xB942: 1604,
    0xB945: 1605,
    0xB949: 1606,
    0xB951: 1607,
    0xB953: 1608,
    0xB955: 1609,
    0xB957: 1610,
    0xB961: 1611,
    0xB965: 1612,
    0xB969: 1613,
    0xB971: 1614,
    0xB973: 1615,
    0xB976: 1616,
    0xB977: 1617,
    0xB981: 1618,
    0xB9A1: 1619,
    0xB9A2: 1620,
    0xB9A5: 1621,
    0xB9A9: 1622,
    0xB9AB: 1623,
    0xB9B1: 1624,
    0xB9B3: 1625,
    0xB9B5: 1626,
    0xB9B7: 1627,
    0xB9B8: 1628,
    0xB9B9: 1629,
    0xB9BD: 1630,
    0xB9C1: 1631,
    0xB9C2: 1632,
    0xB9C9: 1633,
    0xB9D3: 1634,
    0xB9D5: 1635,
    0xB9D7: 1636,
    0xB9E1: 1637,
    0xB9F6: 1638,
    0xB9F7: 1639,
    0xBA41: 1640,
    0xBA45: 1641,
    0xBA49: 1642,
    0xBA51: 1643,
    0xBA53: 1644,
    0xBA55: 1645,
    0xBA57: 1646,
    0xBA61: 1647,
    0xBA62: 1648,
    0xBA65: 1649,
    0xBA77: 1650,
    0xBA81: 1651,
    0xBA82: 1652,
    0xBA85: 1653,
    0xBA89: 1654,
    0xBA8A: 1655,
    0xBA8B: 1656,
    0xBA91: 1657,
    0xBA93: 1658,
    0xBA95: 1659,
    0xBA97: 1660,
    0xBAA1: 1661,
    0xBAB6: 1662,
    0xBAC1: 1663,
    0xBAE1: 1664,
    0xBAE2: 1665,
    0xBAE5: 1666,
    0xBAE9: 1667,
    0xBAF1: 1668,
    0xBAF3: 1669,
    0xBAF5: 1670,
    0xBB41: 1671,
    0xBB45: 1672,
    0xBB49: 1673,
    0xBB51: 1674,
    0xBB61: 1675,
    0xBB62: 1676,
    0xBB65: 1677,
    0xBB69: 1678,
    0xBB71: 1679,
    0xBB73: 1680,
    0xBB75: 1681,
    0xBB77: 1682,
    0xBBA1: 1683,
    0xBBA2: 1684,
    0xBBA5: 1685,
    0xBBA8: 1686,
    0xBBA9: 1687,
    0xBBAB: 1688,
    0xBBB1: 1689,
    0xBBB3: 1690,
    0xBBB5: 1691,
    0xBBB7: 1692,
    0xBBB8: 1693,
    0xBBBB: 1694,
    0xBBBC: 1695,
    0xBC61: 1696,
    0xBC62: 1697,
    0xBC65: 1698,
    0xBC67: 1699,
    0xBC69: 1700,
    0xBC6C: 1701,
    0xBC71: 1702,
    0xBC73: 1703,
    0xBC75: 1704,
    0xBC76: 1705,
    0xBC77: 1706,
    0xBC81: 1707,
    0xBC82: 1708,
    0xBC85: 1709,
    0xBC89: 1710,
    0xBC91: 1711,
    0xBC93: 1712,
    0xBC95: 1713,
    0xBC96: 1714,
    0xBC97: 1715,
    0xBCA1: 1716,
    0xBCA5: 1717,
    0xBCB7: 1718,
    0xBCE1: 1719,
    0xBCE2: 1720,
    0xBCE5: 1721,
    0xBCE9: 1722,
    0xBCF1: 1723,
    0xBCF3: 1724,
    0xBCF5: 1725,
    0xBCF6: 1726,
    0xBCF7: 1727,
    0xBD41: 1728,
    0xBD57: 1729,
    0xBD61: 1730,
    0xBD76: 1731,
    0xBDA1: 1732,
    0xBDA2: 1733,
    0xBDA5: 1734,
    0xBDA9: 1735,
    0xBDB1: 1736,
    0xBDB3: 1737,
    0xBDB5: 1738,
    0xBDB7: 1739,
    0xBDB9: 1740,
    0xBDC1: 1741,
    0xBDC2: 1742,
    0xBDC9: 1743,
    0xBDD6: 1744,
    0xBDE1: 1745,
    0xBDF6: 1746,
    0xBE41: 1747,
    0xBE45: 1748,
    0xBE49: 1749,
    0xBE51: 1750,
    0xBE53: 1751,
    0xBE77: 1752,
    0xBE81: 1753,
    0xBE82: 1754,
    0xBE85: 1755,
    0xBE89: 1756,
    0xBE91: 1757,
    0xBE93: 1758,
    0xBE97: 1759,
    0xBEA1: 1760,
    0xBEB6: 1761,
    0xBEB7: 1762,
    0xBEE1: 1763,
    0xBF41: 1764,
    0xBF61: 1765,
    0xBF71: 1766,
    0xBF75: 1767,
    0xBF77: 1768,
    0xBFA1: 1769,
    0xBFA2: 1770,
    0xBFA5: 1771,
    0xBFA9: 1772,
    0xBFB1: 1773,
    0xBFB3: 1774,
    0xBFB7: 1775,
    0xBFB8: 1776,
    0xBFBD: 1777,
    0xC061: 1778,
    0xC062: 1779,
    0xC065: 1780,
    0xC067: 1781,
    0xC069: 1782,
    0xC071: 1783,
    0xC073: 1784,
    0xC075: 1785,
    0xC076: 1786,
    0xC077: 1787,
    0xC078: 1788,
    0xC081: 1789,
    0xC082: 1790,
    0xC085: 1791,
    0xC089: 1792,
    0xC091: 1793,
    0xC093: 1794,
    0xC095: 1795,
    0xC096: 1796,
    0xC097: 1797,
    0xC0A1: 1798,
    0xC0A5: 1799,
    0xC0A7: 1800,
    0xC0A9: 1801,
    0xC0B1: 1802,
    0xC0B7: 1803,
    0xC0E1: 1804,
    0xC0E2: 1805,
    0xC0E5: 1806,
    0xC0E9: 1807,
    0xC0F1: 1808,
    0xC0F3: 1809,
    0xC0F5: 1810,
    0xC0F6: 1811,
    0xC0F7: 1812,
    0xC141: 1813,
    0xC142: 1814,
    0xC145: 1815,
    0xC149: 1816,
    0xC151: 1817,
    0xC153: 1818,
    0xC155: 1819,
    0xC157: 1820,
    0xC161: 1821,
    0xC165: 1822,
    0xC176: 1823,
    0xC181: 1824,
    0xC185: 1825,
    0xC197: 1826,
    0xC1A1: 1827,
    0xC1A2: 1828,
    0xC1A5: 1829,
    0xC1A9: 1830,
    0xC1B1: 1831,
    0xC1B3: 1832,
    0xC1B5: 1833,
    0xC1B7: 1834,
    0xC1C1: 1835,
    0xC1C5: 1836,
    0xC1C9: 1837,
    0xC1D7: 1838,
    0xC241: 1839,
    0xC245: 1840,
    0xC249: 1841,
    0xC251: 1842,
    0xC253: 1843,
    0xC255: 1844,
    0xC257: 1845,
    0xC261: 1846,
    0xC271: 1847,
    0xC281: 1848,
    0xC282: 1849,
    0xC285: 1850,
    0xC289: 1851,
    0xC291: 1852,
    0xC293: 1853,
    0xC295: 1854,
    0xC297: 1855,
    0xC2A1: 1856,
    0xC2B6: 1857,
    0xC2C1: 1858,
    0xC2C5: 1859,
    0xC2E1: 1860,
    0xC2E5: 1861,
    0xC2E9: 1862,
    0xC2F1: 1863,
    0xC2F3: 1864,
    0xC2F5: 1865,
    0xC2F7: 1866,
    0xC341: 1867,
    0xC345: 1868,
    0xC349: 1869,
    0xC351: 1870,
    0xC357: 1871,
    0xC361: 1872,
    0xC362: 1873,
    0xC365: 1874,
    0xC369: 1875,
    0xC371: 1876,
    0xC373: 1877,
    0xC375: 1878,
    0xC377: 1879,
    0xC3A1: 1880,
    0xC3A2: 1881,
    0xC3A5: 1882,
    0xC3A8: 1883,
    0xC3A9: 1884,
    0xC3AA: 1885,
    0xC3B1: 1886,
    0xC3B3: 1887,
    0xC3B5: 1888,
    0xC3B7: 1889,
    0xC461: 1890,
    0xC462: 1891,
    0xC465: 1892,
    0xC469: 1893,
    0xC471: 1894,
    0xC473: 1895,
    0xC475: 1896,
    0xC477: 1897,
    0xC481: 1898,
    0xC482: 1899,
    0xC485: 1900,
    0xC489: 1901,
    0xC491: 1902,
    0xC493: 1903,
    0xC495: 1904,
    0xC496: 1905,
    0xC497: 1906,
    0xC4A1: 1907,
    0xC4A2: 1908,
    0xC4B7: 1909,
    0xC4E1: 1910,
    0xC4E2: 1911,
    0xC4E5: 1912,
    0xC4E8: 1913,
    0xC4E9: 1914,
    0xC4F1: 1915,
    0xC4F3: 1916,
    0xC4F5: 1917,
    0xC4F6: 1918,
    0xC4F7: 1919,
    0xC541: 1920,
    0xC542: 1921,
    0xC545: 1922,
    0xC549: 1923,
    0xC551: 1924,
    0xC553: 1925,
    0xC555: 1926,
    0xC557: 1927,
    0xC561: 1928,
    0xC565: 1929,
    0xC569: 1930,
    0xC571: 1931,
    0xC573: 1932,
    0xC575: 1933,
    0xC576: 1934,
    0xC577: 1935,
    0xC581: 1936,
    0xC5A1: 1937,
    0xC5A2: 1938,
    0xC5A5: 1939,
    0xC5A9: 1940,
    0xC5B1: 1941,
    0xC5B3: 1942,
    0xC5B5: 1943,
    0xC5B7: 1944,
    0xC5C1: 1945,
    0xC5C2: 1946,
    0xC5C5: 1947,
    0xC5C9: 1948,
    0xC5D1: 1949,
    0xC5D7: 1950,
    0xC5E1: 1951,
    0xC5F7: 1952,
    0xC641: 1953,
    0xC649: 1954,
    0xC661: 1955,
    0xC681: 1956,
    0xC682: 1957,
    0xC685: 1958,
    0xC689: 1959,
    0xC691: 1960,
    0xC693: 1961,
    0xC695: 1962,
    0xC697: 1963,
    0xC6A1: 1964,
    0xC6A5: 1965,
    0xC6A9: 1966,
    0xC6B7: 1967,
    0xC6C1: 1968,
    0xC6D7: 1969,
    0xC6E1: 1970,
    0xC6E2: 1971,
    0xC6E5: 1972,
    0xC6E9: 1973,
    0xC6F1: 1974,
    0xC6F3: 1975,
    0xC6F5: 1976,
    0xC6F7: 1977,
    0xC741: 1978,
    0xC745: 1979,
    0xC749: 1980,
    0xC751: 1981,
    0xC761: 1982,
    0xC762: 1983,
    0xC765: 1984,
    0xC769: 1985,
    0xC771: 1986,
    0xC773: 1987,
    0xC777: 1988,
    0xC7A1: 1989,
    0xC7A2: 1990,
    0xC7A5: 1991,
    0xC7A9: 1992,
    0xC7B1: 1993,
    0xC7B3: 1994,
    0xC7B5: 1995,
    0xC7B7: 1996,
    0xC861: 1997,
    0xC862: 1998,
    0xC865: 1999,
    0xC869: 2000,
    0xC86A: 2001,
    0xC871: 2002,
    0xC873: 2003,
    0xC875: 2004,
    0xC876: 2005,
    0xC877: 2006,
    0xC881: 2007,
    0xC882: 2008,
    0xC885: 2009,
    0xC889: 2010,
    0xC891: 2011,
    0xC893: 2012,
    0xC895: 2013,
    0xC896: 2014,
    0xC897: 2015,
    0xC8A1: 2016,
    0xC8B7: 2017,
    0xC8E1: 2018,
    0xC8E2: 2019,
    0xC8E5: 2020,
    0xC8E9: 2021,
    0xC8EB: 2022,
    0xC8F1: 2023,
    0xC8F3: 2024,
    0xC8F5: 2025,
    0xC8F6: 2026,
    0xC8F7: 2027,
    0xC941: 2028,
    0xC942: 2029,
    0xC945: 2030,
    0xC949: 2031,
    0xC951: 2032,
    0xC953: 2033,
    0xC955: 2034,
    0xC957: 2035,
    0xC961: 2036,
    0xC965: 2037,
    0xC976: 2038,
    0xC981: 2039,
    0xC985: 2040,
    0xC9A1: 2041,
    0xC9A2: 2042,
    0xC9A5: 2043,
    0xC9A9: 2044,
    0xC9B1: 2045,
    0xC9B3: 2046,
    0xC9B5: 2047,
    0xC9B7: 2048,
    0xC9BC: 2049,
    0xC9C1: 2050,
    0xC9C5: 2051,
    0xC9E1: 2052,
    0xCA41: 2053,
    0xCA45: 2054,
    0xCA55: 2055,
    0xCA57: 2056,
    0xCA61: 2057,
    0xCA81: 2058,
    0xCA82: 2059,
    0xCA85: 2060,
    0xCA89: 2061,
    0xCA91: 2062,
    0xCA93: 2063,
    0xCA95: 2064,
    0xCA97: 2065,
    0xCAA1: 2066,
    0xCAB6: 2067,
    0xCAC1: 2068,
    0xCAE1: 2069,
    0xCAE2: 2070,
    0xCAE5: 2071,
    0xCAE9: 2072,
    0xCAF1: 2073,
    0xCAF3: 2074,
    0xCAF7: 2075,
    0xCB41: 2076,
    0xCB45: 2077,
    0xCB49: 2078,
    0xCB51: 2079,
    0xCB57: 2080,
    0xCB61: 2081,
    0xCB62: 2082,
    0xCB65: 2083,
    0xCB68: 2084,
    0xCB69: 2085,
    0xCB6B: 2086,
    0xCB71: 2087,
    0xCB73: 2088,
    0xCB75: 2089,
    0xCB81: 2090,
    0xCB85: 2091,
    0xCB89: 2092,
    0xCB91: 2093,
    0xCB93: 2094,
    0xCBA1: 2095,
    0xCBA2: 2096,
    0xCBA5: 2097,
    0xCBA9: 2098,
    0xCBB1: 2099,
    0xCBB3: 2100,
    0xCBB5: 2101,
    0xCBB7: 2102,
    0xCC61: 2103,
    0xCC62: 2104,
    0xCC63: 2105,
    0xCC65: 2106,
    0xCC69: 2107,
    0xCC6B: 2108,
    0xCC71: 2109,
    0xCC73: 2110,
    0xCC75: 2111,
    0xCC76: 2112,
    0xCC77: 2113,
    0xCC7B: 2114,
    0xCC81: 2115,
    0xCC82: 2116,
    0xCC85: 2117,
    0xCC89: 2118,
    0xCC91: 2119,
    0xCC93: 2120,
    0xCC95: 2121,
    0xCC96: 2122,
    0xCC97: 2123,
    0xCCA1: 2124,
    0xCCA2: 2125,
    0xCCE1: 2126,
    0xCCE2: 2127,
    0xCCE5: 2128,
    0xCCE9: 2129,
    0xCCF1: 2130,
    0xCCF3: 2131,
    0xCCF5: 2132,
    0xCCF6: 2133,
    0xCCF7: 2134,
    0xCD41: 2135,
    0xCD42: 2136,
    0xCD45: 2137,
    0xCD49: 2138,
    0xCD51: 2139,
    0xCD53: 2140,
    0xCD55: 2141,
    0xCD57: 2142,
    0xCD61: 2143,
    0xCD65: 2144,
    0xCD69: 2145,
    0xCD71: 2146,
    0xCD73: 2147,
    0xCD76: 2148,
    0xCD77: 2149,
    0xCD81: 2150,
    0xCD89: 2151,
    0xCD93: 2152,
    0xCD95: 2153,
    0xCDA1: 2154,
    0xCDA2: 2155,
    0xCDA5: 2156,
    0xCDA9: 2157,
    0xCDB1: 2158,
    0xCDB3: 2159,
    0xCDB5: 2160,
    0xCDB7: 2161,
    0xCDC1: 2162,
    0xCDD7: 2163,
    0xCE41: 2164,
    0xCE45: 2165,
    0xCE61: 2166,
    0xCE65: 2167,
    0xCE69: 2168,
    0xCE73: 2169,
    0xCE75: 2170,
    0xCE81: 2171,
    0xCE82: 2172,
    0xCE85: 2173,
    0xCE88: 2174,
    0xCE89: 2175,
    0xCE8B: 2176,
    0xCE91: 2177,
    0xCE93: 2178,
    0xCE95: 2179,
    0xCE97: 2180,
    0xCEA1: 2181,
    0xCEB7: 2182,
    0xCEE1: 2183,
    0xCEE5: 2184,
    0xCEE9: 2185,
    0xCEF1: 2186,
    0xCEF5: 2187,
    0xCF41: 2188,
    0xCF45: 2189,
    0xCF49: 2190,
    0xCF51: 2191,
    0xCF55: 2192,
    0xCF57: 2193,
    0xCF61: 2194,
    0xCF65: 2195,
    0xCF69: 2196,
    0xCF71: 2197,
    0xCF73: 2198,
    0xCF75: 2199,
    0xCFA1: 2200,
    0xCFA2: 2201,
    0xCFA5: 2202,
    0xCFA9: 2203,
    0xCFB1: 2204,
    0xCFB3: 2205,
    0xCFB5: 2206,
    0xCFB7: 2207,
    0xD061: 2208,
    0xD062: 2209,
    0xD065: 2210,
    0xD069: 2211,
    0xD06E: 2212,
    0xD071: 2213,
    0xD073: 2214,
    0xD075: 2215,
    0xD077: 2216,
    0xD081: 2217,
    0xD082: 2218,
    0xD085: 2219,
    0xD089: 2220,
    0xD091: 2221,
    0xD093: 2222,
    0xD095: 2223,
    0xD096: 2224,
    0xD097: 2225,
    0xD0A1: 2226,
    0xD0B7: 2227,
    0xD0E1: 2228,
    0xD0E2: 2229,
    0xD0E5: 2230,
    0xD0E9: 2231,
    0xD0EB: 2232,
    0xD0F1: 2233,
    0xD0F3: 2234,
    0xD0F5: 2235,
    0xD0F7: 2236,
    0xD141: 2237,
    0xD142: 2238,
    0xD145: 2239,
    0xD149: 2240,
    0xD151: 2241,
    0xD153: 2242,
    0xD155: 2243,
    0xD157: 2244,
    0xD161: 2245,
    0xD162: 2246,
    0xD165: 2247,
    0xD169: 2248,
    0xD171: 2249,
    0xD173: 2250,
    0xD175: 2251,
    0xD176: 2252,
    0xD177: 2253,
    0xD181: 2254,
    0xD185: 2255,
    0xD189: 2256,
    0xD193: 2257,
    0xD1A1: 2258,
    0xD1A2: 2259,
    0xD1A5: 2260,
    0xD1A9: 2261,
    0xD1AE: 2262,
    0xD1B1: 2263,
    0xD1B3: 2264,
    0xD1B5: 2265,
    0xD1B7: 2266,
    0xD1BB: 2267,
    0xD1C1: 2268,
    0xD1C2: 2269,
    0xD1C5: 2270,
    0xD1C9: 2271,
    0xD1D5: 2272,
    0xD1D7: 2273,
    0xD1E1: 2274,
    0xD1E2: 2275,
    0xD1E5: 2276,
    0xD1F5: 2277,
    0xD1F7: 2278,
    0xD241: 2279,
    0xD242: 2280,
    0xD245: 2281,
    0xD249: 2282,
    0xD253: 2283,
    0xD255: 2284,
    0xD257: 2285,
    0xD261: 2286,
    0xD265: 2287,
    0xD269: 2288,
    0xD273: 2289,
    0xD275: 2290,
    0xD281: 2291,
    0xD282: 2292,
    0xD285: 2293,
    0xD289: 2294,
    0xD28E: 2295,
    0xD291: 2296,
    0xD295: 2297,
    0xD297: 2298,
    0xD2A1: 2299,
    0xD2A5: 2300,
    0xD2A9: 2301,
    0xD2B1: 2302,
    0xD2B7: 2303,
    0xD2C1: 2304,
    0xD2C2: 2305,
    0xD2C5: 2306,
    0xD2C9: 2307,
    0xD2D7: 2308,
    0xD2E1: 2309,
    0xD2E2: 2310,
    0xD2E5: 2311,
    0xD2E9: 2312,
    0xD2F1: 2313,
    0xD2F3: 2314,
    0xD2F5: 2315,
    0xD2F7: 2316,
    0xD341: 2317,
    0xD342: 2318,
    0xD345: 2319,
    0xD349: 2320,
    0xD351: 2321,
    0xD355: 2322,
    0xD357: 2323,
    0xD361: 2324,
    0xD362: 2325,
    0xD365: 2326,
    0xD367: 2327,
    0xD368: 2328,
    0xD369: 2329,
    0xD36A: 2330,
    0xD371: 2331,
    0xD373: 2332,
    0xD375: 2333,
    0xD377: 2334,
    0xD37B: 2335,
    0xD381: 2336,
    0xD385: 2337,
    0xD389: 2338,
    0xD391: 2339,
    0xD393: 2340,
    0xD397: 2341,
    0xD3A1: 2342,
    0xD3A2: 2343,
    0xD3A5: 2344,
    0xD3A9: 2345,
    0xD3B1: 2346,
    0xD3B3: 2347,
    0xD3B5: 2348,
    0xD3B7: 2349,
}
python3.12/site-packages/pip/_vendor/chardet/jisfreq.py000064400000062304151732703330016775 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Sampling from about 20M text materials include literature and computer technology
#
# Japanese frequency table, applied to both S-JIS and EUC-JP
# They are sorted in order.

# 128  --> 0.77094
# 256  --> 0.85710
# 512  --> 0.92635
# 1024 --> 0.97130
# 2048 --> 0.99431
#
# Ideal Distribution Ratio = 0.92635 / (1-0.92635) = 12.58
# Random Distribution Ration = 512 / (2965+62+83+86-512) = 0.191
#
# Typical Distribution Ratio, 25% of IDR

JIS_TYPICAL_DISTRIBUTION_RATIO = 3.0

# Char to FreqOrder table ,
JIS_TABLE_SIZE = 4368

# fmt: off
JIS_CHAR_TO_FREQ_ORDER = (
  40,   1,   6, 182, 152, 180, 295,2127, 285, 381,3295,4304,3068,4606,3165,3510, #   16
3511,1822,2785,4607,1193,2226,5070,4608, 171,2996,1247,  18, 179,5071, 856,1661, #   32
1262,5072, 619, 127,3431,3512,3230,1899,1700, 232, 228,1294,1298, 284, 283,2041, #   48
2042,1061,1062,  48,  49,  44,  45, 433, 434,1040,1041, 996, 787,2997,1255,4305, #   64
2108,4609,1684,1648,5073,5074,5075,5076,5077,5078,3687,5079,4610,5080,3927,3928, #   80
5081,3296,3432, 290,2285,1471,2187,5082,2580,2825,1303,2140,1739,1445,2691,3375, #   96
1691,3297,4306,4307,4611, 452,3376,1182,2713,3688,3069,4308,5083,5084,5085,5086, #  112
5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102, #  128
5103,5104,5105,5106,5107,5108,5109,5110,5111,5112,4097,5113,5114,5115,5116,5117, #  144
5118,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,5130,5131,5132,5133, #  160
5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,5149, #  176
5150,5151,5152,4612,5153,5154,5155,5156,5157,5158,5159,5160,5161,5162,5163,5164, #  192
5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,1472, 598, 618, 820,1205, #  208
1309,1412,1858,1307,1692,5176,5177,5178,5179,5180,5181,5182,1142,1452,1234,1172, #  224
1875,2043,2149,1793,1382,2973, 925,2404,1067,1241, 960,1377,2935,1491, 919,1217, #  240
1865,2030,1406,1499,2749,4098,5183,5184,5185,5186,5187,5188,2561,4099,3117,1804, #  256
2049,3689,4309,3513,1663,5189,3166,3118,3298,1587,1561,3433,5190,3119,1625,2998, #  272
3299,4613,1766,3690,2786,4614,5191,5192,5193,5194,2161,  26,3377,   2,3929,  20, #  288
3691,  47,4100,  50,  17,  16,  35, 268,  27, 243,  42, 155,  24, 154,  29, 184, #  304
   4,  91,  14,  92,  53, 396,  33, 289,   9,  37,  64, 620,  21,  39, 321,   5, #  320
  12,  11,  52,  13,   3, 208, 138,   0,   7,  60, 526, 141, 151,1069, 181, 275, #  336
1591,  83, 132,1475, 126, 331, 829,  15,  69, 160,  59,  22, 157,  55,1079, 312, #  352
 109,  38,  23,  25,  10,  19,  79,5195,  61, 382,1124,   8,  30,5196,5197,5198, #  368
5199,5200,5201,5202,5203,5204,5205,5206,  89,  62,  74,  34,2416, 112, 139, 196, #  384
 271, 149,  84, 607, 131, 765,  46,  88, 153, 683,  76, 874, 101, 258,  57,  80, #  400
  32, 364, 121,1508, 169,1547,  68, 235, 145,2999,  41, 360,3027,  70,  63,  31, #  416
  43, 259, 262,1383,  99, 533, 194,  66,  93, 846, 217, 192,  56, 106,  58, 565, #  432
 280, 272, 311, 256, 146,  82, 308,  71, 100, 128, 214, 655, 110, 261, 104,1140, #  448
  54,  51,  36,  87,  67,3070, 185,2618,2936,2020,  28,1066,2390,2059,5207,5208, #  464
5209,5210,5211,5212,5213,5214,5215,5216,4615,5217,5218,5219,5220,5221,5222,5223, #  480
5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,5235,5236,3514,5237,5238, #  496
5239,5240,5241,5242,5243,5244,2297,2031,4616,4310,3692,5245,3071,5246,3598,5247, #  512
4617,3231,3515,5248,4101,4311,4618,3808,4312,4102,5249,4103,4104,3599,5250,5251, #  528
5252,5253,5254,5255,5256,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267, #  544
5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283, #  560
5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299, #  576
5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315, #  592
5316,5317,5318,5319,5320,5321,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331, #  608
5332,5333,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,5344,5345,5346,5347, #  624
5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363, #  640
5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379, #  656
5380,5381, 363, 642,2787,2878,2788,2789,2316,3232,2317,3434,2011, 165,1942,3930, #  672
3931,3932,3933,5382,4619,5383,4620,5384,5385,5386,5387,5388,5389,5390,5391,5392, #  688
5393,5394,5395,5396,5397,5398,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408, #  704
5409,5410,5411,5412,5413,5414,5415,5416,5417,5418,5419,5420,5421,5422,5423,5424, #  720
5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,5439,5440, #  736
5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456, #  752
5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472, #  768
5473,5474,5475,5476,5477,5478,5479,5480,5481,5482,5483,5484,5485,5486,5487,5488, #  784
5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504, #  800
5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520, #  816
5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536, #  832
5537,5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,5549,5550,5551,5552, #  848
5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568, #  864
5569,5570,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584, #  880
5585,5586,5587,5588,5589,5590,5591,5592,5593,5594,5595,5596,5597,5598,5599,5600, #  896
5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,5615,5616, #  912
5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632, #  928
5633,5634,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648, #  944
5649,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,5661,5662,5663,5664, #  960
5665,5666,5667,5668,5669,5670,5671,5672,5673,5674,5675,5676,5677,5678,5679,5680, #  976
5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696, #  992
5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712, # 1008
5713,5714,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724,5725,5726,5727,5728, # 1024
5729,5730,5731,5732,5733,5734,5735,5736,5737,5738,5739,5740,5741,5742,5743,5744, # 1040
5745,5746,5747,5748,5749,5750,5751,5752,5753,5754,5755,5756,5757,5758,5759,5760, # 1056
5761,5762,5763,5764,5765,5766,5767,5768,5769,5770,5771,5772,5773,5774,5775,5776, # 1072
5777,5778,5779,5780,5781,5782,5783,5784,5785,5786,5787,5788,5789,5790,5791,5792, # 1088
5793,5794,5795,5796,5797,5798,5799,5800,5801,5802,5803,5804,5805,5806,5807,5808, # 1104
5809,5810,5811,5812,5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824, # 1120
5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840, # 1136
5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856, # 1152
5857,5858,5859,5860,5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872, # 1168
5873,5874,5875,5876,5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888, # 1184
5889,5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904, # 1200
5905,5906,5907,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920, # 1216
5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936, # 1232
5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952, # 1248
5953,5954,5955,5956,5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968, # 1264
5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984, # 1280
5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000, # 1296
6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016, # 1312
6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032, # 1328
6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048, # 1344
6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064, # 1360
6065,6066,6067,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080, # 1376
6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096, # 1392
6097,6098,6099,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112, # 1408
6113,6114,2044,2060,4621, 997,1235, 473,1186,4622, 920,3378,6115,6116, 379,1108, # 1424
4313,2657,2735,3934,6117,3809, 636,3233, 573,1026,3693,3435,2974,3300,2298,4105, # 1440
 854,2937,2463, 393,2581,2417, 539, 752,1280,2750,2480, 140,1161, 440, 708,1569, # 1456
 665,2497,1746,1291,1523,3000, 164,1603, 847,1331, 537,1997, 486, 508,1693,2418, # 1472
1970,2227, 878,1220, 299,1030, 969, 652,2751, 624,1137,3301,2619,  65,3302,2045, # 1488
1761,1859,3120,1930,3694,3516, 663,1767, 852, 835,3695, 269, 767,2826,2339,1305, # 1504
 896,1150, 770,1616,6118, 506,1502,2075,1012,2519, 775,2520,2975,2340,2938,4314, # 1520
3028,2086,1224,1943,2286,6119,3072,4315,2240,1273,1987,3935,1557, 175, 597, 985, # 1536
3517,2419,2521,1416,3029, 585, 938,1931,1007,1052,1932,1685,6120,3379,4316,4623, # 1552
 804, 599,3121,1333,2128,2539,1159,1554,2032,3810, 687,2033,2904, 952, 675,1467, # 1568
3436,6121,2241,1096,1786,2440,1543,1924, 980,1813,2228, 781,2692,1879, 728,1918, # 1584
3696,4624, 548,1950,4625,1809,1088,1356,3303,2522,1944, 502, 972, 373, 513,2827, # 1600
 586,2377,2391,1003,1976,1631,6122,2464,1084, 648,1776,4626,2141, 324, 962,2012, # 1616
2177,2076,1384, 742,2178,1448,1173,1810, 222, 102, 301, 445, 125,2420, 662,2498, # 1632
 277, 200,1476,1165,1068, 224,2562,1378,1446, 450,1880, 659, 791, 582,4627,2939, # 1648
3936,1516,1274, 555,2099,3697,1020,1389,1526,3380,1762,1723,1787,2229, 412,2114, # 1664
1900,2392,3518, 512,2597, 427,1925,2341,3122,1653,1686,2465,2499, 697, 330, 273, # 1680
 380,2162, 951, 832, 780, 991,1301,3073, 965,2270,3519, 668,2523,2636,1286, 535, # 1696
1407, 518, 671, 957,2658,2378, 267, 611,2197,3030,6123, 248,2299, 967,1799,2356, # 1712
 850,1418,3437,1876,1256,1480,2828,1718,6124,6125,1755,1664,2405,6126,4628,2879, # 1728
2829, 499,2179, 676,4629, 557,2329,2214,2090, 325,3234, 464, 811,3001, 992,2342, # 1744
2481,1232,1469, 303,2242, 466,1070,2163, 603,1777,2091,4630,2752,4631,2714, 322, # 1760
2659,1964,1768, 481,2188,1463,2330,2857,3600,2092,3031,2421,4632,2318,2070,1849, # 1776
2598,4633,1302,2254,1668,1701,2422,3811,2905,3032,3123,2046,4106,1763,1694,4634, # 1792
1604, 943,1724,1454, 917, 868,2215,1169,2940, 552,1145,1800,1228,1823,1955, 316, # 1808
1080,2510, 361,1807,2830,4107,2660,3381,1346,1423,1134,4108,6127, 541,1263,1229, # 1824
1148,2540, 545, 465,1833,2880,3438,1901,3074,2482, 816,3937, 713,1788,2500, 122, # 1840
1575, 195,1451,2501,1111,6128, 859, 374,1225,2243,2483,4317, 390,1033,3439,3075, # 1856
2524,1687, 266, 793,1440,2599, 946, 779, 802, 507, 897,1081, 528,2189,1292, 711, # 1872
1866,1725,1167,1640, 753, 398,2661,1053, 246, 348,4318, 137,1024,3440,1600,2077, # 1888
2129, 825,4319, 698, 238, 521, 187,2300,1157,2423,1641,1605,1464,1610,1097,2541, # 1904
1260,1436, 759,2255,1814,2150, 705,3235, 409,2563,3304, 561,3033,2005,2564, 726, # 1920
1956,2343,3698,4109, 949,3812,3813,3520,1669, 653,1379,2525, 881,2198, 632,2256, # 1936
1027, 778,1074, 733,1957, 514,1481,2466, 554,2180, 702,3938,1606,1017,1398,6129, # 1952
1380,3521, 921, 993,1313, 594, 449,1489,1617,1166, 768,1426,1360, 495,1794,3601, # 1968
1177,3602,1170,4320,2344, 476, 425,3167,4635,3168,1424, 401,2662,1171,3382,1998, # 1984
1089,4110, 477,3169, 474,6130,1909, 596,2831,1842, 494, 693,1051,1028,1207,3076, # 2000
 606,2115, 727,2790,1473,1115, 743,3522, 630, 805,1532,4321,2021, 366,1057, 838, # 2016
 684,1114,2142,4322,2050,1492,1892,1808,2271,3814,2424,1971,1447,1373,3305,1090, # 2032
1536,3939,3523,3306,1455,2199, 336, 369,2331,1035, 584,2393, 902, 718,2600,6131, # 2048
2753, 463,2151,1149,1611,2467, 715,1308,3124,1268, 343,1413,3236,1517,1347,2663, # 2064
2093,3940,2022,1131,1553,2100,2941,1427,3441,2942,1323,2484,6132,1980, 872,2368, # 2080
2441,2943, 320,2369,2116,1082, 679,1933,3941,2791,3815, 625,1143,2023, 422,2200, # 2096
3816,6133, 730,1695, 356,2257,1626,2301,2858,2637,1627,1778, 937, 883,2906,2693, # 2112
3002,1769,1086, 400,1063,1325,3307,2792,4111,3077, 456,2345,1046, 747,6134,1524, # 2128
 884,1094,3383,1474,2164,1059, 974,1688,2181,2258,1047, 345,1665,1187, 358, 875, # 2144
3170, 305, 660,3524,2190,1334,1135,3171,1540,1649,2542,1527, 927, 968,2793, 885, # 2160
1972,1850, 482, 500,2638,1218,1109,1085,2543,1654,2034, 876,  78,2287,1482,1277, # 2176
 861,1675,1083,1779, 724,2754, 454, 397,1132,1612,2332, 893, 672,1237, 257,2259, # 2192
2370, 135,3384, 337,2244, 547, 352, 340, 709,2485,1400, 788,1138,2511, 540, 772, # 2208
1682,2260,2272,2544,2013,1843,1902,4636,1999,1562,2288,4637,2201,1403,1533, 407, # 2224
 576,3308,1254,2071, 978,3385, 170, 136,1201,3125,2664,3172,2394, 213, 912, 873, # 2240
3603,1713,2202, 699,3604,3699, 813,3442, 493, 531,1054, 468,2907,1483, 304, 281, # 2256
4112,1726,1252,2094, 339,2319,2130,2639, 756,1563,2944, 748, 571,2976,1588,2425, # 2272
2715,1851,1460,2426,1528,1392,1973,3237, 288,3309, 685,3386, 296, 892,2716,2216, # 2288
1570,2245, 722,1747,2217, 905,3238,1103,6135,1893,1441,1965, 251,1805,2371,3700, # 2304
2601,1919,1078,  75,2182,1509,1592,1270,2640,4638,2152,6136,3310,3817, 524, 706, # 2320
1075, 292,3818,1756,2602, 317,  98,3173,3605,3525,1844,2218,3819,2502, 814, 567, # 2336
 385,2908,1534,6137, 534,1642,3239, 797,6138,1670,1529, 953,4323, 188,1071, 538, # 2352
 178, 729,3240,2109,1226,1374,2000,2357,2977, 731,2468,1116,2014,2051,6139,1261, # 2368
1593, 803,2859,2736,3443, 556, 682, 823,1541,6140,1369,2289,1706,2794, 845, 462, # 2384
2603,2665,1361, 387, 162,2358,1740, 739,1770,1720,1304,1401,3241,1049, 627,1571, # 2400
2427,3526,1877,3942,1852,1500, 431,1910,1503, 677, 297,2795, 286,1433,1038,1198, # 2416
2290,1133,1596,4113,4639,2469,1510,1484,3943,6141,2442, 108, 712,4640,2372, 866, # 2432
3701,2755,3242,1348, 834,1945,1408,3527,2395,3243,1811, 824, 994,1179,2110,1548, # 2448
1453, 790,3003, 690,4324,4325,2832,2909,3820,1860,3821, 225,1748, 310, 346,1780, # 2464
2470, 821,1993,2717,2796, 828, 877,3528,2860,2471,1702,2165,2910,2486,1789, 453, # 2480
 359,2291,1676,  73,1164,1461,1127,3311, 421, 604, 314,1037, 589, 116,2487, 737, # 2496
 837,1180, 111, 244, 735,6142,2261,1861,1362, 986, 523, 418, 581,2666,3822, 103, # 2512
 855, 503,1414,1867,2488,1091, 657,1597, 979, 605,1316,4641,1021,2443,2078,2001, # 2528
1209,  96, 587,2166,1032, 260,1072,2153, 173,  94, 226,3244, 819,2006,4642,4114, # 2544
2203, 231,1744, 782,  97,2667, 786,3387, 887, 391, 442,2219,4326,1425,6143,2694, # 2560
 633,1544,1202, 483,2015, 592,2052,1958,2472,1655, 419, 129,4327,3444,3312,1714, # 2576
1257,3078,4328,1518,1098, 865,1310,1019,1885,1512,1734, 469,2444, 148, 773, 436, # 2592
1815,1868,1128,1055,4329,1245,2756,3445,2154,1934,1039,4643, 579,1238, 932,2320, # 2608
 353, 205, 801, 115,2428, 944,2321,1881, 399,2565,1211, 678, 766,3944, 335,2101, # 2624
1459,1781,1402,3945,2737,2131,1010, 844, 981,1326,1013, 550,1816,1545,2620,1335, # 2640
1008, 371,2881, 936,1419,1613,3529,1456,1395,2273,1834,2604,1317,2738,2503, 416, # 2656
1643,4330, 806,1126, 229, 591,3946,1314,1981,1576,1837,1666, 347,1790, 977,3313, # 2672
 764,2861,1853, 688,2429,1920,1462,  77, 595, 415,2002,3034, 798,1192,4115,6144, # 2688
2978,4331,3035,2695,2582,2072,2566, 430,2430,1727, 842,1396,3947,3702, 613, 377, # 2704
 278, 236,1417,3388,3314,3174, 757,1869, 107,3530,6145,1194, 623,2262, 207,1253, # 2720
2167,3446,3948, 492,1117,1935, 536,1838,2757,1246,4332, 696,2095,2406,1393,1572, # 2736
3175,1782, 583, 190, 253,1390,2230, 830,3126,3389, 934,3245,1703,1749,2979,1870, # 2752
2545,1656,2204, 869,2346,4116,3176,1817, 496,1764,4644, 942,1504, 404,1903,1122, # 2768
1580,3606,2945,1022, 515, 372,1735, 955,2431,3036,6146,2797,1110,2302,2798, 617, # 2784
6147, 441, 762,1771,3447,3607,3608,1904, 840,3037,  86, 939,1385, 572,1370,2445, # 2800
1336, 114,3703, 898, 294, 203,3315, 703,1583,2274, 429, 961,4333,1854,1951,3390, # 2816
2373,3704,4334,1318,1381, 966,1911,2322,1006,1155, 309, 989, 458,2718,1795,1372, # 2832
1203, 252,1689,1363,3177, 517,1936, 168,1490, 562, 193,3823,1042,4117,1835, 551, # 2848
 470,4645, 395, 489,3448,1871,1465,2583,2641, 417,1493, 279,1295, 511,1236,1119, # 2864
  72,1231,1982,1812,3004, 871,1564, 984,3449,1667,2696,2096,4646,2347,2833,1673, # 2880
3609, 695,3246,2668, 807,1183,4647, 890, 388,2333,1801,1457,2911,1765,1477,1031, # 2896
3316,3317,1278,3391,2799,2292,2526, 163,3450,4335,2669,1404,1802,6148,2323,2407, # 2912
1584,1728,1494,1824,1269, 298, 909,3318,1034,1632, 375, 776,1683,2061, 291, 210, # 2928
1123, 809,1249,1002,2642,3038, 206,1011,2132, 144, 975, 882,1565, 342, 667, 754, # 2944
1442,2143,1299,2303,2062, 447, 626,2205,1221,2739,2912,1144,1214,2206,2584, 760, # 2960
1715, 614, 950,1281,2670,2621, 810, 577,1287,2546,4648, 242,2168, 250,2643, 691, # 2976
 123,2644, 647, 313,1029, 689,1357,2946,1650, 216, 771,1339,1306, 808,2063, 549, # 2992
 913,1371,2913,2914,6149,1466,1092,1174,1196,1311,2605,2396,1783,1796,3079, 406, # 3008
2671,2117,3949,4649, 487,1825,2220,6150,2915, 448,2348,1073,6151,2397,1707, 130, # 3024
 900,1598, 329, 176,1959,2527,1620,6152,2275,4336,3319,1983,2191,3705,3610,2155, # 3040
3706,1912,1513,1614,6153,1988, 646, 392,2304,1589,3320,3039,1826,1239,1352,1340, # 3056
2916, 505,2567,1709,1437,2408,2547, 906,6154,2672, 384,1458,1594,1100,1329, 710, # 3072
 423,3531,2064,2231,2622,1989,2673,1087,1882, 333, 841,3005,1296,2882,2379, 580, # 3088
1937,1827,1293,2585, 601, 574, 249,1772,4118,2079,1120, 645, 901,1176,1690, 795, # 3104
2207, 478,1434, 516,1190,1530, 761,2080, 930,1264, 355, 435,1552, 644,1791, 987, # 3120
 220,1364,1163,1121,1538, 306,2169,1327,1222, 546,2645, 218, 241, 610,1704,3321, # 3136
1984,1839,1966,2528, 451,6155,2586,3707,2568, 907,3178, 254,2947, 186,1845,4650, # 3152
 745, 432,1757, 428,1633, 888,2246,2221,2489,3611,2118,1258,1265, 956,3127,1784, # 3168
4337,2490, 319, 510, 119, 457,3612, 274,2035,2007,4651,1409,3128, 970,2758, 590, # 3184
2800, 661,2247,4652,2008,3950,1420,1549,3080,3322,3951,1651,1375,2111, 485,2491, # 3200
1429,1156,6156,2548,2183,1495, 831,1840,2529,2446, 501,1657, 307,1894,3247,1341, # 3216
 666, 899,2156,1539,2549,1559, 886, 349,2208,3081,2305,1736,3824,2170,2759,1014, # 3232
1913,1386, 542,1397,2948, 490, 368, 716, 362, 159, 282,2569,1129,1658,1288,1750, # 3248
2674, 276, 649,2016, 751,1496, 658,1818,1284,1862,2209,2087,2512,3451, 622,2834, # 3264
 376, 117,1060,2053,1208,1721,1101,1443, 247,1250,3179,1792,3952,2760,2398,3953, # 3280
6157,2144,3708, 446,2432,1151,2570,3452,2447,2761,2835,1210,2448,3082, 424,2222, # 3296
1251,2449,2119,2836, 504,1581,4338, 602, 817, 857,3825,2349,2306, 357,3826,1470, # 3312
1883,2883, 255, 958, 929,2917,3248, 302,4653,1050,1271,1751,2307,1952,1430,2697, # 3328
2719,2359, 354,3180, 777, 158,2036,4339,1659,4340,4654,2308,2949,2248,1146,2232, # 3344
3532,2720,1696,2623,3827,6158,3129,1550,2698,1485,1297,1428, 637, 931,2721,2145, # 3360
 914,2550,2587,  81,2450, 612, 827,2646,1242,4655,1118,2884, 472,1855,3181,3533, # 3376
3534, 569,1353,2699,1244,1758,2588,4119,2009,2762,2171,3709,1312,1531,6159,1152, # 3392
1938, 134,1830, 471,3710,2276,1112,1535,3323,3453,3535, 982,1337,2950, 488, 826, # 3408
 674,1058,1628,4120,2017, 522,2399, 211, 568,1367,3454, 350, 293,1872,1139,3249, # 3424
1399,1946,3006,1300,2360,3324, 588, 736,6160,2606, 744, 669,3536,3828,6161,1358, # 3440
 199, 723, 848, 933, 851,1939,1505,1514,1338,1618,1831,4656,1634,3613, 443,2740, # 3456
3829, 717,1947, 491,1914,6162,2551,1542,4121,1025,6163,1099,1223, 198,3040,2722, # 3472
 370, 410,1905,2589, 998,1248,3182,2380, 519,1449,4122,1710, 947, 928,1153,4341, # 3488
2277, 344,2624,1511, 615, 105, 161,1212,1076,1960,3130,2054,1926,1175,1906,2473, # 3504
 414,1873,2801,6164,2309, 315,1319,3325, 318,2018,2146,2157, 963, 631, 223,4342, # 3520
4343,2675, 479,3711,1197,2625,3712,2676,2361,6165,4344,4123,6166,2451,3183,1886, # 3536
2184,1674,1330,1711,1635,1506, 799, 219,3250,3083,3954,1677,3713,3326,2081,3614, # 3552
1652,2073,4657,1147,3041,1752, 643,1961, 147,1974,3955,6167,1716,2037, 918,3007, # 3568
1994, 120,1537, 118, 609,3184,4345, 740,3455,1219, 332,1615,3830,6168,1621,2980, # 3584
1582, 783, 212, 553,2350,3714,1349,2433,2082,4124, 889,6169,2310,1275,1410, 973, # 3600
 166,1320,3456,1797,1215,3185,2885,1846,2590,2763,4658, 629, 822,3008, 763, 940, # 3616
1990,2862, 439,2409,1566,1240,1622, 926,1282,1907,2764, 654,2210,1607, 327,1130, # 3632
3956,1678,1623,6170,2434,2192, 686, 608,3831,3715, 903,3957,3042,6171,2741,1522, # 3648
1915,1105,1555,2552,1359, 323,3251,4346,3457, 738,1354,2553,2311,2334,1828,2003, # 3664
3832,1753,2351,1227,6172,1887,4125,1478,6173,2410,1874,1712,1847, 520,1204,2607, # 3680
 264,4659, 836,2677,2102, 600,4660,3833,2278,3084,6174,4347,3615,1342, 640, 532, # 3696
 543,2608,1888,2400,2591,1009,4348,1497, 341,1737,3616,2723,1394, 529,3252,1321, # 3712
 983,4661,1515,2120, 971,2592, 924, 287,1662,3186,4349,2700,4350,1519, 908,1948, # 3728
2452, 156, 796,1629,1486,2223,2055, 694,4126,1259,1036,3392,1213,2249,2742,1889, # 3744
1230,3958,1015, 910, 408, 559,3617,4662, 746, 725, 935,4663,3959,3009,1289, 563, # 3760
 867,4664,3960,1567,2981,2038,2626, 988,2263,2381,4351, 143,2374, 704,1895,6175, # 3776
1188,3716,2088, 673,3085,2362,4352, 484,1608,1921,2765,2918, 215, 904,3618,3537, # 3792
 894, 509, 976,3043,2701,3961,4353,2837,2982, 498,6176,6177,1102,3538,1332,3393, # 3808
1487,1636,1637, 233, 245,3962, 383, 650, 995,3044, 460,1520,1206,2352, 749,3327, # 3824
 530, 700, 389,1438,1560,1773,3963,2264, 719,2951,2724,3834, 870,1832,1644,1000, # 3840
 839,2474,3717, 197,1630,3394, 365,2886,3964,1285,2133, 734, 922, 818,1106, 732, # 3856
 480,2083,1774,3458, 923,2279,1350, 221,3086,  85,2233,2234,3835,1585,3010,2147, # 3872
1387,1705,2382,1619,2475, 133, 239,2802,1991,1016,2084,2383, 411,2838,1113, 651, # 3888
1985,1160,3328, 990,1863,3087,1048,1276,2647, 265,2627,1599,3253,2056, 150, 638, # 3904
2019, 656, 853, 326,1479, 680,1439,4354,1001,1759, 413,3459,3395,2492,1431, 459, # 3920
4355,1125,3329,2265,1953,1450,2065,2863, 849, 351,2678,3131,3254,3255,1104,1577, # 3936
 227,1351,1645,2453,2193,1421,2887, 812,2121, 634,  95,2435, 201,2312,4665,1646, # 3952
1671,2743,1601,2554,2702,2648,2280,1315,1366,2089,3132,1573,3718,3965,1729,1189, # 3968
 328,2679,1077,1940,1136, 558,1283, 964,1195, 621,2074,1199,1743,3460,3619,1896, # 3984
1916,1890,3836,2952,1154,2112,1064, 862, 378,3011,2066,2113,2803,1568,2839,6178, # 4000
3088,2919,1941,1660,2004,1992,2194, 142, 707,1590,1708,1624,1922,1023,1836,1233, # 4016
1004,2313, 789, 741,3620,6179,1609,2411,1200,4127,3719,3720,4666,2057,3721, 593, # 4032
2840, 367,2920,1878,6180,3461,1521, 628,1168, 692,2211,2649, 300, 720,2067,2571, # 4048
2953,3396, 959,2504,3966,3539,3462,1977, 701,6181, 954,1043, 800, 681, 183,3722, # 4064
1803,1730,3540,4128,2103, 815,2314, 174, 467, 230,2454,1093,2134, 755,3541,3397, # 4080
1141,1162,6182,1738,2039, 270,3256,2513,1005,1647,2185,3837, 858,1679,1897,1719, # 4096
2954,2324,1806, 402, 670, 167,4129,1498,2158,2104, 750,6183, 915, 189,1680,1551, # 4112
 455,4356,1501,2455, 405,1095,2955, 338,1586,1266,1819, 570, 641,1324, 237,1556, # 4128
2650,1388,3723,6184,1368,2384,1343,1978,3089,2436, 879,3724, 792,1191, 758,3012, # 4144
1411,2135,1322,4357, 240,4667,1848,3725,1574,6185, 420,3045,1546,1391, 714,4358, # 4160
1967, 941,1864, 863, 664, 426, 560,1731,2680,1785,2864,1949,2363, 403,3330,1415, # 4176
1279,2136,1697,2335, 204, 721,2097,3838,  90,6186,2085,2505, 191,3967, 124,2148, # 4192
1376,1798,1178,1107,1898,1405, 860,4359,1243,1272,2375,2983,1558,2456,1638, 113, # 4208
3621, 578,1923,2609, 880, 386,4130, 784,2186,2266,1422,2956,2172,1722, 497, 263, # 4224
2514,1267,2412,2610, 177,2703,3542, 774,1927,1344, 616,1432,1595,1018, 172,4360, # 4240
2325, 911,4361, 438,1468,3622, 794,3968,2024,2173,1681,1829,2957, 945, 895,3090, # 4256
 575,2212,2476, 475,2401,2681, 785,2744,1745,2293,2555,1975,3133,2865, 394,4668, # 4272
3839, 635,4131, 639, 202,1507,2195,2766,1345,1435,2572,3726,1908,1184,1181,2457, # 4288
3727,3134,4362, 843,2611, 437, 916,4669, 234, 769,1884,3046,3047,3623, 833,6187, # 4304
1639,2250,2402,1355,1185,2010,2047, 999, 525,1732,1290,1488,2612, 948,1578,3728, # 4320
2413,2477,1216,2725,2159, 334,3840,1328,3624,2921,1525,4132, 564,1056, 891,4363, # 4336
1444,1698,2385,2251,3729,1365,2281,2235,1717,6188, 864,3841,2515, 444, 527,2767, # 4352
2922,3625, 544, 461,6189, 566, 209,2437,3398,2098,1065,2068,3331,3626,3257,2137, # 4368  #last 512
)
# fmt: on
python3.12/site-packages/pip/_vendor/chardet/langhebrewmodel.py000064400000277624151732703330020506 0ustar00from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel

# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative

HEBREW_LANG_MODEL = {
    50: {  # 'a'
        50: 0,  # 'a'
        60: 1,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 2,  # 'l'
        54: 2,  # 'n'
        49: 0,  # 'o'
        51: 2,  # 'r'
        43: 1,  # 's'
        44: 2,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 1,  # 'ק'
        7: 0,  # 'ר'
        10: 1,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    60: {  # 'c'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 0,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 0,  # 'n'
        49: 1,  # 'o'
        51: 1,  # 'r'
        43: 1,  # 's'
        44: 2,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 1,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    61: {  # 'd'
        50: 1,  # 'a'
        60: 0,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 1,  # 'n'
        49: 2,  # 'o'
        51: 1,  # 'r'
        43: 1,  # 's'
        44: 0,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 1,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    42: {  # 'e'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 2,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 2,  # 'l'
        54: 2,  # 'n'
        49: 1,  # 'o'
        51: 2,  # 'r'
        43: 2,  # 's'
        44: 2,  # 't'
        63: 1,  # 'u'
        34: 1,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 1,  # '–'
        52: 2,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    53: {  # 'i'
        50: 1,  # 'a'
        60: 2,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 0,  # 'i'
        56: 1,  # 'l'
        54: 2,  # 'n'
        49: 2,  # 'o'
        51: 1,  # 'r'
        43: 2,  # 's'
        44: 2,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    56: {  # 'l'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 1,  # 'd'
        42: 2,  # 'e'
        53: 2,  # 'i'
        56: 2,  # 'l'
        54: 1,  # 'n'
        49: 1,  # 'o'
        51: 0,  # 'r'
        43: 1,  # 's'
        44: 1,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    54: {  # 'n'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 1,  # 'n'
        49: 1,  # 'o'
        51: 0,  # 'r'
        43: 1,  # 's'
        44: 2,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 2,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    49: {  # 'o'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 2,  # 'n'
        49: 1,  # 'o'
        51: 2,  # 'r'
        43: 1,  # 's'
        44: 1,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    51: {  # 'r'
        50: 2,  # 'a'
        60: 1,  # 'c'
        61: 1,  # 'd'
        42: 2,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 1,  # 'n'
        49: 2,  # 'o'
        51: 1,  # 'r'
        43: 1,  # 's'
        44: 1,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 2,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    43: {  # 's'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 0,  # 'd'
        42: 2,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 1,  # 'n'
        49: 1,  # 'o'
        51: 1,  # 'r'
        43: 1,  # 's'
        44: 2,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 2,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
    44: {  # 't'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 0,  # 'd'
        42: 2,  # 'e'
        53: 2,  # 'i'
        56: 1,  # 'l'
        54: 0,  # 'n'
        49: 1,  # 'o'
        51: 1,  # 'r'
        43: 1,  # 's'
        44: 1,  # 't'
        63: 1,  # 'u'
        34: 1,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 2,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    63: {  # 'u'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 1,  # 'n'
        49: 0,  # 'o'
        51: 1,  # 'r'
        43: 2,  # 's'
        44: 1,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    34: {  # '\xa0'
        50: 1,  # 'a'
        60: 0,  # 'c'
        61: 1,  # 'd'
        42: 0,  # 'e'
        53: 1,  # 'i'
        56: 0,  # 'l'
        54: 1,  # 'n'
        49: 1,  # 'o'
        51: 0,  # 'r'
        43: 1,  # 's'
        44: 1,  # 't'
        63: 0,  # 'u'
        34: 2,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 1,  # 'ב'
        20: 1,  # 'ג'
        16: 1,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 1,  # 'ח'
        22: 1,  # 'ט'
        1: 2,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 2,  # 'מ'
        23: 0,  # 'ן'
        12: 1,  # 'נ'
        19: 1,  # 'ס'
        13: 1,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    55: {  # '´'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 1,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 2,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 1,  # 'ן'
        12: 1,  # 'נ'
        19: 1,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    48: {  # '¼'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 1,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    39: {  # '½'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    57: {  # '¾'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    30: {  # 'ְ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 2,  # 'ב'
        20: 2,  # 'ג'
        16: 2,  # 'ד'
        3: 2,  # 'ה'
        2: 2,  # 'ו'
        24: 2,  # 'ז'
        14: 2,  # 'ח'
        22: 2,  # 'ט'
        1: 2,  # 'י'
        25: 2,  # 'ך'
        15: 2,  # 'כ'
        4: 2,  # 'ל'
        11: 1,  # 'ם'
        6: 2,  # 'מ'
        23: 0,  # 'ן'
        12: 2,  # 'נ'
        19: 2,  # 'ס'
        13: 2,  # 'ע'
        26: 0,  # 'ף'
        18: 2,  # 'פ'
        27: 0,  # 'ץ'
        21: 2,  # 'צ'
        17: 2,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    59: {  # 'ֱ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 1,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 1,  # 'ב'
        20: 1,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 1,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 2,  # 'ל'
        11: 0,  # 'ם'
        6: 2,  # 'מ'
        23: 0,  # 'ן'
        12: 1,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    41: {  # 'ֲ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 2,  # 'ב'
        20: 1,  # 'ג'
        16: 2,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 1,  # 'ח'
        22: 1,  # 'ט'
        1: 1,  # 'י'
        25: 1,  # 'ך'
        15: 1,  # 'כ'
        4: 2,  # 'ל'
        11: 0,  # 'ם'
        6: 2,  # 'מ'
        23: 0,  # 'ן'
        12: 2,  # 'נ'
        19: 1,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 2,  # 'צ'
        17: 1,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    33: {  # 'ִ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 1,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 1,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 1,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 1,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 2,  # 'ב'
        20: 2,  # 'ג'
        16: 2,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 2,  # 'ז'
        14: 1,  # 'ח'
        22: 1,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 2,  # 'כ'
        4: 2,  # 'ל'
        11: 2,  # 'ם'
        6: 2,  # 'מ'
        23: 2,  # 'ן'
        12: 2,  # 'נ'
        19: 2,  # 'ס'
        13: 1,  # 'ע'
        26: 0,  # 'ף'
        18: 2,  # 'פ'
        27: 1,  # 'ץ'
        21: 2,  # 'צ'
        17: 2,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    37: {  # 'ֵ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 1,  # 'ַ'
        29: 1,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 2,  # 'ב'
        20: 1,  # 'ג'
        16: 2,  # 'ד'
        3: 2,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 2,  # 'ח'
        22: 1,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 1,  # 'כ'
        4: 2,  # 'ל'
        11: 2,  # 'ם'
        6: 1,  # 'מ'
        23: 2,  # 'ן'
        12: 2,  # 'נ'
        19: 1,  # 'ס'
        13: 2,  # 'ע'
        26: 1,  # 'ף'
        18: 1,  # 'פ'
        27: 1,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    36: {  # 'ֶ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 1,  # 'ַ'
        29: 1,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 2,  # 'ב'
        20: 1,  # 'ג'
        16: 2,  # 'ד'
        3: 2,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 2,  # 'ח'
        22: 1,  # 'ט'
        1: 2,  # 'י'
        25: 2,  # 'ך'
        15: 1,  # 'כ'
        4: 2,  # 'ל'
        11: 2,  # 'ם'
        6: 2,  # 'מ'
        23: 2,  # 'ן'
        12: 2,  # 'נ'
        19: 2,  # 'ס'
        13: 1,  # 'ע'
        26: 1,  # 'ף'
        18: 1,  # 'פ'
        27: 2,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    31: {  # 'ַ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 1,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 2,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 2,  # 'ב'
        20: 2,  # 'ג'
        16: 2,  # 'ד'
        3: 2,  # 'ה'
        2: 1,  # 'ו'
        24: 2,  # 'ז'
        14: 2,  # 'ח'
        22: 2,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 2,  # 'כ'
        4: 2,  # 'ל'
        11: 2,  # 'ם'
        6: 2,  # 'מ'
        23: 2,  # 'ן'
        12: 2,  # 'נ'
        19: 2,  # 'ס'
        13: 2,  # 'ע'
        26: 2,  # 'ף'
        18: 2,  # 'פ'
        27: 1,  # 'ץ'
        21: 2,  # 'צ'
        17: 2,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    29: {  # 'ָ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 1,  # 'ַ'
        29: 2,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 1,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 2,  # 'ב'
        20: 2,  # 'ג'
        16: 2,  # 'ד'
        3: 3,  # 'ה'
        2: 2,  # 'ו'
        24: 2,  # 'ז'
        14: 2,  # 'ח'
        22: 1,  # 'ט'
        1: 2,  # 'י'
        25: 2,  # 'ך'
        15: 2,  # 'כ'
        4: 2,  # 'ל'
        11: 2,  # 'ם'
        6: 2,  # 'מ'
        23: 2,  # 'ן'
        12: 2,  # 'נ'
        19: 1,  # 'ס'
        13: 2,  # 'ע'
        26: 1,  # 'ף'
        18: 2,  # 'פ'
        27: 1,  # 'ץ'
        21: 2,  # 'צ'
        17: 2,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    35: {  # 'ֹ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 2,  # 'ב'
        20: 1,  # 'ג'
        16: 2,  # 'ד'
        3: 2,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 1,  # 'ח'
        22: 1,  # 'ט'
        1: 1,  # 'י'
        25: 1,  # 'ך'
        15: 2,  # 'כ'
        4: 2,  # 'ל'
        11: 2,  # 'ם'
        6: 2,  # 'מ'
        23: 2,  # 'ן'
        12: 2,  # 'נ'
        19: 2,  # 'ס'
        13: 2,  # 'ע'
        26: 1,  # 'ף'
        18: 2,  # 'פ'
        27: 1,  # 'ץ'
        21: 2,  # 'צ'
        17: 2,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    62: {  # 'ֻ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 1,  # 'ב'
        20: 1,  # 'ג'
        16: 1,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 1,  # 'ח'
        22: 0,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 2,  # 'ל'
        11: 1,  # 'ם'
        6: 1,  # 'מ'
        23: 1,  # 'ן'
        12: 1,  # 'נ'
        19: 1,  # 'ס'
        13: 1,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    28: {  # 'ּ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 3,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 1,  # 'ֲ'
        33: 3,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 3,  # 'ַ'
        29: 3,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 2,  # 'ׁ'
        45: 1,  # 'ׂ'
        9: 2,  # 'א'
        8: 2,  # 'ב'
        20: 1,  # 'ג'
        16: 2,  # 'ד'
        3: 1,  # 'ה'
        2: 2,  # 'ו'
        24: 1,  # 'ז'
        14: 1,  # 'ח'
        22: 1,  # 'ט'
        1: 2,  # 'י'
        25: 2,  # 'ך'
        15: 2,  # 'כ'
        4: 2,  # 'ל'
        11: 1,  # 'ם'
        6: 2,  # 'מ'
        23: 1,  # 'ן'
        12: 2,  # 'נ'
        19: 1,  # 'ס'
        13: 2,  # 'ע'
        26: 1,  # 'ף'
        18: 1,  # 'פ'
        27: 1,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 2,  # 'ר'
        10: 2,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    38: {  # 'ׁ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 2,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 1,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    45: {  # 'ׂ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 1,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 1,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 0,  # 'ב'
        20: 1,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 2,  # 'ו'
        24: 0,  # 'ז'
        14: 1,  # 'ח'
        22: 0,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 1,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 1,  # 'נ'
        19: 0,  # 'ס'
        13: 1,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 1,  # 'ר'
        10: 0,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    9: {  # 'א'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 1,  # '´'
        48: 1,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 2,  # 'ֱ'
        41: 2,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 3,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 2,  # 'ע'
        26: 3,  # 'ף'
        18: 3,  # 'פ'
        27: 1,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    8: {  # 'ב'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 1,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 3,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 2,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 1,  # 'ף'
        18: 3,  # 'פ'
        27: 2,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 1,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    20: {  # 'ג'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 2,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 1,  # 'ִ'
        37: 1,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 3,  # 'ב'
        20: 2,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 2,  # 'ח'
        22: 2,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 1,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 2,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 2,  # 'פ'
        27: 1,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    16: {  # 'ד'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 1,  # 'ז'
        14: 2,  # 'ח'
        22: 2,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 2,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 2,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 0,  # 'ץ'
        21: 2,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    3: {  # 'ה'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 1,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 0,  # '´'
        48: 1,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 1,  # 'ְ'
        59: 1,  # 'ֱ'
        41: 2,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 3,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 0,  # 'ף'
        18: 3,  # 'פ'
        27: 1,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 1,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
    2: {  # 'ו'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 1,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 1,  # '´'
        48: 1,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 1,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 3,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 3,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 3,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 3,  # 'ף'
        18: 3,  # 'פ'
        27: 3,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 1,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
    24: {  # 'ז'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 1,  # 'ֲ'
        33: 1,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 2,  # 'ב'
        20: 2,  # 'ג'
        16: 2,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 2,  # 'ז'
        14: 2,  # 'ח'
        22: 1,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 2,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 2,  # 'נ'
        19: 1,  # 'ס'
        13: 2,  # 'ע'
        26: 1,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 2,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 1,  # 'ש'
        5: 2,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    14: {  # 'ח'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 1,  # 'ֱ'
        41: 2,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 3,  # 'ב'
        20: 2,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 2,  # 'ח'
        22: 2,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 2,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 1,  # 'ע'
        26: 2,  # 'ף'
        18: 2,  # 'פ'
        27: 2,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    22: {  # 'ט'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 1,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 1,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 1,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 1,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 2,  # 'ז'
        14: 3,  # 'ח'
        22: 2,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 2,  # 'כ'
        4: 3,  # 'ל'
        11: 2,  # 'ם'
        6: 2,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 2,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 1,  # 'ץ'
        21: 2,  # 'צ'
        17: 2,  # 'ק'
        7: 3,  # 'ר'
        10: 2,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    1: {  # 'י'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 1,  # '´'
        48: 1,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 3,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 3,  # 'ף'
        18: 3,  # 'פ'
        27: 3,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 1,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
    25: {  # 'ך'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 2,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 1,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 1,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 1,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    15: {  # 'כ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 3,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 2,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 2,  # 'ט'
        1: 3,  # 'י'
        25: 3,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 2,  # 'ע'
        26: 3,  # 'ף'
        18: 3,  # 'פ'
        27: 1,  # 'ץ'
        21: 2,  # 'צ'
        17: 2,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    4: {  # 'ל'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 3,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 3,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 2,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 1,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    11: {  # 'ם'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 1,  # 'ב'
        20: 1,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 1,  # 'ח'
        22: 0,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 1,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 1,  # 'נ'
        19: 0,  # 'ס'
        13: 1,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 1,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
    6: {  # 'מ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 0,  # 'ף'
        18: 3,  # 'פ'
        27: 2,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    23: {  # 'ן'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 0,  # '´'
        48: 1,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 1,  # 'ב'
        20: 1,  # 'ג'
        16: 1,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 0,  # 'ז'
        14: 1,  # 'ח'
        22: 1,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 1,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 1,  # 'נ'
        19: 1,  # 'ס'
        13: 1,  # 'ע'
        26: 1,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 1,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 1,  # 'ת'
        32: 1,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
    12: {  # 'נ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 2,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    19: {  # 'ס'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 1,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 1,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 2,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 1,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 2,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 2,  # 'ס'
        13: 3,  # 'ע'
        26: 3,  # 'ף'
        18: 3,  # 'פ'
        27: 0,  # 'ץ'
        21: 2,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 1,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    13: {  # 'ע'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 1,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 1,  # 'ְ'
        59: 1,  # 'ֱ'
        41: 2,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 1,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 2,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 2,  # 'ע'
        26: 1,  # 'ף'
        18: 2,  # 'פ'
        27: 2,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    26: {  # 'ף'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 1,  # 'ו'
        24: 0,  # 'ז'
        14: 1,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 1,  # 'ס'
        13: 0,  # 'ע'
        26: 1,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 1,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    18: {  # 'פ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 1,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 1,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 2,  # 'ב'
        20: 3,  # 'ג'
        16: 2,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 2,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 2,  # 'ם'
        6: 2,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 2,  # 'פ'
        27: 2,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    27: {  # 'ץ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 1,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 1,  # 'ר'
        10: 0,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    21: {  # 'צ'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 2,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 1,  # 'ז'
        14: 3,  # 'ח'
        22: 2,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 1,  # 'כ'
        4: 3,  # 'ל'
        11: 2,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 1,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 2,  # 'ץ'
        21: 2,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 0,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    17: {  # 'ק'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 1,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 2,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 2,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 1,  # 'ך'
        15: 1,  # 'כ'
        4: 3,  # 'ל'
        11: 2,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 2,  # 'ץ'
        21: 3,  # 'צ'
        17: 2,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    7: {  # 'ר'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 2,  # '´'
        48: 1,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 1,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 2,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 3,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 3,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 3,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 3,  # 'ץ'
        21: 3,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
    10: {  # 'ש'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 1,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 1,  # 'ִ'
        37: 1,  # 'ֵ'
        36: 1,  # 'ֶ'
        31: 1,  # 'ַ'
        29: 1,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 3,  # 'ׁ'
        45: 2,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 3,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 2,  # 'ז'
        14: 3,  # 'ח'
        22: 3,  # 'ט'
        1: 3,  # 'י'
        25: 3,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 2,  # 'ן'
        12: 3,  # 'נ'
        19: 2,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 1,  # 'ץ'
        21: 2,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 1,  # '…'
    },
    5: {  # 'ת'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 1,  # '\xa0'
        55: 0,  # '´'
        48: 1,  # '¼'
        39: 1,  # '½'
        57: 0,  # '¾'
        30: 2,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 2,  # 'ִ'
        37: 2,  # 'ֵ'
        36: 2,  # 'ֶ'
        31: 2,  # 'ַ'
        29: 2,  # 'ָ'
        35: 1,  # 'ֹ'
        62: 1,  # 'ֻ'
        28: 2,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 3,  # 'א'
        8: 3,  # 'ב'
        20: 3,  # 'ג'
        16: 2,  # 'ד'
        3: 3,  # 'ה'
        2: 3,  # 'ו'
        24: 2,  # 'ז'
        14: 3,  # 'ח'
        22: 2,  # 'ט'
        1: 3,  # 'י'
        25: 2,  # 'ך'
        15: 3,  # 'כ'
        4: 3,  # 'ל'
        11: 3,  # 'ם'
        6: 3,  # 'מ'
        23: 3,  # 'ן'
        12: 3,  # 'נ'
        19: 2,  # 'ס'
        13: 3,  # 'ע'
        26: 2,  # 'ף'
        18: 3,  # 'פ'
        27: 1,  # 'ץ'
        21: 2,  # 'צ'
        17: 3,  # 'ק'
        7: 3,  # 'ר'
        10: 3,  # 'ש'
        5: 3,  # 'ת'
        32: 1,  # '–'
        52: 1,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
    32: {  # '–'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 1,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 1,  # 'ב'
        20: 1,  # 'ג'
        16: 1,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 0,  # 'ז'
        14: 1,  # 'ח'
        22: 0,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 1,  # 'ס'
        13: 1,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 1,  # 'צ'
        17: 0,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    52: {  # '’'
        50: 1,  # 'a'
        60: 0,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 1,  # 'r'
        43: 2,  # 's'
        44: 2,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 1,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    47: {  # '“'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 1,  # 'l'
        54: 1,  # 'n'
        49: 1,  # 'o'
        51: 1,  # 'r'
        43: 1,  # 's'
        44: 1,  # 't'
        63: 1,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 2,  # 'א'
        8: 1,  # 'ב'
        20: 1,  # 'ג'
        16: 1,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 1,  # 'ח'
        22: 1,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 1,  # 'נ'
        19: 1,  # 'ס'
        13: 1,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 1,  # 'צ'
        17: 1,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    46: {  # '”'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 1,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 1,  # 'ב'
        20: 1,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 1,  # 'צ'
        17: 0,  # 'ק'
        7: 1,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 0,  # '†'
        40: 0,  # '…'
    },
    58: {  # '†'
        50: 0,  # 'a'
        60: 0,  # 'c'
        61: 0,  # 'd'
        42: 0,  # 'e'
        53: 0,  # 'i'
        56: 0,  # 'l'
        54: 0,  # 'n'
        49: 0,  # 'o'
        51: 0,  # 'r'
        43: 0,  # 's'
        44: 0,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 0,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 0,  # 'ה'
        2: 0,  # 'ו'
        24: 0,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 0,  # 'י'
        25: 0,  # 'ך'
        15: 0,  # 'כ'
        4: 0,  # 'ל'
        11: 0,  # 'ם'
        6: 0,  # 'מ'
        23: 0,  # 'ן'
        12: 0,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 0,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 0,  # 'ר'
        10: 0,  # 'ש'
        5: 0,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 0,  # '”'
        58: 2,  # '†'
        40: 0,  # '…'
    },
    40: {  # '…'
        50: 1,  # 'a'
        60: 1,  # 'c'
        61: 1,  # 'd'
        42: 1,  # 'e'
        53: 1,  # 'i'
        56: 0,  # 'l'
        54: 1,  # 'n'
        49: 0,  # 'o'
        51: 1,  # 'r'
        43: 1,  # 's'
        44: 1,  # 't'
        63: 0,  # 'u'
        34: 0,  # '\xa0'
        55: 0,  # '´'
        48: 0,  # '¼'
        39: 0,  # '½'
        57: 0,  # '¾'
        30: 0,  # 'ְ'
        59: 0,  # 'ֱ'
        41: 0,  # 'ֲ'
        33: 0,  # 'ִ'
        37: 0,  # 'ֵ'
        36: 0,  # 'ֶ'
        31: 0,  # 'ַ'
        29: 0,  # 'ָ'
        35: 0,  # 'ֹ'
        62: 0,  # 'ֻ'
        28: 0,  # 'ּ'
        38: 0,  # 'ׁ'
        45: 0,  # 'ׂ'
        9: 1,  # 'א'
        8: 0,  # 'ב'
        20: 0,  # 'ג'
        16: 0,  # 'ד'
        3: 1,  # 'ה'
        2: 1,  # 'ו'
        24: 1,  # 'ז'
        14: 0,  # 'ח'
        22: 0,  # 'ט'
        1: 1,  # 'י'
        25: 0,  # 'ך'
        15: 1,  # 'כ'
        4: 1,  # 'ל'
        11: 0,  # 'ם'
        6: 1,  # 'מ'
        23: 0,  # 'ן'
        12: 1,  # 'נ'
        19: 0,  # 'ס'
        13: 0,  # 'ע'
        26: 0,  # 'ף'
        18: 1,  # 'פ'
        27: 0,  # 'ץ'
        21: 0,  # 'צ'
        17: 0,  # 'ק'
        7: 1,  # 'ר'
        10: 1,  # 'ש'
        5: 1,  # 'ת'
        32: 0,  # '–'
        52: 0,  # '’'
        47: 0,  # '“'
        46: 1,  # '”'
        58: 0,  # '†'
        40: 2,  # '…'
    },
}

# 255: Undefined characters that did not exist in training text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9
# 251: Control characters

# Character Mapping Table(s):
WINDOWS_1255_HEBREW_CHAR_TO_ORDER = {
    0: 255,  # '\x00'
    1: 255,  # '\x01'
    2: 255,  # '\x02'
    3: 255,  # '\x03'
    4: 255,  # '\x04'
    5: 255,  # '\x05'
    6: 255,  # '\x06'
    7: 255,  # '\x07'
    8: 255,  # '\x08'
    9: 255,  # '\t'
    10: 254,  # '\n'
    11: 255,  # '\x0b'
    12: 255,  # '\x0c'
    13: 254,  # '\r'
    14: 255,  # '\x0e'
    15: 255,  # '\x0f'
    16: 255,  # '\x10'
    17: 255,  # '\x11'
    18: 255,  # '\x12'
    19: 255,  # '\x13'
    20: 255,  # '\x14'
    21: 255,  # '\x15'
    22: 255,  # '\x16'
    23: 255,  # '\x17'
    24: 255,  # '\x18'
    25: 255,  # '\x19'
    26: 255,  # '\x1a'
    27: 255,  # '\x1b'
    28: 255,  # '\x1c'
    29: 255,  # '\x1d'
    30: 255,  # '\x1e'
    31: 255,  # '\x1f'
    32: 253,  # ' '
    33: 253,  # '!'
    34: 253,  # '"'
    35: 253,  # '#'
    36: 253,  # '$'
    37: 253,  # '%'
    38: 253,  # '&'
    39: 253,  # "'"
    40: 253,  # '('
    41: 253,  # ')'
    42: 253,  # '*'
    43: 253,  # '+'
    44: 253,  # ','
    45: 253,  # '-'
    46: 253,  # '.'
    47: 253,  # '/'
    48: 252,  # '0'
    49: 252,  # '1'
    50: 252,  # '2'
    51: 252,  # '3'
    52: 252,  # '4'
    53: 252,  # '5'
    54: 252,  # '6'
    55: 252,  # '7'
    56: 252,  # '8'
    57: 252,  # '9'
    58: 253,  # ':'
    59: 253,  # ';'
    60: 253,  # '<'
    61: 253,  # '='
    62: 253,  # '>'
    63: 253,  # '?'
    64: 253,  # '@'
    65: 69,  # 'A'
    66: 91,  # 'B'
    67: 79,  # 'C'
    68: 80,  # 'D'
    69: 92,  # 'E'
    70: 89,  # 'F'
    71: 97,  # 'G'
    72: 90,  # 'H'
    73: 68,  # 'I'
    74: 111,  # 'J'
    75: 112,  # 'K'
    76: 82,  # 'L'
    77: 73,  # 'M'
    78: 95,  # 'N'
    79: 85,  # 'O'
    80: 78,  # 'P'
    81: 121,  # 'Q'
    82: 86,  # 'R'
    83: 71,  # 'S'
    84: 67,  # 'T'
    85: 102,  # 'U'
    86: 107,  # 'V'
    87: 84,  # 'W'
    88: 114,  # 'X'
    89: 103,  # 'Y'
    90: 115,  # 'Z'
    91: 253,  # '['
    92: 253,  # '\\'
    93: 253,  # ']'
    94: 253,  # '^'
    95: 253,  # '_'
    96: 253,  # '`'
    97: 50,  # 'a'
    98: 74,  # 'b'
    99: 60,  # 'c'
    100: 61,  # 'd'
    101: 42,  # 'e'
    102: 76,  # 'f'
    103: 70,  # 'g'
    104: 64,  # 'h'
    105: 53,  # 'i'
    106: 105,  # 'j'
    107: 93,  # 'k'
    108: 56,  # 'l'
    109: 65,  # 'm'
    110: 54,  # 'n'
    111: 49,  # 'o'
    112: 66,  # 'p'
    113: 110,  # 'q'
    114: 51,  # 'r'
    115: 43,  # 's'
    116: 44,  # 't'
    117: 63,  # 'u'
    118: 81,  # 'v'
    119: 77,  # 'w'
    120: 98,  # 'x'
    121: 75,  # 'y'
    122: 108,  # 'z'
    123: 253,  # '{'
    124: 253,  # '|'
    125: 253,  # '}'
    126: 253,  # '~'
    127: 253,  # '\x7f'
    128: 124,  # '€'
    129: 202,  # None
    130: 203,  # '‚'
    131: 204,  # 'ƒ'
    132: 205,  # '„'
    133: 40,  # '…'
    134: 58,  # '†'
    135: 206,  # '‡'
    136: 207,  # 'ˆ'
    137: 208,  # '‰'
    138: 209,  # None
    139: 210,  # '‹'
    140: 211,  # None
    141: 212,  # None
    142: 213,  # None
    143: 214,  # None
    144: 215,  # None
    145: 83,  # '‘'
    146: 52,  # '’'
    147: 47,  # '“'
    148: 46,  # '”'
    149: 72,  # '•'
    150: 32,  # '–'
    151: 94,  # '—'
    152: 216,  # '˜'
    153: 113,  # '™'
    154: 217,  # None
    155: 109,  # '›'
    156: 218,  # None
    157: 219,  # None
    158: 220,  # None
    159: 221,  # None
    160: 34,  # '\xa0'
    161: 116,  # '¡'
    162: 222,  # '¢'
    163: 118,  # '£'
    164: 100,  # '₪'
    165: 223,  # '¥'
    166: 224,  # '¦'
    167: 117,  # '§'
    168: 119,  # '¨'
    169: 104,  # '©'
    170: 125,  # '×'
    171: 225,  # '«'
    172: 226,  # '¬'
    173: 87,  # '\xad'
    174: 99,  # '®'
    175: 227,  # '¯'
    176: 106,  # '°'
    177: 122,  # '±'
    178: 123,  # '²'
    179: 228,  # '³'
    180: 55,  # '´'
    181: 229,  # 'µ'
    182: 230,  # '¶'
    183: 101,  # '·'
    184: 231,  # '¸'
    185: 232,  # '¹'
    186: 120,  # '÷'
    187: 233,  # '»'
    188: 48,  # '¼'
    189: 39,  # '½'
    190: 57,  # '¾'
    191: 234,  # '¿'
    192: 30,  # 'ְ'
    193: 59,  # 'ֱ'
    194: 41,  # 'ֲ'
    195: 88,  # 'ֳ'
    196: 33,  # 'ִ'
    197: 37,  # 'ֵ'
    198: 36,  # 'ֶ'
    199: 31,  # 'ַ'
    200: 29,  # 'ָ'
    201: 35,  # 'ֹ'
    202: 235,  # None
    203: 62,  # 'ֻ'
    204: 28,  # 'ּ'
    205: 236,  # 'ֽ'
    206: 126,  # '־'
    207: 237,  # 'ֿ'
    208: 238,  # '׀'
    209: 38,  # 'ׁ'
    210: 45,  # 'ׂ'
    211: 239,  # '׃'
    212: 240,  # 'װ'
    213: 241,  # 'ױ'
    214: 242,  # 'ײ'
    215: 243,  # '׳'
    216: 127,  # '״'
    217: 244,  # None
    218: 245,  # None
    219: 246,  # None
    220: 247,  # None
    221: 248,  # None
    222: 249,  # None
    223: 250,  # None
    224: 9,  # 'א'
    225: 8,  # 'ב'
    226: 20,  # 'ג'
    227: 16,  # 'ד'
    228: 3,  # 'ה'
    229: 2,  # 'ו'
    230: 24,  # 'ז'
    231: 14,  # 'ח'
    232: 22,  # 'ט'
    233: 1,  # 'י'
    234: 25,  # 'ך'
    235: 15,  # 'כ'
    236: 4,  # 'ל'
    237: 11,  # 'ם'
    238: 6,  # 'מ'
    239: 23,  # 'ן'
    240: 12,  # 'נ'
    241: 19,  # 'ס'
    242: 13,  # 'ע'
    243: 26,  # 'ף'
    244: 18,  # 'פ'
    245: 27,  # 'ץ'
    246: 21,  # 'צ'
    247: 17,  # 'ק'
    248: 7,  # 'ר'
    249: 10,  # 'ש'
    250: 5,  # 'ת'
    251: 251,  # None
    252: 252,  # None
    253: 128,  # '\u200e'
    254: 96,  # '\u200f'
    255: 253,  # None
}

WINDOWS_1255_HEBREW_MODEL = SingleByteCharSetModel(
    charset_name="windows-1255",
    language="Hebrew",
    char_to_order_map=WINDOWS_1255_HEBREW_CHAR_TO_ORDER,
    language_model=HEBREW_LANG_MODEL,
    typical_positive_ratio=0.984004,
    keep_ascii_letters=False,
    alphabet="אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ",
)
python3.12/site-packages/pip/_vendor/chardet/gb2312freq.py000064400000050377151732703330017117 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# GB2312 most frequently used character table
#
# Char to FreqOrder table , from hz6763

# 512  --> 0.79  -- 0.79
# 1024 --> 0.92  -- 0.13
# 2048 --> 0.98  -- 0.06
# 6768 --> 1.00  -- 0.02
#
# Ideal Distribution Ratio = 0.79135/(1-0.79135) = 3.79
# Random Distribution Ration = 512 / (3755 - 512) = 0.157
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher that RDR

GB2312_TYPICAL_DISTRIBUTION_RATIO = 0.9

GB2312_TABLE_SIZE = 3760

# fmt: off
GB2312_CHAR_TO_FREQ_ORDER = (
1671, 749,1443,2364,3924,3807,2330,3921,1704,3463,2691,1511,1515, 572,3191,2205,
2361, 224,2558, 479,1711, 963,3162, 440,4060,1905,2966,2947,3580,2647,3961,3842,
2204, 869,4207, 970,2678,5626,2944,2956,1479,4048, 514,3595, 588,1346,2820,3409,
 249,4088,1746,1873,2047,1774, 581,1813, 358,1174,3590,1014,1561,4844,2245, 670,
1636,3112, 889,1286, 953, 556,2327,3060,1290,3141, 613, 185,3477,1367, 850,3820,
1715,2428,2642,2303,2732,3041,2562,2648,3566,3946,1349, 388,3098,2091,1360,3585,
 152,1687,1539, 738,1559,  59,1232,2925,2267,1388,1249,1741,1679,2960, 151,1566,
1125,1352,4271, 924,4296, 385,3166,4459, 310,1245,2850,  70,3285,2729,3534,3575,
2398,3298,3466,1960,2265, 217,3647, 864,1909,2084,4401,2773,1010,3269,5152, 853,
3051,3121,1244,4251,1895, 364,1499,1540,2313,1180,3655,2268, 562, 715,2417,3061,
 544, 336,3768,2380,1752,4075, 950, 280,2425,4382, 183,2759,3272, 333,4297,2155,
1688,2356,1444,1039,4540, 736,1177,3349,2443,2368,2144,2225, 565, 196,1482,3406,
 927,1335,4147, 692, 878,1311,1653,3911,3622,1378,4200,1840,2969,3149,2126,1816,
2534,1546,2393,2760, 737,2494,  13, 447, 245,2747,  38,2765,2129,2589,1079, 606,
 360, 471,3755,2890, 404, 848, 699,1785,1236, 370,2221,1023,3746,2074,2026,2023,
2388,1581,2119, 812,1141,3091,2536,1519, 804,2053, 406,1596,1090, 784, 548,4414,
1806,2264,2936,1100, 343,4114,5096, 622,3358, 743,3668,1510,1626,5020,3567,2513,
3195,4115,5627,2489,2991,  24,2065,2697,1087,2719,  48,1634, 315,  68, 985,2052,
 198,2239,1347,1107,1439, 597,2366,2172, 871,3307, 919,2487,2790,1867, 236,2570,
1413,3794, 906,3365,3381,1701,1982,1818,1524,2924,1205, 616,2586,2072,2004, 575,
 253,3099,  32,1365,1182, 197,1714,2454,1201, 554,3388,3224,2748, 756,2587, 250,
2567,1507,1517,3529,1922,2761,2337,3416,1961,1677,2452,2238,3153, 615, 911,1506,
1474,2495,1265,1906,2749,3756,3280,2161, 898,2714,1759,3450,2243,2444, 563,  26,
3286,2266,3769,3344,2707,3677, 611,1402, 531,1028,2871,4548,1375, 261,2948, 835,
1190,4134, 353, 840,2684,1900,3082,1435,2109,1207,1674, 329,1872,2781,4055,2686,
2104, 608,3318,2423,2957,2768,1108,3739,3512,3271,3985,2203,1771,3520,1418,2054,
1681,1153, 225,1627,2929, 162,2050,2511,3687,1954, 124,1859,2431,1684,3032,2894,
 585,4805,3969,2869,2704,2088,2032,2095,3656,2635,4362,2209, 256, 518,2042,2105,
3777,3657, 643,2298,1148,1779, 190, 989,3544, 414,  11,2135,2063,2979,1471, 403,
3678, 126, 770,1563, 671,2499,3216,2877, 600,1179, 307,2805,4937,1268,1297,2694,
 252,4032,1448,1494,1331,1394, 127,2256, 222,1647,1035,1481,3056,1915,1048, 873,
3651, 210,  33,1608,2516, 200,1520, 415, 102,   0,3389,1287, 817,  91,3299,2940,
 836,1814, 549,2197,1396,1669,2987,3582,2297,2848,4528,1070, 687,  20,1819, 121,
1552,1364,1461,1968,2617,3540,2824,2083, 177, 948,4938,2291, 110,4549,2066, 648,
3359,1755,2110,2114,4642,4845,1693,3937,3308,1257,1869,2123, 208,1804,3159,2992,
2531,2549,3361,2418,1350,2347,2800,2568,1291,2036,2680,  72, 842,1990, 212,1233,
1154,1586,  75,2027,3410,4900,1823,1337,2710,2676, 728,2810,1522,3026,4995, 157,
 755,1050,4022, 710, 785,1936,2194,2085,1406,2777,2400, 150,1250,4049,1206, 807,
1910, 534, 529,3309,1721,1660, 274,  39,2827, 661,2670,1578, 925,3248,3815,1094,
4278,4901,4252,  41,1150,3747,2572,2227,4501,3658,4902,3813,3357,3617,2884,2258,
 887, 538,4187,3199,1294,2439,3042,2329,2343,2497,1255, 107, 543,1527, 521,3478,
3568, 194,5062,  15, 961,3870,1241,1192,2664,  66,5215,3260,2111,1295,1127,2152,
3805,4135, 901,1164,1976, 398,1278, 530,1460, 748, 904,1054,1966,1426,  53,2909,
 509, 523,2279,1534, 536,1019, 239,1685, 460,2353, 673,1065,2401,3600,4298,2272,
1272,2363, 284,1753,3679,4064,1695,  81, 815,2677,2757,2731,1386, 859, 500,4221,
2190,2566, 757,1006,2519,2068,1166,1455, 337,2654,3203,1863,1682,1914,3025,1252,
1409,1366, 847, 714,2834,2038,3209, 964,2970,1901, 885,2553,1078,1756,3049, 301,
1572,3326, 688,2130,1996,2429,1805,1648,2930,3421,2750,3652,3088, 262,1158,1254,
 389,1641,1812, 526,1719, 923,2073,1073,1902, 468, 489,4625,1140, 857,2375,3070,
3319,2863, 380, 116,1328,2693,1161,2244, 273,1212,1884,2769,3011,1775,1142, 461,
3066,1200,2147,2212, 790, 702,2695,4222,1601,1058, 434,2338,5153,3640,  67,2360,
4099,2502, 618,3472,1329, 416,1132, 830,2782,1807,2653,3211,3510,1662, 192,2124,
 296,3979,1739,1611,3684,  23, 118, 324, 446,1239,1225, 293,2520,3814,3795,2535,
3116,  17,1074, 467,2692,2201, 387,2922,  45,1326,3055,1645,3659,2817, 958, 243,
1903,2320,1339,2825,1784,3289, 356, 576, 865,2315,2381,3377,3916,1088,3122,1713,
1655, 935, 628,4689,1034,1327, 441, 800, 720, 894,1979,2183,1528,5289,2702,1071,
4046,3572,2399,1571,3281,  79, 761,1103, 327, 134, 758,1899,1371,1615, 879, 442,
 215,2605,2579, 173,2048,2485,1057,2975,3317,1097,2253,3801,4263,1403,1650,2946,
 814,4968,3487,1548,2644,1567,1285,   2, 295,2636,  97, 946,3576, 832, 141,4257,
3273, 760,3821,3521,3156,2607, 949,1024,1733,1516,1803,1920,2125,2283,2665,3180,
1501,2064,3560,2171,1592, 803,3518,1416, 732,3897,4258,1363,1362,2458, 119,1427,
 602,1525,2608,1605,1639,3175, 694,3064,  10, 465,  76,2000,4846,4208, 444,3781,
1619,3353,2206,1273,3796, 740,2483, 320,1723,2377,3660,2619,1359,1137,1762,1724,
2345,2842,1850,1862, 912, 821,1866, 612,2625,1735,2573,3369,1093, 844,  89, 937,
 930,1424,3564,2413,2972,1004,3046,3019,2011, 711,3171,1452,4178, 428, 801,1943,
 432, 445,2811, 206,4136,1472, 730, 349,  73, 397,2802,2547, 998,1637,1167, 789,
 396,3217, 154,1218, 716,1120,1780,2819,4826,1931,3334,3762,2139,1215,2627, 552,
3664,3628,3232,1405,2383,3111,1356,2652,3577,3320,3101,1703, 640,1045,1370,1246,
4996, 371,1575,2436,1621,2210, 984,4033,1734,2638,  16,4529, 663,2755,3255,1451,
3917,2257,1253,1955,2234,1263,2951, 214,1229, 617, 485, 359,1831,1969, 473,2310,
 750,2058, 165,  80,2864,2419, 361,4344,2416,2479,1134, 796,3726,1266,2943, 860,
2715, 938, 390,2734,1313,1384, 248, 202, 877,1064,2854, 522,3907, 279,1602, 297,
2357, 395,3740, 137,2075, 944,4089,2584,1267,3802,  62,1533,2285, 178, 176, 780,
2440, 201,3707, 590, 478,1560,4354,2117,1075,  30,  74,4643,4004,1635,1441,2745,
 776,2596, 238,1077,1692,1912,2844, 605, 499,1742,3947, 241,3053, 980,1749, 936,
2640,4511,2582, 515,1543,2162,5322,2892,2993, 890,2148,1924, 665,1827,3581,1032,
 968,3163, 339,1044,1896, 270, 583,1791,1720,4367,1194,3488,3669,  43,2523,1657,
 163,2167, 290,1209,1622,3378, 550, 634,2508,2510, 695,2634,2384,2512,1476,1414,
 220,1469,2341,2138,2852,3183,2900,4939,2865,3502,1211,3680, 854,3227,1299,2976,
3172, 186,2998,1459, 443,1067,3251,1495, 321,1932,3054, 909, 753,1410,1828, 436,
2441,1119,1587,3164,2186,1258, 227, 231,1425,1890,3200,3942, 247, 959, 725,5254,
2741, 577,2158,2079, 929, 120, 174, 838,2813, 591,1115, 417,2024,  40,3240,1536,
1037, 291,4151,2354, 632,1298,2406,2500,3535,1825,1846,3451, 205,1171, 345,4238,
  18,1163, 811, 685,2208,1217, 425,1312,1508,1175,4308,2552,1033, 587,1381,3059,
2984,3482, 340,1316,4023,3972, 792,3176, 519, 777,4690, 918, 933,4130,2981,3741,
  90,3360,2911,2200,5184,4550, 609,3079,2030, 272,3379,2736, 363,3881,1130,1447,
 286, 779, 357,1169,3350,3137,1630,1220,2687,2391, 747,1277,3688,2618,2682,2601,
1156,3196,5290,4034,3102,1689,3596,3128, 874, 219,2783, 798, 508,1843,2461, 269,
1658,1776,1392,1913,2983,3287,2866,2159,2372, 829,4076,  46,4253,2873,1889,1894,
 915,1834,1631,2181,2318, 298, 664,2818,3555,2735, 954,3228,3117, 527,3511,2173,
 681,2712,3033,2247,2346,3467,1652, 155,2164,3382, 113,1994, 450, 899, 494, 994,
1237,2958,1875,2336,1926,3727, 545,1577,1550, 633,3473, 204,1305,3072,2410,1956,
2471, 707,2134, 841,2195,2196,2663,3843,1026,4940, 990,3252,4997, 368,1092, 437,
3212,3258,1933,1829, 675,2977,2893, 412, 943,3723,4644,3294,3283,2230,2373,5154,
2389,2241,2661,2323,1404,2524, 593, 787, 677,3008,1275,2059, 438,2709,2609,2240,
2269,2246,1446,  36,1568,1373,3892,1574,2301,1456,3962, 693,2276,5216,2035,1143,
2720,1919,1797,1811,2763,4137,2597,1830,1699,1488,1198,2090, 424,1694, 312,3634,
3390,4179,3335,2252,1214, 561,1059,3243,2295,2561, 975,5155,2321,2751,3772, 472,
1537,3282,3398,1047,2077,2348,2878,1323,3340,3076, 690,2906,  51, 369, 170,3541,
1060,2187,2688,3670,2541,1083,1683, 928,3918, 459, 109,4427, 599,3744,4286, 143,
2101,2730,2490,  82,1588,3036,2121, 281,1860, 477,4035,1238,2812,3020,2716,3312,
1530,2188,2055,1317, 843, 636,1808,1173,3495, 649, 181,1002, 147,3641,1159,2414,
3750,2289,2795, 813,3123,2610,1136,4368,   5,3391,4541,2174, 420, 429,1728, 754,
1228,2115,2219, 347,2223,2733, 735,1518,3003,2355,3134,1764,3948,3329,1888,2424,
1001,1234,1972,3321,3363,1672,1021,1450,1584, 226, 765, 655,2526,3404,3244,2302,
3665, 731, 594,2184, 319,1576, 621, 658,2656,4299,2099,3864,1279,2071,2598,2739,
 795,3086,3699,3908,1707,2352,2402,1382,3136,2475,1465,4847,3496,3865,1085,3004,
2591,1084, 213,2287,1963,3565,2250, 822, 793,4574,3187,1772,1789,3050, 595,1484,
1959,2770,1080,2650, 456, 422,2996, 940,3322,4328,4345,3092,2742, 965,2784, 739,
4124, 952,1358,2498,2949,2565, 332,2698,2378, 660,2260,2473,4194,3856,2919, 535,
1260,2651,1208,1428,1300,1949,1303,2942, 433,2455,2450,1251,1946, 614,1269, 641,
1306,1810,2737,3078,2912, 564,2365,1419,1415,1497,4460,2367,2185,1379,3005,1307,
3218,2175,1897,3063, 682,1157,4040,4005,1712,1160,1941,1399, 394, 402,2952,1573,
1151,2986,2404, 862, 299,2033,1489,3006, 346, 171,2886,3401,1726,2932, 168,2533,
  47,2507,1030,3735,1145,3370,1395,1318,1579,3609,4560,2857,4116,1457,2529,1965,
 504,1036,2690,2988,2405, 745,5871, 849,2397,2056,3081, 863,2359,3857,2096,  99,
1397,1769,2300,4428,1643,3455,1978,1757,3718,1440,  35,4879,3742,1296,4228,2280,
 160,5063,1599,2013, 166, 520,3479,1646,3345,3012, 490,1937,1545,1264,2182,2505,
1096,1188,1369,1436,2421,1667,2792,2460,1270,2122, 727,3167,2143, 806,1706,1012,
1800,3037, 960,2218,1882, 805, 139,2456,1139,1521, 851,1052,3093,3089, 342,2039,
 744,5097,1468,1502,1585,2087, 223, 939, 326,2140,2577, 892,2481,1623,4077, 982,
3708, 135,2131,  87,2503,3114,2326,1106, 876,1616, 547,2997,2831,2093,3441,4530,
4314,   9,3256,4229,4148, 659,1462,1986,1710,2046,2913,2231,4090,4880,5255,3392,
3274,1368,3689,4645,1477, 705,3384,3635,1068,1529,2941,1458,3782,1509, 100,1656,
2548, 718,2339, 408,1590,2780,3548,1838,4117,3719,1345,3530, 717,3442,2778,3220,
2898,1892,4590,3614,3371,2043,1998,1224,3483, 891, 635, 584,2559,3355, 733,1766,
1729,1172,3789,1891,2307, 781,2982,2271,1957,1580,5773,2633,2005,4195,3097,1535,
3213,1189,1934,5693,3262, 586,3118,1324,1598, 517,1564,2217,1868,1893,4445,3728,
2703,3139,1526,1787,1992,3882,2875,1549,1199,1056,2224,1904,2711,5098,4287, 338,
1993,3129,3489,2689,1809,2815,1997, 957,1855,3898,2550,3275,3057,1105,1319, 627,
1505,1911,1883,3526, 698,3629,3456,1833,1431, 746,  77,1261,2017,2296,1977,1885,
 125,1334,1600, 525,1798,1109,2222,1470,1945, 559,2236,1186,3443,2476,1929,1411,
2411,3135,1777,3372,2621,1841,1613,3229, 668,1430,1839,2643,2916, 195,1989,2671,
2358,1387, 629,3205,2293,5256,4439, 123,1310, 888,1879,4300,3021,3605,1003,1162,
3192,2910,2010, 140,2395,2859,  55,1082,2012,2901, 662, 419,2081,1438, 680,2774,
4654,3912,1620,1731,1625,5035,4065,2328, 512,1344, 802,5443,2163,2311,2537, 524,
3399,  98,1155,2103,1918,2606,3925,2816,1393,2465,1504,3773,2177,3963,1478,4346,
 180,1113,4655,3461,2028,1698, 833,2696,1235,1322,1594,4408,3623,3013,3225,2040,
3022, 541,2881, 607,3632,2029,1665,1219, 639,1385,1686,1099,2803,3231,1938,3188,
2858, 427, 676,2772,1168,2025, 454,3253,2486,3556, 230,1950, 580, 791,1991,1280,
1086,1974,2034, 630, 257,3338,2788,4903,1017,  86,4790, 966,2789,1995,1696,1131,
 259,3095,4188,1308, 179,1463,5257, 289,4107,1248,  42,3413,1725,2288, 896,1947,
 774,4474,4254, 604,3430,4264, 392,2514,2588, 452, 237,1408,3018, 988,4531,1970,
3034,3310, 540,2370,1562,1288,2990, 502,4765,1147,   4,1853,2708, 207, 294,2814,
4078,2902,2509, 684,  34,3105,3532,2551, 644, 709,2801,2344, 573,1727,3573,3557,
2021,1081,3100,4315,2100,3681, 199,2263,1837,2385, 146,3484,1195,2776,3949, 997,
1939,3973,1008,1091,1202,1962,1847,1149,4209,5444,1076, 493, 117,5400,2521, 972,
1490,2934,1796,4542,2374,1512,2933,2657, 413,2888,1135,2762,2314,2156,1355,2369,
 766,2007,2527,2170,3124,2491,2593,2632,4757,2437, 234,3125,3591,1898,1750,1376,
1942,3468,3138, 570,2127,2145,3276,4131, 962, 132,1445,4196,  19, 941,3624,3480,
3366,1973,1374,4461,3431,2629, 283,2415,2275, 808,2887,3620,2112,2563,1353,3610,
 955,1089,3103,1053,  96,  88,4097, 823,3808,1583, 399, 292,4091,3313, 421,1128,
 642,4006, 903,2539,1877,2082, 596,  29,4066,1790, 722,2157, 130, 995,1569, 769,
1485, 464, 513,2213, 288,1923,1101,2453,4316, 133, 486,2445,  50, 625, 487,2207,
  57, 423, 481,2962, 159,3729,1558, 491, 303, 482, 501, 240,2837, 112,3648,2392,
1783, 362,   8,3433,3422, 610,2793,3277,1390,1284,1654,  21,3823, 734, 367, 623,
 193, 287, 374,1009,1483, 816, 476, 313,2255,2340,1262,2150,2899,1146,2581, 782,
2116,1659,2018,1880, 255,3586,3314,1110,2867,2137,2564, 986,2767,5185,2006, 650,
 158, 926, 762, 881,3157,2717,2362,3587, 306,3690,3245,1542,3077,2427,1691,2478,
2118,2985,3490,2438, 539,2305, 983, 129,1754, 355,4201,2386, 827,2923, 104,1773,
2838,2771, 411,2905,3919, 376, 767, 122,1114, 828,2422,1817,3506, 266,3460,1007,
1609,4998, 945,2612,4429,2274, 726,1247,1964,2914,2199,2070,4002,4108, 657,3323,
1422, 579, 455,2764,4737,1222,2895,1670, 824,1223,1487,2525, 558, 861,3080, 598,
2659,2515,1967, 752,2583,2376,2214,4180, 977, 704,2464,4999,2622,4109,1210,2961,
 819,1541, 142,2284,  44, 418, 457,1126,3730,4347,4626,1644,1876,3671,1864, 302,
1063,5694, 624, 723,1984,3745,1314,1676,2488,1610,1449,3558,3569,2166,2098, 409,
1011,2325,3704,2306, 818,1732,1383,1824,1844,3757, 999,2705,3497,1216,1423,2683,
2426,2954,2501,2726,2229,1475,2554,5064,1971,1794,1666,2014,1343, 783, 724, 191,
2434,1354,2220,5065,1763,2752,2472,4152, 131, 175,2885,3434,  92,1466,4920,2616,
3871,3872,3866, 128,1551,1632, 669,1854,3682,4691,4125,1230, 188,2973,3290,1302,
1213, 560,3266, 917, 763,3909,3249,1760, 868,1958, 764,1782,2097, 145,2277,3774,
4462,  64,1491,3062, 971,2132,3606,2442, 221,1226,1617, 218, 323,1185,3207,3147,
 571, 619,1473,1005,1744,2281, 449,1887,2396,3685, 275, 375,3816,1743,3844,3731,
 845,1983,2350,4210,1377, 773, 967,3499,3052,3743,2725,4007,1697,1022,3943,1464,
3264,2855,2722,1952,1029,2839,2467,  84,4383,2215, 820,1391,2015,2448,3672, 377,
1948,2168, 797,2545,3536,2578,2645,  94,2874,1678, 405,1259,3071, 771, 546,1315,
 470,1243,3083, 895,2468, 981, 969,2037, 846,4181, 653,1276,2928,  14,2594, 557,
3007,2474, 156, 902,1338,1740,2574, 537,2518, 973,2282,2216,2433,1928, 138,2903,
1293,2631,1612, 646,3457, 839,2935, 111, 496,2191,2847, 589,3186, 149,3994,2060,
4031,2641,4067,3145,1870,  37,3597,2136,1025,2051,3009,3383,3549,1121,1016,3261,
1301, 251,2446,2599,2153, 872,3246, 637, 334,3705, 831, 884, 921,3065,3140,4092,
2198,1944, 246,2964, 108,2045,1152,1921,2308,1031, 203,3173,4170,1907,3890, 810,
1401,2003,1690, 506, 647,1242,2828,1761,1649,3208,2249,1589,3709,2931,5156,1708,
 498, 666,2613, 834,3817,1231, 184,2851,1124, 883,3197,2261,3710,1765,1553,2658,
1178,2639,2351,  93,1193, 942,2538,2141,4402, 235,1821, 870,1591,2192,1709,1871,
3341,1618,4126,2595,2334, 603, 651,  69, 701, 268,2662,3411,2555,1380,1606, 503,
 448, 254,2371,2646, 574,1187,2309,1770, 322,2235,1292,1801, 305, 566,1133, 229,
2067,2057, 706, 167, 483,2002,2672,3295,1820,3561,3067, 316, 378,2746,3452,1112,
 136,1981, 507,1651,2917,1117, 285,4591, 182,2580,3522,1304, 335,3303,1835,2504,
1795,1792,2248, 674,1018,2106,2449,1857,2292,2845, 976,3047,1781,2600,2727,1389,
1281,  52,3152, 153, 265,3950, 672,3485,3951,4463, 430,1183, 365, 278,2169,  27,
1407,1336,2304, 209,1340,1730,2202,1852,2403,2883, 979,1737,1062, 631,2829,2542,
3876,2592, 825,2086,2226,3048,3625, 352,1417,3724, 542, 991, 431,1351,3938,1861,
2294, 826,1361,2927,3142,3503,1738, 463,2462,2723, 582,1916,1595,2808, 400,3845,
3891,2868,3621,2254,  58,2492,1123, 910,2160,2614,1372,1603,1196,1072,3385,1700,
3267,1980, 696, 480,2430, 920, 799,1570,2920,1951,2041,4047,2540,1321,4223,2469,
3562,2228,1271,2602, 401,2833,3351,2575,5157, 907,2312,1256, 410, 263,3507,1582,
 996, 678,1849,2316,1480, 908,3545,2237, 703,2322, 667,1826,2849,1531,2604,2999,
2407,3146,2151,2630,1786,3711, 469,3542, 497,3899,2409, 858, 837,4446,3393,1274,
 786, 620,1845,2001,3311, 484, 308,3367,1204,1815,3691,2332,1532,2557,1842,2020,
2724,1927,2333,4440, 567,  22,1673,2728,4475,1987,1858,1144,1597, 101,1832,3601,
  12, 974,3783,4391, 951,1412,   1,3720, 453,4608,4041, 528,1041,1027,3230,2628,
1129, 875,1051,3291,1203,2262,1069,2860,2799,2149,2615,3278, 144,1758,3040,  31,
 475,1680, 366,2685,3184, 311,1642,4008,2466,5036,1593,1493,2809, 216,1420,1668,
 233, 304,2128,3284, 232,1429,1768,1040,2008,3407,2740,2967,2543, 242,2133, 778,
1565,2022,2620, 505,2189,2756,1098,2273, 372,1614, 708, 553,2846,2094,2278, 169,
3626,2835,4161, 228,2674,3165, 809,1454,1309, 466,1705,1095, 900,3423, 880,2667,
3751,5258,2317,3109,2571,4317,2766,1503,1342, 866,4447,1118,  63,2076, 314,1881,
1348,1061, 172, 978,3515,1747, 532, 511,3970,   6, 601, 905,2699,3300,1751, 276,
1467,3725,2668,  65,4239,2544,2779,2556,1604, 578,2451,1802, 992,2331,2624,1320,
3446, 713,1513,1013, 103,2786,2447,1661, 886,1702, 916, 654,3574,2031,1556, 751,
2178,2821,2179,1498,1538,2176, 271, 914,2251,2080,1325, 638,1953,2937,3877,2432,
2754,  95,3265,1716, 260,1227,4083, 775, 106,1357,3254, 426,1607, 555,2480, 772,
1985, 244,2546, 474, 495,1046,2611,1851,2061,  71,2089,1675,2590, 742,3758,2843,
3222,1433, 267,2180,2576,2826,2233,2092,3913,2435, 956,1745,3075, 856,2113,1116,
 451,   3,1988,2896,1398, 993,2463,1878,2049,1341,2718,2721,2870,2108, 712,2904,
4363,2753,2324, 277,2872,2349,2649, 384, 987, 435, 691,3000, 922, 164,3939, 652,
1500,1184,4153,2482,3373,2165,4848,2335,3775,3508,3154,2806,2830,1554,2102,1664,
2530,1434,2408, 893,1547,2623,3447,2832,2242,2532,3169,2856,3223,2078,  49,3770,
3469, 462, 318, 656,2259,3250,3069, 679,1629,2758, 344,1138,1104,3120,1836,1283,
3115,2154,1437,4448, 934, 759,1999, 794,2862,1038, 533,2560,1722,2342, 855,2626,
1197,1663,4476,3127,  85,4240,2528,  25,1111,1181,3673, 407,3470,4561,2679,2713,
 768,1925,2841,3986,1544,1165, 932, 373,1240,2146,1930,2673, 721,4766, 354,4333,
 391,2963, 187,  61,3364,1442,1102, 330,1940,1767, 341,3809,4118, 393,2496,2062,
2211, 105, 331, 300, 439, 913,1332, 626, 379,3304,1557, 328, 689,3952, 309,1555,
 931, 317,2517,3027, 325, 569, 686,2107,3084,  60,1042,1333,2794, 264,3177,4014,
1628, 258,3712,   7,4464,1176,1043,1778, 683, 114,1975,  78,1492, 383,1886, 510,
 386, 645,5291,2891,2069,3305,4138,3867,2939,2603,2493,1935,1066,1848,3588,1015,
1282,1289,4609, 697,1453,3044,2666,3611,1856,2412,  54, 719,1330, 568,3778,2459,
1748, 788, 492, 551,1191,1000, 488,3394,3763, 282,1799, 348,2016,1523,3155,2390,
1049, 382,2019,1788,1170, 729,2968,3523, 897,3926,2785,2938,3292, 350,2319,3238,
1718,1717,2655,3453,3143,4465, 161,2889,2980,2009,1421,  56,1908,1640,2387,2232,
1917,1874,2477,4921, 148,  83,3438, 592,4245,2882,1822,1055, 741, 115,1496,1624,
 381,1638,4592,1020, 516,3214, 458, 947,4575,1432, 211,1514,2926,1865,2142, 189,
 852,1221,1400,1486, 882,2299,4036, 351,  28,1122, 700,6479,6480,6481,6482,6483,  #last 512
)
# fmt: on
python3.12/site-packages/pip/_vendor/chardet/cp949prober.py000064400000003504151732703340017412 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .chardistribution import EUCKRDistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import CP949_SM_MODEL


class CP949Prober(MultiByteCharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(CP949_SM_MODEL)
        # NOTE: CP949 is a superset of EUC-KR, so the distribution should be
        #       not different.
        self.distribution_analyzer = EUCKRDistributionAnalysis()
        self.reset()

    @property
    def charset_name(self) -> str:
        return "CP949"

    @property
    def language(self) -> str:
        return "Korean"
python3.12/site-packages/pip/_vendor/chardet/sbcharsetprober.py000064400000014400151732703340020515 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import Dict, List, NamedTuple, Optional, Union

from .charsetprober import CharSetProber
from .enums import CharacterCategory, ProbingState, SequenceLikelihood


class SingleByteCharSetModel(NamedTuple):
    charset_name: str
    language: str
    char_to_order_map: Dict[int, int]
    language_model: Dict[int, Dict[int, int]]
    typical_positive_ratio: float
    keep_ascii_letters: bool
    alphabet: str


class SingleByteCharSetProber(CharSetProber):
    SAMPLE_SIZE = 64
    SB_ENOUGH_REL_THRESHOLD = 1024  # 0.25 * SAMPLE_SIZE^2
    POSITIVE_SHORTCUT_THRESHOLD = 0.95
    NEGATIVE_SHORTCUT_THRESHOLD = 0.05

    def __init__(
        self,
        model: SingleByteCharSetModel,
        is_reversed: bool = False,
        name_prober: Optional[CharSetProber] = None,
    ) -> None:
        super().__init__()
        self._model = model
        # TRUE if we need to reverse every pair in the model lookup
        self._reversed = is_reversed
        # Optional auxiliary prober for name decision
        self._name_prober = name_prober
        self._last_order = 255
        self._seq_counters: List[int] = []
        self._total_seqs = 0
        self._total_char = 0
        self._control_char = 0
        self._freq_char = 0
        self.reset()

    def reset(self) -> None:
        super().reset()
        # char order of last character
        self._last_order = 255
        self._seq_counters = [0] * SequenceLikelihood.get_num_categories()
        self._total_seqs = 0
        self._total_char = 0
        self._control_char = 0
        # characters that fall in our sampling range
        self._freq_char = 0

    @property
    def charset_name(self) -> Optional[str]:
        if self._name_prober:
            return self._name_prober.charset_name
        return self._model.charset_name

    @property
    def language(self) -> Optional[str]:
        if self._name_prober:
            return self._name_prober.language
        return self._model.language

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        # TODO: Make filter_international_words keep things in self.alphabet
        if not self._model.keep_ascii_letters:
            byte_str = self.filter_international_words(byte_str)
        else:
            byte_str = self.remove_xml_tags(byte_str)
        if not byte_str:
            return self.state
        char_to_order_map = self._model.char_to_order_map
        language_model = self._model.language_model
        for char in byte_str:
            order = char_to_order_map.get(char, CharacterCategory.UNDEFINED)
            # XXX: This was SYMBOL_CAT_ORDER before, with a value of 250, but
            #      CharacterCategory.SYMBOL is actually 253, so we use CONTROL
            #      to make it closer to the original intent. The only difference
            #      is whether or not we count digits and control characters for
            #      _total_char purposes.
            if order < CharacterCategory.CONTROL:
                self._total_char += 1
            if order < self.SAMPLE_SIZE:
                self._freq_char += 1
                if self._last_order < self.SAMPLE_SIZE:
                    self._total_seqs += 1
                    if not self._reversed:
                        lm_cat = language_model[self._last_order][order]
                    else:
                        lm_cat = language_model[order][self._last_order]
                    self._seq_counters[lm_cat] += 1
            self._last_order = order

        charset_name = self._model.charset_name
        if self.state == ProbingState.DETECTING:
            if self._total_seqs > self.SB_ENOUGH_REL_THRESHOLD:
                confidence = self.get_confidence()
                if confidence > self.POSITIVE_SHORTCUT_THRESHOLD:
                    self.logger.debug(
                        "%s confidence = %s, we have a winner", charset_name, confidence
                    )
                    self._state = ProbingState.FOUND_IT
                elif confidence < self.NEGATIVE_SHORTCUT_THRESHOLD:
                    self.logger.debug(
                        "%s confidence = %s, below negative shortcut threshold %s",
                        charset_name,
                        confidence,
                        self.NEGATIVE_SHORTCUT_THRESHOLD,
                    )
                    self._state = ProbingState.NOT_ME

        return self.state

    def get_confidence(self) -> float:
        r = 0.01
        if self._total_seqs > 0:
            r = (
                (
                    self._seq_counters[SequenceLikelihood.POSITIVE]
                    + 0.25 * self._seq_counters[SequenceLikelihood.LIKELY]
                )
                / self._total_seqs
                / self._model.typical_positive_ratio
            )
            # The more control characters (proportionnaly to the size
            # of the text), the less confident we become in the current
            # charset.
            r = r * (self._total_char - self._control_char) / self._total_char
            r = r * self._freq_char / self._total_char
            if r >= 1.0:
                r = 0.99
        return r
python3.12/site-packages/pip/_vendor/chardet/sjisprober.py000064400000007647151732703340017526 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import Union

from .chardistribution import SJISDistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .enums import MachineState, ProbingState
from .jpcntx import SJISContextAnalysis
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import SJIS_SM_MODEL


class SJISProber(MultiByteCharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(SJIS_SM_MODEL)
        self.distribution_analyzer = SJISDistributionAnalysis()
        self.context_analyzer = SJISContextAnalysis()
        self.reset()

    def reset(self) -> None:
        super().reset()
        self.context_analyzer.reset()

    @property
    def charset_name(self) -> str:
        return self.context_analyzer.charset_name

    @property
    def language(self) -> str:
        return "Japanese"

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        assert self.coding_sm is not None
        assert self.distribution_analyzer is not None

        for i, byte in enumerate(byte_str):
            coding_state = self.coding_sm.next_state(byte)
            if coding_state == MachineState.ERROR:
                self.logger.debug(
                    "%s %s prober hit error at byte %s",
                    self.charset_name,
                    self.language,
                    i,
                )
                self._state = ProbingState.NOT_ME
                break
            if coding_state == MachineState.ITS_ME:
                self._state = ProbingState.FOUND_IT
                break
            if coding_state == MachineState.START:
                char_len = self.coding_sm.get_current_charlen()
                if i == 0:
                    self._last_char[1] = byte
                    self.context_analyzer.feed(
                        self._last_char[2 - char_len :], char_len
                    )
                    self.distribution_analyzer.feed(self._last_char, char_len)
                else:
                    self.context_analyzer.feed(
                        byte_str[i + 1 - char_len : i + 3 - char_len], char_len
                    )
                    self.distribution_analyzer.feed(byte_str[i - 1 : i + 1], char_len)

        self._last_char[0] = byte_str[-1]

        if self.state == ProbingState.DETECTING:
            if self.context_analyzer.got_enough_data() and (
                self.get_confidence() > self.SHORTCUT_THRESHOLD
            ):
                self._state = ProbingState.FOUND_IT

        return self.state

    def get_confidence(self) -> float:
        assert self.distribution_analyzer is not None

        context_conf = self.context_analyzer.get_confidence()
        distrib_conf = self.distribution_analyzer.get_confidence()
        return max(context_conf, distrib_conf)
python3.12/site-packages/pip/_vendor/chardet/escprober.py000064400000007646151732703340017327 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import Optional, Union

from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .enums import LanguageFilter, MachineState, ProbingState
from .escsm import (
    HZ_SM_MODEL,
    ISO2022CN_SM_MODEL,
    ISO2022JP_SM_MODEL,
    ISO2022KR_SM_MODEL,
)


class EscCharSetProber(CharSetProber):
    """
    This CharSetProber uses a "code scheme" approach for detecting encodings,
    whereby easily recognizable escape or shift sequences are relied on to
    identify these encodings.
    """

    def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None:
        super().__init__(lang_filter=lang_filter)
        self.coding_sm = []
        if self.lang_filter & LanguageFilter.CHINESE_SIMPLIFIED:
            self.coding_sm.append(CodingStateMachine(HZ_SM_MODEL))
            self.coding_sm.append(CodingStateMachine(ISO2022CN_SM_MODEL))
        if self.lang_filter & LanguageFilter.JAPANESE:
            self.coding_sm.append(CodingStateMachine(ISO2022JP_SM_MODEL))
        if self.lang_filter & LanguageFilter.KOREAN:
            self.coding_sm.append(CodingStateMachine(ISO2022KR_SM_MODEL))
        self.active_sm_count = 0
        self._detected_charset: Optional[str] = None
        self._detected_language: Optional[str] = None
        self._state = ProbingState.DETECTING
        self.reset()

    def reset(self) -> None:
        super().reset()
        for coding_sm in self.coding_sm:
            coding_sm.active = True
            coding_sm.reset()
        self.active_sm_count = len(self.coding_sm)
        self._detected_charset = None
        self._detected_language = None

    @property
    def charset_name(self) -> Optional[str]:
        return self._detected_charset

    @property
    def language(self) -> Optional[str]:
        return self._detected_language

    def get_confidence(self) -> float:
        return 0.99 if self._detected_charset else 0.00

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        for c in byte_str:
            for coding_sm in self.coding_sm:
                if not coding_sm.active:
                    continue
                coding_state = coding_sm.next_state(c)
                if coding_state == MachineState.ERROR:
                    coding_sm.active = False
                    self.active_sm_count -= 1
                    if self.active_sm_count <= 0:
                        self._state = ProbingState.NOT_ME
                        return self.state
                elif coding_state == MachineState.ITS_ME:
                    self._state = ProbingState.FOUND_IT
                    self._detected_charset = coding_sm.get_coding_state_machine()
                    self._detected_language = coding_sm.language
                    return self.state

        return self.state
python3.12/site-packages/pip/_vendor/chardet/hebrewprober.py000064400000034311151732703340020016 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
#          Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import Optional, Union

from .charsetprober import CharSetProber
from .enums import ProbingState
from .sbcharsetprober import SingleByteCharSetProber

# This prober doesn't actually recognize a language or a charset.
# It is a helper prober for the use of the Hebrew model probers

### General ideas of the Hebrew charset recognition ###
#
# Four main charsets exist in Hebrew:
# "ISO-8859-8" - Visual Hebrew
# "windows-1255" - Logical Hebrew
# "ISO-8859-8-I" - Logical Hebrew
# "x-mac-hebrew" - ?? Logical Hebrew ??
#
# Both "ISO" charsets use a completely identical set of code points, whereas
# "windows-1255" and "x-mac-hebrew" are two different proper supersets of
# these code points. windows-1255 defines additional characters in the range
# 0x80-0x9F as some misc punctuation marks as well as some Hebrew-specific
# diacritics and additional 'Yiddish' ligature letters in the range 0xc0-0xd6.
# x-mac-hebrew defines similar additional code points but with a different
# mapping.
#
# As far as an average Hebrew text with no diacritics is concerned, all four
# charsets are identical with respect to code points. Meaning that for the
# main Hebrew alphabet, all four map the same values to all 27 Hebrew letters
# (including final letters).
#
# The dominant difference between these charsets is their directionality.
# "Visual" directionality means that the text is ordered as if the renderer is
# not aware of a BIDI rendering algorithm. The renderer sees the text and
# draws it from left to right. The text itself when ordered naturally is read
# backwards. A buffer of Visual Hebrew generally looks like so:
# "[last word of first line spelled backwards] [whole line ordered backwards
# and spelled backwards] [first word of first line spelled backwards]
# [end of line] [last word of second line] ... etc' "
# adding punctuation marks, numbers and English text to visual text is
# naturally also "visual" and from left to right.
#
# "Logical" directionality means the text is ordered "naturally" according to
# the order it is read. It is the responsibility of the renderer to display
# the text from right to left. A BIDI algorithm is used to place general
# punctuation marks, numbers and English text in the text.
#
# Texts in x-mac-hebrew are almost impossible to find on the Internet. From
# what little evidence I could find, it seems that its general directionality
# is Logical.
#
# To sum up all of the above, the Hebrew probing mechanism knows about two
# charsets:
# Visual Hebrew - "ISO-8859-8" - backwards text - Words and sentences are
#    backwards while line order is natural. For charset recognition purposes
#    the line order is unimportant (In fact, for this implementation, even
#    word order is unimportant).
# Logical Hebrew - "windows-1255" - normal, naturally ordered text.
#
# "ISO-8859-8-I" is a subset of windows-1255 and doesn't need to be
#    specifically identified.
# "x-mac-hebrew" is also identified as windows-1255. A text in x-mac-hebrew
#    that contain special punctuation marks or diacritics is displayed with
#    some unconverted characters showing as question marks. This problem might
#    be corrected using another model prober for x-mac-hebrew. Due to the fact
#    that x-mac-hebrew texts are so rare, writing another model prober isn't
#    worth the effort and performance hit.
#
#### The Prober ####
#
# The prober is divided between two SBCharSetProbers and a HebrewProber,
# all of which are managed, created, fed data, inquired and deleted by the
# SBCSGroupProber. The two SBCharSetProbers identify that the text is in
# fact some kind of Hebrew, Logical or Visual. The final decision about which
# one is it is made by the HebrewProber by combining final-letter scores
# with the scores of the two SBCharSetProbers to produce a final answer.
#
# The SBCSGroupProber is responsible for stripping the original text of HTML
# tags, English characters, numbers, low-ASCII punctuation characters, spaces
# and new lines. It reduces any sequence of such characters to a single space.
# The buffer fed to each prober in the SBCS group prober is pure text in
# high-ASCII.
# The two SBCharSetProbers (model probers) share the same language model:
# Win1255Model.
# The first SBCharSetProber uses the model normally as any other
# SBCharSetProber does, to recognize windows-1255, upon which this model was
# built. The second SBCharSetProber is told to make the pair-of-letter
# lookup in the language model backwards. This in practice exactly simulates
# a visual Hebrew model using the windows-1255 logical Hebrew model.
#
# The HebrewProber is not using any language model. All it does is look for
# final-letter evidence suggesting the text is either logical Hebrew or visual
# Hebrew. Disjointed from the model probers, the results of the HebrewProber
# alone are meaningless. HebrewProber always returns 0.00 as confidence
# since it never identifies a charset by itself. Instead, the pointer to the
# HebrewProber is passed to the model probers as a helper "Name Prober".
# When the Group prober receives a positive identification from any prober,
# it asks for the name of the charset identified. If the prober queried is a
# Hebrew model prober, the model prober forwards the call to the
# HebrewProber to make the final decision. In the HebrewProber, the
# decision is made according to the final-letters scores maintained and Both
# model probers scores. The answer is returned in the form of the name of the
# charset identified, either "windows-1255" or "ISO-8859-8".


class HebrewProber(CharSetProber):
    SPACE = 0x20
    # windows-1255 / ISO-8859-8 code points of interest
    FINAL_KAF = 0xEA
    NORMAL_KAF = 0xEB
    FINAL_MEM = 0xED
    NORMAL_MEM = 0xEE
    FINAL_NUN = 0xEF
    NORMAL_NUN = 0xF0
    FINAL_PE = 0xF3
    NORMAL_PE = 0xF4
    FINAL_TSADI = 0xF5
    NORMAL_TSADI = 0xF6

    # Minimum Visual vs Logical final letter score difference.
    # If the difference is below this, don't rely solely on the final letter score
    # distance.
    MIN_FINAL_CHAR_DISTANCE = 5

    # Minimum Visual vs Logical model score difference.
    # If the difference is below this, don't rely at all on the model score
    # distance.
    MIN_MODEL_DISTANCE = 0.01

    VISUAL_HEBREW_NAME = "ISO-8859-8"
    LOGICAL_HEBREW_NAME = "windows-1255"

    def __init__(self) -> None:
        super().__init__()
        self._final_char_logical_score = 0
        self._final_char_visual_score = 0
        self._prev = self.SPACE
        self._before_prev = self.SPACE
        self._logical_prober: Optional[SingleByteCharSetProber] = None
        self._visual_prober: Optional[SingleByteCharSetProber] = None
        self.reset()

    def reset(self) -> None:
        self._final_char_logical_score = 0
        self._final_char_visual_score = 0
        # The two last characters seen in the previous buffer,
        # mPrev and mBeforePrev are initialized to space in order to simulate
        # a word delimiter at the beginning of the data
        self._prev = self.SPACE
        self._before_prev = self.SPACE
        # These probers are owned by the group prober.

    def set_model_probers(
        self,
        logical_prober: SingleByteCharSetProber,
        visual_prober: SingleByteCharSetProber,
    ) -> None:
        self._logical_prober = logical_prober
        self._visual_prober = visual_prober

    def is_final(self, c: int) -> bool:
        return c in [
            self.FINAL_KAF,
            self.FINAL_MEM,
            self.FINAL_NUN,
            self.FINAL_PE,
            self.FINAL_TSADI,
        ]

    def is_non_final(self, c: int) -> bool:
        # The normal Tsadi is not a good Non-Final letter due to words like
        # 'lechotet' (to chat) containing an apostrophe after the tsadi. This
        # apostrophe is converted to a space in FilterWithoutEnglishLetters
        # causing the Non-Final tsadi to appear at an end of a word even
        # though this is not the case in the original text.
        # The letters Pe and Kaf rarely display a related behavior of not being
        # a good Non-Final letter. Words like 'Pop', 'Winamp' and 'Mubarak'
        # for example legally end with a Non-Final Pe or Kaf. However, the
        # benefit of these letters as Non-Final letters outweighs the damage
        # since these words are quite rare.
        return c in [self.NORMAL_KAF, self.NORMAL_MEM, self.NORMAL_NUN, self.NORMAL_PE]

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        # Final letter analysis for logical-visual decision.
        # Look for evidence that the received buffer is either logical Hebrew
        # or visual Hebrew.
        # The following cases are checked:
        # 1) A word longer than 1 letter, ending with a final letter. This is
        #    an indication that the text is laid out "naturally" since the
        #    final letter really appears at the end. +1 for logical score.
        # 2) A word longer than 1 letter, ending with a Non-Final letter. In
        #    normal Hebrew, words ending with Kaf, Mem, Nun, Pe or Tsadi,
        #    should not end with the Non-Final form of that letter. Exceptions
        #    to this rule are mentioned above in isNonFinal(). This is an
        #    indication that the text is laid out backwards. +1 for visual
        #    score
        # 3) A word longer than 1 letter, starting with a final letter. Final
        #    letters should not appear at the beginning of a word. This is an
        #    indication that the text is laid out backwards. +1 for visual
        #    score.
        #
        # The visual score and logical score are accumulated throughout the
        # text and are finally checked against each other in GetCharSetName().
        # No checking for final letters in the middle of words is done since
        # that case is not an indication for either Logical or Visual text.
        #
        # We automatically filter out all 7-bit characters (replace them with
        # spaces) so the word boundary detection works properly. [MAP]

        if self.state == ProbingState.NOT_ME:
            # Both model probers say it's not them. No reason to continue.
            return ProbingState.NOT_ME

        byte_str = self.filter_high_byte_only(byte_str)

        for cur in byte_str:
            if cur == self.SPACE:
                # We stand on a space - a word just ended
                if self._before_prev != self.SPACE:
                    # next-to-last char was not a space so self._prev is not a
                    # 1 letter word
                    if self.is_final(self._prev):
                        # case (1) [-2:not space][-1:final letter][cur:space]
                        self._final_char_logical_score += 1
                    elif self.is_non_final(self._prev):
                        # case (2) [-2:not space][-1:Non-Final letter][
                        #  cur:space]
                        self._final_char_visual_score += 1
            else:
                # Not standing on a space
                if (
                    (self._before_prev == self.SPACE)
                    and (self.is_final(self._prev))
                    and (cur != self.SPACE)
                ):
                    # case (3) [-2:space][-1:final letter][cur:not space]
                    self._final_char_visual_score += 1
            self._before_prev = self._prev
            self._prev = cur

        # Forever detecting, till the end or until both model probers return
        # ProbingState.NOT_ME (handled above)
        return ProbingState.DETECTING

    @property
    def charset_name(self) -> str:
        assert self._logical_prober is not None
        assert self._visual_prober is not None

        # Make the decision: is it Logical or Visual?
        # If the final letter score distance is dominant enough, rely on it.
        finalsub = self._final_char_logical_score - self._final_char_visual_score
        if finalsub >= self.MIN_FINAL_CHAR_DISTANCE:
            return self.LOGICAL_HEBREW_NAME
        if finalsub <= -self.MIN_FINAL_CHAR_DISTANCE:
            return self.VISUAL_HEBREW_NAME

        # It's not dominant enough, try to rely on the model scores instead.
        modelsub = (
            self._logical_prober.get_confidence() - self._visual_prober.get_confidence()
        )
        if modelsub > self.MIN_MODEL_DISTANCE:
            return self.LOGICAL_HEBREW_NAME
        if modelsub < -self.MIN_MODEL_DISTANCE:
            return self.VISUAL_HEBREW_NAME

        # Still no good, back to final letter distance, maybe it'll save the
        # day.
        if finalsub < 0.0:
            return self.VISUAL_HEBREW_NAME

        # (finalsub > 0 - Logical) or (don't know what to do) default to
        # Logical.
        return self.LOGICAL_HEBREW_NAME

    @property
    def language(self) -> str:
        return "Hebrew"

    @property
    def state(self) -> ProbingState:
        assert self._logical_prober is not None
        assert self._visual_prober is not None

        # Remain active as long as any of the model probers are active.
        if (self._logical_prober.state == ProbingState.NOT_ME) and (
            self._visual_prober.state == ProbingState.NOT_ME
        ):
            return ProbingState.NOT_ME
        return ProbingState.DETECTING
python3.12/site-packages/pip/_vendor/chardet/utf8prober.py000064400000005374151732703340017437 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from typing import Union

from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .enums import MachineState, ProbingState
from .mbcssm import UTF8_SM_MODEL


class UTF8Prober(CharSetProber):
    ONE_CHAR_PROB = 0.5

    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(UTF8_SM_MODEL)
        self._num_mb_chars = 0
        self.reset()

    def reset(self) -> None:
        super().reset()
        self.coding_sm.reset()
        self._num_mb_chars = 0

    @property
    def charset_name(self) -> str:
        return "utf-8"

    @property
    def language(self) -> str:
        return ""

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        for c in byte_str:
            coding_state = self.coding_sm.next_state(c)
            if coding_state == MachineState.ERROR:
                self._state = ProbingState.NOT_ME
                break
            if coding_state == MachineState.ITS_ME:
                self._state = ProbingState.FOUND_IT
                break
            if coding_state == MachineState.START:
                if self.coding_sm.get_current_charlen() >= 2:
                    self._num_mb_chars += 1

        if self.state == ProbingState.DETECTING:
            if self.get_confidence() > self.SHORTCUT_THRESHOLD:
                self._state = ProbingState.FOUND_IT

        return self.state

    def get_confidence(self) -> float:
        unlike = 0.99
        if self._num_mb_chars < 6:
            unlike *= self.ONE_CHAR_PROB**self._num_mb_chars
            return 1.0 - unlike
        return unlike
python3.12/site-packages/pip/_vendor/chardet/euctwprober.py000064400000003331151732703350017670 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .chardistribution import EUCTWDistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import EUCTW_SM_MODEL


class EUCTWProber(MultiByteCharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(EUCTW_SM_MODEL)
        self.distribution_analyzer = EUCTWDistributionAnalysis()
        self.reset()

    @property
    def charset_name(self) -> str:
        return "EUC-TW"

    @property
    def language(self) -> str:
        return "Taiwan"
python3.12/site-packages/pip/_vendor/chardet/universaldetector.py000064400000035000151732703350021067 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################
"""
Module containing the UniversalDetector detector class, which is the primary
class a user of ``chardet`` should use.

:author: Mark Pilgrim (initial port to Python)
:author: Shy Shalom (original C code)
:author: Dan Blanchard (major refactoring for 3.0)
:author: Ian Cordasco
"""


import codecs
import logging
import re
from typing import List, Optional, Union

from .charsetgroupprober import CharSetGroupProber
from .charsetprober import CharSetProber
from .enums import InputState, LanguageFilter, ProbingState
from .escprober import EscCharSetProber
from .latin1prober import Latin1Prober
from .macromanprober import MacRomanProber
from .mbcsgroupprober import MBCSGroupProber
from .resultdict import ResultDict
from .sbcsgroupprober import SBCSGroupProber
from .utf1632prober import UTF1632Prober


class UniversalDetector:
    """
    The ``UniversalDetector`` class underlies the ``chardet.detect`` function
    and coordinates all of the different charset probers.

    To get a ``dict`` containing an encoding and its confidence, you can simply
    run:

    .. code::

            u = UniversalDetector()
            u.feed(some_bytes)
            u.close()
            detected = u.result

    """

    MINIMUM_THRESHOLD = 0.20
    HIGH_BYTE_DETECTOR = re.compile(b"[\x80-\xFF]")
    ESC_DETECTOR = re.compile(b"(\033|~{)")
    WIN_BYTE_DETECTOR = re.compile(b"[\x80-\x9F]")
    ISO_WIN_MAP = {
        "iso-8859-1": "Windows-1252",
        "iso-8859-2": "Windows-1250",
        "iso-8859-5": "Windows-1251",
        "iso-8859-6": "Windows-1256",
        "iso-8859-7": "Windows-1253",
        "iso-8859-8": "Windows-1255",
        "iso-8859-9": "Windows-1254",
        "iso-8859-13": "Windows-1257",
    }
    # Based on https://encoding.spec.whatwg.org/#names-and-labels
    # but altered to match Python names for encodings and remove mappings
    # that break tests.
    LEGACY_MAP = {
        "ascii": "Windows-1252",
        "iso-8859-1": "Windows-1252",
        "tis-620": "ISO-8859-11",
        "iso-8859-9": "Windows-1254",
        "gb2312": "GB18030",
        "euc-kr": "CP949",
        "utf-16le": "UTF-16",
    }

    def __init__(
        self,
        lang_filter: LanguageFilter = LanguageFilter.ALL,
        should_rename_legacy: bool = False,
    ) -> None:
        self._esc_charset_prober: Optional[EscCharSetProber] = None
        self._utf1632_prober: Optional[UTF1632Prober] = None
        self._charset_probers: List[CharSetProber] = []
        self.result: ResultDict = {
            "encoding": None,
            "confidence": 0.0,
            "language": None,
        }
        self.done = False
        self._got_data = False
        self._input_state = InputState.PURE_ASCII
        self._last_char = b""
        self.lang_filter = lang_filter
        self.logger = logging.getLogger(__name__)
        self._has_win_bytes = False
        self.should_rename_legacy = should_rename_legacy
        self.reset()

    @property
    def input_state(self) -> int:
        return self._input_state

    @property
    def has_win_bytes(self) -> bool:
        return self._has_win_bytes

    @property
    def charset_probers(self) -> List[CharSetProber]:
        return self._charset_probers

    def reset(self) -> None:
        """
        Reset the UniversalDetector and all of its probers back to their
        initial states.  This is called by ``__init__``, so you only need to
        call this directly in between analyses of different documents.
        """
        self.result = {"encoding": None, "confidence": 0.0, "language": None}
        self.done = False
        self._got_data = False
        self._has_win_bytes = False
        self._input_state = InputState.PURE_ASCII
        self._last_char = b""
        if self._esc_charset_prober:
            self._esc_charset_prober.reset()
        if self._utf1632_prober:
            self._utf1632_prober.reset()
        for prober in self._charset_probers:
            prober.reset()

    def feed(self, byte_str: Union[bytes, bytearray]) -> None:
        """
        Takes a chunk of a document and feeds it through all of the relevant
        charset probers.

        After calling ``feed``, you can check the value of the ``done``
        attribute to see if you need to continue feeding the
        ``UniversalDetector`` more data, or if it has made a prediction
        (in the ``result`` attribute).

        .. note::
           You should always call ``close`` when you're done feeding in your
           document if ``done`` is not already ``True``.
        """
        if self.done:
            return

        if not byte_str:
            return

        if not isinstance(byte_str, bytearray):
            byte_str = bytearray(byte_str)

        # First check for known BOMs, since these are guaranteed to be correct
        if not self._got_data:
            # If the data starts with BOM, we know it is UTF
            if byte_str.startswith(codecs.BOM_UTF8):
                # EF BB BF  UTF-8 with BOM
                self.result = {
                    "encoding": "UTF-8-SIG",
                    "confidence": 1.0,
                    "language": "",
                }
            elif byte_str.startswith((codecs.BOM_UTF32_LE, codecs.BOM_UTF32_BE)):
                # FF FE 00 00  UTF-32, little-endian BOM
                # 00 00 FE FF  UTF-32, big-endian BOM
                self.result = {"encoding": "UTF-32", "confidence": 1.0, "language": ""}
            elif byte_str.startswith(b"\xFE\xFF\x00\x00"):
                # FE FF 00 00  UCS-4, unusual octet order BOM (3412)
                self.result = {
                    # TODO: This encoding is not supported by Python. Should remove?
                    "encoding": "X-ISO-10646-UCS-4-3412",
                    "confidence": 1.0,
                    "language": "",
                }
            elif byte_str.startswith(b"\x00\x00\xFF\xFE"):
                # 00 00 FF FE  UCS-4, unusual octet order BOM (2143)
                self.result = {
                    # TODO: This encoding is not supported by Python. Should remove?
                    "encoding": "X-ISO-10646-UCS-4-2143",
                    "confidence": 1.0,
                    "language": "",
                }
            elif byte_str.startswith((codecs.BOM_LE, codecs.BOM_BE)):
                # FF FE  UTF-16, little endian BOM
                # FE FF  UTF-16, big endian BOM
                self.result = {"encoding": "UTF-16", "confidence": 1.0, "language": ""}

            self._got_data = True
            if self.result["encoding"] is not None:
                self.done = True
                return

        # If none of those matched and we've only see ASCII so far, check
        # for high bytes and escape sequences
        if self._input_state == InputState.PURE_ASCII:
            if self.HIGH_BYTE_DETECTOR.search(byte_str):
                self._input_state = InputState.HIGH_BYTE
            elif (
                self._input_state == InputState.PURE_ASCII
                and self.ESC_DETECTOR.search(self._last_char + byte_str)
            ):
                self._input_state = InputState.ESC_ASCII

        self._last_char = byte_str[-1:]

        # next we will look to see if it is appears to be either a UTF-16 or
        # UTF-32 encoding
        if not self._utf1632_prober:
            self._utf1632_prober = UTF1632Prober()

        if self._utf1632_prober.state == ProbingState.DETECTING:
            if self._utf1632_prober.feed(byte_str) == ProbingState.FOUND_IT:
                self.result = {
                    "encoding": self._utf1632_prober.charset_name,
                    "confidence": self._utf1632_prober.get_confidence(),
                    "language": "",
                }
                self.done = True
                return

        # If we've seen escape sequences, use the EscCharSetProber, which
        # uses a simple state machine to check for known escape sequences in
        # HZ and ISO-2022 encodings, since those are the only encodings that
        # use such sequences.
        if self._input_state == InputState.ESC_ASCII:
            if not self._esc_charset_prober:
                self._esc_charset_prober = EscCharSetProber(self.lang_filter)
            if self._esc_charset_prober.feed(byte_str) == ProbingState.FOUND_IT:
                self.result = {
                    "encoding": self._esc_charset_prober.charset_name,
                    "confidence": self._esc_charset_prober.get_confidence(),
                    "language": self._esc_charset_prober.language,
                }
                self.done = True
        # If we've seen high bytes (i.e., those with values greater than 127),
        # we need to do more complicated checks using all our multi-byte and
        # single-byte probers that are left.  The single-byte probers
        # use character bigram distributions to determine the encoding, whereas
        # the multi-byte probers use a combination of character unigram and
        # bigram distributions.
        elif self._input_state == InputState.HIGH_BYTE:
            if not self._charset_probers:
                self._charset_probers = [MBCSGroupProber(self.lang_filter)]
                # If we're checking non-CJK encodings, use single-byte prober
                if self.lang_filter & LanguageFilter.NON_CJK:
                    self._charset_probers.append(SBCSGroupProber())
                self._charset_probers.append(Latin1Prober())
                self._charset_probers.append(MacRomanProber())
            for prober in self._charset_probers:
                if prober.feed(byte_str) == ProbingState.FOUND_IT:
                    self.result = {
                        "encoding": prober.charset_name,
                        "confidence": prober.get_confidence(),
                        "language": prober.language,
                    }
                    self.done = True
                    break
            if self.WIN_BYTE_DETECTOR.search(byte_str):
                self._has_win_bytes = True

    def close(self) -> ResultDict:
        """
        Stop analyzing the current document and come up with a final
        prediction.

        :returns:  The ``result`` attribute, a ``dict`` with the keys
                   `encoding`, `confidence`, and `language`.
        """
        # Don't bother with checks if we're already done
        if self.done:
            return self.result
        self.done = True

        if not self._got_data:
            self.logger.debug("no data received!")

        # Default to ASCII if it is all we've seen so far
        elif self._input_state == InputState.PURE_ASCII:
            self.result = {"encoding": "ascii", "confidence": 1.0, "language": ""}

        # If we have seen non-ASCII, return the best that met MINIMUM_THRESHOLD
        elif self._input_state == InputState.HIGH_BYTE:
            prober_confidence = None
            max_prober_confidence = 0.0
            max_prober = None
            for prober in self._charset_probers:
                if not prober:
                    continue
                prober_confidence = prober.get_confidence()
                if prober_confidence > max_prober_confidence:
                    max_prober_confidence = prober_confidence
                    max_prober = prober
            if max_prober and (max_prober_confidence > self.MINIMUM_THRESHOLD):
                charset_name = max_prober.charset_name
                assert charset_name is not None
                lower_charset_name = charset_name.lower()
                confidence = max_prober.get_confidence()
                # Use Windows encoding name instead of ISO-8859 if we saw any
                # extra Windows-specific bytes
                if lower_charset_name.startswith("iso-8859"):
                    if self._has_win_bytes:
                        charset_name = self.ISO_WIN_MAP.get(
                            lower_charset_name, charset_name
                        )
                # Rename legacy encodings with superset encodings if asked
                if self.should_rename_legacy:
                    charset_name = self.LEGACY_MAP.get(
                        (charset_name or "").lower(), charset_name
                    )
                self.result = {
                    "encoding": charset_name,
                    "confidence": confidence,
                    "language": max_prober.language,
                }

        # Log all prober confidences if none met MINIMUM_THRESHOLD
        if self.logger.getEffectiveLevel() <= logging.DEBUG:
            if self.result["encoding"] is None:
                self.logger.debug("no probers hit minimum threshold")
                for group_prober in self._charset_probers:
                    if not group_prober:
                        continue
                    if isinstance(group_prober, CharSetGroupProber):
                        for prober in group_prober.probers:
                            self.logger.debug(
                                "%s %s confidence = %s",
                                prober.charset_name,
                                prober.language,
                                prober.get_confidence(),
                            )
                    else:
                        self.logger.debug(
                            "%s %s confidence = %s",
                            group_prober.charset_name,
                            group_prober.language,
                            group_prober.get_confidence(),
                        )
        return self.result
python3.12/site-packages/pip/_vendor/chardet/metadata/__pycache__/__init__.cpython-312.pyc000064400000000370151732703350025207 0ustar00�

R`i���y)N�r���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/metadata/__init__.py�<module>rs�rpython3.12/site-packages/pip/_vendor/chardet/metadata/__pycache__/languages.cpython-312.pyc000064400000023113151732703350025416 0ustar00�

R`i�4��^�dZddlmZddlmZmZGd�d�Zidedddgd	�d
dg���d
ed
ddgd�ddg���dedddgd�ddg���dedddddgddg���dedddgd �d!d"g���d#ed#d$dgd �d%d&g���d'ed'd(dd)d*gd+d,g���d-ed-d.dgd/�d0g�1��d2ed2d3dd4gd5d6g���d7ed7d8dgd �d9d:g���d;ed;d<dgd=�d>d?g���d@ed@dAdgd �dBdCg���dDedDdEdgd �dFdGdHg���dIedIdJddKdLgdMdNg���dOedOdPdddgdQdRg���dSedSdTdddgdUdVg���dWedWdXdgd �dYdZg���ed[d\dgd]�d^d_g��ed`dadgd]�dbdcg��edddedgdf�dgdhg��edidjdgd/�dkg�1�edldmdddgdndog��edpdqdgd �drdsg��edtdudddgdvdwg��edxdydgdz�d{d|g��ed}d~dddgdd�g��ed�d�dddgd�d�g��ed�d�d�gdf�d�g���ed�d�dgd��d�d�g��ed�d�dgd��d�d�g��ed�d�dd�gd�d�g��d���Zy�)�z�
Metadata about languages used by our model training code for our
SingleByteCharSetProbers.  Could be used for other things in the future.

This code is based on the language metadata from the uchardet project.
�)�
ascii_letters)�List�Optionalc���eZdZdZ						ddeedeededeeedeedeeed	df�fd
�
Zd	efd�Z	�xZ
S)
�Languagea�Metadata about a language useful for training models

    :ivar name: The human name for the language, in English.
    :type name: str
    :ivar iso_code: 2-letter ISO 639-1 if possible, 3-letter ISO code otherwise,
                    or use another catalog as a last resort.
    :type iso_code: str
    :ivar use_ascii: Whether or not ASCII letters should be included in trained
                     models.
    :type use_ascii: bool
    :ivar charsets: The charsets we want to support and create data for.
    :type charsets: list of str
    :ivar alphabet: The characters in the language's alphabet. If `use_ascii` is
                    `True`, you only need to add those not in the ASCII set.
    :type alphabet: str
    :ivar wiki_start_pages: The Wikipedia pages to start from if we're crawling
                            Wikipedia for training data.
    :type wiki_start_pages: list of str
    N�name�iso_code�	use_ascii�charsets�alphabet�wiki_start_pages�returnc���t�|��||_||_||_||_|jr|r
|tz
}nt}n
|std��|r#djtt|���nd|_||_y)Nz*Must supply alphabet if use_ascii is False�)
�super�__init__rr	r
rr�
ValueError�join�sorted�setrr
)�selfrr	r
rrr
�	__class__s       ���/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/chardet/metadata/languages.pyrzLanguage.__init__#sy���	������	� ��
�"��� ��
��>�>���M�)��(����I�J�J�:B�����s�8�}� 5�6���
� 0���c��djd�|jj�D��}|jj�d|�d�S)Nz, c3�TK�|] \}}|jd�r�|�d|�����"y�w)�_�=N)�
startswith)�.0�k�vs   r�	<genexpr>z$Language.__repr__.<locals>.<genexpr><s.����
�%:�T�Q��!�,�,�s�BS�q�c��1�%�L�%:�s�(�(�(�))r�__dict__�itemsr�__name__)r�	param_strs  r�__repr__zLanguage.__repr__;sJ���I�I�
�%)�]�]�%8�%8�%:�
�
�	��.�.�)�)�*�!�I�;�a�8�8r)NNTNNN)r(�
__module__�__qualname__�__doc__r�str�boolrrr*�
__classcell__)rs@rrrs�����,#�"&��(,�"&�04�1��s�m�1��3�-�1��	1�
�4��9�%�1��3�-�
1�#�4��9�-�1�
�1�09�#�9rr�Arabic�arF)z
ISO-8859-6zWINDOWS-1256�CP720�CP864ubءآأؤإئابةتثجحخدذرزسشصضطظعغػؼؽؾؿـفقكلمنهوىيًٌٍَُِّuالصفحة_الرئيسية)rr	r
rrr
�
Belarusian�be)�
ISO-8859-5�WINDOWS-1251�IBM866�MacCyrillicu�АБВГДЕЁЖЗІЙКЛМНОПРСТУЎФХЦЧШЫЬЭЮЯабвгдеёжзійклмнопрстуўфхцчшыьэюяʼu!Галоўная_старонка�	Bulgarian�bg)r7r8�IBM855uxАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюяuНачална_страница�Czech�czTz
ISO-8859-2zWINDOWS-1250u<áčďéěíňóřšťúůýžÁČĎÉĚÍŇÓŘŠŤÚŮÝŽuHlavní_strana�Danish�da)�
ISO-8859-1zISO-8859-15�WINDOWS-1252�MacRomanuæøåÆØÅ�Forside�German�deuäöüßẞÄÖÜzWikipedia:Hauptseite�Greek�elz
ISO-8859-7zWINDOWS-1253u�αβγδεζηθικλμνξοπρσςτυφχψωάέήίόύώΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΣΤΥΦΧΨΩΆΈΉΊΌΎΏuΠύλη:Κύρια�English�en)rBrCrD�	Main_Page)rr	r
rr
�	Esperanto�eo�
ISO-8859-3uDabcĉdefgĝhĥijĵklmnoprsŝtuŭvzABCĈDEFGĜHĤIJĴKLMNOPRSŜTUŬVZuVikipedio:Ĉefpaĝo�Spanish�esuñáéíóúüÑÁÉÍÓÚÜzWikipedia:Portada�Estonian�et)�
ISO-8859-4�ISO-8859-13�WINDOWS-1257u6ABDEGHIJKLMNOPRSTUVÕÄÖÜabdeghijklmnoprstuvõäöü�Esileht�Finnish�fiuÅÄÖŠŽåäöšžzWikipedia:Etusivu�French�fru,œàâçèéîïùûêŒÀÂÇÈÉÎÏÙÛÊuWikipédia:Accueil_principaluBœuf (animal)�Hebrew�hez
ISO-8859-8zWINDOWS-1255u<אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײuעמוד_ראשי�Croatian�hru@abcčćdđefghijklmnoprsštuvzžABCČĆDĐEFGHIJKLMNOPRSŠTUVZŽ�Glavna_stranica�	Hungarian�huuPabcdefghijklmnoprstuvzáéíóöőúüűABCDEFGHIJKLMNOPRSTUVZÁÉÍÓÖŐÚÜŰu	Kezdőlap�Italian�ituÀÈÉÌÒÓÙàèéìòóù�Pagina_principale�
Lithuanian�lt)rUrVrTuRAĄBCČDEĘĖFGHIĮYJKLMNOPRSŠTUŲŪVZŽaąbcčdeęėfghiįyjklmnoprsštuųūvzž�Pagrindinis_puslapis�Latvian�lvuXAĀBCČDEĒFGĢHIĪJKĶLĻMNŅOPRSŠTUŪVZŽaābcčdeēfgģhiījkķlļmnņoprsštuūvzžu
Sākumlapa�
Macedonian�mk)r7r8r:r=u|АБВГДЃЕЖЗЅИЈКЛЉМНЊОПРСТЌУФХЦЧЏШабвгдѓежзѕијклљмнњопрстќуфхцчџшuГлавна_страница�Dutch�nl�Hoofdpagina�Polish�pluRAĄBCĆDEĘFGHIJKLŁMNŃOÓPRSŚTUWYZŹŻaąbcćdeęfghijklłmnńoóprsśtuwyzźżuWikipedia:Strona_główna�
Portuguese�ptu0ÁÂÃÀÇÉÊÍÓÔÕÚáâãàçéêíóôõúuWikipédia:Página_principal�Romanian�rouăâîșțĂÂÎȘȚuPagina_principală�Russian�ru)r7r8zKOI8-Rr:r9r=u�абвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯu#Заглавная_страница�Slovak�skuDáäčďéíĺľňóôŕšťúýžÁÄČĎÉÍĹĽŇÓÔŔŠŤÚÝŽuHlavná_stránka�Slovene�slu8abcčdefghijklmnoprsštuvzžABCČDEFGHIJKLMNOPRSŠTUVZŽ�Glavna_stran�Serbian�sruxАБВГДЂЕЖЗИЈКЛЉМНЊОПРСТЋУФХЦЧЏШабвгдђежзијклљмнњопрстћуфхцчџшuГлавна_страна)rr	rrr
�Thai�th)zISO-8859-11zTIS-620�CP874uกขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛uหน้าหลัก�Turkish�tr)rOz
ISO-8859-9zWINDOWS-1254uRabcçdefgğhıijklmnoöprsştuüvyzâîûABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZÂÎÛ�	Ana_Sayfa�
Vietnamese�vizWINDOWS-1258uHaăâbcdđeêghiklmnoôơpqrstuưvxyAĂÂBCDĐEÊGHIKLMNOÔƠPQRSTUƯVXYuChữ_Quốc_ngữ)rfrirkrmrprrrtrvrxrzr}rr�r�N)r-�stringr�typingrrr�	LANGUAGES�rr�<module>r�s����!�!�
19�19�h^
��h�
���
B�u�9�:��^
��(�
���H�V�=�>�
�^
�*��
���9�L�;�<�
�+^
�:�X�
�����/�O�*�+�
�;^
�J
�h�
���J��#��
�K^
�Z
�h�
���J�$�0�1�
�[^
�j�X�
�����/�T�/�0�
�k^
�z�x�
���;�%���{^
�H��
�����W�/�0��I^
�Z�x�
���J�/�-�.�
�[^
�j��
���>�J�#��	�k^
�~�x�
���J�'�-�.�
�^
�N
�h�
���J�?�8�:J�K�
�O^
�^
�h�
�����/�O�-�.�
�_^
�n��
�����/�S�+�,��o^
�@��
�����/�c�%���A^
�R�x�
���J�/�-�.�
�S^
�b�
���>�e�0�1���
���>�k�&����
���H�P�9�:�
��
���;�'����
�����/�e�5�6���
���J�C�8�9�
��
�����/�'�.�/�
��
���
�X�?�@���
�����/�W�,�-�
��
�����/�K�(�)���
��L�H�5�6��
�
���4�Y�4�5�

��
���=�e�%����
���"!�!�[�.�/�-�M^
�	rpython3.12/site-packages/pip/_vendor/chardet/metadata/__init__.py000064400000000000151732703360020635 0ustar00python3.12/site-packages/pip/_vendor/chardet/metadata/languages.py000064400000032370151732703360021063 0ustar00"""
Metadata about languages used by our model training code for our
SingleByteCharSetProbers.  Could be used for other things in the future.

This code is based on the language metadata from the uchardet project.
"""

from string import ascii_letters
from typing import List, Optional

# TODO: Add Ukrainian (KOI8-U)


class Language:
    """Metadata about a language useful for training models

    :ivar name: The human name for the language, in English.
    :type name: str
    :ivar iso_code: 2-letter ISO 639-1 if possible, 3-letter ISO code otherwise,
                    or use another catalog as a last resort.
    :type iso_code: str
    :ivar use_ascii: Whether or not ASCII letters should be included in trained
                     models.
    :type use_ascii: bool
    :ivar charsets: The charsets we want to support and create data for.
    :type charsets: list of str
    :ivar alphabet: The characters in the language's alphabet. If `use_ascii` is
                    `True`, you only need to add those not in the ASCII set.
    :type alphabet: str
    :ivar wiki_start_pages: The Wikipedia pages to start from if we're crawling
                            Wikipedia for training data.
    :type wiki_start_pages: list of str
    """

    def __init__(
        self,
        name: Optional[str] = None,
        iso_code: Optional[str] = None,
        use_ascii: bool = True,
        charsets: Optional[List[str]] = None,
        alphabet: Optional[str] = None,
        wiki_start_pages: Optional[List[str]] = None,
    ) -> None:
        super().__init__()
        self.name = name
        self.iso_code = iso_code
        self.use_ascii = use_ascii
        self.charsets = charsets
        if self.use_ascii:
            if alphabet:
                alphabet += ascii_letters
            else:
                alphabet = ascii_letters
        elif not alphabet:
            raise ValueError("Must supply alphabet if use_ascii is False")
        self.alphabet = "".join(sorted(set(alphabet))) if alphabet else None
        self.wiki_start_pages = wiki_start_pages

    def __repr__(self) -> str:
        param_str = ", ".join(
            f"{k}={v!r}" for k, v in self.__dict__.items() if not k.startswith("_")
        )
        return f"{self.__class__.__name__}({param_str})"


LANGUAGES = {
    "Arabic": Language(
        name="Arabic",
        iso_code="ar",
        use_ascii=False,
        # We only support encodings that use isolated
        # forms, because the current recommendation is
        # that the rendering system handles presentation
        # forms. This means we purposefully skip IBM864.
        charsets=["ISO-8859-6", "WINDOWS-1256", "CP720", "CP864"],
        alphabet="ءآأؤإئابةتثجحخدذرزسشصضطظعغػؼؽؾؿـفقكلمنهوىيًٌٍَُِّ",
        wiki_start_pages=["الصفحة_الرئيسية"],
    ),
    "Belarusian": Language(
        name="Belarusian",
        iso_code="be",
        use_ascii=False,
        charsets=["ISO-8859-5", "WINDOWS-1251", "IBM866", "MacCyrillic"],
        alphabet="АБВГДЕЁЖЗІЙКЛМНОПРСТУЎФХЦЧШЫЬЭЮЯабвгдеёжзійклмнопрстуўфхцчшыьэюяʼ",
        wiki_start_pages=["Галоўная_старонка"],
    ),
    "Bulgarian": Language(
        name="Bulgarian",
        iso_code="bg",
        use_ascii=False,
        charsets=["ISO-8859-5", "WINDOWS-1251", "IBM855"],
        alphabet="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя",
        wiki_start_pages=["Начална_страница"],
    ),
    "Czech": Language(
        name="Czech",
        iso_code="cz",
        use_ascii=True,
        charsets=["ISO-8859-2", "WINDOWS-1250"],
        alphabet="áčďéěíňóřšťúůýžÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ",
        wiki_start_pages=["Hlavní_strana"],
    ),
    "Danish": Language(
        name="Danish",
        iso_code="da",
        use_ascii=True,
        charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252", "MacRoman"],
        alphabet="æøåÆØÅ",
        wiki_start_pages=["Forside"],
    ),
    "German": Language(
        name="German",
        iso_code="de",
        use_ascii=True,
        charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252", "MacRoman"],
        alphabet="äöüßẞÄÖÜ",
        wiki_start_pages=["Wikipedia:Hauptseite"],
    ),
    "Greek": Language(
        name="Greek",
        iso_code="el",
        use_ascii=False,
        charsets=["ISO-8859-7", "WINDOWS-1253"],
        alphabet="αβγδεζηθικλμνξοπρσςτυφχψωάέήίόύώΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΣΤΥΦΧΨΩΆΈΉΊΌΎΏ",
        wiki_start_pages=["Πύλη:Κύρια"],
    ),
    "English": Language(
        name="English",
        iso_code="en",
        use_ascii=True,
        charsets=["ISO-8859-1", "WINDOWS-1252", "MacRoman"],
        wiki_start_pages=["Main_Page"],
    ),
    "Esperanto": Language(
        name="Esperanto",
        iso_code="eo",
        # Q, W, X, and Y not used at all
        use_ascii=False,
        charsets=["ISO-8859-3"],
        alphabet="abcĉdefgĝhĥijĵklmnoprsŝtuŭvzABCĈDEFGĜHĤIJĴKLMNOPRSŜTUŬVZ",
        wiki_start_pages=["Vikipedio:Ĉefpaĝo"],
    ),
    "Spanish": Language(
        name="Spanish",
        iso_code="es",
        use_ascii=True,
        charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252", "MacRoman"],
        alphabet="ñáéíóúüÑÁÉÍÓÚÜ",
        wiki_start_pages=["Wikipedia:Portada"],
    ),
    "Estonian": Language(
        name="Estonian",
        iso_code="et",
        use_ascii=False,
        charsets=["ISO-8859-4", "ISO-8859-13", "WINDOWS-1257"],
        # C, F, Š, Q, W, X, Y, Z, Ž are only for
        # loanwords
        alphabet="ABDEGHIJKLMNOPRSTUVÕÄÖÜabdeghijklmnoprstuvõäöü",
        wiki_start_pages=["Esileht"],
    ),
    "Finnish": Language(
        name="Finnish",
        iso_code="fi",
        use_ascii=True,
        charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252", "MacRoman"],
        alphabet="ÅÄÖŠŽåäöšž",
        wiki_start_pages=["Wikipedia:Etusivu"],
    ),
    "French": Language(
        name="French",
        iso_code="fr",
        use_ascii=True,
        charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252", "MacRoman"],
        alphabet="œàâçèéîïùûêŒÀÂÇÈÉÎÏÙÛÊ",
        wiki_start_pages=["Wikipédia:Accueil_principal", "Bœuf (animal)"],
    ),
    "Hebrew": Language(
        name="Hebrew",
        iso_code="he",
        use_ascii=False,
        charsets=["ISO-8859-8", "WINDOWS-1255"],
        alphabet="אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ",
        wiki_start_pages=["עמוד_ראשי"],
    ),
    "Croatian": Language(
        name="Croatian",
        iso_code="hr",
        # Q, W, X, Y are only used for foreign words.
        use_ascii=False,
        charsets=["ISO-8859-2", "WINDOWS-1250"],
        alphabet="abcčćdđefghijklmnoprsštuvzžABCČĆDĐEFGHIJKLMNOPRSŠTUVZŽ",
        wiki_start_pages=["Glavna_stranica"],
    ),
    "Hungarian": Language(
        name="Hungarian",
        iso_code="hu",
        # Q, W, X, Y are only used for foreign words.
        use_ascii=False,
        charsets=["ISO-8859-2", "WINDOWS-1250"],
        alphabet="abcdefghijklmnoprstuvzáéíóöőúüűABCDEFGHIJKLMNOPRSTUVZÁÉÍÓÖŐÚÜŰ",
        wiki_start_pages=["Kezdőlap"],
    ),
    "Italian": Language(
        name="Italian",
        iso_code="it",
        use_ascii=True,
        charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252", "MacRoman"],
        alphabet="ÀÈÉÌÒÓÙàèéìòóù",
        wiki_start_pages=["Pagina_principale"],
    ),
    "Lithuanian": Language(
        name="Lithuanian",
        iso_code="lt",
        use_ascii=False,
        charsets=["ISO-8859-13", "WINDOWS-1257", "ISO-8859-4"],
        # Q, W, and X not used at all
        alphabet="AĄBCČDEĘĖFGHIĮYJKLMNOPRSŠTUŲŪVZŽaąbcčdeęėfghiįyjklmnoprsštuųūvzž",
        wiki_start_pages=["Pagrindinis_puslapis"],
    ),
    "Latvian": Language(
        name="Latvian",
        iso_code="lv",
        use_ascii=False,
        charsets=["ISO-8859-13", "WINDOWS-1257", "ISO-8859-4"],
        # Q, W, X, Y are only for loanwords
        alphabet="AĀBCČDEĒFGĢHIĪJKĶLĻMNŅOPRSŠTUŪVZŽaābcčdeēfgģhiījkķlļmnņoprsštuūvzž",
        wiki_start_pages=["Sākumlapa"],
    ),
    "Macedonian": Language(
        name="Macedonian",
        iso_code="mk",
        use_ascii=False,
        charsets=["ISO-8859-5", "WINDOWS-1251", "MacCyrillic", "IBM855"],
        alphabet="АБВГДЃЕЖЗЅИЈКЛЉМНЊОПРСТЌУФХЦЧЏШабвгдѓежзѕијклљмнњопрстќуфхцчџш",
        wiki_start_pages=["Главна_страница"],
    ),
    "Dutch": Language(
        name="Dutch",
        iso_code="nl",
        use_ascii=True,
        charsets=["ISO-8859-1", "WINDOWS-1252", "MacRoman"],
        wiki_start_pages=["Hoofdpagina"],
    ),
    "Polish": Language(
        name="Polish",
        iso_code="pl",
        # Q and X are only used for foreign words.
        use_ascii=False,
        charsets=["ISO-8859-2", "WINDOWS-1250"],
        alphabet="AĄBCĆDEĘFGHIJKLŁMNŃOÓPRSŚTUWYZŹŻaąbcćdeęfghijklłmnńoóprsśtuwyzźż",
        wiki_start_pages=["Wikipedia:Strona_główna"],
    ),
    "Portuguese": Language(
        name="Portuguese",
        iso_code="pt",
        use_ascii=True,
        charsets=["ISO-8859-1", "ISO-8859-15", "WINDOWS-1252", "MacRoman"],
        alphabet="ÁÂÃÀÇÉÊÍÓÔÕÚáâãàçéêíóôõú",
        wiki_start_pages=["Wikipédia:Página_principal"],
    ),
    "Romanian": Language(
        name="Romanian",
        iso_code="ro",
        use_ascii=True,
        charsets=["ISO-8859-2", "WINDOWS-1250"],
        alphabet="ăâîșțĂÂÎȘȚ",
        wiki_start_pages=["Pagina_principală"],
    ),
    "Russian": Language(
        name="Russian",
        iso_code="ru",
        use_ascii=False,
        charsets=[
            "ISO-8859-5",
            "WINDOWS-1251",
            "KOI8-R",
            "MacCyrillic",
            "IBM866",
            "IBM855",
        ],
        alphabet="абвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ",
        wiki_start_pages=["Заглавная_страница"],
    ),
    "Slovak": Language(
        name="Slovak",
        iso_code="sk",
        use_ascii=True,
        charsets=["ISO-8859-2", "WINDOWS-1250"],
        alphabet="áäčďéíĺľňóôŕšťúýžÁÄČĎÉÍĹĽŇÓÔŔŠŤÚÝŽ",
        wiki_start_pages=["Hlavná_stránka"],
    ),
    "Slovene": Language(
        name="Slovene",
        iso_code="sl",
        # Q, W, X, Y are only used for foreign words.
        use_ascii=False,
        charsets=["ISO-8859-2", "WINDOWS-1250"],
        alphabet="abcčdefghijklmnoprsštuvzžABCČDEFGHIJKLMNOPRSŠTUVZŽ",
        wiki_start_pages=["Glavna_stran"],
    ),
    # Serbian can be written in both Latin and Cyrillic, but there's no
    # simple way to get the Latin alphabet pages from Wikipedia through
    # the API, so for now we just support Cyrillic.
    "Serbian": Language(
        name="Serbian",
        iso_code="sr",
        alphabet="АБВГДЂЕЖЗИЈКЛЉМНЊОПРСТЋУФХЦЧЏШабвгдђежзијклљмнњопрстћуфхцчџш",
        charsets=["ISO-8859-5", "WINDOWS-1251", "MacCyrillic", "IBM855"],
        wiki_start_pages=["Главна_страна"],
    ),
    "Thai": Language(
        name="Thai",
        iso_code="th",
        use_ascii=False,
        charsets=["ISO-8859-11", "TIS-620", "CP874"],
        alphabet="กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛",
        wiki_start_pages=["หน้าหลัก"],
    ),
    "Turkish": Language(
        name="Turkish",
        iso_code="tr",
        # Q, W, and X are not used by Turkish
        use_ascii=False,
        charsets=["ISO-8859-3", "ISO-8859-9", "WINDOWS-1254"],
        alphabet="abcçdefgğhıijklmnoöprsştuüvyzâîûABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZÂÎÛ",
        wiki_start_pages=["Ana_Sayfa"],
    ),
    "Vietnamese": Language(
        name="Vietnamese",
        iso_code="vi",
        use_ascii=False,
        # Windows-1258 is the only common 8-bit
        # Vietnamese encoding supported by Python.
        # From Wikipedia:
        # For systems that lack support for Unicode,
        # dozens of 8-bit Vietnamese code pages are
        # available.[1] The most common are VISCII
        # (TCVN 5712:1993), VPS, and Windows-1258.[3]
        # Where ASCII is required, such as when
        # ensuring readability in plain text e-mail,
        # Vietnamese letters are often encoded
        # according to Vietnamese Quoted-Readable
        # (VIQR) or VSCII Mnemonic (VSCII-MNEM),[4]
        # though usage of either variable-width
        # scheme has declined dramatically following
        # the adoption of Unicode on the World Wide
        # Web.
        charsets=["WINDOWS-1258"],
        alphabet="aăâbcdđeêghiklmnoôơpqrstuưvxyAĂÂBCDĐEÊGHIKLMNOÔƠPQRSTUƯVXY",
        wiki_start_pages=["Chữ_Quốc_ngữ"],
    ),
}
python3.12/site-packages/pip/_vendor/chardet/charsetprober.py000064400000012454151732703360020201 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import logging
import re
from typing import Optional, Union

from .enums import LanguageFilter, ProbingState

INTERNATIONAL_WORDS_PATTERN = re.compile(
    b"[a-zA-Z]*[\x80-\xFF]+[a-zA-Z]*[^a-zA-Z\x80-\xFF]?"
)


class CharSetProber:

    SHORTCUT_THRESHOLD = 0.95

    def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None:
        self._state = ProbingState.DETECTING
        self.active = True
        self.lang_filter = lang_filter
        self.logger = logging.getLogger(__name__)

    def reset(self) -> None:
        self._state = ProbingState.DETECTING

    @property
    def charset_name(self) -> Optional[str]:
        return None

    @property
    def language(self) -> Optional[str]:
        raise NotImplementedError

    def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
        raise NotImplementedError

    @property
    def state(self) -> ProbingState:
        return self._state

    def get_confidence(self) -> float:
        return 0.0

    @staticmethod
    def filter_high_byte_only(buf: Union[bytes, bytearray]) -> bytes:
        buf = re.sub(b"([\x00-\x7F])+", b" ", buf)
        return buf

    @staticmethod
    def filter_international_words(buf: Union[bytes, bytearray]) -> bytearray:
        """
        We define three types of bytes:
        alphabet: english alphabets [a-zA-Z]
        international: international characters [\x80-\xFF]
        marker: everything else [^a-zA-Z\x80-\xFF]
        The input buffer can be thought to contain a series of words delimited
        by markers. This function works to filter all words that contain at
        least one international character. All contiguous sequences of markers
        are replaced by a single space ascii character.
        This filter applies to all scripts which do not use English characters.
        """
        filtered = bytearray()

        # This regex expression filters out only words that have at-least one
        # international character. The word may include one marker character at
        # the end.
        words = INTERNATIONAL_WORDS_PATTERN.findall(buf)

        for word in words:
            filtered.extend(word[:-1])

            # If the last character in the word is a marker, replace it with a
            # space as markers shouldn't affect our analysis (they are used
            # similarly across all languages and may thus have similar
            # frequencies).
            last_char = word[-1:]
            if not last_char.isalpha() and last_char < b"\x80":
                last_char = b" "
            filtered.extend(last_char)

        return filtered

    @staticmethod
    def remove_xml_tags(buf: Union[bytes, bytearray]) -> bytes:
        """
        Returns a copy of ``buf`` that retains only the sequences of English
        alphabet and high byte characters that are not between <> characters.
        This filter can be applied to all scripts which contain both English
        characters and extended ASCII characters, but is currently only used by
        ``Latin1Prober``.
        """
        filtered = bytearray()
        in_tag = False
        prev = 0
        buf = memoryview(buf).cast("c")

        for curr, buf_char in enumerate(buf):
            # Check if we're coming out of or entering an XML tag

            # https://github.com/python/typeshed/issues/8182
            if buf_char == b">":  # type: ignore[comparison-overlap]
                prev = curr + 1
                in_tag = False
            # https://github.com/python/typeshed/issues/8182
            elif buf_char == b"<":  # type: ignore[comparison-overlap]
                if curr > prev and not in_tag:
                    # Keep everything after last non-extended-ASCII,
                    # non-alphabetic character
                    filtered.extend(buf[prev:curr])
                    # Output a space to delimit stretch we kept
                    filtered.extend(b" ")
                in_tag = True

        # If we're not in a tag...
        if not in_tag:
            # Keep everything after last non-extended-ASCII, non-alphabetic
            # character
            filtered.extend(buf[prev:])

        return filtered
python3.12/site-packages/pip/_vendor/chardet/big5prober.py000064400000003343151732703360017373 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .chardistribution import Big5DistributionAnalysis
from .codingstatemachine import CodingStateMachine
from .mbcharsetprober import MultiByteCharSetProber
from .mbcssm import BIG5_SM_MODEL


class Big5Prober(MultiByteCharSetProber):
    def __init__(self) -> None:
        super().__init__()
        self.coding_sm = CodingStateMachine(BIG5_SM_MODEL)
        self.distribution_analyzer = Big5DistributionAnalysis()
        self.reset()

    @property
    def charset_name(self) -> str:
        return "Big5"

    @property
    def language(self) -> str:
        return "Chinese"
python3.12/site-packages/pip/_vendor/pkg_resources.pyi000064400000000033151732703370016737 0ustar00from pkg_resources import *python3.12/site-packages/pip/_vendor/platformdirs/windows.py000064400000022545151732703370020127 0ustar00"""Windows."""
from __future__ import annotations

import ctypes
import os
import sys
from functools import lru_cache
from typing import TYPE_CHECKING

from .api import PlatformDirsABC

if TYPE_CHECKING:
    from collections.abc import Callable


class Windows(PlatformDirsABC):
    """
    `MSDN on where to store app data files
    <http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120>`_.
    Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `roaming <platformdirs.api.PlatformDirsABC.roaming>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    """

    @property
    def user_data_dir(self) -> str:
        """
        :return: data directory tied to the user, e.g.
         ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname`` (not roaming) or
         ``%USERPROFILE%\\AppData\\Roaming\\$appauthor\\$appname`` (roaming)
        """
        const = "CSIDL_APPDATA" if self.roaming else "CSIDL_LOCAL_APPDATA"
        path = os.path.normpath(get_win_folder(const))
        return self._append_parts(path)

    def _append_parts(self, path: str, *, opinion_value: str | None = None) -> str:
        params = []
        if self.appname:
            if self.appauthor is not False:
                author = self.appauthor or self.appname
                params.append(author)
            params.append(self.appname)
            if opinion_value is not None and self.opinion:
                params.append(opinion_value)
            if self.version:
                params.append(self.version)
        path = os.path.join(path, *params)  # noqa: PTH118
        self._optionally_create_directory(path)
        return path

    @property
    def site_data_dir(self) -> str:
        """:return: data directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname``"""
        path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
        return self._append_parts(path)

    @property
    def user_config_dir(self) -> str:
        """:return: config directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def site_config_dir(self) -> str:
        """:return: config directory shared by the users, same as `site_data_dir`"""
        return self.site_data_dir

    @property
    def user_cache_dir(self) -> str:
        """
        :return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
         ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname\\Cache\\$version``
        """
        path = os.path.normpath(get_win_folder("CSIDL_LOCAL_APPDATA"))
        return self._append_parts(path, opinion_value="Cache")

    @property
    def site_cache_dir(self) -> str:
        """:return: cache directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname\\Cache\\$version``"""
        path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
        return self._append_parts(path, opinion_value="Cache")

    @property
    def user_state_dir(self) -> str:
        """:return: state directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def user_log_dir(self) -> str:
        """:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it"""
        path = self.user_data_dir
        if self.opinion:
            path = os.path.join(path, "Logs")  # noqa: PTH118
            self._optionally_create_directory(path)
        return path

    @property
    def user_documents_dir(self) -> str:
        """:return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``"""
        return os.path.normpath(get_win_folder("CSIDL_PERSONAL"))

    @property
    def user_downloads_dir(self) -> str:
        """:return: downloads directory tied to the user e.g. ``%USERPROFILE%\\Downloads``"""
        return os.path.normpath(get_win_folder("CSIDL_DOWNLOADS"))

    @property
    def user_pictures_dir(self) -> str:
        """:return: pictures directory tied to the user e.g. ``%USERPROFILE%\\Pictures``"""
        return os.path.normpath(get_win_folder("CSIDL_MYPICTURES"))

    @property
    def user_videos_dir(self) -> str:
        """:return: videos directory tied to the user e.g. ``%USERPROFILE%\\Videos``"""
        return os.path.normpath(get_win_folder("CSIDL_MYVIDEO"))

    @property
    def user_music_dir(self) -> str:
        """:return: music directory tied to the user e.g. ``%USERPROFILE%\\Music``"""
        return os.path.normpath(get_win_folder("CSIDL_MYMUSIC"))

    @property
    def user_runtime_dir(self) -> str:
        """
        :return: runtime directory tied to the user, e.g.
         ``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``
        """
        path = os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Temp"))  # noqa: PTH118
        return self._append_parts(path)


def get_win_folder_from_env_vars(csidl_name: str) -> str:
    """Get folder from environment variables."""
    result = get_win_folder_if_csidl_name_not_env_var(csidl_name)
    if result is not None:
        return result

    env_var_name = {
        "CSIDL_APPDATA": "APPDATA",
        "CSIDL_COMMON_APPDATA": "ALLUSERSPROFILE",
        "CSIDL_LOCAL_APPDATA": "LOCALAPPDATA",
    }.get(csidl_name)
    if env_var_name is None:
        msg = f"Unknown CSIDL name: {csidl_name}"
        raise ValueError(msg)
    result = os.environ.get(env_var_name)
    if result is None:
        msg = f"Unset environment variable: {env_var_name}"
        raise ValueError(msg)
    return result


def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None:
    """Get folder for a CSIDL name that does not exist as an environment variable."""
    if csidl_name == "CSIDL_PERSONAL":
        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Documents")  # noqa: PTH118

    if csidl_name == "CSIDL_DOWNLOADS":
        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Downloads")  # noqa: PTH118

    if csidl_name == "CSIDL_MYPICTURES":
        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Pictures")  # noqa: PTH118

    if csidl_name == "CSIDL_MYVIDEO":
        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Videos")  # noqa: PTH118

    if csidl_name == "CSIDL_MYMUSIC":
        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Music")  # noqa: PTH118
    return None


def get_win_folder_from_registry(csidl_name: str) -> str:
    """
    Get folder from the registry.

    This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
    for all CSIDL_* names.
    """
    shell_folder_name = {
        "CSIDL_APPDATA": "AppData",
        "CSIDL_COMMON_APPDATA": "Common AppData",
        "CSIDL_LOCAL_APPDATA": "Local AppData",
        "CSIDL_PERSONAL": "Personal",
        "CSIDL_DOWNLOADS": "{374DE290-123F-4565-9164-39C4925E467B}",
        "CSIDL_MYPICTURES": "My Pictures",
        "CSIDL_MYVIDEO": "My Video",
        "CSIDL_MYMUSIC": "My Music",
    }.get(csidl_name)
    if shell_folder_name is None:
        msg = f"Unknown CSIDL name: {csidl_name}"
        raise ValueError(msg)
    if sys.platform != "win32":  # only needed for mypy type checker to know that this code runs only on Windows
        raise NotImplementedError
    import winreg

    key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
    directory, _ = winreg.QueryValueEx(key, shell_folder_name)
    return str(directory)


def get_win_folder_via_ctypes(csidl_name: str) -> str:
    """Get folder with ctypes."""
    # There is no 'CSIDL_DOWNLOADS'.
    # Use 'CSIDL_PROFILE' (40) and append the default folder 'Downloads' instead.
    # https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid

    csidl_const = {
        "CSIDL_APPDATA": 26,
        "CSIDL_COMMON_APPDATA": 35,
        "CSIDL_LOCAL_APPDATA": 28,
        "CSIDL_PERSONAL": 5,
        "CSIDL_MYPICTURES": 39,
        "CSIDL_MYVIDEO": 14,
        "CSIDL_MYMUSIC": 13,
        "CSIDL_DOWNLOADS": 40,
    }.get(csidl_name)
    if csidl_const is None:
        msg = f"Unknown CSIDL name: {csidl_name}"
        raise ValueError(msg)

    buf = ctypes.create_unicode_buffer(1024)
    windll = getattr(ctypes, "windll")  # noqa: B009 # using getattr to avoid false positive with mypy type checker
    windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)

    # Downgrade to short path name if it has highbit chars.
    if any(ord(c) > 255 for c in buf):  # noqa: PLR2004
        buf2 = ctypes.create_unicode_buffer(1024)
        if windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):
            buf = buf2

    if csidl_name == "CSIDL_DOWNLOADS":
        return os.path.join(buf.value, "Downloads")  # noqa: PTH118

    return buf.value


def _pick_get_win_folder() -> Callable[[str], str]:
    if hasattr(ctypes, "windll"):
        return get_win_folder_via_ctypes
    try:
        import winreg  # noqa: F401
    except ImportError:
        return get_win_folder_from_env_vars
    else:
        return get_win_folder_from_registry


get_win_folder = lru_cache(maxsize=None)(_pick_get_win_folder())

__all__ = [
    "Windows",
]
python3.12/site-packages/pip/_vendor/platformdirs/unix.py000064400000021151151732703370017410 0ustar00"""Unix."""
from __future__ import annotations

import os
import sys
from configparser import ConfigParser
from pathlib import Path

from .api import PlatformDirsABC

if sys.platform == "win32":

    def getuid() -> int:
        msg = "should only be used on Unix"
        raise RuntimeError(msg)

else:
    from os import getuid


class Unix(PlatformDirsABC):
    """
    On Unix/Linux, we follow the
    `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. The spec allows
    overriding directories with environment variables. The examples show are the default values, alongside the name of
    the environment variable that overrides them. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `multipath <platformdirs.api.PlatformDirsABC.multipath>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    """

    @property
    def user_data_dir(self) -> str:
        """
        :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
         ``$XDG_DATA_HOME/$appname/$version``
        """
        path = os.environ.get("XDG_DATA_HOME", "")
        if not path.strip():
            path = os.path.expanduser("~/.local/share")  # noqa: PTH111
        return self._append_app_name_and_version(path)

    @property
    def site_data_dir(self) -> str:
        """
        :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
         enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
        """
        # XDG default for $XDG_DATA_DIRS; only first, if multipath is False
        path = os.environ.get("XDG_DATA_DIRS", "")
        if not path.strip():
            path = f"/usr/local/share{os.pathsep}/usr/share"
        return self._with_multi_path(path)

    def _with_multi_path(self, path: str) -> str:
        path_list = path.split(os.pathsep)
        if not self.multipath:
            path_list = path_list[0:1]
        path_list = [self._append_app_name_and_version(os.path.expanduser(p)) for p in path_list]  # noqa: PTH111
        return os.pathsep.join(path_list)

    @property
    def user_config_dir(self) -> str:
        """
        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
         ``$XDG_CONFIG_HOME/$appname/$version``
        """
        path = os.environ.get("XDG_CONFIG_HOME", "")
        if not path.strip():
            path = os.path.expanduser("~/.config")  # noqa: PTH111
        return self._append_app_name_and_version(path)

    @property
    def site_config_dir(self) -> str:
        """
        :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
         is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/etc/xdg/$appname/$version``
        """
        # XDG default for $XDG_CONFIG_DIRS only first, if multipath is False
        path = os.environ.get("XDG_CONFIG_DIRS", "")
        if not path.strip():
            path = "/etc/xdg"
        return self._with_multi_path(path)

    @property
    def user_cache_dir(self) -> str:
        """
        :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
         ``~/$XDG_CACHE_HOME/$appname/$version``
        """
        path = os.environ.get("XDG_CACHE_HOME", "")
        if not path.strip():
            path = os.path.expanduser("~/.cache")  # noqa: PTH111
        return self._append_app_name_and_version(path)

    @property
    def site_cache_dir(self) -> str:
        """:return: cache directory shared by users, e.g. ``/var/tmp/$appname/$version``"""
        return self._append_app_name_and_version("/var/tmp")  # noqa: S108

    @property
    def user_state_dir(self) -> str:
        """
        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
         ``$XDG_STATE_HOME/$appname/$version``
        """
        path = os.environ.get("XDG_STATE_HOME", "")
        if not path.strip():
            path = os.path.expanduser("~/.local/state")  # noqa: PTH111
        return self._append_app_name_and_version(path)

    @property
    def user_log_dir(self) -> str:
        """:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it"""
        path = self.user_state_dir
        if self.opinion:
            path = os.path.join(path, "log")  # noqa: PTH118
        return path

    @property
    def user_documents_dir(self) -> str:
        """:return: documents directory tied to the user, e.g. ``~/Documents``"""
        return _get_user_media_dir("XDG_DOCUMENTS_DIR", "~/Documents")

    @property
    def user_downloads_dir(self) -> str:
        """:return: downloads directory tied to the user, e.g. ``~/Downloads``"""
        return _get_user_media_dir("XDG_DOWNLOAD_DIR", "~/Downloads")

    @property
    def user_pictures_dir(self) -> str:
        """:return: pictures directory tied to the user, e.g. ``~/Pictures``"""
        return _get_user_media_dir("XDG_PICTURES_DIR", "~/Pictures")

    @property
    def user_videos_dir(self) -> str:
        """:return: videos directory tied to the user, e.g. ``~/Videos``"""
        return _get_user_media_dir("XDG_VIDEOS_DIR", "~/Videos")

    @property
    def user_music_dir(self) -> str:
        """:return: music directory tied to the user, e.g. ``~/Music``"""
        return _get_user_media_dir("XDG_MUSIC_DIR", "~/Music")

    @property
    def user_runtime_dir(self) -> str:
        """
        :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
         ``$XDG_RUNTIME_DIR/$appname/$version``.

         For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if
         exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR``
         is not set.
        """
        path = os.environ.get("XDG_RUNTIME_DIR", "")
        if not path.strip():
            if sys.platform.startswith(("freebsd", "openbsd", "netbsd")):
                path = f"/var/run/user/{getuid()}"
                if not Path(path).exists():
                    path = f"/tmp/runtime-{getuid()}"  # noqa: S108
            else:
                path = f"/run/user/{getuid()}"
        return self._append_app_name_and_version(path)

    @property
    def site_data_path(self) -> Path:
        """:return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``"""
        return self._first_item_as_path_if_multipath(self.site_data_dir)

    @property
    def site_config_path(self) -> Path:
        """:return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``"""
        return self._first_item_as_path_if_multipath(self.site_config_dir)

    @property
    def site_cache_path(self) -> Path:
        """:return: cache path shared by users. Only return first item, even if ``multipath`` is set to ``True``"""
        return self._first_item_as_path_if_multipath(self.site_cache_dir)

    def _first_item_as_path_if_multipath(self, directory: str) -> Path:
        if self.multipath:
            # If multipath is True, the first path is returned.
            directory = directory.split(os.pathsep)[0]
        return Path(directory)


def _get_user_media_dir(env_var: str, fallback_tilde_path: str) -> str:
    media_dir = _get_user_dirs_folder(env_var)
    if media_dir is None:
        media_dir = os.environ.get(env_var, "").strip()
        if not media_dir:
            media_dir = os.path.expanduser(fallback_tilde_path)  # noqa: PTH111

    return media_dir


def _get_user_dirs_folder(key: str) -> str | None:
    """Return directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/."""
    user_dirs_config_path = Path(Unix().user_config_dir) / "user-dirs.dirs"
    if user_dirs_config_path.exists():
        parser = ConfigParser()

        with user_dirs_config_path.open() as stream:
            # Add fake section header, so ConfigParser doesn't complain
            parser.read_string(f"[top]\n{stream.read()}")

        if key not in parser["top"]:
            return None

        path = parser["top"][key].strip('"')
        # Handle relative home paths
        return path.replace("$HOME", os.path.expanduser("~"))  # noqa: PTH111

    return None


__all__ = [
    "Unix",
]
python3.12/site-packages/pip/_vendor/platformdirs/version.py000064400000000240151732703370020106 0ustar00# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = '3.8.1'
__version_tuple__ = version_tuple = (3, 8, 1)
python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-312.pyc000064400000022417151732703400024406 0ustar00�

R`i+��,�dZddlmZddlZddlZddlZddlmZddlm	Z	ddl
mZGd�d	e�Zed�
�dd��Z
ed�
�dd��Zed�
�dd
��Zed�
�dd��Zed�
�dd��Zed�
�dd��Zd	gZy)zAndroid.�)�annotationsN)�	lru_cache)�cast�)�PlatformDirsABCc��eZdZdZedd��Zedd��Zedd��Zedd��Zedd��Z	edd��Z
edd��Zedd	��Zedd
��Z
edd��Zedd��Zedd
��Zedd��Zedd��Zy)�Androida$
    Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    c�R�|jttt��d�S)zd:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``�files��_append_app_name_and_versionr�str�_android_folder��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py�
user_data_dirzAndroid.user_data_dir�!���0�0��c�?�;L�1M�w�W�W�c��|jS)z@:return: data directory shared by users, same as `user_data_dir`�rrs r�
site_data_dirzAndroid.site_data_dir����!�!�!rc�R�|jttt��d�S)z�
        :return: config directory tied to the user, e.g.         ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
        �shared_prefsrrs r�user_config_dirzAndroid.user_config_dirs!���0�0��c�?�;L�1M�~�^�^rc��|jS)zH:return: config directory shared by the users, same as `user_config_dir`)rrs r�site_config_dirzAndroid.site_config_dir's���#�#�#rc�R�|jttt��d�S)zj:return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``�cacherrs r�user_cache_dirzAndroid.user_cache_dir,rrc��|jS)zB:return: cache directory shared by users, same as `user_cache_dir`)r!rs r�site_cache_dirzAndroid.site_cache_dir1s���"�"�"rc��|jS)zB:return: state directory tied to the user, same as `user_data_dir`rrs r�user_state_dirzAndroid.user_state_dir6rrc�v�|j}|jr tjj	|d�}|S)z�
        :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
          e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``
        �log�r!�opinion�os�path�join�rr+s  r�user_log_dirzAndroid.user_log_dir;�/���"�"���<�<��7�7�<�<��e�,�D��rc��t�S)zT:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``)�_android_documents_folderrs r�user_documents_dirzAndroid.user_documents_dirF�
��)�*�*rc��t�S)zT:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``)�_android_downloads_folderrs r�user_downloads_dirzAndroid.user_downloads_dirKr3rc��t�S)zR:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``)�_android_pictures_folderrs r�user_pictures_dirzAndroid.user_pictures_dirPs
��(�)�)rc��t�S)zS:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``)�_android_videos_folderrs r�user_videos_dirzAndroid.user_videos_dirUs
��&�'�'rc��t�S)zL:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``)�_android_music_folderrs r�user_music_dirzAndroid.user_music_dirZs
��%�&�&rc�v�|j}|jr tjj	|d�}|S)z�
        :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
          e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``
        �tmpr(r-s  r�user_runtime_dirzAndroid.user_runtime_dir_r/rN��returnr)�__name__�
__module__�__qualname__�__doc__�propertyrrrrr!r#r%r.r2r6r9r<r?rB�rrr	r	
s%����X��X��"��"��_��_��$��$��X��X��#��#��"��"������+��+��+��+��*��*��(��(��'��'����rr	)�maxsizec�F�	ddlm}|d�}|j�j�j	�}|S#t
$rYt
jd�}tjD]+}|j|�s�|jd�d}Y|Sd}Y|SwxYw)zE:return: base folder for the Android OS or None if it cannot be foundr��	autoclass�android.content.Contextz /data/(data|user/\d+)/(.+)/filesz/filesN)�jniusrN�getFilesDir�
getParentFile�getAbsolutePath�	Exception�re�compile�sysr+�match�split)rN�context�result�patternr+s     rrrks����#��5�6��$�0�0�2�@�@�B�R�R�T���M�����*�*�@�A���H�H�D��}�}�T�"����H�-�a�0����M�
�
�F��M��s�:>�AB �B �B �B c��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z,:return: documents folder for the Android OSrrMrO�android.os.Environmentz/storage/emulated/0/Documents)rPrN�getExternalFilesDir�DIRECTORY_DOCUMENTSrSrT)rNrZ�environment�
documents_dirs    rr1r1��c��8�#��5�6��� 8�9��$�8�8��9X�9X�Y�i�i�k�
�����8�7�
���8���?A�A�Ac��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z,:return: downloads folder for the Android OSrrMrOr^z/storage/emulated/0/Downloads)rPrNr_�DIRECTORY_DOWNLOADSrSrT)rNrZra�
downloads_dirs    rr5r5�rcrdc��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z+:return: pictures folder for the Android OSrrMrOr^z/storage/emulated/0/Pictures)rPrNr_�DIRECTORY_PICTURESrSrT)rNrZra�pictures_dirs    rr8r8�sc��6�#��5�6��� 8�9��#�7�7��8V�8V�W�g�g�i������6�5����6�rdc��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z):return: videos folder for the Android OSrrMrOr^z/storage/emulated/0/DCIM/Camera)rPrNr_�DIRECTORY_DCIMrSrT)rNrZra�
videos_dirs    rr;r;�sc��7�#��5�6��� 8�9��!�5�5�k�6P�6P�Q�a�a�c�
�����7�6�
���7�rdc��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z(:return: music folder for the Android OSrrMrOr^z/storage/emulated/0/Music)rPrNr_�DIRECTORY_MUSICrSrT)rNrZra�	music_dirs    rr>r>�sc��0�#��5�6��� 8�9�� �4�4�[�5P�5P�Q�a�a�c�	�����0�/�	���0�rd)rDz
str | NonerC)rH�
__future__rr*rUrW�	functoolsr�typingr�apirr	rr1r5r8r;r>�__all__rJrr�<module>rvs����"�	�	�
��� �[�o�[�|�1�����(�1������1������1������1������1����� ��rpython3.12/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc000064400000030305151732703400023744 0ustar00�

R`ii"���dZddlmZddlZddlZddlmZddlmZddl	m
Z
ejdk(rdd	�Zndd
lmZGd�de
�Z
dd
�Zdd�ZdgZy)zUnix.�)�annotationsN)�ConfigParser)�Path�)�PlatformDirsABC�win32c��d}t|��)Nzshould only be used on Unix)�RuntimeError)�msgs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/unix.py�getuidr

s��+���3���)r
c�R�eZdZdZedd��Zedd��Zdd�Zedd��Zedd��Z	edd��Z
edd��Zedd	��Zedd
��Z
edd��Zedd��Zedd
��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zdd�Zy)�Unixa�
    On Unix/Linux, we follow the
    `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. The spec allows
    overriding directories with environment variables. The examples show are the default values, alongside the name of
    the environment variable that overrides them. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `multipath <platformdirs.api.PlatformDirsABC.multipath>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    c���tjjdd�}|j�stjjd�}|j
|�S)z�
        :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
         ``$XDG_DATA_HOME/$appname/$version``
        �
XDG_DATA_HOME�z~/.local/share��os�environ�get�strip�path�
expanduser�_append_app_name_and_version��selfrs  r�
user_data_dirzUnix.user_data_dir"sG���z�z�~�~�o�r�2���z�z�|��7�7�%�%�&6�7�D��0�0��6�6rc��tjjdd�}|j�sdtj�d�}|j|�S)aY
        :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
         enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
        �
XDG_DATA_DIRSrz/usr/local/sharez
/usr/share)rrrr�pathsep�_with_multi_pathrs  r�
site_data_dirzUnix.site_data_dir-sD���z�z�~�~�o�r�2���z�z�|�%�b�j�j�\��<�D��$�$�T�*�*rc� �|jtj�}|js|dd}|D�cgc]0}|j	tj
j
|����2}}tjj|�Scc}w)Nrr)�splitrr!�	multipathrrr�join)rr�	path_list�ps    rr"zUnix._with_multi_path:sp���J�J�r�z�z�*�	��~�~�!�!�A��I�W`�a�W`�RS�T�6�6�r�w�w�7I�7I�!�7L�M�W`�	�a��z�z���y�)�)��bs�5Bc���tjjdd�}|j�stjjd�}|j
|�S)z�
        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
         ``$XDG_CONFIG_HOME/$appname/$version``
        �XDG_CONFIG_HOMErz	~/.configrrs  r�user_config_dirzUnix.user_config_dirAsG���z�z�~�~�/��4���z�z�|��7�7�%�%�k�2�D��0�0��6�6rc��tjjdd�}|j�sd}|j	|�S)a/
        :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
         is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/etc/xdg/$appname/$version``
        �XDG_CONFIG_DIRSrz/etc/xdg)rrrrr"rs  r�site_config_dirzUnix.site_config_dirLs8���z�z�~�~�/��4���z�z�|��D��$�$�T�*�*rc���tjjdd�}|j�stjjd�}|j
|�S)z�
        :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
         ``~/$XDG_CACHE_HOME/$appname/$version``
        �XDG_CACHE_HOMErz~/.cacherrs  r�user_cache_dirzUnix.user_cache_dirYsG���z�z�~�~�.��3���z�z�|��7�7�%�%�j�1�D��0�0��6�6rc�$�|jd�S)zM:return: cache directory shared by users, e.g. ``/var/tmp/$appname/$version``z/var/tmp)r�rs r�site_cache_dirzUnix.site_cache_dirds���0�0��<�<rc���tjjdd�}|j�stjjd�}|j
|�S)z�
        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
         ``$XDG_STATE_HOME/$appname/$version``
        �XDG_STATE_HOMErz~/.local/staterrs  r�user_state_dirzUnix.user_state_dirisH���z�z�~�~�.��3���z�z�|��7�7�%�%�&6�7�D��0�0��6�6rc�v�|j}|jr tjj	|d�}|S)zg:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it�log)r8�opinionrrr'rs  r�user_log_dirzUnix.user_log_dirts/���"�"���<�<��7�7�<�<��e�,�D��rc��tdd�S)zC:return: documents directory tied to the user, e.g. ``~/Documents``�XDG_DOCUMENTS_DIRz~/Documents��_get_user_media_dirr4s r�user_documents_dirzUnix.user_documents_dir|s��#�#6�
�F�Frc��tdd�S)zC:return: downloads directory tied to the user, e.g. ``~/Downloads``�XDG_DOWNLOAD_DIRz~/Downloadsr?r4s r�user_downloads_dirzUnix.user_downloads_dir�s��#�#5�}�E�Erc��tdd�S)zA:return: pictures directory tied to the user, e.g. ``~/Pictures``�XDG_PICTURES_DIRz
~/Picturesr?r4s r�user_pictures_dirzUnix.user_pictures_dir�s��#�#5�|�D�Drc��tdd�S)z=:return: videos directory tied to the user, e.g. ``~/Videos``�XDG_VIDEOS_DIRz~/Videosr?r4s r�user_videos_dirzUnix.user_videos_dir�s��#�#3�Z�@�@rc��tdd�S)z;:return: music directory tied to the user, e.g. ``~/Music``�
XDG_MUSIC_DIRz~/Musicr?r4s r�user_music_dirzUnix.user_music_dir�s��#�?�I�>�>rc�D�tjjdd�}|j�s`tj
j
d�r4dt���}t|�j�sdt���}n
dt���}|j|�S)az
        :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
         ``$XDG_RUNTIME_DIR/$appname/$version``.

         For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if
         exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR``
         is not set.
        �XDG_RUNTIME_DIRr)�freebsd�openbsd�netbsdz/var/run/user/z
/tmp/runtime-z
/run/user/)rrrr�sys�platform�
startswithr
r�existsrrs  r�user_runtime_dirzUnix.user_runtime_dir�s����z�z�~�~�/��4���z�z�|��|�|�&�&�'G�H�'���z�2���D�z�(�(�*�*�6�8�*�5�D�#�F�H�:�.���0�0��6�6rc�8�|j|j�S)zd:return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``)� _first_item_as_path_if_multipathr#r4s r�site_data_pathzUnix.site_data_path�s���4�4�T�5G�5G�H�Hrc�8�|j|j�S)zj:return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``)rYr/r4s r�site_config_pathzUnix.site_config_path�s���4�4�T�5I�5I�J�Jrc�8�|j|j�S)ze:return: cache path shared by users. Only return first item, even if ``multipath`` is set to ``True``)rYr5r4s r�site_cache_pathzUnix.site_cache_path�s���4�4�T�5H�5H�I�Irc�t�|jr"|jtj�d}t	|�S)Nr)r&r%rr!r)r�	directorys  rrYz%Unix._first_item_as_path_if_multipath�s*���>�>�!����
�
�3�A�6�I��I��rN)�return�str)rrbrarb)rar)r`rbrar)�__name__�
__module__�__qualname__�__doc__�propertyrr#r"r,r/r2r5r8r<rArDrGrJrMrWrZr\r^rY�rrrrss��
��7��7��
+��
+�*��7��7��
+��
+��7��7��=��=��7��7������G��G��F��F��E��E��A��A��?��?��7��7�&�I��I��K��K��J��J�rrc��t|�}|�Otjj|d�j	�}|stj
j
|�}|S)Nr)�_get_user_dirs_folderrrrrrr)�env_var�fallback_tilde_path�	media_dirs   rr@r@�sM��%�g�.�I����J�J�N�N�7�B�/�5�5�7�	�����*�*�+>�?�I��rc��tt�j�dz}|j�r�t	�}|j�5}|j
d|j����ddd�||dvry|d|jd�}|jdtjjd��Sy#1swY�XxYw)zkReturn directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/.zuser-dirs.dirsz[top]
N�top�"z$HOME�~)
rrr,rVr�open�read_string�readr�replacerrr)�key�user_dirs_config_path�parser�streamrs     rrjrj�s��� ���!7�!7�8�;K�K���#�#�%����
"�
'�
'�
)�V����������8�9�*��f�U�m�#���e�}�S�!�'�'��,���|�|�G�R�W�W�%7�%7��%<�=�=��*�
)�s�#C�C)ra�int)rkrbrlrbrarb)rvrbraz
str | None)rf�
__future__rrrS�configparserr�pathlibr�apirrTr
rr@rj�__all__rhrr�<module>r�sU���"�	�
�%�� ��<�<�7�� �
�g�?�g�T��*��rpython3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc000064400000043235151732703400024526 0ustar00�

R`i�N���dZddlmZddlZddlZddlmZddlmZddl	m
Z
ddl	mZer"dd	l
mZejd
k\rddlmZnddlmZd*d�Ze�ZeZ					d+											d,d
�Z					d+											d-d�Z					d+											d,d�Z					d+											d-d�Z					d.											d/d�Z					d.											d/d�Z					d+											d,d�Z					d.											d/d�Zd0d�Zd0d�Zd0d�Zd0d�Z d0d�Z!					d.											d/d�Z"					d+											d1d�Z#					d+											d2d�Z$					d+											d1d�Z%					d+											d2d�Z&					d.											d3d�Z'					d.											d3d �Z(					d+											d1d!�Z)					d.											d3d"�Z*d4d#�Z+d4d$�Z,d4d%�Z-d4d&�Z.d4d'�Z/					d.											d3d(�Z0gd)�Z1y)5z�
Utilities for determining application-specific dirs. See <https://github.com/platformdirs/platformdirs> for details and
usage.
�)�annotationsN)�
TYPE_CHECKING�)�PlatformDirsABC)�__version__)�__version_tuple__)�Path)��)�Literalc�\�tjdk(rddlm}n tjdk(rddlm}nddlm}tjd�dk(rYtjd	�d
k(rAtjd�stjd�r|Sdd
l
m}|��ddl
m}|S|S)N�win32r)�Windows�darwin)�MacOS)�Unix�ANDROID_DATAz/data�ANDROID_ROOTz/system�SHELL�PREFIX)�_android_folder)�Android)
�sys�platform� pip._vendor.platformdirs.windowsr�pip._vendor.platformdirs.macosr�pip._vendor.platformdirs.unixr�os�getenv� pip._vendor.platformdirs.androidrr)�Resultrrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py�_set_platform_dir_classr#sy��
�|�|�w��F�	����	!�B�@�	�y�y�� �G�+��	�	�.�0I�Y�0V�
�9�9�W�����8�!4��M�D���(�@��N��M�c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: data directory tied to the user
    ��appname�	appauthor�version�roaming�
ensure_exists)�PlatformDirs�
user_data_dirr&s     r"r-r-2�'�������#���m�
r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: data directory shared by users
    �r'r(r)�	multipathr+)r,�
site_data_dirr0s     r"r2r2Js'�������#���m�
r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: config directory tied to the user
    r&)r,�user_config_dirr&s     r"r4r4b�'�������#���o�
r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: config directory shared by the users
    r0)r,�site_config_dirr0s     r"r7r7zs'�������#���o�
r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: cache directory tied to the user
    �r'r(r)�opinionr+)r,�user_cache_dirr9s     r"r;r;��'�������#���n�
r$c�6�t|||||��jS�a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: cache directory tied to the user
    r9)r,�site_cache_dirr9s     r"r?r?�r<r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: state directory tied to the user
    r&)r,�user_state_dirr&s     r"rArA�r<r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: log directory tied to the user
    r9)r,�user_log_dirr9s     r"rCrC�s'�������#���l�
r$c�*�t�jS)z.:returns: documents directory tied to the user)r,�user_documents_dir�r$r"rErE�����>�,�,�,r$c�*�t�jS)z.:returns: downloads directory tied to the user)r,�user_downloads_dirrFr$r"rIrI�rGr$c�*�t�jS)z-:returns: pictures directory tied to the user)r,�user_pictures_dirrFr$r"rKrK�s���>�+�+�+r$c�*�t�jS)z+:returns: videos directory tied to the user)r,�user_videos_dirrFr$r"rMrM����>�)�)�)r$c�*�t�jS)z*:returns: music directory tied to the user)r,�user_music_dirrFr$r"rPrPs���>�(�(�(r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: runtime directory tied to the user
    r9)r,�user_runtime_dirr9s     r"rRrR�(�������#����
r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: data path tied to the user
    r&)r,�user_data_pathr&s     r"rUrU#r<r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: data path shared by users
    r0)r,�site_data_pathr0s     r"rWrW;s'�������#���n�
r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: config path tied to the user
    r&)r,�user_config_pathr&s     r"rYrYSrSr$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: config path shared by the users
    r0)r,�site_config_pathr0s     r"r[r[ks(�������#����
r$c�6�t|||||��jSr>)r,�site_cache_pathr9s     r"r]r]�r5r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: cache path tied to the user
    r9)r,�user_cache_pathr9s     r"r_r_�r5r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: state path tied to the user
    r&)r,�user_state_pathr&s     r"rara�r5r$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: log path tied to the user
    r9)r,�
user_log_pathr9s     r"rcrc�r.r$c�*�t�jS)z):returns: documents path tied to the user)r,�user_documents_pathrFr$r"rere�����>�-�-�-r$c�*�t�jS)z):returns: downloads path tied to the user)r,�user_downloads_pathrFr$r"rhrh�rfr$c�*�t�jS)z(:returns: pictures path tied to the user)r,�user_pictures_pathrFr$r"rjrj�rGr$c�*�t�jS)z&:returns: videos path tied to the user)r,�user_videos_pathrFr$r"rlrl�s���>�*�*�*r$c�*�t�jS)z%:returns: music path tied to the user)r,�user_music_pathrFr$r"rnrn�rNr$c�6�t|||||��jS)a�
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: runtime path tied to the user
    r9)r,�user_runtime_pathr9s     r"rprp�s(�������#����
r$)!r�__version_info__r,�AppDirsrr-r4r;rArCrErIrKrMrPrRr2r7r?rUrYr_rarcrerhrjrlrnrprWr[r])�returnztype[PlatformDirsABC])NNNFF)r'�
str | Noner(�str | None | Literal[False]r)rtr*�boolr+rvrs�str)r'rtr(rur)rtr1rvr+rvrsrw)NNNTF)r'rtr(rur)rtr:rvr+rvrsrw)rsrw)r'rtr(rur)rtr*rvr+rvrsr	)r'rtr(rur)rtr1rvr+rvrsr	)r'rtr(rur)rtr:rvr+rvrsr	)rsr	)2�__doc__�
__future__rrr�typingr�apirr)rrrq�pathlibr	�version_infor�pip._vendor.typing_extensionsr#r,rrr-r2r4r7r;r?rArCrErIrKrMrPrRrUrWrYr[r]r_rarcrerhrjrlrnrp�__all__rFr$r"�<module>r�s���#�	�
� � � �:���
���6�!�"�9��,'�(��
���-1�����
��*�����	�
��	�
�2�-1�����
��*�����	�
��	�
�2�-1�����
��*�����	�
��	�
�2�-1�����
��*�����	�
��	�
�2�-1�����
��*�����	�
��	�
�2�-1�����
��*�����	�
��	�
�2�-1�����
��*�����	�
��	�
�2�-1�����
��*�����	�
��	�
�0-�
-�
,�
*�
)��-1�����
��*�����	�
��	�
�2�-1�����
��*�����	�
��
�
�2�-1�����
��*�����	�
��
�
�2�-1�����
��*�����	�
��
�
�2�-1�����
��*�����	�
��
�
�2�-1�����
��*�����	�
��
�
�2�-1�����
��*�����	�
��
�
�2�-1�����
��*�����	�
��
�
�2�-1�����
��*�����	�
��
�
�0.�
.�
-�
+�
*��-1�����
��*�����	�
��
�
�0"�r$python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-312.pyc000064400000000547151732703400024453 0ustar00�

R`i����dxZZdxZZy)z3.8.1)���N)�__version__�version�__version_tuple__�
version_tuple����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/version.py�<module>rs�� ���g�$-�-��Mr
python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc000064400000031370151732703400024456 0ustar00�

R`ie%����dZddlmZddlZddlZddlZddlmZddlm	Z	ddl
mZe	rddlm
Z
Gd	�d
e�Zdd�Zdd�Zdd
�Zdd�Zdd�Zed��e��Zd
gZy)zWindows.�)�annotationsN)�	lru_cache)�
TYPE_CHECKING�)�PlatformDirsABC)�Callablec��eZdZdZedd��Zdd�dd�Zedd��Zedd��Zedd��Z	edd	��Z
edd
��Zedd��Zedd��Z
edd
��Zedd��Zedd��Zedd��Zedd��Zedd��Zy)�Windowsa
    `MSDN on where to store app data files
    <http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120>`_.
    Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `roaming <platformdirs.api.PlatformDirsABC.roaming>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    c��|jrdnd}tjjt	|��}|j|�S)z�
        :return: data directory tied to the user, e.g.
         ``%USERPROFILE%\AppData\Local\$appauthor\$appname`` (not roaming) or
         ``%USERPROFILE%\AppData\Roaming\$appauthor\$appname`` (roaming)
        �
CSIDL_APPDATA�CSIDL_LOCAL_APPDATA)�roaming�os�path�normpath�get_win_folder�
_append_parts)�self�constrs   ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/windows.py�
user_data_dirzWindows.user_data_dirs<��$(�<�<��5J���w�w����u� 5�6���!�!�$�'�'�N��
opinion_valuec��g}|jr�|jdur+|jxs|j}|j|�|j|j�|�|jr|j|�|jr|j|j�tjj|g|���}|j|�|S)NF)	�appname�	appauthor�append�opinion�versionrr�join�_optionally_create_directory)rrr�params�authors     rrzWindows._append_parts(s������<�<��~�~�U�*����7�4�<�<���
�
�f�%��M�M�$�,�,�'��(�T�\�\��
�
�m�,��|�|��
�
�d�l�l�+��w�w�|�|�D�*�6�*���)�)�$�/��rc�t�tjjtd��}|j	|�S)zT:return: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``�CSIDL_COMMON_APPDATA�rrrrr�rrs  r�
site_data_dirzWindows.site_data_dir7s/���w�w����/E� F�G���!�!�$�'�'rc��|jS)zC:return: config directory tied to the user, same as `user_data_dir`�r�rs r�user_config_dirzWindows.user_config_dir=����!�!�!rc��|jS)zF:return: config directory shared by the users, same as `site_data_dir`)r)r,s r�site_config_dirzWindows.site_config_dirBr.rc�x�tjjtd��}|j	|d��S)z�
        :return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
         ``%USERPROFILE%\AppData\Local\$appauthor\$appname\Cache\$version``
        r
�Cacherr'r(s  r�user_cache_dirzWindows.user_cache_dirGs4���w�w����/D� E�F���!�!�$�g�!�>�>rc�x�tjjtd��}|j	|d��S)zd:return: cache directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname\Cache\$version``r&r2rr'r(s  r�site_cache_dirzWindows.site_cache_dirPs4���w�w����/E� F�G���!�!�$�g�!�>�>rc��|jS)zB:return: state directory tied to the user, same as `user_data_dir`r+r,s r�user_state_dirzWindows.user_state_dirVr.rc��|j}|jr1tjj	|d�}|j|�|S)zg:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it�Logs)rrrrr!r"r(s  r�user_log_dirzWindows.user_log_dir[s=���!�!���<�<��7�7�<�<��f�-�D��-�-�d�3��rc�R�tjjtd��S)zN:return: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``�CSIDL_PERSONAL�rrrrr,s r�user_documents_dirzWindows.user_documents_dirds���w�w����/?� @�A�Arc�R�tjjtd��S)zN:return: downloads directory tied to the user e.g. ``%USERPROFILE%\Downloads``�CSIDL_DOWNLOADSr=r,s r�user_downloads_dirzWindows.user_downloads_diris���w�w����/@� A�B�Brc�R�tjjtd��S)zL:return: pictures directory tied to the user e.g. ``%USERPROFILE%\Pictures``�CSIDL_MYPICTURESr=r,s r�user_pictures_dirzWindows.user_pictures_dirns���w�w����/A� B�C�Crc�R�tjjtd��S)zH:return: videos directory tied to the user e.g. ``%USERPROFILE%\Videos``�
CSIDL_MYVIDEOr=r,s r�user_videos_dirzWindows.user_videos_dirs����w�w����� ?�@�@rc�R�tjjtd��S)zF:return: music directory tied to the user e.g. ``%USERPROFILE%\Music``�
CSIDL_MYMUSICr=r,s r�user_music_dirzWindows.user_music_dirxrHrc��tjjtjjt	d�d��}|j|�S)z�
        :return: runtime directory tied to the user, e.g.
         ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``
        r
�Temp)rrrr!rrr(s  r�user_runtime_dirzWindows.user_runtime_dir}s?���w�w��������^�<Q�-R�TZ� [�\���!�!�$�'�'r)�return�str)rrPr�
str | NonerOrP)�__name__�
__module__�__qualname__�__doc__�propertyrrr)r-r0r3r5r7r:r>rArDrGrKrN�rrr
r
s5��
��(��(�GK�
��(��(�
�"��"��"��"��?��?��?��?�
�"��"������B��B��C��C��D��D��A��A��A��A��(��(rr
c���t|�}|�|Sdddd�j|�}|�d|��}t|��tjj|�}|�d|��}t|��|S)z&Get folder from environment variables.�APPDATA�ALLUSERSPROFILE�LOCALAPPDATA)rr&r
�Unknown CSIDL name: zUnset environment variable: )�(get_win_folder_if_csidl_name_not_env_var�get�
ValueErrorr�environ)�
csidl_name�result�env_var_name�msgs    r�get_win_folder_from_env_varsre�s���
5�j�
A�F�
���
�#� 1�-��
�c�*�o�	�
��$�Z�L�1����o��
�Z�Z�^�^�L�
)�F�
�~�,�\�N�;����o���Mrc�B�|dk(rNtjjtjjtjd�d�S|dk(rNtjjtjjtjd�d�S|dk(rNtjjtjjtjd�d�S|dk(rNtjjtjjtjd�d	�S|d
k(rNtjjtjjtjd�d�Sy)
zKGet folder for a CSIDL name that does not exist as an environment variable.r<�USERPROFILE�	Documentsr@�	DownloadsrC�PicturesrF�VideosrJ�MusicN)rrr!rr`)ras rr]r]�s���%�%��w�w�|�|�B�G�G�,�,�R�Z�Z�
�-F�G��U�U��&�&��w�w�|�|�B�G�G�,�,�R�Z�Z�
�-F�G��U�U��'�'��w�w�|�|�B�G�G�,�,�R�Z�Z�
�-F�G��T�T��_�$��w�w�|�|�B�G�G�,�,�R�Z�Z�
�-F�G��R�R��_�$��w�w�|�|�B�G�G�,�,�R�Z�Z�
�-F�G��Q�Q�rc	��ddddddddd	�j|�}|�d|��}t|��tjdk7rt�d
d
l}|j
|jd�}|j||�\}}t|�S)z�
    Get folder from the registry.

    This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
    for all CSIDL_* names.
    �AppDatazCommon AppDataz
Local AppData�Personalz&{374DE290-123F-4565-9164-39C4925E467B}zMy PictureszMy VideozMy Music)rr&r
r<r@rCrFrJNr\�win32rz@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)
r^r_�sys�platform�NotImplementedError�winreg�OpenKey�HKEY_CURRENT_USER�QueryValueExrP)ra�shell_folder_namerdrt�key�	directory�_s       r�get_win_folder_from_registryr|�s���#� 0�.�$�C�)�#�#�	�
�c�*�o��� �$�Z�L�1����o��
�|�|�w��!�!��
�.�.��1�1�3v�
w�C��&�&�s�,=�>�L�I�q��y�>�rc	��ddddddddd	�j|�}|�d|��}t|��tjd�}t	td
�}|j
j
d
|d
d|�td�|D��r>tjd�}|jj|j|d�r|}|dk(r*tjj|jd�S|jS)zGet folder with ctypes.��#���'��
�()rr&r
r<rCrFrJr@Nr\i�windllrc3�8K�|]}t|�dkD���y�w)�N)�ord)�.0�cs  r�	<genexpr>z,get_win_folder_via_ctypes.<locals>.<genexpr>�s����
%��A�3�q�6�C�<��s�r@ri)r^r_�ctypes�create_unicode_buffer�getattr�shell32�SHGetFolderPathW�any�kernel32�GetShortPathNameW�valuerrr!)ra�csidl_constrd�bufr��buf2s      r�get_win_folder_via_ctypesr��s���� "�!������	�
�c�*�o����$�Z�L�1����o��
�
&�
&�t�
,�C�
�V�X�
&�F�
�N�N�#�#�D�+�t�Q��D��
%��
%�%��+�+�D�1���?�?�,�,�S�Y�Y��d�C��C��&�&��w�w�|�|�C�I�I�{�3�3��9�9�rc�n�ttd�rtS	ddl}tS#t
$r	tcYSwxYw)Nr�r)�hasattrr�r�rtr|�ImportErrorre)rts r�_pick_get_win_folderr��s9���v�x� �(�(�,��,�+���,�+�+�,�s�"�4�4)�maxsize)rarPrOrP)rarPrOrQ)rOzCallable[[str], str])rU�
__future__rr�rrq�	functoolsr�typingr�apir�collections.abcrr
rer]r|r�r�r�__all__rWrr�<module>r�so���"�
�	�
�� � ��(�t(�o�t(�n�*�&�:!�H,�)��4�(�)=�)?�@����rpython3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc000064400000003666151732703410024514 0ustar00�

R`i���J�dZddlmZddlmZmZdZdd�Zedk(re�yy)	zMain entry point.�)�annotations)�PlatformDirs�__version__)�
user_data_dir�user_config_dir�user_cache_dir�user_state_dir�user_log_dir�user_documents_dir�user_downloads_dir�user_pictures_dir�user_videos_dir�user_music_dir�user_runtime_dir�
site_data_dir�site_config_dir�site_cache_dirc	��d}d}tdt�d��td�t||d��}tD]}t|�dt	||�����td	�t||�}tD]}t|�dt	||�����td
�t|�}tD]}t|�dt	||�����td�t|d�
�}tD]}t|�dt	||�����y)zRun main entry point.�MyApp�	MyCompanyz-- platformdirs z --z%-- app dirs (with optional 'version')z1.0)�versionz: z)
-- app dirs (without optional 'version')z+
-- app dirs (without optional 'appauthor')z(
-- app dirs (with disabled 'appauthor')F)�	appauthorN)�printrr�PROPS�getattr)�app_name�
app_author�dirs�props    ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py�mainr!s���H��J�	��[�M��
-�.�	�
1�2���*�e�<�D���
���b���t�,�-�.�/��
�
6�7���*�-�D���
���b���t�,�-�.�/��
�
8�9���!�D���
���b���t�,�-�.�/��
�
5�6���E�2�D���
���b���t�,�-�.�/���__main__N)�return�None)	�__doc__�
__future__r�pip._vendor.platformdirsrrrr!�__name__�r"r �<module>r+s.���"�>�	��$0�8�z���F�r"python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc000064400000022770151732703410023542 0ustar00�

R`i����dZddlmZddlZddlmZmZddlmZddl	m
Z
e
r ddlZejdk\rddl	m
Z
nddlm
Z
Gd	�d
e�Zy)z	Base API.�)�annotationsN)�ABC�abstractmethod)�Path)�
TYPE_CHECKING)��)�Literalc���eZdZdZ							d"															d#d�Zd$d�Zd%d�Zeed&d���Z	eed&d���Z
eed&d���Zeed&d	���Zeed&d
���Z
eed&d���Zeed&d���Zeed&d
���Zeed&d���Zeed&d���Zeed&d���Zeed&d���Zeed&d���Zeed&d���Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Z ed'd��Z!ed'd��Z"ed'd ��Z#ed'd!��Z$y)(�PlatformDirsABCz-Abstract base class for platform directories.Nc�n�||_||_	||_	||_	||_	||_||_y)aX
        Create a new platform directory.

        :param appname: See `appname`.
        :param appauthor: See `appauthor`.
        :param version: See `version`.
        :param roaming: See `roaming`.
        :param multipath: See `multipath`.
        :param opinion: See `opinion`.
        :param ensure_exists: See `ensure_exists`.
        N)�appname�	appauthor�version�roaming�	multipath�opinion�
ensure_exists)�selfrrrrrrrs        ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py�__init__zPlatformDirsABC.__init__sW��*���"���	����	����	�
#���	����*���	�c�&�t|dd�}|jrB|j|j�|jr|j|j�t	j
j|dg|���}|j|�|S)N�r)�listr�appendr�os�path�join�_optionally_create_directory)r�base�paramsrs    r�_append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_versionGsm���d�1�2�h����<�<��M�M�$�,�,�'��|�|��
�
�d�l�l�+��w�w�|�|�D��G�-�f�-���)�)�$�/��rc�V�|jrt|�jdd��yy)NT)�parents�exist_ok)rr�mkdir)rrs  rr z,PlatformDirsABC._optionally_create_directoryQs'�������J���T�D��9�rc��y)z(:return: data directory tied to the userN��rs r�
user_data_dirzPlatformDirsABC.user_data_dirU��rc��y)z':return: data directory shared by usersNr)r*s r�
site_data_dirzPlatformDirsABC.site_data_dirZr,rc��y)z*:return: config directory tied to the userNr)r*s r�user_config_dirzPlatformDirsABC.user_config_dir_r,rc��y)z-:return: config directory shared by the usersNr)r*s r�site_config_dirzPlatformDirsABC.site_config_dirdr,rc��y)z):return: cache directory tied to the userNr)r*s r�user_cache_dirzPlatformDirsABC.user_cache_dirir,rc��y)z(:return: cache directory shared by usersNr)r*s r�site_cache_dirzPlatformDirsABC.site_cache_dirnr,rc��y)z):return: state directory tied to the userNr)r*s r�user_state_dirzPlatformDirsABC.user_state_dirsr,rc��y)z':return: log directory tied to the userNr)r*s r�user_log_dirzPlatformDirsABC.user_log_dirxr,rc��y)z-:return: documents directory tied to the userNr)r*s r�user_documents_dirz"PlatformDirsABC.user_documents_dir}r,rc��y)z-:return: downloads directory tied to the userNr)r*s r�user_downloads_dirz"PlatformDirsABC.user_downloads_dir�r,rc��y)z,:return: pictures directory tied to the userNr)r*s r�user_pictures_dirz!PlatformDirsABC.user_pictures_dir�r,rc��y)z*:return: videos directory tied to the userNr)r*s r�user_videos_dirzPlatformDirsABC.user_videos_dir�r,rc��y)z):return: music directory tied to the userNr)r*s r�user_music_dirzPlatformDirsABC.user_music_dir�r,rc��y)z+:return: runtime directory tied to the userNr)r*s r�user_runtime_dirz PlatformDirsABC.user_runtime_dir�r,rc�,�t|j�S)z#:return: data path tied to the user)rr+r*s r�user_data_pathzPlatformDirsABC.user_data_path�����D�&�&�'�'rc�,�t|j�S)z":return: data path shared by users)rr.r*s r�site_data_pathzPlatformDirsABC.site_data_path�rIrc�,�t|j�S)z%:return: config path tied to the user)rr0r*s r�user_config_pathz PlatformDirsABC.user_config_path�����D�(�(�)�)rc�,�t|j�S)z(:return: config path shared by the users)rr2r*s r�site_config_pathz PlatformDirsABC.site_config_path�rNrc�,�t|j�S)z$:return: cache path tied to the user)rr4r*s r�user_cache_pathzPlatformDirsABC.user_cache_path�����D�'�'�(�(rc�,�t|j�S)z#:return: cache path shared by users)rr6r*s r�site_cache_pathzPlatformDirsABC.site_cache_path�rSrc�,�t|j�S)z$:return: state path tied to the user)rr8r*s r�user_state_pathzPlatformDirsABC.user_state_path�rSrc�,�t|j�S)z":return: log path tied to the user)rr:r*s r�
user_log_pathzPlatformDirsABC.user_log_path�s���D�%�%�&�&rc�,�t|j�S)z(:return: documents path tied to the user)rr<r*s r�user_documents_pathz#PlatformDirsABC.user_documents_path�����D�+�+�,�,rc�,�t|j�S)z(:return: downloads path tied to the user)rr>r*s r�user_downloads_pathz#PlatformDirsABC.user_downloads_path�r\rc�,�t|j�S)z':return: pictures path tied to the user)rr@r*s r�user_pictures_pathz"PlatformDirsABC.user_pictures_path�s���D�*�*�+�+rc�,�t|j�S)z%:return: videos path tied to the user)rrBr*s r�user_videos_pathz PlatformDirsABC.user_videos_path�rNrc�,�t|j�S)z$:return: music path tied to the user)rrDr*s r�user_music_pathzPlatformDirsABC.user_music_path�rSrc�,�t|j�S)z&:return: runtime path tied to the user)rrFr*s r�user_runtime_pathz!PlatformDirsABC.user_runtime_path�s���D�)�)�*�*r)NNNFFTF)r�
str | Nonerzstr | None | Literal[False]rrgr�boolrrhrrhrrh�return�None)r!�strrirk)rrkrirj)rirk)rir)%�__name__�
__module__�__qualname__�__doc__rr#r �propertyrr+r.r0r2r4r6r8r:r<r>r@rBrDrFrHrKrMrPrRrUrWrYr[r^r`rbrdrfr)rrrrs��7�#�15�"����#�0��0�/�0��	0�
�0��
0��0��0�
�0�d�:���7���7���6���6���9���9���<���<���8���8���7���7���8���8���6���6���<���<���<���<���;���;���9���9���8���8���:���:��(��(��(��(��*��*��*��*��)��)��)��)��)��)��'��'��-��-��-��-��,��,��*��*��)��)��+��+rr)ro�
__future__rr�abcrr�pathlibr�typingr�sys�version_infor
�pip._vendor.typing_extensionsrr)rr�<module>rxs?���"�	�#�� ���
���6�!�"�9�M+�c�M+rpython3.12/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc000064400000013065151732703410024070 0ustar00�

R`i^��D�dZddlmZddlZddlmZGd�de�ZdgZy)zmacOS.�)�annotationsN�)�PlatformDirsABCc��eZdZdZedd��Zedd��Zedd��Zedd��Zedd��Z	edd��Z
edd��Zedd	��Zedd
��Z
edd��Zedd��Zedd
��Zedd��Zedd��Zy)�MacOSa�
    Platform directories for the macOS operating system. Follows the guidance from `Apple documentation
    <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
    Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    c�^�|jtjjd��S)zb:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``z~/Library/Application Support��_append_app_name_and_version�os�path�
expanduser��selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py�
user_data_dirzMacOS.user_data_dirs%���0�0����1C�1C�Dc�1d�e�e�c�$�|jd�S)z`:return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``z/Library/Application Support�r
rs r�
site_data_dirzMacOS.site_data_dirs���0�0�1O�P�Prc��|jS)zC:return: config directory tied to the user, same as `user_data_dir`�rrs r�user_config_dirzMacOS.user_config_dir����!�!�!rc��|jS)zF:return: config directory shared by the users, same as `site_data_dir`)rrs r�site_config_dirzMacOS.site_config_dir!rrc�^�|jtjjd��S)zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesr	rs r�user_cache_dirzMacOS.user_cache_dir&s%���0�0����1C�1C�DV�1W�X�Xrc�$�|jd�S)zT:return: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``z/Library/Cachesrrs r�site_cache_dirzMacOS.site_cache_dir+s���0�0�1B�C�Crc��|jS)zB:return: state directory tied to the user, same as `user_data_dir`rrs r�user_state_dirzMacOS.user_state_dir0rrc�^�|jtjjd��S)zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsr	rs r�user_log_dirzMacOS.user_log_dir5s%���0�0����1C�1C�DT�1U�V�Vrc�@�tjjd�S)zC:return: documents directory tied to the user, e.g. ``~/Documents``z~/Documents�rrr
rs r�user_documents_dirzMacOS.user_documents_dir:����w�w�!�!�-�0�0rc�@�tjjd�S)zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z~/Downloadsr%rs r�user_downloads_dirzMacOS.user_downloads_dir?r'rc�@�tjjd�S)zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z
~/Picturesr%rs r�user_pictures_dirzMacOS.user_pictures_dirDs���w�w�!�!�,�/�/rc�@�tjjd�S)z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr%rs r�user_videos_dirzMacOS.user_videos_dirIs���w�w�!�!�*�-�-rc�@�tjjd�S)z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr%rs r�user_music_dirzMacOS.user_music_dirNs���w�w�!�!�)�,�,rc�^�|jtjjd��S)zg:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``z~/Library/Caches/TemporaryItemsr	rs r�user_runtime_dirzMacOS.user_runtime_dirSs%���0�0����1C�1C�De�1f�g�grN)�return�str)�__name__�
__module__�__qualname__�__doc__�propertyrrrrrrr!r#r&r)r+r-r/r1�rrrr	s+����f��f��Q��Q��"��"��"��"��Y��Y��D��D��"��"��W��W��1��1��1��1��0��0��.��.��-��-��h��hrr)	r7�
__future__r�os.pathr�apirr�__all__r9rr�<module>r>s.���"�� �Mh�O�Mh�b��rpython3.12/site-packages/pip/_vendor/platformdirs/__main__.py000064400000002704151732703410020143 0ustar00"""Main entry point."""
from __future__ import annotations

from pip._vendor.platformdirs import PlatformDirs, __version__

PROPS = (
    "user_data_dir",
    "user_config_dir",
    "user_cache_dir",
    "user_state_dir",
    "user_log_dir",
    "user_documents_dir",
    "user_downloads_dir",
    "user_pictures_dir",
    "user_videos_dir",
    "user_music_dir",
    "user_runtime_dir",
    "site_data_dir",
    "site_config_dir",
    "site_cache_dir",
)


def main() -> None:
    """Run main entry point."""
    app_name = "MyApp"
    app_author = "MyCompany"

    print(f"-- platformdirs {__version__} --")  # noqa: T201

    print("-- app dirs (with optional 'version')")  # noqa: T201
    dirs = PlatformDirs(app_name, app_author, version="1.0")
    for prop in PROPS:
        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201

    print("\n-- app dirs (without optional 'version')")  # noqa: T201
    dirs = PlatformDirs(app_name, app_author)
    for prop in PROPS:
        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201

    print("\n-- app dirs (without optional 'appauthor')")  # noqa: T201
    dirs = PlatformDirs(app_name)
    for prop in PROPS:
        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201

    print("\n-- app dirs (with disabled 'appauthor')")  # noqa: T201
    dirs = PlatformDirs(app_name, appauthor=False)
    for prop in PROPS:
        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201


if __name__ == "__main__":
    main()
python3.12/site-packages/pip/_vendor/platformdirs/android.py000064400000016053151732703410020045 0ustar00"""Android."""
from __future__ import annotations

import os
import re
import sys
from functools import lru_cache
from typing import cast

from .api import PlatformDirsABC


class Android(PlatformDirsABC):
    """
    Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    """

    @property
    def user_data_dir(self) -> str:
        """:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``"""
        return self._append_app_name_and_version(cast(str, _android_folder()), "files")

    @property
    def site_data_dir(self) -> str:
        """:return: data directory shared by users, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def user_config_dir(self) -> str:
        """
        :return: config directory tied to the user, e.g. \
        ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
        """
        return self._append_app_name_and_version(cast(str, _android_folder()), "shared_prefs")

    @property
    def site_config_dir(self) -> str:
        """:return: config directory shared by the users, same as `user_config_dir`"""
        return self.user_config_dir

    @property
    def user_cache_dir(self) -> str:
        """:return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``"""
        return self._append_app_name_and_version(cast(str, _android_folder()), "cache")

    @property
    def site_cache_dir(self) -> str:
        """:return: cache directory shared by users, same as `user_cache_dir`"""
        return self.user_cache_dir

    @property
    def user_state_dir(self) -> str:
        """:return: state directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def user_log_dir(self) -> str:
        """
        :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
          e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``
        """
        path = self.user_cache_dir
        if self.opinion:
            path = os.path.join(path, "log")  # noqa: PTH118
        return path

    @property
    def user_documents_dir(self) -> str:
        """:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``"""
        return _android_documents_folder()

    @property
    def user_downloads_dir(self) -> str:
        """:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``"""
        return _android_downloads_folder()

    @property
    def user_pictures_dir(self) -> str:
        """:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``"""
        return _android_pictures_folder()

    @property
    def user_videos_dir(self) -> str:
        """:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``"""
        return _android_videos_folder()

    @property
    def user_music_dir(self) -> str:
        """:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``"""
        return _android_music_folder()

    @property
    def user_runtime_dir(self) -> str:
        """
        :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
          e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``
        """
        path = self.user_cache_dir
        if self.opinion:
            path = os.path.join(path, "tmp")  # noqa: PTH118
        return path


@lru_cache(maxsize=1)
def _android_folder() -> str | None:
    """:return: base folder for the Android OS or None if it cannot be found"""
    try:
        # First try to get path to android app via pyjnius
        from jnius import autoclass

        context = autoclass("android.content.Context")
        result: str | None = context.getFilesDir().getParentFile().getAbsolutePath()
    except Exception:  # noqa: BLE001
        # if fails find an android folder looking path on the sys.path
        pattern = re.compile(r"/data/(data|user/\d+)/(.+)/files")
        for path in sys.path:
            if pattern.match(path):
                result = path.split("/files")[0]
                break
        else:
            result = None
    return result


@lru_cache(maxsize=1)
def _android_documents_folder() -> str:
    """:return: documents folder for the Android OS"""
    # Get directories with pyjnius
    try:
        from jnius import autoclass

        context = autoclass("android.content.Context")
        environment = autoclass("android.os.Environment")
        documents_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DOCUMENTS).getAbsolutePath()
    except Exception:  # noqa: BLE001
        documents_dir = "/storage/emulated/0/Documents"

    return documents_dir


@lru_cache(maxsize=1)
def _android_downloads_folder() -> str:
    """:return: downloads folder for the Android OS"""
    # Get directories with pyjnius
    try:
        from jnius import autoclass

        context = autoclass("android.content.Context")
        environment = autoclass("android.os.Environment")
        downloads_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DOWNLOADS).getAbsolutePath()
    except Exception:  # noqa: BLE001
        downloads_dir = "/storage/emulated/0/Downloads"

    return downloads_dir


@lru_cache(maxsize=1)
def _android_pictures_folder() -> str:
    """:return: pictures folder for the Android OS"""
    # Get directories with pyjnius
    try:
        from jnius import autoclass

        context = autoclass("android.content.Context")
        environment = autoclass("android.os.Environment")
        pictures_dir: str = context.getExternalFilesDir(environment.DIRECTORY_PICTURES).getAbsolutePath()
    except Exception:  # noqa: BLE001
        pictures_dir = "/storage/emulated/0/Pictures"

    return pictures_dir


@lru_cache(maxsize=1)
def _android_videos_folder() -> str:
    """:return: videos folder for the Android OS"""
    # Get directories with pyjnius
    try:
        from jnius import autoclass

        context = autoclass("android.content.Context")
        environment = autoclass("android.os.Environment")
        videos_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DCIM).getAbsolutePath()
    except Exception:  # noqa: BLE001
        videos_dir = "/storage/emulated/0/DCIM/Camera"

    return videos_dir


@lru_cache(maxsize=1)
def _android_music_folder() -> str:
    """:return: music folder for the Android OS"""
    # Get directories with pyjnius
    try:
        from jnius import autoclass

        context = autoclass("android.content.Context")
        environment = autoclass("android.os.Environment")
        music_dir: str = context.getExternalFilesDir(environment.DIRECTORY_MUSIC).getAbsolutePath()
    except Exception:  # noqa: BLE001
        music_dir = "/storage/emulated/0/Music"

    return music_dir


__all__ = [
    "Android",
]
python3.12/site-packages/pip/_vendor/platformdirs/api.py000064400000015734151732703420017204 0ustar00"""Base API."""
from __future__ import annotations

import os
from abc import ABC, abstractmethod
from pathlib import Path
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    import sys

    if sys.version_info >= (3, 8):  # pragma: no cover (py38+)
        from typing import Literal
    else:  # pragma: no cover (py38+)
        from pip._vendor.typing_extensions import Literal


class PlatformDirsABC(ABC):
    """Abstract base class for platform directories."""

    def __init__(  # noqa: PLR0913
        self,
        appname: str | None = None,
        appauthor: str | None | Literal[False] = None,
        version: str | None = None,
        roaming: bool = False,  # noqa: FBT001, FBT002
        multipath: bool = False,  # noqa: FBT001, FBT002
        opinion: bool = True,  # noqa: FBT001, FBT002
        ensure_exists: bool = False,  # noqa: FBT001, FBT002
    ) -> None:
        """
        Create a new platform directory.

        :param appname: See `appname`.
        :param appauthor: See `appauthor`.
        :param version: See `version`.
        :param roaming: See `roaming`.
        :param multipath: See `multipath`.
        :param opinion: See `opinion`.
        :param ensure_exists: See `ensure_exists`.
        """
        self.appname = appname  #: The name of application.
        self.appauthor = appauthor
        """
        The name of the app author or distributing body for this application. Typically, it is the owning company name.
        Defaults to `appname`. You may pass ``False`` to disable it.
        """
        self.version = version
        """
        An optional version path element to append to the path. You might want to use this if you want multiple versions
        of your app to be able to run independently. If used, this would typically be ``<major>.<minor>``.
        """
        self.roaming = roaming
        """
        Whether to use the roaming appdata directory on Windows. That means that for users on a Windows network setup
        for roaming profiles, this user data will be synced on login (see
        `here <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>`_).
        """
        self.multipath = multipath
        """
        An optional parameter only applicable to Unix/Linux which indicates that the entire list of data dirs should be
        returned. By default, the first item would only be returned.
        """
        self.opinion = opinion  #: A flag to indicating to use opinionated values.
        self.ensure_exists = ensure_exists
        """
        Optionally create the directory (and any missing parents) upon access if it does not exist.
        By default, no directories are created.
        """

    def _append_app_name_and_version(self, *base: str) -> str:
        params = list(base[1:])
        if self.appname:
            params.append(self.appname)
            if self.version:
                params.append(self.version)
        path = os.path.join(base[0], *params)  # noqa: PTH118
        self._optionally_create_directory(path)
        return path

    def _optionally_create_directory(self, path: str) -> None:
        if self.ensure_exists:
            Path(path).mkdir(parents=True, exist_ok=True)

    @property
    @abstractmethod
    def user_data_dir(self) -> str:
        """:return: data directory tied to the user"""

    @property
    @abstractmethod
    def site_data_dir(self) -> str:
        """:return: data directory shared by users"""

    @property
    @abstractmethod
    def user_config_dir(self) -> str:
        """:return: config directory tied to the user"""

    @property
    @abstractmethod
    def site_config_dir(self) -> str:
        """:return: config directory shared by the users"""

    @property
    @abstractmethod
    def user_cache_dir(self) -> str:
        """:return: cache directory tied to the user"""

    @property
    @abstractmethod
    def site_cache_dir(self) -> str:
        """:return: cache directory shared by users"""

    @property
    @abstractmethod
    def user_state_dir(self) -> str:
        """:return: state directory tied to the user"""

    @property
    @abstractmethod
    def user_log_dir(self) -> str:
        """:return: log directory tied to the user"""

    @property
    @abstractmethod
    def user_documents_dir(self) -> str:
        """:return: documents directory tied to the user"""

    @property
    @abstractmethod
    def user_downloads_dir(self) -> str:
        """:return: downloads directory tied to the user"""

    @property
    @abstractmethod
    def user_pictures_dir(self) -> str:
        """:return: pictures directory tied to the user"""

    @property
    @abstractmethod
    def user_videos_dir(self) -> str:
        """:return: videos directory tied to the user"""

    @property
    @abstractmethod
    def user_music_dir(self) -> str:
        """:return: music directory tied to the user"""

    @property
    @abstractmethod
    def user_runtime_dir(self) -> str:
        """:return: runtime directory tied to the user"""

    @property
    def user_data_path(self) -> Path:
        """:return: data path tied to the user"""
        return Path(self.user_data_dir)

    @property
    def site_data_path(self) -> Path:
        """:return: data path shared by users"""
        return Path(self.site_data_dir)

    @property
    def user_config_path(self) -> Path:
        """:return: config path tied to the user"""
        return Path(self.user_config_dir)

    @property
    def site_config_path(self) -> Path:
        """:return: config path shared by the users"""
        return Path(self.site_config_dir)

    @property
    def user_cache_path(self) -> Path:
        """:return: cache path tied to the user"""
        return Path(self.user_cache_dir)

    @property
    def site_cache_path(self) -> Path:
        """:return: cache path shared by users"""
        return Path(self.site_cache_dir)

    @property
    def user_state_path(self) -> Path:
        """:return: state path tied to the user"""
        return Path(self.user_state_dir)

    @property
    def user_log_path(self) -> Path:
        """:return: log path tied to the user"""
        return Path(self.user_log_dir)

    @property
    def user_documents_path(self) -> Path:
        """:return: documents path tied to the user"""
        return Path(self.user_documents_dir)

    @property
    def user_downloads_path(self) -> Path:
        """:return: downloads path tied to the user"""
        return Path(self.user_downloads_dir)

    @property
    def user_pictures_path(self) -> Path:
        """:return: pictures path tied to the user"""
        return Path(self.user_pictures_dir)

    @property
    def user_videos_path(self) -> Path:
        """:return: videos path tied to the user"""
        return Path(self.user_videos_dir)

    @property
    def user_music_path(self) -> Path:
        """:return: music path tied to the user"""
        return Path(self.user_music_dir)

    @property
    def user_runtime_path(self) -> Path:
        """:return: runtime path tied to the user"""
        return Path(self.user_runtime_dir)
python3.12/site-packages/pip/_vendor/platformdirs/__init__.py000064400000047273151732703420020175 0ustar00"""
Utilities for determining application-specific dirs. See <https://github.com/platformdirs/platformdirs> for details and
usage.
"""
from __future__ import annotations

import os
import sys
from typing import TYPE_CHECKING

from .api import PlatformDirsABC
from .version import __version__
from .version import __version_tuple__ as __version_info__

if TYPE_CHECKING:
    from pathlib import Path

    if sys.version_info >= (3, 8):  # pragma: no cover (py38+)
        from typing import Literal
    else:  # pragma: no cover (py38+)
        from pip._vendor.typing_extensions import Literal


def _set_platform_dir_class() -> type[PlatformDirsABC]:
    if sys.platform == "win32":
        from pip._vendor.platformdirs.windows import Windows as Result
    elif sys.platform == "darwin":
        from pip._vendor.platformdirs.macos import MacOS as Result
    else:
        from pip._vendor.platformdirs.unix import Unix as Result

    if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system":
        if os.getenv("SHELL") or os.getenv("PREFIX"):
            return Result

        from pip._vendor.platformdirs.android import _android_folder

        if _android_folder() is not None:
            from pip._vendor.platformdirs.android import Android

            return Android  # return to avoid redefinition of result

    return Result


PlatformDirs = _set_platform_dir_class()  #: Currently active platform
AppDirs = PlatformDirs  #: Backwards compatibility with appdirs


def user_data_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: data directory tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        roaming=roaming,
        ensure_exists=ensure_exists,
    ).user_data_dir


def site_data_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    multipath: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: data directory shared by users
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        multipath=multipath,
        ensure_exists=ensure_exists,
    ).site_data_dir


def user_config_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: config directory tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        roaming=roaming,
        ensure_exists=ensure_exists,
    ).user_config_dir


def site_config_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    multipath: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: config directory shared by the users
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        multipath=multipath,
        ensure_exists=ensure_exists,
    ).site_config_dir


def user_cache_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: cache directory tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        opinion=opinion,
        ensure_exists=ensure_exists,
    ).user_cache_dir


def site_cache_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: cache directory tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        opinion=opinion,
        ensure_exists=ensure_exists,
    ).site_cache_dir


def user_state_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: state directory tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        roaming=roaming,
        ensure_exists=ensure_exists,
    ).user_state_dir


def user_log_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: log directory tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        opinion=opinion,
        ensure_exists=ensure_exists,
    ).user_log_dir


def user_documents_dir() -> str:
    """:returns: documents directory tied to the user"""
    return PlatformDirs().user_documents_dir


def user_downloads_dir() -> str:
    """:returns: downloads directory tied to the user"""
    return PlatformDirs().user_downloads_dir


def user_pictures_dir() -> str:
    """:returns: pictures directory tied to the user"""
    return PlatformDirs().user_pictures_dir


def user_videos_dir() -> str:
    """:returns: videos directory tied to the user"""
    return PlatformDirs().user_videos_dir


def user_music_dir() -> str:
    """:returns: music directory tied to the user"""
    return PlatformDirs().user_music_dir


def user_runtime_dir(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> str:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: runtime directory tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        opinion=opinion,
        ensure_exists=ensure_exists,
    ).user_runtime_dir


def user_data_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: data path tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        roaming=roaming,
        ensure_exists=ensure_exists,
    ).user_data_path


def site_data_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    multipath: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: data path shared by users
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        multipath=multipath,
        ensure_exists=ensure_exists,
    ).site_data_path


def user_config_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: config path tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        roaming=roaming,
        ensure_exists=ensure_exists,
    ).user_config_path


def site_config_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    multipath: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: config path shared by the users
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        multipath=multipath,
        ensure_exists=ensure_exists,
    ).site_config_path


def site_cache_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: cache directory tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        opinion=opinion,
        ensure_exists=ensure_exists,
    ).site_cache_path


def user_cache_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: cache path tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        opinion=opinion,
        ensure_exists=ensure_exists,
    ).user_cache_path


def user_state_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    roaming: bool = False,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: state path tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        roaming=roaming,
        ensure_exists=ensure_exists,
    ).user_state_path


def user_log_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: log path tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        opinion=opinion,
        ensure_exists=ensure_exists,
    ).user_log_path


def user_documents_path() -> Path:
    """:returns: documents path tied to the user"""
    return PlatformDirs().user_documents_path


def user_downloads_path() -> Path:
    """:returns: downloads path tied to the user"""
    return PlatformDirs().user_downloads_path


def user_pictures_path() -> Path:
    """:returns: pictures path tied to the user"""
    return PlatformDirs().user_pictures_path


def user_videos_path() -> Path:
    """:returns: videos path tied to the user"""
    return PlatformDirs().user_videos_path


def user_music_path() -> Path:
    """:returns: music path tied to the user"""
    return PlatformDirs().user_music_path


def user_runtime_path(
    appname: str | None = None,
    appauthor: str | None | Literal[False] = None,
    version: str | None = None,
    opinion: bool = True,  # noqa: FBT001, FBT002
    ensure_exists: bool = False,  # noqa: FBT001, FBT002
) -> Path:
    """
    :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
    :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
    :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
    :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    :returns: runtime path tied to the user
    """
    return PlatformDirs(
        appname=appname,
        appauthor=appauthor,
        version=version,
        opinion=opinion,
        ensure_exists=ensure_exists,
    ).user_runtime_path


__all__ = [
    "__version__",
    "__version_info__",
    "PlatformDirs",
    "AppDirs",
    "PlatformDirsABC",
    "user_data_dir",
    "user_config_dir",
    "user_cache_dir",
    "user_state_dir",
    "user_log_dir",
    "user_documents_dir",
    "user_downloads_dir",
    "user_pictures_dir",
    "user_videos_dir",
    "user_music_dir",
    "user_runtime_dir",
    "site_data_dir",
    "site_config_dir",
    "site_cache_dir",
    "user_data_path",
    "user_config_path",
    "user_cache_path",
    "user_state_path",
    "user_log_path",
    "user_documents_path",
    "user_downloads_path",
    "user_pictures_path",
    "user_videos_path",
    "user_music_path",
    "user_runtime_path",
    "site_data_path",
    "site_config_path",
    "site_cache_path",
]
python3.12/site-packages/pip/_vendor/platformdirs/macos.py000064400000007136151732703420017532 0ustar00"""macOS."""
from __future__ import annotations

import os.path

from .api import PlatformDirsABC


class MacOS(PlatformDirsABC):
    """
    Platform directories for the macOS operating system. Follows the guidance from `Apple documentation
    <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
    Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    """

    @property
    def user_data_dir(self) -> str:
        """:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Application Support"))  # noqa: PTH111

    @property
    def site_data_dir(self) -> str:
        """:return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``"""
        return self._append_app_name_and_version("/Library/Application Support")

    @property
    def user_config_dir(self) -> str:
        """:return: config directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def site_config_dir(self) -> str:
        """:return: config directory shared by the users, same as `site_data_dir`"""
        return self.site_data_dir

    @property
    def user_cache_dir(self) -> str:
        """:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches"))  # noqa: PTH111

    @property
    def site_cache_dir(self) -> str:
        """:return: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``"""
        return self._append_app_name_and_version("/Library/Caches")

    @property
    def user_state_dir(self) -> str:
        """:return: state directory tied to the user, same as `user_data_dir`"""
        return self.user_data_dir

    @property
    def user_log_dir(self) -> str:
        """:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Logs"))  # noqa: PTH111

    @property
    def user_documents_dir(self) -> str:
        """:return: documents directory tied to the user, e.g. ``~/Documents``"""
        return os.path.expanduser("~/Documents")  # noqa: PTH111

    @property
    def user_downloads_dir(self) -> str:
        """:return: downloads directory tied to the user, e.g. ``~/Downloads``"""
        return os.path.expanduser("~/Downloads")  # noqa: PTH111

    @property
    def user_pictures_dir(self) -> str:
        """:return: pictures directory tied to the user, e.g. ``~/Pictures``"""
        return os.path.expanduser("~/Pictures")  # noqa: PTH111

    @property
    def user_videos_dir(self) -> str:
        """:return: videos directory tied to the user, e.g. ``~/Movies``"""
        return os.path.expanduser("~/Movies")  # noqa: PTH111

    @property
    def user_music_dir(self) -> str:
        """:return: music directory tied to the user, e.g. ``~/Music``"""
        return os.path.expanduser("~/Music")  # noqa: PTH111

    @property
    def user_runtime_dir(self) -> str:
        """:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``"""
        return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches/TemporaryItems"))  # noqa: PTH111


__all__ = [
    "MacOS",
]
python3.12/site-packages/pip/_vendor/platformdirs/py.typed000064400000000000151732703420017534 0ustar00python3.12/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-312.pyc000064400000000556151732703420023446 0ustar00�

R`i^�� �ddlmZmZddgZdZy)�)�contents�whererrz
2023.07.22N)�corerr�__all__�__version__����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/certifi/__init__.py�<module>rs��!��w�
���r	python3.12/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-312.pyc000064400000002553151732703420022636 0ustar00�

R`i����dZddlZddlZddlZddlmZeejefZeedfZ			d
dede	deded	ef
d
�Z
d	efd�Zd	efd�Zy)ze
certifi.py
~~~~~~~~~~

This module returns the installation location of cacert.pem or its contents.
�N)�Unionzos.PathLike�package�resource�encoding�errors�returnc�x�tt�|��5}|j�cddd�S#1swYyxYw)N�r)�open�where�read)rrrr�datas     ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/certifi/core.py�	read_textrs'��
�e�g��	)�T��y�y�{�
*�	)�	)�s�0�9c��y)Nz /etc/pki/tls/certs/ca-bundle.crt�r�rrr s��-rc��tddd��S)Nzpip._vendor.certifiz
cacert.pem�asciir
)rrrr�contentsr#s���*�L�7�K�Kr)zutf-8�strict)
�__doc__�sys�os�types�typingr�
ModuleType�str�Package�Resourcerrrrrr�<module>r!s�����
���
�� � �#�%�
&����m�#�$����	�
������
�	�
	��.�s�.�L�#�Lrpython3.12/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-312.pyc000064400000001265151732703420023425 0ustar00�

R`i�����ddlZddlmZmZej�Zej
ddd��ej�Zejre	e��ye	e��y)�N)�contents�wherez-cz
--contents�
store_true)�action)
�argparse�pip._vendor.certifirr�ArgumentParser�parser�add_argument�
parse_args�args�print����/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/certifi/__main__.py�<module>rsX���/�	 ��	 �	 �	"�����D�,�|��<�
������=�=�	�(�*��	�%�'�Nrpython3.12/site-packages/pip/_vendor/certifi/__main__.py000064400000000377151732703420017067 0ustar00import argparse

from pip._vendor.certifi import contents, where

parser = argparse.ArgumentParser()
parser.add_argument("-c", "--contents", action="store_true")
args = parser.parse_args()

if args.contents:
    print(contents())
else:
    print(where())
python3.12/site-packages/pip/_vendor/certifi/__init__.py000064400000000136151732703430017100 0ustar00from .core import contents, where

__all__ = ["contents", "where"]
__version__ = "2023.07.22"
python3.12/site-packages/pip/_vendor/certifi/py.typed000064400000000000151732703430016454 0ustar00python3.12/site-packages/pip/_vendor/certifi/core.py000064400000001755151732703430016301 0ustar00"""
certifi.py
~~~~~~~~~~

This module returns the installation location of cacert.pem or its contents.
"""
import sys


import os
import types
from typing import Union

Package = Union[types.ModuleType, str]
Resource = Union[str, "os.PathLike"]

# This fallback will work for Python versions prior to 3.7 that lack the
# importlib.resources module but relies on the existing `where` function
# so won't address issues with environments like PyOxidizer that don't set
# __file__ on modules.
def read_text(
    package: Package,
    resource: Resource,
    encoding: str = 'utf-8',
    errors: str = 'strict'
) -> str:
    with open(where(), encoding=encoding) as data:
        return data.read()

# If we don't have importlib.resources, then we will just do the old logic
# of assuming we're on the filesystem and munge the path directly.
def where() -> str:
    return '/etc/pki/tls/certs/ca-bundle.crt'

def contents() -> str:
    return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii")
python3.12/site-packages/pip/_vendor/vendor.txt000064400000000755151732703430015407 0ustar00CacheControl==0.13.1  # Make sure to update the license in pyproject.toml for this.
colorama==0.4.6
distlib==0.3.6
distro==1.8.0
msgpack==1.0.5
packaging==21.3
platformdirs==3.8.1
pyparsing==3.1.0
pyproject-hooks==1.0.0
requests==2.31.0
    certifi==2023.7.22
    chardet==5.1.0
    idna==3.4
    urllib3==1.26.17
rich==13.4.2
    pygments==2.15.1
    typing_extensions==4.7.1
resolvelib==1.0.1
setuptools==68.0.0
six==1.16.0
tenacity==8.2.2
tomli==2.0.1
truststore==0.8.0
webencodings==0.5.1
python3.12/site-packages/pip/_vendor/pygments.pyi000064400000000026151732703430015731 0ustar00from pygments import *python3.12/site-packages/pip/__init__.py000064400000000545151732703430014023 0ustar00from typing import List, Optional

__version__ = "23.3.1"


def main(args: Optional[List[str]] = None) -> int:
    """This is an internal API only meant for use by pip's own console scripts.

    For additional details, see https://github.com/pypa/pip/issues/7498.
    """
    from pip._internal.utils.entrypoints import _wrapper

    return _wrapper(args)
python3.12/site-packages/pip/__pip-runner__.py000064400000002644151732703430015161 0ustar00"""Execute exactly this copy of pip, within a different environment.

This file is named as it is, to ensure that this module can't be imported via
an import statement.
"""

# /!\ This version compatibility check section must be Python 2 compatible. /!\

import sys

# Copied from setup.py
PYTHON_REQUIRES = (3, 7)


def version_str(version):  # type: ignore
    return ".".join(str(v) for v in version)


if sys.version_info[:2] < PYTHON_REQUIRES:
    raise SystemExit(
        "This version of pip does not support python {} (requires >={}).".format(
            version_str(sys.version_info[:2]), version_str(PYTHON_REQUIRES)
        )
    )

# From here on, we can use Python 3 features, but the syntax must remain
# Python 2 compatible.

import runpy  # noqa: E402
from importlib.machinery import PathFinder  # noqa: E402
from os.path import dirname  # noqa: E402

PIP_SOURCES_ROOT = dirname(dirname(__file__))


class PipImportRedirectingFinder:
    @classmethod
    def find_spec(self, fullname, path=None, target=None):  # type: ignore
        if fullname != "pip":
            return None

        spec = PathFinder.find_spec(fullname, [PIP_SOURCES_ROOT], target)
        assert spec, (PIP_SOURCES_ROOT, fullname)
        return spec


sys.meta_path.insert(0, PipImportRedirectingFinder())

assert __name__ == "__main__", "Cannot run __pip-runner__.py as a non-main module"
runpy.run_module("pip", run_name="__main__", alter_sys=True)
python3.12/site-packages/pip/py.typed000064400000000436151732703430013410 0ustar00pip is a command line program. While it is implemented in Python, and so is
available for import, you must not use pip's internal APIs in this way. Typing
information is provided as a convenience only and is not a guarantee. Expect
unannounced changes to the API and types in releases.
python3.12/site-packages/setuptools/errors.py000064400000005155151732703430015233 0ustar00"""setuptools.errors

Provides exceptions used by setuptools modules.
"""

from distutils import errors as _distutils_errors


# Re-export errors from distutils to facilitate the migration to PEP632

ByteCompileError = _distutils_errors.DistutilsByteCompileError
CCompilerError = _distutils_errors.CCompilerError
ClassError = _distutils_errors.DistutilsClassError
CompileError = _distutils_errors.CompileError
ExecError = _distutils_errors.DistutilsExecError
FileError = _distutils_errors.DistutilsFileError
InternalError = _distutils_errors.DistutilsInternalError
LibError = _distutils_errors.LibError
LinkError = _distutils_errors.LinkError
ModuleError = _distutils_errors.DistutilsModuleError
OptionError = _distutils_errors.DistutilsOptionError
PlatformError = _distutils_errors.DistutilsPlatformError
PreprocessError = _distutils_errors.PreprocessError
SetupError = _distutils_errors.DistutilsSetupError
TemplateError = _distutils_errors.DistutilsTemplateError
UnknownFileError = _distutils_errors.UnknownFileError

# The root error class in the hierarchy
BaseError = _distutils_errors.DistutilsError


class InvalidConfigError(OptionError):
    """Error used for invalid configurations."""


class RemovedConfigError(OptionError):
    """Error used for configurations that were deprecated and removed."""


class RemovedCommandError(BaseError, RuntimeError):
    """Error used for commands that have been removed in setuptools.

    Since ``setuptools`` is built on ``distutils``, simply removing a command
    from ``setuptools`` will make the behavior fall back to ``distutils``; this
    error is raised if a command exists in ``distutils`` but has been actively
    removed in ``setuptools``.
    """


class PackageDiscoveryError(BaseError, RuntimeError):
    """Impossible to perform automatic discovery of packages and/or modules.

    The current project layout or given discovery options can lead to problems when
    scanning the project directory.

    Setuptools might also refuse to complete auto-discovery if an error prone condition
    is detected (e.g. when a project is organised as a flat-layout but contains
    multiple directories that can be taken as top-level packages inside a single
    distribution [*]_). In these situations the users are encouraged to be explicit
    about which packages to include or to make the discovery parameters more specific.

    .. [*] Since multi-package distributions are uncommon it is very likely that the
       developers did not intend for all the directories to be packaged, and are just
       leaving auxiliary code in the repository top-level, such as maintenance-related
       scripts.
    """
python3.12/site-packages/setuptools/script (dev).tmpl000064400000000332151732703440016420 0ustar00# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
__requires__ = %(spec)r
__import__('pkg_resources').require(%(spec)r)
__file__ = %(dev_path)r
with open(__file__) as f:
    exec(compile(f.read(), __file__, 'exec'))
python3.12/site-packages/setuptools/version.py000064400000000241151732703440015374 0ustar00from ._importlib import metadata

try:
    __version__ = metadata.version('setuptools') or '0.dev0+unknown'
except Exception:
    __version__ = '0.dev0+unknown'
python3.12/site-packages/setuptools/msvc.py000064400000134476151732703440014701 0ustar00"""
Improved support for Microsoft Visual C++ compilers.

Known supported compilers:
--------------------------
Microsoft Visual C++ 14.X:
    Microsoft Visual C++ Build Tools 2015 (x86, x64, arm)
    Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64)
    Microsoft Visual Studio Build Tools 2019 (x86, x64, arm, arm64)

This may also support compilers shipped with compatible Visual Studio versions.
"""

import json
from io import open
from os import listdir, pathsep
from os.path import join, isfile, isdir, dirname
from subprocess import CalledProcessError
import contextlib
import platform
import itertools
import subprocess
import distutils.errors
from setuptools.extern.more_itertools import unique_everseen

if platform.system() == 'Windows':
    import winreg
    from os import environ
else:
    # Mock winreg and environ so the module can be imported on this platform.

    class winreg:
        HKEY_USERS = None
        HKEY_CURRENT_USER = None
        HKEY_LOCAL_MACHINE = None
        HKEY_CLASSES_ROOT = None

    environ = dict()


def _msvc14_find_vc2015():
    """Python 3.8 "distutils/_msvccompiler.py" backport"""
    try:
        key = winreg.OpenKey(
            winreg.HKEY_LOCAL_MACHINE,
            r"Software\Microsoft\VisualStudio\SxS\VC7",
            0,
            winreg.KEY_READ | winreg.KEY_WOW64_32KEY,
        )
    except OSError:
        return None, None

    best_version = 0
    best_dir = None
    with key:
        for i in itertools.count():
            try:
                v, vc_dir, vt = winreg.EnumValue(key, i)
            except OSError:
                break
            if v and vt == winreg.REG_SZ and isdir(vc_dir):
                try:
                    version = int(float(v))
                except (ValueError, TypeError):
                    continue
                if version >= 14 and version > best_version:
                    best_version, best_dir = version, vc_dir
    return best_version, best_dir


def _msvc14_find_vc2017():
    """Python 3.8 "distutils/_msvccompiler.py" backport

    Returns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    """
    root = environ.get("ProgramFiles(x86)") or environ.get("ProgramFiles")
    if not root:
        return None, None

    suitable_components = (
        "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
        "Microsoft.VisualStudio.Workload.WDExpress",
    )

    for component in suitable_components:
        # Workaround for `-requiresAny` (only available on VS 2017 > 15.6)
        with contextlib.suppress(CalledProcessError, OSError, UnicodeDecodeError):
            path = (
                subprocess.check_output(
                    [
                        join(
                            root, "Microsoft Visual Studio", "Installer", "vswhere.exe"
                        ),
                        "-latest",
                        "-prerelease",
                        "-requires",
                        component,
                        "-property",
                        "installationPath",
                        "-products",
                        "*",
                    ]
                )
                .decode(encoding="mbcs", errors="strict")
                .strip()
            )

            path = join(path, "VC", "Auxiliary", "Build")
            if isdir(path):
                return 15, path

    return None, None  # no suitable component found


PLAT_SPEC_TO_RUNTIME = {
    'x86': 'x86',
    'x86_amd64': 'x64',
    'x86_arm': 'arm',
    'x86_arm64': 'arm64',
}


def _msvc14_find_vcvarsall(plat_spec):
    """Python 3.8 "distutils/_msvccompiler.py" backport"""
    _, best_dir = _msvc14_find_vc2017()
    vcruntime = None

    if plat_spec in PLAT_SPEC_TO_RUNTIME:
        vcruntime_plat = PLAT_SPEC_TO_RUNTIME[plat_spec]
    else:
        vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86'

    if best_dir:
        vcredist = join(
            best_dir,
            "..",
            "..",
            "redist",
            "MSVC",
            "**",
            vcruntime_plat,
            "Microsoft.VC14*.CRT",
            "vcruntime140.dll",
        )
        try:
            import glob

            vcruntime = glob.glob(vcredist, recursive=True)[-1]
        except (ImportError, OSError, LookupError):
            vcruntime = None

    if not best_dir:
        best_version, best_dir = _msvc14_find_vc2015()
        if best_version:
            vcruntime = join(
                best_dir,
                'redist',
                vcruntime_plat,
                "Microsoft.VC140.CRT",
                "vcruntime140.dll",
            )

    if not best_dir:
        return None, None

    vcvarsall = join(best_dir, "vcvarsall.bat")
    if not isfile(vcvarsall):
        return None, None

    if not vcruntime or not isfile(vcruntime):
        vcruntime = None

    return vcvarsall, vcruntime


def _msvc14_get_vc_env(plat_spec):
    """Python 3.8 "distutils/_msvccompiler.py" backport"""
    if "DISTUTILS_USE_SDK" in environ:
        return {key.lower(): value for key, value in environ.items()}

    vcvarsall, vcruntime = _msvc14_find_vcvarsall(plat_spec)
    if not vcvarsall:
        raise distutils.errors.DistutilsPlatformError("Unable to find vcvarsall.bat")

    try:
        out = subprocess.check_output(
            'cmd /u /c "{}" {} && set'.format(vcvarsall, plat_spec),
            stderr=subprocess.STDOUT,
        ).decode('utf-16le', errors='replace')
    except subprocess.CalledProcessError as exc:
        raise distutils.errors.DistutilsPlatformError(
            "Error executing {}".format(exc.cmd)
        ) from exc

    env = {
        key.lower(): value
        for key, _, value in (line.partition('=') for line in out.splitlines())
        if key and value
    }

    if vcruntime:
        env['py_vcruntime_redist'] = vcruntime
    return env


def msvc14_get_vc_env(plat_spec):
    """
    Patched "distutils._msvccompiler._get_vc_env" for support extra
    Microsoft Visual C++ 14.X compilers.

    Set environment without use of "vcvarsall.bat".

    Parameters
    ----------
    plat_spec: str
        Target architecture.

    Return
    ------
    dict
        environment
    """

    # Always use backport from CPython 3.8
    try:
        return _msvc14_get_vc_env(plat_spec)
    except distutils.errors.DistutilsPlatformError as exc:
        _augment_exception(exc, 14.0)
        raise


def _augment_exception(exc, version, arch=''):
    """
    Add details to the exception message to help guide the user
    as to what action will resolve it.
    """
    # Error if MSVC++ directory not found or environment not set
    message = exc.args[0]

    if "vcvarsall" in message.lower() or "visual c" in message.lower():
        # Special error message if MSVC++ not installed
        tmpl = 'Microsoft Visual C++ {version:0.1f} or greater is required.'
        message = tmpl.format(**locals())
        msdownload = 'www.microsoft.com/download/details.aspx?id=%d'
        if version == 9.0:
            if arch.lower().find('ia64') > -1:
                # For VC++ 9.0, if IA64 support is needed, redirect user
                # to Windows SDK 7.0.
                # Note: No download link available from Microsoft.
                message += ' Get it with "Microsoft Windows SDK 7.0"'
            else:
                # For VC++ 9.0 redirect user to Vc++ for Python 2.7 :
                # This redirection link is maintained by Microsoft.
                # Contact vspython@microsoft.com if it needs updating.
                message += ' Get it from http://aka.ms/vcpython27'
        elif version == 10.0:
            # For VC++ 10.0 Redirect user to Windows SDK 7.1
            message += ' Get it with "Microsoft Windows SDK 7.1": '
            message += msdownload % 8279
        elif version >= 14.0:
            # For VC++ 14.X Redirect user to latest Visual C++ Build Tools
            message += (
                ' Get it with "Microsoft C++ Build Tools": '
                r'https://visualstudio.microsoft.com'
                r'/visual-cpp-build-tools/'
            )

    exc.args = (message,)


class PlatformInfo:
    """
    Current and Target Architectures information.

    Parameters
    ----------
    arch: str
        Target architecture.
    """

    current_cpu = environ.get('processor_architecture', '').lower()

    def __init__(self, arch):
        self.arch = arch.lower().replace('x64', 'amd64')

    @property
    def target_cpu(self):
        """
        Return Target CPU architecture.

        Return
        ------
        str
            Target CPU
        """
        return self.arch[self.arch.find('_') + 1 :]

    def target_is_x86(self):
        """
        Return True if target CPU is x86 32 bits..

        Return
        ------
        bool
            CPU is x86 32 bits
        """
        return self.target_cpu == 'x86'

    def current_is_x86(self):
        """
        Return True if current CPU is x86 32 bits..

        Return
        ------
        bool
            CPU is x86 32 bits
        """
        return self.current_cpu == 'x86'

    def current_dir(self, hidex86=False, x64=False):
        """
        Current platform specific subfolder.

        Parameters
        ----------
        hidex86: bool
            return '' and not '\x86' if architecture is x86.
        x64: bool
            return '\x64' and not '\amd64' if architecture is amd64.

        Return
        ------
        str
            subfolder: '\target', or '' (see hidex86 parameter)
        """
        return (
            ''
            if (self.current_cpu == 'x86' and hidex86)
            else r'\x64'
            if (self.current_cpu == 'amd64' and x64)
            else r'\%s' % self.current_cpu
        )

    def target_dir(self, hidex86=False, x64=False):
        r"""
        Target platform specific subfolder.

        Parameters
        ----------
        hidex86: bool
            return '' and not '\x86' if architecture is x86.
        x64: bool
            return '\x64' and not '\amd64' if architecture is amd64.

        Return
        ------
        str
            subfolder: '\current', or '' (see hidex86 parameter)
        """
        return (
            ''
            if (self.target_cpu == 'x86' and hidex86)
            else r'\x64'
            if (self.target_cpu == 'amd64' and x64)
            else r'\%s' % self.target_cpu
        )

    def cross_dir(self, forcex86=False):
        r"""
        Cross platform specific subfolder.

        Parameters
        ----------
        forcex86: bool
            Use 'x86' as current architecture even if current architecture is
            not x86.

        Return
        ------
        str
            subfolder: '' if target architecture is current architecture,
            '\current_target' if not.
        """
        current = 'x86' if forcex86 else self.current_cpu
        return (
            ''
            if self.target_cpu == current
            else self.target_dir().replace('\\', '\\%s_' % current)
        )


class RegistryInfo:
    """
    Microsoft Visual Studio related registry information.

    Parameters
    ----------
    platform_info: PlatformInfo
        "PlatformInfo" instance.
    """

    HKEYS = (
        winreg.HKEY_USERS,
        winreg.HKEY_CURRENT_USER,
        winreg.HKEY_LOCAL_MACHINE,
        winreg.HKEY_CLASSES_ROOT,
    )

    def __init__(self, platform_info):
        self.pi = platform_info

    @property
    def visualstudio(self):
        """
        Microsoft Visual Studio root registry key.

        Return
        ------
        str
            Registry key
        """
        return 'VisualStudio'

    @property
    def sxs(self):
        """
        Microsoft Visual Studio SxS registry key.

        Return
        ------
        str
            Registry key
        """
        return join(self.visualstudio, 'SxS')

    @property
    def vc(self):
        """
        Microsoft Visual C++ VC7 registry key.

        Return
        ------
        str
            Registry key
        """
        return join(self.sxs, 'VC7')

    @property
    def vs(self):
        """
        Microsoft Visual Studio VS7 registry key.

        Return
        ------
        str
            Registry key
        """
        return join(self.sxs, 'VS7')

    @property
    def vc_for_python(self):
        """
        Microsoft Visual C++ for Python registry key.

        Return
        ------
        str
            Registry key
        """
        return r'DevDiv\VCForPython'

    @property
    def microsoft_sdk(self):
        """
        Microsoft SDK registry key.

        Return
        ------
        str
            Registry key
        """
        return 'Microsoft SDKs'

    @property
    def windows_sdk(self):
        """
        Microsoft Windows/Platform SDK registry key.

        Return
        ------
        str
            Registry key
        """
        return join(self.microsoft_sdk, 'Windows')

    @property
    def netfx_sdk(self):
        """
        Microsoft .NET Framework SDK registry key.

        Return
        ------
        str
            Registry key
        """
        return join(self.microsoft_sdk, 'NETFXSDK')

    @property
    def windows_kits_roots(self):
        """
        Microsoft Windows Kits Roots registry key.

        Return
        ------
        str
            Registry key
        """
        return r'Windows Kits\Installed Roots'

    def microsoft(self, key, x86=False):
        """
        Return key in Microsoft software registry.

        Parameters
        ----------
        key: str
            Registry key path where look.
        x86: str
            Force x86 software registry.

        Return
        ------
        str
            Registry key
        """
        node64 = '' if self.pi.current_is_x86() or x86 else 'Wow6432Node'
        return join('Software', node64, 'Microsoft', key)

    def lookup(self, key, name):
        """
        Look for values in registry in Microsoft software registry.

        Parameters
        ----------
        key: str
            Registry key path where look.
        name: str
            Value name to find.

        Return
        ------
        str
            value
        """
        key_read = winreg.KEY_READ
        openkey = winreg.OpenKey
        closekey = winreg.CloseKey
        ms = self.microsoft
        for hkey in self.HKEYS:
            bkey = None
            try:
                bkey = openkey(hkey, ms(key), 0, key_read)
            except OSError:
                if not self.pi.current_is_x86():
                    try:
                        bkey = openkey(hkey, ms(key, True), 0, key_read)
                    except OSError:
                        continue
                else:
                    continue
            try:
                return winreg.QueryValueEx(bkey, name)[0]
            except OSError:
                pass
            finally:
                if bkey:
                    closekey(bkey)


class SystemInfo:
    """
    Microsoft Windows and Visual Studio related system information.

    Parameters
    ----------
    registry_info: RegistryInfo
        "RegistryInfo" instance.
    vc_ver: float
        Required Microsoft Visual C++ version.
    """

    # Variables and properties in this class use originals CamelCase variables
    # names from Microsoft source files for more easy comparison.
    WinDir = environ.get('WinDir', '')
    ProgramFiles = environ.get('ProgramFiles', '')
    ProgramFilesx86 = environ.get('ProgramFiles(x86)', ProgramFiles)

    def __init__(self, registry_info, vc_ver=None):
        self.ri = registry_info
        self.pi = self.ri.pi

        self.known_vs_paths = self.find_programdata_vs_vers()

        # Except for VS15+, VC version is aligned with VS version
        self.vs_ver = self.vc_ver = vc_ver or self._find_latest_available_vs_ver()

    def _find_latest_available_vs_ver(self):
        """
        Find the latest VC version

        Return
        ------
        float
            version
        """
        reg_vc_vers = self.find_reg_vs_vers()

        if not (reg_vc_vers or self.known_vs_paths):
            raise distutils.errors.DistutilsPlatformError(
                'No Microsoft Visual C++ version found'
            )

        vc_vers = set(reg_vc_vers)
        vc_vers.update(self.known_vs_paths)
        return sorted(vc_vers)[-1]

    def find_reg_vs_vers(self):
        """
        Find Microsoft Visual Studio versions available in registry.

        Return
        ------
        list of float
            Versions
        """
        ms = self.ri.microsoft
        vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs)
        vs_vers = []
        for hkey, key in itertools.product(self.ri.HKEYS, vckeys):
            try:
                bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ)
            except OSError:
                continue
            with bkey:
                subkeys, values, _ = winreg.QueryInfoKey(bkey)
                for i in range(values):
                    with contextlib.suppress(ValueError):
                        ver = float(winreg.EnumValue(bkey, i)[0])
                        if ver not in vs_vers:
                            vs_vers.append(ver)
                for i in range(subkeys):
                    with contextlib.suppress(ValueError):
                        ver = float(winreg.EnumKey(bkey, i))
                        if ver not in vs_vers:
                            vs_vers.append(ver)
        return sorted(vs_vers)

    def find_programdata_vs_vers(self):
        r"""
        Find Visual studio 2017+ versions from information in
        "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances".

        Return
        ------
        dict
            float version as key, path as value.
        """
        vs_versions = {}
        instances_dir = r'C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances'

        try:
            hashed_names = listdir(instances_dir)

        except OSError:
            # Directory not exists with all Visual Studio versions
            return vs_versions

        for name in hashed_names:
            try:
                # Get VS installation path from "state.json" file
                state_path = join(instances_dir, name, 'state.json')
                with open(state_path, 'rt', encoding='utf-8') as state_file:
                    state = json.load(state_file)
                vs_path = state['installationPath']

                # Raises OSError if this VS installation does not contain VC
                listdir(join(vs_path, r'VC\Tools\MSVC'))

                # Store version and path
                vs_versions[
                    self._as_float_version(state['installationVersion'])
                ] = vs_path

            except (OSError, KeyError):
                # Skip if "state.json" file is missing or bad format
                continue

        return vs_versions

    @staticmethod
    def _as_float_version(version):
        """
        Return a string version as a simplified float version (major.minor)

        Parameters
        ----------
        version: str
            Version.

        Return
        ------
        float
            version
        """
        return float('.'.join(version.split('.')[:2]))

    @property
    def VSInstallDir(self):
        """
        Microsoft Visual Studio directory.

        Return
        ------
        str
            path
        """
        # Default path
        default = join(
            self.ProgramFilesx86, 'Microsoft Visual Studio %0.1f' % self.vs_ver
        )

        # Try to get path from registry, if fail use default path
        return self.ri.lookup(self.ri.vs, '%0.1f' % self.vs_ver) or default

    @property
    def VCInstallDir(self):
        """
        Microsoft Visual C++ directory.

        Return
        ------
        str
            path
        """
        path = self._guess_vc() or self._guess_vc_legacy()

        if not isdir(path):
            msg = 'Microsoft Visual C++ directory not found'
            raise distutils.errors.DistutilsPlatformError(msg)

        return path

    def _guess_vc(self):
        """
        Locate Visual C++ for VS2017+.

        Return
        ------
        str
            path
        """
        if self.vs_ver <= 14.0:
            return ''

        try:
            # First search in known VS paths
            vs_dir = self.known_vs_paths[self.vs_ver]
        except KeyError:
            # Else, search with path from registry
            vs_dir = self.VSInstallDir

        guess_vc = join(vs_dir, r'VC\Tools\MSVC')

        # Subdir with VC exact version as name
        try:
            # Update the VC version with real one instead of VS version
            vc_ver = listdir(guess_vc)[-1]
            self.vc_ver = self._as_float_version(vc_ver)
            return join(guess_vc, vc_ver)
        except (OSError, IndexError):
            return ''

    def _guess_vc_legacy(self):
        """
        Locate Visual C++ for versions prior to 2017.

        Return
        ------
        str
            path
        """
        default = join(
            self.ProgramFilesx86, r'Microsoft Visual Studio %0.1f\VC' % self.vs_ver
        )

        # Try to get "VC++ for Python" path from registry as default path
        reg_path = join(self.ri.vc_for_python, '%0.1f' % self.vs_ver)
        python_vc = self.ri.lookup(reg_path, 'installdir')
        default_vc = join(python_vc, 'VC') if python_vc else default

        # Try to get path from registry, if fail use default path
        return self.ri.lookup(self.ri.vc, '%0.1f' % self.vs_ver) or default_vc

    @property
    def WindowsSdkVersion(self):
        """
        Microsoft Windows SDK versions for specified MSVC++ version.

        Return
        ------
        tuple of str
            versions
        """
        if self.vs_ver <= 9.0:
            return '7.0', '6.1', '6.0a'
        elif self.vs_ver == 10.0:
            return '7.1', '7.0a'
        elif self.vs_ver == 11.0:
            return '8.0', '8.0a'
        elif self.vs_ver == 12.0:
            return '8.1', '8.1a'
        elif self.vs_ver >= 14.0:
            return '10.0', '8.1'

    @property
    def WindowsSdkLastVersion(self):
        """
        Microsoft Windows SDK last version.

        Return
        ------
        str
            version
        """
        return self._use_last_dir_name(join(self.WindowsSdkDir, 'lib'))

    @property  # noqa: C901
    def WindowsSdkDir(self):  # noqa: C901  # is too complex (12)  # FIXME
        """
        Microsoft Windows SDK directory.

        Return
        ------
        str
            path
        """
        sdkdir = ''
        for ver in self.WindowsSdkVersion:
            # Try to get it from registry
            loc = join(self.ri.windows_sdk, 'v%s' % ver)
            sdkdir = self.ri.lookup(loc, 'installationfolder')
            if sdkdir:
                break
        if not sdkdir or not isdir(sdkdir):
            # Try to get "VC++ for Python" version from registry
            path = join(self.ri.vc_for_python, '%0.1f' % self.vc_ver)
            install_base = self.ri.lookup(path, 'installdir')
            if install_base:
                sdkdir = join(install_base, 'WinSDK')
        if not sdkdir or not isdir(sdkdir):
            # If fail, use default new path
            for ver in self.WindowsSdkVersion:
                intver = ver[: ver.rfind('.')]
                path = r'Microsoft SDKs\Windows Kits\%s' % intver
                d = join(self.ProgramFiles, path)
                if isdir(d):
                    sdkdir = d
        if not sdkdir or not isdir(sdkdir):
            # If fail, use default old path
            for ver in self.WindowsSdkVersion:
                path = r'Microsoft SDKs\Windows\v%s' % ver
                d = join(self.ProgramFiles, path)
                if isdir(d):
                    sdkdir = d
        if not sdkdir:
            # If fail, use Platform SDK
            sdkdir = join(self.VCInstallDir, 'PlatformSDK')
        return sdkdir

    @property
    def WindowsSDKExecutablePath(self):
        """
        Microsoft Windows SDK executable directory.

        Return
        ------
        str
            path
        """
        # Find WinSDK NetFx Tools registry dir name
        if self.vs_ver <= 11.0:
            netfxver = 35
            arch = ''
        else:
            netfxver = 40
            hidex86 = True if self.vs_ver <= 12.0 else False
            arch = self.pi.current_dir(x64=True, hidex86=hidex86)
        fx = 'WinSDK-NetFx%dTools%s' % (netfxver, arch.replace('\\', '-'))

        # list all possibles registry paths
        regpaths = []
        if self.vs_ver >= 14.0:
            for ver in self.NetFxSdkVersion:
                regpaths += [join(self.ri.netfx_sdk, ver, fx)]

        for ver in self.WindowsSdkVersion:
            regpaths += [join(self.ri.windows_sdk, 'v%sA' % ver, fx)]

        # Return installation folder from the more recent path
        for path in regpaths:
            execpath = self.ri.lookup(path, 'installationfolder')
            if execpath:
                return execpath

    @property
    def FSharpInstallDir(self):
        """
        Microsoft Visual F# directory.

        Return
        ------
        str
            path
        """
        path = join(self.ri.visualstudio, r'%0.1f\Setup\F#' % self.vs_ver)
        return self.ri.lookup(path, 'productdir') or ''

    @property
    def UniversalCRTSdkDir(self):
        """
        Microsoft Universal CRT SDK directory.

        Return
        ------
        str
            path
        """
        # Set Kit Roots versions for specified MSVC++ version
        vers = ('10', '81') if self.vs_ver >= 14.0 else ()

        # Find path of the more recent Kit
        for ver in vers:
            sdkdir = self.ri.lookup(self.ri.windows_kits_roots, 'kitsroot%s' % ver)
            if sdkdir:
                return sdkdir or ''

    @property
    def UniversalCRTSdkLastVersion(self):
        """
        Microsoft Universal C Runtime SDK last version.

        Return
        ------
        str
            version
        """
        return self._use_last_dir_name(join(self.UniversalCRTSdkDir, 'lib'))

    @property
    def NetFxSdkVersion(self):
        """
        Microsoft .NET Framework SDK versions.

        Return
        ------
        tuple of str
            versions
        """
        # Set FxSdk versions for specified VS version
        return (
            ('4.7.2', '4.7.1', '4.7', '4.6.2', '4.6.1', '4.6', '4.5.2', '4.5.1', '4.5')
            if self.vs_ver >= 14.0
            else ()
        )

    @property
    def NetFxSdkDir(self):
        """
        Microsoft .NET Framework SDK directory.

        Return
        ------
        str
            path
        """
        sdkdir = ''
        for ver in self.NetFxSdkVersion:
            loc = join(self.ri.netfx_sdk, ver)
            sdkdir = self.ri.lookup(loc, 'kitsinstallationfolder')
            if sdkdir:
                break
        return sdkdir

    @property
    def FrameworkDir32(self):
        """
        Microsoft .NET Framework 32bit directory.

        Return
        ------
        str
            path
        """
        # Default path
        guess_fw = join(self.WinDir, r'Microsoft.NET\Framework')

        # Try to get path from registry, if fail use default path
        return self.ri.lookup(self.ri.vc, 'frameworkdir32') or guess_fw

    @property
    def FrameworkDir64(self):
        """
        Microsoft .NET Framework 64bit directory.

        Return
        ------
        str
            path
        """
        # Default path
        guess_fw = join(self.WinDir, r'Microsoft.NET\Framework64')

        # Try to get path from registry, if fail use default path
        return self.ri.lookup(self.ri.vc, 'frameworkdir64') or guess_fw

    @property
    def FrameworkVersion32(self):
        """
        Microsoft .NET Framework 32bit versions.

        Return
        ------
        tuple of str
            versions
        """
        return self._find_dot_net_versions(32)

    @property
    def FrameworkVersion64(self):
        """
        Microsoft .NET Framework 64bit versions.

        Return
        ------
        tuple of str
            versions
        """
        return self._find_dot_net_versions(64)

    def _find_dot_net_versions(self, bits):
        """
        Find Microsoft .NET Framework versions.

        Parameters
        ----------
        bits: int
            Platform number of bits: 32 or 64.

        Return
        ------
        tuple of str
            versions
        """
        # Find actual .NET version in registry
        reg_ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits)
        dot_net_dir = getattr(self, 'FrameworkDir%d' % bits)
        ver = reg_ver or self._use_last_dir_name(dot_net_dir, 'v') or ''

        # Set .NET versions for specified MSVC++ version
        if self.vs_ver >= 12.0:
            return ver, 'v4.0'
        elif self.vs_ver >= 10.0:
            return 'v4.0.30319' if ver.lower()[:2] != 'v4' else ver, 'v3.5'
        elif self.vs_ver == 9.0:
            return 'v3.5', 'v2.0.50727'
        elif self.vs_ver == 8.0:
            return 'v3.0', 'v2.0.50727'

    @staticmethod
    def _use_last_dir_name(path, prefix=''):
        """
        Return name of the last dir in path or '' if no dir found.

        Parameters
        ----------
        path: str
            Use dirs in this path
        prefix: str
            Use only dirs starting by this prefix

        Return
        ------
        str
            name
        """
        matching_dirs = (
            dir_name
            for dir_name in reversed(listdir(path))
            if isdir(join(path, dir_name)) and dir_name.startswith(prefix)
        )
        return next(matching_dirs, None) or ''


class EnvironmentInfo:
    """
    Return environment variables for specified Microsoft Visual C++ version
    and platform : Lib, Include, Path and libpath.

    This function is compatible with Microsoft Visual C++ 9.0 to 14.X.

    Script created by analysing Microsoft environment configuration files like
    "vcvars[...].bat", "SetEnv.Cmd", "vcbuildtools.bat", ...

    Parameters
    ----------
    arch: str
        Target architecture.
    vc_ver: float
        Required Microsoft Visual C++ version. If not set, autodetect the last
        version.
    vc_min_ver: float
        Minimum Microsoft Visual C++ version.
    """

    # Variables and properties in this class use originals CamelCase variables
    # names from Microsoft source files for more easy comparison.

    def __init__(self, arch, vc_ver=None, vc_min_ver=0):
        self.pi = PlatformInfo(arch)
        self.ri = RegistryInfo(self.pi)
        self.si = SystemInfo(self.ri, vc_ver)

        if self.vc_ver < vc_min_ver:
            err = 'No suitable Microsoft Visual C++ version found'
            raise distutils.errors.DistutilsPlatformError(err)

    @property
    def vs_ver(self):
        """
        Microsoft Visual Studio.

        Return
        ------
        float
            version
        """
        return self.si.vs_ver

    @property
    def vc_ver(self):
        """
        Microsoft Visual C++ version.

        Return
        ------
        float
            version
        """
        return self.si.vc_ver

    @property
    def VSTools(self):
        """
        Microsoft Visual Studio Tools.

        Return
        ------
        list of str
            paths
        """
        paths = [r'Common7\IDE', r'Common7\Tools']

        if self.vs_ver >= 14.0:
            arch_subdir = self.pi.current_dir(hidex86=True, x64=True)
            paths += [r'Common7\IDE\CommonExtensions\Microsoft\TestWindow']
            paths += [r'Team Tools\Performance Tools']
            paths += [r'Team Tools\Performance Tools%s' % arch_subdir]

        return [join(self.si.VSInstallDir, path) for path in paths]

    @property
    def VCIncludes(self):
        """
        Microsoft Visual C++ & Microsoft Foundation Class Includes.

        Return
        ------
        list of str
            paths
        """
        return [
            join(self.si.VCInstallDir, 'Include'),
            join(self.si.VCInstallDir, r'ATLMFC\Include'),
        ]

    @property
    def VCLibraries(self):
        """
        Microsoft Visual C++ & Microsoft Foundation Class Libraries.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver >= 15.0:
            arch_subdir = self.pi.target_dir(x64=True)
        else:
            arch_subdir = self.pi.target_dir(hidex86=True)
        paths = ['Lib%s' % arch_subdir, r'ATLMFC\Lib%s' % arch_subdir]

        if self.vs_ver >= 14.0:
            paths += [r'Lib\store%s' % arch_subdir]

        return [join(self.si.VCInstallDir, path) for path in paths]

    @property
    def VCStoreRefs(self):
        """
        Microsoft Visual C++ store references Libraries.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver < 14.0:
            return []
        return [join(self.si.VCInstallDir, r'Lib\store\references')]

    @property
    def VCTools(self):
        """
        Microsoft Visual C++ Tools.

        Return
        ------
        list of str
            paths
        """
        si = self.si
        tools = [join(si.VCInstallDir, 'VCPackages')]

        forcex86 = True if self.vs_ver <= 10.0 else False
        arch_subdir = self.pi.cross_dir(forcex86)
        if arch_subdir:
            tools += [join(si.VCInstallDir, 'Bin%s' % arch_subdir)]

        if self.vs_ver == 14.0:
            path = 'Bin%s' % self.pi.current_dir(hidex86=True)
            tools += [join(si.VCInstallDir, path)]

        elif self.vs_ver >= 15.0:
            host_dir = (
                r'bin\HostX86%s' if self.pi.current_is_x86() else r'bin\HostX64%s'
            )
            tools += [join(si.VCInstallDir, host_dir % self.pi.target_dir(x64=True))]

            if self.pi.current_cpu != self.pi.target_cpu:
                tools += [
                    join(si.VCInstallDir, host_dir % self.pi.current_dir(x64=True))
                ]

        else:
            tools += [join(si.VCInstallDir, 'Bin')]

        return tools

    @property
    def OSLibraries(self):
        """
        Microsoft Windows SDK Libraries.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver <= 10.0:
            arch_subdir = self.pi.target_dir(hidex86=True, x64=True)
            return [join(self.si.WindowsSdkDir, 'Lib%s' % arch_subdir)]

        else:
            arch_subdir = self.pi.target_dir(x64=True)
            lib = join(self.si.WindowsSdkDir, 'lib')
            libver = self._sdk_subdir
            return [join(lib, '%sum%s' % (libver, arch_subdir))]

    @property
    def OSIncludes(self):
        """
        Microsoft Windows SDK Include.

        Return
        ------
        list of str
            paths
        """
        include = join(self.si.WindowsSdkDir, 'include')

        if self.vs_ver <= 10.0:
            return [include, join(include, 'gl')]

        else:
            if self.vs_ver >= 14.0:
                sdkver = self._sdk_subdir
            else:
                sdkver = ''
            return [
                join(include, '%sshared' % sdkver),
                join(include, '%sum' % sdkver),
                join(include, '%swinrt' % sdkver),
            ]

    @property
    def OSLibpath(self):
        """
        Microsoft Windows SDK Libraries Paths.

        Return
        ------
        list of str
            paths
        """
        ref = join(self.si.WindowsSdkDir, 'References')
        libpath = []

        if self.vs_ver <= 9.0:
            libpath += self.OSLibraries

        if self.vs_ver >= 11.0:
            libpath += [join(ref, r'CommonConfiguration\Neutral')]

        if self.vs_ver >= 14.0:
            libpath += [
                ref,
                join(self.si.WindowsSdkDir, 'UnionMetadata'),
                join(ref, 'Windows.Foundation.UniversalApiContract', '1.0.0.0'),
                join(ref, 'Windows.Foundation.FoundationContract', '1.0.0.0'),
                join(ref, 'Windows.Networking.Connectivity.WwanContract', '1.0.0.0'),
                join(
                    self.si.WindowsSdkDir,
                    'ExtensionSDKs',
                    'Microsoft.VCLibs',
                    '%0.1f' % self.vs_ver,
                    'References',
                    'CommonConfiguration',
                    'neutral',
                ),
            ]
        return libpath

    @property
    def SdkTools(self):
        """
        Microsoft Windows SDK Tools.

        Return
        ------
        list of str
            paths
        """
        return list(self._sdk_tools())

    def _sdk_tools(self):
        """
        Microsoft Windows SDK Tools paths generator.

        Return
        ------
        generator of str
            paths
        """
        if self.vs_ver < 15.0:
            bin_dir = 'Bin' if self.vs_ver <= 11.0 else r'Bin\x86'
            yield join(self.si.WindowsSdkDir, bin_dir)

        if not self.pi.current_is_x86():
            arch_subdir = self.pi.current_dir(x64=True)
            path = 'Bin%s' % arch_subdir
            yield join(self.si.WindowsSdkDir, path)

        if self.vs_ver in (10.0, 11.0):
            if self.pi.target_is_x86():
                arch_subdir = ''
            else:
                arch_subdir = self.pi.current_dir(hidex86=True, x64=True)
            path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir
            yield join(self.si.WindowsSdkDir, path)

        elif self.vs_ver >= 15.0:
            path = join(self.si.WindowsSdkDir, 'Bin')
            arch_subdir = self.pi.current_dir(x64=True)
            sdkver = self.si.WindowsSdkLastVersion
            yield join(path, '%s%s' % (sdkver, arch_subdir))

        if self.si.WindowsSDKExecutablePath:
            yield self.si.WindowsSDKExecutablePath

    @property
    def _sdk_subdir(self):
        """
        Microsoft Windows SDK version subdir.

        Return
        ------
        str
            subdir
        """
        ucrtver = self.si.WindowsSdkLastVersion
        return ('%s\\' % ucrtver) if ucrtver else ''

    @property
    def SdkSetup(self):
        """
        Microsoft Windows SDK Setup.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver > 9.0:
            return []

        return [join(self.si.WindowsSdkDir, 'Setup')]

    @property
    def FxTools(self):
        """
        Microsoft .NET Framework Tools.

        Return
        ------
        list of str
            paths
        """
        pi = self.pi
        si = self.si

        if self.vs_ver <= 10.0:
            include32 = True
            include64 = not pi.target_is_x86() and not pi.current_is_x86()
        else:
            include32 = pi.target_is_x86() or pi.current_is_x86()
            include64 = pi.current_cpu == 'amd64' or pi.target_cpu == 'amd64'

        tools = []
        if include32:
            tools += [join(si.FrameworkDir32, ver) for ver in si.FrameworkVersion32]
        if include64:
            tools += [join(si.FrameworkDir64, ver) for ver in si.FrameworkVersion64]
        return tools

    @property
    def NetFxSDKLibraries(self):
        """
        Microsoft .Net Framework SDK Libraries.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver < 14.0 or not self.si.NetFxSdkDir:
            return []

        arch_subdir = self.pi.target_dir(x64=True)
        return [join(self.si.NetFxSdkDir, r'lib\um%s' % arch_subdir)]

    @property
    def NetFxSDKIncludes(self):
        """
        Microsoft .Net Framework SDK Includes.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver < 14.0 or not self.si.NetFxSdkDir:
            return []

        return [join(self.si.NetFxSdkDir, r'include\um')]

    @property
    def VsTDb(self):
        """
        Microsoft Visual Studio Team System Database.

        Return
        ------
        list of str
            paths
        """
        return [join(self.si.VSInstallDir, r'VSTSDB\Deploy')]

    @property
    def MSBuild(self):
        """
        Microsoft Build Engine.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver < 12.0:
            return []
        elif self.vs_ver < 15.0:
            base_path = self.si.ProgramFilesx86
            arch_subdir = self.pi.current_dir(hidex86=True)
        else:
            base_path = self.si.VSInstallDir
            arch_subdir = ''

        path = r'MSBuild\%0.1f\bin%s' % (self.vs_ver, arch_subdir)
        build = [join(base_path, path)]

        if self.vs_ver >= 15.0:
            # Add Roslyn C# & Visual Basic Compiler
            build += [join(base_path, path, 'Roslyn')]

        return build

    @property
    def HTMLHelpWorkshop(self):
        """
        Microsoft HTML Help Workshop.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver < 11.0:
            return []

        return [join(self.si.ProgramFilesx86, 'HTML Help Workshop')]

    @property
    def UCRTLibraries(self):
        """
        Microsoft Universal C Runtime SDK Libraries.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver < 14.0:
            return []

        arch_subdir = self.pi.target_dir(x64=True)
        lib = join(self.si.UniversalCRTSdkDir, 'lib')
        ucrtver = self._ucrt_subdir
        return [join(lib, '%sucrt%s' % (ucrtver, arch_subdir))]

    @property
    def UCRTIncludes(self):
        """
        Microsoft Universal C Runtime SDK Include.

        Return
        ------
        list of str
            paths
        """
        if self.vs_ver < 14.0:
            return []

        include = join(self.si.UniversalCRTSdkDir, 'include')
        return [join(include, '%sucrt' % self._ucrt_subdir)]

    @property
    def _ucrt_subdir(self):
        """
        Microsoft Universal C Runtime SDK version subdir.

        Return
        ------
        str
            subdir
        """
        ucrtver = self.si.UniversalCRTSdkLastVersion
        return ('%s\\' % ucrtver) if ucrtver else ''

    @property
    def FSharp(self):
        """
        Microsoft Visual F#.

        Return
        ------
        list of str
            paths
        """
        if 11.0 > self.vs_ver > 12.0:
            return []

        return [self.si.FSharpInstallDir]

    @property
    def VCRuntimeRedist(self):
        """
        Microsoft Visual C++ runtime redistributable dll.

        Return
        ------
        str
            path
        """
        vcruntime = 'vcruntime%d0.dll' % self.vc_ver
        arch_subdir = self.pi.target_dir(x64=True).strip('\\')

        # Installation prefixes candidates
        prefixes = []
        tools_path = self.si.VCInstallDir
        redist_path = dirname(tools_path.replace(r'\Tools', r'\Redist'))
        if isdir(redist_path):
            # Redist version may not be exactly the same as tools
            redist_path = join(redist_path, listdir(redist_path)[-1])
            prefixes += [redist_path, join(redist_path, 'onecore')]

        prefixes += [join(tools_path, 'redist')]  # VS14 legacy path

        # CRT directory
        crt_dirs = (
            'Microsoft.VC%d.CRT' % (self.vc_ver * 10),
            # Sometime store in directory with VS version instead of VC
            'Microsoft.VC%d.CRT' % (int(self.vs_ver) * 10),
        )

        # vcruntime path
        for prefix, crt_dir in itertools.product(prefixes, crt_dirs):
            path = join(prefix, arch_subdir, crt_dir, vcruntime)
            if isfile(path):
                return path

    def return_env(self, exists=True):
        """
        Return environment dict.

        Parameters
        ----------
        exists: bool
            It True, only return existing paths.

        Return
        ------
        dict
            environment
        """
        env = dict(
            include=self._build_paths(
                'include',
                [
                    self.VCIncludes,
                    self.OSIncludes,
                    self.UCRTIncludes,
                    self.NetFxSDKIncludes,
                ],
                exists,
            ),
            lib=self._build_paths(
                'lib',
                [
                    self.VCLibraries,
                    self.OSLibraries,
                    self.FxTools,
                    self.UCRTLibraries,
                    self.NetFxSDKLibraries,
                ],
                exists,
            ),
            libpath=self._build_paths(
                'libpath',
                [self.VCLibraries, self.FxTools, self.VCStoreRefs, self.OSLibpath],
                exists,
            ),
            path=self._build_paths(
                'path',
                [
                    self.VCTools,
                    self.VSTools,
                    self.VsTDb,
                    self.SdkTools,
                    self.SdkSetup,
                    self.FxTools,
                    self.MSBuild,
                    self.HTMLHelpWorkshop,
                    self.FSharp,
                ],
                exists,
            ),
        )
        if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist):
            env['py_vcruntime_redist'] = self.VCRuntimeRedist
        return env

    def _build_paths(self, name, spec_path_lists, exists):
        """
        Given an environment variable name and specified paths,
        return a pathsep-separated string of paths containing
        unique, extant, directories from those paths and from
        the environment variable. Raise an error if no paths
        are resolved.

        Parameters
        ----------
        name: str
            Environment variable name
        spec_path_lists: list of str
            Paths
        exists: bool
            It True, only return existing paths.

        Return
        ------
        str
            Pathsep-separated paths
        """
        # flatten spec_path_lists
        spec_paths = itertools.chain.from_iterable(spec_path_lists)
        env_paths = environ.get(name, '').split(pathsep)
        paths = itertools.chain(spec_paths, env_paths)
        extant_paths = list(filter(isdir, paths)) if exists else paths
        if not extant_paths:
            msg = "%s environment variable is empty" % name.upper()
            raise distutils.errors.DistutilsPlatformError(msg)
        unique_paths = unique_everseen(extant_paths)
        return pathsep.join(unique_paths)
python3.12/site-packages/setuptools/glob.py000064400000011404151732703440014635 0ustar00"""
Filename globbing utility. Mostly a copy of `glob` from Python 3.5.

Changes include:
 * `yield from` and PEP3102 `*` removed.
 * Hidden files are not ignored.
"""

import os
import re
import fnmatch

__all__ = ["glob", "iglob", "escape"]


def glob(pathname, recursive=False):
    """Return a list of paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    """
    return list(iglob(pathname, recursive=recursive))


def iglob(pathname, recursive=False):
    """Return an iterator which yields the paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    """
    it = _iglob(pathname, recursive)
    if recursive and _isrecursive(pathname):
        s = next(it)  # skip empty string
        assert not s
    return it


def _iglob(pathname, recursive):
    dirname, basename = os.path.split(pathname)
    glob_in_dir = glob2 if recursive and _isrecursive(basename) else glob1

    if not has_magic(pathname):
        if basename:
            if os.path.lexists(pathname):
                yield pathname
        else:
            # Patterns ending with a slash should match only directories
            if os.path.isdir(dirname):
                yield pathname
        return

    if not dirname:
        yield from glob_in_dir(dirname, basename)
        return
    # `os.path.split()` returns the argument itself as a dirname if it is a
    # drive or UNC path.  Prevent an infinite recursion if a drive or UNC path
    # contains magic characters (i.e. r'\\?\C:').
    if dirname != pathname and has_magic(dirname):
        dirs = _iglob(dirname, recursive)
    else:
        dirs = [dirname]
    if not has_magic(basename):
        glob_in_dir = glob0
    for dirname in dirs:
        for name in glob_in_dir(dirname, basename):
            yield os.path.join(dirname, name)


# These 2 helper functions non-recursively glob inside a literal directory.
# They return a list of basenames. `glob1` accepts a pattern while `glob0`
# takes a literal basename (so it only has to check for its existence).


def glob1(dirname, pattern):
    if not dirname:
        if isinstance(pattern, bytes):
            dirname = os.curdir.encode('ASCII')
        else:
            dirname = os.curdir
    try:
        names = os.listdir(dirname)
    except OSError:
        return []
    return fnmatch.filter(names, pattern)


def glob0(dirname, basename):
    if not basename:
        # `os.path.split()` returns an empty basename for paths ending with a
        # directory separator.  'q*x/' should match only directories.
        if os.path.isdir(dirname):
            return [basename]
    else:
        if os.path.lexists(os.path.join(dirname, basename)):
            return [basename]
    return []


# This helper function recursively yields relative pathnames inside a literal
# directory.


def glob2(dirname, pattern):
    assert _isrecursive(pattern)
    yield pattern[:0]
    for x in _rlistdir(dirname):
        yield x


# Recursively yields relative pathnames inside a literal directory.
def _rlistdir(dirname):
    if not dirname:
        if isinstance(dirname, bytes):
            dirname = os.curdir.encode('ASCII')
        else:
            dirname = os.curdir
    try:
        names = os.listdir(dirname)
    except os.error:
        return
    for x in names:
        yield x
        path = os.path.join(dirname, x) if dirname else x
        for y in _rlistdir(path):
            yield os.path.join(x, y)


magic_check = re.compile('([*?[])')
magic_check_bytes = re.compile(b'([*?[])')


def has_magic(s):
    if isinstance(s, bytes):
        match = magic_check_bytes.search(s)
    else:
        match = magic_check.search(s)
    return match is not None


def _isrecursive(pattern):
    if isinstance(pattern, bytes):
        return pattern == b'**'
    else:
        return pattern == '**'


def escape(pathname):
    """Escape all special characters."""
    # Escaping is done by wrapping any of "*?[" between square brackets.
    # Metacharacters do not work in the drive part and shouldn't be escaped.
    drive, pathname = os.path.splitdrive(pathname)
    if isinstance(pathname, bytes):
        pathname = magic_check_bytes.sub(br'[\1]', pathname)
    else:
        pathname = magic_check.sub(r'[\1]', pathname)
    return drive + pathname
python3.12/site-packages/setuptools/command/build_py.py000064400000035427151732703440017152 0ustar00from functools import partial
from glob import glob
from distutils.util import convert_path
import distutils.command.build_py as orig
import os
import fnmatch
import textwrap
import distutils.errors
import itertools
import stat
from pathlib import Path
from typing import Dict, Iterable, Iterator, List, Optional, Tuple

from ..extern.more_itertools import unique_everseen
from ..warnings import SetuptoolsDeprecationWarning


_IMPLICIT_DATA_FILES = ('*.pyi', 'py.typed')


def make_writable(target):
    os.chmod(target, os.stat(target).st_mode | stat.S_IWRITE)


class build_py(orig.build_py):
    """Enhanced 'build_py' command that includes data files with packages

    The data files are specified via a 'package_data' argument to 'setup()'.
    See 'setuptools.dist.Distribution' for more details.

    Also, this version of the 'build_py' command allows you to specify both
    'py_modules' and 'packages' in the same setup operation.
    """

    editable_mode: bool = False
    existing_egg_info_dir: Optional[str] = None  #: Private API, internal use only.

    def finalize_options(self):
        orig.build_py.finalize_options(self)
        self.package_data = self.distribution.package_data
        self.exclude_package_data = self.distribution.exclude_package_data or {}
        if 'data_files' in self.__dict__:
            del self.__dict__['data_files']
        self.__updated_files = []

    def copy_file(
        self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1
    ):
        # Overwrite base class to allow using links
        if link:
            infile = str(Path(infile).resolve())
            outfile = str(Path(outfile).resolve())
        return super().copy_file(
            infile, outfile, preserve_mode, preserve_times, link, level
        )

    def run(self):
        """Build modules, packages, and copy data files to build directory"""
        if not (self.py_modules or self.packages) or self.editable_mode:
            return

        if self.py_modules:
            self.build_modules()

        if self.packages:
            self.build_packages()
            self.build_package_data()

        # Only compile actual .py files, using our base class' idea of what our
        # output files are.
        self.byte_compile(orig.build_py.get_outputs(self, include_bytecode=0))

    def __getattr__(self, attr):
        "lazily compute data files"
        if attr == 'data_files':
            self.data_files = self._get_data_files()
            return self.data_files
        return orig.build_py.__getattr__(self, attr)

    def build_module(self, module, module_file, package):
        outfile, copied = orig.build_py.build_module(self, module, module_file, package)
        if copied:
            self.__updated_files.append(outfile)
        return outfile, copied

    def _get_data_files(self):
        """Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
        self.analyze_manifest()
        return list(map(self._get_pkg_data_files, self.packages or ()))

    def get_data_files_without_manifest(self):
        """
        Generate list of ``(package,src_dir,build_dir,filenames)`` tuples,
        but without triggering any attempt to analyze or build the manifest.
        """
        # Prevent eventual errors from unset `manifest_files`
        # (that would otherwise be set by `analyze_manifest`)
        self.__dict__.setdefault('manifest_files', {})
        return list(map(self._get_pkg_data_files, self.packages or ()))

    def _get_pkg_data_files(self, package):
        # Locate package source directory
        src_dir = self.get_package_dir(package)

        # Compute package build directory
        build_dir = os.path.join(*([self.build_lib] + package.split('.')))

        # Strip directory from globbed filenames
        filenames = [
            os.path.relpath(file, src_dir)
            for file in self.find_data_files(package, src_dir)
        ]
        return package, src_dir, build_dir, filenames

    def find_data_files(self, package, src_dir):
        """Return filenames for package's data files in 'src_dir'"""
        patterns = self._get_platform_patterns(
            self.package_data,
            package,
            src_dir,
            extra_patterns=_IMPLICIT_DATA_FILES,
        )
        globs_expanded = map(partial(glob, recursive=True), patterns)
        # flatten the expanded globs into an iterable of matches
        globs_matches = itertools.chain.from_iterable(globs_expanded)
        glob_files = filter(os.path.isfile, globs_matches)
        files = itertools.chain(
            self.manifest_files.get(package, []),
            glob_files,
        )
        return self.exclude_data_files(package, src_dir, files)

    def get_outputs(self, include_bytecode=1) -> List[str]:
        """See :class:`setuptools.commands.build.SubCommand`"""
        if self.editable_mode:
            return list(self.get_output_mapping().keys())
        return super().get_outputs(include_bytecode)

    def get_output_mapping(self) -> Dict[str, str]:
        """See :class:`setuptools.commands.build.SubCommand`"""
        mapping = itertools.chain(
            self._get_package_data_output_mapping(),
            self._get_module_mapping(),
        )
        return dict(sorted(mapping, key=lambda x: x[0]))

    def _get_module_mapping(self) -> Iterator[Tuple[str, str]]:
        """Iterate over all modules producing (dest, src) pairs."""
        for package, module, module_file in self.find_all_modules():
            package = package.split('.')
            filename = self.get_module_outfile(self.build_lib, package, module)
            yield (filename, module_file)

    def _get_package_data_output_mapping(self) -> Iterator[Tuple[str, str]]:
        """Iterate over package data producing (dest, src) pairs."""
        for package, src_dir, build_dir, filenames in self.data_files:
            for filename in filenames:
                target = os.path.join(build_dir, filename)
                srcfile = os.path.join(src_dir, filename)
                yield (target, srcfile)

    def build_package_data(self):
        """Copy data files into build directory"""
        for target, srcfile in self._get_package_data_output_mapping():
            self.mkpath(os.path.dirname(target))
            _outf, _copied = self.copy_file(srcfile, target)
            make_writable(target)

    def analyze_manifest(self):
        self.manifest_files = mf = {}
        if not self.distribution.include_package_data:
            return
        src_dirs = {}
        for package in self.packages or ():
            # Locate package source directory
            src_dirs[assert_relative(self.get_package_dir(package))] = package

        if (
            getattr(self, 'existing_egg_info_dir', None)
            and Path(self.existing_egg_info_dir, "SOURCES.txt").exists()
        ):
            egg_info_dir = self.existing_egg_info_dir
            manifest = Path(egg_info_dir, "SOURCES.txt")
            files = manifest.read_text(encoding="utf-8").splitlines()
        else:
            self.run_command('egg_info')
            ei_cmd = self.get_finalized_command('egg_info')
            egg_info_dir = ei_cmd.egg_info
            files = ei_cmd.filelist.files

        check = _IncludePackageDataAbuse()
        for path in self._filter_build_files(files, egg_info_dir):
            d, f = os.path.split(assert_relative(path))
            prev = None
            oldf = f
            while d and d != prev and d not in src_dirs:
                prev = d
                d, df = os.path.split(d)
                f = os.path.join(df, f)
            if d in src_dirs:
                if f == oldf:
                    if check.is_module(f):
                        continue  # it's a module, not data
                else:
                    importable = check.importable_subpackage(src_dirs[d], f)
                    if importable:
                        check.warn(importable)
                mf.setdefault(src_dirs[d], []).append(path)

    def _filter_build_files(self, files: Iterable[str], egg_info: str) -> Iterator[str]:
        """
        ``build_meta`` may try to create egg_info outside of the project directory,
        and this can be problematic for certain plugins (reported in issue #3500).

        Extensions might also include between their sources files created on the
        ``build_lib`` and ``build_temp`` directories.

        This function should filter this case of invalid files out.
        """
        build = self.get_finalized_command("build")
        build_dirs = (egg_info, self.build_lib, build.build_temp, build.build_base)
        norm_dirs = [os.path.normpath(p) for p in build_dirs if p]

        for file in files:
            norm_path = os.path.normpath(file)
            if not os.path.isabs(file) or all(d not in norm_path for d in norm_dirs):
                yield file

    def get_data_files(self):
        pass  # Lazily compute data files in _get_data_files() function.

    def check_package(self, package, package_dir):
        """Check namespace packages' __init__ for declare_namespace"""
        try:
            return self.packages_checked[package]
        except KeyError:
            pass

        init_py = orig.build_py.check_package(self, package, package_dir)
        self.packages_checked[package] = init_py

        if not init_py or not self.distribution.namespace_packages:
            return init_py

        for pkg in self.distribution.namespace_packages:
            if pkg == package or pkg.startswith(package + '.'):
                break
        else:
            return init_py

        with open(init_py, 'rb') as f:
            contents = f.read()
        if b'declare_namespace' not in contents:
            raise distutils.errors.DistutilsError(
                "Namespace package problem: %s is a namespace package, but "
                "its\n__init__.py does not call declare_namespace()! Please "
                'fix it.\n(See the setuptools manual under '
                '"Namespace Packages" for details.)\n"' % (package,)
            )
        return init_py

    def initialize_options(self):
        self.packages_checked = {}
        orig.build_py.initialize_options(self)
        self.editable_mode = False
        self.existing_egg_info_dir = None

    def get_package_dir(self, package):
        res = orig.build_py.get_package_dir(self, package)
        if self.distribution.src_root is not None:
            return os.path.join(self.distribution.src_root, res)
        return res

    def exclude_data_files(self, package, src_dir, files):
        """Filter filenames for package's data files in 'src_dir'"""
        files = list(files)
        patterns = self._get_platform_patterns(
            self.exclude_package_data,
            package,
            src_dir,
        )
        match_groups = (fnmatch.filter(files, pattern) for pattern in patterns)
        # flatten the groups of matches into an iterable of matches
        matches = itertools.chain.from_iterable(match_groups)
        bad = set(matches)
        keepers = (fn for fn in files if fn not in bad)
        # ditch dupes
        return list(unique_everseen(keepers))

    @staticmethod
    def _get_platform_patterns(spec, package, src_dir, extra_patterns=[]):
        """
        yield platform-specific path patterns (suitable for glob
        or fn_match) from a glob-based spec (such as
        self.package_data or self.exclude_package_data)
        matching package in src_dir.
        """
        raw_patterns = itertools.chain(
            extra_patterns,
            spec.get('', []),
            spec.get(package, []),
        )
        return (
            # Each pattern has to be converted to a platform-specific path
            os.path.join(src_dir, convert_path(pattern))
            for pattern in raw_patterns
        )


def assert_relative(path):
    if not os.path.isabs(path):
        return path
    from distutils.errors import DistutilsSetupError

    msg = (
        textwrap.dedent(
            """
        Error: setup script specifies an absolute path:

            %s

        setup() arguments must *always* be /-separated paths relative to the
        setup.py directory, *never* absolute paths.
        """
        ).lstrip()
        % path
    )
    raise DistutilsSetupError(msg)


class _IncludePackageDataAbuse:
    """Inform users that package or module is included as 'data file'"""

    class _Warning(SetuptoolsDeprecationWarning):
        _SUMMARY = """
        Package {importable!r} is absent from the `packages` configuration.
        """

        _DETAILS = """
        ############################
        # Package would be ignored #
        ############################
        Python recognizes {importable!r} as an importable package[^1],
        but it is absent from setuptools' `packages` configuration.

        This leads to an ambiguous overall configuration. If you want to distribute this
        package, please make sure that {importable!r} is explicitly added
        to the `packages` configuration field.

        Alternatively, you can also rely on setuptools' discovery methods
        (for example by using `find_namespace_packages(...)`/`find_namespace:`
        instead of `find_packages(...)`/`find:`).

        You can read more about "package discovery" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

        If you don't want {importable!r} to be distributed and are
        already explicitly excluding {importable!r} via
        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
        you can try to use `exclude_package_data`, or `include-package-data=False` in
        combination with a more fine grained `package-data` configuration.

        You can read more about "package data files" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


        [^1]: For Python, any directory (with suitable naming) can be imported,
              even if it does not contain any `.py` files.
              On the other hand, currently there is no concept of package data
              directory, all directories are treated like packages.
        """
        # _DUE_DATE: still not defined as this is particularly controversial.
        # Warning initially introduced in May 2022. See issue #3340 for discussion.

    def __init__(self):
        self._already_warned = set()

    def is_module(self, file):
        return file.endswith(".py") and file[: -len(".py")].isidentifier()

    def importable_subpackage(self, parent, file):
        pkg = Path(file).parent
        parts = list(itertools.takewhile(str.isidentifier, pkg.parts))
        if parts:
            return ".".join([parent, *parts])
        return None

    def warn(self, importable):
        if importable not in self._already_warned:
            self._Warning.emit(importable=importable)
            self._already_warned.add(importable)
python3.12/site-packages/setuptools/command/editable_wheel.py000064400000101736151732703440020275 0ustar00"""
Create a wheel that, when installed, will make the source package 'editable'
(add it to the interpreter's path, including metadata) per PEP 660. Replaces
'setup.py develop'.

.. note::
   One of the mechanisms briefly mentioned in PEP 660 to implement editable installs is
   to create a separated directory inside ``build`` and use a .pth file to point to that
   directory. In the context of this file such directory is referred as
   *auxiliary build directory* or ``auxiliary_dir``.
"""

import logging
import io
import os
import shutil
import sys
import traceback
from contextlib import suppress
from enum import Enum
from inspect import cleandoc
from itertools import chain
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import (
    TYPE_CHECKING,
    Dict,
    Iterable,
    Iterator,
    List,
    Mapping,
    Optional,
    Tuple,
    TypeVar,
    Union,
)

from .. import (
    Command,
    _normalization,
    _path,
    errors,
    namespaces,
)
from ..discovery import find_package_path
from ..dist import Distribution
from ..warnings import (
    InformationOnly,
    SetuptoolsDeprecationWarning,
    SetuptoolsWarning,
)
from .build_py import build_py as build_py_cls

if TYPE_CHECKING:
    from wheel.wheelfile import WheelFile  # noqa

if sys.version_info >= (3, 8):
    from typing import Protocol
elif TYPE_CHECKING:
    from typing_extensions import Protocol
else:
    from abc import ABC as Protocol

_Path = Union[str, Path]
_P = TypeVar("_P", bound=_Path)
_logger = logging.getLogger(__name__)


class _EditableMode(Enum):
    """
    Possible editable installation modes:
    `lenient` (new files automatically added to the package - DEFAULT);
    `strict` (requires a new installation when files are added/removed); or
    `compat` (attempts to emulate `python setup.py develop` - DEPRECATED).
    """

    STRICT = "strict"
    LENIENT = "lenient"
    COMPAT = "compat"  # TODO: Remove `compat` after Dec/2022.

    @classmethod
    def convert(cls, mode: Optional[str]) -> "_EditableMode":
        if not mode:
            return _EditableMode.LENIENT  # default

        _mode = mode.upper()
        if _mode not in _EditableMode.__members__:
            raise errors.OptionError(f"Invalid editable mode: {mode!r}. Try: 'strict'.")

        if _mode == "COMPAT":
            SetuptoolsDeprecationWarning.emit(
                "Compat editable installs",
                """
                The 'compat' editable mode is transitional and will be removed
                in future versions of `setuptools`.
                Please adapt your code accordingly to use either the 'strict' or the
                'lenient' modes.
                """,
                see_docs="userguide/development_mode.html",
                # TODO: define due_date
                # There is a series of shortcomings with the available editable install
                # methods, and they are very controversial. This is something that still
                # needs work.
                # Moreover, `pip` is still hiding this warning, so users are not aware.
            )

        return _EditableMode[_mode]


_STRICT_WARNING = """
New or renamed files may not be automatically picked up without a new installation.
"""

_LENIENT_WARNING = """
Options like `package-data`, `include/exclude-package-data` or
`packages.find.exclude/include` may have no effect.
"""


class editable_wheel(Command):
    """Build 'editable' wheel for development.
    This command is private and reserved for internal use of setuptools,
    users should rely on ``setuptools.build_meta`` APIs.
    """

    description = "DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"

    user_options = [
        ("dist-dir=", "d", "directory to put final built distributions in"),
        ("dist-info-dir=", "I", "path to a pre-build .dist-info directory"),
        ("mode=", None, cleandoc(_EditableMode.__doc__ or "")),
    ]

    def initialize_options(self):
        self.dist_dir = None
        self.dist_info_dir = None
        self.project_dir = None
        self.mode = None

    def finalize_options(self):
        dist = self.distribution
        self.project_dir = dist.src_root or os.curdir
        self.package_dir = dist.package_dir or {}
        self.dist_dir = Path(self.dist_dir or os.path.join(self.project_dir, "dist"))

    def run(self):
        try:
            self.dist_dir.mkdir(exist_ok=True)
            self._ensure_dist_info()

            # Add missing dist_info files
            self.reinitialize_command("bdist_wheel")
            bdist_wheel = self.get_finalized_command("bdist_wheel")
            bdist_wheel.write_wheelfile(self.dist_info_dir)

            self._create_wheel_file(bdist_wheel)
        except Exception:
            traceback.print_exc()
            project = self.distribution.name or self.distribution.get_name()
            _DebuggingTips.emit(project=project)
            raise

    def _ensure_dist_info(self):
        if self.dist_info_dir is None:
            dist_info = self.reinitialize_command("dist_info")
            dist_info.output_dir = self.dist_dir
            dist_info.ensure_finalized()
            dist_info.run()
            self.dist_info_dir = dist_info.dist_info_dir
        else:
            assert str(self.dist_info_dir).endswith(".dist-info")
            assert Path(self.dist_info_dir, "METADATA").exists()

    def _install_namespaces(self, installation_dir, pth_prefix):
        # XXX: Only required to support the deprecated namespace practice
        dist = self.distribution
        if not dist.namespace_packages:
            return

        src_root = Path(self.project_dir, self.package_dir.get("", ".")).resolve()
        installer = _NamespaceInstaller(dist, installation_dir, pth_prefix, src_root)
        installer.install_namespaces()

    def _find_egg_info_dir(self) -> Optional[str]:
        parent_dir = Path(self.dist_info_dir).parent if self.dist_info_dir else Path()
        candidates = map(str, parent_dir.glob("*.egg-info"))
        return next(candidates, None)

    def _configure_build(
        self, name: str, unpacked_wheel: _Path, build_lib: _Path, tmp_dir: _Path
    ):
        """Configure commands to behave in the following ways:

        - Build commands can write to ``build_lib`` if they really want to...
          (but this folder is expected to be ignored and modules are expected to live
          in the project directory...)
        - Binary extensions should be built in-place (editable_mode = True)
        - Data/header/script files are not part of the "editable" specification
          so they are written directly to the unpacked_wheel directory.
        """
        # Non-editable files (data, headers, scripts) are written directly to the
        # unpacked_wheel

        dist = self.distribution
        wheel = str(unpacked_wheel)
        build_lib = str(build_lib)
        data = str(Path(unpacked_wheel, f"{name}.data", "data"))
        headers = str(Path(unpacked_wheel, f"{name}.data", "headers"))
        scripts = str(Path(unpacked_wheel, f"{name}.data", "scripts"))

        # egg-info may be generated again to create a manifest (used for package data)
        egg_info = dist.reinitialize_command("egg_info", reinit_subcommands=True)
        egg_info.egg_base = str(tmp_dir)
        egg_info.ignore_egg_info_in_manifest = True

        build = dist.reinitialize_command("build", reinit_subcommands=True)
        install = dist.reinitialize_command("install", reinit_subcommands=True)

        build.build_platlib = build.build_purelib = build.build_lib = build_lib
        install.install_purelib = install.install_platlib = install.install_lib = wheel
        install.install_scripts = build.build_scripts = scripts
        install.install_headers = headers
        install.install_data = data

        install_scripts = dist.get_command_obj("install_scripts")
        install_scripts.no_ep = True

        build.build_temp = str(tmp_dir)

        build_py = dist.get_command_obj("build_py")
        build_py.compile = False
        build_py.existing_egg_info_dir = self._find_egg_info_dir()

        self._set_editable_mode()

        build.ensure_finalized()
        install.ensure_finalized()

    def _set_editable_mode(self):
        """Set the ``editable_mode`` flag in the build sub-commands"""
        dist = self.distribution
        build = dist.get_command_obj("build")
        for cmd_name in build.get_sub_commands():
            cmd = dist.get_command_obj(cmd_name)
            if hasattr(cmd, "editable_mode"):
                cmd.editable_mode = True
            elif hasattr(cmd, "inplace"):
                cmd.inplace = True  # backward compatibility with distutils

    def _collect_build_outputs(self) -> Tuple[List[str], Dict[str, str]]:
        files: List[str] = []
        mapping: Dict[str, str] = {}
        build = self.get_finalized_command("build")

        for cmd_name in build.get_sub_commands():
            cmd = self.get_finalized_command(cmd_name)
            if hasattr(cmd, "get_outputs"):
                files.extend(cmd.get_outputs() or [])
            if hasattr(cmd, "get_output_mapping"):
                mapping.update(cmd.get_output_mapping() or {})

        return files, mapping

    def _run_build_commands(
        self, dist_name: str, unpacked_wheel: _Path, build_lib: _Path, tmp_dir: _Path
    ) -> Tuple[List[str], Dict[str, str]]:
        self._configure_build(dist_name, unpacked_wheel, build_lib, tmp_dir)
        self._run_build_subcommands()
        files, mapping = self._collect_build_outputs()
        self._run_install("headers")
        self._run_install("scripts")
        self._run_install("data")
        return files, mapping

    def _run_build_subcommands(self):
        """
        Issue #3501 indicates that some plugins/customizations might rely on:

        1. ``build_py`` not running
        2. ``build_py`` always copying files to ``build_lib``

        However both these assumptions may be false in editable_wheel.
        This method implements a temporary workaround to support the ecosystem
        while the implementations catch up.
        """
        # TODO: Once plugins/customisations had the chance to catch up, replace
        #       `self._run_build_subcommands()` with `self.run_command("build")`.
        #       Also remove _safely_run, TestCustomBuildPy. Suggested date: Aug/2023.
        build: Command = self.get_finalized_command("build")
        for name in build.get_sub_commands():
            cmd = self.get_finalized_command(name)
            if name == "build_py" and type(cmd) != build_py_cls:
                self._safely_run(name)
            else:
                self.run_command(name)

    def _safely_run(self, cmd_name: str):
        try:
            return self.run_command(cmd_name)
        except Exception:
            SetuptoolsDeprecationWarning.emit(
                "Customization incompatible with editable install",
                f"""
                {traceback.format_exc()}

                If you are seeing this warning it is very likely that a setuptools
                plugin or customization overrides the `{cmd_name}` command, without
                taking into consideration how editable installs run build steps
                starting from setuptools v64.0.0.

                Plugin authors and developers relying on custom build steps are
                encouraged to update their `{cmd_name}` implementation considering the
                information about editable installs in
                https://setuptools.pypa.io/en/latest/userguide/extension.html.

                For the time being `setuptools` will silence this error and ignore
                the faulty command, but this behaviour will change in future versions.
                """,
                # TODO: define due_date
                # There is a series of shortcomings with the available editable install
                # methods, and they are very controversial. This is something that still
                # needs work.
            )

    def _create_wheel_file(self, bdist_wheel):
        from wheel.wheelfile import WheelFile

        dist_info = self.get_finalized_command("dist_info")
        dist_name = dist_info.name
        tag = "-".join(bdist_wheel.get_tag())
        build_tag = "0.editable"  # According to PEP 427 needs to start with digit
        archive_name = f"{dist_name}-{build_tag}-{tag}.whl"
        wheel_path = Path(self.dist_dir, archive_name)
        if wheel_path.exists():
            wheel_path.unlink()

        unpacked_wheel = TemporaryDirectory(suffix=archive_name)
        build_lib = TemporaryDirectory(suffix=".build-lib")
        build_tmp = TemporaryDirectory(suffix=".build-temp")

        with unpacked_wheel as unpacked, build_lib as lib, build_tmp as tmp:
            unpacked_dist_info = Path(unpacked, Path(self.dist_info_dir).name)
            shutil.copytree(self.dist_info_dir, unpacked_dist_info)
            self._install_namespaces(unpacked, dist_name)
            files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
            strategy = self._select_strategy(dist_name, tag, lib)
            with strategy, WheelFile(wheel_path, "w") as wheel_obj:
                strategy(wheel_obj, files, mapping)
                wheel_obj.write_files(unpacked)

        return wheel_path

    def _run_install(self, category: str):
        has_category = getattr(self.distribution, f"has_{category}", None)
        if has_category and has_category():
            _logger.info(f"Installing {category} as non editable")
            self.run_command(f"install_{category}")

    def _select_strategy(
        self,
        name: str,
        tag: str,
        build_lib: _Path,
    ) -> "EditableStrategy":
        """Decides which strategy to use to implement an editable installation."""
        build_name = f"__editable__.{name}-{tag}"
        project_dir = Path(self.project_dir)
        mode = _EditableMode.convert(self.mode)

        if mode is _EditableMode.STRICT:
            auxiliary_dir = _empty_dir(Path(self.project_dir, "build", build_name))
            return _LinkTree(self.distribution, name, auxiliary_dir, build_lib)

        packages = _find_packages(self.distribution)
        has_simple_layout = _simple_layout(packages, self.package_dir, project_dir)
        is_compat_mode = mode is _EditableMode.COMPAT
        if set(self.package_dir) == {""} and has_simple_layout or is_compat_mode:
            # src-layout(ish) is relatively safe for a simple pth file
            src_dir = self.package_dir.get("", ".")
            return _StaticPth(self.distribution, name, [Path(project_dir, src_dir)])

        # Use a MetaPathFinder to avoid adding accidental top-level packages/modules
        return _TopLevelFinder(self.distribution, name)


class EditableStrategy(Protocol):
    def __call__(self, wheel: "WheelFile", files: List[str], mapping: Dict[str, str]):
        ...

    def __enter__(self):
        ...

    def __exit__(self, _exc_type, _exc_value, _traceback):
        ...


class _StaticPth:
    def __init__(self, dist: Distribution, name: str, path_entries: List[Path]):
        self.dist = dist
        self.name = name
        self.path_entries = path_entries

    def __call__(self, wheel: "WheelFile", files: List[str], mapping: Dict[str, str]):
        entries = "\n".join((str(p.resolve()) for p in self.path_entries))
        contents = _encode_pth(f"{entries}\n")
        wheel.writestr(f"__editable__.{self.name}.pth", contents)

    def __enter__(self):
        msg = f"""
        Editable install will be performed using .pth file to extend `sys.path` with:
        {list(map(os.fspath, self.path_entries))!r}
        """
        _logger.warning(msg + _LENIENT_WARNING)
        return self

    def __exit__(self, _exc_type, _exc_value, _traceback):
        ...


class _LinkTree(_StaticPth):
    """
    Creates a ``.pth`` file that points to a link tree in the ``auxiliary_dir``.

    This strategy will only link files (not dirs), so it can be implemented in
    any OS, even if that means using hardlinks instead of symlinks.

    By collocating ``auxiliary_dir`` and the original source code, limitations
    with hardlinks should be avoided.
    """

    def __init__(
        self,
        dist: Distribution,
        name: str,
        auxiliary_dir: _Path,
        build_lib: _Path,
    ):
        self.auxiliary_dir = Path(auxiliary_dir)
        self.build_lib = Path(build_lib).resolve()
        self._file = dist.get_command_obj("build_py").copy_file
        super().__init__(dist, name, [self.auxiliary_dir])

    def __call__(self, wheel: "WheelFile", files: List[str], mapping: Dict[str, str]):
        self._create_links(files, mapping)
        super().__call__(wheel, files, mapping)

    def _normalize_output(self, file: str) -> Optional[str]:
        # Files relative to build_lib will be normalized to None
        with suppress(ValueError):
            path = Path(file).resolve().relative_to(self.build_lib)
            return str(path).replace(os.sep, '/')
        return None

    def _create_file(self, relative_output: str, src_file: str, link=None):
        dest = self.auxiliary_dir / relative_output
        if not dest.parent.is_dir():
            dest.parent.mkdir(parents=True)
        self._file(src_file, dest, link=link)

    def _create_links(self, outputs, output_mapping):
        self.auxiliary_dir.mkdir(parents=True, exist_ok=True)
        link_type = "sym" if _can_symlink_files(self.auxiliary_dir) else "hard"
        mappings = {self._normalize_output(k): v for k, v in output_mapping.items()}
        mappings.pop(None, None)  # remove files that are not relative to build_lib

        for output in outputs:
            relative = self._normalize_output(output)
            if relative and relative not in mappings:
                self._create_file(relative, output)

        for relative, src in mappings.items():
            self._create_file(relative, src, link=link_type)

    def __enter__(self):
        msg = "Strict editable install will be performed using a link tree.\n"
        _logger.warning(msg + _STRICT_WARNING)
        return self

    def __exit__(self, _exc_type, _exc_value, _traceback):
        msg = f"""\n
        Strict editable installation performed using the auxiliary directory:
            {self.auxiliary_dir}

        Please be careful to not remove this directory, otherwise you might not be able
        to import/use your package.
        """
        InformationOnly.emit("Editable installation.", msg)


class _TopLevelFinder:
    def __init__(self, dist: Distribution, name: str):
        self.dist = dist
        self.name = name

    def __call__(self, wheel: "WheelFile", files: List[str], mapping: Dict[str, str]):
        src_root = self.dist.src_root or os.curdir
        top_level = chain(_find_packages(self.dist), _find_top_level_modules(self.dist))
        package_dir = self.dist.package_dir or {}
        roots = _find_package_roots(top_level, package_dir, src_root)

        namespaces_: Dict[str, List[str]] = dict(
            chain(
                _find_namespaces(self.dist.packages or [], roots),
                ((ns, []) for ns in _find_virtual_namespaces(roots)),
            )
        )

        legacy_namespaces = {
            pkg: find_package_path(pkg, roots, self.dist.src_root or "")
            for pkg in self.dist.namespace_packages or []
        }

        mapping = {**roots, **legacy_namespaces}
        # ^-- We need to explicitly add the legacy_namespaces to the mapping to be
        #     able to import their modules even if another package sharing the same
        #     namespace is installed in a conventional (non-editable) way.

        name = f"__editable__.{self.name}.finder"
        finder = _normalization.safe_identifier(name)
        content = bytes(_finder_template(name, mapping, namespaces_), "utf-8")
        wheel.writestr(f"{finder}.py", content)

        content = _encode_pth(f"import {finder}; {finder}.install()")
        wheel.writestr(f"__editable__.{self.name}.pth", content)

    def __enter__(self):
        msg = "Editable install will be performed using a meta path finder.\n"
        _logger.warning(msg + _LENIENT_WARNING)
        return self

    def __exit__(self, _exc_type, _exc_value, _traceback):
        msg = """\n
        Please be careful with folders in your working directory with the same
        name as your package as they may take precedence during imports.
        """
        InformationOnly.emit("Editable installation.", msg)


def _encode_pth(content: str) -> bytes:
    """.pth files are always read with 'locale' encoding, the recommendation
    from the cpython core developers is to write them as ``open(path, "w")``
    and ignore warnings (see python/cpython#77102, pypa/setuptools#3937).
    This function tries to simulate this behaviour without having to create an
    actual file, in a way that supports a range of active Python versions.
    (There seems to be some variety in the way different version of Python handle
    ``encoding=None``, not all of them use ``locale.getpreferredencoding(False)``).
    """
    encoding = "locale" if sys.version_info >= (3, 10) else None
    with io.BytesIO() as buffer:
        wrapper = io.TextIOWrapper(buffer, encoding)
        wrapper.write(content)
        wrapper.flush()
        buffer.seek(0)
        return buffer.read()


def _can_symlink_files(base_dir: Path) -> bool:
    with TemporaryDirectory(dir=str(base_dir.resolve())) as tmp:
        path1, path2 = Path(tmp, "file1.txt"), Path(tmp, "file2.txt")
        path1.write_text("file1", encoding="utf-8")
        with suppress(AttributeError, NotImplementedError, OSError):
            os.symlink(path1, path2)
            if path2.is_symlink() and path2.read_text(encoding="utf-8") == "file1":
                return True

        try:
            os.link(path1, path2)  # Ensure hard links can be created
        except Exception as ex:
            msg = (
                "File system does not seem to support either symlinks or hard links. "
                "Strict editable installs require one of them to be supported."
            )
            raise LinksNotSupported(msg) from ex
        return False


def _simple_layout(
    packages: Iterable[str], package_dir: Dict[str, str], project_dir: Path
) -> bool:
    """Return ``True`` if:
    - all packages are contained by the same parent directory, **and**
    - all packages become importable if the parent directory is added to ``sys.path``.

    >>> _simple_layout(['a'], {"": "src"}, "/tmp/myproj")
    True
    >>> _simple_layout(['a', 'a.b'], {"": "src"}, "/tmp/myproj")
    True
    >>> _simple_layout(['a', 'a.b'], {}, "/tmp/myproj")
    True
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"": "src"}, "/tmp/myproj")
    True
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "a", "b": "b"}, ".")
    True
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a", "b": "_b"}, ".")
    False
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a"}, "/tmp/myproj")
    False
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a.a1.a2": "_a2"}, ".")
    False
    >>> _simple_layout(['a', 'a.b'], {"": "src", "a.b": "_ab"}, "/tmp/myproj")
    False
    >>> # Special cases, no packages yet:
    >>> _simple_layout([], {"": "src"}, "/tmp/myproj")
    True
    >>> _simple_layout([], {"a": "_a", "": "src"}, "/tmp/myproj")
    False
    """
    layout = {pkg: find_package_path(pkg, package_dir, project_dir) for pkg in packages}
    if not layout:
        return set(package_dir) in ({}, {""})
    parent = os.path.commonpath([_parent_path(k, v) for k, v in layout.items()])
    return all(
        _path.same_path(Path(parent, *key.split('.')), value)
        for key, value in layout.items()
    )


def _parent_path(pkg, pkg_path):
    """Infer the parent path containing a package, that if added to ``sys.path`` would
    allow importing that package.
    When ``pkg`` is directly mapped into a directory with a different name, return its
    own path.
    >>> _parent_path("a", "src/a")
    'src'
    >>> _parent_path("b", "src/c")
    'src/c'
    """
    parent = pkg_path[: -len(pkg)] if pkg_path.endswith(pkg) else pkg_path
    return parent.rstrip("/" + os.sep)


def _find_packages(dist: Distribution) -> Iterator[str]:
    yield from iter(dist.packages or [])

    py_modules = dist.py_modules or []
    nested_modules = [mod for mod in py_modules if "." in mod]
    if dist.ext_package:
        yield dist.ext_package
    else:
        ext_modules = dist.ext_modules or []
        nested_modules += [x.name for x in ext_modules if "." in x.name]

    for module in nested_modules:
        package, _, _ = module.rpartition(".")
        yield package


def _find_top_level_modules(dist: Distribution) -> Iterator[str]:
    py_modules = dist.py_modules or []
    yield from (mod for mod in py_modules if "." not in mod)

    if not dist.ext_package:
        ext_modules = dist.ext_modules or []
        yield from (x.name for x in ext_modules if "." not in x.name)


def _find_package_roots(
    packages: Iterable[str],
    package_dir: Mapping[str, str],
    src_root: _Path,
) -> Dict[str, str]:
    pkg_roots: Dict[str, str] = {
        pkg: _absolute_root(find_package_path(pkg, package_dir, src_root))
        for pkg in sorted(packages)
    }

    return _remove_nested(pkg_roots)


def _absolute_root(path: _Path) -> str:
    """Works for packages and top-level modules"""
    path_ = Path(path)
    parent = path_.parent

    if path_.exists():
        return str(path_.resolve())
    else:
        return str(parent.resolve() / path_.name)


def _find_virtual_namespaces(pkg_roots: Dict[str, str]) -> Iterator[str]:
    """By carefully designing ``package_dir``, it is possible to implement the logical
    structure of PEP 420 in a package without the corresponding directories.

    Moreover a parent package can be purposefully/accidentally skipped in the discovery
    phase (e.g. ``find_packages(include=["mypkg.*"])``, when ``mypkg.foo`` is included
    by ``mypkg`` itself is not).
    We consider this case to also be a virtual namespace (ignoring the original
    directory) to emulate a non-editable installation.

    This function will try to find these kinds of namespaces.
    """
    for pkg in pkg_roots:
        if "." not in pkg:
            continue
        parts = pkg.split(".")
        for i in range(len(parts) - 1, 0, -1):
            partial_name = ".".join(parts[:i])
            path = Path(find_package_path(partial_name, pkg_roots, ""))
            if not path.exists() or partial_name not in pkg_roots:
                # partial_name not in pkg_roots ==> purposefully/accidentally skipped
                yield partial_name


def _find_namespaces(
    packages: List[str], pkg_roots: Dict[str, str]
) -> Iterator[Tuple[str, List[str]]]:
    for pkg in packages:
        path = find_package_path(pkg, pkg_roots, "")
        if Path(path).exists() and not Path(path, "__init__.py").exists():
            yield (pkg, [path])


def _remove_nested(pkg_roots: Dict[str, str]) -> Dict[str, str]:
    output = dict(pkg_roots.copy())

    for pkg, path in reversed(list(pkg_roots.items())):
        if any(
            pkg != other and _is_nested(pkg, path, other, other_path)
            for other, other_path in pkg_roots.items()
        ):
            output.pop(pkg)

    return output


def _is_nested(pkg: str, pkg_path: str, parent: str, parent_path: str) -> bool:
    """
    Return ``True`` if ``pkg`` is nested inside ``parent`` both logically and in the
    file system.
    >>> _is_nested("a.b", "path/a/b", "a", "path/a")
    True
    >>> _is_nested("a.b", "path/a/b", "a", "otherpath/a")
    False
    >>> _is_nested("a.b", "path/a/b", "c", "path/c")
    False
    >>> _is_nested("a.a", "path/a/a", "a", "path/a")
    True
    >>> _is_nested("b.a", "path/b/a", "a", "path/a")
    False
    """
    norm_pkg_path = _path.normpath(pkg_path)
    rest = pkg.replace(parent, "", 1).strip(".").split(".")
    return pkg.startswith(parent) and norm_pkg_path == _path.normpath(
        Path(parent_path, *rest)
    )


def _empty_dir(dir_: _P) -> _P:
    """Create a directory ensured to be empty. Existing files may be removed."""
    shutil.rmtree(dir_, ignore_errors=True)
    os.makedirs(dir_)
    return dir_


class _NamespaceInstaller(namespaces.Installer):
    def __init__(self, distribution, installation_dir, editable_name, src_root):
        self.distribution = distribution
        self.src_root = src_root
        self.installation_dir = installation_dir
        self.editable_name = editable_name
        self.outputs = []
        self.dry_run = False

    def _get_nspkg_file(self):
        """Installation target."""
        return os.path.join(self.installation_dir, self.editable_name + self.nspkg_ext)

    def _get_root(self):
        """Where the modules/packages should be loaded from."""
        return repr(str(self.src_root))


_FINDER_TEMPLATE = """\
import sys
from importlib.machinery import ModuleSpec, PathFinder
from importlib.machinery import all_suffixes as module_suffixes
from importlib.util import spec_from_file_location
from itertools import chain
from pathlib import Path

MAPPING = {mapping!r}
NAMESPACES = {namespaces!r}
PATH_PLACEHOLDER = {name!r} + ".__path_hook__"


class _EditableFinder:  # MetaPathFinder
    @classmethod
    def find_spec(cls, fullname, path=None, target=None):
        extra_path = []

        # Top-level packages and modules (we know these exist in the FS)
        if fullname in MAPPING:
            pkg_path = MAPPING[fullname]
            return cls._find_spec(fullname, Path(pkg_path))

        # Handle immediate children modules (required for namespaces to work)
        # To avoid problems with case sensitivity in the file system we delegate
        # to the importlib.machinery implementation.
        parent, _, child = fullname.rpartition(".")
        if parent and parent in MAPPING:
            return PathFinder.find_spec(fullname, path=[MAPPING[parent], *extra_path])

        # Other levels of nesting should be handled automatically by importlib
        # using the parent path.
        return None

    @classmethod
    def _find_spec(cls, fullname, candidate_path):
        init = candidate_path / "__init__.py"
        candidates = (candidate_path.with_suffix(x) for x in module_suffixes())
        for candidate in chain([init], candidates):
            if candidate.exists():
                return spec_from_file_location(fullname, candidate)


class _EditableNamespaceFinder:  # PathEntryFinder
    @classmethod
    def _path_hook(cls, path):
        if path == PATH_PLACEHOLDER:
            return cls
        raise ImportError

    @classmethod
    def _paths(cls, fullname):
        # Ensure __path__ is not empty for the spec to be considered a namespace.
        return NAMESPACES[fullname] or MAPPING.get(fullname) or [PATH_PLACEHOLDER]

    @classmethod
    def find_spec(cls, fullname, target=None):
        if fullname in NAMESPACES:
            spec = ModuleSpec(fullname, None, is_package=True)
            spec.submodule_search_locations = cls._paths(fullname)
            return spec
        return None

    @classmethod
    def find_module(cls, fullname):
        return None


def install():
    if not any(finder == _EditableFinder for finder in sys.meta_path):
        sys.meta_path.append(_EditableFinder)

    if not NAMESPACES:
        return

    if not any(hook == _EditableNamespaceFinder._path_hook for hook in sys.path_hooks):
        # PathEntryFinder is needed to create NamespaceSpec without private APIS
        sys.path_hooks.append(_EditableNamespaceFinder._path_hook)
    if PATH_PLACEHOLDER not in sys.path:
        sys.path.append(PATH_PLACEHOLDER)  # Used just to trigger the path hook
"""


def _finder_template(
    name: str, mapping: Mapping[str, str], namespaces: Dict[str, List[str]]
) -> str:
    """Create a string containing the code for the``MetaPathFinder`` and
    ``PathEntryFinder``.
    """
    mapping = dict(sorted(mapping.items(), key=lambda p: p[0]))
    return _FINDER_TEMPLATE.format(name=name, mapping=mapping, namespaces=namespaces)


class LinksNotSupported(errors.FileError):
    """File system does not seem to support either symlinks or hard links."""


class _DebuggingTips(SetuptoolsWarning):
    _SUMMARY = "Problem in editable installation."
    _DETAILS = """
    An error happened while installing `{project}` in editable mode.

    The following steps are recommended to help debug this problem:

    - Try to install the project normally, without using the editable mode.
      Does the error still persist?
      (If it does, try fixing the problem before attempting the editable mode).
    - If you are using binary extensions, make sure you have all OS-level
      dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
    - Try the latest version of setuptools (maybe the error was already fixed).
    - If you (or your project dependencies) are using any setuptools extension
      or customization, make sure they support the editable mode.

    After following the steps above, if the problem still persists and
    you think this is related to how setuptools handles editable installations,
    please submit a reproducible example
    (see https://stackoverflow.com/help/minimal-reproducible-example) to:

        https://github.com/pypa/setuptools/issues
    """
    _SEE_DOCS = "userguide/development_mode.html"
python3.12/site-packages/setuptools/command/build_ext.py000064400000042140151732703450017311 0ustar00import os
import sys
import itertools
from importlib.machinery import EXTENSION_SUFFIXES
from importlib.util import cache_from_source as _compiled_file_name
from typing import Dict, Iterator, List, Tuple
from pathlib import Path

from distutils.command.build_ext import build_ext as _du_build_ext
from distutils.ccompiler import new_compiler
from distutils.sysconfig import customize_compiler, get_config_var
from distutils import log

from setuptools.errors import BaseError
from setuptools.extension import Extension, Library

try:
    # Attempt to use Cython for building extensions, if available
    from Cython.Distutils.build_ext import build_ext as _build_ext

    # Additionally, assert that the compiler module will load
    # also. Ref #1229.
    __import__('Cython.Compiler.Main')
except ImportError:
    _build_ext = _du_build_ext

# make sure _config_vars is initialized
get_config_var("LDSHARED")
from distutils.sysconfig import _config_vars as _CONFIG_VARS  # noqa


def _customize_compiler_for_shlib(compiler):
    if sys.platform == "darwin":
        # building .dylib requires additional compiler flags on OSX; here we
        # temporarily substitute the pyconfig.h variables so that distutils'
        # 'customize_compiler' uses them before we build the shared libraries.
        tmp = _CONFIG_VARS.copy()
        try:
            # XXX Help!  I don't have any idea whether these are right...
            _CONFIG_VARS[
                'LDSHARED'
            ] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup"
            _CONFIG_VARS['CCSHARED'] = " -dynamiclib"
            _CONFIG_VARS['SO'] = ".dylib"
            customize_compiler(compiler)
        finally:
            _CONFIG_VARS.clear()
            _CONFIG_VARS.update(tmp)
    else:
        customize_compiler(compiler)


have_rtld = False
use_stubs = False
libtype = 'shared'

if sys.platform == "darwin":
    use_stubs = True
elif os.name != 'nt':
    try:
        import dl

        use_stubs = have_rtld = hasattr(dl, 'RTLD_NOW')
    except ImportError:
        pass


def if_dl(s):
    return s if have_rtld else ''


def get_abi3_suffix():
    """Return the file extension for an abi3-compliant Extension()"""
    for suffix in EXTENSION_SUFFIXES:
        if '.abi3' in suffix:  # Unix
            return suffix
        elif suffix == '.pyd':  # Windows
            return suffix


class build_ext(_build_ext):
    editable_mode: bool = False
    inplace: bool = False

    def run(self):
        """Build extensions in build directory, then copy if --inplace"""
        old_inplace, self.inplace = self.inplace, 0
        _build_ext.run(self)
        self.inplace = old_inplace
        if old_inplace:
            self.copy_extensions_to_source()

    def _get_inplace_equivalent(self, build_py, ext: Extension) -> Tuple[str, str]:
        fullname = self.get_ext_fullname(ext.name)
        filename = self.get_ext_filename(fullname)
        modpath = fullname.split('.')
        package = '.'.join(modpath[:-1])
        package_dir = build_py.get_package_dir(package)
        inplace_file = os.path.join(package_dir, os.path.basename(filename))
        regular_file = os.path.join(self.build_lib, filename)
        return (inplace_file, regular_file)

    def copy_extensions_to_source(self):
        build_py = self.get_finalized_command('build_py')
        for ext in self.extensions:
            inplace_file, regular_file = self._get_inplace_equivalent(build_py, ext)

            # Always copy, even if source is older than destination, to ensure
            # that the right extensions for the current Python/platform are
            # used.
            if os.path.exists(regular_file) or not ext.optional:
                self.copy_file(regular_file, inplace_file, level=self.verbose)

            if ext._needs_stub:
                inplace_stub = self._get_equivalent_stub(ext, inplace_file)
                self._write_stub_file(inplace_stub, ext, compile=True)
                # Always compile stub and remove the original (leave the cache behind)
                # (this behaviour was observed in previous iterations of the code)

    def _get_equivalent_stub(self, ext: Extension, output_file: str) -> str:
        dir_ = os.path.dirname(output_file)
        _, _, name = ext.name.rpartition(".")
        return f"{os.path.join(dir_, name)}.py"

    def _get_output_mapping(self) -> Iterator[Tuple[str, str]]:
        if not self.inplace:
            return

        build_py = self.get_finalized_command('build_py')
        opt = self.get_finalized_command('install_lib').optimize or ""

        for ext in self.extensions:
            inplace_file, regular_file = self._get_inplace_equivalent(build_py, ext)
            yield (regular_file, inplace_file)

            if ext._needs_stub:
                # This version of `build_ext` always builds artifacts in another dir,
                # when "inplace=True" is given it just copies them back.
                # This is done in the `copy_extensions_to_source` function, which
                # always compile stub files via `_compile_and_remove_stub`.
                # At the end of the process, a `.pyc` stub file is created without the
                # corresponding `.py`.

                inplace_stub = self._get_equivalent_stub(ext, inplace_file)
                regular_stub = self._get_equivalent_stub(ext, regular_file)
                inplace_cache = _compiled_file_name(inplace_stub, optimization=opt)
                output_cache = _compiled_file_name(regular_stub, optimization=opt)
                yield (output_cache, inplace_cache)

    def get_ext_filename(self, fullname):
        so_ext = os.getenv('SETUPTOOLS_EXT_SUFFIX')
        if so_ext:
            filename = os.path.join(*fullname.split('.')) + so_ext
        else:
            filename = _build_ext.get_ext_filename(self, fullname)
            so_ext = get_config_var('EXT_SUFFIX')

        if fullname in self.ext_map:
            ext = self.ext_map[fullname]
            use_abi3 = getattr(ext, 'py_limited_api') and get_abi3_suffix()
            if use_abi3:
                filename = filename[: -len(so_ext)]
                so_ext = get_abi3_suffix()
                filename = filename + so_ext
            if isinstance(ext, Library):
                fn, ext = os.path.splitext(filename)
                return self.shlib_compiler.library_filename(fn, libtype)
            elif use_stubs and ext._links_to_dynamic:
                d, fn = os.path.split(filename)
                return os.path.join(d, 'dl-' + fn)
        return filename

    def initialize_options(self):
        _build_ext.initialize_options(self)
        self.shlib_compiler = None
        self.shlibs = []
        self.ext_map = {}
        self.editable_mode = False

    def finalize_options(self):
        _build_ext.finalize_options(self)
        self.extensions = self.extensions or []
        self.check_extensions_list(self.extensions)
        self.shlibs = [ext for ext in self.extensions if isinstance(ext, Library)]
        if self.shlibs:
            self.setup_shlib_compiler()
        for ext in self.extensions:
            ext._full_name = self.get_ext_fullname(ext.name)
        for ext in self.extensions:
            fullname = ext._full_name
            self.ext_map[fullname] = ext

            # distutils 3.1 will also ask for module names
            # XXX what to do with conflicts?
            self.ext_map[fullname.split('.')[-1]] = ext

            ltd = self.shlibs and self.links_to_dynamic(ext) or False
            ns = ltd and use_stubs and not isinstance(ext, Library)
            ext._links_to_dynamic = ltd
            ext._needs_stub = ns
            filename = ext._file_name = self.get_ext_filename(fullname)
            libdir = os.path.dirname(os.path.join(self.build_lib, filename))
            if ltd and libdir not in ext.library_dirs:
                ext.library_dirs.append(libdir)
            if ltd and use_stubs and os.curdir not in ext.runtime_library_dirs:
                ext.runtime_library_dirs.append(os.curdir)

        if self.editable_mode:
            self.inplace = True

    def setup_shlib_compiler(self):
        compiler = self.shlib_compiler = new_compiler(
            compiler=self.compiler, dry_run=self.dry_run, force=self.force
        )
        _customize_compiler_for_shlib(compiler)

        if self.include_dirs is not None:
            compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for name, value in self.define:
                compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                compiler.undefine_macro(macro)
        if self.libraries is not None:
            compiler.set_libraries(self.libraries)
        if self.library_dirs is not None:
            compiler.set_library_dirs(self.library_dirs)
        if self.rpath is not None:
            compiler.set_runtime_library_dirs(self.rpath)
        if self.link_objects is not None:
            compiler.set_link_objects(self.link_objects)

        # hack so distutils' build_extension() builds a library instead
        compiler.link_shared_object = link_shared_object.__get__(compiler)

    def get_export_symbols(self, ext):
        if isinstance(ext, Library):
            return ext.export_symbols
        return _build_ext.get_export_symbols(self, ext)

    def build_extension(self, ext):
        ext._convert_pyx_sources_to_lang()
        _compiler = self.compiler
        try:
            if isinstance(ext, Library):
                self.compiler = self.shlib_compiler
            _build_ext.build_extension(self, ext)
            if ext._needs_stub:
                build_lib = self.get_finalized_command('build_py').build_lib
                self.write_stub(build_lib, ext)
        finally:
            self.compiler = _compiler

    def links_to_dynamic(self, ext):
        """Return true if 'ext' links to a dynamic lib in the same package"""
        # XXX this should check to ensure the lib is actually being built
        # XXX as dynamic, and not just using a locally-found version or a
        # XXX static-compiled version
        libnames = dict.fromkeys([lib._full_name for lib in self.shlibs])
        pkg = '.'.join(ext._full_name.split('.')[:-1] + [''])
        return any(pkg + libname in libnames for libname in ext.libraries)

    def get_source_files(self) -> List[str]:
        return [*_build_ext.get_source_files(self), *self._get_internal_depends()]

    def _get_internal_depends(self) -> Iterator[str]:
        """Yield ``ext.depends`` that are contained by the project directory"""
        project_root = Path(self.distribution.src_root or os.curdir).resolve()
        depends = (dep for ext in self.extensions for dep in ext.depends)

        def skip(orig_path: str, reason: str) -> None:
            log.info(
                "dependency %s won't be automatically "
                "included in the manifest: the path %s",
                orig_path,
                reason,
            )

        for dep in depends:
            path = Path(dep)

            if path.is_absolute():
                skip(dep, "must be relative")
                continue

            if ".." in path.parts:
                skip(dep, "can't have `..` segments")
                continue

            try:
                resolved = (project_root / path).resolve(strict=True)
            except OSError:
                skip(dep, "doesn't exist")
                continue

            try:
                resolved.relative_to(project_root)
            except ValueError:
                skip(dep, "must be inside the project root")
                continue

            yield path.as_posix()

    def get_outputs(self) -> List[str]:
        if self.inplace:
            return list(self.get_output_mapping().keys())
        return sorted(_build_ext.get_outputs(self) + self.__get_stubs_outputs())

    def get_output_mapping(self) -> Dict[str, str]:
        """See :class:`setuptools.commands.build.SubCommand`"""
        mapping = self._get_output_mapping()
        return dict(sorted(mapping, key=lambda x: x[0]))

    def __get_stubs_outputs(self):
        # assemble the base name for each extension that needs a stub
        ns_ext_bases = (
            os.path.join(self.build_lib, *ext._full_name.split('.'))
            for ext in self.extensions
            if ext._needs_stub
        )
        # pair each base with the extension
        pairs = itertools.product(ns_ext_bases, self.__get_output_extensions())
        return list(base + fnext for base, fnext in pairs)

    def __get_output_extensions(self):
        yield '.py'
        yield '.pyc'
        if self.get_finalized_command('build_py').optimize:
            yield '.pyo'

    def write_stub(self, output_dir, ext, compile=False):
        stub_file = os.path.join(output_dir, *ext._full_name.split('.')) + '.py'
        self._write_stub_file(stub_file, ext, compile)

    def _write_stub_file(self, stub_file: str, ext: Extension, compile=False):
        log.info("writing stub loader for %s to %s", ext._full_name, stub_file)
        if compile and os.path.exists(stub_file):
            raise BaseError(stub_file + " already exists! Please delete.")
        if not self.dry_run:
            f = open(stub_file, 'w')
            f.write(
                '\n'.join(
                    [
                        "def __bootstrap__():",
                        "   global __bootstrap__, __file__, __loader__",
                        "   import sys, os, pkg_resources, importlib.util"
                        + if_dl(", dl"),
                        "   __file__ = pkg_resources.resource_filename"
                        "(__name__,%r)" % os.path.basename(ext._file_name),
                        "   del __bootstrap__",
                        "   if '__loader__' in globals():",
                        "       del __loader__",
                        if_dl("   old_flags = sys.getdlopenflags()"),
                        "   old_dir = os.getcwd()",
                        "   try:",
                        "     os.chdir(os.path.dirname(__file__))",
                        if_dl("     sys.setdlopenflags(dl.RTLD_NOW)"),
                        "     spec = importlib.util.spec_from_file_location(",
                        "                __name__, __file__)",
                        "     mod = importlib.util.module_from_spec(spec)",
                        "     spec.loader.exec_module(mod)",
                        "   finally:",
                        if_dl("     sys.setdlopenflags(old_flags)"),
                        "     os.chdir(old_dir)",
                        "__bootstrap__()",
                        "",  # terminal \n
                    ]
                )
            )
            f.close()
        if compile:
            self._compile_and_remove_stub(stub_file)

    def _compile_and_remove_stub(self, stub_file: str):
        from distutils.util import byte_compile

        byte_compile([stub_file], optimize=0, force=True, dry_run=self.dry_run)
        optimize = self.get_finalized_command('install_lib').optimize
        if optimize > 0:
            byte_compile(
                [stub_file], optimize=optimize, force=True, dry_run=self.dry_run
            )
        if os.path.exists(stub_file) and not self.dry_run:
            os.unlink(stub_file)


if use_stubs or os.name == 'nt':
    # Build shared libraries
    #
    def link_shared_object(
        self,
        objects,
        output_libname,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        self.link(
            self.SHARED_LIBRARY,
            objects,
            output_libname,
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            export_symbols,
            debug,
            extra_preargs,
            extra_postargs,
            build_temp,
            target_lang,
        )

else:
    # Build static libraries everywhere else
    libtype = 'static'

    def link_shared_object(
        self,
        objects,
        output_libname,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        # XXX we need to either disallow these attrs on Library instances,
        # or warn/abort here if set, or something...
        # libraries=None, library_dirs=None, runtime_library_dirs=None,
        # export_symbols=None, extra_preargs=None, extra_postargs=None,
        # build_temp=None

        assert output_dir is None  # distutils build_ext doesn't pass this
        output_dir, filename = os.path.split(output_libname)
        basename, ext = os.path.splitext(filename)
        if self.library_filename("x").startswith('lib'):
            # strip 'lib' prefix; this is kludgy if some platform uses
            # a different prefix
            basename = basename[3:]

        self.create_static_lib(objects, basename, output_dir, debug, target_lang)
python3.12/site-packages/setuptools/command/launcher manifest.xml000064400000001164151732703450021073 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity version="1.0.0.0"
                      processorArchitecture="X86"
                      name="%(name)s"
                      type="win32"/>
    <!-- Identify the application security requirements. -->
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>
python3.12/site-packages/setuptools/command/register.py000064400000000724151732703450017160 0ustar00from distutils import log
import distutils.command.register as orig

from setuptools.errors import RemovedCommandError


class register(orig.register):
    """Formerly used to register packages on PyPI."""

    def run(self):
        msg = (
            "The register command has been removed, use twine to upload "
            + "instead (https://pypi.org/p/twine)"
        )

        self.announce("ERROR: " + msg, log.ERROR)

        raise RemovedCommandError(msg)
python3.12/site-packages/setuptools/command/bdist_egg.py000064400000040257151732703450017270 0ustar00"""setuptools.command.bdist_egg

Build .egg distributions"""

from distutils.dir_util import remove_tree, mkpath
from distutils import log
from types import CodeType
import sys
import os
import re
import textwrap
import marshal

from setuptools.extension import Library
from setuptools import Command
from .._path import ensure_directory

from sysconfig import get_path, get_python_version


def _get_purelib():
    return get_path("purelib")


def strip_module(filename):
    if '.' in filename:
        filename = os.path.splitext(filename)[0]
    if filename.endswith('module'):
        filename = filename[:-6]
    return filename


def sorted_walk(dir):
    """Do os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
    """
    for base, dirs, files in os.walk(dir):
        dirs.sort()
        files.sort()
        yield base, dirs, files


def write_stub(resource, pyfile):
    _stub_template = textwrap.dedent(
        """
        def __bootstrap__():
            global __bootstrap__, __loader__, __file__
            import sys, pkg_resources, importlib.util
            __file__ = pkg_resources.resource_filename(__name__, %r)
            __loader__ = None; del __bootstrap__, __loader__
            spec = importlib.util.spec_from_file_location(__name__,__file__)
            mod = importlib.util.module_from_spec(spec)
            spec.loader.exec_module(mod)
        __bootstrap__()
        """
    ).lstrip()
    with open(pyfile, 'w') as f:
        f.write(_stub_template % resource)


class bdist_egg(Command):
    description = "create an \"egg\" distribution"

    user_options = [
        ('bdist-dir=', 'b', "temporary directory for creating the distribution"),
        (
            'plat-name=',
            'p',
            "platform name to embed in generated filenames "
            "(by default uses `pkg_resources.get_build_platform()`)",
        ),
        ('exclude-source-files', None, "remove all .py files from the generated egg"),
        (
            'keep-temp',
            'k',
            "keep the pseudo-installation tree around after "
            + "creating the distribution archive",
        ),
        ('dist-dir=', 'd', "directory to put final built distributions in"),
        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
    ]

    boolean_options = ['keep-temp', 'skip-build', 'exclude-source-files']

    def initialize_options(self):
        self.bdist_dir = None
        self.plat_name = None
        self.keep_temp = 0
        self.dist_dir = None
        self.skip_build = 0
        self.egg_output = None
        self.exclude_source_files = None

    def finalize_options(self):
        ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info")
        self.egg_info = ei_cmd.egg_info

        if self.bdist_dir is None:
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'egg')

        if self.plat_name is None:
            from pkg_resources import get_build_platform

            self.plat_name = get_build_platform()

        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))

        if self.egg_output is None:
            # Compute filename of the output egg
            basename = ei_cmd._get_egg_basename(
                py_version=get_python_version(),
                platform=self.distribution.has_ext_modules() and self.plat_name,
            )

            self.egg_output = os.path.join(self.dist_dir, basename + '.egg')

    def do_install_data(self):
        # Hack for packages that install data to install's --install-lib
        self.get_finalized_command('install').install_lib = self.bdist_dir

        site_packages = os.path.normcase(os.path.realpath(_get_purelib()))
        old, self.distribution.data_files = self.distribution.data_files, []

        for item in old:
            if isinstance(item, tuple) and len(item) == 2:
                if os.path.isabs(item[0]):
                    realpath = os.path.realpath(item[0])
                    normalized = os.path.normcase(realpath)
                    if normalized == site_packages or normalized.startswith(
                        site_packages + os.sep
                    ):
                        item = realpath[len(site_packages) + 1 :], item[1]
                        # XXX else: raise ???
            self.distribution.data_files.append(item)

        try:
            log.info("installing package data to %s", self.bdist_dir)
            self.call_command('install_data', force=0, root=None)
        finally:
            self.distribution.data_files = old

    def get_outputs(self):
        return [self.egg_output]

    def call_command(self, cmdname, **kw):
        """Invoke reinitialized command `cmdname` with keyword args"""
        for dirname in INSTALL_DIRECTORY_ATTRS:
            kw.setdefault(dirname, self.bdist_dir)
        kw.setdefault('skip_build', self.skip_build)
        kw.setdefault('dry_run', self.dry_run)
        cmd = self.reinitialize_command(cmdname, **kw)
        self.run_command(cmdname)
        return cmd

    def run(self):  # noqa: C901  # is too complex (14)  # FIXME
        # Generate metadata first
        self.run_command("egg_info")
        # We run install_lib before install_data, because some data hacks
        # pull their data path from the install_lib command.
        log.info("installing library code to %s", self.bdist_dir)
        instcmd = self.get_finalized_command('install')
        old_root = instcmd.root
        instcmd.root = None
        if self.distribution.has_c_libraries() and not self.skip_build:
            self.run_command('build_clib')
        cmd = self.call_command('install_lib', warn_dir=0)
        instcmd.root = old_root

        all_outputs, ext_outputs = self.get_ext_outputs()
        self.stubs = []
        to_compile = []
        for p, ext_name in enumerate(ext_outputs):
            filename, ext = os.path.splitext(ext_name)
            pyfile = os.path.join(self.bdist_dir, strip_module(filename) + '.py')
            self.stubs.append(pyfile)
            log.info("creating stub loader for %s", ext_name)
            if not self.dry_run:
                write_stub(os.path.basename(ext_name), pyfile)
            to_compile.append(pyfile)
            ext_outputs[p] = ext_name.replace(os.sep, '/')

        if to_compile:
            cmd.byte_compile(to_compile)
        if self.distribution.data_files:
            self.do_install_data()

        # Make the EGG-INFO directory
        archive_root = self.bdist_dir
        egg_info = os.path.join(archive_root, 'EGG-INFO')
        self.mkpath(egg_info)
        if self.distribution.scripts:
            script_dir = os.path.join(egg_info, 'scripts')
            log.info("installing scripts to %s", script_dir)
            self.call_command('install_scripts', install_dir=script_dir, no_ep=1)

        self.copy_metadata_to(egg_info)
        native_libs = os.path.join(egg_info, "native_libs.txt")
        if all_outputs:
            log.info("writing %s", native_libs)
            if not self.dry_run:
                ensure_directory(native_libs)
                libs_file = open(native_libs, 'wt')
                libs_file.write('\n'.join(all_outputs))
                libs_file.write('\n')
                libs_file.close()
        elif os.path.isfile(native_libs):
            log.info("removing %s", native_libs)
            if not self.dry_run:
                os.unlink(native_libs)

        write_safety_flag(os.path.join(archive_root, 'EGG-INFO'), self.zip_safe())

        if os.path.exists(os.path.join(self.egg_info, 'depends.txt')):
            log.warn(
                "WARNING: 'depends.txt' will not be used by setuptools 0.6!\n"
                "Use the install_requires/extras_require setup() args instead."
            )

        if self.exclude_source_files:
            self.zap_pyfiles()

        # Make the archive
        make_zipfile(
            self.egg_output,
            archive_root,
            verbose=self.verbose,
            dry_run=self.dry_run,
            mode=self.gen_header(),
        )
        if not self.keep_temp:
            remove_tree(self.bdist_dir, dry_run=self.dry_run)

        # Add to 'Distribution.dist_files' so that the "upload" command works
        getattr(self.distribution, 'dist_files', []).append(
            ('bdist_egg', get_python_version(), self.egg_output)
        )

    def zap_pyfiles(self):
        log.info("Removing .py files from temporary directory")
        for base, dirs, files in walk_egg(self.bdist_dir):
            for name in files:
                path = os.path.join(base, name)

                if name.endswith('.py'):
                    log.debug("Deleting %s", path)
                    os.unlink(path)

                if base.endswith('__pycache__'):
                    path_old = path

                    pattern = r'(?P<name>.+)\.(?P<magic>[^.]+)\.pyc'
                    m = re.match(pattern, name)
                    path_new = os.path.join(base, os.pardir, m.group('name') + '.pyc')
                    log.info("Renaming file from [%s] to [%s]" % (path_old, path_new))
                    try:
                        os.remove(path_new)
                    except OSError:
                        pass
                    os.rename(path_old, path_new)

    def zip_safe(self):
        safe = getattr(self.distribution, 'zip_safe', None)
        if safe is not None:
            return safe
        log.warn("zip_safe flag not set; analyzing archive contents...")
        return analyze_egg(self.bdist_dir, self.stubs)

    def gen_header(self):
        return 'w'

    def copy_metadata_to(self, target_dir):
        "Copy metadata (egg info) to the target_dir"
        # normalize the path (so that a forward-slash in egg_info will
        # match using startswith below)
        norm_egg_info = os.path.normpath(self.egg_info)
        prefix = os.path.join(norm_egg_info, '')
        for path in self.ei_cmd.filelist.files:
            if path.startswith(prefix):
                target = os.path.join(target_dir, path[len(prefix) :])
                ensure_directory(target)
                self.copy_file(path, target)

    def get_ext_outputs(self):
        """Get a list of relative paths to C extensions in the output distro"""

        all_outputs = []
        ext_outputs = []

        paths = {self.bdist_dir: ''}
        for base, dirs, files in sorted_walk(self.bdist_dir):
            for filename in files:
                if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS:
                    all_outputs.append(paths[base] + filename)
            for filename in dirs:
                paths[os.path.join(base, filename)] = paths[base] + filename + '/'

        if self.distribution.has_ext_modules():
            build_cmd = self.get_finalized_command('build_ext')
            for ext in build_cmd.extensions:
                if isinstance(ext, Library):
                    continue
                fullname = build_cmd.get_ext_fullname(ext.name)
                filename = build_cmd.get_ext_filename(fullname)
                if not os.path.basename(filename).startswith('dl-'):
                    if os.path.exists(os.path.join(self.bdist_dir, filename)):
                        ext_outputs.append(filename)

        return all_outputs, ext_outputs


NATIVE_EXTENSIONS = dict.fromkeys('.dll .so .dylib .pyd'.split())


def walk_egg(egg_dir):
    """Walk an unpacked egg's contents, skipping the metadata directory"""
    walker = sorted_walk(egg_dir)
    base, dirs, files = next(walker)
    if 'EGG-INFO' in dirs:
        dirs.remove('EGG-INFO')
    yield base, dirs, files
    for bdf in walker:
        yield bdf


def analyze_egg(egg_dir, stubs):
    # check for existing flag in EGG-INFO
    for flag, fn in safety_flags.items():
        if os.path.exists(os.path.join(egg_dir, 'EGG-INFO', fn)):
            return flag
    if not can_scan():
        return False
    safe = True
    for base, dirs, files in walk_egg(egg_dir):
        for name in files:
            if name.endswith('.py') or name.endswith('.pyw'):
                continue
            elif name.endswith('.pyc') or name.endswith('.pyo'):
                # always scan, even if we already know we're not safe
                safe = scan_module(egg_dir, base, name, stubs) and safe
    return safe


def write_safety_flag(egg_dir, safe):
    # Write or remove zip safety flag file(s)
    for flag, fn in safety_flags.items():
        fn = os.path.join(egg_dir, fn)
        if os.path.exists(fn):
            if safe is None or bool(safe) != flag:
                os.unlink(fn)
        elif safe is not None and bool(safe) == flag:
            f = open(fn, 'wt')
            f.write('\n')
            f.close()


safety_flags = {
    True: 'zip-safe',
    False: 'not-zip-safe',
}


def scan_module(egg_dir, base, name, stubs):
    """Check whether module possibly uses unsafe-for-zipfile stuff"""

    filename = os.path.join(base, name)
    if filename[:-1] in stubs:
        return True  # Extension module
    pkg = base[len(egg_dir) + 1 :].replace(os.sep, '.')
    module = pkg + (pkg and '.' or '') + os.path.splitext(name)[0]
    if sys.version_info < (3, 7):
        skip = 12  # skip magic & date & file size
    else:
        skip = 16  # skip magic & reserved? & date & file size
    f = open(filename, 'rb')
    f.read(skip)
    code = marshal.load(f)
    f.close()
    safe = True
    symbols = dict.fromkeys(iter_symbols(code))
    for bad in ['__file__', '__path__']:
        if bad in symbols:
            log.warn("%s: module references %s", module, bad)
            safe = False
    if 'inspect' in symbols:
        for bad in [
            'getsource',
            'getabsfile',
            'getsourcefile',
            'getfile' 'getsourcelines',
            'findsource',
            'getcomments',
            'getframeinfo',
            'getinnerframes',
            'getouterframes',
            'stack',
            'trace',
        ]:
            if bad in symbols:
                log.warn("%s: module MAY be using inspect.%s", module, bad)
                safe = False
    return safe


def iter_symbols(code):
    """Yield names and strings used by `code` and its nested code objects"""
    for name in code.co_names:
        yield name
    for const in code.co_consts:
        if isinstance(const, str):
            yield const
        elif isinstance(const, CodeType):
            for name in iter_symbols(const):
                yield name


def can_scan():
    if not sys.platform.startswith('java') and sys.platform != 'cli':
        # CPython, PyPy, etc.
        return True
    log.warn("Unable to analyze compiled code on this platform.")
    log.warn(
        "Please ask the author to include a 'zip_safe'"
        " setting (either True or False) in the package's setup.py"
    )


# Attribute names of options for commands that might need to be convinced to
# install to the egg build directory

INSTALL_DIRECTORY_ATTRS = ['install_lib', 'install_dir', 'install_data', 'install_base']


def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=True, mode='w'):
    """Create a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    """
    import zipfile

    mkpath(os.path.dirname(zip_filename), dry_run=dry_run)
    log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir)

    def visit(z, dirname, names):
        for name in names:
            path = os.path.normpath(os.path.join(dirname, name))
            if os.path.isfile(path):
                p = path[len(base_dir) + 1 :]
                if not dry_run:
                    z.write(path, p)
                log.debug("adding '%s'", p)

    compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP_STORED
    if not dry_run:
        z = zipfile.ZipFile(zip_filename, mode, compression=compression)
        for dirname, dirs, files in sorted_walk(base_dir):
            visit(z, dirname, files)
        z.close()
    else:
        for dirname, dirs, files in sorted_walk(base_dir):
            visit(None, dirname, files)
    return zip_filename
python3.12/site-packages/setuptools/command/__pycache__/alias.cpython-312.pyc000064400000006772151732703450022777 0ustar00�

��_iO	��F�ddlmZddlmZmZmZd�ZGd�de�Zd�Zy)�)�DistutilsOptionError)�edit_config�option_base�config_filec�t�dD]}||vs�t|�cS|j�|gk7rt|�S|S)z4Quote an argument for later parsing by shlex.split())�"�'�\�#)�repr�split)�arg�cs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/alias.py�shquoters>��
 ����8���9��!��y�y�{�s�e���C�y���J�c�j�eZdZdZdZdZdgejzZejdgzZd�Z	d�Z
d�Zy	)
�aliasz3Define a shortcut that invokes one or more commandsz0define a shortcut to invoke one or more commandsT)�remove�rzremove (unset) the aliasrc�J�tj|�d|_d|_y)N)r�initialize_options�argsr��selfs rrzalias.initialize_optionss���&�&�t�,���	���rc��tj|�|jr$t|j�dk7rtd��yy)N�zFMust specify exactly one argument (the alias name) when using --remove)r�finalize_optionsr�lenrrrs rrzalias.finalize_options!s?���$�$�T�*��;�;�3�t�y�y�>�Q�.�&�!��
�/�;rc�8�|jjd�}|js4td�td�|D]}tdt	||���yt|j�dk(rG|j\}|jrd}ne||vrtdt	||��ytd|z�y|jd}djtt|jdd��}t|jd||ii|j�y)	N�aliaseszCommand Aliasesz---------------zsetup.py aliasrz No alias definition found for %rr� )
�distribution�get_option_dictr�print�format_aliasrr�join�maprr�filename�dry_run)rr!r�commands    r�runz	alias.run)s����#�#�3�3�I�>���y�y��#�$��#�$� ���&��U�G�(D�E�!��
����^�q�
 ��y�y�H�U��{�{����'�!��&��U�G�(D�E���8�5�@�A���I�I�a�L�E��h�h�s�7�D�I�I�a�b�M�:�;�G��D�M�M�I��w�/?�#@�$�,�,�OrN)�__name__�
__module__�__qualname__�__doc__�description�command_consumes_argumentsr�user_options�boolean_optionsrrr,�rrrrsN��=�D�K�!%��	4��� � �!�L�"�1�1�X�J�>�O��
�Prrc��||\}}|td�k(rd}n'|td�k(rd}n|td�k(rd}nd|z}||zdz|zS)	N�globalz--global-config �userz--user-config �local�z
--filename=%rr")r)�namer!�sourcer+s    rr&r&Dsc���d�m�O�F�G�
��X�&�&�#��	�;�v�&�	&�!��	�;�w�'�	'��� �6�)���D�=�3���(�(rN)	�distutils.errorsr�setuptools.command.setoptrrrrrr&r5rr�<module>r?s'��1�K�K��1P�K�1P�h
)rpython3.12/site-packages/setuptools/command/__pycache__/saveopts.cpython-312.pyc000064400000002433151732703450023540 0ustar00�

��_i���*�ddlmZmZGd�de�Zy)�)�edit_config�option_basec��eZdZdZdZd�Zy)�saveoptsz#Save command-line options to a filez7save supplied options to setup.cfg or other config filec��|j}i}|jD]M}|dk(r�	|j|�j�D]#\}\}}|dk(s�||j	|i�|<�%�Ot|j||j�y)Nrzcommand line)�distribution�command_options�get_option_dict�items�
setdefaultr�filename�dry_run)�self�dist�settings�cmd�opt�src�vals       ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/saveopts.py�runzsaveopts.run	s���� � �����'�'�C��j� ��#'�#7�#7��#<�#B�#B�#D���Z�c�3��.�(�8;�H�'�'��R�0��5�$E�	(�	�D�M�M�8�T�\�\�:�N)�__name__�
__module__�__qualname__�__doc__�descriptionr�rrrrs��-�K�K�;rrN)�setuptools.command.setoptrrrrrr�<module>r s��>�;�{�;rpython3.12/site-packages/setuptools/command/__pycache__/__init__.cpython-312.pyc000064400000001300151732703450023423 0ustar00�

��_i�����ddlmZddlZdejvr	dejd<[[y[[y#e$r/dej
d<ejj
d�Y[[ywxYw)�)�bdistN�egg)�	bdist_eggzPython .egg file)�distutils.command.bdistr�sys�format_commands�	TypeError�format_command�append����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/__init__.py�<module>rss��)�
���%�%�%�,�'H����e�$�
�3�E�3���,�&G����U�#�
���$�$�U�+�	�3�,�s�/�/A#�"A#python3.12/site-packages/setuptools/command/__pycache__/test.cpython-312.pyc000064400000031633151732703450022657 0ustar00�

��_i�����ddlZddlZddlZddlZddlZddlZddlmZmZddl	m
Z
ddlmZddlm
Z
mZmZmZmZmZmZddlmZddlmZdd	lmZdd
lmZGd�de�ZGd
�d�ZGd�de�Zy)�N)�DistutilsError�DistutilsOptionError)�log)�
TestLoader)�resource_listdir�resource_exists�normalize_path�working_set�evaluate_marker�add_activation_listener�require�)�metadata)�Command)�unique_everseen)�	pass_nonec��eZdZd�Zdd�Zy)�ScanningLoaderc�L�tj|�t�|_y�N)r�__init__�set�_visited��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/test.pyrzScanningLoader.__init__s�����D�!����
�Nc��||jvry|jj|�g}|jtj||��t|d�r|j|j
��t|d�r�t|jd�D]{}|jd�r|dk7r|jdz|ddz}n-t|j|d	z�r|jdz|z}n�\|j|j|���}t|�d
k7r|j|�S|dS)aReturn a suite of all tests cases contained in the given module

        If the module is a package, load tests from all the modules in it.
        If the module has an ``additional_tests`` function, call it and add
        the return value to the tests.
        N�additional_tests�__path__�z.pyz__init__.py�.���z/__init__.py�r)r�add�appendr�loadTestsFromModule�hasattrrr�__name__�endswithr�loadTestsFromName�len�
suiteClass)r�module�pattern�tests�file�	submodules      rr'z"ScanningLoader.loadTestsFromModules���T�]�]�"���
�
���&�!���
���Z�3�3�D�&�A�B��6�-�.��L�L��0�0�2�3��6�:�&�(����"�=���=�=��'�D�M�,A� &���#� 5��S�b�	� A�I�&�v����~�8M�N�$*�O�O�c�$9�D�$@�	� ����T�3�3�I�>�?�>��u�:��?��?�?�5�)�)���8�Orr)r)�
__module__�__qualname__rr'�rrrrs���rrc��eZdZd�Zdd�Zy)�NonDataPropertyc��||_yr��fget)rr:s  rrzNonDataProperty.__init__Cs	����	rNc�,�|�|S|j|�Srr9)r�obj�objtypes   r�__get__zNonDataProperty.__get__Fs���;��K��y�y��~�rr)r)r3r4rr>r5rrr7r7Bs���rr7c���eZdZdZdZgd�Zd�Zd�Zed��Z	d�Z
d�Zejgfd	��Zeejd
���Zed��Zd�Zd
�Zed��Zeed���Zy)�testz.Command to run unit tests after in-place buildz0run unit tests after in-place build (deprecated)))ztest-module=�mz$Run 'test_suite' in specified module)ztest-suite=�sz9Run single test, case or suite (e.g. 'module.test_suite'))ztest-runner=�rzTest runner to usec�<�d|_d|_d|_d|_yr)�
test_suite�test_module�test_loader�test_runnerrs r�initialize_optionsztest.initialize_options[s!�������������rc��|jr|jr
d}t|��|j�<|j�|jj|_n|jdz|_|j�t|jdd�|_|j�d|_|j�t|jdd�|_yy)Nz1You may specify a module or a suite, but not bothz.test_suiterGz&setuptools.command.test:ScanningLoaderrH)rErFr�distributionrG�getattrrH)r�msgs  r�finalize_optionsztest.finalize_optionsas����?�?�t�/�/�E�C�&�s�+�+��?�?�"����'�"&�"3�"3�">�">���"&�"2�"2�]�"B������#�&�t�'8�'8�-��N�D�����#�G�D�����#�&�t�'8�'8�-��N�D��$rc�4�t|j��Sr)�list�
_test_argsrs r�	test_argsztest.test_argsss���D�O�O�%�&�&rc#�K�|jsd��|jrd��|jr|j��yy�w)N�discoverz	--verbose)rE�verbosers rrQztest._test_argsws6����������<�<����?�?��/�/�!��s�=?c�\�|j�5|�ddd�y#1swYyxYw)zI
        Backward compatibility for project_on_sys_path context.
        N)�project_on_sys_path)r�funcs  r�with_project_on_sys_pathztest.with_project_on_sys_paths!���
%�
%�
'��F�(�
'�
'�s�"�+c#��K�|jd�|jdd��|jd�|jd�}tjdd}tj
j
�}	t|j�}tjjd|�tj�td��t|j�d|j���|j!|g�5d��ddd�|tjddtj
j#�tj
j%|�tj�y#1swY�nxYw#|tjddtj
j#�tj
j%|�tj�wxYw�w)N�egg_info�	build_extr$)�inplacerc�"�|j�Sr)�activate)�dists r�<lambda>z*test.project_on_sys_path.<locals>.<lambda>�s
�����rz==)�run_command�reinitialize_command�get_finalized_command�sys�path�modules�copyr	�egg_base�insertr
rrr
�egg_name�egg_version�paths_on_pythonpath�clear�update)r�
include_dists�ei_cmd�old_path�old_modules�project_paths      rrWztest.project_on_sys_path�sR��������$�	
�!�!�+�q�!�9�����%��+�+�J�7���8�8�A�;���k�k�&�&�(��	#�)�&�/�/�:�L��H�H�O�O�A�|�,�� � �"�#�$@�A������1C�1C�D�E��)�)�<�.�9��:�#�C�H�H�Q�K��K�K�����K�K���{�+�� � �"�
:�9��#�C�H�H�Q�K��K�K�����K�K���{�+�� � �"�s9�A8G-�;BF�E8�F�A%G-�8F�=F�A&G*�*G-c#�hK�t�}tjjd|�}tjjdd�}	tjjt
|��}td||g�}tjj|�}|r|tjd<d��||ur!tjjdd�y|tjd<y#||ur!tjjdd�w|tjd<wxYw�w)z�
        Add the indicated paths to the head of the PYTHONPATH environment
        variable so that subprocesses will also see the packages at
        these paths.

        Do this in a context that restores the value on exit.
        �
PYTHONPATHr!N)	�object�os�environ�get�pathsep�joinr�filter�pop)�paths�nothing�orig_pythonpath�current_pythonpath�prefix�to_join�new_paths       rrmztest.paths_on_pythonpath�s������(���*�*�.�.��w�?���Z�Z�^�^�L�"�=��	;��Z�Z�_�_�_�U�%;�<�F��T�F�,>�#?�@�G��z�z���w�/�H��+3��
�
�<�(���'�)��
�
���|�T�2�+:��
�
�<�(���'�)��
�
���|�T�2�+:��
�
�<�(�s�AD2�A.C5�<9D2�5:D/�/D2c��|j|j�}|j|jxsg�}|jd�|jj	�D��}tj|||�S)z�
        Install the requirements indicated by self.distribution and
        return an iterable of the dists that were built.
        c3�dK�|](\}}|jd�rt|dd�r|���*y�w)�:r$N)�
startswithr)�.0�k�vs   r�	<genexpr>z%test.install_dists.<locals>.<genexpr>�s5����%
�3���1��|�|�C� �_�Q�q�r�U�%;�
�3�s�.0)�fetch_build_eggs�install_requires�
tests_require�extras_require�items�	itertools�chain)r`�ir_d�tr_d�er_ds    r�
install_distsztest.install_dists�sv���$�$�T�%:�%:�;���$�$�T�%7�%7�%=�2�>���$�$�%
��+�+�1�1�3�%
�
��
���t�T�4�0�0rc��|jdtj�|j|j�}dj|j�}|jr|jd|z�y|jd|z�ttjd�|�}|j|�5|j�5|j�ddd�ddd�y#1swY�xYw#1swYyxYw)Nz�WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.� zskipping "%s" (dry run)zrunning "%s"�location)�announcer�WARNr�rKr|�_argv�dry_run�map�operator�
attrgetterrmrW�	run_tests)r�installed_dists�cmdrs    r�runztest.run�s����
�
�
�
�H�H�	
��,�,�T�->�->�?���h�h�t�z�z�"���<�<��M�M�3�c�9�:���
�
�n�s�*�+��H�'�'�
�3�_�E��
�
%�
%�e�
,��)�)�+���� �,�-�
,�+�+��-�
,�s$�<C;�
C/�C;�/C8	�4C;�;Dc	�Z�tjdd|j|j|j�|j|j
�d��}|jj�s:d|jz}|j|tj�t|��y)NF)�
testLoader�
testRunner�exitzTest failed: %s)�unittest�mainr��_resolve_as_eprGrH�result�
wasSuccessfulr�r�ERRORr)rr@rMs   rr�ztest.run_tests�s����}�}����J�J��*�*�4�+;�+;�<��*�*�4�+;�+;�<��

���{�{�(�(�*�#�d�k�k�1�C��M�M�#�s�y�y�)� ��%�%�+rc�"�dg|jzS)Nr�)rRrs rr�z
test._argv�s���|�d�n�n�,�,rc�X�tj|dd��j��S)zu
        Load the indicated attribute value, called, as a as if it were
        specified as an entry point.
        N)�value�name�group)r�
EntryPoint�load)�vals rr�ztest._resolve_as_ep�s(��L�x�"�"��4�t�D�I�I�K�M�MrN)r)r3r4�__doc__�description�user_optionsrIrNr7rRrQrY�
contextlib�contextmanagerrW�staticmethodrmr�r�r��propertyr�rr�r5rrr@r@Ls���8�D�K��L� �O�$�'��'�"�����02�#��#�4����;���;�0�1��1�!�.&��-��-���N���Nrr@)rxr�rer�r�r��distutils.errorsrr�	distutilsrr�
pkg_resourcesrrr	r
rrr
�
_importlibr�
setuptoolsr� setuptools.extern.more_itertoolsr�"setuptools.extern.jaraco.functoolsrrr7r@r5rr�<module>r�sd��	��
����A������"��<�8�$�Z�$�P��nN�7�nNrpython3.12/site-packages/setuptools/command/__pycache__/build_ext.cpython-312.pyc000064400000054231151732703450023656 0ustar00�

��_i`D���ddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZmZddl
mZddlmZddlmZddlmZmZdd	lmZdd
lmZddlmZmZ	ddlmZe d�ed
�ddlm"Z#d�Z$dZ%dZ&dZ'ejPdk(rdZ&nejRdk7r	ddl*Z*e+e*d�xZ&Z%d�Z,d�Z-Gd�de�Ze&sejRdk(r										dd�Z.ydZ'										dd�Z.y#e!$reZY��wxYw#e!$rY�VwxYw)�N��EXTENSION_SUFFIXES)�cache_from_source)�Dict�Iterator�List�Tuple)�Path)�	build_ext)�new_compiler)�customize_compiler�get_config_var)�log)�	BaseError)�	Extension�LibraryzCython.Compiler.Main�LDSHARED)�_config_varsc�f�tjdk(retj�}	dtd<dtd<dtd<t	|�tj
�tj|�yt	|�y#tj
�tj|�wxYw)N�darwinz0gcc -Wl,-x -dynamiclib -undefined dynamic_lookuprz -dynamiclib�CCSHAREDz.dylib�SO)�sys�platform�_CONFIG_VARS�copyr
�clear�update)�compiler�tmps  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/build_ext.py�_customize_compiler_for_shlibr" s���
�|�|�x�����!��
	%�C�
��
�(6�L��$�!)�L����x�(���� �����$��8�$��
��� �����$�s�&B�+B0F�sharedrT�nt�RTLD_NOWc��tr|SdS)N�)�	have_rtld)�ss r!�if_dlr*Ds���1�!�r�!�c�<�tD]}d|vr|cS|dk(s�|cSy)z;Return the file extension for an abi3-compliant Extension()z.abi3z.pydNr)�suffixs r!�get_abi3_suffixr.Hs&��$���f���M�
�v�
��M�	%r+c�(�eZdZUdZeed<dZeed<d�Zdede	e
e
ffd�Zd�Zded	e
de
fd
�Z
dee	e
e
ffd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zdee
fd�Zdee
fd�Zdee
fd�Zdee
e
ffd�Zd�Zd�Zdd�Zdde
defd�Z de
fd�Z!y)rF�
editable_mode�inplacec��|jdc}|_tj|�||_|r|j�yy)z;Build extensions in build directory, then copy if --inplacerN)r1�
_build_ext�run�copy_extensions_to_source)�self�old_inplaces  r!r4z
build_ext.runUs;��$(�L�L�!�!��T�\����t��"�����*�*�,�r+�ext�returnc��|j|j�}|j|�}|jd�}dj	|dd�}|j|�}tjj	|tjj|��}tjj	|j|�}	||	fS)N�.���)
�get_ext_fullname�name�get_ext_filename�split�join�get_package_dir�os�path�basename�	build_lib)
r6�build_pyr8�fullname�filename�modpath�package�package_dir�inplace_file�regular_files
          r!�_get_inplace_equivalentz!build_ext._get_inplace_equivalent]s����(�(����2���(�(��2���.�.��%���(�(�7�3�B�<�(���.�.�w�7���w�w�|�|�K����1A�1A�(�1K�L���w�w�|�|�D�N�N�H�=���l�+�+r+c�j�|jd�}|jD]�}|j||�\}}tjj|�s|js|j|||j��|js�n|j||�}|j||d����y)NrG)�levelT)�compile)�get_finalized_command�
extensionsrOrCrD�exists�optional�	copy_file�verbose�_needs_stub�_get_equivalent_stub�_write_stub_file)r6rGr8rMrN�inplace_stubs      r!r5z#build_ext.copy_extensions_to_sourcegs����-�-�j�9���?�?�C�)-�)E�)E�h�PS�)T�&�L�,�
�w�w�~�~�l�+�3�<�<����|�\�����N����#�8�8��l�K���%�%�l�C��%�F�#r+�output_filec���tjj|�}|jj	d�\}}}tjj||��d�S�Nr;�.py)rCrD�dirnamer>�
rpartitionrA)r6r8r]�dir_�_r>s      r!rZzbuild_ext._get_equivalent_stubxsK���w�w���{�+���X�X�(�(��-�
��1�d��'�'�,�,�t�T�*�+�3�/�/r+c#�K�|jsy|jd�}|jd�jxsd}|jD]n}|j	||�\}}||f��|j
s�+|j
||�}|j
||�}t||��}t||��}	|	|f���py�w)NrG�install_libr')�optimization)r1rS�optimizerTrOrYrZ�_compiled_file_name)
r6rG�optr8rMrNr\�regular_stub�
inplace_cache�output_caches
          r!�_get_output_mappingzbuild_ext._get_output_mapping}s������|�|���-�-�j�9���(�(��7�@�@�F�B���?�?�C�)-�)E�)E�h�PS�)T�&�L�,���.�.���� $�8�8��l�K��#�8�8��l�K�� 3�L�s� S�
�2�<�c�R��#�]�3�3�!#�s
�A4B>�7AB>c���tjd�}|r/tjj|j	d��|z}n!tj||�}td�}||jvr�|j|}t|d�xr
t�}|r|dt|�}t�}||z}t|t�rBtjj|�\}}|jj!|t"�St$rQ|j&rEtjj	|�\}}tjj|d|z�S|S)N�SETUPTOOLS_EXT_SUFFIXr;�
EXT_SUFFIX�py_limited_apizdl-)rC�getenvrDrAr@r3r?r�ext_map�getattrr.�len�
isinstancer�splitext�shlib_compiler�library_filename�libtype�	use_stubs�_links_to_dynamic)r6rH�so_extrIr8�use_abi3�fn�ds        r!r?zbuild_ext.get_ext_filename�s �����2�3����w�w�|�|�X�^�^�C�%8�9�F�B�H�!�2�2�4��B�H�#�L�1�F��t�|�|�#��,�,�x�(�C��s�$4�5�K�/�:K�H��#�N�s�6�{�l�3��(�*��#�f�,���#�w�'��'�'�*�*�8�4���C��*�*�;�;�B��H�H��s�4�4����
�
�h�/���2��w�w�|�|�A�u�r�z�2�2��r+c�f�tj|�d|_g|_i|_d|_y)NF)r3�initialize_optionsry�shlibsrtr0�r6s r!r�zbuild_ext.initialize_options�s.���%�%�d�+�"���������"��r+c��tj|�|jxsg|_|j|j�|jD�cgc]}t	|t
�s�|��c}|_|jr|j�|jD]"}|j|j�|_
�$|jD�]j}|j}||j|<||j|jd�d<|jxr|j|�xsd}|xrtxrt	|t
�}||_||_|j#|�x}|_t&j(j+t&j(j-|j.|��}|r)||j0vr|j0j3|�|s��ts��$t&j4|j6vs��B|j6j3t&j4���m|j8rd|_yycc}w)Nr;r<FT)r3�finalize_optionsrT�check_extensions_listrwrr��setup_shlib_compilerr=r>�
_full_namertr@�links_to_dynamicr|r}rYr?�
_file_namerCrDrarArF�library_dirs�append�curdir�runtime_library_dirsr0r1)r6r8rH�ltd�nsrI�libdirs       r!r�zbuild_ext.finalize_options�s����#�#�D�)��/�/�/�R����"�"�4�?�?�3�&*�o�o�R�o�s��C��9Q�s�o�R����;�;��%�%�'��?�?�C�!�2�2�3�8�8�<�C�N�#��?�?�C��~�~�H�%(�D�L�L��"�58�D�L�L�����,�R�0�1��+�+�<�$�"7�"7��"<�E��C��C��C�:�c�7�+C�'C�B�$'�C�!� �C�O�(,�(=�(=�h�(G�G�H�s�~��W�W�_�_�R�W�W�\�\�$�.�.�(�%K�L�F��v�S�%5�%5�5�� � �'�'��/��y�R�Y�Y�c�6N�6N�%N��(�(�/�/��	�	�:�##�&����D�L���1Ss�I�*Ic��t|j|j|j��x}|_t|�|j�|j|j�|j�&|jD]\}}|j||��|j�"|jD]}|j|��|j�|j|j�|j�|j|j�|j �|j#|j �|j$�|j'|j$�t(j+|�|_y)N)r�dry_run�force)rrr�r�ryr"�include_dirs�set_include_dirs�define�define_macro�undef�undefine_macro�	libraries�
set_librariesr��set_library_dirs�rpath�set_runtime_library_dirs�link_objects�set_link_objects�link_shared_object�__get__)r6rr>�value�macros     r!r�zbuild_ext.setup_shlib_compiler�s2��)5��]�]�D�L�L��
�
�*
�	
��4�&�	&�h�/����(��%�%�d�&7�&7�8��;�;�"�#�{�{���e��%�%�d�E�2� +��:�:�!������'�'��.�$��>�>�%��"�"�4�>�>�2����(��%�%�d�&7�&7�8��:�:�!��-�-�d�j�j�9����(��%�%�d�&7�&7�8�'9�&@�&@��&J��#r+c�f�t|t�r|jStj||�S�N)rwr�export_symbolsr3�get_export_symbols)r6r8s  r!r�zbuild_ext.get_export_symbols�s+���c�7�#��%�%�%��,�,�T�3�7�7r+c�D�|j�|j}	t|t�r|j|_tj||�|jr-|jd�j}|j||�||_y#||_wxYw)NrG)�_convert_pyx_sources_to_langrrwrryr3�build_extensionrYrSrF�
write_stub)r6r8�	_compilerrFs    r!r�zbuild_ext.build_extension�s}���(�(�*��M�M�	�	&��#�w�'� $� 3� 3��
��&�&�t�S�1���� �6�6�z�B�L�L�	����	�3�/�%�D�M��I�D�M�s�A0B�	Bc����tj|jD�cgc]}|j��c}��dj	|jjd�dddgz��t
��fd�|jD��Scc}w)z?Return true if 'ext' links to a dynamic lib in the same packager;Nr<r'c3�,�K�|]}�|z�v���
y�wr��)�.0�libname�libnames�pkgs  ��r!�	<genexpr>z-build_ext.links_to_dynamic.<locals>.<genexpr>s�����J�M��3��=�H�,�M�s�)�dict�fromkeysr�r�rAr@�anyr�)r6r8�libr�r�s   @@r!r�zbuild_ext.links_to_dynamicsp���
�=�=�D�K�K�!H�K�S�#�.�.�K�!H�I���h�h�s�~�~�+�+�C�0��"�5���<�=���J�C�M�M�J�J�J��"Is�B
c�P�gtj|��|j��Sr�)r3�get_source_files�_get_internal_dependsr�s r!r�zbuild_ext.get_source_files	s&��R��,�,�T�2�R�T�5O�5O�5Q�R�Rr+c#�0K�t|jjxstj�j�}d�|jD�}dtdtddfd�}|D]y}t|�}|j�r
||d��(d|jvr
||d	��@	||zjd
��}	|j|�|j����{y#t$r||d�Y��wxYw#t$r||d
�Y��wxYw�w)zAYield ``ext.depends`` that are contained by the project directoryc3�BK�|]}|jD]}|����y�wr�)�depends)r�r8�deps   r!r�z2build_ext._get_internal_depends.<locals>.<genexpr>s����I�/�3�S�[�[�c�3�[�3�/�s��	orig_path�reasonr9Nc�2�tjd||�y)NzJdependency %s won't be automatically included in the manifest: the path %s)r�info)r�r�s  r!�skipz-build_ext._get_internal_depends.<locals>.skips���H�H�8���	
r+zmust be relativez..zcan't have `..` segmentsT)�strictz
doesn't existzmust be inside the project root)r
�distribution�src_rootrCr��resolverT�str�is_absolute�parts�OSError�relative_to�
ValueError�as_posix)r6�project_rootr�r�r�rD�resolveds       r!r�zbuild_ext._get_internal_dependss�����D�-�-�6�6�C�"�)�)�D�L�L�N��I�$�/�/�I��	�C�	��	��	��C���9�D����!��S�,�-���t�z�z�!��S�4�5��
�(�4�/�8�8��8�E��

��$�$�\�2�
�-�-�/�!�/���
��S�/�*��
���
��S�;�<��
�sH�B'D�*C&�C>�D�&C;�8D�:C;�;D�>D�D�D�Dc���|jr't|j�j��St	tj|�|j�z�Sr�)r1�list�get_output_mapping�keys�sortedr3�get_outputs�_build_ext__get_stubs_outputsr�s r!r�zbuild_ext.get_outputs2sJ���<�<���/�/�1�6�6�8�9�9��j�,�,�T�2�T�5M�5M�5O�O�P�Pr+c�P�|j�}tt|d����S)z1See :class:`setuptools.commands.build.SubCommand`c��|dS)Nrr�)�xs r!�<lambda>z.build_ext.get_output_mapping.<locals>.<lambda>:s��!�A�$r+)�key)rnr�r�)r6�mappings  r!r�zbuild_ext.get_output_mapping7s"���*�*�,���F�7��7�8�8r+c����fd��jD�}tj|�j��}t	d�|D��S)Nc3��K�|]S}|jrEtjj�jg|j
j
d�������Uy�w)r;N)rYrCrDrArFr�r@)r�r8r6s  �r!r�z0build_ext.__get_stubs_outputs.<locals>.<genexpr>>sE�����
�&�����
�G�G�L�L����D�#�.�.�*>�*>�s�*C�D�&�s�AAc3�,K�|]\}}||z���y�wr�r�)r��base�fnexts   r!r�z0build_ext.__get_stubs_outputs.<locals>.<genexpr>Es����:�E�[�T�5�D�5�L�E�s�)rT�	itertools�product�!_build_ext__get_output_extensionsr�)r6�ns_ext_bases�pairss`  r!�__get_stubs_outputszbuild_ext.__get_stubs_outputs<sD���
����
���!�!�,��0L�0L�0N�O���:�E�:�:�:r+c#�\K�d��d��|jd�jrd��yy�w)Nr`z.pycrGz.pyo)rSrhr�s r!�__get_output_extensionsz!build_ext.__get_output_extensionsGs.���������%�%�j�1�:�:��L�;�s�*,c��tjj|g|jj	d����dz}|j|||�yr_)rCrDrAr�r@r[)r6�
output_dirr8rR�	stub_files     r!r�zbuild_ext.write_stubMs?���G�G�L�L��H�c�n�n�.B�.B�3�.G�H�5�P�	����i��g�6r+r�c�(�tjd|j|�|r-tjj|�rt
|dz��|js�t|d�}|jdjdddtd�zd	tjj|j�zd
ddtd
�dddtd�dddddtd�dddg��|j�|r|j|�yy)Nz writing stub loader for %s to %sz already exists! Please delete.�w�
zdef __bootstrap__():z-   global __bootstrap__, __file__, __loader__z0   import sys, os, pkg_resources, importlib.utilz, dlz:   __file__ = pkg_resources.resource_filename(__name__,%r)z   del __bootstrap__z    if '__loader__' in globals():z       del __loader__z#   old_flags = sys.getdlopenflags()z   old_dir = os.getcwd()z   try:z(     os.chdir(os.path.dirname(__file__))z$     sys.setdlopenflags(dl.RTLD_NOW)z3     spec = importlib.util.spec_from_file_location(z#                __name__, __file__)z0     mod = importlib.util.module_from_spec(spec)z!     spec.loader.exec_module(mod)z   finally:z"     sys.setdlopenflags(old_flags)z     os.chdir(old_dir)z__bootstrap__()r')rr�r�rCrDrUrr��open�writerAr*rEr��close�_compile_and_remove_stub)r6r�r8rR�fs     r!r[zbuild_ext._write_stub_fileQs�����3�S�^�^�Y�O��r�w�w�~�~�i�0��I�(I�I�J�J��|�|��Y��$�A�
�G�G��	�	�.�G�J���-�(�(�*,�'�'�*:�*:�3�>�>�*J�K�.�:�/��C�D�2�!�B��D�E�M�=�J�;�%��B�C�0�)��/��
�:
�G�G�I���)�)�)�4�r+c�0�ddlm}||gdd|j��|jd�j}|dkDr||g|d|j��t
jj|�r#|jstj|�yyy)Nr)�byte_compileT)rhr�r�rf)	�distutils.utilr�r�rSrhrCrDrU�unlink)r6r�r�rhs    r!r�z"build_ext._compile_and_remove_stubxsy��/��i�[�1�D�$�,�,�O��-�-�m�<�E�E���a�<����h�d�D�L�L�
��7�7�>�>�)�$�T�\�\��I�I�i� �.:�$r+N)F)"�__name__�
__module__�__qualname__r0�bool�__annotations__r1r4rr	r�rOr5rZrrnr?r�r�r�r�r�r�rr�r�r�rr�r�r�r�r[r�r�r+r!rrQs���M�4���G�T��-�,�Y�,�5��c��?�,�
G�"0�	�0��0��0�
4�X�e�C��H�o�%>�4�2�.#� �>K�68�
&�K�S�$�s�)�S�$"�x��}�$"�LQ�T�#�Y�Q�
9�D��c��N�9�
	;��7�%5�#�%5�I�%5�N
!�#�
!r+rc
�R�|j|j|||||||||	|
||�
yr�)�link�SHARED_LIBRARY)
r6�objects�output_libnamer�r�r�r�r��debug�
extra_preargs�extra_postargs�
build_temp�target_langs
             r!r�r��s=��	
�	�	��������� �������	
r+�staticc
��|�J�tjj|�\}}
tjj|
�\}}|j	d�jd�r|dd}|j
|||||�y)Nr�r��)rCrDr@rxrz�
startswith�create_static_lib)r6rrr�r�r�r�r�r	r
rrr
rIrEr8s                r!r�r��s{��*�!�!�!�!�w�w�}�}�^�<��
�H����(�(��2�
��#�� � ��%�0�0��7� ���|�H����w��*�e�[�Qr+)
NNNNNrNNNN)/rCrr��importlib.machineryr�importlib.utilrri�typingrrrr	�pathlibr
�distutils.command.build_extr�
_du_build_ext�distutils.ccompilerr�distutils.sysconfigr
r�	distutilsr�setuptools.errorsr�setuptools.extensionrr�Cython.Distutils.build_extr3�
__import__�ImportErrorrrr"r(r|r{rr>�dl�hasattrr*r.r�r�r+r!�<module>r#s@��	�
��2�C�.�.��B�,�B��'�3��B��%�&�
�z��<�%�*
�	��	�
���<�<�8���I��W�W��_�
�� '��J� 7�7�	�I�
"��q!�
�q!�h	
����4�����!�������
�B�G����!�������R��g���J���P�
��
�s$�C,�C9�,C6�5C6�9D�Dpython3.12/site-packages/setuptools/command/__pycache__/build.cpython-312.pyc000064400000014657151732703450023006 0ustar00�

��_i����ddlZddlmZmZmZddlmZddlm	Z	ejdk\rddlmZnerddlmZnddl
mZhd	�ZGd
�de�ZGd�d
e�Zy)�N)�
TYPE_CHECKING�List�Dict)�build�)�SetuptoolsDeprecationWarning)��)�Protocol)�ABC>�build_py�	build_ext�
build_clib�
build_scriptsc�<��eZdZejddZ�fd�Z�xZS)rNc����tjD�chc]}|d��	}}|tz
r.tjdddd��tj|_t
�|��Scc}w)Nrz$Direct usage of `distutils` commandsz�
                It seems that you are using `distutils.command.build` to add
                new subcommands. Using `distutils` directly is considered deprecated,
                please use `setuptools.command.build`.
                )i���
z!https://peps.python.org/pep-0632/)�due_date�see_url)�_build�sub_commands�_ORIGINAL_SUBCOMMANDSr�emit�super�get_sub_commands)�self�cmd�subcommands�	__class__s   ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/build.pyrzbuild.get_sub_commandssm���)/�)<�)<�=�)<�#�s�1�v�)<��=��.�.�(�-�-�6��
(�;�	
�!'� 3� 3�D���w�'�)�)��>s�A')�__name__�
__module__�__qualname__rrr�
__classcell__)r s@r!rrs����&�&�q�)�L�*�*�rc�z�eZdZUdZdZeed<	eed<	d�Zd�Z	d�Z
deefd	�Zdeefd
�Z
deeeffd�Zy)
�
SubCommanda.In order to support editable installations (see :pep:`660`) all
    build subcommands **SHOULD** implement this protocol. They also **MUST** inherit
    from ``setuptools.Command``.

    When creating an :pep:`editable wheel <660>`, ``setuptools`` will try to evaluate
    custom ``build`` subcommands using the following procedure:

    1. ``setuptools`` will set the ``editable_mode`` attribute to ``True``
    2. ``setuptools`` will execute the ``run()`` command.

       .. important::
          Subcommands **SHOULD** take advantage of ``editable_mode=True`` to adequate
          its behaviour or perform optimisations.

          For example, if a subcommand doesn't need to generate an extra file and
          all it does is to copy a source file into the build directory,
          ``run()`` **SHOULD** simply "early return".

          Similarly, if the subcommand creates files that would be placed alongside
          Python files in the final distribution, during an editable install
          the command **SHOULD** generate these files "in place" (i.e. write them to
          the original source directory, instead of using the build directory).
          Note that ``get_output_mapping()`` should reflect that and include mappings
          for "in place" builds accordingly.

    3. ``setuptools`` use any knowledge it can derive from the return values of
       ``get_outputs()`` and ``get_output_mapping()`` to create an editable wheel.
       When relevant ``setuptools`` **MAY** attempt to use file links based on the value
       of ``get_output_mapping()``. Alternatively, ``setuptools`` **MAY** attempt to use
       :doc:`import hooks <python:reference/import>` to redirect any attempt to import
       to the directory with the original source code and other files built in place.

    Please note that custom sub-commands **SHOULD NOT** rely on ``run()`` being
    executed (or not) to provide correct return values for ``get_outputs()``,
    ``get_output_mapping()`` or ``get_source_files()``. The ``get_*`` methods should
    work independently of ``run()``.
    F�
editable_mode�	build_libc��y�z@(Required by the original :class:`setuptools.Command` interface)N��rs r!�initialize_optionszSubCommand.initialize_optionsl��r&c��yr,r-r.s r!�finalize_optionszSubCommand.finalize_optionsor0r&c��yr,r-r.s r!�runzSubCommand.runrr0r&�returnc��y)a�
        Return a list of all files that are used by the command to create the expected
        outputs.
        For example, if your build command transpiles Java files into Python, you should
        list here all the Java files.
        The primary purpose of this function is to help populating the ``sdist``
        with all the files necessary to build the distribution.
        All files should be strings relative to the project root directory.
        Nr-r.s r!�get_source_fileszSubCommand.get_source_filesur0r&c��y)a�
        Return a list of files intended for distribution as they would have been
        produced by the build.
        These files should be strings in the form of
        ``"{build_lib}/destination/file/path"``.

        .. note::
           The return value of ``get_output()`` should include all files used as keys
           in ``get_output_mapping()`` plus files that are generated during the build
           and don't correspond to any source file already present in the project.
        Nr-r.s r!�get_outputszSubCommand.get_outputs�r0r&c��y)a�
        Return a mapping between destination files as they would be produced by the
        build (dict keys) into the respective existing (source) files (dict values).
        Existing (source) files should be represented as strings relative to the project
        root directory.
        Destination files should be strings in the form of
        ``"{build_lib}/destination/file/path"``.
        Nr-r.s r!�get_output_mappingzSubCommand.get_output_mapping�r0r&N)r"r#r$�__doc__r)�bool�__annotations__�strr/r2r4rr7r9rr;r-r&r!r(r('sk��$�L �M�4����N��(O�O�O�	�$�s�)�	��T�#�Y���D��c��N�r&r()�sys�typingrrr�distutils.command.buildrr�warningsr�version_infor�typing_extensions�abcrrr(r-r&r!�<module>rGsQ��
�,�,�3�3����v����*�#�Q��*�F�*�*n��nr&python3.12/site-packages/setuptools/command/__pycache__/_requirestxt.cpython-312.pyc000064400000014673151732703450024443 0ustar00�

��_io��h�dZddlZddlmZddlmZddlmZmZm	Z	m
Z
mZddlm
Z
ddlmZdd	lmZed
�ZeedfZeZe
j,Zdede
eefd
e	eeeeeefffd�Zded
e
eeeffd�Zdede
eeefd
e	eeeeeefffd�Zd�Zd�Zd�Zd�Zd�Zd�Z y)aSHelper code used to generate ``requires.txt`` files in the egg-info directory.

The ``requires.txt`` file has an specific format:
    - Environment markers need to be part of the section headers and
      should not be part of the requirement spec itself.

See https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html#requires-txt
�N)�defaultdict)�filterfalse)�Dict�List�Tuple�Mapping�TypeVar�)�_reqs)�yield_lines)�Requirement�_T�install_requires�extras_require�returnc�0�t|�}t||�S)z�Given values for ``install_requires`` and ``extras_require``
    create modified versions in a way that can be written in ``requires.txt``
    )�_convert_extras_requirements�"_move_install_requirements_markers)rr�extrass   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/_requirestxt.py�_preparers��*�.�
9�F�-�.>��G�G�c���tt�}|j�D]D\}}||tj|�D]"}||t|�zj
|��$�F|S)z�
    Convert requirements in `extras_require` of the form
    `"extra": ["barbazquux; {marker}"]` to
    `"extra:{marker}": ["barbazquux"]`.
    )r�dict�itemsr�parse�_suffix_for�
setdefault)r�output�section�v�rs     rrr$sa��3>�d�2C�F�$�*�*�,�
����w�����Q��A��7�[��^�+�,�7�7��:� �-��Mrc�Z�ttj|��}tt|�}tt|�}tt
t|��}|D],}|dt|j�zj|��.td�|j�D��}||fS)a+
    The ``requires.txt`` file has an specific format:
        - Environment markers need to be part of the section headers and
          should not be part of the requirement spec itself.

    Move requirements in ``install_requires`` that are using environment
    markers ``extras_require``.
    �:c3�K�|]<\}}|ttjd�tt|�D���f���>y�w)c3�2K�|]}t|����y�w�N)�str)�.0r"s  r�	<genexpr>z?_move_install_requirements_markers.<locals>.<genexpr>.<genexpr>Os����B�/A�!�s�1�v�/A�s�N)�listr�fromkeys�map�
_clean_req)r)�kr!s   rr*z5_move_install_requirements_markers.<locals>.<genexpr>Ms>�����+�D�A�q�
�D����B�s�:�q�/A�B�B�C�D�*�s�AA)r+rr�filter�
_no_markerrr-r(�markerrrr)rr�	inst_reqs�simple_reqs�complex_reqs�simple_install_requiresr"�expanded_extrass        rrr6s����U�[�[�!1�2�3�I���Y�/�K��z�9�5�L�"�3�s�K�#8�9��
���s�S����]�*�+�6�6�q�9����#�(�(�*���O�#�O�3�3rc�N�|jrdt|j�zSdS)z;Return the 'extras_require' suffix for a given requirement.r$�)r2r(��reqs rrrVs ��$'�J�J�3��S�Z�Z�� �6�B�6rc�<�tt|��}d|_|S)z=Given a Requirement, remove environment markers and return itN)r
r(r2)r;r"s  rr.r.[s���C��H��A��A�H��Hrc��|jSr')r2r:s rr1r1bs���z�z�>�rc�b�t|xsd�}d�}t||�}|j|�y)N�c��|dzS)N�
r?)�lines r�	append_crz&_write_requirements.<locals>.append_cris���d�{�r)rr-�
writelines)�stream�reqs�linesrCs    r�_write_requirementsrHfs1����
��#�E��
�	�5�!�E�
���e�rc	��|j}tj�}t|jxsd|j
xsi�\}}t
||�t|�D]:}|jdjdit����t
|||��<|jd||j��y)Nr?z
[{extra}]
�requirements)
�distribution�io�StringIOrrrrH�sorted�write�format�vars�write_or_delete_file�getvalue)�cmd�basename�filename�dist�datarr�extras        r�write_requirementsrZps������D�
�;�;�=�D�'/����#��T�%8�%8�%>�B�(�$��n���.�/���'���
�
�)�?�)�)�3�D�F�3�4��D�.��"7�8�(����^�X�t�}�}��Grc��tj�}t||jj�|jd||j
��y)Nzsetup-requirements)rLrMrHrK�setup_requiresrRrS)rTrUrVrXs    r�write_setup_requirementsr]}s<��
�;�;�=�D���c�.�.�=�=�>����1�8�T�]�]�_�Mr)!�__doc__rL�collectionsr�	itertoolsr�typingrrrrr	r9r�extern.jaraco.textr�extern.packaging.requirementsr
r�_Orderedr�_ordered�
_StrOrIterr(rrrrr.r1rHrZr]r?rr�<module>rgs���
�#�!�6�6��,�7�
�T�]����D��>����
�
�
�
�H� �H�29�#�z�/�2J�H�
�4��9�d�3��S�	�>�*�*�+�H�����S�(�;�'�
'�(��$4� �4�29�#�x��?T�:T�2U�4�
�4��9�d�3��S�	�>�*�*�+�4�@7�

���
H�Nrpython3.12/site-packages/setuptools/command/__pycache__/setopt.cpython-312.pyc000064400000015520151732703450023213 0ustar00�

��_i?���ddlmZddlmZddlmZddlZddlZddlZddlm	Z	gd�Z
d
d�Zdd�ZGd	�d
e	�Z
Gd�de
�Zy)�)�convert_path)�log)�DistutilsOptionErrorN)�Command)�config_file�edit_config�option_base�setoptc�\�|dk(ry|dk(rKtjjtjjtj
�d�S|dk(rFtjdk(xrdxsd}tjjtd	|z��Std
|��)z�Get the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    �localz	setup.cfg�globalz
distutils.cfg�user�posix�.�z~/%spydistutils.cfgz7config_file() type must be 'local', 'global', or 'user')
�os�path�join�dirname�	distutils�__file__�name�
expanduserr�
ValueError)�kind�dots  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/setopt.pyrr
s���
�w����x���w�w�|�|�B�G�G�O�O�I�,>�,>�?��Q�Q��v�~��g�g�� �(�S�.�B���w�w�!�!�,�/D�s�/J�"K�L�L�
�N�PT�
U�U�c	�t�tjd|�tj�}d�|_|j|g�|j
�D�]\}}|�)tjd||�|j|��2|j|�s(tjd||�|j|�|j
�D]�\}}|�etjd|||�|j||�|j|�r�Dtjd||�|j|��mtjd||||�|j|||�����tjd	|�|s't|d
�5}|j|�ddd�yy#1swYyxYw)aYEdit a configuration file to include `settings`

    `settings` is a dictionary of dictionaries or ``None`` values, keyed by
    command/section name.  A ``None`` value means to delete the entire section,
    while a dictionary lists settings to be changed or deleted in that section.
    A setting of ``None`` means to delete that setting.
    zReading configuration from %sc��|S�N�)�xs r�<lambda>zedit_config.<locals>.<lambda>&s��rNzDeleting section [%s] from %szAdding new section [%s] to %szDeleting %s.%s from %sz#Deleting empty [%s] section from %szSetting %s.%s to %r in %sz
Writing %s�w)r�debug�configparser�RawConfigParser�optionxform�read�items�info�remove_section�has_section�add_section�
remove_option�options�set�open�write)	�filename�settings�dry_run�opts�sectionr1�option�value�fs	         rrrsp���I�I�-�x�8��'�'�)�D�"�D���I�I�x�j��$�N�N�,�����?��H�H�4�g�x�H�����(��#�#�G�,��	�	�9�7�H�M�� � ��)�!(����
����=��I�I�6����R��&�&�w��7��<�<��0����A�7�H���+�+�G�4��I�I�3�W�f�e�X���H�H�W�f�e�4�"1�-�.�H�H�\�8�$��
�(�C�
 �A��J�J�q�M�!�
 ��
 �
 �s�F.�.F7c�,�eZdZdZgd�ZddgZd�Zd�Zy)r	z<Abstract base class for commands that mess with config files))�
global-config�gz0save options to the site-wide distutils.cfg file)�user-config�uz7save options to the current user's pydistutils.cfg file)z	filename=r<z-configuration file to use (default=setup.cfg)r>r@c�.�d|_d|_d|_yr!)�
global_config�user_configr5��selfs r�initialize_optionszoption_base.initialize_optionsSs��!��������
rc�l�g}|jr|jtd��|jr|jtd��|j�|j|j�|s|jtd��t|�dkDrt
d|��|\|_y)Nr
rr�z/Must specify only one configuration file option)rC�appendrrDr5�lenr)rF�	filenamess  r�finalize_optionszoption_base.finalize_optionsXs����	�������[��2�3�������[��0�1��=�=�$����T�]�]�+�����[��1�2��y�>�A��&�A�9��
�%���rN)�__name__�
__module__�__qualname__�__doc__�user_options�boolean_optionsrGrMr"rrr	r	Es%��F��L�	���O�
�
%rr	c�h�eZdZdZdZgd�ejzZejdgzZd�Zd�Z	d�Z
y)	r
z#Save command-line options to a filez1set an option in setup.cfg or another config file))zcommand=�czcommand to set an option for)zoption=�oz
option to set)z
set-value=�szvalue of the option)�remove�rzremove (unset) the valuerXc�f�tj|�d|_d|_d|_d|_yr!)r	rG�commandr:�	set_valuerXrEs rrGzsetopt.initialize_optionsws,���&�&�t�,������������rc��tj|�|j�|j�t	d��|j
�|jst	d��yy)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)r	rMr[r:rr\rXrEs rrMzsetopt.finalize_options~sS���$�$�T�*��<�<��4�;�;�#6�&�'N�O�O��>�>�!�$�+�+�&�'M�N�N�+6�!rc��t|j|j|jj	dd�|j
ii|j�y)N�-�_)rr5r[r:�replacer\r7rEs r�runz
setopt.run�s>����M�M�
�\�\�D�K�K�/�/��S�9�4�>�>�J�K��L�L�	
rN)rNrOrPrQ�descriptionr	rRrSrGrMrbr"rrr
r
isE��-�E�K��
	� � �!�L�"�1�1�X�J�>�O��O�
rr
)r)F)�distutils.utilrrr�distutils.errorsrrr'�
setuptoolsr�__all__rrr	r
r"rr�<module>rhsD��'��1��	���
A��V�&�R!%�'�!%�H!
�[�!
rpython3.12/site-packages/setuptools/command/__pycache__/upload_docs.cpython-312.pyc000064400000025730151732703460024176 0ustar00�

��_iJ���dZddlmZddlmZddlmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
ZddlZddlmZddlmZd	d
lmZd�ZGd�d
e�Zy)z|upload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
sites other than PyPi such as devpi).
�)�standard_b64encode)�log)�DistutilsOptionErrorN�)�metadata)�SetuptoolsDeprecationWarning�)�uploadc�&�|jdd�S)Nzutf-8�surrogateescape)�encode)�ss ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/upload_docs.py�_encoders���8�8�G�.�/�/�c��eZdZdZdZdddejzfddgZejZd�Zd	efgZ	d
�Z
d�Zd�Zd
�Z
ed��Zed��Zd�Zy)�upload_docszhttps://pypi.python.org/pypi/z;Upload documentation to sites other than PyPi such as devpizrepository=�rzurl of repository [default: %s])z
show-responseNz&display full response text from server)zupload-dir=Nzdirectory to uploadc�b�t|jduxrtjdd���S)Nzdistutils.commands�build_sphinx)�group�name)�bool�
upload_dirr�entry_points��selfs r�
has_sphinxzupload_docs.has_sphinx/s2����O�O�t�#�
W��%�%�,@�~�V�
�	
rrc�J�tj|�d|_d|_y)N)r
�initialize_optionsr�
target_dirrs rr zupload_docs.initialize_options7s���!�!�$�'������rc���tjd�tj|�|j��|j�r/|j
d�}t|j�d|_	nc|j
d�}tjj|jd�|_	n"|jd�|j|_	|jd|jz�y)NzWUpload_docs command is deprecated. Use Read the Docs (https://readthedocs.org) instead.r�html�build�docsrzUsing upload directory %s)r�warnr
�finalize_optionsrr�get_finalized_command�dict�builder_target_dirsr!�os�path�join�
build_base�ensure_dirname�announce)rrr$s   rr'zupload_docs.finalize_options<s������
1�	
�	����%��?�?�"���� �#�9�9�.�I��"&�|�'G�'G�"H��"P����2�2�7�;��"$�'�'�,�,�u�/?�/?��"H�������-�"�o�o�D�O��
�
�1�D�O�O�C�Drc��tj|d�}	|j|j�t	j
|j�D]�\}}}||jk(r|sd}t
||jz��|D]�}tjj||�}|t|j�djtjj�}	tjj|	|�}
|j||
�����	|j�y#|j�wxYw)N�wz'no files found in upload directory '%s')�zipfile�ZipFile�mkpathr!r+�walkrr,r-�len�lstrip�sep�write�close)r�filename�zip_file�root�dirs�files�tmplr�full�relative�dests           r�create_zipfilezupload_docs.create_zipfileNs����?�?�8�S�1��	��K�K����(�%'�W�W�T�_�_�%=�!��d�E��4�?�?�*�5�D�D�.�t�d�o�o�/E�F�F�!�D��7�7�<�<��d�3�D�#�C����$8�$:�;�B�B�2�7�7�;�;�O�H��7�7�<�<��$�7�D��N�N�4��.�	"�	&>�
�N�N���H�N�N��s�DD0�0Ec���tjddd��|j�D]}|j|��t	j
�}|jjj�}tjj|d|z�}	|j|�|j|�tj|�y#tj|�wxYw)NzDeprecated commanda
            upload_docs is deprecated and will be removed in a future version.
            Instead, use tools like devpi and Read the Docs; or lower level tools like
            httpie and curl to interact directly with your hosting service API.
            )i��	�)�due_datez%s.zip)r�emit�get_sub_commands�run_command�tempfile�mkdtemp�distributionr�get_namer+r,r-rE�upload_file�shutil�rmtree)r�cmd_name�tmp_dirrr=s     r�runzupload_docs.run^s���$�)�)� �
�
#�	
��-�-�/�H����X�&�0��"�"�$��� � �)�)�2�2�4���7�7�<�<���D��9��	#�����)����X�&��M�M�'�"��F�M�M�'�"�s�"C�C*c#�K�|\}}d|z}t|t�s|g}|D]W}t|t�r|d|dzz
}|d}nt|�}|��t|���d��|��|s�K|dddk(s�Td���Yy�w)	Nz*
Content-Disposition: form-data; name="%s"z; filename="%s"rr	s

����
�
)�
isinstance�list�tupler)�item�sep_boundary�key�values�title�values      r�_build_partzupload_docs._build_partvs��������V�=��C���&�$�'��X�F��E��%��'��*�U�1�X�5�5���a����������%�.� ��M��K���r�s��u�,����s�A*A=�-A=�6A=c�P�d}d|jd�z}|dz}|df}tj|j|��}t	||j��}tjj|�}t
j||�}	d|z}
dj|	�|
fS)	z=
        Build up the MIME payload for the POST data
        z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--�asciis--rZ)r_z multipart/form-data; boundary=%sr)
r
�	functools�partialrd�map�items�	itertools�chain�
from_iterabler-)�cls�data�boundaryr_�end_boundary�	end_items�builder�part_groups�parts�
body_items�content_types           r�_build_multipartzupload_docs._build_multipart�s���
I�������!9�9��#�e�+����
�	��#�#��O�O�%�
���'�4�:�:�<�0�����-�-�k�:���_�_�U�I�6�
�9�H�D���x�x�
�#�\�1�1rc��t|d�5}|j�}ddd�|jj}d|j	�t
jj|�fd�}t|jdz|jz�}t|�jd�}d|z}|j|�\}}	d|jz}
|j|
t j"�t$j&j)|j�\}}}
}}}|s|s|rJ�|dk(r t*j,j/|�}n3|d	k(r t*j,j1|�}nt3d
|z��d}	|j5�|j7d|
�|	}|j9d
|�|j9dt;t=|���|j9d|�|j?�|jA|�|jG�}|jHdk(r=d|jH�d|jJ��}
|j|
t j"�n�|jHdk(rL|jMd�}|�d|j	�z}d|z}
|j|
t j"�n<d|jH�d|jJ��}
|j|
t jD�|jNrtQd|j�d�yy#1swY��xYw#tB$r3}|jt;|�t jD�Yd}~yd}~wwxYw)N�rb�
doc_upload)z:actionr�content�:rfzBasic zSubmitting documentation to %s�http�httpszunsupported schema ��POSTzContent-typezContent-length�
Authorization��zServer response (z): i-�Locationzhttps://pythonhosted.org/%s/zUpload successful. Visit %szUpload failed (zK---------------------------------------------------------------------------))�open�readrOrrPr+r,�basenamer�username�passwordr�decoderx�
repositoryr0r�INFO�urllib�parse�urlparser~�client�HTTPConnection�HTTPSConnection�AssertionError�connect�
putrequest�	putheader�strr7�
endheaders�send�OSError�ERROR�getresponse�status�reason�	getheader�
show_response�print)rr<�fr|�metaro�credentials�auth�body�ct�msg�schema�netloc�url�params�query�	fragments�connrw�er�locations                      rrQzupload_docs.upload_file�s���
�(�D�
!�Q��f�f�h�G�"�� � �)�)��#��M�M�O����(�(��2�G�<�
���d�m�m�c�1�D�M�M�A�B��(��5�<�<�W�E���+�%���(�(��.���b�.�$�/�/�B���
�
�c�3�8�8�$�
9?���8M�8M��O�O�9
�5����V�U�I��%�	�9�9��V���;�;�-�-�f�5�D�
�w�
��;�;�.�.�v�6�D� �!6��!?�@�@���	��L�L�N��O�O�F�C�(��L��N�N�>�<�8��N�N�+�S��T��^�<��N�N�?�D�1��O�O���I�I�d�O�

������8�8�s�?�01���!�(�(�C�C��M�M�#�s�x�x�(�
�X�X��_��{�{�:�.�H���9�D�M�M�O�K��/�(�:�C��M�M�#�s�x�x�(��/0�h�h����A�C��M�M�#�s�y�y�)�����(�A�F�F�H�h�/��w"�
!��T�	��M�M�#�a�&�#�)�)�,���	�s$�L2�	B
L?�2L<�?	M;�)M6�6M;N)�__name__�
__module__�__qualname__�DEFAULT_REPOSITORY�descriptionr
�user_options�boolean_optionsr�sub_commandsr r'rErV�staticmethodrd�classmethodrxrQ�rrrrs���9��O�K�
��-��0I�0I�I�	
�
	J�4��L��,�,�O�
�$�Z�0�1�L��
E�$� #�0����&�2��2�*=0rr)�__doc__�base64r�	distutilsr�distutils.errorsrr+r3rMrRrkrg�http.clientr~�urllib.parser��
_importlibr�warningsrr
rrr�rr�<module>r�sI���&��1�	���
�����!�3��0�@0�&�@0rpython3.12/site-packages/setuptools/command/__pycache__/easy_install.cpython-312.pyc000064400000324754151732703460024401 0ustar00�

��_i�Q��Z�dZddlmZddlmZddlmZmZddlmZmZm	Z	m
Z
ddlmZm
Z
ddlmZddlmZdd	lmZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
l Z dd
l!Z!dd
l"Z"dd
l#Z#dd
l$Z$dd
l%Z%dd
l&Z&ddl&m'Z'ddl(m)Z)dd
l*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1m2Z2m3Z3ddl,m4Z4m5Z5ddl6m7Z7m8Z8ddl9m:Z:ddl;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHdd
l;Z;ddlImJZJddlKmLZLddlMmNZNej�de;j���gd�ZQd�ZRd�ZSd�ZTd�ZUGd �d!e)�ZVd"�ZWd#�ZXd$�ZYd%�ZZd&�Z[Gd'�d(e@�Z\Gd)�d*e\�Z]ej�j�d+d,�d-k(re]Z\d.�Z`d/�Zad0�Zbd1�ZcdPd2�Zdd3�Zed4�Zfd5ej�vrefZhnd6�ZhdQd7�Zid8�Zjd9�Zkd:�Zl	dd;lmmZnd=�ZmGd>�d?ep�Zqeqj��ZsGd@�dAeq�ZtGdB�dC�ZuGdD�dEeu�ZvGdF�dGev�ZwdH�ZxdI�ZydJeafdK�ZzdL�Z{dM�Z|GdN�dOe7�Z}y
#eo$rd<�ZnY�qwxYw)Ra)
Easy Install
------------

A tool for doing automatic download/extract/build of distutils-based Python
packages.  For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.

__ https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

�)�glob)�get_platform)�convert_path�
subst_vars)�DistutilsArgError�DistutilsOptionError�DistutilsError�DistutilsPlatformError)�log�dir_util)�
first_line_re)�find_executable)�installN)�get_path)�Command)�	run_setup)�setopt)�unpack_archive)�PackageIndex�parse_requirement_arg�
URL_SCHEME)�	bdist_egg�egg_info)�SetuptoolsDeprecationWarning�SetuptoolsWarning)�Wheel)
�normalize_path�resource_string�get_distribution�find_distributions�Environment�Requirement�Distribution�PathMetadata�EggMetadata�
WorkingSet�DistributionNotFound�VersionConflict�DEVELOP_DIST�)�py312compat)�ensure_directory)�yield_lines�default)�category)�easy_install�PthDistributions�extract_wininst_cfg�get_exe_prefixesc�2�tjd�dk(S)N�P�)�struct�calcsize����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/easy_install.py�is_64bitr<]s���?�?�3��1�$�$r:c�$�|jd�S)N�utf8)�encode��ss r;�	_to_bytesrBas���8�8�F��r:c�F�	|jd�y#t$rYywxYw)N�asciiTF)r?�UnicodeErrorr@s r;�isasciirFes(���	�����������s��	 � c�h�tj|�j�jdd�S)N�
z; )�textwrap�dedent�strip�replace)�texts r;�
_one_linerrNms'���?�?�4� �&�&�(�0�0��t�<�<r:c���eZdZdZdZdZdddddd	d
ddd
ddddddddddddddejzfgZgd�Z	ddiZ
eZd�Z
d �Zd!�Zed"��Zd#�Zed$��Zed%��Zd&�Zd'�Zd(�Zd)�Zd]d*�Zd+�Zd,�Zd-�Zej<d.�j?�Z ej<d/�j?�Z!ej<d0�j?�Z"d1�Z#d2�Z$d3�Z%d4�Z&d5�Z'd6�Z(e)jTd7��Z+d^d8�Z,d^d9�Z-d:�Z.	d]d;�Z/d<�Z0d=�Z1d>�Z2d_d?�Z3ed@��Z4d`dA�Z5dB�Z6dC�Z7dD�Z8dE�Z9dF�Z:dG�Z;ej<dH�j?�Z<ej<dI�Z=dadJ�Z>ej<dK�j?�Z?dL�Z@dM�ZAdN�ZBdO�ZCdP�ZDdQ�ZEdR�ZFdS�ZGej<dT�j��ZIdU�ZJeKeKdVdW�X��Y�ZLeKdZd[�X�ZMd\�ZNy)br0z'Manage a download/build/install processz Find/get/install Python packagesT)zprefix=Nzinstallation prefix)�zip-ok�zzinstall package as a zipfile)�
multi-version�mz%make apps have to require() a version)�upgrade�Uz1force upgrade (searches PyPI for latest versions))zinstall-dir=�dzinstall package to DIR)zscript-dir=rAzinstall scripts to DIR)�exclude-scripts�xzDon't install scripts)�always-copy�az'Copy all needed packages to install dir)z
index-url=�iz base URL of Python Package Index)zfind-links=�fz(additional URL(s) to search for packages)zbuild-directory=�bz/download/extract/build in DIR; keep the results)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])zrecord=Nz3filename in which to record list of installed files)�always-unzip�Zz*don't install as a zipfile, no matter what)z
site-dirs=�Sz)list of directories where .pth files work)�editable�ez+Install specified packages in editable form)�no-deps�Nzdon't install dependencies)zallow-hosts=�Hz$pattern(s) that hostnames must match)�local-snapshots-ok�lz(allow building eggs from local checkouts)�versionNz"print version information and exit)z
no-find-linksNz9Don't load find-links defined in packages being installed�userNz!install in user site-package '%s')
rPrRrWrTrYrbrdrgrirjr_rPc�&�tj�d|_dx|_|_dx|_x|_|_d|_d|_	d|_
d|_dx|_|_
dx|_x|_|_dx|_x|_|_dx|_x|_|_d|_d|_d|_d|_d|_d|_d|_d|_d|_t@jB|_"t@jF|_$d|_%d|_&dx|_'|_(d|_)i|_*d|_+|jXjZ|_-|jXj]||jXj_d��y)Nrr0)0�EasyInstallDeprecationWarning�emitrj�zip_ok�local_snapshots_ok�install_dir�
script_dir�exclude_scripts�	index_url�
find_links�build_directory�args�optimize�recordrT�always_copy�
multi_versionrb�no_deps�allow_hosts�root�prefix�	no_reportri�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_data�install_base�install_platbase�site�	USER_BASE�install_userbase�	USER_SITE�install_usersite�
no_find_links�
package_index�pth_file�always_copy_from�	site_dirs�installed_projects�_dry_run�distribution�verbose�_set_command_options�get_option_dict��selfs r;�initialize_optionszeasy_install.initialize_options�s��%�*�*�,���	�04�4���d�-�DH�H���H�4�?�T�-A�������#�����	�&*�*��
���?C�C���C�t�'�$�*<�:>�>��
�>���t�'7�37�7��	�7�D�K�$�.����#���#���#������#��� ��� ��� $��� $����� $�����!���"���04�4��
��-����"$�����
��(�(�0�0������.�.��$�#�#�3�3�N�C�	
r:c�T�d�|D�}tt|j|��y)Nc3�K�|]D}tjj|�stjj|�r|���Fy�w�N)�os�path�exists�islink)�.0�filenames  r;�	<genexpr>z/easy_install.delete_blockers.<locals>.<genexpr>�s7����
�$���w�w�~�~�h�'�2�7�7�>�>�(�+C�
�$�s�A
A)�list�map�_delete_path)r��blockers�extant_blockerss   r;�delete_blockerszeasy_install.delete_blockers�s(��
�$�
��
	
�S��"�"�O�
4�5r:c��tjd|�|jrytjj|�xr tjj
|�}|rtntj}||�y)NzDeleting %s)	r�info�dry_runr�r��isdirr��_rmtree�unlink)r�r��is_tree�removers    r;r�zeasy_install._delete_path�sU�������%��<�<���'�'�-�-��%�B�b�g�g�n�n�T�.B�*B��$�'�"�)�)����
r:c��djtj�}td�}d}t	|jdit����t
��)zT
        Render the Setuptools version and installation details, then exit.
        �{}.{}�
setuptoolsz=setuptools {dist.version} from {dist.location} (Python {ver})r9)�format�sys�version_infor�print�locals�
SystemExit)�ver�dist�tmpls   r;�_render_versionzeasy_install._render_version�sI��
�g�n�n�c�.�.�/����-��N��
�k�d�k�k�%�F�H�%�&��l�r:c��|jxr|j�tjj�d}t	tj��|_|jj|jj�|jj�|jj�|tjj�dtjj��tjj�tjj��|jd|jdt!tdd�t!tdd�d	�
�t#j$t&�5|jjt)j*�j-�t)j*�d
��ddd�|jj/dt!tdd�j1dd��|j2|jd
<|j4|jd<|j6r%t8j:st=j>d�|jA�|jC�|jE�|jGdddd�|jH�|jJ|_$|jL�d|_&|jOdd�|jOdd�|j6r.|jPr"|jP|_%|jR|_$|jOdd�tU�|_+|jVjY|j[|j\��|j^s|ja�tcjddd�}|jfxs||_3|jVdd|_4|jJtk|jH�fD]-}||jhvs�|jhjmd|��/|jn�7|jnjd�D�cgc]}|jq���}}ndg}|jr�-|ju|jf|jh|��|_9tw|jhtjxz�|_=|j|�:t|j|t��r'|j|j�|_>ng|_>|j�r6|jrj�|jhtjxz�|jLs%|jrj�|j|�|jOdd �|j�|j��|_E|j^r|j�st�d!��|j�st�d"��g|_Iy#1swY��YxYwcc}w)#Nr�.r~�exec_prefix�abiflags��
platlibdir�lib)
�	dist_name�dist_version�
dist_fullname�
py_version�py_version_short�py_version_nodot�
sys_prefix�sys_exec_prefixr�r�)�implementation_lower�implementation�py_version_nodot_plat�windir�userbase�usersitez6WARNING: The user site-packages directory is disabled.rprqrur�Fr�)rprpr��rprqr)rxrx�__EASYINSTALL_INDEXzhttps://pypi.org/simple/�,�*)�search_path�hosts)rwrwz9Must specify a build directory (-b) when using --editablez:No urls, filenames, or requirements specified (see --help))Jrir�r��split�dict�	sysconfig�get_config_vars�config_vars�updater��get_name�get_version�get_fullnamer��major�minor�getattr�
contextlib�suppress�AttributeErrorr�_get_implementation�lower�
setdefaultrLr�r�rjr��ENABLE_USER_SITEr�warn�_fix_install_dir_for_user_site�expand_basedirs�expand_dirs�_expandrqrpr��set_undefined_optionsr�r��
get_site_dirs�
all_site_dirs�extend�_process_site_dirsr�rb�check_site_dirr��getenvrs�shadow_pathr�insertr|rKr��create_indexr!r��local_indexrt�
isinstance�strro�scan_egg_links�add_find_links�_validate_optimizerwrurrv�outputs)r�r��
default_index�	path_itemrAr�s      r;�finalize_optionszeasy_install.finalize_options�s������/��-�-�/���[�[�&�&�(��+�
��	� 9� 9� ;�<��������!�.�.�7�7�9� $� 1� 1� =� =� ?�!%�!2�!2�!?�!?�!A�(��'�'�-�-�.�a��0@�0@�0F�0F�/G�H�'*�'7�'7�'=�'=�&>�s�?O�?O�?U�?U�>V�$W�"�.�.�x�8�#'�#3�#3�M�#B�#�C��R�8�%�c�<��?�
�	
�"�
 �
 ��
0����#�#�,3�,G�,G�,I�,O�,O�,Q�&-�&A�&A�&C��
�1�	
���#�#�#��C��2�&�.�.�s�B�7�	
�
(,�'<�'<�����$�'+�'<�'<�����$��9�9�T�2�2��H�H�M�N��+�+�-����������������		
��?�?�"�"�.�.�D�O����%�!&�D��
	
�"�"�=�2P�Q��"�"�#4�6S�T��9�9��-�-�#�3�3�D��"�2�2�D�O��"�"�9�.B�C�*�_������!�!�$�"9�"9�$�.�.�"I�J��}�}����!��	�	�"7�9S�T�
����8�=����-�-�a�0����)�)�>�$�/�/�+J�J�I��� 0� 0�0�� � �'�'��9�5�K����'�(,�(8�(8�(>�(>�s�(C�D�(C�1�Q�W�W�Y�(C�E�D��E�E����%�!%�!2�!2���� �,�,��"3�"�D��
'�t�'7�'7�#�(�(�'B�C����?�?�&��$�/�/�3�/�"&�/�/�"7�"7�"9��� �D�O��"�"����-�-�d�.>�.>����.I�J��!�!����-�-�d�o�o�>��"�"�=�2J�K��/�/��
�
�>��
��=�=��!5�!5�#�K��
��y�y�#�L��
����C1�
0��BEs�
AX2�=X?�2X<c#�K�|�ytttj�}|j	d�D�cgc]/}t
jj
|j����1}}|D]`}t
jj|�stjd|��9t|�|vrt|dz��t|����bycc}w�w)Nr�z"%s (in --site-dirs) does not existz$ (in --site-dirs) is not on sys.path)r�rr�r�r�r��
expanduserrKr�rr�r)r��normpathrArVs    r;r�zeasy_install._process_site_dirsls���������~�s�x�x�0��<E�O�O�C�<P�Q�<P�q�R�W�W�'�'����	�2�<P�	�Q��A��7�7�=�=��#����=�q�A���"�(�2�*�1�/U�+U�V�V�$�Q�'�'�
��R�s�5C�4C�+A-Cc��	t|�}|td�vrt�	|S#t$r}td�|�d}~wwxYw)N�z--optimize must be 0, 1, or 2)�int�range�
ValueErrorr)�valuercs  r;rzeasy_install._validate_optimize{sQ��	O���J�E��E�!�H�$� � �%�
����	O�&�'F�G�Q�N��	O�s�#�	=�8�=c���|jsy|j�|j�
d}t|��|jx|_|_tj�d�}|j|�y)z;
        Fix the install_dir if "--user" was used.
        Nz$User base directory is not specified�_user)	rj�create_home_pathr�r
r�r�r��name�
select_scheme)r��msg�scheme_names   r;r�z+easy_install._fix_install_dir_for_user_site�sj���y�y������� � �(�8�C�(��-�-�48�4I�4I�I���D�1����	��'�����;�'r:c��|D]y}t||�}|��tjdk(stjdk(rtjj	|�}t||j�}t|||��{y)N�posix�nt)r�r�rr�rrr��setattr)r��attrs�attr�vals    r;�
_expand_attrszeasy_install._expand_attrs�se���D��$��%�C����7�7�g�%����D���'�'�,�,�S�1�C� ��d�&6�&6�7����d�C�(�
r:c�*�|jgd��y)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.)r�r�r}N�rr�s r;r�zeasy_install.expand_basedirs�s��	
���G�Hr:c�.�gd�}|j|�y)z+Calls `os.path.expanduser` on install dirs.)r�r�r�r�r�r�Nr )r��dirss  r;r�zeasy_install.expand_dirs�s��
��	
���4� r:c�*�|r |jdtj�|j|jjk7rtj
|j�	|jD]}|j||j��!|jr�|j}|jr9t|j�}tt|��D]
}|||d||<�ddlm}|j!|j"|j|fd|jz�|j%�tj
|jj�y#tj
|jj�wxYw)NzXWARNING: The easy_install command is deprecated and will be removed in a future version.r)�	file_utilz'writing list of installed files to '%s')�announcer�WARNr�r��
set_verbosityrvr0r{rxrr}�lenr
�	distutilsr$�execute�
write_file�warn_deprecated_options)r��show_deprecation�specr�root_len�counterr$s       r;�runzeasy_install.run�s3����M�M�;����
�
�<�<�4�,�,�4�4�4����d�l�l�+�	9��	�	���!�!�$�D�L�L�(8�9�"��{�{��,�,���9�9�"�4�9�9�~�H�#(��W��#6��+2�7�+;�H�I�+F���(�$7�/�����(�(��[�[�'�*�=����K��

�(�(�*����d�/�/�7�7�8��C���d�/�/�7�7�8�s
�&CE'�'+Fc���	tj�}tjj|jd|z�S#t$r'tjdt
j�}Y�\wxYw)z�Return a pseudo-tempname base in the install directory.
        This code is intentionally naive; if a malicious party can write to
        the target directory you're already in deep doodoo.
        rztest-easy-install-%s)
r��getpid�	Exception�random�randintr��maxsizer��joinrp)r��pids  r;�pseudo_tempnamezeasy_install.pseudo_tempname�sZ��
	1��)�)�+�C��w�w�|�|�D�,�,�.D�s�.J�K�K���	1��.�.��C�K�K�0�C�	1�s�A�-A3�2A3c��yr�r9r�s r;r,z$easy_install.warn_deprecated_options����r:c�(�t|j�}tjj	|d�}tjj|�s	tj|�||jv}|s|js|j�}ny|j�dz}tjj|�}	|rtj|�t|d�j�tj|�|sW|jsKtj j#dd�}t%j&|j(|j|�|r(|j*�#t-||j�|_nd|_|jr&tjj|�sd|_||_y#t$r|j�Y���wxYw#t$r|j�Y��wxYw)z;Verify that self.install_dir is .pth-capable dir, if needed�easy-install.pthz.write-test�w�
PYTHONPATHr�N)rrpr�r�r8r��makedirs�OSError�cant_write_to_targetr�rz�check_pth_processingr:r��open�close�environ�getrr��_easy_install__no_default_msgr�r1)r��instdirr��is_site_dir�testfile�test_exists�
pythonpaths       r;r�zeasy_install.check_site_dir�s���!��!1�!1�2���7�7�<�<��);�<���w�w�~�~�g�&�
,����G�$�
��!3�!3�3���4�#5�#5��3�3�5�K��+�+�-�
�=�H��'�'�.�.��2�K�
,���I�I�h�'��X�s�#�)�)�+��	�	�(�#��4�#5�#5�������b�9�J��H�H�T�*�*�D�,<�,<�j�I���}�}�$� 0��4�;M�;M� N��
� �D�M����b�g�g�n�n�X�&>� �D�M�"����E�
,��)�)�+�
,��$�
,��)�)�+�
,�s%�G�AG5�G2�1G2�5H�HaS
        can't create or remove files in install directory

        The following error occurred while trying to add or remove files in the
        installation directory:

            %s

        The installation directory you specified (via --install-dir, --prefix, or
        the distutils default setting) was:

            %s
        z�
        This directory does not currently exist.  Please create it and try again, or
        choose a different installation directory (using the -d or --install-dir
        option).
        a�
        Perhaps your account does not have write access to this directory?  If the
        installation directory is a system-owned directory, you may need to sign in
        as the administrator or "root" account.  If you do not have administrative
        access to this machine, you may wish to choose a different installation
        directory, preferably one that is listed in your PYTHONPATH environment
        variable.

        For information on other options, you may wish to consult the
        documentation at:

          https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

        Please make the appropriate changes for your system and try again.
        c�(�|jtj�d|jfz}tj
j
|j�s|d|jzz
}t|��|d|jzz
}t|��)N�rH)
�_easy_install__cant_write_msgr��exc_inforpr�r�r��_easy_install__not_exists_id�_easy_install__access_msgr	)r�rs  r;rCz!easy_install.cant_write_to_target1s����#�#��L�L�N�1�����'
�
��
�w�w�~�~�d�.�.�/��4�$�.�.�.�.�C��S�!�!�
�4�$�+�+�+�+�C��S�!�!r:c�<�|j}tjd|�|j�dz}|dz}tj
j
|�}td�dz}	|rt	j|�tj
j|�}t	j|d��t|d�}	|j|jdit����|j�d	}t j"}tj$d
k(rztj
j'|�\}}	tj
j)|d�}
|	j+�dk(xrtj
j
|
�}|r|
}d
dlm}||dddgd
�tj
j
|�r�tjd|�	|r|j�tj
j
|�rt	j|�tj
j
|�rt	j|�yy	|r|j�tj
j
|�rt	j|�tj
j
|�rt	j|�	|j4stj6d|�y#|r|j�tj
j
|�rt	j|�tj
j
|�rt	j|�wwxYw#t0$r|j3�Y��wxYw)z@Empirically verify whether .pth files are supported in inst. dirz Checking .pth file support in %s�.pthz.okzz
            import os
            f = open({ok_file!r}, 'w')
            f.write('OK')
            f.close()
            rHT)�exist_okr?Nr�pythonw.exe�
python.exer)�spawnz-Ez-c�passz-TEST PASSED: %s appears to support .pth filesz+TEST FAILED: %s does NOT support .pth filesFr9)rprr�r:r�r�r�rNr��dirnamerArE�writer�r�rFr��
executablerr�r8r��distutils.spawnrZrBrCrzr�)
r�rJr��ok_file�	ok_existsr�r\r\r^�basename�alt�use_altrZs
             r;rDz!easy_install.check_pth_processing=s����"�"�����3�W�=��'�'�)�F�2���U�"���G�G�N�N�7�+�	���
��
�	
�#	(���	�	�'�"��g�g�o�o�g�.�G��K�K��$�/��X�s�#�A�
(��������/�f�h�/�0����	��� �^�^�
��7�7�d�?�(*���
�
�j�(A�%�G�X��'�'�,�,�w�
�>�C�&�n�n�.�,�>�V�2�7�7�>�>�RU�CV�G��%(�
�1��z�4��v�6��:��7�7�>�>�'�*��H�H�L�g�V����G�G�I��7�7�>�>�'�*��I�I�g�&��7�7�>�>�(�+��I�I�h�'�,�+���G�G�I��7�7�>�>�'�*��I�I�g�&��7�7�>�>�(�+��I�I�h�'��!�!��H�H�B�G�L�����G�G�I��7�7�>�>�'�*��I�I�g�&��7�7�>�>�(�+��I�I�h�'�,��9�	(��%�%�'�	(�s!�)AM?�D K?�?A=M<�?N�Nc	��|jsa|jd�rP|jd�D]<}|jd|z�r�|j|||j	d|z���>|j|�y)z=Write all the scripts for `dist`, unless scripts are excluded�scriptszscripts/N)rr�metadata_isdir�metadata_listdir�install_script�get_metadata�install_wrapper_scripts)r�r��script_names   r;�install_egg_scriptsz easy_install.install_egg_scriptsws{���#�#��(;�(;�I�(F�#�4�4�Y�?���&�&�z�K�'?�@���#�#��+�t�'8�'8��k�9Q�'R�� @�	
�$�$�T�*r:c�6�tjj|�r_tj|�D]F\}}}|D];}|jjtjj
||���=�Hy|jj|�yr�)r�r�r��walkr�appendr8)r�r��baser"�filesr�s      r;�
add_outputzeasy_install.add_output�sj��
�7�7�=�=���%'�W�W�T�]�!��d�E� %�H��L�L�'�'������T�8�(D�E�!&�&3�
�L�L����%r:c�:�|jrtd|�d���y)NzInvalid argument zW: you can't use filenames or URLs with --editable (except via the --find-links option).)rbr�r�r.s  r;�not_editablezeasy_install.not_editable�s$���=�=�#�KO�R��
�r:c�
�|jsytjjtjj	|j
|j��r%t|j�d|j
�d���y)Nz already exists in z; can't do a checkout there)rbr�r�r�r8ru�keyrrus  r;�check_editablezeasy_install.check_editable�s\���}�}��
�7�7�>�>�"�'�'�,�,�t�';�';�T�X�X�F�G�#��8�8�T�1�1�3��
�Hr:c#�K�tjd��}	t|���tjj|�xr
t
|�yy#tjj|�xr
t
|�wwxYw�w)Nz
easy_install-)r~)�tempfile�mkdtempr�r�r�r�r�)r��tmpdirs  r;�_tmpdirzeasy_install._tmpdir�s^�����!�!�)9�:��	7��f�+���G�G�N�N�6�"�6�w�v��6��B�G�G�N�N�6�"�6�w�v��6�s�B	�
A�/B	�0B�B	c	�f�|j�5}t|t�s�t|�rK|j	|�|j
j
||�}|jd|||d�cddd�Stjj|�r/|j	|�|jd|||d�cddd�St|�}|j|�|j
j|||j|j|j |j"�}|�!d|z}|j r|dz
}t%|��|j&t(k(r|j+|||d�|cddd�S|j||j,||�cddd�S#1swYyxYw)NTz+Could not find suitable distribution for %rz2 (--always-copy skips system and development eggs)�Using)r~r�r"rrvr��download�install_itemr�r�r�rry�fetch_distributionrTrbryr�r	�
precedencer)�process_distribution�location)r�r.�depsr}�dlr�rs       r;r0zeasy_install.easy_install�sy��
�\�\�^�v��d�K�0��d�#��%�%�d�+��+�+�4�4�T�6�B�B��,�,�T�2�v�t�T�J�
�^��W�W�^�^�D�)��%�%�d�+��,�,�T�4���t�L��^�1��6�D�����%��%�%�8�8�������
�
��$�$�$�� � �
�D��|�C�d�J���#�#��O�O�C�$�S�)�)����L�0��)�)�$��d�G�D��A�^�D�(�(��t�}�}�f�d�K�E�^�^�s �AF'�8AF'�B0F'�F'�'F0c���|xs|j}|xs"tjj|�|k(}|xs|j	d�}|xsN|j
duxr>tjjt
|��t
|j
�k(}|r3|s1|j|jD]}|j|k(s�nd}tjdtjj|��|r.|j|||�}|D]}|j|||��n)|j|�g}|j||d|d�|�|D]
}||vs�|cSyy)N�.eggTz
Processing %srr�)ryr�r�r\�endswithr�rr��project_namer�rr�rb�install_eggsr��egg_distribution)r�r.r�r}r��install_neededr��distss        r;r�zeasy_install.install_item�sf��'�;�4�+;�+;��'�N�2�7�7�?�?�8�+D��+N��'�H�x�/@�/@��/H�+H��'�
��!�!��-�
5�������x� 8�9��d�3�3�4�5�	����(�(��):�):�;���=�=�H�,��<�"&������"�'�'�"2�"2�8�"<�=���%�%�d�H�f�=�E����)�)�$��d�;���*�*�8�4�5�E��%�%�d�E�!�H�d�G�D������4�<��K��r:c��	tj||�y#t$r3tjj||j	dd��YywxYw)Nr�unix)r�_select_schemer�rrL)r�rs  r;rzeasy_install.select_scheme�sH��	O��"�"�4��.���	O��O�O�)�)�$����W�f�0M�N�	O�s��9A�Ac��|j|�|jj|�||j|jvr|jj|�|jj|�|j
|�||j|j<tj|j||g|����|jd�r6|js*|jj|jd��|s
|jsy|�0|j|jk7rtj d|�y|�||vr$|j#�}t%t'|��}tjd|�	t)g�j+|g|j|j,�}|js|j6r?|D]:}|j|jvs�|j-|j#���<tjd|�y#t.$r}t1t'|��|�d}~wt2$r}t1|j5��|�d}~wwxYw)Nzdependency_links.txtzSkipping dependencies for %szProcessing dependencies for %sz'Finished processing dependencies for %s)�
update_pthr��addr�rx�removermr�rr��installation_report�has_metadatar�r�get_metadata_linesryr��as_requirementr"r�r&�resolver0r'r	r(�reportr�)r��requirementr�r�r��distreq�distrosrcs        r;r�z!easy_install.process_distribution�s��	
����������t�$��4�#�#�D�H�H�-�-����#�#�D�)������T�"�� � ��&�,0�������)����)��)�)�+�t�C�d�C�D����3�4�T�=O�=O����-�-��'�'�(>�?�
��D�,�,��
�
$����[�_�_�)D��H�H�3�T�:��
�
 �D��$;��)�)�+�G�%�c�'�l�3�K����1�;�?�	4� ��n�,�,��
�t�/�/��1B�1B��G����t�4�4����8�8�4�#:�#:�:��%�%�d�&9�&9�&;�<� �	���:�K�H��$�	0� ��Q��(�a�/���	4� �����,�!�3��	4�s$�1H7�7	J�I�J�!I;�;Jc�~�|j�
|jS|jd�ry|jd�syy)Nznot-zip-safeTzzip-safeF)rnr�)r�r�s  r;�should_unzipzeasy_install.should_unzip"s=���;�;�"��{�{�?�"����^�,��� � ��,��r:c���tjj|j|j�}tjj|�r0d}t
j||j|j|�|Stjj|�r|}n�tjj|�|k(rtj|�tj|�}t|�dk(rDtjj||d�}tjj|�r|}t|�tj||�|S)Nz<%r already exists in %s; build directory %s will not be keptrPr)r�r�r8rurxr�rr�r�r\r��listdirr(r,�shutil�move)r�r.�
dist_filename�
setup_base�dstr�contentss       r;�
maybe_movezeasy_install.maybe_move+s����g�g�l�l�4�/�/����:��
�7�7�>�>�#��P�C��H�H�S�$�(�(�D�$8�$8�*�E���
�7�7�=�=��'�&�J��w�w���}�-��;��	�	�-�(��z�z�*�-�H��8�}��!� "�����Z��!�� E�
��7�7�=�=��/�!.�J�������J��$��
r:c��|jrytj�j|�D]}|j|��yr�)rr�ScriptWriter�best�get_args�write_script)r�r�rvs   r;rkz$easy_install.install_wrapper_scripts@s<������ �%�%�'�0�0��6�D��D���t�$�7r:c���t|j��}t||�}|r4|j|�t	�z}t
j
|�|z}|j|t|�d�y)z/Generate a legacy script wrapper and install itr]N)	r�r��is_python_script�_load_templater�r��
get_headerr�rB)r�r�rl�script_text�dev_pathr.�	is_script�bodys        r;rizeasy_install.install_scriptFsg���4�&�&�(�)��$�[�+�>�	���&�&�x�0�6�8�;�D�&�1�1�+�>��E�K����+�y��'=�s�Cr:c�h�d}|r|jdd�}td|�}|jd�S)z�
        There are a couple of template scripts in the package. This
        function loads one of them and prepares it for use.
        zscript.tmplz.tmplz (dev).tmplr��utf-8)rLr�decode)r�r�	raw_bytess   r;r�zeasy_install._load_templatePs9������<�<���7�D�#�L�$�7�	�����(�(r:c	��|j|D�cgc],}tjj|j|���.c}�tjd||j�tjj|j|�}|j|�|jryt�}t|�tjj|�rtj|�t|d|z�5}|j|�ddd�t|d|z
�ycc}w#1swY�xYw)z1Write an executable file to the scripts directoryzInstalling %s script to %sNr?i�)r�r�r�r8rqrr�rsr��
current_umaskr,r�r�rEr]�chmod)	r�rlr��moder�rX�target�maskr\s	         r;r�zeasy_install.write_script_s������7?�@�x�!�R�W�W�\�\�$�/�/�1�
-�x�@�	
�	���-�{�D�O�O�L������d�o�o�{�;��������<�<������� �
�7�7�>�>�&�!��I�I�f��
�&�#��*�
%��
�G�G�H��&�
�f�e�d�l�#��
A�&�
%�s�1D3�	D8�8Ec�P�|j|j|jd�}	||j�dd}|||�gS#t$rYnwxYw|}t
jj|�r)|jd�st|||j�n>t
jj|�rt
jj|�}|j|�r!|jr|�|j|||�}t
jj!|d�}t
jj#|�s�t%t
jj!|dd��}|s+t'dt
jj|�z��t)|�dkDr+t'dt
jj|�z��|d	}|j*r't-j.|j1||��gS|j3||�S)
N)r��.exez.whl����.pyzsetup.pyr�z"Couldn't find a setup script in %srPzMultiple setup scripts in %sr)�install_egg�install_exe�
install_wheelr��KeyErrorr�r��isfiler�r�unpack_progressr��abspath�
startswithrur�r8r�rr	r(rbrr��report_editable�build_and_install)	r�r.r�r}�
installer_map�install_distr��setup_script�setupss	         r;r�zeasy_install.install_eggsss����$�$��$�$��&�&�
�
�
	9�(��)<�)<�)>�r�s�)C�D�L�!���7�8�8���	��	���
�
�7�7�>�>�-�(��1G�1G��1N��=�&�$�2F�2F�G�
�W�W�]�]�=�
)�������7�J�
�!�!�&�)��$�$�� �����}�j�I�J��w�w�|�|�J�
�;���w�w�~�~�l�+��"�'�'�,�,�z�3�
�C�D�F��$�8��g�g�o�o�m�4�5����6�{�Q��$�2�R�W�W�_�_�]�5S�S���"�!�9�L��=�=��H�H�T�)�)�$��=�>��I��)�)�,�
�C�Cs�A�	A�Ac��tjj|�r+t|tjj	|d��}ntt
j|��}tj||��S)N�EGG-INFO)�metadata)
r�r�r�r$r8r%�	zipimport�zipimporterr#�
from_filename)r��egg_pathr�s   r;r�zeasy_install.egg_distribution�sU��
�7�7�=�=��"�#�H�b�g�g�l�l�8�Z�.P�Q�H�"�9�#8�#8��#B�C�H��)�)�(�X�F�Fr:c	��tjj|jtjj	|��}tjj|�}|jst|�|j|�}tjj|�r!tjj||��s�tjj|�rAtjj|�s"tj||j��nDtjj|�r%|jtj |fd|z�	d}tjj|�r7|j#|�rt$j&d}}n|t$j(d}}ni|j+|�r |j-|�|j.d}}n8d}|j#|�rt$j&d}}nt$j0d}}|j|||f|dztjj	|�tjj3|�fz�t5||�	�|j9|�|j|�S#t6$rt5|d�	��wxYw)
N�r��	Removing F�Moving�Copying�
ExtractingTz	 %s to %s��fix_zipimporter_caches)r�r�r8rprbr�r�r,r�r��samefiler�r�r�remove_treer*r�r�r�r��copytreer��mkpath�unpack_and_compile�copy2r\�update_dist_cachesr4rs)r�r�r}�destinationr��new_dist_is_zippedr\rSs        r;r�zeasy_install.install_egg�s���g�g�l�l�����G�G���X�&�
���g�g�o�o�k�2���|�|��[�)��$�$�X�.���G�G�N�N�;�'�B�G�G�,<�,<�X�{�,S��w�w�}�}�[�)�"�'�'�.�.��2M��$�$�[�$�,�,�G�������,�����I�I� �N��+�-��

�%*�"��7�7�=�=��*��*�*�6�2�%�{�{�H�1��%���	�1���&�&�t�,��K�K��,��2�2�L�q�A�)-�&��*�*�6�2�%�{�{�H�1��%�|�|�Y�1�������{�+���_��w�w�'�'��1�2�7�7�?�?�;�3O�P�Q��#��+=��	
����$��$�$�[�1�1���
�"�;�u�M��
�s
�4D%J;�;Kc
��t|�}|�td|z��td|jdd�|jdd�t	���}t
jj||j�dz�}||_	|dz}t
jj|d�}t
jj|d	�}t|�t||�|_|j||�t
jj|�s�t|d
�}	|	j!d�|j#d�D]@\}
}|
dk7s�|	j!|
j%d
d�j'��d|�d���B|	j)�t
jj|d�}|j+t,j/|�D�
cgc]%}
t
jj||
d���'c}
�t1j2|||j4|j6��|j9||�Scc}
w)Nz(%s is not a valid distutils Windows .exer�rri)r�ri�platformr�z.tmpr��PKG-INFOr?zMetadata-Version: 1.0
�target_version�_�-z: rHrfr)r�r�)r2r	r#rHrr�r�r8�egg_namer�r,r$�	_provider�
exe_to_eggr�rEr]�itemsrL�titlerFr�r�r�r�make_zipfiler�r�r�)r�r�r}�cfgr�r��egg_tmp�	_egg_info�pkg_infr\�k�vrqrvs              r;r�zeasy_install.install_exe�s���!�-�0���;� �:�]�J��
�������V�4��G�G�J�	�2�!�^�	
���7�7�<�<���
�
��&�(@�A�� ��
��V�#���G�G�L�L��*�5�	��'�'�,�,�y�*�5����!�%�g�y�9������
�w�/��w�w�~�~�g�&��W�c�"�A�
�G�G�-�.��	�	�*�-���1��(�(��G�G�!�)�)�C��*=�*C�*C�*E�q�I�J�.�
�G�G�I��W�W�\�\�)�Y�7�
����;G�;P�;P�QU�;V�W�;V�4�R�W�W�\�\�*�d�1�g�
.�;V�W�	
�	������L�L��L�L�		
�����&�1�1��
Xs� *Ic����
���t|��
g�g�i����
��fd�}t|�|�g}�D]�}|j�jd�s�#|j	d�}|d}tj|d�dz|d<tjj�g|���}�j|�|j|�tj||���|j��tjtjj�d�tj�|��dD]�}	t�|	s�tjj�d|	dz�}
tjj!|
�r�Ut#|
d	�}|j%d
jt�|	�d
z�|j'���y)z;Extract a bdist_wininst to the directories an egg would usec����|j�}�	D�]5\}}|j|�s�||t|�dz}|jd�}t	j
j�g|���}|j�}|jd�s|jd�rXtj|d�|d<d�tj
j|d�d<�j|�|cS|jd�r>|dk7r9d�tj
j|d�d<�
j|�|cS|jd	�stjd
|�y)N�/�.pyd�.dll���rPrr��SCRIPTS/rVzWARNING: can't process %s)r�r�r(r�r�r�r8r�r�strip_module�splitextrprr�)�srcr�rA�old�new�partsr�r��native_libs�prefixes�
to_compile�	top_levels       �����r;�processz(easy_install.exe_to_egg.<locals>.processs;����	�	��A�$���S��<�<��$���C��H�J��/�C��I�I�c�N�E��'�'�,�,�w�7��7�C�����B��{�{�6�*�b�k�k�&�.A�$-�$:�$:�5��9�$E��b�	�CD�	�"�'�'�"2�"2�5��8�"<�Q�"?�@�#�*�*�3�/��J����U�+��z�0A�CD�	�"�'�'�"2�"2�5��8�"<�Q�"?�@�"�)�)�#�.��J�%��<�<��'����4�c�:�r:rrrr�r�)rrz.txtr?rHN)r3rr�r�r�rrr�r�r8rp�
write_stub�byte_compile�write_safety_flag�analyze_eggr�r�rEr]rF)r�r�r�r�stubs�resr�resource�pyfiler�txtr\rr
rrs  `         @@@@r;r�zeasy_install.exe_to_eggs���$�M�2���
����	�	�	�*	�}�g�w�7����C��y�y�{�#�#�F�+��	�	�#��� ��9��%�2�2�5��9�=��E��b�	������g�6��6���!�!�&�)����V�$��$�$�X�v�6��	
���*�%��#�#��G�G�L�L��*�-�y�/D�/D�W�e�/T�	
�/�D��x��~��g�g�l�l�7�J��v�
�F���w�w�~�~�c�*��S�#��A��G�G�D�I�I�f�h�t�n�5��<�=��G�G�I�
/r:c
��t|�}|j�sJ�tjj	|j
|j
��}tjj|�}|jst|�tjj|�rAtjj|�s"tj||j��nDtjj|�r%|jtj |fd|z�	|j|j"|fdtjj%|��dtjj'|����t)|d��|j+|�|j-|�S#t)|d��wxYw)Nr�r�zInstalling z to Fr�)r�
is_compatibler�r�r8rpr�r�r�r,r�r�rr�r�r*r��install_as_eggrbr\r�rsr�)r��
wheel_pathr}�wheelr�s     r;r�zeasy_install.install_wheelJsA���j�!���"�"�$�$�$��g�g�l�l�4�#3�#3�U�^�^�5E�F���g�g�o�o�k�2���|�|��[�)�
�7�7�=�=��%�b�g�g�n�n�[�.I�� � ��d�l�l�C�
�W�W�^�^�K�
(��L�L��	�	����k�)�
�
	J��L�L��$�$����7�7�#�#�J�/�������1M�O�
�
�{�5�I�����$��$�$�[�1�1��
�{�5�I�s
�1AF>�>G
a(
        Because this distribution was installed --multi-version, before you can
        import modules from this package in an application, you will need to
        'import pkg_resources' and then use a 'require()' call similar to one of
        these examples, in order to select the desired version:

            pkg_resources.require("%(name)s")  # latest installed version
            pkg_resources.require("%(name)s==%(version)s")  # this exact version
            pkg_resources.require("%(name)s>=%(version)s")  # this version or higher
        z�
        Note also that the installation directory must be on sys.path at runtime for
        this to work.  (e.g. by being the application's script directory, by being on
        PYTHONPATH, or by being added to sys.path by your code.)
        c�8�d}|jrZ|jsN|d|jzz
}|jt	t
tj�vr|d|jzz
}|j}|j}|j}d}|t�zS)z9Helpful installation message for display to package usersz
%(what)s %(eggloc)s%(extras)srHr�)
rzr�_easy_install__mv_warningrpr�rr�r��_easy_install__id_warningr�r�rir�)	r��reqr��whatr�egglocrri�extrass	         r;r�z easy_install.installation_reportzs���/�����d�n�n��4�$�+�+�+�+�C����s�>�3�8�8�'D�D��t�d�/�/�/�/������� � ���,�,�����V�X�~�r:aR
        Extracted editable version of %(spec)s to %(dirname)s

        If it uses setuptools in its setup script, you can activate it in
        "development" mode by going to that directory and running::

            %(python)s setup.py develop

        See the setuptools documentation for the "develop" command for more info.
        c��tjj|�}tj}d|j
t
�zzS)NrH)r�r�r\r�r^�_easy_install__editable_msgr�)r�r.r�r\�pythons     r;r�zeasy_install.report_editable�s5���'�'�/�/�,�/�������d�)�)�F�H�4�4�4r:c�t�tjjdt�tjjdt�t|�}|jdkDr(d|jdz
z}|jdd|z�n!|jdkr|jdd�|jr|jdd	�tjd
|t|�dzddj|��	t||�y#t$r!}td|j d���|�d}~wwxYw)
Nzdistutils.command.bdist_eggzdistutils.command.egg_infor*r�rPrr�z-qz-nz
Running %s %s� zSetup script exited with )r��modulesr�rrr�r�r�r�rr�r(r8rr�r	rv)r�r�r�rvr�s     r;rzeasy_install.run_setup�s��������<�i�H������;�X�F��D�z���<�<�!���t�|�|�a�'�(�A��K�K��3��7�#�
�\�\�A�
��K�K��4� ��<�<��K�K��4� �����,�s�:���/B�/D�"E�s�x�x�PT�~�V�	V��l�D�)���	V� �!�&�&��)�!M�N�TU�U��	V�s�D
�
	D7�D2�2D7c��ddg}tjdtjj	|���}	|jtjj	|��|j
|�|j|||�t|g�}g}|D]7}||D]-}|j
|j|j|���/�9|s"|jstjd|�|t|�tj|j �S#t|�tj|j �wxYw)Nrz
--dist-dirz
egg-dist-tmp-)r~�dirz+No eggs found in %s (setup script problem?))r{r|r�r�r\�_set_fetcher_optionsrprr!r�r�r�rr�r�r'r�)	r�r�r�rv�dist_dir�all_eggs�eggsrxr�s	         r;r�zeasy_install.build_and_install�s���\�*���#�#�"�������(E�
��	,��%�%�b�g�g�o�o�l�&C�D��K�K��!��N�N�<��T�:�"�H�:�.�H��D���$�S�M�D��K�K�� 0� 0����
� K�L�*� ��������F��Q���H�����d�l�l�+��
�H�����d�l�l�+�s�CD&�&,Ec�,�|jjd�j�}d}i}|j�D]\}}||vr�|d||<�t	|��}t
jj|d�}tj||�y)a
        When easy_install is about to run bdist_egg on a source dist, that
        source dist might have 'setup_requires' directives, requiring
        additional fetching. Ensure the fetcher options given to easy_install
        are available to that command as well.
        r0)rtr�rsrwr|rP)r0z	setup.cfgN)
r�r��copyr�r�r�r�r8r�edit_config)	r�rq�ei_opts�fetch_directives�
fetch_optionsrxr�settings�cfg_filenames	         r;r.z!easy_install._set_fetcher_options�s����#�#�3�3�N�C�H�H�J��
���
��
�
��H�C���*�*��!$�Q��M�#��(�
�]�3���w�w�|�|�D�+�6�����<��2r:c���|j�y|j|jD]�}|js|j|jk(r�)t	j
d|�|jj
|�|j|jvs�s|jj
|j���|js�|j|jjvrt	j
d|�nnt	j
d|�|jj|�|j|jvr%|jj|j�|jry|jj�|jdk7rytjj|j d�}tjj#|�rtj$|�t'|d�5}|j)|jj+|j�dz�ddd�y#1swYyxYw)Nz&Removing %s from easy-install.pth filez4%s is already the active version in easy-install.pthz"Adding %s to easy-install.pth filer��setuptools.pth�wtrH)r�rxrzr�rr�r�r��pathsr�rpr��saver�r�r8rpr�r�rEr]�
make_relative)r�r�rVr�r\s     r;r�zeasy_install.update_pth�s����=�=� �����t�x�x�(�A��%�%�!�*�*��
�
�*E���H�H�=�q�A��M�M� � ��#��z�z�T�-�-�-�� � �'�'��
�
�3�)��!�!��}�}��
�
� 3� 3�3����J���
���=�t�D��
�
�!�!�$�'��=�=��(8�(8�8��$�$�+�+�D�M�M�:��<�<���
�
�����8�8�|�#���7�7�<�<�� 0� 0�2B�C��
�7�7�>�>�(�#��I�I�h��
�(�D�
!�Q�
�G�G�D�M�M�/�/��
�
�>��E�F�"�
!�
!�s�8I�Ic�4�tjd||�|S)NzUnpacking %s to %s)r�debug)r�rr�s   r;r�zeasy_install.unpack_progresss���	�	�&��S�1��
r:c������g�g����fd�}t|||��j���js@�D]:}tj|�tj
dzdz}t
||��<yy)Nc� ��|jd�r#|jd�s�j|�n3|jd�s|jd�r�j|��j||��jxr|xsdS)Nr��	EGG-INFO/rz.so)r�r�rpr�r�)rr�r��to_chmodrs  ���r;�pfz+easy_install.unpack_and_compile.<locals>.pfsr����|�|�E�"�3�>�>�+�+F��!�!�#�&����f�%����e�)<�����$�� � ��c�*��|�|�#�+��3�t�3r:imi�)rrr�r��stat�ST_MODEr�)r�r�r�rFr\r�rErs`     @@r;r�zeasy_install.unpack_and_compilesm����
���	4�	�x��b�1����*�%��|�|��������D�L�L�1�U�:�f�D���a����r:c��tjryddlm}	t	j
|jdz
�||dd|j��|jr |||jd|j��t	j
|j�y#t	j
|j�wxYw)Nr)rrP)rw�forcer�)	r��dont_write_bytecode�distutils.utilrrr'r�r�rw)r�rrs   r;rzeasy_install.byte_compiles����"�"��/�
	,����d�l�l�Q�.�/���a�q�$�,�,�O��}�}���!�]�]�� �L�L�	�
���d�l�l�+��C���d�l�l�+�s�A$B�!B>a�
        bad install directory or PYTHONPATH

        You are attempting to install a package to a directory that is not
        on PYTHONPATH and which Python does not read ".pth" files from.  The
        installation directory you specified (via --install-dir, --prefix, or
        the distutils default setting) was:

            %s

        and your PYTHONPATH environment variable currently contains:

            %r

        Here are some of your options for correcting the problem:

        * You can choose a different installation directory, i.e., one that is
          on PYTHONPATH or supports .pth files

        * You can add the installation directory to the PYTHONPATH environment
          variable.  (It must then also be on PYTHONPATH whenever you run
          Python and want to use the package(s) you are installing.)

        * You can set up the installation directory to support ".pth" files by
          using one of the approaches described here:

          https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations


        Please make the appropriate changes for your system and try again.
        c�v�|jsyttjj	d��}t|jj��D]^}|j|�s�tjj|�r�5|jd|z�tj|d��`y)zCreate directories under ~.N�~zos.makedirs('%s', 0o700)i�)rjrr�r�r�	only_strsr��valuesr�r��debug_printrA)r��homer�s   r;rzeasy_install.create_home_pathVs����y�y���B�G�G�.�.�s�3�4���d�.�.�5�5�7�8�D����t�$�R�W�W�]�]�4�-@�� � �!;�d�!B�C����D�%�(�9r:z/$base/lib/python$py_version_short/site-packagesz	$base/binr��rz$base/Lib/site-packagesz
$base/Scriptsc��|jd�j}|jr�t|�}|j|d<|jjtj|j�}|j�D] \}}t||d���t|||��"ddlm
}|D]Y}t||�}|��|||�}tjdk(rtjj|�}t|||��[y)Nrrqr)rr)�get_finalized_commandr�r~r��INSTALL_SCHEMESrHr�r�DEFAULT_SCHEMEr�r�rrLrr�r)r�rr��schemerrrs       r;r�zeasy_install._expandls����0�0��;�G�G���;�;��{�+�K�"&�+�+�K����)�)�-�-�b�g�g�t�7J�7J�K�F�#�\�\�^�	��c��4��t�,�4��D�$��,�,�	.��D��$��%�C��� ��k�2���7�7�g�%��'�'�,�,�S�1�C���d�C�(�
r:)T)Fr�)�tr9)�	Installed)O�__name__�
__module__�__qualname__�__doc__�description�command_consumes_argumentsr�r��user_options�boolean_options�negative_optrr�r�r�r��staticmethodr�rr�rr�rr�r�r1r:r,r�rIrJ�lstriprQrSrTrCrDrmrsrvryr��contextmanagerr~r0r�rr�r�r�rkrir�r�r�r�r�r�r�r�r r!r�r'r�rr�r.r�r�r�rrKrIrr�rVrWr�r9r:r;r0r0qs��1�4�K�!%��	1�7�G�M�7�6�9�G�?�H�T�	
�	Q�K�H�H�6�E�O�?�	
�

��:�T�^�^�K�L�? �L�B�O�#�H�-�L��L�+
�Z6������y�v�(��(�����
(�)�I�

!�9�:	L�
�+#�Z'�x���	��
�f�h�� &�h�o�o�	��
�f�h�
�#�8�?�?�	�� 
�f�h�!�$
"�8�t+�&������7��7�#L�J! �FO��	*I�X��*%�D��)��)�$�(1D�fG�42�l.2�b3�j2�6#�8�?�?�		��
�f�h��#�8�?�?�	��L��%�X�_�_�		��
�f�h��5�
V�$,�.3�6'G�R�
�&,�*'�x���	� �@�e�g�A�D)���I�"�
��O��-�"��N�
)r:r0c��tjjdd�jtj�}td|�S)Nr@r�)r�rGrHr��pathsep�filter)r�s r;�_pythonpathrj�s2���J�J�N�N�<��,�2�2�2�:�:�>�E��$���r:c
���g��jt��tjg}tjtjk7r|jtj�|D�]�}|s�tjdvr1�jtjj|dd��n�tjdk(rn�jtjj|ddjtj�d�tjj|dd�g�n2�j|tjj|dd�g�tjdk7r��d	|vr��tjjd
�}|s��;tjj|ddd
jtj�d�}�j|����td�td�f}�j�fd�|D��t j"r�jt j$�t'j(t*�5�jt!j,��ddd�t/t1t2�����S#1swY�$xYw)z&
    Return a list of 'site' dirs
    )�os2emx�riscos�Libz
site-packagesrr�zpython{}.{}zsite-python�darwinzPython.framework�HOME�Library�Pythonr��purelib�platlibc3�,�K�|]}|�vs�|���
y�wr�r9)r�rA�sitedirss  �r;r�z get_site_dirs.<locals>.<genexpr>�s�����>�y�!�A�X�,=�A�y�s�	�N)r�rjr�r~r�rpr�r�r�r8�sepr�r�rGrHrr�r�r�r�r�r��getsitepackagesr�r�r)r
r~rR�home_sp�	lib_pathsrvs     @r;r�r��s���
�H�
�O�O�K�M�"��
�
�|�H�
���#�*�*�$�������(������<�<�/�/��O�O�B�G�G�L�L����H�I�
�V�V�s�]��O�O��G�G�L�L���,�
�,�,�c�.>�.>�?�'�	��G�G�L�L���
�>��

�
�O�O���G�G�L�L����@��
��<�<�8�#��
�V�+���z�z�~�~�f�%�����'�'�,�,�����G�N�N�C�,�,�-��
��	���� �[�\��#�X�i�%8�8�I��O�O�>�y�>�>����������'�	�	�	�^�	,�����,�,�.�/�
-��C���1�2�H��O�
-�	,�s�5$J<�<Kc#�K�i}|D�]3}t|�}||vr�d||<tjj|�s�9tj|�}||f��|D]�}|jd�s�|dvr�t
tjj||��}tt|��}|j�|D]p}|jd�r�t|j��}||vr�3d||<tjj|�s�X|tj|�f���r����6y�w)zBYield sys.path directories that might contain "old-style" packagesrPrV)r>r;�importN)
rr�r�r�r�r�rEr8r�r-rFr��rstrip)�inputs�seenr\rrrr\�lines�lines        r;�expand_pathsr��s�����D��� ��)���d�?����W�
��w�w�}�}�W�%���
�
�7�#���u�n���D��=�=��(���=�=���R�W�W�\�\�'�4�0�1�A���Q��(�E�
�G�G�I����?�?�8�,��%�d�k�k�m�4���4�<����T�
��w�w�}�}�T�*���B�J�J�t�,�,�,����s�D=D?c��t|d�}	tj|�}|�	|j�y|d|dz
|dz
}|dkr	|j�y|j	|dz
�tjd|jd��\}}}|dvr	|j�y|j	|d|zz
�d	d	d
�}tj|�}	|j|�}	|	jdd�d
}
|
jtj��}
|jtj |
��|j%d�r|j%d�s	|j�y||j�S#tj"$rY|j�ywxYw#|j�wxYw)znExtract configuration data from a bdist_wininst .exe

    Returns a configparser.RawConfigParser, or None
    �rbN�	���z<iii)izV4i{V4r�)rir��rPrr��Setup)rE�zipfile�_EndRecDatarF�seekr7�unpack�read�configparser�RawConfigParserr�r�r��getfilesystemencoding�	read_file�io�StringIO�Error�has_section)r�r\�endrec�	prepended�tag�cfglen�bmlen�initr��part�configs           r;r2r2s���
	
�]�D�!�A� ��$�$�Q�'���>��:	
���	�7�A�Y����*�f�Q�i�7�	��r�>��2	
���	�1	
���y�2�~��#�]�]�6�1�6�6�"�:�>���V�U��.�.��(	
���	�%	
���y�B��K�(�)���4���*�*�4�0��		��6�6�&�>�D��Z�Z��q�)�!�,�F��]�]�3�#<�#<�#>�?�F��M�M�"�+�+�f�-�.����z�*�#�/�/�'�2J��	
���	��	
���	���!�!�	��	
���	�	��	
���	�sH�G�G�AG�21G�$A-F�"G�G�F=�*G�<F=�=G�Gc	��gd�}tj|�}	|j�D�]7}|j}|j	d�}t|�dk(rD|ddk(r<|dj
d�r(|jddj|d	d�d
f�n�t|�dk7s|j
d�s��|j
d�r��|dj�d
vs��|j|�j�}t|�D]P}|j�jdd�}|jd�r�5|j!|d�d|�d�df��R��:|j#�|D��	cgc]\}}	|j%�|	f��}}}	|j'�|j)�|S#|j#�wxYwcc}	}w)z4Get exe->egg path translations for a given .exe file))zPURELIB/r�)zPLATLIB/pywin32_system32r�)zPLATLIB/r�)rzEGG-INFO/scripts/)zDATA/lib/site-packagesr�rrr*r�rPz	.egg-inforNrDrVz
-nspkg.pth)�PURELIB�PLATLIB�\r|r�)r��ZipFile�infolistr�r�r(r�r�r8�upperr�r�r-rKrLr�rprFr��sort�reverse)
�exe_filenamer
rQr�rrr��pthrX�ys
          r;r3r3)s����H�	����%�A���J�J�L�D��=�=�D��J�J�s�O�E��5�z�Q��5��8�z�#9���8�$�$�[�1��O�O�A�����r���(;�[�'I�J���5�z�Q��d�m�m�F�&;���}�}�\�*���Q�x�~�~��#9�9��6�6�$�<�.�.�0��&�x�0�C��)�)�+�-�-�d�C�8�C��>�>�(�3� ���e�A�h��*D�r�(J�K�1�!�$	
���	�+3�4�8�4�1�a�����A��8�H�4��M�M�O������O��		
���	��4s�C
F<�&AF<�!F<�;G�<Gc�`��eZdZdZd
�fd�	Zd�Zd�Zd�Zed��Z	�fd�Z
�fd�Zd	�Z�xZ
S)r1z)A .pth file with Distribution paths in itc
����||_ttt|��|_tt
jj|j��|_|j�\|_
|_|jdd|_t�|�9gdd�t|j�D]+}tt|j t#|d����-y)NT)r�r�r�rrvr�r�r\�basedir�_loadr=�dirty�_init_paths�super�__init__r-r�r )r�r�rvr��	__class__s    �r;r�zPthDistributions.__init__Qs���� ��
��S���:�;��
�%�b�g�g�o�o�d�m�m�&D�E���!%������
�D�J��:�:�a�=���
����T�4�(���
�
�+�D���T�X�X�1�$��=�>�?�,r:c���g}dx}}tj|j�}t|jd�}|D]�}|j�}|j
|�|jd�rd}�8|j�}|r|jd�r�\ttjj|j|��}	|	|vstjj|	�s)tj d|�d}|j#���d||	<��|j%�|r;|dj�s(|j#�d}|r|dj�s�(||xs|xr|fS)	NF�rt)�import �from T�#z!cleaned up dirty or duplicated %rrPr)r��fromkeysrvrEr�r}rpr�rKrr�r�r8r�r�rrA�poprF)
r�r=r��
saw_importrr\r�r��
stripped_path�normalized_paths
          r;�	_load_rawzPthDistributions._load_raw\s9����"�"��
��}�}�T�]�]�+�������%���D��;�;�=�D��L�L������3�4�!�
�� �J�J�L�M� �M�$<�$<�S�$A��-�R�W�W�\�\�$�,�,��-M�N�O��$�&�b�g�g�n�n�_�.M��	�	�=�t�D����	�	���$%�D��!�%�&	
���	��E�"�I�O�O�-��I�I�K��E��E�"�I�O�O�-��e�5�� 4�*�5�5r:c�|�tjj|j�r|j	�SgdfS)NF)r�r�r�r�r�r�s r;r�zPthDistributions._load{s-��
�7�7�>�>�$�-�-�(��>�>�#�#��5�y�r:c��|j�\}}|ddD]U}||jvr4|jj|�tjd|�d}�E|j|��W|jddD]�}||vs�|j
d�r�tjj|j|�}tjj|�r�d|jj|�tjd|�d}��|xj|xs|j|jk7zc_|jsytt|j |j��}|r�tj"d|j$�|j'|�}dj|�dz}tjj)|j$�rtj*|j$�t-|j$d�5}|j/|�ddd�nhtjj|j$�r?tj"d	|j$�tj*|j$�d
|_|jdd|jddy#1swY�-xYw)z$Write changed .pth file back to diskNzdetected new path %rT)r�r�r�z!removing now non-existent path %rz	Saving %srHr<zDeleting empty %sF)r�r=rprr�r�r�r�r�r8r�r�r�r�r�r�r?rAr��_wrap_linesr�r�rEr])	r��
last_paths�
last_dirtyr��
absolute_path�	rel_pathsr��datar\s	         r;r>zPthDistributions.save�s��"&�����
�J�
�q�M�D��4�:�:�%��
�
�!�!�$�'����/��6�!�
��!�!�$�'�
"��J�J�q�M�D��:�%�d�o�o�)�/�!#�����T�\�\�4� @�
��w�w�~�~�m�4��J�J�%�%�d�+��H�H�@�$�G�!%�J�"�	
�
�
�j�B�D�J�J�$�2B�2B�$B�B�
��z�z����T�/�/����<�=�	���I�I�k�4�=�=�1��$�$�Y�/�E��9�9�U�#�d�*�D��w�w�~�~�d�m�m�,��	�	�$�-�-�(��d�m�m�T�*�a�����
�+�*�
�W�W�^�^�D�M�M�
*��I�I�)�4�=�=�9��I�I�d�m�m�$���
�"�j�j��m������+�*�s�$K�Kc��|Sr�r9)r�s r;r�zPthDistributions._wrap_lines�s���r:c�*��|j|jvxr;|j|jvxs!|jtj�k(}|r,|jj|j�d|_t�|�!|�y)z"Add `dist` to the distribution mapTN)	r�r=rvr��getcwdrpr�r�r�)r�r��new_pathr�s   �r;r�zPthDistributions.add�st����=�=��
�
�2�
��M�M����.�
)�
�M�M�R�Y�Y�[�(�		���J�J���d�m�m�,��D�J�
���D�r:c����|j|jvrE|jj|j�d|_|j|jvr�Et�|�	|�y)z'Remove `dist` from the distribution mapTN)r�r=r�r�r�)r�r�r�s  �r;r�zPthDistributions.remove�sP����m�m�t�z�z�)��J�J���d�m�m�,��D�J��m�m�t�z�z�)�	���t�r:c��tjjt|��\}}t	|j
�}|g}tjdk(xrdxstj}t	|�|k\r�||j
k(r@|jtj�|j�|j|�Stjj|�\}}|j|�t	|�|k\r��|S)Nr)r�r�r�rr(r��altseprwrp�curdirr�r8)r�r��npath�last�baselenrrws       r;r?zPthDistributions.make_relative�s����g�g�m�m�N�4�$8�9���t��d�l�l�#������i�i�3��&�3�0�"�&�&���%�j�G�#�����$����R�Y�Y�'��
�
���x�x���&��'�'�-�-��.�K�E�4��L�L���
�%�j�G�#��Kr:)r9)r[r\r]r^r�r�r�r>rdr�r�r�r?�
__classcell__)r�s@r;r1r1Ns?���3�	@�6�>�
,,�\������
r:r1c�<�eZdZed��Zed�Zed�Zy)�RewritePthDistributionsc#�ZK�|j��|D]}|���|j��y�wr�)�prelude�postlude)�clsr�r�s   r;r�z#RewritePthDistributions._wrap_lines�s)�����k�k���D��J���l�l��s�)+z?
        import sys
        sys.__plen = len(sys.path)
        z�
        import sys
        new = sys.path[sys.__plen:]
        del sys.path[sys.__plen:]
        p = getattr(sys, '__egginsert', 0)
        sys.path[p:p] = new
        sys.__egginsert = p + len(new)
        N)r[r\r]�classmethodr�rNr�r�r9r:r;r�r��s6�������	��G��	�	�Hr:r��SETUPTOOLS_SYS_PATH_TECHNIQUE�raw�rewritec��ttjt�rtSt	j
tjj
��S)z_
    Return a regular expression based on first_line_re suitable for matching
    strings.
    )r�r
�patternr��re�compiler�r9r:r;�_first_line_rer��s:��
�-�'�'��-����:�:�m�+�+�2�2�4�5�5r:c��|tjtjfvr5tjdk(r"t	|t
j�||�Stj�\}}}|d|dd|�d|��zf�)NrrrPr*)	r�r�r�rr�rG�S_IWRITEr�rR)�func�arg�exc�et�evr�s      r;�
auto_chmodr�sg����	�	�2�9�9�%�%�"�'�'�T�/�
�c�4�=�=�!��C�y������I�B��A�
�a�5�"�Q�%�t�S�1�2�
3�3r:c��t|�}t|tj�|rt	|�yt|�y)aa

    Fix any globally cached `dist_path` related data

    `dist_path` should be a path of a newly installed egg distribution (zipped
    or unzipped).

    sys.path_importer_cache contains finder objects that have been cached when
    importing data from the original distribution. Any such finders need to be
    cleared since the replacement distribution might be packaged differently,
    e.g. a zipped egg distribution might get replaced with an unzipped egg
    folder or vice versa. Having the old finders cached may then cause Python
    to attempt loading modules from the replacement distribution using an
    incorrect loader.

    zipimport.zipimporter objects are Python loaders charged with importing
    data packaged inside zip archives. If stale loaders referencing the
    original distribution, are left behind, they can fail to load modules from
    the replacement distribution. E.g. if an old zipimport.zipimporter instance
    is used to load data from a new zipped egg archive, it may cause the
    operation to attempt to locate the requested data in the wrong location -
    one indicated by the original distribution's zip archive directory
    information. Such an operation may then fail outright, e.g. report having
    read a 'bad local file header', or even worse, it may fail silently &
    return invalid data.

    zipimport._zip_directory_cache contains cached zip archive directory
    information for all existing zipimport.zipimporter instances and all such
    instances connected to the same archive share the same cached directory
    information.

    If asked, and the underlying Python implementation allows it, we can fix
    all existing zipimport.zipimporter instances instead of having to track
    them down and remove them one by one, by updating their shared cached zip
    archive directory information. This, of course, assumes that the
    replacement distribution is packaged as a zipped egg.

    If not asked to fix existing zipimport.zipimporter instances, we still do
    our best to clear any remaining zipimport.zipimporter related cached data
    that might somehow later get used when attempting to load data from the new
    distribution and thus cause such load operations to fail. Note that when
    tracking down such remaining stale data, we can not catch every conceivable
    usage from here, and we clear only those that we know of and have found to
    cause problems if left alive. Any remaining caches should be updated by
    whomever is in charge of maintaining them, i.e. they should be ready to
    handle us replacing their zip archives with new distributions at runtime.

    N)r�_uncacher��path_importer_cache�!_replace_zip_directory_cache_data�*_remove_and_clear_zip_directory_cache_data)�	dist_pathr�r�s   r;r�r�	s4��x%�Y�/�O��_�c�5�5�6��)�/�:� 	3�?�Cr:c��g}t|�}|D]K}t|�}|j|�s� |||dztjdfvs�;|j|��M|S)ap
    Return zipimporter cache entry keys related to a given normalized path.

    Alternative path spellings (e.g. those using different character case or
    those using alternative path separators) related to the same path are
    included. Any sub-path entries are included as well, i.e. those
    corresponding to zip archives embedded in other zip archives.

    rPr�)r(rr�r�rwrp)r��cache�result�
prefix_len�p�nps      r;�"_collect_zipimporter_cache_entriesr�[sj���F��_�%�J�
��
�A�
��
�=�=��)�b��j�1�n�.M��F�F��R
�/
�
�M�M�!��
��Mr:c�`�t||�D]}||}||=|xr	|||�}|��|||<�!y)a�
    Update zipimporter cache data for a given normalized path.

    Any sub-path entries are processed as well, i.e. those corresponding to zip
    archives embedded in other zip archives.

    Given updater is a callable taking a cache entry key and the original entry
    (after already removing the entry from the cache), and expected to update
    the entry and possibly return a new one to be inserted in its place.
    Returning None indicates that the entry should not be replaced with a new
    one. If no updater is given, the cache entries are simply removed without
    any additional processing, the same as if the updater simply returned None.

    N)r�)r�r��updaterr��	old_entry�	new_entrys      r;�_update_zipimporter_cacher�qsH��0���
G���!�H�	��!�H��5���9� 5�	�� � �E�!�H�Hr:c��t||�yr�)r�)r�r�s  r;r�r��s���o�u�5r:c�B�d�}t|tj|��y)Nc�$�|j�yr�)�clear�r�r�s  r;�2clear_and_remove_cached_zip_archive_directory_datazf_remove_and_clear_zip_directory_cache_data.<locals>.clear_and_remove_cached_zip_archive_directory_data�s�����r:�r��r�r��_zip_directory_cache)r�rs  r;r�r��s ������&�&�B�r:�__pypy__c�B�d�}t|tj|��y)Nc��|j�tj|�|jtj|�|Sr�)rr�r�r�rrs  r;�)replace_cached_zip_archive_directory_datazT_replace_zip_directory_cache_data.<locals>.replace_cached_zip_archive_directory_data�s;��
�O�O���!�!�$�'����Y�;�;�D�A�B��r:rr)r�r	s  r;r�r��s ��	�	"���*�*�=�	
r:c�J�	t||d�y#ttf$rYywxYw)z%Is this string a valid Python script?�execTF)r��SyntaxError�	TypeError)rMr�s  r;�	is_pythonr�s1�����h��'���
��#����s�
�"�"c��	t|d��5}|jd�}ddd�dk(S#1swY�xYw#t$r|cYSwxYw)zCDetermine if the specified executable is a .sh (contains a #! line)zlatin-1)�encodingr*N�#!)rEr�rB)r^�fp�magics   r;�is_shr�sN���
�*�y�
1�R��G�G�A�J�E�2��D�=��	2�
1�������s�
:�.�:�7�:�A�Ac�.�tj|g�S)z@Quote a command line argument according to Windows parsing rules��
subprocess�list2cmdline)r�s r;�nt_quote_argr�s���"�"�C�5�)�)r:c���|jd�s|jd�ryt||�ry|jd�r#d|j�dj	�vSy)zHIs this text, as a whole, a Python script? (as opposed to shell/bat/etc.r��.pywTrr(rF)r�rr��
splitlinesr�)r�r�s  r;r�r��s`�������8�#4�#4�V�#<����h�'�����d�#��;�1�1�3�A�6�<�<�>�>�>�r:)r�c��yr�r9)rvs r;�_chmodr�r<r:c��tjd||�	t||�y#tj$r }tjd|�Yd}~yd}~wwxYw)Nzchanging mode of %s to %ozchmod failed: %s)rrArr��error)r�r�rcs   r;r�r��sH���I�I�)�4��6�)��t�T���
�8�8�)��	�	�$�a�(�(��)�s�&�A�A�Ac��eZdZdZgZe�Zed��Zed��Z	ed��Z
ed��Zed��Zd�Z
ed��Zd	�Zed
��Zed��Zy)
�CommandSpeczm
    A command spec for a #! header, specified as a list of arguments akin to
    those passed to Popen.
    c��|S)zV
        Choose the best CommandSpec class based on environmental conditions.
        r9�r�s r;r�zCommandSpec.bests	��
�
r:c��tjjtj�}tj
j
d|�S)N�__PYVENV_LAUNCHER__)r�r�r	r�r^rGrH)r��_defaults  r;�_sys_executablezCommandSpec._sys_executables0���7�7�#�#�C�N�N�3���z�z�~�~�3�X�>�>r:c��t||�r|St|t�r||�S|�|j�S|j|�S)zg
        Construct a CommandSpec from a parameter to build_scripts, which may
        be None.
        )r�r��from_environment�from_string)r��params  r;�
from_paramzCommandSpec.from_paramsJ���e�S�!��L��e�T�"��u�:���=��'�'�)�)����u�%�%r:c�0�||j�g�Sr�)r(r$s r;r*zCommandSpec.from_environments���C�'�'�)�*�+�+r:c�R�tj|fi|j��}||�S)z}
        Construct a command spec from a simple string representing a command
        line parseable by shlex.split.
        )�shlexr��
split_args)r��stringr�s   r;r+zCommandSpec.from_strings%�����F�5�c�n�n�5���5�z�r:c��tj|j|��|_t	j
|�}t
|�sdg|jddyy)Nz-xr)r0r��_extract_options�optionsrrrF)r�r��cmdlines   r;�install_optionszCommandSpec.install_options(sL���{�{�4�#8�#8��#E�F����)�)�$�/���w�� $�v�D�L�L��!�� r:c��|dzj�d}t�j|�}|r|jd�xsdnd}|j	�S)zH
        Extract any options from the first line of the script.
        rHrrPr�)rr��match�grouprK)�orig_script�firstr9r5s    r;r4zCommandSpec._extract_options.sQ��
�t�#�/�/�1�!�4��� �&�&�u�-��*/�%�+�+�a�.�&�B�R���}�}��r:c�P�|j|t|j�z�Sr�)�_renderr�r5r�s r;�	as_headerzCommandSpec.as_header8s���|�|�D�4����#5�5�6�6r:c�l�d}|D],}|j|�s�|j|�s�'|ddcS|S)Nz"'rPr)r�r�)�item�_QUOTES�qs   r;�
_strip_quoteszCommandSpec._strip_quotes;s;�����A����q�!�d�m�m�A�&6��A�b�z�!���r:c�J�tjd�|D��}d|zdzS)Nc3�bK�|]'}tj|j�����)y�wr�)r"rDrK)r�rAs  r;r�z&CommandSpec._render.<locals>.<genexpr>Es%����*
�@E��K�%�%�d�j�j�l�3��s�-/rrHr)r�r6s  r;r>zCommandSpec._renderCs0���)�)�*
�@E�*
�
���g�~��$�$r:N)r[r\r]r^r5r�r1r�r�r(r-r*r+r7rdr4r?rDr>r9r:r;r"r"�s����
�G���J������?��?��&��&��,��,�����&�����7������%��%r:r"c��eZdZed��Zy)�WindowsCommandSpecFrSN)r[r\r]r�r1r9r:r;rHrHOs���E�"�Jr:rHc��eZdZdZej
d�j
�ZeZ	e
d	d��Zed��Z
e
d��Ze
d��Ze
d
d��Zy)r�z`
    Encapsulates behavior around writing entry point scripts for console and
    gui apps.
    aJ
        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
        import re
        import sys

        # for compatibility with easy_install; see #2198
        __requires__ = %(spec)r

        try:
            from importlib.metadata import distribution
        except ImportError:
            try:
                from importlib_metadata import distribution
            except ImportError:
                from pkg_resources import load_entry_point


        def importlib_load_entry_point(spec, group, name):
            dist_name, _, _ = spec.partition('==')
            matches = (
                entry_point
                for entry_point in distribution(dist_name).entry_points
                if entry_point.group == group and entry_point.name == name
            )
            return next(matches).load()


        globals().setdefault('load_entry_point', importlib_load_entry_point)


        if __name__ == '__main__':
            sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
            sys.exit(load_entry_point(%(spec)r, %(group)r, %(name)r)())
        Nc#�VK�|�|j�}t|j��}dD]u}|dz}|j|�j	�D]L\}}|j|�|jt�z}|j||||�}	|	D]}
|
����N�wy�w)z�
        Yield write_script() argument tuples for a distribution's
        console_scripts and gui_scripts entry points.
        N��console�gui�_scripts)	r�r�r��
get_entry_mapr��_ensure_safe_name�templater��_get_script_args)r�r��headerr.�type_r:r�epr�rvrs           r;r�zScriptWriter.get_args�s������>��^�^�%�F��4�&�&�(�)��%�E��J�&�E� �.�.�u�5�;�;�=���b��%�%�d�+�!�l�l�V�X�5���+�+�E�4���M���C��I� �	>�&�s�B'B)c�J�tjd|�}|rtd��y)z?
        Prevent paths in *_scripts entry point names.
        z[\\/]z+Path separators not allowed in script namesN)r��searchr)r�has_path_seps  r;rPzScriptWriter._ensure_safe_name�s(��
�y�y��4�0����J�K�K�r:c��tjdk(s&tjdk(r'tjdk(rt
j
�S|S)zD
        Select the best ScriptWriter for this environment.
        �win32�javar)r�r�r�r�_name�WindowsScriptWriterr�r$s r;r�zScriptWriter.best�s:��
�<�<�7�"�r�w�w�&�'8�R�X�X��=M�&�+�+�-�-��Jr:c#�K�|||zf��y�wr�r9)r�rTrrSr�s     r;rRzScriptWriter._get_script_args�s�����V�k�)�*�*�s�
c��|jj�j|�}|j|�|j	�S)z;Create a #! line, getting options (if any) from script_text)�command_spec_classr�r-r7r?)r�r�r^�cmds    r;r�zScriptWriter.get_header�s=���$�$�)�)�+�6�6�z�B�����K�(��}�}��r:r�)r�N)r[r\r]r^rIrJrerQr"r`r�r�rdrPr�rRr�r9r:r;r�r�Ss����
�x���!	�#�F
�f�h�G
�J%������"�L��L������+��+����r:r�c�P�eZdZeZed��Zed��Zed��Ze	d��Z
y)r]c�n�tt|��}tjj	dd�}||S)zC
        Select the best ScriptWriter suitable for Windows
        )r^�natural�SETUPTOOLS_LAUNCHERr^)r��WindowsExecutableLauncherWriterr�rGrH)r��
writer_lookup�launchers   r;r�zWindowsScriptWriter.best�s6��
�6��
�
�
�:�:�>�>�"7��F���X�&�&r:c#�K�tdd��|}|tjdj�j	d�vr/dj
d
it
���}tj|�gd�}|j|�|j||�}|D�cgc]}||z��	}	}||z||zd|	f��y	cc}w�w)z For Windows, add a .py extension�.pyarrK�PATHEXT�;zK{ext} not listed in PATHEXT; scripts will not be recognized as executables.)rjr��
-script.py�.pyc�.pyorr�rYNr9)r�r�rGr�r�r�r�rrmr��_adjust_header)
r�rTrrSr��extrr	rXr�s
          r;rRz$WindowsScriptWriter._get_script_args�s������6�v�.�u�5���b�j�j��+�1�1�3�9�9�#�>�>��-��f�!��x�!�C�
�"�"�3�'�K���
�
�3���#�#�E�6�2��&)�*�c��D�1�H�c��*��S�j�&�;�.��X�=�=��+�s�BC�B<�+Cc���d}d}|dk(r||}}tjtj|�tj�}|j	||��}|j|�r|S|S)z�
        Make sure 'pythonw' is used for gui and 'python' is used for
        console (regardless of what sys.executable is).
        rXrYrM)r2�repl)r�r��escape�
IGNORECASE�sub�_use_header)r�rT�orig_headerr�rs�
pattern_ob�
new_headers       r;rpz"WindowsScriptWriter._adjust_header�sc�� �����E�>� �'�T�G��Z�Z��	�	�'� 2�B�M�M�B�
��^�^�;�T�^�B�
� �_�_�Z�8�z�I�k�Ir:c�j�|ddjd�}tjdk7xst|�S)z�
        Should _adjust_header use the replaced header?

        On non-windows systems, always use. On
        Windows systems, only use the replaced header if it resolves
        to an executable on the system.
        r*r�"rZ)rKr�r�r)rz�clean_headers  r;rwzWindowsScriptWriter._use_header�s4��"�!�B�'�-�-�c�2���|�|�w�&�G�/�,�*G�Gr:N)r[r\r]rHr`r�r�rRrprdrwr9r:r;r]r]�sZ��+���
'��
'��
>��
>��J��J��	H��	Hr:r]c��eZdZed��Zy)rfc#�
K�|dk(rd}d}dg}nd}d}gd�}|j||�}|D�	cgc]}	||	z��	}
}	||z||zd|
f��|dzt|�d	f��t�s|d
z}|t|�df��yycc}	w�w)zG
        For Windows, add a .py extension and an .exe launcher
        rMz-script.pywr�clirm)r�rnrorYr�r]z
.exe.manifestN)rp�get_win_launcherr<�load_launcher_manifest)r�rTrrSr��
launcher_typerqr	�hdrrXr��m_names            r;rRz0WindowsExecutableLauncherWriter._get_script_args�s�����
�E�>�!�M��C��(�C�!�M��C�)�C�� � ���/��&)�*�c��D�1�H�c��*��c�z�3��,�c�8�<�<��6�M��]�+��
�	
�
�z��O�+�F��1�$�7��=�=���+�s�,B�A>�A	BN)r[r\r]r�rRr9r:r;rfrf�s���>��>r:rfc���d|z}t�r3t�dk(r|jdd�}n%|jdd�}n|jdd�}td|�S)z�
    Load the Windows launcher (executable) suitable for launching a script.

    `type` should be either 'cli' or 'gui'

    Returns the executable as a byte string.
    z%s.exez	win-arm64r�z-arm64.z-64.z-32.r�)r<rrLr)�type�launcher_fns  r;r�r�
	s_���T�/�K��z��>�[�(�%�-�-�c�9�=�K�%�-�-�c�6�:�K�!�)�)�#�v�6���<��5�5r:c�n�tjtd�}|jd�t	�zS)Nzlauncher manifest.xmlr�)�
pkg_resourcesrr[r��vars)r�manifests  r;r�r� 	s+���,�,�X�7N�O�H��?�?�7�#�d�f�,�,r:Fc�0�tj|||�Sr�)r+�
shutil_rmtree)r��
ignore_errors�onexcs   r;r�r�%	s���$�$�T�=�%�@�@r:c�Z�tjd�}tj|�|S)N�)r��umask)�tmps r;r�r�)	s��
�(�(�5�/�C��H�H�S�M��Jr:c��td�|�S)z,
    Exclude non-str values. Ref #3063.
    c�"�t|t�Sr�)r�r�)rs r;�<lambda>zonly_strs.<locals>.<lambda>3	s��j��c�2r:)ri)rPs r;rOrO/	s���2�F�;�;r:c��eZdZdZdZdZy)rlz#easy_install command is deprecated.z�
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.
    z-https://github.com/pypa/setuptools/issues/917N)r[r\r]�_SUMMARY�_DETAILS�_SEE_URLr9r:r;rlrl6	s��4�H��H�
?�Hr:rlr�)z<string>)~r^rrLrrr�distutils.errorsrrr	r
r)rr�distutils.command.build_scriptsr
r_r�distutils.commandrr�r�r�r�r{r�r�rGr5rI�warningsr�r7r�rr0r�r�r�rr�r�setuptools.sandboxr�setuptools.commandr�setuptools.archive_utilr�setuptools.package_indexrrrrr�setuptools.warningsrr�setuptools.wheelrr�rrrr r!r"r#r$r%r&r'r(r)r�r+�_pathr,�extern.jaraco.textr-�filterwarnings�
PEP440Warning�__all__r<rBrFrNr0rjr�r�r2r3r1r�rGrHr�r�r�r�r�r�r��builtin_module_namesr�rrrr�r�r�ImportErrorr�r"r(�sys_executablerHr�r]rfr�r�r�r�rOrlr9r:r;�<module>r�sI��
��'�3���$�9�+�%�
�	��
���	��
����
����	�����(�%�2���
3�O�"�������$�,�����	�M�,G�,G�H���%���=�O)�7�O)�d(�
G�T+-�\&�R"�JE�{�E�P�.��4�:�:�>�>�1�5�9�Y�F�.��	6�4�OD�d�,!�@6��&��)�)�)�(R�%�
�*��*�

�
�"�)�Q%�$�Q%�j�,�,�.��#��#�\�\�~8H�,�8H�v>�&9�>�@6�&-�
!&�Z�A��<�?�$@�?��[
�
�
�
�s�2H�H*�)H*python3.12/site-packages/setuptools/command/__pycache__/register.cpython-312.pyc000064400000002036151732703460023520 0ustar00�

��_i���X�ddlmZddlmcmZddlmZGd�dej�Zy)�)�logN)�RemovedCommandErrorc��eZdZdZd�Zy)�registerz+Formerly used to register packages on PyPI.c�b�d}|jd|ztj�t|��)Nz]The register command has been removed, use twine to upload instead (https://pypi.org/p/twine)zERROR: )�announcer�ERRORr)�self�msgs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/register.py�runzregister.run
s/��
3�	�
	
�
�
�i�#�o�s�y�y�1�!�#�&�&�N)�__name__�
__module__�__qualname__�__doc__r
�rrrrs
��5�'rr)�	distutilsr�distutils.command.register�commandr�orig�setuptools.errorsrrrr�<module>rs!���)�)�1�'�t�}�}�'rpython3.12/site-packages/setuptools/command/__pycache__/install.cpython-312.pyc000064400000015157151732703460023352 0ustar00�

��_i���.�ddlmZddlZddlZddlZddlmcmZddl	Z	ddl
mZmZejZ
Gd�dej�ZejjD�cgc]}|dejvs�|��c}ej ze_ycc}w)�)�DistutilsArgErrorN�)�SetuptoolsDeprecationWarning�SetuptoolsWarningc���eZdZdZej
jddgzZej
jddgzZdd�fdd	�fgZe	e�Z
d
�Zd�Zd�Z
d
�Zed��Zd�Zy)�installz7Use easy_install to install the package, w/dependencies)�old-and-unmanageableNzTry not to use this!)�!single-version-externally-managedNz5used by system package builders to create 'flat' eggsr	r
�install_egg_infoc��y�NT���selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/install.py�<lambda>zinstall.<lambda>s��$��install_scriptsc��yr
rrs rrzinstall.<lambda> s��rc��tjddd��tjj	|�d|_d|_y)Nzsetup.py install is deprecated.z�
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.
            zAhttps://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)�see_url)r�emit�origr�initialize_options�old_and_unmanageable�!single_version_externally_managedrs rrzinstall.initialize_options$sB��$�)�)�-�
�
X�	
�	
���'�'��-�$(��!�15��.rc���tjj|�|jrd|_y|jr%|js|j
st
d��yyy)NTzAYou must specify --record or --root when building system packages)rr�finalize_options�rootr�recordrrs rrzinstall.finalize_options6sW�����%�%�d�+��9�9�59�D�2�
�
3�
3��9�9�T�[�[�'� ���&1�9�4rc��|js|jrtjj	|�Sd|_d|_y)N�)rrrr�handle_extra_path�	path_file�
extra_dirsrs rr#zinstall.handle_extra_pathAs6���9�9��>�>��<�<�1�1�$�7�7������rc��|js|jrtjj	|�S|jt
j��s tjj	|�y|j�y)N)	rrrr�run�_called_from_setup�inspect�currentframe�do_egg_installrs rr'zinstall.runKs]���$�$��(N�(N��<�<�#�#�D�)�)��&�&�w�';�';�'=�>��L�L���T�"����!rc��|�Fd}tj|�tj�dk(rd}tj|�yt	j
|�}|ddD]f}|dd\}t	j|�}|jjd	d
�}|dk(r|jdk(r�P|d
k(xr|jdk(cSy)a�
        Attempt to detect whether run() was called from setup() or by another
        command.  If called by setup(), the parent caller will be the
        'run_command' method in 'distutils.dist', and *its* caller will be
        the 'run_commands' method.  If called any other way, the
        immediate caller *might* be 'run_command', but it won't have been
        called by 'run_commands'. Return True in that case or if a call stack
        is unavailable. Return False otherwise.
        Nz4Call stack not available. bdist_* commands may fail.�
IronPythonz6For best results, pass -X:Frames to enable call stack.Tr���__name__r"zsetuptools.dist�run_commandzdistutils.dist�run_commands)
rr�platform�python_implementationr)�getouterframes�getframeinfo�	f_globals�get�function)�	run_frame�msg�frames�frame�caller�info�
caller_modules       rr(zinstall._called_from_setupVs�����H�C��"�"�3�'��-�-�/�<�?�N��!�&�&�s�+���'�'�	�2���A�a�[�E��b�q�	�I�V��'�'��/�D�"�,�,�0�0��R�@�M�� 1�1�d�m�m�}�6T�� �$4�4�X����.�9X�X�!rc�.�|jjd�}||jd|j|j��}|j	�d|_|jjtjd��|jd�|jjd�jg}tjr |jdtj�||_|j!d�	�dt_
y)
N�easy_install�x)�argsrr �.z*.egg�	bdist_eggrF)�show_deprecation)�distribution�get_command_classrr �ensure_finalized�always_copy_from�
package_index�scan�globr1�get_command_obj�
egg_output�
setuptools�bootstrap_install_from�insertrDr')rrB�cmdrDs    rr+zinstall.do_egg_installus����(�(�:�:�>�J�����������;�;�	
��	����"���	�����t�y�y��1�2�����%��!�!�1�1�+�>�I�I�J���,�,��K�K��:�<�<�=���������'�,0�
�)rN)r0�
__module__�__qualname__�__doc__rr�user_options�boolean_options�new_commands�dict�_ncrrr#r'�staticmethodr(r+rrrrrs���A��<�<�,�,�>�	
�0��L��l�l�2�2��+�6��O�

�.�/�	�-�.��L��|�
�C�6�$	��	"��Y��Y�<1rr)�distutils.errorsrr)rNr3�distutils.command.install�commandrrrQ�warningsrr�_install�sub_commandsr\rZ)rTs0r�<module>rds���.����(�(��F��<�<��~1�d�l�l�~1�F�<�<�,�,��,�C��A��g�k�k�0I�C�,���������s�!B�8Bpython3.12/site-packages/setuptools/command/__pycache__/build_clib.cpython-312.pyc000064400000007467151732703460024001 0ustar00�

��_i����ddlmcmZddlmZddlmZ	ddlm	Z	Gd�dej�Zy#e
$r	ddlm	Z	Y�#wxYw)�N)�DistutilsSetupError)�log)�newer_pairwise_group�c��eZdZdZd�Zy)�
build_clibav
    Override the default build_clib behaviour to do the following:

    1. Implement a rudimentary timestamp-based dependency system
       so 'compile()' doesn't run every time.
    2. Add more keys to the 'build_info' dictionary:
        * obj_deps - specify dependencies for each object compiled.
                     this should be a dictionary mapping a key
                     with the source filename to a list of
                     dependencies. Use an empty string for global
                     dependencies.
        * cflags   - specify a list of additional flags to pass to
                     the compiler.
    c	�j�|D�]-\}}|jd�}|�t|ttf�st	d|z��tt|��}t
jd|�|jdt��}t|t�st	d|z��g}|jdt��}t|ttf�st	d|z��|D]v}|g}	|	j|�|j|t��}
t|
ttf�st	d|z��|	j|
�|j|	��x|jj||j��}t||�ggfk7rh|jd�}|jd	�}
|jd
�}|jj||j||
||j ��|jj#|||j$|j ����0y)
N�sourceszfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' library�obj_depsz\in 'libraries' option (library '%s'), 'obj_deps' must be a dictionary of type 'source: list'�)�
output_dir�macros�include_dirs�cflags)r
rr�extra_postargs�debug)r
r)�get�
isinstance�list�tupler�sortedr�info�dict�extend�append�compiler�object_filenames�
build_tempr�compiler�create_static_libr)�self�	libraries�lib_name�
build_infor
r�dependencies�global_deps�source�src_deps�
extra_deps�expected_objectsrrrs               ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/build_clib.py�build_librarieszbuild_clib.build_librariess��$-� �H�j� �n�n�Y�/�G���j��4��-�&H�)�1�3;�<���
�T�'�]�+�G��H�H�,�h�7�
"�~�~�j�$�&�9�H��h��-�)�*�,4�5���
�L�#�,�,�r�4�6�2�K��k�D�%�=�9�)�*�,4�5���"��"�8������,�%�\�\�&�$�&�9�
�!�*�t�U�m�<�-�.�08�9���
���
�+��#�#�H�-�"� $�}�}�=�=���?�?� >� ��
$�L�2B�C��B�x�O�$����1��)�~�~�n�=��#����1���
�
�%�%��#���!�!-�#)��*�*�
&��
�M�M�+�+� �(�t���d�j�j�
,�
�S%.�N)�__name__�
__module__�__qualname__�__doc__r,�r-r+rrs
��
�Lr-r)�distutils.command.build_clib�commandr�orig�distutils.errorsr�	distutilsr�distutils._modifiedr�ImportError�_distutils._modifiedr2r-r+�<module>r;s?��+�+�0��<�8�\����\���<�;�<�s�3�A�Apython3.12/site-packages/setuptools/command/__pycache__/editable_wheel.cpython-312.pyc000064400000134436151732703460024643 0ustar00�

��_iރ�
�2�dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZdd	lmZmZmZmZmZmZmZmZmZmZd
dlmZm Z m!Z!m"Z"m#Z#d
dl$m%Z%d
d
l&m'Z'd
dl(m)Z)m*Z*m+Z+ddl,m,Z-erddl.m/Z/ej`dk\rddlm1Z1nerddl2m1Z1nddl3m4Z1ee5efZ6ede6��Z7ejpe9�Z:Gd�de
�Z;dZ<dZ=Gd�de�Z>Gd�de1�Z?Gd�d �Z@Gd!�d"e@�ZAGd#�d$�ZBd%e5d&eCfd'�ZDd(ed&eEfd)�ZFd*ee5d+ee5e5fd,ed&eEfd-�ZGd.�ZHd/e'd&ee5fd0�ZId/e'd&ee5fd1�ZJd*ee5d+ee5e5fd2e6d&ee5e5ffd3�ZKd4e6d&e5fd5�ZLd6ee5e5fd&ee5fd7�ZMd*ee5d6ee5e5fd&eee5ee5ffd8�ZNd6ee5e5fd&ee5e5ffd9�ZOd:e5d;e5d<e5d=e5d&eEf
d>�ZPd?e7d&e7fd@�ZQGdA�dBe#j��ZSdCZTdDe5dEee5e5fdFee5ee5fd&e5fdG�ZUGdH�dIe"j��ZWGdJ�dKe+�ZXy)La�
Create a wheel that, when installed, will make the source package 'editable'
(add it to the interpreter's path, including metadata) per PEP 660. Replaces
'setup.py develop'.

.. note::
   One of the mechanisms briefly mentioned in PEP 660 to implement editable installs is
   to create a separated directory inside ``build`` and use a .pth file to point to that
   directory. In the context of this file such directory is referred as
   *auxiliary build directory* or ``auxiliary_dir``.
�N)�suppress)�Enum)�cleandoc)�chain)�Path)�TemporaryDirectory)
�
TYPE_CHECKING�Dict�Iterable�Iterator�List�Mapping�Optional�Tuple�TypeVar�Union�)�Command�_normalization�_path�errors�
namespaces)�find_package_path)�Distribution)�InformationOnly�SetuptoolsDeprecationWarning�SetuptoolsWarning�)�build_py��	WheelFile)��)�Protocol)�ABC�_P)�boundc�<�eZdZdZdZdZdZedee	ddfd��Z
y)	�
_EditableModea
    Possible editable installation modes:
    `lenient` (new files automatically added to the package - DEFAULT);
    `strict` (requires a new installation when files are added/removed); or
    `compat` (attempts to emulate `python setup.py develop` - DEPRECATED).
    �strict�lenient�compat�mode�returnc���|stjS|j�}|tjvrt	j
d|�d���|dk(rt
jddd��t|S)NzInvalid editable mode: z. Try: 'strict'.�COMPATzCompat editable installsa

                The 'compat' editable mode is transitional and will be removed
                in future versions of `setuptools`.
                Please adapt your code accordingly to use either the 'strict' or the
                'lenient' modes.
                �userguide/development_mode.html)�see_docs)r)�LENIENT�upper�__members__r�OptionErrorr�emit)�clsr-�_modes   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/editable_wheel.py�convertz_EditableMode.convertQsv��� �(�(�(��
�
����
�1�1�1��$�$�'>�t�h�FV�%W�X�X��H��(�-�-�*��;�
� �U�#�#�N)�__name__�
__module__�__qualname__�__doc__�STRICTr3r0�classmethodr�strr;�r<r:r)r)Es<����F��G�
�F��$�8�C�=�$�_�$��$r<r)zU
New or renamed files may not be automatically picked up without a new installation.
zt
Options like `package-data`, `include/exclude-package-data` or
`packages.find.exclude/include` may have no effect.
c�2�eZdZdZdZddddeejxsd�fgZd�Zd	�Z	d
�Z
d�Zd�Zd
e
efd�Zdedededefd�Zd�Zd
eeeeeefffd�Zdedededed
eeeeeefff
d�Zd�Zdefd�Zd�Zdefd�Zdededed
dfd �Zy)!�editable_wheelz�Build 'editable' wheel for development.
    This command is private and reserved for internal use of setuptools,
    users should rely on ``setuptools.build_meta`` APIs.
    zBDO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel)z	dist-dir=�dz-directory to put final built distributions in)zdist-info-dir=�Iz(path to a pre-build .dist-info directoryzmode=N�c�<�d|_d|_d|_d|_y�N)�dist_dir�
dist_info_dir�project_dirr-��selfs r:�initialize_optionsz!editable_wheel.initialize_options�s ����
�!��������	r<c��|j}|jxstj|_|j
xsi|_t
|jxs*tjj|jd��|_y)N�dist)
�distribution�src_root�os�curdirrN�package_dirrrL�path�join)rPrSs  r:�finalize_optionszeditable_wheel.finalize_options�s_��� � ���=�=�5�B�I�I����+�+�1�r����T�]�]�T�b�g�g�l�l�4�;K�;K�V�.T�U��
r<c���	|jjd��|j�|jd�|j	d�}|j|j�|j|�y#t$r^tj�|jjxs|jj�}tj|���wxYw)NT)�exist_ok�bdist_wheel)�project)rL�mkdir�_ensure_dist_info�reinitialize_command�get_finalized_command�write_wheelfilerM�_create_wheel_file�	Exception�	traceback�	print_excrT�name�get_name�_DebuggingTipsr7)rPr^r_s   r:�runzeditable_wheel.run�s���	��M�M�����.��"�"�$�
�%�%�m�4��4�4�]�C�K��'�'��(:�(:�;��#�#�K�0���	����!��'�'�,�,�L��0A�0A�0J�0J�0L�G������0��		�s
�A:A=�=A'C$c�\�|j�T|jd�}|j|_|j	�|j�|j|_yt
|j�jd�sJ�t|jd�j�sJ�y)N�	dist_infoz
.dist-info�METADATA)
rMrbrL�
output_dir�ensure_finalizedrlrC�endswithr�exists)rPrns  r:raz editable_wheel._ensure_dist_info�s������%��1�1�+�>�I�#'�=�=�I� ��&�&�(��M�M�O�!*�!8�!8�D���t�)�)�*�3�3�L�A�A�A���*�*�J�7�>�>�@�@�@r<c���|j}|jsyt|j|jjdd��j
�}t||||�}|j�y)NrI�.)	rT�namespace_packagesrrNrX�get�resolve�_NamespaceInstaller�install_namespaces)rP�installation_dir�
pth_prefixrSrU�	installers      r:�_install_namespacesz"editable_wheel._install_namespaces�sd��� � ���&�&����(�(�$�*:�*:�*>�*>�r�3�*G�H�P�P�R��'��.>�
�H�U�	��$�$�&r<r.c���|jrt|j�jn	t�}tt|jd��}t
|d�S)Nz
*.egg-info)rMr�parent�maprC�glob�next)rP�
parent_dir�
candidatess   r:�_find_egg_info_dirz!editable_wheel._find_egg_info_dir�sH��8<�8J�8J�T�$�,�,�-�4�4�PT�PV�
���j�o�o�l�;�<�
��J��%�%r<ri�unpacked_wheel�	build_lib�tmp_dirc��|j}t|�}t|�}tt||�d�d��}tt||�d�d��}tt||�d�d��}	|jdd��}
t|�|
_d|
_|jdd��}|jd	d��}|x|_x|_|_|x|_	x|_
|_|	x|_|_
||_||_|j!d
�}
d|
_t|�|_|j!d�}d|_|j)�|_|j-�|j/�|j/�y
)a�Configure commands to behave in the following ways:

        - Build commands can write to ``build_lib`` if they really want to...
          (but this folder is expected to be ignored and modules are expected to live
          in the project directory...)
        - Binary extensions should be built in-place (editable_mode = True)
        - Data/header/script files are not part of the "editable" specification
          so they are written directly to the unpacked_wheel directory.
        z.data�data�headers�scripts�egg_infoT)�reinit_subcommands�build�install�install_scriptsrFN)rTrCrrb�egg_base�ignore_egg_info_in_manifest�
build_platlib�
build_purelibr��install_purelib�install_platlib�install_libr��
build_scripts�install_headers�install_data�get_command_obj�no_ep�
build_temp�compiler��existing_egg_info_dir�_set_editable_moderq)rPrir�r�r�rS�wheelr�r�r�r�r�r�r�rs               r:�_configure_buildzeditable_wheel._configure_build�s���� � ���N�#���	�N�	��4��4�&����?�@���d�>�d�V�5�>�9�E�F���d�>�d�V�5�>�9�E�F���,�,�Z�D�,�Q����L���/3��,��)�)�'�d�)�K���+�+�I�$�+�O��FO�O���O�e�1�E�O�RW�W���W�'�"9�G�<O�8?�?���%�"5�")���#����.�.�/@�A�� $����w�<����'�'�
�3�� ���)-�)@�)@�)B��&����!�
��� �� � �"r<c���|j}|jd�}|j�D];}|j|�}t|d�rd|_�(t|d�s�5d|_�=y)z8Set the ``editable_mode`` flag in the build sub-commandsr��
editable_modeT�inplaceN)rTr��get_sub_commands�hasattrr�r�)rPrSr��cmd_name�cmds     r:r�z!editable_wheel._set_editable_mode�sc��� � ���$�$�W�-���.�.�0�H��&�&�x�0�C��s�O�,�$(��!���i�(�"���1r<c�>�g}i}|jd�}|j�D]r}|j|�}t|d�r#|j|j	�xsg�t|d�s�P|j|j
�xsi��t||fS)Nr��get_outputs�get_output_mapping)rcr�r��extendr��updater�)rP�files�mappingr�r�r�s      r:�_collect_build_outputsz%editable_wheel._collect_build_outputs�s�����"$���*�*�7�3���.�.�0�H��,�,�X�6�C��s�M�*����S�_�_�.�4�"�5��s�0�1����s�5�5�7�=�2�>�1��g�~�r<�	dist_namec���|j||||�|j�|j�\}}|jd�|jd�|jd�||fS)Nr�r�r�)r��_run_build_subcommandsr��_run_install)rPr�r�r�r�r�r�s       r:�_run_build_commandsz"editable_wheel._run_build_commandssj��	
���i���G�L��#�#�%��4�4�6���w����)�$����)�$����&�!��g�~�r<c���|jd�}|j�D]M}|j|�}|dk(r$t|�tk7r|j	|��=|j|��Oy)a}
        Issue #3501 indicates that some plugins/customizations might rely on:

        1. ``build_py`` not running
        2. ``build_py`` always copying files to ``build_lib``

        However both these assumptions may be false in editable_wheel.
        This method implements a temporary workaround to support the ecosystem
        while the implementations catch up.
        r�rN)rcr��type�build_py_cls�_safely_run�run_command)rPr�rir�s    r:r�z%editable_wheel._run_build_subcommandssf���3�3�G�<���*�*�,�D��,�,�T�2�C��z�!�d�3�i�<�&?�� � ��&�� � ��&�-r<r�c��	|j|�S#t$r5tjddt	j
��d|�d|�d��YywxYw)Nz0Customization incompatible with editable installz
                z�

                If you are seeing this warning it is very likely that a setuptools
                plugin or customization overrides the `a` command, without
                taking into consideration how editable installs run build steps
                starting from setuptools v64.0.0.

                Plugin authors and developers relying on custom build steps are
                encouraged to update their `ab` implementation considering the
                information about editable installs in
                https://setuptools.pypa.io/en/latest/userguide/extension.html.

                For the time being `setuptools` will silence this error and ignore
                the faulty command, but this behaviour will change in future versions.
                )r�rfrr7rg�
format_exc)rPr�s  r:r�zeditable_wheel._safely_run)sp��	��#�#�H�-�-���	�(�-�-�B���%�%�'�(�)8�9A�z�B-�
.6�J�7��
�	�s��;A�Ac
��ddlm}|jd�}|j}dj	|j��}d}|�d|�d|�d�}t
|j|�}|j�r|j�t|��}	td��}
td	��}|	5}|
5}
|5}t
|t
|j�j�}tj|j|�|j||�|j|||
|�\}}|j!|||
�}|5||d
�5}||||�|j#|�ddd�ddd�ddd�ddd�ddd�|S#1swY�+xYw#1swY�/xYw#1swY�3xYw#1swY�7xYw#1swY|SxYw)Nrr rn�-z
0.editablez.whl)�suffixz
.build-libz.build-temp�w)�wheel.wheelfiler!rcrirZ�get_tagrrLrs�unlinkrrM�shutil�copytreer~r��_select_strategy�write_files)rPr^r!rnr��tag�	build_tag�archive_name�
wheel_pathr�r��	build_tmp�unpacked�lib�tmp�unpacked_dist_infor�r��strategy�	wheel_objs                    r:rez!editable_wheel._create_wheel_fileEs��-��.�.�{�;�	��N�N�	��h�h�{�*�*�,�-�� �	�#��A�i�[��#��d�;���$�-�-��6�
���������+�<�@��&�l�;�	�&�m�<�	�
�x��c�9��!%�h��T�5G�5G�0H�0M�0M�!N���O�O�D�.�.�0B�C��$�$�X�y�9�!�5�5�i��3�PS�T�N�E�7��,�,�Y��S�A�H��9�Z��5����E�7�3��%�%�h�/�6��
<E��^���	6�5�����
<E�9�����^���sm�,F:�/F.�2BF"�:
F	�F
� F	�(F"�0F.�8F:�
F�F	�F
�F"�"F+�'F.�.F7	�3F:�:G�categoryc��t|jd|��d�}|r6|�r.tjd|�d��|j	d|���yyy)N�has_zInstalling z as non editable�install_)�getattrrT�_logger�infor�)rPr��has_categorys   r:r�zeditable_wheel._run_installasV���t�0�0�D��
�2C�T�J���L�N��L�L�;�x�j�0@�A�B����x��z�2�3�+�<r<r��EditableStrategyc�l�d|�d|��}t|j�}tj|j�}|tj
ur8t
t|jd|��}t|j|||�St|j�}t||j|�}	|tju}
t|j�dhk(r|	s|
r>|jjdd�}t|j|t||�g�St!|j|�S)zDDecides which strategy to use to implement an editable installation.�
__editable__.r�r�rIru)rrNr)r;r-rA�
_empty_dir�	_LinkTreerT�_find_packages�_simple_layoutrXr0�setrw�
_StaticPth�_TopLevelFinder)rPrir�r��
build_namerNr-�
auxiliary_dir�packages�has_simple_layout�is_compat_mode�src_dirs            r:r�zeditable_wheel._select_strategygs��%�T�F�!�C�5�1�
��4�+�+�,���$�$�T�Y�Y�/���=�'�'�'�&�t�D�,<�,<�g�z�'R�S�M��T�.�.��m�Y�O�O�!�$�"3�"3�4��*�8�T�5E�5E�{�S����!5�!5�5���t��� �R�D�(�->�.��&�&�*�*�2�s�3�G��d�/�/���[�'�8R�7S�T�T��t�0�0�$�7�7r<)r=r>r?r@�descriptionrr)�user_optionsrQr[rlrar~rrCr��_Pathr�r�rr
r
r�r�r�r�rer�r�rDr<r:rFrFxsA���
W�K�	L�K�	�$���!6�!6�!<�"�=�>��L��V��"	A�'�&�H�S�M�&�
0#��0#�).�0#�;@�0#�KP�0#�d	#���d�3�i��c�3�h��.G�(H��	��	�.3�	�@E�	�PU�	�	�t�C�y�$�s�C�x�.�(�	)�	�'�,�C��8�84�S�4�8��8��8��	8�

�8r<rFc�<�eZdZdddeedeeeffd�Zd�Zd�Zy)	r�r�r!r�r�c��yrKrD)rPr�r�r�s    r:�__call__zEditableStrategy.__call__����r<c��yrKrDrOs r:�	__enter__zEditableStrategy.__enter__�r�r<c��yrKrD�rP�	_exc_type�
_exc_value�
_tracebacks    r:�__exit__zEditableStrategy.__exit__�r�r<N)	r=r>r?r
rCr
r�r�r�rDr<r:r�r��s3���k��$�s�)��d�3�PS�8�n���r<r�c�V�eZdZdededeefd�Zdddeedeeeffd	�Z	d
�Z
d�Zy)
r�rSri�path_entriesc�.�||_||_||_yrK)rSrir�)rPrSrir�s    r:�__init__z_StaticPth.__init__�s����	���	�(��r<r�r!r�r�c��djd�|jD��}t|�d��}|jd|j�d�|�y)N�
c3�NK�|]}t|j�����y�wrK)rCrx)�.0�ps  r:�	<genexpr>z&_StaticPth.__call__.<locals>.<genexpr>�s����I�7H�!�S�����-�7H�s�#%r��.pth)rZr��_encode_pth�writestrri)rPr�r�r��entries�contentss      r:r�z_StaticPth.__call__�sG���)�)�I�t�7H�7H�I�J���'��"�~�.��
����t�y�y�k��6��Ar<c��dtttj|j���d�}t
j
|tz�|S)Nz_
        Editable install will be performed using .pth file to extend `sys.path` with:
        z	
        )�listr�rV�fspathr�r��warning�_LENIENT_WARNING�rP�msgs  r:r�z_StaticPth.__enter__�sH��	�	
�c�"�)�)�T�.�.�/�	0�3�4	���	����.�.�/��r<c��yrKrDr�s    r:r�z_StaticPth.__exit__�r�r<N)r=r>r?rrCr
rrr
r�r�r�rDr<r:r�r��sU��)�\�)��)�D��J�)�
B�k�B�$�s�)�B�d�3�PS�8�n�B�
�r<r�c���eZdZdZdedededef�fd�Zddd	eed
e	eeff�fd�Z
ded
eefd�Zddedefd�Z
d�Zd�Zd�Z�xZS)r�a`
    Creates a ``.pth`` file that points to a link tree in the ``auxiliary_dir``.

    This strategy will only link files (not dirs), so it can be implemented in
    any OS, even if that means using hardlinks instead of symlinks.

    By collocating ``auxiliary_dir`` and the original source code, limitations
    with hardlinks should be avoided.
    rSrir�r�c����t|�|_t|�j�|_|j	d�j
|_t�|�!|||jg�y)Nr)	rr�rxr�r��	copy_file�_file�superr)rPrSrir�r��	__class__s     �r:rz_LinkTree.__init__�sX���"�-�0����i��0�0�2����)�)�*�5�?�?��
�
����t�d�&8�&8�%9�:r<r�r!r�r�c�L��|j||�t�|�	|||�yrK)�
_create_linksrr�)rPr�r�r�rs    �r:r�z_LinkTree.__call__�s$������5�'�*�
�����w�/r<�filer.c��tt�5t|�j�j	|j
�}t
|�jtjd�cddd�S#1swYyxYw)N�/)
r�
ValueErrorrrx�relative_tor�rC�replacerV�sep)rPrrYs   r:�_normalize_outputz_LinkTree._normalize_output�sT��
�j�
!���:�%�%�'�3�3�D�N�N�C�D��t�9�$�$�R�V�V�S�1�"�
!�
!��s�AA5�5A>�relative_output�src_filec��|j|z}|jj�s|jjd��|j	|||��y)NT)�parents��link)r�r��is_dirr`r)rPr$r%r)�dests     r:�_create_filez_LinkTree._create_file�sI���!�!�O�3���{�{�!�!�#��K�K���d��+��
�
�8�T��
�-r<c��|jjdd��t|j�rdnd}|j�D��cic]\}}|j	|�|��}}}|jdd�|D]-}|j	|�}|s�||vs�|j
||��/|j�D]\}}	|j
||	|���ycc}}w)NT)r'r]�sym�hardr()r�r`�_can_symlink_files�itemsr#�popr,)
rP�outputs�output_mapping�	link_type�k�v�mappings�output�relative�srcs
          r:rz_LinkTree._create_links�s������ � ��� �=�/��0B�0B�C�E��	�=K�=Q�=Q�=S�T�=S�T�Q��D�*�*�1�-�q�0�=S��T����T�4� ��F��-�-�f�5�H��H�H�4��!�!�(�F�3��
&�^�^�-�M�H�c����h��)��<�.��Us�
Cc�B�d}tj|tz�|S)Nz=Strict editable install will be performed using a link tree.
)r�r�_STRICT_WARNINGrs  r:r�z_LinkTree.__enter__�s��N������o�-�.��r<c�P�d|j�d�}tjd|�y)Nz\

        Strict editable installation performed using the auxiliary directory:
            z�

        Please be careful to not remove this directory, otherwise you might not be able
        to import/use your package.
        �Editable installation.)r�rr7�rPr�r�r�rs     r:r�z_LinkTree.__exit__�s2��
�
�
�
� �!	���	���5�s�;r<rK)r=r>r?r@rrCr�rr
r
r�rr#r,rr�r��
__classcell__)rs@r:r�r��s�����
;��
;��
;��	
;�
�
;�0�k�0�$�s�)�0�d�3�PS�8�n�0��c��h�s�m��.�C�.�3�.�=��
<r<r�c�L�eZdZdedefd�Zdddeedeeeffd�Zd	�Z	d
�Z
y)r�rSric� �||_||_yrK)rSri)rPrSris   r:rz_TopLevelFinder.__init__�s����	���	r<r�r!r�r�c
�F�|jjxstj}t	t|j�t
|j��}|jjxsi}t|||�}tt	t|jjxsg|�d�t|�D���}|jjxsgD�	cic](}	|	t|	||jjxsd���*}
}	i|�|
�}d|j�d�}t!j"|�}t%t'|||�d�}
|j)|�d�|
�t+d|�d|�d	��}
|j)d|j�d
�|
�ycc}	w)Nc3�$K�|]}|gf���
y�wrKrD)r�nss  r:rz+_TopLevelFinder.__call__.<locals>.<genexpr>�s����D�$C�b�"�b��$C�s�rIr�z.finder�utf-8z.pyzimport z; z
.install()r)rSrUrVrWrr��_find_top_level_modulesrX�_find_package_roots�dict�_find_namespacesr��_find_virtual_namespacesrvrrir�safe_identifier�bytes�_finder_templater	r)rPr�r�r�rU�	top_levelrX�roots�namespaces_�pkg�legacy_namespacesri�finder�contents              r:r�z_TopLevelFinder.__call__�s���9�9�%�%�2������.����3�5L�T�Y�Y�5W�X�	��i�i�+�+�1�r��#�I�{�H�E��,0�� ����!3�!3�!9�r�5�A�D�$<�U�$C�D�
�-
���y�y�3�3�9�r�9�
�9��
�"�3��t�y�y�/A�/A�/G�R�H�H�9�	�
�
1�U�0�/�0��
�t�y�y�k��1���/�/��5���(��w��D�g�N��
���&���~�w�/����x�r�&���D�E��
����t�y�y�k��6��@��!
s�%-Fc�B�d}tj|tz�|S)Nz=Editable install will be performed using a meta path finder.
)r�rrrs  r:r�z_TopLevelFinder.__enter__s��N������.�.�/��r<c�4�d}tjd|�y)Nz�

        Please be careful with folders in your working directory with the same
        name as your package as they may take precedence during imports.
        r?)rr7r@s     r:r�z_TopLevelFinder.__exit__s����	���5�s�;r<N)r=r>r?rrCrr
r
r�r�r�rDr<r:r�r��sJ���\����A�k�A�$�s�)�A�d�3�PS�8�n�A�>�
<r<r�rVr.c�4�tjdk\rdnd}tj�5}tj||�}|j|�|j
�|jd�|j�cddd�S#1swYyxYw)a!.pth files are always read with 'locale' encoding, the recommendation
    from the cpython core developers is to write them as ``open(path, "w")``
    and ignore warnings (see python/cpython#77102, pypa/setuptools#3937).
    This function tries to simulate this behaviour without having to create an
    actual file, in a way that supports a range of active Python versions.
    (There seems to be some variety in the way different version of Python handle
    ``encoding=None``, not all of them use ``locale.getpreferredencoding(False)``).
    )r"�
�localeNr)	�sys�version_info�io�BytesIO�
TextIOWrapper�write�flush�seek�read)rV�encoding�buffer�wrappers    r:rrsh���+�+�w�6�x�D�H�	������"�"�6�8�4���
�
�g���
�
�����A���{�{�}�
���s�AB�B�base_dirc�.�tt|j����5}t|d�t|d�}}|j	dd��tttt�5tj||�|j�r'|jd��dk(r	ddd�ddd�yddd�	tj||�	ddd�y	#1swY�*xYw#t$r}d}t|�|�d}~wwxYw#1swYyxYw)
N)�dirz	file1.txtz	file2.txt�file1rG)reTz�File system does not seem to support either symlinks or hard links. Strict editable installs require one of them to be supported.F)rrCrxr�
write_textr�AttributeError�NotImplementedError�OSErrorrV�symlink�
is_symlink�	read_textr)rf�LinksNotSupported)rhr��path1�path2�exrs      r:r0r0-s���	��H�$4�$4�$6� 7�	8�C��C��-�t�C��/E�u��
����7��3�
�n�&9�7�
C��J�J�u�e�$����!�e�o�o�w�o�&G�7�&R��D�
9�	8�D�
	1��G�G�E�5�!��!
9�	8�D�
C���	1�P�
�$�C�(�b�0��	1��
9�	8�sN�AD�)=C �&D�7D�C,�D� C)	�%D�,	D�5D�D�D�Dr�rXrNc
�L��|D�cic]}|t|||���}}|st|�idhfvStjj	|j�D��cgc]\}}t
||���c}}��t�fd�|j�D��Scc}wcc}}w)a[Return ``True`` if:
    - all packages are contained by the same parent directory, **and**
    - all packages become importable if the parent directory is added to ``sys.path``.

    >>> _simple_layout(['a'], {"": "src"}, "/tmp/myproj")
    True
    >>> _simple_layout(['a', 'a.b'], {"": "src"}, "/tmp/myproj")
    True
    >>> _simple_layout(['a', 'a.b'], {}, "/tmp/myproj")
    True
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"": "src"}, "/tmp/myproj")
    True
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "a", "b": "b"}, ".")
    True
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a", "b": "_b"}, ".")
    False
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a"}, "/tmp/myproj")
    False
    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a.a1.a2": "_a2"}, ".")
    False
    >>> _simple_layout(['a', 'a.b'], {"": "src", "a.b": "_ab"}, "/tmp/myproj")
    False
    >>> # Special cases, no packages yet:
    >>> _simple_layout([], {"": "src"}, "/tmp/myproj")
    True
    >>> _simple_layout([], {"a": "_a", "": "src"}, "/tmp/myproj")
    False
    rIc	3��K�|]6\}}tjt�g|jd����|����8y�w�ruN)r�	same_pathr�split)r�key�valuer�s   �r:rz!_simple_layout.<locals>.<genexpr>ds:������(�J�C��	����V�5�c�i�i��n�5�u�=�(�s�<?)rr�rVrY�
commonpathr1�_parent_path�all)r�rXrNrS�layoutr6r7r�s       @r:r�r�As����>PX�
X�x��c�$�S�+�{�C�C�x�F�
X���;��B���:�-�-�
�W�W�
�
����� O����1��a��!3�� O�
P�F��� �,�,�.�����	Y��!Ps�B�B 
c��|j|�r|dt|�n|}|jdtjz�S)a7Infer the parent path containing a package, that if added to ``sys.path`` would
    allow importing that package.
    When ``pkg`` is directly mapped into a directory with a different name, return its
    own path.
    >>> _parent_path("a", "src/a")
    'src'
    >>> _parent_path("b", "src/c")
    'src/c'
    Nr)rr�len�rstriprVr")rS�pkg_pathr�s   r:rrjs<��'/�&7�&7��&<�X�k��S��	�
"�(�F��=�=��r�v�v��&�&r<rSc#�K�t|jxsg�Ed{���|jxsg}|D�cgc]	}d|vs�|��}}|jr|j��n<|jxsg}||D�cgc]}d|j
vs�|j
��c}z
}|D]}|j
d�\}}}|���y7��cc}wcc}w�w)Nru)�iterr��
py_modules�ext_package�ext_modulesri�
rpartition)	rSr��mod�nested_modulesr��x�module�package�_s	         r:r�r�xs������D�M�M�'�R�(�(�(����&�B�J�%/�>�Z�c�3�#�:�c�Z�N�>���������&�&�,�"���;�H�;�a�#����-�1�6�6�;�H�H�� ���)�)�#�.�
���A��
�!�)��?��
I�s8�C�C�C�	C�C�2C�8C�C�'C�
Cc#�K�|jxsg}d�|D�Ed{���|js"|jxsg}d�|D�Ed{���yy7�37��w)Nc3�*K�|]}d|vs�|���
y�wryrD)rr�s  r:rz*_find_top_level_modules.<locals>.<genexpr>�s����<�z��S��^��z�s�	�c3�RK�|]}d|jvs�|j���!y�wry)ri)rr�s  r:rz*_find_top_level_modules.<locals>.<genexpr>�s ����E�K�q�3�a�f�f�3D�A�F�F�K�s�'�')r�r�r�)rSr�r�s   r:rHrH�sZ�������&�B�J�<�z�<�<�<�����&�&�,�"��E�K�E�E�E��=��	F�s!�A�A�,A�A�
A�ArUc�|�t|�D�cic]}|tt|||����}}t|�Scc}wrK)�sorted�_absolute_rootr�_remove_nested)r�rXrUrS�	pkg_rootss     r:rIrI�sO���(�#�!�#�C�	�^�-�c�;��I�
J�J�#��!�
�)�$�$��!s�9rYc���t|�}|j}|j�rt|j	��St|j	�|j
z�S)z(Works for packages and top-level modules)rr�rsrCrxri)rY�path_r�s   r:r�r��sI����J�E�
�\�\�F��|�|�~��5�=�=�?�#�#��6�>�>�#�e�j�j�0�1�1r<r�c	#�K�|D]y}d|vr�|jd�}tt|�dz
dd�D]E}dj|d|�}t	t||d��}|j
�r||vs�B|���G�{y�w)a8By carefully designing ``package_dir``, it is possible to implement the logical
    structure of PEP 420 in a package without the corresponding directories.

    Moreover a parent package can be purposefully/accidentally skipped in the discovery
    phase (e.g. ``find_packages(include=["mypkg.*"])``, when ``mypkg.foo`` is included
    by ``mypkg`` itself is not).
    We consider this case to also be a virtual namespace (ignoring the original
    directory) to emulate a non-editable installation.

    This function will try to find these kinds of namespaces.
    rurr���NrI)r{�ranger�rZrrrs)r�rS�parts�i�partial_namerYs      r:rLrL�s��������c�>���	�	�#����s�5�z�A�~�q�"�-�A��8�8�E�"�1�I�.�L��)�,�	�2�F�G�D��;�;�=�L�	�$A�"�"�.�	�s�A6B�9	Bc#�K�|D]K}t||d�}t|�j�s�*t|d�j�r�E||gf���My�w)NrIz__init__.py)rrrs)r�r�rSrYs    r:rKrK�sN������ ��i��4����:����t�D�-�'@�'G�'G�'I����-���s�,A�A�

Ac����t|j��}tt|j	���D]:\��t��fd�|j	�D��s�*|j
���<|S)Nc3�N�K�|]\}}�|k7xrt��||����y�wrK)�
_is_nested)r�other�
other_pathrYrSs   ��r:rz!_remove_nested.<locals>.<genexpr>�s5�����
�%6�!��z�
�5�L�E�Z��T�5�*�E�E�%6�s�"%)rJ�copy�reversedr
r1�anyr2)r�r9rYrSs  @@r:r�r��sc���
�)�.�.�"�
#�F��d�9�?�?�#4�5�6�	��T��
�%.�_�_�%6�
�
�
�J�J�s�O�7��Mr<rSr�r��parent_pathc��tj|�}|j|dd�jd�j	d�}|j|�xr"|tjt
|g|����k(S)a�
    Return ``True`` if ``pkg`` is nested inside ``parent`` both logically and in the
    file system.
    >>> _is_nested("a.b", "path/a/b", "a", "path/a")
    True
    >>> _is_nested("a.b", "path/a/b", "a", "otherpath/a")
    False
    >>> _is_nested("a.b", "path/a/b", "c", "path/c")
    False
    >>> _is_nested("a.a", "path/a/a", "a", "path/a")
    True
    >>> _is_nested("b.a", "path/b/a", "a", "path/a")
    False
    rIrru)r�normpathr!�stripr{�
startswithr)rSr�r�r��
norm_pkg_path�rests      r:r�r��so���N�N�8�,�M��;�;�v�r�1�%�+�+�C�0�6�6�s�;�D��>�>�&�!��m�u�~�~��[� �4� �8�'�r<�dir_c�^�tj|d��tj|�|S)zFCreate a directory ensured to be empty. Existing files may be removed.T)�
ignore_errors)r��rmtreerV�makedirs)r�s r:r�r��s!��
�M�M�$�d�+��K�K����Kr<c��eZdZd�Zd�Zd�Zy)ryc�X�||_||_||_||_g|_d|_y)NF)rTrUr{�
editable_namer3�dry_run)rPrTr{r�rUs     r:rz_NamespaceInstaller.__init__�s/��(��� ��
� 0���*��������r<c��tjj|j|j|j
z�S)zInstallation target.)rVrYrZr{r��	nspkg_extrOs r:�_get_nspkg_filez#_NamespaceInstaller._get_nspkg_file�s,���w�w�|�|�D�1�1�4�3E�3E����3V�W�Wr<c�>�tt|j��S)z1Where the modules/packages should be loaded from.)�reprrCrUrOs r:�	_get_rootz_NamespaceInstaller._get_roots���C��
�
�&�'�'r<N)r=r>r?rr�r�rDr<r:ryry�s���X�(r<ryaimport sys
from importlib.machinery import ModuleSpec, PathFinder
from importlib.machinery import all_suffixes as module_suffixes
from importlib.util import spec_from_file_location
from itertools import chain
from pathlib import Path

MAPPING = {mapping!r}
NAMESPACES = {namespaces!r}
PATH_PLACEHOLDER = {name!r} + ".__path_hook__"


class _EditableFinder:  # MetaPathFinder
    @classmethod
    def find_spec(cls, fullname, path=None, target=None):
        extra_path = []

        # Top-level packages and modules (we know these exist in the FS)
        if fullname in MAPPING:
            pkg_path = MAPPING[fullname]
            return cls._find_spec(fullname, Path(pkg_path))

        # Handle immediate children modules (required for namespaces to work)
        # To avoid problems with case sensitivity in the file system we delegate
        # to the importlib.machinery implementation.
        parent, _, child = fullname.rpartition(".")
        if parent and parent in MAPPING:
            return PathFinder.find_spec(fullname, path=[MAPPING[parent], *extra_path])

        # Other levels of nesting should be handled automatically by importlib
        # using the parent path.
        return None

    @classmethod
    def _find_spec(cls, fullname, candidate_path):
        init = candidate_path / "__init__.py"
        candidates = (candidate_path.with_suffix(x) for x in module_suffixes())
        for candidate in chain([init], candidates):
            if candidate.exists():
                return spec_from_file_location(fullname, candidate)


class _EditableNamespaceFinder:  # PathEntryFinder
    @classmethod
    def _path_hook(cls, path):
        if path == PATH_PLACEHOLDER:
            return cls
        raise ImportError

    @classmethod
    def _paths(cls, fullname):
        # Ensure __path__ is not empty for the spec to be considered a namespace.
        return NAMESPACES[fullname] or MAPPING.get(fullname) or [PATH_PLACEHOLDER]

    @classmethod
    def find_spec(cls, fullname, target=None):
        if fullname in NAMESPACES:
            spec = ModuleSpec(fullname, None, is_package=True)
            spec.submodule_search_locations = cls._paths(fullname)
            return spec
        return None

    @classmethod
    def find_module(cls, fullname):
        return None


def install():
    if not any(finder == _EditableFinder for finder in sys.meta_path):
        sys.meta_path.append(_EditableFinder)

    if not NAMESPACES:
        return

    if not any(hook == _EditableNamespaceFinder._path_hook for hook in sys.path_hooks):
        # PathEntryFinder is needed to create NamespaceSpec without private APIS
        sys.path_hooks.append(_EditableNamespaceFinder._path_hook)
    if PATH_PLACEHOLDER not in sys.path:
        sys.path.append(PATH_PLACEHOLDER)  # Used just to trigger the path hook
rir�rc�|�tt|j�d����}tj	|||��S)z_Create a string containing the code for the``MetaPathFinder`` and
    ``PathEntryFinder``.
    c��|dS)NrrD)rs r:�<lambda>z"_finder_template.<locals>.<lambda>_s���1�r<)r|�rir�r)rJr�r1�_FINDER_TEMPLATE�formatr�s   r:rOrOYs3���6�'�-�-�/�~�>�?�G��"�"��g�*�"�U�Ur<c��eZdZdZy)rszCFile system does not seem to support either symlinks or hard links.N)r=r>r?r@rDr<r:rsrscs��Mr<rsc��eZdZdZdZdZy)rkz!Problem in editable installation.a
    An error happened while installing `{project}` in editable mode.

    The following steps are recommended to help debug this problem:

    - Try to install the project normally, without using the editable mode.
      Does the error still persist?
      (If it does, try fixing the problem before attempting the editable mode).
    - If you are using binary extensions, make sure you have all OS-level
      dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
    - Try the latest version of setuptools (maybe the error was already fixed).
    - If you (or your project dependencies) are using any setuptools extension
      or customization, make sure they support the editable mode.

    After following the steps above, if the problem still persists and
    you think this is related to how setuptools handles editable installations,
    please submit a reproducible example
    (see https://stackoverflow.com/help/minimal-reproducible-example) to:

        https://github.com/pypa/setuptools/issues
    r1N)r=r>r?�_SUMMARY�_DETAILS�	_SEE_DOCSrDr<r:rkrkgs��2�H��H�*2�Ir<rk)Yr@�loggingr^rVr�r\rg�
contextlibr�enumr�inspectr�	itertoolsr�pathlibr�tempfiler�typingr	r
rrr
rrrrrrIrrrrr�	discoveryrrSr�warningsrrrrr�r�r!r]r$�typing_extensions�abcr%rCr�r&�	getLoggerr=r�r)r=rrFr�r�r�r�rNr�boolr0r�rr�rHrIr�rLrKr�r�r��	Installerryr�rO�	FileErrorrsrkrDr<r:�<module>r�s��
��	�	�
�
�������'������*����
/��)����v����*�#�
�c�4�i����T����
�'�
�
�H�
%��&$�D�&$�R����G8�W�G8�T�x����.C<�
�C<�L.<�.<�b�����$���$��(&��s�m�&�*.�s�C�x�.�&�GK�&�	�&�R'�
��
�(�3�-�
� F�,�F�8�C�=�F�
%��s�m�
%���c��"�
%��
%�
�#�s�(�^�	
%�2��2�3�2�#��S�#�X��#�8�C�=�#�0 ��3�i� �$(��c��N� �
�e�C��c��N�#�$� �
�d�3��8�n�
��c�3�h��
��C��3����#��$��,�R��B��(�*�.�.�(�$P��fV�

�V���S��)�V�7;�C��c��N�7K�V��V�N��(�(�N�2�&�2r<python3.12/site-packages/setuptools/command/__pycache__/install_scripts.cpython-312.pyc000064400000007250151732703460025114 0ustar00�

��_i7	��h�ddlmZddlmcmZddlZddlZddlm	Z	Gd�dej�Zy)�)�logN�)�ensure_directoryc�*�eZdZdZd�Zd�Zd�Zdd�Zy)�install_scriptsz;Do normal script install, plus any egg_info wrapper scriptsc�P�tjj|�d|_y)NF)�origr�initialize_options�no_ep��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/install_scripts.pyr
z"install_scripts.initialize_optionss�����/�/��5���
�c���|jd�|jjr tjj|�ng|_|jry|j�y)N�egg_info)	�run_command�distribution�scriptsr	r�run�outfilesr�_install_ep_scriptsrs rrzinstall_scripts.runsP������$����$�$�� � �$�$�T�*��D�M��:�:��� � �"rc�$�ddlm}m}ddlm}|jd�}||j||j|j�|j|j�}|jd�}t|dd�}|j}|tjk(r|g}|j�}|jj�j!|�}	|j#||	j%��D]}
|j&|
��y)Nr)�Distribution�PathMetadata�)�easy_installr�
build_scripts�
executable)�
pkg_resourcesrr�r�get_finalized_command�egg_baser�egg_name�egg_version�getattr�ScriptWriter�sysr�best�command_spec_class�
from_param�get_args�	as_header�write_script)r
rr�ei�ei_cmd�dist�bs_cmd�
exec_param�writer�cmd�argss           rrz#install_scripts._install_ep_scriptss���<�(��+�+�J�7����O�O�����&�/�/�:��O�O����	
���+�+�O�<���V�\�4�8�
���������'�%��J�������'�'�,�,�.�9�9�*�E���O�O�D�#�-�-�/�:�D��D���t�$�;rc��ddlm}m}tjd||j
�tjj|j
|�}|jj|�|�}|jsHt|�t|d|z�}	|	j|�|	j�||d|z
�yy)z1Write an executable file to the scripts directoryr)�chmod�
current_umaskzInstalling %s script to %s�wi�N)�setuptools.command.easy_installr7r8r�info�install_dir�os�path�joinr�append�dry_runr�open�write�close)
r
�script_name�contents�mode�ignoredr7r8�target�mask�fs
          rr-zinstall_scripts.write_script4s���H����-�{�D�<L�<L�M������d�.�.��<���
�
���V�$�����|�|��V�$��V�S�4�Z�(�A�
�G�G�H��
�G�G�I��&�%�$�,�'�rN)�t)�__name__�
__module__�__qualname__�__doc__r
rrr-�rrrr	s��E��	#�%�2(rr)
�	distutilsr�!distutils.command.install_scripts�commandrr	r=r'�_pathrrQrr�<module>rVs)���0�0�	�
�$�9(�d�*�*�9(rpython3.12/site-packages/setuptools/command/__pycache__/dist_info.cpython-312.pyc000064400000013031151732703460023647 0ustar00�

��_i�
��~�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
Gd	�d
e	�Zd�Zd�Zy)
zD
Create a dist_info directory
As defined in the wheel specification
�N)�contextmanager)�log)�Command)�Path�)�_normalizationc�X�eZdZdZdZgd�ZddgZddiZd�Zd�Z	e
d	ed
efd��Z
d�Zy
)�	dist_infoz�
    This command is private and reserved for internal use of setuptools,
    users should rely on ``setuptools.build_meta`` APIs.
    z@DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory))zoutput-dir=�ozYdirectory inside of which the .dist-info will becreated (default: top of the source tree))�tag-date�dz0Add date stamp (e.g. 20050528) to version number)z
tag-build=�bz-Specify explicit tag to add to version number)�no-date�Dz"Don't include date stamp [default])�
keep-egg-infoNz,*TRANSITIONAL* will be removed in the futurerrrc�X�d|_d|_d|_d|_d|_d|_y)NF)�
output_dir�name�
dist_info_dir�tag_date�	tag_build�
keep_egg_info)�selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/dist_info.py�initialize_optionszdist_info.initialize_options)s.�������	�!�����
����"���c���|j}|jxstj}t	|j
xs|�|_|j
d�}t|j
�|_|jr|j|_	n|j|_	|jr|j|_
n|j|_
|j�||_tj|j��}tj |j#��}|�d|��|_tj&j)|j
|j$�d��|_y)N�egg_info�-z
.dist-info)�distribution�src_root�os�curdirrr�reinitialize_command�str�egg_baserr�finalize_optionsrr�
safer_name�get_name�safer_best_effort_version�get_versionr�path�joinr)r�dist�project_dirrr�versions      rr'zdist_info.finalize_options1s��� � ���m�m�0�r�y�y���t���=�+�>����,�,�Z�8������0����=�=� $�
�
�H��$�-�-�D�M��>�>�!%���H��%�/�/�D�N��!�!�#� ��
��(�(�����9�� �:�:�4�;K�;K�;M�N���f�A�g�Y�'��	��W�W�\�\�$�/�/�d�i�i�[�
�;S�T��r�dir_path�requires_bkpc#�K�|rJ|�d�}t|d��t||dd��	d��t|d��tj||�yd��y#t|d��tj||�wxYw�w)Nz.__bkp__T)�
ignore_errors)�
dirs_exist_ok�symlinks)�_rm�_copy�shutil�move)rr1r2�bkp_names    r�_maybe_bkp_dirzdist_info._maybe_bkp_dirKsk�����"��8�,�H����-��(�H�D�4�H�
0���H�D�1����H�h�/����H�D�1����H�h�/�s�$A<�A�)A<�%A9�9A<c�<�|jjdd��|jj�|jj}tj
j
|�sJd��tjdjtj
j|j���|jd�}|j||j�5|j||j�ddd�y#1swYyxYw)NT)�parents�exist_okz&.egg-info dir should have been createdz
creating '{}'�bdist_wheel)r�mkdirr�runr"r,�isdirr�info�format�abspathr�get_finalized_commandr<r�egg2dist)r�egg_info_dirr@s   rrBz
dist_info.runYs��������d�T��:��
�
�����}�}�-�-���w�w�}�}�\�*�T�,T�T�*�����'�'�������8J�8J�(K�L�M��0�0��?���
 �
 ��t�/A�/A�
B�� � ��t�/A�/A�B�C�
B�
B�s�,D�DN)�__name__�
__module__�__qualname__�__doc__�description�user_options�boolean_options�negative_optrr'rr%�boolr<rB�rrr
r
s_���
U�K��L�"�?�3�O��z�*�L�#�U�4��s��$����Crr
c�p�tjj|�rtj|fi|��yy)N)r"r,rCr9�rmtree)�dir_name�optss  rr7r7gs(��	�w�w�}�}�X���
�
�h�'�$�'�rc�|�tjdkr|jdd�tj||fi|��y)N)��r5)�sys�version_info�popr9�copytree)�src�dstrWs   rr8r8ls1��
���&� �����$�'�
�O�O�C��%��%r)rMr"r9r[�
contextlibr�	distutilsr�distutils.corer�pathlibr�rr
r7r8rSrr�<module>rfs?���

�
�
�%��"���SC��SC�l(�
&rpython3.12/site-packages/setuptools/command/__pycache__/bdist_rpm.cpython-312.pyc000064400000004005151732703470023656 0ustar00�

��_i��L�ddlmcmZddlmZGd�dej�Zy)�N�)�SetuptoolsDeprecationWarningc��eZdZdZd�Zd�Zy)�	bdist_rpma
    Override the default bdist_rpm behavior to do the following:

    1. Run egg_info to ensure the name and version are properly calculated.
    2. Always run 'install' using --single-version-externally-managed to
       disable eggs in RPM distributions.
    c��tjdddd��|jd�tjj|�y)NzDeprecated commandz�
            bdist_rpm is deprecated and will be removed in a future version.
            Use bdist_wheel (wheel packages) instead.
            z.https://github.com/pypa/setuptools/issues/1988)i��
�)�see_url�due_date�egg_info)r�emit�run_command�origr�run)�selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/bdist_rpm.pyrz
bdist_rpm.runsC��$�)�)� �
�E�#�	
�	
����$������4� �c��tjj|�}|D�cgc]$}|jdd�jdd���&}}|Scc}w)Nzsetup.py install z5setup.py install --single-version-externally-managed z%setupz&%setup -n %{name}-%{unmangled_version})rr�_make_spec_file�replace)r�spec�lines   rrzbdist_rpm._make_spec_filesl���~�~�-�-�d�3���
�
��	
�L�L�#�G�
��g�h� H�I�
J��	
�
����
s�)AN)�__name__�
__module__�__qualname__�__doc__rr�rrrrs���!� 	rr)�distutils.command.bdist_rpm�commandrr�warningsrrrr�<module>r!s��*�*�3�"����"rpython3.12/site-packages/setuptools/command/__pycache__/sdist.cpython-312.pyc000064400000027033151732703470023027 0ustar00�

��_i����ddlmZddlmcmZddlZddlZddlZddl	m
Z
ddlmZddl
mZeZdd�ZGd	�d
ej�Zy)�)�logN)�chain�)�metadata�)�_ORIGINAL_SUBCOMMANDSc#�K�tjd��D]!}|j�|�D]}|����#y�w)z%Find all files under revision controlzsetuptools.file_finders)�groupN)r�entry_points�load)�dirname�ep�items   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/sdist.py�walk_revctrlrs9�����#�#�*C�D���B�G�G�I�g�&�D��J�'�E�s�<>c����eZdZdZgd�ZiZgd�Zed�eD��Zd�Z	d�Z
d�Zd�Ze
ejd	���Z�fd
�Z�fd�Zd�Zd
�Zd�Zd�Z�fd�Zd�Zd�Zd�Zd�Z�xZS)�sdistz=Smart sdist that finds anything supported by revision control))zformats=Nz6formats for source distribution (comma-separated list))z	keep-temp�kz@keep the distribution tree around after creating archive file(s))z	dist-dir=�dzFdirectory to put the source distribution archive(s) in [default: dist])zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group])�z.rstz.txtz.mdc#�>K�|]}dj|����y�w)z	README{0}N)�format)�.0�exts  r�	<genexpr>zsdist.<genexpr>3s����I�7H��K�&�&�s�+�7H�s�c��|jd�|jd�}|j|_|jjtj
j
|jd��|j�|j�D]}|j|��|j�t|jdg�}|jD]}dd|f}||vs�
|j|��y)N�egg_infozSOURCES.txt�
dist_filesrr)�run_command�get_finalized_command�filelist�append�os�path�joinr�check_readme�get_sub_commands�make_distribution�getattr�distribution�
archive_files)�self�ei_cmd�cmd_namer �file�datas      r�runz	sdist.run5s�������$��+�+�J�7������
��
�
���R�W�W�\�\�&�/�/�=�I�J������-�-�/�H����X�&�0�	
��� ��T�.�.��b�A�
��&�&�D��R��&�D��:�%��!�!�$�'�'�c�b�tjj|�|j�y�N)�origr�initialize_options�_default_to_gztar�r.s rr8zsdist.initialize_optionsHs ���
�
�%�%�d�+���� r4c�<�tjdk\rydg|_y)N)��r�betar�gztar)�sys�version_info�formatsr:s rr9zsdist._default_to_gztarMs�����3�3���y��r4c��|j�5tjj|�ddd�y#1swYyxYw)z%
        Workaround for #516
        N)�_remove_os_linkr7rr*r:s rr*zsdist.make_distributionSs.���
!�
!�
#��J�J�(�(��.�$�
#�
#�s	� :�Ac#��K�Gd�d�}ttd|�}	t`	d��||urt	td|�yy#t$rY�'wxYw#||urt	td|�wwxYw�w)zG
        In a context, remove and restore os.link if it exists
        c��eZdZy)�&sdist._remove_os_link.<locals>.NoValueN)�__name__�
__module__�__qualname__�r4r�NoValuerGas��r4rL�linkN)r+r%rM�	Exception�setattr)rL�orig_vals  rrDzsdist._remove_os_linkZsz����	�	��2�v�w�/��	���	.���w�&���F�H�-�'���	��	��
�w�&���F�H�-�'�s8�A+�A�A�A+�	A
�
A+�A
�
A+�A(�(A+c�B��t�|��|j�yr6)�super�add_defaults� _add_defaults_build_sub_commands�r.�	__class__s �rrSzsdist.add_defaultsos���
�����-�-�/r4c���t�|��tjj	d�r|j
j
d�yy)Nzpyproject.toml)rR�_add_defaults_optionalr%r&�isfiler#r$rUs �rrXzsdist._add_defaults_optionalss7���
��&�(�
�7�7�>�>�*�+��M�M� � �!1�2�,r4c���|jj�r[|jd�}|jj	|j��|j
|j|��yy)zgetting python files�build_pyN)r,�has_pure_modulesr"r#�extend�get_source_files�_add_data_files�_safe_data_files�r.r[s  r�_add_defaults_pythonzsdist._add_defaults_pythonxs]�����-�-�/��1�1�*�=�H��M�M� � ��!:�!:�!<�=�� � ��!6�!6�x�!@�A�0r4c�����jd�}t|j��tz
}�fd�|D�}d�|D�}�jjt
j|��y)N�buildc3�@�K�|]}�j|����y�wr6)r")r�cr.s  �rrz9sdist._add_defaults_build_sub_commands.<locals>.<genexpr>�s�����D�|�!��*�*�1�-�|�s�c3�VK�|]!}t|d�s�|j����#y�w)r^N)�hasattrr^)rrfs  rrz9sdist._add_defaults_build_sub_commands.<locals>.<genexpr>�s$����V�t�!�w�q�BT�7U��#�#�%�t�s�)�))r"�setr)rr#r]r�
from_iterable)r.rd�missing_cmds�cmds�filess`    rrTz&sdist._add_defaults_build_sub_commandss]����*�*�7�3���5�1�1�3�4�7L�L��D�|�D��V�t�V���
�
���U�0�0��7�8r4c��|jS)a�
        Since the ``sdist`` class is also used to compute the MANIFEST
        (via :obj:`setuptools.command.egg_info.manifest_maker`),
        there might be recursion problems when trying to obtain the list of
        data_files and ``include_package_data=True`` (which in turn depends on
        the files included in the MANIFEST).

        To avoid that, ``manifest_maker`` should be able to overwrite this
        method and avoid recursive attempts to build/analyze the MANIFEST.
        )�
data_filesras  rr`zsdist._safe_data_files�s���"�"�"r4c�H�|jjd�|D��y)zA
        Add data files as found in build_py.data_files.
        c3�tK�|]0\}}}}|D]$}tjj||����&�2y�wr6)r%r&r')r�_�src_dir�	filenames�names     rrz(sdist._add_data_files.<locals>.<genexpr>�s=����
�,6�(��7�A�y�!��
�G�G�L�L��$�'�!�
(�,6�s�68N)r#r])r.ros  rr_zsdist._add_data_files�s#��	
�
�
���
�,6�
�	
r4c�l��	t�|��y#t$rtjd�YywxYw)Nz&data_files contains unexpected objects)rR�_add_defaults_data_files�	TypeErrorr�warnrUs �rrwzsdist._add_defaults_data_files�s/���	?��G�,�.���	?��H�H�=�>�	?�s��3�3c���|jD]#}tjj|�s�#y|j	ddj|j�z�y)Nz,standard file not found: should have one of z, )�READMESr%r&�existsryr')r.�fs  rr(zsdist.check_readme�sF�����A��w�w�~�~�a� ���
�I�I�>����4�<�<�AX�X�
r4c�r�tjj|||�tjj|d�}t
td�rFtjj|�r'tj|�|jd|�|jd�j|�y)Nz	setup.cfgrMr)r7r�make_release_treer%r&r'rhr|�unlink�	copy_filer"�save_version_info)r.�base_dirrm�dests    rrzsdist.make_release_tree�s{���
�
�$�$�T�8�U�;��w�w�|�|�H�k�2���2�v��2�7�7�>�>�$�#7�
�I�I�d�O��N�N�;��-��"�"�:�.�@�@��Fr4c���tjj|j�syt	|jd�5}|j�}ddd�dj
�k7S#1swY�xYw)NF�rbz+# file GENERATED by distutils, do NOT edit
)r%r&rY�manifest�open�readline�encode)r.�fp�
first_lines   r�_manifest_is_not_generatedz sdist._manifest_is_not_generated�sW���w�w�~�~�d�m�m�,��
�$�-�-��
&�"�����J�'��K�R�R�T�T�T�'�
&�s�A-�-A6c��tjd|j�t|jd�}|D]S}	|j	d�}|j�}|jd�s|s�9|jj|��U|j�y#t
$rtjd|z�Y��wxYw)z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'r�zUTF-8z"%r not UTF-8 decodable -- skipping�#N)r�infor�r��decode�UnicodeDecodeErrorry�strip�
startswithr#r$�close)r.r��lines   r�
read_manifestzsdist.read_manifest�s���
	���-�t�}�}�=���
�
�t�,���D�
��{�{�7�+��
�:�:�<�D����s�#�4���M�M� � ��&��	�����&�
����=��D�E��
�s�B � !C�C)rHrIrJ�__doc__�user_options�negative_opt�README_EXTENSIONS�tupler{r3r8r9r*�staticmethod�
contextlib�contextmanagerrDrSrXrbrTr`r_rwr(rr�r��
__classcell__)rVs@rrrs����G��L�0�L�3���I�7H�I�I�G�(�&!�
!�/�����.���.�&0�3�
B�9�#�
�?��G�U�r4r)r)�	distutilsr�distutils.command.sdist�commandrr7r%r@r��	itertoolsr�
_importlibrrdr�list�_default_revctrlrrKr4r�<module>r�s=���&�&�	�
���!�(����A�D�J�J�Ar4python3.12/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-312.pyc000064400000007333151732703470025205 0ustar00�

��_i��x�ddlmZmZddlZddlmZddlmZddlmZddl	m
Z
Gd�d	eje�Zy)
�)�log�dir_utilN)�Command)�
namespaces)�unpack_archive�)�ensure_directoryc�8�eZdZdZdZdgZd�Zd�Zd�Zd�Z	d�Z
y)	�install_egg_infoz.Install an .egg-info directory for the package)zinstall-dir=�dzdirectory to install toc��d|_y�N)�install_dir��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/install_egg_info.py�initialize_optionsz#install_egg_info.initialize_optionss
�����c��|jdd�|jd�}|j��d�}|j|_t
jj|j|�|_	g|_
y)N�install_lib)rr�egg_infoz	.egg-info)�set_undefined_options�get_finalized_command�_get_egg_basenamer�source�os�path�joinr�target�outputs)r�ei_cmd�basenames   r�finalize_optionsz!install_egg_info.finalize_optionssg���"�"�=�2P�Q��+�+�J�7���.�.�0�1��;���o�o����g�g�l�l�4�#3�#3�X�>�����rc��|jd�tjj|j�rUtjj|j�s,t
j|j|j��nbtjj|j�r9|jtj|jfd|jz�|jst|j�|j|jdd|j�d|j���|j�y)Nr)�dry_runz	Removing �zCopying z to )�run_commandrr�isdirr�islinkr�remove_treer%�exists�execute�unlinkr	�copytreer�install_namespacesrs r�runzinstall_egg_info.runs�������$�
�7�7�=�=����%�b�g�g�n�n�T�[�[�.I�� � ����d�l�l�C�
�W�W�^�^�D�K�K�
(��L�L����T�[�[�N�K�$�+�+�4M�N��|�|��T�[�[�)����T�]�]�B�d�k�k�4�;�;�(W�X����!rc��|jSr)r rs r�get_outputszinstall_egg_info.get_outputs)s���|�|�rc�R���fd�}t�j�j|�y)Nc���dD]}|j|�sd|z|vs�y�jj|�tjd||�|S)N)z.svn/zCVS/�/zCopying %s to %s)�
startswithr �appendr�debug)�src�dst�skiprs   �r�skimmerz*install_egg_info.copytree.<locals>.skimmer.sS���(���>�>�$�'�3��:��+<��(�
�L�L����$��I�I�(�#�s�3��Jr)rrr)rr<s` rr.zinstall_egg_info.copytree,s���		�	�t�{�{�D�K�K��9rN)�__name__�
__module__�__qualname__�__doc__�description�user_optionsrr#r0r2r.r&rrrr
s/��8�B�K�	9��L� ��	"��
:rr)
�	distutilsrrr�
setuptoolsrr�setuptools.archive_utilr�_pathr	�	Installerrr&rr�<module>rHs+��#�	��!�2�$�/:�z�+�+�W�/:rpython3.12/site-packages/setuptools/command/__pycache__/upload.cpython-312.pyc000064400000002000151732703470023150 0ustar00�

��_i���R�ddlmZddlmZddlmZGd�dej�Zy)�)�log)�upload)�RemovedCommandErrorc��eZdZdZd�Zy)rz)Formerly used to upload packages to PyPI.c�b�d}|jd|ztj�t|��)Nz[The upload command has been removed, use twine to upload instead (https://pypi.org/p/twine)zERROR: )�announcer�ERRORr)�self�msgs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/upload.py�runz
upload.run
s/��
3�	�
	
�
�
�i�#�o�s�y�y�1�!�#�&�&�N)�__name__�
__module__�__qualname__�__doc__r
�rrrrs
��3�'rrN)�	distutilsr�distutils.commandr�orig�setuptools.errorsrrrr�<module>rs���,�1�
'�T�[�[�
'rpython3.12/site-packages/setuptools/command/__pycache__/develop.cpython-312.pyc000064400000023417151732703470023341 0ustar00�

��_i5���ddlmZddlmZddlmZddlZddlZddlm	Z	ddl
mZddl
mZddl
Z
Gd�d	eje	�ZGd
�d�Zy)�)�convert_path)�log)�DistutilsOptionErrorN)�easy_install)�_path)�
namespacesc��eZdZdZdZejddgzZejdgzZdZd�Z	d�Z
d	�Zed
��Z
d�Zd�Zd
�Zd�Zy)�developzSet up package for developmentz%install package in 'development mode')�	uninstall�uzUninstall this source package)z	egg-path=Nz-Set the path to be used in the .egg-link filerFc��|jr(d|_|j�|j�n|j	�|j�y)NT)r�
multi_version�uninstall_link�uninstall_namespaces�install_for_development�warn_deprecated_options��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/develop.py�runzdevelop.runsA���>�>�!%�D�����!��%�%�'��(�(�*��$�$�&�c�f�d|_d|_tj|�d|_d|_y)N�.)r�egg_pathr�initialize_options�
setup_path�always_copy_fromrs rrzdevelop.initialize_options$s-�������
��'�'��-���� #��rc	�<�ddl}|jd�}|jg|_t	j
|�|j
�|j�|jjtjd��|jdz}tjj|j|�|_|j |_|j"�.tjj%|j �|_t'j(|j �}t'j(tjj|j|j"��}||k7rt+d|z��|j-||j/|tjj%|j0��|j��|_|j5|j |j|j"�|_y)Nr�egg_infoz*.eggz	.egg-linkzA--egg-path must be a relative path from the install directory to ��project_name)�
pkg_resources�get_finalized_command�egg_name�argsr�finalize_options�expand_basedirs�expand_dirs�
package_index�scan�glob�os�path�join�install_dir�egg_link�egg_baser�abspathr�normpathr�Distribution�PathMetadatar�dist�_resolve_setup_pathr)rr"�ei�egg_link_fn�targetrs      rr&zdevelop.finalize_options+s����
�
'�
'�
�
3���[�[�M��	��%�%�d�+���������������	�	�'� 2�3��k�k�K�/�������T�%5�%5�{�C��
�����
��=�=� ��G�G�O�O�B�K�K�8�D�M�����
�
�.���>�>�"�'�'�,�,�t�/?�/?����"O�P���v��&�!�#)�*��
�"�.�.���&�&�v�r�w�w���r�{�{�/K�L����/�
��	��2�2��M�M�����M�M�
��rc��|jtjd�jd�}|tjk7rd|jd�dzz}t
jtjj|||��}t
jtj�}||k7r
td||��|S)z�
        Generate a path from egg_base back to '.' where the
        setup script resides and ensure that path points to the
        setup path from $install_dir/$egg_path.
        �/z../�zGCan't get a consistent path to setup script from installation directory)�replacer,�sep�rstrip�curdir�countrr3r-r.r)r1r/r�
path_to_setup�resolvedrAs      rr7zdevelop._resolve_setup_pathRs���!�(�(�����5�<�<�S�A�
��B�I�I�%�!�]�%8�%8��%=��%A�B�M��>�>�"�'�'�,�,�{�H�m�"T�U������	�	�*���v��&�*���	�
��rc�l�|jd�|jdd��|jd�tjr*|j	tj�dt_|j�t
jd|j|j�|jsJt|jd�5}|j|jdz|jz�ddd�|jd|j |j"�y#1swY�2xYw)Nr�	build_extr=)�inplacezCreating %s (link to %s)�w�
)�run_command�reinitialize_command�
setuptools�bootstrap_install_fromr�install_namespacesr�infor0r1�dry_run�open�writerr�process_distributionr6�no_deps)r�fs  rrzdevelop.install_for_developmentgs�������$�	
�!�!�+�q�!�9�����%��,�,����j�?�?�@�04�J�-����!�	���+�T�]�]�D�M�M�J��|�|��d�m�m�S�)�Q�����
�
��,�t���>�?�*�	
�!�!�$��	�	�t�|�|�3C�D�	*�)�s�
,D*�*D3c��tjj|j�r�t	j
d|j|j�t|j�}|D�cgc]}|j���}}|j�||jg|j|jgfvrt	jd|�y|jstj|j�|js|j|j �|j"j$rt	jd�yycc}w)NzRemoving %s (link to %s)z$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r,r-�existsr0rrOr1rQr@�closerr�warnrP�unlink�
update_pthr6�distribution�scripts)r�
egg_link_file�line�contentss    rrzdevelop.uninstall_link}s���
�7�7�>�>�$�-�-�(��H�H�/�����
�
�N� ����/�M�2?�@�-�$����
�-�H�@����!������$�-�-����1Q�R�R����?��J���<�<��	�	�$�-�-�(��|�|��O�O�D�I�I�&����$�$��H�H�L�M�%��As�.Ec���||jurtj||�S|j|�|jj
xsgD]�}tjjt|��}tjj|�}t|�5}|j�}ddd�|j|||���y#1swY� xYw�N)r6r�install_egg_scripts�install_wrapper_scriptsr\r]r,r-r2r�basenamerQ�read�install_script)rr6�script_name�script_path�strm�script_texts      rrczdevelop.install_egg_scripts�s����t�y�y� ��3�3�D�$�?�?�
	
�$�$�T�*� �,�,�4�4�:��:�K��'�'�/�/�,�{�*C�D�K��'�'�*�*�;�7�K��k�"�d�"�i�i�k��#�����k�;��L�;�#�"�s�%C�C	c�D�t|�}tj||�Srb)�VersionlessRequirementrrd�rr6s  rrdzdevelop.install_wrapper_scripts�s��%�d�+���3�3�D�$�?�?rN)�__name__�
__module__�__qualname__�__doc__�descriptionr�user_options�boolean_options�command_consumes_argumentsrrr&�staticmethodr7rrrcrd�rrr
r

s{��(�9�K��,�,�;�L�0��L�
#�2�2�k�]�B�O�!&��'�$�%
�N����(E�,N�"M�$@rr
c�"�eZdZdZd�Zd�Zd�Zy)rma�
    Adapt a pkg_resources.Distribution to simply return the project
    name as the 'requirement' so that scripts will work across
    multiple versions.

    >>> from pkg_resources import Distribution
    >>> dist = Distribution(project_name='foo', version='1.0')
    >>> str(dist.as_requirement())
    'foo==1.0'
    >>> adapted_dist = VersionlessRequirement(dist)
    >>> str(adapted_dist.as_requirement())
    'foo'
    c��||_yrb)�_VersionlessRequirement__distrns  r�__init__zVersionlessRequirement.__init__�s	����rc�.�t|j|�Srb)�getattrr{)r�names  r�__getattr__z"VersionlessRequirement.__getattr__�s���t�{�{�D�)�)rc��|jSrbr rs r�as_requirementz%VersionlessRequirement.as_requirement�s��� � � rN)rorprqrrr|r�r�rxrrrmrm�s����*�!rrm)�distutils.utilr�	distutilsr�distutils.errorsrr,r+�setuptools.command.easy_installrrLrr�DevelopInstallerr
rmrxrr�<module>r�sC��'��1�	��8��!��U@�j�)�)�<�U@�p!�!rpython3.12/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-312.pyc000064400000056003151732703500023621 0ustar00�

��_i�@��6�dZddlmZmZddlmZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZdd	lmZdd
lmZmZd�Zd�Zd
�Zd�ZGd�de�Zej9dj;��Zd�Zd�Z d�Z!ddd�Z"d�Z#d�Z$d�Z%gd�Z&dd�Z'y)z6setuptools.command.bdist_egg

Build .egg distributions�)�remove_tree�mkpath)�log)�CodeTypeN)�Library)�Command�)�ensure_directory)�get_path�get_python_versionc��td�S)N�purelib)r����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/bdist_egg.py�_get_purelibrs
���I��rc�~�d|vr"tjj|�d}|jd�r|dd}|S)N�.r�modulei����)�os�path�splitext�endswith)�filenames r�strip_modulers@��
�h���7�7�#�#�H�-�a�0������"��C�R�=���Orc#�K�tj|�D]-\}}}|j�|j�|||f���/y�w)zbDo os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
    N)r�walk�sort)�dir�base�dirs�filess    r�sorted_walkr#!s@���� �W�W�S�\���d�E��	�	��
�
�
���D�%���*�s�AA	c��tjd�j�}t|d�5}|j	||z�ddd�y#1swYyxYw)Na�
        def __bootstrap__():
            global __bootstrap__, __loader__, __file__
            import sys, pkg_resources, importlib.util
            __file__ = pkg_resources.resource_filename(__name__, %r)
            __loader__ = None; del __bootstrap__, __loader__
            spec = importlib.util.spec_from_file_location(__name__,__file__)
            mod = importlib.util.module_from_spec(spec)
            spec.loader.exec_module(mod)
        __bootstrap__()
        �w)�textwrap�dedent�lstrip�open�write)�resource�pyfile�_stub_template�fs    r�
write_stubr/+sL���_�_�
	��
�f�h��
�f�c�	�a�	�����)�*�
�	�	�s�A�Ac�b�eZdZdZgd�Zgd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zy)�	bdist_eggzcreate an "egg" distribution))z
bdist-dir=�bz1temporary directory for creating the distribution)z
plat-name=�pzdplatform name to embed in generated filenames (by default uses `pkg_resources.get_build_platform()`))�exclude-source-filesNz+remove all .py files from the generated egg)�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=�dz-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))r5r8r4c�f�d|_d|_d|_d|_d|_d|_d|_y)Nr)�	bdist_dir�	plat_name�	keep_temp�dist_dir�
skip_build�
egg_output�exclude_source_files��selfs r�initialize_optionszbdist_egg.initialize_optionsUs4�������������
�������$(��!rc�N�|jd�x}|_|j|_|j�@|jd�j}t
jj|d�|_|j�ddl	m
}|�|_|jdd�|j�t|jt�|jj!�xr|j��}t
jj|j"|dz�|_yy)	N�egg_info�bdist�eggr)�get_build_platform)r=r=)�
py_version�platformz.egg)�get_finalized_command�ei_cmdrEr:�
bdist_baserr�joinr;�
pkg_resourcesrH�set_undefined_optionsr?�_get_egg_basenamer�distribution�has_ext_modulesr=)rBrLrMrH�basenames     r�finalize_optionszbdist_egg.finalize_options^s���#�9�9�*�E�E��������
��>�>�!��3�3�G�<�G�G�J��W�W�\�\�*�e�<�D�N��>�>�!�8�/�1�D�N��"�"�7�,D�E��?�?�"��/�/�-�/��*�*�:�:�<�O����0��H�
!�g�g�l�l�4�=�=�(�V�:K�L�D�O�#rc��|j|jd�_tjjtjj
t���}|jjgc}|j_	|D]�}t|t�r�t|�dk(r�tjj|d�r~tjj
|d�}tjj|�}||k(s"|j|tjz�r|t|�dzd|df}|jjj!|���	t#j$d|j�|j'ddd��||j_	y#||j_	wxYw)N�installr	r�zinstalling package data to %s�install_data)�force�root)r:rK�install_librr�normcase�realpathrrR�
data_files�
isinstance�tuple�len�isabs�
startswith�sep�appendr�info�call_command)rB�
site_packages�old�itemr^�
normalizeds      r�do_install_datazbdist_egg.do_install_datavsd��<@�N�N��"�"�9�-�9����(�(����)9�)9�,�.�)I�J�
�,0�,=�,=�,H�,H�"�)��T�
�
�
)��D��$��&�3�t�9��>��7�7�=�=��a��)�!�w�w�/�/��Q��8�H�!#���!1�!1�(�!;�J�!�]�2�j�6K�6K�%����.�7� (��M�(:�Q�(>�(@�A�4��7�J�����(�(�/�/��5��	/��H�H�4�d�n�n�E����n�A�D��A�+.�D���(��3�D���(�s�84F>�>Gc��|jgS)N)r?rAs r�get_outputszbdist_egg.get_outputs�s����� � rc��tD]}|j||j�� |jd|j�|jd|j�|j
|fi|��}|j
|�|S)z8Invoke reinitialized command `cmdname` with keyword argsr>�dry_run)�INSTALL_DIRECTORY_ATTRS�
setdefaultr:r>rq�reinitialize_command�run_command)rB�cmdname�kw�dirname�cmds     rrhzbdist_egg.call_command�sl��.�G��M�M�'�4�>�>�2�/�
�
�
�l�D�O�O�4�
�
�
�i����.�'�d�'�'��6�2�6������!��
rc��	�|jd�tjd|j�|j	d�}|j
}d|_|jj�r|js|jd�|jdd��}||_|j�\}}g|_g}t|�D]�\}}tjj|�\}	}
tjj!|jt#|	�dz�}|jj%|�tjd	|�|j&s)t)tjj+|�|�|j%|�|j-tj.d
�||<��|r|j1|�|jj2r|j5�|j}tjj!|d�}
|j7|
�|jj8rJtjj!|
d�}tjd
|�|jd|d��|j;|
�tjj!|
d�}|r{tjd|�|j&s�t=|�t?|d�}|jAdj!|��|jAd�|jC�nVtjjE|�r7tjd|�|j&stjF|�tItjj!|d�|jK��tjjMtjj!|jNd��rtjPd�|jRr|jU�tW|jX||jZ|j&|j]���|j^s!ta|j|j&��tc|jdg�j%dte�|jXf�y)NrEzinstalling library code to %srW�
build_clibr\r)�warn_dir�.pyzcreating stub loader for %s�/�EGG-INFO�scriptszinstalling scripts to %s�install_scriptsrX)�install_dir�no_epznative_libs.txtz
writing %s�wt�
zremoving %szdepends.txtzxWARNING: 'depends.txt' will not be used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.)�verboserq�mode�rq�
dist_filesr1)3rurrgr:rKr[rR�has_c_librariesr>rh�get_ext_outputs�stubs�	enumeraterrrrNrrfrqr/rT�replacere�byte_compiler_rmrr��copy_metadata_tor
r)r*�close�isfile�unlink�write_safety_flag�zip_safe�existsrE�warnr@�zap_pyfiles�make_zipfiler?r��
gen_headerr<r�getattrr)rB�instcmd�old_rootry�all_outputs�ext_outputs�
to_compiler3�ext_namer�extr,�archive_rootrE�
script_dir�native_libs�	libs_files                 r�runz
bdist_egg.run�s�������$�	���0�$�.�.�A��,�,�Y�7���<�<��������,�,�.�t������\�*����
���:�����#'�#7�#7�#9� ��[���
��
�$�[�1�K�A�x��G�G�,�,�X�6�M�H�c��W�W�\�\�$�.�.�,�x�2H�5�2P�Q�F��J�J���f�%��H�H�2�H�=��<�<��2�7�7�+�+�H�5�v�>����f�%�%�-�-�b�f�f�c�:�K��N�2�����Z�(����'�'�� � �"��~�~���7�7�<�<��j�9�����H�����$�$������h�	�:�J��H�H�/��<����/�Z�q��Q����h�'��g�g�l�l�8�->�?����H�H�\�;�/��<�<� ��-� ��d�3�	�����	�	�+� 6�7�����%����!�
�W�W�^�^�K�
(��H�H�]�K�0��<�<��	�	�+�&��"�'�'�,�,�|�Z�@�$�-�-�/�R�
�7�7�>�>�"�'�'�,�,�t�}�}�m�D�E��H�H�P�
�
�$�$�����	��O�O���L�L��L�L����"�	
��~�~��������=�	��!�!�<��4�;�;�
�,�.����@�	
rc	��tjd�t|j�D�]!\}}}|D�]}tj
j
||�}|jd�r+tjd|�t	j|�|jd�s�r|}d}tj||�}tj
j
|tj|jd�dz�}	tjd|�d	|	�d
��	t	j|	�t	j ||	�����$y#t$rY�(wxYw)Nz+Removing .py files from temporary directoryr}zDeleting %s�__pycache__z#(?P<name>.+)\.(?P<magic>[^.]+)\.pyc�name�.pyczRenaming file from [z] to [�])rrg�walk_eggr:rrrNr�debugr��re�match�pardir�group�remove�OSError�rename)
rBr r!r"r�r�path_old�pattern�m�path_news
          rr�zbdist_egg.zap_pyfiles�s������>�?�!)�$�.�.�!9��D�$�����w�w�|�|�D�$�/���=�=��'��I�I�m�T�2��I�I�d�O��=�=��/�#�H�D�G�����$�/�A�!�w�w�|�|�D�"�)�)�Q�W�W�V�_�v�=U�V�H��H�H�(�H�U�V���	�	�(�+��I�I�h��1�%�":��"#����s�E�	E�Ec��t|jdd�}|�|Stjd�t	|j
|j�S)Nr�z4zip_safe flag not set; analyzing archive contents...)r�rRrr��analyze_eggr:r�)rB�safes  rr�zbdist_egg.zip_safesC���t�(�(�*�d�;�����K����G�H��4�>�>�4�:�:�6�6rc��y)Nr%rrAs rr�zbdist_egg.gen_header
s��rc��tjj|j�}tjj	|d�}|j
jjD]]}|j|�s�tjj	||t|�d�}t|�|j||��_y)z*Copy metadata (egg info) to the target_dir�N)rr�normpathrErNrL�filelistr"rdrbr
�	copy_file)rB�
target_dir�
norm_egg_info�prefixr�targets      rr�zbdist_egg.copy_metadata_tos������(�(����7�
������m�R�0���K�K�(�(�.�.�D����v�&������j�$�s�6�{�}�2E�F�� ��(����t�V�,�	/rc�|�g}g}|jdi}t|j�D]�\}}}|D]P}tjj	|�dj�tvs�:|j|||z��R|D].}|||zdz|tjj||�<�0��|jj�r�|jd�}|jD]�}	t|	t�r�|j|	j �}
|j#|
�}tjj%|�j'd�r�otjj)tjj|j|��s��|j|���||fS)zAGet a list of relative paths to C extensions in the output distror�rXr~�	build_extzdl-)r:r#rrr�lower�NATIVE_EXTENSIONSrfrNrRrSrK�
extensionsr`r�get_ext_fullnamer��get_ext_filenamerTrdr�)rBr�r��pathsr r!r"r�	build_cmdr��fullnames           rr�zbdist_egg.get_ext_outputssp����������$��!,�T�^�^�!<��D�$��!���7�7�#�#�H�-�a�0�6�6�8�<M�M��&�&�u�T�{�X�'=�>�"�!��6;�D�k�H�6L�s�6R��b�g�g�l�l�4��2�3�!�	"=����,�,�.��2�2�;�?�I� �+�+���c�7�+��$�5�5�c�h�h�?��$�5�5�h�?���w�w�'�'��1�<�<�U�C��w�w�~�~�b�g�g�l�l�4�>�>�8�&L�M�#�*�*�8�4�,��K�'�'rN)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsrCrUrmrorhr�r�r�r�r�r�rrrr1r1=sP��2�K��L�&J�O�)�M�0/�2!��Q
�f2�.7��
-�(rr1z.dll .so .dylib .pydc#�K�t|�}t|�\}}}d|vr|jd�|||f��|D]}|���y�w)z@Walk an unpacked egg's contents, skipping the metadata directoryrN)r#�nextr�)�egg_dir�walkerr r!r"�bdfs      rr�r�;sP����
��
!�F��V���D�$���T�����J��
��e�
�����	��s�AAc���tj�D]G\}}tjj	tjj|d|��s�E|cSt
�syd}t|�D]e\}}}|D]Z}|jd�s|jd�r�&|jd�s|jd�s�It||||�xr|}�\�g|S)NrFTr}z.pywr�z.pyo)
�safety_flags�itemsrrr�rN�can_scanr�r�scan_module)	r�r��flag�fnr�r r!r"r�s	         rr�r�Fs��� �&�&�(���b�
�7�7�>�>�"�'�'�,�,�w�
�B�?�@��K�)��:���D�%�g�.���d�E��D��}�}�U�#�t�}�}�V�'<�����v�&�$�-�-��*?�"�7�D�$��>�G�4���/��Krc��tj�D]�\}}tjj	||�}tjj|�r'|�t
|�|k7s�Vtj|��l|��ot
|�|k(s�~t|d�}|jd�|j���y)Nr�r�)r�r�rrrNr��boolr�r)r*r�)r�r�r�r�r.s     rr�r�Xs��� �&�&�(���b�
�W�W�\�\�'�2�
&��
�7�7�>�>�"���|�t�D�z�T�1��	�	�"�
�
�
�$�t�*��"4��R���A�
�G�G�D�M�
�G�G�I�)rzzip-safeznot-zip-safe)TFc��tjj||�}|dd|vry|t|�dzdj	tj
d�}||xrdxsdztjj
|�dz}tjdkrd	}nd
}t|d�}|j|�tj|�}	|j�d}
tjt!|	��}dD] }||vs�t#j$d
||�d}
�"d|vr%dD] }||vs�t#j$d||�d}
�"|
S)z;Check whether module possibly uses unsafe-for-zipfile stuffN���TrXrr�r)�����rb)�__file__�__path__z%s: module references %sF�inspect)�	getsource�
getabsfile�
getsourcefile�getfilegetsourcelines�
findsource�getcomments�getframeinfo�getinnerframes�getouterframes�stack�tracez"%s: module MAY be using inspect.%s)rrrNrbr�rer�sys�version_infor)�read�marshal�loadr��dict�fromkeys�iter_symbolsrr�)
r�r r�r�r�pkgr�skipr.�coder��symbols�bads
             rr�r�ks<���w�w�|�|�D�$�'�H����}����
�s�7�|�a��!�
"�
*�
*�2�6�6�3�
7�C�
�C�K�C�%�2�
&����)9�)9�$�)?��)B�
B�F�
���&� ������X�t��A��F�F�4�L��<�<��?�D��G�G�I��D��m�m�L��.�/�G�'���'�>��H�H�/���=��D�(��G��
�C��g�~����=�v�s�K���
� �Krc#��K�|jD]}|���|jD]<}t|t�r|���t|t�s�)t|�D]}|����>y�w)zBYield names and strings used by `code` and its nested code objectsN)�co_names�	co_constsr`�strrr)rr��consts   rrr�sT�����
�
���
�������e�S�!��K�
��x�
(�$�U�+���
�,�	 �s�A
A$�
A$c��tjjd�stjdk7rytjd�tjd�y)N�java�cliTz1Unable to analyze compiled code on this platform.zfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.py)r�rJrdrr�rrrr�r��sA���<�<�"�"�6�*�s�|�|�u�/D���H�H�
@�A��H�H�	D�r)r\r�rY�install_basec����ddl}ttjj	|����tjd|����fd�}|r|jn|j}�sD|j|||��}	t��D]\}
}}||	|
|��|	j�|St��D]\}
}}|d|
|��|S)aqCreate a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    rNr�z#creating '%s' and adding '%s' to itc�D��|D]�}tjjtjj||��}tjj	|�s�`|t��dzd}�s|j
||�tjd|���y)NrXzadding '%s')	rrr�rNr�rbr*rr�)�zrx�namesr�rr3�base_dirrqs      ��r�visitzmake_zipfile.<locals>.visit�su����D��7�7�#�#�B�G�G�L�L��$�$?�@�D��w�w�~�~�d�#���X���*�,�-����G�G�D�!�$��	�	�-��+�
r)�compression)�zipfilerrrrxrrg�ZIP_DEFLATED�
ZIP_STORED�ZipFiler#r�)
�zip_filenamerr�rq�compressr�rrrrrxr!r"s
 ` `         rr�r��s�����
�2�7�7�?�?�<�(�'�:��H�H�
2�L�(�K�,�+3�'�&�&��8J�8J�K���O�O�L�$�K�O�H��$/��$9� �G�T�5��!�W�e�$�%:�	���	���%0��$9� �G�T�5��$���'�%:��r)rrTr%)(�__doc__�distutils.dir_utilrr�	distutilsr�typesrr�rr�r&r��setuptools.extensionr�
setuptoolsr�_pathr
�	sysconfigrrrrr#r/r1r�r�splitr�r�r�r�r�r�rr�rrr�rrr�<module>r&s����3���
�	�	���(��$�2��� �+�$x(��x(�v�M�M�"8�">�">�"@�A����$
�����'�T	��Y��rpython3.12/site-packages/setuptools/command/__pycache__/install_lib.cpython-312.pyc000064400000013177151732703500024173 0ustar00�

��_i��`�ddlZddlZddlmZmZddlmcmZGd�dej�Zy)�N)�product�starmapc�^�eZdZdZd�Zd�Zd�Zed��Zd�Z	ed��Z
				dd�Zd	�Zy
)�install_libz9Don't add compiled flags to filenames of non-Python filesc�l�|j�|j�}|�|j|�yy�N)�build�install�byte_compile)�self�outfiless  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/install_lib.py�runzinstall_lib.run
s/���
�
���<�<�>�������h�'� �c����fd��j�D�}t|�j��}tt	�j
|��S)z�
        Return a collections.Sized collections.Container of paths to be
        excluded for single_version_externally_managed installations.
        c3�N�K�|]}�j|�D]}|����y�wr)�
_all_packages)�.0�ns_pkg�pkgrs   �r�	<genexpr>z-install_lib.get_exclusions.<locals>.<genexpr>s1�����
�/���)�)�&�1��
�1�
�/�s�"%)�_get_SVEM_NSPsr�_gen_exclusion_paths�setr�_exclude_pkg_path)r�all_packages�
excl_specss`  r�get_exclusionszinstall_lib.get_exclusionssJ���

��-�-�/�
���\�4�+D�+D�+F�G�
��7�4�1�1�:�>�?�?rc��|jd�|gz}tjj|jg|���S)zw
        Given a package name and exclusion path within that package,
        compute the full exclusion path.
        �.)�split�os�path�join�install_dir)rr�exclusion_path�partss    rrzinstall_lib._exclude_pkg_paths7��
�	�	�#��.�!1�1���w�w�|�|�D�,�,�5�u�5�5rc#�JK�|r|��|jd�\}}}|r�yy�w)zn
        >>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
        r N)�
rpartition)�pkg_name�sep�childs   rrzinstall_lib._all_packages's,������N�#+�#6�#6�s�#;� �H�c�5��s�#�#c��|jjsgS|jd�}|j}|r|jjSgS)z�
        Get namespace packages (list) but only for
        single_version_externally_managed installations and empty otherwise.
        r
)�distribution�namespace_packages�get_finalized_command�!single_version_externally_managed)r�install_cmd�svems   rrzinstall_lib._get_SVEM_NSPs1sL��� � �3�3��I��0�0��;���<�<��7;�t� � �3�3�C��Crc#��K�d��d��d��ttd�sytjj	ddtj
jz�}|dz��|d	z��|d
z��|dz��y�w)zk
        Generate file paths to be excluded for namespace packages (bytecode
        cache files).
        z__init__.pyz__init__.pycz__init__.pyo�implementationN�__pycache__z	__init__.z.pycz.pyoz
.opt-1.pycz
.opt-2.pyc)�hasattr�sysr"r#r$r5�	cache_tag)�bases rrz install_lib._gen_exclusion_pathsAsw�����������s�,�-���w�w�|�|�M�;��9K�9K�9U�9U�+U�V���V�m���V�m���\�!�!��\�!�!�s�A6A8c��	�
��|r|r|rJ�|j��	�	s!tjj|||�Sddlm}ddlm�
g��	�
�fd�}||||��S)Nr)�unpack_directory)�logc���|�vr�jd|�y�jd|tjj	|���j|�|S)Nz/Skipping installation of %s (namespace package)Fzcopying %s -> %s)�warn�infor"r#�dirname�append)�src�dst�excluder=r
s  ���r�pfz!install_lib.copy_tree.<locals>.pflsK����g�~����J�C�P���H�H�'��b�g�g�o�o�c�.B�C��O�O�C� ��Jr)r�origr�	copy_tree�setuptools.archive_utilr<�	distutilsr=)r�infile�outfile�
preserve_mode�preserve_times�preserve_symlinks�levelr<rFrEr=r
s         @@@rrHzinstall_lib.copy_treeVsd�����8I�I�I��%�%�'����#�#�-�-�d�F�G�D�D�	=�!���	�	���"�-��rc��tjj|�}|j�}|r|D�cgc]	}||vs�|��c}S|Scc}wr)rGr�get_outputsr)r�outputsrE�fs    rrRzinstall_lib.get_outputsxsO���"�"�.�.�t�4���%�%�'���&�;�w�!�!�7�*:�A�w�;�;����<s�	A	�A	N)�rUrrU)
�__name__�
__module__�__qualname__�__doc__rrr�staticmethodrrrrHrR�rrrrs\��C�(�@�6��<��<�D� �"��"�0���� �Drr)	r"r8�	itertoolsrr�distutils.command.install_lib�commandrrGr[rr�<module>r_s(��	�
�&�,�,�v�$�"�"�vrpython3.12/site-packages/setuptools/command/__pycache__/rotate.cpython-312.pyc000064400000007041151732703500023166 0ustar00�

��_i1��Z�ddlmZddlmZddlmZddlZddlZddlm	Z	Gd�de	�Z
y)�)�convert_path)�log)�DistutilsOptionErrorN)�Commandc�2�eZdZdZdZgd�ZgZd�Zd�Zd�Z	y)�rotatezDelete older distributionsz2delete older distributions, keeping N newest files))zmatch=�mzpatterns to match (required))z	dist-dir=�dz%directory where the distributions are)zkeep=�kz(number of matching distributions to keepc�.�d|_d|_d|_y)N)�match�dist_dir�keep)�selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/rotate.py�initialize_optionszrotate.initialize_optionss����
���
���	�c��|j�td��|j�td��	t|j�|_t|jt�rE|jjd�D�cgc]}t|j����c}|_|jdd�y#t$r}td�|�d}~wwxYwcc}w)NzQMust specify one or more (comma-separated) match patterns (e.g. '.zip' or '.egg')z$Must specify number of files to keepz--keep must be an integer�,�bdist)rr)r
rr�int�
ValueError�
isinstance�str�splitr�strip�set_undefined_options)r�e�ps   r�finalize_optionszrotate.finalize_optionss����:�:��&�*��
��9�9��&�'M�N�N�	K��D�I�I��D�I��d�j�j�#�&�;?�:�:�;K�;K�C�;P�Q�;P�a�,�q�w�w�y�1�;P�Q�D�J��"�"�7�,D�E��	�	K�&�'B�C��J��	K��Rs�B<� C�<	C�C�Cc���|jd�ddlm}|jD�]G}|jj	�dz|z}|t
jj|j|��}|D�cgc]#}t
jj|�|f��%}}|j�|j�tjdt|�|�||jd}|D]r\}}tjd|�|j r�)t
jj#|�rt%j&|��^tj(|��t��Jycc}w)N�egg_infor)�glob�*z%d file(s) matching %szDeleting %s)�run_commandr#r
�distribution�get_name�os�path�joinr�getmtime�sort�reverser�info�lenr�dry_run�isdir�shutil�rmtree�unlink)rr#�pattern�files�f�ts      r�runz
rotate.run+s
������$���z�z�G��'�'�0�0�2�S�8�7�B�G�������d�m�m�W�=�>�E�7<�=�u�!�b�g�g�&�&�q�)�1�-�u�E�=��J�J�L��M�M�O��H�H�-�s�5�z�7�C��$�)�)�+�&�E����1������*��|�|��w�w�}�}�Q�'��
�
�a�(��	�	�!��
�"��>s�<(E0N)
�__name__�
__module__�__qualname__�__doc__�description�user_options�boolean_optionsrr r9�rrrr
s(��$�F�K��L��O��
F� %rr)�distutils.utilr�	distutilsr�distutils.errorsrr(r2�
setuptoolsrrrArr�<module>rFs#��'��1�	�
��4%�W�4%rpython3.12/site-packages/setuptools/command/__pycache__/egg_info.cpython-312.pyc000064400000105155151732703500023452 0ustar00�

��_i�g���dZddlmZddlmZddlmZddlm	Z	ddlZddlZddl
Z
ddlZddlZddl
Z
ddlZddlZddlmZdd	lmZmZd
dlmZddlmZdd
lmZddlmZddlmZddlmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&djNe
jP�Z)d�Z*Gd�d�Z+Gd�de+e�Z,Gd�de�ZGd�de�Z-d�Z.d�Z/d �Z0ejbZ1ejdZ2d!�Z3d"�Z4d(d#�Z5d$�Z6d)d%�Z7Gd&�d'e&�Z8y)*zUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contents�)�FileList)�DistutilsInternalError)�convert_path)�logN�)�metadata)�
_entry_points�_normalization�)�_requirestxt)�Command)�sdist)�walk_revctrl)�edit_config)�	bdist_egg)�glob)�	packaging)�SetuptoolsDeprecationWarningz{}.{}c��d}|jtjj�}t	j
tj�}d|�d�}t
|�D�]6\}}|t|�dz
k(}|dk(r|r|dz
}n|d|�d|�d	�z
}�2d
}t|�}	||	kr�||}
|
dk(r	||dzz
}n�|
dk(r||z
}n�|
d
k(r�|dz}||	kr
||dk(r|dz}||	kr
||dk(r|dz}||	kr||dk7r|dz}||	kr	||dk7r�||	k\r|t	j
|
�z
}nU||dz|}d}
|d
dk(rd}
|dd}|
t	j
|�z
}
|d
|
�d�z
}|}n|t	j
|
�z
}|dz
}||	kr��|r��2||z
}��9|dz
}t	j|tjtjz��S)z�
    Translate a file path glob like '*.txt' in to a regular expression.
    This differs from fnmatch.translate which allows wildcards to match
    directory separators. It also knows about '**/' which matches any number of
    directories.
    �z[^�]r�**z.*z(?:�+z)*r�*�?�[�!�^Nz\Z)�flags)�split�os�path�sep�re�escape�	enumerate�len�compile�	MULTILINE�DOTALL)r�pat�chunksr#�
valid_char�c�chunk�
last_chunk�i�	chunk_len�char�inner_i�inner�
char_classs              ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/egg_info.py�translate_patternr8%s%��
�C��T�Z�Z������
$�F�
�)�)�B�F�F�
�C��!�J��f�%���5��#�f�+��/�)�
��D�=���t����z�3�7�7���
����J�	��)�m���8�D��s�{��z�C�'�'������z�!������a�%���Y�&�5��>�S�+@�%��k�G��Y�&�5��>�S�+@�%��k�G��	�)�e�G�n��.C�%��k�G��	�)�e�G�n��.C��i�'��2�9�9�T�?�*�C�"�!�a�%�'�2�E�!#�J��Q�x�3��%(�
� %�a�b�	���"�)�)�E�"2�2�J��Z�1�1�C� �A��r�y�y���&��
��F�A�U�)�m�Z��3�J�C�}&�@�5�L�C�
�:�:�c�����	�	�!9�:�:�c�h�eZdZdZdZed��Zd�Zd�Zde	de
fd�Zde	fd�Zde	fd	�Z
ee
�Zy)
�
InfoCommonNc�\�tj|jj��S�N)r
�	safe_name�distribution�get_name��selfs r7�namezInfoCommon.name|s"���'�'��(9�(9�(B�(B�(D�E�Er9c�~�|j|jj��}tj|�Sr=)�
_maybe_tagr?�get_versionr
�safe_version)rB�taggeds  r7�tagged_versionzInfoCommon.tagged_version�s0������!2�!2�!>�!>�!@�A���*�*�6�2�2r9c�^�|jr|j|�r|S||jzS)z�
        egg_info may be called more than once for a distribution,
        in which case the version string already contains all tags.
        )�vtags�_already_tagged�rB�versions  r7rEzInfoCommon._maybe_tag�s5���z�z�d�2�2�7�;�
�	
��4�:�:�%�	
r9rN�returnc�z�|j|j�xs|j|j��Sr=)�endswithrK�
_safe_tagsrMs  r7rLzInfoCommon._already_tagged�s0������
�
�+�R�w�/?�/?����@Q�/R�Rr9c���	tjd|j���ddS#tjj
$r2tj|jjdd��cYSwxYw)N�0r� �.)r
rGrKrrN�InvalidVersionr>�replacerAs r7rRzInfoCommon._safe_tags�sj��	J�!�.�.��4�:�:�,�/?�@���D�D��� � �/�/�	J�!�+�+�D�J�J�,>�,>�s�C�,H�I�I�	J�s�$'�AA6�5A6c��d}|jr||jz
}|jr|tjd�z
}|S)Nrz%Y%m%d)�	tag_build�tag_date�time�strftimerMs  r7�tagszInfoCommon.tags�s;�����>�>��t�~�~�%�G��=�=��t�}�}�X�.�.�G��r9)�__name__�
__module__�__qualname__rZr[�propertyrCrIrE�str�boolrLrRr^rK�r9r7r;r;xse���I��H�
�F��F�3�	
�S�s�S�t�S�
J�C�J��c��
�T�N�Er9r;c��eZdZdZgd�ZdgZddiZd�Zed��Z	e	jd��Z	d�Zd	�Ze
d
fd�Zdd�Zd
�Zd�Zd�Zd�Zy
)�egg_infoz+create a distribution's .egg-info directory))z	egg-base=�ezLdirectory containing .egg-info directories (default: top of the source tree))�tag-date�dz0Add date stamp (e.g. 20050528) to version number)z
tag-build=�bz-Specify explicit tag to add to version number)�no-date�Dz"Don't include date stamp [default]rirlc�J�d|_d|_d|_d|_d|_y)NF)�egg_base�egg_namerg�egg_version�ignore_egg_info_in_manifestrAs r7�initialize_optionszegg_info.initialize_options�s'����
���
���
����+0��(r9c��yr=rerAs r7�tag_svn_revisionzegg_info.tag_svn_revision����r9c��yr=re)rB�values  r7ruzegg_info.tag_svn_revision�rvr9c��tj�}|j�|d<d|d<t|t	|���y)z�
        Materialize the value of date into the
        build tag. Install build keys in a deterministic order
        to avoid arbitrary reordering on subsequent builds.
        rZrr[)rgN)�collections�OrderedDictr^r�dict)rB�filenamergs   r7�save_version_infozegg_info.save_version_info�s=���*�*�,��!%�	�	����� �����H�d�H�5�6r9c�@�|j|_|j�|_tj
j
|j�}	t|tj
j�}|rdnd}tjj||j|jfz�|j�?|jj }|xsij#dt$j&�|_|j)d�t+j,|j�dz|_|jt$j&k7r9t$j0j3|j|j.�|_|j|jj4_|jj6}t9|dd�xs
t9|d	d�}|�o||jj;�k(rQ|j|_tj
j
|j�|_d|j_yyy#t$r?}tjjd|j�d|j���|�d}~wwxYw)
Nz%s==%sz%s===%sz-Invalid distribution name or version syntax: �-rro�	.egg-info�keyrC) rCrprIrqrrN�Version�
isinstance�requirements�Requirement�
ValueError�	distutils�errors�DistutilsOptionErrorror?�package_dir�getr!�curdir�ensure_dirnamer
�filename_componentrgr"�joinr�
_patched_dist�getattr�lower�_version�_parsed_version)rB�parsed_version�
is_version�specrh�dirs�pdr�s        r7�finalize_optionszegg_info.finalize_options�s��
�	�	��
��.�.�0���"�*�*�2�2�4�3C�3C�D��	�#�N�I�4E�4E�4M�4M�N�J�)�8�y�D��"�"�.�.�t�t�}�}�d�FV�FV�6W�/W�X��=�=� ��$�$�0�0�D�!�Z�R�,�,�R����;�D�M����J�'�&�9�9�$�-�-�H�;�V��
��=�=�B�I�I�%��G�G�L�L�����
�
�F�D�M�
.2�-=�-=����"�"�*��
�
�
,�
,���b�%��&�C�'�"�f�d�*C��
�>�c�T�]�]�%8�%8�%:�:��*�*�B�K�!*�!2�!2�!:�!:�4�;K�;K�!L�B��.2�D���+�;�>��5�	��"�"�7�7��=�=�$�"2�"2�4���
��	�s�A"I�	J�:J�JNc�F�t|j|j||�S)�0Compute filename of the output egg. Private API.)�
_egg_basenamerprq)rB�
py_version�platforms   r7�_get_egg_basenamezegg_info._get_egg_basenames���T�]�]�D�,<�,<�j�(�S�Sr9c���|r|j|||�ytjj|�r.|�|st	j
d||�y|j
|�yy)a�Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        Nz$%s not set in setup(), but %s exists)�
write_filer!r"�existsr�warn�delete_file)rB�whatr}�data�forces     r7�write_or_delete_filezegg_info.write_or_delete_filesU����O�O�D�(�D�1�
�W�W�^�^�H�
%��|�E����?��x�P��� � ��*�&r9c���tjd||�|jd�}|js.t	|d�}|j|�|j
�yy)z�Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        zwriting %s to %s�utf-8�wbN)r�info�encode�dry_run�open�write�close)rBr�r}r��fs     r7r�zegg_info.write_filesO��	���#�T�8�4��{�{�7�#���|�|��X�t�$�A�
�G�G�D�M�
�G�G�I�r9c�t�tjd|�|jstj|�yy)z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)rr�r�r!�unlink)rBr}s  r7r�zegg_info.delete_file+s(�������)��|�|��I�I�h��r9c	��|j|j�	tj|jd�tjd��D]X}|j�}|||jtjj|j|j���Ztjj|jd�}tjj|�r|j|�|j!�y#t$r5}d|j�d�}t
jj|�|�d}~wwxYw)Nz'Cannot update time stamp of directory '�'zegg_info.writers)�groupznative_libs.txt)�mkpathrgr!�utime�OSErrorr�r��DistutilsFileErrorr�entry_points�loadrCr"r�r�r��find_sources)rBrh�msg�ep�writer�nls      r7�runzegg_info.run1s������D�M�M�"�	B��H�H�T�]�]�D�)��'�'�.@�A�B��W�W�Y�F��4����"�'�'�,�,�t�}�}�b�g�g�"F�G�B�
�W�W�\�\�$�-�-�):�
;��
�7�7�>�>�"�����R� �������	B�;�D�M�M�?�!�L�C��"�"�5�5�c�:��A��	B�s� D�	E�"0E�Ec���tjj|jd�}t	|j
�}|j|_||_|j�|j|_
y)z"Generate SOURCES.txt manifest filezSOURCES.txtN)r!r"r�rg�manifest_makerr?rr�ignore_egg_info_dir�manifestr��filelist)rB�manifest_filename�mms   r7r�zegg_info.find_sourcesCsT���G�G�L�L����
�F��
�D�-�-�
.��!%�!A�!A���'���
��������
r9�F)r_r`ra�description�user_options�boolean_options�negative_optrsrbru�setterr~r��PY_MAJORr�r�r�r�r�r�rer9r7rgrg�s���?�K�
�L�"�l�O��:��L�1��
��
����
��
�
7�*3�X,4�d�T�+�$� ��$$r9rgc�t��eZdZd�fd�	Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Z�xZS)rc�4��t�|�||�||_yr=)�super�__init__r�)rBr��debug_printr��	__class__s    �r7r�zFileList.__init__Ps���
����{�+�#6�� r9c	��|j|�\}}}}|j|j|j|jtj|j|�tj|j|�|j|jd�}dddddddd	d�}	||}|jd�}	|d
vr|g}|	r|fnd}
||}|jdj!|g|	r|gngz|z��|D]"}||�r�t#j$||g|
����$y#t$rtd
j|����wxYw)N)�include�excludezglobal-includezglobal-excludezrecursive-includezrecursive-exclude�graft�prunez%warning: no files found matching '%s'z9warning: no previously-included files found matching '%s'z>warning: no files found matching '%s' anywhere in distributionzRwarning: no previously-included files matching '%s' found anywhere in distributionz:warning: no files found matching '%s' under directory '%s'zNwarning: no previously-included files matching '%s' found under directory '%s'z+warning: no directories found matching '%s'z6no previously-included directories found matching '%s'z/this cannot happen: invalid action '{action!s}')�actionz
recursive->r�r�rerU)�_parse_template_liner�r��global_include�global_exclude�	functools�partial�recursive_include�recursive_excluder�r��KeyErrorr�format�
startswithr�r�rr�)
rB�liner��patterns�dir�dir_pattern�
action_map�log_map�process_action�action_is_recursive�extra_log_args�log_tmpl�patterns
             r7�process_template_linezFileList.process_template_lineTs���04�/H�/H��/N�,���3���|�|��|�|�"�1�1�"�1�1�!*�!2�!2��&�&��"�"+�!2�!2��&�&��"��Z�Z��Z�Z�
�
�"?�V�S�6�P�2�C�M�%
��*	�'��/�N�%�/�/��=���'�'�#�}�H�#6�#��B���6�?������H�H���%8�S�E�b�A�H�L�
�	
�
 �G�!�'�*�����7�<�^�<� ��)�	�(�A�H�H�PV�H�W��
�	�s�&D#�#%Ec���d}tt|j�dz
dd�D]H}||j|�s�|jd|j|z�|j|=d}�J|S)z�
        Remove all files from the file list that match the predicate.
        Return True if any matching files were removed
        Fr���z
 removing T)�ranger'�filesr�)rB�	predicate�foundr1s    r7�
_remove_fileszFileList._remove_files�sk��
���s�4�:�:���*�B��3�A�����A��'�� � ���
�
�1�
�!=�>��J�J�q�M���	4�
�r9c��t|�D�cgc]$}tjj|�r�#|��&}}|j	|�t|�Scc}w)z#Include files that match 'pattern'.)rr!r"�isdir�extendrd)rBr�r�r�s    r7r�zFileList.include�sE�� ��M�B�M�q������q�1A��M��B����E���E�{���Cs
�$A�Ac�N�t|�}|j|j�S)z#Exclude files that match 'pattern'.)r8r��match�rBr�rs   r7r�zFileList.exclude�s!��!�'�*���!�!�%�+�+�.�.r9c��tjj|d|�}t|d��D�cgc]$}tjj	|�r�#|��&}}|j|�t
|�Scc}w)zN
        Include all files anywhere in 'dir/' that match the pattern.
        rT)�	recursive)r!r"r�rr�r�rd)rBr�r��full_patternr�r�s      r7r�zFileList.recursive_include�sc���w�w�|�|�C��w�7�� ���>�W�>�q�b�g�g�m�m�TU�FV��>��W����E���E�{���Xs�$A8�A8c��ttjj|d|��}|j	|j
�S)zM
        Exclude any file anywhere in 'dir/' that match the pattern.
        r�r8r!r"r�r�r)rBr�r�rs    r7r�zFileList.recursive_exclude�s4��"�"�'�'�,�,�s�D�'�"B�C���!�!�%�+�+�.�.r9c���t|�D��cgc](}tjj|�D]}|���*}}}|j	|�t|�Scc}}w)zInclude all files from 'dir/'.)rr�r��findallr�rd)rBr��	match_dir�itemr�s     r7r�zFileList.graft�sc��"�#�Y�
�&�	�!�*�*�2�2�9�=��
�=�
�&�	�
�
	
���E���E�{���

s�-Ac��ttjj|d��}|j	|j
�S)zFilter out files from 'dir/'.rr)rBr�rs   r7r�zFileList.prune�s0��!�"�'�'�,�,�s�D�"9�:���!�!�%�+�+�.�.r9c�$�|j�|j�ttjjd|��}|jD�cgc]}|j
|�s�|��}}|j|�t|�Scc}w)z�
        Include all files anywhere in the current directory that match the
        pattern. This is very inefficient on large file trees.
        r)	�allfilesr	r8r!r"r�rr�rd)rBr�rr�r�s     r7r�zFileList.global_include�sm��
�=�=� ��L�L�N�!�"�'�'�,�,�t�W�"=�>�� �M�M�<�M�q�U�[�[��^��M��<����E���E�{���=s�B
�+B
c��ttjjd|��}|j	|j
�S)zD
        Exclude all files anywhere that match the pattern.
        rrrs   r7r�zFileList.global_exclude�s2��"�"�'�'�,�,�t�W�"=�>���!�!�%�+�+�.�.r9c��|jd�r|dd}t|�}|j|�r|jj	|�yy)N�
r�)rQr�
_safe_pathr��append)rBrr"s   r7rzFileList.append�sF���=�=������9�D��D�!���?�?�4� ��J�J���d�#�!r9c�b�|jjt|j|��yr=)r�r��filterr)rB�pathss  r7r�zFileList.extend�s���
�
���&����%�8�9r9c�`�tt|j|j��|_y)z�
        Replace self.files with only safe paths

        Because some owners of FileList manipulate the underlying
        ``files`` attribute directly, this method must be called to
        repair those paths.
        N)�listrrr�rAs r7�_repairzFileList._repair�s���&����$�*�*�=�>��
r9c���d}tj|�}|�tjd|z�ytj|d�}|�tj||d�y	d|vxsd|v}|j
r|rytjj|�stjj|�ryy#t$r,tj||tj��YywxYw)Nz!'%s' not %s encodable -- skippingz''%s' in unexpected encoding -- skippingFr�r�s	.egg-infoT)�
unicode_utils�filesys_decoderr��
try_encoder�r!r"r��UnicodeEncodeError�sys�getfilesystemencoding)rBr"�enc_warn�u_path�	utf8_path�is_egg_infos      r7rzFileList._safe_path�s���6���-�-�d�3���>��H�H�>��E�F��"�,�,�V�W�=�	����H�H�X�t�W�-��
	B�%��/�L�<�9�3L�K��'�'�K���w�w�~�~�f�%������	�)B��*C��"�	B��H�H�X�t�S�%>�%>�%@�A�	B�s�$B=�=>B=�=2C2�1C2)NNF)r_r`rar�r�r�r�r�r�r�r�r�r�r�rr�rr�
__classcell__)r�s@r7rrMsQ���7�E=�N��/�
�/��/�

�/�$�:�?�Br9rc�b�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	e
d��Zd	�Zd
�Z
d�Zd�Zd
�Zy)r�zMANIFEST.inc�J�d|_d|_d|_d|_d|_y)NrF)�use_defaultsr��
manifest_only�force_manifestr�rAs r7rsz!manifest_maker.initialize_optionss)�������
�������#(�� r9c��yr=rerAs r7r�zmanifest_maker.finalize_options s��r9c�&�t|j��|_tjj|j�s|j�|j�tjj|j�r|j�|j�|j�|j�|jj�|jj�|j�y)N)r�)rr�r�r!r"r�r��write_manifest�add_defaults�template�
read_template�add_license_files�_add_referenced_files�prune_file_list�sort�remove_duplicatesrAs r7r�zmanifest_maker.run#s��� �T�5M�5M�N��
��w�w�~�~�d�m�m�,����!�����
�7�7�>�>�$�-�-�(���� ���� ��"�"�$������
�
�����
�
�'�'�)����r9c�l�tj|�}|jtjd�S)N�/)rrrXr!r#)rBr"s  r7�_manifest_normalizez"manifest_maker._manifest_normalize1s'���+�+�D�1���|�|�B�F�F�C�(�(r9c�
�|jj�|jjD�cgc]}|j|���}}d|jz}|jt|j|f|�ycc}w)zo
        Write the file list in 'self.filelist' to the manifest file
        named by 'self.manifest'.
        zwriting manifest file '%s'N)r�rr�r8r��executer�)rBr�r�r�s    r7r-zmanifest_maker.write_manifest5sn��
	
�
�
����7;�m�m�6I�6I�J�6I���)�)�!�,�6I��J�*�T�]�]�:�����Z�$�-�-��!7��=��Ks�Bc�T�|j|�stj||�yyr=)�_should_suppress_warningrr�)rBr�s  r7r�zmanifest_maker.warnAs#���,�,�S�1��J�J�t�S�!�2r9c�.�tjd|�S)z;
        suppress missing-file warnings from sdist
        zstandard file .*not found)r$r)r�s r7r<z'manifest_maker._should_suppress_warningEs��
�x�x�4�c�:�:r9c�v�tj|�|jj|j�|jj|j
�t
t��}|r|jj|�n9tjj|j
�r|j�tjjd�r|jjd�|jd�}|jj|j�y)Nzsetup.pyrg)rr.r�rr/r�rrr�r!r"r��
read_manifest�get_finalized_commandr�rg)rB�rcfiles�ei_cmds   r7r.zmanifest_maker.add_defaultsLs���
���4� ��
�
���T�]�]�+��
�
���T�]�]�+��|�~�&����M�M� � ��)�
�W�W�^�^�D�M�M�
*���� �
�7�7�>�>�*�%�
�M�M� � ��,��+�+�J�7���
�
���F�O�O�,r9c��|jjjxsg}|D]}tjd|��|j
j
|�y)Nzadding license file '%s')r?r�
license_filesrr�r�r�)rBrD�lfs   r7r1z manifest_maker.add_license_files^sI���)�)�2�2�@�@�F�B�
��B��H�H�/��4� ��
�
���]�+r9c��t|jdg�}|D]}tjd|��|jj|�y)zGAdd files referenced by the config (e.g. `file:` directive) to filelist�_referenced_filesz%adding file referenced by config '%s'N)r�r?r�debugr�r�)rB�
referenced�rfs   r7r2z$manifest_maker._add_referenced_filesdsB���T�.�.�0C�R�H�
��B��I�I�=�r�B���
�
���Z�(r9c�l�|jd�}|jj�}|jj	|j
�|jj	|�t
jtj�}|jjd|zdz|zd��y)N�buildz(^|z)(RCS|CVS|\.svn)r)�is_regex)r@r?�get_fullnamer�r��
build_baser$r%r!r#�exclude_pattern)rBrL�base_dirr#s    r7r3zmanifest_maker.prune_file_listls����*�*�7�3���$�$�1�1�3���
�
���E�,�,�-��
�
���H�%��i�i�������
�
�%�%��S�L�.�.��4�q�	&�	
r9c��t|d�r|j�Stjddd��|j	�S)a0
        The parent class implementation of this method
        (``sdist``) will try to include data files, which
        might cause recursion problems when
        ``include_package_data=True``.

        Therefore, avoid triggering any attempt of
        analyzing/building the manifest again.
        �get_data_files_without_manifestz@`build_py` command does not inherit from setuptools' `build_py`.z�
            Custom 'build_py' does not implement 'get_data_files_without_manifest'.
            Please extend command classes from setuptools instead of distutils.
            z!https://peps.python.org/pep-0632/)�see_url)�hasattrrSr�emit�get_data_files)rB�build_pys  r7�_safe_data_fileszmanifest_maker._safe_data_filesvsJ���8�>�?��;�;�=�=�$�)�)�N�
�8�
	
��&�&�(�(r9N)r_r`rar/rsr�r�r8r-r��staticmethodr<r.r1r2r3rYrer9r7r�r�sR���H�)�
��)�
>�"��;��;�-�$,�)�
�)r9r�c��dj|�}|jd�}t|d�5}|j|�ddd�y#1swYyxYw)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �
r�r�N)r�r�r�r�)r}�contentsr�s   r7r�r��sF���y�y��"�H����w�'�H�	
�h��	��	�����
�	�	�s�A
�
Ac���tjd|�|js�|jj}|j
|jc|_}|j|jc|_}	|j|j�||c|_|_t|jdd�}tj|j|�yy#||c|_|_wxYw)Nz
writing %s�zip_safe)rr�r�r?rrqrNrprC�write_pkg_inforgr�r�write_safety_flag)�cmd�basenamer}r�oldver�oldname�safes       r7r`r`�s����H�H�\�8�$��;�;��#�#�,�,��#&�?�?�H�4D�4D� ���&�!$���x�}�}���
�w�	>�
$�H�#�#�C�L�L�1�.5�v�+�H�M�8�+��s�'�'��T�:���#�#�C�L�L�$�7���/6�v�+�H�M�8�+�s�6C�C+c��y)aj
    Unused: left to avoid errors when updating (from source) from <= 67.8.
    Old installations have a .dist-info directory with the entry-point
    ``depends.txt = setuptools.command.egg_info:warn_depends_obsolete``.
    This may trigger errors when running the first egg_info in build_meta.
    TODO: Remove this function in a version sufficiently > 68.
    Nre�rbrcr}s   r7�warn_depends_obsoleteri�s�r9c	��tj|jj�D�cgc]}|j	dd�d��c}�}|jd|dj
t|��dz�ycc}w)NrVrrztop-level namesr\)r|�fromkeysr?�iter_distribution_namesr r�r��sorted)rbrcr}�k�pkgss     r7�write_toplevel_namesrp�sm���=�=�%(�%5�%5�%M�%M�%O�P�%O������a���	�%O�P��D��N�N�$�h��	�	�&��,�0G�$�0N�O��	Qs�A>c� �t|||d�y)NT)�	write_argrhs   r7�
overwrite_argrs�s��
�c�8�X�t�,r9c���tjj|�d}t|j|d�}|�dj|�dz}|j
||||�y)Nrr\)r!r"�splitextr�r?r�r�)rbrcr}r��argnamerxs      r7rrrr�s\���g�g���x�(��+�G��C�$�$�g�t�4�E����	�	�%� �4�'�����W�h��u�=r9c��tj|jj�}tj|�}|jd||d�y)Nzentry pointsT)r	r�r?r��renderr�)rbrcr}�eps�defns     r7�
write_entriesr{�sB��
�
�
�S�-�-�:�:�
;�C�����$�D����^�X�t�T�Br9c��tj|�}tj|�}|�d|�d|xst��}|r|d|��z
}|S)r�r�z-py)r
r�r�)rprqr�r�rCrN�eggs       r7r�r��sV���,�,�X�6�D��/�/��<�G�
�F�!�G�9�C�
� 6�h�7�
8�C����8�*�~����Jr9c��eZdZdZy)�EggInfoDeprecationWarningz?Deprecated behavior warning for EggInfo, bypassing suppression.N)r_r`ra�__doc__rer9r7rr�s��Ir9rr�)NN)9r��distutils.filelistr�	_FileList�distutils.errorsr�distutils.utilrr�rr�r!r$rr\rz�
_importlibrrr	r
r�
setuptoolsr
�setuptools.command.sdistrr�setuptools.command.setoptr�setuptools.commandr�setuptools.unicode_utilsr�setuptools.globr�setuptools.externr�warningsrr��version_infor�r8r;rgr�r�r`ri�write_requirements�write_setup_requirementsrprsrrr{r�rrer9r7�<module>r�s��<�5�3�'�����	�	�
���!�,���*�1�1�(�0� �'�3��7�>�>�3�+�+�,��P;�f,�,�^c$�z�7�c$�LFB�y�FB�Rv)�U�v)�r
�8�&�"�4�4��'�@�@��P�-�>�C��J� <�Jr9python3.12/site-packages/setuptools/command/__pycache__/build_py.cpython-312.pyc000064400000053117151732703510023505 0ustar00�

��_i;���ddlmZddlmZddlmZddlmcmZddl	Z	ddl
Z
ddlZddlZ
ddlZddlZddlmZddlmZmZmZmZmZmZddlmZdd	lmZd
Zd�ZGd�d
ej�Zd�ZGd�d�Z y)�)�partial)�glob)�convert_pathN)�Path)�Dict�Iterable�Iterator�List�Optional�Tuple�)�unique_everseen)�SetuptoolsDeprecationWarning)z*.pyizpy.typedc��tj|tj|�jtjz�y�N)�os�chmod�stat�st_mode�S_IWRITE)�targets ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/build_py.py�
make_writablers'���H�H�V�R�W�W�V�_�,�,�t�}�}�<�=�c�>��eZdZUdZdZeed<dZee	ed<d�Z
	d�fd�	Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd dee	f�fd�
Zdee	e	ffd�Zdeee	e	ffd�Zdeee	e	ffd�Zd�Zd�Zdee	de	dee	fd�Zd�Zd�Z d�Z!d�Z"d�Z#e$gfd��Z%�xZ&S)!�build_pyaXEnhanced 'build_py' command that includes data files with packages

    The data files are specified via a 'package_data' argument to 'setup()'.
    See 'setuptools.dist.Distribution' for more details.

    Also, this version of the 'build_py' command allows you to specify both
    'py_modules' and 'packages' in the same setup operation.
    F�
editable_modeN�existing_egg_info_dirc��tjj|�|jj|_|jj
xsi|_d|jvr
|jd=g|_y)N�
data_files)�origr�finalize_options�distribution�package_data�exclude_package_data�__dict__�_build_py__updated_files��selfs rr"zbuild_py.finalize_options&sa���
�
�&�&�t�,� �-�-�:�:���$(�$5�$5�$J�$J�$P�b��!��4�=�=�(��
�
�l�+�!��rc���|rDtt|�j��}tt|�j��}t�|�||||||�Sr)�strr�resolve�super�	copy_file)r)�infile�outfile�
preserve_mode�preserve_times�link�level�	__class__s       �rr.zbuild_py.copy_file.sU������f��-�-�/�0�F��$�w�-�/�/�1�2�G��w� ��G�]�N�D�%�
�	
rc�>�|js|jr|jry|jr|j�|jr |j	�|j�|j
tjj|d���y)z?Build modules, packages, and copy data files to build directoryNr)�include_bytecode)
�
py_modules�packagesr�
build_modules�build_packages�build_package_data�byte_compiler!r�get_outputsr(s r�runzbuild_py.run9sp�����4�=�=�T�5G�5G���?�?���� ��=�=����!��#�#�%�	
���$�-�-�3�3�D�1�3�M�Nrc��|dk(r!|j�|_|jStjj	||�S)zlazily compute data filesr )�_get_data_filesr r!r�__getattr__)r)�attrs  rrBzbuild_py.__getattr__Is;���<��"�2�2�4�D�O��?�?�"��}�}�(�(��t�4�4rc��tjj||||�\}}|r|jj	|�||fSr)r!r�build_moduler'�append)r)�module�module_file�packager0�copieds      rrEzbuild_py.build_modulePsB���-�-�4�4�T�6�;�PW�X������ � �'�'��0����rc�|�|j�tt|j|jxsd��S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�)�analyze_manifest�list�map�_get_pkg_data_filesr9r(s rrAzbuild_py._get_data_filesVs/�������C��0�0�$�-�-�2E�2�F�G�Grc��|jjdi�tt|j|j
xsd��S)z�
        Generate list of ``(package,src_dir,build_dir,filenames)`` tuples,
        but without triggering any attempt to analyze or build the manifest.
        �manifest_filesrL)r&�
setdefaultrNrOrPr9r(s r�get_data_files_without_manifestz(build_py.get_data_files_without_manifest[s:��	
�
�
� � �!1�2�6��C��0�0�$�-�-�2E�2�F�G�Grc�&�|j|�}tjj|jg|jd�z�}|j
||�D�cgc]"}tjj||���$}}||||fScc}w�N�.)�get_package_dirr�path�join�	build_lib�split�find_data_files�relpath)r)rI�src_dir�	build_dir�file�	filenamess      rrPzbuild_py._get_pkg_data_fileses����&�&�w�/���G�G�L�L�D�N�N�#3�g�m�m�C�6H�#H�J�	�
�,�,�W�g�>�
�>��
�G�G�O�O�D�'�*�>�	�
����I�5�5��	
s�'Bc��|j|j||t��}tt	t
d��|�}tjj|�}ttjj|�}t
j|jj|g�|�}|j|||�S)z6Return filenames for package's data files in 'src_dir')�extra_patternsT)�	recursive)�_get_platform_patternsr$�_IMPLICIT_DATA_FILESrOrr�	itertools�chain�
from_iterable�filterrrY�isfilerR�get�exclude_data_files)r)rIr_�patterns�globs_expanded�
globs_matches�
glob_files�filess        rr]zbuild_py.find_data_filesss����.�.������/�	/�
���W�T�T�:�H�E��!���5�5�n�E�
��B�G�G�N�N�M�:�
�������#�#�G�R�0��
���&�&�w���?�?r�returnc���|jr't|j�j��St�|�|�S)�1See :class:`setuptools.commands.build.SubCommand`)rrN�get_output_mapping�keysr-r>)r)r7r5s  �rr>zbuild_py.get_outputs�s:��������/�/�1�6�6�8�9�9��w�"�#3�4�4rc��tj|j�|j��}t	t|d����S)rvc��|dS)NrrL)�xs r�<lambda>z-build_py.get_output_mapping.<locals>.<lambda>�s��!�A�$r)�key)rhri� _get_package_data_output_mapping�_get_module_mapping�dict�sorted)r)�mappings  rrwzbuild_py.get_output_mapping�s<���/�/��1�1�3��$�$�&�
���F�7��7�8�8rc#�K�|j�D]:\}}}|jd�}|j|j||�}||f���<y�w)z5Iterate over all modules producing (dest, src) pairs.rWN)�find_all_modulesr\�get_module_outfiler[)r)rIrGrH�filenames     rrzbuild_py._get_module_mapping�sR����,0�,A�,A�,C�(�G�V�[��m�m�C�(�G��.�.�t�~�~�w��O�H��[�)�)�-D�s�AAc#��K�|jD]T\}}}}|D]H}tjj||�}tjj||�}||f���J�Vy�w)z6Iterate over package data producing (dest, src) pairs.N)r rrYrZ)r)rIr_r`rbr�r�srcfiles        rr~z)build_py._get_package_data_output_mapping�s[����6:�o�o�2�G�W�i��%�������i��:���'�'�,�,�w��9���w�'�'�&�7F�s�A%A'c���|j�D]S\}}|jtjj	|��|j||�\}}t
|��Uy)z$Copy data files into build directoryN)r~�mkpathrrY�dirnamer.r)r)rr��_outf�_copieds     rr<zbuild_py.build_package_data�sO��#�D�D�F�O�F�G��K�K�������/�0�!�^�^�G�V�<�N�E�7��&�!� Grc�.�ix|_}|jjsyi}|jxsdD]}||t	|j|��<�!t
|dd�r]t|jd�j�r9|j}t|d�}|jd��j�}nD|jd�|jd�}|j}|jj }t#�}|j%||�D]�}	t&j(j+t	|	��\}
}d}|}
|
rY|
|k7rT|
|vrP|
}t&j(j+|
�\}
}t&j(j-||�}|
r
|
|k7r|
|vr�P|
|vs��||
k(r|j/|�r)��|j1||
|�}|r|j3|�|j5||
g�j7|	���y)NrLrzSOURCES.txtzutf-8)�encoding�egg_info)rRr#�include_package_datar9�assert_relativerX�getattrrr�exists�	read_text�
splitlines�run_command�get_finalized_commandr��filelistrs�_IncludePackageDataAbuse�_filter_build_filesrrYr\rZ�	is_module�importable_subpackage�warnrSrF)r)�mf�src_dirsrI�egg_info_dir�manifestrs�ei_cmd�checkrY�d�f�prev�oldf�df�
importables                rrMzbuild_py.analyze_manifest�s���#%�%���b�� � �5�5�����}�}�*��*�G�GN�H�_�T�%9�%9�'�%B�C�D�+�

�D�1�4�8��T�/�/��?�F�F�H��5�5�L��L�-�8�H��&�&��&�8�C�C�E�E����Z�(��/�/�
�;�F�!�?�?�L��O�O�)�)�E�(�*���,�,�U�L�A�D��7�7�=�=���!6�7�D�A�q��D��D���T�	�a�x�&7������
�
�a�(���2��G�G�L�L��Q�'����T�	�a�x�&7��H�}���9����q�)� �!&�!<�!<�X�a�[�!�!L�J�!��
�
�:�.��
�
�h�q�k�2�.�5�5�d�;�!Brrsr�c#��K�|jd�}||j|j|jf}|D�cgc]$}|s�tj
j
|���&}}|D]Y}tj
j
|��tj
j|�rt�fd�|D��s�V|���[ycc}w�w)a}
        ``build_meta`` may try to create egg_info outside of the project directory,
        and this can be problematic for certain plugins (reported in issue #3500).

        Extensions might also include between their sources files created on the
        ``build_lib`` and ``build_temp`` directories.

        This function should filter this case of invalid files out.
        �buildc3�&�K�|]}|�v���
y�wrrL)�.0r��	norm_paths  �r�	<genexpr>z/build_py._filter_build_files.<locals>.<genexpr>�s�����-T�)�Q�a�y�.@�)�s�N)	r�r[�
build_temp�
build_baserrY�normpath�isabs�all)	r)rsr�r��
build_dirs�p�	norm_dirsrar�s	        @rr�zbuild_py._filter_build_files�s�������*�*�7�3�������0@�0@�%�BR�BR�S�
�2<�B�*�Q��R�W�W�%�%�a�(�*�	�B��D����(�(��.�I��7�7�=�=��&�#�-T�)�-T�*T��
���C�s�:C�C�!C�&AC�Cc��yrrLr(s r�get_data_fileszbuild_py.get_data_files�s��rc��	|j|S#t$rYnwxYwtjj	|||�}||j|<|r|j
js|S|j
jD]}||k(s|j|dz�s�n|St|d�5}|j�}ddd�n#1swYnxYwdvr#tjjd|�d���|S)z8Check namespace packages' __init__ for declare_namespacerW�rbNsdeclare_namespacezNamespace package problem: z� is a namespace package, but its
__init__.py does not call declare_namespace()! Please fix it.
(See the setuptools manual under "Namespace Packages" for details.)
")
�packages_checked�KeyErrorr!r�
check_packager#�namespace_packages�
startswith�open�read�	distutils�errors�DistutilsError)r)rI�package_dir�init_py�pkgr��contentss       rr�zbuild_py.check_package�s���	��(�(��1�1���	��	���-�-�-�-�d�G�[�I��)0����g�&��d�/�/�B�B��N��$�$�7�7�C��g�~�����#�
�!>��8��N�
�'�4�
 �A��v�v�x�H�!�
 �
 ���x�/��"�"�1�1�<C�E��
��s��	��.C�Cc�l�i|_tjj|�d|_d|_y)NF)r�r!r�initialize_optionsrrr(s rr�zbuild_py.initialize_optionss,�� "����
�
�(�(��.�"���%)��"rc���tjj||�}|jj�4t
jj|jj|�S|Sr)r!rrXr#�src_rootrrYrZ)r)rI�ress   rrXzbuild_py.get_package_dirsP���m�m�+�+�D�'�:�����%�%�1��7�7�<�<�� 1� 1� :� :�C�@�@��
rc����t���|j|j||�}�fd�|D�}tjj|�}t
|���fd��D�}tt|��S)z6Filter filenames for package's data files in 'src_dir'c3�J�K�|]}tj�|����y�wr)�fnmatchrk)r��patternrss  �rr�z.build_py.exclude_data_files.<locals>.<genexpr>s�����O�h�7����u�g�6�h�s� #c3�,�K�|]}|�vs�|���
y�wrrL)r��fn�bads  �rr�z.build_py.exclude_data_files.<locals>.<genexpr>s�����7��"��3��2��s�	�)rNrfr%rhrirj�setr)	r)rIr_rsro�match_groups�matches�keepersr�s	   `    @rrnzbuild_py.exclude_data_filesso����U����.�.��%�%���
��
P�h�O���/�/�/�/��=���'�l��7��7���O�G�,�-�-rc���tj||jdg�|j|g��}�fd�|D�S)z�
        yield platform-specific path patterns (suitable for glob
        or fn_match) from a glob-based spec (such as
        self.package_data or self.exclude_package_data)
        matching package in src_dir.
        �c3�p�K�|]-}tjj�t|�����/y�wr)rrYrZr)r�r�r_s  �rr�z2build_py._get_platform_patterns.<locals>.<genexpr>/s/�����
�(��
�G�G�L�L��,�w�"7�8�'�s�36)rhrirm)�specrIr_rd�raw_patternss  `  rrfzbuild_py._get_platform_patterns"sF���!�����H�H�R����H�H�W�b�!�
��

�(�
�	
r)�r�Nr�)r�)'�__name__�
__module__�__qualname__�__doc__r�bool�__annotations__rrr+r"r.r?rBrErArTrPr]r
r>rrwr	rrr~r<rMrr�r�r�r�rXrn�staticmethodrf�
__classcell__)r5s@rrrs���� �M�4��+/��8�C�=�/�"�TU�	
�O� 5��H�
H�6�@�$5��c��5�9�D��c��N�9�*�X�e�C��H�o�%>�*�(�(�5��c��?�2K�(�"�'<�R��#���#��(�SV�-��&
��<*��.� �FH�
��
rrc��tjj|�s|Sddlm}tjd�j�|z}||��)Nr)�DistutilsSetupErrorz�
        Error: setup script specifies an absolute path:

            %s

        setup() arguments must *always* be /-separated paths relative to the
        setup.py directory, *never* absolute paths.
        )rrYr��distutils.errorsr��textwrap�dedent�lstrip)rYr��msgs   rr�r�6sP��
�7�7�=�=�����4�	���
�		
��&�(�
�
	���c�
"�"rc�>�eZdZdZGd�de�Zd�Zd�Zd�Zd�Z	y)	r�z>Inform users that package or module is included as 'data file'c��eZdZdZdZy)�!_IncludePackageDataAbuse._WarningzU
        Package {importable!r} is absent from the `packages` configuration.
        a|
        ############################
        # Package would be ignored #
        ############################
        Python recognizes {importable!r} as an importable package[^1],
        but it is absent from setuptools' `packages` configuration.

        This leads to an ambiguous overall configuration. If you want to distribute this
        package, please make sure that {importable!r} is explicitly added
        to the `packages` configuration field.

        Alternatively, you can also rely on setuptools' discovery methods
        (for example by using `find_namespace_packages(...)`/`find_namespace:`
        instead of `find_packages(...)`/`find:`).

        You can read more about "package discovery" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

        If you don't want {importable!r} to be distributed and are
        already explicitly excluding {importable!r} via
        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
        you can try to use `exclude_package_data`, or `include-package-data=False` in
        combination with a more fine grained `package-data` configuration.

        You can read more about "package data files" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


        [^1]: For Python, any directory (with suitable naming) can be imported,
              even if it does not contain any `.py` files.
              On the other hand, currently there is no concept of package data
              directory, all directories are treated like packages.
        N)r�r�r��_SUMMARY�_DETAILSrLrr�_Warningr�Ns����"�rr�c�"�t�|_yr)r��_already_warnedr(s r�__init__z!_IncludePackageDataAbuse.__init__ys��"�u��rc�b�|jd�xr|dtd�j�S)Nz.py)�endswith�len�isidentifier)r)ras  rr�z"_IncludePackageDataAbuse.is_module|s,���}�}�U�#�J��]��E�
�{�(;�(H�(H�(J�Jrc���t|�j}ttjt
j|j��}|rdj|g|��SyrV)	r�parentrNrh�	takewhiler+r��partsrZ)r)r�rar�rs     rr�z._IncludePackageDataAbuse.importable_subpackagesO���4�j�����Y�(�(��)9�)9�3�9�9�E�F����8�8�V�,�e�,�-�-�rc��||jvr8|jj|��|jj|�yy)N)r�)r�r��emit�add)r)r�s  rr�z_IncludePackageDataAbuse.warn�s>���T�1�1�1��M�M���*��5�� � �$�$�Z�0�2rN)
r�r�r�r�rr�r�r�r�r�rLrrr�r�Ks(��H�'�/�'�V%�K��1rr�)!�	functoolsrr�distutils.utilr�distutils.command.build_py�commandrr!rr�r�r�r�rhr�pathlibr�typingrrr	r
rr�extern.more_itertoolsr�warningsrrgrr�r�rLrr�<module>rsd����'�)�)�	�������B�B�3�3�-��>�Z
�t�}�}�Z
�z#�*>1�>1rpython3.12/site-packages/setuptools/command/bdist_rpm.py000064400000002435151732703510017315 0ustar00import distutils.command.bdist_rpm as orig

from ..warnings import SetuptoolsDeprecationWarning


class bdist_rpm(orig.bdist_rpm):
    """
    Override the default bdist_rpm behavior to do the following:

    1. Run egg_info to ensure the name and version are properly calculated.
    2. Always run 'install' using --single-version-externally-managed to
       disable eggs in RPM distributions.
    """

    def run(self):
        SetuptoolsDeprecationWarning.emit(
            "Deprecated command",
            """
            bdist_rpm is deprecated and will be removed in a future version.
            Use bdist_wheel (wheel packages) instead.
            """,
            see_url="https://github.com/pypa/setuptools/issues/1988",
            due_date=(2023, 10, 30),  # Deprecation introduced in 22 Oct 2021.
        )

        # ensure distro name is up-to-date
        self.run_command('egg_info')

        orig.bdist_rpm.run(self)

    def _make_spec_file(self):
        spec = orig.bdist_rpm._make_spec_file(self)
        spec = [
            line.replace(
                "setup.py install ",
                "setup.py install --single-version-externally-managed ",
            ).replace("%setup", "%setup -n %{name}-%{unmangled_version}")
            for line in spec
        ]
        return spec
python3.12/site-packages/setuptools/command/dist_info.py000064400000006750151732703510017314 0ustar00"""
Create a dist_info directory
As defined in the wheel specification
"""

import os
import shutil
import sys
from contextlib import contextmanager
from distutils import log
from distutils.core import Command
from pathlib import Path

from .. import _normalization


class dist_info(Command):
    """
    This command is private and reserved for internal use of setuptools,
    users should rely on ``setuptools.build_meta`` APIs.
    """

    description = "DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"

    user_options = [
        (
            'output-dir=',
            'o',
            "directory inside of which the .dist-info will be"
            "created (default: top of the source tree)",
        ),
        ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"),
        ('tag-build=', 'b', "Specify explicit tag to add to version number"),
        ('no-date', 'D', "Don't include date stamp [default]"),
        ('keep-egg-info', None, "*TRANSITIONAL* will be removed in the future"),
    ]

    boolean_options = ['tag-date', 'keep-egg-info']
    negative_opt = {'no-date': 'tag-date'}

    def initialize_options(self):
        self.output_dir = None
        self.name = None
        self.dist_info_dir = None
        self.tag_date = None
        self.tag_build = None
        self.keep_egg_info = False

    def finalize_options(self):
        dist = self.distribution
        project_dir = dist.src_root or os.curdir
        self.output_dir = Path(self.output_dir or project_dir)

        egg_info = self.reinitialize_command("egg_info")
        egg_info.egg_base = str(self.output_dir)

        if self.tag_date:
            egg_info.tag_date = self.tag_date
        else:
            self.tag_date = egg_info.tag_date

        if self.tag_build:
            egg_info.tag_build = self.tag_build
        else:
            self.tag_build = egg_info.tag_build

        egg_info.finalize_options()
        self.egg_info = egg_info

        name = _normalization.safer_name(dist.get_name())
        version = _normalization.safer_best_effort_version(dist.get_version())
        self.name = f"{name}-{version}"
        self.dist_info_dir = os.path.join(self.output_dir, f"{self.name}.dist-info")

    @contextmanager
    def _maybe_bkp_dir(self, dir_path: str, requires_bkp: bool):
        if requires_bkp:
            bkp_name = f"{dir_path}.__bkp__"
            _rm(bkp_name, ignore_errors=True)
            _copy(dir_path, bkp_name, dirs_exist_ok=True, symlinks=True)
            try:
                yield
            finally:
                _rm(dir_path, ignore_errors=True)
                shutil.move(bkp_name, dir_path)
        else:
            yield

    def run(self):
        self.output_dir.mkdir(parents=True, exist_ok=True)
        self.egg_info.run()
        egg_info_dir = self.egg_info.egg_info
        assert os.path.isdir(egg_info_dir), ".egg-info dir should have been created"

        log.info("creating '{}'".format(os.path.abspath(self.dist_info_dir)))
        bdist_wheel = self.get_finalized_command('bdist_wheel')

        # TODO: if bdist_wheel if merged into setuptools, just add "keep_egg_info" there
        with self._maybe_bkp_dir(egg_info_dir, self.keep_egg_info):
            bdist_wheel.egg2dist(egg_info_dir, self.dist_info_dir)


def _rm(dir_name, **opts):
    if os.path.isdir(dir_name):
        shutil.rmtree(dir_name, **opts)


def _copy(src, dst, **opts):
    if sys.version_info < (3, 8):
        opts.pop("dirs_exist_ok", None)
    shutil.copytree(src, dst, **opts)
python3.12/site-packages/setuptools/command/test.py000064400000017645151732703510016322 0ustar00import os
import operator
import sys
import contextlib
import itertools
import unittest
from distutils.errors import DistutilsError, DistutilsOptionError
from distutils import log
from unittest import TestLoader

from pkg_resources import (
    resource_listdir,
    resource_exists,
    normalize_path,
    working_set,
    evaluate_marker,
    add_activation_listener,
    require,
)
from .._importlib import metadata
from setuptools import Command
from setuptools.extern.more_itertools import unique_everseen
from setuptools.extern.jaraco.functools import pass_none


class ScanningLoader(TestLoader):
    def __init__(self):
        TestLoader.__init__(self)
        self._visited = set()

    def loadTestsFromModule(self, module, pattern=None):
        """Return a suite of all tests cases contained in the given module

        If the module is a package, load tests from all the modules in it.
        If the module has an ``additional_tests`` function, call it and add
        the return value to the tests.
        """
        if module in self._visited:
            return None
        self._visited.add(module)

        tests = []
        tests.append(TestLoader.loadTestsFromModule(self, module))

        if hasattr(module, "additional_tests"):
            tests.append(module.additional_tests())

        if hasattr(module, '__path__'):
            for file in resource_listdir(module.__name__, ''):
                if file.endswith('.py') and file != '__init__.py':
                    submodule = module.__name__ + '.' + file[:-3]
                else:
                    if resource_exists(module.__name__, file + '/__init__.py'):
                        submodule = module.__name__ + '.' + file
                    else:
                        continue
                tests.append(self.loadTestsFromName(submodule))

        if len(tests) != 1:
            return self.suiteClass(tests)
        else:
            return tests[0]  # don't create a nested suite for only one return


# adapted from jaraco.classes.properties:NonDataProperty
class NonDataProperty:
    def __init__(self, fget):
        self.fget = fget

    def __get__(self, obj, objtype=None):
        if obj is None:
            return self
        return self.fget(obj)


class test(Command):
    """Command to run unit tests after in-place build"""

    description = "run unit tests after in-place build (deprecated)"

    user_options = [
        ('test-module=', 'm', "Run 'test_suite' in specified module"),
        (
            'test-suite=',
            's',
            "Run single test, case or suite (e.g. 'module.test_suite')",
        ),
        ('test-runner=', 'r', "Test runner to use"),
    ]

    def initialize_options(self):
        self.test_suite = None
        self.test_module = None
        self.test_loader = None
        self.test_runner = None

    def finalize_options(self):
        if self.test_suite and self.test_module:
            msg = "You may specify a module or a suite, but not both"
            raise DistutilsOptionError(msg)

        if self.test_suite is None:
            if self.test_module is None:
                self.test_suite = self.distribution.test_suite
            else:
                self.test_suite = self.test_module + ".test_suite"

        if self.test_loader is None:
            self.test_loader = getattr(self.distribution, 'test_loader', None)
        if self.test_loader is None:
            self.test_loader = "setuptools.command.test:ScanningLoader"
        if self.test_runner is None:
            self.test_runner = getattr(self.distribution, 'test_runner', None)

    @NonDataProperty
    def test_args(self):
        return list(self._test_args())

    def _test_args(self):
        if not self.test_suite:
            yield 'discover'
        if self.verbose:
            yield '--verbose'
        if self.test_suite:
            yield self.test_suite

    def with_project_on_sys_path(self, func):
        """
        Backward compatibility for project_on_sys_path context.
        """
        with self.project_on_sys_path():
            func()

    @contextlib.contextmanager
    def project_on_sys_path(self, include_dists=[]):
        self.run_command('egg_info')

        # Build extensions in-place
        self.reinitialize_command('build_ext', inplace=1)
        self.run_command('build_ext')

        ei_cmd = self.get_finalized_command("egg_info")

        old_path = sys.path[:]
        old_modules = sys.modules.copy()

        try:
            project_path = normalize_path(ei_cmd.egg_base)
            sys.path.insert(0, project_path)
            working_set.__init__()
            add_activation_listener(lambda dist: dist.activate())
            require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version))
            with self.paths_on_pythonpath([project_path]):
                yield
        finally:
            sys.path[:] = old_path
            sys.modules.clear()
            sys.modules.update(old_modules)
            working_set.__init__()

    @staticmethod
    @contextlib.contextmanager
    def paths_on_pythonpath(paths):
        """
        Add the indicated paths to the head of the PYTHONPATH environment
        variable so that subprocesses will also see the packages at
        these paths.

        Do this in a context that restores the value on exit.
        """
        nothing = object()
        orig_pythonpath = os.environ.get('PYTHONPATH', nothing)
        current_pythonpath = os.environ.get('PYTHONPATH', '')
        try:
            prefix = os.pathsep.join(unique_everseen(paths))
            to_join = filter(None, [prefix, current_pythonpath])
            new_path = os.pathsep.join(to_join)
            if new_path:
                os.environ['PYTHONPATH'] = new_path
            yield
        finally:
            if orig_pythonpath is nothing:
                os.environ.pop('PYTHONPATH', None)
            else:
                os.environ['PYTHONPATH'] = orig_pythonpath

    @staticmethod
    def install_dists(dist):
        """
        Install the requirements indicated by self.distribution and
        return an iterable of the dists that were built.
        """
        ir_d = dist.fetch_build_eggs(dist.install_requires)
        tr_d = dist.fetch_build_eggs(dist.tests_require or [])
        er_d = dist.fetch_build_eggs(
            v
            for k, v in dist.extras_require.items()
            if k.startswith(':') and evaluate_marker(k[1:])
        )
        return itertools.chain(ir_d, tr_d, er_d)

    def run(self):
        self.announce(
            "WARNING: Testing via this command is deprecated and will be "
            "removed in a future version. Users looking for a generic test "
            "entry point independent of test runner are encouraged to use "
            "tox.",
            log.WARN,
        )

        installed_dists = self.install_dists(self.distribution)

        cmd = ' '.join(self._argv)
        if self.dry_run:
            self.announce('skipping "%s" (dry run)' % cmd)
            return

        self.announce('running "%s"' % cmd)

        paths = map(operator.attrgetter('location'), installed_dists)
        with self.paths_on_pythonpath(paths):
            with self.project_on_sys_path():
                self.run_tests()

    def run_tests(self):
        test = unittest.main(
            None,
            None,
            self._argv,
            testLoader=self._resolve_as_ep(self.test_loader),
            testRunner=self._resolve_as_ep(self.test_runner),
            exit=False,
        )
        if not test.result.wasSuccessful():
            msg = 'Test failed: %s' % test.result
            self.announce(msg, log.ERROR)
            raise DistutilsError(msg)

    @property
    def _argv(self):
        return ['unittest'] + self.test_args

    @staticmethod
    @pass_none
    def _resolve_as_ep(val):
        """
        Load the indicated attribute value, called, as a as if it were
        specified as an entry point.
        """
        return metadata.EntryPoint(value=val, name=None, group=None).load()()
python3.12/site-packages/setuptools/command/easy_install.py000064400000250656151732703510020033 0ustar00"""
Easy Install
------------

A tool for doing automatic download/extract/build of distutils-based Python
packages.  For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.

__ https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

"""

from glob import glob
from distutils.util import get_platform
from distutils.util import convert_path, subst_vars
from distutils.errors import (
    DistutilsArgError,
    DistutilsOptionError,
    DistutilsError,
    DistutilsPlatformError,
)
from distutils import log, dir_util
from distutils.command.build_scripts import first_line_re
from distutils.spawn import find_executable
from distutils.command import install
import sys
import os
import zipimport
import shutil
import tempfile
import zipfile
import re
import stat
import random
import textwrap
import warnings
import site
import struct
import contextlib
import subprocess
import shlex
import io
import configparser
import sysconfig


from sysconfig import get_path

from setuptools import Command
from setuptools.sandbox import run_setup
from setuptools.command import setopt
from setuptools.archive_util import unpack_archive
from setuptools.package_index import (
    PackageIndex,
    parse_requirement_arg,
    URL_SCHEME,
)
from setuptools.command import bdist_egg, egg_info
from setuptools.warnings import SetuptoolsDeprecationWarning, SetuptoolsWarning
from setuptools.wheel import Wheel
from pkg_resources import (
    normalize_path,
    resource_string,
    get_distribution,
    find_distributions,
    Environment,
    Requirement,
    Distribution,
    PathMetadata,
    EggMetadata,
    WorkingSet,
    DistributionNotFound,
    VersionConflict,
    DEVELOP_DIST,
)
import pkg_resources
from .. import py312compat
from .._path import ensure_directory
from ..extern.jaraco.text import yield_lines


# Turn on PEP440Warnings
warnings.filterwarnings("default", category=pkg_resources.PEP440Warning)

__all__ = [
    'easy_install',
    'PthDistributions',
    'extract_wininst_cfg',
    'get_exe_prefixes',
]


def is_64bit():
    return struct.calcsize("P") == 8


def _to_bytes(s):
    return s.encode('utf8')


def isascii(s):
    try:
        s.encode('ascii')
        return True
    except UnicodeError:
        return False


def _one_liner(text):
    return textwrap.dedent(text).strip().replace('\n', '; ')


class easy_install(Command):
    """Manage a download/build/install process"""

    description = "Find/get/install Python packages"
    command_consumes_arguments = True

    user_options = [
        ('prefix=', None, "installation prefix"),
        ("zip-ok", "z", "install package as a zipfile"),
        ("multi-version", "m", "make apps have to require() a version"),
        ("upgrade", "U", "force upgrade (searches PyPI for latest versions)"),
        ("install-dir=", "d", "install package to DIR"),
        ("script-dir=", "s", "install scripts to DIR"),
        ("exclude-scripts", "x", "Don't install scripts"),
        ("always-copy", "a", "Copy all needed packages to install dir"),
        ("index-url=", "i", "base URL of Python Package Index"),
        ("find-links=", "f", "additional URL(s) to search for packages"),
        ("build-directory=", "b", "download/extract/build in DIR; keep the results"),
        (
            'optimize=',
            'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
        ),
        ('record=', None, "filename in which to record list of installed files"),
        ('always-unzip', 'Z', "don't install as a zipfile, no matter what"),
        ('site-dirs=', 'S', "list of directories where .pth files work"),
        ('editable', 'e', "Install specified packages in editable form"),
        ('no-deps', 'N', "don't install dependencies"),
        ('allow-hosts=', 'H', "pattern(s) that hostnames must match"),
        ('local-snapshots-ok', 'l', "allow building eggs from local checkouts"),
        ('version', None, "print version information and exit"),
        (
            'no-find-links',
            None,
            "Don't load find-links defined in packages being installed",
        ),
        ('user', None, "install in user site-package '%s'" % site.USER_SITE),
    ]
    boolean_options = [
        'zip-ok',
        'multi-version',
        'exclude-scripts',
        'upgrade',
        'always-copy',
        'editable',
        'no-deps',
        'local-snapshots-ok',
        'version',
        'user',
    ]

    negative_opt = {'always-unzip': 'zip-ok'}
    create_index = PackageIndex

    def initialize_options(self):
        EasyInstallDeprecationWarning.emit()

        # the --user option seems to be an opt-in one,
        # so the default should be False.
        self.user = 0
        self.zip_ok = self.local_snapshots_ok = None
        self.install_dir = self.script_dir = self.exclude_scripts = None
        self.index_url = None
        self.find_links = None
        self.build_directory = None
        self.args = None
        self.optimize = self.record = None
        self.upgrade = self.always_copy = self.multi_version = None
        self.editable = self.no_deps = self.allow_hosts = None
        self.root = self.prefix = self.no_report = None
        self.version = None
        self.install_purelib = None  # for pure module distributions
        self.install_platlib = None  # non-pure (dists w/ extensions)
        self.install_headers = None  # for C/C++ headers
        self.install_lib = None  # set to either purelib or platlib
        self.install_scripts = None
        self.install_data = None
        self.install_base = None
        self.install_platbase = None
        self.install_userbase = site.USER_BASE
        self.install_usersite = site.USER_SITE
        self.no_find_links = None

        # Options not specifiable via command line
        self.package_index = None
        self.pth_file = self.always_copy_from = None
        self.site_dirs = None
        self.installed_projects = {}
        # Always read easy_install options, even if we are subclassed, or have
        # an independent instance created.  This ensures that defaults will
        # always come from the standard configuration file(s)' "easy_install"
        # section, even if this is a "develop" or "install" command, or some
        # other embedding.
        self._dry_run = None
        self.verbose = self.distribution.verbose
        self.distribution._set_command_options(
            self, self.distribution.get_option_dict('easy_install')
        )

    def delete_blockers(self, blockers):
        extant_blockers = (
            filename
            for filename in blockers
            if os.path.exists(filename) or os.path.islink(filename)
        )
        list(map(self._delete_path, extant_blockers))

    def _delete_path(self, path):
        log.info("Deleting %s", path)
        if self.dry_run:
            return

        is_tree = os.path.isdir(path) and not os.path.islink(path)
        remover = _rmtree if is_tree else os.unlink
        remover(path)

    @staticmethod
    def _render_version():
        """
        Render the Setuptools version and installation details, then exit.
        """
        ver = '{}.{}'.format(*sys.version_info)
        dist = get_distribution('setuptools')
        tmpl = 'setuptools {dist.version} from {dist.location} (Python {ver})'
        print(tmpl.format(**locals()))
        raise SystemExit()

    def finalize_options(self):  # noqa: C901  # is too complex (25)  # FIXME
        self.version and self._render_version()

        py_version = sys.version.split()[0]

        self.config_vars = dict(sysconfig.get_config_vars())

        self.config_vars.update(
            {
                'dist_name': self.distribution.get_name(),
                'dist_version': self.distribution.get_version(),
                'dist_fullname': self.distribution.get_fullname(),
                'py_version': py_version,
                'py_version_short': (
                    f'{sys.version_info.major}.{sys.version_info.minor}'
                ),
                'py_version_nodot': f'{sys.version_info.major}{sys.version_info.minor}',
                'sys_prefix': self.config_vars['prefix'],
                'sys_exec_prefix': self.config_vars['exec_prefix'],
                # Only python 3.2+ has abiflags
                'abiflags': getattr(sys, 'abiflags', ''),
                'platlibdir': getattr(sys, 'platlibdir', 'lib'),
            }
        )
        with contextlib.suppress(AttributeError):
            # only for distutils outside stdlib
            self.config_vars.update(
                {
                    'implementation_lower': install._get_implementation().lower(),
                    'implementation': install._get_implementation(),
                }
            )

        # pypa/distutils#113 Python 3.9 compat
        self.config_vars.setdefault(
            'py_version_nodot_plat',
            getattr(sys, 'windir', '').replace('.', ''),
        )

        self.config_vars['userbase'] = self.install_userbase
        self.config_vars['usersite'] = self.install_usersite
        if self.user and not site.ENABLE_USER_SITE:
            log.warn("WARNING: The user site-packages directory is disabled.")

        self._fix_install_dir_for_user_site()

        self.expand_basedirs()
        self.expand_dirs()

        self._expand(
            'install_dir',
            'script_dir',
            'build_directory',
            'site_dirs',
        )
        # If a non-default installation directory was specified, default the
        # script directory to match it.
        if self.script_dir is None:
            self.script_dir = self.install_dir

        if self.no_find_links is None:
            self.no_find_links = False

        # Let install_dir get set by install_lib command, which in turn
        # gets its info from the install command, and takes into account
        # --prefix and --home and all that other crud.
        self.set_undefined_options('install_lib', ('install_dir', 'install_dir'))
        # Likewise, set default script_dir from 'install_scripts.install_dir'
        self.set_undefined_options('install_scripts', ('install_dir', 'script_dir'))

        if self.user and self.install_purelib:
            self.install_dir = self.install_purelib
            self.script_dir = self.install_scripts
        # default --record from the install command
        self.set_undefined_options('install', ('record', 'record'))
        self.all_site_dirs = get_site_dirs()
        self.all_site_dirs.extend(self._process_site_dirs(self.site_dirs))

        if not self.editable:
            self.check_site_dir()
        default_index = os.getenv("__EASYINSTALL_INDEX", "https://pypi.org/simple/")
        # ^ Private API for testing purposes only
        self.index_url = self.index_url or default_index
        self.shadow_path = self.all_site_dirs[:]
        for path_item in self.install_dir, normalize_path(self.script_dir):
            if path_item not in self.shadow_path:
                self.shadow_path.insert(0, path_item)

        if self.allow_hosts is not None:
            hosts = [s.strip() for s in self.allow_hosts.split(',')]
        else:
            hosts = ['*']
        if self.package_index is None:
            self.package_index = self.create_index(
                self.index_url,
                search_path=self.shadow_path,
                hosts=hosts,
            )
        self.local_index = Environment(self.shadow_path + sys.path)

        if self.find_links is not None:
            if isinstance(self.find_links, str):
                self.find_links = self.find_links.split()
        else:
            self.find_links = []
        if self.local_snapshots_ok:
            self.package_index.scan_egg_links(self.shadow_path + sys.path)
        if not self.no_find_links:
            self.package_index.add_find_links(self.find_links)
        self.set_undefined_options('install_lib', ('optimize', 'optimize'))
        self.optimize = self._validate_optimize(self.optimize)

        if self.editable and not self.build_directory:
            raise DistutilsArgError(
                "Must specify a build directory (-b) when using --editable"
            )
        if not self.args:
            raise DistutilsArgError(
                "No urls, filenames, or requirements specified (see --help)"
            )

        self.outputs = []

    @staticmethod
    def _process_site_dirs(site_dirs):
        if site_dirs is None:
            return

        normpath = map(normalize_path, sys.path)
        site_dirs = [os.path.expanduser(s.strip()) for s in site_dirs.split(',')]
        for d in site_dirs:
            if not os.path.isdir(d):
                log.warn("%s (in --site-dirs) does not exist", d)
            elif normalize_path(d) not in normpath:
                raise DistutilsOptionError(d + " (in --site-dirs) is not on sys.path")
            else:
                yield normalize_path(d)

    @staticmethod
    def _validate_optimize(value):
        try:
            value = int(value)
            if value not in range(3):
                raise ValueError
        except ValueError as e:
            raise DistutilsOptionError("--optimize must be 0, 1, or 2") from e

        return value

    def _fix_install_dir_for_user_site(self):
        """
        Fix the install_dir if "--user" was used.
        """
        if not self.user:
            return

        self.create_home_path()
        if self.install_userbase is None:
            msg = "User base directory is not specified"
            raise DistutilsPlatformError(msg)
        self.install_base = self.install_platbase = self.install_userbase
        scheme_name = f'{os.name}_user'
        self.select_scheme(scheme_name)

    def _expand_attrs(self, attrs):
        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                if os.name == 'posix' or os.name == 'nt':
                    val = os.path.expanduser(val)
                val = subst_vars(val, self.config_vars)
                setattr(self, attr, val)

    def expand_basedirs(self):
        """Calls `os.path.expanduser` on install_base, install_platbase and
        root."""
        self._expand_attrs(['install_base', 'install_platbase', 'root'])

    def expand_dirs(self):
        """Calls `os.path.expanduser` on install dirs."""
        dirs = [
            'install_purelib',
            'install_platlib',
            'install_lib',
            'install_headers',
            'install_scripts',
            'install_data',
        ]
        self._expand_attrs(dirs)

    def run(self, show_deprecation=True):
        if show_deprecation:
            self.announce(
                "WARNING: The easy_install command is deprecated "
                "and will be removed in a future version.",
                log.WARN,
            )
        if self.verbose != self.distribution.verbose:
            log.set_verbosity(self.verbose)
        try:
            for spec in self.args:
                self.easy_install(spec, not self.no_deps)
            if self.record:
                outputs = self.outputs
                if self.root:  # strip any package prefix
                    root_len = len(self.root)
                    for counter in range(len(outputs)):
                        outputs[counter] = outputs[counter][root_len:]
                from distutils import file_util

                self.execute(
                    file_util.write_file,
                    (self.record, outputs),
                    "writing list of installed files to '%s'" % self.record,
                )
            self.warn_deprecated_options()
        finally:
            log.set_verbosity(self.distribution.verbose)

    def pseudo_tempname(self):
        """Return a pseudo-tempname base in the install directory.
        This code is intentionally naive; if a malicious party can write to
        the target directory you're already in deep doodoo.
        """
        try:
            pid = os.getpid()
        except Exception:
            pid = random.randint(0, sys.maxsize)
        return os.path.join(self.install_dir, "test-easy-install-%s" % pid)

    def warn_deprecated_options(self):
        pass

    def check_site_dir(self):  # noqa: C901  # is too complex (12)  # FIXME
        """Verify that self.install_dir is .pth-capable dir, if needed"""

        instdir = normalize_path(self.install_dir)
        pth_file = os.path.join(instdir, 'easy-install.pth')

        if not os.path.exists(instdir):
            try:
                os.makedirs(instdir)
            except OSError:
                self.cant_write_to_target()

        # Is it a configured, PYTHONPATH, implicit, or explicit site dir?
        is_site_dir = instdir in self.all_site_dirs

        if not is_site_dir and not self.multi_version:
            # No?  Then directly test whether it does .pth file processing
            is_site_dir = self.check_pth_processing()
        else:
            # make sure we can write to target dir
            testfile = self.pseudo_tempname() + '.write-test'
            test_exists = os.path.exists(testfile)
            try:
                if test_exists:
                    os.unlink(testfile)
                open(testfile, 'w').close()
                os.unlink(testfile)
            except OSError:
                self.cant_write_to_target()

        if not is_site_dir and not self.multi_version:
            # Can't install non-multi to non-site dir with easy_install
            pythonpath = os.environ.get('PYTHONPATH', '')
            log.warn(self.__no_default_msg, self.install_dir, pythonpath)

        if is_site_dir:
            if self.pth_file is None:
                self.pth_file = PthDistributions(pth_file, self.all_site_dirs)
        else:
            self.pth_file = None

        if self.multi_version and not os.path.exists(pth_file):
            self.pth_file = None  # don't create a .pth file
        self.install_dir = instdir

    __cant_write_msg = textwrap.dedent(
        """
        can't create or remove files in install directory

        The following error occurred while trying to add or remove files in the
        installation directory:

            %s

        The installation directory you specified (via --install-dir, --prefix, or
        the distutils default setting) was:

            %s
        """
    ).lstrip()  # noqa

    __not_exists_id = textwrap.dedent(
        """
        This directory does not currently exist.  Please create it and try again, or
        choose a different installation directory (using the -d or --install-dir
        option).
        """
    ).lstrip()  # noqa

    __access_msg = textwrap.dedent(
        """
        Perhaps your account does not have write access to this directory?  If the
        installation directory is a system-owned directory, you may need to sign in
        as the administrator or "root" account.  If you do not have administrative
        access to this machine, you may wish to choose a different installation
        directory, preferably one that is listed in your PYTHONPATH environment
        variable.

        For information on other options, you may wish to consult the
        documentation at:

          https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

        Please make the appropriate changes for your system and try again.
        """
    ).lstrip()  # noqa

    def cant_write_to_target(self):
        msg = self.__cant_write_msg % (
            sys.exc_info()[1],
            self.install_dir,
        )

        if not os.path.exists(self.install_dir):
            msg += '\n' + self.__not_exists_id
        else:
            msg += '\n' + self.__access_msg
        raise DistutilsError(msg)

    def check_pth_processing(self):
        """Empirically verify whether .pth files are supported in inst. dir"""
        instdir = self.install_dir
        log.info("Checking .pth file support in %s", instdir)
        pth_file = self.pseudo_tempname() + ".pth"
        ok_file = pth_file + '.ok'
        ok_exists = os.path.exists(ok_file)
        tmpl = (
            _one_liner(
                """
            import os
            f = open({ok_file!r}, 'w')
            f.write('OK')
            f.close()
            """
            )
            + '\n'
        )
        try:
            if ok_exists:
                os.unlink(ok_file)
            dirname = os.path.dirname(ok_file)
            os.makedirs(dirname, exist_ok=True)
            f = open(pth_file, 'w')
        except OSError:
            self.cant_write_to_target()
        else:
            try:
                f.write(tmpl.format(**locals()))
                f.close()
                f = None
                executable = sys.executable
                if os.name == 'nt':
                    dirname, basename = os.path.split(executable)
                    alt = os.path.join(dirname, 'pythonw.exe')
                    use_alt = basename.lower() == 'python.exe' and os.path.exists(alt)
                    if use_alt:
                        # use pythonw.exe to avoid opening a console window
                        executable = alt

                from distutils.spawn import spawn

                spawn([executable, '-E', '-c', 'pass'], 0)

                if os.path.exists(ok_file):
                    log.info("TEST PASSED: %s appears to support .pth files", instdir)
                    return True
            finally:
                if f:
                    f.close()
                if os.path.exists(ok_file):
                    os.unlink(ok_file)
                if os.path.exists(pth_file):
                    os.unlink(pth_file)
        if not self.multi_version:
            log.warn("TEST FAILED: %s does NOT support .pth files", instdir)
        return False

    def install_egg_scripts(self, dist):
        """Write all the scripts for `dist`, unless scripts are excluded"""
        if not self.exclude_scripts and dist.metadata_isdir('scripts'):
            for script_name in dist.metadata_listdir('scripts'):
                if dist.metadata_isdir('scripts/' + script_name):
                    # The "script" is a directory, likely a Python 3
                    # __pycache__ directory, so skip it.
                    continue
                self.install_script(
                    dist, script_name, dist.get_metadata('scripts/' + script_name)
                )
        self.install_wrapper_scripts(dist)

    def add_output(self, path):
        if os.path.isdir(path):
            for base, dirs, files in os.walk(path):
                for filename in files:
                    self.outputs.append(os.path.join(base, filename))
        else:
            self.outputs.append(path)

    def not_editable(self, spec):
        if self.editable:
            raise DistutilsArgError(
                "Invalid argument %r: you can't use filenames or URLs "
                "with --editable (except via the --find-links option)." % (spec,)
            )

    def check_editable(self, spec):
        if not self.editable:
            return

        if os.path.exists(os.path.join(self.build_directory, spec.key)):
            raise DistutilsArgError(
                "%r already exists in %s; can't do a checkout there"
                % (spec.key, self.build_directory)
            )

    @contextlib.contextmanager
    def _tmpdir(self):
        tmpdir = tempfile.mkdtemp(prefix=u"easy_install-")
        try:
            # cast to str as workaround for #709 and #710 and #712
            yield str(tmpdir)
        finally:
            os.path.exists(tmpdir) and _rmtree(tmpdir)

    def easy_install(self, spec, deps=False):
        with self._tmpdir() as tmpdir:
            if not isinstance(spec, Requirement):
                if URL_SCHEME(spec):
                    # It's a url, download it to tmpdir and process
                    self.not_editable(spec)
                    dl = self.package_index.download(spec, tmpdir)
                    return self.install_item(None, dl, tmpdir, deps, True)

                elif os.path.exists(spec):
                    # Existing file or directory, just process it directly
                    self.not_editable(spec)
                    return self.install_item(None, spec, tmpdir, deps, True)
                else:
                    spec = parse_requirement_arg(spec)

            self.check_editable(spec)
            dist = self.package_index.fetch_distribution(
                spec,
                tmpdir,
                self.upgrade,
                self.editable,
                not self.always_copy,
                self.local_index,
            )
            if dist is None:
                msg = "Could not find suitable distribution for %r" % spec
                if self.always_copy:
                    msg += " (--always-copy skips system and development eggs)"
                raise DistutilsError(msg)
            elif dist.precedence == DEVELOP_DIST:
                # .egg-info dists don't need installing, just process deps
                self.process_distribution(spec, dist, deps, "Using")
                return dist
            else:
                return self.install_item(spec, dist.location, tmpdir, deps)

    def install_item(self, spec, download, tmpdir, deps, install_needed=False):
        # Installation is also needed if file in tmpdir or is not an egg
        install_needed = install_needed or self.always_copy
        install_needed = install_needed or os.path.dirname(download) == tmpdir
        install_needed = install_needed or not download.endswith('.egg')
        install_needed = install_needed or (
            self.always_copy_from is not None
            and os.path.dirname(normalize_path(download))
            == normalize_path(self.always_copy_from)
        )

        if spec and not install_needed:
            # at this point, we know it's a local .egg, we just don't know if
            # it's already installed.
            for dist in self.local_index[spec.project_name]:
                if dist.location == download:
                    break
            else:
                install_needed = True  # it's not in the local index

        log.info("Processing %s", os.path.basename(download))

        if install_needed:
            dists = self.install_eggs(spec, download, tmpdir)
            for dist in dists:
                self.process_distribution(spec, dist, deps)
        else:
            dists = [self.egg_distribution(download)]
            self.process_distribution(spec, dists[0], deps, "Using")

        if spec is not None:
            for dist in dists:
                if dist in spec:
                    return dist

    def select_scheme(self, name):
        try:
            install._select_scheme(self, name)
        except AttributeError:
            # stdlib distutils
            install.install.select_scheme(self, name.replace('posix', 'unix'))

    # FIXME: 'easy_install.process_distribution' is too complex (12)
    def process_distribution(  # noqa: C901
        self,
        requirement,
        dist,
        deps=True,
        *info,
    ):
        self.update_pth(dist)
        self.package_index.add(dist)
        if dist in self.local_index[dist.key]:
            self.local_index.remove(dist)
        self.local_index.add(dist)
        self.install_egg_scripts(dist)
        self.installed_projects[dist.key] = dist
        log.info(self.installation_report(requirement, dist, *info))
        if dist.has_metadata('dependency_links.txt') and not self.no_find_links:
            self.package_index.add_find_links(
                dist.get_metadata_lines('dependency_links.txt')
            )
        if not deps and not self.always_copy:
            return
        elif requirement is not None and dist.key != requirement.key:
            log.warn("Skipping dependencies for %s", dist)
            return  # XXX this is not the distribution we were looking for
        elif requirement is None or dist not in requirement:
            # if we wound up with a different version, resolve what we've got
            distreq = dist.as_requirement()
            requirement = Requirement(str(distreq))
        log.info("Processing dependencies for %s", requirement)
        try:
            distros = WorkingSet([]).resolve(
                [requirement], self.local_index, self.easy_install
            )
        except DistributionNotFound as e:
            raise DistutilsError(str(e)) from e
        except VersionConflict as e:
            raise DistutilsError(e.report()) from e
        if self.always_copy or self.always_copy_from:
            # Force all the relevant distros to be copied or activated
            for dist in distros:
                if dist.key not in self.installed_projects:
                    self.easy_install(dist.as_requirement())
        log.info("Finished processing dependencies for %s", requirement)

    def should_unzip(self, dist):
        if self.zip_ok is not None:
            return not self.zip_ok
        if dist.has_metadata('not-zip-safe'):
            return True
        if not dist.has_metadata('zip-safe'):
            return True
        return False

    def maybe_move(self, spec, dist_filename, setup_base):
        dst = os.path.join(self.build_directory, spec.key)
        if os.path.exists(dst):
            msg = "%r already exists in %s; build directory %s will not be kept"
            log.warn(msg, spec.key, self.build_directory, setup_base)
            return setup_base
        if os.path.isdir(dist_filename):
            setup_base = dist_filename
        else:
            if os.path.dirname(dist_filename) == setup_base:
                os.unlink(dist_filename)  # get it out of the tmp dir
            contents = os.listdir(setup_base)
            if len(contents) == 1:
                dist_filename = os.path.join(setup_base, contents[0])
                if os.path.isdir(dist_filename):
                    # if the only thing there is a directory, move it instead
                    setup_base = dist_filename
        ensure_directory(dst)
        shutil.move(setup_base, dst)
        return dst

    def install_wrapper_scripts(self, dist):
        if self.exclude_scripts:
            return
        for args in ScriptWriter.best().get_args(dist):
            self.write_script(*args)

    def install_script(self, dist, script_name, script_text, dev_path=None):
        """Generate a legacy script wrapper and install it"""
        spec = str(dist.as_requirement())
        is_script = is_python_script(script_text, script_name)

        if is_script:
            body = self._load_template(dev_path) % locals()
            script_text = ScriptWriter.get_header(script_text) + body
        self.write_script(script_name, _to_bytes(script_text), 'b')

    @staticmethod
    def _load_template(dev_path):
        """
        There are a couple of template scripts in the package. This
        function loads one of them and prepares it for use.
        """
        # See https://github.com/pypa/setuptools/issues/134 for info
        # on script file naming and downstream issues with SVR4
        name = 'script.tmpl'
        if dev_path:
            name = name.replace('.tmpl', ' (dev).tmpl')

        raw_bytes = resource_string('setuptools', name)
        return raw_bytes.decode('utf-8')

    def write_script(self, script_name, contents, mode="t", blockers=()):
        """Write an executable file to the scripts directory"""
        self.delete_blockers(  # clean up old .py/.pyw w/o a script
            [os.path.join(self.script_dir, x) for x in blockers]
        )
        log.info("Installing %s script to %s", script_name, self.script_dir)
        target = os.path.join(self.script_dir, script_name)
        self.add_output(target)

        if self.dry_run:
            return

        mask = current_umask()
        ensure_directory(target)
        if os.path.exists(target):
            os.unlink(target)
        with open(target, "w" + mode) as f:
            f.write(contents)
        chmod(target, 0o777 - mask)

    def install_eggs(self, spec, dist_filename, tmpdir):
        # .egg dirs or files are already built, so just return them
        installer_map = {
            '.egg': self.install_egg,
            '.exe': self.install_exe,
            '.whl': self.install_wheel,
        }
        try:
            install_dist = installer_map[dist_filename.lower()[-4:]]
        except KeyError:
            pass
        else:
            return [install_dist(dist_filename, tmpdir)]

        # Anything else, try to extract and build
        setup_base = tmpdir
        if os.path.isfile(dist_filename) and not dist_filename.endswith('.py'):
            unpack_archive(dist_filename, tmpdir, self.unpack_progress)
        elif os.path.isdir(dist_filename):
            setup_base = os.path.abspath(dist_filename)

        if (
            setup_base.startswith(tmpdir)  # something we downloaded
            and self.build_directory
            and spec is not None
        ):
            setup_base = self.maybe_move(spec, dist_filename, setup_base)

        # Find the setup.py file
        setup_script = os.path.join(setup_base, 'setup.py')

        if not os.path.exists(setup_script):
            setups = glob(os.path.join(setup_base, '*', 'setup.py'))
            if not setups:
                raise DistutilsError(
                    "Couldn't find a setup script in %s"
                    % os.path.abspath(dist_filename)
                )
            if len(setups) > 1:
                raise DistutilsError(
                    "Multiple setup scripts in %s" % os.path.abspath(dist_filename)
                )
            setup_script = setups[0]

        # Now run it, and return the result
        if self.editable:
            log.info(self.report_editable(spec, setup_script))
            return []
        else:
            return self.build_and_install(setup_script, setup_base)

    def egg_distribution(self, egg_path):
        if os.path.isdir(egg_path):
            metadata = PathMetadata(egg_path, os.path.join(egg_path, 'EGG-INFO'))
        else:
            metadata = EggMetadata(zipimport.zipimporter(egg_path))
        return Distribution.from_filename(egg_path, metadata=metadata)

    # FIXME: 'easy_install.install_egg' is too complex (11)
    def install_egg(self, egg_path, tmpdir):  # noqa: C901
        destination = os.path.join(
            self.install_dir,
            os.path.basename(egg_path),
        )
        destination = os.path.abspath(destination)
        if not self.dry_run:
            ensure_directory(destination)

        dist = self.egg_distribution(egg_path)
        if not (
            os.path.exists(destination) and os.path.samefile(egg_path, destination)
        ):
            if os.path.isdir(destination) and not os.path.islink(destination):
                dir_util.remove_tree(destination, dry_run=self.dry_run)
            elif os.path.exists(destination):
                self.execute(
                    os.unlink,
                    (destination,),
                    "Removing " + destination,
                )
            try:
                new_dist_is_zipped = False
                if os.path.isdir(egg_path):
                    if egg_path.startswith(tmpdir):
                        f, m = shutil.move, "Moving"
                    else:
                        f, m = shutil.copytree, "Copying"
                elif self.should_unzip(dist):
                    self.mkpath(destination)
                    f, m = self.unpack_and_compile, "Extracting"
                else:
                    new_dist_is_zipped = True
                    if egg_path.startswith(tmpdir):
                        f, m = shutil.move, "Moving"
                    else:
                        f, m = shutil.copy2, "Copying"
                self.execute(
                    f,
                    (egg_path, destination),
                    (m + " %s to %s")
                    % (os.path.basename(egg_path), os.path.dirname(destination)),
                )
                update_dist_caches(
                    destination,
                    fix_zipimporter_caches=new_dist_is_zipped,
                )
            except Exception:
                update_dist_caches(destination, fix_zipimporter_caches=False)
                raise

        self.add_output(destination)
        return self.egg_distribution(destination)

    def install_exe(self, dist_filename, tmpdir):
        # See if it's valid, get data
        cfg = extract_wininst_cfg(dist_filename)
        if cfg is None:
            raise DistutilsError(
                "%s is not a valid distutils Windows .exe" % dist_filename
            )
        # Create a dummy distribution object until we build the real distro
        dist = Distribution(
            None,
            project_name=cfg.get('metadata', 'name'),
            version=cfg.get('metadata', 'version'),
            platform=get_platform(),
        )

        # Convert the .exe to an unpacked egg
        egg_path = os.path.join(tmpdir, dist.egg_name() + '.egg')
        dist.location = egg_path
        egg_tmp = egg_path + '.tmp'
        _egg_info = os.path.join(egg_tmp, 'EGG-INFO')
        pkg_inf = os.path.join(_egg_info, 'PKG-INFO')
        ensure_directory(pkg_inf)  # make sure EGG-INFO dir exists
        dist._provider = PathMetadata(egg_tmp, _egg_info)  # XXX
        self.exe_to_egg(dist_filename, egg_tmp)

        # Write EGG-INFO/PKG-INFO
        if not os.path.exists(pkg_inf):
            f = open(pkg_inf, 'w')
            f.write('Metadata-Version: 1.0\n')
            for k, v in cfg.items('metadata'):
                if k != 'target_version':
                    f.write('%s: %s\n' % (k.replace('_', '-').title(), v))
            f.close()
        script_dir = os.path.join(_egg_info, 'scripts')
        # delete entry-point scripts to avoid duping
        self.delete_blockers(
            [os.path.join(script_dir, args[0]) for args in ScriptWriter.get_args(dist)]
        )
        # Build .egg file from tmpdir
        bdist_egg.make_zipfile(
            egg_path,
            egg_tmp,
            verbose=self.verbose,
            dry_run=self.dry_run,
        )
        # install the .egg
        return self.install_egg(egg_path, tmpdir)

    # FIXME: 'easy_install.exe_to_egg' is too complex (12)
    def exe_to_egg(self, dist_filename, egg_tmp):  # noqa: C901
        """Extract a bdist_wininst to the directories an egg would use"""
        # Check for .pth file and set up prefix translations
        prefixes = get_exe_prefixes(dist_filename)
        to_compile = []
        native_libs = []
        top_level = {}

        def process(src, dst):
            s = src.lower()
            for old, new in prefixes:
                if s.startswith(old):
                    src = new + src[len(old) :]
                    parts = src.split('/')
                    dst = os.path.join(egg_tmp, *parts)
                    dl = dst.lower()
                    if dl.endswith('.pyd') or dl.endswith('.dll'):
                        parts[-1] = bdist_egg.strip_module(parts[-1])
                        top_level[os.path.splitext(parts[0])[0]] = 1
                        native_libs.append(src)
                    elif dl.endswith('.py') and old != 'SCRIPTS/':
                        top_level[os.path.splitext(parts[0])[0]] = 1
                        to_compile.append(dst)
                    return dst
            if not src.endswith('.pth'):
                log.warn("WARNING: can't process %s", src)
            return None

        # extract, tracking .pyd/.dll->native_libs and .py -> to_compile
        unpack_archive(dist_filename, egg_tmp, process)
        stubs = []
        for res in native_libs:
            if res.lower().endswith('.pyd'):  # create stubs for .pyd's
                parts = res.split('/')
                resource = parts[-1]
                parts[-1] = bdist_egg.strip_module(parts[-1]) + '.py'
                pyfile = os.path.join(egg_tmp, *parts)
                to_compile.append(pyfile)
                stubs.append(pyfile)
                bdist_egg.write_stub(resource, pyfile)
        self.byte_compile(to_compile)  # compile .py's
        bdist_egg.write_safety_flag(
            os.path.join(egg_tmp, 'EGG-INFO'), bdist_egg.analyze_egg(egg_tmp, stubs)
        )  # write zip-safety flag

        for name in 'top_level', 'native_libs':
            if locals()[name]:
                txt = os.path.join(egg_tmp, 'EGG-INFO', name + '.txt')
                if not os.path.exists(txt):
                    f = open(txt, 'w')
                    f.write('\n'.join(locals()[name]) + '\n')
                    f.close()

    def install_wheel(self, wheel_path, tmpdir):
        wheel = Wheel(wheel_path)
        assert wheel.is_compatible()
        destination = os.path.join(self.install_dir, wheel.egg_name())
        destination = os.path.abspath(destination)
        if not self.dry_run:
            ensure_directory(destination)
        if os.path.isdir(destination) and not os.path.islink(destination):
            dir_util.remove_tree(destination, dry_run=self.dry_run)
        elif os.path.exists(destination):
            self.execute(
                os.unlink,
                (destination,),
                "Removing " + destination,
            )
        try:
            self.execute(
                wheel.install_as_egg,
                (destination,),
                ("Installing %s to %s")
                % (os.path.basename(wheel_path), os.path.dirname(destination)),
            )
        finally:
            update_dist_caches(destination, fix_zipimporter_caches=False)
        self.add_output(destination)
        return self.egg_distribution(destination)

    __mv_warning = textwrap.dedent(
        """
        Because this distribution was installed --multi-version, before you can
        import modules from this package in an application, you will need to
        'import pkg_resources' and then use a 'require()' call similar to one of
        these examples, in order to select the desired version:

            pkg_resources.require("%(name)s")  # latest installed version
            pkg_resources.require("%(name)s==%(version)s")  # this exact version
            pkg_resources.require("%(name)s>=%(version)s")  # this version or higher
        """
    ).lstrip()  # noqa

    __id_warning = textwrap.dedent(
        """
        Note also that the installation directory must be on sys.path at runtime for
        this to work.  (e.g. by being the application's script directory, by being on
        PYTHONPATH, or by being added to sys.path by your code.)
        """
    )  # noqa

    def installation_report(self, req, dist, what="Installed"):
        """Helpful installation message for display to package users"""
        msg = "\n%(what)s %(eggloc)s%(extras)s"
        if self.multi_version and not self.no_report:
            msg += '\n' + self.__mv_warning
            if self.install_dir not in map(normalize_path, sys.path):
                msg += '\n' + self.__id_warning

        eggloc = dist.location
        name = dist.project_name
        version = dist.version
        extras = ''  # TODO: self.report_extras(req, dist)
        return msg % locals()

    __editable_msg = textwrap.dedent(
        """
        Extracted editable version of %(spec)s to %(dirname)s

        If it uses setuptools in its setup script, you can activate it in
        "development" mode by going to that directory and running::

            %(python)s setup.py develop

        See the setuptools documentation for the "develop" command for more info.
        """
    ).lstrip()  # noqa

    def report_editable(self, spec, setup_script):
        dirname = os.path.dirname(setup_script)
        python = sys.executable
        return '\n' + self.__editable_msg % locals()

    def run_setup(self, setup_script, setup_base, args):
        sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg)
        sys.modules.setdefault('distutils.command.egg_info', egg_info)

        args = list(args)
        if self.verbose > 2:
            v = 'v' * (self.verbose - 1)
            args.insert(0, '-' + v)
        elif self.verbose < 2:
            args.insert(0, '-q')
        if self.dry_run:
            args.insert(0, '-n')
        log.info("Running %s %s", setup_script[len(setup_base) + 1 :], ' '.join(args))
        try:
            run_setup(setup_script, args)
        except SystemExit as v:
            raise DistutilsError("Setup script exited with %s" % (v.args[0],)) from v

    def build_and_install(self, setup_script, setup_base):
        args = ['bdist_egg', '--dist-dir']

        dist_dir = tempfile.mkdtemp(
            prefix='egg-dist-tmp-', dir=os.path.dirname(setup_script)
        )
        try:
            self._set_fetcher_options(os.path.dirname(setup_script))
            args.append(dist_dir)

            self.run_setup(setup_script, setup_base, args)
            all_eggs = Environment([dist_dir])
            eggs = []
            for key in all_eggs:
                for dist in all_eggs[key]:
                    eggs.append(self.install_egg(dist.location, setup_base))
            if not eggs and not self.dry_run:
                log.warn("No eggs found in %s (setup script problem?)", dist_dir)
            return eggs
        finally:
            _rmtree(dist_dir)
            log.set_verbosity(self.verbose)  # restore our log verbosity

    def _set_fetcher_options(self, base):
        """
        When easy_install is about to run bdist_egg on a source dist, that
        source dist might have 'setup_requires' directives, requiring
        additional fetching. Ensure the fetcher options given to easy_install
        are available to that command as well.
        """
        # find the fetch options from easy_install and write them out
        # to the setup.cfg file.
        ei_opts = self.distribution.get_option_dict('easy_install').copy()
        fetch_directives = (
            'find_links',
            'site_dirs',
            'index_url',
            'optimize',
            'allow_hosts',
        )
        fetch_options = {}
        for key, val in ei_opts.items():
            if key not in fetch_directives:
                continue
            fetch_options[key] = val[1]
        # create a settings dictionary suitable for `edit_config`
        settings = dict(easy_install=fetch_options)
        cfg_filename = os.path.join(base, 'setup.cfg')
        setopt.edit_config(cfg_filename, settings)

    def update_pth(self, dist):  # noqa: C901  # is too complex (11)  # FIXME
        if self.pth_file is None:
            return

        for d in self.pth_file[dist.key]:  # drop old entries
            if not self.multi_version and d.location == dist.location:
                continue

            log.info("Removing %s from easy-install.pth file", d)
            self.pth_file.remove(d)
            if d.location in self.shadow_path:
                self.shadow_path.remove(d.location)

        if not self.multi_version:
            if dist.location in self.pth_file.paths:
                log.info(
                    "%s is already the active version in easy-install.pth",
                    dist,
                )
            else:
                log.info("Adding %s to easy-install.pth file", dist)
                self.pth_file.add(dist)  # add new entry
                if dist.location not in self.shadow_path:
                    self.shadow_path.append(dist.location)

        if self.dry_run:
            return

        self.pth_file.save()

        if dist.key != 'setuptools':
            return

        # Ensure that setuptools itself never becomes unavailable!
        # XXX should this check for latest version?
        filename = os.path.join(self.install_dir, 'setuptools.pth')
        if os.path.islink(filename):
            os.unlink(filename)
        with open(filename, 'wt') as f:
            f.write(self.pth_file.make_relative(dist.location) + '\n')

    def unpack_progress(self, src, dst):
        # Progress filter for unpacking
        log.debug("Unpacking %s to %s", src, dst)
        return dst  # only unpack-and-compile skips files for dry run

    def unpack_and_compile(self, egg_path, destination):
        to_compile = []
        to_chmod = []

        def pf(src, dst):
            if dst.endswith('.py') and not src.startswith('EGG-INFO/'):
                to_compile.append(dst)
            elif dst.endswith('.dll') or dst.endswith('.so'):
                to_chmod.append(dst)
            self.unpack_progress(src, dst)
            return not self.dry_run and dst or None

        unpack_archive(egg_path, destination, pf)
        self.byte_compile(to_compile)
        if not self.dry_run:
            for f in to_chmod:
                mode = ((os.stat(f)[stat.ST_MODE]) | 0o555) & 0o7755
                chmod(f, mode)

    def byte_compile(self, to_compile):
        if sys.dont_write_bytecode:
            return

        from distutils.util import byte_compile

        try:
            # try to make the byte compile messages quieter
            log.set_verbosity(self.verbose - 1)

            byte_compile(to_compile, optimize=0, force=1, dry_run=self.dry_run)
            if self.optimize:
                byte_compile(
                    to_compile,
                    optimize=self.optimize,
                    force=1,
                    dry_run=self.dry_run,
                )
        finally:
            log.set_verbosity(self.verbose)  # restore original verbosity

    __no_default_msg = textwrap.dedent(
        """
        bad install directory or PYTHONPATH

        You are attempting to install a package to a directory that is not
        on PYTHONPATH and which Python does not read ".pth" files from.  The
        installation directory you specified (via --install-dir, --prefix, or
        the distutils default setting) was:

            %s

        and your PYTHONPATH environment variable currently contains:

            %r

        Here are some of your options for correcting the problem:

        * You can choose a different installation directory, i.e., one that is
          on PYTHONPATH or supports .pth files

        * You can add the installation directory to the PYTHONPATH environment
          variable.  (It must then also be on PYTHONPATH whenever you run
          Python and want to use the package(s) you are installing.)

        * You can set up the installation directory to support ".pth" files by
          using one of the approaches described here:

          https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations


        Please make the appropriate changes for your system and try again.
        """
    ).strip()

    def create_home_path(self):
        """Create directories under ~."""
        if not self.user:
            return
        home = convert_path(os.path.expanduser("~"))
        for path in only_strs(self.config_vars.values()):
            if path.startswith(home) and not os.path.isdir(path):
                self.debug_print("os.makedirs('%s', 0o700)" % path)
                os.makedirs(path, 0o700)

    INSTALL_SCHEMES = dict(
        posix=dict(
            install_dir='$base/lib/python$py_version_short/site-packages',
            script_dir='$base/bin',
        ),
    )

    DEFAULT_SCHEME = dict(
        install_dir='$base/Lib/site-packages',
        script_dir='$base/Scripts',
    )

    def _expand(self, *attrs):
        config_vars = self.get_finalized_command('install').config_vars

        if self.prefix:
            # Set default install_dir/scripts from --prefix
            config_vars = dict(config_vars)
            config_vars['base'] = self.prefix
            scheme = self.INSTALL_SCHEMES.get(os.name, self.DEFAULT_SCHEME)
            for attr, val in scheme.items():
                if getattr(self, attr, None) is None:
                    setattr(self, attr, val)

        from distutils.util import subst_vars

        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                val = subst_vars(val, config_vars)
                if os.name == 'posix':
                    val = os.path.expanduser(val)
                setattr(self, attr, val)


def _pythonpath():
    items = os.environ.get('PYTHONPATH', '').split(os.pathsep)
    return filter(None, items)


def get_site_dirs():
    """
    Return a list of 'site' dirs
    """

    sitedirs = []

    # start with PYTHONPATH
    sitedirs.extend(_pythonpath())

    prefixes = [sys.prefix]
    if sys.exec_prefix != sys.prefix:
        prefixes.append(sys.exec_prefix)
    for prefix in prefixes:
        if not prefix:
            continue

        if sys.platform in ('os2emx', 'riscos'):
            sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
        elif os.sep == '/':
            sitedirs.extend(
                [
                    os.path.join(
                        prefix,
                        "lib",
                        "python{}.{}".format(*sys.version_info),
                        "site-packages",
                    ),
                    os.path.join(prefix, "lib", "site-python"),
                ]
            )
        else:
            sitedirs.extend(
                [
                    prefix,
                    os.path.join(prefix, "lib", "site-packages"),
                ]
            )
        if sys.platform != 'darwin':
            continue

        # for framework builds *only* we add the standard Apple
        # locations. Currently only per-user, but /Library and
        # /Network/Library could be added too
        if 'Python.framework' not in prefix:
            continue

        home = os.environ.get('HOME')
        if not home:
            continue

        home_sp = os.path.join(
            home,
            'Library',
            'Python',
            '{}.{}'.format(*sys.version_info),
            'site-packages',
        )
        sitedirs.append(home_sp)
    lib_paths = get_path('purelib'), get_path('platlib')

    sitedirs.extend(s for s in lib_paths if s not in sitedirs)

    if site.ENABLE_USER_SITE:
        sitedirs.append(site.USER_SITE)

    with contextlib.suppress(AttributeError):
        sitedirs.extend(site.getsitepackages())

    sitedirs = list(map(normalize_path, sitedirs))

    return sitedirs


def expand_paths(inputs):  # noqa: C901  # is too complex (11)  # FIXME
    """Yield sys.path directories that might contain "old-style" packages"""

    seen = {}

    for dirname in inputs:
        dirname = normalize_path(dirname)
        if dirname in seen:
            continue

        seen[dirname] = 1
        if not os.path.isdir(dirname):
            continue

        files = os.listdir(dirname)
        yield dirname, files

        for name in files:
            if not name.endswith('.pth'):
                # We only care about the .pth files
                continue
            if name in ('easy-install.pth', 'setuptools.pth'):
                # Ignore .pth files that we control
                continue

            # Read the .pth file
            f = open(os.path.join(dirname, name))
            lines = list(yield_lines(f))
            f.close()

            # Yield existing non-dupe, non-import directory lines from it
            for line in lines:
                if line.startswith("import"):
                    continue

                line = normalize_path(line.rstrip())
                if line in seen:
                    continue

                seen[line] = 1
                if not os.path.isdir(line):
                    continue

                yield line, os.listdir(line)


def extract_wininst_cfg(dist_filename):
    """Extract configuration data from a bdist_wininst .exe

    Returns a configparser.RawConfigParser, or None
    """
    f = open(dist_filename, 'rb')
    try:
        endrec = zipfile._EndRecData(f)
        if endrec is None:
            return None

        prepended = (endrec[9] - endrec[5]) - endrec[6]
        if prepended < 12:  # no wininst data here
            return None
        f.seek(prepended - 12)

        tag, cfglen, bmlen = struct.unpack("<iii", f.read(12))
        if tag not in (0x1234567A, 0x1234567B):
            return None  # not a valid tag

        f.seek(prepended - (12 + cfglen))
        init = {'version': '', 'target_version': ''}
        cfg = configparser.RawConfigParser(init)
        try:
            part = f.read(cfglen)
            # Read up to the first null byte.
            config = part.split(b'\0', 1)[0]
            # Now the config is in bytes, but for RawConfigParser, it should
            #  be text, so decode it.
            config = config.decode(sys.getfilesystemencoding())
            cfg.read_file(io.StringIO(config))
        except configparser.Error:
            return None
        if not cfg.has_section('metadata') or not cfg.has_section('Setup'):
            return None
        return cfg

    finally:
        f.close()


def get_exe_prefixes(exe_filename):
    """Get exe->egg path translations for a given .exe file"""

    prefixes = [
        ('PURELIB/', ''),
        ('PLATLIB/pywin32_system32', ''),
        ('PLATLIB/', ''),
        ('SCRIPTS/', 'EGG-INFO/scripts/'),
        ('DATA/lib/site-packages', ''),
    ]
    z = zipfile.ZipFile(exe_filename)
    try:
        for info in z.infolist():
            name = info.filename
            parts = name.split('/')
            if len(parts) == 3 and parts[2] == 'PKG-INFO':
                if parts[1].endswith('.egg-info'):
                    prefixes.insert(0, ('/'.join(parts[:2]), 'EGG-INFO/'))
                    break
            if len(parts) != 2 or not name.endswith('.pth'):
                continue
            if name.endswith('-nspkg.pth'):
                continue
            if parts[0].upper() in ('PURELIB', 'PLATLIB'):
                contents = z.read(name).decode()
                for pth in yield_lines(contents):
                    pth = pth.strip().replace('\\', '/')
                    if not pth.startswith('import'):
                        prefixes.append((('%s/%s/' % (parts[0], pth)), ''))
    finally:
        z.close()
    prefixes = [(x.lower(), y) for x, y in prefixes]
    prefixes.sort()
    prefixes.reverse()
    return prefixes


class PthDistributions(Environment):
    """A .pth file with Distribution paths in it"""

    def __init__(self, filename, sitedirs=()):
        self.filename = filename
        self.sitedirs = list(map(normalize_path, sitedirs))
        self.basedir = normalize_path(os.path.dirname(self.filename))
        self.paths, self.dirty = self._load()
        # keep a copy if someone manually updates the paths attribute on the instance
        self._init_paths = self.paths[:]
        super().__init__([], None, None)
        for path in yield_lines(self.paths):
            list(map(self.add, find_distributions(path, True)))

    def _load_raw(self):
        paths = []
        dirty = saw_import = False
        seen = dict.fromkeys(self.sitedirs)
        f = open(self.filename, 'rt')
        for line in f:
            path = line.rstrip()
            # still keep imports and empty/commented lines for formatting
            paths.append(path)
            if line.startswith(('import ', 'from ')):
                saw_import = True
                continue
            stripped_path = path.strip()
            if not stripped_path or stripped_path.startswith('#'):
                continue
            # skip non-existent paths, in case somebody deleted a package
            # manually, and duplicate paths as well
            normalized_path = normalize_path(os.path.join(self.basedir, path))
            if normalized_path in seen or not os.path.exists(normalized_path):
                log.debug("cleaned up dirty or duplicated %r", path)
                dirty = True
                paths.pop()
                continue
            seen[normalized_path] = 1
        f.close()
        # remove any trailing empty/blank line
        while paths and not paths[-1].strip():
            paths.pop()
            dirty = True
        return paths, dirty or (paths and saw_import)

    def _load(self):
        if os.path.isfile(self.filename):
            return self._load_raw()
        return [], False

    def save(self):
        """Write changed .pth file back to disk"""
        # first reload the file
        last_paths, last_dirty = self._load()
        # and check that there are no difference with what we have.
        # there can be difference if someone else has written to the file
        # since we first loaded it.
        # we don't want to lose the eventual new paths added since then.
        for path in last_paths[:]:
            if path not in self.paths:
                self.paths.append(path)
                log.info("detected new path %r", path)
                last_dirty = True
            else:
                last_paths.remove(path)
        # also, re-check that all paths are still valid before saving them
        for path in self.paths[:]:
            if path not in last_paths and not path.startswith(
                ('import ', 'from ', '#')
            ):
                absolute_path = os.path.join(self.basedir, path)
                if not os.path.exists(absolute_path):
                    self.paths.remove(path)
                    log.info("removing now non-existent path %r", path)
                    last_dirty = True

        self.dirty |= last_dirty or self.paths != self._init_paths
        if not self.dirty:
            return

        rel_paths = list(map(self.make_relative, self.paths))
        if rel_paths:
            log.debug("Saving %s", self.filename)
            lines = self._wrap_lines(rel_paths)
            data = '\n'.join(lines) + '\n'
            if os.path.islink(self.filename):
                os.unlink(self.filename)
            with open(self.filename, 'wt') as f:
                f.write(data)
        elif os.path.exists(self.filename):
            log.debug("Deleting empty %s", self.filename)
            os.unlink(self.filename)

        self.dirty = False
        self._init_paths[:] = self.paths[:]

    @staticmethod
    def _wrap_lines(lines):
        return lines

    def add(self, dist):
        """Add `dist` to the distribution map"""
        new_path = dist.location not in self.paths and (
            dist.location not in self.sitedirs
            or
            # account for '.' being in PYTHONPATH
            dist.location == os.getcwd()
        )
        if new_path:
            self.paths.append(dist.location)
            self.dirty = True
        super().add(dist)

    def remove(self, dist):
        """Remove `dist` from the distribution map"""
        while dist.location in self.paths:
            self.paths.remove(dist.location)
            self.dirty = True
        super().remove(dist)

    def make_relative(self, path):
        npath, last = os.path.split(normalize_path(path))
        baselen = len(self.basedir)
        parts = [last]
        sep = os.altsep == '/' and '/' or os.sep
        while len(npath) >= baselen:
            if npath == self.basedir:
                parts.append(os.curdir)
                parts.reverse()
                return sep.join(parts)
            npath, last = os.path.split(npath)
            parts.append(last)
        else:
            return path


class RewritePthDistributions(PthDistributions):
    @classmethod
    def _wrap_lines(cls, lines):
        yield cls.prelude
        for line in lines:
            yield line
        yield cls.postlude

    prelude = _one_liner(
        """
        import sys
        sys.__plen = len(sys.path)
        """
    )
    postlude = _one_liner(
        """
        import sys
        new = sys.path[sys.__plen:]
        del sys.path[sys.__plen:]
        p = getattr(sys, '__egginsert', 0)
        sys.path[p:p] = new
        sys.__egginsert = p + len(new)
        """
    )


if os.environ.get('SETUPTOOLS_SYS_PATH_TECHNIQUE', 'raw') == 'rewrite':
    PthDistributions = RewritePthDistributions


def _first_line_re():
    """
    Return a regular expression based on first_line_re suitable for matching
    strings.
    """
    if isinstance(first_line_re.pattern, str):
        return first_line_re

    # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern.
    return re.compile(first_line_re.pattern.decode())


def auto_chmod(func, arg, exc):
    if func in [os.unlink, os.remove] and os.name == 'nt':
        chmod(arg, stat.S_IWRITE)
        return func(arg)
    et, ev, _ = sys.exc_info()
    # TODO: This code doesn't make sense. What is it trying to do?
    raise (ev[0], ev[1] + (" %s %s" % (func, arg)))


def update_dist_caches(dist_path, fix_zipimporter_caches):
    """
    Fix any globally cached `dist_path` related data

    `dist_path` should be a path of a newly installed egg distribution (zipped
    or unzipped).

    sys.path_importer_cache contains finder objects that have been cached when
    importing data from the original distribution. Any such finders need to be
    cleared since the replacement distribution might be packaged differently,
    e.g. a zipped egg distribution might get replaced with an unzipped egg
    folder or vice versa. Having the old finders cached may then cause Python
    to attempt loading modules from the replacement distribution using an
    incorrect loader.

    zipimport.zipimporter objects are Python loaders charged with importing
    data packaged inside zip archives. If stale loaders referencing the
    original distribution, are left behind, they can fail to load modules from
    the replacement distribution. E.g. if an old zipimport.zipimporter instance
    is used to load data from a new zipped egg archive, it may cause the
    operation to attempt to locate the requested data in the wrong location -
    one indicated by the original distribution's zip archive directory
    information. Such an operation may then fail outright, e.g. report having
    read a 'bad local file header', or even worse, it may fail silently &
    return invalid data.

    zipimport._zip_directory_cache contains cached zip archive directory
    information for all existing zipimport.zipimporter instances and all such
    instances connected to the same archive share the same cached directory
    information.

    If asked, and the underlying Python implementation allows it, we can fix
    all existing zipimport.zipimporter instances instead of having to track
    them down and remove them one by one, by updating their shared cached zip
    archive directory information. This, of course, assumes that the
    replacement distribution is packaged as a zipped egg.

    If not asked to fix existing zipimport.zipimporter instances, we still do
    our best to clear any remaining zipimport.zipimporter related cached data
    that might somehow later get used when attempting to load data from the new
    distribution and thus cause such load operations to fail. Note that when
    tracking down such remaining stale data, we can not catch every conceivable
    usage from here, and we clear only those that we know of and have found to
    cause problems if left alive. Any remaining caches should be updated by
    whomever is in charge of maintaining them, i.e. they should be ready to
    handle us replacing their zip archives with new distributions at runtime.

    """
    # There are several other known sources of stale zipimport.zipimporter
    # instances that we do not clear here, but might if ever given a reason to
    # do so:
    # * Global setuptools pkg_resources.working_set (a.k.a. 'master working
    # set') may contain distributions which may in turn contain their
    #   zipimport.zipimporter loaders.
    # * Several zipimport.zipimporter loaders held by local variables further
    #   up the function call stack when running the setuptools installation.
    # * Already loaded modules may have their __loader__ attribute set to the
    #   exact loader instance used when importing them. Python 3.4 docs state
    #   that this information is intended mostly for introspection and so is
    #   not expected to cause us problems.
    normalized_path = normalize_path(dist_path)
    _uncache(normalized_path, sys.path_importer_cache)
    if fix_zipimporter_caches:
        _replace_zip_directory_cache_data(normalized_path)
    else:
        # Here, even though we do not want to fix existing and now stale
        # zipimporter cache information, we still want to remove it. Related to
        # Python's zip archive directory information cache, we clear each of
        # its stale entries in two phases:
        #   1. Clear the entry so attempting to access zip archive information
        #      via any existing stale zipimport.zipimporter instances fails.
        #   2. Remove the entry from the cache so any newly constructed
        #      zipimport.zipimporter instances do not end up using old stale
        #      zip archive directory information.
        # This whole stale data removal step does not seem strictly necessary,
        # but has been left in because it was done before we started replacing
        # the zip archive directory information cache content if possible, and
        # there are no relevant unit tests that we can depend on to tell us if
        # this is really needed.
        _remove_and_clear_zip_directory_cache_data(normalized_path)


def _collect_zipimporter_cache_entries(normalized_path, cache):
    """
    Return zipimporter cache entry keys related to a given normalized path.

    Alternative path spellings (e.g. those using different character case or
    those using alternative path separators) related to the same path are
    included. Any sub-path entries are included as well, i.e. those
    corresponding to zip archives embedded in other zip archives.

    """
    result = []
    prefix_len = len(normalized_path)
    for p in cache:
        np = normalize_path(p)
        if np.startswith(normalized_path) and np[prefix_len : prefix_len + 1] in (
            os.sep,
            '',
        ):
            result.append(p)
    return result


def _update_zipimporter_cache(normalized_path, cache, updater=None):
    """
    Update zipimporter cache data for a given normalized path.

    Any sub-path entries are processed as well, i.e. those corresponding to zip
    archives embedded in other zip archives.

    Given updater is a callable taking a cache entry key and the original entry
    (after already removing the entry from the cache), and expected to update
    the entry and possibly return a new one to be inserted in its place.
    Returning None indicates that the entry should not be replaced with a new
    one. If no updater is given, the cache entries are simply removed without
    any additional processing, the same as if the updater simply returned None.

    """
    for p in _collect_zipimporter_cache_entries(normalized_path, cache):
        # N.B. pypy's custom zipimport._zip_directory_cache implementation does
        # not support the complete dict interface:
        # * Does not support item assignment, thus not allowing this function
        #    to be used only for removing existing cache entries.
        #  * Does not support the dict.pop() method, forcing us to use the
        #    get/del patterns instead. For more detailed information see the
        #    following links:
        #      https://github.com/pypa/setuptools/issues/202#issuecomment-202913420
        #      https://foss.heptapod.net/pypy/pypy/-/blob/144c4e65cb6accb8e592f3a7584ea38265d1873c/pypy/module/zipimport/interp_zipimport.py
        old_entry = cache[p]
        del cache[p]
        new_entry = updater and updater(p, old_entry)
        if new_entry is not None:
            cache[p] = new_entry


def _uncache(normalized_path, cache):
    _update_zipimporter_cache(normalized_path, cache)


def _remove_and_clear_zip_directory_cache_data(normalized_path):
    def clear_and_remove_cached_zip_archive_directory_data(path, old_entry):
        old_entry.clear()

    _update_zipimporter_cache(
        normalized_path,
        zipimport._zip_directory_cache,
        updater=clear_and_remove_cached_zip_archive_directory_data,
    )


# PyPy Python implementation does not allow directly writing to the
# zipimport._zip_directory_cache and so prevents us from attempting to correct
# its content. The best we can do there is clear the problematic cache content
# and have PyPy repopulate it as needed. The downside is that if there are any
# stale zipimport.zipimporter instances laying around, attempting to use them
# will fail due to not having its zip archive directory information available
# instead of being automatically corrected to use the new correct zip archive
# directory information.
if '__pypy__' in sys.builtin_module_names:
    _replace_zip_directory_cache_data = _remove_and_clear_zip_directory_cache_data
else:

    def _replace_zip_directory_cache_data(normalized_path):
        def replace_cached_zip_archive_directory_data(path, old_entry):
            # N.B. In theory, we could load the zip directory information just
            # once for all updated path spellings, and then copy it locally and
            # update its contained path strings to contain the correct
            # spelling, but that seems like a way too invasive move (this cache
            # structure is not officially documented anywhere and could in
            # theory change with new Python releases) for no significant
            # benefit.
            old_entry.clear()
            zipimport.zipimporter(path)
            old_entry.update(zipimport._zip_directory_cache[path])
            return old_entry

        _update_zipimporter_cache(
            normalized_path,
            zipimport._zip_directory_cache,
            updater=replace_cached_zip_archive_directory_data,
        )


def is_python(text, filename='<string>'):
    "Is this string a valid Python script?"
    try:
        compile(text, filename, 'exec')
    except (SyntaxError, TypeError):
        return False
    else:
        return True


def is_sh(executable):
    """Determine if the specified executable is a .sh (contains a #! line)"""
    try:
        with open(executable, encoding='latin-1') as fp:
            magic = fp.read(2)
    except OSError:
        return executable
    return magic == '#!'


def nt_quote_arg(arg):
    """Quote a command line argument according to Windows parsing rules"""
    return subprocess.list2cmdline([arg])


def is_python_script(script_text, filename):
    """Is this text, as a whole, a Python script? (as opposed to shell/bat/etc."""
    if filename.endswith('.py') or filename.endswith('.pyw'):
        return True  # extension says it's Python
    if is_python(script_text, filename):
        return True  # it's syntactically valid Python
    if script_text.startswith('#!'):
        # It begins with a '#!' line, so check if 'python' is in it somewhere
        return 'python' in script_text.splitlines()[0].lower()

    return False  # Not any Python I can recognize


try:
    from os import chmod as _chmod
except ImportError:
    # Jython compatibility
    def _chmod(*args):
        pass


def chmod(path, mode):
    log.debug("changing mode of %s to %o", path, mode)
    try:
        _chmod(path, mode)
    except os.error as e:
        log.debug("chmod failed: %s", e)


class CommandSpec(list):
    """
    A command spec for a #! header, specified as a list of arguments akin to
    those passed to Popen.
    """

    options = []
    split_args = dict()

    @classmethod
    def best(cls):
        """
        Choose the best CommandSpec class based on environmental conditions.
        """
        return cls

    @classmethod
    def _sys_executable(cls):
        _default = os.path.normpath(sys.executable)
        return os.environ.get('__PYVENV_LAUNCHER__', _default)

    @classmethod
    def from_param(cls, param):
        """
        Construct a CommandSpec from a parameter to build_scripts, which may
        be None.
        """
        if isinstance(param, cls):
            return param
        if isinstance(param, list):
            return cls(param)
        if param is None:
            return cls.from_environment()
        # otherwise, assume it's a string.
        return cls.from_string(param)

    @classmethod
    def from_environment(cls):
        return cls([cls._sys_executable()])

    @classmethod
    def from_string(cls, string):
        """
        Construct a command spec from a simple string representing a command
        line parseable by shlex.split.
        """
        items = shlex.split(string, **cls.split_args)
        return cls(items)

    def install_options(self, script_text):
        self.options = shlex.split(self._extract_options(script_text))
        cmdline = subprocess.list2cmdline(self)
        if not isascii(cmdline):
            self.options[:0] = ['-x']

    @staticmethod
    def _extract_options(orig_script):
        """
        Extract any options from the first line of the script.
        """
        first = (orig_script + '\n').splitlines()[0]
        match = _first_line_re().match(first)
        options = match.group(1) or '' if match else ''
        return options.strip()

    def as_header(self):
        return self._render(self + list(self.options))

    @staticmethod
    def _strip_quotes(item):
        _QUOTES = '"\''
        for q in _QUOTES:
            if item.startswith(q) and item.endswith(q):
                return item[1:-1]
        return item

    @staticmethod
    def _render(items):
        cmdline = subprocess.list2cmdline(
            CommandSpec._strip_quotes(item.strip()) for item in items
        )
        return '#!' + cmdline + '\n'


# For pbr compat; will be removed in a future version.
sys_executable = CommandSpec._sys_executable()


class WindowsCommandSpec(CommandSpec):
    split_args = dict(posix=False)


class ScriptWriter:
    """
    Encapsulates behavior around writing entry point scripts for console and
    gui apps.
    """

    template = textwrap.dedent(
        r"""
        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
        import re
        import sys

        # for compatibility with easy_install; see #2198
        __requires__ = %(spec)r

        try:
            from importlib.metadata import distribution
        except ImportError:
            try:
                from importlib_metadata import distribution
            except ImportError:
                from pkg_resources import load_entry_point


        def importlib_load_entry_point(spec, group, name):
            dist_name, _, _ = spec.partition('==')
            matches = (
                entry_point
                for entry_point in distribution(dist_name).entry_points
                if entry_point.group == group and entry_point.name == name
            )
            return next(matches).load()


        globals().setdefault('load_entry_point', importlib_load_entry_point)


        if __name__ == '__main__':
            sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
            sys.exit(load_entry_point(%(spec)r, %(group)r, %(name)r)())
        """
    ).lstrip()

    command_spec_class = CommandSpec

    @classmethod
    def get_args(cls, dist, header=None):
        """
        Yield write_script() argument tuples for a distribution's
        console_scripts and gui_scripts entry points.
        """
        if header is None:
            header = cls.get_header()
        spec = str(dist.as_requirement())
        for type_ in 'console', 'gui':
            group = type_ + '_scripts'
            for name, ep in dist.get_entry_map(group).items():
                cls._ensure_safe_name(name)
                script_text = cls.template % locals()
                args = cls._get_script_args(type_, name, header, script_text)
                for res in args:
                    yield res

    @staticmethod
    def _ensure_safe_name(name):
        """
        Prevent paths in *_scripts entry point names.
        """
        has_path_sep = re.search(r'[\\/]', name)
        if has_path_sep:
            raise ValueError("Path separators not allowed in script names")

    @classmethod
    def best(cls):
        """
        Select the best ScriptWriter for this environment.
        """
        if sys.platform == 'win32' or (os.name == 'java' and os._name == 'nt'):
            return WindowsScriptWriter.best()
        else:
            return cls

    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        # Simply write the stub with no extension.
        yield (name, header + script_text)

    @classmethod
    def get_header(cls, script_text="", executable=None):
        """Create a #! line, getting options (if any) from script_text"""
        cmd = cls.command_spec_class.best().from_param(executable)
        cmd.install_options(script_text)
        return cmd.as_header()


class WindowsScriptWriter(ScriptWriter):
    command_spec_class = WindowsCommandSpec

    @classmethod
    def best(cls):
        """
        Select the best ScriptWriter suitable for Windows
        """
        writer_lookup = dict(
            executable=WindowsExecutableLauncherWriter,
            natural=cls,
        )
        # for compatibility, use the executable launcher by default
        launcher = os.environ.get('SETUPTOOLS_LAUNCHER', 'executable')
        return writer_lookup[launcher]

    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        "For Windows, add a .py extension"
        ext = dict(console='.pya', gui='.pyw')[type_]
        if ext not in os.environ['PATHEXT'].lower().split(';'):
            msg = (
                "{ext} not listed in PATHEXT; scripts will not be "
                "recognized as executables."
            ).format(**locals())
            SetuptoolsWarning.emit(msg)
        old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe']
        old.remove(ext)
        header = cls._adjust_header(type_, header)
        blockers = [name + x for x in old]
        yield name + ext, header + script_text, 't', blockers

    @classmethod
    def _adjust_header(cls, type_, orig_header):
        """
        Make sure 'pythonw' is used for gui and 'python' is used for
        console (regardless of what sys.executable is).
        """
        pattern = 'pythonw.exe'
        repl = 'python.exe'
        if type_ == 'gui':
            pattern, repl = repl, pattern
        pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE)
        new_header = pattern_ob.sub(string=orig_header, repl=repl)
        return new_header if cls._use_header(new_header) else orig_header

    @staticmethod
    def _use_header(new_header):
        """
        Should _adjust_header use the replaced header?

        On non-windows systems, always use. On
        Windows systems, only use the replaced header if it resolves
        to an executable on the system.
        """
        clean_header = new_header[2:-1].strip('"')
        return sys.platform != 'win32' or find_executable(clean_header)


class WindowsExecutableLauncherWriter(WindowsScriptWriter):
    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        """
        For Windows, add a .py extension and an .exe launcher
        """
        if type_ == 'gui':
            launcher_type = 'gui'
            ext = '-script.pyw'
            old = ['.pyw']
        else:
            launcher_type = 'cli'
            ext = '-script.py'
            old = ['.py', '.pyc', '.pyo']
        hdr = cls._adjust_header(type_, header)
        blockers = [name + x for x in old]
        yield (name + ext, hdr + script_text, 't', blockers)
        yield (
            name + '.exe',
            get_win_launcher(launcher_type),
            'b',  # write in binary mode
        )
        if not is_64bit():
            # install a manifest for the launcher to prevent Windows
            # from detecting it as an installer (which it will for
            #  launchers like easy_install.exe). Consider only
            #  adding a manifest for launchers detected as installers.
            #  See Distribute #143 for details.
            m_name = name + '.exe.manifest'
            yield (m_name, load_launcher_manifest(name), 't')


def get_win_launcher(type):
    """
    Load the Windows launcher (executable) suitable for launching a script.

    `type` should be either 'cli' or 'gui'

    Returns the executable as a byte string.
    """
    launcher_fn = '%s.exe' % type
    if is_64bit():
        if get_platform() == "win-arm64":
            launcher_fn = launcher_fn.replace(".", "-arm64.")
        else:
            launcher_fn = launcher_fn.replace(".", "-64.")
    else:
        launcher_fn = launcher_fn.replace(".", "-32.")
    return resource_string('setuptools', launcher_fn)


def load_launcher_manifest(name):
    manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml')
    return manifest.decode('utf-8') % vars()


def _rmtree(path, ignore_errors=False, onexc=auto_chmod):
    return py312compat.shutil_rmtree(path, ignore_errors, onexc)


def current_umask():
    tmp = os.umask(0o022)
    os.umask(tmp)
    return tmp


def only_strs(values):
    """
    Exclude non-str values. Ref #3063.
    """
    return filter(lambda val: isinstance(val, str), values)


class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning):
    _SUMMARY = "easy_install command is deprecated."
    _DETAILS = """
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.
    """
    _SEE_URL = "https://github.com/pypa/setuptools/issues/917"
    # _DUE_DATE not defined yet
python3.12/site-packages/setuptools/command/rotate.py000064400000004061151732703510016625 0ustar00from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
import os
import shutil

from setuptools import Command


class rotate(Command):
    """Delete older distributions"""

    description = "delete older distributions, keeping N newest files"
    user_options = [
        ('match=', 'm', "patterns to match (required)"),
        ('dist-dir=', 'd', "directory where the distributions are"),
        ('keep=', 'k', "number of matching distributions to keep"),
    ]

    boolean_options = []

    def initialize_options(self):
        self.match = None
        self.dist_dir = None
        self.keep = None

    def finalize_options(self):
        if self.match is None:
            raise DistutilsOptionError(
                "Must specify one or more (comma-separated) match patterns "
                "(e.g. '.zip' or '.egg')"
            )
        if self.keep is None:
            raise DistutilsOptionError("Must specify number of files to keep")
        try:
            self.keep = int(self.keep)
        except ValueError as e:
            raise DistutilsOptionError("--keep must be an integer") from e
        if isinstance(self.match, str):
            self.match = [convert_path(p.strip()) for p in self.match.split(',')]
        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))

    def run(self):
        self.run_command("egg_info")
        from glob import glob

        for pattern in self.match:
            pattern = self.distribution.get_name() + '*' + pattern
            files = glob(os.path.join(self.dist_dir, pattern))
            files = [(os.path.getmtime(f), f) for f in files]
            files.sort()
            files.reverse()

            log.info("%d file(s) matching %s", len(files), pattern)
            files = files[self.keep :]
            for t, f in files:
                log.info("Deleting %s", f)
                if not self.dry_run:
                    if os.path.isdir(f):
                        shutil.rmtree(f)
                    else:
                        os.unlink(f)
python3.12/site-packages/setuptools/command/install_lib.py000064400000007436151732703510017634 0ustar00import os
import sys
from itertools import product, starmap
import distutils.command.install_lib as orig


class install_lib(orig.install_lib):
    """Don't add compiled flags to filenames of non-Python files"""

    def run(self):
        self.build()
        outfiles = self.install()
        if outfiles is not None:
            # always compile, in case we have any extension stubs to deal with
            self.byte_compile(outfiles)

    def get_exclusions(self):
        """
        Return a collections.Sized collections.Container of paths to be
        excluded for single_version_externally_managed installations.
        """
        all_packages = (
            pkg
            for ns_pkg in self._get_SVEM_NSPs()
            for pkg in self._all_packages(ns_pkg)
        )

        excl_specs = product(all_packages, self._gen_exclusion_paths())
        return set(starmap(self._exclude_pkg_path, excl_specs))

    def _exclude_pkg_path(self, pkg, exclusion_path):
        """
        Given a package name and exclusion path within that package,
        compute the full exclusion path.
        """
        parts = pkg.split('.') + [exclusion_path]
        return os.path.join(self.install_dir, *parts)

    @staticmethod
    def _all_packages(pkg_name):
        """
        >>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
        """
        while pkg_name:
            yield pkg_name
            pkg_name, sep, child = pkg_name.rpartition('.')

    def _get_SVEM_NSPs(self):
        """
        Get namespace packages (list) but only for
        single_version_externally_managed installations and empty otherwise.
        """
        # TODO: is it necessary to short-circuit here? i.e. what's the cost
        # if get_finalized_command is called even when namespace_packages is
        # False?
        if not self.distribution.namespace_packages:
            return []

        install_cmd = self.get_finalized_command('install')
        svem = install_cmd.single_version_externally_managed

        return self.distribution.namespace_packages if svem else []

    @staticmethod
    def _gen_exclusion_paths():
        """
        Generate file paths to be excluded for namespace packages (bytecode
        cache files).
        """
        # always exclude the package module itself
        yield '__init__.py'

        yield '__init__.pyc'
        yield '__init__.pyo'

        if not hasattr(sys, 'implementation'):
            return

        base = os.path.join('__pycache__', '__init__.' + sys.implementation.cache_tag)
        yield base + '.pyc'
        yield base + '.pyo'
        yield base + '.opt-1.pyc'
        yield base + '.opt-2.pyc'

    def copy_tree(
        self,
        infile,
        outfile,
        preserve_mode=1,
        preserve_times=1,
        preserve_symlinks=0,
        level=1,
    ):
        assert preserve_mode and preserve_times and not preserve_symlinks
        exclude = self.get_exclusions()

        if not exclude:
            return orig.install_lib.copy_tree(self, infile, outfile)

        # Exclude namespace package __init__.py* files from the output

        from setuptools.archive_util import unpack_directory
        from distutils import log

        outfiles = []

        def pf(src, dst):
            if dst in exclude:
                log.warn("Skipping installation of %s (namespace package)", dst)
                return False

            log.info("copying %s -> %s", src, os.path.dirname(dst))
            outfiles.append(dst)
            return dst

        unpack_directory(infile, outfile, pf)
        return outfiles

    def get_outputs(self):
        outputs = orig.install_lib.get_outputs(self)
        exclude = self.get_exclusions()
        if exclude:
            return [f for f in outputs if f not in exclude]
        return outputs
python3.12/site-packages/setuptools/command/upload_docs.py000064400000017112151732703520017625 0ustar00"""upload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
sites other than PyPi such as devpi).
"""

from base64 import standard_b64encode
from distutils import log
from distutils.errors import DistutilsOptionError
import os
import zipfile
import tempfile
import shutil
import itertools
import functools
import http.client
import urllib.parse

from .._importlib import metadata
from ..warnings import SetuptoolsDeprecationWarning

from .upload import upload


def _encode(s):
    return s.encode('utf-8', 'surrogateescape')


class upload_docs(upload):
    # override the default repository as upload_docs isn't
    # supported by Warehouse (and won't be).
    DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi/'

    description = 'Upload documentation to sites other than PyPi such as devpi'

    user_options = [
        (
            'repository=',
            'r',
            "url of repository [default: %s]" % upload.DEFAULT_REPOSITORY,
        ),
        ('show-response', None, 'display full response text from server'),
        ('upload-dir=', None, 'directory to upload'),
    ]
    boolean_options = upload.boolean_options

    def has_sphinx(self):
        return bool(
            self.upload_dir is None
            and metadata.entry_points(group='distutils.commands', name='build_sphinx')
        )

    sub_commands = [('build_sphinx', has_sphinx)]

    def initialize_options(self):
        upload.initialize_options(self)
        self.upload_dir = None
        self.target_dir = None

    def finalize_options(self):
        log.warn(
            "Upload_docs command is deprecated. Use Read the Docs "
            "(https://readthedocs.org) instead."
        )
        upload.finalize_options(self)
        if self.upload_dir is None:
            if self.has_sphinx():
                build_sphinx = self.get_finalized_command('build_sphinx')
                self.target_dir = dict(build_sphinx.builder_target_dirs)['html']
            else:
                build = self.get_finalized_command('build')
                self.target_dir = os.path.join(build.build_base, 'docs')
        else:
            self.ensure_dirname('upload_dir')
            self.target_dir = self.upload_dir
        self.announce('Using upload directory %s' % self.target_dir)

    def create_zipfile(self, filename):
        zip_file = zipfile.ZipFile(filename, "w")
        try:
            self.mkpath(self.target_dir)  # just in case
            for root, dirs, files in os.walk(self.target_dir):
                if root == self.target_dir and not files:
                    tmpl = "no files found in upload directory '%s'"
                    raise DistutilsOptionError(tmpl % self.target_dir)
                for name in files:
                    full = os.path.join(root, name)
                    relative = root[len(self.target_dir) :].lstrip(os.path.sep)
                    dest = os.path.join(relative, name)
                    zip_file.write(full, dest)
        finally:
            zip_file.close()

    def run(self):
        SetuptoolsDeprecationWarning.emit(
            "Deprecated command",
            """
            upload_docs is deprecated and will be removed in a future version.
            Instead, use tools like devpi and Read the Docs; or lower level tools like
            httpie and curl to interact directly with your hosting service API.
            """,
            due_date=(2023, 9, 26),  # warning introduced in 27 Jul 2022
        )

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        tmp_dir = tempfile.mkdtemp()
        name = self.distribution.metadata.get_name()
        zip_file = os.path.join(tmp_dir, "%s.zip" % name)
        try:
            self.create_zipfile(zip_file)
            self.upload_file(zip_file)
        finally:
            shutil.rmtree(tmp_dir)

    @staticmethod
    def _build_part(item, sep_boundary):
        key, values = item
        title = '\nContent-Disposition: form-data; name="%s"' % key
        # handle multiple entries for the same name
        if not isinstance(values, list):
            values = [values]
        for value in values:
            if isinstance(value, tuple):
                title += '; filename="%s"' % value[0]
                value = value[1]
            else:
                value = _encode(value)
            yield sep_boundary
            yield _encode(title)
            yield b"\n\n"
            yield value
            if value and value[-1:] == b'\r':
                yield b'\n'  # write an extra newline (lurve Macs)

    @classmethod
    def _build_multipart(cls, data):
        """
        Build up the MIME payload for the POST data
        """
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = b'\n--' + boundary.encode('ascii')
        end_boundary = sep_boundary + b'--'
        end_items = (
            end_boundary,
            b"\n",
        )
        builder = functools.partial(
            cls._build_part,
            sep_boundary=sep_boundary,
        )
        part_groups = map(builder, data.items())
        parts = itertools.chain.from_iterable(part_groups)
        body_items = itertools.chain(parts, end_items)
        content_type = 'multipart/form-data; boundary=%s' % boundary
        return b''.join(body_items), content_type

    def upload_file(self, filename):
        with open(filename, 'rb') as f:
            content = f.read()
        meta = self.distribution.metadata
        data = {
            ':action': 'doc_upload',
            'name': meta.get_name(),
            'content': (os.path.basename(filename), content),
        }
        # set up the authentication
        credentials = _encode(self.username + ':' + self.password)
        credentials = standard_b64encode(credentials).decode('ascii')
        auth = "Basic " + credentials

        body, ct = self._build_multipart(data)

        msg = "Submitting documentation to %s" % (self.repository)
        self.announce(msg, log.INFO)

        # build the Request
        # We can't use urllib2 since we need to send the Basic
        # auth right with the first request
        schema, netloc, url, params, query, fragments = urllib.parse.urlparse(
            self.repository
        )
        assert not params and not query and not fragments
        if schema == 'http':
            conn = http.client.HTTPConnection(netloc)
        elif schema == 'https':
            conn = http.client.HTTPSConnection(netloc)
        else:
            raise AssertionError("unsupported schema " + schema)

        data = ''
        try:
            conn.connect()
            conn.putrequest("POST", url)
            content_type = ct
            conn.putheader('Content-type', content_type)
            conn.putheader('Content-length', str(len(body)))
            conn.putheader('Authorization', auth)
            conn.endheaders()
            conn.send(body)
        except OSError as e:
            self.announce(str(e), log.ERROR)
            return

        r = conn.getresponse()
        if r.status == 200:
            msg = 'Server response (%s): %s' % (r.status, r.reason)
            self.announce(msg, log.INFO)
        elif r.status == 301:
            location = r.getheader('Location')
            if location is None:
                location = 'https://pythonhosted.org/%s/' % meta.get_name()
            msg = 'Upload successful. Visit %s' % location
            self.announce(msg, log.INFO)
        else:
            msg = 'Upload failed (%s): %s' % (r.status, r.reason)
            self.announce(msg, log.ERROR)
        if self.show_response:
            print('-' * 75, r.read(), '-' * 75)
python3.12/site-packages/setuptools/command/_requirestxt.py000064400000010157151732703520020071 0ustar00"""Helper code used to generate ``requires.txt`` files in the egg-info directory.

The ``requires.txt`` file has an specific format:
    - Environment markers need to be part of the section headers and
      should not be part of the requirement spec itself.

See https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html#requires-txt
"""
import io
from collections import defaultdict
from itertools import filterfalse
from typing import Dict, List, Tuple, Mapping, TypeVar

from .. import _reqs
from ..extern.jaraco.text import yield_lines
from ..extern.packaging.requirements import Requirement


# dict can work as an ordered set
_T = TypeVar("_T")
_Ordered = Dict[_T, None]
_ordered = dict
_StrOrIter = _reqs._StrOrIter


def _prepare(
    install_requires: _StrOrIter, extras_require: Mapping[str, _StrOrIter]
) -> Tuple[List[str], Dict[str, List[str]]]:
    """Given values for ``install_requires`` and ``extras_require``
    create modified versions in a way that can be written in ``requires.txt``
    """
    extras = _convert_extras_requirements(extras_require)
    return _move_install_requirements_markers(install_requires, extras)


def _convert_extras_requirements(
    extras_require: _StrOrIter,
) -> Mapping[str, _Ordered[Requirement]]:
    """
    Convert requirements in `extras_require` of the form
    `"extra": ["barbazquux; {marker}"]` to
    `"extra:{marker}": ["barbazquux"]`.
    """
    output: Mapping[str, _Ordered[Requirement]] = defaultdict(dict)
    for section, v in extras_require.items():
        # Do not strip empty sections.
        output[section]
        for r in _reqs.parse(v):
            output[section + _suffix_for(r)].setdefault(r)

    return output


def _move_install_requirements_markers(
    install_requires: _StrOrIter, extras_require: Mapping[str, _Ordered[Requirement]]
) -> Tuple[List[str], Dict[str, List[str]]]:
    """
    The ``requires.txt`` file has an specific format:
        - Environment markers need to be part of the section headers and
          should not be part of the requirement spec itself.

    Move requirements in ``install_requires`` that are using environment
    markers ``extras_require``.
    """

    # divide the install_requires into two sets, simple ones still
    # handled by install_requires and more complex ones handled by extras_require.

    inst_reqs = list(_reqs.parse(install_requires))
    simple_reqs = filter(_no_marker, inst_reqs)
    complex_reqs = filterfalse(_no_marker, inst_reqs)
    simple_install_requires = list(map(str, simple_reqs))

    for r in complex_reqs:
        extras_require[':' + str(r.marker)].setdefault(r)

    expanded_extras = dict(
        # list(dict.fromkeys(...))  ensures a list of unique strings
        (k, list(dict.fromkeys(str(r) for r in map(_clean_req, v))))
        for k, v in extras_require.items()
    )

    return simple_install_requires, expanded_extras


def _suffix_for(req):
    """Return the 'extras_require' suffix for a given requirement."""
    return ':' + str(req.marker) if req.marker else ''


def _clean_req(req):
    """Given a Requirement, remove environment markers and return it"""
    r = Requirement(str(req))  # create a copy before modifying
    r.marker = None
    return r


def _no_marker(req):
    return not req.marker


def _write_requirements(stream, reqs):
    lines = yield_lines(reqs or ())

    def append_cr(line):
        return line + '\n'

    lines = map(append_cr, lines)
    stream.writelines(lines)


def write_requirements(cmd, basename, filename):
    dist = cmd.distribution
    data = io.StringIO()
    install_requires, extras_require = _prepare(
        dist.install_requires or (), dist.extras_require or {}
    )
    _write_requirements(data, install_requires)
    for extra in sorted(extras_require):
        data.write('\n[{extra}]\n'.format(**vars()))
        _write_requirements(data, extras_require[extra])
    cmd.write_or_delete_file("requirements", filename, data.getvalue())


def write_setup_requirements(cmd, basename, filename):
    data = io.StringIO()
    _write_requirements(data, cmd.distribution.setup_requires)
    cmd.write_or_delete_file("setup-requirements", filename, data.getvalue())
python3.12/site-packages/setuptools/command/build_clib.py000064400000010673151732703520017426 0ustar00import distutils.command.build_clib as orig
from distutils.errors import DistutilsSetupError
from distutils import log

try:
    from distutils._modified import newer_pairwise_group
except ImportError:
    # fallback for SETUPTOOLS_USE_DISTUTILS=stdlib
    from .._distutils._modified import newer_pairwise_group


class build_clib(orig.build_clib):
    """
    Override the default build_clib behaviour to do the following:

    1. Implement a rudimentary timestamp-based dependency system
       so 'compile()' doesn't run every time.
    2. Add more keys to the 'build_info' dictionary:
        * obj_deps - specify dependencies for each object compiled.
                     this should be a dictionary mapping a key
                     with the source filename to a list of
                     dependencies. Use an empty string for global
                     dependencies.
        * cflags   - specify a list of additional flags to pass to
                     the compiler.
    """

    def build_libraries(self, libraries):
        for lib_name, build_info in libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError(
                    "in 'libraries' option (library '%s'), "
                    "'sources' must be present and must be "
                    "a list of source filenames" % lib_name
                )
            sources = sorted(list(sources))

            log.info("building '%s' library", lib_name)

            # Make sure everything is the correct type.
            # obj_deps should be a dictionary of keys as sources
            # and a list/tuple of files that are its dependencies.
            obj_deps = build_info.get('obj_deps', dict())
            if not isinstance(obj_deps, dict):
                raise DistutilsSetupError(
                    "in 'libraries' option (library '%s'), "
                    "'obj_deps' must be a dictionary of "
                    "type 'source: list'" % lib_name
                )
            dependencies = []

            # Get the global dependencies that are specified by the '' key.
            # These will go into every source's dependency list.
            global_deps = obj_deps.get('', list())
            if not isinstance(global_deps, (list, tuple)):
                raise DistutilsSetupError(
                    "in 'libraries' option (library '%s'), "
                    "'obj_deps' must be a dictionary of "
                    "type 'source: list'" % lib_name
                )

            # Build the list to be used by newer_pairwise_group
            # each source will be auto-added to its dependencies.
            for source in sources:
                src_deps = [source]
                src_deps.extend(global_deps)
                extra_deps = obj_deps.get(source, list())
                if not isinstance(extra_deps, (list, tuple)):
                    raise DistutilsSetupError(
                        "in 'libraries' option (library '%s'), "
                        "'obj_deps' must be a dictionary of "
                        "type 'source: list'" % lib_name
                    )
                src_deps.extend(extra_deps)
                dependencies.append(src_deps)

            expected_objects = self.compiler.object_filenames(
                sources,
                output_dir=self.build_temp,
            )

            if newer_pairwise_group(dependencies, expected_objects) != ([], []):
                # First, compile the source code to object files in the library
                # directory.  (This should probably change to putting object
                # files in a temporary build directory.)
                macros = build_info.get('macros')
                include_dirs = build_info.get('include_dirs')
                cflags = build_info.get('cflags')
                self.compiler.compile(
                    sources,
                    output_dir=self.build_temp,
                    macros=macros,
                    include_dirs=include_dirs,
                    extra_postargs=cflags,
                    debug=self.debug,
                )

            # Now "link" the object files together into a static library.
            # (On Unix at least, this isn't really linking -- it just
            # builds an archive.  Whatever.)
            self.compiler.create_static_lib(
                expected_objects, lib_name, output_dir=self.build_clib, debug=self.debug
            )
python3.12/site-packages/setuptools/command/install_scripts.py000064400000004467151732703520020557 0ustar00from distutils import log
import distutils.command.install_scripts as orig
import os
import sys

from .._path import ensure_directory


class install_scripts(orig.install_scripts):
    """Do normal script install, plus any egg_info wrapper scripts"""

    def initialize_options(self):
        orig.install_scripts.initialize_options(self)
        self.no_ep = False

    def run(self):
        self.run_command("egg_info")
        if self.distribution.scripts:
            orig.install_scripts.run(self)  # run first to set up self.outfiles
        else:
            self.outfiles = []
        if self.no_ep:
            # don't install entry point scripts into .egg file!
            return
        self._install_ep_scripts()

    def _install_ep_scripts(self):
        # Delay import side-effects
        from pkg_resources import Distribution, PathMetadata
        from . import easy_install as ei

        ei_cmd = self.get_finalized_command("egg_info")
        dist = Distribution(
            ei_cmd.egg_base,
            PathMetadata(ei_cmd.egg_base, ei_cmd.egg_info),
            ei_cmd.egg_name,
            ei_cmd.egg_version,
        )
        bs_cmd = self.get_finalized_command('build_scripts')
        exec_param = getattr(bs_cmd, 'executable', None)
        writer = ei.ScriptWriter
        if exec_param == sys.executable:
            # In case the path to the Python executable contains a space, wrap
            # it so it's not split up.
            exec_param = [exec_param]
        # resolve the writer to the environment
        writer = writer.best()
        cmd = writer.command_spec_class.best().from_param(exec_param)
        for args in writer.get_args(dist, cmd.as_header()):
            self.write_script(*args)

    def write_script(self, script_name, contents, mode="t", *ignored):
        """Write an executable file to the scripts directory"""
        from setuptools.command.easy_install import chmod, current_umask

        log.info("Installing %s script to %s", script_name, self.install_dir)
        target = os.path.join(self.install_dir, script_name)
        self.outfiles.append(target)

        mask = current_umask()
        if not self.dry_run:
            ensure_directory(target)
            f = open(target, "w" + mode)
            f.write(contents)
            f.close()
            chmod(target, 0o777 - mask)
python3.12/site-packages/setuptools/command/alias.py000064400000004517151732703520016427 0ustar00from distutils.errors import DistutilsOptionError

from setuptools.command.setopt import edit_config, option_base, config_file


def shquote(arg):
    """Quote an argument for later parsing by shlex.split()"""
    for c in '"', "'", "\\", "#":
        if c in arg:
            return repr(arg)
    if arg.split() != [arg]:
        return repr(arg)
    return arg


class alias(option_base):
    """Define a shortcut that invokes one or more commands"""

    description = "define a shortcut to invoke one or more commands"
    command_consumes_arguments = True

    user_options = [
        ('remove', 'r', 'remove (unset) the alias'),
    ] + option_base.user_options

    boolean_options = option_base.boolean_options + ['remove']

    def initialize_options(self):
        option_base.initialize_options(self)
        self.args = None
        self.remove = None

    def finalize_options(self):
        option_base.finalize_options(self)
        if self.remove and len(self.args) != 1:
            raise DistutilsOptionError(
                "Must specify exactly one argument (the alias name) when "
                "using --remove"
            )

    def run(self):
        aliases = self.distribution.get_option_dict('aliases')

        if not self.args:
            print("Command Aliases")
            print("---------------")
            for alias in aliases:
                print("setup.py alias", format_alias(alias, aliases))
            return

        elif len(self.args) == 1:
            (alias,) = self.args
            if self.remove:
                command = None
            elif alias in aliases:
                print("setup.py alias", format_alias(alias, aliases))
                return
            else:
                print("No alias definition found for %r" % alias)
                return
        else:
            alias = self.args[0]
            command = ' '.join(map(shquote, self.args[1:]))

        edit_config(self.filename, {'aliases': {alias: command}}, self.dry_run)


def format_alias(name, aliases):
    source, command = aliases[name]
    if source == config_file('global'):
        source = '--global-config '
    elif source == config_file('user'):
        source = '--user-config '
    elif source == config_file('local'):
        source = ''
    else:
        source = '--filename=%r' % source
    return source + name + ' ' + command
python3.12/site-packages/setuptools/command/install_egg_info.py000064400000004022151732703520020630 0ustar00from distutils import log, dir_util
import os

from setuptools import Command
from setuptools import namespaces
from setuptools.archive_util import unpack_archive
from .._path import ensure_directory


class install_egg_info(namespaces.Installer, Command):
    """Install an .egg-info directory for the package"""

    description = "Install an .egg-info directory for the package"

    user_options = [
        ('install-dir=', 'd', "directory to install to"),
    ]

    def initialize_options(self):
        self.install_dir = None

    def finalize_options(self):
        self.set_undefined_options('install_lib', ('install_dir', 'install_dir'))
        ei_cmd = self.get_finalized_command("egg_info")
        basename = f"{ei_cmd._get_egg_basename()}.egg-info"
        self.source = ei_cmd.egg_info
        self.target = os.path.join(self.install_dir, basename)
        self.outputs = []

    def run(self):
        self.run_command('egg_info')
        if os.path.isdir(self.target) and not os.path.islink(self.target):
            dir_util.remove_tree(self.target, dry_run=self.dry_run)
        elif os.path.exists(self.target):
            self.execute(os.unlink, (self.target,), "Removing " + self.target)
        if not self.dry_run:
            ensure_directory(self.target)
        self.execute(self.copytree, (), "Copying %s to %s" % (self.source, self.target))
        self.install_namespaces()

    def get_outputs(self):
        return self.outputs

    def copytree(self):
        # Copy the .egg-info tree to site-packages
        def skimmer(src, dst):
            # filter out source-control directories; note that 'src' is always
            # a '/'-separated path, regardless of platform.  'dst' is a
            # platform-specific path.
            for skip in '.svn/', 'CVS/':
                if src.startswith(skip) or '/' + skip in src:
                    return None
            self.outputs.append(dst)
            log.debug("Copying %s to %s", src, dst)
            return dst

        unpack_archive(self.source, self.target, skimmer)
python3.12/site-packages/setuptools/command/__init__.py000064400000000614151732703520017067 0ustar00from distutils.command.bdist import bdist
import sys

if 'egg' not in bdist.format_commands:
    try:
        bdist.format_commands['egg'] = ('bdist_egg', "Python .egg file")
    except TypeError:
        # For backward compatibility with older distutils (stdlib)
        bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
        bdist.format_commands.append('egg')

del bdist, sys
python3.12/site-packages/setuptools/command/saveopts.py000064400000001221151732703520017167 0ustar00from setuptools.command.setopt import edit_config, option_base


class saveopts(option_base):
    """Save command-line options to a file"""

    description = "save supplied options to setup.cfg or other config file"

    def run(self):
        dist = self.distribution
        settings = {}

        for cmd in dist.command_options:
            if cmd == 'saveopts':
                continue  # don't save our own options!

            for opt, (src, val) in dist.get_option_dict(cmd).items():
                if src == "command line":
                    settings.setdefault(cmd, {})[opt] = val

        edit_config(self.filename, settings, self.dry_run)
python3.12/site-packages/setuptools/command/upload.py000064400000000716151732703520016617 0ustar00from distutils import log
from distutils.command import upload as orig

from setuptools.errors import RemovedCommandError


class upload(orig.upload):
    """Formerly used to upload packages to PyPI."""

    def run(self):
        msg = (
            "The upload command has been removed, use twine to upload "
            + "instead (https://pypi.org/p/twine)"
        )

        self.announce("ERROR: " + msg, log.ERROR)
        raise RemovedCommandError(msg)
python3.12/site-packages/setuptools/command/sdist.py000064400000015655151732703520016471 0ustar00from distutils import log
import distutils.command.sdist as orig
import os
import sys
import contextlib
from itertools import chain

from .._importlib import metadata
from .build import _ORIGINAL_SUBCOMMANDS

_default_revctrl = list


def walk_revctrl(dirname=''):
    """Find all files under revision control"""
    for ep in metadata.entry_points(group='setuptools.file_finders'):
        for item in ep.load()(dirname):
            yield item


class sdist(orig.sdist):
    """Smart sdist that finds anything supported by revision control"""

    user_options = [
        ('formats=', None, "formats for source distribution (comma-separated list)"),
        (
            'keep-temp',
            'k',
            "keep the distribution tree around after creating " + "archive file(s)",
        ),
        (
            'dist-dir=',
            'd',
            "directory to put the source distribution archive(s) in " "[default: dist]",
        ),
        (
            'owner=',
            'u',
            "Owner name used when creating a tar file [default: current user]",
        ),
        (
            'group=',
            'g',
            "Group name used when creating a tar file [default: current group]",
        ),
    ]

    negative_opt = {}

    README_EXTENSIONS = ['', '.rst', '.txt', '.md']
    READMES = tuple('README{0}'.format(ext) for ext in README_EXTENSIONS)

    def run(self):
        self.run_command('egg_info')
        ei_cmd = self.get_finalized_command('egg_info')
        self.filelist = ei_cmd.filelist
        self.filelist.append(os.path.join(ei_cmd.egg_info, 'SOURCES.txt'))
        self.check_readme()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        self.make_distribution()

        dist_files = getattr(self.distribution, 'dist_files', [])
        for file in self.archive_files:
            data = ('sdist', '', file)
            if data not in dist_files:
                dist_files.append(data)

    def initialize_options(self):
        orig.sdist.initialize_options(self)

        self._default_to_gztar()

    def _default_to_gztar(self):
        # only needed on Python prior to 3.6.
        if sys.version_info >= (3, 6, 0, 'beta', 1):
            return
        self.formats = ['gztar']

    def make_distribution(self):
        """
        Workaround for #516
        """
        with self._remove_os_link():
            orig.sdist.make_distribution(self)

    @staticmethod
    @contextlib.contextmanager
    def _remove_os_link():
        """
        In a context, remove and restore os.link if it exists
        """

        class NoValue:
            pass

        orig_val = getattr(os, 'link', NoValue)
        try:
            del os.link
        except Exception:
            pass
        try:
            yield
        finally:
            if orig_val is not NoValue:
                setattr(os, 'link', orig_val)

    def add_defaults(self):
        super().add_defaults()
        self._add_defaults_build_sub_commands()

    def _add_defaults_optional(self):
        super()._add_defaults_optional()
        if os.path.isfile('pyproject.toml'):
            self.filelist.append('pyproject.toml')

    def _add_defaults_python(self):
        """getting python files"""
        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            self.filelist.extend(build_py.get_source_files())
            self._add_data_files(self._safe_data_files(build_py))

    def _add_defaults_build_sub_commands(self):
        build = self.get_finalized_command("build")
        missing_cmds = set(build.get_sub_commands()) - _ORIGINAL_SUBCOMMANDS
        # ^-- the original built-in sub-commands are already handled by default.
        cmds = (self.get_finalized_command(c) for c in missing_cmds)
        files = (c.get_source_files() for c in cmds if hasattr(c, "get_source_files"))
        self.filelist.extend(chain.from_iterable(files))

    def _safe_data_files(self, build_py):
        """
        Since the ``sdist`` class is also used to compute the MANIFEST
        (via :obj:`setuptools.command.egg_info.manifest_maker`),
        there might be recursion problems when trying to obtain the list of
        data_files and ``include_package_data=True`` (which in turn depends on
        the files included in the MANIFEST).

        To avoid that, ``manifest_maker`` should be able to overwrite this
        method and avoid recursive attempts to build/analyze the MANIFEST.
        """
        return build_py.data_files

    def _add_data_files(self, data_files):
        """
        Add data files as found in build_py.data_files.
        """
        self.filelist.extend(
            os.path.join(src_dir, name)
            for _, src_dir, _, filenames in data_files
            for name in filenames
        )

    def _add_defaults_data_files(self):
        try:
            super()._add_defaults_data_files()
        except TypeError:
            log.warn("data_files contains unexpected objects")

    def check_readme(self):
        for f in self.READMES:
            if os.path.exists(f):
                return
        else:
            self.warn(
                "standard file not found: should have one of " + ', '.join(self.READMES)
            )

    def make_release_tree(self, base_dir, files):
        orig.sdist.make_release_tree(self, base_dir, files)

        # Save any egg_info command line options used to create this sdist
        dest = os.path.join(base_dir, 'setup.cfg')
        if hasattr(os, 'link') and os.path.exists(dest):
            # unlink and re-copy, since it might be hard-linked, and
            # we don't want to change the source version
            os.unlink(dest)
            self.copy_file('setup.cfg', dest)

        self.get_finalized_command('egg_info').save_version_info(dest)

    def _manifest_is_not_generated(self):
        # check for special comment used in 2.7.1 and higher
        if not os.path.isfile(self.manifest):
            return False

        with open(self.manifest, 'rb') as fp:
            first_line = fp.readline()
        return first_line != '# file GENERATED by distutils, do NOT edit\n'.encode()

    def read_manifest(self):
        """Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        """
        log.info("reading manifest file '%s'", self.manifest)
        manifest = open(self.manifest, 'rb')
        for line in manifest:
            # The manifest must contain UTF-8. See #303.
            try:
                line = line.decode('UTF-8')
            except UnicodeDecodeError:
                log.warn("%r not UTF-8 decodable -- skipping" % line)
                continue
            # ignore comments and blank lines
            line = line.strip()
            if line.startswith('#') or not line:
                continue
            self.filelist.append(line)
        manifest.close()
python3.12/site-packages/setuptools/command/build.py000064400000015200151732703520016424 0ustar00import sys
from typing import TYPE_CHECKING, List, Dict
from distutils.command.build import build as _build

from ..warnings import SetuptoolsDeprecationWarning

if sys.version_info >= (3, 8):
    from typing import Protocol
elif TYPE_CHECKING:
    from typing_extensions import Protocol
else:
    from abc import ABC as Protocol


_ORIGINAL_SUBCOMMANDS = {"build_py", "build_clib", "build_ext", "build_scripts"}


class build(_build):
    # copy to avoid sharing the object with parent class
    sub_commands = _build.sub_commands[:]

    def get_sub_commands(self):
        subcommands = {cmd[0] for cmd in _build.sub_commands}
        if subcommands - _ORIGINAL_SUBCOMMANDS:
            SetuptoolsDeprecationWarning.emit(
                "Direct usage of `distutils` commands",
                """
                It seems that you are using `distutils.command.build` to add
                new subcommands. Using `distutils` directly is considered deprecated,
                please use `setuptools.command.build`.
                """,
                due_date=(2023, 12, 13),  # Warning introduced in 13 Jun 2022.
                see_url="https://peps.python.org/pep-0632/",
            )
            self.sub_commands = _build.sub_commands
        return super().get_sub_commands()


class SubCommand(Protocol):
    """In order to support editable installations (see :pep:`660`) all
    build subcommands **SHOULD** implement this protocol. They also **MUST** inherit
    from ``setuptools.Command``.

    When creating an :pep:`editable wheel <660>`, ``setuptools`` will try to evaluate
    custom ``build`` subcommands using the following procedure:

    1. ``setuptools`` will set the ``editable_mode`` attribute to ``True``
    2. ``setuptools`` will execute the ``run()`` command.

       .. important::
          Subcommands **SHOULD** take advantage of ``editable_mode=True`` to adequate
          its behaviour or perform optimisations.

          For example, if a subcommand doesn't need to generate an extra file and
          all it does is to copy a source file into the build directory,
          ``run()`` **SHOULD** simply "early return".

          Similarly, if the subcommand creates files that would be placed alongside
          Python files in the final distribution, during an editable install
          the command **SHOULD** generate these files "in place" (i.e. write them to
          the original source directory, instead of using the build directory).
          Note that ``get_output_mapping()`` should reflect that and include mappings
          for "in place" builds accordingly.

    3. ``setuptools`` use any knowledge it can derive from the return values of
       ``get_outputs()`` and ``get_output_mapping()`` to create an editable wheel.
       When relevant ``setuptools`` **MAY** attempt to use file links based on the value
       of ``get_output_mapping()``. Alternatively, ``setuptools`` **MAY** attempt to use
       :doc:`import hooks <python:reference/import>` to redirect any attempt to import
       to the directory with the original source code and other files built in place.

    Please note that custom sub-commands **SHOULD NOT** rely on ``run()`` being
    executed (or not) to provide correct return values for ``get_outputs()``,
    ``get_output_mapping()`` or ``get_source_files()``. The ``get_*`` methods should
    work independently of ``run()``.
    """

    editable_mode: bool = False
    """Boolean flag that will be set to ``True`` when setuptools is used for an
    editable installation (see :pep:`660`).
    Implementations **SHOULD** explicitly set the default value of this attribute to
    ``False``.
    When subcommands run, they can use this flag to perform optimizations or change
    their behaviour accordingly.
    """

    build_lib: str
    """String representing the directory where the build artifacts should be stored,
    e.g. ``build/lib``.
    For example, if a distribution wants to provide a Python module named ``pkg.mod``,
    then a corresponding file should be written to ``{build_lib}/package/module.py``.
    A way of thinking about this is that the files saved under ``build_lib``
    would be eventually copied to one of the directories in :obj:`site.PREFIXES`
    upon installation.

    A command that produces platform-independent files (e.g. compiling text templates
    into Python functions), **CAN** initialize ``build_lib`` by copying its value from
    the ``build_py`` command. On the other hand, a command that produces
    platform-specific files **CAN** initialize ``build_lib`` by copying its value from
    the ``build_ext`` command. In general this is done inside the ``finalize_options``
    method with the help of the ``set_undefined_options`` command::

        def finalize_options(self):
            self.set_undefined_options("build_py", ("build_lib", "build_lib"))
            ...
    """

    def initialize_options(self):
        """(Required by the original :class:`setuptools.Command` interface)"""

    def finalize_options(self):
        """(Required by the original :class:`setuptools.Command` interface)"""

    def run(self):
        """(Required by the original :class:`setuptools.Command` interface)"""

    def get_source_files(self) -> List[str]:
        """
        Return a list of all files that are used by the command to create the expected
        outputs.
        For example, if your build command transpiles Java files into Python, you should
        list here all the Java files.
        The primary purpose of this function is to help populating the ``sdist``
        with all the files necessary to build the distribution.
        All files should be strings relative to the project root directory.
        """

    def get_outputs(self) -> List[str]:
        """
        Return a list of files intended for distribution as they would have been
        produced by the build.
        These files should be strings in the form of
        ``"{build_lib}/destination/file/path"``.

        .. note::
           The return value of ``get_output()`` should include all files used as keys
           in ``get_output_mapping()`` plus files that are generated during the build
           and don't correspond to any source file already present in the project.
        """

    def get_output_mapping(self) -> Dict[str, str]:
        """
        Return a mapping between destination files as they would be produced by the
        build (dict keys) into the respective existing (source) files (dict values).
        Existing (source) files should be represented as strings relative to the project
        root directory.
        Destination files should be strings in the form of
        ``"{build_lib}/destination/file/path"``.
        """
python3.12/site-packages/setuptools/command/develop.py000064400000015065151732703520016774 0ustar00from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
import os
import glob

from setuptools.command.easy_install import easy_install
from setuptools import _path
from setuptools import namespaces
import setuptools


class develop(namespaces.DevelopInstaller, easy_install):
    """Set up package for development"""

    description = "install package in 'development mode'"

    user_options = easy_install.user_options + [
        ("uninstall", "u", "Uninstall this source package"),
        ("egg-path=", None, "Set the path to be used in the .egg-link file"),
    ]

    boolean_options = easy_install.boolean_options + ['uninstall']

    command_consumes_arguments = False  # override base

    def run(self):
        if self.uninstall:
            self.multi_version = True
            self.uninstall_link()
            self.uninstall_namespaces()
        else:
            self.install_for_development()
        self.warn_deprecated_options()

    def initialize_options(self):
        self.uninstall = None
        self.egg_path = None
        easy_install.initialize_options(self)
        self.setup_path = None
        self.always_copy_from = '.'  # always copy eggs installed in curdir

    def finalize_options(self):
        import pkg_resources

        ei = self.get_finalized_command("egg_info")
        self.args = [ei.egg_name]

        easy_install.finalize_options(self)
        self.expand_basedirs()
        self.expand_dirs()
        # pick up setup-dir .egg files only: no .egg-info
        self.package_index.scan(glob.glob('*.egg'))

        egg_link_fn = ei.egg_name + '.egg-link'
        self.egg_link = os.path.join(self.install_dir, egg_link_fn)
        self.egg_base = ei.egg_base
        if self.egg_path is None:
            self.egg_path = os.path.abspath(ei.egg_base)

        target = _path.normpath(self.egg_base)
        egg_path = _path.normpath(os.path.join(self.install_dir, self.egg_path))
        if egg_path != target:
            raise DistutilsOptionError(
                "--egg-path must be a relative path from the install"
                " directory to " + target
            )

        # Make a distribution for the package's source
        self.dist = pkg_resources.Distribution(
            target,
            pkg_resources.PathMetadata(target, os.path.abspath(ei.egg_info)),
            project_name=ei.egg_name,
        )

        self.setup_path = self._resolve_setup_path(
            self.egg_base,
            self.install_dir,
            self.egg_path,
        )

    @staticmethod
    def _resolve_setup_path(egg_base, install_dir, egg_path):
        """
        Generate a path from egg_base back to '.' where the
        setup script resides and ensure that path points to the
        setup path from $install_dir/$egg_path.
        """
        path_to_setup = egg_base.replace(os.sep, '/').rstrip('/')
        if path_to_setup != os.curdir:
            path_to_setup = '../' * (path_to_setup.count('/') + 1)
        resolved = _path.normpath(os.path.join(install_dir, egg_path, path_to_setup))
        curdir = _path.normpath(os.curdir)
        if resolved != curdir:
            raise DistutilsOptionError(
                "Can't get a consistent path to setup script from"
                " installation directory",
                resolved,
                curdir,
            )
        return path_to_setup

    def install_for_development(self):
        self.run_command('egg_info')

        # Build extensions in-place
        self.reinitialize_command('build_ext', inplace=1)
        self.run_command('build_ext')

        if setuptools.bootstrap_install_from:
            self.easy_install(setuptools.bootstrap_install_from)
            setuptools.bootstrap_install_from = None

        self.install_namespaces()

        # create an .egg-link in the installation dir, pointing to our egg
        log.info("Creating %s (link to %s)", self.egg_link, self.egg_base)
        if not self.dry_run:
            with open(self.egg_link, "w") as f:
                f.write(self.egg_path + "\n" + self.setup_path)
        # postprocess the installed distro, fixing up .pth, installing scripts,
        # and handling requirements
        self.process_distribution(None, self.dist, not self.no_deps)

    def uninstall_link(self):
        if os.path.exists(self.egg_link):
            log.info("Removing %s (link to %s)", self.egg_link, self.egg_base)
            egg_link_file = open(self.egg_link)
            contents = [line.rstrip() for line in egg_link_file]
            egg_link_file.close()
            if contents not in ([self.egg_path], [self.egg_path, self.setup_path]):
                log.warn("Link points to %s: uninstall aborted", contents)
                return
            if not self.dry_run:
                os.unlink(self.egg_link)
        if not self.dry_run:
            self.update_pth(self.dist)  # remove any .pth link to us
        if self.distribution.scripts:
            # XXX should also check for entry point scripts!
            log.warn("Note: you must uninstall or replace scripts manually!")

    def install_egg_scripts(self, dist):
        if dist is not self.dist:
            # Installing a dependency, so fall back to normal behavior
            return easy_install.install_egg_scripts(self, dist)

        # create wrapper scripts in the script dir, pointing to dist.scripts

        # new-style...
        self.install_wrapper_scripts(dist)

        # ...and old-style
        for script_name in self.distribution.scripts or []:
            script_path = os.path.abspath(convert_path(script_name))
            script_name = os.path.basename(script_path)
            with open(script_path) as strm:
                script_text = strm.read()
            self.install_script(dist, script_name, script_text, script_path)

    def install_wrapper_scripts(self, dist):
        dist = VersionlessRequirement(dist)
        return easy_install.install_wrapper_scripts(self, dist)


class VersionlessRequirement:
    """
    Adapt a pkg_resources.Distribution to simply return the project
    name as the 'requirement' so that scripts will work across
    multiple versions.

    >>> from pkg_resources import Distribution
    >>> dist = Distribution(project_name='foo', version='1.0')
    >>> str(dist.as_requirement())
    'foo==1.0'
    >>> adapted_dist = VersionlessRequirement(dist)
    >>> str(adapted_dist.as_requirement())
    'foo'
    """

    def __init__(self, dist):
        self.__dist = dist

    def __getattr__(self, name):
        return getattr(self.__dist, name)

    def as_requirement(self):
        return self.project_name
python3.12/site-packages/setuptools/command/setopt.py000064400000011477151732703520016657 0ustar00from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
import distutils
import os
import configparser

from setuptools import Command

__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']


def config_file(kind="local"):
    """Get the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    """
    if kind == 'local':
        return 'setup.cfg'
    if kind == 'global':
        return os.path.join(os.path.dirname(distutils.__file__), 'distutils.cfg')
    if kind == 'user':
        dot = os.name == 'posix' and '.' or ''
        return os.path.expanduser(convert_path("~/%spydistutils.cfg" % dot))
    raise ValueError("config_file() type must be 'local', 'global', or 'user'", kind)


def edit_config(filename, settings, dry_run=False):
    """Edit a configuration file to include `settings`

    `settings` is a dictionary of dictionaries or ``None`` values, keyed by
    command/section name.  A ``None`` value means to delete the entire section,
    while a dictionary lists settings to be changed or deleted in that section.
    A setting of ``None`` means to delete that setting.
    """
    log.debug("Reading configuration from %s", filename)
    opts = configparser.RawConfigParser()
    opts.optionxform = lambda x: x
    opts.read([filename])
    for section, options in settings.items():
        if options is None:
            log.info("Deleting section [%s] from %s", section, filename)
            opts.remove_section(section)
        else:
            if not opts.has_section(section):
                log.debug("Adding new section [%s] to %s", section, filename)
                opts.add_section(section)
            for option, value in options.items():
                if value is None:
                    log.debug("Deleting %s.%s from %s", section, option, filename)
                    opts.remove_option(section, option)
                    if not opts.options(section):
                        log.info(
                            "Deleting empty [%s] section from %s", section, filename
                        )
                        opts.remove_section(section)
                else:
                    log.debug(
                        "Setting %s.%s to %r in %s", section, option, value, filename
                    )
                    opts.set(section, option, value)

    log.info("Writing %s", filename)
    if not dry_run:
        with open(filename, 'w') as f:
            opts.write(f)


class option_base(Command):
    """Abstract base class for commands that mess with config files"""

    user_options = [
        ('global-config', 'g', "save options to the site-wide distutils.cfg file"),
        ('user-config', 'u', "save options to the current user's pydistutils.cfg file"),
        ('filename=', 'f', "configuration file to use (default=setup.cfg)"),
    ]

    boolean_options = [
        'global-config',
        'user-config',
    ]

    def initialize_options(self):
        self.global_config = None
        self.user_config = None
        self.filename = None

    def finalize_options(self):
        filenames = []
        if self.global_config:
            filenames.append(config_file('global'))
        if self.user_config:
            filenames.append(config_file('user'))
        if self.filename is not None:
            filenames.append(self.filename)
        if not filenames:
            filenames.append(config_file('local'))
        if len(filenames) > 1:
            raise DistutilsOptionError(
                "Must specify only one configuration file option", filenames
            )
        (self.filename,) = filenames


class setopt(option_base):
    """Save command-line options to a file"""

    description = "set an option in setup.cfg or another config file"

    user_options = [
        ('command=', 'c', 'command to set an option for'),
        ('option=', 'o', 'option to set'),
        ('set-value=', 's', 'value of the option'),
        ('remove', 'r', 'remove (unset) the value'),
    ] + option_base.user_options

    boolean_options = option_base.boolean_options + ['remove']

    def initialize_options(self):
        option_base.initialize_options(self)
        self.command = None
        self.option = None
        self.set_value = None
        self.remove = None

    def finalize_options(self):
        option_base.finalize_options(self)
        if self.command is None or self.option is None:
            raise DistutilsOptionError("Must specify --command *and* --option")
        if self.set_value is None and not self.remove:
            raise DistutilsOptionError("Must specify --set-value or --remove")

    def run(self):
        edit_config(
            self.filename,
            {self.command: {self.option.replace('-', '_'): self.set_value}},
            self.dry_run,
        )
python3.12/site-packages/setuptools/command/egg_info.py000064400000063635151732703520017121 0ustar00"""setuptools.command.egg_info

Create a distribution's .egg-info directory and contents"""

from distutils.filelist import FileList as _FileList
from distutils.errors import DistutilsInternalError
from distutils.util import convert_path
from distutils import log
import distutils.errors
import distutils.filelist
import functools
import os
import re
import sys
import time
import collections

from .._importlib import metadata
from .. import _entry_points, _normalization
from . import _requirestxt

from setuptools import Command
from setuptools.command.sdist import sdist
from setuptools.command.sdist import walk_revctrl
from setuptools.command.setopt import edit_config
from setuptools.command import bdist_egg
import setuptools.unicode_utils as unicode_utils
from setuptools.glob import glob

from setuptools.extern import packaging
from ..warnings import SetuptoolsDeprecationWarning


PY_MAJOR = '{}.{}'.format(*sys.version_info)


def translate_pattern(glob):  # noqa: C901  # is too complex (14)  # FIXME
    """
    Translate a file path glob like '*.txt' in to a regular expression.
    This differs from fnmatch.translate which allows wildcards to match
    directory separators. It also knows about '**/' which matches any number of
    directories.
    """
    pat = ''

    # This will split on '/' within [character classes]. This is deliberate.
    chunks = glob.split(os.path.sep)

    sep = re.escape(os.sep)
    valid_char = '[^%s]' % (sep,)

    for c, chunk in enumerate(chunks):
        last_chunk = c == len(chunks) - 1

        # Chunks that are a literal ** are globstars. They match anything.
        if chunk == '**':
            if last_chunk:
                # Match anything if this is the last component
                pat += '.*'
            else:
                # Match '(name/)*'
                pat += '(?:%s+%s)*' % (valid_char, sep)
            continue  # Break here as the whole path component has been handled

        # Find any special characters in the remainder
        i = 0
        chunk_len = len(chunk)
        while i < chunk_len:
            char = chunk[i]
            if char == '*':
                # Match any number of name characters
                pat += valid_char + '*'
            elif char == '?':
                # Match a name character
                pat += valid_char
            elif char == '[':
                # Character class
                inner_i = i + 1
                # Skip initial !/] chars
                if inner_i < chunk_len and chunk[inner_i] == '!':
                    inner_i = inner_i + 1
                if inner_i < chunk_len and chunk[inner_i] == ']':
                    inner_i = inner_i + 1

                # Loop till the closing ] is found
                while inner_i < chunk_len and chunk[inner_i] != ']':
                    inner_i = inner_i + 1

                if inner_i >= chunk_len:
                    # Got to the end of the string without finding a closing ]
                    # Do not treat this as a matching group, but as a literal [
                    pat += re.escape(char)
                else:
                    # Grab the insides of the [brackets]
                    inner = chunk[i + 1 : inner_i]
                    char_class = ''

                    # Class negation
                    if inner[0] == '!':
                        char_class = '^'
                        inner = inner[1:]

                    char_class += re.escape(inner)
                    pat += '[%s]' % (char_class,)

                    # Skip to the end ]
                    i = inner_i
            else:
                pat += re.escape(char)
            i += 1

        # Join each chunk with the dir separator
        if not last_chunk:
            pat += sep

    pat += r'\Z'
    return re.compile(pat, flags=re.MULTILINE | re.DOTALL)


class InfoCommon:
    tag_build = None
    tag_date = None

    @property
    def name(self):
        return _normalization.safe_name(self.distribution.get_name())

    def tagged_version(self):
        tagged = self._maybe_tag(self.distribution.get_version())
        return _normalization.safe_version(tagged)

    def _maybe_tag(self, version):
        """
        egg_info may be called more than once for a distribution,
        in which case the version string already contains all tags.
        """
        return (
            version
            if self.vtags and self._already_tagged(version)
            else version + self.vtags
        )

    def _already_tagged(self, version: str) -> bool:
        # Depending on their format, tags may change with version normalization.
        # So in addition the regular tags, we have to search for the normalized ones.
        return version.endswith(self.vtags) or version.endswith(self._safe_tags())

    def _safe_tags(self) -> str:
        # To implement this we can rely on `safe_version` pretending to be version 0
        # followed by tags. Then we simply discard the starting 0 (fake version number)
        try:
            return _normalization.safe_version(f"0{self.vtags}")[1:]
        except packaging.version.InvalidVersion:
            return _normalization.safe_name(self.vtags.replace(' ', '.'))

    def tags(self) -> str:
        version = ''
        if self.tag_build:
            version += self.tag_build
        if self.tag_date:
            version += time.strftime("%Y%m%d")
        return version

    vtags = property(tags)


class egg_info(InfoCommon, Command):
    description = "create a distribution's .egg-info directory"

    user_options = [
        (
            'egg-base=',
            'e',
            "directory containing .egg-info directories"
            " (default: top of the source tree)",
        ),
        ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"),
        ('tag-build=', 'b', "Specify explicit tag to add to version number"),
        ('no-date', 'D', "Don't include date stamp [default]"),
    ]

    boolean_options = ['tag-date']
    negative_opt = {
        'no-date': 'tag-date',
    }

    def initialize_options(self):
        self.egg_base = None
        self.egg_name = None
        self.egg_info = None
        self.egg_version = None
        self.ignore_egg_info_in_manifest = False

    ####################################
    # allow the 'tag_svn_revision' to be detected and
    # set, supporting sdists built on older Setuptools.
    @property
    def tag_svn_revision(self):
        pass

    @tag_svn_revision.setter
    def tag_svn_revision(self, value):
        pass

    ####################################

    def save_version_info(self, filename):
        """
        Materialize the value of date into the
        build tag. Install build keys in a deterministic order
        to avoid arbitrary reordering on subsequent builds.
        """
        egg_info = collections.OrderedDict()
        # follow the order these keys would have been added
        # when PYTHONHASHSEED=0
        egg_info['tag_build'] = self.tags()
        egg_info['tag_date'] = 0
        edit_config(filename, dict(egg_info=egg_info))

    def finalize_options(self):
        # Note: we need to capture the current value returned
        # by `self.tagged_version()`, so we can later update
        # `self.distribution.metadata.version` without
        # repercussions.
        self.egg_name = self.name
        self.egg_version = self.tagged_version()
        parsed_version = packaging.version.Version(self.egg_version)

        try:
            is_version = isinstance(parsed_version, packaging.version.Version)
            spec = "%s==%s" if is_version else "%s===%s"
            packaging.requirements.Requirement(spec % (self.egg_name, self.egg_version))
        except ValueError as e:
            raise distutils.errors.DistutilsOptionError(
                "Invalid distribution name or version syntax: %s-%s"
                % (self.egg_name, self.egg_version)
            ) from e

        if self.egg_base is None:
            dirs = self.distribution.package_dir
            self.egg_base = (dirs or {}).get('', os.curdir)

        self.ensure_dirname('egg_base')
        self.egg_info = _normalization.filename_component(self.egg_name) + '.egg-info'
        if self.egg_base != os.curdir:
            self.egg_info = os.path.join(self.egg_base, self.egg_info)

        # Set package version for the benefit of dumber commands
        # (e.g. sdist, bdist_wininst, etc.)
        #
        self.distribution.metadata.version = self.egg_version

        # If we bootstrapped around the lack of a PKG-INFO, as might be the
        # case in a fresh checkout, make sure that any special tags get added
        # to the version info
        #
        pd = self.distribution._patched_dist
        key = getattr(pd, "key", None) or getattr(pd, "name", None)
        if pd is not None and key == self.egg_name.lower():
            pd._version = self.egg_version
            pd._parsed_version = packaging.version.Version(self.egg_version)
            self.distribution._patched_dist = None

    def _get_egg_basename(self, py_version=PY_MAJOR, platform=None):
        """Compute filename of the output egg. Private API."""
        return _egg_basename(self.egg_name, self.egg_version, py_version, platform)

    def write_or_delete_file(self, what, filename, data, force=False):
        """Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        """
        if data:
            self.write_file(what, filename, data)
        elif os.path.exists(filename):
            if data is None and not force:
                log.warn("%s not set in setup(), but %s exists", what, filename)
                return
            else:
                self.delete_file(filename)

    def write_file(self, what, filename, data):
        """Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        """
        log.info("writing %s to %s", what, filename)
        data = data.encode("utf-8")
        if not self.dry_run:
            f = open(filename, 'wb')
            f.write(data)
            f.close()

    def delete_file(self, filename):
        """Delete `filename` (if not a dry run) after announcing it"""
        log.info("deleting %s", filename)
        if not self.dry_run:
            os.unlink(filename)

    def run(self):
        self.mkpath(self.egg_info)
        try:
            os.utime(self.egg_info, None)
        except OSError as e:
            msg = f"Cannot update time stamp of directory '{self.egg_info}'"
            raise distutils.errors.DistutilsFileError(msg) from e
        for ep in metadata.entry_points(group='egg_info.writers'):
            writer = ep.load()
            writer(self, ep.name, os.path.join(self.egg_info, ep.name))

        # Get rid of native_libs.txt if it was put there by older bdist_egg
        nl = os.path.join(self.egg_info, "native_libs.txt")
        if os.path.exists(nl):
            self.delete_file(nl)

        self.find_sources()

    def find_sources(self):
        """Generate SOURCES.txt manifest file"""
        manifest_filename = os.path.join(self.egg_info, "SOURCES.txt")
        mm = manifest_maker(self.distribution)
        mm.ignore_egg_info_dir = self.ignore_egg_info_in_manifest
        mm.manifest = manifest_filename
        mm.run()
        self.filelist = mm.filelist


class FileList(_FileList):
    # Implementations of the various MANIFEST.in commands

    def __init__(self, warn=None, debug_print=None, ignore_egg_info_dir=False):
        super().__init__(warn, debug_print)
        self.ignore_egg_info_dir = ignore_egg_info_dir

    def process_template_line(self, line):
        # Parse the line: split it up, make sure the right number of words
        # is there, and return the relevant words.  'action' is always
        # defined: it's the first word of the line.  Which of the other
        # three are defined depends on the action; it'll be either
        # patterns, (dir and patterns), or (dir_pattern).
        (action, patterns, dir, dir_pattern) = self._parse_template_line(line)

        action_map = {
            'include': self.include,
            'exclude': self.exclude,
            'global-include': self.global_include,
            'global-exclude': self.global_exclude,
            'recursive-include': functools.partial(
                self.recursive_include,
                dir,
            ),
            'recursive-exclude': functools.partial(
                self.recursive_exclude,
                dir,
            ),
            'graft': self.graft,
            'prune': self.prune,
        }
        log_map = {
            'include': "warning: no files found matching '%s'",
            'exclude': ("warning: no previously-included files found " "matching '%s'"),
            'global-include': (
                "warning: no files found matching '%s' " "anywhere in distribution"
            ),
            'global-exclude': (
                "warning: no previously-included files matching "
                "'%s' found anywhere in distribution"
            ),
            'recursive-include': (
                "warning: no files found matching '%s' " "under directory '%s'"
            ),
            'recursive-exclude': (
                "warning: no previously-included files matching "
                "'%s' found under directory '%s'"
            ),
            'graft': "warning: no directories found matching '%s'",
            'prune': "no previously-included directories found matching '%s'",
        }

        try:
            process_action = action_map[action]
        except KeyError:
            raise DistutilsInternalError(
                "this cannot happen: invalid action '{action!s}'".format(action=action),
            )

        # OK, now we know that the action is valid and we have the
        # right number of words on the line for that action -- so we
        # can proceed with minimal error-checking.

        action_is_recursive = action.startswith('recursive-')
        if action in {'graft', 'prune'}:
            patterns = [dir_pattern]
        extra_log_args = (dir,) if action_is_recursive else ()
        log_tmpl = log_map[action]

        self.debug_print(
            ' '.join(
                [action] + ([dir] if action_is_recursive else []) + patterns,
            )
        )
        for pattern in patterns:
            if not process_action(pattern):
                log.warn(log_tmpl, pattern, *extra_log_args)

    def _remove_files(self, predicate):
        """
        Remove all files from the file list that match the predicate.
        Return True if any matching files were removed
        """
        found = False
        for i in range(len(self.files) - 1, -1, -1):
            if predicate(self.files[i]):
                self.debug_print(" removing " + self.files[i])
                del self.files[i]
                found = True
        return found

    def include(self, pattern):
        """Include files that match 'pattern'."""
        found = [f for f in glob(pattern) if not os.path.isdir(f)]
        self.extend(found)
        return bool(found)

    def exclude(self, pattern):
        """Exclude files that match 'pattern'."""
        match = translate_pattern(pattern)
        return self._remove_files(match.match)

    def recursive_include(self, dir, pattern):
        """
        Include all files anywhere in 'dir/' that match the pattern.
        """
        full_pattern = os.path.join(dir, '**', pattern)
        found = [f for f in glob(full_pattern, recursive=True) if not os.path.isdir(f)]
        self.extend(found)
        return bool(found)

    def recursive_exclude(self, dir, pattern):
        """
        Exclude any file anywhere in 'dir/' that match the pattern.
        """
        match = translate_pattern(os.path.join(dir, '**', pattern))
        return self._remove_files(match.match)

    def graft(self, dir):
        """Include all files from 'dir/'."""
        found = [
            item
            for match_dir in glob(dir)
            for item in distutils.filelist.findall(match_dir)
        ]
        self.extend(found)
        return bool(found)

    def prune(self, dir):
        """Filter out files from 'dir/'."""
        match = translate_pattern(os.path.join(dir, '**'))
        return self._remove_files(match.match)

    def global_include(self, pattern):
        """
        Include all files anywhere in the current directory that match the
        pattern. This is very inefficient on large file trees.
        """
        if self.allfiles is None:
            self.findall()
        match = translate_pattern(os.path.join('**', pattern))
        found = [f for f in self.allfiles if match.match(f)]
        self.extend(found)
        return bool(found)

    def global_exclude(self, pattern):
        """
        Exclude all files anywhere that match the pattern.
        """
        match = translate_pattern(os.path.join('**', pattern))
        return self._remove_files(match.match)

    def append(self, item):
        if item.endswith('\r'):  # Fix older sdists built on Windows
            item = item[:-1]
        path = convert_path(item)

        if self._safe_path(path):
            self.files.append(path)

    def extend(self, paths):
        self.files.extend(filter(self._safe_path, paths))

    def _repair(self):
        """
        Replace self.files with only safe paths

        Because some owners of FileList manipulate the underlying
        ``files`` attribute directly, this method must be called to
        repair those paths.
        """
        self.files = list(filter(self._safe_path, self.files))

    def _safe_path(self, path):
        enc_warn = "'%s' not %s encodable -- skipping"

        # To avoid accidental trans-codings errors, first to unicode
        u_path = unicode_utils.filesys_decode(path)
        if u_path is None:
            log.warn("'%s' in unexpected encoding -- skipping" % path)
            return False

        # Must ensure utf-8 encodability
        utf8_path = unicode_utils.try_encode(u_path, "utf-8")
        if utf8_path is None:
            log.warn(enc_warn, path, 'utf-8')
            return False

        try:
            # ignore egg-info paths
            is_egg_info = ".egg-info" in u_path or b".egg-info" in utf8_path
            if self.ignore_egg_info_dir and is_egg_info:
                return False
            # accept is either way checks out
            if os.path.exists(u_path) or os.path.exists(utf8_path):
                return True
        # this will catch any encode errors decoding u_path
        except UnicodeEncodeError:
            log.warn(enc_warn, path, sys.getfilesystemencoding())


class manifest_maker(sdist):
    template = "MANIFEST.in"

    def initialize_options(self):
        self.use_defaults = 1
        self.prune = 1
        self.manifest_only = 1
        self.force_manifest = 1
        self.ignore_egg_info_dir = False

    def finalize_options(self):
        pass

    def run(self):
        self.filelist = FileList(ignore_egg_info_dir=self.ignore_egg_info_dir)
        if not os.path.exists(self.manifest):
            self.write_manifest()  # it must exist so it'll get in the list
        self.add_defaults()
        if os.path.exists(self.template):
            self.read_template()
        self.add_license_files()
        self._add_referenced_files()
        self.prune_file_list()
        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest()

    def _manifest_normalize(self, path):
        path = unicode_utils.filesys_decode(path)
        return path.replace(os.sep, '/')

    def write_manifest(self):
        """
        Write the file list in 'self.filelist' to the manifest file
        named by 'self.manifest'.
        """
        self.filelist._repair()

        # Now _repairs should encodability, but not unicode
        files = [self._manifest_normalize(f) for f in self.filelist.files]
        msg = "writing manifest file '%s'" % self.manifest
        self.execute(write_file, (self.manifest, files), msg)

    def warn(self, msg):
        if not self._should_suppress_warning(msg):
            sdist.warn(self, msg)

    @staticmethod
    def _should_suppress_warning(msg):
        """
        suppress missing-file warnings from sdist
        """
        return re.match(r"standard file .*not found", msg)

    def add_defaults(self):
        sdist.add_defaults(self)
        self.filelist.append(self.template)
        self.filelist.append(self.manifest)
        rcfiles = list(walk_revctrl())
        if rcfiles:
            self.filelist.extend(rcfiles)
        elif os.path.exists(self.manifest):
            self.read_manifest()

        if os.path.exists("setup.py"):
            # setup.py should be included by default, even if it's not
            # the script called to create the sdist
            self.filelist.append("setup.py")

        ei_cmd = self.get_finalized_command('egg_info')
        self.filelist.graft(ei_cmd.egg_info)

    def add_license_files(self):
        license_files = self.distribution.metadata.license_files or []
        for lf in license_files:
            log.info("adding license file '%s'", lf)
        self.filelist.extend(license_files)

    def _add_referenced_files(self):
        """Add files referenced by the config (e.g. `file:` directive) to filelist"""
        referenced = getattr(self.distribution, '_referenced_files', [])
        # ^-- fallback if dist comes from distutils or is a custom class
        for rf in referenced:
            log.debug("adding file referenced by config '%s'", rf)
        self.filelist.extend(referenced)

    def prune_file_list(self):
        build = self.get_finalized_command('build')
        base_dir = self.distribution.get_fullname()
        self.filelist.prune(build.build_base)
        self.filelist.prune(base_dir)
        sep = re.escape(os.sep)
        self.filelist.exclude_pattern(
            r'(^|' + sep + r')(RCS|CVS|\.svn)' + sep, is_regex=1
        )

    def _safe_data_files(self, build_py):
        """
        The parent class implementation of this method
        (``sdist``) will try to include data files, which
        might cause recursion problems when
        ``include_package_data=True``.

        Therefore, avoid triggering any attempt of
        analyzing/building the manifest again.
        """
        if hasattr(build_py, 'get_data_files_without_manifest'):
            return build_py.get_data_files_without_manifest()

        SetuptoolsDeprecationWarning.emit(
            "`build_py` command does not inherit from setuptools' `build_py`.",
            """
            Custom 'build_py' does not implement 'get_data_files_without_manifest'.
            Please extend command classes from setuptools instead of distutils.
            """,
            see_url="https://peps.python.org/pep-0632/",
            # due_date not defined yet, old projects might still do it?
        )
        return build_py.get_data_files()


def write_file(filename, contents):
    """Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    """
    contents = "\n".join(contents)

    # assuming the contents has been vetted for utf-8 encoding
    contents = contents.encode("utf-8")

    with open(filename, "wb") as f:  # always write POSIX-style manifest
        f.write(contents)


def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name

        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution, 'zip_safe', None)

        bdist_egg.write_safety_flag(cmd.egg_info, safe)


def warn_depends_obsolete(cmd, basename, filename):
    """
    Unused: left to avoid errors when updating (from source) from <= 67.8.
    Old installations have a .dist-info directory with the entry-point
    ``depends.txt = setuptools.command.egg_info:warn_depends_obsolete``.
    This may trigger errors when running the first egg_info in build_meta.
    TODO: Remove this function in a version sufficiently > 68.
    """


# Export API used in entry_points
write_requirements = _requirestxt.write_requirements
write_setup_requirements = _requirestxt.write_setup_requirements


def write_toplevel_names(cmd, basename, filename):
    pkgs = dict.fromkeys(
        [k.split('.', 1)[0] for k in cmd.distribution.iter_distribution_names()]
    )
    cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs)) + '\n')


def overwrite_arg(cmd, basename, filename):
    write_arg(cmd, basename, filename, True)


def write_arg(cmd, basename, filename, force=False):
    argname = os.path.splitext(basename)[0]
    value = getattr(cmd.distribution, argname, None)
    if value is not None:
        value = '\n'.join(value) + '\n'
    cmd.write_or_delete_file(argname, filename, value, force)


def write_entries(cmd, basename, filename):
    eps = _entry_points.load(cmd.distribution.entry_points)
    defn = _entry_points.render(eps)
    cmd.write_or_delete_file('entry points', filename, defn, True)


def _egg_basename(egg_name, egg_version, py_version=None, platform=None):
    """Compute filename of the output egg. Private API."""
    name = _normalization.filename_component(egg_name)
    version = _normalization.filename_component(egg_version)
    egg = f"{name}-{version}-py{py_version or PY_MAJOR}"
    if platform:
        egg += f"-{platform}"
    return egg


class EggInfoDeprecationWarning(SetuptoolsDeprecationWarning):
    """Deprecated behavior warning for EggInfo, bypassing suppression."""
python3.12/site-packages/setuptools/command/install.py000064400000012773151732703520017007 0ustar00from distutils.errors import DistutilsArgError
import inspect
import glob
import platform
import distutils.command.install as orig

import setuptools
from ..warnings import SetuptoolsDeprecationWarning, SetuptoolsWarning

# Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for
# now. See https://github.com/pypa/setuptools/issues/199/
_install = orig.install


class install(orig.install):
    """Use easy_install to install the package, w/dependencies"""

    user_options = orig.install.user_options + [
        ('old-and-unmanageable', None, "Try not to use this!"),
        (
            'single-version-externally-managed',
            None,
            "used by system package builders to create 'flat' eggs",
        ),
    ]
    boolean_options = orig.install.boolean_options + [
        'old-and-unmanageable',
        'single-version-externally-managed',
    ]
    new_commands = [
        ('install_egg_info', lambda self: True),
        ('install_scripts', lambda self: True),
    ]
    _nc = dict(new_commands)

    def initialize_options(self):
        SetuptoolsDeprecationWarning.emit(
            "setup.py install is deprecated.",
            """
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.
            """,
            see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
            # TODO: Document how to bootstrap setuptools without install
            #       (e.g. by unziping the wheel file)
            #       and then add a due_date to this warning.
        )

        orig.install.initialize_options(self)
        self.old_and_unmanageable = None
        self.single_version_externally_managed = None

    def finalize_options(self):
        orig.install.finalize_options(self)
        if self.root:
            self.single_version_externally_managed = True
        elif self.single_version_externally_managed:
            if not self.root and not self.record:
                raise DistutilsArgError(
                    "You must specify --record or --root when building system"
                    " packages"
                )

    def handle_extra_path(self):
        if self.root or self.single_version_externally_managed:
            # explicit backward-compatibility mode, allow extra_path to work
            return orig.install.handle_extra_path(self)

        # Ignore extra_path when installing an egg (or being run by another
        # command without --root or --single-version-externally-managed
        self.path_file = None
        self.extra_dirs = ''

    def run(self):
        # Explicit request for old-style install?  Just do it
        if self.old_and_unmanageable or self.single_version_externally_managed:
            return orig.install.run(self)

        if not self._called_from_setup(inspect.currentframe()):
            # Run in backward-compatibility mode to support bdist_* commands.
            orig.install.run(self)
        else:
            self.do_egg_install()

    @staticmethod
    def _called_from_setup(run_frame):
        """
        Attempt to detect whether run() was called from setup() or by another
        command.  If called by setup(), the parent caller will be the
        'run_command' method in 'distutils.dist', and *its* caller will be
        the 'run_commands' method.  If called any other way, the
        immediate caller *might* be 'run_command', but it won't have been
        called by 'run_commands'. Return True in that case or if a call stack
        is unavailable. Return False otherwise.
        """
        if run_frame is None:
            msg = "Call stack not available. bdist_* commands may fail."
            SetuptoolsWarning.emit(msg)
            if platform.python_implementation() == 'IronPython':
                msg = "For best results, pass -X:Frames to enable call stack."
                SetuptoolsWarning.emit(msg)
            return True

        frames = inspect.getouterframes(run_frame)
        for frame in frames[2:4]:
            (caller,) = frame[:1]
            info = inspect.getframeinfo(caller)
            caller_module = caller.f_globals.get('__name__', '')

            if caller_module == "setuptools.dist" and info.function == "run_command":
                # Starting from v61.0.0 setuptools overwrites dist.run_command
                continue

            return caller_module == 'distutils.dist' and info.function == 'run_commands'

    def do_egg_install(self):
        easy_install = self.distribution.get_command_class('easy_install')

        cmd = easy_install(
            self.distribution,
            args="x",
            root=self.root,
            record=self.record,
        )
        cmd.ensure_finalized()  # finalize before bdist_egg munges install cmd
        cmd.always_copy_from = '.'  # make sure local-dir eggs get installed

        # pick up setup-dir .egg files only: no .egg-info
        cmd.package_index.scan(glob.glob('*.egg'))

        self.run_command('bdist_egg')
        args = [self.distribution.get_command_obj('bdist_egg').egg_output]

        if setuptools.bootstrap_install_from:
            # Bootstrap self-installation of setuptools
            args.insert(0, setuptools.bootstrap_install_from)

        cmd.args = args
        cmd.run(show_deprecation=False)
        setuptools.bootstrap_install_from = None


# XXX Python 3.1 doesn't see _nc if this is inside the class
install.sub_commands = [
    cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc
] + install.new_commands
python3.12/site-packages/setuptools/_itertools.py000064400000001243151732703520016074 0ustar00from setuptools.extern.more_itertools import consume  # noqa: F401


# copied from jaraco.itertools 6.1
def ensure_unique(iterable, key=lambda x: x):
    """
    Wrap an iterable to raise a ValueError if non-unique values are encountered.

    >>> list(ensure_unique('abc'))
    ['a', 'b', 'c']
    >>> consume(ensure_unique('abca'))
    Traceback (most recent call last):
    ...
    ValueError: Duplicate element 'a' encountered.
    """
    seen = set()
    seen_add = seen.add
    for element in iterable:
        k = key(element)
        if k in seen:
            raise ValueError(f"Duplicate element {element!r} encountered.")
        seen_add(k)
        yield element
python3.12/site-packages/setuptools/windows_support.py000064400000001320151732703520017173 0ustar00import platform


def windows_only(func):
    if platform.system() != 'Windows':
        return lambda *args, **kwargs: None
    return func


@windows_only
def hide_file(path):
    """
    Set the hidden attribute on a file or directory.

    From https://stackoverflow.com/questions/19622133/

    `path` must be text.
    """
    import ctypes

    __import__('ctypes.wintypes')
    SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW
    SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD
    SetFileAttributes.restype = ctypes.wintypes.BOOL

    FILE_ATTRIBUTE_HIDDEN = 0x02

    ret = SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN)
    if not ret:
        raise ctypes.WinError()
python3.12/site-packages/setuptools/_distutils/errors.py000064400000007005151732703530017413 0ustar00"""distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error"."""


class DistutilsError(Exception):
    """The root of all Distutils evil."""

    pass


class DistutilsModuleError(DistutilsError):
    """Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes)."""

    pass


class DistutilsClassError(DistutilsError):
    """Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface."""

    pass


class DistutilsGetoptError(DistutilsError):
    """The option table provided to 'fancy_getopt()' is bogus."""

    pass


class DistutilsArgError(DistutilsError):
    """Raised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage."""

    pass


class DistutilsFileError(DistutilsError):
    """Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised."""

    pass


class DistutilsOptionError(DistutilsError):
    """Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead."""

    pass


class DistutilsSetupError(DistutilsError):
    """For errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'."""

    pass


class DistutilsPlatformError(DistutilsError):
    """We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass."""

    pass


class DistutilsExecError(DistutilsError):
    """Any problems executing an external program (such as the C
    compiler, when compiling C files)."""

    pass


class DistutilsInternalError(DistutilsError):
    """Internal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!)."""

    pass


class DistutilsTemplateError(DistutilsError):
    """Syntax error in a file list template."""


class DistutilsByteCompileError(DistutilsError):
    """Byte compile error."""


# Exception classes used by the CCompiler implementation classes
class CCompilerError(Exception):
    """Some compile/link operation failed."""


class PreprocessError(CCompilerError):
    """Failure to preprocess one or more C/C++ files."""


class CompileError(CCompilerError):
    """Failure to compile one or more C/C++ source files."""


class LibError(CCompilerError):
    """Failure to create a static library from one or more C/C++ object
    files."""


class LinkError(CCompilerError):
    """Failure to link one or more C/C++ object files into an executable
    or shared library file."""


class UnknownFileError(CCompilerError):
    """Attempt to process an unknown file type."""
python3.12/site-packages/setuptools/_distutils/_msvccompiler.py000064400000046240151732703530020745 0ustar00"""distutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)
# ported to VS 2005 and VS 2008 by Christian Heimes
# ported to VS 2015 by Steve Dower

import os
import subprocess
import contextlib
import warnings
import unittest.mock as mock

with contextlib.suppress(ImportError):
    import winreg

from .errors import (
    DistutilsExecError,
    DistutilsPlatformError,
    CompileError,
    LibError,
    LinkError,
)
from .ccompiler import CCompiler, gen_lib_options
from ._log import log
from .util import get_platform

from itertools import count


def _find_vc2015():
    try:
        key = winreg.OpenKeyEx(
            winreg.HKEY_LOCAL_MACHINE,
            r"Software\Microsoft\VisualStudio\SxS\VC7",
            access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY,
        )
    except OSError:
        log.debug("Visual C++ is not registered")
        return None, None

    best_version = 0
    best_dir = None
    with key:
        for i in count():
            try:
                v, vc_dir, vt = winreg.EnumValue(key, i)
            except OSError:
                break
            if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir):
                try:
                    version = int(float(v))
                except (ValueError, TypeError):
                    continue
                if version >= 14 and version > best_version:
                    best_version, best_dir = version, vc_dir
    return best_version, best_dir


def _find_vc2017():
    """Returns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    """
    root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
    if not root:
        return None, None

    try:
        path = subprocess.check_output(
            [
                os.path.join(
                    root, "Microsoft Visual Studio", "Installer", "vswhere.exe"
                ),
                "-latest",
                "-prerelease",
                "-requires",
                "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
                "-property",
                "installationPath",
                "-products",
                "*",
            ],
            encoding="mbcs",
            errors="strict",
        ).strip()
    except (subprocess.CalledProcessError, OSError, UnicodeDecodeError):
        return None, None

    path = os.path.join(path, "VC", "Auxiliary", "Build")
    if os.path.isdir(path):
        return 15, path

    return None, None


PLAT_SPEC_TO_RUNTIME = {
    'x86': 'x86',
    'x86_amd64': 'x64',
    'x86_arm': 'arm',
    'x86_arm64': 'arm64',
}


def _find_vcvarsall(plat_spec):
    # bpo-38597: Removed vcruntime return value
    _, best_dir = _find_vc2017()

    if not best_dir:
        best_version, best_dir = _find_vc2015()

    if not best_dir:
        log.debug("No suitable Visual C++ version found")
        return None, None

    vcvarsall = os.path.join(best_dir, "vcvarsall.bat")
    if not os.path.isfile(vcvarsall):
        log.debug("%s cannot be found", vcvarsall)
        return None, None

    return vcvarsall, None


def _get_vc_env(plat_spec):
    if os.getenv("DISTUTILS_USE_SDK"):
        return {key.lower(): value for key, value in os.environ.items()}

    vcvarsall, _ = _find_vcvarsall(plat_spec)
    if not vcvarsall:
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")

    try:
        out = subprocess.check_output(
            f'cmd /u /c "{vcvarsall}" {plat_spec} && set',
            stderr=subprocess.STDOUT,
        ).decode('utf-16le', errors='replace')
    except subprocess.CalledProcessError as exc:
        log.error(exc.output)
        raise DistutilsPlatformError(f"Error executing {exc.cmd}")

    env = {
        key.lower(): value
        for key, _, value in (line.partition('=') for line in out.splitlines())
        if key and value
    }

    return env


def _find_exe(exe, paths=None):
    """Return path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    """
    if not paths:
        paths = os.getenv('path').split(os.pathsep)
    for p in paths:
        fn = os.path.join(os.path.abspath(p), exe)
        if os.path.isfile(fn):
            return fn
    return exe


# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'. Always cross-compile from x86 to work with the
# lighter-weight MSVC installs that do not include native 64-bit tools.
PLAT_TO_VCVARS = {
    'win32': 'x86',
    'win-amd64': 'x86_amd64',
    'win-arm32': 'x86_arm',
    'win-arm64': 'x86_arm64',
}


class MSVCCompiler(CCompiler):
    """Concrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)
        # target platform (.plat_name is consistent with 'bdist')
        self.plat_name = None
        self.initialized = False

    @classmethod
    def _configure(cls, vc_env):
        """
        Set class-level include/lib dirs.
        """
        cls.include_dirs = cls._parse_path(vc_env.get('include', ''))
        cls.library_dirs = cls._parse_path(vc_env.get('lib', ''))

    @staticmethod
    def _parse_path(val):
        return [dir.rstrip(os.sep) for dir in val.split(os.pathsep) if dir]

    def initialize(self, plat_name=None):
        # multi-init means we would need to check platform same each time...
        assert not self.initialized, "don't init multiple times"
        if plat_name is None:
            plat_name = get_platform()
        # sanity check for platforms to prevent obscure errors later.
        if plat_name not in PLAT_TO_VCVARS:
            raise DistutilsPlatformError(
                f"--plat-name must be one of {tuple(PLAT_TO_VCVARS)}"
            )

        # Get the vcvarsall.bat spec for the requested platform.
        plat_spec = PLAT_TO_VCVARS[plat_name]

        vc_env = _get_vc_env(plat_spec)
        if not vc_env:
            raise DistutilsPlatformError(
                "Unable to find a compatible " "Visual Studio installation."
            )
        self._configure(vc_env)

        self._paths = vc_env.get('path', '')
        paths = self._paths.split(os.pathsep)
        self.cc = _find_exe("cl.exe", paths)
        self.linker = _find_exe("link.exe", paths)
        self.lib = _find_exe("lib.exe", paths)
        self.rc = _find_exe("rc.exe", paths)  # resource compiler
        self.mc = _find_exe("mc.exe", paths)  # message compiler
        self.mt = _find_exe("mt.exe", paths)  # message compiler

        self.preprocess_options = None
        # bpo-38597: Always compile with dynamic linking
        # Future releases of Python 3.x will include all past
        # versions of vcruntime*.dll for compatibility.
        self.compile_options = ['/nologo', '/O2', '/W3', '/GL', '/DNDEBUG', '/MD']

        self.compile_options_debug = [
            '/nologo',
            '/Od',
            '/MDd',
            '/Zi',
            '/W3',
            '/D_DEBUG',
        ]

        ldflags = ['/nologo', '/INCREMENTAL:NO', '/LTCG']

        ldflags_debug = ['/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL']

        self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']
        self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1']
        self.ldflags_shared = [
            *ldflags,
            '/DLL',
            '/MANIFEST:EMBED,ID=2',
            '/MANIFESTUAC:NO',
        ]
        self.ldflags_shared_debug = [
            *ldflags_debug,
            '/DLL',
            '/MANIFEST:EMBED,ID=2',
            '/MANIFESTUAC:NO',
        ]
        self.ldflags_static = [*ldflags]
        self.ldflags_static_debug = [*ldflags_debug]

        self._ldflags = {
            (CCompiler.EXECUTABLE, None): self.ldflags_exe,
            (CCompiler.EXECUTABLE, False): self.ldflags_exe,
            (CCompiler.EXECUTABLE, True): self.ldflags_exe_debug,
            (CCompiler.SHARED_OBJECT, None): self.ldflags_shared,
            (CCompiler.SHARED_OBJECT, False): self.ldflags_shared,
            (CCompiler.SHARED_OBJECT, True): self.ldflags_shared_debug,
            (CCompiler.SHARED_LIBRARY, None): self.ldflags_static,
            (CCompiler.SHARED_LIBRARY, False): self.ldflags_static,
            (CCompiler.SHARED_LIBRARY, True): self.ldflags_static_debug,
        }

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    @property
    def out_extensions(self):
        return {
            **super().out_extensions,
            **{
                ext: self.res_extension
                for ext in self._rc_extensions + self._mc_extensions
            },
        }

    def compile(  # noqa: C901
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):
        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        add_cpp_opts = False

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
                add_cpp_opts = True
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts + [output_opt, input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src])
                    base, _ = os.path.splitext(os.path.basename(src))
                    rc_file = os.path.join(rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc, "/fo" + obj, rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError(f"Don't know how to compile {src} to {obj}")

            args = [self.cc] + compile_opts + pp_opts
            if add_cpp_opts:
                args.append('/EHsc')
            args.extend((input_opt, "/Fo" + obj))
            args.extend(extra_postargs)

            try:
                self.spawn(args)
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):
        if not self.initialized:
            self.initialize()
        objects, output_dir = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass  # XXX what goes here?
            try:
                log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args))
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        if not self.initialized:
            self.initialize()
        objects, output_dir = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
        libraries, library_dirs, runtime_library_dirs = fixed_args

        if runtime_library_dirs:
            self.warn(
                "I don't know what to do with 'runtime_library_dirs': "
                + str(runtime_library_dirs)
            )

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            ldflags = self._ldflags[target_desc, debug]

            export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]

            ld_args = (
                ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
            )

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            build_temp = os.path.dirname(objects[0])
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename)
                )
                implib_file = os.path.join(build_temp, self.library_filename(dll_name))
                ld_args.append('/IMPLIB:' + implib_file)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            output_dir = os.path.dirname(os.path.abspath(output_filename))
            self.mkpath(output_dir)
            try:
                log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def spawn(self, cmd):
        env = dict(os.environ, PATH=self._paths)
        with self._fallback_spawn(cmd, env) as fallback:
            return super().spawn(cmd, env=env)
        return fallback.value

    @contextlib.contextmanager
    def _fallback_spawn(self, cmd, env):
        """
        Discovered in pypa/distutils#15, some tools monkeypatch the compiler,
        so the 'env' kwarg causes a TypeError. Detect this condition and
        restore the legacy, unsafe behavior.
        """
        bag = type('Bag', (), {})()
        try:
            yield bag
        except TypeError as exc:
            if "unexpected keyword argument 'env'" not in str(exc):
                raise
        else:
            return
        warnings.warn("Fallback spawn triggered. Please update distutils monkeypatch.")
        with mock.patch.dict('os.environ', env):
            bag.value = super().spawn(cmd)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
            "don't know how to set runtime library search path for MSVC"
        )

    def library_option(self, lib):
        return self.library_filename(lib)

    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.isfile(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None
python3.12/site-packages/setuptools/_distutils/version.py000064400000031227151732703530017567 0ustar00#
# distutils/version.py
#
# Implements multiple version numbering conventions for the
# Python Module Distribution Utilities.
#
# $Id$
#

"""Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
"""

import re
import warnings
import contextlib


@contextlib.contextmanager
def suppress_known_deprecation():
    with warnings.catch_warnings(record=True) as ctx:
        warnings.filterwarnings(
            action='default',
            category=DeprecationWarning,
            message="distutils Version classes are deprecated.",
        )
        yield ctx


class Version:
    """Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    """

    def __init__(self, vstring=None):
        if vstring:
            self.parse(vstring)
        warnings.warn(
            "distutils Version classes are deprecated. "
            "Use packaging.version instead.",
            DeprecationWarning,
            stacklevel=2,
        )

    def __repr__(self):
        return "{} ('{}')".format(self.__class__.__name__, str(self))

    def __eq__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c == 0

    def __lt__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c < 0

    def __le__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c <= 0

    def __gt__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c > 0

    def __ge__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c >= 0


# Interface for version-number classes -- must be implemented
# by the following classes (the concrete ones -- Version should
# be treated as an abstract class).
#    __init__ (string) - create and take same action as 'parse'
#                        (string parameter is optional)
#    parse (string)    - convert a string representation to whatever
#                        internal representation is appropriate for
#                        this style of version numbering
#    __str__ (self)    - convert back to a string; should be very similar
#                        (if not identical to) the string supplied to parse
#    __repr__ (self)   - generate Python code to recreate
#                        the instance
#    _cmp (self, other) - compare two version numbers ('other' may
#                        be an unparsed version string, or another
#                        instance of your version class)


class StrictVersion(Version):

    """Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    """

    version_re = re.compile(
        r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', re.VERBOSE | re.ASCII
    )

    def parse(self, vstring):
        match = self.version_re.match(vstring)
        if not match:
            raise ValueError("invalid version number '%s'" % vstring)

        (major, minor, patch, prerelease, prerelease_num) = match.group(1, 2, 4, 5, 6)

        if patch:
            self.version = tuple(map(int, [major, minor, patch]))
        else:
            self.version = tuple(map(int, [major, minor])) + (0,)

        if prerelease:
            self.prerelease = (prerelease[0], int(prerelease_num))
        else:
            self.prerelease = None

    def __str__(self):
        if self.version[2] == 0:
            vstring = '.'.join(map(str, self.version[0:2]))
        else:
            vstring = '.'.join(map(str, self.version))

        if self.prerelease:
            vstring = vstring + self.prerelease[0] + str(self.prerelease[1])

        return vstring

    def _cmp(self, other):  # noqa: C901
        if isinstance(other, str):
            with suppress_known_deprecation():
                other = StrictVersion(other)
        elif not isinstance(other, StrictVersion):
            return NotImplemented

        if self.version != other.version:
            # numeric versions don't match
            # prerelease stuff doesn't matter
            if self.version < other.version:
                return -1
            else:
                return 1

        # have to compare prerelease
        # case 1: neither has prerelease; they're equal
        # case 2: self has prerelease, other doesn't; other is greater
        # case 3: self doesn't have prerelease, other does: self is greater
        # case 4: both have prerelease: must compare them!

        if not self.prerelease and not other.prerelease:
            return 0
        elif self.prerelease and not other.prerelease:
            return -1
        elif not self.prerelease and other.prerelease:
            return 1
        elif self.prerelease and other.prerelease:
            if self.prerelease == other.prerelease:
                return 0
            elif self.prerelease < other.prerelease:
                return -1
            else:
                return 1
        else:
            assert False, "never get here"


# end class StrictVersion


# The rules according to Greg Stein:
# 1) a version number has 1 or more numbers separated by a period or by
#    sequences of letters. If only periods, then these are compared
#    left-to-right to determine an ordering.
# 2) sequences of letters are part of the tuple for comparison and are
#    compared lexicographically
# 3) recognize the numeric components may have leading zeroes
#
# The LooseVersion class below implements these rules: a version number
# string is split up into a tuple of integer and string components, and
# comparison is a simple tuple comparison.  This means that version
# numbers behave in a predictable and obvious way, but a way that might
# not necessarily be how people *want* version numbers to behave.  There
# wouldn't be a problem if people could stick to purely numeric version
# numbers: just split on period and compare the numbers as tuples.
# However, people insist on putting letters into their version numbers;
# the most common purpose seems to be:
#   - indicating a "pre-release" version
#     ('alpha', 'beta', 'a', 'b', 'pre', 'p')
#   - indicating a post-release patch ('p', 'pl', 'patch')
# but of course this can't cover all version number schemes, and there's
# no way to know what a programmer means without asking him.
#
# The problem is what to do with letters (and other non-numeric
# characters) in a version number.  The current implementation does the
# obvious and predictable thing: keep them as strings and compare
# lexically within a tuple comparison.  This has the desired effect if
# an appended letter sequence implies something "post-release":
# eg. "0.99" < "0.99pl14" < "1.0", and "5.001" < "5.001m" < "5.002".
#
# However, if letters in a version number imply a pre-release version,
# the "obvious" thing isn't correct.  Eg. you would expect that
# "1.5.1" < "1.5.2a2" < "1.5.2", but under the tuple/lexical comparison
# implemented here, this just isn't so.
#
# Two possible solutions come to mind.  The first is to tie the
# comparison algorithm to a particular set of semantic rules, as has
# been done in the StrictVersion class above.  This works great as long
# as everyone can go along with bondage and discipline.  Hopefully a
# (large) subset of Python module programmers will agree that the
# particular flavour of bondage and discipline provided by StrictVersion
# provides enough benefit to be worth using, and will submit their
# version numbering scheme to its domination.  The free-thinking
# anarchists in the lot will never give in, though, and something needs
# to be done to accommodate them.
#
# Perhaps a "moderately strict" version class could be implemented that
# lets almost anything slide (syntactically), and makes some heuristic
# assumptions about non-digits in version number strings.  This could
# sink into special-case-hell, though; if I was as talented and
# idiosyncratic as Larry Wall, I'd go ahead and implement a class that
# somehow knows that "1.2.1" < "1.2.2a2" < "1.2.2" < "1.2.2pl3", and is
# just as happy dealing with things like "2g6" and "1.13++".  I don't
# think I'm smart enough to do it right though.
#
# In any case, I've coded the test suite for this module (see
# ../test/test_version.py) specifically to fail on things like comparing
# "1.2a2" and "1.2".  That's not because the *code* is doing anything
# wrong, it's because the simple, obvious design doesn't match my
# complicated, hairy expectations for real-world version numbers.  It
# would be a snap to fix the test suite to say, "Yep, LooseVersion does
# the Right Thing" (ie. the code matches the conception).  But I'd rather
# have a conception that matches common notions about version numbers.


class LooseVersion(Version):

    """Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    """

    component_re = re.compile(r'(\d+ | [a-z]+ | \.)', re.VERBOSE)

    def parse(self, vstring):
        # I've given up on thinking I can reconstruct the version string
        # from the parsed tuple -- so I just store the string here for
        # use by __str__
        self.vstring = vstring
        components = [x for x in self.component_re.split(vstring) if x and x != '.']
        for i, obj in enumerate(components):
            try:
                components[i] = int(obj)
            except ValueError:
                pass

        self.version = components

    def __str__(self):
        return self.vstring

    def __repr__(self):
        return "LooseVersion ('%s')" % str(self)

    def _cmp(self, other):
        if isinstance(other, str):
            other = LooseVersion(other)
        elif not isinstance(other, LooseVersion):
            return NotImplemented

        if self.version == other.version:
            return 0
        if self.version < other.version:
            return -1
        if self.version > other.version:
            return 1


# end class LooseVersion
python3.12/site-packages/setuptools/_distutils/fancy_getopt.py000064400000042753151732703530020572 0ustar00"""distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
"""

import sys
import string
import re
import getopt
from .errors import DistutilsGetoptError, DistutilsArgError

# Much like command_re in distutils.core, this is close to but not quite
# the same as a Python NAME -- except, in the spirit of most GNU
# utilities, we use '-' in place of '_'.  (The spirit of LISP lives on!)
# The similarities to NAME are again not a coincidence...
longopt_pat = r'[a-zA-Z](?:[a-zA-Z0-9-]*)'
longopt_re = re.compile(r'^%s$' % longopt_pat)

# For recognizing "negative alias" options, eg. "quiet=!verbose"
neg_alias_re = re.compile("^({})=!({})$".format(longopt_pat, longopt_pat))

# This is used to translate long options to legitimate Python identifiers
# (for use as attributes of some object).
longopt_xlate = str.maketrans('-', '_')


class FancyGetopt:
    """Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    """

    def __init__(self, option_table=None):
        # The option table is (currently) a list of tuples.  The
        # tuples may have 3 or four values:
        #   (long_option, short_option, help_string [, repeatable])
        # if an option takes an argument, its long_option should have '='
        # appended; short_option should just be a single character, no ':'
        # in any case.  If a long_option doesn't have a corresponding
        # short_option, short_option should be None.  All option tuples
        # must have long options.
        self.option_table = option_table

        # 'option_index' maps long option names to entries in the option
        # table (ie. those 3-tuples).
        self.option_index = {}
        if self.option_table:
            self._build_index()

        # 'alias' records (duh) alias options; {'foo': 'bar'} means
        # --foo is an alias for --bar
        self.alias = {}

        # 'negative_alias' keeps track of options that are the boolean
        # opposite of some other option
        self.negative_alias = {}

        # These keep track of the information in the option table.  We
        # don't actually populate these structures until we're ready to
        # parse the command-line, since the 'option_table' passed in here
        # isn't necessarily the final word.
        self.short_opts = []
        self.long_opts = []
        self.short2long = {}
        self.attr_name = {}
        self.takes_arg = {}

        # And 'option_order' is filled up in 'getopt()'; it records the
        # original order of options (and their values) on the command-line,
        # but expands short options, converts aliases, etc.
        self.option_order = []

    def _build_index(self):
        self.option_index.clear()
        for option in self.option_table:
            self.option_index[option[0]] = option

    def set_option_table(self, option_table):
        self.option_table = option_table
        self._build_index()

    def add_option(self, long_option, short_option=None, help_string=None):
        if long_option in self.option_index:
            raise DistutilsGetoptError(
                "option conflict: already an option '%s'" % long_option
            )
        else:
            option = (long_option, short_option, help_string)
            self.option_table.append(option)
            self.option_index[long_option] = option

    def has_option(self, long_option):
        """Return true if the option table for this parser has an
        option with long name 'long_option'."""
        return long_option in self.option_index

    def get_attr_name(self, long_option):
        """Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores."""
        return long_option.translate(longopt_xlate)

    def _check_alias_dict(self, aliases, what):
        assert isinstance(aliases, dict)
        for alias, opt in aliases.items():
            if alias not in self.option_index:
                raise DistutilsGetoptError(
                    ("invalid %s '%s': " "option '%s' not defined")
                    % (what, alias, alias)
                )
            if opt not in self.option_index:
                raise DistutilsGetoptError(
                    ("invalid %s '%s': " "aliased option '%s' not defined")
                    % (what, alias, opt)
                )

    def set_aliases(self, alias):
        """Set the aliases for this option parser."""
        self._check_alias_dict(alias, "alias")
        self.alias = alias

    def set_negative_aliases(self, negative_alias):
        """Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table."""
        self._check_alias_dict(negative_alias, "negative alias")
        self.negative_alias = negative_alias

    def _grok_option_table(self):  # noqa: C901
        """Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        """
        self.long_opts = []
        self.short_opts = []
        self.short2long.clear()
        self.repeat = {}

        for option in self.option_table:
            if len(option) == 3:
                long, short, help = option
                repeat = 0
            elif len(option) == 4:
                long, short, help, repeat = option
            else:
                # the option table is part of the code, so simply
                # assert that it is correct
                raise ValueError("invalid option tuple: {!r}".format(option))

            # Type- and value-check the option names
            if not isinstance(long, str) or len(long) < 2:
                raise DistutilsGetoptError(
                    ("invalid long option '%s': " "must be a string of length >= 2")
                    % long
                )

            if not ((short is None) or (isinstance(short, str) and len(short) == 1)):
                raise DistutilsGetoptError(
                    "invalid short option '%s': "
                    "must a single character or None" % short
                )

            self.repeat[long] = repeat
            self.long_opts.append(long)

            if long[-1] == '=':  # option takes an argument?
                if short:
                    short = short + ':'
                long = long[0:-1]
                self.takes_arg[long] = 1
            else:
                # Is option is a "negative alias" for some other option (eg.
                # "quiet" == "!verbose")?
                alias_to = self.negative_alias.get(long)
                if alias_to is not None:
                    if self.takes_arg[alias_to]:
                        raise DistutilsGetoptError(
                            "invalid negative alias '%s': "
                            "aliased option '%s' takes a value" % (long, alias_to)
                        )

                    self.long_opts[-1] = long  # XXX redundant?!
                self.takes_arg[long] = 0

            # If this is an alias option, make sure its "takes arg" flag is
            # the same as the option it's aliased to.
            alias_to = self.alias.get(long)
            if alias_to is not None:
                if self.takes_arg[long] != self.takes_arg[alias_to]:
                    raise DistutilsGetoptError(
                        "invalid alias '%s': inconsistent with "
                        "aliased option '%s' (one of them takes a value, "
                        "the other doesn't" % (long, alias_to)
                    )

            # Now enforce some bondage on the long option name, so we can
            # later translate it to an attribute name on some object.  Have
            # to do this a bit late to make sure we've removed any trailing
            # '='.
            if not longopt_re.match(long):
                raise DistutilsGetoptError(
                    "invalid long option name '%s' "
                    "(must be letters, numbers, hyphens only" % long
                )

            self.attr_name[long] = self.get_attr_name(long)
            if short:
                self.short_opts.append(short)
                self.short2long[short[0]] = long

    def getopt(self, args=None, object=None):  # noqa: C901
        """Parse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        """
        if args is None:
            args = sys.argv[1:]
        if object is None:
            object = OptionDummy()
            created_object = True
        else:
            created_object = False

        self._grok_option_table()

        short_opts = ' '.join(self.short_opts)
        try:
            opts, args = getopt.getopt(args, short_opts, self.long_opts)
        except getopt.error as msg:
            raise DistutilsArgError(msg)

        for opt, val in opts:
            if len(opt) == 2 and opt[0] == '-':  # it's a short option
                opt = self.short2long[opt[1]]
            else:
                assert len(opt) > 2 and opt[:2] == '--'
                opt = opt[2:]

            alias = self.alias.get(opt)
            if alias:
                opt = alias

            if not self.takes_arg[opt]:  # boolean option?
                assert val == '', "boolean option can't have value"
                alias = self.negative_alias.get(opt)
                if alias:
                    opt = alias
                    val = 0
                else:
                    val = 1

            attr = self.attr_name[opt]
            # The only repeating option at the moment is 'verbose'.
            # It has a negative option -q quiet, which should set verbose = 0.
            if val and self.repeat.get(attr) is not None:
                val = getattr(object, attr, 0) + 1
            setattr(object, attr, val)
            self.option_order.append((opt, val))

        # for opts
        if created_object:
            return args, object
        else:
            return args

    def get_option_order(self):
        """Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        """
        if self.option_order is None:
            raise RuntimeError("'getopt()' hasn't been called yet")
        else:
            return self.option_order

    def generate_help(self, header=None):  # noqa: C901
        """Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        """
        # Blithely assume the option table is good: probably wouldn't call
        # 'generate_help()' unless you've already called 'getopt()'.

        # First pass: determine maximum length of long option names
        max_opt = 0
        for option in self.option_table:
            long = option[0]
            short = option[1]
            ell = len(long)
            if long[-1] == '=':
                ell = ell - 1
            if short is not None:
                ell = ell + 5  # " (-x)" where short == 'x'
            if ell > max_opt:
                max_opt = ell

        opt_width = max_opt + 2 + 2 + 2  # room for indent + dashes + gutter

        # Typical help block looks like this:
        #   --foo       controls foonabulation
        # Help block for longest option looks like this:
        #   --flimflam  set the flim-flam level
        # and with wrapped text:
        #   --flimflam  set the flim-flam level (must be between
        #               0 and 100, except on Tuesdays)
        # Options with short names will have the short name shown (but
        # it doesn't contribute to max_opt):
        #   --foo (-f)  controls foonabulation
        # If adding the short option would make the left column too wide,
        # we push the explanation off to the next line
        #   --flimflam (-l)
        #               set the flim-flam level
        # Important parameters:
        #   - 2 spaces before option block start lines
        #   - 2 dashes for each long option name
        #   - min. 2 spaces between option and explanation (gutter)
        #   - 5 characters (incl. space) for short option name

        # Now generate lines of help text.  (If 80 columns were good enough
        # for Jesus, then 78 columns are good enough for me!)
        line_width = 78
        text_width = line_width - opt_width
        big_indent = ' ' * opt_width
        if header:
            lines = [header]
        else:
            lines = ['Option summary:']

        for option in self.option_table:
            long, short, help = option[:3]
            text = wrap_text(help, text_width)
            if long[-1] == '=':
                long = long[0:-1]

            # Case 1: no short option at all (makes life easy)
            if short is None:
                if text:
                    lines.append("  --%-*s  %s" % (max_opt, long, text[0]))
                else:
                    lines.append("  --%-*s  " % (max_opt, long))

            # Case 2: we have a short option, so we have to include it
            # just after the long option
            else:
                opt_names = "{} (-{})".format(long, short)
                if text:
                    lines.append("  --%-*s  %s" % (max_opt, opt_names, text[0]))
                else:
                    lines.append("  --%-*s" % opt_names)

            for ell in text[1:]:
                lines.append(big_indent + ell)
        return lines

    def print_help(self, header=None, file=None):
        if file is None:
            file = sys.stdout
        for line in self.generate_help(header):
            file.write(line + "\n")


def fancy_getopt(options, negative_opt, object, args):
    parser = FancyGetopt(options)
    parser.set_negative_aliases(negative_opt)
    return parser.getopt(args, object)


WS_TRANS = {ord(_wschar): ' ' for _wschar in string.whitespace}


def wrap_text(text, width):
    """wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    """
    if text is None:
        return []
    if len(text) <= width:
        return [text]

    text = text.expandtabs()
    text = text.translate(WS_TRANS)
    chunks = re.split(r'( +|-+)', text)
    chunks = [ch for ch in chunks if ch]  # ' - ' results in empty strings
    lines = []

    while chunks:
        cur_line = []  # list of chunks (to-be-joined)
        cur_len = 0  # length of current line

        while chunks:
            ell = len(chunks[0])
            if cur_len + ell <= width:  # can squeeze (at least) this chunk in
                cur_line.append(chunks[0])
                del chunks[0]
                cur_len = cur_len + ell
            else:  # this line is full
                # drop last chunk if all space
                if cur_line and cur_line[-1][0] == ' ':
                    del cur_line[-1]
                break

        if chunks:  # any chunks left to process?
            # if the current line is still empty, then we had a single
            # chunk that's too big too fit on a line -- so we break
            # down and break it up at the line width
            if cur_len == 0:
                cur_line.append(chunks[0][0:width])
                chunks[0] = chunks[0][width:]

            # all-whitespace chunks at the end of a line can be discarded
            # (and we know from the re.split above that if a chunk has
            # *any* whitespace, it is *all* whitespace)
            if chunks[0][0] == ' ':
                del chunks[0]

        # and store this line in the list-of-all-lines -- as a single
        # string, of course!
        lines.append(''.join(cur_line))

    return lines


def translate_longopt(opt):
    """Convert a long option name to a valid Python identifier by
    changing "-" to "_".
    """
    return opt.translate(longopt_xlate)


class OptionDummy:
    """Dummy class just used as a place to hold command-line option
    values as instance attributes."""

    def __init__(self, options=[]):
        """Create a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None."""
        for opt in options:
            setattr(self, opt, None)


if __name__ == "__main__":
    text = """\
Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].)"""

    for w in (10, 20, 30, 40):
        print("width: %d" % w)
        print("\n".join(wrap_text(text, w)))
        print()
python3.12/site-packages/setuptools/_distutils/_collections.py000064400000012264151732703530020557 0ustar00import collections
import functools
import itertools
import operator


# from jaraco.collections 3.5.1
class DictStack(list, collections.abc.Mapping):
    """
    A stack of dictionaries that behaves as a view on those dictionaries,
    giving preference to the last.

    >>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)])
    >>> stack['a']
    2
    >>> stack['b']
    2
    >>> stack['c']
    2
    >>> len(stack)
    3
    >>> stack.push(dict(a=3))
    >>> stack['a']
    3
    >>> set(stack.keys()) == set(['a', 'b', 'c'])
    True
    >>> set(stack.items()) == set([('a', 3), ('b', 2), ('c', 2)])
    True
    >>> dict(**stack) == dict(stack) == dict(a=3, c=2, b=2)
    True
    >>> d = stack.pop()
    >>> stack['a']
    2
    >>> d = stack.pop()
    >>> stack['a']
    1
    >>> stack.get('b', None)
    >>> 'c' in stack
    True
    """

    def __iter__(self):
        dicts = list.__iter__(self)
        return iter(set(itertools.chain.from_iterable(c.keys() for c in dicts)))

    def __getitem__(self, key):
        for scope in reversed(tuple(list.__iter__(self))):
            if key in scope:
                return scope[key]
        raise KeyError(key)

    push = list.append

    def __contains__(self, other):
        return collections.abc.Mapping.__contains__(self, other)

    def __len__(self):
        return len(list(iter(self)))


# from jaraco.collections 3.7
class RangeMap(dict):
    """
    A dictionary-like object that uses the keys as bounds for a range.
    Inclusion of the value for that range is determined by the
    key_match_comparator, which defaults to less-than-or-equal.
    A value is returned for a key if it is the first key that matches in
    the sorted list of keys.

    One may supply keyword parameters to be passed to the sort function used
    to sort keys (i.e. key, reverse) as sort_params.

    Let's create a map that maps 1-3 -> 'a', 4-6 -> 'b'

    >>> r = RangeMap({3: 'a', 6: 'b'})  # boy, that was easy
    >>> r[1], r[2], r[3], r[4], r[5], r[6]
    ('a', 'a', 'a', 'b', 'b', 'b')

    Even float values should work so long as the comparison operator
    supports it.

    >>> r[4.5]
    'b'

    But you'll notice that the way rangemap is defined, it must be open-ended
    on one side.

    >>> r[0]
    'a'
    >>> r[-1]
    'a'

    One can close the open-end of the RangeMap by using undefined_value

    >>> r = RangeMap({0: RangeMap.undefined_value, 3: 'a', 6: 'b'})
    >>> r[0]
    Traceback (most recent call last):
    ...
    KeyError: 0

    One can get the first or last elements in the range by using RangeMap.Item

    >>> last_item = RangeMap.Item(-1)
    >>> r[last_item]
    'b'

    .last_item is a shortcut for Item(-1)

    >>> r[RangeMap.last_item]
    'b'

    Sometimes it's useful to find the bounds for a RangeMap

    >>> r.bounds()
    (0, 6)

    RangeMap supports .get(key, default)

    >>> r.get(0, 'not found')
    'not found'

    >>> r.get(7, 'not found')
    'not found'

    One often wishes to define the ranges by their left-most values,
    which requires use of sort params and a key_match_comparator.

    >>> r = RangeMap({1: 'a', 4: 'b'},
    ...     sort_params=dict(reverse=True),
    ...     key_match_comparator=operator.ge)
    >>> r[1], r[2], r[3], r[4], r[5], r[6]
    ('a', 'a', 'a', 'b', 'b', 'b')

    That wasn't nearly as easy as before, so an alternate constructor
    is provided:

    >>> r = RangeMap.left({1: 'a', 4: 'b', 7: RangeMap.undefined_value})
    >>> r[1], r[2], r[3], r[4], r[5], r[6]
    ('a', 'a', 'a', 'b', 'b', 'b')

    """

    def __init__(self, source, sort_params={}, key_match_comparator=operator.le):
        dict.__init__(self, source)
        self.sort_params = sort_params
        self.match = key_match_comparator

    @classmethod
    def left(cls, source):
        return cls(
            source, sort_params=dict(reverse=True), key_match_comparator=operator.ge
        )

    def __getitem__(self, item):
        sorted_keys = sorted(self.keys(), **self.sort_params)
        if isinstance(item, RangeMap.Item):
            result = self.__getitem__(sorted_keys[item])
        else:
            key = self._find_first_match_(sorted_keys, item)
            result = dict.__getitem__(self, key)
            if result is RangeMap.undefined_value:
                raise KeyError(key)
        return result

    def get(self, key, default=None):
        """
        Return the value for key if key is in the dictionary, else default.
        If default is not given, it defaults to None, so that this method
        never raises a KeyError.
        """
        try:
            return self[key]
        except KeyError:
            return default

    def _find_first_match_(self, keys, item):
        is_match = functools.partial(self.match, item)
        matches = list(filter(is_match, keys))
        if matches:
            return matches[0]
        raise KeyError(item)

    def bounds(self):
        sorted_keys = sorted(self.keys(), **self.sort_params)
        return (sorted_keys[RangeMap.first_item], sorted_keys[RangeMap.last_item])

    # some special values for the RangeMap
    undefined_value = type('RangeValueUndefined', (), {})()

    class Item(int):
        "RangeMap Item"

    first_item = Item(0)
    last_item = Item(-1)
python3.12/site-packages/setuptools/_distutils/command/build_scripts.py000064400000012745151732703530022372 0ustar00"""distutils.command.build_scripts

Implements the Distutils 'build_scripts' command."""

import os
import re
from stat import ST_MODE
from distutils import sysconfig
from ..core import Command
from .._modified import newer
from ..util import convert_path
from distutils._log import log
import tokenize

shebang_pattern = re.compile('^#!.*python[0-9.]*([ \t].*)?$')
"""
Pattern matching a Python interpreter indicated in first line of a script.
"""

# for Setuptools compatibility
first_line_re = shebang_pattern


class build_scripts(Command):
    description = "\"build\" scripts (copy and fixup #! line)"

    user_options = [
        ('build-dir=', 'd', "directory to \"build\" (copy) to"),
        ('force', 'f', "forcibly build everything (ignore file timestamps"),
        ('executable=', 'e', "specify final destination interpreter path"),
    ]

    boolean_options = ['force']

    def initialize_options(self):
        self.build_dir = None
        self.scripts = None
        self.force = None
        self.executable = None

    def finalize_options(self):
        self.set_undefined_options(
            'build',
            ('build_scripts', 'build_dir'),
            ('force', 'force'),
            ('executable', 'executable'),
        )
        self.scripts = self.distribution.scripts

    def get_source_files(self):
        return self.scripts

    def run(self):
        if not self.scripts:
            return
        self.copy_scripts()

    def copy_scripts(self):
        """
        Copy each script listed in ``self.scripts``.

        If a script is marked as a Python script (first line matches
        'shebang_pattern', i.e. starts with ``#!`` and contains
        "python"), then adjust in the copy the first line to refer to
        the current Python interpreter.
        """
        self.mkpath(self.build_dir)
        outfiles = []
        updated_files = []
        for script in self.scripts:
            self._copy_script(script, outfiles, updated_files)

        self._change_modes(outfiles)

        return outfiles, updated_files

    def _copy_script(self, script, outfiles, updated_files):  # noqa: C901
        shebang_match = None
        script = convert_path(script)
        outfile = os.path.join(self.build_dir, os.path.basename(script))
        outfiles.append(outfile)

        if not self.force and not newer(script, outfile):
            log.debug("not copying %s (up-to-date)", script)
            return

        # Always open the file, but ignore failures in dry-run mode
        # in order to attempt to copy directly.
        try:
            f = tokenize.open(script)
        except OSError:
            if not self.dry_run:
                raise
            f = None
        else:
            first_line = f.readline()
            if not first_line:
                self.warn("%s is an empty file (skipping)" % script)
                return

            shebang_match = shebang_pattern.match(first_line)

        updated_files.append(outfile)
        if shebang_match:
            log.info("copying and adjusting %s -> %s", script, self.build_dir)
            if not self.dry_run:
                if not sysconfig.python_build:
                    executable = self.executable
                else:
                    executable = os.path.join(
                        sysconfig.get_config_var("BINDIR"),
                        "python%s%s"
                        % (
                            sysconfig.get_config_var("VERSION"),
                            sysconfig.get_config_var("EXE"),
                        ),
                    )
                post_interp = shebang_match.group(1) or ''
                shebang = "#!" + executable + post_interp + "\n"
                self._validate_shebang(shebang, f.encoding)
                with open(outfile, "w", encoding=f.encoding) as outf:
                    outf.write(shebang)
                    outf.writelines(f.readlines())
            if f:
                f.close()
        else:
            if f:
                f.close()
            self.copy_file(script, outfile)

    def _change_modes(self, outfiles):
        if os.name != 'posix':
            return

        for file in outfiles:
            self._change_mode(file)

    def _change_mode(self, file):
        if self.dry_run:
            log.info("changing mode of %s", file)
            return

        oldmode = os.stat(file)[ST_MODE] & 0o7777
        newmode = (oldmode | 0o555) & 0o7777
        if newmode != oldmode:
            log.info("changing mode of %s from %o to %o", file, oldmode, newmode)
            os.chmod(file, newmode)

    @staticmethod
    def _validate_shebang(shebang, encoding):
        # Python parser starts to read a script using UTF-8 until
        # it gets a #coding:xxx cookie. The shebang has to be the
        # first line of a file, the #coding:xxx cookie cannot be
        # written before. So the shebang has to be encodable to
        # UTF-8.
        try:
            shebang.encode('utf-8')
        except UnicodeEncodeError:
            raise ValueError(
                "The shebang ({!r}) is not encodable " "to utf-8".format(shebang)
            )

        # If the script is encoded to a custom encoding (use a
        # #coding:xxx cookie), the shebang has to be encodable to
        # the script encoding too.
        try:
            shebang.encode(encoding)
        except UnicodeEncodeError:
            raise ValueError(
                "The shebang ({!r}) is not encodable "
                "to the script encoding ({})".format(shebang, encoding)
            )
python3.12/site-packages/setuptools/_distutils/command/build_py.py000064400000040231151732703530021322 0ustar00"""distutils.command.build_py

Implements the Distutils 'build_py' command."""

import os
import importlib.util
import sys
import glob

from ..core import Command
from ..errors import DistutilsOptionError, DistutilsFileError
from ..util import convert_path
from distutils._log import log


class build_py(Command):
    description = "\"build\" pure Python modules (copy to build directory)"

    user_options = [
        ('build-lib=', 'd', "directory to \"build\" (copy) to"),
        ('compile', 'c', "compile .py to .pyc"),
        ('no-compile', None, "don't compile .py files [default]"),
        (
            'optimize=',
            'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
        ),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
    ]

    boolean_options = ['compile', 'force']
    negative_opt = {'no-compile': 'compile'}

    def initialize_options(self):
        self.build_lib = None
        self.py_modules = None
        self.package = None
        self.package_data = None
        self.package_dir = None
        self.compile = 0
        self.optimize = 0
        self.force = None

    def finalize_options(self):
        self.set_undefined_options(
            'build', ('build_lib', 'build_lib'), ('force', 'force')
        )

        # Get the distribution options that are aliases for build_py
        # options -- list of packages and list of modules.
        self.packages = self.distribution.packages
        self.py_modules = self.distribution.py_modules
        self.package_data = self.distribution.package_data
        self.package_dir = {}
        if self.distribution.package_dir:
            for name, path in self.distribution.package_dir.items():
                self.package_dir[name] = convert_path(path)
        self.data_files = self.get_data_files()

        # Ick, copied straight from install_lib.py (fancy_getopt needs a
        # type system!  Hell, *everything* needs a type system!!!)
        if not isinstance(self.optimize, int):
            try:
                self.optimize = int(self.optimize)
                assert 0 <= self.optimize <= 2
            except (ValueError, AssertionError):
                raise DistutilsOptionError("optimize must be 0, 1, or 2")

    def run(self):
        # XXX copy_file by default preserves atime and mtime.  IMHO this is
        # the right thing to do, but perhaps it should be an option -- in
        # particular, a site administrator might want installed files to
        # reflect the time of installation rather than the last
        # modification time before the installed release.

        # XXX copy_file by default preserves mode, which appears to be the
        # wrong thing to do: if a file is read-only in the working
        # directory, we want it to be installed read/write so that the next
        # installation of the same module distribution can overwrite it
        # without problems.  (This might be a Unix-specific issue.)  Thus
        # we turn off 'preserve_mode' when copying to the build directory,
        # since the build directory is supposed to be exactly what the
        # installation will look like (ie. we preserve mode when
        # installing).

        # Two options control which modules will be installed: 'packages'
        # and 'py_modules'.  The former lets us work with whole packages, not
        # specifying individual modules at all; the latter is for
        # specifying modules one-at-a-time.

        if self.py_modules:
            self.build_modules()
        if self.packages:
            self.build_packages()
            self.build_package_data()

        self.byte_compile(self.get_outputs(include_bytecode=0))

    def get_data_files(self):
        """Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
        data = []
        if not self.packages:
            return data
        for package in self.packages:
            # Locate package source directory
            src_dir = self.get_package_dir(package)

            # Compute package build directory
            build_dir = os.path.join(*([self.build_lib] + package.split('.')))

            # Length of path to strip from found files
            plen = 0
            if src_dir:
                plen = len(src_dir) + 1

            # Strip directory from globbed filenames
            filenames = [file[plen:] for file in self.find_data_files(package, src_dir)]
            data.append((package, src_dir, build_dir, filenames))
        return data

    def find_data_files(self, package, src_dir):
        """Return filenames for package's data files in 'src_dir'"""
        globs = self.package_data.get('', []) + self.package_data.get(package, [])
        files = []
        for pattern in globs:
            # Each pattern has to be converted to a platform-specific path
            filelist = glob.glob(
                os.path.join(glob.escape(src_dir), convert_path(pattern))
            )
            # Files that match more than one pattern are only added once
            files.extend(
                [fn for fn in filelist if fn not in files and os.path.isfile(fn)]
            )
        return files

    def build_package_data(self):
        """Copy data files into build directory"""
        for package, src_dir, build_dir, filenames in self.data_files:
            for filename in filenames:
                target = os.path.join(build_dir, filename)
                self.mkpath(os.path.dirname(target))
                self.copy_file(
                    os.path.join(src_dir, filename), target, preserve_mode=False
                )

    def get_package_dir(self, package):
        """Return the directory, relative to the top of the source
        distribution, where package 'package' should be found
        (at least according to the 'package_dir' option, if any)."""
        path = package.split('.')

        if not self.package_dir:
            if path:
                return os.path.join(*path)
            else:
                return ''
        else:
            tail = []
            while path:
                try:
                    pdir = self.package_dir['.'.join(path)]
                except KeyError:
                    tail.insert(0, path[-1])
                    del path[-1]
                else:
                    tail.insert(0, pdir)
                    return os.path.join(*tail)
            else:
                # Oops, got all the way through 'path' without finding a
                # match in package_dir.  If package_dir defines a directory
                # for the root (nameless) package, then fallback on it;
                # otherwise, we might as well have not consulted
                # package_dir at all, as we just use the directory implied
                # by 'tail' (which should be the same as the original value
                # of 'path' at this point).
                pdir = self.package_dir.get('')
                if pdir is not None:
                    tail.insert(0, pdir)

                if tail:
                    return os.path.join(*tail)
                else:
                    return ''

    def check_package(self, package, package_dir):
        # Empty dir name means current directory, which we can probably
        # assume exists.  Also, os.path.exists and isdir don't know about
        # my "empty string means current dir" convention, so we have to
        # circumvent them.
        if package_dir != "":
            if not os.path.exists(package_dir):
                raise DistutilsFileError(
                    "package directory '%s' does not exist" % package_dir
                )
            if not os.path.isdir(package_dir):
                raise DistutilsFileError(
                    "supposed package directory '%s' exists, "
                    "but is not a directory" % package_dir
                )

        # Directories without __init__.py are namespace packages (PEP 420).
        if package:
            init_py = os.path.join(package_dir, "__init__.py")
            if os.path.isfile(init_py):
                return init_py

        # Either not in a package at all (__init__.py not expected), or
        # __init__.py doesn't exist -- so don't return the filename.
        return None

    def check_module(self, module, module_file):
        if not os.path.isfile(module_file):
            log.warning("file %s (for module %s) not found", module_file, module)
            return False
        else:
            return True

    def find_package_modules(self, package, package_dir):
        self.check_package(package, package_dir)
        module_files = glob.glob(os.path.join(glob.escape(package_dir), "*.py"))
        modules = []
        setup_script = os.path.abspath(self.distribution.script_name)

        for f in module_files:
            abs_f = os.path.abspath(f)
            if abs_f != setup_script:
                module = os.path.splitext(os.path.basename(f))[0]
                modules.append((package, module, f))
            else:
                self.debug_print("excluding %s" % setup_script)
        return modules

    def find_modules(self):
        """Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        """
        # Map package names to tuples of useful info about the package:
        #    (package_dir, checked)
        # package_dir - the directory where we'll find source files for
        #   this package
        # checked - true if we have checked that the package directory
        #   is valid (exists, contains __init__.py, ... ?)
        packages = {}

        # List of (package, module, filename) tuples to return
        modules = []

        # We treat modules-in-packages almost the same as toplevel modules,
        # just the "package" for a toplevel is empty (either an empty
        # string or empty list, depending on context).  Differences:
        #   - don't check for __init__.py in directory for empty package
        for module in self.py_modules:
            path = module.split('.')
            package = '.'.join(path[0:-1])
            module_base = path[-1]

            try:
                (package_dir, checked) = packages[package]
            except KeyError:
                package_dir = self.get_package_dir(package)
                checked = 0

            if not checked:
                init_py = self.check_package(package, package_dir)
                packages[package] = (package_dir, 1)
                if init_py:
                    modules.append((package, "__init__", init_py))

            # XXX perhaps we should also check for just .pyc files
            # (so greedy closed-source bastards can distribute Python
            # modules too)
            module_file = os.path.join(package_dir, module_base + ".py")
            if not self.check_module(module, module_file):
                continue

            modules.append((package, module_base, module_file))

        return modules

    def find_all_modules(self):
        """Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do."""
        modules = []
        if self.py_modules:
            modules.extend(self.find_modules())
        if self.packages:
            for package in self.packages:
                package_dir = self.get_package_dir(package)
                m = self.find_package_modules(package, package_dir)
                modules.extend(m)
        return modules

    def get_source_files(self):
        return [module[-1] for module in self.find_all_modules()]

    def get_module_outfile(self, build_dir, package, module):
        outfile_path = [build_dir] + list(package) + [module + ".py"]
        return os.path.join(*outfile_path)

    def get_outputs(self, include_bytecode=1):
        modules = self.find_all_modules()
        outputs = []
        for package, module, module_file in modules:
            package = package.split('.')
            filename = self.get_module_outfile(self.build_lib, package, module)
            outputs.append(filename)
            if include_bytecode:
                if self.compile:
                    outputs.append(
                        importlib.util.cache_from_source(filename, optimization='')
                    )
                if self.optimize > 0:
                    outputs.append(
                        importlib.util.cache_from_source(
                            filename, optimization=self.optimize
                        )
                    )

        outputs += [
            os.path.join(build_dir, filename)
            for package, src_dir, build_dir, filenames in self.data_files
            for filename in filenames
        ]

        return outputs

    def build_module(self, module, module_file, package):
        if isinstance(package, str):
            package = package.split('.')
        elif not isinstance(package, (list, tuple)):
            raise TypeError(
                "'package' must be a string (dot-separated), list, or tuple"
            )

        # Now put the module source file into the "build" area -- this is
        # easy, we just copy it somewhere under self.build_lib (the build
        # directory for Python source).
        outfile = self.get_module_outfile(self.build_lib, package, module)
        dir = os.path.dirname(outfile)
        self.mkpath(dir)
        return self.copy_file(module_file, outfile, preserve_mode=0)

    def build_modules(self):
        modules = self.find_modules()
        for package, module, module_file in modules:
            # Now "build" the module -- ie. copy the source file to
            # self.build_lib (the build directory for Python source).
            # (Actually, it gets copied to the directory for this package
            # under self.build_lib.)
            self.build_module(module, module_file, package)

    def build_packages(self):
        for package in self.packages:
            # Get list of (package, module, module_file) tuples based on
            # scanning the package directory.  'package' is only included
            # in the tuple so that 'find_modules()' and
            # 'find_package_tuples()' have a consistent interface; it's
            # ignored here (apart from a sanity check).  Also, 'module' is
            # the *unqualified* module name (ie. no dots, no package -- we
            # already know its package!), and 'module_file' is the path to
            # the .py file, relative to the current directory
            # (ie. including 'package_dir').
            package_dir = self.get_package_dir(package)
            modules = self.find_package_modules(package, package_dir)

            # Now loop over the modules we found, "building" each one (just
            # copy it to self.build_lib).
            for package_, module, module_file in modules:
                assert package == package_
                self.build_module(module, module_file, package)

    def byte_compile(self, files):
        if sys.dont_write_bytecode:
            self.warn('byte-compiling is disabled, skipping.')
            return

        from ..util import byte_compile

        prefix = self.build_lib
        if prefix[-1] != os.sep:
            prefix = prefix + os.sep

        # XXX this code is essentially the same as the 'byte_compile()
        # method of the "install_lib" command, except for the determination
        # of the 'prefix' string.  Hmmm.
        if self.compile:
            byte_compile(
                files, optimize=0, force=self.force, prefix=prefix, dry_run=self.dry_run
            )
        if self.optimize > 0:
            byte_compile(
                files,
                optimize=self.optimize,
                force=self.force,
                prefix=prefix,
                dry_run=self.dry_run,
            )
python3.12/site-packages/setuptools/_distutils/command/py37compat.py000064400000001240151732703540021517 0ustar00import sys


def _pythonlib_compat():
    """
    On Python 3.7 and earlier, distutils would include the Python
    library. See pypa/distutils#9.
    """
    from distutils import sysconfig

    if not sysconfig.get_config_var('Py_ENABLED_SHARED'):
        return

    yield 'python{}.{}{}'.format(
        sys.hexversion >> 24,
        (sys.hexversion >> 16) & 0xFF,
        sysconfig.get_config_var('ABIFLAGS'),
    )


def compose(f1, f2):
    return lambda *args, **kwargs: f1(f2(*args, **kwargs))


pythonlib = (
    compose(list, _pythonlib_compat)
    if sys.version_info < (3, 8)
    and sys.platform != 'darwin'
    and sys.platform[:3] != 'aix'
    else list
)
python3.12/site-packages/setuptools/_distutils/command/build_ext.py000064400000075420151732703540021503 0ustar00"""distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""

import contextlib
import os
import re
import sys
from ..core import Command
from ..errors import (
    DistutilsOptionError,
    DistutilsSetupError,
    CCompilerError,
    DistutilsError,
    CompileError,
    DistutilsPlatformError,
)
from ..sysconfig import customize_compiler, get_python_version
from ..sysconfig import get_config_h_filename
from .._modified import newer_group
from ..extension import Extension
from ..util import get_platform
from distutils._log import log
from . import py37compat

from site import USER_BASE

# An extension name is just a dot-separated list of Python NAMEs (ie.
# the same as a fully-qualified module name).
extension_name_re = re.compile(r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$')


def show_compilers():
    from ..ccompiler import show_compilers

    show_compilers()


class build_ext(Command):
    description = "build C/C++ extensions (compile/link to build directory)"

    # XXX thoughts on how to deal with complex command-line options like
    # these, i.e. how to make it so fancy_getopt can suck them off the
    # command line and make it look like setup.py defined the appropriate
    # lists of tuples of what-have-you.
    #   - each command needs a callback to process its command-line options
    #   - Command.__init__() needs access to its share of the whole
    #     command line (must ultimately come from
    #     Distribution.parse_command_line())
    #   - it then calls the current command class' option-parsing
    #     callback to deal with weird options like -D, which have to
    #     parse the option text and churn out some custom data
    #     structure
    #   - that data structure (in this case, a list of 2-tuples)
    #     will then be present in the command object by the time
    #     we get to finalize_options() (i.e. the constructor
    #     takes care of both command-line and client options
    #     in between initialize_options() and finalize_options())

    sep_by = " (separated by '%s')" % os.pathsep
    user_options = [
        ('build-lib=', 'b', "directory for compiled extension modules"),
        ('build-temp=', 't', "directory for temporary files (build by-products)"),
        (
            'plat-name=',
            'p',
            "platform name to cross-compile for, if supported "
            "(default: %s)" % get_platform(),
        ),
        (
            'inplace',
            'i',
            "ignore build-lib and put compiled extensions into the source "
            + "directory alongside your pure Python modules",
        ),
        (
            'include-dirs=',
            'I',
            "list of directories to search for header files" + sep_by,
        ),
        ('define=', 'D', "C preprocessor macros to define"),
        ('undef=', 'U', "C preprocessor macros to undefine"),
        ('libraries=', 'l', "external C libraries to link with"),
        (
            'library-dirs=',
            'L',
            "directories to search for external C libraries" + sep_by,
        ),
        ('rpath=', 'R', "directories to search for shared C libraries at runtime"),
        ('link-objects=', 'O', "extra explicit link objects to include in the link"),
        ('debug', 'g', "compile/link with debugging information"),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
        ('compiler=', 'c', "specify the compiler type"),
        ('parallel=', 'j', "number of parallel build jobs"),
        ('swig-cpp', None, "make SWIG create C++ files (default is C)"),
        ('swig-opts=', None, "list of SWIG command line options"),
        ('swig=', None, "path to the SWIG executable"),
        ('user', None, "add user include, library and rpath"),
    ]

    boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user']

    help_options = [
        ('help-compiler', None, "list available compilers", show_compilers),
    ]

    def initialize_options(self):
        self.extensions = None
        self.build_lib = None
        self.plat_name = None
        self.build_temp = None
        self.inplace = 0
        self.package = None

        self.include_dirs = None
        self.define = None
        self.undef = None
        self.libraries = None
        self.library_dirs = None
        self.rpath = None
        self.link_objects = None
        self.debug = None
        self.force = None
        self.compiler = None
        self.swig = None
        self.swig_cpp = None
        self.swig_opts = None
        self.user = None
        self.parallel = None

    def finalize_options(self):  # noqa: C901
        from distutils import sysconfig

        self.set_undefined_options(
            'build',
            ('build_lib', 'build_lib'),
            ('build_temp', 'build_temp'),
            ('compiler', 'compiler'),
            ('debug', 'debug'),
            ('force', 'force'),
            ('parallel', 'parallel'),
            ('plat_name', 'plat_name'),
        )

        if self.package is None:
            self.package = self.distribution.ext_package

        self.extensions = self.distribution.ext_modules

        # Make sure Python's include directories (for Python.h, pyconfig.h,
        # etc.) are in the include search path.
        py_include = sysconfig.get_python_inc()
        plat_py_include = sysconfig.get_python_inc(plat_specific=1)
        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        # If in a virtualenv, add its include directory
        # Issue 16116
        if sys.exec_prefix != sys.base_exec_prefix:
            self.include_dirs.append(os.path.join(sys.exec_prefix, 'include'))

        # Put the Python "system" include dir at the end, so that
        # any local include dirs take precedence.
        self.include_dirs.extend(py_include.split(os.path.pathsep))
        if plat_py_include != py_include:
            self.include_dirs.extend(plat_py_include.split(os.path.pathsep))

        self.ensure_string_list('libraries')
        self.ensure_string_list('link_objects')

        # Life is easier if we're not forever checking for None, so
        # simplify these options to empty lists if unset
        if self.libraries is None:
            self.libraries = []
        if self.library_dirs is None:
            self.library_dirs = []
        elif isinstance(self.library_dirs, str):
            self.library_dirs = self.library_dirs.split(os.pathsep)

        if self.rpath is None:
            self.rpath = []
        elif isinstance(self.rpath, str):
            self.rpath = self.rpath.split(os.pathsep)

        # for extensions under windows use different directories
        # for Release and Debug builds.
        # also Python's library directory must be appended to library_dirs
        if os.name == 'nt':
            # the 'libs' directory is for binary installs - we assume that
            # must be the *native* platform.  But we don't really support
            # cross-compiling via a binary install anyway, so we let it go.
            self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs'))
            if sys.base_exec_prefix != sys.prefix:  # Issue 16116
                self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs'))
            if self.debug:
                self.build_temp = os.path.join(self.build_temp, "Debug")
            else:
                self.build_temp = os.path.join(self.build_temp, "Release")

            # Append the source distribution include and library directories,
            # this allows distutils on windows to work in the source tree
            self.include_dirs.append(os.path.dirname(get_config_h_filename()))
            self.library_dirs.append(sys.base_exec_prefix)

            # Use the .lib files for the correct architecture
            if self.plat_name == 'win32':
                suffix = 'win32'
            else:
                # win-amd64
                suffix = self.plat_name[4:]
            new_lib = os.path.join(sys.exec_prefix, 'PCbuild')
            if suffix:
                new_lib = os.path.join(new_lib, suffix)
            self.library_dirs.append(new_lib)

        # For extensions under Cygwin, Python's library directory must be
        # appended to library_dirs
        if sys.platform[:6] == 'cygwin':
            if not sysconfig.python_build:
                # building third party extensions
                self.library_dirs.append(
                    os.path.join(
                        sys.prefix, "lib", "python" + get_python_version(), "config"
                    )
                )
            else:
                # building python standard extensions
                self.library_dirs.append('.')

        # For building extensions with a shared Python library,
        # Python's library directory must be appended to library_dirs
        # See Issues: #1600860, #4366
        if sysconfig.get_config_var('Py_ENABLE_SHARED'):
            if not sysconfig.python_build:
                # building third party extensions
                self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
            else:
                # building python standard extensions
                self.library_dirs.append('.')

        # The argument parsing will result in self.define being a string, but
        # it has to be a list of 2-tuples.  All the preprocessor symbols
        # specified by the 'define' option will be set to '1'.  Multiple
        # symbols can be separated with commas.

        if self.define:
            defines = self.define.split(',')
            self.define = [(symbol, '1') for symbol in defines]

        # The option for macros to undefine is also a string from the
        # option parsing, but has to be a list.  Multiple symbols can also
        # be separated with commas here.
        if self.undef:
            self.undef = self.undef.split(',')

        if self.swig_opts is None:
            self.swig_opts = []
        else:
            self.swig_opts = self.swig_opts.split(' ')

        # Finally add the user include and library directories if requested
        if self.user:
            user_include = os.path.join(USER_BASE, "include")
            user_lib = os.path.join(USER_BASE, "lib")
            if os.path.isdir(user_include):
                self.include_dirs.append(user_include)
            if os.path.isdir(user_lib):
                self.library_dirs.append(user_lib)
                self.rpath.append(user_lib)

        if isinstance(self.parallel, str):
            try:
                self.parallel = int(self.parallel)
            except ValueError:
                raise DistutilsOptionError("parallel should be an integer")

    def run(self):  # noqa: C901
        from ..ccompiler import new_compiler

        # 'self.extensions', as supplied by setup.py, is a list of
        # Extension instances.  See the documentation for Extension (in
        # distutils.extension) for details.
        #
        # For backwards compatibility with Distutils 0.8.2 and earlier, we
        # also allow the 'extensions' list to be a list of tuples:
        #    (ext_name, build_info)
        # where build_info is a dictionary containing everything that
        # Extension instances do except the name, with a few things being
        # differently named.  We convert these 2-tuples to Extension
        # instances as needed.

        if not self.extensions:
            return

        # If we were asked to build any C/C++ libraries, make sure that the
        # directory where we put them is in the library search path for
        # linking extensions.
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.libraries.extend(build_clib.get_library_names() or [])
            self.library_dirs.append(build_clib.build_clib)

        # Setup the CCompiler object that we'll use to do all the
        # compiling and linking
        self.compiler = new_compiler(
            compiler=self.compiler,
            verbose=self.verbose,
            dry_run=self.dry_run,
            force=self.force,
        )
        customize_compiler(self.compiler)
        # If we are cross-compiling, init the compiler now (if we are not
        # cross-compiling, init would not hurt, but people may rely on
        # late initialization of compiler even if they shouldn't...)
        if os.name == 'nt' and self.plat_name != get_platform():
            self.compiler.initialize(self.plat_name)

        # And make sure that any compile/link-related options (which might
        # come from the command-line or from the setup script) are set in
        # that CCompiler object -- that way, they automatically apply to
        # all compiling and linking done here.
        if self.include_dirs is not None:
            self.compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for name, value in self.define:
                self.compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                self.compiler.undefine_macro(macro)
        if self.libraries is not None:
            self.compiler.set_libraries(self.libraries)
        if self.library_dirs is not None:
            self.compiler.set_library_dirs(self.library_dirs)
        if self.rpath is not None:
            self.compiler.set_runtime_library_dirs(self.rpath)
        if self.link_objects is not None:
            self.compiler.set_link_objects(self.link_objects)

        # Now actually compile and link everything.
        self.build_extensions()

    def check_extensions_list(self, extensions):  # noqa: C901
        """Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        """
        if not isinstance(extensions, list):
            raise DistutilsSetupError(
                "'ext_modules' option must be a list of Extension instances"
            )

        for i, ext in enumerate(extensions):
            if isinstance(ext, Extension):
                continue  # OK! (assume type-checking done
                # by Extension constructor)

            if not isinstance(ext, tuple) or len(ext) != 2:
                raise DistutilsSetupError(
                    "each element of 'ext_modules' option must be an "
                    "Extension instance or 2-tuple"
                )

            ext_name, build_info = ext

            log.warning(
                "old-style (ext_name, build_info) tuple found in "
                "ext_modules for extension '%s' "
                "-- please convert to Extension instance",
                ext_name,
            )

            if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)):
                raise DistutilsSetupError(
                    "first element of each tuple in 'ext_modules' "
                    "must be the extension name (a string)"
                )

            if not isinstance(build_info, dict):
                raise DistutilsSetupError(
                    "second element of each tuple in 'ext_modules' "
                    "must be a dictionary (build info)"
                )

            # OK, the (ext_name, build_info) dict is type-safe: convert it
            # to an Extension instance.
            ext = Extension(ext_name, build_info['sources'])

            # Easy stuff: one-to-one mapping from dict elements to
            # instance attributes.
            for key in (
                'include_dirs',
                'library_dirs',
                'libraries',
                'extra_objects',
                'extra_compile_args',
                'extra_link_args',
            ):
                val = build_info.get(key)
                if val is not None:
                    setattr(ext, key, val)

            # Medium-easy stuff: same syntax/semantics, different names.
            ext.runtime_library_dirs = build_info.get('rpath')
            if 'def_file' in build_info:
                log.warning(
                    "'def_file' element of build info dict " "no longer supported"
                )

            # Non-trivial stuff: 'macros' split into 'define_macros'
            # and 'undef_macros'.
            macros = build_info.get('macros')
            if macros:
                ext.define_macros = []
                ext.undef_macros = []
                for macro in macros:
                    if not (isinstance(macro, tuple) and len(macro) in (1, 2)):
                        raise DistutilsSetupError(
                            "'macros' element of build info dict "
                            "must be 1- or 2-tuple"
                        )
                    if len(macro) == 1:
                        ext.undef_macros.append(macro[0])
                    elif len(macro) == 2:
                        ext.define_macros.append(macro)

            extensions[i] = ext

    def get_source_files(self):
        self.check_extensions_list(self.extensions)
        filenames = []

        # Wouldn't it be neat if we knew the names of header files too...
        for ext in self.extensions:
            filenames.extend(ext.sources)
        return filenames

    def get_outputs(self):
        # Sanity check the 'extensions' list -- can't assume this is being
        # done in the same run as a 'build_extensions()' call (in fact, we
        # can probably assume that it *isn't*!).
        self.check_extensions_list(self.extensions)

        # And build the list of output (built) filenames.  Note that this
        # ignores the 'inplace' flag, and assumes everything goes in the
        # "build" tree.
        outputs = []
        for ext in self.extensions:
            outputs.append(self.get_ext_fullpath(ext.name))
        return outputs

    def build_extensions(self):
        # First, sanity-check the 'extensions' list
        self.check_extensions_list(self.extensions)
        if self.parallel:
            self._build_extensions_parallel()
        else:
            self._build_extensions_serial()

    def _build_extensions_parallel(self):
        workers = self.parallel
        if self.parallel is True:
            workers = os.cpu_count()  # may return None
        try:
            from concurrent.futures import ThreadPoolExecutor
        except ImportError:
            workers = None

        if workers is None:
            self._build_extensions_serial()
            return

        with ThreadPoolExecutor(max_workers=workers) as executor:
            futures = [
                executor.submit(self.build_extension, ext) for ext in self.extensions
            ]
            for ext, fut in zip(self.extensions, futures):
                with self._filter_build_errors(ext):
                    fut.result()

    def _build_extensions_serial(self):
        for ext in self.extensions:
            with self._filter_build_errors(ext):
                self.build_extension(ext)

    @contextlib.contextmanager
    def _filter_build_errors(self, ext):
        try:
            yield
        except (CCompilerError, DistutilsError, CompileError) as e:
            if not ext.optional:
                raise
            self.warn('building extension "{}" failed: {}'.format(ext.name, e))

    def build_extension(self, ext):
        sources = ext.sources
        if sources is None or not isinstance(sources, (list, tuple)):
            raise DistutilsSetupError(
                "in 'ext_modules' option (extension '%s'), "
                "'sources' must be present and must be "
                "a list of source filenames" % ext.name
            )
        # sort to make the resulting .so file build reproducible
        sources = sorted(sources)

        ext_path = self.get_ext_fullpath(ext.name)
        depends = sources + ext.depends
        if not (self.force or newer_group(depends, ext_path, 'newer')):
            log.debug("skipping '%s' extension (up-to-date)", ext.name)
            return
        else:
            log.info("building '%s' extension", ext.name)

        # First, scan the sources for SWIG definition files (.i), run
        # SWIG on 'em to create .c files, and modify the sources list
        # accordingly.
        sources = self.swig_sources(sources, ext)

        # Next, compile the source code to object files.

        # XXX not honouring 'define_macros' or 'undef_macros' -- the
        # CCompiler API needs to change to accommodate this, and I
        # want to do one thing at a time!

        # Two possible sources for extra compiler arguments:
        #   - 'extra_compile_args' in Extension object
        #   - CFLAGS environment variable (not particularly
        #     elegant, but people seem to expect it and I
        #     guess it's useful)
        # The environment variable should take precedence, and
        # any sensible compiler will give precedence to later
        # command line args.  Hence we combine them in order:
        extra_args = ext.extra_compile_args or []

        macros = ext.define_macros[:]
        for undef in ext.undef_macros:
            macros.append((undef,))

        objects = self.compiler.compile(
            sources,
            output_dir=self.build_temp,
            macros=macros,
            include_dirs=ext.include_dirs,
            debug=self.debug,
            extra_postargs=extra_args,
            depends=ext.depends,
        )

        # XXX outdated variable, kept here in case third-part code
        # needs it.
        self._built_objects = objects[:]

        # Now link the object files together into a "shared object" --
        # of course, first we have to figure out all the other things
        # that go into the mix.
        if ext.extra_objects:
            objects.extend(ext.extra_objects)
        extra_args = ext.extra_link_args or []

        # Detect target language, if not provided
        language = ext.language or self.compiler.detect_language(sources)

        self.compiler.link_shared_object(
            objects,
            ext_path,
            libraries=self.get_libraries(ext),
            library_dirs=ext.library_dirs,
            runtime_library_dirs=ext.runtime_library_dirs,
            extra_postargs=extra_args,
            export_symbols=self.get_export_symbols(ext),
            debug=self.debug,
            build_temp=self.build_temp,
            target_lang=language,
        )

    def swig_sources(self, sources, extension):
        """Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        """
        new_sources = []
        swig_sources = []
        swig_targets = {}

        # XXX this drops generated C/C++ files into the source tree, which
        # is fine for developers who want to distribute the generated
        # source -- but there should be an option to put SWIG output in
        # the temp dir.

        if self.swig_cpp:
            log.warning("--swig-cpp is deprecated - use --swig-opts=-c++")

        if (
            self.swig_cpp
            or ('-c++' in self.swig_opts)
            or ('-c++' in extension.swig_opts)
        ):
            target_ext = '.cpp'
        else:
            target_ext = '.c'

        for source in sources:
            (base, ext) = os.path.splitext(source)
            if ext == ".i":  # SWIG interface file
                new_sources.append(base + '_wrap' + target_ext)
                swig_sources.append(source)
                swig_targets[source] = new_sources[-1]
            else:
                new_sources.append(source)

        if not swig_sources:
            return new_sources

        swig = self.swig or self.find_swig()
        swig_cmd = [swig, "-python"]
        swig_cmd.extend(self.swig_opts)
        if self.swig_cpp:
            swig_cmd.append("-c++")

        # Do not override commandline arguments
        if not self.swig_opts:
            for o in extension.swig_opts:
                swig_cmd.append(o)

        for source in swig_sources:
            target = swig_targets[source]
            log.info("swigging %s to %s", source, target)
            self.spawn(swig_cmd + ["-o", target, source])

        return new_sources

    def find_swig(self):
        """Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        """
        if os.name == "posix":
            return "swig"
        elif os.name == "nt":
            # Look for SWIG in its standard installation directory on
            # Windows (or so I presume!).  If we find it there, great;
            # if not, act like Unix and assume it's in the PATH.
            for vers in ("1.3", "1.2", "1.1"):
                fn = os.path.join("c:\\swig%s" % vers, "swig.exe")
                if os.path.isfile(fn):
                    return fn
            else:
                return "swig.exe"
        else:
            raise DistutilsPlatformError(
                "I don't know how to find (much less run) SWIG "
                "on platform '%s'" % os.name
            )

    # -- Name generators -----------------------------------------------
    # (extension names, filenames, whatever)
    def get_ext_fullpath(self, ext_name):
        """Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        """
        fullname = self.get_ext_fullname(ext_name)
        modpath = fullname.split('.')
        filename = self.get_ext_filename(modpath[-1])

        if not self.inplace:
            # no further work needed
            # returning :
            #   build_dir/package/path/filename
            filename = os.path.join(*modpath[:-1] + [filename])
            return os.path.join(self.build_lib, filename)

        # the inplace option requires to find the package directory
        # using the build_py command for that
        package = '.'.join(modpath[0:-1])
        build_py = self.get_finalized_command('build_py')
        package_dir = os.path.abspath(build_py.get_package_dir(package))

        # returning
        #   package_dir/filename
        return os.path.join(package_dir, filename)

    def get_ext_fullname(self, ext_name):
        """Returns the fullname of a given extension name.

        Adds the `package.` prefix"""
        if self.package is None:
            return ext_name
        else:
            return self.package + '.' + ext_name

    def get_ext_filename(self, ext_name):
        r"""Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        """
        from ..sysconfig import get_config_var

        ext_path = ext_name.split('.')
        ext_suffix = get_config_var('EXT_SUFFIX')
        return os.path.join(*ext_path) + ext_suffix

    def get_export_symbols(self, ext):
        """Return the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        """
        name = ext.name.split('.')[-1]
        try:
            # Unicode module name support as defined in PEP-489
            # https://peps.python.org/pep-0489/#export-hook-name
            name.encode('ascii')
        except UnicodeEncodeError:
            suffix = 'U_' + name.encode('punycode').replace(b'-', b'_').decode('ascii')
        else:
            suffix = "_" + name

        initfunc_name = "PyInit" + suffix
        if initfunc_name not in ext.export_symbols:
            ext.export_symbols.append(initfunc_name)
        return ext.export_symbols

    def get_libraries(self, ext):  # noqa: C901
        """Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        """
        # The python library is always needed on Windows.  For MSVC, this
        # is redundant, since the library is mentioned in a pragma in
        # pyconfig.h that MSVC groks.  The other Windows compilers all seem
        # to need it mentioned explicitly, though, so that's what we do.
        # Append '_d' to the python import library on debug builds.
        if sys.platform == "win32":
            from .._msvccompiler import MSVCCompiler

            if not isinstance(self.compiler, MSVCCompiler):
                template = "python%d%d"
                if self.debug:
                    template = template + '_d'
                pythonlib = template % (
                    sys.hexversion >> 24,
                    (sys.hexversion >> 16) & 0xFF,
                )
                # don't extend ext.libraries, it may be shared with other
                # extensions, it is a reference to the original list
                return ext.libraries + [pythonlib]
        else:
            # On Android only the main executable and LD_PRELOADs are considered
            # to be RTLD_GLOBAL, all the dependencies of the main executable
            # remain RTLD_LOCAL and so the shared libraries must be linked with
            # libpython when python is built with a shared python library (issue
            # bpo-21536).
            # On Cygwin (and if required, other POSIX-like platforms based on
            # Windows like MinGW) it is simply necessary that all symbols in
            # shared libraries are resolved at link time.
            from ..sysconfig import get_config_var

            link_libpython = False
            if get_config_var('Py_ENABLE_SHARED'):
                # A native build on an Android device or on Cygwin
                if hasattr(sys, 'getandroidapilevel'):
                    link_libpython = True
                elif sys.platform == 'cygwin':
                    link_libpython = True
                elif '_PYTHON_HOST_PLATFORM' in os.environ:
                    # We are cross-compiling for one of the relevant platforms
                    if get_config_var('ANDROID_API_LEVEL') != 0:
                        link_libpython = True
                    elif get_config_var('MACHDEP') == 'cygwin':
                        link_libpython = True

            if link_libpython:
                ldversion = get_config_var('LDVERSION')
                return ext.libraries + ['python' + ldversion]

        return ext.libraries + py37compat.pythonlib()
python3.12/site-packages/setuptools/_distutils/command/register.py000064400000027051151732703540021345 0ustar00"""distutils.command.register

Implements the Distutils 'register' command (register with the repository).
"""

# created 2002/10/21, Richard Jones

import getpass
import io
import logging
import urllib.parse
import urllib.request
from warnings import warn

from ..core import PyPIRCCommand
from distutils._log import log


class register(PyPIRCCommand):
    description = "register the distribution with the Python package index"
    user_options = PyPIRCCommand.user_options + [
        ('list-classifiers', None, 'list the valid Trove classifiers'),
        (
            'strict',
            None,
            'Will stop the registering if the meta-data are not fully compliant',
        ),
    ]
    boolean_options = PyPIRCCommand.boolean_options + [
        'verify',
        'list-classifiers',
        'strict',
    ]

    sub_commands = [('check', lambda self: True)]

    def initialize_options(self):
        PyPIRCCommand.initialize_options(self)
        self.list_classifiers = 0
        self.strict = 0

    def finalize_options(self):
        PyPIRCCommand.finalize_options(self)
        # setting options for the `check` subcommand
        check_options = {
            'strict': ('register', self.strict),
            'restructuredtext': ('register', 1),
        }
        self.distribution.command_options['check'] = check_options

    def run(self):
        self.finalize_options()
        self._set_config()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        if self.dry_run:
            self.verify_metadata()
        elif self.list_classifiers:
            self.classifiers()
        else:
            self.send_metadata()

    def check_metadata(self):
        """Deprecated API."""
        warn(
            "distutils.command.register.check_metadata is deprecated; "
            "use the check command instead",
            DeprecationWarning,
        )
        check = self.distribution.get_command_obj('check')
        check.ensure_finalized()
        check.strict = self.strict
        check.restructuredtext = 1
        check.run()

    def _set_config(self):
        '''Reads the configuration file and set attributes.'''
        config = self._read_pypirc()
        if config != {}:
            self.username = config['username']
            self.password = config['password']
            self.repository = config['repository']
            self.realm = config['realm']
            self.has_config = True
        else:
            if self.repository not in ('pypi', self.DEFAULT_REPOSITORY):
                raise ValueError('%s not found in .pypirc' % self.repository)
            if self.repository == 'pypi':
                self.repository = self.DEFAULT_REPOSITORY
            self.has_config = False

    def classifiers(self):
        '''Fetch the list of classifiers from the server.'''
        url = self.repository + '?:action=list_classifiers'
        response = urllib.request.urlopen(url)
        log.info(self._read_pypi_response(response))

    def verify_metadata(self):
        '''Send the metadata to the package index server to be checked.'''
        # send the info to the server and report the result
        (code, result) = self.post_to_server(self.build_post_data('verify'))
        log.info('Server response (%s): %s', code, result)

    def send_metadata(self):  # noqa: C901
        '''Send the metadata to the package index server.

        Well, do the following:
        1. figure who the user is, and then
        2. send the data as a Basic auth'ed POST.

        First we try to read the username/password from $HOME/.pypirc,
        which is a ConfigParser-formatted file with a section
        [distutils] containing username and password entries (both
        in clear text). Eg:

            [distutils]
            index-servers =
                pypi

            [pypi]
            username: fred
            password: sekrit

        Otherwise, to figure who the user is, we offer the user three
        choices:

         1. use existing login,
         2. register as a new user, or
         3. set the password to a random string and email the user.

        '''
        # see if we can short-cut and get the username/password from the
        # config
        if self.has_config:
            choice = '1'
            username = self.username
            password = self.password
        else:
            choice = 'x'
            username = password = ''

        # get the user's login info
        choices = '1 2 3 4'.split()
        while choice not in choices:
            self.announce(
                '''\
We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: ''',
                logging.INFO,
            )
            choice = input()
            if not choice:
                choice = '1'
            elif choice not in choices:
                print('Please choose one of the four options!')

        if choice == '1':
            # get the username and password
            while not username:
                username = input('Username: ')
            while not password:
                password = getpass.getpass('Password: ')

            # set up the authentication
            auth = urllib.request.HTTPPasswordMgr()
            host = urllib.parse.urlparse(self.repository)[1]
            auth.add_password(self.realm, host, username, password)
            # send the info to the server and report the result
            code, result = self.post_to_server(self.build_post_data('submit'), auth)
            self.announce('Server response ({}): {}'.format(code, result), logging.INFO)

            # possibly save the login
            if code == 200:
                if self.has_config:
                    # sharing the password in the distribution instance
                    # so the upload command can reuse it
                    self.distribution.password = password
                else:
                    self.announce(
                        (
                            'I can store your PyPI login so future '
                            'submissions will be faster.'
                        ),
                        logging.INFO,
                    )
                    self.announce(
                        '(the login will be stored in %s)' % self._get_rc_file(),
                        logging.INFO,
                    )
                    choice = 'X'
                    while choice.lower() not in 'yn':
                        choice = input('Save your login (y/N)?')
                        if not choice:
                            choice = 'n'
                    if choice.lower() == 'y':
                        self._store_pypirc(username, password)

        elif choice == '2':
            data = {':action': 'user'}
            data['name'] = data['password'] = data['email'] = ''
            data['confirm'] = None
            while not data['name']:
                data['name'] = input('Username: ')
            while data['password'] != data['confirm']:
                while not data['password']:
                    data['password'] = getpass.getpass('Password: ')
                while not data['confirm']:
                    data['confirm'] = getpass.getpass(' Confirm: ')
                if data['password'] != data['confirm']:
                    data['password'] = ''
                    data['confirm'] = None
                    print("Password and confirm don't match!")
            while not data['email']:
                data['email'] = input('   EMail: ')
            code, result = self.post_to_server(data)
            if code != 200:
                log.info('Server response (%s): %s', code, result)
            else:
                log.info('You will receive an email shortly.')
                log.info('Follow the instructions in it to ' 'complete registration.')
        elif choice == '3':
            data = {':action': 'password_reset'}
            data['email'] = ''
            while not data['email']:
                data['email'] = input('Your email address: ')
            code, result = self.post_to_server(data)
            log.info('Server response (%s): %s', code, result)

    def build_post_data(self, action):
        # figure the data to send - the metadata plus some additional
        # information used by the package server
        meta = self.distribution.metadata
        data = {
            ':action': action,
            'metadata_version': '1.0',
            'name': meta.get_name(),
            'version': meta.get_version(),
            'summary': meta.get_description(),
            'home_page': meta.get_url(),
            'author': meta.get_contact(),
            'author_email': meta.get_contact_email(),
            'license': meta.get_licence(),
            'description': meta.get_long_description(),
            'keywords': meta.get_keywords(),
            'platform': meta.get_platforms(),
            'classifiers': meta.get_classifiers(),
            'download_url': meta.get_download_url(),
            # PEP 314
            'provides': meta.get_provides(),
            'requires': meta.get_requires(),
            'obsoletes': meta.get_obsoletes(),
        }
        if data['provides'] or data['requires'] or data['obsoletes']:
            data['metadata_version'] = '1.1'
        return data

    def post_to_server(self, data, auth=None):  # noqa: C901
        '''Post a query to the server, and return a string response.'''
        if 'name' in data:
            self.announce(
                'Registering {} to {}'.format(data['name'], self.repository),
                logging.INFO,
            )
        # Build up the MIME payload for the urllib2 POST data
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = '\n--' + boundary
        end_boundary = sep_boundary + '--'
        body = io.StringIO()
        for key, value in data.items():
            # handle multiple entries for the same name
            if type(value) not in (type([]), type(())):
                value = [value]
            for value in value:
                value = str(value)
                body.write(sep_boundary)
                body.write('\nContent-Disposition: form-data; name="%s"' % key)
                body.write("\n\n")
                body.write(value)
                if value and value[-1] == '\r':
                    body.write('\n')  # write an extra newline (lurve Macs)
        body.write(end_boundary)
        body.write("\n")
        body = body.getvalue().encode("utf-8")

        # build the Request
        headers = {
            'Content-type': 'multipart/form-data; boundary=%s; charset=utf-8'
            % boundary,
            'Content-length': str(len(body)),
        }
        req = urllib.request.Request(self.repository, body, headers)

        # handle HTTP and include the Basic Auth handler
        opener = urllib.request.build_opener(
            urllib.request.HTTPBasicAuthHandler(password_mgr=auth)
        )
        data = ''
        try:
            result = opener.open(req)
        except urllib.error.HTTPError as e:
            if self.show_response:
                data = e.fp.read()
            result = e.code, e.msg
        except urllib.error.URLError as e:
            result = 500, str(e)
        else:
            if self.show_response:
                data = self._read_pypi_response(result)
            result = 200, 'OK'
        if self.show_response:
            msg = '\n'.join(('-' * 75, data, '-' * 75))
            self.announce(msg, logging.INFO)
        return result
python3.12/site-packages/setuptools/_distutils/command/bdist_dumb.py000064400000011071151732703540021630 0ustar00"""distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix)."""

import os
from ..core import Command
from ..util import get_platform
from ..dir_util import remove_tree, ensure_relative
from ..errors import DistutilsPlatformError
from ..sysconfig import get_python_version
from distutils._log import log


class bdist_dumb(Command):
    description = "create a \"dumb\" built distribution"

    user_options = [
        ('bdist-dir=', 'd', "temporary directory for creating the distribution"),
        (
            'plat-name=',
            'p',
            "platform name to embed in generated filenames "
            "(default: %s)" % get_platform(),
        ),
        (
            'format=',
            'f',
            "archive format to create (tar, gztar, bztar, xztar, " "ztar, zip)",
        ),
        (
            'keep-temp',
            'k',
            "keep the pseudo-installation tree around after "
            + "creating the distribution archive",
        ),
        ('dist-dir=', 'd', "directory to put final built distributions in"),
        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
        (
            'relative',
            None,
            "build the archive using relative paths " "(default: false)",
        ),
        (
            'owner=',
            'u',
            "Owner name used when creating a tar file" " [default: current user]",
        ),
        (
            'group=',
            'g',
            "Group name used when creating a tar file" " [default: current group]",
        ),
    ]

    boolean_options = ['keep-temp', 'skip-build', 'relative']

    default_format = {'posix': 'gztar', 'nt': 'zip'}

    def initialize_options(self):
        self.bdist_dir = None
        self.plat_name = None
        self.format = None
        self.keep_temp = 0
        self.dist_dir = None
        self.skip_build = None
        self.relative = 0
        self.owner = None
        self.group = None

    def finalize_options(self):
        if self.bdist_dir is None:
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'dumb')

        if self.format is None:
            try:
                self.format = self.default_format[os.name]
            except KeyError:
                raise DistutilsPlatformError(
                    "don't know how to create dumb built distributions "
                    "on platform %s" % os.name
                )

        self.set_undefined_options(
            'bdist',
            ('dist_dir', 'dist_dir'),
            ('plat_name', 'plat_name'),
            ('skip_build', 'skip_build'),
        )

    def run(self):
        if not self.skip_build:
            self.run_command('build')

        install = self.reinitialize_command('install', reinit_subcommands=1)
        install.root = self.bdist_dir
        install.skip_build = self.skip_build
        install.warn_dir = 0

        log.info("installing to %s", self.bdist_dir)
        self.run_command('install')

        # And make an archive relative to the root of the
        # pseudo-installation tree.
        archive_basename = "{}.{}".format(
            self.distribution.get_fullname(), self.plat_name
        )

        pseudoinstall_root = os.path.join(self.dist_dir, archive_basename)
        if not self.relative:
            archive_root = self.bdist_dir
        else:
            if self.distribution.has_ext_modules() and (
                install.install_base != install.install_platbase
            ):
                raise DistutilsPlatformError(
                    "can't make a dumb built distribution where "
                    "base and platbase are different (%s, %s)"
                    % (repr(install.install_base), repr(install.install_platbase))
                )
            else:
                archive_root = os.path.join(
                    self.bdist_dir, ensure_relative(install.install_base)
                )

        # Make the archive
        filename = self.make_archive(
            pseudoinstall_root,
            self.format,
            root_dir=archive_root,
            owner=self.owner,
            group=self.group,
        )
        if self.distribution.has_ext_modules():
            pyversion = get_python_version()
        else:
            pyversion = 'any'
        self.distribution.dist_files.append(('bdist_dumb', pyversion, filename))

        if not self.keep_temp:
            remove_tree(self.bdist_dir, dry_run=self.dry_run)
python3.12/site-packages/setuptools/_distutils/command/__pycache__/_framework_compat.cpython-312.pyc000064400000005215151732703540027557 0ustar00�

��_iN���dZddlZddlZddlZddlZddlZej�d��Zeedddddd	d
d���
�Z	ej�d��Z
d�Zy)z6
Backward compatibility for homebrew builds on macOS.
�Nc�^�dtjcxkxrdknc}tjdk(xrtj}dt	j
d�v}tjtjk7}tjjd�}|xr|xr|xr|xr|S)z^
    Only enabled for Python 3.9 framework homebrew builds
    except ensurepip and venv.
    )��	)r�
�darwin�Cellar�projectbase�ENSUREPIP_OPTIONS)�sys�version_info�platform�
_framework�	sysconfig�get_config_var�prefix�base_prefix�os�environ�get)�PY39�	framework�homebrew�venv�	ensurepips     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/_framework_compat.py�enabledr
s����C�$�$�.�w�.�D�����(�;�S�^�^�I��9�3�3�M�B�B�H��:�:����(�D��
�
���2�3�I��I�I�I�(�I�4�x�I�	�M�I�z6{installed_base}/{platlibdir}/python{py_version_short}z0{platbase}/{platlibdir}/python{py_version_short}z<{homebrew_prefix}/lib/python{py_version_short}/site-packageszE{homebrew_prefix}/{platlibdir}/python{py_version_short}/site-packagesz;{installed_base}/include/python{py_version_short}{abiflags}z?{installed_platbase}/include/python{py_version_short}{abiflags}z{homebrew_prefix}/binz{homebrew_prefix})�stdlib�
platstdlib�purelib�platlib�include�platinclude�scripts�data)�osx_framework_libraryc�|�t�siStjddgd��j�}t	�S)N�brewz--prefixT)�text)r�
subprocess�check_output�strip�locals)�homebrew_prefixs r�varsr/)s3���9��	� �-�-�v�z�.B��N�T�T�V�O��8�Orc�>�t�r|jd�s|Sy)z8
    Override the selected scheme for posix_prefix.
    �_prefixr&)r�endswith)�names r�schemer41s���9�D�M�M�)�4���"r)�__doc__rr�	functoolsr*r�	lru_cacher�dict�schemesr/r4�rr�<module>r;s����
�	���������
J��
J���G�E�N�W�M�U�'�
 �	�����������#rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/__init__.cpython-312.pyc000064400000001111151732703540025606 0ustar00�

��_i����dZgd�Zy)z\distutils.command

Package containing implementation of all the standard Distutils
commands.)�build�build_py�	build_ext�
build_clib�
build_scripts�clean�install�install_lib�install_headers�install_scripts�install_data�sdist�register�bdist�
bdist_dumb�	bdist_rpm�check�uploadN)�__doc__�__all__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/__init__.py�<module>rs��
�
�rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/clean.cpython-312.pyc000064400000006000151732703540025133 0ustar00�

��_i"
��J�dZddlZddlmZddlmZddlmZGd�de�Zy)	zBdistutils.command.clean

Implements the Distutils 'clean' command.�N�)�Command)�remove_tree)�logc�0�eZdZdZgd�ZdgZd�Zd�Zd�Zy)�cleanz-clean up temporary files from 'build' command))zbuild-base=�bz2base build directory (default: 'build.build-base'))z
build-lib=Nz<build directory for all modules (default: 'build.build-lib'))zbuild-temp=�tz7temporary build directory (default: 'build.build-temp'))zbuild-scripts=Nz<build directory for scripts (default: 'build.build-scripts'))zbdist-base=Nz+temporary directory for built distributions)�all�az7remove all build output, not just temporary by-productsrc�X�d|_d|_d|_d|_d|_d|_y)N)�
build_base�	build_lib�
build_temp�
build_scripts�
bdist_baser��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/clean.py�initialize_optionszclean.initialize_options"s-�����������!���������c�R�|jddddd�|jdd�y)N�build)rr)rr)rr)rr�bdist)rr)�set_undefined_optionsrs r�finalize_optionszclean.finalize_options*s2���"�"��(�&�.�(�	
�	
�"�"�7�,H�Irc��tjj|j�r"t	|j|j
��n t
jd|j�|jru|j|j|jfD]O}tjj|�rt	||j
���:t
jd|��Q|j
sA	tj|j�t
jd|j�yy#t $rYywxYw)N)�dry_runz%'%s' does not exist -- can't clean itz
removing '%s')�os�path�existsrrrr�debugrrrr�warning�rmdirr�info�OSError)r�	directorys  r�runz	clean.run4s����7�7�>�>�$�/�/�*��������>��I�I�=�t���O��8�8�"�n�n�d�o�o�t�?Q�?Q�R�	��7�7�>�>�)�,��	�4�<�<�@��K�K� G��S�	S��|�|�
�������)�����$�/�/�:����
��
�s�:?D;�;	E�EN)	�__name__�
__module__�__qualname__�description�user_options�boolean_optionsrrr(�rrrr
s'��A�K��L�"�g�O��J�rr)	�__doc__r�corer�dir_utilr�distutils._logrrr/rr�<module>r4s$��-�
��"��>�G�>rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/py37compat.cpython-312.pyc000064400000002724151732703550026071 0ustar00�

��_i����ddlZd�Zd�Zejdkr+ejdk7rejdddk7r
eee�ZyeZy)�Nc#��K�ddlm}|jd�sydjtj
dz	tj
dz	dz|jd	����y�w)
zj
    On Python 3.7 and earlier, distutils would include the Python
    library. See pypa/distutils#9.
    r��	sysconfig�Py_ENABLED_SHAREDNz
python{}.{}{}����ABIFLAGS)�	distutilsr�get_config_var�format�sys�
hexversionrs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/py37compat.py�_pythonlib_compatrs[����
$��#�#�$7�8��
�
 �
 ����"��	���2�	��%�� � ��,���s�A#A%c������fd�S)Nc� ����|i|���S)N�)�args�kwargs�f1�f2s  ��r�<lambda>zcompose.<locals>.<lambda>s���2�b�$�&9�&�&9�#:�r)rrs``r�composers	���:�:r)���darwinr�aix)rrr�version_info�platform�list�	pythonlibrrr�<module>r$s]��
��";����&� ����� ����R�a��E�!��D�#�$�
�

�
rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/build_ext.cpython-312.pyc000064400000070144151732703550026043 0ustar00�

��_i{���dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZmZddlmZddlmZdd	lmZdd
lmZddlmZdd
lmZddlmZej<d�Zd�Z Gd�de�Z!y)z�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).�N�)�Command)�DistutilsOptionError�DistutilsSetupError�CCompilerError�DistutilsError�CompileError�DistutilsPlatformError)�customize_compiler�get_python_version)�get_config_h_filename)�newer_group)�	Extension)�get_platform)�log�)�
py37compat)�	USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$c��ddlm}|�y)Nr��show_compilers)�	ccompilerrrs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.pyrr#s��*���c�&�eZdZdZdej
zZddddde�zfdd	d
dezfdd
ddddezfddddddddddgZgd�Z	ddde
fgZd �Zd!�Z
d"�Zd#�Zd$�Zd%�Zd&�Zd'�Zd(�Zej,d)��Zd*�Zd+�Zd,�Zd-�Zd.�Zd/�Zd0�Zd1�Zy)2�	build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s'))z
build-lib=�bz(directory for compiled extension modules)zbuild-temp=�tz1directory for temporary files (build by-products)z
plat-name=�pz>platform name to cross-compile for, if supported (default: %s))�inplace�iziignore build-lib and put compiled extensions into the source directory alongside your pure Python modulesz
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link withz
library-dirs=�Lz.directories to search for external C libraries)zrpath=�Rz7directories to search for shared C libraries at runtime)z
link-objects=�Oz2extra explicit link objects to include in the link)�debug�gz'compile/link with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler type)z	parallel=�jznumber of parallel build jobs)�swig-cppNz)make SWIG create C++ files (default is C))z
swig-opts=Nz!list of SWIG command line options)zswig=Nzpath to the SWIG executable)�userNz#add user include, library and rpath)r r)r+r/r0z
help-compilerNzlist available compilersc�*�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_y)Nr)�
extensions�	build_lib�	plat_name�
build_tempr �package�include_dirs�define�undef�	libraries�library_dirs�rpath�link_objectsr)r+�compiler�swig�swig_cpp�	swig_optsr0�parallel��selfs r�initialize_optionszbuild_ext.initialize_optionsms��������������������� ��������
���� �����
� �����
���
���
���	���
������	���
rc
��ddlm}|jddddddd	d
�|j�|jj
|_|jj|_|j�}|jd��}|j�|jjxsg|_	t|jt�r.|jjtj�|_	tj tj"k7rG|jj%tj&j)tj d
��|jj+|jtj&j��||k7rB|jj+|jtj&j��|j-d�|j-d�|j.�g|_|j0�g|_nHt|j0t�r.|j0jtj�|_|j2�g|_nHt|j2t�r.|j2jtj�|_tj4dk(�r|j0j%tj&j)tj d��tj"tj6k7rG|j0j%tj&j)tj"d��|j8r0tj&j)|j:d�|_n/tj&j)|j:d�|_|jj%tj&j=t?���|j0j%tj"�|j@dk(rd}n|j@dd}tj&j)tj d�}|r tj&j)||�}|j0j%|�tjBdddk(r||jDsU|j0j%tj&j)tj6ddtG�zd��n|j0j%d�|jId�rR|jDs+|j0j%|jId��n|j0j%d�|jJr2|jJjd�}|D�cgc]}|d f��c}|_%|jLr |jLjd�|_&|jN�g|_'n |jNjd!�|_'|jPr�tj&j)tRd
�}tj&j)tRd�}	tj&jU|�r|jj%|�tj&jU|	�r6|j0j%|	�|j2j%|	�t|jVt�r	tY|jV�|_+yycc}w#tZ$rt]d"��wxYw)#Nr)�	sysconfig�build)r3r3)r5r5)r>r>)r)r))r+r+)rBrB)r4r4r)�
plat_specific�includer:r=�nt�libs�Debug�Release�win32��PCbuild��cygwin�lib�python�config�.�Py_ENABLE_SHARED�LIBDIR�,�1� zparallel should be an integer)/�	distutilsrG�set_undefined_optionsr6�distribution�ext_package�ext_modulesr2�get_python_incr7�
isinstance�str�split�os�pathsep�sys�exec_prefix�base_exec_prefix�append�path�join�extend�ensure_string_listr:r;r<�name�prefixr)r5�dirnamer
r4�platform�python_buildr�get_config_varr8r9rAr0r�isdirrB�int�
ValueErrorr)
rDrG�
py_include�plat_py_include�suffix�new_lib�defines�symbol�user_include�user_libs
          r�finalize_optionszbuild_ext.finalize_options�sv��'��"�"��&�(�$���$�&�		
��<�<���,�,�8�8�D�L��+�+�7�7����-�-�/�
�#�2�2��2�C�����$� $� 1� 1� >� >� D�"�D���d�'�'��-� $� 1� 1� 7� 7��
�
� C�D���?�?�c�2�2�2����$�$�R�W�W�\�\�#�/�/�9�%M�N�	
��� � ��!1�!1�"�'�'�/�/�!B�C��j�(����$�$�_�%:�%:�2�7�7�?�?�%K�L�����,�����/��>�>�!��D�N����$� "�D��
��)�)�3�
/� $� 1� 1� 7� 7��
�
� C�D���:�:���D�J�
��
�
�C�
(����)�)�"�*�*�5�D�J�
�7�7�d�?�
���$�$�R�W�W�\�\�#�/�/�6�%J�K��#�#�s�z�z�1��!�!�(�(������c�6J�6J�F�)S�T��z�z�"$�'�'�,�,�t����"H���"$�'�'�,�,�t���	�"J���
���$�$�R�W�W�_�_�5J�5L�%M�N����$�$�S�%9�%9�:��~�~��(� �������+���g�g�l�l�3�?�?�I�>�G���'�'�,�,�w��7�����$�$�W�-��<�<����x�'��)�)��!�!�(�(��G�G�L�L��
�
�E�8�6H�6J�+J�H����!�!�(�(��-�
�#�#�$6�7��)�)��!�!�(�(��)A�)A�(�)K�L��!�!�(�(��-��;�;��k�k�'�'��,�G�7>�?�w�V�F�C�=�w�?�D�K�
�:�:����)�)�#�.�D�J��>�>�!��D�N�!�^�^�1�1�#�6�D�N��9�9��7�7�<�<�	�9�=�L��w�w�|�|�I�u�5�H��w�w�}�}�\�*��!�!�(�(��6��w�w�}�}�X�&��!�!�(�(��2��
�
�!�!�(�+��d�m�m�S�)�
L� #�D�M�M� 2��
�*��/@��4�
L�*�+J�K�K�
L�s�^$�^)�)^>c�P�ddlm}|jsy|jj	�rc|jd�}|jj|j�xsg�|jj|j�||j|j|j|j��|_t!|j�t"j$dk(r<|j&t)�k7r%|jj+|j&�|j,�%|jj/|j,�|j0�0|j0D]!\}}|jj3||��#|j4�,|j4D]}|jj7|��|j�%|jj9|j�|j�%|jj;|j�|j<�%|jj?|j<�|j@�%|jjC|j@�|jE�y)Nr)�new_compiler�
build_clib)r>�verbose�dry_runr+rK)#rr�r2r_�has_c_libraries�get_finalized_commandr:rn�get_library_namesr;rkr�r>r�r�r+rrfrpr4r�
initializer7�set_include_dirsr8�define_macror9�undefine_macro�
set_libraries�set_library_dirsr<�set_runtime_library_dirsr=�set_link_objects�build_extensions)rDr�r�rp�value�macros      r�runz
build_ext.runs���,�����
���,�,�.��3�3�L�A�J��N�N�!�!�*�">�">�"@�"F�B�G����$�$�Z�%:�%:�;�%��]�]��L�L��L�L��*�*�	
��
�	�4�=�=�)��7�7�d�?�t�~�~���?��M�M�$�$�T�^�^�4����(��M�M�*�*�4�+<�+<�=��;�;�"�#�{�{���e��
�
�*�*�4��7� +��:�:�!������
�
�,�,�U�3�$��>�>�%��M�M�'�'����7����(��M�M�*�*�4�+<�+<�=��:�:�!��M�M�2�2�4�:�:�>����(��M�M�*�*�4�+<�+<�=�	
���rc���t|t�std��t|�D�]�\}}t|t�r�t|t
�rt
|�dk7rtd��|\}}tjd|�t|t�rtj|�std��t|t�std��t	||d�}dD]#}|j|�}|��t|||��%|jd
�|_d|vrtjd�|jd
�}|r�g|_g|_|D]�}	t|	t
�r
t
|	�dvstd��t
|	�dk(r|j"j%|	d��Xt
|	�dk(s�g|j j%|	���|||<���y	)a�Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z:'ext_modules' option must be a list of Extension instancesrzMeach element of 'ext_modules' option must be an Extension instance or 2-tuplezvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancezRfirst element of each tuple in 'ext_modules' must be the extension name (a string)zOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)�sources)r7r;r:�
extra_objects�extra_compile_args�extra_link_argsNr<�def_filez9'def_file' element of build info dict no longer supported�macros)rrz9'macros' element of build info dict must be 1- or 2-tuplerr)rc�listr�	enumerater�tuple�lenr�warningrd�extension_name_re�match�dict�get�setattr�runtime_library_dirs�
define_macros�undef_macrosrk)
rDr2r!�ext�ext_name�
build_info�key�valr�r�s
          r�check_extensions_listzbuild_ext.check_extensions_list[s����*�d�+�%�L��
� �
�+�F�A�s��#�y�)���c�5�)�S��X��]�)�4���
$'� �H�j��K�K�:��	
��x��-�2C�2I�2I�(�2S�)�<���
�j�$�/�)�8����H�j��&;�<�C���!�n�n�S�)���?��C��c�*��(2�~�~�g�'>�C�$��Z�'����R�� �^�^�H�-�F��$&��!�#%�� �#�E�&�u�e�4��U��v�9M�1�4����5�z�Q���(�(�/�/��a��9��U��q���)�)�0�0��7�$� �J�q�M�U,rc��|j|j�g}|jD]}|j|j��|S�N)r�r2rnr�)rD�	filenamesr�s   r�get_source_fileszbuild_ext.get_source_files�sA���"�"�4�?�?�3��	��?�?�C����S�[�[�)�#��rc��|j|j�g}|jD],}|j|j|j���.|Sr�)r�r2rk�get_ext_fullpathrp)rD�outputsr�s   r�get_outputszbuild_ext.get_outputs�sK��	
�"�"�4�?�?�3�
���?�?�C��N�N�4�0�0����:�;�#��rc��|j|j�|jr|j�y|j	�yr�)r�r2rB�_build_extensions_parallel�_build_extensions_serialrCs rr�zbuild_ext.build_extensions�s3���"�"�4�?�?�3��=�=��+�+�-��)�)�+rc��|j}|jdurtj�}	ddlm}|�|j
�y|��5}|jD�cgc]}|j|j|��� }}t|j|�D]/\}}|j|�5|j�ddd��1	ddd�y#t
$rd}Y��wxYwcc}w#1swY�[xYw#1swYyxYw)NTr)�ThreadPoolExecutor)�max_workers)
rBrf�	cpu_count�concurrent.futuresr��ImportErrorr�r2�submit�build_extension�zip�_filter_build_errors�result)rD�workersr��executorr��futures�futs       rr�z$build_ext._build_extensions_parallel�s����-�-���=�=�D� ��l�l�n�G�	�=��?��)�)�+��
�G�
4��FJ�o�o��FU�s����� 4� 4�c�:�o�
�� �����9���S��.�.�s�3��J�J�L�4�3�:�	5�
4���	��G�	���4�3��5�
4�sG�C�C:�!#C)�/C:�3C.�
C:�C&�%C&�)C:�.C7�3C:�:Dc��|jD]-}|j|�5|j|�ddd��/y#1swY�:xYwr�)r2r�r�)rDr�s  rr�z"build_ext._build_extensions_serial�s;���?�?�C��*�*�3�/��$�$�S�)�0�/�#�/�/�s	�>�A	c#��K�	d��y#tttf$rB}|js�|j	dj|j|��Yd}~yd}~wwxYw�w)Nz"building extension "{}" failed: {})rrr	�optional�warn�formatrp)rDr��es   rr�zbuild_ext._filter_build_errors�sR����	P������=�	P��<�<���I�I�:�A�A�#�(�(�A�N�O�O��	P�s*�A"�	�A"�A�8A�A"�A�A"c��|j}|�t|ttf�st	d|j
z��t
|�}|j|j
�}||jz}|js.t||d�s!tjd|j
�ytjd|j
�|j||�}|jxsg}|j dd}|j"D]}|j%|f��|j&j)||j*||j,|j||j��}|dd|_|j0r|j3|j0�|j4xsg}|j6xs|j&j9|�}	|j&j;|||j=|�|j>|j@||jC|�|j|j*|	��
y)Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenames�newerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension)�
output_dirr�r7r)�extra_postargs�depends)r:r;r�r��export_symbolsr)r5�target_lang)"r�rcr�r�rrp�sortedr�r�r+rrr)�info�swig_sourcesr�r�r�rkr>�compiler5r7�_built_objectsr�rnr��language�detect_language�link_shared_object�
get_librariesr;r��get_export_symbols)
rDr�r��ext_pathr��
extra_argsr�r9�objectsr�s
          rr�zbuild_ext.build_extension�s����+�+���?�*�W�t�U�m�"D�%�-�/2�x�x�8��
���/���(�(����2���C�K�K�'���
�
�k�'�8�W�E��I�I�<�c�h�h�G���H�H�.����9�
�#�#�G�S�1�� �+�+�1�r�
��"�"�1�%���%�%�E��M�M�5�(�#�&��-�-�'�'�������)�)��*�*�%��K�K�(�
��&�a�j���
����N�N�3�,�,�-��(�(�.�B�
��<�<�I�4�=�=�#@�#@��#I���
�
�(�(����(�(��-��)�)�!$�!9�!9�%��2�2�3�7��*�*���� �	)�	
rc��g}g}i}|jrtjd�|jsd|jvsd|jvrd}nd}|D]k}tj
j
|�\}}	|	dk(r1|j|dz|z�|j|�|d||<�[|j|��m|s|S|jxs|j�}
|
dg}|j|j�|jr|jd�|js"|jD]}|j|��|D]5}||}
tjd	||
�|j|d
|
|gz��7|S)z�Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        z/--swig-cpp is deprecated - use --swig-opts=-c++z-c++z.cppz.cz.i�_wrap���z-pythonzswigging %s to %sz-o)
r@rr�rArfrl�splitextrkr?�	find_swigrnr��spawn)rDr��	extension�new_sourcesr��swig_targets�
target_ext�source�baser�r?�swig_cmd�o�targets              rr�zbuild_ext.swig_sourcesIsy���������=�=��K�K�I�J�
�M�M��$�.�.�(��)�-�-�-��J��J��F��'�'�*�*�6�2�K�T�3��d�{��"�"�4�'�>�J�#>�?��#�#�F�+�'2�2���V�$��"�"�6�*������y�y�,�D�N�N�,���)�$��������'��=�=��O�O�F�#��~�~��(�(������"�)�#�F�!�&�)�F��H�H�(�&�&�9��J�J�x�4���"8�8�9�#�
�rc�$�tjdk(rytjdk(rNdD]H}tjjd|zd�}tjj	|�s�F|cSytdtjz��)z�Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        �posixr?rK)z1.3z1.2z1.1z	c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s')rfrprlrm�isfiler
)rD�vers�fns   rr�zbuild_ext.find_swig�s{��
�7�7�g���
�W�W��_�.���W�W�\�\�,��"5�z�B���7�7�>�>�"�%��I�.�
"�(�#�%'�W�W�-��
rc��|j|�}|jd�}|j|d�}|jsMt	j
j|dd|gz�}tj
j
|j|�Sdj
|dd�}|jd�}tj
j|j|��}tj
j
||�S)z�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        rWr�Nr�build_py)�get_ext_fullnamere�get_ext_filenamer rfrlrmr3r��abspath�get_package_dir)rDr��fullname�modpath�filenamer6r��package_dirs        rr�zbuild_ext.get_ext_fullpath�s����(�(��2���.�.��%���(�(����5���|�|��w�w�|�|�W�S�b�\�X�J�%>�?�H��7�7�<�<�����9�9��(�(�7�1�R�=�)���-�-�j�9���g�g�o�o�h�&>�&>�w�&G�H���w�w�|�|�K��2�2rc�B�|j�|S|jdz|zS)zSReturns the fullname of a given extension name.

        Adds the `package.` prefixrW)r6)rDr�s  rr�zbuild_ext.get_ext_fullname�s'���<�<���O��<�<�#�%��0�0rc�~�ddlm}|jd�}|d�}tjj
|�|zS)z�Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        r�rurW�
EXT_SUFFIX)rGrurerfrlrm)rDr�rur��
ext_suffixs     rr�zbuild_ext.get_ext_filename�s7��
	/��>�>�#�&��#�L�1�
��w�w�|�|�X�&��3�3rc�d�|jjd�d}	|jd�d|z}d	|z}||jvr|jj|�|jS#t$r6d|jd�j	dd�jd�z}Y�xwxYw)
aReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        rWr��ascii�_�U_�punycode�-�_�PyInit)rpre�encode�UnicodeEncodeError�replace�decoder�rk)rDr�rpr{�
initfunc_names     rr�zbuild_ext.get_export_symbols�s����x�x�~�~�c�"�2�&��	 �
�K�K�� ��4�Z�F� �6�)�
��� 2� 2�2����%�%�m�4��!�!�!��"�	X��D�K�K�
�3�;�;�D�$�G�N�N�w�W�W�F�	X�s�A0�0<B/�.B/c�F�tjdk(rkddlm}t	|j
|�s�d}|jr|dz}|tjdz	tjdz	dzfz}|j|gzSdd	l	m
}d
}|d�rVttd�rd
}nCtjdk(rd
}n-dtjvr|d�dk7rd
}n
|d�dk(rd
}|r|d�}|jd|zgzS|jtj�zS)z�Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        rOr)�MSVCCompilerz
python%d%d�_d���rFrX�getandroidapilevelTrS�_PYTHON_HOST_PLATFORM�ANDROID_API_LEVELr�MACHDEP�	LDVERSIONrU)rhrs�
_msvccompilerrrcr>r)�
hexversionr:rGru�hasattrrf�environr�	pythonlib)rDr�r�templater#ru�link_libpython�	ldversions        rr�zbuild_ext.get_libraries�s���<�<�7�"�4��d�m�m�\�:�'���:�:�'�$��H�$��N�N�b�(��^�^�r�)�T�1�(��	��}�}�	�{�2�2�
3�"�N��0�1��3� 4�5�%)�N��\�\�X�-�%)�N�,��
�
�:�%�&9�:�a�?�)-��'�	�2�h�>�)-���*�;�7�	��}�}��9�(<�'=�=�=��}�}�z�3�3�5�5�5r) �__name__�
__module__�__qualname__�descriptionrfrg�sep_byr�user_options�boolean_optionsr�help_optionsrEr�r�r�r�r�r�r�r��
contextlib�contextmanagerr�r�r�r�r�r�r�r�r��rrrr)s2��L�K�($�b�j�j�
0�F�G�Q���
�*�n�
-�	
�	
�
��<�v�E�	
�
	<�<�@���<�v�E�	
�
	S�T�A�L�7�;�G�A�6�=�K&�L�PH�O�
�$� :�N�K��L��0RL�h@ �DY �v��,�!�**�
���P��P�O
�b7�r�23�61�	4�"�*56rr)"�__doc__r/rf�rerh�corer�errorsrrrrr	r
rGrrr
�	_modifiedrr�r�utilr�distutils._logr�r�siterr�r�rrr1rr�<module>r;sf����	�	�
����?�-�#�!������B�J�J�U�V���k6��k6rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/build.cpython-312.pyc000064400000013447151732703550025166 0ustar00�

��_i���X�dZddlZddlZddlmZddlmZddlmZd�Z	Gd�d	e�Z
y)
zBdistutils.command.build

Implements the Distutils 'build' command.�N�)�Command)�DistutilsOptionError)�get_platformc��ddlm}|�y)Nr��show_compilers)�	ccompilerr	rs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/build.pyr	r	s��*���c��eZdZdZdddddddd	d
e�zfddd
ddgZddgZdddefgZd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zdefde
fdefdefgZy) �buildz"build everything needed to install)zbuild-base=�bz base directory for build library)zbuild-purelib=Nz2build directory for platform-neutral distributions)zbuild-platlib=Nz3build directory for platform-specific distributions)z
build-lib=NzWbuild directory for all distribution (defaults to either build-purelib or build-platlib)zbuild-scripts=Nzbuild directory for scripts)zbuild-temp=�tztemporary build directoryz
plat-name=�pz6platform name to build for, if supported (default: %s))z	compiler=�czspecify the compiler type)z	parallel=�jznumber of parallel build jobs)�debug�gz;compile extensions and libraries with debugging information)�force�fz2forcibly build everything (ignore file timestamps))zexecutable=�ez5specify final destination interpreter path (build.py)rrz
help-compilerNzlist available compilersc��d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_y)Nrr)�
build_base�
build_purelib�
build_platlib�	build_lib�
build_temp�
build_scripts�compiler�	plat_namerr�
executable�parallel��selfs r�initialize_optionszbuild.initialize_options4s[��!���"���!���������!�����
������
���
������
rc���|j�t�|_ntjdk7rt	d��dj|jtjj�}ttd�r|dz
}|j�/tjj|jd�|_
|j�2tjj|jd|z�|_|j�=|j j#�r|j|_n|j|_|j$�2tjj|jd|z�|_|j&�Ctjj|jdtj(dd	z�|_|j*�Btj*r2tjj-tj*�|_t/|j0t2�r	t5|j0�|_yy#t6$rt	d
��wxYw)N�ntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z.{}-{}�gettotalrefcountz-pydebug�lib�tempz
scripts-%d.%drzparallel should be an integer)r!r�os�namer�format�sys�implementation�	cache_tag�hasattrr�path�joinrrr�distribution�has_ext_modulesrr�version_infor"�normpath�
isinstancer#�str�int�
ValueError)r%�plat_specifiers  r�finalize_optionszbuild.finalize_optionsDs����>�>�!�)�^�D�N�
�w�w�$��*�C���
"�������9K�9K�9U�9U�V��
�3�*�+��j�(�N�
���%�!#�����d�o�o�u�!E�D�����%�!#�����d�o�o�u�~�?U�!V�D��
�>�>�!�� � �0�0�2�!%�!3�!3���!%�!3�!3����?�?�"� �g�g�l�l�4�?�?�F�^�<S�T�D�O����%�!#���������3�3C�3C�B�Q�3G�!G�"�D���?�?�"�s�~�~� �g�g�.�.�s�~�~�>�D�O��d�m�m�S�)�
L� #�D�M�M� 2��
�*���
L�*�+J�K�K�
L�s�<I�I-c�P�|j�D]}|j|��y�N)�get_sub_commands�run_command)r%�cmd_names  r�runz	build.run|s%���-�-�/�H����X�&�0rc�6�|jj�Sr@)r5�has_pure_modulesr$s rrFzbuild.has_pure_modules�s��� � �1�1�3�3rc�6�|jj�Sr@)r5�has_c_librariesr$s rrHzbuild.has_c_libraries����� � �0�0�2�2rc�6�|jj�Sr@)r5r6r$s rr6zbuild.has_ext_modules�rIrc�6�|jj�Sr@)r5�has_scriptsr$s rrLzbuild.has_scripts�s��� � �,�,�.�.r�build_py�
build_clib�	build_extr)�__name__�
__module__�__qualname__�descriptionr�user_options�boolean_optionsr	�help_optionsr&r>rDrFrHr6rL�sub_commands�rrrrs���6�K�	A�V�W�	
�	@�9���
�*�n�
-�	
�	8�;�U�L�U�-�L�2��(�O�
�$� :�N�K��L�� 6L�p'�4�3�3�/�
�%�&�	��'�	�o�&�	�+�&�	�Lrr)�__doc__r/r,�corer�errorsr�utilrr	rrXrr�<module>r]s.��-��	��)���F�G�Frpython3.12/site-packages/setuptools/_distutils/command/__pycache__/install_headers.cpython-312.pyc000064400000004353151732703550027224 0ustar00�

��_i���*�dZddlmZGd�de�Zy)z�distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory.�)�Commandc�<�eZdZdZddgZdgZd�Zd�Zd�Zd�Z	d	�Z
y
)�install_headerszinstall C/C++ header files)zinstall-dir=�dz$directory to install header files to)�force�fz-force installation (overwrite existing files)rc�.�d|_d|_g|_y)N�)�install_dirr�outfiles��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/install_headers.py�initialize_optionsz"install_headers.initialize_optionss�������
���
�c�*�|jddd�y)N�install)rr)rr)�set_undefined_optionsr
s r�finalize_optionsz install_headers.finalize_optionss���"�"��9�;M�	
rc���|jj}|sy|j|j�|D]<}|j	||j�\}}|j
j
|��>y�N)�distribution�headers�mkpathr�	copy_filer�append)rr�header�out�_s     r�runzinstall_headers.runsa���#�#�+�+�������D�$�$�%��F��~�~�f�d�.>�.>�?�H�S�!��M�M� � ��%�rc�6�|jjxsgSr)rrr
s r�
get_inputszinstall_headers.get_inputs(s��� � �(�(�.�B�.rc��|jSr)rr
s r�get_outputszinstall_headers.get_outputs+s���}�}�rN)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsrrr r"r$�rrrr
s9��.�K�	F�G��L�
�i�O��

�
&�/�rrN)�__doc__�corerrr+rr�<module>r.s��*�
�"�g�"rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/bdist_dumb.cpython-312.pyc000064400000012732151732703550026177 0ustar00�

��_i9��r�dZddlZddlmZddlmZddlmZmZddl	m
Z
ddlmZdd	l
mZGd
�de�Zy)z�distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).�N�)�Command)�get_platform)�remove_tree�ensure_relative)�DistutilsPlatformError)�get_python_version)�logc	�`�eZdZdZdddde�zfdddd	d
ddg	Zgd
�Zddd�Zd�Zd�Z	d�Z
y)�
bdist_dumbz"create a "dumb" built distribution)z
bdist-dir=�dz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))zformat=�fz>archive format to create (tar, gztar, bztar, xztar, ztar, zip))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=r
z-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))�relativeNz7build the archive using relative paths (default: false))zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group])rrr�gztar�zip)�posix�ntc��d|_d|_d|_d|_d|_d|_d|_d|_d|_y)Nr)	�	bdist_dir�	plat_name�format�	keep_temp�dist_dir�
skip_buildr�owner�group)�selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/bdist_dumb.py�initialize_optionszbdist_dumb.initialize_options=sA����������������
������
���
���
�c�t�|j�@|jd�j}tjj|d�|_|j�#	|jtj|_|jdddd�y#t$rtdtjz��wxYw)N�bdist�dumbz@don't know how to create dumb built distributions on platform %s)rr)rr)r r )r�get_finalized_command�
bdist_base�os�path�joinr�default_format�name�KeyErrorr�set_undefined_options)r#r+s  r$�finalize_optionszbdist_dumb.finalize_optionsHs����>�>�!��3�3�G�<�G�G�J��W�W�\�\�*�f�=�D�N��;�;��
�"�1�1�"�'�'�:���	
�"�"��$�&�(�		
��
�
�,�%�')�w�w�/���
�s�"B�&B7c��|js|jd�|jdd��}|j|_|j|_d|_t
jd|j�|jd�dj|jj�|j�}tjj|j|�}|j s
|j}n�|jj#�rQ|j$|j&k7r8t)dt+|j$��d	t+|j&��d
���tjj|jt-|j$��}|j/||j||j0|j2��}|jj#�rt5�}nd}|jj6j9d
||f�|j:s"t=|j|j>��yy)N�build�install�)�reinit_subcommandsrzinstalling to %sz{}.{}zLcan't make a dumb built distribution where base and platbase are different (z, �))�root_dirr!r"�anyr)�dry_run) r �run_command�reinitialize_commandr�root�warn_dirr
�infor�distribution�get_fullnamerr,r-r.rr�has_ext_modules�install_base�install_platbaser�reprr�make_archiver!r"r	�
dist_files�appendrrr<)r#r6�archive_basename�pseudoinstall_root�archive_root�filename�	pyversions       r$�runzbdist_dumb.run]s���������W�%��+�+�I�!�+�L���~�~���!�_�_���������#�T�^�^�4�����#�#�>�>����*�*�,�d�n�n�
�� �W�W�\�\�$�-�-�9I�J���}�}��>�>�L�� � �0�0�2��$�$��(@�(@�@�,��G�0�0�1�4��8P�8P�3Q�S��� "�w�w�|�|��N�N�O�G�4H�4H�$I� ��
�$�$���K�K�!��*�*��*�*�%�
�����,�,�.�*�,�I��I����$�$�+�+�\�9�h�,O�P��~�~��������=�r&N)�__name__�
__module__�__qualname__�descriptionr�user_options�boolean_optionsr/r%r3rP�r&r$rrsq��8�K�	Q���
�*�n�
-�	
�	
�
	
�	L�R�	
�
	
�
	
�?$�L�L>�O�&�e�4�N�	�
�*2>r&r)�__doc__r,�corer�utilr�dir_utilrr�errorsr�	sysconfigr	�distutils._logr
rrWr&r$�<module>r_s/���
���3�+�*��>��>r&python3.12/site-packages/setuptools/_distutils/command/__pycache__/build_scripts.cpython-312.pyc000064400000015754151732703550026740 0ustar00�

��_i����dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZdd	l
mZddlZej d
�Z	eZGd�de�Zy)
zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.�N)�ST_MODE)�	sysconfig�)�Command)�newer)�convert_path)�logz^#!.*python[0-9.]*([ 	].*)?$c�^�eZdZdZgd�ZdgZd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ed��Zy
)�
build_scriptsz("build" scripts (copy and fixup #! line)))z
build-dir=�dzdirectory to "build" (copy) to)�force�fz1forcibly build everything (ignore file timestamps)zexecutable=�ez*specify final destination interpreter pathr
c�<�d|_d|_d|_d|_y�N)�	build_dir�scriptsr
�
executable��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/build_scripts.py�initialize_optionsz build_scripts.initialize_options#s����������
����c�b�|jdddd�|jj|_y)N�build)rr)r
r
)rr)�set_undefined_options�distributionrrs r�finalize_optionszbuild_scripts.finalize_options)s1���"�"��*��(�		
��(�(�0�0��rc��|jSr)rrs r�get_source_fileszbuild_scripts.get_source_files2s���|�|�rc�>�|jsy|j�yr)r�copy_scriptsrs r�runzbuild_scripts.run5s���|�|�����rc��|j|j�g}g}|jD]}|j|||��|j	|�||fS)a2
        Copy each script listed in ``self.scripts``.

        If a script is marked as a Python script (first line matches
        'shebang_pattern', i.e. starts with ``#!`` and contains
        "python"), then adjust in the copy the first line to refer to
        the current Python interpreter.
        )�mkpathrr�_copy_script�
_change_modes)r�outfiles�
updated_files�scripts    rr"zbuild_scripts.copy_scripts:sY��	
���D�N�N�#����
��l�l�F����f�h�
�>�#�	
���8�$���&�&rc�*�d}t|�}tjj|jtjj|��}|j
|�|js#t||�stjd|�y	tj|�}|j�}|s|jd|z�ytj!|�}|j
|�|�rJtj&d||j�|j$�st(j*s
|j,}n^tjjt)j.d�dt)j.d��t)j.d����}|j1d�xsd	}	d
|z|	zdz}
|j3|
|j4�t|d|j4�
�5}|j7|
�|j9|j;��ddd�|r|j=�yy|r|j=�|j?||�y#t"$r|j$s�d}Y���wxYw#1swY�axYw)Nznot copying %s (up-to-date)z%s is an empty file (skipping)zcopying and adjusting %s -> %s�BINDIR�python�VERSION�EXE��z#!�
�w)�encoding) r�os�path�joinr�basename�appendr
rr	�debug�tokenize�open�readline�warn�shebang_pattern�match�OSError�dry_run�infor�python_buildr�get_config_var�group�_validate_shebangr4�write�
writelines�	readlines�close�	copy_file)rr*r(r)�
shebang_match�outfiler�
first_liner�post_interp�shebang�outfs            rr&zbuild_scripts._copy_scriptMs����
��f�%���'�'�,�,�t�~�~�r�w�w�/?�/?��/G�H������ ��z�z�%���"8��I�I�3�V�<��	>��
�
�f�%�A�����J���	�	�:�V�C�D��+�1�1�*�=�M����W�%���H�H�5�v�t�~�~�N��<�<� �-�-�!%���J�!#�����!�0�0��:�&�4�4�Y�?�%�4�4�U�;��"�J�,�1�1�!�4�:�����+�k�9�D�@���&�&�w��
�
�;��'�3����<���J�J�w�'��O�O�A�K�K�M�2�=�����	������	��N�N�6�7�+��M�	��<�<���A�	��<=�<�s�I*�81J	�*J�J�	Jc�\�tjdk7ry|D]}|j|��y)N�posix)r5�name�_change_mode)rr(�files   rr'zbuild_scripts._change_modes�s)��
�7�7�g����D����d�#�rc��|jrtjd|�ytj|�t
dz}|dzdz}||k7r/tjd|||�tj||�yy)Nzchanging mode of %si�imz!changing mode of %s from %o to %o)rBr	rCr5�statr�chmod)rrW�oldmode�newmodes    rrVzbuild_scripts._change_mode�sn���<�<��H�H�*�D�1���'�'�$�-��(�6�1���U�?�f�,���g���H�H�8�$���Q��H�H�T�7�#�rc���	|jd�	|j|�y#t$rtdj|���wxYw#t$rtdj||���wxYw)Nzutf-8z,The shebang ({!r}) is not encodable to utf-8z?The shebang ({!r}) is not encodable to the script encoding ({}))�encode�UnicodeEncodeError�
ValueError�format)rQr4s  rrGzbuild_scripts._validate_shebang�s~��	��N�N�7�#�	��N�N�8�$��"�	��A�H�H��Q��
�	��"�	��.�.4�f�W�h�.G��
�	�s�&�A
�$A
�
%A2N)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsrrr r#r"r&r'rV�staticmethodrG�rrrrsT��>�K��L��i�O��1���
'�&4,�l$�	$����rr)�__doc__r5�rerYr�	distutilsr�corer�	_modifiedr�utilr�distutils._logr	r;�compiler?�
first_line_rerrirr�<module>rssR��5�
�	���������"�*�*�<�=���
 �
�T�G�Trpython3.12/site-packages/setuptools/_distutils/command/__pycache__/register.cpython-312.pyc000064400000033755151732703560025720 0ustar00�

��_i).��j�dZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZGd�de
�Z
y)	zhdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
�N)�warn�)�
PyPIRCCommand)�logc��eZdZdZej
ddgzZejgd�zZdd�fgZd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zdd�Zy)�registerz7register the distribution with the Python package index)�list-classifiersNz list the valid Trove classifiers)�strictNzBWill stop the registering if the meta-data are not fully compliant)�verifyr	r
�checkc��y)NT���selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/register.py�<lambda>zregister.<lambda>#s��4�c�J�tj|�d|_d|_y)Nr)r�initialize_options�list_classifiersr
rs rrzregister.initialize_options%s���(�(��.� !�����rc��tj|�d|jfdd�}||jjd<y)Nr)r�)r
�restructuredtextr)r�finalize_optionsr
�distribution�command_options)r�
check_optionss  rrzregister.finalize_options*sA���&�&�t�,�"�4�;�;�/� /�
�
�6C����)�)�'�2rc�$�|j�|j�|j�D]}|j|��|jr|j�y|jr|j�y|j�y�N)	r�_set_config�get_sub_commands�run_command�dry_run�verify_metadatar�classifiers�
send_metadata)r�cmd_names  r�runzregister.run3ss�����������-�-�/�H����X�&�0��<�<�� � �"�
�
"�
"�������� rc���tdt�|jjd�}|j	�|j
|_d|_|j�y)zDeprecated API.zVdistutils.command.register.check_metadata is deprecated; use the check command insteadrrN)r�DeprecationWarningr�get_command_obj�ensure_finalizedr
rr()rrs  r�check_metadatazregister.check_metadataBsR���
,��	
�
�!�!�1�1�'�:��
��� ��{�{���!"���
�	�	�rc�@�|j�}|ik7r0|d|_|d|_|d|_|d|_d|_y	|jd|jfvrtd|jz��|jdk(r|j|_d|_y	)
z0Reads the configuration file and set attributes.�username�password�
repository�realmT�pypiz%s not found in .pypircFN)�_read_pypircr/r0r1r2�
has_config�DEFAULT_REPOSITORY�
ValueError)r�configs  rr zregister._set_configOs����"�"�$���R�<�"�:�.�D�M�"�:�.�D�M�$�\�2�D�O����D�J�"�D�O����v�t�/F�/F�&G�G� �!:�T�_�_�!L�M�M����&�(�"&�"9�"9���#�D�Orc��|jdz}tjj|�}t	j
|j
|��y)z.Fetch the list of classifiers from the server.z?:action=list_classifiersN)r1�urllib�request�urlopenr�info�_read_pypi_response)r�url�responses   rr%zregister.classifiers_s<���o�o� ;�;���>�>�)�)�#�.������)�)�(�3�4rc�x�|j|jd��\}}tjd||�y)z<Send the metadata to the package index server to be checked.r�Server response (%s): %sN)�post_to_server�build_post_datarr=)r�code�results   rr$zregister.verify_metadataes4���,�,�T�-A�-A�(�-K�L���v����+�T�6�:rc��|jrd}|j}|j}nd}dx}}dj�}||vrC|j	dt
j�t�}|sd}n||vrtd�||vr�C|dk(�r�|std�}|s�|stjd�}|s�tjj�}tjj|j�d	}|j!|j"|||�|j%|j'd
�|�\}}|j	dj)||�t
j�|dk(r�|jr||j*_y|j	d
t
j�|j	d|j-�zt
j�d}|j/�dvr"td�}|sd}|j/�dvr�"|j/�dk(r|j1||�yyy|dk(�r#ddi}	dx|	d<x|	d<|	d<d|	d<|	dstd�|	d<|	ds�|	d|	dk7rr|	dstjd�|	d<|	ds�|	dstjd�|	d<|	ds�|	d|	dk7rd|	d<d|	d<td�|	d|	dk7r�r|	dstd�|	d<|	ds�|j%|	�\}}|dk7rt3j4d||�yt3j4d �t3j4d!�y|d"k(rNdd#i}	d|	d<|	dstd$�|	d<|	ds�|j%|	�\}}t3j4d||�yy)%aSend the metadata to the package index server.

        Well, do the following:
        1. figure who the user is, and then
        2. send the data as a Basic auth'ed POST.

        First we try to read the username/password from $HOME/.pypirc,
        which is a ConfigParser-formatted file with a section
        [distutils] containing username and password entries (both
        in clear text). Eg:

            [distutils]
            index-servers =
                pypi

            [pypi]
            username: fred
            password: sekrit

        Otherwise, to figure who the user is, we offer the user three
        choices:

         1. use existing login,
         2. register as a new user, or
         3. set the password to a random string and email the user.

        �1�x�z1 2 3 4z�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: z&Please choose one of the four options!z
Username: z
Password: r�submitzServer response ({}): {}��zAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)�X�ynzSave your login (y/N)?�n�y�2�:action�user�namer0�emailN�confirmz
 Confirm: z!Password and confirm don't match!z
   EMail: rBz"You will receive an email shortly.z7Follow the instructions in it to complete registration.�3�password_resetzYour email address: )r5r/r0�split�announce�logging�INFO�input�print�getpassr:r;�HTTPPasswordMgr�parse�urlparser1�add_passwordr2rCrD�formatr�_get_rc_file�lower�
_store_pypircrr=)
r�choicer/r0�choices�auth�hostrErF�datas
          rr&zregister.send_metadataks���<�?�?��F��}�}�H��}�}�H��F�"$�$�H�x��/�/�#���G�#��M�M� ����	
��W�F�����w�&��>�?��G�#�"�S�=�� ��.����"�?�?�<�8����>�>�1�1�3�D��<�<�(�(����9�!�<�D����d�j�j�$��(�C��.�.�t�/C�/C�H�/M�t�T�L�D�&��M�M�4�;�;�D�&�I�7�<�<�X��s�{��?�?�2:�D�%�%�.��M�M�:� �����M�M�:�T�=N�=N�=P�P�����!�F� �,�,�.��4�!&�'?�!@��%�%(�F�!�,�,�.��4��|�|�~��,��*�*�8�X�>�-�-�2�s�]��v�&�D�>@�@�D��L�@�4�
�+�d�7�m�"�D��O��6�l�$�\�2��V���6�l��z�"�d�9�o�5��z�*�'.���|�'D�D��$��z�*��y�/�&-�o�o�l�&C�D��O��y�/��
�#�t�I��6�')�D��$�&*�D��O��=�>��z�"�d�9�o�5��7�m� %�l� 3��W�
��7�m��.�.�t�4�L�D�&��s�{����3�T�6�B����=�>����U�V�
�s�]��/�0�D��D��M��7�m� %�&<� =��W�
��7�m��.�.�t�4�L�D�&��H�H�/��v�>�
rc�h�|jj}id|�dd�d|j��d|j��d|j	��d|j��d|j
��d	|j��d
|j��d|j��d|j��d
|j��d|j��d|j��d|j��d|j��d|j!��}|ds
|ds|drd|d<|S)NrR�metadata_versionz1.0rT�version�summary�	home_page�author�author_email�license�description�keywords�platformr%�download_url�provides�requires�	obsoletesz1.1)r�metadata�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licence�get_long_description�get_keywords�
get_platforms�get_classifiers�get_download_url�get_provides�get_requires�
get_obsoletes)r�action�metarls    rrDzregister.build_post_data�s���� � �)�)��
��v�
���
�
�D�M�M�O�
�
�t�'�'�)�	
�

�t�+�+�-�
�
�����

�
�d�&�&�(�
�
�D�2�2�4�
�
�t�'�'�)�
�
�4�4�4�6�
�
��)�)�+�
�
��*�*�,�
�
�4�/�/�1�
�
�D�1�1�3�
� 
��)�)�+�!
�"
��)�)�+�#
�$
��+�+�-�%
��(�
��t�J�/�4��3D�',�D�#�$��rNc���d|vr=|jdj|d|j�tj�d}d|z}|dz}tj�}|j�D]�\}}t|�tg�td�fvr|g}|D]q}t|�}|j|�|jd|z�|jd�|j|�|s�X|d	d
k(s�a|jd��s��|j|�|jd�|j�jd�}d
|ztt|��d�}	tjj!|j||	�}
tjj#tjj%|���}d}	|j'|
�}|j(r|j+|�}d}|j(r4dj;d|df�}|j|tj�|S#tj,j.$rH}
|j(r|
j0j3�}|
j4|
j6f}Yd}
~
��d}
~
wtj,j8$r}
dt|
�f}Yd}
~
��d}
~
wwxYw)z9Post a query to the server, and return a string response.rTzRegistering {} to {}z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--rz*
Content-Disposition: form-data; name="%s"z

����
�
zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)�password_mgrrJ)rL�OKNi�zK---------------------------------------------------------------------------)rZrdr1r[r\�io�StringIO�items�type�str�write�getvalue�encode�lenr:r;�Request�build_opener�HTTPBasicAuthHandler�open�
show_responser>�error�	HTTPError�fp�readrE�msg�URLError�join)rrlrj�boundary�sep_boundary�end_boundary�body�key�value�headers�req�openerrF�er�s               rrCzregister.post_to_servers_���T�>��M�M�&�-�-�d�6�l�D�O�O�L����
�
I����(��#�d�*���{�{�}���*�*�,�J�C���E�{�4��8�T�"�X�"6�6�������E�
���
�
�<�(��
�
�H�3�N�O��
�
�6�"��
�
�5�!��U�2�Y�$�.��J�J�t�$��	'�	
�
�
�<� ��
�
�4���}�}��%�%�g�.��N���!�#�d�)�n�
��
�n�n�$�$�T�_�_�d�G�D�����,�,��N�N�/�/�T�/�B�
����	��[�[��%�F��!�!��/�/��7���F�����)�)�X�t�X�6�7�C��M�M�#�w�|�|�,��
���|�|�%�%�	#��!�!��t�t�y�y�{���V�V�Q�U�U�]�F���|�|�$�$�	!��#�a�&�[�F��	!�s$�I�K#�)>J,�, K#�
K�K#r)�__name__�
__module__�__qualname__rur�user_options�boolean_options�sub_commandsrrr(r-r r%r$r&rDrCrrrrrs���K�K� �-�-�F�	
�1��L�$�3�3�7��O��/�0�1�L��
C�
!��$� 5�;�?�B�88rr)�__doc__r_r�r[�urllib.parser:�urllib.request�warningsr�corer�distutils._logrrrrr�<module>r�s2����	����� ��m�}�mrpython3.12/site-packages/setuptools/_distutils/command/__pycache__/install.cpython-312.pyc000064400000065060151732703560025534 0ustar00�

��_i�u�
���dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlmZddl
mZdd	lmZmZmZdd
lmZddlmZmZdd
lmZddlmZddlmZddlmZdZdddddd�Zdddddd�dddddd�edddddd�dddddd�d �Z erd!d!d"d#d$d�e d%<d!d!d&d'd$d�e d(<e jCejD�dZ#d)�Z$d*�Z%d+�Z&d,�Z'd-�Z(d.�Z)d/�Z*d0�Z+d1�Z,d2�Z-Gd3�d4e	�Z.y)5zFdistutils.command.install

Implements the Distutils 'install' command.�N)�log�)�Command)�DEBUG)�get_config_vars)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError�DistutilsPlatformError�)�_framework_compat)�_collections)�	USER_BASE)�	USER_SITETz{base}/Lib/site-packagesz{base}/Include/{dist_name}z{base}/Scriptsz{base})�purelib�platlib�headers�scripts�datazA{base}/lib/{implementation_lower}{py_version_short}/site-packageszN{platbase}/{platlibdir}/{implementation_lower}{py_version_short}/site-packageszM{base}/include/{implementation_lower}{py_version_short}{abiflags}/{dist_name}z
{base}/binz!{base}/lib/{implementation_lower}z*{base}/{platlibdir}/{implementation_lower}z1{base}/include/{implementation_lower}/{dist_name}z{base}/site-packagesz{base}/include/{dist_name})�posix_prefix�
posix_home�nt�pypy�pypy_ntz
{usersite}zF{userbase}/{implementation}{py_version_nodot_plat}/Include/{dist_name}z:{userbase}/{implementation}{py_version_nodot_plat}/Scriptsz
{userbase}�nt_userzQ{userbase}/include/{implementation_lower}{py_version_short}{abiflags}/{dist_name}z{userbase}/bin�
posix_userc	���tjt�5tj�D�cic]}|tj
|d����c}cddd�Scc}w#1swYyxYw)NF)�expand)�
contextlib�suppress�AttributeError�	sysconfig�get_scheme_names�	get_paths)�schemes ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/install.py�_load_sysconfig_schemesr*cs^��	�	�	�^�	,�$�4�4�6�
�6��
�I�'�'��u�=�=�6�
�
-�	,��
�
-�	,�s�A!�A�A!�A!�!A*c	���t�xsi}ttjt|��D�cic]-}|itj|i��|j|i����/c}Scc}w)z=
    Extend default schemes with schemes from sysconfig.
    )r*�set�	itertools�chain�INSTALL_SCHEMES�get)�sysconfig_schemesr(s  r)�
_load_schemesr2ks���
0�1�7�R���)�/�/�/�;L�M�N��
O�F�		�
��!�!�&�"�-�
��#�#�F�B�/�
�	
�O����s�2A)c�&�ttd�ryy)N�pypy_version_info�PyPy�Python)�hasattr�sys��r)�_get_implementationr;{s���s�'�(��r:c��t|tt|���}t|�j	t|t
|���y�N)�_inject_headers�_load_scheme�_resolve_scheme�vars�update�_remove_set�
_scheme_attrs)�ob�namer(s   r)�_select_schemerG�s4��
�T�<���0E�#F�
G�F���H�O�O�K��M�&�$9�:�;r:c�p�|j�D��cic]\}}t||���||��c}}Scc}}w)z1
    Include only attrs that are None in ob.
    )�items�getattr)rE�attrs�key�values    r)rCrC�s6��*/����S��:�3��'�"�c�:J�:R�C��J��S�S��Ss�2�2c��|jd�\}}}	tj|�}|S#t$r"t	j
t
|��}Y|SwxYw)N�_)�	partitionr%�get_preferred_scheme�	Exception�fwr(�
_pypy_hack)rF�os_name�seprL�resolveds     r)r@r@�s\�����s�+��G�S�#�/��1�1�#�6���O���/��9�9�Z��-�.���O�/�s�.�'A�Ac��t�|Sr=)r2)rFs r)r?r?�s���?�4� � r:c�X�tt|��}|jd|d�|S)z�
    Given a scheme name and the resolved scheme,
    if the scheme does not include headers, resolve
    the fallback scheme for the name and use headers
    from it. pypa/distutils#88
    r)r?rT�
setdefault)rFr(�fallbacks   r)r>r>�s-���J�t�,�-�H�
���i��)�!4�5��Mr:c�B�tD�cic]}d|��||��
c}Scc}w)z<Resolve install directories by applying the install schemes.�install_)�SCHEME_KEYS)r(rLs  r)rDrD�s*��5@�A�[�c�h�s�e��f�S�k�)�[�A�A��As�c��tjdk}ttd�xr|}|jd�}ddtj
dk(zz}|r|r|S|S)N)��r4)�_user�_homer�_ntr)r8�version_infor7�endswith�osrF)rF�PY37�old_pypy�prefix�	pypy_names     r)rTrT�s\�����f�$�D��s�/�0�9�T�H����1�2�
2�F���"�'�'�T�/�2�2�I� �V�9�5��5r:c��eZdZdZgd�Zgd�Zer(ejdddezf�ejd�ddiZ	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdefdefd efd!efd"d#�fgZy)$�installz'install everything from build directory))zprefix=Nzinstallation prefix)zexec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)z
install-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nz<install everything relative to this alternate root directory)zinstall-purelib=Nz;installation directory for pure Python module distributions)zinstall-platlib=Nz8installation directory for non-pure module distributions)zinstall-lib=Nzginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))zinstall-headers=Nz(installation directory for C/C++ headers)zinstall-scripts=Nz)installation directory for Python scripts)z
install-data=Nz%installation directory for data files)�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz1force installation (overwrite any existing files))�
skip-buildNz2skip rebuilding everything (for testing/debugging))zrecord=Nz3filename in which to record list of installed files)rnrrrt�userNz!install in user site-package '%s'rprnc�r�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_y)zInitializes options.Nrr)rj�exec_prefix�homeru�install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar�install_userbaser�install_usersitern�optimize�
extra_path�install_path_filerr�
skip_build�warn_dir�
build_base�	build_lib�record��selfs r)�initialize_optionszinstall.initialize_options�s�����������	���	�
!��� $�����	� $���#���#������#��� ��� )��� )��������
����!"�����
������
���������r:c�4	�|js|js|jr#|js|jrtd��|jr#|js|jrtd��|jrG|js0|js$|js|js|jrtd��tjdk7r$|jr|jd�d|_|jd�tjdk(r|j�n|j�|jd�tjj�d	}t!d
d�\}}	tj"}|j&j)�|j&j+�|j&j-�|d
tj.ddzdtj.ddz|||||t1tdd�t3�j5�t3�d�}t7t1tdd�j9dd���}t:r|j<|d<|j>|d<tAjBtEjF�|tIj �|g�|_%|jM�|jd�|j|d<|j|d<tNr,d	dl(m(}tSd�|t7|jJ��|jU�|jd�|jr|jW�|jX�=|j&j[�r|j\|_,n|j^|_,|jadddd d!d"dd�|jc�|jX|_2tjfji|jX|jj�|_,|jl�|jod#dddd d!d"�|jd$�|jqd%d&d'�y#t$$rd}Y���wxYw)(zFinalizes options.zWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)base�posixz+exec-prefix option ignored on this platformNzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rrjrw�z%d.%drz%d%d�
platlibdir�lib)�	dist_name�dist_version�
dist_fullname�
py_version�py_version_short�py_version_nodot�
sys_prefixrj�sys_exec_prefixrw�abiflagsr��implementation_lower�implementation�winver�.)�py_version_nodot_plat�userbase�usersitezpost-expand_basedirs()�base�platbase)�pprintzconfig vars:zpost-expand_dirs()rrrrr�libbasezafter prepending root�build)r�r�)r�r�)9rjrwrxryrzr
rurgrF�warn�	dump_dirs�
finalize_unix�finalize_otherr8�version�splitrr�r$�distribution�get_name�get_version�get_fullnamererJr;�lower�dict�replace�
HAS_USER_SITEr�r�r�	DictStackrSrAr%�config_vars�expand_basedirsrr��print�expand_dirs�create_home_pathr�has_ext_modulesr}r|�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsr{�change_roots�set_undefined_options)r�r�rjrwr��
local_vars�compat_varsr�s        r)�finalize_optionszinstall.finalize_optionsLs��� 
�K�K�4�+�+�t�y�y�����!6�!6�&�>��
�
�9�9�$�+�+��)9�)9�&�K��
��9�9��K�K�����y�y�� � ��$�$�&�:��
��7�7�g������	�	�G�H�#'�� �	
���2�3�
�7�7�g����� ����!����5�6��[�[�&�&�(��+�
� /��-� H����	��|�|�H�
�*�*�3�3�5� �-�-�9�9�;�!�.�.�;�;�=�$� '�#�*:�*:�2�A�*>� >� &��)9�)9�"�1�)=� =� ��*�&� �!�#�|�U�;�$7�$9�$?�$?�$A�1�3�
�
�$�")�#�x��"<�"D�"D�S�"�"M�
��
�%)�%:�%:�J�z�"�%)�%:�%:�J�z�"�'�1�1�
�W�W�Y��Y�%>�%>�%@�*�M�
���	
�������/�0�"�.�.�
�6��!%�!6�!6�
�:���%��.�!��4��(�(�)�*�	
�������+�,��9�9��!�!�#����#�� � �0�0�2�#'�#7�#7�� �#'�#7�#7�� �	
�����������		
� 	
��� �#�/�/����7�7�<�<��(8�(8�$�/�/�J����9�9� �����5�)�Y�	�6�9�
�	
���.�/�	
�"�"��1�3M�	
��K�	��H�	�s�R�R�Rc�t�tsyddlm}tj|dz�|j
D]�}|d}|ddk(r|dd}||jvr.|j|}|j|�}t||�}n|j|�}t||�}tjd||���y)	zDumps the list of user options.Nr)�
longopt_xlate�:r����=z  %s: %s)	r�fancy_getoptr�r�debug�user_options�negative_opt�	translaterJ)r��msgr��opt�opt_name�vals      r)r�zinstall.dump_dirss�����0��	�	�#��)���$�$�C��1�v�H���|�s�"�#�A�b�>���4�,�,�,��,�,�X�6��#�-�-�m�<��!�$��1�1��#�-�-�m�<���d�H�-���I�I�j�(�C�0�%r:c���|j�|j�l|jduxr|jduxr|jduxs.|j
duxs|jduxs|jdu}|rtd��y|jrA|j�td��|jx|_|_|jd�y|j�*|jx|_|_|jd�y|j��|j�td��t!t"dd�}t$j&j)t*j�|z|_t$j&j)t*j�|z|_n|j�|j|_|j|_|j|_|jd	�y)
z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incomplete�$User base directory is not specifiedrrz*must not supply exec-prefix without prefix�_prefix_additionr�r)ryrzrr|r}r~r�r�r
rur�r�
select_schemerxrjrwrJr%rgr��normpathr8)r��incomplete_schemer�s   r)r�zinstall.finalize_unixs������(�D�,A�,A�,M��$�$��,�5��,�,��4�5��,�,��4�-�
�'�'�4�/�-��'�'�4�/�
-��$�$��,�
�!�*�8���
��9�9��$�$�,�,�-S�T�T�8<�8M�8M�M�D��� 5����|�,�
�Y�Y�
"�8<�	�	�A�D��� 5����|�,��{�{�"��#�#�/�.�D���
$+�9�6H�"�#M� � �g�g�.�.�s�z�z�:�=M�M���#%�7�7�#3�#3�C�O�O�#D�GW�#W�� ��#�#�+�'+�{�{�D�$� $���D��$(�$4�$4�D�!����~�.r:c�j�|jrR|j�td��|jx|_|_|jtjdz�y|j�*|jx|_|_|jd�y|j�2tjjtj�|_	|jx|_|_	|jtj�y#t$rtdtjz��wxYw)z)Finalizes options for non-posix platformsNr�rbrz)I don't know how to install stuff on '%s')rur�rryrzr�rgrFrxrjr�r�r8�KeyErrorr�s r)r�zinstall.finalize_otherFs����9�9��$�$�,�,�-S�T�T�8<�8M�8M�M�D��� 5����r�w�w��0�1�
�Y�Y�
"�8<�	�	�A�D��� 5����|�,��{�{�"� �g�g�.�.�s�z�z�:���8<���C�D��� 5�
��"�"�2�7�7�+���
�,�?�"�'�'�I���
�s�,D�&D2c��t||�yr=)rG)r�rFs  r)r�zinstall.select_scheme\s���t�T�"r:c���|D]e}t||�}|��tjdvrtjj	|�}t||j�}t|||��gy)N)r�r)rJrgrFr��
expanduserr
r��setattr)r�rK�attrr�s    r)�
_expand_attrszinstall._expand_attrs_s[���D��$��%�C����7�7�o�-��'�'�,�,�S�1�C� ��d�&6�&6�7����d�C�(�
r:c�*�|jgd��y)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.)ryrzr{N�r�r�s r)r�zinstall.expand_basedirshs��	
���G�Hr:c�*�|jgd��y)z+Calls `os.path.expanduser` on install dirs.)r|r}rr~r�r�Nr�r�s r)r�zinstall.expand_dirsms�����
�		
r:c�\�|D]'}d|z}t||tt||����)y)z!Call `convert_path` over `names`.r]N)r�r	rJ�r��namesrFr�s    r)r�zinstall.convert_pathszs.���D���$�D��D�$��W�T�4�-@� A�B�r:c��|j�|jj|_|j��tjd�t	|jt
�r |jj
d�|_t|j�dk(r|jdx}}n3t|j�dk(r|j\}}ntd��t|�}nd}d}||_
||_y)	z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.�,rrrzY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr�)r�r�r�warning�
isinstance�strr��lenr
r	�	path_filer�)r�r�r�s   r)r�zinstall.handle_extra_path�s����?�?�"�"�/�/�:�:�D�O��?�?�&��K�K�.�
��$�/�/�3�/�"&�/�/�"7�"7��"<����4�?�?�#�q�(�)-����);�;�	�J��T�_�_�%��*�(,���%�	�:�*�B���&�j�1�J��I��J�#���$��r:c�r�|D]2}d|z}t||t|jt||����4y)z:Change the install directories pointed by name using root.r]N)r�rr{rJr�s    r)r�zinstall.change_roots�s4���D���$�D��D�$��D�I�I�w�t�T�7J� K�L�r:c�|�|jsyttjj	d��}|j
j
�D]j\}}t|�j|�s�!tjj|�r�A|jd|z�tj|d��ly)zCreate directories under ~.N�~zos.makedirs('%s', 0o700)i�)rur	rgr�r�r�rIr��
startswith�isdir�debug_print�makedirs)r�rxrFr�s    r)r�zinstall.create_home_path�s����y�y���B�G�G�.�.�s�3�4���*�*�0�0�2�J�D�$��4�y�#�#�D�)�"�'�'�-�-��2E�� � �!;�d�!B�C����D�%�(�3r:c�D�|jsZ|jd�|jjd�j}|j
r|t
�k7rtd��|j�D]}|j|��|jr|j�|jr�|j�}|jr9t|j�}tt|��D]
}|||d||<�|j!t"|j|fd|jz�t%t&j(j*t,j(�}t%t&j(j.|�}t&j(j/t&j(j+|j0��}|j
r?|jr|j2s&||vr!t5j6d|j0�yyyy)zRuns the command.r�z"Can't install when cross-compilingNz'writing list of installed files to '%s'z�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r��run_commandr��get_command_obj�	plat_namer�rr�get_sub_commandsr��create_path_filer��get_outputsr{r��range�executer�maprgr�r�r8�normcaserr�rr�)r��
build_plat�cmd_name�outputs�root_len�counter�sys_pathrs        r)�runzinstall.run�s���������W�%��*�*�:�:�7�C�M�M�J��}�}��|�~�!=�,�-T�U�U��-�-�/�H����X�&�0��>�>��!�!�#��;�;��&�&�(�G��y�y��t�y�y�>��$�S��\�2�G�'.�w�'7��	�'B�G�G�$� 3��L�L�����g�&�9�D�K�K�G�
��r�w�w�'�'����2���r�w�w�'�'��2���g�g�&�&�r�w�w�'7�'7��8H�8H�'I�J���M�M��^�^��(>�(>��8�+��I�I�E�� � �

�,�)?�
r:c��tjj|j|jdz�}|j
r(|j
t||jgfd|z�y|jd|z�y)zCreates the .pth file�.pthzcreating %szpath file '%s' not createdN)
rgr�r�r�r�r�rrr�r�)r��filenames  r)r�zinstall.create_path_file�sf���7�7�<�<�� 4� 4�d�n�n�v�6M�N���!�!��L�L��X����'8�9�=�8�;S�
�
�I�I�2�X�=�>r:c�h�g}|j�D]>}|j|�}|j�D]}||vs�|j|���@|jrR|j
rF|jtjj|j|jdz��|S)z.Assembles the outputs of all the sub-commands.r)
r��get_finalized_commandr��appendr�r�rgr�r�r�)r�rr�cmdr
s     r)r�zinstall.get_outputs�s������-�-�/�H��,�,�X�6�C� �O�O�-���7�*��N�N�8�,�.�	0��>�>�d�4�4��N�N�2�7�7�<�<��(<�(<�d�n�n�v�>U�V�W��r:c��g}|j�D]2}|j|�}|j|j���4|S)z*Returns the inputs of all the sub-commands)r�r�extend�
get_inputs)r��inputsrrs    r)rzinstall.get_inputssF�����-�-�/�H��,�,�X�6�C��M�M�#�.�.�*�+�0��
r:c�n�|jj�xs|jj�S)zSReturns true if the current distribution has any Python
        modules to install.)r��has_pure_modulesr�r�s r)�has_libzinstall.has_libs/��
���.�.�0�W�D�4E�4E�4U�4U�4W�	
r:c�6�|jj�S)zLReturns true if the current distribution has any headers to
        install.)r��has_headersr�s r)rzinstall.has_headers���� � �,�,�.�.r:c�6�|jj�S)zMReturns true if the current distribution has any scripts to.
        install.)r��has_scriptsr�s r)rzinstall.has_scriptsrr:c�6�|jj�S)zJReturns true if the current distribution has any data to.
        install.)r��has_data_filesr�s r)�has_datazinstall.has_data s��� � �/�/�1�1r:rr~r�r��install_egg_infoc��y)NTr9r�s r)�<lambda>zinstall.<lambda>,s��$r:) �__name__�
__module__�__qualname__�descriptionr��boolean_optionsr�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r
r�r�rrrrr �sub_commandsr9r:r)rmrm�s���;�K�:�L�x9�O�����
�T�>��J�K�	
�	���v�&� �)�,�L�E�Zp
�j1�(//�b�,#�)�I�

�C�!%�FM�)�0�d?�� �
�/�
/�
2�
�� �	�K�(�	�K�(�	��"�	�.�/��Lr:rm)/�__doc__r8rgr"r%r-�distutils._logr�corerr�rr�	file_utilr�utilr	r
rr�errorsr
rr�rrSr�siterrr��WINDOWS_SCHEMEr/rB�schemesr^r*r2r;rGrCr@r?r>rDrTrmr9r:r)�<module>r3sf��/��	�������'�"�8�8��A�%�����
�*�)�+�����W�+�3����7�?�F�����)�)�/���
�*�)�/�#���3 ��F����O��
"�O�I�� ��3�#��
%�O�L�!����r�z�z�"�C��
�
� �<�
T��!��B�
6�w	�g�w	r:python3.12/site-packages/setuptools/_distutils/command/__pycache__/build_clib.cpython-312.pyc000064400000016330151732703560026152 0ustar00�

��_i��\�dZddlZddlmZddlmZddlmZddlm	Z	d�Z
Gd	�d
e�Zy)z�distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.�N�)�Command)�DistutilsSetupError)�customize_compiler)�logc��ddlm}|�y)Nr��show_compilers)�	ccompilerr
r	s ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/build_clib.pyr
r
s��*���c�X�eZdZdZgd�ZddgZdddefgZd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zy)�
build_clibz/build C/C++ libraries used by Python extensions))zbuild-clib=�bz%directory to build C/C++ libraries to)zbuild-temp=�tz,directory to put temporary build by-products)�debug�gz"compile with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler typerrz
help-compilerNzlist available compilersc��d|_d|_d|_d|_d|_d|_d|_d|_d|_y)Nr)	r�
build_temp�	libraries�include_dirs�define�undefrr�compiler��selfs r�initialize_optionszbuild_clib.initialize_options/sF�����������!��������
���
���
���
r
c��|jdddddd�|jj|_|jr|j|j�|j�|jjxsg|_t|jt�r/|jjtj�|_yy)N�build)rr)rr)rr)rr)rr)
�set_undefined_options�distributionr�check_library_listr�
isinstance�str�split�os�pathseprs r�finalize_optionszbuild_clib.finalize_options>s���	
�"�"��(�(�$���
	
��*�*�4�4����>�>��#�#�D�N�N�3����$� $� 1� 1� >� >� D�"�D���d�'�'��-� $� 1� 1� 7� 7��
�
� C�D��.r
c�0�|jsyddlm}||j|j|j
��|_t
|j�|j�%|jj|j�|j�0|jD]!\}}|jj||��#|j�,|jD]}|jj|��|j|j�y)Nr)�new_compiler)r�dry_runr)rrr-rr.rrr�set_include_dirsr�define_macror�undefine_macro�build_libraries)rr-�name�value�macros     r�runzbuild_clib.runYs����~�~��	-�$��]�]�D�L�L��
�
�
��
�	�4�=�=�)����(��M�M�*�*�4�+<�+<�=��;�;�"�#�{�{���e��
�
�*�*�4��7� +��:�:�!������
�
�,�,�U�3�$�	
���T�^�^�,r
c��t|t�std��|D]�}t|t�st	|�dk7rtd��|\}}t|t
�std��d|vs%tjdk7r#tj|vrtd|dz��t|t�r��td��y	)
a`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z+'libraries' option must be a list of tuplesrz*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)�/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r&�listr�tuple�lenr'r)�sep�dict)rr�libr3�
build_infos     rr%zbuild_clib.check_library_listqs����)�T�*�%�&S�T�T��C��c�5�)�c�#�h�!�m�)�*V�W�W�"��D�*��d�C�(�)�:���
�d�{�r�v�v��}����4��)�;�=@��V�D���
�j�$�/�)�8���'r
c�n�|jsyg}|jD]\}}|j|��|S)N)r�append)r�	lib_names�lib_namer?s    r�get_library_nameszbuild_clib.get_library_names�s:���~�~���	�$(�N�N� �H�j����X�&�%3��r
c��|j|j�g}|jD]M\}}|jd�}|�t|tt
f�st
d|z��|j|��O|S)N�sources�fin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)r%r�getr&r9r:r�extend)r�	filenamesrCr?rFs     r�get_source_fileszbuild_clib.get_source_files�s~��������/��	�$(�N�N� �H�j� �n�n�Y�/�G���j��4��-�&H�)�1�3;�<���
���W�%�%3��r
c���|D]�\}}|jd�}|�t|ttf�st	d|z��t|�}tjd|�|jd�}|jd�}|jj||j|||j��}|jj|||j|j����y)NrFrGzbuilding '%s' library�macrosr)�
output_dirrMrr)rNr)
rHr&r9r:rr�infor�compilerr�create_static_libr)rrrCr?rFrMr�objectss        rr2zbuild_clib.build_libraries�s���$-� �H�j� �n�n�Y�/�G���j��4��-�&H�)�1�3;�<���
�7�m�G��H�H�,�h�7�
 �^�^�H�-�F�%�>�>�.�9�L��m�m�+�+���?�?��)��j�j�,��G�
�M�M�+�+���d�o�o�T�Z�Z�
,�
�9%.r
)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsr
�help_optionsr r+r6r%rDrKr2�r
rrrsU��C�K��L���(�O�
�$� :�N�K��L�
�D�6-�0#�J	�
�r
r)�__doc__r)�corer�errorsr�	sysconfigr�distutils._logrr
rrZr
r�<module>r`s.��� 
��(�*���q��qr
python3.12/site-packages/setuptools/_distutils/command/__pycache__/install_scripts.cpython-312.pyc000064400000005676151732703560027312 0ustar00�

��_i���J�dZddlZddlmZddlmZddlmZGd�de�Zy)	zudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.�N�)�Command)�log)�ST_MODEc�>�eZdZdZgd�ZddgZd�Zd�Zd�Zd�Z	d	�Z
y
)�install_scriptsz%install scripts (Python or otherwise)))zinstall-dir=�dzdirectory to install scripts to)z
build-dir=�bz'build directory (where to install from))�force�fz-force installation (overwrite existing files))�
skip-buildNzskip the build stepsrr
c�<�d|_d|_d|_d|_y)Nr)�install_dirr�	build_dir�
skip_build��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/install_scripts.py�initialize_optionsz"install_scripts.initialize_optionss�������
�������c�P�|jdd�|jdddd�y)N�build)�
build_scriptsr�install)rr)rr)rr)�set_undefined_optionsrs r�finalize_optionsz install_scripts.finalize_options s-���"�"�7�,J�K��"�"��.��(�		
rc���|js|jd�|j|j|j�|_tjdk(r�|j�D]t}|jrtjd|��&t
j|�tdzdz}tjd||�t
j||��vyy)Nr�posixzchanging mode of %simi�zchanging mode of %s to %o)r�run_command�	copy_treerr�outfiles�os�name�get_outputs�dry_runr�info�statr�chmod)r�file�modes   r�runzinstall_scripts.run)s���������_�-����t�~�~�t�7G�7G�H��
�
�7�7�g���(�(�*���<�<��H�H�2�D�9��W�W�T�]�7�3�u�<��F�D��H�H�8�$��E��H�H�T�4�(�
+�rc�6�|jjxsgS�N)�distribution�scriptsrs r�
get_inputszinstall_scripts.get_inputs8s��� � �(�(�.�B�.rc�"�|jxsgSr-)r!rs rr$zinstall_scripts.get_outputs;s���}�}�"��"rN)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsrrr+r0r$�rrrrs3��9�K��L���-�O��
�
)�/�#rr)	�__doc__r"�corer�distutils._logrr'rrr8rr�<module>r<s$���
����.#�g�.#rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/bdist_rpm.cpython-312.pyc000064400000052064151732703560026051 0ustar00�

��_i�U���dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZddlmZdd	lmZGd
�de�Zy)zwdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).�N�)�Command)�DEBUG)�
write_file)�DistutilsOptionError�DistutilsPlatformError�DistutilsFileError�DistutilsExecError)�get_python_version)�logc�V�eZdZdZgd�Zgd�Zdddd�Zd�Zd	�Zd
�Z	d�Z
d�Zd
�Zd�Z
y)�	bdist_rpmzcreate an RPM distribution)))zbdist-base=Nz/base directory for creating built distributions)z	rpm-base=Nzdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2))z	dist-dir=�dzDdirectory to put final RPM files in (and .spec files if --spec-only))zpython=NzMpath to Python interpreter to hard-code in the .spec file (default: "python"))z
fix-pythonNzLhard-code the exact path to the current Python interpreter in the .spec file)z	spec-onlyNzonly regenerate spec file)zsource-onlyNzonly generate source RPM)zbinary-onlyNzonly generate binary RPM)z	use-bzip2Nz7use bzip2 instead of gzip to create source distribution)zdistribution-name=Nzgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!))zgroup=Nz9package classification [default: "Development/Libraries"])zrelease=NzRPM release number)zserial=NzRPM serial number)zvendor=NzaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script])z	packager=NzBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor])z
doc-files=Nz6list of documentation files (space or comma-separated))z
changelog=Nz
RPM changelog)zicon=Nzname of icon file)z	provides=Nz%capabilities provided by this package)z	requires=Nz%capabilities required by this package)z
conflicts=Nz-capabilities which conflict with this package)zbuild-requires=Nz+capabilities required to build this package)z
obsoletes=Nz*capabilities made obsolete by this package)�
no-autoreqNz+do not automatically calculate dependencies)�	keep-temp�kz"don't clean up RPM build directory)�no-keep-tempNz&clean up RPM build directory [default])�use-rpm-opt-flagsNz8compile with RPM_OPT_FLAGS when building from source RPM)�no-rpm-opt-flagsNz&do not pass any RPM CFLAGS to compiler)�	rpm3-modeNz"RPM 3 compatibility mode (default))�	rpm2-modeNzRPM 2 compatibility mode)zprep-script=Nz3Specify a script for the PREP phase of RPM building)z
build-script=Nz4Specify a script for the BUILD phase of RPM building)zpre-install=Nz:Specify a script for the pre-INSTALL phase of RPM building)zinstall-script=Nz6Specify a script for the INSTALL phase of RPM building)z
post-install=Nz;Specify a script for the post-INSTALL phase of RPM building)zpre-uninstall=Nz<Specify a script for the pre-UNINSTALL phase of RPM building)zpost-uninstall=Nz=Specify a script for the post-UNINSTALL phase of RPM building)z
clean-script=Nz4Specify a script for the CLEAN phase of RPM building)zverify-script=Nz6Specify a script for the VERIFY phase of the RPM build)zforce-arch=Nz0Force an architecture onto the RPM build process)�quiet�qz3Run the INSTALL phase of RPM building in quiet mode)rrrrrrrr)rrrc�&�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&y)Nr�)'�
bdist_base�rpm_base�dist_dir�python�
fix_python�	spec_only�binary_only�source_only�	use_bzip2�distribution_name�group�release�serial�vendor�packager�	doc_files�	changelog�icon�prep_script�build_script�install_script�clean_script�
verify_script�pre_install�post_install�
pre_uninstall�post_uninstall�prep�provides�requires�	conflicts�build_requires�	obsoletes�	keep_temp�use_rpm_opt_flags�	rpm3_mode�
no_autoreq�
force_archr��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/bdist_rpm.py�initialize_optionszbdist_rpm.initialize_options�s!�������
���
�������������������!%�����
������������
���������	���� ���"��� ���!������ ���!���"�����	���
���
����"���������!"��������������
�c��|jdd�|j�F|jstd��tj
j
|jd�|_|j�*|jrtj|_nd|_n|jrtd��tjdk7rtdtjz��|jr|jrtd	��|j j#�sd
|_|jdd�|j'�y)N�bdist)rrz)you must specify --rpm-base in RPM 2 mode�rpm�python3z8--python and --fix-python are mutually exclusive options�posixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r)rr)�set_undefined_optionsrr?r�os�path�joinrrr �sys�
executable�namerr"r#�distribution�has_ext_modulesr>�finalize_package_datarBs rD�finalize_optionszbdist_rpm.finalize_options�s
���"�"�7�,H�I��=�=� ��>�>�*�+V�W�W��G�G�L�L����%�@�D�M��;�;�����!�n�n���'���
�_�_�&�J��
��7�7�g��(�N�QS�QX�QX�X��
����� 0� 0�&�H��
�
� � �0�0�2�%&�D�"��"�"�7�,D�E��"�"�$rFc��|jdd�|jd|jj��d|jj��d��|jd�|j	d�t|jt�rQdD]L}tjj|�s�#||jvs�2|jj|��N|jd	d
�|jd�|jd�|jd
�|j|j�|_
|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|j	d�|j	d�|j	d�|j	d�|j	d�|jd�y)Nr&zDevelopment/Librariesr)z <�>r*r+)�READMEz
README.txtr'�1r(r%r,r-r.r/r0r1r2r3r4r5r6r8r9r:r;r<rA)�
ensure_stringrS�get_contact�get_contact_email�ensure_string_list�
isinstancer+�listrMrN�exists�append�_format_changelogr,�ensure_filename)rC�readmes  rDrUzbdist_rpm.finalize_package_data�s������7�$;�<������ � �,�,�.��0A�0A�0S�0S�0U�
W�	
�
	
���:�&�����,��d�n�n�d�+�2���7�7�>�>�&�)�f�D�N�N�.J��N�N�)�)�&�1�3�	
���9�c�*����8�$����.�/����;�'��/�/����?������V�$����]�+����^�,����-�.����^�,����_�-����]�+����^�,����_�-����-�.�	
���
�+����
�+�����,���� 0�1�����,����<�(rFc�v�trctd�td|j�td|j�td|j�td|j
�|jr|j}|j|�nOi}dD]C}tjj|j|�||<|j||��E|d}tjj|d|jj�z�}|jt ||j#�fd	|z�|jry|jj$dd}|j'd
�}|j(r	dg|_ndg|_|j-d
�||j_|j/�d
}d}|j1||�|j2r^tjj5|j2�r|j1|j2|�nt7d|j2z��t9j:d�dg}	|j<r|	j?d�n/|j@r|	j?d�n|	j?d�|	jCdd|jDzg�|jFr=|	jCddtjjI|j�zg�|jJs|	j?d�|jLr|	j?d�|	j?|�d}
|
dz}d|
zdz}djO|||�}
tjP|
�}	g}d}	|jS�}|snJ|jU�jW�}tY|�dk(sJ�|j?|d �|�|d
}�]|j[�}|rt]d!t_|
�z��	|j[�|ja|	�|jb�s�|jje�rtg�}nd"}|j@s�tjj|d#|�}tjj5|�sJ�|ji||j�tjj|j|�}|jj$j?d$||f�|j<s�|D]�}tjj|d%|�}tjj5|�s�F|ji||j�tjj|jtjjk|��}|jj$j?d$||f���yyy#|j[�wxYw)&Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =)�SOURCES�SPECS�BUILD�RPMS�SRPMSrhz%s.speczwriting '%s'�sdist�bztar�gztarrrgzicon file '%s' does not existz
building RPMs�rpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '{} {}\n' --specfile '{}'rrzFailed to execute: %s�anyrkrrj)6r�printr)r*r+r,r!r�mkpathrMrNrOrrS�get_name�executer�_make_spec_file�
dist_files�reinitialize_commandr$�formats�run_command�get_archive_files�	copy_filer-rar	r�infor#rbr"�extendrr?�abspathr=r�format�popen�readline�strip�split�len�closer
�repr�spawn�dry_runrTr�	move_file�basename)rC�spec_dir�rpm_dirr�	spec_path�saved_dist_filesrl�source�
source_dir�rpm_cmd�
nvr_string�src_rpm�non_src_rpm�q_cmd�out�binary_rpms�
source_rpm�line�ell�status�	pyversion�srpm�filenamerIs                        rD�runz
bdist_rpm.runs�����/�0��*�d�k�k�*��,��
�
�.��-����0��-����0��>�>��}�}�H��K�K��!��G�C���W�W�\�\�$�-�-��;���
����G�A�J�'�D��w�'�H��G�G�L�L��9�t�7H�7H�7Q�7Q�7S�+S�T�	������D�$8�$8�$:�;�^�i�=W�	
��>�>�� �,�,�7�7��:���)�)�'�2���>�>�$�I�E�M�$�I�E�M�����!�'7����$��(�(�*�1�-���Y�'�
����v�z�*��9�9��w�w�~�~�d�i�i�(����t�y�y�*�5�(�)H�4�9�9�)T�U�U�	����!��,������N�N�5�!�
�
�
��N�N�5�!��N�N�5�!����
�M�D�K�K�$?�@�A��>�>��N�N�J��r�w�w���t�}�}�7U�(U�V�W��~�~��N�N�9�%��:�:��N�N�9�%����y�!�
5�
��z�)�� �:�-��>��8�?�?����
���h�h�u�o��	��K��J���|�|�~�����j�j�l�(�(�*���3�x�1�}�$�}��"�"�3�q�6�*��%�!$�Q��J���Y�Y�[�F��(�)@�4��;�)N�O�O��
�I�I�K��
�
�7���|�|�� � �0�0�2�.�0�	�!�	��#�#��w�w�|�|�G�G�$4�j�A���w�w�~�~�d�+�+�+����t�T�]�]�3��7�7�<�<��
�
�z�B���!�!�,�,�3�3�[�)�X�4V�W��#�#�&�C��'�'�,�,�w�v���<�C��w�w�~�~�c�*����s�D�M�M�:�#%�7�7�<�<��
�
�r�w�w�?O�?O�PS�?T�#U���)�)�4�4�;�;�(�)�X�>��'�$���	
�I�I�K�s
�#BX&�&X8c��tjj|jtjj	|��S)N)rMrNrOrr�)rCrNs  rD�
_dist_pathzbdist_rpm._dist_path�s*���w�w�|�|�D�M�M�2�7�7�+;�+;�D�+A�B�BrFc	��
�d|jj�zd|jj�jdd�zd|jj�zd|jjdd�zdd|jj�xsd	zg}t
jd
�}dj|j�D�cgc]}d|j�z��c}�}d
}d}|j||�}||k7r(|jd�|jd|zdz�|jgd��|jr|jd�n|jd�|jd|jj�xsd	zd|jzddg�|j s,|jj#�s0|jd�n|jd|j z�dD]�}t%||j'��}t)|t*�r1|jdj-|dj|����^|��a|jdj-||����|jj/�r,|jd|jj/�z�|j0r|jd|j0z�|j2r-|jd dj|j2�z�|j4r;|jd!t6j8j;|j4�z�|j<r|jd"�|jdd#|jj?�xsdg�d$j-|j@t6j8j;tBjDd%��}	d&|	z}
|jFrd'|
z}
d(|	z}d)d*d+|
fd,d-|fd.d/d0d1d2d3g	}|D]�\}
}}t%||�}|s|s�|jdd4|
zg�|rCtI|�5}|j|jK�jMd��ddd��s|j|���|jgd5��|jNr-|jd6dj|jN�z�|jPr.|jdd7g�|j|jP�|Scc}w#1swY��xYw)8ziGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        z
%define name z%define version �-�_z%define unmangled_version z%define release �z	Summary: �UNKNOWNzrpm --eval %{__os_install_post}�
z  %s \zbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post )z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s)�Vendor�Packager�Provides�Requires�	Conflicts�	Obsoletesz{}: {}� NzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz{} {}rz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES)r7r.z&%setup -n %{name}-%{unmangled_version}�buildr/�installr0)�cleanr1zrm -rf $RPM_BUILD_ROOT)�verifyscriptr2N)�prer3N)�postr4N)�preunr5N)�postunr6N�%)r�z%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog))rSrs�get_version�replacer'�get_description�
subprocess�	getoutputrO�
splitlinesr�rbr}r$�get_licenser&rArT�getattr�lowerr_r`r�get_urlr%r;r-rMrNr�r@�get_long_descriptionrrP�argvr>�open�readr�r+r,)rC�	spec_file�vendor_hookr��problem�fixed�
fixed_hook�field�val�def_setup_call�	def_build�install_cmd�script_options�rpm_opt�attr�default�fs                 rDruzbdist_rpm._make_spec_file�s���
�d�/�/�8�8�:�:���!2�!2�!>�!>�!@�!H�!H��c�!R�R�(�4�+<�+<�+H�+H�+J�J�����!5�!5�c�3�!?�?���4�,�,�<�<�>�K�)�L�

�	�!�*�*�+L�M���i�i�2=�2H�2H�2J�K�2J�$�Y�����
%�2J�K�
��0��9�� �(�(��%�8�
���$����Q�R����9�J�F��M�N�	���
�	
��>�>����L�M����K�L�����t�0�0�<�<�>�K�)�L��D�J�J�&�P�$�	
�	
�����$�$�4�4�6�� � �!4�5����_�t���>�?�
�E��$����
�.�C��#�t�$�� � ���������
�!F�G���� � ������!<�=�
����$�$�&����W�t�'8�'8�'@�'@�'B�B�C��!�!����-��0F�0F�F�G�������.����$�:M�:M�1N�N�O��9�9����X����(8�(8����(C�C�D��?�?����\�*�������!�!�6�6�8�>�B�
�	
�(!������R�W�W�5E�5E�c�h�h�q�k�5R�S����/�	��!�!�6��B�I�
P����

N�
�n�i�0�
�(�+�6�?�3�(�*�,�.�

��'5�"�G�T�7��$��%�C��g�� � ���g�
�����c��a�!�(�(��������)=�>�#���$�$�W�-�'5�$	���
�	
��>�>����W�s�x�x����'?�?�@��>�>����� ��
�
���T�^�^�,����E
L�P#��s�U�/U#�#U-	c��|s|Sg}|j�jd�D]\}|j�}|ddk(r|jd|g��/|ddk(r|j|��I|jd|z��^|ds|d=|S)zBFormat the changelog correctly and convert it to a list of stringsr�r�*r�r�z  )r�r�r}rb)rCr,�
new_changelogr�s    rDrczbdist_rpm._format_changelogTs�������
��O�O�%�+�+�D�1�D��:�:�<�D��A�w�#�~��$�$�b�$�Z�0��a��C���$�$�T�*��$�$�T�D�[�1�2��Q���a� ��rFN)�__name__�
__module__�__qualname__�description�user_options�boolean_options�negative_optrErVrUr�r�rurc�rFrDrrsT��.�K�o�L�b�O�$�/� ��L�+�Z%�B-)�^@�DC�w�rrFr)�__doc__r�rPrM�corer�debugr�	file_utilr�errorsrrr	r
�	sysconfigr�distutils._logrrr�rFrD�<module>r�s>���
�
�	���"���+��O	��O	rFpython3.12/site-packages/setuptools/_distutils/command/__pycache__/sdist.cpython-312.pyc000064400000053323151732703560025213 0ustar00�

��_i K���dZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lm
Z
ddlmZddlmZdd
lmZddlmZmZd�ZGd�de�Zy)zadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).�N)�glob)�warn�)�Command)�dir_util)�	file_util)�archive_util)�TextFile)�FileList)�log)�convert_path)�DistutilsOptionError�DistutilsTemplateErrorc���ddlm}ddlm}g}|j	�D]}|jd|zd||df��!|j
�||�jd�y)zoPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    r)�FancyGetopt)�ARCHIVE_FORMATS�formats=Nz.List of available source distribution formats:)�fancy_getoptrr	r�keys�append�sort�
print_help)rr�formats�formats    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py�show_formatsrsa��+�.��G�!�&�&�(�����
�V�+�T�?�6�3J�1�3M�N�O�)��L�L�N����#�#�$T�U�c���eZdZdZd�Zgd�Zgd�ZdddefgZdd	d
�Z	defgZ
dZd
�Zd�Z
d�Zd�Zd�Zd�Zed��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Z d!�Z!d"�Z"y)#�sdistz6create a source distribution (tarball, zip file, etc.)c��|jS)zYCallable used for the check sub-command.

        Placed here so user_options can view it)�metadata_check��selfs r�checking_metadatazsdist.checking_metadata&s���"�"�"r))z	template=�tz5name of manifest template file [default: MANIFEST.in])z	manifest=�mz)name of manifest file [default: MANIFEST])�use-defaultsNzRinclude the default file set in the manifest [default; disable with --no-defaults])�no-defaultsNz"don't include the default file set)�pruneNz�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune])�no-pruneNz$don't automatically exclude anything)�
manifest-only�ozEjust regenerate the manifest and then stop (implies --force-manifest))�force-manifest�fzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list))�	keep-temp�kz@keep the distribution tree around after creating archive file(s))z	dist-dir=�dzFdirectory to put the source distribution archive(s) in [default: dist])�metadata-checkNz[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default])zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group])r'r)r+r-r/r2zhelp-formatsNz#list available distribution formatsr'r))r(r*�check)�READMEz
README.txtz
README.rstc��d|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_y)N�r�gztar)
�template�manifest�use_defaultsr)�
manifest_only�force_manifestr�	keep_temp�dist_dir�
archive_filesr!�owner�groupr"s r�initialize_optionszsdist.initialize_optionsysh����
���
������
��������y��������
�!��������
���
rc��|j�d|_|j�d|_|jd�tj|j
�}|rt
d|z��|j�d|_yy)N�MANIFESTzMANIFEST.inrzunknown archive format '%s'�dist)r;r:�ensure_string_listr	�check_archive_formatsrrr@)r#�
bad_formats  r�finalize_optionszsdist.finalize_options�sp���=�=� �&�D�M��=�=� �)�D�M����	�*�!�7�7����E�
��&�'D�z�'Q�R�R��=�=� �"�D�M�!rc���t�|_|j�D]}|j|��|j	�|j
ry|j
�y�N)r�filelist�get_sub_commands�run_command�
get_file_listr=�make_distribution)r#�cmd_names  r�runz	sdist.run�sZ��!�
��
��-�-�/�H����X�&�0�	
��������	
��� rc��tdt�|jjd�}|j	�|j�y)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr5N)r�PendingDeprecationWarning�distribution�get_command_obj�ensure_finalizedrT)r#r5s  r�check_metadatazsdist.check_metadata�s?���
-�%�	
�
�!�!�1�1�'�:��
��� �
�	�	�rc��tjj|j�}|sU|j	�rE|j�|jj�|jj�y|s|jd|jz�|jj�|jr|j�|r|j�|jr|j�|jj�|jj�|j!�y)aCFigure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        Nz?manifest template '%s' does not exist (using default file list))�os�path�isfiler:�_manifest_is_not_generated�
read_manifestrNr�remove_duplicatesr�findallr<�add_defaults�
read_templater)�prune_file_list�write_manifest)r#�template_existss  rrQzsdist.get_file_list�s����'�'�.�.����7���4�#B�#B�#D���� ��M�M��� ��M�M�+�+�-����I�I�W��-�-� �
�	
�
�
��������������� ��:�:�� � �"��
�
�����
�
�'�'�)����rc���|j�|j�|j�|j�|j	�|j�|j
�y)aLAdd all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - tests/test*.py and test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        N)�_add_defaults_standards�_add_defaults_optional�_add_defaults_python�_add_defaults_data_files�_add_defaults_ext�_add_defaults_c_libs�_add_defaults_scriptsr"s rrczsdist.add_defaults�sX��	
�$�$�&��#�#�%��!�!�#��%�%�'���� ��!�!�#��"�"�$rc���tjj|�sytjj|�}tjj	|�\}}|tj
|�vS)z�
        Case-sensitive path existence check

        >>> sdist._cs_path_exists(__file__)
        True
        >>> sdist._cs_path_exists(__file__.upper())
        False
        F)r\r]�exists�abspath�split�listdir)�fspathrr�	directory�filenames    r�_cs_path_existszsdist._cs_path_exists�sT���w�w�~�~�f�%���'�'�/�/�&�)�� �g�g�m�m�G�4��	�8��2�:�:�i�0�0�0rc��|j|jjg}|D]�}t|t�rb|}d}|D]2}|j|�s�d}|jj|�n|r�Q|jddj|�z��u|j|�r|jj|���|jd|z���y)NFTz,standard file not found: should have one of z, zstandard file '%s' not found)
�READMESrW�script_name�
isinstance�tuplerxrNrr�join)r#�	standards�fn�alts�got_its     rrizsdist._add_defaults_standardss����\�\�4�#4�#4�#@�#@�A�	��B��"�e�$������B��+�+�B�/�!%���
�
�,�,�R�0��	���I�I�F����SW��X���'�'��+��M�M�(�(��,��I�I�<�r�A�B�%rc��gd�}|D]J}ttjjt	|��}|j
j
|��Ly)N)ztests/test*.pyz
test/test*.pyz	setup.cfg)�filterr\r]r^rrN�extend)r#�optional�pattern�filess    rrjzsdist._add_defaults_optional&s;��C���G��2�7�7�>�>�4��=�9�E��M�M� � ��'� rc�X�|jd�}|jj�r)|jj	|j��|jD]G\}}}}|D];}|jjtjj||���=�Iy)N�build_py)�get_finalized_commandrW�has_pure_modulesrNr��get_source_files�
data_filesrr\r]r~)r#r��pkg�src_dir�	build_dir�	filenamesrws       rrkzsdist._add_defaults_python,s����-�-�j�9�����-�-�/��M�M� � ��!:�!:�!<�=�3;�2E�2E�.�C��)�Y�%���
�
�$�$�R�W�W�\�\�'�8�%D�E�&�3Frc���|jj�r�|jjD]�}t|t�rGt|�}tjj|�s�>|jj|��Z|\}}|D]H}t|�}tjj|�s�.|jj|��J��yyrM)rW�has_data_filesr�r|�strr
r\r]r^rNr)r#�item�dirnamer�r.s     rrlzsdist._add_defaults_data_files<s������+�+�-��)�)�4�4���d�C�(�'��-�D��w�w�~�~�d�+��
�
�,�,�T�2�*.�&�G�Y�&��(��O���7�7�>�>�!�,� �M�M�0�0��3�'�5�.rc��|jj�r;|jd�}|jj	|j��yy)N�	build_ext)rW�has_ext_modulesr�rNr�r�)r#r�s  rrmzsdist._add_defaults_extMsD�����,�,�.��2�2�;�?�I��M�M� � ��!;�!;�!=�>�/rc��|jj�r;|jd�}|jj	|j��yy)N�
build_clib)rW�has_c_librariesr�rNr�r�)r#r�s  rrnzsdist._add_defaults_c_libsRsD�����,�,�.��3�3�L�A�J��M�M� � ��!<�!<�!>�?�/rc��|jj�r;|jd�}|jj	|j��yy)N�
build_scripts)rW�has_scriptsr�rNr�r�)r#r�s  rrozsdist._add_defaults_scriptsWsD�����(�(�*� �6�6��G�M��M�M� � ��!?�!?�!A�B�+rc	��tjd|j�t|jdddddd��}		|j	�}|�n	|j
j
|��0	|j�y#ttf$r5}|jd|j|j|fz�Yd}~�Rd}~wwxYw#|j�wxYw)z�Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        zreading manifest template '%s'r8)�strip_comments�skip_blanks�
join_lines�	lstrip_ws�	rstrip_ws�
collapse_joinNz%s, line %d: %s)
r�infor:r
�readlinerN�process_template_liner�
ValueErrorrrw�current_line�close)r#r:�line�msgs    rrdzsdist.read_template\s���	���1�4�=�=�A���M�M�������
��	���(�(�*���<��	��M�M�7�7��=�
��
�N�N���
/�
�;���I�I�)�#�,�,�h�.C�.C�S�I�J������
�N�N��s5�C�B�.C�C�+C�;C�C�C�Cc��|jd�}|jj�}|jj	d|j
��|jj	d|��tjdk(rd}nd}gd�}dj|d	j|�|�}|jj	|d
��y)avPrune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        �buildN)�prefix�win32z/|\\�/)�RCS�CVSz\.svnz\.hgz\.gitz\.bzr�_darcsz(^|{})({})({}).*�|r8)�is_regex)
r�rW�get_fullnamerN�exclude_pattern�
build_base�sys�platformrr~)r#r��base_dir�seps�vcs_dirs�vcs_ptrns      rrezsdist.prune_file_list�s����*�*�7�3���$�$�1�1�3���
�
�%�%�d�5�3C�3C�%�D��
�
�%�%�d�8�%�<��<�<�7�"��D��D�R��&�-�-�d�C�H�H�X�4F��M���
�
�%�%�h��%�;rc�4�|j�r#tjd|jz�y|jj
dd}|j
dd�|jtj|j|fd|jz�y)z�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        z5not writing to manually maintained manifest file '%s'Nrz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
r_rr�r;rNr��insert�executer�
write_file)r#�contents  rrfzsdist.write_manifest�s���
�*�*�,��H�H�%�'+�}�}�5�
�
��-�-�%�%�a�(�����q�F�G����� � �
�]�]�G�$�(�4�=�=�8�	
rc��tjj|j�syt	|j�}	|j�}|j
�|dk7S#|j
�wxYw)NFz+# file GENERATED by distutils, do NOT edit
)r\r]r^r;�openr�r�)r#�fp�
first_lines   rr_z sdist._manifest_is_not_generated�sY���w�w�~�~�d�m�m�,��
�$�-�-�
 ��	�����J��H�H�J��K�K�K��
�H�H�J�s�A&�&A8c�&�tjd|j�t|j�5}|D]A}|j	�}|jd�s|s�'|jj|��C	ddd�y#1swYyxYw)z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'�#N)rr�r;r��strip�
startswithrNr)r#r;r�s   rr`zsdist.read_manifest�si��
	���-�t�}�}�=�
�$�-�-�
 �H� ���z�z�|���?�?�3�'�t���
�
�$�$�T�*�!�!�
 �
 �s�AB�Bc�.�|j|�tj|||j��t	t
d�rd}d|z}nd}d|z}|st
jd�nt
j|�|D]l}t
jj|�st
jd|��9t
jj||�}|j|||�	��n|jjj|�y)
a�Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        ��dry_run�link�hardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r�)�mkpathr�create_treer��hasattrr\r�warningr�r]r^r~�	copy_filerW�metadata�write_pkg_info)r#r�r�r�r��file�dests       r�make_release_treezsdist.make_release_tree�s���	
���H�����X�u�d�l�l�C��2�v���D�.��9�C��D�*�X�5�C���K�K�C�D��H�H�S�M��D��7�7�>�>�$�'����A�4�H��w�w�|�|�H�d�3�����t�T���5��	
���"�"�1�1�(�;rc���|jj�}tjj	|j
|�}|j
||jj�g}d|jvrM|jj|jj|jjd���|jD]e}|j||||j|j��}|j|�|jj jdd|f��g||_|j$s"t'j(||j*��yy)a�Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        �tar)r�rBrCr�r�N)rWr�r\r]r~r@r�rNr�rr�pop�index�make_archiverBrC�
dist_filesrAr?r�remove_treer�)r#r��	base_namerA�fmtr�s      rrRzsdist.make_distribution�s���$�$�1�1�3���G�G�L�L�����9�	����x����)<�)<�=��
��D�L�L� ��L�L������ 0� 0����1C�1C�E�1J� K�L��<�<�C��$�$��3�����4�:�:�%��D�
� � ��&����(�(�/�/��"�d�0C�D� �+����~�~�� � ��4�<�<�@�rc��|jS)zzReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        )rAr"s r�get_archive_fileszsdist.get_archive_filess���!�!�!r)#�__name__�
__module__�__qualname__�descriptionr$�user_options�boolean_optionsr�help_options�negative_opt�sub_commandsrzrDrKrTrZrQrc�staticmethodrxrirjrkrlrmrnrordrerfr_r`r�rRr��rrrr#s���J�K�#�8�L�t�O�
��D�l�S��L�$2�w�G�L��/�0�1�L�4�G��.
#�!�,	�'�R%�,�1��1� C�,(�F� 4�"?�
@�
C�
"�H<�.
�(
L�+�(<�TA�>"rr)�__doc__r\r�r�warningsr�corer�	distutilsrrr	�	text_filer
rNr�distutils._logr�utilr
�errorsrrrrr�rr�<module>r�sH��L�
�
������"� ����A�V�o"�G�o"rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/check.cpython-312.pyc000064400000015515151732703570025144 0ustar00�

��_i����dZddlZddlmZddlmZeje�5ddlZ	ddl
Z	ddlZ	ddlZ	Gd�de	jj�Zddd�Gd�d	e�Zy#1swY�xYw)
zCdistutils.command.check

Implements the Distutils 'check' command.
�N�)�Command)�DistutilsSetupErrorc�.��eZdZ				d�fd�	Zd�Z�xZS)�SilentReporterc	�>��g|_t�|�	|||||||�y�N)�messages�super�__init__)	�self�source�report_level�
halt_level�stream�debug�encoding�
error_handler�	__class__s	        ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/check.pyrzSilentReporter.__init__s(����D�M��G����j�&�%��=�
�c��|jj||||f�tjj|g|��||j
|d�|��S)N)�level�type)r
�append�docutils�nodes�system_message�levels)r
r�message�children�kwargss     rrzSilentReporter.system_message sZ���M�M� � �%��(�F�!C�D��>�>�0�0���@H��$�4�;�;�u�+=��LR��
r)Nr�ascii�replace)�__name__�
__module__�__qualname__rr�
__classcell__)rs@rrrs������#�
	�	rrc�N�eZdZdZdZgd�Zgd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
y)
�checkz1This command checks the meta-data of the package.z"perform some checks on the package))�metadata�mzVerify meta-data)�restructuredtext�rzEChecks if long string meta-data syntax are reStructuredText-compliant)�strict�sz(Will exit with an error if a check fails)r+r-r/c�<�d|_d|_d|_d|_y)z Sets default values for options.r�N)r-r+r/�	_warnings�r
s r�initialize_optionszcheck.initialize_options:s�� !�����
������rc��yr	�r4s r�finalize_optionszcheck.finalize_optionsAs��rc�X�|xjdz
c_tj||�S)z*Counts the number of warnings that occurs.r2)r3r�warn)r
�msgs  rr:z
check.warnDs!�����!����|�|�D�#�&�&rc�V�|jr|j�|jr5dt�vr	|j	�n|jrt
d��|jr|jdkDrt
d��yy#t
$r}t
t|���d}~wwxYw)zRuns the command.rNzThe docutils package is needed.rzPlease correct your package.)
r+�check_metadatar-�globals�check_restructuredtext�	TypeErrorr�strr/r3)r
�excs  r�runz	check.runIs����=�=����!�� � ��W�Y�&�8��/�/�1����)�*K�L�L��;�;�4�>�>�A�-�%�&D�E�E�.�;��!�8�-�c�#�h�7�7��8�s�B�	B(�B#�#B(c���|jj}g}dD]!}t||d�r�|j|��#|r$|j	ddj|�z�yy)z�Ensures that all required elements of meta-data are supplied.

        Required fields:
            name, version

        Warns if any are missing.
        )�name�versionNzmissing required meta-data: %sz, )�distributionr+�getattrrr:�join)r
r+�missing�attrs    rr=zcheck.check_metadata\sa���$�$�-�-����%�D��8�T�4�0����t�$�&���I�I�6����7�9K�K�L�rc���|jj�}|j|�D]D}|djd�}|�|d}ndj	|d|�}|j|��Fy)z4Checks if the long string fields are reST-compliant.����lineNr2z{} (line {}))rG�get_long_description�_check_rst_data�get�formatr:)r
�data�warningrNs    rr?zcheck.check_restructuredtextnsm��� � �5�5�7���+�+�D�1�G��2�;�?�?�6�*�D��|�!�!�*��(�/�/���
�D�A���I�I�g��
2rc	��|jjxsd}tjjj�}tjjtjjj
f��j�}d|_	d|_
d|_t||j|j|j|j |j"|j$��}tj&j)|||��}|j+|d�	|j-||�|j0S#t.$r7}|j0j3dd|zd	if�Yd}~|j0Sd}~wwxYw)
z8Returns warnings when the provided data doesn't compile.zsetup.py)�
components�N)rrrr)rrMz!Could not finish the parsing: %s.�)rG�script_namer�parsers�rst�Parser�frontend�OptionParser�get_default_values�	tab_width�pep_references�rfc_referencesrrr�warning_streamr�error_encoding�error_encoding_error_handlerr�document�note_source�parse�AttributeErrorr
r)r
rS�source_path�parser�settings�reporterrf�es        rrPzcheck._check_rst_dataysg���'�'�3�3�A�z���!�!�%�%�,�,�.���$�$�1�1� �(�(�,�,�3�3�5�2�
�
�
�
�	����"&���"&���!���!�!�����*�*��.�.��,�,�"�?�?�
���>�>�*�*�8�X�k�*�R�����[�"�-�	��L�L��x�(�� � � ���	����$�$��8�1�<�b�"�E�
�
�� � � ��	�s�,E
�
	F
�"F�F
N)r%r&r'�__doc__�description�user_options�boolean_optionsr5r8r:rCr=r?rPr7rrr*r*'s>��;�6�K��L�A�O��
�'�
F�&M�$	�!rr*)ro�
contextlib�corer�errorsr�suppress�ImportError�docutils.utilsr�docutils.parsers.rst�docutils.frontend�docutils.nodes�utils�Reporterrr*r7rr�<module>r~sc�����(��Z����%���������0�0��
&�:p!�G�p!�;&�%�s�0A)�)A2python3.12/site-packages/setuptools/_distutils/command/__pycache__/config.cpython-312.pyc000064400000035254151732703570025336 0ustar00�

��_i3��p�dZddlZddlZddlmZddlmZddlmZddl	m
Z
dd	d
�ZGd�de�Zdd
�Z
y)a�distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
�N�)�Command)�DistutilsExecError)�customize_compiler)�logz.cz.cxx)�czc++c��eZdZdZgd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dd
�Zdd�Zdd�Z					dd�Z					dd�Z						dd�Zdddgfd�Zdd�Zy)�configzprepare to build)	)z	compiler=Nzspecify the compiler type)zcc=Nzspecify the compiler executable)z
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link with)z
library-dirs=�Lz.directories to search for external C libraries)�noisyNz1show every action (compile, link, run, ...) taken)zdump-sourceNz=dump generated source files before attempting to compile themc�t�d|_d|_d|_d|_d|_d|_d|_g|_y)N�)�compiler�cc�include_dirs�	libraries�library_dirsr�dump_source�
temp_files��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/config.py�initialize_optionszconfig.initialize_options-sA����
���� ������ �����
�������c�&�|j� |jjxsg|_nHt|jt�r.|jj	t
j�|_|j�g|_n,t|jt�r|jg|_|j�g|_yt|jt�r/|jj	t
j�|_yy�N)	r�distribution�
isinstance�str�split�os�pathseprrrs r�finalize_optionszconfig.finalize_options<s������$� $� 1� 1� >� >� D�"�D��
��)�)�3�
/� $� 1� 1� 7� 7��
�
� C�D���>�>�!��D�N�
�����
,�"�n�n�-�D�N����$� "�D��
��)�)�3�
/� $� 1� 1� 7� 7��
�
� C�D��0rc��yr �rs r�runz
config.runLs��rc���ddlm}m}t|j|�s�||j|j
d��|_t
|j�|jr%|jj|j�|jr%|jj|j�|jr&|jj|j�yyy)z^Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        r)�	CCompiler�new_compilerr)r�dry_run�forceN)
�	ccompilerr,r-r"rr.rr�set_include_dirsr�
set_librariesr�set_library_dirs)rr,r-s   r�_check_compilerzconfig._check_compilerSs���	8��$�-�-��3�(�������A��D�M�
�t�}�}�-�� � ��
�
�.�.�t�/@�/@�A��~�~��
�
�+�+�D�N�N�;�� � ��
�
�.�.�t�/@�/@�A�!�4rc��dt|z}t|d�5}|r,|D]}|jd|z��|jd�|j|�|ddk7r|jd�ddd�|S#1swY|SxYw)N�_configtest�wz#include <%s>
�
���)�LANG_EXT�open�write)r�body�headers�lang�filename�file�headers       r�_gen_temp_sourcefilezconfig._gen_temp_sourcefilegs��� �8�D�>�1��
�(�C�
 �D��%�F��J�J�0�6�9�:�&��
�
�4� ��J�J�t���B�x�4���
�
�4� �!���!���s�AA<�<Bc��|j|||�}d}|jj||g�|jj	|||��||fS)Nz
_configtest.i�r)rCr�extendr�
preprocess)rr=r>rr?�src�outs       r�_preprocesszconfig._preprocessssT���'�'��g�t�<����������S�z�*��
�
� � ��c�� �E��S�z�rc��|j|||�}|jrt|d|z�|jj	|g�\}|j
j
||g�|jj|g|��||fS)Nzcompiling '%s':rE)rCr�	dump_filer�object_filenamesrrF�compile)rr=r>rr?rH�objs       r�_compilezconfig._compilezs����'�'��g�t�<������c�,�s�2�3����/�/���6���������S�z�*��
�
���s�e�,��?��S�z�rc��|j||||�\}}tjjtjj	|��d}	|j
j
|g|	|||��|j
j�|	|j
jz}	|jj|	�|||	fS)Nr)rr�target_lang)
rPr%�path�splitext�basenamer�link_executable�
exe_extensionr�append)
rr=r>rrrr?rHrO�progs
          r�_linkzconfig._link�s����]�]�4��,��E�
��c��w�w������ 0� 0�� 5�6�q�9���
�
�%�%�
�E���%��	&�	
��=�=�&�&�2��$�-�-�5�5�5�D������t�$��S�$��rc���|s|j}g|_tjddj|��|D]}	t	j
|��y#t$rY�'wxYw)Nzremoving: %s� )rr�info�joinr%�remove�OSError)r�	filenamesr@s   r�_cleanz
config._clean�s[������I� �D�O��������)�!4�5�!�H�
��	�	�(�#�"���
��
�s�A�	A%�$A%Nc��ddlm}|j�d}	|j||||�|j	�|S#|$rd}Y�wxYw)aQConstruct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        r��CompileErrorTF)r0rer4rJrb�rr=r>rr?re�oks       r�try_cppzconfig.try_cpp�sW��	-�����
��	����T�7�L�$�?�	
���
��	��	�	��B�	�s�A�A
�	A
c�Z�|j�|j||||�\}}t|t�rt	j
|�}t
|�5}d}		|j�}
|
dk(rn|j|
�rd}	n�+ddd�|j�	S#1swY�xYw)a�Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        FT�N)
r4rJr"r#�rerNr;�readline�searchrb)r�patternr=r>rr?rHrIrA�match�lines           r�
search_cppzconfig.search_cpp�s���	
�����#�#�D�'�<��F���S��g�s�#��j�j��)�G�
�#�Y�$��E���}�}����2�:���>�>�$�'� �E��
��	
���
����Y�s�/B!�!B*c���ddlm}|j�	|j||||�d}t	j
|xrdxsd�|j
�|S#|$rd}Y�8wxYw)zwTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        rrdTF�success!�failure.)r0rer4rPrr]rbrfs       r�try_compilezconfig.try_compile�sk��	-�����	��M�M�$���t�<��B�	����"�
�0�j�1����
��	���	��B�	�s�A�A'�&A'c���ddlm}m}|j�	|j	||||||�d}	tj|	xrdxsd�|j�|	S#||f$rd}	Y�:wxYw)z�Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        r�re�	LinkErrorTFrsrt)r0rerxr4rZrr]rb)
rr=r>rrrr?rerxrgs
          r�try_linkzconfig.try_link�st��	8�����	��J�J�t�W�l�I�|�T�R��B�	����"�
�0�j�1����
��	���i�(�	��B�	�s�A!�!	A-�,A-c��ddlm}m}|j�	|j	||||||�\}	}
}|j|g�d}tj|xrdxsd�|j�|S#||tf$rd}Y�?wxYw)z�Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        rrwTFrsrt)
r0rerxr4rZ�spawnrrr]rb)
rr=r>rrrr?rerxrHrO�exergs
             r�try_runzconfig.try_runs���	8�����	� �J�J��g�|�Y��d��M�C��c�
�J�J��u���B�	����"�
�0�j�1����
��	���i�);�<�	��B�	�s�.A7�7B�Bc�>�|j�g}|r|jd|z�|jd�|r|jd|z�n|jd|z�|jd�dj|�dz}|j|||||�S)a�Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        z
int %s ();z
int main () {z  %s();z  %s;�}r8)r4rXr^ry)	r�funcr>rrr�decl�callr=s	         r�
check_funczconfig.check_func#s���.	
��������K�K��t�+�,����O�$���K�K�	�D�(�)��K�K��$��'����C���y�y����%���}�}�T�7�L�)�\�R�Rrc�T�|j�|jd|||g|z|�S)a�Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        zint main (void) { })r4ry)r�libraryrr>r�other_librariess      r�	check_libzconfig.check_libHs7�� 	
�����}�}�!���
�I��'��
�	
rc�,�|jd|g|��S)z�Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        z
/* No body */)r=r>r)rh)rrBrrr?s     r�check_headerzconfig.check_headeras#��
�|�|� �6�(���
�	
r)NNNr)NNr)NNNNr)NNNNrr)�__name__�
__module__�__qualname__�description�user_optionsrr'r*r4rCrJrPrZrbrhrqruryr}r�r�r�r)rrr
r
s���$�K��L�&
�D� 
�B�(
��� �"	�*�&�6�(����
��:����
��H����
�
�#S�P����

�2
rr
c��|�tjd|�ntj|�t|�}	tj|j��|j	�y#|j	�wxYw)zjDumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    Nz%s)rr]r;�read�close)r@�headrAs   rrLrLksU��
�|�����x� ��������>�D�����������
�
����
�
��s�#A/�/Br )�__doc__r%rk�corer�errorsr�	sysconfigr�distutils._logrr:r
rLr)rr�<module>r�s<��	�
�	��'�*���f�%��Q
�W�Q
�h

rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/install_egg_info.cpython-312.pyc000064400000011514151732703570027365 0ustar00�

��_i�
��l�dZddlZddlZddlZddlmZddlmZddlm	Z	Gd�de�Z
d	�Zd
�Zd�Z
y)z�
distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.
�N�)�Command)�dir_util)�logc�B�eZdZdZdZdgZd�Zed��Zd�Z	d�Z
d�Zy	)
�install_egg_infoz)Install an .egg-info file for the packagez8Install package's PKG-INFO metadata as an .egg-info file)zinstall-dir=�dzdirectory to install toc��d|_y�N)�install_dir��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/install_egg_info.py�initialize_optionsz#install_egg_info.initialize_optionss
�����c���dtt|jj���tt	|jj���gtjdd��zS)z_
        Allow basename to be overridden by child class.
        Ref pypa/distutils#2.
        z%s-%s-py%d.%d.egg-infoNr)�to_filename�	safe_name�distribution�get_name�safe_version�get_version�sys�version_infor
s r�basenamezinstall_egg_info.basenamese��(��	�$�"3�"3�"<�"<�">�?�@���T�%6�%6�%B�%B�%D�E�F�+
��
�
�b�q�
!�+
�
�	
rc��|jdd�tjj|j|j
�|_|jg|_y)N�install_lib)rr)�set_undefined_options�os�path�joinrr�target�outputsr
s r�finalize_optionsz!install_egg_info.finalize_options(s@���"�"�=�2P�Q��g�g�l�l�4�#3�#3�T�]�]�C������}��rc��|j}tjj|�rAtjj	|�s"tj||j��n�tjj|�r0|jtj|jfd|z�nbtjj|j�s9|jtj|jfd|jz�tjd|�|js=t|dd��5}|j j"j%|�ddd�yy#1swYyxYw)N)�dry_runz	Removing z	Creating z
Writing %s�wzUTF-8)�encoding)r"rr �isdir�islinkr�remove_treer&�exists�execute�unlinkr�makedirsr�info�openr�metadata�write_pkg_file)rr"�fs   r�runzinstall_egg_info.run-s������
�7�7�=�=�� �������)?�� � �����>�
�W�W�^�^�F�
#��L�L����T�[�[�N�K�&�4H�I������t�/�/�0��L�L����d�.�.�0�+��@P�@P�2P�
�	����v�&��|�|��f�c�G�4���!�!�*�*�9�9�!�<�5�4��4�4�s�&E>�>Fc��|jSr)r#r
s r�get_outputszinstall_egg_info.get_outputs<s���|�|�rN)�__name__�
__module__�__qualname__�__doc__�description�user_optionsr�propertyrr$r5r7�rrrrs<��3�L�K�8��L� ��	
��	
�%�

=�rrc�0�tjdd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    �[^A-Za-z0-9.]+�-)�re�sub��names rrrEs��
�6�6�"�C��.�.rc�T�|jdd�}tjdd|�S)z�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    � �.rArB)�replacerCrD)�versions rrrMs(���o�o�c�3�'�G�
�6�6�"�C��1�1rc�&�|jdd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    rB�_)rJrEs rrrWs��
�<�<��S�!�!r)r;rrrC�cmdr�r�_logrrrrrr?rr�<module>rQs:���
�
�	����,�w�,�h/�2�"rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/upload.cpython-312.pyc000064400000022420151732703570025344 0ustar00�

��_iC����dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
ddlmZddl
mZmZddlmZdd	lmZeed
d�eedd�eedd�d
�ZGd�de�Zy)zm
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
�N)�standard_b64encode)�urlopen�Request�	HTTPError)�urlparse�)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn�md5�sha256�blake2b)�
md5_digest�
sha256_digest�blake2_256_digestc�j�eZdZdZej
ddgzZejdgzZd�Zd�Zd�Z	d�Z
y	)
�uploadzupload binary package to PyPI)�sign�szsign files to upload using gpg)z	identity=�izGPG identity used to sign filesrc�t�tj|�d|_d|_d|_d|_d|_y)N�rF)r�initialize_options�username�password�
show_responser�identity)�selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/upload.pyrzupload.initialize_options's4���(�(��.���
���
������	���
�c�l�tj|�|jr|jst	d��|j�}|ik7r(|d|_|d|_|d|_|d|_	|js3|jjr|jj|_yyy)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r�finalize_optionsrrr
�_read_pypircrrr#r$�distribution)r�configs  r r%zupload.finalize_options/s����&�&�t�,��=�=����&�'W�X�X��"�"�$���R�<�"�:�.�D�M�"�:�.�D�M�$�\�2�D�O����D�J��}�}��!2�!2�!;�!;� �-�-�6�6�D�M�"<�}r!c��|jjs
d}t|��|jjD]\}}}|j|||��y)NzHMust create and upload files in one command (e.g. setup.py sdist upload))r'�
dist_filesr
�upload_file)r�msg�command�	pyversion�filenames     r �runz
upload.run?sX��� � �+�+�/�
�'�s�+�+�,0�,=�,=�,H�,H�(�G�Y�����W�i��:�-Ir!c���t|j�\}}}}}}	|s|s|	rtd|jz��|dvrtd|z��|jr:ddd|g}
|jrd|jg|
ddt|
|j�	�t|d
�}	|j�}|j�|jj}
idd�d
d�d|
j��d|
j��dtjj!|�|f�d|�d|�dd�d|
j#��d|
j%��d|
j'��d|
j)��d|
j+��d|
j-��d|
j/��d|
j1��d|
j3��|
j5�|
j7�|
j9�|
j;�d��}d |d!<t<j?�D]"\}}|��		||�jA�||<�$|jrMt|d"zd
�5}tjj!|�d"z|j�f|d#<ddd�|jDd$z|jFzjId%�}d&tK|�jMd%�z}d'}d(|jId%�z}|d)z}tOjP�}|j?�D]�\}}d*|z}tS|tT�s|g}|D]�}tW|�tXur|d+|d,zz
}|d-}nt[|�jId.�}|j]|�|j]|jId.��|j]d/�|j]|�����|j]|�|j_�}d0ja||j�}|jc|tdjf�d1|zt[ti|��|d2�}tk|j||�3�}	tm|�}|jo�}|jp}|d4k(r�|jcd5ja||�tdjf�|jzrF|j}�}!d6jd7|!d7f�}|jc|tdjf�yyd8ja||�}|jc|tdjx�t�|��#|j�wxYw#tB$rY��YwxYw#1swY���xYw#tr$r#} | jt}| jp}Yd} ~ ��d} ~ wtv$r/} |jct[| �tdjx��d} ~ wwxYw)9NzIncompatible url %s)�http�httpszunsupported schema �gpgz
--detach-signz-az--local-userr)�dry_run�rbz:action�file_upload�protocol_version�1�name�version�content�filetyper.�metadata_versionz1.0�summary�	home_page�author�author_email�license�description�keywords�platform�classifiers)�download_url�provides�requires�	obsoletesr�commentz.asc�
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"r�zutf-8s

zSubmitting {} to {}z multipart/form-data; boundary=%s)zContent-typezContent-length�
Authorization)�data�headers��zServer response ({}): {}�
zK---------------------------------------------------------------------------zUpload failed ({}): {})Arr#�AssertionErrorrrrr5�open�read�closer'�metadata�get_name�get_version�os�path�basename�get_description�get_url�get_contact�get_contact_email�get_licence�get_long_description�get_keywords�
get_platforms�get_classifiers�get_download_url�get_provides�get_requires�
get_obsoletes�_FILE_CONTENT_DIGESTS�items�	hexdigest�
ValueErrorrr�encoder�decode�io�BytesIO�
isinstance�list�type�tuple�str�write�getvalue�format�announce�logging�INFO�lenrr�getcoder,r�code�OSError�ERRORr�_read_pypi_response�joinr	)"rr-r.r/�schema�netloc�url�params�query�	fragments�gpg_args�fr<�metarR�digest_name�digest_cons�	user_pass�auth�boundary�sep_boundary�end_boundary�body�key�value�titler,rS�request�result�status�reason�e�texts"                                  r r+zupload.upload_fileIs���8@����8Q�5����V�U�I��U�i� �!6����!H�I�I��*�*� �!6��!?�@�@��9�9����h�?�H��}�}�!/���� ?���1�
��(�D�L�L�1�
��4� ��	��f�f�h�G�
�G�G�I�� � �)�)��
��}�
�
��
�

�D�M�M�O�
�
�t�'�'�)�

�
����(�(��2�G�<�
�
��
�
��
�
��
�
�t�+�+�-�
�
�����
�
�d�&�&�(�
� 
�D�2�2�4�!
�"
�t�'�'�)�#
�$
�4�4�4�6�%
�&
��)�)�+�'
�(
��*�*�,�)
�*
�4�/�/�1�+
�,!�1�1�3��)�)�+��)�)�+��+�+�-�5
��:��Y��)>�(C�(C�(E�$�K���"��
�$/��$8�$B�$B�$D��[�!�	)F��9�9��h��'��.�!�)+���)9�)9�(�)C�f�)L�a�f�f�h�(W��_�%�/��]�]�S�(�4�=�=�8�@�@��I�	��,�Y�7�>�>�w�G�G��I�� �8�?�?�7�#;�;��#�i�/���z�z�|���*�*�,�J�C��C�c�I�E��e�T�*��������;�%�'��.��q��9�9�E�!�!�H�E���J�-�-�g�6�E��
�
�<�(��
�
�5�<�<��0�1��
�
�;�'��
�
�5�!��'�	
�
�
�<� ��}�}���#�*�*�8�T�_�_�E���
�
�c�7�<�<�(�?��I�!�#�d�)�n�!�
���$�/�/��g�F��		��W�%�F��^�^�%�F��Z�Z�F��S�=��M�M�*�1�1�&�&�A�7�<�<�
��!�!��/�/��7���i�i��4�� :�;���
�
�c�7�<�<�0�"�
+�1�1�&�&�A�C��M�M�#�w�}�}�-� ��%�%��_
�G�G�I��P�
��
��
/�.��`�	��V�V�F��U�U�F���	��M�M�#�a�&�'�-�-�0���	�sN� U�&U)�6U9�('V�U&�)	U6�5U6�9V�	W(�V-�-W(�9*W#�#W(N)�__name__�
__module__�__qualname__rDr�user_options�boolean_optionsrr%r0r+�r!r rrsK��1�K� �-�-�7�=�1��L�
$�3�3�v�h�>�O��7� ;�E&r!r)�__doc__r]rs�hashlibr~�base64r�urllib.requestrrr�urllib.parser�errorsr	r
�corerr�getattrrmrr�r!r �<module>r�si���
�	���%�6�6�!�9� ���'�5�$�/��W�h��5� ��)�T�:���q&�]�q&r!python3.12/site-packages/setuptools/_distutils/command/__pycache__/install_lib.cpython-312.pyc000064400000017742151732703570026367 0ustar00�

��_i� ��R�dZddlZddlZddlZddlmZddlmZdZ	Gd�de�Z
y)	zkdistutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules).�N�)�Command)�DistutilsOptionErrorz.pyc�d�eZdZdZgd�Zgd�ZddiZd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zy)�install_libz7install all Python modules (extensions and pure Python)))zinstall-dir=�dzdirectory to install to)z
build-dir=�bz'build directory (where to install from))�force�fz-force installation (overwrite existing files))�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�
skip-buildNzskip the build steps)r
rrrrc�X�d|_d|_d|_d|_d|_d|_y)Nr)�install_dir�	build_dirr
r�optimize�
skip_build��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/install_lib.py�initialize_optionszinstall_lib.initialize_options6s-����������
������
����c	�N�|jddddddd�|j�d|_|j�d	|_t|jt�s0	t	|j�|_|jd
vrt
�yy#tt
f$rtd��wxYw)N�install)�	build_libr)rr)r
r
)rr)rr)rrTF)r�rzoptimize must be 0, 1, or 2)�set_undefined_optionsrr�
isinstance�int�AssertionError�
ValueErrorrrs r�finalize_optionszinstall_lib.finalize_options?s���	
�"�"��&�*��"�$�(�	
��<�<���D�L��=�=� �!�D�M��$�-�-��-�
J� #�D�M�M� 2��
��=�=�	�1�(�(�2�.��
��/�
J�*�+H�I�I�
J�s�.B	�	B$c��|j�|j�}|�-|jj�r|j	|�yyy�N)�buildr�distribution�has_pure_modules�byte_compile�r�outfiless  r�runzinstall_lib.runZsH���
�
��
�<�<�>����D�$5�$5�$F�$F�$H����h�'�%I�rc���|jsX|jj�r|jd�|jj	�r|jd�yyy)N�build_py�	build_ext)rr(r)�run_command�has_ext_modulesrs rr'zinstall_lib.buildjsS������ � �1�1�3�� � ��,�� � �0�0�2�� � ��-�3�rc���tjj|j�r(|j	|j|j
�}|S|j
d|jz�y)Nz3'%s' does not exist -- no Python modules to install)�os�path�isdirr�	copy_treer�warnr+s  rrzinstall_lib.installqsV��
�7�7�=�=����(��~�~�d�n�n�d�6F�6F�G�H���	
�I�I�E����V�
�
rc�p�tjr|jd�yddlm}|jd�j}|jr!||d|j||j��|jdkDr7|||j|j||j|j��yy)Nz%byte-compiling is disabled, skipping.r)r*rr)rr
�prefix�dry_run)rr
r:�verboser;)�sys�dont_write_bytecoder8�utilr*�get_finalized_command�rootrr
r;rr<)r�filesr*�install_roots    rr*zinstall_lib.byte_compile{s����"�"��I�I�=�>��'��1�1�)�<�A�A���<�<�����j�j�#����
��=�=�1��������j�j�#�������

�rc	�(�|sgS|j|�}|j�}t||�}t|�ttj
�z}g}|D]4}	|j
tjj||	|d���6|Sr&)	r@�get_outputs�getattr�lenr4�sep�appendr5�join)
r�has_any�	build_cmd�
cmd_option�
output_dir�build_filesr�
prefix_len�outputs�files
          r�_mutate_outputszinstall_lib._mutate_outputs�s�����I��.�.�y�9�	��+�+�-���I�z�2�	���^�c�"�&�&�k�1�
����D��N�N�2�7�7�<�<�
�D���4E�F�G� ��rc��g}|D]�}tjjtjj|��d}|tk7r�L|j
r0|j
tjj|d���|jdkDs��|j
tjj||j�����|S)Nr�)�optimizationr)r4r5�splitext�normcase�PYTHON_SOURCE_EXTENSIONrrI�	importlibr?�cache_from_sourcer)r�py_filenames�bytecode_files�py_file�exts     r�_bytecode_filenameszinstall_lib._bytecode_filenames�s�����#�G��'�'�"�"�2�7�7�#3�#3�G�#<�=�a�@�C��-�-���|�|��%�%��N�N�4�4�W�2�4�N���}�}�q� ��%�%��N�N�4�4��d�m�m�5���$�$�rc�*�|j|jj�dd|j�}|jr|j|�}ng}|j|jj
�dd|j�}||z|zS)z�Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        r/rr0)rSr(r)rrr`r2)r�pure_outputs�bytecode_outputs�ext_outputss    rrEzinstall_lib.get_outputs�s���
�+�+����.�.�0������	
���<�<�#�7�7��E��!���*�*����-�-�/������	
���.�.��<�<rc�2�g}|jj�r0|jd�}|j|j	��|jj�r0|jd�}|j|j	��|S)z�Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        r/r0)r(r)r@�extendrEr2)r�inputsr/r0s    r�
get_inputszinstall_lib.get_inputs�s|�������-�-�/��1�1�*�=�H��M�M�(�.�.�0�1����,�,�.��2�2�;�?�I��M�M�)�/�/�1�2��
rN)�__name__�
__module__�__qualname__�description�user_options�boolean_options�negative_optrr$r-r'rr*rSr`rErh�rrrrsS��K�K�"
�L�9�O� �)�,�L��J�6(� .���B
��2=�2rr)�__doc__r4�importlib.utilrZr=�corer�errorsrrYrrprr�<module>rus1��!�

��
��)� ��[�'�[rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/install_data.cpython-312.pyc000064400000006732151732703570026527 0ustar00�

��_i�
��B�dZddlZddlmZddlmZmZGd�de�Zy)z�distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.�N�)�Command)�change_root�convert_pathc�<�eZdZdZgd�ZdgZd�Zd�Zd�Zd�Z	d�Z
y	)
�install_datazinstall data files))zinstall-dir=�dzIbase directory for installing data files (default: installation base dir))zroot=Nz<install everything relative to this alternate root directory)�force�fz-force installation (overwrite existing files)r
c��d|_g|_d|_d|_|jj
|_d|_y)Nr�)�install_dir�outfiles�rootr
�distribution�
data_files�warn_dir��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/install_data.py�initialize_optionszinstall_data.initialize_optionss9�������
���	���
��+�+�6�6�����
�c�,�|jdddd�y)N�install)rr)rr)r
r
)�set_undefined_optionsrs r�finalize_optionszinstall_data.finalize_options%s���"�"��+���		
rc�R�|j|j�|jD�]|}t|t�rtt|�}|jr"|jd|�d|j�d��|j||j�\}}|jj|���t|d�}tjj|�s+tjj|j|�}n"|jrt!|j|�}|j|�|dgk(r|jj|���8|dD]=}t|�}|j||�\}}|jj|��?��y)Nz.setup script did not provide a directory for 'z' -- installing right in '�'rr
)�mkpathrr�
isinstance�strrr�warn�	copy_filer�append�os�path�isabs�joinrr)rr�out�_�dir�datas      r�runzinstall_data.run-sC�����D�$�$�%����A��!�S�!� ��O���=�=��I�I�>?��AQ�AQ�S�� �>�>�!�T�-=�-=�>���a��
�
�$�$�S�)�#�1�Q�4�(���w�w�}�}�S�)��'�'�,�,�t�'7�'7��=�C��Y�Y�%�d�i�i��5�C����C� ��Q�4�2�:��M�M�(�(��-�!"�!���+�D�1��#'�>�>�$��#<���a��
�
�,�,�S�1�!%�7!rc�"�|jxsgS�N)rrs r�
get_inputszinstall_data.get_inputsOs�����$�"�$rc��|jSr/)rrs r�get_outputszinstall_data.get_outputsRs���}�}�rN)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsrrr-r0r2�rrrr
s1��&�K�	�L��i�O��
� 2�D%�rr)�__doc__r%�corer�utilrrrr9rr�<module>r=s#��$�
��,�F�7�Frpython3.12/site-packages/setuptools/_distutils/command/__pycache__/bdist.cpython-312.pyc000064400000013030151732703600025154 0ustar00�

��_i ��r�dZddlZddlZddlmZddlmZmZddlm	Z	d�Z
Gd�d	e�ZGd
�de�Z
y)zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).�N�)�Command)�DistutilsPlatformError�DistutilsOptionError)�get_platformc���ddlm}g}tjD]-}|j	d|zdtj|df��/||�}|jd�y)zAPrint list of available formats (arguments to "--format" option).r)�FancyGetopt�formats=N�z'List of available distribution formats:)�fancy_getoptr	�bdist�format_commands�append�
print_help)r	�formats�format�pretty_printers    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/bdist.py�show_formatsrs\��*��G��'�'�����
�V�+�T�5�3H�3H��3P�QR�3S�T�U�(� ��)�N����G�H�c��eZdZd�Zy)�
ListCompatc�<�tjdtd��y)Nz4format_commands is now a dict. append is deprecated.r)�
stacklevel)�warnings�warn�DeprecationWarning)�self�items  rrzListCompat.appends���
�
�F���	
rN)�__name__�
__module__�__qualname__r�rrrrs��
rrc
��eZdZdZdddde�zfdddd	d
gZdgZdd
defgZdZ	ddd�Z
edddddddd��ZeZ
d�Zd�Zd�Zy
)r
z$create a built (binary) distribution)zbdist-base=�bz4temporary directory for creating built distributionsz
plat-name=�pz;platform name to embed in generated filenames (default: %s))r
Nz/formats for distribution (comma-separated list))z	dist-dir=�dz=directory to put final built distributions in [default: dist])�
skip-buildNz2skip rebuilding everything (for testing/debugging))zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]r(zhelp-formatsNz$lists available distribution formats)�	bdist_rpm�gztar�zip)�posix�nt)r+zRPM distribution)�
bdist_dumbzgzip'ed tar file)r0zbzip2'ed tar file)r0zxz'ed tar file)r0zcompressed tar file)r0ztar file)r0zZIP file)�rpmr,�bztar�xztar�ztar�tarr-c�f�d|_d|_d|_d|_d|_d|_d|_y)Nr)�
bdist_base�	plat_namer�dist_dir�
skip_build�group�owner)rs r�initialize_optionszbdist.initialize_options^s3�������������
������
���
rc�B�|j�<|jrt�|_n |jd�j|_|j�M|jd�j
}tjj|d|jz�|_|jd�|j�$	|jtjg|_
|j�d|_yy#t$rtdtjz��wxYw)N�buildzbdist.rz;don't know how to create built distributions on platform %s�dist)r8r:r�get_finalized_commandr7�
build_base�os�path�join�ensure_string_listr�default_format�name�KeyErrorrr9)rrBs  r�finalize_optionszbdist.finalize_optionsgs����>�>�!����!-����!%�!;�!;�G�!D�!N�!N���
�?�?�"��3�3�G�<�G�G�J� �g�g�l�l�:�x�$�.�.�7P�Q�D�O����	�*��<�<��
� $� 3� 3�B�G�G� <�=����=�=� �"�D�M�!��
�
�,�%�')�w�w�/���
�s�#C8�8&Dc���g}|jD]$}	|j|j|d��&tt
|j��D]�}||}|j|�}||jvr|j||_	|dk(r"|j|_
|j|_|||dzdvrd|_|j|���y#t$rt	d|z��wxYw)Nrzinvalid format '%s'r0r)rrrrIr�range�len�reinitialize_command�no_format_optionrr<r;�	keep_temp�run_command)r�commandsr�i�cmd_name�sub_cmds      r�runz	bdist.run�s������l�l�F�
K����� 4� 4�V� <�Q� ?�@�#��s�4�<�<�(�)�A���{�H��/�/��9�G��t�4�4�4�!%���a�����<�'� $�
�
��
� $�
�
��
��8�A��E�G�,�,�$%��!����X�&�*��	�
K�*�+@�6�+I�J�J�
K�s�!C�C3)r r!r"�descriptionr�user_options�boolean_optionsr�help_optionsrOrGrr�format_commandr=rJrVr#rrr
r
#s���8�K�	U���
�*�n�
-�	
�	N�	
�
	S�	
�
	
�)�L�6$�n�O�
��E�|�T��L�
&�� '�e�4�N�!�4�7�8�5�9�-�-�	
�
�O�%�N��#�8'rr
)�__doc__rCr�corer�errorsrr�utilrr�dictrr
r#rr�<module>ras;���

���A��I�
��
�y'�G�y'rpython3.12/site-packages/setuptools/_distutils/command/__pycache__/build_py.cpython-312.pyc000064400000037230151732703600025666 0ustar00�

��_i�@��r�dZddlZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZddl
mZGd�d	e�Zy)
zHdistutils.command.build_py

Implements the Distutils 'build_py' command.�N�)�Command)�DistutilsOptionError�DistutilsFileError)�convert_path)�logc��eZdZdZgd�ZddgZddiZd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zy)�build_pyz5"build" pure Python modules (copy to build directory)))z
build-lib=�dzdirectory to "build" (copy) to)�compile�czcompile .py to .pyc)�
no-compileNz!don't compile .py files [default])z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz2forcibly build everything (ignore file timestamps)rrrc�t�d|_d|_d|_d|_d|_d|_d|_d|_y)Nr)�	build_lib�
py_modules�package�package_data�package_dirr�optimizer��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/command/build_py.py�initialize_optionszbuild_py.initialize_options#s<����������� �����������
���
�c��|jddd�|jj|_|jj|_|jj|_i|_|jj
rD|jj
j
�D]\}}t|�|j
|<�|j�|_	t|jt�s6	t|j�|_d|jcxkrdksJ�J�yy#ttf$rtd��wxYw)N�build)rr)rrrrzoptimize must be 0, 1, or 2)�set_undefined_options�distribution�packagesrrr�itemsr�get_data_files�
data_files�
isinstancer�int�
ValueError�AssertionErrorr)r�name�paths   r�finalize_optionszbuild_py.finalize_options-s!���"�"��/�1C�	
��)�)�2�2��
��+�+�6�6��� �-�-�:�:���������(�(�"�/�/�;�;�A�A�C�
��d�)5�d�);�� � ��&�D��-�-�/����$�-�-��-�
J� #�D�M�M� 2��
��D�M�M�.�Q�.�.�.�.�.�.����/�
J�*�+H�I�I�
J�s�64D,�,Ec���|jr|j�|jr |j�|j	�|j|j
d���y)Nr)�include_bytecode)r�
build_modulesr"�build_packages�build_package_data�byte_compile�get_outputsrs r�runzbuild_py.runFsR��,�?�?���� ��=�=����!��#�#�%����$�*�*�A�*�>�?rc�x�g}|js|S|jD]�}|j|�}tjj|j
g|j
d�z�}d}|rt|�dz}|j||�D�cgc]}||d��	}}|j||||f���|Scc}w)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�.r�N)
r"�get_package_dir�osr+�joinr�split�len�find_data_files�append)r�datar�src_dir�	build_dir�plen�file�	filenamess        rr$zbuild_py.get_data_filesds������}�}��K��}�}�G��*�*�7�3�G���������'7�'�-�-��:L�'L�N�I��D���7�|�a�'��26�1E�1E�g�w�1W�X�1W���d�e��1W�I�X��K�K��'�9�i�@�A�%����Ys�B7c	��|jjdg�|jj|g�z}g}|D]�}tjtjjtj|�t|���}|j|D�cgc])}||vs�tjj|�s�(|��+c}���|Scc}w)z6Return filenames for package's data files in 'src_dir'�)
r�get�globr9r+r:�escaper�extend�isfile)rrr@�globs�files�pattern�filelist�fns        rr=zbuild_py.find_data_fileszs����!�!�%�%�b�"�-��0A�0A�0E�0E�g�r�0R�R�����G��y�y������T�[�[��1�<��3H�I��H�
�L�L�&�Q�h��"�E�/�b�g�g�n�n�R�>P��h�Q�
�
����Rs�	C
�)C
�	C
c�>�|jD]�\}}}}|D]�}tjj||�}|j	tjj|��|j
tjj||�|d������y)z$Copy data files into build directoryF��
preserve_modeN)r%r9r+r:�mkpath�dirname�	copy_file)rrr@rArD�filename�targets       rr1zbuild_py.build_package_data�sx��6:�o�o�2�G�W�i��%�������i��:�����B�G�G�O�O�F�3�4�����G�G�L�L��(�3�V�5���&�7Frc��|jd�}|js|rtjj|�Syg}|rM	|jdj	|�}|jd|�tjj|�S|jjd�}|�|jd|�|rtjj|�Sy#t$r|jd|d�|d=YnwxYw|r�Ōy)z�Return the directory, relative to the top of the source
        distribution, where package 'package' should be found
        (at least according to the 'package_dir' option, if any).r6rFr���)r;rr9r+r:�insert�KeyErrorrG)rrr+�tail�pdirs     rr8zbuild_py.get_package_dir�s����}�}�S�!�������w�w�|�|�T�*�*���D��/��+�+�C�H�H�T�N�;�D�
�K�K��4�(��7�7�<�<��.�.��'�'�+�+�B�/���#��K�K��4�(���7�7�<�<��.�.���+ �!��K�K��4��8�,��R��!���s�C�!D�?Dc�H�|dk7rZtjj|�std|z��tjj	|�std|z��|rAtjj|d�}tjj
|�r|Sy)NrFz%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.py)r9r+�existsr�isdirr:rK)rrr�init_pys    r�
check_packagezbuild_py.check_package�s���
�"���7�7�>�>�+�.�(�;�k�I����7�7�=�=��-�(�-�/:�;�����g�g�l�l�;�
�>�G��w�w�~�~�g�&���rc�r�tjj|�stjd||�yy)Nz!file %s (for module %s) not foundFT)r9r+rKr�warning)r�module�module_files   r�check_modulezbuild_py.check_module�s)���w�w�~�~�k�*��K�K�;�[�&�Q��rc�F�|j||�tjtjj	tj
|�d��}g}tjj
|jj�}|D]�}tjj
|�}||k7rTtjjtjj|��d}|j|||f��{|jd|z���|S)Nz*.pyrzexcluding %s)
rcrHr9r+r:rI�abspathr!�script_name�splitext�basenamer>�debug_print)	rrr�module_files�modules�setup_scriptr�abs_frfs	         r�find_package_moduleszbuild_py.find_package_modules�s������7�K�0��y�y������d�k�k�+�.F��!O�P�����w�w���t�'8�'8�'D�'D�E���A��G�G�O�O�A�&�E���$����)�)�"�'�'�*:�*:�1�*=�>�q�A��������3�4�� � ��,�!>�?�
��rc���i}g}|jD]�}|jd�}dj|dd�}|d}	||\}}|s/|j||�}	|df||<|	r|j
|d|	f�tjj||dz�}
|j||
�s��|j
|||
f���|S#t$r|j	|�}d}Y��wxYw)a�Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        r6rrZr7�__init__�.py)
rr;r:r\r8rcr>r9r+rh)rr"rprfr+r�module_baser�checkedrbrgs           r�find_moduleszbuild_py.find_modules�s	�������o�o�F��<�<��$�D��h�h�t�A�b�z�*�G��r�(�K�
�)1�'�):�&��g�
��,�,�W�k�B��%0�!�$4���!���N�N�G�Z��#A�B�
�'�'�,�,�{�K�%�4G�H�K��$�$�V�[�9���N�N�G�[�+�>�?�1&�4���'�
�"�2�2�7�;����
�s�C�C%�$C%c��g}|jr|j|j��|jrE|jD]6}|j	|�}|j||�}|j|��8|S)a4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.)rrJryr"r8rs)rrprr�ms     r�find_all_moduleszbuild_py.find_all_modulesso�����?�?��N�N�4�,�,�.�/��=�=��=�=��"�2�2�7�;���-�-�g�{�C�����q�!�)��rc�N�|j�D�cgc]}|d��	c}Scc}w)NrZ)r|)rrfs  r�get_source_fileszbuild_py.get_source_files.s)��)-�)>�)>�)@�A�)@�v��r�
�)@�A�A��As�"c�f�|gt|�z|dzgz}tjj|�S)Nrv)�listr9r+r:)rrArrf�outfile_paths     r�get_module_outfilezbuild_py.get_module_outfile1s1��!�{�T�'�]�2�f�u�n�5E�E���w�w�|�|�\�*�*rc
��|j�}g}|D]�\}}}|jd�}|j|j||�}|j	|�|s�I|j
r0|j	tjj|d���|jdkDs��|j	tjj||j�����||jD���	�
�cgc].\}}}	}
|
D]"}tjj|	|���$�0c}}
}	}}z
}|Scc}}
}	}}w)Nr6rF)�optimizationr)r|r;r�rr>r�	importlib�util�cache_from_sourcerr%r9r+r:)rr.rp�outputsrrfrgrWr@rArDs           rr3zbuild_py.get_outputs5s���'�'�)����,3�(�G�V�[��m�m�C�(�G��.�.�t�~�~�w��O�H��N�N�8�$���<�<��N�N�!���8�8��PR�8�S���=�=�1�$��N�N�!���8�8�$�4�=�=�9���-4� 	�:>�/�/�
�:I�6���)�Y�%��
�G�G�L�L��H�-�%�
.�:I�
�	
�����

s�93D7c�J�t|t�r|jd�}n!t|ttf�std��|j
|j||�}tjj|�}|j|�|j||d��S)Nr6z:'package' must be a string (dot-separated), list, or tuplerrR)
r&�strr;r��tuple�	TypeErrorr�rr9r+rUrTrV)rrfrgr�outfile�dirs      r�build_modulezbuild_py.build_modulePs����g�s�#��m�m�C�(�G��G�d�E�]�3��L��
��)�)�$�.�.�'�6�J���g�g�o�o�g�&�����C���~�~�k�7�!�~�D�Drc�`�|j�}|D]\}}}|j|||��y�N)ryr�)rrprrfrgs     rr/zbuild_py.build_modules`s5���#�#�%��,3�(�G�V�[�

���f�k�7�;�-4rc��|jD]J}|j|�}|j||�}|D] \}}}||k(sJ�|j|||��"�Lyr�)r"r8rsr�)rrrrp�package_rfrgs       rr0zbuild_py.build_packagesisg���}�}�G��.�.�w�7�K��/�/���E�G�29�-��&�+��(�*�*�*��!�!�&�+�w�?�29�%rc��tjr|jd�yddlm}|j
}|dtjk7r|tjz}|jr!||d|j||j��|jdkDr,|||j|j||j��yy)Nz%byte-compiling is disabled, skipping.r)r2rZr)rr�prefix�dry_run)�sys�dont_write_bytecode�warnr�r2rr9�seprrr�r)rrMr2r�s    rr2zbuild_py.byte_compile}s����"�"��I�I�=�>��'������"�:������b�f�f�_�F�
�<�<�������F�D�L�L�
��=�=�1��������j�j�����
�rN)r7)�__name__�
__module__�__qualname__�description�user_options�boolean_options�negative_optrr,r4r$r=r1r8rcrhrsryr|r~r�r3r�r/r0r2�rrr
r
s���K�K��L�!�'�*�O� �)�,�L��J�2@�<�,
��%�N�4�
�2�h� B�+��6E� <�@�(rr
)�__doc__r9�importlib.utilr�r�rH�corer�errorsrrr�r�distutils._logrr
r�rr�<module>r�s2��0�
��
���=���F�w�Frpython3.12/site-packages/setuptools/_distutils/command/bdist_rpm.py000064400000052775151732703600021514 0ustar00"""distutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions)."""

import subprocess
import sys
import os

from ..core import Command
from ..debug import DEBUG
from ..file_util import write_file
from ..errors import (
    DistutilsOptionError,
    DistutilsPlatformError,
    DistutilsFileError,
    DistutilsExecError,
)
from ..sysconfig import get_python_version
from distutils._log import log


class bdist_rpm(Command):
    description = "create an RPM distribution"

    user_options = [
        ('bdist-base=', None, "base directory for creating built distributions"),
        (
            'rpm-base=',
            None,
            "base directory for creating RPMs (defaults to \"rpm\" under "
            "--bdist-base; must be specified for RPM 2)",
        ),
        (
            'dist-dir=',
            'd',
            "directory to put final RPM files in " "(and .spec files if --spec-only)",
        ),
        (
            'python=',
            None,
            "path to Python interpreter to hard-code in the .spec file "
            "(default: \"python\")",
        ),
        (
            'fix-python',
            None,
            "hard-code the exact path to the current Python interpreter in "
            "the .spec file",
        ),
        ('spec-only', None, "only regenerate spec file"),
        ('source-only', None, "only generate source RPM"),
        ('binary-only', None, "only generate binary RPM"),
        ('use-bzip2', None, "use bzip2 instead of gzip to create source distribution"),
        # More meta-data: too RPM-specific to put in the setup script,
        # but needs to go in the .spec file -- so we make these options
        # to "bdist_rpm".  The idea is that packagers would put this
        # info in setup.cfg, although they are of course free to
        # supply it on the command line.
        (
            'distribution-name=',
            None,
            "name of the (Linux) distribution to which this "
            "RPM applies (*not* the name of the module distribution!)",
        ),
        ('group=', None, "package classification [default: \"Development/Libraries\"]"),
        ('release=', None, "RPM release number"),
        ('serial=', None, "RPM serial number"),
        (
            'vendor=',
            None,
            "RPM \"vendor\" (eg. \"Joe Blow <joe@example.com>\") "
            "[default: maintainer or author from setup script]",
        ),
        (
            'packager=',
            None,
            "RPM packager (eg. \"Jane Doe <jane@example.net>\") " "[default: vendor]",
        ),
        ('doc-files=', None, "list of documentation files (space or comma-separated)"),
        ('changelog=', None, "RPM changelog"),
        ('icon=', None, "name of icon file"),
        ('provides=', None, "capabilities provided by this package"),
        ('requires=', None, "capabilities required by this package"),
        ('conflicts=', None, "capabilities which conflict with this package"),
        ('build-requires=', None, "capabilities required to build this package"),
        ('obsoletes=', None, "capabilities made obsolete by this package"),
        ('no-autoreq', None, "do not automatically calculate dependencies"),
        # Actions to take when building RPM
        ('keep-temp', 'k', "don't clean up RPM build directory"),
        ('no-keep-temp', None, "clean up RPM build directory [default]"),
        (
            'use-rpm-opt-flags',
            None,
            "compile with RPM_OPT_FLAGS when building from source RPM",
        ),
        ('no-rpm-opt-flags', None, "do not pass any RPM CFLAGS to compiler"),
        ('rpm3-mode', None, "RPM 3 compatibility mode (default)"),
        ('rpm2-mode', None, "RPM 2 compatibility mode"),
        # Add the hooks necessary for specifying custom scripts
        ('prep-script=', None, "Specify a script for the PREP phase of RPM building"),
        ('build-script=', None, "Specify a script for the BUILD phase of RPM building"),
        (
            'pre-install=',
            None,
            "Specify a script for the pre-INSTALL phase of RPM building",
        ),
        (
            'install-script=',
            None,
            "Specify a script for the INSTALL phase of RPM building",
        ),
        (
            'post-install=',
            None,
            "Specify a script for the post-INSTALL phase of RPM building",
        ),
        (
            'pre-uninstall=',
            None,
            "Specify a script for the pre-UNINSTALL phase of RPM building",
        ),
        (
            'post-uninstall=',
            None,
            "Specify a script for the post-UNINSTALL phase of RPM building",
        ),
        ('clean-script=', None, "Specify a script for the CLEAN phase of RPM building"),
        (
            'verify-script=',
            None,
            "Specify a script for the VERIFY phase of the RPM build",
        ),
        # Allow a packager to explicitly force an architecture
        ('force-arch=', None, "Force an architecture onto the RPM build process"),
        ('quiet', 'q', "Run the INSTALL phase of RPM building in quiet mode"),
    ]

    boolean_options = [
        'keep-temp',
        'use-rpm-opt-flags',
        'rpm3-mode',
        'no-autoreq',
        'quiet',
    ]

    negative_opt = {
        'no-keep-temp': 'keep-temp',
        'no-rpm-opt-flags': 'use-rpm-opt-flags',
        'rpm2-mode': 'rpm3-mode',
    }

    def initialize_options(self):
        self.bdist_base = None
        self.rpm_base = None
        self.dist_dir = None
        self.python = None
        self.fix_python = None
        self.spec_only = None
        self.binary_only = None
        self.source_only = None
        self.use_bzip2 = None

        self.distribution_name = None
        self.group = None
        self.release = None
        self.serial = None
        self.vendor = None
        self.packager = None
        self.doc_files = None
        self.changelog = None
        self.icon = None

        self.prep_script = None
        self.build_script = None
        self.install_script = None
        self.clean_script = None
        self.verify_script = None
        self.pre_install = None
        self.post_install = None
        self.pre_uninstall = None
        self.post_uninstall = None
        self.prep = None
        self.provides = None
        self.requires = None
        self.conflicts = None
        self.build_requires = None
        self.obsoletes = None

        self.keep_temp = 0
        self.use_rpm_opt_flags = 1
        self.rpm3_mode = 1
        self.no_autoreq = 0

        self.force_arch = None
        self.quiet = 0

    def finalize_options(self):
        self.set_undefined_options('bdist', ('bdist_base', 'bdist_base'))
        if self.rpm_base is None:
            if not self.rpm3_mode:
                raise DistutilsOptionError("you must specify --rpm-base in RPM 2 mode")
            self.rpm_base = os.path.join(self.bdist_base, "rpm")

        if self.python is None:
            if self.fix_python:
                self.python = sys.executable
            else:
                self.python = "python3"
        elif self.fix_python:
            raise DistutilsOptionError(
                "--python and --fix-python are mutually exclusive options"
            )

        if os.name != 'posix':
            raise DistutilsPlatformError(
                "don't know how to create RPM " "distributions on platform %s" % os.name
            )
        if self.binary_only and self.source_only:
            raise DistutilsOptionError(
                "cannot supply both '--source-only' and '--binary-only'"
            )

        # don't pass CFLAGS to pure python distributions
        if not self.distribution.has_ext_modules():
            self.use_rpm_opt_flags = 0

        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
        self.finalize_package_data()

    def finalize_package_data(self):
        self.ensure_string('group', "Development/Libraries")
        self.ensure_string(
            'vendor',
            "%s <%s>"
            % (self.distribution.get_contact(), self.distribution.get_contact_email()),
        )
        self.ensure_string('packager')
        self.ensure_string_list('doc_files')
        if isinstance(self.doc_files, list):
            for readme in ('README', 'README.txt'):
                if os.path.exists(readme) and readme not in self.doc_files:
                    self.doc_files.append(readme)

        self.ensure_string('release', "1")
        self.ensure_string('serial')  # should it be an int?

        self.ensure_string('distribution_name')

        self.ensure_string('changelog')
        # Format changelog correctly
        self.changelog = self._format_changelog(self.changelog)

        self.ensure_filename('icon')

        self.ensure_filename('prep_script')
        self.ensure_filename('build_script')
        self.ensure_filename('install_script')
        self.ensure_filename('clean_script')
        self.ensure_filename('verify_script')
        self.ensure_filename('pre_install')
        self.ensure_filename('post_install')
        self.ensure_filename('pre_uninstall')
        self.ensure_filename('post_uninstall')

        # XXX don't forget we punted on summaries and descriptions -- they
        # should be handled here eventually!

        # Now *this* is some meta-data that belongs in the setup script...
        self.ensure_string_list('provides')
        self.ensure_string_list('requires')
        self.ensure_string_list('conflicts')
        self.ensure_string_list('build_requires')
        self.ensure_string_list('obsoletes')

        self.ensure_string('force_arch')

    def run(self):  # noqa: C901
        if DEBUG:
            print("before _get_package_data():")
            print("vendor =", self.vendor)
            print("packager =", self.packager)
            print("doc_files =", self.doc_files)
            print("changelog =", self.changelog)

        # make directories
        if self.spec_only:
            spec_dir = self.dist_dir
            self.mkpath(spec_dir)
        else:
            rpm_dir = {}
            for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'):
                rpm_dir[d] = os.path.join(self.rpm_base, d)
                self.mkpath(rpm_dir[d])
            spec_dir = rpm_dir['SPECS']

        # Spec file goes into 'dist_dir' if '--spec-only specified',
        # build/rpm.<plat> otherwise.
        spec_path = os.path.join(spec_dir, "%s.spec" % self.distribution.get_name())
        self.execute(
            write_file, (spec_path, self._make_spec_file()), "writing '%s'" % spec_path
        )

        if self.spec_only:  # stop if requested
            return

        # Make a source distribution and copy to SOURCES directory with
        # optional icon.
        saved_dist_files = self.distribution.dist_files[:]
        sdist = self.reinitialize_command('sdist')
        if self.use_bzip2:
            sdist.formats = ['bztar']
        else:
            sdist.formats = ['gztar']
        self.run_command('sdist')
        self.distribution.dist_files = saved_dist_files

        source = sdist.get_archive_files()[0]
        source_dir = rpm_dir['SOURCES']
        self.copy_file(source, source_dir)

        if self.icon:
            if os.path.exists(self.icon):
                self.copy_file(self.icon, source_dir)
            else:
                raise DistutilsFileError("icon file '%s' does not exist" % self.icon)

        # build package
        log.info("building RPMs")
        rpm_cmd = ['rpmbuild']

        if self.source_only:  # what kind of RPMs?
            rpm_cmd.append('-bs')
        elif self.binary_only:
            rpm_cmd.append('-bb')
        else:
            rpm_cmd.append('-ba')
        rpm_cmd.extend(['--define', '__python %s' % self.python])
        if self.rpm3_mode:
            rpm_cmd.extend(['--define', '_topdir %s' % os.path.abspath(self.rpm_base)])
        if not self.keep_temp:
            rpm_cmd.append('--clean')

        if self.quiet:
            rpm_cmd.append('--quiet')

        rpm_cmd.append(spec_path)
        # Determine the binary rpm names that should be built out of this spec
        # file
        # Note that some of these may not be really built (if the file
        # list is empty)
        nvr_string = "%{name}-%{version}-%{release}"
        src_rpm = nvr_string + ".src.rpm"
        non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm"
        q_cmd = r"rpm -q --qf '{} {}\n' --specfile '{}'".format(
            src_rpm,
            non_src_rpm,
            spec_path,
        )

        out = os.popen(q_cmd)
        try:
            binary_rpms = []
            source_rpm = None
            while True:
                line = out.readline()
                if not line:
                    break
                ell = line.strip().split()
                assert len(ell) == 2
                binary_rpms.append(ell[1])
                # The source rpm is named after the first entry in the spec file
                if source_rpm is None:
                    source_rpm = ell[0]

            status = out.close()
            if status:
                raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd))

        finally:
            out.close()

        self.spawn(rpm_cmd)

        if not self.dry_run:
            if self.distribution.has_ext_modules():
                pyversion = get_python_version()
            else:
                pyversion = 'any'

            if not self.binary_only:
                srpm = os.path.join(rpm_dir['SRPMS'], source_rpm)
                assert os.path.exists(srpm)
                self.move_file(srpm, self.dist_dir)
                filename = os.path.join(self.dist_dir, source_rpm)
                self.distribution.dist_files.append(('bdist_rpm', pyversion, filename))

            if not self.source_only:
                for rpm in binary_rpms:
                    rpm = os.path.join(rpm_dir['RPMS'], rpm)
                    if os.path.exists(rpm):
                        self.move_file(rpm, self.dist_dir)
                        filename = os.path.join(self.dist_dir, os.path.basename(rpm))
                        self.distribution.dist_files.append(
                            ('bdist_rpm', pyversion, filename)
                        )

    def _dist_path(self, path):
        return os.path.join(self.dist_dir, os.path.basename(path))

    def _make_spec_file(self):  # noqa: C901
        """Generate the text of an RPM spec file and return it as a
        list of strings (one per line).
        """
        # definitions and headers
        spec_file = [
            '%define name ' + self.distribution.get_name(),
            '%define version ' + self.distribution.get_version().replace('-', '_'),
            '%define unmangled_version ' + self.distribution.get_version(),
            '%define release ' + self.release.replace('-', '_'),
            '',
            'Summary: ' + (self.distribution.get_description() or "UNKNOWN"),
        ]

        # Workaround for #14443 which affects some RPM based systems such as
        # RHEL6 (and probably derivatives)
        vendor_hook = subprocess.getoutput('rpm --eval %{__os_install_post}')
        # Generate a potential replacement value for __os_install_post (whilst
        # normalizing the whitespace to simplify the test for whether the
        # invocation of brp-python-bytecompile passes in __python):
        vendor_hook = '\n'.join(
            ['  %s \\' % line.strip() for line in vendor_hook.splitlines()]
        )
        problem = "brp-python-bytecompile \\\n"
        fixed = "brp-python-bytecompile %{__python} \\\n"
        fixed_hook = vendor_hook.replace(problem, fixed)
        if fixed_hook != vendor_hook:
            spec_file.append('# Workaround for http://bugs.python.org/issue14443')
            spec_file.append('%define __os_install_post ' + fixed_hook + '\n')

        # put locale summaries into spec file
        # XXX not supported for now (hard to put a dictionary
        # in a config file -- arg!)
        # for locale in self.summaries.keys():
        #    spec_file.append('Summary(%s): %s' % (locale,
        #                                          self.summaries[locale]))

        spec_file.extend(
            [
                'Name: %{name}',
                'Version: %{version}',
                'Release: %{release}',
            ]
        )

        # XXX yuck! this filename is available from the "sdist" command,
        # but only after it has run: and we create the spec file before
        # running "sdist", in case of --spec-only.
        if self.use_bzip2:
            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2')
        else:
            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz')

        spec_file.extend(
            [
                'License: ' + (self.distribution.get_license() or "UNKNOWN"),
                'Group: ' + self.group,
                'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot',
                'Prefix: %{_prefix}',
            ]
        )

        if not self.force_arch:
            # noarch if no extension modules
            if not self.distribution.has_ext_modules():
                spec_file.append('BuildArch: noarch')
        else:
            spec_file.append('BuildArch: %s' % self.force_arch)

        for field in (
            'Vendor',
            'Packager',
            'Provides',
            'Requires',
            'Conflicts',
            'Obsoletes',
        ):
            val = getattr(self, field.lower())
            if isinstance(val, list):
                spec_file.append('{}: {}'.format(field, ' '.join(val)))
            elif val is not None:
                spec_file.append('{}: {}'.format(field, val))

        if self.distribution.get_url():
            spec_file.append('Url: ' + self.distribution.get_url())

        if self.distribution_name:
            spec_file.append('Distribution: ' + self.distribution_name)

        if self.build_requires:
            spec_file.append('BuildRequires: ' + ' '.join(self.build_requires))

        if self.icon:
            spec_file.append('Icon: ' + os.path.basename(self.icon))

        if self.no_autoreq:
            spec_file.append('AutoReq: 0')

        spec_file.extend(
            [
                '',
                '%description',
                self.distribution.get_long_description() or "",
            ]
        )

        # put locale descriptions into spec file
        # XXX again, suppressed because config file syntax doesn't
        # easily support this ;-(
        # for locale in self.descriptions.keys():
        #    spec_file.extend([
        #        '',
        #        '%description -l ' + locale,
        #        self.descriptions[locale],
        #        ])

        # rpm scripts
        # figure out default build script
        def_setup_call = "{} {}".format(self.python, os.path.basename(sys.argv[0]))
        def_build = "%s build" % def_setup_call
        if self.use_rpm_opt_flags:
            def_build = 'env CFLAGS="$RPM_OPT_FLAGS" ' + def_build

        # insert contents of files

        # XXX this is kind of misleading: user-supplied options are files
        # that we open and interpolate into the spec file, but the defaults
        # are just text that we drop in as-is.  Hmmm.

        install_cmd = (
            '%s install -O1 --root=$RPM_BUILD_ROOT ' '--record=INSTALLED_FILES'
        ) % def_setup_call

        script_options = [
            ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"),
            ('build', 'build_script', def_build),
            ('install', 'install_script', install_cmd),
            ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"),
            ('verifyscript', 'verify_script', None),
            ('pre', 'pre_install', None),
            ('post', 'post_install', None),
            ('preun', 'pre_uninstall', None),
            ('postun', 'post_uninstall', None),
        ]

        for rpm_opt, attr, default in script_options:
            # Insert contents of file referred to, if no file is referred to
            # use 'default' as contents of script
            val = getattr(self, attr)
            if val or default:
                spec_file.extend(
                    [
                        '',
                        '%' + rpm_opt,
                    ]
                )
                if val:
                    with open(val) as f:
                        spec_file.extend(f.read().split('\n'))
                else:
                    spec_file.append(default)

        # files section
        spec_file.extend(
            [
                '',
                '%files -f INSTALLED_FILES',
                '%defattr(-,root,root)',
            ]
        )

        if self.doc_files:
            spec_file.append('%doc ' + ' '.join(self.doc_files))

        if self.changelog:
            spec_file.extend(
                [
                    '',
                    '%changelog',
                ]
            )
            spec_file.extend(self.changelog)

        return spec_file

    def _format_changelog(self, changelog):
        """Format the changelog correctly and convert it to a list of strings"""
        if not changelog:
            return changelog
        new_changelog = []
        for line in changelog.strip().split('\n'):
            line = line.strip()
            if line[0] == '*':
                new_changelog.extend(['', line])
            elif line[0] == '-':
                new_changelog.append(line)
            else:
                new_changelog.append('  ' + line)

        # strip trailing newline inserted by first changelog entry
        if not new_changelog[0]:
            del new_changelog[0]

        return new_changelog
python3.12/site-packages/setuptools/_distutils/command/install_data.py000064400000005312151732703600022151 0ustar00"""distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files."""

# contributed by Bastian Kleineidam

import os
from ..core import Command
from ..util import change_root, convert_path


class install_data(Command):
    description = "install data files"

    user_options = [
        (
            'install-dir=',
            'd',
            "base directory for installing data files "
            "(default: installation base dir)",
        ),
        ('root=', None, "install everything relative to this alternate root directory"),
        ('force', 'f', "force installation (overwrite existing files)"),
    ]

    boolean_options = ['force']

    def initialize_options(self):
        self.install_dir = None
        self.outfiles = []
        self.root = None
        self.force = 0
        self.data_files = self.distribution.data_files
        self.warn_dir = 1

    def finalize_options(self):
        self.set_undefined_options(
            'install',
            ('install_data', 'install_dir'),
            ('root', 'root'),
            ('force', 'force'),
        )

    def run(self):
        self.mkpath(self.install_dir)
        for f in self.data_files:
            if isinstance(f, str):
                # it's a simple file, so copy it
                f = convert_path(f)
                if self.warn_dir:
                    self.warn(
                        "setup script did not provide a directory for "
                        "'%s' -- installing right in '%s'" % (f, self.install_dir)
                    )
                (out, _) = self.copy_file(f, self.install_dir)
                self.outfiles.append(out)
            else:
                # it's a tuple with path to install to and a list of files
                dir = convert_path(f[0])
                if not os.path.isabs(dir):
                    dir = os.path.join(self.install_dir, dir)
                elif self.root:
                    dir = change_root(self.root, dir)
                self.mkpath(dir)

                if f[1] == []:
                    # If there are no files listed, the user must be
                    # trying to create an empty directory, so add the
                    # directory to the list of output files.
                    self.outfiles.append(dir)
                else:
                    # Copy files, adding them to the list of output files.
                    for data in f[1]:
                        data = convert_path(data)
                        (out, _) = self.copy_file(data, dir)
                        self.outfiles.append(out)

    def get_inputs(self):
        return self.data_files or []

    def get_outputs(self):
        return self.outfiles
python3.12/site-packages/setuptools/_distutils/command/install_lib.py000064400000020331151732703600022004 0ustar00"""distutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules)."""

import os
import importlib.util
import sys

from ..core import Command
from ..errors import DistutilsOptionError


# Extension for Python source files.
PYTHON_SOURCE_EXTENSION = ".py"


class install_lib(Command):
    description = "install all Python modules (extensions and pure Python)"

    # The byte-compilation options are a tad confusing.  Here are the
    # possible scenarios:
    #   1) no compilation at all (--no-compile --no-optimize)
    #   2) compile .pyc only (--compile --no-optimize; default)
    #   3) compile .pyc and "opt-1" .pyc (--compile --optimize)
    #   4) compile "opt-1" .pyc only (--no-compile --optimize)
    #   5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
    #   6) compile "opt-2" .pyc only (--no-compile --optimize-more)
    #
    # The UI for this is two options, 'compile' and 'optimize'.
    # 'compile' is strictly boolean, and only decides whether to
    # generate .pyc files.  'optimize' is three-way (0, 1, or 2), and
    # decides both whether to generate .pyc files and what level of
    # optimization to use.

    user_options = [
        ('install-dir=', 'd', "directory to install to"),
        ('build-dir=', 'b', "build directory (where to install from)"),
        ('force', 'f', "force installation (overwrite existing files)"),
        ('compile', 'c', "compile .py to .pyc [default]"),
        ('no-compile', None, "don't compile .py files"),
        (
            'optimize=',
            'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
        ),
        ('skip-build', None, "skip the build steps"),
    ]

    boolean_options = ['force', 'compile', 'skip-build']
    negative_opt = {'no-compile': 'compile'}

    def initialize_options(self):
        # let the 'install' command dictate our installation directory
        self.install_dir = None
        self.build_dir = None
        self.force = 0
        self.compile = None
        self.optimize = None
        self.skip_build = None

    def finalize_options(self):
        # Get all the information we need to install pure Python modules
        # from the umbrella 'install' command -- build (source) directory,
        # install (target) directory, and whether to compile .py files.
        self.set_undefined_options(
            'install',
            ('build_lib', 'build_dir'),
            ('install_lib', 'install_dir'),
            ('force', 'force'),
            ('compile', 'compile'),
            ('optimize', 'optimize'),
            ('skip_build', 'skip_build'),
        )

        if self.compile is None:
            self.compile = True
        if self.optimize is None:
            self.optimize = False

        if not isinstance(self.optimize, int):
            try:
                self.optimize = int(self.optimize)
                if self.optimize not in (0, 1, 2):
                    raise AssertionError
            except (ValueError, AssertionError):
                raise DistutilsOptionError("optimize must be 0, 1, or 2")

    def run(self):
        # Make sure we have built everything we need first
        self.build()

        # Install everything: simply dump the entire contents of the build
        # directory to the installation directory (that's the beauty of
        # having a build directory!)
        outfiles = self.install()

        # (Optionally) compile .py to .pyc
        if outfiles is not None and self.distribution.has_pure_modules():
            self.byte_compile(outfiles)

    # -- Top-level worker functions ------------------------------------
    # (called from 'run()')

    def build(self):
        if not self.skip_build:
            if self.distribution.has_pure_modules():
                self.run_command('build_py')
            if self.distribution.has_ext_modules():
                self.run_command('build_ext')

    def install(self):
        if os.path.isdir(self.build_dir):
            outfiles = self.copy_tree(self.build_dir, self.install_dir)
        else:
            self.warn(
                "'%s' does not exist -- no Python modules to install" % self.build_dir
            )
            return
        return outfiles

    def byte_compile(self, files):
        if sys.dont_write_bytecode:
            self.warn('byte-compiling is disabled, skipping.')
            return

        from ..util import byte_compile

        # Get the "--root" directory supplied to the "install" command,
        # and use it as a prefix to strip off the purported filename
        # encoded in bytecode files.  This is far from complete, but it
        # should at least generate usable bytecode in RPM distributions.
        install_root = self.get_finalized_command('install').root

        if self.compile:
            byte_compile(
                files,
                optimize=0,
                force=self.force,
                prefix=install_root,
                dry_run=self.dry_run,
            )
        if self.optimize > 0:
            byte_compile(
                files,
                optimize=self.optimize,
                force=self.force,
                prefix=install_root,
                verbose=self.verbose,
                dry_run=self.dry_run,
            )

    # -- Utility methods -----------------------------------------------

    def _mutate_outputs(self, has_any, build_cmd, cmd_option, output_dir):
        if not has_any:
            return []

        build_cmd = self.get_finalized_command(build_cmd)
        build_files = build_cmd.get_outputs()
        build_dir = getattr(build_cmd, cmd_option)

        prefix_len = len(build_dir) + len(os.sep)
        outputs = []
        for file in build_files:
            outputs.append(os.path.join(output_dir, file[prefix_len:]))

        return outputs

    def _bytecode_filenames(self, py_filenames):
        bytecode_files = []
        for py_file in py_filenames:
            # Since build_py handles package data installation, the
            # list of outputs can contain more than just .py files.
            # Make sure we only report bytecode for the .py files.
            ext = os.path.splitext(os.path.normcase(py_file))[1]
            if ext != PYTHON_SOURCE_EXTENSION:
                continue
            if self.compile:
                bytecode_files.append(
                    importlib.util.cache_from_source(py_file, optimization='')
                )
            if self.optimize > 0:
                bytecode_files.append(
                    importlib.util.cache_from_source(
                        py_file, optimization=self.optimize
                    )
                )

        return bytecode_files

    # -- External interface --------------------------------------------
    # (called by outsiders)

    def get_outputs(self):
        """Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        """
        pure_outputs = self._mutate_outputs(
            self.distribution.has_pure_modules(),
            'build_py',
            'build_lib',
            self.install_dir,
        )
        if self.compile:
            bytecode_outputs = self._bytecode_filenames(pure_outputs)
        else:
            bytecode_outputs = []

        ext_outputs = self._mutate_outputs(
            self.distribution.has_ext_modules(),
            'build_ext',
            'build_lib',
            self.install_dir,
        )

        return pure_outputs + bytecode_outputs + ext_outputs

    def get_inputs(self):
        """Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        """
        inputs = []

        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            inputs.extend(build_py.get_outputs())

        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            inputs.extend(build_ext.get_outputs())

        return inputs
python3.12/site-packages/setuptools/_distutils/command/_framework_compat.py000064400000003116151732703610023212 0ustar00"""
Backward compatibility for homebrew builds on macOS.
"""


import sys
import os
import functools
import subprocess
import sysconfig


@functools.lru_cache()
def enabled():
    """
    Only enabled for Python 3.9 framework homebrew builds
    except ensurepip and venv.
    """
    PY39 = (3, 9) < sys.version_info < (3, 10)
    framework = sys.platform == 'darwin' and sys._framework
    homebrew = "Cellar" in sysconfig.get_config_var('projectbase')
    venv = sys.prefix != sys.base_prefix
    ensurepip = os.environ.get("ENSUREPIP_OPTIONS")
    return PY39 and framework and homebrew and not venv and not ensurepip


schemes = dict(
    osx_framework_library=dict(
        stdlib='{installed_base}/{platlibdir}/python{py_version_short}',
        platstdlib='{platbase}/{platlibdir}/python{py_version_short}',
        purelib='{homebrew_prefix}/lib/python{py_version_short}/site-packages',
        platlib='{homebrew_prefix}/{platlibdir}/python{py_version_short}/site-packages',
        include='{installed_base}/include/python{py_version_short}{abiflags}',
        platinclude='{installed_platbase}/include/python{py_version_short}{abiflags}',
        scripts='{homebrew_prefix}/bin',
        data='{homebrew_prefix}',
    )
)


@functools.lru_cache()
def vars():
    if not enabled():
        return {}
    homebrew_prefix = subprocess.check_output(['brew', '--prefix'], text=True).strip()
    return locals()


def scheme(name):
    """
    Override the selected scheme for posix_prefix.
    """
    if not enabled() or not name.endswith('_prefix'):
        return name
    return 'osx_framework_library'
python3.12/site-packages/setuptools/_distutils/command/build_clib.py000064400000017004151732703610021604 0ustar00"""distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module."""


# XXX this module has *lots* of code ripped-off quite transparently from
# build_ext.py -- not surprisingly really, as the work required to build
# a static library from a collection of C source files is not really all
# that different from what's required to build a shared object file from
# a collection of C source files.  Nevertheless, I haven't done the
# necessary refactoring to account for the overlap in code between the
# two modules, mainly because a number of subtle details changed in the
# cut 'n paste.  Sigh.

import os
from ..core import Command
from ..errors import DistutilsSetupError
from ..sysconfig import customize_compiler
from distutils._log import log


def show_compilers():
    from ..ccompiler import show_compilers

    show_compilers()


class build_clib(Command):
    description = "build C/C++ libraries used by Python extensions"

    user_options = [
        ('build-clib=', 'b', "directory to build C/C++ libraries to"),
        ('build-temp=', 't', "directory to put temporary build by-products"),
        ('debug', 'g', "compile with debugging information"),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
        ('compiler=', 'c', "specify the compiler type"),
    ]

    boolean_options = ['debug', 'force']

    help_options = [
        ('help-compiler', None, "list available compilers", show_compilers),
    ]

    def initialize_options(self):
        self.build_clib = None
        self.build_temp = None

        # List of libraries to build
        self.libraries = None

        # Compilation options for all libraries
        self.include_dirs = None
        self.define = None
        self.undef = None
        self.debug = None
        self.force = 0
        self.compiler = None

    def finalize_options(self):
        # This might be confusing: both build-clib and build-temp default
        # to build-temp as defined by the "build" command.  This is because
        # I think that C libraries are really just temporary build
        # by-products, at least from the point of view of building Python
        # extensions -- but I want to keep my options open.
        self.set_undefined_options(
            'build',
            ('build_temp', 'build_clib'),
            ('build_temp', 'build_temp'),
            ('compiler', 'compiler'),
            ('debug', 'debug'),
            ('force', 'force'),
        )

        self.libraries = self.distribution.libraries
        if self.libraries:
            self.check_library_list(self.libraries)

        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        # XXX same as for build_ext -- what about 'self.define' and
        # 'self.undef' ?

    def run(self):
        if not self.libraries:
            return

        # Yech -- this is cut 'n pasted from build_ext.py!
        from ..ccompiler import new_compiler

        self.compiler = new_compiler(
            compiler=self.compiler, dry_run=self.dry_run, force=self.force
        )
        customize_compiler(self.compiler)

        if self.include_dirs is not None:
            self.compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for name, value in self.define:
                self.compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                self.compiler.undefine_macro(macro)

        self.build_libraries(self.libraries)

    def check_library_list(self, libraries):
        """Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        """
        if not isinstance(libraries, list):
            raise DistutilsSetupError("'libraries' option must be a list of tuples")

        for lib in libraries:
            if not isinstance(lib, tuple) and len(lib) != 2:
                raise DistutilsSetupError("each element of 'libraries' must a 2-tuple")

            name, build_info = lib

            if not isinstance(name, str):
                raise DistutilsSetupError(
                    "first element of each tuple in 'libraries' "
                    "must be a string (the library name)"
                )

            if '/' in name or (os.sep != '/' and os.sep in name):
                raise DistutilsSetupError(
                    "bad library name '%s': "
                    "may not contain directory separators" % lib[0]
                )

            if not isinstance(build_info, dict):
                raise DistutilsSetupError(
                    "second element of each tuple in 'libraries' "
                    "must be a dictionary (build info)"
                )

    def get_library_names(self):
        # Assume the library list is valid -- 'check_library_list()' is
        # called from 'finalize_options()', so it should be!
        if not self.libraries:
            return None

        lib_names = []
        for lib_name, build_info in self.libraries:
            lib_names.append(lib_name)
        return lib_names

    def get_source_files(self):
        self.check_library_list(self.libraries)
        filenames = []
        for lib_name, build_info in self.libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError(
                    "in 'libraries' option (library '%s'), "
                    "'sources' must be present and must be "
                    "a list of source filenames" % lib_name
                )

            filenames.extend(sources)
        return filenames

    def build_libraries(self, libraries):
        for lib_name, build_info in libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError(
                    "in 'libraries' option (library '%s'), "
                    "'sources' must be present and must be "
                    "a list of source filenames" % lib_name
                )
            sources = list(sources)

            log.info("building '%s' library", lib_name)

            # First, compile the source code to object files in the library
            # directory.  (This should probably change to putting object
            # files in a temporary build directory.)
            macros = build_info.get('macros')
            include_dirs = build_info.get('include_dirs')
            objects = self.compiler.compile(
                sources,
                output_dir=self.build_temp,
                macros=macros,
                include_dirs=include_dirs,
                debug=self.debug,
            )

            # Now "link" the object files together into a static library.
            # (On Unix at least, this isn't really linking -- it just
            # builds an archive.  Whatever.)
            self.compiler.create_static_lib(
                objects, lib_name, output_dir=self.build_clib, debug=self.debug
            )
python3.12/site-packages/setuptools/_distutils/command/install_scripts.py000064400000003614151732703610022733 0ustar00"""distutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts."""

# contributed by Bastian Kleineidam

import os
from ..core import Command
from distutils._log import log
from stat import ST_MODE


class install_scripts(Command):
    description = "install scripts (Python or otherwise)"

    user_options = [
        ('install-dir=', 'd', "directory to install scripts to"),
        ('build-dir=', 'b', "build directory (where to install from)"),
        ('force', 'f', "force installation (overwrite existing files)"),
        ('skip-build', None, "skip the build steps"),
    ]

    boolean_options = ['force', 'skip-build']

    def initialize_options(self):
        self.install_dir = None
        self.force = 0
        self.build_dir = None
        self.skip_build = None

    def finalize_options(self):
        self.set_undefined_options('build', ('build_scripts', 'build_dir'))
        self.set_undefined_options(
            'install',
            ('install_scripts', 'install_dir'),
            ('force', 'force'),
            ('skip_build', 'skip_build'),
        )

    def run(self):
        if not self.skip_build:
            self.run_command('build_scripts')
        self.outfiles = self.copy_tree(self.build_dir, self.install_dir)
        if os.name == 'posix':
            # Set the executable bits (owner, group, and world) on
            # all the scripts we just installed.
            for file in self.get_outputs():
                if self.dry_run:
                    log.info("changing mode of %s", file)
                else:
                    mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777
                    log.info("changing mode of %s to %o", file, mode)
                    os.chmod(file, mode)

    def get_inputs(self):
        return self.distribution.scripts or []

    def get_outputs(self):
        return self.outfiles or []
python3.12/site-packages/setuptools/_distutils/command/clean.py000064400000005042151732703610020575 0ustar00"""distutils.command.clean

Implements the Distutils 'clean' command."""

# contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18

import os
from ..core import Command
from ..dir_util import remove_tree
from distutils._log import log


class clean(Command):
    description = "clean up temporary files from 'build' command"
    user_options = [
        ('build-base=', 'b', "base build directory (default: 'build.build-base')"),
        (
            'build-lib=',
            None,
            "build directory for all modules (default: 'build.build-lib')",
        ),
        ('build-temp=', 't', "temporary build directory (default: 'build.build-temp')"),
        (
            'build-scripts=',
            None,
            "build directory for scripts (default: 'build.build-scripts')",
        ),
        ('bdist-base=', None, "temporary directory for built distributions"),
        ('all', 'a', "remove all build output, not just temporary by-products"),
    ]

    boolean_options = ['all']

    def initialize_options(self):
        self.build_base = None
        self.build_lib = None
        self.build_temp = None
        self.build_scripts = None
        self.bdist_base = None
        self.all = None

    def finalize_options(self):
        self.set_undefined_options(
            'build',
            ('build_base', 'build_base'),
            ('build_lib', 'build_lib'),
            ('build_scripts', 'build_scripts'),
            ('build_temp', 'build_temp'),
        )
        self.set_undefined_options('bdist', ('bdist_base', 'bdist_base'))

    def run(self):
        # remove the build/temp.<plat> directory (unless it's already
        # gone)
        if os.path.exists(self.build_temp):
            remove_tree(self.build_temp, dry_run=self.dry_run)
        else:
            log.debug("'%s' does not exist -- can't clean it", self.build_temp)

        if self.all:
            # remove build directories
            for directory in (self.build_lib, self.bdist_base, self.build_scripts):
                if os.path.exists(directory):
                    remove_tree(directory, dry_run=self.dry_run)
                else:
                    log.warning("'%s' does not exist -- can't clean it", directory)

        # just for the heck of it, try to remove the base build directory:
        # we might have emptied it right now, but if not we don't care
        if not self.dry_run:
            try:
                os.rmdir(self.build_base)
                log.info("removing '%s'", self.build_base)
            except OSError:
                pass
python3.12/site-packages/setuptools/_distutils/command/install_egg_info.py000064400000005344151732703610023023 0ustar00"""
distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.
"""

import os
import sys
import re

from ..cmd import Command
from .. import dir_util
from .._log import log


class install_egg_info(Command):
    """Install an .egg-info file for the package"""

    description = "Install package's PKG-INFO metadata as an .egg-info file"
    user_options = [
        ('install-dir=', 'd', "directory to install to"),
    ]

    def initialize_options(self):
        self.install_dir = None

    @property
    def basename(self):
        """
        Allow basename to be overridden by child class.
        Ref pypa/distutils#2.
        """
        return "%s-%s-py%d.%d.egg-info" % (
            to_filename(safe_name(self.distribution.get_name())),
            to_filename(safe_version(self.distribution.get_version())),
            *sys.version_info[:2],
        )

    def finalize_options(self):
        self.set_undefined_options('install_lib', ('install_dir', 'install_dir'))
        self.target = os.path.join(self.install_dir, self.basename)
        self.outputs = [self.target]

    def run(self):
        target = self.target
        if os.path.isdir(target) and not os.path.islink(target):
            dir_util.remove_tree(target, dry_run=self.dry_run)
        elif os.path.exists(target):
            self.execute(os.unlink, (self.target,), "Removing " + target)
        elif not os.path.isdir(self.install_dir):
            self.execute(
                os.makedirs, (self.install_dir,), "Creating " + self.install_dir
            )
        log.info("Writing %s", target)
        if not self.dry_run:
            with open(target, 'w', encoding='UTF-8') as f:
                self.distribution.metadata.write_pkg_file(f)

    def get_outputs(self):
        return self.outputs


# The following routines are taken from setuptools' pkg_resources module and
# can be replaced by importing them from pkg_resources once it is included
# in the stdlib.


def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    """
    version = version.replace(' ', '.')
    return re.sub('[^A-Za-z0-9.]+', '-', version)


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-', '_')
python3.12/site-packages/setuptools/_distutils/command/__init__.py000064400000000656151732703610021260 0ustar00"""distutils.command

Package containing implementation of all the standard Distutils
commands."""

__all__ = [  # noqa: F822
    'build',
    'build_py',
    'build_ext',
    'build_clib',
    'build_scripts',
    'clean',
    'install',
    'install_lib',
    'install_headers',
    'install_scripts',
    'install_data',
    'sdist',
    'register',
    'bdist',
    'bdist_dumb',
    'bdist_rpm',
    'check',
    'upload',
]
python3.12/site-packages/setuptools/_distutils/command/upload.py000064400000016503151732703620021004 0ustar00"""
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
"""

import os
import io
import hashlib
import logging
from base64 import standard_b64encode
from urllib.request import urlopen, Request, HTTPError
from urllib.parse import urlparse
from ..errors import DistutilsError, DistutilsOptionError
from ..core import PyPIRCCommand
from ..spawn import spawn


# PyPI Warehouse supports MD5, SHA256, and Blake2 (blake2-256)
# https://bugs.python.org/issue40698
_FILE_CONTENT_DIGESTS = {
    "md5_digest": getattr(hashlib, "md5", None),
    "sha256_digest": getattr(hashlib, "sha256", None),
    "blake2_256_digest": getattr(hashlib, "blake2b", None),
}


class upload(PyPIRCCommand):
    description = "upload binary package to PyPI"

    user_options = PyPIRCCommand.user_options + [
        ('sign', 's', 'sign files to upload using gpg'),
        ('identity=', 'i', 'GPG identity used to sign files'),
    ]

    boolean_options = PyPIRCCommand.boolean_options + ['sign']

    def initialize_options(self):
        PyPIRCCommand.initialize_options(self)
        self.username = ''
        self.password = ''
        self.show_response = 0
        self.sign = False
        self.identity = None

    def finalize_options(self):
        PyPIRCCommand.finalize_options(self)
        if self.identity and not self.sign:
            raise DistutilsOptionError("Must use --sign for --identity to have meaning")
        config = self._read_pypirc()
        if config != {}:
            self.username = config['username']
            self.password = config['password']
            self.repository = config['repository']
            self.realm = config['realm']

        # getting the password from the distribution
        # if previously set by the register command
        if not self.password and self.distribution.password:
            self.password = self.distribution.password

    def run(self):
        if not self.distribution.dist_files:
            msg = (
                "Must create and upload files in one command "
                "(e.g. setup.py sdist upload)"
            )
            raise DistutilsOptionError(msg)
        for command, pyversion, filename in self.distribution.dist_files:
            self.upload_file(command, pyversion, filename)

    def upload_file(self, command, pyversion, filename):  # noqa: C901
        # Makes sure the repository URL is compliant
        schema, netloc, url, params, query, fragments = urlparse(self.repository)
        if params or query or fragments:
            raise AssertionError("Incompatible url %s" % self.repository)

        if schema not in ('http', 'https'):
            raise AssertionError("unsupported schema " + schema)

        # Sign if requested
        if self.sign:
            gpg_args = ["gpg", "--detach-sign", "-a", filename]
            if self.identity:
                gpg_args[2:2] = ["--local-user", self.identity]
            spawn(gpg_args, dry_run=self.dry_run)

        # Fill in the data - send all the meta-data in case we need to
        # register a new release
        f = open(filename, 'rb')
        try:
            content = f.read()
        finally:
            f.close()

        meta = self.distribution.metadata
        data = {
            # action
            ':action': 'file_upload',
            'protocol_version': '1',
            # identify release
            'name': meta.get_name(),
            'version': meta.get_version(),
            # file content
            'content': (os.path.basename(filename), content),
            'filetype': command,
            'pyversion': pyversion,
            # additional meta-data
            'metadata_version': '1.0',
            'summary': meta.get_description(),
            'home_page': meta.get_url(),
            'author': meta.get_contact(),
            'author_email': meta.get_contact_email(),
            'license': meta.get_licence(),
            'description': meta.get_long_description(),
            'keywords': meta.get_keywords(),
            'platform': meta.get_platforms(),
            'classifiers': meta.get_classifiers(),
            'download_url': meta.get_download_url(),
            # PEP 314
            'provides': meta.get_provides(),
            'requires': meta.get_requires(),
            'obsoletes': meta.get_obsoletes(),
        }

        data['comment'] = ''

        # file content digests
        for digest_name, digest_cons in _FILE_CONTENT_DIGESTS.items():
            if digest_cons is None:
                continue
            try:
                data[digest_name] = digest_cons(content).hexdigest()
            except ValueError:
                # hash digest not available or blocked by security policy
                pass

        if self.sign:
            with open(filename + ".asc", "rb") as f:
                data['gpg_signature'] = (os.path.basename(filename) + ".asc", f.read())

        # set up the authentication
        user_pass = (self.username + ":" + self.password).encode('ascii')
        # The exact encoding of the authentication string is debated.
        # Anyway PyPI only accepts ascii for both username or password.
        auth = "Basic " + standard_b64encode(user_pass).decode('ascii')

        # Build up the MIME payload for the POST data
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = b'\r\n--' + boundary.encode('ascii')
        end_boundary = sep_boundary + b'--\r\n'
        body = io.BytesIO()
        for key, value in data.items():
            title = '\r\nContent-Disposition: form-data; name="%s"' % key
            # handle multiple entries for the same name
            if not isinstance(value, list):
                value = [value]
            for value in value:
                if type(value) is tuple:
                    title += '; filename="%s"' % value[0]
                    value = value[1]
                else:
                    value = str(value).encode('utf-8')
                body.write(sep_boundary)
                body.write(title.encode('utf-8'))
                body.write(b"\r\n\r\n")
                body.write(value)
        body.write(end_boundary)
        body = body.getvalue()

        msg = "Submitting {} to {}".format(filename, self.repository)
        self.announce(msg, logging.INFO)

        # build the Request
        headers = {
            'Content-type': 'multipart/form-data; boundary=%s' % boundary,
            'Content-length': str(len(body)),
            'Authorization': auth,
        }

        request = Request(self.repository, data=body, headers=headers)
        # send the data
        try:
            result = urlopen(request)
            status = result.getcode()
            reason = result.msg
        except HTTPError as e:
            status = e.code
            reason = e.msg
        except OSError as e:
            self.announce(str(e), logging.ERROR)
            raise

        if status == 200:
            self.announce(
                'Server response ({}): {}'.format(status, reason), logging.INFO
            )
            if self.show_response:
                text = self._read_pypi_response(result)
                msg = '\n'.join(('-' * 75, text, '-' * 75))
                self.announce(msg, logging.INFO)
        else:
            msg = 'Upload failed ({}): {}'.format(status, reason)
            self.announce(msg, logging.ERROR)
            raise DistutilsError(msg)
python3.12/site-packages/setuptools/_distutils/command/sdist.py000064400000045440151732703620020650 0ustar00"""distutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution)."""

import os
import sys
from glob import glob
from warnings import warn

from ..core import Command
from distutils import dir_util
from distutils import file_util
from distutils import archive_util
from ..text_file import TextFile
from ..filelist import FileList
from distutils._log import log
from ..util import convert_path
from ..errors import DistutilsOptionError, DistutilsTemplateError


def show_formats():
    """Print all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    """
    from ..fancy_getopt import FancyGetopt
    from ..archive_util import ARCHIVE_FORMATS

    formats = []
    for format in ARCHIVE_FORMATS.keys():
        formats.append(("formats=" + format, None, ARCHIVE_FORMATS[format][2]))
    formats.sort()
    FancyGetopt(formats).print_help("List of available source distribution formats:")


class sdist(Command):
    description = "create a source distribution (tarball, zip file, etc.)"

    def checking_metadata(self):
        """Callable used for the check sub-command.

        Placed here so user_options can view it"""
        return self.metadata_check

    user_options = [
        ('template=', 't', "name of manifest template file [default: MANIFEST.in]"),
        ('manifest=', 'm', "name of manifest file [default: MANIFEST]"),
        (
            'use-defaults',
            None,
            "include the default file set in the manifest "
            "[default; disable with --no-defaults]",
        ),
        ('no-defaults', None, "don't include the default file set"),
        (
            'prune',
            None,
            "specifically exclude files/directories that should not be "
            "distributed (build tree, RCS/CVS dirs, etc.) "
            "[default; disable with --no-prune]",
        ),
        ('no-prune', None, "don't automatically exclude anything"),
        (
            'manifest-only',
            'o',
            "just regenerate the manifest and then stop " "(implies --force-manifest)",
        ),
        (
            'force-manifest',
            'f',
            "forcibly regenerate the manifest and carry on as usual. "
            "Deprecated: now the manifest is always regenerated.",
        ),
        ('formats=', None, "formats for source distribution (comma-separated list)"),
        (
            'keep-temp',
            'k',
            "keep the distribution tree around after creating " + "archive file(s)",
        ),
        (
            'dist-dir=',
            'd',
            "directory to put the source distribution archive(s) in " "[default: dist]",
        ),
        (
            'metadata-check',
            None,
            "Ensure that all required elements of meta-data "
            "are supplied. Warn if any missing. [default]",
        ),
        (
            'owner=',
            'u',
            "Owner name used when creating a tar file [default: current user]",
        ),
        (
            'group=',
            'g',
            "Group name used when creating a tar file [default: current group]",
        ),
    ]

    boolean_options = [
        'use-defaults',
        'prune',
        'manifest-only',
        'force-manifest',
        'keep-temp',
        'metadata-check',
    ]

    help_options = [
        ('help-formats', None, "list available distribution formats", show_formats),
    ]

    negative_opt = {'no-defaults': 'use-defaults', 'no-prune': 'prune'}

    sub_commands = [('check', checking_metadata)]

    READMES = ('README', 'README.txt', 'README.rst')

    def initialize_options(self):
        # 'template' and 'manifest' are, respectively, the names of
        # the manifest template and manifest file.
        self.template = None
        self.manifest = None

        # 'use_defaults': if true, we will include the default file set
        # in the manifest
        self.use_defaults = 1
        self.prune = 1

        self.manifest_only = 0
        self.force_manifest = 0

        self.formats = ['gztar']
        self.keep_temp = 0
        self.dist_dir = None

        self.archive_files = None
        self.metadata_check = 1
        self.owner = None
        self.group = None

    def finalize_options(self):
        if self.manifest is None:
            self.manifest = "MANIFEST"
        if self.template is None:
            self.template = "MANIFEST.in"

        self.ensure_string_list('formats')

        bad_format = archive_util.check_archive_formats(self.formats)
        if bad_format:
            raise DistutilsOptionError("unknown archive format '%s'" % bad_format)

        if self.dist_dir is None:
            self.dist_dir = "dist"

    def run(self):
        # 'filelist' contains the list of files that will make up the
        # manifest
        self.filelist = FileList()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        # Do whatever it takes to get the list of files to process
        # (process the manifest template, read an existing manifest,
        # whatever).  File list is accumulated in 'self.filelist'.
        self.get_file_list()

        # If user just wanted us to regenerate the manifest, stop now.
        if self.manifest_only:
            return

        # Otherwise, go ahead and create the source distribution tarball,
        # or zipfile, or whatever.
        self.make_distribution()

    def check_metadata(self):
        """Deprecated API."""
        warn(
            "distutils.command.sdist.check_metadata is deprecated, \
              use the check command instead",
            PendingDeprecationWarning,
        )
        check = self.distribution.get_command_obj('check')
        check.ensure_finalized()
        check.run()

    def get_file_list(self):
        """Figure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        """
        # new behavior when using a template:
        # the file list is recalculated every time because
        # even if MANIFEST.in or setup.py are not changed
        # the user might have added some files in the tree that
        # need to be included.
        #
        #  This makes --force the default and only behavior with templates.
        template_exists = os.path.isfile(self.template)
        if not template_exists and self._manifest_is_not_generated():
            self.read_manifest()
            self.filelist.sort()
            self.filelist.remove_duplicates()
            return

        if not template_exists:
            self.warn(
                ("manifest template '%s' does not exist " + "(using default file list)")
                % self.template
            )
        self.filelist.findall()

        if self.use_defaults:
            self.add_defaults()

        if template_exists:
            self.read_template()

        if self.prune:
            self.prune_file_list()

        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest()

    def add_defaults(self):
        """Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - tests/test*.py and test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        """
        self._add_defaults_standards()
        self._add_defaults_optional()
        self._add_defaults_python()
        self._add_defaults_data_files()
        self._add_defaults_ext()
        self._add_defaults_c_libs()
        self._add_defaults_scripts()

    @staticmethod
    def _cs_path_exists(fspath):
        """
        Case-sensitive path existence check

        >>> sdist._cs_path_exists(__file__)
        True
        >>> sdist._cs_path_exists(__file__.upper())
        False
        """
        if not os.path.exists(fspath):
            return False
        # make absolute so we always have a directory
        abspath = os.path.abspath(fspath)
        directory, filename = os.path.split(abspath)
        return filename in os.listdir(directory)

    def _add_defaults_standards(self):
        standards = [self.READMES, self.distribution.script_name]
        for fn in standards:
            if isinstance(fn, tuple):
                alts = fn
                got_it = False
                for fn in alts:
                    if self._cs_path_exists(fn):
                        got_it = True
                        self.filelist.append(fn)
                        break

                if not got_it:
                    self.warn(
                        "standard file not found: should have one of " + ', '.join(alts)
                    )
            else:
                if self._cs_path_exists(fn):
                    self.filelist.append(fn)
                else:
                    self.warn("standard file '%s' not found" % fn)

    def _add_defaults_optional(self):
        optional = ['tests/test*.py', 'test/test*.py', 'setup.cfg']
        for pattern in optional:
            files = filter(os.path.isfile, glob(pattern))
            self.filelist.extend(files)

    def _add_defaults_python(self):
        # build_py is used to get:
        #  - python modules
        #  - files defined in package_data
        build_py = self.get_finalized_command('build_py')

        # getting python files
        if self.distribution.has_pure_modules():
            self.filelist.extend(build_py.get_source_files())

        # getting package_data files
        # (computed in build_py.data_files by build_py.finalize_options)
        for pkg, src_dir, build_dir, filenames in build_py.data_files:
            for filename in filenames:
                self.filelist.append(os.path.join(src_dir, filename))

    def _add_defaults_data_files(self):
        # getting distribution.data_files
        if self.distribution.has_data_files():
            for item in self.distribution.data_files:
                if isinstance(item, str):
                    # plain file
                    item = convert_path(item)
                    if os.path.isfile(item):
                        self.filelist.append(item)
                else:
                    # a (dirname, filenames) tuple
                    dirname, filenames = item
                    for f in filenames:
                        f = convert_path(f)
                        if os.path.isfile(f):
                            self.filelist.append(f)

    def _add_defaults_ext(self):
        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            self.filelist.extend(build_ext.get_source_files())

    def _add_defaults_c_libs(self):
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.filelist.extend(build_clib.get_source_files())

    def _add_defaults_scripts(self):
        if self.distribution.has_scripts():
            build_scripts = self.get_finalized_command('build_scripts')
            self.filelist.extend(build_scripts.get_source_files())

    def read_template(self):
        """Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        """
        log.info("reading manifest template '%s'", self.template)
        template = TextFile(
            self.template,
            strip_comments=1,
            skip_blanks=1,
            join_lines=1,
            lstrip_ws=1,
            rstrip_ws=1,
            collapse_join=1,
        )

        try:
            while True:
                line = template.readline()
                if line is None:  # end of file
                    break

                try:
                    self.filelist.process_template_line(line)
                # the call above can raise a DistutilsTemplateError for
                # malformed lines, or a ValueError from the lower-level
                # convert_path function
                except (DistutilsTemplateError, ValueError) as msg:
                    self.warn(
                        "%s, line %d: %s"
                        % (template.filename, template.current_line, msg)
                    )
        finally:
            template.close()

    def prune_file_list(self):
        """Prune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        """
        build = self.get_finalized_command('build')
        base_dir = self.distribution.get_fullname()

        self.filelist.exclude_pattern(None, prefix=build.build_base)
        self.filelist.exclude_pattern(None, prefix=base_dir)

        if sys.platform == 'win32':
            seps = r'/|\\'
        else:
            seps = '/'

        vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr', '_darcs']
        vcs_ptrn = r'(^|{})({})({}).*'.format(seps, '|'.join(vcs_dirs), seps)
        self.filelist.exclude_pattern(vcs_ptrn, is_regex=1)

    def write_manifest(self):
        """Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        """
        if self._manifest_is_not_generated():
            log.info(
                "not writing to manually maintained "
                "manifest file '%s'" % self.manifest
            )
            return

        content = self.filelist.files[:]
        content.insert(0, '# file GENERATED by distutils, do NOT edit')
        self.execute(
            file_util.write_file,
            (self.manifest, content),
            "writing manifest file '%s'" % self.manifest,
        )

    def _manifest_is_not_generated(self):
        # check for special comment used in 3.1.3 and higher
        if not os.path.isfile(self.manifest):
            return False

        fp = open(self.manifest)
        try:
            first_line = fp.readline()
        finally:
            fp.close()
        return first_line != '# file GENERATED by distutils, do NOT edit\n'

    def read_manifest(self):
        """Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        """
        log.info("reading manifest file '%s'", self.manifest)
        with open(self.manifest) as manifest:
            for line in manifest:
                # ignore comments and blank lines
                line = line.strip()
                if line.startswith('#') or not line:
                    continue
                self.filelist.append(line)

    def make_release_tree(self, base_dir, files):
        """Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        """
        # Create all the directories under 'base_dir' necessary to
        # put 'files' there; the 'mkpath()' is just so we don't die
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)

        # And walk over the list of files, either making a hard link (if
        # os.link exists) to each one that doesn't already exist in its
        # corresponding location under 'base_dir', or copying each file
        # that's out-of-date in 'base_dir'.  (Usually, all files will be
        # out-of-date, because by default we blow away 'base_dir' when
        # we're done making the distribution archives.)

        if hasattr(os, 'link'):  # can make hard links on this system
            link = 'hard'
            msg = "making hard links in %s..." % base_dir
        else:  # nope, have to copy
            link = None
            msg = "copying files to %s..." % base_dir

        if not files:
            log.warning("no files to distribute -- empty manifest?")
        else:
            log.info(msg)
        for file in files:
            if not os.path.isfile(file):
                log.warning("'%s' not a regular file -- skipping", file)
            else:
                dest = os.path.join(base_dir, file)
                self.copy_file(file, dest, link=link)

        self.distribution.metadata.write_pkg_info(base_dir)

    def make_distribution(self):
        """Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        """
        # Don't warn about missing meta-data here -- should be (and is!)
        # done elsewhere.
        base_dir = self.distribution.get_fullname()
        base_name = os.path.join(self.dist_dir, base_dir)

        self.make_release_tree(base_dir, self.filelist.files)
        archive_files = []  # remember names of files we create
        # tar archive must be created last to avoid overwrite and remove
        if 'tar' in self.formats:
            self.formats.append(self.formats.pop(self.formats.index('tar')))

        for fmt in self.formats:
            file = self.make_archive(
                base_name, fmt, base_dir=base_dir, owner=self.owner, group=self.group
            )
            archive_files.append(file)
            self.distribution.dist_files.append(('sdist', '', file))

        self.archive_files = archive_files

        if not self.keep_temp:
            dir_util.remove_tree(base_dir, dry_run=self.dry_run)

    def get_archive_files(self):
        """Return the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        """
        return self.archive_files
python3.12/site-packages/setuptools/_distutils/command/check.py000064400000011410151732703620020565 0ustar00"""distutils.command.check

Implements the Distutils 'check' command.
"""
import contextlib

from ..core import Command
from ..errors import DistutilsSetupError

with contextlib.suppress(ImportError):
    import docutils.utils
    import docutils.parsers.rst
    import docutils.frontend
    import docutils.nodes

    class SilentReporter(docutils.utils.Reporter):
        def __init__(
            self,
            source,
            report_level,
            halt_level,
            stream=None,
            debug=0,
            encoding='ascii',
            error_handler='replace',
        ):
            self.messages = []
            super().__init__(
                source, report_level, halt_level, stream, debug, encoding, error_handler
            )

        def system_message(self, level, message, *children, **kwargs):
            self.messages.append((level, message, children, kwargs))
            return docutils.nodes.system_message(
                message, level=level, type=self.levels[level], *children, **kwargs
            )


class check(Command):
    """This command checks the meta-data of the package."""

    description = "perform some checks on the package"
    user_options = [
        ('metadata', 'm', 'Verify meta-data'),
        (
            'restructuredtext',
            'r',
            (
                'Checks if long string meta-data syntax '
                'are reStructuredText-compliant'
            ),
        ),
        ('strict', 's', 'Will exit with an error if a check fails'),
    ]

    boolean_options = ['metadata', 'restructuredtext', 'strict']

    def initialize_options(self):
        """Sets default values for options."""
        self.restructuredtext = 0
        self.metadata = 1
        self.strict = 0
        self._warnings = 0

    def finalize_options(self):
        pass

    def warn(self, msg):
        """Counts the number of warnings that occurs."""
        self._warnings += 1
        return Command.warn(self, msg)

    def run(self):
        """Runs the command."""
        # perform the various tests
        if self.metadata:
            self.check_metadata()
        if self.restructuredtext:
            if 'docutils' in globals():
                try:
                    self.check_restructuredtext()
                except TypeError as exc:
                    raise DistutilsSetupError(str(exc))
            elif self.strict:
                raise DistutilsSetupError('The docutils package is needed.')

        # let's raise an error in strict mode, if we have at least
        # one warning
        if self.strict and self._warnings > 0:
            raise DistutilsSetupError('Please correct your package.')

    def check_metadata(self):
        """Ensures that all required elements of meta-data are supplied.

        Required fields:
            name, version

        Warns if any are missing.
        """
        metadata = self.distribution.metadata

        missing = []
        for attr in 'name', 'version':
            if not getattr(metadata, attr, None):
                missing.append(attr)

        if missing:
            self.warn("missing required meta-data: %s" % ', '.join(missing))

    def check_restructuredtext(self):
        """Checks if the long string fields are reST-compliant."""
        data = self.distribution.get_long_description()
        for warning in self._check_rst_data(data):
            line = warning[-1].get('line')
            if line is None:
                warning = warning[1]
            else:
                warning = '{} (line {})'.format(warning[1], line)
            self.warn(warning)

    def _check_rst_data(self, data):
        """Returns warnings when the provided data doesn't compile."""
        # the include and csv_table directives need this to be a path
        source_path = self.distribution.script_name or 'setup.py'
        parser = docutils.parsers.rst.Parser()
        settings = docutils.frontend.OptionParser(
            components=(docutils.parsers.rst.Parser,)
        ).get_default_values()
        settings.tab_width = 4
        settings.pep_references = None
        settings.rfc_references = None
        reporter = SilentReporter(
            source_path,
            settings.report_level,
            settings.halt_level,
            stream=settings.warning_stream,
            debug=settings.debug,
            encoding=settings.error_encoding,
            error_handler=settings.error_encoding_error_handler,
        )

        document = docutils.nodes.document(settings, reporter, source=source_path)
        document.note_source(source_path, -1)
        try:
            parser.parse(data, document)
        except AttributeError as e:
            reporter.messages.append(
                (-1, 'Could not finish the parsing: %s.' % e, '', {})
            )

        return reporter.messages
python3.12/site-packages/setuptools/_distutils/command/build.py000064400000012720151732703620020614 0ustar00"""distutils.command.build

Implements the Distutils 'build' command."""

import sys
import os
from ..core import Command
from ..errors import DistutilsOptionError
from ..util import get_platform


def show_compilers():
    from ..ccompiler import show_compilers

    show_compilers()


class build(Command):
    description = "build everything needed to install"

    user_options = [
        ('build-base=', 'b', "base directory for build library"),
        ('build-purelib=', None, "build directory for platform-neutral distributions"),
        ('build-platlib=', None, "build directory for platform-specific distributions"),
        (
            'build-lib=',
            None,
            "build directory for all distribution (defaults to either "
            + "build-purelib or build-platlib",
        ),
        ('build-scripts=', None, "build directory for scripts"),
        ('build-temp=', 't', "temporary build directory"),
        (
            'plat-name=',
            'p',
            "platform name to build for, if supported "
            "(default: %s)" % get_platform(),
        ),
        ('compiler=', 'c', "specify the compiler type"),
        ('parallel=', 'j', "number of parallel build jobs"),
        ('debug', 'g', "compile extensions and libraries with debugging information"),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
        ('executable=', 'e', "specify final destination interpreter path (build.py)"),
    ]

    boolean_options = ['debug', 'force']

    help_options = [
        ('help-compiler', None, "list available compilers", show_compilers),
    ]

    def initialize_options(self):
        self.build_base = 'build'
        # these are decided only after 'build_base' has its final value
        # (unless overridden by the user or client)
        self.build_purelib = None
        self.build_platlib = None
        self.build_lib = None
        self.build_temp = None
        self.build_scripts = None
        self.compiler = None
        self.plat_name = None
        self.debug = None
        self.force = 0
        self.executable = None
        self.parallel = None

    def finalize_options(self):  # noqa: C901
        if self.plat_name is None:
            self.plat_name = get_platform()
        else:
            # plat-name only supported for windows (other platforms are
            # supported via ./configure flags, if at all).  Avoid misleading
            # other platforms.
            if os.name != 'nt':
                raise DistutilsOptionError(
                    "--plat-name only supported on Windows (try "
                    "using './configure --help' on your platform)"
                )

        plat_specifier = ".{}-{}".format(self.plat_name, sys.implementation.cache_tag)

        # Make it so Python 2.x and Python 2.x with --with-pydebug don't
        # share the same build directories. Doing so confuses the build
        # process for C modules
        if hasattr(sys, 'gettotalrefcount'):
            plat_specifier += '-pydebug'

        # 'build_purelib' and 'build_platlib' just default to 'lib' and
        # 'lib.<plat>' under the base build directory.  We only use one of
        # them for a given distribution, though --
        if self.build_purelib is None:
            self.build_purelib = os.path.join(self.build_base, 'lib')
        if self.build_platlib is None:
            self.build_platlib = os.path.join(self.build_base, 'lib' + plat_specifier)

        # 'build_lib' is the actual directory that we will use for this
        # particular module distribution -- if user didn't supply it, pick
        # one of 'build_purelib' or 'build_platlib'.
        if self.build_lib is None:
            if self.distribution.has_ext_modules():
                self.build_lib = self.build_platlib
            else:
                self.build_lib = self.build_purelib

        # 'build_temp' -- temporary directory for compiler turds,
        # "build/temp.<plat>"
        if self.build_temp is None:
            self.build_temp = os.path.join(self.build_base, 'temp' + plat_specifier)
        if self.build_scripts is None:
            self.build_scripts = os.path.join(
                self.build_base, 'scripts-%d.%d' % sys.version_info[:2]
            )

        if self.executable is None and sys.executable:
            self.executable = os.path.normpath(sys.executable)

        if isinstance(self.parallel, str):
            try:
                self.parallel = int(self.parallel)
            except ValueError:
                raise DistutilsOptionError("parallel should be an integer")

    def run(self):
        # Run all relevant sub-commands.  This will be some subset of:
        #  - build_py      - pure Python modules
        #  - build_clib    - standalone C libraries
        #  - build_ext     - Python extensions
        #  - build_scripts - (Python) scripts
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

    # -- Predicates for the sub-command list ---------------------------

    def has_pure_modules(self):
        return self.distribution.has_pure_modules()

    def has_c_libraries(self):
        return self.distribution.has_c_libraries()

    def has_ext_modules(self):
        return self.distribution.has_ext_modules()

    def has_scripts(self):
        return self.distribution.has_scripts()

    sub_commands = [
        ('build_py', has_pure_modules),
        ('build_clib', has_c_libraries),
        ('build_ext', has_ext_modules),
        ('build_scripts', has_scripts),
    ]
python3.12/site-packages/setuptools/_distutils/command/install_headers.py000064400000002234151732703620022655 0ustar00"""distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory."""

from ..core import Command


# XXX force is never used
class install_headers(Command):
    description = "install C/C++ header files"

    user_options = [
        ('install-dir=', 'd', "directory to install header files to"),
        ('force', 'f', "force installation (overwrite existing files)"),
    ]

    boolean_options = ['force']

    def initialize_options(self):
        self.install_dir = None
        self.force = 0
        self.outfiles = []

    def finalize_options(self):
        self.set_undefined_options(
            'install', ('install_headers', 'install_dir'), ('force', 'force')
        )

    def run(self):
        headers = self.distribution.headers
        if not headers:
            return

        self.mkpath(self.install_dir)
        for header in headers:
            (out, _) = self.copy_file(header, self.install_dir)
            self.outfiles.append(out)

    def get_inputs(self):
        return self.distribution.headers or []

    def get_outputs(self):
        return self.outfiles
python3.12/site-packages/setuptools/_distutils/command/bdist.py000064400000012440151732703620020621 0ustar00"""distutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution)."""

import os
import warnings

from ..core import Command
from ..errors import DistutilsPlatformError, DistutilsOptionError
from ..util import get_platform


def show_formats():
    """Print list of available formats (arguments to "--format" option)."""
    from ..fancy_getopt import FancyGetopt

    formats = []
    for format in bdist.format_commands:
        formats.append(("formats=" + format, None, bdist.format_commands[format][1]))
    pretty_printer = FancyGetopt(formats)
    pretty_printer.print_help("List of available distribution formats:")


class ListCompat(dict):
    # adapter to allow for Setuptools compatibility in format_commands
    def append(self, item):
        warnings.warn(
            """format_commands is now a dict. append is deprecated.""",
            DeprecationWarning,
            stacklevel=2,
        )


class bdist(Command):
    description = "create a built (binary) distribution"

    user_options = [
        ('bdist-base=', 'b', "temporary directory for creating built distributions"),
        (
            'plat-name=',
            'p',
            "platform name to embed in generated filenames "
            "(default: %s)" % get_platform(),
        ),
        ('formats=', None, "formats for distribution (comma-separated list)"),
        (
            'dist-dir=',
            'd',
            "directory to put final built distributions in " "[default: dist]",
        ),
        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
        (
            'owner=',
            'u',
            "Owner name used when creating a tar file" " [default: current user]",
        ),
        (
            'group=',
            'g',
            "Group name used when creating a tar file" " [default: current group]",
        ),
    ]

    boolean_options = ['skip-build']

    help_options = [
        ('help-formats', None, "lists available distribution formats", show_formats),
    ]

    # The following commands do not take a format option from bdist
    no_format_option = ('bdist_rpm',)

    # This won't do in reality: will need to distinguish RPM-ish Linux,
    # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS.
    default_format = {'posix': 'gztar', 'nt': 'zip'}

    # Define commands in preferred order for the --help-formats option
    format_commands = ListCompat(
        {
            'rpm': ('bdist_rpm', "RPM distribution"),
            'gztar': ('bdist_dumb', "gzip'ed tar file"),
            'bztar': ('bdist_dumb', "bzip2'ed tar file"),
            'xztar': ('bdist_dumb', "xz'ed tar file"),
            'ztar': ('bdist_dumb', "compressed tar file"),
            'tar': ('bdist_dumb', "tar file"),
            'zip': ('bdist_dumb', "ZIP file"),
        }
    )

    # for compatibility until consumers only reference format_commands
    format_command = format_commands

    def initialize_options(self):
        self.bdist_base = None
        self.plat_name = None
        self.formats = None
        self.dist_dir = None
        self.skip_build = 0
        self.group = None
        self.owner = None

    def finalize_options(self):
        # have to finalize 'plat_name' before 'bdist_base'
        if self.plat_name is None:
            if self.skip_build:
                self.plat_name = get_platform()
            else:
                self.plat_name = self.get_finalized_command('build').plat_name

        # 'bdist_base' -- parent of per-built-distribution-format
        # temporary directories (eg. we'll probably have
        # "build/bdist.<plat>/dumb", "build/bdist.<plat>/rpm", etc.)
        if self.bdist_base is None:
            build_base = self.get_finalized_command('build').build_base
            self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name)

        self.ensure_string_list('formats')
        if self.formats is None:
            try:
                self.formats = [self.default_format[os.name]]
            except KeyError:
                raise DistutilsPlatformError(
                    "don't know how to create built distributions "
                    "on platform %s" % os.name
                )

        if self.dist_dir is None:
            self.dist_dir = "dist"

    def run(self):
        # Figure out which sub-commands we need to run.
        commands = []
        for format in self.formats:
            try:
                commands.append(self.format_commands[format][0])
            except KeyError:
                raise DistutilsOptionError("invalid format '%s'" % format)

        # Reinitialize and run each command.
        for i in range(len(self.formats)):
            cmd_name = commands[i]
            sub_cmd = self.reinitialize_command(cmd_name)
            if cmd_name not in self.no_format_option:
                sub_cmd.format = self.formats[i]

            # passing the owner and group names for tar archiving
            if cmd_name == 'bdist_dumb':
                sub_cmd.owner = self.owner
                sub_cmd.group = self.group

            # If we're going to need to run this command again, tell it to
            # keep its temporary files around so subsequent runs go faster.
            if cmd_name in commands[i + 1 :]:
                sub_cmd.keep_temp = 1
            self.run_command(cmd_name)
python3.12/site-packages/setuptools/_distutils/command/config.py000064400000031425151732703620020765 0ustar00"""distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
"""

import os
import re

from ..core import Command
from ..errors import DistutilsExecError
from ..sysconfig import customize_compiler
from distutils._log import log

LANG_EXT = {"c": ".c", "c++": ".cxx"}


class config(Command):
    description = "prepare to build"

    user_options = [
        ('compiler=', None, "specify the compiler type"),
        ('cc=', None, "specify the compiler executable"),
        ('include-dirs=', 'I', "list of directories to search for header files"),
        ('define=', 'D', "C preprocessor macros to define"),
        ('undef=', 'U', "C preprocessor macros to undefine"),
        ('libraries=', 'l', "external C libraries to link with"),
        ('library-dirs=', 'L', "directories to search for external C libraries"),
        ('noisy', None, "show every action (compile, link, run, ...) taken"),
        (
            'dump-source',
            None,
            "dump generated source files before attempting to compile them",
        ),
    ]

    # The three standard command methods: since the "config" command
    # does nothing by default, these are empty.

    def initialize_options(self):
        self.compiler = None
        self.cc = None
        self.include_dirs = None
        self.libraries = None
        self.library_dirs = None

        # maximal output for now
        self.noisy = 1
        self.dump_source = 1

        # list of temporary files generated along-the-way that we have
        # to clean at some point
        self.temp_files = []

    def finalize_options(self):
        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        elif isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        if self.libraries is None:
            self.libraries = []
        elif isinstance(self.libraries, str):
            self.libraries = [self.libraries]

        if self.library_dirs is None:
            self.library_dirs = []
        elif isinstance(self.library_dirs, str):
            self.library_dirs = self.library_dirs.split(os.pathsep)

    def run(self):
        pass

    # Utility methods for actual "config" commands.  The interfaces are
    # loosely based on Autoconf macros of similar names.  Sub-classes
    # may use these freely.

    def _check_compiler(self):
        """Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        """
        # We do this late, and only on-demand, because this is an expensive
        # import.
        from ..ccompiler import CCompiler, new_compiler

        if not isinstance(self.compiler, CCompiler):
            self.compiler = new_compiler(
                compiler=self.compiler, dry_run=self.dry_run, force=1
            )
            customize_compiler(self.compiler)
            if self.include_dirs:
                self.compiler.set_include_dirs(self.include_dirs)
            if self.libraries:
                self.compiler.set_libraries(self.libraries)
            if self.library_dirs:
                self.compiler.set_library_dirs(self.library_dirs)

    def _gen_temp_sourcefile(self, body, headers, lang):
        filename = "_configtest" + LANG_EXT[lang]
        with open(filename, "w") as file:
            if headers:
                for header in headers:
                    file.write("#include <%s>\n" % header)
                file.write("\n")
            file.write(body)
            if body[-1] != "\n":
                file.write("\n")
        return filename

    def _preprocess(self, body, headers, include_dirs, lang):
        src = self._gen_temp_sourcefile(body, headers, lang)
        out = "_configtest.i"
        self.temp_files.extend([src, out])
        self.compiler.preprocess(src, out, include_dirs=include_dirs)
        return (src, out)

    def _compile(self, body, headers, include_dirs, lang):
        src = self._gen_temp_sourcefile(body, headers, lang)
        if self.dump_source:
            dump_file(src, "compiling '%s':" % src)
        (obj,) = self.compiler.object_filenames([src])
        self.temp_files.extend([src, obj])
        self.compiler.compile([src], include_dirs=include_dirs)
        return (src, obj)

    def _link(self, body, headers, include_dirs, libraries, library_dirs, lang):
        (src, obj) = self._compile(body, headers, include_dirs, lang)
        prog = os.path.splitext(os.path.basename(src))[0]
        self.compiler.link_executable(
            [obj],
            prog,
            libraries=libraries,
            library_dirs=library_dirs,
            target_lang=lang,
        )

        if self.compiler.exe_extension is not None:
            prog = prog + self.compiler.exe_extension
        self.temp_files.append(prog)

        return (src, obj, prog)

    def _clean(self, *filenames):
        if not filenames:
            filenames = self.temp_files
            self.temp_files = []
        log.info("removing: %s", ' '.join(filenames))
        for filename in filenames:
            try:
                os.remove(filename)
            except OSError:
                pass

    # XXX these ignore the dry-run flag: what to do, what to do? even if
    # you want a dry-run build, you still need some sort of configuration
    # info.  My inclination is to make it up to the real config command to
    # consult 'dry_run', and assume a default (minimal) configuration if
    # true.  The problem with trying to do it here is that you'd have to
    # return either true or false from all the 'try' methods, neither of
    # which is correct.

    # XXX need access to the header search path and maybe default macros.

    def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"):
        """Construct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        """
        from ..ccompiler import CompileError

        self._check_compiler()
        ok = True
        try:
            self._preprocess(body, headers, include_dirs, lang)
        except CompileError:
            ok = False

        self._clean()
        return ok

    def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, lang="c"):
        """Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        """
        self._check_compiler()
        src, out = self._preprocess(body, headers, include_dirs, lang)

        if isinstance(pattern, str):
            pattern = re.compile(pattern)

        with open(out) as file:
            match = False
            while True:
                line = file.readline()
                if line == '':
                    break
                if pattern.search(line):
                    match = True
                    break

        self._clean()
        return match

    def try_compile(self, body, headers=None, include_dirs=None, lang="c"):
        """Try to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        """
        from ..ccompiler import CompileError

        self._check_compiler()
        try:
            self._compile(body, headers, include_dirs, lang)
            ok = True
        except CompileError:
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok

    def try_link(
        self,
        body,
        headers=None,
        include_dirs=None,
        libraries=None,
        library_dirs=None,
        lang="c",
    ):
        """Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        """
        from ..ccompiler import CompileError, LinkError

        self._check_compiler()
        try:
            self._link(body, headers, include_dirs, libraries, library_dirs, lang)
            ok = True
        except (CompileError, LinkError):
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok

    def try_run(
        self,
        body,
        headers=None,
        include_dirs=None,
        libraries=None,
        library_dirs=None,
        lang="c",
    ):
        """Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        """
        from ..ccompiler import CompileError, LinkError

        self._check_compiler()
        try:
            src, obj, exe = self._link(
                body, headers, include_dirs, libraries, library_dirs, lang
            )
            self.spawn([exe])
            ok = True
        except (CompileError, LinkError, DistutilsExecError):
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok

    # -- High-level methods --------------------------------------------
    # (these are the ones that are actually likely to be useful
    # when implementing a real-world config command!)

    def check_func(
        self,
        func,
        headers=None,
        include_dirs=None,
        libraries=None,
        library_dirs=None,
        decl=0,
        call=0,
    ):
        """Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        """
        self._check_compiler()
        body = []
        if decl:
            body.append("int %s ();" % func)
        body.append("int main () {")
        if call:
            body.append("  %s();" % func)
        else:
            body.append("  %s;" % func)
        body.append("}")
        body = "\n".join(body) + "\n"

        return self.try_link(body, headers, include_dirs, libraries, library_dirs)

    def check_lib(
        self,
        library,
        library_dirs=None,
        headers=None,
        include_dirs=None,
        other_libraries=[],
    ):
        """Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        """
        self._check_compiler()
        return self.try_link(
            "int main (void) { }",
            headers,
            include_dirs,
            [library] + other_libraries,
            library_dirs,
        )

    def check_header(self, header, include_dirs=None, library_dirs=None, lang="c"):
        """Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        """
        return self.try_cpp(
            body="/* No body */", headers=[header], include_dirs=include_dirs
        )


def dump_file(filename, head=None):
    """Dumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    """
    if head is None:
        log.info('%s', filename)
    else:
        log.info(head)
    file = open(filename)
    try:
        log.info(file.read())
    finally:
        file.close()
python3.12/site-packages/setuptools/_distutils/command/install.py000064400000072711151732703620021171 0ustar00"""distutils.command.install

Implements the Distutils 'install' command."""

import sys
import os
import contextlib
import sysconfig
import itertools

from distutils._log import log
from ..core import Command
from ..debug import DEBUG
from ..sysconfig import get_config_vars
from ..file_util import write_file
from ..util import convert_path, subst_vars, change_root
from ..util import get_platform
from ..errors import DistutilsOptionError, DistutilsPlatformError
from . import _framework_compat as fw
from .. import _collections

from site import USER_BASE
from site import USER_SITE

HAS_USER_SITE = True

WINDOWS_SCHEME = {
    'purelib': '{base}/Lib/site-packages',
    'platlib': '{base}/Lib/site-packages',
    'headers': '{base}/Include/{dist_name}',
    'scripts': '{base}/Scripts',
    'data': '{base}',
}

INSTALL_SCHEMES = {
    'posix_prefix': {
        'purelib': '{base}/lib/{implementation_lower}{py_version_short}/site-packages',
        'platlib': '{platbase}/{platlibdir}/{implementation_lower}'
        '{py_version_short}/site-packages',
        'headers': '{base}/include/{implementation_lower}'
        '{py_version_short}{abiflags}/{dist_name}',
        'scripts': '{base}/bin',
        'data': '{base}',
    },
    'posix_home': {
        'purelib': '{base}/lib/{implementation_lower}',
        'platlib': '{base}/{platlibdir}/{implementation_lower}',
        'headers': '{base}/include/{implementation_lower}/{dist_name}',
        'scripts': '{base}/bin',
        'data': '{base}',
    },
    'nt': WINDOWS_SCHEME,
    'pypy': {
        'purelib': '{base}/site-packages',
        'platlib': '{base}/site-packages',
        'headers': '{base}/include/{dist_name}',
        'scripts': '{base}/bin',
        'data': '{base}',
    },
    'pypy_nt': {
        'purelib': '{base}/site-packages',
        'platlib': '{base}/site-packages',
        'headers': '{base}/include/{dist_name}',
        'scripts': '{base}/Scripts',
        'data': '{base}',
    },
}

# user site schemes
if HAS_USER_SITE:
    INSTALL_SCHEMES['nt_user'] = {
        'purelib': '{usersite}',
        'platlib': '{usersite}',
        'headers': '{userbase}/{implementation}{py_version_nodot_plat}'
        '/Include/{dist_name}',
        'scripts': '{userbase}/{implementation}{py_version_nodot_plat}/Scripts',
        'data': '{userbase}',
    }

    INSTALL_SCHEMES['posix_user'] = {
        'purelib': '{usersite}',
        'platlib': '{usersite}',
        'headers': '{userbase}/include/{implementation_lower}'
        '{py_version_short}{abiflags}/{dist_name}',
        'scripts': '{userbase}/bin',
        'data': '{userbase}',
    }


INSTALL_SCHEMES.update(fw.schemes)


# The keys to an installation scheme; if any new types of files are to be
# installed, be sure to add an entry to every installation scheme above,
# and to SCHEME_KEYS here.
SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data')


def _load_sysconfig_schemes():
    with contextlib.suppress(AttributeError):
        return {
            scheme: sysconfig.get_paths(scheme, expand=False)
            for scheme in sysconfig.get_scheme_names()
        }


def _load_schemes():
    """
    Extend default schemes with schemes from sysconfig.
    """

    sysconfig_schemes = _load_sysconfig_schemes() or {}

    return {
        scheme: {
            **INSTALL_SCHEMES.get(scheme, {}),
            **sysconfig_schemes.get(scheme, {}),
        }
        for scheme in set(itertools.chain(INSTALL_SCHEMES, sysconfig_schemes))
    }


def _get_implementation():
    if hasattr(sys, 'pypy_version_info'):
        return 'PyPy'
    else:
        return 'Python'


def _select_scheme(ob, name):
    scheme = _inject_headers(name, _load_scheme(_resolve_scheme(name)))
    vars(ob).update(_remove_set(ob, _scheme_attrs(scheme)))


def _remove_set(ob, attrs):
    """
    Include only attrs that are None in ob.
    """
    return {key: value for key, value in attrs.items() if getattr(ob, key) is None}


def _resolve_scheme(name):
    os_name, sep, key = name.partition('_')
    try:
        resolved = sysconfig.get_preferred_scheme(key)
    except Exception:
        resolved = fw.scheme(_pypy_hack(name))
    return resolved


def _load_scheme(name):
    return _load_schemes()[name]


def _inject_headers(name, scheme):
    """
    Given a scheme name and the resolved scheme,
    if the scheme does not include headers, resolve
    the fallback scheme for the name and use headers
    from it. pypa/distutils#88
    """
    # Bypass the preferred scheme, which may not
    # have defined headers.
    fallback = _load_scheme(_pypy_hack(name))
    scheme.setdefault('headers', fallback['headers'])
    return scheme


def _scheme_attrs(scheme):
    """Resolve install directories by applying the install schemes."""
    return {f'install_{key}': scheme[key] for key in SCHEME_KEYS}


def _pypy_hack(name):
    PY37 = sys.version_info < (3, 8)
    old_pypy = hasattr(sys, 'pypy_version_info') and PY37
    prefix = not name.endswith(('_user', '_home'))
    pypy_name = 'pypy' + '_nt' * (os.name == 'nt')
    return pypy_name if old_pypy and prefix else name


class install(Command):
    description = "install everything from build directory"

    user_options = [
        # Select installation scheme and set base director(y|ies)
        ('prefix=', None, "installation prefix"),
        ('exec-prefix=', None, "(Unix only) prefix for platform-specific files"),
        ('home=', None, "(Unix only) home directory to install under"),
        # Or, just set the base director(y|ies)
        (
            'install-base=',
            None,
            "base installation directory (instead of --prefix or --home)",
        ),
        (
            'install-platbase=',
            None,
            "base installation directory for platform-specific files "
            + "(instead of --exec-prefix or --home)",
        ),
        ('root=', None, "install everything relative to this alternate root directory"),
        # Or, explicitly set the installation scheme
        (
            'install-purelib=',
            None,
            "installation directory for pure Python module distributions",
        ),
        (
            'install-platlib=',
            None,
            "installation directory for non-pure module distributions",
        ),
        (
            'install-lib=',
            None,
            "installation directory for all module distributions "
            + "(overrides --install-purelib and --install-platlib)",
        ),
        ('install-headers=', None, "installation directory for C/C++ headers"),
        ('install-scripts=', None, "installation directory for Python scripts"),
        ('install-data=', None, "installation directory for data files"),
        # Byte-compilation options -- see install_lib.py for details, as
        # these are duplicated from there (but only install_lib does
        # anything with them).
        ('compile', 'c', "compile .py to .pyc [default]"),
        ('no-compile', None, "don't compile .py files"),
        (
            'optimize=',
            'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
        ),
        # Miscellaneous control options
        ('force', 'f', "force installation (overwrite any existing files)"),
        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
        # Where to install documentation (eventually!)
        # ('doc-format=', None, "format of documentation to generate"),
        # ('install-man=', None, "directory for Unix man pages"),
        # ('install-html=', None, "directory for HTML documentation"),
        # ('install-info=', None, "directory for GNU info files"),
        ('record=', None, "filename in which to record list of installed files"),
    ]

    boolean_options = ['compile', 'force', 'skip-build']

    if HAS_USER_SITE:
        user_options.append(
            ('user', None, "install in user site-package '%s'" % USER_SITE)
        )
        boolean_options.append('user')

    negative_opt = {'no-compile': 'compile'}

    def initialize_options(self):
        """Initializes options."""
        # High-level options: these select both an installation base
        # and scheme.
        self.prefix = None
        self.exec_prefix = None
        self.home = None
        self.user = 0

        # These select only the installation base; it's up to the user to
        # specify the installation scheme (currently, that means supplying
        # the --install-{platlib,purelib,scripts,data} options).
        self.install_base = None
        self.install_platbase = None
        self.root = None

        # These options are the actual installation directories; if not
        # supplied by the user, they are filled in using the installation
        # scheme implied by prefix/exec-prefix/home and the contents of
        # that installation scheme.
        self.install_purelib = None  # for pure module distributions
        self.install_platlib = None  # non-pure (dists w/ extensions)
        self.install_headers = None  # for C/C++ headers
        self.install_lib = None  # set to either purelib or platlib
        self.install_scripts = None
        self.install_data = None
        self.install_userbase = USER_BASE
        self.install_usersite = USER_SITE

        self.compile = None
        self.optimize = None

        # Deprecated
        # These two are for putting non-packagized distributions into their
        # own directory and creating a .pth file if it makes sense.
        # 'extra_path' comes from the setup file; 'install_path_file' can
        # be turned off if it makes no sense to install a .pth file.  (But
        # better to install it uselessly than to guess wrong and not
        # install it when it's necessary and would be used!)  Currently,
        # 'install_path_file' is always true unless some outsider meddles
        # with it.
        self.extra_path = None
        self.install_path_file = 1

        # 'force' forces installation, even if target files are not
        # out-of-date.  'skip_build' skips running the "build" command,
        # handy if you know it's not necessary.  'warn_dir' (which is *not*
        # a user option, it's just there so the bdist_* commands can turn
        # it off) determines whether we warn about installing to a
        # directory not in sys.path.
        self.force = 0
        self.skip_build = 0
        self.warn_dir = 1

        # These are only here as a conduit from the 'build' command to the
        # 'install_*' commands that do the real work.  ('build_base' isn't
        # actually used anywhere, but it might be useful in future.)  They
        # are not user options, because if the user told the install
        # command where the build directory is, that wouldn't affect the
        # build command.
        self.build_base = None
        self.build_lib = None

        # Not defined yet because we don't know anything about
        # documentation yet.
        # self.install_man = None
        # self.install_html = None
        # self.install_info = None

        self.record = None

    # -- Option finalizing methods -------------------------------------
    # (This is rather more involved than for most commands,
    # because this is where the policy for installing third-
    # party Python modules on various platforms given a wide
    # array of user input is decided.  Yes, it's quite complex!)

    def finalize_options(self):  # noqa: C901
        """Finalizes options."""
        # This method (and its helpers, like 'finalize_unix()',
        # 'finalize_other()', and 'select_scheme()') is where the default
        # installation directories for modules, extension modules, and
        # anything else we care to install from a Python module
        # distribution.  Thus, this code makes a pretty important policy
        # statement about how third-party stuff is added to a Python
        # installation!  Note that the actual work of installation is done
        # by the relatively simple 'install_*' commands; they just take
        # their orders from the installation directory options determined
        # here.

        # Check for errors/inconsistencies in the options; first, stuff
        # that's wrong on any platform.

        if (self.prefix or self.exec_prefix or self.home) and (
            self.install_base or self.install_platbase
        ):
            raise DistutilsOptionError(
                "must supply either prefix/exec-prefix/home or "
                + "install-base/install-platbase -- not both"
            )

        if self.home and (self.prefix or self.exec_prefix):
            raise DistutilsOptionError(
                "must supply either home or prefix/exec-prefix -- not both"
            )

        if self.user and (
            self.prefix
            or self.exec_prefix
            or self.home
            or self.install_base
            or self.install_platbase
        ):
            raise DistutilsOptionError(
                "can't combine user with prefix, "
                "exec_prefix/home, or install_(plat)base"
            )

        # Next, stuff that's wrong (or dubious) only on certain platforms.
        if os.name != "posix":
            if self.exec_prefix:
                self.warn("exec-prefix option ignored on this platform")
                self.exec_prefix = None

        # Now the interesting logic -- so interesting that we farm it out
        # to other methods.  The goal of these methods is to set the final
        # values for the install_{lib,scripts,data,...}  options, using as
        # input a heady brew of prefix, exec_prefix, home, install_base,
        # install_platbase, user-supplied versions of
        # install_{purelib,platlib,lib,scripts,data,...}, and the
        # install schemes.  Phew!

        self.dump_dirs("pre-finalize_{unix,other}")

        if os.name == 'posix':
            self.finalize_unix()
        else:
            self.finalize_other()

        self.dump_dirs("post-finalize_{unix,other}()")

        # Expand configuration variables, tilde, etc. in self.install_base
        # and self.install_platbase -- that way, we can use $base or
        # $platbase in the other installation directories and not worry
        # about needing recursive variable expansion (shudder).

        py_version = sys.version.split()[0]
        (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
        try:
            abiflags = sys.abiflags
        except AttributeError:
            # sys.abiflags may not be defined on all platforms.
            abiflags = ''
        local_vars = {
            'dist_name': self.distribution.get_name(),
            'dist_version': self.distribution.get_version(),
            'dist_fullname': self.distribution.get_fullname(),
            'py_version': py_version,
            'py_version_short': '%d.%d' % sys.version_info[:2],
            'py_version_nodot': '%d%d' % sys.version_info[:2],
            'sys_prefix': prefix,
            'prefix': prefix,
            'sys_exec_prefix': exec_prefix,
            'exec_prefix': exec_prefix,
            'abiflags': abiflags,
            'platlibdir': getattr(sys, 'platlibdir', 'lib'),
            'implementation_lower': _get_implementation().lower(),
            'implementation': _get_implementation(),
        }

        # vars for compatibility on older Pythons
        compat_vars = dict(
            # Python 3.9 and earlier
            py_version_nodot_plat=getattr(sys, 'winver', '').replace('.', ''),
        )

        if HAS_USER_SITE:
            local_vars['userbase'] = self.install_userbase
            local_vars['usersite'] = self.install_usersite

        self.config_vars = _collections.DictStack(
            [fw.vars(), compat_vars, sysconfig.get_config_vars(), local_vars]
        )

        self.expand_basedirs()

        self.dump_dirs("post-expand_basedirs()")

        # Now define config vars for the base directories so we can expand
        # everything else.
        local_vars['base'] = self.install_base
        local_vars['platbase'] = self.install_platbase

        if DEBUG:
            from pprint import pprint

            print("config vars:")
            pprint(dict(self.config_vars))

        # Expand "~" and configuration variables in the installation
        # directories.
        self.expand_dirs()

        self.dump_dirs("post-expand_dirs()")

        # Create directories in the home dir:
        if self.user:
            self.create_home_path()

        # Pick the actual directory to install all modules to: either
        # install_purelib or install_platlib, depending on whether this
        # module distribution is pure or not.  Of course, if the user
        # already specified install_lib, use their selection.
        if self.install_lib is None:
            if self.distribution.has_ext_modules():  # has extensions: non-pure
                self.install_lib = self.install_platlib
            else:
                self.install_lib = self.install_purelib

        # Convert directories from Unix /-separated syntax to the local
        # convention.
        self.convert_paths(
            'lib',
            'purelib',
            'platlib',
            'scripts',
            'data',
            'headers',
            'userbase',
            'usersite',
        )

        # Deprecated
        # Well, we're not actually fully completely finalized yet: we still
        # have to deal with 'extra_path', which is the hack for allowing
        # non-packagized module distributions (hello, Numerical Python!) to
        # get their own directories.
        self.handle_extra_path()
        self.install_libbase = self.install_lib  # needed for .pth file
        self.install_lib = os.path.join(self.install_lib, self.extra_dirs)

        # If a new root directory was supplied, make all the installation
        # dirs relative to it.
        if self.root is not None:
            self.change_roots(
                'libbase', 'lib', 'purelib', 'platlib', 'scripts', 'data', 'headers'
            )

        self.dump_dirs("after prepending root")

        # Find out the build directories, ie. where to install from.
        self.set_undefined_options(
            'build', ('build_base', 'build_base'), ('build_lib', 'build_lib')
        )

        # Punt on doc directories for now -- after all, we're punting on
        # documentation completely!

    def dump_dirs(self, msg):
        """Dumps the list of user options."""
        if not DEBUG:
            return
        from ..fancy_getopt import longopt_xlate

        log.debug(msg + ":")
        for opt in self.user_options:
            opt_name = opt[0]
            if opt_name[-1] == "=":
                opt_name = opt_name[0:-1]
            if opt_name in self.negative_opt:
                opt_name = self.negative_opt[opt_name]
                opt_name = opt_name.translate(longopt_xlate)
                val = not getattr(self, opt_name)
            else:
                opt_name = opt_name.translate(longopt_xlate)
                val = getattr(self, opt_name)
            log.debug("  %s: %s", opt_name, val)

    def finalize_unix(self):
        """Finalizes options for posix platforms."""
        if self.install_base is not None or self.install_platbase is not None:
            incomplete_scheme = (
                (
                    self.install_lib is None
                    and self.install_purelib is None
                    and self.install_platlib is None
                )
                or self.install_headers is None
                or self.install_scripts is None
                or self.install_data is None
            )
            if incomplete_scheme:
                raise DistutilsOptionError(
                    "install-base or install-platbase supplied, but "
                    "installation scheme is incomplete"
                )
            return

        if self.user:
            if self.install_userbase is None:
                raise DistutilsPlatformError("User base directory is not specified")
            self.install_base = self.install_platbase = self.install_userbase
            self.select_scheme("posix_user")
        elif self.home is not None:
            self.install_base = self.install_platbase = self.home
            self.select_scheme("posix_home")
        else:
            if self.prefix is None:
                if self.exec_prefix is not None:
                    raise DistutilsOptionError(
                        "must not supply exec-prefix without prefix"
                    )

                # Allow Fedora to add components to the prefix
                _prefix_addition = getattr(sysconfig, '_prefix_addition', "")

                self.prefix = os.path.normpath(sys.prefix) + _prefix_addition
                self.exec_prefix = os.path.normpath(sys.exec_prefix) + _prefix_addition

            else:
                if self.exec_prefix is None:
                    self.exec_prefix = self.prefix

            self.install_base = self.prefix
            self.install_platbase = self.exec_prefix
            self.select_scheme("posix_prefix")

    def finalize_other(self):
        """Finalizes options for non-posix platforms"""
        if self.user:
            if self.install_userbase is None:
                raise DistutilsPlatformError("User base directory is not specified")
            self.install_base = self.install_platbase = self.install_userbase
            self.select_scheme(os.name + "_user")
        elif self.home is not None:
            self.install_base = self.install_platbase = self.home
            self.select_scheme("posix_home")
        else:
            if self.prefix is None:
                self.prefix = os.path.normpath(sys.prefix)

            self.install_base = self.install_platbase = self.prefix
            try:
                self.select_scheme(os.name)
            except KeyError:
                raise DistutilsPlatformError(
                    "I don't know how to install stuff on '%s'" % os.name
                )

    def select_scheme(self, name):
        _select_scheme(self, name)

    def _expand_attrs(self, attrs):
        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                if os.name in ('posix', 'nt'):
                    val = os.path.expanduser(val)
                val = subst_vars(val, self.config_vars)
                setattr(self, attr, val)

    def expand_basedirs(self):
        """Calls `os.path.expanduser` on install_base, install_platbase and
        root."""
        self._expand_attrs(['install_base', 'install_platbase', 'root'])

    def expand_dirs(self):
        """Calls `os.path.expanduser` on install dirs."""
        self._expand_attrs(
            [
                'install_purelib',
                'install_platlib',
                'install_lib',
                'install_headers',
                'install_scripts',
                'install_data',
            ]
        )

    def convert_paths(self, *names):
        """Call `convert_path` over `names`."""
        for name in names:
            attr = "install_" + name
            setattr(self, attr, convert_path(getattr(self, attr)))

    def handle_extra_path(self):
        """Set `path_file` and `extra_dirs` using `extra_path`."""
        if self.extra_path is None:
            self.extra_path = self.distribution.extra_path

        if self.extra_path is not None:
            log.warning(
                "Distribution option extra_path is deprecated. "
                "See issue27919 for details."
            )
            if isinstance(self.extra_path, str):
                self.extra_path = self.extra_path.split(',')

            if len(self.extra_path) == 1:
                path_file = extra_dirs = self.extra_path[0]
            elif len(self.extra_path) == 2:
                path_file, extra_dirs = self.extra_path
            else:
                raise DistutilsOptionError(
                    "'extra_path' option must be a list, tuple, or "
                    "comma-separated string with 1 or 2 elements"
                )

            # convert to local form in case Unix notation used (as it
            # should be in setup scripts)
            extra_dirs = convert_path(extra_dirs)
        else:
            path_file = None
            extra_dirs = ''

        # XXX should we warn if path_file and not extra_dirs? (in which
        # case the path file would be harmless but pointless)
        self.path_file = path_file
        self.extra_dirs = extra_dirs

    def change_roots(self, *names):
        """Change the install directories pointed by name using root."""
        for name in names:
            attr = "install_" + name
            setattr(self, attr, change_root(self.root, getattr(self, attr)))

    def create_home_path(self):
        """Create directories under ~."""
        if not self.user:
            return
        home = convert_path(os.path.expanduser("~"))
        for name, path in self.config_vars.items():
            if str(path).startswith(home) and not os.path.isdir(path):
                self.debug_print("os.makedirs('%s', 0o700)" % path)
                os.makedirs(path, 0o700)

    # -- Command execution methods -------------------------------------

    def run(self):
        """Runs the command."""
        # Obviously have to build before we can install
        if not self.skip_build:
            self.run_command('build')
            # If we built for any other platform, we can't install.
            build_plat = self.distribution.get_command_obj('build').plat_name
            # check warn_dir - it is a clue that the 'install' is happening
            # internally, and not to sys.path, so we don't check the platform
            # matches what we are running.
            if self.warn_dir and build_plat != get_platform():
                raise DistutilsPlatformError("Can't install when " "cross-compiling")

        # Run all sub-commands (at least those that need to be run)
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        if self.path_file:
            self.create_path_file()

        # write list of installed files, if requested.
        if self.record:
            outputs = self.get_outputs()
            if self.root:  # strip any package prefix
                root_len = len(self.root)
                for counter in range(len(outputs)):
                    outputs[counter] = outputs[counter][root_len:]
            self.execute(
                write_file,
                (self.record, outputs),
                "writing list of installed files to '%s'" % self.record,
            )

        sys_path = map(os.path.normpath, sys.path)
        sys_path = map(os.path.normcase, sys_path)
        install_lib = os.path.normcase(os.path.normpath(self.install_lib))
        if (
            self.warn_dir
            and not (self.path_file and self.install_path_file)
            and install_lib not in sys_path
        ):
            log.debug(
                (
                    "modules installed to '%s', which is not in "
                    "Python's module search path (sys.path) -- "
                    "you'll have to change the search path yourself"
                ),
                self.install_lib,
            )

    def create_path_file(self):
        """Creates the .pth file"""
        filename = os.path.join(self.install_libbase, self.path_file + ".pth")
        if self.install_path_file:
            self.execute(
                write_file, (filename, [self.extra_dirs]), "creating %s" % filename
            )
        else:
            self.warn("path file '%s' not created" % filename)

    # -- Reporting methods ---------------------------------------------

    def get_outputs(self):
        """Assembles the outputs of all the sub-commands."""
        outputs = []
        for cmd_name in self.get_sub_commands():
            cmd = self.get_finalized_command(cmd_name)
            # Add the contents of cmd.get_outputs(), ensuring
            # that outputs doesn't contain duplicate entries
            for filename in cmd.get_outputs():
                if filename not in outputs:
                    outputs.append(filename)

        if self.path_file and self.install_path_file:
            outputs.append(os.path.join(self.install_libbase, self.path_file + ".pth"))

        return outputs

    def get_inputs(self):
        """Returns the inputs of all the sub-commands"""
        # XXX gee, this looks familiar ;-(
        inputs = []
        for cmd_name in self.get_sub_commands():
            cmd = self.get_finalized_command(cmd_name)
            inputs.extend(cmd.get_inputs())

        return inputs

    # -- Predicates for sub-command list -------------------------------

    def has_lib(self):
        """Returns true if the current distribution has any Python
        modules to install."""
        return (
            self.distribution.has_pure_modules() or self.distribution.has_ext_modules()
        )

    def has_headers(self):
        """Returns true if the current distribution has any headers to
        install."""
        return self.distribution.has_headers()

    def has_scripts(self):
        """Returns true if the current distribution has any scripts to.
        install."""
        return self.distribution.has_scripts()

    def has_data(self):
        """Returns true if the current distribution has any data to.
        install."""
        return self.distribution.has_data_files()

    # 'sub_commands': a list of commands this command might have to run to
    # get its work done.  See cmd.py for more info.
    sub_commands = [
        ('install_lib', has_lib),
        ('install_headers', has_headers),
        ('install_scripts', has_scripts),
        ('install_data', has_data),
        ('install_egg_info', lambda self: True),
    ]
python3.12/site-packages/setuptools/_distutils/text_file.py000064400000027465151732703620020076 0ustar00"""text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes."""

import sys


class TextFile:
    """Provides a file-like object that takes care of all the things you
    commonly want to do when processing a text file that has some
    line-by-line syntax: strip comments (as long as "#" is your
    comment character), skip blank lines, join adjacent lines by
    escaping the newline (ie. backslash at end of line), strip
    leading and/or trailing whitespace.  All of these are optional
    and independently controllable.

    Provides a 'warn()' method so you can generate warning messages that
    report physical line number, even if the logical line in question
    spans multiple physical lines.  Also provides 'unreadline()' for
    implementing line-at-a-time lookahead.

    Constructor is called as:

        TextFile (filename=None, file=None, **options)

    It bombs (RuntimeError) if both 'filename' and 'file' are None;
    'filename' should be a string, and 'file' a file object (or
    something that provides 'readline()' and 'close()' methods).  It is
    recommended that you supply at least 'filename', so that TextFile
    can include it in warning messages.  If 'file' is not supplied,
    TextFile creates its own using 'io.open()'.

    The options are all boolean, and affect the value returned by
    'readline()':
      strip_comments [default: true]
        strip from "#" to end-of-line, as well as any whitespace
        leading up to the "#" -- unless it is escaped by a backslash
      lstrip_ws [default: false]
        strip leading whitespace from each line before returning it
      rstrip_ws [default: true]
        strip trailing whitespace (including line terminator!) from
        each line before returning it
      skip_blanks [default: true}
        skip lines that are empty *after* stripping comments and
        whitespace.  (If both lstrip_ws and rstrip_ws are false,
        then some lines may consist of solely whitespace: these will
        *not* be skipped, even if 'skip_blanks' is true.)
      join_lines [default: false]
        if a backslash is the last non-newline character on a line
        after stripping comments and whitespace, join the following line
        to it to form one "logical line"; if N consecutive lines end
        with a backslash, then N+1 physical lines will be joined to
        form one logical line.
      collapse_join [default: false]
        strip leading whitespace from lines that are joined to their
        predecessor; only matters if (join_lines and not lstrip_ws)
      errors [default: 'strict']
        error handler used to decode the file content

    Note that since 'rstrip_ws' can strip the trailing newline, the
    semantics of 'readline()' must differ from those of the builtin file
    object's 'readline()' method!  In particular, 'readline()' returns
    None for end-of-file: an empty string might just be a blank line (or
    an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
    not."""

    default_options = {
        'strip_comments': 1,
        'skip_blanks': 1,
        'lstrip_ws': 0,
        'rstrip_ws': 1,
        'join_lines': 0,
        'collapse_join': 0,
        'errors': 'strict',
    }

    def __init__(self, filename=None, file=None, **options):
        """Construct a new TextFile object.  At least one of 'filename'
        (a string) and 'file' (a file-like object) must be supplied.
        They keyword argument options are described above and affect
        the values returned by 'readline()'."""
        if filename is None and file is None:
            raise RuntimeError(
                "you must supply either or both of 'filename' and 'file'"
            )

        # set values for all options -- either from client option hash
        # or fallback to default_options
        for opt in self.default_options.keys():
            if opt in options:
                setattr(self, opt, options[opt])
            else:
                setattr(self, opt, self.default_options[opt])

        # sanity check client option hash
        for opt in options.keys():
            if opt not in self.default_options:
                raise KeyError("invalid TextFile option '%s'" % opt)

        if file is None:
            self.open(filename)
        else:
            self.filename = filename
            self.file = file
            self.current_line = 0  # assuming that file is at BOF!

        # 'linebuf' is a stack of lines that will be emptied before we
        # actually read from the file; it's only populated by an
        # 'unreadline()' operation
        self.linebuf = []

    def open(self, filename):
        """Open a new file named 'filename'.  This overrides both the
        'filename' and 'file' arguments to the constructor."""
        self.filename = filename
        self.file = open(self.filename, errors=self.errors)
        self.current_line = 0

    def close(self):
        """Close the current file and forget everything we know about it
        (filename, current line number)."""
        file = self.file
        self.file = None
        self.filename = None
        self.current_line = None
        file.close()

    def gen_error(self, msg, line=None):
        outmsg = []
        if line is None:
            line = self.current_line
        outmsg.append(self.filename + ", ")
        if isinstance(line, (list, tuple)):
            outmsg.append("lines %d-%d: " % tuple(line))
        else:
            outmsg.append("line %d: " % line)
        outmsg.append(str(msg))
        return "".join(outmsg)

    def error(self, msg, line=None):
        raise ValueError("error: " + self.gen_error(msg, line))

    def warn(self, msg, line=None):
        """Print (to stderr) a warning message tied to the current logical
        line in the current file.  If the current logical line in the
        file spans multiple physical lines, the warning refers to the
        whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
        the current line number; it may be a list or tuple to indicate a
        range of physical lines, or an integer for a single physical
        line."""
        sys.stderr.write("warning: " + self.gen_error(msg, line) + "\n")

    def readline(self):  # noqa: C901
        """Read and return a single logical line from the current file (or
        from an internal buffer if lines have previously been "unread"
        with 'unreadline()').  If the 'join_lines' option is true, this
        may involve reading multiple physical lines concatenated into a
        single string.  Updates the current line number, so calling
        'warn()' after 'readline()' emits a warning about the physical
        line(s) just read.  Returns None on end-of-file, since the empty
        string can occur if 'rstrip_ws' is true but 'strip_blanks' is
        not."""
        # If any "unread" lines waiting in 'linebuf', return the top
        # one.  (We don't actually buffer read-ahead data -- lines only
        # get put in 'linebuf' if the client explicitly does an
        # 'unreadline()'.
        if self.linebuf:
            line = self.linebuf[-1]
            del self.linebuf[-1]
            return line

        buildup_line = ''

        while True:
            # read the line, make it None if EOF
            line = self.file.readline()
            if line == '':
                line = None

            if self.strip_comments and line:
                # Look for the first "#" in the line.  If none, never
                # mind.  If we find one and it's the first character, or
                # is not preceded by "\", then it starts a comment --
                # strip the comment, strip whitespace before it, and
                # carry on.  Otherwise, it's just an escaped "#", so
                # unescape it (and any other escaped "#"'s that might be
                # lurking in there) and otherwise leave the line alone.

                pos = line.find("#")
                if pos == -1:  # no "#" -- no comments
                    pass

                # It's definitely a comment -- either "#" is the first
                # character, or it's elsewhere and unescaped.
                elif pos == 0 or line[pos - 1] != "\\":
                    # Have to preserve the trailing newline, because it's
                    # the job of a later step (rstrip_ws) to remove it --
                    # and if rstrip_ws is false, we'd better preserve it!
                    # (NB. this means that if the final line is all comment
                    # and has no trailing newline, we will think that it's
                    # EOF; I think that's OK.)
                    eol = (line[-1] == '\n') and '\n' or ''
                    line = line[0:pos] + eol

                    # If all that's left is whitespace, then skip line
                    # *now*, before we try to join it to 'buildup_line' --
                    # that way constructs like
                    #   hello \\
                    #   # comment that should be ignored
                    #   there
                    # result in "hello there".
                    if line.strip() == "":
                        continue
                else:  # it's an escaped "#"
                    line = line.replace("\\#", "#")

            # did previous line end with a backslash? then accumulate
            if self.join_lines and buildup_line:
                # oops: end of file
                if line is None:
                    self.warn("continuation line immediately precedes " "end-of-file")
                    return buildup_line

                if self.collapse_join:
                    line = line.lstrip()
                line = buildup_line + line

                # careful: pay attention to line number when incrementing it
                if isinstance(self.current_line, list):
                    self.current_line[1] = self.current_line[1] + 1
                else:
                    self.current_line = [self.current_line, self.current_line + 1]
            # just an ordinary line, read it as usual
            else:
                if line is None:  # eof
                    return None

                # still have to be careful about incrementing the line number!
                if isinstance(self.current_line, list):
                    self.current_line = self.current_line[1] + 1
                else:
                    self.current_line = self.current_line + 1

            # strip whitespace however the client wants (leading and
            # trailing, or one or the other, or neither)
            if self.lstrip_ws and self.rstrip_ws:
                line = line.strip()
            elif self.lstrip_ws:
                line = line.lstrip()
            elif self.rstrip_ws:
                line = line.rstrip()

            # blank line (whether we rstrip'ed or not)? skip to next line
            # if appropriate
            if line in ('', '\n') and self.skip_blanks:
                continue

            if self.join_lines:
                if line[-1] == '\\':
                    buildup_line = line[:-1]
                    continue

                if line[-2:] == '\\\n':
                    buildup_line = line[0:-2] + '\n'
                    continue

            # well, I guess there's some actual content there: return it
            return line

    def readlines(self):
        """Read and return the list of all logical lines remaining in the
        current file."""
        lines = []
        while True:
            line = self.readline()
            if line is None:
                return lines
            lines.append(line)

    def unreadline(self, line):
        """Push 'line' (a string) onto an internal buffer that will be
        checked by future 'readline()' calls.  Handy for implementing
        a parser with line-at-a-time lookahead."""
        self.linebuf.append(line)
python3.12/site-packages/setuptools/_distutils/_macos_compat.py000064400000000357151732703630020707 0ustar00import sys
import importlib


def bypass_compiler_fixup(cmd, args):
    return cmd


if sys.platform == 'darwin':
    compiler_fixup = importlib.import_module('_osx_support').compiler_fixup
else:
    compiler_fixup = bypass_compiler_fixup
python3.12/site-packages/setuptools/_distutils/_functools.py000064400000003353151732703630020255 0ustar00import collections.abc
import functools


# from jaraco.functools 3.5
def pass_none(func):
    """
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    """

    @functools.wraps(func)
    def wrapper(param, *args, **kwargs):
        if param is not None:
            return func(param, *args, **kwargs)

    return wrapper


# from jaraco.functools 4.0
@functools.singledispatch
def _splat_inner(args, func):
    """Splat args to func."""
    return func(*args)


@_splat_inner.register
def _(args: collections.abc.Mapping, func):
    """Splat kargs to func as kwargs."""
    return func(**args)


def splat(func):
    """
    Wrap func to expect its parameters to be passed positionally in a tuple.

    Has a similar effect to that of ``itertools.starmap`` over
    simple ``map``.

    >>> import itertools, operator
    >>> pairs = [(-1, 1), (0, 2)]
    >>> _ = tuple(itertools.starmap(print, pairs))
    -1 1
    0 2
    >>> _ = tuple(map(splat(print), pairs))
    -1 1
    0 2

    The approach generalizes to other iterators that don't have a "star"
    equivalent, such as a "starfilter".

    >>> list(filter(splat(operator.add), pairs))
    [(0, 2)]

    Splat also accepts a mapping argument.

    >>> def is_nice(msg, code):
    ...     return "smile" in msg or code == 0
    >>> msgs = [
    ...     dict(msg='smile!', code=20),
    ...     dict(msg='error :(', code=1),
    ...     dict(msg='unknown', code=0),
    ... ]
    >>> for msg in filter(splat(is_nice), msgs):
    ...     print(msg)
    {'msg': 'smile!', 'code': 20}
    {'msg': 'unknown', 'code': 0}
    """
    return functools.wraps(func)(functools.partial(_splat_inner, func=func))
python3.12/site-packages/setuptools/_distutils/filelist.py000064400000032623151732703630017717 0ustar00"""distutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
"""

import os
import re
import fnmatch
import functools

from .util import convert_path
from .errors import DistutilsTemplateError, DistutilsInternalError
from ._log import log


class FileList:
    """A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    """

    def __init__(self, warn=None, debug_print=None):
        # ignore argument to FileList, but keep them for backwards
        # compatibility
        self.allfiles = None
        self.files = []

    def set_allfiles(self, allfiles):
        self.allfiles = allfiles

    def findall(self, dir=os.curdir):
        self.allfiles = findall(dir)

    def debug_print(self, msg):
        """Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        """
        from distutils.debug import DEBUG

        if DEBUG:
            print(msg)

    # Collection methods

    def append(self, item):
        self.files.append(item)

    def extend(self, items):
        self.files.extend(items)

    def sort(self):
        # Not a strict lexical sort!
        sortable_files = sorted(map(os.path.split, self.files))
        self.files = []
        for sort_tuple in sortable_files:
            self.files.append(os.path.join(*sort_tuple))

    # Other miscellaneous utility methods

    def remove_duplicates(self):
        # Assumes list has been sorted!
        for i in range(len(self.files) - 1, 0, -1):
            if self.files[i] == self.files[i - 1]:
                del self.files[i]

    # "File template" methods

    def _parse_template_line(self, line):
        words = line.split()
        action = words[0]

        patterns = dir = dir_pattern = None

        if action in ('include', 'exclude', 'global-include', 'global-exclude'):
            if len(words) < 2:
                raise DistutilsTemplateError(
                    "'%s' expects <pattern1> <pattern2> ..." % action
                )
            patterns = [convert_path(w) for w in words[1:]]
        elif action in ('recursive-include', 'recursive-exclude'):
            if len(words) < 3:
                raise DistutilsTemplateError(
                    "'%s' expects <dir> <pattern1> <pattern2> ..." % action
                )
            dir = convert_path(words[1])
            patterns = [convert_path(w) for w in words[2:]]
        elif action in ('graft', 'prune'):
            if len(words) != 2:
                raise DistutilsTemplateError(
                    "'%s' expects a single <dir_pattern>" % action
                )
            dir_pattern = convert_path(words[1])
        else:
            raise DistutilsTemplateError("unknown action '%s'" % action)

        return (action, patterns, dir, dir_pattern)

    def process_template_line(self, line):  # noqa: C901
        # Parse the line: split it up, make sure the right number of words
        # is there, and return the relevant words.  'action' is always
        # defined: it's the first word of the line.  Which of the other
        # three are defined depends on the action; it'll be either
        # patterns, (dir and patterns), or (dir_pattern).
        (action, patterns, dir, dir_pattern) = self._parse_template_line(line)

        # OK, now we know that the action is valid and we have the
        # right number of words on the line for that action -- so we
        # can proceed with minimal error-checking.
        if action == 'include':
            self.debug_print("include " + ' '.join(patterns))
            for pattern in patterns:
                if not self.include_pattern(pattern, anchor=1):
                    log.warning("warning: no files found matching '%s'", pattern)

        elif action == 'exclude':
            self.debug_print("exclude " + ' '.join(patterns))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, anchor=1):
                    log.warning(
                        (
                            "warning: no previously-included files "
                            "found matching '%s'"
                        ),
                        pattern,
                    )

        elif action == 'global-include':
            self.debug_print("global-include " + ' '.join(patterns))
            for pattern in patterns:
                if not self.include_pattern(pattern, anchor=0):
                    log.warning(
                        (
                            "warning: no files found matching '%s' "
                            "anywhere in distribution"
                        ),
                        pattern,
                    )

        elif action == 'global-exclude':
            self.debug_print("global-exclude " + ' '.join(patterns))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, anchor=0):
                    log.warning(
                        (
                            "warning: no previously-included files matching "
                            "'%s' found anywhere in distribution"
                        ),
                        pattern,
                    )

        elif action == 'recursive-include':
            self.debug_print("recursive-include {} {}".format(dir, ' '.join(patterns)))
            for pattern in patterns:
                if not self.include_pattern(pattern, prefix=dir):
                    msg = (
                        "warning: no files found matching '%s' " "under directory '%s'"
                    )
                    log.warning(msg, pattern, dir)

        elif action == 'recursive-exclude':
            self.debug_print("recursive-exclude {} {}".format(dir, ' '.join(patterns)))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, prefix=dir):
                    log.warning(
                        (
                            "warning: no previously-included files matching "
                            "'%s' found under directory '%s'"
                        ),
                        pattern,
                        dir,
                    )

        elif action == 'graft':
            self.debug_print("graft " + dir_pattern)
            if not self.include_pattern(None, prefix=dir_pattern):
                log.warning("warning: no directories found matching '%s'", dir_pattern)

        elif action == 'prune':
            self.debug_print("prune " + dir_pattern)
            if not self.exclude_pattern(None, prefix=dir_pattern):
                log.warning(
                    ("no previously-included directories found " "matching '%s'"),
                    dir_pattern,
                )
        else:
            raise DistutilsInternalError(
                "this cannot happen: invalid action '%s'" % action
            )

    # Filtering/selection methods

    def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0):
        """Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        """
        # XXX docstring lying about what the special chars are?
        files_found = False
        pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
        self.debug_print("include_pattern: applying regex r'%s'" % pattern_re.pattern)

        # delayed loading of allfiles list
        if self.allfiles is None:
            self.findall()

        for name in self.allfiles:
            if pattern_re.search(name):
                self.debug_print(" adding " + name)
                self.files.append(name)
                files_found = True
        return files_found

    def exclude_pattern(self, pattern, anchor=1, prefix=None, is_regex=0):
        """Remove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        """
        files_found = False
        pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
        self.debug_print("exclude_pattern: applying regex r'%s'" % pattern_re.pattern)
        for i in range(len(self.files) - 1, -1, -1):
            if pattern_re.search(self.files[i]):
                self.debug_print(" removing " + self.files[i])
                del self.files[i]
                files_found = True
        return files_found


# Utility functions


def _find_all_simple(path):
    """
    Find all files under 'path'
    """
    all_unique = _UniqueDirs.filter(os.walk(path, followlinks=True))
    results = (
        os.path.join(base, file) for base, dirs, files in all_unique for file in files
    )
    return filter(os.path.isfile, results)


class _UniqueDirs(set):
    """
    Exclude previously-seen dirs from walk results,
    avoiding infinite recursion.
    Ref https://bugs.python.org/issue44497.
    """

    def __call__(self, walk_item):
        """
        Given an item from an os.walk result, determine
        if the item represents a unique dir for this instance
        and if not, prevent further traversal.
        """
        base, dirs, files = walk_item
        stat = os.stat(base)
        candidate = stat.st_dev, stat.st_ino
        found = candidate in self
        if found:
            del dirs[:]
        self.add(candidate)
        return not found

    @classmethod
    def filter(cls, items):
        return filter(cls(), items)


def findall(dir=os.curdir):
    """
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    """
    files = _find_all_simple(dir)
    if dir == os.curdir:
        make_rel = functools.partial(os.path.relpath, start=dir)
        files = map(make_rel, files)
    return list(files)


def glob_to_re(pattern):
    """Translate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    """
    pattern_re = fnmatch.translate(pattern)

    # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
    # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
    # and by extension they shouldn't match such "special characters" under
    # any OS.  So change all non-escaped dots in the RE to match any
    # character except the special characters (currently: just os.sep).
    sep = os.sep
    if os.sep == '\\':
        # we're using a regex to manipulate a regex, so we need
        # to escape the backslash twice
        sep = r'\\\\'
    escaped = r'\1[^%s]' % sep
    pattern_re = re.sub(r'((?<!\\)(\\\\)*)\.', escaped, pattern_re)
    return pattern_re


def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0):
    """Translate a shell-like wildcard pattern to a compiled regular
    expression.  Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    """
    if is_regex:
        if isinstance(pattern, str):
            return re.compile(pattern)
        else:
            return pattern

    # ditch start and end characters
    start, _, end = glob_to_re('_').partition('_')

    if pattern:
        pattern_re = glob_to_re(pattern)
        assert pattern_re.startswith(start) and pattern_re.endswith(end)
    else:
        pattern_re = ''

    if prefix is not None:
        prefix_re = glob_to_re(prefix)
        assert prefix_re.startswith(start) and prefix_re.endswith(end)
        prefix_re = prefix_re[len(start) : len(prefix_re) - len(end)]
        sep = os.sep
        if os.sep == '\\':
            sep = r'\\'
        pattern_re = pattern_re[len(start) : len(pattern_re) - len(end)]
        pattern_re = r'{}\A{}{}.*{}{}'.format(start, prefix_re, sep, pattern_re, end)
    else:  # no prefix -- respect anchor flag
        if anchor:
            pattern_re = r'{}\A{}'.format(start, pattern_re[len(start) :])

    return re.compile(pattern_re)
python3.12/site-packages/setuptools/_distutils/__pycache__/versionpredicate.cpython-312.pyc000064400000015442151732703630026013 0ustar00�

��_iU��T�dZddlZddlmZddlZej
dej�Zej
d�Zej
d�Z	d�Z
ejejejejejej d	�ZGd
�d�Zdad�Zy)
zBModule for parsing and testing package version predicate strings.
�N�)�versionz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$c��tj|�}|std|z��|j�\}}t	j
�5t	j|�}ddd�||fS#1swY|fSxYw)zVParse a single version comparison.

    Return (comparison string, StrictVersion)
    z"bad package restriction syntax: %rN)�re_splitComparison�match�
ValueError�groupsr�suppress_known_deprecation�
StrictVersion)�pred�res�comp�verStr�others     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/versionpredicate.py�splitUprsr��
�
"�
"�4�
(�C���=��D�E�E��:�:�<�L�D�&�	�	+�	+�	-��%�%�f�-��
.��%�=��
.��%�=��s�
A/�/A;)�<z<=z==�>z>=z!=c�"�eZdZdZd�Zd�Zd�Zy)�VersionPredicatea�Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    c���|j�}|std��tj|�}|std|z��|j	�\|_}|j�}|r�tj|�}|std|z��|j	�d}|jd�D�cgc]
}t|���c}|_	|jstd|z��yg|_	ycc}w)z!Parse a version predicate string.zempty package restrictionzbad package name in %rzexpected parenthesized list: %rr�,zempty parenthesized list in %rN)
�stripr�re_validPackagerr	�name�re_paren�splitrr)�self�versionPredicateStrr�paren�str�aPreds      r�__init__zVersionPredicate.__init__is���2�7�7�9��"��8�9�9��%�%�&9�:����5�8K�K�L�L� �<�<�>���	�5����
����N�N�5�)�E�� �!B�U�!J�K�K��,�,�.��#�C�58�Y�Y�s�^�D�^�E����^�D�D�I��9�9� �!A�DW�!W�X�X���D�I��	Es�8C5c���|jrQ|jD��cgc]\}}|dzt|�z��}}}|jdzdj|�zdzS|jScc}}w)N� z (z, �))rr!r�join)r�cond�ver�seqs    r�__str__zVersionPredicate.__str__�sc���9�9�:>�)�)�D�)�Y�T�3�4�#�:��C��(�)�C�D��9�9�t�#�d�i�i��n�4�s�:�:��9�9���Es�A*c�N�|jD]\}}t|||�r�yy)z�True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        FT)r�compmap)rrr(r)s    r�satisfied_byzVersionPredicate.satisfied_by�s,��
���I�D�#��4�=��#�.��#��N)�__name__�
__module__�__qualname__�__doc__r#r+r.�r/rrr(s��>�@�2�r/rc��t�$tjdtj�a|j	�}tj|�}|st
d|z��|jd�xsd}|r2tj�5tj|�}ddd�|jd�|fS#1swY�xYw)a9Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r�r)�
_provision_rx�re�compile�ASCIIrrr�grouprr
r)�value�mr)s   r�split_provisionr>�s������
�
�L�b�h�h�
�
�
�K�K�M�E����E�"�A���=��E�F�F�
�'�'�!�*�
��C�
�
�
/�
/�
1��'�'��,�C�2��7�7�1�:�s�?��2�
1�s�B<�<C)r3r8�r�operatorr9r:rrrr�lt�le�eq�gt�ge�ner-rr7r>r4r/r�<module>rGs����	����"�*�*�G����R���2�:�:�)�*���R�Z�Z� H�I���
���
�+�+�
�+�+�	���
�+�+�
�+�+�
��i�i�X�
�r/python3.12/site-packages/setuptools/_distutils/__pycache__/extension.cpython-312.pyc000064400000022410151732703630024452 0ustar00�

��_i(��2�dZddlZddlZGd�d�Zd�Zy)zmdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.�Nc�:�eZdZdZ														dd�Zd�Zy)�	Extensiona�Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    Nc��t|t�std��t|t�rt	d�|D��std��||_||_|xsg|_|xsg|_|xsg|_	|xsg|_
|xsg|_|xsg|_|	xsg|_
|
xsg|_|xsg|_|xsg|_|
xsg|_|xsg|_||_||_t+|�dkDrM|D�cgc]
}t-|���}}dj/t1|��}d|z}t3j4|�yycc}w)Nz'name' must be a stringc3�<K�|]}t|t����y�w)N)�
isinstance�str)�.0�vs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/extension.py�	<genexpr>z%Extension.__init__.<locals>.<genexpr>ms����1V�g��*�Q��2D�g�s�z#'sources' must be a list of stringsrz, zUnknown Extension options: %s)rr�AssertionError�list�all�name�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�export_symbols�	swig_opts�depends�language�optional�len�repr�join�sorted�warnings�warn)�selfrrrrrrrrrrrrrrrr�kw�option�options�msgs                     r�__init__zExtension.__init__WsD��(�$��$� �!:�;�;��7�D�)�c�1V�g�1V�.V� �!F�G�G���	����(�.�B���*�0�b���(�.�B���(�.�B���"��b���$8�$>�B��!�*�0�b���"4�":����.�4�"���,�2����"��b����}�"��� ��
� ��
��r�7�Q�;�24�5�"��t�F�|�"�G�5��i�i��w��0�G�1�G�;�C��M�M�#��	��5s�;Ec��dj|jj|jj|jt|��S)Nz<{}.{}({!r}) at {:#x}>)�format�	__class__�
__module__�__qualname__r�id)r&s r�__repr__zExtension.__repr__�s=��'�.�.��N�N�%�%��N�N�'�'��I�I��t�H�	
�	
�)NNNNNNNNNNNNNN)�__name__r/r0�__doc__r+r2�r3rrrs?��>�L�����!���������#/�b
r3rc�0�ddlm}m}m}ddlm}ddlm}||�}||ddddd��}	g}	|j�}	|	��n�|j|	�r�'|	d|	dcxk(rd	k(rnn|jd
|	z��P||	|�}	||	�}
|
d}t|g�}d}
|
ddD�]0}|
�|
j|�d}
�tjj|�d}|dd}|dd}|dvr|j j|��f|d
k(r|j"j|���|dk(r[|j%d�}|dk(r|j&j|df���|j&j|d|||dzdf���|dk(r|j(j|���	|dk(r|j*j|���+|dk(r|j,j|���M|dk(r|j.j|���o|dk(r|j0j|����|dk(r|j0}
���|dk(r|j2}
���|dk(r|j*}
���|dk(r-|j2j|�|r���|j2}
���|dvr|j4j|���|jd|z���3|j|����	|j7�|S#|j7�wxYw)z3Reads a Setup file and returns Extension instances.r)�parse_makefile�expand_makefile_vars�_variable_rx)�TextFile)�split_quoted�)�strip_comments�skip_blanks�
join_lines�	lstrip_ws�	rstrip_wsN����*z'%s' lines not handled yet�)z.cz.ccz.cppz.cxxz.c++z.mz.mmz-Iz-D�=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz
-Xcompilerz-u)z.az.soz.slz.oz.dylibzunrecognized argument '%s')�distutils.sysconfigr8r9r:�distutils.text_filer;�distutils.utilr<�readline�matchr%r�append�os�path�splitextrr�findrrrrrrrr�close)�filenamer8r9r:r;r<�vars�file�
extensions�line�words�module�ext�append_next_word�word�suffix�switch�value�equalss                   r�read_setup_filer`�s��V�V�,�+��(�#�D��������
�D�Q��
���=�=�?�D��|���!�!�$�'���A�w�$�r�(�)�c�)��	�	�6��=�>��'��d�3�D� ��&�E��1�X�F��F�B�'�C�#���a�b�	��#�/�$�+�+�D�1�'+�$�����)�)�$�/��2���a�����Q�R����O�O��K�K�&�&�t�,��t�^��$�$�+�+�E�2��t�^�"�Z�Z��_�F���|��)�)�0�0�%���?��)�)�0�0�%��&�/�5��RS���CV�1W�X��t�^��$�$�+�+�E�2��t�^��*�*�1�1�$�7��t�^��M�M�(�(��/��t�^��$�$�+�+�E�2��t�^��,�,�3�3�E�:��X�%�'*�'?�'?�$��Z�'�'*�':�':�$��\�)�'*�'=�'=�$��t�^��'�'�.�.�t�4� �+.�+>�+>�(��C�C�
�%�%�,�,�T�2��I�I�:�T�A�B�e"�h
���c�"�Y��V	
�
�
�����	
�
�
��s�I'L�AL�L)r5rMr$rr`r6r3r�<module>ras%���

��z
�z
�zgr3python3.12/site-packages/setuptools/_distutils/__pycache__/py38compat.cpython-312.pyc000064400000001151151732703630024444 0ustar00�

��_i���
�d�Zy)c�p�	ddl}|j�S#t$rYnwxYwdj|||�S)N�z{}-{}.{})�_aix_support�aix_platform�ImportError�format)�osname�version�releasers    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/py38compat.pyrrs@��
���(�(�*�*���
��
�����V�W�g�6�6s��	"�"N)r��r�<module>rs
��7r
python3.12/site-packages/setuptools/_distutils/__pycache__/_log.cpython-312.pyc000064400000000516151732703630023361 0ustar00�

��_i+��.�ddlZej�Zy)�N)�logging�	getLogger�log����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/_log.py�<module>r	s����g����rpython3.12/site-packages/setuptools/_distutils/__pycache__/log.cpython-312.pyc000064400000005160151732703630023222 0ustar00�

��_i���b�dZddlZddlZddlmZejZejZejZejZ	ejZ
ejZejZejZejZejZej Zd�Zd�ZGd�dej&�Zy)	zb
A simple log mechanism styled after PEP 282.

Retained for compatibility and should not be used.
�N�)�logc�P�tj}tj|�|S�N)�_global_log�level�setLevel)r�origs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/log.py�
set_thresholdrs �����D�������K�c��|dkrttj�y|dk(rttj�y|dk\rttj�yy)Nrr�)r�logging�WARN�INFO�DEBUG)�vs r�
set_verbosityr!s@���A�v��g�l�l�#�	
�a���g�l�l�#�	
�a���g�m�m�$�
r
c���eZdZdZef�fd�	Zed��Zejd��Ze	jjZ�xZ
S)�LogzJdistutils.log.Log is deprecated, please use an alternative from `logging`.c�v��tjtj�t�|�t|��y)N�r)�warnings�warnr�__doc__�super�__init__�__name__)�self�	threshold�	__class__s  �rrzLog.__init__-s%����
�
�c�k�k�"�
������3r
c��|jSrr)r s rr!z
Log.threshold1s���z�z�r
c�&�|j|�yr)r	)r rs  rr!z
Log.threshold5s���
�
�e�r
)r�
__module__�__qualname__rrr�propertyr!�setterr�Logger�warningr�
__classcell__)r"s@rrr*sM���T�!%�4������������>�>�!�!�Dr
r)rrr�_logrrrrr�ERROR�FATAL�debug�infor*r�error�fatalrrr)r�r
r�<module>r4s������$�	�
�
���|�|���|�|���
�
���
�
���o�o�����������������������%�"�'�.�.�"r
python3.12/site-packages/setuptools/_distutils/__pycache__/archive_util.cpython-312.pyc000064400000023074151732703640025124 0ustar00�

��_i|!��@�dZddlZddlmZddlZ	ddlZddlmZddl	m	Z	ddl
mZddlm
Z
	dd	lmZ	dd
lmZd�Zd�Z	dd
�Zdd�Zedgdfedgdfedgdfedgdfedgdfegdfd�Zd�Z						dd�Zy#e$rdZY�lwxYw#e$rdZY�ZwxYw#e$rdZY�`wxYw) zodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).�N)�warn�)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamc�^�t�|�y	t|�}|�|dSy#t$rd}Y�wxYw)z"Returns a gid, given a group name.N�)r
�KeyError��name�results  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/archive_util.py�_get_gidr �H����4�<����$������a�y����	��������,�,c�^�t�|�y	t|�}|�|dSy#t$rd}Y�wxYw)z"Returns an uid, given a user name.Nr)r	r
rs  r�_get_uidr-rrc������dddddd�}dddd	d
�}|�||j�vrtd��|d
z}	|dk7r|	|j|d�z
}	ttj
j
|	�|��ddl}
tjd�t���t�������fd�}|s<|
j|	d||z�}	|j||��|j�|dk(rEtdt �|	||z}
t"j$dk(r||	|
g}n|d|	g}t'||��|
S|	S#|j�wxYw)a=Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    �gz�bz2�xz�)�gzip�bzip2rN�compressz.gzz.bz2z.xzz.Z)rrrrNzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr��dry_runrzCreating tar archivec�H�����|_�|_���|_�|_|S)N)�gid�gname�uid�uname)�tarinfor"�group�ownerr$s ����r�_set_uid_gidz"make_tarball.<locals>._set_uid_gidjs.����?��G�K�!�G�M��?��G�K�!�G�M���zw|%s)�filterz'compress' is deprecated.�win32z-f)�keys�
ValueError�getr�os�path�dirname�tarfiler�inforr�open�add�closer�DeprecationWarning�sys�platformr)�	base_name�base_dirr�verboser r(r'�tar_compression�compress_ext�archive_namer3r)�tar�compressed_name�cmdr"r$s     ``        @@r�make_tarballrD:si���&������O�"�F�%�T�R�L�����0A�0A�0C� C��
!�
�	
�
�v�%�L��:����(�(��2�6�6��
�2�7�7�?�?�<�(�'�:���H�H�
#�$�
�5�/�C�
�5�/�C����l�l�<��/�(�2K�)K�L��	��G�G�H�\�G�2��I�I�K��:���
(�*<�=�&��h�)?�?���<�<�7�"��\�?�;�C��T�<�0�C�
�c�7�#������
�I�I�K�s�D=�=Ec
�"�|dz}ttjj|�|��t�|rd}nd}	td|||g|��|Stjd||�|�s�	t	j|d	tj�
�}|5|tjk7retjjtjj|d��}|j!||�tjd|�tj"|�D�]\}}	}
|	D]h}tjjtjj||d��}|j!||�tjd|��j|
D]�}tjjtjj||��}tjj%|�s�`|j!||�tjd|�����	ddd�|S|S#t$rt
d|z��wxYw#t$r*t	j|d	tj�
�}Y���wxYw#1swY|SxYw)
avCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    z.ziprNz-rz-rq�zipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to it�w)�compressionrzadding '%s')rr0r1r2�zipfilerrrr4�ZipFile�ZIP_DEFLATED�RuntimeError�
ZIP_STORED�curdir�normpath�join�write�walk�isfile)r;r<r=r �zip_filename�
zipoptionsrFr1�dirpath�dirnames�	filenamesrs            r�make_zipfilerY�s���v�%�L�
�2�7�7�?�?�<�(�'�:�����J��J�	��5�*�l�H�=�w�O�P��5	���6��h�O��
Y��o�o� �#�7�3G�3G�����r�y�y�(��7�7�+�+�B�G�G�L�L��2�,F�G�D��I�I�d�D�)��H�H�]�D�1�46�G�G�H�4E�0�G�X�y� (��!�w�w�/�/������W�d�B�0O�P���	�	�$��-������5�!)�!*��!�w�w�/�/������W�d�0K�L���7�7�>�>�$�/��I�I�d�D�1��H�H�]�D�9�	!*�5F�� ��<���O"�
	�%�4����
�
	��( �
Y��o�o�l�C�W�EW�EW�X��
Y��� ��s0�H3�,&I�E$J�9-J�3I�/J�J�J)rrzgzip'ed tar-file)rrzbzip2'ed tar-file)rrzxz'ed tar-file)rrzcompressed tar file)rNzuncompressed tar filezZIP file)�gztar�bztar�xztar�ztarrArFc�*�|D]}|tvs�|cSy)zqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N)�ARCHIVE_FORMATS)�formats�formats  r�check_archive_formatsrb�s ��
����(��M��r*c�b�tj�}|�Ltjd|�tjj|�}|stj|�|�tj}d|i}		t|}
|
d}|
dD]
\}}
|
|	|<�|dk7r
||	d<||	d<	|||fi|	��}|�+tjd	|�tj|�|S#t$rtd|z��wxYw#|�,tjd	|�tj|�wwxYw)
a�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    zchanging into '%s'r zunknown archive format '%s'rrrFr(r'zchanging back to '%s')r0�getcwdr�debugr1�abspath�chdirrNr_r
r.)r;ra�root_dirr<r=r r(r'�save_cwd�kwargs�format_info�func�arg�val�filenames               r�make_archiverp�s8��4�y�y�{�H����	�	�&��1��G�G�O�O�I�.�	���H�H�X�����9�9����
!�F�A�%�f�-���q�>�D���N���S���s��#������w����w����	�8�6�v�6�����I�I�-�x�8��H�H�X���O��%�A��6��?�@�@�A�����I�I�-�x�8��H�H�X�� �s�:	C#�*
C>�#C;�>0D.)rrrNN)rr)NNrrNN)�__doc__r0�warningsrr9rI�ImportError�errorsrr�dir_utilr�_logr�pwdr	�grpr
rrrDrYr_rbrp�r*r�<module>rzs���

��
���
'��������

�
�SW�L�^=�B�1�2�4F�
G��2�3�5H�
I��/�0�2B�
C�
�4�5�7L�M��-�.�0G�H��"�j�)�
����
�
�
�
�
�:��e���G������H���
���H��s3�A9�B�B�9B�B�B�B�B�Bpython3.12/site-packages/setuptools/_distutils/__pycache__/dir_util.cpython-312.pyc000064400000022577151732703640024270 0ustar00�

��_i���p�dZddlZddlZddlmZmZddlmZiadd�Z	dd�Z
						d
d�Zd	�Zdd
�Z
d�Zy)zWdistutils.dir_util

Utility functions for manipulating directories and directory trees.�N�)�DistutilsInternalError�DistutilsFileError)�logc	���t|t�stdj|���tj
j
|�}g}tj
j|�s|dk(r|Stjtj
j|��r|Stj
j|�\}}|g}|ry|rwtj
j|�sXtj
j|�\}}|jd|�|r"|r tj
j|�s�X|D]�}tj
j||�}tj
j|�}	tj|	�r�X|dk\rtjd|�|s(	t	j ||�|j-|�dt|	<��|S#t"$rn}
|
j$t$j&k(rtj
j|�s(t)dj||
j*d���Yd}
~
��d}
~
wwxYw)	a�Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.

    os.makedirs is not used because:

    a) It's new to Python 1.5.2, and
    b) it blows up if the directory already exists (in which case it should
       silently succeed).
    z*mkpath: 'name' must be a string (got {!r})�rrzcreating %szcould not create '{}': {}���N)�
isinstance�strr�format�os�path�normpath�isdir�
_path_created�get�abspath�split�insert�joinr�info�mkdir�OSError�errno�EEXISTr�args�append)�name�mode�verbose�dry_run�created_dirs�head�tail�tails�d�abs_head�excs           ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/dir_util.py�mkpathr*s���(�d�C� �$�8�?�?��E�
�	
��7�7���D�!�D��L�	�w�w�}�}�T��d�b�j������������.�/����7�7�=�=��&�L�T�4�
�F�E�
�4����
�
�d� 3��w�w�}�}�T�*���t�
���Q����4����
�
�d� 3����w�w�|�|�D�!�$���7�7�?�?�4�(�����X�&���a�<��H�H�]�D�)��
�����t�$�
����%�"#�
�h��+�,����
��	�	�U�\�\�1�b�g�g�m�m�D�6I�,�3�:�:�4����"��N���7J��
�s�>G2�2	I)�;A$I$�$I)c	��t�}|D]N}|jtjj	|tjj|����Pt
|�D]}t||||���y)a�Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    �r r!N)�set�addr
rr�dirname�sortedr*)�base_dir�filesrr r!�need_dir�file�dirs        r)�create_treer6Ws\���u�H������R�W�W�\�\�(�B�G�G�O�O�D�,A�B�C���h����s�D�'�7�;� �c
��ddlm}|s-tjj	|�std|z��	tj|�}	|s
t||��g}|	D�]4}tjj||�}
tjj||�}|jd�r�V|rztjj|
�r[tj|
�}|dk\rtj d	||�|stj"||�|j%|���tjj	|
�r$|j't)|
|||||||�
����||
||||||�
�|j%|���7|S#t$r5}
|rg}	n%tdj||
j���Yd}
~
���d}
~
wwxYw)aCopy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    r)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '{}': {}N)r z.nfsrzlinking %s -> %sr,)�distutils.file_utilr9r
rrr�listdirrr�strerrorr*r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�src�dst�
preserve_mode�preserve_times�preserve_symlinks�updater r!r9�names�e�outputs�n�src_name�dst_name�	link_dests                r)rBrBks���:.��2�7�7�=�=��-� �!I�C�!O�P�P���
�
�3�����s�G�$��G�
���7�7�<�<��Q�'���7�7�<�<��Q�'���<�<�����������!9����H�-�I��!�|����+�X�y�A���
�
�9�h�/��N�N�8�$�
�W�W�]�]�8�
$��N�N����!�"�%��#�#�	�
�
��������
�
�N�N�8�$�O�R�N��m����E�$�1�8�8��a�j�j�I��
�
���s�F�	G�"*G�Gc��tj|�D]�}tjj||�}tjj	|�r,tjj|�s
t
||��n|jtj|f���|jtj|f�y)zHelper for remove_tree().N)
r
r;rrrr>�_build_cmdtupler�remove�rmdir)r�	cmdtuples�f�real_fs    r)rQrQ�s���
�Z�Z��
�������d�A�&��
�7�7�=�=�� �������)?��F�I�.����b�i�i��0�1�����b�h�h��%�&r7c�`�|dk\rtjd|�|ryg}t||�|D]P}	|d|d�tjj|d�}|tvrtj|��Ry#t$r!}tjd||�Yd}~�yd}~wwxYw)z�Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    rz'removing '%s' (and everything under it)Nrzerror removing %s: %s)
rrrQr
rrr�popr�warning)�	directoryr r!rT�cmdrr(s       r)�remove_treer\�s����!�|����:�I�F����I��I�y�)���	A��C��F�3�q�6�N��g�g�o�o�c�!�f�-�G��-�'��!�!�'�*��
���	A��K�K�/��C�@�@��	A�s�A
B�	B-�B(�(B-c��tjj|�\}}|ddtjk(r||ddz}|S)z�Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    rrN)r
r�
splitdrive�sep)r�drives  r)�ensure_relativera�sC��
�'�'�$�$�T�*�K�E�4��A�a�y�B�F�F���t�A�B�x����Kr7)i�rr)rrrrrr)rr)�__doc__r
r�errorsrr�_logrrr*r6rBrQr\ra�r7r)�<module>rfsW��G�
��>���
�E�P<�.����
�
�Y�x'�A�2r7python3.12/site-packages/setuptools/_distutils/__pycache__/__init__.cpython-312.pyc000064400000001110151732703640024170 0ustar00�

��_ig���ddlZddlZejjd�\ZZZ	ejd�y#e$rYywxYw)�N� �_distutils_system_mod)�sys�	importlib�version�	partition�__version__�_�
import_module�ImportError����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/__init__.py�<module>rsP��
���K�K�)�)�#�.���Q��	�
�I���3�4���	��	�s�<�A�Apython3.12/site-packages/setuptools/_distutils/__pycache__/_collections.cpython-312.pyc000064400000017404151732703640025123 0ustar00�

��_i���z�ddlZddlZddlZddlZGd�deej
j�ZGd�de�Z	y)�Nc�@�eZdZdZd�Zd�ZejZd�Z	d�Z
y)�	DictStacka�
    A stack of dictionaries that behaves as a view on those dictionaries,
    giving preference to the last.

    >>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)])
    >>> stack['a']
    2
    >>> stack['b']
    2
    >>> stack['c']
    2
    >>> len(stack)
    3
    >>> stack.push(dict(a=3))
    >>> stack['a']
    3
    >>> set(stack.keys()) == set(['a', 'b', 'c'])
    True
    >>> set(stack.items()) == set([('a', 3), ('b', 2), ('c', 2)])
    True
    >>> dict(**stack) == dict(stack) == dict(a=3, c=2, b=2)
    True
    >>> d = stack.pop()
    >>> stack['a']
    2
    >>> d = stack.pop()
    >>> stack['a']
    1
    >>> stack.get('b', None)
    >>> 'c' in stack
    True
    c��tj|�}tttj
j
d�|D����S)Nc3�<K�|]}|j����y�w�N)�keys)�.0�cs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/_collections.py�	<genexpr>z%DictStack.__iter__.<locals>.<genexpr>,s����5N��1�a�f�f�h��s�)�list�__iter__�iter�set�	itertools�chain�
from_iterable)�self�dictss  rrzDictStack.__iter__*s5���
�
�d�#���C�	���5�5�5N��5N�N�O�P�P�c��tttj|���D]
}||vs�||cSt	|��r)�reversed�tupler
r�KeyError)r�key�scopes   r�__getitem__zDictStack.__getitem__.s<���e�D�M�M�$�$7�8�9�E��e�|��S�z�!�:��s�m�rc�V�tjjj||�Sr)�collections�abc�Mapping�__contains__)r�others  rr"zDictStack.__contains__6s�����&�&�3�3�D�%�@�@rc�<�ttt|���Sr)�lenr
r)rs r�__len__zDictStack.__len__9s���4��T�
�#�$�$rN)�__name__�
__module__�__qualname__�__doc__rrr
�append�pushr"r&�rrrrs)���BQ���;�;�D�A�%rrc��eZdZdZiej
fd�Zed��Zd�Z	dd�Z
d�Zd�Ze
d	d
i��ZGd�de�Zed
�Zed�Zy)�RangeMapaa
    A dictionary-like object that uses the keys as bounds for a range.
    Inclusion of the value for that range is determined by the
    key_match_comparator, which defaults to less-than-or-equal.
    A value is returned for a key if it is the first key that matches in
    the sorted list of keys.

    One may supply keyword parameters to be passed to the sort function used
    to sort keys (i.e. key, reverse) as sort_params.

    Let's create a map that maps 1-3 -> 'a', 4-6 -> 'b'

    >>> r = RangeMap({3: 'a', 6: 'b'})  # boy, that was easy
    >>> r[1], r[2], r[3], r[4], r[5], r[6]
    ('a', 'a', 'a', 'b', 'b', 'b')

    Even float values should work so long as the comparison operator
    supports it.

    >>> r[4.5]
    'b'

    But you'll notice that the way rangemap is defined, it must be open-ended
    on one side.

    >>> r[0]
    'a'
    >>> r[-1]
    'a'

    One can close the open-end of the RangeMap by using undefined_value

    >>> r = RangeMap({0: RangeMap.undefined_value, 3: 'a', 6: 'b'})
    >>> r[0]
    Traceback (most recent call last):
    ...
    KeyError: 0

    One can get the first or last elements in the range by using RangeMap.Item

    >>> last_item = RangeMap.Item(-1)
    >>> r[last_item]
    'b'

    .last_item is a shortcut for Item(-1)

    >>> r[RangeMap.last_item]
    'b'

    Sometimes it's useful to find the bounds for a RangeMap

    >>> r.bounds()
    (0, 6)

    RangeMap supports .get(key, default)

    >>> r.get(0, 'not found')
    'not found'

    >>> r.get(7, 'not found')
    'not found'

    One often wishes to define the ranges by their left-most values,
    which requires use of sort params and a key_match_comparator.

    >>> r = RangeMap({1: 'a', 4: 'b'},
    ...     sort_params=dict(reverse=True),
    ...     key_match_comparator=operator.ge)
    >>> r[1], r[2], r[3], r[4], r[5], r[6]
    ('a', 'a', 'a', 'b', 'b', 'b')

    That wasn't nearly as easy as before, so an alternate constructor
    is provided:

    >>> r = RangeMap.left({1: 'a', 4: 'b', 7: RangeMap.undefined_value})
    >>> r[1], r[2], r[3], r[4], r[5], r[6]
    ('a', 'a', 'a', 'b', 'b', 'b')

    c�L�tj||�||_||_yr)�dict�__init__�sort_params�match)r�sourcer3�key_match_comparators    rr2zRangeMap.__init__�s���
�
�d�F�#�&���)��
rc�H�||td��tj��S)NT)�reverse)r3r6)r1�operator�ge)�clsr5s  r�leftz
RangeMap.left�s�����T� 2����
�	
rc�8�t|j�fi|j��}t|tj
�r|j
||�}|S|j||�}tj
||�}|tjurt|��|Sr)�sortedrr3�
isinstancer/�Itemr�_find_first_match_r1�undefined_valuer)r�item�sorted_keys�resultrs     rrzRangeMap.__getitem__�s����T�Y�Y�[�=�D�,<�,<�=���d�H�M�M�*��%�%�k�$�&7�8�F��
�	�)�)�+�t�<�C��%�%�d�C�0�F���1�1�1��s�m�#��
rNc�0�	||S#t$r|cYSwxYw)z�
        Return the value for key if key is in the dictionary, else default.
        If default is not given, it defaults to None, so that this method
        never raises a KeyError.
        )r)rr�defaults   r�getzRangeMap.get�s%��	���9����	��N�	�s���c��tj|j|�}tt	||��}|r|dSt|��)Nr)�	functools�partialr4r
�filterr)rrrC�is_match�matchess     rrAzRangeMap._find_first_match_�s@���$�$�T�Z�Z��6���v�h��-�.����1�:���t�n�rc��t|j�fi|j��}|tj|tj
fSr)r>rr3r/�
first_item�	last_item)rrDs  r�boundszRangeMap.bounds�s>���T�Y�Y�[�=�D�,<�,<�=���H�/�/�0�+�h�>P�>P�2Q�R�Rr�RangeValueUndefinedr-c��eZdZdZy)�
RangeMap.Itemz
RangeMap ItemN)r'r(r)r*r-rrr@rU�s��rr@r���r)r'r(r)r*r9�ler2�classmethodr<rrHrArR�typerB�intr@rPrQr-rrr/r/>sx��N�`,.�H�K�K�*�
�
��
�
	�	��S�
:�d�0�"�b�9�;�O��s���a��J��R��Irr/)
rrJrr9r
r r!rr1r/r-rr�<module>r[s8������2%��k�o�o�-�-�2%�lD�t�Drpython3.12/site-packages/setuptools/_distutils/__pycache__/msvccompiler.cpython-312.pyc000064400000060711151732703640025150 0ustar00�

��_i\����dZddlZddlZddlZddlmZmZmZmZm	Z	ddl
mZmZddl
mZdZ	ddlZdZeZej$Zej(Zej,Zej0Zer.ej<ej>ej@ejBfZ"ejFd
e$�d�Z%d�Z&d
�Z'Gd�d�Z(d�Z)d�Z*d�Z+Gd�de�Z,e)�dk\r!ejZd�e,Z.ddl/m,Z,ddl/m(Z(yy#e$r^	ddlZddlZdZeZej&Zej*Zej.Zej0Zn#e$rej:d	�YnwxYwY��wxYw)z�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
�N�)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�logFTz�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.z�msvccompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.c��	t||�}g}d}		t||�}|j|�|dz
}�$#t$rYywxYw#t$rY|SwxYw)zReturn list of registry keys.Nrr)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�ks      ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/msvccompiler.py�	read_keysrJs|����d�C�(��	�A�	�A�
�	��6�1�%�A�	
�����	�Q���
��	������	��
�H�		�s �7�A�	A�A�	A�Ac���	t||�}i}d}		t||�\}}}|j�}t	|�|t	|�<|dz
}�>#t$rYywxYw#t$rY|SwxYw)zXReturn dict of registry keys and values.

    All names are converted to lowercase.
    Nrr)r
r�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�types        r�read_valuesr!\s���
��d�C�(��	�A�	�A�
�	� ,�V�Q� 7��D�%���z�z�|�� ,�U� 3��,�t�
��	�Q�����	������	��
�H�	�s"�A�A �	A�A� 	A-�,A-c�Z�t|dd�}|�	|d�}|S|S#t$rY|SwxYw)N�decode�mbcs)�getattr�UnicodeError)�s�decs  rrrrsG��
�!�X�t�
$�C�
��	��F��A�
�H�1�H���	���H�	�s��	*�*c�$�eZdZd�Zd�Zd�Zd�Zy)�
MacroExpanderc�4�i|_|j|�y�N)�macros�load_macros)�self�versions  r�__init__zMacroExpander.__init__}s���������!�c�d�tD]'}t||�}|s�|||jd|z<yy)Nz$(%s))�HKEYSr!r-)r/�macro�pathrrrs      r�	set_macrozMacroExpander.set_macro�s4���D��D�$�'�A��/0��v����G�e�O�,��	r2c���d|z}|jd|dzd�|jd|dzd�d}|jd|d	�	|d
kDr|jd|d�n|jd|d
�d}tD]I}	t	||�}t
|d�}t|dj||��}|d|jd<�Ky#t$rtd��wxYw#t
$rY�pwxYw)Nz%Software\Microsoft\VisualStudio\%0.1f�VCInstallDirz	\Setup\VC�
productdir�VSInstallDirz	\Setup\VSz Software\Microsoft\.NETFramework�FrameworkDir�installrootg@�FrameworkSDKDirzsdkinstallrootv1.1�sdkinstallrootaPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.z.Software\Microsoft\NET Framework Setup\Productrz{}\{}r0z$(FrameworkVersion))
r7�KeyErrorrr4r
rrr!�formatr-)	r/r0�vsbase�net�pr�hrrs	         rr.zMacroExpander.load_macros�s��9�G�C�����~�v��'<�l�K����~�v��'<�l�K�1�����~�s�M�:�	���}����0�#�7K�L����0�#�7G�H�
>���D�
� ��q�)���Q��"�C��D�(�/�/�!�S�"9�:�A�12�9��D�K�K�-�.����	�(�L��
�	���
��
�s�,C	�C!�	C�!	C-�,C-c�n�|jj�D]\}}|j||�}�|Sr,)r-�items�replace)r/r'r�vs    r�subzMacroExpander.sub�s1���K�K�%�%�'�D�A�q��	�	�!�Q��A�(��r2N)�__name__�
__module__�__qualname__r1r7r.rJ�r2rr*r*|s��"��>�:r2r*c�4�d}tjj|�}|dk(ry|t|�z}tj|dj	dd�\}}t|dd�dz
}|dk\r|dz
}t|d	d
�dz}|dk(rd}|dk\r||zSy)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.����N� r����
��g$@r)�sysr0�find�len�split�int)�prefixrr'�rest�majorVersion�minorVersions      r�get_build_versionr`�s����F������� �A��B�w��	�C��K��A��k�k�!�"�o�#�#�C��+�G�A�t��q��"�v�;��?�L��r�������q��1�v�;��%�L��q�����q���l�*�*�r2c���d}tjj|�}|dk(rytjjd|�}tj|t|�z|S)zUReturn the processor architecture.

    Possible results are "Intel" or "AMD64".
    z bit (rP�Intel�))rWr0rXrY)r\r�js   r�get_build_architecturere�sV���F������� �A��B�w��������a� �A��;�;�q�3�v�;���+�+r2c��g}|D]7}tjj|�}||vs�'|j|��9|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr6�normpathr)�paths�
reduced_pathsrD�nps    r�normalize_and_reduce_pathsrl�sE���M�
��
�W�W�
�
�a�
 ��
�]�"�� � ��$�	�
�r2c����eZdZdZdZiZdgZgd�ZdgZdgZ	eezeze	zZ
dZdZd	Z
d
ZdxZZdZd�fd
�	Zd�Zdd�Z							dd�Z	dd�Z										dd�Zd�Zd�Zd�Zdd�Zd�Zd d�Zd�Z�xZS)!�MSVCCompilerztConcrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class.�msvcz.c)z.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exec�f��t�|�|||�t�|_t	�|_|j
dk(rT|jdk\r"d|_t|j�|_nd|_d|jz|_	d|_
yd|jdzz|_	d|_
y)	Nrb�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %srQF)�superr1r`�_MSVCCompiler__versionre�_MSVCCompiler__arch�_MSVCCompiler__rootr*�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r/�verbose�dry_run�force�	__class__s    �rr1zMSVCCompiler.__init__�s����
����'�5�1�*�,���,�.����;�;�'�!��~�~��"�@��� -�d�n�n� =��
�=���7�$�.�.�H�D�N�
!���9�D�N�N�Q�<N�O�D�N� ��r2c��g|_dtjvrGdtjvr5|jd�r$d|_d|_d|_d|_d|_n�|jd�|_t|j�d	k(rtd
|jz��|jd�|_|jd�|_|jd�|_|jd�|_|jd�|_|jd�|jd�	tjdjd
�D]}|jj|��	t#|j�|_d
j%|j�tjd<d|_|j(dk(rgd�|_gd�|_ngd�|_gd�|_gd�|_|j0dk\r
gd�|_n	gd�|_dg|_d|_y#t $rY��wxYw)N�DISTUTILS_USE_SDK�MSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer6rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�lib�include�;rb)�/nologo�/O2�/MD�/W3�/GX�/DNDEBUG)r��/Od�/MDdr�r��/Z7�/D_DEBUG)r�r�r�r��/GS-r�)r�r�r�r�r�r�r�)�/DLLr�z/INCREMENTAL:NOrr)r�r��/INCREMENTAL:no�/DEBUG)r�r�r�z	/pdb:Noner�r�T)�_MSVCCompiler__pathsrg�environ�find_exe�cc�linkerr��rc�mc�get_msvc_pathsrYrrx�set_path_env_varrZrr@rl�join�preprocess_optionsru�compile_options�compile_options_debug�ldflags_sharedrt�ldflags_shared_debug�ldflags_staticry)r/rDs  r�
initializezMSVCCompiler.initializes�������2�:�:�-��2�:�:�%��
�
�h�'��D�G�$�D�K� �D�H��D�G��D�G��.�.�v�6�D�L��4�<�<� �A�%�,�G�IM���X����m�m�H�-�D�G��-�-�
�3�D�K��}�}�Y�/�D�H��m�m�H�-�D�G��m�m�H�-�D�G��!�!�%�(��!�!�)�,�	��Z�Z��'�-�-�c�2�����#�#�A�&�3�2�$�,�,�?��� �X�X�d�l�l�3��
�
�6��"&����;�;�'�!�#V�D� �*�D�&�$X�D� �*�D�&�E����>�>�Q��(X�D�%�)�D�%� )�k�������W�	��	�s�8AH7�7	I�Ic��|�d}g}|D�]y}tjj|�\}}tjj|�d}|tjj	|�d}||j
vrt
d|z��|rtjj|�}||jvr=|jtjj|||jz����||jvr>|jtjj|||jz����>|jtjj|||jz����||S)N�rzDon't know how to compile %s)rgr6�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrr��
res_extension�_mc_extensions�
obj_extension)r/�source_filenames�	strip_dir�
output_dir�	obj_names�src_namer�exts        r�object_filenameszMSVCCompiler.object_filenamesds=�����J��	�(�H��'�'�*�*�8�4�K�T�3��7�7�%�%�d�+�A�.�D�����
�
�d�+�-�.�D��$�-�-�-�#�#A�H�#L�M�M���w�w�'�'��-���d�)�)�)�� � ������j�$��AS�AS�:S�!T�U���+�+�+�� � ������j�$��AS�AS�:S�!T�U�� � ������j�$��AS�AS�:S�!T�U�!)�"�r2c	��|js|j�|j||||||�}	|	\}}
}}}|xsg}
|
jd�|r|
j	|j
�n|
j	|j�|
D�]�}	||\}}|rtjj|�}||jvrd|z}�nm||jvrd|z}�nX||jvr0|}d|z}	|j|jg|z|gz|gz���||j$vr�tjj'|�}tjj'|�}	|j|j(gd|d|gz|gz�tjj+tjj-|��\}}tjj/||dz�}|j|jgd|zgz|gz����t#dj1||���d	|z}	|j|j2g|
z|z||gz|z����|
S#t$rY���wxYw#t $r}t#|��d}~wwxYw#t $r}t#|��d}~wwxYw#t $r}t#|��d}~wwxYw)
Nz/cz/Tcz/Tpz/foz-hz-rrpz"Don't know how to compile {} to {}z/Fo)ryr��_setup_compiler�extendr�r�r@rgr6�abspath�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r�rAr�)r/�sourcesr�r-�include_dirs�debug�
extra_preargs�extra_postargs�depends�compile_info�objects�pp_opts�build�compile_opts�obj�srcr��	input_opt�
output_opt�msg�h_dir�rc_dirr�_�rc_files                         r�compilezMSVCCompiler.compile}s�������O�O���*�*����g�w��
��;G�7�����%�$�*������D�!������ :� :�;����� 4� 4�5��C�
� ��:���S���g�g�o�o�c�*���d�(�(�(�!�C�K�	���,�,�,�!�C�K�	���+�+�+��	�"�S�[�
�,��J�J����y�7�2�j�\�A�Y�K�O�P����+�+�+�������,��������-��	,��J�J����y�D�%��v�+F�F�#��N�O� �g�g�.�.�r�w�w�/?�/?��/D�E�G�D�!� �g�g�l�l�6�4�%�<�@�G��J�J����y�E�C�K�=�8�G�9�D�E��#�8�?�?��S�I������J�	
(��
�
��W�W�I�"�#���!�*�-�.�%�	%��s�F���A�
��
��$*�,�&�s�+�+��,��2*�,�&�s�+�+��,��$&�
(�"�3�'�'��
(�s[�I2�;'J�0B0J�*J:�2	I?�>I?�	J�J�J�	J7�'J2�2J7�:	K�K�Kc�n�|js|j�|j||�\}}|j||��}|j	||�r-|d|zgz}|r		|j|jg|z�ytjd|�y#t$r}t|��d}~wwxYw)N)r��/OUT:�skipping %s (up-to-date))ryr��_fix_object_args�library_filename�
_need_linkr�r�rrrr�)	r/r��output_libnamer�r��target_lang�output_filename�lib_argsr�s	         r�create_static_libzMSVCCompiler.create_static_lib�s�������O�O�� $� 5� 5�g�z� J���*��/�/��:�/�V���?�?�7�O�4��'�O�";�!<�<�H���
$��
�
�D�H�H�:��0�1�
�I�I�0�/�B��&�
$��s�m�#��
$�s�$B�	B4�$B/�/B4c���|js|j�|j||�\}}|j|||�}|\}}}|r|j	dt|�z�t
||||�}|� tjj||�}|j||��r�|tjk(r"|	r|jdd}n+|jdd}n|	r
|j}n|j}g}|xsgD]}|jd|z��||z|z|zd|zgz}|��tjj!tjj#|��\}}tjjtjj%|d�|j'|��}|jd|z�|
r|
|dd|r|j)|�|j+tjj%|��	|j-|j.g|z�yt5j6d|�y#t0$r}t3|��d}~wwxYw)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r�rz/IMPLIB:r�)ryr�r��
_fix_lib_args�warn�strr
rgr6r�r�r	�
EXECUTABLEr�r�rr�r�r�r�r��mkpathr�r�rrrr�)r/�target_descr�r�r��	libraries�library_dirs�runtime_library_dirs�export_symbolsr�r�r��
build_tempr��
fixed_args�lib_opts�ldflags�export_opts�sym�ld_args�dll_name�dll_ext�implib_filer�s                        r�linkzMSVCCompiler.link�sC�� ����O�O�� $� 5� 5�g�z� J���*��'�'�	�<�AU�V�
�:D�7��L�"6���I�I�G��*�+�,�
�
#�4��7K�Y�W���!� �g�g�l�l�:��G�O��?�?�7�O�4��i�2�2�2��"�7�7���;�G�"�1�1�!�"�5�G��"�7�7�G�"�1�1�G��K�%�+��+���"�"�:��#3�4�,��(�"�[�0�7�:�g��>W�=X�X�
��)�&(�g�g�&6�&6��G�G�$�$�_�5�'�#��7�!�g�g�l�l��G�G�O�O�G�A�J�/��1F�1F�x�1P������z�K�7�8��+���������~�.��K�K�������8�9�
%��
�
�D�K�K�=�7�2�3�

�I�I�0�/�B��	&�
%���n�$��
%�s�I�	I-�I(�(I-c��d|zS)Nz	/LIBPATH:rN�r/�dirs  r�library_dir_optionzMSVCCompiler.library_dir_optionBs
���S� � r2c��td��)Nz<don't know how to set runtime library search path for MSVC++)rr�s  r�runtime_library_dir_optionz'MSVCCompiler.runtime_library_dir_optionEs��$�J�
�	
r2c�$�|j|�Sr,)r�)r/r�s  r�library_optionzMSVCCompiler.library_optionJs���$�$�S�)�)r2c���|r|dz|g}n|g}|D]]}|D]V}tjj||j|��}tjj	|�s�R|ccS�_y)N�_d)rgr6r�r��exists)r/�dirsr�r��	try_namesr�r�libfiles        r�find_library_filezMSVCCompiler.find_library_fileMsi����t��S�)�I���I��C�!���'�'�,�,�s�D�,A�,A�$�,G�H���7�7�>�>�'�*�"�N�"��r2c��|jD]b}tjjtjj	|�|�}tjj|�s�`|cStjdjd�D]b}tjjtjj	|�|�}tjj|�s�`|cS|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        �Pathr�)r�rgr6r�r��isfiler�rZ)r/�exerD�fns    rr�zMSVCCompiler.find_exe_s������A������b�g�g�o�o�a�0�#�6�B��w�w�~�~�b�!��	�����F�#�)�)�#�.�A������b�g�g�o�o�a�0�#�6�B��w�w�~�~�b�!��	�/�
�
r2c��tsgS|dz}|jdk\r'dj|j|j�}n|j�d|�d�}tD]d}t||�}|s�|jdk\r/|jj||�jd�cS||jd�cS|jdk(r8tD]/}t|d|jz���|jd	�gSgS)
z�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        z dirsrrz8{}\{:0.1f}\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz.\6.0\Build System\Components\Platforms\Win32 (z
)\Directoriesr�rQz%s\6.0z�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.)
�
_can_read_regrtrArvr4r!rwrJrZr�)r/r6�platformrrrs      rr�zMSVCCompiler.get_msvc_pathsus����I��g�~���>�>�Q��M�T�T��������C�/3�k�k�8�E�
�
�D��D�#�&�A���>�>�Q�&��=�=�,�,�Q�t�W�5�;�;�C�@�@��T�7�=�=��-�-�
��>�>�Q�����t�Y����%<�=�I��I�I�=����	���	r2c��|dk(r|jd�}n|j|�}|r#dj|�tj|<yy)z�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        r��libraryr�N)r�r�rgr�)r/rrDs   rr�zMSVCCompiler.set_path_env_var�sI���5�=��#�#�I�.�A��#�#�D�)�A��"�x�x��{�B�J�J�t��
r2)rrr)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r)�x86) rKrLrM�__doc__�
compiler_type�executablesr�r�r�r�r�r�r��static_lib_extension�shared_lib_extension�static_lib_format�shared_lib_format�
exe_extensionr1r�r�r�r�r�r�r�r�rr�r�r��
__classcell__)r}s@rrnrn�s����3��M��K��F�M�-�O��W�N��W�N�#�_�4�~�E��V�N��M��M�!��!��,2�2��)��M�!�$O �f�8�������\�~NR�C�0���!�������NC�h!�
�
*��$�,(�T+r2rng @z3Importing new compiler from distutils.msvc9compiler)rn)r*)0r
rWrg�warnings�errorsrrrrr�	ccompilerr	r
�_logrr�winreg�hkey_mod�	OpenKeyExr
�EnumKeyr�	EnumValuer�errorr�ImportError�win32api�win32con�info�
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�HKEY_CLASSES_ROOTr4r��DeprecationWarningrr!rr*r`rerlrnr��OldMSVCCompiler�distutils.msvc9compilerrNr2r�<module>r+s�����	����2���
�
���M��H��#�#�L����J��#�#�L��|�|�H�.�����"�"��#�#��"�"�	
�E���
�
�4��	�
�$
�,
�,�,�^�4,��I+�9�I+�X��#��
�C�I�I�C�D�"�O�4�6�
��U�
�
����
����,�,���(�(�
��,�,���>�>����
�����
2�	
�	
�
��
�s5�8C<�<E�<D?�>E�?E�E�E�E�Epython3.12/site-packages/setuptools/_distutils/__pycache__/unixccompiler.cpython-312.pyc000064400000035677151732703640025343 0ustar00�

��_i�<���dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZm
Z
ddlmZmZmZmZddlmZdd	lmZd
�Zd�Zd�ZGd
�de�Zy)a9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
�N�)�	sysconfig)�newer)�	CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError�	LinkError)�log)�compiler_fixupc��d}tjj|d�dk(rd}d||vr
|dz
}d||vr�
|d|||dfS)z�
    For macOS, split command into 'env' portion (if any)
    and the rest of the linker command.

    >>> _split_env(['a', 'b', 'c'])
    ([], ['a', 'b', 'c'])
    >>> _split_env(['/usr/bin/env', 'A=3', 'gcc'])
    (['/usr/bin/env', 'A=3'], ['gcc'])
    r�envr�=N��os�path�basename��cmd�pivots  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/unixccompiler.py�
_split_envr-sc��
�E�	�w�w����A���5�(����S��Z���Q�J�E��S��Z���v��;��E�F��#�#�c�`�tjj|d�dk(}|d|||dfS)a
    AIX platforms prefix the compiler with the ld_so_aix
    script, so split that from the linker command.

    >>> _split_aix(['a', 'b', 'c'])
    ([], ['a', 'b', 'c'])
    >>> _split_aix(['/bin/foo/ld_so_aix', 'gcc'])
    (['/bin/foo/ld_so_aix'], ['gcc'])
    r�	ld_so_aixNrrs  r�
_split_aixr?s8��
�G�G���S��V�$��3�E��v��;��E�F��#�#rc�:�t|�}|d||k(r|nd}||dS)a
    The linker command usually begins with the compiler
    command (possibly multiple elements), followed by zero or more
    params for shared library building.

    If the LDSHARED env variable overrides the linker command,
    however, the commands may not match.

    Return the best guess of the linker parameters by stripping
    the linker command. If the compiler command does not
    match the linker command, assume the linker command is
    just the first element.

    >>> _linker_params('gcc foo bar'.split(), ['gcc'])
    ['foo', 'bar']
    >>> _linker_params('gcc foo bar'.split(), ['other'])
    ['foo', 'bar']
    >>> _linker_params('ccache gcc foo bar'.split(), 'ccache gcc'.split())
    ['foo', 'bar']
    >>> _linker_params(['gcc'], ['gcc'])
    []
    Nr)�len)�
linker_cmd�compiler_cmd�c_lenrs    r�_linker_paramsr$Ms0��.
���E����'�<�7�E�Q�E��e�f��rc	�"�eZdZdZddgdgdgddgdgddgdd�Zejddd	k(rd
ged
<gd�ZdZd
Z	dZ
dZdZdxZ
xZZeZejdk(rdZ					dd�Zd�Z	dd�Z										d d�Zd�Zd�Zd�Zd�Zed��Zd!d�Zy)"�
UnixCCompiler�unixN�ccz-shared�arz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib��darwinr1)z.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.exec���|jd||�}|\}}}t||�}	|j|	z}
|r|
jd|g�|r||
dd|r|
j|�|
j	|�|j
xs|duxst
||�}|sy|r.|jtjj|��	|j|
�y#t$r}t|��d}~wwxYw)N�-or)�_fix_compile_argsrr*�extend�append�forcer�mkpathrr�dirname�spawnr	r
)
�self�source�output_file�macros�include_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_opts�pp_args�
preprocess�msgs
             rrIzUnixCCompiler.preprocess�s����+�+�D�&�,�G�
�'1�$����(���>���#�#�g�-����N�N�D�+�.�/��'�G�B�Q�K���N�N�>�*����v���Z�Z�T�;�$�#6�T�%���:T�
�����K�K�������4�5�	$��J�J�w���!�	$��s�#�#��	$�s�	C�	C4�$C/�/C4c��t|j||z�}	|j||z|d|gz|z�y#t$r}t	|��d}~wwxYw)Nr6)rr,r=r	r
)	r>�obj�src�ext�cc_argsrDrGr,rJs	         r�_compilezUnixCCompiler._compile�s[��$�T�%5�%5�w��7O�P��	$��J�J�{�W�,��T�3�/?�?�.�P�Q��!�	$��s�#�#��	$�s�9�	A�A
�
Ac���|j||�\}}|j||��}|j||�r�|jtj
j
|��|j|j|gz|z|jz�|jr!	|j|j|gz�yytjd|�y#t$r}t|��d}~wwxYw)N)�
output_dir�skipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkr;rrr<r=r0�objectsr1r	rr
�debug)r>rW�output_libnamerRrX�target_lang�output_filenamerJs        r�create_static_libzUnixCCompiler.create_static_lib�s���#�3�3�G�Z�H�����/�/��:�/�V���?�?�7�O�4��K�K�������8�9��J�J�t�}�}��'8�8�7�B�T�\�\�Q�R��{�{�(��J�J�t�{�{�o�->�>�?��
�I�I�0�/�B��*�(�"�3�-�'��(�s�%C�	C6�&C1�1C6c���|j||�\}}|j|||�}|\}}}t||||�}t|ttd�f�st
d��|� tjj||�}|j||��r-||jz|zd|gz}|	rdg|dd|
r|
|dd|r|j|�|jtjj|��	|tj k(}|r|j"n|j$dd}|
dk(ro|j&rct)|�\}}t+|�\}}t)|j&�\}}t)|j"�\}}t-||�}||z|z|z}t/||�}|j1||z�yt7j8d|�y#t2$r}t5|��d}~wwxYw)Nz%'output_dir' must be a string or Noner6z-grzc++rS)rT�
_fix_lib_argsr�
isinstance�str�type�	TypeErrorrr�joinrVrWr8r;r<r�
EXECUTABLEr/r.r-rrr$rr=r	rr
rX)r>�target_descrWr[rR�	libraries�library_dirs�runtime_library_dirs�export_symbolsrXrCrD�
build_temprZrE�lib_opts�ld_args�building_exe�linkerr�	linker_ne�aix�	linker_na�_�compiler_cxx_ne�
linker_exe_ne�paramsrJs                            r�linkzUnixCCompiler.link�s��� #�3�3�G�Z�H�����'�'�	�<�AU�V�
�8B�5�	�<�!5�"�4��7K�Y�W���*�s�D��J�&7�8��C�D�D��!� �g�g�l�l�:��G�O��?�?�7�O�4�����,�x�7�4��:Q�Q�G��#�f������+���������~�.��K�K�������8�9�
%� +�i�.B�.B�B��-9�$�/�/�t�~�~�q�Q���%�'�D�,=�,=�%/��%7�N�C��%/�	�%:�N�C��)3�D�4E�4E�)F�&�A��'1�$�/�/�'B�$�A�}�+�I�}�E�F� �3�Y��8�6�A�F�'���8���
�
�6�G�+�,�
�I�I�0�/�B��&�
%���n�$��
%�s�CG�	G5�%G0�0G5c��d|zS)N�-L�)r>�dirs  r�library_dir_optionz UnixCCompiler.library_dir_option����c�z�rc��tjd�}tjj	tj|�d�}d|vxsd|vS)N�CCr�gcczg++)r�get_config_varrrr�shlex�split)r>�cc_varr+s   r�_is_gcczUnixCCompiler._is_gccsI���)�)�$�/���7�7�#�#�E�K�K��$7��$:�;���� �5�E�X�$5�5rc�V�tjdddk(r(ddlm}m}|�}|r||�ddgk\rd|zSd|zStjdd	d
k(rd|zStjdddk(r|j�rd
ndd|zgSt
jd�dk(rd|zSd|zS)Nr2r3r)�get_macosx_target_ver�
split_version�
�z-Wl,-rpath,rx��freebsdz-Wl,-rpath=zhp-uxz-Wl,+sz+s�GNULD�yesz-Wl,--enable-new-dtags,-Rz-Wl,-R)�sys�platform�distutils.utilr�r�r�rr�)r>rzr�r��macosx_target_vers     r�runtime_library_dir_optionz(UnixCCompiler.runtime_library_dir_options����<�<����x�'�K� 5� 7�� �]�3D�%E�"�a��%P�$�s�*�*��c�z�!�
�\�\�"�1�
��
*� �3�&�&�
�\�\�"�1�
��
(� �L�L�N����s�
��
��#�#�G�,��5�/��4�4��c�>�!rc��d|zS)Nz-lry)r>�libs  r�library_optionzUnixCCompiler.library_optionDr|rc�f�tjd�}tjd|�}tj
dk(xr<|xr8|j
d�xs%|j
d�xr|j
d�}|r2tjj|jd�|dd�S|S)	a�
        macOS users can specify an alternate SDK using'-isysroot'.
        Calculate the SDK root if it is specified.

        Note that, as of Xcode 7, Apple SDKs may contain textual stub
        libraries with .tbd extensions rather than the normal .dylib
        shared libraries installed in /.  The Apple compiler tool
        chain handles this transparently but it can cause problems
        for programs that are being built with an SDK and searching
        for specific libraries.  Callers of find_library_file need to
        keep in mind that the base filename of the returned SDK library
        file might have a different extension from that of the library
        file installed on the running system, for example:
          /Applications/Xcode.app/Contents/Developer/Platforms/
              MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
              usr/lib/libedit.tbd
        vs
          /usr/lib/libedit.dylib
        �CFLAGSz-isysroot\s*(\S+)r3z/System/z/usr/z/usr/local/rN)rr��re�searchr�r��
startswithrrrc�group)rz�cflags�match�
apply_roots    r�
_library_rootzUnixCCompiler._library_rootGs���*�)�)�(�3���	�	�.��7��
�L�L�H�$�
��
����z�*�S��N�N�7�+�Q�C�N�N�=�4Q�0Q�	�9C�r�w�w�|�|�E�K�K��N�C���G�4�K��Krc������fd�dj�D�}t�j|�}d�tj||�D�}ttjj|�}t|d�S)a/
        Second-guess the linker with not much hard
        data to go on: GCC seems to prefer the shared library, so
        assume that *all* Unix C compilers do,
        ignoring even GCC's "-static" option.

        >>> compiler = UnixCCompiler()
        >>> compiler._library_root = lambda dir: dir
        >>> monkeypatch = getfixture('monkeypatch')
        >>> monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d)
        >>> dirs = ('/foo/bar/missing', '/foo/bar/existing')
        >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.dylib'
        >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.dylib'
        >>> monkeypatch.setattr(os.path, 'exists',
        ...     lambda d: 'existing' in d and '.a' in d)
        >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.a'
        >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.a'
        c3�D�K�|]}�j�|�����y�w))�lib_typeN)rU)�.0rar�r>s  ��r�	<genexpr>z2UnixCCompiler.find_library_file.<locals>.<genexpr>�s)�����
�@��
�!�!�#��!�5�@�s� zdylib xcode_stub shared staticc3�bK�|]'\}}tjj||����)y�w)N)rrrc)r��root�lib_names   rr�z2UnixCCompiler.find_library_file.<locals>.<genexpr>�s+����
�"E���h�
�G�G�L�L��x�(�"E�s�-/N)
r��mapr��	itertools�product�filterrr�exists�next)r>�dirsr�rX�	lib_names�roots�searched�founds` `     r�find_library_filezUnixCCompiler.find_library_filejsp���.
�8�>�>�@�
�	�
�D�&�&��-��
�"+�"3�"3�E�9�"E�
��
�r�w�w�~�~�x�0���E�4� � r)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__�
compiler_type�executablesr�r��src_extensions�
obj_extension�static_lib_extension�shared_lib_extension�dylib_lib_extension�xcode_stub_lib_extension�static_lib_format�shared_lib_format�dylib_lib_format�xcode_stub_lib_format�
exe_extensionrIrPr\rvr{r�r�r��staticmethodr�r�ryrrr&r&is(���M���F��v����I�&��f��5�M��	�K��|�|�B�Q��8�#�!)�
��H��?�N��M��� ��"��%��?H�H��H�)�,<�,��
�|�|�x���
�
�����#$�J$�NR�C�:���!�������9C�~�6�
&"�P�� L�� L�D&!rr&)�__doc__rr�r�r�r��r�	_modifiedr�	ccompilerrrr�errorsr	r
rr�_logr
�
_macos_compatrrrr$r&ryrr�<module>r�sP��
�
�
�	�����I�I�I�I��)�$$�$$��8g!�I�g!rpython3.12/site-packages/setuptools/_distutils/__pycache__/_macos_compat.cpython-312.pyc000064400000001155151732703640025246 0ustar00�

��_i���v�ddlZddlZd�Zejdk(rejd�j
ZyeZy)�Nc��|S)N�)�cmd�argss  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/_macos_compat.py�bypass_compiler_fixuprs���J��darwin�_osx_support)�sys�	importlibr�platform�
import_module�compiler_fixuprr	r�<module>rs;��
����<�<�8��,�Y�,�,�^�<�K�K�N�*�Nr	python3.12/site-packages/setuptools/_distutils/__pycache__/msvc9compiler.cpython-312.pyc000064400000074215151732703640025245 0ustar00�

��_i�u��2�dZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlZej(de�ej,Zej0Zej4Zej8Zej<ej>ej@ejBfZ"ejFd	k(xrejHd
kDZ%e%rdZ&dZ'd
Z(ndZ&dZ'dZ(ddd�Z)Gd�d�Z*Gd�d�Z+d�Z,d�Z-d�Z.d�Z/dd�Z0e,�Z1Gd�de
�Z2y) adistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
�N�)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�log)�get_platformz�msvc9compiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.�win32lz1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFramework�x86�amd64�r
z	win-amd64c�h�eZdZdZd�Zee�Zd�Zee�Zd�Zee�Zd�Ze	e�Zy)�Regz-Helper class to read values from the registryc�n�tD]"}|j||�}|s�||vs�||cSt|���N)�HKEYS�read_values�KeyError)�cls�path�key�base�ds     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/msvc9compiler.py�	get_valuez
Reg.get_valueNs:���D�����d�+�A��S�A�X���v�
���s�m��c��	t||�}g}d}		t||�}|j|�|dz
}�$#t$rYywxYw#t$rY|SwxYw)zReturn list of registry keys.Nrr)�RegOpenKeyEx�RegError�
RegEnumKey�append)rrr�handle�L�i�ks       r�	read_keysz
Reg.read_keysWs|��	�!�$��,�F�
��
���
��v�q�)��
�H�H�Q�K�
��F�A�
��	�	��	���
����	
�s �7�A�	A�A�	A�Ac��	t||�}i}d}		t||�\}}}|j�}|j	|�||j	|�<|dz
}�J#t$rYywxYw#t$rY|SwxYw)z`Return dict of registry keys and values.

        All names are converted to lowercase.
        Nrr)r!r"�RegEnumValue�lower�convert_mbcs)	rrrr%rr'�name�value�types	         rrzReg.read_valuesjs���
	�!�$��,�F�
��
���
�$0���$;�!��e�T��:�:�<�D�(+�(8�(8��(?�A�c���t�$�%�
��F�A���	�	��	���
����
�s"�A�A,�	A)�(A)�,	A9�8A9c�Z�t|dd�}|�	|d�}|S|S#t$rY|SwxYw)N�decode�mbcs)�getattr�UnicodeError)�s�decs  rr-zReg.convert_mbcs�sG���a��4�(���?�
���K����q��� �
����
�s��	*�*N)
�__name__�
__module__�__qualname__�__doc__r�classmethodr)rr-�staticmethod�rrrrKsI��7���I�&�I��"�I�&�I��*�k�*�K�� ��-�Lrrc�$�eZdZd�Zd�Zd�Zd�Zy)�
MacroExpanderc�P�i|_t|z|_|j|�yr)�macros�VS_BASE�vsbase�load_macros)�self�versions  r�__init__zMacroExpander.__init__�s#�������'�������!rc�P�tj||�|jd|z<y)Nz$(%s))rrrB)rF�macrorrs    r�	set_macrozMacroExpander.set_macro�s��'*�}�}�T�3�'?����G�e�O�$rc��|jd|jdzd�|jd|jdzd�|jdtd�	|dk\r|jd	td
�ntd
��	|dk\r5|jd
|jd�|jdt
d�yd}tD]S}	t||�}t|d�}tj|dj||��}|d|jd<�Uy#t$rt	d��wxYw#t$rY�zwxYw)N�VCInstallDirz	\Setup\VC�
productdir�VSInstallDirz	\Setup\VS�FrameworkDir�installroot� @�FrameworkSDKDirzsdkinstallrootv2.0aPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@�FrameworkVersionzclr version�
WindowsSdkDir�currentinstallfolderz.Software\Microsoft\NET Framework Setup\Productrz{}\{}rGz$(FrameworkVersion))rKrD�NET_BASErr�WINSDK_BASErr!r"r#rr�formatrB)rFrG�pr�hrrs       rrEzMacroExpander.load_macros�s6�����~�t�{�{�\�'A�<�P����~�t�{�{�\�'A�<�P����~�x��?�	��#�~����0�(�<P�Q��3�4�4�R��c�>��N�N�-�t�{�{�M�J��N�N�?�K�9O�P�A�A����$�T�1�-�A�!��A�&���M�M�$�����3�(?�@��56�y�\����1�2����	�(�L��
�	��  ����s�(D�D3�D0�3	D?�>D?c�n�|jj�D]\}}|j||�}�|Sr)rB�items�replace)rFr6r(�vs    r�subzMacroExpander.sub�s1���K�K�%�%�'�D�A�q��	�	�!�Q��A�(��rN)r8r9r:rHrKrEr`r>rrr@r@�s��"�
@�B�>rr@c�4�d}tjj|�}|dk(ry|t|�z}tj|dj	dd�\}}t|dd�dz
}|dk\r|dz
}t|d	d
�dz}|dk(rd}|dk\r||zSy)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.����N� r����
��g$@r)�sysrG�find�len�split�int)�prefixr'r6�rest�majorVersion�minorVersions      r�get_build_versionrr�s����F������� �A��B�w��	�C��K��A��k�k�!�"�o�#�#�C��+�G�A�t��q��"�v�;��?�L��r�������q��1�v�;��%�L��q�����q���l�*�*�rc��g}|D]7}tjj|�}||vs�'|j|��9|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr�normpathr$)�paths�
reduced_pathsrZ�nps    r�normalize_and_reduce_pathsry�sE���M�
��
�W�W�
�
�a�
 ��
�]�"�� � ��$�	�
�rc��|jtj�}g}|D]}||vs�|j|��tjj	|�}|S)z3Remove duplicate values of an environment variable.)rlrt�pathsepr$�join)�variable�oldList�newListr'�newVariables     r�removeDuplicatesr��sQ���n�n�R�Z�Z�(�G��G�
���G���N�N�1����*�*�/�/�'�*�K��rc��t|z}	tjd|zd�}|rtjj|�s�d|z}tjj|d�}|r�tjj|�r�tjj|tjtjd�}tjj|�}tjj|�s1t	j
d|z�yt	j
d|z�|st	j
d	�ytjj|d
�}tjj|�r|St	j
d�y#t$rt	j
d�d}Y���wxYw)z�Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    z%s\Setup\VCrNz%Unable to find productdir in registryNzVS%0.f0COMNTOOLS�VCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz
vcvarsall.bat�Unable to find vcvarsall.bat)rCrrrr�debugrtr�isdir�environ�getr|�pardir�abspath�isfile)rGrDrN�toolskey�toolsdir�	vcvarsalls      r�find_vcvarsallr��sE���w�
�F���]�]�>�F�#:�L�I�
�
�R�W�W�]�]�:�6�%��/���:�:�>�>�(�D�1������
�
�h�/������h��	�	�2�9�9�d�K�J�������4�J��7�7�=�=��,��	�	�7�*�D�E���I�I�8�8�C�D���	�	�'�(�������Z��9�I�	�w�w�~�~�i� ����I�I�,�-���/���	�	�9�:��
��s�F'�' G�
Gc�4�t|�}hd�}i}|�td��tjd||�t	j
dj
||�tjtj��}	|j�\}}|j�dk7rt|jd���|jd�}|jd	�D]�}tj|�}d
|vr�|j�}|jd
d�\}	}
|	j�}	|	|vs�W|
j!t"j$�r|
dd}
t'|
�||	<��	|j(j+�|j,j+�t/|�t/|�k7r+t1t3t5|j7�����|S#|j(j+�|j,j+�wxYw)
z?Launch vcvarsall.bat and read the settings from its environment>�libr�include�libpathNr�z'Calling 'vcvarsall.bat %s' (version=%s)z
"{}" {} & set)�stdout�stderrrr3�
�=rrb)r�rrr��
subprocess�PopenrY�PIPE�communicate�waitr2rlrr-�stripr,�endswithrtr{r�r��closer�rk�
ValueError�str�list�keys)rG�archr��interesting�result�popenr�r��linerr/s           r�query_vcvarsallr�s����w�'�I�7�K�
�F���$�%C�D�D��I�I�7��w�G�������y�$�/�������
�E�
��*�*�,�����:�:�<�1��(����v�)>�?�?����v�&���L�L��&�D��#�#�D�)�D��$����:�:�<�D����C��+�J�C���)�)�+�C��k�!��>�>�"�*�*�-�!�#�2�J�E�.�u�5��s��'�	������
������
�6�{�c�+�&�&���T�&�+�+�-�0�1�2�2��M��
	������
������s�;B8G!�44G!�!6Hc���eZdZdZdZiZdgZgd�ZdgZdgZ	eezeze	zZ
dZdZd	Z
d
ZdxZZdZd�fd
�	Zdd�Zdd�Z							dd�Z	dd�Z										d d�Zd�Zd�Zd�Zd�Zd�Zd�Zd!d�Zd�Z�xZ S)"�MSVCCompilerztConcrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class.�msvcz.c)z.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exec���t�|�|||�t|_d|_g|_d|_d|_d|_y)NzSoftware\Microsoft\VisualStudioF)	�superrH�VERSION�_MSVCCompiler__version�_MSVCCompiler__root�_MSVCCompiler__paths�	plat_name�_MSVCCompiler__arch�initialized)rF�verbose�dry_run�force�	__class__s    �rrHzMSVCCompiler.__init__^s?���
����'�5�1� ���8������������ ��rc��|jrJd��|jdkrtd|jz��|�
t�}d}||vrtdj	|���dt
jvrHdt
jvr6|jd�r%d|_d	|_	d
|_
d|_d|_�n7|t�d
fvr
t|}ntt�dzt|z}tt|�}|dj!t
j"�|_|dt
jd<|dt
jd<t'|j$�dk(rtd|j(z��|jd�|_|jd	�|_	|jd
�|_
|jd�|_|jd�|_	t
jdj!d�D]}|j$j+|��	t/|j$�|_dj1|j$�t
jd<d|_|j4dk(rgd�|_gd�|_ngd�|_gd�|_gd�|_|jdk\r	gd�|_dg|_d|_y#t,$rY��wxYw)Nzdon't init multiple timesrRz(VC %0.1f is not supported by this modulerz--plat-name must be one of {}�DISTUTILS_USE_SDK�MSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer
�_rr�r�rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�;r)�/nologo�/O2�/MD�/W3�/DNDEBUG)r��/Od�/MDdr��/Z7�/D_DEBUG)r�r�r�r��/GS-r�)r�r�r�r�r�r�r�)�/DLLr�z/INCREMENTAL:NO�)r�r�z/INCREMENTAL:noz/DEBUGr�T) r�r�rrrYrtr��find_exe�cc�linkerr��rc�mc�PLAT_TO_VCVARSr�r�rlr{r�rk�_MSVCCompiler__productr$rryr|�preprocess_optionsr��compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debug�ldflags_static)rFr��ok_plats�	plat_spec�vc_envrZs      r�
initializezMSVCCompiler.initializeis����#�#�@�%@�@�#��>�>�C��(�:�T�^�^�K��
���$��I�'���H�$�(�/�6�6�x�@��
�

 �2�:�:�-��2�:�:�%��
�
�h�'��D�G�$�D�K� �D�H��D�G��D�G��\�^�W�5�5�*�9�5�	�#�<�>�2�S�8�>�)�;T�T��%�W�i�8�F�!�&�>�/�/��
�
�;�D�L� &�u�
�B�J�J�u��$*�9�$5�B�J�J�y�!��4�<�<� �A�%�,�G�IM���X����m�m�H�-�D�G��-�-�
�3�D�K��}�}�Y�/�D�H��m�m�H�-�D�G��m�m�H�-�D�G�
	��Z�Z��'�-�-�c�2�����#�#�A�&�3�2�$�,�,�?��� �X�X�d�l�l�3��
�
�6��"&����;�;�%��#O�D� �*�D�&�$X�D� �*�D�&�E����>�>�Q��(X�D�%�(�k�������E�	��	�s�9AK.�.	K:�9K:c��|�d}g}|D�]y}tjj|�\}}tjj|�d}|tjj	|�d}||j
vrt
d|z��|rtjj|�}||jvr=|jtjj|||jz����||jvr>|jtjj|||jz����>|jtjj|||jz����||S)N�rzDon't know how to compile %s)rtr�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsr$r|�
res_extension�_mc_extensions�
obj_extension)rF�source_filenames�	strip_dir�
output_dir�	obj_names�src_namer�exts        r�object_filenameszMSVCCompiler.object_filenames�s=�����J��	�(�H��'�'�*�*�8�4�K�T�3��7�7�%�%�d�+�A�.�D�����
�
�d�+�-�.�D��$�-�-�-�#�#A�H�#L�M�M���w�w�'�'��-���d�)�)�)�� � ������j�$��AS�AS�:S�!T�U���+�+�+�� � ������j�$��AS�AS�:S�!T�U�� � ������j�$��AS�AS�:S�!T�U�!)�"�rc	��|js|j�|j||||||�}	|	\}}
}}}|xsg}
|
jd�|r|
j	|j
�n|
j	|j�|
D�]�}	||\}}|rtjj|�}||jvrd|z}�nm||jvrd|z}�nX||jvr0|}d|z}	|j|jg|z|gz|gz���||j$vr�tjj'|�}tjj'|�}	|j|j(gd|d|gz|gz�tjj+tjj-|��\}}tjj/||dz�}|j|jgd|zgz|gz����t#dj1||���d	|z}	|j|j2g|
z|z||gz|z����|
S#t$rY���wxYw#t $r}t#|��d}~wwxYw#t $r}t#|��d}~wwxYw#t $r}t#|��d}~wwxYw)
Nz/cz/Tcz/Tpz/foz-hz-rr�z"Don't know how to compile {} to {}z/Fo)r�r��_setup_compiler$�extendr�r�rrtrr��
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r|rYr�)rF�sourcesr�rB�include_dirsr��
extra_preargs�extra_postargs�depends�compile_info�objects�pp_opts�build�compile_opts�obj�srcr��	input_opt�
output_opt�msg�h_dir�rc_dirrr��rc_files                         r�compilezMSVCCompiler.compile�s�������O�O���*�*����g�w��
��;G�7�����%�$�*������D�!������ :� :�;����� 4� 4�5��C�
� ��:���S���g�g�o�o�c�*���d�(�(�(�!�C�K�	���,�,�,�!�C�K�	���+�+�+��	�"�S�[�
�,��J�J����y�7�2�j�\�A�Y�K�O�P����+�+�+�������,��������-��	,��J�J����y�D�%��v�+F�F�#��N�O� �g�g�.�.�r�w�w�/?�/?��/D�E�G�D�!� �g�g�l�l�6�4�%�<�@�G��J�J����y�E�C�K�=�8�G�9�D�E��#�8�?�?��S�I������J�	
(��
�
��W�W�I�"�#���!�*�-�.�%�	%��s�F���A�
��
��$*�,�&�s�+�+��,��2*�,�&�s�+�+��,��$&�
(�"�3�'�'��
(�s[�I2�;'J�0B0J�*J:�2	I?�>I?�	J�J�J�	J7�'J2�2J7�:	K�K�Kc�n�|js|j�|j||�\}}|j||��}|j	||�r-|d|zgz}|r		|j|jg|z�ytjd|�y#t$r}t|��d}~wwxYw)N)r��/OUT:�skipping %s (up-to-date))r�r��_fix_object_args�library_filename�
_need_linkr�r�rrrr�)	rFr��output_libnamer�r��target_lang�output_filename�lib_argsrs	         r�create_static_libzMSVCCompiler.create_static_libIs�������O�O�� $� 5� 5�g�z� J���*��/�/��:�/�V���?�?�7�O�4��'�O�";�!<�<�H���
$��
�
�D�H�H�:��0�1�
�I�I�0�/�B��&�
$��s�m�#��
$�s�$B�	B4�$B/�/B4c���|js|j�|j||�\}}|j|||�}|\}}}|r|j	dt|�z�t
||||�}|� tjj||�}|j||��r�|tjk(r"|	r|jdd}n+|jdd}n|	r
|j}n|j}g}|xsgD]}|jd|z��||z|z|zd|zgz}tjj!|d�}|��tjj#tjj%|��\}}tjj||j'|��}|jd|z�|j)|||�|
r|
|dd|r|j+|�|j-tjj!|��	|j/|j0g|z�|j7||�}|�/|\}}dj9||�}	|j/dd	d
||g�yyt;j<d|�y#t2$r}t5|��d}~wwxYw#t2$r}t5|��d}~wwxYw)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r
rz/IMPLIB:z-outputresource:{};{}zmt.exez-nologoz	-manifestr)r�r�r�
_fix_lib_args�warnr�r
rtrr|rr	�
EXECUTABLEr�r�r$r�r�r�r
�manifest_setup_ldargsr��mkpathr�r�rr�manifest_get_embed_inforYrr�)rF�target_descr�rr��	libraries�library_dirs�runtime_library_dirs�export_symbolsr�r�r��
build_tempr�
fixed_args�lib_opts�ldflags�export_opts�sym�ld_args�dll_name�dll_ext�implib_filer�mfinfo�
mffilename�mfid�out_args                            r�linkzMSVCCompiler.link\s��� ����O�O�� $� 5� 5�g�z� J���*��'�'�	�<�AU�V�
�:D�7��L�"6���I�I�G��*�+�,�
�
#�4��7K�Y�W���!� �g�g�l�l�:��G�O��?�?�7�O�4��i�2�2�2��"�7�7���;�G�"�1�1�!�"�5�G��"�7�7�G�"�1�1�G��K�%�+��+���"�"�:��#3�4�,��(�"�[�0�7�:�g��>W�=X�X�
���������4�J��)�&(�g�g�&6�&6��G�G�$�$�_�5�'�#��7�!�g�g�l�l�:�t�7L�7L�X�7V�W�����z�K�7�8��&�&��
�G�L��+���������~�.��K�K�������8�9�
%��
�
�D�K�K�=�7�2�3��1�1�+�w�G�F��!�#)� �
�D�1�8�8��$�O��)��J�J��)�[�*�g�V�W�	"�
�I�I�0�/�B��#&�
%���n�$��
%��*�)�#�C�.�(��)�s0�2J,�=K�,	K�5K�K�	K!�K�K!c��tjj|tjj|�dz�}|j	d|z�y)Nz	.manifest�/MANIFESTFILE:)rtrr|r�r$)rFrr r&�
temp_manifests     rrz"MSVCCompiler.manifest_setup_ldargs�sC�����������(�(��9�K�G�
�
�	���'�-�7�8rc���|D]*}|jd�s�|jdd�d}ny|tjk(rd}nd}|j	|�}|�y||fS)Nr0�:rrg)�
startswithrlr	r�_remove_visual_c_ref)rFrr&�argr1r,s      rrz$MSVCCompiler.manifest_get_embed_info�sx��
�C��~�~�.�/� #�	�	�#�q� 1�!� 4�
�����)�.�.�.��D��D� �5�5�m�D�M�� ���d�"�"rc�L�	t|�}	|j�}|j�tjdtj
�}tj|d|�}d}tj|d|�}tjdtj
�}tj||��yt|d�}	|j|�||j�S#|j�wxYw#|j�wxYw#t$rYywxYw)NzU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)r�z*<dependentAssembly>\s*</dependentAssembly>zI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)�w)
�open�readr��rer�DOTALLr`�search�write�OSError)rF�
manifest_file�
manifest_f�manifest_buf�patterns     rr5z!MSVCCompiler._remove_visual_c_ref�s��'	��m�,�J�
#�)���0��� � �"��j�j�D��	�	��G�
�6�6�'�2�|�<�L�C�G��6�6�'�2�|�<�L��j�j�5��	�	��G�
�y�y��,�/�7���m�S�1�J�
#�� � ��.�$�� � �"��1� � �"��0� � �"���	��	�sF�D�C-�BD�=D�
D�D�-C?�?D�D�D�	D#�"D#c��d|zS)Nz	/LIBPATH:r>�rF�dirs  r�library_dir_optionzMSVCCompiler.library_dir_options
���S� � rc��td��)Nz<don't know how to set runtime library search path for MSVC++)rrEs  r�runtime_library_dir_optionz'MSVCCompiler.runtime_library_dir_options��$�J�
�	
rc�$�|j|�Sr)r
)rFr�s  r�library_optionzMSVCCompiler.library_options���$�$�S�)�)rc���|r|dz|g}n|g}|D]]}|D]V}tjj||j|��}tjj	|�s�R|ccS�_y)N�_d)rtrr|r
�exists)rF�dirsr�r��	try_namesrFr.�libfiles        r�find_library_filezMSVCCompiler.find_library_filesi����t��S�)�I���I��C�!���'�'�,�,�s�D�,A�,A�$�,G�H���7�7�>�>�'�*�"�N�"��rc��|jD]b}tjjtjj	|�|�}tjj|�s�`|cStjdjd�D]b}tjjtjj	|�|�}tjj|�s�`|cS|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        �Pathr�)r�rtrr|r�r�r�rl)rF�exerZ�fns    rr�zMSVCCompiler.find_exe)s������A������b�g�g�o�o�a�0�#�6�B��w�w�~�~�b�!��	�����F�#�)�)�#�.�A������b�g�g�o�o�a�0�#�6�B��w�w�~�~�b�!��	�/�
�
r)rrrr)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r)!r8r9r:r;�
compiler_type�executablesr�r�r�r�r�r�r��static_lib_extension�shared_lib_extension�static_lib_format�shared_lib_format�
exe_extensionrHr�r�rrr.rrr5rGrIrKrRr��
__classcell__)r�s@rr�r�As����3��M��K��F�M�-�O��W�N��W�N�#�_�4�~�E��V�N��M��M�!��!��,2�2��)��M�	!�e �R�8�������\�~NR�C�0���!�������\C�|
9�#�0(�\!�
�
*��$rr�)r)3r;rtr�rir;�warnings�errorsrrrrr�	ccompilerr	r
�_logr�utilr�winregr�DeprecationWarning�	OpenKeyExr!�EnumKeyr#�	EnumValuer+�errorr"�
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�HKEY_CLASSES_ROOTr�platform�maxsize�NATIVE_WIN64rCrXrWr�rr@rrryr�r�r�r�r�r>rr�<module>rqs<���
��
�	����2���
�
��
�
�4��	�����
�^�^�
������<�<�����
���
���
���		���|�|�w�&�>�3�;�;��+>���C�G�J�K�>�H�6�G�>�K�2�H�����?.�?.�D+�+�\�4�� �F'�V�
��|�9�|rpython3.12/site-packages/setuptools/_distutils/__pycache__/debug.cpython-312.pyc000064400000000567151732703640023536 0ustar00�

��_i���B�ddlZejjd�Zy)�N�DISTUTILS_DEBUG)�os�environ�get�DEBUG����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/debug.py�<module>rs��	�	�
�
���(�)�r	python3.12/site-packages/setuptools/_distutils/__pycache__/py39compat.cpython-312.pyc000064400000005262151732703640024455 0ustar00�

��_i�����ddlZddlZddlZddlZd�Zej
dkxrej�dk(Zerend�ZGd�de	�Z
d�Zd	�Zej
dkreZyejed
��Zy)�Nc�X�ddl}|j�d}|j||��y)z?
    Ensure vars contains 'EXT_SUFFIX'. pypa/distutils#130
    rN)�
EXT_SUFFIX�SO)�_imp�extension_suffixes�update)�varsr�
ext_suffixs   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/py39compat.py�add_ext_suffix_39rs3����(�(�*�1�-�J��K�K�����)��
�Windowsc��y�N�)r	s r�<lambda>rs��r
c� ��eZdZd�fd�	Z�xZS)�UnequalIterablesErrorc�P��d}|�|dj|�z
}t�|�	|�y)Nz Iterables have different lengthsz/: index 0 has length {}; index {} has length {})�format�super�__init__)�self�details�msg�	__class__s   �rrzUnequalIterablesError.__init__s4���0�����M�E�M�M�w�W�W�C�
����r
r)�__name__�
__module__�__qualname__r�
__classcell__)rs@rrrs
����r
rc#�K�t�}tj|d|i�D]}|D]}||us�t��|���y�w)N�	fillvalue)�object�	itertools�zip_longestr)�	iterables�_marker�combo�vals    r�_zip_equal_generatorr,&sI�����h�G��&�&�	�E�W�E���C��g�~�+�-�-����	F�s
�,A�Ac���	t|d�}t|ddd�D]$\}}t|�}||k7s�t|||f���t|�S#t$rt|�cYSwxYw)Nr�)r)�len�	enumerater�zip�	TypeErrorr,)r(�
first_size�i�it�sizes     r�
_zip_equalr70s{��/���1��&�
��y���}�a�0�E�A�r��r�7�D��z�!�+�Z��D�4I�J�J�1�
�I�����/�#�I�.�.�/�s�3A�A�A%�$A%T)�strict)�	functoolsr&�platform�sysr�version_info�system�needs_ext_suffix�add_ext_suffix�
ValueErrorrr,r7�partialr1�
zip_strictrr
r�<module>rCs������
�
� �#�#�g�-�P�/�(�/�/�2C�y�2P��&6�"�<M���J���
/�"�"�"�W�,�J��2C�)�2C�2C�C�PT�2U�r
python3.12/site-packages/setuptools/_distutils/__pycache__/_modified.cpython-312.pyc000064400000007544151732703640024371 0ustar00�

��_ik	���dZddlZddlZddlmZddlmZddlm	Z	d�Z
d�Zefd	�Zdd
�Z
ejee
��Zy)
z2Timestamp comparison of files and groups of files.�N�)�DistutilsFileError)�
zip_strict)�splatc���tjj|�xs?tjj|�tjj|�kDS�N)�os�path�exists�getmtime��source�targets  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/_modified.py�_newerrsE���w�w�~�~�f�%�%��
������ �2�7�7�#3�#3�F�#;�;��c��tjj|�s+tdtjj	|�z��t||�S)z�
    Is source modified more recently than target.

    Returns True if 'source' is modified more recently than
    'target' or if 'target' does not exist.

    Raises DistutilsFileError if 'source' does not exist.
    zfile '%s' does not exist)r	r
rr�abspathrr
s  r�newerrs?���7�7�>�>�&�!� �!;�b�g�g�o�o�f�>U�!U�V�V��&�&�!�!rc��tt|�t||��}tt	t
t
|���xsggfS)a1
    Filter filenames where sources are newer than targets.

    Walk two filename iterables in parallel, testing if each source is newer
    than its corresponding target.  Returns a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    )�filterrr�tuple�map�list�zip)�sources�targetsr�newer_pairss    r�newer_pairwiser s;����u��z�'�7�'C�D�K���T�3��,�-�.�:�2�r�(�:rc������fd���dk(rtjjnd}t��fd�t	||�D��S)a�
    Is target out-of-date with respect to any file in sources.

    Return True if 'target' is out-of-date with respect to any file
    listed in 'sources'. In other words, if 'target' exists and is newer
    than every file in 'sources', return False; otherwise return True.
    ``missing`` controls how to handle a missing source file:

    - error (default): allow the ``stat()`` call to fail.
    - ignore: silently disregard any missing source files.
    - newer: treat missing source files as "target out of date". This
      mode is handy in "dry-run" mode: it will pretend to carry out
      commands that wouldn't work because inputs are missing, but
      that doesn't matter because dry-run won't run the commands.
    c�R���dk(xr tjj|�S)Nr)r	r
r)r�missings �r�missing_as_newerz%newer_group.<locals>.missing_as_newer>s#����'�!�@�"�'�'�.�.��*@�&@�@r�ignoreNc3�J�K�|]}�|�xst|�����y�wr)r)�.0rr#rs  ��r�	<genexpr>znewer_group.<locals>.<genexpr>Bs-������.�F�	�� �:�F�6�6�$:�:�.�s� #)r	r
r�anyr)rrr"�ignoredr#s `` @r�newer_groupr*-sB���"A�!(�8� 3�b�g�g�n�n��G����W�g�.���r)r)�error)�__doc__�	functools�os.pathr	�errorsr�
py39compatr�
_functoolsrrrrr*�partial�newer_pairwise_group�rr�<module>r5sG��8���&�"���"�,1�
;��6)�y�(�(��{�K�rpython3.12/site-packages/setuptools/_distutils/__pycache__/cmd.cpython-312.pyc000064400000042306151732703650023211 0ustar00�

��_i�E��p�dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZddl
mZGd�d�Zy)	ztdistutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
�N�)�DistutilsOptionError)�util�dir_util�	file_util�archive_util�	_modified��logc�
�eZdZdZgZd�Zd�Zd�Zd�Zd�Z	d!d�Z
d	�Zejfd
�Zd�Zd"d�Zd"d
�Zd�Zd"d�Zd�Zd�Zd�Zd�Zd#d�Zd$d�Zd�Zd�Zd�Zd%d�Zd&d�Z	d'd�Z				d(d�Z d#d�Z!d)d�Z"	d*d�Z#	d+d �Z$y),�Commanda}Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    c��ddlm}t||�std��|jt
urt
d��||_|j�d|_	|j|_
d|_d|_d|_
y)z�Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        r)�Distributionz$dist must be a Distribution instancezCommand is an abstract classN)�distutils.distr�
isinstance�	TypeError�	__class__r
�RuntimeError�distribution�initialize_options�_dry_run�verbose�force�help�	finalized)�self�distrs   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/cmd.py�__init__zCommand.__init__3sz��	0��$��-��B�C�C��>�>�W�$��=�>�>� ������!���
��|�|�����
���	����c�t�|dk(r)t|d|z�}|�t|j|�S|St|��)N�dry_run�_)�getattrr�AttributeError)r�attr�myvals   r�__getattr__zCommand.__getattr__csB���9���D�#��*�-�E��}��t�0�0�$�7�7��� ��&�&r c�J�|js|j�d|_y�Nr)r�finalize_options�rs r�ensure_finalizedzCommand.ensure_finalizedms���~�~��!�!�#���r c�2�td|jz��)a�Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        �,abstract method -- subclass %s must override�rrr,s rrzCommand.initialize_options����:�T�^�^�K�
�	
r c�2�td|jz��)aSet final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        r/r0r,s rr+zCommand.finalize_options�s���:�T�^�^�K�
�	
r Nc�r�ddlm}|�d|j�z}|j||ztj
��|dz}|jD]d\}}}|j|�}|ddk(r|dd}t||�}|j|dj||�ztj
���fy)	Nr)�
longopt_xlatezcommand options for '%s':)�levelz  ����=z{} = {})
�distutils.fancy_getoptr4�get_command_name�announce�logging�INFO�user_options�	translater$�format)r�header�indentr4�optionr#�values       r�dump_optionszCommand.dump_options�s���8��>�0�4�3H�3H�3J�J�F��
�
�f�v�o�W�\�\�
�:��$��� �-�-�L�F�A�q��%�%�m�4�F��b�z�S� �������D�&�)�E��M�M�&�9�#3�#3�F�E�#B�B�'�,�,�M�W�.r c�2�td|jz��)a�A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        r/r0r,s r�runzCommand.run�r1r c�0�tj||�y�Nr
)r�msgr5s   rr:zCommand.announce�s������s�r c�h�ddlm}|r*t|�tjj�yy)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)�distutils.debugrK�print�sys�stdout�flush)rrIrKs   r�debug_printzCommand.debug_print�s&��	*���#�J��J�J����r c��t||�}|�t|||�|St|t�st	dj|||���|S)Nz'{}' must be a {} (got `{}`))r$�setattrr�strrr?)rrB�what�default�vals     r�_ensure_stringlikezCommand._ensure_stringlike�sT���d�F�#���;��D�&�'�*��N��C��%�&�.�5�5�f�d�C�H��
��
r c�*�|j|d|�y)zWEnsure that 'option' is a string; if not defined, set it to
        'default'.
        �stringN)rX)rrBrVs   r�
ensure_stringzCommand.ensure_string�s��	
�����'�:r c�
�t||�}|�yt|t�r"t||t	j
d|��yt|t�rtd�|D��}nd}|stdj||���y)z�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Nz,\s*|\s+c3�<K�|]}t|t����y�wrH)rrT)�.0�vs  r�	<genexpr>z-Command.ensure_string_list.<locals>.<genexpr>�s����9�S���A�s�+�S�s�Fz)'{}' must be a list of strings (got {!r}))
r$rrTrS�re�split�list�allrr?)rrBrW�oks    r�ensure_string_listzCommand.ensure_string_list�s}���d�F�#���;��
��S�
!��D�&�"�(�(�;��"<�=��#�t�$��9�S�9�9�����*�?�F�F�v�s�S���r c�f�|j|||�}|�||�std|z||fz��yy)Nzerror in '%s' option: )rXr)rrB�testerrU�	error_fmtrVrWs       r�_ensure_tested_stringzCommand._ensure_tested_string�sF���%�%�f�d�G�<���?�6�#�;�&�)�I�5�&�#��F��
�$/�?r c�\�|j|tjjdd�y)z5Ensure that 'option' is the name of an existing file.�filenamez$'%s' does not exist or is not a fileN)rj�os�path�isfile�rrBs  r�ensure_filenamezCommand.ensure_filename�s"���"�"��B�G�G�N�N�J�0V�	
r c�\�|j|tjjdd�y)Nzdirectory namez)'%s' does not exist or is not a directory)rjrmrn�isdirrps  r�ensure_dirnamezCommand.ensure_dirnames$���"�"���G�G�M�M��7�		
r c�^�t|d�r|jS|jjS)N�command_name)�hasattrrvr�__name__r,s rr9zCommand.get_command_names(���4��(��$�$�$��>�>�*�*�*r c	��|jj|�}|j�|D])\}}t||���t	||t||���+y)a>Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        N)r�get_command_objr-r$rS)r�src_cmd�option_pairs�src_cmd_obj�
src_option�
dst_options      r�set_undefined_optionszCommand.set_undefined_optionssU���'�'�7�7��@���$�$�&�&2�"�J�
��t�Z�(�0���j�'�+�z�*J�K�'3r c�^�|jj||�}|j�|S)z�Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        )rrzr-)r�command�create�cmd_objs    r�get_finalized_commandzCommand.get_finalized_command*s-���#�#�3�3�G�V�D��� � �"��r c�:�|jj||�SrH)r�reinitialize_command)rr��reinit_subcommandss   rr�zCommand.reinitialize_command6s��� � �5�5�g�?Q�R�Rr c�:�|jj|�y)z�Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        N)r�run_command)rr�s  rr�zCommand.run_command9s��
	
���%�%�g�.r c�j�g}|jD]!\}}|�	||�s�|j|��#|S)akDetermine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        )�sub_commands�append)r�commands�cmd_name�methods    r�get_sub_commandszCommand.get_sub_commands@s<���� $� 1� 1��H�f��~��������)�!2��r c�N�tjd|j�|�y)Nzwarning: %s: %s
)r�warningr9)rrIs  r�warnzCommand.warnOs�����'��)>�)>�)@�#�Fr c�J�tj||||j��y�N�r")r�executer")r�func�argsrIr5s     rr�zCommand.executeRs�����T�4��d�l�l�;r c�H�tj|||j��yr�)r�mkpathr")r�name�modes   rr�zCommand.mkpathUs������d�D�L�L�9r c	�d�tj|||||j||j��S)z�Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.)r�)r�	copy_filerr")r�infile�outfile�
preserve_mode�preserve_times�linkr5s       rr�zCommand.copy_fileXs6���"�"������
�
�N���L�L�
�	
r c	�d�tj||||||j|j��S)z\Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        r�)r�	copy_treerr")rr�r�r�r��preserve_symlinksr5s       rr�zCommand.copy_treehs6���!�!�������
�
�N��L�L�
�	
r c�F�tj|||j��S)z$Move a file respecting dry-run flag.r�)r�	move_filer")r�src�dstr5s    rr�zCommand.move_file~s���"�"�3��T�\�\�B�Br c�:�ddlm}||||j��y)z2Spawn an external command respecting dry-run flag.r)�spawnr�N)�distutils.spawnr�r")r�cmd�search_pathr5r�s     rr�z
Command.spawn�s��)�
�c�;����5r c	�N�tj|||||j||��S)N)r"�owner�group)r�make_archiver")r�	base_namer?�root_dir�base_dirr�r�s       rr�zCommand.make_archive�s0���(�(������L�L���
�	
r c�Z�|�d|z}t|t�r|f}n!t|ttf�st	d��|�!dj|dj
|��}|jstj||�r|j||||�ytj|�y)a�Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating {} from {}z, )
rrTrc�tuplerr?�joinrr	�newer_groupr�r�debug)r�infilesr�r�r��exec_msg�skip_msgr5s        r�	make_filezCommand.make_file�s�����7�'�A�H��g�s�#��j�G��G�d�E�]�3��W�X�X���.�5�5�g�t�y�y��?Q�R�H�
�:�:��.�.�w��@��L�L��t�X�u�5�
�I�I�h�r )N�rH)r)rr*)i�)rrNr)rrrr)rr)NNNN)NNr)%rx�
__module__�__qualname__�__doc__r�rr(r-rr+rDrFr;rKr:rQrXr[rfrjrqrtr9r�r�r�r�r�r�r�r�r�r�r�r�r�r��r rr
r
s���
�:�L�-�`'��$
�

�X�
�#*�-�-���.	�;��*�
�
�+�L�*�S�/��G�<�:�TU�
�(����
�,C�6�RV�
�QR� r r
)r�rNrmrar;�errorsrr�rrrrr	�_logrr
r�r r�<module>r�s0����	�	��(�@�@��b �b r python3.12/site-packages/setuptools/_distutils/__pycache__/_functools.cpython-312.pyc000064400000005126151732703650024620 0ustar00�

��_i����ddlZddlZd�Zejd��Zejdejjfd��Z	d�Z
y)�Nc�B��tj���fd��}|S)z�
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    c�"��|��|g|��i|��Sy)N�)�param�args�kwargs�funcs   ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/_functools.py�wrapperzpass_none.<locals>.wrappers#�������/��/��/�/��)�	functools�wraps)r	rs` r
�	pass_noners'����_�_�T��0��0��Nrc��||�S)zSplat args to func.r�rr	s  r
�_splat_innerrs����;�rrc��|di|��S)zSplat kargs to func as kwargs.rrrs  r
�_rs���<�$�<�rc�j�tj|�tjt|���S)a�
    Wrap func to expect its parameters to be passed positionally in a tuple.

    Has a similar effect to that of ``itertools.starmap`` over
    simple ``map``.

    >>> import itertools, operator
    >>> pairs = [(-1, 1), (0, 2)]
    >>> _ = tuple(itertools.starmap(print, pairs))
    -1 1
    0 2
    >>> _ = tuple(map(splat(print), pairs))
    -1 1
    0 2

    The approach generalizes to other iterators that don't have a "star"
    equivalent, such as a "starfilter".

    >>> list(filter(splat(operator.add), pairs))
    [(0, 2)]

    Splat also accepts a mapping argument.

    >>> def is_nice(msg, code):
    ...     return "smile" in msg or code == 0
    >>> msgs = [
    ...     dict(msg='smile!', code=20),
    ...     dict(msg='error :(', code=1),
    ...     dict(msg='unknown', code=0),
    ... ]
    >>> for msg in filter(splat(is_nice), msgs):
    ...     print(msg)
    {'msg': 'smile!', 'code': 20}
    {'msg': 'unknown', 'code': 0}
    �r	)r
r�partialrrs r
�splatr%s(��H!�9�?�?�4� ��!2�!2�<�d�!K�L�Lr)�collections.abc�collectionsr
r�singledispatchr�register�abc�Mappingrrrrr
�<module>rs[�����&������
����K�O�O�#�#����
$Mrpython3.12/site-packages/setuptools/_distutils/__pycache__/spawn.cpython-312.pyc000064400000010077151732703650023576 0ustar00�

��_i�
��T�dZddlZddlZddlZddlmZddlmZddlm	Z	d	d�Z
d
d�Zy)z�distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
�N�)�DistutilsExecError)�DEBUG)�logc�l�t|�}tjtj|��|ry|rt|d�}|�||d<|�|nt
tj�}tjdk(rddlm}m
}|�}|r|||<	tj||��}	|	j�|	j }
|
r&t$s|d}t'dj)||
���y#t"$r9}t$s|d}t'dj)||j*d��|�d}~wwxYw)	a�Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    Nr�darwin)�MACOSX_VERSION_VAR�get_macosx_target_ver)�envzcommand {!r} failed: {}���z%command {!r} failed with exit code {})�listr�info�
subprocess�list2cmdline�find_executable�dict�os�environ�sys�platform�distutils.utilr	r
�Popen�wait�
returncode�OSErrorrr�format�args)�cmd�search_path�verbose�dry_runr�
executabler	r
�macosx_target_ver�proc�exitcode�excs            ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/spawn.py�spawnr(s&��$�s�)�C��H�H�Z�
$�
$�S�
)�*����$�S��V�,�
��!��C��F���#�d�2�:�:�&6�C�
�|�|�x��L�1�3���&7�C�"�#�	������-���	�	���?�?�����a�&�C� �3�:�:�3��I�
�	
�������a�&�C� �%�,�,�S�#�(�(�2�,�?�
��	���s�3C1�1	D3�:4D.�.D3c�Z�tjj|�\}}tjdk(r
|dk7r|dz}tjj|�r|S|�8tjjdd�}|�	tjd�}|sy|jtj�}|D]E}tjj||�}tjj|�s�C|cSy#ttf$rtj}Y��wxYw)z�Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    �win32z.exeN�PATH�CS_PATH)r�path�splitextrr�isfiler�get�confstr�AttributeError�
ValueError�defpath�split�pathsep�join)r"r-�_�ext�paths�p�fs       r'rrKs����W�W�
�
�j�
)�F�A�s������c�V�m��&�(�
�	�w�w�~�~�j�!����|��z�z�~�~�f�d�+���<�
"��z�z�)�,�����J�J�r�z�z�"�E�
���G�G�L�L��J�'��
�7�7�>�>�!���H�	�
��!#�J�/�
"��z�z��
"�s�D�D*�)D*)rrrN)N)�__doc__rrr�errorsr�debugr�_logrr(r��r'�<module>rCs)����	��&���6
�r"rBpython3.12/site-packages/setuptools/_distutils/__pycache__/filelist.cpython-312.pyc000064400000036704151732703650024266 0ustar00�

��_i�5���dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZGd�d�Zd	�Z
Gd
�de�Zej fd�Zd
�Zdd�Zy)zsdistutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
�N�)�convert_path)�DistutilsTemplateError�DistutilsInternalError)�logc�v�eZdZdZdd�Zd�Zejfd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zdd
�Zdd�Zy)�FileLista�A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    Nc� �d|_g|_y�N)�allfiles�files)�self�warn�debug_prints   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/filelist.py�__init__zFileList.__init__ s����
���
�c��||_yr)r)rrs  r�set_allfileszFileList.set_allfiles&s	�� ��
rc�$�t|�|_yr)�findallr)r�dirs  rrzFileList.findall)s
������
rc�,�ddlm}|rt|�yy)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)�distutils.debugr�print)r�msgrs   rrzFileList.debug_print,s��	*���#�J�rc�:�|jj|�yr)r
�append)r�items  rrzFileList.append7s���
�
���$�rc�:�|jj|�yr)r
�extend)r�itemss  rr"zFileList.extend:s���
�
���%� rc��tttjj|j
��}g|_|D]7}|j
j
tjj|���9yr)�sorted�map�os�path�splitr
r�join)r�sortable_files�
sort_tuples   r�sortz
FileList.sort=sO����B�G�G�M�M�4�:�:� >�?����
�(�J��J�J���b�g�g�l�l�J�7�8�)rc��tt|j�dz
dd�D]2}|j||j|dz
k(s�&|j|=�4y)Nrr���)�range�lenr
)r�is  r�remove_duplicateszFileList.remove_duplicatesFsJ���s�4�:�:���*�A�r�2�A��z�z�!�}��
�
�1�q�5� 1�1��J�J�q�M�3rc���|j�}|d}dx}x}}|dvr8t|�dkrtd|z��|ddD�cgc]
}t|���}}n�|dvrFt|�dkrtd|z��t|d�}|ddD�cgc]
}t|���}}n=|d	vr+t|�dk7rtd
|z��t|d�}ntd|z��||||fScc}wcc}w)Nr)�include�exclude�global-include�global-exclude�z&'%s' expects <pattern1> <pattern2> ...r)�recursive-include�recursive-exclude�z,'%s' expects <dir> <pattern1> <pattern2> ...)�graft�prunez#'%s' expects a single <dir_pattern>zunknown action '%s')r)r1rr)r�line�words�action�patternsr�dir_pattern�ws        r�_parse_template_linezFileList._parse_template_lineNs(���
�
����q���'+�+��+�3���O�O��5�z�A�~�,�<�v�E���27�q�r��;��A��Q���H�;�
�A�
A��5�z�A�~�,�B�V�K����u�Q�x�(�C�16�q�r��;��A��Q���H�;�
�)�
)��5�z�Q��,�9�F�B���'�u�Q�x�0�K�(�)>��)G�H�H���#�{�3�3��#<��<s�C%�
C*c���|j|�\}}}}|dk(rU|jddj|�z�|D],}|j|d��r�t	j
d|��.y|dk(rU|jddj|�z�|D],}|j
|d��r�t	j
d	|��.y|d
k(rU|jddj|�z�|D],}|j|d��r�t	j
d
|��.y|dk(rU|jddj|�z�|D],}|j
|d��r�t	j
d|��.y|dk(re|jdj|dj|���|D]/}|j||��r�d}t	j
|||��1y|dk(rc|jdj|dj|���|D]-}|j
||��r�t	j
d||��/y|dk(r?|jd|z�|jd|��st	j
d|�yy|dk(r?|jd|z�|j
d|��st	j
d|�yytd|z��)Nr5zinclude � r)�anchorz%warning: no files found matching '%s'r6zexclude z9warning: no previously-included files found matching '%s'r7zglobal-include rz>warning: no files found matching '%s' anywhere in distributionr8zglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionr:zrecursive-include {} {})�prefixz:warning: no files found matching '%s' under directory '%s'r;zrecursive-exclude {} {}zNwarning: no previously-included files matching '%s' found under directory '%s'r=zgraft z+warning: no directories found matching '%s'r>zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')	rErr*�include_patternr�warning�exclude_pattern�formatr)rr?rArBrrC�patternrs        r�process_template_linezFileList.process_template_linels���04�/H�/H��/N�,���3��
�Y�����Z�#�(�(�8�*<�<�=�#���+�+�G�A�+�>��K�K� G��Q�$��y�
 ����Z�#�(�(�8�*<�<�=�#���+�+�G�A�+�>��K�K�2� ��$��'�
'����.����(�1C�C�D�#���+�+�G�A�+�>��K�K�7� ��$��'�
'����.����(�1C�C�D�#���+�+�G�A�+�>��K�K�B� ��$��*�
*����6�=�=�c�3�8�8�H�CU�V�W�#���+�+�G�C�+�@�W���K�K��W�c�2�$��*�
*����6�=�=�c�3�8�8�H�CU�V�W�#���+�+�G�C�+�@��K�K�>� ��
�$��w�
����X��3�4��'�'��[�'�A����I�;�W�B��w�
����X��3�4��'�'��[�'�A����P���B�)�9�F�B��
rc�B�d}t||||�}|jd|jz�|j�|j	�|jD]E}|j|�s�|jd|z�|jj|�d}�G|S)a�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        Fz%include_pattern: applying regex r'%s'z adding T)�translate_patternrrNrr�searchr
r)rrNrHrI�is_regex�files_found�
pattern_re�names        rrJzFileList.include_pattern�s���4��&�w����I�
����@�:�CU�CU�U�V��=�=� ��L�L�N��M�M�D�� � ��&�� � ��d�!2�3��
�
�!�!�$�'�"��	"�
�rc�P�d}t||||�}|jd|jz�tt	|j
�dz
dd�D]Q}|j
|j
|�s�"|jd|j
|z�|j
|=d}�S|S)aRemove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        Fz%exclude_pattern: applying regex r'%s'rr/z
 removing T)rQrrNr0r1r
rR)rrNrHrIrSrTrUr2s        rrLzFileList.exclude_pattern�s�����&�w����I�
����@�:�CU�CU�U�V��s�4�:�:���*�B��3�A�� � ����A��/�� � ���
�
�1�
�!=�>��J�J�q�M�"��	4�
�r)NN�rNr)�__name__�
__module__�__qualname__�__doc__rrr'�curdirrrrr"r-r3rErOrJrL�rrr	r	sO����!��)�)�%�� �!�9�"�4�<Z�|'�Rrr	c��tjtj|d���}d�|D�}ttjj
|�S)z%
    Find all files under 'path'
    T)�followlinksc3�rK�|]/\}}}|D]$}tjj||����&�1y�wr)r'r(r*)�.0�base�dirsr
�files     r�	<genexpr>z#_find_all_simple.<locals>.<genexpr>
s5�����:D�%6�T�4��QV�������T�4� �QV� �*�s�57)�_UniqueDirs�filterr'�walkr(�isfile)r(�
all_unique�resultss   r�_find_all_simplermsE���#�#�B�G�G�D�d�$C�D�J��:D��G��"�'�'�.�.�'�*�*rc�&�eZdZdZd�Zed��Zy)rgz�
    Exclude previously-seen dirs from walk results,
    avoiding infinite recursion.
    Ref https://bugs.python.org/issue44497.
    c��|\}}}tj|�}|j|jf}||v}|r|dd�=|j	|�|S)z�
        Given an item from an os.walk result, determine
        if the item represents a unique dir for this instance
        and if not, prevent further traversal.
        N)r'�stat�st_dev�st_ino�add)r�	walk_itemrcrdr
rp�	candidate�founds        r�__call__z_UniqueDirs.__call__sW��&���d�E��w�w�t�}���K�K����,�	��T�!����Q��������y�rc�$�t|�|�Sr)rh)�clsr#s  rrhz_UniqueDirs.filter)s���c�e�U�#�#rN)rYrZr[r\rw�classmethodrhr^rrrgrgs ���
��$��$rrgc���t|�}|tjk(r;tjtj
j|��}t||�}t|�S)z�
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )�start)	rmr'r]�	functools�partialr(�relpathr&�list)rr
�make_rels   rrr.sJ��

�S�!�E�
�b�i�i���$�$�R�W�W�_�_�C�@���H�e�$����;�rc��tj|�}tj}tjdk(rd}d|z}t	j
d||�}|S)z�Translate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    �\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translater'�sep�re�sub)rNrUr��escapeds    r�
glob_to_rer�:sT���"�"�7�+�J�
�&�&�C�	�v�v��~����3��G����-�w�
�C�J��rc���|r't|t�rtj|�S|St	d�jd�\}}}|r/t	|�}|j
|�r|j|�sJ�d}|��t	|�}|j
|�r|j|�sJ�|t|�t|�t|�z
}tj}	tjdk(rd}	|t|�t|�t|�z
}dj|||	||�}n |rdj||t|�d�}tj|�S)aTranslate a shell-like wildcard pattern to a compiled regular
    expression.  Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    �_�Nr�z\\z{}\A{}{}.*{}{}z{}\A{})�
isinstance�strr��compiler��	partition�
startswith�endswithr1r'r�rM)
rNrHrIrSr|r��endrU�	prefix_rer�s
          rrQrQQs@����g�s�#��:�:�g�&�&��N��s�O�-�-�c�2�M�E�1�c����(�
��$�$�U�+�
�0C�0C�C�0H�H�H��
�
���v�&�	��#�#�E�*�y�/A�/A�#�/F�F�F��c�%�j�3�y�>�C��H�+D�E�	��f�f��
�6�6�T�>��C���E�
�S��_�s�3�x�-G�H�
�&�-�-�e�Y��Z�QT�U�
��"�)�)�%��C��J�L�1I�J�J�
�:�:�j�!�!rrX)r\r'r�r�r}�utilr�errorsrr�_logrr	rm�setrgr]rr�rQr^rr�<module>r�sW���
�	����B��q�q�n+�$�#�$�6�	�	�	��.""rpython3.12/site-packages/setuptools/_distutils/__pycache__/bcppcompiler.cpython-312.pyc000064400000027371151732703650025132 0ustar00�

��_i�9���dZddlZddlZddlmZmZmZmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZej$d	e�Gd
�de
�Zy)z�distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
�N�)�DistutilsExecError�CompileError�LibError�	LinkError�UnknownFileError)�	CCompiler�gen_preprocess_options)�
write_file)�newer)�logz�bcppcompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.c���eZdZdZdZiZdgZgd�ZeezZdZ	dZ
dZdxZZ
d	Zd�fd
�	Z							dd�Z	dd�Z										dd
�Zdd�Zdd�Z					dd�Z�xZS)�BCPPCompilerzConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    �bcppz.c)z.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exec����t�|�|||�d|_d|_d|_d|_gd�|_gd�|_gd�|_gd�|_	g|_
gd�|_gd�|_y)	Nz	bcc32.exezilink32.exeztlib.exe)�/tWMz/O2�/q�/g0)rz/Odrr)z/Tpd�/Gnr�/x)rrr)rrrz/r)
�super�__init__�cc�linker�lib�preprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debug�ldflags_static�ldflags_exe�ldflags_exe_debug)�self�verbose�dry_run�force�	__class__s    ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/bcppcompiler.pyrzBCPPCompiler.__init__Bsk���
����'�5�1����#������"&���;���%A��"�9���$?��!� ���.���!:���c	�Z�|j||||||�\}}	}}
}|xsg}|jd�|r|j|j�n|j|j�|	D]�}
	||
\}}tjj|�}tjj|
�}
|jtjj|
��|dk(r�~|dk(r	|jdd|
|g���||jvrd}n||jvrd}nd}d|
z}	|j|j g|z|
z||gz|z|gz���|	S#t
$rY��wxYw#t$r}t|��d}~wwxYw#t$r}t|��d}~wwxYw)	Nz-c�.res�.rc�brcc32z-fo�z-P�-o)�_setup_compile�append�extendrr�KeyError�os�path�normpath�mkpath�dirname�spawnrr�
_c_extensions�_cpp_extensionsr)r$�sources�
output_dir�macros�include_dirs�debug�
extra_preargs�extra_postargs�depends�objects�pp_opts�build�compile_opts�obj�src�ext�msg�	input_opt�
output_opts                   r)�compilezBCPPCompiler.compileYs���;?�:M�:M����g�w��;
�7�����%�%�*������D�!������ :� :�;����� 4� 4�5��C�
� ��:���S��'�'�"�"�3�'�C��'�'�"�"�3�'�C�
�K�K�������,�-��f�}���e�|�,��J�J��%��c�:�;���d�(�(�(��	���,�,�,� �	�
�	����J�


(��
�
��W�W�I�"�#���!�*�-�.�%�	%�
�e���Q�f���a�
��
�� *�,�&�s�+�+��,��:&�
(�"�3�'�'��
(�sB�3E%�3E5�3.F�%	E2�1E2�5	F�>F	�	F�	F*�F%�%F*c�2�|j||�\}}|j||��}|j||�r+|dg|z}|r		|j|jg|z�ytjd|�y#t
$r}t
|��d}~wwxYw)N)r>z/u�skipping %s (up-to-date))	�_fix_object_args�library_filename�
_need_linkr:rrrr
rA)	r$rE�output_libnamer>rA�target_lang�output_filename�lib_argsrLs	         r)�create_static_libzBCPPCompiler.create_static_lib�s���!%� 5� 5�g�z� J���*��/�/��:�/�V���?�?�7�O�4�'��.��8�H���
$��
�
�D�H�H�:��0�1�
�I�I�0�/�B��&�
$��s�m�#��
$�s�A=�=	B�B�Bc���|j||�\}}|j|||�\}}}|rtjdt	|��|� t
jj||�}|j||��r6|tjk(r$d}|	r|jdd}n3|jdd}n#d}|	r|jdd}n|jdd}|�d}n�t
jj|�\}}t
jj!|�\}}t
jj#|d�}t
jj|d|z�}dg}|xsgD]#}|j%dj'||���%|j)t*||fd	|z�t-t
jj.|�}|g}g}|D]i}t
jj!t
jj1|��\}}|d
k(r|j%|��Y|j%|��k|D]3}|j%dt
jj/|�z��5|j%d�|j3|�|j3d
|g�|j%d�|D]:}|j5|||	�}|�|j%|��*|j%|��<|j3d�|j3d
|g�|j%d
�|j3|�|
r|
|dd|r|j3|�|j7t
jj#|��	|j9|j:g|z�ytj@d|�y#t<$r}t?|��d}~wwxYw)Nz7I don't know what to do with 'runtime_library_dirs': %s�c0w32�c0d32r/rz%s.def�EXPORTSz  {}=_{}z
writing %sr,z/L%sz/L.�,z,,)�import32�cw32mtrQ)!rR�
_fix_lib_argsr
�warning�strr5r6�joinrTr	�
EXECUTABLEr#r"r r�split�splitextr9r2�format�executer�mapr7�normcaser3�find_library_filer8r:rrrrA) r$�target_descrErWr>�	libraries�library_dirs�runtime_library_dirs�export_symbolsrArBrC�
build_temprV�startup_obj�ld_args�def_file�head�tail�modnamerK�temp_dir�contents�sym�objects2�	resources�file�base�ellr�libfilerLs                                 r)�linkzBCPPCompiler.link�sj��&!%� 5� 5�g�z� J���*�:>�:L�:L��|�%9�;
�7��L�"6� ��K�K�I��(�)�
�
�!� �g�g�l�l�:��G�O��?�?�7�O�4��i�2�2�2�%���"�4�4�Q�7�G�"�.�.�q�1�G�%���"�7�7��:�G�"�1�1�!�4�G��%����W�W�]�]�?�;�
��d�!�w�w�/�/��5�����7�7�?�?�7�1�:�6���7�7�<�<��(�W�2D�E��%�;��)�/�R�/�C��O�O�J�$5�$5�c�3�$?�@�0����Z�(�H�)=�|�h�?V�W��2�7�7�+�+�W�5�H�#�m�G��I� �� �g�g�.�.�r�w�w�/?�/?��/E�F���s��&�=��$�$�T�*��N�N�4�(�!�$�����v����(8�(8��(=�=�>�$��N�N�5�!�
�N�N�7�#�
�N�N�C��1�2��N�N�4� � ���0�0��s�E�J���?��N�N�3�'��N�N�7�+�!�
�N�N�1�2�
�N�N�C��?�+��N�N�3���N�N�9�%��+���������~�.��K�K�������8�9�
%��
�
�D�K�K�=�7�2�3�

�I�I�0�/�B��	&�
%���n�$��
%�s�O�	O)�O$�$O)c��|r|dz}|dz|dz||f}n|dz|f}|D]]}|D]V}tjj||j|��}tjj	|�s�R|ccS�_y)N�_d�_bcpp)r5r6rdrS�exists)	r$�dirsrrA�dlib�	try_names�dir�namer�s	         r)rlzBCPPCompiler.find_library_file>s������:�D�����w���c�B�I��w���,�I��C�!���'�'�,�,�s�D�,A�,A�$�,G�H���7�7�>�>�'�*�"�N�"��r*c��|�d}g}|D�]>}tjjtjj|��\}}||jddgzvrtdj
||���|rtjj|�}|dk(r3|jtjj|||z����|dk(r4|jtjj||dz����|jtjj|||jz����A|S)Nr/r-r,z"unknown file type '{}' (from '{}'))r5r6rgrk�src_extensionsrrh�basenamer2rd�
obj_extension)r$�source_filenames�	strip_dirr>�	obj_names�src_namerrKs        r)�object_filenameszBCPPCompiler.object_filenamesXs�����J��	�(�H��'�'�*�*�2�7�7�+;�+;�H�+E�F�K�T�3��4�.�.�%���@�A�&�8�?�?��X�N�����w�w�'�'��-���f�}�� � ������j�$��*�!E�F����� � ������j�$��-�!H�I�� � ������j�$��AS�AS�:S�!T�U�!)�"�r*c���|jd||�\}}}t||�}dg|z}	|�|	jd|z�|r||	dd|r|	j|�|	j|�|js|�t||�rC|r.|j
tjj|��	|j|	�yy#t$r}
t|
�t|
��d}
~
wwxYw)Nz	cpp32.exer0r)�_fix_compile_argsr
r2r3r'rr8r5r6r9r:r�printr)r$�source�output_filer?r@rBrC�_rF�pp_argsrLs           r)�
preprocesszBCPPCompiler.preprocessqs���%)�$:�$:�4���$V�!��F�L�(���>���-�'�)���"��N�N�4�+�-�.��'�G�B�Q�K���N�N�>�*����v��
�:�:��,��f�k�0J�����B�G�G�O�O�K�8�9�
(��
�
�7�#�	1K��
&�
(��c�
�"�3�'�'��
(�s�6C	�		C-�C(�(C-)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr/)NNNNN)�__name__�
__module__�__qualname__�__doc__�
compiler_type�executablesr;r<r�r��static_lib_extension�shared_lib_extension�static_lib_format�shared_lib_format�
exe_extensionrrOrYr�rlr�r��
__classcell__)r(s@r)rr's������M��K��F�M�-�O�#�_�4�N��M�!��!��,2�2��)��M�;�4�������H�ZNR�C�0���!�������@C�L�4�8�����(r*r)r�r5�warnings�errorsrrrrr�	ccompilerr	r
�	file_utilr�	_modifiedr�_logr
�warn�DeprecationWarningr�r*r)�<module>r�sR���
����9�!�����
�
�4��	�h(�9�h(r*python3.12/site-packages/setuptools/_distutils/__pycache__/util.cpython-312.pyc000064400000045056151732703650023430 0ustar00�

��_i�F��V�dZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZddl
mZddlmZddlmZd�Zd	�Zej(d
k(rdadZd�Zd
�Zd�Zd�Zd�Zd�Ze	j:�d��Zd�Zd�Z dd�Z!dxa"xa#a$d�Z%d�Z&dd�Z'd�Z(							dd�Z)d�Z*y)zudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
�N�)�DistutilsPlatformError�DistutilsByteCompileError)�newer)�spawn)�logc���tjdkrUtjdk(rBdtjj�vrydtjj�vrytjdkrUtjdk(rBt
td	�r2tj�\}}}}}|d
ddk(rd
dlm	}||||�Stj�S)z�
    Return a string that identifies the current platform. Use this
    function to distinguish platform-specific build directories and
    platform-specific built distributions.
    )���ntz(arm)�	win-arm32z(arm64)�	win-arm64)r
�	�posix�unameNr
�aixr)�aix_platform)�sys�version_info�os�name�version�lower�hasattrr�
py38compatr�	sysconfig�get_platform)�osname�host�releaser�machiners      ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/util.py�get_host_platformr#s������&� �
�7�7�d�?��#�+�+�+�+�-�-�"��C�K�K�-�-�/�/�"�
���&� �
�7�7�g��'�"�g�"6�68�h�h�j�3�F�D�'�7�G��b�q�z�U�"�4�#�F�G�W�=�=��!�!�#�#�c���tjdk(rCddddd�}tjjd�}|j|�xs
t	�St	�S)Nr�win32z	win-amd64r
r)�x86�x64�arm�arm64�VSCMD_ARG_TGT_ARCH)rr�environ�getr#)�TARGET_TO_PLAT�targets  r"rr3sX��	�w�w�$����� �	
������� 4�5���!�!�&�)�@�->�-@�@���r$�darwin�MACOSX_DEPLOYMENT_TARGETc��day)zFor testing only. Do not call.N)�_syscfg_macosx_ver�r$r"�_clear_cached_macosx_verr5Es
���r$c�b�t�$ddlm}|jt�xsd}|r|atS)z�Get the version of macOS latched in the Python interpreter configuration.
    Returns the version as a string or None if can't obtain one. Cached.r)r�)r3�	distutilsr�get_config_var�MACOSX_VERSION_VAR)r�vers  r"�!get_macosx_target_ver_from_syscfgr<Ks4���!�'�&�i�&�&�'9�:�@�b���!$���r$c���t�}tjjt�}|rB|r>t|�ddgk\r.t|�ddgkrdtzd|�d|�d�z}t
|��|S|S)aReturn the version of macOS for which we are building.

    The target version defaults to the version in sysconfig latched at time
    the Python interpreter was built, unless overridden by an environment
    variable. If neither source has a value, then None is returned�
r
�$z mismatch: now "z" but "z*" during configure; must use 10.3 or later)r<rr,r-r:�
split_versionr)�
syscfg_ver�env_ver�my_msgs   r"�get_macosx_target_verrDXs���3�4�J��j�j�n�n�/�0�G��
��j�)�b�!�W�4��g�&�"�a��0��(�(�,3�Z�,A�A�
�
)��0�0����r$c�\�|jd�D�cgc]
}t|���c}Scc}w)zEConvert a dot-separated string into a list of numbers for comparisons�.)�split�int)�s�ns  r"r@r@xs&���G�G�C�L�)�L�q�C��F�L�)�)��)s�)c�>�tjdk(r|S|s|S|ddk(rtd|z��|ddk(rtd|z��|jd�}d|vr|j	d�d|vr�|stj
Stjj|�S)a�Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    �/rzpath '%s' cannot be absolute���zpath '%s' cannot end with '/'rF)r�sep�
ValueErrorrG�remove�curdir�path�join)�pathname�pathss  r"�convert_pathrV}s���
�v�v��}��������{�c���7�(�B�C�C���|�s���8�8�C�D�D��N�N�3��E�

��,�
���S����,���y�y��
�7�7�<�<���r$c���tjdk(rbtjj|�s tjj	||�Stjj	||dd�Stjdk(rOtjj|�\}}|ddk(r|dd}tjj	||�St
dtj�d���)	a	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    rrNrr�\znothing known about platform '�')rrrR�isabsrS�
splitdriver)�new_rootrT�driverRs    r"�change_rootr^�s���
�w�w�'���w�w�}�}�X�&��7�7�<�<��(�3�3��7�7�<�<��(�1�2�,�7�7�	���D�����*�*�8�4�
�����7�d�?����8�D��w�w�|�|�H�d�+�+�
 �#A�"�'�'��!�!L�
M�Mr$c�L�tjdk(rNdtjvr<	ddl}|j	tj
��dtjd<dtjvrt�tjd<yy#ttf$rY�@wxYw)aLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    r�HOMErN��PLAT)	rrr,�pwd�getpwuid�getuid�ImportError�KeyErrorr)rcs r"�
check_environrh�s���
�w�w�'��f�B�J�J�6�	��!$���b�i�i�k�!:�1�!=�B�J�J�v���R�Z�Z��)�^��
�
�6�� ���X�&�	�
�	�s�;B�B#�"B#c��t�ttj�}|j	d�|j�D��	t
|�j|�S#t$r}td|����d}~wwxYw)a�
    Perform variable substitution on 'string'.
    Variables are indicated by format-style braces ("{var}").
    Variable is substituted by the value found in the 'local_vars'
    dictionary or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    c3�<K�|]\}}|t|�f���y�w�N��str)�.0r�values   r"�	<genexpr>zsubst_vars.<locals>.<genexpr>�s ����K�8J���u�4��U��$�8J�s�zinvalid variable N)
rh�dictrr,�update�items�
_subst_compat�
format_maprgrO)rI�
local_vars�lookup�vars    r"�
subst_varsry�sp���O�
�"�*�*�
�F�
�M�M�K�
�8H�8H�8J�K�K�4��Q��*�*�6�2�2���4��,�S�E�2�3�3��4�s�A%�%	B�.A<�<Bc�x�d�}tjd||�}||k7rddl}|jdt�|S)zb
    Replace shell/Perl-style variable substitution with
    format-style. For compatibility.
    c�,�d|jd��d�S)N�{r�})�group)�matchs r"�_substz_subst_compat.<locals>._subst�s���E�K�K��N�#�2�&�&r$z\$([a-zA-Z_][a-zA-Z_0-9]*)rNz-shell/Perl-style substitutions are deprecated)�re�sub�warnings�warn�DeprecationWarning)rIr��replr�s    r"rtrt�s?��'��6�6�/���;�D��q�y���
�
�;��	
��Kr$c��|t|�zSrkrl)�exc�prefixs  r"�grok_environment_errorr��s���C��H��r$c��tjdtjz�atjd�atjd�ay)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r��compile�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rer4r$r"�_init_regexr��s:���J�J�/�&�2C�2C�C�D�M����0�1�J����0�1�Jr$c�*�t�
t�|j�}g}d}|�rktj||�}|j	�}|t|�k(r|j
|d|�	|S||tjvr*|j
|d|�||dj�}d}n�||dk(r|d|||dzdz}|dz}n�||dk(rtj||�}n0||dk(rtj||�}ntd||z��|�td||z��|j�\}}|d|||dz|dz
z||dz}|j	�d	z
}|t|�k\r|j
|�	|S|r��k|S)
aSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    NrrXrrY�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)�)r�r��stripr�end�len�appendr�r��lstripr�r��RuntimeErrorrO�span)rI�words�pos�mr��begs      r"�split_quotedr��s������
�	���	�A��E�
�C�
�����3�'���e�e�g���#�a�&�=��L�L��4�C��!��D�L�A
�S�6�V�&�&�&�
�L�L��4�C��!��#�$���� �A��C�
�s�V�t�^��$�3��!�C�!�G�I�,�&�A���'�C���v��}��$�$�Q��,���3��3���$�$�Q��,��"�#F��3��#O�P�P��y� �!E��#��!N�O�O�����J�S�#��$�3��!�C�!�G�c�A�g�.�.��3�4��8�A��%�%�'�A�+�C��#�a�&�=��L�L��O���L�O�N�Lr$c��|�,dj|j|�}|dddk(r|dddz}tj|�|s||�yy)a�Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    Nz{}{!r}���z,)r�))�format�__name__r�info)�func�args�msg�verbose�dry_runs     r"�executer�AsT���{��o�o�d�m�m�T�2���r�s�8�t���a��)�c�/�C��H�H�S�M���d��r$c�j�|j�}|dvry|dvrytdj|���)z�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    )�y�yes�t�true�on�1r)rJ�no�f�false�off�0rzinvalid truth value {!r})rrOr�)�vals r"�	strtoboolr�Ts>���)�)�+�C�
�2�2��	�5�	5���3�:�:�3�?�@�@r$c�^�tjrtd��|�|dk(}|�s1	ddlm}|d�\}	}
tjd|
�|s�|	�tj|	d�}nt|
d�}|5|jd	�|jd
jtt|��dz�|jd|�d
|�d|�d|�d|�d��ddd�tj g}
|
j#t%j&��|
j)|
�t+|
|��t-tj.|
fd|
z|��yddlm}|D�]}|dddk7r�
|dk\r+|dk(rdn|}t4j6j9||��}nt4j6j9|�}|}|r0|dt;|�|k7rt=d|�d|����|t;|�d}|r tj>j||�}tj>jA|�}|s��|stC||�r&tjd||�|r��||||���tjDd||���!y#t
$rddlm}d|d�}
}	Y��fwxYw#1swY���xYw)a~Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    zbyte-compiling is disabled.Nr)�mkstempz.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z
byte_compile(files, optimize=z, force=z,
             prefix=z, base_dir=z,
             verbose=z$, dry_run=0,
             direct=1)
)r�zremoving %s)r����r7)�optimizationzinvalid prefix: filename z doesn't start with zbyte-compiling %s to %sz%skipping byte-compilation of %s to %s)#r�dont_write_bytecoder�tempfiler�rfr�rr�r�fdopen�open�writerS�map�repr�
executable�extend�
subprocess�"_optim_args_from_interpreter_flagsr�rr�rP�
py_compiler��	importlib�util�cache_from_sourcer�rOrR�basenamer�debug)�py_files�optimize�forcer��base_dirr�r��directr��	script_fd�script_namer��script�cmdr��file�opt�cfile�dfile�
cfile_bases                    r"�byte_compiler�dsh��P���'�(E�F�F��~�'�1�}���	;�(�'.�u�~�$�Y��
	���7��E���$����9�c�2���k�3�/��������"���U�Z�Z��D�(�(;�<�u�D�E���� ����'�
C��'�:�~�~����
�
�:�@�@�B�C��
�
�;��
�c�7�#���	�	�K�>�=�;�+F�PW�X�	'��D��B�C�y�E�!��
�1�}�$��M�b�x��!���8�8��C�8�P��!���8�8��>���E���
�#�f�+�&�&�0�$���)����c�&�k�m�,��������X�u�5�����)�)�%�0�J���E�$��.��H�H�6��j�I�"���e�U�3��I�I�E�t�Z�X�A��k�	;�'�'+�V�E�]��Y�	;����s�J�7A$J"�J�J�"J,c�J�|jd�}d}|j|�S)z�Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    �
z	
        )rGrS)�header�linesrNs   r"�
rfc822_escaper��s%��
�L�L���E�
�C��8�8�E�?�r$)zerror: )Nrr)rrNNrrN)+�__doc__�importlib.utilr�rr�r�r�rr�	functools�errorsrr�	_modifiedrr�_logrr#r�platformr3r:r5r<rDr@rVr^�	lru_cacherhryrtr�r�r�r�r�r�r�r�r�r�r4r$r"�<module>r�s�����	�	�
��
���E����$�:
��<�<�8����/���
��@*�
 �:N�*�����,��,�,4�&�(�+/�.�
�.�
�Z�2�<�D�&
A�$�
��
�
�
��TY�nr$python3.12/site-packages/setuptools/_distutils/__pycache__/version.cpython-312.pyc000064400000024374151732703650024140 0ustar00�

��_i�2���dZddlZddlZddlZejd��ZGd�d�ZGd�de�ZGd�d	e�Zy)
a�Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
�Nc#�K�tjd��5}tjdtd��|��ddd�y#1swYyxYw�w)NT)�record�defaultz)distutils Version classes are deprecated.)�action�category�message)�warnings�catch_warnings�filterwarnings�DeprecationWarning)�ctxs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/version.py�suppress_known_deprecationr"s?����	�	 �	 ��	-������'�?�	
�
�	�

.�	-�	-�s�A�!A�	A�A�Ac�<�eZdZdZd
d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
y)�Versionz�Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    Nc�b�|r|j|�tjdtd��y)NzHdistutils Version classes are deprecated. Use packaging.version instead.�)�
stacklevel)�parser	�warnr��self�vstrings  r�__init__zVersion.__init__4s(����J�J�w���
�
�
-���		
�c�`�dj|jjt|��S)Nz	{} ('{}'))�format�	__class__�__name__�str�rs r�__repr__zVersion.__repr__>s#���!�!�$�.�.�"9�"9�3�t�9�E�Erc�B�|j|�}|tur|S|dk(S�Nr��_cmp�NotImplemented�r�other�cs   r�__eq__zVersion.__eq__A�&���I�I�e�������H��A�v�
rc�B�|j|�}|tur|S|dkSr$r%r(s   r�__lt__zVersion.__lt__G�&���I�I�e�������H��1�u�rc�B�|j|�}|tur|S|dkSr$r%r(s   r�__le__zVersion.__le__Mr,rc�B�|j|�}|tur|S|dkDSr$r%r(s   r�__gt__zVersion.__gt__Sr/rc�B�|j|�}|tur|S|dk\Sr$r%r(s   r�__ge__zVersion.__ge__Yr,r�N)r�
__module__�__qualname__�__doc__rr"r+r.r1r3r5�rrrr-s+���
�F�����rrc�v�eZdZdZej
dejejz�Zd�Z	d�Z
d�Zy)�
StrictVersiona?Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    z)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$c�\�|jj|�}|std|z��|jddddd�\}}}}}|r"t	tt|||g��|_n#t	tt||g��dz|_|r|dt
|�f|_yd|_y)	Nzinvalid version number '%s'�r���)rr)	�
version_re�match�
ValueError�group�tuple�map�int�version�
prerelease)rrrC�major�minor�patchrJ�prerelease_nums        rrzStrictVersion.parse�s������%�%�g�.����:�W�D�E�E�<A�K�K��1�a�QR�TU�<V�9���u�j�.�� ��S�5�%��*?�!@�A�D�L� ��S�5�%�.�!9�:�T�A�D�L��)�!�}�c�.�.A�B�D�O�"�D�Orc�D�|jddk(r-djtt|jdd��}n)djtt|j��}|jr+||jdzt|jd�z}|S)Nrr�.r>)rI�joinrGr rJrs  r�__str__zStrictVersion.__str__�s}���<�<��?�a���h�h�s�3����Q�q�(9�:�;�G��h�h�s�3����5�6�G��?�?������ 2�2�S�����9K�5L�L�G��rc�J�t|t�rt�5t|�}ddd�nt|t�stS|j
|j
k7r|j
|j
kryy|js
|jsy|jr
|jsy|js
|jry|jrA|jr5|j|jk(ry|j|jkryyJd��#1swY��xYw)N���r>rznever get here)�
isinstancer rr<r'rIrJ�rr)s  rr&zStrictVersion._cmp�s����e�S�!�+�-�%�e�,��.�-��E�=�1�!�!��<�<�5�=�=�(��|�|�e�m�m�+������u�'7�'7��
�_�_�U�%5�%5�����U�%5�%5��
�_�_��!1�!1����%�"2�"2�2�����5�#3�#3�3���*�*�*�5�C.�-�s�D�D"N)rr7r8r9�re�compile�VERBOSE�ASCIIrBrrRr&r:rrr<r<qs;��!�F����4�b�j�j�2�8�8�6K��J�#�"	�#+rr<c�b�eZdZdZej
dej�Zd�Zd�Z	d�Z
d�Zy)�LooseVersiona�Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    z(\d+ | [a-z]+ | \.)c���||_|jj|�D�cgc]
}|s�|dk7s�|��}}t|�D]\}}	t	|�||<�||_ycc}w#t
$rY�/wxYw)NrP)r�component_re�split�	enumeraterHrDrI)rr�x�
components�i�objs      rrzLooseVersion.parseCs������!%�!2�!2�!8�!8��!A�T�!A�A�Q�1�PS�8�a�!A�
�T��
�+�F�A�s�
� #�C��
�1�
�,�"����U���
��
�s!�A#�A#�A#�A(�(	A4�3A4c��|jSr6)rr!s rrRzLooseVersion.__str__Qs���|�|�rc��dt|�zS)NzLooseVersion ('%s'))r r!s rr"zLooseVersion.__repr__Ts��$�s�4�y�0�0rc��t|t�rt|�}nt|t�stS|j|jk(ry|j|jkry|j|jkDryy)NrrTr>)rUr r\r'rIrVs  rr&zLooseVersion._cmpWsd���e�S�!� ��'�E��E�<�0�!�!��<�<�5�=�=�(���<�<�%�-�-�'���<�<�%�-�-�'��(rN)rr7r8r9rWrXrYr^rrRr"r&r:rrr\r\ s4���>�2�:�:�4�b�j�j�A�L�"��1�rr\)	r9rWr	�
contextlib�contextmanagerrrr<r\r:rr�<module>rjsW���&
���������0�0�Hh+�G�h+�^B�7�Brpython3.12/site-packages/setuptools/_distutils/__pycache__/cygwinccompiler.cpython-312.pyc000064400000027652151732703650025653 0ustar00�

��_i�.��>�dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZmZmZmZddlmZmZdd	lmZej.d
gdgdgd
gdgdgdgdgej0d�	�Zd�ZdZGd�de
�ZGd�de�ZdZdZdZ d�Z!d�Z"dZ#y)adistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
�N)�check_output�)�
UnixCCompiler)�
write_file)�DistutilsExecError�DistutilsPlatformError�CCompilerError�CompileError)�LooseVersion�suppress_known_deprecation)�RangeMap�msvcr70�msvcr71�msvcr80�msvcr90�msvcr100�msvcr110�msvcr120�vcruntime140)	iiixi�i@i�iili�c���tjdtj�}	t	|jd��}	t|S#t$rYywxYw#t$rtd|z��wxYw)zaInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    zMSC v\.(\d{4})rNzUnknown MS Compiler version %s )
�re�search�sys�version�int�group�AttributeError�
_msvcr_lookup�KeyError�
ValueError)�match�msc_vers  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/cygwinccompiler.py�	get_msvcrr$4sx��
�I�I�'����5�E���e�k�k�!�n�%��F��W�%�%��������F��:�W�D�E�E�F�s�A
�A�
	A�A�A1zxUnable to set runtime library search path on Windows, usually indicated by `runtime_library_dirs` parameter to Extensionc���eZdZdZdZdZdZdZdZdZ	dZ
dZd	Zd�fd
�	Z
ed��Zd�Z										dd
�Zd�Z�fd�Ze�fd��Z�xZS)�CygwinCCompilerz9Handles the Cygwin port of the GNU C compiler to Windows.�cygwinz.oz.az.dll.az.dllzlib%s%szcyg%s%sz.exec
�\��t�|�|||�t�\}}|jdj	||��|t
ur|j
d|z�tjjdd�|_
tjjdd�|_|j|_d}|jd|jzd	|jzd|jzd
|jzdj	|j|���t�|_y)
Nz%Python's GCC status: {} (details: {})z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.�CC�gcc�CXXzg++�-sharedz%s -mcygwin -O -Wallz%s -mcygwin -mdll -O -Wallz%s -mcygwinz{} -mcygwin {}��compiler�compiler_so�compiler_cxx�
linker_exe�	linker_so)�super�__init__�check_config_h�debug_print�format�CONFIG_H_OK�warn�os�environ�get�cc�cxx�
linker_dll�set_executablesr$�
dll_libraries)�self�verbose�dry_run�force�status�details�
shared_option�	__class__s       �r#r4zCygwinCCompiler.__init__Vs���
����'�5�1�(�*�������3�:�:�6�7�K�	
���$��I�I�O�QX�Y�
��*�*�.�.��u�-����:�:�>�>�%��/����'�'���!�
����+�d�g�g�5�4�t�w�w�>�/�$�(�(�:�$�t�w�w�.�'�.�.�t���
�N�	�	
�'�[���c��tjdtd��t�5t	d�cddd�S#1swYyxYw)Nz�gcc_version attribute of CygwinCCompiler is deprecated. Instead of returning actual gcc version a fixed value 11.2.0 is returned.�)�
stacklevelz11.2.0)�warningsr9�DeprecationWarningrr)rBs r#�gcc_versionzCygwinCCompiler.gcc_versionvs8��	�
�
�
X���		
�(�
)���)�*�
)�
)�s	�<�Ac��|dvr	|jdd|d|g�y	|j|j|z|d|gz|z�y#t$r}t|��d}~wwxYw#t$r}t|��d}~wwxYw)z:Compiles the source by spawning GCC and windres if needed.)�.rc�.res�windresz-iz-oN)�spawnrr
r/)rB�obj�src�ext�cc_args�extra_postargs�pp_opts�msgs        r#�_compilezCygwinCCompiler._compile�s����/�!�
(��
�
�I�t�S�$��<�=�
(��
�
��$�$�w�.�#�t�S�1A�A�N�R���	&�
(�"�3�'�'��
(��&�
(�"�3�'�'��
(�s.�A�'A"�	A�A�A�"	A;�+A6�6A;c��tj|
xsg�}
tj|xsg�}tj|xsg�}|r|jt�|j|j�|��||j
k7s|jdk(r�tjj|d�}tjjtjj|��\}}tjj||dz�}dtjj|�zdg}|D]}|j|��|jt||fd|z�|j|�|	s|
jd�t!j"||||||||d|	|
|||
�y)	zLink the objects.Nr*rz.defz
LIBRARY %s�EXPORTSz
writing %sz-s)�copyr9�_runtime_library_dirs_msg�extendrA�
EXECUTABLEr?r:�path�dirname�splitext�basename�join�append�executerr�link)rB�target_desc�objects�output_filename�
output_dir�	libraries�library_dirs�runtime_library_dirs�export_symbols�debug�
extra_preargsrZ�
build_temp�target_lang�temp_dir�dll_name�
dll_extension�def_file�contents�syms                    r#rkzCygwinCCompiler.link�s���$�	�	�-�"5�2�6�
��I�I�i�o�2�.�	��)�)�G�M�r�*����I�I�/�0�	����+�+�,�
�&��4�?�?�*�d�o�o��.F��w�w���w�q�z�2�H�(*���(8�(8���� � ��1�)�%�X�}�
�w�w�|�|�H�h��.?�@�H�%�r�w�w�'7�'7��'H�H�)�T�H�%������$�&��L�L��h��%9�<�(�;R�S�

�N�N�8�$��� � ��&����������� �������	
rJc�0�|jt�gS�N)r9ra�rB�dirs  r#�runtime_library_dir_optionz*CygwinCCompiler.runtime_library_dir_option�s��	
�	�	�+�,��	rJc�d��tjj|�}t�|�|||�Sr)r:rd�normcaser3�_make_out_path)rBro�	strip_dir�src_name�
norm_src_namerIs     �r#r�zCygwinCCompiler._make_out_path�s+������(�(��2�
��w�%�j�)�]�K�KrJc�b��it�|��dD�cic]}|||jz��c}�Scc}w)z3
        Add support for rc and res files.
        )rSrR)r3�out_extensions�
obj_extension)rBrXrIs  �r#r�zCygwinCCompiler.out_extensions�sD���

��g�$�
�8G�H���s�C�$�,�,�,�,��H�
�	
��Hs�,�rrr)
NNNNNrNNNN)�__name__�
__module__�__qualname__�__doc__�
compiler_typer��static_lib_extension�shared_lib_extension�dylib_lib_extension�static_lib_format�shared_lib_format�dylib_lib_format�
exe_extensionr4�propertyrPr]rkr�r�r��
__classcell__�rIs@r#r&r&Is����C��M��M���#�� ��!��!�� ���M�)�@�*��*�(�*���!�������X
�t�L�
�
��
rJr&c�.��eZdZdZdZd�fd�	Zd�Z�xZS)�Mingw32CCompilerz:Handles the Mingw32 port of the GNU C compiler to Windows.�mingw32c
�4��t�|�|||�d}t|j�rt	d��|jd|jzd|jzd|jzd|jzdj|j|���y)Nr,z1Cygwin gcc cannot be used with --compiler=mingw32z%s -O -Wallz%s -mdll -O -Wallz%sz{} {}r-)	r3r4�is_cygwinccr=r	r@r>r7r?)rBrCrDrErHrIs     �r#r4zMingw32CCompiler.__init__s����
����'�5�1�!�
��t�w�w�� �!T�U�U����"�T�W�W�,�+�d�g�g�5�&����1��d�g�g�~��n�n�T�_�_�m�D�	�	
rJc� �tt��r)rrar�s  r#r�z+Mingw32CCompiler.runtime_library_dir_options��$�%>�?�?rJr�)r�r�r�r�r�r4r�r�r�s@r#r�r�	s���D��M�
� @rJr��okznot ok�	uncertainc���ddlm}dtjvrtdfSdtjvrtdfS|j�}	t
|�}	d|j�vrtd|zf|j�Std	|zf|j�S#|j�wxYw#t$r,}td
j||j�fcYd}~Sd}~wwxYw)awCheck if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    r)�	sysconfig�GCCzsys.version mentions 'GCC'�Clangzsys.version mentions 'Clang'�__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '{}': {}N)�	distutilsr�rrr8�get_config_h_filename�open�read�close�CONFIG_H_NOTOK�OSError�CONFIG_H_UNCERTAINr7�strerror)r��fn�config_h�excs    r#r5r5+s���*$�
������8�8�8��#�+�+���:�:�:�
�	(�	(�	*�B�
W���8��	��X�]�]�_�,�"�$>��$C�C�
�N�N��&�'I�B�'N�N��N�N���H�N�N����W�"�$<�$C�$C�B����$U�V�V��W�sB�B5�B �4B5�
B �B5� B2�2B5�5	C*�>!C%�C*�%C*c��ttj|�dgz�}|j�j	d�S)zCTry to determine if the compiler that would be used is from cygwin.z-dumpmachinescygwin)r�shlex�split�strip�endswith)r=�
out_strings  r#r�r�Zs6���e�k�k�"�o��0@�@�A�J�����&�&�y�1�1rJ)$r�r:rrr`r�rN�
subprocessr�
unixccompilerr�	file_utilr�errorsrrr	r
rrr�_collectionsr
�left�undefined_valuerr$rar&r�r8r�r�r5r��get_versions�rJr#�<module>r�s����
�	�
����#�(�!���>�"���
�
��k��k��k��k��l��l��l����&�&�#��
�.F� I��|
�m�|
�@@��@�:���� ��,W�^2���rJpython3.12/site-packages/setuptools/_distutils/__pycache__/file_util.cpython-312.pyc000064400000022667151732703650024432 0ustar00�

��_i ��^�dZddlZddlmZddlmZdddd	�Zdd
�Z						dd�Zdd�Z	d
�Z
y)zFdistutils.file_util

Utility functions for operating on single files.
�N�)�DistutilsFileError)�log�copyingzhard linkingzsymbolically linking)N�hard�symc��d}d}		t|d�}t
jj|�r	tj|�	t|d�}		|j|�}|sn	|j|��(	|r|j�|r|j�yy#t$r*}tdj||j���d}~wwxYw#t$r*}tdj||j���d}~wwxYw#t$r*}tdj||j���d}~wwxYw#t$r*}tdj||j���d}~wwxYw#t$r*}tdj||j���d}~wwxYw#|r|j�|r|j�wwxYw)	a5Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    N�rbzcould not open '{}': {}zcould not delete '{}': {}�wbzcould not create '{}': {}zcould not read from '{}': {}zcould not write to '{}': {})�open�OSErrorr�format�strerror�os�path�exists�unlink�read�write�close)�src�dst�buffer_size�fsrc�fdst�e�bufs       ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/file_util.py�_copy_file_contentsrs����D��D�*�	X���T�?�D��7�7�>�>�#��
��	�	�#��	���T�?�D��
��i�i��,����
��
�
�3������J�J�L���J�J�L���M�	X�$�%>�%E�%E�c�1�:�:�%V�W�W��	X���
�(�/�6�6�s�A�J�J�G����
���	�$�+�2�2�3��
�
�C��
��	���
�(�2�9�9�#�q�z�z�J����
���
�(�1�8�8��a�j�j�I����
��
��J�J�L���J�J�L��s��B%�F3�C�	D�F3�E�(F3�,E=�=F3�%	C�.%C�C�F3�	D�$%D	�	D�F3�	E�%D?�?E�F3�	E:�%E5�5E:�:F3�=	F0�%F+�+F0�0F3�3'Gc�|�ddlm}ddlm}	m}
m}m}tjj|�std|z��tjj|�r@|}
tjj|tjj|��}ntjj|�}
|r(|||�s|dk\rtj d|�|dfS	t"|}|dk\rptjj|�tjj|�k(rtj(d|||
�ntj(d|||�|r|dfS|d	k(rZtjj+|�r tjj-||�sy	tj.||�|dfS|d
k(rYtjj+|�r tjj-||�stj2||�|dfSt5||�|s|rVtj|�}|rtj6|||	||
f�|rtj8||||��|dfS#t$$rt'd|z��wxYw#t0$rY��wxYw)aCopy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    r)�newer)�ST_ATIME�ST_MTIME�ST_MODE�S_IMODEz4can't copy '%s': doesn't exist or not a regular filerz"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)�distutils._modifiedr!�statr"r#r$r%rr�isfiler�isdir�join�basename�dirnamer�debug�_copy_action�KeyError�
ValueError�infor�samefile�linkr
�symlinkr�utime�chmod)rr�
preserve_mode�preserve_times�updater3�verbose�dry_runr!r"r#r$r%�dir�action�sts                r�	copy_filer?Fs>��R*�9�9�
�7�7�>�>�#�� �B�S�H�
�	
�
�w�w�}�}�S�����g�g�l�l�3���� 0� 0�� 5�6���g�g�o�o�c�"��
�e�C��o��a�<��I�I�:�C�@��Q�x��J��d�#���!�|�
�7�7���C� �B�G�G�$4�$4�S�$9�9��H�H�]�F�C��5��H�H�]�F�C��5���Q�x��
��������s�#����(8�(8��c�(B�
�����S�!��Q�x��
��������s�#����(8�(8��c�(B��J�J�s�C� ���8�O���S�!���
�W�W�S�\����H�H�S�2�h�<��H��6�7���H�H�S�'�"�W�+�.�/���8�O��U�J��A�D�H�I�I�J��&�
��	
�s�)	J�2J/�J,�/	J;�:J;c�n�ddlm}m}m}m}m}ddl}	|dk\rtjd||�|r|S||�std|z��||�r'tjj|||��}n#||�rtdj||���|||��stdj||���d	}
	tj||�|
r&t%|||��	tj&|�|S|S#t$rG}|j \}}
||	j"k(rd
}
ntdj|||
���Yd}~�ud}~wwxYw#t$rQ}|j \}}
	tj&|�n#t$rYnwxYwtd
|�d|�d|�d|
����d}~wwxYw)a%Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    r)rr(r)r+r,Nrzmoving %s -> %sz#can't move '%s': not a regular filez0can't move '{}': destination '{}' already existsz2can't move '{}': destination '{}' not a valid pathFTzcouldn't move '{}' to '{}': {})r:zcouldn't move 'z' to 'z' by copy/delete: delete 'z
' failed: )�os.pathrr(r)r+r,�errnorr1rrrr*r�renamer
�args�EXDEVr?r)rrr:r;rr(r)r+r,rB�copy_itr�num�msgs              r�	move_filerI�s���A�@���!�|����"�C��-���
��#�;� �!F��!L�M�M��S�z��g�g�l�l�3���
�.��	��� �>�E�E�c�3�O�
�	
������ �@�G�G��S�Q�
�	
��G�	�
�	�	�#�s����#�s�G�,�	��I�I�c�N��J�3�J��/���V�V�
��c��%�+�+���G�$�0�7�7��S�#�F��
�
�����		����J�S�#�
��	�	�#����
��
��$�,/��c�3�@��
��
		�sT�D�.E�	E�=E�E�	F4�#F/�3F	�F/�		F�F/�F�F/�/F4c��t|d�}	|D]}|j|dz��	|j�y#|j�wxYw)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �w�
N)rrr)�filename�contents�f�lines    r�
write_filerQ�sD��	
�X�s��A���D�
�G�G�D�4�K� ��	
���	�����	�s	�;�A
)i@)rrrNrr)rr)�__doc__r�errorsr�_logrr.rr?rIrQ��r�<module>rWsP���

�&�� ��@V�W��5�v���	
�
�
�h�X:�z	rVpython3.12/site-packages/setuptools/_distutils/__pycache__/core.cpython-312.pyc000064400000021755151732703660023404 0ustar00�

��_i�$���dZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZddl
mZddlmZdd	lmZgd
�ZdZd�Zdadad
ZdZd�Zd�Zdd�Zy)a#distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
�N�)�DEBUG)�DistutilsSetupError�DistutilsError�CCompilerError�DistutilsArgError)�Distribution)�Command)�
PyPIRCCommand)�	Extension)r	r
rr�setupz�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
c�b�tjj|�}tt	�zS)N)�os�path�basename�USAGE�locals)�script_name�scripts  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/core.py�	gen_usager*s#��
�W�W�
�
�k�
*�F��6�8���)�	distclassr�script_args�options�name�version�author�author_email�
maintainer�maintainer_email�url�license�description�long_description�keywords�	platforms�classifiers�download_url�requires�provides�	obsoletes)r�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�	swig_opts�export_symbols�depends�languagec�"�|jd�}|r|jd�nt}d|vr3tjjtjd�|d<d|vrtjdd|d<	||�xa}td
k(r|S|j�trtd�|j!�tdk(r|S	|j#�}trtd�|j!�tdk(r|S|rt+|�S|S#t$r5}d|vrtd|z��td	j|d|���d}~wwxYw#t$$r)}tt'|j(�d
|zz��d}~wwxYw)a�The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    rrrrrNrzerror in setup command: %szerror in {} setup command: {}�initz%options (after parsing config files):�configz

error: %sz%options (after parsing command line):�commandline)�get�popr	rrr�sys�argv�_setup_distributionr�
SystemExit�format�_setup_stop_after�parse_config_filesr�print�dump_option_dicts�parse_command_linerrr�run_commands)�attrs�klass�dist�msg�oks     rr
r
`s���J
�I�I�k�"�E��
�	�	�+�����E�!�!�w�w�/�/������<��m���E�!�"�x�x���|��m��Y�%*�5�\�1��d��F�"���	�����
�5�6���� ��H�$���
L�
�
$�
$�
&��
�
�5�6���� ��M�)���
��D�!�!��K��O�Y�����9�C�?�@�@��<�C�C�E�&�M�SV�W�X�X��	Y��2�L���4�#3�#3�4�}�s�7J�J�K�K��L�s0�>
D�E�	E�$0E�E�	F�%$F	�	Fc�n�	|j�|S#t$rtd��t$rT}tr/t
jjdj|���tdj|���d}~wttf$r#}tr�tdt|�z��d}~wwxYw)z�Given a Distribution object run all the commands,
    raising ``SystemExit`` errors in the case of failure.

    This function assumes that either ``sys.argv`` or ``dist.script_args``
    is already set accordingly.
    �interruptedz
error: {}
z	error: {}Nzerror: )rK�KeyboardInterruptrD�OSErrorrrA�stderr�writerErr�str)rN�excrOs   rrKrK�s���3����� �K���(���'�'��6���J�J���]�1�1�#�6�7���[�/�/��4�5�5���N�+�3����Y��S��1�2�2��	3�s!��B4�AA?�?B4�B/�/B4c��|dvrtdj|���|atjj�}|dd�}		|tjd<|�|tjddt
j|�5}|j�jdd	�}t||�ddd�|t_da	t�td
|z��tS#1swY�1xYw#|t_dawxYw#t$rY�CwxYw)a.Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    )r<r=r>�runz$invalid value for 'stop_after': {!r}�__main__)�__file__�__name__rNrz\r\nz\nzZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?)�
ValueErrorrErFrArB�copy�tokenize�open�read�replace�execrDrC�RuntimeError)rr�
stop_after�	save_argv�g�f�codes       r�	run_setuprk�s
��>�A�A��?�F�F�z�R�S�S�#�����
�
��I� �j�9�A�
�
	%�%�C�H�H�Q�K��&�*����������{�+�q��v�v�x�'�'���7���T�1�
�,�!�C�H� $���"��@��	
�
�	
���/,�+��!�C�H� $����
�	
�
�s<�=C,�-C �0C,�8
C>� C)�%C,�,C;�;C>�>	D
�	D
)NrZ)�__doc__rrAr`�debugr�errorsrrrrrNr	�cmdr
r=r�	extensionr�__all__rrrFrC�setup_keywords�extension_keywordsr
rKrk�rr�<module>russ���
�
�������!� �M��	���������2��&[�B�6Drpython3.12/site-packages/setuptools/_distutils/__pycache__/sysconfig.cpython-312.pyc000064400000051032151732703660024447 0ustar00�

��_i�I��f�dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZdejvZ
ejjej �Zejjej$�Zejjej(�Zejjej,�Zdej0vr)ejj3ej0d�Zn\ej6r?ejj9ejj3ej6��Znej:�Zd	�Zeed
d�Z d�Z!ejDdk(red
��Z#e#e�Ze#e �Z d�Z$e$�Z%dZ&	e%sejNZ&d�Z)d%d�Z*ed��Z+d�Z,d�Z-d�Z.d�Z/d�Z0d�Z1d&d�Z2d�Z3d�Z4d�Z5d'd�Z6ejnd�Z8ejnd�Z9ejnd �Z:d'd!�Z;d"�Z<da=d#�Z>d$�Z?y#e($rY�wxYw)(a�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
�N�)�DistutilsPlatformError)�
py39compat)�	pass_none�__pypy__�_PYTHON_PROJECT_BASEc�t��tj|�jd��t�fd�dD��S)z]
    Return True if the target directory appears to point to an
    un-installed Python.
    �Modulesc3�\�K�|]#}�j|�j����%y�w�N)�joinpath�is_file)�.0�fn�moduless  ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/sysconfig.py�	<genexpr>z(_is_python_source_dir.<locals>.<genexpr>2s(�����Q�8P�"�w����#�+�+�-�8P�s�),)�SetupzSetup.local)�pathlib�Pathr
�any)�drs @r�_is_python_source_dirr,s/���
�l�l�1�o�&�&�y�1�G��Q�8P�Q�Q�Q��_homec��tjj|�jtjj|��S)z,
    Return True if a is a parent of b.
    )�os�path�normcase�
startswith)�dir_a�dir_bs  r�
_is_parentr#8s3���7�7���E�"�-�-�b�g�g�.>�.>�u�.E�F�Fr�ntc�J��ttf}�fd�|D�}t|��S)Nc3�v�K�|]0}t�tjj|d��r|���2y�w)�PCbuildN)r#rr�join)r�prefixrs  �rrz_fix_pcbuild.<locals>.<genexpr>Es2�����
�"���!�R�W�W�\�\�&�)�<�=�
�"�s�69)�PREFIX�BASE_PREFIX�next)r�prefixes�matcheds`  r�_fix_pcbuildr/As-����;�&��
�"�
��
�G�Q��rc�J�trtt�Stt�Sr)�	_sys_homer�project_base�rr�
_python_buildr4Ps���$�Y�/�/� ��.�.r�c�.�dtjddzS)z�Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    z%d.%dN�)�sys�version_infor3rr�get_python_versionr:fs��
�S�%�%�b�q�)�)�)rc���|rtnt}|�|n|}	t�dtj��}||||�S#t
$rt
dtjz��wxYw)a�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    �_get_python_inc_zFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIXr+�globalsr�name�KeyErrorr)�
plat_specificr)�default_prefix�resolved_prefix�getters     r�get_python_incrEnsw��*7�%�K�N� &� 2�f��O�
���-�b�g�g�Y�7�8���/�6�=�9�9���
�$�
�!#���
)�
�	
�
�s	�>�&A$c�H�tjj|�r|SdS)z5
    Replace path with None if it doesn't exist.
    N)rr�exists)rs r�_extantrH�s��
�7�7�>�>�$�'�4�1�T�1rc���tr3tjdkr tjj|d�St
|�xs"tt||��xst|�S)N����include)
�IS_PYPYr8r9rrr(�_get_python_inc_posix_pythonrH�_get_python_inc_from_config�_get_python_inc_posix_prefix�r)�spec_prefixrAs   r�_get_python_inc_posixrT�sV���3�#�#�f�,��w�w�|�|�F�I�.�.�$�]�3�	0��.�}�k�J�K�	0�'��/�rc��tsy|rtxstStjjt
d�d�}tjj|�S)z�
    Assume the executable is in the build directory. The
    pyconfig.h file should be in the same directory. Since
    the build directory may not be the source directory,
    use "srcdir" from the makefile to find the "Include"
    directory.
    N�srcdir�Include)�python_buildr1r2rrr(�get_config_var�normpath)rA�incdirs  rrOrO�sF������(�L�(�
�W�W�\�\�.��2�I�
>�F�
�7�7���F�#�#rc�*�|�td|zdz�Sy)aj
    If no prefix was explicitly specified, provide the include
    directory from the config vars. Useful when
    cross-compiling, since the config vars may come from
    the host
    platform Python installation, while the current Python
    executable is from the build platform installation.

    >>> monkeypatch = getfixture('monkeypatch')
    >>> gpifc = _get_python_inc_from_config
    >>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower)
    >>> gpifc(False, '/usr/bin/')
    >>> gpifc(False, '')
    >>> gpifc(False, None)
    'includepy'
    >>> gpifc(True, None)
    'confincludepy'
    N�CONF�	INCLUDEPY)rY)rArSs  rrPrP�s$��&���f�}�4�{�B�C�C�rc��trdnd}|t�ztz}tjj|d|�S)N�pypy�pythonrM)rNr:�build_flagsrrr()r)�implementation�
python_dirs   rrQrQ�s5��&�V�H�N��"4�"6�6��D�J�
�7�7�<�<��	�:�6�6rc��tr\tjj|d�tjjztjj|d�zStjj|d�S)NrM�PC)rXrrr(�pathseprRs   r�_get_python_inc_ntrh�s\���
�G�G�L�L���+��g�g�o�o�
��g�g�l�l�6�4�(�
)�	
�
�7�7�<�<��	�*�*rc�J�|r|Stjj|d�S)N�
site-packages)rrr()�standard_lib�	libpython�early_prefixr)s    r�
_posix_librn�s ������w�w�|�|�I��7�7rc��trotjdkr\|�t}|r2tj
j
|dtjd�Stj
j
|d�S|}|�'|r|xrtxst}n|xrtxst}tjdk(r\|s|rttdd�}nd}trdnd	}tj
j
|||t�z�}t||||�Stjd
k(rC|r tj
j
|d�Stj
j
|dd�Stdtjz��)
aSReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    rJz
lib-pythonrrj�posix�
platlibdir�libr`rar$�Libz?I don't know where Python installs its library on platform '%s')rNr8r9r*rrr(�versionr=r+�EXEC_PREFIXr?�getattrr:rnr)rArkr)rm�libdirrcrls       r�get_python_librx�s:���3�#�#�f�,��>��F���7�7�<�<���c�k�k�!�n�E�E��w�w�|�|�F�O�4�4��L�
�~��"�7�'7�F�;�F�"�2�{�<�f�F�	�w�w�'���L��S�,��6�F��F�#*�����G�G�L�L����BT�BV�1V�W�	��,�	�<��H�H�	���D����7�7�<�<���.�.��7�7�<�<����?�?�$�
�!#���
)�
�	
rc
���|jdk(�r�tjdk(r-td�s"ddl}|jt�dtd<tddd	d
ddd
d�\}}}}}}}}	dtjvrItjd}
dtjvr"|j|�r|
|t|�dz}|
}dtjvrtjd}dtjvrtjd}dtjvrtjd}n|dz}dtjvr|dztjdz}d	tjvr2|dztjd	z}|dztjd	z}dtjvrK|dztjdz}|dztjdz}|dztjdz}d
tjvrtjd
}dtjvr|dztjdz}n|dz|	z}|dz|z}
|j||
|
dz|z||||��dtjvr?|jjdd�r#|jtjd��||_yy)z�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    �unix�darwin�CUSTOMIZED_OSX_COMPILERrN�True�CC�CXX�CFLAGS�CCSHARED�LDSHARED�SHLIB_SUFFIX�AR�ARFLAGS�CPPz -E�LDFLAGS� �CPPFLAGS)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�RANLIB�ranlib)r�)�
compiler_typer8�platformrY�_osx_support�customize_compiler�_config_vars�get_config_varsr�environr �len�set_executables�executables�get�shared_lib_extension)r�r��cc�cxx�cflags�ccshared�ldshared�shlib_suffix�ar�ar_flags�newcc�cppr��cc_cmds              rr�r�s�������'��<�<�8�#�"�";�<�#��/�/��=�:@��6�7�
���������	
�		
����������2�:�:���J�J�t�$�E�����+��0C�0C�B�0G�!�8�C��G�I�#6�6���B��B�J�J���*�*�U�#�C�����#��z�z�*�-�H��B�J�J���*�*�U�#�C��u�*�C���
�
�"��#�~��
�
�9�(=�=�H��r�z�z�!��c�\�B�J�J�x�$8�8�F��#�~��
�
�8�(<�<�H�����#���)�b�j�j��4�4�C��c�\�B�J�J�z�$:�:�F��#�~��
�
�:�(>�>�H��2�:�:�����D�!�B���
�
�"��C�x�"�*�*�Y�"7�7�H��C�x�(�*�H��c��F�"��� � ������x�/�����	!�	
��r�z�z�!�h�&:�&:�&>�&>�x��&N��$�$�B�J�J�x�,@�$�A�(4��%�g(rc��trntjdk(r-tjj	t
xstd�}nt
xst}tjj	|d�Stj�S)z2Return full pathname of installed pyconfig.h file.r$rfz
pyconfig.h)	rXrr?rr(r1r2�	sysconfig�get_config_h_filename)�inc_dirs rr�r�jsW���
�7�7�d�?��g�g�l�l�9�#<��d�C�G��/�<�G��w�w�|�|�G�\�2�2��.�.�0�0rc�*�tj�S)zAReturn full pathname of installed Makefile from the Python build.)r��get_makefile_filenamer3rrr�r�vs���*�*�,�,rc�0�tj||��S)z�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    )�vars)r��parse_config_h)�fp�gs  rr�r�{s���#�#�B�Q�/�/rz"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}c�F�ddlm}||dddd��}|�i}i}i}	|j�}|�njtj	|�}|rR|jdd�\}}	|	j
�}	|	jd	d
�}
d|
vr|	||<n	t|	�}	|	||<�}d}|�r^t|�D�]K}||}
tj|
�xstj|
�}|�r|jd�}d}||vrt||�}no||vrd
}nh|tj vrtj |}nB||vr7|j#d�r
|dd|vrd
}n#d|z|vrd
}nt|d|z�}nd
x||<}|s��|
|j%�d}|
d|j'�z|z}
d|vr|
||<��	t|
�}
|
||<||=|j#d�s��.|dd|vs��7|dd}||vs��B|
||<��I||=��N|r��^|j)�|j+�D])\}}	t-|	t�s�|	j
�||<�+|j/|�|S#t$r|	jd	d�||<Y���wxYw#t$r|
j
�||<Y��wxYw)z�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    r)�TextFiler�surrogateescape)�strip_comments�skip_blanks�
join_lines�errorsNTr7z$$r5�$)r�r�r�F�PY_rK)�distutils.text_filer��readline�_variable_rx�match�group�strip�replace�int�
ValueError�list�_findvar1_rx�search�_findvar2_rx�strrr�r �end�start�close�items�
isinstance�update)rr�r�r��done�notdone�line�m�n�v�tmpv�renamed_variablesr?�value�found�item�after�ks                  r�parse_makefiler��s���-�	�
�1�!��BS�
�B�	�y���
�D��G�
��{�{�}���<�����t�$����7�7�1�a�=�D�A�q����	�A��9�9�T�2�&�D��d�{����
� ��A��A�
 �D��G�)�4:�����M�D��D�M�E��#�#�E�*�H�l�.A�.A�%�.H�A���G�G�A�J������9��t�A�w�<�D��'�\�!�E��"�*�*�_��:�:�a�=�D��+�+����u�-�$�q�r�(�>O�2O�!�����g�-� %�� #�4���	�?�3��%'�'�D��G�d��!�!�%�%�'�)�,�E�!�+�A�G�G�I�.��5��=�E��e�|�(-���
�/�$'��J�E�*/�D��J�#�D�M��?�?�5�1�d�1�2�h�BS�6S�#'���8�D�#�4�/�-2��T�
��D�M�]"��b�H�H�J��
�
����1��a����g�g�i�D��G��
�H�H�T�N��H��O"�3��i�i��c�2�D��G�3��` *�7�).����D��J�7�s$�	I�2J�I>�=I>�J �J c���	tj|�xstj|�}|r@|j�\}}|d||j	|jd��z||dz}n	|S�r)a�Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    rrN)r�r�r��spanr�r�)�sr�r��begr�s     r�expand_makefile_varsr��sr�������"�<�l�&9�&9�!�&<�������J�S�#��!�C��4�8�8�A�G�G�A�J�/�/�!�C�D�'�9�A���H�rc���t�;tj�j�at	j
t�|r#|D�cgc]}tj
|���c}StScc}w)a�With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    )r�r�r��copyr�add_ext_suffixr�)�argsr?s  rr�r�sY���� �0�0�2�7�7�9���!�!�,�/�8<�t�4�t�t�L���T�"�t�4�N�,�N��4s�A-c�t�|dk(rddl}|jdtd�t�j	|�S)z�Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    �SOrNz SO is deprecated, use EXT_SUFFIXr7)�warnings�warn�DeprecationWarningr�r�)r?r�s  rrYrY&s4��
�t�|���
�
�8�:L�a�P��� � ��&�&r)rN)rrNr)@�__doc__r�rer8r�rr�rr5r�
_functoolsr�builtin_module_namesrNrrZr)r*�exec_prefixru�base_prefixr+�base_exec_prefixr=r��abspathr2�
executable�dirname�getcwdrrvr1r#r?r/r4rXrb�abiflags�AttributeErrorr:rErHrTrOrPrQrhrnrxr�r�r�r��compiler�r�r�r�r�r�r�rYr3rr�<module>r�s6��	�
�	�
���*��!�
��0�0�
0��
���	�	�#�*�*�	%���g�g���s���/���g�g���s���/���7�7�#�#�C�$8�$8�9��
�R�Z�Z�'��7�7�?�?�2�:�:�.D�#E�F�L�
�~�~��w�w���r�w�w���s�~�~�'F�G��!�r�y�y�{��R�
�C��$�'�	�G��7�7�d�?�� �� � ��-�L��Y�'�I�/������	���l�l��*�:�.�2��2��
$� D�.7�	+�8�3
�lY5�x	1�-�
0��r�z�z�?�@���r�z�z�:�;���r�z�z�8�9��i
�X
�2��O�$	'��M�	�	�	�s�"H(�(H0�/H0python3.12/site-packages/setuptools/_distutils/__pycache__/errors.cpython-312.pyc000064400000013257151732703660023766 0ustar00�

��_i���dZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd	�d
e�ZGd�de�ZGd
�de�ZGd�de�Z	Gd�de�Z
Gd�de�ZGd�de�ZGd�de�Z
Gd�de�ZGd�de�ZGd�de�ZGd�d e�ZGd!�d"e�ZGd#�d$e�ZGd%�d&e�Zy')(a�distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".c��eZdZdZy)�DistutilsErrorzThe root of all Distutils evil.N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/errors.pyrrs��)�r
rc��eZdZdZy)�DistutilsModuleErrorz�Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes).Nrr	r
rr
r
s
��H�	r
r
c��eZdZdZy)�DistutilsClassErrorz�Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface.Nrr	r
rrrs���
	r
rc��eZdZdZy)�DistutilsGetoptErrorz7The option table provided to 'fancy_getopt()' is bogus.Nrr	r
rrr"s��A�r
rc��eZdZdZy)�DistutilsArgErrorzaRaised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage.Nrr	r
rrr(s��(�	r
rc��eZdZdZy)�DistutilsFileErrorz�Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised.Nrr	r
rrr/s���	r
rc��eZdZdZy)�DistutilsOptionErrora�Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead.Nrr	r
rrr7s
��B�	r
rc��eZdZdZy)�DistutilsSetupErrorzqFor errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'.Nrr	r
rrrBs��7�	r
rc��eZdZdZy)�DistutilsPlatformErrorz�We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass.Nrr	r
rrrIs
��D�	r
rc��eZdZdZy)�DistutilsExecErrorz`Any problems executing an external program (such as the C
    compiler, when compiling C files).Nrr	r
rrrQs��*�	r
rc��eZdZdZy)�DistutilsInternalErrorzoInternal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!).Nrr	r
rrrXs��6�	r
rc��eZdZdZy)�DistutilsTemplateErrorz%Syntax error in a file list template.Nrr	r
rr!r!_s��/r
r!c��eZdZdZy)�DistutilsByteCompileErrorzByte compile error.Nrr	r
rr#r#cs��r
r#c��eZdZdZy)�CCompilerErrorz#Some compile/link operation failed.Nrr	r
rr%r%hs��-r
r%c��eZdZdZy)�PreprocessErrorz.Failure to preprocess one or more C/C++ files.Nrr	r
rr'r'ls��8r
r'c��eZdZdZy)�CompileErrorz2Failure to compile one or more C/C++ source files.Nrr	r
rr)r)ps��<r
r)c��eZdZdZy)�LibErrorzKFailure to create a static library from one or more C/C++ object
    files.Nrr	r
rr+r+ts��r
r+c��eZdZdZy)�	LinkErrorz]Failure to link one or more C/C++ object files into an executable
    or shared library file.Nrr	r
rr-r-ys��r
r-c��eZdZdZy)�UnknownFileErrorz(Attempt to process an unknown file type.Nrr	r
rr/r/~s��2r
r/N)r�	Exceptionrr
rrrrrrrrrr!r#r%r'r)r+r-r/r	r
r�<module>r1s���D�	�Y�	�	�>�	�	�.�	�	�>�	�	��	�	��	�	�>�	�	�.�	�	�^�	�	��	�	�^�	�0�^�0����
.�Y�.�9�n�9�=�>�=��~��
���
3�~�3r
python3.12/site-packages/setuptools/_distutils/__pycache__/dist.cpython-312.pyc000064400000142263151732703660023415 0ustar00�

��_i�����dZddlZddlZddlZddlZddlZddlZddlmZ	ddl	Z	ddlmZm
Z
mZmZddlmZmZddlmZmZmZddlmZdd	lmZej6d
�Zd�ZGd�d
�ZGd�d�Zd�Z y#e
$rdZ	Y�`wxYw)z}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
�N)�message_from_file�)�DistutilsOptionError�DistutilsModuleError�DistutilsArgError�DistutilsClassError)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape��log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$c���t|t�r	|St|t�sQt|�j}d}|j
dit
���}tj|�t|�}|S)Nz>Warning: '{fieldname}' should be a list, got type '{typename}'�)	�
isinstance�str�list�type�__name__�format�localsr�warning)�value�	fieldname�typename�msgs    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/dist.py�_ensure_listr &sg���%���	
��L���t�
$���;�'�'��N���c�j�j�$�6�8�$�����C���U����L�c	�`�eZdZdZgd�ZdZgd�ZeD���cgc]}t|d���c}}}ZddiZ	d)d	�Z
d
�Zd*d�Zd�Z
d
�Zd)d�Zd�Zd�Zd�Zd�Zddgfd�Zd�Zd�Zd�Zd�Zd�Zd�Zd+d�Zd)d�Zd,d�Zej>fd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*ycc}}}w)-�Distributiona�The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    ))�verbose�vzrun verbosely (default)r)�quiet�qz!run quietly (turns verbosity off))zdry-run�nzdon't actually do anything)�help�hzshow detailed help message)zno-user-cfgNz-ignore pydistutils.cfg in your home directoryz�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
))z
help-commandsNzlist all available commands)�nameNzprint package name)�version�Vzprint package version)�fullnameNzprint <package name>-<version>)�authorNzprint the author's name)�author-emailNz print the author's email address)�
maintainerNzprint the maintainer's name)zmaintainer-emailNz$print the maintainer's email address)�contactNz7print the maintainer's name if known, else the author's)z
contact-emailNz@print the maintainer's email address if known, else the author's)�urlNzprint the URL for this package)�licenseNz print the license of the package)�licenceNzalias for --license)�descriptionNzprint the package description)zlong-descriptionNz"print the long package description)�	platformsNzprint the list of platforms)�classifiersNzprint the list of classifiers)�keywordsNzprint the list of keywords)�providesNz+print the list of packages/modules provided)�requiresNz+print the list of packages/modules required)�	obsoletesNz0print the list of packages/modules made obsoleterr&r$Nc	��d|_d|_d|_|jD]}t	||d��t�|_|jjD](}d|z}t	||t|j|���*i|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|�ri|j=d�}|�K|d=|j?�D]5\}}|jA|�}|j?�D]\}	}
d|
f||	<��7d|vrK|d|d	<|d=d
}tB�tCjD|�n"tFjHjK|dz�|j?�D]�\}}
tM|jd|z�r t|jd|z�|
��?tM|j|�rt	|j||
��mtM||�rt	|||
���d
tO|�z}tCjD|���d|_(|j�2|jD]#}
|
jSd�sn|
dk(s�d|_(n|jU�y)a0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        rr�get_N��optionszsetup scriptr5r4z:'licence' distribution option is deprecated; use 'license'�
�set_zUnknown distribution option: %sT�-z
--no-user-cfgF)+r$�dry_runr)�display_option_names�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_options�
dist_files�packages�package_data�package_dir�
py_modules�	libraries�headers�ext_modules�ext_package�include_dirs�
extra_path�scripts�
data_files�password�command_obj�have_run�get�items�get_option_dict�warnings�warn�sys�stderr�write�hasattr�repr�
want_user_cfg�
startswith�finalize_options)�self�attrs�attr�basename�method_namer@�command�cmd_options�opt_dict�opt�valr�key�args              r�__init__zDistribution.__init__s�����������	��-�-�D��D�$��"�.�-�.��
��
�
�7�7�H� �8�+�K��D�+�w�t�}�}�k�'J�K�8���
�!%���
 ������ "������
��
���������������������� ��������������
������
��
�i�i�	�*�G��"��)�$�,3�M�M�O�(�G�[�#�3�3�G�<�H�$/�$5�$5�$7���S�)7��(=���
�%8�-<�
�E�!�#(��#3��i� ��)�$�R���'��M�M�#�&��J�J�$�$�S�4�Z�0�"�K�K�M���S��4�=�=�&�3�,�7�8�G�D�M�M�6�C�<�8��=��T�]�]�C�0��D�M�M�3��4��T�3�'��D�#�s�+�;�d�3�i�G�C��M�M�#�&�*�""������'��'�'���~�~�c�*���/�)�).�D�&��(�	
���r!c�b�|jj|�}|�ix}|j|<|S)z�Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        )rOr`)rmrr�dicts   rrbzDistribution.get_option_dicts9���#�#�'�'��0���<�35�5�D�4�'�'��0��r!c���ddlm}|�#t|jj	��}|�|j||z�|dz}|s|j|dz�y|D]�}|jj
|�}|�|j|d|zz��8|j|d|zz�||�}|jd�D]}|j|dz|z����y)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rA)�pprintr}�sortedrO�keys�announcer`�split)	rm�header�commands�indentr}�cmd_namert�out�lines	         r�dump_option_dictszDistribution.dump_option_dicts(s���"����d�2�2�7�7�9�:�H����M�M�&�6�/�*��d�]�F���M�M�&�#:�:�;�� �H��+�+�/�/��9�H����
�
�f�'H�8�'S�S�T��
�
�f�'F��'Q�Q�R��h�'���I�I�d�O�D��M�M�&�4�-�$�"6�7�,�!r!c��t�|j�D�cgc]-}tjj	|�s�#t|���/}}tr#|jddj|�z�|Scc}w)a�Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are multiple possible config files:
        - distutils.cfg in the Distutils installation directory (i.e.
          where the top-level Distutils __inst__.py file lives)
        - a file in the user's home directory named .pydistutils.cfg
          on Unix and pydistutils.cfg on Windows/Mac; may be disabled
          with the ``--no-user-cfg`` option
        - setup.cfg in the current directory
        - a file named by an environment variable
        zusing config files: %sz, )	r�
_gen_paths�os�path�isfilerrr��join)rmr��filess   r�find_config_fileszDistribution.find_config_filesBsb��	��'+���'8�Q�'8�t�B�G�G�N�N�4�<P��T��'8��Q���M�M�2�T�Y�Y�u�5E�E�F����Rs�$A<�
A<c#�
K�tjtjdj�j
}|dz��dtjdk(z}|dz}|jr(tjd�j�|z��tjd���tjt�5tjt
jd����ddd�y#1swYyxYw�w)	N�	distutilsz
distutils.cfg�.�posixzpydistutils.cfg�~z	setup.cfg�DIST_EXTRA_CONFIG)�pathlib�Pathre�modules�__file__�parentr�r+rj�
expanduser�
contextlib�suppress�	TypeError�getenv)rm�sys_dir�prefix�filenames    rr�zDistribution._gen_pathsYs������,�,�s�{�{�;�7�@�@�A�H�H����'�'�����7�*�+���-�-������,�,�s�#�.�.�0�8�;�;��l�l�;�'�'��
 �
 ��
+��,�,�r�y�y�)<�=�>�>�,�
+�
+�s�CD�+C7�.	D�7D�<Dc��ddlm}tjtjk7rgd�}ng}t|�}|�|j
�}tr|jd�|�}|D]�}tr|jd|z�|j|�|j�D]a}|j|�}|j|�}|D]8}	|	dk7s�	|	|vs�|j||	�}
|	jdd�}	||
f||	<�:�c|j���d	|j vr�|j d	j#�D]f\}	\}}
|j$j|	�}	|rt'||t)|
��n(|	d
vrt'||	t)|
��n
t'||	|
��hyy#t*$r}
t-|
��d}
~
wwxYw)Nr)�ConfigParser)
zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-datar�zexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %srrC�_�global)r$rD)�configparserr�rer��base_prefix�	frozensetr�rr��read�sectionsr@rbr`�replaceryrOra�negative_optrFr�
ValueErrorr)rm�	filenamesr��ignore_options�parserr��sectionr@rtrurv�src�aliasrs              r�parse_config_fileszDistribution.parse_config_filesks���-��:�:����(��N�  �N�"�>�2�����.�.�0�I���M�M�>�?����!�H���
�
�n�x�7�8��K�K��!�!�?�?�,�� �.�.��1���/�/��8��"�C��j�(�S��-F�$�j�j��#�6��!�k�k�#�s�3��)1�3����
�	#�	-�
�O�O��!"�*�t�+�+�+�#'�#7�#7��#A�#G�#G�#I���Z�c�3��)�)�-�-�c�2��4����e��3��-?�@�� 6�6���c�9�S�>�:���c�3�/��$J�,��"�4�.�s�3�3��4�s�0AF6�6	G�?G
�
Gc��|j�}g|_t||jz�}|j	|j
�|j
ddi�|j|j|��}|j�}tj�jtjd|jzz
�|j|�ry|r|j!||�}|�y|r�|j"r5|j%|t'|j�dk(|j��y|jst)d��y	)
a�Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        r5r4)�args�object�
Nr��display_optionsr�zno commands suppliedT)�_get_toplevel_optionsr�r	r��set_negative_aliasesr��set_aliases�getoptrN�get_option_order�logging�	getLogger�setLevel�WARNr$�handle_display_options�_parse_command_optsr)�
_show_help�lenr)rm�toplevel_optionsr�r��option_orders     r�parse_command_linezDistribution.parse_command_line�s/��. �5�5�7����
��-��0D�0D�D�E���#�#�D�$5�$5�6����I�y�1�2��}�}�$�"2�"2�4�}�@���.�.�0������$�$�W�\�\�B����4E�%E�F��&�&�|�4����+�+�F�D�9�D��|����9�9��O�O���D�M�M�(:�a�(?�$�-�-�
�
�
��}�}�#�$:�;�;�r!c�"�|jdgzS)z�Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        )zcommand-packages=Nz0list of packages that provide distutils commands)�global_options�rms rr�z"Distribution._get_toplevel_options�s!���"�"�
�&
�
�	
r!c��ddlm}|d}tj|�st	d|z��|j
j
|�	|j|�}t||�std|z��t|d�rt|jt�sd}t||z��|j }t|d�r+|j#�}|j%|j �t|d	�r0t|j&t�rt)|j&�}ng}|j+|j,|jz|z�|j/|�|j1|d
d�\}}	t|	d�r"|	j2r|j5|d|g��yt|d	�rwt|j&t�r]d}
|j&D]I\}}}
}t|	|j7|��s�$d
}
t9|�r|��9td
|�d|�d���|
ry|j;|�}t=|	�j?�D]\}}d|f||<�|S#t$r}t|��d}~wwxYw)a�Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        r��Commandzinvalid command name '%s'Nz&command class %s must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r��help_optionsrr)r�zinvalid help function z for help option 'z-': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitr��append�get_command_classrr�
issubclassrrhrr�rr��copy�updater��fix_help_options�set_option_tabler�r�r�r)r��
get_attr_name�callablerb�varsra)rmr�r�r�rr�	cmd_classrr�r��opts�help_option_found�help_option�short�desc�funcrtr+rs                  rr�z Distribution._parse_command_optss|��	*��q�'������(��8�7�B�C�C��
�
���W�%�
	)��.�.�w�7�I��)�W�-�%�8�9�D��
�
�I�~�.��9�1�1�4�8�>�
�&�c�I�o�6�6��(�(���9�n�-�'�,�,�.�L����	� 6� 6�7��9�n�-�*��"�"�D�3
�,�I�,B�,B�C�L��L�	������)�"8�"8�8�<�G�	
�	�#�#�L�1��}�}�T�!�"�X�.���t��4�� �T�Y�Y��O�O�F�A���O�L���9�n�-�*��"�"�D�3
�!"��2;�2H�2H�.��U�D�$��4��!5�!5�k�!B�C�()�%���~���1� $�[�2���
3I�!���'�'��0����:�+�+�-�K�D�%�,�e�4�H�T�N�.����U$�	)�#�C�(�(��	)�s�I,�,	J�5J�Jc��dD]o}t|j|�}|��t|t�s�-|j	d�D�cgc]}|j���}}t
|j||��qycc}w)z�Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        �r9r7N�,)rJrHrrr��striprF)rmror�elms    rrlzDistribution.finalize_optionscsk��
.�D��D�M�M�4�0�E��}���%��%�05���C�0@�A�0@������0@��A���
�
�t�U�3�
.��
Bs�A6rc�4�ddlm}ddlm}|rY|r|j	�}n|j
}|j
|�|j|jdz�td�|r7|j
|j�|jd�td�|jD]�}t|t�rt||�r|}	n|j|�}	t!|	d�rLt|	j"t$�r2|j
|	j&t)|	j"�z�n|j
|	j&�|jd|	j*z�td���t||j,��y	)
abShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        r��	gen_usager�z
Global options:r?zKInformation display options (just display information, ignore any commands)r�zOptions for '%s' command:N)�distutils.corer�r�r�r�r�r��
print_help�common_usage�printr�r�rrr�r�rhr�rr�r�rrM)
rmr�r�r�r�r�r�r@rr�klasss
          rr�zDistribution._show_helppsM��	-�)����4�4�6���-�-���#�#�G�,����d�/�/�2E�E�F��"�I���#�#�D�$8�$8�9����6�
�
�"�I��}�}�G��'�4�(�Z���-I����.�.�w�7���u�n�-�*�U�=O�=O�QU�2V��'�'��&�&�)9�%�:L�:L�)M�M���'�'��(:�(:�;����9�E�N�N�J�K��"�I�%�	�i��(�(�)�*r!c��ddlm}|jr7|j�t	d�t	||j
��yd}i}|jD]
}d||d<�|D]�\}}|s�	|j|�s�t|�}t|jd|z��}|dvrt	dj|��n*|dvrt	d	j|��nt	|�d}��|S)
z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        rr�r?rr>r�r�)r8r:r;r<rA)r�r��
help_commands�print_commandsr�rMr�r`r
rJrHr�)	rmr�r��any_display_options�is_display_option�optionrurvrs	         rr�z#Distribution.handle_display_options�s���	-�
������!��"�I��)�D�,�,�-�.��
 �����*�*�F�+,��f�Q�i�(�+�%�H�C���(�,�,�S�1�'��,��<���
�
�v��|�<�>���3�3��#�(�(�5�/�*��P�P��$�)�)�E�*�+��%�L�&'�#�%�#�"r!c���t|dz�|D]N}|jj|�}|s|j|�}	|j}td|||fz��Py#t
$rd}Y�!wxYw)zZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        �:�(no description available)z
  %-*s  %sN)r�rKr`r�r6�AttributeError)rmr�r��
max_length�cmdr�r6s       r�print_command_listzDistribution.print_command_list�s}��	�f�s�l���C��M�M�%�%�c�*�E���.�.�s�3��
;�#�/�/��
�,�*�c�;�!?�?�@���"�
;�:��
;�s�A#�#A1�0A1c��ddl}|jj}i}|D]}d||<�	g}|jj	�D]%}|j|�r�|j
|��'d}||zD]}t|�|kDs�t|�}�|j|d|�|rt�|j|d|�yy)anPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        rNrzStandard commandszExtra commands)
�distutils.commandrr�__all__rKr�r`r�r�rr�)rmr��std_commands�is_stdr�extra_commandsrs       rr�zDistribution.print_commands�s���	!� �(�(�0�0�����C��F�3�K� ����=�=�%�%�'�C��:�:�c�?��%�%�c�*�(��
��.�0�C��3�x�*�$� ��X�
�1�	
����.A�:�N���G��#�#�N�4D�j�Q�r!c��ddl}|jj}i}|D]}d||<�	g}|jj	�D]%}|j|�r�|j
|��'g}||zD]P}|jj|�}|s|j|�}	|j}|j
||f��R|S#t$rd}Y�$wxYw)a>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        rNrr)
r	rrr
rKr�r`r�r�r6r)	rmr�rrrr
�rvr�r6s	         r�get_command_listzDistribution.get_command_list�s���	!� �(�(�0�0�����C��F�3�K� ����=�=�%�%�'�C��:�:�c�?��%�%�c�*�(����.�0�C��M�M�%�%�c�*�E���.�.�s�3��
;�#�/�/��
�I�I�s�K�(�)�1��	��"�
;�:��
;�s�&C	�	C�Cc���|j}t|t�sS|�d}|jd�D�cgc]}|dk7s�	|j	���}}d|vr|jdd�||_|Scc}w)z9Return a list of packages from which commands are loaded.r?r�zdistutils.commandr)rLrrr�r��insert)rm�pkgs�pkgs   r�get_command_packagesz!Distribution.get_command_packagesss���$�$���$��%��|���+/�:�:�c�?�H�?�C�c�R�i�C�I�I�K�?�D�H�"�$�.����A�2�3�$(�D�!����	Is
�
A2�A2c��|jj|�}|r|S|j�D]T}dj||�}|}	t	|�t
j|}	t||�}||j|<|cStd|z��#t$rY�pwxYw#t$rtd|�d|�d|�d���wxYw)aoReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        z{}.{}zinvalid command 'z
' (no class 'z
' in module 'z')zinvalid command '%s')rKr`rr�
__import__rer��ImportErrorrJrr)rmrrr��pkgname�module_name�
klass_name�modules       rr�zDistribution.get_command_class's����
�
�!�!�'�*����L��0�0�2�G�!�.�.��'�:�K� �J�
��;�'����[�1��
���
�3��&+�D�M�M�'�"��L�'3�*#�#9�G�#C�D�D���
��
��
"�
�*��
�K�9���
�s�B�'B$�	B!� B!�$Cc�D�|jj|�}|s�|r�tr|jd|z�|j	|�}||�x}|j|<d|j
|<|jj|�}|r|j||�|S)aReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        z<Distribution.get_command_obj(): creating '%s' command objectr)r^r`rr�r�r_rO�_set_command_options)rmrr�create�cmd_objr�r@s      r�get_command_objzDistribution.get_command_objNs����"�"�&�&�w�/���6���
�
�3�5<�=��
�*�*�7�3�E�27��+�=�G�d�&�&�w�/�%&�D�M�M�'�"��*�*�.�.�w�7�G���)�)�'�7�;��r!c
���|j�}|�|j|�}tr|jd|z�|j	�D]�\}\}}tr"|jdj|||��	|jD�cgc]
}t|���}}	|j}		t|t�}
||	vr|
rt||	|t|��nL||vr|
rt||t|��n/t||�rt|||�ntd|�d|�d|�d�����ycc}w#t$rg}Y��wxYw#t$ri}	Y��wxYw#t $r}t|��d}~wwxYw)aySet the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        Nz#  setting options for '%s' command:z    {} = {} (from {})z	error in z: command 'z' has no such option '�')�get_command_namerbrr�rar�boolean_optionsr
rr�rrrFrrhrr�)rmr^�option_dict�command_namer�sourcer�o�	bool_opts�neg_opt�	is_stringrs            rrz!Distribution._set_command_optionsksx��#�3�3�5�����.�.�|�<�K���M�M�?�,�N�O�'2�'8�'8�':�#�F�O�V�U���
�
�5�<�<�V�U�F�S�T�
�;F�;V�;V�W�;V�a�.�q�1�;V�	�W�
�%�2�2��
0�&�u�c�2�	��W�$���K����i��>N�:N�O��y�(�Y��K���5�1A�B��[�&�1��K���7�.�!�<��9����+(;��X��!�
��	�
��"�
���
�� �
0�*�3�/�/��
0�sO�D5�D0� D5�#E�0A=E�0D5�5E�E�E�E�	E0� E+�+E0c�N�ddlm}t||�s|}|j|�}n|j	�}|j
s|S|j
�d|_d|j|<|j|�|r'|j�D]}|j||��|S)a�Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        rr�)r�r�rr!r$�	finalized�initialize_optionsr_r�get_sub_commands�reinitialize_command)rmrr�reinit_subcommandsr�r'�subs      rr1z!Distribution.reinitialize_command�s���&	*��'�7�+�"�L��*�*�<�8�G�"�3�3�5�L�� � ��N��"�"�$����&'��
�
�l�#��!�!�'�*���/�/�1���)�)�#�/A�B�2��r!c�0�tj||�y�Nr)rmr�levels   rr�zDistribution.announce�s������s�r!c�H�|jD]}|j|��y)z�Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N)r��run_command)rmrs  r�run_commandszDistribution.run_commands�s ��
�=�=�C����S�!�!r!c���|jj|�rytjd|�|j	|�}|j�|j
�d|j|<y)a�Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Nz
running %sr)r_r`r�infor!�ensure_finalized�run)rmrrr s   rr8zDistribution.run_command�sZ���=�=���W�%������w�'��&�&�w�/��� � �"����
�!"��
�
�g�r!c�V�t|jxs|jxsg�dkDS�Nr)r�rQrTr�s r�has_pure_moduleszDistribution.has_pure_modules�s$���4�=�=�9�D�O�O�9�r�:�Q�>�>r!c�N�|jxrt|j�dkDSr?)rWr�r�s r�has_ext_moduleszDistribution.has_ext_modules�s#�����=�C��(8�(8�$9�A�$=�=r!c�N�|jxrt|j�dkDSr?)rUr�r�s r�has_c_librarieszDistribution.has_c_libraries�s���~�~�9�#�d�n�n�"5��"9�9r!c�F�|j�xs|j�Sr5)r@rBr�s r�has_moduleszDistribution.has_modules�s���$�$�&�@�$�*>�*>�*@�@r!c�N�|jxrt|j�dkDSr?)rVr�r�s r�has_headerszDistribution.has_headers�����|�|�5��D�L�L� 1�A� 5�5r!c�N�|jxrt|j�dkDSr?)r[r�r�s r�has_scriptszDistribution.has_scripts�rIr!c�N�|jxrt|j�dkDSr?)r\r�r�s r�has_data_fileszDistribution.has_data_files�s�����;�3�t���#7�!�#;�;r!c�n�|j�xr$|j�xr|j�Sr5)r@rBrDr�s r�is_purezDistribution.is_pure�s;���!�!�#�
+��(�(�*�*�
+��(�(�*�*�	
r!r5)NNr?)r)r)+r�
__module__�__qualname__�__doc__r�r�r�r
rEr�ryrbr�r�r�r�r�r�r�rlr�r�rr�rrr�r!rr1r��INFOr�r9r8r@rBrDrFrHrKrMrO)�.0�xr
s000rr#r#5s���*�N��L��O�6>M�M�_��-�a��d�3�_�M���Y�'�L�\ �|	�8�4�.?�$@4�HA�F
�a�F4�12�1�r�0+�d%#�NA�"R�<�F
�%E�N�:)0�V&�T#*�,�,��"�#�(?�>�:�A�6�6�<�
��}Ns�B)r#c���eZdZdZdZd#d�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�ZeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$y)$rGz]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    )r+r,r/�author_emailr1�maintainer_emailr3r4r6�long_descriptionr9r7r.r2�
contact_emailr8�download_urlr:r;r<Nc�,�|�|jt|��yd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_yr5)�
read_pkg_file�openr+r,r/rWr1rXr3r4r6rYr9r7r8r[r:r;r<)rmr�s  rryzDistributionMetadata.__init__"s��������t�D�z�*��D�I��D�L��D�K� $�D��"�D�O�$(�D�!��D�H��D�L�#�D��$(�D�!� �D�M�!�D�N�#�D�� $�D�� �D�M� �D�M�!�D�Nr!c�j��t|���fd�}�fd�}�d}|d�|_|d�|_|d�|_|d�|_d|_|d	�|_d|_|d
�|_|d�|_	d�vr|d�|_
nd|_
|d
�|_|d�|_d�vr|d�jd�|_
|d�|_|d�|_|dk(r(|d�|_|d�|_|d�|_yd|_d|_d|_y)z-Reads the metadata values from a file object.c�$���|}|r|dk7r|Syy�N�UNKNOWNr)r+rrs  �r�_read_fieldz7DistributionMetadata.read_pkg_file.<locals>._read_field=s"�����I�E���)�+���,�ur!c�8���j|d�}|gk(ry|Sr5)�get_all)r+�valuesrs  �r�
_read_listz6DistributionMetadata.read_pkg_file.<locals>._read_listBs"����[�[��t�,�F���|���Mr!zmetadata-versionr+r,�summaryr/Nr0z	home-pager4zdownload-urlr6r9r��platform�
classifier�1.1r;r:r<)rr+r,r6r/r1rWrXr3r4r[rYr�r9r7r8r;r:r<)rm�filercrg�metadata_versionrs     @rr]z"DistributionMetadata.read_pkg_file9s<�����%��	�
	��1�2����'��	�"�9�-���&�y�1���!�(�+������'��7��� $����{�+���"�9�-����S� � +�N� ;�D�� $�D�� +�M� :���&�y�1������'�
�3�9�9�#�>�D�M�#�J�/���%�l�3����u�$�&�z�2�D�M�&�z�2�D�M�'��4�D�N� �D�M� �D�M�!�D�Nr!c��ttjj|d�dd��5}|j	|�ddd�y#1swYyxYw)z.Write the PKG-INFO file into the release tree.zPKG-INFO�wzUTF-8)�encodingN)r^r�r�r��write_pkg_file)rm�base_dir�pkg_infos   r�write_pkg_infoz#DistributionMetadata.write_pkg_infolsA��
��G�G�L�L��:�.��g�
�
�����)�
�
�
�s�A�Ac�*��d}|js0|js$|js|js|jrd}�jd|z��jd|j
�z��jd|j�z��fd�}|d|j��|d|j��|d	|j��|d
|j��|d|j��|d|j�|d
t|j�xsd��|ddj|j!���|j#�d|j%��|j#�d|j'��|j#�d|j)��|j#�d|j+��|j#�d|j-��y)z0Write the PKG-INFO format data to a file object.z1.0rkzMetadata-Version: %s
z	Name: %s
zVersion: %s
c�:��|r�j|�d|�d��yy)Nz: rA)rg)r�rvrls  �r�maybe_writez8DistributionMetadata.write_pkg_file.<locals>.maybe_write�s$�����
�
�f�X�R��u�B�/�0�r!�Summaryz	Home-page�AuthorzAuthor-email�LicensezDownload-URL�Descriptionr?�Keywordsr��Platform�
Classifier�Requires�Provides�	ObsoletesN)r:r;r<r8r[rg�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licenser
�get_long_descriptionr��get_keywords�_write_list�
get_platforms�get_classifiers�get_requires�get_provides�
get_obsoletes)rmrlr,rws `  rrqz#DistributionMetadata.write_pkg_filess�������M�M��}�}��~�~����� � ��G�	
�
�
�+�g�5�6��
�
�<�$�-�-�/�1�2��
�
�?�T�%5�%5�%7�7�8�	1�
	�I�t�3�3�5�6��K�����0��H�d�.�.�0�1��N�D�$:�$:�$<�=��I�t�/�/�1�2��N�D�$5�$5�6��M�=��1J�1J�1L�1R�PR�#S�T��J�����):�):�)<� =�>�����z�4�+=�+=�+?�@�����|�T�-A�-A�-C�D�	
����z�4�+<�+<�+>�?�����z�4�+<�+<�+>�?�����{�D�,>�,>�,@�Ar!c�`�|xsg}|D]#}|jdj||���%y)Nz{}: {}
)rgr)rmrlr+rfrs     rr�z DistributionMetadata._write_list�s.����2���E��J�J�z�(�(��u�5�6�r!c�"�|jxsdSra)r+r�s rr�zDistributionMetadata.get_name�s���y�y�%�I�%r!c�"�|jxsdS)Nz0.0.0)r,r�s rr�z DistributionMetadata.get_version�s���|�|�&�w�&r!c�^�dj|j�|j��S)Nz{}-{})rr�r�r�s r�get_fullnamez!DistributionMetadata.get_fullname�s"���~�~�d�m�m�o�t�/?�/?�/A�B�Br!c��|jSr5)r/r�s r�
get_authorzDistributionMetadata.get_author�s���{�{�r!c��|jSr5)rWr�s r�get_author_emailz%DistributionMetadata.get_author_email����� � � r!c��|jSr5)r1r�s r�get_maintainerz#DistributionMetadata.get_maintainer�s�����r!c��|jSr5)rXr�s r�get_maintainer_emailz)DistributionMetadata.get_maintainer_email�����$�$�$r!c�6�|jxs|jSr5)r1r/r�s rr�z DistributionMetadata.get_contact�s�����-�$�+�+�-r!c�6�|jxs|jSr5)rXrWr�s rr�z&DistributionMetadata.get_contact_email�s���$�$�9��(9�(9�9r!c��|jSr5)r3r�s rr�zDistributionMetadata.get_url�s���x�x�r!c��|jSr5)r4r�s rr�z DistributionMetadata.get_license�s���|�|�r!c��|jSr5)r6r�s rr�z$DistributionMetadata.get_description�s�����r!c��|jSr5)rYr�s rr�z)DistributionMetadata.get_long_description�r�r!c�"�|jxsgSr5)r9r�s rr�z!DistributionMetadata.get_keywords�����}�}�"��"r!c�&�t|d�|_y)Nr9)r r9�rmrs  r�set_keywordsz!DistributionMetadata.set_keywords�s��$�U�J�7��
r!c��|jSr5)r7r�s rr�z"DistributionMetadata.get_platforms�s���~�~�r!c�&�t|d�|_y)Nr7)r r7r�s  r�
set_platformsz"DistributionMetadata.set_platforms�s��%�e�[�9��r!c�"�|jxsgSr5)r8r�s rr�z$DistributionMetadata.get_classifiers�s�����%�2�%r!c�&�t|d�|_y)Nr8)r r8r�s  r�set_classifiersz$DistributionMetadata.set_classifiers�s��'��}�=��r!c��|jSr5)r[r�s r�get_download_urlz%DistributionMetadata.get_download_url�r�r!c�"�|jxsgSr5)r;r�s rr�z!DistributionMetadata.get_requires�r�r!c�p�ddl}|D]}|jj|��t|�|_yr?)�distutils.versionpredicate�versionpredicate�VersionPredicaterr;�rmrr�r%s    r�set_requiresz!DistributionMetadata.set_requires�s.��)��A��&�&�7�7��:���U���
r!c�"�|jxsgSr5)r:r�s rr�z!DistributionMetadata.get_provides�r�r!c��|D�cgc]}|j���}}|D]!}ddl}|jj|��#||_ycc}wr?)r�r�r��split_provisionr:)rmrr%r�s    r�set_providesz!DistributionMetadata.set_provides�sK��$)�*�E�q�����E��*��A�-��&�&�6�6�q�9����
��+s�Ac�"�|jxsgSr5)r<r�s rr�z"DistributionMetadata.get_obsoletes�s���~�~�#��#r!c�p�ddl}|D]}|jj|��t|�|_yr?)r�r�r�rr<r�s    r�
set_obsoletesz"DistributionMetadata.set_obsoletes�s.��)��A��&�&�7�7��:���e���r!r5)%rrPrQrRrIryr]rtrqr�r�r�r�r�r�r�r�r�r�r�r��get_licencer�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr!rrGrGs������0"�.1"�f*�%B�N7�&�'�C��!��%�.�:����K� �%�#�8��:�&�>�!�#�$�#��$�%r!rGc�@�g}|D]}|j|dd��|S)zConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    r�)r�)r@�new_options�
help_tuples   rr�r�s-���K��
����:�a��?�+���r!)!rRrer��rer�r�r��emailrrcr�errorsrrrr�fancy_getoptr	r
�utilrrr
�_logr�debugr�compiler�r r#rGr�rr!r�<module>r�s�����	�	����#�����9�9�9����R�Z�Z�4�
5�
��F
�F
�`x%�x%�v��_'���H��s�A=�=B�Bpython3.12/site-packages/setuptools/_distutils/__pycache__/dep_util.cpython-312.pyc000064400000001401151732703660024243 0ustar00�

��_i]���ddlZddlmZd�Zy)�N�)�	_modifiedc�x�|dvrt|��tjdtd��t	t
|�S)N)�newer�newer_group�newer_pairwisez>dep_util is Deprecated. Use functions from setuptools instead.�)�
stacklevel)�AttributeError�warnings�warn�DeprecationWarning�getattrr)�names ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/dep_util.py�__getattr__rs:���=�=��T�"�"��M�M�H����
�9�d�#�#�)r�rr�rr�<module>rs����$rpython3.12/site-packages/setuptools/_distutils/__pycache__/config.cpython-312.pyc000064400000012537151732703660023717 0ustar00�

��_i/��B�dZddlZddlmZddlmZdZGd�de�Zy)	z�distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
�N)�RawConfigParser�)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c�^�eZdZdZdZdZdZdZdddezfdgZd	gZ	d
�Z
d�Zd�Zd
�Z
d�Zd�Zy)�
PyPIRCCommandz6Base command that knows how to handle the .pypirc filezhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s])�
show-responseNz&display full response text from serverr
c�|�tjjtjjd�d�S)zReturns rc file path.�~z.pypirc)�os�path�join�
expanduser��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/config.py�_get_rc_filezPyPIRCCommand._get_rc_file%s&���w�w�|�|�B�G�G�.�.�s�3�Y�?�?�c��|j�}tjtj|tjtj
zd�d�5}|j
t||fz�ddd�y#1swYyxYw)zCreates a default .pypirc file.i��wN)rr
�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�fs     r�
_store_pypirczPyPIRCCommand._store_pypirc)s]��
�
�
�
 ��
�Y�Y�r�w�w�r�2�:�:����#;�U�C�S�
I�Q�
�G�G�N�h��%9�9�:�J�
I�
I�s�A?�?Bc��|j�}tjj|��r�|j	d|z�|j
xs|j}t�}|j|�|j�}d|v�r|jdd�}|jd�D�cgc]%}|j�dk7r|j���'}}|gk(r
d|vrdg}niS|D]�}d|i}|j|d�|d<d	|jfd
|jfdfD]2\}	}
|j||	�r|j||	�||	<�.|
||	<�4|dk(r#||jdfvr|j|d	<|cS|d|k(s	|d	|k(s��|cSiSd|vred}|j|d	�r|j|d	�}n|j}|j|d�|j|d
�|||jd�SiScc}w)zReads the .pypirc file.zUsing PyPI login from %s�	distutilsz
index-servers�
�r�serverr�
repository�realm)rNzserver-loginr)rrr(r'r))rr
r�exists�announcer(�DEFAULT_REPOSITORYr�read�sections�get�split�strip�
DEFAULT_REALM�
has_option)rr r(�configr.�
index_serversr'�_servers�current�key�defaults           r�_read_pypirczPyPIRCCommand._read_pypirc/sD��
�
�
�
 ��
�7�7�>�>�"���M�M�4�r�9�:����C�D�,C�,C�J�$�&�F��K�K��O����(�H��h�&� &�
�
�;�� H�
�#0�"5�"5�d�";��";���|�|�~��+��L�L�N�";���
�r�>���)�$*�8�� "�	�&�F�'��0�G�*0�*�*�V�Z�*H�G�J�'�&�t�'>�'>�?� �$�"4�"4�5�*�)���W�
"�,�,�V�S�9�+1�:�:�f�c�+B�G�C�L�+2�G�C�L�)���'�J��/�/��;�-�15�0G�0G���-�&�� ��)�Z�7�"�<�0�J�>�&��;'�Z�	� �8�+�'���$�$�V�\�:�!'���F�L�!A�J�!%�!8�!8�J� &�
�
�6�:� >� &�
�
�6�:� >�",�$�!�/�/����	��us�4*H
c��ddl}|jdd�}|j|�djdd�}|j	�j|�S)z%Read and decode a PyPI HTTP response.rNzcontent-typez
text/plainr�charset�ascii)�cgi�	getheader�parse_headerr/r-�decode)r�responser>�content_type�encodings     r�_read_pypi_responsez!PyPIRCCommand._read_pypi_responsexsP����)�)�.�,�G���#�#�L�1�!�4�8�8��G�L���}�}��%�%�h�/�/rc�.�d|_d|_d|_y)zInitialize options.Nr)r(r)�
show_responsers r�initialize_optionsz PyPIRCCommand.initialize_options�s�������
���rc�z�|j�|j|_|j�|j|_yy)zFinalizes options.N)r(r,r)r2rs r�finalize_optionszPyPIRCCommand.finalize_options�s5���?�?�"�"�5�5�D�O��:�:���+�+�D�J�r)�__name__�
__module__�__qualname__�__doc__r,r2r(r)�user_options�boolean_optionsrr"r:rErHrJ�rrrrsb��@�:���M��J��E�
��>�AS�S�T�I��L�
'�'�O�@�;�G�R0��,rr)rNr
�configparserr�cmdrrrrQrr�<module>rTs*���

�(����u,�G�u,rpython3.12/site-packages/setuptools/_distutils/__pycache__/text_file.cpython-312.pyc000064400000025067151732703660024437 0ustar00�

��_i5/��$�dZddlZGd�d�Zy)z�text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes.�Nc�b�eZdZdZdddddddd�Zdd�Zd�Zd	�Zdd
�Zdd�Z	dd�Z
d
�Zd�Zd�Z
y)�TextFileaeProvides a file-like object that takes care of all the things you
    commonly want to do when processing a text file that has some
    line-by-line syntax: strip comments (as long as "#" is your
    comment character), skip blank lines, join adjacent lines by
    escaping the newline (ie. backslash at end of line), strip
    leading and/or trailing whitespace.  All of these are optional
    and independently controllable.

    Provides a 'warn()' method so you can generate warning messages that
    report physical line number, even if the logical line in question
    spans multiple physical lines.  Also provides 'unreadline()' for
    implementing line-at-a-time lookahead.

    Constructor is called as:

        TextFile (filename=None, file=None, **options)

    It bombs (RuntimeError) if both 'filename' and 'file' are None;
    'filename' should be a string, and 'file' a file object (or
    something that provides 'readline()' and 'close()' methods).  It is
    recommended that you supply at least 'filename', so that TextFile
    can include it in warning messages.  If 'file' is not supplied,
    TextFile creates its own using 'io.open()'.

    The options are all boolean, and affect the value returned by
    'readline()':
      strip_comments [default: true]
        strip from "#" to end-of-line, as well as any whitespace
        leading up to the "#" -- unless it is escaped by a backslash
      lstrip_ws [default: false]
        strip leading whitespace from each line before returning it
      rstrip_ws [default: true]
        strip trailing whitespace (including line terminator!) from
        each line before returning it
      skip_blanks [default: true}
        skip lines that are empty *after* stripping comments and
        whitespace.  (If both lstrip_ws and rstrip_ws are false,
        then some lines may consist of solely whitespace: these will
        *not* be skipped, even if 'skip_blanks' is true.)
      join_lines [default: false]
        if a backslash is the last non-newline character on a line
        after stripping comments and whitespace, join the following line
        to it to form one "logical line"; if N consecutive lines end
        with a backslash, then N+1 physical lines will be joined to
        form one logical line.
      collapse_join [default: false]
        strip leading whitespace from lines that are joined to their
        predecessor; only matters if (join_lines and not lstrip_ws)
      errors [default: 'strict']
        error handler used to decode the file content

    Note that since 'rstrip_ws' can strip the trailing newline, the
    semantics of 'readline()' must differ from those of the builtin file
    object's 'readline()' method!  In particular, 'readline()' returns
    None for end-of-file: an empty string might just be a blank line (or
    an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
    not.�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNc��|�
|�td��|jj�D]1}||vrt||||��t|||j|��3|j�D]}||jvs�t	d|z��|�|j|�g|_	y||_||_d|_g|_	y)z�Construct a new TextFile object.  At least one of 'filename'
        (a string) and 'file' (a file-like object) must be supplied.
        They keyword argument options are described above and affect
        the values returned by 'readline()'.Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrr�options�opts     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/text_file.py�__init__zTextFile.__init__Os���
�����I��
��'�'�,�,�.�C��g�~���c�7�3�<�0���c�4�#7�#7��#<�=�	/��<�<�>�C��$�.�.�.��=��C�D�D�"��<��I�I�h�����%�D�M��D�I� !�D��
���c�l�||_t|j|j��|_d|_y)zvOpen a new file named 'filename'.  This overrides both the
        'filename' and 'file' arguments to the constructor.)r
rN)rrr
rr)rrs  rrz
TextFile.openrs)��!��
�����t�{�{�;��	���rc�f�|j}d|_d|_d|_|j�y)zfClose the current file and forget everything we know about it
        (filename, current line number).N)rrr�close)rrs  rr!zTextFile.closeys,���y�y����	���
� ����
�
�rc�D�g}|�|j}|j|jdz�t|tt
f�r|jdt|�z�n|jd|z�|jt
|��dj|�S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�line�outmsgs    r�	gen_errorzTextFile.gen_error�s~�����<��$�$�D��
�
�d�m�m�d�*�+��d�T�5�M�*��M�M�/�E�$�K�7�8��M�M�+��,�-��
�
�c�#�h���w�w�v��rc�>�td|j||�z��)Nzerror: )�
ValueErrorr-�rr*r+s   r�errorzTextFile.error�s����T�^�^�C��%>�>�?�?rc�n�tjjd|j||�zdz�y)a�Print (to stderr) a warning message tied to the current logical
        line in the current file.  If the current logical line in the
        file spans multiple physical lines, the warning refers to the
        whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
        the current line number; it may be a list or tuple to indicate a
        range of physical lines, or an integer for a single physical
        line.z	warning: �
N)�sys�stderr�writer-r0s   r�warnz
TextFile.warn�s+��	�
�
����t�~�~�c�4�'@�@�4�G�Hrc��|jr|jd}|jd=|Sd}	|jj�}|dk(rd}|jrg|re|j	d�}|dk(rnN|dk(s||dz
dk7r,|ddk(xrdxsd}|d||z}|j�dk(r��|j
d	d�}|jr�|r�|�|jd
�|S|jr|j�}||z}t|jt�r |jddz|jd<nj|j|jdzg|_nI|�yt|jt�r|jddz|_n|jdz|_|jr|jr|j�}n9|jr|j�}n|jr|j!�}|dvr|j"r���|jr!|ddk(r|dd}��|ddd
k(r
|dddz}��|S)a=Read and return a single logical line from the current file (or
        from an internal buffer if lines have previously been "unread"
        with 'unreadline()').  If the 'join_lines' option is true, this
        may involve reading multiple physical lines concatenated into a
        single string.  Updates the current line number, so calling
        'warn()' after 'readline()' emits a warning about the physical
        line(s) just read.  Returns None on end-of-file, since the empty
        string can occur if 'rstrip_ws' is true but 'strip_blanks' is
        not.���r#N�#rr�\r3z\#z2continuation line immediately precedes end-of-file)r#r3���z\
)rr�readliner�find�strip�replacerr7r�lstripr%rr&r	r
�rstripr)rr+�buildup_line�pos�eols     rr=zTextFile.readline�sN���<�<��<�<��#�D����R� ��K�����9�9�%�%�'�D��r�z����"�"�t��i�i��n���"�9���A�X��c�A�g��$�!6� ��8�t�+�5��;��C���#�;��,�D��z�z�|�r�)� ��<�<��s�3�D����<��<��I�I�U�V�'�'��%�%��;�;�=�D�#�d�*���d�/�/��6�+/�+<�+<�Q�+?�!�+C�D�%�%�a�(�)-�):�):�D�<M�<M�PQ�<Q�(R�D�%��<���d�/�/��6�(,�(9�(9�!�(<�q�(@�D�%�(,�(9�(9�A�(=�D�%��~�~�$�.�.��z�z�|������{�{�}������{�{�}���z�!�d�&6�&6�������8�t�#�#'���9�L�����9��&�#'��"�:��#4�L���Krc�T�g}	|j�}|�|S|j|��&)zTRead and return the list of all logical lines remaining in the
        current file.)r=r$)r�linesr+s   r�	readlineszTextFile.readliness2������=�=�?�D��|����L�L���	rc�:�|jj|�y)z�Push 'line' (a string) onto an internal buffer that will be
        checked by future 'readline()' calls.  Handy for implementing
        a parser with line-at-a-time lookahead.N)rr$)rr+s  r�
unreadlinezTextFile.unreadlines��	
�����D�!r)NN)N)�__name__�
__module__�__qualname__�__doc__rrrr!r-r1r7r=rHrJ�rrrr
sX��8�v��������O�!�F��
�@�I�s�j�"rr)rNr4rrOrr�<module>rPs��.��T"�T"rpython3.12/site-packages/setuptools/_distutils/__pycache__/_msvccompiler.cpython-312.pyc000064400000053675151732703660025324 0ustar00�

��_i�L��,�dZddlZddlZddlZddlZddlmZeje�5ddl	Z	ddd�ddl
mZmZm
Z
mZmZddlmZmZddlmZddlmZddlmZd	�Zd
�Zddd
dd�Zd�Zd�Zdd�Zddddd�ZGd�de�Z y#1swY�[xYw)adistutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
�N�)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�log)�get_platform)�countc�p�	tjtjdtjtjz��}d}d}|5t�D]y}	tj||�\}}}|s�!|tjk(s�5tjj|�s�U	tt|��}|dk\s�p||kDs�v||}}�{ddd�||fS#t
$rt
jd�YywxYw#t
$rY�<wxYw#t t"f$rY��wxYw#1swY||fSxYw)Nz'Software\Microsoft\VisualStudio\SxS\VC7)�accesszVisual C++ is not registered�NNr�)�winreg�	OpenKeyEx�HKEY_LOCAL_MACHINE�KEY_READ�KEY_WOW64_32KEY�OSErrorr�debugr
�	EnumValue�REG_SZ�os�path�isdir�int�float�
ValueError�	TypeError)�key�best_version�best_dir�i�v�vc_dir�vt�versions        ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/_msvccompiler.py�_find_vc2015r+'s(�������%�%�6��?�?�V�%;�%;�;�
���L��H�	���A�
� &� 0� 0��a� 8�
��6�2��R�6�=�=�(�R�W�W�]�]�6�-B��!�%��(�m�G��b�=�W�|�%;�-4�f�(�L��

���!�!��'���	�	�0�1�����
��
��
#�I�.�����

���!�!�s~�AC �
D)�D�6D)�9D)�
D)�.D�D)�D)�D)� D�D�	D�
D)�D�D)�D&�#D)�%D&�&D)�)D5c��tjjd�xstjjd�}|sy	tjtj
j
|ddd�ddd	d
ddd
dg	dd��j�}tj
j
|ddd�}tj
j|�rd|fSy#tjttf$rYywxYw)aJReturns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    zProgramFiles(x86)�ProgramFilesrzMicrosoft Visual Studio�	Installerzvswhere.exez-latestz-prereleasez	-requiresz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64z	-property�installationPathz	-products�*�mbcs�strict)�encoding�errors�VC�	Auxiliary�Build�)r�environ�get�
subprocess�check_outputr�join�strip�CalledProcessErrorr�UnicodeDecodeErrorr)�rootrs  r*�_find_vc2017rBDs����:�:�>�>�-�.�P�"�*�*�.�.��2P�D�����&�&�������3�[�-�����C��"���
���
� �%�'�!	
�(�7�7�<�<��d�K��9�D�	�w�w�}�}�T���4�x����
�)�)�7�4F�G����s�AC�C;�:C;�x86�x64�arm�arm64)rC�	x86_amd64�x86_arm�	x86_arm64c��t�\}}|s
t�\}}|stjd�ytj
j
|d�}tj
j|�stjd|�y|dfS)Nz$No suitable Visual C++ version foundrz
vcvarsall.batz%s cannot be found)rBr+rrrrr=�isfile)�	plat_spec�_r$r#�	vcvarsalls     r*�_find_vcvarsallrOvso���.�K�A�x��!-����h���	�	�8�9�������X��7�I�
�7�7�>�>�)�$��	�	�&�	�2���d�?��c��tjd�r@tjj�D��cic]\}}|j	�|��c}}St|�\}}|st
d��	tjd|�d|�d�tj��jdd�	�}d�|j!�D�D���cic]\}}}|r|r|j	�|��}}}}|Scc}}w#tj$r<}tj|j�t
d
|j����d}~wwxYwcc}}}w)N�DISTUTILS_USE_SDKzUnable to find vcvarsall.batzcmd /u /c "z" z && set)�stderrzutf-16le�replace)r4zError executing c3�>K�|]}|jd����y�w)�=N)�	partition)�.0�lines  r*�	<genexpr>z_get_vc_env.<locals>.<genexpr>�s����O�>N�d�d�n�n�S�1�>N�s�)r�getenvr9�items�lowerrOrr;r<�STDOUT�decoder?r�error�output�cmd�
splitlines)rLr"�valuerNrM�out�exc�envs        r*�_get_vc_envrh�s:��	�y�y�$�%�57�Z�Z�5E�5E�5G�H�5G�z�s�E��	�	��U�"�5G�H�H�"�9�-�L�I�q��$�%C�D�D�C��%�%��)��B�y�k��9��$�$�
��&��I�&�
.�	�P�c�n�n�>N�O��O�M�C��E��5�	�	�	��U��O����J��+I���(�(�C��	�	�#�*�*��$�'7����y�%A�B�B��C��s#�C0�2=C6�
 E�6E�	7E�Ec�<�|s2tjd�jtj�}|D]b}tjjtjj
|�|�}tjj|�s�`|cS|S)atReturn path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    r)rr[�split�pathseprr=�abspathrK)�exe�paths�p�fns    r*�	_find_exerq�sk����	�	�&�!�'�'��
�
�3��
��
�W�W�\�\�"�'�'�/�/�!�,�c�
2��
�7�7�>�>�"���I���JrPrGrHrI)�win32z	win-amd64z	win-arm32z	win-arm64c�<��eZdZdZdZiZdgZgd�ZdgZdgZ	eezeze	zZ
dZdZd	Z
d
ZdxZZdZd�fd
�	Zed��Zed��Zdd�Ze�fd��Z							dd�Z	dd�Z										dd�Z�fd�Zej>�fd��Z d�Z!d�Z"d�Z#d d�Z$�xZ%S)!�MSVCCompilerztConcrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class.�msvcz.c)z.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exec�D��t�|�|||�d|_d|_y)NF)�super�__init__�	plat_name�initialized)�self�verbose�dry_run�force�	__class__s    �r*ryzMSVCCompiler.__init__�s#���
����'�5�1���� ��rPc��|j|jdd��|_|j|jdd��|_y)z3
        Set class-level include/lib dirs.
        �include��libN)�_parse_pathr:�include_dirs�library_dirs)�cls�vc_envs  r*�
_configurezMSVCCompiler._configure�s<��
�?�?�6�:�:�i��+D�E����?�?�6�:�:�e�R�+@�A��rPc��|jtj�D�cgc]$}|s�|jtj���&c}Scc}w�N)rjrrk�rstrip�sep)�val�dirs  r*r�zMSVCCompiler._parse_path�s8��.1�i�i��
�
�.C�K�.C�s�s��
�
�2�6�6�"�.C�K�K��Ks
�A�!Ac��|jrJd��|�
t�}|tvrtdt	t�����t|}t|�}|std��|j
|�|jdd�|_|jjtj�}td|�|_
td|�|_td|�|_td	|�|_td
|�|_td|�|_d|_gd�|_gd
�|_gd�}gd�}g|�d�|_g|�d�|_g|�d�d�d�|_g|�d�d�d�|_g|�|_g|�|_t8j:df|j,t8j:df|j,t8j:df|j.t8j<df|j0t8j<df|j0t8j<df|j2t8j>df|j4t8j>df|j4t8j>df|j6i	|_ d|_y)Nzdon't init multiple timesz--plat-name must be one of z7Unable to find a compatible Visual Studio installation.rr�zcl.exezlink.exezlib.exezrc.exezmc.exezmt.exe)�/nologoz/O2�/W3z/GLz/DNDEBUGz/MD)r�z/Odz/MDdz/Zir�z/D_DEBUG)r��/INCREMENTAL:NO�/LTCG)r�r�r�z/DEBUG:FULLz/MANIFEST:EMBED,ID=1z/DLLz/MANIFEST:EMBED,ID=2z/MANIFESTUAC:NOFT)!r{r�PLAT_TO_VCVARSr�tuplerhr�r:�_pathsrjrrkrq�cc�linkerr��rc�mc�mt�preprocess_options�compile_options�compile_options_debug�ldflags_exe�ldflags_exe_debug�ldflags_shared�ldflags_shared_debug�ldflags_static�ldflags_static_debugr	�
EXECUTABLE�
SHARED_OBJECT�SHARED_LIBRARY�_ldflags)r|rzrLr�rn�ldflags�
ldflags_debugs       r*�
initializezMSVCCompiler.initialize�s����#�#�@�%@�@�#���$��I��N�*�(�-�e�N�.C�-D�E��
�
#�9�-�	��Y�'���(�L��
�	
������j�j���,������!�!�"�*�*�-���H�e�,����
�E�2����Y��.����H�e�,����H�e�,����H�e�,���"&��� S���&
��"�:��N�
�=�W�=�&<�=���!I�=�!I�2H�!I���
�
�
��
�
#�
�
�	
���%
�
�%
��%
�
#�%
�
�	%
��!�)��j���$4�m�$4��!��
!�
!�4�(�$�*:�*:�
�
!�
!�5�)�4�+;�+;�
�
!�
!�4�(�$�*@�*@�
�
$�
$�d�+�T�-@�-@�
�
$�
$�e�,�d�.A�.A�
�
$�
$�d�+�T�-F�-F�
�
%�
%�t�,�d�.A�.A�
�
%�
%�u�-�t�/B�/B�
�
%�
%�t�,�d�.G�.G�

��
� ��rPc���it�|��|j|jzD�cic]}||j��c}�Scc}wr�)rx�out_extensions�_rc_extensions�_mc_extensions�
res_extension)r|�extr�s  �r*r�zMSVCCompiler.out_extensionsAs]���
��g�$�
� �.�.��1D�1D�D��D�C��T�'�'�'�D��
�	
��s�Ac		���|js|j�|j||||||�}	|	\}}
}}}|xsg}
|
jd�|r|
j	|j
�n|
j	|j�d}|
D�]�}	||\}}|rtjj|�}||jvrd|z}�nV||jvr	d|z}d}�n?||jvr-|}d|z}	|j|jg|z||gz���||j$vr�tjj'|�}tjj'|�}	|j|j(d|d||g�tjj+tjj-|��\}}tjj/||d	z�}|j|jd|z|g����t#d
|�d|����|j0g|
z|z}|r|jd�|j	|d
|zf�|j	|�	|j|����|
S#t$rY��	wxYw#t $r}t#|��d}~wwxYw#t $r}t#|��d}~wwxYw#t $r}t#|��d}~wwxYw)Nz/cFz/Tcz/TpTz/foz-hz-rrvzDon't know how to compile z to z/EHscz/Fo)r{r��_setup_compile�append�extendr�r��KeyErrorrrrl�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer��splitext�basenamer=r�)r|�sources�
output_dir�macrosr�r�
extra_preargs�extra_postargs�depends�compile_info�objects�pp_opts�build�compile_opts�add_cpp_opts�obj�srcr��	input_opt�
output_opt�msg�h_dir�rc_dir�baserM�rc_file�argss                           r*�compilezMSVCCompiler.compileKs�������O�O���*�*����g�w��
��;G�7�����%�$�*������D�!������ :� :�;����� 4� 4�5����C�
� ��:���S���g�g�o�o�c�*���d�(�(�(�!�C�K�	���,�,�,�!�C�K�	�#����+�+�+��	�"�S�[�
�,��J�J����y�7�2�j�)�5L�L�M����+�+�+�������,��������-��	,��J�J�����u�d�F�C�H�I� �g�g�.�.�r�w�w�/?�/?��/D�E�G�D�!� �g�g�l�l�6�4�%�<�@�G��J�J�������g�>�?��#�%?��u�D���#N�O�O��G�G�9�|�+�g�5�D�����G�$��K�K��E�C�K�0�1��K�K��'�
(��
�
�4� �{�B���}�
��
��&*�,�&�s�+�+��,��2*�,�&�s�+�+��,��&�
(�"�3�'�'��
(�s[�J�?$J�1B$J8�6K�	J�J�	J5�%J0�0J5�8	K�K�K�	K-�K(�(K-c���|js|j�|j||�\}}|j||��}|j	||�r]|d|zgz}|r		tjd|jdj|��|j|jg|z�ytjd|�y#t$r}t|��d}~wwxYw)N)r��/OUT:�Executing "%s" %s� �skipping %s (up-to-date))r{r��_fix_object_args�library_filename�
_need_linkrrr�r=r�rr)	r|r��output_libnamer�r�target_lang�output_filename�lib_argsr�s	         r*�create_static_libzMSVCCompiler.create_static_lib�s�������O�O��"�3�3�G�Z�H�����/�/��:�/�V���?�?�7�O�4��'�O�";�!<�<�H���
$��	�	�-�t�x�x����(�9K�L��
�
�D�H�H�:��0�1�
�I�I�0�/�B��&�
$��s�m�#��
$�s�$AC�	C$�C�C$c��|js|j�|j||�\}}|j|||�}|\}}}|r|j	dt|�z�t
||||�}|� tjj||�}|j||��r�|j||	f}|xsgD�cgc]}d|z��	}}||z|z|zd|zgz}tjj|d�}|��tjjtjj|��\}}tjj||j|��}|j!d|z�|
r|
|dd|r|j#|�tjjtjj%|��}|j'|�	t)j*d|j,dj|��|j/|j,g|z�yt)j*d|�ycc}w#t0$r}t3|��d}~wwxYw)	Nz5I don't know what to do with 'runtime_library_dirs': z/EXPORT:r�rz/IMPLIB:r�r�r�)r{r�r��
_fix_lib_args�warn�strr
rrr=r�r�r�r�r�r�r�r�rl�mkpathrrr�r�rr)r|�target_descr�r�r��	librariesr��runtime_library_dirs�export_symbolsrr�r��
build_tempr��
fixed_args�lib_optsr��sym�export_opts�ld_args�dll_name�dll_ext�implib_filer�s                        r*�linkzMSVCCompiler.link�s8�� ����O�O��"�3�3�G�Z�H�����'�'�	�<�AU�V�
�8B�5�	�<�!5���I�I�G��*�+�,�
�
#�4��7K�Y�W���!� �g�g�l�l�:��G�O��?�?�7�O�4��m�m�K��$6�7�G�8F�8L�"�8L�N�8L��:��+�8L�K�N��(�"�[�0�7�:�g��>W�=X�X�
���������4�J��)�&(�g�g�&6�&6��G�G�$�$�_�5�'�#��7�!�g�g�l�l�:�t�7L�7L�X�7V�W�����z�K�7�8��+���������~�.������������)I�J�J��K�K�
�#�
%��	�	�-�t�{�{�C�H�H�W�<M�N��
�
�D�K�K�=�7�2�3�
�I�I�0�/�B��AO��:&�
%���n�$��
%�s�I�4AI � 	I9�)I4�4I9c����ttj|j��}|j	||�5}t
�|�||��cddd�S#1swYjSxYw)N)�PATH)rg)�dictrr9r��_fallback_spawnrxr�rd)r|rbrg�fallbackr�s    �r*r�zMSVCCompiler.spawnsO����2�:�:�D�K�K�0��
�
!�
!�#�s�
+�x��7�=��#�=�.�,�
+�
+��~�~��s�A�A(c#�B�K�tddi��}	|��y#t$r}dt|�vr�Yd}~nd}~wwxYwtjd�t
jjd|�5t�|�%|�|_
ddd�y#1swYyxYw�w)z�
        Discovered in pypa/distutils#15, some tools monkeypatch the compiler,
        so the 'env' kwarg causes a TypeError. Detect this condition and
        restore the legacy, unsafe behavior.
        �Bag�Nz!unexpected keyword argument 'env'z>Fallback spawn triggered. Please update distutils monkeypatch.z
os.environ)�typer!r��warningsr��mock�patchr�rxr�rd)r|rbrg�bagrfr�s     �r*r�zMSVCCompiler._fallback_spawns������"�d�5�"�b�!�#��	��I�

��	�	�2�#�c�(�B��C��	��
	�
�
�V�W�
�Z�Z�_�_�\�3�
/���
�c�*�C�I�0�
/�
/�s<�B��B�	=�8�B�=�8B�5B�
	B�B�Bc��d|zS)Nz	/LIBPATH:r��r|r�s  r*�library_dir_optionzMSVCCompiler.library_dir_options
���S� � rPc��td��)Nz:don't know how to set runtime library search path for MSVC)rrs  r*�runtime_library_dir_optionz'MSVCCompiler.runtime_library_dir_option"s��$�H�
�	
rPc�$�|j|�Sr�)r�)r|r�s  r*�library_optionzMSVCCompiler.library_option's���$�$�S�)�)rPc���|r|dz|g}n|g}|D]]}|D]V}tjj||j|��}tjj	|�s�R|ccS�_y)N�_d)rrr=r�rK)r|�dirsr�r�	try_namesr��name�libfiles        r*�find_library_filezMSVCCompiler.find_library_file*si����t��S�)�I���I��C�!���'�'�,�,�s�D�,A�,A�$�,G�H���7�7�>�>�'�*�"�N�"��rP)rrrr�)NNNrNNN)NrN)
NNNNNrNNNN)r)&�__name__�
__module__�__qualname__�__doc__�
compiler_type�executablesr�r�r�r��src_extensionsr��
obj_extension�static_lib_extension�shared_lib_extension�static_lib_format�shared_lib_format�
exe_extensionry�classmethodr��staticmethodr�r��propertyr�r�r�r�r��
contextlib�contextmanagerr�rrr	r�
__classcell__)r�s@r*rtrt�sA���3��M��K��F�M�-�O��W�N��W�N�#�_�4�~�E��V�N��M��M�!��!��,2�2��)��M�!��B��B��L��L�N �d�
��
��������\�~NR�C�2���!�������CC�J����+��+�,!�
�
*�rPrtr�)!rrr;r!r��
unittest.mockr�suppress�ImportErrorrr4rrrrr�	ccompilerr	r
�_logr�utilr�	itertoolsr
r+rB�PLAT_SPEC_TO_RUNTIMErOrhrqr�rtr�rPr*�<module>r,s����
������Z����%��&���2����"�:'�V����	���&�4�,����	��x�9�x�U&�%�s�B
�
Bpython3.12/site-packages/setuptools/_distutils/__pycache__/fancy_getopt.cpython-312.pyc000064400000036341151732703660025133 0ustar00�

��_i�E�	���dZddlZddlZddlZddlZddlmZmZdZejdez�Z
ejdjee��Ze
jdd	�ZGd
�d�Zd�Zej$D�cic]}e|�d
��
c}Zd�Zd�ZGd�d�Zedk(r:dZdD]2Zedez�edj9eee���e��4yycc}w)a6distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
�N�)�DistutilsGetoptError�DistutilsArgErrorz[a-zA-Z](?:[a-zA-Z0-9-]*)z^%s$z^({})=!({})$�-�_c�n�eZdZdZdd�Zd�Zd�Zdd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
dd
�Zd�Zdd�Zdd�Zy)�FancyGetopta�Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    Nc���||_i|_|jr|j�i|_i|_g|_g|_i|_i|_i|_	g|_
y�N)�option_table�option_index�_build_index�alias�negative_alias�
short_opts�	long_opts�
short2long�	attr_name�	takes_arg�option_order��selfrs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/fancy_getopt.py�__init__zFancyGetopt.__init__,sm��)���������������
�!������������������
���c�~�|jj�|jD]}||j|d<�y)Nr)r
�clearr)r�options  rrzFancyGetopt._build_indexTs8�������!��'�'�F�+1�D���f�Q�i�(�(rc�2�||_|j�yr)rrrs  r�set_option_tablezFancyGetopt.set_option_tableYs��(������rc��||jvrtd|z��|||f}|jj|�||j|<y)Nz'option conflict: already an option '%s')r
rr�append)r�long_option�short_option�help_stringrs     r�
add_optionzFancyGetopt.add_option]sW���$�+�+�+�&�9�K�G��
�"�<��=�F����$�$�V�,�-3�D���k�*rc��||jvS)zcReturn true if the option table for this parser has an
        option with long name 'long_option'.)r
�rr#s  r�
has_optionzFancyGetopt.has_optiongs���d�/�/�/�/rc�,�|jt�S)z�Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.��	translate�
longopt_xlater(s  r�
get_attr_namezFancyGetopt.get_attr_namels���$�$�]�3�3rc
���t|t�sJ�|j�D]K\}}||jvrt	d|�d|�d|�d���||jvs�8t	d|�d|�d|�d���y)Nzinvalid z 'z': option 'z
' not defined�': aliased option ')�
isinstance�dict�itemsr
r)r�aliases�whatr�opts     r�_check_alias_dictzFancyGetopt._check_alias_dictrsv���'�4�(�(�(�!�-�-�/�J�E�3��D�-�-�-�*��U�E�+����$�+�+�+�*��U�C�)���*rc�6�|j|d�||_y)z'Set the aliases for this option parser.rN)r7r)rrs  r�set_aliaseszFancyGetopt.set_aliases�s�����u�g�.���
rc�6�|j|d�||_y)z�Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.znegative aliasN)r7r)rrs  r�set_negative_aliasesz FancyGetopt.set_negative_aliases�s��
	
���~�/?�@�,��rc��g|_g|_|jj�i|_|j
D�]}t
|�dk(r	|\}}}d}n0t
|�dk(r|\}}}}ntdj|���t|t�rt
|�dkrtd|z��|�,t|t�rt
|�dk(std	|z��||j|<|jj|�|d
dk(r|r|dz}|dd
}d|j|<n\|jj|�}|�0|j|rtd
|�d|�d���||jd
<d|j|<|j j|�}|�1|j||j|k7rtd|�d|�d���t"j%|�std|z��|j'|�|j(|<|s���|jj|�||j|d<��y)z�Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        �r�zinvalid option tuple: {!r}�z9invalid long option '%s': must be a string of length >= 2Nrz:invalid short option '%s': must a single character or None����=�:zinvalid negative alias 'r0z' takes a valuezinvalid alias 'z%': inconsistent with aliased option 'z/' (one of them takes a value, the other doesn'tzEinvalid long option name '%s' (must be letters, numbers, hyphens only)rrrr�repeatr�len�
ValueError�formatr1�strrr"rr�getr�
longopt_re�matchr.r)rr�long�short�helprC�alias_tos       r�_grok_option_tablezFancyGetopt._grok_option_table�sY��
����������������'�'�F��6�{�a��$*�!��e�T����V���!�,2�)��e�T�6�!�!=�!D�!D�V�!L�M�M��d�C�(�C��I��M�*�S�����
�]�
�5�#�(>�3�u�:�QR�?�*�6�8=�>���
!'�D�K�K����N�N�!�!�$�'��B�x�3���!�C�K�E��A�b�z��'(����t�$� �.�.�2�2�4�8���'��~�~�h�/�2�CG��S���
*.�D�N�N�2�&�'(����t�$��z�z�~�~�d�+�H��#��>�>�$�'�4�>�>�(�+C�C�.�04�X�?����#�#�D�)�*�>�@D�E���
$(�#5�#5�d�#;�D�N�N�4� �����&�&�u�-�,0�����a��)�M(rc�v�|�tjdd}|�
t�}d}nd}|j�dj	|j
�}	t
j|||j�\}}|D�]\}}t|�dk(r|ddk(r|j|d}nt|�dkDr|ddd	k(sJ�|dd}|jj|�}	|	r|	}|j|s0|d
k(sJd��|jj|�}	|	r|	}d}nd}|j |}
|r+|j"j|
��t%||
d�dz}t'||
|�|j(j+||f���|r||fS|S#tj$r}t|��d}~wwxYw)aParse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        NrTF� r?rrz--�zboolean option can't have value)�sys�argv�OptionDummyrO�joinr�getoptr�errorrrDrrrHrrrrC�getattr�setattrrr")r�args�object�created_objectr�opts�msgr6�valr�attrs           rrWzFancyGetopt.getopt�s����<��8�8�A�B�<�D��>� �]�F�!�N�"�N����!��X�X�d�o�o�.�
�	)����t�Z����H�J�D�$��H�C���3�x�1�}��Q��3���o�o�c�!�f�-���3�x�!�|��B�Q��4��7�7��!�"�g���J�J�N�N�3�'�E�����>�>�#�&��b�y�C�"C�C�y��+�+�/�/��4����C��C��C��>�>�#�&�D��t�{�{���t�,�8��f�d�A�.��2���F�D�#�&����$�$�c�3�Z�0�5�:���<���K��G�|�|�	)�#�C�(�(��	)�s�$F�F8�(F3�3F8c�H�|j�td��|jS)z�Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        z!'getopt()' hasn't been called yet)r�RuntimeError)rs r�get_option_orderzFancyGetopt.get_option_orders(��
���$��B�C�C��$�$�$rc�b�d}|jD]3}|d}|d}t|�}|ddk(r|dz
}|�|dz}||kDs�2|}�5|dzdzdz}d}||z
}	d	|z}
|r|g}nd
g}|jD]�}|dd\}}}t||	�}
|ddk(r|dd}|�4|
r|jd|||
dfz�nZ|jd
||fz�nCdj	||�}|
r|jd|||
dfz�n|jd|z�|
ddD]}|j|
|z����|S)z�Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        rrr@rAN�r?�NrQzOption summary:r=z  --%-*s  %sz
  --%-*s  z{} (-{})z  --%-*s)rrD�	wrap_textr"rF)r�header�max_optrrKrL�ell�	opt_width�
line_width�
text_width�
big_indent�linesrM�text�	opt_namess               r�
generate_helpzFancyGetopt.generate_help&s������'�'�F��!�9�D��1�I�E��d�)�C��B�x�3���A�g��� ��A�g���W�}���(��a�K�!�O�a�'�	�0�
��)�+�
��9�_�
���H�E�&�'�E��'�'�F� &�r��
��D�%���T�:�.�D��B�x�3���A�b�z���}���L�L��7�D�$�q�'�2J�!J�K��L�L���$��!?�@�
'�-�-�d�E�:�	���L�L��7�I�t�A�w�2O�!O�P��L�L��i�!7�8��A�B�x�����Z�#�-�.� �-(�0�rc�|�|�tj}|j|�D]}|j|dz��y)N�
)rS�stdoutrs�write)rri�file�lines    r�
print_helpzFancyGetopt.print_helpts5���<��:�:�D��&�&�v�.�D��J�J�t�d�{�#�/rr)NN)�__name__�
__module__�__qualname__�__doc__rrr r&r)r.r7r9r;rOrWrdrsrz�rrr	r	 sS��	�&�P2�
�4�0�
4���
-�P1�d;�z%�L�\$rr	c�^�t|�}|j|�|j||�Sr)r	r;rW)�options�negative_optr\r[�parsers     r�fancy_getoptr�{s+��
��
!�F�
����-��=�=��v�&�&rrQc�*�|�gSt|�|kr|gS|j�}|jt�}t	j
d|�}|D�cgc]}|s�|��	}}g}|r�g}d}|rGt|d�}||z|kr|j
|d�|d=||z}n|r|dddk(r|d=n|r�G|r5|dk(r"|j
|dd|�|d|d|d<|dddk(r|d=|j
dj|��|r��|Scc}w)z�wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    Nz( +|-+)rr@rQrR)rD�
expandtabsr,�WS_TRANS�re�splitr"rV)rq�width�chunks�chrp�cur_line�cur_lenrks        rrhrh�sO���|��	�
�4�y�E���v�
��?�?��D��>�>�(�#�D�
�X�X�j�$�
'�F�!�
(�6�R�R�b�6�F�
(��E�
�������f�Q�i�.�C���}��%�����q�	�*��1�I�!�C�-������Q��3� 6� �������!�|�����q�	�!�E� 2�3�"�1�I�e�f�-��q�	�
�a�y��|�s�"��1�I�	���R�W�W�X�&�'�A�D�L��K)s�D�Dc�,�|jt�S)zXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    r+)r6s r�translate_longoptr��s���=�=��'�'rc��eZdZdZgfd�Zy)rUz_Dummy class just used as a place to hold command-line option
    values as instance attributes.c�,�|D]}t||d��y)zkCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N)rZ)rr�r6s   rrzOptionDummy.__init__�s���C��D�#�t�$�rN)r{r|r}r~rrrrrUrU�s��&� "�%rrU�__main__z�Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].))�
���(z	width: %dru)r~rS�stringr�rW�errorsrr�longopt_pat�compilerIrF�neg_alias_rerG�	maketransr-r	r��
whitespace�ordr�rhr�rUr{rq�w�printrV)�_wschars0r�<module>r�s����
�	�
�;�+��
�R�Z�Z��+�-�
.�
��r�z�z�.�/�/��[�I�J���
�
�c�3�'�
�X$�X$�v
'�.4�->�->�?�->�'�C��L�#��->�?��3�l(�%�%��z�� �D���
�k�A�o��
�d�i�i�	�$��*�+�,�
�����W@s�C$python3.12/site-packages/setuptools/_distutils/__pycache__/ccompiler.cpython-312.pyc000064400000126311151732703660024423 0ustar00�

��_i�����dZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZddlm
Z
ddlmZddlmZdd	lmZmZdd
lmZGd�d�Zd
Zdd�Zdddddd�Zd�Zdd�Zd�Zd�Zy)z�distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.�N�)�CompileError�	LinkError�UnknownFileError�DistutilsPlatformError�DistutilsModuleError)�spawn)�	move_file)�mkpath)�newer_group)�split_quoted�execute)�logc�B�eZdZdZdZdZdZdZdZdZ	dZ
dZdddddd�Zgd�Z
gZ	gZ	d?d�Zd	�Zd
�Zd�Zd�Zd@d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d@d�Z$d�Z%d�Z&d�Z'd �Z(					dAd!�Z)							dBd"�Z*d#�Z+	dCd$�Z,d%Z-d&Z.d'Z/										dDd(�Z0										dDd)�Z1										dDd*�Z2								dEd+�Z3d,�Z4d-�Z5d.�Z6				dFd/�Z7dGd0�Z8dHd1�Z9e:d2��Z;d3�Z<e=d4��Z>dHd5�Z?dHd6�Z@	dId7�ZAdJd8�ZBd9�ZCd:�ZDdKd;�ZEd<�ZFd=�ZGdLd>�ZHy)M�	CCompilera�Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    N�c�c++�objc)�.cz.ccz.cppz.cxxz.m)rrrc��||_||_||_d|_g|_g|_g|_g|_g|_g|_	|jj�D]!}|j||j|��#y�N)
�dry_run�force�verbose�
output_dir�macros�include_dirs�	libraries�library_dirs�runtime_library_dirs�objects�executables�keys�set_executable)�selfrrr�keys     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/ccompiler.py�__init__zCCompiler.__init__js��������
�������������������%'��!�����#�#�(�(�*�C�����T�%5�%5�c�%:�;�+�c��|D]J}||jvr%td|�d|jj����|j	|||��Ly)a�Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        zunknown executable 'z' for class N)r"�
ValueError�	__class__�__name__r$)r%�kwargsr&s   r'�set_executableszCCompiler.set_executables�sS��4�C��$�*�*�*� ��D�N�N�3�3�5���
����V�C�[�1�
r)c�l�t|t�rt||t|��yt|||�yr)�
isinstance�str�setattrr
)r%r&�values   r'r$zCCompiler.set_executable�s)���e�S�!��D�#�|�E�2�3��D�#�u�%r)c�L�d}|jD]}|d|k(r|cS|dz
}�y)Nrr)r)r%�name�i�defns    r'�_find_macrozCCompiler._find_macro�s3��
���K�K�D��A�w�$����
��F�A� �r)c���|D]^}t|t�r9t|�dvr,t|dt�s|d�t|dt�r�Lt	d|zdzdz��y)z�Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        )r�rNrzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r1�tuple�lenr2�	TypeError)r%�definitionsr8s   r'�_check_macro_definitionsz"CCompiler._check_macro_definitions�sn��
 �D��4��'���I��'�#�D��G�S�1�T�!�W�_��t�A�w��,��6��=�F�G�&�'��� r)c�~�|j|�}|�
|j|=|jj||f�y)a_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        N�r9r�append)r%r6r4r7s    r'�define_macrozCCompiler.define_macro�s:��
���T�"���=����A�������D�%�=�)r)c��|j|�}|�
|j|=|f}|jj|�y)a�Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        NrB)r%r6r7�undefns    r'�undefine_macrozCCompiler.undefine_macro�s=��
���T�"���=����A����������6�"r)c�:�|jj|�y)z�Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N)rrC�r%�dirs  r'�add_include_dirzCCompiler.add_include_dir����	
��� � ��%r)c��|dd|_y)aySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        N�r�r%�dirss  r'�set_include_dirszCCompiler.set_include_dirs�s��!��G��r)c�:�|jj|�y)a�Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N)rrC)r%�libnames  r'�add_libraryzCCompiler.add_librarys��	
�����g�&r)c��|dd|_y)z�Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N)r)r%�libnamess  r'�
set_librarieszCCompiler.set_librariess��"�!���r)c�:�|jj|�y)a'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N)rrCrIs  r'�add_library_dirzCCompiler.add_library_dirrLr)c��|dd|_y)z�Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N)rrOs  r'�set_library_dirszCCompiler.set_library_dirs's��
!��G��r)c�:�|jj|�y)zlAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N)r rCrIs  r'�add_runtime_library_dirz!CCompiler.add_runtime_library_dir.s��	
�!�!�(�(��-r)c��|dd|_y)z�Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N)r rOs  r'�set_runtime_library_dirsz"CCompiler.set_runtime_library_dirs4s��%)��G��!r)c�:�|jj|�y)z�Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N)r!rC)r%�objects  r'�add_link_objectzCCompiler.add_link_object<s��	
�����F�#r)c��|dd|_y)z�Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N)r!)r%r!s  r'�set_link_objectszCCompiler.set_link_objectsDs���q�z��r)c��|j|||�\}}}|�g}|j|d|��}t|�t|�k(sJ�t||�}i}	t	t|��D]c}
||
}||
}t
jj|�d}
|jt
jj|��||
f|	|<�e|||||	fS)z;Process arguments and decide which source files to compile.r)�	strip_dirrr)
�_fix_compile_args�object_filenamesr=�gen_preprocess_options�range�os�path�splitextr�dirname)r%�outdirr�incdirs�sources�depends�extrar!�pp_opts�buildr7�src�obj�exts              r'�_setup_compilezCCompiler._setup_compileQs���"&�"8�"8����"Q������=��E��'�'��1��'�P���7�|�s�7�|�+�+�+�(���9�����s�7�|�$�A��!�*�C��!�*�C��'�'�"�"�3�'��*�C��K�K�������,�-��s��E�#�J�%��w��w��5�5r)c�0�|dgz}|rdg|dd|r||dd|S)Nz-cz-gr�)r%rt�debug�before�cc_argss     r'�_get_cc_argszCCompiler._get_cc_argshs1���T�F�"����&�G�B�Q�K�� �G�B�Q�K��r)c��|�
|j}nt|t�std��|�
|j}n/t|t
�r||jxsgz}ntd��|�t|j�}n>t|t
tf�rt|�|jxsgz}ntd��||jjz
}|||fS)a'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        �%'output_dir' must be a string or Nonez/'macros' (if supplied) must be a list of tuplesz6'include_dirs' (if supplied) must be a list of strings)	rr1r2r>r�listrr<r,)r%rrrs    r'rgzCCompiler._fix_compile_argsqs��������J��J��,��C�D�D��>��[�[�F�
���
%��t�{�{�0�b�1�F��M�N�N����� 1� 1�2�L�
��t�U�m�
4���-��1B�1B�1H�b�I�L��T�U�U�	����3�3�3���6�<�/�/r)c�b�|j||��}t|�t|�k(sJ�|ifS)a,Decide which source files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        �r)rhr=)r%rqrrrr!s     r'�
_prep_compilezCCompiler._prep_compile�s;���'�'��J�'�G���7�|�s�7�|�+�+�+���{�r)c��t|ttf�std��t|�}|�|j}||fSt|t
�std��||fS)z�Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        z,'objects' must be a list or tuple of stringsr�)r1r�r<r>rr2)r%r!rs   r'�_fix_object_argszCCompiler._fix_object_args�sf���'�D�%�=�1��J�K�K��w�-�������J���$�$��J��,��C�D�D���$�$r)c��|�
|j}n>t|ttf�rt|�|jxsgz}nt	d��|�
|j
}n>t|ttf�rt|�|j
xsgz}nt	d��||jj
z
}|�
|j}n>t|ttf�rt|�|jxsgz}nt	d��|||fS)a;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        z3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr1r�r<r>rr,r )r%rrr s    r'�
_fix_lib_argszCCompiler._fix_lib_args�s�������I�
�	�D�%�=�
1��Y��4�>�>�+?�R�@�I��Q�R�R����,�,�L�
��t�U�m�
4���-��1B�1B�1H�b�I�L��T�U�U�	����3�3�3���'�#'�#<�#<� �
�,�t�U�m�
<�#'�(<�#=��)�)�/�R�$� ��S��
��<�)=�>�>r)c�p�|jry|jrt||d��}|St||�}|S)zjReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        T�newer)�missing)rrr)r%r!�output_filer�s    r'�
_need_linkzCCompiler._need_link�s=���:�:���|�|�#�G�[�'�J���L�$�G�[�9���Lr)c�J�t|t�s|g}d}t|j�}|D]d}tj
j
|�\}}|jj|�}	|jj|�}||kr|}|}�f|S#t$rY�twxYw)z|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N)r1r�r=�language_orderrkrlrm�language_map�get�indexr+)	r%rq�langr��source�baserx�extlang�extindexs	         r'�detect_languagezCCompiler.detect_language�s����'�4�(��i�G����D�'�'�(���F����(�(��0�I�D�#��'�'�+�+�C�0�G�
��.�.�4�4�W�=���e�#�"�D�$�E�������
��
�s�.$B�	B"�!B"c��y)a�Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        Nr{)r%r�r�rr�
extra_preargs�extra_postargss       r'�
preprocesszCCompiler.preprocess�s��$	
r)c		���|j||||||�\}}	}}
}|j|
||�}|	D]!}
	||
\}}|j|
|||||
��#|	S#t$rY�1wxYw)aK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepend/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        )ryr�KeyError�_compile)r%rqrrrr|r�r�rrr!rtrur~rwrvrxs                r'�compilezCCompiler.compiles���z;?�:M�:M����g�w��;
�7�����%��#�#�G�U�M�B���C�
� ��:���S�
�M�M�#�s�C��.�'�J������
��
�s�A�	A$�#A$c��y)zCompile 'src' to product 'obj'.Nr{)r%rwrvrxr~r�rts       r'r�zCCompiler._compile]s��	
r)c��y)a&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        Nr{)r%r!�output_libnamerr|�target_langs      r'�create_static_libzCCompiler.create_static_libcs��2	
r)�
shared_object�shared_library�
executablec��t�)auLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        ��NotImplementedError)r%�target_descr!�output_filenamerrrr �export_symbolsr|r�r��
build_tempr�s              r'�linkzCCompiler.link�s��v"�!r)c
�|�|jtj||j|d��|||||||	|
||�
y)N�shared)�lib_type)r�r�SHARED_LIBRARY�library_filename)
r%r!r�rrrr r�r|r�r�r�r�s
             r'�link_shared_libzCCompiler.link_shared_lib�sM��	
�	�	��$�$���!�!�.�8�!�D���� �������	
r)c
�Z�|jtj|||||||||	|
||�
yr)r�r�
SHARED_OBJECT)
r%r!r�rrrr r�r|r�r�r�r�s
             r'�link_shared_objectzCCompiler.link_shared_object�s=��	
�	�	��#�#������ �������	
r)c�x�|jtj||j|�||||d|||	d|
�
yr)r�r�
EXECUTABLE�executable_filename)r%r!�output_prognamerrrr r|r�r�r�s           r'�link_executablezCCompiler.link_executablesH��	
�	�	�� � ���$�$�_�5���� �������	
r)c��t�)zkReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        r�rIs  r'�library_dir_optionzCCompiler.library_dir_option"�
��"�!r)c��t�)zsReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        r�rIs  r'�runtime_library_dir_optionz$CCompiler.runtime_library_dir_option(r�r)c��t�)zReturn the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        r�)r%�libs  r'�library_optionzCCompiler.library_option.r�r)c��ddl}|�g}ntjdt�|�g}ntjdt�|�g}|�g}|j	d|d��\}}tj|d�}		|D]}
|	jd	|
z��|s|	jd
|z�|	jd|z�|	j�	|j|g|��}	tj|�	|j|d||��tj|jd|jxsd���	|D]}tj|��y#|	j�wxYw#t$rYtj|�y
wxYw#tj|�wxYw#tt f$rY|D]}tj|��y
wxYw#|D]}tj|��wxYw)aRReturn a boolean indicating whether funcname is provided as
        a symbol on the current platform.  The optional arguments can
        be used to augment the compilation environment.

        The libraries argument is a list of flags to be passed to the
        linker to make additional symbol definitions available for
        linking.

        The includes and include_dirs arguments are deprecated.
        Usually, supplying include files with function declarations
        will cause function detection to fail even in cases where the
        symbol is available for linking.

        rNzincludes is deprecatedzinclude_dirs is deprecatedrT)�text�wz#include "%s"
z4#ifdef __cplusplus
extern "C"
#endif
char %s(void);
z=int main (int argc, char **argv) {
    %s();
    return 0;
}
rNFza.out)rr�r�)�tempfile�warnings�warn�DeprecationWarning�mkstemprk�fdopen�write�closer�r�remover�r�rrr>)
r%�funcname�includesrrrr��fd�fname�f�inclr!�fns
             r'�has_functionzCCompiler.has_function4s���2	����H��M�M�2�4F�G����L��M�M�6�8J�K����I����L��$�$�T�8�$�$�?�	��E��I�I�b�#���	� �����-��4�5�!�������
��
�G�G���
�
�
�G�G�I�	��l�l�E�7��l�F�G�
�I�I�e��	�� � ���I�L�
!�
�
�I�I��(�(��T�_�_�=R�PR�(�S�
����	�	�"�
����+
�G�G�I���	���I�I�e��	��
�I�I�e����9�%�	�����	�	�"�
��	�����	�	�"�
��s[�9AE!�E6�:F4�4G%�!E3�6	F�?F�F�F�F1�4G"�G%�!G"�"G%�%Hc��t�)aHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        r�)r%rPr�r|s    r'�find_library_filezCCompiler.find_library_file�s
��"�!r)c�<������d�t���fd�|D��S)Nr�c3�D�K�|]}�j��|����y�wr)�_make_out_path)�.0�src_namerr%rfs  ���r'�	<genexpr>z-CCompiler.object_filenames.<locals>.<genexpr>�s(�����
�,��
���
�I�x�@�,�s� )r�)r%�source_filenamesrfrs` ``r'rhzCCompiler.object_filenames�s(������J��
�,�
�
�	
r)c�V�tj|j|j�Sr)�dict�fromkeys�src_extensions�
obj_extension)r%s r'�out_extensionszCCompiler.out_extensions�s���}�}�T�0�0�$�2D�2D�E�Er)c�`�tjj|�\}}|j|�}	|j|}|rtjj|�}tjj|||z�S#t
$rt
dj||���wxYw)Nz"unknown file type '{}' (from '{}'))
rkrlrm�_make_relativer��LookupErrorr�format�basename�join)r%rrfr�r�rx�new_exts       r'r�zCCompiler._make_out_path�s����G�G�$�$�X�.�	��c��"�"�4�(��	��)�)�#�.�G�
��7�7�#�#�D�)�D��w�w�|�|�J��w��7�7��
�	�"�4�;�;�C��J��
�	�s�B�%B-c��tjj|�d}|tjj|�dS)z�
        In order to ensure that a filename always honors the
        indicated output_dir, make sure it's relative.
        Ref python/cpython#37775.
        rN)rkrl�
splitdrive�isabs)r��no_drives  r'r�zCCompiler._make_relative�s8���7�7�%�%�d�+�A�.������
�
�h�/�1�2�2r)c��|�J�|rtjj|�}tjj|||jz�Sr)rkrlr�r��shared_lib_extension�r%r�rfrs    r'�shared_object_filenamez CCompiler.shared_object_filename�sE���%�%�%���w�w�'�'��1�H��w�w�|�|�J��4�3L�3L�(L�M�Mr)c��|�J�|rtjj|�}tjj|||jxsdz�S)Nr�)rkrlr�r��
exe_extensionr�s    r'r�zCCompiler.executable_filename�sJ���%�%�%���w�w�'�'��1�H��w�w�|�|�J��D�4F�4F�4L�"�(M�N�Nr)c��|�J�d}|t|�vrtd|����t||dz�}t||dz�}tjj|�\}}	||	|fz}
|rd}tjj
|||
�S)Nz)"static", "shared", "dylib", "xcode_stub"z'lib_type' must be �_lib_format�_lib_extensionr�)�evalr+�getattrrkrl�splitr�)r%rSr�rfr�expected�fmtrxrJr��filenames           r'r�zCCompiler.library_filename�s����%�%�%�>���4��>�)��2�8�*�=�>�>��d�H�}�4�5���d�H�'7�7�8���G�G�M�M�'�*�	��T��$���$����C��w�w�|�|�J��X�6�6r)c�.�tj|�yr)rr|)r%�msg�levels   r'�announcezCCompiler.announces
���	�	�#�r)c�,�ddlm}|rt|�yy)Nr)�DEBUG)�distutils.debugr�print)r%rrs   r'�debug_printzCCompiler.debug_prints��)���#�J�r)c�H�tjjd|z�y)Nzwarning: %s
)�sys�stderrr�)r%rs  r'r�zCCompiler.warn
s���
�
����3�.�/r)c�4�t||||j�yr)rr)r%�func�argsrrs     r'rzCCompiler.execute
s����d�C����.r)c�4�t|fd|ji|��y)Nr)r	r)r%�cmdr.s   r'r	zCCompiler.spawns��
�c�2�4�<�<�2�6�2r)c�2�t|||j��S�N)r)r
r)r%rv�dsts   r'r
zCCompiler.move_files����c�4�<�<�8�8r)c�4�t|||j��yr)rr)r%r6�modes   r'rzCCompiler.mkpaths���t�T�4�<�<�0r))rrrr)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr�)�staticrr�)r)Nr)i�)Ir-�
__module__�__qualname__�__doc__�
compiler_typer�r��static_lib_extensionr��static_lib_format�shared_lib_formatr�r�r�rrr(r/r$r9r@rDrGrKrQrTrWrYr[r]r_rbrdryrrgr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rh�propertyr�r��staticmethodr�r�r�r�r	rr�rr	r
rr{r)r'rrsn���*�M�2�N��M����������M�������L�*�N��L���L��"<�H 2�D&���,
*�#�$&�$�'� %�&�$�.�,�$�"�6�.� 0�D� %�"#?�J��4�����
�.�������J�X
�NR�
�8$�M�%�N��J����!�������;"�F���!�������
�F���!�������
�F���!�����
�D"�"�"�����
\�|"�V
��F��F�8��	3��	3�N�O�CE�7�&��0�/�3�9�1r)r))zcygwin.*�unix)�posixr&)�nt�msvcc���|�tj}|�tj}tD]5\}}tj||��tj||���3|cSy)a\Determine the default compiler to use for the given platform.

    osname should be one of the standard Python OS names (i.e. the
    ones returned by os.name) and platform the common value
    returned by sys.platform for the platform in question.

    The default values are os.name and sys.platform in case the
    parameters are not given.
    r&)rkr6r�platform�_default_compilers�re�match)�osnamer+�pattern�compilers    r'�get_default_compilerr2)s\���~��������<�<��/�����H�H�W�h�'�3��x�x���(�4��O�0�r))�
unixccompiler�
UnixCCompilerzstandard UNIX-style compiler)�
_msvccompiler�MSVCCompilerzMicrosoft Visual C++)�cygwinccompiler�CygwinCCompilerz'Cygwin port of GNU C Compiler for Win32)r7�Mingw32CCompilerz(Mingw32 port of GNU C Compiler for Win32)�bcppcompiler�BCPPCompilerzBorland C++ Compiler)r&r)�cygwin�mingw32�bcppc���ddlm}g}tj�D]#}|j	d|zdt|df��%|j�||�}|j
d�y)zyPrint list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    r)�FancyGetoptz	compiler=Nr;zList of available compilers:)�distutils.fancy_getoptr@�compiler_classr#rC�sort�
print_help)r@�	compilersr1�pretty_printers    r'�show_compilersrGUsg��3��I�"�'�'�)�����+��0�$��x�8P�QR�8S�T�U�*�
�N�N�� ��+�N����<�=r)c��|�tj}	|�t|�}t|\}}}	d|z}t
|�tj|}	t|	�|}
|
d||�S#t$rd|z}|�|d|zz}t|��wxYw#t$rtd|z��t$rtd|�d|�d���wxYw)	a[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'z0can't compile C/C++ code: unable to find class 'z
' in module '�')rkr6r2rBr�r�
__import__r�modules�vars�ImportErrorr)�platr1rrr�module_name�
class_name�long_descriptionr�module�klasss           r'�new_compilerrTfs����|��w�w��	*���+�D�1�H�6D�X�6N�3��j�"2�

�"�[�0���;�����[�)���V��Z�(����w��&�&��1�*�E��L�����-��8�8�C�$�S�)�)�	*���
�"�B�[�P�
�	
��
�"� *�K�
9�
�	
�
�s�A*�1B�*$B�2Cc��g}|D]�}t|t�rdt|�cxkrdksntd|z��t|�dk(r|j	d|dz��]t|�dk(s�l|d�|j	d|dz���|j	d|z���|D]}|j	d|z��|S)	aGenerate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    rr;zPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tuplez-U%srz-D%sz-D%s=%sz-I%s)r1r<r=r>rC)rrrt�macrorJs     r'riri�s���*�G����5�%�(�Q�#�e�*�-A��-A��H�JO�P��
�
�u�:��?��N�N�6�E�!�H�,�-�
��Z�1�_��Q�x�����v��a��0�1�
���y�5�0�1�!�$�����v��|�$���Nr)c���g}|D]"}|j|j|���$|D]:}|j|�}t|t�r||z}�*|j|��<|D]�}t
jj|�\}}	|r<|j|g|	�}
|
r|j|
��N|jd|z��c|j|j|����|S)acGenerate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    z6no library file corresponding to '%s' found (skipping))rCr�r�r1r�rkrlrr�r�r�)r1rr r�lib_optsrJ�optr��lib_dir�lib_name�lib_files           r'�gen_lib_optionsr]�s����H�������3�3�C�8�9��$���1�1�#�6���c�4� ��#�~�H��O�O�C� �$��� �g�g�m�m�C�0���(���1�1�7�)�X�F�H������)��
�
�O�RU�U��
�O�O�H�3�3�C�8�9���Or))NN)NNrrr)rrrkr-r��errorsrrrrrr	�	file_utilr
�dir_utilr�	_modifiedr�utilr
r�_logrrr,r2rBrGrTrir]r{r)r'�<module>rds���1�
�	�	����� ��"�'��}1�}1�H ���8
O�E��
�

E���">�"+'�\*�Z%r)python3.12/site-packages/setuptools/_distutils/py38compat.py000064400000000331151732703660020105 0ustar00def aix_platform(osname, version, release):
    try:
        import _aix_support

        return _aix_support.aix_platform()
    except ImportError:
        pass
    return "{}-{}.{}".format(osname, version, release)
python3.12/site-packages/setuptools/_distutils/debug.py000064400000000213151732703660017163 0ustar00import os

# If DISTUTILS_DEBUG is anything other than the empty string, we run in
# debug mode.
DEBUG = os.environ.get('DISTUTILS_DEBUG')
python3.12/site-packages/setuptools/_distutils/msvc9compiler.py000064400000072754151732703670020715 0ustar00"""distutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)
# ported to VS2005 and VS 2008 by Christian Heimes

import os
import subprocess
import sys
import re
import warnings

from .errors import (
    DistutilsExecError,
    DistutilsPlatformError,
    CompileError,
    LibError,
    LinkError,
)
from .ccompiler import CCompiler, gen_lib_options
from ._log import log
from .util import get_platform

import winreg

warnings.warn(
    "msvc9compiler is deprecated and slated to be removed "
    "in the future. Please discontinue use or file an issue "
    "with pypa/distutils describing your use case.",
    DeprecationWarning,
)

RegOpenKeyEx = winreg.OpenKeyEx
RegEnumKey = winreg.EnumKey
RegEnumValue = winreg.EnumValue
RegError = winreg.error

HKEYS = (
    winreg.HKEY_USERS,
    winreg.HKEY_CURRENT_USER,
    winreg.HKEY_LOCAL_MACHINE,
    winreg.HKEY_CLASSES_ROOT,
)

NATIVE_WIN64 = sys.platform == 'win32' and sys.maxsize > 2**32
if NATIVE_WIN64:
    # Visual C++ is a 32-bit application, so we need to look in
    # the corresponding registry branch, if we're running a
    # 64-bit Python on Win64
    VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f"
    WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows"
    NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework"
else:
    VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
    WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
    NET_BASE = r"Software\Microsoft\.NETFramework"

# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'.  Note a cross-compile may combine these (eg, 'x86_amd64' is
# the param to cross-compile on x86 targeting amd64.)
PLAT_TO_VCVARS = {
    'win32': 'x86',
    'win-amd64': 'amd64',
}


class Reg:
    """Helper class to read values from the registry"""

    def get_value(cls, path, key):
        for base in HKEYS:
            d = cls.read_values(base, path)
            if d and key in d:
                return d[key]
        raise KeyError(key)

    get_value = classmethod(get_value)

    def read_keys(cls, base, key):
        """Return list of registry keys."""
        try:
            handle = RegOpenKeyEx(base, key)
        except RegError:
            return None
        L = []
        i = 0
        while True:
            try:
                k = RegEnumKey(handle, i)
            except RegError:
                break
            L.append(k)
            i += 1
        return L

    read_keys = classmethod(read_keys)

    def read_values(cls, base, key):
        """Return dict of registry keys and values.

        All names are converted to lowercase.
        """
        try:
            handle = RegOpenKeyEx(base, key)
        except RegError:
            return None
        d = {}
        i = 0
        while True:
            try:
                name, value, type = RegEnumValue(handle, i)
            except RegError:
                break
            name = name.lower()
            d[cls.convert_mbcs(name)] = cls.convert_mbcs(value)
            i += 1
        return d

    read_values = classmethod(read_values)

    def convert_mbcs(s):
        dec = getattr(s, "decode", None)
        if dec is not None:
            try:
                s = dec("mbcs")
            except UnicodeError:
                pass
        return s

    convert_mbcs = staticmethod(convert_mbcs)


class MacroExpander:
    def __init__(self, version):
        self.macros = {}
        self.vsbase = VS_BASE % version
        self.load_macros(version)

    def set_macro(self, macro, path, key):
        self.macros["$(%s)" % macro] = Reg.get_value(path, key)

    def load_macros(self, version):
        self.set_macro("VCInstallDir", self.vsbase + r"\Setup\VC", "productdir")
        self.set_macro("VSInstallDir", self.vsbase + r"\Setup\VS", "productdir")
        self.set_macro("FrameworkDir", NET_BASE, "installroot")
        try:
            if version >= 8.0:
                self.set_macro("FrameworkSDKDir", NET_BASE, "sdkinstallrootv2.0")
            else:
                raise KeyError("sdkinstallrootv2.0")
        except KeyError:
            raise DistutilsPlatformError(
                """Python was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py."""
            )

        if version >= 9.0:
            self.set_macro("FrameworkVersion", self.vsbase, "clr version")
            self.set_macro("WindowsSdkDir", WINSDK_BASE, "currentinstallfolder")
        else:
            p = r"Software\Microsoft\NET Framework Setup\Product"
            for base in HKEYS:
                try:
                    h = RegOpenKeyEx(base, p)
                except RegError:
                    continue
                key = RegEnumKey(h, 0)
                d = Reg.get_value(base, r"{}\{}".format(p, key))
                self.macros["$(FrameworkVersion)"] = d["version"]

    def sub(self, s):
        for k, v in self.macros.items():
            s = s.replace(k, v)
        return s


def get_build_version():
    """Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    """
    prefix = "MSC v."
    i = sys.version.find(prefix)
    if i == -1:
        return 6
    i = i + len(prefix)
    s, rest = sys.version[i:].split(" ", 1)
    majorVersion = int(s[:-2]) - 6
    if majorVersion >= 13:
        # v13 was skipped and should be v14
        majorVersion += 1
    minorVersion = int(s[2:3]) / 10.0
    # I don't think paths are affected by minor version in version 6
    if majorVersion == 6:
        minorVersion = 0
    if majorVersion >= 6:
        return majorVersion + minorVersion
    # else we don't know what version of the compiler this is
    return None


def normalize_and_reduce_paths(paths):
    """Return a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    """
    # Paths are normalized so things like:  /a and /a/ aren't both preserved.
    reduced_paths = []
    for p in paths:
        np = os.path.normpath(p)
        # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set.
        if np not in reduced_paths:
            reduced_paths.append(np)
    return reduced_paths


def removeDuplicates(variable):
    """Remove duplicate values of an environment variable."""
    oldList = variable.split(os.pathsep)
    newList = []
    for i in oldList:
        if i not in newList:
            newList.append(i)
    newVariable = os.pathsep.join(newList)
    return newVariable


def find_vcvarsall(version):
    """Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    """
    vsbase = VS_BASE % version
    try:
        productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, "productdir")
    except KeyError:
        log.debug("Unable to find productdir in registry")
        productdir = None

    if not productdir or not os.path.isdir(productdir):
        toolskey = "VS%0.f0COMNTOOLS" % version
        toolsdir = os.environ.get(toolskey, None)

        if toolsdir and os.path.isdir(toolsdir):
            productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC")
            productdir = os.path.abspath(productdir)
            if not os.path.isdir(productdir):
                log.debug("%s is not a valid directory" % productdir)
                return None
        else:
            log.debug("Env var %s is not set or invalid" % toolskey)
    if not productdir:
        log.debug("No productdir found")
        return None
    vcvarsall = os.path.join(productdir, "vcvarsall.bat")
    if os.path.isfile(vcvarsall):
        return vcvarsall
    log.debug("Unable to find vcvarsall.bat")
    return None


def query_vcvarsall(version, arch="x86"):
    """Launch vcvarsall.bat and read the settings from its environment"""
    vcvarsall = find_vcvarsall(version)
    interesting = {"include", "lib", "libpath", "path"}
    result = {}

    if vcvarsall is None:
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")
    log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version)
    popen = subprocess.Popen(
        '"{}" {} & set'.format(vcvarsall, arch),
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
    )
    try:
        stdout, stderr = popen.communicate()
        if popen.wait() != 0:
            raise DistutilsPlatformError(stderr.decode("mbcs"))

        stdout = stdout.decode("mbcs")
        for line in stdout.split("\n"):
            line = Reg.convert_mbcs(line)
            if '=' not in line:
                continue
            line = line.strip()
            key, value = line.split('=', 1)
            key = key.lower()
            if key in interesting:
                if value.endswith(os.pathsep):
                    value = value[:-1]
                result[key] = removeDuplicates(value)

    finally:
        popen.stdout.close()
        popen.stderr.close()

    if len(result) != len(interesting):
        raise ValueError(str(list(result.keys())))

    return result


# More globals
VERSION = get_build_version()
# MACROS = MacroExpander(VERSION)


class MSVCCompiler(CCompiler):
    """Concrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)
        self.__version = VERSION
        self.__root = r"Software\Microsoft\VisualStudio"
        # self.__macros = MACROS
        self.__paths = []
        # target platform (.plat_name is consistent with 'bdist')
        self.plat_name = None
        self.__arch = None  # deprecated name
        self.initialized = False

    def initialize(self, plat_name=None):  # noqa: C901
        # multi-init means we would need to check platform same each time...
        assert not self.initialized, "don't init multiple times"
        if self.__version < 8.0:
            raise DistutilsPlatformError(
                "VC %0.1f is not supported by this module" % self.__version
            )
        if plat_name is None:
            plat_name = get_platform()
        # sanity check for platforms to prevent obscure errors later.
        ok_plats = 'win32', 'win-amd64'
        if plat_name not in ok_plats:
            raise DistutilsPlatformError(
                "--plat-name must be one of {}".format(ok_plats)
            )

        if (
            "DISTUTILS_USE_SDK" in os.environ
            and "MSSdk" in os.environ
            and self.find_exe("cl.exe")
        ):
            # Assume that the SDK set up everything alright; don't try to be
            # smarter
            self.cc = "cl.exe"
            self.linker = "link.exe"
            self.lib = "lib.exe"
            self.rc = "rc.exe"
            self.mc = "mc.exe"
        else:
            # On x86, 'vcvars32.bat amd64' creates an env that doesn't work;
            # to cross compile, you use 'x86_amd64'.
            # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross
            # compile use 'x86' (ie, it runs the x86 compiler directly)
            if plat_name in (get_platform(), 'win32'):
                # native build or cross-compile to win32
                plat_spec = PLAT_TO_VCVARS[plat_name]
            else:
                # cross compile from win32 -> some 64bit
                plat_spec = (
                    PLAT_TO_VCVARS[get_platform()] + '_' + PLAT_TO_VCVARS[plat_name]
                )

            vc_env = query_vcvarsall(VERSION, plat_spec)

            self.__paths = vc_env['path'].split(os.pathsep)
            os.environ['lib'] = vc_env['lib']
            os.environ['include'] = vc_env['include']

            if len(self.__paths) == 0:
                raise DistutilsPlatformError(
                    "Python was built with %s, "
                    "and extensions need to be built with the same "
                    "version of the compiler, but it isn't installed." % self.__product
                )

            self.cc = self.find_exe("cl.exe")
            self.linker = self.find_exe("link.exe")
            self.lib = self.find_exe("lib.exe")
            self.rc = self.find_exe("rc.exe")  # resource compiler
            self.mc = self.find_exe("mc.exe")  # message compiler
            # self.set_path_env_var('lib')
            # self.set_path_env_var('include')

        # extend the MSVC path with the current path
        try:
            for p in os.environ['path'].split(';'):
                self.__paths.append(p)
        except KeyError:
            pass
        self.__paths = normalize_and_reduce_paths(self.__paths)
        os.environ['path'] = ";".join(self.__paths)

        self.preprocess_options = None
        if self.__arch == "x86":
            self.compile_options = ['/nologo', '/O2', '/MD', '/W3', '/DNDEBUG']
            self.compile_options_debug = [
                '/nologo',
                '/Od',
                '/MDd',
                '/W3',
                '/Z7',
                '/D_DEBUG',
            ]
        else:
            # Win64
            self.compile_options = ['/nologo', '/O2', '/MD', '/W3', '/GS-', '/DNDEBUG']
            self.compile_options_debug = [
                '/nologo',
                '/Od',
                '/MDd',
                '/W3',
                '/GS-',
                '/Z7',
                '/D_DEBUG',
            ]

        self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
        if self.__version >= 7:
            self.ldflags_shared_debug = ['/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG']
        self.ldflags_static = ['/nologo']

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        # Copied from ccompiler.py, extended to return .res as 'object'-file
        # for .rc input file
        if output_dir is None:
            output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            (base, ext) = os.path.splitext(src_name)
            base = os.path.splitdrive(base)[1]  # Chop off the drive
            base = base[os.path.isabs(base) :]  # If abs, chop off leading /
            if ext not in self.src_extensions:
                # Better to raise an exception instead of silently continuing
                # and later complain about sources and targets having
                # different lengths
                raise CompileError("Don't know how to compile %s" % src_name)
            if strip_dir:
                base = os.path.basename(base)
            if ext in self._rc_extensions:
                obj_names.append(os.path.join(output_dir, base + self.res_extension))
            elif ext in self._mc_extensions:
                obj_names.append(os.path.join(output_dir, base + self.res_extension))
            else:
                obj_names.append(os.path.join(output_dir, base + self.obj_extension))
        return obj_names

    def compile(  # noqa: C901
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):
        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts + [output_opt] + [input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc] + ['-h', h_dir, '-r', rc_dir] + [src])
                    base, _ = os.path.splitext(os.path.basename(src))
                    rc_file = os.path.join(rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc] + ["/fo" + obj] + [rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError(
                    "Don't know how to compile {} to {}".format(src, obj)
                )

            output_opt = "/Fo" + obj
            try:
                self.spawn(
                    [self.cc]
                    + compile_opts
                    + pp_opts
                    + [input_opt, output_opt]
                    + extra_postargs
                )
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):
        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass  # XXX what goes here?
            try:
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(  # noqa: C901
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
        (libraries, library_dirs, runtime_library_dirs) = fixed_args

        if runtime_library_dirs:
            self.warn(
                "I don't know what to do with 'runtime_library_dirs': "
                + str(runtime_library_dirs)
            )

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            if target_desc == CCompiler.EXECUTABLE:
                if debug:
                    ldflags = self.ldflags_shared_debug[1:]
                else:
                    ldflags = self.ldflags_shared[1:]
            else:
                if debug:
                    ldflags = self.ldflags_shared_debug
                else:
                    ldflags = self.ldflags_shared

            export_opts = []
            for sym in export_symbols or []:
                export_opts.append("/EXPORT:" + sym)

            ld_args = (
                ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
            )

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            build_temp = os.path.dirname(objects[0])
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename)
                )
                implib_file = os.path.join(build_temp, self.library_filename(dll_name))
                ld_args.append('/IMPLIB:' + implib_file)

            self.manifest_setup_ldargs(output_filename, build_temp, ld_args)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath(os.path.dirname(output_filename))
            try:
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

            # embed the manifest
            # XXX - this is somewhat fragile - if mt.exe fails, distutils
            # will still consider the DLL up-to-date, but it will not have a
            # manifest.  Maybe we should link to a temp file?  OTOH, that
            # implies a build environment error that shouldn't go undetected.
            mfinfo = self.manifest_get_embed_info(target_desc, ld_args)
            if mfinfo is not None:
                mffilename, mfid = mfinfo
                out_arg = '-outputresource:{};{}'.format(output_filename, mfid)
                try:
                    self.spawn(['mt.exe', '-nologo', '-manifest', mffilename, out_arg])
                except DistutilsExecError as msg:
                    raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def manifest_setup_ldargs(self, output_filename, build_temp, ld_args):
        # If we need a manifest at all, an embedded manifest is recommended.
        # See MSDN article titled
        # "How to: Embed a Manifest Inside a C/C++ Application"
        # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
        # Ask the linker to generate the manifest in the temp dir, so
        # we can check it, and possibly embed it, later.
        temp_manifest = os.path.join(
            build_temp, os.path.basename(output_filename) + ".manifest"
        )
        ld_args.append('/MANIFESTFILE:' + temp_manifest)

    def manifest_get_embed_info(self, target_desc, ld_args):
        # If a manifest should be embedded, return a tuple of
        # (manifest_filename, resource_id).  Returns None if no manifest
        # should be embedded.  See http://bugs.python.org/issue7833 for why
        # we want to avoid any manifest for extension modules if we can)
        for arg in ld_args:
            if arg.startswith("/MANIFESTFILE:"):
                temp_manifest = arg.split(":", 1)[1]
                break
        else:
            # no /MANIFESTFILE so nothing to do.
            return None
        if target_desc == CCompiler.EXECUTABLE:
            # by default, executables always get the manifest with the
            # CRT referenced.
            mfid = 1
        else:
            # Extension modules try and avoid any manifest if possible.
            mfid = 2
            temp_manifest = self._remove_visual_c_ref(temp_manifest)
        if temp_manifest is None:
            return None
        return temp_manifest, mfid

    def _remove_visual_c_ref(self, manifest_file):
        try:
            # Remove references to the Visual C runtime, so they will
            # fall through to the Visual C dependency of Python.exe.
            # This way, when installed for a restricted user (e.g.
            # runtimes are not in WinSxS folder, but in Python's own
            # folder), the runtimes do not need to be in every folder
            # with .pyd's.
            # Returns either the filename of the modified manifest or
            # None if no manifest should be embedded.
            manifest_f = open(manifest_file)
            try:
                manifest_buf = manifest_f.read()
            finally:
                manifest_f.close()
            pattern = re.compile(
                r"""<assemblyIdentity.*?name=("|')Microsoft\."""
                r"""VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)""",
                re.DOTALL,
            )
            manifest_buf = re.sub(pattern, "", manifest_buf)
            pattern = r"<dependentAssembly>\s*</dependentAssembly>"
            manifest_buf = re.sub(pattern, "", manifest_buf)
            # Now see if any other assemblies are referenced - if not, we
            # don't want a manifest embedded.
            pattern = re.compile(
                r"""<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|')"""
                r""".*?(?:/>|</assemblyIdentity>)""",
                re.DOTALL,
            )
            if re.search(pattern, manifest_buf) is None:
                return None

            manifest_f = open(manifest_file, 'w')
            try:
                manifest_f.write(manifest_buf)
                return manifest_file
            finally:
                manifest_f.close()
        except OSError:
            pass

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
            "don't know how to set runtime library search path for MSVC++"
        )

    def library_option(self, lib):
        return self.library_filename(lib)

    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # Helper methods for using the MSVC registry settings

    def find_exe(self, exe):
        """Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        """
        for p in self.__paths:
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        # didn't find it; try existing path
        for p in os.environ['Path'].split(';'):
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        return exe
python3.12/site-packages/setuptools/_distutils/versionpredicate.py000064400000012125151732703670021451 0ustar00"""Module for parsing and testing package version predicate strings.
"""
import re
from . import version
import operator


re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)", re.ASCII)
# (package) (rest)

re_paren = re.compile(r"^\s*\((.*)\)\s*$")  # (list) inside of parentheses
re_splitComparison = re.compile(r"^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$")
# (comp) (version)


def splitUp(pred):
    """Parse a single version comparison.

    Return (comparison string, StrictVersion)
    """
    res = re_splitComparison.match(pred)
    if not res:
        raise ValueError("bad package restriction syntax: %r" % pred)
    comp, verStr = res.groups()
    with version.suppress_known_deprecation():
        other = version.StrictVersion(verStr)
    return (comp, other)


compmap = {
    "<": operator.lt,
    "<=": operator.le,
    "==": operator.eq,
    ">": operator.gt,
    ">=": operator.ge,
    "!=": operator.ne,
}


class VersionPredicate:
    """Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    """

    def __init__(self, versionPredicateStr):
        """Parse a version predicate string."""
        # Fields:
        #    name:  package name
        #    pred:  list of (comparison string, StrictVersion)

        versionPredicateStr = versionPredicateStr.strip()
        if not versionPredicateStr:
            raise ValueError("empty package restriction")
        match = re_validPackage.match(versionPredicateStr)
        if not match:
            raise ValueError("bad package name in %r" % versionPredicateStr)
        self.name, paren = match.groups()
        paren = paren.strip()
        if paren:
            match = re_paren.match(paren)
            if not match:
                raise ValueError("expected parenthesized list: %r" % paren)
            str = match.groups()[0]
            self.pred = [splitUp(aPred) for aPred in str.split(",")]
            if not self.pred:
                raise ValueError("empty parenthesized list in %r" % versionPredicateStr)
        else:
            self.pred = []

    def __str__(self):
        if self.pred:
            seq = [cond + " " + str(ver) for cond, ver in self.pred]
            return self.name + " (" + ", ".join(seq) + ")"
        else:
            return self.name

    def satisfied_by(self, version):
        """True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        """
        for cond, ver in self.pred:
            if not compmap[cond](version, ver):
                return False
        return True


_provision_rx = None


def split_provision(value):
    """Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    """
    global _provision_rx
    if _provision_rx is None:
        _provision_rx = re.compile(
            r"([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$", re.ASCII
        )
    value = value.strip()
    m = _provision_rx.match(value)
    if not m:
        raise ValueError("illegal provides specification: %r" % value)
    ver = m.group(2) or None
    if ver:
        with version.suppress_known_deprecation():
            ver = version.StrictVersion(ver)
    return m.group(1), ver
python3.12/site-packages/setuptools/_distutils/py39compat.py000064400000003654151732703670020122 0ustar00import functools
import itertools
import platform
import sys


def add_ext_suffix_39(vars):
    """
    Ensure vars contains 'EXT_SUFFIX'. pypa/distutils#130
    """
    import _imp

    ext_suffix = _imp.extension_suffixes()[0]
    vars.update(
        EXT_SUFFIX=ext_suffix,
        # sysconfig sets SO to match EXT_SUFFIX, so maintain
        # that expectation.
        # https://github.com/python/cpython/blob/785cc6770588de087d09e89a69110af2542be208/Lib/sysconfig.py#L671-L673
        SO=ext_suffix,
    )


needs_ext_suffix = sys.version_info < (3, 10) and platform.system() == 'Windows'
add_ext_suffix = add_ext_suffix_39 if needs_ext_suffix else lambda vars: None


# from more_itertools
class UnequalIterablesError(ValueError):
    def __init__(self, details=None):
        msg = 'Iterables have different lengths'
        if details is not None:
            msg += (': index 0 has length {}; index {} has length {}').format(*details)

        super().__init__(msg)


# from more_itertools
def _zip_equal_generator(iterables):
    _marker = object()
    for combo in itertools.zip_longest(*iterables, fillvalue=_marker):
        for val in combo:
            if val is _marker:
                raise UnequalIterablesError()
        yield combo


# from more_itertools
def _zip_equal(*iterables):
    # Check whether the iterables are all the same size.
    try:
        first_size = len(iterables[0])
        for i, it in enumerate(iterables[1:], 1):
            size = len(it)
            if size != first_size:
                raise UnequalIterablesError(details=(first_size, i, size))
        # All sizes are equal, we can use the built-in zip.
        return zip(*iterables)
    # If any one of the iterables didn't have a length, start reading
    # them until one runs out.
    except TypeError:
        return _zip_equal_generator(iterables)


zip_strict = (
    _zip_equal if sys.version_info < (3, 10) else functools.partial(zip, strict=True)
)
python3.12/site-packages/setuptools/_distutils/_modified.py000064400000004553151732703670020030 0ustar00"""Timestamp comparison of files and groups of files."""

import functools
import os.path

from .errors import DistutilsFileError
from .py39compat import zip_strict
from ._functools import splat


def _newer(source, target):
    return not os.path.exists(target) or (
        os.path.getmtime(source) > os.path.getmtime(target)
    )


def newer(source, target):
    """
    Is source modified more recently than target.

    Returns True if 'source' is modified more recently than
    'target' or if 'target' does not exist.

    Raises DistutilsFileError if 'source' does not exist.
    """
    if not os.path.exists(source):
        raise DistutilsFileError("file '%s' does not exist" % os.path.abspath(source))

    return _newer(source, target)


def newer_pairwise(sources, targets, newer=newer):
    """
    Filter filenames where sources are newer than targets.

    Walk two filename iterables in parallel, testing if each source is newer
    than its corresponding target.  Returns a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    """
    newer_pairs = filter(splat(newer), zip_strict(sources, targets))
    return tuple(map(list, zip(*newer_pairs))) or ([], [])


def newer_group(sources, target, missing='error'):
    """
    Is target out-of-date with respect to any file in sources.

    Return True if 'target' is out-of-date with respect to any file
    listed in 'sources'. In other words, if 'target' exists and is newer
    than every file in 'sources', return False; otherwise return True.
    ``missing`` controls how to handle a missing source file:

    - error (default): allow the ``stat()`` call to fail.
    - ignore: silently disregard any missing source files.
    - newer: treat missing source files as "target out of date". This
      mode is handy in "dry-run" mode: it will pretend to carry out
      commands that wouldn't work because inputs are missing, but
      that doesn't matter because dry-run won't run the commands.
    """

    def missing_as_newer(source):
        return missing == 'newer' and not os.path.exists(source)

    ignored = os.path.exists if missing == 'ignore' else None
    return any(
        missing_as_newer(source) or _newer(source, target)
        for source in filter(ignored, sources)
    )


newer_pairwise_group = functools.partial(newer_pairwise, newer=newer_group)
python3.12/site-packages/setuptools/_distutils/archive_util.py000064400000020574151732703670020570 0ustar00"""distutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing)."""

import os
from warnings import warn
import sys

try:
    import zipfile
except ImportError:
    zipfile = None


from .errors import DistutilsExecError
from .spawn import spawn
from .dir_util import mkpath
from ._log import log

try:
    from pwd import getpwnam
except ImportError:
    getpwnam = None

try:
    from grp import getgrnam
except ImportError:
    getgrnam = None


def _get_gid(name):
    """Returns a gid, given a group name."""
    if getgrnam is None or name is None:
        return None
    try:
        result = getgrnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None


def _get_uid(name):
    """Returns an uid, given a user name."""
    if getpwnam is None or name is None:
        return None
    try:
        result = getpwnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None


def make_tarball(
    base_name, base_dir, compress="gzip", verbose=0, dry_run=0, owner=None, group=None
):
    """Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    """
    tar_compression = {
        'gzip': 'gz',
        'bzip2': 'bz2',
        'xz': 'xz',
        None: '',
        'compress': '',
    }
    compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'xz': '.xz', 'compress': '.Z'}

    # flags for compression program, each element of list will be an argument
    if compress is not None and compress not in compress_ext.keys():
        raise ValueError(
            "bad value for 'compress': must be None, 'gzip', 'bzip2', "
            "'xz' or 'compress'"
        )

    archive_name = base_name + '.tar'
    if compress != 'compress':
        archive_name += compress_ext.get(compress, '')

    mkpath(os.path.dirname(archive_name), dry_run=dry_run)

    # creating the tarball
    import tarfile  # late import so Python build itself doesn't break

    log.info('Creating tar archive')

    uid = _get_uid(owner)
    gid = _get_gid(group)

    def _set_uid_gid(tarinfo):
        if gid is not None:
            tarinfo.gid = gid
            tarinfo.gname = group
        if uid is not None:
            tarinfo.uid = uid
            tarinfo.uname = owner
        return tarinfo

    if not dry_run:
        tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress])
        try:
            tar.add(base_dir, filter=_set_uid_gid)
        finally:
            tar.close()

    # compression using `compress`
    if compress == 'compress':
        warn("'compress' is deprecated.", DeprecationWarning)
        # the option varies depending on the platform
        compressed_name = archive_name + compress_ext[compress]
        if sys.platform == 'win32':
            cmd = [compress, archive_name, compressed_name]
        else:
            cmd = [compress, '-f', archive_name]
        spawn(cmd, dry_run=dry_run)
        return compressed_name

    return archive_name


def make_zipfile(base_name, base_dir, verbose=0, dry_run=0):  # noqa: C901
    """Create a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    """
    zip_filename = base_name + ".zip"
    mkpath(os.path.dirname(zip_filename), dry_run=dry_run)

    # If zipfile module is not available, try spawning an external
    # 'zip' command.
    if zipfile is None:
        if verbose:
            zipoptions = "-r"
        else:
            zipoptions = "-rq"

        try:
            spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run)
        except DistutilsExecError:
            # XXX really should distinguish between "couldn't find
            # external 'zip' command" and "zip failed".
            raise DistutilsExecError(
                (
                    "unable to create zip file '%s': "
                    "could neither import the 'zipfile' module nor "
                    "find a standalone zip utility"
                )
                % zip_filename
            )

    else:
        log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir)

        if not dry_run:
            try:
                zip = zipfile.ZipFile(
                    zip_filename, "w", compression=zipfile.ZIP_DEFLATED
                )
            except RuntimeError:
                zip = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_STORED)

            with zip:
                if base_dir != os.curdir:
                    path = os.path.normpath(os.path.join(base_dir, ''))
                    zip.write(path, path)
                    log.info("adding '%s'", path)
                for dirpath, dirnames, filenames in os.walk(base_dir):
                    for name in dirnames:
                        path = os.path.normpath(os.path.join(dirpath, name, ''))
                        zip.write(path, path)
                        log.info("adding '%s'", path)
                    for name in filenames:
                        path = os.path.normpath(os.path.join(dirpath, name))
                        if os.path.isfile(path):
                            zip.write(path, path)
                            log.info("adding '%s'", path)

    return zip_filename


ARCHIVE_FORMATS = {
    'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
    'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
    'xztar': (make_tarball, [('compress', 'xz')], "xz'ed tar-file"),
    'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"),
    'tar': (make_tarball, [('compress', None)], "uncompressed tar file"),
    'zip': (make_zipfile, [], "ZIP file"),
}


def check_archive_formats(formats):
    """Returns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    """
    for format in formats:
        if format not in ARCHIVE_FORMATS:
            return format
    return None


def make_archive(
    base_name,
    format,
    root_dir=None,
    base_dir=None,
    verbose=0,
    dry_run=0,
    owner=None,
    group=None,
):
    """Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    """
    save_cwd = os.getcwd()
    if root_dir is not None:
        log.debug("changing into '%s'", root_dir)
        base_name = os.path.abspath(base_name)
        if not dry_run:
            os.chdir(root_dir)

    if base_dir is None:
        base_dir = os.curdir

    kwargs = {'dry_run': dry_run}

    try:
        format_info = ARCHIVE_FORMATS[format]
    except KeyError:
        raise ValueError("unknown archive format '%s'" % format)

    func = format_info[0]
    for arg, val in format_info[1]:
        kwargs[arg] = val

    if format != 'zip':
        kwargs['owner'] = owner
        kwargs['group'] = group

    try:
        filename = func(base_name, base_dir, **kwargs)
    finally:
        if root_dir is not None:
            log.debug("changing back to '%s'", save_cwd)
            os.chdir(save_cwd)

    return filename
python3.12/site-packages/setuptools/_distutils/spawn.py000064400000006647151732703670017247 0ustar00"""distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
"""

import sys
import os
import subprocess

from .errors import DistutilsExecError
from .debug import DEBUG
from ._log import log


def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None):  # noqa: C901
    """Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    """
    # cmd is documented as a list, but just in case some code passes a tuple
    # in, protect our %-formatting code against horrible death
    cmd = list(cmd)

    log.info(subprocess.list2cmdline(cmd))
    if dry_run:
        return

    if search_path:
        executable = find_executable(cmd[0])
        if executable is not None:
            cmd[0] = executable

    env = env if env is not None else dict(os.environ)

    if sys.platform == 'darwin':
        from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver

        macosx_target_ver = get_macosx_target_ver()
        if macosx_target_ver:
            env[MACOSX_VERSION_VAR] = macosx_target_ver

    try:
        proc = subprocess.Popen(cmd, env=env)
        proc.wait()
        exitcode = proc.returncode
    except OSError as exc:
        if not DEBUG:
            cmd = cmd[0]
        raise DistutilsExecError(
            "command {!r} failed: {}".format(cmd, exc.args[-1])
        ) from exc

    if exitcode:
        if not DEBUG:
            cmd = cmd[0]
        raise DistutilsExecError(
            "command {!r} failed with exit code {}".format(cmd, exitcode)
        )


def find_executable(executable, path=None):
    """Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    """
    _, ext = os.path.splitext(executable)
    if (sys.platform == 'win32') and (ext != '.exe'):
        executable = executable + '.exe'

    if os.path.isfile(executable):
        return executable

    if path is None:
        path = os.environ.get('PATH', None)
        if path is None:
            try:
                path = os.confstr("CS_PATH")
            except (AttributeError, ValueError):
                # os.confstr() or CS_PATH is not available
                path = os.defpath
        # bpo-35755: Don't use os.defpath if the PATH environment variable is
        # set to an empty string

    # PATH='' doesn't match, whereas PATH=':' looks in the current directory
    if not path:
        return None

    paths = path.split(os.pathsep)
    for p in paths:
        f = os.path.join(p, executable)
        if os.path.isfile(f):
            # the file exists, we have a shot at spawn working
            return f
    return None
python3.12/site-packages/setuptools/_distutils/log.py000064400000002261151732703670016664 0ustar00"""
A simple log mechanism styled after PEP 282.

Retained for compatibility and should not be used.
"""

import logging
import warnings

from ._log import log as _global_log


DEBUG = logging.DEBUG
INFO = logging.INFO
WARN = logging.WARN
ERROR = logging.ERROR
FATAL = logging.FATAL

log = _global_log.log
debug = _global_log.debug
info = _global_log.info
warn = _global_log.warning
error = _global_log.error
fatal = _global_log.fatal


def set_threshold(level):
    orig = _global_log.level
    _global_log.setLevel(level)
    return orig


def set_verbosity(v):
    if v <= 0:
        set_threshold(logging.WARN)
    elif v == 1:
        set_threshold(logging.INFO)
    elif v >= 2:
        set_threshold(logging.DEBUG)


class Log(logging.Logger):
    """distutils.log.Log is deprecated, please use an alternative from `logging`."""

    def __init__(self, threshold=WARN):
        warnings.warn(Log.__doc__)  # avoid DeprecationWarning to ensure warn is shown
        super().__init__(__name__, level=threshold)

    @property
    def threshold(self):
        return self.level

    @threshold.setter
    def threshold(self, level):
        self.setLevel(level)

    warn = logging.Logger.warning
python3.12/site-packages/setuptools/_distutils/unixccompiler.py000064400000036362151732703670020775 0ustar00"""distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
"""

import os
import sys
import re
import shlex
import itertools

from . import sysconfig
from ._modified import newer
from .ccompiler import CCompiler, gen_preprocess_options, gen_lib_options
from .errors import DistutilsExecError, CompileError, LibError, LinkError
from ._log import log
from ._macos_compat import compiler_fixup

# XXX Things not currently handled:
#   * optimization/debug/warning flags; we just use whatever's in Python's
#     Makefile and live with it.  Is this adequate?  If not, we might
#     have to have a bunch of subclasses GNUCCompiler, SGICCompiler,
#     SunCCompiler, and I suspect down that road lies madness.
#   * even if we don't know a warning flag from an optimization flag,
#     we need some way for outsiders to feed preprocessor/compiler/linker
#     flags in to us -- eg. a sysadmin might want to mandate certain flags
#     via a site config file, or a user might want to set something for
#     compiling this module distribution only via the setup.py command
#     line, whatever.  As long as these options come from something on the
#     current system, they can be as system-dependent as they like, and we
#     should just happily stuff them into the preprocessor/compiler/linker
#     options and carry on.


def _split_env(cmd):
    """
    For macOS, split command into 'env' portion (if any)
    and the rest of the linker command.

    >>> _split_env(['a', 'b', 'c'])
    ([], ['a', 'b', 'c'])
    >>> _split_env(['/usr/bin/env', 'A=3', 'gcc'])
    (['/usr/bin/env', 'A=3'], ['gcc'])
    """
    pivot = 0
    if os.path.basename(cmd[0]) == "env":
        pivot = 1
        while '=' in cmd[pivot]:
            pivot += 1
    return cmd[:pivot], cmd[pivot:]


def _split_aix(cmd):
    """
    AIX platforms prefix the compiler with the ld_so_aix
    script, so split that from the linker command.

    >>> _split_aix(['a', 'b', 'c'])
    ([], ['a', 'b', 'c'])
    >>> _split_aix(['/bin/foo/ld_so_aix', 'gcc'])
    (['/bin/foo/ld_so_aix'], ['gcc'])
    """
    pivot = os.path.basename(cmd[0]) == 'ld_so_aix'
    return cmd[:pivot], cmd[pivot:]


def _linker_params(linker_cmd, compiler_cmd):
    """
    The linker command usually begins with the compiler
    command (possibly multiple elements), followed by zero or more
    params for shared library building.

    If the LDSHARED env variable overrides the linker command,
    however, the commands may not match.

    Return the best guess of the linker parameters by stripping
    the linker command. If the compiler command does not
    match the linker command, assume the linker command is
    just the first element.

    >>> _linker_params('gcc foo bar'.split(), ['gcc'])
    ['foo', 'bar']
    >>> _linker_params('gcc foo bar'.split(), ['other'])
    ['foo', 'bar']
    >>> _linker_params('ccache gcc foo bar'.split(), 'ccache gcc'.split())
    ['foo', 'bar']
    >>> _linker_params(['gcc'], ['gcc'])
    []
    """
    c_len = len(compiler_cmd)
    pivot = c_len if linker_cmd[:c_len] == compiler_cmd else 1
    return linker_cmd[pivot:]


class UnixCCompiler(CCompiler):
    compiler_type = 'unix'

    # These are used by CCompiler in two places: the constructor sets
    # instance attributes 'preprocessor', 'compiler', etc. from them, and
    # 'set_executable()' allows any of these to be set.  The defaults here
    # are pretty generic; they will probably have to be set by an outsider
    # (eg. using information discovered by the sysconfig about building
    # Python extensions).
    executables = {
        'preprocessor': None,
        'compiler': ["cc"],
        'compiler_so': ["cc"],
        'compiler_cxx': ["cc"],
        'linker_so': ["cc", "-shared"],
        'linker_exe': ["cc"],
        'archiver': ["ar", "-cr"],
        'ranlib': None,
    }

    if sys.platform[:6] == "darwin":
        executables['ranlib'] = ["ranlib"]

    # Needed for the filename generation methods provided by the base
    # class, CCompiler.  NB. whoever instantiates/uses a particular
    # UnixCCompiler instance should set 'shared_lib_ext' -- we set a
    # reasonable common default here, but it's not necessarily used on all
    # Unices!

    src_extensions = [".c", ".C", ".cc", ".cxx", ".cpp", ".m"]
    obj_extension = ".o"
    static_lib_extension = ".a"
    shared_lib_extension = ".so"
    dylib_lib_extension = ".dylib"
    xcode_stub_lib_extension = ".tbd"
    static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
    xcode_stub_lib_format = dylib_lib_format
    if sys.platform == "cygwin":
        exe_extension = ".exe"

    def preprocess(
        self,
        source,
        output_file=None,
        macros=None,
        include_dirs=None,
        extra_preargs=None,
        extra_postargs=None,
    ):
        fixed_args = self._fix_compile_args(None, macros, include_dirs)
        ignore, macros, include_dirs = fixed_args
        pp_opts = gen_preprocess_options(macros, include_dirs)
        pp_args = self.preprocessor + pp_opts
        if output_file:
            pp_args.extend(['-o', output_file])
        if extra_preargs:
            pp_args[:0] = extra_preargs
        if extra_postargs:
            pp_args.extend(extra_postargs)
        pp_args.append(source)

        # reasons to preprocess:
        # - force is indicated
        # - output is directed to stdout
        # - source file is newer than the target
        preprocess = self.force or output_file is None or newer(source, output_file)
        if not preprocess:
            return

        if output_file:
            self.mkpath(os.path.dirname(output_file))

        try:
            self.spawn(pp_args)
        except DistutilsExecError as msg:
            raise CompileError(msg)

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs)
        try:
            self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
        except DistutilsExecError as msg:
            raise CompileError(msg)

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):
        objects, output_dir = self._fix_object_args(objects, output_dir)

        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            self.mkpath(os.path.dirname(output_filename))
            self.spawn(self.archiver + [output_filename] + objects + self.objects)

            # Not many Unices required ranlib anymore -- SunOS 4.x is, I
            # think the only major Unix that does.  Maybe we need some
            # platform intelligence here to skip ranlib if it's not
            # needed -- or maybe Python's configure script took care of
            # it for us, hence the check for leading colon.
            if self.ranlib:
                try:
                    self.spawn(self.ranlib + [output_filename])
                except DistutilsExecError as msg:
                    raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        objects, output_dir = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
        libraries, library_dirs, runtime_library_dirs = fixed_args

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
        if not isinstance(output_dir, (str, type(None))):
            raise TypeError("'output_dir' must be a string or None")
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            ld_args = objects + self.objects + lib_opts + ['-o', output_filename]
            if debug:
                ld_args[:0] = ['-g']
            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)
            self.mkpath(os.path.dirname(output_filename))
            try:
                # Select a linker based on context: linker_exe when
                # building an executable or linker_so (with shared options)
                # when building a shared library.
                building_exe = target_desc == CCompiler.EXECUTABLE
                linker = (self.linker_exe if building_exe else self.linker_so)[:]

                if target_lang == "c++" and self.compiler_cxx:
                    env, linker_ne = _split_env(linker)
                    aix, linker_na = _split_aix(linker_ne)
                    _, compiler_cxx_ne = _split_env(self.compiler_cxx)
                    _, linker_exe_ne = _split_env(self.linker_exe)

                    params = _linker_params(linker_na, linker_exe_ne)
                    linker = env + aix + compiler_cxx_ne + params

                linker = compiler_fixup(linker, ld_args)

                self.spawn(linker + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "-L" + dir

    def _is_gcc(self):
        cc_var = sysconfig.get_config_var("CC")
        compiler = os.path.basename(shlex.split(cc_var)[0])
        return "gcc" in compiler or "g++" in compiler

    def runtime_library_dir_option(self, dir):
        # XXX Hackish, at the very least.  See Python bug #445902:
        # http://sourceforge.net/tracker/index.php
        #   ?func=detail&aid=445902&group_id=5470&atid=105470
        # Linkers on different platforms need different options to
        # specify that directories need to be added to the list of
        # directories searched for dependencies when a dynamic library
        # is sought.  GCC on GNU systems (Linux, FreeBSD, ...) has to
        # be told to pass the -R option through to the linker, whereas
        # other compilers and gcc on other systems just know this.
        # Other compilers may need something slightly different.  At
        # this time, there's no way to determine this information from
        # the configuration data stored in the Python installation, so
        # we use this hack.
        if sys.platform[:6] == "darwin":
            from distutils.util import get_macosx_target_ver, split_version

            macosx_target_ver = get_macosx_target_ver()
            if macosx_target_ver and split_version(macosx_target_ver) >= [10, 5]:
                return "-Wl,-rpath," + dir
            else:  # no support for -rpath on earlier macOS versions
                return "-L" + dir
        elif sys.platform[:7] == "freebsd":
            return "-Wl,-rpath=" + dir
        elif sys.platform[:5] == "hp-ux":
            return [
                "-Wl,+s" if self._is_gcc() else "+s",
                "-L" + dir,
            ]

        # For all compilers, `-Wl` is the presumed way to
        # pass a compiler option to the linker and `-R` is
        # the way to pass an RPATH.
        if sysconfig.get_config_var("GNULD") == "yes":
            # GNU ld needs an extra option to get a RUNPATH
            # instead of just an RPATH.
            return "-Wl,--enable-new-dtags,-R" + dir
        else:
            return "-Wl,-R" + dir

    def library_option(self, lib):
        return "-l" + lib

    @staticmethod
    def _library_root(dir):
        """
        macOS users can specify an alternate SDK using'-isysroot'.
        Calculate the SDK root if it is specified.

        Note that, as of Xcode 7, Apple SDKs may contain textual stub
        libraries with .tbd extensions rather than the normal .dylib
        shared libraries installed in /.  The Apple compiler tool
        chain handles this transparently but it can cause problems
        for programs that are being built with an SDK and searching
        for specific libraries.  Callers of find_library_file need to
        keep in mind that the base filename of the returned SDK library
        file might have a different extension from that of the library
        file installed on the running system, for example:
          /Applications/Xcode.app/Contents/Developer/Platforms/
              MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
              usr/lib/libedit.tbd
        vs
          /usr/lib/libedit.dylib
        """
        cflags = sysconfig.get_config_var('CFLAGS')
        match = re.search(r'-isysroot\s*(\S+)', cflags)

        apply_root = (
            sys.platform == 'darwin'
            and match
            and (
                dir.startswith('/System/')
                or (dir.startswith('/usr/') and not dir.startswith('/usr/local/'))
            )
        )

        return os.path.join(match.group(1), dir[1:]) if apply_root else dir

    def find_library_file(self, dirs, lib, debug=0):
        r"""
        Second-guess the linker with not much hard
        data to go on: GCC seems to prefer the shared library, so
        assume that *all* Unix C compilers do,
        ignoring even GCC's "-static" option.

        >>> compiler = UnixCCompiler()
        >>> compiler._library_root = lambda dir: dir
        >>> monkeypatch = getfixture('monkeypatch')
        >>> monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d)
        >>> dirs = ('/foo/bar/missing', '/foo/bar/existing')
        >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.dylib'
        >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.dylib'
        >>> monkeypatch.setattr(os.path, 'exists',
        ...     lambda d: 'existing' in d and '.a' in d)
        >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.a'
        >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.a'
        """
        lib_names = (
            self.library_filename(lib, lib_type=type)
            for type in 'dylib xcode_stub shared static'.split()
        )

        roots = map(self._library_root, dirs)

        searched = (
            os.path.join(root, lib_name)
            for root, lib_name in itertools.product(roots, lib_names)
        )

        found = filter(os.path.exists, searched)

        # Return None if it could not be found in any dir.
        return next(found, None)
python3.12/site-packages/setuptools/_distutils/dep_util.py000064400000000535151732703700017704 0ustar00import warnings

from . import _modified


def __getattr__(name):
    if name not in ['newer', 'newer_group', 'newer_pairwise']:
        raise AttributeError(name)
    warnings.warn(
        "dep_util is Deprecated. Use functions from setuptools instead.",
        DeprecationWarning,
        stacklevel=2,
    )
    return getattr(_modified, name)
python3.12/site-packages/setuptools/_distutils/_log.py000064400000000053151732703700017012 0ustar00import logging


log = logging.getLogger()
python3.12/site-packages/setuptools/_distutils/cygwinccompiler.py000064400000027224151732703700021301 0ustar00"""distutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
"""

import os
import re
import sys
import copy
import shlex
import warnings
from subprocess import check_output

from .unixccompiler import UnixCCompiler
from .file_util import write_file
from .errors import (
    DistutilsExecError,
    DistutilsPlatformError,
    CCompilerError,
    CompileError,
)
from .version import LooseVersion, suppress_known_deprecation
from ._collections import RangeMap


_msvcr_lookup = RangeMap.left(
    {
        # MSVC 7.0
        1300: ['msvcr70'],
        # MSVC 7.1
        1310: ['msvcr71'],
        # VS2005 / MSVC 8.0
        1400: ['msvcr80'],
        # VS2008 / MSVC 9.0
        1500: ['msvcr90'],
        # VS2010 / MSVC 10.0
        1600: ['msvcr100'],
        # VS2012 / MSVC 11.0
        1700: ['msvcr110'],
        # VS2013 / MSVC 12.0
        1800: ['msvcr120'],
        # VS2015 / MSVC 14.0
        1900: ['vcruntime140'],
        2000: RangeMap.undefined_value,
    },
)


def get_msvcr():
    """Include the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    """
    match = re.search(r'MSC v\.(\d{4})', sys.version)
    try:
        msc_ver = int(match.group(1))
    except AttributeError:
        return
    try:
        return _msvcr_lookup[msc_ver]
    except KeyError:
        raise ValueError("Unknown MS Compiler version %s " % msc_ver)


_runtime_library_dirs_msg = (
    "Unable to set runtime library search path on Windows, "
    "usually indicated by `runtime_library_dirs` parameter to Extension"
)


class CygwinCCompiler(UnixCCompiler):
    """Handles the Cygwin port of the GNU C compiler to Windows."""

    compiler_type = 'cygwin'
    obj_extension = ".o"
    static_lib_extension = ".a"
    shared_lib_extension = ".dll.a"
    dylib_lib_extension = ".dll"
    static_lib_format = "lib%s%s"
    shared_lib_format = "lib%s%s"
    dylib_lib_format = "cyg%s%s"
    exe_extension = ".exe"

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)

        status, details = check_config_h()
        self.debug_print(
            "Python's GCC status: {} (details: {})".format(status, details)
        )
        if status is not CONFIG_H_OK:
            self.warn(
                "Python's pyconfig.h doesn't seem to support your compiler. "
                "Reason: %s. "
                "Compiling may fail because of undefined preprocessor macros." % details
            )

        self.cc = os.environ.get('CC', 'gcc')
        self.cxx = os.environ.get('CXX', 'g++')

        self.linker_dll = self.cc
        shared_option = "-shared"

        self.set_executables(
            compiler='%s -mcygwin -O -Wall' % self.cc,
            compiler_so='%s -mcygwin -mdll -O -Wall' % self.cc,
            compiler_cxx='%s -mcygwin -O -Wall' % self.cxx,
            linker_exe='%s -mcygwin' % self.cc,
            linker_so=('{} -mcygwin {}'.format(self.linker_dll, shared_option)),
        )

        # Include the appropriate MSVC runtime library if Python was built
        # with MSVC 7.0 or later.
        self.dll_libraries = get_msvcr()

    @property
    def gcc_version(self):
        # Older numpy depended on this existing to check for ancient
        # gcc versions. This doesn't make much sense with clang etc so
        # just hardcode to something recent.
        # https://github.com/numpy/numpy/pull/20333
        warnings.warn(
            "gcc_version attribute of CygwinCCompiler is deprecated. "
            "Instead of returning actual gcc version a fixed value 11.2.0 is returned.",
            DeprecationWarning,
            stacklevel=2,
        )
        with suppress_known_deprecation():
            return LooseVersion("11.2.0")

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        """Compiles the source by spawning GCC and windres if needed."""
        if ext in ('.rc', '.res'):
            # gcc needs '.res' and '.rc' compiled to object files !!!
            try:
                self.spawn(["windres", "-i", src, "-o", obj])
            except DistutilsExecError as msg:
                raise CompileError(msg)
        else:  # for other files use the C-compiler
            try:
                self.spawn(
                    self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs
                )
            except DistutilsExecError as msg:
                raise CompileError(msg)

    def link(
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        """Link the objects."""
        # use separate copies, so we can modify the lists
        extra_preargs = copy.copy(extra_preargs or [])
        libraries = copy.copy(libraries or [])
        objects = copy.copy(objects or [])

        if runtime_library_dirs:
            self.warn(_runtime_library_dirs_msg)

        # Additional libraries
        libraries.extend(self.dll_libraries)

        # handle export symbols by creating a def-file
        # with executables this only works with gcc/ld as linker
        if (export_symbols is not None) and (
            target_desc != self.EXECUTABLE or self.linker_dll == "gcc"
        ):
            # (The linker doesn't do anything if output is up-to-date.
            # So it would probably better to check if we really need this,
            # but for this we had to insert some unchanged parts of
            # UnixCCompiler, and this is not what we want.)

            # we want to put some files in the same directory as the
            # object files are, build_temp doesn't help much
            # where are the object files
            temp_dir = os.path.dirname(objects[0])
            # name of dll to give the helper files the same base name
            (dll_name, dll_extension) = os.path.splitext(
                os.path.basename(output_filename)
            )

            # generate the filenames for these files
            def_file = os.path.join(temp_dir, dll_name + ".def")

            # Generate .def file
            contents = ["LIBRARY %s" % os.path.basename(output_filename), "EXPORTS"]
            for sym in export_symbols:
                contents.append(sym)
            self.execute(write_file, (def_file, contents), "writing %s" % def_file)

            # next add options for def-file

            # for gcc/ld the def-file is specified as any object files
            objects.append(def_file)

        # end: if ((export_symbols is not None) and
        #        (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):

        # who wants symbols and a many times larger output file
        # should explicitly switch the debug mode on
        # otherwise we let ld strip the output file
        # (On my machine: 10KiB < stripped_file < ??100KiB
        #   unstripped_file = stripped_file + XXX KiB
        #  ( XXX=254 for a typical python extension))
        if not debug:
            extra_preargs.append("-s")

        UnixCCompiler.link(
            self,
            target_desc,
            objects,
            output_filename,
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            None,  # export_symbols, we do this in our def-file
            debug,
            extra_preargs,
            extra_postargs,
            build_temp,
            target_lang,
        )

    def runtime_library_dir_option(self, dir):
        # cygwin doesn't support rpath. While in theory we could error
        # out like MSVC does, code might expect it to work like on Unix, so
        # just warn and hope for the best.
        self.warn(_runtime_library_dirs_msg)
        return []

    # -- Miscellaneous methods -----------------------------------------

    def _make_out_path(self, output_dir, strip_dir, src_name):
        # use normcase to make sure '.rc' is really '.rc' and not '.RC'
        norm_src_name = os.path.normcase(src_name)
        return super()._make_out_path(output_dir, strip_dir, norm_src_name)

    @property
    def out_extensions(self):
        """
        Add support for rc and res files.
        """
        return {
            **super().out_extensions,
            **{ext: ext + self.obj_extension for ext in ('.res', '.rc')},
        }


# the same as cygwin plus some additional parameters
class Mingw32CCompiler(CygwinCCompiler):
    """Handles the Mingw32 port of the GNU C compiler to Windows."""

    compiler_type = 'mingw32'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)

        shared_option = "-shared"

        if is_cygwincc(self.cc):
            raise CCompilerError('Cygwin gcc cannot be used with --compiler=mingw32')

        self.set_executables(
            compiler='%s -O -Wall' % self.cc,
            compiler_so='%s -mdll -O -Wall' % self.cc,
            compiler_cxx='%s -O -Wall' % self.cxx,
            linker_exe='%s' % self.cc,
            linker_so='{} {}'.format(self.linker_dll, shared_option),
        )

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(_runtime_library_dirs_msg)


# Because these compilers aren't configured in Python's pyconfig.h file by
# default, we should at least warn the user if he is using an unmodified
# version.

CONFIG_H_OK = "ok"
CONFIG_H_NOTOK = "not ok"
CONFIG_H_UNCERTAIN = "uncertain"


def check_config_h():
    """Check if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    """

    # XXX since this function also checks sys.version, it's not strictly a
    # "pyconfig.h" check -- should probably be renamed...

    from distutils import sysconfig

    # if sys.version contains GCC then python was compiled with GCC, and the
    # pyconfig.h file should be OK
    if "GCC" in sys.version:
        return CONFIG_H_OK, "sys.version mentions 'GCC'"

    # Clang would also work
    if "Clang" in sys.version:
        return CONFIG_H_OK, "sys.version mentions 'Clang'"

    # let's see if __GNUC__ is mentioned in python.h
    fn = sysconfig.get_config_h_filename()
    try:
        config_h = open(fn)
        try:
            if "__GNUC__" in config_h.read():
                return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn
            else:
                return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn
        finally:
            config_h.close()
    except OSError as exc:
        return (CONFIG_H_UNCERTAIN, "couldn't read '{}': {}".format(fn, exc.strerror))


def is_cygwincc(cc):
    '''Try to determine if the compiler that would be used is from cygwin.'''
    out_string = check_output(shlex.split(cc) + ['-dumpmachine'])
    return out_string.strip().endswith(b'cygwin')


get_versions = None
"""
A stand-in for the previous get_versions() function to prevent failures
when monkeypatched. See pypa/setuptools#2969.
"""
python3.12/site-packages/setuptools/_distutils/__init__.py000064400000000547151732703700017641 0ustar00import sys
import importlib

__version__, _, _ = sys.version.partition(' ')


try:
    # Allow Debian and pkgsrc (only) to customize system
    # behavior. Ref pypa/distutils#2 and pypa/distutils#16.
    # This hook is deprecated and no other environments
    # should use it.
    importlib.import_module('_distutils_system_mod')
except ImportError:
    pass
python3.12/site-packages/setuptools/_distutils/dist.py000064400000141776151732703700017057 0ustar00"""distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""

import sys
import os
import re
import pathlib
import contextlib
import logging
from email import message_from_file

try:
    import warnings
except ImportError:
    warnings = None

from .errors import (
    DistutilsOptionError,
    DistutilsModuleError,
    DistutilsArgError,
    DistutilsClassError,
)
from .fancy_getopt import FancyGetopt, translate_longopt
from .util import check_environ, strtobool, rfc822_escape
from ._log import log
from .debug import DEBUG

# Regex to define acceptable Distutils command names.  This is not *quite*
# the same as a Python NAME -- I don't allow leading underscores.  The fact
# that they're very similar is no coincidence; the default naming scheme is
# to look for a Python module named after the command.
command_re = re.compile(r'^[a-zA-Z]([a-zA-Z0-9_]*)$')


def _ensure_list(value, fieldname):
    if isinstance(value, str):
        # a string containing comma separated values is okay.  It will
        # be converted to a list by Distribution.finalize_options().
        pass
    elif not isinstance(value, list):
        # passing a tuple or an iterator perhaps, warn and convert
        typename = type(value).__name__
        msg = "Warning: '{fieldname}' should be a list, got type '{typename}'"
        msg = msg.format(**locals())
        log.warning(msg)
        value = list(value)
    return value


class Distribution:
    """The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    """

    # 'global_options' describes the command-line options that may be
    # supplied to the setup script prior to any actual commands.
    # Eg. "./setup.py -n" or "./setup.py --quiet" both take advantage of
    # these global options.  This list should be kept to a bare minimum,
    # since every global option is also valid as a command option -- and we
    # don't want to pollute the commands with too many options that they
    # have minimal control over.
    # The fourth entry for verbose means that it can be repeated.
    global_options = [
        ('verbose', 'v', "run verbosely (default)", 1),
        ('quiet', 'q', "run quietly (turns verbosity off)"),
        ('dry-run', 'n', "don't actually do anything"),
        ('help', 'h', "show detailed help message"),
        ('no-user-cfg', None, 'ignore pydistutils.cfg in your home directory'),
    ]

    # 'common_usage' is a short (2-3 line) string describing the common
    # usage of the setup script.
    common_usage = """\
Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
"""

    # options that are not propagated to the commands
    display_options = [
        ('help-commands', None, "list all available commands"),
        ('name', None, "print package name"),
        ('version', 'V', "print package version"),
        ('fullname', None, "print <package name>-<version>"),
        ('author', None, "print the author's name"),
        ('author-email', None, "print the author's email address"),
        ('maintainer', None, "print the maintainer's name"),
        ('maintainer-email', None, "print the maintainer's email address"),
        ('contact', None, "print the maintainer's name if known, else the author's"),
        (
            'contact-email',
            None,
            "print the maintainer's email address if known, else the author's",
        ),
        ('url', None, "print the URL for this package"),
        ('license', None, "print the license of the package"),
        ('licence', None, "alias for --license"),
        ('description', None, "print the package description"),
        ('long-description', None, "print the long package description"),
        ('platforms', None, "print the list of platforms"),
        ('classifiers', None, "print the list of classifiers"),
        ('keywords', None, "print the list of keywords"),
        ('provides', None, "print the list of packages/modules provided"),
        ('requires', None, "print the list of packages/modules required"),
        ('obsoletes', None, "print the list of packages/modules made obsolete"),
    ]
    display_option_names = [translate_longopt(x[0]) for x in display_options]

    # negative options are options that exclude other options
    negative_opt = {'quiet': 'verbose'}

    # -- Creation/initialization methods -------------------------------

    def __init__(self, attrs=None):  # noqa: C901
        """Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        """

        # Default values for our command-line options
        self.verbose = 1
        self.dry_run = 0
        self.help = 0
        for attr in self.display_option_names:
            setattr(self, attr, 0)

        # Store the distribution meta-data (name, version, author, and so
        # forth) in a separate object -- we're getting to have enough
        # information here (and enough command-line options) that it's
        # worth it.  Also delegate 'get_XXX()' methods to the 'metadata'
        # object in a sneaky and underhanded (but efficient!) way.
        self.metadata = DistributionMetadata()
        for basename in self.metadata._METHOD_BASENAMES:
            method_name = "get_" + basename
            setattr(self, method_name, getattr(self.metadata, method_name))

        # 'cmdclass' maps command names to class objects, so we
        # can 1) quickly figure out which class to instantiate when
        # we need to create a new command object, and 2) have a way
        # for the setup script to override command classes
        self.cmdclass = {}

        # 'command_packages' is a list of packages in which commands
        # are searched for.  The factory for command 'foo' is expected
        # to be named 'foo' in the module 'foo' in one of the packages
        # named here.  This list is searched from the left; an error
        # is raised if no named package provides the command being
        # searched for.  (Always access using get_command_packages().)
        self.command_packages = None

        # 'script_name' and 'script_args' are usually set to sys.argv[0]
        # and sys.argv[1:], but they can be overridden when the caller is
        # not necessarily a setup script run from the command-line.
        self.script_name = None
        self.script_args = None

        # 'command_options' is where we store command options between
        # parsing them (from config files, the command-line, etc.) and when
        # they are actually needed -- ie. when the command in question is
        # instantiated.  It is a dictionary of dictionaries of 2-tuples:
        #   command_options = { command_name : { option : (source, value) } }
        self.command_options = {}

        # 'dist_files' is the list of (command, pyversion, file) that
        # have been created by any dist commands run so far. This is
        # filled regardless of whether the run is dry or not. pyversion
        # gives sysconfig.get_python_version() if the dist file is
        # specific to a Python version, 'any' if it is good for all
        # Python versions on the target platform, and '' for a source
        # file. pyversion should not be used to specify minimum or
        # maximum required Python versions; use the metainfo for that
        # instead.
        self.dist_files = []

        # These options are really the business of various commands, rather
        # than of the Distribution itself.  We provide aliases for them in
        # Distribution as a convenience to the developer.
        self.packages = None
        self.package_data = {}
        self.package_dir = None
        self.py_modules = None
        self.libraries = None
        self.headers = None
        self.ext_modules = None
        self.ext_package = None
        self.include_dirs = None
        self.extra_path = None
        self.scripts = None
        self.data_files = None
        self.password = ''

        # And now initialize bookkeeping stuff that can't be supplied by
        # the caller at all.  'command_obj' maps command names to
        # Command instances -- that's how we enforce that every command
        # class is a singleton.
        self.command_obj = {}

        # 'have_run' maps command names to boolean values; it keeps track
        # of whether we have actually run a particular command, to make it
        # cheap to "run" a command whenever we think we might need to -- if
        # it's already been done, no need for expensive filesystem
        # operations, we just check the 'have_run' dictionary and carry on.
        # It's only safe to query 'have_run' for a command class that has
        # been instantiated -- a false value will be inserted when the
        # command object is created, and replaced with a true value when
        # the command is successfully run.  Thus it's probably best to use
        # '.get()' rather than a straight lookup.
        self.have_run = {}

        # Now we'll use the attrs dictionary (ultimately, keyword args from
        # the setup script) to possibly override any or all of these
        # distribution options.

        if attrs:
            # Pull out the set of command options and work on them
            # specifically.  Note that this order guarantees that aliased
            # command options will override any supplied redundantly
            # through the general options dictionary.
            options = attrs.get('options')
            if options is not None:
                del attrs['options']
                for command, cmd_options in options.items():
                    opt_dict = self.get_option_dict(command)
                    for opt, val in cmd_options.items():
                        opt_dict[opt] = ("setup script", val)

            if 'licence' in attrs:
                attrs['license'] = attrs['licence']
                del attrs['licence']
                msg = "'licence' distribution option is deprecated; use 'license'"
                if warnings is not None:
                    warnings.warn(msg)
                else:
                    sys.stderr.write(msg + "\n")

            # Now work on the rest of the attributes.  Any attribute that's
            # not already defined is invalid!
            for key, val in attrs.items():
                if hasattr(self.metadata, "set_" + key):
                    getattr(self.metadata, "set_" + key)(val)
                elif hasattr(self.metadata, key):
                    setattr(self.metadata, key, val)
                elif hasattr(self, key):
                    setattr(self, key, val)
                else:
                    msg = "Unknown distribution option: %s" % repr(key)
                    warnings.warn(msg)

        # no-user-cfg is handled before other command line args
        # because other args override the config files, and this
        # one is needed before we can load the config files.
        # If attrs['script_args'] wasn't passed, assume false.
        #
        # This also make sure we just look at the global options
        self.want_user_cfg = True

        if self.script_args is not None:
            for arg in self.script_args:
                if not arg.startswith('-'):
                    break
                if arg == '--no-user-cfg':
                    self.want_user_cfg = False
                    break

        self.finalize_options()

    def get_option_dict(self, command):
        """Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        """
        dict = self.command_options.get(command)
        if dict is None:
            dict = self.command_options[command] = {}
        return dict

    def dump_option_dicts(self, header=None, commands=None, indent=""):
        from pprint import pformat

        if commands is None:  # dump all command option dicts
            commands = sorted(self.command_options.keys())

        if header is not None:
            self.announce(indent + header)
            indent = indent + "  "

        if not commands:
            self.announce(indent + "no commands known yet")
            return

        for cmd_name in commands:
            opt_dict = self.command_options.get(cmd_name)
            if opt_dict is None:
                self.announce(indent + "no option dict for '%s' command" % cmd_name)
            else:
                self.announce(indent + "option dict for '%s' command:" % cmd_name)
                out = pformat(opt_dict)
                for line in out.split('\n'):
                    self.announce(indent + "  " + line)

    # -- Config file finding/parsing methods ---------------------------

    def find_config_files(self):
        """Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are multiple possible config files:
        - distutils.cfg in the Distutils installation directory (i.e.
          where the top-level Distutils __inst__.py file lives)
        - a file in the user's home directory named .pydistutils.cfg
          on Unix and pydistutils.cfg on Windows/Mac; may be disabled
          with the ``--no-user-cfg`` option
        - setup.cfg in the current directory
        - a file named by an environment variable
        """
        check_environ()
        files = [str(path) for path in self._gen_paths() if os.path.isfile(path)]

        if DEBUG:
            self.announce("using config files: %s" % ', '.join(files))

        return files

    def _gen_paths(self):
        # The system-wide Distutils config file
        sys_dir = pathlib.Path(sys.modules['distutils'].__file__).parent
        yield sys_dir / "distutils.cfg"

        # The per-user config file
        prefix = '.' * (os.name == 'posix')
        filename = prefix + 'pydistutils.cfg'
        if self.want_user_cfg:
            yield pathlib.Path('~').expanduser() / filename

        # All platforms support local setup.cfg
        yield pathlib.Path('setup.cfg')

        # Additional config indicated in the environment
        with contextlib.suppress(TypeError):
            yield pathlib.Path(os.getenv("DIST_EXTRA_CONFIG"))

    def parse_config_files(self, filenames=None):  # noqa: C901
        from configparser import ConfigParser

        # Ignore install directory options if we have a venv
        if sys.prefix != sys.base_prefix:
            ignore_options = [
                'install-base',
                'install-platbase',
                'install-lib',
                'install-platlib',
                'install-purelib',
                'install-headers',
                'install-scripts',
                'install-data',
                'prefix',
                'exec-prefix',
                'home',
                'user',
                'root',
            ]
        else:
            ignore_options = []

        ignore_options = frozenset(ignore_options)

        if filenames is None:
            filenames = self.find_config_files()

        if DEBUG:
            self.announce("Distribution.parse_config_files():")

        parser = ConfigParser()
        for filename in filenames:
            if DEBUG:
                self.announce("  reading %s" % filename)
            parser.read(filename)
            for section in parser.sections():
                options = parser.options(section)
                opt_dict = self.get_option_dict(section)

                for opt in options:
                    if opt != '__name__' and opt not in ignore_options:
                        val = parser.get(section, opt)
                        opt = opt.replace('-', '_')
                        opt_dict[opt] = (filename, val)

            # Make the ConfigParser forget everything (so we retain
            # the original filenames that options come from)
            parser.__init__()

        # If there was a "global" section in the config file, use it
        # to set Distribution options.

        if 'global' in self.command_options:
            for opt, (src, val) in self.command_options['global'].items():
                alias = self.negative_opt.get(opt)
                try:
                    if alias:
                        setattr(self, alias, not strtobool(val))
                    elif opt in ('verbose', 'dry_run'):  # ugh!
                        setattr(self, opt, strtobool(val))
                    else:
                        setattr(self, opt, val)
                except ValueError as msg:
                    raise DistutilsOptionError(msg)

    # -- Command-line parsing methods ----------------------------------

    def parse_command_line(self):
        """Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        """
        #
        # We now have enough information to show the Macintosh dialog
        # that allows the user to interactively specify the "command line".
        #
        toplevel_options = self._get_toplevel_options()

        # We have to parse the command line a bit at a time -- global
        # options, then the first command, then its options, and so on --
        # because each command will be handled by a different class, and
        # the options that are valid for a particular class aren't known
        # until we have loaded the command class, which doesn't happen
        # until we know what the command is.

        self.commands = []
        parser = FancyGetopt(toplevel_options + self.display_options)
        parser.set_negative_aliases(self.negative_opt)
        parser.set_aliases({'licence': 'license'})
        args = parser.getopt(args=self.script_args, object=self)
        option_order = parser.get_option_order()
        logging.getLogger().setLevel(logging.WARN - 10 * self.verbose)

        # for display options we return immediately
        if self.handle_display_options(option_order):
            return
        while args:
            args = self._parse_command_opts(parser, args)
            if args is None:  # user asked for help (and got it)
                return

        # Handle the cases of --help as a "global" option, ie.
        # "setup.py --help" and "setup.py --help command ...".  For the
        # former, we show global options (--verbose, --dry-run, etc.)
        # and display-only options (--name, --version, etc.); for the
        # latter, we omit the display-only options and show help for
        # each command listed on the command line.
        if self.help:
            self._show_help(
                parser, display_options=len(self.commands) == 0, commands=self.commands
            )
            return

        # Oops, no commands found -- an end-user error
        if not self.commands:
            raise DistutilsArgError("no commands supplied")

        # All is well: return true
        return True

    def _get_toplevel_options(self):
        """Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        """
        return self.global_options + [
            (
                "command-packages=",
                None,
                "list of packages that provide distutils commands",
            ),
        ]

    def _parse_command_opts(self, parser, args):  # noqa: C901
        """Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        """
        # late import because of mutual dependence between these modules
        from distutils.cmd import Command

        # Pull the current command from the head of the command line
        command = args[0]
        if not command_re.match(command):
            raise SystemExit("invalid command name '%s'" % command)
        self.commands.append(command)

        # Dig up the command class that implements this command, so we
        # 1) know that it's a valid command, and 2) know which options
        # it takes.
        try:
            cmd_class = self.get_command_class(command)
        except DistutilsModuleError as msg:
            raise DistutilsArgError(msg)

        # Require that the command class be derived from Command -- want
        # to be sure that the basic "command" interface is implemented.
        if not issubclass(cmd_class, Command):
            raise DistutilsClassError(
                "command class %s must subclass Command" % cmd_class
            )

        # Also make sure that the command object provides a list of its
        # known options.
        if not (
            hasattr(cmd_class, 'user_options')
            and isinstance(cmd_class.user_options, list)
        ):
            msg = (
                "command class %s must provide "
                "'user_options' attribute (a list of tuples)"
            )
            raise DistutilsClassError(msg % cmd_class)

        # If the command class has a list of negative alias options,
        # merge it in with the global negative aliases.
        negative_opt = self.negative_opt
        if hasattr(cmd_class, 'negative_opt'):
            negative_opt = negative_opt.copy()
            negative_opt.update(cmd_class.negative_opt)

        # Check for help_options in command class.  They have a different
        # format (tuple of four) so we need to preprocess them here.
        if hasattr(cmd_class, 'help_options') and isinstance(
            cmd_class.help_options, list
        ):
            help_options = fix_help_options(cmd_class.help_options)
        else:
            help_options = []

        # All commands support the global options too, just by adding
        # in 'global_options'.
        parser.set_option_table(
            self.global_options + cmd_class.user_options + help_options
        )
        parser.set_negative_aliases(negative_opt)
        (args, opts) = parser.getopt(args[1:])
        if hasattr(opts, 'help') and opts.help:
            self._show_help(parser, display_options=0, commands=[cmd_class])
            return

        if hasattr(cmd_class, 'help_options') and isinstance(
            cmd_class.help_options, list
        ):
            help_option_found = 0
            for help_option, short, desc, func in cmd_class.help_options:
                if hasattr(opts, parser.get_attr_name(help_option)):
                    help_option_found = 1
                    if callable(func):
                        func()
                    else:
                        raise DistutilsClassError(
                            "invalid help function %r for help option '%s': "
                            "must be a callable object (function, etc.)"
                            % (func, help_option)
                        )

            if help_option_found:
                return

        # Put the options from the command-line into their official
        # holding pen, the 'command_options' dictionary.
        opt_dict = self.get_option_dict(command)
        for name, value in vars(opts).items():
            opt_dict[name] = ("command line", value)

        return args

    def finalize_options(self):
        """Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        """
        for attr in ('keywords', 'platforms'):
            value = getattr(self.metadata, attr)
            if value is None:
                continue
            if isinstance(value, str):
                value = [elm.strip() for elm in value.split(',')]
                setattr(self.metadata, attr, value)

    def _show_help(self, parser, global_options=1, display_options=1, commands=[]):
        """Show help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        """
        # late import because of mutual dependence between these modules
        from distutils.core import gen_usage
        from distutils.cmd import Command

        if global_options:
            if display_options:
                options = self._get_toplevel_options()
            else:
                options = self.global_options
            parser.set_option_table(options)
            parser.print_help(self.common_usage + "\nGlobal options:")
            print('')

        if display_options:
            parser.set_option_table(self.display_options)
            parser.print_help(
                "Information display options (just display "
                + "information, ignore any commands)"
            )
            print('')

        for command in self.commands:
            if isinstance(command, type) and issubclass(command, Command):
                klass = command
            else:
                klass = self.get_command_class(command)
            if hasattr(klass, 'help_options') and isinstance(klass.help_options, list):
                parser.set_option_table(
                    klass.user_options + fix_help_options(klass.help_options)
                )
            else:
                parser.set_option_table(klass.user_options)
            parser.print_help("Options for '%s' command:" % klass.__name__)
            print('')

        print(gen_usage(self.script_name))

    def handle_display_options(self, option_order):
        """If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        """
        from distutils.core import gen_usage

        # User just wants a list of commands -- we'll print it out and stop
        # processing now (ie. if they ran "setup --help-commands foo bar",
        # we ignore "foo bar").
        if self.help_commands:
            self.print_commands()
            print('')
            print(gen_usage(self.script_name))
            return 1

        # If user supplied any of the "display metadata" options, then
        # display that metadata in the order in which the user supplied the
        # metadata options.
        any_display_options = 0
        is_display_option = {}
        for option in self.display_options:
            is_display_option[option[0]] = 1

        for opt, val in option_order:
            if val and is_display_option.get(opt):
                opt = translate_longopt(opt)
                value = getattr(self.metadata, "get_" + opt)()
                if opt in ('keywords', 'platforms'):
                    print(','.join(value))
                elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'):
                    print('\n'.join(value))
                else:
                    print(value)
                any_display_options = 1

        return any_display_options

    def print_command_list(self, commands, header, max_length):
        """Print a subset of the list of all commands -- used by
        'print_commands()'.
        """
        print(header + ":")

        for cmd in commands:
            klass = self.cmdclass.get(cmd)
            if not klass:
                klass = self.get_command_class(cmd)
            try:
                description = klass.description
            except AttributeError:
                description = "(no description available)"

            print("  %-*s  %s" % (max_length, cmd, description))

    def print_commands(self):
        """Print out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        """
        import distutils.command

        std_commands = distutils.command.__all__
        is_std = {}
        for cmd in std_commands:
            is_std[cmd] = 1

        extra_commands = []
        for cmd in self.cmdclass.keys():
            if not is_std.get(cmd):
                extra_commands.append(cmd)

        max_length = 0
        for cmd in std_commands + extra_commands:
            if len(cmd) > max_length:
                max_length = len(cmd)

        self.print_command_list(std_commands, "Standard commands", max_length)
        if extra_commands:
            print()
            self.print_command_list(extra_commands, "Extra commands", max_length)

    def get_command_list(self):
        """Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        """
        # Currently this is only used on Mac OS, for the Mac-only GUI
        # Distutils interface (by Jack Jansen)
        import distutils.command

        std_commands = distutils.command.__all__
        is_std = {}
        for cmd in std_commands:
            is_std[cmd] = 1

        extra_commands = []
        for cmd in self.cmdclass.keys():
            if not is_std.get(cmd):
                extra_commands.append(cmd)

        rv = []
        for cmd in std_commands + extra_commands:
            klass = self.cmdclass.get(cmd)
            if not klass:
                klass = self.get_command_class(cmd)
            try:
                description = klass.description
            except AttributeError:
                description = "(no description available)"
            rv.append((cmd, description))
        return rv

    # -- Command class/object methods ----------------------------------

    def get_command_packages(self):
        """Return a list of packages from which commands are loaded."""
        pkgs = self.command_packages
        if not isinstance(pkgs, list):
            if pkgs is None:
                pkgs = ''
            pkgs = [pkg.strip() for pkg in pkgs.split(',') if pkg != '']
            if "distutils.command" not in pkgs:
                pkgs.insert(0, "distutils.command")
            self.command_packages = pkgs
        return pkgs

    def get_command_class(self, command):
        """Return the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        """
        klass = self.cmdclass.get(command)
        if klass:
            return klass

        for pkgname in self.get_command_packages():
            module_name = "{}.{}".format(pkgname, command)
            klass_name = command

            try:
                __import__(module_name)
                module = sys.modules[module_name]
            except ImportError:
                continue

            try:
                klass = getattr(module, klass_name)
            except AttributeError:
                raise DistutilsModuleError(
                    "invalid command '%s' (no class '%s' in module '%s')"
                    % (command, klass_name, module_name)
                )

            self.cmdclass[command] = klass
            return klass

        raise DistutilsModuleError("invalid command '%s'" % command)

    def get_command_obj(self, command, create=1):
        """Return the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        """
        cmd_obj = self.command_obj.get(command)
        if not cmd_obj and create:
            if DEBUG:
                self.announce(
                    "Distribution.get_command_obj(): "
                    "creating '%s' command object" % command
                )

            klass = self.get_command_class(command)
            cmd_obj = self.command_obj[command] = klass(self)
            self.have_run[command] = 0

            # Set any options that were supplied in config files
            # or on the command line.  (NB. support for error
            # reporting is lame here: any errors aren't reported
            # until 'finalize_options()' is called, which means
            # we won't report the source of the error.)
            options = self.command_options.get(command)
            if options:
                self._set_command_options(cmd_obj, options)

        return cmd_obj

    def _set_command_options(self, command_obj, option_dict=None):  # noqa: C901
        """Set the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        """
        command_name = command_obj.get_command_name()
        if option_dict is None:
            option_dict = self.get_option_dict(command_name)

        if DEBUG:
            self.announce("  setting options for '%s' command:" % command_name)
        for option, (source, value) in option_dict.items():
            if DEBUG:
                self.announce("    {} = {} (from {})".format(option, value, source))
            try:
                bool_opts = [translate_longopt(o) for o in command_obj.boolean_options]
            except AttributeError:
                bool_opts = []
            try:
                neg_opt = command_obj.negative_opt
            except AttributeError:
                neg_opt = {}

            try:
                is_string = isinstance(value, str)
                if option in neg_opt and is_string:
                    setattr(command_obj, neg_opt[option], not strtobool(value))
                elif option in bool_opts and is_string:
                    setattr(command_obj, option, strtobool(value))
                elif hasattr(command_obj, option):
                    setattr(command_obj, option, value)
                else:
                    raise DistutilsOptionError(
                        "error in %s: command '%s' has no such option '%s'"
                        % (source, command_name, option)
                    )
            except ValueError as msg:
                raise DistutilsOptionError(msg)

    def reinitialize_command(self, command, reinit_subcommands=0):
        """Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        """
        from distutils.cmd import Command

        if not isinstance(command, Command):
            command_name = command
            command = self.get_command_obj(command_name)
        else:
            command_name = command.get_command_name()

        if not command.finalized:
            return command
        command.initialize_options()
        command.finalized = 0
        self.have_run[command_name] = 0
        self._set_command_options(command)

        if reinit_subcommands:
            for sub in command.get_sub_commands():
                self.reinitialize_command(sub, reinit_subcommands)

        return command

    # -- Methods that operate on the Distribution ----------------------

    def announce(self, msg, level=logging.INFO):
        log.log(level, msg)

    def run_commands(self):
        """Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        """
        for cmd in self.commands:
            self.run_command(cmd)

    # -- Methods that operate on its Commands --------------------------

    def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1

    # -- Distribution query methods ------------------------------------

    def has_pure_modules(self):
        return len(self.packages or self.py_modules or []) > 0

    def has_ext_modules(self):
        return self.ext_modules and len(self.ext_modules) > 0

    def has_c_libraries(self):
        return self.libraries and len(self.libraries) > 0

    def has_modules(self):
        return self.has_pure_modules() or self.has_ext_modules()

    def has_headers(self):
        return self.headers and len(self.headers) > 0

    def has_scripts(self):
        return self.scripts and len(self.scripts) > 0

    def has_data_files(self):
        return self.data_files and len(self.data_files) > 0

    def is_pure(self):
        return (
            self.has_pure_modules()
            and not self.has_ext_modules()
            and not self.has_c_libraries()
        )

    # -- Metadata query methods ----------------------------------------

    # If you're looking for 'get_name()', 'get_version()', and so forth,
    # they are defined in a sneaky way: the constructor binds self.get_XXX
    # to self.metadata.get_XXX.  The actual code is in the
    # DistributionMetadata class, below.


class DistributionMetadata:
    """Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    """

    _METHOD_BASENAMES = (
        "name",
        "version",
        "author",
        "author_email",
        "maintainer",
        "maintainer_email",
        "url",
        "license",
        "description",
        "long_description",
        "keywords",
        "platforms",
        "fullname",
        "contact",
        "contact_email",
        "classifiers",
        "download_url",
        # PEP 314
        "provides",
        "requires",
        "obsoletes",
    )

    def __init__(self, path=None):
        if path is not None:
            self.read_pkg_file(open(path))
        else:
            self.name = None
            self.version = None
            self.author = None
            self.author_email = None
            self.maintainer = None
            self.maintainer_email = None
            self.url = None
            self.license = None
            self.description = None
            self.long_description = None
            self.keywords = None
            self.platforms = None
            self.classifiers = None
            self.download_url = None
            # PEP 314
            self.provides = None
            self.requires = None
            self.obsoletes = None

    def read_pkg_file(self, file):
        """Reads the metadata values from a file object."""
        msg = message_from_file(file)

        def _read_field(name):
            value = msg[name]
            if value and value != "UNKNOWN":
                return value

        def _read_list(name):
            values = msg.get_all(name, None)
            if values == []:
                return None
            return values

        metadata_version = msg['metadata-version']
        self.name = _read_field('name')
        self.version = _read_field('version')
        self.description = _read_field('summary')
        # we are filling author only.
        self.author = _read_field('author')
        self.maintainer = None
        self.author_email = _read_field('author-email')
        self.maintainer_email = None
        self.url = _read_field('home-page')
        self.license = _read_field('license')

        if 'download-url' in msg:
            self.download_url = _read_field('download-url')
        else:
            self.download_url = None

        self.long_description = _read_field('description')
        self.description = _read_field('summary')

        if 'keywords' in msg:
            self.keywords = _read_field('keywords').split(',')

        self.platforms = _read_list('platform')
        self.classifiers = _read_list('classifier')

        # PEP 314 - these fields only exist in 1.1
        if metadata_version == '1.1':
            self.requires = _read_list('requires')
            self.provides = _read_list('provides')
            self.obsoletes = _read_list('obsoletes')
        else:
            self.requires = None
            self.provides = None
            self.obsoletes = None

    def write_pkg_info(self, base_dir):
        """Write the PKG-INFO file into the release tree."""
        with open(
            os.path.join(base_dir, 'PKG-INFO'), 'w', encoding='UTF-8'
        ) as pkg_info:
            self.write_pkg_file(pkg_info)

    def write_pkg_file(self, file):
        """Write the PKG-INFO format data to a file object."""
        version = '1.0'
        if (
            self.provides
            or self.requires
            or self.obsoletes
            or self.classifiers
            or self.download_url
        ):
            version = '1.1'

        # required fields
        file.write('Metadata-Version: %s\n' % version)
        file.write('Name: %s\n' % self.get_name())
        file.write('Version: %s\n' % self.get_version())

        def maybe_write(header, val):
            if val:
                file.write(f"{header}: {val}\n")

        # optional fields
        maybe_write("Summary", self.get_description())
        maybe_write("Home-page", self.get_url())
        maybe_write("Author", self.get_contact())
        maybe_write("Author-email", self.get_contact_email())
        maybe_write("License", self.get_license())
        maybe_write("Download-URL", self.download_url)
        maybe_write("Description", rfc822_escape(self.get_long_description() or ""))
        maybe_write("Keywords", ",".join(self.get_keywords()))

        self._write_list(file, 'Platform', self.get_platforms())
        self._write_list(file, 'Classifier', self.get_classifiers())

        # PEP 314
        self._write_list(file, 'Requires', self.get_requires())
        self._write_list(file, 'Provides', self.get_provides())
        self._write_list(file, 'Obsoletes', self.get_obsoletes())

    def _write_list(self, file, name, values):
        values = values or []
        for value in values:
            file.write('{}: {}\n'.format(name, value))

    # -- Metadata query methods ----------------------------------------

    def get_name(self):
        return self.name or "UNKNOWN"

    def get_version(self):
        return self.version or "0.0.0"

    def get_fullname(self):
        return "{}-{}".format(self.get_name(), self.get_version())

    def get_author(self):
        return self.author

    def get_author_email(self):
        return self.author_email

    def get_maintainer(self):
        return self.maintainer

    def get_maintainer_email(self):
        return self.maintainer_email

    def get_contact(self):
        return self.maintainer or self.author

    def get_contact_email(self):
        return self.maintainer_email or self.author_email

    def get_url(self):
        return self.url

    def get_license(self):
        return self.license

    get_licence = get_license

    def get_description(self):
        return self.description

    def get_long_description(self):
        return self.long_description

    def get_keywords(self):
        return self.keywords or []

    def set_keywords(self, value):
        self.keywords = _ensure_list(value, 'keywords')

    def get_platforms(self):
        return self.platforms

    def set_platforms(self, value):
        self.platforms = _ensure_list(value, 'platforms')

    def get_classifiers(self):
        return self.classifiers or []

    def set_classifiers(self, value):
        self.classifiers = _ensure_list(value, 'classifiers')

    def get_download_url(self):
        return self.download_url

    # PEP 314
    def get_requires(self):
        return self.requires or []

    def set_requires(self, value):
        import distutils.versionpredicate

        for v in value:
            distutils.versionpredicate.VersionPredicate(v)
        self.requires = list(value)

    def get_provides(self):
        return self.provides or []

    def set_provides(self, value):
        value = [v.strip() for v in value]
        for v in value:
            import distutils.versionpredicate

            distutils.versionpredicate.split_provision(v)
        self.provides = value

    def get_obsoletes(self):
        return self.obsoletes or []

    def set_obsoletes(self, value):
        import distutils.versionpredicate

        for v in value:
            distutils.versionpredicate.VersionPredicate(v)
        self.obsoletes = list(value)


def fix_help_options(options):
    """Convert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    """
    new_options = []
    for help_tuple in options:
        new_options.append(help_tuple[0:3])
    return new_options
python3.12/site-packages/setuptools/_distutils/sysconfig.py000064400000044760151732703700020113 0ustar00"""Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
"""

import os
import re
import sys
import sysconfig
import pathlib

from .errors import DistutilsPlatformError
from . import py39compat
from ._functools import pass_none

IS_PYPY = '__pypy__' in sys.builtin_module_names

# These are needed in a couple of spots, so just compute them once.
PREFIX = os.path.normpath(sys.prefix)
EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
BASE_PREFIX = os.path.normpath(sys.base_prefix)
BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)

# Path to the base directory of the project. On Windows the binary may
# live in project/PCbuild/win32 or project/PCbuild/amd64.
# set for cross builds
if "_PYTHON_PROJECT_BASE" in os.environ:
    project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"])
else:
    if sys.executable:
        project_base = os.path.dirname(os.path.abspath(sys.executable))
    else:
        # sys.executable can be empty if argv[0] has been changed and Python is
        # unable to retrieve the real program name
        project_base = os.getcwd()


def _is_python_source_dir(d):
    """
    Return True if the target directory appears to point to an
    un-installed Python.
    """
    modules = pathlib.Path(d).joinpath('Modules')
    return any(modules.joinpath(fn).is_file() for fn in ('Setup', 'Setup.local'))


_sys_home = getattr(sys, '_home', None)


def _is_parent(dir_a, dir_b):
    """
    Return True if a is a parent of b.
    """
    return os.path.normcase(dir_a).startswith(os.path.normcase(dir_b))


if os.name == 'nt':

    @pass_none
    def _fix_pcbuild(d):
        # In a venv, sys._home will be inside BASE_PREFIX rather than PREFIX.
        prefixes = PREFIX, BASE_PREFIX
        matched = (
            prefix
            for prefix in prefixes
            if _is_parent(d, os.path.join(prefix, "PCbuild"))
        )
        return next(matched, d)

    project_base = _fix_pcbuild(project_base)
    _sys_home = _fix_pcbuild(_sys_home)


def _python_build():
    if _sys_home:
        return _is_python_source_dir(_sys_home)
    return _is_python_source_dir(project_base)


python_build = _python_build()


# Calculate the build qualifier flags if they are defined.  Adding the flags
# to the include and lib directories only makes sense for an installation, not
# an in-source build.
build_flags = ''
try:
    if not python_build:
        build_flags = sys.abiflags
except AttributeError:
    # It's not a configure-based build, so the sys module doesn't have
    # this attribute, which is fine.
    pass


def get_python_version():
    """Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    """
    return '%d.%d' % sys.version_info[:2]


def get_python_inc(plat_specific=0, prefix=None):
    """Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    """
    default_prefix = BASE_EXEC_PREFIX if plat_specific else BASE_PREFIX
    resolved_prefix = prefix if prefix is not None else default_prefix
    try:
        getter = globals()[f'_get_python_inc_{os.name}']
    except KeyError:
        raise DistutilsPlatformError(
            "I don't know where Python installs its C header files "
            "on platform '%s'" % os.name
        )
    return getter(resolved_prefix, prefix, plat_specific)


@pass_none
def _extant(path):
    """
    Replace path with None if it doesn't exist.
    """
    return path if os.path.exists(path) else None


def _get_python_inc_posix(prefix, spec_prefix, plat_specific):
    if IS_PYPY and sys.version_info < (3, 8):
        return os.path.join(prefix, 'include')
    return (
        _get_python_inc_posix_python(plat_specific)
        or _extant(_get_python_inc_from_config(plat_specific, spec_prefix))
        or _get_python_inc_posix_prefix(prefix)
    )


def _get_python_inc_posix_python(plat_specific):
    """
    Assume the executable is in the build directory. The
    pyconfig.h file should be in the same directory. Since
    the build directory may not be the source directory,
    use "srcdir" from the makefile to find the "Include"
    directory.
    """
    if not python_build:
        return
    if plat_specific:
        return _sys_home or project_base
    incdir = os.path.join(get_config_var('srcdir'), 'Include')
    return os.path.normpath(incdir)


def _get_python_inc_from_config(plat_specific, spec_prefix):
    """
    If no prefix was explicitly specified, provide the include
    directory from the config vars. Useful when
    cross-compiling, since the config vars may come from
    the host
    platform Python installation, while the current Python
    executable is from the build platform installation.

    >>> monkeypatch = getfixture('monkeypatch')
    >>> gpifc = _get_python_inc_from_config
    >>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower)
    >>> gpifc(False, '/usr/bin/')
    >>> gpifc(False, '')
    >>> gpifc(False, None)
    'includepy'
    >>> gpifc(True, None)
    'confincludepy'
    """
    if spec_prefix is None:
        return get_config_var('CONF' * plat_specific + 'INCLUDEPY')


def _get_python_inc_posix_prefix(prefix):
    implementation = 'pypy' if IS_PYPY else 'python'
    python_dir = implementation + get_python_version() + build_flags
    return os.path.join(prefix, "include", python_dir)


def _get_python_inc_nt(prefix, spec_prefix, plat_specific):
    if python_build:
        # Include both the include and PC dir to ensure we can find
        # pyconfig.h
        return (
            os.path.join(prefix, "include")
            + os.path.pathsep
            + os.path.join(prefix, "PC")
        )
    return os.path.join(prefix, "include")


# allow this behavior to be monkey-patched. Ref pypa/distutils#2.
def _posix_lib(standard_lib, libpython, early_prefix, prefix):
    if standard_lib:
        return libpython
    else:
        return os.path.join(libpython, "site-packages")


def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
    """Return the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    """

    if IS_PYPY and sys.version_info < (3, 8):
        # PyPy-specific schema
        if prefix is None:
            prefix = PREFIX
        if standard_lib:
            return os.path.join(prefix, "lib-python", sys.version[0])
        return os.path.join(prefix, 'site-packages')

    early_prefix = prefix

    if prefix is None:
        if standard_lib:
            prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
        else:
            prefix = plat_specific and EXEC_PREFIX or PREFIX

    if os.name == "posix":
        if plat_specific or standard_lib:
            # Platform-specific modules (any module from a non-pure-Python
            # module distribution) or standard Python library modules.
            libdir = getattr(sys, "platlibdir", "lib")
        else:
            # Pure Python
            libdir = "lib"
        implementation = 'pypy' if IS_PYPY else 'python'
        libpython = os.path.join(prefix, libdir, implementation + get_python_version())
        return _posix_lib(standard_lib, libpython, early_prefix, prefix)
    elif os.name == "nt":
        if standard_lib:
            return os.path.join(prefix, "Lib")
        else:
            return os.path.join(prefix, "Lib", "site-packages")
    else:
        raise DistutilsPlatformError(
            "I don't know where Python installs its library "
            "on platform '%s'" % os.name
        )


def customize_compiler(compiler):  # noqa: C901
    """Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    """
    if compiler.compiler_type == "unix":
        if sys.platform == "darwin":
            # Perform first-time customization of compiler-related
            # config vars on OS X now that we know we need a compiler.
            # This is primarily to support Pythons from binary
            # installers.  The kind and paths to build tools on
            # the user system may vary significantly from the system
            # that Python itself was built on.  Also the user OS
            # version and build tools may not support the same set
            # of CPU architectures for universal builds.
            global _config_vars
            # Use get_config_var() to ensure _config_vars is initialized.
            if not get_config_var('CUSTOMIZED_OSX_COMPILER'):
                import _osx_support

                _osx_support.customize_compiler(_config_vars)
                _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'

        (
            cc,
            cxx,
            cflags,
            ccshared,
            ldshared,
            shlib_suffix,
            ar,
            ar_flags,
        ) = get_config_vars(
            'CC',
            'CXX',
            'CFLAGS',
            'CCSHARED',
            'LDSHARED',
            'SHLIB_SUFFIX',
            'AR',
            'ARFLAGS',
        )

        if 'CC' in os.environ:
            newcc = os.environ['CC']
            if 'LDSHARED' not in os.environ and ldshared.startswith(cc):
                # If CC is overridden, use that as the default
                #       command for LDSHARED as well
                ldshared = newcc + ldshared[len(cc) :]
            cc = newcc
        if 'CXX' in os.environ:
            cxx = os.environ['CXX']
        if 'LDSHARED' in os.environ:
            ldshared = os.environ['LDSHARED']
        if 'CPP' in os.environ:
            cpp = os.environ['CPP']
        else:
            cpp = cc + " -E"  # not always
        if 'LDFLAGS' in os.environ:
            ldshared = ldshared + ' ' + os.environ['LDFLAGS']
        if 'CFLAGS' in os.environ:
            cflags = cflags + ' ' + os.environ['CFLAGS']
            ldshared = ldshared + ' ' + os.environ['CFLAGS']
        if 'CPPFLAGS' in os.environ:
            cpp = cpp + ' ' + os.environ['CPPFLAGS']
            cflags = cflags + ' ' + os.environ['CPPFLAGS']
            ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
        if 'AR' in os.environ:
            ar = os.environ['AR']
        if 'ARFLAGS' in os.environ:
            archiver = ar + ' ' + os.environ['ARFLAGS']
        else:
            archiver = ar + ' ' + ar_flags

        cc_cmd = cc + ' ' + cflags
        compiler.set_executables(
            preprocessor=cpp,
            compiler=cc_cmd,
            compiler_so=cc_cmd + ' ' + ccshared,
            compiler_cxx=cxx,
            linker_so=ldshared,
            linker_exe=cc,
            archiver=archiver,
        )

        if 'RANLIB' in os.environ and compiler.executables.get('ranlib', None):
            compiler.set_executables(ranlib=os.environ['RANLIB'])

        compiler.shared_lib_extension = shlib_suffix


def get_config_h_filename():
    """Return full pathname of installed pyconfig.h file."""
    if python_build:
        if os.name == "nt":
            inc_dir = os.path.join(_sys_home or project_base, "PC")
        else:
            inc_dir = _sys_home or project_base
        return os.path.join(inc_dir, 'pyconfig.h')
    else:
        return sysconfig.get_config_h_filename()


def get_makefile_filename():
    """Return full pathname of installed Makefile from the Python build."""
    return sysconfig.get_makefile_filename()


def parse_config_h(fp, g=None):
    """Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    return sysconfig.parse_config_h(fp, vars=g)


# Regexes needed for parsing Makefile (and similar syntaxes,
# like old-style Setup files).
_variable_rx = re.compile(r"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
_findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
_findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")


def parse_makefile(fn, g=None):  # noqa: C901
    """Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    from distutils.text_file import TextFile

    fp = TextFile(
        fn, strip_comments=1, skip_blanks=1, join_lines=1, errors="surrogateescape"
    )

    if g is None:
        g = {}
    done = {}
    notdone = {}

    while True:
        line = fp.readline()
        if line is None:  # eof
            break
        m = _variable_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            v = v.strip()
            # `$$' is a literal `$' in make
            tmpv = v.replace('$$', '')

            if "$" in tmpv:
                notdone[n] = v
            else:
                try:
                    v = int(v)
                except ValueError:
                    # insert literal `$'
                    done[n] = v.replace('$$', '$')
                else:
                    done[n] = v

    # Variables with a 'PY_' prefix in the makefile. These need to
    # be made available without that prefix through sysconfig.
    # Special care is needed to ensure that variable expansion works, even
    # if the expansion uses the name without a prefix.
    renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')

    # do variable interpolation here
    while notdone:
        for name in list(notdone):
            value = notdone[name]
            m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
            if m:
                n = m.group(1)
                found = True
                if n in done:
                    item = str(done[n])
                elif n in notdone:
                    # get it on a subsequent round
                    found = False
                elif n in os.environ:
                    # do it like make: fall back to environment
                    item = os.environ[n]

                elif n in renamed_variables:
                    if name.startswith('PY_') and name[3:] in renamed_variables:
                        item = ""

                    elif 'PY_' + n in notdone:
                        found = False

                    else:
                        item = str(done['PY_' + n])
                else:
                    done[n] = item = ""
                if found:
                    after = value[m.end() :]
                    value = value[: m.start()] + item + after
                    if "$" in after:
                        notdone[name] = value
                    else:
                        try:
                            value = int(value)
                        except ValueError:
                            done[name] = value.strip()
                        else:
                            done[name] = value
                        del notdone[name]

                        if name.startswith('PY_') and name[3:] in renamed_variables:
                            name = name[3:]
                            if name not in done:
                                done[name] = value
            else:
                # bogus variable reference; just drop it since we can't deal
                del notdone[name]

    fp.close()

    # strip spurious spaces
    for k, v in done.items():
        if isinstance(v, str):
            done[k] = v.strip()

    # save the results in the global dictionary
    g.update(done)
    return g


def expand_makefile_vars(s, vars):
    """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    """

    # This algorithm does multiple expansion, so if vars['foo'] contains
    # "${bar}", it will expand ${foo} to ${bar}, and then expand
    # ${bar}... and so forth.  This is fine as long as 'vars' comes from
    # 'parse_makefile()', which takes care of such expansions eagerly,
    # according to make's variable expansion semantics.

    while True:
        m = _findvar1_rx.search(s) or _findvar2_rx.search(s)
        if m:
            (beg, end) = m.span()
            s = s[0:beg] + vars.get(m.group(1)) + s[end:]
        else:
            break
    return s


_config_vars = None


def get_config_vars(*args):
    """With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    """
    global _config_vars
    if _config_vars is None:
        _config_vars = sysconfig.get_config_vars().copy()
        py39compat.add_ext_suffix(_config_vars)

    return [_config_vars.get(name) for name in args] if args else _config_vars


def get_config_var(name):
    """Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    """
    if name == 'SO':
        import warnings

        warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning, 2)
    return get_config_vars().get(name)
python3.12/site-packages/setuptools/_distutils/ccompiler.py000064400000137004151732703700020056 0ustar00"""distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model."""

import sys
import os
import re
import warnings

from .errors import (
    CompileError,
    LinkError,
    UnknownFileError,
    DistutilsPlatformError,
    DistutilsModuleError,
)
from .spawn import spawn
from .file_util import move_file
from .dir_util import mkpath
from ._modified import newer_group
from .util import split_quoted, execute
from ._log import log


class CCompiler:
    """Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    """

    # 'compiler_type' is a class attribute that identifies this class.  It
    # keeps code that wants to know what kind of compiler it's dealing with
    # from having to import all possible compiler classes just to do an
    # 'isinstance'.  In concrete CCompiler subclasses, 'compiler_type'
    # should really, really be one of the keys of the 'compiler_class'
    # dictionary (see below -- used by the 'new_compiler()' factory
    # function) -- authors of new compiler interface classes are
    # responsible for updating 'compiler_class'!
    compiler_type = None

    # XXX things not handled by this compiler abstraction model:
    #   * client can't provide additional options for a compiler,
    #     e.g. warning, optimization, debugging flags.  Perhaps this
    #     should be the domain of concrete compiler abstraction classes
    #     (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base
    #     class should have methods for the common ones.
    #   * can't completely override the include or library searchg
    #     path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2".
    #     I'm not sure how widely supported this is even by Unix
    #     compilers, much less on other platforms.  And I'm even less
    #     sure how useful it is; maybe for cross-compiling, but
    #     support for that is a ways off.  (And anyways, cross
    #     compilers probably have a dedicated binary with the
    #     right paths compiled in.  I hope.)
    #   * can't do really freaky things with the library list/library
    #     dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against
    #     different versions of libfoo.a in different locations.  I
    #     think this is useless without the ability to null out the
    #     library search path anyways.

    # Subclasses that rely on the standard filename generation methods
    # implemented below should override these; see the comment near
    # those methods ('object_filenames()' et. al.) for details:
    src_extensions = None  # list of strings
    obj_extension = None  # string
    static_lib_extension = None
    shared_lib_extension = None  # string
    static_lib_format = None  # format string
    shared_lib_format = None  # prob. same as static_lib_format
    exe_extension = None  # string

    # Default language settings. language_map is used to detect a source
    # file or Extension target language, checking source filenames.
    # language_order is used to detect the language precedence, when deciding
    # what language to use when mixing source types. For example, if some
    # extension has two files with ".c" extension, and one with ".cpp", it
    # is still linked as c++.
    language_map = {
        ".c": "c",
        ".cc": "c++",
        ".cpp": "c++",
        ".cxx": "c++",
        ".m": "objc",
    }
    language_order = ["c++", "objc", "c"]

    include_dirs = []
    """
    include dirs specific to this compiler class
    """

    library_dirs = []
    """
    library dirs specific to this compiler class
    """

    def __init__(self, verbose=0, dry_run=0, force=0):
        self.dry_run = dry_run
        self.force = force
        self.verbose = verbose

        # 'output_dir': a common output directory for object, library,
        # shared object, and shared library files
        self.output_dir = None

        # 'macros': a list of macro definitions (or undefinitions).  A
        # macro definition is a 2-tuple (name, value), where the value is
        # either a string or None (no explicit value).  A macro
        # undefinition is a 1-tuple (name,).
        self.macros = []

        # 'include_dirs': a list of directories to search for include files
        self.include_dirs = []

        # 'libraries': a list of libraries to include in any link
        # (library names, not filenames: eg. "foo" not "libfoo.a")
        self.libraries = []

        # 'library_dirs': a list of directories to search for libraries
        self.library_dirs = []

        # 'runtime_library_dirs': a list of directories to search for
        # shared libraries/objects at runtime
        self.runtime_library_dirs = []

        # 'objects': a list of object files (or similar, such as explicitly
        # named library files) to include on any link
        self.objects = []

        for key in self.executables.keys():
            self.set_executable(key, self.executables[key])

    def set_executables(self, **kwargs):
        """Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        """

        # Note that some CCompiler implementation classes will define class
        # attributes 'cpp', 'cc', etc. with hard-coded executable names;
        # this is appropriate when a compiler class is for exactly one
        # compiler/OS combination (eg. MSVCCompiler).  Other compiler
        # classes (UnixCCompiler, in particular) are driven by information
        # discovered at run-time, since there are many different ways to do
        # basically the same things with Unix C compilers.

        for key in kwargs:
            if key not in self.executables:
                raise ValueError(
                    "unknown executable '%s' for class %s"
                    % (key, self.__class__.__name__)
                )
            self.set_executable(key, kwargs[key])

    def set_executable(self, key, value):
        if isinstance(value, str):
            setattr(self, key, split_quoted(value))
        else:
            setattr(self, key, value)

    def _find_macro(self, name):
        i = 0
        for defn in self.macros:
            if defn[0] == name:
                return i
            i += 1
        return None

    def _check_macro_definitions(self, definitions):
        """Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        """
        for defn in definitions:
            if not (
                isinstance(defn, tuple)
                and (
                    len(defn) in (1, 2)
                    and (isinstance(defn[1], str) or defn[1] is None)
                )
                and isinstance(defn[0], str)
            ):
                raise TypeError(
                    ("invalid macro definition '%s': " % defn)
                    + "must be tuple (string,), (string, string), or "
                    + "(string, None)"
                )

    # -- Bookkeeping methods -------------------------------------------

    def define_macro(self, name, value=None):
        """Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        """
        # Delete from the list of macro definitions/undefinitions if
        # already there (so that this one will take precedence).
        i = self._find_macro(name)
        if i is not None:
            del self.macros[i]

        self.macros.append((name, value))

    def undefine_macro(self, name):
        """Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        """
        # Delete from the list of macro definitions/undefinitions if
        # already there (so that this one will take precedence).
        i = self._find_macro(name)
        if i is not None:
            del self.macros[i]

        undefn = (name,)
        self.macros.append(undefn)

    def add_include_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        """
        self.include_dirs.append(dir)

    def set_include_dirs(self, dirs):
        """Set the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        """
        self.include_dirs = dirs[:]

    def add_library(self, libname):
        """Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        """
        self.libraries.append(libname)

    def set_libraries(self, libnames):
        """Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        """
        self.libraries = libnames[:]

    def add_library_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        """
        self.library_dirs.append(dir)

    def set_library_dirs(self, dirs):
        """Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        """
        self.library_dirs = dirs[:]

    def add_runtime_library_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        """
        self.runtime_library_dirs.append(dir)

    def set_runtime_library_dirs(self, dirs):
        """Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        """
        self.runtime_library_dirs = dirs[:]

    def add_link_object(self, object):
        """Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        """
        self.objects.append(object)

    def set_link_objects(self, objects):
        """Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        """
        self.objects = objects[:]

    # -- Private utility methods --------------------------------------
    # (here for the convenience of subclasses)

    # Helper method to prep compiler in subclass compile() methods

    def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra):
        """Process arguments and decide which source files to compile."""
        outdir, macros, incdirs = self._fix_compile_args(outdir, macros, incdirs)

        if extra is None:
            extra = []

        # Get the list of expected output (object) files
        objects = self.object_filenames(sources, strip_dir=0, output_dir=outdir)
        assert len(objects) == len(sources)

        pp_opts = gen_preprocess_options(macros, incdirs)

        build = {}
        for i in range(len(sources)):
            src = sources[i]
            obj = objects[i]
            ext = os.path.splitext(src)[1]
            self.mkpath(os.path.dirname(obj))
            build[obj] = (src, ext)

        return macros, objects, extra, pp_opts, build

    def _get_cc_args(self, pp_opts, debug, before):
        # works for unixccompiler, cygwinccompiler
        cc_args = pp_opts + ['-c']
        if debug:
            cc_args[:0] = ['-g']
        if before:
            cc_args[:0] = before
        return cc_args

    def _fix_compile_args(self, output_dir, macros, include_dirs):
        """Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        """
        if output_dir is None:
            output_dir = self.output_dir
        elif not isinstance(output_dir, str):
            raise TypeError("'output_dir' must be a string or None")

        if macros is None:
            macros = self.macros
        elif isinstance(macros, list):
            macros = macros + (self.macros or [])
        else:
            raise TypeError("'macros' (if supplied) must be a list of tuples")

        if include_dirs is None:
            include_dirs = list(self.include_dirs)
        elif isinstance(include_dirs, (list, tuple)):
            include_dirs = list(include_dirs) + (self.include_dirs or [])
        else:
            raise TypeError("'include_dirs' (if supplied) must be a list of strings")

        # add include dirs for class
        include_dirs += self.__class__.include_dirs

        return output_dir, macros, include_dirs

    def _prep_compile(self, sources, output_dir, depends=None):
        """Decide which source files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        """
        # Get the list of expected output (object) files
        objects = self.object_filenames(sources, output_dir=output_dir)
        assert len(objects) == len(sources)

        # Return an empty dict for the "which source files can be skipped"
        # return value to preserve API compatibility.
        return objects, {}

    def _fix_object_args(self, objects, output_dir):
        """Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        """
        if not isinstance(objects, (list, tuple)):
            raise TypeError("'objects' must be a list or tuple of strings")
        objects = list(objects)

        if output_dir is None:
            output_dir = self.output_dir
        elif not isinstance(output_dir, str):
            raise TypeError("'output_dir' must be a string or None")

        return (objects, output_dir)

    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
        """Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        """
        if libraries is None:
            libraries = self.libraries
        elif isinstance(libraries, (list, tuple)):
            libraries = list(libraries) + (self.libraries or [])
        else:
            raise TypeError("'libraries' (if supplied) must be a list of strings")

        if library_dirs is None:
            library_dirs = self.library_dirs
        elif isinstance(library_dirs, (list, tuple)):
            library_dirs = list(library_dirs) + (self.library_dirs or [])
        else:
            raise TypeError("'library_dirs' (if supplied) must be a list of strings")

        # add library dirs for class
        library_dirs += self.__class__.library_dirs

        if runtime_library_dirs is None:
            runtime_library_dirs = self.runtime_library_dirs
        elif isinstance(runtime_library_dirs, (list, tuple)):
            runtime_library_dirs = list(runtime_library_dirs) + (
                self.runtime_library_dirs or []
            )
        else:
            raise TypeError(
                "'runtime_library_dirs' (if supplied) " "must be a list of strings"
            )

        return (libraries, library_dirs, runtime_library_dirs)

    def _need_link(self, objects, output_file):
        """Return true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        """
        if self.force:
            return True
        else:
            if self.dry_run:
                newer = newer_group(objects, output_file, missing='newer')
            else:
                newer = newer_group(objects, output_file)
            return newer

    def detect_language(self, sources):
        """Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        """
        if not isinstance(sources, list):
            sources = [sources]
        lang = None
        index = len(self.language_order)
        for source in sources:
            base, ext = os.path.splitext(source)
            extlang = self.language_map.get(ext)
            try:
                extindex = self.language_order.index(extlang)
                if extindex < index:
                    lang = extlang
                    index = extindex
            except ValueError:
                pass
        return lang

    # -- Worker methods ------------------------------------------------
    # (must be implemented by subclasses)

    def preprocess(
        self,
        source,
        output_file=None,
        macros=None,
        include_dirs=None,
        extra_preargs=None,
        extra_postargs=None,
    ):
        """Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        """
        pass

    def compile(
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):
        """Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepend/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        """
        # A concrete compiler class can either override this method
        # entirely or implement _compile().
        macros, objects, extra_postargs, pp_opts, build = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)

        # Return *all* object filenames, not just the ones we just built.
        return objects

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        """Compile 'src' to product 'obj'."""
        # A concrete compiler class that does not override compile()
        # should implement _compile().
        pass

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):
        """Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        """
        pass

    # values for target_desc parameter in link()
    SHARED_OBJECT = "shared_object"
    SHARED_LIBRARY = "shared_library"
    EXECUTABLE = "executable"

    def link(
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        """Link a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        """
        raise NotImplementedError

    # Old 'link_*()' methods, rewritten to use the new 'link()' method.

    def link_shared_lib(
        self,
        objects,
        output_libname,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        self.link(
            CCompiler.SHARED_LIBRARY,
            objects,
            self.library_filename(output_libname, lib_type='shared'),
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            export_symbols,
            debug,
            extra_preargs,
            extra_postargs,
            build_temp,
            target_lang,
        )

    def link_shared_object(
        self,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        self.link(
            CCompiler.SHARED_OBJECT,
            objects,
            output_filename,
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            export_symbols,
            debug,
            extra_preargs,
            extra_postargs,
            build_temp,
            target_lang,
        )

    def link_executable(
        self,
        objects,
        output_progname,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        target_lang=None,
    ):
        self.link(
            CCompiler.EXECUTABLE,
            objects,
            self.executable_filename(output_progname),
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            None,
            debug,
            extra_preargs,
            extra_postargs,
            None,
            target_lang,
        )

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function; there is
    # no appropriate default implementation so subclasses should
    # implement all of these.

    def library_dir_option(self, dir):
        """Return the compiler option to add 'dir' to the list of
        directories searched for libraries.
        """
        raise NotImplementedError

    def runtime_library_dir_option(self, dir):
        """Return the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        """
        raise NotImplementedError

    def library_option(self, lib):
        """Return the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        """
        raise NotImplementedError

    def has_function(  # noqa: C901
        self,
        funcname,
        includes=None,
        include_dirs=None,
        libraries=None,
        library_dirs=None,
    ):
        """Return a boolean indicating whether funcname is provided as
        a symbol on the current platform.  The optional arguments can
        be used to augment the compilation environment.

        The libraries argument is a list of flags to be passed to the
        linker to make additional symbol definitions available for
        linking.

        The includes and include_dirs arguments are deprecated.
        Usually, supplying include files with function declarations
        will cause function detection to fail even in cases where the
        symbol is available for linking.

        """
        # this can't be included at module scope because it tries to
        # import math which might not be available at that point - maybe
        # the necessary logic should just be inlined?
        import tempfile

        if includes is None:
            includes = []
        else:
            warnings.warn("includes is deprecated", DeprecationWarning)
        if include_dirs is None:
            include_dirs = []
        else:
            warnings.warn("include_dirs is deprecated", DeprecationWarning)
        if libraries is None:
            libraries = []
        if library_dirs is None:
            library_dirs = []
        fd, fname = tempfile.mkstemp(".c", funcname, text=True)
        f = os.fdopen(fd, "w")
        try:
            for incl in includes:
                f.write("""#include "%s"\n""" % incl)
            if not includes:
                # Use "char func(void);" as the prototype to follow
                # what autoconf does.  This prototype does not match
                # any well-known function the compiler might recognize
                # as a builtin, so this ends up as a true link test.
                # Without a fake prototype, the test would need to
                # know the exact argument types, and the has_function
                # interface does not provide that level of information.
                f.write(
                    """\
#ifdef __cplusplus
extern "C"
#endif
char %s(void);
"""
                    % funcname
                )
            f.write(
                """\
int main (int argc, char **argv) {
    %s();
    return 0;
}
"""
                % funcname
            )
        finally:
            f.close()
        try:
            objects = self.compile([fname], include_dirs=include_dirs)
        except CompileError:
            return False
        finally:
            os.remove(fname)

        try:
            self.link_executable(
                objects, "a.out", libraries=libraries, library_dirs=library_dirs
            )
        except (LinkError, TypeError):
            return False
        else:
            os.remove(
                self.executable_filename("a.out", output_dir=self.output_dir or '')
            )
        finally:
            for fn in objects:
                os.remove(fn)
        return True

    def find_library_file(self, dirs, lib, debug=0):
        """Search the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        """
        raise NotImplementedError

    # -- Filename generation methods -----------------------------------

    # The default implementation of the filename generating methods are
    # prejudiced towards the Unix/DOS/Windows view of the world:
    #   * object files are named by replacing the source file extension
    #     (eg. .c/.cpp -> .o/.obj)
    #   * library files (shared or static) are named by plugging the
    #     library name and extension into a format string, eg.
    #     "lib%s.%s" % (lib_name, ".a") for Unix static libraries
    #   * executables are named by appending an extension (possibly
    #     empty) to the program name: eg. progname + ".exe" for
    #     Windows
    #
    # To reduce redundant code, these methods expect to find
    # several attributes in the current object (presumably defined
    # as class attributes):
    #   * src_extensions -
    #     list of C/C++ source file extensions, eg. ['.c', '.cpp']
    #   * obj_extension -
    #     object file extension, eg. '.o' or '.obj'
    #   * static_lib_extension -
    #     extension for static library files, eg. '.a' or '.lib'
    #   * shared_lib_extension -
    #     extension for shared library/object files, eg. '.so', '.dll'
    #   * static_lib_format -
    #     format string for generating static library filenames,
    #     eg. 'lib%s.%s' or '%s.%s'
    #   * shared_lib_format
    #     format string for generating shared library filenames
    #     (probably same as static_lib_format, since the extension
    #     is one of the intended parameters to the format string)
    #   * exe_extension -
    #     extension for executable files, eg. '' or '.exe'

    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        if output_dir is None:
            output_dir = ''
        return list(
            self._make_out_path(output_dir, strip_dir, src_name)
            for src_name in source_filenames
        )

    @property
    def out_extensions(self):
        return dict.fromkeys(self.src_extensions, self.obj_extension)

    def _make_out_path(self, output_dir, strip_dir, src_name):
        base, ext = os.path.splitext(src_name)
        base = self._make_relative(base)
        try:
            new_ext = self.out_extensions[ext]
        except LookupError:
            raise UnknownFileError(
                "unknown file type '{}' (from '{}')".format(ext, src_name)
            )
        if strip_dir:
            base = os.path.basename(base)
        return os.path.join(output_dir, base + new_ext)

    @staticmethod
    def _make_relative(base):
        """
        In order to ensure that a filename always honors the
        indicated output_dir, make sure it's relative.
        Ref python/cpython#37775.
        """
        # Chop off the drive
        no_drive = os.path.splitdrive(base)[1]
        # If abs, chop off leading /
        return no_drive[os.path.isabs(no_drive) :]

    def shared_object_filename(self, basename, strip_dir=0, output_dir=''):
        assert output_dir is not None
        if strip_dir:
            basename = os.path.basename(basename)
        return os.path.join(output_dir, basename + self.shared_lib_extension)

    def executable_filename(self, basename, strip_dir=0, output_dir=''):
        assert output_dir is not None
        if strip_dir:
            basename = os.path.basename(basename)
        return os.path.join(output_dir, basename + (self.exe_extension or ''))

    def library_filename(
        self, libname, lib_type='static', strip_dir=0, output_dir=''  # or 'shared'
    ):
        assert output_dir is not None
        expected = '"static", "shared", "dylib", "xcode_stub"'
        if lib_type not in eval(expected):
            raise ValueError(f"'lib_type' must be {expected}")
        fmt = getattr(self, lib_type + "_lib_format")
        ext = getattr(self, lib_type + "_lib_extension")

        dir, base = os.path.split(libname)
        filename = fmt % (base, ext)
        if strip_dir:
            dir = ''

        return os.path.join(output_dir, dir, filename)

    # -- Utility methods -----------------------------------------------

    def announce(self, msg, level=1):
        log.debug(msg)

    def debug_print(self, msg):
        from distutils.debug import DEBUG

        if DEBUG:
            print(msg)

    def warn(self, msg):
        sys.stderr.write("warning: %s\n" % msg)

    def execute(self, func, args, msg=None, level=1):
        execute(func, args, msg, self.dry_run)

    def spawn(self, cmd, **kwargs):
        spawn(cmd, dry_run=self.dry_run, **kwargs)

    def move_file(self, src, dst):
        return move_file(src, dst, dry_run=self.dry_run)

    def mkpath(self, name, mode=0o777):
        mkpath(name, mode, dry_run=self.dry_run)


# Map a sys.platform/os.name ('posix', 'nt') to the default compiler
# type for that platform. Keys are interpreted as re match
# patterns. Order is important; platform mappings are preferred over
# OS names.
_default_compilers = (
    # Platform string mappings
    # on a cygwin built python we can use gcc like an ordinary UNIXish
    # compiler
    ('cygwin.*', 'unix'),
    # OS name mappings
    ('posix', 'unix'),
    ('nt', 'msvc'),
)


def get_default_compiler(osname=None, platform=None):
    """Determine the default compiler to use for the given platform.

    osname should be one of the standard Python OS names (i.e. the
    ones returned by os.name) and platform the common value
    returned by sys.platform for the platform in question.

    The default values are os.name and sys.platform in case the
    parameters are not given.
    """
    if osname is None:
        osname = os.name
    if platform is None:
        platform = sys.platform
    for pattern, compiler in _default_compilers:
        if (
            re.match(pattern, platform) is not None
            or re.match(pattern, osname) is not None
        ):
            return compiler
    # Default to Unix compiler
    return 'unix'


# Map compiler types to (module_name, class_name) pairs -- ie. where to
# find the code that implements an interface to this compiler.  (The module
# is assumed to be in the 'distutils' package.)
compiler_class = {
    'unix': ('unixccompiler', 'UnixCCompiler', "standard UNIX-style compiler"),
    'msvc': ('_msvccompiler', 'MSVCCompiler', "Microsoft Visual C++"),
    'cygwin': (
        'cygwinccompiler',
        'CygwinCCompiler',
        "Cygwin port of GNU C Compiler for Win32",
    ),
    'mingw32': (
        'cygwinccompiler',
        'Mingw32CCompiler',
        "Mingw32 port of GNU C Compiler for Win32",
    ),
    'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"),
}


def show_compilers():
    """Print list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    """
    # XXX this "knows" that the compiler option it's describing is
    # "--compiler", which just happens to be the case for the three
    # commands that use it.
    from distutils.fancy_getopt import FancyGetopt

    compilers = []
    for compiler in compiler_class.keys():
        compilers.append(("compiler=" + compiler, None, compiler_class[compiler][2]))
    compilers.sort()
    pretty_printer = FancyGetopt(compilers)
    pretty_printer.print_help("List of available compilers:")


def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0):
    """Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    """
    if plat is None:
        plat = os.name

    try:
        if compiler is None:
            compiler = get_default_compiler(plat)

        (module_name, class_name, long_description) = compiler_class[compiler]
    except KeyError:
        msg = "don't know how to compile C/C++ code on platform '%s'" % plat
        if compiler is not None:
            msg = msg + " with '%s' compiler" % compiler
        raise DistutilsPlatformError(msg)

    try:
        module_name = "distutils." + module_name
        __import__(module_name)
        module = sys.modules[module_name]
        klass = vars(module)[class_name]
    except ImportError:
        raise DistutilsModuleError(
            "can't compile C/C++ code: unable to load module '%s'" % module_name
        )
    except KeyError:
        raise DistutilsModuleError(
            "can't compile C/C++ code: unable to find class '%s' "
            "in module '%s'" % (class_name, module_name)
        )

    # XXX The None is necessary to preserve backwards compatibility
    # with classes that expect verbose to be the first positional
    # argument.
    return klass(None, dry_run, force)


def gen_preprocess_options(macros, include_dirs):
    """Generate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    """
    # XXX it would be nice (mainly aesthetic, and so we don't generate
    # stupid-looking command lines) to go over 'macros' and eliminate
    # redundant definitions/undefinitions (ie. ensure that only the
    # latest mention of a particular macro winds up on the command
    # line).  I don't think it's essential, though, since most (all?)
    # Unix C compilers only pay attention to the latest -D or -U
    # mention of a macro on their command line.  Similar situation for
    # 'include_dirs'.  I'm punting on both for now.  Anyways, weeding out
    # redundancies like this should probably be the province of
    # CCompiler, since the data structures used are inherited from it
    # and therefore common to all CCompiler classes.
    pp_opts = []
    for macro in macros:
        if not (isinstance(macro, tuple) and 1 <= len(macro) <= 2):
            raise TypeError(
                "bad macro definition '%s': "
                "each element of 'macros' list must be a 1- or 2-tuple" % macro
            )

        if len(macro) == 1:  # undefine this macro
            pp_opts.append("-U%s" % macro[0])
        elif len(macro) == 2:
            if macro[1] is None:  # define with no explicit value
                pp_opts.append("-D%s" % macro[0])
            else:
                # XXX *don't* need to be clever about quoting the
                # macro value here, because we're going to avoid the
                # shell at all costs when we spawn the command!
                pp_opts.append("-D%s=%s" % macro)

    for dir in include_dirs:
        pp_opts.append("-I%s" % dir)
    return pp_opts


def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries):
    """Generate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    """
    lib_opts = []

    for dir in library_dirs:
        lib_opts.append(compiler.library_dir_option(dir))

    for dir in runtime_library_dirs:
        opt = compiler.runtime_library_dir_option(dir)
        if isinstance(opt, list):
            lib_opts = lib_opts + opt
        else:
            lib_opts.append(opt)

    # XXX it's important that we *not* remove redundant library mentions!
    # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to
    # resolve all symbols.  I just hope we never have to say "-lfoo obj.o
    # -lbar" to get things to work -- that's certainly a possibility, but a
    # pretty nasty way to arrange your C code.

    for lib in libraries:
        (lib_dir, lib_name) = os.path.split(lib)
        if lib_dir:
            lib_file = compiler.find_library_file([lib_dir], lib_name)
            if lib_file:
                lib_opts.append(lib_file)
            else:
                compiler.warn(
                    "no library file corresponding to " "'%s' found (skipping)" % lib
                )
        else:
            lib_opts.append(compiler.library_option(lib))
    return lib_opts
python3.12/site-packages/setuptools/_distutils/extension.py000064400000024036151732703700020115 0ustar00"""distutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts."""

import os
import warnings

# This class is really only used by the "build_ext" command, so it might
# make sense to put it in distutils.command.build_ext.  However, that
# module is already big enough, and I want to make this class a bit more
# complex to simplify some common cases ("foo" module in "foo.c") and do
# better error-checking ("foo.c" actually exists).
#
# Also, putting this in build_ext.py means every setup script would have to
# import that large-ish module (indirectly, through distutils.core) in
# order to do anything.


class Extension:
    """Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    """

    # When adding arguments to this constructor, be sure to update
    # setup_keywords in core.py.
    def __init__(
        self,
        name,
        sources,
        include_dirs=None,
        define_macros=None,
        undef_macros=None,
        library_dirs=None,
        libraries=None,
        runtime_library_dirs=None,
        extra_objects=None,
        extra_compile_args=None,
        extra_link_args=None,
        export_symbols=None,
        swig_opts=None,
        depends=None,
        language=None,
        optional=None,
        **kw  # To catch unknown keywords
    ):
        if not isinstance(name, str):
            raise AssertionError("'name' must be a string")
        if not (isinstance(sources, list) and all(isinstance(v, str) for v in sources)):
            raise AssertionError("'sources' must be a list of strings")

        self.name = name
        self.sources = sources
        self.include_dirs = include_dirs or []
        self.define_macros = define_macros or []
        self.undef_macros = undef_macros or []
        self.library_dirs = library_dirs or []
        self.libraries = libraries or []
        self.runtime_library_dirs = runtime_library_dirs or []
        self.extra_objects = extra_objects or []
        self.extra_compile_args = extra_compile_args or []
        self.extra_link_args = extra_link_args or []
        self.export_symbols = export_symbols or []
        self.swig_opts = swig_opts or []
        self.depends = depends or []
        self.language = language
        self.optional = optional

        # If there are unknown keyword options, warn about them
        if len(kw) > 0:
            options = [repr(option) for option in kw]
            options = ', '.join(sorted(options))
            msg = "Unknown Extension options: %s" % options
            warnings.warn(msg)

    def __repr__(self):
        return '<{}.{}({!r}) at {:#x}>'.format(
            self.__class__.__module__,
            self.__class__.__qualname__,
            self.name,
            id(self),
        )


def read_setup_file(filename):  # noqa: C901
    """Reads a Setup file and returns Extension instances."""
    from distutils.sysconfig import parse_makefile, expand_makefile_vars, _variable_rx

    from distutils.text_file import TextFile
    from distutils.util import split_quoted

    # First pass over the file to gather "VAR = VALUE" assignments.
    vars = parse_makefile(filename)

    # Second pass to gobble up the real content: lines of the form
    #   <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
    file = TextFile(
        filename,
        strip_comments=1,
        skip_blanks=1,
        join_lines=1,
        lstrip_ws=1,
        rstrip_ws=1,
    )
    try:
        extensions = []

        while True:
            line = file.readline()
            if line is None:  # eof
                break
            if _variable_rx.match(line):  # VAR=VALUE, handled in first pass
                continue

            if line[0] == line[-1] == "*":
                file.warn("'%s' lines not handled yet" % line)
                continue

            line = expand_makefile_vars(line, vars)
            words = split_quoted(line)

            # NB. this parses a slightly different syntax than the old
            # makesetup script: here, there must be exactly one extension per
            # line, and it must be the first word of the line.  I have no idea
            # why the old syntax supported multiple extensions per line, as
            # they all wind up being the same.

            module = words[0]
            ext = Extension(module, [])
            append_next_word = None

            for word in words[1:]:
                if append_next_word is not None:
                    append_next_word.append(word)
                    append_next_word = None
                    continue

                suffix = os.path.splitext(word)[1]
                switch = word[0:2]
                value = word[2:]

                if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"):
                    # hmm, should we do something about C vs. C++ sources?
                    # or leave it up to the CCompiler implementation to
                    # worry about?
                    ext.sources.append(word)
                elif switch == "-I":
                    ext.include_dirs.append(value)
                elif switch == "-D":
                    equals = value.find("=")
                    if equals == -1:  # bare "-DFOO" -- no value
                        ext.define_macros.append((value, None))
                    else:  # "-DFOO=blah"
                        ext.define_macros.append((value[0:equals], value[equals + 2 :]))
                elif switch == "-U":
                    ext.undef_macros.append(value)
                elif switch == "-C":  # only here 'cause makesetup has it!
                    ext.extra_compile_args.append(word)
                elif switch == "-l":
                    ext.libraries.append(value)
                elif switch == "-L":
                    ext.library_dirs.append(value)
                elif switch == "-R":
                    ext.runtime_library_dirs.append(value)
                elif word == "-rpath":
                    append_next_word = ext.runtime_library_dirs
                elif word == "-Xlinker":
                    append_next_word = ext.extra_link_args
                elif word == "-Xcompiler":
                    append_next_word = ext.extra_compile_args
                elif switch == "-u":
                    ext.extra_link_args.append(word)
                    if not value:
                        append_next_word = ext.extra_link_args
                elif suffix in (".a", ".so", ".sl", ".o", ".dylib"):
                    # NB. a really faithful emulation of makesetup would
                    # append a .o file to extra_objects only if it
                    # had a slash in it; otherwise, it would s/.o/.c/
                    # and append it to sources.  Hmmmm.
                    ext.extra_objects.append(word)
                else:
                    file.warn("unrecognized argument '%s'" % word)

            extensions.append(ext)
    finally:
        file.close()

    return extensions
python3.12/site-packages/setuptools/_distutils/file_util.py000064400000020025151732703700020047 0ustar00"""distutils.file_util

Utility functions for operating on single files.
"""

import os
from .errors import DistutilsFileError
from ._log import log

# for generating verbose output in 'copy_file()'
_copy_action = {None: 'copying', 'hard': 'hard linking', 'sym': 'symbolically linking'}


def _copy_file_contents(src, dst, buffer_size=16 * 1024):  # noqa: C901
    """Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    """
    # Stolen from shutil module in the standard library, but with
    # custom error-handling added.
    fsrc = None
    fdst = None
    try:
        try:
            fsrc = open(src, 'rb')
        except OSError as e:
            raise DistutilsFileError("could not open '{}': {}".format(src, e.strerror))

        if os.path.exists(dst):
            try:
                os.unlink(dst)
            except OSError as e:
                raise DistutilsFileError(
                    "could not delete '{}': {}".format(dst, e.strerror)
                )

        try:
            fdst = open(dst, 'wb')
        except OSError as e:
            raise DistutilsFileError(
                "could not create '{}': {}".format(dst, e.strerror)
            )

        while True:
            try:
                buf = fsrc.read(buffer_size)
            except OSError as e:
                raise DistutilsFileError(
                    "could not read from '{}': {}".format(src, e.strerror)
                )

            if not buf:
                break

            try:
                fdst.write(buf)
            except OSError as e:
                raise DistutilsFileError(
                    "could not write to '{}': {}".format(dst, e.strerror)
                )
    finally:
        if fdst:
            fdst.close()
        if fsrc:
            fsrc.close()


def copy_file(  # noqa: C901
    src,
    dst,
    preserve_mode=1,
    preserve_times=1,
    update=0,
    link=None,
    verbose=1,
    dry_run=0,
):
    """Copy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    """
    # XXX if the destination file already exists, we clobber it if
    # copying, but blow up if linking.  Hmmm.  And I don't know what
    # macostools.copyfile() does.  Should definitely be consistent, and
    # should probably blow up if destination exists and we would be
    # changing it (ie. it's not already a hard/soft link to src OR
    # (not update) and (src newer than dst).

    from distutils._modified import newer
    from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE

    if not os.path.isfile(src):
        raise DistutilsFileError(
            "can't copy '%s': doesn't exist or not a regular file" % src
        )

    if os.path.isdir(dst):
        dir = dst
        dst = os.path.join(dst, os.path.basename(src))
    else:
        dir = os.path.dirname(dst)

    if update and not newer(src, dst):
        if verbose >= 1:
            log.debug("not copying %s (output up-to-date)", src)
        return (dst, 0)

    try:
        action = _copy_action[link]
    except KeyError:
        raise ValueError("invalid value '%s' for 'link' argument" % link)

    if verbose >= 1:
        if os.path.basename(dst) == os.path.basename(src):
            log.info("%s %s -> %s", action, src, dir)
        else:
            log.info("%s %s -> %s", action, src, dst)

    if dry_run:
        return (dst, 1)

    # If linking (hard or symbolic), use the appropriate system call
    # (Unix only, of course, but that's the caller's responsibility)
    elif link == 'hard':
        if not (os.path.exists(dst) and os.path.samefile(src, dst)):
            try:
                os.link(src, dst)
                return (dst, 1)
            except OSError:
                # If hard linking fails, fall back on copying file
                # (some special filesystems don't support hard linking
                #  even under Unix, see issue #8876).
                pass
    elif link == 'sym':
        if not (os.path.exists(dst) and os.path.samefile(src, dst)):
            os.symlink(src, dst)
            return (dst, 1)

    # Otherwise (non-Mac, not linking), copy the file contents and
    # (optionally) copy the times and mode.
    _copy_file_contents(src, dst)
    if preserve_mode or preserve_times:
        st = os.stat(src)

        # According to David Ascher <da@ski.org>, utime() should be done
        # before chmod() (at least under NT).
        if preserve_times:
            os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
        if preserve_mode:
            os.chmod(dst, S_IMODE(st[ST_MODE]))

    return (dst, 1)


# XXX I suspect this is Unix-specific -- need porting help!
def move_file(src, dst, verbose=1, dry_run=0):  # noqa: C901
    """Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    """
    from os.path import exists, isfile, isdir, basename, dirname
    import errno

    if verbose >= 1:
        log.info("moving %s -> %s", src, dst)

    if dry_run:
        return dst

    if not isfile(src):
        raise DistutilsFileError("can't move '%s': not a regular file" % src)

    if isdir(dst):
        dst = os.path.join(dst, basename(src))
    elif exists(dst):
        raise DistutilsFileError(
            "can't move '{}': destination '{}' already exists".format(src, dst)
        )

    if not isdir(dirname(dst)):
        raise DistutilsFileError(
            "can't move '{}': destination '{}' not a valid path".format(src, dst)
        )

    copy_it = False
    try:
        os.rename(src, dst)
    except OSError as e:
        (num, msg) = e.args
        if num == errno.EXDEV:
            copy_it = True
        else:
            raise DistutilsFileError(
                "couldn't move '{}' to '{}': {}".format(src, dst, msg)
            )

    if copy_it:
        copy_file(src, dst, verbose=verbose)
        try:
            os.unlink(src)
        except OSError as e:
            (num, msg) = e.args
            try:
                os.unlink(dst)
            except OSError:
                pass
            raise DistutilsFileError(
                "couldn't move '%s' to '%s' by copy/delete: "
                "delete '%s' failed: %s" % (src, dst, src, msg)
            )
    return dst


def write_file(filename, contents):
    """Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    """
    f = open(filename, "w")
    try:
        for line in contents:
            f.write(line + "\n")
    finally:
        f.close()
python3.12/site-packages/setuptools/_distutils/msvccompiler.py000064400000056031151732703700020604 0ustar00"""distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)

import sys
import os
import warnings
from .errors import (
    DistutilsExecError,
    DistutilsPlatformError,
    CompileError,
    LibError,
    LinkError,
)
from .ccompiler import CCompiler, gen_lib_options
from ._log import log

_can_read_reg = False
try:
    import winreg

    _can_read_reg = True
    hkey_mod = winreg

    RegOpenKeyEx = winreg.OpenKeyEx
    RegEnumKey = winreg.EnumKey
    RegEnumValue = winreg.EnumValue
    RegError = winreg.error

except ImportError:
    try:
        import win32api
        import win32con

        _can_read_reg = True
        hkey_mod = win32con

        RegOpenKeyEx = win32api.RegOpenKeyEx
        RegEnumKey = win32api.RegEnumKey
        RegEnumValue = win32api.RegEnumValue
        RegError = win32api.error
    except ImportError:
        log.info(
            "Warning: Can't read registry to find the "
            "necessary compiler setting\n"
            "Make sure that Python modules winreg, "
            "win32api or win32con are installed."
        )
        pass

if _can_read_reg:
    HKEYS = (
        hkey_mod.HKEY_USERS,
        hkey_mod.HKEY_CURRENT_USER,
        hkey_mod.HKEY_LOCAL_MACHINE,
        hkey_mod.HKEY_CLASSES_ROOT,
    )


warnings.warn(
    "msvccompiler is deprecated and slated to be removed "
    "in the future. Please discontinue use or file an issue "
    "with pypa/distutils describing your use case.",
    DeprecationWarning,
)


def read_keys(base, key):
    """Return list of registry keys."""
    try:
        handle = RegOpenKeyEx(base, key)
    except RegError:
        return None
    L = []
    i = 0
    while True:
        try:
            k = RegEnumKey(handle, i)
        except RegError:
            break
        L.append(k)
        i += 1
    return L


def read_values(base, key):
    """Return dict of registry keys and values.

    All names are converted to lowercase.
    """
    try:
        handle = RegOpenKeyEx(base, key)
    except RegError:
        return None
    d = {}
    i = 0
    while True:
        try:
            name, value, type = RegEnumValue(handle, i)
        except RegError:
            break
        name = name.lower()
        d[convert_mbcs(name)] = convert_mbcs(value)
        i += 1
    return d


def convert_mbcs(s):
    dec = getattr(s, "decode", None)
    if dec is not None:
        try:
            s = dec("mbcs")
        except UnicodeError:
            pass
    return s


class MacroExpander:
    def __init__(self, version):
        self.macros = {}
        self.load_macros(version)

    def set_macro(self, macro, path, key):
        for base in HKEYS:
            d = read_values(base, path)
            if d:
                self.macros["$(%s)" % macro] = d[key]
                break

    def load_macros(self, version):
        vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version
        self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir")
        self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir")
        net = r"Software\Microsoft\.NETFramework"
        self.set_macro("FrameworkDir", net, "installroot")
        try:
            if version > 7.0:
                self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1")
            else:
                self.set_macro("FrameworkSDKDir", net, "sdkinstallroot")
        except KeyError:
            raise DistutilsPlatformError(
                """Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py."""
            )

        p = r"Software\Microsoft\NET Framework Setup\Product"
        for base in HKEYS:
            try:
                h = RegOpenKeyEx(base, p)
            except RegError:
                continue
            key = RegEnumKey(h, 0)
            d = read_values(base, r"{}\{}".format(p, key))
            self.macros["$(FrameworkVersion)"] = d["version"]

    def sub(self, s):
        for k, v in self.macros.items():
            s = s.replace(k, v)
        return s


def get_build_version():
    """Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    """
    prefix = "MSC v."
    i = sys.version.find(prefix)
    if i == -1:
        return 6
    i = i + len(prefix)
    s, rest = sys.version[i:].split(" ", 1)
    majorVersion = int(s[:-2]) - 6
    if majorVersion >= 13:
        # v13 was skipped and should be v14
        majorVersion += 1
    minorVersion = int(s[2:3]) / 10.0
    # I don't think paths are affected by minor version in version 6
    if majorVersion == 6:
        minorVersion = 0
    if majorVersion >= 6:
        return majorVersion + minorVersion
    # else we don't know what version of the compiler this is
    return None


def get_build_architecture():
    """Return the processor architecture.

    Possible results are "Intel" or "AMD64".
    """

    prefix = " bit ("
    i = sys.version.find(prefix)
    if i == -1:
        return "Intel"
    j = sys.version.find(")", i)
    return sys.version[i + len(prefix) : j]


def normalize_and_reduce_paths(paths):
    """Return a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    """
    # Paths are normalized so things like:  /a and /a/ aren't both preserved.
    reduced_paths = []
    for p in paths:
        np = os.path.normpath(p)
        # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set.
        if np not in reduced_paths:
            reduced_paths.append(np)
    return reduced_paths


class MSVCCompiler(CCompiler):
    """Concrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)
        self.__version = get_build_version()
        self.__arch = get_build_architecture()
        if self.__arch == "Intel":
            # x86
            if self.__version >= 7:
                self.__root = r"Software\Microsoft\VisualStudio"
                self.__macros = MacroExpander(self.__version)
            else:
                self.__root = r"Software\Microsoft\Devstudio"
            self.__product = "Visual Studio version %s" % self.__version
        else:
            # Win64. Assume this was built with the platform SDK
            self.__product = "Microsoft SDK compiler %s" % (self.__version + 6)

        self.initialized = False

    def initialize(self):
        self.__paths = []
        if (
            "DISTUTILS_USE_SDK" in os.environ
            and "MSSdk" in os.environ
            and self.find_exe("cl.exe")
        ):
            # Assume that the SDK set up everything alright; don't try to be
            # smarter
            self.cc = "cl.exe"
            self.linker = "link.exe"
            self.lib = "lib.exe"
            self.rc = "rc.exe"
            self.mc = "mc.exe"
        else:
            self.__paths = self.get_msvc_paths("path")

            if len(self.__paths) == 0:
                raise DistutilsPlatformError(
                    "Python was built with %s, "
                    "and extensions need to be built with the same "
                    "version of the compiler, but it isn't installed." % self.__product
                )

            self.cc = self.find_exe("cl.exe")
            self.linker = self.find_exe("link.exe")
            self.lib = self.find_exe("lib.exe")
            self.rc = self.find_exe("rc.exe")  # resource compiler
            self.mc = self.find_exe("mc.exe")  # message compiler
            self.set_path_env_var('lib')
            self.set_path_env_var('include')

        # extend the MSVC path with the current path
        try:
            for p in os.environ['path'].split(';'):
                self.__paths.append(p)
        except KeyError:
            pass
        self.__paths = normalize_and_reduce_paths(self.__paths)
        os.environ['path'] = ";".join(self.__paths)

        self.preprocess_options = None
        if self.__arch == "Intel":
            self.compile_options = ['/nologo', '/O2', '/MD', '/W3', '/GX', '/DNDEBUG']
            self.compile_options_debug = [
                '/nologo',
                '/Od',
                '/MDd',
                '/W3',
                '/GX',
                '/Z7',
                '/D_DEBUG',
            ]
        else:
            # Win64
            self.compile_options = ['/nologo', '/O2', '/MD', '/W3', '/GS-', '/DNDEBUG']
            self.compile_options_debug = [
                '/nologo',
                '/Od',
                '/MDd',
                '/W3',
                '/GS-',
                '/Z7',
                '/D_DEBUG',
            ]

        self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
        if self.__version >= 7:
            self.ldflags_shared_debug = ['/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG']
        else:
            self.ldflags_shared_debug = [
                '/DLL',
                '/nologo',
                '/INCREMENTAL:no',
                '/pdb:None',
                '/DEBUG',
            ]
        self.ldflags_static = ['/nologo']

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        # Copied from ccompiler.py, extended to return .res as 'object'-file
        # for .rc input file
        if output_dir is None:
            output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            (base, ext) = os.path.splitext(src_name)
            base = os.path.splitdrive(base)[1]  # Chop off the drive
            base = base[os.path.isabs(base) :]  # If abs, chop off leading /
            if ext not in self.src_extensions:
                # Better to raise an exception instead of silently continuing
                # and later complain about sources and targets having
                # different lengths
                raise CompileError("Don't know how to compile %s" % src_name)
            if strip_dir:
                base = os.path.basename(base)
            if ext in self._rc_extensions:
                obj_names.append(os.path.join(output_dir, base + self.res_extension))
            elif ext in self._mc_extensions:
                obj_names.append(os.path.join(output_dir, base + self.res_extension))
            else:
                obj_names.append(os.path.join(output_dir, base + self.obj_extension))
        return obj_names

    def compile(  # noqa: C901
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):
        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts + [output_opt] + [input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc] + ['-h', h_dir, '-r', rc_dir] + [src])
                    base, _ = os.path.splitext(os.path.basename(src))
                    rc_file = os.path.join(rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc] + ["/fo" + obj] + [rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError(
                    "Don't know how to compile {} to {}".format(src, obj)
                )

            output_opt = "/Fo" + obj
            try:
                self.spawn(
                    [self.cc]
                    + compile_opts
                    + pp_opts
                    + [input_opt, output_opt]
                    + extra_postargs
                )
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):
        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass  # XXX what goes here?
            try:
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(  # noqa: C901
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
        (libraries, library_dirs, runtime_library_dirs) = fixed_args

        if runtime_library_dirs:
            self.warn(
                "I don't know what to do with 'runtime_library_dirs': "
                + str(runtime_library_dirs)
            )

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            if target_desc == CCompiler.EXECUTABLE:
                if debug:
                    ldflags = self.ldflags_shared_debug[1:]
                else:
                    ldflags = self.ldflags_shared[1:]
            else:
                if debug:
                    ldflags = self.ldflags_shared_debug
                else:
                    ldflags = self.ldflags_shared

            export_opts = []
            for sym in export_symbols or []:
                export_opts.append("/EXPORT:" + sym)

            ld_args = (
                ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
            )

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename)
                )
                implib_file = os.path.join(
                    os.path.dirname(objects[0]), self.library_filename(dll_name)
                )
                ld_args.append('/IMPLIB:' + implib_file)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath(os.path.dirname(output_filename))
            try:
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
            "don't know how to set runtime library search path for MSVC++"
        )

    def library_option(self, lib):
        return self.library_filename(lib)

    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # Helper methods for using the MSVC registry settings

    def find_exe(self, exe):
        """Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        """
        for p in self.__paths:
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        # didn't find it; try existing path
        for p in os.environ['Path'].split(';'):
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        return exe

    def get_msvc_paths(self, path, platform='x86'):
        """Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        """
        if not _can_read_reg:
            return []

        path = path + " dirs"
        if self.__version >= 7:
            key = r"{}\{:0.1f}\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories".format(
                self.__root,
                self.__version,
            )
        else:
            key = (
                r"%s\6.0\Build System\Components\Platforms"
                r"\Win32 (%s)\Directories" % (self.__root, platform)
            )

        for base in HKEYS:
            d = read_values(base, key)
            if d:
                if self.__version >= 7:
                    return self.__macros.sub(d[path]).split(";")
                else:
                    return d[path].split(";")
        # MSVC 6 seems to create the registry entries we need only when
        # the GUI is run.
        if self.__version == 6:
            for base in HKEYS:
                if read_values(base, r"%s\6.0" % self.__root) is not None:
                    self.warn(
                        "It seems you have Visual Studio 6 installed, "
                        "but the expected registry settings are not present.\n"
                        "You must at least run the Visual Studio GUI once "
                        "so that these entries are created."
                    )
                    break
        return []

    def set_path_env_var(self, name):
        """Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        """

        if name == "lib":
            p = self.get_msvc_paths("library")
        else:
            p = self.get_msvc_paths(name)
        if p:
            os.environ[name] = ';'.join(p)


if get_build_version() >= 8.0:
    log.debug("Importing new compiler from distutils.msvc9compiler")
    OldMSVCCompiler = MSVCCompiler
    from distutils.msvc9compiler import MSVCCompiler

    # get_build_architecture not really relevant now we support cross-compile
    from distutils.msvc9compiler import MacroExpander  # noqa: F811
python3.12/site-packages/setuptools/_distutils/core.py000064400000022265151732703700017033 0ustar00"""distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
"""

import os
import sys
import tokenize

from .debug import DEBUG
from .errors import (
    DistutilsSetupError,
    DistutilsError,
    CCompilerError,
    DistutilsArgError,
)

# Mainly import these so setup scripts can "from distutils.core import" them.
from .dist import Distribution
from .cmd import Command
from .config import PyPIRCCommand
from .extension import Extension


__all__ = ['Distribution', 'Command', 'PyPIRCCommand', 'Extension', 'setup']

# This is a barebones help message generated displayed when the user
# runs the setup script with no arguments at all.  More useful help
# is generated with various --help options: global help, list commands,
# and per-command help.
USAGE = """\
usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
"""


def gen_usage(script_name):
    script = os.path.basename(script_name)
    return USAGE % locals()


# Some mild magic to control the behaviour of 'setup()' from 'run_setup()'.
_setup_stop_after = None
_setup_distribution = None

# Legal keyword arguments for the setup() function
setup_keywords = (
    'distclass',
    'script_name',
    'script_args',
    'options',
    'name',
    'version',
    'author',
    'author_email',
    'maintainer',
    'maintainer_email',
    'url',
    'license',
    'description',
    'long_description',
    'keywords',
    'platforms',
    'classifiers',
    'download_url',
    'requires',
    'provides',
    'obsoletes',
)

# Legal keyword arguments for the Extension constructor
extension_keywords = (
    'name',
    'sources',
    'include_dirs',
    'define_macros',
    'undef_macros',
    'library_dirs',
    'libraries',
    'runtime_library_dirs',
    'extra_objects',
    'extra_compile_args',
    'extra_link_args',
    'swig_opts',
    'export_symbols',
    'depends',
    'language',
)


def setup(**attrs):  # noqa: C901
    """The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    """

    global _setup_stop_after, _setup_distribution

    # Determine the distribution class -- either caller-supplied or
    # our Distribution (see below).
    klass = attrs.get('distclass')
    if klass:
        attrs.pop('distclass')
    else:
        klass = Distribution

    if 'script_name' not in attrs:
        attrs['script_name'] = os.path.basename(sys.argv[0])
    if 'script_args' not in attrs:
        attrs['script_args'] = sys.argv[1:]

    # Create the Distribution instance, using the remaining arguments
    # (ie. everything except distclass) to initialize it
    try:
        _setup_distribution = dist = klass(attrs)
    except DistutilsSetupError as msg:
        if 'name' not in attrs:
            raise SystemExit("error in setup command: %s" % msg)
        else:
            raise SystemExit("error in {} setup command: {}".format(attrs['name'], msg))

    if _setup_stop_after == "init":
        return dist

    # Find and parse the config file(s): they will override options from
    # the setup script, but be overridden by the command line.
    dist.parse_config_files()

    if DEBUG:
        print("options (after parsing config files):")
        dist.dump_option_dicts()

    if _setup_stop_after == "config":
        return dist

    # Parse the command line and override config files; any
    # command-line errors are the end user's fault, so turn them into
    # SystemExit to suppress tracebacks.
    try:
        ok = dist.parse_command_line()
    except DistutilsArgError as msg:
        raise SystemExit(gen_usage(dist.script_name) + "\nerror: %s" % msg)

    if DEBUG:
        print("options (after parsing command line):")
        dist.dump_option_dicts()

    if _setup_stop_after == "commandline":
        return dist

    # And finally, run all the commands found on the command line.
    if ok:
        return run_commands(dist)

    return dist


# setup ()


def run_commands(dist):
    """Given a Distribution object run all the commands,
    raising ``SystemExit`` errors in the case of failure.

    This function assumes that either ``sys.argv`` or ``dist.script_args``
    is already set accordingly.
    """
    try:
        dist.run_commands()
    except KeyboardInterrupt:
        raise SystemExit("interrupted")
    except OSError as exc:
        if DEBUG:
            sys.stderr.write("error: {}\n".format(exc))
            raise
        else:
            raise SystemExit("error: {}".format(exc))

    except (DistutilsError, CCompilerError) as msg:
        if DEBUG:
            raise
        else:
            raise SystemExit("error: " + str(msg))

    return dist


def run_setup(script_name, script_args=None, stop_after="run"):
    """Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    """
    if stop_after not in ('init', 'config', 'commandline', 'run'):
        raise ValueError("invalid value for 'stop_after': {!r}".format(stop_after))

    global _setup_stop_after, _setup_distribution
    _setup_stop_after = stop_after

    save_argv = sys.argv.copy()
    g = {'__file__': script_name, '__name__': '__main__'}
    try:
        try:
            sys.argv[0] = script_name
            if script_args is not None:
                sys.argv[1:] = script_args
            # tokenize.open supports automatic encoding detection
            with tokenize.open(script_name) as f:
                code = f.read().replace(r'\r\n', r'\n')
                exec(code, g)
        finally:
            sys.argv = save_argv
            _setup_stop_after = None
    except SystemExit:
        # Hmm, should we do something if exiting with a non-zero code
        # (ie. error)?
        pass

    if _setup_distribution is None:
        raise RuntimeError(
            (
                "'distutils.core.setup()' was never called -- "
                "perhaps '%s' is not a Distutils setup script?"
            )
            % script_name
        )

    # I wonder if the setup script's namespace -- g and l -- would be of
    # any interest to callers?
    # print "_setup_distribution:", _setup_distribution
    return _setup_distribution


# run_setup ()
python3.12/site-packages/setuptools/_distutils/cmd.py000064400000042707151732703710016652 0ustar00"""distutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
"""

import sys
import os
import re
import logging

from .errors import DistutilsOptionError
from . import util, dir_util, file_util, archive_util, _modified
from ._log import log


class Command:
    """Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    """

    # 'sub_commands' formalizes the notion of a "family" of commands,
    # eg. "install" as the parent with sub-commands "install_lib",
    # "install_headers", etc.  The parent of a family of commands
    # defines 'sub_commands' as a class attribute; it's a list of
    #    (command_name : string, predicate : unbound_method | string | None)
    # tuples, where 'predicate' is a method of the parent command that
    # determines whether the corresponding command is applicable in the
    # current situation.  (Eg. we "install_headers" is only applicable if
    # we have any C header files to install.)  If 'predicate' is None,
    # that command is always applicable.
    #
    # 'sub_commands' is usually defined at the *end* of a class, because
    # predicates can be unbound methods, so they must already have been
    # defined.  The canonical example is the "install" command.
    sub_commands = []

    # -- Creation/initialization methods -------------------------------

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
            raise TypeError("dist must be a Distribution instance")
        if self.__class__ is Command:
            raise RuntimeError("Command is an abstract class")

        self.distribution = dist
        self.initialize_options()

        # Per-command versions of the global flags, so that the user can
        # customize Distutils' behaviour command-by-command and let some
        # commands fall back on the Distribution's behaviour.  None means
        # "not defined, check self.distribution's copy", while 0 or 1 mean
        # false and true (duh).  Note that this means figuring out the real
        # value of each flag is a touch complicated -- hence "self._dry_run"
        # will be handled by __getattr__, below.
        # XXX This needs to be fixed.
        self._dry_run = None

        # verbose is largely ignored, but needs to be set for
        # backwards compatibility (I think)?
        self.verbose = dist.verbose

        # Some commands define a 'self.force' option to ignore file
        # timestamps, but methods defined *here* assume that
        # 'self.force' exists for all commands.  So define it here
        # just to be safe.
        self.force = None

        # The 'help' flag is just used for command-line parsing, so
        # none of that complicated bureaucracy is needed.
        self.help = 0

        # 'finalized' records whether or not 'finalize_options()' has been
        # called.  'finalize_options()' itself should not pay attention to
        # this flag: it is the business of 'ensure_finalized()', which
        # always calls 'finalize_options()', to respect/update it.
        self.finalized = 0

    # XXX A more explicit way to customize dry_run would be better.
    def __getattr__(self, attr):
        if attr == 'dry_run':
            myval = getattr(self, "_" + attr)
            if myval is None:
                return getattr(self.distribution, attr)
            else:
                return myval
        else:
            raise AttributeError(attr)

    def ensure_finalized(self):
        if not self.finalized:
            self.finalize_options()
        self.finalized = 1

    # Subclasses must define:
    #   initialize_options()
    #     provide default values for all options; may be customized by
    #     setup script, by options from config file(s), or by command-line
    #     options
    #   finalize_options()
    #     decide on the final values for all options; this is called
    #     after all possible intervention from the outside world
    #     (command-line, option file, etc.) has been processed
    #   run()
    #     run the command: do whatever it is we're here to do,
    #     controlled by the command's various option values

    def initialize_options(self):
        """Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        """
        raise RuntimeError(
            "abstract method -- subclass %s must override" % self.__class__
        )

    def finalize_options(self):
        """Set final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        """
        raise RuntimeError(
            "abstract method -- subclass %s must override" % self.__class__
        )

    def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate

        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=logging.INFO)
        indent = indent + "  "
        for option, _, _ in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "{} = {}".format(option, value), level=logging.INFO)

    def run(self):
        """A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        """
        raise RuntimeError(
            "abstract method -- subclass %s must override" % self.__class__
        )

    def announce(self, msg, level=logging.DEBUG):
        log.log(level, msg)

    def debug_print(self, msg):
        """Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        """
        from distutils.debug import DEBUG

        if DEBUG:
            print(msg)
            sys.stdout.flush()

    # -- Option validation methods -------------------------------------
    # (these are very handy in writing the 'finalize_options()' method)
    #
    # NB. the general philosophy here is to ensure that a particular option
    # value meets certain type and value constraints.  If not, we try to
    # force it into conformance (eg. if we expect a list but have a string,
    # split the string on comma and/or whitespace).  If we can't force the
    # option into conformance, raise DistutilsOptionError.  Thus, command
    # classes need do nothing more than (eg.)
    #   self.ensure_string_list('foo')
    # and they can be guaranteed that thereafter, self.foo will be
    # a list of strings.

    def _ensure_stringlike(self, option, what, default=None):
        val = getattr(self, option)
        if val is None:
            setattr(self, option, default)
            return default
        elif not isinstance(val, str):
            raise DistutilsOptionError(
                "'{}' must be a {} (got `{}`)".format(option, what, val)
            )
        return val

    def ensure_string(self, option, default=None):
        """Ensure that 'option' is a string; if not defined, set it to
        'default'.
        """
        self._ensure_stringlike(option, "string", default)

    def ensure_string_list(self, option):
        r"""Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        """
        val = getattr(self, option)
        if val is None:
            return
        elif isinstance(val, str):
            setattr(self, option, re.split(r',\s*|\s+', val))
        else:
            if isinstance(val, list):
                ok = all(isinstance(v, str) for v in val)
            else:
                ok = False
            if not ok:
                raise DistutilsOptionError(
                    "'{}' must be a list of strings (got {!r})".format(option, val)
                )

    def _ensure_tested_string(self, option, tester, what, error_fmt, default=None):
        val = self._ensure_stringlike(option, what, default)
        if val is not None and not tester(val):
            raise DistutilsOptionError(
                ("error in '%s' option: " + error_fmt) % (option, val)
            )

    def ensure_filename(self, option):
        """Ensure that 'option' is the name of an existing file."""
        self._ensure_tested_string(
            option, os.path.isfile, "filename", "'%s' does not exist or is not a file"
        )

    def ensure_dirname(self, option):
        self._ensure_tested_string(
            option,
            os.path.isdir,
            "directory name",
            "'%s' does not exist or is not a directory",
        )

    # -- Convenience methods for commands ------------------------------

    def get_command_name(self):
        if hasattr(self, 'command_name'):
            return self.command_name
        else:
            return self.__class__.__name__

    def set_undefined_options(self, src_cmd, *option_pairs):
        """Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        """
        # Option_pairs: list of (src_option, dst_option) tuples
        src_cmd_obj = self.distribution.get_command_obj(src_cmd)
        src_cmd_obj.ensure_finalized()
        for src_option, dst_option in option_pairs:
            if getattr(self, dst_option) is None:
                setattr(self, dst_option, getattr(src_cmd_obj, src_option))

    def get_finalized_command(self, command, create=1):
        """Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        """
        cmd_obj = self.distribution.get_command_obj(command, create)
        cmd_obj.ensure_finalized()
        return cmd_obj

    # XXX rename to 'get_reinitialized_command()'? (should do the
    # same in dist.py, if so)
    def reinitialize_command(self, command, reinit_subcommands=0):
        return self.distribution.reinitialize_command(command, reinit_subcommands)

    def run_command(self, command):
        """Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        """
        self.distribution.run_command(command)

    def get_sub_commands(self):
        """Determine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        """
        commands = []
        for cmd_name, method in self.sub_commands:
            if method is None or method(self):
                commands.append(cmd_name)
        return commands

    # -- External world manipulation -----------------------------------

    def warn(self, msg):
        log.warning("warning: %s: %s\n", self.get_command_name(), msg)

    def execute(self, func, args, msg=None, level=1):
        util.execute(func, args, msg, dry_run=self.dry_run)

    def mkpath(self, name, mode=0o777):
        dir_util.mkpath(name, mode, dry_run=self.dry_run)

    def copy_file(
        self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1
    ):
        """Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.)"""
        return file_util.copy_file(
            infile,
            outfile,
            preserve_mode,
            preserve_times,
            not self.force,
            link,
            dry_run=self.dry_run,
        )

    def copy_tree(
        self,
        infile,
        outfile,
        preserve_mode=1,
        preserve_times=1,
        preserve_symlinks=0,
        level=1,
    ):
        """Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        """
        return dir_util.copy_tree(
            infile,
            outfile,
            preserve_mode,
            preserve_times,
            preserve_symlinks,
            not self.force,
            dry_run=self.dry_run,
        )

    def move_file(self, src, dst, level=1):
        """Move a file respecting dry-run flag."""
        return file_util.move_file(src, dst, dry_run=self.dry_run)

    def spawn(self, cmd, search_path=1, level=1):
        """Spawn an external command respecting dry-run flag."""
        from distutils.spawn import spawn

        spawn(cmd, search_path, dry_run=self.dry_run)

    def make_archive(
        self, base_name, format, root_dir=None, base_dir=None, owner=None, group=None
    ):
        return archive_util.make_archive(
            base_name,
            format,
            root_dir,
            base_dir,
            dry_run=self.dry_run,
            owner=owner,
            group=group,
        )

    def make_file(
        self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1
    ):
        """Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        """
        if skip_msg is None:
            skip_msg = "skipping %s (inputs unchanged)" % outfile

        # Allow 'infiles' to be a single string
        if isinstance(infiles, str):
            infiles = (infiles,)
        elif not isinstance(infiles, (list, tuple)):
            raise TypeError("'infiles' must be a string, or a list or tuple of strings")

        if exec_msg is None:
            exec_msg = "generating {} from {}".format(outfile, ', '.join(infiles))

        # If 'outfile' must be regenerated (either because it doesn't
        # exist, is out-of-date, or the 'force' flag is true) then
        # perform the action that presumably regenerates it
        if self.force or _modified.newer_group(infiles, outfile):
            self.execute(func, args, exec_msg, level)
        # Otherwise, print the "skip" message
        else:
            log.debug(skip_msg)
python3.12/site-packages/setuptools/_distutils/util.py000064400000043264151732703710017063 0ustar00"""distutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
"""

import importlib.util
import os
import re
import string
import subprocess
import sys
import sysconfig
import functools

from .errors import DistutilsPlatformError, DistutilsByteCompileError
from ._modified import newer
from .spawn import spawn
from ._log import log


def get_host_platform():
    """
    Return a string that identifies the current platform. Use this
    function to distinguish platform-specific build directories and
    platform-specific built distributions.
    """

    # This function initially exposed platforms as defined in Python 3.9
    # even with older Python versions when distutils was split out.
    # Now it delegates to stdlib sysconfig, but maintains compatibility.

    if sys.version_info < (3, 8):
        if os.name == 'nt':
            if '(arm)' in sys.version.lower():
                return 'win-arm32'
            if '(arm64)' in sys.version.lower():
                return 'win-arm64'

    if sys.version_info < (3, 9):
        if os.name == "posix" and hasattr(os, 'uname'):
            osname, host, release, version, machine = os.uname()
            if osname[:3] == "aix":
                from .py38compat import aix_platform

                return aix_platform(osname, version, release)

    return sysconfig.get_platform()


def get_platform():
    if os.name == 'nt':
        TARGET_TO_PLAT = {
            'x86': 'win32',
            'x64': 'win-amd64',
            'arm': 'win-arm32',
            'arm64': 'win-arm64',
        }
        target = os.environ.get('VSCMD_ARG_TGT_ARCH')
        return TARGET_TO_PLAT.get(target) or get_host_platform()
    return get_host_platform()


if sys.platform == 'darwin':
    _syscfg_macosx_ver = None  # cache the version pulled from sysconfig
MACOSX_VERSION_VAR = 'MACOSX_DEPLOYMENT_TARGET'


def _clear_cached_macosx_ver():
    """For testing only. Do not call."""
    global _syscfg_macosx_ver
    _syscfg_macosx_ver = None


def get_macosx_target_ver_from_syscfg():
    """Get the version of macOS latched in the Python interpreter configuration.
    Returns the version as a string or None if can't obtain one. Cached."""
    global _syscfg_macosx_ver
    if _syscfg_macosx_ver is None:
        from distutils import sysconfig

        ver = sysconfig.get_config_var(MACOSX_VERSION_VAR) or ''
        if ver:
            _syscfg_macosx_ver = ver
    return _syscfg_macosx_ver


def get_macosx_target_ver():
    """Return the version of macOS for which we are building.

    The target version defaults to the version in sysconfig latched at time
    the Python interpreter was built, unless overridden by an environment
    variable. If neither source has a value, then None is returned"""

    syscfg_ver = get_macosx_target_ver_from_syscfg()
    env_ver = os.environ.get(MACOSX_VERSION_VAR)

    if env_ver:
        # Validate overridden version against sysconfig version, if have both.
        # Ensure that the deployment target of the build process is not less
        # than 10.3 if the interpreter was built for 10.3 or later.  This
        # ensures extension modules are built with correct compatibility
        # values, specifically LDSHARED which can use
        # '-undefined dynamic_lookup' which only works on >= 10.3.
        if (
            syscfg_ver
            and split_version(syscfg_ver) >= [10, 3]
            and split_version(env_ver) < [10, 3]
        ):
            my_msg = (
                '$' + MACOSX_VERSION_VAR + ' mismatch: '
                'now "%s" but "%s" during configure; '
                'must use 10.3 or later' % (env_ver, syscfg_ver)
            )
            raise DistutilsPlatformError(my_msg)
        return env_ver
    return syscfg_ver


def split_version(s):
    """Convert a dot-separated string into a list of numbers for comparisons"""
    return [int(n) for n in s.split('.')]


def convert_path(pathname):
    """Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    """
    if os.sep == '/':
        return pathname
    if not pathname:
        return pathname
    if pathname[0] == '/':
        raise ValueError("path '%s' cannot be absolute" % pathname)
    if pathname[-1] == '/':
        raise ValueError("path '%s' cannot end with '/'" % pathname)

    paths = pathname.split('/')
    while '.' in paths:
        paths.remove('.')
    if not paths:
        return os.curdir
    return os.path.join(*paths)


# convert_path ()


def change_root(new_root, pathname):
    """Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    """
    if os.name == 'posix':
        if not os.path.isabs(pathname):
            return os.path.join(new_root, pathname)
        else:
            return os.path.join(new_root, pathname[1:])

    elif os.name == 'nt':
        (drive, path) = os.path.splitdrive(pathname)
        if path[0] == '\\':
            path = path[1:]
        return os.path.join(new_root, path)

    raise DistutilsPlatformError(f"nothing known about platform '{os.name}'")


@functools.lru_cache()
def check_environ():
    """Ensure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    """
    if os.name == 'posix' and 'HOME' not in os.environ:
        try:
            import pwd

            os.environ['HOME'] = pwd.getpwuid(os.getuid())[5]
        except (ImportError, KeyError):
            # bpo-10496: if the current user identifier doesn't exist in the
            # password database, do nothing
            pass

    if 'PLAT' not in os.environ:
        os.environ['PLAT'] = get_platform()


def subst_vars(s, local_vars):
    """
    Perform variable substitution on 'string'.
    Variables are indicated by format-style braces ("{var}").
    Variable is substituted by the value found in the 'local_vars'
    dictionary or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    """
    check_environ()
    lookup = dict(os.environ)
    lookup.update((name, str(value)) for name, value in local_vars.items())
    try:
        return _subst_compat(s).format_map(lookup)
    except KeyError as var:
        raise ValueError(f"invalid variable {var}")


def _subst_compat(s):
    """
    Replace shell/Perl-style variable substitution with
    format-style. For compatibility.
    """

    def _subst(match):
        return f'{{{match.group(1)}}}'

    repl = re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s)
    if repl != s:
        import warnings

        warnings.warn(
            "shell/Perl-style substitutions are deprecated",
            DeprecationWarning,
        )
    return repl


def grok_environment_error(exc, prefix="error: "):
    # Function kept for backward compatibility.
    # Used to try clever things with EnvironmentErrors,
    # but nowadays str(exception) produces good messages.
    return prefix + str(exc)


# Needed by 'split_quoted()'
_wordchars_re = _squote_re = _dquote_re = None


def _init_regex():
    global _wordchars_re, _squote_re, _dquote_re
    _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
    _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
    _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')


def split_quoted(s):
    """Split a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    """

    # This is a nice algorithm for splitting up a single string, since it
    # doesn't require character-by-character examination.  It was a little
    # bit of a brain-bender to get it working right, though...
    if _wordchars_re is None:
        _init_regex()

    s = s.strip()
    words = []
    pos = 0

    while s:
        m = _wordchars_re.match(s, pos)
        end = m.end()
        if end == len(s):
            words.append(s[:end])
            break

        if s[end] in string.whitespace:
            # unescaped, unquoted whitespace: now
            # we definitely have a word delimiter
            words.append(s[:end])
            s = s[end:].lstrip()
            pos = 0

        elif s[end] == '\\':
            # preserve whatever is being escaped;
            # will become part of the current word
            s = s[:end] + s[end + 1 :]
            pos = end + 1

        else:
            if s[end] == "'":  # slurp singly-quoted string
                m = _squote_re.match(s, end)
            elif s[end] == '"':  # slurp doubly-quoted string
                m = _dquote_re.match(s, end)
            else:
                raise RuntimeError("this can't happen (bad char '%c')" % s[end])

            if m is None:
                raise ValueError("bad string (mismatched %s quotes?)" % s[end])

            (beg, end) = m.span()
            s = s[:beg] + s[beg + 1 : end - 1] + s[end:]
            pos = m.end() - 2

        if pos >= len(s):
            words.append(s)
            break

    return words


# split_quoted ()


def execute(func, args, msg=None, verbose=0, dry_run=0):
    """Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    """
    if msg is None:
        msg = "{}{!r}".format(func.__name__, args)
        if msg[-2:] == ',)':  # correct for singleton tuple
            msg = msg[0:-2] + ')'

    log.info(msg)
    if not dry_run:
        func(*args)


def strtobool(val):
    """Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    """
    val = val.lower()
    if val in ('y', 'yes', 't', 'true', 'on', '1'):
        return 1
    elif val in ('n', 'no', 'f', 'false', 'off', '0'):
        return 0
    else:
        raise ValueError("invalid truth value {!r}".format(val))


def byte_compile(  # noqa: C901
    py_files,
    optimize=0,
    force=0,
    prefix=None,
    base_dir=None,
    verbose=1,
    dry_run=0,
    direct=None,
):
    """Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    """

    # nothing is done if sys.dont_write_bytecode is True
    if sys.dont_write_bytecode:
        raise DistutilsByteCompileError('byte-compiling is disabled.')

    # First, if the caller didn't force us into direct or indirect mode,
    # figure out which mode we should be in.  We take a conservative
    # approach: choose direct mode *only* if the current interpreter is
    # in debug mode and optimize is 0.  If we're not in debug mode (-O
    # or -OO), we don't know which level of optimization this
    # interpreter is running with, so we can't do direct
    # byte-compilation and be certain that it's the right thing.  Thus,
    # always compile indirectly if the current interpreter is in either
    # optimize mode, or if either optimization level was requested by
    # the caller.
    if direct is None:
        direct = __debug__ and optimize == 0

    # "Indirect" byte-compilation: write a temporary script and then
    # run it with the appropriate flags.
    if not direct:
        try:
            from tempfile import mkstemp

            (script_fd, script_name) = mkstemp(".py")
        except ImportError:
            from tempfile import mktemp

            (script_fd, script_name) = None, mktemp(".py")
        log.info("writing byte-compilation script '%s'", script_name)
        if not dry_run:
            if script_fd is not None:
                script = os.fdopen(script_fd, "w")
            else:
                script = open(script_name, "w")

            with script:
                script.write(
                    """\
from distutils.util import byte_compile
files = [
"""
                )

                # XXX would be nice to write absolute filenames, just for
                # safety's sake (script should be more robust in the face of
                # chdir'ing before running it).  But this requires abspath'ing
                # 'prefix' as well, and that breaks the hack in build_lib's
                # 'byte_compile()' method that carefully tacks on a trailing
                # slash (os.sep really) to make sure the prefix here is "just
                # right".  This whole prefix business is rather delicate -- the
                # problem is that it's really a directory, but I'm treating it
                # as a dumb string, so trailing slashes and so forth matter.

                script.write(",\n".join(map(repr, py_files)) + "]\n")
                script.write(
                    """
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
"""
                    % (optimize, force, prefix, base_dir, verbose)
                )

        cmd = [sys.executable]
        cmd.extend(subprocess._optim_args_from_interpreter_flags())
        cmd.append(script_name)
        spawn(cmd, dry_run=dry_run)
        execute(os.remove, (script_name,), "removing %s" % script_name, dry_run=dry_run)

    # "Direct" byte-compilation: use the py_compile module to compile
    # right here, right now.  Note that the script generated in indirect
    # mode simply calls 'byte_compile()' in direct mode, a weird sort of
    # cross-process recursion.  Hey, it works!
    else:
        from py_compile import compile

        for file in py_files:
            if file[-3:] != ".py":
                # This lets us be lazy and not filter filenames in
                # the "install_lib" command.
                continue

            # Terminology from the py_compile module:
            #   cfile - byte-compiled file
            #   dfile - purported source filename (same as 'file' by default)
            if optimize >= 0:
                opt = '' if optimize == 0 else optimize
                cfile = importlib.util.cache_from_source(file, optimization=opt)
            else:
                cfile = importlib.util.cache_from_source(file)
            dfile = file
            if prefix:
                if file[: len(prefix)] != prefix:
                    raise ValueError(
                        "invalid prefix: filename %r doesn't start with %r"
                        % (file, prefix)
                    )
                dfile = dfile[len(prefix) :]
            if base_dir:
                dfile = os.path.join(base_dir, dfile)

            cfile_base = os.path.basename(cfile)
            if direct:
                if force or newer(file, cfile):
                    log.info("byte-compiling %s to %s", file, cfile_base)
                    if not dry_run:
                        compile(file, cfile, dfile)
                else:
                    log.debug("skipping byte-compilation of %s to %s", file, cfile_base)


def rfc822_escape(header):
    """Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    """
    lines = header.split('\n')
    sep = '\n' + 8 * ' '
    return sep.join(lines)
python3.12/site-packages/setuptools/_distutils/config.py000064400000011457151732703710017352 0ustar00"""distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
"""
import os
from configparser import RawConfigParser

from .cmd import Command

DEFAULT_PYPIRC = """\
[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
"""


class PyPIRCCommand(Command):
    """Base command that knows how to handle the .pypirc file"""

    DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/'
    DEFAULT_REALM = 'pypi'
    repository = None
    realm = None

    user_options = [
        ('repository=', 'r', "url of repository [default: %s]" % DEFAULT_REPOSITORY),
        ('show-response', None, 'display full response text from server'),
    ]

    boolean_options = ['show-response']

    def _get_rc_file(self):
        """Returns rc file path."""
        return os.path.join(os.path.expanduser('~'), '.pypirc')

    def _store_pypirc(self, username, password):
        """Creates a default .pypirc file."""
        rc = self._get_rc_file()
        with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0o600), 'w') as f:
            f.write(DEFAULT_PYPIRC % (username, password))

    def _read_pypirc(self):  # noqa: C901
        """Reads the .pypirc file."""
        rc = self._get_rc_file()
        if os.path.exists(rc):
            self.announce('Using PyPI login from %s' % rc)
            repository = self.repository or self.DEFAULT_REPOSITORY

            config = RawConfigParser()
            config.read(rc)
            sections = config.sections()
            if 'distutils' in sections:
                # let's get the list of servers
                index_servers = config.get('distutils', 'index-servers')
                _servers = [
                    server.strip()
                    for server in index_servers.split('\n')
                    if server.strip() != ''
                ]
                if _servers == []:
                    # nothing set, let's try to get the default pypi
                    if 'pypi' in sections:
                        _servers = ['pypi']
                    else:
                        # the file is not properly defined, returning
                        # an empty dict
                        return {}
                for server in _servers:
                    current = {'server': server}
                    current['username'] = config.get(server, 'username')

                    # optional params
                    for key, default in (
                        ('repository', self.DEFAULT_REPOSITORY),
                        ('realm', self.DEFAULT_REALM),
                        ('password', None),
                    ):
                        if config.has_option(server, key):
                            current[key] = config.get(server, key)
                        else:
                            current[key] = default

                    # work around people having "repository" for the "pypi"
                    # section of their config set to the HTTP (rather than
                    # HTTPS) URL
                    if server == 'pypi' and repository in (
                        self.DEFAULT_REPOSITORY,
                        'pypi',
                    ):
                        current['repository'] = self.DEFAULT_REPOSITORY
                        return current

                    if (
                        current['server'] == repository
                        or current['repository'] == repository
                    ):
                        return current
            elif 'server-login' in sections:
                # old format
                server = 'server-login'
                if config.has_option(server, 'repository'):
                    repository = config.get(server, 'repository')
                else:
                    repository = self.DEFAULT_REPOSITORY
                return {
                    'username': config.get(server, 'username'),
                    'password': config.get(server, 'password'),
                    'repository': repository,
                    'server': server,
                    'realm': self.DEFAULT_REALM,
                }

        return {}

    def _read_pypi_response(self, response):
        """Read and decode a PyPI HTTP response."""
        import cgi

        content_type = response.getheader('content-type', 'text/plain')
        encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii')
        return response.read().decode(encoding)

    def initialize_options(self):
        """Initialize options."""
        self.repository = None
        self.realm = None
        self.show_response = 0

    def finalize_options(self):
        """Finalizes options."""
        if self.repository is None:
            self.repository = self.DEFAULT_REPOSITORY
        if self.realm is None:
            self.realm = self.DEFAULT_REALM
python3.12/site-packages/setuptools/_distutils/dir_util.py000064400000017610151732703710017715 0ustar00"""distutils.dir_util

Utility functions for manipulating directories and directory trees."""

import os
import errno
from .errors import DistutilsInternalError, DistutilsFileError
from ._log import log

# cache for by mkpath() -- in addition to cheapening redundant calls,
# eliminates redundant "creating /foo/bar/baz" messages in dry-run mode
_path_created = {}


def mkpath(name, mode=0o777, verbose=1, dry_run=0):  # noqa: C901
    """Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.

    os.makedirs is not used because:

    a) It's new to Python 1.5.2, and
    b) it blows up if the directory already exists (in which case it should
       silently succeed).
    """

    global _path_created

    # Detect a common bug -- name is None
    if not isinstance(name, str):
        raise DistutilsInternalError(
            "mkpath: 'name' must be a string (got {!r})".format(name)
        )

    # XXX what's the better way to handle verbosity? print as we create
    # each directory in the path (the current behaviour), or only announce
    # the creation of the whole path? (quite easy to do the latter since
    # we're not using a recursive algorithm)

    name = os.path.normpath(name)
    created_dirs = []
    if os.path.isdir(name) or name == '':
        return created_dirs
    if _path_created.get(os.path.abspath(name)):
        return created_dirs

    (head, tail) = os.path.split(name)
    tails = [tail]  # stack of lone dirs to create

    while head and tail and not os.path.isdir(head):
        (head, tail) = os.path.split(head)
        tails.insert(0, tail)  # push next higher dir onto stack

    # now 'head' contains the deepest directory that already exists
    # (that is, the child of 'head' in 'name' is the highest directory
    # that does *not* exist)
    for d in tails:
        # print "head = %s, d = %s: " % (head, d),
        head = os.path.join(head, d)
        abs_head = os.path.abspath(head)

        if _path_created.get(abs_head):
            continue

        if verbose >= 1:
            log.info("creating %s", head)

        if not dry_run:
            try:
                os.mkdir(head, mode)
            except OSError as exc:
                if not (exc.errno == errno.EEXIST and os.path.isdir(head)):
                    raise DistutilsFileError(
                        "could not create '{}': {}".format(head, exc.args[-1])
                    )
            created_dirs.append(head)

        _path_created[abs_head] = 1
    return created_dirs


def create_tree(base_dir, files, mode=0o777, verbose=1, dry_run=0):
    """Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    """
    # First get the list of directories to create
    need_dir = set()
    for file in files:
        need_dir.add(os.path.join(base_dir, os.path.dirname(file)))

    # Now create them
    for dir in sorted(need_dir):
        mkpath(dir, mode, verbose=verbose, dry_run=dry_run)


def copy_tree(  # noqa: C901
    src,
    dst,
    preserve_mode=1,
    preserve_times=1,
    preserve_symlinks=0,
    update=0,
    verbose=1,
    dry_run=0,
):
    """Copy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    """
    from distutils.file_util import copy_file

    if not dry_run and not os.path.isdir(src):
        raise DistutilsFileError("cannot copy tree '%s': not a directory" % src)
    try:
        names = os.listdir(src)
    except OSError as e:
        if dry_run:
            names = []
        else:
            raise DistutilsFileError(
                "error listing files in '{}': {}".format(src, e.strerror)
            )

    if not dry_run:
        mkpath(dst, verbose=verbose)

    outputs = []

    for n in names:
        src_name = os.path.join(src, n)
        dst_name = os.path.join(dst, n)

        if n.startswith('.nfs'):
            # skip NFS rename files
            continue

        if preserve_symlinks and os.path.islink(src_name):
            link_dest = os.readlink(src_name)
            if verbose >= 1:
                log.info("linking %s -> %s", dst_name, link_dest)
            if not dry_run:
                os.symlink(link_dest, dst_name)
            outputs.append(dst_name)

        elif os.path.isdir(src_name):
            outputs.extend(
                copy_tree(
                    src_name,
                    dst_name,
                    preserve_mode,
                    preserve_times,
                    preserve_symlinks,
                    update,
                    verbose=verbose,
                    dry_run=dry_run,
                )
            )
        else:
            copy_file(
                src_name,
                dst_name,
                preserve_mode,
                preserve_times,
                update,
                verbose=verbose,
                dry_run=dry_run,
            )
            outputs.append(dst_name)

    return outputs


def _build_cmdtuple(path, cmdtuples):
    """Helper for remove_tree()."""
    for f in os.listdir(path):
        real_f = os.path.join(path, f)
        if os.path.isdir(real_f) and not os.path.islink(real_f):
            _build_cmdtuple(real_f, cmdtuples)
        else:
            cmdtuples.append((os.remove, real_f))
    cmdtuples.append((os.rmdir, path))


def remove_tree(directory, verbose=1, dry_run=0):
    """Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    """
    global _path_created

    if verbose >= 1:
        log.info("removing '%s' (and everything under it)", directory)
    if dry_run:
        return
    cmdtuples = []
    _build_cmdtuple(directory, cmdtuples)
    for cmd in cmdtuples:
        try:
            cmd[0](cmd[1])
            # remove dir from cache if it's already there
            abspath = os.path.abspath(cmd[1])
            if abspath in _path_created:
                _path_created.pop(abspath)
        except OSError as exc:
            log.warning("error removing %s: %s", directory, exc)


def ensure_relative(path):
    """Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    """
    drive, path = os.path.splitdrive(path)
    if path[0:1] == os.sep:
        path = drive + path[1:]
    return path
python3.12/site-packages/setuptools/_distutils/bcppcompiler.py000064400000034602151732703710020561 0ustar00"""distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""

# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.

# XXX looks like there's a LOT of overlap between these two classes:
# someone should sit down and factor out the common code as
# WindowsCCompiler!  --GPW


import os
import warnings

from .errors import (
    DistutilsExecError,
    CompileError,
    LibError,
    LinkError,
    UnknownFileError,
)
from .ccompiler import CCompiler, gen_preprocess_options
from .file_util import write_file
from ._modified import newer
from ._log import log


warnings.warn(
    "bcppcompiler is deprecated and slated to be removed "
    "in the future. Please discontinue use or file an issue "
    "with pypa/distutils describing your use case.",
    DeprecationWarning,
)


class BCPPCompiler(CCompiler):
    """Concrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    """

    compiler_type = 'bcpp'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)

        # These executables are assumed to all be in the path.
        # Borland doesn't seem to use any special registry settings to
        # indicate their installation locations.

        self.cc = "bcc32.exe"
        self.linker = "ilink32.exe"
        self.lib = "tlib.exe"

        self.preprocess_options = None
        self.compile_options = ['/tWM', '/O2', '/q', '/g0']
        self.compile_options_debug = ['/tWM', '/Od', '/q', '/g0']

        self.ldflags_shared = ['/Tpd', '/Gn', '/q', '/x']
        self.ldflags_shared_debug = ['/Tpd', '/Gn', '/q', '/x']
        self.ldflags_static = []
        self.ldflags_exe = ['/Gn', '/q', '/x']
        self.ldflags_exe_debug = ['/Gn', '/q', '/x', '/r']

    # -- Worker methods ------------------------------------------------

    def compile(  # noqa: C901
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):
        macros, objects, extra_postargs, pp_opts, build = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        compile_opts = extra_preargs or []
        compile_opts.append('-c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            # XXX why do the normpath here?
            src = os.path.normpath(src)
            obj = os.path.normpath(obj)
            # XXX _setup_compile() did a mkpath() too but before the normpath.
            # Is it possible to skip the normpath?
            self.mkpath(os.path.dirname(obj))

            if ext == '.res':
                # This is already a binary file -- skip it.
                continue  # the 'for' loop
            if ext == '.rc':
                # This needs to be compiled to a .res file -- do it now.
                try:
                    self.spawn(["brcc32", "-fo", obj, src])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue  # the 'for' loop

            # The next two are both for the real compiler.
            if ext in self._c_extensions:
                input_opt = ""
            elif ext in self._cpp_extensions:
                input_opt = "-P"
            else:
                # Unknown file type -- no extra options.  The compiler
                # will probably fail, but let it just in case this is a
                # file the compiler recognizes even if we don't.
                input_opt = ""

            output_opt = "-o" + obj

            # Compiler command line syntax is: "bcc32 [options] file(s)".
            # Note that the source file names must appear at the end of
            # the command line.
            try:
                self.spawn(
                    [self.cc]
                    + compile_opts
                    + pp_opts
                    + [input_opt, output_opt]
                    + extra_postargs
                    + [src]
                )
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    # compile ()

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = [output_filename, '/u'] + objects
            if debug:
                pass  # XXX what goes here?
            try:
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # create_static_lib ()

    def link(  # noqa: C901
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        # XXX this ignores 'build_temp'!  should follow the lead of
        # msvccompiler.py

        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        (libraries, library_dirs, runtime_library_dirs) = self._fix_lib_args(
            libraries, library_dirs, runtime_library_dirs
        )

        if runtime_library_dirs:
            log.warning(
                "I don't know what to do with 'runtime_library_dirs': %s",
                str(runtime_library_dirs),
            )

        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            # Figure out linker args based on type of target.
            if target_desc == CCompiler.EXECUTABLE:
                startup_obj = 'c0w32'
                if debug:
                    ld_args = self.ldflags_exe_debug[:]
                else:
                    ld_args = self.ldflags_exe[:]
            else:
                startup_obj = 'c0d32'
                if debug:
                    ld_args = self.ldflags_shared_debug[:]
                else:
                    ld_args = self.ldflags_shared[:]

            # Create a temporary exports file for use by the linker
            if export_symbols is None:
                def_file = ''
            else:
                head, tail = os.path.split(output_filename)
                modname, ext = os.path.splitext(tail)
                temp_dir = os.path.dirname(objects[0])  # preserve tree structure
                def_file = os.path.join(temp_dir, '%s.def' % modname)
                contents = ['EXPORTS']
                for sym in export_symbols or []:
                    contents.append('  {}=_{}'.format(sym, sym))
                self.execute(write_file, (def_file, contents), "writing %s" % def_file)

            # Borland C++ has problems with '/' in paths
            objects2 = map(os.path.normpath, objects)
            # split objects in .obj and .res files
            # Borland C++ needs them at different positions in the command line
            objects = [startup_obj]
            resources = []
            for file in objects2:
                (base, ext) = os.path.splitext(os.path.normcase(file))
                if ext == '.res':
                    resources.append(file)
                else:
                    objects.append(file)

            for ell in library_dirs:
                ld_args.append("/L%s" % os.path.normpath(ell))
            ld_args.append("/L.")  # we sometimes use relative paths

            # list of object files
            ld_args.extend(objects)

            # XXX the command-line syntax for Borland C++ is a bit wonky;
            # certain filenames are jammed together in one big string, but
            # comma-delimited.  This doesn't mesh too well with the
            # Unix-centric attitude (with a DOS/Windows quoting hack) of
            # 'spawn()', so constructing the argument list is a bit
            # awkward.  Note that doing the obvious thing and jamming all
            # the filenames and commas into one argument would be wrong,
            # because 'spawn()' would quote any filenames with spaces in
            # them.  Arghghh!.  Apparently it works fine as coded...

            # name of dll/exe file
            ld_args.extend([',', output_filename])
            # no map file and start libraries
            ld_args.append(',,')

            for lib in libraries:
                # see if we find it and if there is a bcpp specific lib
                # (xxx_bcpp.lib)
                libfile = self.find_library_file(library_dirs, lib, debug)
                if libfile is None:
                    ld_args.append(lib)
                    # probably a BCPP internal library -- don't warn
                else:
                    # full name which prefers bcpp_xxx.lib over xxx.lib
                    ld_args.append(libfile)

            # some default libraries
            ld_args.extend(('import32', 'cw32mt'))

            # def file for export symbols
            ld_args.extend([',', def_file])
            # add resource files
            ld_args.append(',')
            ld_args.extend(resources)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath(os.path.dirname(output_filename))
            try:
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # link ()

    # -- Miscellaneous methods -----------------------------------------

    def find_library_file(self, dirs, lib, debug=0):
        # List of effective library names to try, in order of preference:
        # xxx_bcpp.lib is better than xxx.lib
        # and xxx_d.lib is better than xxx.lib if debug is set
        #
        # The "_bcpp" suffix is to handle a Python installation for people
        # with multiple compilers (primarily Distutils hackers, I suspect
        # ;-).  The idea is they'd have one static library for each
        # compiler they care about, since (almost?) every Windows compiler
        # seems to have a different format for static libraries.
        if debug:
            dlib = lib + "_d"
            try_names = (dlib + "_bcpp", lib + "_bcpp", dlib, lib)
        else:
            try_names = (lib + "_bcpp", lib)

        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # overwrite the one from CCompiler to support rc and res-files
    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        if output_dir is None:
            output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            # use normcase to make sure '.rc' is really '.rc' and not '.RC'
            (base, ext) = os.path.splitext(os.path.normcase(src_name))
            if ext not in (self.src_extensions + ['.rc', '.res']):
                raise UnknownFileError(
                    "unknown file type '{}' (from '{}')".format(ext, src_name)
                )
            if strip_dir:
                base = os.path.basename(base)
            if ext == '.res':
                # these can go unchanged
                obj_names.append(os.path.join(output_dir, base + ext))
            elif ext == '.rc':
                # these need to be compiled to .res-files
                obj_names.append(os.path.join(output_dir, base + '.res'))
            else:
                obj_names.append(os.path.join(output_dir, base + self.obj_extension))
        return obj_names

    # object_filenames ()

    def preprocess(
        self,
        source,
        output_file=None,
        macros=None,
        include_dirs=None,
        extra_preargs=None,
        extra_postargs=None,
    ):
        (_, macros, include_dirs) = self._fix_compile_args(None, macros, include_dirs)
        pp_opts = gen_preprocess_options(macros, include_dirs)
        pp_args = ['cpp32.exe'] + pp_opts
        if output_file is not None:
            pp_args.append('-o' + output_file)
        if extra_preargs:
            pp_args[:0] = extra_preargs
        if extra_postargs:
            pp_args.extend(extra_postargs)
        pp_args.append(source)

        # We need to preprocess: either we're being forced to, or the
        # source file is newer than the target (or the target doesn't
        # exist).
        if self.force or output_file is None or newer(source, output_file):
            if output_file:
                self.mkpath(os.path.dirname(output_file))
            try:
                self.spawn(pp_args)
            except DistutilsExecError as msg:
                print(msg)
                raise CompileError(msg)

    # preprocess()
python3.12/site-packages/setuptools/__pycache__/glob.cpython-312.pyc000064400000013624151732703710021204 0ustar00�

��_i���dZddlZddlZddlZgd�Zdd�Zdd�Zd�Zd�Zd�Z	d	�Z
d
�Zejd�Z
ejd�Zd
�Zd�Zd�Zy)z�
Filename globbing utility. Mostly a copy of `glob` from Python 3.5.

Changes include:
 * `yield from` and PEP3102 `*` removed.
 * Hidden files are not ignored.
�N)�glob�iglob�escapec�.�tt||���S)ayReturn a list of paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    )�	recursive)�listr)�pathnamers  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/glob.pyrrs����h�)�4�5�5�c�V�t||�}|rt|�rt|�}|rJ�|S)a�Return an iterator which yields the paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    )�_iglob�_isrecursive�next)r	r�it�ss    r
rrs/��
��)�	$�B��\�(�+���H����u�
�Irc#�(K�tjj|�\}}|rt|�rtnt
}t
|�sJ|r$tjj|�r|��ytjj|�r|��y|s|||�Ed{���y||k7rt
|�r
t||�}n|g}t
|�st}|D]2}|||�D]$}tjj||����&�4y7�n�w�N)�os�path�splitr�glob2�glob1�	has_magic�lexists�isdirr
�glob0�join)r	r�dirname�basename�glob_in_dir�dirs�names       r
r
r
0s��������
�
�h�/��G�X�$��h�)?�%�U�K��X����w�w���x�(���
	��w�w�}�}�W�%������w��1�1�1���(��y��1��g�y�)���y���X���������2�D��'�'�,�,�w��-�-�3��	2�s�BD�!D�"A/Dc��|s@t|t�r tjj	d�}ntj}	tj
|�}tj||�S#t$rgcYSwxYw�N�ASCII)	�
isinstance�bytesr�curdir�encode�listdir�OSError�fnmatch�filter)r�pattern�namess   r
rrTsh����g�u�%��i�i�&�&�w�/�G��i�i�G���
�
�7�#���>�>�%��)�)�����	��s�A/�/A=�<A=c���|s$tjj|�r|gSgStjjtjj	||��r|gSgSr)rrrrr)rrs  r
rrasT����7�7�=�=��!��:���I��7�7�?�?�2�7�7�<�<���:�;��:��
�Irc#�\K�t|�sJ�|dd��t|�D]}|���y�w)Nr)r�	_rlistdir)rr.�xs   r
rrqs4������ � � �
�"�1�+��
�w�
���� �s�*,c#�K�|s@t|t�r tjj	d�}ntj}	tj
|�}|D]\}|��|r tjj||�n|}t|�D]$}tjj||����&�^y#tj$rYywxYw�wr$)
r&r'rr(r)r*�errorrrr2)rr/r3r�ys     r
r2r2ys�������g�u�%��i�i�&�&�w�/�G��i�i�G���
�
�7�#������+2�r�w�w�|�|�G�Q�'����4��A��'�'�,�,�q�!�$�$�!����8�8����s+�AC�B=�A"C�=C�C�C�Cz([*?[])s([*?[])c��t|t�rtj|�}|duStj|�}|duSr)r&r'�magic_check_bytes�search�magic_check)r�matchs  r
rr�sF���!�U��!�(�(��+�������"�"�1�%�����rc�6�t|t�r|dk(S|dk(S)Ns**z**)r&r')r.s r
rr�s!���'�5�!��%����$��rc���tjj|�\}}t|t�rt
j
d|�}||zStj
d|�}||zS)zEscape all special characters.s[\1]z[\1])rr�
splitdriver&r'r8�subr:)r	�drives  r
rr�sb���g�g�(�(��2�O�E�8��(�E�"�$�(�(��8�<���8����?�?�7�H�5���8��r)F)�__doc__r�rer,�__all__rrr
rrrr2�compiler:r8rrr�rr
�<module>rFsp���
�	��
%��6��$.�H
*�	� �%�"�b�j�j��#���B�J�J�z�*����	rpython3.12/site-packages/setuptools/__pycache__/build_meta.cpython-312.pyc000064400000055621151732703710022371 0ustar00�

��_i�H��,�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZmZmZmZddlZddlZddlmZddlmZddlmZdd	l	mZdd
lmZgd�Zej<dd
�j?�Z de jCdd�vZ"Gd�de#�Z$Gd�dejJjL�Z&ejNd��Z(d�Z)d�Z*d�Z+ejNd��Z,ee
e-ee-ee-dffZ.	Gd�d�Z/Gd�de/�Z0Gd�de0�Z1e0�Z2e2jfZ3e2jhZ4e2jjZ5e2jlZ6e2jnZ7e"s$e2jpZ8e2jrZ9e2jtZ:e1�Z;y) a-A PEP 517 interface to setuptools

Previously, when a user or a command line tool (let's call it a "frontend")
needed to make a request of setuptools to take a certain action, for
example, generating a list of installation requirements, the frontend would
would call "setup.py egg_info" or "setup.py bdist_wheel" on the command line.

PEP 517 defines a different method of interfacing with setuptools. Rather
than calling "setup.py" directly, the frontend should:

  1. Set the current directory to the directory with a setup.py file
  2. Import this module into a safe python interpreter (one in which
     setuptools can potentially set global variables or crash hard).
  3. Call one of the functions defined in PEP 517.

What each function does is defined in PEP 517. However, here is a "casual"
definition of the functions (this definition should not be relied on for
bug reports or API stability):

  - `build_wheel`: build a wheel in the folder and return the basename
  - `get_requires_for_build_wheel`: get the `setup_requires` to build
  - `prepare_metadata_for_build_wheel`: get the `install_requires`
  - `build_sdist`: build an sdist in the folder and return the basename
  - `get_requires_for_build_sdist`: get the `setup_requires` to build

Again, this is not a formal definition! Just a "taste" of the module.
�N)�Path)�Dict�Iterator�List�Optional�Union�)�errors)�	same_path)�
parse_strings)�SetuptoolsDeprecationWarning)�	strtobool)
�get_requires_for_build_sdist�get_requires_for_build_wheel� prepare_metadata_for_build_wheel�build_wheel�build_sdist�get_requires_for_build_editable�#prepare_metadata_for_build_editable�build_editable�
__legacy__�SetupRequirementsError�SETUPTOOLS_ENABLE_FEATURES�zlegacy-editable�_�-c��eZdZd�Zy)rc��||_y�N)�
specifiers)�selfr s  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/build_meta.py�__init__zSetupRequirementsError.__init__Ds	��$���N)�__name__�
__module__�__qualname__r#�r$r"rrCs��%r$rc�@�eZdZd�Zeejd���Zy)�Distributionc�@�tt|��}t|��r)�listrr)r!r �specifier_lists   r"�fetch_build_eggszDistribution.fetch_build_eggsIs���m�J�7�8��$�^�4�4r$c#��K�tjj}|tj_	d��|tj_y#|tj_wxYw�w)zw
        Replace
        distutils.dist.Distribution with this class
        for the duration of this context.
        N)�	distutils�corer*)�cls�origs  r"�patchzDistribution.patchNsC�����~�~�*�*��&)�	���#�	/��*.�I�N�N�'��$�I�N�N�'�s�0A'�A
�A'�
A$�$A'N)r%r&r'r.�classmethod�
contextlib�contextmanagerr4r(r$r"r*r*Hs)��5�
����/���/r$r*c#�K�tj}d�t_	d��|t_y#|t_wxYw�w)a
Temporarily disable installing setup_requires

    Under PEP 517, the backend reports build dependencies to the frontend,
    and the frontend is responsible for ensuring they're installed.
    So setuptools (acting as a backend) should not try to install them.
    c��yrr()�attrss r"�<lambda>z+no_install_setup_requires.<locals>.<lambda>gs��tr$N)�
setuptools�_install_setup_requires)r3s r"�no_install_setup_requiresr>^s3�����-�-�D�);�J�&�2�
�-1�
�*��T�
�*�s�A�0�A�
=�Ac	���tj|�D�cgc]B}tjjtjj	||��s�A|��Dc}Scc}wr)�os�listdir�path�isdir�join)�a_dir�names  r"�_get_immediate_subdirectoriesrGnsL�����E�*��*��b�g�g�m�m�B�G�G�L�L��PT�<U�.V��*����s�AA"�A"c�~���fd�tj|�D�}	|\}|S#t$rtd��wxYw)Nc3�F�K�|]}|j��s�|���y�wr)�endswith)�.0�f�	extensions  �r"�	<genexpr>z'_file_with_extension.<locals>.<genexpr>us�����J�0�a�A�J�J�y�4I��0�s�!�!z[No distribution was found. Ensure that `setup.py` is not empty and that it calls `setup()`.)r@rA�
ValueError)�	directoryrM�matching�files `  r"�_file_with_extensionrStsL���J�2�:�:�i�0�J�H�
�����K���
��
8�
�	
�
�s�'�<c��tjj|�stjd�Sttdt�|�S)Nz%from setuptools import setup; setup()�open)r@rB�exists�io�StringIO�getattr�tokenizerU��setup_scripts r"�_open_setup_scriptr]�s8��
�7�7�>�>�,�'��{�{�C�D�D�*�7�8�V�T�*�<�8�8r$c#�K�tj�5tjdd�d��ddd�y#1swYyxYw�w)N�ignorezsetup.py install is deprecated)�warnings�catch_warnings�filterwarningsr(r$r"�suppress_known_deprecationrc�s1����	�	 �	 �	"�����*J�K�
�
#�	"�	"�s�A�;�	A�A�Ac��eZdZdZdededeefd�Zdedeefd�Z	dedeefd�Z
dedeefd�Zdedeefd	�Zy
)�_ConfigSettingsTranslatorz�Translate ``config_settings`` into distutils-style command arguments.
    Only a limited number of options is currently supported.
    �key�config_settings�returnc��|xsi}|j|�xsg}t|t�rtj|�S|S)aA
        Get the value of a specific key in ``config_settings`` as a list of strings.

        >>> fn = _ConfigSettingsTranslator()._get_config
        >>> fn("--global-option", None)
        []
        >>> fn("--global-option", {})
        []
        >>> fn("--global-option", {'--global-option': 'foo'})
        ['foo']
        >>> fn("--global-option", {'--global-option': ['foo']})
        ['foo']
        >>> fn("--global-option", {'--global-option': 'foo'})
        ['foo']
        >>> fn("--global-option", {'--global-option': 'foo bar'})
        ['foo', 'bar']
        )�get�
isinstance�str�shlex�split)r!rfrg�cfg�optss     r"�_get_configz%_ConfigSettingsTranslator._get_config�s=��$�#����w�w�s�|�!�r��$.�t�S�$9�u�{�{�4� �C�t�Cr$c#�K�|xsi}hd�}d|vsd|vrIt|jd�xs|jd�xsd�}|j�|vrdnd��d|vsd|vrIt|jd�xs|jd�xsd�}|j�|vrdnd��|jd	|�Ed
{���y
7��w)a�
        Let the user specify ``verbose`` or ``quiet`` + escape hatch via
        ``--global-option``.
        Note: ``-v``, ``-vv``, ``-vvv`` have similar effects in setuptools,
        so we just have to cover the basic scenario ``-v``.

        >>> fn = _ConfigSettingsTranslator()._global_args
        >>> list(fn(None))
        []
        >>> list(fn({"verbose": "False"}))
        ['-q']
        >>> list(fn({"verbose": "1"}))
        ['-v']
        >>> list(fn({"--verbose": None}))
        ['-v']
        >>> list(fn({"verbose": "true", "--global-option": "-q --no-user-cfg"}))
        ['-v', '-q', '--no-user-cfg']
        >>> list(fn({"--quiet": None}))
        ['-q']
        >�0�no�off�false�verbosez	--verbose�1z-qz-v�quietz--quietz--global-optionN)rlrj�lowerrq)r!rgro�falsey�levels     r"�_global_argsz&_ConfigSettingsTranslator._global_args�s�����*�#���,�����{�c�1�����	�*�I�c�g�g�k�.B�I�c�J�E� �;�;�=�F�2�4��=��c�>�Y�#�-������(�E�C�G�G�I�,>�E�#�F�E� �;�;�=�F�2�4��=��#�#�$5��G�G�G�s�CC�C
�Cc#�K�|xsi}d|vr#tt|dxsd��}|rdnd��d|vrdt|d�gEd{���yy7��w)a�
        The ``dist_info`` command accepts ``tag-date`` and ``tag-build``.

        .. warning::
           We cannot use this yet as it requires the ``sdist`` and ``bdist_wheel``
           commands run in ``build_sdist`` and ``build_wheel`` to reuse the egg-info
           directory created in ``prepare_metadata_for_build_wheel``.

        >>> fn = _ConfigSettingsTranslator()._ConfigSettingsTranslator__dist_info_args
        >>> list(fn(None))
        []
        >>> list(fn({"tag-date": "False"}))
        ['--no-date']
        >>> list(fn({"tag-date": None}))
        ['--no-date']
        >>> list(fn({"tag-date": "true", "tag-build": ".a"}))
        ['--tag-date', '--tag-build', '.a']
        ztag-datervz
--tag-datez	--no-datez	tag-buildz--tag-buildN)rrl)r!rgro�vals    r"�__dist_info_argsz*_ConfigSettingsTranslator.__dist_info_args�sd����&�#�������C��J�� :�7�;�<�C�#&�<�K�8��#��%�s�3�{�+;�'<�=�=�=��=�s�AA�A�Ac#�K�|xsi}|jd�xs|jd�}|sydt|�gEd{���y7��w)a
        The ``editable_wheel`` command accepts ``editable-mode=strict``.

        >>> fn = _ConfigSettingsTranslator()._editable_args
        >>> list(fn(None))
        []
        >>> list(fn({"editable-mode": "strict"}))
        ['--mode', 'strict']
        z
editable-mode�
editable_modeNz--mode)rjrl)r!rgro�modes    r"�_editable_argsz(_ConfigSettingsTranslator._editable_args�sF�����#����w�w��'�C�3�7�7�?�+C�����c�$�i�(�(�(�s�>A�A�Ac#�DK�|jd|�Ed{���y7��w)av
        Users may expect to pass arbitrary lists of arguments to a command
        via "--global-option" (example provided in PEP 517 of a "escape hatch").

        >>> fn = _ConfigSettingsTranslator()._arbitrary_args
        >>> list(fn(None))
        []
        >>> list(fn({}))
        []
        >>> list(fn({'--build-option': 'foo'}))
        ['foo']
        >>> list(fn({'--build-option': ['foo']}))
        ['foo']
        >>> list(fn({'--build-option': 'foo'}))
        ['foo']
        >>> list(fn({'--build-option': 'foo bar'}))
        ['foo', 'bar']
        >>> list(fn({'--global-option': 'foo'}))
        []
        z--build-optionN)rq�r!rgs  r"�_arbitrary_argsz)_ConfigSettingsTranslator._arbitrary_argss����*�#�#�$4�o�F�F�F�s� �� N)
r%r&r'�__doc__rl�_ConfigSettingsrrqrr}�)_ConfigSettingsTranslator__dist_info_argsr�r�r(r$r"rere�s����D�s�D�_�D��c��D�,H�O�H���
�H�@>��>�H�S�M�>�4)�o�)�(�3�-�)� G��G�8�C�=�Gr$rec��eZdZd�Zdd�Zdd�Zdd�Zdededefd	�Zdedede	fd
�Z
	dd�Zd�Z	dd
�Z
dd�Zdeedeefd�Zes	dd�Zdd�Z	dd�Zyy)�_BuildMetaBackendc�*�gtjdd�|j|��d�t_	tj	�5|j�ddd�|S#1swY|SxYw#t$r}||jz
}Yd}~|Sd}~wwxYw)Nr	�egg_info)�sys�argvr}r*r4�	run_setuprr )r!rg�requirements�es    r"�_get_build_requiresz%_BuildMetaBackend._get_build_requiress���
�
�X�X�b�q�\�
�
�
�
��
/�
�
�
���
	)��#�#�%���� �&�
��&�
���&�	)��A�L�L�(�L����	)�s5�A/�A"�A/�"A,�'A/�,A/�/	B�8B
�
Bc�f�tjj|�}d}t|�5}|j	�jdd�}ddd�	t
t��y#1swY�xYw#t$r/}|jr�tjddd��Yd}~yd}~wwxYw)N�__main__z\r\nz\nz6Running `setup.py` directly as CLI tool is deprecated.znPlease avoid using `sys.exit(0)` or similar statements that don't fit in the paradigm of a configuration file.zAhttps://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)�see_url)r@rB�abspathr]�read�replace�exec�locals�
SystemExit�coder
�emit)r!r\�__file__r%rLr�r�s       r"r�z_BuildMetaBackend.run_setup-s����7�7�?�?�<�0����
��
)�Q��6�6�8�#�#�G�U�3�D�*�	���v�x� �	*�
)��
�
	��v�v��(�-�-�H�J�+�	
�
��	
	�s#�!A,�A8�,A5�8	B0�%B+�+B0Nc�*�|j|dg��S)N�wheel�r��r�r�s  r"rz._BuildMetaBackend.get_requires_for_build_wheelDs���'�'��w�i�'�P�Pr$c�(�|j|g��S)Nr�r�r�s  r"rz._BuildMetaBackend.get_requires_for_build_sdistGs���'�'��b�'�I�Ir$�metadata_directory�suffixrhc��|j||�}t|j|�stjt|�|�|jS)z�
        PEP 517 requires that the .dist-info directory be placed in the
        metadata_directory. To comply, we MUST copy the directory to the root.

        Returns the basename of the info directory, e.g. `proj-0.0.0.dist-info`.
        )�_find_info_directoryr�parent�shutil�moverlrF)r!r�r��info_dirs    r"�_bubble_up_info_directoryz+_BuildMetaBackend._bubble_up_info_directoryJsC���,�,�-?��H������*<�=��K�K��H�
�'9�:��}�}�r$c�P�tj|�D]m\}}}|D�cgc]}|j|�s�|��}}t|�dk7st|�dk7s�Et|�dk(sJd|�d���t	||d�cSd|�d|��}tj|��cc}w)Nrr	z	Multiple z directories foundzNo z directory found in )r@�walkrJ�lenrr
�
InternalError)	r!r�r�r��dirsrrL�
candidates�msgs	         r"r�z&_BuildMetaBackend._find_info_directoryWs���!�w�w�'9�:�O�F�D�!�%)�@�T��Q�Z�Z��-?�!�T�J�@��:��!�#�s�4�y�A�~��:��!�+�S�y���@R�-S�S�+��F�J�q�M�2�2� ;��F�8�/�0B�/C�D���"�"�3�'�'��As
�B#�B#c��gtjdd�|j|��d�d�|�d�t_t�5|j	�ddd�|j|d�|j|d�S#1swY�-xYw)Nr	�	dist_infoz--output-dirz--keep-egg-infoz	.egg-infoz
.dist-info)r�r�r}r>r�r��r!r�rgs   r"rz2_BuildMetaBackend.prepare_metadata_for_build_wheelbs���
�
�X�X�b�q�\�
�
�
�
��
/�
�
�
�
�	
�

�
�
�

���'�
(��N�N��)�	
�&�&�'9�;�G��-�-�.@�,�O�O�	)�
(�s�A?�?Bc���tjj|�}tj|d��d|d�}t	j
di|��5}gtjdd�|j|��|�d�|�t_t�5|j�ddd�t||�}tjj||�}tjj|�rtj|�tjtjj||�|�ddd�|S#1swY��xYw#1swYSxYw)NT)�exist_okz.tmp-)�prefix�dirr	z
--dist-dirr()r@rBr��makedirs�tempfile�TemporaryDirectoryr�r�r}r>r�rSrDrV�remove�rename)	r!�
setup_command�result_extension�result_directoryrg�	temp_opts�tmp_dist_dir�result_basename�result_paths	         r"�_build_with_temp_dirz&_BuildMetaBackend._build_with_temp_dirss+���7�7�?�?�+;�<��	���$�t�4�&�/?�@�	�
�
(�
(�
5�9�
5������"�1����"�"�?�3�����	�
��C�H�+�,���� �-�3�<�AQ�R�O��'�'�,�,�'7��I�K��w�w�~�~�k�*��	�	�+�&��I�I�b�g�g�l�l�<��A�;�O�!6�$��-�,��6�$��s&�AE�E�"BE�E	�
E�Ec��t�5|jdg|j|��d||�cddd�S#1swYyxYw)N�bdist_wheel�.whl)rcr�r�)r!�wheel_directoryrgr�s    r"rz_BuildMetaBackend.build_wheel�sC��(�
)��,�,��G��!5�!5�o�!F�G����	�*�
)�
)�s	�&;�Ac�.�|jgd�d||�S)N)�sdistz	--formats�gztarz.tar.gz)r�)r!�sdist_directoryrgs   r"rz_BuildMetaBackend.build_sdist�s���(�(�+�Y���
�	
r$c��|sytt|�jd��}t|�dksJ�|rt	|d�SdS)Nz*.dist-infor	r)r,r�globr�rl)r!r��dist_info_candidatess   r"�_get_dist_info_dirz$_BuildMetaBackend._get_dist_info_dir�sP��!��#�D�);�$<�$A�$A�-�$P�Q���'�(�A�-�-�-�/C�s�'��*�+�M��Mr$c���|j|�}|rd|gng}dg|�|j|��}t�5|j|d||�cddd�S#1swYyxYw)Nz--dist-info-dir�editable_wheelr�)r�r�rcr�)r!r�rgr�r�rp�cmds       r"rz _BuildMetaBackend.build_editable�sj���.�.�/A�B�H�4<�%�x�0�"�D�#�R�d�R�T�-@�-@��-Q�R�C�+�-��0�0����/��.�-�-�s�A�A!c�$�|j|�Sr)rr�s  r"rz1_BuildMetaBackend.get_requires_for_build_editable�s���4�4�_�E�Er$c�&�|j||�Sr)rr�s   r"rz5_BuildMetaBackend.prepare_metadata_for_build_editable�s���8�8�"�O��
r$�zsetup.pyr)NN)r%r&r'r�r�rrrlr�rr�rr�rrrr��LEGACY_EDITABLErrrr(r$r"r�r�s�����.Q�J��C����QT��	(�s�	(�C�	(�D�	(�37�P�"�<IM�	�
�
N�X�c�]�N�x�PS�}�N��MQ�
	�	F�7;�	�)r$r�c�$��eZdZdZd�fd�	Z�xZS)�_BuildMetaLegacyBackendaOCompatibility backend for setuptools

    This is a version of setuptools.build_meta that endeavors
    to maintain backwards
    compatibility with pre-PEP 517 modes of invocation. It
    exists as a temporary
    bridge between the old packaging mechanism and the new
    packaging mechanism,
    and will eventually be removed.
    c�,��ttj�}tjj	tjj|��}|tjvr tjj
d|�tjd}|tjd<	tt|�+|��|tjdd|tjd<y#|tjdd|tjd<wxYw)Nrr[)r,r�rBr@�dirnamer��insertr��superr�r�)r!r\�sys_path�
script_dir�
sys_argv_0�	__class__s     �r"r�z!_BuildMetaLegacyBackend.run_setup�s��������>���W�W�_�_�R�W�W�_�_�\�%B�C�
��S�X�X�%��H�H�O�O�A�z�*�
�X�X�a�[�
�"������		%��)�4�:��:�U�#�C�H�H�Q�K�$�C�H�H�Q�K��#�C�H�H�Q�K�$�C�H�H�Q�K�s�0C+�+(Dr�)r%r&r'r�r��
__classcell__)r�s@r"r�r��s���	�%�%r$r�)<r�rWr@rmr�rZr�r6r�r`�pathlibr�typingrrrrrr<r0rr
�_pathr�_reqsrr
�distutils.utilr�__all__�getenvrzrr�r��
BaseExceptionr�distr*r7r>rGrSr]rcrlr�rer�r��_BACKENDrrrrrrrrrr(r$r"�<module>r�s����8
�	��
��
�����8�8����� �2�$���'�R�Y�Y�'C�R�H�N�N�P��#�'A�'I�'I�#�s�'S�S��%�]�%�
/�:�?�?�/�/�/�,���2��2��	�9��������4��U�3��S�	�4�+?�%@� @�A�B���|G�|G�~b�1�b�J%%�/�%%�R���'�D�D��'�D�D��#+�#L�#L� ��"�"���"�"���&.�&N�&N�#�*2�*V�*V�'��,�,�N�%�
&�
r$python3.12/site-packages/setuptools/__pycache__/modified.cpython-312.pyc000064400000000620151732703720022032 0ustar00�

��_i���$�ddlmZmZmZmZgd�Zy)�)�newer�newer_pairwise�newer_group�newer_pairwise_groupN)�_distutils._modifiedrrrr�__all__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/modified.py�<module>rs����M�r
python3.12/site-packages/setuptools/__pycache__/extension.cpython-312.pyc000064400000014576151732703720022305 0ustar00�

��_i����ddlZddlZddlZddlZddlZddlmZd�ZeZ	eejj�ZGd�de�ZGd�de�Z
y)	�N�)�
get_unpatchedc�X�d}	t|dg��jy#t$rYywxYw)z0
    Return True if Cython can be imported.
    zCython.Distutils.build_ext�	build_ext)�fromlistTF)�
__import__r�	Exception)�cython_impls ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/extension.py�_have_cythonr
s8��/�K�
��;�+��7�A�A����
���
�s��	)�)c�(��eZdZdZ�fd�Zd�Z�xZS)�	Extensiona�
    Describes a single extension module.

    This means that all source files will be compiled into a single binary file
    ``<module path>.<suffix>`` (with ``<module path>`` derived from ``name`` and
    ``<suffix>`` defined by one of the values in
    ``importlib.machinery.EXTENSION_SUFFIXES``).

    In the case ``.pyx`` files are passed as ``sources and`` ``Cython`` is **not**
    installed in the build environment, ``setuptools`` may also try to look for the
    equivalent ``.cpp`` or ``.c`` files.

    :arg str name:
      the full name of the extension, including any packages -- ie.
      *not* a filename or pathname, but Python dotted name

    :arg list[str] sources:
      list of source filenames, relative to the distribution root
      (where the setup script lives), in Unix form (slash-separated)
      for portability.  Source files may be C, C++, SWIG (.i),
      platform-specific resource files, or whatever else is recognized
      by the "build_ext" command as source for a Python extension.

    :keyword list[str] include_dirs:
      list of directories to search for C/C++ header files (in Unix
      form for portability)

    :keyword list[tuple[str, str|None]] define_macros:
      list of macros to define; each macro is defined using a 2-tuple:
      the first item corresponding to the name of the macro and the second
      item either a string with its value or None to
      define it without a particular value (equivalent of "#define
      FOO" in source or -DFOO on Unix C compiler command line)

    :keyword list[str] undef_macros:
      list of macros to undefine explicitly

    :keyword list[str] library_dirs:
      list of directories to search for C/C++ libraries at link time

    :keyword list[str] libraries:
      list of library names (not filenames or paths) to link against

    :keyword list[str] runtime_library_dirs:
      list of directories to search for C/C++ libraries at run time
      (for shared extensions, this is when the extension is loaded).
      Setting this will cause an exception during build on Windows
      platforms.

    :keyword list[str] extra_objects:
      list of extra files to link with (eg. object files not implied
      by 'sources', static library that must be explicitly specified,
      binary resource files, etc.)

    :keyword list[str] extra_compile_args:
      any extra platform- and compiler-specific information to use
      when compiling the source files in 'sources'.  For platforms and
      compilers where "command line" makes sense, this is typically a
      list of command-line arguments, but for other platforms it could
      be anything.

    :keyword list[str] extra_link_args:
      any extra platform- and compiler-specific information to use
      when linking object files together to create the extension (or
      to create a new static Python interpreter).  Similar
      interpretation as for 'extra_compile_args'.

    :keyword list[str] export_symbols:
      list of symbols to be exported from a shared extension.  Not
      used on all platforms, and not generally necessary for Python
      extensions, which typically export exactly one symbol: "init" +
      extension_name.

    :keyword list[str] swig_opts:
      any extra options to pass to SWIG if a source file has the .i
      extension.

    :keyword list[str] depends:
      list of files that the extension depends on

    :keyword str language:
      extension language (i.e. "c", "c++", "objc"). Will be detected
      from the source extensions if not provided.

    :keyword bool optional:
      specifies that a build failure in the extension should not abort the
      build process, but simply not install the failing extension.

    :keyword bool py_limited_api:
      opt-in flag for the usage of :doc:`Python's limited API <python:c-api/stable>`.

    :raises setuptools.errors.PlatformError: if 'runtime_library_dirs' is
      specified on Windows. (since v63)
    c�\��|jdd�|_t�|�||g|��i|��y)N�py_limited_apiF)�popr�super�__init__)�self�name�sources�args�kw�	__class__s     �rrzExtension.__init__~s2���!�f�f�%5�u�=���
����w�4��4��4�c��t�ry|jxsd}|j�dk(rdnd}tjt
jd|�}tt||j��|_	y)z�
        Replace sources with .pyx extensions to sources with the target
        language extension. This mechanism allows language authors to supply
        pre-converted sources but to prefer the .pyx sources.
        N�zc++z.cppz.cz.pyx$)
r�language�lower�	functools�partial�re�sub�list�mapr)r�lang�
target_extr"s    r�_convert_pyx_sources_to_langz&Extension._convert_pyx_sources_to_lang�s]���>���}�}�"���#�z�z�|�u�4�V�$�
���������<���C��T�\�\�2�3��r)�__name__�
__module__�__qualname__�__doc__rr'�
__classcell__)rs@rrrs���]�~5�4rrc��eZdZdZy)�Libraryz=Just like a regular Extension, but built as a library insteadN)r(r)r*r+�rrr.r.�s��Grr.)r!r�distutils.core�	distutils�distutils.errors�distutils.extension�monkeyrr�
have_pyrex�corer�
_Extensionr.r/rr�<module>r8sT��	�����!���
�
�9�>�>�3�3�
4�
�r4�
�r4�jH�i�Hrpython3.12/site-packages/setuptools/__pycache__/warnings.cpython-312.pyc000064400000011607151732703720022111 0ustar00�

��_iq���dZddlZddlZddlmZddlmZddlmZddl	m
Z
mZeeeefZ
dZd�d	d��ZGd
�de�ZGd�d
e�ZGd�de�Zd�Zy)z�Provide basic warnings used by setuptools modules.

Using custom classes (other than ``UserWarning``) allow users to set
``PYTHONWARNINGS`` filters to run tests and prepare for upcoming changes in
setuptools.
�N)�date)�cleandoc)�indent)�Optional�Tuplez        zP********************************************************************************z
{details}
c��eZdZdZe						ddeedeedeedeedeedefd	��Z	e			d
dededee
deed
eef
d��Zy)�SetuptoolsWarningz/Base class in ``setuptools`` warning hierarchy.N�summary�details�due_date�see_docs�see_url�
stacklevelc��|xst|dd�xsd}|xst|dd�xsd}	|xs
t|dd�}|xs
t|dd�}
|
xrd|
��}|xs
t|dd�}|rt|�nd}|j||	||xs||�}
|r)|tj�krt	�r||
��tj|
||d	z�
�y)�6Private: reserved for ``setuptools`` internal use only�_SUMMARYN��_DETAILS�	_DUE_DATE�	_SEE_DOCSz%https://setuptools.pypa.io/en/latest/�_SEE_URL�)r)�getattrr�_format�today�_should_enforce�warnings�warn)�clsr
rrr
rr�kwargs�summary_�details_�docs_ref�docs_url�due�texts              ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/warnings.py�emitzSetuptoolsWarning.emits����B�g�c�:�t�<�B����B�g�c�:�t�<�B����>�w�s�K��>���>�w�s�K��>���R�"G��z� R���;�W�S�*�d�;��!)�d�H�o�t���{�{�8�X�s�G�4G�x��P���3�����%�/�*;��d�)�O��
�
�d�C�J��N�;��format_argsc��tj�}t|�j|xsi�}t|�j|xsi�|r||kDrd|d�d�nd|r||krdnd|rd|�d�ndg}|D�cgc]}|s�|��	}	}|	rHt	t
j
dj|	��	�t�}
dj|d
|
dg�S|Scc}w)rz
By z%Y-%b-%dzi, you need to update your project and remove deprecated calls
or your builds will no longer be supported.Nzy
This deprecation is overdue, please update your project and remove deprecated
calls to avoid build errors in the future.z
See z
 for details.�
)rz!!
z
!!)	rrr�
format_mapr�	_TEMPLATE�format�join�_INDENT)rr
rrrr*r�possible_parts�x�parts�bodys           r'rzSetuptoolsWarning._format1s����
�
����7�#�.�.�{�/@�b�A���W��(�(��):��;���5� 0����*�+P�P��
��5� 0�I��07�v�g�Y�m�
,�T�
�� +�0�N�q�a��N��0���)�*�*�4�9�9�U�3C�*�D�g�N�D��9�9�g�v�t�V�<�=�=����	1s�8C�C)NNNNN�)NNN)
�__name__�
__module__�__qualname__�__doc__�classmethodr�str�_DueDate�intr(r�dictr�r)r'r	r	s���9��"&�!%�'+�"&�!%��<��#��<��#��<��8�$�	<�
�3�-�<��#��
<��<��<�2�
$(�!%�&*�
������4�.�	�
�#����d�^�
��r)r	c��eZdZdZy)�InformationOnlyaCurrently there is no clear way of displaying messages to the users
    that use the setuptools backend directly via ``pip``.
    The only thing that might work is a warning, although it is not the
    most appropriate tool for the job...

    See pypa/packaging-problems#558.
    N�r7r8r9r:r@r)r'rBrBTs��r)rBc��eZdZdZy)�SetuptoolsDeprecationWarningz�
    Base class for warning deprecations in ``setuptools``

    This class is not derived from ``DeprecationWarning``, and as such is
    visible by default.
    NrCr@r)r'rErE^s��r)rEc�R�tjdd�j�}|dvS)N�SETUPTOOLS_ENFORCE_DEPRECATION�false)�true�on�ok�1)�os�getenv�lower)�enforces r'rrgs(���i�i�8�'�B�H�H�J�G��/�/�/r))r:rMr�datetimer�inspectr�textwrapr�typingrrr>r=r1r.�UserWarningr	rBrErr@r)r'�<module>rVso���
�����"���c�3����
���
�/�(��6�	�=��=�@�'���#4��0r)python3.12/site-packages/setuptools/__pycache__/logging.cpython-312.pyc000064400000004066151732703720021710 0ustar00�

��_i���B�ddlZddlZddlZddlZddlmZd�Zd�Zd�Z	y)�N�)�monkeyc�<�|jtjkS)N)�levelno�logging�WARNING)�records ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/logging.py�_not_warningrs���>�>�G�O�O�+�+�c�$�tj�}|jtj�tjtj
�}|j
t�||f}tjdd|tj��tjtjj�rMtj t"tjd�tjtj_yy)z�
    Configure logging to emit warning and above to stderr
    and everything else to stdout. This behavior is provided
    for compatibility with distutils.log but may change in
    the future.
    z	{message}�{)�format�style�handlers�level�
set_thresholdN)r�
StreamHandler�setLevelr�sys�stdout�	addFilterr�basicConfig�DEBUG�inspect�ismodule�	distutils�dist�logr�
patch_funcr)�err_handler�out_handlerrs   r
�	configurer#s����'�'�)�K�������)��'�'��
�
�3�K����,�'��K�'�H�����#���
�
�����	���*�*�+����-�����H�
'�]�]�	����
,rc�p�tjj|dz�tj	|�S)N�
)r�rootrr�	unpatched)rs r
rr$s)���L�L���%�"�*�%��"�"�5�)�)r)
rrr�
distutils.logr�rrr#r�rr
�<module>r+s#��
�����,�+�0*rpython3.12/site-packages/setuptools/__pycache__/_core_metadata.cpython-312.pyc000064400000030021151732703720023177 0ustar00�

��_i�"��\�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZddl
mZdd	lmZmZdd
lmZddlmZddlmZdd
lmZd�Zdedefd�Zdededeefd�Zdededeefd�Zdededeeefd�Zdedeefd�Z d�Z!d�Z"d�Z#d�Z$d�Z%dedededefd �Z&d!�Z'y)"z�
Handling of Core Metadata for Python packages (including reading and writing).

See: https://packaging.python.org/en/latest/specifications/core-metadata/
�N)�message_from_file)�Message)�NamedTemporaryFile)�Optional�List)�
rfc822_escape�)�_normalization�_reqs)�Marker)�Requirement)�Version)�SetuptoolsDeprecationWarningc�H�t|dd�}|�td�}||_|S)N�metadata_version�2.1)�getattrrr)�self�mvs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_core_metadata.py�get_metadata_versionrs,��	��)�4�	0�B�	�z�
�U�^�� "���
�I��content�returnc
��|j�}t|�dk(r|dj�Sdj|dj�t	j
dj|dd��f�S)zFReverse RFC-822 escaping by removing leading whitespaces from content.r	r�
N)�
splitlines�len�lstrip�join�textwrap�dedent)r�liness  r�rfc822_unescaper$sc����� �E�
�5�z�Q���Q�x��� � ��9�9�e�A�h�o�o�'�������5���9�9M�)N�O�P�Pr�msg�fieldc��||}|dk(ry|S)zRead Message header field.�UNKNOWNN��r%r&�values   r�_read_field_from_msgr,'s����J�E��	����Lrc�8�t||�}|�|St|�S)z4Read Message header field and apply rfc822_unescape.)r,r$r*s   r�_read_field_unescaped_from_msgr./s#�� ��e�,�E��}����5�!�!rc�6�|j|d�}|gk(ry|S)z9Read Message header field and return all results as list.N)�get_all)r%r&�valuess   r�_read_list_from_msgr27s!��
�[�[���
%�F�
��|���Mrc�R�|j�j�}|dk(s|sy|S)Nr()�get_payload�strip)r%r+s  r�_read_payload_from_msgr6?s)���O�O��#�#�%�E��	�����Lrc��t|�}t|d�|_t|d�|_t|d�|_t|d�|_t|d�|_d|_t|d�|_	d|_
t|d�|_t|d	�|_t|d
�|_t|d�|_|j�(|jtd�k\rt!|�|_t|d�|_d
|vr t|d
�j#d�|_t'|d�|_t'|d�|_|jtd�k(r4t'|d�|_t'|d�|_t'|d�|_nd|_d|_d|_t'|d�|_y)z-Reads the metadata values from a file object.zmetadata-version�name�version�summary�authorNzauthor-emailz	home-pagezdownload-url�license�descriptionr�keywords�,�platform�
classifierz1.1�requires�provides�	obsoleteszlicense-file)rrrr,r8r9r=r;�
maintainer�author_email�maintainer_email�url�download_urlr.r<�long_descriptionr6�splitr>r2�	platforms�classifiersrBrCrD�
license_files)r�filer%s   r�
read_pkg_filerPFs���
�D�
!�C�#�C�(:�$;�<�D��$�S�&�1�D�I�'��Y�7�D�L�+�C��;�D��&�s�H�5�D�K��D�O�,�S�.�A�D�� �D��#�C��5�D�H�,�S�.�A�D��1�#�y�A�D�L�:�3�
�N�D�����$��)>�)>�'�%�.�)P� 6�s� ;���+�C��;�D���S��,�S�*�=�C�C�C�H��
�(��j�9�D�N�*�3��=�D��������.�+�C��<��
�+�C��<��
�,�S�+�>�����
���
����,�S�.�A�D�rc��d|vr:d}tjd|�|j�jd�d}|S)zF
    Quick and dirty validation for Summary pypa/setuptools#1390.
    rzBnewlines are not allowed in `summary` and will break in the futurezInvalid config.r)r�emitr5rK)�valr%s  r�single_linerTosD���s�{�S��$�)�)�*;�S�A��i�i�k����%�a�(���Jrc��d}tjj|d�}	tdd|d��5}|j}|j|�ddd�t
jtj|�j�}tj||tjztjz�tj||�|r6tjj|�rtj|�yyy#1swY��xYw#|r6tjj|�rtj|�wwwxYw)z.Write the PKG-INFO file into the release tree.�zPKG-INFO�wzutf-8F)�encoding�dir�deleteN)�os�pathr rr8�write_pkg_file�stat�S_IMODE�lstat�st_mode�chmod�S_IRGRP�S_IROTH�replace�exists�remove)r�base_dir�temp�final�f�permissionss      r�write_pkg_inform}s���
�D��G�G�L�L��:�.�E�� ��g�8�E�
R�VW��6�6�D�����"�S��l�l�2�8�8�D�>�#9�#9�:��
����{�T�\�\�1�D�L�L�@�A�
�
�
�4����B�G�G�N�N�4�(��I�I�d�O�)�4�S�
R���B�G�G�N�N�4�(��I�I�d�O�)�4�s#�D�D�BD�D�D�:Ec����|j�}�fd�}|dt|��|d|j��|d|j��|j	�}|r|dt|��d}|D]\}}t
||d�}|��|||�� |j�}	|	r|dt|	��|jj�D]}
|d	d
|
z��dj|j��}|r	|d|�|j�xsg}|D]}
|d
|
��
|j�d|j��|j�d|j!��|j�d|j#��|j�d|j%��t'|d�r|d|j(�|j*r|d|j*�|j�d|j,xsg�t/|��|j1�}|r8�j3d|z�|j5d�s�j3d�yyy)z0Write the PKG-INFO format data to a file object.c�4���j|�d|�d��y)Nz: r)�write)�keyr+rOs  �r�write_fieldz#write_pkg_file.<locals>.write_field�s����
�
��e�,�-rzMetadata-Version�Namer�Summary))z	Home-pagerH)zDownload-URLrI)�Authorr;)zAuthor-emailrF)�
MaintainerrE)zMaintainer-emailrGN�LicensezProject-URLz%s, %sr?�Keywords�Platform�
Classifier�Requires�Provides�	Obsoletes�python_requireszRequires-PythonzDescription-Content-TypezLicense-Filez
%sr)r�str�get_name�get_version�get_descriptionrTr�get_licenser�project_urls�itemsr �get_keywords�
get_platforms�_write_list�get_classifiers�get_requires�get_provides�
get_obsoletes�hasattrr~�long_description_content_typerN�_write_requirements�get_long_descriptionrp�endswith)rrOr9rrr:�optional_fieldsr&�attr�attr_valr<�project_urlr>rLr@rJs `             rr]r]�sO����'�'�)�G�.��"�C��L�1����
�
��(��	�4�+�+�-�.��"�"�$�G���I�{�7�3�4��O�'���t��4��t�,������x�(�'�
��� �G���I�}�W�5�6��(�(�.�.�0���M�8�k�#9�:�1��x�x��)�)�+�,�H���J��)��"�"�$�*��I����J��)��	���T�<��)=�)=�)?�@�	���T�:�t�'8�'8�':�;����T�:�t�'8�'8�':�;����T�;��(:�(:�(<�=��t�&�'��%�t�';�';�<��)�)��.��0R�0R�S����T�>�4�+=�+=�+C��D���d�#��0�0�2����
�
�6�,�,�-��(�(��.��J�J�t��/�rc���tj|j�D]}|jd|�d���i}|jj�D]�\}}|j
d�\}}}|j�}tj|�}	|	rt|||	|�tj|�D]2}t||	|j��}
|jd|
�d���4��|S)NzRequires-Dist: r�:)
r�parse�install_requiresrp�extras_requirer��	partitionr5r
�
safe_extra�_write_provides_extra�
parse_strings�_include_extra)rrO�req�processed_extras�augmented_extra�reqs�unsafe_extra�_�	condition�extra�rs           rr�r��s����{�{�4�0�0�1���
�
�_�S�E��,�-�2���!%�!4�!4�!:�!:�!<����%4�%>�%>�s�%C�"��a��#�)�)�+���)�)�,�7���!�$�(8�%��N��&�&�t�,�C��s�E�9�?�?�+<�=�A��J�J����2�.�/�-�"=��rr�r�r�c���t|�}|jrd|j�d�nd|rd|�d�nd|rd|��ndf}tdjd�|D���|_|S)N�(�)z	extra == � and c3�&K�|]	}|s�|���y�w)Nr))�.0�xs  r�	<genexpr>z!_include_extra.<locals>.<genexpr>�s����"9�e��q�1�e�s��)r
�markerrr )r�r�r�r��partss     rr�r��sj���C��A��8�8�!�A�H�H�:�Q���%�!�I�;�a��4�!&�)�E�9��D�
�E�
�g�l�l�"9�e�"9�9�:�A�H��Hrc
��|j|�}||k(r#tjdd|�d|�d|�d�d��y|||<|jd|�d	��y)
Nz8Ambiguity during "extra" normalization for dependencies.z
            r�z/ normalize to the same value:

                zW

            In future versions, setuptools might halt the build process.
            z!https://peps.python.org/pep-0685/)�see_urlzProvides-Extra: r)�getrrRrp)rOr��safe�unsafe�previouss     rr�r��sw���#�#�D�)�H��6��$�)�)�F�
�
�L��f�Z�(���
�
�
8�	
�"(�����
�
�%�d�V�2�.�/r)(�__doc__r[r^r!�emailr�
email.messager�tempfiler�typingrr�distutils.utilrrVr
r�extern.packaging.markersr�extern.packaging.requirementsr
�extern.packaging.versionr�warningsrrrr$r,r.r2r6rPrTrmr]r�r�r�r)rr�<module>r�s���

���#�!�'�!�(�#�,�6�-�2��Q�S�Q�S�Q��g��c��h�s�m��"��"��"���
�"��W��S��X�d�3�i�5H�����H�S�M��&B�R��&B�J�(
��
�C�
�C�
�K�
�0rpython3.12/site-packages/setuptools/__pycache__/archive_util.cpython-312.pyc000064400000021752151732703720022741 0ustar00�

��_i����dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
gd�ZGd�de�Zd	�Z
e
dfd
�Ze
fd�Ze
fd�Ze
fd
�Zd�Zd�Ze
fd�ZeeefZy)z/Utilities for extracting common archive formats�N)�DistutilsError�)�ensure_directory)�unpack_archive�unpack_zipfile�unpack_tarfile�default_filter�UnrecognizedFormat�extraction_drivers�unpack_directoryc��eZdZdZy)r
z#Couldn't recognize the archive typeN)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/archive_util.pyr
r
s��-rr
c��|S)z@The default progress/filter callback; returns True for all filesr)�src�dsts  rr	r	s���Jrc�r�|xstD]}	||||�ytd|z��#t$rY�*wxYw)a�Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

    `progress_filter` is a function taking two arguments: a source path
    internal to the archive ('/'-separated), and a filesystem path where it
    will be extracted.  The callback must return the desired extract path
    (which may be the same as the one passed in), or else ``None`` to skip
    that file or directory.  The callback can thus be used to report on the
    progress of the extraction, as well as to filter the items extracted or
    alter their extraction paths.

    `drivers`, if supplied, must be a non-empty sequence of functions with the
    same signature as this function (minus the `drivers` argument), that raise
    ``UnrecognizedFormat`` if they do not support extracting the designated
    archive type.  The `drivers` are tried in sequence until one is found that
    does not raise an error, or until all are exhausted (in which case
    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
    drivers, the module's ``extraction_drivers`` constant will be used, which
    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
    order.
    Nz!Not a recognized archive type: %s)rr
)�filename�extract_dir�progress_filter�drivers�drivers     rrr!sT��*�/�/�/��	��8�[�/�:�
�
0�!�!D�x�!O�P�P��"�	��	�s�
*�	6�6c�p�tjj|�std|z��|d|fi}tj|�D]�\}}}||\}}|D]K}	||	zdztjj||	�f|tjj||	�<�M|D]�}
tjj||
�}|||
z|�}|s�2t
|�tjj||
�}
tj|
|�tj|
|�����y)z� "Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    z%s is not a directory��/N)
�os�path�isdirr
�walk�joinr�shutil�copyfile�copystat)rrr�paths�base�dirs�filesrr�d�f�targets            rrrAs��
�7�7�=�=��"� �!8�8�!C�D�D�	�2�{�#�
�E� �W�W�X�.���d�E���;���S��A�+.��7�S�=�"�'�'�,�,�s�A�:N�+N�E�"�'�'�,�,�t�Q�'�(���A��W�W�\�\�#�q�)�F�$�S�1�W�f�5�F����V�$������T�1�%�A��O�O�A�v�&��O�O�A�v�&��	/rc��tj|�st|�d���tj|�5}t	|||�ddd�y#1swYyxYw)z�Unpack zip `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    z is not a zip fileN)�zipfile�
is_zipfiler
�ZipFile�_unpack_zipfile_obj)rrr�zs    rrr\sF�����h�'� �8�!E�F�F�	����	"�a��A�{�O�<�
#�	"�	"�s�A�Ac�D�|j�D�]}|j}|jd�sd|jd�vr�5t	j
j|g|jd����}|||�}|s�p|jd�rt|�nLt|�|j|j�}t|d�5}|j|�ddd�|jdz	}|s��t	j||���y#1swY�5xYw)z�Internal/private API used by other parts of setuptools.
    Similar to ``unpack_zipfile``, but receives an already opened :obj:`zipfile.ZipFile`
    object instead of a filename.
    r �..�wbN�)�infolistr�
startswith�splitr!r"r%�endswithr�read�open�write�
external_attr�chmod)	�zipfile_objrr�info�namer/�datar.�unix_attributess	         rr4r4ks���
�$�$�&���}�}���?�?�3��4�4�:�:�c�?�#:�������k�<�D�J�J�s�O�<�� ��v�.�����=�=����V�$�
�V�$��#�#�D�M�M�2�D��f�d�#�q�����
�$��,�,��2����H�H�V�_�-�-'�$$�#�s�D�D	c���|��|j�s|j�r�|j}|j�rJtj|j
�}tj||�}tj|�}|j|�}|�"|j�r��|j�r��|duxr"|j�xs|j�}|r|Std��)z;Resolve any links and extract link targets as normal files.NzGot unknown file type)�islnk�issym�linkname�	posixpath�dirnamerEr%�normpath�
_getmember�isfiler#�LookupError)�tar_obj�tar_member_obj�linkpathr*�is_file_or_dirs     r�_resolve_tar_file_or_dirrV�s���
�
$�����.�"6�"6�"8�!�*�*�����!��$�$�^�%8�%8�9�D� �~�~�d�H�5�H� �)�)�(�3�H� �+�+�H�5���
$�����.�"6�"6�"8�$�4�/������9�>�#7�#7�#9�����
�-�
.�.rc#��K�d�|_tj|�5|D]�}|j}|j	d�sd|jd�vr�4t
jj|g|jd����}	t||�}|||�}|s�||jtj�r|dd}||f����	ddd�y#t$rY��wxYw#1swYyxYw�w)z1Emit member-destination pairs from a tar archive.c��y)Nr)�argss r�<lambda>z _iter_open_tar.<locals>.<lambda>�s��$rr r7N���)
�chown�
contextlib�closingrEr;r<r!r"r%rVrQr=�sep)rRrr�memberrE�
prelim_dst�	final_dsts       r�_iter_open_tarrc�s�����'�G�M�	�	�	�G�	$��F��;�;�D����s�#�t�t�z�z�#��'>�������k�D�D�J�J�s�O�D�J�
�1�'�6�B��(��j�9�I����!�!�"�&�&�)�%�c�r�N�	��)�#�#�)�
%�	$���
��
��
%�	$�sA�C0�A&C$�C�8C$�	C0�	C!�C$� C!�!C$�$C-�)C0c��	tj|�}t	|||�D]\}}	|j||��y#tj$r}t|�d��|�d}~wwxYw#tj$rY�[wxYw)z�Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    z- is not a compressed or uncompressed tar fileNT)�tarfiler?�TarErrorr
rc�_extract_member�ExtractError)rrr�tarobj�er`rbs       rrr�s�������h�'��,�������	�
	��"�"�6�9�5����#���� �AI�K�
��	�����#�#�	��	�s(�A�A*�A'�A"�"A'�*B�?B)rr1rer!r&rLr]�distutils.errorsr�_pathr�__all__r
r	rrrr4rVrcrrrrr�<module>rns���5���	�
���+�#���.��.��
;I�RV�Q�@=K�'�6;I�=�CQ�.�</�*$�:;I��:&�~�~�E�rpython3.12/site-packages/setuptools/__pycache__/__init__.cpython-312.pyc000064400000030445151732703720022021 0ustar00�

��_i�#��B�dZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddl
mZmZddl
mZddlmZdd	lmZmZdd
lmZddlmZddlmZgd
�Zej<ZdZej@Z!ej@Z"d�Z#d�Z$d�Z%ejLjJje%_ejNejLjP�Z)Gd�de)�Z(d�Z*ejVfd�Z,ejZe�d��ZGd�de.�Z/ej`�y)z@Extensions to the 'distutils' for large or complex distributions�N)�DistutilsOptionError)�convert_path�)�logging�monkey)�version)�Require)�
PackageFinder�PEP420PackageFinder)�Distribution)�	Extension)�SetuptoolsDeprecationWarning)�setupr�Commandr
r	r�
find_packages�find_namespace_packagesc��Gd�dtjj�}||�}|jd��|jrt|�yy)Nc�4��eZdZdZ�fd�Zd�fd�	Zd�Z�xZS)�4_install_setup_requires.<locals>.MinimalDistributionzl
        A minimal version of a distribution for supporting the
        fetch_build_eggs interface.
        c���d}t|�t|�zD�cic]}|||��
}}t�|�	|�|jj	�ycc}w)N)�dependency_links�setup_requires)�set�super�__init__�set_defaults�_disable)�self�attrs�_incl�k�filtered�	__class__s     ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/__init__.pyrz=_install_setup_requires.<locals>.MinimalDistribution.__init__1sX���8�E�-0��Z�#�e�*�-D�E�-D���5��8��-D�H�E��G��X�&����&�&�(��Fs�
Ac�X��	t�|�|�\}}|dfS#t$r|dfcYSwxYw)zAIgnore ``pyproject.toml``, they are not related to setup_requires�)r� _split_standard_project_metadata�	Exception)r�	filenames�cfg�tomlr#s    �r$�_get_project_config_fileszN_install_setup_requires.<locals>.MinimalDistribution._get_project_config_files8s=���
%�!�G�D�Y�O�	��T��B�w����
%� �"�}�$�
%�s��
)�)c��y)zl
            Disable finalize_options to avoid building the working set.
            Ref #2158.
            Nr&)rs r$�finalize_optionszE_install_setup_requires.<locals>.MinimalDistribution.finalize_options@s���N)�__name__�
__module__�__qualname__�__doc__rr,r.�
__classcell__�r#s@r$�MinimalDistributionr+s���	�
	)�	%�	r/r7T)�ignore_option_errors)�	distutils�corer�parse_config_filesr�_fetch_build_eggs)rr7�dists   r$�_install_setup_requiresr>(sM���i�n�n�9�9��6�u�%�D�	�����6�����$��r/c��	|j|j�y#t$rS}d}d|jjvr3t|d�r|j
|��|jd|�d���d}~wwxYw)Na�
        It is possible a package already installed in your system
        contains an version that is invalid according to PEP 440.
        You can try `pip install --use-pep517` as a workaround for this problem,
        or rely on a new virtual environment.

        If the problem refers to a package that is not installed yet,
        please contact that package's maintainers or distributors.
        �InvalidVersion�add_note�
)�fetch_build_eggsrr(r#r1�hasattrrA�announce)r=�ex�msgs   r$r<r<Nsz������d�1�1�2�������r�|�|�4�4�4��r�:�&����C� �	��
�
��3�%�r�l�+�
���s��	A:�AA5�5A:c�~�tj�t|�tjj
di|��S)Nr&)r�	configurer>r9r:r)rs r$rrcs.�������E�"��>�>���(�%�(�(r/c�<��eZdZdZdZ�fd�Zdd�Zd�Zdd�Z�xZ	S)	ra�

    Setuptools internal actions are organized using a *command design pattern*.
    This means that each action (or group of closely related actions) executed during
    the build should be implemented as a ``Command`` subclass.

    These commands are abstractions and do not necessarily correspond to a command that
    can (or should) be executed via a terminal, in a CLI fashion (although historically
    they would).

    When creating a new command from scratch, custom defined classes **SHOULD** inherit
    from ``setuptools.Command`` and implement a few mandatory methods.
    Between these mandatory methods, are listed:

    .. method:: initialize_options(self)

        Set or (reset) all options/attributes/caches used by the command
        to their default values. Note that these values may be overwritten during
        the build.

    .. method:: finalize_options(self)

        Set final values for all options/attributes used by the command.
        Most of the time, each option/attribute/cache should only be set if it does not
        have any value yet (e.g. ``if self.attr is None: self.attr = val``).

    .. method:: run(self)

        Execute the actions intended by the command.
        (Side effects **SHOULD** only take place when ``run`` is executed,
        for example, creating new files or writing to the terminal output).

    A useful analogy for command classes is to think of them as subroutines with local
    variables called "options".  The options are "declared" in ``initialize_options()``
    and "defined" (given their final values, aka "finalized") in ``finalize_options()``,
    both of which must be defined by every command class. The "body" of the subroutine,
    (where it does all the work) is the ``run()`` method.
    Between ``initialize_options()`` and ``finalize_options()``, ``setuptools`` may set
    the values for options/attributes based on user's input (or circumstance),
    which means that the implementation should be careful to not overwrite values in
    ``finalize_options`` unless necessary.

    Please note that other commands (or other parts of setuptools) may also overwrite
    the values of the command's options/attributes multiple times during the build
    process.
    Therefore it is important to consistently implement ``initialize_options()`` and
    ``finalize_options()``. For example, all derived attributes (or attributes that
    depend on the value of other attributes) **SHOULD** be recomputed in
    ``finalize_options``.

    When overwriting existing commands, custom defined classes **MUST** abide by the
    same APIs implemented by the original class. They also **SHOULD** inherit from the
    original class.
    Fc�X��t�|�|�t|�j|�y)zj
        Construct the command for dist, updating
        vars(self) with any keyword parameters.
        N)rr�vars�update)rr=�kwr#s   �r$rzCommand.__init__�s$���
	������T�
���"�r/c	��t||�}|�t|||�|St|t�st	d|�d|�d|�d���|S)N�'z' must be a z (got `z`))�getattr�setattr�
isinstance�strr)r�option�what�default�vals     r$�_ensure_stringlikezCommand._ensure_stringlike�sL���d�F�#���;��D�&�'�*��N��C��%�&�28�$��D��
��
r/c��t||�}|�yt|t�r"t||t	j
d|��yt|t�rtd�|D��}nd}|std|�d|�d���y)a�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].

        ..
           TODO: This method seems to be similar to the one in ``distutils.cmd``
           Probably it is just here for backward compatibility with old Python versions?

        :meta private:
        Nz,\s*|\s+c3�<K�|]}t|t����y�wr0)rSrT)�.0�vs  r$�	<genexpr>z-Command.ensure_string_list.<locals>.<genexpr>�s����9�S���A�s�+�S�s�FrPz!' must be a list of strings (got �))	rQrSrTrR�re�split�list�allr)rrUrX�oks    r$�ensure_string_listzCommand.ensure_string_list�su���d�F�#���;��
��S�
!��D�&�"�(�(�;��"<�=��#�t�$��9�S�9�9�����*�AG��M���r/c�h�tj|||�}t|�j|�|Sr0)�_Command�reinitialize_commandrLrM)r�command�reinit_subcommandsrN�cmds     r$rhzCommand.reinitialize_command�s.���+�+�D�'�;M�N���S�	������
r/r0)r)
r1r2r3r4�command_consumes_argumentsrrYrerhr5r6s@r$rrps%���4�l"'���	��6r/rc��d�tj|d��D�}ttjj|�S)z%
    Find all files under 'path'
    c3�rK�|]/\}}}|D]$}tjj||����&�1y�wr0)�os�path�join)r\�base�dirs�files�files     r$r^z#_find_all_simple.<locals>.<genexpr>�s;�����!@��D�$���D�	�����T�4� ��	!�!@�s�57T)�followlinks)ro�walk�filterrp�isfile)rp�resultss  r$�_find_all_simpler{�s3���!#����4�!@��G�
�"�'�'�.�.�'�*�*r/c���t|�}|tjk(r;tjtj
j|��}t||�}t|�S)z�
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )�start)	r{ro�curdir�	functools�partialrp�relpath�maprb)�dirrt�make_rels   r$�findallr��sJ��

�S�!�E�
�b�i�i���$�$�R�W�W�_�_�C�@���H�e�$����;�r/c�H�tjddd��t|�S)NzAccess to implementation detaila
        The function `convert_path` is not provided by setuptools itself,
        and therefore not part of the public API.

        Its direct usage by 3rd-party packages is considered improper and the function
        may be removed in the future.
        )i���
)�due_date)r�emit�
_convert_path)�pathnames r$rr�s*�� �%�%�)�	� �
���"�"r/c��eZdZdZy)�sicz;Treat this string as-is (https://en.wikipedia.org/wiki/Sic)N)r1r2r3r4r&r/r$r�r�s��Er/r�)1r4rror`�_distutils_hack.override�_distutils_hack�distutils.corer9�distutils.errorsr�distutils.utilrr��rrr�_version_module�dependsr	�	discoveryr
rr=r�	extensionr
�warningsr�__all__�__version__�bootstrap_install_from�findrrr>r<rr:�
get_unpatchedrrgr{r~r��wrapsrTr��	patch_allr&r/r$�<module>r�s��F��	�	���1�8��(��9�� �2�	���)�)�����"�"�
�-�2�2��# �L�*)����$�$�,�,��
� �6���	��� 6� 6�7��j�h�j�Z	+��	�	�	�������#� �#�F�#�F�
����r/python3.12/site-packages/setuptools/__pycache__/package_index.cpython-312.pyc000064400000146631151732703730023052 0ustar00�

��_iɕ���dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZ
ddlZddlZddlZddlmZddlZddlmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+dd	l,m-Z-ej\d
�Z/ej\dej`�Z1ej\d�Z2ej\d
ej`�jfZ4djk�Z6gd�Z7dZ8dZ9e9judjtejv�e��Z<d�Z=d�Z>d�Z?d1d�Z@d1d�ZAd1d�ZBdedfd�ZCd�ZDej\dej`�ZE	eDd��ZFGd�d�ZGGd �d!eG�ZHGd"�d#e�ZIej\d$�j�ZKd%�ZLd&�ZMd2d'�ZNd(�ZOGd)�d*�ZPGd+�d,e
j��ZRej�j�fd-�ZUd.�ZVeNe8�eU�ZUd/�ZWd0�ZXy)3z$PyPI and direct package downloading.�N��wraps)�
CHECKOUT_DIST�Distribution�BINARY_DIST�normalize_path�SOURCE_DIST�Environment�find_distributions�	safe_name�safe_version�to_filename�Requirement�DEVELOP_DIST�EGG_DIST�
parse_version)�log��DistutilsError)�	translate)�Wheel��unique_everseenz^egg=([-A-Za-z0-9_.+!]+)$zhref\s*=\s*['"]?([^'"> ]+)z�<a href="([^"#]+)">([^<]+)</a>\n\s+\(<a (?:title="MD5 hash"\n\s+)href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\)z([-+.a-z0-9]{2,}):z.tar.gz .tar.bz2 .tar .zip .tgz)�PackageIndex�distros_for_url�parse_bdist_wininst�interpret_distro_name�z<setuptools/{setuptools.__version__} Python-urllib/{py_major}z{}.{})�py_major�
setuptoolsc�n�	tj|�S#t$r}td|���|�d}~wwxYw)Nz/Not a URL, existing file, or requirement spec: )r�parse�
ValueErrorr)�spec�es  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/package_index.py�parse_requirement_argr'Ds>���� � ��&�&�����CG�I�
��	���s��	4�/�4c�8�|j�}d\}}}|jd�ro|jd�r|dd}d}nV|jdd�r
|d	d
}|dd}d}n7|jd�r|dd}d
}n|jdd�r|d	d
}|dd}d
}|||fS)z=Return (base,pyversion) or (None,None) for possible .exe name)NNN�.exez
.win32.exeNi�����win32z	.win32-pyi�i�������z.win-amd64.exei�z	win-amd64z
.win-amd64-pyi��)�lower�endswith�
startswith)�namer,�base�py_ver�plats     r&rrMs���
�J�J�L�E�)��D�&�$��~�~�f���>�>�,�'����:�D��D�
�
�
�k�3�
/��"�R�[�F����:�D��D�
�^�^�,�
-����:�D��D�
�
�
�o�s�
3��"�R�[�F����:�D��D������c�d�tjj|�}|\}}}}}}tjj|j	d�d�}|dk(r6|dk(r1tjj|j	d�d�}d|vr|j	dd�\}}||fS)N�/���zsourceforge.net�download����#�)�urllibr"�urlparse�unquote�split)	�url�parts�scheme�server�path�
parameters�query�fragmentr0s	         r&�egg_info_for_urlrGes����L�L�!�!�#�&�E�8=�5�F�F�D�*�e�X��<�<����
�
�3��� 3�4�D�
�"�"�t�z�'9��|�|�#�#�D�J�J�s�O�B�$7�8��
�d�{����C��+���h���>�r3c#��K�t|�\}}t|||�D]}|���|rDtj|�}|r,t	||jd�|t��D]}|���yyy�w)zEYield egg or source distribution objects that might be found at a URLr:)�
precedenceN)rG�distros_for_location�EGG_FRAGMENT�matchr�groupr)r?�metadatar0rF�distrLs      r&rrpss����%�c�*�N�D�(�$�S�$��9���
�:���"�"�8�,���-��U�[�[��^�X�-����
����s�A,A.c�&�|jd�r|dd}|jd�rd|vrtj|||�gS|jd�rLd|vrHt|�}|j	�sgSt||j
|jtdz��gS|jd	�r%t|�\}}}|�t||||t|�StD]1}|j|�s�|dt|�}t|||�cSgS)
z:Yield egg or source distribution objects based on basename�.egg.zipNr+z.egg�-z.whlr:)�location�project_name�versionrIr))
r-r�
from_locationr�
is_compatiblerTrUrrrr�
EXTENSIONS�len)rS�basenamerN�wheel�win_baser1�platform�exts        r&rJrJ~s$������$��C�R�=������ �S�H�_��*�*�8�X�x�H�I�I����� �S�H�_��h����"�"�$��I��!�"�/�/��
�
�#�a�<�
�
�	
����� �%8��%B�"��&�(���(��(�H�f�k�8��
�
�����S�!���3�s�8�)�,�H�(��8�X�F�F���Ir3c�h�tt|�tjj	|�|�S)zEYield possible egg or source distribution objects based on a filename)rJr�osrCrZ)�filenamerNs  r&�distros_for_filenamerb�s*����x� �"�'�'�"2�"2�8�"<�h��r3c
#�FK�|jd�}|std�|ddD��rytt|��D]}||ddj	�s�nt|�}t||dj
|d|�dj
||d�|||����y�w)z�Generate the interpretation of a source distro name

    Note: if `location` is a filesystem filename, you should call
    ``pkg_resources.normalize_path()`` on it before passing it to this
    routine!
    rRc3�HK�|]}tjd|����y�w)z	py\d\.\d$N)�rerL)�.0�ps  r&�	<genexpr>z(interpret_distro_name.<locals>.<genexpr>�s����K��A�b�h�h�|�Q�7��s� "�Nr:)�
py_versionrIr])r>�any�rangerY�isdigitr�join)rSrZrNrjrIr]r@rgs        r&rr�s�����
�N�N�3��E��#�K��q�r��K�K���3�u�:�
����8�B�Q�<���!���
��J��
�������r��������q�r��������s
�AB!�AB!c�.��t���fd��}|S)zs
    Wrap a function returning an iterable such that the resulting iterable
    only ever yields unique items.
    c�&��t�|i|���S�Nr)�args�kwargs�funcs  �r&�wrapperzunique_values.<locals>.wrapper�s����t�T�4�V�4�5�5r3r)rtrus` r&�
unique_valuesrv�s"����4�[�6��6��Nr3z3<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>c
#�K�tj|�D]�}|j�\}}tt	t
j|j�jd���}d|vsd|vs�_tj|�D]<}tjj|t|jd������>��dD]l}|j|�}|dk7s�tj!||�}|s�3tjj|t|jd������ny�w)zEFind rel="homepage" and rel="download" links in `page`, yielding URLs�,�homepager7r:)z
<th>Home Pagez<th>Download URLr6N)�REL�finditer�groups�set�map�str�stripr,r>�HREFr;r"�urljoin�
htmldecoderM�find�search)r?�pagerL�tag�rel�rels�poss       r&�find_external_linksr��s��������d�#���<�<�>���S��3�s�y�y�#�)�)�+�"3�"3�C�"8�9�:������t�!3����s�+���l�l�*�*�3�
�5�;�;�q�>�0J�K�K�,�	$�5���i�i��n���"�9��K�K��c�*�E���l�l�*�*�3�
�5�;�;�q�>�0J�K�K�5�s�A4D?�7A1D?�)D?�=D?c�"�eZdZdZd�Zd�Zd�Zy)�ContentCheckerzP
    A null content checker that defines the interface for checking content
    c��y)z3
        Feed a block of data to the hash.
        N���self�blocks  r&�feedzContentChecker.feed�s��	r3c��y)zC
        Check the hash. Return False if validation fails.
        Tr��r�s r&�is_validzContentChecker.is_valid�s��r3c��y)zu
        Call reporter with information about the checker (hash name)
        substituted into the template.
        Nr�)r��reporter�templates   r&�reportzContentChecker.reports��
	r3N)�__name__�
__module__�__qualname__�__doc__r�r�r�r�r3r&r�r��s�����r3r�c�X�eZdZejd�Zd�Zed��Zd�Z	d�Z
d�Zy)�HashCheckerzK(?P<hash_name>sha1|sha224|sha384|sha256|sha512|md5)=(?P<expected>[a-f0-9]+)c�T�||_tj|�|_||_yrq)�	hash_name�hashlib�new�hash�expected)r�r�r�s   r&�__init__zHashChecker.__init__s ��"����K�K�	�*��	� ��
r3c���tjj|�d}|s
t�S|jj|�}|s
t�S|di|j
���S)z5Construct a (possibly null) ContentChecker from a URLr6r�)r;r"r<r��patternr��	groupdict)�clsr?rFrLs    r&�from_urlzHashChecker.from_urls^���<�<�(�(��-�b�1���!�#�#����"�"�8�,���!�#�#��'�U�_�_�&�'�'r3c�:�|jj|�yrq)r��updater�s  r&r�zHashChecker.feeds���	�	����r3c�P�|jj�|jk(Srq)r��	hexdigestr�r�s r&r�zHashChecker.is_valid"s���y�y�"�"�$��
�
�5�5r3c�0�||jz}||�Srq)r�)r�r�r��msgs    r&r�zHashChecker.report%s������'����}�r3N)r�r�r�re�compiler�r��classmethodr�r�r�r�r�r3r&r�r�	s?���b�j�j�	#��G�
!�
�(��(� �6�r3r�c�(��eZdZdZ				d&�fd�	Z�fd�Zd'd�Zd'd�Zd'd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d(d�Zd
�Zd(�fd�	Zd�Zd�Zd�Zd�Zd�Z				d)d�Zd*d�Zd�ZdZd�Zd�Zd(d�Zd�Zd�Zd�Zd�Z d�Z!e"d'd ��Z#d!�Z$d"�Z%d#�Z&d$�Z'd%�Z(�xZ)S)+rz;A distribution index that scans web pages for download URLsc�V��t�|�|i|��|dd|jd�z|_i|_i|_i|_tjdjtt|���j|_
g|_tj j"|_y)Nr5�|)�superr�r-�	index_url�scanned_urls�fetched_urls�
package_pagesrer�rnr~rrL�allows�to_scanr;�request�urlopen�opener)r�r��hosts�	ca_bundle�
verify_sslrr�kw�	__class__s       �r&r�zPackageIndex.__init__-s����	���$�%�"�%�"�S�)F�y�/A�/A�#�/F�+F�%G�G�������������j�j����#�i��*?�!@�A�G�G�������n�n�,�,��r3c�l��	t|j�t�|�|�S#t$rYywxYwrq)rrU�	Exceptionr��add)r�rOr�s  �r&r�zPackageIndex.add?s9���	��$�,�,�'��w�{�4� � ���	��	�s�'�	3�3c	���||jvr|syd|j|<t|�s|j|�ytt	|��}|r$|j|�sy|j
d|�|s|r||jvr tt|j|��y|j|�sd|j|<y|jd|�d|j|<d}|j|||z�}|�yt|tjj�r-|j dk(r|jd|j"z�d|j|j$<d|j&j)d	d
�j+�vr|j-�y|j$}|j/�}t|t0�sXt|tjj�rd}n|j&j3d�xsd}|j5|d
�}|j-�t6j9|�D]K}	tj:j=|t?|	jAd���}
|jC|
��M|jE|jF�r$tI|dd�dk7r|jK||�}yyy)z<Evaluate a URL as a possible download, and maybe retrieve itNTzFound link: %sz
Reading %sz<Download error on %s: %%s -- Some packages may not be found!i�zAuthentication error: %s�html�content-type�zlatin-1�charset�ignorer:�code�)&r��
URL_SCHEME�process_filename�listr�url_ok�debugr�r~r��info�open_url�
isinstancer;�error�	HTTPErrorr�r�r?�headers�getr,�close�readr�	get_param�decoder�r{r"r�r�rM�process_urlr.r��getattr�
process_index)r�r?�retrieve�dists�tmpl�fr0r�r�rL�links           r&r�zPackageIndex.process_urlHsQ���$�#�#�#�H��!%����#���#���!�!�#�&�����-�.�E���{�{�3�'���
�
�+�S�1���C�4�+<�+<�$<���T�X�X�u�%�&���{�{�3��%)�D���c�"���	�	�,��$�!%����#��M���M�M�#�t�c�z�*���9���a����/�/�0�Q�V�V�s�]��I�I�0�1�5�5�8�9�#'����!�%�%� �������~�r�:�@�@�B�B�
�G�G�I���u�u���v�v�x���$��$��!�V�\�\�3�3�4�#���)�)�-�-�i�8�E�I���;�;�w��1�D�	���	��]�]�4�(�E��<�<�'�'��j����Q��.H�I�D����T�"�)��>�>�$�.�.�)�g�a���.F�#�.M��%�%�c�4�0�D�/N�)r3c��tjj|�s|jd|�ytjj	|�rk|sitjj|�}tj|�D]2}|jtjj||�d��4t|�}|r2|jd|�tt|j|��yy)Nz
Not found: %sTz	Found: %s)r`rC�exists�warn�isdir�realpath�listdirr�rnrbr�r�r~r�)r��fn�nestedrC�itemr�s      r&r�zPackageIndex.process_filename}s����w�w�~�~�b�!��I�I�o�r�*��
�7�7�=�=���V��7�7�#�#�B�'�D��
�
�4�(���%�%�b�g�g�l�l�4��&>��E�)�%�R�(����J�J�{�B�'���T�X�X�u�%�&�r3c��t|�}|xr"|jd�j�dk(}|s1|jtj
j
|�d�ryd}|rt||z��|j||�y)Nr:�fileTz�
Note: Bypassing %s (disallowed host; see https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#restricting-downloads-with-allow-hosts for details).
)	r�rMr,r�r;r"r<rr�)r�r?�fatal�s�is_filer�s      r&r�zPackageIndex.url_ok�s}���s�O���4�����
�(�(�*�f�4���d�k�k�&�,�,�"7�"7��"<�Q�"?�@��
W�	�
� ��s��+�+��I�I�c�3�r3c��ttjj|�}d�|D�}t	tj|j|��y)Nc3�zK�|]3}tj|�D]}|jd�r||f����5y�w)z	.egg-linkN)r`r�r-)rfrC�entrys   r&rhz.PackageIndex.scan_egg_links.<locals>.<genexpr>�s>����
������D�)���~�~�k�*��5�M�)�
��s�9;)�filterr`rCr�r��	itertools�starmap�
scan_egg_link)r��search_path�dirs�	egg_linkss    r&�scan_egg_linkszPackageIndex.scan_egg_links�sB���b�g�g�m�m�[�1��
��
�	�	
�Y�
�
�t�1�1�9�
=�>r3c
���ttjj||��5}t	tdt
tj|���}ddd�t�dk7ry|\}}ttjj||��D]C}tjj|g|���|_t|_
|j|��Ey#1swY��xYw)Nri)�openr`rCrnr�r�r~rr�rYrrSr	rIr�)r�rCr��	raw_lines�lines�egg_path�
setup_pathrOs        r&r�zPackageIndex.scan_egg_link�s���
�"�'�'�,�,�t�U�+�
,�	����c�#�)�)�Y�&?�@�A�E�-��u�:��?��$���*�&�r�w�w�|�|�D�(�'C�D�D��G�G�L�L��6��6�D�M�)�D�O��H�H�T�N�E�-�
,�s�.C$�$C-c	���d}|j|j�s|Stttj
j|t|j�djd���}t|�dk7sd|dvr|St|d�}t|d�}d|jj|j�i�|<t|�t|�fS)N)NNr5rir9r:rT)r.r�r�r~r;r"r=rYr>rr
r��
setdefaultr,r)r�r��NO_MATCH_SENTINELr@�pkg�vers      r&�_scanzPackageIndex._scan�s���&�����t�~�~�.�$�$��S����-�-�t�C����4G�4I�/J�/P�/P�QT�/U�V�W���u�:��?�c�U�1�X�o�$�$���a��!���5��8�$��?C����%�%�c�i�i�k�2�6�t�<��3���S�!1�1�1r3c��tj|�D]J}	|jtjj|t
|jd�����L|j|�\}}|syt||�D]S}t|�\}}|jd�r!|s|r|d|�d|��z
}n|j|�|j|��Utjd�|�S#t$rY��wxYw)z#Process the contents of a PyPI pager:r��.pyz#egg=rRc�.�d|jddd�zS)Nz<a href="%s#md5=%s">%s</a>r:�ri)rM)�ms r&�<lambda>z,PackageIndex.process_index.<locals>.<lambda>�s��2�Q�W�W�Q��1�5E�Er3)r�r{rr;r"r�r�rMr#r�rGr-�need_version_info�scan_url�PYPI_MD5�sub)	r�r?r�rLrr
�new_urlr0�frags	         r&r�zPackageIndex.process_index�s����]�]�4�(�E�
��
�
�6�<�<�/�/��Z����A��5O�P�Q�)��:�:�c�?���S���+�3��5�G�)�'�2�J�D�$��}�}�U�#�D���s�C�8�8�G��*�*�3�/��M�M�'�"�6��|�|�E�t�
�	
��%�
��
�s�AC3�3	C?�>C?c�(�|jd|�y)NzPPage at %s links to .py file(s) without version info; an index scan is required.)�scan_all�r�r?s  r&rzPackageIndex.need_version_info�s���
�
�
 ��	
r3c��|j|jvr&|r|j|g|���|jd�|j	|j�y)Nz6Scanning index of all packages (this may take a while))r�r�r�r�r�r�r�rrs   r&rzPackageIndex.scan_all�sG���>�>��!2�!2�2����	�	�#�%��%��I�I�N�O��
�
�d�n�n�%r3c���|j|j|jzdz�|jj	|j
�s+|j|j|jzdz�|jj	|j
�s|j|�t|jj	|j
d��D]}|j|��y)Nr5r�)	rr��unsafe_namer�r��keyrT�not_found_in_indexr�)r��requirementr?s   r&�
find_packageszPackageIndex.find_packages�s����
�
�d�n�n�{�'>�'>�>��D�E��!�!�%�%�k�o�o�6��M�M�$�.�.�;�+C�+C�C�c�I�J��!�!�%�%�k�o�o�6��#�#�K�0���*�*�.�.�{����C�D�C��M�M�#��Er3c����|j�|j|�||jD]}||vr|cS|jd||��tt
|�||�S)Nz%s does not match %s)�prescanr%r"r�r�r�obtain)r�r$�	installerrOr�s    �r&r(zPackageIndex.obtainsa����������;�'�����)�D��{�"����J�J�-�{�D�A�*��\�4�/��Y�G�Gr3c�0�|j|jd|z�|j�sg|j�t	j
|�t
|jj�dtjj|��d���y)z-
        checker is a ContentChecker
        zValidating %%s checksum for %sz validation failed for z; possible download problem?N)r�r�r�r�r`�unlinkrr�r/rCrZ)r��checkerra�tfps    r&�
check_hashzPackageIndex.check_hash	su��	���t�z�z�#C�h�#N�O����!��I�I�K��I�I�h�� ��<�<�$�$�b�g�g�&6�&6�x�&@�B��
�"r3c���|D]k}|j�0t|�r%|jd�stt	|��r|j|��Q|jj
|��my)z;Add `urls` to the list that will be prescanned for searchesN�file:)r�r�r.r�rr�append)r��urlsr?s   r&�add_find_linkszPackageIndex.add_find_linkssX���C����$�!�#���>�>�'�*����,�-��
�
�c�"����#�#�C�(�r3c�|�|jr)tt|j|j��d|_y)z7Scan urls scheduled for prescanning (e.g. --find-links)N)r�r�r~rr�s r&r'zPackageIndex.prescan&s'���<�<���T�]�]�D�L�L�1�2���r3c��||jr|jd}}n|jd}}|||j�|j	�y)Nz#Couldn't retrieve index page for %rz3Couldn't find index page for %r (maybe misspelled?))r"r�r�r!r)r�r$�methr�s    r&r#zPackageIndex.not_found_in_index,sJ������ ��	�	�#H�#�D��	�	�E��D�	
�S�+�)�)�*��
�
�r3c�z�t|t�s�t|�}|rV|j|j	d�||�}t|�\}}|j
d�r|j|||�}|Stjj|�r|St|�}t|j||�dd�S)aLocate and/or download `spec` to `tmpdir`, returning a local path

        `spec` may be a ``Requirement`` object, or a string containing a URL,
        an existing local filename, or a project/version requirement spec
        (i.e. the string form of a ``Requirement`` object).  If it is the URL
        of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
        that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
        automatically created alongside the downloaded file.

        If `spec` is a ``Requirement`` object or a string containing a
        project/version requirement spec, this method returns the location of
        a matching distribution (possibly after downloading it to `tmpdir`).
        If `spec` is a locally existing file or directory name, it is simply
        returned unchanged.  If `spec` is a URL, it is downloaded to a subpath
        of `tmpdir`, and the local filename is returned.  Various errors may be
        raised if a problem occurs during downloading.
        r:rrSN)r�rr��
_download_urlrMrGr-�	gen_setupr`rCr�r'r��fetch_distribution)r�r$�tmpdirrA�foundr0rFs       r&r7zPackageIndex.download7s���$�$��,���%�F���*�*�6�<�<��?�D�&�I��!1�$�!7���h��=�=��'� �N�N�5�(�F�C�E���������%���,�T�2���t�.�.�t�V�<�j�$�O�Or3c�������	��jd|�i�	d}d	���	��fd�	}|r)�j��j|�||�}|s|�	|||�}|�$�j��j�||�}|�|s�j|�||�}|��j	d�xrdxsd|�y�jd|�|j|j��S)
a|Obtain a distribution suitable for fulfilling `requirement`

        `requirement` must be a ``pkg_resources.Requirement`` instance.
        If necessary, or if the `force_scan` flag is set, the requirement is
        searched for in the (online) package index as well as the locally
        installed packages.  If a distribution matching `requirement` is found,
        the returned distribution's ``location`` is the value you would have
        gotten from calling the ``download()`` method with the matching
        distribution's URL or filename.  If no matching distribution is found,
        ``None`` is returned.

        If the `source` flag is set, only source distributions and source
        checkout links will be considered.  Unless the `develop_ok` flag is
        set, development and system eggs (i.e., those using the ``.egg-info``
        format) will be ignored.
        zSearching for %sNc�z��|��}||jD]�}|jtk(r�s|�vr�jd|�d�|<�4||vxr|jtkxs�}|s�U�j|j�	�}||_tjj|j�s��|cSy)Nz&Skipping development or system egg: %sr:)r"rIrr�r	r7rS�download_locationr`rCr�)
�req�envrO�test�loc�
develop_okr��skipped�sourcer;s
     �����r&r�z-PackageIndex.fetch_distribution.<locals>.findws�����{����C�G�G����?�?�l�2�:��7�*��	�	�D� ��)*���
���s�{�U����;�(F�(T�f�*����-�-��
�
�v�>�C�-0�D�*��w�w�~�~�d�&<�&<�=�#��%r3z:No local packages or working download links found for %s%sza source distribution of r�zBest match: %s)rSrq)r�r'r%r�r��cloner?)
r�r$r;�
force_scanrFrD�local_indexrOr�rEs
` ` ``   @r&r:zPackageIndex.fetch_distributionYs����4	
�	�	�$�k�2�����	$�	$�,��L�L�N����{�+���$�D���/���[�1�D��<��|�|�'�������$�D��<�
����{�+���$�D��<��I�I�L��7�7�=�2��
�
�I�I�&��-��:�:�t�'=�'=�:�>�>r3c�H�|j||||�}|�|jSy)a3Obtain a file suitable for fulfilling `requirement`

        DEPRECATED; use the ``fetch_distribution()`` method now instead.  For
        backward compatibility, this routine is identical but returns the
        ``location`` of the downloaded distribution instead of a distribution
        object.
        N)r:rS)r�r$r;rHrFrOs      r&�fetchzPackageIndex.fetch�s-���&�&�{�F�J��O�����=�=� �r3c��tj|�}|xr6t||jd�d�D�cgc]}|jr|��c}xsg}t|�dk(�rBtjj|�}tjj|�|k7rwtjj||�}tjj|�r tjj||�stj||�|}ttjj|d�d�5}	|	j!d|dj"�d|dj�dtjj%|�d�d��ddd�|S|rt'd	|�d
|����t'd��cc}w#1swY|SxYw)Nr:zsetup.py�wz(from setuptools import setup
setup(name=rz
, version=z, py_modules=[z])
z9Can't unambiguously interpret project/version identifier zI; any dashes in the name or version should be escaped using underscores. zpCan't process plain .py files without an '#egg=name-version' suffix to enable automatic setup script generation.)rKrLrrMrUrYr`rCrZ�dirnamernr��samefile�shutil�copy2r�writerT�splitextr)
r�rarFr;rL�dr�rZ�dstr�s
          r&r9zPackageIndex.gen_setup�s����"�"�8�,���
�/�x����Q���N��N�A��9�9��N��
��	��u�:��?��w�w�'�'��1�H��w�w���x�(�F�2��g�g�l�l�6�8�4�������s�+����0@�0@��3�0O��L�L��3�/�"�H��b�g�g�l�l�6�:�6��<���
�
��a��-�-��a��(�(����(�(��2�1�5���=��O�
� �&.�u�6��
�!�G��
��K�$=��O�s�G�AG�Gi c�>�|jd|�d}	tj|�}|j|�}t	|t
jj�r(td|�d|j�d|j����|j�}d}|j}d}d|vr?|jd�}	ttt|	��}|j!|||||�t#|d	�5}
	|j%|�}|r=|j'|�|
j)|�|d
z
}|j!|||||�nn�R|j+|||
�ddd�||r|j-�SS#1swY�xYw#|r|j-�wwxYw)NzDownloading %szCan't download �: � rr6zcontent-lengthzContent-Length�wbr:)r�r�r�r�r�r;r�r�rr�r��dl_blocksize�get_all�maxr~�int�
reporthookrr�r�rRr.r�)r�r?ra�fpr,r��blocknum�bs�size�sizesr-r�s            r&�_download_tozPackageIndex._download_to�so���	�	�"�C�(�
��	�!�*�*�3�/�G����s�#�B��"�f�l�l�4�4�5�$�25�r�w�w����G����g�g�i�G��H��"�"�B��D��7�*����(8�9���3�s�E�?�+������X�x��T�B��h��%����G�G�B�K�E�����U�+��	�	�%�(� �A�
������X�x��T�J��������3�7�&������
��&�%������
��s%�C!F�7A'E;�	F�;F�F�Fc��yrqr�)r�r?rar`�blksizerbs      r&r^zPackageIndex.reporthook	s��r3c	���|jd�rt|�S	t||j�S#tt
jjf$rh}dj|jD�cgc]
}t|���ncc}wc}�}|r|j||�nt|�d|���|�Yd}~yd}~wtjj$r}|cYd}~Sd}~wtjj $rE}|r|j||j"�ntd|�d|j"���|�Yd}~yd}~wt
jj$$rD}|r|j||j&�nt|�d|j&���|�Yd}~yd}~wt
jj(t*f$r1}|r|j||�ntd|�d|���|�Yd}~yd}~wwxYw)Nr0rXzDownload error for rWz7 returned a bad status line. The server might be down, )r.�
local_open�open_with_authr�r#�http�client�
InvalidURLrnrrrr�rr;r�r��URLError�reason�
BadStatusLine�line�
HTTPException�OSError)r�r?�warning�v�argr�s      r&r�zPackageIndex.open_url
s����>�>�'�"��c�?�"�	T�!�#�t�{�{�3�3���D�K�K�2�2�3�	B��(�(����7���C��H���7�8�C���	�	�'�3�'�$��S�%9�:��A�(���|�|�%�%�	��H���|�|�$�$�	���	�	�'�1�8�8�,�$�36����A����-��
�{�{�(�(�	���	�	�'�1�6�6�*�$�"%�q�v�v�/����+�����)�)�7�3�	T���	�	�'�1�%�$�C��%K�L�RS�S�&��	T�sW�4�#G7�B:�0B
�3B:�: G7�C!�G7�! G7�;E� G7�!:F � &G7�'G2�2G7c��t|�\}}|r,d|vr*|jdd�jdd�}d|vr�'nd}|jd�r|dd}tjj||�}|dk(s|j
d	�r|j||�S|d
k(s|j
d�r|j||�S|j
d�r|j||�S|d
k(r?tjjtjj|�d�S|j|d�|j!||�S)Nz..�.�\�_�__downloaded__rQr+�svnzsvn+�gitzgit+zhg+r�riT)rG�replacer-r`rCrnr.�
_download_svn�
_download_git�_download_hgr;r��url2pathnamer"r<r��_attempt_download)r�rAr?r;r/rFras       r&r8zPackageIndex._download_url/s7��*�#�.���h���$�,��|�|�D�#�.�6�6�t�S�A���$�,�$�D��=�=��$����9�D��7�7�<�<���-���U�?�f�/�/��7��%�%�c�8�4�4�
�u�_�� 1� 1�&� 9��%�%�c�8�4�4�
�
�
�u�
%��$�$�S�(�3�3�
�v�
��>�>�.�.�v�|�|�/D�/D�S�/I�!�/L�M�M��K�K��T�"��)�)�#�x�8�8r3c�(�|j|d�y)NT)r�rs  r&rzPackageIndex.scan_urlLs������d�#r3c��|j||�}d|jdd�j�vr|j|||�S|S)Nr�r�r�)rdr�r,�_invalid_download_html)r�r?rar�s    r&r�zPackageIndex._attempt_downloadOsJ���#�#�C��2���W�[�[���4�:�:�<�<��.�.�s�G�X�F�F��Or3c�H�tj|�td|����)NzUnexpected HTML page found at )r`r+r)r�r?r�ras    r&r�z#PackageIndex._invalid_download_htmlVs!��
�	�	�(���=�c�U�C�D�Dr3c��td|����)Nz/Invalid config, SVN download is not supported: r)r�r?�	_filenames   r&r~zPackageIndex._download_svnZs���N�s�e�T�U�Ur3c�&�tjj|�\}}}}}|jdd�d}|jdd�d}d}d|vr|j	dd�\}}tjj||||df�}||fS)N�+r:r6r9r�@r�)r;r"�urlsplitr>�rsplit�
urlunsplit)r?�
pop_prefixrA�netlocrCrEr�revs        r&�_vcs_split_rev_from_urlz$PackageIndex._vcs_split_rev_from_url]s���,2�L�L�,A�,A�#�,F�)����e�T����c�1�%�b�)���z�z�#�q�!�!�$�����$�;����C��+�I�D�#��l�l�%�%�v�v�t�U�B�&G�H���C�x�r3c��|jdd�d}|j|d��\}}|jd||�tjd|�d|���|�-|jd	|�tjd
|�d|���|S)Nr9r:rT�r�zDoing git clone from %s to %szgit clone --quiet rXzChecking out %szgit -C z checkout --quiet �r>r�r�r`�system�r�r?rar�s    r&rzPackageIndex._download_gitos����>�>�#�q�)�!�,���/�/���/�E���S��	�	�1�3��A�
�	�	�s�H�=�>��?��I�I�'��-��I�I����
��r3c��|jdd�d}|j|d��\}}|jd||�tjd|�d|���|�.|jd	|�tjd
|�d|�d��|S)
Nr9r:rTr�zDoing hg clone from %s to %szhg clone --quiet rXzUpdating to %sz	hg --cwd z
 up -C -r z -qr�r�s    r&r�zPackageIndex._download_hg�s����>�>�#�q�)�!�,���/�/���/�E���S��	�	�0�#�x�@�
�	�	�c�8�<�=��?��I�I�&��,��I�I����
��r3c�0�tj|g|���yrq)rr�rs   r&r�zPackageIndex.debug�s���	�	�#���r3c�0�tj|g|���yrq)rr�rs   r&r�zPackageIndex.info���������t�r3c�0�tj|g|���yrq)rr�rs   r&r�zPackageIndex.warn�r�r3)zhttps://pypi.org/simple/)�*NT)Frq)FFFN)FF)*r�r�r�r�r�r�r�r�r�rr�rr�rrr%r(r.r3r'r#r7r:rKr9rZrdr^r�r8rr�r�r~�staticmethodr�rr�r�r�r��
__classcell__�r�s@r&rr*s����E�-����-�$!�31�j'� 
 �?�� 2� 
�:
�&�
�H��
)��	� P�L����M?�^�,�\�L�"�H
� T�D9�:$��E�V�����"�&�&��r3rz!&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?c�N�|jd�}tj|�S)Nr)rMr��unescape)rL�whats  r&�
decode_entityr��s���;�;�q�>�D��=�=���r3c�"�tt|�S)a
    Decode HTML entities in the given text.

    >>> htmldecode(
    ...     'https://../package_name-0.1.2.tar.gz'
    ...     '?tokena=A&amp;tokenb=B">package_name-0.1.2.tar.gz')
    'https://../package_name-0.1.2.tar.gz?tokena=A&tokenb=B">package_name-0.1.2.tar.gz'
    )�
entity_subr�)�texts r&r�r��s���m�T�*�*r3c����fd�}|S)Nc������fd�}|S)Nc����tj�}tj��	�|i|��tj|�S#tj|�wxYwrq)�socket�getdefaulttimeout�setdefaulttimeout)rrrs�old_timeoutrt�timeouts   ��r&�_socket_timeoutz@socket_timeout.<locals>._socket_timeout.<locals>._socket_timeout�sN��� �2�2�4�K��$�$�W�-�
6��T�,�V�,��(�(��5���(�(��5�s�A	�	A r�)rtr�r�s` �r&r�z'socket_timeout.<locals>._socket_timeout�s���	6��r3r�)r�r�s` r&�socket_timeoutr��s���	��r3c���tjj|�}|j�}t	j
|�}|j
�}|jdd�S)a9
    Encode auth from a URL suitable for an HTTP header.
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
    �
r�)r;r"r=�encode�base64�	b64encoder�r})�auth�auth_s�
auth_bytes�
encoded_bytes�encodeds     r&�_encode_authr��sR���\�\�
!�
!�$�
'�F�����J��$�$�Z�0�M��"�"�$�G��?�?�4��$�$r3c�"�eZdZdZd�Zd�Zd�Zy)�
Credentialz:
    A username/password pair. Use like a namedtuple.
    c� �||_||_yrq��username�password)r�r�r�s   r&r�zCredential.__init__�s�� ��
� ��
r3c#�DK�|j��|j��y�wrqr�r�s r&�__iter__zCredential.__iter__�s�����m�m���m�m��s� c��dt|�zS)Nz%(username)s:%(password)s)�varsr�s r&�__str__zCredential.__str__�s��*�T�$�Z�7�7r3N)r�r�r�r�r�r�r�r�r3r&r�r��s���!��8r3r�c�:��eZdZ�fd�Zed��Zd�Zd�Z�xZS)�
PyPIConfigc�0��tjgd�d�}t�|�
|�tj
j
tj
jd�d�}tj
j|�r|j|�yy)z%
        Load from ~/.pypirc
        )r�r��
repositoryr��~z.pypircN)
�dict�fromkeysr�r�r`rCrn�
expanduserr�r�)r��defaults�rcr�s   �r&r�zPyPIConfig.__init__�sf����=�=�!G��L��
����"�
�W�W�\�\�"�'�'�,�,�S�1�9�
=��
�7�7�>�>�"���I�I�b�M�r3c���|j�D�cgc]$}|j|d�j�r|��&}}tt	|j
|��Scc}w)Nr�)�sectionsr�r�r�r~�_get_repo_cred)r��section�sections_with_repositoriess   r&�creds_by_repositoryzPyPIConfig.creds_by_repository�sa�� �=�=�?�&
�*���x�x���.�4�4�6�
�*�	#�&
��C��+�+�-G�H�I�I��
&
s�)Ac���|j|d�j�}|t|j|d�j�|j|d�j��fS)Nr�r�r�)r�r�r�)r�r��repos   r&r�zPyPIConfig._get_repo_creds]���x�x���.�4�4�6���Z��H�H�W�j�)�/�/�1��H�H�W�j�)�/�/�1�
�
�	
r3c�r�|jj�D]\}}|j|�s�|cSy)z�
        If the URL indicated appears to be a repository defined in this
        config, return the credential for that repository.
        N)r��itemsr.)r�r?r��creds    r&�find_credentialzPyPIConfig.find_credentials4��
!%� 8� 8� >� >� @��J���~�~�j�)���!Ar3)	r�r�r�r��propertyr�r�r�r�r�s@r&r�r��s(���	��J��J�
�r3r�c��tjj|�}|\}}}}}}|jd�rtj
j
d��|dvrt|�\}	}
nd}	|	sJt�j|�}|r/t|�}	|j|f}tjdg|���|	rgdt|	�z}	|
||||f}
tjj|
�}tj j#|�}|j%d|	�ntj j#|�}|j%dt&�||�}|	rftjj|j(�\}}}}}}||k(r1|
k(r,||||||f}
tjj|
�|_|S)	z4Open a urllib2 request, handling HTTP authentication�:znonnumeric port: '')rj�httpsNz*Authenticating as %s for %s (from .pypirc)zBasic �
Authorizationz
User-Agent)r;r"r<r-rjrkrl�
_splituserr�r�rr�rr�r��
urlunparser��Request�
add_header�
user_agentr?)r?r��parsedrAr�rC�paramsrErr��addressr�r�r@rr�r_�s2�h2�path2�param2�query2�frag2s                       r&riris����\�\�
"�
"�3�
'�F�06�-�F�F�D�&�%�����s���k�k�$�$�%:�;�;�
�"�"�"�6�*�
��g�����|�+�+�C�0����t�9�D��=�=�#�%�D��H�H�A�I�D�I���,�t�,�,�����v�u�d�:���,�,�)�)�%�0���.�.�(�(��1�����?�D�1��.�.�(�(��-�����|�Z�0�	���B��06�|�|�/D�/D�R�V�V�/L�,��B��v�v�u�
��<�B�'�M����v�v�u�<�E��\�\�,�,�U�3�B�F�
�Ir3c�@�|jd�\}}}|r||fSd|fS)zNsplituser('user[:passwd]@host[:port]')
    --> 'user[:passwd]', 'host[:port]'.r�N)�
rpartition)�host�user�delims   r&r�r�@s0������,��D�%���D�d�*�*�t�d�*�*r3c��|Srqr�)r?s r&�
fix_sf_urlr�Ks���Jr3c��tjj|�\}}}}}}tjj	|�}t
jj|�rtjj|�S|jd�r�t
jj|�r�g}tj|�D]�}	t
jj||	�}
|	dk(r't|
d�5}|j�}ddd�nkt
jj|
�r|	dz
}	|jdj!|	�����d}
|
j!|dj|��	�}d
\}}nd\}}}dd
i}t#j$�}tj&j)|||||�S#1swY��xYw)z7Read a local path, with special support for directoriesr5z
index.html�rNz<a href="{name}">{name}</a>)r/zB<html><head><title>{url}</title></head><body>{files}</body></html>r�)r?�files)���OK)r�zPath not foundz	Not foundr�z	text/html)r;r"r<r�r�r`rC�isfiler�r-r�r�rnrr�r1�format�io�StringIOr�r�)r?rArBrC�paramrErrar�r��filepathr_�bodyr��status�messager��body_streams                  r&rhrhOsy��/5�|�|�/D�/D�S�/I�,�F�F�D�%����~�~�*�*�4�0�H�	�w�w�~�~�h���~�~�%�%�c�*�*�	
���s�	����
�
�h� 7������H�%�A��w�w�|�|�H�a�0�H��L� ��(�C�(�B��7�7�9�D�)�������x�(��S����L�L�6�=�=�1�=�E�F�&�X�
��;�;�3�d�i�i��.>�;�?�D�#���� B������{�+�G��+�+�d�#�K��<�<�!�!�#�v�w���M�M�#)�(�s�?G
�
G	rq)r)Yr��sysr`rer�rPr�r�r�r��configparserr��http.clientrj�urllib.parser;�urllib.request�urllib.error�	functoolsrr �
pkg_resourcesrrrrr	r
rrr
rrrrr�	distutilsr�distutils.errorsr�fnmatchr�setuptools.wheelr� setuptools.extern.more_itertoolsrr�rK�Ir�rrLr�r>rX�__all__�_SOCKET_TIMEOUT�_tmplr��version_infor�r'rrGrrJrbrrvrzr�r�r�rrr�r�r�r�r�r��RawConfigParserr�r�r�rir�r�rhr�r3r&�<module>rs��*�
�	�	�	�
�
�
��������������� �+��"�<��r�z�z�6�7���r�z�z�3�R�T�T�:���2�:�:�J����R�Z�Z�,�b�d�d�
3�
9�
9�
�
.�
4�
4�
6�
�����F��
�\�\�
�W�^�^�S�-�-�
.�:���
�
��0�� �F�.2�k�TX��D
��b�j�j�K�R�T�T�R���
�L��L�$��2�.��Br	�;�r	�n�R�Z�Z�<�
=�
A�
A�
��
	+��%�*8�8�"$��-�-�$�N &�~�~�5�5�+�^+�1���0��@���Nr3python3.12/site-packages/setuptools/__pycache__/windows_support.cpython-312.pyc000064400000002737151732703730023554 0ustar00�

��_i���"�ddlZd�Zed��Zy)�Nc�:�tj�dk7rd�S|S)N�Windowsc��y)N�)�args�kwargss  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/windows_support.py�<lambda>zwindows_only.<locals>.<lambda>s��t�)�platform�system)�funcs r	�windows_onlyrs������I�%�+�+��Krc�4�ddl}td�|jjj}|j
j|j
jf|_|j
j|_
d}|||�}|s|j��y)z�
    Set the hidden attribute on a file or directory.

    From https://stackoverflow.com/questions/19622133/

    `path` must be text.
    rNzctypes.wintypes�)�ctypes�
__import__�windll�kernel32�SetFileAttributesW�wintypes�LPWSTR�DWORD�argtypes�BOOL�restype�WinError)�pathr�SetFileAttributes�FILE_ATTRIBUTE_HIDDEN�rets     r	�	hide_filer"
s����� �!��
�
�.�.�A�A��!'���!7�!7����9N�9N�!N��� &��� 4� 4��� ��
�D�"7�
8�C���o�o���r)rrr"rrr	�<module>r#s!����� �� rpython3.12/site-packages/setuptools/__pycache__/namespaces.cpython-312.pyc000064400000012264151732703730022401 0ustar00�

��_i��v�ddlZddlmZddlZejj
ZGd�d�ZGd�de�Zy)�N)�logc�V�eZdZdZd�Zd�Zd�Zd�ZdZ	dZ		d�Z
d	�Zd
�Ze
d��Zy)
�	Installerz
-nspkg.pthc�l�|j�}|sy|j�}|jj|�t	j
d|�t
|j|�}|jrt|�yt|d�5}|j|�ddd�y#1swYyxYw)Nz
Installing %s�wt)�_get_all_ns_packages�_get_nspkg_file�outputs�appendr�info�map�_gen_nspkg_line�dry_run�list�open�
writelines)�self�nsp�filename�lines�fs     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/namespaces.py�install_namespaceszInstaller.install_namespacess����'�'�)�����'�'�)�������H�%�����(�+��D�(�(�#�.���<�<���K��
�(�D�
!�Q�
�L�L���"�
!�
!�s�B*�*B3c��|j�}tjj|�syt	j
d|�tj|�y)NzRemoving %s)r	�os�path�existsrr�remove)rrs  r�uninstall_namespaceszInstaller.uninstall_namespacess=���'�'�)���w�w�~�~�h�'�������)�
�	�	�(��c��tjj|j��\}}||jzS�N)rr�splitext�_get_target�	nspkg_ext)rr�_s   rr	zInstaller._get_nspkg_file$s2���g�g�&�&�t�'7�'7�'9�:���!��$�.�.�(�(r c��|jSr")�target�rs rr$zInstaller._get_target(s���{�{�r )	zimport sys, types, osz#has_mfs = sys.version_info > (3, 5)z$p = os.path.join(%(root)s, *%(pth)r)z4importlib = has_mfs and __import__('importlib.util')z-has_mfs and __import__('importlib.machinery')z�m = has_mfs and sys.modules.setdefault(%(pkg)r, importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec(%(pkg)r, [os.path.dirname(p)])))zCm = m or sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))z7mp = (m or []) and m.__dict__.setdefault('__path__',[])z(p not in mp) and mp.append(p))z4m and setattr(sys.modules[%(parent)r], %(child)r, m)c��y)Nz$sys._getframe(1).f_locals['sitedir']�r)s r�	_get_rootzInstaller._get_rootAs��5r c��t|jd��}|j�}|j}|j	d�\}}}|r||j
z
}dj
|�t�zdzS)N�.�;�
)�tuple�splitr,�_nspkg_tmpl�
rpartition�_nspkg_tmpl_multi�join�locals)r�pkg�pth�root�
tmpl_lines�parent�sep�childs        rrzInstaller._gen_nspkg_lineDsn���C�I�I�c�N�#���~�~����%�%�
� �^�^�C�0����U���$�0�0�0�J��x�x�
�#�f�h�.��5�5r c
��|jjxsg}ttt	t|j|����S)z,Return sorted list of all package namespaces)�distribution�namespace_packages�sorted�set�flattenr
�
_pkg_names)r�pkgss  rrzInstaller._get_all_ns_packagesMs8��� � �3�3�9�r���c�'�#�d�o�o�t�"<�=�>�?�?r c#�K�|jd�}|r'dj|���|j�|r�&yy�w)z�
        Given a namespace package, yield the components of that
        package.

        >>> names = Installer._pkg_names('a.b.c')
        >>> set(names) == set(['a', 'a.b', 'a.b.c'])
        True
        r.N)r2r6�pop)r8�partss  rrEzInstaller._pkg_namesRs4�����	�	�#�����(�(�5�/�!��I�I�K��s�9>�>N)�__name__�
__module__�__qualname__r%rrr	r$r3r5r,rr�staticmethodrEr+r rrr	sT���I� �"�)���K�"(�Q��;�6�6�@�
���r rc��eZdZd�Zd�Zy)�DevelopInstallerc�>�tt|j��Sr")�repr�str�egg_pathr)s rr,zDevelopInstaller._get_rootcs���C��
�
�&�'�'r c��|jSr")�egg_linkr)s rr$zDevelopInstaller._get_targetfs���}�}�r N)rJrKrLr,r$r+r rrOrObs��(�r rO)	r�	distutilsr�	itertools�chain�
from_iterablerDrrOr+r r�<module>rZs8��	����/�/�
'�
'��V�V�r�y�r python3.12/site-packages/setuptools/__pycache__/msvc.cpython-312.pyc000064400000166155151732703730021243 0ustar00�

��_i>���h�dZddlZddlmZddlmZmZddlmZm	Z	m
Z
mZddlm
Z
ddlZddlZddlZddlZddlZddlmZej*�dk(rddlZdd	lmZnGd
�d�Ze�Zd�Zd
�Zddddd�Zd�Zd�Zd�Zdd�ZGd�d�Z Gd�d�Z!Gd�d�Z"Gd�d�Z#y) a�
Improved support for Microsoft Visual C++ compilers.

Known supported compilers:
--------------------------
Microsoft Visual C++ 14.X:
    Microsoft Visual C++ Build Tools 2015 (x86, x64, arm)
    Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64)
    Microsoft Visual Studio Build Tools 2019 (x86, x64, arm, arm64)

This may also support compilers shipped with compatible Visual Studio versions.
�N)�open)�listdir�pathsep)�join�isfile�isdir�dirname)�CalledProcessError)�unique_everseen�Windows)�environc��eZdZdZdZdZdZy)�winregN)�__name__�
__module__�__qualname__�
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�HKEY_CLASSES_ROOT����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/msvc.pyrr s���
� ��!�� �rrc�2�	tjtjddtjtjz�}d}d}|5t
j�D]e}	tj||�\}}}|s�!|tjk(s�5t|�s�A	tt|��}|dk\s�\||kDs�b||}}�gddd�||fS#t
$rYywxYw#t
$rY�'wxYw#ttf$rY��wxYw#1swY||fSxYw)�0Python 3.8 "distutils/_msvccompiler.py" backportz'Software\Microsoft\VisualStudio\SxS\VC7r�NNN�)r�OpenKeyr�KEY_READ�KEY_WOW64_32KEY�OSError�	itertools�count�	EnumValue�REG_SZr�int�float�
ValueError�	TypeError)�key�best_version�best_dir�i�v�vc_dir�vt�versions        r�_msvc14_find_vc2015r2)s����n�n��%�%�6�
��O�O�f�4�4�4�	
���L��H�	����"�A�
� &� 0� 0��a� 8�
��6�2��R�6�=�=�(�U�6�]��!�%��(�m�G��b�=�W�|�%;�-4�f�(�L�#�

���!�!��%������
��
��
#�I�.�����

���!�!�s~�AC�
D
�&C%�D
�D
�D
�$C5�8D
�>D
�D
�	C"�!C"�%	C2�.D
�1C2�2D
�5D�D
�D�D
�
Dc
���tjd�xstjd�}|syd}|D]�}tjtt
t�5tjt|ddd�dd	d
|ddd
dg	�jdd��j�}t|ddd�}t|�rd|fcddd�cS	ddd���y#1swY��xYw)a�Python 3.8 "distutils/_msvccompiler.py" backport

    Returns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    �ProgramFiles(x86)�ProgramFilesr)z1Microsoft.VisualStudio.Component.VC.Tools.x86.x64z)Microsoft.VisualStudio.Workload.WDExpresszMicrosoft Visual Studio�	Installerzvswhere.exez-latestz-prereleasez	-requiresz	-property�installationPathz	-products�*�mbcs�strict)�encoding�errors�VC�	Auxiliary�Build�N)
r
�get�
contextlib�suppressr
r!�UnicodeDecodeError�
subprocess�check_outputr�decode�stripr)�root�suitable_components�	component�paths    r�_msvc14_find_vc2017rMGs����;�;�*�+�J�w�{�{�>�/J�D�����
)�	�
�
 �
 �!3�W�>P�
Q��'�'�� �";�[�-��"�%�#�!�#�*�#���������9����#
�(��d�K��9�D��T�{��4�x�/R�
Q�,�-R�
Q�)�6�3R�
Q�s
�A&C�C!	�x86�x64�arm�arm64)rN�	x86_amd64�x86_arm�	x86_arm64c��t�\}}d}|tvr
t|}nd|vrdnd}|r.t|ddddd|d	d
�	}	ddl}|j|d�
�d}|st�\}}|rt|d|dd
�}|syt|d�}t|�sy|rt|�sd}||fS#tt
tf$rd}Y�fwxYw)rN�amd64rOrNz..�redist�MSVCz**zMicrosoft.VC14*.CRTzvcruntime140.dllrT)�	recursive���zMicrosoft.VC140.CRTrz
vcvarsall.bat)	rM�PLAT_SPEC_TO_RUNTIMEr�glob�ImportErrorr!�LookupErrorr2r)	�	plat_spec�_r,�	vcruntime�vcruntime_plat�vcredistr\r+�	vcvarsalls	         r�_msvc14_find_vcvarsallre�s���%�'�K�A�x��I��(�(�-�i�8��")�Y�"6��E�����������!��

��	���	�	�(�d�	�;�B�?�I��!4�!6���h������%�"��I����X��/�I��)����F�9�-��	��i����1�W�k�2�	��I�	�s�B(�(C�Cc��dtvr6tj�D��cic]\}}|j�|��c}}St|�\}}|stj
j
d��	tjdj||�tj��jdd��}d
�|j�D�D���cic]\}}}|r|r|j�|��}}}}|r||d<|Scc}}w#tj$r>}tj
j
dj|j��|�d	}~wwxYwcc}}}w)r�DISTUTILS_USE_SDKzUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)�stderrzutf-16le�replace)r<zError executing {}Nc3�>K�|]}|jd����y�w)�=N)�	partition)�.0�lines  r�	<genexpr>z%_msvc14_get_vc_env.<locals>.<genexpr>�s����O�>N�d�d�n�n�S�1�>N�s��py_vcruntime_redist)r
�items�lowerre�	distutilsr<�DistutilsPlatformErrorrErF�format�STDOUTrGr
�cmd�
splitlines)	r_r*�valuerdra�out�excr`�envs	         r�_msvc14_get_vc_envr}�sI���g�%�5<�]�]�_�E�_�z�s�E��	�	��U�"�_�E�E�1�)�<��I�y�����5�5�6T�U�U���%�%�&�-�-�i��C��$�$�
��&��I�&�
.�	�P�c�n�n�>N�O��O�M�C��E��5�	�	�	��U��O����%.��!�"��J��1F���(�(�����5�5� �'�'����0�
��	����
s$�C=�/AD� E�E�9E�Ec�~�	t|�S#tjj$r}t	|d��d}~wwxYw)a*
    Patched "distutils._msvccompiler._get_vc_env" for support extra
    Microsoft Visual C++ 14.X compilers.

    Set environment without use of "vcvarsall.bat".

    Parameters
    ----------
    plat_spec: str
        Target architecture.

    Return
    ------
    dict
        environment
    �,@N)r}rsr<rt�_augment_exception)r_r{s  r�msvc14_get_vc_envr��s;��&�!�)�,�,�����2�2���3��%�
���s�

�<�
7�<c�V�|jd}d|j�vsd|j�vrnd}|jdit���}d}|dk(r.|j�j	d�dkDr|d	z
}n#|d
z
}n|dk(r|dz
}||d
zz
}n
|dk\r|dz
}|f|_y)zl
    Add details to the exception message to help guide the user
    as to what action will resolve it.
    rrdzvisual cz;Microsoft Visual C++ {version:0.1f} or greater is required.z-www.microsoft.com/download/details.aspx?id=%d�"@�ia64rZz( Get it with "Microsoft Windows SDK 7.0"z% Get it from http://aka.ms/vcpython27�$@z* Get it with "Microsoft Windows SDK 7.1": iW rzd Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/Nr)�argsrrru�locals�find)r{r1�arch�message�tmpl�
msdownloads      rr�r��s����h�h�q�k�G��g�m�m�o�%��w�}�}��)F�L���$�+�+�)���)��D�
��c�>��z�z�|� � ��(�2�-��E�E��
�B�B��
��_��C�C�G��z�D�(�(�G�
��_��,�
�G��z�C�Hrc��eZdZdZej
dd�j
�Zd�Ze	d��Z
d�Zd�Zdd�Z
dd	�Zd
d
�Zy)�PlatformInfoz�
    Current and Target Architectures information.

    Parameters
    ----------
    arch: str
        Target architecture.
    �processor_architecture�c�N�|j�jdd�|_y)NrOrV)rrrir�)�selfr�s  r�__init__zPlatformInfo.__init__"s���J�J�L�(�(���8��	rc�X�|j|jjd�dzdS)zs
        Return Target CPU architecture.

        Return
        ------
        str
            Target CPU
        r`�N)r�r��r�s r�
target_cpuzPlatformInfo.target_cpu%s(���y�y�������,�q�0�2�3�3rc� �|jdk(S)z�
        Return True if target CPU is x86 32 bits..

        Return
        ------
        bool
            CPU is x86 32 bits
        rN�r�r�s r�
target_is_x86zPlatformInfo.target_is_x861s�����%�'�'rc� �|jdk(S)z�
        Return True if current CPU is x86 32 bits..

        Return
        ------
        bool
            CPU is x86 32 bits
        rN��current_cpur�s r�current_is_x86zPlatformInfo.current_is_x86<s�����5�(�(rc�l�|jdk(r|rdS|jdk(r|rdSd|jzS)uk
        Current platform specific subfolder.

        Parameters
        ----------
        hidex86: bool
            return '' and not '†' if architecture is x86.
        x64: bool
            return 'd' and not 'md64' if architecture is amd64.

        Return
        ------
        str
            subfolder: '	arget', or '' (see hidex86 parameter)
        rNr�rV�\x64�\%sr��r��hidex86rOs   r�current_dirzPlatformInfo.current_dirGsO��$� � �E�)�g�
�	
�� � �G�+���	
�
�$�*�*�*�	
rc�l�|jdk(r|rdS|jdk(r|rdSd|jzS)ar
        Target platform specific subfolder.

        Parameters
        ----------
        hidex86: bool
            return '' and not '\x86' if architecture is x86.
        x64: bool
            return '\x64' and not '\amd64' if architecture is amd64.

        Return
        ------
        str
            subfolder: '\current', or '' (see hidex86 parameter)
        rNr�rVr�r�r�r�s   r�
target_dirzPlatformInfo.target_dir_sI��$���5�(�W�
�	
����7�*�s��	
�
�$�/�/�)�	
rc��|rdn|j}|j|k(rdS|j�jdd|z�S)ap
        Cross platform specific subfolder.

        Parameters
        ----------
        forcex86: bool
            Use 'x86' as current architecture even if current architecture is
            not x86.

        Return
        ------
        str
            subfolder: '' if target architecture is current architecture,
            '\current_target' if not.
        rNr��\z\%s_)r�r�r�ri)r��forcex86�currents   r�	cross_dirzPlatformInfo.cross_dirwsN�� $�%��)9�)9�����'�)�
�	
����"�*�*�4��7�1B�C�	
rN)FF�F)rrr�__doc__r
rArrr�r��propertyr�r�r�r�r�r�rrrr�r�sW����'�+�+�6��;�A�A�C�K�9��	4��	4�	(�	)�
�0
�0
rr�c��eZdZdZej
ejejejfZ	d�Z
ed��Zed��Z
ed��Zed��Zed��Zed��Zed	��Zed
��Zed��Zdd�Zd
�Zy)�RegistryInfoz�
    Microsoft Visual Studio related registry information.

    Parameters
    ----------
    platform_info: PlatformInfo
        "PlatformInfo" instance.
    c��||_y�N)�pi)r��
platform_infos  rr�zRegistryInfo.__init__�s	����rc��y)z�
        Microsoft Visual Studio root registry key.

        Return
        ------
        str
            Registry key
        �VisualStudiorr�s r�visualstudiozRegistryInfo.visualstudio�s��rc�.�t|jd�S)z
        Microsoft Visual Studio SxS registry key.

        Return
        ------
        str
            Registry key
        �SxS)rr�r�s r�sxszRegistryInfo.sxs�s���D�%�%�u�-�-rc�.�t|jd�S)z|
        Microsoft Visual C++ VC7 registry key.

        Return
        ------
        str
            Registry key
        �VC7�rr�r�s r�vczRegistryInfo.vc�����D�H�H�e�$�$rc�.�t|jd�S)z
        Microsoft Visual Studio VS7 registry key.

        Return
        ------
        str
            Registry key
        �VS7r�r�s r�vszRegistryInfo.vs�r�rc��y)z�
        Microsoft Visual C++ for Python registry key.

        Return
        ------
        str
            Registry key
        zDevDiv\VCForPythonrr�s r�
vc_for_pythonzRegistryInfo.vc_for_python�s��%rc��y)zq
        Microsoft SDK registry key.

        Return
        ------
        str
            Registry key
        zMicrosoft SDKsrr�s r�
microsoft_sdkzRegistryInfo.microsoft_sdk�s�� rc�.�t|jd�S)z�
        Microsoft Windows/Platform SDK registry key.

        Return
        ------
        str
            Registry key
        r�rr�r�s r�windows_sdkzRegistryInfo.windows_sdk�s���D�&�&�	�2�2rc�.�t|jd�S)z�
        Microsoft .NET Framework SDK registry key.

        Return
        ------
        str
            Registry key
        �NETFXSDKr�r�s r�	netfx_sdkzRegistryInfo.netfx_sdk�s���D�&�&�
�3�3rc��y)z�
        Microsoft Windows Kits Roots registry key.

        Return
        ------
        str
            Registry key
        zWindows Kits\Installed Rootsrr�s r�windows_kits_rootszRegistryInfo.windows_kits_rootss��/rc�^�|jj�s|rdnd}td|d|�S)a
        Return key in Microsoft software registry.

        Parameters
        ----------
        key: str
            Registry key path where look.
        x86: str
            Force x86 software registry.

        Return
        ------
        str
            Registry key
        r��Wow6432Node�Software�	Microsoft)r�r�r)r�r*rN�node64s    r�	microsoftzRegistryInfo.microsofts-�� �w�w�-�-�/�3��M���J���S�9�9rc	��tj}tj}tj}|j}|j
D]>}d}	||||�d|�}	tj||�d|r||�cScSy#t$rC|jj�s$	||||d�d|�}n#t$rYY��wxYwY��Y�vwxYw#t$rYnwxYw	|s��||���#|r	||�wwxYw)a
        Look for values in registry in Microsoft software registry.

        Parameters
        ----------
        key: str
            Registry key path where look.
        name: str
            Value name to find.

        Return
        ------
        str
            value
        NrT)
rrr�CloseKeyr��HKEYSr!r�r��QueryValueEx)	r�r*�name�key_read�openkey�closekey�ms�hkey�bkeys	         r�lookupzRegistryInfo.lookup"s
�� �?�?���.�.���?�?��
�^�^���J�J�D��D�	
��t�R��W�a��:��
#��*�*�4��6�q�9���T�N��#���
��w�w�-�-�/�!�&�t�R��T�]�A�x�H���"�!� �!���	�
���
��
�����T�N����T�N��sZ�B�!C�#C�/C�C�	C�C�C�C�C�	C&�#C6�%C&�&C6�6
DNr�)rrrr�rrrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr�r��s����	���� � ��!�!�� � �	
�E� ��	��	��	.��	.��	%��	%��	%��	%��	%��	%��	 ��	 ��	3��	3��	4��	4��	/��	/�:�&&#rr�c��eZdZdZej
dd�Zej
dd�Zej
de�Zdd�Z	d�Z
d	�Zd
�Ze
d��Zed��Zed
��Zd�Zd�Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Z d�Z!e
d d��Z"y)!�
SystemInfoz�
    Microsoft Windows and Visual Studio related system information.

    Parameters
    ----------
    registry_info: RegistryInfo
        "RegistryInfo" instance.
    vc_ver: float
        Required Microsoft Visual C++ version.
    �WinDirr�r5r4Nc��||_|jj|_|j�|_|xs|j	�x|_|_yr�)�rir��find_programdata_vs_vers�known_vs_paths�_find_latest_available_vs_ver�vs_ver�vc_ver)r��
registry_infor�s   rr�zSystemInfo.__init__]sG������'�'�*�*���"�;�;�=���%+�$R�d�.P�.P�.R�R���d�krc���|j�}|s+|jstjj	d��t|�}|j
|j�t|�dS)zm
        Find the latest VC version

        Return
        ------
        float
            version
        z%No Microsoft Visual C++ version foundrZ)�find_reg_vs_versr�rsr<rt�set�update�sorted)r��reg_vc_vers�vc_verss   rr�z(SystemInfo._find_latest_available_vs_verfsf���+�+�-���t�2�2��"�"�9�9�7��
��k�"�����t�*�*�+��g��r�"�"rc
���|jj}|jj|jj|jjf}g}tj|jj|�D�]'\}}	tj|||�dtj�}|5tj|�\}}}	t|�D][}
tjt �5t#tj$||
�d�}||vr|j'|�ddd��]t|�D]X}
tjt �5t#tj(||
��}||vr|j'|�ddd��Z	ddd���*t+|�S#t$rY��BwxYw#1swY��xYw#1swY��xYw#1swY��hxYw)z�
        Find Microsoft Visual Studio versions available in registry.

        Return
        ------
        list of float
            Versions
        rN)r�r�r�r�r�r"�productr�rrrr!�QueryInfoKey�rangerBrCr(r'r$�append�EnumKeyr�)r�r��vckeys�vs_versr�r*r��subkeys�valuesr`r-�vers            rr�zSystemInfo.find_reg_vs_verszs����W�W�
�
���'�'�*�*�d�g�g�3�3�T�W�W�Z�Z�@����"�*�*�4�7�7�=�=�&�A�I�D�#�
��~�~�d�B�s�G�Q����H���%+�%8�%8��%>�"�����v��A�#�,�,�Z�8�#�F�$4�$4�T�1�$=�a�$@�A���g�-�#�N�N�3�/�9�8�'�
�w��A�#�,�,�Z�8�#�F�N�N�4��$;�<���g�-�#�N�N�3�/�9�8�(���B�"�g�����
��
��
9�8��
9�8����sO�,F:�:AG"�;8G
	�31G"�$5G	�
G"�:	G�G�
G
�G"�G
�G"�"G,	c�n�i}d}	t|�}|D]m}	t||d�}t|dd��5}t	j
|�}ddd�d}tt|d��|||j
|d	�<�o|S#t$r|cYSwxYw#1swY�OxYw#ttf$rY��wxYw)
z�
        Find Visual studio 2017+ versions from information in
        "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances".

        Return
        ------
        dict
            float version as key, path as value.
        z9C:\ProgramData\Microsoft\VisualStudio\Packages\_Instancesz
state.json�rtzutf-8)r;Nr7�
VC\Tools\MSVC�installationVersion)rr!rr�json�load�_as_float_version�KeyError)	r��vs_versions�
instances_dir�hashed_namesr��
state_path�
state_file�state�vs_paths	         rr�z#SystemInfo.find_programdata_vs_vers�s�����T�
�	�"�=�1�L�!�D�
�!�-��|�D�
��*�d�W�=�� �I�I�j�1�E�>�� 2�3����W�&6�7�8�
���*�*�5�1F�+G�H��!�(���1�	���	��>�=���X�&�
��
�s9�B�B"�B�9B"�B�B�B	�B"�"B4�3B4c�Z�tdj|jd�dd��S)z�
        Return a string version as a simplified float version (major.minor)

        Parameters
        ----------
        version: str
            Version.

        Return
        ------
        float
            version
        �.N�)r'r�split)r1s rrzSystemInfo._as_float_version�s(���S�X�X�g�m�m�C�0��!�4�5�6�6rc���t|jd|jz�}|jj	|jj
d|jz�xs|S)zp
        Microsoft Visual Studio directory.

        Return
        ------
        str
            path
        zMicrosoft Visual Studio %0.1f�%0.1f)r�ProgramFilesx86r�r�r�r�)r��defaults  r�VSInstallDirzSystemInfo.VSInstallDir�sP���� � �"A�D�K�K�"O�
��
�w�w�~�~�d�g�g�j�j�'�D�K�K�*?�@�K�G�Krc��|j�xs|j�}t|�s!d}tjj|��|S)zm
        Microsoft Visual C++ directory.

        Return
        ------
        str
            path
        z(Microsoft Visual C++ directory not found)�	_guess_vc�_guess_vc_legacyrrsr<rt)r�rL�msgs   r�VCInstallDirzSystemInfo.VCInstallDir�sF���~�~��:�4�#8�#8�#:���T�{�<�C��"�"�9�9�#�>�>��rc�0�|jdkry	|j|j}t	|d�}	t|�d}|j
|�|_t	||�S#t$r|j}Y�TwxYw#ttf$rYywxYw)zl
        Locate Visual C++ for VS2017+.

        Return
        ------
        str
            path
        rr�rrZ)
r�r�rrrrrr�r!�
IndexError)r��vs_dir�guess_vcr�s    rrzSystemInfo._guess_vc�s����;�;�$���	'��(�(����5�F�
�� 0�1��	��X�&�r�*�F��0�0��8�D�K���&�)�)���	'��&�&�F�	'����$�	��	�s"�A(�/B�(B�?B�B�Bc�|�t|jd|jz�}t|jjd|jz�}|jj|d�}|rt|d�n|}|jj|jjd|jz�xs|S)z{
        Locate Visual C++ for versions prior to 2017.

        Return
        ------
        str
            path
        z Microsoft Visual Studio %0.1f\VCr�
installdirr=)rrr�r�r�r�r�)r�r�reg_path�	python_vc�
default_vcs     rrzSystemInfo._guess_vc_legacys����� � �"E����"S�
��
����-�-�w����/D�E���G�G�N�N�8�\�:�	�.7�T�)�T�*�W�
��w�w�~�~�d�g�g�j�j�'�D�K�K�*?�@�N�J�Nrc��|jdkry|jdk(ry|jdk(ry|jdk(ry|jd	k\ry
y)z�
        Microsoft Windows SDK versions for specified MSVC++ version.

        Return
        ------
        tuple of str
            versions
        r�)z7.0z6.1z6.0ar�)z7.1z7.0a�&@)z8.0z8.0a�(@)�8.1z8.1ar)z10.0r'N�r�r�s r�WindowsSdkVersionzSystemInfo.WindowsSdkVersion+sT���;�;�#��'�
�[�[�D�
 � �
�[�[�D�
 � �
�[�[�D�
 � �
�[�[�D�
 � �!rc�L�|jt|jd��S)zt
        Microsoft Windows SDK last version.

        Return
        ------
        str
            version
        �lib)�_use_last_dir_namer�
WindowsSdkDirr�s r�WindowsSdkLastVersionz SystemInfo.WindowsSdkLastVersion@s"���&�&�t�D�,>�,>��'F�G�Grc���d}|jD]E}t|jjd|z�}|jj	|d�}|s�En|rt|�sWt|jjd|jz�}|jj	|d�}|rt|d�}|rt|�sN|jD]?}|d|jd�}d	|z}t|j|�}t|�s�>|}�A|rt|�s:|jD]+}d
|z}t|j|�}t|�s�*|}�-|st|jd�}|S)zn
        Microsoft Windows SDK directory.

        Return
        ------
        str
            path
        r�zv%s�installationfolderrr �WinSDKNrzMicrosoft SDKs\Windows Kits\%szMicrosoft SDKs\Windows\v%s�PlatformSDK)r)rr�r�r�rr�r��rfindr5r)r��sdkdirr��locrL�install_base�intver�ds        rr-zSystemInfo.WindowsSdkDirLsP�����)�)�C��t�w�w�*�*�E�C�K�8�C��W�W�^�^�C�)=�>�F���*��U�6�]�����-�-�w����/D�E�D��7�7�>�>�$��=�L���l�H�5���U�6�]��-�-���-�s�y�y��~�.��8�6�A����*�*�D�1����8��F�.��U�6�]��-�-��4�s�:����*�*�D�1����8��F�	.�
��$�+�+�]�;�F��
rc��|jdkrd}d}n2d}|jdkrdnd}|jjd|��}d	||jd
d�fz}g}|jdk\r6|jD]'}|t|jj||�gz
}�)|jD]*}|t|jjd
|z|�gz
}�,|D]$}|jj|d�}|s�"|cSy)zy
        Microsoft Windows SDK executable directory.

        Return
        ------
        str
            path
        r%�#r��(r&TF)rOr�zWinSDK-NetFx%dTools%sr��-rzv%sAr0N)r�r�r�ri�NetFxSdkVersionrr�r�r)r�r�)	r��netfxverr�r��fx�regpathsr�rL�execpaths	         r�WindowsSDKExecutablePathz#SystemInfo.WindowsSDKExecutablePathws���;�;�$���H��D��H�"�k�k�T�1�d�u�G��7�7�&�&�4��&�A�D�
$��$�,�,�t�S�2I�'J�
J�����;�;�$���+�+���T�$�'�'�"3�"3�S�"�=�>�>��,��)�)�C���d�g�g�1�1�6�C�<��D�E�E�H�*��D��w�w�~�~�d�,@�A�H����rc��t|jjd|jz�}|jj	|d�xsdS)zl
        Microsoft Visual F# directory.

        Return
        ------
        str
            path
        z%0.1f\Setup\F#�
productdirr�)rr�r�r�r�)r�rLs  r�FSharpInstallDirzSystemInfo.FSharpInstallDir�s>���D�G�G�(�(�*;�d�k�k�*I�J���w�w�~�~�d�L�1�7�R�7rc��|jdk\rdnd}|D]?}|jj|jjd|z�}|s�9|xsdcSy)zt
        Microsoft Universal CRT SDK directory.

        Return
        ------
        str
            path
        r)�10�81rz
kitsroot%sr�N)r�r�r�r�)r��versr�r4s    r�UniversalCRTSdkDirzSystemInfo.UniversalCRTSdkDir�sR�� $�{�{�d�2�|����C��W�W�^�^�D�G�G�$>�$>��s�@R�S�F���|��#�rc�L�|jt|jd��S)z�
        Microsoft Universal C Runtime SDK last version.

        Return
        ------
        str
            version
        r+)r,rrJr�s r�UniversalCRTSdkLastVersionz%SystemInfo.UniversalCRTSdkLastVersion�s"���&�&�t�D�,C�,C�U�'K�L�Lrc�(�|jdk\rdSdS)z�
        Microsoft .NET Framework SDK versions.

        Return
        ------
        tuple of str
            versions
        r)	z4.7.2z4.7.1z4.7z4.6.2z4.6.1z4.6z4.5.2z4.5.1z4.5rr(r�s rr=zSystemInfo.NetFxSdkVersion�s%���{�{�d�"�
X�	
��	
rc��d}|jD]C}t|jj|�}|jj	|d�}|s�B|S|S)zu
        Microsoft .NET Framework SDK directory.

        Return
        ------
        str
            path
        r��kitsinstallationfolder)r=rr�r�r�)r�r4r�r5s    r�NetFxSdkDirzSystemInfo.NetFxSdkDir�sV�����'�'�C��t�w�w�(�(�#�.�C��W�W�^�^�C�)A�B�F����
�(�
�
rc��t|jd�}|jj|jjd�xs|S)zw
        Microsoft .NET Framework 32bit directory.

        Return
        ------
        str
            path
        zMicrosoft.NET\Framework�frameworkdir32�rr�r�r�r��r��guess_fws  r�FrameworkDir32zSystemInfo.FrameworkDir32�s:������%?�@���w�w�~�~�d�g�g�j�j�*:�;�G�x�Grc��t|jd�}|jj|jjd�xs|S)zw
        Microsoft .NET Framework 64bit directory.

        Return
        ------
        str
            path
        zMicrosoft.NET\Framework64�frameworkdir64rSrTs  r�FrameworkDir64zSystemInfo.FrameworkDir64�s:������%A�B���w�w�~�~�d�g�g�j�j�*:�;�G�x�Grc�$�|jd�S)z�
        Microsoft .NET Framework 32bit versions.

        Return
        ------
        tuple of str
            versions
        � ��_find_dot_net_versionsr�s r�FrameworkVersion32zSystemInfo.FrameworkVersion32	����*�*�2�.�.rc�$�|jd�S)z�
        Microsoft .NET Framework 64bit versions.

        Return
        ------
        tuple of str
            versions
        �@r\r�s r�FrameworkVersion64zSystemInfo.FrameworkVersion64r_rc�|�|jj|jjd|z�}t|d|z�}|xs|j	|d�xsd}|j
dk\r|dfS|j
dk\r|j
�dd	d
k7rddfS|dfS|j
d
k(ry|j
dk(ryy)z�
        Find Microsoft .NET Framework versions.

        Parameters
        ----------
        bits: int
            Platform number of bits: 32 or 64.

        Return
        ------
        tuple of str
            versions
        zframeworkver%dzFrameworkDir%dr.r�r&zv4.0r�Nr�v4z
v4.0.30319�v3.5r�)re�
v2.0.50727g @)zv3.0rf)r�r�r��getattrr,r�rr)r��bits�reg_ver�dot_net_dirr�s     rr]z!SystemInfo._find_dot_net_versions!s����'�'�.�.������-=��-D�E���d�$4�t�$;�<���H��0�0��c�B�H�b���;�;�$����;��
�[�[�D�
 �#&�9�9�;�r��?�d�#:�<�V�K�K��V�K�K�
�[�[�C�
�'�
�[�[�C�
�'� rc�b�����fd�tt���D�}t|d�xsdS)a)
        Return name of the last dir in path or '' if no dir found.

        Parameters
        ----------
        path: str
            Use dirs in this path
        prefix: str
            Use only dirs starting by this prefix

        Return
        ------
        str
            name
        c3�n�K�|],}tt�|��r|j��r|���.y�wr�)rr�
startswith)rm�dir_namerL�prefixs  ��rroz0SystemInfo._use_last_dir_name.<locals>.<genexpr>Os5�����
�3���T�$��)�*�x�/B�/B�6�/J�
�3�s�25Nr�)�reversedr�next)rLro�
matching_dirss`` rr,zSystemInfo._use_last_dir_name>s/���"
�$�W�T�]�3�
�
�
�M�4�(�.�B�.rr��r�)#rrrr�r
rAr�r5rr�r�r�r��staticmethodrr�rrrrr)r.r-rBrErJrLr=rPrVrYr^rbr]r,rrrr�r�Ks���	��W�[�[��2�
&�F��7�;�;�~�r�2�L�!�g�k�k�"5�|�D�O�S�#�(�>(�T�7��7� �L��L�"����"�<O�*�!��!�(�	H��	H��(��(�T�  ��  �D�
8��
8��$��$�$�	M��	M��
��
� ����"�
H��
H��
H��
H��	/��	/��	/��	/�(�:�/��/rr�c��eZdZdZdd�Zed��Zed��Zed��Zed��Z	ed��Z
ed	��Zed
��Zed��Z
ed��Zed
��Zed��Zd�Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zd d�Zd�Z y)!�EnvironmentInfoaY
    Return environment variables for specified Microsoft Visual C++ version
    and platform : Lib, Include, Path and libpath.

    This function is compatible with Microsoft Visual C++ 9.0 to 14.X.

    Script created by analysing Microsoft environment configuration files like
    "vcvars[...].bat", "SetEnv.Cmd", "vcbuildtools.bat", ...

    Parameters
    ----------
    arch: str
        Target architecture.
    vc_ver: float
        Required Microsoft Visual C++ version. If not set, autodetect the last
        version.
    vc_min_ver: float
        Minimum Microsoft Visual C++ version.
    Nc���t|�|_t|j�|_t	|j|�|_|j|kr!d}tjj|��y)Nz.No suitable Microsoft Visual C++ version found)
r�r�r�r�r��sir�rsr<rt)r�r�r��
vc_min_ver�errs     rr�zEnvironmentInfo.__init__os]���t�$����t�w�w�'����T�W�W�f�-����;�;��#�B�C��"�"�9�9�#�>�>�$rc�.�|jjS)zk
        Microsoft Visual Studio.

        Return
        ------
        float
            version
        )rxr�r�s rr�zEnvironmentInfo.vs_verx����w�w�~�~�rc�.�|jjS)zp
        Microsoft Visual C++ version.

        Return
        ------
        float
            version
        )rxr�r�s rr�zEnvironmentInfo.vc_ver�r|rc���ddg}|jdk\r2|jjdd��}|dgz
}|dgz
}|d|zgz
}|D�cgc]"}t|jj
|���$c}Scc}w)	zu
        Microsoft Visual Studio Tools.

        Return
        ------
        list of str
            paths
        zCommon7\IDEz
Common7\ToolsrT�r�rOz1Common7\IDE\CommonExtensions\Microsoft\TestWindowzTeam Tools\Performance ToolszTeam Tools\Performance Tools%s)r�r�r�rrxr)r��paths�arch_subdirrLs    r�VSToolszEnvironmentInfo.VSTools�s��� �!1�2���;�;�$���'�'�-�-�d��-�E�K��J�K�K�E��5�6�6�E��7�+�E�F�F�E�=B�C�U�T��T�W�W�)�)�4�0�U�C�C��Cs�
'A4c��t|jjd�t|jjd�gS)z�
        Microsoft Visual C++ & Microsoft Foundation Class Includes.

        Return
        ------
        list of str
            paths
        �IncludezATLMFC\Include)rrxrr�s r�
VCIncludeszEnvironmentInfo.VCIncludes�s7��
����%�%�y�1�����%�%�'8�9�
�	
rc�<�|jdk\r|jjd��}n|jjd��}d|zd|zg}|jdk\r	|d|zgz
}|D�cgc]"}t|jj
|���$c}Scc}w)	z�
        Microsoft Visual C++ & Microsoft Foundation Class Libraries.

        Return
        ------
        list of str
            paths
        �.@T�rO�r��Lib%szATLMFC\Lib%srzLib\store%s)r�r�r�rrxr)r�r�r�rLs    r�VCLibrarieszEnvironmentInfo.VCLibraries�s����;�;�$���'�'�,�,��,�6�K��'�'�,�,�T�,�:�K��;�&��+�(E�F���;�;�$���n�{�2�3�3�E�=B�C�U�T��T�W�W�)�)�4�0�U�C�C��Cs�/'Bc�f�|jdkrgSt|jjd�gS)z�
        Microsoft Visual C++ store references Libraries.

        Return
        ------
        list of str
            paths
        rzLib\store\references)r�rrxrr�s r�VCStoreRefszEnvironmentInfo.VCStoreRefs�s0���;�;����I��T�W�W�)�)�+B�C�D�Drc�B�|j}t|jd�g}|jdkrdnd}|jj|�}|r|t|jd|z�gz
}|jdk(r;d|jj
d��z}|t|j|�gz
}|S|jdk\r�|jj�rd	nd
}|t|j||jjd��z�gz
}|jj|jjk7r7|t|j||jj
d��z�gz
}|S|t|jd�gz
}|S)
zr
        Microsoft Visual C++ Tools.

        Return
        ------
        list of str
            paths
        �
VCPackagesr�TF�Bin%srr�r�z
bin\HostX86%sz
bin\HostX64%sr��Bin)rxrrr�r�r�r�r�r�r�r�)r�rx�toolsr�r�rL�host_dirs       r�VCToolszEnvironmentInfo.VCTools�s}���W�W���b�o�o�|�4�5���;�;�$�.�4�E���g�g�'�'��1����d�2�?�?�G�k�,A�B�C�C�E��;�;�$���T�W�W�0�0��0�>�>�D��d�2�?�?�D�1�2�2�E� ���[�[�D�
 �$(�G�G�$:�$:�$<� �BR�
�
�d�2�?�?�H�t�w�w�7I�7I�d�7I�7S�,S�T�U�U�E��w�w�"�"�d�g�g�&8�&8�8������(�T�W�W�5H�5H�T�5H�5R�*R�S������
�d�2�?�?�E�2�3�3�E��rc�V�|jdkrA|jjdd��}t|jj
d|z�gS|jjd��}t|jj
d�}|j}t||�d|���gS)zw
        Microsoft Windows SDK Libraries.

        Return
        ------
        list of str
            paths
        r�Trr�r�r+�um)r�r�r�rrxr-�_sdk_subdir)r�r�r+�libvers    r�OSLibrarieszEnvironmentInfo.OSLibraries�s����;�;�$���'�'�,�,�T�t�,�D�K�����.�.��+�0E�F�G�G��'�'�,�,��,�6�K��t�w�w�,�,�e�4�C��%�%�F���&�+�>�?�@�@rc��t|jjd�}|jdkr|t|d�gS|jdk\r
|j}nd}t|d|z�t|d|z�t|d|z�gS)	zu
        Microsoft Windows SDK Include.

        Return
        ------
        list of str
            paths
        �includer��glrr�z%ssharedz%sumz%swinrt)rrxr-r�r�)r�r��sdkvers   r�
OSIncludeszEnvironmentInfo.OSIncludess����t�w�w�,�,�i�8���;�;�$���T�'�4�0�1�1��{�{�d�"��)�)�����W�j�6�1�2��W�f�v�o�.��W�i�&�0�1��
rc���t|jjd�}g}|jdkr||jz
}|jdk\r|t|d�gz
}|jdk\rz||t|jjd�t|dd�t|d	d�t|d
d�t|jjddd
|jzddd�gz
}|S)z}
        Microsoft Windows SDK Libraries Paths.

        Return
        ------
        list of str
            paths
        �
Referencesr�r%zCommonConfiguration\Neutralr�
UnionMetadataz'Windows.Foundation.UniversalApiContractz1.0.0.0z%Windows.Foundation.FoundationContractz,Windows.Networking.Connectivity.WwanContract�
ExtensionSDKszMicrosoft.VCLibsr�CommonConfiguration�neutral)rrxr-r�r�)r��ref�libpaths   r�	OSLibpathzEnvironmentInfo.OSLibpath*s����4�7�7�(�(�,�7�����;�;�#���t�'�'�'�G��;�;�$����S�"@�A�B�B�G��;�;�$�����T�W�W�*�*�O�<��S�C�Y�O��S�A�9�M��S�H�)�T���G�G�)�)�#�&��d�k�k�)� �)���
�
�G� �rc�4�t|j��S)zs
        Microsoft Windows SDK Tools.

        Return
        ------
        list of str
            paths
        )�list�
_sdk_toolsr�s r�SdkToolszEnvironmentInfo.SdkToolsPs���D�O�O�%�&�&rc#�rK�|jdkr5|jdkrdnd}t|jj|���|jj�sC|jj
d��}d|z}t|jj|���|jdvrb|jj�rd	}n|jj
dd�
�}d|z}t|jj|���ns|jdk\rdt|jjd�}|jj
d��}|jj}t||�|�����|jjr|jj��yy�w)
z�
        Microsoft Windows SDK Tools paths generator.

        Return
        ------
        generator of str
            paths
        r�r%r�zBin\x86Tr�r�)r�r%r�rzBin\NETFX 4.0 Tools%sN)
r�rrxr-r�r�r�r�r.rB)r��bin_dirr�rLr�s     rr�zEnvironmentInfo._sdk_tools\s\�����;�;���#�{�{�d�2�e�
�G��t�w�w�,�,�g�6�6��w�w�%�%�'��'�'�-�-�$�-�7�K��[�(�D��t�w�w�,�,�d�3�3��;�;�,�&��w�w�$�$�&� ��"�g�g�1�1�$�D�1�I��+�k�9�D��t�w�w�,�,�d�3�3�
�[�[�D�
 �����-�-�u�5�D��'�'�-�-�$�-�7�K��W�W�2�2�F��t�v�{�;�<�<��7�7�+�+��'�'�2�2�2�,�s�F5F7c�@�|jj}|rd|zSdS)zu
        Microsoft Windows SDK version subdir.

        Return
        ------
        str
            subdir
        �%s\r�)rxr.�r��ucrtvers  rr�zEnvironmentInfo._sdk_subdirs%���'�'�/�/��%,��� �4�"�4rc�f�|jdkDrgSt|jjd�gS)zs
        Microsoft Windows SDK Setup.

        Return
        ------
        list of str
            paths
        r��Setup)r�rrxr-r�s r�SdkSetupzEnvironmentInfo.SdkSetup�s/���;�;����I��T�W�W�*�*�G�4�5�5rc�
�|j}|j}|jdkr'd}|j�xr|j	�}nB|j�xs|j	�}|j
dk(xs|jdk(}g}|r1||jD�cgc]}t|j|���c}z
}|r1||jD�cgc]}t|j|���c}z
}|Scc}wcc}w)zv
        Microsoft .NET Framework Tools.

        Return
        ------
        list of str
            paths
        r�TrV)r�rxr�r�r�r�r�r^rrVrbrY)r�r�rx�	include32�	include64r�r�s       r�FxToolszEnvironmentInfo.FxTools�s����W�W��
�W�W���;�;�$���I��,�,�.�.�J�r�7H�7H�7J�3J�I��(�(�*�A�b�.?�.?�.A�I����'�1�M�R�]�]�g�5M�I�����b�>S�>S�T�>S�s�d�2�,�,�c�2�>S�T�T�E���b�>S�>S�T�>S�s�d�2�,�,�c�2�>S�T�T�E����U��Ts�$C;�Dc���|jdks|jjsgS|jj	d��}t|jjd|z�gS)z~
        Microsoft .Net Framework SDK Libraries.

        Return
        ------
        list of str
            paths
        rTr�zlib\um%s)r�rxrPr�r�r)r�r�s  r�NetFxSDKLibrariesz!EnvironmentInfo.NetFxSDKLibraries�sW���;�;���T�W�W�%8�%8��I��g�g�(�(�T�(�2���T�W�W�(�(�+��*C�D�E�Erc��|jdks|jjsgSt|jjd�gS)z}
        Microsoft .Net Framework SDK Includes.

        Return
        ------
        list of str
            paths
        rz
include\um)r�rxrPrr�s r�NetFxSDKIncludesz EnvironmentInfo.NetFxSDKIncludes�s;���;�;���T�W�W�%8�%8��I��T�W�W�(�(�-�8�9�9rc�D�t|jjd�gS)z�
        Microsoft Visual Studio Team System Database.

        Return
        ------
        list of str
            paths
        z
VSTSDB\Deploy)rrxrr�s r�VsTDbzEnvironmentInfo.VsTDb�s���T�W�W�)�)�+;�<�=�=rc�X�|jdkrgS|jdkr3|jj}|jj	d��}n|jj
}d}d|j|fz}t
||�g}|jdk\r|t
||d�gz
}|S)zn
        Microsoft Build Engine.

        Return
        ------
        list of str
            paths
        r&r�Tr�r�zMSBuild\%0.1f\bin%s�Roslyn)r�rxrr�r�rr)r��	base_pathr�rL�builds     r�MSBuildzEnvironmentInfo.MSBuild�s����;�;����I�
�[�[�4�
����/�/�I��'�'�-�-�d�-�;�K����,�,�I��K�%����k�(B�B���i��&�'���;�;�$���d�9�d�H�5�6�6�E��rc�f�|jdkrgSt|jjd�gS)zt
        Microsoft HTML Help Workshop.

        Return
        ------
        list of str
            paths
        r%zHTML Help Workshop)r�rrxrr�s r�HTMLHelpWorkshopz EnvironmentInfo.HTMLHelpWorkshop�s0���;�;����I��T�W�W�,�,�.B�C�D�Drc���|jdkrgS|jjd��}t|jj
d�}|j}t||�d|���gS)z�
        Microsoft Universal C Runtime SDK Libraries.

        Return
        ------
        list of str
            paths
        rTr�r+�ucrt)r�r�r�rrxrJ�_ucrt_subdir)r�r�r+r�s    r�
UCRTLibrarieszEnvironmentInfo.UCRTLibrariessb���;�;����I��g�g�(�(�T�(�2���4�7�7�-�-�u�5���#�#���S���=�>�?�?rc��|jdkrgSt|jjd�}t|d|jz�gS)z�
        Microsoft Universal C Runtime SDK Include.

        Return
        ------
        list of str
            paths
        rr�z%sucrt)r�rrxrJr�)r�r�s  r�UCRTIncludeszEnvironmentInfo.UCRTIncludessF���;�;����I��t�w�w�1�1�9�=���W�h��):�):�:�;�<�<rc�@�|jj}|rd|zSdS)z�
        Microsoft Universal C Runtime SDK version subdir.

        Return
        ------
        str
            subdir
        r�r�)rxrLr�s  rr�zEnvironmentInfo._ucrt_subdir.s%���'�'�4�4��%,��� �4�"�4rc�`�d|jcxkDrdkDrgS|jjgS)zk
        Microsoft Visual F#.

        Return
        ------
        list of str
            paths
        r%r&)r�rxrEr�s r�FSharpzEnvironmentInfo.FSharp;s4���$�+�+�$��$��I�%����(�(�)�)rc�6�d|jz}|jjd��jd�}g}|jj
}t
|jdd��}t|�r)t|t|�d�}||t|d�gz
}|t|d	�gz
}d
|jdzzd
t|j�dzzf}tj||�D]"\}}t||||�}	t|	�s� |	cSy)
z
        Microsoft Visual C++ runtime redistributable dll.

        Return
        ------
        str
            path
        zvcruntime%d0.dllTr�r�z\Toolsz\RedistrZ�onecorerWzMicrosoft.VC%d.CRT�
N)r�r�r�rHrxrr	rirrrr&r�r"r�r)
r�rar��prefixes�
tools_path�redist_path�crt_dirsro�crt_dirrLs
          r�VCRuntimeRedistzEnvironmentInfo.VCRuntimeRedistJs��'����4�	��g�g�(�(�T�(�2�8�8��>�����W�W�)�)�
��j�0�0��J�G�H������{�G�K�,@��,D�E�K���d�;�	�&B�C�C�H��T�*�h�/�0�0��
!�D�K�K�"�$4�5� �C����$4�r�$9�:�
�� )�0�0��8�D�O�F�G����W�i�@�D��d�|��� Erc��t|jd|j|j|j|j
g|�|jd|j|j|j|j|jg|�|jd|j|j|j|jg|�|jd|j|j|j|j |j"|j|j$|j&|j(g	|���}|j*dk\r$t-|j.�r|j.|d<|S)z�
        Return environment dict.

        Parameters
        ----------
        exists: bool
            It True, only return existing paths.

        Return
        ------
        dict
            environment
        r�r+r�rL)r�r+r�rLrrp)�dict�_build_pathsr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�)r��existsr|s   r�
return_envzEnvironmentInfo.return_envosW����%�%���O�O��O�O��%�%��)�)�	��	��!�!���$�$��$�$��L�L��&�&��*�*���
��%�%���!�!�4�<�<��1A�1A�4�>�>�R���
�"�"���L�L��L�L��J�J��M�M��M�M��L�L��L�L��)�)��K�K�
���7*
��V�;�;�"����(<�(<�!=�)-�)=�)=�C�%�&��
rc��tjj|�}tj|d�jt�}tj||�}|rttt|��n|}|s2d|j�z}tjj|��t|�}	t
j|	�S)aC
        Given an environment variable name and specified paths,
        return a pathsep-separated string of paths containing
        unique, extant, directories from those paths and from
        the environment variable. Raise an error if no paths
        are resolved.

        Parameters
        ----------
        name: str
            Environment variable name
        spec_path_lists: list of str
            Paths
        exists: bool
            It True, only return existing paths.

        Return
        ------
        str
            Pathsep-separated paths
        r�z %s environment variable is empty)r"�chain�
from_iterabler
rArrr��filterr�upperrsr<rtrr)
r�r��spec_path_listsr��
spec_paths�	env_pathsr��extant_pathsr�unique_pathss
          rr�zEnvironmentInfo._build_paths�s���.�_�_�2�2�?�C�
��K�K��b�)�/�/��8�	����
�I�6��5;�t�F�5�%�0�1����4�t�z�z�|�C�C��"�"�9�9�#�>�>�&�|�4���|�|�L�)�)r)Nr)T)!rrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrvrvWs���.?��	��	��	��	��D��D�&�
��
��D��D�(�E��E��#��#�J�A��A�&����2�#��#�J�	'��	'�!3�F�
5��
5��6��6�����4�
F��
F��:��:��	>��	>�����6�E��E��@��@�"�
=��
=��
5��
5��*��*��"��"�H;�z*rrvrs)$r�r�ior�osrr�os.pathrrrr	rEr
rB�platformr"�distutils.errorsrs� setuptools.extern.more_itertoolsr�systemrr
r�r2rMr[rer}r�r�r�r�r�rvrrr�<module>r�s�������0�0�)������<��8�?�?��	�!���!�!��f�G�"�<0�h����	��2 �j�<�4$�Nv
�v
�ry#�y#�xI/�I/�Xt	*�t	*rpython3.12/site-packages/setuptools/__pycache__/_importlib.cpython-312.pyc000064400000003466151732703740022427 0ustar00�

��_i����ddlZd�ZejdkrddlmZee�nddlmZejdkrddlmZyddl	mZy)�Nc�8�	ddl}||urytjD�cgc]}t||j�r|��}}|D]!}tjj|��#y#t$rYyt$rddlm}|jddd���wxYwcc}w)	zu
    Ensure importlib_metadata doesn't provide older, incompatible
    Distributions.

    Workaround for #3102.
    rN�)�SetuptoolsWarningzIncompatibility problem.z�
            `importlib-metadata` version is incompatible with `setuptools`.
            This problem is likely to be solved by installing an updated version of
            `importlib-metadata`.
            z7https://github.com/python/importlib_metadata/issues/396)�see_url)�importlib_metadata�ImportError�AttributeError�warningsr�emit�sys�	meta_path�
isinstance�MetadataPathFinder�remove)�metadatarr�ob�	to_remove�items      ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_importlib.py�!disable_importlib_metadata_finderrs����!�"�X�%���-�-���B��b�,�?�?�@�	����
���
�
���T�"���/�����/����&�
�
N�	�	
�	��� s�A%�B�%	B�0$B)��
)r)r�	)�importlib_resources)
rr�version_info�setuptools.externrr�importlib.metadatar�	resources�importlib.resources��r�<module>r"sB��
�!#�H���g��@�%�h�/�)����f��B�+r!python3.12/site-packages/setuptools/__pycache__/sandbox.cpython-312.pyc000064400000056254151732703740021730 0ustar00�

��_i
8���ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZejj!d�rddlmcmcmcmZnej&ej.Z	eZeZgd�Zdd�Zej>dd��Z ej>d��Z!ej>d	��Z"ej>d
��Z#Gd�de$�Z%Gd
�d�Z&ej>d��Z'd�Z(ej>d��Z)ej>d��Z*hd�Z+d�Z,d�Z-d�Z.Gd�d�Z/e0ed�rejbgZ2ngZ2Gd�de/�Z3ejhejjdjm�D�cgc]}e7e|d���c}�Z8Gd�de
�Z9y#e$rdZY��3wxYwcc}w) �N)�DistutilsError)�working_set�java)�AbstractSandbox�DirectorySandbox�SandboxViolation�	run_setupc��d}t||�5}|j�}ddd�|�|}t|d�}t|||�y#1swY�(xYw)z.
    Python 3 implementation of execfile.
    �rbN�exec)�open�read�compiler)�filename�globals�locals�mode�stream�script�codes       ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/sandbox.py�	_execfiler$sR���D�	
�h��	�������
�
�~����6�8�V�,�D���w���
�	�s�A�Ac#�K�tjdd}|�|tjdd	|��|tjddy#|tjddwxYw�w�N)�sys�argv)�repl�saveds  r�	save_argvr1sJ�����H�H�Q�K�E�������������������e������s�)A�A�A�A�Ac#�K�tjdd}	|��|tjddy#|tjddwxYw�wr)r�path�rs r�	save_pathr#<s7�����H�H�Q�K�E�����������e������s�A�/�A�A�Ac#�K�tj|d��tj}|t_	d��|t_y#|t_wxYw�w)zL
    Monkey-patch tempfile.tempdir with replacement, ensuring it exists
    T)�exist_okN)�os�makedirs�tempfile�tempdir)�replacementrs  r�
override_tempr+EsA����
�K�K��d�+����E�"�H��!�
� ����5���s�3A�A�A�
A�Ac#��K�tj�}tj|�	|��tj|�y#tj|�wxYw�wr)r&�getcwd�chdir)�targetrs  r�pushdr0Vs=�����I�I�K�E��H�H�V�����
�����������s�*A!�A�A!�A�A!c� �eZdZdZed��Zy)�UnpickleableExceptionzP
    An exception representing another Exception that could not be pickled.
    c	���	tj|�tj|�fS#t$r*ddlm}|j||t
|���cYSwxYw)z�
        Always return a dumped (pickled) type and exc. If exc can't be pickled,
        wrap it in UnpickleableException first.
        r)r2)�pickle�dumps�	Exception�setuptools.sandboxr2�dump�repr)�type�exc�clss   rr8zUnpickleableException.dumpesO��	1��<�<��%�v�|�|�C�'8�8�8���	1�G��8�8�C��T�#�Y��0�0�		1�s�),�0A�AN)�__name__�
__module__�__qualname__�__doc__�staticmethodr8��rr2r2`s����1��1rCr2c�"�eZdZdZd�Zd�Zd�Zy)�ExceptionSaverz^
    A Context Manager that will save an exception, serialized, and restore it
    later.
    c��|SrrB��selfs r�	__enter__zExceptionSaver.__enter__zs���rCc�N�|sytj||�|_||_y�NT)r2r8�_saved�_tb)rHr:r;�tbs    r�__exit__zExceptionSaver.__exit__}s*����,�0�0��s�;������rCc��dt|�vryttj|j�\}}|j|j��)z"restore and re-raise any exceptionrLN)�vars�mapr4�loadsrL�with_tracebackrM)rHr:r;s   r�resumezExceptionSaver.resume�s@���4��:�%������d�k�k�2�	��c�� � ����*�*rCN)r=r>r?r@rIrOrUrBrCrrErEts���
�	�+rCrEc#�6�K�tjj��t�5}���ddd�tjj	���fd�tjD�}t|�j
�y#1swY�]xYw�w)z�
    Context in which imported modules are saved.

    Translates exceptions internal to the context into the equivalent exception
    outside the context.
    Nc3�L�K�|]}|�vr|jd�s|���y�w)z
encodings.N��
startswith)�.0�mod_namers  �r�	<genexpr>zsave_modules.<locals>.<genexpr>�s/������#�H��5� ��#�#�L�1�		�#�s�!$)r�modules�copyrE�update�_clear_modulesrU)�	saved_exc�del_modulesrs  @r�save_modulesrc�sr�����
�K�K����E�	�	�Y���
��K�K���u�������K��;��
����
�	�s�)B�B
�AB�
B�Bc�F�t|�D]}tj|=�yr)�listrr])�module_namesr[s  rr`r`�s����&���K�K��!�'rCc#�K�tj�}	|��tj|�y#tj|�wxYw�wr)�
pkg_resources�__getstate__�__setstate__r"s r�save_pkg_resources_staterk�s:�����&�&�(�E�*����"�"�5�)��
�"�"�5�)�s�A�2�A�A	�	Ac#�K�tjj|d�}t�5t	�5t�5t
�t�5t|�5t|�5td�d��ddd�ddd�ddd�ddd�ddd�ddd�y#1swY�2xYw#1swY�6xYw#1swY�:xYw#1swY�>xYw#1swY�BxYw#1swYyxYw�w)N�temp�
setuptools)r&r!�joinrkrcr#�hide_setuptoolsrr+r0�
__import__)�	setup_dir�temp_dirs  r�
setup_contextrt�s������w�w�|�|�I�v�.�H�	!�	#�
�^����!��[�&�x�0�"�9�-�&�|�4�!�.�1�!���
$�	#�.�-��1�0��!�[������^��
$�	#�s��+C9�C-�C!�C�C		�$B=�0B1
�B=�C		�C�C!� C-�(	C9�1B:�6B=�=C�C		�	C
�C�C�C!�!C*	�&C-�-C6�2C9>�Cython�	distutilsrnrh�_distutils_hackc�<�|jdd�d}|tvS)aH
    >>> _needs_hiding('setuptools')
    True
    >>> _needs_hiding('pkg_resources')
    True
    >>> _needs_hiding('setuptools_plugin')
    False
    >>> _needs_hiding('setuptools.__init__')
    True
    >>> _needs_hiding('distutils')
    True
    >>> _needs_hiding('os')
    False
    >>> _needs_hiding('Cython')
    True
    �.�r)�split�_MODULES_TO_HIDE)r[�base_modules  r�
_needs_hidingr~�s%��"�.�.��a�(��+�K��*�*�*rCc��tjjdd�}|�|j�t	t
tj�}t
|�y)a%
    Remove references to setuptools' modules from sys.modules to allow the
    invocation to import the most appropriate setuptools. This technique is
    necessary to avoid issues such as #315 where setuptools upgrading itself
    would fail to find a function declared in the metadata.
    rwN)rr]�get�_remove_shim�filterr~r`)rwr]s  rrprp�sC���k�k�o�o�&7��>�O��"��$�$�&��]�C�K�K�0�G��7�rCc�|�tjjtjj|��}t	|�5	|gt|�ztjddtjjd|�tj�tjjd��t|�5t|d��}t||�ddd�ddd�y#1swY�xYw#t $r&}|j"r|j"dr�Yd}~�?d}~wwxYw#1swYyxYw)z8Run a distutils setup script, sandboxed in its directoryNrc�"�|j�Sr)�activate)�dists r�<lambda>zrun_setup.<locals>.<lambda>�s
��d�m�m�orC�__main__)�__file__r=)r&r!�abspath�dirnamertrerr�insertr�__init__�	callbacks�appendr�dictr�
SystemExit�args)�setup_scriptr�rr�ns�vs     rr	r	�s�������������� =�>�I�	�y�	!�	�'�.�4��:�5�C�H�H�Q�K��H�H�O�O�A�y�)�� � �"��!�!�(�(�)E�F�!�)�,��<�*�E���,��+�-�
"�	!�-�,���	��v�v�!�&�&��)����	��
"�	!�sI�D2�
A?D�	C4�#D�4C=	�9D�	D/�	D*�%D2�*D/�/D2�2D;c��eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	D]Zee
e�s�
e
e�e�e<�dd�Zer	ede�Zed
e�ZdD]Zee
e�s�
ee�e�e<�d�ZdD]Zee
e�s�
ee�e�e<�d�ZdD]Zee
e�s�
ee�e�e<�d�Zd�Zd�Zd�Zy
)rzDWrap 'os' module and 'open()' builtin for virtualizing setup scriptsFc��tt�D�cgc]!}|jd�st||�r|��#c}|_ycc}w)N�_)�dir�_osrY�hasattr�_attrs)rH�names  rr�zAbstractSandbox.__init__sA���C��
� ���?�?�3�'�G�D�$�,?�
� �
����
s�&Ac	�\�|jD]}tt|t||���yr)r��setattrr&�getattr)rH�sourcer�s   r�_copyzAbstractSandbox._copys#���K�K�D��B��g�f�d�3�4� rCc��|j|�tr|jt_|jt_d|_yrK)r��_file�builtins�file�_openr
�_activerGs rrIzAbstractSandbox.__enter__s.���
�
�4��� �J�J�H�M��
�
��
���rCc��d|_trtt_tt_|j
t�y�NF)r�r�r�r�r�r
r�r�)rH�exc_type�	exc_value�	tracebacks    rrOzAbstractSandbox.__exit__!s%������!�H�M���
��
�
�3�rCc�@�|5|�cddd�S#1swYyxYw)zRun 'func' under os sandboxingNrB)rH�funcs  r�runzAbstractSandbox.run(s��
��6��T�T�s��c�6���tt�����fd�}|S)Nc�l��|jr|j�||g|��i|��\}}�||g|��i|��Sr)r��_remap_pair)rH�src�dstr��kwr��originals     ��r�wrapz3AbstractSandbox._mk_dual_path_wrapper.<locals>.wrap0sE����|�|�+�4�+�+�D�#�s�H�T�H�R�H���S��C��2�t�2�r�2�2rC�r�r��r�r�r�s` @r�_mk_dual_path_wrapperz%AbstractSandbox._mk_dual_path_wrapper-s����3��%��	3�
�rC)�rename�link�symlinkNc�>����xstt�����fd�}|S)Nc�b��|jr|j�|g|��i|��}�|g|��i|��Sr)r��_remap_input�rHr!r�r�r�r�s    ��rr�z5AbstractSandbox._mk_single_path_wrapper.<locals>.wrap>s=����|�|�(�t�(�(��t�A�d�A�b�A���D�.�4�.�2�.�.rCr�)r�r�r�s`` r�_mk_single_path_wrapperz'AbstractSandbox._mk_single_path_wrapper;s ����1�w�s�D�1��	/�
�rCr�r
)�stat�listdirr.r
�chmod�chown�mkdir�remove�unlink�rmdir�utime�lchown�chroot�lstat�	startfile�mkfifo�mknod�pathconf�accessc�6���tt�����fd�}|S)Nc���|jr3|j�|g|��i|��}|j��|g|��i|���S�|g|��i|��Sr)r�r��
_remap_outputr�s    ��rr�z4AbstractSandbox._mk_single_with_return.<locals>.wrapcs_����|�|�(�t�(�(��t�A�d�A�b�A���)�)�$���0K��0K��0K�L�L��D�.�4�.�2�.�.rCr�r�s` @r�_mk_single_with_returnz&AbstractSandbox._mk_single_with_return`s����3��%��	/��rC)�readlink�tempnamc�6���tt�����fd�}|S)Nc�T���|i|��}|jr|j�|�S|Sr)r�r�)rHr�r��retvalr�r�s    ��rr�z'AbstractSandbox._mk_query.<locals>.wraprs1����t�*�r�*�F��|�|��)�)�$��7�7��MrCr�r�s` @r�	_mk_queryzAbstractSandbox._mk_queryos����3��%��	��rC)r-�tmpnamc��|S)z=Called to remap or validate any path, whether input or outputrB)rHr!s  r�_validate_pathzAbstractSandbox._validate_path~s���rCc�$�|j|�S�zCalled for path inputs�r��rH�	operationr!r�r�s     rr�zAbstractSandbox._remap_input�����"�"�4�(�(rCc�$�|j|�S)zCalled for path outputsr�)rHr�r!s   rr�zAbstractSandbox._remap_output�r�rCc�j�|j|dz|g|��i|��|j|dz|g|��i|��fS)�?Called for path pairs like rename, link, and symlink operationsz-fromz-to)r��rHr�r�r�r�r�s      rr�zAbstractSandbox._remap_pair�sP��
�D���i�'�1�3�D��D��D��D���i�%�/��B�t�B�r�B�
�	
rCr)r=r>r?r@r�r�r�rIrOr�r�r�r�r�rr�r�r�r�r�r�r�r�r�rBrCrrr
s��N��G�
�5����
�.���3���2�4�8�F�H�T�N�.��
�'���6��#�F�E�2�E���*�3���4�T�:�F�H�T�N�-�0	�(���3���3�D�9�F�H�T�N�(�	�%���3���&�t�_�F�H�T�N�%��)�)�
rCr�devnullc��eZdZdZejgd��ZgZ	efd�Z	d�Z
erdd�Zdd�Zd�Z
d�Zd	�Zd
�Zd�Zdd�Zy
)rz<Restrict operations to a single subdirectory - pseudo-chroot)
r
r�r�r�r�r�r�r�r�r�r�r�r�c��tjjtjj|��|_tjj|jd�|_|D�cgc]>}tjjtjj|����@c}|_tj|�ycc}w)N�)
r&r!�normcase�realpath�_sandboxro�_prefix�_exceptionsrr�)rH�sandbox�
exceptionsr!s    rr�zDirectorySandbox.__init__�s������(�(����)9�)9�'�)B�C��
��w�w�|�|�D�M�M�2�6���AK�
�AK��B�G�G���R�W�W�-�-�d�3�4��
���	� � ��&��
s�5ACc�"�ddlm}||||��)Nr)r)r7r)rHr�r�r�rs     r�
_violationzDirectorySandbox._violation�s��7��y�$��3�3rCc�|�|dvr)|j|�s|jd||g|��i|��t||g|��i|��S)N��r�rtr�rU�Ur�)�_okr�r��rHr!rr�r�s     rr�zDirectorySandbox._file�sH���7�7������������d�@�T�@�R�@���t�1�d�1�b�1�1rCc�|�|dvr)|j|�s|jd||g|��i|��t||g|��i|��S)Nr�r
)r�r�r�rs     rr�zDirectorySandbox._open�sH���3�3�D�H�H�T�N��D�O�O�F�D�$�<��<��<��T�4�-�$�-�"�-�-rCc�&�|jd�y)Nr�)r�rGs rr�zDirectorySandbox.tmpnam�s������!rCc�H�|j}	d|_tjjtjj	|��}|j|�xs,||jk(xs|j|j�	||_S#||_wxYwr�)	r�r&r!r�r��	_exemptedr�rYr�)rHr!�activer�s    rr�zDirectorySandbox._ok�s�������		"� �D�L��w�w�'�'����(8�(8��(>�?�H����x�(�5��t�}�}�,�5��&�&�t�|�|�4�
�"�D�L��6�D�L�s�BB�	B!c����fd�|jD�}�fd�|jD�}tj||�}t	|�S)Nc3�@�K�|]}�j|����y�wrrX)rZ�	exception�filepaths  �rr\z-DirectorySandbox._exempted.<locals>.<genexpr>�s!�����
�<L�y�H���	�*�<L�s�c3�J�K�|]}tj|�����y�wr)�re�match)rZ�patternr	s  �rr\z-DirectorySandbox._exempted.<locals>.<genexpr>�s!�����
�7O�G�B�H�H�W�h�'�7O�s� #)r��_exception_patterns�	itertools�chain�any)rHr	�
start_matches�pattern_matches�
candidatess `   rrzDirectorySandbox._exempted�sI���
�<@�<L�<L�
�
�
�7;�7O�7O�
���_�_�]�O�D�
��:��rCc��||jvrE|j|�s4|j|tjj|�g|��i|��|Sr�)�	write_opsr�r�r&r!r�r�s     rr�zDirectorySandbox._remap_input�sF������&�t�x�x��~��D�O�O�I�r�w�w�'7�'7��'=�K��K��K��rCc�~�|j|�r|j|�s|j|||g|��i|��||fS)r�)r�r�r�s      rr�zDirectorySandbox._remap_pair�s=���x�x��}�D�H�H�S�M��D�O�O�I�s�C�=�$�=�"�=��S�z�rCc��|tzr*|j|�s|jd|||g|��i|��tj|||g|��i|��S)zCalled for low-level os.open()zos.open)�WRITE_FLAGSr�r�r�r
)rHr��flagsrr�r�s      rr
zDirectorySandbox.open�sO���;��t�x�x��~��D�O�O�I�t�U�D�F�4�F�2�F��x�x��e�T�7�D�7�B�7�7rCN)r�)i�)r=r>r?r@r��fromkeysrr�_EXCEPTIONSr�r�r�r�r�r�rr�r�r
rBrCrrr�s]��F��
�
�	
��I�$��4�+6�'�4�

�	2�
.�
"�"����8rCrz4O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARYc�V�eZdZdZej
d�j
�Zd�Zy)rzEA setup script attempted to modify the filesystem outside the sandboxa
        SandboxViolation: {cmd}{args!r} {kwargs}

        The package setup script has attempted to modify files on your system
        that are not within the EasyInstall build area, and has been aborted.

        This package cannot be safely installed by EasyInstall, and may not
        support alternate installation locations even if you run its setup
        script by hand.  Please inform the package's author and the EasyInstall
        maintainers to find out if a fix or workaround is available.
        c�j�|j\}}}|jjdit���S)NrB)r��tmpl�formatr)rH�cmdr��kwargss    r�__str__zSandboxViolation.__str__s.�� �I�I���T�6��t�y�y���+�&�(�+�+rCN)	r=r>r?r@�textwrap�dedent�lstriprr#rBrCrrr�s+��O��8�?�?�
	��
�f�h�	�,rCrr):r&rr(�operator�	functoolsrr�
contextlibr4r$r�rh�distutils.errorsrr�platformrY�$org.python.modules.posix.PosixModule�pythonr]�posix�PosixModuler�r�r�r��	NameErrorr
r��__all__r�contextmanagerrr#r+r0r6r2rErcr`rkrtr|r~rpr	rr�r�rr�reduce�or_r{r�rr)�as0r�<module>r6s	��	�
�����	��
����+�%��<�<���6�"�6�6�

�+�+�b�g�g�
�C���E�	
����
 ����������������
!��
!� ������1�I�1�(+�+�<������2"�
���*��*����"��"���+�*��(E
�E
�P�2�y���:�:�,�K��K�[8��[8�|�i����L�L�H�M�M�O��O�A�	��Q���O����,�~�,��Q���E���Bs�F-�	F;
�-F8�7F8python3.12/site-packages/setuptools/__pycache__/installer.cpython-312.pyc000064400000014552151732703740022262 0ustar00�

��_i}���ddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZddlmZd	�Zd
�Zd�Zd�Zd
�Zd�ZGd�de�Zy)�N)�log)�DistutilsError)�partial�)�_reqs)�Wheel)�SetuptoolsDeprecationWarningc�v�t|t�r|j�St|ttf�sJ�|S)z8Ensure find-links option end-up being a list of strings.)�
isinstance�str�split�tuple�list)�
find_linkss ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/installer.py�_fixup_find_linksrs5���*�c�"����!�!��j�5�$�-�0�0�0���c�X�tj�t|�t||�S)zLFetch an egg needed for building.

    Use pip/wheel to fetch/build a wheel.)�_DeprecatedInstaller�emit�_warn_wheel_not_available�_fetch_build_egg_no_warn)�dist�reqs  r�fetch_build_eggrs%�������d�#�#�D�#�.�.rc�,�ddl}tjd��t|�|jjt
j||j�tt|�d��}|D]}|jj|d���!|S)Nr�)�
stacklevelT)�	installer�replace_conflicting)�replace)�
pkg_resourcesrrr�working_set�resolver�parse�Requirementrr�add)r�requiresr"�resolved_distss    r�_fetch_build_eggsr* s���������+��d�#�"�.�.�6�6�
���H�m�7�7�8��2�D�9� �7��N�
���!�!�%�%�d�D�%�9���rc	���ddl}t|�}|jd�}d|vrtd��dtj
vxrdtj
v}dtj
vrd}nd|vr	|dd	}nd}d
|vrt
|d
d	�ddng}|jr|j|j�tjj|j��}|j�}|j|�D]}	|	|vs�|j|	�s�|	cStj �5}
t"j$ddd
ddd|
g}|r|j'd�|�|jd|f�|xsgD]}|jd|f��|j'|j(xst+|��	t-j.|�t3t5j4tjj7|
d��d�}tjj7||j9��}|j;|�|j=|tjj7|d��}|j>jA||��}|cddd�S#t,j0$r}
tt+|
��|
�d}
~
wwxYw#1swYyxYw)Nr�easy_install�allow_hostszQthe `allow-hosts` option is not supported when using pip to install requirements.�	PIP_QUIET�PIP_VERBOSE�
PIP_INDEX_URL�	index_urlrrz-m�pipz--disable-pip-version-check�wheelz	--no-depsz-wz--quietz--index-urlz--find-linksz*.whlzEGG-INFO)�metadata)!r"�strip_marker�get_option_dictr�os�environr�dependency_links�extend�path�realpath�get_egg_cache_dir�Environment�find_distributions�can_add�tempfile�TemporaryDirectory�sys�
executable�append�urlr�
subprocess�
check_call�CalledProcessErrorr�glob�join�egg_name�install_as_egg�PathMetadata�Distribution�
from_filename)rrr"�opts�quietr1r�eggs_dir�environment�egg_dist�tmpdir�cmd�link�er3�
dist_location�
dist_metadatas                 rrr0s�����s�
�C�����/�D�����
6�
�	
�
�r�z�z�)�M�m�2�:�:�.M�E��"�*�*�$��	�	��	���%�a�(�	��	�7C�t�7K��$�|�,�Q�/�0��3�QS��������$�/�/�0��w�w���� 6� 6� 8�9�H��+�+�-�K�!�4�4�X�>���s�?�{�2�2�8�<��O�?�
�	$�	$�	&�&��N�N���)�����	
����J�J�y�!�� ��J�J�
�y�1�2��$�"�$�D��J�J���-�.�%�
	�
�
�3�7�7�&�c�#�h�'�	0��!�!�#�&��d�i�i������V�W� =�>�q�A�B�������X�u�~�~�/?�@�
�
���]�+�%�2�2��2�7�7�<�<�
�z�B�
�
��)�)�7�7��M�8�
���E
'�	&��.�,�,�	0� ��Q��(�a�/��	0��/
'�	&�s2�<BK�J/�CK�/K�K�K�K�K(c�d�ddl}|jjt|��}d|_|S)z�
    Return a new requirement without the environment marker to avoid
    calling pip with something like `babel; extra == "i18n"`, which
    would always be ignored.
    rN)r"r&r%r�marker)rr"s  rr5r5ts/����
#�
#�
)�
)�#�c�(�
3�C��C�J��Jrc��ddl}	|jd�y#|j$r#|jdtj
�YywxYw)Nrr3z,WARNING: The wheel package is not available.)r"�get_distribution�DistributionNotFound�announcer�WARN)rr"s  rrr�sC���P��&�&�w�/���-�-�P��
�
�D�c�h�h�O�P�s��/A
�	A
c��eZdZdZdZy)rz9setuptools.installer and fetch_build_eggs are deprecated.z�
    Requirements should be satisfied by a PEP 517 installer.
    If you are using pip, you can try `pip install --use-pep517`.
    N)�__name__�
__module__�__qualname__�_SUMMARY�_DETAILS�rrrr�s��J�H��Hrr)rJr7rGrCrA�	distutilsr�distutils.errorsr�	functoolsr�rr3r�warningsr	rrr*rr5rrrirr�<module>rosT���	��
���+����2��/�
� A�H�P��7�rpython3.12/site-packages/setuptools/__pycache__/wheel.cpython-312.pyc000064400000032222151732703740021363 0ustar00�

��_i�!��^�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlZddlm
ZddlmZddlmZddlmZmZddlmZej0d	ej2�j4Zd
Zej:d��d��Zd
�Zej@d��Z!Gd�d�Z"y)zWheels support.�N)�get_platform)�Version)�sys_tags)�canonicalize_name)�write_requirements�
_egg_basename)�_unpack_zipfile_objz�^(?P<project_name>.+?)-(?P<version>\d.*?)
    ((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
    )\.whl$z8__import__('pkg_resources').declare_namespace(__name__)
)�maxsizec�~�t�D�chc]%}|j|j|jf��'c}Scc}w�N)r�interpreter�abi�platform)�ts ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/wheel.py�_get_supported_tagsr s2��
9A�
�C�
�1�Q�]�]�A�E�E�1�:�:�.�
�C�C��Cs�*:c���tj|�D�]$\}}}tjj||�}|D]Y}tjj	||�}tjj	|||�}tj
||��[t
tt|���D]\}	}
tjj	||
�}tjj	|||
�}tjj|�r�gtj
||�||	=����'tj|d��D]\}}}|rJ�tj|��!y)zDMove everything under `src_dir` to `dst_dir`, and delete the former.T)�topdownN)�os�walk�path�relpath�join�renames�reversed�list�	enumerate�exists�rmdir)�src_dir�dst_dir�dirpath�dirnames�	filenames�subdir�f�src�dst�n�ds           r�unpackr+(s��(*����(8�$���9�������'�2���A��'�'�,�,�w��*�C��'�'�,�,�w���2�C��J�J�s�C� ���T�)�H�"5�6�7�D�A�q��'�'�,�,�w��*�C��'�'�,�,�w���2�C��7�7�>�>�#�&��
�
�3��$��Q�K�8�
)9�)+�����(F�$���9���}�
�����)G�c#�K�ddlm}|j|j�}	d��|j|�y#|j|�wxYw�w)z*
    Temporarily disable info traces.
    r)�logN)�	distutilsr.�
set_threshold�WARN)r.�saveds  r�disable_info_tracesr3>sC����
����c�h�h�'�E�!�
����%� �����%� �s�"A�;�A�A�Ac�f�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	e
d��Ze
d	��Ze
d
��Z
y)�Wheelc���ttjj|��}|�t	d|z��||_|j
�j�D]\}}t|||��y)Nzinvalid wheel name: %r)	�
WHEEL_NAMErr�basename�
ValueError�filename�	groupdict�items�setattr)�selfr:�match�k�vs     r�__init__zWheel.__init__Msb���2�7�7�+�+�H�5�6���=��5��@�A�A� ��
��O�O�%�+�+�-�D�A�q��D�!�Q��.r,c���tj|jjd�|jjd�|j
jd��S)z>List tags (py_version, abi, platform) supported by this wheel.�.)�	itertools�product�
py_version�splitrr�r>s r�tagsz
Wheel.tagsUsI��� � ��O�O�!�!�#�&��H�H�N�N�3���M�M����$�
�	
r,c�D�td�|j�D�d�S)z2Is the wheel compatible with the current platform?c3�:K�|]}|t�vs�d���y�w)TN)r)�.0rs  r�	<genexpr>z&Wheel.is_compatible.<locals>.<genexpr>_s����M�;�a�!�7J�7L�2L�T�;�s��F)�nextrJrIs r�
is_compatiblezWheel.is_compatible]s���M�4�9�9�;�M�u�U�Ur,c�~�t|j|j|jdk(rdn	t	���dzS)N�any)rz.egg)r�project_name�versionrrrIs r�egg_namezWheel.egg_nameas;����!�!����"&�-�-�5�"8�$�l�n�
�
�
�	
r,c���|j�D]Z}tj|�}|jd�s�*t	|�jt	|j��s�X|cStd��)Nz
.dist-infoz.unsupported wheel format. .dist-info not found)�namelist�	posixpath�dirname�endswithr�
startswithrSr9)r>�zf�memberrYs    r�
get_dist_infozWheel.get_dist_infoksf���k�k�m�F��'�'��/�G�����-�2C�G�2L�2W�2W�!�$�"3�"3�4�3���$��I�J�Jr,c��tj|j�5}|j||�ddd�y#1swYyxYw)z"Install wheel as an egg directory.N)�zipfile�ZipFiler:�_install_as_egg)r>�destination_eggdirr\s   r�install_as_eggzWheel.install_as_eggus1��
�_�_�T�]�]�
+�r�� � �!3�R�8�,�
+�
+�s	�<�Ac��|j�d|j��}|j|�}d|z}tjj|d�}|j
||||�|j||�|j||�y)N�-z%s.data�EGG-INFO)	rSrTr^rrr�_convert_metadata�_move_data_entries�_fix_namespace_packages)r>rcr\�
dist_basename�	dist_info�	dist_data�egg_infos       rrbzWheel._install_as_eggzs|��#'�#4�#4�d�l�l�C�
��&�&�r�*�	��
�-�	��7�7�<�<� 2�J�?�����r�#5�y�(�K���� 2�I�>��$�$�X�/A�Br,c�.���ddl}��fd�}|d�}t|jd��}td�|cxkxrtd�knc}|std|z��t	�|�t
jj|���|jj|�|j|����}	d	�}
tt|
|	j���}|	jD��
cic]1}|t|
|	j|f��D�
cgc]}
|
|vr|
��
c}
��3}}}
tj�|�tjt
jj|d
�t
jj|d��t!jt#||���
�}t%�5t'|j)d�dt
jj|d��ddd�ycc}
wcc}
}w#1swYyxYw)Nrc����jtj�|��5}|j�j	d�}t
jj�j|�cddd�S#1swYyxYw)Nzutf-8)	�openrXr�read�decode�email�parser�Parser�parsestr)�name�fp�valuerlr\s   ��r�get_metadataz-Wheel._convert_metadata.<locals>.get_metadata�sY���������	�4�8�9�R����	�(�(��1���|�|�*�*�,�5�5�e�<�:�9�9�s�AA=�=B�WHEELz
Wheel-Versionz1.0z2.0dev0z$unsupported wheel format version: %s)�metadatac�&�d|_t|�Sr)�marker�str)�reqs r�raw_reqz(Wheel._convert_metadata.<locals>.raw_req�s���C�J��s�8�Or,�METADATAzPKG-INFO)�install_requires�extras_require)�attrsrnzrequires.txt)�
pkg_resources�
parse_version�getr9r	rrr�Distribution�
from_location�PathMetadatar�map�requires�extras�rename�
setuptools�dictr3r�get_command_obj)r\rcrlrnr�r{�wheel_metadata�
wheel_version�wheel_v1�distr�r��extrar�r��
setup_dists` `             rrhzWheel._convert_metadata�s�����	=�
&�g�.��%�n�&8�&8��&I�J�
� ��'�=�S�=��;S�S����C�m�S�T�T��B� 2�3��G�G�L�L�!3�Y�?�	��)�)�7�7���"�/�/�0B�I�N�8�
��	� ��G�T�]�]�_� =�>�����

�%��
��w��
�
�u�h�(?�@��@�C��.�.��@��
�
%�
	�
�	�	�	�)�X�&�
�	�	��G�G�L�L��:�.��G�G�L�L��:�.�	
� �,�,��!1�-��
�
�!�
"���*�*�:�6�������X�~�6�
�#�
"��%��
�&#�
"�s$�0$H�
H�!H�<;H�H�Hc���tjj|���tjj�d�}tjj|�r�tjj|dd�}tj|�tj
|�D]�}|j
d�r4tjtjj||���Htjtjj||�tjj||����tj|�ttjj�fd�dD��D]}t||��tjj��rtj��yy)z,Move data entries to their correct location.�scriptsrgz.pycc3�^�K�|]$}tjj�|����&y�wr)rrr)rMr*rms  �rrNz+Wheel._move_data_entries.<locals>.<genexpr>�s(�����
�B�A������Y��*�B�s�*-)�data�headers�purelib�platlibN)rrrr�mkdir�listdirrZ�unlinkr�r�filterr+)rcrm�dist_data_scripts�egg_info_scripts�entryr%s `    rrizWheel._move_data_entries�s;����G�G�L�L�!3�Y�?�	��G�G�L�L��I�>��
�7�7�>�>�+�,�!�w�w�|�|�,>�
�I�V���H�H�%�&����$5�6���>�>�&�)��I�I�b�g�g�l�l�+<�e�D�E��I�I������%6��>������%5�u�=��
7�
�H�H�&�'���G�G�N�N�
�B�
�
�F�
�6�-�.�
��7�7�>�>�)�$��H�H�Y��%r,c���tjj|d�}tjj|��rt	|�5}|j�j
�}ddd�|D]�}tjj|g|j
d����}tjj|d�}tjj|�stj|�tjj|�r��t	|d�5}|jt�ddd���yy#1swY��xYw#1swY��xYw)Nznamespace_packages.txtrDz__init__.py�w)
rrrrrqrrrHr��write�NAMESPACE_PACKAGE_INIT)rnrc�namespace_packagesry�mod�mod_dir�mod_inits       rrjzWheel._fix_namespace_packages�s����W�W�\�\�(�4L�M��
�7�7�>�>�,�-��(�)�R�%'�W�W�Y�_�_�%6�"�*�)���'�'�,�,�'9�K�C�I�I�c�N�K���7�7�<�<���?���w�w�~�~�g�.��H�H�W�%��w�w�~�~�h�/��h��,�����!7�8�-�,�
*�.�)�)��-�,�s�E	�'E�	E�E	N)�__name__�
__module__�__qualname__rBrJrPrUr^rdrb�staticmethodrhrirj�r,rr5r5Lse�� �
�V�
�K�9�
C��8��8�t� �� �:�9��9r,r5)#�__doc__rtrE�	functoolsrrX�rer`�
contextlib�distutils.utilrr��#setuptools.extern.packaging.versionrr�� setuptools.extern.packaging.tagsr�!setuptools.extern.packaging.utilsr�setuptools.command.egg_inforr�setuptools.archive_utilr	�compile�VERBOSEr?r7r��	lru_cacherr+�contextmanagerr3r5r�r,r�<module>r�s�������	��	���'��H�5�?�I�7��R�Z�Z���J�J�	�
�%��U������T�"�D�#�D��,���
!��
!�^9�^9r,python3.12/site-packages/setuptools/__pycache__/launch.cpython-312.pyc000064400000002516151732703740021534 0ustar00�

��_i,��8�dZddlZddlZd�Zedk(re�yy)z[
Launch the Python script on the command line after
setuptools is bootstrapped via import.
�Nc�t�ttjd}t|dd��}tjddtjddt	t
dt�}||�5}|j�}ddd�jdd�}t||d�}t||�y#1swY�5xYw)	zP
    Run the script in sys.argv[1] as if it had
    been invoked naturally.
    ��__main__N)�__file__�__name__�__doc__�openz\r\nz\n�exec)�__builtins__�sys�argv�dict�getattr�tokenizer	�read�replace�compiler
)�script_name�	namespace�open_�fid�script�norm_script�codes       ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/launch.py�runr
s���
��(�(�1�+�K������I�
�(�(�1�2�,�C�H�H�Q�K��H�f�d�+�E�	�{�	�s������
��.�.��5�1�K��;��V�4�D���y��	
�	�s�)B.�.B7r)rrrrr��r�<module>rs+����
��,�z���E�rpython3.12/site-packages/setuptools/__pycache__/version.cpython-312.pyc000064400000000734151732703750021750 0ustar00�

��_i���X�ddlmZ	ejd�xsdZy#e$rdZYywxYw)�)�metadata�
setuptoolsz0.dev0+unknownN)�
_importlibr�version�__version__�	Exception����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/version.py�<module>rs9�� �#�"�(�"�"�<�0�D�4D�K���#�"�K�#�s��)�)python3.12/site-packages/setuptools/__pycache__/unicode_utils.cpython-312.pyc000064400000003234151732703750023127 0ustar00�

��_i���&�ddlZddlZd�Zd�Zd�Zy)�Nc���t|t�rtjd|�S	|j	d�}tjd|�}|jd�}|S#t$rY|SwxYw)N�NFD�utf-8)�
isinstance�str�unicodedata�	normalize�decode�encode�UnicodeError)�paths ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/unicode_utils.py�	decomposersr���$����$�$�U�D�1�1�
��{�{�7�#���$�$�U�D�1���{�{�7�#���K���
���K�
�s�8A"�"	A/�.A/c��t|t�r|Stj�xsd}|df}|D]}	|j	|�cSy#t
$rY�$wxYw)zY
    Ensure that the given path is decoded,
    NONE when no expected encoding works
    rN)rr�sys�getfilesystemencodingr
�UnicodeDecodeError)r
�fs_enc�
candidates�encs    r�filesys_decodersa���$�����
�
&�
&�
(�
3�G�F����J���	��;�;�s�#�#���"�	��	�s�A
�
	A�Ac�D�	|j|�S#t$rYywxYw)z/turn unicode encoding into a functional routineN)r�UnicodeEncodeError)�stringrs  r�
try_encoder%s(����}�}�S�!�!������s��	�)rrrrr��r�<module>rs���
�	��&rpython3.12/site-packages/setuptools/__pycache__/depends.cpython-312.pyc000064400000016471151732703750021712 0ustar00�

��_i����ddlZddlZddlZddlZddlmZddlmZmZmZm	Z	ddl
mZgd�ZGd�d�Z
d	�Zd
d
�Zdd�Zd�Ze�y)�N�)�_imp)�find_module�PY_COMPILED�	PY_FROZEN�	PY_SOURCE)�Version)�Requirer�get_module_constant�extract_constantc�>�eZdZdZ	d	d�Zd�Zd�Zd
d�Zdd�Zdd�Z	y)r
z7A prerequisite to building or installing a distributionNc�~�|�|�t}|�||�}|�d}|jjt��|`y)N�__version__)r	�__dict__�update�locals�self)r�name�requested_version�module�homepage�	attribute�formats       ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/depends.py�__init__zRequire.__init__sJ���>�/�;��F��� &�'8� 9��� �)�	��
�
���V�X�&��I�c�h�|j�|j�d|j��S|jS)z0Return full package/distribution name, w/version�-)rr)rs r�	full_namezRequire.full_name s-���!�!�-�"�i�i��)?�)?�@�@��y�y�rc��|jduxs>|jduxs.t|�dk7xr|j|�|jk\S)z%Is 'version' sufficiently up-to-date?N�unknown)rr�strr)r�versions  r�
version_okzRequire.version_ok&sS��
�N�N�d�"�
?��{�{�d�"�
?��7�|�y�(�?����G�$��(>�(>�>�		
rc�$�|j�/	t|j|�\}}}|r|j�|St|j|j||�}|�!||ur|j�|j
|�S|S#t$rYywxYw)a�Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        N)rrr�close�ImportErrorrr)r�paths�default�f�p�i�vs       r�get_versionzRequire.get_version/s����>�>�!�
�%�d�k�k�5�9���1�a���G�G�I���
 ����T�^�^�W�e�L���=�Q�g�-�$�+�+�2I��;�;�q�>�!�����
��
�s�-B�	B�Bc�(�|j|�duS)z/Return true if dependency is present on 'paths'N)r.)rr(s  r�
is_presentzRequire.is_presentJs������&�d�2�2rc�^�|j|�}|�y|jt|��S)z>Return true if dependency is present and up-to-date on 'paths'F)r.r$r")rr(r#s   r�
is_currentzRequire.is_currentNs-���"�"�5�)���?�����s�7�|�,�,r)�NN)Nr!�N)
�__name__�
__module__�__qualname__�__doc__rrr$r.r0r2�rrr
r
s*��A�TX���
��63�-rr
c�j�tjd��}|s|�Stj|�S)Nc3�K�d��y�wr4r9r9rr�emptyzmaybe_close.<locals>.emptyWs����
��s�)�
contextlib�contextmanager�closing)r*r<s  r�maybe_closer@Vs7��������
��w�����a� � rc���	t||�x\}}\}}}}	t|�5|tk(r'|j	d�tj|�}
nr|tk(rtj||�}
nR|tk(rt|j	�|d�}
n-tj|||	�}t||d�cddd�Sddd�t
||�S#t$rYywxYw#1swY�%xYw)z�Find 'module' by searching 'paths', and extract 'symbol'

    Return 'None' if 'module' does not exist on 'paths', or it does not define
    'symbol'.  If the module defines 'symbol' as a constant, return the
    constant.  Otherwise, return 'default'.N��exec)rr'r@r�read�marshal�loadrr�get_frozen_objectr�compile�
get_module�getattrr)r�symbolr)r(r*�path�suffix�mode�kind�info�code�importeds            rrrbs����/:�6�5�/I�I�%��4�%�&�$���

�Q���;��
�F�F�1�I��<�<��?�D�
�Y�
��)�)�&�%�8�D�
�Y�
��1�6�6�8�T�6�2�D����v�u�d�;�H��8�V�T�2�
����D�&�'�2�2��#�����
��s�C�BC*�	C'�&C'�*C3c��||jvryt|j�j|�}tjd}tjd}tjd}|}tj
|�D]D}|j}	|j}
|	|k(r|j|
}�0|
|k(r|	|k(s|	|k(r|cS|}�Fy)aExtract the constant value of 'symbol' from 'code'

    If the name 'symbol' is bound to a constant value by the Python code
    object 'code', return that value.  If 'symbol' is bound to an expression,
    return 'default'.  Otherwise, return 'None'.

    Return value is based on the first assignment to 'symbol'.  'symbol' must
    be a global, or at least a non-"fast" local in the code block.  That is,
    only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
    must be present in 'code.co_names'.
    N�
STORE_NAME�STORE_GLOBAL�
LOAD_CONST)	�co_names�list�index�dis�opmap�Bytecode�opcode�arg�	co_consts)rQrKr)�name_idxrTrUrV�const�	byte_code�opr^s           rrrs����T�]�]�"���D�M�M�"�(�(��0�H����<�(�J��9�9�^�,�L����<�(�J��E��\�\�$�'�	�
�
�
���m�m��
����N�N�3�'�E�
�H�_�"�
�"2�b�L�6H��L��E�(rc��tjjd�stjdk7ryd}|D]"}t�|=tj|��$y)z�
    Patch the globals to remove the objects not available on some platforms.

    XXX it'd be better to test assertions about bytecode instead.
    �java�cliN)rr)�sys�platform�
startswith�globals�__all__�remove)�incompatiblers  r�_update_globalsrn�sH���<�<�"�"�6�*�s�|�|�u�/D��<�L����I�d�O����t��r)���N)ro)rgrEr=rZr3rrrrr�extern.packaging.versionr	rkr
r@rrrnr9rr�<module>rqsQ��
���
��@�@�-�P��D-�D-�N	!�3�:!�H��rpython3.12/site-packages/setuptools/__pycache__/_path.cpython-312.pyc000064400000003710151732703750021353 0ustar00�

��_i ��l�ddlZddlZddlmZeeej
fZd�Zdededefd�Z	dedefd	�Z
y)
�N)�Unionc�p�tjj|�}tj|d��y)z1Ensure that the parent directory of `path` existsT)�exist_okN)�os�path�dirname�makedirs)rrs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_path.py�ensure_directoryrs"���g�g�o�o�d�#�G��K�K��$�'��p1�p2�returnc�0�t|�t|�k(S)a�Differs from os.path.samefile because it does not require paths to exist.
    Purely string based (no comparison between i-nodes).
    >>> same_path("a/b", "./a/b")
    True
    >>> same_path("a/b", "a/./b")
    True
    >>> same_path("a/b", "././a/b")
    True
    >>> same_path("a/b", "./a/b/c/..")
    True
    >>> same_path("a/b", "../a/b/c")
    False
    >>> same_path("a", "a/b")
    False
    )�normpath)r
rs  r
�	same_pathrs�� �B�<�8�B�<�'�'r�filenamec��tjdk(rtjj	|�n|}tjjtjj
tjj|���S)z2Normalize a file/dir name for comparison purposes.�cygwin)�sys�platformrr�abspath�normcase�realpathr)r�files  r
rr!sV��),����(@�2�7�7�?�?�8�$�h�D�
�7�7���B�G�G�,�,�R�W�W�-=�-=�d�-C�D�E�Er)rr�typingr�str�PathLike�_Pathr�boolrr�rr
�<module>r"sV��	�
��
�c�2�;�;����(�(�%�(�U�(�t�(�&F�u�F��Frpython3.12/site-packages/setuptools/__pycache__/errors.cpython-312.pyc000064400000006657151732703750021611 0ustar00�

��_im
���dZddlmZejZejZejZejZ	ejZejZ
ejZej Zej"Zej$Zej(Zej,Zej0Zej2Zej6Zej:Zej<ZGd�de�Z Gd�de�Z!Gd�dee"�Z#Gd	�d
ee"�Z$y)zCsetuptools.errors

Provides exceptions used by setuptools modules.
�)�errorsc��eZdZdZy)�InvalidConfigErrorz&Error used for invalid configurations.N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/errors.pyrr s��0rrc��eZdZdZy)�RemovedConfigErrorz?Error used for configurations that were deprecated and removed.Nrrrr
rr$s��Irrc��eZdZdZy)�RemovedCommandErroraOError used for commands that have been removed in setuptools.

    Since ``setuptools`` is built on ``distutils``, simply removing a command
    from ``setuptools`` will make the behavior fall back to ``distutils``; this
    error is raised if a command exists in ``distutils`` but has been actively
    removed in ``setuptools``.
    Nrrrr
rr(s��rrc��eZdZdZy)�PackageDiscoveryErrora{Impossible to perform automatic discovery of packages and/or modules.

    The current project layout or given discovery options can lead to problems when
    scanning the project directory.

    Setuptools might also refuse to complete auto-discovery if an error prone condition
    is detected (e.g. when a project is organised as a flat-layout but contains
    multiple directories that can be taken as top-level packages inside a single
    distribution [*]_). In these situations the users are encouraged to be explicit
    about which packages to include or to make the discovery parameters more specific.

    .. [*] Since multi-package distributions are uncommon it is very likely that the
       developers did not intend for all the directories to be packaged, and are just
       leaving auxiliary code in the repository top-level, such as maintenance-related
       scripts.
    Nrrrr
rr2s��rrN)%r
�	distutilsr�_distutils_errors�DistutilsByteCompileError�ByteCompileError�CCompilerError�DistutilsClassError�
ClassError�CompileError�DistutilsExecError�	ExecError�DistutilsFileError�	FileError�DistutilsInternalError�
InternalError�LibError�	LinkError�DistutilsModuleError�ModuleError�DistutilsOptionError�OptionError�DistutilsPlatformError�
PlatformError�PreprocessError�DistutilsSetupError�
SetupError�DistutilsTemplateError�
TemplateError�UnknownFileError�DistutilsError�	BaseErrorrr�RuntimeErrorrrrrr
�<module>r3s���
2�
%�>�>��"�1�1��
�
2�
2�
� �-�-���0�0�	��0�0�	�!�8�8�
��%�%���'�'�	��4�4���4�4��!�8�8�
�#�3�3��
�
2�
2�
�!�8�8�
�$�5�5��
�,�,�	�1��1�J��J��)�\���I�|�rpython3.12/site-packages/setuptools/__pycache__/_entry_points.cpython-312.pyc000064400000011165151732703750023157 0ustar00�

��_i���J�ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZd	�Zd
�Zd�Zde
j$fd
�Zej(d��Zej-e�d��Zej-ed�d��ede
j$fd��Zd�Zy)�N�)�OptionError)�yield_lines)�	pass_none)�metadata)�
ensure_unique)�consumec�d�	|jy#t$r}d|�d�}t|�|�d}~wwxYw)zR
    Exercise one of the dynamic properties to trigger
    the pattern match.
    zProblems to parse zq.
Please ensure entry-point follows the spec: https://packaging.python.org/en/latest/specifications/entry-points/N)�extras�AttributeErrorr)�ep�ex�msgs   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_entry_points.py�ensure_validr
sE��
'�
�	�	���'� ���%R�
R�	��#��B�&��'�s��	/�*�/c��t|�}d|�d�dj|�z}tjj	|�S)zf
    Given a value of an entry point or series of entry points,
    return each as an EntryPoint.
    �[�]
�
)r�joinr�EntryPoints�
_from_text)�value�group�lines�texts    r�
load_grouprs@��
���E�
�u�g�S�>�D�I�I�e�,�,�D����*�*�4�0�0�c�2�|j|jfS�N)r�name)r
s r�by_group_and_namer"'s��
�8�8�R�W�W��r�epsc	�V�tttt|t����|S)zM
    Ensure entry points are unique by group and name and validate each.
    ��key)r	�maprrr"�r#s r�validater)+s ���C��m�C�5F�G�H�I��Jrc��tjjd�|j�D��}t	tj|��S)zA
    Given a Distribution.entry_points, produce EntryPoints.
    c3�:K�|]\}}t||����y�wr )r)�.0rrs   r�	<genexpr>zload.<locals>.<genexpr>8s����+�5@�\�U�E�
�5�%� �[�s�)�	itertools�chain�
from_iterable�itemsr)rr)r#�groupss  r�loadr33sC��
�_�_�
*�
*�+�58�Y�Y�[�+��F��H�(�(��0�1�1rc�x�ttjtjj|���S)z�
    >>> ep, = load('[console_scripts]\nfoo=bar')
    >>> ep.group
    'console_scripts'
    >>> ep.name
    'foo'
    >>> ep.value
    'bar'
    )r)rrrr(s r�_r5>s+���H�(�(��)=�)=�)H�)H��)M�N�O�Orc��|Sr �)�xs r�<lambda>r9Ls��Arc��tjd�}tjt	||��|�}djd�|D��S)Nrr%rc3�FK�|]\}}d|�dt|��d����y�w)rrrN)�render_items)r,rr1s   rr-zrender.<locals>.<genexpr>Ts*����V�v�|�u�e�q���s�<��#6�"7�r�:�v�s�!)�operator�
attrgetterr.�groupby�sortedr)r#�by_groupr2s   r�renderrBOs@���"�"�7�+�H�
�
�
�v�c�x�8�(�
C�F��9�9�V�v�V�V�Vrc�D�djd�t|�D��S)Nrc3�RK�|]}|j�d|j�����!y�w)z = N)r!r)r,r
s  rr-zrender_items.<locals>.<genexpr>Xs$����E��2����y��B�H�H�:�.��s�%')rr@r(s rr<r<Ws���9�9�E����E�E�Er)�	functoolsr=r.�errorsr�extern.jaraco.textr�extern.jaraco.functoolsr�
_importlibr�
_itertoolsr�extern.more_itertoolsr	rrr"rr)�singledispatchr3�register�strr5�typerBr<r7rr�<module>rPs�������+�.� �%�*�'�1���(�&�&�����2��2����s��
P��
P��
�
�d�4�j�+�&��W��$�$�W��W�Frpython3.12/site-packages/setuptools/__pycache__/dist.cpython-312.pyc000064400000130150151732703760021223 0ustar00�

��_iU���J�dgZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZmZmZddlZddlZddlZddlZddlZddlmZddlmZmZdd	lmZdd
lmZddl m!Z!m"Z"dd
l#m$Z$ddl%m&Z&m'Z'ddl(m)Z)m*Z*ddl+m,Z,ddl-m.Z.ddl-m/Z/ddl-m0Z0ddl-m1Z2ddl3m4Z4ddl5m6Z6m7Z7ddl8m9Z9ddl:m;Z;ddl<m=Z=m>Z>e?e@fZAd�ZBd�ZCd�ZDd�ZEd�ZFd�ZGd �ZHd!�ZId"�ZJd#�ZKd$�ZLd%�ZMd&�ZNd'�ZOe;ej�j��ZRGd(�deR�ZQGd)�d*e>�ZSy)+�Distribution�N)�suppress)�iglob)�Path)�List�Optional�Set)�DEBUG)�DistutilsOptionError�DistutilsSetupError)�translate_longopt)�	strtobool�)�	partition�unique_everseen)�
OrderedSet)�
InvalidMarker�Marker)�InvalidSpecifier�SpecifierSet)�Version)�
_entry_points)�_normalization)�_reqs)�command)�metadata)�setupcfg�
pyprojecttoml)�ConfigDiscovery)�
get_unpatched)�InformationOnly�SetuptoolsDeprecationWarningc��	tj|dd��}|jrJ�y#ttt
tf$r}t|�d|�d��|�d}~wwxYw)N)�value�name�groupz/ must be importable 'module:attrs' string (got �))r�
EntryPoint�extras�	TypeError�
ValueError�AttributeError�AssertionErrorr)�dist�attrr$�ep�es     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/dist.py�check_importabler3-sZ���
�
 �
 �u�4�t�
D���9�9��}�9���z�>�>�B��!�FJ�E�R�
��	���s�&)�A�A�Ac���	t|ttf�sJ�dj|�|k7sJ�y#tt
ttf$r}t|�d|�d��|�d}~wwxYw)z"Verify that value is a string list�z  must be a list of strings (got r'N)	�
isinstance�list�tuple�joinr*r+r,r-r�r.r/r$r1s    r2�assert_string_listr;7sd��	��%�$���/�/�/��w�w�u�~��&�&�&���z�>�>�B��!�7;�U�C�
��	���s�.1�A!�
A�A!c��|}t|||�|D]x}|j|�stdd|zz��|jd�\}}}|r%||vr!tj
j
d||�tjddd���zy	)
z(Verify that namespace packages are validz1Distribution contains no modules or packages for znamespace package %r�.z^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyz/The namespace_packages parameter is deprecated.z<Please replace its usage with implicit namespaces (PEP 420).z3references/keywords.html#keyword-namespace-packages)�see_docsN)	r;�has_contents_forr�
rpartition�	distutils�log�warnr"�emit)r.r/r$�ns_packages�nsp�parent�sep�childs        r2�	check_nsprJEs����K��t�T�;�/����$�$�S�)�%�C�(�3�.�/��
�!�^�^�C�0����U��f�K�/��M�M���;���	
�	%�)�)�=�J�J�	
��c��	ttjt|j	���y#t
ttf$r}td�|�d}~wwxYw)z+Verify that extras_require mapping is validz�'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.N)	r7�	itertools�starmap�_check_extra�itemsr*r+r,rr:s    r2�check_extrasrQbsP����Y�
�
�|�U�[�[�]�
;�<���z�>�2��!�
&�
��		���s�14�A�A�Ac���|jd�\}}}	t|�t	tj|��y#t$rd|�d|�d�}t|�d�wxYw)N�:zInvalid environment marker: z (r')r�
_check_markerrrr7r�parse)�extra�reqsr%rH�marker�msgs      r2rOrOnsi������,��D�#�v�1��f��	����T�	����1�,�V�H�B�u�i�q�A��!�#�&�D�0�1�s�A�A c�@�|syt|�}|j�y�N)r�evaluate)rX�ms  r2rTrTxs�����v��A��J�J�LrKc�\�t|�|k7rd}t|j||����y)z)Verify that value is True, False, 0, or 1z0{attr!r} must be a boolean value (got {value!r}))r/r$N)�boolr�format)r.r/r$�tmpls    r2�assert_boolrbs0���E�{�e��A��!�$�+�+�4�u�+�"E�F�F�rKc�T�|stj|�d��yt|�d���)Nz is ignored.z is invalid.)�DistDeprecationWarningrDr�r.r/r$s   r2�invalid_unless_falserf�s/����#�#�t�f�L�$9�:��
���l�3�
4�4rKc���	ttj|��t|tt
f�rt
d��y#ttf$r$}d}t|j||���|�d}~wwxYw)z9Verify that install_requires is a valid requirements listzUnordered types are not allowedzm{attr!r} must be a string or list of strings containing valid project/version requirement specifiers; {error}�r/�errorN)
r7rrUr6�dict�setr*r+rr`�r.r/r$riras     r2�check_requirementsrm�sv��	R��U�[�[��
� ��e�d�C�[�)��=�>�>�*���z�"�R�
O�	
�"�$�+�+�4�u�+�"E�F�E�Q��R�s�?A�A5�A0�0A5c��	t|�y#ttf$r$}d}t|j	||���|�d}~wwxYw)z.Verify that value is a valid version specifierzF{attr!r} must be a string containing valid version specifiers; {error}rhN)rrr,rr`rls     r2�check_specifierro�sK��R��U����n�-�R�W�	
�"�$�+�+�4�u�+�"E�F�E�Q��	R�s��A�<�Ac�j�	tj|�y#t$r}t|�|�d}~wwxYw)z)Verify that entry_points map is parseableN)r�load�	Exceptionrr:s    r2�check_entry_pointsrs�s2��,����5�!���,�!�!�$�!�+��,�s��	2�-�2c�:�t|t�std��y)Nztest_suite must be a string)r6�strrres   r2�check_test_suiterv�s���e�S�!�!�"?�@�@�"rKc��t|t�stdj|���|j	�D]L\}}t|t
�stdj||���t
|dj|�|��Ny)z@Verify that value is a dictionary of package names to glob listszT{!r} must be a dictionary mapping package names to lists of string wildcard patternsz,keys of {!r} dict must be strings (got {!r})zvalues of {!r} dictN)r6rjrr`rPrur;)r.r/r$�k�vs     r2�check_package_datarz�s~���e�T�"�!�
'�'-�v�d�|�
�	
����
���1��!�S�!�%�>�E�E�d�A�N��
�	�4�!6�!=�!=�d�!C�Q�G�rKc��|D]9}tjd|�r�tjj	d|��;y)Nz\w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)�re�matchrArBrC)r.r/r$�pkgnames    r2�check_packagesr�s4�����x�x���0��M�M���8��
�rKc�>��eZdZdZd�eed�d�eed�ZdZd�Z	d,d�Z
d	�Zd
�Ze
d��Zd�Zd
�Zd�Ze
d��Zd,d�Zd�Zd�Zd�Zd,d�Zd�Zd-d�Zd�Zd�Ze
d��Zd�Zd�Zd�Zd�Z d�Z!d�Z"d �Z#d!�Z$d"�Z%d#�Z&d$�Z'd%�Z(d&�Z)d'�Z*d(�Z+d)�Z,d*�Z-�fd+�Z.�xZ/S).raGDistribution with support for tests and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'test_suite' -- the name of a test suite to run for the 'test' command.
        If the user runs 'python setup.py test', the package will be installed,
        and the named test suite will be run.  The format is the same as
        would be used on a 'unittest.py' command line.  That is, it is the
        dotted name of an object to import and call to generate a test suite.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.
    c��yr[�r�rKr2�<lambda>zDistribution.<lambda>s��rKc��yr[r�r�rKr2r�zDistribution.<lambda>s��rKc��yr[r�r�rKr2r�zDistribution.<lambda>	s��rK)�long_description_content_type�project_urls�provides_extras�license_file�
license_files�install_requires�extras_requireNc�~�|rd|vsd|vrytjt|d��j�}t	t
j�5tj|�}|�>|jd�s-tjt|d��|_
||_ddd�y#1swYyxYw)Nr%�versionzPKG-INFO)r�	safe_nameru�lowerrr�PackageNotFoundError�distribution�	read_text�safe_version�_version�
_patched_dist)�self�attrsr%r.s    r2�patch_missing_pkg_infoz#Distribution.patch_missing_pkg_infos���
��e�+�y��/E���'�'��E�&�M�(:�;�A�A�C��
�h�3�3�
4��(�(��.�D������z�(B� .� ;� ;�C��i�@P�<Q� R��
�%)��"�	5�
4�
4�s
�AB3�3B<c��t|d�}|si|_|xsi}g|_|jdd�|_|j|�|jdg�|_|jdg�|_tjd��D]'}t|�j|jd��)t|j�}|ddhz}|j�D��cic]
\}}||vs�||��}}}t j#||�t�|_t'|�|_|j+|�|j-|jj.�|j_|j1�ycc}}w)	N�package_data�src_root�dependency_links�setup_requires�distutils.setup_keywords�r&r�r�)�hasattrr��
dist_files�popr�r�r�r�r�entry_points�vars�
setdefaultr%rk�_DISTUTILS_UNSUPPORTED_METADATArP�
_Distribution�__init__�_referenced_filesr�set_defaults�_set_metadata_defaults�_normalize_versionr��_finalize_requires)r�r��have_package_datar0�
metadata_onlyrxry�
dist_attrss        r2r�zDistribution.__init__sW��#�D�.�9�� � "�D����������	�	�*�d�3��
��#�#�E�*� %�	�	�*<�b� A���#�i�i�(8�"�=����'�'�.H�I�B���J�!�!�"�'�'�4�0�J��D�@�@�A�
��,�.>�?�?�
�',�{�{�}�O�}�t�q�!���8N�a��d�}�
�O����t�Z�0�
,/�5���+�D�1����#�#�E�*� $� 7� 7��
�
�8M�8M� N��
�
�����!��Ps�(F�5Fc��dh}t|j�D�chc]}t|j|d��|��}}||z
}|rd|��}t|��ycc}w)Nr%z&Required package metadata is missing: )r�r�getattrr)r��required�key�provided�missingrYs      r2�_validate_metadatazDistribution._validate_metadata=sw���8���D�M�M�*�
�*���t�}�}�c�4�0�<�
�*�	�
�
�X�%���:�7�)�D�C�%�c�*�*���
s� Ac	��|jj�D]?\}}t|j�j	||j||����Ay)z�
        Fill-in missing metadata fields not supported by distutils.
        Some fields may have been set by other tools (e.g. pbr).
        Those fields (vars(self.metadata)) take precedence to
        supplied attrs.
        N)r�rPr�rr��get)r�r��option�defaults    r2r�z#Distribution._set_metadata_defaultsJsH�� $�C�C�I�I�K�O�F�G������*�*�6�5�9�9�V�W�Y�3O�P� LrKc���ddlm}t|tj�rt|�}nt||�s|�|Stt
|��}||k7rtjd|�d|�d��|S|S)Nr)�sicz
Normalizing 'z' to '�')	r5r�r6�numbers�Numberrurr!rD)r�r��
normalizeds   r2r�zDistribution._normalize_versionTsn����g�w�~�~�.��'�l�G�
���
%����N����)�*�
��j� �� � �=��	��
�|�1�!M�N����rKc��t|dd�r|j|j_|j�|j|j_|j
|j_|j
r\|j
j
�D]>}|jd�d}|s�|jjj|��@yy)z�
        Set `metadata.python_requires` and fix environment markers
        in `install_requires` and `extras_require`.
        �python_requiresNrSr)
r�r�r�_normalize_requiresr�r��keys�splitr��add)r�rVs  r2r�zDistribution._finalize_requiresds���
�4�*�D�1�,0�,@�,@�D�M�M�)�� � �"�)-�)>�)>��
�
�&�'+�':�':��
�
�$�����,�,�1�1�3�����C�(��+����M�M�1�1�5�5�e�<�	4�rKc�d�t|dd�xsg}t|dd�xsi}tttt	j
|���|_|j�D��cic]6\}}|tttt	j
|xsg�����8c}}|_ycc}}w)zAMake sure requirement-related attributes exist and are normalizedr�Nr�)	r�r7�maprurrUr�rPr�)r�r�r�rxrys     r2r�z Distribution._normalize_requiresws���"�4�);�T�B�H�b�� ��'7��>�D�"�� $�S��e�k�k�:J�.K�%L� M���@N�@T�@T�@V�
�@V���1�A�t�C��U�[�[���b�1�2�3�3�@V�
����
s�';B,c��|jj}|r|ng}|jj}|r||vr|j|�|�|�d}t	t|j
|���|j_y)z<Compute names of all license files which should be included.N)zLICEN[CS]E*zCOPYING*zNOTICE*zAUTHORS*)rr�r��appendr7r�_expand_patterns)r�r��patternsr�s    r2�_finalize_license_filesz$Distribution._finalize_license_files�sv��-1�]�]�-H�-H�
�/<�m�"��&*�m�m�&@�&@���L��8��O�O�L�)�� �\�%9�J�H�&*��D�1�1�(�;�<�'
��
�
�#rKc��d�|D�S)z�
        >>> list(Distribution._expand_patterns(['LICENSE']))
        ['LICENSE']
        >>> list(Distribution._expand_patterns(['setup.cfg', 'LIC*']))
        ['setup.cfg', 'LICENSE']
        c3�K�|]O}tt|��D]6}|jd�s#tjj|�r|���8�Qy�w)�~N)�sortedr�endswith�os�path�isfile)�.0�patternr�s   r2�	<genexpr>z0Distribution._expand_patterns.<locals>.<genexpr>�sI����
�#���u�W�~�.���=�=��%�"�'�'�.�.��*>�
�.�
�#�s�AAr�)r�s r2r�zDistribution._expand_patterns�s��
�#�
�	
rKc
�&�ddlm}tjtjk(rgngd�}t|�}|�|j
�}tr|jd�|�}t|_
|D]�}t|d��5}tr)|jdjdit����|j|�ddd�|j�D]r}|j!|�}|j#|�}	|D]I}
|
d	k(s|
|vr�
|j%||
�}|j'|
|�}
|j)|
|�}
||f|	|
<�K�t|j+���d
|j,vry|j,d
j/�D]S\}
\}}|j0j%|
�}
|
r
t3|�}n|
dvrt3|�}	t5||
xs|
|��Uy#1swY��$xYw#t6$r}t9|�|�d}~wwxYw)
z�
        Adapted from distutils.dist.Distribution.parse_config_files,
        this method provides the same functionality in subtly-improved
        ways.
        r)�ConfigParser)
zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootNz"Distribution.parse_config_files():�utf-8��encodingz  reading {filename}�__name__�global)�verbose�dry_runr�)�configparserr��sysr��base_prefix�	frozenset�find_config_filesr
�announceru�optionxform�openr`�locals�	read_file�sections�options�get_option_dictr��warn_dash_deprecation�make_option_lowercaser��command_optionsrP�negative_optr�setattrr+r)r��	filenamesr��ignore_options�parser�filename�reader�sectionr��opt_dict�opt�val�src�aliasr1s               r2�_parse_config_filesz Distribution._parse_config_files�s���	.�
�z�z�S�_�_�,�
��	�(#�>�2�����.�.�0�I���M�M�>�?���� ���!�H��h��1�V���M�M�"?�"8�"?�"?�"K�&�(�"K�L�� � ��(�2�"�?�?�,�� �.�.��1���/�/��8��"�C��j�(�C�>�,A� � �*�*�W�c�2�C��4�4�S�'�B�C��4�4�S�'�B�C�%-�s�O�H�S�M�#�	-�
�O�O��)"�,�4�/�/�/��
 $�3�3�H�=�C�C�E�O�C��#�s��%�%�)�)�#�.�E��#�C�.�(���.�.���n��
5���e�l�s�C�0� F�72�1��H�
5�*�1�-�1�4��
5�s%�AG)�G6�)G3	�6	H�?H�Hc�@�|dvr|S|jdd�}ttjtj
j|j���}|jd�s|dk7r||vr|Sd|vr tjdd|�d|�d	�d
d��|S)
N)zoptions.extras_requirezoptions.data_files�-�_r�rzInvalid dash-separated optionsz)
                Usage of dash-separated zZ will not be supported in future
                versions. Please use the underscore name z instead.
                �!userguide/declarative_config.html�i��	��r>�due_date)�replacer7rM�chainrAr�__all__�_setuptools_commands�
startswithr"rD)r�rr��underscore_opt�commandss     r2r�z"Distribution.warn_dash_deprecation�s����
�
��J����S�#�.����O�O��!�!�)�)��)�)�+�
�
���"�"�9�-��:�%��x�'�!�!��#�:�(�-�-�0�)�),��0:�:H�9K�L��=�&�	
��rKc��	tjd�jjS#tj$rgcYSwxYw)N�
setuptools)rr�r��namesr�)r�s r2rz!Distribution._setuptools_commandss>��	��(�(��6�C�C�I�I�I���,�,�	��I�	�s�(+�A�Ac
��|dk7s|j�r|S|j�}tjdd|�d|�d|�d�dd�	�|S)
NrzInvalid uppercase configurationz$
            Usage of uppercase key z in zL will not be supported in
            future versions. Please use lowercase z instead.
            r	r
r
)�islowerr�r"rD)r�rr��
lowercase_opts    r2r�z"Distribution.make_option_lowercasesi���j� �C�K�K�M��J��	�	��
�$�)�)�-�$�$'�7�$�w�k�:3�3@�2C�D
�
�9�"�		
��rKc
���|j�}|�|j|�}tr|jd|z�|j	�D]�\}\}}tr|jd|�d|�d|�d��	|j
D�cgc]
}t
|���}}	|j}		t|t�}
||	vr|
rt||	|t|��nL||vr|
rt||t|��n/t||�rt|||�ntd|�d|�d	|�d
�����ycc}w#t$rg}Y��wxYw#t$ri}	Y��wxYw#t$r}t|�|�d}~wwxYw)a�
        Set the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').

        (Adopted from distutils.dist.Distribution._set_command_options)
        Nz#  setting options for '%s' command:z    z = z (from r'z	error in z: command 'z' has no such option 'r�)�get_command_namer�r
r�rP�boolean_optionsr
r,r�r6rur�rr�rr+)r��command_obj�option_dict�command_namer��sourcer$�o�	bool_opts�neg_opt�	is_stringr1s            r2�_set_command_optionsz!Distribution._set_command_options-sq��#�3�3�5�����.�.�|�<�K���M�M�?�,�N�O�'2�'8�'8�':�#�F�O�V�U���
�
����O�P�
�;F�;V�;V�W�;V�a�.�q�1�;V�	�W�
�%�2�2��
5�&�u�c�2�	��W�$���K����i��>N�:N�O��y�(�Y��K���5�1A�B��[�&�1��K���7�.�!�<��9����+(;��X��!�
��	�
��"�
���
�� �
5�*�1�-�1�4��
5�sO�9D.�D)�D.�D?�)A=E�)D.�.D<�;D<�?E
�E
�	E*�E%�%E*c���g}t|jxstjd�}|�-t	d�|�}t|d�}t|d�}||fS|j
�r|g}||fS)z/Add default file and split between INI and TOMLzpyproject.tomlc�2�t|�jdk(S)Nz.toml)r�suffix)�fs r2r�z8Distribution._get_project_config_files.<locals>.<lambda>`s���Q����'�(ArKrr)rr�r��curdirrr7�exists)r�r��	tomlfiles�standard_project_metadata�partss     r2�_get_project_config_filesz&Distribution._get_project_config_files[s}���	�$(����)C�"�)�)�EU�$V�!�� ��A�9�M�E��U�1�X��I��U�1�X��I��)�#�#�'�
-�
-�
/�2�3�I��)�#�#rKc��|j|�\}}|j|��tj||j|��|D]}tj|||��|j�|j�y)zXParses configuration files from various levels
        and loads configuration.
        )r�)�ignore_option_errorsN)	r1rr�parse_configurationr�r�apply_configurationr�r�)r�r�r3�inifilesr.r�s      r2�parse_config_fileszDistribution.parse_config_filesgs��#�<�<�Y�G���)�� � �8� �4��$�$��$�&�&�=Q�	
�"�H��-�-�d�H�>R�S�"�	
���!��$�$�&rKc� �ddlm}|||�S)zResolve pre-setup requirementsr)�_fetch_build_eggs)�	installerr9)r��requiresr9s   r2�fetch_build_eggszDistribution.fetch_build_eggsxs��0� ��x�0�0rKc���d}d�}tj|��}tj|j|�}td�|�}t
||��D]
}||��y)z�
        Allow plugins to apply arbitrary operations to the
        distribution. Each hook may optionally define a 'order'
        to influence the order of execution. Smaller numbers
        go first and the default is 0.
        z(setuptools.finalize_distribution_optionsc��t|dd�S)N�orderr)r�)�hooks r2�by_orderz/Distribution.finalize_options.<locals>.by_order�s���4��!�,�,rKr�c�"�|j�Sr[)rq)r1s r2r�z/Distribution.finalize_options.<locals>.<lambda>�s
��q�v�v�xrK)r�N)rr�rM�filterfalse�_removedr�r�)r�r&rA�defined�filtered�loadedr0s       r2�finalize_optionszDistribution.finalize_options~s[��;��	-��'�'�e�4���(�(�����@���'��2����X�.�B��t�H�/rKc�$�dh}|j|vS)z�
        When removing an entry point, if metadata is loaded
        from an older version of Setuptools, that removed
        entry point will attempt to be loaded and will fail.
        See #2765 for more details.
        �
2to3_doctests)r%)r0�removeds  r2rDzDistribution._removed�s��
�
���w�w�'�!�!rKc��tjd��D]>}t||jd�}|��|j	�||j|��@y)Nr�r�)rr�r�r%rq)r�r0r$s   r2�_finalize_setup_keywordsz%Distribution._finalize_setup_keywords�sI���'�'�.H�I�B��D�"�'�'�4�0�E�� �����	�$�����/�JrKc���ddlm}tjj	tj
d�}tjj
|�s�tj|�|j|�tjj	|d�}t|d�5}|jd�|jd�|jd�ddd�|S|S#1swY|SxYw)	Nr)�windows_supportz.eggsz
README.txt�wzcThis directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.

zAThis directory caches those eggs to prevent repeated downloads.

z/However, it is safe to delete this directory.

)r5rOr�r�r9r,r-�mkdir�	hide_filer��write)r�rO�
egg_cache_dir�readme_txt_filenamer+s     r2�get_egg_cache_dirzDistribution.get_egg_cache_dir�s���%������R�Y�Y��8�
��w�w�~�~�m�,��H�H�]�#��%�%�m�4�"$�'�'�,�,�}�l�"K���)�3�/�1����J�����.�����K�L�0���}��0���s�&4C&�&C0c� �ddlm}|||�S)z Fetch an egg needed for buildingr)�fetch_build_egg)r:rX)r��reqrXs   r2rXzDistribution.fetch_build_egg�s��.��t�S�)�)rKc���||jvr|j|Stjd|��}|D]$}|j�x|j|<}|cStj||�S)z(Pluggable version of get_command_class()�distutils.commands)r&r%)�cmdclassrr�rqr��get_command_class)r�r�epsr0r\s     r2r]zDistribution.get_command_class�sm���d�m�m�#��=�=��)�)��#�#�*>�W�M���B�02���	�9�D�M�M�'�"�X��O��!�2�2�4��A�ArKc���tjd��D]D}|j|jvs�|j	�}||j|j<�Ft
j
|�S�Nr[r�)rr�r%r\rqr��print_commands�r�r0r\s   r2razDistribution.print_commands�sY���'�'�.B�C�B��w�w�d�m�m�+��7�7�9��)1��
�
�b�g�g�&�D��+�+�D�1�1rKc���tjd��D]D}|j|jvs�|j	�}||j|j<�Ft
j
|�Sr`)rr�r%r\rqr��get_command_listrbs   r2rdzDistribution.get_command_list�sY���'�'�.B�C�B��w�w�d�m�m�+��7�7�9��)1��
�
�b�g�g�&�D��-�-�d�3�3rKc��|j�D]2\}}t|d|zd�}|r	||��!|j||��4y)a�Add items to distribution that are named in keyword arguments

        For example, 'dist.include(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        �	_include_N)rPr��
_include_misc)r�r�rxry�includes     r2rhzDistribution.include�sD���K�K�M�D�A�q��d�K�!�O�T�:�G����
��"�"�1�a�(�"rKc���|dz}|jr7|jD�cgc]}||k7s�	|j|�r�|��c}|_|jr7|jD�cgc]}||k7s�	|j|�r�|��c}|_|jrJ|jD�cgc].}|j|k7r|jj|�s|��0c}|_yycc}wcc}wcc}w)z9Remove packages, modules, and extensions in named packager=N)�packagesr�
py_modules�ext_modulesr%�r��package�pfx�ps    r2�exclude_packagezDistribution.exclude_package�s�����m���=�=��=�=��(�a�A��L����c�AR��=��D�M��?�?��?�?��*�a�a�7�l�1�<�<�PS�CT��?��D�O�����)�)� �)�A��6�6�W�$�Q�V�V�->�->�s�-C��)� �D������
��
 s'�
C#�C#�C#�#
C(�.C(�C(�&3C-c�h�|dz}|j�D]}||k(s|j|�s�yy)z<Return true if 'exclude_package(package)' would do somethingr=TN)�iter_distribution_namesrrms    r2r?zDistribution.has_contents_fors5����m���-�-�/�A��G�|�q�|�|�C�0��0rKc	�0�t|t�st|�d|�d���	t||�}|�t|t�st|dz��|r!t|||D�cgc]	}||vs�|��c}�yy#t$r}td|z�|�d}~wwxYwcc}w)zAHandle 'exclude()' for list/tuple attrs without a special handlerz#: setting must be a list or tuple (r'� %s: No such distribution settingN�4: this setting cannot be changed via include/exclude�r6�sequencerr�r,r�)r�r%r$�oldr1�items      r2�
_exclude_misczDistribution._exclude_misc
s����%��*�%�>B�E�J��
�	X��$��%�C��?�:�c�8�#<�%��M�M��
���D�$�#� K�#�$��U�9J��#� K�L���
�	X�%�&H�4�&O�P�VW�W��	X��!Ls#�A3�	B�&B�3	B�<B�Bc�N�t|t�st|�d|�d���	t||�}|�t|||�yt|t�st|dz��|D�cgc]	}||vs�|��}}t||||z�y#t$r}td|z�|�d}~wwxYwcc}w)zAHandle 'include()' for list/tuple attrs without a special handlerz: setting must be a list (r'ruNrvrw)r�r%r$ryr1rz�news       r2rgzDistribution._include_miscs����%��*�%�4�QV�&W�X�X�	X��$��%�C��;��D�$��&��C��*�%��M�M��
�%*�=�E�D�T��_�4�E�C�=��D�$��c�	�*���	X�%�&H�4�&O�P�VW�W��	X��>s#�B�!	B"�+B"�	B�B�Bc��|j�D]2\}}t|d|zd�}|r	||��!|j||��4y)aRemove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        �	_exclude_N)rPr�r{)r�r�rxry�excludes     r2r�zDistribution.exclude1sD�� �K�K�M�D�A�q��d�K�!�O�T�:�G����
��"�"�1�a�(�"rKc��t|t�std|�d���tt	|j
|��y)Nz+packages: setting must be a list or tuple (r')r6rxrr7r�rq)r�rjs  r2�_exclude_packageszDistribution._exclude_packagesHs6���(�H�-�%�DL�N��
�	
�S��%�%�x�
0�1rKc��|jj|_|jj|_|d}|jd�}||vr.||\}}||=ddl}|j|d�|dd|d}||vr�.tj|||�}|j|�}	t|	dd�rd|f|j|�d<|�gS|S)Nr�aliasesTr�command_consumes_arguments�command line�args)
�	__class__�global_optionsr�r��shlexr�r��_parse_command_optsr]r�)
r�r�r�rr�rrr��nargs�	cmd_classs
          r2r�z Distribution._parse_command_optsOs���"�n�n�;�;��� �N�N�7�7����q�'���&�&�y�1���� � ��)�J�C���� ���{�{�5�$�/�D��!�H��1�g�G�
�� ��1�1�$���E���*�*�7�3�	��9�:�D�A�5C�U�4K�D� � ��)�&�1�� ��	��rKc	���i}|jj�D]�\}}|j�D]�\}\}}|dk7r�|jdd�}|dk(ru|j|�}|jj�}|j
t|di��|j�D]\}	}
|
|k(s�|	}d}ntd��|dk(rd}||j|i�|<����|S)	ahReturn a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        r�rrrr�NzShouldn't be able to get herer)
r�rPr�get_command_objr��copy�updater�r-r�)r��d�cmd�optsrrr�cmdobjr%�neg�poss           r2�get_cmdline_optionsz Distribution.get_cmdline_optionsjs���
���-�-�3�3�5�I�C��#'�:�:�<���Z�c�3��.�(���k�k�#�s�+���!�8�!�1�1�#�6�F�"�/�/�4�4�6�G��N�N�7�6�>�2�#F�G�$+�M�M�O���S��#�:�"%�C�"&�C�!�	%4�-�-L�M�M��A�X��C�-0����S�"�%�c�*�+$0�6�0�rKc#�K�|jxsdD]}|���|jxsdD]}|���|jxsdD]>}t|t�r|\}}n|j
}|j
d�r|dd}|���@y�w)z@Yield all packages, modules, and extension names in distributionr��moduleNi����)rjrkrlr6r8r%r�)r��pkgr��extr%�	buildinfos      r2rsz$Distribution.iter_distribution_names�s������=�=�&�B�&�C��I�'��o�o�+��+�F��L�,��#�#�)�r�)�C��#�u�%�"%���i��x�x���}�}�X�&��C�R�y���J�*�s�BBc�F�ddl}|jrtj||�St	|j
tj�stj||�S|j
jj�dvrtj||�S|j
j}|j
jd��	tj||�|j
j|��S#|j
j|��wxYw)z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        rN)r��utf8r�r�)r��
help_commandsr��handle_display_optionsr6�stdout�io�
TextIOWrapperr�r��reconfigure)r��option_orderr�r�s    r2r�z#Distribution.handle_display_options�s���	���� �7�7��l�K�K��#�*�*�b�&6�&6�7� �7�7��l�K�K��:�:���$�$�&�*;�;� �7�7��l�K�K��:�:�&�&���
�
�����0�	6� �7�7��l�K��J�J�"�"�H�"�5��C�J�J�"�"�H�"�5�s�D�D c�D��|j�t�|�	|�yr[)r��super�run_command)r�rr�s  �r2r�zDistribution.run_command�s�������	���G�$rKr[)NF)0r��
__module__�__qualname__�__doc__rjrr7r�r�r�r�r�r��staticmethodr�r�r�r�r�rr�rr�r'r1r7r<rHrDrMrVrXr]rardrhrqr?r{rgr�r�r�r�rsr�r��
__classcell__)r�s@r2rr�s"���1�h*6��%�$�%� ��'�#��M�*�"�>+�Q��
��
�=�&
�
�&�
��
�M5�^ �D��$,5�\
$�'�"1��$�"��"�0��**�
B�2�4�)�,�*�M�"+�&)�.2��6$�L�$6�8%�%rKc��eZdZdZy)rdzrClass for warning about deprecations in dist in
    setuptools. Not ignored by default, unlike DeprecationWarning.N)r�r�r�r�r�rKr2rdrd�s��FrKrd)Trr�rMr�r�r|r��
contextlibr�globr�pathlibr�typingrrr	�
distutils.cmdrA�distutils.command�distutils.core�distutils.dist�
distutils.log�distutils.debugr
�distutils.errorsrr�distutils.fancy_getoptr
�distutils.utilr�extern.more_itertoolsrr�extern.ordered_setr�extern.packaging.markersrr�extern.packaging.specifiersrr�extern.packaging.versionrr5rrrrr�
_importlibr�configrr�	discoveryr�monkeyr �warningsr!r"r8r7rxr3r;rJrQrOrTrbrfrmrorsrvrzr�corerr�rdr�rKr2�<module>r�s����
��
���	�	�
����&�&������!�F�4�$�=�*�;�G�-����� �+�&�!�C��$�;����
�:	���G�5�R�R�,�A�
H���i�n�n�9�9�:�
�s%�=�s%�lF�9�FrKpython3.12/site-packages/setuptools/__pycache__/_itertools.cpython-312.pyc000064400000002146151732703760022446 0ustar00�

��_i����ddlmZd�fd�Zy)�)�consumec��|S)N�)�xs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_itertools.py�<lambda>rs��!�c#�K�t�}|j}|D])}||�}||vrtd|�d���||�|���+y�w)a
    Wrap an iterable to raise a ValueError if non-unique values are encountered.

    >>> list(ensure_unique('abc'))
    ['a', 'b', 'c']
    >>> consume(ensure_unique('abca'))
    Traceback (most recent call last):
    ...
    ValueError: Duplicate element 'a' encountered.
    zDuplicate element z
 encountered.N)�set�add�
ValueError)�iterable�key�seen�seen_add�element�ks      r�
ensure_uniquersS�����5�D��x�x�H�����L����9��1�'��M�J�K�K�����
��s�AAN)� setuptools.extern.more_itertoolsrrrr	r�<module>rs��4�!,�r	python3.12/site-packages/setuptools/__pycache__/dep_util.cpython-312.pyc000064400000001634151732703760022071 0ustar00�

��_i���"�ddlmZddlmZd�Zy)�)�	_modified)�SetuptoolsDeprecationWarningc�r�|dvrt|��tjdddd��tt|�S)N)�newer_group�newer_pairwise_groupzGdep_util is Deprecated. Use functions from setuptools.modified instead.zBPlease use `setuptools.modified` instead of `setuptools.dep_util`.z,https://github.com/pypa/setuptools/pull/4069)i���)�see_url�due_date)�AttributeErrorr�emit�getattrr)�names ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/dep_util.py�__getattr__rs?���:�:��T�"�"� �%�%�Q�L�>��	��9�d�#�#�N)�
_distutilsr�warningsrr�rr�<module>rs��!�2�$rpython3.12/site-packages/setuptools/__pycache__/monkey.cpython-312.pyc000064400000014567151732703760021577 0ustar00�

��_i���z�dZddlZddlZddlZddlZddlZddlmZddlZ	gZ
	d�Zd�Zd�Z
d�Zd�Zd	�Zd
�Zd�Zy)z
Monkey patching of distutils.
�N)�
import_modulec�z�tj�dk(r|f|jzStj|�S)am
    Returns the bases classes for cls sorted by the MRO.

    Works around an issue on Jython where inspect.getmro will not return all
    base classes if multiple classes share the same name. Instead, this
    function will return a tuple containing the class itself, and the contents
    of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024.
    �Jython)�platform�python_implementation�	__bases__�inspect�getmro)�clss ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/monkey.py�_get_mror
s5���%�%�'�8�3��v��
�
�%�%��>�>�#���c��t|t�rtn"t|tj�rt
nd�}||�S)Nc��y)N�)�items r�<lambda>zget_unpatched.<locals>.<lambda>*s��$r)�
isinstance�type�get_unpatched_class�types�FunctionType�get_unpatched_function)r�lookups  r�
get_unpatchedr$s>���d�D�!�	��d�E�.�.�/�$�
���$�<�rc��d�t|�D�}t|�}|jjd�sd|z}t	|��|S)z�Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
    c3�XK�|]"}|jjd�r�|���$y�w)�
setuptoolsN)�
__module__�
startswith)�.0rs  r�	<genexpr>z&get_unpatched_class.<locals>.<genexpr>5s%�����$��C�N�N�,E�,E�l�,S��}�s� *�*�	distutilsz(distutils has already been patched by %r)r
�nextrr �AssertionError)r�external_bases�base�msgs    rrr/sM�����}��N����D��?�?�%�%�k�2�8�3�>���S�!�!��Krc�Z�ddl}|jtj_tj
dk}|r|jtj_dtj
cxkxrdkncxsdtj
cxkxrdknc}|r!d}|tjj_
t�tjtjtjfD]}|jj|_�|jj tj_|jj tj_dtj"vr,|jj tj"d_t%�y)Nr)��r*)r*�)r*r,�)r*r+zhttps://upload.pypi.org/legacy/zdistutils.command.build_ext)r�Commandr#�core�sys�version_info�findall�filelist�config�
PyPIRCCommand�DEFAULT_REPOSITORY�_patch_distribution_metadata�dist�cmd�Distribution�	extension�	Extension�modules�#patch_for_msvc_specialized_compiler)r�has_issue_12885�needs_warehouse�	warehouse�modules     r�	patch_allrC?s=���(�/�/�I�N�N���&�&�)�3�O��%/�%7�%7�	���"��s�/�/�;�)�;�&�@�	���@&�&�@&�O�
�5�	�<E�	���&�&�9� �"��.�.�)�.�.�)�-�-�?��(�o�o�:�:���@� *�3�3�=�=�I�N�N��$.�$8�$8�$B�$B�I���!�$����3�!�*�*�4�4�	���)�	
�
�'�)rc��ddlm}	dD]3}t||�}ttj
j||��5y)N�)�_core_metadata)�write_pkg_info�write_pkg_file�
read_pkg_file�get_metadata_version)�rF�getattr�setattrr#r8�DistributionMetadata)rF�attr�new_vals   rr7r7es8�� �N����.�$�/���	���3�3�T�7�C�rc�l�t||�}t|�jd|�t|||�y)z�
    Patch func_name in target_mod with replacement

    Important - original must be resolved by name to avoid
    patching an already patched function.
    �	unpatchedN)rL�vars�
setdefaultrM)�replacement�
target_mod�	func_name�originals    r�
patch_funcrYss5���z�9�-�H�	��� � ��h�7��J�	�;�/rc��t|d�S)NrR)rL)�	candidates rrr�s���9�k�*�*rc���td��tj�dk7ry�fd�}tj|d�}	t|d��y#t$rYywxYw)z\
    Patch functions in distutils to use standalone Microsoft Visual C++
    compilers.
    zsetuptools.msvc�WindowsNc���d}||jd�z}t�|�}t|�}t||�st	|��|||fS)zT
        Prepare the parameters for patch_func to patch indicated function.
        �msvc14_�_)�lstriprLr�hasattr�ImportError)�mod_namerW�repl_prefix�	repl_name�repl�mod�msvcs      �r�patch_paramsz9patch_for_msvc_specialized_compiler.<locals>.patch_params�sW��� ���)�"2�"2�3�"7�7�	��t�Y�'���H�%���s�I�&��i�(�(��S�)�#�#rzdistutils._msvccompiler�_get_vc_env)rr�system�	functools�partialrYrc)rj�msvc14ris  @rr>r>�s`����*�+�D�����I�%��
$��
�
�|�-F�
G�F�
��F�=�)�*���
��
�s�A�	A�A)�__doc__rmr	rr0r�	importlibr�distutils.filelistr#�__all__r
rrrCr7rYrr>rrr�<module>rtsW������
��#��
�����
� #*�LD�0�"+�
rpython3.12/site-packages/setuptools/__pycache__/discovery.cpython-312.pyc000064400000070705151732703760022300 0ustar00�

��_i�R�	�p�dZddlZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZddlZddlmZddlmZeeej2fZeeZej8j:Ze	rdd	lm Z d
ede!fd�Z"Gd
�d�Z#Gd�d�Z$Gd�de$�Z%Gd�de%�Z&Gd�de$�Z'Gd�de&�Z(Gd�de'�Z)dedede
efd�Z*Gd�d�Z+d e
ede
efd!�Z,d e
ede
efd"�Z-d e
ed#eeefd$edeefd%�Z.d&ed#eeefd$edefd'�Z/d e
ed(ede
eeffd)�Z0y)*u_Automatic discovery of Python modules and packages (for inclusion in the
distribution) and other config values.

For the purposes of this module, the following nomenclature is used:

- "src-layout": a directory representing a Python project that contains a "src"
  folder. Everything under the "src" folder is meant to be included in the
  distribution when packaging the project. Example::

    .
    ├── tox.ini
    ├── pyproject.toml
    └── src/
        └── mypkg/
            ├── __init__.py
            ├── mymodule.py
            └── my_data_file.txt

- "flat-layout": a Python project that does not use "src-layout" but instead
  have a directory under the project root for each package::

    .
    ├── tox.ini
    ├── pyproject.toml
    └── mypkg/
        ├── __init__.py
        ├── mymodule.py
        └── my_data_file.txt

- "single-module": a project that contains a single Python script direct under
  the project root (no directory used)::

    .
    ├── tox.ini
    ├── pyproject.toml
    └── mymodule.py

�N��fnmatchcase)�glob)�Path)	�
TYPE_CHECKING�Dict�Iterable�Iterator�List�Mapping�Optional�Tuple�Union)�log)�convert_path)�Distribution�path�returnc�\�tjj|�j�S�N)�osr�basename�isidentifier)rs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/discovery.py�_valid_namerGs ��
�7�7���D�!�.�.�0�0�c�<�eZdZdZdefd�Zdedefd�Zdedefd�Zy)	�_Filterz�
    Given a list of patterns, create a callable that will be true only if
    the input matches at least one of the patterns.
    �patternsc�8�tj|�|_yr)�dict�fromkeys�	_patterns)�selfrs  r�__init__z_Filter.__init__Rs�����x�0��r�itemrc�@��t�fd�|jD��S)Nc3�6�K�|]}t�|����y�wrr)�.0�patr&s  �r�	<genexpr>z#_Filter.__call__.<locals>.<genexpr>Vs�����D�^�c�;�t�S�)�^�s�)�anyr#�r$r&s `r�__call__z_Filter.__call__Us����D�T�^�^�D�D�Drc��||jvSr)r#r-s  r�__contains__z_Filter.__contains__Xs���t�~�~�%�%rN)	�__name__�
__module__�__qualname__�__doc__�strr%�boolr.r0�rrrrLs<���
1�#�1�E�S�E�T�E�&��&��&rrc��eZdZUdZdZeedfed<dZeedfed<e				d
de
deedeed	eefd
��Z
e	de
deded	efd��Zy)�_Finderz@Base class that exposes functionality for module/package findersr7.�ALWAYS_EXCLUDE�DEFAULT_EXCLUDE�where�exclude�includerc	��|xs|j}t|jtt	|��tg|j�|���t|���S)aFReturn a list of all Python items (packages or modules, depending on
        the finder implementation) found within directory 'where'.

        'where' is the root directory which will be searched.
        It should be supplied as a "cross-platform" (i.e. URL-style) path;
        it will be converted to the appropriate local path syntax.

        'exclude' is a sequence of names to exclude; '*' can be used
        as a wildcard in the names.
        When finding packages, 'foo.*' will exclude all subpackages of 'foo'
        (but not 'foo' itself).

        'include' is a sequence of names to include.
        If it's specified, only the named items will be included.
        If it's not specified, all found items will be included.
        'include' can contain shell style wildcard patterns just like
        'exclude'.
        )r;�list�
_find_iterrr5rr:��clsr<r=r>s    r�findz_Finder.findbsW��4�0�S�0�0����N�N��S��Z�(��6��+�+�6�g�6���!�
�
�	
rc��t�r)�NotImplementedErrorrBs    rrAz_Finder._find_iter�s��!�!rN)�.r7)�*)r1r2r3r4r:rr5�__annotations__r;�classmethod�_Pathr	rrDr�StrIterrAr7rrr9r9\s���J�&(�N�E�#�s�(�O�(�')�O�U�3��8�_�)���!#�!'�	 
�� 
��#�� 
��#��	 
�

�c�� 
�� 
�D�"�u�"�w�"��"�W�"��"rr9c	�T�eZdZdZdZededededefd��Z	e
ded	edefd
��Z
y)�
PackageFinderzI
    Generate a list of all Python packages found within a directory
    )�ez_setupz*__pycache__r<r=r>rc#��K�tjt|�d��D]�\}}}|dd}g|dd|D]�}tjj	||�}	tjj|	|�}
|
j
tjjd�}d|vs|j|	|�s��||�r||�s|��|�d�|vs|�d�|vr��|j|�����y�w)zy
        All the packages found in 'where' that pass the 'include' filter, but
        not the 'exclude' filter.
        T)�followlinksNrGrH�.*)
r�walkr5r�join�relpath�replace�sep�_looks_like_package�append)rCr<r=r>�root�dirs�files�all_dirs�dir�	full_path�rel_path�packages            rrAzPackageFinder._find_iter�s�����"$����U���!F��D�$���A�w�H��D��G����G�G�L�L��s�3�	��7�7�?�?�9�e�<��"�*�*�2�7�7�;�;��<���#�:�S�%<�%<�Y��%P���7�#�G�G�,<�!�M��Y�a�=�G�+�'��"�~��/H�����C� �' �"G�s�C1C3r�
_package_namec�|�tjjtjj|d��S)z%Does a directory look like a package?�__init__.py)rr�isfilerT)rrbs  rrXz!PackageFinder._looks_like_package�s&���w�w�~�~�b�g�g�l�l�4��?�@�@rN)r1r2r3r4r:rJrKrrLrA�staticmethodr5r6rXr7rrrNrN�sj���2�N��!�u�!�w�!��!�W�!��!�>�A�%�A��A��A��ArrNc�*�eZdZedededefd��Zy)�PEP420PackageFinder�_pathrbrc��y)NTr7)rirbs  rrXz'PEP420PackageFinder._looks_like_package�s��rN)r1r2r3rfrKr5r6rXr7rrrhrh�s)����5�������rrhc	�B�eZdZdZededededefd��Ze	e
�Zy)�ModuleFinderzYFind isolated Python modules.
    This function will **not** recurse subdirectories.
    r<r=r>rc#�6K�ttjj|d��D]i}tjj	tjj|��\}}|j
|�s�T||�s�]||�r�f|���ky�w)Nz*.py)rrrrT�splitextr�_looks_like_module)rCr<r=r>�file�module�_exts       rrAzModuleFinder._find_iter�sn����������e�V�4�5�D��7�7�+�+�B�G�G�,<�,<�T�,B�C�L�F�D��)�)�&�1���v��w�v����6�s�BB�	B�BN)r1r2r3r4rJrKrrLrArfrror7rrrlrl�sD�����u��w����W����&�k�2�rrlc�Z�eZdZdZeed�eD���Z	edede	de
fd��Zy)�FlatLayoutPackageFinder)#�ci�bin�debian�doc�docs�
documentation�manpages�news�
newsfragments�	changelog�test�tests�	unit_test�
unit_tests�example�examples�scripts�tools�util�utils�python�build�dist�venv�env�requirements�tasks�fabfile�
site_scons�	benchmark�
benchmarks�exercise�	exercises�htmlcov�[._]*c#�*K�|]}||�d�f���
y�w)rRNr7)r)�ps  rr+z!FlatLayoutPackageFinder.<genexpr>�s����&G�h���a�S��8�}�h�s�ri�package_namerc��|jd�}|dj�xs|djd�}|xrtd�|ddD��S)NrGr�-stubsc3�<K�|]}|j����y�wr)r)r)�names  rr+z>FlatLayoutPackageFinder._looks_like_package.<locals>.<genexpr>s����(S����):�):�)<��s��)�splitr�endswith�all)rir��names�root_pkg_is_valids    rrXz+FlatLayoutPackageFinder._looks_like_packagesU���"�"�3�'��!�!�H�1�1�3�R�u�Q�x�7H�7H��7R�� �S�S�(S��q�r��(S�%S�SrN)r1r2r3�_EXCLUDE�tuple�
chain_iterr;rfrKr5r6rXr7rrrtrt�sP��'�H�R�J�&G�h�&G�G�H�O� ��T�5�T��T��T��Trrtc��eZdZdZy)�FlatLayoutModuleFinder)�setup�conftestrr�r�r�r��toxfile�noxfile�pavement�dodor�r�z[Ss][Cc]onstruct�	conanfile�manager�r�r�r�r�N)r1r2r3r;r7rrr�r�	s���O�4*rr��root_pkg�pkg_dirc��tj|�}|g|D�cgc]}dj||f���c}zScc}w)NrG)rhrDrT)r�r��nested�ns    r�_find_packages_withinr�'s>��
 �
%�
%�g�
.�F��:�&�A�&�Q����8�Q�-�0�&�A�A�A��As�;c��eZdZdZdd�Zd�Zd�Zedefd��Z	ede
eeffd��Zdd�Z
d	edefd
�Zd	edefd�Zdefd�Zdefd
�Zdefd�Zdefd�Zdefd�Zdeedefd�Zd�Zdeefd�Zdeefd�Zy)�ConfigDiscoveryz�Fill-in metadata and options that can be automatically derived
    (from other metadata/options, the file system or conventions)
    c�<�||_d|_d|_d|_y)NF)r��_called�	_disabled�_skip_ext_modules)r$�distributions  rr%zConfigDiscovery.__init__1s�� ��	�������!&��rc��d|_y)z+Internal API to disable automatic discoveryTN)r��r$s r�_disablezConfigDiscovery._disable7s	����rc��d|_y)a�Internal API to disregard ext_modules.

        Normally auto-discovery would not be triggered if ``ext_modules`` are set
        (this is done for backward compatibility with existing packages relying on
        ``setup.py`` or ``setup.cfg``). However, ``setuptools`` can call this function
        to ignore given ``ext_modules`` and proceed with the auto-discovery if
        ``packages`` and ``py_modules`` are not given (e.g. when using pyproject.toml
        metadata).
        TN)r�r�s r�_ignore_ext_modulesz#ConfigDiscovery._ignore_ext_modules;s��"&��rrc�R�|jjxstjSr)r��src_rootr�curdirr�s r�	_root_dirzConfigDiscovery._root_dirGs���y�y�!�!�.�R�Y�Y�.rc�^�|jj�iS|jjSr)r��package_dirr�s r�_package_dirzConfigDiscovery._package_dirLs'���9�9� � �(��I��y�y�$�$�$rc��|dur|js|jry|j|�|r|j�d|_y)a�Automatically discover missing configuration fields
        and modifies the given ``distribution`` object in-place.

        Note that by default this will only have an effect the first time the
        ``ConfigDiscovery`` object is called.

        To repeatedly invoke automatic discovery (e.g. when the project
        directory changes), please use ``force=True`` (or create a new
        ``ConfigDiscovery`` instance).
        FNT)r�r��_analyse_package_layout�analyse_name)r$�forcer��ignore_ext_moduless    rr.zConfigDiscovery.__call__Rs?���E�>�t�|�|�t�~�~���$�$�%7�8��������rr�c�(�|xs|j}|jjduxs|}|jjduxsL|jjduxs2|xs.t|jd�xr|jjS)zF``True`` if the user has specified some form of package/module listingN�
configuration)r�r��ext_modules�packages�
py_modules�hasattrr�)r$r�r�s   r�_explicitly_specifiedz%ConfigDiscovery._explicitly_specifiedgs���/�I�4�3I�3I���9�9�0�0�D�8�N�<N�O���I�I���d�*�
(��y�y�#�#�4�/�
(��
(��t�y�y�/�2�(��	�	�'�'�	
rc��|j|�rytjd�|j�xs"|j	�xs|j�S)NTzLNo `packages` or `py_modules` configuration, performing automatic discovery.)r�r�debug�_analyse_explicit_layout�_analyse_src_layout�_analyse_flat_layout)r$r�s  rr�z'ConfigDiscovery._analyse_package_layoutts^���%�%�&8�9���	�	�
#�	
�
�)�)�+�
+��'�'�)�
+��(�(�*�		
rc�|��|jj�}|jdd�|j�|syt	j
d|���t
�fd�|j�D��}t|�|j_
t	j
d|jj���y)zAThe user can explicitly give a package layout via ``package_dir``�NFz(`explicit-layout` detected -- analysing c3�x�K�|]1\}}t|tjj�|�����3y�wr)r�rrrT)r)�pkg�
parent_dir�root_dirs   �rr+z;ConfigDiscovery._analyse_explicit_layout.<locals>.<genexpr>�s3�����
�#6���Z�
"�#�r�w�w�|�|�H�j�'I�J�#6�s�7:�discovered packages -- T)r��copy�popr�rr�r��itemsr@r�r�)r$r��pkgsr�s   @rr�z(ConfigDiscovery._analyse_explicit_layout�s�����'�'�,�,�.������D�!��>�>�����	�	�<�[�M�J�K��
�#.�#4�#4�#6�
�
��"�$�Z��	�	���	�	�+�D�I�I�,>�,>�+?�@�A�rc��|j}tjj|j|jdd��}tjj
|�sytjd|���|jdtjj|��||j_tj|�|j_t j|�|j_tjd|jj���tjd|jj"���y)a�Try to find all packages or modules under the ``src`` directory
        (or anything pointed by ``package_dir[""]``).

        The "src-layout" is relatively safe for automatic discovery.
        We assume that everything within is meant to be included in the
        distribution.

        If ``package_dir[""]`` is not given, but the ``src`` directory exists,
        this function will set ``package_dir[""] = "src"``.
        r��srcFz#`src-layout` detected -- analysing r��discovered py_modules -- T)r�rrrTr��get�isdirrr��
setdefaultrr�r�rhrDr�rlr�)r$r��src_dirs   rr�z#ConfigDiscovery._analyse_src_layout�s����'�'���'�'�,�,�t�~�~�{���r�5�/I�J���w�w�}�}�W�%���	�	�7��y�A�B����r�2�7�7�#3�#3�G�#<�=� +��	�	��0�5�5�g�>��	�	��+�0�0��9��	�	���	�	�+�D�I�I�,>�,>�+?�@�A��	�	�-�d�i�i�.B�.B�-C�D�E�rc��tjd|j���|j�xs|j	�S)a�Try to find all packages and modules under the project root.

        Since the ``flat-layout`` is more dangerous in terms of accidentally including
        extra files/directories, this function is more conservative and will raise an
        error if multiple packages or modules are found.

        This assumes that multi-package dists are uncommon and refuse to support that
        use case in order to be able to prevent unintended errors.
        z$`flat-layout` detected -- analysing )rr�r��_analyse_flat_packages�_analyse_flat_modulesr�s rr�z$ConfigDiscovery._analyse_flat_layout�s:��	�	�	�8����8H�I�J��*�*�,�L��0J�0J�0L�Lrc�@�tj|j�|j_tt
|jj��}tjd|jj���|j|d�t|�S)Nr�r�)rtrDr�r�r��remove_nested_packages�remove_stubsrr��_ensure_no_accidental_inclusionr6)r$�	top_levels  rr�z&ConfigDiscovery._analyse_flat_packages�so��4�9�9�$�.�.�I��	�	��*�<��	�	�8J�8J�+K�L�	��	�	�+�D�I�I�,>�,>�+?�@�A��,�,�Y�
�C��I��rc�@�tj|j�|j_tjd|jj���|j|jjd�t|jj�S)Nr��modules)	r�rDr�r�r�rr�r�r6r�s rr�z%ConfigDiscovery._analyse_flat_modules�sk��5�:�:�4�>�>�J��	�	���	�	�-�d�i�i�.B�.B�-C�D�E��,�,�T�Y�Y�-A�-A�9�M��D�I�I�(�(�)�)r�detected�kindc�l�t|�dkDr&ddlm}ddlm}d|�d|�d|�d�}|||���y)	Nr�r)�cleandoc)�PackageDiscoveryErrorzMultiple top-level z discovered in a flat-layout: z�.

            To avoid accidental inclusion of unwanted files or directories,
            setuptools will not proceed with this build.

            If you are trying to create a single distribution with multiple a�
            on purpose, you should not rely on automatic discovery.
            Instead, consider the following options:

            1. set up custom discovery (`find` directive with `include` or `exclude`)
            2. use a `src-layout`
            3. explicitly set `py_modules` or `packages` with a list of names

            To find more information, look for "package discovery" on setuptools docs.
            )�len�inspectr��setuptools.errorsr�)r$r�r�r�r��msgs      rr�z/ConfigDiscovery._ensure_no_accidental_inclusion�sU���x�=�1��(�?�)�$��/M�h�Z�XM�
NR�F�	S
��C�(���
�6�6�)rc��|jjjs|jjrytjd�|j�xs|j
�}|r||jj_yy)z�The packages/modules are the essential contribution of the author.
        Therefore the name of the distribution can be derived from them.
        Nz7No `name` configuration, performing automatic discovery)r��metadatar�rr��#_find_name_single_package_or_module�_find_name_from_packages)r$r�s  rr�zConfigDiscovery.analyse_name�sq���9�9���"�"�d�i�i�n�n���	�	�K�L�
�4�4�6�
/��,�,�.�	
��&*�D�I�I���#�rc��dD]P}t|j|d�xsg}|s�!t|�dk(s�0tjd|d���|dcSy)zExactly one module or package)r�r�Nr�z&Single module/package detected, name: r)�getattrr�r�rr�)r$�fieldr�s   rrz3ConfigDiscovery._find_name_single_package_or_module�sV��/�E��D�I�I�u�d�3�9�r�E���U��q���	�	�B�5��8�*�M�N��Q�x��	0�rc�R�|jjsytt|jjt���}|jj
xsi}t
|||j�}|rtjd|���|Stjd�y)z<Try to find the root package that is not a PEP 420 namespaceN��keyz&Common parent package detected, name: z7No parent package detected, impossible to derive `name`)r�r�r��sortedr�r��find_parent_packager�rr��warn)r$r�r��
parent_pkgs    rrz(ConfigDiscovery._find_name_from_packages�s����y�y�!�!����t�y�y�'9�'9�s� C�D���i�i�+�+�1�r��(��;����O�
���I�I�>�z�l�K�L������J�K�rN)r�r)FTF)r1r2r3r4r%r�r��propertyrKr�rr5r�r.r6r�r�r�r�r�r�r�rr�r�r
rrr7rrr�r�,s����'��
&��/�5�/��/��%�d�3��8�n�%��%�
�*
��
��
�
�$�
�4�
�$�$��$�T��2M�d�M����*�t�*�7��S�	�7��7�.+�"�X�c�]���(�3�-�rr�r�c����t|t��}|dd}t|�}tt|��D]1\}�t	�fd�|D��s�|j||z
dz
��3|S)z�Remove nested packages from a list of packages.

    >>> remove_nested_packages(["a", "a.b1", "a.b2", "a.b1.c1"])
    ['a']
    >>> remove_nested_packages(["a", "b", "c.d", "c.d.e.f", "g.h", "a.a1"])
    ['a', 'b', 'c.d', 'g.h']
    r	Nc3�F�K�|]}�j|�d�����y�w�rGN��
startswith)r)�otherr�s  �rr+z)remove_nested_packages.<locals>.<genexpr>s!�����C���t���%���{�+����!r�)rr��	enumerate�reversedr,r�)r�r�r��size�ir�s     @rr�r�sd����(��$�D��Q��I��t�9�D��X�d�^�,���4��C��C�C��M�M�$��(�Q�,�'�-��rc�t�|D�cgc](}|jd�djd�r�'|��*c}Scc}w)z�Remove type stubs (:pep:`561`) from a list of packages.

    >>> remove_stubs(["a", "a.b", "a-stubs", "a-stubs.b.c", "b", "c-stubs"])
    ['a', 'a.b', 'b']
    rGrr�)r�r�)r�r�s  rr�r� s6��$�P�8�C�3�9�9�S�>�!�+<�+E�+E�h�+O�C�8�P�P��Ps�(5�5r�r�c�Z��t|t��}g}t|�D]2\}�t�fd�||dzdD��sn|j	���4|D]R�t�||�}tjj|d�}tjj|�s�P�cSy)z0Find the parent package that is not a namespace.r	c3�F�K�|]}|j��d�����y�wrr)r)r�r�s  �rr+z&find_parent_package.<locals>.<genexpr>0s#�����G�5F��1�<�<�4�&��
�+�5F�rr�Nrd)
rr�rr�rY�find_package_pathrrrTre)r�r�r��common_ancestorsr�pkg_path�initr�s       @rrr)s�����h�C�(�H����X�&���4��G�X�a�!�e�g�5F�G�G�

�����%�'�!��$�T�;��A���w�w�|�|�H�m�4��
�7�7�>�>�$���K�	!�rr�c�l�|jd�}tt|�dd�D]E}dj|d|�}||vs�||}t	j
j||g||d���cS|j
d�xsd}t	j
j|g|jd��|���S)a�Given a package name, return the path where it should be found on
    disk, considering the ``package_dir`` option.

    >>> path = find_package_path("my.pkg", {"": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested/my/pkg'

    >>> path = find_package_path("my.pkg", {"my": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested/pkg'

    >>> path = find_package_path("my.pkg", {"my.pkg": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested'

    >>> path = find_package_path("other.pkg", {"my.pkg": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './other/pkg'
    rGr���Nr��/)r��ranger�rTrrr�)r�r�r��partsr�partial_name�parents       rrrAs���,
�J�J�s�O�E�
�3�u�:�q�"�
%���x�x��b�q�	�*���;�&� ��.�F��7�7�<�<��&�=�5���9�=�=�&��_�_�R�
 �
&�B�F�
�7�7�<�<��=�6�<�<��#4�=�u�=�=r�package_pathc
��t|�}t|�j}|D�cic]'}|djg|�|j	d�����)c}Scc}w)Nr$rG)r�rr&rTr�)r�r)�parent_pkgs�prefixr�s     r�construct_package_dirr-csU��(��2�K�
�,�
�
%�
%�F�AL�M��#�C����4�F�4�S�Y�Y�s�^�4�5�5��M�M��Ms�,A)1r4�	itertoolsr�fnmatchrr�pathlibr�typingrrr	r
rrr
rr�_distutils_hack.override�_distutils_hack�	distutilsr�distutils.utilrr5�PathLikerKrL�chain�
from_iterabler��
setuptoolsrr6rrr9rNrhrlrtr�r�r�r�r�rrr-r7rr�<module>r:s���%�N�	����
�
�
� ��'�
�c�2�;�;����
�3�-��
�_�_�
*�
*�
��'�1�e�1��1�

&�
&� +"�+"�\*A�G�*A�Z�-��3�7�3�.2T�1�2T�j*�\�*�<B�C�B�%�B�D��I�B�
_�_�D�T�#�Y��4��9��$Q�4��9�Q��c��Q���3�i��&-�c�3�h�&7��CH��
�c�]��0>�

�>�#�C��H�-�>�9>�>��>�DN�D��I�N�U�N�t�C�QT�H�~�Nrpython3.12/site-packages/setuptools/__pycache__/_imp.cpython-312.pyc000064400000007050151732703760021206 0ustar00�

��_i�	��\�dZddlZddlZddlZddlmZdZdZdZdZ	dZ
d	�Zd
d
�Zd
d�Z
d�Zy)zX
Re-implementation of find_module and get_frozen_object
from the deprecated imp module.
�N)�module_from_spec�����c��t|t�r(tjj	�j
ntjj
}|||�S�N)�
isinstance�list�	importlib�	machinery�
PathFinder�	find_spec�util)�module�paths�finders   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_imp.pyrrsI���e�T�"�	���&�&�(�2�2�
�^�^�
%�
%��
�&�%� � �c��t||�}|�td|z��|js6t|d�r*tj
j
d|j�}d}d}t|jt�}|jdk(s0|r<t|jtjj�rt}d}dx}}�n/|jdk(s0|r;t|jtjj�r
t }d}dx}}n�|jr�|j}t"j$j'|�d	}|tjj(vrd
nd}|tjj(vrt*}nE|tjj,vrt.}n"|tjj0vrt2}|t*t.hvrt5||�}nd}dx}}|||||ffS)z7Just like 'imp.find_module()', but with package supportN�
Can't find %s�submodule_search_locationsz__init__.py����frozen�zbuilt-inr�r�rb)r�ImportError�has_location�hasattrr
r�spec_from_loader�loaderr�type�origin�
issubclassr�FrozenImporter�	PY_FROZEN�BuiltinImporter�	C_BUILTIN�os�path�splitext�SOURCE_SUFFIXES�	PY_SOURCE�BYTECODE_SUFFIXES�PY_COMPILED�EXTENSION_SUFFIXES�C_EXTENSION�open)	rr�spec�kind�file�staticr,�suffix�modes	         r�find_moduler;s����V�U�#�D��|��/�F�2�3�3������/K�!L��~�~�.�.�}�d�k�k�J��
�D��D�
����T�
*�F����x����t�{�{�I�$7�$7�$F�$F�G������������z�!���t�{�{�I�$7�$7�$G�$G�H���������	
�	�	��{�{�����!�!�$�'��*���	� 3� 3� C� C�C�s����Y�(�(�8�8�8��D�
�y�*�*�<�<�
<��D�
�y�*�*�=�=�
=��D��I�{�+�+���d�#�D�����������d�+�+�+rc�p�t||�}|std|z��|jj|�S�Nr)rrr#�get_code)rrr5s   r�get_frozen_objectr?Ms6���V�U�#�D���/�F�2�3�3��;�;����'�'rc�P�t||�}|std|z��t|�Sr=)rrr)rr�infor5s    r�
get_modulerBTs,���V�U�#�D���/�F�2�3�3��D�!�!rr
)�__doc__r+�importlib.utilr
�importlib.machineryrr/r1r3r*r(rr;r?rB�rr�<module>rGsH���

���+�
�	�����
�	�
�	�!�-,�`(�"rpython3.12/site-packages/setuptools/__pycache__/_normalization.cpython-312.pyc000064400000013544151732703760023314 0ustar00�

��_iv���dZddlZddlmZddlmZddlmZeeefZ	ejdej�Zejdej�Z
ejd	ej�Zejd
ej�Zdedefd
�Zdedefd�Zdedefd�Zdedefd�Zdedefd�Zdedefd�Zdedefd�Zdedefd�Zy)zZ
Helpers for normalization as expected in wheel/sdist/module file names
and core metadata
�N)�Path)�Union�)�	packagingz)^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$z[^A-Z0-9.]+z
[^A-Z0-9]+z,^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)�name�returnc�X�tjdd|�}|j�sJ�|S)z�Make a string safe to be used as Python identifier.
    >>> safe_identifier("12abc")
    '_12abc'
    >>> safe_identifier("__editable__.myns.pkg-78.9.3_local")
    '__editable___myns_pkg_78_9_3_local'
    z
\W|^(?=\d)�_)�re�sub�isidentifier)r�safes  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_normalization.py�safe_identifierrs-���6�6�-��d�+�D��������K��	componentc�.�tjd|�S)z�Escape a component used as a project name according to Core Metadata.
    >>> safe_name("hello world")
    'hello-world'
    >>> safe_name("hello?world")
    'hello-world'
    �-)�_UNSAFE_NAME_CHARSr)rs r�	safe_namer s���!�!�#�y�1�1r�versionc�:�|jdd�}	ttjj	|��S#tjj
$rAtjd|�}ttjj	|��cYSwxYw)a
Convert an arbitrary string into a valid version string.
    Can still raise an ``InvalidVersion`` exception.
    To avoid exceptions use ``best_effort_version``.
    >>> safe_version("1988 12 25")
    '1988.12.25'
    >>> safe_version("v0.2.1")
    '0.2.1'
    >>> safe_version("v0.2?beta")
    '0.2b0'
    >>> safe_version("v0.2 beta")
    '0.2b0'
    >>> safe_version("ubuntu lts")
    Traceback (most recent call last):
    ...
    setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'ubuntu.lts'
    � �.r)�replace�strrr�Version�InvalidVersionrr)r�v�attempts   r�safe_versionr!+s~��"	����S�!�A�7��9�$�$�,�,�Q�/�0�0�����+�+�7�$�(�(��a�0���9�$�$�,�,�W�5�6�6�7�s�'<�AB�Bc�t�	t|�S#tjj$r�|j	dd�}t
j
|�}|r|d}|t|�d}nd}|}tjd|�jd�}d|��jd�}t|�d|���cYSwxYw)a�Convert an arbitrary string into a version-like string.
    Fallback when ``safe_version`` is not safe enough.
    >>> best_effort_version("v0.2 beta")
    '0.2b0'
    >>> best_effort_version("ubuntu lts")
    '0.dev0+sanitized.ubuntu.lts'
    >>> best_effort_version("0.23ubuntu1")
    '0.23.dev0+sanitized.ubuntu1'
    >>> best_effort_version("0.23-")
    '0.23.dev0+sanitized'
    >>> best_effort_version("0.-_")
    '0.dev0+sanitized'
    >>> best_effort_version("42.+?1")
    '42.dev0+sanitized.1'
    rrrN�0z
sanitized.z.dev0+)r!rrrr�_PEP440_FALLBACK�search�len�_NON_ALPHANUMERICr�strip)rr�matchr�rest�	safe_rest�locals       r�best_effort_versionr-Ds���"
4��G�$�$�����+�+�4��O�O�C��%�� �'�'��*�����=�D��S��Y�[�>�D��D��D�%�)�)�#�t�4�:�:�3�?�	��Y�K�(�.�.�s�3���t�f�F�5�'�2�3�3�4�s�

�B'B7�6B7�extrac�h�tjd|�jd�j�S)z�Normalize extra name according to PEP 685
    >>> safe_extra("_FrIeNdLy-._.-bArD")
    'friendly-bard'
    >>> safe_extra("FrIeNdLy-._.-bArD__._-")
    'friendly-bard'
    r)r'rr(�lower)r.s r�
safe_extrar1es+��� � ��e�,�2�2�3�7�=�=�?�?r�valuec�D�|jdd�jd�S)z�Normalize each component of a filename (e.g. distribution/version part of wheel)
    Note: ``value`` needs to be already normalized.
    >>> filename_component("my-pkg")
    'my_pkg'
    rr
)rr(�r2s r�filename_componentr5os ���=�=��c�"�(�(��-�-rc�*�tt|��S)zBLike ``safe_name`` but can be used as filename component for wheel)r5rr4s r�
safer_namer7xs���i��.�/�/rc�*�tt|��S)zLLike ``best_effort_version`` but can be used as filename component for wheel)r5r-r4s r�safer_best_effort_versionr9~s���1�%�8�9�9r)�__doc__r�pathlibr�typingr�externrr�_Path�compile�I�_VALID_NAMErr'r$rrr!r-r1r5r7r9�rr�<module>rCs!���
����
�c�4�i����b�j�j�E�r�t�t�L���R�Z�Z�����5���B�J�J�}�b�d�d�3���2�:�:�M�r�t�t�T��	�#�	�#�	�2��2��2�7�#�7�#�7�24��4��4�B@�c�@�c�@�.�c�.�c�.�0�c�0�c�0�:�S�:�S�:rpython3.12/site-packages/setuptools/__pycache__/py312compat.cpython-312.pyc000064400000001551151732703760022344 0ustar00�

��_iJ���ddlZddlZdd�Zy)�Nc���tjdk\rtj||���S�fd�}tj|||��S)N)��)�onexcc����|||d�S)N��)�fn�path�excinfors   ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/py312compat.py�_handlerzshutil_rmtree.<locals>._handler	s����R��w�q�z�*�*�)�onerror)�sys�version_info�shutil�rmtree)r�
ignore_errorsrrs  ` r
�
shutil_rmtreers>���
���7�"��}�}�T�=��>�>�+��=�=��}�h�?�?r)FN)rrrr	rr
�<module>rs��
�
�@rpython3.12/site-packages/setuptools/__pycache__/_reqs.cpython-312.pyc000064400000003577151732703760021405 0ustar00�

��_i`���UddlmZddlmZmZmZmZmZmZddl	m
cmcmZddl
mZed�ZeeeefZe�e�Zeegefed<dedeefd	�Zededeefd
��Zededeegefdeefd��Zefd
�Zy)�)�	lru_cache)�Callable�Iterable�Iterator�TypeVar�Union�overloadN)�Requirement�_T�	parse_req�strs�returnc��tjttjtj|���S)z�
    Yield requirement strings for each specification in `strs`.

    `strs` must be a string, or a (possibly-nested) iterable thereof.
    )�text�join_continuation�map�drop_comment�yield_lines�r
s ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_reqs.py�
parse_stringsrs-���!�!�#�d�&7�&7��9I�9I�$�9O�"P�Q�Q�c��y�N�rs r�parser���r�parserc��yrr�r
rs  rrrrrc�,�t|t|��S)zW
    Replacement for ``pkg_resources.parse_requirements`` that uses ``packaging``.
    )rrr s  rrr$s���v�}�T�*�+�+r)�	functoolsr�typingrrrrrr	�setuptools.extern.jaraco.text�extern�jaracor�(setuptools.extern.packaging.requirementsr
r�str�
_StrOrIterr�__annotations__rrrrr�<module>r+s����I�I�,�,�@��T�]��
�3���
�%�
&�
�+6�)�+�k�*B�	�8�S�E�;�&�'�B�R�
�R�x��}�R�
��
��x��4��
��
��
��H�c�U�B�Y�$7��H�R�L��
��!�,rpython3.12/site-packages/setuptools/py312compat.py000064400000000512151732703760015777 0ustar00import sys
import shutil


def shutil_rmtree(path, ignore_errors=False, onexc=None):
    if sys.version_info >= (3, 12):
        return shutil.rmtree(path, ignore_errors, onexc=onexc)

    def _handler(fn, path, excinfo):
        return onexc(fn, path, excinfo[1])

    return shutil.rmtree(path, ignore_errors, onerror=_handler)
python3.12/site-packages/setuptools/discovery.py000064400000051233151732703770015733 0ustar00"""Automatic discovery of Python modules and packages (for inclusion in the
distribution) and other config values.

For the purposes of this module, the following nomenclature is used:

- "src-layout": a directory representing a Python project that contains a "src"
  folder. Everything under the "src" folder is meant to be included in the
  distribution when packaging the project. Example::

    .
    ├── tox.ini
    ├── pyproject.toml
    └── src/
        └── mypkg/
            ├── __init__.py
            ├── mymodule.py
            └── my_data_file.txt

- "flat-layout": a Python project that does not use "src-layout" but instead
  have a directory under the project root for each package::

    .
    ├── tox.ini
    ├── pyproject.toml
    └── mypkg/
        ├── __init__.py
        ├── mymodule.py
        └── my_data_file.txt

- "single-module": a project that contains a single Python script direct under
  the project root (no directory used)::

    .
    ├── tox.ini
    ├── pyproject.toml
    └── mymodule.py

"""

import itertools
import os
from fnmatch import fnmatchcase
from glob import glob
from pathlib import Path
from typing import (
    TYPE_CHECKING,
    Dict,
    Iterable,
    Iterator,
    List,
    Mapping,
    Optional,
    Tuple,
    Union,
)

import _distutils_hack.override  # noqa: F401

from distutils import log
from distutils.util import convert_path

_Path = Union[str, os.PathLike]
StrIter = Iterator[str]

chain_iter = itertools.chain.from_iterable

if TYPE_CHECKING:
    from setuptools import Distribution  # noqa


def _valid_name(path: _Path) -> bool:
    # Ignore invalid names that cannot be imported directly
    return os.path.basename(path).isidentifier()


class _Filter:
    """
    Given a list of patterns, create a callable that will be true only if
    the input matches at least one of the patterns.
    """

    def __init__(self, *patterns: str):
        self._patterns = dict.fromkeys(patterns)

    def __call__(self, item: str) -> bool:
        return any(fnmatchcase(item, pat) for pat in self._patterns)

    def __contains__(self, item: str) -> bool:
        return item in self._patterns


class _Finder:
    """Base class that exposes functionality for module/package finders"""

    ALWAYS_EXCLUDE: Tuple[str, ...] = ()
    DEFAULT_EXCLUDE: Tuple[str, ...] = ()

    @classmethod
    def find(
        cls,
        where: _Path = '.',
        exclude: Iterable[str] = (),
        include: Iterable[str] = ('*',),
    ) -> List[str]:
        """Return a list of all Python items (packages or modules, depending on
        the finder implementation) found within directory 'where'.

        'where' is the root directory which will be searched.
        It should be supplied as a "cross-platform" (i.e. URL-style) path;
        it will be converted to the appropriate local path syntax.

        'exclude' is a sequence of names to exclude; '*' can be used
        as a wildcard in the names.
        When finding packages, 'foo.*' will exclude all subpackages of 'foo'
        (but not 'foo' itself).

        'include' is a sequence of names to include.
        If it's specified, only the named items will be included.
        If it's not specified, all found items will be included.
        'include' can contain shell style wildcard patterns just like
        'exclude'.
        """

        exclude = exclude or cls.DEFAULT_EXCLUDE
        return list(
            cls._find_iter(
                convert_path(str(where)),
                _Filter(*cls.ALWAYS_EXCLUDE, *exclude),
                _Filter(*include),
            )
        )

    @classmethod
    def _find_iter(cls, where: _Path, exclude: _Filter, include: _Filter) -> StrIter:
        raise NotImplementedError


class PackageFinder(_Finder):
    """
    Generate a list of all Python packages found within a directory
    """

    ALWAYS_EXCLUDE = ("ez_setup", "*__pycache__")

    @classmethod
    def _find_iter(cls, where: _Path, exclude: _Filter, include: _Filter) -> StrIter:
        """
        All the packages found in 'where' that pass the 'include' filter, but
        not the 'exclude' filter.
        """
        for root, dirs, files in os.walk(str(where), followlinks=True):
            # Copy dirs to iterate over it, then empty dirs.
            all_dirs = dirs[:]
            dirs[:] = []

            for dir in all_dirs:
                full_path = os.path.join(root, dir)
                rel_path = os.path.relpath(full_path, where)
                package = rel_path.replace(os.path.sep, '.')

                # Skip directory trees that are not valid packages
                if '.' in dir or not cls._looks_like_package(full_path, package):
                    continue

                # Should this package be included?
                if include(package) and not exclude(package):
                    yield package

                # Early pruning if there is nothing else to be scanned
                if f"{package}*" in exclude or f"{package}.*" in exclude:
                    continue

                # Keep searching subdirectories, as there may be more packages
                # down there, even if the parent was excluded.
                dirs.append(dir)

    @staticmethod
    def _looks_like_package(path: _Path, _package_name: str) -> bool:
        """Does a directory look like a package?"""
        return os.path.isfile(os.path.join(path, '__init__.py'))


class PEP420PackageFinder(PackageFinder):
    @staticmethod
    def _looks_like_package(_path: _Path, _package_name: str) -> bool:
        return True


class ModuleFinder(_Finder):
    """Find isolated Python modules.
    This function will **not** recurse subdirectories.
    """

    @classmethod
    def _find_iter(cls, where: _Path, exclude: _Filter, include: _Filter) -> StrIter:
        for file in glob(os.path.join(where, "*.py")):
            module, _ext = os.path.splitext(os.path.basename(file))

            if not cls._looks_like_module(module):
                continue

            if include(module) and not exclude(module):
                yield module

    _looks_like_module = staticmethod(_valid_name)


# We have to be extra careful in the case of flat layout to not include files
# and directories not meant for distribution (e.g. tool-related)


class FlatLayoutPackageFinder(PEP420PackageFinder):
    _EXCLUDE = (
        "ci",
        "bin",
        "debian",
        "doc",
        "docs",
        "documentation",
        "manpages",
        "news",
        "newsfragments",
        "changelog",
        "test",
        "tests",
        "unit_test",
        "unit_tests",
        "example",
        "examples",
        "scripts",
        "tools",
        "util",
        "utils",
        "python",
        "build",
        "dist",
        "venv",
        "env",
        "requirements",
        # ---- Task runners / Build tools ----
        "tasks",  # invoke
        "fabfile",  # fabric
        "site_scons",  # SCons
        # ---- Other tools ----
        "benchmark",
        "benchmarks",
        "exercise",
        "exercises",
        "htmlcov",  # Coverage.py
        # ---- Hidden directories/Private packages ----
        "[._]*",
    )

    DEFAULT_EXCLUDE = tuple(chain_iter((p, f"{p}.*") for p in _EXCLUDE))
    """Reserved package names"""

    @staticmethod
    def _looks_like_package(_path: _Path, package_name: str) -> bool:
        names = package_name.split('.')
        # Consider PEP 561
        root_pkg_is_valid = names[0].isidentifier() or names[0].endswith("-stubs")
        return root_pkg_is_valid and all(name.isidentifier() for name in names[1:])


class FlatLayoutModuleFinder(ModuleFinder):
    DEFAULT_EXCLUDE = (
        "setup",
        "conftest",
        "test",
        "tests",
        "example",
        "examples",
        "build",
        # ---- Task runners ----
        "toxfile",
        "noxfile",
        "pavement",
        "dodo",
        "tasks",
        "fabfile",
        # ---- Other tools ----
        "[Ss][Cc]onstruct",  # SCons
        "conanfile",  # Connan: C/C++ build tool
        "manage",  # Django
        "benchmark",
        "benchmarks",
        "exercise",
        "exercises",
        # ---- Hidden files/Private modules ----
        "[._]*",
    )
    """Reserved top-level module names"""


def _find_packages_within(root_pkg: str, pkg_dir: _Path) -> List[str]:
    nested = PEP420PackageFinder.find(pkg_dir)
    return [root_pkg] + [".".join((root_pkg, n)) for n in nested]


class ConfigDiscovery:
    """Fill-in metadata and options that can be automatically derived
    (from other metadata/options, the file system or conventions)
    """

    def __init__(self, distribution: "Distribution"):
        self.dist = distribution
        self._called = False
        self._disabled = False
        self._skip_ext_modules = False

    def _disable(self):
        """Internal API to disable automatic discovery"""
        self._disabled = True

    def _ignore_ext_modules(self):
        """Internal API to disregard ext_modules.

        Normally auto-discovery would not be triggered if ``ext_modules`` are set
        (this is done for backward compatibility with existing packages relying on
        ``setup.py`` or ``setup.cfg``). However, ``setuptools`` can call this function
        to ignore given ``ext_modules`` and proceed with the auto-discovery if
        ``packages`` and ``py_modules`` are not given (e.g. when using pyproject.toml
        metadata).
        """
        self._skip_ext_modules = True

    @property
    def _root_dir(self) -> _Path:
        # The best is to wait until `src_root` is set in dist, before using _root_dir.
        return self.dist.src_root or os.curdir

    @property
    def _package_dir(self) -> Dict[str, str]:
        if self.dist.package_dir is None:
            return {}
        return self.dist.package_dir

    def __call__(self, force=False, name=True, ignore_ext_modules=False):
        """Automatically discover missing configuration fields
        and modifies the given ``distribution`` object in-place.

        Note that by default this will only have an effect the first time the
        ``ConfigDiscovery`` object is called.

        To repeatedly invoke automatic discovery (e.g. when the project
        directory changes), please use ``force=True`` (or create a new
        ``ConfigDiscovery`` instance).
        """
        if force is False and (self._called or self._disabled):
            # Avoid overhead of multiple calls
            return

        self._analyse_package_layout(ignore_ext_modules)
        if name:
            self.analyse_name()  # depends on ``packages`` and ``py_modules``

        self._called = True

    def _explicitly_specified(self, ignore_ext_modules: bool) -> bool:
        """``True`` if the user has specified some form of package/module listing"""
        ignore_ext_modules = ignore_ext_modules or self._skip_ext_modules
        ext_modules = not (self.dist.ext_modules is None or ignore_ext_modules)
        return (
            self.dist.packages is not None
            or self.dist.py_modules is not None
            or ext_modules
            or hasattr(self.dist, "configuration")
            and self.dist.configuration
            # ^ Some projects use numpy.distutils.misc_util.Configuration
        )

    def _analyse_package_layout(self, ignore_ext_modules: bool) -> bool:
        if self._explicitly_specified(ignore_ext_modules):
            # For backward compatibility, just try to find modules/packages
            # when nothing is given
            return True

        log.debug(
            "No `packages` or `py_modules` configuration, performing "
            "automatic discovery."
        )

        return (
            self._analyse_explicit_layout()
            or self._analyse_src_layout()
            # flat-layout is the trickiest for discovery so it should be last
            or self._analyse_flat_layout()
        )

    def _analyse_explicit_layout(self) -> bool:
        """The user can explicitly give a package layout via ``package_dir``"""
        package_dir = self._package_dir.copy()  # don't modify directly
        package_dir.pop("", None)  # This falls under the "src-layout" umbrella
        root_dir = self._root_dir

        if not package_dir:
            return False

        log.debug(f"`explicit-layout` detected -- analysing {package_dir}")
        pkgs = chain_iter(
            _find_packages_within(pkg, os.path.join(root_dir, parent_dir))
            for pkg, parent_dir in package_dir.items()
        )
        self.dist.packages = list(pkgs)
        log.debug(f"discovered packages -- {self.dist.packages}")
        return True

    def _analyse_src_layout(self) -> bool:
        """Try to find all packages or modules under the ``src`` directory
        (or anything pointed by ``package_dir[""]``).

        The "src-layout" is relatively safe for automatic discovery.
        We assume that everything within is meant to be included in the
        distribution.

        If ``package_dir[""]`` is not given, but the ``src`` directory exists,
        this function will set ``package_dir[""] = "src"``.
        """
        package_dir = self._package_dir
        src_dir = os.path.join(self._root_dir, package_dir.get("", "src"))
        if not os.path.isdir(src_dir):
            return False

        log.debug(f"`src-layout` detected -- analysing {src_dir}")
        package_dir.setdefault("", os.path.basename(src_dir))
        self.dist.package_dir = package_dir  # persist eventual modifications
        self.dist.packages = PEP420PackageFinder.find(src_dir)
        self.dist.py_modules = ModuleFinder.find(src_dir)
        log.debug(f"discovered packages -- {self.dist.packages}")
        log.debug(f"discovered py_modules -- {self.dist.py_modules}")
        return True

    def _analyse_flat_layout(self) -> bool:
        """Try to find all packages and modules under the project root.

        Since the ``flat-layout`` is more dangerous in terms of accidentally including
        extra files/directories, this function is more conservative and will raise an
        error if multiple packages or modules are found.

        This assumes that multi-package dists are uncommon and refuse to support that
        use case in order to be able to prevent unintended errors.
        """
        log.debug(f"`flat-layout` detected -- analysing {self._root_dir}")
        return self._analyse_flat_packages() or self._analyse_flat_modules()

    def _analyse_flat_packages(self) -> bool:
        self.dist.packages = FlatLayoutPackageFinder.find(self._root_dir)
        top_level = remove_nested_packages(remove_stubs(self.dist.packages))
        log.debug(f"discovered packages -- {self.dist.packages}")
        self._ensure_no_accidental_inclusion(top_level, "packages")
        return bool(top_level)

    def _analyse_flat_modules(self) -> bool:
        self.dist.py_modules = FlatLayoutModuleFinder.find(self._root_dir)
        log.debug(f"discovered py_modules -- {self.dist.py_modules}")
        self._ensure_no_accidental_inclusion(self.dist.py_modules, "modules")
        return bool(self.dist.py_modules)

    def _ensure_no_accidental_inclusion(self, detected: List[str], kind: str):
        if len(detected) > 1:
            from inspect import cleandoc

            from setuptools.errors import PackageDiscoveryError

            msg = f"""Multiple top-level {kind} discovered in a flat-layout: {detected}.

            To avoid accidental inclusion of unwanted files or directories,
            setuptools will not proceed with this build.

            If you are trying to create a single distribution with multiple {kind}
            on purpose, you should not rely on automatic discovery.
            Instead, consider the following options:

            1. set up custom discovery (`find` directive with `include` or `exclude`)
            2. use a `src-layout`
            3. explicitly set `py_modules` or `packages` with a list of names

            To find more information, look for "package discovery" on setuptools docs.
            """
            raise PackageDiscoveryError(cleandoc(msg))

    def analyse_name(self):
        """The packages/modules are the essential contribution of the author.
        Therefore the name of the distribution can be derived from them.
        """
        if self.dist.metadata.name or self.dist.name:
            # get_name() is not reliable (can return "UNKNOWN")
            return None

        log.debug("No `name` configuration, performing automatic discovery")

        name = (
            self._find_name_single_package_or_module()
            or self._find_name_from_packages()
        )
        if name:
            self.dist.metadata.name = name

    def _find_name_single_package_or_module(self) -> Optional[str]:
        """Exactly one module or package"""
        for field in ('packages', 'py_modules'):
            items = getattr(self.dist, field, None) or []
            if items and len(items) == 1:
                log.debug(f"Single module/package detected, name: {items[0]}")
                return items[0]

        return None

    def _find_name_from_packages(self) -> Optional[str]:
        """Try to find the root package that is not a PEP 420 namespace"""
        if not self.dist.packages:
            return None

        packages = remove_stubs(sorted(self.dist.packages, key=len))
        package_dir = self.dist.package_dir or {}

        parent_pkg = find_parent_package(packages, package_dir, self._root_dir)
        if parent_pkg:
            log.debug(f"Common parent package detected, name: {parent_pkg}")
            return parent_pkg

        log.warn("No parent package detected, impossible to derive `name`")
        return None


def remove_nested_packages(packages: List[str]) -> List[str]:
    """Remove nested packages from a list of packages.

    >>> remove_nested_packages(["a", "a.b1", "a.b2", "a.b1.c1"])
    ['a']
    >>> remove_nested_packages(["a", "b", "c.d", "c.d.e.f", "g.h", "a.a1"])
    ['a', 'b', 'c.d', 'g.h']
    """
    pkgs = sorted(packages, key=len)
    top_level = pkgs[:]
    size = len(pkgs)
    for i, name in enumerate(reversed(pkgs)):
        if any(name.startswith(f"{other}.") for other in top_level):
            top_level.pop(size - i - 1)

    return top_level


def remove_stubs(packages: List[str]) -> List[str]:
    """Remove type stubs (:pep:`561`) from a list of packages.

    >>> remove_stubs(["a", "a.b", "a-stubs", "a-stubs.b.c", "b", "c-stubs"])
    ['a', 'a.b', 'b']
    """
    return [pkg for pkg in packages if not pkg.split(".")[0].endswith("-stubs")]


def find_parent_package(
    packages: List[str], package_dir: Mapping[str, str], root_dir: _Path
) -> Optional[str]:
    """Find the parent package that is not a namespace."""
    packages = sorted(packages, key=len)
    common_ancestors = []
    for i, name in enumerate(packages):
        if not all(n.startswith(f"{name}.") for n in packages[i + 1 :]):
            # Since packages are sorted by length, this condition is able
            # to find a list of all common ancestors.
            # When there is divergence (e.g. multiple root packages)
            # the list will be empty
            break
        common_ancestors.append(name)

    for name in common_ancestors:
        pkg_path = find_package_path(name, package_dir, root_dir)
        init = os.path.join(pkg_path, "__init__.py")
        if os.path.isfile(init):
            return name

    return None


def find_package_path(
    name: str, package_dir: Mapping[str, str], root_dir: _Path
) -> str:
    """Given a package name, return the path where it should be found on
    disk, considering the ``package_dir`` option.

    >>> path = find_package_path("my.pkg", {"": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested/my/pkg'

    >>> path = find_package_path("my.pkg", {"my": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested/pkg'

    >>> path = find_package_path("my.pkg", {"my.pkg": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested'

    >>> path = find_package_path("other.pkg", {"my.pkg": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './other/pkg'
    """
    parts = name.split(".")
    for i in range(len(parts), 0, -1):
        # Look backwards, the most specific package_dir first
        partial_name = ".".join(parts[:i])
        if partial_name in package_dir:
            parent = package_dir[partial_name]
            return os.path.join(root_dir, parent, *parts[i:])

    parent = package_dir.get("") or ""
    return os.path.join(root_dir, *parent.split("/"), *parts)


def construct_package_dir(packages: List[str], package_path: _Path) -> Dict[str, str]:
    parent_pkgs = remove_nested_packages(packages)
    prefix = Path(package_path).parts
    return {pkg: "/".join([*prefix, *pkg.split(".")]) for pkg in parent_pkgs}
python3.12/site-packages/setuptools/archive_util.py000064400000016243151732703770016404 0ustar00"""Utilities for extracting common archive formats"""

import zipfile
import tarfile
import os
import shutil
import posixpath
import contextlib
from distutils.errors import DistutilsError

from ._path import ensure_directory

__all__ = [
    "unpack_archive",
    "unpack_zipfile",
    "unpack_tarfile",
    "default_filter",
    "UnrecognizedFormat",
    "extraction_drivers",
    "unpack_directory",
]


class UnrecognizedFormat(DistutilsError):
    """Couldn't recognize the archive type"""


def default_filter(src, dst):
    """The default progress/filter callback; returns True for all files"""
    return dst


def unpack_archive(filename, extract_dir, progress_filter=default_filter, drivers=None):
    """Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

    `progress_filter` is a function taking two arguments: a source path
    internal to the archive ('/'-separated), and a filesystem path where it
    will be extracted.  The callback must return the desired extract path
    (which may be the same as the one passed in), or else ``None`` to skip
    that file or directory.  The callback can thus be used to report on the
    progress of the extraction, as well as to filter the items extracted or
    alter their extraction paths.

    `drivers`, if supplied, must be a non-empty sequence of functions with the
    same signature as this function (minus the `drivers` argument), that raise
    ``UnrecognizedFormat`` if they do not support extracting the designated
    archive type.  The `drivers` are tried in sequence until one is found that
    does not raise an error, or until all are exhausted (in which case
    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
    drivers, the module's ``extraction_drivers`` constant will be used, which
    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
    order.
    """
    for driver in drivers or extraction_drivers:
        try:
            driver(filename, extract_dir, progress_filter)
        except UnrecognizedFormat:
            continue
        else:
            return
    else:
        raise UnrecognizedFormat("Not a recognized archive type: %s" % filename)


def unpack_directory(filename, extract_dir, progress_filter=default_filter):
    """ "Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    """
    if not os.path.isdir(filename):
        raise UnrecognizedFormat("%s is not a directory" % filename)

    paths = {
        filename: ('', extract_dir),
    }
    for base, dirs, files in os.walk(filename):
        src, dst = paths[base]
        for d in dirs:
            paths[os.path.join(base, d)] = src + d + '/', os.path.join(dst, d)
        for f in files:
            target = os.path.join(dst, f)
            target = progress_filter(src + f, target)
            if not target:
                # skip non-files
                continue
            ensure_directory(target)
            f = os.path.join(base, f)
            shutil.copyfile(f, target)
            shutil.copystat(f, target)


def unpack_zipfile(filename, extract_dir, progress_filter=default_filter):
    """Unpack zip `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    """

    if not zipfile.is_zipfile(filename):
        raise UnrecognizedFormat("%s is not a zip file" % (filename,))

    with zipfile.ZipFile(filename) as z:
        _unpack_zipfile_obj(z, extract_dir, progress_filter)


def _unpack_zipfile_obj(zipfile_obj, extract_dir, progress_filter=default_filter):
    """Internal/private API used by other parts of setuptools.
    Similar to ``unpack_zipfile``, but receives an already opened :obj:`zipfile.ZipFile`
    object instead of a filename.
    """
    for info in zipfile_obj.infolist():
        name = info.filename

        # don't extract absolute paths or ones with .. in them
        if name.startswith('/') or '..' in name.split('/'):
            continue

        target = os.path.join(extract_dir, *name.split('/'))
        target = progress_filter(name, target)
        if not target:
            continue
        if name.endswith('/'):
            # directory
            ensure_directory(target)
        else:
            # file
            ensure_directory(target)
            data = zipfile_obj.read(info.filename)
            with open(target, 'wb') as f:
                f.write(data)
        unix_attributes = info.external_attr >> 16
        if unix_attributes:
            os.chmod(target, unix_attributes)


def _resolve_tar_file_or_dir(tar_obj, tar_member_obj):
    """Resolve any links and extract link targets as normal files."""
    while tar_member_obj is not None and (
        tar_member_obj.islnk() or tar_member_obj.issym()
    ):
        linkpath = tar_member_obj.linkname
        if tar_member_obj.issym():
            base = posixpath.dirname(tar_member_obj.name)
            linkpath = posixpath.join(base, linkpath)
            linkpath = posixpath.normpath(linkpath)
        tar_member_obj = tar_obj._getmember(linkpath)

    is_file_or_dir = tar_member_obj is not None and (
        tar_member_obj.isfile() or tar_member_obj.isdir()
    )
    if is_file_or_dir:
        return tar_member_obj

    raise LookupError('Got unknown file type')


def _iter_open_tar(tar_obj, extract_dir, progress_filter):
    """Emit member-destination pairs from a tar archive."""
    # don't do any chowning!
    tar_obj.chown = lambda *args: None

    with contextlib.closing(tar_obj):
        for member in tar_obj:
            name = member.name
            # don't extract absolute paths or ones with .. in them
            if name.startswith('/') or '..' in name.split('/'):
                continue

            prelim_dst = os.path.join(extract_dir, *name.split('/'))

            try:
                member = _resolve_tar_file_or_dir(tar_obj, member)
            except LookupError:
                continue

            final_dst = progress_filter(name, prelim_dst)
            if not final_dst:
                continue

            if final_dst.endswith(os.sep):
                final_dst = final_dst[:-1]

            yield member, final_dst


def unpack_tarfile(filename, extract_dir, progress_filter=default_filter):
    """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    """
    try:
        tarobj = tarfile.open(filename)
    except tarfile.TarError as e:
        raise UnrecognizedFormat(
            "%s is not a compressed or uncompressed tar file" % (filename,)
        ) from e

    for member, final_dst in _iter_open_tar(
        tarobj,
        extract_dir,
        progress_filter,
    ):
        try:
            # XXX Ugh
            tarobj._extract_member(member, final_dst)
        except tarfile.ExtractError:
            # chown/chmod/mkfifo/mknode/makedev failed
            pass

    return True


extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile
python3.12/site-packages/setuptools/_vendor/importlib_metadata/_collections.py000064400000001347151732703770023677 0ustar00import collections


# from jaraco.collections 3.3
class FreezableDefaultDict(collections.defaultdict):
    """
    Often it is desirable to prevent the mutation of
    a default dict after its initial construction, such
    as to prevent mutation during iteration.

    >>> dd = FreezableDefaultDict(list)
    >>> dd[0].append('1')
    >>> dd.freeze()
    >>> dd[1]
    []
    >>> len(dd)
    1
    """

    def __missing__(self, key):
        return getattr(self, '_frozen', super().__missing__)(key)

    def freeze(self):
        self._frozen = lambda key: self.default_factory()


class Pair(collections.namedtuple('Pair', 'name value')):
    @classmethod
    def parse(cls, text):
        return cls(*map(str.strip, text.split("=", 1)))
python3.12/site-packages/setuptools/_vendor/importlib_metadata/_itertools.py000064400000004024151732703770023400 0ustar00from itertools import filterfalse


def unique_everseen(iterable, key=None):
    "List unique elements, preserving order. Remember all elements ever seen."
    # unique_everseen('AAAABBBCCDAABBB') --> A B C D
    # unique_everseen('ABBCcAD', str.lower) --> A B C D
    seen = set()
    seen_add = seen.add
    if key is None:
        for element in filterfalse(seen.__contains__, iterable):
            seen_add(element)
            yield element
    else:
        for element in iterable:
            k = key(element)
            if k not in seen:
                seen_add(k)
                yield element


# copied from more_itertools 8.8
def always_iterable(obj, base_type=(str, bytes)):
    """If *obj* is iterable, return an iterator over its items::

        >>> obj = (1, 2, 3)
        >>> list(always_iterable(obj))
        [1, 2, 3]

    If *obj* is not iterable, return a one-item iterable containing *obj*::

        >>> obj = 1
        >>> list(always_iterable(obj))
        [1]

    If *obj* is ``None``, return an empty iterable:

        >>> obj = None
        >>> list(always_iterable(None))
        []

    By default, binary and text strings are not considered iterable::

        >>> obj = 'foo'
        >>> list(always_iterable(obj))
        ['foo']

    If *base_type* is set, objects for which ``isinstance(obj, base_type)``
    returns ``True`` won't be considered iterable.

        >>> obj = {'a': 1}
        >>> list(always_iterable(obj))  # Iterate over the dict's keys
        ['a']
        >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
        [{'a': 1}]

    Set *base_type* to ``None`` to avoid any special handling and treat objects
    Python considers iterable as iterable:

        >>> obj = 'foo'
        >>> list(always_iterable(obj, base_type=None))
        ['f', 'o', 'o']
    """
    if obj is None:
        return iter(())

    if (base_type is not None) and isinstance(obj, base_type):
        return iter((obj,))

    try:
        return iter(obj)
    except TypeError:
        return iter((obj,))
python3.12/site-packages/setuptools/_vendor/importlib_metadata/_functools.py000064400000005517151732703770023400 0ustar00import types
import functools


# from jaraco.functools 3.3
def method_cache(method, cache_wrapper=None):
    """
    Wrap lru_cache to support storing the cache data in the object instances.

    Abstracts the common paradigm where the method explicitly saves an
    underscore-prefixed protected property on first call and returns that
    subsequently.

    >>> class MyClass:
    ...     calls = 0
    ...
    ...     @method_cache
    ...     def method(self, value):
    ...         self.calls += 1
    ...         return value

    >>> a = MyClass()
    >>> a.method(3)
    3
    >>> for x in range(75):
    ...     res = a.method(x)
    >>> a.calls
    75

    Note that the apparent behavior will be exactly like that of lru_cache
    except that the cache is stored on each instance, so values in one
    instance will not flush values from another, and when an instance is
    deleted, so are the cached values for that instance.

    >>> b = MyClass()
    >>> for x in range(35):
    ...     res = b.method(x)
    >>> b.calls
    35
    >>> a.method(0)
    0
    >>> a.calls
    75

    Note that if method had been decorated with ``functools.lru_cache()``,
    a.calls would have been 76 (due to the cached value of 0 having been
    flushed by the 'b' instance).

    Clear the cache with ``.cache_clear()``

    >>> a.method.cache_clear()

    Same for a method that hasn't yet been called.

    >>> c = MyClass()
    >>> c.method.cache_clear()

    Another cache wrapper may be supplied:

    >>> cache = functools.lru_cache(maxsize=2)
    >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
    >>> a = MyClass()
    >>> a.method2()
    3

    Caution - do not subsequently wrap the method with another decorator, such
    as ``@property``, which changes the semantics of the function.

    See also
    http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
    for another implementation and additional justification.
    """
    cache_wrapper = cache_wrapper or functools.lru_cache()

    def wrapper(self, *args, **kwargs):
        # it's the first call, replace the method with a cached, bound method
        bound_method = types.MethodType(method, self)
        cached_method = cache_wrapper(bound_method)
        setattr(self, method.__name__, cached_method)
        return cached_method(*args, **kwargs)

    # Support cache clear even before cache has been created.
    wrapper.cache_clear = lambda: None

    return wrapper


# From jaraco.functools 3.3
def pass_none(func):
    """
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    """

    @functools.wraps(func)
    def wrapper(param, *args, **kwargs):
        if param is not None:
            return func(param, *args, **kwargs)

    return wrapper
python3.12/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/__init__.cpython-312.pyc000064400000130272151732704000027305 0ustar00�

��_i�g��B�ddlZddlZddlZddlZddlZddlmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlmZmZmZddlmZmZddlmZmZmZddlmZmZdd	lmZmZdd
lm Z m!Z!ddl"m#Z#ddl$m%Z%dd
l&m'Z'ddl
m(Z(ddl)m*Z*m+Z+m,Z,gd�Z-Gd�de.�Z/Gd�d�Z0Gd�d�Z1Gd�de1�Z2Gd�de3�Z4Gd�dejj�Z6Gd�d�Z7Gd�d ejp�!�Z9Gd"�d#e'�Z:Gd$�d%�Z;Gd&�d'�Z<Gd(�d)�Z=eGd*�d+ee:��Z>Gd,�d-e9�Z?d.�Z@d/�ZAd0ej@fd1�ZBd2�ZCej�eej��3�ZF	d0e4fd4�ZGd5�ZHd6�ZId0e+eJe*eJffd7�ZKd8�ZLd9�ZMy):�N�)�zipp�)�	_adapters�_meta�_py39compat)�FreezableDefaultDict�Pair)�
NullFinder�install�pypy_partial)�method_cache�	pass_none)�always_iterable�unique_everseen)�PackageMetadata�
SimplePath)�suppress)�
import_module)�MetaPathFinder)�starmap)�List�Mapping�Optional)�Distribution�DistributionFinderr�PackageNotFoundError�distribution�
distributions�entry_points�files�metadata�packages_distributions�requires�versionc�&�eZdZdZd�Zed��Zy)rzThe package was not found.c� �d|j��S)Nz"No package metadata was found for ��name��selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/__init__.py�__str__zPackageNotFoundError.__str__6s��3�D�I�I�;�?�?�c�"�|j\}|S�N)�args�r+r)s  r,r)zPackageNotFoundError.name9s���)�)����r.N)�__name__�
__module__�__qualname__�__doc__r-�propertyr)�r.r,rr3s��$�@����r.rc��eZdZdZej
d�j
�Zed��Z	e
dd��Ze
d��Zy)�	Sectioneda�
    A simple entry point config parser for performance

    >>> for item in Sectioned.read(Sectioned._sample):
    ...     print(item)
    Pair(name='sec1', value='# comments ignored')
    Pair(name='sec1', value='a = 1')
    Pair(name='sec1', value='b = 2')
    Pair(name='sec2', value='a = 2')

    >>> res = Sectioned.section_pairs(Sectioned._sample)
    >>> item = next(res)
    >>> item.name
    'sec1'
    >>> item.value
    Pair(name='a', value='1')
    >>> item = next(res)
    >>> item.value
    Pair(name='b', value='2')
    >>> item = next(res)
    >>> item.name
    'sec2'
    >>> item.value
    Pair(name='a', value='2')
    >>> list(res)
    []
    zm
        [sec1]
        # comments ignored
        a = 1
        b = 2

        [sec2]
        a = 2
        c�J�d�|j||j��D�S)Nc3�K�|]?}|j�1|jtj|j������Ay�w)N)�value)r)�_replacer
�parser=)�.0�sections  r,�	<genexpr>z*Sectioned.section_pairs.<locals>.<genexpr>js=����
�<���|�|�'�
���4�:�:�g�m�m�#<��=�<�s�AA)�filter_)�read�valid)�cls�texts  r,�
section_pairszSectioned.section_pairshs%��
��8�8�D�#�)�)�8�<�
�	
r.Nc#�K�t|ttj|j	���}d}|D]H}|jd�xr|j
d�}|r|jd�}�;t||����Jy�w)N�[�]z[])�filter�map�str�strip�
splitlines�
startswith�endswithr
)rGrC�linesr)r=�
section_matchs      r,rDzSectioned.readpsr�����w��C�I�I�t���/@� A�B�����E�!�,�,�S�1�I�e�n�n�S�6I�M���{�{�4�(����t�U�#�#��s�BBc�.�|xr|jd�S)N�#)rQ)�lines r,rEzSectioned.valid{s���0�D�O�O�C�0�0�0r.r0)
r3r4r5r6�textwrap�dedent�lstrip�_sample�classmethodrH�staticmethodrDrEr8r.r,r:r:?sf���8�h�o�o�	�
�
�f�h���
��
��$��$��1��1r.r:c�b�eZdZdZej
ejdee	d���Z
d�Zy)�DeprecatedTuplea
    Provide subscript item access for backward compatibility.

    >>> recwarn = getfixture('recwarn')
    >>> ep = EntryPoint(name='name', value='value', group='group')
    >>> ep[:]
    ('name', 'value', 'group')
    >>> ep[0]
    'name'
    >>> len(recwarn)
    1
    zAEntryPoint tuple interface is deprecated. Access members by name.r)�
stacklevelc�H�|j�|j�|Sr0)�_warn�_key)r+�items  r,�__getitem__zDeprecatedTuple.__getitem__�s���
�
���y�y�{�4� � r.N)r3r4r5r6�	functools�partial�warnings�warn�DeprecationWarningr
rbrer8r.r,r_r_�s4���
�I����
�
�K����?�	
�E�!r.r_c���eZdZUdZej
d�Z	eed<eed<eed<dZ	e
ded<d	�Zd
�Ze
d��Ze
d��Ze
d
��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�
EntryPointa�An entry point as defined by Python packaging conventions.

    See `the packaging docs on entry points
    <https://packaging.python.org/specifications/entry-points/>`_
    for more information.

    >>> ep = EntryPoint(
    ...     name=None, group=None, value='package.module:attr [extra1, extra2]')
    >>> ep.module
    'package.module'
    >>> ep.attr
    'attr'
    >>> ep.extras
    ['extra1', 'extra2']
    zH(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+)\s*)?((?P<extras>\[.*\])\s*)?$r)r=�groupNr�distc�>�t|�j|||��y)N�r)r=rm��vars�update)r+r)r=rms    r,�__init__zEntryPoint.__init__�s���T�
���t�5���>r.c��|jj|j�}t|j	d��}td|j	d�xsdj
d��}tjt||�S)z�Load the entry point from its definition. If only a module
        is indicated by the value, return that module. Otherwise,
        return the named object.
        �moduleN�attr��.)
�pattern�matchr=rrmrL�splitrf�reduce�getattr)r+r{rv�attrss    r,�loadzEntryPoint.load�si��
���"�"�4�:�:�.���u�{�{�8�4�5���t�e�k�k�&�1�7�R�>�>�s�C�D��������7�7r.c�n�|jj|j�}|jd�S)Nrv�rzr{r=rm�r+r{s  r,rvzEntryPoint.module�s)�����"�"�4�:�:�.���{�{�8�$�$r.c�n�|jj|j�}|jd�S)Nrwr�r�s  r,rwzEntryPoint.attr�s)�����"�"�4�:�:�.���{�{�6�"�"r.c��|jj|j�}tjd|jd�xsd�S)Nz\w+�extrasrx)rzr{r=�re�findallrmr�s  r,r�zEntryPoint.extras�s9�����"�"�4�:�:�.���z�z�&�%�+�+�h�"7�"=�2�>�>r.c�<�t|�j|��|S)N�rnrq)r+rns  r,�_forzEntryPoint._for�s���T�
���t��$��r.c�~���fd�|D�}tttj|j	�|��S)a$
        EntryPoint matches the given parameters.

        >>> ep = EntryPoint(group='foo', name='bar', value='bing:bong [extra1, extra2]')
        >>> ep.matches(group='foo')
        True
        >>> ep.matches(name='bar', value='bing:bong [extra1, extra2]')
        True
        >>> ep.matches(group='foo', name='other')
        False
        >>> ep.matches()
        True
        >>> ep.matches(extras=['extra1', 'extra2'])
        True
        >>> ep.matches(module='bing')
        True
        >>> ep.matches(attr='bong')
        True
        c3�6�K�|]}t�|����y�wr0�r~)r@�paramr+s  �r,rBz%EntryPoint.matches.<locals>.<genexpr>�s�����:�6�%���u�%�6�s�)�allrM�operator�eq�values)r+�paramsrs`  r,�matcheszEntryPoint.matches�s-���(;�6�:���3�x�{�{�F�M�M�O�U�;�<�<r.c�H�|j|j|jfSr0rpr*s r,rczEntryPoint._key�s���y�y�$�*�*�d�j�j�0�0r.c�D�|j�|j�kSr0�rc�r+�others  r,�__lt__zEntryPoint.__lt__s���y�y�{�U�Z�Z�\�)�)r.c�D�|j�|j�k(Sr0r�r�s  r,�__eq__zEntryPoint.__eq__s���y�y�{�e�j�j�l�*�*r.c��td��)Nz!EntryPoint objects are immutable.)�AttributeError)r+r)r=s   r,�__setattr__zEntryPoint.__setattr__s���@�A�Ar.c�V�d|j�d|j�d|j�d�S)NzEntryPoint(name=z, value=z, group=�)rpr*s r,�__repr__zEntryPoint.__repr__
s2���t�y�y�m�8�D�J�J�>�B��Z�Z�N�!�
%�	
r.c�4�t|j��Sr0)�hashrcr*s r,�__hash__zEntryPoint.__hash__s���D�I�I�K� � r.)r3r4r5r6r��compilerzrN�__annotations__rnrrtr�r7rvrwr�r�r�rcr�r�r�r�r�r8r.r,rlrl�s���� �b�j�j�	%��G�
� �I��J��J�%)�D�(�>�
"�)�?�8��%��%��#��#��?��?��=�.1�*�+�B�
�!r.rlc�`�eZdZdZdZd�Zd�Zed��Zed��Z	e
d��Zed��Z
y	)
�EntryPointszC
    An immutable collection of selectable EntryPoint objects.
    r8c�|�	tt|j|����S#t$rt	|��wxYw)z;
        Get the EntryPoint in self matching name.
        r()�next�iter�select�
StopIteration�KeyErrorr2s  r,rezEntryPoints.__getitem__s;��	!���T�[�[�d�[�3�4�5�5���	!��4�.� �	!�s�#&�;c�,��t�fd�|D��S)zv
        Select entry points from self that match the
        given parameters (typically group and/or name).
        c3�P�K�|]}tj|fi���s�|���y�wr0)r�
ep_matches)r@�epr�s  �r,rBz%EntryPoints.select.<locals>.<genexpr>)s$�����U��"��0F�0F�r�0T�V�0T�2��s�&�&)r�)r+r�s `r,r�zEntryPoints.select$s���
�U��U�U�Ur.c�@�|D�chc]}|j��c}Scc}w)zB
        Return the set of all names of all entry points.
        r(�r+r�s  r,�nameszEntryPoints.names+s ��
#'�'�$�B����$�'�'��'��c�@�|D�chc]}|j��c}Scc}w)zC
        Return the set of all groups of all entry points.
        )rmr�s  r,�groupszEntryPoints.groups2s ��
$(�(�4�R����4�(�(��(r�c�D��|�fd�|j|�D��S)Nc3�@�K�|]}|j�����y�wr0)r�)r@r�rns  �r,rBz-EntryPoints._from_text_for.<locals>.<genexpr>;s�����@�+?�R�2�7�7�4�=�+?���)�
_from_text)rFrGrns  `r,�_from_text_forzEntryPoints._from_text_for9s����@�3�>�>�$�+?�@�@�@r.c�B�d�tj|xsd�D�S)Nc3�K�|]D}t|jj|jj|j�����Fy�w)rpN)rlr=r))r@rds  r,rBz)EntryPoints._from_text.<locals>.<genexpr>?s:����
�;��
�D�J�J�O�O�4�:�:�3C�3C�4�9�9�U�U�;�s�A
Arx)r:rH)rGs r,r�zEntryPoints._from_text=s#��
�!�/�/��
��;�
�	
r.N)r3r4r5r6�	__slots__rer�r7r�r�r\r�r]r�r8r.r,r�r�sk����I�!�V��(��(��)��)��A��A��
��
r.r�c�$�eZdZdZdd�Zd�Zd�Zy)�PackagePathz"A reference to a path in a packagec��|j�j|��5}|j�cddd�S#1swYyxYw)N��encoding��locate�openrD)r+r��streams   r,�	read_textzPackagePath.read_textHs0��
�[�[�]�
�
��
�
2�f��;�;�=�3�
2�
2�s	�;�Ac��|j�jd�5}|j�cddd�S#1swYyxYw)N�rbr�)r+r�s  r,�read_binaryzPackagePath.read_binaryLs-��
�[�[�]�
�
��
%���;�;�=�&�
%�
%�s	�:�Ac�8�|jj|�S)z'Return a path-like object for this path)rn�locate_filer*s r,r�zPackagePath.locatePs���y�y�$�$�T�*�*r.N)�utf-8)r3r4r5r6r�r�r�r8r.r,r�r�Es��,�!�!�+r.r�c��eZdZd�Zd�Zy)�FileHashc�B�|jd�\|_}|_y)N�=)�	partition�moder=)r+�spec�_s   r,rtzFileHash.__init__Vs��#'�>�>�#�#6� ��	�1�d�jr.c�<�d|j�d|j�d�S)Nz<FileHash mode: z value: �>)r�r=r*s r,r�zFileHash.__repr__Ys��!�$�)�)��H�T�Z�Z�L��B�Br.N)r3r4r5rtr�r8r.r,r�r�Us
��7�Cr.r�c�`�eZdZdZej
d��Zej
d��Zede	fd��Z
ed��Zed��Z
ed��Zed	ej"fd
��Zed��Zed��Zed
��Zed��Zed��Zd�Zd�Zed��Zd�Zd�Zed��Zed��Zy)rzA Python distribution package.c��y)z�Attempt to load metadata file given by the name.

        :param filename: The name of the file in the distribution info.
        :return: The text if found, otherwise None.
        Nr8�r+�filenames  r,r�zDistribution.read_text`��r.c��y)z[
        Given a path to a file in this distribution, return a path
        to it.
        Nr8�r+�paths  r,r�zDistribution.locate_filehr�r.r)c��|std��	t|j|���S#t$rt	|��wxYw)a�Return the Distribution for the given package name.

        :param name: The name of the distribution package to search for.
        :return: The Distribution instance (or subclass thereof) for the named
            package, if found.
        :raises PackageNotFoundError: When the named package's distribution
            metadata cannot be found.
        :raises ValueError: When an invalid value is supplied for name.
        z A distribution name is required.r()�
ValueErrorr��discoverr�r)rFr)s  r,�	from_namezDistribution.from_nameosH����?�@�@�	-�����$��/�0�0���	-�&�t�,�,�	-�s�*�?c����|jdd���r
|rtd���xstjdi|���tj
j
�fd�|j�D��S)aReturn an iterable of Distribution objects for all packages.

        Pass a ``context`` or pass keyword arguments for constructing
        a context.

        :context: A ``DistributionFinder.Context`` object.
        :return: Iterable of Distribution objects for all packages.
        �contextNz cannot accept context and kwargsc3�.�K�|]}|�����y�wr0r8)r@�resolverr�s  �r,rBz(Distribution.discover.<locals>.<genexpr>�s�����-
�.G�(�H�W��.G�s�r8)�popr�r�Context�	itertools�chain�
from_iterable�_discover_resolvers)rF�kwargsr�s  @r,r�zDistribution.discover�sl����*�*�Y��-���v��?�@�@��A�/�7�7�A�&�A�����,�,�-
�.1�.E�.E�.G�-
�
�	
r.c�>�ttj|��S)z�Return a Distribution for the indicated metadata path

        :param path: a string or path-like object
        :return: a concrete Distribution instance for the path
        )�PathDistribution�pathlib�Path)r�s r,�atzDistribution.at�s�� ����T� 2�3�3r.c�H�d�tjD�}td|�S)z#Search the meta_path for resolvers.c3�6K�|]}t|dd����y�w)�find_distributionsNr�)r@�finders  r,rBz3Distribution._discover_resolvers.<locals>.<genexpr>�s����
�FS�F�G�F�0�$�7�m�s�N)�sys�	meta_pathrL)�declareds r,r�z Distribution._discover_resolvers�s$��
�FI�m�m�
���d�H�%�%r.�returnc��|jd�xs$|jd�xs|jd�}tjtj|��S)z�Return the parsed metadata for this Distribution.

        The returned object will have keys that name the various bits of
        metadata.  See PEP 566 for details.
        �METADATAzPKG-INFOrx)r�r�Message�email�message_from_string�r+rGs  r,r"zDistribution.metadata�sW��
�N�N�:�&�
"��~�~�j�)�
"�
�~�~�b�!�
	
�� � ��!:�!:�4�!@�A�Ar.c� �|jdS)z8Return the 'Name' metadata for the distribution package.�Name�r"r*s r,r)zDistribution.name�s���}�}�V�$�$r.c�@�tj|j�S)z(Return a normalized version of the name.)�Prepared�	normalizer)r*s r,�_normalized_namezDistribution._normalized_name�s���!�!�$�)�)�,�,r.c� �|jdS)z;Return the 'Version' metadata for the distribution package.�Versionr	r*s r,r%zDistribution.version�s���}�}�Y�'�'r.c�L�tj|jd�|�S)Nzentry_points.txt)r�r�r�r*s r,r zDistribution.entry_points�s���)�)�$�.�.�9K�*L�d�S�Sr.c�~���d�fd�	�t�fd��}|�j�xs�j��S)aBFiles in this distribution.

        :return: List of PackagePath for this distribution or None

        Result is `None` if the metadata file that enumerates files
        (i.e. RECORD for dist-info or SOURCES.txt for egg-info) is
        missing.
        Result may be empty if the metadata exists but is empty.
        c�|��t|�}|rt|�nd|_|rt|�nd|_�|_|Sr0)r�r�r��int�sizern)r)r��size_str�resultr+s    �r,�	make_filez%Distribution.files.<locals>.make_file�s7��� ��&�F�,0�(�4�.�d�F�K�+3�#�h�-��F�K��F�K��Mr.c�T��tt�tj|���Sr0)�listr�csv�reader)rSrs �r,�
make_filesz&Distribution.files.<locals>.make_files�s�����	�3�:�:�e�+<�=�>�>r.)NN)r�_read_files_distinfo�_read_files_egginfo)r+rrs` @r,r!zDistribution.files�s@���	�
�	?�
�	?��$�3�3�5�S��9Q�9Q�9S�T�Tr.c�L�|jd�}|xr|j�S)z*
        Read the lines of RECORD
        �RECORD)r�rPrs  r,rz!Distribution._read_files_distinfo�s$���~�~�h�'���)����)�)r.c�t�|jd�}|xr$tdj|j��S)z`
        SOURCES.txt might contain literal commas, so wrap each line
        in quotes.
        zSOURCES.txtz"{}")r�rM�formatrPrs  r,rz Distribution._read_files_egginfo�s/��
�~�~�m�,���=��F�M�M�4�?�?�+<�=�=r.c�d�|j�xs|j�}|xrt|�S)z6Generated requirements specified for this Distribution)�_read_dist_info_reqs�_read_egg_info_reqsr)r+�reqss  r,r$zDistribution.requires�s/���(�(�*�H�d�.F�.F�.H���"��T�
�"r.c�8�|jjd�S)Nz
Requires-Dist)r"�get_allr*s r,r$z!Distribution._read_dist_info_reqs�s���}�}�$�$�_�5�5r.c�Z�|jd�}t|j�|�S)Nzrequires.txt)r�r�_deps_from_requires_text)r+�sources  r,r%z Distribution._read_egg_info_reqs�s(������/��7�y��6�6�7��?�?r.c�J�|jtj|��Sr0)�%_convert_egg_info_reqs_to_simple_reqsr:rD)rFr+s  r,r*z%Distribution._deps_from_requires_text�s���8�8�����9O�P�Pr.c#��K�d���fd�}d�}|D]8}||j�}|j|z||j�z���:y�w)a�
        Historically, setuptools would solicit and store 'extra'
        requirements, including those with environment markers,
        in separate sections. More modern tools expect each
        dependency to be defined separately, with any relevant
        extras and environment markers attached directly to that
        requirement. This method converts the former to the
        latter. See _test_deps_from_requires_text for an example.
        c��|xrd|�d�S)Nz
extra == "�"r8r(s r,�make_conditionzJDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.make_condition
s���0�j���a�0�0r.c	���|xsd}|jd�\}}}|r|rd|�d�}ttd|�|�g��}|rddj|�zSdS)Nrx�:�(r�z; z and )r�rrL�join)rA�extra�sep�markers�
conditionsr1s     �r,�
quoted_markerzIDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.quoted_markersk����m��G�")�"3�"3�C�"8��E�3�����g�Y�a�.���f�T�G�^�E�5J�+K�L�M�J�6@�4�'�,�,�z�2�2�H�b�Hr.c��dd|vzS)z�
            PEP 508 requires a space between the url_spec and the quoted_marker.
            Ref python/importlib_metadata#357.
            � �@r8)�reqs r,�
url_req_spacezIDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.url_req_spaces���#��*�%�%r.N)r=r))�sectionsr:r?rA�spacer1s     @r,r-z2Distribution._convert_egg_info_reqs_to_simple_reqssN�����	1�	I�	&� �G�!�'�-�-�0�E��-�-�%�'�-����*E�E�E� �s�A
A
N)r3r4r5r6�abc�abstractmethodr�r�r\rNr�r�r]r�r�r7rrr"r)r
r%r r!rrr$r$r%r*r-r8r.r,rr]so��(�������	�������-�S�-��-�"�
��
�"�4��4��&��&��B�%�/�/�B��B� �%��%��-��-��(��(��T��T��U��U�0*�>��#��#�
6�@��Q��Q�� F�� Fr.r)�	metaclassc�V�eZdZdZGd�d�Zeje�fd��Zy)rzJ
    A MetaPathFinder capable of discovering installed distributions.
    c�,�eZdZdZdZ	d�Zed��Zy)�DistributionFinder.Contextaw
        Keyword arguments presented by the caller to
        ``distributions()`` or ``Distribution.discover()``
        to narrow the scope of a search for distributions
        in all DistributionFinders.

        Each DistributionFinder may expect any parameters
        and should attempt to honor the canonical
        parameters defined below when appropriate.
        Nc�8�t|�j|�yr0rq)r+r�s  r,rtz#DistributionFinder.Context.__init__<s����J���f�%r.c�T�t|�jdtj�S)z�
            The sequence of directory path that a distribution finder
            should search.

            Typically refers to Python installed package paths such as
            "site-packages" directories and defaults to ``sys.path``.
            r�)rr�getr�r�r*s r,r�zDistributionFinder.Context.path?s����:�>�>�&�#�(�(�3�3r.)r3r4r5r6r)rtr7r�r8r.r,r�rG*s,��		���	�
	&�
�	4�
�	4r.r�c��y)z�
        Find distributions.

        Return an iterable of all Distribution instances capable of
        loading the metadata for packages matching the ``context``,
        a DistributionFinder.Context instance.
        Nr8)r+r�s  r,r�z%DistributionFinder.find_distributionsJr�r.N)r3r4r5r6r�rBrCr�r8r.r,rr%s1���4�4�@	���)0����r.rc���eZdZdZej
��fd��Zd�Zd�Zd�Z	d�Z
d�Zed��Z
ed	��Z�xZS)
�FastPathzs
    Micro-optimized class for searching a path for
    children.

    >>> FastPath('').children()
    ['...']
    c�"��t�|�|�Sr0)�super�__new__)rF�root�	__class__s  �r,rPzFastPath.__new__^s����w��s�#�#r.c��||_yr0)rQ)r+rQs  r,rtzFastPath.__init__bs	����	r.c�B�tj|j|�Sr0)r�r�rQ)r+�childs  r,�joinpathzFastPath.joinpathes���|�|�D�I�I�u�-�-r.c��tt�5tj|jxsd�cddd�S#1swYnxYwtt�5|j�cddd�S#1swYgSxYw)Nry)r�	Exception�os�listdirrQ�zip_childrenr*s r,�childrenzFastPath.childrenhsP��
�i�
 ��:�:�d�i�i�.�3�/�!�
 �
 ��
�i�
 ��$�$�&�!�
 �
 ��	�s�#=�A�A2�2A<c���tj|j�}|jj�}|j|_t
j
d�|D��S)Nc3�bK�|]'}|jtjd�d���)y�w)rrN)r|�	posixpathr7)r@rUs  r,rBz(FastPath.zip_children.<locals>.<genexpr>ts%����Q�5�%�U�[�[�����:�1�=�5�s�-/)rr�rQ�namelistrV�dict�fromkeys)r+�zip_pathr�s   r,r[zFastPath.zip_childrenosH���9�9�T�Y�Y�'���
�
�&�&�(�� �)�)��
��}�}�Q�5�Q�Q�Qr.c�V�|j|j�j|�Sr0)�lookup�mtime�searchr2s  r,rgzFastPath.searchvs ���{�{�4�:�:�&�-�-�d�3�3r.c���tt�5tj|j�j
cddd�S#1swYnxYw|jj�yr0)r�OSErrorrY�statrQ�st_mtimere�cache_clearr*s r,rfzFastPath.mtimeys<��
�g�
��7�7�4�9�9�%�.�.��
�
�������!s�)A�Ac��t|�Sr0)�Lookup)r+rfs  r,rezFastPath.lookups���d�|�r.)r3r4r5r6rf�	lru_cacherPrtrVr\r[rgr7rfrre�
__classcell__�rRs@r,rMrMUsi�����Y����$��$��.��R�4��"��"�
���r.rMc��eZdZdefd�Zd�Zy)rnr�c�l�tjj|j�j	�}|jd�}t
t�|_t
t�|_	|j�D]�}|j	�}|jd�ri|jd�djd�d}tj|�}|j|j|j!|����|s��|dk(s��|jd�djd�d}tj#|�}|j|j|j!|����|jj%�|jj%�y)Nz.egg�z
.dist-infoz	.egg-inforyr�-zegg-info)rYr��basenamerQ�lowerrRr	r�infos�eggsr\�
rpartitionr�rr�appendrV�legacy_normalize�freeze)	r+r��base�base_is_eggrU�lowr)�
normalized�legacy_normalizeds	         r,rtzLookup.__init__�sE���w�w����	�	�*�0�0�2���m�m�F�+��)�$�/��
�(��.��	��]�]�_�E��+�+�-�C��|�|�7�8��~�~�c�*�1�-�7�7��<�Q�?��%�/�/��5�
��
�
�:�&�-�-�d�m�m�E�.B�C���
�!2����s�+�A�.�8�8��=�a�@��$,�$=�$=�d�$C�!��	�	�+�,�3�3�D�M�M�%�4H�I�%�	
�
�
�����	�	���r.c�v�|r|j|jn6tjj	|jj��}|r|j|jn6tjj	|jj��}tj||�Sr0)rxr�r�r�r�r�ryr�)r+�preparedrxrys    r,rgz
Lookup.search�s����
�J�J�x�*�*�+����.�.�t�z�z�/@�/@�/B�C�	��
�I�I�h�0�0�1����.�.�t�y�y�/?�/?�/A�B�	
�
���u�d�+�+r.N)r3r4r5rMrtrgr8r.r,rnrn�s���X��*,r.rnc�D�eZdZdZdZdZd�Zed��Zed��Z	d�Z
y)rzE
    A prepared search for metadata on a possibly-named package.
    Nc�p�||_|�y|j|�|_|j|�|_yr0)r)rr�r|r�r2s  r,rtzPrepared.__init__�s4����	��<���.�.��.���!%�!6�!6�t�!<��r.c�l�tjdd|�j�jdd�S)zC
        PEP 503 normalization plus dashes as underscores.
        z[-_.]+rur�)r��subrw�replacer(s r,rzPrepared.normalize�s-��
�v�v�i��d�+�1�1�3�;�;�C��E�Er.c�B�|j�jdd�S)z|
        Normalize the package name as found in the convention in
        older packaging tools versions and specs.
        rur�)rwr�r(s r,r|zPrepared.legacy_normalize�s���z�z�|�#�#�C��-�-r.c�,�t|j�Sr0)�boolr)r*s r,�__bool__zPrepared.__bool__�s���D�I�I��r.)r3r4r5r6r�r�rtr]rr|r�r8r.r,rr�sH����J���=��F��F��.��.�r.rc�L�eZdZdZej�fd�Zed��Zd�Z	y)�MetadataPathFinderz�A degenerate finder for distribution packages on the file system.

    This finder supplies only a find_distributions() method for versions
    of Python that do not have a PathFinder find_distributions().
    c�n�|j|j|j�}tt|�S)a 
        Find distributions.

        Return an iterable of all Distribution instances capable of
        loading the metadata for packages matching ``context.name``
        (or all names if ``None`` indicated) along the paths in the list
        of directories ``context.path``.
        )�
_search_pathsr)r�rMr�)r+r��founds   r,r�z%MetadataPathFinder.find_distributions�s,���"�"�7�<�<����>���#�U�+�+r.c���t|��tjj�fd�t	t
|�D��S)z1Find metadata directories in paths heuristically.c3�@�K�|]}|j�����y�wr0)rg)r@r�r�s  �r,rBz3MetadataPathFinder._search_paths.<locals>.<genexpr>�s�����-
�.B�d�D�K�K��!�.B�r�)rr�r�r�rMrM)rFr)�pathsr�s   @r,r�z MetadataPathFinder._search_paths�s9����D�>�����,�,�-
�.1�(�E�.B�-
�
�	
r.c�@�tjj�yr0)rMrPrl)rFs r,�invalidate_cachesz$MetadataPathFinder.invalidate_caches�s�����$�$�&r.N)
r3r4r5r6rr�r�r\r�r�r8r.r,r�r��s3���*<�)C�)C�)E�
,��
��
�'r.r�c���eZdZdefd�Zd�Zej
je_d�Ze	�fd��Z
ed��Z�xZ
S)r�r�c��||_y)zfConstruct a distribution.

        :param path: SimplePath indicating the metadata directory.
        N)�_pathr�s  r,rtzPathDistribution.__init__�s��
��
r.c���tttttt
�5|jj|�jd��cddd�S#1swYyxYw)Nr�r�)	r�FileNotFoundError�IsADirectoryErrorr��NotADirectoryError�PermissionErrorr�rVr�r�s  r,r�zPathDistribution.read_text�sK��
������
��:�:�&�&�x�0�:�:�G�:�L�
�
�
�s�+A�A"c�4�|jj|zSr0)r��parentr�s  r,r�zPathDistribution.locate_file�s���z�z� � �4�'�'r.c����tjjt|j��}ttj�|j|��xs
t�|�(S)zz
        Performance optimization: where possible, resolve the
        normalized name from the file system path.
        )rYr�rvrNr�rrr�_name_from_stemrOr
)r+�stemrRs  �r,r
z!PathDistribution._normalized_namesS����w�w����D�J�J��0��)�I�h�(�(�)�$�*>�*>�t�*D�E�
(��w�'�	
r.c�~�tjj|�\}}|dvry|jd�\}}}|S)a7
        >>> PathDistribution._name_from_stem('foo-3.0.egg-info')
        'foo'
        >>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info')
        'CherryPy'
        >>> PathDistribution._name_from_stem('face.egg-info')
        'face'
        >>> PathDistribution._name_from_stem('foo.bar')
        rtNru)rYr��splitextr�)r�r��extr)r7�rests      r,r�z PathDistribution._name_from_stem
sC�����(�(��.�
��#��1�1��"�,�,�S�1���c�4��r.)r3r4r5rrtr�rr6r�r7r
r]r�rprqs@r,r�r��sX����Z��M�%�.�.�6�6�I��(��	
��	
����r.r�c�,�tj|�S)z�Get the ``Distribution`` instance for the named package.

    :param distribution_name: The name of the distribution package as a string.
    :return: A ``Distribution`` instance (or subclass thereof).
    )rr���distribution_names r,rrs���!�!�"3�4�4r.c�,�tjdi|��S)z|Get all ``Distribution`` instances in the current environment.

    :return: An iterable of ``Distribution`` instances.
    r8)rr�)r�s r,rr(s��
� � �*�6�*�*r.rc�@�tj|�jS)z�Get the metadata for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: A PackageMetadata containing the parsed metadata.
    )rr�r"r�s r,r"r"0s���!�!�"3�4�=�=�=r.c�,�t|�jS)z�Get the version string for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: The version string for the package as defined in the package's
        "Version" metadata key.
    )rr%r�s r,r%r%9s���)�*�2�2�2r.)�keyc��tjjd�tt	��D��}t|�jdi|��S)aReturn EntryPoint objects for all installed packages.

    Pass selection parameters (group or name) to filter the
    result to entry points matching those properties (see
    EntryPoints.select()).

    :return: EntryPoints for all installed packages.
    c3�4K�|]}|j���y�wr0)r )r@rns  r,rBzentry_points.<locals>.<genexpr>Us����(�&>�d����&>�s�r8)r�r�r��_uniquerr�r�)r��epss  r,r r LsI���/�/�
'�
'�(�&-�m�o�&>�(��C�#�;�s��"�"�,�V�,�,r.c�,�t|�jS)z�Return a list of files for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: List of files composing the distribution.
    )rr!r�s r,r!r![s���)�*�0�0�0r.c�,�t|�jS)z�
    Return a list of requirements for the named package.

    :return: An iterator of requirements, suitable for
        packaging.requirement.Requirement.
    )rr$r�s r,r$r$ds���)�*�3�3�3r.c���tjt�}t�D]@}t	|�xst|�D]#}||j
|jd��%�Bt|�S)z�
    Return a mapping of top-level packages to their
    distributions.

    >>> import collections.abc
    >>> pkgs = packages_distributions()
    >>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values())
    True
    r)	�collections�defaultdictrr�_top_level_declared�_top_level_inferredr{r"ra)�pkg_to_distrn�pkgs   r,r#r#nsg���)�)�$�/�K����&�t�,�I�0C�D�0I�I�C����#�#�D�M�M�&�$9�:�J� ����r.c�H�|jd�xsdj�S)Nz
top_level.txtrx)r�r|r�s r,r�r�s���N�N�?�+�1�r�8�8�:�:r.c���t|j�D�chc]S}|jdk(rBt|j�dkDr|jdn|jd�j��Uc}Scc}w)Nz.pyrrrx)rr!�suffix�len�parts�with_suffixr))rn�fs  r,r�r��si��!����,��,�A��8�8�u���!�'�'�l�Q�&�����
�A�M�M�"�,=�,B�,B�B�,����s�AA3)NrYr�rBrr�rxrrr�r�rXrhrfr�r_r�rrr�_collectionsr	r
�_compatrrr
�
_functoolsrr�
_itertoolsrrrr�
contextlibr�	importlibr�
importlib.abcrr�typingrrr�__all__�ModuleNotFoundErrorrr:r_rl�tupler��
PurePosixPathr�r��ABCMetarrrMrnrr�r�rrr"r%rg�normalized_namer�r r!r$rNr#r�r�r8r.r,�<module>r�s���	�	�
�
�
�����������+�+�4���
0�8�.��#�(��*�*�
�� 	�.�	�>1�>1�B!�!�6v!��v!�r.
�%�.
�b
+�'�'�'�
+� C�C�EF�S�[�[�EF�P-��-�`,�,�^!,�!,�H��D	�'��%7�'�	�'�>2�|�2�j5�+�>�5�#8�#8�>�3��)�
�
���#�#����
-�k�-�1�4����T�#�Y�� 7��";�r.site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_collections.cpython-312.pyc000064400000003716151732704000030146 0ustar00python3.12�

��_i���n�ddlZGd�dej�ZGd�dejdd��Zy)�Nc�(��eZdZdZ�fd�Zd�Z�xZS)�FreezableDefaultDicta!
    Often it is desirable to prevent the mutation of
    a default dict after its initial construction, such
    as to prevent mutation during iteration.

    >>> dd = FreezableDefaultDict(list)
    >>> dd[0].append('1')
    >>> dd.freeze()
    >>> dd[1]
    []
    >>> len(dd)
    1
    c�:��t|dt�|��|�S)N�_frozen)�getattr�super�__missing__)�self�key�	__class__s  ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/_collections.pyr	z FreezableDefaultDict.__missing__s���<�w�t�Y���(;�<�S�A�A�c����fd��_y)Nc�$���j�S)N)�default_factory)rr
s �r
�<lambda>z-FreezableDefaultDict.freeze.<locals>.<lambda>s���4�#7�#7�#9r)r)r
s`r
�freezezFreezableDefaultDict.freezes
���9��r)�__name__�
__module__�__qualname__�__doc__r	r�
__classcell__)rs@r
rrs����B�:rrc��eZdZed��Zy)�Pairc	�\�|ttj|jdd���S)N�=�)�map�str�strip�split)�cls�texts  r
�parsez
Pair.parses#���C��	�	�4�:�:�c�1�#5�6�7�7rN)rrr�classmethodr$�rr
rrs���8��8rrz
name value)�collections�defaultdictr�
namedtuplerr&rr
�<module>r*s6���:�;�2�2�:�,8�!�;�!�!�&�,�7�8rpython3.12/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_compat.cpython-312.pyc000064400000004725151732704000027173 0ustar00�

��_iC��r�ddlZddlZgd�Z	ddlmZd�Zd�ZGd�d�Z	d	�Z
y#e$r	ddlmZY�!wxYw)
�N)�install�
NullFinder�Protocol)r�c�b�tjj|��t�|S)z�
    Class decorator for installation on sys.meta_path.

    Adds the backport DistributionFinder to sys.meta_path and
    attempts to disable the finder functionality of the stdlib
    DistributionFinder.
    )�sys�	meta_path�append�disable_stdlib_finder)�clss ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/_compat.pyrrs#���M�M���������J�c�L�d�}t|tj�D]}|`�y)z�
    Give the backport primacy for discovering path-based distributions
    by monkey-patching the stdlib O_O.

    See #91 for more background for rationale on this sketchy
    behavior.
    c�>�t|dd�dk(xrt|d�S)N�
__module__�_frozen_importlib_external�find_distributions)�getattr�hasattr)�finders r
�matchesz&disable_stdlib_finder.<locals>.matches%s0����L�$�
�
)�*�T�.5�f�>R�.S�	TrN)�filterrr	r)rrs  r
rrs%��T�
��#�-�-�0���%�1rc�$�eZdZdZed��ZeZy)rzj
    A "Finder" (aka "MetaClassFinder") that never finds any modules,
    but may find distributions.
    c��y)N�)�args�kwargss  r
�	find_speczNullFinder.find_spec4s��rN)�__name__r�__qualname__�__doc__�staticmethodr�find_modulerrr
rr.s"���
�����Krrc�:�tj�dk(}||zS)zY
    Adjust for variable stacklevel on partial under PyPy.

    Workaround for #327.
    �PyPy)�platform�python_implementation)�val�is_pypys  r
�pypy_partialr*As!���,�,�.�&�8�G���=�r)rr&�__all__�typingr�ImportError�typing_extensionsrrrr*rrr
�<module>r/sH��
��0��-��
�&�$��&��o�-�,�-�s�(�6�6site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_py39compat.cpython-312.pyc000064400000003262151732704000027634 0ustar00python3.12�

��_iJ��`�dZddlmZmZmZer	ddlmZmZnexZZdedeefd�Z	dede
fd	�Zy
)z)
Compatibility layer with Python 3.8/3.9
�)�
TYPE_CHECKING�Any�Optional�)�Distribution�
EntryPoint�dist�returnc��	|jS#t$r6ddlm}|j	t|dd�xs|jd�cYSwxYw)z]
    Honor name normalization for distributions that don't provide ``_normalized_name``.
    r)�Prepared�nameN�Name)�_normalized_name�AttributeError�r�	normalize�getattr�metadata)r	rs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/_py39compat.py�normalized_namer
sP��X��$�$�$���X���!�!�'�$���"=�"V����v�AV�W�W�X�s��<A
�A
�epc���	|jdi|��S#t$rAddlm}||j|j
|j�jdi|��cYSwxYw)zO
    Workaround for ``EntryPoint`` objects without the ``matches`` method.
    r)r�)�matchesrrrr
�value�group)r�paramsrs   r�
ep_matchesrs]��I��r�z�z�#�F�#�#���I� �?�z�"�'�'�2�8�8�R�X�X�6�>�>�H��H�H�	I�s��AA�AN)�__doc__�typingrrrrrr�strr�boolrr�r�<module>r$sU���0�/��*�*� #�#�L�:�	X�,�	X�8�C�=�	X�
I�:�
I�D�
Ir#python3.12/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_meta.cpython-312.pyc000064400000005316151732704010026634 0ustar00�

��_i���r�ddlmZddlmZmZmZmZmZmZed�Z	Gd�de�Z
Gd�dee	�Zy	)
�)�Protocol�)�Any�Dict�Iterator�List�TypeVar�Union�_Tc	��eZdZdefd�Zdedefd�Zdedefd�Zde	efd�Z
d
ded	edee
eeffd
�Zedeeeee
efffd��Zy)�PackageMetadata�returnc��y�N���selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/_meta.py�__len__zPackageMetadata.__len__	�����itemc��yrr)rrs  r�__contains__zPackageMetadata.__contains__rr�keyc��yrr)rrs  r�__getitem__zPackageMetadata.__getitem__rrc��yrrrs r�__iter__zPackageMetadata.__iter__rr�name�failobjc��y)zP
        Return all values associated with a possibly multi-valued key.
        Nr)rr r!s   r�get_allzPackageMetadata.get_all��rc��y)z9
        A JSON-compatible form of the metadata.
        Nrrs r�jsonzPackageMetadata.jsonr$rN).)�__name__�
__module__�__qualname__�intr�str�boolrrrrrr
rrr#�propertyrr&rrrr
r
s������������s��s���(�3�-���C��"��u�T�#�Y��]�7K��
��d�3��c�4��9�n� 5�5�6���rr
c�X�eZdZdZdefd�Zdeeefdefd�Ze	defd��Z
defd�Zy)	�
SimplePathzH
    A minimal subset of pathlib.Path required by PathDistribution.
    rc��yrrrs r�joinpathzSimplePath.joinpath&rr�otherc��yrr)rr2s  r�__truediv__zSimplePath.__truediv__)rrc��yrrrs r�parentzSimplePath.parent,s��rc��yrrrs r�	read_textzSimplePath.read_text0rrN)r'r(r)�__doc__rr1r
r+r4r-r6r8rrrr/r/!sU����"����s�B�w���B���������3�rr/N)�_compatr�typingrrrrr	r
rr
r/rrr�<module>r<s5���<�<�
�T�]���h��2��"��rsite-packages/setuptools/_vendor/importlib_metadata/__pycache__/_functools.cpython-312.pyc000064400000006750151732704010027646 0ustar00python3.12�

��_iO��"�ddlZddlZdd�Zd�Zy)�Nc�V����xstj����fd�}d�|_|S)aV
    Wrap lru_cache to support storing the cache data in the object instances.

    Abstracts the common paradigm where the method explicitly saves an
    underscore-prefixed protected property on first call and returns that
    subsequently.

    >>> class MyClass:
    ...     calls = 0
    ...
    ...     @method_cache
    ...     def method(self, value):
    ...         self.calls += 1
    ...         return value

    >>> a = MyClass()
    >>> a.method(3)
    3
    >>> for x in range(75):
    ...     res = a.method(x)
    >>> a.calls
    75

    Note that the apparent behavior will be exactly like that of lru_cache
    except that the cache is stored on each instance, so values in one
    instance will not flush values from another, and when an instance is
    deleted, so are the cached values for that instance.

    >>> b = MyClass()
    >>> for x in range(35):
    ...     res = b.method(x)
    >>> b.calls
    35
    >>> a.method(0)
    0
    >>> a.calls
    75

    Note that if method had been decorated with ``functools.lru_cache()``,
    a.calls would have been 76 (due to the cached value of 0 having been
    flushed by the 'b' instance).

    Clear the cache with ``.cache_clear()``

    >>> a.method.cache_clear()

    Same for a method that hasn't yet been called.

    >>> c = MyClass()
    >>> c.method.cache_clear()

    Another cache wrapper may be supplied:

    >>> cache = functools.lru_cache(maxsize=2)
    >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
    >>> a = MyClass()
    >>> a.method2()
    3

    Caution - do not subsequently wrap the method with another decorator, such
    as ``@property``, which changes the semantics of the function.

    See also
    http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
    for another implementation and additional justification.
    c�~��tj�|�}�|�}t|�j|�||i|��S�N)�types�
MethodType�setattr�__name__)�self�args�kwargs�bound_method�
cached_method�
cache_wrapper�methods     ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/_functools.py�wrapperzmethod_cache.<locals>.wrapperKs?����'�'���5��%�l�3�
���f�o�o�}�5��d�-�f�-�-�c��yr�rrr�<lambda>zmethod_cache.<locals>.<lambda>Ss��$r)�	functools�	lru_cache�cache_clear)rrrs`` r�method_cachers-���F"�:�Y�%8�%8�%:�M�.�'�G���Nrc�B��tj���fd��}|S)z�
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    c�"��|��|g|��i|��Syrr)�paramrr�funcs   �rrzpass_none.<locals>.wrappercs#�������/��/��/�/�r)r�wraps)rrs` r�	pass_noner Ys'����_�_�T��0��0��Nrr)rrrr rrr�<module>r!s����O�frpython3.12/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_adapters.cpython-312.pyc000064400000007660151732704010027515 0ustar00�

��_i�	����ddlZddlZddlZddlZddlZddlmZddlm	Z	ejejdee	d���Z
Gd�d	ejj�Zy)
�N�)�
FoldedCase)�pypy_partialzFImplicit None on return values is deprecated and will raise KeyErrors.�)�
stacklevelc���eZdZeeegd���Z	dejjf�fd�Z
d�Z�fd�Z�fd�Z
d�Zed��Z�xZS)	�Message)
�
ClassifierzObsoletes-Dist�PlatformzProject-URLz
Provides-DistzProvides-Extraz
Requires-DistzRequires-ExternalzSupported-Platform�Dynamic�origc�l��t�|�|�}t|�jt|��|S�N)�super�__new__�vars�update)�clsr
�res�	__class__s   ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/_adapters.pyrzMessage.__new__*s,����g�o�c�"���S�	����d��$��
�c�.�|j�|_yr)�_repair_headers�_headers)�self�args�kwargss   r�__init__zMessage.__init__/s���,�,�.��
rc� ��t�|��Sr)r�__iter__)rrs �rr!zMessage.__iter__3s����w��!�!rc�>��t�|�|�}|�
t�|S)z�
        Warn users that a ``KeyError`` can be expected when a
        mising key is supplied. Ref python/importlib_metadata#371.
        )r�__getitem__�_warn)r�itemrrs   �rr#zMessage.__getitem__6s#���
�g�!�$�'���;��G��
rc���d�}t|�dD��cgc]\}}|||�f��}}}|jr!|jd|j�f�|Scc}}w)Nc�B�|rd|vr|Stjd|z�S)zCorrect for RFC822 indentation�
z        )�textwrap�dedent)�values r�redentz'Message._repair_headers.<locals>.redentAs$���D��-����?�?�7�U�?�3�3rr�Description)r�_payload�append�get_payload)rr,�keyr+�headerss     rrzMessage._repair_headers@sa��	4�;?�t�*�Z�:P�Q�:P�J�C��C����'�:P��Q��=�=��N�N�M�4�+;�+;�+=�>�?����Rs�Ac	�T���fd�}tt|tt����S)z[
        Convert PackageMetadata to a JSON-compatible format
        per PEP 0566.
        c����|�jvr�j|�n�|}|dk(rtjd|�}|j	�jdd�}||fS)N�Keywordsz\s+�-�_)�multiple_use_keys�get_all�re�split�lower�replace)r1r+�tkrs   �r�	transformzMessage.json.<locals>.transformSs_���),��0F�0F�)F�D�L�L��%�D�QT�I�E��j� ������/������$�$�S�#�.�B��u�9�r)�dict�mapr)rr?s` r�jsonzMessage.jsonLs#���	��C�	�3�z�4�#8�9�:�:r)�__name__�
__module__�__qualname__�setrArr8�email�messager	rrr!r#r�propertyrB�
__classcell__)rs@rr	r	sa������
�	
���"��5�=�=�0�0��
/�"��
��
;��
;rr	)�	functools�warningsr:r)�
email.messagerG�_textr�_compatr�partial�warn�DeprecationWarningr$rHr	�rr�<module>rTsZ����	����!�	�	����M�M�L���A��		��F;�e�m�m�#�#�F;rpython3.12/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_text.cpython-312.pyc000064400000007567151732704010026704 0ustar00�

��_iv��.�ddlZddlmZGd�de�Zy)�N�)�method_cachec�h��eZdZdZd�Zd�Zd�Zd�Zd�Z�fd�Z	d�Z
e�fd	��Zd
�Z
dd�Z�xZS)
�
FoldedCasea{
    A case insensitive string class; behaves just like str
    except compares equal when the only variation is case.

    >>> s = FoldedCase('hello world')

    >>> s == 'Hello World'
    True

    >>> 'Hello World' == s
    True

    >>> s != 'Hello World'
    False

    >>> s.index('O')
    4

    >>> s.split('O')
    ['hell', ' w', 'rld']

    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
    ['alpha', 'Beta', 'GAMMA']

    Sequence membership is straightforward.

    >>> "Hello World" in [s]
    True
    >>> s in ["Hello World"]
    True

    You may test for set inclusion, but candidate and elements
    must both be folded.

    >>> FoldedCase("Hello World") in {s}
    True
    >>> s in {FoldedCase("Hello World")}
    True

    String inclusion works as long as the FoldedCase object
    is on the right.

    >>> "hello" in FoldedCase("Hello World")
    True

    But not if the FoldedCase object is on the left:

    >>> FoldedCase('hello') in 'Hello World'
    False

    In that case, use in_:

    >>> FoldedCase('hello').in_('Hello World')
    True

    >>> FoldedCase('hello') > FoldedCase('Hello')
    False
    c�D�|j�|j�kS�N��lower��self�others  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/_text.py�__lt__zFoldedCase.__lt__C����z�z�|�e�k�k�m�+�+�c�D�|j�|j�kDSrr	rs  r�__gt__zFoldedCase.__gt__Frrc�D�|j�|j�k(Srr	rs  r�__eq__zFoldedCase.__eq__I����z�z�|�u�{�{�}�,�,rc�D�|j�|j�k7Srr	rs  r�__ne__zFoldedCase.__ne__Lrrc�4�t|j��Sr)�hashr
)rs r�__hash__zFoldedCase.__hash__Os���D�J�J�L�!�!rc�Z��t�|��j|j��Sr)�superr
�__contains__)rr
�	__class__s  �rrzFoldedCase.__contains__Rs ����w�}��+�+�E�K�K�M�:�:rc��|t|�vS)zDoes self appear in other?)rrs  r�in_zFoldedCase.in_Us���z�%�(�(�(rc� ��t�|��Sr)rr
)rrs �rr
zFoldedCase.lowerZs����w�}��rc�\�|j�j|j��Sr)r
�index)r�subs  rr$zFoldedCase.index^s���z�z�|�!�!�#�)�)�+�.�.rc��tjtj|�tj�}|j	||�Sr)�re�compile�escape�I�split)r�splitter�maxsplit�patterns    rr+zFoldedCase.splitas0���*�*�R�Y�Y�x�0�"�$�$�7���}�}�T�8�,�,r)� r)�__name__�
__module__�__qualname__�__doc__rrrrrrr!rr
r$r+�
__classcell__)rs@rrrsJ���9�v,�,�-�-�"�;�)�
����/�-rr)r'�
_functoolsr�strr�rr�<module>r8s��	�$�\-��\-rsite-packages/setuptools/_vendor/importlib_metadata/__pycache__/_itertools.cpython-312.pyc000064400000004651151732704010027654 0ustar00python3.12�

��_i��&�ddlmZdd�Zeeffd�Zy)�)�filterfalseNc#��K�t�}|j}|�(t|j|�D]}||�|���y|D]}||�}||vs�||�|���y�w)zHList unique elements, preserving order. Remember all elements ever seen.N)�set�addr�__contains__)�iterable�key�seen�seen_add�element�ks      ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_metadata/_itertools.py�unique_everseenrsj�����5�D��x�x�H�
�{�"�4�#4�#4�h�?�G��W���M�@� �G��G��A���}�����
�	 �s�AA$�A$c��|�td�S|�t||�rt|f�S	t|�S#t$rt|f�cYSwxYw)axIf *obj* is iterable, return an iterator over its items::

        >>> obj = (1, 2, 3)
        >>> list(always_iterable(obj))
        [1, 2, 3]

    If *obj* is not iterable, return a one-item iterable containing *obj*::

        >>> obj = 1
        >>> list(always_iterable(obj))
        [1]

    If *obj* is ``None``, return an empty iterable:

        >>> obj = None
        >>> list(always_iterable(None))
        []

    By default, binary and text strings are not considered iterable::

        >>> obj = 'foo'
        >>> list(always_iterable(obj))
        ['foo']

    If *base_type* is set, objects for which ``isinstance(obj, base_type)``
    returns ``True`` won't be considered iterable.

        >>> obj = {'a': 1}
        >>> list(always_iterable(obj))  # Iterate over the dict's keys
        ['a']
        >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
        [{'a': 1}]

    Set *base_type* to ``None`` to avoid any special handling and treat objects
    Python considers iterable as iterable:

        >>> obj = 'foo'
        >>> list(always_iterable(obj, base_type=None))
        ['f', 'o', 'o']
    �)�iter�
isinstance�	TypeError)�obj�	base_types  r�always_iterablersX��R�{��B�x����:�c�9�#=��S�F�|����C�y������S�F�|���s�
4�A�A)N)�	itertoolsrr�str�bytesrr�r�<module>rs��!��&%(��<�2rpython3.12/site-packages/setuptools/_vendor/importlib_metadata/_compat.py000064400000003503151732704010022624 0ustar00import sys
import platform


__all__ = ['install', 'NullFinder', 'Protocol']


try:
    from typing import Protocol
except ImportError:  # pragma: no cover
    # Python 3.7 compatibility
    from ..typing_extensions import Protocol  # type: ignore


def install(cls):
    """
    Class decorator for installation on sys.meta_path.

    Adds the backport DistributionFinder to sys.meta_path and
    attempts to disable the finder functionality of the stdlib
    DistributionFinder.
    """
    sys.meta_path.append(cls())
    disable_stdlib_finder()
    return cls


def disable_stdlib_finder():
    """
    Give the backport primacy for discovering path-based distributions
    by monkey-patching the stdlib O_O.

    See #91 for more background for rationale on this sketchy
    behavior.
    """

    def matches(finder):
        return getattr(
            finder, '__module__', None
        ) == '_frozen_importlib_external' and hasattr(finder, 'find_distributions')

    for finder in filter(matches, sys.meta_path):  # pragma: nocover
        del finder.find_distributions


class NullFinder:
    """
    A "Finder" (aka "MetaClassFinder") that never finds any modules,
    but may find distributions.
    """

    @staticmethod
    def find_spec(*args, **kwargs):
        return None

    # In Python 2, the import system requires finders
    # to have a find_module() method, but this usage
    # is deprecated in Python 3 in favor of find_spec().
    # For the purposes of this finder (i.e. being present
    # on sys.meta_path but having no other import
    # system functionality), the two methods are identical.
    find_module = find_spec


def pypy_partial(val):
    """
    Adjust for variable stacklevel on partial under PyPy.

    Workaround for #327.
    """
    is_pypy = platform.python_implementation() == 'PyPy'
    return val + is_pypy
python3.12/site-packages/setuptools/_vendor/importlib_metadata/_adapters.py000064400000004626151732704010023153 0ustar00import functools
import warnings
import re
import textwrap
import email.message

from ._text import FoldedCase
from ._compat import pypy_partial


# Do not remove prior to 2024-01-01 or Python 3.14
_warn = functools.partial(
    warnings.warn,
    "Implicit None on return values is deprecated and will raise KeyErrors.",
    DeprecationWarning,
    stacklevel=pypy_partial(2),
)


class Message(email.message.Message):
    multiple_use_keys = set(
        map(
            FoldedCase,
            [
                'Classifier',
                'Obsoletes-Dist',
                'Platform',
                'Project-URL',
                'Provides-Dist',
                'Provides-Extra',
                'Requires-Dist',
                'Requires-External',
                'Supported-Platform',
                'Dynamic',
            ],
        )
    )
    """
    Keys that may be indicated multiple times per PEP 566.
    """

    def __new__(cls, orig: email.message.Message):
        res = super().__new__(cls)
        vars(res).update(vars(orig))
        return res

    def __init__(self, *args, **kwargs):
        self._headers = self._repair_headers()

    # suppress spurious error from mypy
    def __iter__(self):
        return super().__iter__()

    def __getitem__(self, item):
        """
        Warn users that a ``KeyError`` can be expected when a
        mising key is supplied. Ref python/importlib_metadata#371.
        """
        res = super().__getitem__(item)
        if res is None:
            _warn()
        return res

    def _repair_headers(self):
        def redent(value):
            "Correct for RFC822 indentation"
            if not value or '\n' not in value:
                return value
            return textwrap.dedent(' ' * 8 + value)

        headers = [(key, redent(value)) for key, value in vars(self)['_headers']]
        if self._payload:
            headers.append(('Description', self.get_payload()))
        return headers

    @property
    def json(self):
        """
        Convert PackageMetadata to a JSON-compatible format
        per PEP 0566.
        """

        def transform(key):
            value = self.get_all(key) if key in self.multiple_use_keys else self[key]
            if key == 'Keywords':
                value = re.split(r'\s+', value)
            tk = key.lower().replace('-', '_')
            return tk, value

        return dict(map(transform, map(FoldedCase, self)))
python3.12/site-packages/setuptools/_vendor/importlib_metadata/_py39compat.py000064400000002112151732704020023345 0ustar00"""
Compatibility layer with Python 3.8/3.9
"""
from typing import TYPE_CHECKING, Any, Optional

if TYPE_CHECKING:  # pragma: no cover
    # Prevent circular imports on runtime.
    from . import Distribution, EntryPoint
else:
    Distribution = EntryPoint = Any


def normalized_name(dist: Distribution) -> Optional[str]:
    """
    Honor name normalization for distributions that don't provide ``_normalized_name``.
    """
    try:
        return dist._normalized_name
    except AttributeError:
        from . import Prepared  # -> delay to prevent circular imports.

        return Prepared.normalize(getattr(dist, "name", None) or dist.metadata['Name'])


def ep_matches(ep: EntryPoint, **params) -> bool:
    """
    Workaround for ``EntryPoint`` objects without the ``matches`` method.
    """
    try:
        return ep.matches(**params)
    except AttributeError:
        from . import EntryPoint  # -> delay to prevent circular imports.

        # Reconstruct the EntryPoint object to make sure it is compatible.
        return EntryPoint(ep.name, ep.value, ep.group).matches(**params)
python3.12/site-packages/setuptools/_vendor/importlib_metadata/__init__.py000064400000063602151732704020022750 0ustar00import os
import re
import abc
import csv
import sys
from .. import zipp
import email
import pathlib
import operator
import textwrap
import warnings
import functools
import itertools
import posixpath
import collections

from . import _adapters, _meta, _py39compat
from ._collections import FreezableDefaultDict, Pair
from ._compat import (
    NullFinder,
    install,
    pypy_partial,
)
from ._functools import method_cache, pass_none
from ._itertools import always_iterable, unique_everseen
from ._meta import PackageMetadata, SimplePath

from contextlib import suppress
from importlib import import_module
from importlib.abc import MetaPathFinder
from itertools import starmap
from typing import List, Mapping, Optional


__all__ = [
    'Distribution',
    'DistributionFinder',
    'PackageMetadata',
    'PackageNotFoundError',
    'distribution',
    'distributions',
    'entry_points',
    'files',
    'metadata',
    'packages_distributions',
    'requires',
    'version',
]


class PackageNotFoundError(ModuleNotFoundError):
    """The package was not found."""

    def __str__(self):
        return f"No package metadata was found for {self.name}"

    @property
    def name(self):
        (name,) = self.args
        return name


class Sectioned:
    """
    A simple entry point config parser for performance

    >>> for item in Sectioned.read(Sectioned._sample):
    ...     print(item)
    Pair(name='sec1', value='# comments ignored')
    Pair(name='sec1', value='a = 1')
    Pair(name='sec1', value='b = 2')
    Pair(name='sec2', value='a = 2')

    >>> res = Sectioned.section_pairs(Sectioned._sample)
    >>> item = next(res)
    >>> item.name
    'sec1'
    >>> item.value
    Pair(name='a', value='1')
    >>> item = next(res)
    >>> item.value
    Pair(name='b', value='2')
    >>> item = next(res)
    >>> item.name
    'sec2'
    >>> item.value
    Pair(name='a', value='2')
    >>> list(res)
    []
    """

    _sample = textwrap.dedent(
        """
        [sec1]
        # comments ignored
        a = 1
        b = 2

        [sec2]
        a = 2
        """
    ).lstrip()

    @classmethod
    def section_pairs(cls, text):
        return (
            section._replace(value=Pair.parse(section.value))
            for section in cls.read(text, filter_=cls.valid)
            if section.name is not None
        )

    @staticmethod
    def read(text, filter_=None):
        lines = filter(filter_, map(str.strip, text.splitlines()))
        name = None
        for value in lines:
            section_match = value.startswith('[') and value.endswith(']')
            if section_match:
                name = value.strip('[]')
                continue
            yield Pair(name, value)

    @staticmethod
    def valid(line):
        return line and not line.startswith('#')


class DeprecatedTuple:
    """
    Provide subscript item access for backward compatibility.

    >>> recwarn = getfixture('recwarn')
    >>> ep = EntryPoint(name='name', value='value', group='group')
    >>> ep[:]
    ('name', 'value', 'group')
    >>> ep[0]
    'name'
    >>> len(recwarn)
    1
    """

    # Do not remove prior to 2023-05-01 or Python 3.13
    _warn = functools.partial(
        warnings.warn,
        "EntryPoint tuple interface is deprecated. Access members by name.",
        DeprecationWarning,
        stacklevel=pypy_partial(2),
    )

    def __getitem__(self, item):
        self._warn()
        return self._key()[item]


class EntryPoint(DeprecatedTuple):
    """An entry point as defined by Python packaging conventions.

    See `the packaging docs on entry points
    <https://packaging.python.org/specifications/entry-points/>`_
    for more information.

    >>> ep = EntryPoint(
    ...     name=None, group=None, value='package.module:attr [extra1, extra2]')
    >>> ep.module
    'package.module'
    >>> ep.attr
    'attr'
    >>> ep.extras
    ['extra1', 'extra2']
    """

    pattern = re.compile(
        r'(?P<module>[\w.]+)\s*'
        r'(:\s*(?P<attr>[\w.]+)\s*)?'
        r'((?P<extras>\[.*\])\s*)?$'
    )
    """
    A regular expression describing the syntax for an entry point,
    which might look like:

        - module
        - package.module
        - package.module:attribute
        - package.module:object.attribute
        - package.module:attr [extra1, extra2]

    Other combinations are possible as well.

    The expression is lenient about whitespace around the ':',
    following the attr, and following any extras.
    """

    name: str
    value: str
    group: str

    dist: Optional['Distribution'] = None

    def __init__(self, name, value, group):
        vars(self).update(name=name, value=value, group=group)

    def load(self):
        """Load the entry point from its definition. If only a module
        is indicated by the value, return that module. Otherwise,
        return the named object.
        """
        match = self.pattern.match(self.value)
        module = import_module(match.group('module'))
        attrs = filter(None, (match.group('attr') or '').split('.'))
        return functools.reduce(getattr, attrs, module)

    @property
    def module(self):
        match = self.pattern.match(self.value)
        return match.group('module')

    @property
    def attr(self):
        match = self.pattern.match(self.value)
        return match.group('attr')

    @property
    def extras(self):
        match = self.pattern.match(self.value)
        return re.findall(r'\w+', match.group('extras') or '')

    def _for(self, dist):
        vars(self).update(dist=dist)
        return self

    def matches(self, **params):
        """
        EntryPoint matches the given parameters.

        >>> ep = EntryPoint(group='foo', name='bar', value='bing:bong [extra1, extra2]')
        >>> ep.matches(group='foo')
        True
        >>> ep.matches(name='bar', value='bing:bong [extra1, extra2]')
        True
        >>> ep.matches(group='foo', name='other')
        False
        >>> ep.matches()
        True
        >>> ep.matches(extras=['extra1', 'extra2'])
        True
        >>> ep.matches(module='bing')
        True
        >>> ep.matches(attr='bong')
        True
        """
        attrs = (getattr(self, param) for param in params)
        return all(map(operator.eq, params.values(), attrs))

    def _key(self):
        return self.name, self.value, self.group

    def __lt__(self, other):
        return self._key() < other._key()

    def __eq__(self, other):
        return self._key() == other._key()

    def __setattr__(self, name, value):
        raise AttributeError("EntryPoint objects are immutable.")

    def __repr__(self):
        return (
            f'EntryPoint(name={self.name!r}, value={self.value!r}, '
            f'group={self.group!r})'
        )

    def __hash__(self):
        return hash(self._key())


class EntryPoints(tuple):
    """
    An immutable collection of selectable EntryPoint objects.
    """

    __slots__ = ()

    def __getitem__(self, name):  # -> EntryPoint:
        """
        Get the EntryPoint in self matching name.
        """
        try:
            return next(iter(self.select(name=name)))
        except StopIteration:
            raise KeyError(name)

    def select(self, **params):
        """
        Select entry points from self that match the
        given parameters (typically group and/or name).
        """
        return EntryPoints(ep for ep in self if _py39compat.ep_matches(ep, **params))

    @property
    def names(self):
        """
        Return the set of all names of all entry points.
        """
        return {ep.name for ep in self}

    @property
    def groups(self):
        """
        Return the set of all groups of all entry points.
        """
        return {ep.group for ep in self}

    @classmethod
    def _from_text_for(cls, text, dist):
        return cls(ep._for(dist) for ep in cls._from_text(text))

    @staticmethod
    def _from_text(text):
        return (
            EntryPoint(name=item.value.name, value=item.value.value, group=item.name)
            for item in Sectioned.section_pairs(text or '')
        )


class PackagePath(pathlib.PurePosixPath):
    """A reference to a path in a package"""

    def read_text(self, encoding='utf-8'):
        with self.locate().open(encoding=encoding) as stream:
            return stream.read()

    def read_binary(self):
        with self.locate().open('rb') as stream:
            return stream.read()

    def locate(self):
        """Return a path-like object for this path"""
        return self.dist.locate_file(self)


class FileHash:
    def __init__(self, spec):
        self.mode, _, self.value = spec.partition('=')

    def __repr__(self):
        return f'<FileHash mode: {self.mode} value: {self.value}>'


class Distribution(metaclass=abc.ABCMeta):
    """A Python distribution package."""

    @abc.abstractmethod
    def read_text(self, filename):
        """Attempt to load metadata file given by the name.

        :param filename: The name of the file in the distribution info.
        :return: The text if found, otherwise None.
        """

    @abc.abstractmethod
    def locate_file(self, path):
        """
        Given a path to a file in this distribution, return a path
        to it.
        """

    @classmethod
    def from_name(cls, name: str):
        """Return the Distribution for the given package name.

        :param name: The name of the distribution package to search for.
        :return: The Distribution instance (or subclass thereof) for the named
            package, if found.
        :raises PackageNotFoundError: When the named package's distribution
            metadata cannot be found.
        :raises ValueError: When an invalid value is supplied for name.
        """
        if not name:
            raise ValueError("A distribution name is required.")
        try:
            return next(cls.discover(name=name))
        except StopIteration:
            raise PackageNotFoundError(name)

    @classmethod
    def discover(cls, **kwargs):
        """Return an iterable of Distribution objects for all packages.

        Pass a ``context`` or pass keyword arguments for constructing
        a context.

        :context: A ``DistributionFinder.Context`` object.
        :return: Iterable of Distribution objects for all packages.
        """
        context = kwargs.pop('context', None)
        if context and kwargs:
            raise ValueError("cannot accept context and kwargs")
        context = context or DistributionFinder.Context(**kwargs)
        return itertools.chain.from_iterable(
            resolver(context) for resolver in cls._discover_resolvers()
        )

    @staticmethod
    def at(path):
        """Return a Distribution for the indicated metadata path

        :param path: a string or path-like object
        :return: a concrete Distribution instance for the path
        """
        return PathDistribution(pathlib.Path(path))

    @staticmethod
    def _discover_resolvers():
        """Search the meta_path for resolvers."""
        declared = (
            getattr(finder, 'find_distributions', None) for finder in sys.meta_path
        )
        return filter(None, declared)

    @property
    def metadata(self) -> _meta.PackageMetadata:
        """Return the parsed metadata for this Distribution.

        The returned object will have keys that name the various bits of
        metadata.  See PEP 566 for details.
        """
        text = (
            self.read_text('METADATA')
            or self.read_text('PKG-INFO')
            # This last clause is here to support old egg-info files.  Its
            # effect is to just end up using the PathDistribution's self._path
            # (which points to the egg-info file) attribute unchanged.
            or self.read_text('')
        )
        return _adapters.Message(email.message_from_string(text))

    @property
    def name(self):
        """Return the 'Name' metadata for the distribution package."""
        return self.metadata['Name']

    @property
    def _normalized_name(self):
        """Return a normalized version of the name."""
        return Prepared.normalize(self.name)

    @property
    def version(self):
        """Return the 'Version' metadata for the distribution package."""
        return self.metadata['Version']

    @property
    def entry_points(self):
        return EntryPoints._from_text_for(self.read_text('entry_points.txt'), self)

    @property
    def files(self):
        """Files in this distribution.

        :return: List of PackagePath for this distribution or None

        Result is `None` if the metadata file that enumerates files
        (i.e. RECORD for dist-info or SOURCES.txt for egg-info) is
        missing.
        Result may be empty if the metadata exists but is empty.
        """

        def make_file(name, hash=None, size_str=None):
            result = PackagePath(name)
            result.hash = FileHash(hash) if hash else None
            result.size = int(size_str) if size_str else None
            result.dist = self
            return result

        @pass_none
        def make_files(lines):
            return list(starmap(make_file, csv.reader(lines)))

        return make_files(self._read_files_distinfo() or self._read_files_egginfo())

    def _read_files_distinfo(self):
        """
        Read the lines of RECORD
        """
        text = self.read_text('RECORD')
        return text and text.splitlines()

    def _read_files_egginfo(self):
        """
        SOURCES.txt might contain literal commas, so wrap each line
        in quotes.
        """
        text = self.read_text('SOURCES.txt')
        return text and map('"{}"'.format, text.splitlines())

    @property
    def requires(self):
        """Generated requirements specified for this Distribution"""
        reqs = self._read_dist_info_reqs() or self._read_egg_info_reqs()
        return reqs and list(reqs)

    def _read_dist_info_reqs(self):
        return self.metadata.get_all('Requires-Dist')

    def _read_egg_info_reqs(self):
        source = self.read_text('requires.txt')
        return pass_none(self._deps_from_requires_text)(source)

    @classmethod
    def _deps_from_requires_text(cls, source):
        return cls._convert_egg_info_reqs_to_simple_reqs(Sectioned.read(source))

    @staticmethod
    def _convert_egg_info_reqs_to_simple_reqs(sections):
        """
        Historically, setuptools would solicit and store 'extra'
        requirements, including those with environment markers,
        in separate sections. More modern tools expect each
        dependency to be defined separately, with any relevant
        extras and environment markers attached directly to that
        requirement. This method converts the former to the
        latter. See _test_deps_from_requires_text for an example.
        """

        def make_condition(name):
            return name and f'extra == "{name}"'

        def quoted_marker(section):
            section = section or ''
            extra, sep, markers = section.partition(':')
            if extra and markers:
                markers = f'({markers})'
            conditions = list(filter(None, [markers, make_condition(extra)]))
            return '; ' + ' and '.join(conditions) if conditions else ''

        def url_req_space(req):
            """
            PEP 508 requires a space between the url_spec and the quoted_marker.
            Ref python/importlib_metadata#357.
            """
            # '@' is uniquely indicative of a url_req.
            return ' ' * ('@' in req)

        for section in sections:
            space = url_req_space(section.value)
            yield section.value + space + quoted_marker(section.name)


class DistributionFinder(MetaPathFinder):
    """
    A MetaPathFinder capable of discovering installed distributions.
    """

    class Context:
        """
        Keyword arguments presented by the caller to
        ``distributions()`` or ``Distribution.discover()``
        to narrow the scope of a search for distributions
        in all DistributionFinders.

        Each DistributionFinder may expect any parameters
        and should attempt to honor the canonical
        parameters defined below when appropriate.
        """

        name = None
        """
        Specific name for which a distribution finder should match.
        A name of ``None`` matches all distributions.
        """

        def __init__(self, **kwargs):
            vars(self).update(kwargs)

        @property
        def path(self):
            """
            The sequence of directory path that a distribution finder
            should search.

            Typically refers to Python installed package paths such as
            "site-packages" directories and defaults to ``sys.path``.
            """
            return vars(self).get('path', sys.path)

    @abc.abstractmethod
    def find_distributions(self, context=Context()):
        """
        Find distributions.

        Return an iterable of all Distribution instances capable of
        loading the metadata for packages matching the ``context``,
        a DistributionFinder.Context instance.
        """


class FastPath:
    """
    Micro-optimized class for searching a path for
    children.

    >>> FastPath('').children()
    ['...']
    """

    @functools.lru_cache()  # type: ignore
    def __new__(cls, root):
        return super().__new__(cls)

    def __init__(self, root):
        self.root = root

    def joinpath(self, child):
        return pathlib.Path(self.root, child)

    def children(self):
        with suppress(Exception):
            return os.listdir(self.root or '.')
        with suppress(Exception):
            return self.zip_children()
        return []

    def zip_children(self):
        zip_path = zipp.Path(self.root)
        names = zip_path.root.namelist()
        self.joinpath = zip_path.joinpath

        return dict.fromkeys(child.split(posixpath.sep, 1)[0] for child in names)

    def search(self, name):
        return self.lookup(self.mtime).search(name)

    @property
    def mtime(self):
        with suppress(OSError):
            return os.stat(self.root).st_mtime
        self.lookup.cache_clear()

    @method_cache
    def lookup(self, mtime):
        return Lookup(self)


class Lookup:
    def __init__(self, path: FastPath):
        base = os.path.basename(path.root).lower()
        base_is_egg = base.endswith(".egg")
        self.infos = FreezableDefaultDict(list)
        self.eggs = FreezableDefaultDict(list)

        for child in path.children():
            low = child.lower()
            if low.endswith((".dist-info", ".egg-info")):
                # rpartition is faster than splitext and suitable for this purpose.
                name = low.rpartition(".")[0].partition("-")[0]
                normalized = Prepared.normalize(name)
                self.infos[normalized].append(path.joinpath(child))
            elif base_is_egg and low == "egg-info":
                name = base.rpartition(".")[0].partition("-")[0]
                legacy_normalized = Prepared.legacy_normalize(name)
                self.eggs[legacy_normalized].append(path.joinpath(child))

        self.infos.freeze()
        self.eggs.freeze()

    def search(self, prepared):
        infos = (
            self.infos[prepared.normalized]
            if prepared
            else itertools.chain.from_iterable(self.infos.values())
        )
        eggs = (
            self.eggs[prepared.legacy_normalized]
            if prepared
            else itertools.chain.from_iterable(self.eggs.values())
        )
        return itertools.chain(infos, eggs)


class Prepared:
    """
    A prepared search for metadata on a possibly-named package.
    """

    normalized = None
    legacy_normalized = None

    def __init__(self, name):
        self.name = name
        if name is None:
            return
        self.normalized = self.normalize(name)
        self.legacy_normalized = self.legacy_normalize(name)

    @staticmethod
    def normalize(name):
        """
        PEP 503 normalization plus dashes as underscores.
        """
        return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')

    @staticmethod
    def legacy_normalize(name):
        """
        Normalize the package name as found in the convention in
        older packaging tools versions and specs.
        """
        return name.lower().replace('-', '_')

    def __bool__(self):
        return bool(self.name)


@install
class MetadataPathFinder(NullFinder, DistributionFinder):
    """A degenerate finder for distribution packages on the file system.

    This finder supplies only a find_distributions() method for versions
    of Python that do not have a PathFinder find_distributions().
    """

    def find_distributions(self, context=DistributionFinder.Context()):
        """
        Find distributions.

        Return an iterable of all Distribution instances capable of
        loading the metadata for packages matching ``context.name``
        (or all names if ``None`` indicated) along the paths in the list
        of directories ``context.path``.
        """
        found = self._search_paths(context.name, context.path)
        return map(PathDistribution, found)

    @classmethod
    def _search_paths(cls, name, paths):
        """Find metadata directories in paths heuristically."""
        prepared = Prepared(name)
        return itertools.chain.from_iterable(
            path.search(prepared) for path in map(FastPath, paths)
        )

    def invalidate_caches(cls):
        FastPath.__new__.cache_clear()


class PathDistribution(Distribution):
    def __init__(self, path: SimplePath):
        """Construct a distribution.

        :param path: SimplePath indicating the metadata directory.
        """
        self._path = path

    def read_text(self, filename):
        with suppress(
            FileNotFoundError,
            IsADirectoryError,
            KeyError,
            NotADirectoryError,
            PermissionError,
        ):
            return self._path.joinpath(filename).read_text(encoding='utf-8')

    read_text.__doc__ = Distribution.read_text.__doc__

    def locate_file(self, path):
        return self._path.parent / path

    @property
    def _normalized_name(self):
        """
        Performance optimization: where possible, resolve the
        normalized name from the file system path.
        """
        stem = os.path.basename(str(self._path))
        return (
            pass_none(Prepared.normalize)(self._name_from_stem(stem))
            or super()._normalized_name
        )

    @staticmethod
    def _name_from_stem(stem):
        """
        >>> PathDistribution._name_from_stem('foo-3.0.egg-info')
        'foo'
        >>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info')
        'CherryPy'
        >>> PathDistribution._name_from_stem('face.egg-info')
        'face'
        >>> PathDistribution._name_from_stem('foo.bar')
        """
        filename, ext = os.path.splitext(stem)
        if ext not in ('.dist-info', '.egg-info'):
            return
        name, sep, rest = filename.partition('-')
        return name


def distribution(distribution_name):
    """Get the ``Distribution`` instance for the named package.

    :param distribution_name: The name of the distribution package as a string.
    :return: A ``Distribution`` instance (or subclass thereof).
    """
    return Distribution.from_name(distribution_name)


def distributions(**kwargs):
    """Get all ``Distribution`` instances in the current environment.

    :return: An iterable of ``Distribution`` instances.
    """
    return Distribution.discover(**kwargs)


def metadata(distribution_name) -> _meta.PackageMetadata:
    """Get the metadata for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: A PackageMetadata containing the parsed metadata.
    """
    return Distribution.from_name(distribution_name).metadata


def version(distribution_name):
    """Get the version string for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: The version string for the package as defined in the package's
        "Version" metadata key.
    """
    return distribution(distribution_name).version


_unique = functools.partial(
    unique_everseen,
    key=_py39compat.normalized_name,
)
"""
Wrapper for ``distributions`` to return unique distributions by name.
"""


def entry_points(**params) -> EntryPoints:
    """Return EntryPoint objects for all installed packages.

    Pass selection parameters (group or name) to filter the
    result to entry points matching those properties (see
    EntryPoints.select()).

    :return: EntryPoints for all installed packages.
    """
    eps = itertools.chain.from_iterable(
        dist.entry_points for dist in _unique(distributions())
    )
    return EntryPoints(eps).select(**params)


def files(distribution_name):
    """Return a list of files for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: List of files composing the distribution.
    """
    return distribution(distribution_name).files


def requires(distribution_name):
    """
    Return a list of requirements for the named package.

    :return: An iterator of requirements, suitable for
        packaging.requirement.Requirement.
    """
    return distribution(distribution_name).requires


def packages_distributions() -> Mapping[str, List[str]]:
    """
    Return a mapping of top-level packages to their
    distributions.

    >>> import collections.abc
    >>> pkgs = packages_distributions()
    >>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values())
    True
    """
    pkg_to_dist = collections.defaultdict(list)
    for dist in distributions():
        for pkg in _top_level_declared(dist) or _top_level_inferred(dist):
            pkg_to_dist[pkg].append(dist.metadata['Name'])
    return dict(pkg_to_dist)


def _top_level_declared(dist):
    return (dist.read_text('top_level.txt') or '').split()


def _top_level_inferred(dist):
    return {
        f.parts[0] if len(f.parts) > 1 else f.with_suffix('').name
        for f in always_iterable(dist.files)
        if f.suffix == ".py"
    }
python3.12/site-packages/setuptools/_vendor/importlib_metadata/_text.py000064400000004166151732704020022334 0ustar00import re

from ._functools import method_cache


# from jaraco.text 3.5
class FoldedCase(str):
    """
    A case insensitive string class; behaves just like str
    except compares equal when the only variation is case.

    >>> s = FoldedCase('hello world')

    >>> s == 'Hello World'
    True

    >>> 'Hello World' == s
    True

    >>> s != 'Hello World'
    False

    >>> s.index('O')
    4

    >>> s.split('O')
    ['hell', ' w', 'rld']

    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
    ['alpha', 'Beta', 'GAMMA']

    Sequence membership is straightforward.

    >>> "Hello World" in [s]
    True
    >>> s in ["Hello World"]
    True

    You may test for set inclusion, but candidate and elements
    must both be folded.

    >>> FoldedCase("Hello World") in {s}
    True
    >>> s in {FoldedCase("Hello World")}
    True

    String inclusion works as long as the FoldedCase object
    is on the right.

    >>> "hello" in FoldedCase("Hello World")
    True

    But not if the FoldedCase object is on the left:

    >>> FoldedCase('hello') in 'Hello World'
    False

    In that case, use in_:

    >>> FoldedCase('hello').in_('Hello World')
    True

    >>> FoldedCase('hello') > FoldedCase('Hello')
    False
    """

    def __lt__(self, other):
        return self.lower() < other.lower()

    def __gt__(self, other):
        return self.lower() > other.lower()

    def __eq__(self, other):
        return self.lower() == other.lower()

    def __ne__(self, other):
        return self.lower() != other.lower()

    def __hash__(self):
        return hash(self.lower())

    def __contains__(self, other):
        return super().lower().__contains__(other.lower())

    def in_(self, other):
        "Does self appear in other?"
        return self in FoldedCase(other)

    # cache lower since it's likely to be called frequently.
    @method_cache
    def lower(self):
        return super().lower()

    def index(self, sub):
        return self.lower().index(sub.lower())

    def split(self, splitter=' ', maxsplit=0):
        pattern = re.compile(re.escape(splitter), re.I)
        return pattern.split(self, maxsplit)
python3.12/site-packages/setuptools/_vendor/importlib_metadata/py.typed000064400000000000151732704020022315 0ustar00python3.12/site-packages/setuptools/_vendor/importlib_metadata/_meta.py000064400000002215151732704020022267 0ustar00from ._compat import Protocol
from typing import Any, Dict, Iterator, List, TypeVar, Union


_T = TypeVar("_T")


class PackageMetadata(Protocol):
    def __len__(self) -> int:
        ...  # pragma: no cover

    def __contains__(self, item: str) -> bool:
        ...  # pragma: no cover

    def __getitem__(self, key: str) -> str:
        ...  # pragma: no cover

    def __iter__(self) -> Iterator[str]:
        ...  # pragma: no cover

    def get_all(self, name: str, failobj: _T = ...) -> Union[List[Any], _T]:
        """
        Return all values associated with a possibly multi-valued key.
        """

    @property
    def json(self) -> Dict[str, Union[str, List[str]]]:
        """
        A JSON-compatible form of the metadata.
        """


class SimplePath(Protocol[_T]):
    """
    A minimal subset of pathlib.Path required by PathDistribution.
    """

    def joinpath(self) -> _T:
        ...  # pragma: no cover

    def __truediv__(self, other: Union[str, _T]) -> _T:
        ...  # pragma: no cover

    @property
    def parent(self) -> _T:
        ...  # pragma: no cover

    def read_text(self) -> str:
        ...  # pragma: no cover
python3.12/site-packages/setuptools/_vendor/packaging/_elffile.py000064400000006302151732704020021033 0ustar00"""
ELF file parser.

This provides a class ``ELFFile`` that parses an ELF executable in a similar
interface to ``ZipFile``. Only the read interface is implemented.

Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
"""

import enum
import os
import struct
from typing import IO, Optional, Tuple


class ELFInvalid(ValueError):
    pass


class EIClass(enum.IntEnum):
    C32 = 1
    C64 = 2


class EIData(enum.IntEnum):
    Lsb = 1
    Msb = 2


class EMachine(enum.IntEnum):
    I386 = 3
    S390 = 22
    Arm = 40
    X8664 = 62
    AArc64 = 183


class ELFFile:
    """
    Representation of an ELF executable.
    """

    def __init__(self, f: IO[bytes]) -> None:
        self._f = f

        try:
            ident = self._read("16B")
        except struct.error:
            raise ELFInvalid("unable to parse identification")
        magic = bytes(ident[:4])
        if magic != b"\x7fELF":
            raise ELFInvalid(f"invalid magic: {magic!r}")

        self.capacity = ident[4]  # Format for program header (bitness).
        self.encoding = ident[5]  # Data structure encoding (endianness).

        try:
            # e_fmt: Format for program header.
            # p_fmt: Format for section header.
            # p_idx: Indexes to find p_type, p_offset, and p_filesz.
            e_fmt, self._p_fmt, self._p_idx = {
                (1, 1): ("<HHIIIIIHHH", "<IIIIIIII", (0, 1, 4)),  # 32-bit LSB.
                (1, 2): (">HHIIIIIHHH", ">IIIIIIII", (0, 1, 4)),  # 32-bit MSB.
                (2, 1): ("<HHIQQQIHHH", "<IIQQQQQQ", (0, 2, 5)),  # 64-bit LSB.
                (2, 2): (">HHIQQQIHHH", ">IIQQQQQQ", (0, 2, 5)),  # 64-bit MSB.
            }[(self.capacity, self.encoding)]
        except KeyError:
            raise ELFInvalid(
                f"unrecognized capacity ({self.capacity}) or "
                f"encoding ({self.encoding})"
            )

        try:
            (
                _,
                self.machine,  # Architecture type.
                _,
                _,
                self._e_phoff,  # Offset of program header.
                _,
                self.flags,  # Processor-specific flags.
                _,
                self._e_phentsize,  # Size of section.
                self._e_phnum,  # Number of sections.
            ) = self._read(e_fmt)
        except struct.error as e:
            raise ELFInvalid("unable to parse machine and section information") from e

    def _read(self, fmt: str) -> Tuple[int, ...]:
        return struct.unpack(fmt, self._f.read(struct.calcsize(fmt)))

    @property
    def interpreter(self) -> Optional[str]:
        """
        The path recorded in the ``PT_INTERP`` section header.
        """
        for index in range(self._e_phnum):
            self._f.seek(self._e_phoff + self._e_phentsize * index)
            try:
                data = self._read(self._p_fmt)
            except struct.error:
                continue
            if data[self._p_idx[0]] != 3:  # Not PT_INTERP.
                continue
            self._f.seek(data[self._p_idx[1]])
            return os.fsdecode(self._f.read(data[self._p_idx[2]])).strip("\0")
        return None
python3.12/site-packages/setuptools/_vendor/packaging/version.py000064400000037706151732704020020767 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
"""
.. testsetup::

    from packaging.version import parse, Version
"""

import collections
import itertools
import re
from typing import Any, Callable, Optional, SupportsInt, Tuple, Union

from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType

__all__ = ["VERSION_PATTERN", "parse", "Version", "InvalidVersion"]

InfiniteTypes = Union[InfinityType, NegativeInfinityType]
PrePostDevType = Union[InfiniteTypes, Tuple[str, int]]
SubLocalType = Union[InfiniteTypes, int, str]
LocalType = Union[
    NegativeInfinityType,
    Tuple[
        Union[
            SubLocalType,
            Tuple[SubLocalType, str],
            Tuple[NegativeInfinityType, SubLocalType],
        ],
        ...,
    ],
]
CmpKey = Tuple[
    int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType
]
VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool]

_Version = collections.namedtuple(
    "_Version", ["epoch", "release", "dev", "pre", "post", "local"]
)


def parse(version: str) -> "Version":
    """Parse the given version string.

    >>> parse('1.0.dev1')
    <Version('1.0.dev1')>

    :param version: The version string to parse.
    :raises InvalidVersion: When the version string is not a valid version.
    """
    return Version(version)


class InvalidVersion(ValueError):
    """Raised when a version string is not a valid version.

    >>> Version("invalid")
    Traceback (most recent call last):
        ...
    packaging.version.InvalidVersion: Invalid version: 'invalid'
    """


class _BaseVersion:
    _key: Tuple[Any, ...]

    def __hash__(self) -> int:
        return hash(self._key)

    # Please keep the duplicated `isinstance` check
    # in the six comparisons hereunder
    # unless you find a way to avoid adding overhead function calls.
    def __lt__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key < other._key

    def __le__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key <= other._key

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key == other._key

    def __ge__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key >= other._key

    def __gt__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key > other._key

    def __ne__(self, other: object) -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key != other._key


# Deliberately not anchored to the start and end of the string, to make it
# easier for 3rd party code to reuse
_VERSION_PATTERN = r"""
    v?
    (?:
        (?:(?P<epoch>[0-9]+)!)?                           # epoch
        (?P<release>[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P<pre>                                          # pre-release
            [-_\.]?
            (?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P<pre_n>[0-9]+)?
        )?
        (?P<post>                                         # post release
            (?:-(?P<post_n1>[0-9]+))
            |
            (?:
                [-_\.]?
                (?P<post_l>post|rev|r)
                [-_\.]?
                (?P<post_n2>[0-9]+)?
            )
        )?
        (?P<dev>                                          # dev release
            [-_\.]?
            (?P<dev_l>dev)
            [-_\.]?
            (?P<dev_n>[0-9]+)?
        )?
    )
    (?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
"""

VERSION_PATTERN = _VERSION_PATTERN
"""
A string containing the regular expression used to match a valid version.

The pattern is not anchored at either end, and is intended for embedding in larger
expressions (for example, matching a version number as part of a file name). The
regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
flags set.

:meta hide-value:
"""


class Version(_BaseVersion):
    """This class abstracts handling of a project's versions.

    A :class:`Version` instance is comparison aware and can be compared and
    sorted using the standard Python interfaces.

    >>> v1 = Version("1.0a5")
    >>> v2 = Version("1.0")
    >>> v1
    <Version('1.0a5')>
    >>> v2
    <Version('1.0')>
    >>> v1 < v2
    True
    >>> v1 == v2
    False
    >>> v1 > v2
    False
    >>> v1 >= v2
    False
    >>> v1 <= v2
    True
    """

    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
    _key: CmpKey

    def __init__(self, version: str) -> None:
        """Initialize a Version object.

        :param version:
            The string representation of a version which will be parsed and normalized
            before use.
        :raises InvalidVersion:
            If the ``version`` does not conform to PEP 440 in any way then this
            exception will be raised.
        """

        # Validate the version and parse it into pieces
        match = self._regex.search(version)
        if not match:
            raise InvalidVersion(f"Invalid version: '{version}'")

        # Store the parsed out pieces of the version
        self._version = _Version(
            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
            release=tuple(int(i) for i in match.group("release").split(".")),
            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
            post=_parse_letter_version(
                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
            ),
            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
            local=_parse_local_version(match.group("local")),
        )

        # Generate a key which will be used for sorting
        self._key = _cmpkey(
            self._version.epoch,
            self._version.release,
            self._version.pre,
            self._version.post,
            self._version.dev,
            self._version.local,
        )

    def __repr__(self) -> str:
        """A representation of the Version that shows all internal state.

        >>> Version('1.0.0')
        <Version('1.0.0')>
        """
        return f"<Version('{self}')>"

    def __str__(self) -> str:
        """A string representation of the version that can be rounded-tripped.

        >>> str(Version("1.0a5"))
        '1.0a5'
        """
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        # Pre-release
        if self.pre is not None:
            parts.append("".join(str(x) for x in self.pre))

        # Post-release
        if self.post is not None:
            parts.append(f".post{self.post}")

        # Development release
        if self.dev is not None:
            parts.append(f".dev{self.dev}")

        # Local version segment
        if self.local is not None:
            parts.append(f"+{self.local}")

        return "".join(parts)

    @property
    def epoch(self) -> int:
        """The epoch of the version.

        >>> Version("2.0.0").epoch
        0
        >>> Version("1!2.0.0").epoch
        1
        """
        _epoch: int = self._version.epoch
        return _epoch

    @property
    def release(self) -> Tuple[int, ...]:
        """The components of the "release" segment of the version.

        >>> Version("1.2.3").release
        (1, 2, 3)
        >>> Version("2.0.0").release
        (2, 0, 0)
        >>> Version("1!2.0.0.post0").release
        (2, 0, 0)

        Includes trailing zeroes but not the epoch or any pre-release / development /
        post-release suffixes.
        """
        _release: Tuple[int, ...] = self._version.release
        return _release

    @property
    def pre(self) -> Optional[Tuple[str, int]]:
        """The pre-release segment of the version.

        >>> print(Version("1.2.3").pre)
        None
        >>> Version("1.2.3a1").pre
        ('a', 1)
        >>> Version("1.2.3b1").pre
        ('b', 1)
        >>> Version("1.2.3rc1").pre
        ('rc', 1)
        """
        _pre: Optional[Tuple[str, int]] = self._version.pre
        return _pre

    @property
    def post(self) -> Optional[int]:
        """The post-release number of the version.

        >>> print(Version("1.2.3").post)
        None
        >>> Version("1.2.3.post1").post
        1
        """
        return self._version.post[1] if self._version.post else None

    @property
    def dev(self) -> Optional[int]:
        """The development number of the version.

        >>> print(Version("1.2.3").dev)
        None
        >>> Version("1.2.3.dev1").dev
        1
        """
        return self._version.dev[1] if self._version.dev else None

    @property
    def local(self) -> Optional[str]:
        """The local version segment of the version.

        >>> print(Version("1.2.3").local)
        None
        >>> Version("1.2.3+abc").local
        'abc'
        """
        if self._version.local:
            return ".".join(str(x) for x in self._version.local)
        else:
            return None

    @property
    def public(self) -> str:
        """The public portion of the version.

        >>> Version("1.2.3").public
        '1.2.3'
        >>> Version("1.2.3+abc").public
        '1.2.3'
        >>> Version("1.2.3+abc.dev1").public
        '1.2.3'
        """
        return str(self).split("+", 1)[0]

    @property
    def base_version(self) -> str:
        """The "base version" of the version.

        >>> Version("1.2.3").base_version
        '1.2.3'
        >>> Version("1.2.3+abc").base_version
        '1.2.3'
        >>> Version("1!1.2.3+abc.dev1").base_version
        '1!1.2.3'

        The "base version" is the public version of the project without any pre or post
        release markers.
        """
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        return "".join(parts)

    @property
    def is_prerelease(self) -> bool:
        """Whether this version is a pre-release.

        >>> Version("1.2.3").is_prerelease
        False
        >>> Version("1.2.3a1").is_prerelease
        True
        >>> Version("1.2.3b1").is_prerelease
        True
        >>> Version("1.2.3rc1").is_prerelease
        True
        >>> Version("1.2.3dev1").is_prerelease
        True
        """
        return self.dev is not None or self.pre is not None

    @property
    def is_postrelease(self) -> bool:
        """Whether this version is a post-release.

        >>> Version("1.2.3").is_postrelease
        False
        >>> Version("1.2.3.post1").is_postrelease
        True
        """
        return self.post is not None

    @property
    def is_devrelease(self) -> bool:
        """Whether this version is a development release.

        >>> Version("1.2.3").is_devrelease
        False
        >>> Version("1.2.3.dev1").is_devrelease
        True
        """
        return self.dev is not None

    @property
    def major(self) -> int:
        """The first item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").major
        1
        """
        return self.release[0] if len(self.release) >= 1 else 0

    @property
    def minor(self) -> int:
        """The second item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").minor
        2
        >>> Version("1").minor
        0
        """
        return self.release[1] if len(self.release) >= 2 else 0

    @property
    def micro(self) -> int:
        """The third item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").micro
        3
        >>> Version("1").micro
        0
        """
        return self.release[2] if len(self.release) >= 3 else 0


def _parse_letter_version(
    letter: str, number: Union[str, bytes, SupportsInt]
) -> Optional[Tuple[str, int]]:

    if letter:
        # We consider there to be an implicit 0 in a pre-release if there is
        # not a numeral associated with it.
        if number is None:
            number = 0

        # We normalize any letters to their lower case form
        letter = letter.lower()

        # We consider some words to be alternate spellings of other words and
        # in those cases we want to normalize the spellings to our preferred
        # spelling.
        if letter == "alpha":
            letter = "a"
        elif letter == "beta":
            letter = "b"
        elif letter in ["c", "pre", "preview"]:
            letter = "rc"
        elif letter in ["rev", "r"]:
            letter = "post"

        return letter, int(number)
    if not letter and number:
        # We assume if we are given a number, but we are not given a letter
        # then this is using the implicit post release syntax (e.g. 1.0-1)
        letter = "post"

        return letter, int(number)

    return None


_local_version_separators = re.compile(r"[\._-]")


def _parse_local_version(local: str) -> Optional[LocalType]:
    """
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    """
    if local is not None:
        return tuple(
            part.lower() if not part.isdigit() else int(part)
            for part in _local_version_separators.split(local)
        )
    return None


def _cmpkey(
    epoch: int,
    release: Tuple[int, ...],
    pre: Optional[Tuple[str, int]],
    post: Optional[Tuple[str, int]],
    dev: Optional[Tuple[str, int]],
    local: Optional[Tuple[SubLocalType]],
) -> CmpKey:

    # When we compare a release version, we want to compare it with all of the
    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    # leading zeros until we come to something non zero, then take the rest
    # re-reverse it back into the correct order and make it a tuple and use
    # that for our sorting key.
    _release = tuple(
        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
    )

    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    # We'll do this by abusing the pre segment, but we _only_ want to do this
    # if there is not a pre or a post segment. If we have one of those then
    # the normal sorting rules will handle this case correctly.
    if pre is None and post is None and dev is not None:
        _pre: PrePostDevType = NegativeInfinity
    # Versions without a pre-release (except as noted above) should sort after
    # those with one.
    elif pre is None:
        _pre = Infinity
    else:
        _pre = pre

    # Versions without a post segment should sort before those with one.
    if post is None:
        _post: PrePostDevType = NegativeInfinity

    else:
        _post = post

    # Versions without a development segment should sort after those with one.
    if dev is None:
        _dev: PrePostDevType = Infinity

    else:
        _dev = dev

    if local is None:
        # Versions without a local segment should sort before those with one.
        _local: LocalType = NegativeInfinity
    else:
        # Versions with a local segment need that segment parsed to implement
        # the sorting rules in PEP440.
        # - Alpha numeric segments sort before numeric segments
        # - Alpha numeric segments sort lexicographically
        # - Numeric segments sort numerically
        # - Shorter versions sort before longer versions when the prefixes
        #   match exactly
        _local = tuple(
            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
        )

    return epoch, _release, _pre, _post, _dev, _local
python3.12/site-packages/setuptools/_vendor/packaging/_parser.py000064400000023722151732704020020726 0ustar00"""Handwritten parser of dependency specifiers.

The docstring for each __parse_* function contains ENBF-inspired grammar representing
the implementation.
"""

import ast
from typing import Any, List, NamedTuple, Optional, Tuple, Union

from ._tokenizer import DEFAULT_RULES, Tokenizer


class Node:
    def __init__(self, value: str) -> None:
        self.value = value

    def __str__(self) -> str:
        return self.value

    def __repr__(self) -> str:
        return f"<{self.__class__.__name__}('{self}')>"

    def serialize(self) -> str:
        raise NotImplementedError


class Variable(Node):
    def serialize(self) -> str:
        return str(self)


class Value(Node):
    def serialize(self) -> str:
        return f'"{self}"'


class Op(Node):
    def serialize(self) -> str:
        return str(self)


MarkerVar = Union[Variable, Value]
MarkerItem = Tuple[MarkerVar, Op, MarkerVar]
# MarkerAtom = Union[MarkerItem, List["MarkerAtom"]]
# MarkerList = List[Union["MarkerList", MarkerAtom, str]]
# mypy does not support recursive type definition
# https://github.com/python/mypy/issues/731
MarkerAtom = Any
MarkerList = List[Any]


class ParsedRequirement(NamedTuple):
    name: str
    url: str
    extras: List[str]
    specifier: str
    marker: Optional[MarkerList]


# --------------------------------------------------------------------------------------
# Recursive descent parser for dependency specifier
# --------------------------------------------------------------------------------------
def parse_requirement(source: str) -> ParsedRequirement:
    return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))


def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement:
    """
    requirement = WS? IDENTIFIER WS? extras WS? requirement_details
    """
    tokenizer.consume("WS")

    name_token = tokenizer.expect(
        "IDENTIFIER", expected="package name at the start of dependency specifier"
    )
    name = name_token.text
    tokenizer.consume("WS")

    extras = _parse_extras(tokenizer)
    tokenizer.consume("WS")

    url, specifier, marker = _parse_requirement_details(tokenizer)
    tokenizer.expect("END", expected="end of dependency specifier")

    return ParsedRequirement(name, url, extras, specifier, marker)


def _parse_requirement_details(
    tokenizer: Tokenizer,
) -> Tuple[str, str, Optional[MarkerList]]:
    """
    requirement_details = AT URL (WS requirement_marker?)?
                        | specifier WS? (requirement_marker)?
    """

    specifier = ""
    url = ""
    marker = None

    if tokenizer.check("AT"):
        tokenizer.read()
        tokenizer.consume("WS")

        url_start = tokenizer.position
        url = tokenizer.expect("URL", expected="URL after @").text
        if tokenizer.check("END", peek=True):
            return (url, specifier, marker)

        tokenizer.expect("WS", expected="whitespace after URL")

        # The input might end after whitespace.
        if tokenizer.check("END", peek=True):
            return (url, specifier, marker)

        marker = _parse_requirement_marker(
            tokenizer, span_start=url_start, after="URL and whitespace"
        )
    else:
        specifier_start = tokenizer.position
        specifier = _parse_specifier(tokenizer)
        tokenizer.consume("WS")

        if tokenizer.check("END", peek=True):
            return (url, specifier, marker)

        marker = _parse_requirement_marker(
            tokenizer,
            span_start=specifier_start,
            after=(
                "version specifier"
                if specifier
                else "name and no valid version specifier"
            ),
        )

    return (url, specifier, marker)


def _parse_requirement_marker(
    tokenizer: Tokenizer, *, span_start: int, after: str
) -> MarkerList:
    """
    requirement_marker = SEMICOLON marker WS?
    """

    if not tokenizer.check("SEMICOLON"):
        tokenizer.raise_syntax_error(
            f"Expected end or semicolon (after {after})",
            span_start=span_start,
        )
    tokenizer.read()

    marker = _parse_marker(tokenizer)
    tokenizer.consume("WS")

    return marker


def _parse_extras(tokenizer: Tokenizer) -> List[str]:
    """
    extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?
    """
    if not tokenizer.check("LEFT_BRACKET", peek=True):
        return []

    with tokenizer.enclosing_tokens(
        "LEFT_BRACKET",
        "RIGHT_BRACKET",
        around="extras",
    ):
        tokenizer.consume("WS")
        extras = _parse_extras_list(tokenizer)
        tokenizer.consume("WS")

    return extras


def _parse_extras_list(tokenizer: Tokenizer) -> List[str]:
    """
    extras_list = identifier (wsp* ',' wsp* identifier)*
    """
    extras: List[str] = []

    if not tokenizer.check("IDENTIFIER"):
        return extras

    extras.append(tokenizer.read().text)

    while True:
        tokenizer.consume("WS")
        if tokenizer.check("IDENTIFIER", peek=True):
            tokenizer.raise_syntax_error("Expected comma between extra names")
        elif not tokenizer.check("COMMA"):
            break

        tokenizer.read()
        tokenizer.consume("WS")

        extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma")
        extras.append(extra_token.text)

    return extras


def _parse_specifier(tokenizer: Tokenizer) -> str:
    """
    specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS
              | WS? version_many WS?
    """
    with tokenizer.enclosing_tokens(
        "LEFT_PARENTHESIS",
        "RIGHT_PARENTHESIS",
        around="version specifier",
    ):
        tokenizer.consume("WS")
        parsed_specifiers = _parse_version_many(tokenizer)
        tokenizer.consume("WS")

    return parsed_specifiers


def _parse_version_many(tokenizer: Tokenizer) -> str:
    """
    version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)?
    """
    parsed_specifiers = ""
    while tokenizer.check("SPECIFIER"):
        span_start = tokenizer.position
        parsed_specifiers += tokenizer.read().text
        if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True):
            tokenizer.raise_syntax_error(
                ".* suffix can only be used with `==` or `!=` operators",
                span_start=span_start,
                span_end=tokenizer.position + 1,
            )
        if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True):
            tokenizer.raise_syntax_error(
                "Local version label can only be used with `==` or `!=` operators",
                span_start=span_start,
                span_end=tokenizer.position,
            )
        tokenizer.consume("WS")
        if not tokenizer.check("COMMA"):
            break
        parsed_specifiers += tokenizer.read().text
        tokenizer.consume("WS")

    return parsed_specifiers


# --------------------------------------------------------------------------------------
# Recursive descent parser for marker expression
# --------------------------------------------------------------------------------------
def parse_marker(source: str) -> MarkerList:
    return _parse_marker(Tokenizer(source, rules=DEFAULT_RULES))


def _parse_marker(tokenizer: Tokenizer) -> MarkerList:
    """
    marker = marker_atom (BOOLOP marker_atom)+
    """
    expression = [_parse_marker_atom(tokenizer)]
    while tokenizer.check("BOOLOP"):
        token = tokenizer.read()
        expr_right = _parse_marker_atom(tokenizer)
        expression.extend((token.text, expr_right))
    return expression


def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom:
    """
    marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS?
                | WS? marker_item WS?
    """

    tokenizer.consume("WS")
    if tokenizer.check("LEFT_PARENTHESIS", peek=True):
        with tokenizer.enclosing_tokens(
            "LEFT_PARENTHESIS",
            "RIGHT_PARENTHESIS",
            around="marker expression",
        ):
            tokenizer.consume("WS")
            marker: MarkerAtom = _parse_marker(tokenizer)
            tokenizer.consume("WS")
    else:
        marker = _parse_marker_item(tokenizer)
    tokenizer.consume("WS")
    return marker


def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem:
    """
    marker_item = WS? marker_var WS? marker_op WS? marker_var WS?
    """
    tokenizer.consume("WS")
    marker_var_left = _parse_marker_var(tokenizer)
    tokenizer.consume("WS")
    marker_op = _parse_marker_op(tokenizer)
    tokenizer.consume("WS")
    marker_var_right = _parse_marker_var(tokenizer)
    tokenizer.consume("WS")
    return (marker_var_left, marker_op, marker_var_right)


def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar:
    """
    marker_var = VARIABLE | QUOTED_STRING
    """
    if tokenizer.check("VARIABLE"):
        return process_env_var(tokenizer.read().text.replace(".", "_"))
    elif tokenizer.check("QUOTED_STRING"):
        return process_python_str(tokenizer.read().text)
    else:
        tokenizer.raise_syntax_error(
            message="Expected a marker variable or quoted string"
        )


def process_env_var(env_var: str) -> Variable:
    if (
        env_var == "platform_python_implementation"
        or env_var == "python_implementation"
    ):
        return Variable("platform_python_implementation")
    else:
        return Variable(env_var)


def process_python_str(python_str: str) -> Value:
    value = ast.literal_eval(python_str)
    return Value(str(value))


def _parse_marker_op(tokenizer: Tokenizer) -> Op:
    """
    marker_op = IN | NOT IN | OP
    """
    if tokenizer.check("IN"):
        tokenizer.read()
        return Op("in")
    elif tokenizer.check("NOT"):
        tokenizer.read()
        tokenizer.expect("WS", expected="whitespace after 'not'")
        tokenizer.expect("IN", expected="'in' after 'not'")
        return Op("not in")
    elif tokenizer.check("OP"):
        return Op(tokenizer.read().text)
    else:
        return tokenizer.raise_syntax_error(
            "Expected marker operator, one of "
            "<=, <, !=, ==, >=, >, ~=, ===, in, not in"
        )
python3.12/site-packages/setuptools/_vendor/packaging/requirements.py000064400000006327151732704020022020 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import urllib.parse
from typing import Any, List, Optional, Set

from ._parser import parse_requirement as _parse_requirement
from ._tokenizer import ParserSyntaxError
from .markers import Marker, _normalize_extra_values
from .specifiers import SpecifierSet


class InvalidRequirement(ValueError):
    """
    An invalid requirement was found, users should refer to PEP 508.
    """


class Requirement:
    """Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    """

    # TODO: Can we test whether something is contained within a requirement?
    #       If so how do we do that? Do we need to test against the _name_ of
    #       the thing as well as the version? What about the markers?
    # TODO: Can we normalize the name and extra name?

    def __init__(self, requirement_string: str) -> None:
        try:
            parsed = _parse_requirement(requirement_string)
        except ParserSyntaxError as e:
            raise InvalidRequirement(str(e)) from e

        self.name: str = parsed.name
        if parsed.url:
            parsed_url = urllib.parse.urlparse(parsed.url)
            if parsed_url.scheme == "file":
                if urllib.parse.urlunparse(parsed_url) != parsed.url:
                    raise InvalidRequirement("Invalid URL given")
            elif not (parsed_url.scheme and parsed_url.netloc) or (
                not parsed_url.scheme and not parsed_url.netloc
            ):
                raise InvalidRequirement(f"Invalid URL: {parsed.url}")
            self.url: Optional[str] = parsed.url
        else:
            self.url = None
        self.extras: Set[str] = set(parsed.extras if parsed.extras else [])
        self.specifier: SpecifierSet = SpecifierSet(parsed.specifier)
        self.marker: Optional[Marker] = None
        if parsed.marker is not None:
            self.marker = Marker.__new__(Marker)
            self.marker._markers = _normalize_extra_values(parsed.marker)

    def __str__(self) -> str:
        parts: List[str] = [self.name]

        if self.extras:
            formatted_extras = ",".join(sorted(self.extras))
            parts.append(f"[{formatted_extras}]")

        if self.specifier:
            parts.append(str(self.specifier))

        if self.url:
            parts.append(f"@ {self.url}")
            if self.marker:
                parts.append(" ")

        if self.marker:
            parts.append(f"; {self.marker}")

        return "".join(parts)

    def __repr__(self) -> str:
        return f"<Requirement('{self}')>"

    def __hash__(self) -> int:
        return hash((self.__class__.__name__, str(self)))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, Requirement):
            return NotImplemented

        return (
            self.name == other.name
            and self.extras == other.extras
            and self.specifier == other.specifier
            and self.url == other.url
            and self.marker == other.marker
        )
python3.12/site-packages/setuptools/_vendor/packaging/metadata.py000064400000040015151732704020021045 0ustar00import email.feedparser
import email.header
import email.message
import email.parser
import email.policy
import sys
import typing
from typing import Dict, List, Optional, Tuple, Union, cast

if sys.version_info >= (3, 8):  # pragma: no cover
    from typing import TypedDict
else:  # pragma: no cover
    if typing.TYPE_CHECKING:
        from typing_extensions import TypedDict
    else:
        try:
            from typing_extensions import TypedDict
        except ImportError:

            class TypedDict:
                def __init_subclass__(*_args, **_kwargs):
                    pass


# The RawMetadata class attempts to make as few assumptions about the underlying
# serialization formats as possible. The idea is that as long as a serialization
# formats offer some very basic primitives in *some* way then we can support
# serializing to and from that format.
class RawMetadata(TypedDict, total=False):
    """A dictionary of raw core metadata.

    Each field in core metadata maps to a key of this dictionary (when data is
    provided). The key is lower-case and underscores are used instead of dashes
    compared to the equivalent core metadata field. Any core metadata field that
    can be specified multiple times or can hold multiple values in a single
    field have a key with a plural name.

    Core metadata fields that can be specified multiple times are stored as a
    list or dict depending on which is appropriate for the field. Any fields
    which hold multiple values in a single field are stored as a list.

    """

    # Metadata 1.0 - PEP 241
    metadata_version: str
    name: str
    version: str
    platforms: List[str]
    summary: str
    description: str
    keywords: List[str]
    home_page: str
    author: str
    author_email: str
    license: str

    # Metadata 1.1 - PEP 314
    supported_platforms: List[str]
    download_url: str
    classifiers: List[str]
    requires: List[str]
    provides: List[str]
    obsoletes: List[str]

    # Metadata 1.2 - PEP 345
    maintainer: str
    maintainer_email: str
    requires_dist: List[str]
    provides_dist: List[str]
    obsoletes_dist: List[str]
    requires_python: str
    requires_external: List[str]
    project_urls: Dict[str, str]

    # Metadata 2.0
    # PEP 426 attempted to completely revamp the metadata format
    # but got stuck without ever being able to build consensus on
    # it and ultimately ended up withdrawn.
    #
    # However, a number of tools had started emiting METADATA with
    # `2.0` Metadata-Version, so for historical reasons, this version
    # was skipped.

    # Metadata 2.1 - PEP 566
    description_content_type: str
    provides_extra: List[str]

    # Metadata 2.2 - PEP 643
    dynamic: List[str]

    # Metadata 2.3 - PEP 685
    # No new fields were added in PEP 685, just some edge case were
    # tightened up to provide better interoptability.


_STRING_FIELDS = {
    "author",
    "author_email",
    "description",
    "description_content_type",
    "download_url",
    "home_page",
    "license",
    "maintainer",
    "maintainer_email",
    "metadata_version",
    "name",
    "requires_python",
    "summary",
    "version",
}

_LIST_STRING_FIELDS = {
    "classifiers",
    "dynamic",
    "obsoletes",
    "obsoletes_dist",
    "platforms",
    "provides",
    "provides_dist",
    "provides_extra",
    "requires",
    "requires_dist",
    "requires_external",
    "supported_platforms",
}


def _parse_keywords(data: str) -> List[str]:
    """Split a string of comma-separate keyboards into a list of keywords."""
    return [k.strip() for k in data.split(",")]


def _parse_project_urls(data: List[str]) -> Dict[str, str]:
    """Parse a list of label/URL string pairings separated by a comma."""
    urls = {}
    for pair in data:
        # Our logic is slightly tricky here as we want to try and do
        # *something* reasonable with malformed data.
        #
        # The main thing that we have to worry about, is data that does
        # not have a ',' at all to split the label from the Value. There
        # isn't a singular right answer here, and we will fail validation
        # later on (if the caller is validating) so it doesn't *really*
        # matter, but since the missing value has to be an empty str
        # and our return value is dict[str, str], if we let the key
        # be the missing value, then they'd have multiple '' values that
        # overwrite each other in a accumulating dict.
        #
        # The other potentional issue is that it's possible to have the
        # same label multiple times in the metadata, with no solid "right"
        # answer with what to do in that case. As such, we'll do the only
        # thing we can, which is treat the field as unparseable and add it
        # to our list of unparsed fields.
        parts = [p.strip() for p in pair.split(",", 1)]
        parts.extend([""] * (max(0, 2 - len(parts))))  # Ensure 2 items

        # TODO: The spec doesn't say anything about if the keys should be
        #       considered case sensitive or not... logically they should
        #       be case-preserving and case-insensitive, but doing that
        #       would open up more cases where we might have duplicate
        #       entries.
        label, url = parts
        if label in urls:
            # The label already exists in our set of urls, so this field
            # is unparseable, and we can just add the whole thing to our
            # unparseable data and stop processing it.
            raise KeyError("duplicate labels in project urls")
        urls[label] = url

    return urls


def _get_payload(msg: email.message.Message, source: Union[bytes, str]) -> str:
    """Get the body of the message."""
    # If our source is a str, then our caller has managed encodings for us,
    # and we don't need to deal with it.
    if isinstance(source, str):
        payload: str = msg.get_payload()
        return payload
    # If our source is a bytes, then we're managing the encoding and we need
    # to deal with it.
    else:
        bpayload: bytes = msg.get_payload(decode=True)
        try:
            return bpayload.decode("utf8", "strict")
        except UnicodeDecodeError:
            raise ValueError("payload in an invalid encoding")


# The various parse_FORMAT functions here are intended to be as lenient as
# possible in their parsing, while still returning a correctly typed
# RawMetadata.
#
# To aid in this, we also generally want to do as little touching of the
# data as possible, except where there are possibly some historic holdovers
# that make valid data awkward to work with.
#
# While this is a lower level, intermediate format than our ``Metadata``
# class, some light touch ups can make a massive difference in usability.

# Map METADATA fields to RawMetadata.
_EMAIL_TO_RAW_MAPPING = {
    "author": "author",
    "author-email": "author_email",
    "classifier": "classifiers",
    "description": "description",
    "description-content-type": "description_content_type",
    "download-url": "download_url",
    "dynamic": "dynamic",
    "home-page": "home_page",
    "keywords": "keywords",
    "license": "license",
    "maintainer": "maintainer",
    "maintainer-email": "maintainer_email",
    "metadata-version": "metadata_version",
    "name": "name",
    "obsoletes": "obsoletes",
    "obsoletes-dist": "obsoletes_dist",
    "platform": "platforms",
    "project-url": "project_urls",
    "provides": "provides",
    "provides-dist": "provides_dist",
    "provides-extra": "provides_extra",
    "requires": "requires",
    "requires-dist": "requires_dist",
    "requires-external": "requires_external",
    "requires-python": "requires_python",
    "summary": "summary",
    "supported-platform": "supported_platforms",
    "version": "version",
}


def parse_email(data: Union[bytes, str]) -> Tuple[RawMetadata, Dict[str, List[str]]]:
    """Parse a distribution's metadata.

    This function returns a two-item tuple of dicts. The first dict is of
    recognized fields from the core metadata specification. Fields that can be
    parsed and translated into Python's built-in types are converted
    appropriately. All other fields are left as-is. Fields that are allowed to
    appear multiple times are stored as lists.

    The second dict contains all other fields from the metadata. This includes
    any unrecognized fields. It also includes any fields which are expected to
    be parsed into a built-in type but were not formatted appropriately. Finally,
    any fields that are expected to appear only once but are repeated are
    included in this dict.

    """
    raw: Dict[str, Union[str, List[str], Dict[str, str]]] = {}
    unparsed: Dict[str, List[str]] = {}

    if isinstance(data, str):
        parsed = email.parser.Parser(policy=email.policy.compat32).parsestr(data)
    else:
        parsed = email.parser.BytesParser(policy=email.policy.compat32).parsebytes(data)

    # We have to wrap parsed.keys() in a set, because in the case of multiple
    # values for a key (a list), the key will appear multiple times in the
    # list of keys, but we're avoiding that by using get_all().
    for name in frozenset(parsed.keys()):
        # Header names in RFC are case insensitive, so we'll normalize to all
        # lower case to make comparisons easier.
        name = name.lower()

        # We use get_all() here, even for fields that aren't multiple use,
        # because otherwise someone could have e.g. two Name fields, and we
        # would just silently ignore it rather than doing something about it.
        headers = parsed.get_all(name)

        # The way the email module works when parsing bytes is that it
        # unconditionally decodes the bytes as ascii using the surrogateescape
        # handler. When you pull that data back out (such as with get_all() ),
        # it looks to see if the str has any surrogate escapes, and if it does
        # it wraps it in a Header object instead of returning the string.
        #
        # As such, we'll look for those Header objects, and fix up the encoding.
        value = []
        # Flag if we have run into any issues processing the headers, thus
        # signalling that the data belongs in 'unparsed'.
        valid_encoding = True
        for h in headers:
            # It's unclear if this can return more types than just a Header or
            # a str, so we'll just assert here to make sure.
            assert isinstance(h, (email.header.Header, str))

            # If it's a header object, we need to do our little dance to get
            # the real data out of it. In cases where there is invalid data
            # we're going to end up with mojibake, but there's no obvious, good
            # way around that without reimplementing parts of the Header object
            # ourselves.
            #
            # That should be fine since, if mojibacked happens, this key is
            # going into the unparsed dict anyways.
            if isinstance(h, email.header.Header):
                # The Header object stores it's data as chunks, and each chunk
                # can be independently encoded, so we'll need to check each
                # of them.
                chunks: List[Tuple[bytes, Optional[str]]] = []
                for bin, encoding in email.header.decode_header(h):
                    try:
                        bin.decode("utf8", "strict")
                    except UnicodeDecodeError:
                        # Enable mojibake.
                        encoding = "latin1"
                        valid_encoding = False
                    else:
                        encoding = "utf8"
                    chunks.append((bin, encoding))

                # Turn our chunks back into a Header object, then let that
                # Header object do the right thing to turn them into a
                # string for us.
                value.append(str(email.header.make_header(chunks)))
            # This is already a string, so just add it.
            else:
                value.append(h)

        # We've processed all of our values to get them into a list of str,
        # but we may have mojibake data, in which case this is an unparsed
        # field.
        if not valid_encoding:
            unparsed[name] = value
            continue

        raw_name = _EMAIL_TO_RAW_MAPPING.get(name)
        if raw_name is None:
            # This is a bit of a weird situation, we've encountered a key that
            # we don't know what it means, so we don't know whether it's meant
            # to be a list or not.
            #
            # Since we can't really tell one way or another, we'll just leave it
            # as a list, even though it may be a single item list, because that's
            # what makes the most sense for email headers.
            unparsed[name] = value
            continue

        # If this is one of our string fields, then we'll check to see if our
        # value is a list of a single item. If it is then we'll assume that
        # it was emitted as a single string, and unwrap the str from inside
        # the list.
        #
        # If it's any other kind of data, then we haven't the faintest clue
        # what we should parse it as, and we have to just add it to our list
        # of unparsed stuff.
        if raw_name in _STRING_FIELDS and len(value) == 1:
            raw[raw_name] = value[0]
        # If this is one of our list of string fields, then we can just assign
        # the value, since email *only* has strings, and our get_all() call
        # above ensures that this is a list.
        elif raw_name in _LIST_STRING_FIELDS:
            raw[raw_name] = value
        # Special Case: Keywords
        # The keywords field is implemented in the metadata spec as a str,
        # but it conceptually is a list of strings, and is serialized using
        # ", ".join(keywords), so we'll do some light data massaging to turn
        # this into what it logically is.
        elif raw_name == "keywords" and len(value) == 1:
            raw[raw_name] = _parse_keywords(value[0])
        # Special Case: Project-URL
        # The project urls is implemented in the metadata spec as a list of
        # specially-formatted strings that represent a key and a value, which
        # is fundamentally a mapping, however the email format doesn't support
        # mappings in a sane way, so it was crammed into a list of strings
        # instead.
        #
        # We will do a little light data massaging to turn this into a map as
        # it logically should be.
        elif raw_name == "project_urls":
            try:
                raw[raw_name] = _parse_project_urls(value)
            except KeyError:
                unparsed[name] = value
        # Nothing that we've done has managed to parse this, so it'll just
        # throw it in our unparseable data and move on.
        else:
            unparsed[name] = value

    # We need to support getting the Description from the message payload in
    # addition to getting it from the the headers. This does mean, though, there
    # is the possibility of it being set both ways, in which case we put both
    # in 'unparsed' since we don't know which is right.
    try:
        payload = _get_payload(parsed, data)
    except ValueError:
        unparsed.setdefault("description", []).append(
            parsed.get_payload(decode=isinstance(data, bytes))
        )
    else:
        if payload:
            # Check to see if we've already got a description, if so then both
            # it, and this body move to unparseable.
            if "description" in raw:
                description_header = cast(str, raw.pop("description"))
                unparsed.setdefault("description", []).extend(
                    [description_header, payload]
                )
            elif "description" in unparsed:
                unparsed["description"].append(payload)
            else:
                raw["description"] = payload

    # We need to cast our `raw` to a metadata, because a TypedDict only support
    # literal key names, but we're computing our key names on purpose, but the
    # way this function is implemented, our `TypedDict` can only have valid key
    # names.
    return cast(RawMetadata, raw), unparsed
python3.12/site-packages/setuptools/_vendor/packaging/markers.py000064400000020020151732704020020723 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import operator
import os
import platform
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

from ._parser import (
    MarkerAtom,
    MarkerList,
    Op,
    Value,
    Variable,
    parse_marker as _parse_marker,
)
from ._tokenizer import ParserSyntaxError
from .specifiers import InvalidSpecifier, Specifier
from .utils import canonicalize_name

__all__ = [
    "InvalidMarker",
    "UndefinedComparison",
    "UndefinedEnvironmentName",
    "Marker",
    "default_environment",
]

Operator = Callable[[str, str], bool]


class InvalidMarker(ValueError):
    """
    An invalid marker was found, users should refer to PEP 508.
    """


class UndefinedComparison(ValueError):
    """
    An invalid operation was attempted on a value that doesn't support it.
    """


class UndefinedEnvironmentName(ValueError):
    """
    A name was attempted to be used that does not exist inside of the
    environment.
    """


def _normalize_extra_values(results: Any) -> Any:
    """
    Normalize extra values.
    """
    if isinstance(results[0], tuple):
        lhs, op, rhs = results[0]
        if isinstance(lhs, Variable) and lhs.value == "extra":
            normalized_extra = canonicalize_name(rhs.value)
            rhs = Value(normalized_extra)
        elif isinstance(rhs, Variable) and rhs.value == "extra":
            normalized_extra = canonicalize_name(lhs.value)
            lhs = Value(normalized_extra)
        results[0] = lhs, op, rhs
    return results


def _format_marker(
    marker: Union[List[str], MarkerAtom, str], first: Optional[bool] = True
) -> str:

    assert isinstance(marker, (list, tuple, str))

    # Sometimes we have a structure like [[...]] which is a single item list
    # where the single item is itself it's own list. In that case we want skip
    # the rest of this function so that we don't get extraneous () on the
    # outside.
    if (
        isinstance(marker, list)
        and len(marker) == 1
        and isinstance(marker[0], (list, tuple))
    ):
        return _format_marker(marker[0])

    if isinstance(marker, list):
        inner = (_format_marker(m, first=False) for m in marker)
        if first:
            return " ".join(inner)
        else:
            return "(" + " ".join(inner) + ")"
    elif isinstance(marker, tuple):
        return " ".join([m.serialize() for m in marker])
    else:
        return marker


_operators: Dict[str, Operator] = {
    "in": lambda lhs, rhs: lhs in rhs,
    "not in": lambda lhs, rhs: lhs not in rhs,
    "<": operator.lt,
    "<=": operator.le,
    "==": operator.eq,
    "!=": operator.ne,
    ">=": operator.ge,
    ">": operator.gt,
}


def _eval_op(lhs: str, op: Op, rhs: str) -> bool:
    try:
        spec = Specifier("".join([op.serialize(), rhs]))
    except InvalidSpecifier:
        pass
    else:
        return spec.contains(lhs, prereleases=True)

    oper: Optional[Operator] = _operators.get(op.serialize())
    if oper is None:
        raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.")

    return oper(lhs, rhs)


def _normalize(*values: str, key: str) -> Tuple[str, ...]:
    # PEP 685 – Comparison of extra names for optional distribution dependencies
    # https://peps.python.org/pep-0685/
    # > When comparing extra names, tools MUST normalize the names being
    # > compared using the semantics outlined in PEP 503 for names
    if key == "extra":
        return tuple(canonicalize_name(v) for v in values)

    # other environment markers don't have such standards
    return values


def _evaluate_markers(markers: MarkerList, environment: Dict[str, str]) -> bool:
    groups: List[List[bool]] = [[]]

    for marker in markers:
        assert isinstance(marker, (list, tuple, str))

        if isinstance(marker, list):
            groups[-1].append(_evaluate_markers(marker, environment))
        elif isinstance(marker, tuple):
            lhs, op, rhs = marker

            if isinstance(lhs, Variable):
                environment_key = lhs.value
                lhs_value = environment[environment_key]
                rhs_value = rhs.value
            else:
                lhs_value = lhs.value
                environment_key = rhs.value
                rhs_value = environment[environment_key]

            lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key)
            groups[-1].append(_eval_op(lhs_value, op, rhs_value))
        else:
            assert marker in ["and", "or"]
            if marker == "or":
                groups.append([])

    return any(all(item) for item in groups)


def format_full_version(info: "sys._version_info") -> str:
    version = "{0.major}.{0.minor}.{0.micro}".format(info)
    kind = info.releaselevel
    if kind != "final":
        version += kind[0] + str(info.serial)
    return version


def default_environment() -> Dict[str, str]:
    iver = format_full_version(sys.implementation.version)
    implementation_name = sys.implementation.name
    return {
        "implementation_name": implementation_name,
        "implementation_version": iver,
        "os_name": os.name,
        "platform_machine": platform.machine(),
        "platform_release": platform.release(),
        "platform_system": platform.system(),
        "platform_version": platform.version(),
        "python_full_version": platform.python_version(),
        "platform_python_implementation": platform.python_implementation(),
        "python_version": ".".join(platform.python_version_tuple()[:2]),
        "sys_platform": sys.platform,
    }


class Marker:
    def __init__(self, marker: str) -> None:
        # Note: We create a Marker object without calling this constructor in
        #       packaging.requirements.Requirement. If any additional logic is
        #       added here, make sure to mirror/adapt Requirement.
        try:
            self._markers = _normalize_extra_values(_parse_marker(marker))
            # The attribute `_markers` can be described in terms of a recursive type:
            # MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]]
            #
            # For example, the following expression:
            # python_version > "3.6" or (python_version == "3.6" and os_name == "unix")
            #
            # is parsed into:
            # [
            #     (<Variable('python_version')>, <Op('>')>, <Value('3.6')>),
            #     'and',
            #     [
            #         (<Variable('python_version')>, <Op('==')>, <Value('3.6')>),
            #         'or',
            #         (<Variable('os_name')>, <Op('==')>, <Value('unix')>)
            #     ]
            # ]
        except ParserSyntaxError as e:
            raise InvalidMarker(str(e)) from e

    def __str__(self) -> str:
        return _format_marker(self._markers)

    def __repr__(self) -> str:
        return f"<Marker('{self}')>"

    def __hash__(self) -> int:
        return hash((self.__class__.__name__, str(self)))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, Marker):
            return NotImplemented

        return str(self) == str(other)

    def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
        """Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        """
        current_environment = default_environment()
        current_environment["extra"] = ""
        if environment is not None:
            current_environment.update(environment)
            # The API used to allow setting extra to None. We need to handle this
            # case for backwards compatibility.
            if current_environment["extra"] is None:
                current_environment["extra"] = ""

        return _evaluate_markers(self._markers, current_environment)
python3.12/site-packages/setuptools/_vendor/packaging/__pycache__/__init__.cpython-312.pyc000064400000001161151732704020025364 0ustar00�

��_i���*�dZdZdZdZdZdZdZdezZy)	�	packagingz"Core utilities for Python packagesz!https://github.com/pypa/packagingz23.1z)Donald Stufft and individual contributorszdonald@stufft.iozBSD-2-Clause or Apache-2.0z2014-2019 %sN)�	__title__�__summary__�__uri__�__version__�
__author__�	__email__�__license__�
__copyright__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/__init__.py�<module>rs4��

�	�2��
-����
8�
��	�*����+�
rpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/_structures.cpython-312.pyc000064400000006347151732704020026222 0ustar00�

��_i���H�Gd�d�Ze�ZGd�d�Ze�Zy)c��eZdZdefd�Zdefd�Zdedefd�Z	dedefd�Z
dedefd�Zdedefd�Zdedefd	�Z
d
eddfd�Zy
)�InfinityType�returnc��y)N�Infinity���selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/_structures.py�__repr__zInfinityType.__repr__s���c�*�tt|��S�N��hash�reprrs r
�__hash__zInfinityType.__hash__
����D��J��r�otherc��y�NFr�r	rs  r
�__lt__zInfinityType.__lt__
���rc��yrrrs  r
�__le__zInfinityType.__le__rrc�.�t||j�Sr��
isinstance�	__class__rs  r
�__eq__zInfinityType.__eq__����%����0�0rc��y�NTrrs  r
�__gt__zInfinityType.__gt__���rc��yr#rrs  r
�__ge__zInfinityType.__ge__r%rr	�NegativeInfinityTypec��tSr)�NegativeInfinityrs r
�__neg__zInfinityType.__neg__s���rN)�__name__�
__module__�__qualname__�strr�intr�object�boolrrr r$r'r+rrr
rrs����#�� �#� ��F��t���F��t��1�F�1�t�1��F��t���F��t�� �f� �!7� rrc��eZdZdefd�Zdefd�Zdedefd�Z	dedefd�Z
dedefd�Zdedefd�Zdedefd	�Z
d
edefd�Zy)
r(rc��y)Nz	-Infinityrrs r
rzNegativeInfinityType.__repr__$s��rc�*�tt|��Srrrs r
rzNegativeInfinityType.__hash__'rrrc��yr#rrs  r
rzNegativeInfinityType.__lt__*r%rc��yr#rrs  r
rzNegativeInfinityType.__le__-r%rc�.�t||j�Srrrs  r
r zNegativeInfinityType.__eq__0r!rc��yrrrs  r
r$zNegativeInfinityType.__gt__3rrc��yrrrs  r
r'zNegativeInfinityType.__ge__6rrr	c��tSr)rrs r
r+zNegativeInfinityType.__neg__9s���rN)r,r-r.r/rr0rr1r2rrr r$r'rr+rrr
r(r(#s����#�� �#� ��F��t���F��t��1�F�1�t�1��F��t���F��t���f���rr(N)rrr(r*rrr
�<module>r<s-�� � �4�>����4(�)�rpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc000064400000011731151732704020025376 0ustar00�

��_i�����dZddlZddlZddlZddlmZmZmZGd�de�Z	Gd�dej�ZGd�d	ej�ZGd
�dej�Z
Gd�d
�Zy)a;
ELF file parser.

This provides a class ``ELFFile`` that parses an ELF executable in a similar
interface to ``ZipFile``. Only the read interface is implemented.

Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
�N)�IO�Optional�Tuplec��eZdZy)�
ELFInvalidN)�__name__�
__module__�__qualname__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/_elffile.pyrrs��rrc��eZdZdZdZy)�EIClass��N)rr	r
�C32�C64rrr
rr���
�C�
�Crrc��eZdZdZdZy)�EIDatarrN)rr	r
�Lsb�Msbrrr
rrrrrc� �eZdZdZdZdZdZdZy)�EMachine���(�>�N)rr	r
�I386�S390�Arm�X8664�AArc64rrr
rrs���D�
�D�
�C��E�
�Frrc�\�eZdZdZdeeddfd�Zdedee	dffd�Z
edeefd	��Z
y)
�ELFFilez.
    Representation of an ELF executable.
    �f�returnNc
�b�||_	|jd�}t|dd�}|dk7rt	d|����|d|_|d|_	ddd	d
d�|j|jf\}|_|_		|j|�\
}|_}}|_}|_
}|_|_y#tj$rt	d��wxYw#t$r't	d|j�d
|j�d���wxYw#tj$r}t	d�|�d}~wwxYw)N�16Bzunable to parse identification�sELFzinvalid magic: �)z<HHIIIIIHHHz	<IIIIIIII�rrr+)z>HHIIIIIHHHz	>IIIIIIIIr-)z<HHIQQQIHHHz	<IIQQQQQQ�rrr,)z>HHIQQQIHHHz	>IIQQQQQQr.))rr)rr)rr)rrzunrecognized capacity (z) or encoding (�)z/unable to parse machine and section information)�_f�_read�struct�errorr�bytes�capacity�encoding�_p_fmt�_p_idx�KeyError�machine�_e_phoff�flags�_e_phentsize�_e_phnum)�selfr'�ident�magic�e_fmt�_�es       r
�__init__zELFFile.__init__,sb�����	?��J�J�u�%�E��e�B�Q�i� ���J����u�i�8�9�9��a���
��a���
�	�
@�?�?�?�	/�
�}�}�d�m�m�,�/.�+�E�4�;���	W��
�
�5�!�
�������
���
���!��
��I�|�|�	?��=�>�>�	?��&�	��)�$�-�-��9�!�]�]�O�1�.��
�	��&�|�|�	W��N�O�UV�V��	W�s/�B5�.C�?5D
�5C�0D�
D.�D)�)D.�fmt.c��tj||jjtj|���S)N)r2�unpackr0�read�calcsize)r?rFs  r
r1z
ELFFile._readZs)���}�}�S�$�'�'�,�,�v���s�/C�"D�E�Erc�*�t|j�D]�}|jj|j|j
|zz�	|j
|j�}||jddk7r�j|jj||jd�tj|jj||jd��jd�cSy#tj$rY��wxYw)zH
        The path recorded in the ``PT_INTERP`` section header.
        rrrr�N)�ranger>r0�seekr;r=r1r7r2r3r8�os�fsdecoderI�strip)r?�index�datas   r
�interpreterzELFFile.interpreter]s���
�4�=�=�)�E��G�G�L�L�����):�):�U�)B�B�C�
��z�z�$�+�+�.���D�K�K��N�#�q�(���G�G�L�L��d�k�k�!�n�-�.��;�;�t�w�w�|�|�D����Q��,@�A�B�H�H��N�N�*���
�<�<�
��
�s�C<�<D�D)rr	r
�__doc__rr4rE�strr�intr1�propertyrrTrrr
r&r&'s_���,W�"�U�)�,W��,W�\F��F��s�C�x��F���X�c�]���rr&)rU�enumrOr2�typingrrr�
ValueErrorr�IntEnumrrrr&rrr
�<module>r]sc����	�
�&�&�	��	��d�l�l��
�T�\�\��
�t�|�|��E�Erpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/_parser.cpython-312.pyc000064400000033043151732704020025264 0ustar00�

��_i�'���dZddlZddlmZmZmZmZmZmZddl	m
Z
mZGd�d�ZGd�d	e�Z
Gd
�de�ZGd�d
e�Zee
efZeeeefZeZeeZGd�de�Zdedefd�Zdedefd�Zdedeeeeeffd�Zdedededefd�Zdedeefd�Zdedeefd�Zdedefd�Zdedefd�Zdedefd�Zdedefd�Z dedefd�Z!dedefd �Z"dedefd!�Z#d"ede
fd#�Z$d$edefd%�Z%dedefd&�Z&y)'z�Handwritten parser of dependency specifiers.

The docstring for each __parse_* function contains ENBF-inspired grammar representing
the implementation.
�N)�Any�List�
NamedTuple�Optional�Tuple�Union�)�
DEFAULT_RULES�	Tokenizerc�@�eZdZdeddfd�Zdefd�Zdefd�Zdefd�Zy)�Node�value�returnNc��||_y�N�r)�selfrs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/_parser.py�__init__z
Node.__init__s	����
�c��|jSrr�rs r�__str__zNode.__str__s���z�z�rc�<�d|jj�d|�d�S)N�<z('z')>)�	__class__�__name__rs r�__repr__z
Node.__repr__s"���4�>�>�*�*�+�2�d�V�3�7�7rc��t�r)�NotImplementedErrorrs r�	serializezNode.serializes��!�!r)r�
__module__�__qualname__�strrrrr!�rrr
r

s9���c��d�����8�#�8�"�3�"rr
c��eZdZdefd�Zy)�Variablerc��t|�Sr�r$rs rr!zVariable.serialize����4�y�rN�rr"r#r$r!r%rrr'r'����3�rr'c��eZdZdefd�Zy)�Valuerc��d|�d�S)N�"r%rs rr!zValue.serialize!s���4�&��{�rNr+r%rrr.r. s���3�rr.c��eZdZdefd�Zy)�Oprc��t|�Srr)rs rr!zOp.serialize&r*rNr+r%rrr2r2%r,rr2c�L�eZdZUeed<eed<eeed<eed<eeed<y)�ParsedRequirement�name�url�extras�	specifier�markerN)rr"r#r$�__annotations__rr�
MarkerListr%rrr5r54s&��

�I�	�H���I���N��Z� � rr5�sourcerc�6�tt|t���S�N)�rules)�_parse_requirementrr
�r=s r�parse_requirementrC?s���i��m�D�E�Er�	tokenizerc��|jd�|jdd��}|j}|jd�t|�}|jd�t	|�\}}}|jdd��t|||||�S)zI
    requirement = WS? IDENTIFIER WS? extras WS? requirement_details
    �WS�
IDENTIFIERz1package name at the start of dependency specifier��expected�ENDzend of dependency specifier)�consume�expect�text�
_parse_extras�_parse_requirement_detailsr5)rD�
name_tokenr6r8r7r9r:s       rrArACs������d���!�!��R�"��J��?�?�D�
���d��
�9�
%�F�
���d��7�	�B��C��F�
���U�%B��C��T�3��	�6�B�Brc��d}d}d}|jd�r�|j�|jd�|j}|j	dd��j
}|jdd	�
�r|||fS|j	dd��|jdd	�
�r|||fSt
||d�
�}nR|j}t|�}|jd�|jdd	�
�r|||fSt
|||rdnd�
�}|||fS)z~
    requirement_details = AT URL (WS requirement_marker?)?
                        | specifier WS? (requirement_marker)?
    �N�ATrF�URLzURL after @rHrJT��peekzwhitespace after URLzURL and whitespace)�
span_start�after�version specifierz#name and no valid version specifier)�check�readrK�positionrLrM�_parse_requirement_marker�_parse_specifier)rDr9r7r:�	url_start�specifier_starts      rrOrOXs-���I�
�C�
�F����t���������$���&�&�	����u�}��=�B�B���?�?�5�t�?�,���F�+�+�����(>��?��?�?�5�t�?�,���F�+�+�*��)�3G�
��$�,�,��$�Y�/�	����$���?�?�5�t�?�,���F�+�+�*��&��$�:�

��
��F�#�#rrWrXc��|jd�s|jd|�d�|��|j�t|�}|j	d�|S)z3
    requirement_marker = SEMICOLON marker WS?
    �	SEMICOLONz!Expected end or semicolon (after �))rWrF)rZ�raise_syntax_errorr[�
_parse_markerrK)rDrWrXr:s    rr]r]�s[���?�?�;�'��$�$�/��w�a�8�!�	%�	
��N�N��
�9�
%�F�
���d���Mrc���|jdd��sgS|jddd��5|jd�t|�}|jd�ddd�|S#1swYSxYw)	zG
    extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?
    �LEFT_BRACKETTrU�
RIGHT_BRACKETr8��aroundrFN)rZ�enclosing_tokensrK�_parse_extras_list)rDr8s  rrNrN�sv���?�?�>��?�5��	�	�	#�	#����
$�
�
	���$��#�I�.�����$��
��M�
��M�s�.A"�"A,c��g}|jd�s|S|j|j�j�	|j	d�|jdd��r|jd�n|jd�s	|S|j�|j	d�|j
dd��}|j|j���)	z>
    extras_list = identifier (wsp* ',' wsp* identifier)*
    rGTrFrUz"Expected comma between extra names�COMMAzextra name after commarH)rZ�appendr[rMrKrdrL)rDr8�extra_tokens   rrlrl�s����F��?�?�<�(��
�
�M�M�)�.�.�"�'�'�(�
����$���?�?�<�d�?�3��(�(�)M�N�����)���M�
	�������$���&�&�|�>V�&�W���
�
�k�&�&�'�rc��|jddd��5|jd�t|�}|jd�ddd�|S#1swYSxYw)zr
    specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS
              | WS? version_many WS?
    �LEFT_PARENTHESIS�RIGHT_PARENTHESISrYrirFN)rkrK�_parse_version_many)rD�parsed_specifierss  rr^r^�sd��

�	#�	#���"�
$�
�
	���$��/�	�:�����$��
���
���s�.A
�
Ac��d}|jd�r�|j}||j�jz
}|jdd��r!|j	d||jdz��|jd	d��r|j	d
||j��|jd�|jd�s	|S||j�jz
}|jd�|jd�r��|S)
z@
    version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)?
    rR�	SPECIFIER�VERSION_PREFIX_TRAILTrUz6.* suffix can only be used with `==` or `!=` operatorsr	)rW�span_end�VERSION_LOCAL_LABEL_TRAILz@Local version label can only be used with `==` or `!=` operatorsrFrn)rZr\r[rMrdrK)rDrurWs   rrtrt�s����
�/�/�+�
&��'�'�
��Y�^�^�-�2�2�2���?�?�1��?�=��(�(�H�%�"�+�+�a�/�
)�
�
�?�?�6�T�?�B��(�(�R�%�"�+�+�
)�
�
	���$�����w�'����	�Y�^�^�-�2�2�2�����$��'�/�/�+�
&�*�rc�6�tt|t���Sr?)rerr
rBs r�parse_markerr|�s����6��?�@�@rc���t|�g}|jd�rJ|j�}t|�}|j|j|f�|jd�r�J|S)z4
    marker = marker_atom (BOOLOP marker_atom)+
    �BOOLOP)�_parse_marker_atomrZr[�extendrM)rD�
expression�token�
expr_rights    rreres`��%�Y�/�0�J�
�/�/�(�
#���� ��'�	�2�
����5�:�:�z�2�3��/�/�(�
#��rc�4�|jd�|jdd��rK|jddd��5|jd�t|�}|jd�ddd�nt	|�}|jd�S#1swY�xYw)	zw
    marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS?
                | WS? marker_item WS?
    rFrrTrUrszmarker expressionriN)rKrZrkre�_parse_marker_item)rDr:s  rrrs������d�����)���5�
�
'�
'���&�(�
�

���d�#�!.�y�!9�F����d�#�
�
�$�I�.��
���d���M�
�
�s�.B�Bc���|jd�t|�}|jd�t|�}|jd�t|�}|jd�|||fS)zG
    marker_item = WS? marker_var WS? marker_op WS? marker_var WS?
    rF)rK�_parse_marker_var�_parse_marker_op)rD�marker_var_left�	marker_op�marker_var_rights    rr�r�$si�����d��'�	�2�O�
���d�� ��+�I�
���d��(��3��
���d���Y�(8�9�9rc��|jd�r3t|j�jj	dd��S|jd�r#t|j�j�S|j
d��y)z/
    marker_var = VARIABLE | QUOTED_STRING
    �VARIABLE�.�_�
QUOTED_STRINGz+Expected a marker variable or quoted string)�messageN)rZ�process_env_varr[rM�replace�process_python_strrd�rDs rr�r�2so�����z�"��y�~�~�/�4�4�<�<�S�#�F�G�G�	����	)�!�)�.�.�"2�"7�"7�8�8��$�$�A�	%�	
r�env_varc�B�|dk(s|dk(rtd�St|�S)N�platform_python_implementation�python_implementation)r')r�s rr�r�@s+���3�3��-�-��8�9�9��� � r�
python_strc�T�tj|�}tt|��Sr)�ast�literal_evalr.r$)r�rs  rr�r�Js!�����Z�(�E���U���rc��|jd�r|j�td�S|jd�rA|j�|jdd��|jdd��td�S|jd	�r#t|j�j�S|jd
�S)z&
    marker_op = IN | NOT IN | OP
    �IN�in�NOTrFzwhitespace after 'not'rHz'in' after 'not'znot in�OPzJExpected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in)rZr[r2rLrMrdr�s rr�r�Os������t�������$�x��	����	���������(@��A�����(:��;��(�|��	����	��)�.�.�"�'�'�(�(��+�+�
8�
�	
r)'�__doc__r��typingrrrrrr�
_tokenizerr
rr
r'r.r2�	MarkerVar�
MarkerItem�
MarkerAtomr<r5r$rCrArO�intr]rNrlr^rtr|rerr�r�r�r�r�r%rr�<module>r�s�����@�@�0�"�"��t��
�D��
���

�(�E�/�"�	�
�9�b�)�+�
,�
�
�
�
�#�Y�
�!�
�!�F�c�F�&7�F�C�)�C�0A�C�*0$��0$�
�3��X�j�)�)�*�0$�f���),��58����(�Y��4��9��&�)���S�	��6�	��c��"�9����@A��A��A�	�Y�	�:�	��)��
��,:�)�:�
�:�
��
�y�
�!�S�!�X�!��3��5��

�	�
�b�
rpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/version.cpython-312.pyc000064400000046552151732704020025327 0ustar00�

��_i�?��X�dZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
ddlmZm
Z
mZmZgd�Ze
e
efZe
ee	eeffZe
eeefZe
ee	e
ee	eefe	eeffdffZe	ee	edfeeeefZeeegefZej4dgd	��Zd
eddfd
�ZGd�de�ZGd�d�ZdZ e Z!	Gd�de�Z"dede
ee#efdee	eeffd�Z$ejJd�Z&dedeefd�Z'dede	edfdee	eefdee	eefdee	eefdee	edefd�Z(y) zB
.. testsetup::

    from packaging.version import parse, Version
�N)�Any�Callable�Optional�SupportsInt�Tuple�Union�)�Infinity�InfinityType�NegativeInfinity�NegativeInfinityType)�VERSION_PATTERN�parse�Version�InvalidVersion.�_Version)�epoch�release�dev�pre�post�local�version�returnrc��t|�S)z�Parse the given version string.

    >>> parse('1.0.dev1')
    <Version('1.0.dev1')>

    :param version: The version string to parse.
    :raises InvalidVersion: When the version string is not a valid version.
    )r)rs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/version.pyrr+s���7���c��eZdZdZy)rz�Raised when a version string is not a valid version.

    >>> Version("invalid")
    Traceback (most recent call last):
        ...
    packaging.version.InvalidVersion: Invalid version: 'invalid'
    N)�__name__�
__module__�__qualname__�__doc__�rrrr7s��rrc��eZdZUeedfed<defd�Zdddefd�Z	dddefd�Z
dedefd�Zdddefd	�Z
dddefd
�Zdedefd�Zy)
�_BaseVersion.�_keyrc�,�t|j�S�N)�hashr&��selfs r�__hash__z_BaseVersion.__hash__Ds���D�I�I��r�otherc�`�t|t�stS|j|jkSr(��
isinstancer%�NotImplementedr&�r+r-s  r�__lt__z_BaseVersion.__lt__J�%���%��.�!�!��y�y�5�:�:�%�%rc�`�t|t�stS|j|jkSr(r/r2s  r�__le__z_BaseVersion.__le__P�%���%��.�!�!��y�y�E�J�J�&�&rc�`�t|t�stS|j|jk(Sr(r/r2s  r�__eq__z_BaseVersion.__eq__Vr7rc�`�t|t�stS|j|jk\Sr(r/r2s  r�__ge__z_BaseVersion.__ge__\r7rc�`�t|t�stS|j|jkDSr(r/r2s  r�__gt__z_BaseVersion.__gt__br4rc�`�t|t�stS|j|jk7Sr(r/r2s  r�__ne__z_BaseVersion.__ne__hr7rN)rr r!rr�__annotations__�intr,�boolr3r6�objectr9r;r=r?r#rrr%r%As���
��S��/���#��&�N�&�t�&�'�N�'�t�'�'�F�'�t�'�'�N�'�t�'�&�N�&�t�&�'�F�'�t�'rr%a�
    v?
    (?:
        (?:(?P<epoch>[0-9]+)!)?                           # epoch
        (?P<release>[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P<pre>                                          # pre-release
            [-_\.]?
            (?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P<pre_n>[0-9]+)?
        )?
        (?P<post>                                         # post release
            (?:-(?P<post_n1>[0-9]+))
            |
            (?:
                [-_\.]?
                (?P<post_l>post|rev|r)
                [-_\.]?
                (?P<post_n2>[0-9]+)?
            )
        )?
        (?P<dev>                                          # dev release
            [-_\.]?
            (?P<dev_l>dev)
            [-_\.]?
            (?P<dev_n>[0-9]+)?
        )?
    )
    (?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
c��eZdZUdZej
dezdzejejz�Z	e
ed<deddfd�Z
defd	�Zdefd
�Zedefd��Zedeedffd
��Zedeeeeffd��Zedeefd��Zedeefd��Zedeefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Zedefd��Z edefd��Z!edefd��Z"y)ra�This class abstracts handling of a project's versions.

    A :class:`Version` instance is comparison aware and can be compared and
    sorted using the standard Python interfaces.

    >>> v1 = Version("1.0a5")
    >>> v2 = Version("1.0")
    >>> v1
    <Version('1.0a5')>
    >>> v2
    <Version('1.0')>
    >>> v1 < v2
    True
    >>> v1 == v2
    False
    >>> v1 > v2
    False
    >>> v1 >= v2
    False
    >>> v1 <= v2
    True
    z^\s*z\s*$r&rrNc��|jj|�}|std|�d���t|j	d�rt|j	d��ndt
d�|j	d�jd�D��t|j	d�|j	d	��t|j	d
�|j	d�xs|j	d��t|j	d
�|j	d��t|j	d����|_
t|jj|jj|jj|jj|jj |jj"�|_y)aCInitialize a Version object.

        :param version:
            The string representation of a version which will be parsed and normalized
            before use.
        :raises InvalidVersion:
            If the ``version`` does not conform to PEP 440 in any way then this
            exception will be raised.
        zInvalid version: '�'rrc3�2K�|]}t|����y�wr()rA��.0�is  r�	<genexpr>z#Version.__init__.<locals>.<genexpr>�s����L�*K�Q�#�a�&�*K���r�.�pre_l�pre_n�post_l�post_n1�post_n2�dev_l�dev_nr)rrrrrrN)�_regex�searchrr�grouprA�tuple�split�_parse_letter_version�_parse_local_version�_version�_cmpkeyrrrrrrr&)r+r�matchs   r�__init__zVersion.__init__�sR�����"�"�7�+��� �#5�g�Y�a�!@�A�A�!�/4�{�{�7�/C�#�e�k�k�'�*�+���L�%�+�+�i�*@�*F�*F�s�*K�L�L�%�e�k�k�'�&:�E�K�K��<P�Q�&����H�%�u�{�{�9�'=�'W����Y�AW��&�e�k�k�'�&:�E�K�K��<P�Q�&�u�{�{�7�';�<�	
��
���M�M����M�M�!�!��M�M����M�M����M�M����M�M���

��	rc��d|�d�S)z�A representation of the Version that shows all internal state.

        >>> Version('1.0.0')
        <Version('1.0.0')>
        z
<Version('z')>r#r*s r�__repr__zVersion.__repr__�s���D�6��%�%rc�Z�g}|jdk7r|j|j�d��|jdjd�|jD���|j�1|jdjd�|jD���|j
�|jd|j
���|j�|jd|j���|j�|jd	|j���dj|�S)
zA string representation of the version that can be rounded-tripped.

        >>> str(Version("1.0a5"))
        '1.0a5'
        r�!rMc3�2K�|]}t|����y�wr(��str�rI�xs  rrKz"Version.__str__.<locals>.<genexpr>������;�l��c�!�f�l�rL�c3�2K�|]}t|����y�wr(rergs  rrKz"Version.__str__.<locals>.<genexpr>�s���� :��A��Q���rLz.postz.dev�+)r�append�joinrrrrr�r+�partss  r�__str__zVersion.__str__�s������:�:��?��L�L�D�J�J�<�q�)�*�	���S�X�X�;�d�l�l�;�;�<��8�8���L�L���� :���� :�:�;��9�9� ��L�L�5�����,�-��8�8���L�L�4����z�*�+��:�:�!��L�L�1�T�Z�Z�L�)�*��w�w�u�~�rc�2�|jj}|S)zThe epoch of the version.

        >>> Version("2.0.0").epoch
        0
        >>> Version("1!2.0.0").epoch
        1
        )r\r)r+�_epochs  rrz
Version.epochs���m�m�)�)���
r.c�2�|jj}|S)adThe components of the "release" segment of the version.

        >>> Version("1.2.3").release
        (1, 2, 3)
        >>> Version("2.0.0").release
        (2, 0, 0)
        >>> Version("1!2.0.0.post0").release
        (2, 0, 0)

        Includes trailing zeroes but not the epoch or any pre-release / development /
        post-release suffixes.
        )r\r)r+�_releases  rrzVersion.releases��%)�M�M�$9�$9���rc�2�|jj}|S)aThe pre-release segment of the version.

        >>> print(Version("1.2.3").pre)
        None
        >>> Version("1.2.3a1").pre
        ('a', 1)
        >>> Version("1.2.3b1").pre
        ('b', 1)
        >>> Version("1.2.3rc1").pre
        ('rc', 1)
        )r\r)r+�_pres  rrzVersion.pre$s��+/�-�-�*;�*;���rc�d�|jjr|jjdSdS)z�The post-release number of the version.

        >>> print(Version("1.2.3").post)
        None
        >>> Version("1.2.3.post1").post
        1
        r	N)r\rr*s rrzVersion.post4s*��)-�
�
�(:�(:�t�}�}�!�!�!�$�D��Drc�d�|jjr|jjdSdS)z�The development number of the version.

        >>> print(Version("1.2.3").dev)
        None
        >>> Version("1.2.3.dev1").dev
        1
        r	N)r\rr*s rrzVersion.dev?s*��(,�}�}�'8�'8�t�}�}� � ��#�B�d�Brc��|jjr,djd�|jjD��Sy)z�The local version segment of the version.

        >>> print(Version("1.2.3").local)
        None
        >>> Version("1.2.3+abc").local
        'abc'
        rMc3�2K�|]}t|����y�wr(rergs  rrKz Version.local.<locals>.<genexpr>Ts����@�,?�q�C��F�,?�rLN)r\rrnr*s rrz
Version.localJs3���=�=����8�8�@�D�M�M�,?�,?�@�@�@�rc�>�t|�jdd�dS)z�The public portion of the version.

        >>> Version("1.2.3").public
        '1.2.3'
        >>> Version("1.2.3+abc").public
        '1.2.3'
        >>> Version("1.2.3+abc.dev1").public
        '1.2.3'
        rlr	r)rfrYr*s r�publiczVersion.publicXs���4�y���s�A�&�q�)�)rc���g}|jdk7r|j|j�d��|jdjd�|jD���dj|�S)a]The "base version" of the version.

        >>> Version("1.2.3").base_version
        '1.2.3'
        >>> Version("1.2.3+abc").base_version
        '1.2.3'
        >>> Version("1!1.2.3+abc.dev1").base_version
        '1!1.2.3'

        The "base version" is the public version of the project without any pre or post
        release markers.
        rrcrMc3�2K�|]}t|����y�wr(rergs  rrKz'Version.base_version.<locals>.<genexpr>zrirLrj)rrmrnrros  r�base_versionzVersion.base_versiones\�����:�:��?��L�L�D�J�J�<�q�)�*�	���S�X�X�;�d�l�l�;�;�<��w�w�u�~�rc�>�|jduxs|jduS)aTWhether this version is a pre-release.

        >>> Version("1.2.3").is_prerelease
        False
        >>> Version("1.2.3a1").is_prerelease
        True
        >>> Version("1.2.3b1").is_prerelease
        True
        >>> Version("1.2.3rc1").is_prerelease
        True
        >>> Version("1.2.3dev1").is_prerelease
        True
        N)rrr*s r�
is_prereleasezVersion.is_prerelease~s!���x�x�t�#�;�t�x�x�t�';�;rc��|jduS)z�Whether this version is a post-release.

        >>> Version("1.2.3").is_postrelease
        False
        >>> Version("1.2.3.post1").is_postrelease
        True
        N)rr*s r�is_postreleasezVersion.is_postrelease�s���y�y��$�$rc��|jduS)z�Whether this version is a development release.

        >>> Version("1.2.3").is_devrelease
        False
        >>> Version("1.2.3.dev1").is_devrelease
        True
        N)rr*s r�
is_devreleasezVersion.is_devrelease�s���x�x�t�#�#rc�T�t|j�dk\r|jdSdS)zqThe first item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").major
        1
        r	r��lenrr*s r�majorz
Version.major�s'��#&�d�l�l�"3�q�"8�t�|�|�A��?�a�?rc�T�t|j�dk\r|jdSdS)z�The second item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").minor
        2
        >>> Version("1").minor
        0
        �r	rr�r*s r�minorz
Version.minor��'��#&�d�l�l�"3�q�"8�t�|�|�A��?�a�?rc�T�t|j�dk\r|jdSdS)z�The third item of :attr:`release` or ``0`` if unavailable.

        >>> Version("1.2.3").micro
        3
        >>> Version("1").micro
        0
        �r�rr�r*s r�microz
Version.micro�r�r)#rr r!r"�re�compiler�VERBOSE�
IGNORECASErU�CmpKeyr@rfr_rarq�propertyrArrrrrrrrr}r�rBr�r�r�r�r�r�r#rrrr�s���.�R�Z�Z��/�1�G�;�R�Z�Z�"�-�-�=W�
X�F�
�L�$
��$
��$
�L&�#�&����B�	�s�	��	����s�C�x����� �
�X�e�C��H�o�.�
��
��E�h�s�m�E��E��C�X�c�]�C��C���x��}�����
*��
*��
*���c����0�<�t�<��<� �%��%��%��$�t�$��$��@�s�@��@��@�s�@��@��@�s�@��@r�letter�numberc��|r>|�d}|j�}|dk(rd}n|dk(rd}n
|dvrd}n|dvrd	}|t|�fS|s|rd	}|t|�fSy)
Nr�alpha�a�beta�b)�cr�preview�rc)�rev�rr)�lowerrA)r�r�s  rrZrZ�s�����>��F������
�W���F�
�v�
��F�
�.�
.��F�
�|�
#��F��s�6�{�"�"��f����s�6�{�"�"�rz[\._-]rc�R�|�%td�tj|�D��Sy)zR
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    Nc3�rK�|]/}|j�s|j�n
t|����1y�wr()�isdigitr�rA)rI�parts  rrKz'_parse_local_version.<locals>.<genexpr>�s/����
�>��!%����D�J�J�L�C��I�=�>�s�57)rX�_local_version_separatorsrY)rs rr[r[�s4��
���
�1�7�7��>�
�
�	
�rrrrrrc��ttttjd�t|�����}|�|�	|�t
}n|�t}n|}|�t
}n|}|�t}	n|}	|�t
}
ntd�|D��}
|||||	|
fS)Nc��|dk(S)Nrr#)rhs r�<lambda>z_cmpkey.<locals>.<lambda>s��A��Frc3�TK�|] }t|t�r|dfnt|f���"y�w)rjN)r0rArrHs  rrKz_cmpkey.<locals>.<genexpr>0s,����
�NS��z�!�S�)�Q��G�0@�!�/D�D�e�s�&()rX�reversed�list�	itertools�	dropwhilerr
)rrrrrrrurw�_post�_dev�_locals           rr]r]�s������i�)�)�*:�H�W�<M�N�O�P��H��{�t�|���/��

�������|� 0�����{�'�����}�,���
�NS�
�
���(�D�%��v�5�5r))r"�collectionsr�r��typingrrrrrr�_structuresr
rrr
�__all__�
InfiniteTypesrfrA�PrePostDevType�SubLocalType�	LocalTyper�rB�VersionComparisonMethod�
namedtuplerr�
ValueErrorrr%�_VERSION_PATTERNrr�bytesrZr�r�r[r]r#rr�<module>r�s1�����	�E�E�W�W�
C���l�$8�8�9�
��}�e�C��H�o�5�6���]�C��,�-����	�
���,��#�$��&��4�5�
7�	
�
	�	
���

�	�
���s�C�x��.�.�.�)�S�
��#�F�F�#3�T�#9�:��!�;�!�!��C���
	�3�	�9�	��Z��+'�+'�`��>#��	�e@�l�e@�P	!��!��s�E�;�6�7�!�
�e�C��H�o��!�H'�B�J�J�y�1��	��	���(;�	�<6��<6�
�3��8�_�<6�
�%��S��/�	"�<6��5��c��?�
#�	<6�

�%��S��/�	"�<6��E�,�'�(�
<6��<6rpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/metadata.cpython-312.pyc000064400000023256151732704020025416 0ustar00�

��_i
@�
�F�ddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
ejdk\rddlmZnej rddlmZn	ddlmZGd�ded	�
�Zhd�Zhd�Zd
ede	efd�Zd
e	edeeeffd�Zdej2j4deeefdefd�Zidd�dd�dd�dd�dd�dd�dd�dd �d!d!�d"d"�d#d#�d$d%�d&d'�d(d(�d)d)�d*d+�d,d-�d.d/d0d1d2d3d4d5d6d7d8d9��Zd
eeefdeeeee	efffd:�Zy#e$r
Gd�d�ZY��wxYw);�N)�Dict�List�Optional�Tuple�Union�cast)��)�	TypedDictc��eZdZd�Zy)rc��y)N�)�_args�_kwargss  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/metadata.py�__init_subclass__zTypedDict.__init_subclass__s���N)�__name__�
__module__�__qualname__rrrrrrs��rrc��eZdZUdZeed<eed<eed<eeed<eed<eed<eeed<eed	<eed
<eed<eed<eeed
<eed<eeed<eeed<eeed<eeed<eed<eed<eeed<eeed<eeed<eed<eeed<eeefed<eed<eeed<eeed<y)�RawMetadataaqA dictionary of raw core metadata.

    Each field in core metadata maps to a key of this dictionary (when data is
    provided). The key is lower-case and underscores are used instead of dashes
    compared to the equivalent core metadata field. Any core metadata field that
    can be specified multiple times or can hold multiple values in a single
    field have a key with a plural name.

    Core metadata fields that can be specified multiple times are stored as a
    list or dict depending on which is appropriate for the field. Any fields
    which hold multiple values in a single field are stored as a list.

    �metadata_version�name�version�	platforms�summary�description�keywords�	home_page�author�author_email�license�supported_platforms�download_url�classifiers�requires�provides�	obsoletes�
maintainer�maintainer_email�
requires_dist�
provides_dist�obsoletes_dist�requires_python�requires_external�project_urls�description_content_type�provides_extra�dynamicN)rrr�__doc__�str�__annotations__rrrrrrrs������

�I�
�L��C�y��
�L����3�i���N��K���
�L��c��"����c����3�i���3�i���C�y���O�����9����9����I�����C�y� ��s�C�x�.� �"�!���I���#�Y�rrF)�total>rr!r#rrr r*rr"r%r/r+rr2>r4r(r'r)rr&r-r,r.r3r0r$�data�returnc�f�|jd�D�cgc]}|j���c}Scc}w)zCSplit a string of comma-separate keyboards into a list of keywords.�,)�split�strip)r9�ks  r�_parse_keywordsr@�s(��#�z�z�#��/��!�A�G�G�I��/�/��/s�.c��i}|D]s}|jdd�D�cgc]}|j���}}|jdgtddt	|�z
�z�|\}}||vrtd��|||<�u|Scc}w)z?Parse a list of label/URL string pairings separated by a comma.r<��r�z duplicate labels in project urls)r=r>�extend�max�len�KeyError)r9�urls�pair�p�parts�label�urls       r�_parse_project_urlsrO�s���
�D���$%)�J�J�s�A�$6�7�$6�q�����$6��7�
���b�T�S��A��E�
�N�3�4�5��
��s��D�=��=�>�>���U��A�D�K��!8s�A=�msg�sourcec��t|t�r|j�}|S|jd��}	|jdd�S#t$rtd��wxYw)zGet the body of the message.T��decode�utf8�strictzpayload in an invalid encoding)�
isinstancer6�get_payloadrT�UnicodeDecodeError�
ValueError)rPrQ�payload�bpayloads    r�_get_payloadr]�sb���&�#�����(�����/�/��/�6��	?��?�?�6�8�4�4��!�	?��=�>�>�	?�s�A�Ar!zauthor-emailr"�
classifierr&rzdescription-content-typer2zdownload-urlr%r4z	home-pager rr#r*zmaintainer-emailr+zmetadata-versionrrr)zobsoletes-distr.�platformrr1r(r-r3r'r,r0r/rr$r)zproject-urlr(z
provides-distzprovides-extrar'z
requires-distzrequires-externalzrequires-pythonrzsupported-platformrc	���i}i}t|t�rHtjj	tj
j��j|�}nGtjjtj
j��j|�}t|j��D�]�}|j�}|j|�}g}d}|D]�}t|tjjtf�sJ�t|tjj�r�g}	tjj!|�D]-\}
}	|
j#dd�d}|	j'|
|f��/|j'ttjj)|	�����|j'|���|s|||<��#t*j-|�}|�|||<��A|t.vrt1|�dk(r
|d||<��a|t2vr|||<��p|d	k(r!t1|�dk(rt5|d�||<���|d
k(r	t7|�||<���|||<���	t;||�}
|
rfd|vrCt=t|j?d��}|jAdg�jC||
g�nd|vr|dj'|
�n|
|d<	t=tJ|�|fS#t$$rd}d}Y���wxYw#t8$r	|||<Y��`wxYw#tD$rB|jAdg�j'|jGt|tH����Y��wxYw)
a�Parse a distribution's metadata.

    This function returns a two-item tuple of dicts. The first dict is of
    recognized fields from the core metadata specification. Fields that can be
    parsed and translated into Python's built-in types are converted
    appropriately. All other fields are left as-is. Fields that are allowed to
    appear multiple times are stored as lists.

    The second dict contains all other fields from the metadata. This includes
    any unrecognized fields. It also includes any fields which are expected to
    be parsed into a built-in type but were not formatted appropriately. Finally,
    any fields that are expected to appear only once but are repeated are
    included in this dict.

    )�policyTrUrV�latin1FrBrrr1rrS)&rWr6�email�parser�Parserra�compat32�parsestr�BytesParser�
parsebytes�	frozenset�keys�lower�get_all�header�Header�
decode_headerrTrY�append�make_header�_EMAIL_TO_RAW_MAPPING�get�_STRING_FIELDSrG�_LIST_STRING_FIELDSr@rOrHr]r�pop�
setdefaultrErZrX�bytesr)r9�raw�unparsed�parsedr�headers�value�valid_encoding�h�chunks�bin�encoding�raw_namer[�description_headers               r�parse_emailr��s;�� =?�C�%'�H��$������$�$�E�L�L�,A�,A�$�B�K�K�D�Q�����)�)����1F�1F�)�G�R�R�SW�X��
�&�+�+�-�(���z�z�|��
�.�.��&�������A��a�%�,�,�"5�"5�s�!;�<�<�<��!�U�\�\�0�0�1�=?��%*�\�\�%?�%?��%B�M�C��*��
�
�6�8�4�$*���M�M�3��/�2�&C����S����!9�!9�&�!A�B�C����Q��G�P�"�H�T�N��(�,�,�T�2����#�H�T�N���~�%�#�e�*��/�!�!�H�C��M��,�
,�!�C��M���
#��E�
�a��+�E�!�H�5�C��M���
'�
'� 3�E� :��H�
�#�H�T�N�i)�t-��v�t�,�����#�%)�#�s�w�w�}�/E�%F�"��#�#�M�2�6�=�=�'��1���(�*���'�.�.�w�7�%,��M�"���S�!�8�+�+��Q.�/�#+��).��/��J�
'�!&����
'���
����M�2�.�5�5����j��u�&=��>�	
�
�s7�#K8�L�2L!�8
L		�L		�L�L�!AM,�+M,)�email.feedparserrc�email.header�
email.message�email.parser�email.policy�sys�typingrrrrrr�version_infor�
TYPE_CHECKING�typing_extensions�ImportErrorrrurvr6r@rO�message�Messageryr]rsr�rrr�<module>r�s�������
�
�;�;����v�� �
���/�	�3�<�)�5�<�F��"
�� 0�#�0�$�s�)�0�
%�d�3�i�%�D��c��N�%�P?�e�m�m�+�+�?�U�5�#�:�5F�?�3�?�:��h���N���-���=�	�
� :���N�
��y������
���y���,���*���*���F����� �&�!�"��#�$"��$�&��$�,�(��/��9��@m,�e�E�3�J�'�m,�E�+�t�C��c��N�?S�2S�,T�m,��s�	�
�
�	�s�D�D �D python3.12/site-packages/setuptools/_vendor/packaging/__pycache__/requirements.cpython-312.pyc000064400000011520151732704020026350 0ustar00�

��_i����ddlZddlmZmZmZmZddlmZ	ddl
mZddlm
Z
mZddlmZGd�d	e�ZGd
�d�Zy)�N)�Any�List�Optional�Set�)�parse_requirement)�ParserSyntaxError)�Marker�_normalize_extra_values)�SpecifierSetc��eZdZdZy)�InvalidRequirementzJ
    An invalid requirement was found, users should refer to PEP 508.
    N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/requirements.pyrrs��rrc�T�eZdZdZdeddfd�Zdefd�Zdefd�Zdefd�Z	d	e
defd
�Zy)�Requirementz�Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    �requirement_string�returnNc�r�	t|�}|j|_|j
r�tjj|j
�}|jdk(r7tjj|�|j
k7rStd��|jr$|jr|js$|jstd|j
����|j
|_nd|_t|jr|jng�|_
t|j�|_d|_|j �Ct#j$t"�|_t'|j �|j _yy#t$r}tt|��|�d}~wwxYw)N�filezInvalid URL givenz
Invalid URL: )�_parse_requirementr	r�str�name�url�urllib�parse�urlparse�scheme�
urlunparse�netloc�set�extrasr�	specifier�markerr
�__new__r�_markers)�selfr�parsed�e�
parsed_urls     r�__init__zRequirement.__init__!sE��	4�'�(:�;�F� ����	��:�:����.�.�v�z�z�:�J�� � �F�*��<�<�*�*�:�6�&�*�*�D�,�-@�A�A� �'�'�J�,=�,=��%�%�j�.?�.?�(�=�����)E�F�F�&,�j�j�D�H��D�H� #�V�]�]�F�M�M�� K���'3�F�4D�4D�'E���(,����=�=�$� �.�.��0�D�K�#:�6�=�=�#I�D�K�K� �%��'!�	4�$�S��V�,�!�3��	4�s�F�	F6�F1�1F6c�
�|jg}|jr9djt|j��}|j	d|�d��|j
r$|j	t
|j
��|jr;|j	d|j���|jr|j	d�|jr|j	d|j���dj|�S)N�,�[�]z@ � z; �)	rr'�join�sorted�appendr(rrr))r,�parts�formatted_extrass   r�__str__zRequirement.__str__;s��� �I�I�;���;�;�"�x�x��t�{�{�(;�<���L�L�1�-�.�a�0�1��>�>��L�L��T�^�^�,�-��8�8��L�L�2�d�h�h�Z��)��{�{����S�!��;�;��L�L�2�d�k�k�]�+�,��w�w�u�~�rc��d|�d�S)Nz<Requirement('z')>r�r,s r�__repr__zRequirement.__repr__Os����v�S�)�)rc�V�t|jjt|�f�S�N)�hash�	__class__rrr>s r�__hash__zRequirement.__hash__Rs ���T�^�^�,�,�c�$�i�8�9�9r�otherc�8�t|t�stS|j|jk(xrj|j|jk(xrO|j
|j
k(xr4|j|jk(xr|j|jk(SrA)�
isinstancer�NotImplementedrr'r(rr))r,rEs  r�__eq__zRequirement.__eq__Us����%��-�!�!�
�I�I����#�
,����u�|�|�+�
,����%�/�/�1�
,����E�I�I�%�
,����u�|�|�+�	
r)
rrrrrr0r<r?�intrDr�boolrIrrrrrsT���J�3�J�4�J�4���(*�#�*�:�#�:�

�C�

�D�

rr)�urllib.parser �typingrrrr�_parserrr�
_tokenizerr	�markersr
r�
specifiersr�
ValueErrorrrrrr�<module>rSs4��
�+�+�<�)�4�$����K
�K
rpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/markers.cpython-312.pyc000064400000024477151732704020025310 0ustar00�

��_i �	�b�UddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZddlmZddlmZmZddlmZgd�ZeeegefZGd	�d
e�Z Gd�de�Z!Gd
�de�Z"dedefd�Z#	d*deeee
efde	edefd�Z$d�d�ejJejLejNejPejRejTd�Z+eeefe,d<dedededefd�Z-dedede
edffd �Z.d!ed"eeefdefd#�Z/d$d%defd&�Z0deeeffd'�Z1Gd(�d)�Z2y)+�N)�Any�Callable�Dict�List�Optional�Tuple�Union�)�
MarkerAtom�
MarkerList�Op�Value�Variable�parse_marker)�ParserSyntaxError)�InvalidSpecifier�	Specifier��canonicalize_name)�
InvalidMarker�UndefinedComparison�UndefinedEnvironmentName�Marker�default_environmentc��eZdZdZy)rzE
    An invalid marker was found, users should refer to PEP 508.
    N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/markers.pyrr"���r"rc��eZdZdZy)rzP
    An invalid operation was attempted on a value that doesn't support it.
    Nrr!r"r#rr(r$r"rc��eZdZdZy)rz\
    A name was attempted to be used that does not exist inside of the
    environment.
    Nrr!r"r#rr.s��r"r�results�returnc�L�t|dt�r�|d\}}}t|t�r0|jdk(r!t	|j�}t|�}n?t|t�r/|jdk(r t	|j�}t|�}|||f|d<|S)z!
    Normalize extra values.
    r�extra)�
isinstance�tupler�valuerr)r'�lhs�op�rhs�normalized_extras     r#�_normalize_extra_valuesr25s����'�!�*�e�$��q�z���R���c�8�$����g�)=�0����;���(�)�C�
��X�
&�3�9�9��+?�0����;���(�)�C��"�c�\���
��Nr"�marker�firstc���t|tttf�sJ�t|t�r5t	|�dk(r't|dttf�rt|d�St|t�r3d�|D�}|rdj
|�Sddj
|�zdzSt|t�r-dj
|D�cgc]}|j���c}�S|Scc}w)Nr
rc3�6K�|]}t|d�����y�w)F)r4N)�_format_marker)�.0�ms  r#�	<genexpr>z!_format_marker.<locals>.<genexpr>Ws����@��A����/�/��s�� �(�))r+�listr,�str�lenr7�join�	serialize)r3r4�innerr9s    r#r7r7Es����f�t�U�C�0�1�1�1�	�6�4� ���K�1���v�a�y�4��-�0��f�Q�i�(�(��&�$��@��@����8�8�E�?�"�����%��(�3�.�.�	�F�E�	"��x�x��7��1������7�8�8��
��8s�C%c�
�||vS�Nr!�r.r0s  r#�<lambda>rGcs��3�#�:r"c�
�||vSrEr!rFs  r#rGrGds��s�#�~r")�inznot in�<z<=z==z!=z>=�>�
_operatorsr.r/r0c	�"�	tdj|j�|g��}|j|d��S#t$rYnwxYwt
j
|j��}|�td|�d|�d|�d���|||�S)N�T)�prereleasesz
Undefined z on z and �.)rrArB�containsrrL�getr)r.r/r0�spec�opers     r#�_eval_oprUns���4�����"�,�,�.�#�!6�7�8���}�}�S�d�}�3�3���
��
��
 *�~�~�b�l�l�n�=�D��|�!�J�r�f�D���u�S�G�1�"M�N�N���S�>�s�*?�	A�
A�values�key.c�4�|dk(rtd�|D��S|S)Nr*c3�2K�|]}t|����y�wrEr)r8�vs  r#r:z_normalize.<locals>.<genexpr>�s����:�6�a�&�q�)�6���)r,)rWrVs  r#�
_normalizer\}s#��
�g�~��:�6�:�:�:��Mr"�markers�environmentc�0�gg}|D]�}t|tttf�sJ�t|t�r|dj	t||���Ot|t�r�|\}}}t|t�r|j}||}|j}	n|j}|j}||}	t||	|��\}}	|dj	t|||	����|dvsJ�|dk(s��|j	g���td�|D��S)N���)rW)�and�orrbc3�2K�|]}t|����y�wrE)�all)r8�items  r#r:z$_evaluate_markers.<locals>.<genexpr>�s����,�V�T�s�4�y�V�r[)r+r>r,r?�append�_evaluate_markersrr-r\rU�any)
r]r^�groupsr3r.r/r0�environment_key�	lhs_value�	rhs_values
          r#rgrg�s�� "�t�F����&�4���"4�5�5�5��f�d�#��2�J���/���D�E�
���
&�!�L�C��S��#�x�(�"%�)�)��'��8�	��I�I�	��I�I�	�"%�)�)��'��8�	�#-�i���#X� �I�y��2�J���h�y�"�i�@�A��]�*�*�*���~��
�
�b�!�-�0�,�V�,�,�,r"�infozsys._version_infoc��dj|�}|j}|dk7r||dt|j�zz
}|S)Nz{0.major}.{0.minor}.{0.micro}�finalr)�format�releaselevelr?�serial)rm�version�kinds   r#�format_full_versionru�sE��-�4�4�T�:�G����D��w���4��7�S����-�-�-���Nr"c���ttjj�}tjj}||t
jt
j�t
j�t
j�t
j�t
j�t
j�djt
j�dd�tjd�S)NrP�)�implementation_name�implementation_version�os_name�platform_machine�platform_release�platform_system�platform_version�python_full_version�platform_python_implementation�python_version�sys_platform)ru�sys�implementationrs�name�os�platform�machine�release�systemr��python_implementationrA�python_version_tuple)�iverrxs  r#rr�s����s�1�1�9�9�:�D��,�,�1�1��2�"&��7�7�$�,�,�.�$�,�,�.�#�?�?�,�$�,�,�.�'�6�6�8�*2�*H�*H�*J��(�(�8�#@�#@�#B�2�A�#F�G�����r"c�r�eZdZdeddfd�Zdefd�Zdefd�Zdefd�Zde	de
fd	�Zdd
ee
eefde
fd�Zy)
rr3r(Nc��	tt|��|_y#t$r}t	t|��|�d}~wwxYwrE)r2�
_parse_marker�_markersrrr?)�selfr3�es   r#�__init__zMarker.__init__�s;��	/�3�M�&�4I�J�D�M��"!�	/���A��'�Q�.��	/�s��	?�:�?c�,�t|j�SrE)r7r��r�s r#�__str__zMarker.__str__�s���d�m�m�,�,r"c��d|�d�S)Nz	<Marker('z')>r!r�s r#�__repr__zMarker.__repr__�s���4�&��$�$r"c�V�t|jjt|�f�SrE)�hash�	__class__rr?r�s r#�__hash__zMarker.__hash__�s ���T�^�^�,�,�c�$�i�8�9�9r"�otherc�\�t|t�stSt|�t|�k(SrE)r+r�NotImplementedr?)r�r�s  r#�__eq__z
Marker.__eq__�s%���%��(�!�!��4�y�C��J�&�&r"r^c��t�}d|d<|�|j|�|d�d|d<t|j|�S)a$Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        rNr*)r�updatergr�)r�r^�current_environments   r#�evaluatezMarker.evaluate�sV��2�3��')��G�$��"��&�&�{�3�#�7�+�3�/1�#�G�,� ����0C�D�Dr"rE)rrrr?r�r�r��intr�r�boolr�rrr�r!r"r#rr�so��/�s�/�t�/�2-��-�%�#�%�:�#�:�'�C�'�D�'�E�H�T�#�s�(�^�$<�E��Er"r)T)3�operatorr�r�r��typingrrrrrrr	�_parserrrr
rrrr��
_tokenizerr�
specifiersrr�utilsr�__all__r?r��Operator�
ValueErrorrrrr2r7�lt�le�eq�ne�ge�gtrL�__annotations__rUr\rgrurrr!r"r#�<module>r�s���
�	��
�D�D�D���*�3�$����S�#�J��$�%���J���*���z��
�S�
�S�
�"HL���$�s�)�Z��,�-��6>�t�n����<&�-�	���
�+�+�
�+�+�
�+�+�
�+�+�	���	#�
�D��h���	��#��2��C��D��	��	�#�	�%��S��/�	�-�z�-��S�#�X��-�4�-�<�1��c���T�#�s�(�^��$;E�;Er"python3.12/site-packages/setuptools/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc000064400000010573151732704020026033 0ustar00�

��_i�	�
��dZddlZddlZddlZddlZddlmZmZmZddl	m
Z
Gd�de�Zded	eefd
�Z
ej�ded	eefd��Zd
ed	eefd�Zedk(r�ddlZej&�Zej+d�sJd��ede�edeej.��edd��eej0ddej3dd�d��D]Zeed���yy)z�PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
�N)�Iterator�
NamedTuple�Optional�)�ELFFilec�"�eZdZUeed<eed<y)�_MuslVersion�major�minorN)�__name__�
__module__�__qualname__�int�__annotations__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/_musllinux.pyr	r	s���J��Jrr	�output�returnc�@�d�|j�D�D�cgc]}|s�|��	}}t|�dks|ddddk7rytjd|d�}|syt	t|j
d��t|j
d����Scc}w)	Nc3�<K�|]}|j����y�w)N)�strip)�.0�ns  r�	<genexpr>z&_parse_musl_version.<locals>.<genexpr>s����@�,?�q�����,?�s��r��muslzVersion (\d+)\.(\d+)r)r
r)�
splitlines�len�re�matchr	r�group)rr�lines�ms    r�_parse_musl_versionr&s���@�F�,=�,=�,?�@�F�@�1�A�Q�@�E�F�
�5�z�A�~��q��"�1���/��
���(�%��(�3�A����c�!�'�'�!�*�o�S������_�E�E��

Gs
�B�B�
executablec�*�	t|d�5}t|�j}ddd��d|vryt
j|gtjd��}t|j�S#1swY�LxYw#ttt
f$rYywxYw)a`Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    �rbNrT)�stderr�universal_newlines)�openr�interpreter�OSError�	TypeError�
ValueError�
subprocess�run�PIPEr&r*)r'�f�ld�procs    r�_get_musl_versionr7s����
�*�d�
#�q����'�'�B�$�
�z�V�2�%���>�>�2�$�z���4�P�D��t�{�{�+�+�$�
#���Y�
�+����s'�A;�A/�A;�/A8�4A;�;B�B�archc#�K�ttj�}|�yt|jdd�D]}d|j
�d|�d|�����y�w)aTGenerate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    N����
musllinux_�_)r7�sysr'�rangerr
)r8�sys_muslrs   r�
platform_tagsr@6sT����!����0�H�����x�~�~�r�2�.���8�>�>�*�!�E�7�!�D�6�:�:�/�s�AA�__main__zlinux-z	not linuxzplat:zmusl:ztags:� )�endz[.-]r<�-r:z
      )�__doc__�	functoolsr!r1r=�typingrrr�_elffilerr	�strr&�	lru_cacher7r@r�	sysconfig�get_platform�plat�
startswith�printr'�sub�split�trrr�<module>rSs+����	��
�1�1���:��
F��F���(>�F������,�#�,�(�<�*@�,��,�,
;��
;���
�
;� �z���!�9�!�!�#�D��?�?�8�$�1�k�1�$�	�'�4��	�'�$�S�^�^�4�5�	�'�s��
�6�2�6�6�'�3��
�
�3��0B�2�0F�G�
H��
�a�Z� �I�rpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc000064400000113456151732704030025775 0ustar00�

��_i&��	��dZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZe
eefZede��ZeeegefZd	ed
efd�ZGd�d
e�ZGd�dej4��ZGd�de�Zej:d�Zd	ed
eefd�Zded
efd�Z deedeed
eeeeeffd�Z!Gd�de�Z"y)z�
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
�N)	�Callable�Iterable�Iterator�List�Optional�Set�Tuple�TypeVar�Union�)�canonicalize_version)�Version�UnparsedVersionVar)�bound�version�returnc�<�t|t�st|�}|S�N)�
isinstancer)rs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/specifiers.py�_coerce_versionr"s���g�w�'��'�"���N�c��eZdZdZy)�InvalidSpecifiera
    Raised when attempting to create a :class:`Specifier` with a specifier
    string that is invalid.

    >>> Specifier("lolwat")
    Traceback (most recent call last):
        ...
    packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'
    N)�__name__�
__module__�__qualname__�__doc__�rrrr(s��rrc	�x�eZdZejdefd��Zejdefd��Zejde	de
fd��Zeejde
e
fd���Zejde
ddfd	��Zejdd
ede
e
de
fd��Zej	dd
eede
e
deefd��Zy)�
BaseSpecifierrc��y)z�
        Returns the str representation of this Specifier-like object. This
        should be representative of the Specifier itself.
        Nr��selfs r�__str__zBaseSpecifier.__str__5��rc��y)zF
        Returns a hash value for this Specifier-like object.
        Nrr#s r�__hash__zBaseSpecifier.__hash__<r&r�otherc��y)z�
        Returns a boolean representing whether or not the two Specifier-like
        objects are equal.

        :param other: The other object to check against.
        Nr�r$r)s  r�__eq__zBaseSpecifier.__eq__Br&rc��y)z�Whether or not pre-releases as a whole are allowed.

        This can be set to either ``True`` or ``False`` to explicitly enable or disable
        prereleases or it can be set to ``None`` (the default) to use default semantics.
        Nrr#s r�prereleaseszBaseSpecifier.prereleasesKr&r�valueNc��y)zQSetter for :attr:`prereleases`.

        :param value: The value to set.
        Nr�r$r/s  rr.zBaseSpecifier.prereleasesTr&r�itemr.c��y)zR
        Determines if the given item is contained within this specifier.
        Nr)r$r2r.s   r�containszBaseSpecifier.contains[r&r�iterablec��y)z�
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr)r$r5r.s   r�filterzBaseSpecifier.filterar&rr)rrr�abc�abstractmethod�strr%�intr(�object�boolr,�propertyrr.�setterr4rrrr7rrrr!r!4s7����������	����#����
	����F��t���������X�d�^�����������$����	����S��x��~������
	���TX�� �!3�4��CK�D�>��	�$�	%���rr!)�	metaclassc	��eZdZdZdZdZejdezezdzejejz�Z
dddd	d
ddd
d�Zd0dede
eddfd�Zedefd��Zej$deddfd��Zedefd��Zedefd��Zdefd�Zdefd�Zedeeeffd��Zdefd�Zdedefd�Zdedefd �Zd!ededefd"�Z d!ededefd#�Z!d!ededefd$�Z"d!ededefd%�Z#d!ededefd&�Z$d!ed'edefd(�Z%d!ed'edefd)�Z&d!ededefd*�Z'd+e(eefdefd,�Z)	d1d+e*de
edefd-�Z+	d1d.e,e-de
ede.e-fd/�Z/y)2�	Specifiera?This class abstracts handling of version specifiers.

    .. tip::

        It is generally not required to instantiate this manually. You should instead
        prefer to work with :class:`SpecifierSet` instead, which can parse
        comma-separated version specifiers (which is what package metadata contains).
    z8
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        a�
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s;)]*  # The arbitrary version can be just about anything,
                          # we match everything except for whitespace, a
                          # semi-colon for marker support, and a closing paren
                          # since versions can be enclosed in them.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release

                # You cannot use a wild card and a pre-release, post-release, a dev or
                # local version together so group them with a | and make them optional.
                (?:
                    \.\*  # Wild card syntax of .*
                    |
                    (?:                                  # pre release
                        [-_\.]?
                        (alpha|beta|preview|pre|a|b|c|rc)
                        [-_\.]?
                        [0-9]*
                    )?
                    (?:                                  # post release
                        (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                    )?
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        z^\s*z\s*$�
compatible�equal�	not_equal�less_than_equal�greater_than_equal�	less_than�greater_than�	arbitrary)�~=�==z!=�<=�>=�<�>�===N�specr.rc���|jj|�}|std|�d���|jd�j	�|jd�j	�f|_||_y)a�Initialize a Specifier instance.

        :param spec:
            The string representation of a specifier which will be parsed and
            normalized before use.
        :param prereleases:
            This tells the specifier if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.
        :raises InvalidSpecifier:
            If the given specifier is invalid (i.e. bad syntax).
        zInvalid specifier: '�'�operatorrN)�_regex�searchr�group�strip�_spec�_prereleases)r$rRr.�matchs    r�__init__zSpecifier.__init__�so�����"�"�4�(���"�%9�$��q�#A�B�B�
�K�K�
�#�)�)�+��K�K�	�"�(�(�*�'
��
�(��rc��|j�|jS|j\}}|dvr1|dk(r|jd�r|dd}t|�jryy)N)rLrNrMrKrQrL�.*���TF)r[rZ�endswithr�
is_prerelease)r$rUrs   rr.zSpecifier.prereleasessm�����(��$�$�$�
!�J�J���'��6�6��4��G�$4�$4�T�$:�!�#�2�,���w��-�-��rr/c��||_yr�r[r1s  rr.zSpecifier.prereleases�
��!��rc� �|jdS)z`The operator of this specifier.

        >>> Specifier("==1.2.3").operator
        '=='
        r�rZr#s rrUzSpecifier.operator����z�z�!�}�rc� �|jdS)zaThe version of this specifier.

        >>> Specifier("==1.2.3").version
        '1.2.3'
        rrgr#s rrzSpecifier.version%rhrc��|j�d|j��nd}d|jj�dt	|��|�d�S)aTA representation of the Specifier that shows all internal state.

        >>> Specifier('>=1.0.0')
        <Specifier('>=1.0.0')>
        >>> Specifier('>=1.0.0', prereleases=False)
        <Specifier('>=1.0.0', prereleases=False)>
        >>> Specifier('>=1.0.0', prereleases=True)
        <Specifier('>=1.0.0', prereleases=True)>
        �, prereleases=�rO�(�)>)r[r.�	__class__rr:�r$�pres  r�__repr__zSpecifier.__repr__.sU��� � �,��T�-�-�0�1��	��4�>�>�*�*�+�1�S��Y�M�#��b�A�Arc�4�dj|j�S)z�A string representation of the Specifier that can be round-tripped.

        >>> str(Specifier('>=1.0.0'))
        '>=1.0.0'
        >>> str(Specifier('>=1.0.0', prereleases=False))
        '>=1.0.0'
        z{}{})�formatrZr#s rr%zSpecifier.__str__@s���v�}�}�d�j�j�)�)rc�x�t|jd|jddk7��}|jd|fS)NrrrK��strip_trailing_zero)r
rZ)r$�canonical_versions  r�_canonical_speczSpecifier._canonical_specJs>��0��J�J�q�M�!%���A��$�!6�
���z�z�!�}�/�/�/rc�,�t|j�Sr)�hashryr#s rr(zSpecifier.__hash__Rs���D�(�(�)�)rr)c���t|t�r	|jt|��}nt||j�stS|j
|j
k(S#t$r	tcYSwxYw)a>Whether or not the two Specifier-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0")
        True
        >>> (Specifier("==1.2.3", prereleases=False) ==
        ...  Specifier("==1.2.3", prereleases=True))
        True
        >>> Specifier("==1.2.3") == "==1.2.3"
        True
        >>> Specifier("==1.2.3") == Specifier("==1.2.4")
        False
        >>> Specifier("==1.2.3") == Specifier("~=1.2.3")
        False
        )rr:ror�NotImplementedryr+s  rr,zSpecifier.__eq__Usi��&�e�S�!�
&����s�5�z�2���E�4�>�>�2�!�!��#�#�u�'<�'<�<�<��$�
&�%�%�
&�s�A"�"A4�3A4�opc�>�t|d|j|���}|S)N�	_compare_)�getattr�
_operators)r$r~�operator_callables   r�
_get_operatorzSpecifier._get_operatorrs+��.5��I�d�o�o�b�1�2�3�/
��!� r�prospectivec
���djttjtt|���dd�}|dz
}|j
d�||�xr|j
d�||�S)N�.���r_rNrL)�join�list�	itertools�	takewhile�_is_not_suffix�_version_splitr�)r$r�rR�prefixs    r�_compare_compatiblezSpecifier._compare_compatiblexs{�������$�$�^�^�D�5I�J�K�C�R�P�
��
	�$���'�t�!�!�$�'��T�:�
�?W�t�?Q�?Q�RV�?W���@
�	
rc�D�|jd�r_t|jd��}t|ddd��}t|�}t|�}t	||�\}}|dt|�}	|	|k(St
|�}
|
jst
|j�}||
k(S)Nr_Frvr`)rar
�publicr��_pad_version�lenr�local)r$r�rR�normalized_prospective�normalized_spec�
split_spec�split_prospective�padded_prospective�_�shortened_prospective�spec_versions           r�_compare_equalzSpecifier._compare_equal�s����=�=���%9��"�"��&�"�3�4���9�RW�X�O�(��8�J�
!/�/E� F��%1�1B�J�$O�!���
%7�7H��Z��$I�!�(�J�6�6�#�4�=�L�
 �%�%�%�k�&8�&8�9���,�.�.rc�(�|j||�Sr)r��r$r�rRs   r�_compare_not_equalzSpecifier._compare_not_equal�s���&�&�{�D�9�9�9rc�D�t|j�t|�kSr�rr�r�s   r�_compare_less_than_equalz"Specifier._compare_less_than_equal����
�{�)�)�*�g�d�m�;�;rc�D�t|j�t|�k\Srr�r�s   r�_compare_greater_than_equalz%Specifier._compare_greater_than_equal�r�r�spec_strc��t|�}||ksy|js8|jr,t|j�t|j�k(ryy�NFT)rrb�base_version�r$r�r�rRs    r�_compare_less_thanzSpecifier._compare_less_than�sT���x� ��
�T�!���!�!�k�&?�&?��{�/�/�0�G�D�<M�<M�4N�N��
rc��t|�}||kDsy|js8|jr,t|j�t|j�k(ry|j�,t|j�t|j�k(ryyr�)r�is_postreleaser�r�r�s    r�_compare_greater_thanzSpecifier._compare_greater_than�s����x� ��
�T�!���"�"�{�'A�'A��{�/�/�0�G�D�<M�<M�4N�N�����(��{�/�/�0�G�D�<M�<M�4N�N��
rc�h�t|�j�t|�j�k(Sr)r:�lowerr�s   r�_compare_arbitraryzSpecifier._compare_arbitrary�s&���;��%�%�'�3�t�9�?�?�+<�<�<rr2c�$�|j|�S)a;Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in Specifier(">=1.2.3")
        True
        >>> Version("1.2.3") in Specifier(">=1.2.3")
        True
        >>> "1.0.0" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
        True
        �r4�r$r2s  r�__contains__zSpecifier.__contains__���&�}�}�T�"�"rc��|�|j}t|�}|jr|sy|j|j�}|||j
�S)alReturn whether or not the item is contained in this specifier.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this Specifier. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> Specifier(">=1.2.3").contains("1.2.3")
        True
        >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
        True
        >>> Specifier(">=1.2.3").contains("1.0.0")
        False
        >>> Specifier(">=1.2.3").contains("1.3.0a1")
        False
        >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
        True
        >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
        True
        F)r.rrbr�rUr)r$r2r.�normalized_itemr�s     rr4zSpecifier.containssY��8���*�*�K�*�$�/��
�(�(���/3�.@�.@����.O�� ��$�,�,�?�?rr5c#�K�d}g}d|�|ndi}|D]S}t|�}|j|fi|��s�"|jr |s|js|j	|��Nd}|���U|s|r|D]}|���yyy�w)aOFilter items in the given iterable, that match the specifier.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(Specifier().contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")]))
        ['1.2.3', '1.3', <Version('1.4')>]
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"]))
        ['1.5a1']
        >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        Fr.NT)rr4rbr.�append)r$r5r.�yielded�found_prereleases�kwr�parsed_versions        rr7zSpecifier.filterEs�����<�����K�,C�[��
N�� �G�,�W�5�N��t�}�}�^�2�r�2�"�/�/��4�#3�#3�%�,�,�W�5�#�G�!�M� �(�,�,���
�-�-�w�s�0A9�AA9�rlNr)0rrrr�_operator_regex_str�_version_regex_str�re�compile�VERBOSE�
IGNORECASErVr�r:rr=r]r>r.r?rUrrrr%r	ryr;r(r<r,�CallableOperatorr�rr�r�r�r�r�r�r�r�rr��UnparsedVersionr4rrrr7rrrrBrBks������\��|�R�Z�Z��%�%�(:�:�W�D�
�
�
�R�]�]�"��F�����"�
�
��	�J�(�S�(�H�T�N�(�d�(�4��T����.���"��"�$�"��"���#����������B�#�B�$*��*��0��s�C�x��0��0�*�#�*�=�F�=�t�=�:!��!�(8�!�
�w�
�c�
�d�
�*'/�'�'/��'/��'/�R:�g�:�S�:�T�:�<�G�<�3�<�4�<�<�w�<�c�<�d�<��g������2���C��D��>=�g�=�S�=�T�=�#��s�G�|�!4�#��#�,DH�,@�#�,@�2:�4�.�,@�	
�,@�^UY�;� �!3�4�;�CK�D�>�;�	�$�	%�;rrBz^([0-9]+)((?:a|b|c|rc)[0-9]+)$c���g}|jd�D]J}tj|�}|r |j|j	���:|j|��L|S)Nr�)�split�
_prefix_regexrW�extend�groupsr�)r�resultr2r\s    rr�r��sR���F��
�
�c�"���$�$�T�*����M�M�%�,�,�.�)��M�M�$��#��Mr�segmentc�.��t�fd�dD��S)Nc3�@�K�|]}�j|����y�wr)�
startswith)�.0r�r�s  �r�	<genexpr>z!_is_not_suffix.<locals>.<genexpr>�s!������1P�v����6�"�1P�s�)�dev�a�b�rc�post)�any)r�s`rr�r��s"�����1P����r�left�rightc��gg}}|jttjd�|���|jttjd�|���|j|t	|d�d�|j|t	|d�d�|jddgt
dt	|d�t	|d�z
�z�|jddgt
dt	|d�t	|d�z
�z�ttj|��ttj|��fS)Nc�"�|j�Sr��isdigit��xs r�<lambda>z_pad_version.<locals>.<lambda>�s
�����rc�"�|j�Srr�r�s rr�z_pad_version.<locals>.<lambda>�s
��!�)�)�+rrr�0)r�r�r�r�r��insert�max�chain)r�r��
left_split�right_splits    rr�r��s"�� �"��J����d�9�.�.�/D�d�K�L�M����t�I�/�/�0E�u�M�N�O����d�3�z�!�}�-�/�0�1����u�S��Q��0�2�3�4����a�#���Q��K��N�(;�c�*�Q�-�>P�(P�!Q�Q�R����q�3�%�#�a��Z��]�);�c�+�a�.�>Q�)Q�"R�R�S�����*�-�.��Y�_�_�k�5R�0S�T�Trc	�H�eZdZdZ	ddedeeddfd�Zedeefd��Z	e	jdeddfd	��Z	defd
�Zdefd�Zde
fd�Zd
edefddfd�Zd
edefd�Zde
fd�Zdeefd�Zdedefd�Z		ddedeedeedefd�Z	ddeedeedeefd�Zy)�SpecifierSetz�This class abstracts handling of a set of version specifiers.

    It can be passed a single specifier (``>=3.0``), a comma-separated list of
    specifiers (``>=3.0,!=3.1``), or no specifier at all.
    N�
specifiersr.rc��|jd�D�cgc]#}|j�s�|j���%}}t�}|D]}|jt	|���t|�|_||_ycc}w)aNInitialize a SpecifierSet instance.

        :param specifiers:
            The string representation of a specifier or a comma-separated list of
            specifiers which will be parsed and normalized before use.
        :param prereleases:
            This tells the SpecifierSet if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.

        :raises InvalidSpecifier:
            If the given ``specifiers`` are not parseable than this exception will be
            raised.
        �,N)r�rY�set�addrB�	frozenset�_specsr[)r$r�r.�s�split_specifiers�parsed�	specifiers       rr]zSpecifierSet.__init__�sv��(0:�/?�/?��/D�R�/D�!����	�A�G�G�I�/D��R�"%���)�I��J�J�y��+�,�*� ��'���(����Ss
�B�Bc��|j�|jS|jsytd�|jD��S)Nc3�4K�|]}|j���y�wr�r.�r�r�s  rr�z+SpecifierSet.prereleases.<locals>.<genexpr>�s����6�+�Q�1�=�=�+�s�)r[r�r�r#s rr.zSpecifierSet.prereleases�s?�����(��$�$�$�
�{�{���6�$�+�+�6�6�6rr/c��||_yrrdr1s  rr.zSpecifierSet.prereleases�rerc�^�|j�d|j��nd}dt|��|�d�S)aA representation of the specifier set that shows all internal state.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> SpecifierSet('>=1.0.0,!=2.0.0')
        <SpecifierSet('!=2.0.0,>=1.0.0')>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=False)>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=True)>
        rkrlz<SpecifierSet(rn)r[r.r:rps  rrrzSpecifierSet.__repr__�sD��� � �,��T�-�-�0�1��	� ��D�	�}�S�E��4�4rc�X�djtd�|jD���S)anA string representation of the specifier set that can be round-tripped.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
        '!=1.0.1,>=1.0.0'
        >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
        '!=1.0.1,>=1.0.0'
        r�c3�2K�|]}t|����y�wr)r:r�s  rr�z'SpecifierSet.__str__.<locals>.<genexpr>s����;�{�!�s�1�v�{�s�)r��sortedr�r#s rr%zSpecifierSet.__str__�s"���x�x��;�t�{�{�;�;�<�<rc�,�t|j�Sr)r{r�r#s rr(zSpecifierSet.__hash__
s���D�K�K� � rr)c���t|t�rt|�}nt|t�stSt�}t	|j
|j
z�|_|j�|j�|j|_|S|j�|j�|j|_|S|j|jk(r|j|_|Std��)a�Return a SpecifierSet which is a combination of the two sets.

        :param other: The other object to combine with.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        zFCannot combine SpecifierSets with True and False prerelease overrides.)rr:r�r}r�r�r[�
ValueError)r$r)r�s   r�__and__zSpecifierSet.__and__
s����e�S�!� ��'�E��E�<�0�!�!� �N�	�$�T�[�[�5�<�<�%?�@�	�����$��);�);�)G�%*�%7�%7�I�"����
�
�
*�u�/A�/A�/I�%)�%6�%6�I�"����
�
�%�"4�"4�
4�%)�%6�%6�I�"������
rc��t|ttf�rtt|��}nt|t�stS|j
|j
k(S)a�Whether or not the two SpecifierSet-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
        ...  SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
        False
        )rr:rBr�r}r�r+s  rr,zSpecifierSet.__eq__-sD��&�e�c�9�-�.� ��U��,�E��E�<�0�!�!��{�{�e�l�l�*�*rc�,�t|j�S)z7Returns the number of specifiers in this specifier set.)r�r�r#s r�__len__zSpecifierSet.__len__Gs���4�;�;��rc�,�t|j�S)z�
        Returns an iterator over all the underlying :class:`Specifier` instances
        in this specifier set.

        >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
        [<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]
        )�iterr�r#s r�__iter__zSpecifierSet.__iter__Ks���D�K�K� � rr2c�$�|j|�S)arReturn whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
        True
        r�r�s  rr�zSpecifierSet.__contains__Ur�r�	installedc����t�t�st�����|j��s
�jry|r!�jrt�j��t��fd�|jD��S)a�Return whether or not the item is contained in this SpecifierSet.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this SpecifierSet. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
        True
        Fc3�D�K�|]}|j�������y�w)r�Nr�)r�r�r2r.s  ��rr�z(SpecifierSet.contains.<locals>.<genexpr>�s�����R�k��1�:�:�d��:�<�k�s� )rrr.rbr��allr�)r$r2r.r
s `` rr4zSpecifierSet.containsjsm���<�$��(��4�=�D�
���*�*�K��t�1�1����+�+��4�,�,�-�D��R�d�k�k�R�R�Rrr5c�r�|�|j}|jr8|jD]}|j|t|���}� t	|�Sg}g}|D]A}t|�}|jr|s|r�|j|��1|j|��C|s|r
|�t	|�St	|�S)a.Filter items in the given iterable, that match the specifiers in this set.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(SpecifierSet(...).contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
        ['1.3', <Version('1.4')>]
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
        []
        >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']

        An "empty" SpecifierSet will filter items based on the presence of prerelease
        versions in the set.

        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet("").filter(["1.5a1"]))
        ['1.5a1']
        >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        r�)r.r�r7r=r
rrbr�)r$r5r.rR�filteredr�r2r�s        rr7zSpecifierSet.filter�s���X���*�*�K�
�;�;������;�;�x�T�+�=N�;�O��$���>�!�
24�H�:<�� ��!0��!6��"�/�/��#�)�0�0��6��O�O�D�)�!�� 1�k�6I��-�.�.���>�!rr�)NNr)rrrrr:rr=r]r>r.r?rrr%r;r(rrr<r,rrrBrr�r�r4rrr7rrrr�r��su���CG�!(��!(�19�$��!(�	
�!(�F�7�X�d�^�7��7� ���"��"�$�"��"�5�#�5�*=��=�!�#�!��U�>�3�#6�7��N��@+�F�+�t�+�4 �� �!�(�9�-�!�#��#�T�#�0'+�$(�	7S��7S��d�^�7S��D�>�	7S�

�7S�tUY�M"� �!3�4�M"�CK�D�>�M"�	�$�	%�M"rr�)#rr8r�r��typingrrrrrrr	r
r�utilsr
rrr:r�rr=r�rrr�ABCMetar!rBr�r�r�r�r�r�rrr�<module>rs�����	�
�
�
�(������%���1��I���W�c�N�D�0�1���_����	�z�	�4�c�k�k�4�nU�
�U�p��
�
�<�=�
��C��D��I���C��D��U�t�C�y�U��c��U�u�T�#�Y��S�	�=Q�7R�U�$G"�=�G"rpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/utils.cpython-312.pyc000064400000013633151732704030024775 0ustar00�

��_i�	�^�ddlZddlmZmZmZmZmZddlmZm	Z	ddl
mZmZeedee
effZede�ZGd�d	e�ZGd
�de�Zej(d�Zej(d
�Zdedefd�Zdd�deeefdedefd�Zdedeeeeeeffd�Zdedeeeffd�Zy)�N)�	FrozenSet�NewType�Tuple�Union�cast�)�Tag�	parse_tag)�InvalidVersion�Version��NormalizedNamec��eZdZdZy)�InvalidWheelFilenamezM
    An invalid wheel filename was found, users should refer to PEP 427.
    N��__name__�
__module__�__qualname__�__doc__r
���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/utils.pyrr���rrc��eZdZdZy)�InvalidSdistFilenamez^
    An invalid sdist filename was found, users should refer to the packaging user guide.
    Nrr
rrrrrrrz[-_.]+z	(\d+)(.*)�name�returnc�j�tjd|�j�}tt|�S)N�-)�_canonicalize_regex�sub�lowerrr)r�values  r�canonicalize_namer# s*���#�#�C��.�4�4�6�E����&�&rT)�strip_trailing_zero�versionr$c���t|t�r
	t|�}n|}g}|jdk7r|j|j�d��dj
d�|jD��}|rtjdd|�}|j|�|j�1|jdj
d�|jD���|j�|jd|j���|j�|jd	|j���|j�|jd
|j���dj
|�S#t$r|cYSwxYw)z�
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    r�!�.c3�2K�|]}t|����y�w�N��str��.0�xs  r�	<genexpr>z'canonicalize_version.<locals>.<genexpr>=s����>�~�!�s�1�v�~���z(\.0)+$�c3�2K�|]}t|����y�wr*r+r-s  rr0z'canonicalize_version.<locals>.<genexpr>Es����8�Z��S��V�Z�r1z.postz.dev�+)�
isinstancer,rr�epoch�append�join�release�rer �pre�post�dev�local)r%r$�parsed�parts�release_segments     r�canonicalize_versionrB&sB���'�3��	��W�%�F�
���E��|�|�q��
������~�Q�'�(��h�h�>�v�~�~�>�>�O���&�&��R��A��	�L�L��!��z�z��
���R�W�W�8�V�Z�Z�8�8�9��{�{��
���u�V�[�[�M�*�+��z�z��
���t�F�J�J�<�(�)��|�|��
���q�����'�(�
�7�7�5�>���G�	��N�	�s�E'�'E5�4E5�filenamec�j�|jd�std|����|dd}|jd�}|dvrtd|����|jd|dz
�}|d}d	|vs%t	j
d
|tj��td|����t|�}t|d�}|d
k(rh|d}tj|�}|�td|�d|�d���ttt|jd��|jd�f�}nd}t|d�}	||||	fS)Nz.whlz3Invalid wheel filename (extension must be '.whl'): ���r)��z0Invalid wheel filename (wrong number of parts): �r�__z^[\w\d._]*$zInvalid project name: rrGzInvalid build number: z in '�'r
���)�endswithr�count�splitr:�match�UNICODEr#r�_build_tag_regexr�BuildTag�int�groupr
)
rC�dashesr@�	name_partrr%�
build_part�build_match�build�tagss
          r�parse_wheel_filenamer[Vs`�����V�$�"�A�(��L�
�	
����}�H�
�^�^�C�
 �F�
�V��"�>�x�j�I�
�	
�
�N�N�3���
�+�E��a��I��y��B�H�H�^�Y��
�
�K�S�"�%;�H�:�#F�G�G��Y�'�D��e�A�h��G�
��{��1�X�
�&�,�,�Z�8����&�(���E�(��1�E��
��X��K�$5�$5�a�$8� 9�;�;L�;L�Q�;O�P�Q�����U�2�Y��D��'�5�$�'�'rc� �|jd�r|dtd�}n/|jd�r|dtd�}ntd|����|jd�\}}}|std|����t	|�}t|�}||fS)Nz.tar.gzz.zipz@Invalid sdist filename (extension must be '.tar.gz' or '.zip'): rzInvalid sdist filename: )rL�lenr�
rpartitionr#r)rC�	file_stemrV�sep�version_partrr%s       r�parse_sdist_filenamerbzs�������#��.��I���/�	�	�	�	�6�	"��^��F��|�,�	�"���z�
�
�	
�$-�#7�#7��#<� �I�s�L��"�%=�h�Z�#H�I�I��Y�'�D��l�#�G��'�?�r)r:�typingrrrrrrZr	r
r%rrrSr,rRr�
ValueErrorrr�compilerrQr#�boolrBr[rbr
rr�<module>rgs��

�9�9� �,���r��E�#�s�(�O�+�,���)�3�/���:���:��!�b�j�j��+���2�:�:�l�+��'�C�'�N�'�BF�-�
�7�C�<�
 �-�:>�-��-�`!(��!(�
�>�7�H�i��n�<�=�!(�H�3��5���1H�+I�rpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc000064400000017503151732704030026006 0ustar00�

��_i����UddlZddlZddlmZddlmZmZmZmZm	Z	m
Z
ddlmZeGd�d��Z
Gd�d	e�Zid
d�dd
�dd�dd�dd�dd�dej dej"��dd�dd�dd�dd�d ej d!ej"��d"ej ej$ej&zej"ej(z��d#d$�d%d&�d'd(�d)d*�d+d,d-d.��Zd/ed0<Gd1�d2�Zy)3�N)�	dataclass)�Dict�Iterator�NoReturn�Optional�Tuple�Union�)�	Specifierc�,�eZdZUeed<eed<eed<y)�Token�name�text�positionN)�__name__�
__module__�__qualname__�str�__annotations__�int����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/_tokenizer.pyr
r
	s��

�I�

�I��Mrr
c�J��eZdZdZdededeeefddf�fd�Zdefd�Z�xZ	S)	�ParserSyntaxErrorz7The provided source text could not be parsed correctly.�message�source�span�returnNc�L��||_||_||_t�|��y)N)rrr�super�__init__)�selfrrr�	__class__s    �rr"zParserSyntaxError.__init__s%�����	�������
���rc���d|jdzd|jd|jdz
zzdz}dj|j|j|g�S)N� r�~r
�^z
    )r�joinrr)r#�markers  r�__str__zParserSyntaxError.__str__ sV���t�y�y��|�#�c�T�Y�Y�q�\�D�I�I�a�L�-H�&I�I�C�O���}�}�d�l�l�D�K�K��@�A�Ar)
rrr�__doc__rrrr"r+�
__classcell__)r$s@rrrsG���A�����	�
�C��H�o��
�
�B��Brr�LEFT_PARENTHESISz\(�RIGHT_PARENTHESISz\)�LEFT_BRACKETz\[�
RIGHT_BRACKETz\]�	SEMICOLON�;�COMMA�,�
QUOTED_STRINGzk
            (
                ('[^']*')
                |
                ("[^"]*")
            )
        �OPz(===|==|~=|!=|<=|>=|<|>)�BOOLOPz\b(or|and)\b�INz\bin\b�NOTz\bnot\b�VARIABLEa�
            \b(
                python_version
                |python_full_version
                |os[._]name
                |sys[._]platform
                |platform_(release|system)
                |platform[._](version|machine|python_implementation)
                |python_implementation
                |implementation_(name|version)
                |extra
            )\b
        �	SPECIFIER�ATz\@�URLz[^ \t]+�
IDENTIFIERz\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b�VERSION_PREFIX_TRAILz\.\*z\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*z[ \t]+�$)�VERSION_LOCAL_LABEL_TRAIL�WS�END�&Dict[str, Union[str, re.Pattern[str]]]�
DEFAULT_RULESc
���eZdZdZdeddddfd�Zdeddfd	�Zd
d�dededefd
�Zdedede	fd�Z
de	fd�Zddd�dedee
dee
defd�Zej"dededededfd��Zy)�	Tokenizerz�Context-sensitive token parsing.

    Provides methods to examine the input stream to check whether the next token
    matches.
    r�rulesrErNc��||_|j�D��cic]\}}|tj|���c}}|_d|_d|_ycc}}w)Nr)r�items�re�compilerI�
next_tokenr)r#rrIr�patterns     rr"zTokenizer.__init___sS�����;@�;�;�=�2
�;H�-�$��D�"�*�*�W�%�%�=�2
��
�,0�����
��	2
s� Arc�H�|j|�r|j�yy)z8Move beyond provided token name, if at current position.N)�check�read)r#rs  r�consumezTokenizer.consumels���:�:�d���I�I�K�rF)�peekrTc�,�|j�Jd|�d|j����||jvs
Jd|����|j|}|j|j|j�}|�y|st||d|j�|_y)z�Check whether the next token has the provided name.

        By default, if the check succeeds, the token *must* be read before
        another check. If `peek` is set to `True`, the token is not loaded and
        would need to be checked again.
        zCannot check for z, already have zUnknown token name: FrT)rNrI�matchrrr
)r#rrT�
expressionrVs     rrQzTokenizer.checkqs���
�O�O�#�	J�
�t�h�o�d�o�o�5H�I�	J�#��t�z�z�!�B�%9�$��#B�B�!��Z�Z��%�
�� � ����d�m�m�<���=���#�D�%��(�D�M�M�B�D�O�r�expectedc�l�|j|�s|jd|����|j�S)zsExpect a certain token name next, failing with a syntax error otherwise.

        The token is *not* read.
        z	Expected )rQ�raise_syntax_errorrR)r#rrXs   r�expectzTokenizer.expect�s4��
�z�z�$���)�)�I�h�Z�*@�A�A��y�y�{�rc��|j}|�J�|xjt|j�z
c_d|_|S)z%Consume the next token and return it.N)rNr�lenr)r#�tokens  rrRzTokenizer.read�s9������� � � ��
�
��U�Z�Z��(�
�����r)�
span_start�span_endrr_r`c�r�|�|jn||�|jn|f}t||j|���)z.Raise ParserSyntaxError at the given position.)rr)rrr)r#rr_r`rs     rrZzTokenizer.raise_syntax_error�sC��(�/�D�M�M�Z�%�-�D�M�M�8�
�� ���;�;��
�	
r�
open_token�close_token�aroundc#��K�|j|�r|j}|j�nd}d��|�y|j|�s|jd|�d|�d|��|��|j�y�w)NzExpected matching z for z, after )r_)rQrrRrZ)r#rbrcrd�
open_positions     r�enclosing_tokenszTokenizer.enclosing_tokens�sz�����:�:�j�!� �M�M�M��I�I�K� �M�
�� ���z�z�+�&��#�#�$�[�M��z�l�(�6�(�S�(�
$�
�
	
�	�	��s�A6A8)rrrr,rr"rS�boolrQr
r[rRrrrrZ�
contextlib�contextmanagerrrgrrrrHrHXs�������8�	�

���C��D��
05��#������*�3��S��U���e��%)�"&�
��
��S�M�	
�
�3�-�
�
�

�$������,/��<?��	�$����rrH)rirL�dataclassesr�typingrrrrrr	�
specifiersrr
�	ExceptionrrM�VERBOSE�_operator_regex_str�_version_regex_str�
IGNORECASErFrrHrrr�<module>rss����	�!�C�C�!������B�	�B�*0;���0;���0;��E�0;��U�	0;�
��0;��T�
0;��Z�R�Z�Z�	�	�
�
�	�0;�"	�
%�#0;�$
�o�%0;�&	�)�'0;�(
�:�)0;�*�
��
�
�	�	�
�
��+0;�J������%�%�	�(D�(D�D�
�
�
�R�]�]�"��K0;�R	�%�S0;�T
�:�U0;�V�3�W0;�X�G�Y0;�Z"D�
��_0;�
�7�0�fh�hrpython3.12/site-packages/setuptools/_vendor/packaging/__pycache__/tags.cpython-312.pyc000064400000050365151732704030024576 0ustar00�

��_i�F�
�j�UddlZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZddlmZmZej*e�ZeeZeeefZdddd	d
d�Zeeefed<ej<d
kZGd�d�Z dede	e fd�Z!d4dede"deeedffd�Z#dedefd�Z$dede"fd�Z%d4dede"deefd�Z&			d5dd�de
ede
e
ede
e
ede"dee f
d �Z'deefd!�Z(			d5dd�d"e
ede
e
ede
e
ede"dee f
d#�Z)dedeefd$�Z*			d5de
ed"e
ede
e
edee fd%�Z+efd&ed'e"defd(�Z,d)ed*edeefd+�Z-	d6d)e
ed&e
edeefd,�Z.efd'e"deefd-�Z/deefd.�Z0deefd/�Z1defd0�Z2dd�de"defd1�Z3d)edefd2�Z4dd�de"dee fd3�Z5y)7�N)�EXTENSION_SUFFIXES)
�Dict�	FrozenSet�Iterable�Iterator�List�Optional�Sequence�Tuple�Union�cast�)�
_manylinux�
_musllinux�py�cp�pp�ip�jy)�python�cpython�pypy�
ironpython�jython�INTERPRETER_SHORT_NAMESlc��eZdZdZgd�Zdedededdfd�Zedefd	��Zedefd
��Z	edefd��Z
dedefd
�Z
defd�Zdefd�Zdefd�Zy)�Tagz�
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    )�_interpreter�_abi�	_platform�_hash�interpreter�abi�platform�returnNc���|j�|_|j�|_|j�|_t	|j|j|jf�|_y�N)�lowerrrr �hashr!)�selfr"r#r$s    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/tags.py�__init__zTag.__init__5sS��'�-�-�/����I�I�K��	�'����)����4�,�,�d�i�i����H�I��
�c��|jSr')r�r*s r+r"zTag.interpreter@s��� � � r-c��|jSr')rr/s r+r#zTag.abiDs���y�y�r-c��|jSr')r r/s r+r$zTag.platformHs���~�~�r-�otherc��t|t�stS|j|jk(xrO|j|jk(xr4|j
|j
k(xr|j|jk(Sr')�
isinstancer�NotImplementedr!r rr)r*r2s  r+�__eq__z
Tag.__eq__Lsn���%��%�!�!��Z�Z�5�;�;�
&�
:����5�?�?�2�
:����e�j�j�(�
:��"�"�e�&8�&8�8�		
r-c��|jSr')r!r/s r+�__hash__zTag.__hash__Ws���z�z�r-c�R�|j�d|j�d|j��S)N�-)rrr r/s r+�__str__zTag.__str__Zs)���#�#�$�A�d�i�i�[��$�.�.�1A�B�Br-c�&�d|�dt|��d�S)N�<z @ �>)�idr/s r+�__repr__zTag.__repr__]s���4�&��B�t�H�:�Q�'�'r-)�__name__�
__module__�__qualname__�__doc__�	__slots__�strr,�propertyr"r#r$�object�boolr6�intr8r;r@�r-r+rr+s����?�I�	J�C�	J�c�	J�S�	J�T�	J��!�S�!��!���S������#����	
�F�	
�t�	
��#��C��C�(�#�(r-r�tagr%c
��t�}|jd�\}}}|jd�D]J}|jd�D]4}|jd�D]}|jt|||��� �6�Lt	|�S)z�
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    r:�.)�set�split�addr�	frozenset)rL�tags�interpreters�abis�	platformsr"r#�	platform_s        r+�	parse_tagrXasz���5�D�$'�I�I�c�N�!�L�$�	�#�)�)�#�.���:�:�c�?�C�&�_�_�S�1�	�����[�#�y�9�:�2�#�/��T�?�r-F�name�warnc�d�tj|�}|�|rtjd|�|S)Nz>Config variable '%s' is unset, Python ABI tag may be incorrect)�	sysconfig�get_config_var�logger�debug)rYrZ�values   r+�_get_config_varraqs1��#,�#;�#;�D�#A�E��}�����L�d�	
��Lr-�stringc�f�|jdd�jdd�jdd�S)NrN�_r:� )�replace)rbs r+�_normalize_stringrgzs-���>�>�#�s�#�+�+�C��5�=�=�c�3�G�Gr-�python_versionc�>�t|�dkDxrt|�dk\S)zj
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    r)��)�len�tuple)rhs r+�
_abi3_appliesrn~s#���~���"�F�u�^�'<��'F�Fr-�
py_versionc	��t|�}g}t|dd�}dx}x}}td|�}ttd�}dt
v}	|s|�|s|	rd}|dkr@td|�}
|
s|
�d	}|d
kr?td|�}|dk(s|�,tjd
k(rd}n|r|jd|���|jddj||||���|S)Nrk��Py_DEBUG�gettotalrefcountz_d.pyd�d)rj��
WITH_PYMALLOC�m)rjrj�Py_UNICODE_SIZE�i���urrz"cp{version}{debug}{pymalloc}{ucs4})�versionr_�pymalloc�ucs4)
rm�_version_nodotra�hasattr�sysr�
maxunicode�append�insert�format)rorZrUr{r_r|r}�
with_debug�has_refcount�has_ext�
with_pymalloc�unicode_sizes            r+�
_cpython_abisr��s���z�"�J�
�D��Z���^�,�G� � �E� �H�t� ��T�2�J��3� 2�3�L��,�,�G��j�(�l�g����F��'���>�
��M�1��H����*�+<�d�C�L��q� ��$����8�)C���	�	
���b��	�N�#��K�K�	�,�3�3��5�8�$�	4�	
���Kr-�rZrUrVc#��K�|stjdd}dt|dd����|�t|�dkDr
t	||�}ng}t|�}dD]}	|j
|��t|xs
t��}|D]}|D]}t�||�����t|�r�fd�|D�Ed{����fd�|D�Ed{���t|�rOt|ddz
dd�D]8}|D]1}d	jt|d
|f����t�d|����3�:yy#t$rY��wxYw7��7�p�w)
a
    Yields the tags for a CPython interpreter.

    The tags consist of:
    - cp<python_version>-<abi>-<platform>
    - cp<python_version>-abi3-<platform>
    - cp<python_version>-none-<platform>
    - cp<less than python_version>-abi3-<platform>  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    Nrkrr)�abi3�nonec3�8�K�|]}t�d|����y�w)r�N�r��.0rWr"s  �r+�	<genexpr>zcpython_tags.<locals>.<genexpr>�s�����S��I�C��V�Y�7����c3�8�K�|]}t�d|����y�w)r�Nr�r�s  �r+r�zcpython_tags.<locals>.<genexpr>�s�����O�Y�	��K���3�Y�r����zcp{version}r�r{r�)
r��version_infor~rlr��list�remove�
ValueError�
platform_tagsrrn�ranger�)	rhrUrVrZ�explicit_abir#rW�
minor_versionr"s	        @r+�cpython_tagsr��se�����,��)�)�"�1�-���~�n�R�a�&8�9�:�;�K��|��~���"� ���6�D��D���:�D�(��	��K�K��%�)��Y�1�-�/�2�I���"�I��k�3�	�2�2�#���^�$�S��S�S�S�O�Y�O�O�O��^�$�"�>�!�#4�q�#8�!�R�@�M�&�	�+�2�2�*�N�1�,=�}�+M�N�3����+�v�y�9�9�	'�A�%���	��	��	T��O�sJ�AE�D-�+AE�:D<�;E�
D>�AE�-	D9�6E�8D9�9E�>Ec�z�tdd��}t|t�r|ddk7rtd��|j	d�}t|�dkrt
tjdd	�S|d
}|jd�rd|j	d
�d
z}n�|jd�r|j	d
�d}nq|jd�r$d
j|j	d
�dd	�}n<|jd�r$d
j|j	d
�dd�}n|r|}ngSt|�gS)z1
    Return the ABI tag based on EXT_SUFFIX.
    �
EXT_SUFFIXTr�rrNz.invalid sysconfig.get_config_var('EXT_SUFFIX')rjNrkrrrr:r�graalpy)rar4rF�SystemErrorrPrlr�r�r��
startswith�joinrg)�
ext_suffix�parts�soabir#s    r+�_generic_abir��s'��!��D�9�J��j�#�&�*�Q�-�3�*>��J�K�K����S�!�E�
�5�z�A�~��S�-�-�b�q�1�2�2��!�H�E����	�"��U�[�[��%�a�(�(��	�	�	�$�	��k�k�#��q�!��	�	�	�&�	!��h�h�u�{�{�3�'���+�,��	�	�	�)�	$��h�h�u�{�{�3�'���+�,��	����	��c�"�#�#r-r"c#�$K�|s)t�}t|��}dj||g�}|�t�}nt	|�}t	|xs
t��}d|vr|j
d�|D]}|D]}t|||�����y�w)z�
    Yields the tags for a generic interpreter.

    The tags consist of:
    - <interpreter>-<abi>-<platform>

    The "none" ABI will be added if it was not explicitly provided.
    r�rqNr�)�interpreter_name�interpreter_versionr�r�r�r�r�r)r"rUrVrZ�interp_name�interp_versionr#rWs        r+�generic_tagsr�
s������&�(��,�$�7���g�g�{�N�;�<���|��~���D�z���Y�1�-�/�2�I�
�T�����F����"�I��k�3�	�2�2�#��s�BBc#��K�t|�dkDrdt|dd�����d|d����t|�dkDr.t|ddz
dd�D]}dt|d|f������yy�w)z�
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    rrNrkrr�)rlr~r�)ro�minors  r+�_py_interpreter_ranger�,s������:�����>�*�R�a�.�1�2�3�3��z�!�}�o�
��
�:�����:�a�=�1�,�b�"�5�E��~�z�!�}�e�&<�=�>�?�?�6��s�A)A+c#�K�|stjdd}t|xs
t��}t	|�D]}|D]}t|d|�����|rt|dd���t	|�D]}t|dd����y�w)z�
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-<platform>
    - <interpreter>-none-any  # ... if `interpreter` is provided.
    - py*-none-any
    Nrkr��any)r�r�r�r�r�r)rhr"rVr{rWs     r+�compatible_tagsr�;s�������)�)�"�1�-���Y�1�-�/�2�I�(��8��"�I��g�v�y�1�1�#�9���+�v�u�-�-�(��8���'�6�5�)�)�9�s�BB�arch�is_32bitc�0�|s|S|jd�ryy)N�ppc�i386)r�)r�r�s  r+�	_mac_archr�Ts��������u���r-r{�cpu_archc�d�|g}|dk(r|dkrgS|jgd��nb|dk(r|dkrgS|jgd��nB|dk(r|dkDs|dkrgS|jd�n|d	k(r|d
kDrgS|jddg�|d
vr|jd�|dvr|jd�|S)N�x86_64)�
ry)�intel�fat64�fat32r�)r�r��fat�ppc64)r��r�r�)r��r�r�>�arm64r��
universal2>r�r�r�r�r��	universal)�extendr�)r{r��formatss   r+�_mac_binary_formatsr�^s����j�G��8���W���I����2�3�	�V�	��W���I����0�1�	�W�	��W���'� 1��I����w��	�U�	��W���I������'�(��&�&����|�$��>�>����{�#��Nr-c#�K�tj�\}}}|��tdtt	t
|j
d�dd���}|dk(r~tjtjdddgd	d
ditjd	��j}tdtt	t
|j
d�dd���}n|}|�t|�}n|}d
|krG|dkrBt|ddd�D]/}d|f}t||�}|D]}dj!d||������1|dk\rBt|ddd�D]/}	|	df}t||�}|D]}dj!|	d|������1|dk\r�|dk(rFtddd�D]5}d|f}t||�}|D]}dj!|d|d|����� �7ytddd�D]$}d|f}d}dj!|d|d|�����&yy�w)aD
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    N�
MacVersionrNrk)r��z-sSz-cz-import platform; print(platform.mac_ver()[0])T�SYSTEM_VERSION_COMPAT�0)�check�env�stdout�universal_newlines)r�r)�rrr�r�z&macosx_{major}_{minor}_{binary_format})�majorr��
binary_formatrr�r�rjr�)r$�mac_verr
rm�maprJrP�
subprocess�runr��
executable�PIPEr�r�r�r�r�)
r{r��version_strrdr�r��compat_version�binary_formatsr��
major_versions
          r+�
mac_platformsr�~ss���� (�/�/�1��K��H����|�U�3�s�K�4E�4E�c�4J�2�A�4N�+O�%P�Q���h��%�.�.��N�N���C�	��,�c�2�!���#'���f�
��<��s�3��8I�8I�#�8N�r�PQ�8R�/S�)T�U�G����|���"�����'��g��/�#�7�1�:�r�2�6�M���.�N�0���F�N�!/�
�>�E�E��M��F���"0�7��'��#�7�1�:�r�2�6�M�*�A�-�N�0���F�N�!/�
�>�E�E�'�q�
�F���"0�7��'���8��!&�r�1�b�!1�
�!#�]�!2��!4�^�T�!J��%3�M�B�I�I�,�Q�/�,�Q�/�&3�J���&4�"2�"'�r�1�b�!1�
�!#�]�!2�� ,�
�>�E�E�(��+�(��+�"/�F���"2�'�s�G<G>c#�K�ttj��}|r|dk(rd}n|dk(rd}|jdd�\}}t	j
||�Ed{���t
j
|�Ed{���|��y7�&7��w)N�linux_x86_64�
linux_i686�
linux_aarch64�linux_armv7lrdr)rgr\�get_platformrPrr�r)r��linuxrdr�s    r+�_linux_platformsr��s������i�4�4�6�7�E���N�"� �E�
�o�
%�"�E��k�k�#�q�!�G�A�t��'�'��t�4�4�4��'�'��-�-�-�
�K�5��-�s$�AB
�B� B
�<B�=
B
�B
c#�JK�ttj����y�wr')rgr\r�rKr-r+�_generic_platformsr��s����
�I�2�2�4�
5�5�s�!#c��tj�dk(r
t�Stj�dk(r
t�St	�S)z;
    Provides the platform tags for this installation.
    �Darwin�Linux)r$�systemr�r�r�rKr-r+r�r��s<������H�$����	���	�g�	%��!�!�!�#�#r-c�h�tjj}tj	|�xs|S)z�
    Returns the name of the running interpreter.

    Some implementations have a reserved, two-letter abbreviation which will
    be returned when appropriate.
    )r��implementationrYr�get)rYs r+r�r��s+�����"�"�D�"�&�&�t�,�4��4r-c�v�td|��}|r
t|�}|Sttjdd�}|S)z9
    Returns the version of the running interpreter.
    �py_version_nodotr�Nrk)rarFr~r�r�)rZr{s  r+r�r��sB���0�t�<�G���g�,���N�!��!1�!1�"�1�!5�6���Nr-c�@�djtt|��S)Nrq)r�r�rFr�s r+r~r~
s��
�7�7�3�s�G�$�%�%r-c#��K�t�}|dk(rt|��Ed{���nt�Ed{���|dk(rd}n|dk(rdt|��z}nd}t	|��Ed{���y7�K7�:7�	�w)z�
    Returns the sequence of tag triples for the running interpreter.

    The order of the sequence corresponds to priority order for the
    interpreter, from most to least important.
    rr�Nr�pp3)r")r�r�r�r�r�)rZr��interps   r+�sys_tagsr�sx����#�$�K��d���T�*�*�*��>�!�!��d����	��	��+��6�6�����6�2�2�2�	+��!��3�s1�A3�A-�A3�A/�2A3�'A1�(A3�/A3�1A3)F)NNN)NN)6�loggingr$r�r�r\�importlib.machineryr�typingrrrrrr	r
rrr
rqrr�	getLoggerrAr^rJ�
PythonVersionr�rrF�__annotations__�maxsize�_32_BIT_INTERPRETERrrXrIrargrnr�r�r�r�r�r�r�r�r�r�r�r�r�r�r~r�rKr-r+�<module>rs^��
���
��2����%�	��	�	�8�	$����
�
�
�3��8�_�
������+���c�3�h����k�k�U�*��3(�3(�l
�3�
�9�S�>�
� �#��T��e�C��d�N�6K��H�c�H�c�H�G�-�G�D�G�!�m�!�4�!�D��I�!�J/3�$(�)-�6:�
�6:��]�+�6:�
�8�C�=�
!�6:����
�&�6:�
�6:��c�]�
6:�r&$�d�3�i�&$�T"&�$(�)-�3�
�3��#��3�
�8�C�=�
!�3����
�&�3�
�3��c�]�
3�>@�m�@���
�@� /3�!%�)-�*��]�+�*��#��*����
�&�*��c�]�	*�2+>��C��4��#�����s��t�C�y��BAE�U�
�j�
!�U�08��
�U�
�c�]�U�p':�
�t�
�h�s�m�
�6�H�S�M�6�	$�x��}�	$�5�#�5�).�	��	�#�	�&�M�&�c�&�#�3�d�3�x��}�3r-python3.12/site-packages/setuptools/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc000064400000021744151732704030026022 0ustar00�

��_i�"���UddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
ddlmZmZmZmZdZdZdZej,ded	e	eeddffd
��Zded	efd�Zded	efd
�Zdeded	efd�Zej:d��Zeeefe d<Gd�de�Z!d	eefd�Z"d	eefd�Z#d	eefd�Z$ded	e
eeffd�Z%ejL�d	e
eeffd��Z'dedede!d	efd�Z(dddd �Z)d!eded	e
efd"�Z*y)#�N)�Dict�	Generator�Iterator�
NamedTuple�Optional�Tuple�)�EIClass�EIData�ELFFile�EMachinel~ii�path�returnc#�K�	t|d�5}t|���ddd�y#1swYyxYw#tttf$rd��YywxYw�w)N�rb)�openr�OSError�	TypeError�
ValueError)r�fs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/packaging/_manylinux.py�
_parse_elfrsF�����
�$��
���!�*���
�
���Y�
�+���
��s>�A�3�'�3�A�0�3�A�3�A�A�
A�A�
executablec�x�t|�5}|duxr�|jtjk(xrt|jt
jk(xrU|jtjk(xr6|jtztk(xr|jtztk(	cddd�S#1swYyxYw�N)r�capacityr
�C32�encodingr�Lsb�machiner
�Arm�flags�EF_ARM_ABIMASK�EF_ARM_ABI_VER5�EF_ARM_ABI_FLOAT_HARD�rrs  r�_is_linux_armhfr's���
�J�	�1�
�T�M�
I��
�
�g�k�k�)�
I��
�
�f�j�j�(�
I��	�	�X�\�\�)�
I����.�(�O�;�	
I�
���/�/�3H�H�
	
�
 �	�	�s�BB0�0B9c��t|�5}|duxr[|jtjk(xr<|jt
jk(xr|jtjk(	cddd�S#1swYyxYwr)
rrr
rrrrr r
�I386r&s  r�_is_linux_i686r*+se��	�J�	�1�
�T�M�
+��
�
�g�k�k�)�
+��
�
�f�j�j�(�
+��	�	�X�]�]�*�		
�
 �	�	�s�A"A8�8B�archc�J�|dk(rt|�S|dk(rt|�S|dvS)N�armv7l�i686>�ppc64�s390x�x86_64�aarch64�ppc64le)r'r*)rr+s  r�_have_compatible_abir45s3���x���z�*�*��v�~��j�)�)��E�E�E�c��y)N�2�r8r5r�<lambda>r9Bs��Br5�_LAST_GLIBC_MINORc�"�eZdZUeed<eed<y)�
_GLibCVersion�major�minorN)�__name__�
__module__�__qualname__�int�__annotations__r8r5rr<r<Es���J��Jr5r<c��	ttd�d�}|�J�|j�\}}|S#ttt
tf$rYywxYw)zJ
    Primary implementation of glibc_version_string using os.confstr.
    �confstr�CS_GNU_LIBC_VERSIONN)�getattr�os�rsplit�AssertionError�AttributeErrorrr)�version_string�_�versions   r�_glibc_version_string_confstrrOJs]���4�g�b�)�4�5J�K���)�)�)�#�*�*�,�
��7��N��
�N�G�Z�@����s�-1�A
�A
c��	ddl}	|jd�}	|j}|j|_|�}t|t�s|jd�}|S#t$rYywxYw#t$rYywxYw#t
$rYywxYw)zG
    Fallback implementation of glibc_version_string using ctypes.
    rN�ascii)�ctypes�ImportError�CDLLr�gnu_get_libc_versionrK�c_char_p�restype�
isinstance�str�decode)rR�process_namespacerU�version_strs    r�_glibc_version_string_ctypesr]]s�����"�"�K�K��-���0�E�E��$*�?�?�� �+�-�K��k�3�'�!�(�(��1�����G�����$�����
����s3�A �A/�A>� 	A,�+A,�/	A;�:A;�>	B
�	B
c�.�t�xs
t�S)z9Returns glibc version string, or None if not using glibc.)rOr]r8r5r�_glibc_version_stringr_�s��(�*�L�.J�.L�Lr5r\c���tjd|�}|stjd|��t�yt|j
d��t|j
d��fS)a3Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    z$(?P<major>[0-9]+)\.(?P<minor>[0-9]+)z;Expected glibc version with 2 components major.minor, got: ����rbr=r>)�re�match�warnings�warn�RuntimeWarningrB�group)r\�ms  r�_parse_glibc_versionrj�sb��	���8�+�F�A���
�
�� �M�
#��	
�
��q�w�w�w�� �#�a�g�g�g�&6�"7�7�7r5c�2�t�}|�yt|�S)Nra)r_rj)r\s r�_get_glibc_versionrl�s��'�)�K������,�,r5�namerNc���t�}||kry	ddl}t|d�r'|j	|d|d|�}|�t|�Sy|t
dd�k(r!t|d�rt|j�S|t
dd	�k(r!t|d
�rt|j�S|t
dd�k(r!t|d�rt|j�Sy#t$rYywxYw)
NFrT�manylinux_compatibler	���manylinux1_compatible��manylinux2010_compatible��manylinux2014_compatible)
rl�
_manylinuxrS�hasattrro�boolr<rrrtrv)rmr+rN�	sys_glibcrw�results      r�_is_compatibler|�s���"�$�I��7������z�1�2��0�0����W�Q�Z��N������<����-��1�%�%��:�6�7��
�8�8�9�9��-��2�&�&��:�9�:��
�;�;�<�<��-��2�&�&��:�9�:��
�;�;�<�<���!����s�C�	C&�%C&�
manylinux2014�
manylinux2010�
manylinux1))rpru)rprs)rprq�linuxc#�K�ttj|�sytdd�}|dvrtdd�}tt	��}|g}t|jdz
dd�D]&}t|}|jt||���(|D]�}|j|jk(r
|j}nd}t|j|d�D]|}t|j|�}	dj|	�}
t|
||	�r|jd|
���|	tvs�Rt|	}t|||	�s�i|jd|����~��y�w)	Nrp�>r.r1�r	rbzmanylinux_{}_{}r�)r4�sysrr<rl�ranger=r:�appendr>�formatr|�replace�_LEGACY_MANYLINUX_MAP)r�r+�too_old_glibc2�
current_glibc�glibc_max_list�glibc_major�glibc_minor�	glibc_max�	min_minor�
glibc_version�tag�
legacy_tags            r�
platform_tagsr��sD���������5��"�1�b�)�N��!�!�&�q�!�,��!�#5�#7�8�M�#�_�N��]�0�0�1�4�a��<��'��4�����m�K��E�F�=�$�	��?�?�n�2�2�2�&�,�,�I��I� ����)�R�@�K�)�)�/�/�;�G�M�*�#�*�*�M�:�C��c�4��7��m�m�G�S�1�1�� 5�5�2�=�A�
�!�*�d�M�B��-�-���<�<�A�
$�s�D#E�&E�=E)+�collections�
contextlib�	functoolsrHrcr�re�typingrrrrrr�_elffiler
rrr
r#r$r%�contextmanagerrYrryr'r*r4�defaultdictr:rBrCr<rOr]r_rj�	lru_cacherlr|r�r�r8r5r�<module>r�s������	�	�
��I�I�8�8�����"��
����S��Y�x��'8�$��'D�E����
��
��
�
�s�
�t�
�F�S�F��F��F�%<�K�$;�$;�J�$G��4��S��>�G��J��
�x��}��&)�h�s�m�)�XM�x��}�M�
8�c�8�e�C��H�o�8�&�����-�E�#�s�(�O�-��-����C��-��D��8�
��
��"=��"=�C�"=�H�S�M�"=r5python3.12/site-packages/setuptools/_vendor/packaging/_musllinux.py000064400000004734151732704030021475 0ustar00"""PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
"""

import functools
import re
import subprocess
import sys
from typing import Iterator, NamedTuple, Optional

from ._elffile import ELFFile


class _MuslVersion(NamedTuple):
    major: int
    minor: int


def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
    lines = [n for n in (n.strip() for n in output.splitlines()) if n]
    if len(lines) < 2 or lines[0][:4] != "musl":
        return None
    m = re.match(r"Version (\d+)\.(\d+)", lines[1])
    if not m:
        return None
    return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2)))


@functools.lru_cache()
def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
    """Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    """
    try:
        with open(executable, "rb") as f:
            ld = ELFFile(f).interpreter
    except (OSError, TypeError, ValueError):
        return None
    if ld is None or "musl" not in ld:
        return None
    proc = subprocess.run([ld], stderr=subprocess.PIPE, universal_newlines=True)
    return _parse_musl_version(proc.stderr)


def platform_tags(arch: str) -> Iterator[str]:
    """Generate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    """
    sys_musl = _get_musl_version(sys.executable)
    if sys_musl is None:  # Python not dynamically linked against musl.
        return
    for minor in range(sys_musl.minor, -1, -1):
        yield f"musllinux_{sys_musl.major}_{minor}_{arch}"


if __name__ == "__main__":  # pragma: no cover
    import sysconfig

    plat = sysconfig.get_platform()
    assert plat.startswith("linux-"), "not linux"

    print("plat:", plat)
    print("musl:", _get_musl_version(sys.executable))
    print("tags:", end=" ")
    for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])):
        print(t, end="\n      ")
python3.12/site-packages/setuptools/_vendor/packaging/_tokenizer.py000064400000012254151732704030021443 0ustar00import contextlib
import re
from dataclasses import dataclass
from typing import Dict, Iterator, NoReturn, Optional, Tuple, Union

from .specifiers import Specifier


@dataclass
class Token:
    name: str
    text: str
    position: int


class ParserSyntaxError(Exception):
    """The provided source text could not be parsed correctly."""

    def __init__(
        self,
        message: str,
        *,
        source: str,
        span: Tuple[int, int],
    ) -> None:
        self.span = span
        self.message = message
        self.source = source

        super().__init__()

    def __str__(self) -> str:
        marker = " " * self.span[0] + "~" * (self.span[1] - self.span[0]) + "^"
        return "\n    ".join([self.message, self.source, marker])


DEFAULT_RULES: "Dict[str, Union[str, re.Pattern[str]]]" = {
    "LEFT_PARENTHESIS": r"\(",
    "RIGHT_PARENTHESIS": r"\)",
    "LEFT_BRACKET": r"\[",
    "RIGHT_BRACKET": r"\]",
    "SEMICOLON": r";",
    "COMMA": r",",
    "QUOTED_STRING": re.compile(
        r"""
            (
                ('[^']*')
                |
                ("[^"]*")
            )
        """,
        re.VERBOSE,
    ),
    "OP": r"(===|==|~=|!=|<=|>=|<|>)",
    "BOOLOP": r"\b(or|and)\b",
    "IN": r"\bin\b",
    "NOT": r"\bnot\b",
    "VARIABLE": re.compile(
        r"""
            \b(
                python_version
                |python_full_version
                |os[._]name
                |sys[._]platform
                |platform_(release|system)
                |platform[._](version|machine|python_implementation)
                |python_implementation
                |implementation_(name|version)
                |extra
            )\b
        """,
        re.VERBOSE,
    ),
    "SPECIFIER": re.compile(
        Specifier._operator_regex_str + Specifier._version_regex_str,
        re.VERBOSE | re.IGNORECASE,
    ),
    "AT": r"\@",
    "URL": r"[^ \t]+",
    "IDENTIFIER": r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b",
    "VERSION_PREFIX_TRAIL": r"\.\*",
    "VERSION_LOCAL_LABEL_TRAIL": r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*",
    "WS": r"[ \t]+",
    "END": r"$",
}


class Tokenizer:
    """Context-sensitive token parsing.

    Provides methods to examine the input stream to check whether the next token
    matches.
    """

    def __init__(
        self,
        source: str,
        *,
        rules: "Dict[str, Union[str, re.Pattern[str]]]",
    ) -> None:
        self.source = source
        self.rules: Dict[str, re.Pattern[str]] = {
            name: re.compile(pattern) for name, pattern in rules.items()
        }
        self.next_token: Optional[Token] = None
        self.position = 0

    def consume(self, name: str) -> None:
        """Move beyond provided token name, if at current position."""
        if self.check(name):
            self.read()

    def check(self, name: str, *, peek: bool = False) -> bool:
        """Check whether the next token has the provided name.

        By default, if the check succeeds, the token *must* be read before
        another check. If `peek` is set to `True`, the token is not loaded and
        would need to be checked again.
        """
        assert (
            self.next_token is None
        ), f"Cannot check for {name!r}, already have {self.next_token!r}"
        assert name in self.rules, f"Unknown token name: {name!r}"

        expression = self.rules[name]

        match = expression.match(self.source, self.position)
        if match is None:
            return False
        if not peek:
            self.next_token = Token(name, match[0], self.position)
        return True

    def expect(self, name: str, *, expected: str) -> Token:
        """Expect a certain token name next, failing with a syntax error otherwise.

        The token is *not* read.
        """
        if not self.check(name):
            raise self.raise_syntax_error(f"Expected {expected}")
        return self.read()

    def read(self) -> Token:
        """Consume the next token and return it."""
        token = self.next_token
        assert token is not None

        self.position += len(token.text)
        self.next_token = None

        return token

    def raise_syntax_error(
        self,
        message: str,
        *,
        span_start: Optional[int] = None,
        span_end: Optional[int] = None,
    ) -> NoReturn:
        """Raise ParserSyntaxError at the given position."""
        span = (
            self.position if span_start is None else span_start,
            self.position if span_end is None else span_end,
        )
        raise ParserSyntaxError(
            message,
            source=self.source,
            span=span,
        )

    @contextlib.contextmanager
    def enclosing_tokens(
        self, open_token: str, close_token: str, *, around: str
    ) -> Iterator[None]:
        if self.check(open_token):
            open_position = self.position
            self.read()
        else:
            open_position = None

        yield

        if open_position is None:
            return

        if not self.check(close_token):
            self.raise_syntax_error(
                f"Expected matching {close_token} for {open_token}, after {around}",
                span_start=open_position,
            )

        self.read()
python3.12/site-packages/setuptools/_vendor/packaging/_manylinux.py000064400000021336151732704040021457 0ustar00import collections
import contextlib
import functools
import os
import re
import sys
import warnings
from typing import Dict, Generator, Iterator, NamedTuple, Optional, Tuple

from ._elffile import EIClass, EIData, ELFFile, EMachine

EF_ARM_ABIMASK = 0xFF000000
EF_ARM_ABI_VER5 = 0x05000000
EF_ARM_ABI_FLOAT_HARD = 0x00000400


# `os.PathLike` not a generic type until Python 3.9, so sticking with `str`
# as the type for `path` until then.
@contextlib.contextmanager
def _parse_elf(path: str) -> Generator[Optional[ELFFile], None, None]:
    try:
        with open(path, "rb") as f:
            yield ELFFile(f)
    except (OSError, TypeError, ValueError):
        yield None


def _is_linux_armhf(executable: str) -> bool:
    # hard-float ABI can be detected from the ELF header of the running
    # process
    # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf
    with _parse_elf(executable) as f:
        return (
            f is not None
            and f.capacity == EIClass.C32
            and f.encoding == EIData.Lsb
            and f.machine == EMachine.Arm
            and f.flags & EF_ARM_ABIMASK == EF_ARM_ABI_VER5
            and f.flags & EF_ARM_ABI_FLOAT_HARD == EF_ARM_ABI_FLOAT_HARD
        )


def _is_linux_i686(executable: str) -> bool:
    with _parse_elf(executable) as f:
        return (
            f is not None
            and f.capacity == EIClass.C32
            and f.encoding == EIData.Lsb
            and f.machine == EMachine.I386
        )


def _have_compatible_abi(executable: str, arch: str) -> bool:
    if arch == "armv7l":
        return _is_linux_armhf(executable)
    if arch == "i686":
        return _is_linux_i686(executable)
    return arch in {"x86_64", "aarch64", "ppc64", "ppc64le", "s390x"}


# If glibc ever changes its major version, we need to know what the last
# minor version was, so we can build the complete list of all versions.
# For now, guess what the highest minor version might be, assume it will
# be 50 for testing. Once this actually happens, update the dictionary
# with the actual value.
_LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50)


class _GLibCVersion(NamedTuple):
    major: int
    minor: int


def _glibc_version_string_confstr() -> Optional[str]:
    """
    Primary implementation of glibc_version_string using os.confstr.
    """
    # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely
    # to be broken or missing. This strategy is used in the standard library
    # platform module.
    # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183
    try:
        # Should be a string like "glibc 2.17".
        version_string: str = getattr(os, "confstr")("CS_GNU_LIBC_VERSION")
        assert version_string is not None
        _, version = version_string.rsplit()
    except (AssertionError, AttributeError, OSError, ValueError):
        # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...
        return None
    return version


def _glibc_version_string_ctypes() -> Optional[str]:
    """
    Fallback implementation of glibc_version_string using ctypes.
    """
    try:
        import ctypes
    except ImportError:
        return None

    # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
    # manpage says, "If filename is NULL, then the returned handle is for the
    # main program". This way we can let the linker do the work to figure out
    # which libc our process is actually using.
    #
    # We must also handle the special case where the executable is not a
    # dynamically linked executable. This can occur when using musl libc,
    # for example. In this situation, dlopen() will error, leading to an
    # OSError. Interestingly, at least in the case of musl, there is no
    # errno set on the OSError. The single string argument used to construct
    # OSError comes from libc itself and is therefore not portable to
    # hard code here. In any case, failure to call dlopen() means we
    # can proceed, so we bail on our attempt.
    try:
        process_namespace = ctypes.CDLL(None)
    except OSError:
        return None

    try:
        gnu_get_libc_version = process_namespace.gnu_get_libc_version
    except AttributeError:
        # Symbol doesn't exist -> therefore, we are not linked to
        # glibc.
        return None

    # Call gnu_get_libc_version, which returns a string like "2.5"
    gnu_get_libc_version.restype = ctypes.c_char_p
    version_str: str = gnu_get_libc_version()
    # py2 / py3 compatibility:
    if not isinstance(version_str, str):
        version_str = version_str.decode("ascii")

    return version_str


def _glibc_version_string() -> Optional[str]:
    """Returns glibc version string, or None if not using glibc."""
    return _glibc_version_string_confstr() or _glibc_version_string_ctypes()


def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
    """Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    """
    m = re.match(r"(?P<major>[0-9]+)\.(?P<minor>[0-9]+)", version_str)
    if not m:
        warnings.warn(
            f"Expected glibc version with 2 components major.minor,"
            f" got: {version_str}",
            RuntimeWarning,
        )
        return -1, -1
    return int(m.group("major")), int(m.group("minor"))


@functools.lru_cache()
def _get_glibc_version() -> Tuple[int, int]:
    version_str = _glibc_version_string()
    if version_str is None:
        return (-1, -1)
    return _parse_glibc_version(version_str)


# From PEP 513, PEP 600
def _is_compatible(name: str, arch: str, version: _GLibCVersion) -> bool:
    sys_glibc = _get_glibc_version()
    if sys_glibc < version:
        return False
    # Check for presence of _manylinux module.
    try:
        import _manylinux  # noqa
    except ImportError:
        return True
    if hasattr(_manylinux, "manylinux_compatible"):
        result = _manylinux.manylinux_compatible(version[0], version[1], arch)
        if result is not None:
            return bool(result)
        return True
    if version == _GLibCVersion(2, 5):
        if hasattr(_manylinux, "manylinux1_compatible"):
            return bool(_manylinux.manylinux1_compatible)
    if version == _GLibCVersion(2, 12):
        if hasattr(_manylinux, "manylinux2010_compatible"):
            return bool(_manylinux.manylinux2010_compatible)
    if version == _GLibCVersion(2, 17):
        if hasattr(_manylinux, "manylinux2014_compatible"):
            return bool(_manylinux.manylinux2014_compatible)
    return True


_LEGACY_MANYLINUX_MAP = {
    # CentOS 7 w/ glibc 2.17 (PEP 599)
    (2, 17): "manylinux2014",
    # CentOS 6 w/ glibc 2.12 (PEP 571)
    (2, 12): "manylinux2010",
    # CentOS 5 w/ glibc 2.5 (PEP 513)
    (2, 5): "manylinux1",
}


def platform_tags(linux: str, arch: str) -> Iterator[str]:
    if not _have_compatible_abi(sys.executable, arch):
        return
    # Oldest glibc to be supported regardless of architecture is (2, 17).
    too_old_glibc2 = _GLibCVersion(2, 16)
    if arch in {"x86_64", "i686"}:
        # On x86/i686 also oldest glibc to be supported is (2, 5).
        too_old_glibc2 = _GLibCVersion(2, 4)
    current_glibc = _GLibCVersion(*_get_glibc_version())
    glibc_max_list = [current_glibc]
    # We can assume compatibility across glibc major versions.
    # https://sourceware.org/bugzilla/show_bug.cgi?id=24636
    #
    # Build a list of maximum glibc versions so that we can
    # output the canonical list of all glibc from current_glibc
    # down to too_old_glibc2, including all intermediary versions.
    for glibc_major in range(current_glibc.major - 1, 1, -1):
        glibc_minor = _LAST_GLIBC_MINOR[glibc_major]
        glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor))
    for glibc_max in glibc_max_list:
        if glibc_max.major == too_old_glibc2.major:
            min_minor = too_old_glibc2.minor
        else:
            # For other glibc major versions oldest supported is (x, 0).
            min_minor = -1
        for glibc_minor in range(glibc_max.minor, min_minor, -1):
            glibc_version = _GLibCVersion(glibc_max.major, glibc_minor)
            tag = "manylinux_{}_{}".format(*glibc_version)
            if _is_compatible(tag, arch, glibc_version):
                yield linux.replace("linux", tag)
            # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags.
            if glibc_version in _LEGACY_MANYLINUX_MAP:
                legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version]
                if _is_compatible(legacy_tag, arch, glibc_version):
                    yield linux.replace("linux", legacy_tag)
python3.12/site-packages/setuptools/_vendor/packaging/tags.py000064400000043272151732704040020235 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import logging
import platform
import subprocess
import sys
import sysconfig
from importlib.machinery import EXTENSION_SUFFIXES
from typing import (
    Dict,
    FrozenSet,
    Iterable,
    Iterator,
    List,
    Optional,
    Sequence,
    Tuple,
    Union,
    cast,
)

from . import _manylinux, _musllinux

logger = logging.getLogger(__name__)

PythonVersion = Sequence[int]
MacVersion = Tuple[int, int]

INTERPRETER_SHORT_NAMES: Dict[str, str] = {
    "python": "py",  # Generic.
    "cpython": "cp",
    "pypy": "pp",
    "ironpython": "ip",
    "jython": "jy",
}


_32_BIT_INTERPRETER = sys.maxsize <= 2**32


class Tag:
    """
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    """

    __slots__ = ["_interpreter", "_abi", "_platform", "_hash"]

    def __init__(self, interpreter: str, abi: str, platform: str) -> None:
        self._interpreter = interpreter.lower()
        self._abi = abi.lower()
        self._platform = platform.lower()
        # The __hash__ of every single element in a Set[Tag] will be evaluated each time
        # that a set calls its `.disjoint()` method, which may be called hundreds of
        # times when scanning a page of links for packages with tags matching that
        # Set[Tag]. Pre-computing the value here produces significant speedups for
        # downstream consumers.
        self._hash = hash((self._interpreter, self._abi, self._platform))

    @property
    def interpreter(self) -> str:
        return self._interpreter

    @property
    def abi(self) -> str:
        return self._abi

    @property
    def platform(self) -> str:
        return self._platform

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, Tag):
            return NotImplemented

        return (
            (self._hash == other._hash)  # Short-circuit ASAP for perf reasons.
            and (self._platform == other._platform)
            and (self._abi == other._abi)
            and (self._interpreter == other._interpreter)
        )

    def __hash__(self) -> int:
        return self._hash

    def __str__(self) -> str:
        return f"{self._interpreter}-{self._abi}-{self._platform}"

    def __repr__(self) -> str:
        return f"<{self} @ {id(self)}>"


def parse_tag(tag: str) -> FrozenSet[Tag]:
    """
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    """
    tags = set()
    interpreters, abis, platforms = tag.split("-")
    for interpreter in interpreters.split("."):
        for abi in abis.split("."):
            for platform_ in platforms.split("."):
                tags.add(Tag(interpreter, abi, platform_))
    return frozenset(tags)


def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]:
    value: Union[int, str, None] = sysconfig.get_config_var(name)
    if value is None and warn:
        logger.debug(
            "Config variable '%s' is unset, Python ABI tag may be incorrect", name
        )
    return value


def _normalize_string(string: str) -> str:
    return string.replace(".", "_").replace("-", "_").replace(" ", "_")


def _abi3_applies(python_version: PythonVersion) -> bool:
    """
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    """
    return len(python_version) > 1 and tuple(python_version) >= (3, 2)


def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
    py_version = tuple(py_version)  # To allow for version comparison.
    abis = []
    version = _version_nodot(py_version[:2])
    debug = pymalloc = ucs4 = ""
    with_debug = _get_config_var("Py_DEBUG", warn)
    has_refcount = hasattr(sys, "gettotalrefcount")
    # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled
    # extension modules is the best option.
    # https://github.com/pypa/pip/issues/3383#issuecomment-173267692
    has_ext = "_d.pyd" in EXTENSION_SUFFIXES
    if with_debug or (with_debug is None and (has_refcount or has_ext)):
        debug = "d"
    if py_version < (3, 8):
        with_pymalloc = _get_config_var("WITH_PYMALLOC", warn)
        if with_pymalloc or with_pymalloc is None:
            pymalloc = "m"
        if py_version < (3, 3):
            unicode_size = _get_config_var("Py_UNICODE_SIZE", warn)
            if unicode_size == 4 or (
                unicode_size is None and sys.maxunicode == 0x10FFFF
            ):
                ucs4 = "u"
    elif debug:
        # Debug builds can also load "normal" extension modules.
        # We can also assume no UCS-4 or pymalloc requirement.
        abis.append(f"cp{version}")
    abis.insert(
        0,
        "cp{version}{debug}{pymalloc}{ucs4}".format(
            version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4
        ),
    )
    return abis


def cpython_tags(
    python_version: Optional[PythonVersion] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a CPython interpreter.

    The tags consist of:
    - cp<python_version>-<abi>-<platform>
    - cp<python_version>-abi3-<platform>
    - cp<python_version>-none-<platform>
    - cp<less than python_version>-abi3-<platform>  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    """
    if not python_version:
        python_version = sys.version_info[:2]

    interpreter = f"cp{_version_nodot(python_version[:2])}"

    if abis is None:
        if len(python_version) > 1:
            abis = _cpython_abis(python_version, warn)
        else:
            abis = []
    abis = list(abis)
    # 'abi3' and 'none' are explicitly handled later.
    for explicit_abi in ("abi3", "none"):
        try:
            abis.remove(explicit_abi)
        except ValueError:
            pass

    platforms = list(platforms or platform_tags())
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)
    if _abi3_applies(python_version):
        yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms)
    yield from (Tag(interpreter, "none", platform_) for platform_ in platforms)

    if _abi3_applies(python_version):
        for minor_version in range(python_version[1] - 1, 1, -1):
            for platform_ in platforms:
                interpreter = "cp{version}".format(
                    version=_version_nodot((python_version[0], minor_version))
                )
                yield Tag(interpreter, "abi3", platform_)


def _generic_abi() -> List[str]:
    """
    Return the ABI tag based on EXT_SUFFIX.
    """
    # The following are examples of `EXT_SUFFIX`.
    # We want to keep the parts which are related to the ABI and remove the
    # parts which are related to the platform:
    # - linux:   '.cpython-310-x86_64-linux-gnu.so' => cp310
    # - mac:     '.cpython-310-darwin.so'           => cp310
    # - win:     '.cp310-win_amd64.pyd'             => cp310
    # - win:     '.pyd'                             => cp37 (uses _cpython_abis())
    # - pypy:    '.pypy38-pp73-x86_64-linux-gnu.so' => pypy38_pp73
    # - graalpy: '.graalpy-38-native-x86_64-darwin.dylib'
    #                                               => graalpy_38_native

    ext_suffix = _get_config_var("EXT_SUFFIX", warn=True)
    if not isinstance(ext_suffix, str) or ext_suffix[0] != ".":
        raise SystemError("invalid sysconfig.get_config_var('EXT_SUFFIX')")
    parts = ext_suffix.split(".")
    if len(parts) < 3:
        # CPython3.7 and earlier uses ".pyd" on Windows.
        return _cpython_abis(sys.version_info[:2])
    soabi = parts[1]
    if soabi.startswith("cpython"):
        # non-windows
        abi = "cp" + soabi.split("-")[1]
    elif soabi.startswith("cp"):
        # windows
        abi = soabi.split("-")[0]
    elif soabi.startswith("pypy"):
        abi = "-".join(soabi.split("-")[:2])
    elif soabi.startswith("graalpy"):
        abi = "-".join(soabi.split("-")[:3])
    elif soabi:
        # pyston, ironpython, others?
        abi = soabi
    else:
        return []
    return [_normalize_string(abi)]


def generic_tags(
    interpreter: Optional[str] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a generic interpreter.

    The tags consist of:
    - <interpreter>-<abi>-<platform>

    The "none" ABI will be added if it was not explicitly provided.
    """
    if not interpreter:
        interp_name = interpreter_name()
        interp_version = interpreter_version(warn=warn)
        interpreter = "".join([interp_name, interp_version])
    if abis is None:
        abis = _generic_abi()
    else:
        abis = list(abis)
    platforms = list(platforms or platform_tags())
    if "none" not in abis:
        abis.append("none")
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)


def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
    """
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    """
    if len(py_version) > 1:
        yield f"py{_version_nodot(py_version[:2])}"
    yield f"py{py_version[0]}"
    if len(py_version) > 1:
        for minor in range(py_version[1] - 1, -1, -1):
            yield f"py{_version_nodot((py_version[0], minor))}"


def compatible_tags(
    python_version: Optional[PythonVersion] = None,
    interpreter: Optional[str] = None,
    platforms: Optional[Iterable[str]] = None,
) -> Iterator[Tag]:
    """
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-<platform>
    - <interpreter>-none-any  # ... if `interpreter` is provided.
    - py*-none-any
    """
    if not python_version:
        python_version = sys.version_info[:2]
    platforms = list(platforms or platform_tags())
    for version in _py_interpreter_range(python_version):
        for platform_ in platforms:
            yield Tag(version, "none", platform_)
    if interpreter:
        yield Tag(interpreter, "none", "any")
    for version in _py_interpreter_range(python_version):
        yield Tag(version, "none", "any")


def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str:
    if not is_32bit:
        return arch

    if arch.startswith("ppc"):
        return "ppc"

    return "i386"


def _mac_binary_formats(version: MacVersion, cpu_arch: str) -> List[str]:
    formats = [cpu_arch]
    if cpu_arch == "x86_64":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat64", "fat32"])

    elif cpu_arch == "i386":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat32", "fat"])

    elif cpu_arch == "ppc64":
        # TODO: Need to care about 32-bit PPC for ppc64 through 10.2?
        if version > (10, 5) or version < (10, 4):
            return []
        formats.append("fat64")

    elif cpu_arch == "ppc":
        if version > (10, 6):
            return []
        formats.extend(["fat32", "fat"])

    if cpu_arch in {"arm64", "x86_64"}:
        formats.append("universal2")

    if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}:
        formats.append("universal")

    return formats


def mac_platforms(
    version: Optional[MacVersion] = None, arch: Optional[str] = None
) -> Iterator[str]:
    """
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    """
    version_str, _, cpu_arch = platform.mac_ver()
    if version is None:
        version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
        if version == (10, 16):
            # When built against an older macOS SDK, Python will report macOS 10.16
            # instead of the real version.
            version_str = subprocess.run(
                [
                    sys.executable,
                    "-sS",
                    "-c",
                    "import platform; print(platform.mac_ver()[0])",
                ],
                check=True,
                env={"SYSTEM_VERSION_COMPAT": "0"},
                stdout=subprocess.PIPE,
                universal_newlines=True,
            ).stdout
            version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
    else:
        version = version
    if arch is None:
        arch = _mac_arch(cpu_arch)
    else:
        arch = arch

    if (10, 0) <= version and version < (11, 0):
        # Prior to Mac OS 11, each yearly release of Mac OS bumped the
        # "minor" version number.  The major version was always 10.
        for minor_version in range(version[1], -1, -1):
            compat_version = 10, minor_version
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=10, minor=minor_version, binary_format=binary_format
                )

    if version >= (11, 0):
        # Starting with Mac OS 11, each yearly release bumps the major version
        # number.   The minor versions are now the midyear updates.
        for major_version in range(version[0], 10, -1):
            compat_version = major_version, 0
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=major_version, minor=0, binary_format=binary_format
                )

    if version >= (11, 0):
        # Mac OS 11 on x86_64 is compatible with binaries from previous releases.
        # Arm64 support was introduced in 11.0, so no Arm binaries from previous
        # releases exist.
        #
        # However, the "universal2" binary format can have a
        # macOS version earlier than 11.0 when the x86_64 part of the binary supports
        # that version of macOS.
        if arch == "x86_64":
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_formats = _mac_binary_formats(compat_version, arch)
                for binary_format in binary_formats:
                    yield "macosx_{major}_{minor}_{binary_format}".format(
                        major=compat_version[0],
                        minor=compat_version[1],
                        binary_format=binary_format,
                    )
        else:
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_format = "universal2"
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=compat_version[0],
                    minor=compat_version[1],
                    binary_format=binary_format,
                )


def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]:
    linux = _normalize_string(sysconfig.get_platform())
    if is_32bit:
        if linux == "linux_x86_64":
            linux = "linux_i686"
        elif linux == "linux_aarch64":
            linux = "linux_armv7l"
    _, arch = linux.split("_", 1)
    yield from _manylinux.platform_tags(linux, arch)
    yield from _musllinux.platform_tags(arch)
    yield linux


def _generic_platforms() -> Iterator[str]:
    yield _normalize_string(sysconfig.get_platform())


def platform_tags() -> Iterator[str]:
    """
    Provides the platform tags for this installation.
    """
    if platform.system() == "Darwin":
        return mac_platforms()
    elif platform.system() == "Linux":
        return _linux_platforms()
    else:
        return _generic_platforms()


def interpreter_name() -> str:
    """
    Returns the name of the running interpreter.

    Some implementations have a reserved, two-letter abbreviation which will
    be returned when appropriate.
    """
    name = sys.implementation.name
    return INTERPRETER_SHORT_NAMES.get(name) or name


def interpreter_version(*, warn: bool = False) -> str:
    """
    Returns the version of the running interpreter.
    """
    version = _get_config_var("py_version_nodot", warn=warn)
    if version:
        version = str(version)
    else:
        version = _version_nodot(sys.version_info[:2])
    return version


def _version_nodot(version: PythonVersion) -> str:
    return "".join(map(str, version))


def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
    """
    Returns the sequence of tag triples for the running interpreter.

    The order of the sequence corresponds to priority order for the
    interpreter, from most to least important.
    """

    interp_name = interpreter_name()
    if interp_name == "cp":
        yield from cpython_tags(warn=warn)
    else:
        yield from generic_tags()

    if interp_name == "pp":
        interp = "pp3"
    elif interp_name == "cp":
        interp = "cp" + interpreter_version(warn=warn)
    else:
        interp = None
    yield from compatible_tags(interpreter=interp)
python3.12/site-packages/setuptools/_vendor/packaging/specifiers.py000064400000114446151732704040021435 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
"""
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
"""

import abc
import itertools
import re
from typing import (
    Callable,
    Iterable,
    Iterator,
    List,
    Optional,
    Set,
    Tuple,
    TypeVar,
    Union,
)

from .utils import canonicalize_version
from .version import Version

UnparsedVersion = Union[Version, str]
UnparsedVersionVar = TypeVar("UnparsedVersionVar", bound=UnparsedVersion)
CallableOperator = Callable[[Version, str], bool]


def _coerce_version(version: UnparsedVersion) -> Version:
    if not isinstance(version, Version):
        version = Version(version)
    return version


class InvalidSpecifier(ValueError):
    """
    Raised when attempting to create a :class:`Specifier` with a specifier
    string that is invalid.

    >>> Specifier("lolwat")
    Traceback (most recent call last):
        ...
    packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'
    """


class BaseSpecifier(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def __str__(self) -> str:
        """
        Returns the str representation of this Specifier-like object. This
        should be representative of the Specifier itself.
        """

    @abc.abstractmethod
    def __hash__(self) -> int:
        """
        Returns a hash value for this Specifier-like object.
        """

    @abc.abstractmethod
    def __eq__(self, other: object) -> bool:
        """
        Returns a boolean representing whether or not the two Specifier-like
        objects are equal.

        :param other: The other object to check against.
        """

    @property
    @abc.abstractmethod
    def prereleases(self) -> Optional[bool]:
        """Whether or not pre-releases as a whole are allowed.

        This can be set to either ``True`` or ``False`` to explicitly enable or disable
        prereleases or it can be set to ``None`` (the default) to use default semantics.
        """

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        """Setter for :attr:`prereleases`.

        :param value: The value to set.
        """

    @abc.abstractmethod
    def contains(self, item: str, prereleases: Optional[bool] = None) -> bool:
        """
        Determines if the given item is contained within this specifier.
        """

    @abc.abstractmethod
    def filter(
        self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
    ) -> Iterator[UnparsedVersionVar]:
        """
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        """


class Specifier(BaseSpecifier):
    """This class abstracts handling of version specifiers.

    .. tip::

        It is generally not required to instantiate this manually. You should instead
        prefer to work with :class:`SpecifierSet` instead, which can parse
        comma-separated version specifiers (which is what package metadata contains).
    """

    _operator_regex_str = r"""
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        """
    _version_regex_str = r"""
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s;)]*  # The arbitrary version can be just about anything,
                          # we match everything except for whitespace, a
                          # semi-colon for marker support, and a closing paren
                          # since versions can be enclosed in them.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release

                # You cannot use a wild card and a pre-release, post-release, a dev or
                # local version together so group them with a | and make them optional.
                (?:
                    \.\*  # Wild card syntax of .*
                    |
                    (?:                                  # pre release
                        [-_\.]?
                        (alpha|beta|preview|pre|a|b|c|rc)
                        [-_\.]?
                        [0-9]*
                    )?
                    (?:                                  # post release
                        (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                    )?
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        """

    _regex = re.compile(
        r"^\s*" + _operator_regex_str + _version_regex_str + r"\s*$",
        re.VERBOSE | re.IGNORECASE,
    )

    _operators = {
        "~=": "compatible",
        "==": "equal",
        "!=": "not_equal",
        "<=": "less_than_equal",
        ">=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
        "===": "arbitrary",
    }

    def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
        """Initialize a Specifier instance.

        :param spec:
            The string representation of a specifier which will be parsed and
            normalized before use.
        :param prereleases:
            This tells the specifier if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.
        :raises InvalidSpecifier:
            If the given specifier is invalid (i.e. bad syntax).
        """
        match = self._regex.search(spec)
        if not match:
            raise InvalidSpecifier(f"Invalid specifier: '{spec}'")

        self._spec: Tuple[str, str] = (
            match.group("operator").strip(),
            match.group("version").strip(),
        )

        # Store whether or not this Specifier should accept prereleases
        self._prereleases = prereleases

    # https://github.com/python/mypy/pull/13475#pullrequestreview-1079784515
    @property  # type: ignore[override]
    def prereleases(self) -> bool:
        # If there is an explicit prereleases set for this, then we'll just
        # blindly use that.
        if self._prereleases is not None:
            return self._prereleases

        # Look at all of our specifiers and determine if they are inclusive
        # operators, and if they are if they are including an explicit
        # prerelease.
        operator, version = self._spec
        if operator in ["==", ">=", "<=", "~=", "==="]:
            # The == specifier can include a trailing .*, if it does we
            # want to remove before parsing.
            if operator == "==" and version.endswith(".*"):
                version = version[:-2]

            # Parse the version, and if it is a pre-release than this
            # specifier allows pre-releases.
            if Version(version).is_prerelease:
                return True

        return False

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    @property
    def operator(self) -> str:
        """The operator of this specifier.

        >>> Specifier("==1.2.3").operator
        '=='
        """
        return self._spec[0]

    @property
    def version(self) -> str:
        """The version of this specifier.

        >>> Specifier("==1.2.3").version
        '1.2.3'
        """
        return self._spec[1]

    def __repr__(self) -> str:
        """A representation of the Specifier that shows all internal state.

        >>> Specifier('>=1.0.0')
        <Specifier('>=1.0.0')>
        >>> Specifier('>=1.0.0', prereleases=False)
        <Specifier('>=1.0.0', prereleases=False)>
        >>> Specifier('>=1.0.0', prereleases=True)
        <Specifier('>=1.0.0', prereleases=True)>
        """
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f"<{self.__class__.__name__}({str(self)!r}{pre})>"

    def __str__(self) -> str:
        """A string representation of the Specifier that can be round-tripped.

        >>> str(Specifier('>=1.0.0'))
        '>=1.0.0'
        >>> str(Specifier('>=1.0.0', prereleases=False))
        '>=1.0.0'
        """
        return "{}{}".format(*self._spec)

    @property
    def _canonical_spec(self) -> Tuple[str, str]:
        canonical_version = canonicalize_version(
            self._spec[1],
            strip_trailing_zero=(self._spec[0] != "~="),
        )
        return self._spec[0], canonical_version

    def __hash__(self) -> int:
        return hash(self._canonical_spec)

    def __eq__(self, other: object) -> bool:
        """Whether or not the two Specifier-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0")
        True
        >>> (Specifier("==1.2.3", prereleases=False) ==
        ...  Specifier("==1.2.3", prereleases=True))
        True
        >>> Specifier("==1.2.3") == "==1.2.3"
        True
        >>> Specifier("==1.2.3") == Specifier("==1.2.4")
        False
        >>> Specifier("==1.2.3") == Specifier("~=1.2.3")
        False
        """
        if isinstance(other, str):
            try:
                other = self.__class__(str(other))
            except InvalidSpecifier:
                return NotImplemented
        elif not isinstance(other, self.__class__):
            return NotImplemented

        return self._canonical_spec == other._canonical_spec

    def _get_operator(self, op: str) -> CallableOperator:
        operator_callable: CallableOperator = getattr(
            self, f"_compare_{self._operators[op]}"
        )
        return operator_callable

    def _compare_compatible(self, prospective: Version, spec: str) -> bool:

        # Compatible releases have an equivalent combination of >= and ==. That
        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
        # implement this in terms of the other specifiers instead of
        # implementing it ourselves. The only thing we need to do is construct
        # the other specifiers.

        # We want everything but the last item in the version, but we want to
        # ignore suffix segments.
        prefix = ".".join(
            list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1]
        )

        # Add the prefix notation to the end of our string
        prefix += ".*"

        return self._get_operator(">=")(prospective, spec) and self._get_operator("==")(
            prospective, prefix
        )

    def _compare_equal(self, prospective: Version, spec: str) -> bool:

        # We need special logic to handle prefix matching
        if spec.endswith(".*"):
            # In the case of prefix matching we want to ignore local segment.
            normalized_prospective = canonicalize_version(
                prospective.public, strip_trailing_zero=False
            )
            # Get the normalized version string ignoring the trailing .*
            normalized_spec = canonicalize_version(spec[:-2], strip_trailing_zero=False)
            # Split the spec out by dots, and pretend that there is an implicit
            # dot in between a release segment and a pre-release segment.
            split_spec = _version_split(normalized_spec)

            # Split the prospective version out by dots, and pretend that there
            # is an implicit dot in between a release segment and a pre-release
            # segment.
            split_prospective = _version_split(normalized_prospective)

            # 0-pad the prospective version before shortening it to get the correct
            # shortened version.
            padded_prospective, _ = _pad_version(split_prospective, split_spec)

            # Shorten the prospective version to be the same length as the spec
            # so that we can determine if the specifier is a prefix of the
            # prospective version or not.
            shortened_prospective = padded_prospective[: len(split_spec)]

            return shortened_prospective == split_spec
        else:
            # Convert our spec string into a Version
            spec_version = Version(spec)

            # If the specifier does not have a local segment, then we want to
            # act as if the prospective version also does not have a local
            # segment.
            if not spec_version.local:
                prospective = Version(prospective.public)

            return prospective == spec_version

    def _compare_not_equal(self, prospective: Version, spec: str) -> bool:
        return not self._compare_equal(prospective, spec)

    def _compare_less_than_equal(self, prospective: Version, spec: str) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) <= Version(spec)

    def _compare_greater_than_equal(self, prospective: Version, spec: str) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) >= Version(spec)

    def _compare_less_than(self, prospective: Version, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is less than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective < spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a pre-release version, that we do not accept pre-release
        # versions for the version mentioned in the specifier (e.g. <3.1 should
        # not match 3.1.dev0, but should match 3.0.dev0).
        if not spec.is_prerelease and prospective.is_prerelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # less than the spec version *and* it's not a pre-release of the same
        # version in the spec.
        return True

    def _compare_greater_than(self, prospective: Version, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is greater than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective > spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a post-release version, that we do not accept
        # post-release versions for the version mentioned in the specifier
        # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0).
        if not spec.is_postrelease and prospective.is_postrelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # Ensure that we do not allow a local version of the version mentioned
        # in the specifier, which is technically greater than, to match.
        if prospective.local is not None:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # greater than the spec version *and* it's not a pre-release of the
        # same version in the spec.
        return True

    def _compare_arbitrary(self, prospective: Version, spec: str) -> bool:
        return str(prospective).lower() == str(spec).lower()

    def __contains__(self, item: Union[str, Version]) -> bool:
        """Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in Specifier(">=1.2.3")
        True
        >>> Version("1.2.3") in Specifier(">=1.2.3")
        True
        >>> "1.0.0" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
        True
        """
        return self.contains(item)

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:
        """Return whether or not the item is contained in this specifier.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this Specifier. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> Specifier(">=1.2.3").contains("1.2.3")
        True
        >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
        True
        >>> Specifier(">=1.2.3").contains("1.0.0")
        False
        >>> Specifier(">=1.2.3").contains("1.3.0a1")
        False
        >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
        True
        >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
        True
        """

        # Determine if prereleases are to be allowed or not.
        if prereleases is None:
            prereleases = self.prereleases

        # Normalize item to a Version, this allows us to have a shortcut for
        # "2.0" in Specifier(">=2")
        normalized_item = _coerce_version(item)

        # Determine if we should be supporting prereleases in this specifier
        # or not, if we do not support prereleases than we can short circuit
        # logic if this version is a prereleases.
        if normalized_item.is_prerelease and not prereleases:
            return False

        # Actually do the comparison to determine if this item is contained
        # within this Specifier or not.
        operator_callable: CallableOperator = self._get_operator(self.operator)
        return operator_callable(normalized_item, self.version)

    def filter(
        self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
    ) -> Iterator[UnparsedVersionVar]:
        """Filter items in the given iterable, that match the specifier.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(Specifier().contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")]))
        ['1.2.3', '1.3', <Version('1.4')>]
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"]))
        ['1.5a1']
        >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        """

        yielded = False
        found_prereleases = []

        kw = {"prereleases": prereleases if prereleases is not None else True}

        # Attempt to iterate over all the values in the iterable and if any of
        # them match, yield them.
        for version in iterable:
            parsed_version = _coerce_version(version)

            if self.contains(parsed_version, **kw):
                # If our version is a prerelease, and we were not set to allow
                # prereleases, then we'll store it for later in case nothing
                # else matches this specifier.
                if parsed_version.is_prerelease and not (
                    prereleases or self.prereleases
                ):
                    found_prereleases.append(version)
                # Either this is not a prerelease, or we should have been
                # accepting prereleases from the beginning.
                else:
                    yielded = True
                    yield version

        # Now that we've iterated over everything, determine if we've yielded
        # any values, and if we have not and we have any prereleases stored up
        # then we will go ahead and yield the prereleases.
        if not yielded and found_prereleases:
            for version in found_prereleases:
                yield version


_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")


def _version_split(version: str) -> List[str]:
    result: List[str] = []
    for item in version.split("."):
        match = _prefix_regex.search(item)
        if match:
            result.extend(match.groups())
        else:
            result.append(item)
    return result


def _is_not_suffix(segment: str) -> bool:
    return not any(
        segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post")
    )


def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]:
    left_split, right_split = [], []

    # Get the release segment of our versions
    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))

    # Get the rest of our versions
    left_split.append(left[len(left_split[0]) :])
    right_split.append(right[len(right_split[0]) :])

    # Insert our padding
    left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0])))
    right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0])))

    return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split)))


class SpecifierSet(BaseSpecifier):
    """This class abstracts handling of a set of version specifiers.

    It can be passed a single specifier (``>=3.0``), a comma-separated list of
    specifiers (``>=3.0,!=3.1``), or no specifier at all.
    """

    def __init__(
        self, specifiers: str = "", prereleases: Optional[bool] = None
    ) -> None:
        """Initialize a SpecifierSet instance.

        :param specifiers:
            The string representation of a specifier or a comma-separated list of
            specifiers which will be parsed and normalized before use.
        :param prereleases:
            This tells the SpecifierSet if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.

        :raises InvalidSpecifier:
            If the given ``specifiers`` are not parseable than this exception will be
            raised.
        """

        # Split on `,` to break each individual specifier into it's own item, and
        # strip each item to remove leading/trailing whitespace.
        split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]

        # Parsed each individual specifier, attempting first to make it a
        # Specifier.
        parsed: Set[Specifier] = set()
        for specifier in split_specifiers:
            parsed.add(Specifier(specifier))

        # Turn our parsed specifiers into a frozen set and save them for later.
        self._specs = frozenset(parsed)

        # Store our prereleases value so we can use it later to determine if
        # we accept prereleases or not.
        self._prereleases = prereleases

    @property
    def prereleases(self) -> Optional[bool]:
        # If we have been given an explicit prerelease modifier, then we'll
        # pass that through here.
        if self._prereleases is not None:
            return self._prereleases

        # If we don't have any specifiers, and we don't have a forced value,
        # then we'll just return None since we don't know if this should have
        # pre-releases or not.
        if not self._specs:
            return None

        # Otherwise we'll see if any of the given specifiers accept
        # prereleases, if any of them do we'll return True, otherwise False.
        return any(s.prereleases for s in self._specs)

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    def __repr__(self) -> str:
        """A representation of the specifier set that shows all internal state.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> SpecifierSet('>=1.0.0,!=2.0.0')
        <SpecifierSet('!=2.0.0,>=1.0.0')>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=False)>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=True)>
        """
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f"<SpecifierSet({str(self)!r}{pre})>"

    def __str__(self) -> str:
        """A string representation of the specifier set that can be round-tripped.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
        '!=1.0.1,>=1.0.0'
        >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
        '!=1.0.1,>=1.0.0'
        """
        return ",".join(sorted(str(s) for s in self._specs))

    def __hash__(self) -> int:
        return hash(self._specs)

    def __and__(self, other: Union["SpecifierSet", str]) -> "SpecifierSet":
        """Return a SpecifierSet which is a combination of the two sets.

        :param other: The other object to combine with.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        """
        if isinstance(other, str):
            other = SpecifierSet(other)
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        specifier = SpecifierSet()
        specifier._specs = frozenset(self._specs | other._specs)

        if self._prereleases is None and other._prereleases is not None:
            specifier._prereleases = other._prereleases
        elif self._prereleases is not None and other._prereleases is None:
            specifier._prereleases = self._prereleases
        elif self._prereleases == other._prereleases:
            specifier._prereleases = self._prereleases
        else:
            raise ValueError(
                "Cannot combine SpecifierSets with True and False prerelease "
                "overrides."
            )

        return specifier

    def __eq__(self, other: object) -> bool:
        """Whether or not the two SpecifierSet-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
        ...  SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
        False
        """
        if isinstance(other, (str, Specifier)):
            other = SpecifierSet(str(other))
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        return self._specs == other._specs

    def __len__(self) -> int:
        """Returns the number of specifiers in this specifier set."""
        return len(self._specs)

    def __iter__(self) -> Iterator[Specifier]:
        """
        Returns an iterator over all the underlying :class:`Specifier` instances
        in this specifier set.

        >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
        [<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]
        """
        return iter(self._specs)

    def __contains__(self, item: UnparsedVersion) -> bool:
        """Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
        True
        """
        return self.contains(item)

    def contains(
        self,
        item: UnparsedVersion,
        prereleases: Optional[bool] = None,
        installed: Optional[bool] = None,
    ) -> bool:
        """Return whether or not the item is contained in this SpecifierSet.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this SpecifierSet. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
        True
        """
        # Ensure that our item is a Version instance.
        if not isinstance(item, Version):
            item = Version(item)

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # We can determine if we're going to allow pre-releases by looking to
        # see if any of the underlying items supports them. If none of them do
        # and this item is a pre-release then we do not allow it and we can
        # short circuit that here.
        # Note: This means that 1.0.dev1 would not be contained in something
        #       like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
        if not prereleases and item.is_prerelease:
            return False

        if installed and item.is_prerelease:
            item = Version(item.base_version)

        # We simply dispatch to the underlying specs here to make sure that the
        # given version is contained within all of them.
        # Note: This use of all() here means that an empty set of specifiers
        #       will always return True, this is an explicit design decision.
        return all(s.contains(item, prereleases=prereleases) for s in self._specs)

    def filter(
        self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
    ) -> Iterator[UnparsedVersionVar]:
        """Filter items in the given iterable, that match the specifiers in this set.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(SpecifierSet(...).contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
        ['1.3', <Version('1.4')>]
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
        []
        >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']

        An "empty" SpecifierSet will filter items based on the presence of prerelease
        versions in the set.

        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet("").filter(["1.5a1"]))
        ['1.5a1']
        >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        """
        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # If we have any specifiers, then we want to wrap our iterable in the
        # filter method for each one, this will act as a logical AND amongst
        # each specifier.
        if self._specs:
            for spec in self._specs:
                iterable = spec.filter(iterable, prereleases=bool(prereleases))
            return iter(iterable)
        # If we do not have any specifiers, then we need to have a rough filter
        # which will filter out any pre-releases, unless there are no final
        # releases.
        else:
            filtered: List[UnparsedVersionVar] = []
            found_prereleases: List[UnparsedVersionVar] = []

            for item in iterable:
                parsed_version = _coerce_version(item)

                # Store any item which is a pre-release for later unless we've
                # already found a final version or we are accepting prereleases
                if parsed_version.is_prerelease and not prereleases:
                    if not filtered:
                        found_prereleases.append(item)
                else:
                    filtered.append(item)

            # If we've found no items except for pre-releases, then we'll go
            # ahead and use the pre-releases
            if not filtered and found_prereleases and prereleases is None:
                return iter(found_prereleases)

            return iter(filtered)
python3.12/site-packages/setuptools/_vendor/packaging/_structures.py000064400000002627151732704040021660 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.


class InfinityType:
    def __repr__(self) -> str:
        return "Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return False

    def __le__(self, other: object) -> bool:
        return False

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return True

    def __ge__(self, other: object) -> bool:
        return True

    def __neg__(self: object) -> "NegativeInfinityType":
        return NegativeInfinity


Infinity = InfinityType()


class NegativeInfinityType:
    def __repr__(self) -> str:
        return "-Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return True

    def __le__(self, other: object) -> bool:
        return True

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return False

    def __ge__(self, other: object) -> bool:
        return False

    def __neg__(self: object) -> InfinityType:
        return Infinity


NegativeInfinity = NegativeInfinityType()
python3.12/site-packages/setuptools/_vendor/packaging/__init__.py000064400000000765151732704040021036 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

__title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"

__version__ = "23.1"

__author__ = "Donald Stufft and individual contributors"
__email__ = "donald@stufft.io"

__license__ = "BSD-2-Clause or Apache-2.0"
__copyright__ = "2014-2019 %s" % __author__
python3.12/site-packages/setuptools/_vendor/packaging/py.typed000064400000000000151732704040020402 0ustar00python3.12/site-packages/setuptools/_vendor/packaging/utils.py000064400000010403151732704040020425 0ustar00# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import re
from typing import FrozenSet, NewType, Tuple, Union, cast

from .tags import Tag, parse_tag
from .version import InvalidVersion, Version

BuildTag = Union[Tuple[()], Tuple[int, str]]
NormalizedName = NewType("NormalizedName", str)


class InvalidWheelFilename(ValueError):
    """
    An invalid wheel filename was found, users should refer to PEP 427.
    """


class InvalidSdistFilename(ValueError):
    """
    An invalid sdist filename was found, users should refer to the packaging user guide.
    """


_canonicalize_regex = re.compile(r"[-_.]+")
# PEP 427: The build number must start with a digit.
_build_tag_regex = re.compile(r"(\d+)(.*)")


def canonicalize_name(name: str) -> NormalizedName:
    # This is taken from PEP 503.
    value = _canonicalize_regex.sub("-", name).lower()
    return cast(NormalizedName, value)


def canonicalize_version(
    version: Union[Version, str], *, strip_trailing_zero: bool = True
) -> str:
    """
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    """
    if isinstance(version, str):
        try:
            parsed = Version(version)
        except InvalidVersion:
            # Legacy versions cannot be normalized
            return version
    else:
        parsed = version

    parts = []

    # Epoch
    if parsed.epoch != 0:
        parts.append(f"{parsed.epoch}!")

    # Release segment
    release_segment = ".".join(str(x) for x in parsed.release)
    if strip_trailing_zero:
        # NB: This strips trailing '.0's to normalize
        release_segment = re.sub(r"(\.0)+$", "", release_segment)
    parts.append(release_segment)

    # Pre-release
    if parsed.pre is not None:
        parts.append("".join(str(x) for x in parsed.pre))

    # Post-release
    if parsed.post is not None:
        parts.append(f".post{parsed.post}")

    # Development release
    if parsed.dev is not None:
        parts.append(f".dev{parsed.dev}")

    # Local version segment
    if parsed.local is not None:
        parts.append(f"+{parsed.local}")

    return "".join(parts)


def parse_wheel_filename(
    filename: str,
) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
    if not filename.endswith(".whl"):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (extension must be '.whl'): {filename}"
        )

    filename = filename[:-4]
    dashes = filename.count("-")
    if dashes not in (4, 5):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (wrong number of parts): {filename}"
        )

    parts = filename.split("-", dashes - 2)
    name_part = parts[0]
    # See PEP 427 for the rules on escaping the project name
    if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None:
        raise InvalidWheelFilename(f"Invalid project name: {filename}")
    name = canonicalize_name(name_part)
    version = Version(parts[1])
    if dashes == 5:
        build_part = parts[2]
        build_match = _build_tag_regex.match(build_part)
        if build_match is None:
            raise InvalidWheelFilename(
                f"Invalid build number: {build_part} in '{filename}'"
            )
        build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
    else:
        build = ()
    tags = parse_tag(parts[-1])
    return (name, version, build, tags)


def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
    if filename.endswith(".tar.gz"):
        file_stem = filename[: -len(".tar.gz")]
    elif filename.endswith(".zip"):
        file_stem = filename[: -len(".zip")]
    else:
        raise InvalidSdistFilename(
            f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):"
            f" {filename}"
        )

    # We are requiring a PEP 440 version, which cannot contain dashes,
    # so we split on the last dash.
    name_part, sep, version_part = file_stem.rpartition("-")
    if not sep:
        raise InvalidSdistFilename(f"Invalid sdist filename: {filename}")

    name = canonicalize_name(name_part)
    version = Version(version_part)
    return (name, version)
python3.12/site-packages/setuptools/_vendor/jaraco/__pycache__/__init__.cpython-312.pyc000064400000000374151732704040024706 0ustar00�

��_i���y)N�r���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/jaraco/__init__.py�<module>rs�rpython3.12/site-packages/setuptools/_vendor/jaraco/__pycache__/functools.cpython-312.pyc000064400000050155151732704040025165 0ustar00�

��_i�:��:�ddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZede
def��Z
d�Zd�Zd�Zej"�fd	e
d
e
e
ge
fde
fd�Zd
�Zd�Zd�Zd�Zd�ZGd�d�Zd�Zd�ddfd�Zd�Zd�Zd�Zd�Zd�Zddd�d�Z y)�N)�Callable�TypeVar�	CallableT.)�boundc�4�d�}tj||�S)a;
    Compose any number of unary functions into a single unary function.

    >>> import textwrap
    >>> expected = str.strip(textwrap.dedent(compose.__doc__))
    >>> strip_and_dedent = compose(str.strip, textwrap.dedent)
    >>> strip_and_dedent(compose.__doc__) == expected
    True

    Compose also allows the innermost function to take arbitrary arguments.

    >>> round_three = lambda x: round(x, ndigits=3)
    >>> f = compose(round_three, int.__truediv__)
    >>> [f(3*x, x+1) for x in range(1,10)]
    [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]
    c������fd�S)Nc� ����|i|���S�N�)�args�kwargs�f1�f2s  ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/jaraco/functools.py�<lambda>z.compose.<locals>.compose_two.<locals>.<lambda>$s���r�"�d�*=�f�*=�'>�r)rrs``r�compose_twozcompose.<locals>.compose_two#s	���>�>r)�	functools�reduce)�funcsrs  r�composers��$?����K��/�/rc��������fd�}|S)z�
    Return a function that will call a named method on the
    target object with optional positional and keyword
    arguments.

    >>> lower = method_caller('lower')
    >>> lower('MyString')
    'mystring'
    c�,��t|��}|�i���Sr
)�getattr)�target�funcrr
�method_names  ���r�call_methodz"method_caller.<locals>.call_method4s����v�{�+���T�$�V�$�$rr)rrr
rs``` r�
method_callerr)s���%��rc�Z���tj����fd����fd��_�S)ad
    Decorate func so it's only ever called the first time.

    This decorator can ensure that an expensive or non-idempotent function
    will not be expensive on subsequent calls and is idempotent.

    >>> add_three = once(lambda a: a+3)
    >>> add_three(3)
    6
    >>> add_three(9)
    6
    >>> add_three('12')
    6

    To reset the stored value, simply clear the property ``saved_result``.

    >>> del add_three.saved_result
    >>> add_three(9)
    12
    >>> add_three(8)
    12

    Or invoke 'reset()' on it.

    >>> add_three.reset()
    >>> add_three(-3)
    0
    >>> add_three(0)
    0
    c�N��t�d�s
�|i|���_�jS�N�saved_result)�hasattrr#)rr
r�wrappers  ��rr%zonce.<locals>.wrapper[s+����w��/�#'��#8��#8�G� ��#�#�#rc�8��t��jd�Sr")�vars�__delitem__)r%s�rrzonce.<locals>.<lambda>as���D��M�5�5�n�Er)r�wraps�reset�rr%s`@r�oncer,;s0���@�_�_�T��$��$�
F�G�M��Nr�method�
cache_wrapper�returnc�t���dtdtdtdtf��fd�}d�|_t���xs|S)aV
    Wrap lru_cache to support storing the cache data in the object instances.

    Abstracts the common paradigm where the method explicitly saves an
    underscore-prefixed protected property on first call and returns that
    subsequently.

    >>> class MyClass:
    ...     calls = 0
    ...
    ...     @method_cache
    ...     def method(self, value):
    ...         self.calls += 1
    ...         return value

    >>> a = MyClass()
    >>> a.method(3)
    3
    >>> for x in range(75):
    ...     res = a.method(x)
    >>> a.calls
    75

    Note that the apparent behavior will be exactly like that of lru_cache
    except that the cache is stored on each instance, so values in one
    instance will not flush values from another, and when an instance is
    deleted, so are the cached values for that instance.

    >>> b = MyClass()
    >>> for x in range(35):
    ...     res = b.method(x)
    >>> b.calls
    35
    >>> a.method(0)
    0
    >>> a.calls
    75

    Note that if method had been decorated with ``functools.lru_cache()``,
    a.calls would have been 76 (due to the cached value of 0 having been
    flushed by the 'b' instance).

    Clear the cache with ``.cache_clear()``

    >>> a.method.cache_clear()

    Same for a method that hasn't yet been called.

    >>> c = MyClass()
    >>> c.method.cache_clear()

    Another cache wrapper may be supplied:

    >>> cache = functools.lru_cache(maxsize=2)
    >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
    >>> a = MyClass()
    >>> a.method2()
    3

    Caution - do not subsequently wrap the method with another decorator, such
    as ``@property``, which changes the semantics of the function.

    See also
    http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
    for another implementation and additional justification.
    �selfrr
r/c�~��tj�|�}�|�}t|�j|�||i|��Sr
)�types�
MethodType�setattr�__name__)r1rr
�bound_method�
cached_methodr.r-s     ��rr%zmethod_cache.<locals>.wrapper�sD���"'�"2�"2��D�#
��&�l�3�
���f�o�o�}�5��d�-�f�-�-rc��yr
rrrrrzmethod_cache.<locals>.<lambda>�s��$r)�object�cache_clear�_special_method_cache)r-r.r%s`` r�method_cacher=esE���R.�f�.�V�.�v�.�&�.�'�G��	�f�m�4�?��rc�J�����j}d}||vryd|z����fd�}|S)a:
    Because Python treats special methods differently, it's not
    possible to use instance attributes to implement the cached
    methods.

    Instead, install the wrapper method under a different name
    and return a simple proxy to that wrapper.

    https://github.com/jaraco/jaraco.functools/issues/5
    )�__getattr__�__getitem__N�__cachedc����t|�vr,tj�|�}�|�}t|�|�nt	|��}||i|��Sr
)r'r3r4r5r)r1rr
r�cacher.r-�wrapper_names     ���r�proxyz$_special_method_cache.<locals>.proxy�sS����t�D�z�)��$�$�V�T�2�E�!�%�(�E��D�,��.��D�,�/�E��d�%�f�%�%r)r6)r-r.�name�
special_namesrErDs``   @rr<r<�s4����?�?�D�0�M��=� ����$�L�&��Lrc����fd�}|S)ab
    Decorate a function with a transform function that is
    invoked on results returned from the decorated function.

    >>> @apply(reversed)
    ... def get_numbers(start):
    ...     "doc for get_numbers"
    ...     return range(start, start+3)
    >>> list(get_numbers(4))
    [6, 5, 4]
    >>> get_numbers.__doc__
    'doc for get_numbers'
    c�N��tj|�t�|��Sr
)rr)r)r�	transforms �r�wrapzapply.<locals>.wrap�s ���$�y���t�$�W�Y��%=�>�>rr)rJrKs` r�applyrL�s���?��Krc����fd�}|S)a@
    Decorate a function with an action function that is
    invoked on the results returned from the decorated
    function (for its side-effect), then return the original
    result.

    >>> @result_invoke(print)
    ... def add_two(a, b):
    ...     return a + b
    >>> x = add_two(2, 3)
    5
    >>> x
    5
    c�F���tj����fd��}|S)Nc�(���|i|��}�|�|Sr
r)rr
�result�actionrs   ��rr%z,result_invoke.<locals>.wrap.<locals>.wrappers����4�*�6�*�F��6�N��Mr�rr))rr%rQs` �rrKzresult_invoke.<locals>.wraps%���	����	�	�
�	�
�rr)rQrKs` r�
result_invokerS�s��� ��Krc��||i|��|S)a�
    Call a function for its side effect after initialization.

    The benefit of using the decorator instead of simply invoking a function
    after defining it is that it makes explicit the author's intent for the
    function to be called immediately. Whereas if one simply calls the
    function immediately, it's less obvious if that was intentional or
    incidental. It also avoids repeating the name - the two actions, defining
    the function and calling it immediately are modeled separately, but linked
    by the decorator construct.

    The benefit of having a function construct (opposed to just invoking some
    behavior inline) is to serve as a scope in which the behavior occurs. It
    avoids polluting the global namespace with local variables, provides an
    anchor on which to attach documentation (docstring), keeps the behavior
    logically separated (instead of conceptually separated or not separated at
    all), and provides potential to re-use the behavior for testing or other
    purposes.

    This function is named as a pithy way to communicate, "call this function
    primarily for its side effect", or "while defining this function, also
    take it aside and call it". It exists because there's no Python construct
    for "define and call" (nor should there be, as decorators serve this need
    just fine). The behavior happens immediately and synchronously.

    >>> @invoke
    ... def func(): print("called")
    called
    >>> func()
    called

    Use functools.partial to pass parameters to the initial call

    >>> @functools.partial(invoke, name='bingo')
    ... def func(name): print("called with", name)
    called with bingo
    r)�frr
s   r�invokerVs��L�t��v���Hrc�L�tjdt�t|i|��S)z%
    Deprecated name for invoke.
    z$call_aside is deprecated, use invoke)�warnings�warn�DeprecationWarningrV)rr
s  r�
call_asider[8s$��
�M�M�8�:L�M��4�"�6�"�"rc�@�eZdZdZed�fd�Zd�Zd�Zd�Zd	d�Z	y)
�	Throttlerz3
    Rate-limit a function (or other callable)
    �Infc�x�t|t�r|j}||_||_|j	�yr
)�
isinstancer]r�max_rater*)r1rras   r�__init__zThrottler.__init__Es,���d�I�&��9�9�D���	� ��
��
�
�rc��d|_y)Nr)�last_called)r1s rr*zThrottler.resetLs
����rc�F�|j�|j|i|��Sr
)�_waitr)r1rr
s   r�__call__zThrottler.__call__Os!���
�
���t�y�y�$�)�&�)�)rc���tj�|jz
}d|jz|z
}tjt	d|��tj�|_y)z1ensure at least 1/max_rate seconds from last call�rN)�timerdra�sleep�max)r1�elapsed�	must_waits   rrfzThrottler._waitSsL���)�)�+�� 0� 0�0����
�
�%��/�	��
�
�3�q�)�$�%��9�9�;��rNc�j�t|jtj|j|��Sr
)�first_invokerfr�partialr)r1�obj�types   r�__get__zThrottler.__get__Zs$���D�J�J�	�(9�(9�$�)�)�S�(I�J�Jrr
)
r6�
__module__�__qualname__�__doc__�floatrbr*rgrfrtrrrr]r]@s*���',�E�l���*�'�Krr]c������fd�}|S)z�
    Return a function that when invoked will invoke func1 without
    any parameters (for its side-effect) and then invoke func2
    with whatever parameters were passed, returning its result.
    c�"�����|i|��Sr
r)rr
�func1�func2s  ��rr%zfirst_invoke.<locals>.wrapperes���
���d�%�f�%�%rr)r{r|r%s`` rrprp^s���&��Nrc��yr
rrrrrrls��Trrc��|td�k(rtj�n
t|�}|D]}	|�cS|�S#|$r
|�Y�#wxYw)z�
    Given a callable func, trap the indicated exceptions
    for up to 'retries' times, invoking cleanup on the
    exception. On the final attempt, allow any exceptions
    to propagate.
    �inf)rx�	itertools�count�range)r�cleanup�retries�trap�attempts�attempts      r�
retry_callr�lsV��%,�u�U�|�$;�y��� ��w��H���	��6�M���6�M���	��I�	�s�A�A�Ac������fd�}|S)a7
    Decorator wrapper for retry_call. Accepts arguments to retry_call
    except func and then returns a decorator for the decorated function.

    Ex:

    >>> @retry(retries=3)
    ... def my_func(a, b):
    ...     "this is my funk"
    ...     print(a, b)
    >>> my_func.__doc__
    'this is my funk'
    c�H���tj�����fd��}|S)Nc�T��tj�g|��i|��}t|g���i���Sr
)rrqr�)�f_args�f_kwargsrr�r_args�r_kwargss   ���rr%z(retry.<locals>.decorate.<locals>.wrapper�s2����%�%�d�@�V�@�x�@�E��e�9�f�9��9�9rrR)rr%r�r�s` ��r�decoratezretry.<locals>.decorate�s%���	����	�	:�
�	:��rr)r�r�r�s`` r�retryr�}s�����Orc��tjtt�}t	t
j||�}tj|�|�S)z�
    Convert a generator into a function that prints all yielded elements

    >>> @print_yielded
    ... def x():
    ...     yield 3; yield None
    >>> x()
    3
    None
    )rrq�map�printr�more_itertools�consumer))r�	print_all�
print_resultss   r�
print_yieldedr��s@���!�!�#�u�-�I��N�2�2�I�t�D�M� �9�?�?�4� ��/�/rc�B��tj���fd��}|S)z�
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    c�"��|��|g|��i|��Syr
r)�paramrr
rs   �rr%zpass_none.<locals>.wrapper�s#�������/��/��/�/�rrRr+s` r�	pass_noner��s'����_�_�T��0��0��Nrc���tj|�}|jj�}|D�cic]
}||vs�|||��}}t	j
|fi|��Scc}w)a�
    Assign parameters from namespace where func solicits.

    >>> def func(x, y=3):
    ...     print(x, y)
    >>> assigned = assign_params(func, dict(x=2, z=4))
    >>> assigned()
    2 3

    The usual errors are raised if a function doesn't receive
    its required parameters:

    >>> assigned = assign_params(func, dict(y=3, z=4))
    >>> assigned()
    Traceback (most recent call last):
    TypeError: func() ...argument...

    It even works on methods:

    >>> class Handler:
    ...     def meth(self, arg):
    ...         print(arg)
    >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))()
    crystal
    )�inspect�	signature�
parameters�keysrrq)r�	namespace�sig�params�k�call_nss      r�
assign_paramsr��sd��4�
�
�D�
!�C�
�^�^�
 �
 �
"�F�(.�A��1�!�y�.�q�)�A�,���G�A����T�-�W�-�-��Bs
�	A�Ac�r���tjdd��tj����fd��}|S)a&
    Wrap a method such that when it is called, the args and kwargs are
    saved on the method.

    >>> class MyClass:
    ...     @save_method_args
    ...     def method(self, a, b):
    ...         print(a, b)
    >>> my_ob = MyClass()
    >>> my_ob.method(1, 2)
    1 2
    >>> my_ob._saved_method.args
    (1, 2)
    >>> my_ob._saved_method.kwargs
    {}
    >>> my_ob.method(a=3, b='foo')
    3 foo
    >>> my_ob._saved_method.args
    ()
    >>> my_ob._saved_method.kwargs == dict(a=3, b='foo')
    True

    The arguments are stored on the instance, allowing for
    different instance to save different args.

    >>> your_ob = MyClass()
    >>> your_ob.method({str('x'): 3}, b=[4])
    {'x': 3} [4]
    >>> your_ob._saved_method.args
    ({'x': 3},)
    >>> my_ob._saved_method.args
    ()
    �args_and_kwargszargs kwargsc�f��d�jz}�||�}t|||��|g|��i|��S)N�_saved_)r6r5)r1rr
�	attr_name�attrr�r-s     ��rr%z!save_method_args.<locals>.wrapper�s>�������/�	��t�V�,����i��&��d�,�T�,�V�,�,r)�collections�
namedtuplerr))r-r%r�s` @r�save_method_argsr��s;���D"�,�,�->�
�N�O��_�_�V��-��-��Nr)�replace�usec��������fd�}|S)a-
    Replace the indicated exceptions, if raised, with the indicated
    literal replacement or evaluated expression (if present).

    >>> safe_int = except_(ValueError)(int)
    >>> safe_int('five')
    >>> safe_int('5')
    5

    Specify a literal replacement with ``replace``.

    >>> safe_int_r = except_(ValueError, replace=0)(int)
    >>> safe_int_r('five')
    0

    Provide an expression to ``use`` to pass through particular parameters.

    >>> safe_int_pt = except_(ValueError, use='args[0]')(int)
    >>> safe_int_pt('five')
    'five'

    c�J���tj������fd��}|S)Nc�j��	�|i|��S#�$r"	t��cYS#t$r�cYcYSwxYwwxYwr
)�eval�	TypeError)rr
�
exceptionsrr�r�s  ����rr%z*except_.<locals>.decorate.<locals>.wrapper sJ���
#��T�,�V�,�,���
#�#���9�$�� �#�"�N�#��
#�s ��2�
�2�.�2�.�2rR)rr%r�r�r�s` ���rr�zexcept_.<locals>.decorates%���	����	�	#�
�	#��rr)r�r�r�r�s``` r�except_r�s���0��Or)!rrjr�r�r3r�rX� setuptools.extern.more_itertools�
setuptools�typingrrr:rrrr,�	lru_cacher=r<rLrSrVr[r]rpr�r�r�r�r�r�r�rrr�<module>r�s����������'�$�
�K�x��V��'<�=�	�0�0�$'�\	�	����	W��W��	��Y���W�
�W�t�<�*�8'
�T#�K�K�<�*�1�2��"�4
0� �$.�@+�\"&�4�%rpython3.12/site-packages/setuptools/_vendor/jaraco/__pycache__/context.cpython-312.pyc000064400000025627151732704040024643 0ustar00�

��_i$���ddlZddlZddlZddlZddlZddlZddlZddlZejd��Z	ejdde	fd��Z
d�Zejejfd��Z
ejdde
fd��Zejd��ZGd	�d
�ZGd�dej"ej$�ZGd
�dej$�Zy)�Nc#��K�tj�}tj|�	|��tj|�y#tj|�wxYw�w)z�
    >>> tmp_path = getfixture('tmp_path')
    >>> with pushd(tmp_path):
    ...     assert os.getcwd() == os.fspath(tmp_path)
    >>> assert os.getcwd() != os.fspath(tmp_path)
    N)�os�getcwd�chdir)�dir�origs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/jaraco/context.py�pushdr
s>�����9�9�;�D��H�H�S�M���	�
�����������s�*A!�A�A!�A�A!c
#�K�|�?tjj|�jdd�jdd�}|�&t	j
tjd��}ntjdt�|djdit����	d	}d
}dj||f�}||jddt|�it����||�5|��ddd�|d
jdit����y#1swY�*xYw#|d
jdit����wxYw�w)z�
    Get a tarball, extract it, change to that directory, yield, then
    clean up.
    `runner` is the function to invoke commands.
    `pushd` is a context manager for changing the directory.
    Nz.tar.gz�z.tgzT)�shellzrunner parameter is deprecatedzmkdir {target_dir}zwget {url} -O -z7tar x{compression} --strip-components=1 -C {target_dir}z | �compressionzrm -Rf {target_dir}�)r�path�basename�replace�	functools�partial�
subprocess�
check_call�warnings�warn�DeprecationWarning�format�vars�join�infer_compression)�url�
target_dir�runnerr
�getter�extract�cmds       r	�tarball_contextr$s%�������W�W�%�%�c�*�2�2�9�b�A�I�I�&�RT�U�
�
�~��"�"�:�#8�#8��E���
�
�6�8J�K�
�&��&�&�0���0�1�7�"��K���j�j�&�'�*�+���z�s�z�z�G�&7��&<�G���G�H�
�:�
����	�+�$�+�+�5�d�f�5�6��
��	�+�$�+�+�5�d�f�5�6�s7�B$E�'A
D+�1D�6D+�>!E�D(�$D+�+"E
�
Ec�L�|dd}tddd��}|j|d�S)a
    Given a URL or filename, infer the compression code for tar.

    >>> infer_compression('http://foo/bar.tar.gz')
    'z'
    >>> infer_compression('http://foo/bar.tgz')
    'z'
    >>> infer_compression('file.bz')
    'j'
    >>> infer_compression('file.xz')
    'J'
    ���N�z�j�J)�gz�bz�xz)�dict�get)r�compression_indicator�mappings   r	rr:s0�� ���H���c�c�c�*�G��;�;�,�c�2�2�c#�hK�tj�}	|��||�y#||�wxYw�w)aN
    Create a temporary directory context. Pass a custom remover
    to override the removal behavior.

    >>> import pathlib
    >>> with temp_dir() as the_dir:
    ...     assert os.path.isdir(the_dir)
    ...     _ = pathlib.Path(the_dir).joinpath('somefile').write_text('contents')
    >>> assert not os.path.exists(the_dir)
    N)�tempfile�mkdtemp)�remover�temp_dirs  r	r6r6Ns0�������!�H�����������s�2�%�	2�
/�2Tc#�K�d|vrdnd}|�5}|d||g}|r|jd|g�ttjjd�}|r|nd}tj||��|��ddd�y#1swYyxYw�w)z�
    Check out the repo indicated by url.

    If dest_ctx is supplied, it should be a context manager
    to yield the target directory for the check out.
    �git�hg�clonez--branch�wN)�stdout)�extend�openrr�devnullrr)	r�branch�quiet�dest_ctx�exe�repo_dirr#r?r<s	         r	�repo_contextrEasy�����C�<�%�T�C�	��x��G�S�(�+����J�J�
�F�+�,��r�w�w����,��!��t�����c�&�1���
���s�B�A!A<�3	B�<B�Bc#�K�d��y�w)z�
    A null context suitable to stand in for a meaningful context.

    >>> with null() as value:
    ...     assert value is None
    Nrrr1r	�nullrGts����
�s�c�t�eZdZdZdZeffd�Zd�Zed��Z	ed��Z
ed��Zd�Zd	�Z
ed
�d�Zd�Zy
)�
ExceptionTrapa�
    A context manager that will catch certain exceptions and provide an
    indication they occurred.

    >>> with ExceptionTrap() as trap:
    ...     raise Exception()
    >>> bool(trap)
    True

    >>> with ExceptionTrap() as trap:
    ...     pass
    >>> bool(trap)
    False

    >>> with ExceptionTrap(ValueError) as trap:
    ...     raise ValueError("1 + 1 is not 3")
    >>> bool(trap)
    True
    >>> trap.value
    ValueError('1 + 1 is not 3')
    >>> trap.tb
    <traceback object at ...>

    >>> with ExceptionTrap(ValueError) as trap:
    ...     raise Exception()
    Traceback (most recent call last):
    ...
    Exception

    >>> bool(trap)
    False
    )NNNc��||_y�N)�
exceptions)�selfrLs  r	�__init__zExceptionTrap.__init__�s	��$��r1c��|SrKr�rMs r	�	__enter__zExceptionTrap.__enter__�����r1c� �|jdS�Nr��exc_inforPs r	�typezExceptionTrap.type�����}�}�Q��r1c� �|jdS)N�rUrPs r	�valuezExceptionTrap.value�rXr1c� �|jdS)N�rUrPs r	�tbzExceptionTrap.tb�rXr1c�V�|d}|xrt||j�}|r||_|SrT)�
issubclassrLrV)rMrVrW�matchess    r	�__exit__zExceptionTrap.__exit__�s/����{���<�:�d�D�O�O�<���$�D�M��r1c�,�t|j�SrK)�boolrWrPs r	�__bool__zExceptionTrap.__bool__�s���D�I�I��r1��_testc�J����tj�����fd��}|S)a�
        Wrap func and replace the result with the truth
        value of the trap (True if an exception occurred).

        First, give the decorator an alias to support Python 3.8
        Syntax.

        >>> raises = ExceptionTrap(ValueError).raises

        Now decorate a function that always fails.

        >>> @raises
        ... def fail():
        ...     raise ValueError('failed')
        >>> fail()
        True
        c�x��t�j�5}�|i|��ddd���S#1swY�xYwrK)rIrL)�args�kwargs�traprg�funcrMs   ���r	�wrapperz%ExceptionTrap.raises.<locals>.wrapper�s6����t���/�4��d�%�f�%�0���;��0�/�s�	0�9)r�wraps)rMrmrgrns``` r	�raiseszExceptionTrap.raises�s'���&
����	�	�
�	�
�r1c�D�|j|tj��S)a�
        Wrap func and replace the result with the truth
        value of the trap (True if no exception).

        First, give the decorator an alias to support Python 3.8
        Syntax.

        >>> passes = ExceptionTrap(ValueError).passes

        Now decorate a function that always fails.

        >>> @passes
        ... def fail():
        ...     raise ValueError('failed')

        >>> fail()
        False
        rf)rp�operator�not_)rMrms  r	�passeszExceptionTrap.passes�s��&�{�{�4�x�}�}�{�5�5r1N)�__name__�
__module__�__qualname__�__doc__rV�	ExceptionrNrQ�propertyrWr[r^rbrerdrprtrr1r	rIrIss���B �H�#,�,�%��� �� �� �� �� �� ���%)��66r1rIc��eZdZdZy)�suppressz�
    A version of contextlib.suppress with decorator support.

    >>> @suppress(KeyError)
    ... def key_error():
    ...     {}['']
    >>> key_error()
    N)rurvrwrxrr1r	r|r|�s��r1r|c�(�eZdZdZ		dd�Zd�Zd�Zy)�on_interrupta
    Replace a KeyboardInterrupt with SystemExit(1)

    >>> def do_interrupt():
    ...     raise KeyboardInterrupt()
    >>> on_interrupt('error')(do_interrupt)()
    Traceback (most recent call last):
    ...
    SystemExit: 1
    >>> on_interrupt('error', code=255)(do_interrupt)()
    Traceback (most recent call last):
    ...
    SystemExit: 255
    >>> on_interrupt('suppress')(do_interrupt)()
    >>> with __import__('pytest').raises(KeyboardInterrupt):
    ...     on_interrupt('ignore')(do_interrupt)()
    c� �||_||_yrK)�action�code)rMr�r�s   r	rNzon_interrupt.__init__s�������	r1c��|SrKrrPs r	rQzon_interrupt.__enter__rRr1c��|tus|jdk(ry|jdk(rt|j�|�|jdk(S)N�ignore�errorr|)�KeyboardInterruptr��
SystemExitr�)rM�exctype�excinst�exctbs    r	rbzon_interrupt.__exit__sE���+�+�t�{�{�h�/F��
�[�[�G�
#��T�Y�Y�'�W�4��{�{�j�(�(r1N)r�rZ)rurvrwrxrNrQrbrr1r	r~r~�s ���(����)r1r~)rr�
contextlibrr3�shutilrrr�contextmanagerr
r$r�rmtreer6rErGrIr|�ContextDecoratorr~rr1r	�<module>r�s���	�����
������
��
� ���$(��U�7��7�:3�(����]�]����$���!������$���
��
�n6�n6�b�z�"�"�J�$?�$?��%)�:�.�.�%)r1python3.12/site-packages/setuptools/_vendor/jaraco/text/__pycache__/__init__.cpython-312.pyc000064400000057654151732704040025707 0ustar00�

��_i�<����ddlZddlZddlZddlZ	ddlmZddlm	Z	m
Z
ddlmZd�Z
d�ZGd�de�Zee�Zej&d	��Zd
�Zd�Zd�Zd
�ZGd�de�Zd d�ZGd�de�Zej<Zd�Z Gd�de�Z!Gd�d�Z"d�Z#d�Z$d�Z%d�Z&ejNd��Z(e(jSe�d��Z*d�Z+d�Z,y#e$r	ddlmZY��wxYw)!�N)�files)�compose�method_cache)�
ExceptionTrapc������fd�S)zH
    Return a function that will perform a substitution on a string
    c�(��|j���S�N��replace)�s�new�olds ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/jaraco/text/__init__.py�<lambda>zsubstitution.<locals>.<lambda>s���Q�Y�Y�s�C�(��)rr
s``r�substitutionrs���)�(rc�n�tjt|�}tt	|��}t|�S)z�
    Take a sequence of pairs specifying substitutions, and create
    a function that performs those substitutions.

    >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo')
    'baz'
    )�	itertools�starmapr�reversed�tupler)�
substitutionss r�multi_substitutionrs2���%�%�l�M�B�M��U�=�1�2�M��M�"�"rc�h��eZdZdZd�Zd�Zd�Zd�Zd�Z�fd�Z	d�Z
e�fd	��Zd
�Z
dd�Z�xZS)
�
FoldedCasea
    A case insensitive string class; behaves just like str
    except compares equal when the only variation is case.

    >>> s = FoldedCase('hello world')

    >>> s == 'Hello World'
    True

    >>> 'Hello World' == s
    True

    >>> s != 'Hello World'
    False

    >>> s.index('O')
    4

    >>> s.split('O')
    ['hell', ' w', 'rld']

    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
    ['alpha', 'Beta', 'GAMMA']

    Sequence membership is straightforward.

    >>> "Hello World" in [s]
    True
    >>> s in ["Hello World"]
    True

    You may test for set inclusion, but candidate and elements
    must both be folded.

    >>> FoldedCase("Hello World") in {s}
    True
    >>> s in {FoldedCase("Hello World")}
    True

    String inclusion works as long as the FoldedCase object
    is on the right.

    >>> "hello" in FoldedCase("Hello World")
    True

    But not if the FoldedCase object is on the left:

    >>> FoldedCase('hello') in 'Hello World'
    False

    In that case, use ``in_``:

    >>> FoldedCase('hello').in_('Hello World')
    True

    >>> FoldedCase('hello') > FoldedCase('Hello')
    False
    c�D�|j�|j�kSr	��lower��self�others  r�__lt__zFoldedCase.__lt__a����z�z�|�e�k�k�m�+�+rc�D�|j�|j�kDSr	rr s  r�__gt__zFoldedCase.__gt__dr$rc�D�|j�|j�k(Sr	rr s  r�__eq__zFoldedCase.__eq__g����z�z�|�u�{�{�}�,�,rc�D�|j�|j�k7Sr	rr s  r�__ne__zFoldedCase.__ne__jr)rc�4�t|j��Sr	)�hashr�r!s r�__hash__zFoldedCase.__hash__ms���D�J�J�L�!�!rc�Z��t�|��j|j��Sr	)�superr�__contains__)r!r"�	__class__s  �rr2zFoldedCase.__contains__ps ����w�}��+�+�E�K�K�M�:�:rc��|t|�vS)zDoes self appear in other?)rr s  r�in_zFoldedCase.in_ss���z�%�(�(�(rc� ��t�|��Sr	)r1r)r!r3s �rrzFoldedCase.lowerxs����w�}��rc�\�|j�j|j��Sr	)r�index)r!�subs  rr8zFoldedCase.index|s���z�z�|�!�!�#�)�)�+�.�.rc��tjtj|�tj�}|j	||�Sr	)�re�compile�escape�I�split)r!�splitter�maxsplit�patterns    rr?zFoldedCase.splits0���*�*�R�Y�Y�x�0�"�$�$�7���}�}�T�8�,�,r)� r)�__name__�
__module__�__qualname__�__doc__r#r&r(r+r/r2r5rrr8r?�
__classcell__�r3s@rrr%sJ���9�v,�,�-�-�"�;�)�
����/�-rrc�$�|j�y)z�
    Return True if the supplied value is decodable (using the default
    encoding).

    >>> is_decodable(b'\xff')
    False
    >>> is_decodable(b'\x32')
    True
    N)�decode��values r�is_decodablerN�s
��
�L�L�Nrc�>�t|t�xrt|�S)z�
    Return True if the value appears to be binary (that is, it's a byte
    string and isn't decodable).

    >>> is_binary(b'\xff')
    True
    >>> is_binary('\xff')
    False
    )�
isinstance�bytesrNrLs r�	is_binaryrR�s���e�U�#�?�L��,?�(?�?rc�H�tj|�j�S)z�
    Trim something like a docstring to remove the whitespace that
    is common due to indentation and formatting.

    >>> trim("\n\tfoo = bar\n\t\tbar = baz\n")
    'foo = bar\n\tbar = baz'
    )�textwrap�dedent�strip)rs r�trimrW�s���?�?�1��#�#�%�%rc�V�|j�}d�|D�}dj|�S)a
    Wrap lines of text, retaining existing newlines as
    paragraph markers.

    >>> print(wrap(lorem_ipsum))
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
    aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum.
    <BLANKLINE>
    Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam
    varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus
    magna felis sollicitudin mauris. Integer in mauris eu nibh euismod
    gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis
    risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue,
    eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas
    fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla
    a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis,
    neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing
    sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque
    nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus
    quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis,
    molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
    c3�dK�|](}djtj|�����*y�w)�
N)�joinrT�wrap��.0�paras  r�	<genexpr>zwrap.<locals>.<genexpr>�s#����E�*�$�t�y�y����t�,�-�*�s�.0z

)�
splitlinesr[)r�
paragraphs�wrappeds   rr\r\�s(��8����J�E�*�E�G��;�;�w��rc�b�tjd|�}d�|D�}dj|�S)ad
    Given a multi-line string, return an unwrapped version.

    >>> wrapped = wrap(lorem_ipsum)
    >>> wrapped.count('\n')
    20
    >>> unwrapped = unwrap(wrapped)
    >>> unwrapped.count('\n')
    1
    >>> print(unwrapped)
    Lorem ipsum dolor sit amet, consectetur adipiscing ...
    Curabitur pretium tincidunt lacus. Nulla gravida orci ...

    z\n\n+c3�@K�|]}|jdd����y�w)rZrCNr
r]s  rr`zunwrap.<locals>.<genexpr>�s����>�:�4�t�|�|�D�#�&�:�s�rZ)r;r?r[)rrb�cleaneds   r�unwraprg�s-�����(�A�&�J�>�:�>�G��9�9�W��rc��eZdZdZd�Zd�Zy)�Splitterz�object that will split a string with the given arguments for each call

    >>> s = Splitter(',')
    >>> s('hello, world, this is your, master calling')
    ['hello', ' world', ' this is your', ' master calling']
    c��||_yr	)�args)r!rks  r�__init__zSplitter.__init__�s	����	rc�4�|j|j�Sr	)r?rk)r!rs  r�__call__zSplitter.__call__�s���q�w�w��	�	�"�"rN)rDrErFrGrlrnrrrriri�s����#rric��||zS)z)
    >>> indent('foo')
    '    foo'
    r)�string�prefixs  r�indentrr�s��
�F�?�rc���eZdZdZej
d�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Z�fd
�Zed��Zed��Z�xZS)�WordSeta
    Given an identifier, return the words that identifier represents,
    whether in camel case, underscore-separated, etc.

    >>> WordSet.parse("camelCase")
    ('camel', 'Case')

    >>> WordSet.parse("under_sep")
    ('under', 'sep')

    Acronyms should be retained

    >>> WordSet.parse("firstSNL")
    ('first', 'SNL')

    >>> WordSet.parse("you_and_I")
    ('you', 'and', 'I')

    >>> WordSet.parse("A simple test")
    ('A', 'simple', 'test')

    Multiple caps should not interfere with the first cap of another word.

    >>> WordSet.parse("myABCClass")
    ('my', 'ABC', 'Class')

    The result is a WordSet, so you can get the form you need.

    >>> WordSet.parse("myABCClass").underscore_separated()
    'my_ABC_Class'

    >>> WordSet.parse('a-command').camel_case()
    'ACommand'

    >>> WordSet.parse('someIdentifier').lowered().space_separated()
    'some identifier'

    Slices of the result should return another WordSet.

    >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated()
    'out_of_context'

    >>> WordSet.from_class_name(WordSet()).lowered().space_separated()
    'word set'

    >>> example = WordSet.parse('figured it out')
    >>> example.headless_camel_case()
    'figuredItOut'
    >>> example.dash_separated()
    'figured-it-out'

    z ([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))c�&�td�|D��S)Nc3�<K�|]}|j����y�wr	)�
capitalize�r^�words  rr`z&WordSet.capitalized.<locals>.<genexpr>5s����:�T�T�t���(�T����rtr.s r�capitalizedzWordSet.capitalized4s���:�T�:�:�:rc�&�td�|D��S)Nc3�<K�|]}|j����y�wr	rrxs  rr`z"WordSet.lowered.<locals>.<genexpr>8s����5���t�z�z�|��rzr{r.s r�loweredzWordSet.lowered7s���5��5�5�5rc�@�dj|j��S�N�)r[r|r.s r�
camel_casezWordSet.camel_case:s���w�w�t�'�'�)�*�*rc���t|�}t|�j�}tj|ft|�j
��}dj|�Sr�)�iter�nextrr�chainrtr�r[)r!�words�first�	new_wordss    r�headless_camel_casezWordSet.headless_camel_case=sK���T�
���U��!�!�#���O�O�U�H�g�e�n�.G�.G�.I�J�	��w�w�y�!�!rc�$�dj|�S)N�_�r[r.s r�underscore_separatedzWordSet.underscore_separatedC����x�x��~�rc�$�dj|�S)N�-r�r.s r�dash_separatedzWordSet.dash_separatedFr�rc�$�dj|�S)NrCr�r.s r�space_separatedzWordSet.space_separatedIr�rc�$�|r
|d|k(r|ddS|S)a
        Remove the item from the end of the set.

        >>> WordSet.parse('foo bar').trim_right('foo')
        ('foo', 'bar')
        >>> WordSet.parse('foo bar').trim_right('bar')
        ('foo',)
        >>> WordSet.parse('').trim_right('bar')
        ()
        ���Nr�r!�items  r�
trim_rightzWordSet.trim_rightLs"��!�T�"�X��%5�t�C�R�y�?�4�?rc�$�|r
|d|k(r|ddS|S)a
        Remove the item from the beginning of the set.

        >>> WordSet.parse('foo bar').trim_left('foo')
        ('bar',)
        >>> WordSet.parse('foo bar').trim_left('bar')
        ('foo', 'bar')
        >>> WordSet.parse('').trim_left('bar')
        ()
        r�Nrr�s  r�	trim_leftzWordSet.trim_leftYs!�� �D��G�t�O�t�A�B�x�=��=rc�B�|j|�j|�S)zK
        >>> WordSet.parse('foo bar').trim('foo')
        ('bar',)
        )r�r�r�s  rrWzWordSet.trimfs��
�~�~�d�#�.�.�t�4�4rc�d��tt|�|�}t|t�rt|�}|Sr	)r1rt�__getitem__rP�slice)r!r��resultr3s   �rr�zWordSet.__getitem__ms,����w��1�$�7���d�E�"��V�_�F��
rc�\�|jj|�}td�|D��S)Nc3�>K�|]}|jd����y�w)rN��group�r^�matchs  rr`z WordSet.parse.<locals>.<genexpr>vs����;�7�%�u�{�{�1�~�7�s�)�_pattern�finditerrt)�cls�
identifier�matchess   r�parsez
WordSet.parsess'���,�,�'�'�
�3���;�7�;�;�;rc�L�|j|jj�Sr	)r�r3rD)r��subjects  r�from_class_namezWordSet.from_class_namexs���y�y��*�*�3�3�4�4r)rDrErFrGr;r<r�r|rr�r�r�r�r�r�r�rWr��classmethodr�r�rHrIs@rrtrt�s|���3�j�r�z�z�<�=�H�;�6�+�"����@�>�5���<��<��5��5rrtc��tjdtj�}d�|j|�D�}dj	|�S)a�
    Remove HTML from the string `s`.

    >>> str(simple_html_strip(''))
    ''

    >>> print(simple_html_strip('A <bold>stormy</bold> day in paradise'))
    A stormy day in paradise

    >>> print(simple_html_strip('Somebody <!-- do not --> tell the truth.'))
    Somebody  tell the truth.

    >>> print(simple_html_strip('What about<br/>\nmultiple lines?'))
    What about
    multiple lines?
    z(<!--.*?-->)|(<[^>]*>)|([^<]+)c3�FK�|]}|jd�xsd���y�w)�r�Nr�r�s  rr`z$simple_html_strip.<locals>.<genexpr>�s#����I�/H�e�U�[�[��^�
!�r�
!�/H�s�!r�)r;r<�DOTALLr�r[)r�
html_stripper�textss   r�simple_html_stripr��s<��"�J�J�?����K�M�I�}�/E�/E�a�/H�I�E�
�7�7�5�>�rc��eZdZdZdZd�Zy)�SeparatedValuesa
    A string separated by a separator. Overrides __iter__ for getting
    the values.

    >>> list(SeparatedValues('a,b,c'))
    ['a', 'b', 'c']

    Whitespace is stripped and empty values are discarded.

    >>> list(SeparatedValues(' a,   b   , c,  '))
    ['a', 'b', 'c']
    �,c�^�|j|j�}tdd�|D��S)Nc3�<K�|]}|j����y�wr	)rV)r^�parts  rr`z+SeparatedValues.__iter__.<locals>.<genexpr>�s����<�e�d�T�Z�Z�\�e�rz)r?�	separator�filter)r!�partss  r�__iter__zSeparatedValues.__iter__�s'���
�
�4�>�>�*���d�<�e�<�=�=rN)rDrErFrGr�r�rrrr�r��s����I�>rr�c�<�eZdZdZd�Zed��Zd�Zed��Z	y)�Strippera&
    Given a series of lines, find the common prefix and strip it from them.

    >>> lines = [
    ...     'abcdefg\n',
    ...     'abc\n',
    ...     'abcde\n',
    ... ]
    >>> res = Stripper.strip_prefix(lines)
    >>> res.prefix
    'abc'
    >>> list(res.lines)
    ['defg\n', '\n', 'de\n']

    If no prefix is common, nothing should be stripped.

    >>> lines = [
    ...     'abcd\n',
    ...     '1234\n',
    ... ]
    >>> res = Stripper.strip_prefix(lines)
    >>> res.prefix = ''
    >>> list(res.lines)
    ['abcd\n', '1234\n']
    c�4�||_t||�|_yr	)rq�map�lines)r!rqr�s   rrlzStripper.__init__�s�������u�%��
rc��tj|�\}}tj|j|�}|||�Sr	)r�tee�	functools�reduce�
common_prefix)r�r��prefix_linesrqs    r�strip_prefixzStripper.strip_prefix�s:��'�m�m�E�2���e��!�!�#�"3�"3�\�B���6�5�!�!rc�`�|js|S|j|j�\}}}|Sr	)rq�	partition)r!�line�nullrq�rests     rrnzStripper.__call__�s,���{�{��K�!�^�^�D�K�K�8���f�d��rc��tt|�t|��}|d||d|k7r|dz}|d||d|k7r�|d|S)z8
        Return the common prefix of two lines.
        Nr�)�min�len)�s1�s2r8s   rr�zStripper.common_prefix�sW��
�C��G�S��W�%����%�j�B�v��J�&��Q�J�E���%�j�B�v��J�&��&�5�z�rN)
rDrErFrGrlr�r�rn�staticmethodr�rrrr�r��s9���4&��"��"�
����rr�c�0�|j|�\}}}|S)z�
    Remove the prefix from the text if it exists.

    >>> remove_prefix('underwhelming performance', 'underwhelming ')
    'performance'

    >>> remove_prefix('something special', 'sample')
    'something special'
    )�
rpartition)�textrqr�r�s    r�
remove_prefixr��s������0��D�&�$��Krc�0�|j|�\}}}|S)z�
    Remove the suffix from the text if it exists.

    >>> remove_suffix('name.git', '.git')
    'name'

    >>> remove_suffix('something special', 'sample')
    'something special'
    �r�)r��suffixr�r�s    r�
remove_suffixr��s������/��D�&�$��Krc�Z�gd�}dj|�}tj|d|�S)a	
    Replace alternate newlines with the canonical newline.

    >>> normalize_newlines('Lorem Ipsum\u2029')
    'Lorem Ipsum\n'
    >>> normalize_newlines('Lorem Ipsum\r\n')
    'Lorem Ipsum\n'
    >>> normalize_newlines('Lorem Ipsum\x85')
    'Lorem Ipsum\n'
    )z
�
rZ�…u
u
�|rZ)r[r;r9)r��newlinesrBs   r�normalize_newlinesr��s+��B�H��h�h�x� �G�
�6�6�'�4��&�&rc�.�|xr|jd�S)N�#)�
startswith)�strs r�	_nonblankr�s���*�s�~�~�c�*�*�*rc�\�tjjtt|��S)a�
    Yield valid lines of a string or iterable.

    >>> list(yield_lines(''))
    []
    >>> list(yield_lines(['foo', 'bar']))
    ['foo', 'bar']
    >>> list(yield_lines('foo\nbar'))
    ['foo', 'bar']
    >>> list(yield_lines('\nfoo\n#bar\nbaz #comment'))
    ['foo', 'baz #comment']
    >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n']))
    ['foo', 'bar', 'baz', 'bing']
    )rr��
from_iterabler��yield_lines)�iterables rr�r�s �� �?�?�(�(��[�(�)C�D�Drc�n�ttttj|j���Sr	)r�r�r�r�rVra)r�s rr�r�%s!���)�S����D�O�O�,=�>�?�?rc�*�|jd�dS)z�
    Drop comments.

    >>> drop_comment('foo # bar')
    'foo'

    A hash without a space may be in a URL.

    >>> drop_comment('http://example.com/foo#bar')
    'http://example.com/foo#bar'
    z #rr�)r�s r�drop_commentr�*s���>�>�$���"�"rc#��K�t|�}|D]I}|jd�r2	|ddj�t|�z}|jd�r�2|���Ky#t$rYywxYw�w)a_
    Join lines continued by a trailing backslash.

    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar \\', 'baz']))
    ['foobarbaz']

    Not sure why, but...
    The character preceeding the backslash is also elided.

    >>> list(join_continuation(['goo\\', 'dly']))
    ['godly']

    A terrible idea, but...
    If no line is available to continue, suppress the lines.

    >>> list(join_continuation(['foo', 'bar\\', 'baz\\']))
    ['foo']
    �\N���)r��endswithrVr��
StopIteration)r�r�s  r�join_continuationr�9so����.
��K�E����m�m�D�!�
��C�R�y���(�4��;�6���m�m�D�!�
�
�
��!�
��
�s.�"A-�A�A-�A-�	A*�&A-�)A*�*A-)z    )-r;rrTr��importlib.resourcesr�ImportError�%setuptools.extern.importlib_resources�"setuptools.extern.jaraco.functoolsrr� setuptools.extern.jaraco.contextrrrr�r�UnicodeDecodeError�
_unicode_trap�passesrNrRrWr\rg�objectrirrrrtr�r�r�r�r�r�r�r�r��singledispatchr��registerr�r�r�rrr�<module>rs/��	����<�)�E�:�)�#�\-��\-�@�0�1�
����
��
�
@�&� �B�,#�v�#��~5�e�~5�D	�
�
���,>�c�>�*3�3�l��
'� +����E��E�$
���c��@��@�#���c�<�;�<�s�C�C%�$C%python3.12/site-packages/setuptools/_vendor/jaraco/text/__init__.py000064400000036235151732704040021336 0ustar00import re
import itertools
import textwrap
import functools

try:
    from importlib.resources import files  # type: ignore
except ImportError:  # pragma: nocover
    from setuptools.extern.importlib_resources import files  # type: ignore

from setuptools.extern.jaraco.functools import compose, method_cache
from setuptools.extern.jaraco.context import ExceptionTrap


def substitution(old, new):
    """
    Return a function that will perform a substitution on a string
    """
    return lambda s: s.replace(old, new)


def multi_substitution(*substitutions):
    """
    Take a sequence of pairs specifying substitutions, and create
    a function that performs those substitutions.

    >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo')
    'baz'
    """
    substitutions = itertools.starmap(substitution, substitutions)
    # compose function applies last function first, so reverse the
    #  substitutions to get the expected order.
    substitutions = reversed(tuple(substitutions))
    return compose(*substitutions)


class FoldedCase(str):
    """
    A case insensitive string class; behaves just like str
    except compares equal when the only variation is case.

    >>> s = FoldedCase('hello world')

    >>> s == 'Hello World'
    True

    >>> 'Hello World' == s
    True

    >>> s != 'Hello World'
    False

    >>> s.index('O')
    4

    >>> s.split('O')
    ['hell', ' w', 'rld']

    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
    ['alpha', 'Beta', 'GAMMA']

    Sequence membership is straightforward.

    >>> "Hello World" in [s]
    True
    >>> s in ["Hello World"]
    True

    You may test for set inclusion, but candidate and elements
    must both be folded.

    >>> FoldedCase("Hello World") in {s}
    True
    >>> s in {FoldedCase("Hello World")}
    True

    String inclusion works as long as the FoldedCase object
    is on the right.

    >>> "hello" in FoldedCase("Hello World")
    True

    But not if the FoldedCase object is on the left:

    >>> FoldedCase('hello') in 'Hello World'
    False

    In that case, use ``in_``:

    >>> FoldedCase('hello').in_('Hello World')
    True

    >>> FoldedCase('hello') > FoldedCase('Hello')
    False
    """

    def __lt__(self, other):
        return self.lower() < other.lower()

    def __gt__(self, other):
        return self.lower() > other.lower()

    def __eq__(self, other):
        return self.lower() == other.lower()

    def __ne__(self, other):
        return self.lower() != other.lower()

    def __hash__(self):
        return hash(self.lower())

    def __contains__(self, other):
        return super().lower().__contains__(other.lower())

    def in_(self, other):
        "Does self appear in other?"
        return self in FoldedCase(other)

    # cache lower since it's likely to be called frequently.
    @method_cache
    def lower(self):
        return super().lower()

    def index(self, sub):
        return self.lower().index(sub.lower())

    def split(self, splitter=' ', maxsplit=0):
        pattern = re.compile(re.escape(splitter), re.I)
        return pattern.split(self, maxsplit)


# Python 3.8 compatibility
_unicode_trap = ExceptionTrap(UnicodeDecodeError)


@_unicode_trap.passes
def is_decodable(value):
    r"""
    Return True if the supplied value is decodable (using the default
    encoding).

    >>> is_decodable(b'\xff')
    False
    >>> is_decodable(b'\x32')
    True
    """
    value.decode()


def is_binary(value):
    r"""
    Return True if the value appears to be binary (that is, it's a byte
    string and isn't decodable).

    >>> is_binary(b'\xff')
    True
    >>> is_binary('\xff')
    False
    """
    return isinstance(value, bytes) and not is_decodable(value)


def trim(s):
    r"""
    Trim something like a docstring to remove the whitespace that
    is common due to indentation and formatting.

    >>> trim("\n\tfoo = bar\n\t\tbar = baz\n")
    'foo = bar\n\tbar = baz'
    """
    return textwrap.dedent(s).strip()


def wrap(s):
    """
    Wrap lines of text, retaining existing newlines as
    paragraph markers.

    >>> print(wrap(lorem_ipsum))
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
    aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum.
    <BLANKLINE>
    Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam
    varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus
    magna felis sollicitudin mauris. Integer in mauris eu nibh euismod
    gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis
    risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue,
    eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas
    fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla
    a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis,
    neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing
    sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque
    nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus
    quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis,
    molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
    """
    paragraphs = s.splitlines()
    wrapped = ('\n'.join(textwrap.wrap(para)) for para in paragraphs)
    return '\n\n'.join(wrapped)


def unwrap(s):
    r"""
    Given a multi-line string, return an unwrapped version.

    >>> wrapped = wrap(lorem_ipsum)
    >>> wrapped.count('\n')
    20
    >>> unwrapped = unwrap(wrapped)
    >>> unwrapped.count('\n')
    1
    >>> print(unwrapped)
    Lorem ipsum dolor sit amet, consectetur adipiscing ...
    Curabitur pretium tincidunt lacus. Nulla gravida orci ...

    """
    paragraphs = re.split(r'\n\n+', s)
    cleaned = (para.replace('\n', ' ') for para in paragraphs)
    return '\n'.join(cleaned)




class Splitter(object):
    """object that will split a string with the given arguments for each call

    >>> s = Splitter(',')
    >>> s('hello, world, this is your, master calling')
    ['hello', ' world', ' this is your', ' master calling']
    """

    def __init__(self, *args):
        self.args = args

    def __call__(self, s):
        return s.split(*self.args)


def indent(string, prefix=' ' * 4):
    """
    >>> indent('foo')
    '    foo'
    """
    return prefix + string


class WordSet(tuple):
    """
    Given an identifier, return the words that identifier represents,
    whether in camel case, underscore-separated, etc.

    >>> WordSet.parse("camelCase")
    ('camel', 'Case')

    >>> WordSet.parse("under_sep")
    ('under', 'sep')

    Acronyms should be retained

    >>> WordSet.parse("firstSNL")
    ('first', 'SNL')

    >>> WordSet.parse("you_and_I")
    ('you', 'and', 'I')

    >>> WordSet.parse("A simple test")
    ('A', 'simple', 'test')

    Multiple caps should not interfere with the first cap of another word.

    >>> WordSet.parse("myABCClass")
    ('my', 'ABC', 'Class')

    The result is a WordSet, so you can get the form you need.

    >>> WordSet.parse("myABCClass").underscore_separated()
    'my_ABC_Class'

    >>> WordSet.parse('a-command').camel_case()
    'ACommand'

    >>> WordSet.parse('someIdentifier').lowered().space_separated()
    'some identifier'

    Slices of the result should return another WordSet.

    >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated()
    'out_of_context'

    >>> WordSet.from_class_name(WordSet()).lowered().space_separated()
    'word set'

    >>> example = WordSet.parse('figured it out')
    >>> example.headless_camel_case()
    'figuredItOut'
    >>> example.dash_separated()
    'figured-it-out'

    """

    _pattern = re.compile('([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))')

    def capitalized(self):
        return WordSet(word.capitalize() for word in self)

    def lowered(self):
        return WordSet(word.lower() for word in self)

    def camel_case(self):
        return ''.join(self.capitalized())

    def headless_camel_case(self):
        words = iter(self)
        first = next(words).lower()
        new_words = itertools.chain((first,), WordSet(words).camel_case())
        return ''.join(new_words)

    def underscore_separated(self):
        return '_'.join(self)

    def dash_separated(self):
        return '-'.join(self)

    def space_separated(self):
        return ' '.join(self)

    def trim_right(self, item):
        """
        Remove the item from the end of the set.

        >>> WordSet.parse('foo bar').trim_right('foo')
        ('foo', 'bar')
        >>> WordSet.parse('foo bar').trim_right('bar')
        ('foo',)
        >>> WordSet.parse('').trim_right('bar')
        ()
        """
        return self[:-1] if self and self[-1] == item else self

    def trim_left(self, item):
        """
        Remove the item from the beginning of the set.

        >>> WordSet.parse('foo bar').trim_left('foo')
        ('bar',)
        >>> WordSet.parse('foo bar').trim_left('bar')
        ('foo', 'bar')
        >>> WordSet.parse('').trim_left('bar')
        ()
        """
        return self[1:] if self and self[0] == item else self

    def trim(self, item):
        """
        >>> WordSet.parse('foo bar').trim('foo')
        ('bar',)
        """
        return self.trim_left(item).trim_right(item)

    def __getitem__(self, item):
        result = super(WordSet, self).__getitem__(item)
        if isinstance(item, slice):
            result = WordSet(result)
        return result

    @classmethod
    def parse(cls, identifier):
        matches = cls._pattern.finditer(identifier)
        return WordSet(match.group(0) for match in matches)

    @classmethod
    def from_class_name(cls, subject):
        return cls.parse(subject.__class__.__name__)


# for backward compatibility
words = WordSet.parse


def simple_html_strip(s):
    r"""
    Remove HTML from the string `s`.

    >>> str(simple_html_strip(''))
    ''

    >>> print(simple_html_strip('A <bold>stormy</bold> day in paradise'))
    A stormy day in paradise

    >>> print(simple_html_strip('Somebody <!-- do not --> tell the truth.'))
    Somebody  tell the truth.

    >>> print(simple_html_strip('What about<br/>\nmultiple lines?'))
    What about
    multiple lines?
    """
    html_stripper = re.compile('(<!--.*?-->)|(<[^>]*>)|([^<]+)', re.DOTALL)
    texts = (match.group(3) or '' for match in html_stripper.finditer(s))
    return ''.join(texts)


class SeparatedValues(str):
    """
    A string separated by a separator. Overrides __iter__ for getting
    the values.

    >>> list(SeparatedValues('a,b,c'))
    ['a', 'b', 'c']

    Whitespace is stripped and empty values are discarded.

    >>> list(SeparatedValues(' a,   b   , c,  '))
    ['a', 'b', 'c']
    """

    separator = ','

    def __iter__(self):
        parts = self.split(self.separator)
        return filter(None, (part.strip() for part in parts))


class Stripper:
    r"""
    Given a series of lines, find the common prefix and strip it from them.

    >>> lines = [
    ...     'abcdefg\n',
    ...     'abc\n',
    ...     'abcde\n',
    ... ]
    >>> res = Stripper.strip_prefix(lines)
    >>> res.prefix
    'abc'
    >>> list(res.lines)
    ['defg\n', '\n', 'de\n']

    If no prefix is common, nothing should be stripped.

    >>> lines = [
    ...     'abcd\n',
    ...     '1234\n',
    ... ]
    >>> res = Stripper.strip_prefix(lines)
    >>> res.prefix = ''
    >>> list(res.lines)
    ['abcd\n', '1234\n']
    """

    def __init__(self, prefix, lines):
        self.prefix = prefix
        self.lines = map(self, lines)

    @classmethod
    def strip_prefix(cls, lines):
        prefix_lines, lines = itertools.tee(lines)
        prefix = functools.reduce(cls.common_prefix, prefix_lines)
        return cls(prefix, lines)

    def __call__(self, line):
        if not self.prefix:
            return line
        null, prefix, rest = line.partition(self.prefix)
        return rest

    @staticmethod
    def common_prefix(s1, s2):
        """
        Return the common prefix of two lines.
        """
        index = min(len(s1), len(s2))
        while s1[:index] != s2[:index]:
            index -= 1
        return s1[:index]


def remove_prefix(text, prefix):
    """
    Remove the prefix from the text if it exists.

    >>> remove_prefix('underwhelming performance', 'underwhelming ')
    'performance'

    >>> remove_prefix('something special', 'sample')
    'something special'
    """
    null, prefix, rest = text.rpartition(prefix)
    return rest


def remove_suffix(text, suffix):
    """
    Remove the suffix from the text if it exists.

    >>> remove_suffix('name.git', '.git')
    'name'

    >>> remove_suffix('something special', 'sample')
    'something special'
    """
    rest, suffix, null = text.partition(suffix)
    return rest


def normalize_newlines(text):
    r"""
    Replace alternate newlines with the canonical newline.

    >>> normalize_newlines('Lorem Ipsum\u2029')
    'Lorem Ipsum\n'
    >>> normalize_newlines('Lorem Ipsum\r\n')
    'Lorem Ipsum\n'
    >>> normalize_newlines('Lorem Ipsum\x85')
    'Lorem Ipsum\n'
    """
    newlines = ['\r\n', '\r', '\n', '\u0085', '\u2028', '\u2029']
    pattern = '|'.join(newlines)
    return re.sub(pattern, '\n', text)


def _nonblank(str):
    return str and not str.startswith('#')


@functools.singledispatch
def yield_lines(iterable):
    r"""
    Yield valid lines of a string or iterable.

    >>> list(yield_lines(''))
    []
    >>> list(yield_lines(['foo', 'bar']))
    ['foo', 'bar']
    >>> list(yield_lines('foo\nbar'))
    ['foo', 'bar']
    >>> list(yield_lines('\nfoo\n#bar\nbaz #comment'))
    ['foo', 'baz #comment']
    >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n']))
    ['foo', 'bar', 'baz', 'bing']
    """
    return itertools.chain.from_iterable(map(yield_lines, iterable))


@yield_lines.register(str)
def _(text):
    return filter(_nonblank, map(str.strip, text.splitlines()))


def drop_comment(line):
    """
    Drop comments.

    >>> drop_comment('foo # bar')
    'foo'

    A hash without a space may be in a URL.

    >>> drop_comment('http://example.com/foo#bar')
    'http://example.com/foo#bar'
    """
    return line.partition(' #')[0]


def join_continuation(lines):
    r"""
    Join lines continued by a trailing backslash.

    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar', 'baz']))
    ['foobar', 'baz']
    >>> list(join_continuation(['foo \\', 'bar \\', 'baz']))
    ['foobarbaz']

    Not sure why, but...
    The character preceeding the backslash is also elided.

    >>> list(join_continuation(['goo\\', 'dly']))
    ['godly']

    A terrible idea, but...
    If no line is available to continue, suppress the lines.

    >>> list(join_continuation(['foo', 'bar\\', 'baz\\']))
    ['foo']
    """
    lines = iter(lines)
    for item in lines:
        while item.endswith('\\'):
            try:
                item = item[:-2].strip() + next(lines)
            except StopIteration:
                return
        yield item
python3.12/site-packages/setuptools/_vendor/jaraco/__init__.py000064400000000000151732704050020330 0ustar00python3.12/site-packages/setuptools/_vendor/jaraco/functools.py000064400000035315151732704050020626 0ustar00import functools
import time
import inspect
import collections
import types
import itertools
import warnings

import setuptools.extern.more_itertools

from typing import Callable, TypeVar


CallableT = TypeVar("CallableT", bound=Callable[..., object])


def compose(*funcs):
    """
    Compose any number of unary functions into a single unary function.

    >>> import textwrap
    >>> expected = str.strip(textwrap.dedent(compose.__doc__))
    >>> strip_and_dedent = compose(str.strip, textwrap.dedent)
    >>> strip_and_dedent(compose.__doc__) == expected
    True

    Compose also allows the innermost function to take arbitrary arguments.

    >>> round_three = lambda x: round(x, ndigits=3)
    >>> f = compose(round_three, int.__truediv__)
    >>> [f(3*x, x+1) for x in range(1,10)]
    [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]
    """

    def compose_two(f1, f2):
        return lambda *args, **kwargs: f1(f2(*args, **kwargs))

    return functools.reduce(compose_two, funcs)


def method_caller(method_name, *args, **kwargs):
    """
    Return a function that will call a named method on the
    target object with optional positional and keyword
    arguments.

    >>> lower = method_caller('lower')
    >>> lower('MyString')
    'mystring'
    """

    def call_method(target):
        func = getattr(target, method_name)
        return func(*args, **kwargs)

    return call_method


def once(func):
    """
    Decorate func so it's only ever called the first time.

    This decorator can ensure that an expensive or non-idempotent function
    will not be expensive on subsequent calls and is idempotent.

    >>> add_three = once(lambda a: a+3)
    >>> add_three(3)
    6
    >>> add_three(9)
    6
    >>> add_three('12')
    6

    To reset the stored value, simply clear the property ``saved_result``.

    >>> del add_three.saved_result
    >>> add_three(9)
    12
    >>> add_three(8)
    12

    Or invoke 'reset()' on it.

    >>> add_three.reset()
    >>> add_three(-3)
    0
    >>> add_three(0)
    0
    """

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        if not hasattr(wrapper, 'saved_result'):
            wrapper.saved_result = func(*args, **kwargs)
        return wrapper.saved_result

    wrapper.reset = lambda: vars(wrapper).__delitem__('saved_result')
    return wrapper


def method_cache(
    method: CallableT,
    cache_wrapper: Callable[
        [CallableT], CallableT
    ] = functools.lru_cache(),  # type: ignore[assignment]
) -> CallableT:
    """
    Wrap lru_cache to support storing the cache data in the object instances.

    Abstracts the common paradigm where the method explicitly saves an
    underscore-prefixed protected property on first call and returns that
    subsequently.

    >>> class MyClass:
    ...     calls = 0
    ...
    ...     @method_cache
    ...     def method(self, value):
    ...         self.calls += 1
    ...         return value

    >>> a = MyClass()
    >>> a.method(3)
    3
    >>> for x in range(75):
    ...     res = a.method(x)
    >>> a.calls
    75

    Note that the apparent behavior will be exactly like that of lru_cache
    except that the cache is stored on each instance, so values in one
    instance will not flush values from another, and when an instance is
    deleted, so are the cached values for that instance.

    >>> b = MyClass()
    >>> for x in range(35):
    ...     res = b.method(x)
    >>> b.calls
    35
    >>> a.method(0)
    0
    >>> a.calls
    75

    Note that if method had been decorated with ``functools.lru_cache()``,
    a.calls would have been 76 (due to the cached value of 0 having been
    flushed by the 'b' instance).

    Clear the cache with ``.cache_clear()``

    >>> a.method.cache_clear()

    Same for a method that hasn't yet been called.

    >>> c = MyClass()
    >>> c.method.cache_clear()

    Another cache wrapper may be supplied:

    >>> cache = functools.lru_cache(maxsize=2)
    >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
    >>> a = MyClass()
    >>> a.method2()
    3

    Caution - do not subsequently wrap the method with another decorator, such
    as ``@property``, which changes the semantics of the function.

    See also
    http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
    for another implementation and additional justification.
    """

    def wrapper(self: object, *args: object, **kwargs: object) -> object:
        # it's the first call, replace the method with a cached, bound method
        bound_method: CallableT = types.MethodType(  # type: ignore[assignment]
            method, self
        )
        cached_method = cache_wrapper(bound_method)
        setattr(self, method.__name__, cached_method)
        return cached_method(*args, **kwargs)

    # Support cache clear even before cache has been created.
    wrapper.cache_clear = lambda: None  # type: ignore[attr-defined]

    return (  # type: ignore[return-value]
        _special_method_cache(method, cache_wrapper) or wrapper
    )


def _special_method_cache(method, cache_wrapper):
    """
    Because Python treats special methods differently, it's not
    possible to use instance attributes to implement the cached
    methods.

    Instead, install the wrapper method under a different name
    and return a simple proxy to that wrapper.

    https://github.com/jaraco/jaraco.functools/issues/5
    """
    name = method.__name__
    special_names = '__getattr__', '__getitem__'
    if name not in special_names:
        return

    wrapper_name = '__cached' + name

    def proxy(self, *args, **kwargs):
        if wrapper_name not in vars(self):
            bound = types.MethodType(method, self)
            cache = cache_wrapper(bound)
            setattr(self, wrapper_name, cache)
        else:
            cache = getattr(self, wrapper_name)
        return cache(*args, **kwargs)

    return proxy


def apply(transform):
    """
    Decorate a function with a transform function that is
    invoked on results returned from the decorated function.

    >>> @apply(reversed)
    ... def get_numbers(start):
    ...     "doc for get_numbers"
    ...     return range(start, start+3)
    >>> list(get_numbers(4))
    [6, 5, 4]
    >>> get_numbers.__doc__
    'doc for get_numbers'
    """

    def wrap(func):
        return functools.wraps(func)(compose(transform, func))

    return wrap


def result_invoke(action):
    r"""
    Decorate a function with an action function that is
    invoked on the results returned from the decorated
    function (for its side-effect), then return the original
    result.

    >>> @result_invoke(print)
    ... def add_two(a, b):
    ...     return a + b
    >>> x = add_two(2, 3)
    5
    >>> x
    5
    """

    def wrap(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            result = func(*args, **kwargs)
            action(result)
            return result

        return wrapper

    return wrap


def invoke(f, *args, **kwargs):
    """
    Call a function for its side effect after initialization.

    The benefit of using the decorator instead of simply invoking a function
    after defining it is that it makes explicit the author's intent for the
    function to be called immediately. Whereas if one simply calls the
    function immediately, it's less obvious if that was intentional or
    incidental. It also avoids repeating the name - the two actions, defining
    the function and calling it immediately are modeled separately, but linked
    by the decorator construct.

    The benefit of having a function construct (opposed to just invoking some
    behavior inline) is to serve as a scope in which the behavior occurs. It
    avoids polluting the global namespace with local variables, provides an
    anchor on which to attach documentation (docstring), keeps the behavior
    logically separated (instead of conceptually separated or not separated at
    all), and provides potential to re-use the behavior for testing or other
    purposes.

    This function is named as a pithy way to communicate, "call this function
    primarily for its side effect", or "while defining this function, also
    take it aside and call it". It exists because there's no Python construct
    for "define and call" (nor should there be, as decorators serve this need
    just fine). The behavior happens immediately and synchronously.

    >>> @invoke
    ... def func(): print("called")
    called
    >>> func()
    called

    Use functools.partial to pass parameters to the initial call

    >>> @functools.partial(invoke, name='bingo')
    ... def func(name): print("called with", name)
    called with bingo
    """
    f(*args, **kwargs)
    return f


def call_aside(*args, **kwargs):
    """
    Deprecated name for invoke.
    """
    warnings.warn("call_aside is deprecated, use invoke", DeprecationWarning)
    return invoke(*args, **kwargs)


class Throttler:
    """
    Rate-limit a function (or other callable)
    """

    def __init__(self, func, max_rate=float('Inf')):
        if isinstance(func, Throttler):
            func = func.func
        self.func = func
        self.max_rate = max_rate
        self.reset()

    def reset(self):
        self.last_called = 0

    def __call__(self, *args, **kwargs):
        self._wait()
        return self.func(*args, **kwargs)

    def _wait(self):
        "ensure at least 1/max_rate seconds from last call"
        elapsed = time.time() - self.last_called
        must_wait = 1 / self.max_rate - elapsed
        time.sleep(max(0, must_wait))
        self.last_called = time.time()

    def __get__(self, obj, type=None):
        return first_invoke(self._wait, functools.partial(self.func, obj))


def first_invoke(func1, func2):
    """
    Return a function that when invoked will invoke func1 without
    any parameters (for its side-effect) and then invoke func2
    with whatever parameters were passed, returning its result.
    """

    def wrapper(*args, **kwargs):
        func1()
        return func2(*args, **kwargs)

    return wrapper


def retry_call(func, cleanup=lambda: None, retries=0, trap=()):
    """
    Given a callable func, trap the indicated exceptions
    for up to 'retries' times, invoking cleanup on the
    exception. On the final attempt, allow any exceptions
    to propagate.
    """
    attempts = itertools.count() if retries == float('inf') else range(retries)
    for attempt in attempts:
        try:
            return func()
        except trap:
            cleanup()

    return func()


def retry(*r_args, **r_kwargs):
    """
    Decorator wrapper for retry_call. Accepts arguments to retry_call
    except func and then returns a decorator for the decorated function.

    Ex:

    >>> @retry(retries=3)
    ... def my_func(a, b):
    ...     "this is my funk"
    ...     print(a, b)
    >>> my_func.__doc__
    'this is my funk'
    """

    def decorate(func):
        @functools.wraps(func)
        def wrapper(*f_args, **f_kwargs):
            bound = functools.partial(func, *f_args, **f_kwargs)
            return retry_call(bound, *r_args, **r_kwargs)

        return wrapper

    return decorate


def print_yielded(func):
    """
    Convert a generator into a function that prints all yielded elements

    >>> @print_yielded
    ... def x():
    ...     yield 3; yield None
    >>> x()
    3
    None
    """
    print_all = functools.partial(map, print)
    print_results = compose(more_itertools.consume, print_all, func)
    return functools.wraps(func)(print_results)


def pass_none(func):
    """
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    """

    @functools.wraps(func)
    def wrapper(param, *args, **kwargs):
        if param is not None:
            return func(param, *args, **kwargs)

    return wrapper


def assign_params(func, namespace):
    """
    Assign parameters from namespace where func solicits.

    >>> def func(x, y=3):
    ...     print(x, y)
    >>> assigned = assign_params(func, dict(x=2, z=4))
    >>> assigned()
    2 3

    The usual errors are raised if a function doesn't receive
    its required parameters:

    >>> assigned = assign_params(func, dict(y=3, z=4))
    >>> assigned()
    Traceback (most recent call last):
    TypeError: func() ...argument...

    It even works on methods:

    >>> class Handler:
    ...     def meth(self, arg):
    ...         print(arg)
    >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))()
    crystal
    """
    sig = inspect.signature(func)
    params = sig.parameters.keys()
    call_ns = {k: namespace[k] for k in params if k in namespace}
    return functools.partial(func, **call_ns)


def save_method_args(method):
    """
    Wrap a method such that when it is called, the args and kwargs are
    saved on the method.

    >>> class MyClass:
    ...     @save_method_args
    ...     def method(self, a, b):
    ...         print(a, b)
    >>> my_ob = MyClass()
    >>> my_ob.method(1, 2)
    1 2
    >>> my_ob._saved_method.args
    (1, 2)
    >>> my_ob._saved_method.kwargs
    {}
    >>> my_ob.method(a=3, b='foo')
    3 foo
    >>> my_ob._saved_method.args
    ()
    >>> my_ob._saved_method.kwargs == dict(a=3, b='foo')
    True

    The arguments are stored on the instance, allowing for
    different instance to save different args.

    >>> your_ob = MyClass()
    >>> your_ob.method({str('x'): 3}, b=[4])
    {'x': 3} [4]
    >>> your_ob._saved_method.args
    ({'x': 3},)
    >>> my_ob._saved_method.args
    ()
    """
    args_and_kwargs = collections.namedtuple('args_and_kwargs', 'args kwargs')

    @functools.wraps(method)
    def wrapper(self, *args, **kwargs):
        attr_name = '_saved_' + method.__name__
        attr = args_and_kwargs(args, kwargs)
        setattr(self, attr_name, attr)
        return method(self, *args, **kwargs)

    return wrapper


def except_(*exceptions, replace=None, use=None):
    """
    Replace the indicated exceptions, if raised, with the indicated
    literal replacement or evaluated expression (if present).

    >>> safe_int = except_(ValueError)(int)
    >>> safe_int('five')
    >>> safe_int('5')
    5

    Specify a literal replacement with ``replace``.

    >>> safe_int_r = except_(ValueError, replace=0)(int)
    >>> safe_int_r('five')
    0

    Provide an expression to ``use`` to pass through particular parameters.

    >>> safe_int_pt = except_(ValueError, use='args[0]')(int)
    >>> safe_int_pt('five')
    'five'

    """

    def decorate(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            try:
                return func(*args, **kwargs)
            except exceptions:
                try:
                    return eval(use)
                except TypeError:
                    return replace

        return wrapper

    return decorate
python3.12/site-packages/setuptools/_vendor/jaraco/context.py000064400000016444151732704050020300 0ustar00import os
import subprocess
import contextlib
import functools
import tempfile
import shutil
import operator
import warnings


@contextlib.contextmanager
def pushd(dir):
    """
    >>> tmp_path = getfixture('tmp_path')
    >>> with pushd(tmp_path):
    ...     assert os.getcwd() == os.fspath(tmp_path)
    >>> assert os.getcwd() != os.fspath(tmp_path)
    """

    orig = os.getcwd()
    os.chdir(dir)
    try:
        yield dir
    finally:
        os.chdir(orig)


@contextlib.contextmanager
def tarball_context(url, target_dir=None, runner=None, pushd=pushd):
    """
    Get a tarball, extract it, change to that directory, yield, then
    clean up.
    `runner` is the function to invoke commands.
    `pushd` is a context manager for changing the directory.
    """
    if target_dir is None:
        target_dir = os.path.basename(url).replace('.tar.gz', '').replace('.tgz', '')
    if runner is None:
        runner = functools.partial(subprocess.check_call, shell=True)
    else:
        warnings.warn("runner parameter is deprecated", DeprecationWarning)
    # In the tar command, use --strip-components=1 to strip the first path and
    #  then
    #  use -C to cause the files to be extracted to {target_dir}. This ensures
    #  that we always know where the files were extracted.
    runner('mkdir {target_dir}'.format(**vars()))
    try:
        getter = 'wget {url} -O -'
        extract = 'tar x{compression} --strip-components=1 -C {target_dir}'
        cmd = ' | '.join((getter, extract))
        runner(cmd.format(compression=infer_compression(url), **vars()))
        with pushd(target_dir):
            yield target_dir
    finally:
        runner('rm -Rf {target_dir}'.format(**vars()))


def infer_compression(url):
    """
    Given a URL or filename, infer the compression code for tar.

    >>> infer_compression('http://foo/bar.tar.gz')
    'z'
    >>> infer_compression('http://foo/bar.tgz')
    'z'
    >>> infer_compression('file.bz')
    'j'
    >>> infer_compression('file.xz')
    'J'
    """
    # cheat and just assume it's the last two characters
    compression_indicator = url[-2:]
    mapping = dict(gz='z', bz='j', xz='J')
    # Assume 'z' (gzip) if no match
    return mapping.get(compression_indicator, 'z')


@contextlib.contextmanager
def temp_dir(remover=shutil.rmtree):
    """
    Create a temporary directory context. Pass a custom remover
    to override the removal behavior.

    >>> import pathlib
    >>> with temp_dir() as the_dir:
    ...     assert os.path.isdir(the_dir)
    ...     _ = pathlib.Path(the_dir).joinpath('somefile').write_text('contents')
    >>> assert not os.path.exists(the_dir)
    """
    temp_dir = tempfile.mkdtemp()
    try:
        yield temp_dir
    finally:
        remover(temp_dir)


@contextlib.contextmanager
def repo_context(url, branch=None, quiet=True, dest_ctx=temp_dir):
    """
    Check out the repo indicated by url.

    If dest_ctx is supplied, it should be a context manager
    to yield the target directory for the check out.
    """
    exe = 'git' if 'git' in url else 'hg'
    with dest_ctx() as repo_dir:
        cmd = [exe, 'clone', url, repo_dir]
        if branch:
            cmd.extend(['--branch', branch])
        devnull = open(os.path.devnull, 'w')
        stdout = devnull if quiet else None
        subprocess.check_call(cmd, stdout=stdout)
        yield repo_dir


@contextlib.contextmanager
def null():
    """
    A null context suitable to stand in for a meaningful context.

    >>> with null() as value:
    ...     assert value is None
    """
    yield


class ExceptionTrap:
    """
    A context manager that will catch certain exceptions and provide an
    indication they occurred.

    >>> with ExceptionTrap() as trap:
    ...     raise Exception()
    >>> bool(trap)
    True

    >>> with ExceptionTrap() as trap:
    ...     pass
    >>> bool(trap)
    False

    >>> with ExceptionTrap(ValueError) as trap:
    ...     raise ValueError("1 + 1 is not 3")
    >>> bool(trap)
    True
    >>> trap.value
    ValueError('1 + 1 is not 3')
    >>> trap.tb
    <traceback object at ...>

    >>> with ExceptionTrap(ValueError) as trap:
    ...     raise Exception()
    Traceback (most recent call last):
    ...
    Exception

    >>> bool(trap)
    False
    """

    exc_info = None, None, None

    def __init__(self, exceptions=(Exception,)):
        self.exceptions = exceptions

    def __enter__(self):
        return self

    @property
    def type(self):
        return self.exc_info[0]

    @property
    def value(self):
        return self.exc_info[1]

    @property
    def tb(self):
        return self.exc_info[2]

    def __exit__(self, *exc_info):
        type = exc_info[0]
        matches = type and issubclass(type, self.exceptions)
        if matches:
            self.exc_info = exc_info
        return matches

    def __bool__(self):
        return bool(self.type)

    def raises(self, func, *, _test=bool):
        """
        Wrap func and replace the result with the truth
        value of the trap (True if an exception occurred).

        First, give the decorator an alias to support Python 3.8
        Syntax.

        >>> raises = ExceptionTrap(ValueError).raises

        Now decorate a function that always fails.

        >>> @raises
        ... def fail():
        ...     raise ValueError('failed')
        >>> fail()
        True
        """

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            with ExceptionTrap(self.exceptions) as trap:
                func(*args, **kwargs)
            return _test(trap)

        return wrapper

    def passes(self, func):
        """
        Wrap func and replace the result with the truth
        value of the trap (True if no exception).

        First, give the decorator an alias to support Python 3.8
        Syntax.

        >>> passes = ExceptionTrap(ValueError).passes

        Now decorate a function that always fails.

        >>> @passes
        ... def fail():
        ...     raise ValueError('failed')

        >>> fail()
        False
        """
        return self.raises(func, _test=operator.not_)


class suppress(contextlib.suppress, contextlib.ContextDecorator):
    """
    A version of contextlib.suppress with decorator support.

    >>> @suppress(KeyError)
    ... def key_error():
    ...     {}['']
    >>> key_error()
    """


class on_interrupt(contextlib.ContextDecorator):
    """
    Replace a KeyboardInterrupt with SystemExit(1)

    >>> def do_interrupt():
    ...     raise KeyboardInterrupt()
    >>> on_interrupt('error')(do_interrupt)()
    Traceback (most recent call last):
    ...
    SystemExit: 1
    >>> on_interrupt('error', code=255)(do_interrupt)()
    Traceback (most recent call last):
    ...
    SystemExit: 255
    >>> on_interrupt('suppress')(do_interrupt)()
    >>> with __import__('pytest').raises(KeyboardInterrupt):
    ...     on_interrupt('ignore')(do_interrupt)()
    """

    def __init__(
        self,
        action='error',
        # py3.7 compat
        # /,
        code=1,
    ):
        self.action = action
        self.code = code

    def __enter__(self):
        return self

    def __exit__(self, exctype, excinst, exctb):
        if exctype is not KeyboardInterrupt or self.action == 'ignore':
            return
        elif self.action == 'error':
            raise SystemExit(self.code) from excinst
        return self.action == 'suppress'
python3.12/site-packages/setuptools/_vendor/tomli/_parser.py000064400000054151151732704050020131 0ustar00# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

from __future__ import annotations

from collections.abc import Iterable
import string
from types import MappingProxyType
from typing import Any, BinaryIO, NamedTuple

from ._re import (
    RE_DATETIME,
    RE_LOCALTIME,
    RE_NUMBER,
    match_to_datetime,
    match_to_localtime,
    match_to_number,
)
from ._types import Key, ParseFloat, Pos

ASCII_CTRL = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))

# Neither of these sets include quotation mark or backslash. They are
# currently handled as separate cases in the parser functions.
ILLEGAL_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t")
ILLEGAL_MULTILINE_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t\n")

ILLEGAL_LITERAL_STR_CHARS = ILLEGAL_BASIC_STR_CHARS
ILLEGAL_MULTILINE_LITERAL_STR_CHARS = ILLEGAL_MULTILINE_BASIC_STR_CHARS

ILLEGAL_COMMENT_CHARS = ILLEGAL_BASIC_STR_CHARS

TOML_WS = frozenset(" \t")
TOML_WS_AND_NEWLINE = TOML_WS | frozenset("\n")
BARE_KEY_CHARS = frozenset(string.ascii_letters + string.digits + "-_")
KEY_INITIAL_CHARS = BARE_KEY_CHARS | frozenset("\"'")
HEXDIGIT_CHARS = frozenset(string.hexdigits)

BASIC_STR_ESCAPE_REPLACEMENTS = MappingProxyType(
    {
        "\\b": "\u0008",  # backspace
        "\\t": "\u0009",  # tab
        "\\n": "\u000A",  # linefeed
        "\\f": "\u000C",  # form feed
        "\\r": "\u000D",  # carriage return
        '\\"': "\u0022",  # quote
        "\\\\": "\u005C",  # backslash
    }
)


class TOMLDecodeError(ValueError):
    """An error raised if a document is not valid TOML."""


def load(__fp: BinaryIO, *, parse_float: ParseFloat = float) -> dict[str, Any]:
    """Parse TOML from a binary file object."""
    b = __fp.read()
    try:
        s = b.decode()
    except AttributeError:
        raise TypeError(
            "File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
        ) from None
    return loads(s, parse_float=parse_float)


def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]:  # noqa: C901
    """Parse TOML from a string."""

    # The spec allows converting "\r\n" to "\n", even in string
    # literals. Let's do so to simplify parsing.
    src = __s.replace("\r\n", "\n")
    pos = 0
    out = Output(NestedDict(), Flags())
    header: Key = ()
    parse_float = make_safe_parse_float(parse_float)

    # Parse one statement at a time
    # (typically means one line in TOML source)
    while True:
        # 1. Skip line leading whitespace
        pos = skip_chars(src, pos, TOML_WS)

        # 2. Parse rules. Expect one of the following:
        #    - end of file
        #    - end of line
        #    - comment
        #    - key/value pair
        #    - append dict to list (and move to its namespace)
        #    - create dict (and move to its namespace)
        # Skip trailing whitespace when applicable.
        try:
            char = src[pos]
        except IndexError:
            break
        if char == "\n":
            pos += 1
            continue
        if char in KEY_INITIAL_CHARS:
            pos = key_value_rule(src, pos, out, header, parse_float)
            pos = skip_chars(src, pos, TOML_WS)
        elif char == "[":
            try:
                second_char: str | None = src[pos + 1]
            except IndexError:
                second_char = None
            out.flags.finalize_pending()
            if second_char == "[":
                pos, header = create_list_rule(src, pos, out)
            else:
                pos, header = create_dict_rule(src, pos, out)
            pos = skip_chars(src, pos, TOML_WS)
        elif char != "#":
            raise suffixed_err(src, pos, "Invalid statement")

        # 3. Skip comment
        pos = skip_comment(src, pos)

        # 4. Expect end of line or end of file
        try:
            char = src[pos]
        except IndexError:
            break
        if char != "\n":
            raise suffixed_err(
                src, pos, "Expected newline or end of document after a statement"
            )
        pos += 1

    return out.data.dict


class Flags:
    """Flags that map to parsed keys/namespaces."""

    # Marks an immutable namespace (inline array or inline table).
    FROZEN = 0
    # Marks a nest that has been explicitly created and can no longer
    # be opened using the "[table]" syntax.
    EXPLICIT_NEST = 1

    def __init__(self) -> None:
        self._flags: dict[str, dict] = {}
        self._pending_flags: set[tuple[Key, int]] = set()

    def add_pending(self, key: Key, flag: int) -> None:
        self._pending_flags.add((key, flag))

    def finalize_pending(self) -> None:
        for key, flag in self._pending_flags:
            self.set(key, flag, recursive=False)
        self._pending_flags.clear()

    def unset_all(self, key: Key) -> None:
        cont = self._flags
        for k in key[:-1]:
            if k not in cont:
                return
            cont = cont[k]["nested"]
        cont.pop(key[-1], None)

    def set(self, key: Key, flag: int, *, recursive: bool) -> None:  # noqa: A003
        cont = self._flags
        key_parent, key_stem = key[:-1], key[-1]
        for k in key_parent:
            if k not in cont:
                cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
            cont = cont[k]["nested"]
        if key_stem not in cont:
            cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
        cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)

    def is_(self, key: Key, flag: int) -> bool:
        if not key:
            return False  # document root has no flags
        cont = self._flags
        for k in key[:-1]:
            if k not in cont:
                return False
            inner_cont = cont[k]
            if flag in inner_cont["recursive_flags"]:
                return True
            cont = inner_cont["nested"]
        key_stem = key[-1]
        if key_stem in cont:
            cont = cont[key_stem]
            return flag in cont["flags"] or flag in cont["recursive_flags"]
        return False


class NestedDict:
    def __init__(self) -> None:
        # The parsed content of the TOML document
        self.dict: dict[str, Any] = {}

    def get_or_create_nest(
        self,
        key: Key,
        *,
        access_lists: bool = True,
    ) -> dict:
        cont: Any = self.dict
        for k in key:
            if k not in cont:
                cont[k] = {}
            cont = cont[k]
            if access_lists and isinstance(cont, list):
                cont = cont[-1]
            if not isinstance(cont, dict):
                raise KeyError("There is no nest behind this key")
        return cont

    def append_nest_to_list(self, key: Key) -> None:
        cont = self.get_or_create_nest(key[:-1])
        last_key = key[-1]
        if last_key in cont:
            list_ = cont[last_key]
            if not isinstance(list_, list):
                raise KeyError("An object other than list found behind this key")
            list_.append({})
        else:
            cont[last_key] = [{}]


class Output(NamedTuple):
    data: NestedDict
    flags: Flags


def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
    try:
        while src[pos] in chars:
            pos += 1
    except IndexError:
        pass
    return pos


def skip_until(
    src: str,
    pos: Pos,
    expect: str,
    *,
    error_on: frozenset[str],
    error_on_eof: bool,
) -> Pos:
    try:
        new_pos = src.index(expect, pos)
    except ValueError:
        new_pos = len(src)
        if error_on_eof:
            raise suffixed_err(src, new_pos, f"Expected {expect!r}") from None

    if not error_on.isdisjoint(src[pos:new_pos]):
        while src[pos] not in error_on:
            pos += 1
        raise suffixed_err(src, pos, f"Found invalid character {src[pos]!r}")
    return new_pos


def skip_comment(src: str, pos: Pos) -> Pos:
    try:
        char: str | None = src[pos]
    except IndexError:
        char = None
    if char == "#":
        return skip_until(
            src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
        )
    return pos


def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
    while True:
        pos_before_skip = pos
        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
        pos = skip_comment(src, pos)
        if pos == pos_before_skip:
            return pos


def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
    pos += 1  # Skip "["
    pos = skip_chars(src, pos, TOML_WS)
    pos, key = parse_key(src, pos)

    if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
        raise suffixed_err(src, pos, f"Cannot declare {key} twice")
    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
    try:
        out.data.get_or_create_nest(key)
    except KeyError:
        raise suffixed_err(src, pos, "Cannot overwrite a value") from None

    if not src.startswith("]", pos):
        raise suffixed_err(src, pos, "Expected ']' at the end of a table declaration")
    return pos + 1, key


def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
    pos += 2  # Skip "[["
    pos = skip_chars(src, pos, TOML_WS)
    pos, key = parse_key(src, pos)

    if out.flags.is_(key, Flags.FROZEN):
        raise suffixed_err(src, pos, f"Cannot mutate immutable namespace {key}")
    # Free the namespace now that it points to another empty list item...
    out.flags.unset_all(key)
    # ...but this key precisely is still prohibited from table declaration
    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
    try:
        out.data.append_nest_to_list(key)
    except KeyError:
        raise suffixed_err(src, pos, "Cannot overwrite a value") from None

    if not src.startswith("]]", pos):
        raise suffixed_err(src, pos, "Expected ']]' at the end of an array declaration")
    return pos + 2, key


def key_value_rule(
    src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
) -> Pos:
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
    key_parent, key_stem = key[:-1], key[-1]
    abs_key_parent = header + key_parent

    relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
    for cont_key in relative_path_cont_keys:
        # Check that dotted key syntax does not redefine an existing table
        if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
            raise suffixed_err(src, pos, f"Cannot redefine namespace {cont_key}")
        # Containers in the relative path can't be opened with the table syntax or
        # dotted key/value syntax in following table sections.
        out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)

    if out.flags.is_(abs_key_parent, Flags.FROZEN):
        raise suffixed_err(
            src, pos, f"Cannot mutate immutable namespace {abs_key_parent}"
        )

    try:
        nest = out.data.get_or_create_nest(abs_key_parent)
    except KeyError:
        raise suffixed_err(src, pos, "Cannot overwrite a value") from None
    if key_stem in nest:
        raise suffixed_err(src, pos, "Cannot overwrite a value")
    # Mark inline table and array namespaces recursively immutable
    if isinstance(value, (dict, list)):
        out.flags.set(header + key, Flags.FROZEN, recursive=True)
    nest[key_stem] = value
    return pos


def parse_key_value_pair(
    src: str, pos: Pos, parse_float: ParseFloat
) -> tuple[Pos, Key, Any]:
    pos, key = parse_key(src, pos)
    try:
        char: str | None = src[pos]
    except IndexError:
        char = None
    if char != "=":
        raise suffixed_err(src, pos, "Expected '=' after a key in a key/value pair")
    pos += 1
    pos = skip_chars(src, pos, TOML_WS)
    pos, value = parse_value(src, pos, parse_float)
    return pos, key, value


def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
    pos, key_part = parse_key_part(src, pos)
    key: Key = (key_part,)
    pos = skip_chars(src, pos, TOML_WS)
    while True:
        try:
            char: str | None = src[pos]
        except IndexError:
            char = None
        if char != ".":
            return pos, key
        pos += 1
        pos = skip_chars(src, pos, TOML_WS)
        pos, key_part = parse_key_part(src, pos)
        key += (key_part,)
        pos = skip_chars(src, pos, TOML_WS)


def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
    try:
        char: str | None = src[pos]
    except IndexError:
        char = None
    if char in BARE_KEY_CHARS:
        start_pos = pos
        pos = skip_chars(src, pos, BARE_KEY_CHARS)
        return pos, src[start_pos:pos]
    if char == "'":
        return parse_literal_str(src, pos)
    if char == '"':
        return parse_one_line_basic_str(src, pos)
    raise suffixed_err(src, pos, "Invalid initial character for a key part")


def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
    pos += 1
    return parse_basic_str(src, pos, multiline=False)


def parse_array(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, list]:
    pos += 1
    array: list = []

    pos = skip_comments_and_array_ws(src, pos)
    if src.startswith("]", pos):
        return pos + 1, array
    while True:
        pos, val = parse_value(src, pos, parse_float)
        array.append(val)
        pos = skip_comments_and_array_ws(src, pos)

        c = src[pos : pos + 1]
        if c == "]":
            return pos + 1, array
        if c != ",":
            raise suffixed_err(src, pos, "Unclosed array")
        pos += 1

        pos = skip_comments_and_array_ws(src, pos)
        if src.startswith("]", pos):
            return pos + 1, array


def parse_inline_table(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, dict]:
    pos += 1
    nested_dict = NestedDict()
    flags = Flags()

    pos = skip_chars(src, pos, TOML_WS)
    if src.startswith("}", pos):
        return pos + 1, nested_dict.dict
    while True:
        pos, key, value = parse_key_value_pair(src, pos, parse_float)
        key_parent, key_stem = key[:-1], key[-1]
        if flags.is_(key, Flags.FROZEN):
            raise suffixed_err(src, pos, f"Cannot mutate immutable namespace {key}")
        try:
            nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
        except KeyError:
            raise suffixed_err(src, pos, "Cannot overwrite a value") from None
        if key_stem in nest:
            raise suffixed_err(src, pos, f"Duplicate inline table key {key_stem!r}")
        nest[key_stem] = value
        pos = skip_chars(src, pos, TOML_WS)
        c = src[pos : pos + 1]
        if c == "}":
            return pos + 1, nested_dict.dict
        if c != ",":
            raise suffixed_err(src, pos, "Unclosed inline table")
        if isinstance(value, (dict, list)):
            flags.set(key, Flags.FROZEN, recursive=True)
        pos += 1
        pos = skip_chars(src, pos, TOML_WS)


def parse_basic_str_escape(
    src: str, pos: Pos, *, multiline: bool = False
) -> tuple[Pos, str]:
    escape_id = src[pos : pos + 2]
    pos += 2
    if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
        # Skip whitespace until next non-whitespace character or end of
        # the doc. Error if non-whitespace is found before newline.
        if escape_id != "\\\n":
            pos = skip_chars(src, pos, TOML_WS)
            try:
                char = src[pos]
            except IndexError:
                return pos, ""
            if char != "\n":
                raise suffixed_err(src, pos, "Unescaped '\\' in a string")
            pos += 1
        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
        return pos, ""
    if escape_id == "\\u":
        return parse_hex_char(src, pos, 4)
    if escape_id == "\\U":
        return parse_hex_char(src, pos, 8)
    try:
        return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
    except KeyError:
        raise suffixed_err(src, pos, "Unescaped '\\' in a string") from None


def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
    return parse_basic_str_escape(src, pos, multiline=True)


def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
    hex_str = src[pos : pos + hex_len]
    if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
        raise suffixed_err(src, pos, "Invalid hex value")
    pos += hex_len
    hex_int = int(hex_str, 16)
    if not is_unicode_scalar_value(hex_int):
        raise suffixed_err(src, pos, "Escaped character is not a Unicode scalar value")
    return pos, chr(hex_int)


def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
    pos += 1  # Skip starting apostrophe
    start_pos = pos
    pos = skip_until(
        src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
    )
    return pos + 1, src[start_pos:pos]  # Skip ending apostrophe


def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
    pos += 3
    if src.startswith("\n", pos):
        pos += 1

    if literal:
        delim = "'"
        end_pos = skip_until(
            src,
            pos,
            "'''",
            error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
            error_on_eof=True,
        )
        result = src[pos:end_pos]
        pos = end_pos + 3
    else:
        delim = '"'
        pos, result = parse_basic_str(src, pos, multiline=True)

    # Add at maximum two extra apostrophes/quotes if the end sequence
    # is 4 or 5 chars long instead of just 3.
    if not src.startswith(delim, pos):
        return pos, result
    pos += 1
    if not src.startswith(delim, pos):
        return pos, result + delim
    pos += 1
    return pos, result + (delim * 2)


def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
    if multiline:
        error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
        parse_escapes = parse_basic_str_escape_multiline
    else:
        error_on = ILLEGAL_BASIC_STR_CHARS
        parse_escapes = parse_basic_str_escape
    result = ""
    start_pos = pos
    while True:
        try:
            char = src[pos]
        except IndexError:
            raise suffixed_err(src, pos, "Unterminated string") from None
        if char == '"':
            if not multiline:
                return pos + 1, result + src[start_pos:pos]
            if src.startswith('"""', pos):
                return pos + 3, result + src[start_pos:pos]
            pos += 1
            continue
        if char == "\\":
            result += src[start_pos:pos]
            pos, parsed_escape = parse_escapes(src, pos)
            result += parsed_escape
            start_pos = pos
            continue
        if char in error_on:
            raise suffixed_err(src, pos, f"Illegal character {char!r}")
        pos += 1


def parse_value(  # noqa: C901
    src: str, pos: Pos, parse_float: ParseFloat
) -> tuple[Pos, Any]:
    try:
        char: str | None = src[pos]
    except IndexError:
        char = None

    # IMPORTANT: order conditions based on speed of checking and likelihood

    # Basic strings
    if char == '"':
        if src.startswith('"""', pos):
            return parse_multiline_str(src, pos, literal=False)
        return parse_one_line_basic_str(src, pos)

    # Literal strings
    if char == "'":
        if src.startswith("'''", pos):
            return parse_multiline_str(src, pos, literal=True)
        return parse_literal_str(src, pos)

    # Booleans
    if char == "t":
        if src.startswith("true", pos):
            return pos + 4, True
    if char == "f":
        if src.startswith("false", pos):
            return pos + 5, False

    # Arrays
    if char == "[":
        return parse_array(src, pos, parse_float)

    # Inline tables
    if char == "{":
        return parse_inline_table(src, pos, parse_float)

    # Dates and times
    datetime_match = RE_DATETIME.match(src, pos)
    if datetime_match:
        try:
            datetime_obj = match_to_datetime(datetime_match)
        except ValueError as e:
            raise suffixed_err(src, pos, "Invalid date or datetime") from e
        return datetime_match.end(), datetime_obj
    localtime_match = RE_LOCALTIME.match(src, pos)
    if localtime_match:
        return localtime_match.end(), match_to_localtime(localtime_match)

    # Integers and "normal" floats.
    # The regex will greedily match any type starting with a decimal
    # char, so needs to be located after handling of dates and times.
    number_match = RE_NUMBER.match(src, pos)
    if number_match:
        return number_match.end(), match_to_number(number_match, parse_float)

    # Special floats
    first_three = src[pos : pos + 3]
    if first_three in {"inf", "nan"}:
        return pos + 3, parse_float(first_three)
    first_four = src[pos : pos + 4]
    if first_four in {"-inf", "+inf", "-nan", "+nan"}:
        return pos + 4, parse_float(first_four)

    raise suffixed_err(src, pos, "Invalid value")


def suffixed_err(src: str, pos: Pos, msg: str) -> TOMLDecodeError:
    """Return a `TOMLDecodeError` where error message is suffixed with
    coordinates in source."""

    def coord_repr(src: str, pos: Pos) -> str:
        if pos >= len(src):
            return "end of document"
        line = src.count("\n", 0, pos) + 1
        if line == 1:
            column = pos + 1
        else:
            column = pos - src.rindex("\n", 0, pos)
        return f"line {line}, column {column}"

    return TOMLDecodeError(f"{msg} (at {coord_repr(src, pos)})")


def is_unicode_scalar_value(codepoint: int) -> bool:
    return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)


def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
    """A decorator to make `parse_float` safe.

    `parse_float` must not return dicts or lists, because these types
    would be mixed with parsed TOML tables and arrays, thus confusing
    the parser. The returned decorated callable raises `ValueError`
    instead of returning illegal types.
    """
    # The default `float` callable never returns illegal types. Optimize it.
    if parse_float is float:  # type: ignore[comparison-overlap]
        return float

    def safe_parse_float(float_str: str) -> Any:
        float_value = parse_float(float_str)
        if isinstance(float_value, (dict, list)):
            raise ValueError("parse_float must not return dicts or lists")
        return float_value

    return safe_parse_float
python3.12/site-packages/setuptools/_vendor/tomli/__pycache__/_types.cpython-312.pyc000064400000000655151732704050024342 0ustar00�

��_i���:�ddlmZmZmZeegefZeedfZeZy)�)�Any�Callable�Tuple.N)	�typingrrr�str�
ParseFloat�Key�int�Pos����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/tomli/_types.py�<module>rs1��
(�'��s�e�S�j�
!�
��C��H�o��	�r
python3.12/site-packages/setuptools/_vendor/tomli/__pycache__/__init__.cpython-312.pyc000064400000000677151732704050024602 0ustar00�

��_i���.�dZdZddlmZmZmZee_y))�loads�load�TOMLDecodeErrorz2.0.1�)rrrN)�__all__�__version__�_parserrrr�__name__�
__module__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/tomli/__init__.py�<module>rs!��
/����1�1�&��rpython3.12/site-packages/setuptools/_vendor/tomli/__pycache__/_parser.cpython-312.pyc000064400000064522151732704050024475 0ustar00�

��_iiX�
�H�ddlmZddlmZddlZddlmZddlmZm	Z	m
Z
ddlmZm
Z
mZmZmZmZddlmZmZmZed	�ed
�D��eed��zZeed�z
Zeed
�z
ZeZeZeZed�Zeed�zZ eejBejDzdz�Z#e#ed�zZ$eejJ�Z&edddddddd��Z'Gd�de(�Z)e*d�d<d�Z+e*d�d=d�Z,Gd�d�Z-Gd�d �Z.Gd!�d"e
�Z/d>d#�Z0												d?d$�Z1d@d%�Z2d@d&�Z3dAd'�Z4dAd(�Z5												dBd)�Z6								dCd*�Z7dDd+�Z8dEd,�Z9dEd-�Z:dFd.�Z;dGd/�Z<d0d1�							dHd2�Z=dEd3�Z>dId4�Z?dEd5�Z@dJd6�ZAdHd7�ZB								dKd8�ZCdLd9�ZDdMd:�ZEdNd;�ZFy)O�)�annotations)�IterableN)�MappingProxyType)�Any�BinaryIO�
NamedTuple�)�RE_DATETIME�RE_LOCALTIME�	RE_NUMBER�match_to_datetime�match_to_localtime�match_to_number)�Key�
ParseFloat�Posc#�2K�|]}t|����y�w�N)�chr)�.0�is  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/tomli/_parser.py�	<genexpr>rs����1�y�!�s�1�v�y�s�� ��	z	
z 	�
z-_z"'���
�"�\)z\bz\tz\nz\fz\rz\"z\\c��eZdZdZy)�TOMLDecodeErrorz0An error raised if a document is not valid TOML.N)�__name__�
__module__�__qualname__�__doc__��rr$r$5s��:r*r$��parse_floatc��|j�}	|j�}t	||��S#t$r
td�d�wxYw)z%Parse TOML from a binary file object.zEFile must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`Nr+)�read�decode�AttributeError�	TypeError�loads)�__fpr,�b�ss    r�loadr69sP���	�	��A��
�H�H�J��
���,�,��	���S�
��	��s	�/�Ac��|jdd�}d}tt�t��}d}t	|�}	t||t�}	||}|dk(r|dz
}�#|tvr!t|||||�}t||t�}nr|dk(r[	||dz}|jj�|dk(rt|||�\}}nt|||�\}}t||t�}n|dk7r
t||d	��t||�}	||}|dk7r
t||d
��|dz
}��#t$rY|j j"SwxYw#t$rd}Y��wxYw#t$rY|j j"SwxYw)zParse TOML from a string.z
rrr)r	�[N�#zInvalid statementz5Expected newline or end of document after a statement)�replace�Output�
NestedDict�Flags�make_safe_parse_float�
skip_chars�TOML_WS�
IndexError�KEY_INITIAL_CHARS�key_value_rule�flags�finalize_pending�create_list_rule�create_dict_rule�suffixed_err�skip_comment�data�dict)�__sr,�src�pos�out�header�char�second_chars        rr2r2Es���
�+�+�f�d�
#�C�
�C�
���u�w�
'�C��F�'��4�K����c�7�+��	��s�8�D��4�<��1�H�C���$�$� ��c�3���D�C��S�#�w�/�C�
�S�[�
#�*-�c�A�g�,��
�I�I�&�&�(��c�!�.�s�C��=���V�.�s�C��=���V��S�#�w�/�C�
�S�[��s�C�)<�=�=��3��$��	��s�8�D��4�<���S�Q��
�	�q���a���	��F�8�8�=�=��I	���
#�"��
#��"�	���8�8�=�=��	�s6�D&�E
�	E�&	E�E�
E�E�	E<�;E<c�H�eZdZdZdZdZdd�Zdd�Zdd�Zd
d�Z	dd�Z
dd	�Zy
)r=z)Flags that map to parsed keys/namespaces.rr	c�0�i|_t�|_yr)�_flags�set�_pending_flags��selfs r�__init__zFlags.__init__�s��')���47�E��r*c�>�|jj||f�yr)rW�add�rY�key�flags   r�add_pendingzFlags.add_pending�s��������d��,r*c��|jD]\}}|j||d���|jj�y)NF��	recursive)rWrV�clearr]s   rrEzFlags.finalize_pending�s:���,�,�I�C���H�H�S�$�%�H�0�-����!�!�#r*c�v�|j}|ddD]}||vry||d}�|j|dd�y)N����nested)rU�pop)rYr^�cont�ks    r�	unset_allzFlags.unset_all�sG���{�{���S�b��A���}����7�8�$�D��	
����R��$�r*c��|j}|dd|d}}|D]'}||vrt�t�id�||<||d}�)||vrt�t�id�||<|||rdndj|�y)Nrf)rD�recursive_flagsrgrgrmrD)rUrVr\)rYr^r_rcri�
key_parent�key_stemrjs        rrVz	Flags.set�s����{�{��"�3�B�x��R��H�
��A���}�$'�E�c�e�r�R��Q����7�8�$�D���4��'*�u���RT�U�D��N��X��I�(�7�C�G�G��Mr*c��|sy|j}|ddD]}||vry||}||dvry|d}�|d}||vr||}||dvxs||dvSy)NFrfrmTrgrD)rU)rYr^r_rirj�
inner_contros       r�is_z	Flags.is_�s������{�{���S�b��A���}���a��J��z�"3�4�4���h�'�D�
��r�7���t����>�D��4��=�(�K�D�D�9J�4K�,K�K�r*N��return�None)r^rr_�intrtru�r^rrtru)r^rr_rvrc�boolrtru)r^rr_rvrtrx)r%r&r'r(�FROZEN�
EXPLICIT_NESTrZr`rErkrVrrr)r*rr=r=�s2��3��F��M�:�-�$�
 �	N�r*r=c�4�eZdZdd�Zdd�					dd�Zd	d�Zy)
r<c��i|_yr)rKrXs rrZzNestedDict.__init__�s	��$&��	r*T��access_listsc��|j}|D]B}||vri||<||}|rt|t�r|d}t|t�r�9td��|S)Nrfz There is no nest behind this key)rK�
isinstance�list�KeyError)rYr^r~rirjs     r�get_or_create_nestzNestedDict.get_or_create_nest�sb���I�I���A���}���Q����7�D��
�4�� 6��B�x���d�D�)��A�B�B���r*c��|j|dd�}|d}||vr2||}t|t�std��|j	i�yig||<y)Nrfz/An object other than list found behind this key)r�r�r�r��append)rYr^ri�last_key�list_s     r�append_nest_to_listzNestedDict.append_nest_to_list�s_���&�&�s�3�B�x�0���r�7���t����N�E��e�T�*��P�Q�Q��L�L��� �T�D��Nr*Nrs)r^rr~rxrtrKrw)r%r&r'rZr�r�r)r*rr<r<�s2��'�"�	�
���	�

��"	"r*r<c�"�eZdZUded<ded<y)r;r<rJr=rDN)r%r&r'�__annotations__r)r*rr;r;�s
��
���Lr*r;c�P�	|||vr
|dz
}|||vr�
|S#t$rY|SwxYw)Nr	)rA)rMrN�charss   rr?r?�sJ��
��#�h�%���1�H�C��#�h�%���J���
���J�
�s��	%�%c��	|j||�}|j	|||�s'|||vr
|dz
}|||vr�
t||d||����|S#t$r!t|�}|rt||d|���d�Y�fwxYw)Nz	Expected r	zFound invalid character )�index�
ValueError�lenrH�
isdisjoint)rMrN�expect�error_on�error_on_eof�new_poss      r�
skip_untilr��s���O��)�)�F�C�(�����s�3�w�/�0��#�h�h�&��1�H�C��#�h�h�&��3��'?��C��|�%L�M�M��N���O��c�(����s�G�y��
�-C�D�$�N��O�s�A�'A;�:A;c�l�	||}|dk(rt||dzdtd��S|S#t$rd}Y�+wxYw)Nr9r	rF�r�r�)rAr��ILLEGAL_COMMENT_CHARS)rMrNrQs   rrIrIsS����s�8���s�{����q��$�)>�U�
�	
��J��
�����s�%�3�3c�R�	|}t||t�}t||�}||k(r|S�'r)r?�TOML_WS_AND_NEWLINErI)rMrN�pos_before_skips   r�skip_comments_and_array_wsr�s7��
�����c�#6�7���3��$���/�!��J�r*c�(�|dz
}t||t�}t||�\}}|jj	|t
j�s*|jj	|t
j�rt||d|�d���|jj|t
jd��	|jj|�|jd|�s
t||d��|dz|fS#t$rt||d�d�wxYw)	Nr	zCannot declare z twiceFrb�Cannot overwrite a value�]z.Expected ']' at the end of a table declaration)r?r@�	parse_keyrDrrr=rzryrHrVrJr�r��
startswith�rMrNrOr^s    rrGrGs����1�H�C�
�S�#�w�
'�C���c�"�H�C��
�y�y�}�}�S�%�-�-�.�#�)�)�-�-��U�\�\�2R��3���s�e�6�%B�C�C��I�I�M�M�#�u�*�*�e�M�<�K����#�#�C�(��>�>�#�s�#��3��%U�V�V���7�C�<����K��3��%?�@�d�J�K�s�8C9�9Dc��|dz
}t||t�}t||�\}}|jj	|t
j�rt||d|����|jj|�|jj|t
jd��	|jj|�|jd|�s
t||d��|dz|fS#t$rt||d�d�wxYw)N��"Cannot mutate immutable namespace Frbr�z]]z0Expected ']]' at the end of an array declaration)r?r@r�rDrrr=ryrHrkrVrzrJr�r�r�r�s    rrFrF.s����1�H�C�
�S�#�w�
'�C���c�"�H�C��
�y�y�}�}�S�%�,�,�'��3��'I�#��%O�P�P��I�I������I�I�M�M�#�u�*�*�e�M�<�K����$�$�S�)��>�>�$��$��3��%W�X�X���7�C�<����K��3��%?�@�d�J�K�s�(C)�)Dc����t|||�\}�}�dd�d}}�|z}��fd�tdt���D�}	|	D]f}
|jj	|
t
j�rt||d|
����|jj|
t
j��h|jj	|t
j�rt||d|����	|jj|�}||vr
t||d��t|ttf�r/|jj!��zt
jd��|||<|S#t$rt||d�d�wxYw)	Nrfc3�.�K�|]}��d|z���y�wrr))rrrPr^s  ��rrz!key_value_rule.<locals>.<genexpr>Js�����L�9K�A�v��B�Q��/�9K�s�r	zCannot redefine namespace r�r�Trb)�parse_key_value_pair�ranger�rDrrr=rzrHr`ryrJr�r�r�rKr�rV)
rMrNrOrPr,�valuernro�abs_key_parent�relative_path_cont_keys�cont_key�nestr^s
   `        @rrCrCCsi���+�3��[�A�O�C��e��s��8�S��W��J��j�(�N�L��q�#�c�(�9K�L��+���9�9�=�=��5�#6�#6�7��s�C�+E�h�Z�)P�Q�Q�	�	�	���h��(;�(;�<�
,��y�y�}�}�^�U�\�\�2����:�>�:J�K�
�	
�K��x�x�*�*�>�:���4���3��%?�@�@��%�$���&��	�	�
�
�f�s�l�E�L�L�D�
�A��D��N��J���K��3��%?�@�d�J�K�s�(E � E8c���t||�\}}	||}|dk7r
t||d��|dz
}t||t�}t|||�\}}|||fS#t$rd}Y�JwxYw)N�=z,Expected '=' after a key in a key/value pairr	)r�rArHr?r@�parse_value)rMrNr,r^rQr�s      rr�r�es�����c�"�H�C����s�8���s�{��3��%S�T�T��1�H�C�
�S�#�w�
'�C��S�#�{�3�J�C����U�?��������s�A�A!� A!c��t||�\}}|f}t||t�}		||}|dk7r||fS|dz
}t||t�}t||�\}}||fz
}t||t�}�L#t$rd}Y�SwxYw)N�.r	)�parse_key_partr?r@rA)rMrN�key_partr^rQs     rr�r�us���"�3��,�M�C���{�C�
�S�#�w�
'�C�
�	�"�3�x�D��3�;���8�O��q�����c�7�+��&�s�C�0�
��X���{�����c�7�+�����	��D�	�s�A1�1A?�>A?c���	||}|tvr|}t||t�}||||fS|dk(rt||�S|dk(rt	||�St||d��#t$rd}Y�^wxYw)N�'r!z(Invalid initial character for a key part)rA�BARE_KEY_CHARSr?�parse_literal_str�parse_one_line_basic_strrH)rMrNrQ�	start_poss    rr�r��s�����s�8���~���	���c�>�2���C�	�#�&�&�&��s�{� ��c�*�*��s�{�'��S�1�1�
�s�C�!K�
L�L�������s�A�A&�%A&c�(�|dz
}t||d��S)Nr	F��	multiline)�parse_basic_str�rMrNs  rr�r��s���1�H�C��3��u�5�5r*c�X�|dz
}g}t||�}|jd|�r|dz|fS	t|||�\}}|j|�t||�}|||dz}|dk(r|dz|fS|dk7r
t	||d��|dz
}t||�}|jd|�r|dz|fS�~)Nr	r��,zUnclosed array)r�r�r�r�rH)rMrNr,�array�val�cs      r�parse_arrayr��s����1�H�C��E�
$�S�#�
.�C�
�~�~�c�3���Q�w��~��
��s�C��5���S�
���S��(��c�2����c�A�g�����8���7�E�>�!���8��s�C�)9�:�:��q���(��c�2���>�>�#�s�#���7�E�>�!�r*c���|dz
}t�}t�}t||t�}|j	d|�r|dz|j
fS	t
|||�\}}}|dd|d}}|j|tj�rt||d|����	|j|d��}	||	vrt||d	|����||	|<t||t�}|||dz}
|
dk(r|dz|j
fS|
d
k7r
t||d��t|t
tf�r"|j|tjd��|dz
}t||t�}��	#t$rt||d�d�wxYw)
Nr	�}Trfr�Fr}r�zDuplicate inline table key r�zUnclosed inline tablerb)r<r=r?r@r�rKr�rrryrHr�r�r�r�rV)rMrNr,�nested_dictrDr^r�rnror�r�s           r�parse_inline_tabler��s����1�H�C��,�K��G�E�
�S�#�w�
'�C�
�~�~�c�3���Q�w��(�(�(�(�
�.�s�C��E���S�%�"�3�B�x��R��H�
��9�9�S�%�,�,�'��s�C�+M�c�U�)S�T�T�	O��1�1�*�5�1�Q�D��t���s�C�+F�x�l�)S�T�T���X����c�7�+����c�A�g�����8���7�K�,�,�,�,���8��s�C�)@�A�A��e�d�D�\�*��I�I�c�5�<�<�4�I�8��q�����c�7�+��+���	O��s�C�)C�D�$�N�	O�s�E�E0Fr�c�t�|||dz}|dz
}|rL|dvrH|dk7r.t||t�}	||}|dk7r
t||d��|dz
}t||t�}|dfS|dk(r
t||d	�S|d
k(r
t||d�S	|t|fS#t$r|dfcYSwxYw#t$rt||d�d�wxYw)Nr�>�\	�\ �\
r��rzUnescaped '\' in a stringr	z\u�z\U�)r?r@rArHr��parse_hex_char�BASIC_STR_ESCAPE_REPLACEMENTSr�)rMrNr��	escape_idrQs     r�parse_basic_str_escaper��s���C�#��'�"�I��1�H�C��Y�"9�9�����S�#�w�/�C�
��3�x���t�|�"�3��-I�J�J��1�H�C���c�#6�7���B�w���E���c�3��*�*��E���c�3��*�*�M��1�)�<�<�<���
��B�w��
���M��3��%A�B��L�M�s�B�
B�
B�B�B7c��t||d��S)NTr�)r�r�s  r� parse_basic_str_escape_multiliner��s��!�#�s�d�;�;r*c���||||z}t|�|k7stj|�s
t||d��||z
}t	|d�}t|�s
t||d��|t
|�fS)NzInvalid hex value�z/Escaped character is not a Unicode scalar value)r��HEXDIGIT_CHARS�
issupersetrHrv�is_unicode_scalar_valuer)rMrN�hex_len�hex_str�hex_ints     rr�r��sw���#��g�
�&�G�
�7�|�w��n�&?�&?��&H��3��%8�9�9��7�N�C��'�2��G�"�7�+��3��%V�W�W���G���r*c�L�|dz
}|}t||dtd��}|dz|||fS)Nr	r�Tr�)r��ILLEGAL_LITERAL_STR_CHARS)rMrNr�s   rr�r�s>���1�H�C��I�
��S�#� 9���C���7�C�	�#�&�&�&r*c�,�|dz
}|jd|�r|dz
}|r!d}t||dtd��}|||}|dz}nd}t||d�	�\}}|j||�s||fS|dz
}|j||�s|||zfS|dz
}|||d
zzfS)N�rr	r��'''Tr�r!r�r�)r�r��#ILLEGAL_MULTILINE_LITERAL_STR_CHARSr�)rMrN�literal�delim�end_pos�results      r�parse_multiline_strr�	s����1�H�C�
�~�~�d�C� ��q����������8��
���S��!����k����%�c�3�$�?���V��>�>�%��%��F�{���1�H�C��>�>�%��%��F�U�N�"�"��1�H�C���%�!�)�$�$�$r*c�l�|r
t}t}nt}t}d}|}		||}|dk(r4|s
|dz||||zfS|j
d|�r
|dz||||zfS|dz
}�@|dk(r||||z
}|||�\}}||z
}|}�a||vrt||d|����|dz
}�z#t$rt||d�d�wxYw)	Nr�zUnterminated stringr!r	�"""r�r"zIllegal character )�!ILLEGAL_MULTILINE_BASIC_STR_CHARSr��ILLEGAL_BASIC_STR_CHARSr�rArHr�)	rMrNr�r��
parse_escapesr�r�rQ�
parsed_escapes	         rr�r�(s���4��8�
�*��.�
�
�F��I�
�	J��s�8�D��3�;���Q�w���Y�s�);� ;�;�;��~�~�e�S�)��Q�w���Y�s�);� ;�;�;��1�H�C���4�<��c�)�C�(�(�F�!.�s�C�!8��C���m�#�F��I���8���s�C�+=�d�X�)F�G�G��q���)���	J��s�C�)>�?�T�I�	J�s�B�B3c��	||}|dk(r,|jd|�rt||d��St||�S|dk(r,|jd|�rt||d��St	||�S|dk(r|jd	|�r|d
zdfS|dk(r|jd|�r|d
zdfS|dk(r
t|||�S|dk(r
t
|||�Stj||�}|r	t|�}|j�|fStj||�}|r|j�t|�fStj||�}|r|j�t!||�fS|||dz}	|	dvr
|dz||	�fS|||d
z}
|
dvr
|d
z||
�fSt||d��#t$rd}Y���wxYw#t$r}t||d�|�d}~wwxYw)Nr!r�F)r�r�r�T�t�truer��f�false�r8�{zInvalid date or datetimer�>�inf�nan>�+inf�+nan�-inf�-nanz
Invalid value)rAr�r�r�r�r�r�r
�matchr
r�rH�endrrrr)rMrNr,rQ�datetime_match�datetime_obj�e�localtime_match�number_match�first_three�
first_fours           rr�r�Hs1����s�8���s�{��>�>�%��%�&�s�C��?�?�'��S�1�1��s�{��>�>�%��%�&�s�C��>�>� ��c�*�*��s�{��>�>�&�#�&���7�D�=� ��s�{��>�>�'�3�'���7�E�>�!��s�{��3��[�1�1��s�{�!�#�s�K�8�8�!�&�&�s�C�0�N��	L�,�^�<�L��!�!�#�\�1�1�"�(�(��c�2�O���"�"�$�&8��&I�I�I�
�?�?�3��,�L�����!�?�<��#M�M�M��c�C�!�G�$�K��n�$��Q�w��K�0�0�0��S�3��7�#�J��5�5��Q�w��J�/�/�/�
�s�C��
1�1��y������L�	L��s�C�)C�D�!�K��	L�s)�F%�"F7�%F4�3F4�7	G�G�Gc�:�dd�}t|�d|||��d��S)zZReturn a `TOMLDecodeError` where error message is suffixed with
    coordinates in source.c��|t|�k\ry|jdd|�dz}|dk(r|dz}n||jdd|�z
}d|�d|��S)Nzend of documentrrr	zline z	, column )r��count�rindex)rMrN�line�columns    r�
coord_reprz suffixed_err.<locals>.coord_repr�sa���#�c�(�?�$��y�y��q�#�&��*���1�9��1�W�F��3�:�:�d�A�s�3�3�F��t�f�I�f�X�.�.r*z (at �))rM�strrNrrtr)r$)rMrN�msgrs    rrHrH�s)��/��c�U�%�
�3��(<�'=�Q�?�@�@r*c�F�d|cxkxrdkncxsd|cxkxrdkScS)Nri��i�i��r))�	codepoints rr�r��s'��
��#�e�#�G��)�)F�w�)F�G�)F�Gr*c�0���turtSd�fd�}|S)a%A decorator to make `parse_float` safe.

    `parse_float` must not return dicts or lists, because these types
    would be mixed with parsed TOML tables and arrays, thus confusing
    the parser. The returned decorated callable raises `ValueError`
    instead of returning illegal types.
    c�Z���|�}t|ttf�rtd��|S)Nz*parse_float must not return dicts or lists)r�rKr�r�)�	float_str�float_valuer,s  �r�safe_parse_floatz/make_safe_parse_float.<locals>.safe_parse_float�s-���!�)�,���k�D�$�<�0��I�J�J��r*)rrrtr)�float)r,rs` rr>r>�s����e������r*)r3rr,rrt�dict[str, Any])rLrr,rrtr)rMrrNrr�z
Iterable[str]rtr)rMrrNrr�rr�zfrozenset[str]r�rxrtr)rMrrNrrtr)rMrrNrrOr;rt�tuple[Pos, Key])rMrrNrrOr;rPrr,rrtr)rMrrNrr,rrtztuple[Pos, Key, Any])rMrrNrrtr)rMrrNrrt�tuple[Pos, str])rMrrNrr,rrtztuple[Pos, list])rMrrNrr,rrtztuple[Pos, dict])rMrrNrr�rxrtr)rMrrNrr�rvrtr)rMrrNrr�rxrtr)rMrrNrr,rrtztuple[Pos, Any])rMrrNrrrrtr$)rrvrtrx)r,rrtr)G�
__future__r�collections.abcr�string�typesr�typingrrr�_rer
rrr
rr�_typesrrr�	frozensetr�r�
ASCII_CTRLr�r�r�r�r�r@r��
ascii_letters�digitsr�rB�	hexdigitsr�r�r�r$rr6r2r=r<r;r?r�rIr�rGrFrCr�r�r�r�r�r�r�r�r�r�r�r�r�rHr�r>r)r*r�<module>r)s���
#�$�
�"�,�,���)�(�
�1�u�R�y�1�
1�I�c�#�h�4G�
G�
�%�y���6��$.��6�1B�$B�!�3��&G�#�/��
�E�
���	�$��/���6�/�/�&�-�-�?�$�F�G��"�Y�u�%5�5���6�+�+�,�� 0���������
!��;�j�;�7<�	-�27�?�D7�7�t"�"�D�Z��
��	��	��
��
���
�	��,	���$�*�	����#��-0��?I����D
�	�
��
�%/�
��
� ,�$
M� 6�
"�0,�B.3�M�	�M��M�&*�M��M�:<��'�%�>�@A2�	�A2��A2�%/�A2��A2�HA�"H�r*python3.12/site-packages/setuptools/_vendor/tomli/__pycache__/_re.cpython-312.pyc000064400000007603151732704050023604 0ustar00�

��_i��<�ddlmZddlmZmZmZmZmZmZddlm	Z	ddl
Z
ddlmZddl
mZdZe
j d	e
j"�
�Ze
j e�Ze
j de�d�e
j"�
�Zdd
�Ze	d��dd��Zdd�Zdd�Zy)�)�annotations)�date�datetime�time�	timedelta�timezone�tzinfo)�	lru_cacheN)�Any�)�
ParseFloatzE([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.([0-9]{1,6})[0-9]*)?a`
0
(?:
    x[0-9A-Fa-f](?:_?[0-9A-Fa-f])*   # hex
    |
    b[01](?:_?[01])*                 # bin
    |
    o[0-7](?:_?[0-7])*               # oct
)
|
[+-]?(?:0|[1-9](?:_?[0-9])*)         # dec, integer part
(?P<floatpart>
    (?:\.[0-9](?:_?[0-9])*)?         # optional fractional part
    (?:[eE][+-]?[0-9](?:_?[0-9])*)?  # optional exponent part
)
)�flagsz`
([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])  # date, e.g. 1988-10-27
(?:
    [Tt ]
    zR
    (?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))?  # optional time offset
)?
c��|j�\}}}}}}}}}	}
}t|�t|�t|�}}
}|�
t||
|�St|�t|�t|�}}}|rt|jdd��nd}|	rt	|
||	�}n|rt
j}nd}t||
||||||��S)z�Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.

    Raises ValueError if the match does not correspond to a valid date
    or datetime.
    N��0r)r	)�groups�intr�ljust�	cached_tzr�utcr)�match�year_str�	month_str�day_str�hour_str�
minute_str�sec_str�
micros_str�	zulu_time�offset_sign_str�offset_hour_str�offset_minute_str�year�month�day�hour�minute�sec�micros�tzs                    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/tomli/_re.py�match_to_datetimer,4s���$	�����������������8�}�c�)�n�c�'�l��%�D����D�%��%�%��H�
�s�:���G��#�&�D�.8�S��!�!�!�S�)�
*�a�F��%��.��
��
�
�\�\��
���D�%��d�F�C���K�K�)�maxsizec	�p�|dk(rdnd}tt|t|�z|t|�z���S)N�+r���)�hours�minutes)rrr)rr�sign_str�signs    r+rrWs<���C��1�R�D�����X��&��3�z�?�*�	
��r-c��|j�\}}}}|rt|jdd��nd}tt|�t|�t|�|�S)Nrrr)rrrr)rrrrrr)s      r+�match_to_localtimer7bsN��05����-�H�j�'�:�.8�S��!�!�!�S�)�
*�a�F���H�
�s�:���G��f�E�Er-c��|jd�r||j��St|j�d�S)N�	floatpartr)�groupr)r�parse_floats  r+�match_to_numberr<hs2���{�{�;���5�;�;�=�)�)��u�{�{�}�a� � r-)r�re.Match�returnzdatetime | date)r�strrr?r4r?r>r)rr=r>r)rr=r;r
r>r)�
__future__rrrrrrr	�	functoolsr
�re�typingr�_typesr
�_TIME_RE_STR�compile�VERBOSE�	RE_NUMBER�RE_LOCALTIME�RE_DATETIMEr,rr7r<�r-r+�<module>rLs���
#�F�F��	���
X���B�J�J�� 
�*�*�#
�	�&�r�z�z�,�'���b�j�j�
��N��	�
�*�*�
�� L�F�4�����F�!r-python3.12/site-packages/setuptools/_vendor/tomli/_re.py000064400000005577151732704050017253 0ustar00# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

from __future__ import annotations

from datetime import date, datetime, time, timedelta, timezone, tzinfo
from functools import lru_cache
import re
from typing import Any

from ._types import ParseFloat

# E.g.
# - 00:32:00.999999
# - 00:32:00
_TIME_RE_STR = r"([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.([0-9]{1,6})[0-9]*)?"

RE_NUMBER = re.compile(
    r"""
0
(?:
    x[0-9A-Fa-f](?:_?[0-9A-Fa-f])*   # hex
    |
    b[01](?:_?[01])*                 # bin
    |
    o[0-7](?:_?[0-7])*               # oct
)
|
[+-]?(?:0|[1-9](?:_?[0-9])*)         # dec, integer part
(?P<floatpart>
    (?:\.[0-9](?:_?[0-9])*)?         # optional fractional part
    (?:[eE][+-]?[0-9](?:_?[0-9])*)?  # optional exponent part
)
""",
    flags=re.VERBOSE,
)
RE_LOCALTIME = re.compile(_TIME_RE_STR)
RE_DATETIME = re.compile(
    rf"""
([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])  # date, e.g. 1988-10-27
(?:
    [Tt ]
    {_TIME_RE_STR}
    (?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))?  # optional time offset
)?
""",
    flags=re.VERBOSE,
)


def match_to_datetime(match: re.Match) -> datetime | date:
    """Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.

    Raises ValueError if the match does not correspond to a valid date
    or datetime.
    """
    (
        year_str,
        month_str,
        day_str,
        hour_str,
        minute_str,
        sec_str,
        micros_str,
        zulu_time,
        offset_sign_str,
        offset_hour_str,
        offset_minute_str,
    ) = match.groups()
    year, month, day = int(year_str), int(month_str), int(day_str)
    if hour_str is None:
        return date(year, month, day)
    hour, minute, sec = int(hour_str), int(minute_str), int(sec_str)
    micros = int(micros_str.ljust(6, "0")) if micros_str else 0
    if offset_sign_str:
        tz: tzinfo | None = cached_tz(
            offset_hour_str, offset_minute_str, offset_sign_str
        )
    elif zulu_time:
        tz = timezone.utc
    else:  # local date-time
        tz = None
    return datetime(year, month, day, hour, minute, sec, micros, tzinfo=tz)


@lru_cache(maxsize=None)
def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
    sign = 1 if sign_str == "+" else -1
    return timezone(
        timedelta(
            hours=sign * int(hour_str),
            minutes=sign * int(minute_str),
        )
    )


def match_to_localtime(match: re.Match) -> time:
    hour_str, minute_str, sec_str, micros_str = match.groups()
    micros = int(micros_str.ljust(6, "0")) if micros_str else 0
    return time(int(hour_str), int(minute_str), int(sec_str), micros)


def match_to_number(match: re.Match, parse_float: ParseFloat) -> Any:
    if match.group("floatpart"):
        return parse_float(match.group())
    return int(match.group(), 0)
python3.12/site-packages/setuptools/_vendor/tomli/__init__.py000064400000000614151732704050020230 0ustar00# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

__all__ = ("loads", "load", "TOMLDecodeError")
__version__ = "2.0.1"  # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT

from ._parser import TOMLDecodeError, load, loads

# Pretend this exception was created here.
TOMLDecodeError.__module__ = __name__
python3.12/site-packages/setuptools/_vendor/tomli/py.typed000064400000000032151732704050017610 0ustar00# Marker file for PEP 561
python3.12/site-packages/setuptools/_vendor/tomli/_types.py000064400000000376151732704050020001 0ustar00# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

from typing import Any, Callable, Tuple

# Type annotations
ParseFloat = Callable[[str], Any]
Key = Tuple[str, ...]
Pos = int
python3.12/site-packages/setuptools/_vendor/__pycache__/__init__.cpython-312.pyc000064400000000365151732704050023450 0ustar00�

��_i���y)N�r���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/__init__.py�<module>rs�rpython3.12/site-packages/setuptools/_vendor/__pycache__/zipp.cpython-312.pyc000064400000035050151732704050022672 0ustar00�

��_i� ���ddlZddlZddlZddlZddlZddlZddlZejdkrddlm	Z	ne
Z	dgZd�Zd�Z
e	jZ	d�ZGd�d	ej"�ZGd
�de�Zd�ZGd
�d�Zy)�N)��)�OrderedDict�Pathc�B�tjt|�dd�S)a2
    Given a path with elements separated by
    posixpath.sep, generate all parents of that path.

    >>> list(_parents('b/d'))
    ['b']
    >>> list(_parents('/b/d/'))
    ['/b']
    >>> list(_parents('b/d/f/'))
    ['b/d', 'b']
    >>> list(_parents('b'))
    []
    >>> list(_parents(''))
    []
    �N)�	itertools�islice�	_ancestry��paths ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/zipp.py�_parentsrs�� ���I�d�O�Q��5�5�c#��K�|jtj�}|rH|tjk7r4|��tj|�\}}|r|tjk7r�2yyyy�w)aR
    Given a path with elements separated by
    posixpath.sep, generate all elements of that path

    >>> list(_ancestry('b/d'))
    ['b/d', 'b']
    >>> list(_ancestry('/b/d/'))
    ['/b/d', '/b']
    >>> list(_ancestry('b/d/f/'))
    ['b/d/f', 'b/d', 'b']
    >>> list(_ancestry('b'))
    ['b']
    >>> list(_ancestry(''))
    []
    N)�rstrip�	posixpath�sep�split)r
�tails  rrr%sV���� �;�;�y�}�}�%�D�
�4�9�=�=�(��
��_�_�T�*�
��d��4�9�=�=�(�$�(�$�s�A&A-�)A-c�T�tjt|�j|�S)zZ
    Return items in minuend not in subtrahend, retaining order
    with O(1) lookup.
    )r	�filterfalse�set�__contains__)�minuend�
subtrahends  r�_differencer?s!��
� � ��Z��!=�!=�w�G�Grc�N��eZdZdZed��Z�fd�Zd�Zd�Ze	d��Z
�xZS)�CompleteDirszk
    A ZipFile subclass that ensures that implied directories
    are always included in the namelist.
    c��tjjtt|��}d�|D�}tt
||��S)Nc3�BK�|]}|tjz���y�w�N)rr)�.0�ps  r�	<genexpr>z-CompleteDirs._implied_dirs.<locals>.<genexpr>Ps����6�g��1�y�}�}�$�g�s�)r	�chain�
from_iterable�mapr�_deduper)�names�parents�as_dirss   r�
_implied_dirszCompleteDirs._implied_dirsMs9���/�/�/�/��H�e�0D�E��6�g�6���{�7�E�2�3�3rc�b��tt|��}|t|j	|��zSr")�superr�namelist�listr-)�selfr*�	__class__s  �rr0zCompleteDirs.namelistSs-����l�D�2�4���t�D�.�.�u�5�6�6�6rc�4�t|j��Sr")rr0�r2s r�	_name_setzCompleteDirs._name_setWs���4�=�=�?�#�#rc�L�|j�}|dz}||vxr||v}|r|S|S)zx
        If the name represents a directory, return that name
        as a directory (with the trailing slash).
        �/)r6)r2�namer*�dirname�	dir_matchs     r�resolve_dirzCompleteDirs.resolve_dirZs:��
��� ����*����%�:�'�U�*:�	�#�w�-��-rc��t|t�r|St|tj�s|t	|��Sd|j
vrt}||_|S)zl
        Given a source (filename or zipfile), return an
        appropriate CompleteDirs subclass.
        �r)�
isinstancer�zipfile�ZipFile�_pathlib_compat�moder3)�cls�sources  r�makezCompleteDirs.makedsQ���f�l�+��M��&�'�/�/�2���v�.�/�/��f�k�k�!��C�����
r)�__name__�
__module__�__qualname__�__doc__�staticmethodr-r0r6r<�classmethodrF�
__classcell__�r3s@rrrGs?����
�4��4�
7�$�.����rrc�,��eZdZdZ�fd�Z�fd�Z�xZS)�
FastLookupzV
    ZipFile subclass to ensure implicit
    dirs exist and are resolved rapidly.
    c���tjt�5|jcddd�S#1swYnxYwtt
|��|_|jSr")�
contextlib�suppress�AttributeError�_FastLookup__namesr/rPr0�r2r3s �rr0zFastLookup.namelist~s?���
�
 �
 ��
0��<�<�1�
0�
0���Z��7�9����|�|���1�:c���tjt�5|jcddd�S#1swYnxYwtt
|��|_|jSr")rRrSrT�_FastLookup__lookupr/rPr6rVs �rr6zFastLookup._name_set�s?���
�
 �
 ��
0��=�=�1�
0�
0���j�$�9�;��
��}�}�rW)rGrHrIrJr0r6rMrNs@rrPrPxs����
��rrPc�X�	|j�S#t$rt|�cYSwxYw)zi
    For path-like objects, convert to a filename for compatibility
    on Python 3.6.1 and earlier.
    )�
__fspath__rT�strrs rrBrB�s-��
���� � �����4�y���s��)�)c���eZdZdZdZdd�Zddd�d�Zed��Zed��Z	ed	��Z
ed
��Zed��Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZeZed��Zy)ru4
    A pathlib-compatible interface for zip files.

    Consider a zip file with this structure::

        .
        ├── a.txt
        └── b
            ├── c.txt
            └── d
                └── e.txt

    >>> data = io.BytesIO()
    >>> zf = zipfile.ZipFile(data, 'w')
    >>> zf.writestr('a.txt', 'content of a')
    >>> zf.writestr('b/c.txt', 'content of c')
    >>> zf.writestr('b/d/e.txt', 'content of e')
    >>> zf.filename = 'mem/abcde.zip'

    Path accepts the zipfile object itself or a filename

    >>> root = Path(zf)

    From there, several path operations are available.

    Directory iteration (including the zip file itself):

    >>> a, b = root.iterdir()
    >>> a
    Path('mem/abcde.zip', 'a.txt')
    >>> b
    Path('mem/abcde.zip', 'b/')

    name property:

    >>> b.name
    'b'

    join with divide operator:

    >>> c = b / 'c.txt'
    >>> c
    Path('mem/abcde.zip', 'b/c.txt')
    >>> c.name
    'c.txt'

    Read text:

    >>> c.read_text()
    'content of c'

    existence:

    >>> c.exists()
    True
    >>> (b / 'missing.txt').exists()
    False

    Coercion to string:

    >>> import os
    >>> str(c).replace(os.sep, posixpath.sep)
    'mem/abcde.zip/b/c.txt'

    At the root, ``name``, ``filename``, and ``parent``
    resolve to the zipfile. Note these attributes are not
    valid and will raise a ``ValueError`` if the zipfile
    has no filename.

    >>> root.name
    'abcde.zip'
    >>> str(root.filename).replace(os.sep, posixpath.sep)
    'mem/abcde.zip'
    >>> str(root.parent)
    'mem'
    z>{self.__class__.__name__}({self.root.filename!r}, {self.at!r})c�F�tj|�|_||_y)aX
        Construct a Path from a ZipFile or filename.

        Note: When the source is an existing ZipFile object,
        its type (__class__) will be mutated to a
        specialized type. If the caller wishes to retain the
        original type, the caller should either create a
        separate ZipFile object or pass a filename.
        N)rPrF�root�at)r2r_r`s   r�__init__z
Path.__init__�s���O�O�D�)��	���rN��pwdc�.�|j�rt|��|d}|j�s|dk(rt|��|jj|j||��}d|vr|s|rtd��|Stj|g|��i|��S)z�
        Open this entry as text or binary following the semantics
        of ``pathlib.Path.open()`` by passing arguments through
        to io.TextIOWrapper().
        rr>rb�bz*encoding args invalid for binary operation)
�is_dir�IsADirectoryError�exists�FileNotFoundErrorr_�openr`�
ValueError�io�
TextIOWrapper)r2rCrc�args�kwargs�zip_mode�streams       rrjz	Path.open�s����;�;�=�#�D�)�)���7���{�{�}��S��#�D�)�)����������s��;���$�;��v� �!M�N�N��M�����8��8��8�8rc��tj|j�jxs|jjSr")�pathlibrr`r9�filenamer5s rr9z	Path.name�*���|�|�D�G�G�$�)�)�?�T�]�]�-?�-?�?rc��tj|j�jxs|jjSr")rsrr`�suffixrtr5s rrwzPath.suffix	s*���|�|�D�G�G�$�+�+�C�t�}�}�/C�/C�Crc��tj|j�jxs|jjSr")rsrr`�suffixesrtr5s rryz
Path.suffixes
s*���|�|�D�G�G�$�-�-�G����1G�1G�Grc��tj|j�jxs|jjSr")rsrr`�stemrtr5s rr{z	Path.stemrurc��tj|jj�j	|j
�Sr")rsrr_rt�joinpathr`r5s rrtz
Path.filenames*���|�|�D�I�I�.�.�/�8�8����A�Arc�z�|jdg|��i|��5}|j�cddd�S#1swYyxYw)Nr>�rj�read)r2rnro�strms    r�	read_textzPath.read_texts1��
�T�Y�Y�s�
,�T�
,�V�
,���9�9�;�-�
,�
,�s�1�:c�p�|jd�5}|j�cddd�S#1swYyxYw)N�rbr)r2r�s  r�
read_byteszPath.read_bytess"��
�Y�Y�t�_���9�9�;��_�_�s�,�5c��tj|jjd��|jjd�k(S�Nr8)rr:r`r)r2r
s  r�	_is_childzPath._is_child!s2��� � �������!4�5�������9L�L�Lrc�:�|j|j|�Sr")r3r_)r2r`s  r�_nextz
Path._next$s���~�~�d�i�i��,�,rc�V�|jxs|jjd�Sr�)r`�endswithr5s rrfzPath.is_dir's"���7�7�{�3�d�g�g�.�.�s�3�3rc�H�|j�xr|j�Sr")rhrfr5s r�is_filezPath.is_file*s���{�{�}�2�T�[�[�]�!2�2rc�N�|j|jj�vSr")r`r_r6r5s rrhzPath.exists-s���w�w�$�)�)�-�-�/�/�/rc��|j�std��t|j|jj��}t
|j|�S)NzCan't listdir a file)rfrkr(r�r_r0�filterr�)r2�subss  r�iterdirzPath.iterdir0sE���{�{�}��3�4�4��4�:�:�t�y�y�1�1�3�4���d�n�n�d�+�+rc�j�tj|jj|j�Sr")r�joinr_rtr`r5s r�__str__zPath.__str__6s!���~�~�d�i�i�0�0�$�'�'�:�:rc�:�|jj|��S)Nr5)�_Path__repr�formatr5s r�__repr__z
Path.__repr__9s���{�{�!�!�t�!�,�,rc��tj|jgtt|����}|j|jj|��Sr")rr�r`r(rBr�r_r<)r2�other�nexts   rr}z
Path.joinpath<s>���~�~�d�g�g�D��O�U�(C�D���z�z�$�)�)�/�/��5�6�6rc���|js|jjStj|jjd��}|r|dz
}|j
|�Sr�)r`rt�parentrr:rr�)r2�	parent_ats  rr�zPath.parentBsR���w�w��=�=�'�'�'��%�%�d�g�g�n�n�S�&9�:�	�����I��z�z�)�$�$r)�)r>)rGrHrIrJr�rarj�propertyr9rwryr{rtr�r�r�r�rfr�rhr�r�r�r}�__truediv__r��rrrr�s���K�ZN�F��9��9�$�@��@��D��D��H��H��@��@��B��B���M�-�4�3�0�,�;�-�7��K�
�%��%r)rlrr@r	rR�sysrs�version_info�collectionsr�dict�__all__rr�fromkeysr)rrArrPrBrr�rr�<module>r�s���	�����
�����f��'��K��(��6�&+�,�
�
��/�H�.�7�?�?�.�b���&�s%�s%rpython3.12/site-packages/setuptools/_vendor/__pycache__/typing_extensions.cpython-312.pyc000064400000277546151732704050025523 0ustar00�

��_imT��h�ddlZddlZddlZddlZddlZddlZejdddk\ZereZ	nddlm	Z	m
Z
d�Zd�Zgd�Z
ere
jgd��eed	�r
ej Zn Gd
�dej"d�
�Zed�
�Zej&d�Zej&d�Zej&d�Zej&dd��Zej&dd��Zej2Zeed�rejdddk\r
ej4ZnTejdddk\r"Gd�dej6d�
�Zedd��Zn Gd�dej"d�
�Zed�
�Zeed�r
ej<Znd�Zd �Zeed!�r
ej@Z nTejdddk\r"Gd"�d#ej6d�
�Z!e!d!d$��Z n Gd%�d&ej"d�
�Z"e"d�
�Z ejFZ#ejHZ$ejJZ%Gd'�d(e	�Z&ejNZ'ejPZ(ejRZ)ejTZ*eed)�r
ejVZ+n0Gd*�d)ejXejZee&ejX�+�Z+ej\Z.eed,�r
ej^Z/ndd-l0m1Z2Gd.�d,ejfe�Z/ejhZ4eed/�r
ejjZ5nmdejddcxkrd0kr#nn ejlejjeef�Z5n2Gd1�d/ejjejneefe&ejj�+�Z5eed2�r
ejpZ8n2Gd3�d2ejpejree:fe&ejp�+�Z8eed4�r
ejvZ;n;eed4�r2Gd5�d4ejvejneefe&ejv�+�Z;eed6�r
ejxZ<n5Gd7�d6e*eejfeefe&ejjx�+�Z<ejzZ=ej|Z>ej~Z?d8�Z@gd9�ZAd:�ZBd;�ZCeed<�r
ej�ZDnOer+dd=lmEZEd>�ZFGd?�d@ej��ZHGdA�d<eH�B�ZDn"ddClmIZImJZJdD�ZFGdE�d@e	�ZHGdF�d<eH�B�ZDeedG�r
ej�ZKndH�ZKeKZLeedI�r
ej�ZMneKGdJ�dIeD��ZMejdKk\r
ej�ZNn>dL�ZOdM�ZPdNeP_QddO�dP�ZRdQeR_QGdR�dSe�ZSeSdTeTfi�ZNeUeN_VdUeN_WeedV�r%ej�ZXej�ZYej�ZZnOer)GdW�dXej�d�
�ZZGdY�dV�ZXdZ�Z\d�d[�ZYn$d\�Z]Gd]�d^ej�Z^Gd_�dVe^�B�ZXejddd`k\rej�Z_ej�Z`ner	ddalmaZa	ddblmcZcdc�Z_dd�Z`eede�r
ej�Zdn�ejdddfk\r Gdg�dhej6d�
�Zeeedi��Zdnjejdddk\r"Gdj�dhej6d�
�Zeeededk��Zdn6Gdl�dmej��ZgGdn�doej"egd�p�Zhehd�
�Zdeedq�rej�Ziej�Zjn Gdr�ds�ZkGdt�dqek�ZiGdu�dvek�Zjeedw�r
ej�ZlnGdx�dwem�Zleedy�sGdz�d{em�Znej�d|��Zpeedy�rej�Zqej�Znn�ejdddfk\r	eed}��Zqnjejdddk\r"Gd~�dej6d�
�Zrerdyd���Zqn6Gd��d�ej��ZsGd��d�ej"esd�p�Ztetd�
�Zqeed��r
ej�Zun�ejdddfk\r Gd��d�ej6d�
�Zvevd���ZunTejdddk\r"Gd��d�ej6d�
�Zvevd�d���Zun Gd��d�ej"d�
�Zwewd�
�Zueed��r
ej�ZxnRejdddk\r Gd��d�ej:d�
�Zed���Zxn Gd��d�ej"d�
�Zyeyd�
�Zxeed��rej�Zzej�Z{yejdddfk\r(Gd��d�ej6d�
�Z|e|d���Zze|d���Z{yejdddk\r,Gd��d�ej6d�
�Z}e}d�d���Zze}d�d���Z{yGd��d�ej"d�
�Z~Gd��d�e~d�
�ZGd��d�e~d�
�Z�ed�
�Zze�d�
�Z{y#eb$rej�ZaY���wxYw#eb$rej�ZcY���wxYw)��N�)r�r)�GenericMeta�
_type_varsc�\�t|�}d|vr|dD]}|j|d��|S)N�	__slots__)�dict�pop)�dct�	dict_copy�slots   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/typing_extensions.py�_no_slots_copyrs6���S�	�I��i���k�*�D��M�M�$��%�+���c
��|jst|�d���t|�}t|j�}||k7rtd||kDrdnd�d|�d|�d|����y)Nz is not a generic classzToo �many�fewz arguments for z	; actual z, expected )�__parameters__�	TypeError�len)�cls�
parameters�alen�elens    r�_check_genericrs|������3�%�6�7�8�8��z�?�D��s�!�!�"�D��t�|��$����v�%�@��PS�u�U#�#'�&��D�6�;�<�	<�r)!�ClassVar�Concatenate�Final�	ParamSpec�Self�Type�	Awaitable�
AsyncIterator�
AsyncIterable�	Coroutine�AsyncGenerator�AsyncContextManager�ChainMap�ContextManager�Counter�Deque�DefaultDict�OrderedDict�	TypedDict�
SupportsIndex�	Annotated�final�IntVar�Literal�NewType�overload�Protocol�runtime�runtime_checkable�Text�	TypeAlias�	TypeGuard�
TYPE_CHECKING)�get_args�
get_origin�get_type_hints�NoReturnc� �eZdZdZdZd�Zd�Zy)�	_NoReturna7Special type indicating functions that never return.
        Example::

          from typing import NoReturn

          def stop() -> NoReturn:
              raise Exception('no way')

        This type is invalid in other positions, e.g., ``List[NoReturn]``
        will fail in static type checkers.
        �c��td��)Nz*NoReturn cannot be used with isinstance().�r��self�objs  r�__instancecheck__z_NoReturn.__instancecheck__m����H�I�Irc��td��)Nz*NoReturn cannot be used with issubclass().rE�rGrs  r�__subclasscheck__z_NoReturn.__subclasscheck__prJrN��__name__�
__module__�__qualname__�__doc__rrIrMrCrrrBrB_s��
	��	�	J�	JrrBT��_root�T�KT�VT�T_co)�	covariant�T_contra)�
contravariantr�)rrc��eZdZd�Zd�Zy)�
_FinalFormc� �d|jzS�Nztyping_extensions.��_name�rGs r�__repr__z_FinalForm.__repr__����'�$�*�*�4�4rc�v�tj||j�d��}tj||f�S)N� accepts only single type��typing�_type_checkrb�
_GenericAlias�rGr�items   r�__getitem__z_FinalForm.__getitem__�s9���%�%�j�)-����4M�&N�P�D��'�'��t�g�6�6rN�rOrPrQrdrnrCrrr^r^����	5�	7rr^aWA special typing construct to indicate that a name
                       cannot be re-assigned or overridden in a subclass.
                       For example:

                           MAX_SIZE: Final = 9000
                           MAX_SIZE += 1  # Error reported by type checker

                           class Connection:
                               TIMEOUT: Final[int] = 10
                           class FastConnector(Connection):
                               TIMEOUT = 1  # Error reported by type checker

                       There is no runtime checking of these properties.)�docc�F��eZdZdZdZd	d�Zd�Zd�Z�fd�Zd�Z	d�Z
�xZS)
�_Finala�A special typing construct to indicate that a name
        cannot be re-assigned or overridden in a subclass.
        For example:

            MAX_SIZE: Final = 9000
            MAX_SIZE += 1  # Error reported by type checker

            class Connection:
                TIMEOUT: Final[int] = 10
            class FastConnector(Connection):
                TIMEOUT = 1  # Error reported by type checker

        There is no runtime checking of these properties.
        ��__type__c��||_y�Nrt�rG�tp�kwdss   r�__init__z_Final.__init__��	���D�Mrc���t|�}|j�.|tj||jdd�d��d��St|jdd�d���)N�� accepts only single type.TrS� cannot be further subscripted��typerurirjrOr�rGrmrs   rrnz_Final.__getitem__�sm���t�*�C��}�}�$��6�-�-�d�!�l�l�1�2�.�/�/I�J�L�!%�'�'��s�|�|�A�B�/�0�0N�O�P�Prc��tj|j||�}||jk(r|St|�|d��S�NTrS�ri�
_eval_typerur��rG�globalns�localns�new_tps    rr�z_Final._eval_type��>���&�&�t�}�}�h��H�F�����&����4��:�f�D�1�1rc���t�|��}|j�&|dtj|j��d�z
}|S�N�[�]��superrdruri�
_type_repr�rG�r�	__class__s  �rrdz_Final.__repr__��B����� �"�A��}�}�(��q��*�*�4�=�=�9�:�!�<�<���Hrc�V�tt|�j|jf�Srw��hashr�rOrurcs r�__hash__z_Final.__hash__�� ����d��,�,�d�m�m�<�=�=rc��t|t�stS|j�|j|jk(S||uSrw)�
isinstancers�NotImplementedru�rG�others  r�__eq__z
_Final.__eq__�s9���e�V�,�%�%��}�}�(��}�}����6�6��5�=� rrw�rOrPrQrRrr{rnr�rdr�r��
__classcell__�r�s@rrsrs�s.���
	�"�	�	�	Q�	2�	�	>�	!rrsr1c��|S)auThis decorator can be used to indicate to type checkers that
        the decorated method cannot be overridden, and decorated class
        cannot be subclassed. For example:

            class Base:
                @final
                def done(self) -> None:
                    ...
            class Sub(Base):
                def done(self) -> None:  # Error reported by type checker
                    ...
            @final
            class Leaf:
                ...
            class Other(Leaf):  # Error reported by type checker
                ...

        There is no runtime checking of these properties.
        rC)�fs rr1r1�s	��(�rc�,�tj|�Srw)ri�TypeVar��names rr2r2�s���>�>�$��rr3c��eZdZd�Zd�Zy)�_LiteralFormc� �d|jzSr`rarcs rrdz_LiteralForm.__repr__�rerc�.�tj||�Srw)rirk�rGrs  rrnz_LiteralForm.__getitem__�s���'�'��j�9�9rNrorCrrr�r��s��	5�	:rr�aoA type that can be used to indicate to type checkers
                           that the corresponding value has a value literally equivalent
                           to the provided parameter. For example:

                               var: Literal[4] = 4

                           The type checker understands that 'var' is literally equal to
                           the value 4 and no other value.

                           Literal[...] cannot be subclassed. There is no runtime
                           checking verifying that the parameter is actually a value
                           instead of a type.c�F��eZdZdZdZd	d�Zd�Zd�Z�fd�Zd�Z	d�Z
�xZS)
�_Literala�A type that can be used to indicate to type checkers that the
        corresponding value has a value literally equivalent to the
        provided parameter. For example:

            var: Literal[4] = 4

        The type checker understands that 'var' is literally equal to the
        value 4 and no other value.

        Literal[...] cannot be subclassed. There is no runtime checking
        verifying that the parameter is actually a value instead of a type.
        ��
__values__c��||_yrwr�)rG�valuesrzs   rr{z_Literal.__init__!�	��$�D�Orc��t|�}|j�t|t�s|f}||d��St	|j
dd�d���)NTrSr~r�)r�r�r��tuplerrO)rGr�rs   rrnz_Literal.__getitem__$sR���t�*�C����&�!�&�%�0�$�Y�F��6��.�.��s�|�|�A�B�/�0�0N�O�P�Prc��|SrwrC)rGr�r�s   rr�z_Literal._eval_type,����Krc���t�|��}|j�:|ddjt	t
j|j���d�z
}|S)Nr��, r�)r�rdr��join�maprir�r�s  �rrdz_Literal.__repr__/sM����� �"�A����*��q����3�v�'8�'8�$�/�/�#J�K�L�A�N�N���Hrc�V�tt|�j|jf�Srw)r�r�rOr�rcs rr�z_Literal.__hash__5s ����d��,�,�d�o�o�>�?�?rc��t|t�stS|j�|j|jk(S||uSrw)r�r�r�r�r�s  rr�z_Literal.__eq__8s;���e�X�.�%�%����*����%�*:�*:�:�:��5�=� rrwr�r�s@rr�r�s/���	�$�	�	%�	Q�	�	�	@�	!rr�c���eZdZ�fd�Z�xZS)�_ExtensionsGenericMetac���|j�0tjd�jddvrt	d��y|j
st�|�|�S|j
j|�}|tur|S|j
|jvry|j
j�D]!}t|t�r�t||�s�!yy)a*This mimics a more modern GenericMeta.__subclasscheck__() logic
        (that does not have problems with recursion) to work around interactions
        between collections, typing, and typing_extensions on older
        versions of Python, see https://github.com/python/typing/issues/501.
        r~rO��abc�	functools�CParameterized generics cannot be used with class or instance checksFT)�
__origin__�sys�	_getframe�	f_globalsr�	__extra__r�rM�__subclasshook__r��__mro__�__subclasses__r�r�
issubclass)rG�subclass�res�sclsr�s    �rrMz(_ExtensionsGenericMeta.__subclasscheck__Ns�����?�?�&��}�}�Q��)�)�*�5�=Q�Q��!5�6�6���~�~��7�,�X�6�6��n�n�-�-�h�7���n�$��J��>�>�X�-�-�-���N�N�1�1�3�D��$��,���(�D�)��	4�
r)rOrPrQrMr�r�s@rr�r�Ms
����rr�r+c��eZdZdZd�Zy)r+rCc��|jturtj|i|��St	j
tj|g|��i|��Srw)�_gorgr+�collections�dequeri�_generic_new�r�argsrzs   r�__new__z
Deque.__new__wsG���y�y�E�!�"�(�(�$�7�$�7�7��&�&�{�'8�'8�#�M��M��M�MrN�rOrPrQrr�rCrrr+r+rs���	�	Nr)�	metaclass�extrar')�_check_methodsc�J�eZdZdZd�Zejd��Zed��Z	y)r'rCc��K�|S�wrwrCrcs r�
__aenter__zAsyncContextManager.__aenter__�s�����K�s�c��K�y�wrwrC)rG�exc_type�	exc_value�	tracebacks    r�	__aexit__zAsyncContextManager.__aexit__�s	�����s�c�8�|tur
t|dd�StS)Nr�r�)r'�_check_methods_in_mror�)r�Cs  rr�z$AsyncContextManager.__subclasshook__�s ���)�)�,�Q��k�J�J�!�!rN)
rOrPrQrr�r��abstractmethodr��classmethodr�rCrrr'r'�s:���	�	�

�	�	�	�
�	�
�	"�
�	"rr-)rrr\c��eZdZdZd�Zy)r-rCc��|jturtj|i|��Stjtj|g|��i|��Srw)r�r-r�rir�r�s   rr�zOrderedDict.__new__�sG���y�y�K�'�"�.�.��=��=�=��&�&�{�'>�'>��S�d�S�d�S�SrNr�rCrrr-r-�s���	�	Trr*c��eZdZdZd�Zy)r*rCc��|jturtj|i|��Stjtj|g|��i|��Srw)r�r*r�rir�r�s   rr�zCounter.__new__�sG���y�y�G�#�"�*�*�D�9�D�9�9��&�&�{�':�':�C�O�$�O�$�O�OrNr�rCrrr*r*�s���	�	Prr(c��eZdZdZd�Zy)r(rCc��|jturtj|i|��Stjtj|g|��i|��Srw)r�r(r�rir�r�s   rr�zChainMap.__new__�sG���y�y�H�$�"�+�+�T�:�T�:�:��&�&�{�';�';�S�P�4�P�4�P�PrNr�rCrrr(r(�s���	�	Qrr&c��eZdZdZy)r&rCN)rOrPrQrrCrrr&r&�s	���	rc��t|t�sJ�t|d�r|jS|j�|j}|j��|S)z@This function exists for compatibility with old typing versions.r�)r�r�hasattrr�r��rs rr�r��sJ���c�;�'�'�'��s�G���y�y��

�.�.�
$��n�n���.�.�
$��Jr)
�Callabler"�Iterable�Iteratorr$r#�Hashable�Sized�	Container�
Collection�
Reversibler)r'c�N�t�}|jddD]�}|jdvr�t|di�}t	|j
j
��t	|j
��zD]*}|jd�r�|dvs�|j|��,��|S)N���)r6�Generic�__annotations__�_abc_)�__abstractmethods__r�__weakref__�_is_protocol�_is_runtime_protocol�__dict__�__args__r�__next_in_mro__rr��__orig_bases__r��
__tree_hash__rRr�r{r�rP�_MutableMapping__markerr�)	�setr�rO�getattr�listr
�keys�
startswith�add)r�attrs�base�annotations�attrs     r�_get_protocol_attrsr�s����E�E����C�R� ���=�=�3�3���d�$5�r�:������+�+�-�.��k�6F�6F�6H�1I�I�D��O�O�G�,��>F�2F��	�	�$��J�	!��Lrc�>��t�fd�t��D��S)Nc3�J�K�|]}tt�|d�����y�wrw)�callabler)�.0rrs  �r�	<genexpr>z,_is_callable_members_only.<locals>.<genexpr>�s"�����W�>V�d�x���T�4�0�1�>V��� #)�allrr�s`r�_is_callable_members_onlyr"�s����W�>Q�RU�>V�W�W�Wrr6)�_collect_type_varsc�D�t|�jrtd��y�Nz Protocols cannot be instantiated�r�rr�rGr��kwargss   r�_no_initr)� ����:�"�"��>�?�?�#rc���eZdZ�fd�Z�xZS)�
_ProtocolMetac������t�dd�rt��rt�j��ry�jrt��fd�t
��D��ryt���!��S)NrFTc3��K�|]9}t�|�xr'tt�|d��xst�|�du���;y�wrw�r�rr)rrr�instances  ��rrz2_ProtocolMeta.__instancecheck__.<locals>.<genexpr>sV�����=�$<�4��x��.�=�$�W�S�$��%=�>�>�<���$�/�t�;�=�$<���?A)	rr"r�r�rr!rr�rI)rr0r�s``�rrIz_ProtocolMeta.__instancecheck__sf����S�.�%�8�*�3�/��x�1�1�3�7������=�$7�s�#;�=�=� ��7�,�X�6�6r)rOrPrQrIr�r�s@rr,r,	s
���
	7�
	7rr,c�T��eZdZdZdZdZ�fd�Zejd��Z	d�Z
�xZS)r6a�Base class for protocol classes. Protocol classes are defined as::

            class Proto(Protocol):
                def meth(self) -> int:
                    ...

        Such classes are primarily used with static type checkers that recognize
        structural subtyping (static duck-typing), for example::

            class C:
                def meth(self) -> int:
                    return 0

            def func(x: Proto) -> int:
                return x.meth()

            func(C())  # Passes static type check

        See PEP 544 for details. Protocol classes decorated with
        @typing_extensions.runtime act as simple-minded runtime protocol that checks
        only the presence of given attributes, ignoring their type signatures.

        Protocol classes can be generic, they are defined as::

            class GenProto(Protocol[T]):
                def meth(self) -> T:
                    ...
        rCTc�H��|turtd��t�|�
|�S)NzIType Protocol cannot be instantiated; it can only be used as a base class)r6rr�r�)rr�rzr�s   �rr�zProtocol.__new__>s.����h���!F�G�G��7�?�3�'�'rc�0��t|t�s|f}|s+|tjurt	d|j
�d���d�t�fd�|D��}|tur�td�|D��sYd}t||tj�r#|dz
}t||tj�r�#t	d|dz�d	||����tt|��t|�k7rt	d
��t||�tj||�S)N�Parameter list to �[...] cannot be empty�*Parameters to generic types must be types.c3�J�K�|]}tj|�����y�wrw�rirj�r�p�msgs  �rrz-Protocol.__class_getitem__.<locals>.<genexpr>Ls�����F�v�!�6�-�-�a��5�v�r c3�PK�|]}t|tj���� y�wrw�r�rir��rr;s  rrz-Protocol.__class_getitem__.<locals>.<genexpr>O�����I�&�Q�:�a����8�&���$&rr~zBParameters to Protocol[...] must all be type variables. Parameter z is z.Parameters to Protocol[...] must all be unique)
r�r�ri�TuplerrQr6r!r�rrrrk)r�params�ir<s   @r�__class_getitem__zProtocol.__class_getitem__Ds����f�e�,� ����c����5��(��)9�)9�(:�:O�P�R�R�>�C��F�v�F�F�F��h���I�&�I�I��A�$�V�A�Y����?��Q���%�V�A�Y����?�#�&�&'�!�e�W�D�����=�>�>��s�6�{�#�s�6�{�2�#�H�J�J��s�F�+��'�'��V�4�4rc	�����g}d�jvrtj�jv}ntj�jv}|rtd��d�jvr�t
�j�}d}�jD]o}t|tj�s�|jtjtfvs�A|jj}|�td��|j}�q|�|}ndt|�}t|��|�ksGdj�fd�|D��}	djd�|D��}
td|	�d�d	|
�d
���|}t|��_�jj!dd�s!t#d��jD���_�fd
�}d�jvr|�_�j$sy�jD]p}|t(tjfvr�|j*dk(r|jt,vr�>t|t.�r
|j$r�[tdt1|�����t2�_y)Nr
�!Cannot inherit from plain GenericzECannot inherit from Generic[...] and/or Protocol[...] multiple types.r�c3�>�K�|]}|�vs�t|����y�wrw��str�r�t�gvarsets  �rrz-Protocol.__init_subclass__.<locals>.<genexpr>~������*U�5�a�A�W�DT�3�q�6�5���	�c3�2K�|]}t|����y�wrwrI�r�gs  rrz-Protocol.__init_subclass__.<locals>.<genexpr>�����*A�5�a�3�q�6�5����Some type variables (�) are not listed in r�r�rc3�,K�|]}|tu���y�wrw)r6�r�bs  rrz-Protocol.__init_subclass__.<locals>.<genexpr>�s����&L�m��q�H�}�m���c����jjdd�stSt�dd�s5t	j
d�jddvrtStd��t��s5t	j
d�jddvrtStd��t|t�std	��t��D]�}|jD]w}||jvr|j|�
tccS�;t|d
i�}t|tj�s�T||vs�Yt|t�s�j|j s�w��tcSy)Nrr	Fr\rOr��BInstance and class checks can only be used with @runtime protocols�<Protocols with non-method members don't support issubclass()�"issubclass() arg 1 must be a classrT)r
�getr�rr�r�r�rr"r�r�rr�ri�Mappingr,r�r�rrrrs    �r�_proto_hookz/Protocol.__init_subclass__.<locals>._proto_hook�s>����|�|�'�'���=�)�)��s�$:�E�B��}�}�Q�'�1�1�*�=�AU�U�-�-�#�%:�;�;�0��5��}�}�Q�'�1�1�*�=�AU�U�-�-�#�%B�C�C�!�%��.�#�$H�I�I�/��4�D� %�
�
���4�=�=�0�#�}�}�T�2�:�'5� 5�!�&-�d�4E�r�&J��&�{�F�N�N�C� $�� 3� *�5�-� @� %� 2� 2�!�!.� .�-�5�rr��collections.abc�5Protocols can only inherit from other protocols, got )r
rirr
�	__bases__rr#r�rkr�r6rOrrr�r�r_�anyrr��objectrP�_PROTO_WHITELISTr,�reprr)r{)
rr�r(�tvars�error�gvarsr�the_base�tvarset�s_vars�s_argsrbrMs
`           @r�__init_subclass__zProtocol.__init_subclass__^s5����E��3�<�<�/����#�*<�*<�<�����#�-�-�7���� C�D�D��3�<�<�/�*�3�+=�+=�>�����.�.�D�"�4��)=�)=�>� �O�O�����/I�I�#'�?�?�#;�#;�� �,�"+�!H�#I�I�!%� 3� 3��/��=�!�E�!�%�j�G�!�%�j�G�"�g�-�!%���*U�5�*U�!U��!%���*A�5�*A�!A��'�*?��x�H:�:B��1�V�H�A�)O�P�P�!�E�!&�u��C���<�<�#�#�N�D�9�#&�&L�c�m�m�&L�#L�� �
�>"����5�'2��$��#�#���
�
������� 8�8����+<�<��
�
�)9�9�"�4��7�D�<M�<M�#�%7�7;�D�z�l�%D�E�E�&�$�C�Lr)rOrPrQrRrrr�ri�	_tp_cacherErqr�r�s@rr6r6s9���	�8�	���	(�
�	�	�	5�
�	5�2Z	$r)r�)�_next_in_mrorjc�D�t|�jrtd��yr%r&r's   rr)r)�r*rc�h��eZdZdZ	d�fd�	Z�fd�Z�fd�Z�fd�Zejd��Z
�xZS)r,z�Internal metaclass for Protocol.

        This exists so Protocol classes can be generic without deriving
        from Generic.
        c		�����|�J�|�|�J�td�|D���sJ|��t|�}d}	|D]l}
|
tjurt	d��t|
t�s�1|
jtjtfvs�T|	�t	d��|
j}	�n|	�|}	nzt|�}t|	��|�ks]dj�fd�|D��}djd�|	D��}
td�|D��rdnd	}t	d
|�d|�d|
�d
���|	}|}|�%t|�tjur
||vr|f|z}t!d�|D��}td�|D��rt!d�|D��}|j#||d��t$t|�O||||d��}t$t|�Sd|s|n
t+|��||_	|rt!d�|D��nd|_t/|�|_|�||_n$|�"|j4|_|j6|_t9|d�r2|rt;|j=��nt$t|��|_ |S)Nc3�PK�|]}t|tj���� y�wrwr>)rrLs  rrz(_ProtocolMeta.__new__.<locals>.<genexpr>�s����H�%�Q�:�a����8�%�rArGzACannot inherit from Generic[...] or Protocol[...] multiple times.r�c3�>�K�|]}|�vs�t|����y�wrwrIrKs  �rrz(_ProtocolMeta.__new__.<locals>.<genexpr>�rNrOc3�2K�|]}t|����y�wrwrIrQs  rrz(_ProtocolMeta.__new__.<locals>.<genexpr>�rSrTc3�TK�|] }|jtju���"y�wrw)r�rirrXs  rrz(_ProtocolMeta.__new__.<locals>.<genexpr>�s&����4D�=B��56�L�L�F�N�N�4R�=B�s�&(rr6rUrVr�r�c3�VK�|]!}t|t�rt|�n|���#y�wrw)r�rr�rXs  rrz(_ProtocolMeta.__new__.<locals>.<genexpr>�s*����*�#(�a�'1��K�&@�%��(�a�G�#(�s�')c3�dK�|](}t|t�xr|tju���*y�wrw)r�rrirrXs  rrz(_ProtocolMeta.__new__.<locals>.<genexpr>�s+����Y�SX�a�:�a��-�I�!�6�>�>�2I�I�SX�s�.0c3�FK�|]}|tjus�|���y�wrw)rirrXs  rrz(_ProtocolMeta.__new__.<locals>.<genexpr>�s����J��A�!�6�>�>�2I�a��s�!�!)r�r�TrSr�c3�pK�|].}|tjurdn|tjurdn|���0y�w).rCN)ri�_TypingEllipsis�_TypingEmpty�r�as  rrz(_ProtocolMeta.__new__.<locals>.<genexpr>�s=����"3�-1��*+�f�.D�.D�)D�#�()�V�-@�-@�(@�"�"#�#$�-1�s�46�
_subs_tree)!r!rrirrr�rr�r6rrr�rfr�r��ABCMetar��updater�r��__setattr__r�rrsrr
�
_abc_registry�
_abc_cacher�r�r�r�r)rr��bases�	namespacerjr��originr��
orig_basesrlrrnrorp�cls_name�
initial_basesrGrMr�s                 @�rr�z_ProtocolMeta.__new__�s�����=� �=�� ��)�)�)��H�%�H�H�O�%�O�H�"�5�)����!�D��v�~�~�-�'�(K�L�L�"�4��5� �O�O�����/I�I� �,�"+�!A�#B�B�!%� 3� 3��"��=�!�E�!�%�j�G�!�%�j�G�"�g�-�!%���*U�5�*U�!U��!%���*A�5�*A�!A��03�4D�=B�4D�1D�9�IS�!�'�*?��x�H:�:B��1�V�H�A�)O�P�P�!�E�!�M��!�d�5�k�S�[�[�&@���&���5�(���*�#(�*�*�E��Y�SX�Y�Y��J��J�J�����F��G�H���c�2�3��e�Y�9=�3�?�D��+�t�0��=C��16�v��
@�#(�D��7;�"�"3�-1�"3�3�@D�
�M�$0��#5�D� ��!�&3��#��#�%+�%9�%9��"�"(�"3�"3����t�\�*�AG�d�4�?�?�+<�&=�&+�K��&G�&I��"��Krc�v���t���|i|���jjdd�s!t	d��j
D���_�jrĉjddD]�}|ttjfvr�|jdk(r|jtvr�>t|tj�r
|jr�et|t �r|j"tjur��t%dt'|�����t(�_�fd�}d�jvr|�_yy)Nrc3�xK�|]2}|tuxs$t|t�xr|jtu���4y�wrw)r6r�r,r�rXs  rrz)_ProtocolMeta.__init__.<locals>.<genexpr>
sH����'?�1>�1�()�H�}�(@�'1�!�]�'C�(@�'(�|�|�x�'?�(@�1>�s�8:r~rcrdc����jjdd�stSt|t�std��t
��D]�}|jD]w}||jvr|j|�
tccS�;t|di�}t|tj�s�T||vs�Yt|t�s�j|js�w��tcSy)Nrr^rT)
r
r_r�r�r�rrr�rrir`r,rras    �rrbz+_ProtocolMeta.__init__.<locals>._proto_hooks�����|�|�'�'���=�)�)�!�%��.�#�$H�I�I�/��4�D� %�
�
���4�=�=�0�#�}�}�T�2�:�'5� 5�!�&-�d�4E�r�&J��&�{�F�N�N�C� $�� 3� *�5�-� @� %� 2� 2�!�!.� .�-�5�rr�)r�r{r
r_rfrerr�rgrirrPrOrhr��
TypingMetarr�rrir)r�)rr�r(rrbr�s`    �rr{z_ProtocolMeta.__init__s����G��d�-�f�-��<�<�#�#�N�D�9�#&�'?�14�
�
�'?�$?�� �����K�K���O�D� �V�V�^�^�$<�<� �O�O�/@�@� �M�M�-=�=�&�t�V�->�->�?�D�DU�DU�&�t�[�9� �O�O�v�~�~�=�'�+;�;?��:�,�)H�I�I�,� (���
�*"����5�'2��$�6rc������t�dd�rt��rt�j��ry�jrt��fd�t
��D��rytt��'��S)NrFTc3��K�|]9}t�|�xr'tt�|d��xst�|�du���;y�wrwr/)rrr0rGs  ��rrz2_ProtocolMeta.__instancecheck__.<locals>.<genexpr>;sV�����?�%>�D��x��.�>�%�g�d�D�$�&?�@�@�=� ��4�0��<�>�%>�r1)
rr"r�r�rr!rr�rrI)rGr0r�s``�rrIz_ProtocolMeta.__instancecheck__3sh����T�>�5�9�-�d�3��x�1�1�4�8��� � ��?�%8��$=�?�?� ���d�=�h�G�Grc�D��|j�0tjd�jddvrt	d��y|j
j
dd�rL|j
j
dd�s0tjd�jddvryt	d	��|j
j
dd�rMt|�sBtjd�jddvrtt|�+|�St	d
��tt|�+|�S)Nr~rOr�r�Frr	�r�r�rir\r])r�r�r�r�rr
r_r"r�rrM)rGrr�s  �rrMz_ProtocolMeta.__subclasscheck__Bs������*��=�=��#�-�-�j�9�AU�U�#�%9�:�:���
�
�!�!�.�$�7��
�
�)�)�*@�$�G��=�=��#�-�-�j�9�>H�H�!��!6�7�7��
�
�!�!�"8�$�?�1�$�7��=�=��#�-�-�j�9�>H�H�!��d�E�c�J�J��!>�?�?���d�=�c�B�Brc
���t|t�s|f}|s4t|�tjurtd|j�d���d�t�fd�|D��}|tjtfvrgtd�|D��stdt|��d���tt|��t|�k7rtdt|��d���|}|}n�|tjtjfvrt|�}|}nR|jtjtfvrtd	t|�����t!||�t|�}|}|j�|fnd
}|j#|j$||j&zt)|j*�||||j,|j.��S)Nr5r6r7c3�6�K�|]}t|�����y�wrw)rjr:s  �rrz,_ProtocolMeta.__getitem__.<locals>.<genexpr>ds�����?��1�;�q�#�.��s�c3�PK�|]}t|tj���� y�wrwr>r?s  rrz,_ProtocolMeta.__getitem__.<locals>.<genexpr>fr@rAzParameters to z [...] must all be type variablesz[...] must all be uniquez%Cannot subscript already-subscripted rC)rjr�r�r�r�)r�r�r�rirBrrQrr6r!rirrr�rr�rr�rOrerr
r�r
)rGrCrjr��prependr<s     @rrnz_ProtocolMeta.__getitem__Zs�����f�e�,� ����e�D�k����=��(��):�):�(;�;P�Q�S�S�>�C��?��?�?�F������1�1��I�&�I�I�#�(��d���4T�U�W�W��s�6�{�#�s�6�{�2�#�(��d���4L�M�O�O������&�,�,����8�8�"�6�*�������V�^�^�X�$>�>��"G��T�
�|� T�U�U��t�V�,�"�6�*����!%���!8�t�g�b�G��>�>�$�-�-�")�D�N�N�":�"0����"?�(-�'+�)-�(,���-1�-@�-@�"�B�
Br)NNNNN)rOrPrQrRr�r{rIrMrirrrnr�r�s@rr,r,�sC���	�PT�>	�@*	3�X
	H�	C�0
�	�	�%	B�
�%	Brc��eZdZdZdZdZd�Zy)r6a�Base class for protocol classes. Protocol classes are defined as::

          class Proto(Protocol):
              def meth(self) -> int:
                  ...

        Such classes are primarily used with static type checkers that recognize
        structural subtyping (static duck-typing), for example::

          class C:
              def meth(self) -> int:
                  return 0

          def func(x: Proto) -> int:
              return x.meth()

          func(C())  # Passes static type check

        See PEP 544 for details. Protocol classes decorated with
        @typing_extensions.runtime act as simple-minded runtime protocol that checks
        only the presence of given attributes, ignoring their type signatures.

        Protocol classes can be generic, they are defined as::

          class GenProto(Protocol[T]):
              def meth(self) -> T:
                  ...
        rCTc��t|�turtd��tj|j
|g|��i|��S)NzIType Protocol cannot be instantiated; it can be used only as a base class)r�r6rrir�rr�s   rr�zProtocol.__new__�sF���S�z�X�%��!F�G�G��&�&�s�':�':�C�O�$�O�$�O�OrN)rOrPrQrRrrr�rCrrr6r6�s��	�8�	���	Prr8c�h�t|t�r|jstd|����d|_|S)a4Mark a protocol class as a runtime protocol, so that it
        can be used with isinstance() and issubclass(). Raise TypeError
        if applied to a non-protocol class.

        This allows a simple-minded structural check very similar to the
        one-offs in collections.abc such as Hashable.
        z@@runtime_checkable can be only applied to protocol classes, got T)r�r,rrr	r�s rr8r8�s?���#�}�-�S�5E�5E��$�$'�7�,�-�
-�#'�� ��
rr/c�:�eZdZdZej
defd��Zy)r/rC�returnc��yrwrCrcs r�	__index__zSupportsIndex.__index__�s��rN)rOrPrQrr�r��intr�rCrrr/r/�s&���	�	�	�	�	�s�	�
�	r)r�	r\c��	tjd�jddvrtd��	y#tt
f$rYywxYw)Nr~rOr�z4TypedDict does not support instance and class checksF)r�r�r�r�AttributeError�
ValueError)rr�s  r�_check_failsr��s_��	��}�}�Q��)�)�*�5�>H�H� � V�W�W�	H����
�+�	���	�s�/3�A�Ac�F�|std��|d|dd}}t|i|��S)N�)TypedDict.__new__(): not enough argumentsrr~)rr	)r�r(�_s   r�	_dict_newr��s4����G�H�H��q�'�4���8�4���T�$�V�$�$rz,($cls, _typename, _fields=None, /, **kwargs)��totalc��|std��|d|dd}}|r|d|dd}}n=d|vr.|jd�}ddl}|jdtd��ntd��|r	|\}nBd|vr<t
|�dk(r.|jd�}ddl}|jdtd��nd}|�|}n
|rtd
��dt|�i}	tjd�jjdd�|d<t|d||��S#t
$rtd	t
|�dz�d
���wxYw#tt
f$rY�HwxYw)Nr�rr~�	_typenamez5Passing '_typename' as keyword argument is deprecatedr\)�
stacklevelzGTypedDict.__new__() missing 1 required positional argument: '_typename'z?TypedDict.__new__() takes from 2 to 3 positional arguments but z were given�_fieldsz3Passing '_fields' as keyword argument is deprecatedz@TypedDict takes either a dict or keyword arguments, but not bothrrO�__main__rPrCr�)rr
�warnings�warn�DeprecationWarningr�rr	r�r�r�r_r��_TypedDictMeta)r�r�r(r��typenamer��fields�nss        r�_typeddict_newr��s�����G�H�H��q�'�4���8�4���!�!�W�d�1�2�h�d�H�
�F�
"��z�z�+�.�H���M�M�Q�,��
�
<��4�5�
5��
.����
�&�
 �S��[�A�%5��Z�Z�	�*�F���M�M�O�,��
�
<��F��>��F�
��,�-�
-� ��f��
.��	�"�}�}�Q�/�9�9�=�=�j�*�U�B�|���h��B�e�<�<��3�
.��!<�<?��I��M�?�K-�!-�.�.�
.��,�
�+�	��	�s�%D
�2D5�
%D2�5E�Ez;($cls, _typename, _fields=None, /, *, total=True, **kwargs)c�4��eZdZd�fd�	Zd�fd�	ZexZZ�xZS)r�c�(��t�|�|||�yrw)r�r{)rr�r�r�r�r�s     �rr{z_TypedDictMeta.__init__s����G��T�5�"�-rc	�N��|dk(rtnt|d<t�|�
||tf|�}i}|jdi�}t
|j��}d}	|j�D�
�cic]\}
}|
tj||	���}}
}t
�}t
�}
|D]�}|j|jjdi��|j|jjdd��|
j|jjdd����|j|�|r|j|�n|
j|�||_
t|�|_t|
�|_t#|d�s||_|Scc}}
w)	Nr.r�rz?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type�__required_keys__rC�__optional_keys__�	__total__)r�r�r�r�r	r_rr�itemsrirjr�r
r�	frozensetr�r�r�r�)rr�r�r�r��tp_dictr�own_annotations�own_annotation_keysr<�nry�
required_keys�
optional_keysrr�s               �rr�z_TypedDictMeta.__new__s����/3�k�.A�N�y�B�y�M��g�o�c�4�$��"�=�G��K� �f�f�%6��;�O�"%�o�&:�&:�&<�"=��S�C�<K�<Q�<Q�<S��<S�5�1�b��6�%�%�b�#�.�.�<S�
�� �E�M��E�M����"�"�4�=�=�#4�#4�5F��#K�L��$�$�T�]�]�%6�%6�7J�B�%O�P��$�$�T�]�]�%6�%6�7J�B�%O�P��

����/���$�$�%8�9��$�$�%8�9�&1�G�#�(1�-�(@�G�%�(1�-�(@�G�%��7�K�0�$)��!��N��-s�/!F!)T)	rOrPrQr{r�r�rIrMr�r�s@rr�r�s���	.�$	�L1=�<��-rr�r.a�A simple typed name space. At runtime it is equivalent to a plain dict.

        TypedDict creates a dictionary type that expects all of its
        instances to have a certain set of keys, with each key
        associated with a value of a consistent type. This expectation
        is not checked at runtime but is only enforced by type checkers.
        Usage::

            class Point2D(TypedDict):
                x: int
                y: int
                label: str

            a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
            b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

            assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

        The type info can be accessed via the Point2D.__annotations__ dict, and
        the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
        TypedDict supports two additional equivalent forms::

            Point2D = TypedDict('Point2D', x=int, y=int, label=str)
            Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

        The class syntax is only supported in Python 3.6+, while two other
        syntax forms work for Python 2.7 and 3.2+
        r0c�@��eZdZdZ�fd�Zd�Zd�Zd�Zd�Zd�Z	�xZ
S)�_AnnotatedAliasaKRuntime representation of an annotated type.

        At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
        with extra annotations. The alias behaves like a normal typing alias,
        instantiating is the same as instantiating the underlying type, binding
        it to types is also the same.
        c���t|t�r|j|z}|j}t�|�||�||_yrw)r�r��__metadata__r�r�r{)rGr��metadatar�s   �rr{z_AnnotatedAlias.__init__vs?����&�/�2�!�.�.��9���*�*���G��V�V�,� (�D�rc�X�t|�dk(sJ�|d}t||j�S)Nr~r)rr�r�)rGrC�new_types   r�	copy_withz_AnnotatedAlias.copy_with}s0���v�;�!�#�#�#��a�y�H�"�8�T�->�->�?�?rc��dtj|j��ddjd�|jD���d�S)Nztyping_extensions.Annotated[r�c3�2K�|]}t|����y�wrw�rir�s  rrz+_AnnotatedAlias.__repr__.<locals>.<genexpr>�s���� D�2C�Q��a��2C�rTr�)rir�r�r�r�rcs rrdz_AnnotatedAlias.__repr__�sE��2�6�3D�3D�T�_�_�3U�2V�VX��y�y� D�$�2C�2C� D�D�E�Q�H�
Irc�b�tjt|jf|jzffSrw)�operator�getitemr0r�r�rcs r�
__reduce__z_AnnotatedAlias.__reduce__�s1���#�#��D�O�O�-��0A�0A�A�&��
rc��t|t�stS|j|jk7ry|j|jk(S)NF)r�r�r�r�r�r�s  rr�z_AnnotatedAlias.__eq__�s>���e�_�5�%�%����%�"2�"2�2���$�$��(:�(:�:�:rc�D�t|j|jf�Srw)r�r�r�rcs rr�z_AnnotatedAlias.__hash__�s������$�*;�*;�<�=�=r)rOrPrQrRr{r�rdr�r�r�r�r�s@rr�r�ns(���	�	)�	@�
	I�	�
	;�	>rr�c�D�eZdZdZdZd�Zejd��Zd�Z	y)r0a�Add context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to the
        hypothetical runtime_check module that this type is an unsigned int.
        Every other consumer of this type can ignore this metadata and treat
        this type as int.

        The first argument to Annotated must be a valid type (and will be in
        the __origin__ field), the remaining arguments are kept as a tuple in
        the __extra__ field.

        Details:

        - It's an error to call `Annotated` with less than two arguments.
        - Nested Annotated are flattened::

            Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

        - Instantiating an annotated type is equivalent to instantiating the
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can be used as a generic type alias::

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
        rCc��td��)Nz&Type Annotated cannot be instantiated.rE�rr�r(s   rr�zAnnotated.__new__�s���D�E�Erc��t|t�rt|�dkrtd��d}t	j
|d|�}t|dd�}t
||�S)Nr\zUAnnotated[...] should be used with at least two arguments (a type and an annotation).�$Annotated[t, ...]: t must be a type.rr~)r�r�rrrirjr�)rrCr<r�r�s     rrEzAnnotated.__class_getitem__�sb���f�e�,��F��a���!/�0�0�9�C��'�'��q�	�3�7�F��V�A�B�Z�(�H�"�6�8�4�4rc�4�td|j�d���)N�Cannot subclass z
.Annotated)rrPr�s   rrqzAnnotated.__init_subclass__�s ���"�3�>�>�"2�*�=��
rN)
rOrPrQrRrr�rirrrErqrCrrr0r0�s4��	�@�	�	F�
�	�	�	5�
�	5�	rc�&�t|t�rt|j�St|tj
�rQt
d�|jD��}||jk(r|S|j|�}|j|_	|S|S)z2Strips the annotations from a given type.
        c3�2K�|]}t|����y�wrw)�_strip_annotationsr�s  rrz%_strip_annotations.<locals>.<genexpr>�s����!L��A�"4�Q�"7��rT)
r�r�r�r�rirkr�rr��_special)rL�
stripped_argsr�s   rr�r��su���a��)�%�a�l�l�3�3��a��-�-�.�!�!L����!L�L�M���
�
�*����+�+�m�,�C��:�:�C�L��J��rc��tj|||��}|r|S|j�D��cic]\}}|t|���c}}Scc}}w)a]Return type hints for an object.

        This is often the same as obj.__annotations__, but it handles
        forward references encoded as string literals, adds Optional[t] if a
        default value equal to None is set and recursively replaces all
        'Annotated[T, ...]' with 'T' (unless 'include_extras=True').

        The argument may be a module, class, method, or function. The annotations
        are returned as a dictionary. For classes, annotations include also
        inherited members.

        TypeError is raised if the argument is not of a type that can contain
        annotations, and an empty dictionary is returned if no annotations are
        present.

        BEWARE -- the behavior of globalns and localns is counterintuitive
        (unless you are familiar with how eval() and exec() work).  The
        search order is locals first, then globals.

        - If no dict arguments are passed, an attempt is made to use the
          globals from obj (or the respective module's globals for classes),
          and these are also used as the locals.  If the object does not appear
          to have globals, an empty dictionary is used.

        - If one dict argument is passed, it is used for both globals and
          locals.

        - If two dict arguments are passed, they specify globals and
          locals, respectively.
        )r�r�)rir?r�r�)rHr�r��include_extras�hint�krLs       rr?r?�sM��>�$�$�S�8�W�M����K�59�Z�Z�\�B�\�T�Q���%�a�(�(�\�B�B��Bs�A
c�j�t|�dkDxr$|jd�xr|jd�S)z3Returns True if name is a __dunder_variable_name__.��__)rr�endswithr�s r�
_is_dunderr��s,���4�y�1�}�N�����!6�N�4�=�=��;N�Nrc���eZdZdZ�fd�Zed��Zd�Zd
�fd�	Zd�Z	e
j�fd��Zd�Z
d	�Z�fd
�Zd�Zd�Z�xZS)�
AnnotatedMetazMetaclass for Annotatedc���td�|D��rtdtt�z��t	�|�||||fi|��S)Nc3�,K�|]}|tu���y�wrw)rgrXs  rrz(AnnotatedMeta.__new__.<locals>.<genexpr>s����2�E�q�1�F�?�E�rZr�)rfrrJr0r�r�)rr�r�r�r(r�s     �rr�zAnnotatedMeta.__new__
s@����2�E�2�2�� 2�S��^� C�D�D��7�?�3��e�Y�I�&�I�Irc�(�|j�dS)Nr\)r�rcs rr�zAnnotatedMeta.__metadata__s���?�?�$�Q�'�'rc���|\}}}t|t�stj|�}n|dj	|�}djd�|D��}|�d|�d|�d�S)Nrr�c3�2K�|]}t|����y�wrwr�)r�args  rrz+AnnotatedMeta._tree_repr.<locals>.<genexpr>s����&E�H�S�t�C�y�H�rTr�r�)r�r�rir��
_tree_reprr�)rG�treerr�r��tp_repr�metadata_reprss       rr�zAnnotatedMeta._tree_reprsj��$(�!�C����f�e�,� �+�+�F�3�� ��)�.�.�v�6��!�Y�Y�&E�H�&E�E�N��U�!�G�9�B�~�&6�a�8�8rc����|turtSt�|�	||��}t|dt�r-|ddtur|dd}|dd}t|||dzfS|S)N)rjr�r~rr\)r0r�r�r�r�)rGrjr�r��sub_tp�	sub_annotr�s      �rr�zAnnotatedMeta._subs_treesw����y� � � ��'�$�5�t�$�<�C��#�a�&�%�(�S��V�A�Y�)�-C��Q�������F�1�I�	�!�6�9�s�1�v�+=�>�>��Jrc��|j�td��|j�}t|t�r,|dt
ur!|d}t|t�r|dt
ur�!t|t�r|dS|S)z6Return the class used to create instance of this type.zCCannot get the underlying type of a non-specialized Annotated type.rr~)r�rr�r�r�r0)rGr�s  r�	_get_conszAnnotatedMeta._get_cons'sz�����&��!B�C�C��?�?�$�D��T�5�)�d�1�g��.B��A�w���T�5�)�d�1�g��.B��$��&��A�w���rc���t|t�s|f}|j�t�|�|�St|t�rt|�dkrt
d��d}tj|d|�}t|dd�}|j|j|jt|j�t|f�||f|��S)Nr\z]Annotated[...] should be instantiated with at least two arguments (a type and an annotation).r�rr~)rjr�r�)r�r�r�r�rnrrrirjr�rOrerr
r)rGrCr<ryr�r�s     �rrnzAnnotatedMeta.__getitem__4s�����f�e�,� ������*��w�*�6�2�2����.�#�f�+��/��!/�0�0�=���'�'��q�	�3�7�� �����,���>�>��
�
�����t�}�}�-� �"��'��(�^��"��
rc�f�|j�}||i|��}	||_|S#t$rY|SwxYwrw)r��__orig_class__r�)rGr�r(�cons�results     r�__call__zAnnotatedMeta.__call__LsJ���>�>�#�D��4�*�6�*�F�
�(,��%��M��"�
���M�
�s�#�	0�0c�z�|j�%t|�st|j�|�St	|��rw)r�r�rr�r�)rGrs  r�__getattr__zAnnotatedMeta.__getattr__Us2�����*�:�d�3C��t�~�~�/��6�6� ��&�&rc����t|�s|jd�rt�|�
||�y|j�t|��t
|j�||�y)Nr)r�rr�r�r�r��setattrr�)rGr�valuer�s   �rr�zAnnotatedMeta.__setattr__[sM����$��4�?�?�7�#;���#�D�%�0����(�$�T�*�*�����(�$��6rc��td��)Nz+Annotated cannot be used with isinstance().rErFs  rrIzAnnotatedMeta.__instancecheck__c����I�J�Jrc��td��)Nz+Annotated cannot be used with issubclass().rErLs  rrMzAnnotatedMeta.__subclasscheck__frr)NN)rOrPrQrRr��propertyr�r�r�r�rirrrnrrr�rIrMr�r�s@rr�r�sd���%�	J�

�	(�
�	(�	9�		�	�
�	�	�	�
�	�.	�	'�	7�	K�	Krr�c��eZdZdZy)r0avAdd context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to the
        hypothetical runtime_check module that this type is an unsigned int.
        Every other consumer of this type can ignore this metadata and treat
        this type as int.

        The first argument to Annotated must be a valid type, the remaining
        arguments are kept as a tuple in the __metadata__ field.

        Details:

        - It's an error to call `Annotated` with less than two arguments.
        - Nested Annotated are flattened::

            Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

        - Instantiating an annotated type is equivalent to instantiating the
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can be used as a generic type alias::

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
        N�rOrPrQrRrCrrr0r0is��	r)r�
)�_BaseGenericAlias)�GenericAliasc���t|t�rtSt|tjt
tttf�r|jS|tjurtjSy)a6Get the unsubscripted version of a type.

        This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
        and Annotated. Return None for unsupported types. Examples::

            get_origin(Literal[42]) is Literal
            get_origin(int) is None
            get_origin(ClassVar[int]) is ClassVar
            get_origin(Generic) is Generic
            get_origin(Generic[T]) is Generic
            get_origin(Union[T, int]) is Union
            get_origin(List[Tuple[T, T]][int]) == list
            get_origin(P.args) is P
        N)r�r�r0rirkrr�
ParamSpecArgs�ParamSpecKwargsr�r)rys rr>r>�sX���b�/�*����b�6�/�/��?P�(�/�;�<��=�=� �
������>�>�!�rc�V�t|t�r|jf|jzSt|tj
tf�r_t|dd�ry|j}t|�tjjur|dturt|dd�|df}|Sy)a�Get type arguments with all substitutions performed.

        For unions, basic simplifications used by Union constructor are performed.
        Examples::
            get_args(Dict[str, int]) == (str, int)
            get_args(int) == ()
            get_args(Union[int, Union[T, int], str][int]) == (int, str)
            get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
            get_args(Callable[[], T][int]) == ([], int)
        r�FrCrNr)r�r�r�r�rirkrrrr>r�r�r��Ellipsisr)ryr�s  rr=r=�s����b�/�*��M�M�#�b�o�o�5�5��b�6�/�/��>�?��r�:�u�-���+�+�C��"�~����!9�!9�9�c�!�f�H�>T��C���H�~�s�2�w�/���J�rr:)rr�c��eZdZd�Zy)�_TypeAliasFormc� �d|jzSr`rarcs rrdz_TypeAliasForm.__repr__�rerN�rOrPrQrdrCrrrr����	5rrc��t|�d���)�&Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example above.
        � is not subscriptablerEr�s  rr:r:�s���4�&� 5�6�7�7rc��eZdZd�Zy)rc� �d|jzSr`rarcs rrdz_TypeAliasForm.__repr__�rerNrrCrrrr�rra�Special marker indicating that an assignment should
                               be recognized as a proper type alias definition by type
                               checkers.

                               For example::

                                   Predicate: TypeAlias = Callable[..., bool]

                               It's invalid when used anywhere except as in the example
                               above.c��eZdZdZd�Zy)�_TypeAliasMetazMetaclass for TypeAliasc��y�Nztyping_extensions.TypeAliasrCrcs rrdz_TypeAliasMeta.__repr__����0rN�rOrPrQrRrdrCrrr$r$�s
��%�	1rr$c�&�eZdZdZdZd�Zd�Zd�Zy)�_TypeAliasBaserrCc��td��)Nz+TypeAlias cannot be used with isinstance().rErFs  rrIz _TypeAliasBase.__instancecheck__rrc��td��)Nz+TypeAlias cannot be used with issubclass().rErLs  rrMz _TypeAliasBase.__subclasscheck__
rrc��yr&rCrcs rrdz_TypeAliasBase.__repr__
r'rN)rOrPrQrRrrIrMrdrCrrr*r*�s��		��	�	K�	K�	1rr*)r�rTrc� �eZdZdZdZd�Zd�Zy)�
_Immutablez3Mixin to indicate that object should not be copied.rCc��|SrwrCrcs r�__copy__z_Immutable.__copy__r�rc��|SrwrC)rG�memos  r�__deepcopy__z_Immutable.__deepcopy__ r�rN)rOrPrQrRrr1r4rCrrr/r/s��A��	�	�	rr/c��eZdZdZd�Zd�Zy)raQThe args for a ParamSpec object.

        Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.

        ParamSpecArgs objects have a reference back to their ParamSpec:

        P.args.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        c��||_yrw�r��rGr�s  rr{zParamSpecArgs.__init__/r�rc�4�|jj�d�S)Nz.args�r�rOrcs rrdzParamSpecArgs.__repr__2s���o�o�.�.�/�u�5�5rN�rOrPrQrRr{rdrCrrrr#s��
	�	%�	6rc��eZdZdZd�Zd�Zy)ra[The kwargs for a ParamSpec object.

        Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.

        ParamSpecKwargs objects have a reference back to their ParamSpec:

        P.kwargs.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        c��||_yrwr7r8s  rr{zParamSpecKwargs.__init__Ar�rc�4�|jj�d�S)Nz.kwargsr:rcs rrdzParamSpecKwargs.__repr__Ds���o�o�.�.�/�w�7�7rNr;rCrrrr5s��
	�	%�	8rrrc���eZdZdZej
Zed��Zed��Z	dddd��fd�
Z
d�Zd	�Zd
�Z
d�Zd�Zesd
�Z�xZS�xZS)ra'Parameter specification variable.

        Usage::

           P = ParamSpec('P')

        Parameter specification variables exist primarily for the benefit of static
        type checkers.  They are used to forward the parameter types of one
        callable to another callable, a pattern commonly found in higher order
        functions and decorators.  They are only valid when used in ``Concatenate``,
        or s the first argument to ``Callable``. In Python 3.10 and higher,
        they are also supported in user-defined Generics at runtime.
        See class Generic for more information on generic types.  An
        example for annotating a decorator::

           T = TypeVar('T')
           P = ParamSpec('P')

           def add_logging(f: Callable[P, T]) -> Callable[P, T]:
               '''A type-safe decorator to add logging to a function.'''
               def inner(*args: P.args, **kwargs: P.kwargs) -> T:
                   logging.info(f'{f.__name__} was called')
                   return f(*args, **kwargs)
               return inner

           @add_logging
           def add_two(x: float, y: float) -> float:
               '''Add two numbers together.'''
               return x + y

        Parameter specification variables defined with covariant=True or
        contravariant=True can be used to declare covariant or contravariant
        generic types.  These keyword arguments are valid, but their actual semantics
        are yet to be decided.  See PEP 612 for details.

        Parameter specification variables can be introspected. e.g.:

           P.__name__ == 'T'
           P.__bound__ == None
           P.__covariant__ == False
           P.__contravariant__ == False

        Note that only parameter specification variables defined in global scope can
        be pickled.
        c��t|�Srw)rrcs rr�zParamSpec.args�s
�� ��&�&rc��t|�Srw)rrcs rr(zParamSpec.kwargs�s
��"�4�(�(rNF)�boundrYr[c�f��t�|�|g�||_t|�|_t|�|_|rt
j|d�|_nd|_	tjd�jjdd�}|dk7r||_yy#ttf$rd}Y�!wxYw)NzBound must be a type.r~rOr��typing_extensions)r�r{rO�bool�
__covariant__�__contravariant__rirj�	__bound__r�r�r�r_r�r�rP)rGr�rBrYr[�def_modr�s      �rr{zParamSpec.__init__�s�����G��d�V�$� �D�M�!%�i��D��%)�-�%8�D�"��!'�!3�!3�E�;R�!S���!%���
��-�-��*�4�4�8�8��Z�P���-�-�")���.��#�J�/�
���
�s�/B�B0�/B0c�`�|jrd}n|jrd}nd}||jzS)N�+�-�~)rFrGrO)rG�prefixs  rrdzParamSpec.__repr__�s2���!�!����'�'������D�M�M�)�)rc�,�tj|�Srw)rgr�rcs rr�zParamSpec.__hash__�s���?�?�4�(�(rc�
�||uSrwrCr�s  rr�zParamSpec.__eq__�s���5�=� rc��|jSrw)rOrcs rr�zParamSpec.__reduce__�s���=�=� rc��yrwrCr's   rrzParamSpec.__call__����rc�0�||vr|j|�yyrw)�append�rGrjs  r�_get_type_varszParamSpec._get_type_vars�s���u�$��L�L��&�%r)rOrPrQrRrir�r�rr�r(r{rdr�r�r�r�PEP_560rWr�r�s@rrrNsp���,	�^�N�N�	�	�	'�
�	'�
�	)�
�	)�+/�%�u�	*�$	*�	)�	!�	!�	��
'�rrc���eZdZer
ej
ZnejZdZejZ
�fd�Zd�Zd�Z
d�Zed��Zesd�Z�xZS�xZS)�_ConcatenateGenericAliasFc�@��t�|�|�||_||_yrw)r�r{r�r)rGr�r�r�s   �rr{z!_ConcatenateGenericAlias.__init__�s����G��T�"�$�D�O� �D�Mrc���tj��|j��ddj�fd�|jD���d�S)Nr�r�c3�.�K�|]}�|����y�wrwrC)rr�r�s  �rrz4_ConcatenateGenericAlias.__repr__.<locals>.<genexpr>�s�����!K�]�c�*�S�/�]�s�r�)rir�r�r�r)rGr�s @rrdz!_ConcatenateGenericAlias.__repr__�sF����*�*�J�!�$�/�/�2�3���	�	�!K�T�]�]�!K�K�L�A�O�
Prc�D�t|j|jf�Srw)r�r�rrcs rr�z!_ConcatenateGenericAlias.__hash__�s������$�-�-�8�9�9rc��yrwrCr's   rrz!_ConcatenateGenericAlias.__call__�rSrc�:�td�|jD��S)Nc3�bK�|]'}t|tjtf�s�$|���)y�wrw)r�rir�r)rrys  rrz:_ConcatenateGenericAlias.__parameters__.<locals>.<genexpr>�s&�����*�r�j��f�n�n�i�=X�.Y��]�s�%/�/)r�rrcs rrz'_ConcatenateGenericAlias.__parameters__�s ����!�]�]���
rc�x�|jr.|jr!tj|j|�yyyrw)r�rrirWrVs  rrWz'_ConcatenateGenericAlias._get_type_vars�s.���?�?�t�':�':��)�)�$�*=�*=�u�E�(;�?r)rOrPrQrXrirkr��_TypingBaser�rr�r{rdr�rrrrWr�r�s@rrZrZ�sg�����,�,�I��*�*�I�������	!�
	P�
	:�	�
�	�
�	�
�
F�rrZc����|dk(rtd��t|t�s|f}t|dt�std��d�t�fd�|D��}t	||�S)NrCz&Cannot take a Concatenate of no types.rzAThe last parameter to Concatenate should be a ParamSpec variable.z/Concatenate[arg, ...]: each arg must be a type.c3�J�K�|]}tj|�����y�wrwr9r:s  �rrz'_concatenate_getitem.<locals>.<genexpr>�s�����F�:�a�v�)�)�!�S�1�:�r )rr�r�rrZ)rGrr<s  @r�_concatenate_getitemrf�sj����R���@�A�A��j�%�(� �]�
��j��n�i�0��.�/�	/�
;�C��F�:�F�F�J�#�D�*�5�5rc��t||�S)�&Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        �rfr�s  rrr�s��$�D�*�5�5rc��eZdZd�Zd�Zy)�_ConcatenateFormc� �d|jzSr`rarcs rrdz_ConcatenateForm.__repr__
rerc��t||�Srwrir�s  rrnz_ConcatenateForm.__getitem__
���'��j�9�9rNrorCrrrkrk	s��	5�	:rrkrhc��eZdZdZd�Zy)�_ConcatenateAliasMetazMetaclass for Concatenate.c��y�Nztyping_extensions.ConcatenaterCrcs rrdz_ConcatenateAliasMeta.__repr__!���2rNr(rCrrrprps
��(�	3rrpc�,�eZdZdZdZd�Zd�Zd�Zd�Zy)�_ConcatenateAliasBaserhrCc��td��)Nz-Concatenate cannot be used with isinstance().rErFs  rrIz'_ConcatenateAliasBase.__instancecheck__3����K�L�Lrc��td��)Nz-Concatenate cannot be used with issubclass().rErLs  rrMz'_ConcatenateAliasBase.__subclasscheck__6rwrc��yrrrCrcs rrdz_ConcatenateAliasBase.__repr__9rsrc��t||�Srwrir�s  rrnz!_ConcatenateAliasBase.__getitem__<rnrN)	rOrPrQrRrrIrMrdrnrCrrruru$s$��		��	�	M�	M�	3�	:rrur;c��eZdZd�Zy)�_TypeGuardFormc� �d|jzSr`rarcs rrdz_TypeGuardForm.__repr__GrerNrrCrrr|r|Frrr|c�b�tj||�d��}tj||f�S)�	Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        r)rirjrkrls   rr;r;Js4��X�!�!�*���6P�.Q�R���#�#�D�4�'�2�2rc��eZdZd�Zd�Zy)r|c� �d|jzSr`rarcs rrdz_TypeGuardForm.__repr__|rerc�v�tj||j�d��}tj||f�S)Nz accepts only a single typerhrls   rrnz_TypeGuardForm.__getitem__s9���%�%�j�)-����4O�&P�R�D��'�'��t�g�6�6rNrorCrrr|r|zrprrc�F��eZdZdZdZd	d�Zd�Zd�Z�fd�Zd�Z	d�Z
�xZS)
�
_TypeGuardrrtc��||_yrwrtrxs   rr{z_TypeGuard.__init__�r|rc���t|�}|j�.|tj||jdd�d��d��St|jdd�d���)Nr~z accepts only a single type.TrSr�r�r�s   rrnz_TypeGuard.__getitem__�sm���t�*�C��}�}�$��6�-�-�d�!�l�l�1�2�.�/�/K�L�N�!%�'�'��s�|�|�A�B�/�0�0N�O�P�Prc��tj|j||�}||jk(r|St|�|d��Sr�r�r�s    rr�z_TypeGuard._eval_type�r�rc���t�|��}|j�&|dtj|j��d�z
}|Sr�r�r�s  �rrdz_TypeGuard.__repr__�r�rc�V�tt|�j|jf�Srwr�rcs rr�z_TypeGuard.__hash__�r�rc��t|t�stS|j�|j|jk(S||uSrw)r�r�r�rur�s  rr�z_TypeGuard.__eq__�s9���e�Z�0�%�%��}�}�(��}�}����6�6��5�=� rrwr�r�s@rr�r��s/���)	�V"�	�	�	Q�	2�	�	>�	!rr�r c�p�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ejd��Zy
)�_SpecialForm)rbrR�_getitemc�V�||_|j|_|j|_yrw)r�rOrbrR)rGr�s  rr{z_SpecialForm.__init__
s!��#�D�M� �)�)�D�J�"�?�?�D�Lrc�8�|dvr|jSt|��)N>rOrQ)rbr�)rGrms  rrz_SpecialForm.__getattr__s ���3�3��z�z�!� ��&�&rc��td|����)Nr�rE)rGr�s  r�__mro_entries__z_SpecialForm.__mro_entries__s���.�t�h�7�8�8rc� �d|j��Sr`rarcs rrdz_SpecialForm.__repr__s��'��
�
�|�4�4rc��|jSrwrarcs rr�z_SpecialForm.__reduce__s���:�:�rc��td|����)NzCannot instantiate rE)rGr�rzs   rrz_SpecialForm.__call__s���1�$��:�;�;rc�,�tj||fSrw�ri�Unionr�s  r�__or__z_SpecialForm.__or__!s���<�<��e��,�,rc�,�tj||fSrwr�r�s  r�__ror__z_SpecialForm.__ror__$s���<�<��t��,�,rc��t|�d���)Nz! cannot be used with isinstance()rErFs  rrIz_SpecialForm.__instancecheck__'����t�f�$E�F�G�Grc��t|�d���)Nz! cannot be used with issubclass()rErLs  rrMz_SpecialForm.__subclasscheck__*r�rc�&�|j||�Srw)r�r�s  rrnz_SpecialForm.__getitem__-s���=�=��z�2�2rN)rOrPrQrr{rr�rdr�rr�r�rIrMrirrrnrCrrr�r�sU��4�	�	+�
	'�	9�	5�	�	<�	-�	-�	H�	H�
�	�	�	3�
�	3rr�c��t|�d���)��Used to spell the type of "self" in classes.

        Example::

          from typing import Self

          class ReturnsSelf:
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        r rE)rGrCs  rr r 1s���4�&� 5�6�7�7rc� �eZdZdZdZd�Zd�Zy)�_Selfr�rCc��t|�d���)Nz" cannot be used with isinstance().rErFs  rrIz_Self.__instancecheck__R����t�f�$F�G�H�Hrc��t|�d���)Nz" cannot be used with issubclass().rErLs  rrMz_Self.__subclasscheck__Ur�rNrNrCrrr�r�Bs��	��	�	I�	Irr��Requiredc��eZdZd�Zy)�_ExtensionsSpecialFormc� �d|jzSr`rarcs rrdz_ExtensionsSpecialForm.__repr__`rerNrrCrrr�r�_rrr�c�v�tj||j�d��}tj||f�S)��A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        rgrhrls   rr�r�cs7��"�!�!�*�����<U�.V�W���#�#�D�4�'�2�2rc�v�tj||j�d��}tj||f�S)�`A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        rgrhrls   r�NotRequiredr�ws7���!�!�*�����<U�.V�W���#�#�D�4�'�2�2rc��eZdZd�Zd�Zy)�
_RequiredFormc� �d|jzSr`rarcs rrdz_RequiredForm.__repr__�rerc��tj|dj|j��}tj||f�S)Nz{} accepts only single type)rirj�formatrbrkrls   rrnz_RequiredForm.__getitem__�s<���%�%�j�&C�&J�&J�4�:�:�&V�X�D��'�'��t�g�6�6rNrorCrrr�r��s��	5�	7rr�r�r�r�c�B��eZdZdZdd�Zd�Zd�Z�fd�Zd�Zd�Z	�xZ
S)	�_MaybeRequiredrtc��||_yrwrtrxs   rr{z_MaybeRequired.__init__�r|rc
���t|�}|j�:|tj|dj	|j
dd��d��St
dj	|j
dd���)Nz{} accepts only single type.r~TrSz {} cannot be further subscripted)r�rurirjr�rOrr�s   rrnz_MaybeRequired.__getitem__�su���t�*�C��}�}�$��6�-�-�d�9�@�@����a�b�AQ�R�T�!%�'�'��>�#�V�C�L�L���$4�5�7�
7rc��tj|j||�}||jk(r|St|�|d��Sr�r�r�s    rr�z_MaybeRequired._eval_type�r�rc���t�|��}|j�1|djt	j
|j��z
}|S)Nz[{}])r�rdrur�rir�r�s  �rrdz_MaybeRequired.__repr__�sA����� �"�A��}�}�(��V�]�]�6�#4�#4�T�]�]�#C�D�D���Hrc�V�tt|�j|jf�Srwr�rcs rr�z_MaybeRequired.__hash__�r�rc��t|t|��stS|j�|j|jk(S||uSrw)r�r�r�rur�s  rr�z_MaybeRequired.__eq__�s=���e�T�$�Z�0�%�%��}�}�(��}�}����6�6��5�=� rrw)rOrPrQrr{rnr�rdr�r�r�r�s@rr�r��s&���!�	�	�	7�	2�	�	>�	!rr�c��eZdZdZy)�	_Requiredr�NrrCrrr�r��s��	rr�c��eZdZdZy)�_NotRequiredr�NrrCrrr�r��s��	rr�)NNF)�r�r��collections.abcr�r�ri�version_inforXr�rrrr�__all__�extendr�r@�_FinalTypingBaserBr�rUrVrWrXrZrrr�r^rsr1r2r3r�r��_overload_dummyr5r!r�r"r%r$r#r+r��MutableSequencer)r'�_collections_abcr�r�rr,r-�_alias�MutableMappingr*�Dictr�r(r&r4r9r<r�rhrr"r6r#r)r�r,rsrjr8r7r/r.r�r��__text_signature__r�r�r	rOrPrRr0r?r�rkr�r�r�r>r=r�ImportErrorrr:rr�r$r*rrr/rrrZrrrfrrkrprur;r|r�r r�r�r�r�r�r�r�r�rCrr�<module>r�s)��
����
�
�
�
�
�2�A�
�)�
+��
��K�/��<�+��Z��N�N�?�@��6�:�����H�J�F�+�+�4�J�(�t�$�H��F�N�N�3����V�^�^�D����V�^�^�D����v�~�~�f��-���6�>�>�*�D�9���?�?���6�7��� 0� 0��!� 4�� >��L�L�E����b�q��V�#�7�V�(�(��7�
�w�L�

M�E� 1!��(�(��1!�f
���E��6�7���L�L�E��. �
�6�9���n�n�G����b�q��V�#�:�v�*�*�$�:��9� 1�2�G�,!�6�*�*�$�,!�\�T�"�G��(�(���?�?���{�{���[��6
���	����	��$�$�
��$�$�
��6�7���L�L�E�N��!�!�6�#9�#9�!�#<�0�!�'�'�N��&�&��
�6�(�)� �4�4��I�"�f�n�n�T�2�"� � � ���6�=�!��$�$�K��#�"�"�2�A�&�2��2��&�-�-�� 7� 7�"�b��B�K�	T�k�-�-�v�/D�/D�R��V�/L� 6�'�3�3�	T��6�9���n�n�G�	P�+�%�%��+�+�a��f�%�2�+�:M�:M�	P��6�:�����H��[�*�%�	Q�;�'�'��)>�)>�r�2�v�)F�3�$�-�-�	Q��6�#�$��*�*�N���t�,�f�n�n�T�8�^�.L�#9�*���=�=��
�.�.��
�{�{���$�$�
��=���&X�
�6�:�����H��)�@�7����7�$]$�]�]$�@1�@�B��B�B$P�]�$P�P�6�&�'��0�0��� ���6�?�#��(�(�M����������y� �
� � �I�	�%�$R�I� �$(�*=�X*H�N�%�*=��*=�X�{�T�G�R�8�I�#�I��	���@�6�;��� � �I��*�*�N��,�,�O��%>�&�.�.�d�%>�N4�4�l�"C�LO�`K��*�*�`K�D�m��F���B�Q��7�"��"�"�J����H��1�,�,�'��0�0�6�;��� � �I����b�q��V�#�5��,�,�D�5��8��8�	���b�q��V�#�5��,�,�D�5��{�	$)�
*�I�1��*�*�1�1��0�0�N�RV�1�,�T�*�I��6�?�#��(�(�M��,�,�O���6�
�6�$8�*�8�&�6�;��� � �I�
f'�D�f'�T�v�}�%�(F�4�(F�X���
6��
6��6�=�!��$�$�K�%�>�>�����b�q��V�#��6��6�	���b�q��V�#�:�6�.�.�d�:�#��	
�
�K�3�� 1� 1�3�:�� 7� 7�*?�&*�:�6(�d�3�K��6�;��� � �I����b�q��V�#�5��,�,�D�5��,3��,3�\	���b�q��V�#�7��,�,�D�7���)
�+
�I�\M!�V�,�,�D�M!�^��&�I�
�6�6���;�;�D����b�q��V�#�(3�v�}�}�D�(3�T�8��8� I��'�'�t�I�,�t��D��6�:�����H��$�$�K����b�q��V�#�5��!4�!4�D�5��3��3�&�3��3� 	���b�q��V�#�7��+�+�4�7���
�
�H�" ��
�

�K� #!��0�0��#!�J�N�$��"�~�T���t�$�H��T�*�K��I�1�"�0�0��1��
�,��+�+��,�s$�-h�4h�h�h�h1�0h1python3.12/site-packages/setuptools/_vendor/__pycache__/ordered_set.cpython-312.pyc000064400000046223151732704060024214 0ustar00�

��_i;���dZddlZddlmZ	ddlmZmZe	d�Z
dZd�ZGd�dee�Z
y#e$rddlmZmZY�)wxYw)	z�
An OrderedSet is a custom MutableSet that remembers its order, so that every
entry has an index that can be looked up.

Based on a recipe originally posted to ActiveState Recipes by Raymond Hettiger,
and released under the MIT license.
�N)�deque)�
MutableSet�Sequencez3.1c�f�t|d�xr$t|t�xrt|t�S)a

    Are we being asked to look up a list of things, instead of a single thing?
    We check for the `__iter__` attribute so that this can cover types that
    don't have to be known by this module, such as NumPy arrays.

    Strings, however, should be considered as atomic values to look up, not
    iterables. The same goes for tuples, since they are immutable and therefore
    valid entries.

    We don't need to check for the Python 2 `unicode` type, because it doesn't
    have an `__iter__` attribute anyway.
    �__iter__)�hasattr�
isinstance�str�tuple)�objs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/ordered_set.py�is_iterablers7��	��Z� �	'��3��$�$�	'��3��&�&��c���eZdZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�ZeZd�Z
d�ZeZeZd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"y) �
OrderedSetz�
    An OrderedSet is a custom MutableSet that remembers its order, so that
    every entry has an index that can be looked up.

    Example:
        >>> OrderedSet([1, 1, 2, 3, 2])
        OrderedSet([1, 2, 3])
    Nc�0�g|_i|_|�||z}yy�N)�items�map)�self�iterables  r
�__init__zOrderedSet.__init__4s%����
�������H��D� rc�,�t|j�S)z�
        Returns the number of unique elements in the ordered set

        Example:
            >>> len(OrderedSet([]))
            0
            >>> len(OrderedSet([1, 2]))
            2
        )�lenr�rs r
�__len__zOrderedSet.__len__:s���4�:�:��rc�f�t|t�r|tk(r|j�St	|�r|D�cgc]}|j
|��c}St
|d�st|t�r2|j
|}t|t�r|j|�S|Std|z��cc}w)aQ
        Get the item at a given index.

        If `index` is a slice, you will get back that slice of items, as a
        new OrderedSet.

        If `index` is a list or a similar iterable, you'll get a list of
        items corresponding to those indices. This is similar to NumPy's
        "fancy indexing". The result is not an OrderedSet because you may ask
        for duplicate indices, and the number of elements returned should be
        the number of elements asked for.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset[1]
            2
        �	__index__z+Don't know how to index an OrderedSet by %r)
r	�slice�	SLICE_ALL�copyrrr�list�	__class__�	TypeError)r�index�i�results    r
�__getitem__zOrderedSet.__getitem__Fs���$�e�U�#���(:��9�9�;��
��
�+0�1�5�a�D�J�J�q�M�5�1�1�
�U�K�
(�J�u�e�,D��Z�Z��&�F��&�$�'��~�~�f�-�-��
��I�E�Q�R�R��2s�B.c�$�|j|�S)z�
        Return a shallow copy of this object.

        Example:
            >>> this = OrderedSet([1, 2, 3])
            >>> other = this.copy()
            >>> this == other
            True
            >>> this is other
            False
        )r#rs r
r!zOrderedSet.copyes���~�~�d�#�#rc�6�t|�dk(ryt|�S)Nrr)rr"rs r
�__getstate__zOrderedSet.__getstate__ss���t�9��>����:�rc�T�|dk(r|jg�y|j|�y)Nr)r)r�states  r
�__setstate__zOrderedSet.__setstate__s"���G���M�M�"���M�M�%� rc��||jvS)z�
        Test if the item is in this ordered set

        Example:
            >>> 1 in OrderedSet([1, 3, 2])
            True
            >>> 5 in OrderedSet([1, 3, 2])
            False
        )r�r�keys  r
�__contains__zOrderedSet.__contains__�s���d�h�h��rc��||jvr=t|j�|j|<|jj|�|j|S)aE
        Add `key` as an item to this OrderedSet, then return its index.

        If `key` is already in the OrderedSet, return the index it already
        had.

        Example:
            >>> oset = OrderedSet()
            >>> oset.append(3)
            0
            >>> print(oset)
            OrderedSet([3])
        )rrr�appendr0s  r
�addzOrderedSet.add�sE���d�h�h����
�
�O�D�H�H�S�M��J�J���c�"��x�x��}�rc��d}	|D]}|j|�}�	|S#t$rtdt|�z��wxYw)a<
        Update the set with the given iterable sequence, then return the index
        of the last element inserted.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset.update([3, 1, 5, 1, 4])
            4
            >>> print(oset)
            OrderedSet([1, 2, 3, 5, 4])
        Nz(Argument needs to be an iterable, got %s)r5r$�
ValueError�type)r�sequence�
item_index�items    r
�updatezOrderedSet.update�sW���
�	� ��!�X�X�d�^�
�!����	�	��:�T�(�^�K��
�	�s	��!Ac�~�t|�r|D�cgc]}|j|���c}S|j|Scc}w)aH
        Get the index of a given entry, raising an IndexError if it's not
        present.

        `key` can be an iterable of entries that is not a string, in which case
        this returns a list of indices.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset.index(2)
            1
        )rr%r)rr1�subkeys   r
r%zOrderedSet.index�s=���s��58�9�S�6�D�J�J�v�&�S�9�9��x�x��}���:s�:c��|jstd��|jd}|jd=|j|=|S)z�
        Remove and return the last element from the set.

        Raises KeyError if the set is empty.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset.pop()
            3
        zSet is empty���)r�KeyErrorr)r�elems  r
�popzOrderedSet.pop�s>���z�z��>�*�*��z�z�"�~���J�J�r�N��H�H�T�N��rc���||vrd|j|}|j|=|j|=|jj�D]\}}||k\s�|dz
|j|<�yy)a�
        Remove an element.  Do not raise an exception if absent.

        The MutableSet mixin uses this to implement the .remove() method, which
        *does* raise an error when asked to remove a non-existent item.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset.discard(2)
            >>> print(oset)
            OrderedSet([1, 3])
            >>> oset.discard(2)
            >>> print(oset)
            OrderedSet([1, 3])
        �N)rr)rr1r&�k�vs     r
�discardzOrderedSet.discard�sd�� �$�;�����
�A��
�
�1�
�����
������(���1���6�"#�a�%�D�H�H�Q�K�)�	rc�V�|jdd�=|jj�y)z8
        Remove all items from this OrderedSet.
        N)rr�clearrs r
rJzOrderedSet.clear�s��
�J�J�q�M������rc�,�t|j�S)zb
        Example:
            >>> list(iter(OrderedSet([1, 2, 3])))
            [1, 2, 3]
        )�iterrrs r
rzOrderedSet.__iter__s���D�J�J��rc�,�t|j�S)zf
        Example:
            >>> list(reversed(OrderedSet([1, 2, 3])))
            [3, 2, 1]
        )�reversedrrs r
�__reversed__zOrderedSet.__reversed__s����
�
�#�#rc��|s|jj�d�S|jj�dt|��d�S)Nz()�(�))r#�__name__r"rs r
�__repr__zOrderedSet.__repr__s1���!�^�^�4�4�6�6��>�>�2�2�D��J�?�?rc��t|ttf�rt|�t|�k(S	t	|�}t	|�|k(S#t
$rYywxYw)a�
        Returns true if the containers have the same items. If `other` is a
        Sequence, then order is checked, otherwise it is ignored.

        Example:
            >>> oset = OrderedSet([1, 3, 2])
            >>> oset == [1, 3, 2]
            True
            >>> oset == [1, 2, 3]
            False
            >>> oset == [2, 3]
            False
            >>> oset == OrderedSet([3, 2, 1])
            False
        F)r	rrr"�setr$)r�other�other_as_sets   r
�__eq__zOrderedSet.__eq__s[��$�e�h��.�/���:��e��,�,�	-��u�:�L�
�t�9��,�,��	�	��	�s�A�	A�Ac���t|t�r|jnt}tttj|g|��}t
jj|�}||�S)a�
        Combines all unique items.
        Each items order is defined by its first appearance.

        Example:
            >>> oset = OrderedSet.union(OrderedSet([3, 1, 4, 1, 5]), [1, 3], [2, 0])
            >>> print(oset)
            OrderedSet([3, 1, 4, 5, 2, 0])
            >>> oset.union([8, 9])
            OrderedSet([3, 1, 4, 5, 2, 0, 8, 9])
            >>> oset | {10}
            OrderedSet([3, 1, 4, 5, 2, 0, 10])
        )r	rr#rr"�it�chain�
from_iterable)r�sets�cls�
containersrs     r
�unionzOrderedSet.union6sO��!+�4�� <�d�n�n�*����r�x�x����5�6�
����&�&�z�2���5�z�rc�$�|j|�Sr)�intersection�rrWs  r
�__and__zOrderedSet.__and__Is��� � ��'�'rc���t|t�r|jnt}|r,tjtt|����fd�|D�}n|}||�S)a�
        Returns elements in common between all sets. Order is defined only
        by the first set.

        Example:
            >>> oset = OrderedSet.intersection(OrderedSet([0, 1, 2, 3]), [1, 2, 3])
            >>> print(oset)
            OrderedSet([1, 2, 3])
            >>> oset.intersection([2, 4, 5], [1, 2, 3, 4])
            OrderedSet([2])
            >>> oset.intersection()
            OrderedSet([1, 2, 3])
        c3�,�K�|]}|�vs�|���
y�wr�)�.0r;�commons  �r
�	<genexpr>z*OrderedSet.intersection.<locals>.<genexpr>^s�����=�d�d�d�f�n�T�d���	�)r	rr#rVrcr)rr^r_rrjs    @r
rczOrderedSet.intersectionMsK���!+�4�� <�d�n�n�*����%�%�s�3��~�6�F�=�d�=�E��E��5�z�rc���|j}|r,tjtt|����fd�|D�}n|}||�S)a�
        Returns all elements that are in this set but not the others.

        Example:
            >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2]))
            OrderedSet([1, 3])
            >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2]), OrderedSet([3]))
            OrderedSet([1])
            >>> OrderedSet([1, 2, 3]) - OrderedSet([2])
            OrderedSet([1, 3])
            >>> OrderedSet([1, 2, 3]).difference()
            OrderedSet([1, 2, 3])
        c3�,�K�|]}|�vs�|���
y�wrrh�rir;rWs  �r
rkz(OrderedSet.difference.<locals>.<genexpr>ts�����@�d�d�d�%�.?�T�d�rl)r#rVrar)rr^r_rrWs    @r
�
differencezOrderedSet.differencecs>����n�n����I�I�s�3��~�.�E�@�d�@�E��E��5�z�rc�\��t|�t��kDryt�fd�|D��S)a7
        Report whether another set contains this set.

        Example:
            >>> OrderedSet([1, 2, 3]).issubset({1, 2})
            False
            >>> OrderedSet([1, 2, 3]).issubset({1, 2, 3, 4})
            True
            >>> OrderedSet([1, 2, 3]).issubset({1, 4, 3, 5})
            False
        Fc3�&�K�|]}|�v���
y�wrrhros  �r
rkz&OrderedSet.issubset.<locals>.<genexpr>�s�����2�T�T�4�5�=�T����r�allrds `r
�issubsetzOrderedSet.issubsetys)����t�9�s�5�z�!���2�T�2�2�2rc�\��t��t|�kryt�fd�|D��S)a=
        Report whether this set contains another set.

        Example:
            >>> OrderedSet([1, 2]).issuperset([1, 2, 3])
            False
            >>> OrderedSet([1, 2, 3, 4]).issuperset({1, 2, 3})
            True
            >>> OrderedSet([1, 4, 3, 5]).issuperset({1, 2, 3})
            False
        Fc3�&�K�|]}|�v���
y�wrrh)rir;rs  �r
rkz(OrderedSet.issuperset.<locals>.<genexpr>�s�����2�E�D�4�4�<�E�rsrtrds` r
�
issupersetzOrderedSet.issuperset�s)����t�9�s�5�z�!���2�E�2�2�2rc���t|t�r|jnt}||�j|�}||�j|�}|j	|�S)a�
        Return the symmetric difference of two OrderedSets as a new set.
        That is, the new set will contain all elements that are in exactly
        one of the sets.

        Their order will be preserved, with elements from `self` preceding
        elements from `other`.

        Example:
            >>> this = OrderedSet([1, 4, 3, 5, 7])
            >>> other = OrderedSet([9, 7, 1, 3, 2])
            >>> this.symmetric_difference(other)
            OrderedSet([4, 5, 9, 2])
        )r	rr#rpra)rrWr_�diff1�diff2s     r
�symmetric_differencezOrderedSet.symmetric_difference�sO��!+�4�� <�d�n�n�*���D�	�$�$�U�+���E�
�%�%�d�+���{�{�5�!�!rc�f�||_t|�D��cic]\}}||��
c}}|_ycc}}w)zt
        Replace the 'items' list of this OrderedSet with a new one, updating
        self.map accordingly.
        N)r�	enumerater)rr�idxr;s    r
�
_update_itemszOrderedSet._update_items�s3��
��
�1:�5�1A�B�1A�+�3��D�#�I�1A�B����Bs�
-c��t�}|D]}|t|�z}�|j|jD�cgc]	}||vs�|��c}�ycc}w)a�
        Update this OrderedSet to remove items from one or more other sets.

        Example:
            >>> this = OrderedSet([1, 2, 3])
            >>> this.difference_update(OrderedSet([2, 4]))
            >>> print(this)
            OrderedSet([1, 3])

            >>> this = OrderedSet([1, 2, 3, 4, 5])
            >>> this.difference_update(OrderedSet([2, 4]), OrderedSet([1, 4, 6]))
            >>> print(this)
            OrderedSet([3, 5])
        N�rVr�r)rr^�items_to_removerWr;s     r
�difference_updatezOrderedSet.difference_update�sN���%���E��s�5�z�)�O�����T�Z�Z�W�Z�T�4��;V�D�Z�W�X��Ws�	A�Ac��t|�}|j|jD�cgc]	}||vs�|��c}�ycc}w)a^
        Update this OrderedSet to keep only items in another set, preserving
        their order in this set.

        Example:
            >>> this = OrderedSet([1, 4, 3, 5, 7])
            >>> other = OrderedSet([9, 7, 1, 3, 2])
            >>> this.intersection_update(other)
            >>> print(this)
            OrderedSet([1, 3, 7])
        Nr�)rrWr;s   r
�intersection_updatezOrderedSet.intersection_update�s7���E�
�����T�Z�Z�I�Z�T�4�5�=�D�Z�I�J��Is�	;�;c��|D�cgc]	}||vs�|��}}t|�}|j|jD�cgc]	}||vs�|��c}|z�ycc}wcc}w)a�
        Update this OrderedSet to remove items from another set, then
        add items from the other set that were not present in this set.

        Example:
            >>> this = OrderedSet([1, 4, 3, 5, 7])
            >>> other = OrderedSet([9, 7, 1, 3, 2])
            >>> this.symmetric_difference_update(other)
            >>> print(this)
            OrderedSet([4, 5, 9, 2])
        Nr�)rrWr;�items_to_addr�s     r
�symmetric_difference_updatez&OrderedSet.symmetric_difference_update�sd��*/�C���$�d�2B����C��e�*�����"�j�j�H�j�d�D��,G�T�j�H�<�W�	
��D��
Is�	A�A�	A�Ar)#rS�
__module__�__qualname__�__doc__rrr(r!r+r.r2r5r4r<r%�get_loc�get_indexerrCrHrJrrOrTrYrarercrprvryr}r�r�r�r�rhrr
rr*s�����
�S�>$�
�!�
��&�F��,�$�G��K��&(�0� �$�@�
-�<�&(��,�,3� 3� "�(C�Y�(
K�
rr)r��	itertoolsr[�collectionsr�collections.abcrr�ImportErrorrr �__version__rrrhrr
�<module>r�sV�����1�4�

�$�K�	����(~
��X�~
��9�1�0�0�1�s�0�
A�Apython3.12/site-packages/setuptools/_vendor/zipp.py000064400000020351151732704060016330 0ustar00import io
import posixpath
import zipfile
import itertools
import contextlib
import sys
import pathlib

if sys.version_info < (3, 7):
    from collections import OrderedDict
else:
    OrderedDict = dict


__all__ = ['Path']


def _parents(path):
    """
    Given a path with elements separated by
    posixpath.sep, generate all parents of that path.

    >>> list(_parents('b/d'))
    ['b']
    >>> list(_parents('/b/d/'))
    ['/b']
    >>> list(_parents('b/d/f/'))
    ['b/d', 'b']
    >>> list(_parents('b'))
    []
    >>> list(_parents(''))
    []
    """
    return itertools.islice(_ancestry(path), 1, None)


def _ancestry(path):
    """
    Given a path with elements separated by
    posixpath.sep, generate all elements of that path

    >>> list(_ancestry('b/d'))
    ['b/d', 'b']
    >>> list(_ancestry('/b/d/'))
    ['/b/d', '/b']
    >>> list(_ancestry('b/d/f/'))
    ['b/d/f', 'b/d', 'b']
    >>> list(_ancestry('b'))
    ['b']
    >>> list(_ancestry(''))
    []
    """
    path = path.rstrip(posixpath.sep)
    while path and path != posixpath.sep:
        yield path
        path, tail = posixpath.split(path)


_dedupe = OrderedDict.fromkeys
"""Deduplicate an iterable in original order"""


def _difference(minuend, subtrahend):
    """
    Return items in minuend not in subtrahend, retaining order
    with O(1) lookup.
    """
    return itertools.filterfalse(set(subtrahend).__contains__, minuend)


class CompleteDirs(zipfile.ZipFile):
    """
    A ZipFile subclass that ensures that implied directories
    are always included in the namelist.
    """

    @staticmethod
    def _implied_dirs(names):
        parents = itertools.chain.from_iterable(map(_parents, names))
        as_dirs = (p + posixpath.sep for p in parents)
        return _dedupe(_difference(as_dirs, names))

    def namelist(self):
        names = super(CompleteDirs, self).namelist()
        return names + list(self._implied_dirs(names))

    def _name_set(self):
        return set(self.namelist())

    def resolve_dir(self, name):
        """
        If the name represents a directory, return that name
        as a directory (with the trailing slash).
        """
        names = self._name_set()
        dirname = name + '/'
        dir_match = name not in names and dirname in names
        return dirname if dir_match else name

    @classmethod
    def make(cls, source):
        """
        Given a source (filename or zipfile), return an
        appropriate CompleteDirs subclass.
        """
        if isinstance(source, CompleteDirs):
            return source

        if not isinstance(source, zipfile.ZipFile):
            return cls(_pathlib_compat(source))

        # Only allow for FastLookup when supplied zipfile is read-only
        if 'r' not in source.mode:
            cls = CompleteDirs

        source.__class__ = cls
        return source


class FastLookup(CompleteDirs):
    """
    ZipFile subclass to ensure implicit
    dirs exist and are resolved rapidly.
    """

    def namelist(self):
        with contextlib.suppress(AttributeError):
            return self.__names
        self.__names = super(FastLookup, self).namelist()
        return self.__names

    def _name_set(self):
        with contextlib.suppress(AttributeError):
            return self.__lookup
        self.__lookup = super(FastLookup, self)._name_set()
        return self.__lookup


def _pathlib_compat(path):
    """
    For path-like objects, convert to a filename for compatibility
    on Python 3.6.1 and earlier.
    """
    try:
        return path.__fspath__()
    except AttributeError:
        return str(path)


class Path:
    """
    A pathlib-compatible interface for zip files.

    Consider a zip file with this structure::

        .
        ├── a.txt
        └── b
            ├── c.txt
            └── d
                └── e.txt

    >>> data = io.BytesIO()
    >>> zf = zipfile.ZipFile(data, 'w')
    >>> zf.writestr('a.txt', 'content of a')
    >>> zf.writestr('b/c.txt', 'content of c')
    >>> zf.writestr('b/d/e.txt', 'content of e')
    >>> zf.filename = 'mem/abcde.zip'

    Path accepts the zipfile object itself or a filename

    >>> root = Path(zf)

    From there, several path operations are available.

    Directory iteration (including the zip file itself):

    >>> a, b = root.iterdir()
    >>> a
    Path('mem/abcde.zip', 'a.txt')
    >>> b
    Path('mem/abcde.zip', 'b/')

    name property:

    >>> b.name
    'b'

    join with divide operator:

    >>> c = b / 'c.txt'
    >>> c
    Path('mem/abcde.zip', 'b/c.txt')
    >>> c.name
    'c.txt'

    Read text:

    >>> c.read_text()
    'content of c'

    existence:

    >>> c.exists()
    True
    >>> (b / 'missing.txt').exists()
    False

    Coercion to string:

    >>> import os
    >>> str(c).replace(os.sep, posixpath.sep)
    'mem/abcde.zip/b/c.txt'

    At the root, ``name``, ``filename``, and ``parent``
    resolve to the zipfile. Note these attributes are not
    valid and will raise a ``ValueError`` if the zipfile
    has no filename.

    >>> root.name
    'abcde.zip'
    >>> str(root.filename).replace(os.sep, posixpath.sep)
    'mem/abcde.zip'
    >>> str(root.parent)
    'mem'
    """

    __repr = "{self.__class__.__name__}({self.root.filename!r}, {self.at!r})"

    def __init__(self, root, at=""):
        """
        Construct a Path from a ZipFile or filename.

        Note: When the source is an existing ZipFile object,
        its type (__class__) will be mutated to a
        specialized type. If the caller wishes to retain the
        original type, the caller should either create a
        separate ZipFile object or pass a filename.
        """
        self.root = FastLookup.make(root)
        self.at = at

    def open(self, mode='r', *args, pwd=None, **kwargs):
        """
        Open this entry as text or binary following the semantics
        of ``pathlib.Path.open()`` by passing arguments through
        to io.TextIOWrapper().
        """
        if self.is_dir():
            raise IsADirectoryError(self)
        zip_mode = mode[0]
        if not self.exists() and zip_mode == 'r':
            raise FileNotFoundError(self)
        stream = self.root.open(self.at, zip_mode, pwd=pwd)
        if 'b' in mode:
            if args or kwargs:
                raise ValueError("encoding args invalid for binary operation")
            return stream
        return io.TextIOWrapper(stream, *args, **kwargs)

    @property
    def name(self):
        return pathlib.Path(self.at).name or self.filename.name

    @property
    def suffix(self):
        return pathlib.Path(self.at).suffix or self.filename.suffix

    @property
    def suffixes(self):
        return pathlib.Path(self.at).suffixes or self.filename.suffixes

    @property
    def stem(self):
        return pathlib.Path(self.at).stem or self.filename.stem

    @property
    def filename(self):
        return pathlib.Path(self.root.filename).joinpath(self.at)

    def read_text(self, *args, **kwargs):
        with self.open('r', *args, **kwargs) as strm:
            return strm.read()

    def read_bytes(self):
        with self.open('rb') as strm:
            return strm.read()

    def _is_child(self, path):
        return posixpath.dirname(path.at.rstrip("/")) == self.at.rstrip("/")

    def _next(self, at):
        return self.__class__(self.root, at)

    def is_dir(self):
        return not self.at or self.at.endswith("/")

    def is_file(self):
        return self.exists() and not self.is_dir()

    def exists(self):
        return self.at in self.root._name_set()

    def iterdir(self):
        if not self.is_dir():
            raise ValueError("Can't listdir a file")
        subs = map(self._next, self.root.namelist())
        return filter(self._is_child, subs)

    def __str__(self):
        return posixpath.join(self.root.filename, self.at)

    def __repr__(self):
        return self.__repr.format(self=self)

    def joinpath(self, *other):
        next = posixpath.join(self.at, *map(_pathlib_compat, other))
        return self._next(self.root.resolve_dir(next))

    __truediv__ = joinpath

    @property
    def parent(self):
        if not self.at:
            return self.filename.parent
        parent_at = posixpath.dirname(self.at.rstrip('/'))
        if parent_at:
            parent_at += '/'
        return self._next(parent_at)
python3.12/site-packages/setuptools/_vendor/more_itertools/__init__.pyi000064400000000053151732704060022321 0ustar00from .more import *
from .recipes import *
python3.12/site-packages/setuptools/_vendor/more_itertools/__pycache__/__init__.cpython-312.pyc000064400000000521151732704070026512 0ustar00�

��_iR���ddl�ddl�dZy)�)�*z8.8.0N)�more�recipes�__version__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/more_itertools/__init__.py�<module>r
s�����rpython3.12/site-packages/setuptools/_vendor/more_itertools/__pycache__/recipes.cpython-312.pyc000064400000052524151732704070026417 0ustar00�

��_i�?���dZddlZddlmZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
mZddlZddlmZmZmZgd�Zd�Zd'd�Zd	�Zd(d
�Zd(d�Zd�Zefd
�Zd�ZeZd�Zd�Z d�Z!d(d�Z"d�Z#	ddlm$Z%d�Z$e#je$_d(d�Z'd�Z(d�Z)d�Z*d(d�Z+d(d�Z,d(d�Z-d)d�Z.dd�d �Z/d(d!�Z0d"�Z1d#�Z2d$�Z3d%�Z4d&�Z5y#e&$re#Z$Y�@wxYw)*aImported from the recipes section of the itertools documentation.

All functions taken from the recipes section of the itertools library docs
[1]_.
Some backward-compatible usability improvements have been made.

.. [1] http://docs.python.org/library/itertools.html#recipes

�N)�deque)
�chain�combinations�count�cycle�groupby�islice�repeat�starmap�tee�zip_longest)�	randrange�sample�choice)�	all_equal�consume�convolve�
dotproduct�
first_true�flatten�grouper�iter_except�ncycles�nth�nth_combination�padnone�pad_none�pairwise�	partition�powerset�prepend�quantify�#random_combination_with_replacement�random_combination�random_permutation�random_product�
repeatfunc�
roundrobin�tabulate�tail�take�unique_everseen�unique_justseenc�,�tt||��S)z�Return first *n* items of the iterable as a list.

        >>> take(3, range(10))
        [0, 1, 2]

    If there are fewer than *n* items in the iterable, all of them are
    returned.

        >>> take(10, range(3))
        [0, 1, 2]

    )�listr	��n�iterables  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/more_itertools/recipes.pyr+r+<s����x��#�$�$�c�,�t|t|��S)a�Return an iterator over the results of ``func(start)``,
    ``func(start + 1)``, ``func(start + 2)``...

    *func* should be a function that accepts one integer argument.

    If *start* is not specified it defaults to 0. It will be incremented each
    time the iterator is advanced.

        >>> square = lambda x: x ** 2
        >>> iterator = tabulate(square, -3)
        >>> take(4, iterator)
        [9, 4, 1, 0]

    )�mapr)�function�starts  r3r)r)Ls���x��u��&�&r4c�.�tt||���S)z�Return an iterator over the last *n* items of *iterable*.

    >>> t = tail(3, 'ABCDEFG')
    >>> list(t)
    ['E', 'F', 'G']

    ��maxlen)�iterrr0s  r3r*r*^s����h�q�)�*�*r4c�R�|�t|d��ytt|||�d�y)aXAdvance *iterable* by *n* steps. If *n* is ``None``, consume it
    entirely.

    Efficiently exhausts an iterator without returning values. Defaults to
    consuming the whole iterator, but an optional second argument may be
    provided to limit consumption.

        >>> i = (x for x in range(10))
        >>> next(i)
        0
        >>> consume(i, 3)
        >>> next(i)
        4
        >>> consume(i)
        >>> next(i)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        StopIteration

    If the iterator has fewer items remaining than the provided limit, the
    whole iterator will be consumed.

        >>> i = (x for x in range(3))
        >>> consume(i, 5)
        >>> next(i)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        StopIteration

    Nrr:)r�nextr	)�iteratorr1s  r3rris)��@	�y�
�h�q�!�	
�V�H�a��
#�T�*r4c�0�tt||d�|�S)z�Returns the nth item or a default value.

    >>> l = range(10)
    >>> nth(l, 3)
    3
    >>> nth(l, 20, "zebra")
    'zebra'

    N)r>r	)r2r1�defaults   r3rr�s����x��D�)�7�3�3r4c�N�t|�}t|d�xr
t|d�S)z�
    Returns ``True`` if all the elements are equal to each other.

        >>> all_equal('aaaa')
        True
        >>> all_equal('aaab')
        False

    TF)rr>)r2�gs  r3rr�s(��	���A���4�=�/��a���/�/r4c�,�tt||��S)zcReturn the how many times the predicate is true.

    >>> quantify([True, False, True])
    2

    )�sumr6)r2�preds  r3r"r"�s���s�4��"�#�#r4c�,�t|td��S)aReturns the sequence of elements and then returns ``None`` indefinitely.

        >>> take(5, pad_none(range(3)))
        [0, 1, 2, None, None]

    Useful for emulating the behavior of the built-in :func:`map` function.

    See also :func:`padded`.

    N)rr
�r2s r3rr�s����6�$�<�(�(r4c�R�tjtt|�|��S)zvReturns the sequence elements *n* times

    >>> list(ncycles(["a", "b"], 3))
    ['a', 'b', 'a', 'b', 'a', 'b']

    )r�
from_iterabler
�tuple)r2r1s  r3rr�s �����v�e�H�o�q�9�:�:r4c�J�tttj||��S)zcReturns the dot product of the two iterables.

    >>> dotproduct([10, 10], [20, 20])
    400

    )rEr6�operator�mul)�vec1�vec2s  r3rr�s���s�8�<�<��t�,�-�-r4c�,�tj|�S)z�Return an iterator flattening one level of nesting in a list of lists.

        >>> list(flatten([[0, 1], [2, 3]]))
        [0, 1, 2, 3]

    See also :func:`collapse`, which can flatten multiple levels of nesting.

    )rrJ)�listOfListss r3rr�s�����{�+�+r4c�\�|�t|t|��St|t||��S)aGCall *func* with *args* repeatedly, returning an iterable over the
    results.

    If *times* is specified, the iterable will terminate after that many
    repetitions:

        >>> from operator import add
        >>> times = 4
        >>> args = 3, 5
        >>> list(repeatfunc(add, times, *args))
        [8, 8, 8, 8]

    If *times* is ``None`` the iterable will not terminate:

        >>> from random import randrange
        >>> times = None
        >>> args = 1, 11
        >>> take(6, repeatfunc(randrange, times, *args))  # doctest:+SKIP
        [2, 4, 8, 1, 8, 4]

    )rr
)�func�times�argss   r3r'r'�s.��,
�}��t�V�D�\�*�*��4���e�,�-�-r4c#�lK�t|�\}}t|d�t||�Ed{���y7��w)z�Returns an iterator of paired items, overlapping, from the original

    >>> take(4, pairwise(count()))
    [(0, 1), (1, 2), (2, 3), (3, 4)]

    On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`.

    N)rr>�zip)r2�a�bs   r3�	_pairwiser[s-�����x�=�D�A�q���D�M��1�a�y���s�*4�2�4)rc#�6K�t|�Ed{���y7��w�N)�itertools_pairwiserHs r3rrs����%�h�/�/�/�s���c��t|t�rtjdt�||}}t|�g|z}t
|d|i�S)z�Collect data into fixed-length chunks or blocks.

    >>> list(grouper('ABCDEFG', 3, 'x'))
    [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')]

    z+grouper expects iterable as first parameter�	fillvalue)�
isinstance�int�warnings�warn�DeprecationWarningr<r
)r2r1r`rVs    r3rrsL���(�C� ��
�
�9�;M�	
���8����N��a��D��T�2��2�2r4c'��K�t|�}td�|D��}|r	|D]}|����
	|r�yy#t$r|dz}tt||��}Y�*wxYw�w)aJYields an item from each iterable, alternating between them.

        >>> list(roundrobin('ABC', 'D', 'EF'))
        ['A', 'D', 'E', 'B', 'F', 'C']

    This function produces the same output as :func:`interleave_longest`, but
    may perform better for some inputs (in particular when the number of
    iterables is small).

    c3�FK�|]}t|�j���y�wr])r<�__next__)�.0�its  r3�	<genexpr>zroundrobin.<locals>.<genexpr>9s����8�i��$�r�(�#�#�i�s�!�N)�lenr�
StopIterationr	)�	iterables�pending�nextsr>s    r3r(r(,si�����)�n�G��8�i�8�8�E�
�	2����f������	2��q�L�G��&���0�1�E�	2�s*� A"�9�A"�A"�#A�A"�A�A"c�j����t��fd�|D�}t|�\}}d�|D�d�|D�fS)a�
    Returns a 2-tuple of iterables derived from the input iterable.
    The first yields the items that have ``pred(item) == False``.
    The second yields the items that have ``pred(item) == True``.

        >>> is_odd = lambda x: x % 2 != 0
        >>> iterable = range(10)
        >>> even_items, odd_items = partition(is_odd, iterable)
        >>> list(even_items), list(odd_items)
        ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])

    If *pred* is None, :func:`bool` is used.

        >>> iterable = [0, 1, False, True, '', ' ']
        >>> false_items, true_items = partition(None, iterable)
        >>> list(false_items), list(true_items)
        ([0, False, ''], [1, True, ' '])

    c3�2�K�|]}�|�|f���y�wr]�)ri�xrFs  �r3rkzpartition.<locals>.<genexpr>Zs�����2��A�D��G�Q�<��s�c3�,K�|]\}}|r�	|���y�wr]rt�ri�condrus   r3rkzpartition.<locals>.<genexpr>]s����+�B�y��a�d��B���
�c3�,K�|]\}}|s�	|���y�wr]rtrws   r3rkzpartition.<locals>.<genexpr>^s����'�B�y��a�$��B�ry)�boolr)rFr2�evaluations�t1�t2s`    r3rrCsA���(�|���2��2�K�
��
�F�B��+�B�+�'�B�'��r4c���t|��tj�fd�tt	��dz�D��S)a�Yields all possible subsets of the iterable.

        >>> list(powerset([1, 2, 3]))
        [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)]

    :func:`powerset` will operate on iterables that aren't :class:`set`
    instances, so repeated elements in the input will produce repeated elements
    in the output. Use :func:`unique_everseen` on the input to avoid generating
    duplicates:

        >>> seq = [1, 1, 0]
        >>> list(powerset(seq))
        [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)]
        >>> from more_itertools import unique_everseen
        >>> list(powerset(unique_everseen(seq)))
        [(), (1,), (0,), (1, 0)]

    c3�6�K�|]}t�|����y�wr])r)ri�r�ss  �r3rkzpowerset.<locals>.<genexpr>vs�����M�;L�a�|�A�q�1�;L�s�rl)r/rrJ�rangerm)r2r�s @r3r r bs2���&	
�X��A����M�5��Q��!��;L�M�M�Mr4c#��K�t�}|j}g}|j}|du}|D]}|r||�n|}	||vr||�|���!y#t$r||vr||�|��Y�>wxYw�w)a�
    Yield unique elements, preserving order.

        >>> list(unique_everseen('AAAABBBCCDAABBB'))
        ['A', 'B', 'C', 'D']
        >>> list(unique_everseen('ABBCcAD', str.lower))
        ['A', 'B', 'C', 'D']

    Sequences with a mix of hashable and unhashable items can be used.
    The function will be slower (i.e., `O(n^2)`) for unhashable items.

    Remember that ``list`` objects are unhashable - you can use the *key*
    parameter to transform the list to a tuple (which is hashable) to
    avoid a slowdown.

        >>> iterable = ([1, 2], [2, 3], [1, 2])
        >>> list(unique_everseen(iterable))  # Slow
        [[1, 2], [2, 3]]
        >>> list(unique_everseen(iterable, key=tuple))  # Faster
        [[1, 2], [2, 3]]

    Similary, you may want to convert unhashable ``set`` objects with
    ``key=frozenset``. For ``dict`` objects,
    ``key=lambda x: frozenset(x.items())`` can be used.

    N)�set�add�append�	TypeError)	r2�key�seenset�seenset_add�seenlist�seenlist_add�use_key�element�ks	         r3r,r,ys�����6�e�G��+�+�K��H��?�?�L���o�G���#�C��L���	�����A���
�����	��� ��Q���
��	�s(�:A/�A�
A/�A,�)A/�+A,�,A/c
�p�ttttjd�t	||���S)z�Yields elements in order, ignoring serial duplicates

    >>> list(unique_justseen('AAAABBBCCDAABBB'))
    ['A', 'B', 'C', 'D', 'A', 'B']
    >>> list(unique_justseen('ABBCcAD', str.lower))
    ['A', 'B', 'C', 'A', 'D']

    rl)r6r>rM�
itemgetterr)r2r�s  r3r-r-�s*���t�S��,�,�Q�/���3�1G�H�I�Ir4c#�NK�	|�	|���	|����
#|$rYywxYw�w)aXYields results from a function repeatedly until an exception is raised.

    Converts a call-until-exception interface to an iterator interface.
    Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel
    to end the loop.

        >>> l = [0, 1, 2]
        >>> list(iter_except(l.pop, IndexError))
        [2, 1, 0]

    Nrt)rT�	exception�firsts   r3rr�s8����
����'�M���&�L����
��
�s�%��"�%�"�%c�.�tt||�|�S)a�
    Returns the first true value in the iterable.

    If no true value is found, returns *default*

    If *pred* is not None, returns the first item for which
    ``pred(item) == True`` .

        >>> first_true(range(10))
        1
        >>> first_true(range(10), pred=lambda x: x > 5)
        6
        >>> first_true(range(10), default='missing', pred=lambda x: x > 9)
        'missing'

    )r>�filter)r2rArFs   r3rr�s��"��t�X�&��0�0r4rl)r
c�h�|D�cgc]
}t|���c}|z}td�|D��Scc}w)a�Draw an item at random from each of the input iterables.

        >>> random_product('abc', range(4), 'XYZ')  # doctest:+SKIP
        ('c', 3, 'Z')

    If *repeat* is provided as a keyword argument, that many items will be
    drawn from each iterable.

        >>> random_product('abcd', range(4), repeat=2)  # doctest:+SKIP
        ('a', 2, 'd', 3)

    This equivalent to taking a random selection from
    ``itertools.product(*args, **kwarg)``.

    c3�2K�|]}t|����y�wr])r)ri�pools  r3rkz!random_product.<locals>.<genexpr>�s����0�%�$����%�s�)rK)r
rVr��poolss    r3r&r&�s7�� &*�*�T�T�U�4�[�T�*�V�3�E��0�%�0�0�0��
+s�/c�`�t|�}|�t|�n|}tt||��S)abReturn a random *r* length permutation of the elements in *iterable*.

    If *r* is not specified or is ``None``, then *r* defaults to the length of
    *iterable*.

        >>> random_permutation(range(5))  # doctest:+SKIP
        (3, 4, 0, 1, 2)

    This equivalent to taking a random selection from
    ``itertools.permutations(iterable, r)``.

    )rKrmr)r2r�r�s   r3r%r%�s-����?�D��Y��D�	�A�A����a��!�!r4c���t|��t��}ttt	|�|��}t�fd�|D��S)z�Return a random *r* length subsequence of the elements in *iterable*.

        >>> random_combination(range(5), 3)  # doctest:+SKIP
        (2, 3, 4)

    This equivalent to taking a random selection from
    ``itertools.combinations(iterable, r)``.

    c3�(�K�|]	}�|���y�wr]rt�ri�ir�s  �r3rkz%random_combination.<locals>.<genexpr>������*�'�Q��a��'���)rKrm�sortedrr�)r2r�r1�indicesr�s    @r3r$r$s=�����?�D��D�	�A��V�E�!�H�a�(�)�G��*�'�*�*�*r4c����t|��t���t�fd�t|�D��}t�fd�|D��S)aSReturn a random *r* length subsequence of elements in *iterable*,
    allowing individual elements to be repeated.

        >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP
        (0, 0, 1, 2, 2)

    This equivalent to taking a random selection from
    ``itertools.combinations_with_replacement(iterable, r)``.

    c3�4�K�|]}t�����y�wr])r)rir�r1s  �r3rkz6random_combination_with_replacement.<locals>.<genexpr>s�����4�8�a�Y�q�\�8�s�c3�(�K�|]	}�|���y�wr]rtr�s  �r3rkz6random_combination_with_replacement.<locals>.<genexpr>r�r�)rKrmr�r�)r2r�r�r1r�s   @@r3r#r#s<�����?�D��D�	�A��4�5��8�4�4�G��*�'�*�*�*r4c��t|�}t|�}|dks||kDrt�d}t|||z
�}t	d|dz�D]}|||z
|zz|z}�|dkr||z
}|dks||k\rt
�g}|rL||z|z|dz
|dz
}}}||k\r||z}|||z
z|z|dz
}}||k\r�|j
|d|z
�|r�Lt|�S)aEquivalent to ``list(combinations(iterable, r))[index]``.

    The subsequences of *iterable* that are of length *r* can be ordered
    lexicographically. :func:`nth_combination` computes the subsequence at
    sort position *index* directly, without computing the previous
    subsequences.

        >>> nth_combination(range(5), 3, 5)
        (0, 3, 4)

    ``ValueError`` will be raised If *r* is negative or greater than the length
    of *iterable*.
    ``IndexError`` will be raised if the given *index* is invalid.
    rrl���)rKrm�
ValueError�minr��
IndexErrorr�)	r2r��indexr�r1�cr�r��results	         r3rr"s����?�D��D�	�A�	�A��1�q�5���	�A��A�q�1�u�
�A�
�1�a�!�e�_��
��Q����O�q� ���
�q�y�
��
��
��	�u��z���
�F�
��a�%�1�*�a�!�e�Q��U�a�1���q�j��Q�J�E���A��;�!�#�Q��U�q�A��q�j�	�
�
�d�2��6�l�#����=�r4c��t|g|�S)aYield *value*, followed by the elements in *iterator*.

        >>> value = '0'
        >>> iterator = ['1', '2', '3']
        >>> list(prepend(value, iterator))
        ['0', '1', '2', '3']

    To prepend multiple values, see :func:`itertools.chain`
    or :func:`value_chain`.

    )r)�valuer?s  r3r!r!Ls���%��(�#�#r4c#�K�t|�ddd�}t|�}tdg|��|z}t|t	d|dz
��D]9}|j|�t
ttj||�����;y�w)aBConvolve the iterable *signal* with the iterable *kernel*.

        >>> signal = (1, 2, 3, 4, 5)
        >>> kernel = [3, 2, 1]
        >>> list(convolve(signal, kernel))
        [3, 8, 14, 20, 26, 14, 5]

    Note: the input arguments are not interchangeable, as the *kernel*
    is immediately consumed and stored.

    Nr�rr:rl)
rKrmrrr
r�rEr6rMrN)�signal�kernelr1�windowrus     r3rr[sv�����6�]�4�R�4�
 �F��F��A�
�A�3�q�
!�A�
%�F�
�6�6�!�Q��U�+�
,���
�
�a���#�h�l�l�F�F�3�4�4�-�s�BB)rr])NN)6�__doc__rc�collectionsr�	itertoolsrrrrrr	r
rrr
rM�randomrrr�__all__r+r)r*rrrr{r"rrrrrr'r[rr^�ImportErrorrr(rr r,r-rrr&r%r$r#rr!rrtr4r3�<module>r�s
���������,�,���B
%� '�$+�%+�P
4�0�!�$�)���;�.�	,�.�6�	)�8�
0�!�(�(�H��
3� 2�.�>N�.*�Z	J�
�*1�("#�1�("�$
+� +�"'�T$�5��S
���H��s�'B8�8C�Cpython3.12/site-packages/setuptools/_vendor/more_itertools/__pycache__/more.cpython-312.pyc000064400000415142151732704070025726 0ustar00�

��_i�����ddlZddlmZmZmZmZddlmZddlm	Z	m
Z
mZddlm
Z
mZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZddlmZm Z m!Z!m"Z"ddl#m$Z$m%Z%dd	l&m&Z&m'Z'm(Z(dd
l)m*Z*m+Z+m,Z,m-Z-m.Z.ddl/m0Z0m1Z1ddl2m3Z3d
dl4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:gd�Z;e<�Z=dxd�Z>e=fd�Z?e=fd�Z@e=fd�ZAGd�d�ZBd�ZCd�ZDd�ZEd�ZFd�ZGdyd�ZHdzd�ZId{d�ZJd�ZKd|d �ZLd!�ZMdxd"�ZNGd#�d$�ZOd{d%�ZPd&�ZQd'�ZRdyd(�ZSd}d)�ZTdxd*�ZUd~d+�ZVdd,�ZWdd-�ZXdd.�ZYd/�ZZd�d0�Z[dzd1�Z\d2�Z]d�d3�Z^Gd4�d5e_�Z`d6�Zad7�Zbddd8�d9�Zcd�d;�Zdd<�Zed=�Zfegehffd>�Zid{d?�Zjd}d@�ZkGdA�dBejej��ZmdzdC�ZndD�ZoepdfdE�ZqdF�ZrdG�ZsdH�ZtGdI�dJ�ZudK�ZvdL�ZwdM�fdN�Zxe,fddO�dP�ZyGdQ�dRe�ZzGdS�dT�Z{GdU�dV�Z|epfdW�Z}dX�Z~d:dY�ZdydZ�Z�epdfd[�Z�d|d\�Z�d]�Z�dzd^�Z�Gd_�d`�Z�dyda�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dzdh�Z�d�di�Z�Gdj�dke��Z�Gdl�dm�Z�dn�Z�dzdo�Z�dp�Z�dq�Z�dr�Z�ds�Z�dt�Z�du�Z�Gdv�dw�Z�y)��N)�Counter�defaultdict�deque�abc)�Sequence)�partial�reduce�wraps)�merge�heapify�heapreplace�heappop)�chain�compress�count�cycle�	dropwhile�groupby�islice�repeat�starmap�	takewhile�tee�zip_longest)�exp�	factorial�floor�log)�Empty�Queue)�random�	randrange�uniform)�
itemgetter�mul�sub�gt�lt)�
hexversion�maxsize)�	monotonic�)�consume�flatten�pairwise�powerset�take�unique_everseen)S�AbortThread�adjacent�always_iterable�always_reversible�bucket�
callback_iter�chunked�circular_shifts�collapse�collate�consecutive_groups�consumer�	countable�count_cycle�	mark_ends�
difference�distinct_combinations�distinct_permutations�
distribute�divide�	exactly_n�
filter_except�first�groupby_transform�ilen�interleave_longest�
interleave�intersperse�islice_extended�iterate�ichunked�	is_sorted�last�locate�lstrip�make_decorator�
map_except�
map_reduce�nth_or_last�nth_permutation�nth_product�
numeric_range�one�only�padded�
partitions�set_partitions�peekable�repeat_last�replace�rlocate�rstrip�
run_length�sample�seekable�SequenceView�side_effect�sliced�
sort_together�split_at�split_after�split_before�
split_when�
split_into�spy�stagger�strip�
substrings�substrings_indexes�time_limited�unique_to_each�unzip�windowed�	with_iter�UnequalIterablesError�	zip_equal�
zip_offset�windowed_complete�
all_unique�value_chain�
product_index�combination_index�permutation_indexFc	����ttt�t|��g��|r��fd�}t|��S�S)aJBreak *iterable* into lists of length *n*:

        >>> list(chunked([1, 2, 3, 4, 5, 6], 3))
        [[1, 2, 3], [4, 5, 6]]

    By the default, the last yielded list will have fewer than *n* elements
    if the length of *iterable* is not divisible by *n*:

        >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3))
        [[1, 2, 3], [4, 5, 6], [7, 8]]

    To use a fill-in value instead, see the :func:`grouper` recipe.

    If the length of *iterable* is not divisible by *n* and *strict* is
    ``True``, then ``ValueError`` will be raised before the last
    list is yielded.

    c3�V�K��D]}t|��k7rtd��|���!y�w)Nziterable is not divisible by n.��len�
ValueError)�chunk�iterator�ns ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/more_itertools/more.py�retzchunked.<locals>.ret�s-�����!���u�:��?�$�%F�G�G���"���&))�iterrr1)�iterabler��strictr�r�s `  @r�r9r9~s9���&�G�D�!�T�(�^�4�b�9�H�
�	��C�E�{����c��	tt|��S#t$r }|turt	d�|�|cYd}~Sd}~wwxYw)a�Return the first item of *iterable*, or *default* if *iterable* is
    empty.

        >>> first([0, 1, 2, 3])
        0
        >>> first([], 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.

    :func:`first` is useful when you have a generator of expensive-to-retrieve
    values and want any arbitrary one. It is marginally shorter than
    ``next(iter(iterable), default)``.

    zKfirst() was called on an empty iterable, and no default value was provided.N)�nextr��
StopIteration�_markerr�)r��default�es   r�rIrI�sL��"��D��N�#�#�����g���.���
����
�s��	?�:�?�?c��	t|t�r|dSt|d�rtdk7rt	t|��St
|d��dS#tttf$r|turtd��|cYSwxYw)aReturn the last item of *iterable*, or *default* if *iterable* is
    empty.

        >>> last([0, 1, 2, 3])
        3
        >>> last([], 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.
    ����__reversed__i�r,��maxlenzDlast() was called on an empty iterable, and no default was provided.)�
isinstancer�hasattrr)r��reversedr�
IndexError�	TypeErrorr�r�r�)r�r�s  r�rSrS�s�����h��)��B�<��
�X�~�
.�J�*�4L����*�+�+���!�,�R�0�0���	�=�1���g�����
���
�s�A�(A�A�)A<�;A<c�6�tt||dz�|��S)agReturn the nth or the last item of *iterable*,
    or *default* if *iterable* is empty.

        >>> nth_or_last([0, 1, 2, 3], 2)
        2
        >>> nth_or_last([0, 1], 2)
        1
        >>> nth_or_last([], 0, 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.
    r,�r�)rSr)r�r�r�s   r�rYrY�s����x��Q��'��9�9r�c�D�eZdZdZd�Zd�Zd�Zefd�Zd�Z	d�Z
d�Zd	�Zy
)rbaWrap an iterator to allow lookahead and prepending elements.

    Call :meth:`peek` on the result to get the value that will be returned
    by :func:`next`. This won't advance the iterator:

        >>> p = peekable(['a', 'b'])
        >>> p.peek()
        'a'
        >>> next(p)
        'a'

    Pass :meth:`peek` a default value to return that instead of raising
    ``StopIteration`` when the iterator is exhausted.

        >>> p = peekable([])
        >>> p.peek('hi')
        'hi'

    peekables also offer a :meth:`prepend` method, which "inserts" items
    at the head of the iterable:

        >>> p = peekable([1, 2, 3])
        >>> p.prepend(10, 11, 12)
        >>> next(p)
        10
        >>> p.peek()
        11
        >>> list(p)
        [11, 12, 1, 2, 3]

    peekables can be indexed. Index 0 is the item that will be returned by
    :func:`next`, index 1 is the item after that, and so on:
    The values up to the given index will be cached.

        >>> p = peekable(['a', 'b', 'c', 'd'])
        >>> p[0]
        'a'
        >>> p[1]
        'b'
        >>> next(p)
        'a'

    Negative indexes are supported, but be aware that they will cache the
    remaining items in the source iterator, which may require significant
    storage.

    To check whether a peekable is exhausted, check its truth value:

        >>> p = peekable(['a', 'b'])
        >>> if p:  # peekable has items
        ...     list(p)
        ['a', 'b']
        >>> if not p:  # peekable is exhausted
        ...     list(p)
        []

    c�B�t|�|_t�|_y�N)r��_itr�_cache��selfr�s  r��__init__zpeekable.__init__$s����>����g��r�c��|Sr���r�s r��__iter__zpeekable.__iter__(����r�c�D�	|j�y#t$rYywxYw�NFT��peekr�r�s r��__bool__zpeekable.__bool__+�)��	��I�I�K����	��	����	�c���|js/	|jjt|j��|jdS#t$r|t
ur�|cYSwxYw)z�Return the item that will be next returned from ``next()``.

        Return ``default`` if there are no items left. If ``default`` is not
        provided, raise ``StopIteration``.

        r)r��appendr�r�r�r�)r�r�s  r�r�z
peekable.peek2s[���{�{�
����"�"�4����>�2�
�{�{�1�~���	!�
��g�%����
�s�.A�A"�!A"c�L�|jjt|��y)aStack up items to be the next ones returned from ``next()`` or
        ``self.peek()``. The items will be returned in
        first in, first out order::

            >>> p = peekable([1, 2, 3])
            >>> p.prepend(10, 11, 12)
            >>> next(p)
            10
            >>> list(p)
            [11, 12, 1, 2, 3]

        It is possible, by prepending items, to "resurrect" a peekable that
        previously raised ``StopIteration``.

            >>> p = peekable([])
            >>> next(p)
            Traceback (most recent call last):
              ...
            StopIteration
            >>> p.prepend(1)
            >>> next(p)
            1
            >>> next(p)
            Traceback (most recent call last):
              ...
            StopIteration

        N)r��
extendleftr�)r��itemss  r��prependzpeekable.prependBs��:	
�����x���/r�c�x�|jr|jj�St|j�Sr�)r��popleftr�r�r�s r��__next__zpeekable.__next__as*���;�;��;�;�&�&�(�(��D�H�H�~�r�c��|j�dn|j}|dkDr9|j�dn|j}|j�tn|j}nM|dkr=|j�dn|j}|j�
tdz
n|j}nt	d��|dks|dkr&|j
j
|j�nitt||�dzt�}t|j
�}||k\r2|j
j
t|j||z
��t|j
�|S)Nr,rr�zslice step cannot be zero)
�step�start�stopr*r�r��extendr��min�maxr�r�list)r��indexr�r�r�r��	cache_lens       r��
_get_slicezpeekable._get_slicegs���Z�Z�'�q�e�j�j���!�8��+�+�-�A�E�K�K�E�$�z�z�1�7��
�
�D�
�A�X� �;�;�.�B�U�[�[�E�&+�j�j�&8�W�H�q�L�u�z�z�D��8�9�9�
�A�I�4�!�8��K�K���t�x�x�(��C��t�$�q�(�'�2�A��D�K�K�(�I��I�~����"�"�6�$�(�(�A�	�M�#B�C��D�K�K� ��'�'r�c�V�t|t�r|j|�St|j�}|dkr&|jj|j�n:||k\r5|jjt|j|dz|z
��|j|S�Nrr,)r��slicer�r�r�r�r�r)r�r�r�s   r��__getitem__zpeekable.__getitem__�s����e�U�#��?�?�5�)�)�����$�	��1�9��K�K���t�x�x�(�
�i�
��K�K���v�d�h�h���	�I�0E�F�G��{�{�5�!�!r�N)
�__name__�
__module__�__qualname__�__doc__r�r�r�r�r�r�r�r�r�r�r�r�rbrb�s5��8�t���#�� 0�>�(�4
"r�rbc�L�tjdt�t|i|��S)a�Return a sorted merge of the items from each of several already-sorted
    *iterables*.

        >>> list(collate('ACDZ', 'AZ', 'JKL'))
        ['A', 'A', 'C', 'D', 'J', 'K', 'L', 'Z', 'Z']

    Works lazily, keeping only the next value from each iterable in memory. Use
    :func:`collate` to, for example, perform a n-way mergesort of items that
    don't fit in memory.

    If a *key* function is specified, the iterables will be sorted according
    to its result:

        >>> key = lambda s: int(s)  # Sort by numeric value, not by string
        >>> list(collate(['1', '10'], ['2', '11'], key=key))
        ['1', '2', '10', '11']


    If the *iterables* are sorted in descending order, set *reverse* to
    ``True``:

        >>> list(collate([5, 3, 1], [4, 2, 0], reverse=True))
        [5, 4, 3, 2, 1, 0]

    If the elements of the passed-in iterables are out of order, you might get
    unexpected results.

    On Python 3.5+, this function is an alias for :func:`heapq.merge`.

    z<collate is no longer part of more_itertools, use heapq.merge)�warnings�warn�DeprecationWarningr)�	iterables�kwargss  r�r<r<�s(��>
�M�M�F����)�&�v�&�&r�c�.��t���fd��}|S)abDecorator that automatically advances a PEP-342-style "reverse iterator"
    to its first yield point so you don't have to call ``next()`` on it
    manually.

        >>> @consumer
        ... def tally():
        ...     i = 0
        ...     while True:
        ...         print('Thing number %s is %s.' % (i, (yield)))
        ...         i += 1
        ...
        >>> t = tally()
        >>> t.send('red')
        Thing number 0 is red.
        >>> t.send('fish')
        Thing number 1 is fish.

    Without the decorator, you would have to call ``next(t)`` before
    ``t.send()`` could be used.

    c�.���|i|��}t|�|Sr�)r�)�argsr��gen�funcs   �r��wrapperzconsumer.<locals>.wrapper�s����D�#�F�#���S�	��
r�)r
)r�r�s` r�r>r>�s"���.�4�[����
�Nr�c�Z�t�}tt||�d��t|�S)z�Return the number of items in *iterable*.

        >>> ilen(x for x in range(1000000) if x % 3 == 0)
        333334

    This consumes the iterable, so handle with care.

    rr�)rr�zipr�)r��counters  r�rKrK�s&���g�G�	�#�h��
 ��+���=�r�c#�&K�	|��||�}�
�w)z�Return ``start``, ``func(start)``, ``func(func(start))``, ...

    >>> from itertools import islice
    >>> list(islice(iterate(lambda x: 2*x, 1), 10))
    [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]

    r�)r�r�s  r�rPrP�s��������U����s�c#�RK�|5}|Ed{���ddd�y7�
#1swYyxYw�w)a:Wrap an iterable in a ``with`` statement, so it closes once exhausted.

    For example, this will close the file when the iterator is exhausted::

        upper_lines = (line.upper() for line in with_iter(open('foo')))

    Any context manager which returns an iterable is a candidate for
    ``with_iter``.

    Nr�)�context_managerr�s  r�r|r|�s(����
�H����
����
��s �'����	'��$�'c���t|�}	t|�}	t|�}dj	||�}|xst|��#t$r}|xstd�|�d}~wwxYw#t$rY|SwxYw)a�Return the first item from *iterable*, which is expected to contain only
    that item. Raise an exception if *iterable* is empty or has more than one
    item.

    :func:`one` is useful for ensuring that an iterable contains only one item.
    For example, it can be used to retrieve the result of a database query
    that is expected to return a single row.

    If *iterable* is empty, ``ValueError`` will be raised. You may specify a
    different exception with the *too_short* keyword:

        >>> it = []
        >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: too many items in iterable (expected 1)'
        >>> too_short = IndexError('too few items')
        >>> one(it, too_short=too_short)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        IndexError: too few items

    Similarly, if *iterable* contains more than one item, ``ValueError`` will
    be raised. You may specify a different exception with the *too_long*
    keyword:

        >>> it = ['too', 'many']
        >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: Expected exactly one item in iterable, but got 'too',
        'many', and perhaps more.
        >>> too_long = RuntimeError
        >>> one(it, too_long=too_long)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        RuntimeError

    Note that :func:`one` attempts to advance *iterable* twice to ensure there
    is only one item. See :func:`spy` or :func:`peekable` to check iterable
    contents less destructively.

    z&too few items in iterable (expected 1)N�LExpected exactly one item in iterable, but got {!r}, {!r}, and perhaps more.)r�r�r�r��format)r��	too_short�too_long�it�first_valuer��second_value�msgs        r�r]r]s���X
�h��B���2�h��	*��B�x��

 � &��{�L� A�	��)�*�S�/�)�����M��$L�M��	�����
����
�s(�A�A&�	A#�A�A#�&	A3�2A3c����fd�}d�}t|�}t|��|��}d|cxkr�krnn|�k(r||�S|||�St|rd�Sd�S)a�Yield successive distinct permutations of the elements in *iterable*.

        >>> sorted(distinct_permutations([1, 0, 1]))
        [(0, 1, 1), (1, 0, 1), (1, 1, 0)]

    Equivalent to ``set(permutations(iterable))``, except duplicates are not
    generated and thrown away. For larger input sequences this is much more
    efficient.

    Duplicate permutations arise when there are duplicated elements in the
    input iterable. The number of items returned is
    `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of
    items input, and each `x_i` is the count of a distinct item in the input
    sequence.

    If *r* is given, only the *r*-length permutations are yielded.

        >>> sorted(distinct_permutations([1, 0, 1], r=2))
        [(0, 1), (1, 0), (1, 1)]
        >>> sorted(distinct_permutations(range(3), r=2))
        [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)]

    c3��K�	t|���t�dz
dd�D]}||||dzks�nyt�dz
|d�D]}||||ks�n|||c||<||<|d|�z
d�||dzd�x�w)N�r�r,)�tuple�range)�A�i�j�sizes   �r��_fullz$distinct_permutations.<locals>._full]s���������(�N��4�!�8�R��,���Q�4�!�A��E�(�?��-�
��4�!�8�Q��+���Q�4�!�A�$�;��,��1��q��t�J�A�a�D�!�A�$��?�Q��X��?�+�A�a�!�e�g�J�)�s�0A=�"A=�&A=c3�K�|d|||d}}t|dz
dd�}tt|��}	t|���|d}|D]}|||krn||}�y|D] }||||kDs�||||c||<||<n&|D] }||||kDs�||||c||<||<n||d||z
d�z
}|dz
}|d||z
|||z
dc||d|dd���w)Nr,r�)r�r�r�)	r��r�head�tail�right_head_indexes�left_tail_indexes�pivotr�r�s	         r��_partialz'distinct_permutations.<locals>._partialusD�����r��U�A�a�b�E�d��"�1�q�5�"�b�1��!�#�d�)�,�����+����H�E�'����7�U�?���Q���(�
�'����7�T�!�W�$�'+�A�w��Q��$�D��G�T�!�W��'�,�A��A�w��a��(�+/��7�D��G�(��Q���a���,�
�D��1�q�5�2��&�&�D�
��F�A� $�W�q�1�u�
�t�A��E�G�}��D���H�d�1�g�?�s�A)C�,$C�?Crr�)r�)�sortedr�r�)r�r�r�rr�r�s     @r�rDrDDsi���2,�0%=�N
�8��E��u�:�D��y����1�}��}� !�T�	�u�U�|�B����0B�B��a��#�#�U�#�#r�c���|dk(rtd��|dk(r ttt|�|�dd�St|g�}t	||�}ttt||�dd��S)a6Intersperse filler element *e* among the items in *iterable*, leaving
    *n* items between each filler element.

        >>> list(intersperse('!', [1, 2, 3, 4, 5]))
        [1, '!', 2, '!', 3, '!', 4, '!', 5]

        >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2))
        [1, 2, None, 3, 4, None, 5]

    rz
n must be > 0r,N)r�rrMrr9r.)r�r�r��filler�chunkss     r�rNrN�sm��	�A�v���)�)�	
�a���j����H�5�q�$�?�?�
�������1�%���v�j���8�!�T�B�C�Cr�c	�2�|D�cgc]
}t|���}}ttjt	t
|���}|D�chc]
}||dk(s�|��}}|D�cgc]!}tt
|j|����#c}Scc}wcc}wcc}w)a�Return the elements from each of the input iterables that aren't in the
    other input iterables.

    For example, suppose you have a set of packages, each with a set of
    dependencies::

        {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}}

    If you remove one package, which dependencies can also be removed?

    If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not
    associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for
    ``pkg_2``, and ``D`` is only needed for ``pkg_3``::

        >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'})
        [['A'], ['C'], ['D']]

    If there are duplicates in one input iterable that aren't in the others
    they will be duplicated in the output. Input order is preserved::

        >>> unique_to_each("mississippi", "missouri")
        [['p', 'p'], ['o', 'u', 'r']]

    It is assumed that the elements of each iterable are hashable.

    r,)r�rr�
from_iterable�map�set�filter�__contains__)r�r��pool�counts�element�uniquess      r�ryry�s���6 )�)�y��D��H�y�D�)�
�U�(�(��S�$��8�
9�F�&,�E�f�7��w��1�0D�w�f�G�E�=A�B�T�r�D���,�,�b�1�2�T�B�B��*��E��Bs�B
�	
B�B�!&Bc
#�K�|dkrtd��|dk(r
t���y|dkrtd��t|��}|}t|j|�D]}|dz}|r�|}t|����t|�}||kr%tt
|t|||z
�����yd|cxkrt||�krny||f|zz
}t|���yy�w)aMReturn a sliding window of width *n* over the given iterable.

        >>> all_windows = windowed([1, 2, 3, 4, 5], 3)
        >>> list(all_windows)
        [(1, 2, 3), (2, 3, 4), (3, 4, 5)]

    When the window is larger than the iterable, *fillvalue* is used in place
    of missing values:

        >>> list(windowed([1, 2, 3], 4))
        [(1, 2, 3, None)]

    Each window will advance in increments of *step*:

        >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2))
        [(1, 2, 3), (3, 4, 5), (5, 6, '!')]

    To slide into the iterable's items, use :func:`chain` to add filler items
    to the left:

        >>> iterable = [1, 2, 3, 4]
        >>> n = 3
        >>> padding = [None] * (n - 1)
        >>> list(windowed(chain(padding, iterable), 3))
        [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)]
    r�n must be >= 0Nr,zstep must be >= 1r�)	r�r�rr
r�r�rrr�)�seqr��	fillvaluer��windowr��_r�s        r�r{r{�s�����6	�1�u��)�*�*��A�v��g�
���a�x��,�-�-�
�!�_�F�	�A�
�����
$��	�Q�����A���-��	%��v�;�D��a�x��E�&�&��A��H�"=�>�?�?�	
�Q�	��T�1��	��9�,��"�"���F�m��
�s
�A!C�$A6Cc#��K�g}t|�D]}|j|�|f���t|�}t|�}t	d|dz�D]"}t	||z
dz�D]}||||z����$y�w)aFYield all of the substrings of *iterable*.

        >>> [''.join(s) for s in substrings('more')]
        ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more']

    Note that non-string iterables can also be subdivided.

        >>> list(substrings([0, 1, 2]))
        [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)]

    r�r,N)r�r�r�r�r�)r�r�item�
item_countr�r�s      r�rvrvs�����
�C��X����
�
�4���g�
����*�C��S��J��1�j�1�n�
%���z�A�~��)�*�A��a�!�a�%�.� �+�&�s�A4A6c�d��tdt��dz�}|rt|�}�fd�|D�S)a@Yield all substrings and their positions in *seq*

    The items yielded will be a tuple of the form ``(substr, i, j)``, where
    ``substr == seq[i:j]``.

    This function only works for iterables that support slicing, such as
    ``str`` objects.

    >>> for item in substrings_indexes('more'):
    ...    print(item)
    ('m', 0, 1)
    ('o', 1, 2)
    ('r', 2, 3)
    ('e', 3, 4)
    ('mo', 0, 2)
    ('or', 1, 3)
    ('re', 2, 4)
    ('mor', 0, 3)
    ('ore', 1, 4)
    ('more', 0, 4)

    Set *reverse* to ``True`` to yield the same items in the opposite order.


    r,c3�x�K�|]1}tt��|z
dz�D]}�|||z|||zf����3y�w�r,N)r�r�)�.0�Lr�rs   �r��	<genexpr>z%substrings_indexes.<locals>.<genexpr>MsF������,-�q�u�S��X��\�A�=M�7N�!��Q��Q����A��E�"�7N�"�A�s�7:)r�r�r�)r�reverser�s`  r�rwrw0s7���4	�a��S��A���A���Q�K���,-��r�c�0�eZdZdZdd�Zd�Zd�Zd�Zd�Zy)	r7a�Wrap *iterable* and return an object that buckets it iterable into
    child iterables based on a *key* function.

        >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
        >>> s = bucket(iterable, key=lambda x: x[0])  # Bucket by 1st character
        >>> sorted(list(s))  # Get the keys
        ['a', 'b', 'c']
        >>> a_iterable = s['a']
        >>> next(a_iterable)
        'a1'
        >>> next(a_iterable)
        'a2'
        >>> list(s['b'])
        ['b1', 'b2', 'b3']

    The original iterable will be advanced and its items will be cached until
    they are used by the child iterables. This may require significant storage.

    By default, attempting to select a bucket to which no items belong  will
    exhaust the iterable and cache all values.
    If you specify a *validator* function, selected buckets will instead be
    checked against it.

        >>> from itertools import count
        >>> it = count(1, 2)  # Infinite sequence of odd numbers
        >>> key = lambda x: x % 10  # Bucket by last digit
        >>> validator = lambda x: x in {1, 3, 5, 7, 9}  # Odd digits only
        >>> s = bucket(it, key=key, validator=validator)
        >>> 2 in s
        False
        >>> list(s[2])
        []

    Nc�r�t|�|_||_tt�|_|xsd�|_y)Nc��y�NTr���xs r��<lambda>z!bucket.__init__.<locals>.<lambda>zs��$r�)r�r��_keyrrr��
_validator)r�r��key�	validators    r�r�zbucket.__init__vs,����>�����	�!�%�(���#�7���r�c��|j|�sy	t||�}|j|j|�y#t$rYywxYwr�)r*r�r��
appendleftr�)r��valuers   r�r
zbucket.__contains__|sT�����u�%��	0���U��$�D�
�K�K���)�)�$�/����	��	�s�A�	A
�A
c#�NK�	|j|r |j|j���nb		t|j�}|j|�}||k(r|��n0|j
|�r|j|j|��a��#t$rYywxYw�w)z�
        Helper to yield items from the parent iterator that match *value*.
        Items that don't match are stored in the local cache as they
        are encountered.
        N)r�r�r�r�r�r)r*r�)r�r/r�
item_values    r��_get_valueszbucket._get_values�s�������{�{�5�!��k�k�%�(�0�0�2�2���#�D�H�H�~��"&���4��J�!�U�*�"�
������4����J�/�6�6�t�<����)����s)�2B%�B�
AB%�	B"�B%�!B"�"B%c#�K�|jD]C}|j|�}|j|�s�&|j|j	|��E|jj�Ed{���y7��wr�)r�r)r*r�r��keys)r�rr1s   r�r�zbucket.__iter__�s\�����H�H�D����4��J����z�*����J�'�.�.�t�4��
�;�;�#�#�%�%�%�s�2A:�=A:�2A8�3A:c�\�|j|�std�S|j|�S)Nr�)r*r�r2�r�r/s  r�r�zbucket.__getitem__�s(�����u�%���8�O�����&�&r�r�)	r�r�r�r�r�r
r2r�r�r�r�r�r7r7Rs!��!�F8��=�4&�'r�r7c�h�t|�}t||�}|j�t||�fS)a�Return a 2-tuple with a list containing the first *n* elements of
    *iterable*, and an iterator with the same items as *iterable*.
    This allows you to "look ahead" at the items in the iterable without
    advancing it.

    There is one item in the list by default:

        >>> iterable = 'abcdefg'
        >>> head, iterable = spy(iterable)
        >>> head
        ['a']
        >>> list(iterable)
        ['a', 'b', 'c', 'd', 'e', 'f', 'g']

    You may use unpacking to retrieve items instead of lists:

        >>> (head,), iterable = spy('abcdefg')
        >>> head
        'a'
        >>> (first, second), iterable = spy('abcdefg', 2)
        >>> first
        'a'
        >>> second
        'b'

    The number of items requested can be larger than the number of items in
    the iterable:

        >>> iterable = [1, 2, 3, 4, 5]
        >>> head, iterable = spy(iterable, 10)
        >>> head
        [1, 2, 3, 4, 5]
        >>> list(iterable)
        [1, 2, 3, 4, 5]

    )r�r1�copyr)r�r�r�r�s    r�rsrs�s0��J
�h��B���2�;�D��9�9�;��d�B��'�'r�c�8�tjt|��S)a4Return a new iterable yielding from each iterable in turn,
    until the shortest is exhausted.

        >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8]))
        [1, 4, 6, 2, 5, 7]

    For a version that doesn't terminate after the shortest iterable is
    exhausted, see :func:`interleave_longest`.

    )rr	r�)r�s r�rMrM�s�����s�I��/�/r�c�X�tjt|dti��}d�|D�S)asReturn a new iterable yielding from each iterable in turn,
    skipping any that are exhausted.

        >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8]))
        [1, 4, 6, 2, 5, 7, 3, 8]

    This function produces the same output as :func:`roundrobin`, but may
    perform better for some inputs (in particular when the number of iterables
    is large).

    rc3�2K�|]}|tus�|���y�wr�)r�)rr's  r�r z%interleave_longest.<locals>.<genexpr>�s����-�q�!�A�W�,�A�q�s�
�)rr	rr�)r�r�s  r�rLrL�s)��	���K��F�g�F�G�A�-�q�-�-r�c#�F���K����fd���|d�Ed{���y7��w)a>Flatten an iterable with multiple levels of nesting (e.g., a list of
    lists of tuples) into non-iterable types.

        >>> iterable = [(1, 2), ([3, 4], [[5], [6]])]
        >>> list(collapse(iterable))
        [1, 2, 3, 4, 5, 6]

    Binary and text strings are not considered iterable and
    will not be collapsed.

    To avoid collapsing other types, specify *base_type*:

        >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']]
        >>> list(collapse(iterable, base_type=tuple))
        ['ab', ('cd', 'ef'), 'gh', 'ij']

    Specify *levels* to stop flattening after a certain level:

    >>> iterable = [('a', ['b']), ('c', ['d'])]
    >>> list(collapse(iterable))  # Fully flattened
    ['a', 'b', 'c', 'd']
    >>> list(collapse(iterable, levels=1))  # Only one level flattened
    ['a', ['b'], 'c', ['d']]

    c3���K���|�kDs$t|ttf�s��t|��r|��y	t|�}|D]}�||dz�Ed{����y7�#t$r|��YywxYw�w�Nr,)r��str�bytesr�r�)�node�level�tree�child�	base_type�levels�walks    ���r�rGzcollapse.<locals>.walks������� �u�v�~��$��e��-��&�J�t�Y�,G��J��	2���:�D�
����u�q�y�1�1�1��1���	��J��	�s4�1A1�A�A1�A�A1�
A.�+A1�-A.�.A1rNr�)r�rErFrGs ``@r�r;r;�s�����62�$�H�a� � � �s�!��!c#��K�	|�|�|�|D]}||�|���n#t||�D]}||�|Ed{����|�|�yy7�#|�|�wwxYw�w)auInvoke *func* on each item in *iterable* (or on each *chunk_size* group
    of items) before yielding the item.

    `func` must be a function that takes a single argument. Its return value
    will be discarded.

    *before* and *after* are optional functions that take no arguments. They
    will be executed before iteration starts and after it ends, respectively.

    `side_effect` can be used for logging, updating progress bars, or anything
    that is not functionally "pure."

    Emitting a status message:

        >>> from more_itertools import consume
        >>> func = lambda item: print('Received {}'.format(item))
        >>> consume(side_effect(func, range(2)))
        Received 0
        Received 1

    Operating on chunks of items:

        >>> pair_sums = []
        >>> func = lambda chunk: pair_sums.append(sum(chunk))
        >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2))
        [0, 1, 2, 3, 4, 5]
        >>> list(pair_sums)
        [1, 5, 9]

    Writing to a file-like object:

        >>> from io import StringIO
        >>> from more_itertools import consume
        >>> f = StringIO()
        >>> func = lambda x: print(x, file=f)
        >>> before = lambda: print(u'HEADER', file=f)
        >>> after = f.close
        >>> it = [u'a', u'b', u'c']
        >>> consume(side_effect(func, it, before=before, after=after))
        >>> f.closed
        True

    N)r9)r�r��
chunk_size�before�afterrr�s       r�rkrk+s~����X����H��� ���T�
��
�!�!��:�6���U�� � � �7����G��!�����G��s-�A"�;A�A�A�A"�A�A�A"c�����tt��fd�td��D���|r��fd�}t|��S�S)apYield slices of length *n* from the sequence *seq*.

    >>> list(sliced((1, 2, 3, 4, 5, 6), 3))
    [(1, 2, 3), (4, 5, 6)]

    By the default, the last yielded slice will have fewer than *n* elements
    if the length of *seq* is not divisible by *n*:

    >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3))
    [(1, 2, 3), (4, 5, 6), (7, 8)]

    If the length of *seq* is not divisible by *n* and *strict* is
    ``True``, then ``ValueError`` will be raised before the last
    slice is yielded.

    This function will only work for iterables that support slicing.
    For non-sliceable iterables, see :func:`chunked`.

    c3�.�K�|]}�||�z���y�wr�r�)rr�r�rs  ��r�r zsliced.<locals>.<genexpr>|s�����C�{�!�s�1�q�1�u�~�{���rc3�V�K��D]}t|��k7rtd��|���!y�w)Nzseq is not divisible by n.r�)�_slicer�r�s ��r�r�zsliced.<locals>.rets.�����"���v�;�!�#�$�%A�B�B���#�r�)rr�rr�)rr�r�r�r�s``  @r�rlrlhs8���(��C�u�Q��{�C�D�H�
�	��C�E�{���r�c#��K�|dk(rt|���yg}t|�}|D]B}||�r'|��|r|g��|dk(rt|���yg}|dz}�2|j|��D|��y�w)a<Yield lists of items from *iterable*, where each list is delimited by
    an item where callable *pred* returns ``True``.

        >>> list(split_at('abcdcba', lambda x: x == 'b'))
        [['a'], ['c', 'd', 'c'], ['a']]

        >>> list(split_at(range(10), lambda n: n % 2 == 1))
        [[0], [2], [4], [6], [8], []]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2))
        [[0], [2], [4, 5, 6, 7, 8, 9]]

    By default, the delimiting items are not included in the output.
    The include them, set *keep_separator* to ``True``.

        >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True))
        [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']]

    rNr,�r�r�r�)r��pred�maxsplit�keep_separator�bufr�rs       r�rnrn�s~����.�1�}��8�n���
�C�	
�h��B�����:��I���f���1�}��2�h����C���M�H��J�J�t����I�s�A-A/c#��K�|dk(rt|���yg}t|�}|D]@}||�r%|r#|��|dk(r|gt|�z��yg}|dz}|j|��B|r|��yy�w)a\Yield lists of items from *iterable*, where each list ends just before
    an item for which callable *pred* returns ``True``:

        >>> list(split_before('OneTwo', lambda s: s.isupper()))
        [['O', 'n', 'e'], ['T', 'w', 'o']]

        >>> list(split_before(range(10), lambda n: n % 3 == 0))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]]
    rNr,rR�r�rSrTrVr�rs      r�rprp�s����� �1�}��8�n���
�C�	
�h��B�����:�#��I��1�}��f�t�B�x�'�'���C���M�H��
�
�4�����	��s�A.A0c#��K�|dk(rt|���yg}t|�}|D]>}|j|�||�s�|s� |��|dk(rt|���yg}|dz}�@|r|��yy�w)a[Yield lists of items from *iterable*, where each list ends with an
    item where callable *pred* returns ``True``:

        >>> list(split_after('one1two2', lambda s: s.isdigit()))
        [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']]

        >>> list(split_after(range(10), lambda n: n % 3 == 0))
        [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2))
        [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]]

    rNr,rRrXs      r�roro�s~����"�1�}��8�n���
�C�	
�h��B����
�
�4����:�#��I��1�}��2�h����C���M�H����	��s�?A.�A.�)A.c#�K�|dk(rt|���yt|�}	t|�}|g}|D]A}|||�r#|��|dk(r|gt|�z��yg}|dz}|j	|�|}�C|��y#t$rYywxYw�w)a�Split *iterable* into pieces based on the output of *pred*.
    *pred* should be a function that takes successive pairs of items and
    returns ``True`` if the iterable should be split in between them.

    For example, to find runs of increasing numbers, split the iterable when
    element ``i`` is larger than element ``i + 1``:

        >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y))
        [[1, 2, 3, 3], [2, 5], [2, 4], [2]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2],
        ...                 lambda x, y: x > y, maxsplit=2))
        [[1, 2, 3, 3], [2, 5], [2, 4, 2]]

    rNr,)r�r�r�r�r�)r�rSrTr��cur_itemrV�	next_items       r�rqrq�s�����&�1�}��8�n���	
�h��B����8���*�C��	���)�$��I��1�}� �k�D��H�,�,���C���M�H��
�
�9������I��!����s(�B
�A;�AB
�;	B�B
�B�B
c#�K�t|�}|D]*}|�t|���ytt||�����,y�w)a�Yield a list of sequential items from *iterable* of length 'n' for each
    integer 'n' in *sizes*.

        >>> list(split_into([1,2,3,4,5,6], [1,2,3]))
        [[1], [2, 3], [4, 5, 6]]

    If the sum of *sizes* is smaller than the length of *iterable*, then the
    remaining items of *iterable* will not be returned.

        >>> list(split_into([1,2,3,4,5,6], [2,3]))
        [[1, 2], [3, 4, 5]]

    If the sum of *sizes* is larger than the length of *iterable*, fewer items
    will be returned in the iteration that overruns *iterable* and further
    lists will be empty:

        >>> list(split_into([1,2,3,4], [1,2,3,4]))
        [[1], [2, 3], [4], []]

    When a ``None`` object is encountered in *sizes*, the returned list will
    contain items up to the end of *iterable* the same way that itertools.slice
    does:

        >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None]))
        [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]]

    :func:`split_into` can be useful for grouping a series of items where the
    sizes of the groups are not uniform. An example would be where in a row
    from a table, multiple columns represent elements of the same feature
    (e.g. a point represented by x,y,z) but, the format is not the same for
    all columns.
    N)r�r�r)r��sizesr�r�s    r�rrrr*s?����F
�h��B����<��r�(�N���v�b�$�'�(�(��s�<>c#��K�t|�}|�t|t|��Ed{���y|dkrtd��d}|D]}|��|dz
}�
|r||z
|zn||z
}t	|�D]}|���y7�K�w)a�Yield the elements from *iterable*, followed by *fillvalue*, such that
    at least *n* items are emitted.

        >>> list(padded([1, 2, 3], '?', 5))
        [1, 2, 3, '?', '?']

    If *next_multiple* is ``True``, *fillvalue* will be emitted until the
    number of items emitted is a multiple of *n*::

        >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True))
        [1, 2, 3, 4, None, None]

    If *n* is ``None``, *fillvalue* will be emitted indefinitely.

    Nr,�n must be at least 1r)r�rrr�r�)	r�rr��
next_multipler�rr�	remainingrs	         r�r_r_Ws����� 
�h��B��y���V�I�.�/�/�/�	
�Q���/�0�0��
��D��J��!�O�J��-:�Q��^�q�(�q�:�~�	��y�!�A��O�"�	0�s�&A6�A4�AA6c#�pK�t}|D]}|���|tur|n|}t|�Ed{���y7��w)a"After the *iterable* is exhausted, keep yielding its last element.

        >>> list(islice(repeat_last(range(3)), 5))
        [0, 1, 2, 2, 2]

    If the iterable is empty, yield *default* forever::

        >>> list(islice(repeat_last(range(0), 42), 5))
        [42, 42, 42, 42, 42]

    N)r�r)r�r�r�finals    r�rcrcws6�����D����
���w��G�D�E��e�}���s�,6�4�6c
��|dkrtd��t||�}t|�D��cgc]\}}t||d|���c}}Scc}}w)a�Distribute the items from *iterable* among *n* smaller iterables.

        >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6])
        >>> list(group_1)
        [1, 3, 5]
        >>> list(group_2)
        [2, 4, 6]

    If the length of *iterable* is not evenly divisible by *n*, then the
    length of the returned iterables will not be identical:

        >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7])
        >>> [list(c) for c in children]
        [[1, 4, 7], [2, 5], [3, 6]]

    If the length of *iterable* is smaller than *n*, then the last returned
    iterables will be empty:

        >>> children = distribute(5, [1, 2, 3])
        >>> [list(c) for c in children]
        [[1], [2], [3], [], []]

    This function uses :func:`itertools.tee` and may require significant
    storage. If you need the order items in the smaller iterables to match the
    original iterable, see :func:`divide`.

    r,r`N)r�r�	enumerater)r�r��childrenr�r�s     r�rErE�sQ��8	�1�u��/�0�0��8�Q��H�8A�(�8K�L�8K�9�5�"�F�2�u�d�A�&�8K�L�L��Ls�Ac�F�t|t|��}t||||d��S)a[Yield tuples whose elements are offset from *iterable*.
    The amount by which the `i`-th item in each tuple is offset is given by
    the `i`-th item in *offsets*.

        >>> list(stagger([0, 1, 2, 3]))
        [(None, 0, 1), (0, 1, 2), (1, 2, 3)]
        >>> list(stagger(range(8), offsets=(0, 2, 4)))
        [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)]

    By default, the sequence will end when the final element of a tuple is the
    last item in the iterable. To continue until the first element of a tuple
    is the last item in the iterable, set *longest* to ``True``::

        >>> list(stagger([0, 1, 2, 3], longest=True))
        [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)]

    By default, ``None`` will be used to replace offsets beyond the end of the
    sequence. Specify *fillvalue* to use some other value.

    )�offsets�longestr)rr�r)r�rirjrrgs     r�rtrt�s*��*�8�S��\�*�H��	�7�G�y��r�c� ��eZdZd�fd�	Z�xZS)r}c�P��d}|�|dj|�z
}t�|�	|�y)Nz Iterables have different lengthsz/: index 0 has length {}; index {} has length {})r��superr�)r��detailsr��	__class__s   �r�r�zUnequalIterablesError.__init__�s;���0�����M�E�M�M���
�C�	����r�r�)r�r�r�r��
__classcell__)ros@r�r}r}�s
����r�r}c#�nK�t|dti�D]}|D]}|tus�t��|���!y�w)Nr)rr�r})r��combo�vals   r��_zip_equal_generatorrt�s;�����i�;�7�;���C��g�~�+�-�-����	<�s� 5�5c��tdk\rtjdt�	t	|d�}t|ddd�D]\}}t	|�}||k7s�n	t
|�St|||f���#t$rt|�cYSwxYw)a ``zip`` the input *iterables* together, but raise
    ``UnequalIterablesError`` if they aren't all the same length.

        >>> it_1 = range(3)
        >>> it_2 = iter('abc')
        >>> list(zip_equal(it_1, it_2))
        [(0, 'a'), (1, 'b'), (2, 'c')]

        >>> it_1 = range(3)
        >>> it_2 = iter('abcd')
        >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        more_itertools.more.UnequalIterablesError: Iterables have different
        lengths

    i�
zwzip_equal will be removed in a future version of more-itertools. Use the builtin zip function with strict=True instead.rr,N)rn)
r)r�r�r�r�rfr�r}r�rt)r��
first_sizer�r�r�s     r�r~r~�s���$�Y���
�
�'�
�
	
�/���1��&�
��y���}�a�0�E�A�r��r�7�D��z�!��1��	�?�"�$�Z��D�,A�B�B���/�#�I�.�.�/�s�3A3�
A3�$A3�3B
�	B
)rjrc	�Z�t|�t|�k7rtd��g}t||�D]d\}}|dkr'|jt	t||�|���2|dkDr|jt
||d���T|j|��f|rt|d|i�St|�S)aF``zip`` the input *iterables* together, but offset the `i`-th iterable
    by the `i`-th item in *offsets*.

        >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1)))
        [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')]

    This can be used as a lightweight alternative to SciPy or pandas to analyze
    data sets in which some series have a lead or lag relationship.

    By default, the sequence will end when the shortest iterable is exhausted.
    To continue until the longest iterable is exhausted, set *longest* to
    ``True``.

        >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True))
        [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')]

    By default, ``None`` will be used to replace offsets beyond the end of the
    sequence. Specify *fillvalue* to use some other value.

    z,Number of iterables and offsets didn't matchrNr)r�r�r�r�rrrr)rirjrr��	staggeredr�r�s       r�rr
s���*�9�~��W��%��G�H�H��I��Y��(���A��q�5����U�6�)�a�R�#8�"�=�>�
��U����V�B��4�0�1����R� �
)���I�;��;�;��	�?�r��rc	��������	t|�}n3t|�}t|�dk(r|d���fd�}nt|����fd�}ttt	t|�||����S)a�Return the input iterables sorted together, with *key_list* as the
    priority for sorting. All iterables are trimmed to the length of the
    shortest one.

    This can be used like the sorting function in a spreadsheet. If each
    iterable represents a column of data, the key list determines which
    columns are used for sorting.

    By default, all iterables are sorted using the ``0``-th iterable::

        >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')]
        >>> sort_together(iterables)
        [(1, 2, 3, 4), ('d', 'c', 'b', 'a')]

    Set a different key list to sort according to another iterable.
    Specifying multiple keys dictates how ties are broken::

        >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')]
        >>> sort_together(iterables, key_list=(1, 2))
        [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')]

    To sort by a function of the elements of the iterable, pass a *key*
    function. Its arguments are the elements of the iterables corresponding to
    the key list::

        >>> names = ('a', 'b', 'c')
        >>> lengths = (1, 2, 3)
        >>> widths = (5, 2, 1)
        >>> def area(length, width):
        ...     return length * width
        >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area)
        [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)]

    Set *reverse* to ``True`` to sort in descending order.

        >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True)
        [(3, 2, 1), ('a', 'b', 'c')]

    r,rc����|��Sr�r�)�zipped_itemsr+�
key_offsets ��r�r(zsort_together.<locals>.<lambda>es����L��4L�0Mr�c�����|��Sr�r�)r|�
get_key_itemsr+s ��r�r(zsort_together.<locals>.<lambda>js�����|�,�1r�)r+r!)r$r�r�r�r)r��key_listr+r!�key_argumentrr}s  `  @@r�rmrm1su���P�{�"�8�,����>���x�=�A��"�!��J�M�L�'��1�M��L���V�C��O��w�
G�H��r�c���tt|��\}}|sy|d}t|t|��}d��t	�fd�t|�D��S)a�The inverse of :func:`zip`, this function disaggregates the elements
    of the zipped *iterable*.

    The ``i``-th iterable contains the ``i``-th element from each element
    of the zipped iterable. The first element is used to to determine the
    length of the remaining elements.

        >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
        >>> letters, numbers = unzip(iterable)
        >>> list(letters)
        ['a', 'b', 'c', 'd']
        >>> list(numbers)
        [1, 2, 3, 4]

    This is similar to using ``zip(*iterable)``, but it avoids reading
    *iterable* into memory. Note, however, that this function uses
    :func:`itertools.tee` and thus may require significant storage.

    r�rc����fd�}|S)Nc�6��	|�S#t$rt�wxYwr�)r�r�)�objr�s �r��getterz)unzip.<locals>.itemgetter.<locals>.getter�s(���
$��1�v�
���

$�$�#�

$�s��r�)r�r�s` r�r$zunzip.<locals>.itemgetter�s���
	$��
r�c3�H�K�|]\}}t�|�|����y�wr��r
)rr�r�r$s   �r�r zunzip.<locals>.<genexpr>�s#�����J�5I�E�A�r��Z��]�B�'�5I�s�")rsr�rr�r�rf)r�r�r�r$s   @r�rzrzssS���(��h��(�N�D�(�����7�D��H�c�$�i�(�I��$�J�Y�y�5I�J�J�Jr�c�&�|dkrtd��	|dd|}tt	|�|�\}}g}d}td|dz�D]0}|}|||kr|dzn|z
}|j
t|||���2|S#t$rt|�}Y�vwxYw)a�Divide the elements from *iterable* into *n* parts, maintaining
    order.

        >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6])
        >>> list(group_1)
        [1, 2, 3]
        >>> list(group_2)
        [4, 5, 6]

    If the length of *iterable* is not evenly divisible by *n*, then the
    length of the returned iterables will not be identical:

        >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7])
        >>> [list(c) for c in children]
        [[1, 2, 3], [4, 5], [6, 7]]

    If the length of the iterable is smaller than n, then the last returned
    iterables will be empty:

        >>> children = divide(5, [1, 2, 3])
        >>> [list(c) for c in children]
        [[1], [2], [3], [], []]

    This function will exhaust the iterable before returning and may require
    significant storage. If order is not important, see :func:`distribute`,
    which does not first pull the iterable into memory.

    r,r`Nr)r�r�r��divmodr�r�r�r�)	r�r�r�qr�r�r�r�r�s	         r�rFrF�s���:	�1�u��/�0�0����!�����#�c�(�A��D�A�q�
�C��D�
�1�a�!�e�_������a���A��Q�&���
�
�4��E�$��(�)��
�J�����H�o���s�A9�9B�Bc��|�td�S|�t||�rt|f�S	t|�S#t$rt|f�cYSwxYw)axIf *obj* is iterable, return an iterator over its items::

        >>> obj = (1, 2, 3)
        >>> list(always_iterable(obj))
        [1, 2, 3]

    If *obj* is not iterable, return a one-item iterable containing *obj*::

        >>> obj = 1
        >>> list(always_iterable(obj))
        [1]

    If *obj* is ``None``, return an empty iterable:

        >>> obj = None
        >>> list(always_iterable(None))
        []

    By default, binary and text strings are not considered iterable::

        >>> obj = 'foo'
        >>> list(always_iterable(obj))
        ['foo']

    If *base_type* is set, objects for which ``isinstance(obj, base_type)``
    returns ``True`` won't be considered iterable.

        >>> obj = {'a': 1}
        >>> list(always_iterable(obj))  # Iterate over the dict's keys
        ['a']
        >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
        [{'a': 1}]

    Set *base_type* to ``None`` to avoid any special handling and treat objects
    Python considers iterable as iterable:

        >>> obj = 'foo'
        >>> list(always_iterable(obj, base_type=None))
        ['f', 'o', 'o']
    r�)r�r�r�)r�rEs  r�r5r5�sX��R�{��B�x����:�c�9�#=��S�F�|����C�y������S�F�|���s�
4�A�Ac���|dkrtd��t|�\}}dg|z}t|t||�|�}ttt|d|zdz��}t
||�S)asReturn an iterable over `(bool, item)` tuples where the `item` is
    drawn from *iterable* and the `bool` indicates whether
    that item satisfies the *predicate* or is adjacent to an item that does.

    For example, to find whether items are adjacent to a ``3``::

        >>> list(adjacent(lambda x: x == 3, range(6)))
        [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)]

    Set *distance* to change what counts as adjacent. For example, to find
    whether items are two places away from a ``3``:

        >>> list(adjacent(lambda x: x == 3, range(6), distance=2))
        [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)]

    This is useful for contextualizing the results of a search function.
    For example, a code comparison tool might want to identify lines that
    have changed, but also surrounding lines to give the viewer of the diff
    context.

    The predicate function will only be called once for each item in the
    iterable.

    See also :func:`groupby_transform`, which can be used with this function
    to group ranges of items with the same `bool` value.

    rzdistance must be at least 0Fr�r,)r�rrr
�anyr{r�)�	predicater��distance�i1�i2�padding�selected�adjacent_to_selecteds        r�r4r4sp��:�!�|��6�7�7�
��]�F�B���g�� �G��W�c�)�R�0�'�:�H��s�H�X�q�8�|�a�7G�$H�I���#�R�(�(r�c�V���t||�}�r�fd�|D�}�r�fd�|D�}|S)aAn extension of :func:`itertools.groupby` that can apply transformations
    to the grouped data.

    * *keyfunc* is a function computing a key value for each item in *iterable*
    * *valuefunc* is a function that transforms the individual items from
      *iterable* after grouping
    * *reducefunc* is a function that transforms each group of items

    >>> iterable = 'aAAbBBcCC'
    >>> keyfunc = lambda k: k.upper()
    >>> valuefunc = lambda v: v.lower()
    >>> reducefunc = lambda g: ''.join(g)
    >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc))
    [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')]

    Each optional argument defaults to an identity function if not specified.

    :func:`groupby_transform` is useful when grouping elements of an iterable
    using a separate iterable as the key. To do this, :func:`zip` the iterables
    and pass a *keyfunc* that extracts the first element and a *valuefunc*
    that extracts the second element::

        >>> from operator import itemgetter
        >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3]
        >>> values = 'abcdefghi'
        >>> iterable = zip(keys, values)
        >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1))
        >>> [(k, ''.join(g)) for k, g in grouper]
        [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')]

    Note that the order of items in the iterable is significant.
    Only adjacent items are grouped together, so if you don't want any
    duplicate groups, you should sort the iterable by the key function.

    c3�@�K�|]\}}|t�|�f���y�wr�r�)r�k�g�	valuefuncs   �r�r z$groupby_transform.<locals>.<genexpr>Ys"�����6�#�$�!�Q��3�y�!�$�%�#�s�c3�8�K�|]\}}|�|�f���y�wr�r�)rr�r��
reducefuncs   �r�r z$groupby_transform.<locals>.<genexpr>[s�����2�c�d�a���:�a�=�!�c�s��r)r��keyfuncr�r�r�s  `` r�rJrJ3s1���H�(�G�
$�C��6�#�6���2�c�2���Jr�c��eZdZdZeedd��Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zy)r\a<An extension of the built-in ``range()`` function whose arguments can
    be any orderable numeric type.

    With only *stop* specified, *start* defaults to ``0`` and *step*
    defaults to ``1``. The output items will match the type of *stop*:

        >>> list(numeric_range(3.5))
        [0.0, 1.0, 2.0, 3.0]

    With only *start* and *stop* specified, *step* defaults to ``1``. The
    output items will match the type of *start*:

        >>> from decimal import Decimal
        >>> start = Decimal('2.1')
        >>> stop = Decimal('5.1')
        >>> list(numeric_range(start, stop))
        [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')]

    With *start*, *stop*, and *step*  specified the output items will match
    the type of ``start + step``:

        >>> from fractions import Fraction
        >>> start = Fraction(1, 2)  # Start at 1/2
        >>> stop = Fraction(5, 2)  # End at 5/2
        >>> step = Fraction(1, 2)  # Count by 1/2
        >>> list(numeric_range(start, stop, step))
        [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)]

    If *step* is zero, ``ValueError`` is raised. Negative steps are supported:

        >>> list(numeric_range(3, -1, -1.0))
        [3.0, 2.0, 1.0, 0.0]

    Be aware of the limitations of floating point numbers; the representation
    of the yielded numbers may be surprising.

    ``datetime.datetime`` objects can be used for *start* and *stop*, if *step*
    is a ``datetime.timedelta`` object:

        >>> import datetime
        >>> start = datetime.datetime(2019, 1, 1)
        >>> stop = datetime.datetime(2019, 1, 3)
        >>> step = datetime.timedelta(days=1)
        >>> items = iter(numeric_range(start, stop, step))
        >>> next(items)
        datetime.datetime(2019, 1, 1, 0, 0)
        >>> next(items)
        datetime.datetime(2019, 1, 2, 0, 0)

    rc���t|�}|dk(rW|\|_t|j�d�|_t|j|jz
�d�|_n�|dk(r=|\|_|_t|j|jz
�d�|_nT|dk(r|\|_|_|_n9|dk(rtdj
|���tdj
|���t|j�d�|_|j|jk(rtd��|j|jkD|_	|j�y)Nr,rr��z2numeric_range expected at least 1 argument, got {}z2numeric_range expected at most 3 arguments, got {}z&numeric_range() arg 3 must not be zero)r��_stop�type�_start�_stepr�r��_zeror��_growing�	_init_len)r�r��argcs   r�r�znumeric_range.__init__�s2���4�y���1�9� �M�T�Z�*�$�t�z�z�*�1�-�D�K�7��d�j�j�4�;�;�6�7��:�D�J�
�Q�Y�&*�#�D�K���7��d�j�j�4�;�;�6�7��:�D�J�
�Q�Y�26�/�D�K���T�Z�
�Q�Y��%�%+�V�D�\��
�
�&�&,�f�T�l��
�
&�T�$�*�*�%�a�(��
��:�:����#��E�F�F��
�
�T�Z�Z�/��
����r�c�~�|jr|j|jkS|j|jkDSr�)r�r�r�r�s r�r�znumeric_range.__bool__�s/���=�=��;�;����+�+��;�;����+�+r�c�L�|jrL|j|cxkr|jkr,ny||jz
|jz|jk(Sy|j|cxk\r|jkDr-ny|j|z
|jz|jk(Sy�NF)r�r�r�r�r�)r��elems  r�r
znumeric_range.__contains__�s����=�=��{�{�d�/�T�Z�Z�/���t�{�{�*�d�j�j�8�D�J�J�F�F�
��{�{�d�/�T�Z�Z�/�����d�*��
�
�{�;�t�z�z�I�I�r�c��t|t�r{t|�}t|�}|s|r|xr|S|j|jk(xr>|j|jk(xr#|jd�|jd�k(Sy)Nr�F)r�r\�boolr�r��
_get_by_index)r��other�
empty_self�empty_others    r��__eq__znumeric_range.__eq__�s����e�]�+�!�$�Z��J�"�5�k�/�K��[�!�1�k�1��K�K�5�<�<�/�J��
�
�e�k�k�1�J��*�*�2�.�%�2E�2E�b�2I�I��r�c��t|t�r|j|�St|t��r&|j�|j
n|j|j
z}|j�|j|jkr
|j}nA|j|jk\r
|j}n|j|j�}|j�|j|jk\r
|j}nB|j|jkr
|j}n|j|j�}t|||�Stdjt|�j���)Nz8numeric range indices must be integers or slices, not {})r��intr�r�r�r�r��_lenr�r�r�r\r�r�r�r�)r�r+r�r�r�s     r�r�znumeric_range.__getitem__�s���c�3���%�%�c�*�*�
��U�
#�!$���!1�4�:�:�s�x�x�$�*�*�7L�D��y�y� �C�I�I�$�)�)��$;��������d�i�i�'��
�
���*�*�3�9�9�5���x�x��3�8�8�t�y�y�#8��z�z�����d�i�i�Z�'��{�{���)�)�#�(�(�3�� ���d�3�3��-�-3�V�D��I�4F�4F�-G��
r�c��|r1t|j|jd�|jf�S|jS�Nr�)�hashr�r�r��_EMPTY_HASHr�s r��__hash__znumeric_range.__hash__�s6�������d�&8�&8��&<�d�j�j�I�J�J��#�#�#r�c�����fd�t�D�}�jr$ttt�j
�|�Sttt�j
�|�S)Nc3�V�K�|] }�j|�jzz���"y�wr�)r�r�)rr�r�s  �r�r z)numeric_range.__iter__.<locals>.<genexpr>�s#�����B�'�Q�$�+�+��T�Z�Z��0�'�r�)rr�rrr'r�r()r��valuess` r�r�znumeric_range.__iter__�sF���B�%�'�B���=�=��W�R����4�f�=�=��W�R����4�f�=�=r�c��|jSr�)r�r�s r��__len__znumeric_range.__len__�s���y�y�r�c�X�|jr%|j}|j}|j}n%|j}|j}|j}||z
}||jkrd|_yt
||�\}}t|�t||jk7�z|_y�Nr)r�r�r�r�r�r�r�r�)r�r�r�r�r�r�r�s       r�r�znumeric_range._init_len�s����=�=��K�K�E��:�:�D��:�:�D��J�J�E��;�;�D��J�J�;�D��%�<���t�z�z�!��D�I��(�D�)�D�A�q��A���Q�$�*�*�_�!5�5�D�Ir�c�T�t|j|j|jffSr�)r\r�r�r�r�s r��
__reduce__znumeric_range.__reduce__s ���t�{�{�D�J�J��
�
�C�C�Cr�c�(�|jdk(r8djt|j�t|j��Sdjt|j�t|j�t|j��S)Nr,znumeric_range({}, {})znumeric_range({}, {}, {}))r�r��reprr�r�r�s r��__repr__znumeric_range.__repr__sn���:�:��?�*�1�1��T�[�[�!�4��
�
�#3��
�/�5�5��T�[�[�!�4��
�
�#3�T�$�*�*�5E��
r�c��tt|jd�|j|jz
|j��Sr�)r�r\r�r�r�r�s r�r�znumeric_range.__reversed__s<�����"�"�2�&����d�j�j�(@�4�:�:�+�
�
�	
r�c��t||v�Sr�)r�r6s  r�rznumeric_range.count s���5�D�=�!�!r�c���|jrb|j|cxkr|jkr�nn�t||jz
|j�\}}||j
k(rnt
|�S|j|cxk\r|jkDrDnnAt|j|z
|j�\}}||j
k(rt
|�Stdj|���)Nz{} is not in numeric range)	r�r�r�r�r�r�r�r�r�)r�r/r�r�s    r�r�znumeric_range.index#s����=�=��{�{�e�0�d�j�j�0��e�d�k�k�1�4�:�:�>���1���
�
�?��q�6�M��{�{�e�0�d�j�j�0��d�k�k�E�1�D�J�J�;�?���1���
�
�?��q�6�M��5�<�<�U�C�D�Dr�c��|dkr||jz
}|dks||jk\rtd��|j||jzzS)Nrz'numeric range object index out of range)r�r�r�r�)r�r�s  r�r�znumeric_range._get_by_index1sJ���q�5�
����N�A��q�5�A����N��F�G�G��{�{�Q����^�+�+r�N)r�r�r�r�r�r�r�r�r�r
r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r\r\`sg��1�f�u�Q��{�#�K��8,��
��6$�>��6� D��
�"�E�,r�r\c�x��t����std�S|�
t�n
t|�}�fd�|D�S)aCycle through the items from *iterable* up to *n* times, yielding
    the number of completed cycles along with each item. If *n* is omitted the
    process repeats indefinitely.

    >>> list(count_cycle('AB', 3))
    [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')]

    r�c3�4�K�|]}�D]}||f���
�y�wr�r�)rr�rr�s   �r�r zcount_cycle.<locals>.<genexpr>Fs�����<�w�!�8�4�Q��I�8�I�w�s�)r�r�rr�)r�r�r�s`  r�r@r@9s6����X��H���B�x����e�g��a��G�<�w�<�<r�c#��K�t|�}	t|�}	t�D]}|}t|�}|dk(d|f���y#t$rYywxYw#t$r
dk(df��YywxYw�w)aHYield 3-tuples of the form ``(is_first, is_last, item)``.

    >>> list(mark_ends('ABC'))
    [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')]

    Use this when looping over an iterable to take special action on its first
    and/or last items:

    >>> iterable = ['Header', 100, 200, 'Footer']
    >>> total = 0
    >>> for is_first, is_last, item in mark_ends(iterable):
    ...     if is_first:
    ...         continue  # Skip the header
    ...     if is_last:
    ...         continue  # Skip the footer
    ...     total += item
    >>> print(total)
    300
    NrFT)r�r�r�r)r�r��br��as     r�rArAIs�����(
�h��B����H�����A��A��R��A��q�&�%��"�"���	��������1�f�d�A�o���sE�A*�A�&A�A*�	A�A*�
A�A*�A'�$A*�&A'�'A*c���|�tt�t||��S|dkrtd��t	||t
��}tt�t
||��S)a�Yield the index of each item in *iterable* for which *pred* returns
    ``True``.

    *pred* defaults to :func:`bool`, which will select truthy items:

        >>> list(locate([0, 1, 1, 0, 1, 0, 0]))
        [1, 2, 4]

    Set *pred* to a custom function to, e.g., find the indexes for a particular
    item.

        >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b'))
        [1, 3]

    If *window_size* is given, then the *pred* function will be called with
    that many items. This enables searching for sub-sequences:

        >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
        >>> pred = lambda *args: args == (1, 2, 3)
        >>> list(locate(iterable, pred=pred, window_size=3))
        [1, 5, 9]

    Use with :func:`seekable` to find indexes and then retrieve the associated
    items:

        >>> from itertools import count
        >>> from more_itertools import seekable
        >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count())
        >>> it = seekable(source)
        >>> pred = lambda x: x > 100
        >>> indexes = locate(it, pred=pred)
        >>> i = next(indexes)
        >>> it.seek(i)
        >>> next(it)
        106

    r,zwindow size must be at least 1�r)rrr
r�r{r�r)r�rS�window_sizer�s    r�rTrTnsX��L������T�8�!4�5�5��Q���9�:�:�	�(�K�7�	;�B��E�G�W�T�2�.�/�/r�c��t||�S)a�Yield the items from *iterable*, but strip any from the beginning
    for which *pred* returns ``True``.

    For example, to remove a set of items from the start of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(lstrip(iterable, pred))
        [1, 2, None, 3, False, None]

    This function is analogous to to :func:`str.lstrip`, and is essentially
    an wrapper for :func:`itertools.dropwhile`.

    )r�r�rSs  r�rUrU�s���T�8�$�$r�c#�K�g}|j}|j}|D](}||�r	||��|Ed{���|�|���*y7��w)a�Yield the items from *iterable*, but strip any from the end
    for which *pred* returns ``True``.

    For example, to remove a set of items from the end of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(rstrip(iterable, pred))
        [None, False, None, 1, 2, None, 3]

    This function is analogous to :func:`str.rstrip`.

    N)r��clear)r�rS�cache�cache_append�cache_clearr's      r�rfrf�sO����
�E��<�<�L��+�+�K�
����7���O�����M��G�
�
�s�6A
�A�A
c�.�tt||�|�S)a�Yield the items from *iterable*, but strip any from the
    beginning and end for which *pred* returns ``True``.

    For example, to remove a set of items from both ends of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(strip(iterable, pred))
        [1, 2, None, 3]

    This function is analogous to :func:`str.strip`.

    )rfrUr�s  r�ruru�s���&��4�(�$�/�/r�c�(�eZdZdZd�Zd�Zd�Zd�Zy)rOaAn extension of :func:`itertools.islice` that supports negative values
    for *stop*, *start*, and *step*.

        >>> iterable = iter('abcdefgh')
        >>> list(islice_extended(iterable, -4, -1))
        ['e', 'f', 'g']

    Slices with negative values require some caching of *iterable*, but this
    function takes care to minimize the amount of memory required.

    For example, you can use a negative step with an infinite iterator:

        >>> from itertools import count
        >>> list(islice_extended(count(), 110, 99, -2))
        [110, 108, 106, 104, 102, 100]

    You can also use slice notation directly:

        >>> iterable = map(str, count())
        >>> it = islice_extended(iterable)[10:20:2]
        >>> list(it)
        ['10', '12', '14', '16', '18']

    c�\�t|�}|rt|t|��|_y||_yr�)r��_islice_helperr��	_iterable)r�r�r�r�s    r�r�zislice_extended.__init__�s'��
�(�^���+�B��t��=�D�N��D�Nr�c��|Sr�r�r�s r�r�zislice_extended.__iter__�r�r�c�,�t|j�Sr�)r�r�r�s r�r�zislice_extended.__next__�����D�N�N�#�#r�c�v�t|t�rtt|j|��Std��)Nz4islice_extended.__getitem__ argument must be a slice)r�r�rOr�r�r�)r�r+s  r�r�zislice_extended.__getitem__	s.���c�5�!�"�>�$�.�.�#�#F�G�G��N�O�Or�N)r�r�r�r�r�r�r�r�r�r�r�rOrO�s���2 ��$�Pr�rOc#�|K�|j}|j}|jdk(rtd��|jxsd}|dkD�r|�dn|}|dkrt	t|d�|��}|r|ddnd}t
||zd�}|�|}n!|dk\r
t||�}nt
||zd�}||z
}	|	dkryt|d|	|�D]	\}
}|���y|�v|dkrqtt|||�d�t	t||�|��}t|�D]2\}
}|j�}|
|zdk(r|��|j|��4yt||||�Ed{���y|�dn|}|�g|dkrb|dz
}	t	t|d�|	��}|r|ddnd}|dkr||}}nt||z
d�d}}t|�|||�D]	\}
}|���y|�|dz}
tt||
|
�d�|dkr|}d}	n|�d}|dz}	n
d}||z
}	|	dkrytt||	��}||d|�Ed{���y7��7��w)Nrz1step argument must be a non-zero integer or None.r,r�r�)
r�r�r�r�rrfr�r�rr�r�r�r�)r��sr�r�r�r��len_iterr�r�r�r�r�cached_item�ms              r�r�r�		s�����
�G�G�E��6�6�D��v�v��{��L�M�M��6�6�;�Q�D��a�x��m��%���1�9��)�B��*�E�6�:�E�',�u�R�y��|�!�H��H�u�$�a�(�A��|��������h�'����4���+���A��A��A�v��%�e�Q��4�8���t��
� 9���T�A�X����E�5�)�4�0��&��d�U�+�T�E�:�E�(��}���t�#�m�m�o���4�<�1�$�%�%����T�"�	 -��b�%��t�4�4�4��}��5����4�!�8����	�A��)�B��*�1�5�E�',�u�R�y��|�!�H�
�q�y��d�1���5�8�+�R�0�$�1��#�E�{�1�Q�t�8�4���t��
� 5����1�H���V�B��1�%�t�,��q�y����������A�I�����D�L����6�����A��'�E��Q�W��W�~�%�%�[
5��Z
&�s%�EH<�H8�CH<�2H:�3H<�:H<c�`�	t|�S#t$rtt|��cYSwxYw)a�An extension of :func:`reversed` that supports all iterables, not
    just those which implement the ``Reversible`` or ``Sequence`` protocols.

        >>> print(*always_reversible(x for x in range(3)))
        2 1 0

    If the iterable is already reversible, this function returns the
    result of :func:`reversed()`. If the iterable is not reversible,
    this function will cache the remaining items in the iterable and
    yield them in reverse order, which may require significant storage.
    )r�r�r��r�s r�r6r6i	s0��(���!�!���(���X��'�'�(�s�

�-�-c��|Sr�r�r&s r�r(r({	s��Ar�c#�~�K�tt|��fd���D]\}}ttd�|����y�w)a�Yield groups of consecutive items using :func:`itertools.groupby`.
    The *ordering* function determines whether two items are adjacent by
    returning their position.

    By default, the ordering function is the identity function. This is
    suitable for finding runs of numbers:

        >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40]
        >>> for group in consecutive_groups(iterable):
        ...     print(list(group))
        [1]
        [10, 11, 12]
        [20]
        [30, 31, 32, 33]
        [40]

    For finding runs of adjacent letters, try using the :meth:`index` method
    of a string of letters:

        >>> from string import ascii_lowercase
        >>> iterable = 'abcdfgilmnop'
        >>> ordering = ascii_lowercase.index
        >>> for group in consecutive_groups(iterable, ordering):
        ...     print(list(group))
        ['a', 'b', 'c', 'd']
        ['f', 'g']
        ['i']
        ['l', 'm', 'n', 'o', 'p']

    Each group of consecutive items is an iterator that shares it source with
    *iterable*. When an an output group is advanced, the previous group is
    no longer available unless its elements are copied (e.g., into a ``list``).

        >>> iterable = [1, 2, 11, 12, 21, 22]
        >>> saved_groups = []
        >>> for group in consecutive_groups(iterable):
        ...     saved_groups.append(list(group))  # Copy group elements
        >>> saved_groups
        [[1, 2], [11, 12], [21, 22]]

    c�&��|d�|d�z
Sr�r�)r'�orderings �r�r(z$consecutive_groups.<locals>.<lambda>�	s���1�Q�4�(�1�Q�4�.�+@r��r+r,N)rrfr
r$)r�r�r�r�s `  r�r=r={	s;�����T��(��!@����1��*�Q�-��#�#��s�:=)�initialc
��t|�\}}	t|�g}|�g}t	|t|t
||���S#t$rtg�cYSwxYw)a�This function is the inverse of :func:`itertools.accumulate`. By default
    it will compute the first difference of *iterable* using
    :func:`operator.sub`:

        >>> from itertools import accumulate
        >>> iterable = accumulate([0, 1, 2, 3, 4])  # produces 0, 1, 3, 6, 10
        >>> list(difference(iterable))
        [0, 1, 2, 3, 4]

    *func* defaults to :func:`operator.sub`, but other functions can be
    specified. They will be applied as follows::

        A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ...

    For example, to do progressive division:

        >>> iterable = [1, 2, 6, 24, 120]
        >>> func = lambda x, y: x // y
        >>> list(difference(iterable, func))
        [1, 2, 3, 4, 5]

    If the *initial* keyword is set, the first element will be skipped when
    computing successive differences.

        >>> it = [10, 11, 13, 16]  # from accumulate([1, 2, 3], initial=10)
        >>> list(difference(it, initial=10))
        [1, 2, 3]

    )rr�r�r�rrr�)r�r�r�r�r�rIs      r�rBrB�	sb��<�x�=�D�A�q���a��	����������c�!�Q�i�0�1�1��
���B�x���s�A�A�Ac�(�eZdZdZd�Zd�Zd�Zd�Zy)rjaSReturn a read-only view of the sequence object *target*.

    :class:`SequenceView` objects are analogous to Python's built-in
    "dictionary view" types. They provide a dynamic view of a sequence's items,
    meaning that when the sequence updates, so does the view.

        >>> seq = ['0', '1', '2']
        >>> view = SequenceView(seq)
        >>> view
        SequenceView(['0', '1', '2'])
        >>> seq.append('3')
        >>> view
        SequenceView(['0', '1', '2', '3'])

    Sequence views support indexing, slicing, and length queries. They act
    like the underlying sequence, except they don't allow assignment:

        >>> view[1]
        '1'
        >>> view[1:-1]
        ['1', '2']
        >>> len(view)
        4

    Sequence views are useful as an alternative to copying, as they don't
    require (much) extra storage.

    c�>�t|t�st�||_yr�)r�rr��_target)r��targets  r�r�zSequenceView.__init__�	s���&�(�+��O���r�c� �|j|Sr�)r�)r�r�s  r�r�zSequenceView.__getitem__�	s���|�|�E�"�"r�c�,�t|j�Sr�)r�r�r�s r�r�zSequenceView.__len__�	s���4�<�<� � r�c�t�dj|jjt|j��S)Nz{}({}))r�ror�r�r�r�s r�r�zSequenceView.__repr__�	s&�����t�~�~�6�6��T�\�\�8J�K�Kr�N)r�r�r�r�r�r�r�r�r�r�r�rjrj�	s���:�
#�!�Lr�rjc�@�eZdZdZd
d�Zd�Zd�Zd�Zefd�Z	d�Z
d	�Zy)ria
Wrap an iterator to allow for seeking backward and forward. This
    progressively caches the items in the source iterable so they can be
    re-visited.

    Call :meth:`seek` with an index to seek to that position in the source
    iterable.

    To "reset" an iterator, seek to ``0``:

        >>> from itertools import count
        >>> it = seekable((str(n) for n in count()))
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> it.seek(0)
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> next(it)
        '3'

    You can also seek forward:

        >>> it = seekable((str(n) for n in range(20)))
        >>> it.seek(10)
        >>> next(it)
        '10'
        >>> it.seek(20)  # Seeking past the end of the source isn't a problem
        >>> list(it)
        []
        >>> it.seek(0)  # Resetting works even after hitting the end
        >>> next(it), next(it), next(it)
        ('0', '1', '2')

    Call :meth:`peek` to look ahead one item without advancing the iterator:

        >>> it = seekable('1234')
        >>> it.peek()
        '1'
        >>> list(it)
        ['1', '2', '3', '4']
        >>> it.peek(default='empty')
        'empty'

    Before the iterator is at its end, calling :func:`bool` on it will return
    ``True``. After it will return ``False``:

        >>> it = seekable('5678')
        >>> bool(it)
        True
        >>> list(it)
        ['5', '6', '7', '8']
        >>> bool(it)
        False

    You may view the contents of the cache with the :meth:`elements` method.
    That returns a :class:`SequenceView`, a view that updates automatically:

        >>> it = seekable((str(n) for n in range(10)))
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> elements = it.elements()
        >>> elements
        SequenceView(['0', '1', '2'])
        >>> next(it)
        '3'
        >>> elements
        SequenceView(['0', '1', '2', '3'])

    By default, the cache grows as the source iterable progresses, so beware of
    wrapping very large or infinite iterables. Supply *maxlen* to limit the
    size of the cache (this of course limits how far back you can seek).

        >>> from itertools import count
        >>> it = seekable((str(n) for n in count()), maxlen=2)
        >>> next(it), next(it), next(it), next(it)
        ('0', '1', '2', '3')
        >>> list(it.elements())
        ['2', '3']
        >>> it.seek(0)
        >>> next(it), next(it), next(it), next(it)
        ('2', '3', '4', '5')
        >>> next(it)
        '6'

    Nc�v�t|�|_|�g|_d|_ytg|�|_d|_yr�)r��_sourcer�r�_index)r�r�r�s   r�r�zseekable.__init__X
s9���H�~����>��D�K���� ��F�+�D�K���r�c��|Sr�r�r�s r�r�zseekable.__iter__`
r�r�c��|j�1	|j|j}|xjdz
c_|St|j�}|jj|�|S#t$r
d|_Y�DwxYwr>)r�r�r�r�r�r��r�rs  r�r�zseekable.__next__c
su���;�;�"�
��{�{�4�;�;�/�����q� �����D�L�L�!�������4� �����
#�"���
#�s�A0�0B�Bc�D�	|j�y#t$rYywxYwr�r�r�s r�r�zseekable.__bool__q
r�r�c���	t|�}|j�t	|j
�|_|xjdzc_|S#t$r|tur�|cYSwxYwr>)r�r�r�r�r�r�)r�r��peekeds   r�r�z
seekable.peekx
s`��	��$�Z�F�
�;�;���d�k�k�*�D�K����q����
���	��'�!���N�	�s�A
�
A!� A!c�,�t|j�Sr�)rjr�r�s r��elementszseekable.elements�
s���D�K�K�(�(r�c�f�||_|t|j�z
}|dkDr
t||�yyr�)r�r�r�r-)r�r��	remainders   r��seekz
seekable.seek�
s2������C����,�,�	��q�=��D�)�$�r�r�)r�r�r�r�r�r�r�r�r�r�rrr�r�r�riri
s1��S�j����#�
�)�%r�ric�0�eZdZdZed��Zed��Zy)rga�
    :func:`run_length.encode` compresses an iterable with run-length encoding.
    It yields groups of repeated items with the count of how many times they
    were repeated:

        >>> uncompressed = 'abbcccdddd'
        >>> list(run_length.encode(uncompressed))
        [('a', 1), ('b', 2), ('c', 3), ('d', 4)]

    :func:`run_length.decode` decompresses an iterable that was previously
    compressed with run-length encoding. It yields the items of the
    decompressed iterable:

        >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
        >>> list(run_length.decode(compressed))
        ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd']

    c�&�d�t|�D�S)Nc3�<K�|]\}}|t|�f���y�wr�)rK)rr�r�s   r�r z$run_length.encode.<locals>.<genexpr>�
s����;�):���A��D��G��):�s�r�r�s r��encodezrun_length.encode�
s��;���):�;�;r�c�:�tjd�|D��S)Nc3�:K�|]\}}t||����y�wr�)r)rr�r�s   r�r z$run_length.decode.<locals>.<genexpr>�
s����"E�H�D�A�q�6�!�Q�<�H�s�)rr	r�s r��decodezrun_length.decode�
s���"�"�"E�H�"E�E�Er�N)r�r�r�r��staticmethodrrr�r�r�rgrg�
s1���&�<��<��F��Fr�rgc	�L�tt|dzt||���|k(S)a�Return ``True`` if exactly ``n`` items in the iterable are ``True``
    according to the *predicate* function.

        >>> exactly_n([True, True, False], 2)
        True
        >>> exactly_n([True, True, False], 1)
        False
        >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3)
        True

    The iterable will be advanced until ``n + 1`` truthy items are encountered,
    so avoid calling it on infinite iterables.

    r,)r�r1r)r�r�r�s   r�rGrG�
s&���t�A��E�6�)�X�6�7�8�A�=�=r�c	�z�t|�}tt|�tt	|�t|���S)z�Return a list of circular shifts of *iterable*.

    >>> circular_shifts(range(4))
    [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)]
    )r�r1r�r{r)r��lsts  r�r:r:�
s-���x�.�C���C��(�5��:�s�3�x�8�9�9r�c������fd�}|S)a�Return a decorator version of *wrapping_func*, which is a function that
    modifies an iterable. *result_index* is the position in that function's
    signature where the iterable goes.

    This lets you use itertools on the "production end," i.e. at function
    definition. This can augment what the function returns without changing the
    function's code.

    For example, to produce a decorator version of :func:`chunked`:

        >>> from more_itertools import chunked
        >>> chunker = make_decorator(chunked, result_index=0)
        >>> @chunker(3)
        ... def iter_range(n):
        ...     return iter(range(n))
        ...
        >>> list(iter_range(9))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

    To only allow truthy items to be returned:

        >>> truth_serum = make_decorator(filter, result_index=1)
        >>> @truth_serum(bool)
        ... def boolean_test():
        ...     return [0, 1, '', ' ', False, True]
        ...
        >>> list(boolean_test())
        [1, ' ', True]

    The :func:`peekable` and :func:`seekable` wrappers make for practical
    decorators:

        >>> from more_itertools import peekable
        >>> peekable_function = make_decorator(peekable)
        >>> @peekable_function()
        ... def str_range(*args):
        ...     return (str(x) for x in range(*args))
        ...
        >>> it = str_range(1, 20, 2)
        >>> next(it), next(it), next(it)
        ('1', '3', '5')
        >>> it.peek()
        '7'
        >>> next(it)
        '7'

    c���������fd�}|S)Nc���������fd�}|S)Nc�^���|i|��}t��}|j�|��|i���Sr�)r��insert)	r�r��result�wrapping_args_�f�result_index�
wrapping_args�
wrapping_func�wrapping_kwargss	    �����r��
inner_wrapperzOmake_decorator.<locals>.decorator.<locals>.outer_wrapper.<locals>.inner_wrapper�
s<����D�+�F�+��!%�m�!4���%�%�l�F�;�$�n�H��H�Hr�r�)rr rrrrs` ����r��
outer_wrapperz8make_decorator.<locals>.decorator.<locals>.outer_wrapper�
s���
I�
I�!� r�r�)rrr!rrs`` ��r��	decoratorz!make_decorator.<locals>.decorator�
s���	!��r�r�)rrr"s`` r�rVrV�
s���d
��r�c���|�d�n|}tt�}|D]&}||�}||�}||j|��(|�#|j�D]\}}||�||<�d|_|S)a�Return a dictionary that maps the items in *iterable* to categories
    defined by *keyfunc*, transforms them with *valuefunc*, and
    then summarizes them by category with *reducefunc*.

    *valuefunc* defaults to the identity function if it is unspecified.
    If *reducefunc* is unspecified, no summarization takes place:

        >>> keyfunc = lambda x: x.upper()
        >>> result = map_reduce('abbccc', keyfunc)
        >>> sorted(result.items())
        [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])]

    Specifying *valuefunc* transforms the categorized items:

        >>> keyfunc = lambda x: x.upper()
        >>> valuefunc = lambda x: 1
        >>> result = map_reduce('abbccc', keyfunc, valuefunc)
        >>> sorted(result.items())
        [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])]

    Specifying *reducefunc* summarizes the categorized items:

        >>> keyfunc = lambda x: x.upper()
        >>> valuefunc = lambda x: 1
        >>> reducefunc = sum
        >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc)
        >>> sorted(result.items())
        [('A', 1), ('B', 2), ('C', 3)]

    You may want to filter the input iterable before applying the map/reduce
    procedure:

        >>> all_items = range(30)
        >>> items = [x for x in all_items if 10 <= x <= 20]  # Filter
        >>> keyfunc = lambda x: x % 2  # Evens map to 0; odds to 1
        >>> categories = map_reduce(items, keyfunc=keyfunc)
        >>> sorted(categories.items())
        [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])]
        >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum)
        >>> sorted(summaries.items())
        [(0, 90), (1, 75)]

    Note that all items in the iterable are gathered into a list before the
    summarization step, which may require significant storage.

    The returned object is a :obj:`collections.defaultdict` with the
    ``default_factory`` set to ``None``, such that it behaves like a normal
    dictionary.

    Nc��|Sr�r�r&s r�r(zmap_reduce.<locals>.<lambda>;s��1r�)rr�r�r��default_factory)	r�r�r�r�r�rr+r/�
value_lists	         r�rXrXs���f#,�"3��)�I�
�d�
�C����d�m���$����C�������
��"�y�y�{�O�C��!�*�-�C��H� +��C���Jr�c	���|�*	t|���fd�tt|�|�D�Stt	t|||���S#t$rY�*wxYw)a�Yield the index of each item in *iterable* for which *pred* returns
    ``True``, starting from the right and moving left.

    *pred* defaults to :func:`bool`, which will select truthy items:

        >>> list(rlocate([0, 1, 1, 0, 1, 0, 0]))  # Truthy at 1, 2, and 4
        [4, 2, 1]

    Set *pred* to a custom function to, e.g., find the indexes for a particular
    item:

        >>> iterable = iter('abcb')
        >>> pred = lambda x: x == 'b'
        >>> list(rlocate(iterable, pred))
        [3, 1]

    If *window_size* is given, then the *pred* function will be called with
    that many items. This enables searching for sub-sequences:

        >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
        >>> pred = lambda *args: args == (1, 2, 3)
        >>> list(rlocate(iterable, pred=pred, window_size=3))
        [9, 5, 1]

    Beware, this function won't return anything for infinite iterables.
    If *iterable* is reversible, ``rlocate`` will reverse it and search from
    the right. Otherwise, it will search from the left and return the results
    in reverse order.

    See :func:`locate` to for other example applications.

    c3�.�K�|]}�|z
dz
���y�wrr�)rr�r�s  �r�r zrlocate.<locals>.<genexpr>os�����O�.N��H�q�L�1�$�.N�rN)r�rTr�r�r�)r�rSr�r�s   @r�rereKs`���B��	��8�}�H�O�f�X�h�5G��.N�O�O��D���$��<�=�>�>���	��	�s�(A
�
	A�Ac#� K�|dkrtd��t|�}t|tg|dz
z�}t	||�}d}|D]C}||�r&|�||kr|dz
}|Ed{���t||dz
��.|s�1|dtus�=|d���Ey7�-�w)aYYield the items from *iterable*, replacing the items for which *pred*
    returns ``True`` with the items from the iterable *substitutes*.

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1]
        >>> pred = lambda x: x == 0
        >>> substitutes = (2, 3)
        >>> list(replace(iterable, pred, substitutes))
        [1, 1, 2, 3, 1, 1, 2, 3, 1, 1]

    If *count* is given, the number of replacements will be limited:

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0]
        >>> pred = lambda x: x == 0
        >>> substitutes = [None]
        >>> list(replace(iterable, pred, substitutes, count=2))
        [1, 1, None, 1, 1, None, 1, 1, 0]

    Use *window_size* to control the number of items passed as arguments to
    *pred*. This allows for locating and replacing subsequences.

        >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5]
        >>> window_size = 3
        >>> pred = lambda *args: args == (0, 1, 2)  # 3 items passed to pred
        >>> substitutes = [3, 4] # Splice in these items
        >>> list(replace(iterable, pred, substitutes, window_size=window_size))
        [3, 4, 5, 3, 4, 5]

    r,zwindow_size must be at least 1rN)r�r�rr�r{r-)	r�rS�substitutesrr�r��windowsr��ws	         r�rdrdvs�����:�Q���9�:�:���$�K�
�x�'��k�A�o�6�	7�B��r�;�'�G�	�A�
����8��
�1�u�9��Q���&�&�&����q��1��
�!�A�$�g�%��A�$�J�#�'�s�AB�B�B�6B�Bc#��K�t|�}t|�}ttd|��D]-}t	d|z||fz�D��cgc]
\}}|||��c}}���/ycc}}w�w)a"Yield all possible order-preserving partitions of *iterable*.

    >>> iterable = 'abc'
    >>> for part in partitions(iterable):
    ...     print([''.join(p) for p in part])
    ['abc']
    ['a', 'bc']
    ['ab', 'c']
    ['a', 'b', 'c']

    This is unrelated to :func:`partition`.

    r,ryN)r�r�r0r�r�)r��sequencer�r�r�s     r�r`r`�sd�����H�~�H��H�
�A�
�e�A�q�k�
"��),�T�A�X�q�A�4�x�)@�A�)@���A�x��!�}�)@�A�A�#��A�s�AA%�A�A%c#���K�t|�}t|�}|�|dkrtd��||kDry�fd��|�&td|dz�D]}�||�Ed{����y�||�Ed{���y7�7��w)a
    Yield the set partitions of *iterable* into *k* parts. Set partitions are
    not order-preserving.

    >>> iterable = 'abc'
    >>> for part in set_partitions(iterable, 2):
    ...     print([''.join(p) for p in part])
    ['a', 'bc']
    ['ab', 'c']
    ['b', 'ac']


    If *k* is not given, every set partition is generated.

    >>> iterable = 'abc'
    >>> for part in set_partitions(iterable):
    ...     print([''.join(p) for p in part])
    ['abc']
    ['a', 'bc']
    ['ab', 'c']
    ['b', 'ac']
    ['a', 'b', 'c']

    Nr,z6Can't partition in a negative or zero number of groupsc3�4�K�t|�}|dk(r|g��y||k(r|D�cgc]}|g��c}��y|^}}�||dz
�D]
}|gg|�����||�D]6}tt|��D]}|d||g||zgz||dzdz����8ycc}w�wr>)r�r�)	rr�r�r�r��M�pr��set_partitions_helpers	        �r�r3z-set_partitions.<locals>.set_partitions_helper�s��������F����6��#�I�
�!�V� !�"��1�A�3��"�"��E�A��*�1�a�!�e�4���s�i�Q�i��5�*�1�a�0���s�1�v��A��B�Q�%�A�3��1��:�,�.��1�q�5�7��;�;�'�1��#�s� B�
B�A+B)r�r�r�r�)r�r�rr�r3s    @r�rara�s������2	
�X��A��A��A��}��q�5��H��
���U��<�	�y��q�!�a�%��A�,�Q��2�2�2�!�)��A�.�.�.�
3��.�s$�AA5�A1�A5�+A3�,A5�3A5c�"�eZdZdZd�Zd�Zd�Zy)rxa�
    Yield items from *iterable* until *limit_seconds* have passed.
    If the time limit expires before all items have been yielded, the
    ``timed_out`` parameter will be set to ``True``.

    >>> from time import sleep
    >>> def generator():
    ...     yield 1
    ...     yield 2
    ...     sleep(0.2)
    ...     yield 3
    >>> iterable = time_limited(0.1, generator())
    >>> list(iterable)
    [1, 2]
    >>> iterable.timed_out
    True

    Note that the time is checked before each item is yielded, and iteration
    stops if  the time elapsed is greater than *limit_seconds*. If your time
    limit is 1 second, but it takes 2 seconds to generate the first item from
    the iterable, the function will run for 2 seconds and not yield anything.

    c�~�|dkrtd��||_t|�|_t	�|_d|_y)Nrzlimit_seconds must be positiveF)r��
limit_secondsr�r�r+�_start_time�	timed_out)r�r6r�s   r�r�ztime_limited.__init__s:���1���=�>�>�*����h����$�;�����r�c��|Sr�r�r�s r�r�ztime_limited.__iter__ r�r�c��t|j�}t�|jz
|jkDr
d|_t�|Sr%)r�r�r+r7r6r8r�rs  r�r�ztime_limited.__next__#s=���D�N�N�#���;��)�)�)�D�,>�,>�>�!�D�N����r�N�r�r�r�r�r�r�r�r�r�r�rxrx�s���0��r�rxc��t|�}t||�}	t|�}dj||�}|xst|��#t$rY|SwxYw)a*If *iterable* has only one item, return it.
    If it has zero items, return *default*.
    If it has more than one item, raise the exception given by *too_long*,
    which is ``ValueError`` by default.

    >>> only([], default='missing')
    'missing'
    >>> only([1])
    1
    >>> only([1, 2])  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: Expected exactly one item in iterable, but got 1, 2,
     and perhaps more.'
    >>> only([1, 2], too_long=TypeError)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    TypeError

    Note that :func:`only` attempts to advance *iterable* twice to ensure there
    is only one item.  See :func:`spy` or :func:`peekable` to check
    iterable contents less destructively.
    r�)r�r�r�r�r�)r�r�r�r�r�r�r�s       r�r^r^,sj��0
�h��B��r�7�#�K�	*��B�x��

 � &��{�L� A�	��)�*�S�/�)���
����
�s�A�	A�Ac#�K�t|�}	t|t�}|turytt	|g|��\}}t||���t
||��M�w)a�Break *iterable* into sub-iterables with *n* elements each.
    :func:`ichunked` is like :func:`chunked`, but it yields iterables
    instead of lists.

    If the sub-iterables are read in order, the elements of *iterable*
    won't be stored in memory.
    If they are read out of order, :func:`itertools.tee` is used to cache
    elements as necessary.

    >>> from itertools import count
    >>> all_chunks = ichunked(count(), 4)
    >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks)
    >>> list(c_2)  # c_1's elements have been cached; c_3's haven't been
    [4, 5, 6, 7]
    >>> list(c_1)
    [0, 1, 2, 3]
    >>> list(c_3)
    [8, 9, 10, 11]

    N)r�r�r�rrrr-)r�r��sourcerr�s     r�rQrQUs`����*�(�^�F�
��F�G�$���7�?�����v�v�.�/�
����R��m��	�����s�AAc	#��K�|dkrtd��|dk(rd��yt|�}tt|�t	d���g}dg|z}d}|rn	t|d�\}}|||<|dz|k(rt|���n=|jtt||dzd|dz�t	d����|dz
}|r�myy#t$r|j�|dz}Y��wxYw�w)aBYield the distinct combinations of *r* items taken from *iterable*.

        >>> list(distinct_combinations([0, 0, 1], 2))
        [(0, 0), (0, 1)]

    Equivalent to ``set(combinations(iterable))``, except duplicates are not
    generated and thrown away. For larger input sequences this is much more
    efficient.

    rzr must be non-negativer�Nr,r�r�)	r�r�r2rfr$r�r��popr�)r�r�r�
generators�
current_comborB�cur_idxr2s        r�rCrCzs����	�1�u��1�2�2�	
�a�������?�D�!�)�D�/�z�!�}�E�F�J��F�Q�J�M�
�E�
�	��j��n�-�J�G�Q�
 !�
�e���1�9��>��
�&�&������d�7�Q�;�=�1�7�Q�;�?�"�1�
��
�
�Q�J�E�#���	��N�N���Q�J�E��	�s1�AC%�C�$AC%�?C%�C"�C%�!C"�"C%c'�JK�|D]}	||�|���y#|$rY�wxYw�w)aYield the items from *iterable* for which the *validator* function does
    not raise one of the specified *exceptions*.

    *validator* is called for each item in *iterable*.
    It should be a function that accepts one argument and raises an exception
    if that item is not valid.

    >>> iterable = ['1', '2', 'three', '4', None]
    >>> list(filter_except(int, iterable, ValueError, TypeError))
    ['1', '2', '4']

    If an exception other than one given by *exceptions* is raised by
    *validator*, it is raised like normal.
    Nr�)r,r��
exceptionsrs    r�rHrH�s8������	��d�O��J�
���	��	�s�#��#� �#� �#c'�FK�|D]
}	||����y#|$rY�wxYw�w)a�Transform each item from *iterable* with *function* and yield the
    result, unless *function* raises one of the specified *exceptions*.

    *function* is called to transform each item in *iterable*.
    It should be a accept one argument.

    >>> iterable = ['1', '2', 'three', '4', None]
    >>> list(map_except(int, iterable, ValueError, TypeError))
    [1, 2, 4]

    If an exception other than one given by *exceptions* is raised by
    *function*, it is raised like normal.
    Nr�)�functionr�rErs    r�rWrW�s4������	��4�.� ����	��	�s�!�
�!��!��!c	��t||�}ttt��|z�}|t	tt��td|z
�z�z}t||�D]l\}}||k(s�||t
|�<|ttt��|z�z}|t	tt��td|z
�z�dzz
}�n|Sr>)r1rrr!rrfr")r�r��	reservoir�W�
next_indexr�rs       r��_sample_unweightedrL�s���
�Q��!�I�	�C���M�A���A��U�3�v�x�=�3�q�1�u�:�5�6�6�J�#�H�a�0���w��J��&-�I�i��l�#�
��S���]�Q�&�'�'�A��%��F�H�
��A��E�
� :�;�a�?�?�J�
1��r�c���d�|D�}t|t||��}t|�|d\}}tt	��|z}t||�D]l\}}	||k\r]|d\}}t||z�}
t
|
d�}t|�|z}t|||	f�|d\}}tt	��|z}�h||z}�nt|�D�cgc]}t|�d��c}Scc}w)Nc3�HK�|]}tt��|z���y�wr�)rr!)r�weights  r�r z#_sample_weighted.<locals>.<genexpr>�s����@��f�3�v�x�=�6�)��s� "rr,)
r1r�rrr!rr#r
r�r)
r�r��weights�weight_keysrI�smallest_weight_keyr�weights_to_skiprOr�t_w�r_2�
weight_keys
             r��_sample_weightedrW�s��
A��@�K��Q��K��2�3�I��I��'�q�\�����&�(�m�&9�9�O��w��1�����_�$�&/�q�\�"����f�2�2�3�C��#�q�/�C��S��F�*�J��	�J��#8�9�%.�q�\�"���!�&�(�m�.A�A�O��v�%�O�2�,1��8�4�8�a�G�I��q�!�8�4�4��4s�C)c�r�|dk(rgSt|�}|�t||�St|�}t|||�S)afReturn a *k*-length list of elements chosen (without replacement)
    from the *iterable*. Like :func:`random.sample`, but works on iterables
    of unknown length.

    >>> iterable = range(100)
    >>> sample(iterable, 5)  # doctest: +SKIP
    [81, 60, 96, 16, 4]

    An iterable with *weights* may also be given:

    >>> iterable = range(100)
    >>> weights = (i * i + 1 for i in range(100))
    >>> sampled = sample(iterable, 5, weights=weights)  # doctest: +SKIP
    [79, 67, 74, 66, 78]

    The algorithm can also be used to generate weighted random permutations.
    The relative weight of each item determines the probability that it
    appears late in the permutation.

    >>> data = "abcdefgh"
    >>> weights = range(1, len(data) + 1)
    >>> sample(data, k=len(data), weights=weights)  # doctest: +SKIP
    ['c', 'a', 'b', 'e', 'g', 'd', 'h', 'f']
    r)r�rLrW)r�r�rPs   r�rhrh
sC��2	�A�v��	��H�~�H���!�(�A�.�.��w�-����!�W�5�5r�c�|�|rtnt}|�|nt||�}tt	|t|���S)a�Returns ``True`` if the items of iterable are in sorted order, and
    ``False`` otherwise. *key* and *reverse* have the same meaning that they do
    in the built-in :func:`sorted` function.

    >>> is_sorted(['1', '2', '3', '4', '5'], key=int)
    True
    >>> is_sorted([5, 4, 3, 1, 2], reverse=True)
    False

    The function returns ``False`` after encountering the first out-of-order
    item. If there are no out-of-order items, the iterable is exhausted.
    )r(r'r
r�rr/)r�r+r!�comparer�s     r�rRrR0
s8���b��G��k���C��(:�B��7�7�H�R�L�1�2�2�2r�c��eZdZy)r3N)r�r�r�r�r�r�r3r3C
s��r�r3c�V�eZdZdZdd�Zd�Zd�Zd�Zd�Ze	d��Z
e	d��Zd	�Zy
)r8a�Convert a function that uses callbacks to an iterator.

    Let *func* be a function that takes a `callback` keyword argument.
    For example:

    >>> def func(callback=None):
    ...     for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]:
    ...         if callback:
    ...             callback(i, c)
    ...     return 4


    Use ``with callback_iter(func)`` to get an iterator over the parameters
    that are delivered to the callback.

    >>> with callback_iter(func) as it:
    ...     for args, kwargs in it:
    ...         print(args)
    (1, 'a')
    (2, 'b')
    (3, 'c')

    The function will be called in a background thread. The ``done`` property
    indicates whether it has completed execution.

    >>> it.done
    True

    If it completes successfully, its return value will be available
    in the ``result`` property.

    >>> it.result
    4

    Notes:

    * If the function uses some keyword argument besides ``callback``, supply
      *callback_kwd*.
    * If it finished executing, but raised an exception, accessing the
      ``result`` property will raise the same exception.
    * If it hasn't finished executing, accessing the ``result``
      property from within the ``with`` block will raise ``RuntimeError``.
    * If it hasn't finished executing, accessing the ``result`` property from
      outside the ``with`` block will raise a
      ``more_itertools.AbortThread`` exception.
    * Provide *wait_seconds* to adjust how frequently the it is polled for
      output.

    c���||_||_d|_d|_||_td�jjd��|_|j�|_
y)NFzconcurrent.futuresr,)�max_workers)�_func�
_callback_kwd�_aborted�_future�
_wait_seconds�
__import__�futures�ThreadPoolExecutor�	_executor�_reader�	_iterator)r�r��callback_kwd�wait_secondss    r�r�zcallback_iter.__init__z
sV����
�)�����
����)���#�$8�9�A�A�T�T�ab�T�c��������r�c��|Sr�r�r�s r��	__enter__zcallback_iter.__enter__�
r�r�c�F�d|_|jj�yr%)rarg�shutdown)r��exc_type�	exc_value�	tracebacks    r��__exit__zcallback_iter.__exit__�
s����
������!r�c��|Sr�r�r�s r�r�zcallback_iter.__iter__�
r�r�c�,�t|j�Sr�)r�rir�s r�r�zcallback_iter.__next__�
r�r�c�P�|j�y|jj�Sr�)rb�doner�s r�rwzcallback_iter.done�
s"���<�<����|�|� � �"�"r�c�d�|jstd��|jj�S)NzFunction has not yet completed)rw�RuntimeErrorrbrr�s r�rzcallback_iter.result�
s(���y�y��?�@�@��|�|�"�"�$�$r�c#���K�t����fd�}�jj�jfi�j|i���_		�j
�j��}�j�|���j
j�rn�Mg}		�j�}�j�|j|��3#t$rY�]wxYw#t$rYnwxYw�j�|Ed{���7y�w)Nc�Z���jrtd���j||f�y)Nzcanceled by user)rar3�put)r�r�r�r�s  ��r��callbackz'callback_iter._reader.<locals>.callback�
s&����}�}�!�"4�5�5�
�E�E�4��.�!r�)�timeout)r rg�submitr_r`rb�getrc�	task_donerrw�
get_nowaitr��join)r�r}rrbr�s`   @r�rhzcallback_iter._reader�
s������G��	"�-�t�~�~�,�,��J�J�
��-�-�x�8�
����
��u�u�T�%7�%7�u�8�����
��
��|�|� � �"����	��
'��|�|�~�����
�� � ��&����
��
���
��
��
	
�������sZ�A
D�C�+3D�C �/"D�	C�D�C�D� 	C,�)D�+C,�,D�D�DN)r}g�������?)
r�r�r�r�r�rmrsr�r��propertyrwrrhr�r�r�r8r8G
sN��0�d(��"��$��#��#�
�%��%�#r�r8c#��K�|dkrtd��t|�}t|�}||kDrtd��t||z
dz�D]}|d|}||||z}|||zd}|||f��� y�w)a�
    Yield ``(beginning, middle, end)`` tuples, where:

    * Each ``middle`` has *n* items from *iterable*
    * Each ``beginning`` has the items before the ones in ``middle``
    * Each ``end`` has the items after the ones in ``middle``

    >>> iterable = range(7)
    >>> n = 3
    >>> for beginning, middle, end in windowed_complete(iterable, n):
    ...     print(beginning, middle, end)
    () (0, 1, 2) (3, 4, 5, 6)
    (0,) (1, 2, 3) (4, 5, 6)
    (0, 1) (2, 3, 4) (5, 6)
    (0, 1, 2) (3, 4, 5) (6,)
    (0, 1, 2, 3) (4, 5, 6) ()

    Note that *n* must be at least 0 and most equal to the length of
    *iterable*.

    This function will exhaust the iterable and may require significant
    storage.
    rrzn must be <= len(seq)r,N)r�r�r�r�)r�r�rr�r��	beginning�middle�ends        r�r�r��
s�����0	�1�u��)�*�*�
��/�C��s�8�D��4�x��0�1�1�
�4�!�8�a�<�
 �����G�	��Q��Q�����!�a�%�'�l�����$�$�	!�s�A*A,c���t�}|j}g}|j}|rt||�n|D]}	||vry||��y#t$r||vrYy||�Y�/wxYw)a
    Returns ``True`` if all the elements of *iterable* are unique (no two
    elements are equal).

        >>> all_unique('ABCB')
        False

    If a *key* function is specified, it will be used to make comparisons.

        >>> all_unique('ABCb')
        True
        >>> all_unique('ABCb', str.lower)
        False

    The function returns as soon as the first non-unique element is
    encountered. Iterables with a mix of hashable and unhashable items can
    be used, but the function will be slower for unhashable items.
    FT)r�addr�r
r�)r�r+�seenset�seenset_add�seenlist�seenlist_addrs       r�r�r��
s{��&�e�G��+�+�K��H��?�?�L�),�3�s�H�%�(�:��	"��'�!���� �	;���	�	"��(�"����!�	"�s�A
�A
�

A%�A%�$A%c�h�tttt|���}ttt|��}tt|�}|dkr||z
}d|cxkr
|ks
t�t�g}t||�D]!\}}|j|||z�||z}�#tt|��S)a�Equivalent to ``list(product(*args))[index]``.

    The products of *args* can be ordered lexicographically.
    :func:`nth_product` computes the product at sort position *index* without
    computing the previous products.

        >>> nth_product(8, range(2), range(2), range(2), range(2))
        (1, 0, 0, 0)

    ``IndexError`` will be raised if the given *index* is invalid.
    r)
r�r
r�r�r�r	r%r�r�r�)r�r��pools�ns�crrr�s        r�r[r[s���
��U�H�T�N�+�,�E�	
�c�#�u�o�	�B��s�B��A��q�y�
��
����>��>������
�F��u�b�>���a��
�
�d�5�1�9�o�&�
�!���"���&�!�"�"r�c��t|�}t|�}|�||k(r|t|�}}n2d|cxkr
|ks
t�t�t|�t||z
�z}|dkr||z
}d|cxkr
|ks
t�t�|dk(r
t�Sdg|z}||kr|t|�z|zn|}t
d|dz�D]1}t||�\}}	d||z
cxkr|krnn|	|||z
<|dk(s�1ntt|j|��S)a'Equivalent to ``list(permutations(iterable, r))[index]```

    The subsequences of *iterable* that are of length *r* where order is
    important can be ordered lexicographically. :func:`nth_permutation`
    computes the subsequence at sort position *index* directly, without
    computing the previous subsequences.

        >>> nth_permutation('ghijk', 2, 5)
        ('h', 'i')

    ``ValueError`` will be raised If *r* is negative or greater than the length
    of *iterable*.
    ``IndexError`` will be raised if the given *index* is invalid.
    rr,)
r�r�rr�r�r�r�r�r
r@)
r�r�r�rr�r�rr��dr�s
          r�rZrZ-s"����>�D��D�	�A��y�A��F��)�A�,�1��
�!�Z�a�Z�������a�L�I�a�!�e�,�,���q�y�
��
����>��>�������A�v��w���S�1�W�F�%&��U��	�!����!��A�
�1�a�!�e�_���a��|���1���A��>��>��F�1�q�5�M���6�����T�X�X�v�&�'�'r�c'�K�|D](}t|ttf�r|���	|Ed{����*y7�#t$r|��Y�=wxYw�w)a�Yield all arguments passed to the function in the same order in which
    they were passed. If an argument itself is iterable then iterate over its
    values.

        >>> list(value_chain(1, 2, 3, [4, 5, 6]))
        [1, 2, 3, 4, 5, 6]

    Binary and text strings are not considered iterable and are emitted
    as-is:

        >>> list(value_chain('12', '34', ['56', '78']))
        ['12', '34', '56', '78']


    Multiple levels of nesting are not flattened.

    N)r�r?r@r�)r�r/s  r�r�r�[sN����$���e�c�5�\�*��K��	�����

���	��K�	�s1�!A�3�1�3�A�3�
A�A�A�Ac���d}t||t��D]K\}}|tus|turtd��t|�}|t	|�z|j|�z}�M|S)a�Equivalent to ``list(product(*args)).index(element)``

    The products of *args* can be ordered lexicographically.
    :func:`product_index` computes the first index of *element* without
    computing the previous products.

        >>> product_index([8, 2], range(10), range(5))
        42

    ``ValueError`` will be raised if the given *element* isn't in the product
    of *args*.
    rr�z element is not a product of args)rr�r�r�r�r�)rr�r�r'rs     r�r�r�wse��
�E��w���@���4���<�4�7�?��?�@�@��T�{����D�	�!�D�J�J�q�M�1��A��Lr�c��t|�}t|d�\}}|�yg}t|�}|D]1\}}||k(s�|j|�t|d�\}}|�n|}�3td��t	||df��\}}	d}
tt|�d��D]9\}}||z
}||ks�|
t
|�t
|�t
||z
�zzz
}
�;t
|dz�t
|dz�t
||z
�zz|
z
S)a�Equivalent to ``list(combinations(iterable, r)).index(element)``

    The subsequences of *iterable* that are of length *r* can be ordered
    lexicographically. :func:`combination_index` computes the index of the
    first *element*, without computing the previous combinations.

        >>> combination_index('adf', 'abcdefg')
        10

    ``ValueError`` will be raised if the given *element* isn't one of the
    combinations of *iterable*.
    �NNNrz(element is not a combination of iterabler�r,)r�)rfr�r�r�rSr�r)
rr�r��y�indexesrr�r'�tmprr�r�r�s
             r�r�r��s���� �G����&�D�A�q��y���G��X��D����1���6��N�N�1���'�<�0�F�C���{������C�D�D���q�$�i�(�D�A�q�
�E��(�7�+�1�5���1�
��E����6��Y�q�\�i��l�Y�q�1�u�5E�&E�F�F�E�6�
�Q��U��	�!�a�%� 0�9�Q��U�3C� C�D�u�L�Lr�c��d}t|�}ttt|�dd�|�D]!\}}|j	|�}||z|z}||=�#|S)a�Equivalent to ``list(permutations(iterable, r)).index(element)```

    The subsequences of *iterable* that are of length *r* where order is
    important can be ordered lexicographically. :func:`permutation_index`
    computes the index of the first *element* directly, without computing
    the previous permutations.

        >>> permutation_index([1, 3, 2], range(5))
        19

    ``ValueError`` will be raised if the given *element* isn't one of the
    permutations of *iterable*.
    rr�)r�r�r�r�r�)rr�r�rr�r'r�s       r�r�r��s\��
�E���>�D��E�#�d�)�R��,�g�6���1��J�J�q�M����	�A�
����G�7�
�Lr�c�"�eZdZdZd�Zd�Zd�Zy)r?a�Wrap *iterable* and keep a count of how many items have been consumed.

    The ``items_seen`` attribute starts at ``0`` and increments as the iterable
    is consumed:

        >>> iterable = map(str, range(10))
        >>> it = countable(iterable)
        >>> it.items_seen
        0
        >>> next(it), next(it)
        ('0', '1')
        >>> list(it)
        ['2', '3', '4', '5', '6', '7', '8', '9']
        >>> it.items_seen
        10
    c�2�t|�|_d|_yr�)r�r��
items_seenr�s  r�r�zcountable.__init__�s����>�����r�c��|Sr�r�r�s r�r�zcountable.__iter__�r�r�c�Z�t|j�}|xjdz
c_|Sr>)r�r�r�rs  r�r�zcountable.__next__�s"���D�H�H�~�����1����r�Nr;r�r�r�r?r?�s���"��r�r?)Fr�r�)r,r>)NNN)r�F)r�)NNF))r�rr,FN)ryNFr�)�r��collectionsrrrr�collections.abcr�	functoolsrr	r
�heapqrrr
r�	itertoolsrrrrrrrrrrrr�mathrrrr�queuerr r!r"r#�operatorr$r%r&r'r(�sysr)r*�timer+�recipesr-r.r/r0r1r2�__all__�objectr�r9rIrSrYrbr<r>rKrPr|r]rDrNryr{rvrwr7rsrMrLr;rkrlrnrprorqrrr_rcrErtr�r}rtr~rrmrzrFr?r@r5r4rJ�Hashabler\r@rAr�rTrUrfrurOr�r6r=rBrjrirgrGr:rVrXrerdr`rarxr^rQrCrHrWrLrWrhrR�
BaseExceptionr3r8r�r�r[rZr�r�r�r�r?r�r�r��<module>r�s����8�8�$�,�,�6�6�
�
�
�
�,�+��-�-�1�1�#����T��l�(���B$��8#��:&-�:�"b"�b"�J#'�L�@�"
��@�Fa$�HD�4C�B0�f!�4�D]'�]'�@((�V0�
.� -!�`:�z�D)�X �F!�H*�Z*)�Z�@�& M�F�8�J���+/�\-2�T�$�N?�D.K�b0�f%(��<�2�j$)�N*�ZV,�C�L�L�#�,�,�V,�r
=� "�J�D�-0�`%�$�40�"+P�+P�\]&�@(�$+6�-$�`"�'2�d�'2�T*L�8�*L�ZI%�I%�XF�F�:&*�>�$:�>�B@�F �T�(?�V:�zB�(5/�p*�*�Z&�R"�J%�P�0�*�4 5�F!6�H3�&	�-�	�y�y�x%%�P �F#�>+(�\�8�2(M�V�0�r�python3.12/site-packages/setuptools/_vendor/more_itertools/recipes.py000064400000037600151732704070022054 0ustar00"""Imported from the recipes section of the itertools documentation.

All functions taken from the recipes section of the itertools library docs
[1]_.
Some backward-compatible usability improvements have been made.

.. [1] http://docs.python.org/library/itertools.html#recipes

"""
import warnings
from collections import deque
from itertools import (
    chain,
    combinations,
    count,
    cycle,
    groupby,
    islice,
    repeat,
    starmap,
    tee,
    zip_longest,
)
import operator
from random import randrange, sample, choice

__all__ = [
    'all_equal',
    'consume',
    'convolve',
    'dotproduct',
    'first_true',
    'flatten',
    'grouper',
    'iter_except',
    'ncycles',
    'nth',
    'nth_combination',
    'padnone',
    'pad_none',
    'pairwise',
    'partition',
    'powerset',
    'prepend',
    'quantify',
    'random_combination_with_replacement',
    'random_combination',
    'random_permutation',
    'random_product',
    'repeatfunc',
    'roundrobin',
    'tabulate',
    'tail',
    'take',
    'unique_everseen',
    'unique_justseen',
]


def take(n, iterable):
    """Return first *n* items of the iterable as a list.

        >>> take(3, range(10))
        [0, 1, 2]

    If there are fewer than *n* items in the iterable, all of them are
    returned.

        >>> take(10, range(3))
        [0, 1, 2]

    """
    return list(islice(iterable, n))


def tabulate(function, start=0):
    """Return an iterator over the results of ``func(start)``,
    ``func(start + 1)``, ``func(start + 2)``...

    *func* should be a function that accepts one integer argument.

    If *start* is not specified it defaults to 0. It will be incremented each
    time the iterator is advanced.

        >>> square = lambda x: x ** 2
        >>> iterator = tabulate(square, -3)
        >>> take(4, iterator)
        [9, 4, 1, 0]

    """
    return map(function, count(start))


def tail(n, iterable):
    """Return an iterator over the last *n* items of *iterable*.

    >>> t = tail(3, 'ABCDEFG')
    >>> list(t)
    ['E', 'F', 'G']

    """
    return iter(deque(iterable, maxlen=n))


def consume(iterator, n=None):
    """Advance *iterable* by *n* steps. If *n* is ``None``, consume it
    entirely.

    Efficiently exhausts an iterator without returning values. Defaults to
    consuming the whole iterator, but an optional second argument may be
    provided to limit consumption.

        >>> i = (x for x in range(10))
        >>> next(i)
        0
        >>> consume(i, 3)
        >>> next(i)
        4
        >>> consume(i)
        >>> next(i)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        StopIteration

    If the iterator has fewer items remaining than the provided limit, the
    whole iterator will be consumed.

        >>> i = (x for x in range(3))
        >>> consume(i, 5)
        >>> next(i)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        StopIteration

    """
    # Use functions that consume iterators at C speed.
    if n is None:
        # feed the entire iterator into a zero-length deque
        deque(iterator, maxlen=0)
    else:
        # advance to the empty slice starting at position n
        next(islice(iterator, n, n), None)


def nth(iterable, n, default=None):
    """Returns the nth item or a default value.

    >>> l = range(10)
    >>> nth(l, 3)
    3
    >>> nth(l, 20, "zebra")
    'zebra'

    """
    return next(islice(iterable, n, None), default)


def all_equal(iterable):
    """
    Returns ``True`` if all the elements are equal to each other.

        >>> all_equal('aaaa')
        True
        >>> all_equal('aaab')
        False

    """
    g = groupby(iterable)
    return next(g, True) and not next(g, False)


def quantify(iterable, pred=bool):
    """Return the how many times the predicate is true.

    >>> quantify([True, False, True])
    2

    """
    return sum(map(pred, iterable))


def pad_none(iterable):
    """Returns the sequence of elements and then returns ``None`` indefinitely.

        >>> take(5, pad_none(range(3)))
        [0, 1, 2, None, None]

    Useful for emulating the behavior of the built-in :func:`map` function.

    See also :func:`padded`.

    """
    return chain(iterable, repeat(None))


padnone = pad_none


def ncycles(iterable, n):
    """Returns the sequence elements *n* times

    >>> list(ncycles(["a", "b"], 3))
    ['a', 'b', 'a', 'b', 'a', 'b']

    """
    return chain.from_iterable(repeat(tuple(iterable), n))


def dotproduct(vec1, vec2):
    """Returns the dot product of the two iterables.

    >>> dotproduct([10, 10], [20, 20])
    400

    """
    return sum(map(operator.mul, vec1, vec2))


def flatten(listOfLists):
    """Return an iterator flattening one level of nesting in a list of lists.

        >>> list(flatten([[0, 1], [2, 3]]))
        [0, 1, 2, 3]

    See also :func:`collapse`, which can flatten multiple levels of nesting.

    """
    return chain.from_iterable(listOfLists)


def repeatfunc(func, times=None, *args):
    """Call *func* with *args* repeatedly, returning an iterable over the
    results.

    If *times* is specified, the iterable will terminate after that many
    repetitions:

        >>> from operator import add
        >>> times = 4
        >>> args = 3, 5
        >>> list(repeatfunc(add, times, *args))
        [8, 8, 8, 8]

    If *times* is ``None`` the iterable will not terminate:

        >>> from random import randrange
        >>> times = None
        >>> args = 1, 11
        >>> take(6, repeatfunc(randrange, times, *args))  # doctest:+SKIP
        [2, 4, 8, 1, 8, 4]

    """
    if times is None:
        return starmap(func, repeat(args))
    return starmap(func, repeat(args, times))


def _pairwise(iterable):
    """Returns an iterator of paired items, overlapping, from the original

    >>> take(4, pairwise(count()))
    [(0, 1), (1, 2), (2, 3), (3, 4)]

    On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`.

    """
    a, b = tee(iterable)
    next(b, None)
    yield from zip(a, b)


try:
    from itertools import pairwise as itertools_pairwise
except ImportError:
    pairwise = _pairwise
else:

    def pairwise(iterable):
        yield from itertools_pairwise(iterable)

    pairwise.__doc__ = _pairwise.__doc__


def grouper(iterable, n, fillvalue=None):
    """Collect data into fixed-length chunks or blocks.

    >>> list(grouper('ABCDEFG', 3, 'x'))
    [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')]

    """
    if isinstance(iterable, int):
        warnings.warn(
            "grouper expects iterable as first parameter", DeprecationWarning
        )
        n, iterable = iterable, n
    args = [iter(iterable)] * n
    return zip_longest(fillvalue=fillvalue, *args)


def roundrobin(*iterables):
    """Yields an item from each iterable, alternating between them.

        >>> list(roundrobin('ABC', 'D', 'EF'))
        ['A', 'D', 'E', 'B', 'F', 'C']

    This function produces the same output as :func:`interleave_longest`, but
    may perform better for some inputs (in particular when the number of
    iterables is small).

    """
    # Recipe credited to George Sakkis
    pending = len(iterables)
    nexts = cycle(iter(it).__next__ for it in iterables)
    while pending:
        try:
            for next in nexts:
                yield next()
        except StopIteration:
            pending -= 1
            nexts = cycle(islice(nexts, pending))


def partition(pred, iterable):
    """
    Returns a 2-tuple of iterables derived from the input iterable.
    The first yields the items that have ``pred(item) == False``.
    The second yields the items that have ``pred(item) == True``.

        >>> is_odd = lambda x: x % 2 != 0
        >>> iterable = range(10)
        >>> even_items, odd_items = partition(is_odd, iterable)
        >>> list(even_items), list(odd_items)
        ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])

    If *pred* is None, :func:`bool` is used.

        >>> iterable = [0, 1, False, True, '', ' ']
        >>> false_items, true_items = partition(None, iterable)
        >>> list(false_items), list(true_items)
        ([0, False, ''], [1, True, ' '])

    """
    if pred is None:
        pred = bool

    evaluations = ((pred(x), x) for x in iterable)
    t1, t2 = tee(evaluations)
    return (
        (x for (cond, x) in t1 if not cond),
        (x for (cond, x) in t2 if cond),
    )


def powerset(iterable):
    """Yields all possible subsets of the iterable.

        >>> list(powerset([1, 2, 3]))
        [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)]

    :func:`powerset` will operate on iterables that aren't :class:`set`
    instances, so repeated elements in the input will produce repeated elements
    in the output. Use :func:`unique_everseen` on the input to avoid generating
    duplicates:

        >>> seq = [1, 1, 0]
        >>> list(powerset(seq))
        [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)]
        >>> from more_itertools import unique_everseen
        >>> list(powerset(unique_everseen(seq)))
        [(), (1,), (0,), (1, 0)]

    """
    s = list(iterable)
    return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1))


def unique_everseen(iterable, key=None):
    """
    Yield unique elements, preserving order.

        >>> list(unique_everseen('AAAABBBCCDAABBB'))
        ['A', 'B', 'C', 'D']
        >>> list(unique_everseen('ABBCcAD', str.lower))
        ['A', 'B', 'C', 'D']

    Sequences with a mix of hashable and unhashable items can be used.
    The function will be slower (i.e., `O(n^2)`) for unhashable items.

    Remember that ``list`` objects are unhashable - you can use the *key*
    parameter to transform the list to a tuple (which is hashable) to
    avoid a slowdown.

        >>> iterable = ([1, 2], [2, 3], [1, 2])
        >>> list(unique_everseen(iterable))  # Slow
        [[1, 2], [2, 3]]
        >>> list(unique_everseen(iterable, key=tuple))  # Faster
        [[1, 2], [2, 3]]

    Similary, you may want to convert unhashable ``set`` objects with
    ``key=frozenset``. For ``dict`` objects,
    ``key=lambda x: frozenset(x.items())`` can be used.

    """
    seenset = set()
    seenset_add = seenset.add
    seenlist = []
    seenlist_add = seenlist.append
    use_key = key is not None

    for element in iterable:
        k = key(element) if use_key else element
        try:
            if k not in seenset:
                seenset_add(k)
                yield element
        except TypeError:
            if k not in seenlist:
                seenlist_add(k)
                yield element


def unique_justseen(iterable, key=None):
    """Yields elements in order, ignoring serial duplicates

    >>> list(unique_justseen('AAAABBBCCDAABBB'))
    ['A', 'B', 'C', 'D', 'A', 'B']
    >>> list(unique_justseen('ABBCcAD', str.lower))
    ['A', 'B', 'C', 'A', 'D']

    """
    return map(next, map(operator.itemgetter(1), groupby(iterable, key)))


def iter_except(func, exception, first=None):
    """Yields results from a function repeatedly until an exception is raised.

    Converts a call-until-exception interface to an iterator interface.
    Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel
    to end the loop.

        >>> l = [0, 1, 2]
        >>> list(iter_except(l.pop, IndexError))
        [2, 1, 0]

    """
    try:
        if first is not None:
            yield first()
        while 1:
            yield func()
    except exception:
        pass


def first_true(iterable, default=None, pred=None):
    """
    Returns the first true value in the iterable.

    If no true value is found, returns *default*

    If *pred* is not None, returns the first item for which
    ``pred(item) == True`` .

        >>> first_true(range(10))
        1
        >>> first_true(range(10), pred=lambda x: x > 5)
        6
        >>> first_true(range(10), default='missing', pred=lambda x: x > 9)
        'missing'

    """
    return next(filter(pred, iterable), default)


def random_product(*args, repeat=1):
    """Draw an item at random from each of the input iterables.

        >>> random_product('abc', range(4), 'XYZ')  # doctest:+SKIP
        ('c', 3, 'Z')

    If *repeat* is provided as a keyword argument, that many items will be
    drawn from each iterable.

        >>> random_product('abcd', range(4), repeat=2)  # doctest:+SKIP
        ('a', 2, 'd', 3)

    This equivalent to taking a random selection from
    ``itertools.product(*args, **kwarg)``.

    """
    pools = [tuple(pool) for pool in args] * repeat
    return tuple(choice(pool) for pool in pools)


def random_permutation(iterable, r=None):
    """Return a random *r* length permutation of the elements in *iterable*.

    If *r* is not specified or is ``None``, then *r* defaults to the length of
    *iterable*.

        >>> random_permutation(range(5))  # doctest:+SKIP
        (3, 4, 0, 1, 2)

    This equivalent to taking a random selection from
    ``itertools.permutations(iterable, r)``.

    """
    pool = tuple(iterable)
    r = len(pool) if r is None else r
    return tuple(sample(pool, r))


def random_combination(iterable, r):
    """Return a random *r* length subsequence of the elements in *iterable*.

        >>> random_combination(range(5), 3)  # doctest:+SKIP
        (2, 3, 4)

    This equivalent to taking a random selection from
    ``itertools.combinations(iterable, r)``.

    """
    pool = tuple(iterable)
    n = len(pool)
    indices = sorted(sample(range(n), r))
    return tuple(pool[i] for i in indices)


def random_combination_with_replacement(iterable, r):
    """Return a random *r* length subsequence of elements in *iterable*,
    allowing individual elements to be repeated.

        >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP
        (0, 0, 1, 2, 2)

    This equivalent to taking a random selection from
    ``itertools.combinations_with_replacement(iterable, r)``.

    """
    pool = tuple(iterable)
    n = len(pool)
    indices = sorted(randrange(n) for i in range(r))
    return tuple(pool[i] for i in indices)


def nth_combination(iterable, r, index):
    """Equivalent to ``list(combinations(iterable, r))[index]``.

    The subsequences of *iterable* that are of length *r* can be ordered
    lexicographically. :func:`nth_combination` computes the subsequence at
    sort position *index* directly, without computing the previous
    subsequences.

        >>> nth_combination(range(5), 3, 5)
        (0, 3, 4)

    ``ValueError`` will be raised If *r* is negative or greater than the length
    of *iterable*.
    ``IndexError`` will be raised if the given *index* is invalid.
    """
    pool = tuple(iterable)
    n = len(pool)
    if (r < 0) or (r > n):
        raise ValueError

    c = 1
    k = min(r, n - r)
    for i in range(1, k + 1):
        c = c * (n - k + i) // i

    if index < 0:
        index += c

    if (index < 0) or (index >= c):
        raise IndexError

    result = []
    while r:
        c, n, r = c * r // n, n - 1, r - 1
        while index >= c:
            index -= c
            c, n = c * (n - r) // n, n - 1
        result.append(pool[-1 - n])

    return tuple(result)


def prepend(value, iterator):
    """Yield *value*, followed by the elements in *iterator*.

        >>> value = '0'
        >>> iterator = ['1', '2', '3']
        >>> list(prepend(value, iterator))
        ['0', '1', '2', '3']

    To prepend multiple values, see :func:`itertools.chain`
    or :func:`value_chain`.

    """
    return chain([value], iterator)


def convolve(signal, kernel):
    """Convolve the iterable *signal* with the iterable *kernel*.

        >>> signal = (1, 2, 3, 4, 5)
        >>> kernel = [3, 2, 1]
        >>> list(convolve(signal, kernel))
        [3, 8, 14, 20, 26, 14, 5]

    Note: the input arguments are not interchangeable, as the *kernel*
    is immediately consumed and stored.

    """
    kernel = tuple(kernel)[::-1]
    n = len(kernel)
    window = deque([0], maxlen=n) * n
    for x in chain(signal, repeat(0, n - 1)):
        window.append(x)
        yield sum(map(operator.mul, kernel, window))
python3.12/site-packages/setuptools/_vendor/more_itertools/more.pyi000064400000035201151732704100021522 0ustar00"""Stubs for more_itertools.more"""

from typing import (
    Any,
    Callable,
    Container,
    Dict,
    Generic,
    Hashable,
    Iterable,
    Iterator,
    List,
    Optional,
    Reversible,
    Sequence,
    Sized,
    Tuple,
    Union,
    TypeVar,
    type_check_only,
)
from types import TracebackType
from typing_extensions import ContextManager, Protocol, Type, overload

# Type and type variable definitions
_T = TypeVar('_T')
_U = TypeVar('_U')
_V = TypeVar('_V')
_W = TypeVar('_W')
_T_co = TypeVar('_T_co', covariant=True)
_GenFn = TypeVar('_GenFn', bound=Callable[..., Iterator[object]])
_Raisable = Union[BaseException, 'Type[BaseException]']

@type_check_only
class _SizedIterable(Protocol[_T_co], Sized, Iterable[_T_co]): ...

@type_check_only
class _SizedReversible(Protocol[_T_co], Sized, Reversible[_T_co]): ...

def chunked(
    iterable: Iterable[_T], n: int, strict: bool = ...
) -> Iterator[List[_T]]: ...
@overload
def first(iterable: Iterable[_T]) -> _T: ...
@overload
def first(iterable: Iterable[_T], default: _U) -> Union[_T, _U]: ...
@overload
def last(iterable: Iterable[_T]) -> _T: ...
@overload
def last(iterable: Iterable[_T], default: _U) -> Union[_T, _U]: ...
@overload
def nth_or_last(iterable: Iterable[_T], n: int) -> _T: ...
@overload
def nth_or_last(
    iterable: Iterable[_T], n: int, default: _U
) -> Union[_T, _U]: ...

class peekable(Generic[_T], Iterator[_T]):
    def __init__(self, iterable: Iterable[_T]) -> None: ...
    def __iter__(self) -> peekable[_T]: ...
    def __bool__(self) -> bool: ...
    @overload
    def peek(self) -> _T: ...
    @overload
    def peek(self, default: _U) -> Union[_T, _U]: ...
    def prepend(self, *items: _T) -> None: ...
    def __next__(self) -> _T: ...
    @overload
    def __getitem__(self, index: int) -> _T: ...
    @overload
    def __getitem__(self, index: slice) -> List[_T]: ...

def collate(*iterables: Iterable[_T], **kwargs: Any) -> Iterable[_T]: ...
def consumer(func: _GenFn) -> _GenFn: ...
def ilen(iterable: Iterable[object]) -> int: ...
def iterate(func: Callable[[_T], _T], start: _T) -> Iterator[_T]: ...
def with_iter(
    context_manager: ContextManager[Iterable[_T]],
) -> Iterator[_T]: ...
def one(
    iterable: Iterable[_T],
    too_short: Optional[_Raisable] = ...,
    too_long: Optional[_Raisable] = ...,
) -> _T: ...
def distinct_permutations(
    iterable: Iterable[_T], r: Optional[int] = ...
) -> Iterator[Tuple[_T, ...]]: ...
def intersperse(
    e: _U, iterable: Iterable[_T], n: int = ...
) -> Iterator[Union[_T, _U]]: ...
def unique_to_each(*iterables: Iterable[_T]) -> List[List[_T]]: ...
@overload
def windowed(
    seq: Iterable[_T], n: int, *, step: int = ...
) -> Iterator[Tuple[Optional[_T], ...]]: ...
@overload
def windowed(
    seq: Iterable[_T], n: int, fillvalue: _U, step: int = ...
) -> Iterator[Tuple[Union[_T, _U], ...]]: ...
def substrings(iterable: Iterable[_T]) -> Iterator[Tuple[_T, ...]]: ...
def substrings_indexes(
    seq: Sequence[_T], reverse: bool = ...
) -> Iterator[Tuple[Sequence[_T], int, int]]: ...

class bucket(Generic[_T, _U], Container[_U]):
    def __init__(
        self,
        iterable: Iterable[_T],
        key: Callable[[_T], _U],
        validator: Optional[Callable[[object], object]] = ...,
    ) -> None: ...
    def __contains__(self, value: object) -> bool: ...
    def __iter__(self) -> Iterator[_U]: ...
    def __getitem__(self, value: object) -> Iterator[_T]: ...

def spy(
    iterable: Iterable[_T], n: int = ...
) -> Tuple[List[_T], Iterator[_T]]: ...
def interleave(*iterables: Iterable[_T]) -> Iterator[_T]: ...
def interleave_longest(*iterables: Iterable[_T]) -> Iterator[_T]: ...
def collapse(
    iterable: Iterable[Any],
    base_type: Optional[type] = ...,
    levels: Optional[int] = ...,
) -> Iterator[Any]: ...
@overload
def side_effect(
    func: Callable[[_T], object],
    iterable: Iterable[_T],
    chunk_size: None = ...,
    before: Optional[Callable[[], object]] = ...,
    after: Optional[Callable[[], object]] = ...,
) -> Iterator[_T]: ...
@overload
def side_effect(
    func: Callable[[List[_T]], object],
    iterable: Iterable[_T],
    chunk_size: int,
    before: Optional[Callable[[], object]] = ...,
    after: Optional[Callable[[], object]] = ...,
) -> Iterator[_T]: ...
def sliced(
    seq: Sequence[_T], n: int, strict: bool = ...
) -> Iterator[Sequence[_T]]: ...
def split_at(
    iterable: Iterable[_T],
    pred: Callable[[_T], object],
    maxsplit: int = ...,
    keep_separator: bool = ...,
) -> Iterator[List[_T]]: ...
def split_before(
    iterable: Iterable[_T], pred: Callable[[_T], object], maxsplit: int = ...
) -> Iterator[List[_T]]: ...
def split_after(
    iterable: Iterable[_T], pred: Callable[[_T], object], maxsplit: int = ...
) -> Iterator[List[_T]]: ...
def split_when(
    iterable: Iterable[_T],
    pred: Callable[[_T, _T], object],
    maxsplit: int = ...,
) -> Iterator[List[_T]]: ...
def split_into(
    iterable: Iterable[_T], sizes: Iterable[Optional[int]]
) -> Iterator[List[_T]]: ...
@overload
def padded(
    iterable: Iterable[_T],
    *,
    n: Optional[int] = ...,
    next_multiple: bool = ...
) -> Iterator[Optional[_T]]: ...
@overload
def padded(
    iterable: Iterable[_T],
    fillvalue: _U,
    n: Optional[int] = ...,
    next_multiple: bool = ...,
) -> Iterator[Union[_T, _U]]: ...
@overload
def repeat_last(iterable: Iterable[_T]) -> Iterator[_T]: ...
@overload
def repeat_last(
    iterable: Iterable[_T], default: _U
) -> Iterator[Union[_T, _U]]: ...
def distribute(n: int, iterable: Iterable[_T]) -> List[Iterator[_T]]: ...
@overload
def stagger(
    iterable: Iterable[_T],
    offsets: _SizedIterable[int] = ...,
    longest: bool = ...,
) -> Iterator[Tuple[Optional[_T], ...]]: ...
@overload
def stagger(
    iterable: Iterable[_T],
    offsets: _SizedIterable[int] = ...,
    longest: bool = ...,
    fillvalue: _U = ...,
) -> Iterator[Tuple[Union[_T, _U], ...]]: ...

class UnequalIterablesError(ValueError):
    def __init__(
        self, details: Optional[Tuple[int, int, int]] = ...
    ) -> None: ...

def zip_equal(*iterables: Iterable[_T]) -> Iterator[Tuple[_T, ...]]: ...
@overload
def zip_offset(
    *iterables: Iterable[_T], offsets: _SizedIterable[int], longest: bool = ...
) -> Iterator[Tuple[Optional[_T], ...]]: ...
@overload
def zip_offset(
    *iterables: Iterable[_T],
    offsets: _SizedIterable[int],
    longest: bool = ...,
    fillvalue: _U
) -> Iterator[Tuple[Union[_T, _U], ...]]: ...
def sort_together(
    iterables: Iterable[Iterable[_T]],
    key_list: Iterable[int] = ...,
    key: Optional[Callable[..., Any]] = ...,
    reverse: bool = ...,
) -> List[Tuple[_T, ...]]: ...
def unzip(iterable: Iterable[Sequence[_T]]) -> Tuple[Iterator[_T], ...]: ...
def divide(n: int, iterable: Iterable[_T]) -> List[Iterator[_T]]: ...
def always_iterable(
    obj: object,
    base_type: Union[
        type, Tuple[Union[type, Tuple[Any, ...]], ...], None
    ] = ...,
) -> Iterator[Any]: ...
def adjacent(
    predicate: Callable[[_T], bool],
    iterable: Iterable[_T],
    distance: int = ...,
) -> Iterator[Tuple[bool, _T]]: ...
def groupby_transform(
    iterable: Iterable[_T],
    keyfunc: Optional[Callable[[_T], _U]] = ...,
    valuefunc: Optional[Callable[[_T], _V]] = ...,
    reducefunc: Optional[Callable[..., _W]] = ...,
) -> Iterator[Tuple[_T, _W]]: ...

class numeric_range(Generic[_T, _U], Sequence[_T], Hashable, Reversible[_T]):
    @overload
    def __init__(self, __stop: _T) -> None: ...
    @overload
    def __init__(self, __start: _T, __stop: _T) -> None: ...
    @overload
    def __init__(self, __start: _T, __stop: _T, __step: _U) -> None: ...
    def __bool__(self) -> bool: ...
    def __contains__(self, elem: object) -> bool: ...
    def __eq__(self, other: object) -> bool: ...
    @overload
    def __getitem__(self, key: int) -> _T: ...
    @overload
    def __getitem__(self, key: slice) -> numeric_range[_T, _U]: ...
    def __hash__(self) -> int: ...
    def __iter__(self) -> Iterator[_T]: ...
    def __len__(self) -> int: ...
    def __reduce__(
        self,
    ) -> Tuple[Type[numeric_range[_T, _U]], Tuple[_T, _T, _U]]: ...
    def __repr__(self) -> str: ...
    def __reversed__(self) -> Iterator[_T]: ...
    def count(self, value: _T) -> int: ...
    def index(self, value: _T) -> int: ...  # type: ignore

def count_cycle(
    iterable: Iterable[_T], n: Optional[int] = ...
) -> Iterable[Tuple[int, _T]]: ...
def mark_ends(
    iterable: Iterable[_T],
) -> Iterable[Tuple[bool, bool, _T]]: ...
def locate(
    iterable: Iterable[object],
    pred: Callable[..., Any] = ...,
    window_size: Optional[int] = ...,
) -> Iterator[int]: ...
def lstrip(
    iterable: Iterable[_T], pred: Callable[[_T], object]
) -> Iterator[_T]: ...
def rstrip(
    iterable: Iterable[_T], pred: Callable[[_T], object]
) -> Iterator[_T]: ...
def strip(
    iterable: Iterable[_T], pred: Callable[[_T], object]
) -> Iterator[_T]: ...

class islice_extended(Generic[_T], Iterator[_T]):
    def __init__(
        self, iterable: Iterable[_T], *args: Optional[int]
    ) -> None: ...
    def __iter__(self) -> islice_extended[_T]: ...
    def __next__(self) -> _T: ...
    def __getitem__(self, index: slice) -> islice_extended[_T]: ...

def always_reversible(iterable: Iterable[_T]) -> Iterator[_T]: ...
def consecutive_groups(
    iterable: Iterable[_T], ordering: Callable[[_T], int] = ...
) -> Iterator[Iterator[_T]]: ...
@overload
def difference(
    iterable: Iterable[_T],
    func: Callable[[_T, _T], _U] = ...,
    *,
    initial: None = ...
) -> Iterator[Union[_T, _U]]: ...
@overload
def difference(
    iterable: Iterable[_T], func: Callable[[_T, _T], _U] = ..., *, initial: _U
) -> Iterator[_U]: ...

class SequenceView(Generic[_T], Sequence[_T]):
    def __init__(self, target: Sequence[_T]) -> None: ...
    @overload
    def __getitem__(self, index: int) -> _T: ...
    @overload
    def __getitem__(self, index: slice) -> Sequence[_T]: ...
    def __len__(self) -> int: ...

class seekable(Generic[_T], Iterator[_T]):
    def __init__(
        self, iterable: Iterable[_T], maxlen: Optional[int] = ...
    ) -> None: ...
    def __iter__(self) -> seekable[_T]: ...
    def __next__(self) -> _T: ...
    def __bool__(self) -> bool: ...
    @overload
    def peek(self) -> _T: ...
    @overload
    def peek(self, default: _U) -> Union[_T, _U]: ...
    def elements(self) -> SequenceView[_T]: ...
    def seek(self, index: int) -> None: ...

class run_length:
    @staticmethod
    def encode(iterable: Iterable[_T]) -> Iterator[Tuple[_T, int]]: ...
    @staticmethod
    def decode(iterable: Iterable[Tuple[_T, int]]) -> Iterator[_T]: ...

def exactly_n(
    iterable: Iterable[_T], n: int, predicate: Callable[[_T], object] = ...
) -> bool: ...
def circular_shifts(iterable: Iterable[_T]) -> List[Tuple[_T, ...]]: ...
def make_decorator(
    wrapping_func: Callable[..., _U], result_index: int = ...
) -> Callable[..., Callable[[Callable[..., Any]], Callable[..., _U]]]: ...
@overload
def map_reduce(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: None = ...,
    reducefunc: None = ...,
) -> Dict[_U, List[_T]]: ...
@overload
def map_reduce(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: Callable[[_T], _V],
    reducefunc: None = ...,
) -> Dict[_U, List[_V]]: ...
@overload
def map_reduce(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: None = ...,
    reducefunc: Callable[[List[_T]], _W] = ...,
) -> Dict[_U, _W]: ...
@overload
def map_reduce(
    iterable: Iterable[_T],
    keyfunc: Callable[[_T], _U],
    valuefunc: Callable[[_T], _V],
    reducefunc: Callable[[List[_V]], _W],
) -> Dict[_U, _W]: ...
def rlocate(
    iterable: Iterable[_T],
    pred: Callable[..., object] = ...,
    window_size: Optional[int] = ...,
) -> Iterator[int]: ...
def replace(
    iterable: Iterable[_T],
    pred: Callable[..., object],
    substitutes: Iterable[_U],
    count: Optional[int] = ...,
    window_size: int = ...,
) -> Iterator[Union[_T, _U]]: ...
def partitions(iterable: Iterable[_T]) -> Iterator[List[List[_T]]]: ...
def set_partitions(
    iterable: Iterable[_T], k: Optional[int] = ...
) -> Iterator[List[List[_T]]]: ...

class time_limited(Generic[_T], Iterator[_T]):
    def __init__(
        self, limit_seconds: float, iterable: Iterable[_T]
    ) -> None: ...
    def __iter__(self) -> islice_extended[_T]: ...
    def __next__(self) -> _T: ...

@overload
def only(
    iterable: Iterable[_T], *, too_long: Optional[_Raisable] = ...
) -> Optional[_T]: ...
@overload
def only(
    iterable: Iterable[_T], default: _U, too_long: Optional[_Raisable] = ...
) -> Union[_T, _U]: ...
def ichunked(iterable: Iterable[_T], n: int) -> Iterator[Iterator[_T]]: ...
def distinct_combinations(
    iterable: Iterable[_T], r: int
) -> Iterator[Tuple[_T, ...]]: ...
def filter_except(
    validator: Callable[[Any], object],
    iterable: Iterable[_T],
    *exceptions: Type[BaseException]
) -> Iterator[_T]: ...
def map_except(
    function: Callable[[Any], _U],
    iterable: Iterable[_T],
    *exceptions: Type[BaseException]
) -> Iterator[_U]: ...
def sample(
    iterable: Iterable[_T],
    k: int,
    weights: Optional[Iterable[float]] = ...,
) -> List[_T]: ...
def is_sorted(
    iterable: Iterable[_T],
    key: Optional[Callable[[_T], _U]] = ...,
    reverse: bool = False,
) -> bool: ...

class AbortThread(BaseException):
    pass

class callback_iter(Generic[_T], Iterator[_T]):
    def __init__(
        self,
        func: Callable[..., Any],
        callback_kwd: str = ...,
        wait_seconds: float = ...,
    ) -> None: ...
    def __enter__(self) -> callback_iter[_T]: ...
    def __exit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_value: Optional[BaseException],
        traceback: Optional[TracebackType],
    ) -> Optional[bool]: ...
    def __iter__(self) -> callback_iter[_T]: ...
    def __next__(self) -> _T: ...
    def _reader(self) -> Iterator[_T]: ...
    @property
    def done(self) -> bool: ...
    @property
    def result(self) -> Any: ...

def windowed_complete(
    iterable: Iterable[_T], n: int
) -> Iterator[Tuple[_T, ...]]: ...
def all_unique(
    iterable: Iterable[_T], key: Optional[Callable[[_T], _U]] = ...
) -> bool: ...
def nth_product(index: int, *args: Iterable[_T]) -> Tuple[_T, ...]: ...
def nth_permutation(
    iterable: Iterable[_T], r: int, index: int
) -> Tuple[_T, ...]: ...
def value_chain(*args: Union[_T, Iterable[_T]]) -> Iterable[_T]: ...
def product_index(element: Iterable[_T], *args: Iterable[_T]) -> int: ...
def combination_index(
    element: Iterable[_T], iterable: Iterable[_T]
) -> int: ...
def permutation_index(
    element: Iterable[_T], iterable: Iterable[_T]
) -> int: ...

class countable(Generic[_T], Iterator[_T]):
    def __init__(self, iterable: Iterable[_T]) -> None: ...
    def __iter__(self) -> countable[_T]: ...
    def __next__(self) -> _T: ...
python3.12/site-packages/setuptools/_vendor/more_itertools/recipes.pyi000064400000006737151732704100022226 0ustar00"""Stubs for more_itertools.recipes"""
from typing import (
    Any,
    Callable,
    Iterable,
    Iterator,
    List,
    Optional,
    Tuple,
    TypeVar,
    Union,
)
from typing_extensions import overload, Type

# Type and type variable definitions
_T = TypeVar('_T')
_U = TypeVar('_U')

def take(n: int, iterable: Iterable[_T]) -> List[_T]: ...
def tabulate(
    function: Callable[[int], _T], start: int = ...
) -> Iterator[_T]: ...
def tail(n: int, iterable: Iterable[_T]) -> Iterator[_T]: ...
def consume(iterator: Iterable[object], n: Optional[int] = ...) -> None: ...
@overload
def nth(iterable: Iterable[_T], n: int) -> Optional[_T]: ...
@overload
def nth(iterable: Iterable[_T], n: int, default: _U) -> Union[_T, _U]: ...
def all_equal(iterable: Iterable[object]) -> bool: ...
def quantify(
    iterable: Iterable[_T], pred: Callable[[_T], bool] = ...
) -> int: ...
def pad_none(iterable: Iterable[_T]) -> Iterator[Optional[_T]]: ...
def padnone(iterable: Iterable[_T]) -> Iterator[Optional[_T]]: ...
def ncycles(iterable: Iterable[_T], n: int) -> Iterator[_T]: ...
def dotproduct(vec1: Iterable[object], vec2: Iterable[object]) -> object: ...
def flatten(listOfLists: Iterable[Iterable[_T]]) -> Iterator[_T]: ...
def repeatfunc(
    func: Callable[..., _U], times: Optional[int] = ..., *args: Any
) -> Iterator[_U]: ...
def pairwise(iterable: Iterable[_T]) -> Iterator[Tuple[_T, _T]]: ...
@overload
def grouper(
    iterable: Iterable[_T], n: int
) -> Iterator[Tuple[Optional[_T], ...]]: ...
@overload
def grouper(
    iterable: Iterable[_T], n: int, fillvalue: _U
) -> Iterator[Tuple[Union[_T, _U], ...]]: ...
@overload
def grouper(  # Deprecated interface
    iterable: int, n: Iterable[_T]
) -> Iterator[Tuple[Optional[_T], ...]]: ...
@overload
def grouper(  # Deprecated interface
    iterable: int, n: Iterable[_T], fillvalue: _U
) -> Iterator[Tuple[Union[_T, _U], ...]]: ...
def roundrobin(*iterables: Iterable[_T]) -> Iterator[_T]: ...
def partition(
    pred: Optional[Callable[[_T], object]], iterable: Iterable[_T]
) -> Tuple[Iterator[_T], Iterator[_T]]: ...
def powerset(iterable: Iterable[_T]) -> Iterator[Tuple[_T, ...]]: ...
def unique_everseen(
    iterable: Iterable[_T], key: Optional[Callable[[_T], _U]] = ...
) -> Iterator[_T]: ...
def unique_justseen(
    iterable: Iterable[_T], key: Optional[Callable[[_T], object]] = ...
) -> Iterator[_T]: ...
@overload
def iter_except(
    func: Callable[[], _T], exception: Type[BaseException], first: None = ...
) -> Iterator[_T]: ...
@overload
def iter_except(
    func: Callable[[], _T],
    exception: Type[BaseException],
    first: Callable[[], _U],
) -> Iterator[Union[_T, _U]]: ...
@overload
def first_true(
    iterable: Iterable[_T], *, pred: Optional[Callable[[_T], object]] = ...
) -> Optional[_T]: ...
@overload
def first_true(
    iterable: Iterable[_T],
    default: _U,
    pred: Optional[Callable[[_T], object]] = ...,
) -> Union[_T, _U]: ...
def random_product(
    *args: Iterable[_T], repeat: int = ...
) -> Tuple[_T, ...]: ...
def random_permutation(
    iterable: Iterable[_T], r: Optional[int] = ...
) -> Tuple[_T, ...]: ...
def random_combination(iterable: Iterable[_T], r: int) -> Tuple[_T, ...]: ...
def random_combination_with_replacement(
    iterable: Iterable[_T], r: int
) -> Tuple[_T, ...]: ...
def nth_combination(
    iterable: Iterable[_T], r: int, index: int
) -> Tuple[_T, ...]: ...
def prepend(value: _T, iterator: Iterable[_U]) -> Iterator[Union[_T, _U]]: ...
def convolve(signal: Iterable[_T], kernel: Iterable[_T]) -> Iterator[_T]: ...
python3.12/site-packages/setuptools/_vendor/more_itertools/__init__.py000064400000000122151732704100022140 0ustar00from .more import *  # noqa
from .recipes import *  # noqa

__version__ = '8.8.0'
python3.12/site-packages/setuptools/_vendor/more_itertools/py.typed000064400000000000151732704110021522 0ustar00python3.12/site-packages/setuptools/_vendor/more_itertools/more.py000064400000346307151732704110021366 0ustar00import warnings

from collections import Counter, defaultdict, deque, abc
from collections.abc import Sequence
from functools import partial, reduce, wraps
from heapq import merge, heapify, heapreplace, heappop
from itertools import (
    chain,
    compress,
    count,
    cycle,
    dropwhile,
    groupby,
    islice,
    repeat,
    starmap,
    takewhile,
    tee,
    zip_longest,
)
from math import exp, factorial, floor, log
from queue import Empty, Queue
from random import random, randrange, uniform
from operator import itemgetter, mul, sub, gt, lt
from sys import hexversion, maxsize
from time import monotonic

from .recipes import (
    consume,
    flatten,
    pairwise,
    powerset,
    take,
    unique_everseen,
)

__all__ = [
    'AbortThread',
    'adjacent',
    'always_iterable',
    'always_reversible',
    'bucket',
    'callback_iter',
    'chunked',
    'circular_shifts',
    'collapse',
    'collate',
    'consecutive_groups',
    'consumer',
    'countable',
    'count_cycle',
    'mark_ends',
    'difference',
    'distinct_combinations',
    'distinct_permutations',
    'distribute',
    'divide',
    'exactly_n',
    'filter_except',
    'first',
    'groupby_transform',
    'ilen',
    'interleave_longest',
    'interleave',
    'intersperse',
    'islice_extended',
    'iterate',
    'ichunked',
    'is_sorted',
    'last',
    'locate',
    'lstrip',
    'make_decorator',
    'map_except',
    'map_reduce',
    'nth_or_last',
    'nth_permutation',
    'nth_product',
    'numeric_range',
    'one',
    'only',
    'padded',
    'partitions',
    'set_partitions',
    'peekable',
    'repeat_last',
    'replace',
    'rlocate',
    'rstrip',
    'run_length',
    'sample',
    'seekable',
    'SequenceView',
    'side_effect',
    'sliced',
    'sort_together',
    'split_at',
    'split_after',
    'split_before',
    'split_when',
    'split_into',
    'spy',
    'stagger',
    'strip',
    'substrings',
    'substrings_indexes',
    'time_limited',
    'unique_to_each',
    'unzip',
    'windowed',
    'with_iter',
    'UnequalIterablesError',
    'zip_equal',
    'zip_offset',
    'windowed_complete',
    'all_unique',
    'value_chain',
    'product_index',
    'combination_index',
    'permutation_index',
]

_marker = object()


def chunked(iterable, n, strict=False):
    """Break *iterable* into lists of length *n*:

        >>> list(chunked([1, 2, 3, 4, 5, 6], 3))
        [[1, 2, 3], [4, 5, 6]]

    By the default, the last yielded list will have fewer than *n* elements
    if the length of *iterable* is not divisible by *n*:

        >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3))
        [[1, 2, 3], [4, 5, 6], [7, 8]]

    To use a fill-in value instead, see the :func:`grouper` recipe.

    If the length of *iterable* is not divisible by *n* and *strict* is
    ``True``, then ``ValueError`` will be raised before the last
    list is yielded.

    """
    iterator = iter(partial(take, n, iter(iterable)), [])
    if strict:

        def ret():
            for chunk in iterator:
                if len(chunk) != n:
                    raise ValueError('iterable is not divisible by n.')
                yield chunk

        return iter(ret())
    else:
        return iterator


def first(iterable, default=_marker):
    """Return the first item of *iterable*, or *default* if *iterable* is
    empty.

        >>> first([0, 1, 2, 3])
        0
        >>> first([], 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.

    :func:`first` is useful when you have a generator of expensive-to-retrieve
    values and want any arbitrary one. It is marginally shorter than
    ``next(iter(iterable), default)``.

    """
    try:
        return next(iter(iterable))
    except StopIteration as e:
        if default is _marker:
            raise ValueError(
                'first() was called on an empty iterable, and no '
                'default value was provided.'
            ) from e
        return default


def last(iterable, default=_marker):
    """Return the last item of *iterable*, or *default* if *iterable* is
    empty.

        >>> last([0, 1, 2, 3])
        3
        >>> last([], 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.
    """
    try:
        if isinstance(iterable, Sequence):
            return iterable[-1]
        # Work around https://bugs.python.org/issue38525
        elif hasattr(iterable, '__reversed__') and (hexversion != 0x030800F0):
            return next(reversed(iterable))
        else:
            return deque(iterable, maxlen=1)[-1]
    except (IndexError, TypeError, StopIteration):
        if default is _marker:
            raise ValueError(
                'last() was called on an empty iterable, and no default was '
                'provided.'
            )
        return default


def nth_or_last(iterable, n, default=_marker):
    """Return the nth or the last item of *iterable*,
    or *default* if *iterable* is empty.

        >>> nth_or_last([0, 1, 2, 3], 2)
        2
        >>> nth_or_last([0, 1], 2)
        1
        >>> nth_or_last([], 0, 'some default')
        'some default'

    If *default* is not provided and there are no items in the iterable,
    raise ``ValueError``.
    """
    return last(islice(iterable, n + 1), default=default)


class peekable:
    """Wrap an iterator to allow lookahead and prepending elements.

    Call :meth:`peek` on the result to get the value that will be returned
    by :func:`next`. This won't advance the iterator:

        >>> p = peekable(['a', 'b'])
        >>> p.peek()
        'a'
        >>> next(p)
        'a'

    Pass :meth:`peek` a default value to return that instead of raising
    ``StopIteration`` when the iterator is exhausted.

        >>> p = peekable([])
        >>> p.peek('hi')
        'hi'

    peekables also offer a :meth:`prepend` method, which "inserts" items
    at the head of the iterable:

        >>> p = peekable([1, 2, 3])
        >>> p.prepend(10, 11, 12)
        >>> next(p)
        10
        >>> p.peek()
        11
        >>> list(p)
        [11, 12, 1, 2, 3]

    peekables can be indexed. Index 0 is the item that will be returned by
    :func:`next`, index 1 is the item after that, and so on:
    The values up to the given index will be cached.

        >>> p = peekable(['a', 'b', 'c', 'd'])
        >>> p[0]
        'a'
        >>> p[1]
        'b'
        >>> next(p)
        'a'

    Negative indexes are supported, but be aware that they will cache the
    remaining items in the source iterator, which may require significant
    storage.

    To check whether a peekable is exhausted, check its truth value:

        >>> p = peekable(['a', 'b'])
        >>> if p:  # peekable has items
        ...     list(p)
        ['a', 'b']
        >>> if not p:  # peekable is exhausted
        ...     list(p)
        []

    """

    def __init__(self, iterable):
        self._it = iter(iterable)
        self._cache = deque()

    def __iter__(self):
        return self

    def __bool__(self):
        try:
            self.peek()
        except StopIteration:
            return False
        return True

    def peek(self, default=_marker):
        """Return the item that will be next returned from ``next()``.

        Return ``default`` if there are no items left. If ``default`` is not
        provided, raise ``StopIteration``.

        """
        if not self._cache:
            try:
                self._cache.append(next(self._it))
            except StopIteration:
                if default is _marker:
                    raise
                return default
        return self._cache[0]

    def prepend(self, *items):
        """Stack up items to be the next ones returned from ``next()`` or
        ``self.peek()``. The items will be returned in
        first in, first out order::

            >>> p = peekable([1, 2, 3])
            >>> p.prepend(10, 11, 12)
            >>> next(p)
            10
            >>> list(p)
            [11, 12, 1, 2, 3]

        It is possible, by prepending items, to "resurrect" a peekable that
        previously raised ``StopIteration``.

            >>> p = peekable([])
            >>> next(p)
            Traceback (most recent call last):
              ...
            StopIteration
            >>> p.prepend(1)
            >>> next(p)
            1
            >>> next(p)
            Traceback (most recent call last):
              ...
            StopIteration

        """
        self._cache.extendleft(reversed(items))

    def __next__(self):
        if self._cache:
            return self._cache.popleft()

        return next(self._it)

    def _get_slice(self, index):
        # Normalize the slice's arguments
        step = 1 if (index.step is None) else index.step
        if step > 0:
            start = 0 if (index.start is None) else index.start
            stop = maxsize if (index.stop is None) else index.stop
        elif step < 0:
            start = -1 if (index.start is None) else index.start
            stop = (-maxsize - 1) if (index.stop is None) else index.stop
        else:
            raise ValueError('slice step cannot be zero')

        # If either the start or stop index is negative, we'll need to cache
        # the rest of the iterable in order to slice from the right side.
        if (start < 0) or (stop < 0):
            self._cache.extend(self._it)
        # Otherwise we'll need to find the rightmost index and cache to that
        # point.
        else:
            n = min(max(start, stop) + 1, maxsize)
            cache_len = len(self._cache)
            if n >= cache_len:
                self._cache.extend(islice(self._it, n - cache_len))

        return list(self._cache)[index]

    def __getitem__(self, index):
        if isinstance(index, slice):
            return self._get_slice(index)

        cache_len = len(self._cache)
        if index < 0:
            self._cache.extend(self._it)
        elif index >= cache_len:
            self._cache.extend(islice(self._it, index + 1 - cache_len))

        return self._cache[index]


def collate(*iterables, **kwargs):
    """Return a sorted merge of the items from each of several already-sorted
    *iterables*.

        >>> list(collate('ACDZ', 'AZ', 'JKL'))
        ['A', 'A', 'C', 'D', 'J', 'K', 'L', 'Z', 'Z']

    Works lazily, keeping only the next value from each iterable in memory. Use
    :func:`collate` to, for example, perform a n-way mergesort of items that
    don't fit in memory.

    If a *key* function is specified, the iterables will be sorted according
    to its result:

        >>> key = lambda s: int(s)  # Sort by numeric value, not by string
        >>> list(collate(['1', '10'], ['2', '11'], key=key))
        ['1', '2', '10', '11']


    If the *iterables* are sorted in descending order, set *reverse* to
    ``True``:

        >>> list(collate([5, 3, 1], [4, 2, 0], reverse=True))
        [5, 4, 3, 2, 1, 0]

    If the elements of the passed-in iterables are out of order, you might get
    unexpected results.

    On Python 3.5+, this function is an alias for :func:`heapq.merge`.

    """
    warnings.warn(
        "collate is no longer part of more_itertools, use heapq.merge",
        DeprecationWarning,
    )
    return merge(*iterables, **kwargs)


def consumer(func):
    """Decorator that automatically advances a PEP-342-style "reverse iterator"
    to its first yield point so you don't have to call ``next()`` on it
    manually.

        >>> @consumer
        ... def tally():
        ...     i = 0
        ...     while True:
        ...         print('Thing number %s is %s.' % (i, (yield)))
        ...         i += 1
        ...
        >>> t = tally()
        >>> t.send('red')
        Thing number 0 is red.
        >>> t.send('fish')
        Thing number 1 is fish.

    Without the decorator, you would have to call ``next(t)`` before
    ``t.send()`` could be used.

    """

    @wraps(func)
    def wrapper(*args, **kwargs):
        gen = func(*args, **kwargs)
        next(gen)
        return gen

    return wrapper


def ilen(iterable):
    """Return the number of items in *iterable*.

        >>> ilen(x for x in range(1000000) if x % 3 == 0)
        333334

    This consumes the iterable, so handle with care.

    """
    # This approach was selected because benchmarks showed it's likely the
    # fastest of the known implementations at the time of writing.
    # See GitHub tracker: #236, #230.
    counter = count()
    deque(zip(iterable, counter), maxlen=0)
    return next(counter)


def iterate(func, start):
    """Return ``start``, ``func(start)``, ``func(func(start))``, ...

    >>> from itertools import islice
    >>> list(islice(iterate(lambda x: 2*x, 1), 10))
    [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]

    """
    while True:
        yield start
        start = func(start)


def with_iter(context_manager):
    """Wrap an iterable in a ``with`` statement, so it closes once exhausted.

    For example, this will close the file when the iterator is exhausted::

        upper_lines = (line.upper() for line in with_iter(open('foo')))

    Any context manager which returns an iterable is a candidate for
    ``with_iter``.

    """
    with context_manager as iterable:
        yield from iterable


def one(iterable, too_short=None, too_long=None):
    """Return the first item from *iterable*, which is expected to contain only
    that item. Raise an exception if *iterable* is empty or has more than one
    item.

    :func:`one` is useful for ensuring that an iterable contains only one item.
    For example, it can be used to retrieve the result of a database query
    that is expected to return a single row.

    If *iterable* is empty, ``ValueError`` will be raised. You may specify a
    different exception with the *too_short* keyword:

        >>> it = []
        >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: too many items in iterable (expected 1)'
        >>> too_short = IndexError('too few items')
        >>> one(it, too_short=too_short)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        IndexError: too few items

    Similarly, if *iterable* contains more than one item, ``ValueError`` will
    be raised. You may specify a different exception with the *too_long*
    keyword:

        >>> it = ['too', 'many']
        >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        ValueError: Expected exactly one item in iterable, but got 'too',
        'many', and perhaps more.
        >>> too_long = RuntimeError
        >>> one(it, too_long=too_long)  # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        RuntimeError

    Note that :func:`one` attempts to advance *iterable* twice to ensure there
    is only one item. See :func:`spy` or :func:`peekable` to check iterable
    contents less destructively.

    """
    it = iter(iterable)

    try:
        first_value = next(it)
    except StopIteration as e:
        raise (
            too_short or ValueError('too few items in iterable (expected 1)')
        ) from e

    try:
        second_value = next(it)
    except StopIteration:
        pass
    else:
        msg = (
            'Expected exactly one item in iterable, but got {!r}, {!r}, '
            'and perhaps more.'.format(first_value, second_value)
        )
        raise too_long or ValueError(msg)

    return first_value


def distinct_permutations(iterable, r=None):
    """Yield successive distinct permutations of the elements in *iterable*.

        >>> sorted(distinct_permutations([1, 0, 1]))
        [(0, 1, 1), (1, 0, 1), (1, 1, 0)]

    Equivalent to ``set(permutations(iterable))``, except duplicates are not
    generated and thrown away. For larger input sequences this is much more
    efficient.

    Duplicate permutations arise when there are duplicated elements in the
    input iterable. The number of items returned is
    `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of
    items input, and each `x_i` is the count of a distinct item in the input
    sequence.

    If *r* is given, only the *r*-length permutations are yielded.

        >>> sorted(distinct_permutations([1, 0, 1], r=2))
        [(0, 1), (1, 0), (1, 1)]
        >>> sorted(distinct_permutations(range(3), r=2))
        [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)]

    """
    # Algorithm: https://w.wiki/Qai
    def _full(A):
        while True:
            # Yield the permutation we have
            yield tuple(A)

            # Find the largest index i such that A[i] < A[i + 1]
            for i in range(size - 2, -1, -1):
                if A[i] < A[i + 1]:
                    break
            #  If no such index exists, this permutation is the last one
            else:
                return

            # Find the largest index j greater than j such that A[i] < A[j]
            for j in range(size - 1, i, -1):
                if A[i] < A[j]:
                    break

            # Swap the value of A[i] with that of A[j], then reverse the
            # sequence from A[i + 1] to form the new permutation
            A[i], A[j] = A[j], A[i]
            A[i + 1 :] = A[: i - size : -1]  # A[i + 1:][::-1]

    # Algorithm: modified from the above
    def _partial(A, r):
        # Split A into the first r items and the last r items
        head, tail = A[:r], A[r:]
        right_head_indexes = range(r - 1, -1, -1)
        left_tail_indexes = range(len(tail))

        while True:
            # Yield the permutation we have
            yield tuple(head)

            # Starting from the right, find the first index of the head with
            # value smaller than the maximum value of the tail - call it i.
            pivot = tail[-1]
            for i in right_head_indexes:
                if head[i] < pivot:
                    break
                pivot = head[i]
            else:
                return

            # Starting from the left, find the first value of the tail
            # with a value greater than head[i] and swap.
            for j in left_tail_indexes:
                if tail[j] > head[i]:
                    head[i], tail[j] = tail[j], head[i]
                    break
            # If we didn't find one, start from the right and find the first
            # index of the head with a value greater than head[i] and swap.
            else:
                for j in right_head_indexes:
                    if head[j] > head[i]:
                        head[i], head[j] = head[j], head[i]
                        break

            # Reverse head[i + 1:] and swap it with tail[:r - (i + 1)]
            tail += head[: i - r : -1]  # head[i + 1:][::-1]
            i += 1
            head[i:], tail[:] = tail[: r - i], tail[r - i :]

    items = sorted(iterable)

    size = len(items)
    if r is None:
        r = size

    if 0 < r <= size:
        return _full(items) if (r == size) else _partial(items, r)

    return iter(() if r else ((),))


def intersperse(e, iterable, n=1):
    """Intersperse filler element *e* among the items in *iterable*, leaving
    *n* items between each filler element.

        >>> list(intersperse('!', [1, 2, 3, 4, 5]))
        [1, '!', 2, '!', 3, '!', 4, '!', 5]

        >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2))
        [1, 2, None, 3, 4, None, 5]

    """
    if n == 0:
        raise ValueError('n must be > 0')
    elif n == 1:
        # interleave(repeat(e), iterable) -> e, x_0, e, e, x_1, e, x_2...
        # islice(..., 1, None) -> x_0, e, e, x_1, e, x_2...
        return islice(interleave(repeat(e), iterable), 1, None)
    else:
        # interleave(filler, chunks) -> [e], [x_0, x_1], [e], [x_2, x_3]...
        # islice(..., 1, None) -> [x_0, x_1], [e], [x_2, x_3]...
        # flatten(...) -> x_0, x_1, e, x_2, x_3...
        filler = repeat([e])
        chunks = chunked(iterable, n)
        return flatten(islice(interleave(filler, chunks), 1, None))


def unique_to_each(*iterables):
    """Return the elements from each of the input iterables that aren't in the
    other input iterables.

    For example, suppose you have a set of packages, each with a set of
    dependencies::

        {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}}

    If you remove one package, which dependencies can also be removed?

    If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not
    associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for
    ``pkg_2``, and ``D`` is only needed for ``pkg_3``::

        >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'})
        [['A'], ['C'], ['D']]

    If there are duplicates in one input iterable that aren't in the others
    they will be duplicated in the output. Input order is preserved::

        >>> unique_to_each("mississippi", "missouri")
        [['p', 'p'], ['o', 'u', 'r']]

    It is assumed that the elements of each iterable are hashable.

    """
    pool = [list(it) for it in iterables]
    counts = Counter(chain.from_iterable(map(set, pool)))
    uniques = {element for element in counts if counts[element] == 1}
    return [list(filter(uniques.__contains__, it)) for it in pool]


def windowed(seq, n, fillvalue=None, step=1):
    """Return a sliding window of width *n* over the given iterable.

        >>> all_windows = windowed([1, 2, 3, 4, 5], 3)
        >>> list(all_windows)
        [(1, 2, 3), (2, 3, 4), (3, 4, 5)]

    When the window is larger than the iterable, *fillvalue* is used in place
    of missing values:

        >>> list(windowed([1, 2, 3], 4))
        [(1, 2, 3, None)]

    Each window will advance in increments of *step*:

        >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2))
        [(1, 2, 3), (3, 4, 5), (5, 6, '!')]

    To slide into the iterable's items, use :func:`chain` to add filler items
    to the left:

        >>> iterable = [1, 2, 3, 4]
        >>> n = 3
        >>> padding = [None] * (n - 1)
        >>> list(windowed(chain(padding, iterable), 3))
        [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)]
    """
    if n < 0:
        raise ValueError('n must be >= 0')
    if n == 0:
        yield tuple()
        return
    if step < 1:
        raise ValueError('step must be >= 1')

    window = deque(maxlen=n)
    i = n
    for _ in map(window.append, seq):
        i -= 1
        if not i:
            i = step
            yield tuple(window)

    size = len(window)
    if size < n:
        yield tuple(chain(window, repeat(fillvalue, n - size)))
    elif 0 < i < min(step, n):
        window += (fillvalue,) * i
        yield tuple(window)


def substrings(iterable):
    """Yield all of the substrings of *iterable*.

        >>> [''.join(s) for s in substrings('more')]
        ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more']

    Note that non-string iterables can also be subdivided.

        >>> list(substrings([0, 1, 2]))
        [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)]

    """
    # The length-1 substrings
    seq = []
    for item in iter(iterable):
        seq.append(item)
        yield (item,)
    seq = tuple(seq)
    item_count = len(seq)

    # And the rest
    for n in range(2, item_count + 1):
        for i in range(item_count - n + 1):
            yield seq[i : i + n]


def substrings_indexes(seq, reverse=False):
    """Yield all substrings and their positions in *seq*

    The items yielded will be a tuple of the form ``(substr, i, j)``, where
    ``substr == seq[i:j]``.

    This function only works for iterables that support slicing, such as
    ``str`` objects.

    >>> for item in substrings_indexes('more'):
    ...    print(item)
    ('m', 0, 1)
    ('o', 1, 2)
    ('r', 2, 3)
    ('e', 3, 4)
    ('mo', 0, 2)
    ('or', 1, 3)
    ('re', 2, 4)
    ('mor', 0, 3)
    ('ore', 1, 4)
    ('more', 0, 4)

    Set *reverse* to ``True`` to yield the same items in the opposite order.


    """
    r = range(1, len(seq) + 1)
    if reverse:
        r = reversed(r)
    return (
        (seq[i : i + L], i, i + L) for L in r for i in range(len(seq) - L + 1)
    )


class bucket:
    """Wrap *iterable* and return an object that buckets it iterable into
    child iterables based on a *key* function.

        >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
        >>> s = bucket(iterable, key=lambda x: x[0])  # Bucket by 1st character
        >>> sorted(list(s))  # Get the keys
        ['a', 'b', 'c']
        >>> a_iterable = s['a']
        >>> next(a_iterable)
        'a1'
        >>> next(a_iterable)
        'a2'
        >>> list(s['b'])
        ['b1', 'b2', 'b3']

    The original iterable will be advanced and its items will be cached until
    they are used by the child iterables. This may require significant storage.

    By default, attempting to select a bucket to which no items belong  will
    exhaust the iterable and cache all values.
    If you specify a *validator* function, selected buckets will instead be
    checked against it.

        >>> from itertools import count
        >>> it = count(1, 2)  # Infinite sequence of odd numbers
        >>> key = lambda x: x % 10  # Bucket by last digit
        >>> validator = lambda x: x in {1, 3, 5, 7, 9}  # Odd digits only
        >>> s = bucket(it, key=key, validator=validator)
        >>> 2 in s
        False
        >>> list(s[2])
        []

    """

    def __init__(self, iterable, key, validator=None):
        self._it = iter(iterable)
        self._key = key
        self._cache = defaultdict(deque)
        self._validator = validator or (lambda x: True)

    def __contains__(self, value):
        if not self._validator(value):
            return False

        try:
            item = next(self[value])
        except StopIteration:
            return False
        else:
            self._cache[value].appendleft(item)

        return True

    def _get_values(self, value):
        """
        Helper to yield items from the parent iterator that match *value*.
        Items that don't match are stored in the local cache as they
        are encountered.
        """
        while True:
            # If we've cached some items that match the target value, emit
            # the first one and evict it from the cache.
            if self._cache[value]:
                yield self._cache[value].popleft()
            # Otherwise we need to advance the parent iterator to search for
            # a matching item, caching the rest.
            else:
                while True:
                    try:
                        item = next(self._it)
                    except StopIteration:
                        return
                    item_value = self._key(item)
                    if item_value == value:
                        yield item
                        break
                    elif self._validator(item_value):
                        self._cache[item_value].append(item)

    def __iter__(self):
        for item in self._it:
            item_value = self._key(item)
            if self._validator(item_value):
                self._cache[item_value].append(item)

        yield from self._cache.keys()

    def __getitem__(self, value):
        if not self._validator(value):
            return iter(())

        return self._get_values(value)


def spy(iterable, n=1):
    """Return a 2-tuple with a list containing the first *n* elements of
    *iterable*, and an iterator with the same items as *iterable*.
    This allows you to "look ahead" at the items in the iterable without
    advancing it.

    There is one item in the list by default:

        >>> iterable = 'abcdefg'
        >>> head, iterable = spy(iterable)
        >>> head
        ['a']
        >>> list(iterable)
        ['a', 'b', 'c', 'd', 'e', 'f', 'g']

    You may use unpacking to retrieve items instead of lists:

        >>> (head,), iterable = spy('abcdefg')
        >>> head
        'a'
        >>> (first, second), iterable = spy('abcdefg', 2)
        >>> first
        'a'
        >>> second
        'b'

    The number of items requested can be larger than the number of items in
    the iterable:

        >>> iterable = [1, 2, 3, 4, 5]
        >>> head, iterable = spy(iterable, 10)
        >>> head
        [1, 2, 3, 4, 5]
        >>> list(iterable)
        [1, 2, 3, 4, 5]

    """
    it = iter(iterable)
    head = take(n, it)

    return head.copy(), chain(head, it)


def interleave(*iterables):
    """Return a new iterable yielding from each iterable in turn,
    until the shortest is exhausted.

        >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8]))
        [1, 4, 6, 2, 5, 7]

    For a version that doesn't terminate after the shortest iterable is
    exhausted, see :func:`interleave_longest`.

    """
    return chain.from_iterable(zip(*iterables))


def interleave_longest(*iterables):
    """Return a new iterable yielding from each iterable in turn,
    skipping any that are exhausted.

        >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8]))
        [1, 4, 6, 2, 5, 7, 3, 8]

    This function produces the same output as :func:`roundrobin`, but may
    perform better for some inputs (in particular when the number of iterables
    is large).

    """
    i = chain.from_iterable(zip_longest(*iterables, fillvalue=_marker))
    return (x for x in i if x is not _marker)


def collapse(iterable, base_type=None, levels=None):
    """Flatten an iterable with multiple levels of nesting (e.g., a list of
    lists of tuples) into non-iterable types.

        >>> iterable = [(1, 2), ([3, 4], [[5], [6]])]
        >>> list(collapse(iterable))
        [1, 2, 3, 4, 5, 6]

    Binary and text strings are not considered iterable and
    will not be collapsed.

    To avoid collapsing other types, specify *base_type*:

        >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']]
        >>> list(collapse(iterable, base_type=tuple))
        ['ab', ('cd', 'ef'), 'gh', 'ij']

    Specify *levels* to stop flattening after a certain level:

    >>> iterable = [('a', ['b']), ('c', ['d'])]
    >>> list(collapse(iterable))  # Fully flattened
    ['a', 'b', 'c', 'd']
    >>> list(collapse(iterable, levels=1))  # Only one level flattened
    ['a', ['b'], 'c', ['d']]

    """

    def walk(node, level):
        if (
            ((levels is not None) and (level > levels))
            or isinstance(node, (str, bytes))
            or ((base_type is not None) and isinstance(node, base_type))
        ):
            yield node
            return

        try:
            tree = iter(node)
        except TypeError:
            yield node
            return
        else:
            for child in tree:
                yield from walk(child, level + 1)

    yield from walk(iterable, 0)


def side_effect(func, iterable, chunk_size=None, before=None, after=None):
    """Invoke *func* on each item in *iterable* (or on each *chunk_size* group
    of items) before yielding the item.

    `func` must be a function that takes a single argument. Its return value
    will be discarded.

    *before* and *after* are optional functions that take no arguments. They
    will be executed before iteration starts and after it ends, respectively.

    `side_effect` can be used for logging, updating progress bars, or anything
    that is not functionally "pure."

    Emitting a status message:

        >>> from more_itertools import consume
        >>> func = lambda item: print('Received {}'.format(item))
        >>> consume(side_effect(func, range(2)))
        Received 0
        Received 1

    Operating on chunks of items:

        >>> pair_sums = []
        >>> func = lambda chunk: pair_sums.append(sum(chunk))
        >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2))
        [0, 1, 2, 3, 4, 5]
        >>> list(pair_sums)
        [1, 5, 9]

    Writing to a file-like object:

        >>> from io import StringIO
        >>> from more_itertools import consume
        >>> f = StringIO()
        >>> func = lambda x: print(x, file=f)
        >>> before = lambda: print(u'HEADER', file=f)
        >>> after = f.close
        >>> it = [u'a', u'b', u'c']
        >>> consume(side_effect(func, it, before=before, after=after))
        >>> f.closed
        True

    """
    try:
        if before is not None:
            before()

        if chunk_size is None:
            for item in iterable:
                func(item)
                yield item
        else:
            for chunk in chunked(iterable, chunk_size):
                func(chunk)
                yield from chunk
    finally:
        if after is not None:
            after()


def sliced(seq, n, strict=False):
    """Yield slices of length *n* from the sequence *seq*.

    >>> list(sliced((1, 2, 3, 4, 5, 6), 3))
    [(1, 2, 3), (4, 5, 6)]

    By the default, the last yielded slice will have fewer than *n* elements
    if the length of *seq* is not divisible by *n*:

    >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3))
    [(1, 2, 3), (4, 5, 6), (7, 8)]

    If the length of *seq* is not divisible by *n* and *strict* is
    ``True``, then ``ValueError`` will be raised before the last
    slice is yielded.

    This function will only work for iterables that support slicing.
    For non-sliceable iterables, see :func:`chunked`.

    """
    iterator = takewhile(len, (seq[i : i + n] for i in count(0, n)))
    if strict:

        def ret():
            for _slice in iterator:
                if len(_slice) != n:
                    raise ValueError("seq is not divisible by n.")
                yield _slice

        return iter(ret())
    else:
        return iterator


def split_at(iterable, pred, maxsplit=-1, keep_separator=False):
    """Yield lists of items from *iterable*, where each list is delimited by
    an item where callable *pred* returns ``True``.

        >>> list(split_at('abcdcba', lambda x: x == 'b'))
        [['a'], ['c', 'd', 'c'], ['a']]

        >>> list(split_at(range(10), lambda n: n % 2 == 1))
        [[0], [2], [4], [6], [8], []]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2))
        [[0], [2], [4, 5, 6, 7, 8, 9]]

    By default, the delimiting items are not included in the output.
    The include them, set *keep_separator* to ``True``.

        >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True))
        [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']]

    """
    if maxsplit == 0:
        yield list(iterable)
        return

    buf = []
    it = iter(iterable)
    for item in it:
        if pred(item):
            yield buf
            if keep_separator:
                yield [item]
            if maxsplit == 1:
                yield list(it)
                return
            buf = []
            maxsplit -= 1
        else:
            buf.append(item)
    yield buf


def split_before(iterable, pred, maxsplit=-1):
    """Yield lists of items from *iterable*, where each list ends just before
    an item for which callable *pred* returns ``True``:

        >>> list(split_before('OneTwo', lambda s: s.isupper()))
        [['O', 'n', 'e'], ['T', 'w', 'o']]

        >>> list(split_before(range(10), lambda n: n % 3 == 0))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]]
    """
    if maxsplit == 0:
        yield list(iterable)
        return

    buf = []
    it = iter(iterable)
    for item in it:
        if pred(item) and buf:
            yield buf
            if maxsplit == 1:
                yield [item] + list(it)
                return
            buf = []
            maxsplit -= 1
        buf.append(item)
    if buf:
        yield buf


def split_after(iterable, pred, maxsplit=-1):
    """Yield lists of items from *iterable*, where each list ends with an
    item where callable *pred* returns ``True``:

        >>> list(split_after('one1two2', lambda s: s.isdigit()))
        [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']]

        >>> list(split_after(range(10), lambda n: n % 3 == 0))
        [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2))
        [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]]

    """
    if maxsplit == 0:
        yield list(iterable)
        return

    buf = []
    it = iter(iterable)
    for item in it:
        buf.append(item)
        if pred(item) and buf:
            yield buf
            if maxsplit == 1:
                yield list(it)
                return
            buf = []
            maxsplit -= 1
    if buf:
        yield buf


def split_when(iterable, pred, maxsplit=-1):
    """Split *iterable* into pieces based on the output of *pred*.
    *pred* should be a function that takes successive pairs of items and
    returns ``True`` if the iterable should be split in between them.

    For example, to find runs of increasing numbers, split the iterable when
    element ``i`` is larger than element ``i + 1``:

        >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y))
        [[1, 2, 3, 3], [2, 5], [2, 4], [2]]

    At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
    then there is no limit on the number of splits:

        >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2],
        ...                 lambda x, y: x > y, maxsplit=2))
        [[1, 2, 3, 3], [2, 5], [2, 4, 2]]

    """
    if maxsplit == 0:
        yield list(iterable)
        return

    it = iter(iterable)
    try:
        cur_item = next(it)
    except StopIteration:
        return

    buf = [cur_item]
    for next_item in it:
        if pred(cur_item, next_item):
            yield buf
            if maxsplit == 1:
                yield [next_item] + list(it)
                return
            buf = []
            maxsplit -= 1

        buf.append(next_item)
        cur_item = next_item

    yield buf


def split_into(iterable, sizes):
    """Yield a list of sequential items from *iterable* of length 'n' for each
    integer 'n' in *sizes*.

        >>> list(split_into([1,2,3,4,5,6], [1,2,3]))
        [[1], [2, 3], [4, 5, 6]]

    If the sum of *sizes* is smaller than the length of *iterable*, then the
    remaining items of *iterable* will not be returned.

        >>> list(split_into([1,2,3,4,5,6], [2,3]))
        [[1, 2], [3, 4, 5]]

    If the sum of *sizes* is larger than the length of *iterable*, fewer items
    will be returned in the iteration that overruns *iterable* and further
    lists will be empty:

        >>> list(split_into([1,2,3,4], [1,2,3,4]))
        [[1], [2, 3], [4], []]

    When a ``None`` object is encountered in *sizes*, the returned list will
    contain items up to the end of *iterable* the same way that itertools.slice
    does:

        >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None]))
        [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]]

    :func:`split_into` can be useful for grouping a series of items where the
    sizes of the groups are not uniform. An example would be where in a row
    from a table, multiple columns represent elements of the same feature
    (e.g. a point represented by x,y,z) but, the format is not the same for
    all columns.
    """
    # convert the iterable argument into an iterator so its contents can
    # be consumed by islice in case it is a generator
    it = iter(iterable)

    for size in sizes:
        if size is None:
            yield list(it)
            return
        else:
            yield list(islice(it, size))


def padded(iterable, fillvalue=None, n=None, next_multiple=False):
    """Yield the elements from *iterable*, followed by *fillvalue*, such that
    at least *n* items are emitted.

        >>> list(padded([1, 2, 3], '?', 5))
        [1, 2, 3, '?', '?']

    If *next_multiple* is ``True``, *fillvalue* will be emitted until the
    number of items emitted is a multiple of *n*::

        >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True))
        [1, 2, 3, 4, None, None]

    If *n* is ``None``, *fillvalue* will be emitted indefinitely.

    """
    it = iter(iterable)
    if n is None:
        yield from chain(it, repeat(fillvalue))
    elif n < 1:
        raise ValueError('n must be at least 1')
    else:
        item_count = 0
        for item in it:
            yield item
            item_count += 1

        remaining = (n - item_count) % n if next_multiple else n - item_count
        for _ in range(remaining):
            yield fillvalue


def repeat_last(iterable, default=None):
    """After the *iterable* is exhausted, keep yielding its last element.

        >>> list(islice(repeat_last(range(3)), 5))
        [0, 1, 2, 2, 2]

    If the iterable is empty, yield *default* forever::

        >>> list(islice(repeat_last(range(0), 42), 5))
        [42, 42, 42, 42, 42]

    """
    item = _marker
    for item in iterable:
        yield item
    final = default if item is _marker else item
    yield from repeat(final)


def distribute(n, iterable):
    """Distribute the items from *iterable* among *n* smaller iterables.

        >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6])
        >>> list(group_1)
        [1, 3, 5]
        >>> list(group_2)
        [2, 4, 6]

    If the length of *iterable* is not evenly divisible by *n*, then the
    length of the returned iterables will not be identical:

        >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7])
        >>> [list(c) for c in children]
        [[1, 4, 7], [2, 5], [3, 6]]

    If the length of *iterable* is smaller than *n*, then the last returned
    iterables will be empty:

        >>> children = distribute(5, [1, 2, 3])
        >>> [list(c) for c in children]
        [[1], [2], [3], [], []]

    This function uses :func:`itertools.tee` and may require significant
    storage. If you need the order items in the smaller iterables to match the
    original iterable, see :func:`divide`.

    """
    if n < 1:
        raise ValueError('n must be at least 1')

    children = tee(iterable, n)
    return [islice(it, index, None, n) for index, it in enumerate(children)]


def stagger(iterable, offsets=(-1, 0, 1), longest=False, fillvalue=None):
    """Yield tuples whose elements are offset from *iterable*.
    The amount by which the `i`-th item in each tuple is offset is given by
    the `i`-th item in *offsets*.

        >>> list(stagger([0, 1, 2, 3]))
        [(None, 0, 1), (0, 1, 2), (1, 2, 3)]
        >>> list(stagger(range(8), offsets=(0, 2, 4)))
        [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)]

    By default, the sequence will end when the final element of a tuple is the
    last item in the iterable. To continue until the first element of a tuple
    is the last item in the iterable, set *longest* to ``True``::

        >>> list(stagger([0, 1, 2, 3], longest=True))
        [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)]

    By default, ``None`` will be used to replace offsets beyond the end of the
    sequence. Specify *fillvalue* to use some other value.

    """
    children = tee(iterable, len(offsets))

    return zip_offset(
        *children, offsets=offsets, longest=longest, fillvalue=fillvalue
    )


class UnequalIterablesError(ValueError):
    def __init__(self, details=None):
        msg = 'Iterables have different lengths'
        if details is not None:
            msg += (': index 0 has length {}; index {} has length {}').format(
                *details
            )

        super().__init__(msg)


def _zip_equal_generator(iterables):
    for combo in zip_longest(*iterables, fillvalue=_marker):
        for val in combo:
            if val is _marker:
                raise UnequalIterablesError()
        yield combo


def zip_equal(*iterables):
    """``zip`` the input *iterables* together, but raise
    ``UnequalIterablesError`` if they aren't all the same length.

        >>> it_1 = range(3)
        >>> it_2 = iter('abc')
        >>> list(zip_equal(it_1, it_2))
        [(0, 'a'), (1, 'b'), (2, 'c')]

        >>> it_1 = range(3)
        >>> it_2 = iter('abcd')
        >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ...
        more_itertools.more.UnequalIterablesError: Iterables have different
        lengths

    """
    if hexversion >= 0x30A00A6:
        warnings.warn(
            (
                'zip_equal will be removed in a future version of '
                'more-itertools. Use the builtin zip function with '
                'strict=True instead.'
            ),
            DeprecationWarning,
        )
    # Check whether the iterables are all the same size.
    try:
        first_size = len(iterables[0])
        for i, it in enumerate(iterables[1:], 1):
            size = len(it)
            if size != first_size:
                break
        else:
            # If we didn't break out, we can use the built-in zip.
            return zip(*iterables)

        # If we did break out, there was a mismatch.
        raise UnequalIterablesError(details=(first_size, i, size))
    # If any one of the iterables didn't have a length, start reading
    # them until one runs out.
    except TypeError:
        return _zip_equal_generator(iterables)


def zip_offset(*iterables, offsets, longest=False, fillvalue=None):
    """``zip`` the input *iterables* together, but offset the `i`-th iterable
    by the `i`-th item in *offsets*.

        >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1)))
        [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')]

    This can be used as a lightweight alternative to SciPy or pandas to analyze
    data sets in which some series have a lead or lag relationship.

    By default, the sequence will end when the shortest iterable is exhausted.
    To continue until the longest iterable is exhausted, set *longest* to
    ``True``.

        >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True))
        [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')]

    By default, ``None`` will be used to replace offsets beyond the end of the
    sequence. Specify *fillvalue* to use some other value.

    """
    if len(iterables) != len(offsets):
        raise ValueError("Number of iterables and offsets didn't match")

    staggered = []
    for it, n in zip(iterables, offsets):
        if n < 0:
            staggered.append(chain(repeat(fillvalue, -n), it))
        elif n > 0:
            staggered.append(islice(it, n, None))
        else:
            staggered.append(it)

    if longest:
        return zip_longest(*staggered, fillvalue=fillvalue)

    return zip(*staggered)


def sort_together(iterables, key_list=(0,), key=None, reverse=False):
    """Return the input iterables sorted together, with *key_list* as the
    priority for sorting. All iterables are trimmed to the length of the
    shortest one.

    This can be used like the sorting function in a spreadsheet. If each
    iterable represents a column of data, the key list determines which
    columns are used for sorting.

    By default, all iterables are sorted using the ``0``-th iterable::

        >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')]
        >>> sort_together(iterables)
        [(1, 2, 3, 4), ('d', 'c', 'b', 'a')]

    Set a different key list to sort according to another iterable.
    Specifying multiple keys dictates how ties are broken::

        >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')]
        >>> sort_together(iterables, key_list=(1, 2))
        [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')]

    To sort by a function of the elements of the iterable, pass a *key*
    function. Its arguments are the elements of the iterables corresponding to
    the key list::

        >>> names = ('a', 'b', 'c')
        >>> lengths = (1, 2, 3)
        >>> widths = (5, 2, 1)
        >>> def area(length, width):
        ...     return length * width
        >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area)
        [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)]

    Set *reverse* to ``True`` to sort in descending order.

        >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True)
        [(3, 2, 1), ('a', 'b', 'c')]

    """
    if key is None:
        # if there is no key function, the key argument to sorted is an
        # itemgetter
        key_argument = itemgetter(*key_list)
    else:
        # if there is a key function, call it with the items at the offsets
        # specified by the key function as arguments
        key_list = list(key_list)
        if len(key_list) == 1:
            # if key_list contains a single item, pass the item at that offset
            # as the only argument to the key function
            key_offset = key_list[0]
            key_argument = lambda zipped_items: key(zipped_items[key_offset])
        else:
            # if key_list contains multiple items, use itemgetter to return a
            # tuple of items, which we pass as *args to the key function
            get_key_items = itemgetter(*key_list)
            key_argument = lambda zipped_items: key(
                *get_key_items(zipped_items)
            )

    return list(
        zip(*sorted(zip(*iterables), key=key_argument, reverse=reverse))
    )


def unzip(iterable):
    """The inverse of :func:`zip`, this function disaggregates the elements
    of the zipped *iterable*.

    The ``i``-th iterable contains the ``i``-th element from each element
    of the zipped iterable. The first element is used to to determine the
    length of the remaining elements.

        >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
        >>> letters, numbers = unzip(iterable)
        >>> list(letters)
        ['a', 'b', 'c', 'd']
        >>> list(numbers)
        [1, 2, 3, 4]

    This is similar to using ``zip(*iterable)``, but it avoids reading
    *iterable* into memory. Note, however, that this function uses
    :func:`itertools.tee` and thus may require significant storage.

    """
    head, iterable = spy(iter(iterable))
    if not head:
        # empty iterable, e.g. zip([], [], [])
        return ()
    # spy returns a one-length iterable as head
    head = head[0]
    iterables = tee(iterable, len(head))

    def itemgetter(i):
        def getter(obj):
            try:
                return obj[i]
            except IndexError:
                # basically if we have an iterable like
                # iter([(1, 2, 3), (4, 5), (6,)])
                # the second unzipped iterable would fail at the third tuple
                # since it would try to access tup[1]
                # same with the third unzipped iterable and the second tuple
                # to support these "improperly zipped" iterables,
                # we create a custom itemgetter
                # which just stops the unzipped iterables
                # at first length mismatch
                raise StopIteration

        return getter

    return tuple(map(itemgetter(i), it) for i, it in enumerate(iterables))


def divide(n, iterable):
    """Divide the elements from *iterable* into *n* parts, maintaining
    order.

        >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6])
        >>> list(group_1)
        [1, 2, 3]
        >>> list(group_2)
        [4, 5, 6]

    If the length of *iterable* is not evenly divisible by *n*, then the
    length of the returned iterables will not be identical:

        >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7])
        >>> [list(c) for c in children]
        [[1, 2, 3], [4, 5], [6, 7]]

    If the length of the iterable is smaller than n, then the last returned
    iterables will be empty:

        >>> children = divide(5, [1, 2, 3])
        >>> [list(c) for c in children]
        [[1], [2], [3], [], []]

    This function will exhaust the iterable before returning and may require
    significant storage. If order is not important, see :func:`distribute`,
    which does not first pull the iterable into memory.

    """
    if n < 1:
        raise ValueError('n must be at least 1')

    try:
        iterable[:0]
    except TypeError:
        seq = tuple(iterable)
    else:
        seq = iterable

    q, r = divmod(len(seq), n)

    ret = []
    stop = 0
    for i in range(1, n + 1):
        start = stop
        stop += q + 1 if i <= r else q
        ret.append(iter(seq[start:stop]))

    return ret


def always_iterable(obj, base_type=(str, bytes)):
    """If *obj* is iterable, return an iterator over its items::

        >>> obj = (1, 2, 3)
        >>> list(always_iterable(obj))
        [1, 2, 3]

    If *obj* is not iterable, return a one-item iterable containing *obj*::

        >>> obj = 1
        >>> list(always_iterable(obj))
        [1]

    If *obj* is ``None``, return an empty iterable:

        >>> obj = None
        >>> list(always_iterable(None))
        []

    By default, binary and text strings are not considered iterable::

        >>> obj = 'foo'
        >>> list(always_iterable(obj))
        ['foo']

    If *base_type* is set, objects for which ``isinstance(obj, base_type)``
    returns ``True`` won't be considered iterable.

        >>> obj = {'a': 1}
        >>> list(always_iterable(obj))  # Iterate over the dict's keys
        ['a']
        >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
        [{'a': 1}]

    Set *base_type* to ``None`` to avoid any special handling and treat objects
    Python considers iterable as iterable:

        >>> obj = 'foo'
        >>> list(always_iterable(obj, base_type=None))
        ['f', 'o', 'o']
    """
    if obj is None:
        return iter(())

    if (base_type is not None) and isinstance(obj, base_type):
        return iter((obj,))

    try:
        return iter(obj)
    except TypeError:
        return iter((obj,))


def adjacent(predicate, iterable, distance=1):
    """Return an iterable over `(bool, item)` tuples where the `item` is
    drawn from *iterable* and the `bool` indicates whether
    that item satisfies the *predicate* or is adjacent to an item that does.

    For example, to find whether items are adjacent to a ``3``::

        >>> list(adjacent(lambda x: x == 3, range(6)))
        [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)]

    Set *distance* to change what counts as adjacent. For example, to find
    whether items are two places away from a ``3``:

        >>> list(adjacent(lambda x: x == 3, range(6), distance=2))
        [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)]

    This is useful for contextualizing the results of a search function.
    For example, a code comparison tool might want to identify lines that
    have changed, but also surrounding lines to give the viewer of the diff
    context.

    The predicate function will only be called once for each item in the
    iterable.

    See also :func:`groupby_transform`, which can be used with this function
    to group ranges of items with the same `bool` value.

    """
    # Allow distance=0 mainly for testing that it reproduces results with map()
    if distance < 0:
        raise ValueError('distance must be at least 0')

    i1, i2 = tee(iterable)
    padding = [False] * distance
    selected = chain(padding, map(predicate, i1), padding)
    adjacent_to_selected = map(any, windowed(selected, 2 * distance + 1))
    return zip(adjacent_to_selected, i2)


def groupby_transform(iterable, keyfunc=None, valuefunc=None, reducefunc=None):
    """An extension of :func:`itertools.groupby` that can apply transformations
    to the grouped data.

    * *keyfunc* is a function computing a key value for each item in *iterable*
    * *valuefunc* is a function that transforms the individual items from
      *iterable* after grouping
    * *reducefunc* is a function that transforms each group of items

    >>> iterable = 'aAAbBBcCC'
    >>> keyfunc = lambda k: k.upper()
    >>> valuefunc = lambda v: v.lower()
    >>> reducefunc = lambda g: ''.join(g)
    >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc))
    [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')]

    Each optional argument defaults to an identity function if not specified.

    :func:`groupby_transform` is useful when grouping elements of an iterable
    using a separate iterable as the key. To do this, :func:`zip` the iterables
    and pass a *keyfunc* that extracts the first element and a *valuefunc*
    that extracts the second element::

        >>> from operator import itemgetter
        >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3]
        >>> values = 'abcdefghi'
        >>> iterable = zip(keys, values)
        >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1))
        >>> [(k, ''.join(g)) for k, g in grouper]
        [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')]

    Note that the order of items in the iterable is significant.
    Only adjacent items are grouped together, so if you don't want any
    duplicate groups, you should sort the iterable by the key function.

    """
    ret = groupby(iterable, keyfunc)
    if valuefunc:
        ret = ((k, map(valuefunc, g)) for k, g in ret)
    if reducefunc:
        ret = ((k, reducefunc(g)) for k, g in ret)

    return ret


class numeric_range(abc.Sequence, abc.Hashable):
    """An extension of the built-in ``range()`` function whose arguments can
    be any orderable numeric type.

    With only *stop* specified, *start* defaults to ``0`` and *step*
    defaults to ``1``. The output items will match the type of *stop*:

        >>> list(numeric_range(3.5))
        [0.0, 1.0, 2.0, 3.0]

    With only *start* and *stop* specified, *step* defaults to ``1``. The
    output items will match the type of *start*:

        >>> from decimal import Decimal
        >>> start = Decimal('2.1')
        >>> stop = Decimal('5.1')
        >>> list(numeric_range(start, stop))
        [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')]

    With *start*, *stop*, and *step*  specified the output items will match
    the type of ``start + step``:

        >>> from fractions import Fraction
        >>> start = Fraction(1, 2)  # Start at 1/2
        >>> stop = Fraction(5, 2)  # End at 5/2
        >>> step = Fraction(1, 2)  # Count by 1/2
        >>> list(numeric_range(start, stop, step))
        [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)]

    If *step* is zero, ``ValueError`` is raised. Negative steps are supported:

        >>> list(numeric_range(3, -1, -1.0))
        [3.0, 2.0, 1.0, 0.0]

    Be aware of the limitations of floating point numbers; the representation
    of the yielded numbers may be surprising.

    ``datetime.datetime`` objects can be used for *start* and *stop*, if *step*
    is a ``datetime.timedelta`` object:

        >>> import datetime
        >>> start = datetime.datetime(2019, 1, 1)
        >>> stop = datetime.datetime(2019, 1, 3)
        >>> step = datetime.timedelta(days=1)
        >>> items = iter(numeric_range(start, stop, step))
        >>> next(items)
        datetime.datetime(2019, 1, 1, 0, 0)
        >>> next(items)
        datetime.datetime(2019, 1, 2, 0, 0)

    """

    _EMPTY_HASH = hash(range(0, 0))

    def __init__(self, *args):
        argc = len(args)
        if argc == 1:
            (self._stop,) = args
            self._start = type(self._stop)(0)
            self._step = type(self._stop - self._start)(1)
        elif argc == 2:
            self._start, self._stop = args
            self._step = type(self._stop - self._start)(1)
        elif argc == 3:
            self._start, self._stop, self._step = args
        elif argc == 0:
            raise TypeError(
                'numeric_range expected at least '
                '1 argument, got {}'.format(argc)
            )
        else:
            raise TypeError(
                'numeric_range expected at most '
                '3 arguments, got {}'.format(argc)
            )

        self._zero = type(self._step)(0)
        if self._step == self._zero:
            raise ValueError('numeric_range() arg 3 must not be zero')
        self._growing = self._step > self._zero
        self._init_len()

    def __bool__(self):
        if self._growing:
            return self._start < self._stop
        else:
            return self._start > self._stop

    def __contains__(self, elem):
        if self._growing:
            if self._start <= elem < self._stop:
                return (elem - self._start) % self._step == self._zero
        else:
            if self._start >= elem > self._stop:
                return (self._start - elem) % (-self._step) == self._zero

        return False

    def __eq__(self, other):
        if isinstance(other, numeric_range):
            empty_self = not bool(self)
            empty_other = not bool(other)
            if empty_self or empty_other:
                return empty_self and empty_other  # True if both empty
            else:
                return (
                    self._start == other._start
                    and self._step == other._step
                    and self._get_by_index(-1) == other._get_by_index(-1)
                )
        else:
            return False

    def __getitem__(self, key):
        if isinstance(key, int):
            return self._get_by_index(key)
        elif isinstance(key, slice):
            step = self._step if key.step is None else key.step * self._step

            if key.start is None or key.start <= -self._len:
                start = self._start
            elif key.start >= self._len:
                start = self._stop
            else:  # -self._len < key.start < self._len
                start = self._get_by_index(key.start)

            if key.stop is None or key.stop >= self._len:
                stop = self._stop
            elif key.stop <= -self._len:
                stop = self._start
            else:  # -self._len < key.stop < self._len
                stop = self._get_by_index(key.stop)

            return numeric_range(start, stop, step)
        else:
            raise TypeError(
                'numeric range indices must be '
                'integers or slices, not {}'.format(type(key).__name__)
            )

    def __hash__(self):
        if self:
            return hash((self._start, self._get_by_index(-1), self._step))
        else:
            return self._EMPTY_HASH

    def __iter__(self):
        values = (self._start + (n * self._step) for n in count())
        if self._growing:
            return takewhile(partial(gt, self._stop), values)
        else:
            return takewhile(partial(lt, self._stop), values)

    def __len__(self):
        return self._len

    def _init_len(self):
        if self._growing:
            start = self._start
            stop = self._stop
            step = self._step
        else:
            start = self._stop
            stop = self._start
            step = -self._step
        distance = stop - start
        if distance <= self._zero:
            self._len = 0
        else:  # distance > 0 and step > 0: regular euclidean division
            q, r = divmod(distance, step)
            self._len = int(q) + int(r != self._zero)

    def __reduce__(self):
        return numeric_range, (self._start, self._stop, self._step)

    def __repr__(self):
        if self._step == 1:
            return "numeric_range({}, {})".format(
                repr(self._start), repr(self._stop)
            )
        else:
            return "numeric_range({}, {}, {})".format(
                repr(self._start), repr(self._stop), repr(self._step)
            )

    def __reversed__(self):
        return iter(
            numeric_range(
                self._get_by_index(-1), self._start - self._step, -self._step
            )
        )

    def count(self, value):
        return int(value in self)

    def index(self, value):
        if self._growing:
            if self._start <= value < self._stop:
                q, r = divmod(value - self._start, self._step)
                if r == self._zero:
                    return int(q)
        else:
            if self._start >= value > self._stop:
                q, r = divmod(self._start - value, -self._step)
                if r == self._zero:
                    return int(q)

        raise ValueError("{} is not in numeric range".format(value))

    def _get_by_index(self, i):
        if i < 0:
            i += self._len
        if i < 0 or i >= self._len:
            raise IndexError("numeric range object index out of range")
        return self._start + i * self._step


def count_cycle(iterable, n=None):
    """Cycle through the items from *iterable* up to *n* times, yielding
    the number of completed cycles along with each item. If *n* is omitted the
    process repeats indefinitely.

    >>> list(count_cycle('AB', 3))
    [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')]

    """
    iterable = tuple(iterable)
    if not iterable:
        return iter(())
    counter = count() if n is None else range(n)
    return ((i, item) for i in counter for item in iterable)


def mark_ends(iterable):
    """Yield 3-tuples of the form ``(is_first, is_last, item)``.

    >>> list(mark_ends('ABC'))
    [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')]

    Use this when looping over an iterable to take special action on its first
    and/or last items:

    >>> iterable = ['Header', 100, 200, 'Footer']
    >>> total = 0
    >>> for is_first, is_last, item in mark_ends(iterable):
    ...     if is_first:
    ...         continue  # Skip the header
    ...     if is_last:
    ...         continue  # Skip the footer
    ...     total += item
    >>> print(total)
    300
    """
    it = iter(iterable)

    try:
        b = next(it)
    except StopIteration:
        return

    try:
        for i in count():
            a = b
            b = next(it)
            yield i == 0, False, a

    except StopIteration:
        yield i == 0, True, a


def locate(iterable, pred=bool, window_size=None):
    """Yield the index of each item in *iterable* for which *pred* returns
    ``True``.

    *pred* defaults to :func:`bool`, which will select truthy items:

        >>> list(locate([0, 1, 1, 0, 1, 0, 0]))
        [1, 2, 4]

    Set *pred* to a custom function to, e.g., find the indexes for a particular
    item.

        >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b'))
        [1, 3]

    If *window_size* is given, then the *pred* function will be called with
    that many items. This enables searching for sub-sequences:

        >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
        >>> pred = lambda *args: args == (1, 2, 3)
        >>> list(locate(iterable, pred=pred, window_size=3))
        [1, 5, 9]

    Use with :func:`seekable` to find indexes and then retrieve the associated
    items:

        >>> from itertools import count
        >>> from more_itertools import seekable
        >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count())
        >>> it = seekable(source)
        >>> pred = lambda x: x > 100
        >>> indexes = locate(it, pred=pred)
        >>> i = next(indexes)
        >>> it.seek(i)
        >>> next(it)
        106

    """
    if window_size is None:
        return compress(count(), map(pred, iterable))

    if window_size < 1:
        raise ValueError('window size must be at least 1')

    it = windowed(iterable, window_size, fillvalue=_marker)
    return compress(count(), starmap(pred, it))


def lstrip(iterable, pred):
    """Yield the items from *iterable*, but strip any from the beginning
    for which *pred* returns ``True``.

    For example, to remove a set of items from the start of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(lstrip(iterable, pred))
        [1, 2, None, 3, False, None]

    This function is analogous to to :func:`str.lstrip`, and is essentially
    an wrapper for :func:`itertools.dropwhile`.

    """
    return dropwhile(pred, iterable)


def rstrip(iterable, pred):
    """Yield the items from *iterable*, but strip any from the end
    for which *pred* returns ``True``.

    For example, to remove a set of items from the end of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(rstrip(iterable, pred))
        [None, False, None, 1, 2, None, 3]

    This function is analogous to :func:`str.rstrip`.

    """
    cache = []
    cache_append = cache.append
    cache_clear = cache.clear
    for x in iterable:
        if pred(x):
            cache_append(x)
        else:
            yield from cache
            cache_clear()
            yield x


def strip(iterable, pred):
    """Yield the items from *iterable*, but strip any from the
    beginning and end for which *pred* returns ``True``.

    For example, to remove a set of items from both ends of an iterable:

        >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
        >>> pred = lambda x: x in {None, False, ''}
        >>> list(strip(iterable, pred))
        [1, 2, None, 3]

    This function is analogous to :func:`str.strip`.

    """
    return rstrip(lstrip(iterable, pred), pred)


class islice_extended:
    """An extension of :func:`itertools.islice` that supports negative values
    for *stop*, *start*, and *step*.

        >>> iterable = iter('abcdefgh')
        >>> list(islice_extended(iterable, -4, -1))
        ['e', 'f', 'g']

    Slices with negative values require some caching of *iterable*, but this
    function takes care to minimize the amount of memory required.

    For example, you can use a negative step with an infinite iterator:

        >>> from itertools import count
        >>> list(islice_extended(count(), 110, 99, -2))
        [110, 108, 106, 104, 102, 100]

    You can also use slice notation directly:

        >>> iterable = map(str, count())
        >>> it = islice_extended(iterable)[10:20:2]
        >>> list(it)
        ['10', '12', '14', '16', '18']

    """

    def __init__(self, iterable, *args):
        it = iter(iterable)
        if args:
            self._iterable = _islice_helper(it, slice(*args))
        else:
            self._iterable = it

    def __iter__(self):
        return self

    def __next__(self):
        return next(self._iterable)

    def __getitem__(self, key):
        if isinstance(key, slice):
            return islice_extended(_islice_helper(self._iterable, key))

        raise TypeError('islice_extended.__getitem__ argument must be a slice')


def _islice_helper(it, s):
    start = s.start
    stop = s.stop
    if s.step == 0:
        raise ValueError('step argument must be a non-zero integer or None.')
    step = s.step or 1

    if step > 0:
        start = 0 if (start is None) else start

        if start < 0:
            # Consume all but the last -start items
            cache = deque(enumerate(it, 1), maxlen=-start)
            len_iter = cache[-1][0] if cache else 0

            # Adjust start to be positive
            i = max(len_iter + start, 0)

            # Adjust stop to be positive
            if stop is None:
                j = len_iter
            elif stop >= 0:
                j = min(stop, len_iter)
            else:
                j = max(len_iter + stop, 0)

            # Slice the cache
            n = j - i
            if n <= 0:
                return

            for index, item in islice(cache, 0, n, step):
                yield item
        elif (stop is not None) and (stop < 0):
            # Advance to the start position
            next(islice(it, start, start), None)

            # When stop is negative, we have to carry -stop items while
            # iterating
            cache = deque(islice(it, -stop), maxlen=-stop)

            for index, item in enumerate(it):
                cached_item = cache.popleft()
                if index % step == 0:
                    yield cached_item
                cache.append(item)
        else:
            # When both start and stop are positive we have the normal case
            yield from islice(it, start, stop, step)
    else:
        start = -1 if (start is None) else start

        if (stop is not None) and (stop < 0):
            # Consume all but the last items
            n = -stop - 1
            cache = deque(enumerate(it, 1), maxlen=n)
            len_iter = cache[-1][0] if cache else 0

            # If start and stop are both negative they are comparable and
            # we can just slice. Otherwise we can adjust start to be negative
            # and then slice.
            if start < 0:
                i, j = start, stop
            else:
                i, j = min(start - len_iter, -1), None

            for index, item in list(cache)[i:j:step]:
                yield item
        else:
            # Advance to the stop position
            if stop is not None:
                m = stop + 1
                next(islice(it, m, m), None)

            # stop is positive, so if start is negative they are not comparable
            # and we need the rest of the items.
            if start < 0:
                i = start
                n = None
            # stop is None and start is positive, so we just need items up to
            # the start index.
            elif stop is None:
                i = None
                n = start + 1
            # Both stop and start are positive, so they are comparable.
            else:
                i = None
                n = start - stop
                if n <= 0:
                    return

            cache = list(islice(it, n))

            yield from cache[i::step]


def always_reversible(iterable):
    """An extension of :func:`reversed` that supports all iterables, not
    just those which implement the ``Reversible`` or ``Sequence`` protocols.

        >>> print(*always_reversible(x for x in range(3)))
        2 1 0

    If the iterable is already reversible, this function returns the
    result of :func:`reversed()`. If the iterable is not reversible,
    this function will cache the remaining items in the iterable and
    yield them in reverse order, which may require significant storage.
    """
    try:
        return reversed(iterable)
    except TypeError:
        return reversed(list(iterable))


def consecutive_groups(iterable, ordering=lambda x: x):
    """Yield groups of consecutive items using :func:`itertools.groupby`.
    The *ordering* function determines whether two items are adjacent by
    returning their position.

    By default, the ordering function is the identity function. This is
    suitable for finding runs of numbers:

        >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40]
        >>> for group in consecutive_groups(iterable):
        ...     print(list(group))
        [1]
        [10, 11, 12]
        [20]
        [30, 31, 32, 33]
        [40]

    For finding runs of adjacent letters, try using the :meth:`index` method
    of a string of letters:

        >>> from string import ascii_lowercase
        >>> iterable = 'abcdfgilmnop'
        >>> ordering = ascii_lowercase.index
        >>> for group in consecutive_groups(iterable, ordering):
        ...     print(list(group))
        ['a', 'b', 'c', 'd']
        ['f', 'g']
        ['i']
        ['l', 'm', 'n', 'o', 'p']

    Each group of consecutive items is an iterator that shares it source with
    *iterable*. When an an output group is advanced, the previous group is
    no longer available unless its elements are copied (e.g., into a ``list``).

        >>> iterable = [1, 2, 11, 12, 21, 22]
        >>> saved_groups = []
        >>> for group in consecutive_groups(iterable):
        ...     saved_groups.append(list(group))  # Copy group elements
        >>> saved_groups
        [[1, 2], [11, 12], [21, 22]]

    """
    for k, g in groupby(
        enumerate(iterable), key=lambda x: x[0] - ordering(x[1])
    ):
        yield map(itemgetter(1), g)


def difference(iterable, func=sub, *, initial=None):
    """This function is the inverse of :func:`itertools.accumulate`. By default
    it will compute the first difference of *iterable* using
    :func:`operator.sub`:

        >>> from itertools import accumulate
        >>> iterable = accumulate([0, 1, 2, 3, 4])  # produces 0, 1, 3, 6, 10
        >>> list(difference(iterable))
        [0, 1, 2, 3, 4]

    *func* defaults to :func:`operator.sub`, but other functions can be
    specified. They will be applied as follows::

        A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ...

    For example, to do progressive division:

        >>> iterable = [1, 2, 6, 24, 120]
        >>> func = lambda x, y: x // y
        >>> list(difference(iterable, func))
        [1, 2, 3, 4, 5]

    If the *initial* keyword is set, the first element will be skipped when
    computing successive differences.

        >>> it = [10, 11, 13, 16]  # from accumulate([1, 2, 3], initial=10)
        >>> list(difference(it, initial=10))
        [1, 2, 3]

    """
    a, b = tee(iterable)
    try:
        first = [next(b)]
    except StopIteration:
        return iter([])

    if initial is not None:
        first = []

    return chain(first, starmap(func, zip(b, a)))


class SequenceView(Sequence):
    """Return a read-only view of the sequence object *target*.

    :class:`SequenceView` objects are analogous to Python's built-in
    "dictionary view" types. They provide a dynamic view of a sequence's items,
    meaning that when the sequence updates, so does the view.

        >>> seq = ['0', '1', '2']
        >>> view = SequenceView(seq)
        >>> view
        SequenceView(['0', '1', '2'])
        >>> seq.append('3')
        >>> view
        SequenceView(['0', '1', '2', '3'])

    Sequence views support indexing, slicing, and length queries. They act
    like the underlying sequence, except they don't allow assignment:

        >>> view[1]
        '1'
        >>> view[1:-1]
        ['1', '2']
        >>> len(view)
        4

    Sequence views are useful as an alternative to copying, as they don't
    require (much) extra storage.

    """

    def __init__(self, target):
        if not isinstance(target, Sequence):
            raise TypeError
        self._target = target

    def __getitem__(self, index):
        return self._target[index]

    def __len__(self):
        return len(self._target)

    def __repr__(self):
        return '{}({})'.format(self.__class__.__name__, repr(self._target))


class seekable:
    """Wrap an iterator to allow for seeking backward and forward. This
    progressively caches the items in the source iterable so they can be
    re-visited.

    Call :meth:`seek` with an index to seek to that position in the source
    iterable.

    To "reset" an iterator, seek to ``0``:

        >>> from itertools import count
        >>> it = seekable((str(n) for n in count()))
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> it.seek(0)
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> next(it)
        '3'

    You can also seek forward:

        >>> it = seekable((str(n) for n in range(20)))
        >>> it.seek(10)
        >>> next(it)
        '10'
        >>> it.seek(20)  # Seeking past the end of the source isn't a problem
        >>> list(it)
        []
        >>> it.seek(0)  # Resetting works even after hitting the end
        >>> next(it), next(it), next(it)
        ('0', '1', '2')

    Call :meth:`peek` to look ahead one item without advancing the iterator:

        >>> it = seekable('1234')
        >>> it.peek()
        '1'
        >>> list(it)
        ['1', '2', '3', '4']
        >>> it.peek(default='empty')
        'empty'

    Before the iterator is at its end, calling :func:`bool` on it will return
    ``True``. After it will return ``False``:

        >>> it = seekable('5678')
        >>> bool(it)
        True
        >>> list(it)
        ['5', '6', '7', '8']
        >>> bool(it)
        False

    You may view the contents of the cache with the :meth:`elements` method.
    That returns a :class:`SequenceView`, a view that updates automatically:

        >>> it = seekable((str(n) for n in range(10)))
        >>> next(it), next(it), next(it)
        ('0', '1', '2')
        >>> elements = it.elements()
        >>> elements
        SequenceView(['0', '1', '2'])
        >>> next(it)
        '3'
        >>> elements
        SequenceView(['0', '1', '2', '3'])

    By default, the cache grows as the source iterable progresses, so beware of
    wrapping very large or infinite iterables. Supply *maxlen* to limit the
    size of the cache (this of course limits how far back you can seek).

        >>> from itertools import count
        >>> it = seekable((str(n) for n in count()), maxlen=2)
        >>> next(it), next(it), next(it), next(it)
        ('0', '1', '2', '3')
        >>> list(it.elements())
        ['2', '3']
        >>> it.seek(0)
        >>> next(it), next(it), next(it), next(it)
        ('2', '3', '4', '5')
        >>> next(it)
        '6'

    """

    def __init__(self, iterable, maxlen=None):
        self._source = iter(iterable)
        if maxlen is None:
            self._cache = []
        else:
            self._cache = deque([], maxlen)
        self._index = None

    def __iter__(self):
        return self

    def __next__(self):
        if self._index is not None:
            try:
                item = self._cache[self._index]
            except IndexError:
                self._index = None
            else:
                self._index += 1
                return item

        item = next(self._source)
        self._cache.append(item)
        return item

    def __bool__(self):
        try:
            self.peek()
        except StopIteration:
            return False
        return True

    def peek(self, default=_marker):
        try:
            peeked = next(self)
        except StopIteration:
            if default is _marker:
                raise
            return default
        if self._index is None:
            self._index = len(self._cache)
        self._index -= 1
        return peeked

    def elements(self):
        return SequenceView(self._cache)

    def seek(self, index):
        self._index = index
        remainder = index - len(self._cache)
        if remainder > 0:
            consume(self, remainder)


class run_length:
    """
    :func:`run_length.encode` compresses an iterable with run-length encoding.
    It yields groups of repeated items with the count of how many times they
    were repeated:

        >>> uncompressed = 'abbcccdddd'
        >>> list(run_length.encode(uncompressed))
        [('a', 1), ('b', 2), ('c', 3), ('d', 4)]

    :func:`run_length.decode` decompresses an iterable that was previously
    compressed with run-length encoding. It yields the items of the
    decompressed iterable:

        >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
        >>> list(run_length.decode(compressed))
        ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd']

    """

    @staticmethod
    def encode(iterable):
        return ((k, ilen(g)) for k, g in groupby(iterable))

    @staticmethod
    def decode(iterable):
        return chain.from_iterable(repeat(k, n) for k, n in iterable)


def exactly_n(iterable, n, predicate=bool):
    """Return ``True`` if exactly ``n`` items in the iterable are ``True``
    according to the *predicate* function.

        >>> exactly_n([True, True, False], 2)
        True
        >>> exactly_n([True, True, False], 1)
        False
        >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3)
        True

    The iterable will be advanced until ``n + 1`` truthy items are encountered,
    so avoid calling it on infinite iterables.

    """
    return len(take(n + 1, filter(predicate, iterable))) == n


def circular_shifts(iterable):
    """Return a list of circular shifts of *iterable*.

    >>> circular_shifts(range(4))
    [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)]
    """
    lst = list(iterable)
    return take(len(lst), windowed(cycle(lst), len(lst)))


def make_decorator(wrapping_func, result_index=0):
    """Return a decorator version of *wrapping_func*, which is a function that
    modifies an iterable. *result_index* is the position in that function's
    signature where the iterable goes.

    This lets you use itertools on the "production end," i.e. at function
    definition. This can augment what the function returns without changing the
    function's code.

    For example, to produce a decorator version of :func:`chunked`:

        >>> from more_itertools import chunked
        >>> chunker = make_decorator(chunked, result_index=0)
        >>> @chunker(3)
        ... def iter_range(n):
        ...     return iter(range(n))
        ...
        >>> list(iter_range(9))
        [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

    To only allow truthy items to be returned:

        >>> truth_serum = make_decorator(filter, result_index=1)
        >>> @truth_serum(bool)
        ... def boolean_test():
        ...     return [0, 1, '', ' ', False, True]
        ...
        >>> list(boolean_test())
        [1, ' ', True]

    The :func:`peekable` and :func:`seekable` wrappers make for practical
    decorators:

        >>> from more_itertools import peekable
        >>> peekable_function = make_decorator(peekable)
        >>> @peekable_function()
        ... def str_range(*args):
        ...     return (str(x) for x in range(*args))
        ...
        >>> it = str_range(1, 20, 2)
        >>> next(it), next(it), next(it)
        ('1', '3', '5')
        >>> it.peek()
        '7'
        >>> next(it)
        '7'

    """
    # See https://sites.google.com/site/bbayles/index/decorator_factory for
    # notes on how this works.
    def decorator(*wrapping_args, **wrapping_kwargs):
        def outer_wrapper(f):
            def inner_wrapper(*args, **kwargs):
                result = f(*args, **kwargs)
                wrapping_args_ = list(wrapping_args)
                wrapping_args_.insert(result_index, result)
                return wrapping_func(*wrapping_args_, **wrapping_kwargs)

            return inner_wrapper

        return outer_wrapper

    return decorator


def map_reduce(iterable, keyfunc, valuefunc=None, reducefunc=None):
    """Return a dictionary that maps the items in *iterable* to categories
    defined by *keyfunc*, transforms them with *valuefunc*, and
    then summarizes them by category with *reducefunc*.

    *valuefunc* defaults to the identity function if it is unspecified.
    If *reducefunc* is unspecified, no summarization takes place:

        >>> keyfunc = lambda x: x.upper()
        >>> result = map_reduce('abbccc', keyfunc)
        >>> sorted(result.items())
        [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])]

    Specifying *valuefunc* transforms the categorized items:

        >>> keyfunc = lambda x: x.upper()
        >>> valuefunc = lambda x: 1
        >>> result = map_reduce('abbccc', keyfunc, valuefunc)
        >>> sorted(result.items())
        [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])]

    Specifying *reducefunc* summarizes the categorized items:

        >>> keyfunc = lambda x: x.upper()
        >>> valuefunc = lambda x: 1
        >>> reducefunc = sum
        >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc)
        >>> sorted(result.items())
        [('A', 1), ('B', 2), ('C', 3)]

    You may want to filter the input iterable before applying the map/reduce
    procedure:

        >>> all_items = range(30)
        >>> items = [x for x in all_items if 10 <= x <= 20]  # Filter
        >>> keyfunc = lambda x: x % 2  # Evens map to 0; odds to 1
        >>> categories = map_reduce(items, keyfunc=keyfunc)
        >>> sorted(categories.items())
        [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])]
        >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum)
        >>> sorted(summaries.items())
        [(0, 90), (1, 75)]

    Note that all items in the iterable are gathered into a list before the
    summarization step, which may require significant storage.

    The returned object is a :obj:`collections.defaultdict` with the
    ``default_factory`` set to ``None``, such that it behaves like a normal
    dictionary.

    """
    valuefunc = (lambda x: x) if (valuefunc is None) else valuefunc

    ret = defaultdict(list)
    for item in iterable:
        key = keyfunc(item)
        value = valuefunc(item)
        ret[key].append(value)

    if reducefunc is not None:
        for key, value_list in ret.items():
            ret[key] = reducefunc(value_list)

    ret.default_factory = None
    return ret


def rlocate(iterable, pred=bool, window_size=None):
    """Yield the index of each item in *iterable* for which *pred* returns
    ``True``, starting from the right and moving left.

    *pred* defaults to :func:`bool`, which will select truthy items:

        >>> list(rlocate([0, 1, 1, 0, 1, 0, 0]))  # Truthy at 1, 2, and 4
        [4, 2, 1]

    Set *pred* to a custom function to, e.g., find the indexes for a particular
    item:

        >>> iterable = iter('abcb')
        >>> pred = lambda x: x == 'b'
        >>> list(rlocate(iterable, pred))
        [3, 1]

    If *window_size* is given, then the *pred* function will be called with
    that many items. This enables searching for sub-sequences:

        >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
        >>> pred = lambda *args: args == (1, 2, 3)
        >>> list(rlocate(iterable, pred=pred, window_size=3))
        [9, 5, 1]

    Beware, this function won't return anything for infinite iterables.
    If *iterable* is reversible, ``rlocate`` will reverse it and search from
    the right. Otherwise, it will search from the left and return the results
    in reverse order.

    See :func:`locate` to for other example applications.

    """
    if window_size is None:
        try:
            len_iter = len(iterable)
            return (len_iter - i - 1 for i in locate(reversed(iterable), pred))
        except TypeError:
            pass

    return reversed(list(locate(iterable, pred, window_size)))


def replace(iterable, pred, substitutes, count=None, window_size=1):
    """Yield the items from *iterable*, replacing the items for which *pred*
    returns ``True`` with the items from the iterable *substitutes*.

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1]
        >>> pred = lambda x: x == 0
        >>> substitutes = (2, 3)
        >>> list(replace(iterable, pred, substitutes))
        [1, 1, 2, 3, 1, 1, 2, 3, 1, 1]

    If *count* is given, the number of replacements will be limited:

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0]
        >>> pred = lambda x: x == 0
        >>> substitutes = [None]
        >>> list(replace(iterable, pred, substitutes, count=2))
        [1, 1, None, 1, 1, None, 1, 1, 0]

    Use *window_size* to control the number of items passed as arguments to
    *pred*. This allows for locating and replacing subsequences.

        >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5]
        >>> window_size = 3
        >>> pred = lambda *args: args == (0, 1, 2)  # 3 items passed to pred
        >>> substitutes = [3, 4] # Splice in these items
        >>> list(replace(iterable, pred, substitutes, window_size=window_size))
        [3, 4, 5, 3, 4, 5]

    """
    if window_size < 1:
        raise ValueError('window_size must be at least 1')

    # Save the substitutes iterable, since it's used more than once
    substitutes = tuple(substitutes)

    # Add padding such that the number of windows matches the length of the
    # iterable
    it = chain(iterable, [_marker] * (window_size - 1))
    windows = windowed(it, window_size)

    n = 0
    for w in windows:
        # If the current window matches our predicate (and we haven't hit
        # our maximum number of replacements), splice in the substitutes
        # and then consume the following windows that overlap with this one.
        # For example, if the iterable is (0, 1, 2, 3, 4...)
        # and the window size is 2, we have (0, 1), (1, 2), (2, 3)...
        # If the predicate matches on (0, 1), we need to zap (0, 1) and (1, 2)
        if pred(*w):
            if (count is None) or (n < count):
                n += 1
                yield from substitutes
                consume(windows, window_size - 1)
                continue

        # If there was no match (or we've reached the replacement limit),
        # yield the first item from the window.
        if w and (w[0] is not _marker):
            yield w[0]


def partitions(iterable):
    """Yield all possible order-preserving partitions of *iterable*.

    >>> iterable = 'abc'
    >>> for part in partitions(iterable):
    ...     print([''.join(p) for p in part])
    ['abc']
    ['a', 'bc']
    ['ab', 'c']
    ['a', 'b', 'c']

    This is unrelated to :func:`partition`.

    """
    sequence = list(iterable)
    n = len(sequence)
    for i in powerset(range(1, n)):
        yield [sequence[i:j] for i, j in zip((0,) + i, i + (n,))]


def set_partitions(iterable, k=None):
    """
    Yield the set partitions of *iterable* into *k* parts. Set partitions are
    not order-preserving.

    >>> iterable = 'abc'
    >>> for part in set_partitions(iterable, 2):
    ...     print([''.join(p) for p in part])
    ['a', 'bc']
    ['ab', 'c']
    ['b', 'ac']


    If *k* is not given, every set partition is generated.

    >>> iterable = 'abc'
    >>> for part in set_partitions(iterable):
    ...     print([''.join(p) for p in part])
    ['abc']
    ['a', 'bc']
    ['ab', 'c']
    ['b', 'ac']
    ['a', 'b', 'c']

    """
    L = list(iterable)
    n = len(L)
    if k is not None:
        if k < 1:
            raise ValueError(
                "Can't partition in a negative or zero number of groups"
            )
        elif k > n:
            return

    def set_partitions_helper(L, k):
        n = len(L)
        if k == 1:
            yield [L]
        elif n == k:
            yield [[s] for s in L]
        else:
            e, *M = L
            for p in set_partitions_helper(M, k - 1):
                yield [[e], *p]
            for p in set_partitions_helper(M, k):
                for i in range(len(p)):
                    yield p[:i] + [[e] + p[i]] + p[i + 1 :]

    if k is None:
        for k in range(1, n + 1):
            yield from set_partitions_helper(L, k)
    else:
        yield from set_partitions_helper(L, k)


class time_limited:
    """
    Yield items from *iterable* until *limit_seconds* have passed.
    If the time limit expires before all items have been yielded, the
    ``timed_out`` parameter will be set to ``True``.

    >>> from time import sleep
    >>> def generator():
    ...     yield 1
    ...     yield 2
    ...     sleep(0.2)
    ...     yield 3
    >>> iterable = time_limited(0.1, generator())
    >>> list(iterable)
    [1, 2]
    >>> iterable.timed_out
    True

    Note that the time is checked before each item is yielded, and iteration
    stops if  the time elapsed is greater than *limit_seconds*. If your time
    limit is 1 second, but it takes 2 seconds to generate the first item from
    the iterable, the function will run for 2 seconds and not yield anything.

    """

    def __init__(self, limit_seconds, iterable):
        if limit_seconds < 0:
            raise ValueError('limit_seconds must be positive')
        self.limit_seconds = limit_seconds
        self._iterable = iter(iterable)
        self._start_time = monotonic()
        self.timed_out = False

    def __iter__(self):
        return self

    def __next__(self):
        item = next(self._iterable)
        if monotonic() - self._start_time > self.limit_seconds:
            self.timed_out = True
            raise StopIteration

        return item


def only(iterable, default=None, too_long=None):
    """If *iterable* has only one item, return it.
    If it has zero items, return *default*.
    If it has more than one item, raise the exception given by *too_long*,
    which is ``ValueError`` by default.

    >>> only([], default='missing')
    'missing'
    >>> only([1])
    1
    >>> only([1, 2])  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: Expected exactly one item in iterable, but got 1, 2,
     and perhaps more.'
    >>> only([1, 2], too_long=TypeError)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    TypeError

    Note that :func:`only` attempts to advance *iterable* twice to ensure there
    is only one item.  See :func:`spy` or :func:`peekable` to check
    iterable contents less destructively.
    """
    it = iter(iterable)
    first_value = next(it, default)

    try:
        second_value = next(it)
    except StopIteration:
        pass
    else:
        msg = (
            'Expected exactly one item in iterable, but got {!r}, {!r}, '
            'and perhaps more.'.format(first_value, second_value)
        )
        raise too_long or ValueError(msg)

    return first_value


def ichunked(iterable, n):
    """Break *iterable* into sub-iterables with *n* elements each.
    :func:`ichunked` is like :func:`chunked`, but it yields iterables
    instead of lists.

    If the sub-iterables are read in order, the elements of *iterable*
    won't be stored in memory.
    If they are read out of order, :func:`itertools.tee` is used to cache
    elements as necessary.

    >>> from itertools import count
    >>> all_chunks = ichunked(count(), 4)
    >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks)
    >>> list(c_2)  # c_1's elements have been cached; c_3's haven't been
    [4, 5, 6, 7]
    >>> list(c_1)
    [0, 1, 2, 3]
    >>> list(c_3)
    [8, 9, 10, 11]

    """
    source = iter(iterable)

    while True:
        # Check to see whether we're at the end of the source iterable
        item = next(source, _marker)
        if item is _marker:
            return

        # Clone the source and yield an n-length slice
        source, it = tee(chain([item], source))
        yield islice(it, n)

        # Advance the source iterable
        consume(source, n)


def distinct_combinations(iterable, r):
    """Yield the distinct combinations of *r* items taken from *iterable*.

        >>> list(distinct_combinations([0, 0, 1], 2))
        [(0, 0), (0, 1)]

    Equivalent to ``set(combinations(iterable))``, except duplicates are not
    generated and thrown away. For larger input sequences this is much more
    efficient.

    """
    if r < 0:
        raise ValueError('r must be non-negative')
    elif r == 0:
        yield ()
        return
    pool = tuple(iterable)
    generators = [unique_everseen(enumerate(pool), key=itemgetter(1))]
    current_combo = [None] * r
    level = 0
    while generators:
        try:
            cur_idx, p = next(generators[-1])
        except StopIteration:
            generators.pop()
            level -= 1
            continue
        current_combo[level] = p
        if level + 1 == r:
            yield tuple(current_combo)
        else:
            generators.append(
                unique_everseen(
                    enumerate(pool[cur_idx + 1 :], cur_idx + 1),
                    key=itemgetter(1),
                )
            )
            level += 1


def filter_except(validator, iterable, *exceptions):
    """Yield the items from *iterable* for which the *validator* function does
    not raise one of the specified *exceptions*.

    *validator* is called for each item in *iterable*.
    It should be a function that accepts one argument and raises an exception
    if that item is not valid.

    >>> iterable = ['1', '2', 'three', '4', None]
    >>> list(filter_except(int, iterable, ValueError, TypeError))
    ['1', '2', '4']

    If an exception other than one given by *exceptions* is raised by
    *validator*, it is raised like normal.
    """
    for item in iterable:
        try:
            validator(item)
        except exceptions:
            pass
        else:
            yield item


def map_except(function, iterable, *exceptions):
    """Transform each item from *iterable* with *function* and yield the
    result, unless *function* raises one of the specified *exceptions*.

    *function* is called to transform each item in *iterable*.
    It should be a accept one argument.

    >>> iterable = ['1', '2', 'three', '4', None]
    >>> list(map_except(int, iterable, ValueError, TypeError))
    [1, 2, 4]

    If an exception other than one given by *exceptions* is raised by
    *function*, it is raised like normal.
    """
    for item in iterable:
        try:
            yield function(item)
        except exceptions:
            pass


def _sample_unweighted(iterable, k):
    # Implementation of "Algorithm L" from the 1994 paper by Kim-Hung Li:
    # "Reservoir-Sampling Algorithms of Time Complexity O(n(1+log(N/n)))".

    # Fill up the reservoir (collection of samples) with the first `k` samples
    reservoir = take(k, iterable)

    # Generate random number that's the largest in a sample of k U(0,1) numbers
    # Largest order statistic: https://en.wikipedia.org/wiki/Order_statistic
    W = exp(log(random()) / k)

    # The number of elements to skip before changing the reservoir is a random
    # number with a geometric distribution. Sample it using random() and logs.
    next_index = k + floor(log(random()) / log(1 - W))

    for index, element in enumerate(iterable, k):

        if index == next_index:
            reservoir[randrange(k)] = element
            # The new W is the largest in a sample of k U(0, `old_W`) numbers
            W *= exp(log(random()) / k)
            next_index += floor(log(random()) / log(1 - W)) + 1

    return reservoir


def _sample_weighted(iterable, k, weights):
    # Implementation of "A-ExpJ" from the 2006 paper by Efraimidis et al. :
    # "Weighted random sampling with a reservoir".

    # Log-transform for numerical stability for weights that are small/large
    weight_keys = (log(random()) / weight for weight in weights)

    # Fill up the reservoir (collection of samples) with the first `k`
    # weight-keys and elements, then heapify the list.
    reservoir = take(k, zip(weight_keys, iterable))
    heapify(reservoir)

    # The number of jumps before changing the reservoir is a random variable
    # with an exponential distribution. Sample it using random() and logs.
    smallest_weight_key, _ = reservoir[0]
    weights_to_skip = log(random()) / smallest_weight_key

    for weight, element in zip(weights, iterable):
        if weight >= weights_to_skip:
            # The notation here is consistent with the paper, but we store
            # the weight-keys in log-space for better numerical stability.
            smallest_weight_key, _ = reservoir[0]
            t_w = exp(weight * smallest_weight_key)
            r_2 = uniform(t_w, 1)  # generate U(t_w, 1)
            weight_key = log(r_2) / weight
            heapreplace(reservoir, (weight_key, element))
            smallest_weight_key, _ = reservoir[0]
            weights_to_skip = log(random()) / smallest_weight_key
        else:
            weights_to_skip -= weight

    # Equivalent to [element for weight_key, element in sorted(reservoir)]
    return [heappop(reservoir)[1] for _ in range(k)]


def sample(iterable, k, weights=None):
    """Return a *k*-length list of elements chosen (without replacement)
    from the *iterable*. Like :func:`random.sample`, but works on iterables
    of unknown length.

    >>> iterable = range(100)
    >>> sample(iterable, 5)  # doctest: +SKIP
    [81, 60, 96, 16, 4]

    An iterable with *weights* may also be given:

    >>> iterable = range(100)
    >>> weights = (i * i + 1 for i in range(100))
    >>> sampled = sample(iterable, 5, weights=weights)  # doctest: +SKIP
    [79, 67, 74, 66, 78]

    The algorithm can also be used to generate weighted random permutations.
    The relative weight of each item determines the probability that it
    appears late in the permutation.

    >>> data = "abcdefgh"
    >>> weights = range(1, len(data) + 1)
    >>> sample(data, k=len(data), weights=weights)  # doctest: +SKIP
    ['c', 'a', 'b', 'e', 'g', 'd', 'h', 'f']
    """
    if k == 0:
        return []

    iterable = iter(iterable)
    if weights is None:
        return _sample_unweighted(iterable, k)
    else:
        weights = iter(weights)
        return _sample_weighted(iterable, k, weights)


def is_sorted(iterable, key=None, reverse=False):
    """Returns ``True`` if the items of iterable are in sorted order, and
    ``False`` otherwise. *key* and *reverse* have the same meaning that they do
    in the built-in :func:`sorted` function.

    >>> is_sorted(['1', '2', '3', '4', '5'], key=int)
    True
    >>> is_sorted([5, 4, 3, 1, 2], reverse=True)
    False

    The function returns ``False`` after encountering the first out-of-order
    item. If there are no out-of-order items, the iterable is exhausted.
    """

    compare = lt if reverse else gt
    it = iterable if (key is None) else map(key, iterable)
    return not any(starmap(compare, pairwise(it)))


class AbortThread(BaseException):
    pass


class callback_iter:
    """Convert a function that uses callbacks to an iterator.

    Let *func* be a function that takes a `callback` keyword argument.
    For example:

    >>> def func(callback=None):
    ...     for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]:
    ...         if callback:
    ...             callback(i, c)
    ...     return 4


    Use ``with callback_iter(func)`` to get an iterator over the parameters
    that are delivered to the callback.

    >>> with callback_iter(func) as it:
    ...     for args, kwargs in it:
    ...         print(args)
    (1, 'a')
    (2, 'b')
    (3, 'c')

    The function will be called in a background thread. The ``done`` property
    indicates whether it has completed execution.

    >>> it.done
    True

    If it completes successfully, its return value will be available
    in the ``result`` property.

    >>> it.result
    4

    Notes:

    * If the function uses some keyword argument besides ``callback``, supply
      *callback_kwd*.
    * If it finished executing, but raised an exception, accessing the
      ``result`` property will raise the same exception.
    * If it hasn't finished executing, accessing the ``result``
      property from within the ``with`` block will raise ``RuntimeError``.
    * If it hasn't finished executing, accessing the ``result`` property from
      outside the ``with`` block will raise a
      ``more_itertools.AbortThread`` exception.
    * Provide *wait_seconds* to adjust how frequently the it is polled for
      output.

    """

    def __init__(self, func, callback_kwd='callback', wait_seconds=0.1):
        self._func = func
        self._callback_kwd = callback_kwd
        self._aborted = False
        self._future = None
        self._wait_seconds = wait_seconds
        self._executor = __import__("concurrent.futures").futures.ThreadPoolExecutor(max_workers=1)
        self._iterator = self._reader()

    def __enter__(self):
        return self

    def __exit__(self, exc_type, exc_value, traceback):
        self._aborted = True
        self._executor.shutdown()

    def __iter__(self):
        return self

    def __next__(self):
        return next(self._iterator)

    @property
    def done(self):
        if self._future is None:
            return False
        return self._future.done()

    @property
    def result(self):
        if not self.done:
            raise RuntimeError('Function has not yet completed')

        return self._future.result()

    def _reader(self):
        q = Queue()

        def callback(*args, **kwargs):
            if self._aborted:
                raise AbortThread('canceled by user')

            q.put((args, kwargs))

        self._future = self._executor.submit(
            self._func, **{self._callback_kwd: callback}
        )

        while True:
            try:
                item = q.get(timeout=self._wait_seconds)
            except Empty:
                pass
            else:
                q.task_done()
                yield item

            if self._future.done():
                break

        remaining = []
        while True:
            try:
                item = q.get_nowait()
            except Empty:
                break
            else:
                q.task_done()
                remaining.append(item)
        q.join()
        yield from remaining


def windowed_complete(iterable, n):
    """
    Yield ``(beginning, middle, end)`` tuples, where:

    * Each ``middle`` has *n* items from *iterable*
    * Each ``beginning`` has the items before the ones in ``middle``
    * Each ``end`` has the items after the ones in ``middle``

    >>> iterable = range(7)
    >>> n = 3
    >>> for beginning, middle, end in windowed_complete(iterable, n):
    ...     print(beginning, middle, end)
    () (0, 1, 2) (3, 4, 5, 6)
    (0,) (1, 2, 3) (4, 5, 6)
    (0, 1) (2, 3, 4) (5, 6)
    (0, 1, 2) (3, 4, 5) (6,)
    (0, 1, 2, 3) (4, 5, 6) ()

    Note that *n* must be at least 0 and most equal to the length of
    *iterable*.

    This function will exhaust the iterable and may require significant
    storage.
    """
    if n < 0:
        raise ValueError('n must be >= 0')

    seq = tuple(iterable)
    size = len(seq)

    if n > size:
        raise ValueError('n must be <= len(seq)')

    for i in range(size - n + 1):
        beginning = seq[:i]
        middle = seq[i : i + n]
        end = seq[i + n :]
        yield beginning, middle, end


def all_unique(iterable, key=None):
    """
    Returns ``True`` if all the elements of *iterable* are unique (no two
    elements are equal).

        >>> all_unique('ABCB')
        False

    If a *key* function is specified, it will be used to make comparisons.

        >>> all_unique('ABCb')
        True
        >>> all_unique('ABCb', str.lower)
        False

    The function returns as soon as the first non-unique element is
    encountered. Iterables with a mix of hashable and unhashable items can
    be used, but the function will be slower for unhashable items.
    """
    seenset = set()
    seenset_add = seenset.add
    seenlist = []
    seenlist_add = seenlist.append
    for element in map(key, iterable) if key else iterable:
        try:
            if element in seenset:
                return False
            seenset_add(element)
        except TypeError:
            if element in seenlist:
                return False
            seenlist_add(element)
    return True


def nth_product(index, *args):
    """Equivalent to ``list(product(*args))[index]``.

    The products of *args* can be ordered lexicographically.
    :func:`nth_product` computes the product at sort position *index* without
    computing the previous products.

        >>> nth_product(8, range(2), range(2), range(2), range(2))
        (1, 0, 0, 0)

    ``IndexError`` will be raised if the given *index* is invalid.
    """
    pools = list(map(tuple, reversed(args)))
    ns = list(map(len, pools))

    c = reduce(mul, ns)

    if index < 0:
        index += c

    if not 0 <= index < c:
        raise IndexError

    result = []
    for pool, n in zip(pools, ns):
        result.append(pool[index % n])
        index //= n

    return tuple(reversed(result))


def nth_permutation(iterable, r, index):
    """Equivalent to ``list(permutations(iterable, r))[index]```

    The subsequences of *iterable* that are of length *r* where order is
    important can be ordered lexicographically. :func:`nth_permutation`
    computes the subsequence at sort position *index* directly, without
    computing the previous subsequences.

        >>> nth_permutation('ghijk', 2, 5)
        ('h', 'i')

    ``ValueError`` will be raised If *r* is negative or greater than the length
    of *iterable*.
    ``IndexError`` will be raised if the given *index* is invalid.
    """
    pool = list(iterable)
    n = len(pool)

    if r is None or r == n:
        r, c = n, factorial(n)
    elif not 0 <= r < n:
        raise ValueError
    else:
        c = factorial(n) // factorial(n - r)

    if index < 0:
        index += c

    if not 0 <= index < c:
        raise IndexError

    if c == 0:
        return tuple()

    result = [0] * r
    q = index * factorial(n) // c if r < n else index
    for d in range(1, n + 1):
        q, i = divmod(q, d)
        if 0 <= n - d < r:
            result[n - d] = i
        if q == 0:
            break

    return tuple(map(pool.pop, result))


def value_chain(*args):
    """Yield all arguments passed to the function in the same order in which
    they were passed. If an argument itself is iterable then iterate over its
    values.

        >>> list(value_chain(1, 2, 3, [4, 5, 6]))
        [1, 2, 3, 4, 5, 6]

    Binary and text strings are not considered iterable and are emitted
    as-is:

        >>> list(value_chain('12', '34', ['56', '78']))
        ['12', '34', '56', '78']


    Multiple levels of nesting are not flattened.

    """
    for value in args:
        if isinstance(value, (str, bytes)):
            yield value
            continue
        try:
            yield from value
        except TypeError:
            yield value


def product_index(element, *args):
    """Equivalent to ``list(product(*args)).index(element)``

    The products of *args* can be ordered lexicographically.
    :func:`product_index` computes the first index of *element* without
    computing the previous products.

        >>> product_index([8, 2], range(10), range(5))
        42

    ``ValueError`` will be raised if the given *element* isn't in the product
    of *args*.
    """
    index = 0

    for x, pool in zip_longest(element, args, fillvalue=_marker):
        if x is _marker or pool is _marker:
            raise ValueError('element is not a product of args')

        pool = tuple(pool)
        index = index * len(pool) + pool.index(x)

    return index


def combination_index(element, iterable):
    """Equivalent to ``list(combinations(iterable, r)).index(element)``

    The subsequences of *iterable* that are of length *r* can be ordered
    lexicographically. :func:`combination_index` computes the index of the
    first *element*, without computing the previous combinations.

        >>> combination_index('adf', 'abcdefg')
        10

    ``ValueError`` will be raised if the given *element* isn't one of the
    combinations of *iterable*.
    """
    element = enumerate(element)
    k, y = next(element, (None, None))
    if k is None:
        return 0

    indexes = []
    pool = enumerate(iterable)
    for n, x in pool:
        if x == y:
            indexes.append(n)
            tmp, y = next(element, (None, None))
            if tmp is None:
                break
            else:
                k = tmp
    else:
        raise ValueError('element is not a combination of iterable')

    n, _ = last(pool, default=(n, None))

    # Python versiosn below 3.8 don't have math.comb
    index = 1
    for i, j in enumerate(reversed(indexes), start=1):
        j = n - j
        if i <= j:
            index += factorial(j) // (factorial(i) * factorial(j - i))

    return factorial(n + 1) // (factorial(k + 1) * factorial(n - k)) - index


def permutation_index(element, iterable):
    """Equivalent to ``list(permutations(iterable, r)).index(element)```

    The subsequences of *iterable* that are of length *r* where order is
    important can be ordered lexicographically. :func:`permutation_index`
    computes the index of the first *element* directly, without computing
    the previous permutations.

        >>> permutation_index([1, 3, 2], range(5))
        19

    ``ValueError`` will be raised if the given *element* isn't one of the
    permutations of *iterable*.
    """
    index = 0
    pool = list(iterable)
    for i, x in zip(range(len(pool), -1, -1), element):
        r = pool.index(x)
        index = index * i + r
        del pool[r]

    return index


class countable:
    """Wrap *iterable* and keep a count of how many items have been consumed.

    The ``items_seen`` attribute starts at ``0`` and increments as the iterable
    is consumed:

        >>> iterable = map(str, range(10))
        >>> it = countable(iterable)
        >>> it.items_seen
        0
        >>> next(it), next(it)
        ('0', '1')
        >>> list(it)
        ['2', '3', '4', '5', '6', '7', '8', '9']
        >>> it.items_seen
        10
    """

    def __init__(self, iterable):
        self._it = iter(iterable)
        self.items_seen = 0

    def __iter__(self):
        return self

    def __next__(self):
        item = next(self._it)
        self.items_seen += 1

        return item
python3.12/site-packages/setuptools/_vendor/__init__.py000064400000000000151732704110017066 0ustar00python3.12/site-packages/setuptools/_vendor/importlib_resources/readers.py000064400000006775151732704110023100 0ustar00import collections
import pathlib
import operator

from . import abc

from ._itertools import unique_everseen
from ._compat import ZipPath


def remove_duplicates(items):
    return iter(collections.OrderedDict.fromkeys(items))


class FileReader(abc.TraversableResources):
    def __init__(self, loader):
        self.path = pathlib.Path(loader.path).parent

    def resource_path(self, resource):
        """
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        """
        return str(self.path.joinpath(resource))

    def files(self):
        return self.path


class ZipReader(abc.TraversableResources):
    def __init__(self, loader, module):
        _, _, name = module.rpartition('.')
        self.prefix = loader.prefix.replace('\\', '/') + name + '/'
        self.archive = loader.archive

    def open_resource(self, resource):
        try:
            return super().open_resource(resource)
        except KeyError as exc:
            raise FileNotFoundError(exc.args[0])

    def is_resource(self, path):
        # workaround for `zipfile.Path.is_file` returning true
        # for non-existent paths.
        target = self.files().joinpath(path)
        return target.is_file() and target.exists()

    def files(self):
        return ZipPath(self.archive, self.prefix)


class MultiplexedPath(abc.Traversable):
    """
    Given a series of Traversable objects, implement a merged
    version of the interface across all objects. Useful for
    namespace packages which may be multihomed at a single
    name.
    """

    def __init__(self, *paths):
        self._paths = list(map(pathlib.Path, remove_duplicates(paths)))
        if not self._paths:
            message = 'MultiplexedPath must contain at least one path'
            raise FileNotFoundError(message)
        if not all(path.is_dir() for path in self._paths):
            raise NotADirectoryError('MultiplexedPath only supports directories')

    def iterdir(self):
        files = (file for path in self._paths for file in path.iterdir())
        return unique_everseen(files, key=operator.attrgetter('name'))

    def read_bytes(self):
        raise FileNotFoundError(f'{self} is not a file')

    def read_text(self, *args, **kwargs):
        raise FileNotFoundError(f'{self} is not a file')

    def is_dir(self):
        return True

    def is_file(self):
        return False

    def joinpath(self, *descendants):
        try:
            return super().joinpath(*descendants)
        except abc.TraversalError:
            # One of the paths did not resolve (a directory does not exist).
            # Just return something that will not exist.
            return self._paths[0].joinpath(*descendants)

    def open(self, *args, **kwargs):
        raise FileNotFoundError(f'{self} is not a file')

    @property
    def name(self):
        return self._paths[0].name

    def __repr__(self):
        paths = ', '.join(f"'{path}'" for path in self._paths)
        return f'MultiplexedPath({paths})'


class NamespaceReader(abc.TraversableResources):
    def __init__(self, namespace_path):
        if 'NamespacePath' not in str(namespace_path):
            raise ValueError('Invalid path')
        self.path = MultiplexedPath(*list(namespace_path))

    def resource_path(self, resource):
        """
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        """
        return str(self.path.joinpath(resource))

    def files(self):
        return self.path
python3.12/site-packages/setuptools/_vendor/importlib_resources/_itertools.py000064400000001564151732704110023625 0ustar00from itertools import filterfalse

from typing import (
    Callable,
    Iterable,
    Iterator,
    Optional,
    Set,
    TypeVar,
    Union,
)

# Type and type variable definitions
_T = TypeVar('_T')
_U = TypeVar('_U')


def unique_everseen(
    iterable: Iterable[_T], key: Optional[Callable[[_T], _U]] = None
) -> Iterator[_T]:
    "List unique elements, preserving order. Remember all elements ever seen."
    # unique_everseen('AAAABBBCCDAABBB') --> A B C D
    # unique_everseen('ABBCcAD', str.lower) --> A B C D
    seen: Set[Union[_T, _U]] = set()
    seen_add = seen.add
    if key is None:
        for element in filterfalse(seen.__contains__, iterable):
            seen_add(element)
            yield element
    else:
        for element in iterable:
            k = key(element)
            if k not in seen:
                seen_add(k)
                yield element
python3.12/site-packages/setuptools/_vendor/importlib_resources/__pycache__/__init__.cpython-312.pyc000064400000001334151732704120027536 0ustar00�

��_i���X�dZddlmZmZmZddlmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZgd�Zy)z*Read resources contained within a package.�)�as_file�files�Package)�contents�open_binary�read_binary�	open_text�	read_text�is_resource�path�Resource)�ResourceReader)rr
rrrrrrr	rrr
N)�__doc__�_commonrrr�_legacyrrrr	r
rrr
�abcr�__all__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/__init__.py�<module>rs-��0���	�	�	� �
�rpython3.12/site-packages/setuptools/_vendor/importlib_resources/__pycache__/_compat.cpython-312.pyc000064400000011703151732704120027422 0ustar00�

��_im��J�ddlZddlZddlZddlZddlmZddlmZejdk\rddl	m
Znddlm
Z	ddlm
Z
	dd	lmZGd
�d�Zd�Zejd
k\reeej(efZyeedfZy#e$rd�Z
Y�JwxYw#e$rej ZY�ZwxYw)�N)�suppress)�Union)��
)�Path�)�runtime_checkablec��|S�N�)�clss ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/_compat.pyr	r	s���
�)�Protocolc�,�eZdZdZd�Zed��Zd�Zy)�TraversableResourcesLoaderz�
    Adapt loaders to provide TraversableResources and other
    compatibility.

    Used primarily for Python 3.9 and earlier where the native
    loaders do not yet implement TraversableResources.
    c��||_yr��spec)�selfrs  r�__init__z#TraversableResourcesLoader.__init__(s	����	rc�.�|jjSr)r�origin)rs r�pathzTraversableResourcesLoader.path+s���y�y���rc�����ddlm�m}�fd�}�fd�}d���fd�}��fd�}|�j�xsW|�j�xsC|�j�xs/|�j�xs|j	�j�S)N�)�readers�	_adaptersc���tt�5�j|j|j�cddd�S#1swYyxYwr)r�AttributeError�	ZipReader�loader�name�rrs �r�_zip_readerzCTraversableResourcesLoader.get_resource_reader.<locals>._zip_reader2s/����.�)��(�(����d�i�i�@�*�)�)�s�&A�A
c���ttt�5�j|j�cddd�S#1swYyxYwr)rr �
ValueError�NamespaceReader�submodule_search_locationsr$s �r�_namespace_readerzITraversableResourcesLoader.get_resource_reader.<locals>._namespace_reader6s-����.�*�5��.�.�t�/N�/N�O�6�5�5�s	�;�Ac��tt�5|jj|j�cddd�S#1swYyxYwr)rr r"�get_resource_readerr#rs r�_available_readerzITraversableResourcesLoader.get_resource_reader.<locals>._available_reader:s,���.�)��{�{�6�6�t�y�y�A�*�)�)�s	�%?�Ac�4���|�}t|d�r|SdS)N�files)�hasattr)r�readerr-s  �r�_native_readerzFTraversableResourcesLoader.get_resource_reader.<locals>._native_reader>s!���&�t�,�F�$�V�W�5�6�?�4�?rc���	tj�j�}|j	�r�j��Sy#t$rYywxYwr)�pathlibrr�	TypeError�exists�
FileReader)rrrrs  ��r�_file_readerzDTraversableResourcesLoader.get_resource_reader.<locals>._file_readerBsO���
��|�|�D�I�I�.���{�{�}��)�)�$�/�/����
��
�s�A�	A�A)�rrr�CompatibilityFiles)	rr#rr%r*r2r8r-rs	`      @@rr,z.TraversableResourcesLoader.get_resource_reader/s����(�	A�	P�	B�	@�	0�
�4�9�9�%�
7�
��	�	�"�
7�
�d�i�i�(�

7�
����#�
7��+�+�D�I�I�6�	
rN)�__name__�
__module__�__qualname__�__doc__r�propertyrr,rrrrrs%����� �� �)
rrc�N�ddlm}|j|jt�S)z�
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.

    Supersedes _adapters.wrap_spec to use TraversableResourcesLoader
    from above for older Python compatibility (<3.10).
    r)r)r9r�SpecLoaderAdapter�__spec__r)�packagers  r�	wrap_specrD[s!����&�&�w�'7�'7�9S�T�Tr)r�	zos.PathLike[str])�abc�os�sysr4�
contextlibr�typingr�version_info�zipfiler�ZipPath�zippr	�ImportErrorr�ABCrrD�str�PathLike�StrPathrrr�<module>rTs����	�
�������w��'�&��(���
9
�9
�x
U����v���C����S�)�)�*�G��C�+�+�,�G��s��������w�w�H��s#�B�B�B�
B�B"�!B"site-packages/setuptools/_vendor/importlib_resources/__pycache__/_adapters.cpython-312.pyc000064400000023042151732704120027662 0ustar00python3.12�

��_i���r�ddlmZddlmZddlmZGd�d�ZGd�d�Zdd	�ZGd
�d�Z	d�Z
y
)�)�suppress)�
TextIOWrapper�)�abcc�"�eZdZdZd�fd�Zd�Zy)�SpecLoaderAdapterz>
    Adapt a package spec to adapt the underlying loader.
    c��|jS�N)�loader��specs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/_adapters.py�<lambda>zSpecLoaderAdapter.<lambda>s��$�+�+�c�,�||_||�|_yr
)r
r)�selfr
�adapters   r�__init__zSpecLoaderAdapter.__init__s����	��d�m��rc�.�t|j|�Sr
)�getattrr
�r�names  r�__getattr__zSpecLoaderAdapter.__getattr__s���t�y�y�$�'�'rN)�__name__�
__module__�__qualname__�__doc__rr�rrrrs���&>�$�(rrc��eZdZdZd�Zd�Zy)�TraversableResourcesLoaderz9
    Adapt a loader to provide TraversableResources.
    c��||_yr
r�rr
s  rrz#TraversableResourcesLoader.__init__�	����	rc�H�t|j�j�Sr
)�CompatibilityFilesr
�_nativers  r�get_resource_readerz.TraversableResourcesLoader.get_resource_readers��!�$�)�)�,�4�4�6�6rN)rrrrrr'rrrr r s����7rr c�l�|dk(rt|g|��i|��S|dk(r|Stdj|���)N�r�rbz8Invalid mode value '{}', only 'r' and 'rb' are supported)r�
ValueError�format)�file�mode�args�kwargss    r�_io_wrapperr1 sE���s�{��T�3�D�3�F�3�3�	
�����
�B�I�I�$�O��rc��eZdZdZGd�dej
�ZGd�dej
�ZGd�dej
�Zd�Z	e
d	��Zd
�Zd�Z
d�Zy
)r%zj
    Adapter for an existing or non-existent resource reader
    to provide a compatibility .files().
    c�D�eZdZdZd�Zd�Zd�ZeZd�Ze	d��Z
d	d�Zy)
�CompatibilityFiles.SpecPathzk
        Path tied to a module spec.
        Can be read and exposes the resource reader children.
        c� �||_||_yr
)�_spec�_reader)rr
�readers   rrz$CompatibilityFiles.SpecPath.__init__6s���D�J�!�D�Lrc����jstd�St�fd��jj�D��S)Nrc3�^�K�|]$}tj�j|����&y�wr
)r%�	ChildPathr7)�.0�pathrs  �r�	<genexpr>z6CompatibilityFiles.SpecPath.iterdir.<locals>.<genexpr>=s*������3�D�#�,�,�T�\�\�4�@�3�s�*-)r7�iter�contents�rs`r�iterdirz#CompatibilityFiles.SpecPath.iterdir:s:����<�<��B�x���� �L�L�1�1�3���
rc��y�NFrrAs r�is_filez#CompatibilityFiles.SpecPath.is_fileB���rc��|jstj|�Stj|j|�Sr
)r7r%�
OrphanPathr;�r�others  r�joinpathz$CompatibilityFiles.SpecPath.joinpathGs1���<�<�)�4�4�U�;�;�%�/�/����e�D�Drc�.�|jjSr
)r6rrAs rrz CompatibilityFiles.SpecPath.nameLs���:�:�?�?�"rc�T�t|jjd�|g|��i|��Sr
)r1r7�
open_resource�rr.r/r0s    r�openz CompatibilityFiles.SpecPath.openPs)���t�|�|�9�9�$�?��W��W�PV�W�WrN�r)�rrrrrrBrE�is_dirrK�propertyrrPrrr�SpecPathr40s=��	�
	"�	�	���	E�

�	#�
�	#�	XrrUc�F�eZdZdZd�Zd�Zd�Zd�Zd�Ze	d��Z
d
d�Zy	)�CompatibilityFiles.ChildPathzw
        Path tied to a resource reader child.
        Can be read but doesn't expose any meaningful children.
        c� �||_||_yr
)r7�_name)rr8rs   rrz%CompatibilityFiles.ChildPath.__init__Ys��!�D�L��D�Jrc��td�S�Nr�r?rAs rrBz$CompatibilityFiles.ChildPath.iterdir]�����8�Orc�L�|jj|j�Sr
)r7�is_resourcerrAs rrEz$CompatibilityFiles.ChildPath.is_file`s���<�<�+�+�D�I�I�6�6rc�$�|j�Sr
)rErAs rrSz#CompatibilityFiles.ChildPath.is_dircs���|�|�~�%�%rc�B�tj|j|�Sr
)r%rHrrIs  rrKz%CompatibilityFiles.ChildPath.joinpathfs��%�0�0����E�B�Brc��|jSr
)rYrAs rrz!CompatibilityFiles.ChildPath.nameis���:�:�rc�h�t|jj|j�|g|��i|��Sr
)r1r7rNrrOs    rrPz!CompatibilityFiles.ChildPath.openms7������*�*�4�9�9�5�t��>B��FL��
rNrQrRrrrr;rWSs:��	�
	�	�	7�	&�	C�
�	�
�	�	rr;c�D�eZdZdZd�Zd�Zd�ZeZd�Ze	d��Z
d	d�Zy)
�CompatibilityFiles.OrphanPathz�
        Orphan path, not tied to a module spec or resource reader.
        Can't be read and doesn't expose any meaningful children.
        c�D�t|�dkrtd��||_y)Nrz/Need at least one path part to construct a path)�lenr+�_path)r�
path_partss  rrz&CompatibilityFiles.OrphanPath.__init__xs!���:���"� �!R�S�S�#�D�Jrc��td�Sr[r\rAs rrBz%CompatibilityFiles.OrphanPath.iterdir}r]rc��yrDrrAs rrEz%CompatibilityFiles.OrphanPath.is_file�rFrc�D�tjg|j�|���Sr
)r%rHrhrIs  rrKz&CompatibilityFiles.OrphanPath.joinpath�s��%�0�0�D�$�*�*�D�e�D�Drc� �|jdS)N���)rhrAs rrz"CompatibilityFiles.OrphanPath.name�s���:�:�b�>�!rc��td��)NzCan't open orphan path)�FileNotFoundErrorrOs    rrPz"CompatibilityFiles.OrphanPath.open�s��#�$<�=�=rNrQrRrrrrHrers<��	�
	$�
	�	���	E�
�	"�
�	"�	>rrHc��||_yr
rr"s  rrzCompatibilityFiles.__init__�r#rc��tt�5|jjj	|jj
�cddd�S#1swYyxYwr
)r�AttributeErrorr
rr'rrAs rr7zCompatibilityFiles._reader�s6��
�n�
%��9�9�#�#�7�7��	�	���G�&�
%�
%�s�9A�Ac�:�|j}t|d�r|S|S)zB
        Return the native reader if it supports files().
        �files)r7�hasattr)rr8s  rr&zCompatibilityFiles._native�s!������ ���1�v�;�t�;rc�.�t|j|�Sr
)rr7)r�attrs  rrzCompatibilityFiles.__getattr__�s���t�|�|�T�*�*rc�V�tj|j|j�Sr
)r%rUr
r7rAs rruzCompatibilityFiles.files�s��!�*�*�4�9�9�d�l�l�C�CrN)rrrrr�TraversablerUr;rHrrTr7r&rrurrrr%r%*se���
!X�3�?�?�!X�F�C�O�O��>>�S�_�_�>�:��H��H�<�+�Drr%c�6�t|jt�S)z`
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.
    )r�__spec__r )�packages r�	wrap_specr~�s��
�W�-�-�/I�J�JrNrQ)�
contextlibr�ior�rrr r1r%r~rrr�<module>r�s<�����
(�
(�	7�	7��xD�xD�vKrpython3.12/site-packages/setuptools/_vendor/importlib_resources/__pycache__/simple.cpython-312.pyc000064400000012703151732704120027272 0ustar00�

��_i
���dZddlZddlZddlZddlmZmZddlmZmZGd�dej�Z
Gd�d	e�ZGd
�de�ZGd�d
ee
�Z
y)z+
Interface adapters for low-level readers.
�N)�BinaryIO�List�)�Traversable�TraversableResourcesc���eZdZdZeejdefd���Zejde	dfd��Z
ejde	efd��Zejdedefd��Z
ed��Zy	)
�SimpleReaderzQ
    The minimum, low-level interface required from a resource
    provider.
    �returnc��y)zP
        The name of the package for which this reader loads resources.
        N���selfs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/simple.py�packagezSimpleReader.package���c��y)zo
        Obtain an iterable of SimpleReader for available
        child containers (e.g. directories).
        Nrr
s r�childrenzSimpleReader.childrenrrc��y)zL
        Obtain available named resources for this virtual package.
        Nrr
s r�	resourceszSimpleReader.resources!rr�resourcec��y)z:
        Obtain a File-like for a named resource.
        Nr)rrs  r�open_binaryzSimpleReader.open_binary'rrc�>�|jjd�dS)N�.���)r�splitr
s r�namezSimpleReader.name-s���|�|�!�!�#�&�r�*�*rN)�__name__�
__module__�__qualname__�__doc__�property�abc�abstractmethod�strrrrrrrrrrrr	r	
s����
����������
	����$�~�.����	����4��9����
	����C��H����
�+��+rr	c�4�eZdZdZdefd�Zd�Zd�Zd�Zd�Z	y)	�ResourceContainerzI
    Traversable container for a package's resources via its reader.
    �readerc��||_y�N)r))rr)s  r�__init__zResourceContainer.__init__7s	����rc��y�NTrr
s r�is_dirzResourceContainer.is_dir:���rc��y�NFrr
s r�is_filezResourceContainer.is_file=���rc����fd��jjD�}tt�jj	��}tj||�S)Nc3�6�K�|]}t�|����y�wr+)�ResourceHandle)�.0rrs  �r�	<genexpr>z,ResourceContainer.iterdir.<locals>.<genexpr>As�����N�8M����d�+�8M�s�)r)r�mapr(r�	itertools�chain)r�files�dirss`  r�iterdirzResourceContainer.iterdir@sB���N����8M�8M�N���$�d�k�k�&:�&:�&<�=�����u�d�+�+rc��t��r+)�IsADirectoryError)r�args�kwargss   r�openzResourceContainer.openEs���!�!rN)
rr r!r"r	r,r/r3r?rDrrrr(r(2s'����|����,�
"rr(c�:�eZdZdZdedefd�Zd�Zd�Zd
d�Z	d�Z
y	)r7z9
    Handle to a named resource in a ResourceReader.
    �parentrc� �||_||_yr+)rFr)rrFrs   rr,zResourceHandle.__init__Ns�������	rc��yr.rr
s rr3zResourceHandle.is_fileRr0rc��yr2rr
s rr/zResourceHandle.is_dirUr4rc��|jjj|j�}d|vrt	j
|i|��}|S)N�b)rFr)rr�io�
TextIOWrapper)r�moderBrC�streams     rrDzResourceHandle.openXsA�����#�#�/�/��	�	�:���d�?��%�%�t�6�v�6�F��
rc��td��)NzCannot traverse into a resource)�RuntimeError)rrs  r�joinpathzResourceHandle.joinpath^s���<�=�=rN)�r)rr r!r"r(r&r,r3r/rDrRrrrr7r7Is/����0�������>rr7c��eZdZdZd�Zy)�TraversableReaderz�
    A TraversableResources based on SimpleReader. Resource providers
    may derive from this class to provide the TraversableResources
    interface by supplying the SimpleReader interface.
    c��t|�Sr+)r(r
s rr=zTraversableReader.filesis
�� ��&�&rN)rr r!r"r=rrrrUrUbs���'rrU)r"r$rLr;�typingrrrr�ABCr	r(r7rUrrr�<module>rYsS����	��!�2�"+�3�7�7�"+�J"��"�.>�[�>�2'�,�l�'rsite-packages/setuptools/_vendor/importlib_resources/__pycache__/_itertools.cpython-312.pyc000064400000002323151732704130030103 0ustar00python3.12�

��_it���ddlmZddlmZmZmZmZmZmZm	Z	ed�Z
ed�Z	d
dee
deee
gefdee
fd	�Zy)�)�filterfalse)�Callable�Iterable�Iterator�Optional�Set�TypeVar�Union�_T�_UN�iterable�key�returnc#��K�t�}|j}|�(t|j|�D]}||�|���y|D]}||�}||vs�||�|���y�w)zHList unique elements, preserving order. Remember all elements ever seen.N)�set�addr�__contains__)r
r�seen�seen_add�element�ks      ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/_itertools.py�unique_everseenrsj���� #�u�D��x�x�H�
�{�"�4�#4�#4�h�?�G��W���M�@� �G��G��A���}�����
�	 �s�AA$�A$)N)
�	itertoolsr�typingrrrrrr	r
rrr��r�<module>rsg��!����
�T�]���T�]��AE���r�l��!)�(�B�4��8�*<�!=��
�b�\�rpython3.12/site-packages/setuptools/_vendor/importlib_resources/__pycache__/abc.cpython-312.pyc000064400000021334151732704130026527 0ustar00�

��_i����ddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZgd�ZGd�dej"��ZGd	�d
e�Ze
Gd�de��ZGd
�de�Zy)�N)�Any�BinaryIO�Iterable�Iterator�NoReturn�Text�Optional�)�runtime_checkable�Protocol�StrPath)�ResourceReader�Traversable�TraversableResourcesc���eZdZdZej
dedefd��Zej
dedefd��Z	ej
dede
fd��Zej
dee
fd��Zy	)
rzDAbstract base class for loaders to provide resource reading support.�resource�returnc��t�)z�Return an opened, file-like object for binary reading.

        The 'resource' argument is expected to represent only a file name.
        If the resource cannot be found, FileNotFoundError is raised.
        ��FileNotFoundError��selfrs  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/abc.py�
open_resourcezResourceReader.open_resources
�� ��c��t�)z�Return the file system path to the specified resource.

        The 'resource' argument is expected to represent only a file name.
        If the resource does not exist on the file system, raise
        FileNotFoundError.
        rrs  r�
resource_pathzResourceReader.resource_paths
�� �r�pathc��t�)zjReturn True if the named 'path' is a resource.

        Files are resources, directories are not.
        r�rrs  r�is_resourcezResourceReader.is_resource)s
�� �rc��t�)z+Return an iterable of entries in `package`.r�rs r�contentszResourceReader.contents1s
�� �rN)�__name__�
__module__�__qualname__�__doc__�abc�abstractmethodrrrr�boolr!r�strr$�rrrr
s���N����	 �d�	 �x�	 ��	 �	���
 �d�
 �t�
 ��
 �	��� �� �� �� �	��� �(�3�-� �� rr)�	metaclassc��eZdZy)�TraversalErrorN)r%r&r'r-rrr0r07s��rr0c�2�eZdZdZej
dedfd��Zdefd�Z	dde
edefd�Zej
de
fd��Zej
de
fd	��Zd
eddfd�Zdeddfd
�Zej
dd��Zeej
defd���Zy)rz�
    An object with a subset of pathlib.Path methods suitable for
    traversing directories and opening files.

    Any exceptions that occur when accessing the backing resource
    may propagate unaltered.
    rc��y)z3
        Yield Traversable objects in self
        Nr-r#s r�iterdirzTraversable.iterdirE��rc�p�|jd�5}|j�cddd�S#1swYyxYw)z0
        Read contents of self as bytes
        �rbN��open�read)r�strms  r�
read_byteszTraversable.read_bytesKs$���Y�Y�t�_���9�9�;��_�_�s�,�5N�encodingc�r�|j|��5}|j�cddd�S#1swYyxYw)z/
        Read contents of self as text
        )r<Nr7)rr<r:s   r�	read_textzTraversable.read_textRs)���Y�Y��Y�
)�T��9�9�;�*�
)�
)�s�-�6c��y)z4
        Return True if self is a directory
        Nr-r#s r�is_dirzTraversable.is_dirYr4rc��y)z/
        Return True if self is a file
        Nr-r#s r�is_filezTraversable.is_file_r4r�descendantsc�L��|s|Stjjd�ttj
|�D��}t
|���fd�|j�D�}	t
|�}|j|�S#t$rtd�t|���wxYw)z�
        Return Traversable resolved with any descendants applied.

        Each descendant should be a path segment relative to self
        and each may contain multiple levels separated by
        ``posixpath.sep`` (``/``).
        c3�4K�|]}|j���y�w�N)�parts)�.0rs  r�	<genexpr>z'Traversable.joinpath.<locals>.<genexpr>os����.
�#J�4�D�J�J�#J���c3�B�K�|]}|j�k(s�|���y�wrF��name)rH�traversable�targets  �rrIz'Traversable.joinpath.<locals>.<genexpr>ss#�����
�+9�K�[�=M�=M�QW�=W�K�>�s��z"Target not found during traversal.)�	itertools�chain�
from_iterable�map�pathlib�
PurePosixPath�nextr3�
StopIterationr0�list�joinpath)rrC�names�matches�matchrOs     @rrYzTraversable.joinpathes������K����-�-�.
�#&�w�'<�'<�k�#J�.
�
���e���
�+/�<�<�>�
��	���M�E�
�u�~�~�u�%�%��	�	� �4�f�d�5�k��
�	�s�)B� B#�childc�$�|j|�S)z2
        Return Traversable child in self
        )rY)rr]s  r�__truediv__zTraversable.__truediv__~s���}�}�U�#�#rc��y)z�
        mode may be 'r' or 'rb' to open as text or binary. Return a handle
        suitable for reading (same as pathlib.Path.open).

        When opening as text, accepts encoding parameters such as those
        accepted by io.TextIOWrapper.
        Nr-)r�mode�args�kwargss    rr8zTraversable.open�r4rc��y)zM
        The base name of this object without any parent references.
        Nr-r#s rrMzTraversable.name�r4rrF)�r)r%r&r'r(r)r*rr3�bytesr;r	r,r>r+r@rBr
rYr_r8�propertyrMr-rrrr;s����	�����-�0����
�E���(�3�-��3��	��������
	��������
&�W�&��&�2$��$�]�$�	�����������c����rrc��eZdZdZej
dd��Zdedejfd�Z
dedefd�Z
dedefd�Zdeefd	�Zy
)rzI
    The required interface for providing traversable
    resources.
    rc��y)z3Return a Traversable object for the loaded package.Nr-r#s r�fileszTraversableResources.files�r4rrc�^�|j�j|�jd�S)Nr6)rjrYr8rs  rrz"TraversableResources.open_resource�s$���z�z�|�$�$�X�.�3�3�D�9�9rc��t|��rFrrs  rrz"TraversableResources.resource_path�s
����)�)rrc�\�|j�j|�j�SrF)rjrYrBr s  rr!z TraversableResources.is_resource�s"���z�z�|�$�$�T�*�2�2�4�4rc�L�d�|j�j�D�S)Nc3�4K�|]}|j���y�wrFrL)rH�items  rrIz0TraversableResources.contents.<locals>.<genexpr>�s����=�&<�d��	�	�&<�rJ)rjr3r#s rr$zTraversableResources.contents�s��=�d�j�j�l�&:�&:�&<�=�=rN)rr)r%r&r'r(r)r*rjr
�io�BufferedReaderrrrrr+r!rr,r$r-rrrr�sr���
	���B��B�:�g�:�"�2C�2C�:�*�c�*�h�*�5��5�D�5�>�(�3�-�>rr)r)rqrPrT�typingrrrrrrr	�_compatrrr
�__all__�ABCMetar�	Exceptionr0rrr-rr�<module>rxsp��
�	���N�N�N�9�9�D��' �s�{�{�' �T	�Y�	��W�(�W��W�t>�>�>rpython3.12/site-packages/setuptools/_vendor/importlib_resources/__pycache__/readers.cpython-312.pyc000064400000017042151732704140027431 0ustar00�

��_i�
����ddlZddlZddlZddlmZddlmZddlmZd�Z	Gd�dej�ZGd	�d
ej�ZGd�dej�ZGd
�dej�Zy)�N�)�abc)�unique_everseen)�ZipPathc�R�ttjj|��S�N)�iter�collections�OrderedDict�fromkeys)�itemss ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/readers.py�remove_duplicatesrs����'�'�0�0��7�8�8�c��eZdZd�Zd�Zd�Zy)�
FileReaderc�`�tj|j�j|_yr)�pathlib�Path�path�parent)�self�loaders  r�__init__zFileReader.__init__s���L�L����-�4�4��	rc�J�t|jj|��S�z{
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        ��strr�joinpath�r�resources  r�
resource_pathzFileReader.resource_path����4�9�9�%�%�h�/�0�0rc��|jSr�r�rs r�fileszFileReader.files����y�y�rN��__name__�
__module__�__qualname__rr"r'�rrrrs��5�1�rrc�0��eZdZd�Z�fd�Zd�Zd�Z�xZS)�	ZipReaderc��|jd�\}}}|jjdd�|zdz|_|j|_y)N�.�\�/)�
rpartition�prefix�replace�archive)rr�module�_�names     rrzZipReader.__init__ sE���&�&�s�+�
��1�d��m�m�+�+�D�#�6��=��C����~�~��rc�v��	t�|�|�S#t$r}t|jd��d}~wwxYw�Nr)�super�
open_resource�KeyError�FileNotFoundError�args)rr!�exc�	__class__s   �rr>zZipReader.open_resource%s;���	1��7�(��2�2���	1�#�C�H�H�Q�K�0�0��	1�s��	8�3�8c��|j�j|�}|j�xr|j�Sr)r'r�is_file�exists)rr�targets   r�is_resourcezZipReader.is_resource+s2������&�&�t�,���~�~��3�F�M�M�O�3rc�B�t|j|j�Sr)rr7r5r&s rr'zZipReader.files1s���t�|�|�T�[�[�1�1r)r*r+r,rr>rHr'�
__classcell__�rCs@rr/r/s���&�
1�4�2rr/c�b��eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	�fd�Z
d	�Zed
��Z
d�Z�xZS)�MultiplexedPathz�
    Given a series of Traversable objects, implement a merged
    version of the interface across all objects. Useful for
    namespace packages which may be multihomed at a single
    name.
    c���tttjt	|���|_|j
s
d}t
|��td�|j
D��std��y)Nz.MultiplexedPath must contain at least one pathc3�<K�|]}|j����y�wr)�is_dir��.0rs  r�	<genexpr>z+MultiplexedPath.__init__.<locals>.<genexpr>Bs����9�[�T�4�;�;�=�[�s�z)MultiplexedPath only supports directories)	�list�maprrr�_pathsr@�all�NotADirectoryError)r�paths�messages   rrzMultiplexedPath.__init__=sY���3�w�|�|�->�u�-E�F�G����{�{�F�G�#�G�,�,��9�T�[�[�9�9�$�%P�Q�Q�:rc�h�d�|jD�}t|tjd���S)Nc3�JK�|]}|j�D]}|����y�wr)�iterdir)rRr�files   rrSz*MultiplexedPath.iterdir.<locals>.<genexpr>Fs����I�+�$�$�,�,�.�$��.��+�s�!#r:)�key)rVr�operator�
attrgetter)rr's  rr]zMultiplexedPath.iterdirEs(��I�$�+�+�I���u�(�*=�*=�f�*E�F�Frc��t|�d����Nz is not a file�r@r&s r�
read_byteszMultiplexedPath.read_bytesI����4�&�� 7�8�8rc��t|�d���rcrd�rrA�kwargss   r�	read_textzMultiplexedPath.read_textLrfrc��y)NTr-r&s rrPzMultiplexedPath.is_dirOs��rc��y)NFr-r&s rrEzMultiplexedPath.is_fileRs��rc���	t�|�|�S#tj$r|jdj|�cYSwxYwr<)r=rr�TraversalErrorrV)r�descendantsrCs  �rrzMultiplexedPath.joinpathUsJ���	9��7�#�[�1�1���!�!�	9�+�4�;�;�q�>�*�*�K�8�8�	9�s��/A�Ac��t|�d���rcrdrhs   r�openzMultiplexedPath.open]rfrc�4�|jdjSr<)rVr:r&s rr:zMultiplexedPath.name`s���{�{�1�~�"�"�"rc�R�djd�|jD��}d|�d�S)Nz, c3�(K�|]
}d|�d����y�w)�'Nr-rQs  rrSz+MultiplexedPath.__repr__.<locals>.<genexpr>es����>�+�$�A�d�V�1�+�+�s�zMultiplexedPath(�))�joinrV)rrYs  r�__repr__zMultiplexedPath.__repr__ds)���	�	�>�$�+�+�>�>��!�%���*�*r)r*r+r,�__doc__rr]rerjrPrErrq�propertyr:rxrJrKs@rrMrM5sK����R�G�9�9���9�9��#��#�+rrMc��eZdZd�Zd�Zd�Zy)�NamespaceReaderc�`�dt|�vrtd��tt|��|_y)N�
NamespacePathzInvalid path)r�
ValueErrorrMrTr)r�namespace_paths  rrzNamespaceReader.__init__js+���#�n�"5�5��^�,�,�#�T�.�%9�:��	rc�J�t|jj|��Srrr s  rr"zNamespaceReader.resource_pathor#rc��|jSrr%r&s rr'zNamespaceReader.fileswr(rNr)r-rrr|r|is��;�
1�rr|)r
rr`�r�
_itertoolsr�_compatrr�TraversableResourcesrr/�TraversablerMr|r-rr�<module>r�sc������'��9�
��)�)�
� 2��(�(�2�,1+�c�o�o�1+�h�c�.�.�rpython3.12/site-packages/setuptools/_vendor/importlib_resources/__pycache__/_legacy.cpython-312.pyc000064400000013341151732704140027405 0ustar00�

��_i�
���ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZddlm
Z
eejefZeZd�Zdedefd�Zed	ed
ede	fd��Zed	ed
edefd��Ze		dd	ed
ed
edede
f
d��Ze		dd	ed
ed
ededef
d��Zed	edeefd��Zed	ededefd��Zed	ed
edeej8fd��Zy)�N)�Union�Iterable�ContextManager�BinaryIO�TextIO�Any�)�_commonc�B��tj���fd��}|S)Nc�f��tj�j�d�td���|i|��S)Nz� is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.�)�
stacklevel)�warnings�warn�__name__�DeprecationWarning)�args�kwargs�funcs  ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/_legacy.py�wrapperzdeprecated.<locals>.wrappers>����
�
��}�}�o�P�
P�
��	
��T�$�V�$�$�)�	functools�wraps)rrs` r�
deprecatedrs%����_�_�T��%��%��Nr�path�returnc��t|�}tjj|�\}}|rt	|�d���|S)z�Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    z must be only a file name)�str�osr�split�
ValueError)r�str_path�parent�	file_names    r�normalize_pathr&s@��
�4�y�H����
�
�h�/��F�I�
��D�8�#<�=�>�>��r�package�resourcec�b�tj|�t|�zjd�S)zDReturn a file-like object opened for binary reading of the resource.�rb�r
�filesr&�open�r'r(s  r�open_binaryr/*s(��
�M�M�'�"�^�H�%=�=�C�C�D�I�Irc�`�tj|�t|�zj�S)z+Return the binary contents of the resource.)r
r,r&�
read_bytesr.s  r�read_binaryr20s&��
�M�M�'�"�^�H�%=�=�I�I�K�Kr�encoding�errorsc�h�tj|�t|�zjd||��S)zBReturn a file-like object opened for text reading of the resource.�r)r3r4r+)r'r(r3r4s    r�	open_textr76s7��
�M�M�'�"�^�H�%=�=�C�C��h�v�D��rc�j�t||||�5}|j�cddd�S#1swYyxYw)z�Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    N)r7�read)r'r(r3r4�fps     r�	read_textr;Cs)��
�7�H�h��	7�2��w�w�y�
8�	7�	7�s�)�2c��tj|�j�D�cgc]}|j��c}Scc}w)z�Return an iterable of entries in `package`.

    Note that not all entries are resources.  Specifically, directories are
    not considered resources.  Use `is_resource()` on each entry returned here
    to check if it is a resource or not.
    )r
r,�iterdir�name)r'rs  r�contentsr?Ss4��#*�-�-��"8�"@�"@�"B�C�"B�$�D�I�I�"B�C�C��Cs�<r>c���t|��t�fd�tj|�j	�D��S)zYTrue if `name` is a resource inside `package`.

    Directories are *not* resources.
    c3�`�K�|]%}|j�k(xr|j����'y�w)N)r>�is_file)�.0�traversabler(s  �r�	<genexpr>zis_resource.<locals>.<genexpr>es5������;�K�	���H�$�>��)<�)<�)>�>�;�s�+.)r&�anyr
r,r=)r'r>r(s  @r�is_resourcerG^s;����d�#�H���"�=�=��1�9�9�;���rc�j�tjtj|�t|�z�S)akA context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    )r
�as_filer,r&r.s  rrrks&���?�?�7�=�=��1�N�8�4L�L�M�Mr)zutf-8�strict)rr �pathlib�typesr�typingrrrrrr�r
�
ModuleTyper�Package�Resourcerr&r/�bytesr2r7r;r?�boolrG�Pathr�rr�<module>rVs����	����I�I��
�� � �#�%�
&�����	��	��	��J��J�H�J��J��J�
�L��L�H�L��L��L�
���		�
�	��	��	�
�		�
�	��	����	�
������
�	�
	�����D�g�D�(�3�-�D��D��	��	��	��	��	��N�
�N��N��G�L�L�!�N��Nrpython3.12/site-packages/setuptools/_vendor/importlib_resources/__pycache__/_common.cpython-312.pyc000064400000021130151732704140027424 0ustar00�

��_iQ��2�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZm
Z
ddlmZmZddlmZeej&efZeZd�Zeddeedefd	��Zd
ej&deefd�Zej4deedej&fd
��Zej8dedej&fd��Zej8dddej&fd��Zd�Zd
ej&fd�Zej@	dejBd�d��Z"d�Z#dede$fd�Z%ej4d��Z&e&j9ejN�ej@d���Zej@dejPfd��Z)ej@d��Z*d�Z+y)�N)�Union�Optional�cast�)�ResourceReader�Traversable)�	wrap_specc�`���t��tj����f��fd�	�}|S)a
    Replace 'package' parameter as 'anchor' and warn about the change.

    Other errors should fall through.

    >>> files('a', 'b')
    Traceback (most recent call last):
    TypeError: files() takes from 0 to 1 positional arguments but 2 were given
    c���|�ur1|�ur	�||�Stjdtd���|�S|�ur��S�|�S)Nz/First parameter to files is renamed to 'anchor'�)�
stacklevel)�warnings�warn�DeprecationWarning)�anchor�package�func�	undefineds  ����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_vendor/importlib_resources/_common.py�wrapperz"package_to_anchor.<locals>.wrapper!sZ����)�#��Y�&��F�G�,�,��M�M�A�"��
�
��=� �
�y�
 ��6�M��F�|��)�object�	functools�wraps)rrrs` @r�package_to_anchorrs3�����I��_�_�T�� �)�����Nrr�returnc�*�tt|��S)z3
    Get a Traversable resource for an anchor.
    )�from_package�resolve)rs r�filesr 3s��
����(�(rrc�r�|j}t|jdd�}|�y||j�S)z?
    Return the package's loader if it's a ResourceReader.
    �get_resource_readerN)�__spec__�getattr�loader�name�r�spec�readers   rr"r";s9�����D�
�T�[�[�"7��
>�F�
�~���$�)�)��r�candc�6�ttj|�S�N)r�types�
ModuleType�r*s rrrKs���� � �$�'�'rc�,�tj|�Sr,)�	importlib�
import_moduler/s r�_r3Ps���"�"�4�(�(rc�B�tt�jd�S)N�__name__)r�
_infer_caller�	f_globalsr/s rr3r3Us���=�?�,�,�Z�8�9�9rc��d�}d�}tj|tj��}tj||�}t	|�j
S)zS
    Walk the stack and find the frame of the first caller not in this module.
    c�(�|jtk(Sr,)�filename�__file__��
frame_infos r�is_this_filez#_infer_caller.<locals>.is_this_file_s���"�"�h�.�.rc� �|jdk(S)Nr)�functionr<s r�
is_wrapperz!_infer_caller.<locals>.is_wrapperbs���"�"�i�/�/r)�	itertools�filterfalse�inspect�stack�next�frame)r>rA�
not_this_file�callerss    rr6r6ZsH��
/�0��)�)�,��
�
��H�M��#�#�J�
�>�G���=���rc��t|�}|jj|j�}|j	�S)z=
    Return a Traversable object for the given package.

    )r	r%r"r&r r's   rrrks2��
�W��D�
�[�[�
,�
,�T�Y�Y�
7�F��<�<�>�r)�
_os_removec#�pK�tj|��\}}		tj||��tj|�~tj|���	||�y#tj|�wxYw#t$rYywxYw#	||�w#t$rYwwxYwxYw�w�N)�suffix)�tempfile�mkstemp�os�write�close�pathlib�Path�FileNotFoundError)r)rNrK�fd�raw_paths     r�	_tempfilerYus������#�#�6�2�L�B���	��H�H�R���"��H�H�R�L���l�l�8�$�$�	��x� ��
�H�H�R�L��!�	��	��	��x� �� �	��	�so�B6�A0�-B�'B
�/B6�0B�B�
	B�B6�B�B6�B3�B$�#B3�$	B0�-B3�/B0�0B3�3B6c�D�t|j|j��SrM)rY�
read_bytesr&��paths r�
_temp_filer^�s���T�_�_�T�Y�Y�7�7rr]c��tjt�5|j�cddd�S#1swYyxYw)a
    Some Traversables implement ``is_dir()`` to raise an
    exception (i.e. ``FileNotFoundError``) when the
    directory doesn't exist. This function wraps that call
    to always return a boolean and only return True
    if there's a dir and it exists.
    NF)�
contextlib�suppressrV�is_dirr\s r�_is_present_dirrc�s+��
�	�	�.�	/��{�{�}�
0�	/�	/��s�4�=c�D�t|�rt|�St|�S)zu
    Given a Traversable object, return that object as a
    path on the local file system in a context manager.
    )rc�	_temp_dirr^r\s r�as_filerf�s��.�d�3�9�T�?�I��D�9I�Irc#�K�|��y�w)z7
    Degenerate behavior for pathlib.Path objects.
    N�r\s rr3r3�s
�����J�s��dirc#�hK�|5}tj|���ddd�y#1swYyxYw�w)zD
    Wrap tempfile.TemporyDirectory to return a pathlib object.
    N)rTrU)ri�results  r�
_temp_pathrl�s%����


���l�l�6�"�"�

���s�2�&�	2�/�2c#�K�|j�sJ�ttj��5}t	||���ddd�y#1swYyxYw�w)zt
    Given a traversable dir, recursively replicate the whole tree
    to the file system in a context manager.
    N)rbrlrO�TemporaryDirectory�_write_contents)r]�temp_dirs  rrere�sA�����;�;�=��=�	�H�/�/�1�	2�h��h��-�-�
3�	2�	2�s�0A�A
�	A�
A�Ac��|j|j�}|j�r3|j�|j	�D]}t||��|S|j
|j��|Sr,)�joinpathr&rb�mkdir�iterdirro�write_bytesr[)�target�source�child�items    rroro�sf���O�O�F�K�K�(�E�
�}�}��
���
��N�N�$�D��E�4�(�%��L�	���&�+�+�-�.��Lrr,)�),rQrTrOrr`r-r1rDrrB�typingrrr�abcrr�_compatr	r.�str�Package�Anchorrr r"�singledispatchr�registerr3r6r�contextmanager�removerYr^�boolrcrfrUrnrlrerorhrr�<module>r�s��	����������(�(�,��
�� � �#�%�
&��	���<�)�(�6�"�)�k�)��)�
��!1�!1�
�h�~�6N�
� ���(�(�6�"�(�u�'7�'7�(��(�	���)�C�)�E�$�$�)��)�	���:�D�:�U�%�%�:��:��"�%�*�*��������y�y�
���48�
�+�
�$�
����J��J�	���'�,�,������� �����#�H�/�/�#��#����.��.�rpython3.12/site-packages/setuptools/_vendor/importlib_resources/_compat.py000064400000005555151732704150023074 0ustar00# flake8: noqa

import abc
import os
import sys
import pathlib
from contextlib import suppress
from typing import Union


if sys.version_info >= (3, 10):
    from zipfile import Path as ZipPath  # type: ignore
else:
    from ..zipp import Path as ZipPath  # type: ignore


try:
    from typing import runtime_checkable  # type: ignore
except ImportError:

    def runtime_checkable(cls):  # type: ignore
        return cls


try:
    from typing import Protocol  # type: ignore
except ImportError:
    Protocol = abc.ABC  # type: ignore


class TraversableResourcesLoader:
    """
    Adapt loaders to provide TraversableResources and other
    compatibility.

    Used primarily for Python 3.9 and earlier where the native
    loaders do not yet implement TraversableResources.
    """

    def __init__(self, spec):
        self.spec = spec

    @property
    def path(self):
        return self.spec.origin

    def get_resource_reader(self, name):
        from . import readers, _adapters

        def _zip_reader(spec):
            with suppress(AttributeError):
                return readers.ZipReader(spec.loader, spec.name)

        def _namespace_reader(spec):
            with suppress(AttributeError, ValueError):
                return readers.NamespaceReader(spec.submodule_search_locations)

        def _available_reader(spec):
            with suppress(AttributeError):
                return spec.loader.get_resource_reader(spec.name)

        def _native_reader(spec):
            reader = _available_reader(spec)
            return reader if hasattr(reader, 'files') else None

        def _file_reader(spec):
            try:
                path = pathlib.Path(self.path)
            except TypeError:
                return None
            if path.exists():
                return readers.FileReader(self)

        return (
            # native reader if it supplies 'files'
            _native_reader(self.spec)
            or
            # local ZipReader if a zip module
            _zip_reader(self.spec)
            or
            # local NamespaceReader if a namespace module
            _namespace_reader(self.spec)
            or
            # local FileReader
            _file_reader(self.spec)
            # fallback - adapt the spec ResourceReader to TraversableReader
            or _adapters.CompatibilityFiles(self.spec)
        )


def wrap_spec(package):
    """
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.

    Supersedes _adapters.wrap_spec to use TraversableResourcesLoader
    from above for older Python compatibility (<3.10).
    """
    from . import _adapters

    return _adapters.SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader)


if sys.version_info >= (3, 9):
    StrPath = Union[str, os.PathLike[str]]
else:
    # PathLike is only subscriptable at runtime in 3.9+
    StrPath = Union[str, "os.PathLike[str]"]
python3.12/site-packages/setuptools/_vendor/importlib_resources/_adapters.py000064400000010630151732704150023402 0ustar00from contextlib import suppress
from io import TextIOWrapper

from . import abc


class SpecLoaderAdapter:
    """
    Adapt a package spec to adapt the underlying loader.
    """

    def __init__(self, spec, adapter=lambda spec: spec.loader):
        self.spec = spec
        self.loader = adapter(spec)

    def __getattr__(self, name):
        return getattr(self.spec, name)


class TraversableResourcesLoader:
    """
    Adapt a loader to provide TraversableResources.
    """

    def __init__(self, spec):
        self.spec = spec

    def get_resource_reader(self, name):
        return CompatibilityFiles(self.spec)._native()


def _io_wrapper(file, mode='r', *args, **kwargs):
    if mode == 'r':
        return TextIOWrapper(file, *args, **kwargs)
    elif mode == 'rb':
        return file
    raise ValueError(
        "Invalid mode value '{}', only 'r' and 'rb' are supported".format(mode)
    )


class CompatibilityFiles:
    """
    Adapter for an existing or non-existent resource reader
    to provide a compatibility .files().
    """

    class SpecPath(abc.Traversable):
        """
        Path tied to a module spec.
        Can be read and exposes the resource reader children.
        """

        def __init__(self, spec, reader):
            self._spec = spec
            self._reader = reader

        def iterdir(self):
            if not self._reader:
                return iter(())
            return iter(
                CompatibilityFiles.ChildPath(self._reader, path)
                for path in self._reader.contents()
            )

        def is_file(self):
            return False

        is_dir = is_file

        def joinpath(self, other):
            if not self._reader:
                return CompatibilityFiles.OrphanPath(other)
            return CompatibilityFiles.ChildPath(self._reader, other)

        @property
        def name(self):
            return self._spec.name

        def open(self, mode='r', *args, **kwargs):
            return _io_wrapper(self._reader.open_resource(None), mode, *args, **kwargs)

    class ChildPath(abc.Traversable):
        """
        Path tied to a resource reader child.
        Can be read but doesn't expose any meaningful children.
        """

        def __init__(self, reader, name):
            self._reader = reader
            self._name = name

        def iterdir(self):
            return iter(())

        def is_file(self):
            return self._reader.is_resource(self.name)

        def is_dir(self):
            return not self.is_file()

        def joinpath(self, other):
            return CompatibilityFiles.OrphanPath(self.name, other)

        @property
        def name(self):
            return self._name

        def open(self, mode='r', *args, **kwargs):
            return _io_wrapper(
                self._reader.open_resource(self.name), mode, *args, **kwargs
            )

    class OrphanPath(abc.Traversable):
        """
        Orphan path, not tied to a module spec or resource reader.
        Can't be read and doesn't expose any meaningful children.
        """

        def __init__(self, *path_parts):
            if len(path_parts) < 1:
                raise ValueError('Need at least one path part to construct a path')
            self._path = path_parts

        def iterdir(self):
            return iter(())

        def is_file(self):
            return False

        is_dir = is_file

        def joinpath(self, other):
            return CompatibilityFiles.OrphanPath(*self._path, other)

        @property
        def name(self):
            return self._path[-1]

        def open(self, mode='r', *args, **kwargs):
            raise FileNotFoundError("Can't open orphan path")

    def __init__(self, spec):
        self.spec = spec

    @property
    def _reader(self):
        with suppress(AttributeError):
            return self.spec.loader.get_resource_reader(self.spec.name)

    def _native(self):
        """
        Return the native reader if it supports files().
        """
        reader = self._reader
        return reader if hasattr(reader, 'files') else self

    def __getattr__(self, attr):
        return getattr(self._reader, attr)

    def files(self):
        return CompatibilityFiles.SpecPath(self.spec, self._reader)


def wrap_spec(package):
    """
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.
    """
    return SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader)
python3.12/site-packages/setuptools/_vendor/importlib_resources/__init__.py000064400000000772151732704150023205 0ustar00"""Read resources contained within a package."""

from ._common import (
    as_file,
    files,
    Package,
)

from ._legacy import (
    contents,
    open_binary,
    read_binary,
    open_text,
    read_text,
    is_resource,
    path,
    Resource,
)

from .abc import ResourceReader


__all__ = [
    'Package',
    'Resource',
    'ResourceReader',
    'as_file',
    'contents',
    'files',
    'is_resource',
    'open_binary',
    'open_text',
    'path',
    'read_binary',
    'read_text',
]
python3.12/site-packages/setuptools/_vendor/importlib_resources/py.typed000064400000000000151732704150022553 0ustar00python3.12/site-packages/setuptools/_vendor/importlib_resources/_legacy.py000064400000006631151732704150023051 0ustar00import functools
import os
import pathlib
import types
import warnings

from typing import Union, Iterable, ContextManager, BinaryIO, TextIO, Any

from . import _common

Package = Union[types.ModuleType, str]
Resource = str


def deprecated(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
        return func(*args, **kwargs)

    return wrapper


def normalize_path(path: Any) -> str:
    """Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    """
    str_path = str(path)
    parent, file_name = os.path.split(str_path)
    if parent:
        raise ValueError(f'{path!r} must be only a file name')
    return file_name


@deprecated
def open_binary(package: Package, resource: Resource) -> BinaryIO:
    """Return a file-like object opened for binary reading of the resource."""
    return (_common.files(package) / normalize_path(resource)).open('rb')


@deprecated
def read_binary(package: Package, resource: Resource) -> bytes:
    """Return the binary contents of the resource."""
    return (_common.files(package) / normalize_path(resource)).read_bytes()


@deprecated
def open_text(
    package: Package,
    resource: Resource,
    encoding: str = 'utf-8',
    errors: str = 'strict',
) -> TextIO:
    """Return a file-like object opened for text reading of the resource."""
    return (_common.files(package) / normalize_path(resource)).open(
        'r', encoding=encoding, errors=errors
    )


@deprecated
def read_text(
    package: Package,
    resource: Resource,
    encoding: str = 'utf-8',
    errors: str = 'strict',
) -> str:
    """Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    """
    with open_text(package, resource, encoding, errors) as fp:
        return fp.read()


@deprecated
def contents(package: Package) -> Iterable[str]:
    """Return an iterable of entries in `package`.

    Note that not all entries are resources.  Specifically, directories are
    not considered resources.  Use `is_resource()` on each entry returned here
    to check if it is a resource or not.
    """
    return [path.name for path in _common.files(package).iterdir()]


@deprecated
def is_resource(package: Package, name: str) -> bool:
    """True if `name` is a resource inside `package`.

    Directories are *not* resources.
    """
    resource = normalize_path(name)
    return any(
        traversable.name == resource and traversable.is_file()
        for traversable in _common.files(package).iterdir()
    )


@deprecated
def path(
    package: Package,
    resource: Resource,
) -> ContextManager[pathlib.Path]:
    """A context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    """
    return _common.as_file(_common.files(package) / normalize_path(resource))
python3.12/site-packages/setuptools/_vendor/importlib_resources/_common.py000064400000012521151732704150023070 0ustar00import os
import pathlib
import tempfile
import functools
import contextlib
import types
import importlib
import inspect
import warnings
import itertools

from typing import Union, Optional, cast
from .abc import ResourceReader, Traversable

from ._compat import wrap_spec

Package = Union[types.ModuleType, str]
Anchor = Package


def package_to_anchor(func):
    """
    Replace 'package' parameter as 'anchor' and warn about the change.

    Other errors should fall through.

    >>> files('a', 'b')
    Traceback (most recent call last):
    TypeError: files() takes from 0 to 1 positional arguments but 2 were given
    """
    undefined = object()

    @functools.wraps(func)
    def wrapper(anchor=undefined, package=undefined):
        if package is not undefined:
            if anchor is not undefined:
                return func(anchor, package)
            warnings.warn(
                "First parameter to files is renamed to 'anchor'",
                DeprecationWarning,
                stacklevel=2,
            )
            return func(package)
        elif anchor is undefined:
            return func()
        return func(anchor)

    return wrapper


@package_to_anchor
def files(anchor: Optional[Anchor] = None) -> Traversable:
    """
    Get a Traversable resource for an anchor.
    """
    return from_package(resolve(anchor))


def get_resource_reader(package: types.ModuleType) -> Optional[ResourceReader]:
    """
    Return the package's loader if it's a ResourceReader.
    """
    # We can't use
    # a issubclass() check here because apparently abc.'s __subclasscheck__()
    # hook wants to create a weak reference to the object, but
    # zipimport.zipimporter does not support weak references, resulting in a
    # TypeError.  That seems terrible.
    spec = package.__spec__
    reader = getattr(spec.loader, 'get_resource_reader', None)  # type: ignore
    if reader is None:
        return None
    return reader(spec.name)  # type: ignore


@functools.singledispatch
def resolve(cand: Optional[Anchor]) -> types.ModuleType:
    return cast(types.ModuleType, cand)


@resolve.register
def _(cand: str) -> types.ModuleType:
    return importlib.import_module(cand)


@resolve.register
def _(cand: None) -> types.ModuleType:
    return resolve(_infer_caller().f_globals['__name__'])


def _infer_caller():
    """
    Walk the stack and find the frame of the first caller not in this module.
    """

    def is_this_file(frame_info):
        return frame_info.filename == __file__

    def is_wrapper(frame_info):
        return frame_info.function == 'wrapper'

    not_this_file = itertools.filterfalse(is_this_file, inspect.stack())
    # also exclude 'wrapper' due to singledispatch in the call stack
    callers = itertools.filterfalse(is_wrapper, not_this_file)
    return next(callers).frame


def from_package(package: types.ModuleType):
    """
    Return a Traversable object for the given package.

    """
    spec = wrap_spec(package)
    reader = spec.loader.get_resource_reader(spec.name)
    return reader.files()


@contextlib.contextmanager
def _tempfile(
    reader,
    suffix='',
    # gh-93353: Keep a reference to call os.remove() in late Python
    # finalization.
    *,
    _os_remove=os.remove,
):
    # Not using tempfile.NamedTemporaryFile as it leads to deeper 'try'
    # blocks due to the need to close the temporary file to work on Windows
    # properly.
    fd, raw_path = tempfile.mkstemp(suffix=suffix)
    try:
        try:
            os.write(fd, reader())
        finally:
            os.close(fd)
        del reader
        yield pathlib.Path(raw_path)
    finally:
        try:
            _os_remove(raw_path)
        except FileNotFoundError:
            pass


def _temp_file(path):
    return _tempfile(path.read_bytes, suffix=path.name)


def _is_present_dir(path: Traversable) -> bool:
    """
    Some Traversables implement ``is_dir()`` to raise an
    exception (i.e. ``FileNotFoundError``) when the
    directory doesn't exist. This function wraps that call
    to always return a boolean and only return True
    if there's a dir and it exists.
    """
    with contextlib.suppress(FileNotFoundError):
        return path.is_dir()
    return False


@functools.singledispatch
def as_file(path):
    """
    Given a Traversable object, return that object as a
    path on the local file system in a context manager.
    """
    return _temp_dir(path) if _is_present_dir(path) else _temp_file(path)


@as_file.register(pathlib.Path)
@contextlib.contextmanager
def _(path):
    """
    Degenerate behavior for pathlib.Path objects.
    """
    yield path


@contextlib.contextmanager
def _temp_path(dir: tempfile.TemporaryDirectory):
    """
    Wrap tempfile.TemporyDirectory to return a pathlib object.
    """
    with dir as result:
        yield pathlib.Path(result)


@contextlib.contextmanager
def _temp_dir(path):
    """
    Given a traversable dir, recursively replicate the whole tree
    to the file system in a context manager.
    """
    assert path.is_dir()
    with _temp_path(tempfile.TemporaryDirectory()) as temp_dir:
        yield _write_contents(temp_dir, path)


def _write_contents(target, source):
    child = target.joinpath(source.name)
    if source.is_dir():
        child.mkdir()
        for item in source.iterdir():
            _write_contents(child, item)
    else:
        child.write_bytes(source.read_bytes())
    return child
python3.12/site-packages/setuptools/_vendor/importlib_resources/simple.py000064400000005020151732704150022726 0ustar00"""
Interface adapters for low-level readers.
"""

import abc
import io
import itertools
from typing import BinaryIO, List

from .abc import Traversable, TraversableResources


class SimpleReader(abc.ABC):
    """
    The minimum, low-level interface required from a resource
    provider.
    """

    @property
    @abc.abstractmethod
    def package(self) -> str:
        """
        The name of the package for which this reader loads resources.
        """

    @abc.abstractmethod
    def children(self) -> List['SimpleReader']:
        """
        Obtain an iterable of SimpleReader for available
        child containers (e.g. directories).
        """

    @abc.abstractmethod
    def resources(self) -> List[str]:
        """
        Obtain available named resources for this virtual package.
        """

    @abc.abstractmethod
    def open_binary(self, resource: str) -> BinaryIO:
        """
        Obtain a File-like for a named resource.
        """

    @property
    def name(self):
        return self.package.split('.')[-1]


class ResourceContainer(Traversable):
    """
    Traversable container for a package's resources via its reader.
    """

    def __init__(self, reader: SimpleReader):
        self.reader = reader

    def is_dir(self):
        return True

    def is_file(self):
        return False

    def iterdir(self):
        files = (ResourceHandle(self, name) for name in self.reader.resources)
        dirs = map(ResourceContainer, self.reader.children())
        return itertools.chain(files, dirs)

    def open(self, *args, **kwargs):
        raise IsADirectoryError()


class ResourceHandle(Traversable):
    """
    Handle to a named resource in a ResourceReader.
    """

    def __init__(self, parent: ResourceContainer, name: str):
        self.parent = parent
        self.name = name  # type: ignore

    def is_file(self):
        return True

    def is_dir(self):
        return False

    def open(self, mode='r', *args, **kwargs):
        stream = self.parent.reader.open_binary(self.name)
        if 'b' not in mode:
            stream = io.TextIOWrapper(*args, **kwargs)
        return stream

    def joinpath(self, name):
        raise RuntimeError("Cannot traverse into a resource")


class TraversableReader(TraversableResources, SimpleReader):
    """
    A TraversableResources based on SimpleReader. Resource providers
    may derive from this class to provide the TraversableResources
    interface by supplying the SimpleReader interface.
    """

    def files(self):
        return ResourceContainer(self)
python3.12/site-packages/setuptools/_vendor/importlib_resources/abc.py000064400000012024151732704150022164 0ustar00import abc
import io
import itertools
import pathlib
from typing import Any, BinaryIO, Iterable, Iterator, NoReturn, Text, Optional

from ._compat import runtime_checkable, Protocol, StrPath


__all__ = ["ResourceReader", "Traversable", "TraversableResources"]


class ResourceReader(metaclass=abc.ABCMeta):
    """Abstract base class for loaders to provide resource reading support."""

    @abc.abstractmethod
    def open_resource(self, resource: Text) -> BinaryIO:
        """Return an opened, file-like object for binary reading.

        The 'resource' argument is expected to represent only a file name.
        If the resource cannot be found, FileNotFoundError is raised.
        """
        # This deliberately raises FileNotFoundError instead of
        # NotImplementedError so that if this method is accidentally called,
        # it'll still do the right thing.
        raise FileNotFoundError

    @abc.abstractmethod
    def resource_path(self, resource: Text) -> Text:
        """Return the file system path to the specified resource.

        The 'resource' argument is expected to represent only a file name.
        If the resource does not exist on the file system, raise
        FileNotFoundError.
        """
        # This deliberately raises FileNotFoundError instead of
        # NotImplementedError so that if this method is accidentally called,
        # it'll still do the right thing.
        raise FileNotFoundError

    @abc.abstractmethod
    def is_resource(self, path: Text) -> bool:
        """Return True if the named 'path' is a resource.

        Files are resources, directories are not.
        """
        raise FileNotFoundError

    @abc.abstractmethod
    def contents(self) -> Iterable[str]:
        """Return an iterable of entries in `package`."""
        raise FileNotFoundError


class TraversalError(Exception):
    pass


@runtime_checkable
class Traversable(Protocol):
    """
    An object with a subset of pathlib.Path methods suitable for
    traversing directories and opening files.

    Any exceptions that occur when accessing the backing resource
    may propagate unaltered.
    """

    @abc.abstractmethod
    def iterdir(self) -> Iterator["Traversable"]:
        """
        Yield Traversable objects in self
        """

    def read_bytes(self) -> bytes:
        """
        Read contents of self as bytes
        """
        with self.open('rb') as strm:
            return strm.read()

    def read_text(self, encoding: Optional[str] = None) -> str:
        """
        Read contents of self as text
        """
        with self.open(encoding=encoding) as strm:
            return strm.read()

    @abc.abstractmethod
    def is_dir(self) -> bool:
        """
        Return True if self is a directory
        """

    @abc.abstractmethod
    def is_file(self) -> bool:
        """
        Return True if self is a file
        """

    def joinpath(self, *descendants: StrPath) -> "Traversable":
        """
        Return Traversable resolved with any descendants applied.

        Each descendant should be a path segment relative to self
        and each may contain multiple levels separated by
        ``posixpath.sep`` (``/``).
        """
        if not descendants:
            return self
        names = itertools.chain.from_iterable(
            path.parts for path in map(pathlib.PurePosixPath, descendants)
        )
        target = next(names)
        matches = (
            traversable for traversable in self.iterdir() if traversable.name == target
        )
        try:
            match = next(matches)
        except StopIteration:
            raise TraversalError(
                "Target not found during traversal.", target, list(names)
            )
        return match.joinpath(*names)

    def __truediv__(self, child: StrPath) -> "Traversable":
        """
        Return Traversable child in self
        """
        return self.joinpath(child)

    @abc.abstractmethod
    def open(self, mode='r', *args, **kwargs):
        """
        mode may be 'r' or 'rb' to open as text or binary. Return a handle
        suitable for reading (same as pathlib.Path.open).

        When opening as text, accepts encoding parameters such as those
        accepted by io.TextIOWrapper.
        """

    @property
    @abc.abstractmethod
    def name(self) -> str:
        """
        The base name of this object without any parent references.
        """


class TraversableResources(ResourceReader):
    """
    The required interface for providing traversable
    resources.
    """

    @abc.abstractmethod
    def files(self) -> "Traversable":
        """Return a Traversable object for the loaded package."""

    def open_resource(self, resource: StrPath) -> io.BufferedReader:
        return self.files().joinpath(resource).open('rb')

    def resource_path(self, resource: Any) -> NoReturn:
        raise FileNotFoundError(resource)

    def is_resource(self, path: StrPath) -> bool:
        return self.files().joinpath(path).is_file()

    def contents(self) -> Iterator[str]:
        return (item.name for item in self.files().iterdir())
python3.12/site-packages/setuptools/_vendor/ordered_set.py000064400000035432151732704160017654 0ustar00"""
An OrderedSet is a custom MutableSet that remembers its order, so that every
entry has an index that can be looked up.

Based on a recipe originally posted to ActiveState Recipes by Raymond Hettiger,
and released under the MIT license.
"""
import itertools as it
from collections import deque

try:
    # Python 3
    from collections.abc import MutableSet, Sequence
except ImportError:
    # Python 2.7
    from collections import MutableSet, Sequence

SLICE_ALL = slice(None)
__version__ = "3.1"


def is_iterable(obj):
    """
    Are we being asked to look up a list of things, instead of a single thing?
    We check for the `__iter__` attribute so that this can cover types that
    don't have to be known by this module, such as NumPy arrays.

    Strings, however, should be considered as atomic values to look up, not
    iterables. The same goes for tuples, since they are immutable and therefore
    valid entries.

    We don't need to check for the Python 2 `unicode` type, because it doesn't
    have an `__iter__` attribute anyway.
    """
    return (
        hasattr(obj, "__iter__")
        and not isinstance(obj, str)
        and not isinstance(obj, tuple)
    )


class OrderedSet(MutableSet, Sequence):
    """
    An OrderedSet is a custom MutableSet that remembers its order, so that
    every entry has an index that can be looked up.

    Example:
        >>> OrderedSet([1, 1, 2, 3, 2])
        OrderedSet([1, 2, 3])
    """

    def __init__(self, iterable=None):
        self.items = []
        self.map = {}
        if iterable is not None:
            self |= iterable

    def __len__(self):
        """
        Returns the number of unique elements in the ordered set

        Example:
            >>> len(OrderedSet([]))
            0
            >>> len(OrderedSet([1, 2]))
            2
        """
        return len(self.items)

    def __getitem__(self, index):
        """
        Get the item at a given index.

        If `index` is a slice, you will get back that slice of items, as a
        new OrderedSet.

        If `index` is a list or a similar iterable, you'll get a list of
        items corresponding to those indices. This is similar to NumPy's
        "fancy indexing". The result is not an OrderedSet because you may ask
        for duplicate indices, and the number of elements returned should be
        the number of elements asked for.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset[1]
            2
        """
        if isinstance(index, slice) and index == SLICE_ALL:
            return self.copy()
        elif is_iterable(index):
            return [self.items[i] for i in index]
        elif hasattr(index, "__index__") or isinstance(index, slice):
            result = self.items[index]
            if isinstance(result, list):
                return self.__class__(result)
            else:
                return result
        else:
            raise TypeError("Don't know how to index an OrderedSet by %r" % index)

    def copy(self):
        """
        Return a shallow copy of this object.

        Example:
            >>> this = OrderedSet([1, 2, 3])
            >>> other = this.copy()
            >>> this == other
            True
            >>> this is other
            False
        """
        return self.__class__(self)

    def __getstate__(self):
        if len(self) == 0:
            # The state can't be an empty list.
            # We need to return a truthy value, or else __setstate__ won't be run.
            #
            # This could have been done more gracefully by always putting the state
            # in a tuple, but this way is backwards- and forwards- compatible with
            # previous versions of OrderedSet.
            return (None,)
        else:
            return list(self)

    def __setstate__(self, state):
        if state == (None,):
            self.__init__([])
        else:
            self.__init__(state)

    def __contains__(self, key):
        """
        Test if the item is in this ordered set

        Example:
            >>> 1 in OrderedSet([1, 3, 2])
            True
            >>> 5 in OrderedSet([1, 3, 2])
            False
        """
        return key in self.map

    def add(self, key):
        """
        Add `key` as an item to this OrderedSet, then return its index.

        If `key` is already in the OrderedSet, return the index it already
        had.

        Example:
            >>> oset = OrderedSet()
            >>> oset.append(3)
            0
            >>> print(oset)
            OrderedSet([3])
        """
        if key not in self.map:
            self.map[key] = len(self.items)
            self.items.append(key)
        return self.map[key]

    append = add

    def update(self, sequence):
        """
        Update the set with the given iterable sequence, then return the index
        of the last element inserted.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset.update([3, 1, 5, 1, 4])
            4
            >>> print(oset)
            OrderedSet([1, 2, 3, 5, 4])
        """
        item_index = None
        try:
            for item in sequence:
                item_index = self.add(item)
        except TypeError:
            raise ValueError(
                "Argument needs to be an iterable, got %s" % type(sequence)
            )
        return item_index

    def index(self, key):
        """
        Get the index of a given entry, raising an IndexError if it's not
        present.

        `key` can be an iterable of entries that is not a string, in which case
        this returns a list of indices.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset.index(2)
            1
        """
        if is_iterable(key):
            return [self.index(subkey) for subkey in key]
        return self.map[key]

    # Provide some compatibility with pd.Index
    get_loc = index
    get_indexer = index

    def pop(self):
        """
        Remove and return the last element from the set.

        Raises KeyError if the set is empty.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset.pop()
            3
        """
        if not self.items:
            raise KeyError("Set is empty")

        elem = self.items[-1]
        del self.items[-1]
        del self.map[elem]
        return elem

    def discard(self, key):
        """
        Remove an element.  Do not raise an exception if absent.

        The MutableSet mixin uses this to implement the .remove() method, which
        *does* raise an error when asked to remove a non-existent item.

        Example:
            >>> oset = OrderedSet([1, 2, 3])
            >>> oset.discard(2)
            >>> print(oset)
            OrderedSet([1, 3])
            >>> oset.discard(2)
            >>> print(oset)
            OrderedSet([1, 3])
        """
        if key in self:
            i = self.map[key]
            del self.items[i]
            del self.map[key]
            for k, v in self.map.items():
                if v >= i:
                    self.map[k] = v - 1

    def clear(self):
        """
        Remove all items from this OrderedSet.
        """
        del self.items[:]
        self.map.clear()

    def __iter__(self):
        """
        Example:
            >>> list(iter(OrderedSet([1, 2, 3])))
            [1, 2, 3]
        """
        return iter(self.items)

    def __reversed__(self):
        """
        Example:
            >>> list(reversed(OrderedSet([1, 2, 3])))
            [3, 2, 1]
        """
        return reversed(self.items)

    def __repr__(self):
        if not self:
            return "%s()" % (self.__class__.__name__,)
        return "%s(%r)" % (self.__class__.__name__, list(self))

    def __eq__(self, other):
        """
        Returns true if the containers have the same items. If `other` is a
        Sequence, then order is checked, otherwise it is ignored.

        Example:
            >>> oset = OrderedSet([1, 3, 2])
            >>> oset == [1, 3, 2]
            True
            >>> oset == [1, 2, 3]
            False
            >>> oset == [2, 3]
            False
            >>> oset == OrderedSet([3, 2, 1])
            False
        """
        # In Python 2 deque is not a Sequence, so treat it as one for
        # consistent behavior with Python 3.
        if isinstance(other, (Sequence, deque)):
            # Check that this OrderedSet contains the same elements, in the
            # same order, as the other object.
            return list(self) == list(other)
        try:
            other_as_set = set(other)
        except TypeError:
            # If `other` can't be converted into a set, it's not equal.
            return False
        else:
            return set(self) == other_as_set

    def union(self, *sets):
        """
        Combines all unique items.
        Each items order is defined by its first appearance.

        Example:
            >>> oset = OrderedSet.union(OrderedSet([3, 1, 4, 1, 5]), [1, 3], [2, 0])
            >>> print(oset)
            OrderedSet([3, 1, 4, 5, 2, 0])
            >>> oset.union([8, 9])
            OrderedSet([3, 1, 4, 5, 2, 0, 8, 9])
            >>> oset | {10}
            OrderedSet([3, 1, 4, 5, 2, 0, 10])
        """
        cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet
        containers = map(list, it.chain([self], sets))
        items = it.chain.from_iterable(containers)
        return cls(items)

    def __and__(self, other):
        # the parent implementation of this is backwards
        return self.intersection(other)

    def intersection(self, *sets):
        """
        Returns elements in common between all sets. Order is defined only
        by the first set.

        Example:
            >>> oset = OrderedSet.intersection(OrderedSet([0, 1, 2, 3]), [1, 2, 3])
            >>> print(oset)
            OrderedSet([1, 2, 3])
            >>> oset.intersection([2, 4, 5], [1, 2, 3, 4])
            OrderedSet([2])
            >>> oset.intersection()
            OrderedSet([1, 2, 3])
        """
        cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet
        if sets:
            common = set.intersection(*map(set, sets))
            items = (item for item in self if item in common)
        else:
            items = self
        return cls(items)

    def difference(self, *sets):
        """
        Returns all elements that are in this set but not the others.

        Example:
            >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2]))
            OrderedSet([1, 3])
            >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2]), OrderedSet([3]))
            OrderedSet([1])
            >>> OrderedSet([1, 2, 3]) - OrderedSet([2])
            OrderedSet([1, 3])
            >>> OrderedSet([1, 2, 3]).difference()
            OrderedSet([1, 2, 3])
        """
        cls = self.__class__
        if sets:
            other = set.union(*map(set, sets))
            items = (item for item in self if item not in other)
        else:
            items = self
        return cls(items)

    def issubset(self, other):
        """
        Report whether another set contains this set.

        Example:
            >>> OrderedSet([1, 2, 3]).issubset({1, 2})
            False
            >>> OrderedSet([1, 2, 3]).issubset({1, 2, 3, 4})
            True
            >>> OrderedSet([1, 2, 3]).issubset({1, 4, 3, 5})
            False
        """
        if len(self) > len(other):  # Fast check for obvious cases
            return False
        return all(item in other for item in self)

    def issuperset(self, other):
        """
        Report whether this set contains another set.

        Example:
            >>> OrderedSet([1, 2]).issuperset([1, 2, 3])
            False
            >>> OrderedSet([1, 2, 3, 4]).issuperset({1, 2, 3})
            True
            >>> OrderedSet([1, 4, 3, 5]).issuperset({1, 2, 3})
            False
        """
        if len(self) < len(other):  # Fast check for obvious cases
            return False
        return all(item in self for item in other)

    def symmetric_difference(self, other):
        """
        Return the symmetric difference of two OrderedSets as a new set.
        That is, the new set will contain all elements that are in exactly
        one of the sets.

        Their order will be preserved, with elements from `self` preceding
        elements from `other`.

        Example:
            >>> this = OrderedSet([1, 4, 3, 5, 7])
            >>> other = OrderedSet([9, 7, 1, 3, 2])
            >>> this.symmetric_difference(other)
            OrderedSet([4, 5, 9, 2])
        """
        cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet
        diff1 = cls(self).difference(other)
        diff2 = cls(other).difference(self)
        return diff1.union(diff2)

    def _update_items(self, items):
        """
        Replace the 'items' list of this OrderedSet with a new one, updating
        self.map accordingly.
        """
        self.items = items
        self.map = {item: idx for (idx, item) in enumerate(items)}

    def difference_update(self, *sets):
        """
        Update this OrderedSet to remove items from one or more other sets.

        Example:
            >>> this = OrderedSet([1, 2, 3])
            >>> this.difference_update(OrderedSet([2, 4]))
            >>> print(this)
            OrderedSet([1, 3])

            >>> this = OrderedSet([1, 2, 3, 4, 5])
            >>> this.difference_update(OrderedSet([2, 4]), OrderedSet([1, 4, 6]))
            >>> print(this)
            OrderedSet([3, 5])
        """
        items_to_remove = set()
        for other in sets:
            items_to_remove |= set(other)
        self._update_items([item for item in self.items if item not in items_to_remove])

    def intersection_update(self, other):
        """
        Update this OrderedSet to keep only items in another set, preserving
        their order in this set.

        Example:
            >>> this = OrderedSet([1, 4, 3, 5, 7])
            >>> other = OrderedSet([9, 7, 1, 3, 2])
            >>> this.intersection_update(other)
            >>> print(this)
            OrderedSet([1, 3, 7])
        """
        other = set(other)
        self._update_items([item for item in self.items if item in other])

    def symmetric_difference_update(self, other):
        """
        Update this OrderedSet to remove items from another set, then
        add items from the other set that were not present in this set.

        Example:
            >>> this = OrderedSet([1, 4, 3, 5, 7])
            >>> other = OrderedSet([9, 7, 1, 3, 2])
            >>> this.symmetric_difference_update(other)
            >>> print(this)
            OrderedSet([4, 5, 9, 2])
        """
        items_to_add = [item for item in other if item not in self]
        items_to_remove = set(other)
        self._update_items(
            [item for item in self.items if item not in items_to_remove] + items_to_add
        )
python3.12/site-packages/setuptools/_vendor/typing_extensions.py000064400000252155151732704160021151 0ustar00import abc
import collections
import collections.abc
import operator
import sys
import typing

# After PEP 560, internal typing API was substantially reworked.
# This is especially important for Protocol class which uses internal APIs
# quite extensively.
PEP_560 = sys.version_info[:3] >= (3, 7, 0)

if PEP_560:
    GenericMeta = type
else:
    # 3.6
    from typing import GenericMeta, _type_vars  # noqa

# The two functions below are copies of typing internal helpers.
# They are needed by _ProtocolMeta


def _no_slots_copy(dct):
    dict_copy = dict(dct)
    if '__slots__' in dict_copy:
        for slot in dict_copy['__slots__']:
            dict_copy.pop(slot, None)
    return dict_copy


def _check_generic(cls, parameters):
    if not cls.__parameters__:
        raise TypeError(f"{cls} is not a generic class")
    alen = len(parameters)
    elen = len(cls.__parameters__)
    if alen != elen:
        raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments for {cls};"
                        f" actual {alen}, expected {elen}")


# Please keep __all__ alphabetized within each category.
__all__ = [
    # Super-special typing primitives.
    'ClassVar',
    'Concatenate',
    'Final',
    'ParamSpec',
    'Self',
    'Type',

    # ABCs (from collections.abc).
    'Awaitable',
    'AsyncIterator',
    'AsyncIterable',
    'Coroutine',
    'AsyncGenerator',
    'AsyncContextManager',
    'ChainMap',

    # Concrete collection types.
    'ContextManager',
    'Counter',
    'Deque',
    'DefaultDict',
    'OrderedDict',
    'TypedDict',

    # Structural checks, a.k.a. protocols.
    'SupportsIndex',

    # One-off things.
    'Annotated',
    'final',
    'IntVar',
    'Literal',
    'NewType',
    'overload',
    'Protocol',
    'runtime',
    'runtime_checkable',
    'Text',
    'TypeAlias',
    'TypeGuard',
    'TYPE_CHECKING',
]

if PEP_560:
    __all__.extend(["get_args", "get_origin", "get_type_hints"])

# 3.6.2+
if hasattr(typing, 'NoReturn'):
    NoReturn = typing.NoReturn
# 3.6.0-3.6.1
else:
    class _NoReturn(typing._FinalTypingBase, _root=True):
        """Special type indicating functions that never return.
        Example::

          from typing import NoReturn

          def stop() -> NoReturn:
              raise Exception('no way')

        This type is invalid in other positions, e.g., ``List[NoReturn]``
        will fail in static type checkers.
        """
        __slots__ = ()

        def __instancecheck__(self, obj):
            raise TypeError("NoReturn cannot be used with isinstance().")

        def __subclasscheck__(self, cls):
            raise TypeError("NoReturn cannot be used with issubclass().")

    NoReturn = _NoReturn(_root=True)

# Some unconstrained type variables.  These are used by the container types.
# (These are not for export.)
T = typing.TypeVar('T')  # Any type.
KT = typing.TypeVar('KT')  # Key type.
VT = typing.TypeVar('VT')  # Value type.
T_co = typing.TypeVar('T_co', covariant=True)  # Any type covariant containers.
T_contra = typing.TypeVar('T_contra', contravariant=True)  # Ditto contravariant.

ClassVar = typing.ClassVar

# On older versions of typing there is an internal class named "Final".
# 3.8+
if hasattr(typing, 'Final') and sys.version_info[:2] >= (3, 7):
    Final = typing.Final
# 3.7
elif sys.version_info[:2] >= (3, 7):
    class _FinalForm(typing._SpecialForm, _root=True):

        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only single type')
            return typing._GenericAlias(self, (item,))

    Final = _FinalForm('Final',
                       doc="""A special typing construct to indicate that a name
                       cannot be re-assigned or overridden in a subclass.
                       For example:

                           MAX_SIZE: Final = 9000
                           MAX_SIZE += 1  # Error reported by type checker

                           class Connection:
                               TIMEOUT: Final[int] = 10
                           class FastConnector(Connection):
                               TIMEOUT = 1  # Error reported by type checker

                       There is no runtime checking of these properties.""")
# 3.6
else:
    class _Final(typing._FinalTypingBase, _root=True):
        """A special typing construct to indicate that a name
        cannot be re-assigned or overridden in a subclass.
        For example:

            MAX_SIZE: Final = 9000
            MAX_SIZE += 1  # Error reported by type checker

            class Connection:
                TIMEOUT: Final[int] = 10
            class FastConnector(Connection):
                TIMEOUT = 1  # Error reported by type checker

        There is no runtime checking of these properties.
        """

        __slots__ = ('__type__',)

        def __init__(self, tp=None, **kwds):
            self.__type__ = tp

        def __getitem__(self, item):
            cls = type(self)
            if self.__type__ is None:
                return cls(typing._type_check(item,
                           f'{cls.__name__[1:]} accepts only single type.'),
                           _root=True)
            raise TypeError(f'{cls.__name__[1:]} cannot be further subscripted')

        def _eval_type(self, globalns, localns):
            new_tp = typing._eval_type(self.__type__, globalns, localns)
            if new_tp == self.__type__:
                return self
            return type(self)(new_tp, _root=True)

        def __repr__(self):
            r = super().__repr__()
            if self.__type__ is not None:
                r += f'[{typing._type_repr(self.__type__)}]'
            return r

        def __hash__(self):
            return hash((type(self).__name__, self.__type__))

        def __eq__(self, other):
            if not isinstance(other, _Final):
                return NotImplemented
            if self.__type__ is not None:
                return self.__type__ == other.__type__
            return self is other

    Final = _Final(_root=True)


# 3.8+
if hasattr(typing, 'final'):
    final = typing.final
# 3.6-3.7
else:
    def final(f):
        """This decorator can be used to indicate to type checkers that
        the decorated method cannot be overridden, and decorated class
        cannot be subclassed. For example:

            class Base:
                @final
                def done(self) -> None:
                    ...
            class Sub(Base):
                def done(self) -> None:  # Error reported by type checker
                    ...
            @final
            class Leaf:
                ...
            class Other(Leaf):  # Error reported by type checker
                ...

        There is no runtime checking of these properties.
        """
        return f


def IntVar(name):
    return typing.TypeVar(name)


# 3.8+:
if hasattr(typing, 'Literal'):
    Literal = typing.Literal
# 3.7:
elif sys.version_info[:2] >= (3, 7):
    class _LiteralForm(typing._SpecialForm, _root=True):

        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            return typing._GenericAlias(self, parameters)

    Literal = _LiteralForm('Literal',
                           doc="""A type that can be used to indicate to type checkers
                           that the corresponding value has a value literally equivalent
                           to the provided parameter. For example:

                               var: Literal[4] = 4

                           The type checker understands that 'var' is literally equal to
                           the value 4 and no other value.

                           Literal[...] cannot be subclassed. There is no runtime
                           checking verifying that the parameter is actually a value
                           instead of a type.""")
# 3.6:
else:
    class _Literal(typing._FinalTypingBase, _root=True):
        """A type that can be used to indicate to type checkers that the
        corresponding value has a value literally equivalent to the
        provided parameter. For example:

            var: Literal[4] = 4

        The type checker understands that 'var' is literally equal to the
        value 4 and no other value.

        Literal[...] cannot be subclassed. There is no runtime checking
        verifying that the parameter is actually a value instead of a type.
        """

        __slots__ = ('__values__',)

        def __init__(self, values=None, **kwds):
            self.__values__ = values

        def __getitem__(self, values):
            cls = type(self)
            if self.__values__ is None:
                if not isinstance(values, tuple):
                    values = (values,)
                return cls(values, _root=True)
            raise TypeError(f'{cls.__name__[1:]} cannot be further subscripted')

        def _eval_type(self, globalns, localns):
            return self

        def __repr__(self):
            r = super().__repr__()
            if self.__values__ is not None:
                r += f'[{", ".join(map(typing._type_repr, self.__values__))}]'
            return r

        def __hash__(self):
            return hash((type(self).__name__, self.__values__))

        def __eq__(self, other):
            if not isinstance(other, _Literal):
                return NotImplemented
            if self.__values__ is not None:
                return self.__values__ == other.__values__
            return self is other

    Literal = _Literal(_root=True)


_overload_dummy = typing._overload_dummy  # noqa
overload = typing.overload


# This is not a real generic class.  Don't use outside annotations.
Type = typing.Type

# Various ABCs mimicking those in collections.abc.
# A few are simply re-exported for completeness.


class _ExtensionsGenericMeta(GenericMeta):
    def __subclasscheck__(self, subclass):
        """This mimics a more modern GenericMeta.__subclasscheck__() logic
        (that does not have problems with recursion) to work around interactions
        between collections, typing, and typing_extensions on older
        versions of Python, see https://github.com/python/typing/issues/501.
        """
        if self.__origin__ is not None:
            if sys._getframe(1).f_globals['__name__'] not in ['abc', 'functools']:
                raise TypeError("Parameterized generics cannot be used with class "
                                "or instance checks")
            return False
        if not self.__extra__:
            return super().__subclasscheck__(subclass)
        res = self.__extra__.__subclasshook__(subclass)
        if res is not NotImplemented:
            return res
        if self.__extra__ in subclass.__mro__:
            return True
        for scls in self.__extra__.__subclasses__():
            if isinstance(scls, GenericMeta):
                continue
            if issubclass(subclass, scls):
                return True
        return False


Awaitable = typing.Awaitable
Coroutine = typing.Coroutine
AsyncIterable = typing.AsyncIterable
AsyncIterator = typing.AsyncIterator

# 3.6.1+
if hasattr(typing, 'Deque'):
    Deque = typing.Deque
# 3.6.0
else:
    class Deque(collections.deque, typing.MutableSequence[T],
                metaclass=_ExtensionsGenericMeta,
                extra=collections.deque):
        __slots__ = ()

        def __new__(cls, *args, **kwds):
            if cls._gorg is Deque:
                return collections.deque(*args, **kwds)
            return typing._generic_new(collections.deque, cls, *args, **kwds)

ContextManager = typing.ContextManager
# 3.6.2+
if hasattr(typing, 'AsyncContextManager'):
    AsyncContextManager = typing.AsyncContextManager
# 3.6.0-3.6.1
else:
    from _collections_abc import _check_methods as _check_methods_in_mro  # noqa

    class AsyncContextManager(typing.Generic[T_co]):
        __slots__ = ()

        async def __aenter__(self):
            return self

        @abc.abstractmethod
        async def __aexit__(self, exc_type, exc_value, traceback):
            return None

        @classmethod
        def __subclasshook__(cls, C):
            if cls is AsyncContextManager:
                return _check_methods_in_mro(C, "__aenter__", "__aexit__")
            return NotImplemented

DefaultDict = typing.DefaultDict

# 3.7.2+
if hasattr(typing, 'OrderedDict'):
    OrderedDict = typing.OrderedDict
# 3.7.0-3.7.2
elif (3, 7, 0) <= sys.version_info[:3] < (3, 7, 2):
    OrderedDict = typing._alias(collections.OrderedDict, (KT, VT))
# 3.6
else:
    class OrderedDict(collections.OrderedDict, typing.MutableMapping[KT, VT],
                      metaclass=_ExtensionsGenericMeta,
                      extra=collections.OrderedDict):

        __slots__ = ()

        def __new__(cls, *args, **kwds):
            if cls._gorg is OrderedDict:
                return collections.OrderedDict(*args, **kwds)
            return typing._generic_new(collections.OrderedDict, cls, *args, **kwds)

# 3.6.2+
if hasattr(typing, 'Counter'):
    Counter = typing.Counter
# 3.6.0-3.6.1
else:
    class Counter(collections.Counter,
                  typing.Dict[T, int],
                  metaclass=_ExtensionsGenericMeta, extra=collections.Counter):

        __slots__ = ()

        def __new__(cls, *args, **kwds):
            if cls._gorg is Counter:
                return collections.Counter(*args, **kwds)
            return typing._generic_new(collections.Counter, cls, *args, **kwds)

# 3.6.1+
if hasattr(typing, 'ChainMap'):
    ChainMap = typing.ChainMap
elif hasattr(collections, 'ChainMap'):
    class ChainMap(collections.ChainMap, typing.MutableMapping[KT, VT],
                   metaclass=_ExtensionsGenericMeta,
                   extra=collections.ChainMap):

        __slots__ = ()

        def __new__(cls, *args, **kwds):
            if cls._gorg is ChainMap:
                return collections.ChainMap(*args, **kwds)
            return typing._generic_new(collections.ChainMap, cls, *args, **kwds)

# 3.6.1+
if hasattr(typing, 'AsyncGenerator'):
    AsyncGenerator = typing.AsyncGenerator
# 3.6.0
else:
    class AsyncGenerator(AsyncIterator[T_co], typing.Generic[T_co, T_contra],
                         metaclass=_ExtensionsGenericMeta,
                         extra=collections.abc.AsyncGenerator):
        __slots__ = ()

NewType = typing.NewType
Text = typing.Text
TYPE_CHECKING = typing.TYPE_CHECKING


def _gorg(cls):
    """This function exists for compatibility with old typing versions."""
    assert isinstance(cls, GenericMeta)
    if hasattr(cls, '_gorg'):
        return cls._gorg
    while cls.__origin__ is not None:
        cls = cls.__origin__
    return cls


_PROTO_WHITELIST = ['Callable', 'Awaitable',
                    'Iterable', 'Iterator', 'AsyncIterable', 'AsyncIterator',
                    'Hashable', 'Sized', 'Container', 'Collection', 'Reversible',
                    'ContextManager', 'AsyncContextManager']


def _get_protocol_attrs(cls):
    attrs = set()
    for base in cls.__mro__[:-1]:  # without object
        if base.__name__ in ('Protocol', 'Generic'):
            continue
        annotations = getattr(base, '__annotations__', {})
        for attr in list(base.__dict__.keys()) + list(annotations.keys()):
            if (not attr.startswith('_abc_') and attr not in (
                    '__abstractmethods__', '__annotations__', '__weakref__',
                    '_is_protocol', '_is_runtime_protocol', '__dict__',
                    '__args__', '__slots__',
                    '__next_in_mro__', '__parameters__', '__origin__',
                    '__orig_bases__', '__extra__', '__tree_hash__',
                    '__doc__', '__subclasshook__', '__init__', '__new__',
                    '__module__', '_MutableMapping__marker', '_gorg')):
                attrs.add(attr)
    return attrs


def _is_callable_members_only(cls):
    return all(callable(getattr(cls, attr, None)) for attr in _get_protocol_attrs(cls))


# 3.8+
if hasattr(typing, 'Protocol'):
    Protocol = typing.Protocol
# 3.7
elif PEP_560:
    from typing import _collect_type_vars  # noqa

    def _no_init(self, *args, **kwargs):
        if type(self)._is_protocol:
            raise TypeError('Protocols cannot be instantiated')

    class _ProtocolMeta(abc.ABCMeta):
        # This metaclass is a bit unfortunate and exists only because of the lack
        # of __instancehook__.
        def __instancecheck__(cls, instance):
            # We need this method for situations where attributes are
            # assigned in __init__.
            if ((not getattr(cls, '_is_protocol', False) or
                 _is_callable_members_only(cls)) and
                    issubclass(instance.__class__, cls)):
                return True
            if cls._is_protocol:
                if all(hasattr(instance, attr) and
                       (not callable(getattr(cls, attr, None)) or
                        getattr(instance, attr) is not None)
                       for attr in _get_protocol_attrs(cls)):
                    return True
            return super().__instancecheck__(instance)

    class Protocol(metaclass=_ProtocolMeta):
        # There is quite a lot of overlapping code with typing.Generic.
        # Unfortunately it is hard to avoid this while these live in two different
        # modules. The duplicated code will be removed when Protocol is moved to typing.
        """Base class for protocol classes. Protocol classes are defined as::

            class Proto(Protocol):
                def meth(self) -> int:
                    ...

        Such classes are primarily used with static type checkers that recognize
        structural subtyping (static duck-typing), for example::

            class C:
                def meth(self) -> int:
                    return 0

            def func(x: Proto) -> int:
                return x.meth()

            func(C())  # Passes static type check

        See PEP 544 for details. Protocol classes decorated with
        @typing_extensions.runtime act as simple-minded runtime protocol that checks
        only the presence of given attributes, ignoring their type signatures.

        Protocol classes can be generic, they are defined as::

            class GenProto(Protocol[T]):
                def meth(self) -> T:
                    ...
        """
        __slots__ = ()
        _is_protocol = True

        def __new__(cls, *args, **kwds):
            if cls is Protocol:
                raise TypeError("Type Protocol cannot be instantiated; "
                                "it can only be used as a base class")
            return super().__new__(cls)

        @typing._tp_cache
        def __class_getitem__(cls, params):
            if not isinstance(params, tuple):
                params = (params,)
            if not params and cls is not typing.Tuple:
                raise TypeError(
                    f"Parameter list to {cls.__qualname__}[...] cannot be empty")
            msg = "Parameters to generic types must be types."
            params = tuple(typing._type_check(p, msg) for p in params)  # noqa
            if cls is Protocol:
                # Generic can only be subscripted with unique type variables.
                if not all(isinstance(p, typing.TypeVar) for p in params):
                    i = 0
                    while isinstance(params[i], typing.TypeVar):
                        i += 1
                    raise TypeError(
                        "Parameters to Protocol[...] must all be type variables."
                        f" Parameter {i + 1} is {params[i]}")
                if len(set(params)) != len(params):
                    raise TypeError(
                        "Parameters to Protocol[...] must all be unique")
            else:
                # Subscripting a regular Generic subclass.
                _check_generic(cls, params)
            return typing._GenericAlias(cls, params)

        def __init_subclass__(cls, *args, **kwargs):
            tvars = []
            if '__orig_bases__' in cls.__dict__:
                error = typing.Generic in cls.__orig_bases__
            else:
                error = typing.Generic in cls.__bases__
            if error:
                raise TypeError("Cannot inherit from plain Generic")
            if '__orig_bases__' in cls.__dict__:
                tvars = _collect_type_vars(cls.__orig_bases__)
                # Look for Generic[T1, ..., Tn] or Protocol[T1, ..., Tn].
                # If found, tvars must be a subset of it.
                # If not found, tvars is it.
                # Also check for and reject plain Generic,
                # and reject multiple Generic[...] and/or Protocol[...].
                gvars = None
                for base in cls.__orig_bases__:
                    if (isinstance(base, typing._GenericAlias) and
                            base.__origin__ in (typing.Generic, Protocol)):
                        # for error messages
                        the_base = base.__origin__.__name__
                        if gvars is not None:
                            raise TypeError(
                                "Cannot inherit from Generic[...]"
                                " and/or Protocol[...] multiple types.")
                        gvars = base.__parameters__
                if gvars is None:
                    gvars = tvars
                else:
                    tvarset = set(tvars)
                    gvarset = set(gvars)
                    if not tvarset <= gvarset:
                        s_vars = ', '.join(str(t) for t in tvars if t not in gvarset)
                        s_args = ', '.join(str(g) for g in gvars)
                        raise TypeError(f"Some type variables ({s_vars}) are"
                                        f" not listed in {the_base}[{s_args}]")
                    tvars = gvars
            cls.__parameters__ = tuple(tvars)

            # Determine if this is a protocol or a concrete subclass.
            if not cls.__dict__.get('_is_protocol', None):
                cls._is_protocol = any(b is Protocol for b in cls.__bases__)

            # Set (or override) the protocol subclass hook.
            def _proto_hook(other):
                if not cls.__dict__.get('_is_protocol', None):
                    return NotImplemented
                if not getattr(cls, '_is_runtime_protocol', False):
                    if sys._getframe(2).f_globals['__name__'] in ['abc', 'functools']:
                        return NotImplemented
                    raise TypeError("Instance and class checks can only be used with"
                                    " @runtime protocols")
                if not _is_callable_members_only(cls):
                    if sys._getframe(2).f_globals['__name__'] in ['abc', 'functools']:
                        return NotImplemented
                    raise TypeError("Protocols with non-method members"
                                    " don't support issubclass()")
                if not isinstance(other, type):
                    # Same error as for issubclass(1, int)
                    raise TypeError('issubclass() arg 1 must be a class')
                for attr in _get_protocol_attrs(cls):
                    for base in other.__mro__:
                        if attr in base.__dict__:
                            if base.__dict__[attr] is None:
                                return NotImplemented
                            break
                        annotations = getattr(base, '__annotations__', {})
                        if (isinstance(annotations, typing.Mapping) and
                                attr in annotations and
                                isinstance(other, _ProtocolMeta) and
                                other._is_protocol):
                            break
                    else:
                        return NotImplemented
                return True
            if '__subclasshook__' not in cls.__dict__:
                cls.__subclasshook__ = _proto_hook

            # We have nothing more to do for non-protocols.
            if not cls._is_protocol:
                return

            # Check consistency of bases.
            for base in cls.__bases__:
                if not (base in (object, typing.Generic) or
                        base.__module__ == 'collections.abc' and
                        base.__name__ in _PROTO_WHITELIST or
                        isinstance(base, _ProtocolMeta) and base._is_protocol):
                    raise TypeError('Protocols can only inherit from other'
                                    f' protocols, got {repr(base)}')
            cls.__init__ = _no_init
# 3.6
else:
    from typing import _next_in_mro, _type_check  # noqa

    def _no_init(self, *args, **kwargs):
        if type(self)._is_protocol:
            raise TypeError('Protocols cannot be instantiated')

    class _ProtocolMeta(GenericMeta):
        """Internal metaclass for Protocol.

        This exists so Protocol classes can be generic without deriving
        from Generic.
        """
        def __new__(cls, name, bases, namespace,
                    tvars=None, args=None, origin=None, extra=None, orig_bases=None):
            # This is just a version copied from GenericMeta.__new__ that
            # includes "Protocol" special treatment. (Comments removed for brevity.)
            assert extra is None  # Protocols should not have extra
            if tvars is not None:
                assert origin is not None
                assert all(isinstance(t, typing.TypeVar) for t in tvars), tvars
            else:
                tvars = _type_vars(bases)
                gvars = None
                for base in bases:
                    if base is typing.Generic:
                        raise TypeError("Cannot inherit from plain Generic")
                    if (isinstance(base, GenericMeta) and
                            base.__origin__ in (typing.Generic, Protocol)):
                        if gvars is not None:
                            raise TypeError(
                                "Cannot inherit from Generic[...] or"
                                " Protocol[...] multiple times.")
                        gvars = base.__parameters__
                if gvars is None:
                    gvars = tvars
                else:
                    tvarset = set(tvars)
                    gvarset = set(gvars)
                    if not tvarset <= gvarset:
                        s_vars = ", ".join(str(t) for t in tvars if t not in gvarset)
                        s_args = ", ".join(str(g) for g in gvars)
                        cls_name = "Generic" if any(b.__origin__ is typing.Generic
                                                    for b in bases) else "Protocol"
                        raise TypeError(f"Some type variables ({s_vars}) are"
                                        f" not listed in {cls_name}[{s_args}]")
                    tvars = gvars

            initial_bases = bases
            if (extra is not None and type(extra) is abc.ABCMeta and
                    extra not in bases):
                bases = (extra,) + bases
            bases = tuple(_gorg(b) if isinstance(b, GenericMeta) else b
                          for b in bases)
            if any(isinstance(b, GenericMeta) and b is not typing.Generic for b in bases):
                bases = tuple(b for b in bases if b is not typing.Generic)
            namespace.update({'__origin__': origin, '__extra__': extra})
            self = super(GenericMeta, cls).__new__(cls, name, bases, namespace,
                                                   _root=True)
            super(GenericMeta, self).__setattr__('_gorg',
                                                 self if not origin else
                                                 _gorg(origin))
            self.__parameters__ = tvars
            self.__args__ = tuple(... if a is typing._TypingEllipsis else
                                  () if a is typing._TypingEmpty else
                                  a for a in args) if args else None
            self.__next_in_mro__ = _next_in_mro(self)
            if orig_bases is None:
                self.__orig_bases__ = initial_bases
            elif origin is not None:
                self._abc_registry = origin._abc_registry
                self._abc_cache = origin._abc_cache
            if hasattr(self, '_subs_tree'):
                self.__tree_hash__ = (hash(self._subs_tree()) if origin else
                                      super(GenericMeta, self).__hash__())
            return self

        def __init__(cls, *args, **kwargs):
            super().__init__(*args, **kwargs)
            if not cls.__dict__.get('_is_protocol', None):
                cls._is_protocol = any(b is Protocol or
                                       isinstance(b, _ProtocolMeta) and
                                       b.__origin__ is Protocol
                                       for b in cls.__bases__)
            if cls._is_protocol:
                for base in cls.__mro__[1:]:
                    if not (base in (object, typing.Generic) or
                            base.__module__ == 'collections.abc' and
                            base.__name__ in _PROTO_WHITELIST or
                            isinstance(base, typing.TypingMeta) and base._is_protocol or
                            isinstance(base, GenericMeta) and
                            base.__origin__ is typing.Generic):
                        raise TypeError(f'Protocols can only inherit from other'
                                        f' protocols, got {repr(base)}')

                cls.__init__ = _no_init

            def _proto_hook(other):
                if not cls.__dict__.get('_is_protocol', None):
                    return NotImplemented
                if not isinstance(other, type):
                    # Same error as for issubclass(1, int)
                    raise TypeError('issubclass() arg 1 must be a class')
                for attr in _get_protocol_attrs(cls):
                    for base in other.__mro__:
                        if attr in base.__dict__:
                            if base.__dict__[attr] is None:
                                return NotImplemented
                            break
                        annotations = getattr(base, '__annotations__', {})
                        if (isinstance(annotations, typing.Mapping) and
                                attr in annotations and
                                isinstance(other, _ProtocolMeta) and
                                other._is_protocol):
                            break
                    else:
                        return NotImplemented
                return True
            if '__subclasshook__' not in cls.__dict__:
                cls.__subclasshook__ = _proto_hook

        def __instancecheck__(self, instance):
            # We need this method for situations where attributes are
            # assigned in __init__.
            if ((not getattr(self, '_is_protocol', False) or
                    _is_callable_members_only(self)) and
                    issubclass(instance.__class__, self)):
                return True
            if self._is_protocol:
                if all(hasattr(instance, attr) and
                        (not callable(getattr(self, attr, None)) or
                         getattr(instance, attr) is not None)
                        for attr in _get_protocol_attrs(self)):
                    return True
            return super(GenericMeta, self).__instancecheck__(instance)

        def __subclasscheck__(self, cls):
            if self.__origin__ is not None:
                if sys._getframe(1).f_globals['__name__'] not in ['abc', 'functools']:
                    raise TypeError("Parameterized generics cannot be used with class "
                                    "or instance checks")
                return False
            if (self.__dict__.get('_is_protocol', None) and
                    not self.__dict__.get('_is_runtime_protocol', None)):
                if sys._getframe(1).f_globals['__name__'] in ['abc',
                                                              'functools',
                                                              'typing']:
                    return False
                raise TypeError("Instance and class checks can only be used with"
                                " @runtime protocols")
            if (self.__dict__.get('_is_runtime_protocol', None) and
                    not _is_callable_members_only(self)):
                if sys._getframe(1).f_globals['__name__'] in ['abc',
                                                              'functools',
                                                              'typing']:
                    return super(GenericMeta, self).__subclasscheck__(cls)
                raise TypeError("Protocols with non-method members"
                                " don't support issubclass()")
            return super(GenericMeta, self).__subclasscheck__(cls)

        @typing._tp_cache
        def __getitem__(self, params):
            # We also need to copy this from GenericMeta.__getitem__ to get
            # special treatment of "Protocol". (Comments removed for brevity.)
            if not isinstance(params, tuple):
                params = (params,)
            if not params and _gorg(self) is not typing.Tuple:
                raise TypeError(
                    f"Parameter list to {self.__qualname__}[...] cannot be empty")
            msg = "Parameters to generic types must be types."
            params = tuple(_type_check(p, msg) for p in params)
            if self in (typing.Generic, Protocol):
                if not all(isinstance(p, typing.TypeVar) for p in params):
                    raise TypeError(
                        f"Parameters to {repr(self)}[...] must all be type variables")
                if len(set(params)) != len(params):
                    raise TypeError(
                        f"Parameters to {repr(self)}[...] must all be unique")
                tvars = params
                args = params
            elif self in (typing.Tuple, typing.Callable):
                tvars = _type_vars(params)
                args = params
            elif self.__origin__ in (typing.Generic, Protocol):
                raise TypeError(f"Cannot subscript already-subscripted {repr(self)}")
            else:
                _check_generic(self, params)
                tvars = _type_vars(params)
                args = params

            prepend = (self,) if self.__origin__ is None else ()
            return self.__class__(self.__name__,
                                  prepend + self.__bases__,
                                  _no_slots_copy(self.__dict__),
                                  tvars=tvars,
                                  args=args,
                                  origin=self,
                                  extra=self.__extra__,
                                  orig_bases=self.__orig_bases__)

    class Protocol(metaclass=_ProtocolMeta):
        """Base class for protocol classes. Protocol classes are defined as::

          class Proto(Protocol):
              def meth(self) -> int:
                  ...

        Such classes are primarily used with static type checkers that recognize
        structural subtyping (static duck-typing), for example::

          class C:
              def meth(self) -> int:
                  return 0

          def func(x: Proto) -> int:
              return x.meth()

          func(C())  # Passes static type check

        See PEP 544 for details. Protocol classes decorated with
        @typing_extensions.runtime act as simple-minded runtime protocol that checks
        only the presence of given attributes, ignoring their type signatures.

        Protocol classes can be generic, they are defined as::

          class GenProto(Protocol[T]):
              def meth(self) -> T:
                  ...
        """
        __slots__ = ()
        _is_protocol = True

        def __new__(cls, *args, **kwds):
            if _gorg(cls) is Protocol:
                raise TypeError("Type Protocol cannot be instantiated; "
                                "it can be used only as a base class")
            return typing._generic_new(cls.__next_in_mro__, cls, *args, **kwds)


# 3.8+
if hasattr(typing, 'runtime_checkable'):
    runtime_checkable = typing.runtime_checkable
# 3.6-3.7
else:
    def runtime_checkable(cls):
        """Mark a protocol class as a runtime protocol, so that it
        can be used with isinstance() and issubclass(). Raise TypeError
        if applied to a non-protocol class.

        This allows a simple-minded structural check very similar to the
        one-offs in collections.abc such as Hashable.
        """
        if not isinstance(cls, _ProtocolMeta) or not cls._is_protocol:
            raise TypeError('@runtime_checkable can be only applied to protocol classes,'
                            f' got {cls!r}')
        cls._is_runtime_protocol = True
        return cls


# Exists for backwards compatibility.
runtime = runtime_checkable


# 3.8+
if hasattr(typing, 'SupportsIndex'):
    SupportsIndex = typing.SupportsIndex
# 3.6-3.7
else:
    @runtime_checkable
    class SupportsIndex(Protocol):
        __slots__ = ()

        @abc.abstractmethod
        def __index__(self) -> int:
            pass


if sys.version_info >= (3, 9, 2):
    # The standard library TypedDict in Python 3.8 does not store runtime information
    # about which (if any) keys are optional.  See https://bugs.python.org/issue38834
    # The standard library TypedDict in Python 3.9.0/1 does not honour the "total"
    # keyword with old-style TypedDict().  See https://bugs.python.org/issue42059
    TypedDict = typing.TypedDict
else:
    def _check_fails(cls, other):
        try:
            if sys._getframe(1).f_globals['__name__'] not in ['abc',
                                                              'functools',
                                                              'typing']:
                # Typed dicts are only for static structural subtyping.
                raise TypeError('TypedDict does not support instance and class checks')
        except (AttributeError, ValueError):
            pass
        return False

    def _dict_new(*args, **kwargs):
        if not args:
            raise TypeError('TypedDict.__new__(): not enough arguments')
        _, args = args[0], args[1:]  # allow the "cls" keyword be passed
        return dict(*args, **kwargs)

    _dict_new.__text_signature__ = '($cls, _typename, _fields=None, /, **kwargs)'

    def _typeddict_new(*args, total=True, **kwargs):
        if not args:
            raise TypeError('TypedDict.__new__(): not enough arguments')
        _, args = args[0], args[1:]  # allow the "cls" keyword be passed
        if args:
            typename, args = args[0], args[1:]  # allow the "_typename" keyword be passed
        elif '_typename' in kwargs:
            typename = kwargs.pop('_typename')
            import warnings
            warnings.warn("Passing '_typename' as keyword argument is deprecated",
                          DeprecationWarning, stacklevel=2)
        else:
            raise TypeError("TypedDict.__new__() missing 1 required positional "
                            "argument: '_typename'")
        if args:
            try:
                fields, = args  # allow the "_fields" keyword be passed
            except ValueError:
                raise TypeError('TypedDict.__new__() takes from 2 to 3 '
                                f'positional arguments but {len(args) + 2} '
                                'were given')
        elif '_fields' in kwargs and len(kwargs) == 1:
            fields = kwargs.pop('_fields')
            import warnings
            warnings.warn("Passing '_fields' as keyword argument is deprecated",
                          DeprecationWarning, stacklevel=2)
        else:
            fields = None

        if fields is None:
            fields = kwargs
        elif kwargs:
            raise TypeError("TypedDict takes either a dict or keyword arguments,"
                            " but not both")

        ns = {'__annotations__': dict(fields)}
        try:
            # Setting correct module is necessary to make typed dict classes pickleable.
            ns['__module__'] = sys._getframe(1).f_globals.get('__name__', '__main__')
        except (AttributeError, ValueError):
            pass

        return _TypedDictMeta(typename, (), ns, total=total)

    _typeddict_new.__text_signature__ = ('($cls, _typename, _fields=None,'
                                         ' /, *, total=True, **kwargs)')

    class _TypedDictMeta(type):
        def __init__(cls, name, bases, ns, total=True):
            super().__init__(name, bases, ns)

        def __new__(cls, name, bases, ns, total=True):
            # Create new typed dict class object.
            # This method is called directly when TypedDict is subclassed,
            # or via _typeddict_new when TypedDict is instantiated. This way
            # TypedDict supports all three syntaxes described in its docstring.
            # Subclasses and instances of TypedDict return actual dictionaries
            # via _dict_new.
            ns['__new__'] = _typeddict_new if name == 'TypedDict' else _dict_new
            tp_dict = super().__new__(cls, name, (dict,), ns)

            annotations = {}
            own_annotations = ns.get('__annotations__', {})
            own_annotation_keys = set(own_annotations.keys())
            msg = "TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type"
            own_annotations = {
                n: typing._type_check(tp, msg) for n, tp in own_annotations.items()
            }
            required_keys = set()
            optional_keys = set()

            for base in bases:
                annotations.update(base.__dict__.get('__annotations__', {}))
                required_keys.update(base.__dict__.get('__required_keys__', ()))
                optional_keys.update(base.__dict__.get('__optional_keys__', ()))

            annotations.update(own_annotations)
            if total:
                required_keys.update(own_annotation_keys)
            else:
                optional_keys.update(own_annotation_keys)

            tp_dict.__annotations__ = annotations
            tp_dict.__required_keys__ = frozenset(required_keys)
            tp_dict.__optional_keys__ = frozenset(optional_keys)
            if not hasattr(tp_dict, '__total__'):
                tp_dict.__total__ = total
            return tp_dict

        __instancecheck__ = __subclasscheck__ = _check_fails

    TypedDict = _TypedDictMeta('TypedDict', (dict,), {})
    TypedDict.__module__ = __name__
    TypedDict.__doc__ = \
        """A simple typed name space. At runtime it is equivalent to a plain dict.

        TypedDict creates a dictionary type that expects all of its
        instances to have a certain set of keys, with each key
        associated with a value of a consistent type. This expectation
        is not checked at runtime but is only enforced by type checkers.
        Usage::

            class Point2D(TypedDict):
                x: int
                y: int
                label: str

            a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
            b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

            assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

        The type info can be accessed via the Point2D.__annotations__ dict, and
        the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
        TypedDict supports two additional equivalent forms::

            Point2D = TypedDict('Point2D', x=int, y=int, label=str)
            Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

        The class syntax is only supported in Python 3.6+, while two other
        syntax forms work for Python 2.7 and 3.2+
        """


# Python 3.9+ has PEP 593 (Annotated and modified get_type_hints)
if hasattr(typing, 'Annotated'):
    Annotated = typing.Annotated
    get_type_hints = typing.get_type_hints
    # Not exported and not a public API, but needed for get_origin() and get_args()
    # to work.
    _AnnotatedAlias = typing._AnnotatedAlias
# 3.7-3.8
elif PEP_560:
    class _AnnotatedAlias(typing._GenericAlias, _root=True):
        """Runtime representation of an annotated type.

        At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
        with extra annotations. The alias behaves like a normal typing alias,
        instantiating is the same as instantiating the underlying type, binding
        it to types is also the same.
        """
        def __init__(self, origin, metadata):
            if isinstance(origin, _AnnotatedAlias):
                metadata = origin.__metadata__ + metadata
                origin = origin.__origin__
            super().__init__(origin, origin)
            self.__metadata__ = metadata

        def copy_with(self, params):
            assert len(params) == 1
            new_type = params[0]
            return _AnnotatedAlias(new_type, self.__metadata__)

        def __repr__(self):
            return (f"typing_extensions.Annotated[{typing._type_repr(self.__origin__)}, "
                    f"{', '.join(repr(a) for a in self.__metadata__)}]")

        def __reduce__(self):
            return operator.getitem, (
                Annotated, (self.__origin__,) + self.__metadata__
            )

        def __eq__(self, other):
            if not isinstance(other, _AnnotatedAlias):
                return NotImplemented
            if self.__origin__ != other.__origin__:
                return False
            return self.__metadata__ == other.__metadata__

        def __hash__(self):
            return hash((self.__origin__, self.__metadata__))

    class Annotated:
        """Add context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to the
        hypothetical runtime_check module that this type is an unsigned int.
        Every other consumer of this type can ignore this metadata and treat
        this type as int.

        The first argument to Annotated must be a valid type (and will be in
        the __origin__ field), the remaining arguments are kept as a tuple in
        the __extra__ field.

        Details:

        - It's an error to call `Annotated` with less than two arguments.
        - Nested Annotated are flattened::

            Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

        - Instantiating an annotated type is equivalent to instantiating the
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can be used as a generic type alias::

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
        """

        __slots__ = ()

        def __new__(cls, *args, **kwargs):
            raise TypeError("Type Annotated cannot be instantiated.")

        @typing._tp_cache
        def __class_getitem__(cls, params):
            if not isinstance(params, tuple) or len(params) < 2:
                raise TypeError("Annotated[...] should be used "
                                "with at least two arguments (a type and an "
                                "annotation).")
            msg = "Annotated[t, ...]: t must be a type."
            origin = typing._type_check(params[0], msg)
            metadata = tuple(params[1:])
            return _AnnotatedAlias(origin, metadata)

        def __init_subclass__(cls, *args, **kwargs):
            raise TypeError(
                f"Cannot subclass {cls.__module__}.Annotated"
            )

    def _strip_annotations(t):
        """Strips the annotations from a given type.
        """
        if isinstance(t, _AnnotatedAlias):
            return _strip_annotations(t.__origin__)
        if isinstance(t, typing._GenericAlias):
            stripped_args = tuple(_strip_annotations(a) for a in t.__args__)
            if stripped_args == t.__args__:
                return t
            res = t.copy_with(stripped_args)
            res._special = t._special
            return res
        return t

    def get_type_hints(obj, globalns=None, localns=None, include_extras=False):
        """Return type hints for an object.

        This is often the same as obj.__annotations__, but it handles
        forward references encoded as string literals, adds Optional[t] if a
        default value equal to None is set and recursively replaces all
        'Annotated[T, ...]' with 'T' (unless 'include_extras=True').

        The argument may be a module, class, method, or function. The annotations
        are returned as a dictionary. For classes, annotations include also
        inherited members.

        TypeError is raised if the argument is not of a type that can contain
        annotations, and an empty dictionary is returned if no annotations are
        present.

        BEWARE -- the behavior of globalns and localns is counterintuitive
        (unless you are familiar with how eval() and exec() work).  The
        search order is locals first, then globals.

        - If no dict arguments are passed, an attempt is made to use the
          globals from obj (or the respective module's globals for classes),
          and these are also used as the locals.  If the object does not appear
          to have globals, an empty dictionary is used.

        - If one dict argument is passed, it is used for both globals and
          locals.

        - If two dict arguments are passed, they specify globals and
          locals, respectively.
        """
        hint = typing.get_type_hints(obj, globalns=globalns, localns=localns)
        if include_extras:
            return hint
        return {k: _strip_annotations(t) for k, t in hint.items()}
# 3.6
else:

    def _is_dunder(name):
        """Returns True if name is a __dunder_variable_name__."""
        return len(name) > 4 and name.startswith('__') and name.endswith('__')

    # Prior to Python 3.7 types did not have `copy_with`. A lot of the equality
    # checks, argument expansion etc. are done on the _subs_tre. As a result we
    # can't provide a get_type_hints function that strips out annotations.

    class AnnotatedMeta(typing.GenericMeta):
        """Metaclass for Annotated"""

        def __new__(cls, name, bases, namespace, **kwargs):
            if any(b is not object for b in bases):
                raise TypeError("Cannot subclass " + str(Annotated))
            return super().__new__(cls, name, bases, namespace, **kwargs)

        @property
        def __metadata__(self):
            return self._subs_tree()[2]

        def _tree_repr(self, tree):
            cls, origin, metadata = tree
            if not isinstance(origin, tuple):
                tp_repr = typing._type_repr(origin)
            else:
                tp_repr = origin[0]._tree_repr(origin)
            metadata_reprs = ", ".join(repr(arg) for arg in metadata)
            return f'{cls}[{tp_repr}, {metadata_reprs}]'

        def _subs_tree(self, tvars=None, args=None):  # noqa
            if self is Annotated:
                return Annotated
            res = super()._subs_tree(tvars=tvars, args=args)
            # Flatten nested Annotated
            if isinstance(res[1], tuple) and res[1][0] is Annotated:
                sub_tp = res[1][1]
                sub_annot = res[1][2]
                return (Annotated, sub_tp, sub_annot + res[2])
            return res

        def _get_cons(self):
            """Return the class used to create instance of this type."""
            if self.__origin__ is None:
                raise TypeError("Cannot get the underlying type of a "
                                "non-specialized Annotated type.")
            tree = self._subs_tree()
            while isinstance(tree, tuple) and tree[0] is Annotated:
                tree = tree[1]
            if isinstance(tree, tuple):
                return tree[0]
            else:
                return tree

        @typing._tp_cache
        def __getitem__(self, params):
            if not isinstance(params, tuple):
                params = (params,)
            if self.__origin__ is not None:  # specializing an instantiated type
                return super().__getitem__(params)
            elif not isinstance(params, tuple) or len(params) < 2:
                raise TypeError("Annotated[...] should be instantiated "
                                "with at least two arguments (a type and an "
                                "annotation).")
            else:
                msg = "Annotated[t, ...]: t must be a type."
                tp = typing._type_check(params[0], msg)
                metadata = tuple(params[1:])
            return self.__class__(
                self.__name__,
                self.__bases__,
                _no_slots_copy(self.__dict__),
                tvars=_type_vars((tp,)),
                # Metadata is a tuple so it won't be touched by _replace_args et al.
                args=(tp, metadata),
                origin=self,
            )

        def __call__(self, *args, **kwargs):
            cons = self._get_cons()
            result = cons(*args, **kwargs)
            try:
                result.__orig_class__ = self
            except AttributeError:
                pass
            return result

        def __getattr__(self, attr):
            # For simplicity we just don't relay all dunder names
            if self.__origin__ is not None and not _is_dunder(attr):
                return getattr(self._get_cons(), attr)
            raise AttributeError(attr)

        def __setattr__(self, attr, value):
            if _is_dunder(attr) or attr.startswith('_abc_'):
                super().__setattr__(attr, value)
            elif self.__origin__ is None:
                raise AttributeError(attr)
            else:
                setattr(self._get_cons(), attr, value)

        def __instancecheck__(self, obj):
            raise TypeError("Annotated cannot be used with isinstance().")

        def __subclasscheck__(self, cls):
            raise TypeError("Annotated cannot be used with issubclass().")

    class Annotated(metaclass=AnnotatedMeta):
        """Add context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to the
        hypothetical runtime_check module that this type is an unsigned int.
        Every other consumer of this type can ignore this metadata and treat
        this type as int.

        The first argument to Annotated must be a valid type, the remaining
        arguments are kept as a tuple in the __metadata__ field.

        Details:

        - It's an error to call `Annotated` with less than two arguments.
        - Nested Annotated are flattened::

            Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

        - Instantiating an annotated type is equivalent to instantiating the
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can be used as a generic type alias::

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
        """

# Python 3.8 has get_origin() and get_args() but those implementations aren't
# Annotated-aware, so we can't use those. Python 3.9's versions don't support
# ParamSpecArgs and ParamSpecKwargs, so only Python 3.10's versions will do.
if sys.version_info[:2] >= (3, 10):
    get_origin = typing.get_origin
    get_args = typing.get_args
# 3.7-3.9
elif PEP_560:
    try:
        # 3.9+
        from typing import _BaseGenericAlias
    except ImportError:
        _BaseGenericAlias = typing._GenericAlias
    try:
        # 3.9+
        from typing import GenericAlias
    except ImportError:
        GenericAlias = typing._GenericAlias

    def get_origin(tp):
        """Get the unsubscripted version of a type.

        This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
        and Annotated. Return None for unsupported types. Examples::

            get_origin(Literal[42]) is Literal
            get_origin(int) is None
            get_origin(ClassVar[int]) is ClassVar
            get_origin(Generic) is Generic
            get_origin(Generic[T]) is Generic
            get_origin(Union[T, int]) is Union
            get_origin(List[Tuple[T, T]][int]) == list
            get_origin(P.args) is P
        """
        if isinstance(tp, _AnnotatedAlias):
            return Annotated
        if isinstance(tp, (typing._GenericAlias, GenericAlias, _BaseGenericAlias,
                           ParamSpecArgs, ParamSpecKwargs)):
            return tp.__origin__
        if tp is typing.Generic:
            return typing.Generic
        return None

    def get_args(tp):
        """Get type arguments with all substitutions performed.

        For unions, basic simplifications used by Union constructor are performed.
        Examples::
            get_args(Dict[str, int]) == (str, int)
            get_args(int) == ()
            get_args(Union[int, Union[T, int], str][int]) == (int, str)
            get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
            get_args(Callable[[], T][int]) == ([], int)
        """
        if isinstance(tp, _AnnotatedAlias):
            return (tp.__origin__,) + tp.__metadata__
        if isinstance(tp, (typing._GenericAlias, GenericAlias)):
            if getattr(tp, "_special", False):
                return ()
            res = tp.__args__
            if get_origin(tp) is collections.abc.Callable and res[0] is not Ellipsis:
                res = (list(res[:-1]), res[-1])
            return res
        return ()


# 3.10+
if hasattr(typing, 'TypeAlias'):
    TypeAlias = typing.TypeAlias
# 3.9
elif sys.version_info[:2] >= (3, 9):
    class _TypeAliasForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    @_TypeAliasForm
    def TypeAlias(self, parameters):
        """Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example above.
        """
        raise TypeError(f"{self} is not subscriptable")
# 3.7-3.8
elif sys.version_info[:2] >= (3, 7):
    class _TypeAliasForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    TypeAlias = _TypeAliasForm('TypeAlias',
                               doc="""Special marker indicating that an assignment should
                               be recognized as a proper type alias definition by type
                               checkers.

                               For example::

                                   Predicate: TypeAlias = Callable[..., bool]

                               It's invalid when used anywhere except as in the example
                               above.""")
# 3.6
else:
    class _TypeAliasMeta(typing.TypingMeta):
        """Metaclass for TypeAlias"""

        def __repr__(self):
            return 'typing_extensions.TypeAlias'

    class _TypeAliasBase(typing._FinalTypingBase, metaclass=_TypeAliasMeta, _root=True):
        """Special marker indicating that an assignment should
        be recognized as a proper type alias definition by type
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example above.
        """
        __slots__ = ()

        def __instancecheck__(self, obj):
            raise TypeError("TypeAlias cannot be used with isinstance().")

        def __subclasscheck__(self, cls):
            raise TypeError("TypeAlias cannot be used with issubclass().")

        def __repr__(self):
            return 'typing_extensions.TypeAlias'

    TypeAlias = _TypeAliasBase(_root=True)


# Python 3.10+ has PEP 612
if hasattr(typing, 'ParamSpecArgs'):
    ParamSpecArgs = typing.ParamSpecArgs
    ParamSpecKwargs = typing.ParamSpecKwargs
# 3.6-3.9
else:
    class _Immutable:
        """Mixin to indicate that object should not be copied."""
        __slots__ = ()

        def __copy__(self):
            return self

        def __deepcopy__(self, memo):
            return self

    class ParamSpecArgs(_Immutable):
        """The args for a ParamSpec object.

        Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.

        ParamSpecArgs objects have a reference back to their ParamSpec:

        P.args.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        """
        def __init__(self, origin):
            self.__origin__ = origin

        def __repr__(self):
            return f"{self.__origin__.__name__}.args"

    class ParamSpecKwargs(_Immutable):
        """The kwargs for a ParamSpec object.

        Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.

        ParamSpecKwargs objects have a reference back to their ParamSpec:

        P.kwargs.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        """
        def __init__(self, origin):
            self.__origin__ = origin

        def __repr__(self):
            return f"{self.__origin__.__name__}.kwargs"

# 3.10+
if hasattr(typing, 'ParamSpec'):
    ParamSpec = typing.ParamSpec
# 3.6-3.9
else:

    # Inherits from list as a workaround for Callable checks in Python < 3.9.2.
    class ParamSpec(list):
        """Parameter specification variable.

        Usage::

           P = ParamSpec('P')

        Parameter specification variables exist primarily for the benefit of static
        type checkers.  They are used to forward the parameter types of one
        callable to another callable, a pattern commonly found in higher order
        functions and decorators.  They are only valid when used in ``Concatenate``,
        or s the first argument to ``Callable``. In Python 3.10 and higher,
        they are also supported in user-defined Generics at runtime.
        See class Generic for more information on generic types.  An
        example for annotating a decorator::

           T = TypeVar('T')
           P = ParamSpec('P')

           def add_logging(f: Callable[P, T]) -> Callable[P, T]:
               '''A type-safe decorator to add logging to a function.'''
               def inner(*args: P.args, **kwargs: P.kwargs) -> T:
                   logging.info(f'{f.__name__} was called')
                   return f(*args, **kwargs)
               return inner

           @add_logging
           def add_two(x: float, y: float) -> float:
               '''Add two numbers together.'''
               return x + y

        Parameter specification variables defined with covariant=True or
        contravariant=True can be used to declare covariant or contravariant
        generic types.  These keyword arguments are valid, but their actual semantics
        are yet to be decided.  See PEP 612 for details.

        Parameter specification variables can be introspected. e.g.:

           P.__name__ == 'T'
           P.__bound__ == None
           P.__covariant__ == False
           P.__contravariant__ == False

        Note that only parameter specification variables defined in global scope can
        be pickled.
        """

        # Trick Generic __parameters__.
        __class__ = typing.TypeVar

        @property
        def args(self):
            return ParamSpecArgs(self)

        @property
        def kwargs(self):
            return ParamSpecKwargs(self)

        def __init__(self, name, *, bound=None, covariant=False, contravariant=False):
            super().__init__([self])
            self.__name__ = name
            self.__covariant__ = bool(covariant)
            self.__contravariant__ = bool(contravariant)
            if bound:
                self.__bound__ = typing._type_check(bound, 'Bound must be a type.')
            else:
                self.__bound__ = None

            # for pickling:
            try:
                def_mod = sys._getframe(1).f_globals.get('__name__', '__main__')
            except (AttributeError, ValueError):
                def_mod = None
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

        def __repr__(self):
            if self.__covariant__:
                prefix = '+'
            elif self.__contravariant__:
                prefix = '-'
            else:
                prefix = '~'
            return prefix + self.__name__

        def __hash__(self):
            return object.__hash__(self)

        def __eq__(self, other):
            return self is other

        def __reduce__(self):
            return self.__name__

        # Hack to get typing._type_check to pass.
        def __call__(self, *args, **kwargs):
            pass

        if not PEP_560:
            # Only needed in 3.6.
            def _get_type_vars(self, tvars):
                if self not in tvars:
                    tvars.append(self)


# 3.6-3.9
if not hasattr(typing, 'Concatenate'):
    # Inherits from list as a workaround for Callable checks in Python < 3.9.2.
    class _ConcatenateGenericAlias(list):

        # Trick Generic into looking into this for __parameters__.
        if PEP_560:
            __class__ = typing._GenericAlias
        else:
            __class__ = typing._TypingBase

        # Flag in 3.8.
        _special = False
        # Attribute in 3.6 and earlier.
        _gorg = typing.Generic

        def __init__(self, origin, args):
            super().__init__(args)
            self.__origin__ = origin
            self.__args__ = args

        def __repr__(self):
            _type_repr = typing._type_repr
            return (f'{_type_repr(self.__origin__)}'
                    f'[{", ".join(_type_repr(arg) for arg in self.__args__)}]')

        def __hash__(self):
            return hash((self.__origin__, self.__args__))

        # Hack to get typing._type_check to pass in Generic.
        def __call__(self, *args, **kwargs):
            pass

        @property
        def __parameters__(self):
            return tuple(
                tp for tp in self.__args__ if isinstance(tp, (typing.TypeVar, ParamSpec))
            )

        if not PEP_560:
            # Only required in 3.6.
            def _get_type_vars(self, tvars):
                if self.__origin__ and self.__parameters__:
                    typing._get_type_vars(self.__parameters__, tvars)


# 3.6-3.9
@typing._tp_cache
def _concatenate_getitem(self, parameters):
    if parameters == ():
        raise TypeError("Cannot take a Concatenate of no types.")
    if not isinstance(parameters, tuple):
        parameters = (parameters,)
    if not isinstance(parameters[-1], ParamSpec):
        raise TypeError("The last parameter to Concatenate should be a "
                        "ParamSpec variable.")
    msg = "Concatenate[arg, ...]: each arg must be a type."
    parameters = tuple(typing._type_check(p, msg) for p in parameters)
    return _ConcatenateGenericAlias(self, parameters)


# 3.10+
if hasattr(typing, 'Concatenate'):
    Concatenate = typing.Concatenate
    _ConcatenateGenericAlias = typing._ConcatenateGenericAlias # noqa
# 3.9
elif sys.version_info[:2] >= (3, 9):
    @_TypeAliasForm
    def Concatenate(self, parameters):
        """Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        """
        return _concatenate_getitem(self, parameters)
# 3.7-8
elif sys.version_info[:2] >= (3, 7):
    class _ConcatenateForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            return _concatenate_getitem(self, parameters)

    Concatenate = _ConcatenateForm(
        'Concatenate',
        doc="""Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        """)
# 3.6
else:
    class _ConcatenateAliasMeta(typing.TypingMeta):
        """Metaclass for Concatenate."""

        def __repr__(self):
            return 'typing_extensions.Concatenate'

    class _ConcatenateAliasBase(typing._FinalTypingBase,
                                metaclass=_ConcatenateAliasMeta,
                                _root=True):
        """Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        """
        __slots__ = ()

        def __instancecheck__(self, obj):
            raise TypeError("Concatenate cannot be used with isinstance().")

        def __subclasscheck__(self, cls):
            raise TypeError("Concatenate cannot be used with issubclass().")

        def __repr__(self):
            return 'typing_extensions.Concatenate'

        def __getitem__(self, parameters):
            return _concatenate_getitem(self, parameters)

    Concatenate = _ConcatenateAliasBase(_root=True)

# 3.10+
if hasattr(typing, 'TypeGuard'):
    TypeGuard = typing.TypeGuard
# 3.9
elif sys.version_info[:2] >= (3, 9):
    class _TypeGuardForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    @_TypeGuardForm
    def TypeGuard(self, parameters):
        """Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        """
        item = typing._type_check(parameters, f'{self} accepts only single type.')
        return typing._GenericAlias(self, (item,))
# 3.7-3.8
elif sys.version_info[:2] >= (3, 7):
    class _TypeGuardForm(typing._SpecialForm, _root=True):

        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type')
            return typing._GenericAlias(self, (item,))

    TypeGuard = _TypeGuardForm(
        'TypeGuard',
        doc="""Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        """)
# 3.6
else:
    class _TypeGuard(typing._FinalTypingBase, _root=True):
        """Special typing form used to annotate the return type of a user-defined
        type guard function.  ``TypeGuard`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeGuard[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2. If the return value is ``True``, the type of its argument
        is the type inside ``TypeGuard``.

        For example::

            def is_str(val: Union[str, float]):
                # "isinstance" type guard
                if isinstance(val, str):
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The main reason is to allow for things like
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type Guards).
        """

        __slots__ = ('__type__',)

        def __init__(self, tp=None, **kwds):
            self.__type__ = tp

        def __getitem__(self, item):
            cls = type(self)
            if self.__type__ is None:
                return cls(typing._type_check(item,
                           f'{cls.__name__[1:]} accepts only a single type.'),
                           _root=True)
            raise TypeError(f'{cls.__name__[1:]} cannot be further subscripted')

        def _eval_type(self, globalns, localns):
            new_tp = typing._eval_type(self.__type__, globalns, localns)
            if new_tp == self.__type__:
                return self
            return type(self)(new_tp, _root=True)

        def __repr__(self):
            r = super().__repr__()
            if self.__type__ is not None:
                r += f'[{typing._type_repr(self.__type__)}]'
            return r

        def __hash__(self):
            return hash((type(self).__name__, self.__type__))

        def __eq__(self, other):
            if not isinstance(other, _TypeGuard):
                return NotImplemented
            if self.__type__ is not None:
                return self.__type__ == other.__type__
            return self is other

    TypeGuard = _TypeGuard(_root=True)

if hasattr(typing, "Self"):
    Self = typing.Self
elif sys.version_info[:2] >= (3, 7):
    # Vendored from cpython typing._SpecialFrom
    class _SpecialForm(typing._Final, _root=True):
        __slots__ = ('_name', '__doc__', '_getitem')

        def __init__(self, getitem):
            self._getitem = getitem
            self._name = getitem.__name__
            self.__doc__ = getitem.__doc__

        def __getattr__(self, item):
            if item in {'__name__', '__qualname__'}:
                return self._name

            raise AttributeError(item)

        def __mro_entries__(self, bases):
            raise TypeError(f"Cannot subclass {self!r}")

        def __repr__(self):
            return f'typing_extensions.{self._name}'

        def __reduce__(self):
            return self._name

        def __call__(self, *args, **kwds):
            raise TypeError(f"Cannot instantiate {self!r}")

        def __or__(self, other):
            return typing.Union[self, other]

        def __ror__(self, other):
            return typing.Union[other, self]

        def __instancecheck__(self, obj):
            raise TypeError(f"{self} cannot be used with isinstance()")

        def __subclasscheck__(self, cls):
            raise TypeError(f"{self} cannot be used with issubclass()")

        @typing._tp_cache
        def __getitem__(self, parameters):
            return self._getitem(self, parameters)

    @_SpecialForm
    def Self(self, params):
        """Used to spell the type of "self" in classes.

        Example::

          from typing import Self

          class ReturnsSelf:
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        """

        raise TypeError(f"{self} is not subscriptable")
else:
    class _Self(typing._FinalTypingBase, _root=True):
        """Used to spell the type of "self" in classes.

        Example::

          from typing import Self

          class ReturnsSelf:
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        """

        __slots__ = ()

        def __instancecheck__(self, obj):
            raise TypeError(f"{self} cannot be used with isinstance().")

        def __subclasscheck__(self, cls):
            raise TypeError(f"{self} cannot be used with issubclass().")

    Self = _Self(_root=True)


if hasattr(typing, 'Required'):
    Required = typing.Required
    NotRequired = typing.NotRequired
elif sys.version_info[:2] >= (3, 9):
    class _ExtensionsSpecialForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

    @_ExtensionsSpecialForm
    def Required(self, parameters):
        """A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        """
        item = typing._type_check(parameters, f'{self._name} accepts only single type')
        return typing._GenericAlias(self, (item,))

    @_ExtensionsSpecialForm
    def NotRequired(self, parameters):
        """A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        """
        item = typing._type_check(parameters, f'{self._name} accepts only single type')
        return typing._GenericAlias(self, (item,))

elif sys.version_info[:2] >= (3, 7):
    class _RequiredForm(typing._SpecialForm, _root=True):
        def __repr__(self):
            return 'typing_extensions.' + self._name

        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      '{} accepts only single type'.format(self._name))
            return typing._GenericAlias(self, (item,))

    Required = _RequiredForm(
        'Required',
        doc="""A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        """)
    NotRequired = _RequiredForm(
        'NotRequired',
        doc="""A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        """)
else:
    # NOTE: Modeled after _Final's implementation when _FinalTypingBase available
    class _MaybeRequired(typing._FinalTypingBase, _root=True):
        __slots__ = ('__type__',)

        def __init__(self, tp=None, **kwds):
            self.__type__ = tp

        def __getitem__(self, item):
            cls = type(self)
            if self.__type__ is None:
                return cls(typing._type_check(item,
                           '{} accepts only single type.'.format(cls.__name__[1:])),
                           _root=True)
            raise TypeError('{} cannot be further subscripted'
                            .format(cls.__name__[1:]))

        def _eval_type(self, globalns, localns):
            new_tp = typing._eval_type(self.__type__, globalns, localns)
            if new_tp == self.__type__:
                return self
            return type(self)(new_tp, _root=True)

        def __repr__(self):
            r = super().__repr__()
            if self.__type__ is not None:
                r += '[{}]'.format(typing._type_repr(self.__type__))
            return r

        def __hash__(self):
            return hash((type(self).__name__, self.__type__))

        def __eq__(self, other):
            if not isinstance(other, type(self)):
                return NotImplemented
            if self.__type__ is not None:
                return self.__type__ == other.__type__
            return self is other

    class _Required(_MaybeRequired, _root=True):
        """A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        """

    class _NotRequired(_MaybeRequired, _root=True):
        """A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        """

    Required = _Required(_root=True)
    NotRequired = _NotRequired(_root=True)
python3.12/site-packages/setuptools/build_meta.py000064400000044356151732704160016033 0ustar00"""A PEP 517 interface to setuptools

Previously, when a user or a command line tool (let's call it a "frontend")
needed to make a request of setuptools to take a certain action, for
example, generating a list of installation requirements, the frontend would
would call "setup.py egg_info" or "setup.py bdist_wheel" on the command line.

PEP 517 defines a different method of interfacing with setuptools. Rather
than calling "setup.py" directly, the frontend should:

  1. Set the current directory to the directory with a setup.py file
  2. Import this module into a safe python interpreter (one in which
     setuptools can potentially set global variables or crash hard).
  3. Call one of the functions defined in PEP 517.

What each function does is defined in PEP 517. However, here is a "casual"
definition of the functions (this definition should not be relied on for
bug reports or API stability):

  - `build_wheel`: build a wheel in the folder and return the basename
  - `get_requires_for_build_wheel`: get the `setup_requires` to build
  - `prepare_metadata_for_build_wheel`: get the `install_requires`
  - `build_sdist`: build an sdist in the folder and return the basename
  - `get_requires_for_build_sdist`: get the `setup_requires` to build

Again, this is not a formal definition! Just a "taste" of the module.
"""

import io
import os
import shlex
import sys
import tokenize
import shutil
import contextlib
import tempfile
import warnings
from pathlib import Path
from typing import Dict, Iterator, List, Optional, Union

import setuptools
import distutils
from . import errors
from ._path import same_path
from ._reqs import parse_strings
from .warnings import SetuptoolsDeprecationWarning
from distutils.util import strtobool


__all__ = [
    'get_requires_for_build_sdist',
    'get_requires_for_build_wheel',
    'prepare_metadata_for_build_wheel',
    'build_wheel',
    'build_sdist',
    'get_requires_for_build_editable',
    'prepare_metadata_for_build_editable',
    'build_editable',
    '__legacy__',
    'SetupRequirementsError',
]

SETUPTOOLS_ENABLE_FEATURES = os.getenv("SETUPTOOLS_ENABLE_FEATURES", "").lower()
LEGACY_EDITABLE = "legacy-editable" in SETUPTOOLS_ENABLE_FEATURES.replace("_", "-")


class SetupRequirementsError(BaseException):
    def __init__(self, specifiers):
        self.specifiers = specifiers


class Distribution(setuptools.dist.Distribution):
    def fetch_build_eggs(self, specifiers):
        specifier_list = list(parse_strings(specifiers))

        raise SetupRequirementsError(specifier_list)

    @classmethod
    @contextlib.contextmanager
    def patch(cls):
        """
        Replace
        distutils.dist.Distribution with this class
        for the duration of this context.
        """
        orig = distutils.core.Distribution
        distutils.core.Distribution = cls
        try:
            yield
        finally:
            distutils.core.Distribution = orig


@contextlib.contextmanager
def no_install_setup_requires():
    """Temporarily disable installing setup_requires

    Under PEP 517, the backend reports build dependencies to the frontend,
    and the frontend is responsible for ensuring they're installed.
    So setuptools (acting as a backend) should not try to install them.
    """
    orig = setuptools._install_setup_requires
    setuptools._install_setup_requires = lambda attrs: None
    try:
        yield
    finally:
        setuptools._install_setup_requires = orig


def _get_immediate_subdirectories(a_dir):
    return [
        name for name in os.listdir(a_dir) if os.path.isdir(os.path.join(a_dir, name))
    ]


def _file_with_extension(directory, extension):
    matching = (f for f in os.listdir(directory) if f.endswith(extension))
    try:
        (file,) = matching
    except ValueError:
        raise ValueError(
            'No distribution was found. Ensure that `setup.py` '
            'is not empty and that it calls `setup()`.'
        )
    return file


def _open_setup_script(setup_script):
    if not os.path.exists(setup_script):
        # Supply a default setup.py
        return io.StringIO(u"from setuptools import setup; setup()")

    return getattr(tokenize, 'open', open)(setup_script)


@contextlib.contextmanager
def suppress_known_deprecation():
    with warnings.catch_warnings():
        warnings.filterwarnings('ignore', 'setup.py install is deprecated')
        yield


_ConfigSettings = Optional[Dict[str, Union[str, List[str], None]]]
"""
Currently the user can run::

    pip install -e . --config-settings key=value
    python -m build -C--key=value -C key=value

- pip will pass both key and value as strings and overwriting repeated keys
  (pypa/pip#11059).
- build will accumulate values associated with repeated keys in a list.
  It will also accept keys with no associated value.
  This means that an option passed by build can be ``str | list[str] | None``.
- PEP 517 specifies that ``config_settings`` is an optional dict.
"""


class _ConfigSettingsTranslator:
    """Translate ``config_settings`` into distutils-style command arguments.
    Only a limited number of options is currently supported.
    """

    # See pypa/setuptools#1928 pypa/setuptools#2491

    def _get_config(self, key: str, config_settings: _ConfigSettings) -> List[str]:
        """
        Get the value of a specific key in ``config_settings`` as a list of strings.

        >>> fn = _ConfigSettingsTranslator()._get_config
        >>> fn("--global-option", None)
        []
        >>> fn("--global-option", {})
        []
        >>> fn("--global-option", {'--global-option': 'foo'})
        ['foo']
        >>> fn("--global-option", {'--global-option': ['foo']})
        ['foo']
        >>> fn("--global-option", {'--global-option': 'foo'})
        ['foo']
        >>> fn("--global-option", {'--global-option': 'foo bar'})
        ['foo', 'bar']
        """
        cfg = config_settings or {}
        opts = cfg.get(key) or []
        return shlex.split(opts) if isinstance(opts, str) else opts

    def _global_args(self, config_settings: _ConfigSettings) -> Iterator[str]:
        """
        Let the user specify ``verbose`` or ``quiet`` + escape hatch via
        ``--global-option``.
        Note: ``-v``, ``-vv``, ``-vvv`` have similar effects in setuptools,
        so we just have to cover the basic scenario ``-v``.

        >>> fn = _ConfigSettingsTranslator()._global_args
        >>> list(fn(None))
        []
        >>> list(fn({"verbose": "False"}))
        ['-q']
        >>> list(fn({"verbose": "1"}))
        ['-v']
        >>> list(fn({"--verbose": None}))
        ['-v']
        >>> list(fn({"verbose": "true", "--global-option": "-q --no-user-cfg"}))
        ['-v', '-q', '--no-user-cfg']
        >>> list(fn({"--quiet": None}))
        ['-q']
        """
        cfg = config_settings or {}
        falsey = {"false", "no", "0", "off"}
        if "verbose" in cfg or "--verbose" in cfg:
            level = str(cfg.get("verbose") or cfg.get("--verbose") or "1")
            yield ("-q" if level.lower() in falsey else "-v")
        if "quiet" in cfg or "--quiet" in cfg:
            level = str(cfg.get("quiet") or cfg.get("--quiet") or "1")
            yield ("-v" if level.lower() in falsey else "-q")

        yield from self._get_config("--global-option", config_settings)

    def __dist_info_args(self, config_settings: _ConfigSettings) -> Iterator[str]:
        """
        The ``dist_info`` command accepts ``tag-date`` and ``tag-build``.

        .. warning::
           We cannot use this yet as it requires the ``sdist`` and ``bdist_wheel``
           commands run in ``build_sdist`` and ``build_wheel`` to reuse the egg-info
           directory created in ``prepare_metadata_for_build_wheel``.

        >>> fn = _ConfigSettingsTranslator()._ConfigSettingsTranslator__dist_info_args
        >>> list(fn(None))
        []
        >>> list(fn({"tag-date": "False"}))
        ['--no-date']
        >>> list(fn({"tag-date": None}))
        ['--no-date']
        >>> list(fn({"tag-date": "true", "tag-build": ".a"}))
        ['--tag-date', '--tag-build', '.a']
        """
        cfg = config_settings or {}
        if "tag-date" in cfg:
            val = strtobool(str(cfg["tag-date"] or "false"))
            yield ("--tag-date" if val else "--no-date")
        if "tag-build" in cfg:
            yield from ["--tag-build", str(cfg["tag-build"])]

    def _editable_args(self, config_settings: _ConfigSettings) -> Iterator[str]:
        """
        The ``editable_wheel`` command accepts ``editable-mode=strict``.

        >>> fn = _ConfigSettingsTranslator()._editable_args
        >>> list(fn(None))
        []
        >>> list(fn({"editable-mode": "strict"}))
        ['--mode', 'strict']
        """
        cfg = config_settings or {}
        mode = cfg.get("editable-mode") or cfg.get("editable_mode")
        if not mode:
            return
        yield from ["--mode", str(mode)]

    def _arbitrary_args(self, config_settings: _ConfigSettings) -> Iterator[str]:
        """
        Users may expect to pass arbitrary lists of arguments to a command
        via "--global-option" (example provided in PEP 517 of a "escape hatch").

        >>> fn = _ConfigSettingsTranslator()._arbitrary_args
        >>> list(fn(None))
        []
        >>> list(fn({}))
        []
        >>> list(fn({'--build-option': 'foo'}))
        ['foo']
        >>> list(fn({'--build-option': ['foo']}))
        ['foo']
        >>> list(fn({'--build-option': 'foo'}))
        ['foo']
        >>> list(fn({'--build-option': 'foo bar'}))
        ['foo', 'bar']
        >>> list(fn({'--global-option': 'foo'}))
        []
        """
        yield from self._get_config("--build-option", config_settings)


class _BuildMetaBackend(_ConfigSettingsTranslator):
    def _get_build_requires(self, config_settings, requirements):
        sys.argv = [
            *sys.argv[:1],
            *self._global_args(config_settings),
            "egg_info",
        ]
        try:
            with Distribution.patch():
                self.run_setup()
        except SetupRequirementsError as e:
            requirements += e.specifiers

        return requirements

    def run_setup(self, setup_script='setup.py'):
        # Note that we can reuse our build directory between calls
        # Correctness comes first, then optimization later
        __file__ = os.path.abspath(setup_script)
        __name__ = '__main__'

        with _open_setup_script(__file__) as f:
            code = f.read().replace(r'\r\n', r'\n')

        try:
            exec(code, locals())
        except SystemExit as e:
            if e.code:
                raise
            # We ignore exit code indicating success
            SetuptoolsDeprecationWarning.emit(
                "Running `setup.py` directly as CLI tool is deprecated.",
                "Please avoid using `sys.exit(0)` or similar statements "
                "that don't fit in the paradigm of a configuration file.",
                see_url="https://blog.ganssle.io/articles/2021/10/"
                "setup-py-deprecated.html",
            )

    def get_requires_for_build_wheel(self, config_settings=None):
        return self._get_build_requires(config_settings, requirements=['wheel'])

    def get_requires_for_build_sdist(self, config_settings=None):
        return self._get_build_requires(config_settings, requirements=[])

    def _bubble_up_info_directory(self, metadata_directory: str, suffix: str) -> str:
        """
        PEP 517 requires that the .dist-info directory be placed in the
        metadata_directory. To comply, we MUST copy the directory to the root.

        Returns the basename of the info directory, e.g. `proj-0.0.0.dist-info`.
        """
        info_dir = self._find_info_directory(metadata_directory, suffix)
        if not same_path(info_dir.parent, metadata_directory):
            shutil.move(str(info_dir), metadata_directory)
            # PEP 517 allow other files and dirs to exist in metadata_directory
        return info_dir.name

    def _find_info_directory(self, metadata_directory: str, suffix: str) -> Path:
        for parent, dirs, _ in os.walk(metadata_directory):
            candidates = [f for f in dirs if f.endswith(suffix)]

            if len(candidates) != 0 or len(dirs) != 1:
                assert len(candidates) == 1, f"Multiple {suffix} directories found"
                return Path(parent, candidates[0])

        msg = f"No {suffix} directory found in {metadata_directory}"
        raise errors.InternalError(msg)

    def prepare_metadata_for_build_wheel(
        self, metadata_directory, config_settings=None
    ):
        sys.argv = [
            *sys.argv[:1],
            *self._global_args(config_settings),
            "dist_info",
            "--output-dir",
            metadata_directory,
            "--keep-egg-info",
        ]
        with no_install_setup_requires():
            self.run_setup()

        self._bubble_up_info_directory(metadata_directory, ".egg-info")
        return self._bubble_up_info_directory(metadata_directory, ".dist-info")

    def _build_with_temp_dir(
        self, setup_command, result_extension, result_directory, config_settings
    ):
        result_directory = os.path.abspath(result_directory)

        # Build in a temporary directory, then copy to the target.
        os.makedirs(result_directory, exist_ok=True)
        temp_opts = {"prefix": ".tmp-", "dir": result_directory}

        with tempfile.TemporaryDirectory(**temp_opts) as tmp_dist_dir:
            sys.argv = [
                *sys.argv[:1],
                *self._global_args(config_settings),
                *setup_command,
                "--dist-dir",
                tmp_dist_dir,
            ]
            with no_install_setup_requires():
                self.run_setup()

            result_basename = _file_with_extension(tmp_dist_dir, result_extension)
            result_path = os.path.join(result_directory, result_basename)
            if os.path.exists(result_path):
                # os.rename will fail overwriting on non-Unix.
                os.remove(result_path)
            os.rename(os.path.join(tmp_dist_dir, result_basename), result_path)

        return result_basename

    def build_wheel(
        self, wheel_directory, config_settings=None, metadata_directory=None
    ):
        with suppress_known_deprecation():
            return self._build_with_temp_dir(
                ['bdist_wheel', *self._arbitrary_args(config_settings)],
                '.whl',
                wheel_directory,
                config_settings,
            )

    def build_sdist(self, sdist_directory, config_settings=None):
        return self._build_with_temp_dir(
            ['sdist', '--formats', 'gztar'], '.tar.gz', sdist_directory, config_settings
        )

    def _get_dist_info_dir(self, metadata_directory: Optional[str]) -> Optional[str]:
        if not metadata_directory:
            return None
        dist_info_candidates = list(Path(metadata_directory).glob("*.dist-info"))
        assert len(dist_info_candidates) <= 1
        return str(dist_info_candidates[0]) if dist_info_candidates else None

    if not LEGACY_EDITABLE:
        # PEP660 hooks:
        # build_editable
        # get_requires_for_build_editable
        # prepare_metadata_for_build_editable
        def build_editable(
            self, wheel_directory, config_settings=None, metadata_directory=None
        ):
            # XXX can or should we hide our editable_wheel command normally?
            info_dir = self._get_dist_info_dir(metadata_directory)
            opts = ["--dist-info-dir", info_dir] if info_dir else []
            cmd = ["editable_wheel", *opts, *self._editable_args(config_settings)]
            with suppress_known_deprecation():
                return self._build_with_temp_dir(
                    cmd, ".whl", wheel_directory, config_settings
                )

        def get_requires_for_build_editable(self, config_settings=None):
            return self.get_requires_for_build_wheel(config_settings)

        def prepare_metadata_for_build_editable(
            self, metadata_directory, config_settings=None
        ):
            return self.prepare_metadata_for_build_wheel(
                metadata_directory, config_settings
            )


class _BuildMetaLegacyBackend(_BuildMetaBackend):
    """Compatibility backend for setuptools

    This is a version of setuptools.build_meta that endeavors
    to maintain backwards
    compatibility with pre-PEP 517 modes of invocation. It
    exists as a temporary
    bridge between the old packaging mechanism and the new
    packaging mechanism,
    and will eventually be removed.
    """

    def run_setup(self, setup_script='setup.py'):
        # In order to maintain compatibility with scripts assuming that
        # the setup.py script is in a directory on the PYTHONPATH, inject
        # '' into sys.path. (pypa/setuptools#1642)
        sys_path = list(sys.path)  # Save the original path

        script_dir = os.path.dirname(os.path.abspath(setup_script))
        if script_dir not in sys.path:
            sys.path.insert(0, script_dir)

        # Some setup.py scripts (e.g. in pygame and numpy) use sys.argv[0] to
        # get the directory of the source code. They expect it to refer to the
        # setup.py script.
        sys_argv_0 = sys.argv[0]
        sys.argv[0] = setup_script

        try:
            super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        finally:
            # While PEP 517 frontends should be calling each hook in a fresh
            # subprocess according to the standard (and thus it should not be
            # strictly necessary to restore the old sys.path), we'll restore
            # the original path so that the path manipulation does not persist
            # within the hook after run_setup is called.
            sys.path[:] = sys_path
            sys.argv[0] = sys_argv_0


# The primary backend
_BACKEND = _BuildMetaBackend()

get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel
get_requires_for_build_sdist = _BACKEND.get_requires_for_build_sdist
prepare_metadata_for_build_wheel = _BACKEND.prepare_metadata_for_build_wheel
build_wheel = _BACKEND.build_wheel
build_sdist = _BACKEND.build_sdist

if not LEGACY_EDITABLE:
    get_requires_for_build_editable = _BACKEND.get_requires_for_build_editable
    prepare_metadata_for_build_editable = _BACKEND.prepare_metadata_for_build_editable
    build_editable = _BACKEND.build_editable


# The legacy backend
__legacy__ = _BuildMetaLegacyBackend()
python3.12/site-packages/setuptools/warnings.py000064400000007161151732704160015547 0ustar00"""Provide basic warnings used by setuptools modules.

Using custom classes (other than ``UserWarning``) allow users to set
``PYTHONWARNINGS`` filters to run tests and prepare for upcoming changes in
setuptools.
"""

import os
import warnings
from datetime import date
from inspect import cleandoc
from textwrap import indent
from typing import Optional, Tuple

_DueDate = Tuple[int, int, int]  # time tuple
_INDENT = 8 * " "
_TEMPLATE = f"""{80 * '*'}\n{{details}}\n{80 * '*'}"""


class SetuptoolsWarning(UserWarning):
    """Base class in ``setuptools`` warning hierarchy."""

    @classmethod
    def emit(
        cls,
        summary: Optional[str] = None,
        details: Optional[str] = None,
        due_date: Optional[_DueDate] = None,
        see_docs: Optional[str] = None,
        see_url: Optional[str] = None,
        stacklevel: int = 2,
        **kwargs,
    ):
        """Private: reserved for ``setuptools`` internal use only"""
        # Default values:
        summary_ = summary or getattr(cls, "_SUMMARY", None) or ""
        details_ = details or getattr(cls, "_DETAILS", None) or ""
        due_date = due_date or getattr(cls, "_DUE_DATE", None)
        docs_ref = see_docs or getattr(cls, "_SEE_DOCS", None)
        docs_url = docs_ref and f"https://setuptools.pypa.io/en/latest/{docs_ref}"
        see_url = see_url or getattr(cls, "_SEE_URL", None)
        due = date(*due_date) if due_date else None

        text = cls._format(summary_, details_, due, see_url or docs_url, kwargs)
        if due and due < date.today() and _should_enforce():
            raise cls(text)
        warnings.warn(text, cls, stacklevel=stacklevel + 1)

    @classmethod
    def _format(
        cls,
        summary: str,
        details: str,
        due_date: Optional[date] = None,
        see_url: Optional[str] = None,
        format_args: Optional[dict] = None,
    ):
        """Private: reserved for ``setuptools`` internal use only"""
        today = date.today()
        summary = cleandoc(summary).format_map(format_args or {})
        possible_parts = [
            cleandoc(details).format_map(format_args or {}),
            (
                f"\nBy {due_date:%Y-%b-%d}, you need to update your project and remove "
                "deprecated calls\nor your builds will no longer be supported."
                if due_date and due_date > today
                else None
            ),
            (
                "\nThis deprecation is overdue, please update your project and remove "
                "deprecated\ncalls to avoid build errors in the future."
                if due_date and due_date < today
                else None
            ),
            (f"\nSee {see_url} for details." if see_url else None),
        ]
        parts = [x for x in possible_parts if x]
        if parts:
            body = indent(_TEMPLATE.format(details="\n".join(parts)), _INDENT)
            return "\n".join([summary, "!!\n", body, "\n!!"])
        return summary


class InformationOnly(SetuptoolsWarning):
    """Currently there is no clear way of displaying messages to the users
    that use the setuptools backend directly via ``pip``.
    The only thing that might work is a warning, although it is not the
    most appropriate tool for the job...

    See pypa/packaging-problems#558.
    """


class SetuptoolsDeprecationWarning(SetuptoolsWarning):
    """
    Base class for warning deprecations in ``setuptools``

    This class is not derived from ``DeprecationWarning``, and as such is
    visible by default.
    """


def _should_enforce():
    enforce = os.getenv("SETUPTOOLS_ENFORCE_DEPRECATION", "false").lower()
    return enforce in ("true", "on", "ok", "1")
python3.12/site-packages/setuptools/_core_metadata.py000064400000021331151732704160016641 0ustar00"""
Handling of Core Metadata for Python packages (including reading and writing).

See: https://packaging.python.org/en/latest/specifications/core-metadata/
"""
import os
import stat
import textwrap
from email import message_from_file
from email.message import Message
from tempfile import NamedTemporaryFile
from typing import Optional, List

from distutils.util import rfc822_escape

from . import _normalization, _reqs
from .extern.packaging.markers import Marker
from .extern.packaging.requirements import Requirement
from .extern.packaging.version import Version
from .warnings import SetuptoolsDeprecationWarning


def get_metadata_version(self):
    mv = getattr(self, 'metadata_version', None)
    if mv is None:
        mv = Version('2.1')
        self.metadata_version = mv
    return mv


def rfc822_unescape(content: str) -> str:
    """Reverse RFC-822 escaping by removing leading whitespaces from content."""
    lines = content.splitlines()
    if len(lines) == 1:
        return lines[0].lstrip()
    return '\n'.join((lines[0].lstrip(), textwrap.dedent('\n'.join(lines[1:]))))


def _read_field_from_msg(msg: Message, field: str) -> Optional[str]:
    """Read Message header field."""
    value = msg[field]
    if value == 'UNKNOWN':
        return None
    return value


def _read_field_unescaped_from_msg(msg: Message, field: str) -> Optional[str]:
    """Read Message header field and apply rfc822_unescape."""
    value = _read_field_from_msg(msg, field)
    if value is None:
        return value
    return rfc822_unescape(value)


def _read_list_from_msg(msg: Message, field: str) -> Optional[List[str]]:
    """Read Message header field and return all results as list."""
    values = msg.get_all(field, None)
    if values == []:
        return None
    return values


def _read_payload_from_msg(msg: Message) -> Optional[str]:
    value = msg.get_payload().strip()
    if value == 'UNKNOWN' or not value:
        return None
    return value


def read_pkg_file(self, file):
    """Reads the metadata values from a file object."""
    msg = message_from_file(file)

    self.metadata_version = Version(msg['metadata-version'])
    self.name = _read_field_from_msg(msg, 'name')
    self.version = _read_field_from_msg(msg, 'version')
    self.description = _read_field_from_msg(msg, 'summary')
    # we are filling author only.
    self.author = _read_field_from_msg(msg, 'author')
    self.maintainer = None
    self.author_email = _read_field_from_msg(msg, 'author-email')
    self.maintainer_email = None
    self.url = _read_field_from_msg(msg, 'home-page')
    self.download_url = _read_field_from_msg(msg, 'download-url')
    self.license = _read_field_unescaped_from_msg(msg, 'license')

    self.long_description = _read_field_unescaped_from_msg(msg, 'description')
    if self.long_description is None and self.metadata_version >= Version('2.1'):
        self.long_description = _read_payload_from_msg(msg)
    self.description = _read_field_from_msg(msg, 'summary')

    if 'keywords' in msg:
        self.keywords = _read_field_from_msg(msg, 'keywords').split(',')

    self.platforms = _read_list_from_msg(msg, 'platform')
    self.classifiers = _read_list_from_msg(msg, 'classifier')

    # PEP 314 - these fields only exist in 1.1
    if self.metadata_version == Version('1.1'):
        self.requires = _read_list_from_msg(msg, 'requires')
        self.provides = _read_list_from_msg(msg, 'provides')
        self.obsoletes = _read_list_from_msg(msg, 'obsoletes')
    else:
        self.requires = None
        self.provides = None
        self.obsoletes = None

    self.license_files = _read_list_from_msg(msg, 'license-file')


def single_line(val):
    """
    Quick and dirty validation for Summary pypa/setuptools#1390.
    """
    if '\n' in val:
        # TODO: Replace with `raise ValueError("newlines not allowed")`
        # after reviewing #2893.
        msg = "newlines are not allowed in `summary` and will break in the future"
        SetuptoolsDeprecationWarning.emit("Invalid config.", msg)
        # due_date is undefined. Controversial change, there was a lot of push back.
        val = val.strip().split('\n')[0]
    return val


def write_pkg_info(self, base_dir):
    """Write the PKG-INFO file into the release tree."""
    temp = ""
    final = os.path.join(base_dir, 'PKG-INFO')
    try:
        # Use a temporary file while writing to avoid race conditions
        # (e.g. `importlib.metadata` reading `.egg-info/PKG-INFO`):
        with NamedTemporaryFile("w", encoding="utf-8", dir=base_dir, delete=False) as f:
            temp = f.name
            self.write_pkg_file(f)
        permissions = stat.S_IMODE(os.lstat(temp).st_mode)
        os.chmod(temp, permissions | stat.S_IRGRP | stat.S_IROTH)
        os.replace(temp, final)  # atomic operation.
    finally:
        if temp and os.path.exists(temp):
            os.remove(temp)


# Based on Python 3.5 version
def write_pkg_file(self, file):  # noqa: C901  # is too complex (14)  # FIXME
    """Write the PKG-INFO format data to a file object."""
    version = self.get_metadata_version()

    def write_field(key, value):
        file.write("%s: %s\n" % (key, value))

    write_field('Metadata-Version', str(version))
    write_field('Name', self.get_name())
    write_field('Version', self.get_version())

    summary = self.get_description()
    if summary:
        write_field('Summary', single_line(summary))

    optional_fields = (
        ('Home-page', 'url'),
        ('Download-URL', 'download_url'),
        ('Author', 'author'),
        ('Author-email', 'author_email'),
        ('Maintainer', 'maintainer'),
        ('Maintainer-email', 'maintainer_email'),
    )

    for field, attr in optional_fields:
        attr_val = getattr(self, attr, None)
        if attr_val is not None:
            write_field(field, attr_val)

    license = self.get_license()
    if license:
        write_field('License', rfc822_escape(license))

    for project_url in self.project_urls.items():
        write_field('Project-URL', '%s, %s' % project_url)

    keywords = ','.join(self.get_keywords())
    if keywords:
        write_field('Keywords', keywords)

    platforms = self.get_platforms() or []
    for platform in platforms:
        write_field('Platform', platform)

    self._write_list(file, 'Classifier', self.get_classifiers())

    # PEP 314
    self._write_list(file, 'Requires', self.get_requires())
    self._write_list(file, 'Provides', self.get_provides())
    self._write_list(file, 'Obsoletes', self.get_obsoletes())

    # Setuptools specific for PEP 345
    if hasattr(self, 'python_requires'):
        write_field('Requires-Python', self.python_requires)

    # PEP 566
    if self.long_description_content_type:
        write_field('Description-Content-Type', self.long_description_content_type)

    self._write_list(file, 'License-File', self.license_files or [])
    _write_requirements(self, file)

    long_description = self.get_long_description()
    if long_description:
        file.write("\n%s" % long_description)
        if not long_description.endswith("\n"):
            file.write("\n")


def _write_requirements(self, file):
    for req in _reqs.parse(self.install_requires):
        file.write(f"Requires-Dist: {req}\n")

    processed_extras = {}
    for augmented_extra, reqs in self.extras_require.items():
        # Historically, setuptools allows "augmented extras": `<extra>:<condition>`
        unsafe_extra, _, condition = augmented_extra.partition(":")
        unsafe_extra = unsafe_extra.strip()
        extra = _normalization.safe_extra(unsafe_extra)

        if extra:
            _write_provides_extra(file, processed_extras, extra, unsafe_extra)
        for req in _reqs.parse_strings(reqs):
            r = _include_extra(req, extra, condition.strip())
            file.write(f"Requires-Dist: {r}\n")

    return processed_extras


def _include_extra(req: str, extra: str, condition: str) -> Requirement:
    r = Requirement(req)  # create a fresh object that can be modified
    parts = (
        f"({r.marker})" if r.marker else None,
        f"({condition})" if condition else None,
        f"extra == {extra!r}" if extra else None,
    )
    r.marker = Marker(" and ".join(x for x in parts if x))
    return r


def _write_provides_extra(file, processed_extras, safe, unsafe):
    previous = processed_extras.get(safe)
    if previous == unsafe:
        SetuptoolsDeprecationWarning.emit(
            'Ambiguity during "extra" normalization for dependencies.',
            f"""
            {previous!r} and {unsafe!r} normalize to the same value:\n
                {safe!r}\n
            In future versions, setuptools might halt the build process.
            """,
            see_url="https://peps.python.org/pep-0685/",
        )
    else:
        processed_extras[safe] = unsafe
        file.write(f"Provides-Extra: {safe}\n")
python3.12/site-packages/setuptools/sandbox.py000064400000034015151732704160015353 0ustar00import os
import sys
import tempfile
import operator
import functools
import itertools
import re
import contextlib
import pickle
import textwrap
import builtins

import pkg_resources
from distutils.errors import DistutilsError
from pkg_resources import working_set

if sys.platform.startswith('java'):
    import org.python.modules.posix.PosixModule as _os
else:
    _os = sys.modules[os.name]
try:
    _file = file
except NameError:
    _file = None
_open = open


__all__ = [
    "AbstractSandbox",
    "DirectorySandbox",
    "SandboxViolation",
    "run_setup",
]


def _execfile(filename, globals, locals=None):
    """
    Python 3 implementation of execfile.
    """
    mode = 'rb'
    with open(filename, mode) as stream:
        script = stream.read()
    if locals is None:
        locals = globals
    code = compile(script, filename, 'exec')
    exec(code, globals, locals)


@contextlib.contextmanager
def save_argv(repl=None):
    saved = sys.argv[:]
    if repl is not None:
        sys.argv[:] = repl
    try:
        yield saved
    finally:
        sys.argv[:] = saved


@contextlib.contextmanager
def save_path():
    saved = sys.path[:]
    try:
        yield saved
    finally:
        sys.path[:] = saved


@contextlib.contextmanager
def override_temp(replacement):
    """
    Monkey-patch tempfile.tempdir with replacement, ensuring it exists
    """
    os.makedirs(replacement, exist_ok=True)

    saved = tempfile.tempdir

    tempfile.tempdir = replacement

    try:
        yield
    finally:
        tempfile.tempdir = saved


@contextlib.contextmanager
def pushd(target):
    saved = os.getcwd()
    os.chdir(target)
    try:
        yield saved
    finally:
        os.chdir(saved)


class UnpickleableException(Exception):
    """
    An exception representing another Exception that could not be pickled.
    """

    @staticmethod
    def dump(type, exc):
        """
        Always return a dumped (pickled) type and exc. If exc can't be pickled,
        wrap it in UnpickleableException first.
        """
        try:
            return pickle.dumps(type), pickle.dumps(exc)
        except Exception:
            # get UnpickleableException inside the sandbox
            from setuptools.sandbox import UnpickleableException as cls

            return cls.dump(cls, cls(repr(exc)))


class ExceptionSaver:
    """
    A Context Manager that will save an exception, serialized, and restore it
    later.
    """

    def __enter__(self):
        return self

    def __exit__(self, type, exc, tb):
        if not exc:
            return

        # dump the exception
        self._saved = UnpickleableException.dump(type, exc)
        self._tb = tb

        # suppress the exception
        return True

    def resume(self):
        "restore and re-raise any exception"

        if '_saved' not in vars(self):
            return

        type, exc = map(pickle.loads, self._saved)
        raise exc.with_traceback(self._tb)


@contextlib.contextmanager
def save_modules():
    """
    Context in which imported modules are saved.

    Translates exceptions internal to the context into the equivalent exception
    outside the context.
    """
    saved = sys.modules.copy()
    with ExceptionSaver() as saved_exc:
        yield saved

    sys.modules.update(saved)
    # remove any modules imported since
    del_modules = (
        mod_name
        for mod_name in sys.modules
        if mod_name not in saved
        # exclude any encodings modules. See #285
        and not mod_name.startswith('encodings.')
    )
    _clear_modules(del_modules)

    saved_exc.resume()


def _clear_modules(module_names):
    for mod_name in list(module_names):
        del sys.modules[mod_name]


@contextlib.contextmanager
def save_pkg_resources_state():
    saved = pkg_resources.__getstate__()
    try:
        yield saved
    finally:
        pkg_resources.__setstate__(saved)


@contextlib.contextmanager
def setup_context(setup_dir):
    temp_dir = os.path.join(setup_dir, 'temp')
    with save_pkg_resources_state():
        with save_modules():
            with save_path():
                hide_setuptools()
                with save_argv():
                    with override_temp(temp_dir):
                        with pushd(setup_dir):
                            # ensure setuptools commands are available
                            __import__('setuptools')
                            yield


_MODULES_TO_HIDE = {
    'setuptools',
    'distutils',
    'pkg_resources',
    'Cython',
    '_distutils_hack',
}


def _needs_hiding(mod_name):
    """
    >>> _needs_hiding('setuptools')
    True
    >>> _needs_hiding('pkg_resources')
    True
    >>> _needs_hiding('setuptools_plugin')
    False
    >>> _needs_hiding('setuptools.__init__')
    True
    >>> _needs_hiding('distutils')
    True
    >>> _needs_hiding('os')
    False
    >>> _needs_hiding('Cython')
    True
    """
    base_module = mod_name.split('.', 1)[0]
    return base_module in _MODULES_TO_HIDE


def hide_setuptools():
    """
    Remove references to setuptools' modules from sys.modules to allow the
    invocation to import the most appropriate setuptools. This technique is
    necessary to avoid issues such as #315 where setuptools upgrading itself
    would fail to find a function declared in the metadata.
    """
    _distutils_hack = sys.modules.get('_distutils_hack', None)
    if _distutils_hack is not None:
        _distutils_hack._remove_shim()

    modules = filter(_needs_hiding, sys.modules)
    _clear_modules(modules)


def run_setup(setup_script, args):
    """Run a distutils setup script, sandboxed in its directory"""
    setup_dir = os.path.abspath(os.path.dirname(setup_script))
    with setup_context(setup_dir):
        try:
            sys.argv[:] = [setup_script] + list(args)
            sys.path.insert(0, setup_dir)
            # reset to include setup dir, w/clean callback list
            working_set.__init__()
            working_set.callbacks.append(lambda dist: dist.activate())

            with DirectorySandbox(setup_dir):
                ns = dict(__file__=setup_script, __name__='__main__')
                _execfile(setup_script, ns)
        except SystemExit as v:
            if v.args and v.args[0]:
                raise
            # Normal exit, just return


class AbstractSandbox:
    """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts"""

    _active = False

    def __init__(self):
        self._attrs = [
            name
            for name in dir(_os)
            if not name.startswith('_') and hasattr(self, name)
        ]

    def _copy(self, source):
        for name in self._attrs:
            setattr(os, name, getattr(source, name))

    def __enter__(self):
        self._copy(self)
        if _file:
            builtins.file = self._file
        builtins.open = self._open
        self._active = True

    def __exit__(self, exc_type, exc_value, traceback):
        self._active = False
        if _file:
            builtins.file = _file
        builtins.open = _open
        self._copy(_os)

    def run(self, func):
        """Run 'func' under os sandboxing"""
        with self:
            return func()

    def _mk_dual_path_wrapper(name):
        original = getattr(_os, name)

        def wrap(self, src, dst, *args, **kw):
            if self._active:
                src, dst = self._remap_pair(name, src, dst, *args, **kw)
            return original(src, dst, *args, **kw)

        return wrap

    for name in ["rename", "link", "symlink"]:
        if hasattr(_os, name):
            locals()[name] = _mk_dual_path_wrapper(name)

    def _mk_single_path_wrapper(name, original=None):
        original = original or getattr(_os, name)

        def wrap(self, path, *args, **kw):
            if self._active:
                path = self._remap_input(name, path, *args, **kw)
            return original(path, *args, **kw)

        return wrap

    if _file:
        _file = _mk_single_path_wrapper('file', _file)
    _open = _mk_single_path_wrapper('open', _open)
    for name in [
        "stat",
        "listdir",
        "chdir",
        "open",
        "chmod",
        "chown",
        "mkdir",
        "remove",
        "unlink",
        "rmdir",
        "utime",
        "lchown",
        "chroot",
        "lstat",
        "startfile",
        "mkfifo",
        "mknod",
        "pathconf",
        "access",
    ]:
        if hasattr(_os, name):
            locals()[name] = _mk_single_path_wrapper(name)

    def _mk_single_with_return(name):
        original = getattr(_os, name)

        def wrap(self, path, *args, **kw):
            if self._active:
                path = self._remap_input(name, path, *args, **kw)
                return self._remap_output(name, original(path, *args, **kw))
            return original(path, *args, **kw)

        return wrap

    for name in ['readlink', 'tempnam']:
        if hasattr(_os, name):
            locals()[name] = _mk_single_with_return(name)

    def _mk_query(name):
        original = getattr(_os, name)

        def wrap(self, *args, **kw):
            retval = original(*args, **kw)
            if self._active:
                return self._remap_output(name, retval)
            return retval

        return wrap

    for name in ['getcwd', 'tmpnam']:
        if hasattr(_os, name):
            locals()[name] = _mk_query(name)

    def _validate_path(self, path):
        """Called to remap or validate any path, whether input or output"""
        return path

    def _remap_input(self, operation, path, *args, **kw):
        """Called for path inputs"""
        return self._validate_path(path)

    def _remap_output(self, operation, path):
        """Called for path outputs"""
        return self._validate_path(path)

    def _remap_pair(self, operation, src, dst, *args, **kw):
        """Called for path pairs like rename, link, and symlink operations"""
        return (
            self._remap_input(operation + '-from', src, *args, **kw),
            self._remap_input(operation + '-to', dst, *args, **kw),
        )


if hasattr(os, 'devnull'):
    _EXCEPTIONS = [os.devnull]
else:
    _EXCEPTIONS = []


class DirectorySandbox(AbstractSandbox):
    """Restrict operations to a single subdirectory - pseudo-chroot"""

    write_ops = dict.fromkeys(
        [
            "open",
            "chmod",
            "chown",
            "mkdir",
            "remove",
            "unlink",
            "rmdir",
            "utime",
            "lchown",
            "chroot",
            "mkfifo",
            "mknod",
            "tempnam",
        ]
    )

    _exception_patterns = []
    "exempt writing to paths that match the pattern"

    def __init__(self, sandbox, exceptions=_EXCEPTIONS):
        self._sandbox = os.path.normcase(os.path.realpath(sandbox))
        self._prefix = os.path.join(self._sandbox, '')
        self._exceptions = [
            os.path.normcase(os.path.realpath(path)) for path in exceptions
        ]
        AbstractSandbox.__init__(self)

    def _violation(self, operation, *args, **kw):
        from setuptools.sandbox import SandboxViolation

        raise SandboxViolation(operation, args, kw)

    if _file:

        def _file(self, path, mode='r', *args, **kw):
            if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
                self._violation("file", path, mode, *args, **kw)
            return _file(path, mode, *args, **kw)

    def _open(self, path, mode='r', *args, **kw):
        if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
            self._violation("open", path, mode, *args, **kw)
        return _open(path, mode, *args, **kw)

    def tmpnam(self):
        self._violation("tmpnam")

    def _ok(self, path):
        active = self._active
        try:
            self._active = False
            realpath = os.path.normcase(os.path.realpath(path))
            return (
                self._exempted(realpath)
                or realpath == self._sandbox
                or realpath.startswith(self._prefix)
            )
        finally:
            self._active = active

    def _exempted(self, filepath):
        start_matches = (
            filepath.startswith(exception) for exception in self._exceptions
        )
        pattern_matches = (
            re.match(pattern, filepath) for pattern in self._exception_patterns
        )
        candidates = itertools.chain(start_matches, pattern_matches)
        return any(candidates)

    def _remap_input(self, operation, path, *args, **kw):
        """Called for path inputs"""
        if operation in self.write_ops and not self._ok(path):
            self._violation(operation, os.path.realpath(path), *args, **kw)
        return path

    def _remap_pair(self, operation, src, dst, *args, **kw):
        """Called for path pairs like rename, link, and symlink operations"""
        if not self._ok(src) or not self._ok(dst):
            self._violation(operation, src, dst, *args, **kw)
        return (src, dst)

    def open(self, file, flags, mode=0o777, *args, **kw):
        """Called for low-level os.open()"""
        if flags & WRITE_FLAGS and not self._ok(file):
            self._violation("os.open", file, flags, mode, *args, **kw)
        return _os.open(file, flags, mode, *args, **kw)


WRITE_FLAGS = functools.reduce(
    operator.or_,
    [
        getattr(_os, a, 0)
        for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()
    ],
)


class SandboxViolation(DistutilsError):
    """A setup script attempted to modify the filesystem outside the sandbox"""

    tmpl = textwrap.dedent(
        """
        SandboxViolation: {cmd}{args!r} {kwargs}

        The package setup script has attempted to modify files on your system
        that are not within the EasyInstall build area, and has been aborted.

        This package cannot be safely installed by EasyInstall, and may not
        support alternate installation locations even if you run its setup
        script by hand.  Please inform the package's author and the EasyInstall
        maintainers to find out if a fix or workaround is available.
        """
    ).lstrip()

    def __str__(self):
        cmd, args, kwargs = self.args
        return self.tmpl.format(**locals())
python3.12/site-packages/setuptools/dep_util.py000064400000001223151732704160015515 0ustar00from ._distutils import _modified
from .warnings import SetuptoolsDeprecationWarning


def __getattr__(name):
    if name not in ['newer_group', 'newer_pairwise_group']:
        raise AttributeError(name)
    SetuptoolsDeprecationWarning.emit(
        "dep_util is Deprecated. Use functions from setuptools.modified instead.",
        "Please use `setuptools.modified` instead of `setuptools.dep_util`.",
        see_url="https://github.com/pypa/setuptools/pull/4069",
        due_date=(2024, 5, 21),
        # Warning added in v69.0.0 on 2023/11/20,
        # See https://github.com/pypa/setuptools/discussions/4128
    )
    return getattr(_modified, name)
python3.12/site-packages/setuptools/wheel.py000064400000020664151732704160015026 0ustar00"""Wheels support."""

import email
import itertools
import functools
import os
import posixpath
import re
import zipfile
import contextlib

from distutils.util import get_platform

import setuptools
from setuptools.extern.packaging.version import Version as parse_version
from setuptools.extern.packaging.tags import sys_tags
from setuptools.extern.packaging.utils import canonicalize_name
from setuptools.command.egg_info import write_requirements, _egg_basename
from setuptools.archive_util import _unpack_zipfile_obj


WHEEL_NAME = re.compile(
    r"""^(?P<project_name>.+?)-(?P<version>\d.*?)
    ((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
    )\.whl$""",
    re.VERBOSE,
).match

NAMESPACE_PACKAGE_INIT = "__import__('pkg_resources').declare_namespace(__name__)\n"


@functools.lru_cache(maxsize=None)
def _get_supported_tags():
    # We calculate the supported tags only once, otherwise calling
    # this method on thousands of wheels takes seconds instead of
    # milliseconds.
    return {(t.interpreter, t.abi, t.platform) for t in sys_tags()}


def unpack(src_dir, dst_dir):
    '''Move everything under `src_dir` to `dst_dir`, and delete the former.'''
    for dirpath, dirnames, filenames in os.walk(src_dir):
        subdir = os.path.relpath(dirpath, src_dir)
        for f in filenames:
            src = os.path.join(dirpath, f)
            dst = os.path.join(dst_dir, subdir, f)
            os.renames(src, dst)
        for n, d in reversed(list(enumerate(dirnames))):
            src = os.path.join(dirpath, d)
            dst = os.path.join(dst_dir, subdir, d)
            if not os.path.exists(dst):
                # Directory does not exist in destination,
                # rename it and prune it from os.walk list.
                os.renames(src, dst)
                del dirnames[n]
    # Cleanup.
    for dirpath, dirnames, filenames in os.walk(src_dir, topdown=True):
        assert not filenames
        os.rmdir(dirpath)


@contextlib.contextmanager
def disable_info_traces():
    """
    Temporarily disable info traces.
    """
    from distutils import log

    saved = log.set_threshold(log.WARN)
    try:
        yield
    finally:
        log.set_threshold(saved)


class Wheel:
    def __init__(self, filename):
        match = WHEEL_NAME(os.path.basename(filename))
        if match is None:
            raise ValueError('invalid wheel name: %r' % filename)
        self.filename = filename
        for k, v in match.groupdict().items():
            setattr(self, k, v)

    def tags(self):
        '''List tags (py_version, abi, platform) supported by this wheel.'''
        return itertools.product(
            self.py_version.split('.'),
            self.abi.split('.'),
            self.platform.split('.'),
        )

    def is_compatible(self):
        '''Is the wheel compatible with the current platform?'''
        return next((True for t in self.tags() if t in _get_supported_tags()), False)

    def egg_name(self):
        return (
            _egg_basename(
                self.project_name,
                self.version,
                platform=(None if self.platform == 'any' else get_platform()),
            )
            + ".egg"
        )

    def get_dist_info(self, zf):
        # find the correct name of the .dist-info dir in the wheel file
        for member in zf.namelist():
            dirname = posixpath.dirname(member)
            if dirname.endswith('.dist-info') and canonicalize_name(dirname).startswith(
                canonicalize_name(self.project_name)
            ):
                return dirname
        raise ValueError("unsupported wheel format. .dist-info not found")

    def install_as_egg(self, destination_eggdir):
        '''Install wheel as an egg directory.'''
        with zipfile.ZipFile(self.filename) as zf:
            self._install_as_egg(destination_eggdir, zf)

    def _install_as_egg(self, destination_eggdir, zf):
        dist_basename = '%s-%s' % (self.project_name, self.version)
        dist_info = self.get_dist_info(zf)
        dist_data = '%s.data' % dist_basename
        egg_info = os.path.join(destination_eggdir, 'EGG-INFO')

        self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        self._move_data_entries(destination_eggdir, dist_data)
        self._fix_namespace_packages(egg_info, destination_eggdir)

    @staticmethod
    def _convert_metadata(zf, destination_eggdir, dist_info, egg_info):
        import pkg_resources

        def get_metadata(name):
            with zf.open(posixpath.join(dist_info, name)) as fp:
                value = fp.read().decode('utf-8')
                return email.parser.Parser().parsestr(value)

        wheel_metadata = get_metadata('WHEEL')
        # Check wheel format version is supported.
        wheel_version = parse_version(wheel_metadata.get('Wheel-Version'))
        wheel_v1 = parse_version('1.0') <= wheel_version < parse_version('2.0dev0')
        if not wheel_v1:
            raise ValueError('unsupported wheel format version: %s' % wheel_version)
        # Extract to target directory.
        _unpack_zipfile_obj(zf, destination_eggdir)
        # Convert metadata.
        dist_info = os.path.join(destination_eggdir, dist_info)
        dist = pkg_resources.Distribution.from_location(
            destination_eggdir,
            dist_info,
            metadata=pkg_resources.PathMetadata(destination_eggdir, dist_info),
        )

        # Note: Evaluate and strip markers now,
        # as it's difficult to convert back from the syntax:
        # foobar; "linux" in sys_platform and extra == 'test'
        def raw_req(req):
            req.marker = None
            return str(req)

        install_requires = list(map(raw_req, dist.requires()))
        extras_require = {
            extra: [
                req
                for req in map(raw_req, dist.requires((extra,)))
                if req not in install_requires
            ]
            for extra in dist.extras
        }
        os.rename(dist_info, egg_info)
        os.rename(
            os.path.join(egg_info, 'METADATA'),
            os.path.join(egg_info, 'PKG-INFO'),
        )
        setup_dist = setuptools.Distribution(
            attrs=dict(
                install_requires=install_requires,
                extras_require=extras_require,
            ),
        )
        with disable_info_traces():
            write_requirements(
                setup_dist.get_command_obj('egg_info'),
                None,
                os.path.join(egg_info, 'requires.txt'),
            )

    @staticmethod
    def _move_data_entries(destination_eggdir, dist_data):
        """Move data entries to their correct location."""
        dist_data = os.path.join(destination_eggdir, dist_data)
        dist_data_scripts = os.path.join(dist_data, 'scripts')
        if os.path.exists(dist_data_scripts):
            egg_info_scripts = os.path.join(destination_eggdir, 'EGG-INFO', 'scripts')
            os.mkdir(egg_info_scripts)
            for entry in os.listdir(dist_data_scripts):
                # Remove bytecode, as it's not properly handled
                # during easy_install scripts install phase.
                if entry.endswith('.pyc'):
                    os.unlink(os.path.join(dist_data_scripts, entry))
                else:
                    os.rename(
                        os.path.join(dist_data_scripts, entry),
                        os.path.join(egg_info_scripts, entry),
                    )
            os.rmdir(dist_data_scripts)
        for subdir in filter(
            os.path.exists,
            (
                os.path.join(dist_data, d)
                for d in ('data', 'headers', 'purelib', 'platlib')
            ),
        ):
            unpack(subdir, destination_eggdir)
        if os.path.exists(dist_data):
            os.rmdir(dist_data)

    @staticmethod
    def _fix_namespace_packages(egg_info, destination_eggdir):
        namespace_packages = os.path.join(egg_info, 'namespace_packages.txt')
        if os.path.exists(namespace_packages):
            with open(namespace_packages) as fp:
                namespace_packages = fp.read().split()
            for mod in namespace_packages:
                mod_dir = os.path.join(destination_eggdir, *mod.split('.'))
                mod_init = os.path.join(mod_dir, '__init__.py')
                if not os.path.exists(mod_dir):
                    os.mkdir(mod_dir)
                if not os.path.exists(mod_init):
                    with open(mod_init, 'w') as fp:
                        fp.write(NAMESPACE_PACKAGE_INIT)
python3.12/site-packages/setuptools/installer.py000064400000011575151732704160015720 0ustar00import glob
import os
import subprocess
import sys
import tempfile
from distutils import log
from distutils.errors import DistutilsError
from functools import partial

from . import _reqs
from .wheel import Wheel
from .warnings import SetuptoolsDeprecationWarning


def _fixup_find_links(find_links):
    """Ensure find-links option end-up being a list of strings."""
    if isinstance(find_links, str):
        return find_links.split()
    assert isinstance(find_links, (tuple, list))
    return find_links


def fetch_build_egg(dist, req):
    """Fetch an egg needed for building.

    Use pip/wheel to fetch/build a wheel."""
    _DeprecatedInstaller.emit()
    _warn_wheel_not_available(dist)
    return _fetch_build_egg_no_warn(dist, req)


def _fetch_build_eggs(dist, requires):
    import pkg_resources  # Delay import to avoid unnecessary side-effects

    _DeprecatedInstaller.emit(stacklevel=3)
    _warn_wheel_not_available(dist)

    resolved_dists = pkg_resources.working_set.resolve(
        _reqs.parse(requires, pkg_resources.Requirement),  # required for compatibility
        installer=partial(_fetch_build_egg_no_warn, dist),  # avoid warning twice
        replace_conflicting=True,
    )
    for dist in resolved_dists:
        pkg_resources.working_set.add(dist, replace=True)
    return resolved_dists


def _fetch_build_egg_no_warn(dist, req):  # noqa: C901  # is too complex (16)  # FIXME
    import pkg_resources  # Delay import to avoid unnecessary side-effects

    # Ignore environment markers; if supplied, it is required.
    req = strip_marker(req)
    # Take easy_install options into account, but do not override relevant
    # pip environment variables (like PIP_INDEX_URL or PIP_QUIET); they'll
    # take precedence.
    opts = dist.get_option_dict('easy_install')
    if 'allow_hosts' in opts:
        raise DistutilsError(
            'the `allow-hosts` option is not supported '
            'when using pip to install requirements.'
        )
    quiet = 'PIP_QUIET' not in os.environ and 'PIP_VERBOSE' not in os.environ
    if 'PIP_INDEX_URL' in os.environ:
        index_url = None
    elif 'index_url' in opts:
        index_url = opts['index_url'][1]
    else:
        index_url = None
    find_links = (
        _fixup_find_links(opts['find_links'][1])[:] if 'find_links' in opts else []
    )
    if dist.dependency_links:
        find_links.extend(dist.dependency_links)
    eggs_dir = os.path.realpath(dist.get_egg_cache_dir())
    environment = pkg_resources.Environment()
    for egg_dist in pkg_resources.find_distributions(eggs_dir):
        if egg_dist in req and environment.can_add(egg_dist):
            return egg_dist
    with tempfile.TemporaryDirectory() as tmpdir:
        cmd = [
            sys.executable,
            '-m',
            'pip',
            '--disable-pip-version-check',
            'wheel',
            '--no-deps',
            '-w',
            tmpdir,
        ]
        if quiet:
            cmd.append('--quiet')
        if index_url is not None:
            cmd.extend(('--index-url', index_url))
        for link in find_links or []:
            cmd.extend(('--find-links', link))
        # If requirement is a PEP 508 direct URL, directly pass
        # the URL to pip, as `req @ url` does not work on the
        # command line.
        cmd.append(req.url or str(req))
        try:
            subprocess.check_call(cmd)
        except subprocess.CalledProcessError as e:
            raise DistutilsError(str(e)) from e
        wheel = Wheel(glob.glob(os.path.join(tmpdir, '*.whl'))[0])
        dist_location = os.path.join(eggs_dir, wheel.egg_name())
        wheel.install_as_egg(dist_location)
        dist_metadata = pkg_resources.PathMetadata(
            dist_location, os.path.join(dist_location, 'EGG-INFO')
        )
        dist = pkg_resources.Distribution.from_filename(
            dist_location, metadata=dist_metadata
        )
        return dist


def strip_marker(req):
    """
    Return a new requirement without the environment marker to avoid
    calling pip with something like `babel; extra == "i18n"`, which
    would always be ignored.
    """
    import pkg_resources  # Delay import to avoid unnecessary side-effects

    # create a copy to avoid mutating the input
    req = pkg_resources.Requirement.parse(str(req))
    req.marker = None
    return req


def _warn_wheel_not_available(dist):
    import pkg_resources  # Delay import to avoid unnecessary side-effects

    try:
        pkg_resources.get_distribution('wheel')
    except pkg_resources.DistributionNotFound:
        dist.announce('WARNING: The wheel package is not available.', log.WARN)


class _DeprecatedInstaller(SetuptoolsDeprecationWarning):
    _SUMMARY = "setuptools.installer and fetch_build_eggs are deprecated."
    _DETAILS = """
    Requirements should be satisfied by a PEP 517 installer.
    If you are using pip, you can try `pip install --use-pep517`.
    """
    # _DUE_DATE not decided yet
python3.12/site-packages/setuptools/__init__.py000064400000021776151732704160015466 0ustar00"""Extensions to the 'distutils' for large or complex distributions"""

import functools
import os
import re

import _distutils_hack.override  # noqa: F401
import distutils.core
from distutils.errors import DistutilsOptionError
from distutils.util import convert_path as _convert_path

from . import logging, monkey
from . import version as _version_module
from .depends import Require
from .discovery import PackageFinder, PEP420PackageFinder
from .dist import Distribution
from .extension import Extension
from .warnings import SetuptoolsDeprecationWarning

__all__ = [
    'setup',
    'Distribution',
    'Command',
    'Extension',
    'Require',
    'SetuptoolsDeprecationWarning',
    'find_packages',
    'find_namespace_packages',
]

__version__ = _version_module.__version__

bootstrap_install_from = None


find_packages = PackageFinder.find
find_namespace_packages = PEP420PackageFinder.find


def _install_setup_requires(attrs):
    # Note: do not use `setuptools.Distribution` directly, as
    # our PEP 517 backend patch `distutils.core.Distribution`.
    class MinimalDistribution(distutils.core.Distribution):
        """
        A minimal version of a distribution for supporting the
        fetch_build_eggs interface.
        """

        def __init__(self, attrs):
            _incl = 'dependency_links', 'setup_requires'
            filtered = {k: attrs[k] for k in set(_incl) & set(attrs)}
            super().__init__(filtered)
            # Prevent accidentally triggering discovery with incomplete set of attrs
            self.set_defaults._disable()

        def _get_project_config_files(self, filenames=None):
            """Ignore ``pyproject.toml``, they are not related to setup_requires"""
            try:
                cfg, toml = super()._split_standard_project_metadata(filenames)
                return cfg, ()
            except Exception:
                return filenames, ()

        def finalize_options(self):
            """
            Disable finalize_options to avoid building the working set.
            Ref #2158.
            """

    dist = MinimalDistribution(attrs)

    # Honor setup.cfg's options.
    dist.parse_config_files(ignore_option_errors=True)
    if dist.setup_requires:
        _fetch_build_eggs(dist)


def _fetch_build_eggs(dist):
    try:
        dist.fetch_build_eggs(dist.setup_requires)
    except Exception as ex:
        msg = """
        It is possible a package already installed in your system
        contains an version that is invalid according to PEP 440.
        You can try `pip install --use-pep517` as a workaround for this problem,
        or rely on a new virtual environment.

        If the problem refers to a package that is not installed yet,
        please contact that package's maintainers or distributors.
        """
        if "InvalidVersion" in ex.__class__.__name__:
            if hasattr(ex, "add_note"):
                ex.add_note(msg)  # PEP 678
            else:
                dist.announce(f"\n{msg}\n")
        raise


def setup(**attrs):
    # Make sure we have any requirements needed to interpret 'attrs'.
    logging.configure()
    _install_setup_requires(attrs)
    return distutils.core.setup(**attrs)


setup.__doc__ = distutils.core.setup.__doc__


_Command = monkey.get_unpatched(distutils.core.Command)


class Command(_Command):
    """
    Setuptools internal actions are organized using a *command design pattern*.
    This means that each action (or group of closely related actions) executed during
    the build should be implemented as a ``Command`` subclass.

    These commands are abstractions and do not necessarily correspond to a command that
    can (or should) be executed via a terminal, in a CLI fashion (although historically
    they would).

    When creating a new command from scratch, custom defined classes **SHOULD** inherit
    from ``setuptools.Command`` and implement a few mandatory methods.
    Between these mandatory methods, are listed:

    .. method:: initialize_options(self)

        Set or (reset) all options/attributes/caches used by the command
        to their default values. Note that these values may be overwritten during
        the build.

    .. method:: finalize_options(self)

        Set final values for all options/attributes used by the command.
        Most of the time, each option/attribute/cache should only be set if it does not
        have any value yet (e.g. ``if self.attr is None: self.attr = val``).

    .. method:: run(self)

        Execute the actions intended by the command.
        (Side effects **SHOULD** only take place when ``run`` is executed,
        for example, creating new files or writing to the terminal output).

    A useful analogy for command classes is to think of them as subroutines with local
    variables called "options".  The options are "declared" in ``initialize_options()``
    and "defined" (given their final values, aka "finalized") in ``finalize_options()``,
    both of which must be defined by every command class. The "body" of the subroutine,
    (where it does all the work) is the ``run()`` method.
    Between ``initialize_options()`` and ``finalize_options()``, ``setuptools`` may set
    the values for options/attributes based on user's input (or circumstance),
    which means that the implementation should be careful to not overwrite values in
    ``finalize_options`` unless necessary.

    Please note that other commands (or other parts of setuptools) may also overwrite
    the values of the command's options/attributes multiple times during the build
    process.
    Therefore it is important to consistently implement ``initialize_options()`` and
    ``finalize_options()``. For example, all derived attributes (or attributes that
    depend on the value of other attributes) **SHOULD** be recomputed in
    ``finalize_options``.

    When overwriting existing commands, custom defined classes **MUST** abide by the
    same APIs implemented by the original class. They also **SHOULD** inherit from the
    original class.
    """

    command_consumes_arguments = False

    def __init__(self, dist, **kw):
        """
        Construct the command for dist, updating
        vars(self) with any keyword parameters.
        """
        super().__init__(dist)
        vars(self).update(kw)

    def _ensure_stringlike(self, option, what, default=None):
        val = getattr(self, option)
        if val is None:
            setattr(self, option, default)
            return default
        elif not isinstance(val, str):
            raise DistutilsOptionError(
                "'%s' must be a %s (got `%s`)" % (option, what, val)
            )
        return val

    def ensure_string_list(self, option):
        r"""Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].

        ..
           TODO: This method seems to be similar to the one in ``distutils.cmd``
           Probably it is just here for backward compatibility with old Python versions?

        :meta private:
        """
        val = getattr(self, option)
        if val is None:
            return
        elif isinstance(val, str):
            setattr(self, option, re.split(r',\s*|\s+', val))
        else:
            if isinstance(val, list):
                ok = all(isinstance(v, str) for v in val)
            else:
                ok = False
            if not ok:
                raise DistutilsOptionError(
                    "'%s' must be a list of strings (got %r)" % (option, val)
                )

    def reinitialize_command(self, command, reinit_subcommands=0, **kw):
        cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
        vars(cmd).update(kw)
        return cmd


def _find_all_simple(path):
    """
    Find all files under 'path'
    """
    results = (
        os.path.join(base, file)
        for base, dirs, files in os.walk(path, followlinks=True)
        for file in files
    )
    return filter(os.path.isfile, results)


def findall(dir=os.curdir):
    """
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    """
    files = _find_all_simple(dir)
    if dir == os.curdir:
        make_rel = functools.partial(os.path.relpath, start=dir)
        files = map(make_rel, files)
    return list(files)


@functools.wraps(_convert_path)
def convert_path(pathname):
    SetuptoolsDeprecationWarning.emit(
        "Access to implementation detail",
        """
        The function `convert_path` is not provided by setuptools itself,
        and therefore not part of the public API.

        Its direct usage by 3rd-party packages is considered improper and the function
        may be removed in the future.
        """,
        due_date=(2023, 12, 13),  # initial deprecation 2022-03-25, see #3201
    )
    return _convert_path(pathname)


class sic(str):
    """Treat this string as-is (https://en.wikipedia.org/wiki/Sic)"""


# Apply monkey patches
monkey.patch_all()
python3.12/site-packages/setuptools/logging.py000064400000002327151732704160015344 0ustar00import sys
import inspect
import logging
import distutils.log
from . import monkey


def _not_warning(record):
    return record.levelno < logging.WARNING


def configure():
    """
    Configure logging to emit warning and above to stderr
    and everything else to stdout. This behavior is provided
    for compatibility with distutils.log but may change in
    the future.
    """
    err_handler = logging.StreamHandler()
    err_handler.setLevel(logging.WARNING)
    out_handler = logging.StreamHandler(sys.stdout)
    out_handler.addFilter(_not_warning)
    handlers = err_handler, out_handler
    logging.basicConfig(
        format="{message}", style='{', handlers=handlers, level=logging.DEBUG
    )
    if inspect.ismodule(distutils.dist.log):
        monkey.patch_func(set_threshold, distutils.log, 'set_threshold')
        # For some reason `distutils.log` module is getting cached in `distutils.dist`
        # and then loaded again when patched,
        # implying: id(distutils.log) != id(distutils.dist.log).
        # Make sure the same module object is used everywhere:
        distutils.dist.log = distutils.log


def set_threshold(level):
    logging.root.setLevel(level * 10)
    return set_threshold.unpatched(level)
python3.12/site-packages/setuptools/script.tmpl000064400000000212151732704160015535 0ustar00# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r
__requires__ = %(spec)r
__import__('pkg_resources').run_script(%(spec)r, %(script_name)r)
python3.12/site-packages/setuptools/depends.py000064400000012716151732704160015343 0ustar00import sys
import marshal
import contextlib
import dis


from . import _imp
from ._imp import find_module, PY_COMPILED, PY_FROZEN, PY_SOURCE
from .extern.packaging.version import Version


__all__ = ['Require', 'find_module', 'get_module_constant', 'extract_constant']


class Require:
    """A prerequisite to building or installing a distribution"""

    def __init__(
        self, name, requested_version, module, homepage='', attribute=None, format=None
    ):
        if format is None and requested_version is not None:
            format = Version

        if format is not None:
            requested_version = format(requested_version)
            if attribute is None:
                attribute = '__version__'

        self.__dict__.update(locals())
        del self.self

    def full_name(self):
        """Return full package/distribution name, w/version"""
        if self.requested_version is not None:
            return '%s-%s' % (self.name, self.requested_version)
        return self.name

    def version_ok(self, version):
        """Is 'version' sufficiently up-to-date?"""
        return (
            self.attribute is None
            or self.format is None
            or str(version) != "unknown"
            and self.format(version) >= self.requested_version
        )

    def get_version(self, paths=None, default="unknown"):
        """Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        """

        if self.attribute is None:
            try:
                f, p, i = find_module(self.module, paths)
                if f:
                    f.close()
                return default
            except ImportError:
                return None

        v = get_module_constant(self.module, self.attribute, default, paths)

        if v is not None and v is not default and self.format is not None:
            return self.format(v)

        return v

    def is_present(self, paths=None):
        """Return true if dependency is present on 'paths'"""
        return self.get_version(paths) is not None

    def is_current(self, paths=None):
        """Return true if dependency is present and up-to-date on 'paths'"""
        version = self.get_version(paths)
        if version is None:
            return False
        return self.version_ok(str(version))


def maybe_close(f):
    @contextlib.contextmanager
    def empty():
        yield
        return

    if not f:
        return empty()

    return contextlib.closing(f)


def get_module_constant(module, symbol, default=-1, paths=None):
    """Find 'module' by searching 'paths', and extract 'symbol'

    Return 'None' if 'module' does not exist on 'paths', or it does not define
    'symbol'.  If the module defines 'symbol' as a constant, return the
    constant.  Otherwise, return 'default'."""

    try:
        f, path, (suffix, mode, kind) = info = find_module(module, paths)
    except ImportError:
        # Module doesn't exist
        return None

    with maybe_close(f):
        if kind == PY_COMPILED:
            f.read(8)  # skip magic & date
            code = marshal.load(f)
        elif kind == PY_FROZEN:
            code = _imp.get_frozen_object(module, paths)
        elif kind == PY_SOURCE:
            code = compile(f.read(), path, 'exec')
        else:
            # Not something we can parse; we'll have to import it.  :(
            imported = _imp.get_module(module, paths, info)
            return getattr(imported, symbol, None)

    return extract_constant(code, symbol, default)


def extract_constant(code, symbol, default=-1):
    """Extract the constant value of 'symbol' from 'code'

    If the name 'symbol' is bound to a constant value by the Python code
    object 'code', return that value.  If 'symbol' is bound to an expression,
    return 'default'.  Otherwise, return 'None'.

    Return value is based on the first assignment to 'symbol'.  'symbol' must
    be a global, or at least a non-"fast" local in the code block.  That is,
    only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
    must be present in 'code.co_names'.
    """
    if symbol not in code.co_names:
        # name's not there, can't possibly be an assignment
        return None

    name_idx = list(code.co_names).index(symbol)

    STORE_NAME = dis.opmap['STORE_NAME']
    STORE_GLOBAL = dis.opmap['STORE_GLOBAL']
    LOAD_CONST = dis.opmap['LOAD_CONST']

    const = default

    for byte_code in dis.Bytecode(code):
        op = byte_code.opcode
        arg = byte_code.arg

        if op == LOAD_CONST:
            const = code.co_consts[arg]
        elif arg == name_idx and (op == STORE_NAME or op == STORE_GLOBAL):
            return const
        else:
            const = default


def _update_globals():
    """
    Patch the globals to remove the objects not available on some platforms.

    XXX it'd be better to test assertions about bytecode instead.
    """

    if not sys.platform.startswith('java') and sys.platform != 'cli':
        return
    incompatible = 'extract_constant', 'get_module_constant'
    for name in incompatible:
        del globals()[name]
        __all__.remove(name)


_update_globals()
python3.12/site-packages/setuptools/dist.py000064400000110525151732704160014661 0ustar00__all__ = ['Distribution']


import io
import itertools
import numbers
import os
import re
import sys
from contextlib import suppress
from glob import iglob
from pathlib import Path
from typing import List, Optional, Set

import distutils.cmd
import distutils.command
import distutils.core
import distutils.dist
import distutils.log
from distutils.debug import DEBUG
from distutils.errors import DistutilsOptionError, DistutilsSetupError
from distutils.fancy_getopt import translate_longopt
from distutils.util import strtobool

from .extern.more_itertools import partition, unique_everseen
from .extern.ordered_set import OrderedSet
from .extern.packaging.markers import InvalidMarker, Marker
from .extern.packaging.specifiers import InvalidSpecifier, SpecifierSet
from .extern.packaging.version import Version

from . import _entry_points
from . import _normalization
from . import _reqs
from . import command as _  # noqa  -- imported for side-effects
from ._importlib import metadata
from .config import setupcfg, pyprojecttoml
from .discovery import ConfigDiscovery
from .monkey import get_unpatched
from .warnings import InformationOnly, SetuptoolsDeprecationWarning


sequence = tuple, list


def check_importable(dist, attr, value):
    try:
        ep = metadata.EntryPoint(value=value, name=None, group=None)
        assert not ep.extras
    except (TypeError, ValueError, AttributeError, AssertionError) as e:
        raise DistutilsSetupError(
            "%r must be importable 'module:attrs' string (got %r)" % (attr, value)
        ) from e


def assert_string_list(dist, attr, value):
    """Verify that value is a string list"""
    try:
        # verify that value is a list or tuple to exclude unordered
        # or single-use iterables
        assert isinstance(value, (list, tuple))
        # verify that elements of value are strings
        assert ''.join(value) != value
    except (TypeError, ValueError, AttributeError, AssertionError) as e:
        raise DistutilsSetupError(
            "%r must be a list of strings (got %r)" % (attr, value)
        ) from e


def check_nsp(dist, attr, value):
    """Verify that namespace packages are valid"""
    ns_packages = value
    assert_string_list(dist, attr, ns_packages)
    for nsp in ns_packages:
        if not dist.has_contents_for(nsp):
            raise DistutilsSetupError(
                "Distribution contains no modules or packages for "
                + "namespace package %r" % nsp
            )
        parent, sep, child = nsp.rpartition('.')
        if parent and parent not in ns_packages:
            distutils.log.warn(
                "WARNING: %r is declared as a package namespace, but %r"
                " is not: please correct this in setup.py",
                nsp,
                parent,
            )
        SetuptoolsDeprecationWarning.emit(
            "The namespace_packages parameter is deprecated.",
            "Please replace its usage with implicit namespaces (PEP 420).",
            see_docs="references/keywords.html#keyword-namespace-packages"
            # TODO: define due_date, it may break old packages that are no longer
            # maintained (e.g. sphinxcontrib extensions) when installed from source.
            # Warning officially introduced in May 2022, however the deprecation
            # was mentioned much earlier in the docs (May 2020, see #2149).
        )


def check_extras(dist, attr, value):
    """Verify that extras_require mapping is valid"""
    try:
        list(itertools.starmap(_check_extra, value.items()))
    except (TypeError, ValueError, AttributeError) as e:
        raise DistutilsSetupError(
            "'extras_require' must be a dictionary whose values are "
            "strings or lists of strings containing valid project/version "
            "requirement specifiers."
        ) from e


def _check_extra(extra, reqs):
    name, sep, marker = extra.partition(':')
    try:
        _check_marker(marker)
    except InvalidMarker:
        msg = f"Invalid environment marker: {marker} ({extra!r})"
        raise DistutilsSetupError(msg) from None
    list(_reqs.parse(reqs))


def _check_marker(marker):
    if not marker:
        return
    m = Marker(marker)
    m.evaluate()


def assert_bool(dist, attr, value):
    """Verify that value is True, False, 0, or 1"""
    if bool(value) != value:
        tmpl = "{attr!r} must be a boolean value (got {value!r})"
        raise DistutilsSetupError(tmpl.format(attr=attr, value=value))


def invalid_unless_false(dist, attr, value):
    if not value:
        DistDeprecationWarning.emit(f"{attr} is ignored.")
        # TODO: should there be a `due_date` here?
        return
    raise DistutilsSetupError(f"{attr} is invalid.")


def check_requirements(dist, attr, value):
    """Verify that install_requires is a valid requirements list"""
    try:
        list(_reqs.parse(value))
        if isinstance(value, (dict, set)):
            raise TypeError("Unordered types are not allowed")
    except (TypeError, ValueError) as error:
        tmpl = (
            "{attr!r} must be a string or list of strings "
            "containing valid project/version requirement specifiers; {error}"
        )
        raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) from error


def check_specifier(dist, attr, value):
    """Verify that value is a valid version specifier"""
    try:
        SpecifierSet(value)
    except (InvalidSpecifier, AttributeError) as error:
        tmpl = (
            "{attr!r} must be a string " "containing valid version specifiers; {error}"
        )
        raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) from error


def check_entry_points(dist, attr, value):
    """Verify that entry_points map is parseable"""
    try:
        _entry_points.load(value)
    except Exception as e:
        raise DistutilsSetupError(e) from e


def check_test_suite(dist, attr, value):
    if not isinstance(value, str):
        raise DistutilsSetupError("test_suite must be a string")


def check_package_data(dist, attr, value):
    """Verify that value is a dictionary of package names to glob lists"""
    if not isinstance(value, dict):
        raise DistutilsSetupError(
            "{!r} must be a dictionary mapping package names to lists of "
            "string wildcard patterns".format(attr)
        )
    for k, v in value.items():
        if not isinstance(k, str):
            raise DistutilsSetupError(
                "keys of {!r} dict must be strings (got {!r})".format(attr, k)
            )
        assert_string_list(dist, 'values of {!r} dict'.format(attr), v)


def check_packages(dist, attr, value):
    for pkgname in value:
        if not re.match(r'\w+(\.\w+)*', pkgname):
            distutils.log.warn(
                "WARNING: %r not a valid package name; please use only "
                ".-separated package names in setup.py",
                pkgname,
            )


_Distribution = get_unpatched(distutils.core.Distribution)


class Distribution(_Distribution):
    """Distribution with support for tests and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'test_suite' -- the name of a test suite to run for the 'test' command.
        If the user runs 'python setup.py test', the package will be installed,
        and the named test suite will be run.  The format is the same as
        would be used on a 'unittest.py' command line.  That is, it is the
        dotted name of an object to import and call to generate a test suite.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.
    """

    _DISTUTILS_UNSUPPORTED_METADATA = {
        'long_description_content_type': lambda: None,
        'project_urls': dict,
        'provides_extras': OrderedSet,
        'license_file': lambda: None,
        'license_files': lambda: None,
        'install_requires': list,
        'extras_require': dict,
    }

    _patched_dist = None

    def patch_missing_pkg_info(self, attrs):
        # Fake up a replacement for the data that would normally come from
        # PKG-INFO, but which might not yet be built if this is a fresh
        # checkout.
        #
        if not attrs or 'name' not in attrs or 'version' not in attrs:
            return
        name = _normalization.safe_name(str(attrs['name'])).lower()
        with suppress(metadata.PackageNotFoundError):
            dist = metadata.distribution(name)
            if dist is not None and not dist.read_text('PKG-INFO'):
                dist._version = _normalization.safe_version(str(attrs['version']))
                self._patched_dist = dist

    def __init__(self, attrs=None):
        have_package_data = hasattr(self, "package_data")
        if not have_package_data:
            self.package_data = {}
        attrs = attrs or {}
        self.dist_files = []
        # Filter-out setuptools' specific options.
        self.src_root = attrs.pop("src_root", None)
        self.patch_missing_pkg_info(attrs)
        self.dependency_links = attrs.pop('dependency_links', [])
        self.setup_requires = attrs.pop('setup_requires', [])
        for ep in metadata.entry_points(group='distutils.setup_keywords'):
            vars(self).setdefault(ep.name, None)

        metadata_only = set(self._DISTUTILS_UNSUPPORTED_METADATA)
        metadata_only -= {"install_requires", "extras_require"}
        dist_attrs = {k: v for k, v in attrs.items() if k not in metadata_only}
        _Distribution.__init__(self, dist_attrs)

        # Private API (setuptools-use only, not restricted to Distribution)
        # Stores files that are referenced by the configuration and need to be in the
        # sdist (e.g. `version = file: VERSION.txt`)
        self._referenced_files: Set[str] = set()

        self.set_defaults = ConfigDiscovery(self)

        self._set_metadata_defaults(attrs)

        self.metadata.version = self._normalize_version(self.metadata.version)
        self._finalize_requires()

    def _validate_metadata(self):
        required = {"name"}
        provided = {
            key
            for key in vars(self.metadata)
            if getattr(self.metadata, key, None) is not None
        }
        missing = required - provided

        if missing:
            msg = f"Required package metadata is missing: {missing}"
            raise DistutilsSetupError(msg)

    def _set_metadata_defaults(self, attrs):
        """
        Fill-in missing metadata fields not supported by distutils.
        Some fields may have been set by other tools (e.g. pbr).
        Those fields (vars(self.metadata)) take precedence to
        supplied attrs.
        """
        for option, default in self._DISTUTILS_UNSUPPORTED_METADATA.items():
            vars(self.metadata).setdefault(option, attrs.get(option, default()))

    @staticmethod
    def _normalize_version(version):
        from . import sic

        if isinstance(version, numbers.Number):
            # Some people apparently take "version number" too literally :)
            version = str(version)
        elif isinstance(version, sic) or version is None:
            return version

        normalized = str(Version(version))
        if version != normalized:
            InformationOnly.emit(f"Normalizing '{version}' to '{normalized}'")
            return normalized
        return version

    def _finalize_requires(self):
        """
        Set `metadata.python_requires` and fix environment markers
        in `install_requires` and `extras_require`.
        """
        if getattr(self, 'python_requires', None):
            self.metadata.python_requires = self.python_requires

        self._normalize_requires()
        self.metadata.install_requires = self.install_requires
        self.metadata.extras_require = self.extras_require

        if self.extras_require:
            for extra in self.extras_require.keys():
                # Setuptools allows a weird "<name>:<env markers> syntax for extras
                extra = extra.split(':')[0]
                if extra:
                    self.metadata.provides_extras.add(extra)

    def _normalize_requires(self):
        """Make sure requirement-related attributes exist and are normalized"""
        install_requires = getattr(self, "install_requires", None) or []
        extras_require = getattr(self, "extras_require", None) or {}
        self.install_requires = list(map(str, _reqs.parse(install_requires)))
        self.extras_require = {
            k: list(map(str, _reqs.parse(v or []))) for k, v in extras_require.items()
        }

    def _finalize_license_files(self):
        """Compute names of all license files which should be included."""
        license_files: Optional[List[str]] = self.metadata.license_files
        patterns: List[str] = license_files if license_files else []

        license_file: Optional[str] = self.metadata.license_file
        if license_file and license_file not in patterns:
            patterns.append(license_file)

        if license_files is None and license_file is None:
            # Default patterns match the ones wheel uses
            # See https://wheel.readthedocs.io/en/stable/user_guide.html
            # -> 'Including license files in the generated wheel file'
            patterns = ('LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*')

        self.metadata.license_files = list(
            unique_everseen(self._expand_patterns(patterns))
        )

    @staticmethod
    def _expand_patterns(patterns):
        """
        >>> list(Distribution._expand_patterns(['LICENSE']))
        ['LICENSE']
        >>> list(Distribution._expand_patterns(['setup.cfg', 'LIC*']))
        ['setup.cfg', 'LICENSE']
        """
        return (
            path
            for pattern in patterns
            for path in sorted(iglob(pattern))
            if not path.endswith('~') and os.path.isfile(path)
        )

    # FIXME: 'Distribution._parse_config_files' is too complex (14)
    def _parse_config_files(self, filenames=None):  # noqa: C901
        """
        Adapted from distutils.dist.Distribution.parse_config_files,
        this method provides the same functionality in subtly-improved
        ways.
        """
        from configparser import ConfigParser

        # Ignore install directory options if we have a venv
        ignore_options = (
            []
            if sys.prefix == sys.base_prefix
            else [
                'install-base',
                'install-platbase',
                'install-lib',
                'install-platlib',
                'install-purelib',
                'install-headers',
                'install-scripts',
                'install-data',
                'prefix',
                'exec-prefix',
                'home',
                'user',
                'root',
            ]
        )

        ignore_options = frozenset(ignore_options)

        if filenames is None:
            filenames = self.find_config_files()

        if DEBUG:
            self.announce("Distribution.parse_config_files():")

        parser = ConfigParser()
        parser.optionxform = str
        for filename in filenames:
            with open(filename, encoding='utf-8') as reader:
                if DEBUG:
                    self.announce("  reading {filename}".format(**locals()))
                parser.read_file(reader)
            for section in parser.sections():
                options = parser.options(section)
                opt_dict = self.get_option_dict(section)

                for opt in options:
                    if opt == '__name__' or opt in ignore_options:
                        continue

                    val = parser.get(section, opt)
                    opt = self.warn_dash_deprecation(opt, section)
                    opt = self.make_option_lowercase(opt, section)
                    opt_dict[opt] = (filename, val)

            # Make the ConfigParser forget everything (so we retain
            # the original filenames that options come from)
            parser.__init__()

        if 'global' not in self.command_options:
            return

        # If there was a "global" section in the config file, use it
        # to set Distribution options.

        for opt, (src, val) in self.command_options['global'].items():
            alias = self.negative_opt.get(opt)
            if alias:
                val = not strtobool(val)
            elif opt in ('verbose', 'dry_run'):  # ugh!
                val = strtobool(val)

            try:
                setattr(self, alias or opt, val)
            except ValueError as e:
                raise DistutilsOptionError(e) from e

    def warn_dash_deprecation(self, opt, section):
        if section in (
            'options.extras_require',
            'options.data_files',
        ):
            return opt

        underscore_opt = opt.replace('-', '_')
        commands = list(
            itertools.chain(
                distutils.command.__all__,
                self._setuptools_commands(),
            )
        )
        if (
            not section.startswith('options')
            and section != 'metadata'
            and section not in commands
        ):
            return underscore_opt

        if '-' in opt:
            SetuptoolsDeprecationWarning.emit(
                "Invalid dash-separated options",
                f"""
                Usage of dash-separated {opt!r} will not be supported in future
                versions. Please use the underscore name {underscore_opt!r} instead.
                """,
                see_docs="userguide/declarative_config.html",
                due_date=(2024, 9, 26),
                # Warning initially introduced in 3 Mar 2021
            )
        return underscore_opt

    def _setuptools_commands(self):
        try:
            return metadata.distribution('setuptools').entry_points.names
        except metadata.PackageNotFoundError:
            # during bootstrapping, distribution doesn't exist
            return []

    def make_option_lowercase(self, opt, section):
        if section != 'metadata' or opt.islower():
            return opt

        lowercase_opt = opt.lower()
        SetuptoolsDeprecationWarning.emit(
            "Invalid uppercase configuration",
            f"""
            Usage of uppercase key {opt!r} in {section!r} will not be supported in
            future versions. Please use lowercase {lowercase_opt!r} instead.
            """,
            see_docs="userguide/declarative_config.html",
            due_date=(2024, 9, 26),
            # Warning initially introduced in 6 Mar 2021
        )
        return lowercase_opt

    # FIXME: 'Distribution._set_command_options' is too complex (14)
    def _set_command_options(self, command_obj, option_dict=None):  # noqa: C901
        """
        Set the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').

        (Adopted from distutils.dist.Distribution._set_command_options)
        """
        command_name = command_obj.get_command_name()
        if option_dict is None:
            option_dict = self.get_option_dict(command_name)

        if DEBUG:
            self.announce("  setting options for '%s' command:" % command_name)
        for option, (source, value) in option_dict.items():
            if DEBUG:
                self.announce("    %s = %s (from %s)" % (option, value, source))
            try:
                bool_opts = [translate_longopt(o) for o in command_obj.boolean_options]
            except AttributeError:
                bool_opts = []
            try:
                neg_opt = command_obj.negative_opt
            except AttributeError:
                neg_opt = {}

            try:
                is_string = isinstance(value, str)
                if option in neg_opt and is_string:
                    setattr(command_obj, neg_opt[option], not strtobool(value))
                elif option in bool_opts and is_string:
                    setattr(command_obj, option, strtobool(value))
                elif hasattr(command_obj, option):
                    setattr(command_obj, option, value)
                else:
                    raise DistutilsOptionError(
                        "error in %s: command '%s' has no such option '%s'"
                        % (source, command_name, option)
                    )
            except ValueError as e:
                raise DistutilsOptionError(e) from e

    def _get_project_config_files(self, filenames):
        """Add default file and split between INI and TOML"""
        tomlfiles = []
        standard_project_metadata = Path(self.src_root or os.curdir, "pyproject.toml")
        if filenames is not None:
            parts = partition(lambda f: Path(f).suffix == ".toml", filenames)
            filenames = list(parts[0])  # 1st element => predicate is False
            tomlfiles = list(parts[1])  # 2nd element => predicate is True
        elif standard_project_metadata.exists():
            tomlfiles = [standard_project_metadata]
        return filenames, tomlfiles

    def parse_config_files(self, filenames=None, ignore_option_errors=False):
        """Parses configuration files from various levels
        and loads configuration.
        """
        inifiles, tomlfiles = self._get_project_config_files(filenames)

        self._parse_config_files(filenames=inifiles)

        setupcfg.parse_configuration(
            self, self.command_options, ignore_option_errors=ignore_option_errors
        )
        for filename in tomlfiles:
            pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)

        self._finalize_requires()
        self._finalize_license_files()

    def fetch_build_eggs(self, requires):
        """Resolve pre-setup requirements"""
        from .installer import _fetch_build_eggs

        return _fetch_build_eggs(self, requires)

    def finalize_options(self):
        """
        Allow plugins to apply arbitrary operations to the
        distribution. Each hook may optionally define a 'order'
        to influence the order of execution. Smaller numbers
        go first and the default is 0.
        """
        group = 'setuptools.finalize_distribution_options'

        def by_order(hook):
            return getattr(hook, 'order', 0)

        defined = metadata.entry_points(group=group)
        filtered = itertools.filterfalse(self._removed, defined)
        loaded = map(lambda e: e.load(), filtered)
        for ep in sorted(loaded, key=by_order):
            ep(self)

    @staticmethod
    def _removed(ep):
        """
        When removing an entry point, if metadata is loaded
        from an older version of Setuptools, that removed
        entry point will attempt to be loaded and will fail.
        See #2765 for more details.
        """
        removed = {
            # removed 2021-09-05
            '2to3_doctests',
        }
        return ep.name in removed

    def _finalize_setup_keywords(self):
        for ep in metadata.entry_points(group='distutils.setup_keywords'):
            value = getattr(self, ep.name, None)
            if value is not None:
                ep.load()(self, ep.name, value)

    def get_egg_cache_dir(self):
        from . import windows_support

        egg_cache_dir = os.path.join(os.curdir, '.eggs')
        if not os.path.exists(egg_cache_dir):
            os.mkdir(egg_cache_dir)
            windows_support.hide_file(egg_cache_dir)
            readme_txt_filename = os.path.join(egg_cache_dir, 'README.txt')
            with open(readme_txt_filename, 'w') as f:
                f.write(
                    'This directory contains eggs that were downloaded '
                    'by setuptools to build, test, and run plug-ins.\n\n'
                )
                f.write(
                    'This directory caches those eggs to prevent '
                    'repeated downloads.\n\n'
                )
                f.write('However, it is safe to delete this directory.\n\n')

        return egg_cache_dir

    def fetch_build_egg(self, req):
        """Fetch an egg needed for building"""
        from .installer import fetch_build_egg

        return fetch_build_egg(self, req)

    def get_command_class(self, command):
        """Pluggable version of get_command_class()"""
        if command in self.cmdclass:
            return self.cmdclass[command]

        eps = metadata.entry_points(group='distutils.commands', name=command)
        for ep in eps:
            self.cmdclass[command] = cmdclass = ep.load()
            return cmdclass
        else:
            return _Distribution.get_command_class(self, command)

    def print_commands(self):
        for ep in metadata.entry_points(group='distutils.commands'):
            if ep.name not in self.cmdclass:
                cmdclass = ep.load()
                self.cmdclass[ep.name] = cmdclass
        return _Distribution.print_commands(self)

    def get_command_list(self):
        for ep in metadata.entry_points(group='distutils.commands'):
            if ep.name not in self.cmdclass:
                cmdclass = ep.load()
                self.cmdclass[ep.name] = cmdclass
        return _Distribution.get_command_list(self)

    def include(self, **attrs):
        """Add items to distribution that are named in keyword arguments

        For example, 'dist.include(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        """
        for k, v in attrs.items():
            include = getattr(self, '_include_' + k, None)
            if include:
                include(v)
            else:
                self._include_misc(k, v)

    def exclude_package(self, package):
        """Remove packages, modules, and extensions in named package"""

        pfx = package + '.'
        if self.packages:
            self.packages = [
                p for p in self.packages if p != package and not p.startswith(pfx)
            ]

        if self.py_modules:
            self.py_modules = [
                p for p in self.py_modules if p != package and not p.startswith(pfx)
            ]

        if self.ext_modules:
            self.ext_modules = [
                p
                for p in self.ext_modules
                if p.name != package and not p.name.startswith(pfx)
            ]

    def has_contents_for(self, package):
        """Return true if 'exclude_package(package)' would do something"""

        pfx = package + '.'

        for p in self.iter_distribution_names():
            if p == package or p.startswith(pfx):
                return True

    def _exclude_misc(self, name, value):
        """Handle 'exclude()' for list/tuple attrs without a special handler"""
        if not isinstance(value, sequence):
            raise DistutilsSetupError(
                "%s: setting must be a list or tuple (%r)" % (name, value)
            )
        try:
            old = getattr(self, name)
        except AttributeError as e:
            raise DistutilsSetupError("%s: No such distribution setting" % name) from e
        if old is not None and not isinstance(old, sequence):
            raise DistutilsSetupError(
                name + ": this setting cannot be changed via include/exclude"
            )
        elif old:
            setattr(self, name, [item for item in old if item not in value])

    def _include_misc(self, name, value):
        """Handle 'include()' for list/tuple attrs without a special handler"""

        if not isinstance(value, sequence):
            raise DistutilsSetupError("%s: setting must be a list (%r)" % (name, value))
        try:
            old = getattr(self, name)
        except AttributeError as e:
            raise DistutilsSetupError("%s: No such distribution setting" % name) from e
        if old is None:
            setattr(self, name, value)
        elif not isinstance(old, sequence):
            raise DistutilsSetupError(
                name + ": this setting cannot be changed via include/exclude"
            )
        else:
            new = [item for item in value if item not in old]
            setattr(self, name, old + new)

    def exclude(self, **attrs):
        """Remove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        """
        for k, v in attrs.items():
            exclude = getattr(self, '_exclude_' + k, None)
            if exclude:
                exclude(v)
            else:
                self._exclude_misc(k, v)

    def _exclude_packages(self, packages):
        if not isinstance(packages, sequence):
            raise DistutilsSetupError(
                "packages: setting must be a list or tuple (%r)" % (packages,)
            )
        list(map(self.exclude_package, packages))

    def _parse_command_opts(self, parser, args):
        # Remove --with-X/--without-X options when processing command args
        self.global_options = self.__class__.global_options
        self.negative_opt = self.__class__.negative_opt

        # First, expand any aliases
        command = args[0]
        aliases = self.get_option_dict('aliases')
        while command in aliases:
            src, alias = aliases[command]
            del aliases[command]  # ensure each alias can expand only once!
            import shlex

            args[:1] = shlex.split(alias, True)
            command = args[0]

        nargs = _Distribution._parse_command_opts(self, parser, args)

        # Handle commands that want to consume all remaining arguments
        cmd_class = self.get_command_class(command)
        if getattr(cmd_class, 'command_consumes_arguments', None):
            self.get_option_dict(command)['args'] = ("command line", nargs)
            if nargs is not None:
                return []

        return nargs

    def get_cmdline_options(self):
        """Return a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        """

        d = {}

        for cmd, opts in self.command_options.items():
            for opt, (src, val) in opts.items():
                if src != "command line":
                    continue

                opt = opt.replace('_', '-')

                if val == 0:
                    cmdobj = self.get_command_obj(cmd)
                    neg_opt = self.negative_opt.copy()
                    neg_opt.update(getattr(cmdobj, 'negative_opt', {}))
                    for neg, pos in neg_opt.items():
                        if pos == opt:
                            opt = neg
                            val = None
                            break
                    else:
                        raise AssertionError("Shouldn't be able to get here")

                elif val == 1:
                    val = None

                d.setdefault(cmd, {})[opt] = val

        return d

    def iter_distribution_names(self):
        """Yield all packages, modules, and extension names in distribution"""

        for pkg in self.packages or ():
            yield pkg

        for module in self.py_modules or ():
            yield module

        for ext in self.ext_modules or ():
            if isinstance(ext, tuple):
                name, buildinfo = ext
            else:
                name = ext.name
            if name.endswith('module'):
                name = name[:-6]
            yield name

    def handle_display_options(self, option_order):
        """If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        """
        import sys

        if self.help_commands:
            return _Distribution.handle_display_options(self, option_order)

        # Stdout may be StringIO (e.g. in tests)
        if not isinstance(sys.stdout, io.TextIOWrapper):
            return _Distribution.handle_display_options(self, option_order)

        # Don't wrap stdout if utf-8 is already the encoding. Provides
        #  workaround for #334.
        if sys.stdout.encoding.lower() in ('utf-8', 'utf8'):
            return _Distribution.handle_display_options(self, option_order)

        # Print metadata in UTF-8 no matter the platform
        encoding = sys.stdout.encoding
        sys.stdout.reconfigure(encoding='utf-8')
        try:
            return _Distribution.handle_display_options(self, option_order)
        finally:
            sys.stdout.reconfigure(encoding=encoding)

    def run_command(self, command):
        self.set_defaults()
        # Postpone defaults until all explicit configuration is considered
        # (setup() args, config files, command line and plugins)

        super().run_command(command)


class DistDeprecationWarning(SetuptoolsDeprecationWarning):
    """Class for warning about deprecations in dist in
    setuptools. Not ignored by default, unlike DeprecationWarning."""
python3.12/site-packages/setuptools/_normalization.py000064400000010166151732704160016743 0ustar00"""
Helpers for normalization as expected in wheel/sdist/module file names
and core metadata
"""
import re
from pathlib import Path
from typing import Union

from .extern import packaging

_Path = Union[str, Path]

# https://packaging.python.org/en/latest/specifications/core-metadata/#name
_VALID_NAME = re.compile(r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.I)
_UNSAFE_NAME_CHARS = re.compile(r"[^A-Z0-9.]+", re.I)
_NON_ALPHANUMERIC = re.compile(r"[^A-Z0-9]+", re.I)
_PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I)


def safe_identifier(name: str) -> str:
    """Make a string safe to be used as Python identifier.
    >>> safe_identifier("12abc")
    '_12abc'
    >>> safe_identifier("__editable__.myns.pkg-78.9.3_local")
    '__editable___myns_pkg_78_9_3_local'
    """
    safe = re.sub(r'\W|^(?=\d)', '_', name)
    assert safe.isidentifier()
    return safe


def safe_name(component: str) -> str:
    """Escape a component used as a project name according to Core Metadata.
    >>> safe_name("hello world")
    'hello-world'
    >>> safe_name("hello?world")
    'hello-world'
    """
    # See pkg_resources.safe_name
    return _UNSAFE_NAME_CHARS.sub("-", component)


def safe_version(version: str) -> str:
    """Convert an arbitrary string into a valid version string.
    Can still raise an ``InvalidVersion`` exception.
    To avoid exceptions use ``best_effort_version``.
    >>> safe_version("1988 12 25")
    '1988.12.25'
    >>> safe_version("v0.2.1")
    '0.2.1'
    >>> safe_version("v0.2?beta")
    '0.2b0'
    >>> safe_version("v0.2 beta")
    '0.2b0'
    >>> safe_version("ubuntu lts")
    Traceback (most recent call last):
    ...
    setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'ubuntu.lts'
    """
    v = version.replace(' ', '.')
    try:
        return str(packaging.version.Version(v))
    except packaging.version.InvalidVersion:
        attempt = _UNSAFE_NAME_CHARS.sub("-", v)
        return str(packaging.version.Version(attempt))


def best_effort_version(version: str) -> str:
    """Convert an arbitrary string into a version-like string.
    Fallback when ``safe_version`` is not safe enough.
    >>> best_effort_version("v0.2 beta")
    '0.2b0'
    >>> best_effort_version("ubuntu lts")
    '0.dev0+sanitized.ubuntu.lts'
    >>> best_effort_version("0.23ubuntu1")
    '0.23.dev0+sanitized.ubuntu1'
    >>> best_effort_version("0.23-")
    '0.23.dev0+sanitized'
    >>> best_effort_version("0.-_")
    '0.dev0+sanitized'
    >>> best_effort_version("42.+?1")
    '42.dev0+sanitized.1'
    """
    # See pkg_resources._forgiving_version
    try:
        return safe_version(version)
    except packaging.version.InvalidVersion:
        v = version.replace(' ', '.')
        match = _PEP440_FALLBACK.search(v)
        if match:
            safe = match["safe"]
            rest = v[len(safe) :]
        else:
            safe = "0"
            rest = version
        safe_rest = _NON_ALPHANUMERIC.sub(".", rest).strip(".")
        local = f"sanitized.{safe_rest}".strip(".")
        return safe_version(f"{safe}.dev0+{local}")


def safe_extra(extra: str) -> str:
    """Normalize extra name according to PEP 685
    >>> safe_extra("_FrIeNdLy-._.-bArD")
    'friendly-bard'
    >>> safe_extra("FrIeNdLy-._.-bArD__._-")
    'friendly-bard'
    """
    return _NON_ALPHANUMERIC.sub("-", extra).strip("-").lower()


def filename_component(value: str) -> str:
    """Normalize each component of a filename (e.g. distribution/version part of wheel)
    Note: ``value`` needs to be already normalized.
    >>> filename_component("my-pkg")
    'my_pkg'
    """
    return value.replace("-", "_").strip("_")


def safer_name(value: str) -> str:
    """Like ``safe_name`` but can be used as filename component for wheel"""
    # See bdist_wheel.safer_name
    return filename_component(safe_name(value))


def safer_best_effort_version(value: str) -> str:
    """Like ``best_effort_version`` but can be used as filename component for wheel"""
    # See bdist_wheel.safer_verion
    # TODO: Replace with only safe_version in the future (no need for best effort)
    return filename_component(best_effort_version(value))
python3.12/site-packages/setuptools/extension.py000064400000012727151732704170015740 0ustar00import re
import functools
import distutils.core
import distutils.errors
import distutils.extension

from .monkey import get_unpatched


def _have_cython():
    """
    Return True if Cython can be imported.
    """
    cython_impl = 'Cython.Distutils.build_ext'
    try:
        # from (cython_impl) import build_ext
        __import__(cython_impl, fromlist=['build_ext']).build_ext
        return True
    except Exception:
        pass
    return False


# for compatibility
have_pyrex = _have_cython

_Extension = get_unpatched(distutils.core.Extension)


class Extension(_Extension):
    """
    Describes a single extension module.

    This means that all source files will be compiled into a single binary file
    ``<module path>.<suffix>`` (with ``<module path>`` derived from ``name`` and
    ``<suffix>`` defined by one of the values in
    ``importlib.machinery.EXTENSION_SUFFIXES``).

    In the case ``.pyx`` files are passed as ``sources and`` ``Cython`` is **not**
    installed in the build environment, ``setuptools`` may also try to look for the
    equivalent ``.cpp`` or ``.c`` files.

    :arg str name:
      the full name of the extension, including any packages -- ie.
      *not* a filename or pathname, but Python dotted name

    :arg list[str] sources:
      list of source filenames, relative to the distribution root
      (where the setup script lives), in Unix form (slash-separated)
      for portability.  Source files may be C, C++, SWIG (.i),
      platform-specific resource files, or whatever else is recognized
      by the "build_ext" command as source for a Python extension.

    :keyword list[str] include_dirs:
      list of directories to search for C/C++ header files (in Unix
      form for portability)

    :keyword list[tuple[str, str|None]] define_macros:
      list of macros to define; each macro is defined using a 2-tuple:
      the first item corresponding to the name of the macro and the second
      item either a string with its value or None to
      define it without a particular value (equivalent of "#define
      FOO" in source or -DFOO on Unix C compiler command line)

    :keyword list[str] undef_macros:
      list of macros to undefine explicitly

    :keyword list[str] library_dirs:
      list of directories to search for C/C++ libraries at link time

    :keyword list[str] libraries:
      list of library names (not filenames or paths) to link against

    :keyword list[str] runtime_library_dirs:
      list of directories to search for C/C++ libraries at run time
      (for shared extensions, this is when the extension is loaded).
      Setting this will cause an exception during build on Windows
      platforms.

    :keyword list[str] extra_objects:
      list of extra files to link with (eg. object files not implied
      by 'sources', static library that must be explicitly specified,
      binary resource files, etc.)

    :keyword list[str] extra_compile_args:
      any extra platform- and compiler-specific information to use
      when compiling the source files in 'sources'.  For platforms and
      compilers where "command line" makes sense, this is typically a
      list of command-line arguments, but for other platforms it could
      be anything.

    :keyword list[str] extra_link_args:
      any extra platform- and compiler-specific information to use
      when linking object files together to create the extension (or
      to create a new static Python interpreter).  Similar
      interpretation as for 'extra_compile_args'.

    :keyword list[str] export_symbols:
      list of symbols to be exported from a shared extension.  Not
      used on all platforms, and not generally necessary for Python
      extensions, which typically export exactly one symbol: "init" +
      extension_name.

    :keyword list[str] swig_opts:
      any extra options to pass to SWIG if a source file has the .i
      extension.

    :keyword list[str] depends:
      list of files that the extension depends on

    :keyword str language:
      extension language (i.e. "c", "c++", "objc"). Will be detected
      from the source extensions if not provided.

    :keyword bool optional:
      specifies that a build failure in the extension should not abort the
      build process, but simply not install the failing extension.

    :keyword bool py_limited_api:
      opt-in flag for the usage of :doc:`Python's limited API <python:c-api/stable>`.

    :raises setuptools.errors.PlatformError: if 'runtime_library_dirs' is
      specified on Windows. (since v63)
    """

    def __init__(self, name, sources, *args, **kw):
        # The *args is needed for compatibility as calls may use positional
        # arguments. py_limited_api may be set only via keyword.
        self.py_limited_api = kw.pop("py_limited_api", False)
        super().__init__(name, sources, *args, **kw)

    def _convert_pyx_sources_to_lang(self):
        """
        Replace sources with .pyx extensions to sources with the target
        language extension. This mechanism allows language authors to supply
        pre-converted sources but to prefer the .pyx sources.
        """
        if _have_cython():
            # the build has Cython, so allow it to compile the .pyx files
            return
        lang = self.language or ''
        target_ext = '.cpp' if lang.lower() == 'c++' else '.c'
        sub = functools.partial(re.sub, '.pyx$', target_ext)
        self.sources = list(map(sub, self.sources))


class Library(Extension):
    """Just like a regular Extension, but built as a library instead"""
python3.12/site-packages/setuptools/monkey.py000064400000011257151732704170015223 0ustar00"""
Monkey patching of distutils.
"""

import functools
import inspect
import platform
import sys
import types
from importlib import import_module

import distutils.filelist


__all__ = []
"""
Everything is private. Contact the project team
if you think you need this functionality.
"""


def _get_mro(cls):
    """
    Returns the bases classes for cls sorted by the MRO.

    Works around an issue on Jython where inspect.getmro will not return all
    base classes if multiple classes share the same name. Instead, this
    function will return a tuple containing the class itself, and the contents
    of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024.
    """
    if platform.python_implementation() == "Jython":
        return (cls,) + cls.__bases__
    return inspect.getmro(cls)


def get_unpatched(item):
    lookup = (
        get_unpatched_class
        if isinstance(item, type)
        else get_unpatched_function
        if isinstance(item, types.FunctionType)
        else lambda item: None
    )
    return lookup(item)


def get_unpatched_class(cls):
    """Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
    """
    external_bases = (
        cls for cls in _get_mro(cls) if not cls.__module__.startswith('setuptools')
    )
    base = next(external_bases)
    if not base.__module__.startswith('distutils'):
        msg = "distutils has already been patched by %r" % cls
        raise AssertionError(msg)
    return base


def patch_all():
    import setuptools

    # we can't patch distutils.cmd, alas
    distutils.core.Command = setuptools.Command

    has_issue_12885 = sys.version_info <= (3, 5, 3)

    if has_issue_12885:
        # fix findall bug in distutils (https://bugs.python.org/issue12885)
        distutils.filelist.findall = setuptools.findall

    needs_warehouse = (3, 4) < sys.version_info < (3, 4, 6) or (
        3,
        5,
    ) < sys.version_info <= (3, 5, 3)

    if needs_warehouse:
        warehouse = 'https://upload.pypi.org/legacy/'
        distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse

    _patch_distribution_metadata()

    # Install Distribution throughout the distutils
    for module in distutils.dist, distutils.core, distutils.cmd:
        module.Distribution = setuptools.dist.Distribution

    # Install the patched Extension
    distutils.core.Extension = setuptools.extension.Extension
    distutils.extension.Extension = setuptools.extension.Extension
    if 'distutils.command.build_ext' in sys.modules:
        sys.modules[
            'distutils.command.build_ext'
        ].Extension = setuptools.extension.Extension

    patch_for_msvc_specialized_compiler()


def _patch_distribution_metadata():
    from . import _core_metadata

    """Patch write_pkg_file and read_pkg_file for higher metadata standards"""
    for attr in (
        'write_pkg_info',
        'write_pkg_file',
        'read_pkg_file',
        'get_metadata_version',
    ):
        new_val = getattr(_core_metadata, attr)
        setattr(distutils.dist.DistributionMetadata, attr, new_val)


def patch_func(replacement, target_mod, func_name):
    """
    Patch func_name in target_mod with replacement

    Important - original must be resolved by name to avoid
    patching an already patched function.
    """
    original = getattr(target_mod, func_name)

    # set the 'unpatched' attribute on the replacement to
    # point to the original.
    vars(replacement).setdefault('unpatched', original)

    # replace the function in the original module
    setattr(target_mod, func_name, replacement)


def get_unpatched_function(candidate):
    return getattr(candidate, 'unpatched')


def patch_for_msvc_specialized_compiler():
    """
    Patch functions in distutils to use standalone Microsoft Visual C++
    compilers.
    """
    # import late to avoid circular imports on Python < 3.5
    msvc = import_module('setuptools.msvc')

    if platform.system() != 'Windows':
        # Compilers only available on Microsoft Windows
        return

    def patch_params(mod_name, func_name):
        """
        Prepare the parameters for patch_func to patch indicated function.
        """
        repl_prefix = 'msvc14_'
        repl_name = repl_prefix + func_name.lstrip('_')
        repl = getattr(msvc, repl_name)
        mod = import_module(mod_name)
        if not hasattr(mod, func_name):
            raise ImportError(func_name)
        return repl, mod, func_name

    # Python 3.5+
    msvc14 = functools.partial(patch_params, 'distutils._msvccompiler')

    try:
        # Patch distutils._msvccompiler._get_vc_env
        patch_func(*msvc14('_get_vc_env'))
    except ImportError:
        pass
python3.12/site-packages/setuptools/_imp.py000064400000004601151732704170014640 0ustar00"""
Re-implementation of find_module and get_frozen_object
from the deprecated imp module.
"""

import os
import importlib.util
import importlib.machinery

from importlib.util import module_from_spec


PY_SOURCE = 1
PY_COMPILED = 2
C_EXTENSION = 3
C_BUILTIN = 6
PY_FROZEN = 7


def find_spec(module, paths):
    finder = (
        importlib.machinery.PathFinder().find_spec
        if isinstance(paths, list)
        else importlib.util.find_spec
    )
    return finder(module, paths)


def find_module(module, paths=None):
    """Just like 'imp.find_module()', but with package support"""
    spec = find_spec(module, paths)
    if spec is None:
        raise ImportError("Can't find %s" % module)
    if not spec.has_location and hasattr(spec, 'submodule_search_locations'):
        spec = importlib.util.spec_from_loader('__init__.py', spec.loader)

    kind = -1
    file = None
    static = isinstance(spec.loader, type)
    if (
        spec.origin == 'frozen'
        or static
        and issubclass(spec.loader, importlib.machinery.FrozenImporter)
    ):
        kind = PY_FROZEN
        path = None  # imp compabilty
        suffix = mode = ''  # imp compatibility
    elif (
        spec.origin == 'built-in'
        or static
        and issubclass(spec.loader, importlib.machinery.BuiltinImporter)
    ):
        kind = C_BUILTIN
        path = None  # imp compabilty
        suffix = mode = ''  # imp compatibility
    elif spec.has_location:
        path = spec.origin
        suffix = os.path.splitext(path)[1]
        mode = 'r' if suffix in importlib.machinery.SOURCE_SUFFIXES else 'rb'

        if suffix in importlib.machinery.SOURCE_SUFFIXES:
            kind = PY_SOURCE
        elif suffix in importlib.machinery.BYTECODE_SUFFIXES:
            kind = PY_COMPILED
        elif suffix in importlib.machinery.EXTENSION_SUFFIXES:
            kind = C_EXTENSION

        if kind in {PY_SOURCE, PY_COMPILED}:
            file = open(path, mode)
    else:
        path = None
        suffix = mode = ''

    return file, path, (suffix, mode, kind)


def get_frozen_object(module, paths=None):
    spec = find_spec(module, paths)
    if not spec:
        raise ImportError("Can't find %s" % module)
    return spec.loader.get_code(module)


def get_module(module, paths, info):
    spec = find_spec(module, paths)
    if not spec:
        raise ImportError("Can't find %s" % module)
    return module_from_spec(spec)
python3.12/site-packages/setuptools/_reqs.py000064400000002140151732704170015021 0ustar00from functools import lru_cache
from typing import Callable, Iterable, Iterator, TypeVar, Union, overload

import setuptools.extern.jaraco.text as text
from setuptools.extern.packaging.requirements import Requirement

_T = TypeVar("_T")
_StrOrIter = Union[str, Iterable[str]]


parse_req: Callable[[str], Requirement] = lru_cache()(Requirement)
# Setuptools parses the same requirement many times
# (e.g. first for validation than for normalisation),
# so it might be worth to cache.


def parse_strings(strs: _StrOrIter) -> Iterator[str]:
    """
    Yield requirement strings for each specification in `strs`.

    `strs` must be a string, or a (possibly-nested) iterable thereof.
    """
    return text.join_continuation(map(text.drop_comment, text.yield_lines(strs)))


@overload
def parse(strs: _StrOrIter) -> Iterator[Requirement]:
    ...


@overload
def parse(strs: _StrOrIter, parser: Callable[[str], _T]) -> Iterator[_T]:
    ...


def parse(strs, parser=parse_req):
    """
    Replacement for ``pkg_resources.parse_requirements`` that uses ``packaging``.
    """
    return map(parser, parse_strings(strs))
python3.12/site-packages/setuptools/unicode_utils.py000064400000001655151732704170016570 0ustar00import unicodedata
import sys


# HFS Plus uses decomposed UTF-8
def decompose(path):
    if isinstance(path, str):
        return unicodedata.normalize('NFD', path)
    try:
        path = path.decode('utf-8')
        path = unicodedata.normalize('NFD', path)
        path = path.encode('utf-8')
    except UnicodeError:
        pass  # Not UTF-8
    return path


def filesys_decode(path):
    """
    Ensure that the given path is decoded,
    NONE when no expected encoding works
    """

    if isinstance(path, str):
        return path

    fs_enc = sys.getfilesystemencoding() or 'utf-8'
    candidates = fs_enc, 'utf-8'

    for enc in candidates:
        try:
            return path.decode(enc)
        except UnicodeDecodeError:
            continue


def try_encode(string, enc):
    "turn unicode encoding into a functional routine"
    try:
        return string.encode(enc)
    except UnicodeEncodeError:
        return None
python3.12/site-packages/setuptools/modified.py000064400000000276151732704170015500 0ustar00from ._distutils._modified import (
    newer,
    newer_pairwise,
    newer_group,
    newer_pairwise_group,
)

__all__ = ['newer', 'newer_pairwise', 'newer_group', 'newer_pairwise_group']
python3.12/site-packages/setuptools/launch.py000064400000001454151732704170015171 0ustar00"""
Launch the Python script on the command line after
setuptools is bootstrapped via import.
"""

# Note that setuptools gets imported implicitly by the
# invocation of this script using python -m setuptools.launch

import tokenize
import sys


def run():
    """
    Run the script in sys.argv[1] as if it had
    been invoked naturally.
    """
    __builtins__
    script_name = sys.argv[1]
    namespace = dict(
        __file__=script_name,
        __name__='__main__',
        __doc__=None,
    )
    sys.argv[:] = sys.argv[1:]

    open_ = getattr(tokenize, 'open', open)
    with open_(script_name) as fid:
        script = fid.read()
    norm_script = script.replace('\\r\\n', '\\n')
    code = compile(norm_script, script_name, 'exec')
    exec(code, namespace)


if __name__ == '__main__':
    run()
python3.12/site-packages/setuptools/package_index.py000064400000112711151732704200016472 0ustar00"""PyPI and direct package downloading."""

import sys
import os
import re
import io
import shutil
import socket
import base64
import hashlib
import itertools
import configparser
import html
import http.client
import urllib.parse
import urllib.request
import urllib.error
from functools import wraps

import setuptools
from pkg_resources import (
    CHECKOUT_DIST,
    Distribution,
    BINARY_DIST,
    normalize_path,
    SOURCE_DIST,
    Environment,
    find_distributions,
    safe_name,
    safe_version,
    to_filename,
    Requirement,
    DEVELOP_DIST,
    EGG_DIST,
    parse_version,
)
from distutils import log
from distutils.errors import DistutilsError
from fnmatch import translate
from setuptools.wheel import Wheel
from setuptools.extern.more_itertools import unique_everseen


EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
HREF = re.compile(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I)
PYPI_MD5 = re.compile(
    r'<a href="([^"#]+)">([^<]+)</a>\n\s+\(<a (?:title="MD5 hash"\n\s+)'
    r'href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\)'
)
URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match
EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split()

__all__ = [
    'PackageIndex',
    'distros_for_url',
    'parse_bdist_wininst',
    'interpret_distro_name',
]

_SOCKET_TIMEOUT = 15

_tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}"
user_agent = _tmpl.format(
    py_major='{}.{}'.format(*sys.version_info), setuptools=setuptools
)


def parse_requirement_arg(spec):
    try:
        return Requirement.parse(spec)
    except ValueError as e:
        raise DistutilsError(
            "Not a URL, existing file, or requirement spec: %r" % (spec,)
        ) from e


def parse_bdist_wininst(name):
    """Return (base,pyversion) or (None,None) for possible .exe name"""

    lower = name.lower()
    base, py_ver, plat = None, None, None

    if lower.endswith('.exe'):
        if lower.endswith('.win32.exe'):
            base = name[:-10]
            plat = 'win32'
        elif lower.startswith('.win32-py', -16):
            py_ver = name[-7:-4]
            base = name[:-16]
            plat = 'win32'
        elif lower.endswith('.win-amd64.exe'):
            base = name[:-14]
            plat = 'win-amd64'
        elif lower.startswith('.win-amd64-py', -20):
            py_ver = name[-7:-4]
            base = name[:-20]
            plat = 'win-amd64'
    return base, py_ver, plat


def egg_info_for_url(url):
    parts = urllib.parse.urlparse(url)
    scheme, server, path, parameters, query, fragment = parts
    base = urllib.parse.unquote(path.split('/')[-1])
    if server == 'sourceforge.net' and base == 'download':  # XXX Yuck
        base = urllib.parse.unquote(path.split('/')[-2])
    if '#' in base:
        base, fragment = base.split('#', 1)
    return base, fragment


def distros_for_url(url, metadata=None):
    """Yield egg or source distribution objects that might be found at a URL"""
    base, fragment = egg_info_for_url(url)
    for dist in distros_for_location(url, base, metadata):
        yield dist
    if fragment:
        match = EGG_FRAGMENT.match(fragment)
        if match:
            for dist in interpret_distro_name(
                url, match.group(1), metadata, precedence=CHECKOUT_DIST
            ):
                yield dist


def distros_for_location(location, basename, metadata=None):
    """Yield egg or source distribution objects based on basename"""
    if basename.endswith('.egg.zip'):
        basename = basename[:-4]  # strip the .zip
    if basename.endswith('.egg') and '-' in basename:
        # only one, unambiguous interpretation
        return [Distribution.from_location(location, basename, metadata)]
    if basename.endswith('.whl') and '-' in basename:
        wheel = Wheel(basename)
        if not wheel.is_compatible():
            return []
        return [
            Distribution(
                location=location,
                project_name=wheel.project_name,
                version=wheel.version,
                # Increase priority over eggs.
                precedence=EGG_DIST + 1,
            )
        ]
    if basename.endswith('.exe'):
        win_base, py_ver, platform = parse_bdist_wininst(basename)
        if win_base is not None:
            return interpret_distro_name(
                location, win_base, metadata, py_ver, BINARY_DIST, platform
            )
    # Try source distro extensions (.zip, .tgz, etc.)
    #
    for ext in EXTENSIONS:
        if basename.endswith(ext):
            basename = basename[: -len(ext)]
            return interpret_distro_name(location, basename, metadata)
    return []  # no extension matched


def distros_for_filename(filename, metadata=None):
    """Yield possible egg or source distribution objects based on a filename"""
    return distros_for_location(
        normalize_path(filename), os.path.basename(filename), metadata
    )


def interpret_distro_name(
    location, basename, metadata, py_version=None, precedence=SOURCE_DIST, platform=None
):
    """Generate the interpretation of a source distro name

    Note: if `location` is a filesystem filename, you should call
    ``pkg_resources.normalize_path()`` on it before passing it to this
    routine!
    """

    parts = basename.split('-')
    if not py_version and any(re.match(r'py\d\.\d$', p) for p in parts[2:]):
        # it is a bdist_dumb, not an sdist -- bail out
        return

    # find the pivot (p) that splits the name from the version.
    # infer the version as the first item that has a digit.
    for p in range(len(parts)):
        if parts[p][:1].isdigit():
            break
    else:
        p = len(parts)

    yield Distribution(
        location,
        metadata,
        '-'.join(parts[:p]),
        '-'.join(parts[p:]),
        py_version=py_version,
        precedence=precedence,
        platform=platform,
    )


def unique_values(func):
    """
    Wrap a function returning an iterable such that the resulting iterable
    only ever yields unique items.
    """

    @wraps(func)
    def wrapper(*args, **kwargs):
        return unique_everseen(func(*args, **kwargs))

    return wrapper


REL = re.compile(r"""<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>""", re.I)
"""
Regex for an HTML tag with 'rel="val"' attributes.
"""


@unique_values
def find_external_links(url, page):
    """Find rel="homepage" and rel="download" links in `page`, yielding URLs"""

    for match in REL.finditer(page):
        tag, rel = match.groups()
        rels = set(map(str.strip, rel.lower().split(',')))
        if 'homepage' in rels or 'download' in rels:
            for match in HREF.finditer(tag):
                yield urllib.parse.urljoin(url, htmldecode(match.group(1)))

    for tag in ("<th>Home Page", "<th>Download URL"):
        pos = page.find(tag)
        if pos != -1:
            match = HREF.search(page, pos)
            if match:
                yield urllib.parse.urljoin(url, htmldecode(match.group(1)))


class ContentChecker:
    """
    A null content checker that defines the interface for checking content
    """

    def feed(self, block):
        """
        Feed a block of data to the hash.
        """
        return

    def is_valid(self):
        """
        Check the hash. Return False if validation fails.
        """
        return True

    def report(self, reporter, template):
        """
        Call reporter with information about the checker (hash name)
        substituted into the template.
        """
        return


class HashChecker(ContentChecker):
    pattern = re.compile(
        r'(?P<hash_name>sha1|sha224|sha384|sha256|sha512|md5)='
        r'(?P<expected>[a-f0-9]+)'
    )

    def __init__(self, hash_name, expected):
        self.hash_name = hash_name
        self.hash = hashlib.new(hash_name)
        self.expected = expected

    @classmethod
    def from_url(cls, url):
        "Construct a (possibly null) ContentChecker from a URL"
        fragment = urllib.parse.urlparse(url)[-1]
        if not fragment:
            return ContentChecker()
        match = cls.pattern.search(fragment)
        if not match:
            return ContentChecker()
        return cls(**match.groupdict())

    def feed(self, block):
        self.hash.update(block)

    def is_valid(self):
        return self.hash.hexdigest() == self.expected

    def report(self, reporter, template):
        msg = template % self.hash_name
        return reporter(msg)


class PackageIndex(Environment):
    """A distribution index that scans web pages for download URLs"""

    def __init__(
        self,
        index_url="https://pypi.org/simple/",
        hosts=('*',),
        ca_bundle=None,
        verify_ssl=True,
        *args,
        **kw,
    ):
        super().__init__(*args, **kw)
        self.index_url = index_url + "/"[: not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate, hosts))).match
        self.to_scan = []
        self.opener = urllib.request.urlopen

    def add(self, dist):
        # ignore invalid versions
        try:
            parse_version(dist.version)
        except Exception:
            return
        return super().add(dist)

    # FIXME: 'PackageIndex.process_url' is too complex (14)
    def process_url(self, url, retrieve=False):  # noqa: C901
        """Evaluate a URL as a possible download, and maybe retrieve it"""
        if url in self.scanned_urls and not retrieve:
            return
        self.scanned_urls[url] = True
        if not URL_SCHEME(url):
            self.process_filename(url)
            return
        else:
            dists = list(distros_for_url(url))
            if dists:
                if not self.url_ok(url):
                    return
                self.debug("Found link: %s", url)

        if dists or not retrieve or url in self.fetched_urls:
            list(map(self.add, dists))
            return  # don't need the actual page

        if not self.url_ok(url):
            self.fetched_urls[url] = True
            return

        self.info("Reading %s", url)
        self.fetched_urls[url] = True  # prevent multiple fetch attempts
        tmpl = "Download error on %s: %%s -- Some packages may not be found!"
        f = self.open_url(url, tmpl % url)
        if f is None:
            return
        if isinstance(f, urllib.error.HTTPError) and f.code == 401:
            self.info("Authentication error: %s" % f.msg)
        self.fetched_urls[f.url] = True
        if 'html' not in f.headers.get('content-type', '').lower():
            f.close()  # not html, we can't process it
            return

        base = f.url  # handle redirects
        page = f.read()
        if not isinstance(page, str):
            # In Python 3 and got bytes but want str.
            if isinstance(f, urllib.error.HTTPError):
                # Errors have no charset, assume latin1:
                charset = 'latin-1'
            else:
                charset = f.headers.get_param('charset') or 'latin-1'
            page = page.decode(charset, "ignore")
        f.close()
        for match in HREF.finditer(page):
            link = urllib.parse.urljoin(base, htmldecode(match.group(1)))
            self.process_url(link)
        if url.startswith(self.index_url) and getattr(f, 'code', None) != 404:
            page = self.process_index(url, page)

    def process_filename(self, fn, nested=False):
        # process filenames or directories
        if not os.path.exists(fn):
            self.warn("Not found: %s", fn)
            return

        if os.path.isdir(fn) and not nested:
            path = os.path.realpath(fn)
            for item in os.listdir(path):
                self.process_filename(os.path.join(path, item), True)

        dists = distros_for_filename(fn)
        if dists:
            self.debug("Found: %s", fn)
            list(map(self.add, dists))

    def url_ok(self, url, fatal=False):
        s = URL_SCHEME(url)
        is_file = s and s.group(1).lower() == 'file'
        if is_file or self.allows(urllib.parse.urlparse(url)[1]):
            return True
        msg = (
            "\nNote: Bypassing %s (disallowed host; see "
            "https://setuptools.pypa.io/en/latest/deprecated/"
            "easy_install.html#restricting-downloads-with-allow-hosts for details).\n"
        )
        if fatal:
            raise DistutilsError(msg % url)
        else:
            self.warn(msg, url)

    def scan_egg_links(self, search_path):
        dirs = filter(os.path.isdir, search_path)
        egg_links = (
            (path, entry)
            for path in dirs
            for entry in os.listdir(path)
            if entry.endswith('.egg-link')
        )
        list(itertools.starmap(self.scan_egg_link, egg_links))

    def scan_egg_link(self, path, entry):
        with open(os.path.join(path, entry)) as raw_lines:
            # filter non-empty lines
            lines = list(filter(None, map(str.strip, raw_lines)))

        if len(lines) != 2:
            # format is not recognized; punt
            return

        egg_path, setup_path = lines

        for dist in find_distributions(os.path.join(path, egg_path)):
            dist.location = os.path.join(path, *lines)
            dist.precedence = SOURCE_DIST
            self.add(dist)

    def _scan(self, link):
        # Process a URL to see if it's for a package page
        NO_MATCH_SENTINEL = None, None
        if not link.startswith(self.index_url):
            return NO_MATCH_SENTINEL

        parts = list(map(urllib.parse.unquote, link[len(self.index_url) :].split('/')))
        if len(parts) != 2 or '#' in parts[1]:
            return NO_MATCH_SENTINEL

        # it's a package page, sanitize and index it
        pkg = safe_name(parts[0])
        ver = safe_version(parts[1])
        self.package_pages.setdefault(pkg.lower(), {})[link] = True
        return to_filename(pkg), to_filename(ver)

    def process_index(self, url, page):
        """Process the contents of a PyPI page"""

        # process an index page into the package-page index
        for match in HREF.finditer(page):
            try:
                self._scan(urllib.parse.urljoin(url, htmldecode(match.group(1))))
            except ValueError:
                pass

        pkg, ver = self._scan(url)  # ensure this page is in the page index
        if not pkg:
            return ""  # no sense double-scanning non-package pages

        # process individual package page
        for new_url in find_external_links(url, page):
            # Process the found URL
            base, frag = egg_info_for_url(new_url)
            if base.endswith('.py') and not frag:
                if ver:
                    new_url += '#egg=%s-%s' % (pkg, ver)
                else:
                    self.need_version_info(url)
            self.scan_url(new_url)

        return PYPI_MD5.sub(
            lambda m: '<a href="%s#md5=%s">%s</a>' % m.group(1, 3, 2), page
        )

    def need_version_info(self, url):
        self.scan_all(
            "Page at %s links to .py file(s) without version info; an index "
            "scan is required.",
            url,
        )

    def scan_all(self, msg=None, *args):
        if self.index_url not in self.fetched_urls:
            if msg:
                self.warn(msg, *args)
            self.info("Scanning index of all packages (this may take a while)")
        self.scan_url(self.index_url)

    def find_packages(self, requirement):
        self.scan_url(self.index_url + requirement.unsafe_name + '/')

        if not self.package_pages.get(requirement.key):
            # Fall back to safe version of the name
            self.scan_url(self.index_url + requirement.project_name + '/')

        if not self.package_pages.get(requirement.key):
            # We couldn't find the target package, so search the index page too
            self.not_found_in_index(requirement)

        for url in list(self.package_pages.get(requirement.key, ())):
            # scan each page that might be related to the desired package
            self.scan_url(url)

    def obtain(self, requirement, installer=None):
        self.prescan()
        self.find_packages(requirement)
        for dist in self[requirement.key]:
            if dist in requirement:
                return dist
            self.debug("%s does not match %s", requirement, dist)
        return super(PackageIndex, self).obtain(requirement, installer)

    def check_hash(self, checker, filename, tfp):
        """
        checker is a ContentChecker
        """
        checker.report(self.debug, "Validating %%s checksum for %s" % filename)
        if not checker.is_valid():
            tfp.close()
            os.unlink(filename)
            raise DistutilsError(
                "%s validation failed for %s; "
                "possible download problem?"
                % (checker.hash.name, os.path.basename(filename))
            )

    def add_find_links(self, urls):
        """Add `urls` to the list that will be prescanned for searches"""
        for url in urls:
            if (
                self.to_scan is None  # if we have already "gone online"
                or not URL_SCHEME(url)  # or it's a local file/directory
                or url.startswith('file:')
                or list(distros_for_url(url))  # or a direct package link
            ):
                # then go ahead and process it now
                self.scan_url(url)
            else:
                # otherwise, defer retrieval till later
                self.to_scan.append(url)

    def prescan(self):
        """Scan urls scheduled for prescanning (e.g. --find-links)"""
        if self.to_scan:
            list(map(self.scan_url, self.to_scan))
        self.to_scan = None  # from now on, go ahead and process immediately

    def not_found_in_index(self, requirement):
        if self[requirement.key]:  # we've seen at least one distro
            meth, msg = self.info, "Couldn't retrieve index page for %r"
        else:  # no distros seen for this name, might be misspelled
            meth, msg = (
                self.warn,
                "Couldn't find index page for %r (maybe misspelled?)",
            )
        meth(msg, requirement.unsafe_name)
        self.scan_all()

    def download(self, spec, tmpdir):
        """Locate and/or download `spec` to `tmpdir`, returning a local path

        `spec` may be a ``Requirement`` object, or a string containing a URL,
        an existing local filename, or a project/version requirement spec
        (i.e. the string form of a ``Requirement`` object).  If it is the URL
        of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
        that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
        automatically created alongside the downloaded file.

        If `spec` is a ``Requirement`` object or a string containing a
        project/version requirement spec, this method returns the location of
        a matching distribution (possibly after downloading it to `tmpdir`).
        If `spec` is a locally existing file or directory name, it is simply
        returned unchanged.  If `spec` is a URL, it is downloaded to a subpath
        of `tmpdir`, and the local filename is returned.  Various errors may be
        raised if a problem occurs during downloading.
        """
        if not isinstance(spec, Requirement):
            scheme = URL_SCHEME(spec)
            if scheme:
                # It's a url, download it to tmpdir
                found = self._download_url(scheme.group(1), spec, tmpdir)
                base, fragment = egg_info_for_url(spec)
                if base.endswith('.py'):
                    found = self.gen_setup(found, fragment, tmpdir)
                return found
            elif os.path.exists(spec):
                # Existing file or directory, just return it
                return spec
            else:
                spec = parse_requirement_arg(spec)
        return getattr(self.fetch_distribution(spec, tmpdir), 'location', None)

    def fetch_distribution(  # noqa: C901  # is too complex (14)  # FIXME
        self,
        requirement,
        tmpdir,
        force_scan=False,
        source=False,
        develop_ok=False,
        local_index=None,
    ):
        """Obtain a distribution suitable for fulfilling `requirement`

        `requirement` must be a ``pkg_resources.Requirement`` instance.
        If necessary, or if the `force_scan` flag is set, the requirement is
        searched for in the (online) package index as well as the locally
        installed packages.  If a distribution matching `requirement` is found,
        the returned distribution's ``location`` is the value you would have
        gotten from calling the ``download()`` method with the matching
        distribution's URL or filename.  If no matching distribution is found,
        ``None`` is returned.

        If the `source` flag is set, only source distributions and source
        checkout links will be considered.  Unless the `develop_ok` flag is
        set, development and system eggs (i.e., those using the ``.egg-info``
        format) will be ignored.
        """
        # process a Requirement
        self.info("Searching for %s", requirement)
        skipped = {}
        dist = None

        def find(req, env=None):
            if env is None:
                env = self
            # Find a matching distribution; may be called more than once

            for dist in env[req.key]:
                if dist.precedence == DEVELOP_DIST and not develop_ok:
                    if dist not in skipped:
                        self.warn(
                            "Skipping development or system egg: %s",
                            dist,
                        )
                        skipped[dist] = 1
                    continue

                test = dist in req and (dist.precedence <= SOURCE_DIST or not source)
                if test:
                    loc = self.download(dist.location, tmpdir)
                    dist.download_location = loc
                    if os.path.exists(dist.download_location):
                        return dist

        if force_scan:
            self.prescan()
            self.find_packages(requirement)
            dist = find(requirement)

        if not dist and local_index is not None:
            dist = find(requirement, local_index)

        if dist is None:
            if self.to_scan is not None:
                self.prescan()
            dist = find(requirement)

        if dist is None and not force_scan:
            self.find_packages(requirement)
            dist = find(requirement)

        if dist is None:
            self.warn(
                "No local packages or working download links found for %s%s",
                (source and "a source distribution of " or ""),
                requirement,
            )
        else:
            self.info("Best match: %s", dist)
            return dist.clone(location=dist.download_location)

    def fetch(self, requirement, tmpdir, force_scan=False, source=False):
        """Obtain a file suitable for fulfilling `requirement`

        DEPRECATED; use the ``fetch_distribution()`` method now instead.  For
        backward compatibility, this routine is identical but returns the
        ``location`` of the downloaded distribution instead of a distribution
        object.
        """
        dist = self.fetch_distribution(requirement, tmpdir, force_scan, source)
        if dist is not None:
            return dist.location
        return None

    def gen_setup(self, filename, fragment, tmpdir):
        match = EGG_FRAGMENT.match(fragment)
        dists = (
            match
            and [
                d
                for d in interpret_distro_name(filename, match.group(1), None)
                if d.version
            ]
            or []
        )

        if len(dists) == 1:  # unambiguous ``#egg`` fragment
            basename = os.path.basename(filename)

            # Make sure the file has been downloaded to the temp dir.
            if os.path.dirname(filename) != tmpdir:
                dst = os.path.join(tmpdir, basename)
                if not (os.path.exists(dst) and os.path.samefile(filename, dst)):
                    shutil.copy2(filename, dst)
                    filename = dst

            with open(os.path.join(tmpdir, 'setup.py'), 'w') as file:
                file.write(
                    "from setuptools import setup\n"
                    "setup(name=%r, version=%r, py_modules=[%r])\n"
                    % (
                        dists[0].project_name,
                        dists[0].version,
                        os.path.splitext(basename)[0],
                    )
                )
            return filename

        elif match:
            raise DistutilsError(
                "Can't unambiguously interpret project/version identifier %r; "
                "any dashes in the name or version should be escaped using "
                "underscores. %r" % (fragment, dists)
            )
        else:
            raise DistutilsError(
                "Can't process plain .py files without an '#egg=name-version'"
                " suffix to enable automatic setup script generation."
            )

    dl_blocksize = 8192

    def _download_to(self, url, filename):
        self.info("Downloading %s", url)
        # Download the file
        fp = None
        try:
            checker = HashChecker.from_url(url)
            fp = self.open_url(url)
            if isinstance(fp, urllib.error.HTTPError):
                raise DistutilsError(
                    "Can't download %s: %s %s" % (url, fp.code, fp.msg)
                )
            headers = fp.info()
            blocknum = 0
            bs = self.dl_blocksize
            size = -1
            if "content-length" in headers:
                # Some servers return multiple Content-Length headers :(
                sizes = headers.get_all('Content-Length')
                size = max(map(int, sizes))
                self.reporthook(url, filename, blocknum, bs, size)
            with open(filename, 'wb') as tfp:
                while True:
                    block = fp.read(bs)
                    if block:
                        checker.feed(block)
                        tfp.write(block)
                        blocknum += 1
                        self.reporthook(url, filename, blocknum, bs, size)
                    else:
                        break
                self.check_hash(checker, filename, tfp)
            return headers
        finally:
            if fp:
                fp.close()

    def reporthook(self, url, filename, blocknum, blksize, size):
        pass  # no-op

    # FIXME:
    def open_url(self, url, warning=None):  # noqa: C901  # is too complex (12)
        if url.startswith('file:'):
            return local_open(url)
        try:
            return open_with_auth(url, self.opener)
        except (ValueError, http.client.InvalidURL) as v:
            msg = ' '.join([str(arg) for arg in v.args])
            if warning:
                self.warn(warning, msg)
            else:
                raise DistutilsError('%s %s' % (url, msg)) from v
        except urllib.error.HTTPError as v:
            return v
        except urllib.error.URLError as v:
            if warning:
                self.warn(warning, v.reason)
            else:
                raise DistutilsError(
                    "Download error for %s: %s" % (url, v.reason)
                ) from v
        except http.client.BadStatusLine as v:
            if warning:
                self.warn(warning, v.line)
            else:
                raise DistutilsError(
                    '%s returned a bad status line. The server might be '
                    'down, %s' % (url, v.line)
                ) from v
        except (http.client.HTTPException, OSError) as v:
            if warning:
                self.warn(warning, v)
            else:
                raise DistutilsError("Download error for %s: %s" % (url, v)) from v

    def _download_url(self, scheme, url, tmpdir):
        # Determine download filename
        #
        name, fragment = egg_info_for_url(url)
        if name:
            while '..' in name:
                name = name.replace('..', '.').replace('\\', '_')
        else:
            name = "__downloaded__"  # default if URL has no path contents

        if name.endswith('.egg.zip'):
            name = name[:-4]  # strip the extra .zip before download

        filename = os.path.join(tmpdir, name)

        # Download the file
        #
        if scheme == 'svn' or scheme.startswith('svn+'):
            return self._download_svn(url, filename)
        elif scheme == 'git' or scheme.startswith('git+'):
            return self._download_git(url, filename)
        elif scheme.startswith('hg+'):
            return self._download_hg(url, filename)
        elif scheme == 'file':
            return urllib.request.url2pathname(urllib.parse.urlparse(url)[2])
        else:
            self.url_ok(url, True)  # raises error if not allowed
            return self._attempt_download(url, filename)

    def scan_url(self, url):
        self.process_url(url, True)

    def _attempt_download(self, url, filename):
        headers = self._download_to(url, filename)
        if 'html' in headers.get('content-type', '').lower():
            return self._invalid_download_html(url, headers, filename)
        else:
            return filename

    def _invalid_download_html(self, url, headers, filename):
        os.unlink(filename)
        raise DistutilsError(f"Unexpected HTML page found at {url}")

    def _download_svn(self, url, _filename):
        raise DistutilsError(f"Invalid config, SVN download is not supported: {url}")

    @staticmethod
    def _vcs_split_rev_from_url(url, pop_prefix=False):
        scheme, netloc, path, query, frag = urllib.parse.urlsplit(url)

        scheme = scheme.split('+', 1)[-1]

        # Some fragment identification fails
        path = path.split('#', 1)[0]

        rev = None
        if '@' in path:
            path, rev = path.rsplit('@', 1)

        # Also, discard fragment
        url = urllib.parse.urlunsplit((scheme, netloc, path, query, ''))

        return url, rev

    def _download_git(self, url, filename):
        filename = filename.split('#', 1)[0]
        url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)

        self.info("Doing git clone from %s to %s", url, filename)
        os.system("git clone --quiet %s %s" % (url, filename))

        if rev is not None:
            self.info("Checking out %s", rev)
            os.system(
                "git -C %s checkout --quiet %s"
                % (
                    filename,
                    rev,
                )
            )

        return filename

    def _download_hg(self, url, filename):
        filename = filename.split('#', 1)[0]
        url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)

        self.info("Doing hg clone from %s to %s", url, filename)
        os.system("hg clone --quiet %s %s" % (url, filename))

        if rev is not None:
            self.info("Updating to %s", rev)
            os.system(
                "hg --cwd %s up -C -r %s -q"
                % (
                    filename,
                    rev,
                )
            )

        return filename

    def debug(self, msg, *args):
        log.debug(msg, *args)

    def info(self, msg, *args):
        log.info(msg, *args)

    def warn(self, msg, *args):
        log.warn(msg, *args)


# This pattern matches a character entity reference (a decimal numeric
# references, a hexadecimal numeric reference, or a named reference).
entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub


def decode_entity(match):
    what = match.group(0)
    return html.unescape(what)


def htmldecode(text):
    """
    Decode HTML entities in the given text.

    >>> htmldecode(
    ...     'https://../package_name-0.1.2.tar.gz'
    ...     '?tokena=A&amp;tokenb=B">package_name-0.1.2.tar.gz')
    'https://../package_name-0.1.2.tar.gz?tokena=A&tokenb=B">package_name-0.1.2.tar.gz'
    """
    return entity_sub(decode_entity, text)


def socket_timeout(timeout=15):
    def _socket_timeout(func):
        def _socket_timeout(*args, **kwargs):
            old_timeout = socket.getdefaulttimeout()
            socket.setdefaulttimeout(timeout)
            try:
                return func(*args, **kwargs)
            finally:
                socket.setdefaulttimeout(old_timeout)

        return _socket_timeout

    return _socket_timeout


def _encode_auth(auth):
    """
    Encode auth from a URL suitable for an HTTP header.
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
    """
    auth_s = urllib.parse.unquote(auth)
    # convert to bytes
    auth_bytes = auth_s.encode()
    encoded_bytes = base64.b64encode(auth_bytes)
    # convert back to a string
    encoded = encoded_bytes.decode()
    # strip the trailing carriage return
    return encoded.replace('\n', '')


class Credential:
    """
    A username/password pair. Use like a namedtuple.
    """

    def __init__(self, username, password):
        self.username = username
        self.password = password

    def __iter__(self):
        yield self.username
        yield self.password

    def __str__(self):
        return '%(username)s:%(password)s' % vars(self)


class PyPIConfig(configparser.RawConfigParser):
    def __init__(self):
        """
        Load from ~/.pypirc
        """
        defaults = dict.fromkeys(['username', 'password', 'repository'], '')
        super().__init__(defaults)

        rc = os.path.join(os.path.expanduser('~'), '.pypirc')
        if os.path.exists(rc):
            self.read(rc)

    @property
    def creds_by_repository(self):
        sections_with_repositories = [
            section
            for section in self.sections()
            if self.get(section, 'repository').strip()
        ]

        return dict(map(self._get_repo_cred, sections_with_repositories))

    def _get_repo_cred(self, section):
        repo = self.get(section, 'repository').strip()
        return repo, Credential(
            self.get(section, 'username').strip(),
            self.get(section, 'password').strip(),
        )

    def find_credential(self, url):
        """
        If the URL indicated appears to be a repository defined in this
        config, return the credential for that repository.
        """
        for repository, cred in self.creds_by_repository.items():
            if url.startswith(repository):
                return cred


def open_with_auth(url, opener=urllib.request.urlopen):
    """Open a urllib2 request, handling HTTP authentication"""

    parsed = urllib.parse.urlparse(url)
    scheme, netloc, path, params, query, frag = parsed

    # Double scheme does not raise on macOS as revealed by a
    # failing test. We would expect "nonnumeric port". Refs #20.
    if netloc.endswith(':'):
        raise http.client.InvalidURL("nonnumeric port: ''")

    if scheme in ('http', 'https'):
        auth, address = _splituser(netloc)
    else:
        auth = None

    if not auth:
        cred = PyPIConfig().find_credential(url)
        if cred:
            auth = str(cred)
            info = cred.username, url
            log.info('Authenticating as %s for %s (from .pypirc)', *info)

    if auth:
        auth = "Basic " + _encode_auth(auth)
        parts = scheme, address, path, params, query, frag
        new_url = urllib.parse.urlunparse(parts)
        request = urllib.request.Request(new_url)
        request.add_header("Authorization", auth)
    else:
        request = urllib.request.Request(url)

    request.add_header('User-Agent', user_agent)
    fp = opener(request)

    if auth:
        # Put authentication info back into request URL if same host,
        # so that links found on the page will work
        s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url)
        if s2 == scheme and h2 == address:
            parts = s2, netloc, path2, param2, query2, frag2
            fp.url = urllib.parse.urlunparse(parts)

    return fp


# copy of urllib.parse._splituser from Python 3.8
def _splituser(host):
    """splituser('user[:passwd]@host[:port]')
    --> 'user[:passwd]', 'host[:port]'."""
    user, delim, host = host.rpartition('@')
    return (user if delim else None), host


# adding a timeout to avoid freezing package_index
open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth)


def fix_sf_url(url):
    return url  # backward compatibility


def local_open(url):
    """Read a local path, with special support for directories"""
    scheme, server, path, param, query, frag = urllib.parse.urlparse(url)
    filename = urllib.request.url2pathname(path)
    if os.path.isfile(filename):
        return urllib.request.urlopen(url)
    elif path.endswith('/') and os.path.isdir(filename):
        files = []
        for f in os.listdir(filename):
            filepath = os.path.join(filename, f)
            if f == 'index.html':
                with open(filepath, 'r') as fp:
                    body = fp.read()
                break
            elif os.path.isdir(filepath):
                f += '/'
            files.append('<a href="{name}">{name}</a>'.format(name=f))
        else:
            tmpl = (
                "<html><head><title>{url}</title>" "</head><body>{files}</body></html>"
            )
            body = tmpl.format(url=url, files='\n'.join(files))
        status, message = 200, "OK"
    else:
        status, message, body = 404, "Path not found", "Not found"

    headers = {'content-type': 'text/html'}
    body_stream = io.StringIO(body)
    return urllib.error.HTTPError(url, status, message, headers, body_stream)
python3.12/site-packages/setuptools/_entry_points.py000064400000004273151732704200016607 0ustar00import functools
import operator
import itertools

from .errors import OptionError
from .extern.jaraco.text import yield_lines
from .extern.jaraco.functools import pass_none
from ._importlib import metadata
from ._itertools import ensure_unique
from .extern.more_itertools import consume


def ensure_valid(ep):
    """
    Exercise one of the dynamic properties to trigger
    the pattern match.
    """
    try:
        ep.extras
    except AttributeError as ex:
        msg = (
            f"Problems to parse {ep}.\nPlease ensure entry-point follows the spec: "
            "https://packaging.python.org/en/latest/specifications/entry-points/"
        )
        raise OptionError(msg) from ex


def load_group(value, group):
    """
    Given a value of an entry point or series of entry points,
    return each as an EntryPoint.
    """
    # normalize to a single sequence of lines
    lines = yield_lines(value)
    text = f'[{group}]\n' + '\n'.join(lines)
    return metadata.EntryPoints._from_text(text)


def by_group_and_name(ep):
    return ep.group, ep.name


def validate(eps: metadata.EntryPoints):
    """
    Ensure entry points are unique by group and name and validate each.
    """
    consume(map(ensure_valid, ensure_unique(eps, key=by_group_and_name)))
    return eps


@functools.singledispatch
def load(eps):
    """
    Given a Distribution.entry_points, produce EntryPoints.
    """
    groups = itertools.chain.from_iterable(
        load_group(value, group) for group, value in eps.items()
    )
    return validate(metadata.EntryPoints(groups))


@load.register(str)
def _(eps):
    r"""
    >>> ep, = load('[console_scripts]\nfoo=bar')
    >>> ep.group
    'console_scripts'
    >>> ep.name
    'foo'
    >>> ep.value
    'bar'
    """
    return validate(metadata.EntryPoints(metadata.EntryPoints._from_text(eps)))


load.register(type(None), lambda x: x)


@pass_none
def render(eps: metadata.EntryPoints):
    by_group = operator.attrgetter('group')
    groups = itertools.groupby(sorted(eps, key=by_group), by_group)

    return '\n'.join(f'[{group}]\n{render_items(items)}\n' for group, items in groups)


def render_items(eps):
    return '\n'.join(f'{ep.name} = {ep.value}' for ep in sorted(eps))
python3.12/site-packages/setuptools/_importlib.py000064400000002674151732704200016056 0ustar00import sys


def disable_importlib_metadata_finder(metadata):
    """
    Ensure importlib_metadata doesn't provide older, incompatible
    Distributions.

    Workaround for #3102.
    """
    try:
        import importlib_metadata
    except ImportError:
        return
    except AttributeError:
        from .warnings import SetuptoolsWarning

        SetuptoolsWarning.emit(
            "Incompatibility problem.",
            """
            `importlib-metadata` version is incompatible with `setuptools`.
            This problem is likely to be solved by installing an updated version of
            `importlib-metadata`.
            """,
            see_url="https://github.com/python/importlib_metadata/issues/396",
        )  # Ensure a descriptive message is shown.
        raise  # This exception can be suppressed by _distutils_hack

    if importlib_metadata is metadata:
        return
    to_remove = [
        ob
        for ob in sys.meta_path
        if isinstance(ob, importlib_metadata.MetadataPathFinder)
    ]
    for item in to_remove:
        sys.meta_path.remove(item)


if sys.version_info < (3, 10):
    from setuptools.extern import importlib_metadata as metadata

    disable_importlib_metadata_finder(metadata)
else:
    import importlib.metadata as metadata  # noqa: F401


if sys.version_info < (3, 9):
    from setuptools.extern import importlib_resources as resources
else:
    import importlib.resources as resources  # noqa: F401
python3.12/site-packages/setuptools/_path.py000064400000002040151732704210014775 0ustar00import os
import sys
from typing import Union

_Path = Union[str, os.PathLike]


def ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    os.makedirs(dirname, exist_ok=True)


def same_path(p1: _Path, p2: _Path) -> bool:
    """Differs from os.path.samefile because it does not require paths to exist.
    Purely string based (no comparison between i-nodes).
    >>> same_path("a/b", "./a/b")
    True
    >>> same_path("a/b", "a/./b")
    True
    >>> same_path("a/b", "././a/b")
    True
    >>> same_path("a/b", "./a/b/c/..")
    True
    >>> same_path("a/b", "../a/b/c")
    False
    >>> same_path("a", "a/b")
    False
    """
    return normpath(p1) == normpath(p2)


def normpath(filename: _Path) -> str:
    """Normalize a file/dir name for comparison purposes."""
    # See pkg_resources.normalize_path for notes about cygwin
    file = os.path.abspath(filename) if sys.platform == 'cygwin' else filename
    return os.path.normcase(os.path.realpath(os.path.normpath(file)))
python3.12/site-packages/setuptools/extern/__pycache__/__init__.cpython-312.pyc000064400000010106151732704210023311 0ustar00�

��_i�	��\�ddlZddlZGd�d�ZdZeeed�j
�y)�Nc�N�eZdZdZdd�Zed��Zd�Zd�Zd�Z	d�Z
dd	�Zd
�Zy)
�VendorImporterz�
    A PEP 302 meta path importer for finding optionally-vendored
    or otherwise naturally-installed packages from root_name.
    Nc�h�||_t|�|_|xs|jdd�|_y)N�extern�_vendor)�	root_name�set�vendored_names�replace�
vendor_pkg)�selfrr
rs    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/extern/__init__.py�__init__zVendorImporter.__init__s/��"���!�.�1���$�N�	�(9�(9�(�I�(N���c#�6K�|jdz��d��y�w)zL
        Search first the vendor package then as a natural package.
        �.�N)r�r
s r�search_pathzVendorImporter.search_paths����
�o�o��#�#���s�c��|j|jdz�\}}}|xr)tt|j|j
��S)z,Figure out if the target module is vendored.r)�	partitionr�any�map�
startswithr
)r
�fullname�root�base�targets     r�_module_matches_namespacez(VendorImporter._module_matches_namespacesG��%�/�/�����0D�E���d�F��x�L�C��F�$5�$5�t�7J�7J� K�L�Lrc�@�|j|jdz�\}}}|jD]<}	||z}t|�tj
|}|tj
|<|cSt
djdit�����#t$rY�mwxYw)zK
        Iterate over the search path to locate and load fullname.
        rz�The '{target}' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.�)	rrr�
__import__�sys�modules�ImportError�format�locals)r
rrrr�prefix�extant�mods        r�load_modulezVendorImporter.load_modules���&�/�/�����0D�E���d�F��&�&�F�
��&����6�"��k�k�&�)��(+����H�%��
�
'��'� �!'��3�*0��3��
���
��
�s�7B�	B�Bc�8�|j|j�S�N)r+�name)r
�specs  r�
create_modulezVendorImporter.create_module3s������	�	�*�*rc��yr-r!)r
�modules  r�exec_modulezVendorImporter.exec_module6s��rc�h�|j|�r tjj||�SdS)z(Return a module spec for vendored names.N)r�	importlib�util�spec_from_loader)r
r�pathrs    r�	find_speczVendorImporter.find_spec9s7���-�-�h�7�
�N�N�+�+�H�d�;�	
��	
rc�h�|tjvr tjj|�yy)zR
        Install this importer into sys.meta_path if not already present.
        N)r#�	meta_path�appendrs r�installzVendorImporter.installAs'���s�}�}�$��M�M� � ��&�%r)r!N)NN)
�__name__�
__module__�__qualname__�__doc__r�propertyrrr+r0r3r9r=r!rrrrs@���
O�
����M�
�,+�
�
�'rr)	�	packaging�ordered_set�more_itertools�importlib_metadata�zipp�importlib_resources�jaraco�typing_extensions�tomlizsetuptools._vendor)�importlib.utilr5r#r�namesr>r=r!rr�<module>rNs7���
�A'�A'�H
	���x�� 4�5�=�=�?rpython3.12/site-packages/setuptools/extern/__init__.py000064400000004753151732704210016763 0ustar00import importlib.util
import sys


class VendorImporter:
    """
    A PEP 302 meta path importer for finding optionally-vendored
    or otherwise naturally-installed packages from root_name.
    """

    def __init__(self, root_name, vendored_names=(), vendor_pkg=None):
        self.root_name = root_name
        self.vendored_names = set(vendored_names)
        self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor')

    @property
    def search_path(self):
        """
        Search first the vendor package then as a natural package.
        """
        yield self.vendor_pkg + '.'
        yield ''

    def _module_matches_namespace(self, fullname):
        """Figure out if the target module is vendored."""
        root, base, target = fullname.partition(self.root_name + '.')
        return not root and any(map(target.startswith, self.vendored_names))

    def load_module(self, fullname):
        """
        Iterate over the search path to locate and load fullname.
        """
        root, base, target = fullname.partition(self.root_name + '.')
        for prefix in self.search_path:
            try:
                extant = prefix + target
                __import__(extant)
                mod = sys.modules[extant]
                sys.modules[fullname] = mod
                return mod
            except ImportError:
                pass
        else:
            raise ImportError(
                "The '{target}' package is required; "
                "normally this is bundled with this package so if you get "
                "this warning, consult the packager of your "
                "distribution.".format(**locals())
            )

    def create_module(self, spec):
        return self.load_module(spec.name)

    def exec_module(self, module):
        pass

    def find_spec(self, fullname, path=None, target=None):
        """Return a module spec for vendored names."""
        return (
            importlib.util.spec_from_loader(fullname, self)
            if self._module_matches_namespace(fullname)
            else None
        )

    def install(self):
        """
        Install this importer into sys.meta_path if not already present.
        """
        if self not in sys.meta_path:
            sys.meta_path.append(self)


names = (
    'packaging',
    'ordered_set',
    'more_itertools',
    'importlib_metadata',
    'zipp',
    'importlib_resources',
    'jaraco',
    'typing_extensions',
    'tomli',
)
VendorImporter(__name__, names, 'setuptools._vendor').install()
python3.12/site-packages/setuptools/namespaces.py000064400000006001151732704210016022 0ustar00import os
from distutils import log
import itertools


flatten = itertools.chain.from_iterable


class Installer:
    nspkg_ext = '-nspkg.pth'

    def install_namespaces(self):
        nsp = self._get_all_ns_packages()
        if not nsp:
            return
        filename = self._get_nspkg_file()
        self.outputs.append(filename)
        log.info("Installing %s", filename)
        lines = map(self._gen_nspkg_line, nsp)

        if self.dry_run:
            # always generate the lines, even in dry run
            list(lines)
            return

        with open(filename, 'wt') as f:
            f.writelines(lines)

    def uninstall_namespaces(self):
        filename = self._get_nspkg_file()
        if not os.path.exists(filename):
            return
        log.info("Removing %s", filename)
        os.remove(filename)

    def _get_nspkg_file(self):
        filename, _ = os.path.splitext(self._get_target())
        return filename + self.nspkg_ext

    def _get_target(self):
        return self.target

    _nspkg_tmpl = (
        "import sys, types, os",
        "has_mfs = sys.version_info > (3, 5)",
        "p = os.path.join(%(root)s, *%(pth)r)",
        "importlib = has_mfs and __import__('importlib.util')",
        "has_mfs and __import__('importlib.machinery')",
        (
            "m = has_mfs and "
            "sys.modules.setdefault(%(pkg)r, "
            "importlib.util.module_from_spec("
            "importlib.machinery.PathFinder.find_spec(%(pkg)r, "
            "[os.path.dirname(p)])))"
        ),
        ("m = m or " "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))"),
        "mp = (m or []) and m.__dict__.setdefault('__path__',[])",
        "(p not in mp) and mp.append(p)",
    )
    "lines for the namespace installer"

    _nspkg_tmpl_multi = ('m and setattr(sys.modules[%(parent)r], %(child)r, m)',)
    "additional line(s) when a parent package is indicated"

    def _get_root(self):
        return "sys._getframe(1).f_locals['sitedir']"

    def _gen_nspkg_line(self, pkg):
        pth = tuple(pkg.split('.'))
        root = self._get_root()
        tmpl_lines = self._nspkg_tmpl
        parent, sep, child = pkg.rpartition('.')
        if parent:
            tmpl_lines += self._nspkg_tmpl_multi
        return ';'.join(tmpl_lines) % locals() + '\n'

    def _get_all_ns_packages(self):
        """Return sorted list of all package namespaces"""
        pkgs = self.distribution.namespace_packages or []
        return sorted(set(flatten(map(self._pkg_names, pkgs))))

    @staticmethod
    def _pkg_names(pkg):
        """
        Given a namespace package, yield the components of that
        package.

        >>> names = Installer._pkg_names('a.b.c')
        >>> set(names) == set(['a', 'a.b', 'a.b.c'])
        True
        """
        parts = pkg.split('.')
        while parts:
            yield '.'.join(parts)
            parts.pop()


class DevelopInstaller(Installer):
    def _get_root(self):
        return repr(str(self.egg_path))

    def _get_target(self):
        return self.egg_link
python3.12/site-packages/setuptools/config/setupcfg.py000064400000061673151732704210017010 0ustar00"""
Load setuptools configuration from ``setup.cfg`` files.

**API will be made private in the future**

To read project metadata, consider using
``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
For simple scenarios, you can also try parsing the file directly
with the help of ``configparser``.
"""
import contextlib
import functools
import os
from collections import defaultdict
from functools import partial
from functools import wraps
from typing import (
    TYPE_CHECKING,
    Callable,
    Any,
    Dict,
    Generic,
    Iterable,
    List,
    Optional,
    Set,
    Tuple,
    TypeVar,
    Union,
)

from ..errors import FileError, OptionError
from ..extern.packaging.markers import default_environment as marker_env
from ..extern.packaging.requirements import InvalidRequirement, Requirement
from ..extern.packaging.specifiers import SpecifierSet
from ..extern.packaging.version import InvalidVersion, Version
from ..warnings import SetuptoolsDeprecationWarning
from . import expand

if TYPE_CHECKING:
    from distutils.dist import DistributionMetadata  # noqa

    from setuptools.dist import Distribution  # noqa

_Path = Union[str, os.PathLike]
SingleCommandOptions = Dict["str", Tuple["str", Any]]
"""Dict that associate the name of the options of a particular command to a
tuple. The first element of the tuple indicates the origin of the option value
(e.g. the name of the configuration file where it was read from),
while the second element of the tuple is the option value itself
"""
AllCommandOptions = Dict["str", SingleCommandOptions]  # cmd name => its options
Target = TypeVar("Target", bound=Union["Distribution", "DistributionMetadata"])


def read_configuration(
    filepath: _Path, find_others=False, ignore_option_errors=False
) -> dict:
    """Read given configuration file and returns options from it as a dict.

    :param str|unicode filepath: Path to configuration file
        to get options from.

    :param bool find_others: Whether to search for other configuration files
        which could be on in various places.

    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.

    :rtype: dict
    """
    from setuptools.dist import Distribution

    dist = Distribution()
    filenames = dist.find_config_files() if find_others else []
    handlers = _apply(dist, filepath, filenames, ignore_option_errors)
    return configuration_to_dict(handlers)


def apply_configuration(dist: "Distribution", filepath: _Path) -> "Distribution":
    """Apply the configuration from a ``setup.cfg`` file into an existing
    distribution object.
    """
    _apply(dist, filepath)
    dist._finalize_requires()
    return dist


def _apply(
    dist: "Distribution",
    filepath: _Path,
    other_files: Iterable[_Path] = (),
    ignore_option_errors: bool = False,
) -> Tuple["ConfigHandler", ...]:
    """Read configuration from ``filepath`` and applies to the ``dist`` object."""
    from setuptools.dist import _Distribution

    filepath = os.path.abspath(filepath)

    if not os.path.isfile(filepath):
        raise FileError(f'Configuration file {filepath} does not exist.')

    current_directory = os.getcwd()
    os.chdir(os.path.dirname(filepath))
    filenames = [*other_files, filepath]

    try:
        _Distribution.parse_config_files(dist, filenames=filenames)
        handlers = parse_configuration(
            dist, dist.command_options, ignore_option_errors=ignore_option_errors
        )
        dist._finalize_license_files()
    finally:
        os.chdir(current_directory)

    return handlers


def _get_option(target_obj: Target, key: str):
    """
    Given a target object and option key, get that option from
    the target object, either through a get_{key} method or
    from an attribute directly.
    """
    getter_name = f'get_{key}'
    by_attribute = functools.partial(getattr, target_obj, key)
    getter = getattr(target_obj, getter_name, by_attribute)
    return getter()


def configuration_to_dict(handlers: Tuple["ConfigHandler", ...]) -> dict:
    """Returns configuration data gathered by given handlers as a dict.

    :param list[ConfigHandler] handlers: Handlers list,
        usually from parse_configuration()

    :rtype: dict
    """
    config_dict: dict = defaultdict(dict)

    for handler in handlers:
        for option in handler.set_options:
            value = _get_option(handler.target_obj, option)
            config_dict[handler.section_prefix][option] = value

    return config_dict


def parse_configuration(
    distribution: "Distribution",
    command_options: AllCommandOptions,
    ignore_option_errors=False,
) -> Tuple["ConfigMetadataHandler", "ConfigOptionsHandler"]:
    """Performs additional parsing of configuration options
    for a distribution.

    Returns a list of used option handlers.

    :param Distribution distribution:
    :param dict command_options:
    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.
    :rtype: list
    """
    with expand.EnsurePackagesDiscovered(distribution) as ensure_discovered:
        options = ConfigOptionsHandler(
            distribution,
            command_options,
            ignore_option_errors,
            ensure_discovered,
        )

        options.parse()
        if not distribution.package_dir:
            distribution.package_dir = options.package_dir  # Filled by `find_packages`

        meta = ConfigMetadataHandler(
            distribution.metadata,
            command_options,
            ignore_option_errors,
            ensure_discovered,
            distribution.package_dir,
            distribution.src_root,
        )
        meta.parse()
        distribution._referenced_files.update(
            options._referenced_files, meta._referenced_files
        )

    return meta, options


def _warn_accidental_env_marker_misconfig(label: str, orig_value: str, parsed: list):
    """Because users sometimes misinterpret this configuration:

    [options.extras_require]
    foo = bar;python_version<"4"

    It looks like one requirement with an environment marker
    but because there is no newline, it's parsed as two requirements
    with a semicolon as separator.

    Therefore, if:
        * input string does not contain a newline AND
        * parsed result contains two requirements AND
        * parsing of the two parts from the result ("<first>;<second>")
        leads in a valid Requirement with a valid marker
    a UserWarning is shown to inform the user about the possible problem.
    """
    if "\n" in orig_value or len(parsed) != 2:
        return

    markers = marker_env().keys()

    try:
        req = Requirement(parsed[1])
        if req.name in markers:
            _AmbiguousMarker.emit(field=label, req=parsed[1])
    except InvalidRequirement as ex:
        if any(parsed[1].startswith(marker) for marker in markers):
            msg = _AmbiguousMarker.message(field=label, req=parsed[1])
            raise InvalidRequirement(msg) from ex


class ConfigHandler(Generic[Target]):
    """Handles metadata supplied in configuration files."""

    section_prefix: str
    """Prefix for config sections handled by this handler.
    Must be provided by class heirs.

    """

    aliases: Dict[str, str] = {}
    """Options aliases.
    For compatibility with various packages. E.g.: d2to1 and pbr.
    Note: `-` in keys is replaced with `_` by config parser.

    """

    def __init__(
        self,
        target_obj: Target,
        options: AllCommandOptions,
        ignore_option_errors,
        ensure_discovered: expand.EnsurePackagesDiscovered,
    ):
        self.ignore_option_errors = ignore_option_errors
        self.target_obj = target_obj
        self.sections = dict(self._section_options(options))
        self.set_options: List[str] = []
        self.ensure_discovered = ensure_discovered
        self._referenced_files: Set[str] = set()
        """After parsing configurations, this property will enumerate
        all files referenced by the "file:" directive. Private API for setuptools only.
        """

    @classmethod
    def _section_options(cls, options: AllCommandOptions):
        for full_name, value in options.items():
            pre, sep, name = full_name.partition(cls.section_prefix)
            if pre:
                continue
            yield name.lstrip('.'), value

    @property
    def parsers(self):
        """Metadata item name to parser function mapping."""
        raise NotImplementedError(
            '%s must provide .parsers property' % self.__class__.__name__
        )

    def __setitem__(self, option_name, value):
        target_obj = self.target_obj

        # Translate alias into real name.
        option_name = self.aliases.get(option_name, option_name)

        try:
            current_value = getattr(target_obj, option_name)
        except AttributeError:
            raise KeyError(option_name)

        if current_value:
            # Already inhabited. Skipping.
            return

        try:
            parsed = self.parsers.get(option_name, lambda x: x)(value)
        except (Exception,) * self.ignore_option_errors:
            return

        simple_setter = functools.partial(target_obj.__setattr__, option_name)
        setter = getattr(target_obj, 'set_%s' % option_name, simple_setter)
        setter(parsed)

        self.set_options.append(option_name)

    @classmethod
    def _parse_list(cls, value, separator=','):
        """Represents value as a list.

        Value is split either by separator (defaults to comma) or by lines.

        :param value:
        :param separator: List items separator character.
        :rtype: list
        """
        if isinstance(value, list):  # _get_parser_compound case
            return value

        if '\n' in value:
            value = value.splitlines()
        else:
            value = value.split(separator)

        return [chunk.strip() for chunk in value if chunk.strip()]

    @classmethod
    def _parse_dict(cls, value):
        """Represents value as a dict.

        :param value:
        :rtype: dict
        """
        separator = '='
        result = {}
        for line in cls._parse_list(value):
            key, sep, val = line.partition(separator)
            if sep != separator:
                raise OptionError(f"Unable to parse option value to dict: {value}")
            result[key.strip()] = val.strip()

        return result

    @classmethod
    def _parse_bool(cls, value):
        """Represents value as boolean.

        :param value:
        :rtype: bool
        """
        value = value.lower()
        return value in ('1', 'true', 'yes')

    @classmethod
    def _exclude_files_parser(cls, key):
        """Returns a parser function to make sure field inputs
        are not files.

        Parses a value after getting the key so error messages are
        more informative.

        :param key:
        :rtype: callable
        """

        def parser(value):
            exclude_directive = 'file:'
            if value.startswith(exclude_directive):
                raise ValueError(
                    'Only strings are accepted for the {0} field, '
                    'files are not accepted'.format(key)
                )
            return value

        return parser

    def _parse_file(self, value, root_dir: _Path):
        """Represents value as a string, allowing including text
        from nearest files using `file:` directive.

        Directive is sandboxed and won't reach anything outside
        directory with setup.py.

        Examples:
            file: README.rst, CHANGELOG.md, src/file.txt

        :param str value:
        :rtype: str
        """
        include_directive = 'file:'

        if not isinstance(value, str):
            return value

        if not value.startswith(include_directive):
            return value

        spec = value[len(include_directive) :]
        filepaths = [path.strip() for path in spec.split(',')]
        self._referenced_files.update(filepaths)
        return expand.read_files(filepaths, root_dir)

    def _parse_attr(self, value, package_dir, root_dir: _Path):
        """Represents value as a module attribute.

        Examples:
            attr: package.attr
            attr: package.module.attr

        :param str value:
        :rtype: str
        """
        attr_directive = 'attr:'
        if not value.startswith(attr_directive):
            return value

        attr_desc = value.replace(attr_directive, '')

        # Make sure package_dir is populated correctly, so `attr:` directives can work
        package_dir.update(self.ensure_discovered.package_dir)
        return expand.read_attr(attr_desc, package_dir, root_dir)

    @classmethod
    def _get_parser_compound(cls, *parse_methods):
        """Returns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        """

        def parse(value):
            parsed = value

            for method in parse_methods:
                parsed = method(parsed)

            return parsed

        return parse

    @classmethod
    def _parse_section_to_dict_with_key(cls, section_options, values_parser):
        """Parses section options into a dictionary.

        Applies a given parser to each option in a section.

        :param dict section_options:
        :param callable values_parser: function with 2 args corresponding to key, value
        :rtype: dict
        """
        value = {}
        for key, (_, val) in section_options.items():
            value[key] = values_parser(key, val)
        return value

    @classmethod
    def _parse_section_to_dict(cls, section_options, values_parser=None):
        """Parses section options into a dictionary.

        Optionally applies a given parser to each value.

        :param dict section_options:
        :param callable values_parser: function with 1 arg corresponding to option value
        :rtype: dict
        """
        parser = (lambda _, v: values_parser(v)) if values_parser else (lambda _, v: v)
        return cls._parse_section_to_dict_with_key(section_options, parser)

    def parse_section(self, section_options):
        """Parses configuration file section.

        :param dict section_options:
        """
        for name, (_, value) in section_options.items():
            with contextlib.suppress(KeyError):
                # Keep silent for a new option may appear anytime.
                self[name] = value

    def parse(self):
        """Parses configuration file items from one
        or more related sections.

        """
        for section_name, section_options in self.sections.items():
            method_postfix = ''
            if section_name:  # [section.option] variant
                method_postfix = '_%s' % section_name

            section_parser_method: Optional[Callable] = getattr(
                self,
                # Dots in section names are translated into dunderscores.
                ('parse_section%s' % method_postfix).replace('.', '__'),
                None,
            )

            if section_parser_method is None:
                raise OptionError(
                    "Unsupported distribution option section: "
                    f"[{self.section_prefix}.{section_name}]"
                )

            section_parser_method(section_options)

    def _deprecated_config_handler(self, func, msg, **kw):
        """this function will wrap around parameters that are deprecated

        :param msg: deprecation message
        :param func: function to be wrapped around
        """

        @wraps(func)
        def config_handler(*args, **kwargs):
            kw.setdefault("stacklevel", 2)
            _DeprecatedConfig.emit("Deprecated config in `setup.cfg`", msg, **kw)
            return func(*args, **kwargs)

        return config_handler


class ConfigMetadataHandler(ConfigHandler["DistributionMetadata"]):
    section_prefix = 'metadata'

    aliases = {
        'home_page': 'url',
        'summary': 'description',
        'classifier': 'classifiers',
        'platform': 'platforms',
    }

    strict_mode = False
    """We need to keep it loose, to be partially compatible with
    `pbr` and `d2to1` packages which also uses `metadata` section.

    """

    def __init__(
        self,
        target_obj: "DistributionMetadata",
        options: AllCommandOptions,
        ignore_option_errors: bool,
        ensure_discovered: expand.EnsurePackagesDiscovered,
        package_dir: Optional[dict] = None,
        root_dir: _Path = os.curdir,
    ):
        super().__init__(target_obj, options, ignore_option_errors, ensure_discovered)
        self.package_dir = package_dir
        self.root_dir = root_dir

    @property
    def parsers(self):
        """Metadata item name to parser function mapping."""
        parse_list = self._parse_list
        parse_file = partial(self._parse_file, root_dir=self.root_dir)
        parse_dict = self._parse_dict
        exclude_files_parser = self._exclude_files_parser

        return {
            'platforms': parse_list,
            'keywords': parse_list,
            'provides': parse_list,
            'obsoletes': parse_list,
            'classifiers': self._get_parser_compound(parse_file, parse_list),
            'license': exclude_files_parser('license'),
            'license_files': parse_list,
            'description': parse_file,
            'long_description': parse_file,
            'version': self._parse_version,
            'project_urls': parse_dict,
        }

    def _parse_version(self, value):
        """Parses `version` option value.

        :param value:
        :rtype: str

        """
        version = self._parse_file(value, self.root_dir)

        if version != value:
            version = version.strip()
            # Be strict about versions loaded from file because it's easy to
            # accidentally include newlines and other unintended content
            try:
                Version(version)
            except InvalidVersion:
                raise OptionError(
                    f'Version loaded from {value} does not '
                    f'comply with PEP 440: {version}'
                )

            return version

        return expand.version(self._parse_attr(value, self.package_dir, self.root_dir))


class ConfigOptionsHandler(ConfigHandler["Distribution"]):
    section_prefix = 'options'

    def __init__(
        self,
        target_obj: "Distribution",
        options: AllCommandOptions,
        ignore_option_errors: bool,
        ensure_discovered: expand.EnsurePackagesDiscovered,
    ):
        super().__init__(target_obj, options, ignore_option_errors, ensure_discovered)
        self.root_dir = target_obj.src_root
        self.package_dir: Dict[str, str] = {}  # To be filled by `find_packages`

    @classmethod
    def _parse_list_semicolon(cls, value):
        return cls._parse_list(value, separator=';')

    def _parse_file_in_root(self, value):
        return self._parse_file(value, root_dir=self.root_dir)

    def _parse_requirements_list(self, label: str, value: str):
        # Parse a requirements list, either by reading in a `file:`, or a list.
        parsed = self._parse_list_semicolon(self._parse_file_in_root(value))
        _warn_accidental_env_marker_misconfig(label, value, parsed)
        # Filter it to only include lines that are not comments. `parse_list`
        # will have stripped each line and filtered out empties.
        return [line for line in parsed if not line.startswith("#")]

    @property
    def parsers(self):
        """Metadata item name to parser function mapping."""
        parse_list = self._parse_list
        parse_bool = self._parse_bool
        parse_dict = self._parse_dict
        parse_cmdclass = self._parse_cmdclass

        return {
            'zip_safe': parse_bool,
            'include_package_data': parse_bool,
            'package_dir': parse_dict,
            'scripts': parse_list,
            'eager_resources': parse_list,
            'dependency_links': parse_list,
            'namespace_packages': self._deprecated_config_handler(
                parse_list,
                "The namespace_packages parameter is deprecated, "
                "consider using implicit namespaces instead (PEP 420).",
                # TODO: define due date, see setuptools.dist:check_nsp.
            ),
            'install_requires': partial(
                self._parse_requirements_list, "install_requires"
            ),
            'setup_requires': self._parse_list_semicolon,
            'tests_require': self._parse_list_semicolon,
            'packages': self._parse_packages,
            'entry_points': self._parse_file_in_root,
            'py_modules': parse_list,
            'python_requires': SpecifierSet,
            'cmdclass': parse_cmdclass,
        }

    def _parse_cmdclass(self, value):
        package_dir = self.ensure_discovered.package_dir
        return expand.cmdclass(self._parse_dict(value), package_dir, self.root_dir)

    def _parse_packages(self, value):
        """Parses `packages` option value.

        :param value:
        :rtype: list
        """
        find_directives = ['find:', 'find_namespace:']
        trimmed_value = value.strip()

        if trimmed_value not in find_directives:
            return self._parse_list(value)

        # Read function arguments from a dedicated section.
        find_kwargs = self.parse_section_packages__find(
            self.sections.get('packages.find', {})
        )

        find_kwargs.update(
            namespaces=(trimmed_value == find_directives[1]),
            root_dir=self.root_dir,
            fill_package_dir=self.package_dir,
        )

        return expand.find_packages(**find_kwargs)

    def parse_section_packages__find(self, section_options):
        """Parses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        """
        section_data = self._parse_section_to_dict(section_options, self._parse_list)

        valid_keys = ['where', 'include', 'exclude']

        find_kwargs = dict(
            [(k, v) for k, v in section_data.items() if k in valid_keys and v]
        )

        where = find_kwargs.get('where')
        if where is not None:
            find_kwargs['where'] = where[0]  # cast list to single val

        return find_kwargs

    def parse_section_entry_points(self, section_options):
        """Parses `entry_points` configuration file section.

        :param dict section_options:
        """
        parsed = self._parse_section_to_dict(section_options, self._parse_list)
        self['entry_points'] = parsed

    def _parse_package_data(self, section_options):
        package_data = self._parse_section_to_dict(section_options, self._parse_list)
        return expand.canonic_package_data(package_data)

    def parse_section_package_data(self, section_options):
        """Parses `package_data` configuration file section.

        :param dict section_options:
        """
        self['package_data'] = self._parse_package_data(section_options)

    def parse_section_exclude_package_data(self, section_options):
        """Parses `exclude_package_data` configuration file section.

        :param dict section_options:
        """
        self['exclude_package_data'] = self._parse_package_data(section_options)

    def parse_section_extras_require(self, section_options):
        """Parses `extras_require` configuration file section.

        :param dict section_options:
        """
        parsed = self._parse_section_to_dict_with_key(
            section_options,
            lambda k, v: self._parse_requirements_list(f"extras_require[{k}]", v),
        )

        self['extras_require'] = parsed

    def parse_section_data_files(self, section_options):
        """Parses `data_files` configuration file section.

        :param dict section_options:
        """
        parsed = self._parse_section_to_dict(section_options, self._parse_list)
        self['data_files'] = expand.canonic_data_files(parsed, self.root_dir)


class _AmbiguousMarker(SetuptoolsDeprecationWarning):
    _SUMMARY = "Ambiguous requirement marker."
    _DETAILS = """
    One of the parsed requirements in `{field}` looks like a valid environment marker:

        {req!r}

    Please make sure that the configuration file is correct.
    You can use dangling lines to avoid this problem.
    """
    _SEE_DOCS = "userguide/declarative_config.html#opt-2"
    # TODO: should we include due_date here? Initially introduced in 6 Aug 2022.
    # Does this make sense with latest version of packaging?

    @classmethod
    def message(cls, **kw):
        docs = f"https://setuptools.pypa.io/en/latest/{cls._SEE_DOCS}"
        return cls._format(cls._SUMMARY, cls._DETAILS, see_url=docs, format_args=kw)


class _DeprecatedConfig(SetuptoolsDeprecationWarning):
    _SEE_DOCS = "userguide/declarative_config.html"
python3.12/site-packages/setuptools/config/__pycache__/expand.cpython-312.pyc000064400000060772151732704210023007 0ustar00�

��_i@��.�dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZmZmZmZmZmZmZmZmZmZmZmZddlmZdd	lmZdd
lmZddl m!Z"dd
l#m$Z$erddl%m&Z&ddl'm(Z(ddl)m*Z*e
jVZ,ee-ej\fZ/ed�Z0edd��Z1Gd�d�Z2	d@dee-dee/dee-fd�Z3d@dee-e4ee/fde-fd�Z5dee/dee/fd�Z6dee4e/fde-fd�Z7de/de-fd �Z8		dAd!e-d"eee-e-fdee/fd#�Z9d$e-d%ee/defd&�Z:d'ed$e-defd(�Z;d$e-d"eee-e-fde/dee/ee-e-ffd)�Z<		dAd*e-d"eee-e-fdee/defd+�Z=		dAd,ee-e-fd"eee-e-fdee/dee-effd-�Z>dddd.�d/eee-e-fdee/dee-fd0�Z?d1e/d2e/de-fd3�Z@d4eeeee-eAfe-fde-fd5�ZBd6eCdeCfd7�ZD	d@d8eeEeCfdee/deee-ee-ffd9�ZFdBd:e-dee-eCffd;�ZGGd<�d=�ZHGd>�d?ee0e1f�ZIy)CaiUtility functions to expand configuration directives or special values
(such glob patterns).

We can split the process of interpreting configuration files into 2 steps:

1. The parsing the file contents from strings to value objects
   that can be understand by Python (for example a string with a comma
   separated list of keywords into an actual Python list of strings).

2. The expansion (or post-processing) of these values according to the
   semantics ``setuptools`` assign to them (for example a configuration field
   with the ``file:`` directive should be expanded from a list of file paths to
   a single string with the contents of those files concatenated)

This module focus on the second step, and therefore allow sharing the expansion
functions among several configuration file formats.

**PRIVATE MODULE**: API reserved for setuptools internal usage only.
�N)�iglob)�ConfigParser)�
ModuleSpec)�chain)�
TYPE_CHECKING�Callable�Dict�Iterable�Iterator�List�Mapping�Optional�Tuple�TypeVar�Union�cast)�Path)�
ModuleType)�DistutilsOptionError�)�	same_path)�SetuptoolsWarning)�Distribution)�ConfigDiscovery)�DistributionMetadata�_K�_VT)�	covariantc�j�eZdZdZdedefd�Zdeee	je	jffd�Zd�Zy)	�StaticModulez>Proxy to a module object that avoids executing arbitrary code.�name�specc���tjtj|j�j��}t
|�jt��|`	y�N)
�ast�parse�pathlibr�origin�
read_bytes�vars�update�locals�self)r-r!r"�modules    ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/expand.py�__init__zStaticModule.__init__As?�����7�<�<����4�?�?�A�B���T�
���&�(�#��I��returnc#�<�K�|jjD]|�t�tj�r�fd��j
D�Ed{����;t�tj�s�V�js�c�j�jf���~y7�J�w)Nc3�:�K�|]}|�jf���y�wr$��value)�.0�target�	statements  �r/�	<genexpr>z1StaticModule._find_assignments.<locals>.<genexpr>Is�����V�DU�&�V�Y�_�_�5�DU�s�)	r.�body�
isinstancer%�Assign�targets�	AnnAssignr6r8)r-r9s @r/�_find_assignmentszStaticModule._find_assignmentsFsi��������)�)�I��)�S�Z�Z�0�V�I�DU�DU�V�V�V��I�s�}�}�5�)�/�/� �'�'����9�9�	*�V�s�AB�B�B�0B�=Bc���	t�fd�|j�D��S#t$r }t|j�d����|�d}~wwxYw)zHAttempt to load an attribute "statically", via :func:`ast.literal_eval`.c3��K�|]E\}}t|tj�r&|j�k(rtj|����Gy�wr$)r<r%�Name�id�literal_eval)r7r8r6�attrs   �r/r:z+StaticModule.__getattr__.<locals>.<genexpr>PsA������%=�M�F�E��f�c�h�h�/�F�I�I��4E�� � ��'�%=�s�AAz has no attribute N)�nextr@�	Exception�AttributeErrorr!)r-rF�es ` r/�__getattr__zStaticModule.__getattr__Ms]���	P���%)�%;�%;�%=���
��
�	P� �D�I�I�;�.@���!G�H�a�O��	P�s�!%�	A�A	�	AN)
�__name__�
__module__�__qualname__�__doc__�strrr0rrr%�ASTr@rK�r1r/r r >sA��H��S��
��
:�8�E�#�'�'�3�7�7�2B�,C�#D�:�	Pr1r �patterns�root_dirr2c
�����hd�}g}�xstj��|D]��t�fd�|D��rltjj	tjj����}|j
t�fd�t|d��D�����tjj���jtjd�}|j|���|S)aExpand the list of glob patterns, but preserving relative paths.

    :param list[str] patterns: List of glob patterns
    :param str root_dir: Path to which globs should be relative
                         (current directory by default)
    :rtype: list
    >�*�?�[�]�{�}c3�&�K�|]}|�v���
y�wr$rR)r7�charr6s  �r/r:z glob_relative.<locals>.<genexpr>hs�����9���t�u�}��s�c3��K�|]B}tjj|��jtjd����Dy�w)�/N)�os�path�relpath�replace�sep�r7rarTs  �r/r:z glob_relative.<locals>.<genexpr>ls9������ @���G�G�O�O�D�(�3�;�;�B�F�F�C�H� @�s�AAT)�	recursiver_)
r`�getcwd�anyra�abspath�join�extend�sortedrrbrcrd�append)rSrT�glob_characters�expanded_values�	glob_pathrar6s `    @r/�
glob_relativerqYs����5�O��O��&�2�9�9�;�H����9��9�9�����������X�u�(E�F�I��"�"��� %�i�4� @���
��7�7�?�?�5�(�3�;�;�B�F�F�C�H�D��"�"�4�(��"�r1�	filepathsc����ddlm}tjj	�xstj
����fd�||�D�}dj
�fd�t|�D��S)z�Return the content of the files concatenated using ``
`` as str

    This function is sandboxed and won't reach anything outside ``root_dir``

    (By default ``root_dir`` is the current directory).
    r)�always_iterablec3�^�K�|]$}tjj�|����&y�wr$)r`rarjres  �r/r:zread_files.<locals>.<genexpr>�s#�����V�;U�4�"�'�'�,�,�x��.�;U�s�*-�
c3�L�K�|]}t|��r
t|����y�wr$)�
_assert_local�
_read_fileres  �r/r:zread_files.<locals>.<genexpr>�s(������6�D���x�(�	�4��6�s�!$)� setuptools.extern.more_itertoolsrtr`rarirgrj�_filter_existing_files)rrrTrt�
_filepathss `  r/�
read_filesr}zsX���A��w�w���x�6�2�9�9�;�7�H�V�?�9�;U�V�J��9�9��*�:�6���r1c#�K�|D]?}tjj|�r|���'tjd|�d���Ay�w)NzFile z cannot be found)r`ra�isfiler�emit)rrras  r/r{r{�s=������
�7�7�>�>�$���J��"�"�U�4�(�2B�#C�D�	�s�AA�filepathc�h�t|d��5}|j�cddd�S#1swYyxYw)Nzutf-8)�encoding)�open�read)r��fs  r/ryry�s#��	
�h��	)�Q��v�v�x�
*�	)�	)�s�(�1c���ttjj|��ttjj|��jvrd|�d|�d�}t|��y)NzCannot access z (or anything outside �)T)rr`rari�parentsr)r�rT�msgs   r/rxrx�sW���B�G�G�O�O�H�%�&�d�2�7�7�?�?�8�3L�.M�.U�.U�U��x�l�*@���A�N��"�3�'�'�r1�	attr_desc�package_dirc�t�|xstj�}|j�jd�}|j	�}dj|�}|xsd}t
|||�\}}}t||�}	tt||�|�S#t$rt||�}	t|	|�cYSwxYw)a�Reads the value of an attribute from a module.

    This function will try to read the attributed statically first
    (via :func:`ast.literal_eval`), and only evaluate the module if it fails.

    Examples:
        read_attr("package.attr")
        read_attr("package.module.attr")

    :param str attr_desc: Dot-separated string describing how to reach the
        attribute (see examples above)
    :param dict[str, str] package_dir: Mapping of package names to their
        location in disk (represented by paths relative to ``root_dir``).
    :param str root_dir: Path to directory containing all the packages in
        ``package_dir`` (current directory by default).
    :rtype: str
    �.r0)r`rg�strip�split�poprj�_find_module�
_find_spec�getattrr rH�
_load_spec)
r�r�rT�
attrs_path�	attr_name�module_name�_parent_pathrar"r.s
          r/�	read_attrr��s���,�&�2�9�9�;�H����"�(�(��-�J���� �I��(�(�:�&�K��+��K�&2�;��X�&V�#�L�$���k�4�(�D�*��|�K��6�	�B�B���*��D�+�.���v�y�)�)�*�s�=B�!B7�6B7r��module_pathc��tjj||�}|xstjj|�}|�t	|��|Sr$)�	importlib�util�spec_from_file_location�	find_spec�ModuleNotFoundError)r�r�r"s   r/r�r��sF���>�>�1�1�+�{�K�D��8�9�>�>�+�+�K�8�D��|�!�+�.�.��Kr1r"c��t|d|�}|tjvrtj|Stjj|�}|tj|<|jj|�|S)NrL)r��sys�modulesr�r��module_from_spec�loader�exec_module)r"r�r!r.s    r/r�r��sd���4��[�1�D��s�{�{���{�{�4� � �
�^�^�
,�
,�T�
2�F��C�K�K����K�K���F�#��Mr1c�b�|}|jd�}|r�|d|vrk||d}|jdd�}t|�dkDr)tjj||d�}|d}n|}dj|g|dd��}n'd|vr#tjj||d�}tjj
|g|jd����}t
|�d�tjj|d�ft|�d	���}	td
�|	D�d�}
||
|fS)a0Given a module (that could normally be imported by ``module_name``
    after the build is complete), find the path to the parent directory where
    it is contained and the canonical name that could be used to import it
    considering the ``package_dir`` in the build configuration and ``root_dir``
    r�rr_�N�z.pyz__init__.pyz.*c3�`K�|]&}tjj|�s�#|���(y�wr$)r`rar)r7�xs  r/r:z_find_module.<locals>.<genexpr>�s ����C�:�a�������1B��:�s�$.�.)	r��rsplit�lenr`rarjrrrG)r�r�rT�parent_path�module_parts�custom_path�parts�
parent_module�
path_start�
candidatesr�s           r/r�r��s0���K��$�$�S�)�L����?�k�)�%�l�1�o�6�K��&�&�s�A�.�E��5�z�A�~� �g�g�l�l�8�U�1�X�>�� %�a��
� +�
��(�(�M�#E�L���4D�#E�F�K�
�;�
��'�'�,�,�x��R��A�K������k�C�K�,=�,=�c�,B�C�J���<�s�	�R�W�W�\�\�*�m�D�E�
���B�� ��J��C�:�C�T�J�K���[�0�0r1�qualified_class_namec���|xstj�}|jd�}||dzd}|d|}t|||�\}}}t	t||�|�}	t
|	|�S)z@Given a qualified class name, return the associated class objectr�r�N)r`rg�rfindr�r�r�r�)
r�r�rT�idx�
class_name�pkg_namer�rar�r.s
          r/�
resolve_classr��su���&�2�9�9�;�H�
�
$�
$�S�
)�C�%�c�A�g�i�0�J�#�D�S�)�H�&2�8�[�(�&S�#�L�$��
�
�;��5�{�
C�F��6�:�&�&r1�valuesc
�l�|j�D��cic]\}}|t|||���c}}Scc}}w)z�Given a dictionary mapping command names to strings for qualified class
    names, apply :func:`resolve_class` to the dict values.
    )�itemsr�)r�r�rT�k�vs     r/�cmdclassr�
s6��DJ�<�<�>�R�>�4�1�a�A�}�Q��X�6�6�>�R�R��Rs�0)�
namespaces�fill_package_dirrTr�c�P�
�ddlm}ddlm}m}|rddlm}nddlm}|xstj}|jddg�}g}	|�in|}t|||����
t�
�dk(r+t�
fd	�d|fD��r|jd
�
d��
D]�}
t||
�}|j|fi|��}|	j!|�|s�6|j#d
�|
k(r�Ktj$j'||�r�l|j)|||
����|	S)aWorks similarly to :func:`setuptools.find_packages`, but with all
    arguments given as keyword arguments. Moreover, ``where`` can be given
    as a list (the results will be simply concatenated).

    When the additional keyword argument ``namespaces`` is ``True``, it will
    behave like :func:`setuptools.find_namespace_packages`` (i.e. include
    implicit namespaces as per :pep:`420`).

    The ``where`` argument will be considered relative to ``root_dir`` (or the current
    working directory when ``root_dir`` is not given).

    If the ``fill_package_dir`` argument is passed, this function will consider it as a
    similar data structure to the ``package_dir`` configuration parameter add fill-in
    any missing package location.

    :rtype: list
    r)�construct_package_dir)�unique_everseenrt)�PEP420PackageFinder)�
PackageFinder�wherer�r�c3�>�K�|]}t�d|����y�w)rN)�
_same_path)r7r��searchs  �r/r:z find_packages.<locals>.<genexpr>>s �����V�o��J�v�a�y�!�$<� <�o�s�r�)�setuptools.discoveryr�rzr�rtr�r�r`�curdirr��listr��all�
setdefault�
_nest_path�findrk�getra�samefiler+)r�r�rT�kwargsr�r�rtr�r��packagesra�package_path�pkgsr�s             @r/�
find_packagesr�s���0;�Q��M�6��$�2�9�9�H��J�J�w���&�E��H�-�5�r�;K��
�/�/�%�"8�9�
:�F�
�6�{�a��C�V�s�H�o�V�V��#�#�B��q�	�2���!�(�D�1��!�}�!�!�,�9�&�9��������� � ��$��,����0@�0@��x�0X��#�#�$9�$��$E�F���Or1�parentrac��|dvr|ntjj||�}tjj|�S)N>r�r�)r`rarj�normpath)r�ras  r/r�r�Ms4���Y�&�6�B�G�G�L�L���,F�D�
�7�7���D�!�!r1r6c��t|�r|�}ttttt
f|�}t
|t�s2t|d�r!djtt|��}|Sd|z}|S)z`When getting the version directly from an attribute,
    it should be normalised to string.
    �__iter__r�z%s)
�callablerr
rrP�intr<�hasattrrj�mapr5s r/�versionr�Rsj����������%��S��/�*�E�2�E��e�S�!��5�*�%��H�H�S��e�_�-�E��L��5�L�E��Lr1�package_datac�6�d|vr|jd�|d<|S)NrVr�)r�)r�s r/�canonic_package_datar�ds%��
�l��'�+�+�C�0��R���r1�
data_filesc	��t|t�r|S|j�D��cgc]\}}|t||�f��c}}Scc}}w)z�For compatibility with ``setup.py``, ``data_files`` should be a list
    of pairs instead of a dict.

    This function also expands glob patterns.
    )r<r�r�rq)r�rT�destrSs    r/�canonic_data_filesr�jsT���*�d�#���)�.�.�0��0�N�D�(�
�}�X�x�0�1�0����s�A�textc	��tdd��}t|_|j||�|j	�D��cic]\}}|t|j	����!}}}|j
|jd�|Scc}}w)a?Given the contents of entry-points file,
    process it into a 2-level dictionary (``dict[str, dict[str, str]]``).
    The first level keys are entry-point groups, the second level keys are
    entry-point names, and the second level values are references to objects
    (that correspond to the entry-point value).
    N)�=)�default_section�
delimiters)rrP�optionxform�read_stringr��dictr�r�)r��text_source�parserr�r��groupss      r/�entry_pointsr�{ss���$�6�
B�F��F��
���t�[�)�-3�\�\�^�
<�^�T�Q��a��a�g�g�i�� �^�F�
<�
�J�J�v�%�%�t�,��M��=s�$Bc�`�eZdZdZd
d�Zd�Zd�Zd�Zdee	e	ffd�Z
edee	e	ffd��Zy	)�EnsurePackagesDiscovereda�Some expand functions require all the packages to already be discovered before
    they run, e.g. :func:`read_attr`, :func:`resolve_class`, :func:`cmdclass`.

    Therefore in some cases we will need to run autodiscovery during the evaluation of
    the configuration. However, it is better to postpone calling package discovery as
    much as possible, because some parameters can influence it (e.g. ``package_dir``),
    and those might not have been processed yet.
    c� �||_d|_y)NF)�_dist�_called)r-�distributions  r/r0z!EnsurePackagesDiscovered.__init__�s��!��
���r1c�d�|js$d|_|jjd��yy)zBTrigger the automatic package discovery, if it is still necessary.TF)r!N)r�r��set_defaults�r-s r/�__call__z!EnsurePackagesDiscovered.__call__�s*���|�|��D�L��J�J�#�#��#�/�r1c��|Sr$rRrs r/�	__enter__z"EnsurePackagesDiscovered.__enter__�s���r1c�f�|jr%|jjj�yyr$)r�r�r�analyse_name)r-�	_exc_type�
_exc_value�
_tracebacks    r/�__exit__z!EnsurePackagesDiscovered.__exit__�s$���<�<��J�J�#�#�0�0�2�r1r2c�H�|�|jj}|�iS|Sr$)r�r�)r-�pkg_dirs  r/�_get_package_dirz)EnsurePackagesDiscovered._get_package_dir�s%�����*�*�(�(���_�r�1�'�1r1c�,�t|j�S)zCProxy to ``package_dir`` that may trigger auto-discovery when used.)�LazyMappingProxyr
rs r/r�z$EnsurePackagesDiscovered.package_dir�s�� �� 5� 5�6�6r1N)r�r)
rLrMrNrOr0rrr
r
rPr
�propertyr�rRr1r/r�r��sT����0��3�2�'�#�s�(�"3�2�
�7�W�S�#�X�.�7��7r1r�c�t�eZdZdZdegeeefffd�Zdeeeffd�Z	dedefd�Z
defd�Zde
efd	�Zy
)ra�Mapping proxy that delays resolving the target object, until really needed.

    >>> def obtain_mapping():
    ...     print("Running expensive function!")
    ...     return {"key": "value", "other key": "other value"}
    >>> mapping = LazyMappingProxy(obtain_mapping)
    >>> mapping["key"]
    Running expensive function!
    'value'
    >>> mapping["other key"]
    'other value'
    �obtain_mapping_valuec� �||_d|_yr$)�_obtain�_value)r-rs  r/r0zLazyMappingProxy.__init__�s��+���15��r1r2c�\�|j�|j�|_|jSr$)rrrs r/�_targetzLazyMappingProxy._target�s#���;�;���,�,�.�D�K��{�{�r1�keyc�(�|j�|Sr$)r)r-rs  r/�__getitem__zLazyMappingProxy.__getitem__�s���|�|�~�c�"�"r1c�4�t|j��Sr$)r�rrs r/�__len__zLazyMappingProxy.__len__�s���4�<�<�>�"�"r1c�4�t|j��Sr$)�iterrrs r/r�zLazyMappingProxy.__iter__�s���D�L�L�N�#�#r1N)rLrMrNrOrr
rrr0rrr�rrr�rRr1r/rr�sh���6�X�b�'�"�b�&�/�6I�-J�6����R����
#�r�#�b�#�#��#�$�(�2�,�$r1rr$)NN)zentry-points)JrOr%r�r`r'r��globr�configparserr�importlib.machineryr�	itertoolsr�typingrrr	r
rrr
rrrrrr�typesr�distutils.errorsr�_pathrr��warningsr�setuptools.distrr�r�distutils.distr�
from_iterable�
chain_iterrP�PathLike�_Pathrrr rq�bytesr}r{ryrxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrRr1r/�<module>r/s����&��	��
��%�*��
�
�
�
���1�+�(��,�4�3�
�
 �
 �
�
�c�2�;�;�����T�]���T�T�"��P�P�8:>���s�m��'/����	�#�Y��B�%��U�H�U�O� ;�<��PS��$E�h�u�o�E�(�5�/�E���u�e�|�,����
�E��S��04� $�#*��#*��'�#�s�(�+�,�#*��u�o�#*�L�C��h�u�o��*���Z��c��j��1��1�#+�G�C��H�,=�#>�1�JO�1�
�5�(�3�-��$�%�1�H04� $�
'��
'��'�#�s�(�+�,�
'��u�o�
'��	
'�$04� $�S���c��N�S��'�#�s�(�+�,�S��u�o�S�
�#�x�-��	S��15� $�	2��t�C��H�~�.�2��u�o�	2�
�#�Y�
2�j"�u�"�E�"�c�"�
�5��8�E�#�s�(�O�#<�c�A�B��s��$�t����@D���d�D�j�!��-5�e�_��	�%��T�#�Y��
� ��"�s��4��T�	�?��#7�#7�L$�w�r�2�v��$r1python3.12/site-packages/setuptools/config/__pycache__/__init__.cpython-312.pyc000064400000004025151732704210023254 0ustar00�

��_i����dZddlmZddlmZmZmZddlmZddl	m
Z
ede�	�Zd
Zdedefd
�Z
e
e
j�Ze
e
j�Zy)zVFor backward compatibility, expose main functions from
``setuptools.config.setupcfg``
�)�wraps)�Callable�TypeVar�cast�)�SetuptoolsDeprecationWarning�)�setupcfg�Fn)�bound)�parse_configuration�read_configuration�fn�returnc�J��t���fd��}tt|�S)Nc
���tjddt�d�j�dtj�d���|i|��S)NzDeprecated API usage.zZ
            As setuptools moves its configuration towards `pyproject.toml`,
            `�.zG` became deprecated.

            For the time being, you can use the `a�` module
            to access a backward compatible API, but this module is provisional
            and might be removed in the future.

            To read project metadata, consider using
            ``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
            For simple scenarios, you can also try parsing the file directly
            with the help of ``configparser``.
            )r�emit�__name__r
)�args�kwargsrs  ���/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/__init__.py�_wrapperz%_deprecation_notice.<locals>._wrappersV���$�)�)�#���Z�q����
�&2�2:�2C�2C�1D�E
�	
�	
�$�4�"�6�"�"�)rrr)rrs` r�_deprecation_noticers(���
�2�Y�#��#�*��H��rN)�__doc__�	functoolsr�typingrrr�warningsr�r
r�__all__rrr
�rr�<module>r#sc����*�*�3���T��"��
7���B��2��4)��)D�)D�E��)�(�*F�*F�G�rpython3.12/site-packages/setuptools/config/__pycache__/setupcfg.cpython-312.pyc000064400000075502151732704210023345 0ustar00�

��_i�c���dZddlZddlZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZddlmZmZdd	lmZdd
lmZmZddlmZddl m!Z!m"Z"dd
l#m$Z$ddl%m&Z&e	rddl'm(Z(ddl)m*Z*ee+ejXfZ-ededeffZ.	ede.fZ/eded��Z0	d8de-de1fd�Z2ddde-ddfd�Z3		d9ddde-dee-de4dedf
d�Z5d e0d!e+fd"�Z6d#edde1fd$�Z7	d:d%dd&e/ded'fd(�Z8d)e+d*e+d+e9fd,�Z:Gd-�d.e
e0�Z;Gd/�d0e;d1�Z<Gd2�d3e;d�Z=Gd4�d5e$�Z>Gd6�d7e$�Z?y);a<
Load setuptools configuration from ``setup.cfg`` files.

**API will be made private in the future**

To read project metadata, consider using
``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
For simple scenarios, you can also try parsing the file directly
with the help of ``configparser``.
�N)�defaultdict)�partial��wraps)�
TYPE_CHECKING�Callable�Any�Dict�Generic�Iterable�List�Optional�Set�Tuple�TypeVar�Union�)�	FileError�OptionError)�default_environment)�InvalidRequirement�Requirement)�SpecifierSet)�InvalidVersion�Version)�SetuptoolsDeprecationWarning�)�expand)�DistributionMetadata��Distribution�str�Target)r!r)�bound�filepath�returnc�v�ddlm}|�}|r|j�ng}t||||�}t	|�S)a,Read given configuration file and returns options from it as a dict.

    :param str|unicode filepath: Path to configuration file
        to get options from.

    :param bool find_others: Whether to search for other configuration files
        which could be on in various places.

    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.

    :rtype: dict
    rr )�setuptools.distr!�find_config_files�_apply�configuration_to_dict)r%�find_others�ignore_option_errorsr!�dist�	filenames�handlerss       ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/setupcfg.py�read_configurationr28s<��$-��>�D�,7��&�&�(�R�I��d�H�i�1E�F�H� ��*�*�r.r!c�>�t||�|j�|S)z`Apply the configuration from a ``setup.cfg`` file into an existing
    distribution object.
    )r*�_finalize_requires)r.r%s  r1�apply_configurationr6Rs���4��������Kr3�other_filesr-)�
ConfigHandler.c��ddlm}tjj	|�}tjj|�st
d|�d���tj�}tjtjj|��g|�|�}	|j||��t||j|��}|j�tj|�|S#tj|�wxYw)zHRead configuration from ``filepath`` and applies to the ``dist`` object.r)�
_DistributionzConfiguration file z does not exist.)r/)r-)r(r:�os�path�abspath�isfiler�getcwd�chdir�dirname�parse_config_files�parse_configuration�command_options�_finalize_license_files)r.r%r7r-r:�current_directoryr/r0s        r1r*r*[s���.��w�w���x�(�H�
�7�7�>�>�(�#��-�h�Z�7G�H�I�I��	�	����H�H�R�W�W�_�_�X�
&�'�(�+�(�x�(�I�$��(�(���(�C�&��$�&�&�=Q�
��	
�$�$�&�
���"�#��O��	���"�#�s�!;C3�3D
�
target_obj�keyc�j�d|��}tjt||�}t|||�}|�S)z�
    Given a target object and option key, get that option from
    the target object, either through a get_{key} method or
    from an attribute directly.
    �get_)�	functoolsr�getattr)rGrH�getter_name�by_attribute�getters     r1�_get_optionrPys8�����,�K��$�$�W�j�#�>�L�
�Z��l�
;�F��8�Or3r0c��tt�}|D];}|jD]*}t|j|�}|||j
|<�,�=|S)z�Returns configuration data gathered by given handlers as a dict.

    :param list[ConfigHandler] handlers: Handlers list,
        usually from parse_configuration()

    :rtype: dict
    )r�dict�set_optionsrPrG�section_prefix)r0�config_dict�handler�option�values     r1r+r+�sW��$�D�)�K����)�)�F��� 2� 2�F�;�E�:?�K��.�.�/��7�*��
�r3�distributionrD)�ConfigMetadataHandler�ConfigOptionsHandlerc	��tj|�5}t||||�}|j�|js|j|_t|j||||j|j�}|j�|jj|j|j�ddd�||fS#1swYfSxYw)a�Performs additional parsing of configuration options
    for a distribution.

    Returns a list of used option handlers.

    :param Distribution distribution:
    :param dict command_options:
    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.
    :rtype: list
    N)
r�EnsurePackagesDiscoveredr[�parse�package_dirrZ�metadata�src_root�_referenced_files�update)rYrDr-�ensure_discovered�options�metas      r1rCrC�s���$
�	(�	(��	6�:K�&��� ��	
��	�
�
���'�'�'.�':�':�L�$�$��!�!�� ���$�$��!�!�

��	
�
�
���&�&�-�-��%�%�t�'=�'=�	
�+
7�2��=��3
7�2��=��s�B*C�C�label�
orig_value�parsedc�l��d|vst��dk7ryt�j�}	t�d�}|j|vrt
j
|�d��yy#t$rD}t�fd�|D��r&t
j|�d��}t|�|�Yd}~yd}~wwxYw)amBecause users sometimes misinterpret this configuration:

    [options.extras_require]
    foo = bar;python_version<"4"

    It looks like one requirement with an environment marker
    but because there is no newline, it's parsed as two requirements
    with a semicolon as separator.

    Therefore, if:
        * input string does not contain a newline AND
        * parsed result contains two requirements AND
        * parsing of the two parts from the result ("<first>;<second>")
        leads in a valid Requirement with a valid marker
    a UserWarning is shown to inform the user about the possible problem.
    �
rNr)�field�reqc3�F�K�|]}�dj|����y�w)rN)�
startswith)�.0�markerris  �r1�	<genexpr>z8_warn_accidental_env_marker_misconfig.<locals>.<genexpr>�s!�����B�'��v�a�y�#�#�F�+�'�s�!)
�len�
marker_env�keysr�name�_AmbiguousMarker�emitr�any�message)rgrhri�markersrm�ex�msgs  `    r1�%_warn_accidental_env_marker_misconfigr~�s����"�z��S��[�A�-���l���!�G�2��&��)�$���8�8�w���!�!��6�!�9�!�=����2��B�'�B�B�"�*�*��F�1�I�*�F�C�$�S�)�r�1�C��2�s�6A&�&	B3�/:B.�.B3c�*�eZdZUdZeed<	iZeeefed<	dede	de
jfd�Ze
de	fd��Zed	��Zd
�Ze
dd��Ze
d��Ze
d
��Ze
d��Zdefd�Zdefd�Ze
d��Ze
d��Ze
dd��Zd�Zd�Zd�Zy)r8z1Handles metadata supplied in configuration files.rT�aliasesrGrerdc��||_||_t|j|��|_g|_||_t�|_y�N)	r-rGrR�_section_options�sectionsrSrd�setrb)�selfrGrer-rds     r1�__init__zConfigHandler.__init__�sI��%9��!�$����T�2�2�7�;�<��
�&(���!2���+.�5���	r3c#�K�|j�D]<\}}|j|j�\}}}|r�(|jd�|f���>y�w)N�.)�items�	partitionrT�lstrip)�clsre�	full_namerX�pre�seprvs       r1r�zConfigHandler._section_optionssQ���� '�
�
���I�u�&�0�0��1C�1C�D�N�C��d����+�+�c�"�E�)�)�	!0�s�AAc�F�td|jjz��)�.Metadata item name to parser function mapping.z!%s must provide .parsers property)�NotImplementedError�	__class__�__name__)r�s r1�parserszConfigHandler.parserss#��"�/�$�.�.�2I�2I�I�
�	
r3c���|j}|jj||�}	t||�}|ry	|jj|d��|�}tj|j|�}t|d|z|�}||�|jj|�y#t$rt|��wxYw#tf|jz$rYywxYw)Nc��|Sr��)�xs r1�<lambda>z+ConfigHandler.__setitem__.<locals>.<lambda>%s��Qr3zset_%s)rGr��getrL�AttributeError�KeyErrorr��	Exceptionr-rKr�__setattr__rS�append)r��option_namerXrG�
current_valueri�
simple_setter�setters        r1�__setitem__zConfigHandler.__setitem__s����_�_�
��l�l�&�&�{�K�@��	(�#�J��<�M���	�?�T�\�\�%�%�k�;�?��F�F�"�)�)�*�*@�*@�+�N�
���X��%;�]�K���v��������,��!�	(��;�'�'�	(���|�d�7�7�7�	��	�s�B1�#C	�1C�	C#�"C#c���t|t�r|Sd|vr|j�}n|j|�}|D�cgc]#}|j	�s�|j	���%c}Scc}w)z�Represents value as a list.

        Value is split either by separator (defaults to comma) or by lines.

        :param value:
        :param separator: List items separator character.
        :rtype: list
        rk)�
isinstance�list�
splitlines�split�strip)r�rX�	separator�chunks    r1�_parse_listzConfigHandler._parse_list/s\���e�T�"��L��5�=��$�$�&�E��K�K�	�*�E�+0�B�5�%�E�K�K�M����
�5�B�B��Bs�A(�A(c���d}i}|j|�D]K}|j|�\}}}||k7rtd|����|j�||j�<�M|S)zPRepresents value as a dict.

        :param value:
        :rtype: dict
        �=z&Unable to parse option value to dict: )r�r�rr�)r�rXr��result�linerHr��vals        r1�_parse_dictzConfigHandler._parse_dictCsm���	����O�O�E�*�D� �N�N�9�5�M�C��c��i��!�$J�5�'�"R�S�S�"%�)�)�+�F�3�9�9�;��	+��
r3c�*�|j�}|dvS)zQRepresents value as boolean.

        :param value:
        :rtype: bool
        )�1�true�yes)�lower�r�rXs  r1�_parse_boolzConfigHandler._parse_boolTs�����
���,�,�,r3c����fd�}|S)z�Returns a parser function to make sure field inputs
        are not files.

        Parses a value after getting the key so error messages are
        more informative.

        :param key:
        :rtype: callable
        c�b��d}|j|�rtdj����|S)N�file:zCOnly strings are accepted for the {0} field, files are not accepted)ro�
ValueError�format)rX�exclude_directiverHs  �r1�parserz3ConfigHandler._exclude_files_parser.<locals>.parserjs:��� '����� 1�2� �-�-3�V�C�[����Lr3r�)r�rHr�s ` r1�_exclude_files_parserz#ConfigHandler._exclude_files_parser^s���	��
r3�root_dirc�0�d}t|t�s|S|j|�s|S|t|�d}|j	d�D�cgc]}|j���}}|jj|�tj||�Scc}w)aORepresents value as a string, allowing including text
        from nearest files using `file:` directive.

        Directive is sandboxed and won't reach anything outside
        directory with setup.py.

        Examples:
            file: README.rst, CHANGELOG.md, src/file.txt

        :param str value:
        :rtype: str
        r�N�,)
r�r"rorsr�r�rbrcr�
read_files)r�rXr��include_directive�specr<�	filepathss       r1�_parse_filezConfigHandler._parse_fileus���$���%��%��L���� 1�2��L��S�*�+�-�.��.2�j�j��o�>�o�d�T�Z�Z�\�o�	�>����%�%�i�0�� � ��H�5�5��?s�	Bc���d}|j|�s|S|j|d�}|j|jj�tj|||�S)z�Represents value as a module attribute.

        Examples:
            attr: package.attr
            attr: package.module.attr

        :param str value:
        :rtype: str
        zattr:�)ro�replacercrdr_r�	read_attr)r�rXr_r��attr_directive�	attr_descs      r1�_parse_attrzConfigHandler._parse_attr�s]��!������/��L��M�M�.�"�5�	�	���4�1�1�=�=�>����	�;��A�Ar3c����fd�}|S)z�Returns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        c�*��|}�D]
}||�}�|Sr�r�)rXri�method�
parse_methodss   �r1r^z1ConfigHandler._get_parser_compound.<locals>.parse�s"����F�'������(��Mr3r�)r�r�r^s ` r1�_get_parser_compoundz"ConfigHandler._get_parser_compound�s���	��r3c�X�i}|j�D]\}\}}|||�||<�|S)aParses section options into a dictionary.

        Applies a given parser to each option in a section.

        :param dict section_options:
        :param callable values_parser: function with 2 args corresponding to key, value
        :rtype: dict
        )r�)r��section_options�
values_parserrXrH�_r�s       r1�_parse_section_to_dict_with_keyz-ConfigHandler._parse_section_to_dict_with_key�s9����,�2�2�4�M�C��!�S�&�s�C�0�E�#�J�5��r3Nc�<���r�fd�nd�}|j||�S)aParses section options into a dictionary.

        Optionally applies a given parser to each value.

        :param dict section_options:
        :param callable values_parser: function with 1 arg corresponding to option value
        :rtype: dict
        c����|�Sr�r�)r��vr�s  �r1r�z6ConfigHandler._parse_section_to_dict.<locals>.<lambda>�s
���}�Q�/r3c��|Sr�r�)r�r�s  r1r�z6ConfigHandler._parse_section_to_dict.<locals>.<lambda>�s��UVr3�r�)r�r�r�r�s  ` r1�_parse_section_to_dictz$ConfigHandler._parse_section_to_dict�s#���5B�/����2�2�?�F�K�Kr3c��|j�D]/\}\}}tjt�5|||<ddd��1y#1swY�<xYw)zQParses configuration file section.

        :param dict section_options:
        N)r��
contextlib�suppressr�)r�r�rvr�rXs     r1�
parse_sectionzConfigHandler.parse_section�sF��
!0� 5� 5� 7��D�*�1�e��$�$�X�.�"��T�
�/�.�!8�.�.�s�A�A
	c���|jj�D]T\}}d}|rd|z}t|d|zjdd�d�}|�t	d|j
�d|�d���||��Vy)	zTParses configuration file items from one
        or more related sections.

        r�z_%szparse_section%sr��__Nz*Unsupported distribution option section: [�])r�r�rLr�rrT)r��section_namer��method_postfix�section_parser_methods     r1r^zConfigHandler.parse�s���
.2�]�]�-@�-@�-B�)�L�/��N��!&��!5��8?��"�^�3�<�<�S�$�G��	9�!�%�,�!���+�+�,�A�l�^�1�>���

"�/�2�%.Cr3c�6����t�����fd��}|S)z�this function will wrap around parameters that are deprecated

        :param msg: deprecation message
        :param func: function to be wrapped around
        c�f���jdd�tjd�fi����|i|��S)N�
stacklevelrz Deprecated config in `setup.cfg`)�
setdefault�_DeprecatedConfigrx)�args�kwargs�func�kwr}s  ���r1�config_handlerz@ConfigHandler._deprecated_config_handler.<locals>.config_handler�s7����M�M�,��*��"�"�#E�s�Q�b�Q���(��(�(r3r)r�r�r}r�r�s ``` r1�_deprecated_config_handlerz(ConfigHandler._deprecated_config_handler�s#���
�t��	)�
�	)�
�r3)r�r�)r��
__module__�__qualname__�__doc__r"�__annotations__r�r
r#�AllCommandOptionsrr]r��classmethodr��propertyr�r�r�r�r�r��_Pathr�r�r�r�r�r�r^r�r�r3r1r8r8�s>��;����
!�G�T�#�s�(�^� �����#��
"�:�:��"�*�'8�*��*��
��
�-�4�C��C�&���� �-��-�����,6�5�6�4B��B�(����&�����
L��
L�#�3�2
r3r8c
���eZdZdZddddd�ZdZ	dejfd	d
dede	d
e
jdee
def�fd�
Zed��Zd�Z�xZS)rZr`�url�description�classifiers�	platforms)�	home_page�summary�
classifier�platformFNrGrrer-rdr_r�c�F��t�|�||||�||_||_yr�)�superr�r_r�)r�rGrer-rdr_r�r�s       �r1r�zConfigMetadataHandler.__init__s)���	����W�.B�DU�V�&��� ��
r3c���|j}t|j|j��}|j}|j
}|||||j
||�|d�||||j|d�S)r��r��license)r�keywords�provides�	obsoletesrr�
license_filesr�long_description�version�project_urls)r�rr�r�r�r�r��_parse_version)r��
parse_list�
parse_file�
parse_dict�exclude_files_parsers     r1r�zConfigMetadataHandler.parsers#s����%�%�
��T�-�-��
�
�F�
��%�%�
�#�9�9��$�"�"�#��4�4�Z��L�+�I�6�'�%� *��*�*�&�
�	
r3c�0�|j||j�}||k7r|j�}	t|�|St
j|j||j|j��S#t$rtd|�d|����wxYw)zSParses `version` option value.

        :param value:
        :rtype: str

        zVersion loaded from z does not comply with PEP 440: )
r�r�r�rrrrrr�r_)r�rXrs   r1rz$ConfigMetadataHandler._parse_version9s����"�"�5�$�-�-�8���e���m�m�o�G�
��� ��N��~�~�d�.�.�u�d�6F�6F��
�
�V�W�W��"�
�!�*�5�'�2,�,3�9�6���
�s�A:�:B)r�r�r�rTr��strict_moder;�curdirr��boolrr]rrRrr�r�r�r�
__classcell__�r�s@r1rZrZs�����N�� �#��	�G��K��'+��)�)�!�*�!�#�!�#�	!�
"�:�:�!��d�^�
!��!��
��
�*Xr3rZrc���eZdZdZdddededejf�fd�Ze	d��Z
d�Zd	ed
efd�Z
ed��Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z�xZS)r[rerGr!r-rdc�Z��t�|�||||�|j|_i|_yr�)rr�rar�r_)r�rGrer-rdr�s     �r1r�zConfigOptionsHandler.__init__Vs/���	����W�.B�DU�V�"�+�+��
�+-��r3c�(�|j|d��S)N�;)r�)r�r�s  r1�_parse_list_semicolonz*ConfigOptionsHandler._parse_list_semicolonas�����u���4�4r3c�<�|j||j��S)Nr
)r�r�)r�rXs  r1�_parse_file_in_rootz(ConfigOptionsHandler._parse_file_in_rootes�������
�
��>�>r3rgrXc��|j|j|��}t|||�|D�cgc]}|jd�r�|��c}Scc}w)N�#)r%r'r~ro)r�rgrXrir�s     r1�_parse_requirements_listz-ConfigOptionsHandler._parse_requirements_listhsN���+�+�D�,D�,D�U�,K�L��-�e�U�F�C�"(�D���t���s�/C���D�D��Ds�A�	Ac�&�|j}|j}|j}|j}|||||||j	|d�t|jd�|j|j|j|j|t|d�S)r�zeThe namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).�install_requires)�zip_safe�include_package_datar_�scripts�eager_resources�dependency_links�namespace_packagesr,�setup_requires�
tests_require�packages�entry_points�
py_modules�python_requires�cmdclass)r�r�r��_parse_cmdclassr�rr*r%�_parse_packagesr'r)r�r�
parse_boolr�parse_cmdclasss     r1r�zConfigOptionsHandler.parsersps����%�%�
��%�%�
��%�%�
��-�-��#�$.�%�!�)� *�"&�"A�"A��H�#�!(��-�-�/A�!�#�8�8�!�7�7��,�,� �4�4�$�+�&�-
�	
r3c��|jj}tj|j	|�||j
�Sr�)rdr_rr9r�r�)r�rXr_s   r1r:z$ConfigOptionsHandler._parse_cmdclass�s5���,�,�8�8�����t�/�/��6��T�]�]�S�Sr3c�0�ddg}|j�}||vr|j|�S|j|jj	di��}|j||dk(|j|j��tjdi|��S)zTParses `packages` option value.

        :param value:
        :rtype: list
        zfind:zfind_namespace:z
packages.findr)�
namespacesr��fill_package_dirr�)
r�r��parse_section_packages__findr�r�rcr�r_r�
find_packages)r�rX�find_directives�
trimmed_value�find_kwargss     r1r;z$ConfigOptionsHandler._parse_packages�s���#�$5�6�����
�
���/��#�#�E�*�*��7�7��M�M���o�r�2�
��	���%���);�;��]�]�!�-�-�	�	
��#�#�2�k�2�2r3c���|j||j�}gd�}t|j�D��cgc]\}}||vs�|s�||f��c}}�}|j	d�}|�|d|d<|Scc}}w)z�Parses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        )�where�include�excluderHr)r�r�rRr�r�)r�r��section_data�
valid_keys�kr�rFrHs        r1rBz1ConfigOptionsHandler.parse_section_packages__find�s����2�2�?�D�DT�DT�U��4�
�� ,� 2� 2� 4�N� 4���1��Z��A�a��V� 4�N�
������(����#(��8�K�� ����
Os�A4
�A4
�	A4
c�F�|j||j�}||d<y)z`Parses `entry_points` configuration file section.

        :param dict section_options:
        r6N)r�r��r�r�ris   r1�parse_section_entry_pointsz/ConfigOptionsHandler.parse_section_entry_points�s&��
�,�,�_�d�>N�>N�O��%��^�r3c�d�|j||j�}tj|�Sr�)r�r�r�canonic_package_data)r�r��package_datas   r1�_parse_package_dataz(ConfigOptionsHandler._parse_package_data�s+���2�2�?�D�DT�DT�U���*�*�<�8�8r3c�,�|j|�|d<y)z`Parses `package_data` configuration file section.

        :param dict section_options:
        rSN�rT�r�r�s  r1�parse_section_package_dataz/ConfigOptionsHandler.parse_section_package_data�s��
 $�7�7��H��^�r3c�,�|j|�|d<y)zhParses `exclude_package_data` configuration file section.

        :param dict section_options:
        �exclude_package_dataNrVrWs  r1�"parse_section_exclude_package_dataz7ConfigOptionsHandler.parse_section_exclude_package_data�s��
(,�'?�'?��'P��
#�$r3c�:���j|�fd��}|�d<y)zbParses `extras_require` configuration file section.

        :param dict section_options:
        c�0���jd|�d�|�S)Nzextras_require[r�)r*)rMr�r�s  �r1r�zCConfigOptionsHandler.parse_section_extras_require.<locals>.<lambda>�s����6�6����1�7M�q�Qr3�extras_requireNr�rOs`  r1�parse_section_extras_requirez1ConfigOptionsHandler.parse_section_extras_require�s(���
�5�5��Q�
��
"(��
�r3c��|j||j�}tj||j�|d<y)z^Parses `data_files` configuration file section.

        :param dict section_options:
        �
data_filesN)r�r�r�canonic_data_filesr�rOs   r1�parse_section_data_filesz-ConfigOptionsHandler.parse_section_data_files�s7��
�,�,�_�d�>N�>N�O��#�6�6�v�t�}�}�M��\�r3)r�r�r�rTr�rrr]r�r�r%r'r"r*r�r�r:r;rBrPrTrXr[r_rcrr s@r1r[r[Ss�����N�	.�"�	.�#�	.�#�		.�
"�:�:�	.��5��5�?�E�c�E�#�E��
��
�@T�3�2�*&�9�I�Q�
(�Nr3r[c�(�eZdZdZdZdZed��Zy)rwzAmbiguous requirement marker.z�
    One of the parsed requirements in `{field}` looks like a valid environment marker:

        {req!r}

    Please make sure that the configuration file is correct.
    You can use dangling lines to avoid this problem.
    z'userguide/declarative_config.html#opt-2c�r�d|j��}|j|j|j||��S)Nz%https://setuptools.pypa.io/en/latest/)�see_url�format_args)�	_SEE_DOCS�_format�_SUMMARY�_DETAILS)r�r��docss   r1rzz_AmbiguousMarker.messages2��6�s�}�}�o�F���{�{�3�<�<����t�QS�{�T�Tr3N)r�r�r�rjrkrhr�rzr�r3r1rwrw�s+��.�H��H�:�I��U��Ur3rwc��eZdZdZy)r�z!userguide/declarative_config.htmlN)r�r�r�rhr�r3r1r�r�s��3�Ir3r�)FF)r�F)F)@r�r�rKr;�collectionsrrr�typingrrr	r
rrr
rrrrr�errorsrr�extern.packaging.markersrrt�extern.packaging.requirementsrr�extern.packaging.specifiersr�extern.packaging.versionrr�warningsrr�r�distutils.distrr(r!r"�PathLiker�SingleCommandOptionsr�r#rRr2r6rr*rPr+rCr�r~r8rZr[rwr�r�r3r1�<module>rys���	���	�#���
�
�
�
�,�H�K�6�>�3���3�,�
�c�2�;�;�����E�5����#4�4�5���
�� 4�4�5��	���'M�!N�	O��>C�+��+�	�+�4�n����.��$&�!&�	�
�����%����	�
�� ��<	�F�	��	��E�*>�$?��D��*�+� �+�&�+��:�;�	+�\2��2�#�2�t�2�@^�G�F�O�^�B	JX�M�*@�A�JX�Z\N�=��8�\N�~U�3�U�(4�4�4r3python3.12/site-packages/setuptools/config/__pycache__/pyprojecttoml.cpython-312.pyc000064400000054146151732704210024441 0ustar00�

��_i�C����dZddlZddlZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZddlmZmZddlmZd	d
lmZd	dlmZmZd	dlmZerdd
lmZeeej>fZ ejBe"�Z#de de$fd�Z%de$de de&fd�Z'	d"ddde ddfd�Z(			d#de dedfd�Z)			d$de$dee de&dedde$f
d�Z*Gd�d�Z+d�Z,ede&fd��Z-Gd�dej\�Z/Gd �d!e�Z0y)%ac
Load setuptools configuration from ``pyproject.toml`` files.

**PRIVATE MODULE**: API reserved for setuptools internal usage only.

To read project metadata, consider using
``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
For simple scenarios, you can also try parsing the file directly
with the help of ``tomllib`` or ``tomli``.
�N)�contextmanager)�partial)�
TYPE_CHECKING�Callable�Dict�Mapping�Optional�Set�Union�)�	FileError�InvalidConfigError)�SetuptoolsWarning�)�expand)�_PREVIOUSLY_DEFINED�_MissingDynamic)�apply��Distribution�filepath�returnc�t�ddlm}t|d�5}|j|�cddd�S#1swYyxYw)Nr)�tomli�rb)�setuptools.externr�open�load)rr�files   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/pyprojecttoml.py�	load_filer!s)��'�	
�h��	���z�z�$��
�	�	�s�.�7�configc���ddlm}|jjd�}t	|d�r|j�	|j
|�S#|j$r�}d|j��}|jjd�dk7r4tj|�tj|j�d|j�d	�}t|�d
|���d�d}~wwxYw)Nr)�_validate_pyprojectztrove-classifier�_disable_downloadzconfiguration error: �`�projectzinvalid pyproject.toml config: �.�
)�r$�FORMAT_FUNCTIONS�get�hasattrr%�validate�ValidationError�summary�name�strip�_logger�debug�details�
ValueError)r"r�	validator�trove_classifier�exr0�errors       r r.r.%s���2� �1�1�5�5�6H�I����!4�5��*�*�,�
:��!�!�&�)�)���$�$�:�)�"�*�*��6��
�7�7�=�=����*��M�M�'�"��M�M�"�*�*�%�1�"�'�'��!�<���E�7�"�W�I�.�/�T�9��:�s�A�C&�BC!�!C&�distrc�8�t|d||�}t|||�S)zeApply the configuration from a ``pyproject.toml`` file into an existing
    distribution object.
    T)�read_configuration�_apply)r;r�ignore_option_errorsr"s    r �apply_configurationr@:s$�� ��$�0D�d�
K�F��$���)�)�c���tjj|�}tjj|�st	d|�d���t|�xsi}|j
di�}|j
di�}|j
di�}|r|s|siSd|vrtjd��|r*t|d	d
��|jd|j�n|jdd�||d<||d<t|�5|d|id
�}t||�d
d
d
�|r-tjj|�}	t||	||�S|S#1swY�:xYw)a�Read given configuration file and returns options from it as a dict.

    :param str|unicode filepath: Path to configuration file in the ``pyproject.toml``
        format.

    :param bool expand: Whether to expand directives and other computed values
        (i.e. post-process the given configuration)

    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.

    :param Distribution|None: Distribution object to which the configuration refers.
        If not given a dummy object will be created and discarded after the
        configuration is read. This is used for auto-discovery of packages and in the
        case a dynamic configuration (e.g. ``attr`` or ``cmdclass``) is expanded.
        When ``expand=False`` this object is simply ignored.

    :rtype: dict
    zConfiguration file z does not exist.r'�tool�
setuptools�	distutilsz[tool.distutils])�subject�include_package_dataNzinclude-package-dataT)r'rC)�os�path�abspath�isfiler
r!r,�_ExperimentalConfiguration�emit�getattr�
setdefaultrG�_ignore_errorsr.�dirname�expand_configuration)
rrr?r;�asdict�
project_table�
tool_table�setuptools_table�subset�root_dirs
          r r=r=FsQ��6�w�w���x�(�H�
�7�7�>�>�(�#��-�h�\�9I�J�K�K�
�x�
 �
&�B�F��J�J�y�"�-�M����F�B�'�J�!�~�~�l�B�7���-�+;��	��j� �"�'�'�0B�'�C����4�d�;�G��#�#�$:�D�<U�<U�V��#�#�$:�D�A��F�6�N�/�J�|��	�,�	-�*�\�CS�4T�U�����"�
.�
��7�7�?�?�8�,��#�F�H�6J�D�Q�Q��M�
.�	-�s�E�ErXr?c�:�t||||�j�S)a�Given a configuration with unresolved fields (e.g. dynamic, cmdclass, ...)
    find their final values.

    :param dict config: Dict containing the configuration for the distribution
    :param str root_dir: Top-level directory for the distribution/project
        (the same directory where ``pyproject.toml`` is place)
    :param bool ignore_option_errors: see :func:`read_configuration`
    :param Distribution|None: Distribution object to which the configuration refers.
        If not given a dummy object will be created and discarded after the
        configuration is read. Used in the case a dynamic configuration
        (e.g. ``attr`` or ``cmdclass``).

    :rtype: dict
    )�_ConfigExpanderr)r"rXr?r;s    r rRrR�s��(�6�8�-A�4�H�O�O�Q�QrAc
�f�eZdZ			ddedeedededfd�Zd d	�Zd
ede	de
fd
�Zd!d�Zd�Z
d�Zd�Zdee	e	ffd�Zdddee	e	ffd�Zddde	fd�Zde	dee	e	ffd�Zddde	dee	e	ffd�Zdddee	e	ffd�Zdddeee	e	ffd�Zdddee	e	fdeee	effd�Zd"d�Zd"d�Zd"d�Zy)#rZNr"rXr?r;rc��||_|xstj�|_|j	di�|_|j
j	dg�|_|j	di�j	di�|_|jj	di�|_||_	||_
t�|_y)Nr'�dynamicrCrD)
r"rH�getcwdrXr,�project_cfgr]�setuptools_cfg�dynamic_cfgr?�_dist�set�_referenced_files)�selfr"rXr?r;s     r �__init__z_ConfigExpander.__init__�s������ �/�B�I�I�K��
�!�:�:�i��4����'�'�+�+�I�r�:���$�j�j���4�8�8��r�J����.�.�2�2�9�b�A���$8��!���
�+.�5��rArc��ddlm}|j|jj	dd�d�}|j
xs||�S)Nrrr1)�src_rootr1)�setuptools.distrrXr_r,rb)rer�attrss   r �_ensure_distz_ConfigExpander._ensure_dist�s;��0�!�]�]�D�4D�4D�4H�4H��QU�4V�W���z�z�0�\�%�0�0rA�	container�field�fnc�~�||vr-t|j�5|||�||<ddd�yy#1swYyxYw�N)rPr?)rerlrmrns    r �_process_fieldz_ConfigExpander._process_field�s@���I���� 9� 9�:�#%�i��&6�#7�	�%� �;�:��:�:�s�3�<c�d�|jj|i�}tj|�Srp)r`r,�_expand�canonic_package_data)rerm�package_datas   r �_canonic_package_dataz%_ConfigExpander._canonic_package_data�s+���*�*�.�.�u�b�9���+�+�L�9�9rAc���|j�|j�|jd�|j�}t||j|j
�}|5}|j}|j�|j|�|j||�ddd�|jj|j�|jS#1swY�:xYw)Nzexclude-package-data)
�_expand_packagesrvrk�_EnsurePackagesDiscoveredr_r`�package_dir�_expand_data_files�_expand_cmdclass�_expand_all_dynamicrd�updater")rer;�ctx�ensure_discoveredrzs     r rz_ConfigExpander.expand�s��������"�"�$��"�"�#9�:�� � �"��'��d�.>�.>��@S�@S�T��
�%�+�7�7�K��#�#�%��!�!�+�.��$�$�T�;�7�	�	
���%�%�d�&<�&<�=��{�{���S�s
�%AC�C'c��|jjd�}|�t|ttf�ry|jd�}t|t
�ro|j|d<|jjdi�|d<t|j�5tjdi|��|jd<ddd�yy#1swYyxYw)N�packages�findrX�package-dir�fill_package_dir�)r`r,�
isinstance�list�tuple�dictrXrOrPr?rs�
find_packages)rer�r�s   r rxz _ConfigExpander._expand_packages�s����&�&�*�*�:�6����z�(�T�5�M�B���|�|�F�#���d�D�!�#�}�}�D���'+�':�':�'E�'E�m�UW�'X�D�#�$��� 9� 9�:�29�2G�2G�2O�$�2O��#�#�J�/�;�:�"�;�:�s�#C�Cc��ttj|j��}|j	|j
d|�y)N)rXz
data-files)rrs�canonic_data_filesrXrqr`)re�
data_filess  r r{z"_ConfigExpander._expand_data_files�s0���W�7�7�$�-�-�P�
����D�/�/��z�JrArzc��|j}ttj||��}|j	|j
d|�y)N)rzrX�cmdclass)rXrrsr�rqr`)rerzrXr�s    r r|z _ConfigExpander._expand_cmdclass�s7���=�=���7�+�+��x�X�����D�/�/��X�FrAc
���d}|jD�cic]}||vr||j|||���}}|j|j||�xsi|j	||�|j|�|j
|�|j|�|j|���|j�D��cic]\}}|��	||��
}}}|jj|�ycc}wcc}}w)N)�version�readme�entry-points�scripts�gui-scripts�classifiers�dependencies�optional-dependencies)r�r�r�r��optional_dependencies)r]�_obtainr~�_obtain_entry_points�_obtain_version�_obtain_readme�_obtain_classifiers�_obtain_dependencies�_obtain_optional_dependencies�itemsr_)	rer;rz�specialrm�obtained_dynamic�k�v�updatess	         r r}z#_ConfigExpander._expand_all_dynamic�s��	
�����
�%���G�#�
�4�<�<��e�[�9�9�%�	�
�
	����%�%�d�K�8�>�B��(�(��{�;��&�&�t�,��0�0��6��2�2�4�8�"&�"D�"D�T�"J�
	 �	
�%5�$:�$:�$<�N�$<�D�A�q��
�1�a�4�$<��N�������(��!
��Os�C+�<
C0�C0c�`�t||�}|�|jsd|�d�}t|��yy)Nz#No configuration found for dynamic z�.
Some dynamic fields need to be specified via `tool.setuptools.dynamic`
others must be specified via the equivalent attribute in `setup.py`.)rr?r)rer;rm�previous�msgs     r �_ensure_previously_setz&_ConfigExpander._ensure_previously_setsL��&�u�-�d�3����D�$=�$=�5�e�Y�?Y�Y�
�
%�S�)�)�
%>�rA�	specifierc�n�ddlm}t|j�5|j}d|vrF|j
j
||d��tj|d|�cddd�Sd|vr#tj|d||�cddd�Std|�d|����#1swYyxYw)Nr)�always_iterabler�attrz	invalid `z`: )� setuptools.extern.more_itertoolsr�rPr?rXrdr~rs�
read_files�	read_attrr6)rer��	directiverzr�rXs      r �_expand_directivez!_ConfigExpander._expand_directives���	E�
�D�5�5�
6��}�}�H���"��&�&�-�-�o�i��>O�.P�Q��)�)�)�F�*;�X�F�	7�
6�
��"��(�(��6�):�K��R�
7�
6��y���3�y�m�D�E�E�7��s�A
B+�3B+�B+�+B4c��||jvr#|jd|��|j||�S|j||�y)Nztool.setuptools.dynamic.)rar�r�)rer;rmrzs    r r�z_ConfigExpander._obtainsS���D�$�$�$��)�)�*�5�'�2�� � ��'���
�
	
�#�#�D�%�0�rAc��d|jvr4d|jvr&tj|j	|d|��Sy)Nr�)r]rarsr�r�)rer;rzs   r r�z_ConfigExpander._obtain_version's:������$��d�6F�6F�)F��?�?�4�<�<��i��#M�N�N�rAc��d|jvry|j}d|vr)|j|di�|djdd�d�S|j	|d�y)Nr��content-typez
text/x-rst)�textr�)r]rar�r,r�)rer;ras   r r�z_ConfigExpander._obtain_readme-sh���4�<�<�'���&�&���{�"����T�8�R�8� +�H� 5� 9� 9�.�,� W��
�
	
�#�#�D�(�3�rAc������d}t�fd�|D��sy�j|d|�}|�ytj|��d�i�dtdtf���fd�}|dd�|d	d
��S)N)r�r�r�c3�:�K�|]}|�jv���y�wrp)r])�.0rmres  �r �	<genexpr>z7_ConfigExpander._obtain_entry_points.<locals>.<genexpr>?s�����=�f�U�5�D�L�L�(�f�s�r�rm�groupc���|�vrD�j|�}|�jvrttj||���|�|<yyrp)�popr]rrr5)rmr��value�expanded�groupsres   ���r �_set_scriptsz:_ConfigExpander._obtain_entry_points.<locals>._set_scriptsIsJ�������
�
�5�)������,�,�_�-D�-D�U�E�-R�S�S�"'����	rAr��console_scriptsr��gui_scripts)�anyr�rs�entry_points�str)rer;rz�fieldsr�r�r�r�s`     @@r r�z$_ConfigExpander._obtain_entry_points;s~���<���=�f�=�=���|�|�D�.�+�>���<���%�%�d�+��"�F�+��	(��	(�C�	(�	�Y� 1�2��]�M�2��rAc�j�d|jvr%|j|di�}|r|j�Sy)Nr�)r]r��
splitlines�rer;r�s   r r�z#_ConfigExpander._obtain_classifiersUs5���D�L�L�(��L�L��}�b�9�E���'�'�)�)�rAc�`�d|jvr |j|di�}|rt|�Sy)Nr�)r]r��_parse_requirements_listr�s   r r�z$_ConfigExpander._obtain_dependencies\s1���T�\�\�)��L�L��~�r�:�E��/��6�6�rAc�2�d|jvryd|jvrb|jd}t|t�sJ�|j	�D��cic]%\}}|t|j
d|��|i����'c}}S|j|d�ycc}}w)Nr�z.tool.setuptools.dynamic.optional-dependencies.)r]rar�r�r�r�r�r�)rer;�optional_dependencies_mapr�r�s     r r�z-_ConfigExpander._obtain_optional_dependenciescs���"�$�,�,�6��"�d�&6�&6�6�(,�(8�(8�9P�(Q�%��7��>�>�>�)B�(G�(G�(I�	�)J�$�E�9��/��*�*�H���P�!�����)J�	�	
�	
�#�#�D�*A�B���	s�*B�NFN)rr)zpackage-data)r;r)�__name__�
__module__�__qualname__r�r	�_Path�boolrfrkr�rrqrvrrxr{rr|r}r�r�r�r�rr�r�r�r�r�r�rAr rZrZ�s}��%)�%*�)-�1��1��5�/�1�#�	1�
�~�&�1�"1�8��8�S�8�h�8�
:��"
P�K�G�G�C��H�,=�G�
)��)�W�S�RU�X�EV�)�<*�>�*�#�*�
��
�6=�c�3�h�6G�
��N��3��W�S�RU�X�EV���N����c��AR���>��h�t�C��H�~�6N���"��18��c��1B��	�$�s�D�y�/�	"��4��rArZc��|j�D�cgc]3}|j�r!|j�jd�s|��5c}Scc}w)N�#)r�r2�
startswith)r��lines  r r�r�wsN���$�$�&��&�D��:�:�<��
�
�� 7� 7�� <�	
�&����s�8Ac#�K�|sd��y	d��y#t$r9}tjd|jj�d|���Yd}~yd}~wwxYw�w)Nzignored error: z - )�	Exceptionr3r4�	__class__r�)r?r9s  r rPrPsP�����
��H�
���H��
�
�����(=�(=�'>�c�"��F�G�G��H�s*�A��A�	A�/A
�A�
A�Ac�@��eZdZdddedef�fd�Z�fd�Z�fd�Z�xZS)ry�distributionrr_r`c�@��t�|�|�||_||_yrp)�superrf�_project_cfg�_setuptools_cfg)rer�r_r`r�s    �r rfz"_EnsurePackagesDiscovered.__init__�s"���	����&�'���-��rAc���|j|j}}|jdi�}|j|jxsi�||_|j
j
�|jj�*|jjd�|j_|j�|jd�|_|j�|jd�|_t�|�9�S)z�When entering the context, the values of ``packages``, ``py_modules`` and
        ``package_dir`` that are missing in ``dist`` are copied from ``setuptools_cfg``.
        r�r1�
py-modulesr�)rbr�rOr~rz�set_defaults�_ignore_ext_modules�metadatar1r�r,�
py_modulesr�r��	__enter__)rer;�cfgrzr�s    �r r�z#_EnsurePackagesDiscovered.__enter__�s�����J�J�� 4� 4�c��&)�n�n�]�B�&G�����4�+�+�1�r�2�&������-�-�/��=�=���%�!%�!2�!2�!6�!6�v�!>�D�M�M���?�?�"�!�g�g�l�3�D�O��=�=� ��G�G�J�/�D�M��w� �"�"rAc����|jjd|jj�|jjd|jj�t
�|�|||�S)z�When exiting the context, if values of ``packages``, ``py_modules`` and
        ``package_dir`` are missing in ``setuptools_cfg``, copy from ``dist``.
        r�r�)r�rOrbr�r�r��__exit__)re�exc_type�	exc_value�	tracebackr�s    �r r�z"_EnsurePackagesDiscovered.__exit__�sY���
	
���'�'�
�D�J�J�4G�4G�H����'�'��d�j�j�6K�6K�L��w���)�Y�?�?rA)r�r�r�r�rfr�r��
__classcell__)r�s@r ryry�s1���.�*�.�9=�.�OS�.�#�,@�@rAryc��eZdZdZy)rLz``{subject}` in `pyproject.toml` is still *experimental* and likely to change in future releases.N)r�r�r��_SUMMARYr�rAr rLrL�s��	3�
rArL)F)TFNr�)1�__doc__�loggingrH�
contextlibr�	functoolsr�typingrrrrr	r
r�errorsr
r�warningsrr*rrs�_apply_pyprojecttomlrrrr>rirr��PathLiker��	getLoggerr�r3r�r!r�r.r@r=rRrZr�rP�EnsurePackagesDiscoveredryrLr�rAr �<module>rss��	��	�%��O�O�O�2�(��F�1��,�
�c�2�;�;����
�'�
�
�H�
%�� �� �$� �:�T�:�U�:�t�:�0�	*�
�	*��	*��		*���%)�	?��?��>�
"�	?�H!%�!&�%)�	R��R��u�o�R��R��>�
"�	R�

�R�.U�U�p��H��H��H�%@�� @� @�%@�P�!2�rApython3.12/site-packages/setuptools/config/__pycache__/_apply_pyprojecttoml.cpython-312.pyc000064400000050273151732704210026002 0ustar00�

��_i�9���UdZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
ddlmZdd	lmZmZmZmZmZmZmZmZmZmZmZd
dlmZd
dlmZerdd
l m!Z!ddl"m#Z#ei�Z$ee%d<eejLe'fZ(ee)e'fZ*edee(gdfZ+ee'e+fZ,ejZe.�Z/ddde)de(ddfd�Z0ddde)de(fd�Z1ddde)de(fd�Z2ddde)fd�Z3de'de'fd�Z4ddde'defd�Z5d d!d"d#�Z6d$e'dee'fd%�Z7ddd&e*de(fd'�Z8ddd&e)de(fd(�Z9ddd&ee)d)e(d*e'fd+�Z:ddd&e)fd,�Z;ddd&e)fd-�Z<ddd&e=fd.�Z>ddd&e)fd/�Z?de)fd0�Z@d1e)ddde(fd2�ZAe$fd3edee'ee'ffd4�ZBd5d6deee'effd7�ZCd8e'de'fd9�ZDd:eee'ee'e'fdee'fd;�ZEdddee'e=ffd<�ZFdddee=fd=�ZGdddee=fd>�ZHd?�ZId@�ZJe8e9ee:dA�B�ee:dC�B�e;e>e?e<dD�ZKee'e,fe%dE<dFdGiZLdHdIiZMhdJ�ZNid8eIdK��dLeIdM��dNeIdO��dPeIdQ��dReJdSdT��dUeIdV��dWeJdXdY��dZeJd[d\��d]eId^��d_eId`��daeIdb��dceF�dGeG�ddeH�deeIdf��dgeIdh��ZOiggggiiiiggdi�ZPe)e%dj<Gdk�dle�ZQy)makTranslation layer between pyproject config and setuptools distribution and
metadata objects.

The distribution and metadata objects are modeled after (an old version of)
core metadata, therefore configs in the format specified for ``pyproject.toml``
need to be processed before being applied.

**PRIVATE MODULE**: API reserved for setuptools internal usage only.
�N)�Mapping)�Address)�partial�reduce)�cleandoc)�chain)�MappingProxyType)�
TYPE_CHECKING�Any�Callable�Dict�List�Optional�Set�Tuple�Type�Union�cast�)�RemovedConfigError)�SetuptoolsWarning��metadata��Distribution�EMPTYr�dist�config�filename�returnc�z�|s|Stjj|�xsd}t|||�t	|||�tj
�}tj|�	|j�|j�tj|�|S#tj|�wxYw)z=Apply configuration dict read with :func:`read_configuration`�.)	�os�path�dirname�_apply_project_table�_apply_tool_table�getcwd�chdir�_finalize_requires�_finalize_license_files)rrr�root_dir�current_directorys     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py�applyr/0s�������w�w���x�(�/�C�H���v�x�0��d�F�H�-��	�	����H�H�X��$����!��$�$�&�
���"�#��K��	���"�#�s�, B#�#B:r,c�0�|jdi�j�}|syt||�t|�|j	�D]I\}}t|�}tj||�}t|�r||||��=t|||��Ky)N�project)	�get�copy�_handle_missing_dynamic�_unify_entry_points�items�json_compatible_key�PYPROJECT_CORRESPONDENCE�callable�_set_config)rrr,�
project_table�field�value�norm_key�corresps        r.r&r&Fs����J�J�y�"�-�2�2�4�M����D�-�0��
�&�%�+�+�-���u�&�u�-��*�.�.�x��B���G���D�%��*���g�u�-�
.�c�~�|jdi�jdi�}|sy|j�D]x\}}t|�}|tvr=t	t|�}d|�d�}tdj
t	|�|g���tj||�}t|||��zt|||�y)N�tool�
setuptoolsz,
            The parameter `tool.setuptools.zZ` was long deprecated
            and has been removed from `pyproject.toml`.
            �
)
r2r6r7�TOOL_TABLE_REMOVALSrr�join�TOOL_TABLE_RENAMESr:�_copy_command_options)	rrr�
tool_tabler<r=r>�
suggestion�msgs	         r.r'r'Ws������F�B�'�+�+�L�"�=�J���"�(�(�*���u�&�u�-���*�*�!�"5�h�"?�@�J�,�,1�7�3
��C�%�T�Y�Y���
�z�/J�%K�L�L�%�)�)�(�H�=���D�(�E�*�+��&�$��1r@r;c��t|jdg��}tj�D]I\}}||vr�||vr�||�}|s�tj||��tj|�||<�Ky)zJBe temporarily forgiving with ``dynamic`` fields not listed in ``dynamic``�dynamic�r<r=N)�setr2�_PREVIOUSLY_DEFINEDr6�_MissingDynamic�emit�_RESET_PREVIOUSLY_DEFINED)rr;rMr<�getterr=s      r.r4r4mss���-�#�#�I�r�2�3�G�,�2�2�4�
��v���&�%�7�*:��4�L�E���$�$�5��$�>�'@�'D�'D�U�'K�
�e�$�5r@�keyc�B�|j�jdd�S)z1As defined in :pep:`566#json-compatible-metadata`�-�_)�lower�replace)rUs r.r7r7xs���9�9�;���s�C�(�(r@r<r=c���t|jd|��d�}|r	||�yt|j|�s|tvrt	|j||�yt	|||�y)N�set_)�getattrr�hasattr�SETUPTOOLS_PATCHES�setattr)rr<r=�setters    r.r:r:}sV��
�T�]�]�d�5�'�N�D�
9�F�
��u�
�	�����	&�%�3E�*E���
�
�u�e�,���e�U�#r@z
text/markdownz
text/x-rstz
text/plain)z.mdz.rstz.txt�filec��tjj|j��\}}|sy|tvr	t|Sdjd�tj
�D��}d|�d�}td|�d|����)N�, c3�2K�|]\}}|�d|�d����y�w)z (�)N�)�.0�k�vs   r.�	<genexpr>z&_guess_content_type.<locals>.<genexpr>�s#����F�/E�t�q�!���2�a�S��l�/E���z3only the following file extensions are recognized: r"zUndefined content type for )r#r$�splitextrY�_CONTENT_TYPESrFr6�
ValueError)rbrX�ext�validrKs     r.�_guess_content_typerr�s}��
�W�W�
�
�d�j�j�l�
+�F�A�s���
�n���c�"�"��I�I�F�~�/C�/C�/E�F�F�E�?��w�a�
H�C�
�2�4�&��3�%�@�
A�Ar@�valc�~�ddlm}t|t�r |}|j	||�}t|�}n?|j
d�xsg}|j
d�xs|j	||�}|d}t|d|�|r
t|d|�|r*|jjtt|��yy)Nr��expandrb�textzcontent-type�long_description�long_description_content_type)�setuptools.configrv�
isinstance�str�
read_filesrrr2r:�_referenced_files�addr)rrsr,rvrbrw�ctypes       r.�_long_descriptionr��s���(��#�s��!$��� � ��x�0��#�C�(���w�w�v��$�"���w�w�v��C�&�"3�"3�D�(�"C���N�#����(�$�/���D�9�5�A�����"�"�4��T�?�3�r@c��ddlm}d|vr@t|d|j|dg|��|jj|d�yt|d|d�y)Nrrurb�licenserw)rzrvr:r}r~r)rrsr,rvs    r.�_licenser��sS��(�
��}��D�)�V�%6�%6��F��}�h�%O�P����"�"�3�v�;�/��D�)�S��[�1r@�	_root_dir�kindc�X�g}g}|D]a}d|vr|j|d��d|vr|j|d��5t|d|d��}|jt|���c|rt||dj	|��|r t||�d�dj	|��yy)N�name�email)�display_name�	addr_specrd�_email)�appendrr|r:rF)rrsr�r�r<�email_field�person�addrs        r.�_peopler��s����E��K���������v�g��/�
�F�
"��L�L����(���v��&��/�R�D����s�4�y�)��
��D�$��	�	�%� 0�1���D�T�F�&�/�4�9�9�[�+A�B�r@c��t|d|�y)N�project_urls)r:)rrsr�s   r.�
_project_urlsr��s����n�c�*r@c�6�ddlm}t|d||��y)Nr)�SpecifierSet�python_requires)�&setuptools.extern.packaging.specifiersr�r:)rrsr�r�s    r.�_python_requiresr��s��C���'��c�):�;r@c�Z�t|dg�rd}tj|�||_y)N�install_requireszA`install_requires` overwritten in `pyproject.toml` (dependencies))r]rrRr�)rrsr�rKs    r.�
_dependenciesr��s*���t�'��,�Q�����s�#��D�r@c�<�t|dd�xsi}i|�|�|_y)N�extras_require)r]r�)rrsr��existings    r.�_optional_dependenciesr��s(���t�-�t�4�:��H�-�X�-��-�D�r@c��|}|jd|jdi��}ddd�}t|j��D],\}}t|�}||vs�|j|�|||<�.|rT|j�D���	�
cic]0\}}|r)||j�D�	�
cgc]\}	}
|	�d|
����c}
}	��2c}
}	}}|d<yycc}
}	wcc}
}	}}w)N�entry-points�entry_points�console_scripts�gui_scripts)�scriptsr�z = )�pop�listr6r7)r;r1r��renamingrUr=r>r��grouprirjs           r.r5r5�s����G��;�;�~�w�{�{�>�2�/N�O�L�,�]�K�H��7�=�=�?�+�
��U�&�s�+���x��/6�{�{�3�/?�L��(�+�,�	,�� ,�1�1�3�#
�3���e��
�E�K�K�M�:�M�D�A�q�a�S��A�3�<�M�:�:�3�#
������:��#
s�	C
�'C	�8C
�	C
�	pyprojectc	�&�|jdi�}|jdi�jdi�}t|�}|j}|jdi�jdi�j�D]�\}}t	|�}|j|t��}	|j
|i�|j�D]D\}
}t	|
�}
t|�|f|||
<|
|	vs�)tjd|�d|
�d���F��y)NrBrC�cmdclass�	distutilszCommand option r"z is not defined)
r2�_valid_command_options�command_optionsr6r7rO�
setdefaultr|�_logger�warning)r�rrrIr��
valid_options�cmd_opts�cmdrrqrUr=s            r.rHrH�s������v�r�*�J��~�~�l�B�/�3�3�J��C�H�*�8�4�M��#�#�H� �}�}�V�R�0�4�4�[�"�E�K�K�M���V�!�#�&���!�!�#�s�u�-�����C��$� �,�,�.�J�C��%�c�*�C�"%�h�-��!7�H�S�M�#���%�����/�#��a��u�O� L�M�
)�	Nr@r�c	�J�ddlm}ddlm}dt	|j
�i}|jd��}d�|D�}d	�|D�}t||j��D]=\}}|j|t��}	|	t	t|d
g��z}	|	||<�?|S)Nrrrr�globalzdistutils.commands)r�c3�2K�|]}t|����y�w�N)�_load_ep�rh�eps  r.rkz)_valid_command_options.<locals>.<genexpr>s����H�2G�B�8�B�<�2G�rlc3�&K�|]	}|s�|���y�wr�rgr�s  r.rkz)_valid_command_options.<locals>.<genexpr>s����;�!4�2��B�!4�����user_options)�
_importlibr�setuptools.distr�_normalise_cmd_options�global_optionsr�rr6r2rOr])
r�rrr��unloaded_entry_points�loaded_entry_pointsr�r��	cmd_class�optss
          r.r�r�	s���%�,��5�l�6Q�6Q�R�S�M�1�H�1�1�8L�M��H�2G�H��;�!4�;�L���h�n�n�.>�?���Y�� � ��c�e�,���,�W�Y��PR�-S�T�T��!�
�c��@�
�r@r�zmetadata.EntryPointc���	|j|j�fS#t$rI}|jj�d|j��}t
j
|�d|���Yd}~yd}~wwxYw)Nz" while trying to load entry-point z: )r��load�	Exception�	__class__�__name__r�r�)r��exrKs   r.r�r�se����������#�#�������&�&�'�'I�"�'�'��S�����3�%�r�"���'����s��	A0�?A+�+A0r�c�6�t|�jd�S)Nz_=)r7�strip)r�s r.�_normalise_cmd_option_keyr�$s���t�$�*�*�4�0�0r@�descc�D�|D�chc]}t|d���c}Scc}w)Nr)r�)r��fancy_options  r.r�r�(s$��KO�P�4�<�%�l�1�o�6�4�P�P��Ps�c��d}t|dd�xsi}|j�D��cic]
\}}||vs�||��c}}Scc}}w)N)r�r�r�)r]r6)r�ignorer=rirjs     r.�_get_previous_entrypointsr�,sF��
/�F��D�.�$�/�5�2�E�"�[�[�]�>�]�T�Q��a�v�o�A�q�D�]�>�>��>s�=�=c�F�t|dd�xsi}|jd�S)Nr�r��r]r2�rr=s  r.�_get_previous_scriptsr�2s%���D�.�$�/�5�2�E��9�9�&�'�'r@c�F�t|dd�xsi}|jd�S)Nr�r�r�r�s  r.�_get_previous_gui_scriptsr�7s$���D�.�$�/�5�2�E��9�9�]�#�#r@c�D�ttd�|jd��S)a8
    Similar to ``operator.attrgetter`` but returns None if ``attr`` is not found
    >>> from types import SimpleNamespace
    >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13))
    >>> _attrgetter("a")(obj)
    42
    >>> _attrgetter("b.c")(obj)
    13
    >>> _attrgetter("d")(obj) is None
    True
    c��t||d�Sr�)r])�acc�xs  r.�<lambda>z_attrgetter.<locals>.<lambda>Hs
��'�#�q�$�*?r@r")rr�split)�attrs r.�_attrgetterr�<s���6�?����C��Q�Qr@c����fd�}|S)aL
    Return the first "truth-y" attribute or None
    >>> from types import SimpleNamespace
    >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13))
    >>> _some_attrgetter("d", "a", "b.c")(obj)
    42
    >>> _some_attrgetter("d", "e", "b.c", "a")(obj)
    13
    >>> _some_attrgetter("d", "e", "f")(obj) is None
    True
    c�B����fd��D�}td�|D�d�S)Nc3�@�K�|]}t|������y�wr�)r�)rh�i�objs  �r.rkz5_some_attrgetter.<locals>._acessor.<locals>.<genexpr>Ys�����5�u�!�.�+�a�.��%�u�s�c3�&K�|]	}|��|���y�wr�rg)rhr�s  r.rkz5_some_attrgetter.<locals>._acessor.<locals>.<genexpr>Zs����8��1�!�-�Q��r�)�next)r��valuesr6s` �r.�_acessorz"_some_attrgetter.<locals>._acessorXs ���5�u�5���8��8�$�?�?r@rg)r6r�s` r.�_some_attrgetterr�Ks���@��Or@�author)r��
maintainer)�readmer��authors�maintainers�urls�dependencies�optional_dependencies�requires_pythonr8�script_filesr��namespace_packagesz�
        Please migrate to implicit native namespaces instead.
        See https://packaging.python.org/en/latest/guides/packaging-namespace-packages/.
        >�license_filer��
license_files�provides_extrasryz
metadata.name�versionzmetadata.version�descriptionzmetadata.descriptionr�zmetadata.long_descriptionzrequires-pythonr�zmetadata.python_requiresr�zmetadata.licenser�zmetadata.authorzmetadata.author_emailr�zmetadata.maintainerzmetadata.maintainer_email�keywordszmetadata.keywords�classifierszmetadata.classifiersr�zmetadata.project_urlsr��gui-scriptsr�r��optional-dependenciesr�)r�r�r�rrr�r�r�rr�rrSc�2�eZdZdZdZedededefd��Zy)rQz9`{field}` defined outside of `pyproject.toml` is ignored.a
    The following seems to be defined outside of `pyproject.toml`:

    `{field} = {value!r}`

    According to the spec (see the link below), however, setuptools CANNOT
    consider this value unless `{field}` is listed as `dynamic`.

    https://packaging.python.org/en/latest/specifications/declaring-project-metadata/

    To prevent this problem, you can list `{field}` under `dynamic` or alternatively
    remove the `[project]` table from your file and rely entirely on other means of
    configuration.
    r<r=r c�<�|jj||��S)NrN)�_DETAILS�format)�clsr<r=s   r.�detailsz_MissingDynamic.details�s���|�|�"�"��e�"�<�<r@N)	r��
__module__�__qualname__�_SUMMARYr�classmethodr|rr	rgr@r.rQrQ�s7��J�H�
�H�$�=�C�=��=��=��=r@rQ)R�__doc__�loggingr#�collections.abcr�email.headerregistryr�	functoolsrr�inspectr�	itertoolsr�typesr	�typingr
rrr
rrrrrrr�errorsr�warningsr�setuptools._importlibrr�rr�__annotations__�PathLiker|�_Path�dict�
_DictOrStr�
_CorrespFn�_Correspondence�	getLoggerr�r�r/r&r'r4r7r:rnrrr�r�r�r�r�r�r�r�r5rHr�r�r�r�r�r�r�r�r�r8rGrEr_rPrSrQrgr@r.�<module>r"s�����	�#�(�%���"�����(�(��.�,�!�"�%��w�%�
�b�k�k�3����
�4��9�
�
�
�~�s�E�2�D�8�
9�
���Z��(��
�'�
�
�H�
%���������.��,.�~�.�t�.�u�.�"2�N�2�D�2�E�2�,L�.�L��L�)�S�)�S�)�
$�n�$�S�$��$������
B�c�
B�h�s�m�
B�4�N�4��4�u�4�*2�>�2��2��2�C�.�C�t�D�z�C�e�C�3�C�$+��+�T�+�<�>�<��<� �� �T� �.��.�d�.�

�t�
�(N�T�N��N�5�N�&05��W���c�3�s�8�m�9L��"�&��8�E�#�t�)�4D�+E��1�C�1�C�1�Q��e�C��#���,C�&D�!E�Q�#�c�(�Q�?�N�?�t�C��I��?�(��(�8�D�>�(�
$�N�$�x��~�$�
R��* ���w�X�.��7��6��!�3�'�	8��$�s�O�3�4�	�%�i�0���������
�K��(��
�{�-�.���;�5�6��
�k�5�6�	�
�'�(9�;U�V���{�-�.�
��� 1�3J�K���#�$9�;V�W����/�0���;�5�6���K�/�0���-���$���,���K� 2�3�� �[�)9�:�!��.�����������#��4��"=�'�=r@python3.12/site-packages/setuptools/config/_validate_pyproject/formats.py000064400000021710151732704210022656 0ustar00import logging
import os
import re
import string
import typing
from itertools import chain as _chain

if typing.TYPE_CHECKING:
    from typing_extensions import Literal

_logger = logging.getLogger(__name__)

# -------------------------------------------------------------------------------------
# PEP 440

VERSION_PATTERN = r"""
    v?
    (?:
        (?:(?P<epoch>[0-9]+)!)?                           # epoch
        (?P<release>[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P<pre>                                          # pre-release
            [-_\.]?
            (?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P<pre_n>[0-9]+)?
        )?
        (?P<post>                                         # post release
            (?:-(?P<post_n1>[0-9]+))
            |
            (?:
                [-_\.]?
                (?P<post_l>post|rev|r)
                [-_\.]?
                (?P<post_n2>[0-9]+)?
            )
        )?
        (?P<dev>                                          # dev release
            [-_\.]?
            (?P<dev_l>dev)
            [-_\.]?
            (?P<dev_n>[0-9]+)?
        )?
    )
    (?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
"""

VERSION_REGEX = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.X | re.I)


def pep440(version: str) -> bool:
    return VERSION_REGEX.match(version) is not None


# -------------------------------------------------------------------------------------
# PEP 508

PEP508_IDENTIFIER_PATTERN = r"([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])"
PEP508_IDENTIFIER_REGEX = re.compile(f"^{PEP508_IDENTIFIER_PATTERN}$", re.I)


def pep508_identifier(name: str) -> bool:
    return PEP508_IDENTIFIER_REGEX.match(name) is not None


try:
    try:
        from packaging import requirements as _req
    except ImportError:  # pragma: no cover
        # let's try setuptools vendored version
        from setuptools._vendor.packaging import requirements as _req  # type: ignore

    def pep508(value: str) -> bool:
        try:
            _req.Requirement(value)
            return True
        except _req.InvalidRequirement:
            return False

except ImportError:  # pragma: no cover
    _logger.warning(
        "Could not find an installation of `packaging`. Requirements, dependencies and "
        "versions might not be validated. "
        "To enforce validation, please install `packaging`."
    )

    def pep508(value: str) -> bool:
        return True


def pep508_versionspec(value: str) -> bool:
    """Expression that can be used to specify/lock versions (including ranges)"""
    if any(c in value for c in (";", "]", "@")):
        # In PEP 508:
        # conditional markers, extras and URL specs are not included in the
        # versionspec
        return False
    # Let's pretend we have a dependency called `requirement` with the given
    # version spec, then we can reuse the pep508 function for validation:
    return pep508(f"requirement{value}")


# -------------------------------------------------------------------------------------
# PEP 517


def pep517_backend_reference(value: str) -> bool:
    module, _, obj = value.partition(":")
    identifiers = (i.strip() for i in _chain(module.split("."), obj.split(".")))
    return all(python_identifier(i) for i in identifiers if i)


# -------------------------------------------------------------------------------------
# Classifiers - PEP 301


def _download_classifiers() -> str:
    import ssl
    from email.message import Message
    from urllib.request import urlopen

    url = "https://pypi.org/pypi?:action=list_classifiers"
    context = ssl.create_default_context()
    with urlopen(url, context=context) as response:
        headers = Message()
        headers["content_type"] = response.getheader("content-type", "text/plain")
        return response.read().decode(headers.get_param("charset", "utf-8"))


class _TroveClassifier:
    """The ``trove_classifiers`` package is the official way of validating classifiers,
    however this package might not be always available.
    As a workaround we can still download a list from PyPI.
    We also don't want to be over strict about it, so simply skipping silently is an
    option (classifiers will be validated anyway during the upload to PyPI).
    """

    downloaded: typing.Union[None, "Literal[False]", typing.Set[str]]

    def __init__(self):
        self.downloaded = None
        self._skip_download = False
        # None => not cached yet
        # False => cache not available
        self.__name__ = "trove_classifier"  # Emulate a public function

    def _disable_download(self):
        # This is a private API. Only setuptools has the consent of using it.
        self._skip_download = True

    def __call__(self, value: str) -> bool:
        if self.downloaded is False or self._skip_download is True:
            return True

        if os.getenv("NO_NETWORK") or os.getenv("VALIDATE_PYPROJECT_NO_NETWORK"):
            self.downloaded = False
            msg = (
                "Install ``trove-classifiers`` to ensure proper validation. "
                "Skipping download of classifiers list from PyPI (NO_NETWORK)."
            )
            _logger.debug(msg)
            return True

        if self.downloaded is None:
            msg = (
                "Install ``trove-classifiers`` to ensure proper validation. "
                "Meanwhile a list of classifiers will be downloaded from PyPI."
            )
            _logger.debug(msg)
            try:
                self.downloaded = set(_download_classifiers().splitlines())
            except Exception:
                self.downloaded = False
                _logger.debug("Problem with download, skipping validation")
                return True

        return value in self.downloaded or value.lower().startswith("private ::")


try:
    from trove_classifiers import classifiers as _trove_classifiers

    def trove_classifier(value: str) -> bool:
        return value in _trove_classifiers or value.lower().startswith("private ::")

except ImportError:  # pragma: no cover
    trove_classifier = _TroveClassifier()


# -------------------------------------------------------------------------------------
# Stub packages - PEP 561


def pep561_stub_name(value: str) -> bool:
    top, *children = value.split(".")
    if not top.endswith("-stubs"):
        return False
    return python_module_name(".".join([top[: -len("-stubs")], *children]))


# -------------------------------------------------------------------------------------
# Non-PEP related


def url(value: str) -> bool:
    from urllib.parse import urlparse

    try:
        parts = urlparse(value)
        if not parts.scheme:
            _logger.warning(
                "For maximum compatibility please make sure to include a "
                "`scheme` prefix in your URL (e.g. 'http://'). "
                f"Given value: {value}"
            )
            if not (value.startswith("/") or value.startswith("\\") or "@" in value):
                parts = urlparse(f"http://{value}")

        return bool(parts.scheme and parts.netloc)
    except Exception:
        return False


# https://packaging.python.org/specifications/entry-points/
ENTRYPOINT_PATTERN = r"[^\[\s=]([^=]*[^\s=])?"
ENTRYPOINT_REGEX = re.compile(f"^{ENTRYPOINT_PATTERN}$", re.I)
RECOMMEDED_ENTRYPOINT_PATTERN = r"[\w.-]+"
RECOMMEDED_ENTRYPOINT_REGEX = re.compile(f"^{RECOMMEDED_ENTRYPOINT_PATTERN}$", re.I)
ENTRYPOINT_GROUP_PATTERN = r"\w+(\.\w+)*"
ENTRYPOINT_GROUP_REGEX = re.compile(f"^{ENTRYPOINT_GROUP_PATTERN}$", re.I)


def python_identifier(value: str) -> bool:
    return value.isidentifier()


def python_qualified_identifier(value: str) -> bool:
    if value.startswith(".") or value.endswith("."):
        return False
    return all(python_identifier(m) for m in value.split("."))


def python_module_name(value: str) -> bool:
    return python_qualified_identifier(value)


def python_entrypoint_group(value: str) -> bool:
    return ENTRYPOINT_GROUP_REGEX.match(value) is not None


def python_entrypoint_name(value: str) -> bool:
    if not ENTRYPOINT_REGEX.match(value):
        return False
    if not RECOMMEDED_ENTRYPOINT_REGEX.match(value):
        msg = f"Entry point `{value}` does not follow recommended pattern: "
        msg += RECOMMEDED_ENTRYPOINT_PATTERN
        _logger.warning(msg)
    return True


def python_entrypoint_reference(value: str) -> bool:
    module, _, rest = value.partition(":")
    if "[" in rest:
        obj, _, extras_ = rest.partition("[")
        if extras_.strip()[-1] != "]":
            return False
        extras = (x.strip() for x in extras_.strip(string.whitespace + "[]").split(","))
        if not all(pep508_identifier(e) for e in extras):
            return False
        _logger.warning(f"`{value}` - using extras for entry points is not recommended")
    else:
        obj = rest

    module_parts = module.split(".")
    identifiers = _chain(module_parts, obj.split(".")) if rest else module_parts
    return all(python_identifier(i.strip()) for i in identifiers)
python3.12/site-packages/setuptools/config/_validate_pyproject/__pycache__/__init__.cpython-312.pyc000064400000003575151732704210027314 0ustar00�

��_i��x�UddlmZddlmZmZmZddlmZddlm	Z	m
Z
ddlmZddl
mZmZddlmZgd	�Zej(j+�D�cic]B}e|�r8|j.j1d
�s|j.j3d
d�|��Dc}Zeeeegeffed<d
edefd�Zycc}w)�)�reduce)�Any�Callable�Dict�)�formats)�detailed_errors�ValidationError)�EXTRA_VALIDATIONS)�JsonSchemaException�JsonSchemaValueException)�validate)r�FORMAT_FUNCTIONSrr
rr
�_�-r�data�returnc��t�5t|t��ddd�td�t|�y#1swY�xYw)z~Validate the given ``data`` object using JSON Schema
    This function raises ``ValidationError`` if ``data`` is invalid.
    )�custom_formatsNc��||�S)N�)�acc�fns  ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/_validate_pyproject/__init__.py�<lambda>zvalidate.<locals>.<lambda>!s��2�c�7�T)r	�	_validaterrr)rs rrrs4��
�	��$�'7�8�
�
�"�$5�t�<��
�	�s	�8�AN)�	functoolsr�typingrrr�r�error_reportingr	r
�extra_validationsr�fastjsonschema_exceptionsrr
�fastjsonschema_validationsrr�__all__�__dict__�values�callable�__name__�
startswith�replacer�str�bool�__annotations__)rs0r�<module>r/s����&�&��=�0�T�=������%�%�'�6�'����|�B�K�K�2�2�3�7��K�K����S�!�2�%�'�6��$�s�H�c�U�D�[�1�1�2���3��4���6s�AB7setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_exceptions.cpython-312.pyc000064400000005530151732704220032741 0ustar00python3.12/site-packages�

��_iL��r�ddlZejd�ZGd�de�ZGd�de�ZGd�de�Zy)	�Nz	[\.\[\]]+c��eZdZdZy)�JsonSchemaExceptionz7
    Base exception of ``fastjsonschema`` library.
    N��__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.pyrr���rrc�D��eZdZdZd�fd�	Zed��Zed��Z�xZS)�JsonSchemaValueExceptiona�
    Exception raised by validation function. Available properties:

     * ``message`` containing human-readable information what is wrong (e.g. ``data.property[index] must be smaller than or equal to 42``),
     * invalid ``value`` (e.g. ``60``),
     * ``name`` of a path in the data structure (e.g. ``data.property[index]``),
     * ``path`` as an array in the data structure (e.g. ``['data', 'property', 'index']``),
     * the whole ``definition`` which the ``value`` has to fulfil (e.g. ``{'type': 'number', 'maximum': 42}``),
     * ``rule`` which the ``value`` is breaking (e.g. ``maximum``)
     * and ``rule_definition`` (e.g. ``42``).

    .. versionchanged:: 2.14.0
        Added all extra properties.
    c�j��t�|�|�||_||_||_||_||_y�N)�super�__init__�message�value�name�
definition�rule)�selfrrrrr�	__class__s      �rrz!JsonSchemaValueException.__init__s3���
����!������
���	�$�����	rc�r�tj|j�D�cgc]
}|dk7s�	|��c}Scc}w)N�)�SPLIT_RE�splitr)r�items  r�pathzJsonSchemaValueException.path%s/��!)����	�	�!:�I�!:��d�b�j��!:�I�I��Is�
4�4c�~�|jr|jsy|jj|j�Sr)rr�get)rs r�rule_definitionz(JsonSchemaValueException.rule_definition)s+���y�y��������"�"�4�9�9�-�-r)NNNN)	rrrr	r�propertyr r#�
__classcell__)rs@rrr
s7���
���J��J��.��.rrc��eZdZdZy)�JsonSchemaDefinitionExceptionz?
    Exception raised by generator of validation function.
    Nrr
rrr'r'0r
rr')�re�compiler�
ValueErrorrrr'r
rr�<module>r+sA��	��2�:�:�l�#���*�� .�2� .�F�$7�rsite-packages/setuptools/config/_validate_pyproject/__pycache__/extra_validations.cpython-312.pyc000064400000003307151732704220031210 0ustar00python3.12�

��_i���d�dZddlmZmZddlmZede��ZGd�de�Zd	ed
efd�ZefZ	y)
z�The purpose of this module is implement PEP 621 validations that are
difficult to express as a JSON Schema (or that are not supported by the current
JSON Schema library).
�)�Mapping�TypeVar�)�ValidationError�T)�boundc��eZdZdZy)�RedefiningStaticFieldAsDynamicz�According to PEP 621:

    Build back-ends MUST raise an error if the metadata specifies a field
    statically as well as being listed in dynamic.
    N)�__name__�
__module__�__qualname__�__doc__����/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/_validate_pyproject/extra_validations.pyr
r

s��rr
�	pyproject�returnc��|jdi�}|jdg�}|D]0}||vs�d|�d�}|dz
}d|��}|||ddd|i}t|||d	�
��|S)N�project�dynamicz(You cannot provide a value for `project.z` and z0list it under `project.dynamic` at the same timez
data.project.z...z # ...zPEP 621)�rule)�getr
)r�
project_tabler�field�msg�name�values       r�validate_project_dynamicrs����M�M�)�R�0�M����	�2�.�G����M�!�<�U�G�6�J�C��E�E�C�"�5�'�*�D��M�%�0�%��9�g�V�E�0��e�T�	�R�R�
��rN)
r�typingrr�error_reportingrrr
r�EXTRA_VALIDATIONSrrr�<module>r"sH���
$�,��C�w����_�����a��.�/�rsetuptools/config/_validate_pyproject/__pycache__/fastjsonschema_validations.cpython-312.pyc000064400000522173151732704220033104 0ustar00python3.12/site-packages�

��_i�1��J�dZddlZddlmZejd�ejd�ejd�ejd�d	�Zed�Zidfd
�Zidfd�Z	idfd�Z
idfd
�Zidfd�Zidfd�Z
idfd�Zidfd�Zidfd�Zidfd�Zidfd�Zidfd�Zy)z2.16.3�N�)�JsonSchemaValueException�^.*$�.+�^.+$z^[^@]+@[^@]+\.[^@]+\Z)rrr�idn-email_re_patternc�.�t|||xsddz�|S)N�data�)�[validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies�r
�custom_formats�name_prefixs   ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py�validaters9��_�`d�ft�xC�xM�GM�QS�wS�T��K�c'� ��t|t��s�td|xsdzdz|d|xsdzdzdddgd�dd	dd
d	dgd�d
did�dddd�dddgddd�d�d�dgd�dddddgdidddd d��d!dd"d#d��d$dd%d&gd'��d(gd)�dgd*�d'�dd+d,dd-d.gd'�id,gd/�d0dd1d2�id0gd/�gid3dgd4�d5d6�id3gd/�gd7�gd8��d9dd:d;d<gd=��d>d?d,dd@dAgd'�id,gd/�d0dgdB�d'�id0gd/�gdC��dDddEdFigdG�dH��dIddEdFidJdKgdH��dLdd
didMdN��dOdddPdQdR�dSdTgdH��dUddVd	dWddXdY�idZ��d[d\d]d^gd_��d`d\gda�d_��dbgdc�dddeid	dWdEd\iidf��dgddhdEdiidj��dkddlddd id	dWddEdiidm�idn��doddpdqgdrgds�id��dgd	dogdodtd!idugdv�idw�gdx�dy�d!gdzgd{�dFd|d}dd	dd~dgd'�dd�d�dR�d��d��d\d�dgd��ddd�id	dWdd�d�gd�d�d��id��did�dd�d�d��d��d��ddd�d�gd��dd�dd�d2�id�d
diid�d��dd�d�gd��dd	id�dd
didm��d�d�d�gddd dY�d���d�d�d�gddd dY�d���d�d�d�d���d�d�dd
did�d���d�d�d�gdd
did���d�gd��d�ddEd�id��dEd�igd8��d�gd��dd	d�dtdidEd�igid�d
diid���d�gd��dd	d�ddd�idtd�igid�dd
didm�id���d�gd��d�d���d�gdâdd	d�ddd�idtd�igid�dd
didm�id���d�ddd�dY�d�dƜ�d�d�ddd�dY�d�d���d�gdˢdd�dd
didm�id̜�d�gd΢dd�dd�dY�id̜�d�dd
digdѢd�dӜ�dodd�d	d�d�gdEd�idEd�igd8�dEd�idEd�idEd�idEd�idddd�id	d�dEd�iidڜdEd�id�d3d
diiigd,gdܜdݜdޜ�d�d�d�dddd�iddd�igd�d�d�d�dd	d,d�d
didd
didm�giid,gd�d�d�d�d�gdd	d�d
diid�gd�d�d�dd	d�dd�d�gd	d�dd
did�dd�d�gd
did�dd�d�gd
did�d�d�d�gd'�d��d��id��d��d��d��d��d��dddddgdidddd d��d!dd"d#d��d$dd%d&gd'��d(gd)�dgd*�d'�dd+d,dd-d.gd'�id,gd/�d0dd1d2�id0gd/�gid3dgd4�d5d6�id3gd/�gd7�gd8��d9dd:d;d<gd=��d>d?d,dd@dAgd'�id,gd/�d0dgdB�d'�id0gd/�gdC��dDddEdFigdG�dH��dIddEdFidJdKgdH��dLdd
didMdN��dOdddPdQdR�dSdTgdH��dUddVd	dWddXdY�idZ��d[d\d]d^gd_��d`d\gda�d_��dbgdc�dddeid	dWdEd\iidf��dgddhdEdiidj��dkddlddd id	dWddEdiidm�idn��doddpdqgdrgds�id��dgd	dogdodtd!idugdv�idw�gdx�dy�d!gdzgd{�dFd|d}dd	dd~dgd'�dd�d�dR�d��d��d\d�dgd��ddd�id	dWdd�d�gd�d�d��id��did�dd�d�d��d��d��d��d
����t|t�}|�r�t|j	��}�d|v�r|j�d�|�d�t�t�sFtd|xsdz�dz�d|xsdz�dzdd
d	dgd�d
did�dddd�dddgddd�d�d�dgd�d
����t�t�}|�r�t
��}t�f�d��dD��sGtd|xsdz�dz�d|xsdz�dzdd
d	dgd�d
did�dddd�dddgddd�d�d�dgd��d����t�j	��}d|v�r|jd��d}t|ttf�s.td|xsdz�dz|d|xsdz�dzdgd�d
did�d
����t|ttf�}	|	r�t
|�}
t|�D]v\}}t|t�r�td|xsdz�d	j�d it���z�d
z|d|xsdz�d	j�d it���zdzd
did
�����d|vr�|j�d���d}
t|
t�s*td|xsdz�dz|
d|xsdz�d
zdddd�d
����t|
t�r5|d|
�s*td|xsdz�dz|
d|xsdz�d
zdddd�dd�����d|v�r|j�d���d}t|ttf�s/td|xsdz�dz|d|xsdz�dzdddgddd�d�d
����t|ttf�}|r�t
|�}t|�D]w\}}t|t�r�td|xsdz�dj�d it���z�d
z|d|xsdz�dj�d it���zdzddd�d
����|rWtd|xsdz�dzt|�z�dz�d|xsdz�dzdd
d	dgd�d
did�dddd�dddgddd�d�d�dgd��d�����d|vr-|j�d�|�d}t|||xsd�dz��d|v�r�|j�d�|�d}t|t��s�td|xsdz�dz|d|xsdz�dzddd�d�gd��dd�dd�d2�id�d
diid�d��dd�d�gd��dd	id�dd
didm��d�d�d�gddd dY�d���d�d�d�gddd dY�d���d�d�d�d���d�d�dd
did�d���d�d�d�gdd
did���d�gd��d�ddEd�id��dEd�igd8��d�gd��dd	d�dtdidEd�igid�d
diid���d�gd��dd	d�ddd�idtd�igid�dd
didm�id���d�gd��d�d���d�gdâdd	d�ddd�idtd�igid�dd
didm�id���d�ddd�dY�d�dƜ�d�d�ddd�dY�d�d���d�gdˢdd�dd
didm�id̜�d�gd΢dd�dd�dY�id̜�d�dd
digdѢd�dӜ�dodd�d	d�d�gdEd�idEd�igd8�dEd�idEd�idEd�idEd�idddd�id	d�dEd�iidڜdEd�id�d3d
diiigd,gdܜdݜdޜ�d�d�d�dddd�iddd�igd�d�d�d�dd	d,d�d
didd
didm�giid,gd�d�d�d�d�gdd	d�d
diid�gd�d�d�dd	d�dd�d�gd	d�dd
did�dd�d�gd
did�dd�d�gd
did�d�d�d�gd'�d��d��id��d��d��d��d��d
����t|t�}|r}t|j	��}�d|vr-|j�d�|�d}t|||xsd�dz��d|vr-|j�d�|�d}t!|||xsd�dz�|�r�td|xsdz�dzt|�z�dz|d|xsdzdzdddgd�dd	dd
d	dgd�d
did�dddd�dddgddd�d�d�dgd�dddddgdidddd d��d!dd"d#d��d$dd%d&gd'��d(gd)�dgd*�d'�dd+d,dd-d.gd'�id,gd/�d0dd1d2�id0gd/�gid3dgd4�d5d6�id3gd/�gd7�gd8��d9dd:d;d<gd=��d>d?d,dd@dAgd'�id,gd/�d0dgdB�d'�id0gd/�gdC��dDddEdFigdG�dH��dIddEdFidJdKgdH��dLdd
didMdN��dOdddPdQdR�dSdTgdH��dUddVd	dWddXdY�idZ��d[d\d]d^gd_��d`d\gda�d_��dbgdc�dddeid	dWdEd\iidf��dgddhdEdiidj��dkddlddd id	dWddEdiidm�idn��doddpdqgdrgds�id��dgd	dogdodtd!idugdv�idw�gdx�dy�d!gdzgd{�dFd|d}dd	dd~dgd'�dd�d�dR�d��d��d\d�dgd��ddd�id	dWdd�d�gd�d�d��id��did�dd�d�d��d��d��ddd�d�gd��dd�dd�d2�id�d
diid�d��dd�d�gd��dd	id�dd
didm��d�d�d�gddd dY�d���d�d�d�gddd dY�d���d�d�d�d���d�d�dd
did�d���d�d�d�gdd
did���d�gd��d�ddEd�id��dEd�igd8��d�gd��dd	d�dtdidEd�igid�d
diid���d�gd��dd	d�ddd�idtd�igid�dd
didm�id���d�gd��d�d���d�gdâdd	d�ddd�idtd�igid�dd
didm�id���d�ddd�dY�d�dƜ�d�d�ddd�dY�d�d���d�gdˢdd�dd
didm�id̜�d�gd΢dd�dd�dY�id̜�d�dd
digdѢd�dӜ�dodd�d	d�d�gdEd�idEd�igd8�dEd�idEd�idEd�idEd�idddd�id	d�dEd�iidڜdEd�id�d3d
diiigd,gdܜdݜdޜ�d�d�d�dddd�iddd�igd�d�d�d�dd	d,d�d
didd
didm�giid,gd�d�d�d�d�gdd	d�d
diid�gd�d�d�dd	d�dd�d�gd	d�dd
did�dd�d�gd
did�dd�d�gd
did�d�d�d�gd'�d��d��id��d��d��d��d��d��dddddgdidddd d��d!dd"d#d��d$dd%d&gd'��d(gd)�dgd*�d'�dd+d,dd-d.gd'�id,gd/�d0dd1d2�id0gd/�gid3dgd4�d5d6�id3gd/�gd7�gd8��d9dd:d;d<gd=��d>d?d,dd@dAgd'�id,gd/�d0dgdB�d'�id0gd/�gdC��dDddEdFigdG�dH��dIddEdFidJdKgdH��dLdd
didMdN��dOdddPdQdR�dSdTgdH��dUddVd	dWddXdY�idZ��d[d\d]d^gd_��d`d\gda�d_��dbgdc�dddeid	dWdEd\iidf��dgddhdEdiidj��dkddlddd id	dWddEdiidm�idn��doddpdqgdrgds�id��dgd	dogdodtd!idugdv�idw�gdx�dy�d!gdzgd{�dFd|d}dd	dd~dgd'�dd�d�dR�d��d��d\d�dgd��ddd�id	dWdd�d�gd�d�d��id��did�dd�d�d��d��d��d���d����|S(!Nrr
� must be object�&http://json-schema.org/draft-07/schemazShttps://packaging.python.org/en/latest/specifications/declaring-build-dependencies/z+Data structure for ``pyproject.toml`` files)zKFile format containing build-time configurations for the Python ecosystem. zO:pep:`517` initially defined a build-system independent format for source treeszQwhich was complemented by :pep:`518` to provide a way of specifying dependencies zfor building Python projects.zYPlease notice the ``project`` table (as initially defined in  :pep:`621`) is not includedz3in this schema and should be considered separately.�objectFz&Table used to store build-related data�array)zKList of dependencies in the :pep:`508` format required to execute the buildz9system. Please notice that the resulting dependency graphz**MUST NOT contain cycles**�type�string�r�
$$description�itemszLPython object that will be used to perform the build according to :pep:`517`zpep517-backend-reference�r�description�formatzDList of directories to be prepended to ``sys.path`` when loading thezback-end, and running its hooksz0Should be a path (TODO: enforce it with format?))r�$comment)�requires�
build-backend�backend-pathr!)rr�additionalProperties�
properties�required�Qhttps://packaging.python.org/en/latest/specifications/declaring-project-metadata/�0Package metadata stored in the ``project`` table�BData structure for the **project** table inside ``pyproject.toml``�$(as initially defined in :pep:`621`)�name�IThe name (primary identifier) of the project. MUST be statically defined.�pep508-identifier�version�6The version of the project as supported by :pep:`440`.�pep440r�'The `summary description of the project�F<https://packaging.python.org/specifications/core-metadata/#summary>`_�rr�readme�zA`Full/detailed description of the project in the form of a READMEz,<https://peps.python.org/pep-0621/#readme>`_zGwith meaning similar to the one defined in `core metadata's DescriptionzJ<https://packaging.python.org/specifications/core-metadata/#description>`_�zDRelative path to a text file (UTF-8) containing the full descriptionzDof the project. If the file path ends in case-insensitive ``.md`` orz8``.rst`` suffixes, then the content-type is respectivelyz#``text/markdown`` or ``text/x-rst``�anyOf�file�<Relative path to a text file containing the full description�of the project.�r%r&�text�!Full text describing the project.�rr�content-type�z2Content-type (:rfc:`1341`) of the full descriptionz>(e.g. ``text/markdown``). The ``charset`` parameter is assumedzUTF-8 when not present.�"TODO: add regex pattern or format?�rrr �r�allOf�r�oneOf�requires-python�pep508-versionspec�/`The Python version requirements of the project�O<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.�rrr�license�?`Project license <https://peps.python.org/pep-0621/#license>`_.�DRelative path to the file (UTF-8) which contains the license for the�project.�z7The license of the project whose meaning is that of thez%`License field from the core metadatazG<https://packaging.python.org/specifications/core-metadata/#license>`_.�rrF�authors�$ref�#/definitions/author�zJThe people or organizations considered to be the 'authors' of the project.zNThe exact meaning is open to interpretation (e.g. original or primary authors,z/current maintainers, or owners of the package).�rrr�maintainers�NThe people or organizations considered to be the 'maintainers' of the project.�FSimilarly to ``authors``, the exact meaning is open to interpretation.�keywords�NList of keywords to assist searching for the distribution in a larger catalog.�rrr�classifiers�trove-classifier�3`PyPI classifier <https://pypi.org/classifiers/>`_.�rrr�4`Trove classifiers <https://pypi.org/classifiers/>`_�which apply to the project.�urls�@URLs associated with the project in the form ``label => value``.r�url�rr�rrr$�patternProperties�scripts�#/definitions/entry-point-groupzDInstruct the installer to create command-line wrappers for the given�L`entry points <https://packaging.python.org/specifications/entry-points/>`_.)rSr�gui-scripts)z;Instruct the installer to create GUI wrappers for the givenrkzJThe difference between ``scripts`` and ``gui-scripts`` is only relevant inzWindows.�entry-points�z@Instruct the installer to expose the given modules/functions viaz9``entry-point`` discovery mechanism (useful for plugins).z9More information available in the `Python packaging guidez><https://packaging.python.org/specifications/entry-points/>`_.r�python-entrypoint-group�r�
propertyNamesr$rh�dependencies�!Project (mandatory) dependencies.�#/definitions/dependency�rrr�optional-dependencies�#Optional dependency for the project�rr�rrrqr$rh�dynamic�GSpecifies which fields are intentionally unspecified and expected to be�#dynamically provided by build tools�enum�r.rr4rGrLrRrWrZr]rcrirlrmrrrv�const� version is listed in ``dynamic``��containsr�r&r%�	zAccording to :pep:`621`:zH    If the core metadata specification lists a field as "Required", thenzH    the metadata MUST specify the field statically or list it in dynamicz"In turn, `core metadata`_ defines:z=    The required fields are: Metadata-Version, Name, Version.z&    All the other fields are optional.zISince ``Metadata-Version`` is defined by the build back-end, ``name`` andzE``version`` are the only mandatory information in ``pyproject.toml``.zM.. _core metadata: https://packaging.python.org/specifications/core-metadata/��notz	$$comment�=version should be statically defined in the ``version`` field�r&r�Author or Maintainer�5https://peps.python.org/pep-0621/#authors-maintainers�IMUST be a valid email name, i.e. whatever can be put as a name, before an�email, in :rfc:`822`.�	idn-email�MUST be a valid email address�r+�email��$id�titler rr$r%�Entry-points�zLEntry-points are grouped together to indicate what sort of capabilities theyzprovide.zSee the `packaging guidesz=<https://packaging.python.org/specifications/entry-points/>`_zand `setuptools docszC<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_zfor more information.�python-entrypoint-name�6Reference to a Python object. It is either in the form�<``importable.module``, or ``importable.module:object.attr``.�python-entrypoint-reference�9https://packaging.python.org/specifications/entry-points/�rrrr �r�r�rrrqr$rh�
Dependency�5Project dependency specification according to PEP 508�pep508�r�r�rrr��authorzentry-point-group�
dependency��$schemar�r�rrr%r&r$�if�then�definitions�"https://docs.python.org/3/install/�``tool.distutils`` table�zGOriginally, ``distutils`` allowed developers to configure arguments forz7``setup.py`` scripts via `distutils configuration fileszE<https://docs.python.org/3/install/#distutils-configuration-files>`_.z@``tool.distutils`` subtables could be used with the same purposez(NOT CURRENTLY IMPLEMENTED).�global�4Global options applied to all ``distutils`` commandsr�CTODO: Is there a practical way of making this schema more specific?�r�r�r�rrr%rhr �=https://setuptools.pypa.io/en/latest/references/keywords.html�``tool.setuptools`` table�zLPlease notice for the time being the ``setuptools`` project does not specifyz3a way of configuring builds via ``pyproject.toml``.zMTherefore this schema should be taken just as a *"thought experiment"* on howz@this *might be done*, by following the principles established inzO`ini2toml <https://ini2toml.readthedocs.io/en/latest/setuptools_pep621.html>`_.z,It considers only ``setuptools`` `parameterszJ<https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_zTthat can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`zGbut intentionally excludes ``dependency_links`` and ``setup_requires``.zINOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion withz2entry-point based scripts (defined in :pep:`621`).�	platforms�provides�?Package and virtual package names contained within this package�**(not supported by pip)**�rrr�	obsoletes�,Packages which this package renders obsolete�zip-safe�DWhether the project can be safely installed and run from a zip file.�boolean�rr�script-files�<Legacy way of defining scripts (entry-points are preferred).�1TODO: is this field deprecated/should be removed?�rrrr �eager-resources�FResources that should be extracted together, if any of them is needed,�<or if any C extensions included in the project are imported.�packages�z5Packages that should be included in the distribution.z7It can be given either as a list of package identifiersz:or as a ``dict``-like structure with a single key ``find``z&which corresponds to a dynamic call toz4``setuptools.config.expand.find_packages`` function.zMThe ``find`` key is associated with a nested ``dict``-like structure that canzDcontain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,z;mimicking the keyword arguments of the associated function.�#Array of Python package identifiers�#/definitions/package-name�r�rr�#/definitions/find-directive�package-dir�zR:class:`dict`-like structure mapping from package names to directories where theirzcode can be found.zFThe empty string (as key) means that all packages are contained insidez9the given directory will be included in the distribution.rFr�rrr$rqrh�package-data�z5Mapping from package names to lists of glob patterns.zLUsually this option is not needed when using ``include-package-data = true``�MFor more information on how to include data files, check ``setuptools`` `docs�B<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.�python-module-name�*�include-package-data�zCAutomatically include any data files inside the package directoriesz%that are specified by ``MANIFEST.in``r�r��rr�exclude-package-data�zLMapping from package names to lists of glob patterns that should be excludedr�r��namespace-packages�Ehttps://setuptools.pypa.io/en/latest/userguide/package_discovery.html�rrr �
py-modules�'Modules that setuptools will manipulate�0TODO: clarify the relationship with ``packages``�
data-files�zM**DEPRECATED**: dict-like structure where each key represents a directory andzFthe value is a list of glob patterns that should be installed in them.zBPlease notice this don't work with wheels. See `data files supportzA<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_�rrrh�cmdclass�zMMapping of distutils-style command names to ``setuptools.Command`` subclasseszJwhich in turn should be represented by strings with a qualified class namez+(i.e., "dotted" form with module), e.g.::

z;    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}

zFThe command class should be a directly defined at the top-level of thez%containing module (no class nesting).�python-qualified-identifier�
license-files�zKPROVISIONAL: List of glob patterns for all license files being distributed.z%(might become standard with PEP 639).zBBy default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``�HTODO: revise if PEP 639 is accepted. Probably ``project.license-files``?�rrrr �@Instructions for loading :pep:`621`-related metadata dynamically�BA version dynamically loaded via either the ``attr:`` or ``file:``�Mdirectives. Please make sure the given file or attribute respects :pep:`440`.�#/definitions/attr-directive�#/definitions/file-directive�python-identifier�rrqr$rhr%�r7r&�r.r]rrrrmrvr4�rrr$r%�Valid package name�+Valid package name (importable or PEP 561).�pep561-stub-name�r�r�rrr7�'file:' directive�BValue is read from a file (or list of files and then concatenated)�r�r�rrr$r%r&�'attr:' directive�HValue is read from a module attribute. Supports callables and iterables;�(unsupported types are cast via ``str()``�attr�r�r�rrr$r%r&�'find:' directive�find�Dynamic `package discovery�J<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.�BDirectories to be searched for packages (Unix-style relative path)�rrr�<Exclude packages that match the values listed in this field.�6Can container shell-style wildcards (e.g. ``'pkg.*'``)�BRestrict the found packages to just the ones listed in this field.�CWhen ``True``, directories without a ``__init__.py`` file will also�3be scanned for :pep:`420`-style implicit namespaces��where�exclude�include�
namespaces�rrr$r%�r�r�rr$r%�zpackage-namezfile-directivezattr-directivezfind-directive�r�r�r�rrr$r%r�)�	distutils�
setuptools)rr%)�build-system�project�tool)r�r�r�rrr$r%r��valuer+�
definition�rulerz.build-system must be objectz
.build-systemc3�&�K�|]}|�v���
y�w�N�)�.0�prop�data__buildsystems  �r�	<genexpr>znvalidate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies.<locals>.<genexpr>-s�����N���4�#4�4����)r!z2.build-system must contain ['requires'] propertiesr&z$.build-system.requires must be arrayz.build-system.requiresz7.build-system.requires[{data__buildsystem__requires_x}]� must be stringr"z*.build-system.build-backend must be stringz.build-system.build-backendz<.build-system.build-backend must be pep517-backend-referencer#z(.build-system.backend-path must be arrayz.build-system.backend-pathz>.build-system.backend-path[{data__buildsystem__backendpath_x}]z.build-system must not contain � propertiesr$rz.projectrz.tool must be objectz.toolrz.tool.distutilsrz.tool.setuptools� must not contain r)�
isinstance�dictr�set�keys�remove�len�all�list�tuple�	enumerate�strr�locals�Yvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata�*validate_https___docs_python_org_3_install�Fvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html)r
rr�data_is_dict�	data_keys�data__buildsystem_is_dict�data__buildsystem_len�data__buildsystem_keys�data__buildsystem__requires�#data__buildsystem__requires_is_list�data__buildsystem__requires_len�data__buildsystem__requires_x� data__buildsystem__requires_item�data__buildsystem__buildbackend�data__buildsystem__backendpath�&data__buildsystem__backendpath_is_list�"data__buildsystem__backendpath_len� data__buildsystem__backendpath_x�#data__buildsystem__backendpath_item�
data__project�
data__tool�data__tool_is_dict�data__tool_keys�data__tool__distutils�data__tool__setuptoolsr!s                         @rrrs�V����d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�eM�Vk�vc�vb�lt�N
S
�}
E�V~�X]�CJ�]H�TZ�\d�Se�zf�BJ�[i�uO�yP�kr�FL�No�Ep�DL�ZL�{M�bN�mO�^h�]i�t
j�Ck�tG�RD�X\�^D �WE �O W �g [u�h n �y A!�R!]"�i"|"�p }"�g [u�"H#�S#[#�l#d$�p$x$�J#y$�g [u�{$H%�S%[%�o%X&�Z&b'�n%c'�J%d'�g [u�f'n'�B(P,�e,m,�@-s0�\,t0�0G1�T1[1�n1t1�1G2�[2Y3�[3l3�Z2m3�v1n3�m1o3�~3D4�}3E4�^1F4�X4^4�i4q4�B5e5�`4f5�W4g5�v5|5�u5}5�H4~5�]15�S1@6�R6`6�k6s6�F7Y9�g9K:�b6L:�Q6M:�\:j:�[:k:�B6l:�R1m:�v0n:�[,o:�p'p:�g [u�r:C;�N;V;�b;v;�J<{<�}<N>�I<O>�E;P>�g [u�R>[>�m>n?�J@P@�[@c@�w@}A�AIB�v@JB�R@KB�I@LB�[BaB�ZBbB�z?cB�uB{B�FCNC�aCPF�}BQF�tBRF�aFgF�`FhF�eBiF�y?jF�]>kF�g [u�mFvF�AGHG�TGZG�\GrG�SGsG�FHYK�xFZK�g [u�\KiK�tK{K�GLML�OLeL�FLfL�zLJN�LNTO�yLUO�kKVO�g [u�XObO�mOtO�@PFP�HPPP�OQP�bPrQ�dOsQ�g [u�uQBR�MRTR�hRpR�|RNS�_STT�_RUT�iT_U�aU~U�hTU�DR@V�g [u�BVHV�SV[V�lVnW�HXMX�eXkX�vX~X�JYOY�mXPY�dXQY�JVRY�g [u�TY]Y�hYIZ�]Zc[�e[s\�\Zt\�_Yu\�g [u�w\D]�O]p]�C^la�F]ma�g [u�oa}a�QbQf�efmf�ofHg�dfIg�cghg�@hFh�IhOh�Qhrh�Hhsh�gth�auh�g [u�whEi�PiWi�hiKj�Wj]j�_jyj�Vjzj�Gi{j�g [u�}jTk�_kgk�xk]l�qlyl�{lNm�plOm�imnm�FnLn�Wn^n�jnpn�rnLo�inMo�NnNo�EnOo�VkPo�g [u�Ro[o�fomo�ApJq�Lqqq�@prq�~qDr�FrXu�}qYu�]oZu�g [u�jupu�iuqu�KvPv�nvwv�mvxv�IwRw�bwiw�kwtw�awuw�Ixkx�Hxlx�Twmx�Hwnx�`vox�~xjA�XvkA�CBLB�BBMB�aB`C�`BaC�uAbC�FD\D�gD}D�KEBF�LFTF�nFsF�UG]G�qG|H�~HUI�pGVI�LGWI�kIsI�IJJ�[JzJ�bI{J�CG|J�~C}J�\K}K�HLVL�`LhL�{LmQ�ARIR�KRcR�@RdR�~RCS�[SaS�lStS�HT@U�BU@V�GTAV�MVjV�xVsW�cStW�ZSuW�TKvW�NXhX�sXX�IYQY�bYYZ�eZmZ�FXnZ�sCoZ�wpZ�C[K[�u[]\�f\J]�U]o]�B^ub�bGc�Xc`c�kcsc�Ddzd�bc{d�Wc|d�TeXe�[eae�ceke�Zele�Seme�{e@g�i[Ag�]gEh�NhMi�Xisi�FjYv�cvkv�EwJw�ZwzX�[wfw�qwxw�DxJx�LxTx�CxUx�hwVx�ZwzX�Xxbx�wxxy�zyVz�vxWz�azhz�|zD{�P{c{�szd{�dxe{�ZwzX�g{r{�G|u|�w|S}�F|T}�^}e}�y}A~�M~`~�p}a~�t{b~�ZwzX�d~n~�@F@�P@Y@�p~Z@�ZwzX�\@j@�|@zA�DBKB�WB]B�_BgB�VBhB�vBiC�l@jC�ZwzX�lC}C�RDZE�\EZF�QD[F�eFlF�xF~F�@GHG�wFIG�CJG�ZwzX�LGVG�jGVO�lOQP�[PbP�nPtP�vPRQ�mPSQ�bOTQ�WQ]Q�_Q}Q�VQ~Q�aOQ�XG@R�ZwzX�BROR�cRVV�`VhV�BWGW�[WbW�fWmW�oWqW�eWrW�uW{W�}WYX�tWZX�dW[X�ZW\X�tXzX�}XCY�EYMY�|XNY�sXOY�QRPY�ZwzX�RY`Y�tYT^�^^f^�@_E_�Y_`_�d_l_�n_B`�c_C`�F`M`�O`R`�E`S`�b_T`�X_U`�m`s`�~`Ea�QaWa�Yaaa�Paba�u`ca�l`da�bYea�ZwzX�ga}a�QbXf�bfkf�alf�ZwzX�nfDg�Xgj�IkQk�kkpk�DlKl�OlWl�Ylml�Nlnl�qlxl�zl}l�pl~l�Mll�Cl@m�Xm^m�impm�|mBn�DnLn�{mMn�`mNn�WmOn�FgPn�ZwzX�Rnfn�qnxn�LoTo�`oto�Couo�CpJq�hnKq�ZwzX�MqYq�kqTr�^rer�yrAs�Msas�prbs�psbt�[qct�ZwzX�etqt�Euky�uy}y�Uz[z�fzmz�yzz�A{I{�xzJ{�]zK{�TzL{�stM{�ZwzX�O{Y{�m{qA�{ACB�[BaB�lBtB�@C]C�cB^C�ZB_C�[{`C�ZwzX�bCqC�|CCD�ODUD�WD_D�ND`D�sDqG�GII�sCJI�ZwzX�LIUI�`IhI�yI{J�UKZK�ILMM�OM^N�HL_N�lNrN�tNRO�kNSO�VO\O�^O|O�UO}O�jN~O�vKO�QPWP�YPwP�PPxP�JQPQ�RQpQ�IQqQ�DRJR�LRjR�CRkR�~RDS�FSdS�}ReS�ITQT�eTmT�oTBU�dTCU�]UbU�zU~U�AVGV�IVgV�@VhV�yUiV�@TjV�BWHW�JWhW�AWiW�lWxW�{WIX�LXRX�TX\X�KX]X�zW^X�kW_X�@W`X�oXuX�nXvX�vVwX�jKxX�WIyX�ZwzX�dY@Z�KZ_Z�pZ][�g[o[�|[D\�F\Z\�{[[\�^\f\�h\z\�]\{\�z[|\�\Y}\�Y]w]�B^U^�f^j_�t_|_�V`[`�l`r`�u`|`�@aFa�HaPa�`Qa�\aca�oaua�waa�na@b�SaAb�~`Bb�t`Cb�k`Db�SbYb�RbZb�Q][b�ybLc�Ucsc�GdQe�Se}e�Fd~e�HfPf�jfof�@gFg�IgOg�QgYg�HgZg�f[g�jgpg�igqg�obrg�Nhlh�whJi�Ti\i�vi{i�LjRj�]jej�yjUk�Wkcl�xjdl�~lCm�mmqn�{nBo�NoTo�Vo^o�Mo_o�]m`o�vo}o�QpOq�QqIr�PpJr�Vr\r�^rfr�Urgr�mohr�~rEs�Ys]t�_tWu�XsXu�duju�lutu�cuuu�urvu�OvXv�lvqw�swhx�kvix�Fvjx�Smkx�Tjlx�Kjmx�Fhnx�KYox�Qgpx�[[qx�zZrx�c
sx�Lyty�}yP{�[{M|�a|e}�g}M~�`|N~�X~`~�p~dS�q~w~�BJ�[f@�r@EA�y~FA�p~dS�HAQA�\AdA�uAmB�yBAC�SABC�p~dS�DCQC�\CdC�xCaD�cDkE�wClE�SCmE�p~dS�oEwE�KFYJ�nJvJ�IK|N�eJ}N�HOPO�]OdO�wO}O�HPPP�dPbQ�dQuQ�cPvQ�OwQ�vOxQ�GRMR�FRNR�gOOR�aRgR�rRzR�KSnS�iRoS�`RpS�SET�~SFT�QRGT�fOHT�\OIT�[TiT�tT|T�OUbW�pWTX�kTUX�ZTVX�eXsX�dXtX�KTuX�[OvX�NwX�dJxX�yEyX�p~dS�{XLY�WY_Y�kYY�SZD[�F[W\�RZX\�NYY\�p~dS�[\d\�v\w]�S^Y^�d^l^�@_F`�H`R`�^S`�[^T`�R^U`�d`j`�c`k`�C^l`�~`Da�OaWa�jaYd�FaZd�}`[d�jdpd�idqd�n`rd�B^sd�f\td�p~dS�vdd�JeQe�]ece�ee{e�\e|e�Ofbi�Aeci�p~dS�eiri�}iDj�PjVj�Xjnj�Ojoj�CkSl�Ul]m�Bk^m�ti_m�p~dS�amkm�vm}m�InOn�QnYn�HnZn�kn{o�mm|o�p~dS�~oKp�Vp]p�qpyp�EqWq�hq]r�hp^r�rrhs�jsGt�qrHt�MpIt�p~dS�KtQt�\tdt�utwu�QvVv�nvtv�vGw�SwXw�vvYw�mvZw�St[w�p~dS�]wfw�qwRx�fxly�ny|z�ex}z�hw~z�p~dS�@{M{�X{y{�L|u�O{v�p~dS�xF@�Z@ZD�nDvD�xDQE�mDRE�lEqE�IFOF�RFXF�ZF{F�QF|F�HF}F�H@~F�p~dS�@GNG�YG`G�qGTH�`HfH�hHBI�_HCI�PGDI�p~dS�FI]I�hIpI�AJfJ�zJBK�DKWK�yJXK�rKwK�OLUL�`LgL�sLyL�{LUM�rLVM�WLWM�NLXM�_IYM�p~dS�[MdM�oMvM�JNSO�UOzO�IN{O�GPMP�OPaS�FPbS�fMcS�p~dS�sSyS�rSzS�TTYT�wT@U�vTAU�RU[U�kUrU�tU}U�jU~U�RVtV�QVuV�]UvV�QUwV�iTxV�GWs_�aTt_�L`U`�K`V`�j`ia�i`ja�~_ka�Obeb�pbFc�TcKd�Ud]d�wd|d�^efe�zeEg�Gg^g�ye_g�Ue`g�tg|g�HhSh�dhCi�kgDi�LeEi�GbFi�eiFj�Qj_j�ijqj�Dkvo�JpRp�Tplp�Ipmp�GqLq�dqjq�uq}q�QrIs�KsIt�PrJt�Vtst�Au|u�lq}u�cq~u�]iu�Wvqv�|vHw�RwZw�kwbx�nxvx�Ovwx�|axx�@yyx�Yzx�AyGy�Hy�	Hy��d�D�)�L����	�	��$�	��Y�&����^�,� $�^� 4���/�$�8�.�r�[�5J�F�/K�Nl�/l�uF�MO�S^�Sh�bh�Mi�l{�M{�QY�jR�lq�W^�q\�hn�px�gy�Nz�V	^	�o	}
�Ic�M	d�F�Z`
�b
C�YD�X`�n`�Oa�vb�Ac�r|�q}�H~�EK�L�L�(2�3D�d�(K�%�(�(+�,=�(>�%��N��N�N�2�2��9N��3O�SG�4G�O`�gi�mx�mB�|B�gC�FU�gU�ks�Dl�FK�qx�Kv�B	H	�J	R	�A	S	�hT	�p	x	�I
W�c}�g	~�Y`�tz
�|
]�s^�rz�Hz�i{�P|�[}�LV�KW�bX�_i�j�j�),�->�-C�-C�-E�)F�&��!7�7�*�1�1�*�=�2C�J�2O�/�%�&A�D�%�=�Q�6�r�[�=R�F�7S�V|�7|�E`�gi�mx�mB�|B�gC�F^�g^�t{�Ny�EK�MU�DV�kW�^d�e�e�:D�E`�cg�in�bo�:p�7�:�:=�>Y�:Z�7�_h�jE�`F�[�9�;[�#-�.N�QT�#V�&>�r�[�EZ�TZ�?[�__�_X�__�__�_k�bh�bj�_k�@k�n�@�Gg�np�t�tI�CI�nJ�MM�MF�MM�MM�MY�PV�PX�MY�nY�\^�n^�lr�t|�k}�DJ�'K�!K�`F�#�&<�<�*�1�1�/�B�6G��6X�3�%�&E��M�6�r�[�=R�F�7S�WC�8C�Kj�qs�wB�wL�FL�qM�Pm�qm�CK�\j�vP�zQ�X^�_�_�!�"A�3�G�I�~�.H�I�Ji�j�":�2��AV�PV�;W�[Y�<Y�a@�GI�MX�Mb�\b�Gc�fC�GC�Ya�r@�Lf�Pg�nv�#w�w�!�%;�;�*�1�1�.�A�5F�~�5V�2�%�&D�t�U�m�T�6�r�[�=R�F�7S�WA�8A�Ig�np�t�tI�CI�nJ�Mi�ni�F�Z`�bC�YD�X`�n`�Oa�vb�io�p�p�=G�Hf�im�ot�hu�=v�:�=�=@�A_�=`�:�en�pN�fO�a�<�>a�#-�.Q�TW�#Y�&>�r�[�EZ�TZ�?[�_f�__�_f�_f�_r�io�iq�_r�@r�uF�@F�Nq�xz�~I�~S�MS�xT�W^�WW�W^�W^�Wj�ag�ai�Wj�xj�mo�xo�EM�[M�|N�U[�'\�!\�fO�*�2�2��9N��3O�Rs�3s�tw�yO�uP�4P�Q^�4^�fw�~@�DO�DY�SY�~Z�]l�~l�BJ�[C�]b�HO�bM	�Y	_	�a	i	�X	j	�k	�G
O
�`
n�zT�~	U�pw�K
Q�St�J
u�IQ�_Q�@R�gS�rT�cm�bn�yo�vL�M�M��	�!����Y�'� ��O�M�e�fs�vD�GR�G\�V\�`j�Fj�
k��Y�����V�$��f��J��j�4�1�.�r�[�5J�F�/K�Nd�/d�lv�}�DO�DY�SY�~Z�]d�~d�zB�lT�]A�Lf�yl
�v
~
�OW�bj�{q�Yr�Ns�K
O
�R
X
�Z
b
�Q
c
�J
d
�r
w�`x�T|�ED�Oj�}P�Zb�|A�Qq@�R]�ho�{A �C K �zL �_M �Qq@�O Y �n o!�q!M"�m N"�X"_"�s"{"�G#Z#�j"[#�[ \#�Qq@�^#i#�~#l$�n$J%�}#K%�U%\%�p%x%�D&W&�g%X&�k#Y&�Qq@�[&e&�w&}'�G(P(�g&Q(�Qq@�S(a(�s(q)�{)B*�N*T*�V*^*�M*_*�m*`+�c(a+�Qq@�c+t+�I,Q-�S-Q.�H,R.�\.c.�o.u.�w..�n.@/�v+A/�Qq@�C/M/�a/M7�c7H8�R8Y8�e8k8�m8I9�d8J9�Y7K9�N9T9�V9t9�M9u9�X7v9�O/w9�Qq@�y9F:�Z:M>�W>_>�y>~>�R?Y?�]?d?�f?h?�\?i?�l?r?�t?P@�k?Q@�[?R@�Q?S@�k@q@�t@z@�|@DA�s@EA�j@FA�H:GA�Qq@�IAWA�kAKF�UF]F�wF|F�PGWG�[GcG�eGyG�ZGzG�}GDH�FHIH�|GJH�YGKH�OGLH�dHjH�uH|H�HINI�PIXI�GIYI�lHZI�cH[I�YA\I�Qq@�^ItI�HJON�YNbN�vIcN�Qq@�eN{N�OOvR�@SHS�bSgS�{SBT�FTNT�PTdT�ETeT�hToT�qTtT�gTuT�DTvT�zSwT�OUUU�`UgU�sUyU�{UCV�rUDV�WUEV�NUFV�}NGV�Qq@�IV]V�hVoV�CWKW�WWkW�zVlW�zWAY�_VBY�Qq@�DYPY�bYKZ�UZ\Z�pZxZ�D[X[�gZY[�g[Y\�RYZ\�Qq@�\\h\�|\ba�lata�LbRb�]bdb�pbvb�xb@c�obAc�TbBc�KbCc�j\Dc�Qq@�FcPc�dchi�rizi�RjXj�cjkj�wjTk�ZjUk�QjVk�RcWk�Qq@�Ykhk�skzk�FlLl�NlVl�ElWl�jlho�vo@q�jkAq�Qq@�CqLq�Wq_q�pqrr�LsQs�@tDu�FuUv�sVv�cviv�kvIw�bvJw�MwSw�Uwsw�Lwtw�avuw�msvw�HxNx�Pxnx�Gxox�AyGy�Iygy�@yhy�{yAz�Czaz�zybz�uz{z�}z[{�tz\{�@|H|�\|d|�f|y|�[|z|�T}Y}�q}u}�x}~}�@~^~�w}_~�p}`~�w{a~�y~~�A_�x~`�co�r@@�C@I@�K@S@�B@T@�qU@�bV@�w~W@�f@l@�e@m@�m~n@�aso@�Nqp@�Qq@�[AwA�BBVB�gBTC�^CfC�sC{C�}CQD�rCRD�UD]D�_DqD�TDrD�qCsD�SAtD�PEnE�yELF�]FaG�kGsG�MHRH�cHiH�lHsH�wH}H�HGI�vHHI�SIZI�fIlI�nIvI�eIwI�JIxI�uHyI�kHzI�bH{I�JJPJ�IJQJ�HERJ�pJCK�LKjK�~KHM�JMtM�}KuM�MGN�aNfN�wN}N�@OFO�HOPO�NQO�vNRO�aOgO�`OhO�fJiO�EPcP�nPAQ�KQSQ�mQrQ�CRIR�TR\R�pRLS�NSZT�oR[T�uTzT�dUhV�rVyV�EWKW�MWUW�DWVW�TUWW�mWtW�HXFY�HY@Z�GXAZ�MZSZ�UZ]Z�LZ^Z�dW_Z�uZ|Z�P[T\�V\N]�O[O]�[]a]�c]k]�Z]l]�lZm]�F^O^�c^h_�j__`�b^``�}]a`�JUb`�KRc`�BRd`�}Oe`�BAf`�Hg`�Rh`�qi`�p`v`�w`�w`�!+�J��!=��!�"%�j�o�o�&7�"8���/�1�#�*�*�;�7�,6�{�,C�)�>�?T�Vd�gr�g|�v|�AR�gR�S��?�2�#�*�*�<�8�-7��-E�*�Z�[q�tB�EP�EZ�TZ�^p�Dp�q��*�2��1F��+G�J^�+^�_b�cl�_m�+m�n{�+{�DH�OQ�U`�Uj�dj�Ok�np�Op�Iq�zO�ZG�ZF
�P
X
�r
w
�ai�zb�|A�gn�Al�x~�@H�wI�^J�fn�M�Ys�]t�OV�jp�rS�iT�hp�~p�_q�Fr�Qs�BL�AM�XN�gO�Xk�vh�|@ �B h �{i �s { �K!u�L!R!�]!e!�v!A#�M#`#�T!a#�K!u�c#l#�w##�P$H%�T%\%�n#]%�K!u�_%l%�w%%�S&|&�~&F(�R&G(�n%H(�K!u�J(R(�f(t,�I-Q-�d-W1�@-X1�c1k1�x11�R2X2�c2k2�2}3�3P4�~2Q4�Z2R4�Q2S4�b4h4�a4i4�B2j4�|4B5�M5U5�f5I6�D5J6�{4K6�Z6`6�Y6a6�l4b6�A2c6�w1d6�v6D7�O7W7�j7}9�K:o:�F7p:�u6q:�@;N;�:O;�f6P;�v1Q;�Z1R;�,S;�T(T;�K!u�V;g;�r;z;�F<Z<�n<_=�a=r>�m<s>�i;t>�K!u�v>>�Q?R@�n@t@�@GA�[AaB�cBmB�ZAnB�v@oB�m@pB�BEC�~BFC�^@GC�YC_C�jCrC�EDtF�aCuF�XCvF�EGKG�DGLG�ICMG�]@NG�A?OG�K!u�QGZG�eGlG�xG~G�@HVH�wGWH�jH}K�\G~K�K!u�@LML�XL_L�kLqL�sLIM�jLJM�^MnN�pNxO�]MyO�OLzO�K!u�|OFP�QPXP�dPjP�lPtP�cPuP�FQVR�HPWR�K!u�YRfR�qRxR�LSTS�`SrS�CTxT�CSyT�MUCV�EVbV�LUcV�hRdV�K!u�fVlV�wVV�PWRX�lXqX�IYOY�ZYbY�nYsY�QYtY�HYuY�nVvY�K!u�xYAZ�LZmZ�A[G\�I\W]�@[X]�CZY]�K!u�[]h]�s]T^�g^Pb�j]Qb�K!u�Sbab�ubuf�IgQg�Sglg�Hgmg�GhLh�dhjh�mhsh�uhVi�lhWi�chXi�cbYi�K!u�[iii�ti{i�Ljoj�{jAk�Ck]k�zj^k�ki_k�K!u�akxk�ClKl�\lAm�Um]m�_mrm�Tmsm�MnRn�jnpn�{nBo�NoTo�Vopo�Moqo�rnro�inso�zkto�K!u�voo�JpQp�epnq�pqUr�dpVr�brhr�jr|u�ar}u�Ap~u�K!u�NvTv�MvUv�ovtv�Rw[w�Qw\w�mwvw�FxMx�OxXx�ExYx�mxOy�lxPy�xwQy�lwRy�DwSy�byNB�|vOB�gBpB�fBqB�ECDD�DCED�YBFD�jD@E�KEaE�oEfF�pFxF�RGWG�yGAH�UH`I�bIyI�THzI�pG{I�OJWJ�cJnJ�J^K�FJ_K�gG`K�bDaK�@LaL�lLzL�DMLM�_MQR�eRmR�oRGS�dRHS�bSgS�SET�PTXT�lTdU�fUdV�kTeV�qVNW�\WWX�GTXX�~SYX�xKZX�rXLY�WYcY�mYuY�FZ}Z�I[Q[�jXR[�WDS[�[T[�g[o[�Y\A]�J]n]�y]S^�f^Yc�cckc�|cDd�OdWd�hd^e�Fd_e�{c`e�xe|e�eEf�GfOf�~ePf�weQf�_fdg�M\eg�Ahih�rhqi�|iWj�jj}v�GwOw�iwnw�~w^Y�wJx�Ux\x�hxnx�pxxx�gxyx�Lxzx�~w^Y�|xFy�[y\z�^zzz�Zy{z�E{L{�`{h{�t{G|�W{H|�HyI|�~w^Y�K|V|�k|Y}�[}w}�j|x}�B~I~�]~e~�q~D�T~E�X|F�~w^Y�HR�dj@�t@}@�T~@�~w^Y�@ANA�`A^B�hBoB�{BAC�CCKC�zBLC�ZCMD�PAND�~w^Y�PDaD�vD~E�@F~F�uDF�IGPG�\GbG�dGlG�[GmG�cDnG�~w^Y�pGzG�NHzO�PPuP�PFQ�RQXQ�ZQvQ�QQwQ�FPxQ�{QAR�CRaR�zQbR�EPcR�|GdR�~w^Y�fRsR�GSzV�DWLW�fWkW�WFX�JXQX�SXUX�IXVX�YX_X�aX}X�XX~X�HXX�~W@Y�XY^Y�aYgY�iYqY�`YrY�WYsY�uRtY�~w^Y�vYDZ�XZx^�B_J_�d_i_�}_D`�H`P`�R`f`�G`g`�j`q`�s`v`�i`w`�F`x`�|_y`�QaWa�baia�ua{a�}aEb�taFb�YaGb�PaHb�FZIb�~w^Y�Kbab�ub|f�FgOg�cbPg�~w^Y�Rghg�|gck�mkuk�OlTl�hlol�sl{l�}lQm�rlRm�Um\m�^mam�Tmbm�qlcm�gldm�|mBn�MnTn�`nfn�hnpn�_nqn�Dnrn�{msn�jgtn�~w^Y�vnJo�Uo\o�poxo�DpXp�goYp�gpnq�Looq�~w^Y�qq}q�Orxr�BsIs�]ses�qsEt�TsFt�TtFu�qGu�~w^Y�IuUu�iuOz�Yzaz�yzz�J{Q{�]{c{�e{m{�\{n{�A{o{�xzp{�Wuq{�~w^Y�s{}{�Q|UB�_BgB�BEC�PCXC�dCAD�GCBD�~BCD�{DD�~w^Y�FDUD�`DgD�sDyD�{DCE�rDDE�WEUH�cHmI�WDnI�~w^Y�pIyI�DJLJ�]J_K�yK~K�mLqM�sMBO�lLCO�POVO�XOvO�OOwO�zO@P�BP`P�yOaP�NObP�ZLcP�uP{P�}P[Q�tP\Q�nQtQ�vQTR�mQUR�hRnR�pRNS�gROS�bShS�jSHT�aSIT�mTuT�IUQU�SUfU�HUgU�AVFV�^VbV�eVkV�mVKW�dVLW�]VMW�dTNW�fWlW�nWLX�eWMX�PX\X�_XmX�pXvX�xX@Y�oXAY�^XBY�OXCY�dWDY�SYYY�RYZY�ZW[Y�NL\Y�{I]Y�~w^Y�HZdZ�oZC[�T[A\�K\S\�`\h\�j\~\�_\\�B]J]�L]^]�A]_]�^\`]�@Za]�}][^�f^y^�J_N`�X```�z``�PaVa�Ya`a�daja�lata�caua�@bGb�SbYb�[bcb�Rbdb�waeb�bafb�Xagb�Oahb�wb}b�vb~b�u]b�]cpc�ycWd�kdue�weaf�jdbf�lftf�NgSg�dgjg�mgsg�ug}g�lg~g�cgg�NhTh�MhUh�ScVh�rhPi�[ini�xi@j�Zj_j�pjvj�AkIk�]kyk�{kGm�\kHm�bmgm�QnUo�_ofo�roxo�zoBp�qoCp�AnDp�Zpap�upsq�uqmr�tpnr�zr@s�BsJs�yrKs�QpLs�bsis�}sAu�Cu{u�|s|u�HvNv�PvXv�GvYv�YsZv�sv|v�PwUx�WxLy�OwMy�jvNy�wmOy�xjPy�ojQy�jhRy�oYSy�ugTy�[Uy�^[Vy�GWy�pyXz�azt{�{q|�E}I~�K~q~�D}r~�|~D�THT�U[�fn�JA�VAiA�]jA�THT�lAuA�@BHB�YBQC�]CeC�wAfC�THT�hCuC�@DHD�\DEE�GEOF�[DPF�wCQF�THT�SF[F�oF}J�RKZK�mK`O�IKaO�lOtO�APHP�[PaP�lPtP�HQFR�HRYR�GQZR�cP[R�ZP\R�kRqR�jRrR�KPsR�ESKS�VS^S�oSRT�MSST�DSTT�cTiT�bTjT�uRkT�JPlT�@PmT�TMU�XU`U�sUFX�TXxX�OUyX�~TzX�IYWY�HYXY�oTYY�OZY�cO[Y�HK\Y�]F]Y�THT�_YpY�{YCZ�OZcZ�wZh[�j[{\�vZ|\�rY}\�THT�\H]�Z][^�w^}^�H_P_�d_j`�l`v`�c_w`�^x`�v^y`�HaNa�GaOa�g^Pa�baha�sa{a�Nb}d�ja~d�aad�NeTe�MeUe�RaVe�f^We�J]Xe�THT�Zece�neue�AfGf�If_f�@f`f�sfFj�eeGj�THT�IjVj�ajhj�tjzj�|jRk�sjSk�gkwl�ylAn�fkBn�XjCn�THT�EnOn�Znan�mnsn�un}n�ln~n�Oo_p�Qn`p�THT�bpop�zpAq�Uq]q�iq{q�LrAs�LqBs�VsLt�Ntkt�Uslt�qpmt�THT�otut�@uHu�Yu[v�uvzv�RwXw�cwkw�ww|w�Zw}w�Qw~w�wtw�THT�AxJx�Uxvx�JyPz�Rz`{�Iya{�Lxb{�THT�d{q{�|{]|�p|Y@�s{Z@�THT�\@j@�~@~D�REZE�\EuE�QEvE�PFUF�mFsF�vF|F�~F_G�uF`G�lFaG�l@bG�THT�dGrG�}GDH�UHxH�DIJI�LIfI�CIgI�tGhI�THT�jIAJ�LJTJ�eJJK�^KfK�hK{K�]K|K�VL[L�sLyL�DMKM�WM]M�_MyM�VMzM�{L{M�rL|M�CJ}M�THT�MHN�SNZN�nNwO�yO^P�mN_P�kPqP�sPET�jPFT�JNGT�THT�WT]T�VT^T�xT}T�[UdU�ZUeU�vUU�OVVV�XVaV�NVbV�vVXW�uVYW�AVZW�uU[W�MU\W�kWW`�EUX`�p`y`�o`z`�NaMb�MaNb�b`Ob�sbIc�Tcjc�xcod�ydAe�[e`e�BfJf�^fig�kgBh�]fCh�yeDh�Xh`h�lhwh�Higi�Ohhi�peii�kbji�Ijjj�ujCk�MkUk�hkZp�npvp�xpPq�mpQq�kqpq�HrNr�Yrar�urms�osmt�trnt�ztWu�eu`v�Prav�Grbv�Ajcv�{vUw�`wlw�vw~w�OxFy�RyZy�sv[y�`b\y�dy]y�}^y�ey{y�|y�
|y��Krc$�BM�x�t|t��s�td|xsdzdz|d|xsdzdzdddgd�dd	id
ddd
id��dddgdd
dd�d��dddgdd
dd�d��dddd��ddddd
idd��dd d!gddd
id��d"gd#�d$dd%d&d'd
d(d)id(d*igd+�d,�d-d.dd	d/dd0d1gd	d2ddd
id3�dd4d5gdd
id6�dd7d5gdd
id6�dd8d9gd:�d;�d<�id=�gd>��d?gd@�dd	dAdBdid%d&d'd
d(d)id(d*igd+�gidCdd
iidD��dEgdF�dd	dAd(d)idBdGigidCddd
id�idD��dHgdI�ddJ��dKgdL�dd	dAd(d)idBdGigidCddd
id�idD��dMdd
d)d�dNdO��dPdQdd
d)d�dRd��dSgdT�ddCddd
id�idU��dVgdW�ddCd
dXd�idU��dYddd
igdZ�d[d\��d]dd^d	d_d`gdadbdcddgdd	dedd
iidegdf�dgdhdidd	djdAdd
iddd
id�giidjgdk�gd>�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dd(dlid	dmdgdhdidd	djdAdd
iddd
id�giidjgdk�idn�dgdhdidd	djdAdd
iddd
id�giidjgdk�dodpdd
iiigdjgdq�dr�ds��d%d&d'd
d(d)id(d*igd+�dgdhdidd	djdAdd
iddd
id�giidjgdk�dadbdcddgdd	dedd
iidegdf�d-d.dd	d/dd0d1gd	d2ddd
id3�dd4d5gdd
id6�dd7d5gdd
id6�dd8d9gd:�d;�d<�id=�dt�du�d�v��t|t�}|�"r�t|j	��}d
|vr�|jd
�|d
}t|ttf�s)td|xsdzdwz|d|xsdzdxzddd
id�d�v��t|ttf�}|r�t|�}t|�D]q\}}	t|	t�r�td|xsdzdyjd�it���zdzz|	d|xsdzdyjd�it���zdzdd
id�v��d|v�rv|jd�|d}
t|
ttf�s-td|xsdzd{z|
d|xsdzd|zddgdd
dd�d�d�v��t|
ttf�}|�rt|
�}t|
�D]�\}
}t|t�s]td|xsdzd}jd�it���zdzz|d|xsdzd}jd�it���zdzd
dd�d�v��t|t�s��|d|�r��td|xsdzd}jd�it���zd~z|d|xsdzd}jd�it���zdzd
dd�d(�v��d|v�rv|jd�|d}t|ttf�s-td|xsdzdz|d|xsdzd�zddgdd
dd�d�d�v��t|ttf�}|�rt|�}t|�D]�\}}t|t�s]td|xsdzd�jd�it���zdzz|d|xsdzd�jd�it���zdzd
dd�d�v��t|t�s��|d|�r��td|xsdzd�jd�it���zd~z|d|xsdzd�jd�it���zdzd
dd�d(�v��d|vrM|jd�|d}t|t�s'td|xsdzd�z|d|xsdzd�zddd�d�v��d|vr�|jd�|d}t|ttf�s+td|xsdzd�z|d|xsdzd�zdddd
idd�d�v��t|ttf�}|r�t|�}t|�D]q\}}t|t�r�td|xsdzd�jd�it���zdzz|d|xsdzd�jd�it���zdzdd
id�v��d|vr�|jd�|d}t|ttf�s,td|xsdzd�z|d|xsdzd�zd d!gddd
id�d�v��t|ttf�}|r�t|�}t|�D]q\}}t|t�r�td|xsdzd�jd�it���zdzz|d|xsdzd�jd�it���zdzdd
id�v��d"|v�ro|jd"�|d"}d�} | d�kr�	t|ttf�s4td|xsdzd�z|d|xsdzd�zd$dd%d&d'd
d(d)id(d*igd+�d,�d�v��t|ttf�}!|!rJt|�}"t|�D]1\}#}$t|$||xsdd�jd�it���z��3| d�z
} | d�kr	t|||xsdd�z�| d�z
} | d�k7r|td|xsdzd�zd�t| �zd�zz|d|xsdzd�zgd#�d$dd%d&d'd
d(d)id(d*igd+�d,�d-d.dd	d/dd0d1gd	d2ddd
id3�dd4d5gdd
id6�dd7d5gdd
id6�dd8d9gd:�d;�d<�id=�gd>�dA�v��d?|v�r�|jd?�|d?}%t|%t�sBtd|xsdzd�z|%d|xsdzd�zgd@�dd	dAdBdid%d&d'd
d(d)id(d*igd+�gidCdd
iidD�d�v��t|%t�}&|&�r t|%j	��}'|%j!�D]�\}(})t"dCj%|(�s�|(|'vr|'j|(�t|)t�r�Etd|xsdzd�jd�it���zdzz|)d|xsdzd�jd�it���zdzdd
id�v��|'rQtd|xsdzd�zt|'�zd�z|%d|xsdzd�zgd@�dd	dAdBdid%d&d'd
d(d)id(d*igd+�gidCdd
iidD�d��v��t|%�}*|*d�k7r�d�}+|%D]�}(	d�},|,d�kr1	|(dk7r&td|xsdzd�z|(d|xsdzd�zdBdidB�v��|,d�z
},|,d�kr	t|(||xsdd�z�|,d�z
},|,d�k7rHtd|xsdzd�zd�t|,�zd�zz|(d|xsdzd�zdAdBdid%d&d'd
d(d)id(d*igd+�gidA�v����|+sBtd|xsdzd�z|%d|xsdzd�zgd@�dd	dAdBdid%d&d'd
d(d)id(d*igd+�gidCdd
iidD�d��v��dE|v�rX|jdE�|dE}-t|-t�s;td|xsdzd�z|-d|xsdzd�zgdF�dd	dAd(d)idBdGigidCddd
id�idD�d�v��t|-t�}.|.�r�t|-j	��}/|-j!�D�]L\}0}1t"dCj%|0�s� |0|/vr|/j|0�t|1ttf�s_td|xsdzd�jd�it���zd�z|1d|xsdzd�jd�it���zdzddd
id�d�v��t|1ttf�}2|2s��t|1�}3t|1�D]q\}4}5t|5t�r�td|xsdzd�jd�it���zdzz|5d|xsdzd�jd�it���zdzdd
id�v����O|/rJtd|xsdzd�zt|/�zd�z|-d|xsdzd�zgdF�dd	dAd(d)idBdGigidCddd
id�idD�d��v��t|-�}6|6d�k7�rd�}7|-D]�}0	d�}8|8d�krG	t|0t�r1|d)|0�s&td|xsdzd�z|0d|xsdzd�zd(d)id(�v��|8d�z
}8|8d�kr1	|0dGk7r&td|xsdzd�z|0d|xsdzd�zdBdGidB�v��|8d�z
}8|8d�k7r>td|xsdzd�zd�t|8�zd�zz|0d|xsdzd�zdAd(d)idBdGigidA�v����|7s;td|xsdzd�z|-d|xsdzd�zgdF�dd	dAd(d)idBdGigidCddd
id�idD�d��v��dH|vrO|jdH�|dH}9t|9t�s)td|xsdzd�z|9d|xsdzd�zgdI�ddJ�d�v��dK|v�rX|jdK�|dK}:t|:t�s;td|xsdzd�z|:d|xsdzd�zgdL�dd	dAd(d)idBdGigidCddd
id�idD�d�v��t|:t�};|;�r�t|:j	��}<|:j!�D�]L\}=}>t"dCj%|=�s� |=|<vr|<j|=�t|>ttf�s_td|xsdzd�jd�it���zd�z|>d|xsdzd�jd�it���zdzddd
id�d�v��t|>ttf�}?|?s��t|>�}@t|>�D]q\}A}Bt|Bt�r�td|xsdzd�jd�it���zdzzBd|xsdzd�jd�it���zdzdd
id�v����O|<rJtd|xsdzd�zt|<�zd�z|:d|xsdzd�zgdL�dd	dAd(d)idBdGigidCddd
id�idD�d��v��t|:�}C|Cd�k7�rd�}D|:D]�}=	d�}E|Ed�krG	t|=t�r1|d)|=�s&td|xsdzd�z|=d|xsdzd�zd(d)id(�v��Ed�z
}EEd�kr1	|=dGk7r&td|xsdzd�z|=d|xsdzd�zdBdGidB�v��Ed�z
}EEd�k7r>td|xsdzd�zd�tE�zd�zz|=d|xsdzd�zdAd(d)idBdGigidA�v����Ds;td|xsdzd�z|:d|xsdzd�zgdL�dd	dAd(d)idBdGigidCddd
id�idD�d��v��dM|v�rt|jdM�|dM}Ft|Fttf�s+td|xsdzd�zFd|xsdzd�zdd
d)d�dNdO�d�v��tFttf�}G|G�rtF�}Ht|F�D]�\}I}Jt|Jt�s]td|xsdzd�jd�it���zdzzJd|xsdzd�jd�it���zdzd
d)d�d�v��tJt�s��|d)J�r��td|xsdzd�jd�it���zd�zJd|xsdzd�jd�it���zdzd
d)d�d(�v��dP|v�ru|jdP�|dP}Kt|Kttf�s,td|xsdzd�zKd|xsdzd�zdQdd
d)d�dRd�d�v��tKttf�}L|L�rtK�}Mt|K�D]�\}N}Ot|Ot�s]td|xsdzd�jd�it���zdzzOd|xsdzd�jd�it���zdzd
d)d�d�v��tOt�s��|d)O�r��td|xsdzd�jd�it���zd�zOd|xsdzd�jd�it���zdzd
d)d�d(�v��dS|v�r�|jdS�|dS}Pt|Pt�s1td|xsdzd�zPd|xsdzd�zgdT�ddCddd
id�idU�d�v��tPt�}Q|Q�rytPj	��}R|Pj!�D�]L\}S}Tt"dCj%|S�s� SRvrRjS�tTttf�s_td|xsdzd�jd�it���zd�zTd|xsdzd�jd�it���zdzddd
id�d�v��tTttf�}U|Us��tT�}Vt|T�D]q\}W}Xt|Xt�r�td|xsdzd�jd�it���zdzzXd|xsdzd�jd�it���zdzdd
id�v����OdV|v�r�|jdV�|dV}Yt|Yt�s/td|xsdzd�zYd|xsdzd�zgdW�ddCd
dXd�idU�d�v��tYt�}Z|Z�rFtYj	��}[|Yj!�D�]\}\}]t"dCj%|\�s� \[vr[j\�t]t�s]td|xsdzd�jd�it���zdzz]d|xsdzd�jd�it���zdzd
dXd�d�v��t]t�s��|dX]�r��td|xsdzd�jd�it���zd�z]d|xsdzd�jd�it���zdzd
dXd�d(�v��dY|vr�|jdY�|dY}^t|^ttf�s-td|xsdzd�z^d|xsdzd�zddd
igdZ�d[d\�d�v��t^ttf�}_|_r�t^�}`t|^�D]q\}a}bt|bt�r�td|xsdzd�jd�it���zdzzbd|xsdzd�jd�it���zdzdd
id�v��d]|v�rD|jd]�|d]}ct|ct�s�td|xsdzd�zcd|xsdzd�zdd^d	d_d`gdadbdcddgdd	dedd
iidegdf�dgdhdidd	djdAdd
iddd
id�giidjgdk�gd>�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dd(dlid	dmdgdhdidd	djdAdd
iddd
id�giidjgdk�idn�dgdhdidd	djdAdd
iddd
id�giidjgdk�dodpdd
iiigdjgdq�dr�ds�d�v��tct�}d|d�rtcj	��}ed�|evr�ejdǫcd�}fd�}g|gd�kr	t'f||xsdd�z�gd�z
}ggd�kr	t)f||xsdd�z�gd�z
}ggd�k7rbtd|xsdzd�zd�tg�zd�zzfd|xsdzd�zd_d`gdadbdcddgdd	dedd
iidegdf�dgdhdidd	djdAdd
iddd
id�giidjgdk�gd>�dA�v��d�evr*ejdʫcd�}ht)|h||xsdd�z�d�evr*ejd̫cd�}it)|i||xsdd�z�d�evr*ejdΫcd�}jt)|j||xsdd�z�d�evr*ejdЫcd�}kt)|k||xsdd�z�d�ev�r�ejdҫcd�}lt|lt�sCtd|xsdzd�zld|xsdzd�zdd(dlid	dmdgdhdidd	djdAdd
iddd
id�giidjgdk�idn�d�v��tlt�}m|m�rtlj	��}n|lj!�D]_\}o}pt"dmj%|o�s�onvrnjo�t)p||xsdd�jd�it���z��anrRtd|xsdzd�ztn�zd�zld|xsdzd�zdd(dlid	dmdgdhdidd	djdAdd
iddd
id�giidjgdk�idn�d��v��tl�}q|qd�k7r�d�}rlD]D}o	tot�r1|dlo�s&td|xsdzd�zod|xsdzd�zd(dlid(�v���FrsCtd|xsdzd�zld|xsdzd�zdd(dlid	dmdgdhdidd	djdAdd
iddd
id�giidjgdk�idn�d��v��d�ev�rvejd٫cd��xd�}s|ss	t)�x||xsdd�z�sd�z
}sss�	t�xt�}t|trit�xj	��}udp|uvrLujdp��xdp}vt|vt�s&td|xsdzd�zvd|xsdzd�zdd
id�v��sd�z
}sssFtd|xsdzd�z�xd|xsdzd�zdgdhdidd	djdAdd
iddd
id�giidjgdk�dodpdd
iiigdjgdq�dެv��t�xt�}t|tret�x�}wt+�xfd߄d�D��sFtd|xsdzd�z�xd|xsdzd�zdgdhdidd	djdAdd
iddd
id�giidjgdk�dodpdd
iiigdjgdq�d�v��e�rtd|xsdzd�zte�zd�zcd|xsdzd�zdd^d	d_d`gdadbdcddgdd	dedd
iidegdf�dgdhdidd	djdAdd
iddd
id�giidjgdk�gd>�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dd(dlid	dmdgdhdidd	djdAdd
iddd
id�giidjgdk�idn�dgdhdidd	djdAdd
iddd
id�giidjgdk�dodpdd
iiigdjgdq�dr�ds�d��v��|�r�td|xsdzd�zt|�zd�z|d|xsdzdzdddgd�dd	id
ddd
id��dddgdd
dd�d��dddgdd
dd�d��dddd��ddddd
idd��dd d!gddd
id��d"gd#�d$dd%d&d'd
d(d)id(d*igd+�d,�d-d.dd	d/dd0d1gd	d2ddd
id3�dd4d5gdd
id6�dd7d5gdd
id6�dd8d9gd:�d;�d<�id=�gd>��d?gd@�dd	dAdBdid%d&d'd
d(d)id(d*igd+�gidCdd
iidD��dEgdF�dd	dAd(d)idBdGigidCddd
id�idD��dHgdI�ddJ��dKgdL�dd	dAd(d)idBdGigidCddd
id�idD��dMdd
d)d�dNdO��dPdQdd
d)d�dRd��dSgdT�ddCddd
id�idU��dVgdW�ddCd
dXd�idU��dYddd
igdZ�d[d\��d]dd^d	d_d`gdadbdcddgdd	dedd
iidegdf�dgdhdidd	djdAdd
iddd
id�giidjgdk�gd>�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dgdhdidd	djdAdd
iddd
id�giidjgdk�dd(dlid	dmdgdhdidd	djdAdd
iddd
id�giidjgdk�idn�dgdhdidd	djdAdd
iddd
id�giidjgdk�dodpdd
iiigdjgdq�dr�ds��d%d&d'd
d(d)id(d*igd+�dgdhdidd	djdAdd
iddd
id�giidjgdk�dadbdcddgdd	dedd
iidegdf�d-d.dd	d/dd0d1gd	d2ddd
id3�dd4d5gdd
id6�dd7d5gdd
id6�dd8d9gd:�d;�d<�id=�dt�du�d��v��|S#t$rY���wxYw#t$rY���wxYw#t$rY��^wxYw#t$rY��OwxYw#t$rd	}+Y���wxYw#t$rY��9wxYw#t$rY��wxYw#t$rd	}7Y���wxYw#t$rY���wxYw#t$rY���wxYw#t$rd	}DY��/wxYw#t$rY�	� wxYw#t$rY�	�wxYw#t$rd	}rY���wxYw#t$rY���wxYw#t$rY��hwxYw)�Nrr
rrr�r�r�rFr�rrrrxr�r�r�r-rfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�rrrrrrrrrrr	r3r
rrrEr�r�rFrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rzr�r�r�r�r�r�r�r�r�r�r�r�r8r�r�rr�r%r?r�r�r�rrrz.platforms must be arrayz
.platformsz.platforms[{data__platforms_x}]r$z.provides must be arrayz	.providesz.provides[{data__provides_x}]z must be pep508-identifierz.obsoletes must be arrayz
.obsoletesz.obsoletes[{data__obsoletes_x}]z.zip-safe must be booleanz	.zip-safez.script-files must be arrayz
.script-filesz$.script-files[{data__scriptfiles_x}]z.eager-resources must be arrayz.eager-resourcesz*.eager-resources[{data__eagerresources_x}]r�z.packages must be arrayz	.packagesz.packages[{data__packages_x}]rz1.packages must be valid exactly by one definition� (� matches found)z.package-dir must be objectz.package-dirz#.package-dir.{data__packagedir_key}z.package-dir must not contain r%r$Tz/.package-dir must be same as const definition: z4.package-dir must be valid exactly by one definitionz5.package-dir must be named by propertyName definitionrqz.package-data must be objectz
.package-dataz%.package-data.{data__packagedata_key}� must be arrayz@.package-data.{data__packagedata_key}[{data__packagedata_val_x}]z.package-data must not contain z(.package-data must be python-module-namez1.package-data must be same as const definition: *z5.package-data must be valid exactly by one definitionz6.package-data must be named by propertyName definitionz%.include-package-data must be booleanz.include-package-dataz$.exclude-package-data must be objectz.exclude-package-dataz4.exclude-package-data.{data__excludepackagedata_key}zV.exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]z'.exclude-package-data must not contain z0.exclude-package-data must be python-module-namez9.exclude-package-data must be same as const definition: *z=.exclude-package-data must be valid exactly by one definitionz>.exclude-package-data must be named by propertyName definitionz!.namespace-packages must be arrayz.namespace-packagesz0.namespace-packages[{data__namespacepackages_x}]� must be python-module-namez.py-modules must be arrayz.py-modulesz .py-modules[{data__pymodules_x}]z.data-files must be objectz.data-filesz!.data-files.{data__datafiles_key}z:.data-files.{data__datafiles_key}[{data__datafiles_val_x}]z.cmdclass must be objectz	.cmdclassz.cmdclass.{data__cmdclass_key}z$ must be python-qualified-identifierz.license-files must be arrayz.license-filesz&.license-files[{data__licensefiles_x}]z.dynamic must be object�.dynamicr.z.dynamic.versionz8.dynamic.version must be valid exactly by one definitionr]z.dynamic.classifiersrz.dynamic.descriptionrrz.dynamic.dependenciesrmz.dynamic.entry-pointsrvz-.dynamic.optional-dependencies must be objectz.dynamic.optional-dependencieszH.dynamic.optional-dependencies.{data__dynamic__optionaldependencies_key}z0.dynamic.optional-dependencies must not contain z8.dynamic.optional-dependencies must be python-identifierzG.dynamic.optional-dependencies must be named by propertyName definitionr4z.dynamic.readmez+.dynamic.readme.content-type must be stringz.dynamic.readme.content-typez5.dynamic.readme cannot be validated by any definitionr7c3�&�K�|]}|�v���
y�wrr)rr �data__dynamic__readmes  �rr"zYvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html.<locals>.<genexpr>�s�����"V�X�T�4�+@�#@�X�r#�r8z0.dynamic.readme must contain ['file'] propertiesr&z.dynamic must not contain r&r)r'r(rr)r*r+r.r/r,r0r1rr2�bool�`validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_package_name�bvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_find_directiver�REGEX_PATTERNS�search�bvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_attr_directive�bvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directiver-)yr
rrr6r7�data__platforms�data__platforms_is_list�data__platforms_len�data__platforms_x�data__platforms_item�data__provides�data__provides_is_list�data__provides_len�data__provides_x�data__provides_item�data__obsoletes�data__obsoletes_is_list�data__obsoletes_len�data__obsoletes_x�data__obsoletes_item�
data__zipsafe�data__scriptfiles�data__scriptfiles_is_list�data__scriptfiles_len�data__scriptfiles_x�data__scriptfiles_item�data__eagerresources�data__eagerresources_is_list�data__eagerresources_len�data__eagerresources_x�data__eagerresources_item�data__packages�data__packages_one_of_count1�data__packages_is_list�data__packages_len�data__packages_x�data__packages_item�data__packagedir�data__packagedir_is_dict�data__packagedir_keys�data__packagedir_key�data__packagedir_val�data__packagedir_len�data__packagedir_property_names�"data__packagedir_key_one_of_count2�data__packagedata�data__packagedata_is_dict�data__packagedata_keys�data__packagedata_key�data__packagedata_val�data__packagedata_val_is_list�data__packagedata_val_len�data__packagedata_val_x�data__packagedata_val_item�data__packagedata_len� data__packagedata_property_names�#data__packagedata_key_one_of_count3�data__includepackagedata�data__excludepackagedata� data__excludepackagedata_is_dict�data__excludepackagedata_keys�data__excludepackagedata_key�data__excludepackagedata_val�$data__excludepackagedata_val_is_list� data__excludepackagedata_val_len�data__excludepackagedata_val_x�!data__excludepackagedata_val_item�data__excludepackagedata_len�'data__excludepackagedata_property_names�*data__excludepackagedata_key_one_of_count4�data__namespacepackages�data__namespacepackages_is_list�data__namespacepackages_len�data__namespacepackages_x�data__namespacepackages_item�data__pymodules�data__pymodules_is_list�data__pymodules_len�data__pymodules_x�data__pymodules_item�data__datafiles�data__datafiles_is_dict�data__datafiles_keys�data__datafiles_key�data__datafiles_val�data__datafiles_val_is_list�data__datafiles_val_len�data__datafiles_val_x�data__datafiles_val_item�data__cmdclass�data__cmdclass_is_dict�data__cmdclass_keys�data__cmdclass_key�data__cmdclass_val�data__licensefiles�data__licensefiles_is_list�data__licensefiles_len�data__licensefiles_x�data__licensefiles_item�
data__dynamic�data__dynamic_is_dict�data__dynamic_keys�data__dynamic__version�$data__dynamic__version_one_of_count5�data__dynamic__classifiers�data__dynamic__description�data__dynamic__dependencies�data__dynamic__entrypoints�#data__dynamic__optionaldependencies�+data__dynamic__optionaldependencies_is_dict�(data__dynamic__optionaldependencies_keys�'data__dynamic__optionaldependencies_key�'data__dynamic__optionaldependencies_val�'data__dynamic__optionaldependencies_len�2data__dynamic__optionaldependencies_property_names�#data__dynamic__readme_any_of_count6�data__dynamic__readme_is_dict�data__dynamic__readme_keys�"data__dynamic__readme__contenttype�data__dynamic__readme_lenrTsy                                                                                                                        @rr5r5hs�w����d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�eM�VU�`{�Na�ks�MR�bAn�cn�y@�LR�T\�K]�p^�bAn�`j�@�B^�~_�ip�DL�Xk�{l�lm�bAn�oz�O}�[�N\�fm�AI�Uh�xi�|j�bAn�lv�HN�Xa�xb�bAn�dr�DB�LS�_e�go�^p�~q�tr�bAn�tE�Zb �d b!�Yc!�m!t!�@"F"�H"P"�!Q"�GR"�bAn�T"^"�r"^*�t*Y+�c+j+�}+Y,�d,x,�I-v-�@.H.�U.].�_.s.�T.t.�w..�A/S/�v.T/�S.U/�u+V/�j*W/�a//�J0]0�g0o0�I1N1�_1e1�p1x1�L2h2�j2v3�K2w3�Q4V4�@5D6�N6U6�a6g6�i6q6�`6r6�p4s6�I7P7�d7b8�d8\9�c7]9�i9o9�q9y9�h9z9�@7{9�Q:X:�l:p;�r;j<�k:k<�w<}<�<G=�v<H=�H:I=�b=k=�=D?�F?{?�~=|?�Y=}?�f4~?�g1?�^1@@�Y/A@�i*B@�`"C@�bAn�E@R@�f@YD�cDkD�EEJE�^EeE�iEpE�rEtE�hEuE�E[F�fFzF�KGxG�BHJH�WH_H�aHuH�VHvH�yHAI�CIUI�xHVI�UHWI�wEXI�gEYI�]EZI�rIxI�{IAJ�CJKJ�zILJ�qIMJ�T@NJ�bAn�PJ^J�rJRO�\OdO�~OCP�WP^P�bPjP�lP@Q�aPAQ�DQKQ�MQPQ�CQQQ�`PRQ�VPSQ�kQqQ�|QCR�ORUR�WR_R�NR`R�sQaR�jQbR�`JcR�bAn�eR{R�OSVW�`WiW�}RjW�bAn�lWBX�VX}[�G\O\�i\n\�B]I]�M]U]�W]k]�L]l]�o]v]�x]{]�n]|]�K]}]�A]~]�V^\^�g^n^�z^@_�B_J_�y^K_�^^L_�U^M_�DXN_�bAn�P_d_�o_v_�J`R`�^`r`�A`s`�AaHb�f_Ib�bAn�KbWb�ibRc�\ccc�wcc�Kd_d�nc`d�nd`e�Ybae�bAn�ceoe�Cfij�sj{j�SkYk�dkkk�wk}k�kGl�vkHl�[kIl�RkJl�qeKl�bAn�MlWl�klor�yrAs�Ys_s�jsrs�~s[t�as\t�Xs]t�Yl^t�bAn�`tot�ztAu�MuSu�Uu]u�Lu^u�quox�}xGz�qtHz�bAn�JzSz�^zfz�wzy{�S|X|�G}K~�M~\�F}]�sF@�O@m@�AAKB�MBwB�@AxB�BCJC�dCiC�zC@D�CDID�KDSD�BDTD�yCUD�dDjD�cDkD�ilD�vDTE�_ErE�CFGG�QGYG�sGxG�IHOH�RHYH�]HcH�eHmH�\HnH�yH@I�LIRI�TI\I�KI]I�pH^I�[H_I�QH`I�HHaI�pIvI�oIwI�nDxI�hyI�t|zI�SJqJ�|JOK�`KdL�nLvL�PMUM�fMlM�oMvM�zM@N�BNJN�yMKN�VN]N�iNoN�qNyN�hNzN�MN{N�xM|N�nM}N�eM~N�MOSO�LOTO�KJUO�nOLP�WPjP�{PQ�IRQR�kRpR�ASGS�JSQS�US[S�]SeS�TSfS�qSxS�DTJT�LTTT�CTUT�hSVT�SSWT�ISXT�@SYT�hTnT�gToT�fOpT�JUhU�sUFV�WV[W�eWmW�GXLX�]XcX�fXmX�qXwX�yXAY�pXBY�MYTY�`YfY�hYpY�_YqY�DYrY�oXsY�eXtY�\XuY�DZJZ�CZKZ�BULZ�fZD[�O[b[�s[w\�A]I]�c]h]�y]]�B^I^�M^S^�U^]^�L^^^�i^p^�|^B_�D_L_�{^M_�`^N_�K^O_�A^P_�x]Q_�`_f_�__g_�^Zh_�L`T`�h`p`�r`Ea�g`Fa�`aea�}aAb�Kbib�tbGc�Xc\d�fdnd�HeMe�^ede�gene�rexe�zeBf�qeCf�NfUf�afgf�ifqf�`frf�Efsf�petf�feuf�]evf�EgKg�DgLg�CbMg�|aNg�C`Og�ngLh�Whjh�{hi�IjQj�kjpj�AkGk�JkQk�Uk[k�]kek�Tkfk�qkxk�DlJl�LlTl�ClUl�hkVl�SkWl�IkXl�@kYl�hlnl�glol�fgpl�sll�BmPm�SmYm�[mcm�Rmdm�Amem�rlfm�eggm�vm|m�um}m�[g~m�h|m�Uz@n�bAn�knGo�Rofo�wodp�npvp�CqKq�Mqaq�Bqbq�eqmq�oqAr�dqBr�AqCr�cnDr�`r~r�Is\s�msqt�{tCu�]ubu�suyu�|uCv�GvMv�OvWv�FvXv�cvjv�vv|v�~vFw�uvGw�ZvHw�EvIw�{uJw�ruKw�Zw`w�Ywaw�Xrbw�@xSx�\xzx�NyXz�ZzD{�MyE{�O{W{�q{v{�G|M|�P|V|�X|`|�O|a|�F|b|�q|w|�p|x|�vwy|�U}s}�~}Q~�[~c~�}~B�SY�dl�@@\@�^@jA�kA�EBJB�tBxC�BDID�UD[D�]DeD�TDfD�dBgD�}DDE�XEVF�XFPG�WEQG�]GcG�eGmG�\GnG�tDoG�EHLH�`HdI�fI^J�_H_J�kJqJ�sJ{J�jJ|J�|G}J�VK_K�sKxL�zLoM�rKpM�MKqM�ZBrM�[sM�RtM�M}uM�RnvM�YwM�~MDN�EN�	EN��d�D�)�L����	�	��$�	��)�#����[�)�"�;�/�O��o��e�}�=�.�r�[�5J�F�/K�Nh�/h�p�GI�MX�Mb�\b�Gc�fr�Gr�HO�[a�ck�Zl�m�tz�{�{�&0��4��-�&P�#�&�&)�/�&:�#�?H��?Y�;�%�';�%�&:�S�B�6�r�[�=R�F�7S�V~�Vw�V~�V~�WK�BH�BJ�WK�8K�N_�8_�g{�BD�HS�H]�W]�B^�aI�aB�aI�aI�aU�LR�LT�aU�BU�XZ�BZ�hn�px�gy�@F�G�G�@Z���"����Z�(�!�*�-�N��n�t�U�m�<�.�r�[�5J�F�/K�Ng�/g�o}�EG�KV�K`�Z`�Ea�do�Eo�OP�Rn�No�y@�T\�h{�K|�|}�DJ�K�K�%/���u�
�%N�"�%�%(��%8�"�=F�~�=V�9�$�&9�%�&9�C�A�6�r�[�=R�F�7S�V|�Vu�V|�V|�WI�@F�@H�WI�8I�L]�8]�ex�A�EP�EZ�TZ�[�^D�^}�^D�^D�^P�GM�GO�^P�P�SU�U�ks�R�bS�Z`�a�a�!�"5�s�;�B�~�.A�B�CV�W�":�2��AV�PV�;W�[A�Zy�[A�[A�[M�DJ�DL�[M�<M�Pl�<l�tG�NP�T_�Ti�ci�Nj�mS�mL�mS�mS�m_�V\�V^�m_�N_�bd�Nd�zB�Na�qb�iq�#r�r�>W��)�#����[�)�"�;�/�O��o��e�}�=�.�r�[�5J�F�/K�Nh�/h�p�GI�MX�Mb�\b�Gc�fr�Gr�R@�B^�Q_�ip�DL�Xk�{l�m�tz�{�{�&0��4��-�&P�#�&�&)�/�&:�#�?H��?Y�;�%�';�%�&:�S�B�6�r�[�=R�F�7S�V~�Vw�V~�V~�WK�BH�BJ�WK�8K�N_�8_�g{�BD�HS�H]�W]�B^�aI�aB�aI�aI�aU�LR�LT�aU�BU�XZ�BZ�px�DW�gX�_e�f�f�!�"6��<�B�~�.A�B�CW�X�":�2��AV�PV�;W�[C�Z{�[C�[C�[O�FL�FN�[O�<O�Rn�<n�vJ�QS�Wb�Wl�fl�Qm�pX�pQ�pX�pX�pd�[a�[c�pd�Qd�gi�Qi�G�Sf�vg�nv�#w�w�@Z���"����Z�(� ��,�M��m�d�4�.�r�[�5J�F�/K�Ni�/i�q~�FH�LW�La�[a�Fb�ep�Fp�MS�]f�}g�nt�u�u��Y�&����^�,� $�^� 4���/�$���?�.�r�[�5J�F�/K�Nk�/k�tE�LN�R]�Rg�ag�Lh�kz�Lz�WU�_f�rx�zB�qC�QD�GE�LR�S�S�(2�3D�t�U�m�(T�%�(�(+�,=�(>�%�CL�M^�C_�?�'�)?�%�&<�s�D�6�r�[�=R�F�7S�WD�V|�WD�WD�WP�GM�GO�WP�8P�Sd�8d�lB�IK�OZ�Od�^d�Ie�hU�hN�hU�hU�ha�X^�X`�ha�Ia�df�If�tz�|D�sE�LR�S�S�D`��	�)����.�/�#'�(9�#:� ��2�T�5�M�B�.�r�[�5J�F�/K�Nn�/n�wK�RT�Xc�Xm�gm�Rn�qC�RC�ck�mk�bl�v}�IO�QY�HZ�P[�bh�i�i�+5�6J�T�SX�M�+Z�(�+�+.�/C�+D�(�IR�Sg�Ih�E�*�,E�%�&?�#�G�6�r�[�=R�F�7S�WJ�WC�WJ�WJ�WV�MS�MU�WV�8V�Yj�8j�rK�RT�Xc�Xm�gm�Rn�qd�q]�qd�qd�qp�gm�go�qp�Rp�su�Ru�CI�KS�BT�[a�b�b�Ji���"����Z�(�!�*�-�N�+,�(�+�a�/�	6�%�n�t�U�m�D�6�r�[�=R�F�7S�Vo�7o�xF�MO�S^�Sh�bh�Mi�lw�Mw�Ns�}D�Ws�~R�cP�Zb�ow�yM�nN�QY�[m�Pn�mo�Op�Dq�x~���-7���u�
�-V�*�-�-0��-@�*�EN�~�E^�A�,�.A�|�~Q�Sa�do�dy�sy�}c�}\�}c�}c�}o�fl�fn�}o�co�p�F_�0�A�5�0�+�a�/�6�v�xF�HV�Yd�Yn�hn�r}�X}�~�0�A�5�0�+�q�0�.�r�[�5J�F�/K�OB�0B�FJ�MP�Qm�Mn�Fn�qB�FB�0C�KY�`b�fq�f{�u{�`|�J�`J�iU�kP
�Z
a
�t
P�[o�@m�w�LT�Vj�Kk�nv�xJ�mK�JL�l
M�aN�Xv�AT�^f�@E�V\�go�C_�am�Bn�HM�w{�EL�X^�`h�Wi�gj�@G�[Y�[S�ZT�`f�hp�_q�wr�HO�cg�ia�bb�nt�v~�m�@�Yb�v{ �} r!�us!�Pt!�]u!�^v!�Uw!�Px!�`y!�Wz!�A"H"�I"�I"��I�%����]�+�#�M�2���.��7�.�r�[�5J�F�/K�Nk�/k�tD�KM�Q\�Qf�`f�Kg�jx�Kx�WJ�T\�v{�OV�Za�ce�Yf�pL	�W	k	�|	i
�s
{
�HP�Rf�Gg�jr�tF�iG�FH�hI�XJ�NK�ci�lr�t|�k}�b~�E�F
L
�M
�M
�'1�2B�D�'I�$�'�(+�,<�,A�,A�,C�(D�%�BR�BX�BX�BZ�>�(�*>�%�f�-�4�4�5I�J�/�3H�H�1�8�8�9M�N�)�*>��F�":�2��AV�PV�;W�[G�Z�[G�[G�[S�JP�JR�[S�<S�Vg�<g�oC�JL�P[�Pe�_e�Jf�iU�iN�iU�iU�ia�X^�X`�ia�Ja�df�Jf�tz�|D�sE�LR�#S�S�C[�)�2�2��9N��3O�Rr�3r�sv�xM�tN�4N�O\�4\�dt�{}�AL�AV�PV�{W�Zh�{h�Gz�DL�fk�F	�J	Q	�S	U	�I	V	�`	|	�G
[
�l
Y�ck�x@�BV�wW�Zb�dv�Yw�vx�X	y�H	z�~{�S
Y
�\
b
�d
l
�[
m
�R
n
�uo
�v
L�M�M�'*�+;�'<�$�'�1�,�6:�3�0@�,�D�AB�>�A�A�E�!F�';�r�'A�.F�r�[�Mb�\b�Gc�gX�HX�`t�{}�AL�AV�PV�{W�Zh�{h�v}�A�uB�IP�/Q�)Q�$F�!�$K�$F�A�A�E�!F�%E�FZ�\j�mx�mB�|B�FT�lT�%U�$F�!�$K�$F�A�Q�F�&>�r�[�EZ�TZ�?[�_U�@U�Y]�`c�dF�`G�YG�J[�Y[�@\�dx�A�EP�EZ�TZ�[�^l�l�zA�EL�NP�DQ�[w�BV�gT�^f�s{�}Q�rR�U]�_q�Tr�qs�St�Cu�yv�}D	�'E	�!E	� G�1A�$;�6�r�[�=R�F�7S�WN�8N�Vf�mo�s~�sH�BH�mI�LZ�mZ�yl�v~�X]�qx�|C	�E	G	�{H	�R	n	�y	M
�^
K�U]�jr�tH�iI�LT�Vh�Ki�hj�J	k�zl�pm�E
K
�N
T
�V
^
�M
_
�D
`
�ga
�h
w
�x
�x
��Y�&����^�,� $�^� 4���/�$�8�.�r�[�5J�F�/K�Nl�/l�uF�MO�S^�Sh�bh�Mi�l{�M{�Zz�DL�fk�F	�J	R	�T	h	�I	i	�l	s	�u	x	�k	y	�H	z	�~{	�S
Y
�d
k
�w
}
�
G�v
H�[
I�R
J�HK�RX�Y�Y�(2�3D�d�(K�%�(�),�->�-C�-C�-E�)F�&�DU�D[�D[�D]�@�)�+@�%�f�-�4�4�5J�K�0�4J�J�2�9�9�:O�P�)�*?�$���O�":�2��AV�PV�;W�[I�[B�[I�[I�[U�LR�LT�[U�<U�Xh�<h�pE�LN�R]�Rg�ag�Lh�kY�kR�kY�kY�ke�\b�\d�ke�Le�hj�Lj�@G�SY�[c�Rd�we�lr�#s�s�8B�CX�[_�af�Zg�8h�5�8�8;�<Q�8R�5�W`�av�Ww� S� 7�9S�'1�2L�s�'T�*B�2��I^�X^�C_�cl�ce�cl�cl�cx�ou�ow�cx�Dx�{L�DL�Tn�uw�{F�{P�JP�uQ�T]�TV�T]�T]�Ti�`f�`h�Ti�ui�ln�un�|B�DL�{M�TZ�+[�%[�Xx�E^�*�2�2��9N��3O�Rs�3s�tw�yO�uP�4P�Q^�4^�fw�~@�DO�DY�SY�~Z�]l�~l�Kk�u}�W	\	�p	w	�{	C
�E
Y
�z	Z
�]
d
�f
i
�\
j
�y	k
�o	l
�DJ�U\�hn�px�gy�Lz�C{�y|�CY�Z�Z�(+�,=�(>�%�(�A�-�7;�4�1B�-�E�BC�?�B�Q�F�!F�'1�2G��'M�/S�~�>R�/S�Ti�/j�2J�2�Q\�Qf�`f�Kg�kU�LU�]r�y{�J�T�NT�yU�Xg�yg�u}�S�tT�[c�3d�-d�$G�1�$L�$G�B�Q�F�!F�'<��'C�.F�r�[�Mb�\b�Gc�gZ�HZ�bw�~@�DO�DY�SY�~Z�]l�~l�zA�CF�yG�NU�/V�)V�$G�1�$L�$G�B�a�G�&>�r�[�EZ�TZ�?[�_V�@V�Z^�ad�eH�aI�ZI�L]�Z]�@^�f{�BD�HS�H]�W]�B^�ap�Bp�~E�IQ�Sg�Hh�kr�tw�jx�Gy�}z�AH�'I�!I� H�!2C�(<�6�r�[�=R�F�7S�WO�8O�Wh�oq�u@�uJ�DJ�oK�N]�o]�|\�fn�H	M	�a	h	�l	t	�v	J
�k	K
�N
U
�W
Z
�M
[
�j	\
�`	]
�u
{
�FM�Y_�ai�Xj�}
k�t
l�jm�tC�D�D�!�Y�.����3�4�'+�,B�'C�$��6��?�.�r�[�5J�F�/K�Nu�/u�~V�]_�cn�cx�rx�]y�|S�]S�ry�CL�`M�TZ�[�[�!�Y�.����3�4�'+�,B�'C�$��6��?�.�r�[�5J�F�/K�Nt�/t�}U�\^�bm�bw�qw�\x�{R�\R�qX�bj�DI�]d�hp�rF	�gG	�J	Q	�S	V	�I	W	�fX	�\Y	�q	w	�B
I
�U
[
�]
e
�T
f
�y	g
�p	h
�_i
�p
v
�w
�w
�/9�:R�TX�/Y�,�/�03�4L�4Q�4Q�4S�0T�-�Rj�Rp�Rp�Rr�N�0�2N�%�f�-�4�4�5Q�R�7�;X�X�9�@�@�A]�^�)�*F��u�
�V�":�2��AV�PV�;W�[X�[Q�[X�[X�[d�[a�[c�[d�<d�gw�<w�[�bd�hs�h}�w}�b~�A~�Aw�A~�A~�AJ�AG�AI�AJ�bJ�MO�bO�el�x~�@H�wI�\J�QW�#X�X�?I�Jf�im�ot�hu�?v�<�?�?B�C_�?`�<�en�pL�fM� a� >�@a�'1�2S�VY�'[�*B�2��I^�X^�C_�cB�c{�cB�cB�cN�EK�EM�cN�DN�Qb�Db�jK�RT�Xc�Xm�gm�Rn�qP�qI�qP�qP�q\�SY�S[�q\�R\�_a�Ra�ou�w�n@�GM�+N�%N�fM�Ss�1�2�2��9N��3O�R{�3{�|�A^�}_�4_�`m�4m�uM�TV�Ze�Zo�io�Tp�sJ�TJ�iP�Zb�|A	�U	\	�`	h	�j	~	�_		�B
I
�K
N
�A
O
�^	P
�T	Q
�i
o
�z
A�MS�U]�L^�q
_�h
`�Wa�h~���/2�3K�/L�,�/�1�4�>B�;�8P�4�L�IJ�F�I�A�M�!F�'1�2N�PS�'T�/S�~�>R�/S�Tp�/q�2J�2�Q\�Qf�`f�Kg�k]�L]�eA�HJ�NY�Nc�]c�Hd�g~�H~�LT�Vj�Kk�rz�3{�-{�$N�RS�$S�$N�I�A�M�!F�'C�s�'J�.F�r�[�Mb�\b�Gc�gb�Hb�jF�MO�S^�Sh�bh�Mi�lC�MC�QX�Z]�P^�el�/m�)m�$N�RS�$S�$N�I�Q�N�&>�r�[�EZ�TZ�?[�_^�@^�bf�il�mW�iX�bX�[l�bl�@m�uQ�XZ�^i�^s�ms�Xt�wN�XN�\c�go�qE�fF�IP�RU�HV�eW�[X�_f�'g�!g� O�!9Q�(C�6�r�[�=R�F�7S�WW�8W�_w�~@�DO�DY�SY�~Z�]t�~t�Sz�DL�fk�F	�J	R	�T	h	�I	i	�l	s	�u	x	�k	y	�H	z	�~{	�S
Y
�d
k
�w
}
�
G�v
H�[
I�R
J�AK�Ra�b�b��9�,����1�2�&*�+?�&@�#��5��e�}�E�.�r�[�5J�F�/K�Nq�/q�zQ�XZ�^i�^s�ms�Xt�wL�XL�bi�}E�Qe�tf�t{�Y|�CI�J�J�.8�9P�SW�Y^�R_�.`�+�.�.1�2I�.J�+�OX�Yp�Oq�K�-�/K�%�&B�S�J�6�r�[�=R�F�7S�WP�WI�WP�WP�W\�SY�S[�W\�8\�_p�8p�xT�[]�al�av�pv�[w�zs�zl�zs�zs�z�v|�v~�z�[�BD�[D�Zb�nB�QC�JP�Q�Q�!�">��D�C�~�.B�C�D`�a�":�2��AV�PV�;W�[T�[M�[T�[T�[`�W]�W_�[`�<`�c@�<@�Hd�km�q|�qF�@F�kG�JC�J|�JC�JC�JO�FL�FN�JO�kO�RT�kT�jr�~R�aS�Zb�#c�c�Pr��9�$����\�*�"�<�0�O��o��e�}�=�.�r�[�5J�F�/K�Ni�/i�rA�HJ�NY�Nc�]c�Hd�gt�Ht�Qz�DK�_g�sG�VH�VH�AI�PV�W�W�&0��4��-�&P�#�&�&)�/�&:�#�?H��?Y�;�%�';�%�&:�S�B�6�r�[�=R�F�7S�V�Vx�V�V�WL�CI�CK�WL�8L�O`�8`�h|�CE�IT�I^�X^�C_�bK�bD�bK�bK�bW�NT�NV�bW�CW�Z\�C\�rz�FZ�i[�bh�i�i�!�"6��<�C�~�.B�C�DX�Y�":�2��AV�PV�;W�[D�Z|�[D�[D�[P�GM�GO�[P�<P�Sp�<p�xL�SU�Yd�Yn�hn�So�r[�rT�r[�r[�rg�^d�^f�rg�Sg�jl�Sl�BJ�Vj�yk�rz�#{�{�@Z��9�$����\�*�"�<�0�O��o��6�.�r�[�5J�F�/K�Nj�/j�sB�IK�OZ�Od�^d�Ie�hu�Iu�Tz�DL�dj�u|�H	N	�P	X	�G	Y	�lZ	�c[	�B\	�c	i	�j	�j	�&0��$�&G�#�&�'*�?�+?�+?�+A�'B�$�@O�@U�@U�@W�<�'�)<�%�f�-�4�4�5H�I�.�2F�F�0�7�7�8K�L�)�*=��e�}�M�":�2��AV�PV�;W�[E�Z}�[E�[E�[Q�HN�HP�[Q�<Q�Td�<d�l�FH�LW�La�[a�Fb�eO�eH�eO�eO�e[�RX�RZ�e[�F[�^`�F`�v}�IO�QY�HZ�m[�bh�#i�i�6@�AT�W[�]b�Vc�6d�3�6�69�:M�6N�3�S\�]p�Sq� O� 5�7O�'1�2J�S�'R�*B�2��I^�X^�C_�cf�c_�cf�cf�cr�io�iq�cr�Dr�uF�DF�Nf�mo�s~�sH�BH�mI�LO�LH�LO�LO�L[�RX�RZ�L[�m[�^`�m`�nt�v~�m�FL�+M�%M�Tr�AX���"����Z�(�!�*�-�N��n�t�5�.�r�[�5J�F�/K�Nh�/h�p~�FH�LW�La�[a�Fb�ep�Fp�OS	�]	e	�}	C
�N
V
�b

�E
@�|	A�}B�IO�P�P�%/���%E�"�%�&)�.�*=�*=�*?�&@�#�>L�>R�>R�>T�:�&�(:�%�f�-�4�4�5G�H�-�1D�D�/�6�6�7I�J�)�*<�s�D�":�2��AV�PV�;W�[B�Zz�[B�[B�[N�EK�EM�[N�<N�Qb�<b�j|�CE�IT�I^�X^�C_�bI�bB�bI�bI�bU�LR�LT�bU�CU�XZ�CZ�px�Da�gb�io�#p�p�%�&8�#�>�#P�>�2O�#P�Qc�#d�&>�r�[�EZ�TZ�?[�_F�^~�_F�_F�_R�IO�IQ�_R�@R�U{�@{�CU�\^�bm�bw�qw�\x�{b�{[�{b�{b�{n�ek�em�{n�\n�qs�\s�IQ�]z�@{�BJ�'K�!K�?U��i�'����_�-�!%�o�!6���0�4��-�@�.�r�[�5J�F�/K�Nl�/l�uG�NP�T_�Ti�ci�Nj�m}�N}�SZ�fl�nv�ew�JH�V`�Ja�hn�o�o�)3�4F��u�
�)V�&�)�),�-?�)@�&�EN�Oa�Eb�A�(�*A�%�&=��E�6�r�[�=R�F�7S�WF�V~�WF�WF�WR�IO�IQ�WR�8R�Uf�8f�nE�LN�R]�Rg�ag�Lh�kZ�kS�kZ�kZ�kf�]c�]e�kf�Lf�ik�Lk�y�AI�xJ�QW�X�X�Fc��	�!����Y�'� ��O�M��m�d�4�.�r�[�5J�F�/K�Ng�/g�o|�DF�JU�J_�Y_�D`�cm�Dm�CK�\^�x}�lp�rA�kB�Xk�tR	�f	p
�r
\�e	]�go�IN�_e�hn�px�gy�^z�I
O
�H
P
�NQ
�[
y
�DW�hl�v~�X]�nt�w~�BH�JR�AS�^e�qw�yA�pB�UC�@D�vE�mF�U[�T\�S
]�M^�Y_�xV�at�EI�S[�uz�KQ�T[�_e�go�^p�{B�NT�V^�M_�r`�]a�Sb�Jc�rx�qy�pz�Sq�|O�`d�nv�PU�fl�ov�z@�BJ�yK�V]�io�qy�hz�M{�x|�n}�e~�MS�LT�KU�oM�Xk�|@ �J R �l q �B!H!�K!R!�V!\!�^!f!�U!g!�r!y!�E"K"�M"U"�D"V"�i!W"�T!X"�J!Y"�A!Z"�i"o"�h"p"�gq"�K#i#�t#G$�X$\%�f%n%�H&M&�^&d&�g&n&�r&x&�z&B'�q&C'�N'U'�a'g'�i'q'�`'r'�E's'�p&t'�f&u'�]&v'�E(K(�D(L(�C#M(�q(y(�M)U)�W)j)�L)k)�E*J*�b*f*�p*N+�Y+l+�}+A-�K-S-�m-r-�C.I.�L.S.�W.].�_.g.�V.h.�s.z.�F/L/�N/V/�E/W/�j.X/�U.Y/�K.Z/�B.[/�j/p/�i/q/�h*r/�a*s/�h(t/�S0q0�|0O1�`1d2�n2v2�P3U3�f3l3�o3v3�z3@4�B4J4�y3K4�V4]4�i4o4�q4y4�h4z4�M4{4�x3|4�n3}4�e3~4�M5S5�L5T5�K0U5�X5d5�g5u5�x5~5�@6H6�w5I6�f5J6�W5K6�J0L6�[6a6�Z6b6�@0c6�Md6�ze6�l6r6�s6�s6�$.�}�d�$C�!�$�%(��);�);�)=�%>�"�� 2�2�&�-�-�i�8�-:�9�-E�*�;<�8�;�a�?�>�~�@V�Xf�it�i~�x~�BT�hT�U�@�A�E�@�;�a�?�>�~�@V�Xf�it�i~�x~�BT�hT�U�@�A�E�@�;�q�@�6�r�[�=R�F�7S�WQ�8Q�UY�\_�`D�\E�UE�HY�UY�8Z�bx�A�EP�EZ�TZ�[�^p�p�PT�Ve�Of�|O�Xv�J	T
�V
@�I	A�KS�mr�CI�LR�T\�K]�B^�ms�lt�ru�]
�h
{
�LP�Zb�|A�RX�[b�fl�nv�ew�BI�U[�]e�Tf�yg�dh�Zi�Qj�y�x@�wA�qB�}C�JQ�R�R� �$6�6�&�-�-�m�<�1>�}�1M�.�v�xR�Tb�ep�ez�tz�~T�dT�U� �$6�6�&�-�-�m�<�1>�}�1M�.�v�xR�Tb�ep�ez�tz�~T�dT�U�!�%7�7�&�-�-�n�=�2?��2O�/�v�xS�Uc�fq�f{�u{�V�eV�W�!�%7�7�&�-�-�n�=�1>�~�1N�.�v�xR�Tb�ep�ez�tz�~U�dU�V�*�.@�@�&�-�-�.E�F�:G�H_�:`�7�%�&I�D�R�6�r�[�=R�F�7S�WF�8F�Nq�xz�~I�~S�MS�xT�Ww�xw�MU�iq�sF�hG�af�~B�Lj�uH�Y]�go�I	N	�_	e	�h	o	�s	y	�{	C
�r	D
�O
V
�b
h
�j
r
�a
s
�F
t
�q	u
�g	v
�^	w
�FL�EM�DN�}O�DP�W]�^�^�BL�Mp�rv�Bw�?�B�CF�Gj�Go�Go�Gq�Cr�@�qT�qZ�qZ�q\�l�C�El�-�d�3�:�:�;b�c�#J�Nv�#v�$L�$S�$S�T{�$|�!C�Dk�m{�~I�~S�MS�Wh�Wa�Wh�Wh�Wt�kq�ks�Wt�}t�!u�	q\�
D�":�2��AV�PV�;W�[M�<M�NQ�Rz�N{�<{�|I�<I�Qt�{}�AL�AV�PV�{W�Zz�{z�PX�lt�vI�kJ�di�AE�Om�xK�\`	�j	r	�L
Q
�b
h
�k
r
�v
|
�~
F�u
G�RY�ek�mu�dv�Iw�t
x�j
y�a
z�IO�HP�GQ�@R�GS�Zp�#q�q�BE�Fi�Bj�?�B�a�G�QU�N�Kn� G�!_�'1�2Y�[^�'_�/R�~�>Q�/R�Sz�/{�2J�2�Q\�Qf�`f�Kg�ke�Le�mT�[]�al�av�pv�[w�zZ�[Z�hp�rE�gF�MU�3V�-V��	Lo�$V�&>�r�[�EZ�TZ�?[�_h�@h�pS�Z\�`k�`u�ou�Zv�yY�ZY�ow�KS�Uh�Ji�CH�`d�nL�Wj�{�I	Q	�k	p	�A
G
�J
Q
�U
[
�]
e
�T
f
�q
x
�DJ�LT�CU�h
V�S
W�I
X�@
Y�hn�go�fp�_q�fr�yH�'I�!I��1�1�&�-�-�h�7�,9�(�,C�)�:;�7�>�>�~�@U�We�hs�h}�w}�AR�gR�S�?�1�D�?�>�
>�<F�G\�^b�<c�9�<�=@�AV�A[�A[�A]�=^� :�#1�5O�#O�$>�$E�$E�n�$U�I^�_m�In�$F�+5�6X�[^�+`�.F�r�[�Mb�\b�Gc�gT�HT�\~�EG�KV�K`�Z`�Ea�dB�EB�PV�X`�Oa�hn�/o�)o�?�1�D�?�>�6�r�[�=R�F�7S�WN�8N�Vk�rt�xC�xM�GM�rN�Qb�rb�B`�k~�OS�]e�D�U[�^e�io�qy�hz�EL�X^�`h�Wi�|j�gk�]l�Tm�|B	�{C	�zD	�G	S	�V	d	�g	m	�o	w	�f	x	�U	y	�F	z	�y{	�J
P
�I
Q
�oR
�Y
`
�a
�a
�4>�?T�VZ�4[�1�4�47�8M�4N�1�"�"V�X�"V�V�":�2��AV�PV�;W�[M�<M�Uj�qs�wB�wL�FL�qM�Pa�qa�A_�j}�NR�\d�~C�TZ�]d�hn�px�gy�DK�W]�_g�Vh�{i�fj�\k�Sl�{A	�zB	�yC	�F	R	�U	c	�f	l	�n	v	�e	w	�T	x	�E	y	�xz	�I
O
�H
P
�nQ
�X
b
�#c
�c
�%�2�2��9N��3O�Rn�3n�or�tF�pG�4G�HU�4U�]j�qs�wB�wL�FL�qM�PZ�qZ�px�IK�ej�Y]�_n�Xo�E	X	�a		�S
]�_I�R
J�T\�v{�L
R
�U
[
�]
e
�T
f
�K
g
�v
|
�u
}
�{~
�Hf�qD�UY�ck�EJ�[a�dk�ou�w�n@�KR�^d�fn�]o�Bp�mq�cr�Zs�BH�AI�@J�zK�FL�eC�Na�rv�@H�bg�x~�AH�LR�T\�K]�ho�{A�CK�zL�_M�JN�@O�wP�_e�^f�]g�@^�i|�MQ�[c�}B�SY�\c�gm�ow�fx�CJ�V\�^f�Ug�zh�ei�[j�Rk�z@�yA�xB�\z�EX�im �w  �Y!^!�o!u!�x!!�C"I"�K"S"�B"T"�_"f"�r"x"�z"B#�q"C#�V"D#�A"E#�w!F#�n!G#�V#\#�U#]#�T^#�x#V$�a$t$�E%I&�S&[&�u&z&�K'Q'�T'['�_'e'�g'o'�^'p'�{'B(�N(T(�V(^(�M(_(�r'`(�]'a(�S'b(�J'c(�r(x(�q(y(�p#z(�^)f)�z)B*�D*W*�y)X*�r*w*�O+S+�]+{+�F,Y,�j,n-�x-@.�Z._.�p.v.�y.@/�D/J/�L/T/�C/U/�`/g/�s/y/�{/C0�r/D0�W/E0�B/F0�x.G0�o.H0�W0]0�V0^0�U+_0�N+`0�U)a0�@1^1�i1|1�M2Q3�[3c3�}3B4�S4Y4�\4c4�g4m4�o4w4�f4x4�C5J5�V5\5�^5f5�U5g5�z4h5�e4i5�[4j5�R4k5�z5@6�y5A6�x0B6�E6Q6�T6b6�e6k6�m6u6�d6v6�S6w6�D6x6�w0y6�H7N7�G7O7�m0P7�zQ7�gR7�Y7o7�p7�p7��*�2��1F��+G�J^�+^�_b�cl�_m�+m�n{�+{�DH�OQ�U`�Uj�dj�Ok�np�Op�Iq�zy�D_�rE�OW�qv�Fen�GR�]d�pv�x@�oA�TB�Fen�DN�cd�fB�bC�MT�hp�|O�_P�PQ�Fen�S^�sa�c�r@�JQ�em�yL�\M�`N�Fen�PZ�lr�|E�\F�Fen�HV�hf�pw�CI�KS�BT�bU�XV�Fen�Xi�~F!�H!F"�}G"�Q"X"�d"j"�l"t"�c"u"�kv"�Fen�x"B#�V#B+�X+}+�G,N,�a,},�H-\-�m-Z.�d.l.�y.A/�C/W/�x.X/�[/c/�e/w/�Z/x/�w.y/�Y,z/�N+{/�E0c0�n0A1�K1S1�m1r1�C2I2�T2\2�p2L3�N3Z4�o2[4�u4z4�d5h6�r6y6�E7K7�M7U7�D7V7�T5W7�m7t7�H8F9�H9@:�G8A:�M:S:�U:]:�L:^:�d7_:�u:|:�P;T<�V<N=�O;O=�[=a=�c=k=�Z=l=�l:m=�F>O>�c>h?�j?_@�b>`@�}=a@�J5b@�K2c@�B2d@�}/e@�M+f@�D#g@�Fen�i@v@�JA}D�GEOE�iEnE�BFIF�MFTF�VFXF�LFYF�cFF�JG^G�oG\H�fHnH�{HCI�EIYI�zHZI�]IeI�gIyI�\IzI�yH{I�[F|I�KF}I�AF~I�VJ\J�_JeJ�gJoJ�^JpJ�UJqJ�x@rJ�Fen�tJBK�VKvO�@PHP�bPgP�{PBQ�FQNQ�PQdQ�EQeQ�hQoQ�qQtQ�gQuQ�DQvQ�zPwQ�ORUR�`RgR�sRyR�{RCS�rRDS�WRES�NRFS�DKGS�Fen�IS_S�sSzW�DXMX�aSNX�Fen�PXfX�zXa\�k\s\�M]R]�f]m]�q]y]�{]O^�p]P^�S^Z^�\^_^�R^`^�o]a^�e]b^�z^@_�K_R_�^_d_�f_n_�]_o_�B_p_�y^q_�hXr_�Fen�t_H`�S`Z`�n`v`�BaVa�e`Wa�ealb�J`mb�Fen�ob{b�Mcvc�@dGd�[dcd�odCe�RdDe�ReDf�}bEf�Fen�GfSf�gfMk�Wk_k�wk}k�HlOl�[lal�clkl�Zlll�kml�vknl�Ufol�Fen�ql{l�OmSs�]ses�}sCt�NtVt�btt�Et@u�|sAu�}lBu�Fen�DuSu�^ueu�quwu�yuAv�puBv�UvSy�aykz�Uulz�Fen�nzwz�B{J{�[{]|�w|||�k}o~�q~@@�j}A@�W@j@�s@QA�eAoB�qB[C�dA\C�fCnC�HDMD�^DdD�gDmD�oDwD�fDxD�]DyD�HENE�GEOE�M@PE�ZExE�CFVF�gFkG�uG}G�WH\H�mHsH�vH}H�AIGI�IIQI�@IRI�]IdI�pIvI�xI@J�oIAJ�TIBJ�HCJ�uHDJ�lHEJ�TJZJ�SJ[J�RE\J�L@]J�X}^J�wJUK�`KsK�DLHM�RMZM�tMyM�JNPN�SNZN�^NdN�fNnN�]NoN�zNAO�MOSO�UO]O�LO^O�qN_O�\N`O�RNaO�INbO�qOwO�pOxO�oJyO�RPpP�{PNQ�_QcR�mRuR�OSTS�eSkS�nSuS�ySS�ATIT�xSJT�UT\T�hTnT�pTxT�gTyT�LTzT�wS{T�mS|T�dS}T�LURU�KUSU�JPTU�nULV�WVjV�{VW�IXQX�kXpX�AYGY�JYQY�UY[Y�]YeY�TYfY�qYxY�DZJZ�LZTZ�CZUZ�hYVZ�SYWZ�IYXZ�@YYZ�hZnZ�gZoZ�fUpZ�J[h[�s[F\�W\[]�e]m]�G^L^�]^c^�f^m^�q^w^�y^A_�p^B_�M_T_�`_f_�h_p_�__q_�D_r_�o^s_�e^t_�\^u_�D`J`�C`K`�B[L`�p`x`�LaTa�Vaia�Kaja�DbIb�abeb�obMc�Xckc�|c@e�JeRe�leqe�BfHf�KfRf�Vf\f�^fff�Ufgf�rfyf�EgKg�MgUg�DgVg�ifWg�TfXg�JfYg�AfZg�igog�hgpg�gbqg�`brg�g`sg�Rhph�{hNi�_icj�mjuj�OkTk�ekkk�nkuk�ykk�AlIl�xkJl�Ul\l�hlnl�plxl�glyl�Llzl�wk{l�mk|l�dk}l�LmRm�KmSm�JhTm�Wmcm�fmtm�wm}m�mGn�vmHn�emIn�VmJn�IhKn�Zn`n�Ynan�gbn�L}cn�yzdn�Fen�Ooko�voJp�[pHq�RqZq�gqoq�qqEr�fqFr�IrQr�Srer�Hrfr�eqgr�Gohr�Dsbs�ms@t�QtUu�_ugu�AvFv�Wv]v�`vgv�kvqv�sv{v�jv|v�GwNw�Zw`w�bwjw�Ywkw�~vlw�ivmw�_vnw�Vvow�~wDx�}wEx�|rFx�dxwx�@y^y�ry|z�~zh{�qyi{�s{{{�U|Z|�k|q|�t|z|�||D}�s|E}�j|F}�U}[}�T}\}�Zx]}�y}W~�b~u~�~G�af�w}�H@P@�d@@A�BANB�c@OB�iBnB�XC\D�fDmD�yDD�AEIE�xDJE�HCKE�aEhE�|EzF�|FtG�{EuG�AHGH�IHQH�@HRH�XESH�iHpH�DIHJ�JJBK�CICK�OKUK�WK_K�NK`K�`HaK�zKCL�WL\M�^MSN�VLTN�qKUN�~BVN�WN�vXN�q}YN�vnZN�}[N�bNxN�yN�
yN��K��C
0�5��5��
0�5��5��<(@� E�� E��
(@� E�� E�� 8�D�>C�;�D��L(@� E�� E��(@� E�� E�� 8�E�?D�<�E��V(@� E�� E��(@� E�� E�� 8�L�FK�C�L��@ 8�=��=��
 8�=��=��T(@�!_�Y^�$V�!_�� 8�=��=�� 8�=��=�s�(B1BV�BV)�/BW�70BV9�'BW�-BW	�A
BW�0BX�8ABW+�>BX�0BW;�4ABX�L BX=�L(ABX�M.BX=�M40BX-�N$ABX=�t"BY�uBY�1ABY/�BBZ�B5BBZ�V	BV&�V%BV&�V)	BV6�V5BV6�V9	BW�WBW�WBW�WBW�W		BW�WBW�WBW�WBW�WBW(�W'BW(�W+	BW8�W4BX�W7BW8�W8BX�W;	BX�XBX�XBX�XBX�XBX�XBX�X	BX*�X&BX=�X)BX*�X*BX=�X-	BX:�X6BX=�X9BX:�X:BX=�X=BY�YBY�Y	BY�YBY�Y	BY,�Y+BY,�Y/BY>�Y=BY>�Z	BZ�Z
BZ�Z	BZ�ZBZc���t�t�s:td|xsdzdz�d|xsdzdzdddddd	d
ddid
ddid�giid	gd�d���t�t�}|�rMt��}t	�fd�dD��s:td|xsdzdz�d|xsdzdzdddddd	d
ddid
ddid�giid	gd�d���t�j
��}d	|v�r�|jd	��d	}d}|dkr<	t|t�s&td|xsdzdz|d|xsdzdzddid���|dz
}|dkr�	t|ttf�s)td|xsdzdz|d|xsdzdzd
ddid�d���t|ttf�}|r�t|�}	t|�D]q\}
}t|t�r�td|xsdzdjd#it���zdz|d|xsdzdjd#it���zdzddid���|dz
}|dk7rAtd|xsdzdzdt|�zdzz|d|xsdzdzd
ddid
ddid�gid
���|rItd|xsdzd zt|�zd!z�d|xsdzdzdddddd	d
ddid
ddid�giid	gd�d"����S#t$rY���wxYw#t$rY��wxYw)$Nrr
rr�r�r�rFr8rFrrrrxr�rc3�&�K�|]}|�v���
y�wrr�rr r
s  �rr"zuvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive.<locals>.<genexpr>������5�H�D�4�4�<�H�r#rUz! must contain ['file'] propertiesr&rrMz.file must be stringz.filerz.file must be arrayz.file[{data__file_x}]r$z-.file must be valid exactly by one definitionrNrOr&r%r$r)r'r(rr,r-r)r*r+r1r.r/r0rr2)r
rrr6�data_lenr7�
data__file�data__file_one_of_count7�data__file_is_list�data__file_len�data__file_x�data__file_items`           rr\r\s�����d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�a�J]�nr�|D�^c�tz�}D�HN�PX�GY�dk�w}�G�vH�[I�FJ�|K�sL�[a�Zb�Yc�jp�q�	q��d�D�)�L���t�9���5�H�5�5�*�2��1F��+G�Jm�+m�uy�AC�GR�G\�V\�A]�`b�Ab�wU�`s�DH�RZ�ty�JP�SZ�^d�fn�]o�zA�MS�U]�L^�q_�\`�Ra�Ib�qw�px�oy�@J�K�
K���	�	��$�	��Y�����V�$��f��J�'(�$�'�!�+�6�%�j�3�8�6�r�[�=R�F�7S�Vl�7l�t~�FH�LW�La�[a�Fb�el�Fl�z@�BJ�yK�RX�Y�Y�,��1�,�'�!�+�
6�%�j�4��-�@�6�r�[�=R�F�7S�Vk�7k�s}�EG�KV�K`�Z`�Ea�dk�Ek�AH�TZ�\d�Se�xf�ms�t�t�)3�J��u�
�)N�&�)�),�Z���=F�z�=R�9�L�/�#-�o��#E�&>�r�[�EZ�TZ�?[�^|�^u�^|�^|�_I�@F�@H�_I�@I�L]�@]�et�{}�AL�AV�PV�{W�Zx�Zq�Zx�Zx�ZD�{A�{C�ZD�{D�GI�{I�W]�_g�Vh�ou�'v�!v�>S�-��1�,�'�1�,�.�r�[�5J�F�/K�N}�/}�BF�IL�Me�If�Bf�iz�Bz�0{�CM�TV�Ze�Zo�io�Tp�sz�Tz�HO�SY�[c�Rd�ov�BH�JR�AS�fT�QU�GV�]d�e�e��*�2��1F��+G�J^�+^�_b�cl�_m�+m�n{�+{�DH�OQ�U`�Uj�dj�Ok�np�Op�Ec�nA�RV�`h�BG�X^�ah�lr�t|�k}�HO�[a�ck�Zl�m�jn�`o�Wp�E�~F�}G�Nd�e�
e��K��#0�5��5��0�5��5�s,�4;J.�5BJ>�9A"J>�.	J;�:J;�>	K
�	K
c
���t�t�s3td|xsdzdz�d|xsdzdzddddgdd	d
ddiid
gd
�d���t�t�}|r�t��}t	�fd�dD��s3td|xsdzdz�d|xsdzdzddddgdd	d
ddiid
gd
�d���t�j
��}d
|vrL|jd
��d
}t|t�s&td|xsdzdz|d|xsdzdzddid���|rBtd|xsdzdzt|�zdz�d|xsdzdzddddgdd	d
ddiid
gd
�d����S)Nrr
rr�r�r�r�rFr�rrr�rc3�&�K�|]}|�v���
y�wrrr�s  �rr"zuvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_attr_directive.<locals>.<genexpr>,r�r#)r�z! must contain ['attr'] propertiesr&z.attr must be stringz.attrr&r%r$)	r'r(rr,r-r)r*r+r1)r
rrr6r�r7�
data__attrs`      rr[r[&s>����d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�cv�]�q{�}g�ph�rz�TY�jp�sy�{C�rD�iE�TZ�S[�Y\�ci�j�	j��d�D�)�L���t�9���5�H�5�5�*�2��1F��+G�Jm�+m�uy�AC�GR�G\�V\�A]�`b�Ab�yL�Us�GQ�S}�F~�HP�jo�@F�IO�QY�HZ�[�jp�iq�or�yC�D�
D���	�	��$�	��Y�����V�$��f��J��j�3�0�.�r�[�5J�F�/K�Nd�/d�lv�}�DO�DY�SY�~Z�]d�~d�rx�zB�qC�JP�Q�Q��*�2��1F��+G�J^�+^�_b�cl�_m�+m�n{�+{�DH�OQ�U`�Uj�dj�Ok�np�Op�GZ�cA�U_�aK�TL�V^�x}�NT�W]�_g�Vh�Mi�x~�w�}@�G]�^�
^��Krc�~
�t|t�sStd|xsdzdz|d|xsdzdzddddddd	d
gdddd
did�dddgd
did�dddgd
did�dddgd�d�d�id�d
���t|t�}|�r�t|j	��}d|v�rD|jd�|d}t|t�sKtd|xsdzdz|d|xsdzdzdd	d
gdddd
did�dddgd
did�dddgd
did�dddgd�d�d�d
���t|t�}|�r�t|j	��}d|vr�|jd�|d}t|ttf�s*td|xsdzdz|d|xsdzd zddd
did�d
���t|ttf�}	|	r�t|�}
t|�D]q\}}t|t�r�td|xsdzd!jd2it���zd"z|d|xsdzd!jd2it���zdzd
did
���d#|vr�|jd#�|d#}
t|
ttf�s,td|xsdzd$z|
d|xsdzd%zdddgd
did�d
���t|
ttf�}|r�t|
�}t|
�D]q\}}t|t�r�td|xsdzd&jd2it���zd"z|d|xsdzd&jd2it���zdzd
did
���d'|vr�|jd'�|d'}t|ttf�s,td|xsdzd(z|d|xsdzd)zdddgd
did�d
���t|ttf�}|r�t|�}t|�D]q\}}t|t�r�td|xsdzd*jd2it���zd"z|d|xsdzd*jd2it���zdzd
did
���d+|vrO|jd+�|d+}t|t�s)td|xsdzd,z|d|xsdzd-zdddgd�d
���|rZtd|xsdzd.zt|�zd/z|d|xsdzdzdd	d
gdddd
did�dddgd
did�dddgd
did�dddgd�d�d�d0���|rbtd|xsdzd1zt|�zd/z|d|xsdzdzddddddd	d
gdddd
did�dddgd
did�dddgd
did�dddgd�d�d�id�d0���|S)3Nrr
rr�r�rFrrrrrrrrrrrrr�rr	r3r
rrrz.find must be objectz.findrz.find.where must be arrayz.find.wherez".find.where[{data__find__where_x}]r$rz.find.exclude must be arrayz
.find.excludez&.find.exclude[{data__find__exclude_x}]r
z.find.include must be arrayz
.find.includez&.find.include[{data__find__include_x}]rz .find.namespaces must be booleanz.find.namespacesz.find must not contain r%r$r&r)r'r(rr)r*r+r.r/r,r0r1rr2rV)r
rrr6r7�
data__find�data__find_is_dict�data__find_keys�data__find__where�data__find__where_is_list�data__find__where_len�data__find__where_x�data__find__where_item�data__find__exclude�data__find__exclude_is_list�data__find__exclude_len�data__find__exclude_x�data__find__exclude_item�data__find__include�data__find__include_is_list�data__find__include_len�data__find__include_x�data__find__include_item�data__find__namespacess                        rrXrX8s
���d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�a�J]�go�IN�_e�px�Lh�jv�Kw�QV�@D	�N	U	�a	g	�i	q	�`	r	�ps	�I
P
�d
b�d\�c
]�io�qy�hz�@
{�Q
X
�l
p�rj�k
k�w}�G�vH�H
I�bk�D�F{�~|�Y}�f~�g�^@�YA�HN�O�	O��d�D�)�L����	�	��$�	��Y�����V�$��f��J��j�4�1�.�r�[�5J�F�/K�Nd�/d�lv�}�DO�DY�SY�~Z�]d�~d�zB�Vr�t@�UA�[`�JN�X_�kq�s{�j|�z}�SZ�nl	�n	f
�mg
�s
y
�{
C�r
D�JE�[b�vz�|t
�uu
�AG�IQ�@R�RS�lu�IN�PE�HF�cG�pH�qI�PV�W�W�!+�J��!=��!�"%�j�o�o�&7�"8���o�-�#�*�*�7�3�(2�7�(;�%�%�&7�$���G�6�r�[�=R�F�7S�Vq�7q�zK�RT�Xc�Xm�gm�Rn�q~�R~�[_�ip�|B�DL�{M�KN�U[�\�\�0:�;L�t�UZ�m�0\�-�0�03�4E�0F�-�KT�Uf�Kg�G�/�1G�#-�.D�s�#L�&>�r�[�EZ�TZ�?[�_J�_C�_J�_J�_V�MS�MU�_V�@V�Yj�@j�rH�OQ�U`�Uj�dj�Ok�nY�nR�nY�nY�ne�\b�\d�ne�Oe�hj�Oj�x~�@H�wI�PV�'W�!W�Lh���/�#�*�*�9�5�*4�Y�*?�'�%�&9�D�%�=�I�6�r�[�=R�F�7S�Vs�7s�|O�VX�\g�\q�kq�Vr�uD�VD�Za�us�um�tn�z@�BJ�yK�QL�SY�Z�Z�2<�=P�SW�Y^�R_�2`�/�2�25�6I�2J�/�OX�Yl�Om�K�1�3K�#-�.F��#N�&>�r�[�EZ�TZ�?[�_N�_G�_N�_N�_Z�QW�QY�_Z�@Z�]n�@n�vN�UW�[f�[p�jp�Uq�tc�t\�tc�tc�to�fl�fn�to�Uo�rt�Ut�BH�JR�AS�Z`�'a�!a�Pn���/�#�*�*�9�5�*4�Y�*?�'�%�&9�D�%�=�I�6�r�[�=R�F�7S�Vs�7s�|O�VX�\g�\q�kq�Vr�uD�VD�Za�uy�{s�tt�@F�HP�Q�QR�Y_�`�`�2<�=P�SW�Y^�R_�2`�/�2�25�6I�2J�/�OX�Yl�Om�K�1�3K�#-�.F��#N�&>�r�[�EZ�TZ�?[�_N�_G�_N�_N�_Z�QW�QY�_Z�@Z�]n�@n�vN�UW�[f�[p�jp�Uq�tc�t\�tc�tc�to�fl�fn�to�Uo�rt�Ut�BH�JR�AS�Z`�'a�!a�Pn� �?�2�#�*�*�<�8�-7��-E�*�%�&<�t�E�6�r�[�=R�F�7S�Vx�7x�AW�^`�do�dy�sy�^z�}O�^O�en�BG�I~�A�\@�GM�N�N�"�2�2��9N��3O�Rk�3k�lo�p�mA�4A�BO�4O�Wa�hj�ny�nC�}C�hD�GN�hN�dl�@\�^j�k�EJ�tx�BI�U[�]e�Tf�dg�}D	�X	V
�X
P�W	Q�]c�em�\n�to�EL�`d
�f
^�__�kq�s{�j|�|}�V_�sx�zo�rp�Mq�Zr�[s�zP�Q�Q��*�2��1F��+G�J^�+^�_b�cl�_m�+m�n{�+{�DH�OQ�U`�Uj�dj�Ok�np�Op�Ec�nA�KS�mr�CI�T\�pL�NZ�o[�uz�dh	�r	y	�E
K
�M
U
�D
V
�TW
�m
t
�HF�H@
�GA
�M
S
�U
]
�L
^
�d
_
�u
|
�PT�VN�OO�[a�ck�Zl�l
m�FO�ch�j_�b`�}a�Jb�Kc�Bd�}e�lB�C�
C��Krc�N�t|t�s0td|xsdzdz|d|xsdzdzdddddd	idd
igd�d�
��d}|sG	t|t�r1|d	|�s&td|xsdzdz|d|xsdzdzdd	id�
��|dz
}|sG	t|t�r1|d
|�s&td|xsdzdz|d|xsdzdzdd
id�
��|dz
}|s0td|xsdzdz|d|xsdzdzdddddd	idd
igd�d�
��|S#t$rY��wxYw#t$rY�NwxYw)Nrr
r$r�r�r�rrr�r�r�rrrrQrz must be pep561-stub-namez& cannot be validated by any definitionr7�r'r1r)r
rr�data_any_of_count8s    rrWrWrs����d�S�"�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�a}�H\�mZ�dl�yA�CW�xX�[c�ew�Zx�wy�Yz�AG�H�	H����	.��$��$�;�~�&:�;�D�A�2�2��9N��3O�Ro�3o�w{�CE�IT�I^�X^�C_�bd�Cd�rz�|P�qQ�X`�a�a��!�#���	.��$��$�9�~�&8�9�$�?�2�2��9N��3O�Rm�3m�uy�AC�GR�G\�V\�A]�`b�Ab�px�zL�oM�T\�]�]��!�#���&�r�[�-B�F�'C�Fn�'n�vz�BD�HS�H]�W]�B^�ac�Bc�xT�_s�Dq�{C�PX�Zn�Oo�rz�|N�qO�NP�pQ�X_�`�	`��K��(�-��-��(�-��-�s&�AD	�AD�		D�D�	D$�#D$c���t|t�s8td|xsdzdz|d|xsdzdzdddgd�dd	dd
d�idd
diidd�d
���t|t�}|�rt|j	��}d	|vrM|jd	�|d	}t|t�s'td|xsdzdz|d|xsdzdzdd
d�d
���|j
�D]�\}}tdj|�s�||vr|j|�t|t�r�Etd|xsdzdjdit���zdz|d|xsdzdjdit���zdzd
did
���|S)Nrr
rrr�r�r�rr�r�r>rrr�r�rz.global must be objectz.global�.{data_key}r)r'r(rr)r*r+rrYrZrr2)r
rrr6r7�data__global�data_key�data_vals        rr4r4�s����d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�eM�Vz�E_�re	�o	w	�H
P
�[
c
�t
j�R
k�G
l�DH�KQ�S[�J\�C]�kp
�Yq
�x
~
�
�	
��d�D�)�L����	�	��$�	��y� ����X�&���>�L��l�T�3�.�r�[�5J�F�/K�Nf�/f�nz�BD�HS�H]�W]�B^�aj�Bj�@H�YO�wP�W]�^�^�"&�*�*�,��H�h��d�#�*�*�8�4��y�(��$�$�X�.�!�(�T�3�2�2��9N��3O�Rf�R_�Rf�Rf�Rr�io�iq�Rr�3r�vG�4G�OW�^`�do�dy�sy�^z�}Q�}J�}Q�}Q�}]�TZ�T\�}]�^]�`b�^b�pv�x@�oA�HN�O�O�#/��Krc�^9��Q�R�t�t��s�td|xsdzdz�d|xsdzdzdddddgd	id
ddd
d��ddddd��ddddgd��dgd�dgd�d�d	dddddgd�idgd�dddd �idgd�gid!dgd"�d#d$�id!gd�gd%�gd&��d'dd(d)d*gd+��d,d-ddd.d/gd�idgd�ddgd0�d�idgd�gd1��d2d3d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�gd?�d@��dAd3d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�dBdCgd@��dDd3dEdidFdG��dHd3ddIdJd<�dKdLgd@��dMd	dNd7dOddPdQ�idR��dSdTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^��d_dTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^��d`gda�dWdbid7dOdTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^�idc��ddd3dedfdgddhdidj�dk��dld	dmdWd
id7dOd3dfdgddhdidj�dn�ido��dpd3dqdrgdsgdt�idu��d
gd7dpgdpdvdidwgdx�idy�gdz�d{�dgd|gd}�d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�dTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^�dfdgddhdidj�d~�d�dE����t�t�}|�rbt��}t	�fd��d�D���s�td|xsdzd�z�d|xsdzdzdddddgd	id
ddd
d��ddddd��ddddgd��dgd�dgd�d�d	dddddgd�idgd�dddd �idgd�gid!dgd"�d#d$�id!gd�gd%�gd&��d'dd(d)d*gd+��d,d-ddd.d/gd�idgd�ddgd0�d�idgd�gd1��d2d3d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�gd?�d@��dAd3d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�dBdCgd@��dDd3dEdidFdG��dHd3ddIdJd<�dKdLgd@��dMd	dNd7dOddPdQ�idR��dSdTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^��d_dTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^��d`gda�dWdbid7dOdTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^�idc��ddd3dedfdgddhdidj�dk��dld	dmdWd
id7dOd3dfdgddhdidj�dn�ido��dpd3dqdrgdsgdt�idu��d
gd7dpgdpdvdidwgdx�idy�gdz�d{�dgd|gd}�d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�dTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^�dfdgddhdidj�d~�d�d�����t�j
��}d
|vr�|jd
��d
}t|t�s(td|xsdzd�z|d|xsdzd�zddd
d�dE����t|t�r3|d
|�s(td|xsdzd�z|d|xsdzd�zddd
d�dW����d|vr�|jd��d}t|t�s(td|xsdzd�z|d|xsdzd�zdddd�dE����t|t�r3|d|�s(td|xsdzd�z|d|xsdzd�zdddd�dW����d|vrO|jd��d}t|t�s)td|xsdzd�z|d|xsdzd�zdddgd�dE����d|v�r�|jd��d�Rd�}	|	d�kr?	t�Rt�s)td|xsdzd�z�Rd|xsdzd�zdgd�d�dE����|	d�z
}	|	d�k�r	t�Rt�sMtd|xsdzd�z�Rd|xsdzd�zd	dddddgd�idgd�dddd �idgd�gid!dgd"�d#d$�id!gd�gd%�dE����d�}
|
s�	t�Rt�}|r�t�R�}t	�Rfd��d�D��s/td|xsdzd�z�Rd|xsdzd�zddddgd�idgd�d�����t�Rj
��}
d|
vrO|
jd��Rd}t|t�s)td|xsdzd�z|d|xsdzd�zdddgd�dE����|
d�z
}
|
s�	t�Rt�}|r�t�R�}t	�Rfd��d�D��s-td|xsdzd�z�Rd|xsdzd�zdddd �idgd�d�����t�Rj
��}
d|
vrM|
jd��Rd}t|t�s'td|xsdzd�z|d|xsdzd�zddd �dE����|
d�z
}
|
s<td|xsdzd�z�Rd|xsdzd�zdddddgd�idgd�dddd �idgd�gid����t�Rt�}|r�t�R�}t	�Rfd��d�D��s0td|xsdzd�z�Rd|xsdzd�zd!dgd"�d#d$�id!gd�d�����t�Rj
��}
d!|
vrP|
jd!��Rd!}t|t�s*td|xsdzd�z|d|xsdzd�zdgd"�d#d$�dE����|	d�z
}	|	d�k7rktd|xsdzd�zd�t|	�zd�zz�Rd|xsdzd�zgd�dgd�d�d	dddddgd�idgd�dddd �idgd�gid!dgd"�d#d$�id!gd�gd%�gd&�d�����d'|vr�|jd'��d'}t|t�s*td|xsdzd�z|d|xsdzd�zdd(d)d*gd+�dE����t|t�r5|d(|�s*td|xsdzd�z|d|xsdzd�zdd(d)d*gd+�dW����d,|v�r|jd,��d,�Qd�}|d�kr�	t�Qt�}|r�t�Q�}t	�Qfd��d�D��s/td|xsdzd�z�Qd|xsdzd�zddd.d/gd�idgd�d�����t�Qj
��}d|vrO|jd��Qd}t|t�s)td|xsdzd�z|d|xsdzd�zdd.d/gd�dE����|d�z
}|d�kr�	t�Qt�}|r�t�Q�}t	�Qfd��d�D��s/td|xsdzd�z�Qd|xsdzd�zddgd0�d�idgd�d�����t�Qj
��}d|vrO|jd��Qd}t|t�s)td|xsdzd�z|d|xsdzd�zdgd0�d�dE����|d�z
}|d�k7rQtd|xsdzd�zd�t|�zd�zz�Qd|xsdzd�zd-ddd.d/gd�idgd�ddgd0�d�idgd�gd1�d�����d2|vr�|jd2��d2}t|ttf�s=td|xsdzd�z|d|xsdzd�zd3d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�gd?�d@�dE����t|ttf�}|rJt|�}t|�D]1\}}t|||xsdd�jd�it���z��3dA|vr�|jdA��dA}t|ttf�s=td|xsdzd�z|d|xsdzd�zd3d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�dBdCgd@�dE����t|ttf�}|rJt|�}t|�D]1\} }!t|!||xsdd�jd�it���z��3dD|vr�|jdD��dD}"t|"ttf�s*td|xsdzd�z|"d|xsdzd�zd3dEdidFdG�dE����t|"ttf�}#|#r�t|"�}$t|"�D]q\}%}&t|&t�r�td|xsdzd�jd�it���zd�z|&d|xsdzd�jd�it���zdzdEdidE����dH|v�ry|jdH��dH}'t|'ttf�s.td|xsdzd�z|'d|xsdzd�zd3ddIdJd<�dKdLgd@�dE����t|'ttf�}(|(�rt|'�})t|'�D]�\}*}+t|+t�s^td|xsdzd�jd�it���zd�z|+d|xsdzd�jd�it���zdzddIdJd<�dE����t|+t�s��|dI|+�r��td|xsdzd�jd�it���zd�z|+d|xsdzd�jd�it���zdzddIdJd<�dW����dM|v�r�|jdM��dM},t|,t�s.td|xsdzd�z|,d|xsdzd�zd	dNd7dOddPdQ�idR�dE����t|,t�}-|-�r�t|,j
��}.|,j�D�]\}/}0t dOj#|/�s� |/|.vr|.j|/�t|0t�s]td|xsdzd�jd�it���zd�z|0d|xsdzd�jd�it���zdzddPdQ�dE����t|0t�s��|dP|0�r��td|xsdzd�jd�it���zd�z|0d|xsdzd�jd�it���zdzddPdQ�dW����|.r=td|xsdzd�zt|.�zd�z|,d|xsdzd�zd	dNd7dOddPdQ�idR�dȬ���dS|vr*|jdS��dS}1t%|1||xsdd�z�d_|vr*|jd_��d_}2t%|2||xsdd�z�d`|v�r�|jd`��d`}3t|3t�}4|4�r�t|3j
��}5|3j�D]_\}6}7t dOj#|6�s�|6|5vr|5j|6�t%|7||xsdd�jd�it���z��a|5rStd|xsdzd�zt|5�zd�z|3d|xsdzd�zgda�dWdbid7dOdTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^�idc�dȬ���t|3�}8|8d�k7r�d�}9|3D]D}6	t|6t�r1|db|6�s&td|xsdzd�z|6d|xsdzd�zdWdbidW�����F|9sDtd|xsdzd�z|3d|xsdzd�zgda�dWdbid7dOdTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^�idc�dѬ���dd|vr�|jdd��dd}:t|:ttf�s.td|xsdzd�z|:d|xsdzd�zd3dedfdgddhdidj�dk�dE����t|:ttf�};|;rJt|:�}<t|:�D]1\}=}>t'|>||xsdd�jd�it���z��3dl|v�r�|jdl��dl}?t|?t�s7td|xsdzd�z|?d|xsdzd�zd	dmdWd
id7dOd3dfdgddhdidj�dn�ido�dE����t|?t�}@|@�rt|?j
��}A|?j�D�]\}B}Ct dOj#|B�s� BAvrAjB�tCttf�sctd|xsdzd�jd�it���zd�zCd|xsdzd�jd�it���zdzd3dfdgddhdidj�dn�dE����tCttf�}D|Ds��tC�}Et|C�D]1\}F}Gt'|G||xsdd�jd�it���z��3��ArFtd|xsdzd�ztA�zd�z|?d|xsdzd�zd	dmdWd
id7dOd3dfdgddhdidj�dn�ido�dȬ���t|?�}H|Hd�k7r�d�}I|?D]D}B	tBt�r1|d
B�s&td|xsdzd�zBd|xsdzd�zdWd
idW�����FIs7td|xsdzd�z|?d|xsdzd�zd	dmdWd
id7dOd3dfdgddhdidj�dn�ido�dѬ���dp|vr�|jdp��dp}Jt|Jttf�s.td|xsdzd�zJd|xsdzd�zd3dqdrgdsgdt�idu�dE����tJttf�}K|Kr�tJ�}Lt|J�D]g\}M}N|Ndtvs�td|xsdzd�jd�it���zd�zNd|xsdzd�jd�it���zdzdsgdt�ids����|�r�td|xsdzd�zt|�zd�z�d|xsdzdzdddddgd	id
ddd
d��ddddd��ddddgd��dgd�dgd�d�d	dddddgd�idgd�dddd �idgd�gid!dgd"�d#d$�id!gd�gd%�gd&��d'dd(d)d*gd+��d,d-ddd.d/gd�idgd�ddgd0�d�idgd�gd1��d2d3d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�gd?�d@��dAd3d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�dBdCgd@��dDd3dEdidFdG��dHd3ddIdJd<�dKdLgd@��dMd	dNd7dOddPdQ�idR��dSdTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^��d_dTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^��d`gda�dWdbid7dOdTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^�idc��ddd3dedfdgddhdidj�dk��dld	dmdWd
id7dOd3dfdgddhdidj�dn�ido��dpd3dqdrgdsgdt�idu��d
gd7dpgdpdvdidwgdx�idy�gdz�d{�dgd|gd}�d4d5d6d	d7dd8d9gd�dd:d;d<�d=�d>�dTdUd	gdV�dWdXid7dOddYdZgd[d\d]�id^�dfdgddhdidj�d~�d�dȬ���		t�t�}|r�t��}t	�fd�d�D��s0td|xsdzd�z�d|xsdzdzdpgdpdvdidwgdx�idy�d�����t�j
��}dp|vr�|jdp��dp}Jt|Jttf�}K|Krdd7}OJD]1}P	Pdk7r&td|xsdzd�zPd|xsdzd�zdvdidv����d�}OnOs*td|xsdzd�zJd|xsdzd�zdvdidwgdx�d笀��td|xsdzd�z�d|xsdzdzdpgdpdvdidwgdx�idy�gdz�d{�d鬀��#t$rY���wxYw#t$rY���wxYw#t$rY���wxYw#t$rY���wxYw#t$rY���wxYw#t$rY��1wxYw#t$rd7}9Y��fwxYw#t$rd7}IY��wxYw#t$rY��%wxYw#t$rYnwxYw	t�t�}|rHt��}t	�fd�d�D��s)td|xsdzd�z�d|xsdzdzdgd|gd}�d������S#t$rY�SwxYw)�Nrr
rrr'r(r)r*rr+rr,r-rr.r/r0rr1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrErGrHrIrJrKrLrMrNrOrPrQrRrrTr�r�Fr�r�r�r�r`r�r�rUrVrWrXrYrZrr[r\r]r^r_rarbrcrdrrerfrgrirjr�r�rr�r�r�r�r�r�r�rlrmrnrorprrrsrtr�r�r�r�rurvrwrxryrzr{r|r}r~rrr�r�r�r�r�r�r�r�r�rc3�&�K�|]}|�v���
y�wrrr�s  �rr"zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata.<locals>.<genexpr>�r�r#)r+z! must contain ['name'] propertiesr&�.name must be string�.namez.name must be pep508-identifierz.version must be stringz.versionz.version must be pep440z.description must be stringz.descriptionrrMz.readme must be stringz.readmerz.readme must be objectc3�&�K�|]}|�v���
y�wrr�rr �data__readmes  �rr"zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata.<locals>.<genexpr>�������*U�H�D�4�<�+?�H�r#rUz(.readme must contain ['file'] propertiesz.readme.file must be stringz.readme.filec3�&�K�|]}|�v���
y�wrrr�s  �rr"zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata.<locals>.<genexpr>�rr#)r<z(.readme must contain ['text'] propertiesz.readme.text must be stringz.readme.textz-.readme cannot be validated by any definitionc3�&�K�|]}|�v���
y�wrrr�s  �rr"zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata.<locals>.<genexpr>�s�����"U�DT�D�4�<�#7�DT�r#)r?z0.readme must contain ['content-type'] propertiesz#.readme.content-type must be stringz.readme.content-typez/.readme must be valid exactly by one definitionrNrOrFz.requires-python must be stringz.requires-pythonz+.requires-python must be pep508-versionspecc3�&�K�|]}|�v���
y�wrr�rr �
data__licenses  �rr"zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata.<locals>.<genexpr>������"N�X�T�4�=�#8�X�r#z).license must contain ['file'] propertiesz.licensez.license.file must be stringz
.license.filec3�&�K�|]}|�v���
y�wrrrs  �rr"zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata.<locals>.<genexpr>rr#z).license must contain ['text'] propertiesz.license.text must be stringz
.license.textz0.license must be valid exactly by one definitionz.authors must be arrayz.authorsz.authors[{data__authors_x}]z.maintainers must be arrayz.maintainersz#.maintainers[{data__maintainers_x}]z.keywords must be arrayz	.keywordsz.keywords[{data__keywords_x}]r$z.classifiers must be arrayz.classifiersz#.classifiers[{data__classifiers_x}]z must be trove-classifierz.urls must be objectz.urlsz.urls.{data__urls_key}z must be urlz.urls must not contain r%r$z.scriptsz.gui-scriptsz%.entry-points.{data__entrypoints_key}z.entry-points must not contain z
.entry-pointsTz-.entry-points must be python-entrypoint-groupz6.entry-points must be named by propertyName definitionrqz.dependencies must be arrayz
.dependenciesz%.dependencies[{data__dependencies_x}]z%.optional-dependencies must be objectz.optional-dependenciesz7.optional-dependencies.{data__optionaldependencies_key}rPz[.optional-dependencies.{data__optionaldependencies_key}[{data__optionaldependencies_val_x}]z(.optional-dependencies must not contain z0.optional-dependencies must be pep508-identifierz?.optional-dependencies must be named by propertyName definitionz.dynamic must be arrayrRz.dynamic[{data__dynamic_x}]z� must be one of ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']r&c3�&�K�|]}|�v���
y�wrrr�s  �rr"zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata.<locals>.<genexpr>�s�����@�K�D�4�4�<�K�r#)rzz$ must contain ['dynamic'] propertiesz2.dynamic must be same as const definition: versionz0.dynamic must contain one of contains definitionr�z' must NOT match a disallowed definitionr�c3�&�K�|]}|�v���
y�wrrr�s  �rr"zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata.<locals>.<genexpr>�s�����<���t�t�|��r#)r.z$ must contain ['version'] propertiesr)r'r(rr,r-r)r*r+r1r.r/r0�nvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_authorrr2rrYrZ�yvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group�rvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_dependency)Sr
rrr6r�r7�
data__name�
data__version�data__description�data__readme_one_of_count9�data__readme_any_of_count10�data__readme_is_dict�data__readme_len�data__readme_keys�data__readme__file�data__readme__text�data__readme__contenttype�data__requirespython�data__license_one_of_count11�data__license_is_dict�data__license_len�data__license_keys�data__license__file�data__license__text�
data__authors�data__authors_is_list�data__authors_len�data__authors_x�data__authors_item�data__maintainers�data__maintainers_is_list�data__maintainers_len�data__maintainers_x�data__maintainers_item�data__keywords�data__keywords_is_list�data__keywords_len�data__keywords_x�data__keywords_item�data__classifiers�data__classifiers_is_list�data__classifiers_len�data__classifiers_x�data__classifiers_item�
data__urls�data__urls_is_dict�data__urls_keys�data__urls_key�data__urls_val�
data__scripts�data__guiscripts�data__entrypoints�data__entrypoints_is_dict�data__entrypoints_keys�data__entrypoints_key�data__entrypoints_val�data__entrypoints_len� data__entrypoints_property_names�data__dependencies�data__dependencies_is_list�data__dependencies_len�data__dependencies_x�data__dependencies_item�data__optionaldependencies�"data__optionaldependencies_is_dict�data__optionaldependencies_keys�data__optionaldependencies_key�data__optionaldependencies_val�&data__optionaldependencies_val_is_list�"data__optionaldependencies_val_len� data__optionaldependencies_val_x�#data__optionaldependencies_val_item�data__optionaldependencies_len�)data__optionaldependencies_property_namesr��data__dynamic_is_list�data__dynamic_len�data__dynamic_x�data__dynamic_item�data__dynamic_contains�data__dynamic_keyrrsS`                                                                                @@rr3r3�s�T����d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�eM�Vi�tf�z~�@f�yg�qy�IAK�JP�[c�t	�K
^
�R_
�IAK�a
j
�u
}
�NF�RZ�l
[�IAK�]j�u}�Q
z
�|
D�P
E�lF�IAK�HP�dr�GO�bU�~V�ai�v}�PV�ai�}{�}N�|O�XP�OQ�`f�_g�@h�z@�KS�dG�BH�yI�X^�W_�j`�a�ub�tB�MU�h{ �I!m!�Dn!�so!�~!L"�}!M"�dN"�tO"�XP"�}Q"�RR"�IAK�T"e"�p"x"�D#X#�l#]$�_$p%�k#q%�g"r%�IAK�t%}%�O&P'�l'r'�}'E(�Y(_)�a)k)�X(l)�t'm)�k'n)�})C*�|)D*�\'E*�W*]*�h*p*�C+r-�_*s-�V*t-�C.I.�B.J.�G*K.�['L.�%M.�IAK�O.X.�c.j.�}.S/�^/t/�B0y0�C1K1�e1j1�L2T2�h2s3�u3L4�g2M4�C2N4�b4j4�v4A5�R5q5�Y4r5�z1s5�u.t5�G6Z9�Z.[9�IAK�]9j9�u9|9�O:e:�p:F;�T;K<�U<]<�w<|<�^=f=�z=E?�G?^?�y=_?�U=`?�t?|?�H@S@�d@CA�k?DA�L=EA�G:FA�ZAjB�lBtC�YAuC�l9vC�IAK�xCBD�MDTD�`DfD�hDpD�_DqD�BERF�DDSF�IAK�UFbF�mFtF�HGPG�\GnG�GtH�FuH�III�AJ^J�HI_J�dF`J�IAK�bJhJ�sJ{J�LKNL�hLmL�EMKM�VM^M�jMoM�MMpM�DMqM�jJrM�IAK�tM}M�GNhN�sNAO�KOSO�fOXT�lTtT�vTNU�kTOU�iUnU�FVLV�WV_V�sVkW�mWkX�rVlX�xXUY�cY^Z�NV_Z�EV`Z�MaZ�IAK�cZpZ�zZ[[�f[t[�~[F\�Y\Ka�_aga�iaAb�^aBb�\bab�ybb�JcRc�fc^d�`d^e�ec_e�keHf�VfQg�AcRg�xbSg�rZTg�IAK�Vgdg�xgxk�LlTl�Vlol�Klpl�JmOm�gmmm�wmXn�cnqn�{nCo�VoHt�\tdt�ft~t�[tt�Yu^u�vu|u�GvOv�cv[w�]w[x�bv\x�hxEy�SyNz�~uOz�uuPz�omQz�fmRz�fgSz�IAK�Uzcz�nzuz�F{i{�|{V|�a|m|�w||�P}G~�S~[~�t{\~�ez]~�IAK�_~v~�AI�Z�S@[@�]@p@�R@q@�KAPA�hAnA�yA@B�SBmB�xBDC�NCVC�gC^D�jDrD�KBsD�pAtD�gAuD�x~vD�IAK�xDAE�LESE�gEpF�rFWG�fEXG�dGjG�lG~J�cGJ�CE@K�IAK�PKVK�OKWK�qKvK�TL]L�SL^L�oLxL�HMOM�QMZM�GM[M�oMQN�nMRN�zLSN�nLTN�FLUN�dNPW�~KQW�iWrW�hWsW�GXFY�FXGY�[WHY�lYBZ�MZcZ�qZh[�r[z[�T\Y\�{\C]�W]b^�d^{^�V]|^�r\}^�Q_Y_�e_p_�A```�H_a`�i\b`�dYc`�Baca�na|a�FbNb�abSg�ggog�qgIh�fgJh�dhih�AiGi�RiZi�nifj�hjfk�migk�skPl�^lYm�IiZm�@i[m�z`\m�tmNn�Ynen�onwn�Hoo�KpSp�lmTp�YYUp�YVp�]pcp�dp�	dp��d�D�)�L���t�9���5�H�5�5�*�2��1F��+G�Jm�+m�uy�AC�GR�G\�V\�A]�`b�Ab�{c�l�J|�PT�V|�O}�GO�_WK�`f�qy�J	U
�a
t
�hu
�_WK�w
@�KS�d\�hp�Bq�_WK�s@
�K
S
�g
P�RZ�f
[�B
\�_WK�^f�zH�]e�xk�Tl�w�LS�fl�w�SQ�Sd�Re�nf�eg�v|�u}�V~�PV�ai�z]�X^�O_�nt�mu�@v�Uw�Kx�JX�ck�~Q!�_!C"�ZD"�IE"�T"b"�S"c"�zd"�Je"�nf"�Sg"�hh"�_WK�j"{"�F#N#�Z#n#�B$s$�u$F&�A$G&�}"H&�_WK�J&S&�e&f'�B(H(�S([(�o(u)�w)A*�n(B*�J(C*�A(D*�S*Y*�R*Z*�r'[*�m*s*�~*F+�Y+H.�u*I.�l*J.�Y._.�X.`.�]*a.�q'b.�U&c.�_WK�e.n.�y.@/�S/i/�t/J0�X0O1�Y1a1�{1@2�b2j2�~2I4�K4b4�}2c4�Y2d4�x4@5�L5W5�h5G6�o4H6�P2I6�K/J6�]6p9�p.q9�_WK�s9@:�K:R:�e:{:�F;\;�j;a<�k<s<�M=R=�t=|=�P>[?�]?t?�O>u?�k=v?�J@R@�^@i@�z@YA�A@ZA�b=[A�]:\A�pA@C�BCJD�oAKD�B:LD�_WK�NDXD�cDjD�vD|D�~DFE�uDGE�XEhF�ZDiF�_WK�kFxF�CGJG�^GfG�rGDH�UHJI�UGKI�_IUJ�WJtJ�^IuJ�zFvJ�_WK�xJ~J�IKQK�bKdL�~LCM�[MaM�lMtM�@NEN�cMFN�ZMGN�@KHN�_WK�JNSN�]N~N�IOWO�aOiO�|OnT�BUJU�LUdU�AUeU�UDV�\VbV�mVuV�IWAX�CXAY�HWBY�NYkY�yYtZ�dVuZ�[VvZ�UNwZ�_WK�yZF[�P[q[�|[J\�T\\\�o\aa�ua}a�aWb�taXb�rbwb�OcUc�`chc�|ctd�vdte�{cue�Af^f�lfgg�Wchg�Ncig�H[jg�_WK�lgzg�NhNl�bljl�llEm�alFm�`mem�}mCn�Mnnn�ynGo�QoYo�lo^t�rtzt�|tTu�qtUu�outu�LvRv�]vev�yvqw�swqx�xvrx�~x[y�iydz�Tvez�Kvfz�Engz�|mhz�|giz�_WK�kzyz�D{K{�\{{�R|l|�w|C}�M}U}�f}]~�i~q~�J|r~�{zs~�_WK�u~L�W_�pU@�i@q@�s@FA�h@GA�aAfA�~ADB�OBVB�iBCC�NCZC�dClC�}CtD�@EHE�aBIE�FBJE�}AKE�NLE�_WK�NEWE�bEiE�}EFG�HGmG�|EnG�zG@H�BHTK�yGUK�YEVK�_WK�fKlK�eKmK�GLLL�jLsL�iLtL�EMNM�^MeM�gMpM�]MqM�ENgN�DNhN�PMiN�DMjN�\LkN�zNfW�TLgW�WHX�~WIX�]X\Y�\X]Y�qW^Y�BZXZ�cZyZ�G[~[�H\P\�j\o\�Q]Y]�m]x^�z^Q_�l]R_�H]S_�g_o_�{_F`�W`v`�^_w`�\x`�zYy`�Xaya�DbRb�\bdb�wbig�}gEh�Gh_h�|g`h�zhh�Wi]i�hipi�Dj|j�~j|k�Cj}k�Ilfl�tlom�_ipm�Viqm�Parm�Jndn�on{n�EoMo�^oUp�apip�Bnjp�oYkp�olp�sp}p�~p�
~p���	�	��$�	��Y�����V�$��f��J��j�3�0�.�r�[�5J�F�/K�Nd�/d�lv�}�DO�DY�SY�~Z�]d�~d�zB�S^�j}�q~�EK�L�L��*�c�*�:�~�&9�:�:�F�2�2��9N��3O�Rs�3s�|F�MO�S^�Sh�bh�Mi�ls�Ms�IQ�bm�yL�@M�T\�]�]��	�!����Y�'� ��O�M��m�c�3�.�r�[�5J�F�/K�Ng�/g�o|�DF�JU�J_�Y_�D`�cm�Dm�CK�\T�`h�zi�pv�w�w��-��-�/�~�h�/�
�>�2�2��9N��3O�Rk�3k�tA�HJ�NY�Nc�]c�Hd�gq�Hq�GO�`X�dl�~m�t|�}�}��I�%����]�+� $�]� 3���/�#�7�.�r�[�5J�F�/K�Nk�/k�tE�LN�R]�Rg�ag�Lh�ky�Ly�OW�kT�V^�j_�F`�gm�n�n��y� ����X�&���>�L�)*�&�)�A�-�6�%�l�S�:�6�r�[�=R�F�7S�Vn�7n�wC�JL�P[�Pe�_e�Jf�ir�Jr�HP�cV�W�^d�e�e�.�!�3�.�)�A�-�06�%�l�T�;�6�r�[�=R�F�7S�Vn�7n�wC�JL�P[�Pe�_e�Jf�ir�Jr�HP�]d�w}�HP�db�du�cv�w�vx�GM�FN�gO�ag�rz�Kn�io�`p�E�~F�QG�fH�\I�[i�t|�O	b�pT�kU�ZV�es�dt�Ku�[v�w�~D
�E
�E
�23�/�6�
>�3=�l�D�3Q�0�3�36�|�3D� 0�'*�*U�H�*U�'U�*B�2��I^�X^�C_�cM�DM�Ua�hj�ny�nC�}C�hD�GP�hP�ms�~F�ZX�Zk�Yl�um�ln�}C�|D�]E�LV�+W�%W�47��8I�8I�8K�4L� 1�#)�->�#>�$5�$<�$<�V�$D�9E�f�9M�$6�+5�6H�3�+P�.F�r�[�Mb�\b�Gc�gD�HD�L^�eg�kv�k@�z@�eA�DR�eR�hp�DB�DU�CV�_W�^d�/e�)e�7�1�<�7�6�
>�3=�l�D�3Q�0�3�36�|�3D� 0�'*�*U�H�*U�'U�*B�2��I^�X^�C_�cM�DM�Ua�hj�ny�nC�}C�hD�GP�hP�ms�~F�Wz�u{�l|�KQ�JR�]S�Zd�+e�%e�47��8I�8I�8K�4L� 1�#)�->�#>�$5�$<�$<�V�$D�9E�f�9M�$6�+5�6H�3�+P�.F�r�[�Mb�\b�Gc�gD�HD�L^�eg�kv�k@�z@�eA�DR�eR�hp�Ad�_e�lr�/s�)s�7�1�<�7�6�6�r�[�=R�F�7S�WF�8F�NZ�ac�gr�g|�v|�a}�@I�aI�W^�qw�BJ�^\�^o�]p�yq�pr�AG�@H�aI�[a�lt�Eh�ci�Zj�y�x@�KA�`B�VC�JQ�R�R�+5�l�D�+I�(�+�+.�|�+<�(�"�"U�DT�"U�U�":�2��AV�PV�;W�[M�<M�Ua�hj�ny�nC�}C�hD�GP�hP�m{�FN�at�Bf�}g�lh�wE�vF�]G�NX�#Y�Y�,/��0A�0A�0C�,D�)�)�->�>�-�4�4�^�D�8D�^�8T�5�#-�.G�#�#O�&>�r�[�EZ�TZ�?[�_D�@D�Le�ln�r}�rG�AG�lH�Ka�la�w�Re�sW�nX�_e�'f�!f�.�!�3�.�)�Q�.�.�r�[�5J�F�/K�N�/�DH�KN�Oi�Kj�Dj�m~�D~�0�GS�Z\�`k�`u�ou�Zv�yB�ZB�ao�D	L	�_	R
�{S
�^
f
�s
z
�MS�^f�zx�zK�yL�UM�LN�]c�\d�}
e�w}�HP�aD�E�vF�U[�T\�g]�|
^�r
_�q�JR�ex�Fj�Ak�pl�{I�zJ�aK�q
L�U
M�zN�OO�V]�^�^��	�)����.�/�#'�(9�#:� ��2�S�:�.�r�[�5J�F�/K�No�/o�xL�SU�Yd�Yn�hn�So�rD�SD�Zb�nB�VG�IZ�U[�Q\�ci�j�j��.��4�;�~�&:�;�<P�Q�2�2��9N��3O�R�3�H\�ce�it�i~�x~�c�BT�cT�jr�~R�fW�Yj�ek�al�s{�|�|��	�!����Y�'� ��O�M�+,�(�+�a�/�
6�,6�}�d�,K�)�,�,/�
�,>�)�"�"N�X�"N�N�":�2��AV�PV�;W�[F�<F�N[�bd�hs�h}�w}�b~�AK�bK�hn�yA�U[�]g�Th�pi�gj�y�x@�XA�HR�#S�S�-0��1C�1C�1E�-F�*�!�%7�7�.�5�5�f�=�2?��2G�/�#-�.A�C�#I�&>�r�[�EZ�TZ�?[�^|�?|�EX�_a�ep�ez�tz�_{�~M�_M�ck�E�GQ�~R�ZS�Z`�'a�!a�0�A�5�0�+�a�/�
6�,6�}�d�,K�)�,�,/�
�,>�)�"�"N�X�"N�N�":�2��AV�PV�;W�[F�<F�N[�bd�hs�h}�w}�b~�AK�bK�hn�yA�TC�pD�gE�TZ�S[�X\�cm�#n�n�-0��1C�1C�1E�-F�*�!�%7�7�.�5�5�f�=�2?��2G�/�#-�.A�C�#I�&>�r�[�EZ�TZ�?[�^|�?|�EX�_a�ep�ez�tz�_{�~M�_M�ck�~m�Zn�u{�'|�!|�0�A�5�0�+�q�0�.�r�[�5J�F�/K�OA�0A�EI�LO�Pl�Lm�Em�pA�EA�0B�JW�^`�do�dy�sy�^z�}G�^G�de�AG�RZ�nt�v@�mA�IB�@C�RX�QY�qZ�lr�}E	�X	G�tH�kI�X^�W_�\`�pa�Tb�ip�q�q��	�!����Y�'� ��O�M��m�d�E�]�;�.�r�[�5J�F�/K�Nf�/f�n{�CE�IT�I^�X^�C_�bl�Cl�BI�\r�}S�aX�bj�DI�ks�GR�Tk�Fl�bm�A	I	�U	`	�q	P
�xQ
�YR
�TS
�f
y
�yz
�AG�H�H�$.�}�t�U�m�$L�!�$�$'�
�$6�!�;D�]�;S�7�O�%7�C�DV�Xf�it�i~�x~�Bf�B_�Bf�Bf�Br�io�iq�Br�hr�s�<T��I�%����]�+� $�]� 3���/�$���?�.�r�[�5J�F�/K�Nj�/j�sD�KM�Q\�Qf�`f�Kg�jx�Kx�NU�h~�I_�md�nv�PU�w�S^�`w�Rx�ny�M	U	�a	l	�}	\
�D	]
�e^
�`_
�s
C�EM
�r
N
�EO
�V
\
�]
�]
�(2�3D�t�U�m�(T�%�(�(+�,=�(>�%�CL�M^�C_�?�'�)?�C�DZ�\j�mx�mB�|B�Fr�Fk�Fr�Fr�F~�u{�u}�F~�l~��D`���"����Z�(�!�*�-�N��n�t�U�m�<�.�r�[�5J�F�/K�Ng�/g�o}�EG�KV�K`�Z`�Ea�do�Eo�EL�X^�`h�Wi�zJ�|K�RX�Y�Y�%/���u�
�%N�"�%�%(��%8�"�=F�~�=V�9�$�&9�%�&9�C�A�6�r�[�=R�F�7S�V|�Vu�V|�V|�WI�@F�@H�WI�8I�L]�8]�ex�A�EP�EZ�TZ�[�^D�^}�^D�^D�^P�GM�GO�^P�P�SU�U�ci�ks�bt�{A�B�B�>W��I�%����]�+� $�]� 3���/�$���?�.�r�[�5J�F�/K�Nj�/j�sD�KM�Q\�Qf�`f�Kg�jx�Kx�NU�iq�}O�`U�`V�j`�b�i@�EA�HN�O�O�(2�3D�t�U�m�(T�%�(�(+�,=�(>�%�CL�M^�C_�?�'�)?�%�&<�s�D�6�r�[�=R�F�7S�WC�V{�WC�WC�WO�FL�FN�WO�8O�Rc�8c�kA�HJ�NY�Nc�]c�Hd�gS�gL�gS�gS�g_�V\�V^�g_�H_�bd�Hd�zB�N`�qf�qg�nt�u�u�!�"8�#�>�A�~�.@�A�BX�Y�":�2��AV�PV�;W�[G�Z�[G�[G�[S�JP�JR�[S�<S�Vq�<q�yO�VX�\g�\q�kq�Vr�ua�uZ�ua�ua�um�dj�dl�um�Vm�pr�Vr�HP�\n�t�u�|D�#E�E�D`��Y�����V�$��f��J��j�4�1�.�r�[�5J�F�/K�Nd�/d�lv�}�DO�DY�SY�~Z�]d�~d�zB�SU�ot�LR�]e�qv�Tw�Kx�qy�@F�G�G�!+�J��!=��!�"%�j�o�o�&7�"8��6@�6F�6F�6H�2�N�N�%�f�-�4�4�^�D�)�_�<�+�2�2�>�B�)�.�3�@�":�2��AV�PV�;W�Zy�Zr�Zy�Zy�[F�}C�}E�[F�<F�IZ�<Z�bp�wy�}H�}R�LR�wS�Vu�Vn�Vu�Vu�VA�x~�x@�VA�wA�DF�wF�\d�pu�Sv�}C�#D�D�%�n�c�:�#8�>�%�#8��#H�&>�r�[�EZ�TZ�?[�^}�^v�^}�^}�_J�AG�AI�_J�@J�M[�@[�cq�xz�~I�~S�MS�xT�Wv�Wo�Wv�Wv�WB�y�yA�WB�xB�EG�xG�]e�qv�Tw�~F�'G�!G�7I�#�2�2��9N��3O�Rk�3k�lo�p�mA�4A�BO�4O�Wa�hj�ny�nC�}C�hD�GN�hN�dl�}�Y^�v|�GO�[`�~a�ub�[c�j@�A�A��	�!����Y�'� ��O�M�
F�GT�Vd�gr�g|�v|�@J�fJ�
K��I�%����]�+�#�M�2��
F�GW�Yg�ju�j�y�CQ�iQ�
R��Y�&����^�,� $�^� 4��(2�3D�d�(K�%�(�),�->�-C�-C�-E�)F�&�DU�D[�D[�D]�@�)�+@�%�f�-�4�4�5J�K�0�4J�J�2�9�9�:O�P�R�Sh�jx�{F�{P�JP�TB�T{�TB�TB�TN�EK�EM�TN�zN�O�	E^�
*�2�2��9N��3O�Rs�3s�tw�yO�uP�4P�Q^�4^�fw�~@�DO�DY�SY�~Z�]l�~l�KK�_g�iB	�^C	�]	b	�z	@
�J
k
�v
D�NV�i[�ow�yQ�nR�lq�IO�Zb�vn�pn�uo�{X�fa�Qb�Hc�B
d�y	e�yf�mC�D�D�(+�,=�(>�%�(�A�-�7;�4�1B�-�E�)�*?��E�'P�~�6O�'P�Qf�'g�*B�2��I^�X^�C_�cR�DR�Zo�vx�|G�|Q�KQ�vR�Ud�vd�rz�|U�qV�]e�+f�%f��	2C�<�6�r�[�=R�F�7S�WO�8O�Wh�oq�u@�uJ�DJ�oK�N]�o]�||�PX�Zs�Ot�N	S	�k	q	�{	\
�g
u
�
G�ZL�`h�jB�_C�]b�z@�KS�g_�a_�f`�lI�WR�BS�yT�s	U�j	V�jW�^m�n�n��Y�&����^�,�!%�n�!5���0�4��-�@�.�r�[�5J�F�/K�Nk�/k�tF�MO�S^�Sh�bh�Mi�l{�M{�QX�iL�_y�DP�Zb�sj�v~�W�H@�GM�N�N�)3�4F��u�
�)V�&�)�),�-?�)@�&�EN�Oa�Eb�A�(�*A�G�H_�ao�r}�rG�AG�Ky�Kr�Ky�Ky�KE�|B�|D�KE�qE�F�Fc�"�i�/����4�5�)-�.E�)F�&��8�4�A�.�r�[�5J�F�/K�Nu�/u�~X�_a�ep�ez�tz�_{�~V�_V�lt�Ej�~F�H[�}\�v{�SY�dk�~X�co�yA�RI	�U	]	�v^	�[_	�R`	�ca	�h	n	�o	�o	�1;�<V�X\�1]�.�1�25�6P�6U�6U�6W�2X�/�Vp�Vv�Vv�Vx�R�2�4R�%�f�-�4�4�5S�T�9�=\�\�;�B�B�Ca�b�)�*H�4�QV�-�X�":�2��AV�PV�;W�[[�[T�[[�[[�[g�^d�^f�[g�<g�jz�<z�B`�gi�mx�mB�|B�gC�FF�F�FF�FF�FR�IO�IQ�FR�gR�UW�gW�mt�Ga�lx�BJ�[R�^f�g�dh�ou�#v�v�AK�Lj�mq�sx�ly�Az�>�A�AD�Ec�Ad�>�ir�tR�jS� e� @�Be�!S�Tw�yG�JU�J_�Y_�cG�c@�cG�cG�cS�JP�JR�cS�IS�!T�jS�Wy�3�2�2��9N��3O�R|�3|�~A�Ba�~b�4b�cp�4p�xR�Y[�_j�_t�nt�Yu�xP�YP�fn�d�x@�BU�wV�pu�MS�^e�xR�]i�s{�L	C
�O
W
�pX
�UY
�LZ
�][
�b
x
�y
�y
�14�5O�1P�.�1�Q�6�@D�=�:T�6�N�)�*H�#�N�'J�~�6I�'J�Ki�'j�*B�2��I^�X^�C_�cU�DU�]{�BD�HS�H]�W]�B^�ay�By�GO�Qd�Fe�lt�+u�%u��	;U�E�6�r�[�=R�F�7S�WX�8X�`z�AC�GR�G\�V\�A]�`x�Ax�NV�gL�`h�j}�_~�X]�u{�FM�`z�EQ�[c�tk	�w		�X@
�}A
�tB
�EC
�J
Y
�Z
�Z
��	�!����Y�'� ��O�M��m�d�E�]�;�.�r�[�5J�F�/K�Nf�/f�n{�CE�IT�I^�X^�C_�bl�Cl�BI�]f�hM�\N�Z`�bt�Yu�yv�}C	�D	�D	�$.�}�t�U�m�$L�!�$�$'�
�$6�!�;D�]�;S�7�O�%7�)�2D�D�6�r�[�=R�F�7S�Vz�Vs�Vz�Vz�WG�~D�~F�WG�8G�Jn�8n�vH�OQ�U`�Uj�dj�Ok�nR�nK�nR�nR�n^�U[�U]�n^�O^�ac�Oc�qw�yK�pL�SY�Z�Z�<T��*�2��1F��+G�J^�+^�_b�cl�_m�+m�n{�+{�DH�OQ�U`�Uj�dj�Ok�np�Op�Iq�zM�XJ�^b�dJ�]K�U]�meK�nt�G	�X	c
�o
B�vC�meK�EN�Ya�rj�v~�P�meK�A
N
�Y
a
�u
^�`h�t
i�P
j�meK�lt�HV�ks�Fy�bz�EM�Za�tz�EM�a_�ar�`s�|t�su�DJ�CK�dL�^d�ow�Hk�fl�]m�|B�{C�ND�cE�YF�Xf�qy�L_!�m!Q"�hR"�WS"�b"p"�a"q"�Hr"�Xs"�|t"�au"�vv"�meK�x"I#�T#\#�h#|#�P$A%�C%T&�O$U&�K#V&�meK�X&a&�s&t'�P(V(�a(i(�}(C*�E*O*�|(P*�X(Q*�O(R*�a*g*�`*h*�@(i*�{*A+�L+T+�g+V.�C+W.�z*X.�g.m.�f.n.�k*o.�'p.�c&q.�meK�s.|.�G/N/�a/w/�B0X0�f0]1�g1o1�I2N2�p2x2�L3W4�Y4p4�K3q4�g2r4�F5N5�Z5e5�v5U6�}4V6�^2W6�Y/X6�k6~9�~.9�meK�A:N:�Y:`:�s:I;�T;j;�x;o<�y<A=�[=`=�B>J>�^>i?�k?B@�]>C@�y=D@�X@`@�l@w@�HAgA�O@hA�p=iA�k:jA�~ANC�PCXD�}AYD�P:ZD�meK�\DfD�qDxD�DEJE�LETE�CEUE�fEvF�hDwF�meK�yFFG�QGXG�lGtG�@HRH�cHXI�cGYI�mIcJ�eJBK�lICK�HGDK�meK�FKLK�WK_K�pKrL�LMQM�iMoM�zMBN�NNSN�qMTN�hMUN�NKVN�meK�XNaN�kNLO�WOeO�oOwO�JP|T�PUXU�ZUrU�OUsU�MVRV�jVpV�{VCW�WWOX�QXOY�VWPY�\YyY�GZB[�rVC[�iVD[�cNE[�meK�G[T[�^[[�J\X\�b\j\�}\oa�CbKb�Mbeb�Bbfb�@cEc�]ccc�ncvc�JdBe�DeBf�IdCf�Oflf�zfug�ecvg�\cwg�V[xg�meK�zgHh�\h\l�plxl�zlSm�olTm�nmsm�KnQn�[n|n�GoUo�_ogo�zolt�@uHu�Jubu�tcu�}uBv�Zv`v�kvsv�Gww�Axx�Fw@y�Lyiy�wyrz�bvsz�Yvtz�Snuz�Jnvz�Jhwz�meK�yzG{�R{Y{�j{M|�`|z|�E}Q}�[}c}�t}k~�w~~�X|@�I{A�meK�CZ�em�~c@�w@@�AATA�v@UA�oAtA�LBRB�]BdB�wBQC�\ChC�rCzC�KDBE�NEVE�oBWE�TBXE�KBYE�\ZE�meK�\EeE�pEwE�KFTG�VG{G�JF|G�HHNH�PHbK�GHcK�gEdK�meK�tKzK�sK{K�ULZL�xLAM�wLBM�SM\M�lMsM�uM~M�kMM�SNuN�RNvN�^MwN�RMxN�jLyN�HOtW�bLuW�MXVX�LXWX�kXjY�jXkY�WlY�PZfZ�qZG[�U[L\�V\^\�x\}\�_]g]�{]F_�H___�z]`_�V]a_�u_}_�I`T`�e`Da�l_Ea�M]Fa�HZGa�faGb�Rb`b�jbrb�Ecwg�KhSh�Uhmh�Jhnh�HiMi�eiki�vi~i�RjJk�LkJl�QjKl�Wltl�Bm}m�mi~m�dim�^a@n�Xnrn�}nIo�So[o�locp�opwp�Pnxp�}Yyp�}zp�AqWq�Xq�
Xq�!u�	U�%�d�D�1�L���t�9���@�K�@�@�2�2��9N��3O�Rx�3x�AE�LN�R]�Rg�ag�Lh�km�Lm�HQ�GR�cl�|C�EN�{O�cE�bF�nG�bH�zI�PZ�[�[���	�	��,�	��	�)��$�$�Y�/�$(��O�M�,6�}�t�U�m�,T�)�,�16�.�1>�-�B�#4�	�#A�*B�2��I^�X^�C_�cW�DW�_p�wy�}H�}R�LR�wS�V`�w`�nu�w@�mA�HO�+P�%P�9=� 6� %�2?� 6�":�2��AV�PV�;W�[M�<M�Ub�ik�oz�oD�~D�iE�HR�iR�mt�v�l@�Tv�Sw�_x�I�#J�J�+�2��1F��+G�Js�+s�{�GI�MX�Mb�\b�Gc�fh�Gh�KT�JU�fo�F�HQ�~R�fH�eI�qJ�eK�}L�[G�uH�OT�U�
U��g0�5��5��( 8�=��=�� 8�=��=��0�5��5��:0�5��5��0�5��5��@ 8�E�?D�<�E��V 8�N�HM�E�N��J$<�A�T�A��(�-��-���"�$��-����4�y�H��<��<�<�.�r�[�5J�F�/K�Nt�/t�}A�HJ�NY�Nc�]c�Hd�gi�Hi�DM�CN�ba�ab�vc�jt�u�u��K��$�
���K�
�sa�>An�"A!Ao�CAn/�Ao�C
An?�%DAo�"CAo�9CAo/�N+AAo?�\AAp�iB3Ap3�l-Ap#�l;/Ap3�m*5Ar�n	An,�n+An,�n/	An<�n8Ao�n;An<�n<Ao�n?	Ao�oAo�oAo�oAo�o	Ao�oAo�o	Ao,�o+Ao,�o/	Ao<�o;Ao<�o?Ap�p
Ap�pAp �pAp �p#	Ap0�p,Ap3�p/Ap0�p0Ap3�p3	Ap?�p<Ar�p>Ap?�p?Ar�r	Ar,�r+Ar,c��t|t�s*td|xsdzdz|d|xsdzdzdddddd	�d
���t|t�r5|d|�s*td|xsdzdz|d|xsdzdzdddddd	�d
���|S)Nrr
r$rtr�rr�r�r�rrz must be pep508rr�r
s   rr
r
�s&���d�S�"�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�a{�FR�\d�ul�x@�YA�HN�O�	O��$���'�~�h�'��-�*�2��1F��+G�J[�+[�cg�np�t�uJ�DJ�oK�NP�oP�e�JV�`h�yp�|D�]E�LT�U�
U��Krc�<�t|t�s9td|xsdzdz|d|xsdzdzdddgd�dd	id
ddd
dgddd�id�d���t|t�}|�r.t|j	��}|j�D�]!\}}tdj|�s� ||vr|j|�t|t�satd|xsdzdjd it���zdz|d|xsdzdjd it���zdzdd
dgddd�d���t|t�s��|d|�r��td|xsdzdjd it���zdz|d|xsdzdjd it���zdzdd
dgddd�d���|rHtd|xsdzdzt|�zdz|d|xsdzdzdddgd�dd	id
ddd
dgddd�id�d���t|�}|dk7r�d}|D]D}	t|t�r1|d	|�s&td|xsdzdz|d|xsdzdzdd	id����F|s9td|xsdzdz|d|xsdzdzdddgd�dd	id
ddd
dgddd�id�d���|S#t$rd
}Y��wxYw)!Nrr
rrjr�rr�rr�Frrr�r�r�r�r�r�rrr�r$z$ must be python-entrypoint-referencer&r%r$rTz must be python-entrypoint-namez) must be named by propertyName definitionrqr)
r'r(rr)r*rrYrZr+r1rr2r,)	r
rrr6r7r�r�r��data_property_namess	         rrr�s����d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�aB�M[�em�@r�F	N	�P	h	�E	i	�C
H
�`
f
�q
y
�ME�GE
�LF
�R
o
�}
x�h
y�_
z�Y{�BH�I�	I��d�D�)�L����	�	��$�	�"&�*�*�,��H�h��f�%�,�,�X�6��y�(��$�$�X�.�!�(�S�2�2�2��9N��3O�Rf�R_�Rf�Rf�Rr�io�iq�Rr�3r�vG�4G�OW�^`�do�dy�sy�^z�}Q�}J�}Q�}Q�}]�TZ�T\�}]�^]�`b�^b�x@�TL�NL�SM�Yv�D�o@�GM�N�N��h��,�H�>�*G�H��R�6�r�[�=R�F�7S�Vj�Vc�Vj�Vj�Vv�ms�mu�Vv�7v�z`�8`�hp�wy�}H�}R�LR�wS�Vj�Vc�Vj�Vj�Vv�ms�mu�Vv�wv�y{�w{�QY�me�ge�lf�rO�]X�HY�`h�i�i�#/��*�2��1F��+G�J^�+^�_b�cl�_m�+m�n{�+{�DH�OQ�U`�Uj�dj�Ok�np�Op�Ef�q�IQ�dV	�j	r	�t	L
�i	M
�g
l
�DJ�U]�qi�ki
�pj
�v
S�a\�L]�C^�}_�f|�}�
}��t�9���q�=�"&�� ��0�!�(�C�0�G�~�.F�G��Q�":�2��AV�PV�;W�Z{�;{�DL�SU�Yd�Yn�hn�So�rt�St�BJ�Ld�Ae�lt�#u�u��	!�'�.�r�[�5J�F�/K�Ny�/y�BF�MO�S^�Sh�bh�Mi�ln�Mn�Cd�o}�GO�bT	�h	p	�r	J
�g	K
�e
j
�BH�S[�og�ig
�nh
�t
Q�_Z�J[�A\�{]�ds�t�t��K��	0�0�*/�'�0�s�
AJ
�
J�Jc�f�t|t�s7td|xsdzdz|d|xsdzdzdddddd	d
dgd�d	d
dd�d�d�d���t|t�}|�rVt|j	��}d|vrO|jd�|d}t|t�s)td|xsdzdz|d|xsdzdzd	d
dgd�d���d|vr�|jd�|d}t|t�s(td|xsdzdz|d|xsdzdzd	d
dd�d���t|t�r@tdj|�s(td|xsdzdz|d|xsdzdzd	d
dd�d���|rFtd|xsdzdzt
|�zdz|d|xsdzdzdddddd	d
dgd�d	d
dd�d�d�d���|S) Nrr
rrTr�r�rFrr�r�r3r�r�r`r�r�rrr+r�r�r�z.email must be stringz.emailrz.email must be idn-emailrr&r%r$)	r'r(rr)r*r+r1rY�match)r
rrr6r7r�data__emails       rrrs����d�T�#�&�r�[�-B�F�'C�FW�'W�_c�jl�p{�qF�@F�kG�JL�kL�aw�BX�f]�go�IN�px�LW�Yp�Kq�gr�FN�Ze�vU	�}V	�^W	�YX	�_	e	�f	�	f	��d�D�)�L����	�	��$�	��Y�����V�$��f��J��j�3�0�.�r�[�5J�F�/K�Nd�/d�lv�}�DO�DY�SY�~Z�]d�~d�zB�Va�cz�U{�q|�CI�J�J��i�����W�%��w�-�K��k�C�1�.�r�[�5J�F�/K�Ne�/e�mx�@B�FQ�F[�U[�@\�_g�@g�}E�Q\�mL�tM�TZ�[�[��+�s�+�%�&<�=�C�C�K�P�2�2��9N��3O�Rl�3l�t�GI�MX�Mb�\b�Gc�fn�Gn�DL�Xc�tS�{T�[c�d�d��*�2��1F��+G�J^�+^�_b�cl�_m�+m�n{�+{�DH�OQ�U`�Uj�dj�Ok�np�Op�E[�f|�JA�KS�mr�T\�p{�}T�oU�KV�jr�~I	�Z	y	�az	�B{	�}|	�C
Y
�Z
�
Z
��Kr)�VERSION�re�fastjsonschema_exceptionsr�compilerYr�NoneTyperrr5r\r[rXrWr4r3r
rrrrr�<module>rcs:����	�?�
�B�J�J�v��
�"�*�*�T�
��B�J�J�v��&�B�J�J�'@�A�	����:��"$�$��vx�FJ�G�Rac�pt�W�r}�MQ�#�J}�MQ��$}�MQ�8�t{}�KO��,EG�TX��&tv�DH�C�J
MO�]a��TV�dh��>IK�Y]�rpython3.12/site-packages/setuptools/config/_validate_pyproject/__pycache__/formats.cpython-312.pyc000064400000032311151732704220027217 0ustar00�

��_i�#���ddlZddlZddlZddlZddlZddlmZejrddl	m
Z
eje�Z
dZejdezdzej ej"z�Zdedefd	�Zd
Zejde�d�ej"�Zd
edefd�Z		ddlmZdedefd�Zdedefd�Z dedefd�Z!defd�Z"Gd�d�Z#	ddl$m%Z&dedefd�Z'dedefd�Z(dedefd�Z)dZ*ejde*�d�ej"�Z+dZ,ejde,�d�ej"�Z-dZ.ejde.�d�ej"�Z/dedefd �Z0dedefd!�Z1dedefd"�Z2dedefd#�Z3dedefd$�Z4dedefd%�Z5y#e$r	ddlmZY��wxYw#e$re
j?d�dedefd�ZY��wxYw#e$r
e#�Z'Y��wxYw)&�N)�chain)�Literala�
    v?
    (?:
        (?:(?P<epoch>[0-9]+)!)?                           # epoch
        (?P<release>[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P<pre>                                          # pre-release
            [-_\.]?
            (?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P<pre_n>[0-9]+)?
        )?
        (?P<post>                                         # post release
            (?:-(?P<post_n1>[0-9]+))
            |
            (?:
                [-_\.]?
                (?P<post_l>post|rev|r)
                [-_\.]?
                (?P<post_n2>[0-9]+)?
            )
        )?
        (?P<dev>                                          # dev release
            [-_\.]?
            (?P<dev_l>dev)
            [-_\.]?
            (?P<dev_n>[0-9]+)?
        )?
    )
    (?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
z^\s*z\s*$�version�returnc�0�tj|�duS�N)�
VERSION_REGEX�match)rs ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/_validate_pyproject/formats.py�pep440r2s�����w�'�t�3�3�z'([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])�^�$�namec�0�tj|�duSr)�PEP508_IDENTIFIER_REGEXr
)rs r�pep508_identifierr=s��"�(�(��.�d�:�:r
)�requirements�valuec�b�	tj|�y#tj$rYywxYw)NTF)�_req�Requirement�InvalidRequirement�rs r�pep508rHs0��	����U�#����&�&�	��	�s��.�.z�Could not find an installation of `packaging`. Requirements, dependencies and versions might not be validated. To enforce validation, please install `packaging`.c��y�NT�rs rrrVs��r
c�J��t�fd�dD��rytd����S)zGExpression that can be used to specify/lock versions (including ranges)c3�&�K�|]}|�v���
y�wrr)�.0�crs  �r�	<genexpr>z%pep508_versionspec.<locals>.<genexpr>\s�����
/��!�1��:��s�)�;�]�@F�requirement)�anyrrs`r�pep508_versionspecr)Zs*���
�
/��
/�/���K��w�'�(�(r
c��|jd�\}}}d�t|jd�|jd��D�}td�|D��S)N�:c3�<K�|]}|j����y�wr��strip�r!�is  rr#z+pep517_backend_reference.<locals>.<genexpr>ls����P�&O��1�7�7�9�&O����.c3�8K�|]}|s�t|����y�wr��python_identifierr/s  rr#z+pep517_backend_reference.<locals>.<genexpr>ms����>�[��A� ��#�[�s��)�	partition�_chain�split�all)r�module�_�obj�identifierss     r�pep517_backend_referencer>jsI���_�_�S�)�N�F�A�s�P�f�V�\�\�#�->��	�	�#��&O�P�K��>�[�>�>�>r
c��ddl}ddlm}ddlm}d}|j�}|||��5}|�}|j
dd�|d<|j�j|jd	d
��cddd�S#1swYyxYw)Nr)�Message)�urlopenz.https://pypi.org/pypi?:action=list_classifiers)�contextzcontent-typez
text/plain�content_type�charsetzutf-8)
�ssl�
email.messager@�urllib.requestrA�create_default_context�	getheader�read�decode�	get_param)rEr@rA�urlrB�response�headerss       r�_download_classifiersrPtsu���%�&�
:�C��(�(�*�G�	��g�	&�(��)��"*�"4�"4�^�\�"R�����}�}��%�%�g�&7�&7�	�7�&K�L�
'�	&�	&�s�AB�Bc�r�eZdZUdZej
ddejefed<d�Z	d�Z
dedefd	�Zy)
�_TroveClassifierakThe ``trove_classifiers`` package is the official way of validating classifiers,
    however this package might not be always available.
    As a workaround we can still download a list from PyPI.
    We also don't want to be over strict about it, so simply skipping silently is an
    option (classifiers will be validated anyway during the upload to PyPI).
    NzLiteral[False]�
downloadedc�.�d|_d|_d|_y)NF�trove_classifier)rS�_skip_download�__name__��selfs r�__init__z_TroveClassifier.__init__�s�����#���+��
r
c��d|_yr)rVrXs r�_disable_downloadz"_TroveClassifier._disable_download�s
��"��r
rrc��|jdus|jdurytjd�stjd�rd|_d}tj|�y|j�>d}tj|�	t
t�j��|_||jvxs|j�jd�S#t$rd|_tjd�YywxYw)	NFT�
NO_NETWORK�VALIDATE_PYPROJECT_NO_NETWORKzxInstall ``trove-classifiers`` to ensure proper validation. Skipping download of classifiers list from PyPI (NO_NETWORK).zxInstall ``trove-classifiers`` to ensure proper validation. Meanwhile a list of classifiers will be downloaded from PyPI.z*Problem with download, skipping validation�
private ::)rSrV�os�getenv�_logger�debug�setrP�
splitlines�	Exception�lower�
startswith)rYr�msgs   r�__call__z_TroveClassifier.__call__�s����?�?�e�#�t�':�':�d�'B��
�9�9�\�"�b�i�i�0O�&P�#�D�O�P�
�
�M�M�#����?�?�"�P�
�
�M�M�#��
�"%�&;�&=�&H�&H�&J�"K�������'�Q�5�;�;�=�+C�+C�L�+Q�Q���
�"'����
�
�J�K��
�s�&C � %D�D)
rW�
__module__�__qualname__�__doc__�typing�Union�Set�str�__annotations__rZr\�boolrkrr
rrRrR�sH������T�#3�V�Z�Z��_�D�E�E�+�#�R�c�R�d�Rr
rR)�classifiersc�T�|tvxs|j�jd�S)Nr`)�_trove_classifiersrhrirs rrUrU�s$���*�*�T�e�k�k�m�.F�.F�|�.T�Tr
c	��|jd�^}}|jd�sytdj|dt	d�g|���S)Nr2z-stubsF)r8�endswith�python_module_name�join�len)r�top�childrens   r�pep561_stub_namer�sM���[�[��%�N�C�(��<�<��!���c�h�h��,<�s�8�}�n�(=�'I��'I�J�K�Kr
c�.�ddlm}	||�}|jsItj	d|���|jd�s |jd�sd|vs|d|���}t
|jxr|j�S#t$rYywxYw)	Nr)�urlparsezsFor maximum compatibility please make sure to include a `scheme` prefix in your URL (e.g. 'http://'). Given value: �/�\r&zhttp://F)	�urllib.parser��schemerc�warningrirt�netlocrg)rr��partss   rrMrM�s���%�
������|�|��O�O� � %�w�(�
�
�$�$�S�)�U�-=�-=�d�-C�s�e�|� �7�5�'�!2�3���E�L�L�1�U�\�\�2�2������s�A?B�	B�Bz[^\[\s=]([^=]*[^\s=])?z[\w.-]+z\w+(\.\w+)*c�"�|j�Sr)�isidentifierrs rr5r5�s������r
c��|jd�s|jd�rytd�|jd�D��S)Nr2Fc3�2K�|]}t|����y�wrr4)r!�ms  rr#z.python_qualified_identifier.<locals>.<genexpr>�s����>�-=�� ��#�-=���)riryr9r8rs r�python_qualified_identifierr��s8����������s� 3���>�U�[�[��-=�>�>�>r
c��t|�Sr)r�rs rrzrz�s
��&�u�-�-r
c�0�tj|�duSr)�ENTRYPOINT_GROUP_REGEXr
rs r�python_entrypoint_groupr��s��!�'�'��.�d�:�:r
c��tj|�sytj|�s$d|�d�}|tz
}tj|�y)NFz
Entry point `z'` does not follow recommended pattern: T)�ENTRYPOINT_REGEXr
�RECOMMEDED_ENTRYPOINT_REGEX�RECOMMEDED_ENTRYPOINT_PATTERNrcr�)rrjs  r�python_entrypoint_namer��sJ���!�!�%�(��&�,�,�U�3��e�W�$K�L���,�,�������r
c���|jd�\}}}d|vr�|jd�\}}}|j�ddk7ryd�|jtjdz�j	d�D�}td	�|D��sytjd
|�d��n|}|j	d�}|rt||j	d��n|}td
�|D��S)Nr+�[���r%Fc3�<K�|]}|j����y�wrr-)r!�xs  rr#z.python_entrypoint_reference.<locals>.<genexpr>
s����X�%W��!�'�'�)�%W�r1z[]�,c3�2K�|]}t|����y�wr)r)r!�es  rr#z.python_entrypoint_reference.<locals>.<genexpr>s����8��A�$�Q�'��r��`z4` - using extras for entry points is not recommendedr2c3�NK�|]}t|j�����y�wr)r5r.r/s  rr#z.python_entrypoint_reference.<locals>.<genexpr>s����A�[�� �����+�[�s�#%)	r6r.�string�
whitespacer8r9rcr�r7)	rr:r;�restr<�extras_�extras�module_partsr=s	         r�python_entrypoint_referencer�s����o�o�c�*�O�F�A�t�
�d�{��.�.��-���Q���=�=�?�2��#�%��X�W�]�]�6�3D�3D�t�3K�%L�%R�%R�SV�%W�X���8��8�8�����!�E�7�"V�W�X����<�<��$�L�:>�&��s�y�y��~�6�L�K��A�[�A�A�Ar
)6�loggingra�rer�ro�	itertoolsrr7�
TYPE_CHECKING�typing_extensionsr�	getLoggerrWrc�VERSION_PATTERN�compile�X�Ir	rrrtr�PEP508_IDENTIFIER_PATTERNrr�	packagingrr�ImportError�setuptools._vendor.packagingrr�r)r>rPrR�trove_classifiersrurwrUrrM�ENTRYPOINT_PATTERNr�r�r��ENTRYPOINT_GROUP_PATTERNr�r5r�rzr�r�r�rr
r�<module>r�s����	�	�
�
�%�	���)�
�'�
�
�H�
%��
��>��
�
�7�_�4�w�>����r�t�t��L�
�4�C�4�D�4�G��$�"�*�*�q�)B�(C�1�%E�r�t�t�L��;�C�;�D�;��F�2�
�c��d��$	)�c�	)�d�	)� ?�C�?�D�?�
M�s�
M�/R�/R�d*�C�U��U��U�L�C�L�D�L��s��t��(/���2�:�:��"4�!5�Q�7����>�� *��(�b�j�j�1�-J�,K�1�)M�r�t�t�T��)��#����a�(@�'A��$C�R�T�T�J�� �S� �T� �?�s�?�t�?�.�c�.�d�.�;�3�;�4�;��#��$��B�s�B�t�B��A�F�E�F�����O�O�	=���c��d����T�*�'�)��*�sB�&F
�,F�G�
F�F�F�F�G�?G�G�Gsite-packages/setuptools/config/_validate_pyproject/__pycache__/error_reporting.cpython-312.pyc000064400000042642151732704220030717 0ustar00python3.12�

��_i,���ddlZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZmZm
Z
mZmZmZmZmZddlmZej*e�Zddd	d
d�ZdZhd
�Zej6d�Zej6dej:�Zddddd�ZGd�de�Z ed��Z!Gd�d�Z"Gd�d�Z#de$dee$fd�Z%y)�N)�contextmanager)�indent�wrap)�Any�Dict�Iterator�List�Optional�Sequence�Union�cast�)�JsonSchemaValueExceptionzkeys must be named byzat least one item that matches�z"only items matching the definition)z(must be named by propertyName definitionzone of contains definitionz same as const definition:zonly specified items)zmust not be emptyzis always invalidzmust not be there>�not�anyOf�items�oneOf�contains�
propertyNamesz\W+|([A-Z][^A-Z\W]*)z^[\w_]+$�table�key�keys)�object�property�
properties�property namesc�2�eZdZdZdZdZdZedefd��Z	y)�ValidationErrora�Report violations of a given JSON schema.

    This class extends :exc:`~fastjsonschema.JsonSchemaValueException`
    by adding the following properties:

    - ``summary``: an improved version of the ``JsonSchemaValueException`` error message
      with only the necessary information)

    - ``details``: more contextual information about the error like the failing schema
      itself and the value that violates the schema.

    Depending on the level of the verbosity of the ``logging`` configuration
    the exception message will be only ``summary`` (default) or a combination of
    ``summary`` and ``details`` (when the logging level is set to :obj:`logging.DEBUG`).
    r�exc��t|�}|t|�|j|j|j|j
�}t
jdd�j�}|dk7r#|j|jc|_	|_
|j|_|j|_
|j|_|S)N� JSONSCHEMA_DEBUG_CODE_GENERATION�false)�_ErrorFormatting�str�value�name�
definition�rule�os�getenv�lower�	__cause__�
__traceback__�message�_original_message�summary�details)�clsr �	formatter�obj�
debug_codes     ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/config/_validate_pyproject/error_reporting.py�_from_jsonschemaz ValidationError._from_jsonschema=s���$�R�(�	��#�i�.�"�(�(�I�N�N�B�M�M�2�7�7�S���Y�Y�A�7�K�Q�Q�S�
��� �/1�|�|�R�=M�=M�,�C�M�3�,� "�
�
����'�'����'�'����
�N)
�__name__�
__module__�__qualname__�__doc__r1r2r0�classmethodrr8�r9r7rr(s3��� �G��G����	�":�	��	r9rc#�dK�	d��y#t$r}tj|�d�d}~wwxYw�w�N)rrr8)r s r7�detailed_errorsrBJs0����=�
��#�=��.�.�r�2��<��=�s�0�	�0�	-�(�-�0c�h�eZdZdefd�Zdefd�Zedefd��Zedefd��Z	d�Z
d�Zdefd	�Zy
)r$r c���||_d|j|j��d�|_|jjj	|j|j�|_d|_d|_y)N�`r)r �_simplify_namer'r/�replacer0�_summary�_details)�selfr s  r7�__init__z_ErrorFormatting.__init__Ss\�������+�+�B�G�G�4�5�Q�7��	�!%�����!8�!8����$�)�)�!L�����
���
r9�returnc��tj�tjkr'|jr|j
�d|j��S|j
S)N�

)�_logger�getEffectiveLevel�logging�DEBUGr2r1�rJs r7�__str__z_ErrorFormatting.__str__Zs@���$�$�&�'�-�-�7�D�L�L��l�l�^�4����~�6�6��|�|�r9c�\�|js|j�|_|jSrA)rH�_expand_summaryrSs r7r1z_ErrorFormatting.summary`�#���}�}� �0�0�2�D�M��}�}�r9c�\�|js|j�|_|jSrA)rI�_expand_detailsrSs r7r2z_ErrorFormatting.detailsgrWr9c�H�td�}|jd�r||dS|S)Nzdata.)�len�
startswith)rJr'�xs   r7rFz_ErrorFormatting._simplify_namens'����L���?�?�7�3�t�A�B�x�=��=r9c�d��|j�tj�D]\}}�j||���t	�fd�t
D��r�S|jj}|jjtvr(|r&tt�}��dt||�d���S�S)Nc3�&�K�|]}|�v���
y�wrAr?)�.0�	substring�msgs  �r7�	<genexpr>z3_ErrorFormatting._expand_summary.<locals>.<genexpr>xs�����?��I�y�C�����z:

�    )
r0�_MESSAGE_REPLACEMENTSrrG�any�
_SKIP_DETAILSr �rule_definitionr)�
_NEED_DETAILS�_SummaryWriter�_TOML_JARGONr)rJ�bad�repl�schemar1rbs     @r7rVz _ErrorFormatting._expand_summaryrs�����$�$��.�4�4�6�I�C���+�+�c�4�(�C�7��?��?�?��J����(�(���7�7�<�<�=�(�V�$�\�2�G��U�%��w�v��� ?�@�A�A��
r9c	�n�g}|jjjdg�}|jjjdd�xsdj|�}|r3djt	|dddd���}|jd	|���t
j|jjd
��}t
j|jjd
��}dt|d���d
|jj��dt|d���g}dj||z�S)Nz
$$description�description� �
�PreF)�width�initial_indent�subsequent_indent�break_long_wordsz
DESCRIPTION:
�)rz
GIVEN VALUE:
zOFFENDING RULE: zDEFINITION:
rN)r r(�pop�joinr�append�json�dumpsr&rr))rJ�optional�
desc_lines�descrqror&�defaultss        r7rYz _ErrorFormatting._expand_details�s�����W�W�'�'�+�+�O�R�@�
��w�w�!�!�%�%�m�T�:�R�c�h�h�z�>R����)�)����#)�&,�%*���K�
�O�O�n�[�M�:�;����D�G�G�.�.�q�9���
�
�4�7�7�=�=��3���V�E�6�2�3�4��t�w�w�|�|�.�/��F�6�6�2�3�4�
��
�{�{�8�h�.�/�/r9N)
r:r;r<rrKr%rTrr1r2rFrVrYr?r9r7r$r$Rsg���3�����������������>�� 0��0r9r$c
�~�eZdZhd�Zddeeeeffd�Zdeee	efdeee	effd�Z
	ddd	�d
eee	efdedeedefd
�Z
deedefd�Zd
edeefd�Zdedeedeefd�Z	ddededeedefd�Zdeefd�Zdeedefd�Zdedeedefd�Zd
edeedeefd�Zdededefd�Zy)rk>�title�default�examplesrqN�jargonc��|xsi|_dddd|jd��d�ddd|jd	���|jd
��d�dd
d�|_gd�|_y)Nzat least one of the followingzexactly one of the followingzall of the followingz(*NOT* the following)rz (in order)zcontains at least one ofznon-predefined acceptable rrz named via patternzpredefined valuezone of)rr�allOfr�prefixItemsrrr�patternProperties�const�enum)r�r��	maxLength�	minLength�pattern�format�minimum�maximum�exclusiveMinimum�exclusiveMaximum�
multipleOf)r��_jargon�_terms�_guess_inline_defs)rJr�s  r7rKz_SummaryWriter.__init__�sx��&,�l����5�3�+�*�"�l�l�7�3�4�K�@��2�,�T�\�\�:J�-K�,L�M�$(�L�L��$>�#?�?Q�!R�'��
���"#
��r9�termrLc��t|t�r*|D�cgc]}|jj||��� c}S|jj||�Scc}wrA)�
isinstance�listr��get)rJr��ts   r7r�z_SummaryWriter._jargon�sJ���d�D�!�37�8�4�a�D�K�K�O�O�A�q�)�4�8�8��{�{���t�T�*�*��9s�#Ar?��_pathro�prefixr�c
���t|t�r|j|||�S|j||�}|j	||�}|r|�|��S|j|d�}|j|d�}t
|�dz}tj�5}	t|j��D�]\}
\}}g|�|�}
|
dk(r|n|}|	j|�|j|
��d��t|t�rI|j||
�}|j	||
�}|	j|rd|��n
d||||
�������t|t�rT|dk7s|j|
�r>|j|||
�}|jd	�rdnd}|	j|�|�����|	jd|j!||
��d����"|	j#�cddd�S#1swYyxYw)
Nz  �- rrr�:rsr��type�[)r�r��_handle_list�_filter_unecessary�_handle_simple_dict�
_child_prefixr[�io�StringIO�	enumerater�write�_label�dict�_is_propertyr\�_value�getvalue)rJror�r��filtered�simple�child_prefix�item_prefixr�buffer�irr&�
child_path�line_prefix�children�seps                 r7�__call__z_SummaryWriter.__call__�s����f�d�#��$�$�V�V�U�;�;��*�*�6�5�9���)�)�(�E�:����X�f�X�&�&��)�)�&�$�7���(�(���6���V��s�"��
�[�[�]�f�#,�X�^�^�-=�#>���<�C��*�u�]�c�]�
�()�Q��f�F������}�T�[�[��-D�,E�Q�G�H��e�T�*�#�6�6�u�j�I�H�!�5�5�h�
�K�F��L�L�!��F�8��!�$�u�l�*�"M�!N�O��
 ��t�,��6�M�T�%6�%6�z�%B�#�0�0���Z�P�H�!)�!4�!4�S�!9�#�t�C��L�L�C�5��
�!3�4��L�L�1�T�[�[��
�%C�$D�B�!G�H�)$?�*�?�?�$�-�]�]�s
�EG,�,G5�pathc�~��|j|�s|sy|d�t�fd�dD��xs�|jvS)NF���c3�@�K�|]}�j|����y�wrA)r\)r`�krs  �r7rcz0_SummaryWriter._is_unecessary.<locals>.<genexpr>�s�����3�d��3�>�>�!�$�d�s�z$_)r�rg�_IGNORE)rJr�rs  @r7�_is_unecessaryz_SummaryWriter._is_unecessary�s>������T�"�$���2�h���3�d�3�3�J�s�d�l�l�7J�Jr9c��|j�D��cic]\}}|jg|�|��s||��c}}Scc}}wrA)rr�)rJror�rr&s     r7r�z!_SummaryWriter._filter_unecessary�sM��%�l�l�n�
�,�
��U��&�&�|��|�s�|�4�
��J�,�
�	
��
s�":r&c����t�fd�|jD��}td��j�D��}|s|r%ddj|j	�|���d�Sy)Nc3�&�K�|]}|�v���
y�wrAr?)r`�pr&s  �r7rcz5_SummaryWriter._handle_simple_dict.<locals>.<genexpr>�s�����A�)@�A�Q�%�Z�)@�rdc3�HK�|]}t|ttf����y�wrA)r�r�r�)r`�vs  r7rcz5_SummaryWriter._handle_simple_dict.<locals>.<genexpr>�s����M�n���A��d�|�4�n�s� "�{�, z}
)rgr��valuesr{�
_inline_attrs)rJr&r��inliner�s `   r7r�z"_SummaryWriter._handle_simple_dict�s`����A��)@�)@�A�A���M�e�l�l�n�M�M�M���V���	�	�$�"4�"4�U�D�"A�B�C�4�H�H�r9�schemasc������j��ryt|�}td�|D��rt|�dkr|�d�S�j	|d��dj���fd�t
|�D��S)Nrc3�JK�|]}t|ttf����y�wrA)r�r�r�)r`�es  r7rcz._SummaryWriter._handle_list.<locals>.<genexpr>
s����@��1�:�a�$���.�.��s�!#�<rsr�c	3�J�K�|]\}}�|�g��d|�d�������y�w)r��]r�Nr?)r`r�r�r�r�rJs   ���r7rcz._SummaryWriter._handle_list.<locals>.<genexpr>s9�����
�FX�d�a��D��K�'8��'8��1�#�Q�x�'8�9�9�FX�s� #)r��repr�allr[r�r{r�)rJr�r�r��repr_r�s`  ` @r7r�z_SummaryWriter._handle_listsz������t�$���W�
���@��@�@�S��Z�RT�_��W�B�<���(�(���6���w�w�
�FO�PW�FX�
�
�	
r9c�F�d}|ddd�D]
}|dvrn|dz
}�|dzdk(S)zGCheck if the given path can correspond to an arbitrarily named propertyr���Nr�>rr�r�r?)rJr��counterrs    r7r�z_SummaryWriter._is_propertysA�������B��<�C��=�=���q�L�G� ���{�a��r9c���|�^}}|j|�sHt|�}|jj|�xs dj	|j|��S|ddk(rd|�d�St
|�S)Nrrr�r�z(regex �))r��_separate_termsr�r�r{r�r�)rJr��parentsr�norm_keys     r7r�z_SummaryWriter._labelss���
��#�� � ��&�&�s�+�H��;�;�?�?�3�'�K�3�8�8�D�L�L��4J�+K�K��2�;�-�-��S�G�1�%�%��C�y�r9c���|ddk(rW|j|�sF|j|�}t|t�rddj	|��d�Stt|�St|�S)Nr�r�r�r�r�)r�r�r�r�r{r
r%r�)rJr&r��type_s    r7r�z_SummaryWriter._value(si����8�v��d�&7�&7��&=��L�L��'�E�+5�e�T�+B�!�D�I�I�e�$�%�Q�'�
�HL�S�RW�HX�
��E�{�r9c#�K�|j�D]3\}}g|�|�}|j|��d|j||������5y�w)Nz: )rr�r�)rJror�rr&r�s      r7r�z_SummaryWriter._inline_attrs0sN���� �,�,�.�J�C��%�4����J��[�[��,�-�R����E�:�0N�/O�P�P�)�s�AA
�
parent_prefixr�c�$�t|�dz|zS)Nrr)r[)rJr�r�s   r7r�z_SummaryWriter._child_prefix5s���=�!�C�'�,�6�6r9rA)r)rr?)r:r;r<r�r
rr%rKrr	r�r�rr��boolr�r�r�r�r�r�r�rr�rr�r�r?r9r7rkrk�s���=�G� 
�x��S�#�X��7� 
�D+�E�#�t�C�y�.�1�+�e�C��c��N�6K�+��(%�
 "�(%��d�D��J�&�'�(%��(%�
��}�(%�

�
(%�TK�8�C�=�K�T�K�
��
�X�c�]�
����X�c�]��x�PS�}��FH�

��

�%(�

�5=�c�]�

�	�

�
 ��#��
 ��8�C�=��S���C��x��}����Q�D�Q���
�Q�(�3�-�Q�
7�3�7�c�7�c�7r9rk�wordrLc�t�tj|�D�cgc]}|s�|j���c}Scc}w)zE
    >>> _separate_terms("FooBar-foo")
    ['foo', 'bar', 'foo']
    )�_CAMEL_CASE_SPLITTER�splitr,)r��ws  r7r�r�9s1��
 4�9�9�$�?�E�?�!�1�A�G�G�I�?�E�E��Es�5�5)&r�r}rQr*�re�
contextlibr�textwraprr�typingrrrr	r
rrr
�fastjsonschema_exceptionsr�	getLoggerr:rOrfrhrj�compiler��I�_IDENTIFIERrlrrBr$rkr%r�r?r9r7�<module>r�s���	���	�	�%�!�M�M�M�?�
�'�
�
�H�
%��1H�"B�"$�@�	���
�Y�
�!�r�z�z�"9�:���b�j�j��b�d�d�+������	���.��D�=��=�F0�F0�R[7�[7�|F�#�F�$�s�)�Fr9python3.12/site-packages/setuptools/config/_validate_pyproject/error_reporting.py000064400000026002151732704220024425 0ustar00import io
import json
import logging
import os
import re
from contextlib import contextmanager
from textwrap import indent, wrap
from typing import Any, Dict, Iterator, List, Optional, Sequence, Union, cast

from .fastjsonschema_exceptions import JsonSchemaValueException

_logger = logging.getLogger(__name__)

_MESSAGE_REPLACEMENTS = {
    "must be named by propertyName definition": "keys must be named by",
    "one of contains definition": "at least one item that matches",
    " same as const definition:": "",
    "only specified items": "only items matching the definition",
}

_SKIP_DETAILS = (
    "must not be empty",
    "is always invalid",
    "must not be there",
)

_NEED_DETAILS = {"anyOf", "oneOf", "anyOf", "contains", "propertyNames", "not", "items"}

_CAMEL_CASE_SPLITTER = re.compile(r"\W+|([A-Z][^A-Z\W]*)")
_IDENTIFIER = re.compile(r"^[\w_]+$", re.I)

_TOML_JARGON = {
    "object": "table",
    "property": "key",
    "properties": "keys",
    "property names": "keys",
}


class ValidationError(JsonSchemaValueException):
    """Report violations of a given JSON schema.

    This class extends :exc:`~fastjsonschema.JsonSchemaValueException`
    by adding the following properties:

    - ``summary``: an improved version of the ``JsonSchemaValueException`` error message
      with only the necessary information)

    - ``details``: more contextual information about the error like the failing schema
      itself and the value that violates the schema.

    Depending on the level of the verbosity of the ``logging`` configuration
    the exception message will be only ``summary`` (default) or a combination of
    ``summary`` and ``details`` (when the logging level is set to :obj:`logging.DEBUG`).
    """

    summary = ""
    details = ""
    _original_message = ""

    @classmethod
    def _from_jsonschema(cls, ex: JsonSchemaValueException):
        formatter = _ErrorFormatting(ex)
        obj = cls(str(formatter), ex.value, formatter.name, ex.definition, ex.rule)
        debug_code = os.getenv("JSONSCHEMA_DEBUG_CODE_GENERATION", "false").lower()
        if debug_code != "false":  # pragma: no cover
            obj.__cause__, obj.__traceback__ = ex.__cause__, ex.__traceback__
        obj._original_message = ex.message
        obj.summary = formatter.summary
        obj.details = formatter.details
        return obj


@contextmanager
def detailed_errors():
    try:
        yield
    except JsonSchemaValueException as ex:
        raise ValidationError._from_jsonschema(ex) from None


class _ErrorFormatting:
    def __init__(self, ex: JsonSchemaValueException):
        self.ex = ex
        self.name = f"`{self._simplify_name(ex.name)}`"
        self._original_message = self.ex.message.replace(ex.name, self.name)
        self._summary = ""
        self._details = ""

    def __str__(self) -> str:
        if _logger.getEffectiveLevel() <= logging.DEBUG and self.details:
            return f"{self.summary}\n\n{self.details}"

        return self.summary

    @property
    def summary(self) -> str:
        if not self._summary:
            self._summary = self._expand_summary()

        return self._summary

    @property
    def details(self) -> str:
        if not self._details:
            self._details = self._expand_details()

        return self._details

    def _simplify_name(self, name):
        x = len("data.")
        return name[x:] if name.startswith("data.") else name

    def _expand_summary(self):
        msg = self._original_message

        for bad, repl in _MESSAGE_REPLACEMENTS.items():
            msg = msg.replace(bad, repl)

        if any(substring in msg for substring in _SKIP_DETAILS):
            return msg

        schema = self.ex.rule_definition
        if self.ex.rule in _NEED_DETAILS and schema:
            summary = _SummaryWriter(_TOML_JARGON)
            return f"{msg}:\n\n{indent(summary(schema), '    ')}"

        return msg

    def _expand_details(self) -> str:
        optional = []
        desc_lines = self.ex.definition.pop("$$description", [])
        desc = self.ex.definition.pop("description", None) or " ".join(desc_lines)
        if desc:
            description = "\n".join(
                wrap(
                    desc,
                    width=80,
                    initial_indent="    ",
                    subsequent_indent="    ",
                    break_long_words=False,
                )
            )
            optional.append(f"DESCRIPTION:\n{description}")
        schema = json.dumps(self.ex.definition, indent=4)
        value = json.dumps(self.ex.value, indent=4)
        defaults = [
            f"GIVEN VALUE:\n{indent(value, '    ')}",
            f"OFFENDING RULE: {self.ex.rule!r}",
            f"DEFINITION:\n{indent(schema, '    ')}",
        ]
        return "\n\n".join(optional + defaults)


class _SummaryWriter:
    _IGNORE = {"description", "default", "title", "examples"}

    def __init__(self, jargon: Optional[Dict[str, str]] = None):
        self.jargon: Dict[str, str] = jargon or {}
        # Clarify confusing terms
        self._terms = {
            "anyOf": "at least one of the following",
            "oneOf": "exactly one of the following",
            "allOf": "all of the following",
            "not": "(*NOT* the following)",
            "prefixItems": f"{self._jargon('items')} (in order)",
            "items": "items",
            "contains": "contains at least one of",
            "propertyNames": (
                f"non-predefined acceptable {self._jargon('property names')}"
            ),
            "patternProperties": f"{self._jargon('properties')} named via pattern",
            "const": "predefined value",
            "enum": "one of",
        }
        # Attributes that indicate that the definition is easy and can be done
        # inline (e.g. string and number)
        self._guess_inline_defs = [
            "enum",
            "const",
            "maxLength",
            "minLength",
            "pattern",
            "format",
            "minimum",
            "maximum",
            "exclusiveMinimum",
            "exclusiveMaximum",
            "multipleOf",
        ]

    def _jargon(self, term: Union[str, List[str]]) -> Union[str, List[str]]:
        if isinstance(term, list):
            return [self.jargon.get(t, t) for t in term]
        return self.jargon.get(term, term)

    def __call__(
        self,
        schema: Union[dict, List[dict]],
        prefix: str = "",
        *,
        _path: Sequence[str] = (),
    ) -> str:
        if isinstance(schema, list):
            return self._handle_list(schema, prefix, _path)

        filtered = self._filter_unecessary(schema, _path)
        simple = self._handle_simple_dict(filtered, _path)
        if simple:
            return f"{prefix}{simple}"

        child_prefix = self._child_prefix(prefix, "  ")
        item_prefix = self._child_prefix(prefix, "- ")
        indent = len(prefix) * " "
        with io.StringIO() as buffer:
            for i, (key, value) in enumerate(filtered.items()):
                child_path = [*_path, key]
                line_prefix = prefix if i == 0 else indent
                buffer.write(f"{line_prefix}{self._label(child_path)}:")
                # ^  just the first item should receive the complete prefix
                if isinstance(value, dict):
                    filtered = self._filter_unecessary(value, child_path)
                    simple = self._handle_simple_dict(filtered, child_path)
                    buffer.write(
                        f" {simple}"
                        if simple
                        else f"\n{self(value, child_prefix, _path=child_path)}"
                    )
                elif isinstance(value, list) and (
                    key != "type" or self._is_property(child_path)
                ):
                    children = self._handle_list(value, item_prefix, child_path)
                    sep = " " if children.startswith("[") else "\n"
                    buffer.write(f"{sep}{children}")
                else:
                    buffer.write(f" {self._value(value, child_path)}\n")
            return buffer.getvalue()

    def _is_unecessary(self, path: Sequence[str]) -> bool:
        if self._is_property(path) or not path:  # empty path => instruction @ root
            return False
        key = path[-1]
        return any(key.startswith(k) for k in "$_") or key in self._IGNORE

    def _filter_unecessary(self, schema: dict, path: Sequence[str]):
        return {
            key: value
            for key, value in schema.items()
            if not self._is_unecessary([*path, key])
        }

    def _handle_simple_dict(self, value: dict, path: Sequence[str]) -> Optional[str]:
        inline = any(p in value for p in self._guess_inline_defs)
        simple = not any(isinstance(v, (list, dict)) for v in value.values())
        if inline or simple:
            return f"{{{', '.join(self._inline_attrs(value, path))}}}\n"
        return None

    def _handle_list(
        self, schemas: list, prefix: str = "", path: Sequence[str] = ()
    ) -> str:
        if self._is_unecessary(path):
            return ""

        repr_ = repr(schemas)
        if all(not isinstance(e, (dict, list)) for e in schemas) and len(repr_) < 60:
            return f"{repr_}\n"

        item_prefix = self._child_prefix(prefix, "- ")
        return "".join(
            self(v, item_prefix, _path=[*path, f"[{i}]"]) for i, v in enumerate(schemas)
        )

    def _is_property(self, path: Sequence[str]):
        """Check if the given path can correspond to an arbitrarily named property"""
        counter = 0
        for key in path[-2::-1]:
            if key not in {"properties", "patternProperties"}:
                break
            counter += 1

        # If the counter if even, the path correspond to a JSON Schema keyword
        # otherwise it can be any arbitrary string naming a property
        return counter % 2 == 1

    def _label(self, path: Sequence[str]) -> str:
        *parents, key = path
        if not self._is_property(path):
            norm_key = _separate_terms(key)
            return self._terms.get(key) or " ".join(self._jargon(norm_key))

        if parents[-1] == "patternProperties":
            return f"(regex {key!r})"
        return repr(key)  # property name

    def _value(self, value: Any, path: Sequence[str]) -> str:
        if path[-1] == "type" and not self._is_property(path):
            type_ = self._jargon(value)
            return (
                f"[{', '.join(type_)}]" if isinstance(value, list) else cast(str, type_)
            )
        return repr(value)

    def _inline_attrs(self, schema: dict, path: Sequence[str]) -> Iterator[str]:
        for key, value in schema.items():
            child_path = [*path, key]
            yield f"{self._label(child_path)}: {self._value(value, child_path)}"

    def _child_prefix(self, parent_prefix: str, child_prefix: str) -> str:
        return len(parent_prefix) * " " + child_prefix


def _separate_terms(word: str) -> List[str]:
    """
    >>> _separate_terms("FooBar-foo")
    ['foo', 'bar', 'foo']
    """
    return [w.lower() for w in _CAMEL_CASE_SPLITTER.split(word) if w]
python3.12/site-packages/setuptools/config/_validate_pyproject/extra_validations.py000064400000002201151732704220024716 0ustar00"""The purpose of this module is implement PEP 621 validations that are
difficult to express as a JSON Schema (or that are not supported by the current
JSON Schema library).
"""

from typing import Mapping, TypeVar

from .error_reporting import ValidationError

T = TypeVar("T", bound=Mapping)


class RedefiningStaticFieldAsDynamic(ValidationError):
    """According to PEP 621:

    Build back-ends MUST raise an error if the metadata specifies a field
    statically as well as being listed in dynamic.
    """


def validate_project_dynamic(pyproject: T) -> T:
    project_table = pyproject.get("project", {})
    dynamic = project_table.get("dynamic", [])

    for field in dynamic:
        if field in project_table:
            msg = f"You cannot provide a value for `project.{field}` and "
            msg += "list it under `project.dynamic` at the same time"
            name = f"data.project.{field}"
            value = {field: project_table[field], "...": " # ...", "dynamic": dynamic}
            raise RedefiningStaticFieldAsDynamic(msg, value, name, rule="PEP 621")

    return pyproject


EXTRA_VALIDATIONS = (validate_project_dynamic,)
python3.12/site-packages/setuptools/config/_validate_pyproject/__init__.py000064400000002016151732704220022741 0ustar00from functools import reduce
from typing import Any, Callable, Dict

from . import formats
from .error_reporting import detailed_errors, ValidationError
from .extra_validations import EXTRA_VALIDATIONS
from .fastjsonschema_exceptions import JsonSchemaException, JsonSchemaValueException
from .fastjsonschema_validations import validate as _validate

__all__ = [
    "validate",
    "FORMAT_FUNCTIONS",
    "EXTRA_VALIDATIONS",
    "ValidationError",
    "JsonSchemaException",
    "JsonSchemaValueException",
]


FORMAT_FUNCTIONS: Dict[str, Callable[[str], bool]] = {
    fn.__name__.replace("_", "-"): fn
    for fn in formats.__dict__.values()
    if callable(fn) and not fn.__name__.startswith("_")
}


def validate(data: Any) -> bool:
    """Validate the given ``data`` object using JSON Schema
    This function raises ``ValidationError`` if ``data`` is invalid.
    """
    with detailed_errors():
        _validate(data, custom_formats=FORMAT_FUNCTIONS)
    reduce(lambda acc, fn: fn(acc), EXTRA_VALIDATIONS, data)
    return True
python3.12/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py000064400000003114151732704220026453 0ustar00import re


SPLIT_RE = re.compile(r'[\.\[\]]+')


class JsonSchemaException(ValueError):
    """
    Base exception of ``fastjsonschema`` library.
    """


class JsonSchemaValueException(JsonSchemaException):
    """
    Exception raised by validation function. Available properties:

     * ``message`` containing human-readable information what is wrong (e.g. ``data.property[index] must be smaller than or equal to 42``),
     * invalid ``value`` (e.g. ``60``),
     * ``name`` of a path in the data structure (e.g. ``data.property[index]``),
     * ``path`` as an array in the data structure (e.g. ``['data', 'property', 'index']``),
     * the whole ``definition`` which the ``value`` has to fulfil (e.g. ``{'type': 'number', 'maximum': 42}``),
     * ``rule`` which the ``value`` is breaking (e.g. ``maximum``)
     * and ``rule_definition`` (e.g. ``42``).

    .. versionchanged:: 2.14.0
        Added all extra properties.
    """

    def __init__(self, message, value=None, name=None, definition=None, rule=None):
        super().__init__(message)
        self.message = message
        self.value = value
        self.name = name
        self.definition = definition
        self.rule = rule

    @property
    def path(self):
        return [item for item in SPLIT_RE.split(self.name) if item != '']

    @property
    def rule_definition(self):
        if not self.rule or not self.definition:
            return None
        return self.definition.get(self.rule)


class JsonSchemaDefinitionException(JsonSchemaException):
    """
    Exception raised by generator of validation function.
    """
python3.12/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py000064400001030734151732704220026620 0ustar00# noqa
# type: ignore
# flake8: noqa
# pylint: skip-file
# mypy: ignore-errors
# yapf: disable
# pylama:skip=1


# *** PLEASE DO NOT MODIFY DIRECTLY: Automatically generated code *** 


VERSION = "2.16.3"
import re
from .fastjsonschema_exceptions import JsonSchemaValueException


REGEX_PATTERNS = {
    '^.*$': re.compile('^.*$'),
    '.+': re.compile('.+'),
    '^.+$': re.compile('^.+$'),
    'idn-email_re_pattern': re.compile('^[^@]+@[^@]+\\.[^@]+\\Z')
}

NoneType = type(None)

def validate(data, custom_formats={}, name_prefix=None):
    validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies(data, custom_formats, (name_prefix or "data") + "")
    return data

def validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-build-dependencies/', 'title': 'Data structure for ``pyproject.toml`` files', '$$description': ['File format containing build-time configurations for the Python ecosystem. ', ':pep:`517` initially defined a build-system independent format for source trees', 'which was complemented by :pep:`518` to provide a way of specifying dependencies ', 'for building Python projects.', 'Please notice the ``project`` table (as initially defined in  :pep:`621`) is not included', 'in this schema and should be considered separately.'], 'type': 'object', 'additionalProperties': False, 'properties': {'build-system': {'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '<https://packaging.python.org/specifications/core-metadata/#summary>`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '<https://peps.python.org/pep-0621/#readme>`_', "with meaning similar to the one defined in `core metadata's Description", '<https://packaging.python.org/specifications/core-metadata/#description>`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, 'license': {'description': '`Project license <https://peps.python.org/pep-0621/#license>`_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, '$$description': ['`Trove classifiers <https://pypi.org/classifiers/>`_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points <https://packaging.python.org/specifications/entry-points/>`_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points <https://packaging.python.org/specifications/entry-points/>`_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, 'tool': {'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://docs.python.org/3/install/', 'title': '``tool.distutils`` table', '$$description': ['Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` scripts via `distutils configuration files', '<https://docs.python.org/3/install/#distutils-configuration-files>`_.', '``tool.distutils`` subtables could be used with the same purpose', '(NOT CURRENTLY IMPLEMENTED).'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml <https://ini2toml.readthedocs.io/en/latest/setuptools_pep621.html>`_.', 'It considers only ``setuptools`` `parameters', '<https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive'}}}, 'readme': {'anyOf': [{'$ref': '#/definitions/file-directive'}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '<https://packaging.python.org/specifications/core-metadata/#summary>`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '<https://peps.python.org/pep-0621/#readme>`_', "with meaning similar to the one defined in `core metadata's Description", '<https://packaging.python.org/specifications/core-metadata/#description>`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, 'license': {'description': '`Project license <https://peps.python.org/pep-0621/#license>`_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, '$$description': ['`Trove classifiers <https://pypi.org/classifiers/>`_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points <https://packaging.python.org/specifications/entry-points/>`_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points <https://packaging.python.org/specifications/entry-points/>`_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_keys = set(data.keys())
        if "build-system" in data_keys:
            data_keys.remove("build-system")
            data__buildsystem = data["build-system"]
            if not isinstance(data__buildsystem, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must be object", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='type')
            data__buildsystem_is_dict = isinstance(data__buildsystem, dict)
            if data__buildsystem_is_dict:
                data__buildsystem_len = len(data__buildsystem)
                if not all(prop in data__buildsystem for prop in ['requires']):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must contain ['requires'] properties", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='required')
                data__buildsystem_keys = set(data__buildsystem.keys())
                if "requires" in data__buildsystem_keys:
                    data__buildsystem_keys.remove("requires")
                    data__buildsystem__requires = data__buildsystem["requires"]
                    if not isinstance(data__buildsystem__requires, (list, tuple)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.requires must be array", value=data__buildsystem__requires, name="" + (name_prefix or "data") + ".build-system.requires", definition={'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, rule='type')
                    data__buildsystem__requires_is_list = isinstance(data__buildsystem__requires, (list, tuple))
                    if data__buildsystem__requires_is_list:
                        data__buildsystem__requires_len = len(data__buildsystem__requires)
                        for data__buildsystem__requires_x, data__buildsystem__requires_item in enumerate(data__buildsystem__requires):
                            if not isinstance(data__buildsystem__requires_item, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.requires[{data__buildsystem__requires_x}]".format(**locals()) + " must be string", value=data__buildsystem__requires_item, name="" + (name_prefix or "data") + ".build-system.requires[{data__buildsystem__requires_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
                if "build-backend" in data__buildsystem_keys:
                    data__buildsystem_keys.remove("build-backend")
                    data__buildsystem__buildbackend = data__buildsystem["build-backend"]
                    if not isinstance(data__buildsystem__buildbackend, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.build-backend must be string", value=data__buildsystem__buildbackend, name="" + (name_prefix or "data") + ".build-system.build-backend", definition={'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, rule='type')
                    if isinstance(data__buildsystem__buildbackend, str):
                        if not custom_formats["pep517-backend-reference"](data__buildsystem__buildbackend):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.build-backend must be pep517-backend-reference", value=data__buildsystem__buildbackend, name="" + (name_prefix or "data") + ".build-system.build-backend", definition={'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, rule='format')
                if "backend-path" in data__buildsystem_keys:
                    data__buildsystem_keys.remove("backend-path")
                    data__buildsystem__backendpath = data__buildsystem["backend-path"]
                    if not isinstance(data__buildsystem__backendpath, (list, tuple)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.backend-path must be array", value=data__buildsystem__backendpath, name="" + (name_prefix or "data") + ".build-system.backend-path", definition={'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}, rule='type')
                    data__buildsystem__backendpath_is_list = isinstance(data__buildsystem__backendpath, (list, tuple))
                    if data__buildsystem__backendpath_is_list:
                        data__buildsystem__backendpath_len = len(data__buildsystem__backendpath)
                        for data__buildsystem__backendpath_x, data__buildsystem__backendpath_item in enumerate(data__buildsystem__backendpath):
                            if not isinstance(data__buildsystem__backendpath_item, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.backend-path[{data__buildsystem__backendpath_x}]".format(**locals()) + " must be string", value=data__buildsystem__backendpath_item, name="" + (name_prefix or "data") + ".build-system.backend-path[{data__buildsystem__backendpath_x}]".format(**locals()) + "", definition={'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}, rule='type')
                if data__buildsystem_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must not contain "+str(data__buildsystem_keys)+" properties", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='additionalProperties')
        if "project" in data_keys:
            data_keys.remove("project")
            data__project = data["project"]
            validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata(data__project, custom_formats, (name_prefix or "data") + ".project")
        if "tool" in data_keys:
            data_keys.remove("tool")
            data__tool = data["tool"]
            if not isinstance(data__tool, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".tool must be object", value=data__tool, name="" + (name_prefix or "data") + ".tool", definition={'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://docs.python.org/3/install/', 'title': '``tool.distutils`` table', '$$description': ['Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` scripts via `distutils configuration files', '<https://docs.python.org/3/install/#distutils-configuration-files>`_.', '``tool.distutils`` subtables could be used with the same purpose', '(NOT CURRENTLY IMPLEMENTED).'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml <https://ini2toml.readthedocs.io/en/latest/setuptools_pep621.html>`_.', 'It considers only ``setuptools`` `parameters', '<https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive'}}}, 'readme': {'anyOf': [{'$ref': '#/definitions/file-directive'}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}, rule='type')
            data__tool_is_dict = isinstance(data__tool, dict)
            if data__tool_is_dict:
                data__tool_keys = set(data__tool.keys())
                if "distutils" in data__tool_keys:
                    data__tool_keys.remove("distutils")
                    data__tool__distutils = data__tool["distutils"]
                    validate_https___docs_python_org_3_install(data__tool__distutils, custom_formats, (name_prefix or "data") + ".tool.distutils")
                if "setuptools" in data__tool_keys:
                    data__tool_keys.remove("setuptools")
                    data__tool__setuptools = data__tool["setuptools"]
                    validate_https___setuptools_pypa_io_en_latest_references_keywords_html(data__tool__setuptools, custom_formats, (name_prefix or "data") + ".tool.setuptools")
        if data_keys:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-build-dependencies/', 'title': 'Data structure for ``pyproject.toml`` files', '$$description': ['File format containing build-time configurations for the Python ecosystem. ', ':pep:`517` initially defined a build-system independent format for source trees', 'which was complemented by :pep:`518` to provide a way of specifying dependencies ', 'for building Python projects.', 'Please notice the ``project`` table (as initially defined in  :pep:`621`) is not included', 'in this schema and should be considered separately.'], 'type': 'object', 'additionalProperties': False, 'properties': {'build-system': {'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '<https://packaging.python.org/specifications/core-metadata/#summary>`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '<https://peps.python.org/pep-0621/#readme>`_', "with meaning similar to the one defined in `core metadata's Description", '<https://packaging.python.org/specifications/core-metadata/#description>`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, 'license': {'description': '`Project license <https://peps.python.org/pep-0621/#license>`_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, '$$description': ['`Trove classifiers <https://pypi.org/classifiers/>`_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points <https://packaging.python.org/specifications/entry-points/>`_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points <https://packaging.python.org/specifications/entry-points/>`_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, 'tool': {'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://docs.python.org/3/install/', 'title': '``tool.distutils`` table', '$$description': ['Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` scripts via `distutils configuration files', '<https://docs.python.org/3/install/#distutils-configuration-files>`_.', '``tool.distutils`` subtables could be used with the same purpose', '(NOT CURRENTLY IMPLEMENTED).'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml <https://ini2toml.readthedocs.io/en/latest/setuptools_pep621.html>`_.', 'It considers only ``setuptools`` `parameters', '<https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive'}}}, 'readme': {'anyOf': [{'$ref': '#/definitions/file-directive'}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '<https://packaging.python.org/specifications/core-metadata/#summary>`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '<https://peps.python.org/pep-0621/#readme>`_', "with meaning similar to the one defined in `core metadata's Description", '<https://packaging.python.org/specifications/core-metadata/#description>`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, 'license': {'description': '`Project license <https://peps.python.org/pep-0621/#license>`_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, '$$description': ['`Trove classifiers <https://pypi.org/classifiers/>`_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points <https://packaging.python.org/specifications/entry-points/>`_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points <https://packaging.python.org/specifications/entry-points/>`_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='additionalProperties')
    return data

def validate_https___setuptools_pypa_io_en_latest_references_keywords_html(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml <https://ini2toml.readthedocs.io/en/latest/setuptools_pep621.html>`_.', 'It considers only ``setuptools`` `parameters', '<https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, 'readme': {'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_keys = set(data.keys())
        if "platforms" in data_keys:
            data_keys.remove("platforms")
            data__platforms = data["platforms"]
            if not isinstance(data__platforms, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".platforms must be array", value=data__platforms, name="" + (name_prefix or "data") + ".platforms", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
            data__platforms_is_list = isinstance(data__platforms, (list, tuple))
            if data__platforms_is_list:
                data__platforms_len = len(data__platforms)
                for data__platforms_x, data__platforms_item in enumerate(data__platforms):
                    if not isinstance(data__platforms_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".platforms[{data__platforms_x}]".format(**locals()) + " must be string", value=data__platforms_item, name="" + (name_prefix or "data") + ".platforms[{data__platforms_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
        if "provides" in data_keys:
            data_keys.remove("provides")
            data__provides = data["provides"]
            if not isinstance(data__provides, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides must be array", value=data__provides, name="" + (name_prefix or "data") + ".provides", definition={'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, rule='type')
            data__provides_is_list = isinstance(data__provides, (list, tuple))
            if data__provides_is_list:
                data__provides_len = len(data__provides)
                for data__provides_x, data__provides_item in enumerate(data__provides):
                    if not isinstance(data__provides_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + " must be string", value=data__provides_item, name="" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type')
                    if isinstance(data__provides_item, str):
                        if not custom_formats["pep508-identifier"](data__provides_item):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + " must be pep508-identifier", value=data__provides_item, name="" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format')
        if "obsoletes" in data_keys:
            data_keys.remove("obsoletes")
            data__obsoletes = data["obsoletes"]
            if not isinstance(data__obsoletes, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes must be array", value=data__obsoletes, name="" + (name_prefix or "data") + ".obsoletes", definition={'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, rule='type')
            data__obsoletes_is_list = isinstance(data__obsoletes, (list, tuple))
            if data__obsoletes_is_list:
                data__obsoletes_len = len(data__obsoletes)
                for data__obsoletes_x, data__obsoletes_item in enumerate(data__obsoletes):
                    if not isinstance(data__obsoletes_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + " must be string", value=data__obsoletes_item, name="" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type')
                    if isinstance(data__obsoletes_item, str):
                        if not custom_formats["pep508-identifier"](data__obsoletes_item):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + " must be pep508-identifier", value=data__obsoletes_item, name="" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format')
        if "zip-safe" in data_keys:
            data_keys.remove("zip-safe")
            data__zipsafe = data["zip-safe"]
            if not isinstance(data__zipsafe, (bool)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".zip-safe must be boolean", value=data__zipsafe, name="" + (name_prefix or "data") + ".zip-safe", definition={'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, rule='type')
        if "script-files" in data_keys:
            data_keys.remove("script-files")
            data__scriptfiles = data["script-files"]
            if not isinstance(data__scriptfiles, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".script-files must be array", value=data__scriptfiles, name="" + (name_prefix or "data") + ".script-files", definition={'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, rule='type')
            data__scriptfiles_is_list = isinstance(data__scriptfiles, (list, tuple))
            if data__scriptfiles_is_list:
                data__scriptfiles_len = len(data__scriptfiles)
                for data__scriptfiles_x, data__scriptfiles_item in enumerate(data__scriptfiles):
                    if not isinstance(data__scriptfiles_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".script-files[{data__scriptfiles_x}]".format(**locals()) + " must be string", value=data__scriptfiles_item, name="" + (name_prefix or "data") + ".script-files[{data__scriptfiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
        if "eager-resources" in data_keys:
            data_keys.remove("eager-resources")
            data__eagerresources = data["eager-resources"]
            if not isinstance(data__eagerresources, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".eager-resources must be array", value=data__eagerresources, name="" + (name_prefix or "data") + ".eager-resources", definition={'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, rule='type')
            data__eagerresources_is_list = isinstance(data__eagerresources, (list, tuple))
            if data__eagerresources_is_list:
                data__eagerresources_len = len(data__eagerresources)
                for data__eagerresources_x, data__eagerresources_item in enumerate(data__eagerresources):
                    if not isinstance(data__eagerresources_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".eager-resources[{data__eagerresources_x}]".format(**locals()) + " must be string", value=data__eagerresources_item, name="" + (name_prefix or "data") + ".eager-resources[{data__eagerresources_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
        if "packages" in data_keys:
            data_keys.remove("packages")
            data__packages = data["packages"]
            data__packages_one_of_count1 = 0
            if data__packages_one_of_count1 < 2:
                try:
                    if not isinstance(data__packages, (list, tuple)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages must be array", value=data__packages, name="" + (name_prefix or "data") + ".packages", definition={'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}}, rule='type')
                    data__packages_is_list = isinstance(data__packages, (list, tuple))
                    if data__packages_is_list:
                        data__packages_len = len(data__packages)
                        for data__packages_x, data__packages_item in enumerate(data__packages):
                            validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_package_name(data__packages_item, custom_formats, (name_prefix or "data") + ".packages[{data__packages_x}]".format(**locals()))
                    data__packages_one_of_count1 += 1
                except JsonSchemaValueException: pass
            if data__packages_one_of_count1 < 2:
                try:
                    validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_find_directive(data__packages, custom_formats, (name_prefix or "data") + ".packages")
                    data__packages_one_of_count1 += 1
                except JsonSchemaValueException: pass
            if data__packages_one_of_count1 != 1:
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages must be valid exactly by one definition" + (" (" + str(data__packages_one_of_count1) + " matches found)"), value=data__packages, name="" + (name_prefix or "data") + ".packages", definition={'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, rule='oneOf')
        if "package-dir" in data_keys:
            data_keys.remove("package-dir")
            data__packagedir = data["package-dir"]
            if not isinstance(data__packagedir, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be object", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='type')
            data__packagedir_is_dict = isinstance(data__packagedir, dict)
            if data__packagedir_is_dict:
                data__packagedir_keys = set(data__packagedir.keys())
                for data__packagedir_key, data__packagedir_val in data__packagedir.items():
                    if REGEX_PATTERNS['^.*$'].search(data__packagedir_key):
                        if data__packagedir_key in data__packagedir_keys:
                            data__packagedir_keys.remove(data__packagedir_key)
                        if not isinstance(data__packagedir_val, (str)):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir.{data__packagedir_key}".format(**locals()) + " must be string", value=data__packagedir_val, name="" + (name_prefix or "data") + ".package-dir.{data__packagedir_key}".format(**locals()) + "", definition={'type': 'string'}, rule='type')
                if data__packagedir_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must not contain "+str(data__packagedir_keys)+" properties", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='additionalProperties')
                data__packagedir_len = len(data__packagedir)
                if data__packagedir_len != 0:
                    data__packagedir_property_names = True
                    for data__packagedir_key in data__packagedir:
                        try:
                            data__packagedir_key_one_of_count2 = 0
                            if data__packagedir_key_one_of_count2 < 2:
                                try:
                                    if data__packagedir_key != "":
                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be same as const definition: ", value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'const': ''}, rule='const')
                                    data__packagedir_key_one_of_count2 += 1
                                except JsonSchemaValueException: pass
                            if data__packagedir_key_one_of_count2 < 2:
                                try:
                                    validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_package_name(data__packagedir_key, custom_formats, (name_prefix or "data") + ".package-dir")
                                    data__packagedir_key_one_of_count2 += 1
                                except JsonSchemaValueException: pass
                            if data__packagedir_key_one_of_count2 != 1:
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be valid exactly by one definition" + (" (" + str(data__packagedir_key_one_of_count2) + " matches found)"), value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'oneOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}]}, rule='oneOf')
                        except JsonSchemaValueException:
                            data__packagedir_property_names = False
                    if not data__packagedir_property_names:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be named by propertyName definition", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='propertyNames')
        if "package-data" in data_keys:
            data_keys.remove("package-data")
            data__packagedata = data["package-data"]
            if not isinstance(data__packagedata, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be object", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type')
            data__packagedata_is_dict = isinstance(data__packagedata, dict)
            if data__packagedata_is_dict:
                data__packagedata_keys = set(data__packagedata.keys())
                for data__packagedata_key, data__packagedata_val in data__packagedata.items():
                    if REGEX_PATTERNS['^.*$'].search(data__packagedata_key):
                        if data__packagedata_key in data__packagedata_keys:
                            data__packagedata_keys.remove(data__packagedata_key)
                        if not isinstance(data__packagedata_val, (list, tuple)):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data.{data__packagedata_key}".format(**locals()) + " must be array", value=data__packagedata_val, name="" + (name_prefix or "data") + ".package-data.{data__packagedata_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
                        data__packagedata_val_is_list = isinstance(data__packagedata_val, (list, tuple))
                        if data__packagedata_val_is_list:
                            data__packagedata_val_len = len(data__packagedata_val)
                            for data__packagedata_val_x, data__packagedata_val_item in enumerate(data__packagedata_val):
                                if not isinstance(data__packagedata_val_item, (str)):
                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data.{data__packagedata_key}[{data__packagedata_val_x}]".format(**locals()) + " must be string", value=data__packagedata_val_item, name="" + (name_prefix or "data") + ".package-data.{data__packagedata_key}[{data__packagedata_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
                if data__packagedata_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must not contain "+str(data__packagedata_keys)+" properties", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='additionalProperties')
                data__packagedata_len = len(data__packagedata)
                if data__packagedata_len != 0:
                    data__packagedata_property_names = True
                    for data__packagedata_key in data__packagedata:
                        try:
                            data__packagedata_key_one_of_count3 = 0
                            if data__packagedata_key_one_of_count3 < 2:
                                try:
                                    if isinstance(data__packagedata_key, str):
                                        if not custom_formats["python-module-name"](data__packagedata_key):
                                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be python-module-name", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'format': 'python-module-name'}, rule='format')
                                    data__packagedata_key_one_of_count3 += 1
                                except JsonSchemaValueException: pass
                            if data__packagedata_key_one_of_count3 < 2:
                                try:
                                    if data__packagedata_key != "*":
                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be same as const definition: *", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'const': '*'}, rule='const')
                                    data__packagedata_key_one_of_count3 += 1
                                except JsonSchemaValueException: pass
                            if data__packagedata_key_one_of_count3 != 1:
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be valid exactly by one definition" + (" (" + str(data__packagedata_key_one_of_count3) + " matches found)"), value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, rule='oneOf')
                        except JsonSchemaValueException:
                            data__packagedata_property_names = False
                    if not data__packagedata_property_names:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be named by propertyName definition", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='propertyNames')
        if "include-package-data" in data_keys:
            data_keys.remove("include-package-data")
            data__includepackagedata = data["include-package-data"]
            if not isinstance(data__includepackagedata, (bool)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".include-package-data must be boolean", value=data__includepackagedata, name="" + (name_prefix or "data") + ".include-package-data", definition={'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'boolean'}, rule='type')
        if "exclude-package-data" in data_keys:
            data_keys.remove("exclude-package-data")
            data__excludepackagedata = data["exclude-package-data"]
            if not isinstance(data__excludepackagedata, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be object", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type')
            data__excludepackagedata_is_dict = isinstance(data__excludepackagedata, dict)
            if data__excludepackagedata_is_dict:
                data__excludepackagedata_keys = set(data__excludepackagedata.keys())
                for data__excludepackagedata_key, data__excludepackagedata_val in data__excludepackagedata.items():
                    if REGEX_PATTERNS['^.*$'].search(data__excludepackagedata_key):
                        if data__excludepackagedata_key in data__excludepackagedata_keys:
                            data__excludepackagedata_keys.remove(data__excludepackagedata_key)
                        if not isinstance(data__excludepackagedata_val, (list, tuple)):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}".format(**locals()) + " must be array", value=data__excludepackagedata_val, name="" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
                        data__excludepackagedata_val_is_list = isinstance(data__excludepackagedata_val, (list, tuple))
                        if data__excludepackagedata_val_is_list:
                            data__excludepackagedata_val_len = len(data__excludepackagedata_val)
                            for data__excludepackagedata_val_x, data__excludepackagedata_val_item in enumerate(data__excludepackagedata_val):
                                if not isinstance(data__excludepackagedata_val_item, (str)):
                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]".format(**locals()) + " must be string", value=data__excludepackagedata_val_item, name="" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
                if data__excludepackagedata_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must not contain "+str(data__excludepackagedata_keys)+" properties", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='additionalProperties')
                data__excludepackagedata_len = len(data__excludepackagedata)
                if data__excludepackagedata_len != 0:
                    data__excludepackagedata_property_names = True
                    for data__excludepackagedata_key in data__excludepackagedata:
                        try:
                            data__excludepackagedata_key_one_of_count4 = 0
                            if data__excludepackagedata_key_one_of_count4 < 2:
                                try:
                                    if isinstance(data__excludepackagedata_key, str):
                                        if not custom_formats["python-module-name"](data__excludepackagedata_key):
                                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be python-module-name", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'format': 'python-module-name'}, rule='format')
                                    data__excludepackagedata_key_one_of_count4 += 1
                                except JsonSchemaValueException: pass
                            if data__excludepackagedata_key_one_of_count4 < 2:
                                try:
                                    if data__excludepackagedata_key != "*":
                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be same as const definition: *", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'const': '*'}, rule='const')
                                    data__excludepackagedata_key_one_of_count4 += 1
                                except JsonSchemaValueException: pass
                            if data__excludepackagedata_key_one_of_count4 != 1:
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be valid exactly by one definition" + (" (" + str(data__excludepackagedata_key_one_of_count4) + " matches found)"), value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, rule='oneOf')
                        except JsonSchemaValueException:
                            data__excludepackagedata_property_names = False
                    if not data__excludepackagedata_property_names:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be named by propertyName definition", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='propertyNames')
        if "namespace-packages" in data_keys:
            data_keys.remove("namespace-packages")
            data__namespacepackages = data["namespace-packages"]
            if not isinstance(data__namespacepackages, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages must be array", value=data__namespacepackages, name="" + (name_prefix or "data") + ".namespace-packages", definition={'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, rule='type')
            data__namespacepackages_is_list = isinstance(data__namespacepackages, (list, tuple))
            if data__namespacepackages_is_list:
                data__namespacepackages_len = len(data__namespacepackages)
                for data__namespacepackages_x, data__namespacepackages_item in enumerate(data__namespacepackages):
                    if not isinstance(data__namespacepackages_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + " must be string", value=data__namespacepackages_item, name="" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='type')
                    if isinstance(data__namespacepackages_item, str):
                        if not custom_formats["python-module-name"](data__namespacepackages_item):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + " must be python-module-name", value=data__namespacepackages_item, name="" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='format')
        if "py-modules" in data_keys:
            data_keys.remove("py-modules")
            data__pymodules = data["py-modules"]
            if not isinstance(data__pymodules, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules must be array", value=data__pymodules, name="" + (name_prefix or "data") + ".py-modules", definition={'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, rule='type')
            data__pymodules_is_list = isinstance(data__pymodules, (list, tuple))
            if data__pymodules_is_list:
                data__pymodules_len = len(data__pymodules)
                for data__pymodules_x, data__pymodules_item in enumerate(data__pymodules):
                    if not isinstance(data__pymodules_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + " must be string", value=data__pymodules_item, name="" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='type')
                    if isinstance(data__pymodules_item, str):
                        if not custom_formats["python-module-name"](data__pymodules_item):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + " must be python-module-name", value=data__pymodules_item, name="" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='format')
        if "data-files" in data_keys:
            data_keys.remove("data-files")
            data__datafiles = data["data-files"]
            if not isinstance(data__datafiles, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files must be object", value=data__datafiles, name="" + (name_prefix or "data") + ".data-files", definition={'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type')
            data__datafiles_is_dict = isinstance(data__datafiles, dict)
            if data__datafiles_is_dict:
                data__datafiles_keys = set(data__datafiles.keys())
                for data__datafiles_key, data__datafiles_val in data__datafiles.items():
                    if REGEX_PATTERNS['^.*$'].search(data__datafiles_key):
                        if data__datafiles_key in data__datafiles_keys:
                            data__datafiles_keys.remove(data__datafiles_key)
                        if not isinstance(data__datafiles_val, (list, tuple)):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files.{data__datafiles_key}".format(**locals()) + " must be array", value=data__datafiles_val, name="" + (name_prefix or "data") + ".data-files.{data__datafiles_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
                        data__datafiles_val_is_list = isinstance(data__datafiles_val, (list, tuple))
                        if data__datafiles_val_is_list:
                            data__datafiles_val_len = len(data__datafiles_val)
                            for data__datafiles_val_x, data__datafiles_val_item in enumerate(data__datafiles_val):
                                if not isinstance(data__datafiles_val_item, (str)):
                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files.{data__datafiles_key}[{data__datafiles_val_x}]".format(**locals()) + " must be string", value=data__datafiles_val_item, name="" + (name_prefix or "data") + ".data-files.{data__datafiles_key}[{data__datafiles_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
        if "cmdclass" in data_keys:
            data_keys.remove("cmdclass")
            data__cmdclass = data["cmdclass"]
            if not isinstance(data__cmdclass, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass must be object", value=data__cmdclass, name="" + (name_prefix or "data") + ".cmdclass", definition={'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, rule='type')
            data__cmdclass_is_dict = isinstance(data__cmdclass, dict)
            if data__cmdclass_is_dict:
                data__cmdclass_keys = set(data__cmdclass.keys())
                for data__cmdclass_key, data__cmdclass_val in data__cmdclass.items():
                    if REGEX_PATTERNS['^.*$'].search(data__cmdclass_key):
                        if data__cmdclass_key in data__cmdclass_keys:
                            data__cmdclass_keys.remove(data__cmdclass_key)
                        if not isinstance(data__cmdclass_val, (str)):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + " must be string", value=data__cmdclass_val, name="" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='type')
                        if isinstance(data__cmdclass_val, str):
                            if not custom_formats["python-qualified-identifier"](data__cmdclass_val):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + " must be python-qualified-identifier", value=data__cmdclass_val, name="" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='format')
        if "license-files" in data_keys:
            data_keys.remove("license-files")
            data__licensefiles = data["license-files"]
            if not isinstance(data__licensefiles, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files must be array", value=data__licensefiles, name="" + (name_prefix or "data") + ".license-files", definition={'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, rule='type')
            data__licensefiles_is_list = isinstance(data__licensefiles, (list, tuple))
            if data__licensefiles_is_list:
                data__licensefiles_len = len(data__licensefiles)
                for data__licensefiles_x, data__licensefiles_item in enumerate(data__licensefiles):
                    if not isinstance(data__licensefiles_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + " must be string", value=data__licensefiles_item, name="" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
        if "dynamic" in data_keys:
            data_keys.remove("dynamic")
            data__dynamic = data["dynamic"]
            if not isinstance(data__dynamic, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be object", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, 'readme': {'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}, rule='type')
            data__dynamic_is_dict = isinstance(data__dynamic, dict)
            if data__dynamic_is_dict:
                data__dynamic_keys = set(data__dynamic.keys())
                if "version" in data__dynamic_keys:
                    data__dynamic_keys.remove("version")
                    data__dynamic__version = data__dynamic["version"]
                    data__dynamic__version_one_of_count5 = 0
                    if data__dynamic__version_one_of_count5 < 2:
                        try:
                            validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_attr_directive(data__dynamic__version, custom_formats, (name_prefix or "data") + ".dynamic.version")
                            data__dynamic__version_one_of_count5 += 1
                        except JsonSchemaValueException: pass
                    if data__dynamic__version_one_of_count5 < 2:
                        try:
                            validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__version, custom_formats, (name_prefix or "data") + ".dynamic.version")
                            data__dynamic__version_one_of_count5 += 1
                        except JsonSchemaValueException: pass
                    if data__dynamic__version_one_of_count5 != 1:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.version must be valid exactly by one definition" + (" (" + str(data__dynamic__version_one_of_count5) + " matches found)"), value=data__dynamic__version, name="" + (name_prefix or "data") + ".dynamic.version", definition={'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, rule='oneOf')
                if "classifiers" in data__dynamic_keys:
                    data__dynamic_keys.remove("classifiers")
                    data__dynamic__classifiers = data__dynamic["classifiers"]
                    validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__classifiers, custom_formats, (name_prefix or "data") + ".dynamic.classifiers")
                if "description" in data__dynamic_keys:
                    data__dynamic_keys.remove("description")
                    data__dynamic__description = data__dynamic["description"]
                    validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__description, custom_formats, (name_prefix or "data") + ".dynamic.description")
                if "dependencies" in data__dynamic_keys:
                    data__dynamic_keys.remove("dependencies")
                    data__dynamic__dependencies = data__dynamic["dependencies"]
                    validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__dependencies, custom_formats, (name_prefix or "data") + ".dynamic.dependencies")
                if "entry-points" in data__dynamic_keys:
                    data__dynamic_keys.remove("entry-points")
                    data__dynamic__entrypoints = data__dynamic["entry-points"]
                    validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__entrypoints, custom_formats, (name_prefix or "data") + ".dynamic.entry-points")
                if "optional-dependencies" in data__dynamic_keys:
                    data__dynamic_keys.remove("optional-dependencies")
                    data__dynamic__optionaldependencies = data__dynamic["optional-dependencies"]
                    if not isinstance(data__dynamic__optionaldependencies, (dict)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be object", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, rule='type')
                    data__dynamic__optionaldependencies_is_dict = isinstance(data__dynamic__optionaldependencies, dict)
                    if data__dynamic__optionaldependencies_is_dict:
                        data__dynamic__optionaldependencies_keys = set(data__dynamic__optionaldependencies.keys())
                        for data__dynamic__optionaldependencies_key, data__dynamic__optionaldependencies_val in data__dynamic__optionaldependencies.items():
                            if REGEX_PATTERNS['.+'].search(data__dynamic__optionaldependencies_key):
                                if data__dynamic__optionaldependencies_key in data__dynamic__optionaldependencies_keys:
                                    data__dynamic__optionaldependencies_keys.remove(data__dynamic__optionaldependencies_key)
                                validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__optionaldependencies_val, custom_formats, (name_prefix or "data") + ".dynamic.optional-dependencies.{data__dynamic__optionaldependencies_key}".format(**locals()))
                        if data__dynamic__optionaldependencies_keys:
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must not contain "+str(data__dynamic__optionaldependencies_keys)+" properties", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, rule='additionalProperties')
                        data__dynamic__optionaldependencies_len = len(data__dynamic__optionaldependencies)
                        if data__dynamic__optionaldependencies_len != 0:
                            data__dynamic__optionaldependencies_property_names = True
                            for data__dynamic__optionaldependencies_key in data__dynamic__optionaldependencies:
                                try:
                                    if isinstance(data__dynamic__optionaldependencies_key, str):
                                        if not custom_formats["python-identifier"](data__dynamic__optionaldependencies_key):
                                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be python-identifier", value=data__dynamic__optionaldependencies_key, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'format': 'python-identifier'}, rule='format')
                                except JsonSchemaValueException:
                                    data__dynamic__optionaldependencies_property_names = False
                            if not data__dynamic__optionaldependencies_property_names:
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be named by propertyName definition", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, rule='propertyNames')
                if "readme" in data__dynamic_keys:
                    data__dynamic_keys.remove("readme")
                    data__dynamic__readme = data__dynamic["readme"]
                    data__dynamic__readme_any_of_count6 = 0
                    if not data__dynamic__readme_any_of_count6:
                        try:
                            validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__readme, custom_formats, (name_prefix or "data") + ".dynamic.readme")
                            data__dynamic__readme_any_of_count6 += 1
                        except JsonSchemaValueException: pass
                    if not data__dynamic__readme_any_of_count6:
                        try:
                            data__dynamic__readme_is_dict = isinstance(data__dynamic__readme, dict)
                            if data__dynamic__readme_is_dict:
                                data__dynamic__readme_keys = set(data__dynamic__readme.keys())
                                if "content-type" in data__dynamic__readme_keys:
                                    data__dynamic__readme_keys.remove("content-type")
                                    data__dynamic__readme__contenttype = data__dynamic__readme["content-type"]
                                    if not isinstance(data__dynamic__readme__contenttype, (str)):
                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme.content-type must be string", value=data__dynamic__readme__contenttype, name="" + (name_prefix or "data") + ".dynamic.readme.content-type", definition={'type': 'string'}, rule='type')
                            data__dynamic__readme_any_of_count6 += 1
                        except JsonSchemaValueException: pass
                    if not data__dynamic__readme_any_of_count6:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme cannot be validated by any definition", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}, rule='anyOf')
                    data__dynamic__readme_is_dict = isinstance(data__dynamic__readme, dict)
                    if data__dynamic__readme_is_dict:
                        data__dynamic__readme_len = len(data__dynamic__readme)
                        if not all(prop in data__dynamic__readme for prop in ['file']):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must contain ['file'] properties", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}, rule='required')
                if data__dynamic_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must not contain "+str(data__dynamic_keys)+" properties", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, 'readme': {'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}, rule='additionalProperties')
        if data_keys:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml <https://ini2toml.readthedocs.io/en/latest/setuptools_pep621.html>`_.', 'It considers only ``setuptools`` `parameters', '<https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '<https://setuptools.pypa.io/en/latest/userguide/datafiles.html>`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, 'readme': {'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}, rule='additionalProperties')
    return data

def validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_len = len(data)
        if not all(prop in data for prop in ['file']):
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['file'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='required')
        data_keys = set(data.keys())
        if "file" in data_keys:
            data_keys.remove("file")
            data__file = data["file"]
            data__file_one_of_count7 = 0
            if data__file_one_of_count7 < 2:
                try:
                    if not isinstance(data__file, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be string", value=data__file, name="" + (name_prefix or "data") + ".file", definition={'type': 'string'}, rule='type')
                    data__file_one_of_count7 += 1
                except JsonSchemaValueException: pass
            if data__file_one_of_count7 < 2:
                try:
                    if not isinstance(data__file, (list, tuple)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be array", value=data__file, name="" + (name_prefix or "data") + ".file", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
                    data__file_is_list = isinstance(data__file, (list, tuple))
                    if data__file_is_list:
                        data__file_len = len(data__file)
                        for data__file_x, data__file_item in enumerate(data__file):
                            if not isinstance(data__file_item, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".file[{data__file_x}]".format(**locals()) + " must be string", value=data__file_item, name="" + (name_prefix or "data") + ".file[{data__file_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
                    data__file_one_of_count7 += 1
                except JsonSchemaValueException: pass
            if data__file_one_of_count7 != 1:
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be valid exactly by one definition" + (" (" + str(data__file_one_of_count7) + " matches found)"), value=data__file, name="" + (name_prefix or "data") + ".file", definition={'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, rule='oneOf')
        if data_keys:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='additionalProperties')
    return data

def validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_attr_directive(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_len = len(data)
        if not all(prop in data for prop in ['attr']):
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['attr'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, rule='required')
        data_keys = set(data.keys())
        if "attr" in data_keys:
            data_keys.remove("attr")
            data__attr = data["attr"]
            if not isinstance(data__attr, (str)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".attr must be string", value=data__attr, name="" + (name_prefix or "data") + ".attr", definition={'type': 'string'}, rule='type')
        if data_keys:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, rule='additionalProperties')
    return data

def validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_find_directive(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_keys = set(data.keys())
        if "find" in data_keys:
            data_keys.remove("find")
            data__find = data["find"]
            if not isinstance(data__find, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".find must be object", value=data__find, name="" + (name_prefix or "data") + ".find", definition={'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}, rule='type')
            data__find_is_dict = isinstance(data__find, dict)
            if data__find_is_dict:
                data__find_keys = set(data__find.keys())
                if "where" in data__find_keys:
                    data__find_keys.remove("where")
                    data__find__where = data__find["where"]
                    if not isinstance(data__find__where, (list, tuple)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.where must be array", value=data__find__where, name="" + (name_prefix or "data") + ".find.where", definition={'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, rule='type')
                    data__find__where_is_list = isinstance(data__find__where, (list, tuple))
                    if data__find__where_is_list:
                        data__find__where_len = len(data__find__where)
                        for data__find__where_x, data__find__where_item in enumerate(data__find__where):
                            if not isinstance(data__find__where_item, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.where[{data__find__where_x}]".format(**locals()) + " must be string", value=data__find__where_item, name="" + (name_prefix or "data") + ".find.where[{data__find__where_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
                if "exclude" in data__find_keys:
                    data__find_keys.remove("exclude")
                    data__find__exclude = data__find["exclude"]
                    if not isinstance(data__find__exclude, (list, tuple)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.exclude must be array", value=data__find__exclude, name="" + (name_prefix or "data") + ".find.exclude", definition={'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, rule='type')
                    data__find__exclude_is_list = isinstance(data__find__exclude, (list, tuple))
                    if data__find__exclude_is_list:
                        data__find__exclude_len = len(data__find__exclude)
                        for data__find__exclude_x, data__find__exclude_item in enumerate(data__find__exclude):
                            if not isinstance(data__find__exclude_item, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.exclude[{data__find__exclude_x}]".format(**locals()) + " must be string", value=data__find__exclude_item, name="" + (name_prefix or "data") + ".find.exclude[{data__find__exclude_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
                if "include" in data__find_keys:
                    data__find_keys.remove("include")
                    data__find__include = data__find["include"]
                    if not isinstance(data__find__include, (list, tuple)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.include must be array", value=data__find__include, name="" + (name_prefix or "data") + ".find.include", definition={'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, rule='type')
                    data__find__include_is_list = isinstance(data__find__include, (list, tuple))
                    if data__find__include_is_list:
                        data__find__include_len = len(data__find__include)
                        for data__find__include_x, data__find__include_item in enumerate(data__find__include):
                            if not isinstance(data__find__include_item, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.include[{data__find__include_x}]".format(**locals()) + " must be string", value=data__find__include_item, name="" + (name_prefix or "data") + ".find.include[{data__find__include_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
                if "namespaces" in data__find_keys:
                    data__find_keys.remove("namespaces")
                    data__find__namespaces = data__find["namespaces"]
                    if not isinstance(data__find__namespaces, (bool)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.namespaces must be boolean", value=data__find__namespaces, name="" + (name_prefix or "data") + ".find.namespaces", definition={'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}, rule='type')
                if data__find_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".find must not contain "+str(data__find_keys)+" properties", value=data__find, name="" + (name_prefix or "data") + ".find", definition={'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}, rule='additionalProperties')
        if data_keys:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '<https://setuptools.pypa.io/en/latest/userguide/package_discovery.html>`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}, rule='additionalProperties')
    return data

def validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_package_name(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (str)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}, rule='type')
    data_any_of_count8 = 0
    if not data_any_of_count8:
        try:
            if isinstance(data, str):
                if not custom_formats["python-module-name"](data):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + " must be python-module-name", value=data, name="" + (name_prefix or "data") + "", definition={'format': 'python-module-name'}, rule='format')
            data_any_of_count8 += 1
        except JsonSchemaValueException: pass
    if not data_any_of_count8:
        try:
            if isinstance(data, str):
                if not custom_formats["pep561-stub-name"](data):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + " must be pep561-stub-name", value=data, name="" + (name_prefix or "data") + "", definition={'format': 'pep561-stub-name'}, rule='format')
            data_any_of_count8 += 1
        except JsonSchemaValueException: pass
    if not data_any_of_count8:
        raise JsonSchemaValueException("" + (name_prefix or "data") + " cannot be validated by any definition", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or PEP 561).', 'type': 'string', 'anyOf': [{'format': 'python-module-name'}, {'format': 'pep561-stub-name'}]}, rule='anyOf')
    return data

def validate_https___docs_python_org_3_install(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://docs.python.org/3/install/', 'title': '``tool.distutils`` table', '$$description': ['Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` scripts via `distutils configuration files', '<https://docs.python.org/3/install/#distutils-configuration-files>`_.', '``tool.distutils`` subtables could be used with the same purpose', '(NOT CURRENTLY IMPLEMENTED).'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_keys = set(data.keys())
        if "global" in data_keys:
            data_keys.remove("global")
            data__global = data["global"]
            if not isinstance(data__global, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".global must be object", value=data__global, name="" + (name_prefix or "data") + ".global", definition={'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}, rule='type')
        for data_key, data_val in data.items():
            if REGEX_PATTERNS['.+'].search(data_key):
                if data_key in data_keys:
                    data_keys.remove(data_key)
                if not isinstance(data_val, (dict)):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be object", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'object'}, rule='type')
    return data

def validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '<https://packaging.python.org/specifications/core-metadata/#summary>`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '<https://peps.python.org/pep-0621/#readme>`_', "with meaning similar to the one defined in `core metadata's Description", '<https://packaging.python.org/specifications/core-metadata/#description>`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, 'license': {'description': '`Project license <https://peps.python.org/pep-0621/#license>`_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, '$$description': ['`Trove classifiers <https://pypi.org/classifiers/>`_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_len = len(data)
        if not all(prop in data for prop in ['name']):
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['name'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '<https://packaging.python.org/specifications/core-metadata/#summary>`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '<https://peps.python.org/pep-0621/#readme>`_', "with meaning similar to the one defined in `core metadata's Description", '<https://packaging.python.org/specifications/core-metadata/#description>`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, 'license': {'description': '`Project license <https://peps.python.org/pep-0621/#license>`_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, '$$description': ['`Trove classifiers <https://pypi.org/classifiers/>`_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='required')
        data_keys = set(data.keys())
        if "name" in data_keys:
            data_keys.remove("name")
            data__name = data["name"]
            if not isinstance(data__name, (str)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, rule='type')
            if isinstance(data__name, str):
                if not custom_formats["pep508-identifier"](data__name):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be pep508-identifier", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, rule='format')
        if "version" in data_keys:
            data_keys.remove("version")
            data__version = data["version"]
            if not isinstance(data__version, (str)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".version must be string", value=data__version, name="" + (name_prefix or "data") + ".version", definition={'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, rule='type')
            if isinstance(data__version, str):
                if not custom_formats["pep440"](data__version):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".version must be pep440", value=data__version, name="" + (name_prefix or "data") + ".version", definition={'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, rule='format')
        if "description" in data_keys:
            data_keys.remove("description")
            data__description = data["description"]
            if not isinstance(data__description, (str)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".description must be string", value=data__description, name="" + (name_prefix or "data") + ".description", definition={'type': 'string', '$$description': ['The `summary description of the project', '<https://packaging.python.org/specifications/core-metadata/#summary>`_']}, rule='type')
        if "readme" in data_keys:
            data_keys.remove("readme")
            data__readme = data["readme"]
            data__readme_one_of_count9 = 0
            if data__readme_one_of_count9 < 2:
                try:
                    if not isinstance(data__readme, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be string", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, rule='type')
                    data__readme_one_of_count9 += 1
                except JsonSchemaValueException: pass
            if data__readme_one_of_count9 < 2:
                try:
                    if not isinstance(data__readme, (dict)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be object", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}, rule='type')
                    data__readme_any_of_count10 = 0
                    if not data__readme_any_of_count10:
                        try:
                            data__readme_is_dict = isinstance(data__readme, dict)
                            if data__readme_is_dict:
                                data__readme_len = len(data__readme)
                                if not all(prop in data__readme for prop in ['file']):
                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain ['file'] properties", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, rule='required')
                                data__readme_keys = set(data__readme.keys())
                                if "file" in data__readme_keys:
                                    data__readme_keys.remove("file")
                                    data__readme__file = data__readme["file"]
                                    if not isinstance(data__readme__file, (str)):
                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.file must be string", value=data__readme__file, name="" + (name_prefix or "data") + ".readme.file", definition={'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}, rule='type')
                            data__readme_any_of_count10 += 1
                        except JsonSchemaValueException: pass
                    if not data__readme_any_of_count10:
                        try:
                            data__readme_is_dict = isinstance(data__readme, dict)
                            if data__readme_is_dict:
                                data__readme_len = len(data__readme)
                                if not all(prop in data__readme for prop in ['text']):
                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain ['text'] properties", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}, rule='required')
                                data__readme_keys = set(data__readme.keys())
                                if "text" in data__readme_keys:
                                    data__readme_keys.remove("text")
                                    data__readme__text = data__readme["text"]
                                    if not isinstance(data__readme__text, (str)):
                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.text must be string", value=data__readme__text, name="" + (name_prefix or "data") + ".readme.text", definition={'type': 'string', 'description': 'Full text describing the project.'}, rule='type')
                            data__readme_any_of_count10 += 1
                        except JsonSchemaValueException: pass
                    if not data__readme_any_of_count10:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme cannot be validated by any definition", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, rule='anyOf')
                    data__readme_is_dict = isinstance(data__readme, dict)
                    if data__readme_is_dict:
                        data__readme_len = len(data__readme)
                        if not all(prop in data__readme for prop in ['content-type']):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain ['content-type'] properties", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}, rule='required')
                        data__readme_keys = set(data__readme.keys())
                        if "content-type" in data__readme_keys:
                            data__readme_keys.remove("content-type")
                            data__readme__contenttype = data__readme["content-type"]
                            if not isinstance(data__readme__contenttype, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.content-type must be string", value=data__readme__contenttype, name="" + (name_prefix or "data") + ".readme.content-type", definition={'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}, rule='type')
                    data__readme_one_of_count9 += 1
                except JsonSchemaValueException: pass
            if data__readme_one_of_count9 != 1:
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be valid exactly by one definition" + (" (" + str(data__readme_one_of_count9) + " matches found)"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'$$description': ['`Full/detailed description of the project in the form of a README', '<https://peps.python.org/pep-0621/#readme>`_', "with meaning similar to the one defined in `core metadata's Description", '<https://packaging.python.org/specifications/core-metadata/#description>`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, rule='oneOf')
        if "requires-python" in data_keys:
            data_keys.remove("requires-python")
            data__requirespython = data["requires-python"]
            if not isinstance(data__requirespython, (str)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".requires-python must be string", value=data__requirespython, name="" + (name_prefix or "data") + ".requires-python", definition={'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, rule='type')
            if isinstance(data__requirespython, str):
                if not custom_formats["pep508-versionspec"](data__requirespython):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".requires-python must be pep508-versionspec", value=data__requirespython, name="" + (name_prefix or "data") + ".requires-python", definition={'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, rule='format')
        if "license" in data_keys:
            data_keys.remove("license")
            data__license = data["license"]
            data__license_one_of_count11 = 0
            if data__license_one_of_count11 < 2:
                try:
                    data__license_is_dict = isinstance(data__license, dict)
                    if data__license_is_dict:
                        data__license_len = len(data__license)
                        if not all(prop in data__license for prop in ['file']):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must contain ['file'] properties", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, rule='required')
                        data__license_keys = set(data__license.keys())
                        if "file" in data__license_keys:
                            data__license_keys.remove("file")
                            data__license__file = data__license["file"]
                            if not isinstance(data__license__file, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license.file must be string", value=data__license__file, name="" + (name_prefix or "data") + ".license.file", definition={'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}, rule='type')
                    data__license_one_of_count11 += 1
                except JsonSchemaValueException: pass
            if data__license_one_of_count11 < 2:
                try:
                    data__license_is_dict = isinstance(data__license, dict)
                    if data__license_is_dict:
                        data__license_len = len(data__license)
                        if not all(prop in data__license for prop in ['text']):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must contain ['text'] properties", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}, rule='required')
                        data__license_keys = set(data__license.keys())
                        if "text" in data__license_keys:
                            data__license_keys.remove("text")
                            data__license__text = data__license["text"]
                            if not isinstance(data__license__text, (str)):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license.text must be string", value=data__license__text, name="" + (name_prefix or "data") + ".license.text", definition={'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}, rule='type')
                    data__license_one_of_count11 += 1
                except JsonSchemaValueException: pass
            if data__license_one_of_count11 != 1:
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be valid exactly by one definition" + (" (" + str(data__license_one_of_count11) + " matches found)"), value=data__license, name="" + (name_prefix or "data") + ".license", definition={'description': '`Project license <https://peps.python.org/pep-0621/#license>`_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}]}, rule='oneOf')
        if "authors" in data_keys:
            data_keys.remove("authors")
            data__authors = data["authors"]
            if not isinstance(data__authors, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".authors must be array", value=data__authors, name="" + (name_prefix or "data") + ".authors", definition={'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, rule='type')
            data__authors_is_list = isinstance(data__authors, (list, tuple))
            if data__authors_is_list:
                data__authors_len = len(data__authors)
                for data__authors_x, data__authors_item in enumerate(data__authors):
                    validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_author(data__authors_item, custom_formats, (name_prefix or "data") + ".authors[{data__authors_x}]".format(**locals()))
        if "maintainers" in data_keys:
            data_keys.remove("maintainers")
            data__maintainers = data["maintainers"]
            if not isinstance(data__maintainers, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".maintainers must be array", value=data__maintainers, name="" + (name_prefix or "data") + ".maintainers", definition={'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, rule='type')
            data__maintainers_is_list = isinstance(data__maintainers, (list, tuple))
            if data__maintainers_is_list:
                data__maintainers_len = len(data__maintainers)
                for data__maintainers_x, data__maintainers_item in enumerate(data__maintainers):
                    validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_author(data__maintainers_item, custom_formats, (name_prefix or "data") + ".maintainers[{data__maintainers_x}]".format(**locals()))
        if "keywords" in data_keys:
            data_keys.remove("keywords")
            data__keywords = data["keywords"]
            if not isinstance(data__keywords, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".keywords must be array", value=data__keywords, name="" + (name_prefix or "data") + ".keywords", definition={'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, rule='type')
            data__keywords_is_list = isinstance(data__keywords, (list, tuple))
            if data__keywords_is_list:
                data__keywords_len = len(data__keywords)
                for data__keywords_x, data__keywords_item in enumerate(data__keywords):
                    if not isinstance(data__keywords_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".keywords[{data__keywords_x}]".format(**locals()) + " must be string", value=data__keywords_item, name="" + (name_prefix or "data") + ".keywords[{data__keywords_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
        if "classifiers" in data_keys:
            data_keys.remove("classifiers")
            data__classifiers = data["classifiers"]
            if not isinstance(data__classifiers, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers must be array", value=data__classifiers, name="" + (name_prefix or "data") + ".classifiers", definition={'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, '$$description': ['`Trove classifiers <https://pypi.org/classifiers/>`_', 'which apply to the project.']}, rule='type')
            data__classifiers_is_list = isinstance(data__classifiers, (list, tuple))
            if data__classifiers_is_list:
                data__classifiers_len = len(data__classifiers)
                for data__classifiers_x, data__classifiers_item in enumerate(data__classifiers):
                    if not isinstance(data__classifiers_item, (str)):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + " must be string", value=data__classifiers_item, name="" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, rule='type')
                    if isinstance(data__classifiers_item, str):
                        if not custom_formats["trove-classifier"](data__classifiers_item):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + " must be trove-classifier", value=data__classifiers_item, name="" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, rule='format')
        if "urls" in data_keys:
            data_keys.remove("urls")
            data__urls = data["urls"]
            if not isinstance(data__urls, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls must be object", value=data__urls, name="" + (name_prefix or "data") + ".urls", definition={'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, rule='type')
            data__urls_is_dict = isinstance(data__urls, dict)
            if data__urls_is_dict:
                data__urls_keys = set(data__urls.keys())
                for data__urls_key, data__urls_val in data__urls.items():
                    if REGEX_PATTERNS['^.+$'].search(data__urls_key):
                        if data__urls_key in data__urls_keys:
                            data__urls_keys.remove(data__urls_key)
                        if not isinstance(data__urls_val, (str)):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + " must be string", value=data__urls_val, name="" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'url'}, rule='type')
                        if isinstance(data__urls_val, str):
                            if not custom_formats["url"](data__urls_val):
                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + " must be url", value=data__urls_val, name="" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'url'}, rule='format')
                if data__urls_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls must not contain "+str(data__urls_keys)+" properties", value=data__urls, name="" + (name_prefix or "data") + ".urls", definition={'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, rule='additionalProperties')
        if "scripts" in data_keys:
            data_keys.remove("scripts")
            data__scripts = data["scripts"]
            validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group(data__scripts, custom_formats, (name_prefix or "data") + ".scripts")
        if "gui-scripts" in data_keys:
            data_keys.remove("gui-scripts")
            data__guiscripts = data["gui-scripts"]
            validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group(data__guiscripts, custom_formats, (name_prefix or "data") + ".gui-scripts")
        if "entry-points" in data_keys:
            data_keys.remove("entry-points")
            data__entrypoints = data["entry-points"]
            data__entrypoints_is_dict = isinstance(data__entrypoints, dict)
            if data__entrypoints_is_dict:
                data__entrypoints_keys = set(data__entrypoints.keys())
                for data__entrypoints_key, data__entrypoints_val in data__entrypoints.items():
                    if REGEX_PATTERNS['^.+$'].search(data__entrypoints_key):
                        if data__entrypoints_key in data__entrypoints_keys:
                            data__entrypoints_keys.remove(data__entrypoints_key)
                        validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group(data__entrypoints_val, custom_formats, (name_prefix or "data") + ".entry-points.{data__entrypoints_key}".format(**locals()))
                if data__entrypoints_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must not contain "+str(data__entrypoints_keys)+" properties", value=data__entrypoints, name="" + (name_prefix or "data") + ".entry-points", definition={'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, rule='additionalProperties')
                data__entrypoints_len = len(data__entrypoints)
                if data__entrypoints_len != 0:
                    data__entrypoints_property_names = True
                    for data__entrypoints_key in data__entrypoints:
                        try:
                            if isinstance(data__entrypoints_key, str):
                                if not custom_formats["python-entrypoint-group"](data__entrypoints_key):
                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must be python-entrypoint-group", value=data__entrypoints_key, name="" + (name_prefix or "data") + ".entry-points", definition={'format': 'python-entrypoint-group'}, rule='format')
                        except JsonSchemaValueException:
                            data__entrypoints_property_names = False
                    if not data__entrypoints_property_names:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must be named by propertyName definition", value=data__entrypoints, name="" + (name_prefix or "data") + ".entry-points", definition={'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, rule='propertyNames')
        if "dependencies" in data_keys:
            data_keys.remove("dependencies")
            data__dependencies = data["dependencies"]
            if not isinstance(data__dependencies, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependencies must be array", value=data__dependencies, name="" + (name_prefix or "data") + ".dependencies", definition={'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, rule='type')
            data__dependencies_is_list = isinstance(data__dependencies, (list, tuple))
            if data__dependencies_is_list:
                data__dependencies_len = len(data__dependencies)
                for data__dependencies_x, data__dependencies_item in enumerate(data__dependencies):
                    validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_dependency(data__dependencies_item, custom_formats, (name_prefix or "data") + ".dependencies[{data__dependencies_x}]".format(**locals()))
        if "optional-dependencies" in data_keys:
            data_keys.remove("optional-dependencies")
            data__optionaldependencies = data["optional-dependencies"]
            if not isinstance(data__optionaldependencies, (dict)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be object", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='type')
            data__optionaldependencies_is_dict = isinstance(data__optionaldependencies, dict)
            if data__optionaldependencies_is_dict:
                data__optionaldependencies_keys = set(data__optionaldependencies.keys())
                for data__optionaldependencies_key, data__optionaldependencies_val in data__optionaldependencies.items():
                    if REGEX_PATTERNS['^.+$'].search(data__optionaldependencies_key):
                        if data__optionaldependencies_key in data__optionaldependencies_keys:
                            data__optionaldependencies_keys.remove(data__optionaldependencies_key)
                        if not isinstance(data__optionaldependencies_val, (list, tuple)):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}".format(**locals()) + " must be array", value=data__optionaldependencies_val, name="" + (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, rule='type')
                        data__optionaldependencies_val_is_list = isinstance(data__optionaldependencies_val, (list, tuple))
                        if data__optionaldependencies_val_is_list:
                            data__optionaldependencies_val_len = len(data__optionaldependencies_val)
                            for data__optionaldependencies_val_x, data__optionaldependencies_val_item in enumerate(data__optionaldependencies_val):
                                validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_dependency(data__optionaldependencies_val_item, custom_formats, (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}[{data__optionaldependencies_val_x}]".format(**locals()))
                if data__optionaldependencies_keys:
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must not contain "+str(data__optionaldependencies_keys)+" properties", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='additionalProperties')
                data__optionaldependencies_len = len(data__optionaldependencies)
                if data__optionaldependencies_len != 0:
                    data__optionaldependencies_property_names = True
                    for data__optionaldependencies_key in data__optionaldependencies:
                        try:
                            if isinstance(data__optionaldependencies_key, str):
                                if not custom_formats["pep508-identifier"](data__optionaldependencies_key):
                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be pep508-identifier", value=data__optionaldependencies_key, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'format': 'pep508-identifier'}, rule='format')
                        except JsonSchemaValueException:
                            data__optionaldependencies_property_names = False
                    if not data__optionaldependencies_property_names:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be named by propertyName definition", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='propertyNames')
        if "dynamic" in data_keys:
            data_keys.remove("dynamic")
            data__dynamic = data["dynamic"]
            if not isinstance(data__dynamic, (list, tuple)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be array", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}, rule='type')
            data__dynamic_is_list = isinstance(data__dynamic, (list, tuple))
            if data__dynamic_is_list:
                data__dynamic_len = len(data__dynamic)
                for data__dynamic_x, data__dynamic_item in enumerate(data__dynamic):
                    if data__dynamic_item not in ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']:
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic[{data__dynamic_x}]".format(**locals()) + " must be one of ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']", value=data__dynamic_item, name="" + (name_prefix or "data") + ".dynamic[{data__dynamic_x}]".format(**locals()) + "", definition={'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}, rule='enum')
        if data_keys:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '<https://packaging.python.org/specifications/core-metadata/#summary>`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '<https://peps.python.org/pep-0621/#readme>`_', "with meaning similar to the one defined in `core metadata's Description", '<https://packaging.python.org/specifications/core-metadata/#description>`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '<https://packaging.python.org/specifications/core-metadata/#requires-python>`_.']}, 'license': {'description': '`Project license <https://peps.python.org/pep-0621/#license>`_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '<https://packaging.python.org/specifications/core-metadata/#license>`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier <https://pypi.org/classifiers/>`_.'}, '$$description': ['`Trove classifiers <https://pypi.org/classifiers/>`_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '<https://packaging.python.org/specifications/entry-points/>`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='additionalProperties')
    try:
        try:
            data_is_dict = isinstance(data, dict)
            if data_is_dict:
                data_len = len(data)
                if not all(prop in data for prop in ['dynamic']):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['dynamic'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, rule='required')
                data_keys = set(data.keys())
                if "dynamic" in data_keys:
                    data_keys.remove("dynamic")
                    data__dynamic = data["dynamic"]
                    data__dynamic_is_list = isinstance(data__dynamic, (list, tuple))
                    if data__dynamic_is_list:
                        data__dynamic_contains = False
                        for data__dynamic_key in data__dynamic:
                            try:
                                if data__dynamic_key != "version":
                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be same as const definition: version", value=data__dynamic_key, name="" + (name_prefix or "data") + ".dynamic", definition={'const': 'version'}, rule='const')
                                data__dynamic_contains = True
                                break
                            except JsonSchemaValueException: pass
                        if not data__dynamic_contains:
                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must contain one of contains definition", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}, rule='contains')
        except JsonSchemaValueException: pass
        else:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must NOT match a disallowed definition", value=data, name="" + (name_prefix or "data") + "", definition={'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, rule='not')
    except JsonSchemaValueException:
        pass
    else:
        data_is_dict = isinstance(data, dict)
        if data_is_dict:
            data_len = len(data)
            if not all(prop in data for prop in ['version']):
                raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['version'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, rule='required')
    return data

def validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_dependency(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (str)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}, rule='type')
    if isinstance(data, str):
        if not custom_formats["pep508"](data):
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must be pep508", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}, rule='format')
    return data

def validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_keys = set(data.keys())
        for data_key, data_val in data.items():
            if REGEX_PATTERNS['^.+$'].search(data_key):
                if data_key in data_keys:
                    data_keys.remove(data_key)
                if not isinstance(data_val, (str)):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be string", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}, rule='type')
                if isinstance(data_val, str):
                    if not custom_formats["python-entrypoint-reference"](data_val):
                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be python-entrypoint-reference", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}, rule='format')
        if data_keys:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='additionalProperties')
        data_len = len(data)
        if data_len != 0:
            data_property_names = True
            for data_key in data:
                try:
                    if isinstance(data_key, str):
                        if not custom_formats["python-entrypoint-name"](data_key):
                            raise JsonSchemaValueException("" + (name_prefix or "data") + " must be python-entrypoint-name", value=data_key, name="" + (name_prefix or "data") + "", definition={'format': 'python-entrypoint-name'}, rule='format')
                except JsonSchemaValueException:
                    data_property_names = False
            if not data_property_names:
                raise JsonSchemaValueException("" + (name_prefix or "data") + " must be named by propertyName definition", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '<https://packaging.python.org/specifications/entry-points/>`_', 'and `setuptools docs', '<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='propertyNames')
    return data

def validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_author(data, custom_formats={}, name_prefix=None):
    if not isinstance(data, (dict)):
        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, rule='type')
    data_is_dict = isinstance(data, dict)
    if data_is_dict:
        data_keys = set(data.keys())
        if "name" in data_keys:
            data_keys.remove("name")
            data__name = data["name"]
            if not isinstance(data__name, (str)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, rule='type')
        if "email" in data_keys:
            data_keys.remove("email")
            data__email = data["email"]
            if not isinstance(data__email, (str)):
                raise JsonSchemaValueException("" + (name_prefix or "data") + ".email must be string", value=data__email, name="" + (name_prefix or "data") + ".email", definition={'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}, rule='type')
            if isinstance(data__email, str):
                if not REGEX_PATTERNS["idn-email_re_pattern"].match(data__email):
                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".email must be idn-email", value=data__email, name="" + (name_prefix or "data") + ".email", definition={'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}, rule='format')
        if data_keys:
            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, rule='additionalProperties')
    return data
python3.12/site-packages/setuptools/config/__init__.py000064400000002732151732704230016720 0ustar00"""For backward compatibility, expose main functions from
``setuptools.config.setupcfg``
"""
from functools import wraps
from typing import Callable, TypeVar, cast

from ..warnings import SetuptoolsDeprecationWarning
from . import setupcfg

Fn = TypeVar("Fn", bound=Callable)

__all__ = ('parse_configuration', 'read_configuration')


def _deprecation_notice(fn: Fn) -> Fn:
    @wraps(fn)
    def _wrapper(*args, **kwargs):
        SetuptoolsDeprecationWarning.emit(
            "Deprecated API usage.",
            f"""
            As setuptools moves its configuration towards `pyproject.toml`,
            `{__name__}.{fn.__name__}` became deprecated.

            For the time being, you can use the `{setupcfg.__name__}` module
            to access a backward compatible API, but this module is provisional
            and might be removed in the future.

            To read project metadata, consider using
            ``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
            For simple scenarios, you can also try parsing the file directly
            with the help of ``configparser``.
            """,
            # due_date not defined yet, because the community still heavily relies on it
            # Warning introduced in 24 Mar 2022
        )
        return fn(*args, **kwargs)

    return cast(Fn, _wrapper)


read_configuration = _deprecation_notice(setupcfg.read_configuration)
parse_configuration = _deprecation_notice(setupcfg.parse_configuration)
python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py000064400000034603151732704230021442 0ustar00"""Translation layer between pyproject config and setuptools distribution and
metadata objects.

The distribution and metadata objects are modeled after (an old version of)
core metadata, therefore configs in the format specified for ``pyproject.toml``
need to be processed before being applied.

**PRIVATE MODULE**: API reserved for setuptools internal usage only.
"""
import logging
import os
from collections.abc import Mapping
from email.headerregistry import Address
from functools import partial, reduce
from inspect import cleandoc
from itertools import chain
from types import MappingProxyType
from typing import (
    TYPE_CHECKING,
    Any,
    Callable,
    Dict,
    List,
    Optional,
    Set,
    Tuple,
    Type,
    Union,
    cast,
)

from ..errors import RemovedConfigError
from ..warnings import SetuptoolsWarning

if TYPE_CHECKING:
    from setuptools._importlib import metadata  # noqa
    from setuptools.dist import Distribution  # noqa

EMPTY: Mapping = MappingProxyType({})  # Immutable dict-like
_Path = Union[os.PathLike, str]
_DictOrStr = Union[dict, str]
_CorrespFn = Callable[["Distribution", Any, _Path], None]
_Correspondence = Union[str, _CorrespFn]

_logger = logging.getLogger(__name__)


def apply(dist: "Distribution", config: dict, filename: _Path) -> "Distribution":
    """Apply configuration dict read with :func:`read_configuration`"""

    if not config:
        return dist  # short-circuit unrelated pyproject.toml file

    root_dir = os.path.dirname(filename) or "."

    _apply_project_table(dist, config, root_dir)
    _apply_tool_table(dist, config, filename)

    current_directory = os.getcwd()
    os.chdir(root_dir)
    try:
        dist._finalize_requires()
        dist._finalize_license_files()
    finally:
        os.chdir(current_directory)

    return dist


def _apply_project_table(dist: "Distribution", config: dict, root_dir: _Path):
    project_table = config.get("project", {}).copy()
    if not project_table:
        return  # short-circuit

    _handle_missing_dynamic(dist, project_table)
    _unify_entry_points(project_table)

    for field, value in project_table.items():
        norm_key = json_compatible_key(field)
        corresp = PYPROJECT_CORRESPONDENCE.get(norm_key, norm_key)
        if callable(corresp):
            corresp(dist, value, root_dir)
        else:
            _set_config(dist, corresp, value)


def _apply_tool_table(dist: "Distribution", config: dict, filename: _Path):
    tool_table = config.get("tool", {}).get("setuptools", {})
    if not tool_table:
        return  # short-circuit

    for field, value in tool_table.items():
        norm_key = json_compatible_key(field)

        if norm_key in TOOL_TABLE_REMOVALS:
            suggestion = cleandoc(TOOL_TABLE_REMOVALS[norm_key])
            msg = f"""
            The parameter `tool.setuptools.{field}` was long deprecated
            and has been removed from `pyproject.toml`.
            """
            raise RemovedConfigError("\n".join([cleandoc(msg), suggestion]))

        norm_key = TOOL_TABLE_RENAMES.get(norm_key, norm_key)
        _set_config(dist, norm_key, value)

    _copy_command_options(config, dist, filename)


def _handle_missing_dynamic(dist: "Distribution", project_table: dict):
    """Be temporarily forgiving with ``dynamic`` fields not listed in ``dynamic``"""
    dynamic = set(project_table.get("dynamic", []))
    for field, getter in _PREVIOUSLY_DEFINED.items():
        if not (field in project_table or field in dynamic):
            value = getter(dist)
            if value:
                _MissingDynamic.emit(field=field, value=value)
                project_table[field] = _RESET_PREVIOUSLY_DEFINED.get(field)


def json_compatible_key(key: str) -> str:
    """As defined in :pep:`566#json-compatible-metadata`"""
    return key.lower().replace("-", "_")


def _set_config(dist: "Distribution", field: str, value: Any):
    setter = getattr(dist.metadata, f"set_{field}", None)
    if setter:
        setter(value)
    elif hasattr(dist.metadata, field) or field in SETUPTOOLS_PATCHES:
        setattr(dist.metadata, field, value)
    else:
        setattr(dist, field, value)


_CONTENT_TYPES = {
    ".md": "text/markdown",
    ".rst": "text/x-rst",
    ".txt": "text/plain",
}


def _guess_content_type(file: str) -> Optional[str]:
    _, ext = os.path.splitext(file.lower())
    if not ext:
        return None

    if ext in _CONTENT_TYPES:
        return _CONTENT_TYPES[ext]

    valid = ", ".join(f"{k} ({v})" for k, v in _CONTENT_TYPES.items())
    msg = f"only the following file extensions are recognized: {valid}."
    raise ValueError(f"Undefined content type for {file}, {msg}")


def _long_description(dist: "Distribution", val: _DictOrStr, root_dir: _Path):
    from setuptools.config import expand

    if isinstance(val, str):
        file: Union[str, list] = val
        text = expand.read_files(file, root_dir)
        ctype = _guess_content_type(val)
    else:
        file = val.get("file") or []
        text = val.get("text") or expand.read_files(file, root_dir)
        ctype = val["content-type"]

    _set_config(dist, "long_description", text)

    if ctype:
        _set_config(dist, "long_description_content_type", ctype)

    if file:
        dist._referenced_files.add(cast(str, file))


def _license(dist: "Distribution", val: dict, root_dir: _Path):
    from setuptools.config import expand

    if "file" in val:
        _set_config(dist, "license", expand.read_files([val["file"]], root_dir))
        dist._referenced_files.add(val["file"])
    else:
        _set_config(dist, "license", val["text"])


def _people(dist: "Distribution", val: List[dict], _root_dir: _Path, kind: str):
    field = []
    email_field = []
    for person in val:
        if "name" not in person:
            email_field.append(person["email"])
        elif "email" not in person:
            field.append(person["name"])
        else:
            addr = Address(display_name=person["name"], addr_spec=person["email"])
            email_field.append(str(addr))

    if field:
        _set_config(dist, kind, ", ".join(field))
    if email_field:
        _set_config(dist, f"{kind}_email", ", ".join(email_field))


def _project_urls(dist: "Distribution", val: dict, _root_dir):
    _set_config(dist, "project_urls", val)


def _python_requires(dist: "Distribution", val: dict, _root_dir):
    from setuptools.extern.packaging.specifiers import SpecifierSet

    _set_config(dist, "python_requires", SpecifierSet(val))


def _dependencies(dist: "Distribution", val: list, _root_dir):
    if getattr(dist, "install_requires", []):
        msg = "`install_requires` overwritten in `pyproject.toml` (dependencies)"
        SetuptoolsWarning.emit(msg)
    dist.install_requires = val


def _optional_dependencies(dist: "Distribution", val: dict, _root_dir):
    existing = getattr(dist, "extras_require", None) or {}
    dist.extras_require = {**existing, **val}


def _unify_entry_points(project_table: dict):
    project = project_table
    entry_points = project.pop("entry-points", project.pop("entry_points", {}))
    renaming = {"scripts": "console_scripts", "gui_scripts": "gui_scripts"}
    for key, value in list(project.items()):  # eager to allow modifications
        norm_key = json_compatible_key(key)
        if norm_key in renaming:
            # Don't skip even if value is empty (reason: reset missing `dynamic`)
            entry_points[renaming[norm_key]] = project.pop(key)

    if entry_points:
        project["entry-points"] = {
            name: [f"{k} = {v}" for k, v in group.items()]
            for name, group in entry_points.items()
            if group  # now we can skip empty groups
        }
        # Sometimes this will set `project["entry-points"] = {}`, and that is
        # intentional (for reseting configurations that are missing `dynamic`).


def _copy_command_options(pyproject: dict, dist: "Distribution", filename: _Path):
    tool_table = pyproject.get("tool", {})
    cmdclass = tool_table.get("setuptools", {}).get("cmdclass", {})
    valid_options = _valid_command_options(cmdclass)

    cmd_opts = dist.command_options
    for cmd, config in pyproject.get("tool", {}).get("distutils", {}).items():
        cmd = json_compatible_key(cmd)
        valid = valid_options.get(cmd, set())
        cmd_opts.setdefault(cmd, {})
        for key, value in config.items():
            key = json_compatible_key(key)
            cmd_opts[cmd][key] = (str(filename), value)
            if key not in valid:
                # To avoid removing options that are specified dynamically we
                # just log a warn...
                _logger.warning(f"Command option {cmd}.{key} is not defined")


def _valid_command_options(cmdclass: Mapping = EMPTY) -> Dict[str, Set[str]]:
    from .._importlib import metadata
    from setuptools.dist import Distribution

    valid_options = {"global": _normalise_cmd_options(Distribution.global_options)}

    unloaded_entry_points = metadata.entry_points(group='distutils.commands')
    loaded_entry_points = (_load_ep(ep) for ep in unloaded_entry_points)
    entry_points = (ep for ep in loaded_entry_points if ep)
    for cmd, cmd_class in chain(entry_points, cmdclass.items()):
        opts = valid_options.get(cmd, set())
        opts = opts | _normalise_cmd_options(getattr(cmd_class, "user_options", []))
        valid_options[cmd] = opts

    return valid_options


def _load_ep(ep: "metadata.EntryPoint") -> Optional[Tuple[str, Type]]:
    # Ignore all the errors
    try:
        return (ep.name, ep.load())
    except Exception as ex:
        msg = f"{ex.__class__.__name__} while trying to load entry-point {ep.name}"
        _logger.warning(f"{msg}: {ex}")
        return None


def _normalise_cmd_option_key(name: str) -> str:
    return json_compatible_key(name).strip("_=")


def _normalise_cmd_options(desc: List[Tuple[str, Optional[str], str]]) -> Set[str]:
    return {_normalise_cmd_option_key(fancy_option[0]) for fancy_option in desc}


def _get_previous_entrypoints(dist: "Distribution") -> Dict[str, list]:
    ignore = ("console_scripts", "gui_scripts")
    value = getattr(dist, "entry_points", None) or {}
    return {k: v for k, v in value.items() if k not in ignore}


def _get_previous_scripts(dist: "Distribution") -> Optional[list]:
    value = getattr(dist, "entry_points", None) or {}
    return value.get("console_scripts")


def _get_previous_gui_scripts(dist: "Distribution") -> Optional[list]:
    value = getattr(dist, "entry_points", None) or {}
    return value.get("gui_scripts")


def _attrgetter(attr):
    """
    Similar to ``operator.attrgetter`` but returns None if ``attr`` is not found
    >>> from types import SimpleNamespace
    >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13))
    >>> _attrgetter("a")(obj)
    42
    >>> _attrgetter("b.c")(obj)
    13
    >>> _attrgetter("d")(obj) is None
    True
    """
    return partial(reduce, lambda acc, x: getattr(acc, x, None), attr.split("."))


def _some_attrgetter(*items):
    """
    Return the first "truth-y" attribute or None
    >>> from types import SimpleNamespace
    >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13))
    >>> _some_attrgetter("d", "a", "b.c")(obj)
    42
    >>> _some_attrgetter("d", "e", "b.c", "a")(obj)
    13
    >>> _some_attrgetter("d", "e", "f")(obj) is None
    True
    """

    def _acessor(obj):
        values = (_attrgetter(i)(obj) for i in items)
        return next((i for i in values if i is not None), None)

    return _acessor


PYPROJECT_CORRESPONDENCE: Dict[str, _Correspondence] = {
    "readme": _long_description,
    "license": _license,
    "authors": partial(_people, kind="author"),
    "maintainers": partial(_people, kind="maintainer"),
    "urls": _project_urls,
    "dependencies": _dependencies,
    "optional_dependencies": _optional_dependencies,
    "requires_python": _python_requires,
}

TOOL_TABLE_RENAMES = {"script_files": "scripts"}
TOOL_TABLE_REMOVALS = {
    "namespace_packages": """
        Please migrate to implicit native namespaces instead.
        See https://packaging.python.org/en/latest/guides/packaging-namespace-packages/.
        """,
}

SETUPTOOLS_PATCHES = {
    "long_description_content_type",
    "project_urls",
    "provides_extras",
    "license_file",
    "license_files",
}

_PREVIOUSLY_DEFINED = {
    "name": _attrgetter("metadata.name"),
    "version": _attrgetter("metadata.version"),
    "description": _attrgetter("metadata.description"),
    "readme": _attrgetter("metadata.long_description"),
    "requires-python": _some_attrgetter("python_requires", "metadata.python_requires"),
    "license": _attrgetter("metadata.license"),
    "authors": _some_attrgetter("metadata.author", "metadata.author_email"),
    "maintainers": _some_attrgetter("metadata.maintainer", "metadata.maintainer_email"),
    "keywords": _attrgetter("metadata.keywords"),
    "classifiers": _attrgetter("metadata.classifiers"),
    "urls": _attrgetter("metadata.project_urls"),
    "entry-points": _get_previous_entrypoints,
    "scripts": _get_previous_scripts,
    "gui-scripts": _get_previous_gui_scripts,
    "dependencies": _attrgetter("install_requires"),
    "optional-dependencies": _attrgetter("extras_require"),
}


_RESET_PREVIOUSLY_DEFINED: dict = {
    # Fix improper setting: given in `setup.py`, but not listed in `dynamic`
    # dict: pyproject name => value to which reset
    "license": {},
    "authors": [],
    "maintainers": [],
    "keywords": [],
    "classifiers": [],
    "urls": {},
    "entry-points": {},
    "scripts": {},
    "gui-scripts": {},
    "dependencies": [],
    "optional-dependencies": [],
}


class _MissingDynamic(SetuptoolsWarning):
    _SUMMARY = "`{field}` defined outside of `pyproject.toml` is ignored."

    _DETAILS = """
    The following seems to be defined outside of `pyproject.toml`:

    `{field} = {value!r}`

    According to the spec (see the link below), however, setuptools CANNOT
    consider this value unless `{field}` is listed as `dynamic`.

    https://packaging.python.org/en/latest/specifications/declaring-project-metadata/

    To prevent this problem, you can list `{field}` under `dynamic` or alternatively
    remove the `[project]` table from your file and rely entirely on other means of
    configuration.
    """
    # TODO: Consider removing this check in the future?
    #       There is a trade-off here between improving "debug-ability" and the cost
    #       of running/testing/maintaining these unnecessary checks...

    @classmethod
    def details(cls, field: str, value: Any) -> str:
        return cls._DETAILS.format(field=field, value=value)
python3.12/site-packages/setuptools/config/expand.py000064400000040004151732704230016432 0ustar00"""Utility functions to expand configuration directives or special values
(such glob patterns).

We can split the process of interpreting configuration files into 2 steps:

1. The parsing the file contents from strings to value objects
   that can be understand by Python (for example a string with a comma
   separated list of keywords into an actual Python list of strings).

2. The expansion (or post-processing) of these values according to the
   semantics ``setuptools`` assign to them (for example a configuration field
   with the ``file:`` directive should be expanded from a list of file paths to
   a single string with the contents of those files concatenated)

This module focus on the second step, and therefore allow sharing the expansion
functions among several configuration file formats.

**PRIVATE MODULE**: API reserved for setuptools internal usage only.
"""
import ast
import importlib
import os
import pathlib
import sys
from glob import iglob
from configparser import ConfigParser
from importlib.machinery import ModuleSpec
from itertools import chain
from typing import (
    TYPE_CHECKING,
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    Mapping,
    Optional,
    Tuple,
    TypeVar,
    Union,
    cast,
)
from pathlib import Path
from types import ModuleType

from distutils.errors import DistutilsOptionError

from .._path import same_path as _same_path
from ..warnings import SetuptoolsWarning

if TYPE_CHECKING:
    from setuptools.dist import Distribution  # noqa
    from setuptools.discovery import ConfigDiscovery  # noqa
    from distutils.dist import DistributionMetadata  # noqa

chain_iter = chain.from_iterable
_Path = Union[str, os.PathLike]
_K = TypeVar("_K")
_V = TypeVar("_V", covariant=True)


class StaticModule:
    """Proxy to a module object that avoids executing arbitrary code."""

    def __init__(self, name: str, spec: ModuleSpec):
        module = ast.parse(pathlib.Path(spec.origin).read_bytes())
        vars(self).update(locals())
        del self.self

    def _find_assignments(self) -> Iterator[Tuple[ast.AST, ast.AST]]:
        for statement in self.module.body:
            if isinstance(statement, ast.Assign):
                yield from ((target, statement.value) for target in statement.targets)
            elif isinstance(statement, ast.AnnAssign) and statement.value:
                yield (statement.target, statement.value)

    def __getattr__(self, attr):
        """Attempt to load an attribute "statically", via :func:`ast.literal_eval`."""
        try:
            return next(
                ast.literal_eval(value)
                for target, value in self._find_assignments()
                if isinstance(target, ast.Name) and target.id == attr
            )
        except Exception as e:
            raise AttributeError(f"{self.name} has no attribute {attr}") from e


def glob_relative(
    patterns: Iterable[str], root_dir: Optional[_Path] = None
) -> List[str]:
    """Expand the list of glob patterns, but preserving relative paths.

    :param list[str] patterns: List of glob patterns
    :param str root_dir: Path to which globs should be relative
                         (current directory by default)
    :rtype: list
    """
    glob_characters = {'*', '?', '[', ']', '{', '}'}
    expanded_values = []
    root_dir = root_dir or os.getcwd()
    for value in patterns:
        # Has globby characters?
        if any(char in value for char in glob_characters):
            # then expand the glob pattern while keeping paths *relative*:
            glob_path = os.path.abspath(os.path.join(root_dir, value))
            expanded_values.extend(
                sorted(
                    os.path.relpath(path, root_dir).replace(os.sep, "/")
                    for path in iglob(glob_path, recursive=True)
                )
            )

        else:
            # take the value as-is
            path = os.path.relpath(value, root_dir).replace(os.sep, "/")
            expanded_values.append(path)

    return expanded_values


def read_files(filepaths: Union[str, bytes, Iterable[_Path]], root_dir=None) -> str:
    """Return the content of the files concatenated using ``\n`` as str

    This function is sandboxed and won't reach anything outside ``root_dir``

    (By default ``root_dir`` is the current directory).
    """
    from setuptools.extern.more_itertools import always_iterable

    root_dir = os.path.abspath(root_dir or os.getcwd())
    _filepaths = (os.path.join(root_dir, path) for path in always_iterable(filepaths))
    return '\n'.join(
        _read_file(path)
        for path in _filter_existing_files(_filepaths)
        if _assert_local(path, root_dir)
    )


def _filter_existing_files(filepaths: Iterable[_Path]) -> Iterator[_Path]:
    for path in filepaths:
        if os.path.isfile(path):
            yield path
        else:
            SetuptoolsWarning.emit(f"File {path!r} cannot be found")


def _read_file(filepath: Union[bytes, _Path]) -> str:
    with open(filepath, encoding='utf-8') as f:
        return f.read()


def _assert_local(filepath: _Path, root_dir: str):
    if Path(os.path.abspath(root_dir)) not in Path(os.path.abspath(filepath)).parents:
        msg = f"Cannot access {filepath!r} (or anything outside {root_dir!r})"
        raise DistutilsOptionError(msg)

    return True


def read_attr(
    attr_desc: str,
    package_dir: Optional[Mapping[str, str]] = None,
    root_dir: Optional[_Path] = None,
):
    """Reads the value of an attribute from a module.

    This function will try to read the attributed statically first
    (via :func:`ast.literal_eval`), and only evaluate the module if it fails.

    Examples:
        read_attr("package.attr")
        read_attr("package.module.attr")

    :param str attr_desc: Dot-separated string describing how to reach the
        attribute (see examples above)
    :param dict[str, str] package_dir: Mapping of package names to their
        location in disk (represented by paths relative to ``root_dir``).
    :param str root_dir: Path to directory containing all the packages in
        ``package_dir`` (current directory by default).
    :rtype: str
    """
    root_dir = root_dir or os.getcwd()
    attrs_path = attr_desc.strip().split('.')
    attr_name = attrs_path.pop()
    module_name = '.'.join(attrs_path)
    module_name = module_name or '__init__'
    _parent_path, path, module_name = _find_module(module_name, package_dir, root_dir)
    spec = _find_spec(module_name, path)

    try:
        return getattr(StaticModule(module_name, spec), attr_name)
    except Exception:
        # fallback to evaluate module
        module = _load_spec(spec, module_name)
        return getattr(module, attr_name)


def _find_spec(module_name: str, module_path: Optional[_Path]) -> ModuleSpec:
    spec = importlib.util.spec_from_file_location(module_name, module_path)
    spec = spec or importlib.util.find_spec(module_name)

    if spec is None:
        raise ModuleNotFoundError(module_name)

    return spec


def _load_spec(spec: ModuleSpec, module_name: str) -> ModuleType:
    name = getattr(spec, "__name__", module_name)
    if name in sys.modules:
        return sys.modules[name]
    module = importlib.util.module_from_spec(spec)
    sys.modules[name] = module  # cache (it also ensures `==` works on loaded items)
    spec.loader.exec_module(module)  # type: ignore
    return module


def _find_module(
    module_name: str, package_dir: Optional[Mapping[str, str]], root_dir: _Path
) -> Tuple[_Path, Optional[str], str]:
    """Given a module (that could normally be imported by ``module_name``
    after the build is complete), find the path to the parent directory where
    it is contained and the canonical name that could be used to import it
    considering the ``package_dir`` in the build configuration and ``root_dir``
    """
    parent_path = root_dir
    module_parts = module_name.split('.')
    if package_dir:
        if module_parts[0] in package_dir:
            # A custom path was specified for the module we want to import
            custom_path = package_dir[module_parts[0]]
            parts = custom_path.rsplit('/', 1)
            if len(parts) > 1:
                parent_path = os.path.join(root_dir, parts[0])
                parent_module = parts[1]
            else:
                parent_module = custom_path
            module_name = ".".join([parent_module, *module_parts[1:]])
        elif '' in package_dir:
            # A custom parent directory was specified for all root modules
            parent_path = os.path.join(root_dir, package_dir[''])

    path_start = os.path.join(parent_path, *module_name.split("."))
    candidates = chain(
        (f"{path_start}.py", os.path.join(path_start, "__init__.py")),
        iglob(f"{path_start}.*"),
    )
    module_path = next((x for x in candidates if os.path.isfile(x)), None)
    return parent_path, module_path, module_name


def resolve_class(
    qualified_class_name: str,
    package_dir: Optional[Mapping[str, str]] = None,
    root_dir: Optional[_Path] = None,
) -> Callable:
    """Given a qualified class name, return the associated class object"""
    root_dir = root_dir or os.getcwd()
    idx = qualified_class_name.rfind('.')
    class_name = qualified_class_name[idx + 1 :]
    pkg_name = qualified_class_name[:idx]

    _parent_path, path, module_name = _find_module(pkg_name, package_dir, root_dir)
    module = _load_spec(_find_spec(module_name, path), module_name)
    return getattr(module, class_name)


def cmdclass(
    values: Dict[str, str],
    package_dir: Optional[Mapping[str, str]] = None,
    root_dir: Optional[_Path] = None,
) -> Dict[str, Callable]:
    """Given a dictionary mapping command names to strings for qualified class
    names, apply :func:`resolve_class` to the dict values.
    """
    return {k: resolve_class(v, package_dir, root_dir) for k, v in values.items()}


def find_packages(
    *,
    namespaces=True,
    fill_package_dir: Optional[Dict[str, str]] = None,
    root_dir: Optional[_Path] = None,
    **kwargs,
) -> List[str]:
    """Works similarly to :func:`setuptools.find_packages`, but with all
    arguments given as keyword arguments. Moreover, ``where`` can be given
    as a list (the results will be simply concatenated).

    When the additional keyword argument ``namespaces`` is ``True``, it will
    behave like :func:`setuptools.find_namespace_packages`` (i.e. include
    implicit namespaces as per :pep:`420`).

    The ``where`` argument will be considered relative to ``root_dir`` (or the current
    working directory when ``root_dir`` is not given).

    If the ``fill_package_dir`` argument is passed, this function will consider it as a
    similar data structure to the ``package_dir`` configuration parameter add fill-in
    any missing package location.

    :rtype: list
    """
    from setuptools.discovery import construct_package_dir
    from setuptools.extern.more_itertools import unique_everseen, always_iterable

    if namespaces:
        from setuptools.discovery import PEP420PackageFinder as PackageFinder
    else:
        from setuptools.discovery import PackageFinder  # type: ignore

    root_dir = root_dir or os.curdir
    where = kwargs.pop('where', ['.'])
    packages: List[str] = []
    fill_package_dir = {} if fill_package_dir is None else fill_package_dir
    search = list(unique_everseen(always_iterable(where)))

    if len(search) == 1 and all(not _same_path(search[0], x) for x in (".", root_dir)):
        fill_package_dir.setdefault("", search[0])

    for path in search:
        package_path = _nest_path(root_dir, path)
        pkgs = PackageFinder.find(package_path, **kwargs)
        packages.extend(pkgs)
        if pkgs and not (
            fill_package_dir.get("") == path or os.path.samefile(package_path, root_dir)
        ):
            fill_package_dir.update(construct_package_dir(pkgs, path))

    return packages


def _nest_path(parent: _Path, path: _Path) -> str:
    path = parent if path in {".", ""} else os.path.join(parent, path)
    return os.path.normpath(path)


def version(value: Union[Callable, Iterable[Union[str, int]], str]) -> str:
    """When getting the version directly from an attribute,
    it should be normalised to string.
    """
    if callable(value):
        value = value()

    value = cast(Iterable[Union[str, int]], value)

    if not isinstance(value, str):
        if hasattr(value, '__iter__'):
            value = '.'.join(map(str, value))
        else:
            value = '%s' % value

    return value


def canonic_package_data(package_data: dict) -> dict:
    if "*" in package_data:
        package_data[""] = package_data.pop("*")
    return package_data


def canonic_data_files(
    data_files: Union[list, dict], root_dir: Optional[_Path] = None
) -> List[Tuple[str, List[str]]]:
    """For compatibility with ``setup.py``, ``data_files`` should be a list
    of pairs instead of a dict.

    This function also expands glob patterns.
    """
    if isinstance(data_files, list):
        return data_files

    return [
        (dest, glob_relative(patterns, root_dir))
        for dest, patterns in data_files.items()
    ]


def entry_points(text: str, text_source="entry-points") -> Dict[str, dict]:
    """Given the contents of entry-points file,
    process it into a 2-level dictionary (``dict[str, dict[str, str]]``).
    The first level keys are entry-point groups, the second level keys are
    entry-point names, and the second level values are references to objects
    (that correspond to the entry-point value).
    """
    parser = ConfigParser(default_section=None, delimiters=("=",))  # type: ignore
    parser.optionxform = str  # case sensitive
    parser.read_string(text, text_source)
    groups = {k: dict(v.items()) for k, v in parser.items()}
    groups.pop(parser.default_section, None)
    return groups


class EnsurePackagesDiscovered:
    """Some expand functions require all the packages to already be discovered before
    they run, e.g. :func:`read_attr`, :func:`resolve_class`, :func:`cmdclass`.

    Therefore in some cases we will need to run autodiscovery during the evaluation of
    the configuration. However, it is better to postpone calling package discovery as
    much as possible, because some parameters can influence it (e.g. ``package_dir``),
    and those might not have been processed yet.
    """

    def __init__(self, distribution: "Distribution"):
        self._dist = distribution
        self._called = False

    def __call__(self):
        """Trigger the automatic package discovery, if it is still necessary."""
        if not self._called:
            self._called = True
            self._dist.set_defaults(name=False)  # Skip name, we can still be parsing

    def __enter__(self):
        return self

    def __exit__(self, _exc_type, _exc_value, _traceback):
        if self._called:
            self._dist.set_defaults.analyse_name()  # Now we can set a default name

    def _get_package_dir(self) -> Mapping[str, str]:
        self()
        pkg_dir = self._dist.package_dir
        return {} if pkg_dir is None else pkg_dir

    @property
    def package_dir(self) -> Mapping[str, str]:
        """Proxy to ``package_dir`` that may trigger auto-discovery when used."""
        return LazyMappingProxy(self._get_package_dir)


class LazyMappingProxy(Mapping[_K, _V]):
    """Mapping proxy that delays resolving the target object, until really needed.

    >>> def obtain_mapping():
    ...     print("Running expensive function!")
    ...     return {"key": "value", "other key": "other value"}
    >>> mapping = LazyMappingProxy(obtain_mapping)
    >>> mapping["key"]
    Running expensive function!
    'value'
    >>> mapping["other key"]
    'other value'
    """

    def __init__(self, obtain_mapping_value: Callable[[], Mapping[_K, _V]]):
        self._obtain = obtain_mapping_value
        self._value: Optional[Mapping[_K, _V]] = None

    def _target(self) -> Mapping[_K, _V]:
        if self._value is None:
            self._value = self._obtain()
        return self._value

    def __getitem__(self, key: _K) -> _V:
        return self._target()[key]

    def __len__(self) -> int:
        return len(self._target())

    def __iter__(self) -> Iterator[_K]:
        return iter(self._target())
python3.12/site-packages/setuptools/config/pyprojecttoml.py000064400000041723151732704230020077 0ustar00"""
Load setuptools configuration from ``pyproject.toml`` files.

**PRIVATE MODULE**: API reserved for setuptools internal usage only.

To read project metadata, consider using
``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
For simple scenarios, you can also try parsing the file directly
with the help of ``tomllib`` or ``tomli``.
"""
import logging
import os
from contextlib import contextmanager
from functools import partial
from typing import TYPE_CHECKING, Callable, Dict, Mapping, Optional, Set, Union

from ..errors import FileError, InvalidConfigError
from ..warnings import SetuptoolsWarning
from . import expand as _expand
from ._apply_pyprojecttoml import _PREVIOUSLY_DEFINED, _MissingDynamic
from ._apply_pyprojecttoml import apply as _apply

if TYPE_CHECKING:
    from setuptools.dist import Distribution  # noqa

_Path = Union[str, os.PathLike]
_logger = logging.getLogger(__name__)


def load_file(filepath: _Path) -> dict:
    from setuptools.extern import tomli  # type: ignore

    with open(filepath, "rb") as file:
        return tomli.load(file)


def validate(config: dict, filepath: _Path) -> bool:
    from . import _validate_pyproject as validator

    trove_classifier = validator.FORMAT_FUNCTIONS.get("trove-classifier")
    if hasattr(trove_classifier, "_disable_download"):
        # Improve reproducibility by default. See issue 31 for validate-pyproject.
        trove_classifier._disable_download()  # type: ignore

    try:
        return validator.validate(config)
    except validator.ValidationError as ex:
        summary = f"configuration error: {ex.summary}"
        if ex.name.strip("`") != "project":
            # Probably it is just a field missing/misnamed, not worthy the verbosity...
            _logger.debug(summary)
            _logger.debug(ex.details)

        error = f"invalid pyproject.toml config: {ex.name}."
        raise ValueError(f"{error}\n{summary}") from None


def apply_configuration(
    dist: "Distribution",
    filepath: _Path,
    ignore_option_errors=False,
) -> "Distribution":
    """Apply the configuration from a ``pyproject.toml`` file into an existing
    distribution object.
    """
    config = read_configuration(filepath, True, ignore_option_errors, dist)
    return _apply(dist, config, filepath)


def read_configuration(
    filepath: _Path,
    expand=True,
    ignore_option_errors=False,
    dist: Optional["Distribution"] = None,
):
    """Read given configuration file and returns options from it as a dict.

    :param str|unicode filepath: Path to configuration file in the ``pyproject.toml``
        format.

    :param bool expand: Whether to expand directives and other computed values
        (i.e. post-process the given configuration)

    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.

    :param Distribution|None: Distribution object to which the configuration refers.
        If not given a dummy object will be created and discarded after the
        configuration is read. This is used for auto-discovery of packages and in the
        case a dynamic configuration (e.g. ``attr`` or ``cmdclass``) is expanded.
        When ``expand=False`` this object is simply ignored.

    :rtype: dict
    """
    filepath = os.path.abspath(filepath)

    if not os.path.isfile(filepath):
        raise FileError(f"Configuration file {filepath!r} does not exist.")

    asdict = load_file(filepath) or {}
    project_table = asdict.get("project", {})
    tool_table = asdict.get("tool", {})
    setuptools_table = tool_table.get("setuptools", {})
    if not asdict or not (project_table or setuptools_table):
        return {}  # User is not using pyproject to configure setuptools

    if "distutils" in tool_table:
        _ExperimentalConfiguration.emit(subject="[tool.distutils]")

    # There is an overall sense in the community that making include_package_data=True
    # the default would be an improvement.
    # `ini2toml` backfills include_package_data=False when nothing is explicitly given,
    # therefore setting a default here is backwards compatible.
    if dist and getattr(dist, "include_package_data", None) is not None:
        setuptools_table.setdefault("include-package-data", dist.include_package_data)
    else:
        setuptools_table.setdefault("include-package-data", True)
    # Persist changes:
    asdict["tool"] = tool_table
    tool_table["setuptools"] = setuptools_table

    with _ignore_errors(ignore_option_errors):
        # Don't complain about unrelated errors (e.g. tools not using the "tool" table)
        subset = {"project": project_table, "tool": {"setuptools": setuptools_table}}
        validate(subset, filepath)

    if expand:
        root_dir = os.path.dirname(filepath)
        return expand_configuration(asdict, root_dir, ignore_option_errors, dist)

    return asdict


def expand_configuration(
    config: dict,
    root_dir: Optional[_Path] = None,
    ignore_option_errors: bool = False,
    dist: Optional["Distribution"] = None,
) -> dict:
    """Given a configuration with unresolved fields (e.g. dynamic, cmdclass, ...)
    find their final values.

    :param dict config: Dict containing the configuration for the distribution
    :param str root_dir: Top-level directory for the distribution/project
        (the same directory where ``pyproject.toml`` is place)
    :param bool ignore_option_errors: see :func:`read_configuration`
    :param Distribution|None: Distribution object to which the configuration refers.
        If not given a dummy object will be created and discarded after the
        configuration is read. Used in the case a dynamic configuration
        (e.g. ``attr`` or ``cmdclass``).

    :rtype: dict
    """
    return _ConfigExpander(config, root_dir, ignore_option_errors, dist).expand()


class _ConfigExpander:
    def __init__(
        self,
        config: dict,
        root_dir: Optional[_Path] = None,
        ignore_option_errors: bool = False,
        dist: Optional["Distribution"] = None,
    ):
        self.config = config
        self.root_dir = root_dir or os.getcwd()
        self.project_cfg = config.get("project", {})
        self.dynamic = self.project_cfg.get("dynamic", [])
        self.setuptools_cfg = config.get("tool", {}).get("setuptools", {})
        self.dynamic_cfg = self.setuptools_cfg.get("dynamic", {})
        self.ignore_option_errors = ignore_option_errors
        self._dist = dist
        self._referenced_files: Set[str] = set()

    def _ensure_dist(self) -> "Distribution":
        from setuptools.dist import Distribution

        attrs = {"src_root": self.root_dir, "name": self.project_cfg.get("name", None)}
        return self._dist or Distribution(attrs)

    def _process_field(self, container: dict, field: str, fn: Callable):
        if field in container:
            with _ignore_errors(self.ignore_option_errors):
                container[field] = fn(container[field])

    def _canonic_package_data(self, field="package-data"):
        package_data = self.setuptools_cfg.get(field, {})
        return _expand.canonic_package_data(package_data)

    def expand(self):
        self._expand_packages()
        self._canonic_package_data()
        self._canonic_package_data("exclude-package-data")

        # A distribution object is required for discovering the correct package_dir
        dist = self._ensure_dist()
        ctx = _EnsurePackagesDiscovered(dist, self.project_cfg, self.setuptools_cfg)
        with ctx as ensure_discovered:
            package_dir = ensure_discovered.package_dir
            self._expand_data_files()
            self._expand_cmdclass(package_dir)
            self._expand_all_dynamic(dist, package_dir)

        dist._referenced_files.update(self._referenced_files)
        return self.config

    def _expand_packages(self):
        packages = self.setuptools_cfg.get("packages")
        if packages is None or isinstance(packages, (list, tuple)):
            return

        find = packages.get("find")
        if isinstance(find, dict):
            find["root_dir"] = self.root_dir
            find["fill_package_dir"] = self.setuptools_cfg.setdefault("package-dir", {})
            with _ignore_errors(self.ignore_option_errors):
                self.setuptools_cfg["packages"] = _expand.find_packages(**find)

    def _expand_data_files(self):
        data_files = partial(_expand.canonic_data_files, root_dir=self.root_dir)
        self._process_field(self.setuptools_cfg, "data-files", data_files)

    def _expand_cmdclass(self, package_dir: Mapping[str, str]):
        root_dir = self.root_dir
        cmdclass = partial(_expand.cmdclass, package_dir=package_dir, root_dir=root_dir)
        self._process_field(self.setuptools_cfg, "cmdclass", cmdclass)

    def _expand_all_dynamic(self, dist: "Distribution", package_dir: Mapping[str, str]):
        special = (  # need special handling
            "version",
            "readme",
            "entry-points",
            "scripts",
            "gui-scripts",
            "classifiers",
            "dependencies",
            "optional-dependencies",
        )
        # `_obtain` functions are assumed to raise appropriate exceptions/warnings.
        obtained_dynamic = {
            field: self._obtain(dist, field, package_dir)
            for field in self.dynamic
            if field not in special
        }
        obtained_dynamic.update(
            self._obtain_entry_points(dist, package_dir) or {},
            version=self._obtain_version(dist, package_dir),
            readme=self._obtain_readme(dist),
            classifiers=self._obtain_classifiers(dist),
            dependencies=self._obtain_dependencies(dist),
            optional_dependencies=self._obtain_optional_dependencies(dist),
        )
        # `None` indicates there is nothing in `tool.setuptools.dynamic` but the value
        # might have already been set by setup.py/extensions, so avoid overwriting.
        updates = {k: v for k, v in obtained_dynamic.items() if v is not None}
        self.project_cfg.update(updates)

    def _ensure_previously_set(self, dist: "Distribution", field: str):
        previous = _PREVIOUSLY_DEFINED[field](dist)
        if previous is None and not self.ignore_option_errors:
            msg = (
                f"No configuration found for dynamic {field!r}.\n"
                "Some dynamic fields need to be specified via `tool.setuptools.dynamic`"
                "\nothers must be specified via the equivalent attribute in `setup.py`."
            )
            raise InvalidConfigError(msg)

    def _expand_directive(
        self, specifier: str, directive, package_dir: Mapping[str, str]
    ):
        from setuptools.extern.more_itertools import always_iterable  # type: ignore

        with _ignore_errors(self.ignore_option_errors):
            root_dir = self.root_dir
            if "file" in directive:
                self._referenced_files.update(always_iterable(directive["file"]))
                return _expand.read_files(directive["file"], root_dir)
            if "attr" in directive:
                return _expand.read_attr(directive["attr"], package_dir, root_dir)
            raise ValueError(f"invalid `{specifier}`: {directive!r}")
        return None

    def _obtain(self, dist: "Distribution", field: str, package_dir: Mapping[str, str]):
        if field in self.dynamic_cfg:
            return self._expand_directive(
                f"tool.setuptools.dynamic.{field}",
                self.dynamic_cfg[field],
                package_dir,
            )
        self._ensure_previously_set(dist, field)
        return None

    def _obtain_version(self, dist: "Distribution", package_dir: Mapping[str, str]):
        # Since plugins can set version, let's silently skip if it cannot be obtained
        if "version" in self.dynamic and "version" in self.dynamic_cfg:
            return _expand.version(self._obtain(dist, "version", package_dir))
        return None

    def _obtain_readme(self, dist: "Distribution") -> Optional[Dict[str, str]]:
        if "readme" not in self.dynamic:
            return None

        dynamic_cfg = self.dynamic_cfg
        if "readme" in dynamic_cfg:
            return {
                "text": self._obtain(dist, "readme", {}),
                "content-type": dynamic_cfg["readme"].get("content-type", "text/x-rst"),
            }

        self._ensure_previously_set(dist, "readme")
        return None

    def _obtain_entry_points(
        self, dist: "Distribution", package_dir: Mapping[str, str]
    ) -> Optional[Dict[str, dict]]:
        fields = ("entry-points", "scripts", "gui-scripts")
        if not any(field in self.dynamic for field in fields):
            return None

        text = self._obtain(dist, "entry-points", package_dir)
        if text is None:
            return None

        groups = _expand.entry_points(text)
        expanded = {"entry-points": groups}

        def _set_scripts(field: str, group: str):
            if group in groups:
                value = groups.pop(group)
                if field not in self.dynamic:
                    raise InvalidConfigError(_MissingDynamic.details(field, value))
                expanded[field] = value

        _set_scripts("scripts", "console_scripts")
        _set_scripts("gui-scripts", "gui_scripts")

        return expanded

    def _obtain_classifiers(self, dist: "Distribution"):
        if "classifiers" in self.dynamic:
            value = self._obtain(dist, "classifiers", {})
            if value:
                return value.splitlines()
        return None

    def _obtain_dependencies(self, dist: "Distribution"):
        if "dependencies" in self.dynamic:
            value = self._obtain(dist, "dependencies", {})
            if value:
                return _parse_requirements_list(value)
        return None

    def _obtain_optional_dependencies(self, dist: "Distribution"):
        if "optional-dependencies" not in self.dynamic:
            return None
        if "optional-dependencies" in self.dynamic_cfg:
            optional_dependencies_map = self.dynamic_cfg["optional-dependencies"]
            assert isinstance(optional_dependencies_map, dict)
            return {
                group: _parse_requirements_list(
                    self._expand_directive(
                        f"tool.setuptools.dynamic.optional-dependencies.{group}",
                        directive,
                        {},
                    )
                )
                for group, directive in optional_dependencies_map.items()
            }
        self._ensure_previously_set(dist, "optional-dependencies")
        return None


def _parse_requirements_list(value):
    return [
        line
        for line in value.splitlines()
        if line.strip() and not line.strip().startswith("#")
    ]


@contextmanager
def _ignore_errors(ignore_option_errors: bool):
    if not ignore_option_errors:
        yield
        return

    try:
        yield
    except Exception as ex:
        _logger.debug(f"ignored error: {ex.__class__.__name__} - {ex}")


class _EnsurePackagesDiscovered(_expand.EnsurePackagesDiscovered):
    def __init__(
        self, distribution: "Distribution", project_cfg: dict, setuptools_cfg: dict
    ):
        super().__init__(distribution)
        self._project_cfg = project_cfg
        self._setuptools_cfg = setuptools_cfg

    def __enter__(self):
        """When entering the context, the values of ``packages``, ``py_modules`` and
        ``package_dir`` that are missing in ``dist`` are copied from ``setuptools_cfg``.
        """
        dist, cfg = self._dist, self._setuptools_cfg
        package_dir: Dict[str, str] = cfg.setdefault("package-dir", {})
        package_dir.update(dist.package_dir or {})
        dist.package_dir = package_dir  # needs to be the same object

        dist.set_defaults._ignore_ext_modules()  # pyproject.toml-specific behaviour

        # Set `name`, `py_modules` and `packages` in dist to short-circuit
        # auto-discovery, but avoid overwriting empty lists purposefully set by users.
        if dist.metadata.name is None:
            dist.metadata.name = self._project_cfg.get("name")
        if dist.py_modules is None:
            dist.py_modules = cfg.get("py-modules")
        if dist.packages is None:
            dist.packages = cfg.get("packages")

        return super().__enter__()

    def __exit__(self, exc_type, exc_value, traceback):
        """When exiting the context, if values of ``packages``, ``py_modules`` and
        ``package_dir`` are missing in ``setuptools_cfg``, copy from ``dist``.
        """
        # If anything was discovered set them back, so they count in the final config.
        self._setuptools_cfg.setdefault("packages", self._dist.packages)
        self._setuptools_cfg.setdefault("py-modules", self._dist.py_modules)
        return super().__exit__(exc_type, exc_value, traceback)


class _ExperimentalConfiguration(SetuptoolsWarning):
    _SUMMARY = (
        "`{subject}` in `pyproject.toml` is still *experimental* "
        "and likely to change in future releases."
    )
python3.12/site-packages/setuptools-69.0.2.dist-info/LICENSE000064400000001777151732704230017004 0ustar00Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
python3.12/site-packages/setuptools-69.0.2.dist-info/entry_points.txt000064400000005164151732704230021267 0ustar00[distutils.commands]
alias = setuptools.command.alias:alias
bdist_egg = setuptools.command.bdist_egg:bdist_egg
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
build = setuptools.command.build:build
build_clib = setuptools.command.build_clib:build_clib
build_ext = setuptools.command.build_ext:build_ext
build_py = setuptools.command.build_py:build_py
develop = setuptools.command.develop:develop
dist_info = setuptools.command.dist_info:dist_info
easy_install = setuptools.command.easy_install:easy_install
editable_wheel = setuptools.command.editable_wheel:editable_wheel
egg_info = setuptools.command.egg_info:egg_info
install = setuptools.command.install:install
install_egg_info = setuptools.command.install_egg_info:install_egg_info
install_lib = setuptools.command.install_lib:install_lib
install_scripts = setuptools.command.install_scripts:install_scripts
rotate = setuptools.command.rotate:rotate
saveopts = setuptools.command.saveopts:saveopts
sdist = setuptools.command.sdist:sdist
setopt = setuptools.command.setopt:setopt
test = setuptools.command.test:test
upload_docs = setuptools.command.upload_docs:upload_docs

[distutils.setup_keywords]
dependency_links = setuptools.dist:assert_string_list
eager_resources = setuptools.dist:assert_string_list
entry_points = setuptools.dist:check_entry_points
exclude_package_data = setuptools.dist:check_package_data
extras_require = setuptools.dist:check_extras
include_package_data = setuptools.dist:assert_bool
install_requires = setuptools.dist:check_requirements
namespace_packages = setuptools.dist:check_nsp
package_data = setuptools.dist:check_package_data
packages = setuptools.dist:check_packages
python_requires = setuptools.dist:check_specifier
setup_requires = setuptools.dist:check_requirements
test_loader = setuptools.dist:check_importable
test_runner = setuptools.dist:check_importable
test_suite = setuptools.dist:check_test_suite
tests_require = setuptools.dist:check_requirements
use_2to3 = setuptools.dist:invalid_unless_false
zip_safe = setuptools.dist:assert_bool

[egg_info.writers]
PKG-INFO = setuptools.command.egg_info:write_pkg_info
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
entry_points.txt = setuptools.command.egg_info:write_entries
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
requires.txt = setuptools.command.egg_info:write_requirements
top_level.txt = setuptools.command.egg_info:write_toplevel_names

[setuptools.finalize_distribution_options]
keywords = setuptools.dist:Distribution._finalize_setup_keywords
parent_finalize = setuptools.dist:_Distribution.finalize_options
python3.12/site-packages/setuptools-69.0.2.dist-info/METADATA000064400000014200151732704230017063 0ustar00Metadata-Version: 2.1
Name: setuptools
Version: 69.0.2
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
Project-URL: Documentation, https://setuptools.pypa.io/
Project-URL: Changelog, https://setuptools.pypa.io/en/stable/history.html
Keywords: CPAN PyPI distutils eggs package management
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.8
License-File: LICENSE
Provides-Extra: certs
Provides-Extra: docs
Requires-Dist: sphinx >=3.5 ; extra == 'docs'
Requires-Dist: sphinx <7.2.5 ; extra == 'docs'
Requires-Dist: jaraco.packaging >=9.3 ; extra == 'docs'
Requires-Dist: rst.linker >=1.9 ; extra == 'docs'
Requires-Dist: furo ; extra == 'docs'
Requires-Dist: sphinx-lint ; extra == 'docs'
Requires-Dist: jaraco.tidelift >=1.4 ; extra == 'docs'
Requires-Dist: pygments-github-lexers ==0.0.5 ; extra == 'docs'
Requires-Dist: sphinx-favicon ; extra == 'docs'
Requires-Dist: sphinx-inline-tabs ; extra == 'docs'
Requires-Dist: sphinx-reredirects ; extra == 'docs'
Requires-Dist: sphinxcontrib-towncrier ; extra == 'docs'
Requires-Dist: sphinx-notfound-page <2,>=1 ; extra == 'docs'
Provides-Extra: ssl
Provides-Extra: testing
Requires-Dist: pytest >=6 ; extra == 'testing'
Requires-Dist: pytest-checkdocs >=2.4 ; extra == 'testing'
Requires-Dist: pytest-enabler >=2.2 ; extra == 'testing'
Requires-Dist: flake8-2020 ; extra == 'testing'
Requires-Dist: virtualenv >=13.0.0 ; extra == 'testing'
Requires-Dist: wheel ; extra == 'testing'
Requires-Dist: pip >=19.1 ; extra == 'testing'
Requires-Dist: jaraco.envs >=2.2 ; extra == 'testing'
Requires-Dist: pytest-xdist ; extra == 'testing'
Requires-Dist: jaraco.path >=3.2.0 ; extra == 'testing'
Requires-Dist: build[virtualenv] ; extra == 'testing'
Requires-Dist: filelock >=3.4.0 ; extra == 'testing'
Requires-Dist: ini2toml[lite] >=0.9 ; extra == 'testing'
Requires-Dist: tomli-w >=1.0.0 ; extra == 'testing'
Requires-Dist: pytest-timeout ; extra == 'testing'
Provides-Extra: testing-integration
Requires-Dist: pytest ; extra == 'testing-integration'
Requires-Dist: pytest-xdist ; extra == 'testing-integration'
Requires-Dist: pytest-enabler ; extra == 'testing-integration'
Requires-Dist: virtualenv >=13.0.0 ; extra == 'testing-integration'
Requires-Dist: tomli ; extra == 'testing-integration'
Requires-Dist: wheel ; extra == 'testing-integration'
Requires-Dist: jaraco.path >=3.2.0 ; extra == 'testing-integration'
Requires-Dist: jaraco.envs >=2.2 ; extra == 'testing-integration'
Requires-Dist: build[virtualenv] >=1.0.3 ; extra == 'testing-integration'
Requires-Dist: filelock >=3.4.0 ; extra == 'testing-integration'
Requires-Dist: packaging >=23.1 ; extra == 'testing-integration'
Requires-Dist: pytest-black >=0.3.7 ; (platform_python_implementation != "PyPy") and extra == 'testing'
Requires-Dist: pytest-cov ; (platform_python_implementation != "PyPy") and extra == 'testing'
Requires-Dist: pytest-mypy >=0.9.1 ; (platform_python_implementation != "PyPy") and extra == 'testing'
Requires-Dist: jaraco.develop >=7.21 ; (python_version >= "3.9" and sys_platform != "cygwin") and extra == 'testing'
Requires-Dist: pytest-ruff ; (sys_platform != "cygwin") and extra == 'testing'
Requires-Dist: pytest-perf ; (sys_platform != "cygwin") and extra == 'testing'

.. image:: https://img.shields.io/pypi/v/setuptools.svg
   :target: https://pypi.org/project/setuptools

.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg

.. image:: https://github.com/pypa/setuptools/workflows/tests/badge.svg
   :target: https://github.com/pypa/setuptools/actions?query=workflow%3A%22tests%22
   :alt: tests

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Ruff

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
   :alt: Code style: Black

.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg
    :target: https://setuptools.pypa.io

.. image:: https://img.shields.io/badge/skeleton-2023-informational
   :target: https://blog.jaraco.com/skeleton

.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
   :target: https://codecov.io/gh/pypa/setuptools

.. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
   :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme

.. image:: https://img.shields.io/discord/803025117553754132
   :target: https://discord.com/channels/803025117553754132/815945031150993468
   :alt: Discord

See the `Installation Instructions
<https://packaging.python.org/installing/>`_ in the Python Packaging
User's Guide for instructions on installing, upgrading, and uninstalling
Setuptools.

Questions and comments should be directed to `GitHub Discussions
<https://github.com/pypa/setuptools/discussions>`_.
Bug reports and especially tested patches may be
submitted directly to the `bug tracker
<https://github.com/pypa/setuptools/issues>`_.


Code of Conduct
===============

Everyone interacting in the setuptools project's codebases, issue trackers,
chat rooms, and fora is expected to follow the
`PSF Code of Conduct <https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md>`_.


For Enterprise
==============

Available as part of the Tidelift Subscription.

Setuptools and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.

`Learn more <https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=referral&utm_campaign=github>`_.
python3.12/site-packages/setuptools-69.0.2.dist-info/INSTALLER000064400000000004151732704230017235 0ustar00pip
python3.12/site-packages/setuptools-69.0.2.dist-info/RECORD000064400000112556151732704240016677 0ustar00_distutils_hack/__init__.py,sha256=RoSaYKfMhRic9rWsYrPxNQBIYs5qllQKgcle9vvE3D4,6299
_distutils_hack/__pycache__/__init__.cpython-312.pyc,,
_distutils_hack/__pycache__/override.cpython-312.pyc,,
_distutils_hack/override.py,sha256=Eu_s-NF6VIZ4Cqd0tbbA5wtWky2IZPNd8et6GLt1mzo,44
distutils-precedence.pth,sha256=JjjOniUA5XKl4N5_rtZmHrVp0baW_LoHsN0iPaX10iQ,151
pkg_resources/__init__.py,sha256=-NXmuXzCKKuDAp5I-xH4-EJ5cVbVSZLg8g_TL7EI1JQ,109343
pkg_resources/__pycache__/__init__.cpython-312.pyc,,
pkg_resources/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pkg_resources/_vendor/__pycache__/__init__.cpython-312.pyc,,
pkg_resources/_vendor/__pycache__/typing_extensions.cpython-312.pyc,,
pkg_resources/_vendor/__pycache__/zipp.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__init__.py,sha256=evPm12kLgYqTm-pbzm60bOuumumT8IpBNWFp0uMyrzE,506
pkg_resources/_vendor/importlib_resources/__pycache__/__init__.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__pycache__/_adapters.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__pycache__/_common.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__pycache__/_compat.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__pycache__/_itertools.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__pycache__/_legacy.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__pycache__/abc.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__pycache__/readers.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/__pycache__/simple.cpython-312.pyc,,
pkg_resources/_vendor/importlib_resources/_adapters.py,sha256=o51tP2hpVtohP33gSYyAkGNpLfYDBqxxYsadyiRZi1E,4504
pkg_resources/_vendor/importlib_resources/_common.py,sha256=jSC4xfLdcMNbtbWHtpzbFkNa0W7kvf__nsYn14C_AEU,5457
pkg_resources/_vendor/importlib_resources/_compat.py,sha256=L8HTWyAC_MIKuxWZuw0zvTq5qmUA0ttrvK941OzDKU8,2925
pkg_resources/_vendor/importlib_resources/_itertools.py,sha256=WCdJ1Gs_kNFwKENyIG7TO0Y434IWCu0zjVVSsSbZwU8,884
pkg_resources/_vendor/importlib_resources/_legacy.py,sha256=0TKdZixxLWA-xwtAZw4HcpqJmj4Xprx1Zkcty0gTRZY,3481
pkg_resources/_vendor/importlib_resources/abc.py,sha256=Icr2IJ2QtH7vvAB9vC5WRJ9KBoaDyJa7KUs8McuROzo,5140
pkg_resources/_vendor/importlib_resources/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pkg_resources/_vendor/importlib_resources/readers.py,sha256=PZsi5qacr2Qn3KHw4qw3Gm1MzrBblPHoTdjqjH7EKWw,3581
pkg_resources/_vendor/importlib_resources/simple.py,sha256=0__2TQBTQoqkajYmNPt1HxERcReAT6boVKJA328pr04,2576
pkg_resources/_vendor/jaraco/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pkg_resources/_vendor/jaraco/__pycache__/__init__.cpython-312.pyc,,
pkg_resources/_vendor/jaraco/__pycache__/context.cpython-312.pyc,,
pkg_resources/_vendor/jaraco/__pycache__/functools.cpython-312.pyc,,
pkg_resources/_vendor/jaraco/context.py,sha256=vlyDzb_PvZ9H7R9bbTr_CMRnveW5Dc56eC7eyd_GfoA,7460
pkg_resources/_vendor/jaraco/functools.py,sha256=ggupfjztLyRtNk4pS2JqVrH3lWUX-QbE3wz5PyIKZWE,15056
pkg_resources/_vendor/jaraco/text/__init__.py,sha256=cN55bFcceW4wTHG5ruv5IuEDRarP-4hBYX8zl94_c30,15526
pkg_resources/_vendor/jaraco/text/__pycache__/__init__.cpython-312.pyc,,
pkg_resources/_vendor/more_itertools/__init__.py,sha256=mTzXsWGDHiVW5x8zHzcRu1imUMzrEtJnUhfsN-dBrV4,148
pkg_resources/_vendor/more_itertools/__init__.pyi,sha256=5B3eTzON1BBuOLob1vCflyEb2lSd6usXQQ-Cv-hXkeA,43
pkg_resources/_vendor/more_itertools/__pycache__/__init__.cpython-312.pyc,,
pkg_resources/_vendor/more_itertools/__pycache__/more.cpython-312.pyc,,
pkg_resources/_vendor/more_itertools/__pycache__/recipes.cpython-312.pyc,,
pkg_resources/_vendor/more_itertools/more.py,sha256=hAluuEi5QOSe0OZfD2_sCwwbfbK5NnAxHg6uvU5AfPU,134976
pkg_resources/_vendor/more_itertools/more.pyi,sha256=tZNfrCeIQLfOYhRyp0Wq7no_ryJ5h3FDskNNUBD-zmU,20105
pkg_resources/_vendor/more_itertools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pkg_resources/_vendor/more_itertools/recipes.py,sha256=lgw5bP3UoNfvUPhRaz1VIAfRFkF9pKWN-8UB6H0W5Eo,25416
pkg_resources/_vendor/more_itertools/recipes.pyi,sha256=Um3BGANEFi4papnQfKBJnlEEuSpXS8-nbxro8OyuOt8,4056
pkg_resources/_vendor/packaging/__init__.py,sha256=kYVZSmXT6CWInT4UJPDtrSQBAZu8fMuFBxpv5GsDTLk,501
pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/_parser.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/markers.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/metadata.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/requirements.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/tags.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/utils.cpython-312.pyc,,
pkg_resources/_vendor/packaging/__pycache__/version.cpython-312.pyc,,
pkg_resources/_vendor/packaging/_elffile.py,sha256=hbmK8OD6Z7fY6hwinHEUcD1by7czkGiNYu7ShnFEk2k,3266
pkg_resources/_vendor/packaging/_manylinux.py,sha256=ESGrDEVmBc8jYTtdZRAWiLk72lOzAKWeezFgoJ_MuBc,8926
pkg_resources/_vendor/packaging/_musllinux.py,sha256=mvPk7FNjjILKRLIdMxR7IvJ1uggLgCszo-L9rjfpi0M,2524
pkg_resources/_vendor/packaging/_parser.py,sha256=KJQkBh_Xbfb-qsB560YIEItrTpCZaOh4_YMfBtd5XIY,10194
pkg_resources/_vendor/packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431
pkg_resources/_vendor/packaging/_tokenizer.py,sha256=alCtbwXhOFAmFGZ6BQ-wCTSFoRAJ2z-ysIf7__MTJ_k,5292
pkg_resources/_vendor/packaging/markers.py,sha256=eH-txS2zq1HdNpTd9LcZUcVIwewAiNU0grmq5wjKnOk,8208
pkg_resources/_vendor/packaging/metadata.py,sha256=PjELMLxKG_iu3HWjKAOdKhuNrHfWgpdTF2Q4nObsZeM,16397
pkg_resources/_vendor/packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pkg_resources/_vendor/packaging/requirements.py,sha256=hJzvtJyAvENc_VfwfhnOZV1851-VW8JCGh-R96NE4Pc,3287
pkg_resources/_vendor/packaging/specifiers.py,sha256=ZOpqL_w_Kj6ZF_OWdliQUzhEyHlDbi6989kr-sF5GHs,39206
pkg_resources/_vendor/packaging/tags.py,sha256=_1gLX8h1SgpjAdYCP9XqU37zRjXtU5ZliGy3IM-WcSM,18106
pkg_resources/_vendor/packaging/utils.py,sha256=es0cCezKspzriQ-3V88h3yJzxz028euV2sUwM61kE-o,4355
pkg_resources/_vendor/packaging/version.py,sha256=2NH3E57hzRhn0BV9boUBvgPsxlTqLJeI0EpYQoNvGi0,16326
pkg_resources/_vendor/platformdirs/__init__.py,sha256=edi2JSKpLCapqir0AW_CjpHtinRE3hf6aDk5-VHggLk,12806
pkg_resources/_vendor/platformdirs/__main__.py,sha256=VsC0t5m-6f0YVr96PVks93G3EDF8MSNY4KpUMvPahDA,1164
pkg_resources/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc,,
pkg_resources/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc,,
pkg_resources/_vendor/platformdirs/__pycache__/android.cpython-312.pyc,,
pkg_resources/_vendor/platformdirs/__pycache__/api.cpython-312.pyc,,
pkg_resources/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc,,
pkg_resources/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc,,
pkg_resources/_vendor/platformdirs/__pycache__/version.cpython-312.pyc,,
pkg_resources/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc,,
pkg_resources/_vendor/platformdirs/android.py,sha256=GKizhyS7ESRiU67u8UnBJLm46goau9937EchXWbPBlk,4068
pkg_resources/_vendor/platformdirs/api.py,sha256=MXKHXOL3eh_-trSok-JUTjAR_zjmmKF3rjREVABjP8s,4910
pkg_resources/_vendor/platformdirs/macos.py,sha256=-3UXQewbT0yMhMdkzRXfXGAntmLIH7Qt4a9Hlf8I5_Y,2655
pkg_resources/_vendor/platformdirs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pkg_resources/_vendor/platformdirs/unix.py,sha256=P-WQjSSieE38DXjMDa1t4XHnKJQ5idEaKT0PyXwm8KQ,6911
pkg_resources/_vendor/platformdirs/version.py,sha256=qaN-fw_htIgKUVXoAuAEVgKxQu3tZ9qE2eiKkWIS7LA,160
pkg_resources/_vendor/platformdirs/windows.py,sha256=LOrXLgI0CjQldDo2zhOZYGYZ6g4e_cJOCB_pF9aMRWQ,6596
pkg_resources/_vendor/typing_extensions.py,sha256=ipqWiq5AHzrwczt6c26AP05Llh6a5_GaXRpOBqbogHA,80078
pkg_resources/_vendor/zipp.py,sha256=ajztOH-9I7KA_4wqDYygtHa6xUBVZgFpmZ8FE74HHHI,8425
pkg_resources/extern/__init__.py,sha256=nDtjbrhEaDu388fp4O6BGSpbihZmHh7PoOz2hhFk-Qg,2442
pkg_resources/extern/__pycache__/__init__.cpython-312.pyc,,
setuptools-69.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
setuptools-69.0.2.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
setuptools-69.0.2.dist-info/METADATA,sha256=ETNNjCJo5Q8P8g5tmbV9FZbSL1pBw1LHMr1oMuBOhpk,6272
setuptools-69.0.2.dist-info/RECORD,,
setuptools-69.0.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
setuptools-69.0.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
setuptools-69.0.2.dist-info/direct_url.json,sha256=__sbBKE53rEbxiW1Hc8do25iv6fR18L-cM5QbOvlTss,288
setuptools-69.0.2.dist-info/entry_points.txt,sha256=Fe-UZkzgLTUZQOH94hbLTyP4HxM1nxlMuEZ_rS6zNnE,2676
setuptools-69.0.2.dist-info/top_level.txt,sha256=d9yL39v_W7qmKDDSH6sT4bE0j_Ls1M3P161OGgdsm4g,41
setuptools/__init__.py,sha256=mpVwlKNmw8XaMmeGQReCoAOsZb1T-iiqa24QEQHWaGk,9214
setuptools/__pycache__/__init__.cpython-312.pyc,,
setuptools/__pycache__/_core_metadata.cpython-312.pyc,,
setuptools/__pycache__/_entry_points.cpython-312.pyc,,
setuptools/__pycache__/_imp.cpython-312.pyc,,
setuptools/__pycache__/_importlib.cpython-312.pyc,,
setuptools/__pycache__/_itertools.cpython-312.pyc,,
setuptools/__pycache__/_normalization.cpython-312.pyc,,
setuptools/__pycache__/_path.cpython-312.pyc,,
setuptools/__pycache__/_reqs.cpython-312.pyc,,
setuptools/__pycache__/archive_util.cpython-312.pyc,,
setuptools/__pycache__/build_meta.cpython-312.pyc,,
setuptools/__pycache__/dep_util.cpython-312.pyc,,
setuptools/__pycache__/depends.cpython-312.pyc,,
setuptools/__pycache__/discovery.cpython-312.pyc,,
setuptools/__pycache__/dist.cpython-312.pyc,,
setuptools/__pycache__/errors.cpython-312.pyc,,
setuptools/__pycache__/extension.cpython-312.pyc,,
setuptools/__pycache__/glob.cpython-312.pyc,,
setuptools/__pycache__/installer.cpython-312.pyc,,
setuptools/__pycache__/launch.cpython-312.pyc,,
setuptools/__pycache__/logging.cpython-312.pyc,,
setuptools/__pycache__/modified.cpython-312.pyc,,
setuptools/__pycache__/monkey.cpython-312.pyc,,
setuptools/__pycache__/msvc.cpython-312.pyc,,
setuptools/__pycache__/namespaces.cpython-312.pyc,,
setuptools/__pycache__/package_index.cpython-312.pyc,,
setuptools/__pycache__/py312compat.cpython-312.pyc,,
setuptools/__pycache__/sandbox.cpython-312.pyc,,
setuptools/__pycache__/unicode_utils.cpython-312.pyc,,
setuptools/__pycache__/version.cpython-312.pyc,,
setuptools/__pycache__/warnings.cpython-312.pyc,,
setuptools/__pycache__/wheel.cpython-312.pyc,,
setuptools/__pycache__/windows_support.cpython-312.pyc,,
setuptools/_core_metadata.py,sha256=985eQ3IYhCwENeItDFouQzgUl3JEJINMJ40kOw9ea24,8921
setuptools/_distutils/__init__.py,sha256=swqU6jm29LbH4slGa3UTxYAaMUCLOzPY1qTMa4tv7PE,359
setuptools/_distutils/__pycache__/__init__.cpython-312.pyc,,
setuptools/_distutils/__pycache__/_collections.cpython-312.pyc,,
setuptools/_distutils/__pycache__/_functools.cpython-312.pyc,,
setuptools/_distutils/__pycache__/_log.cpython-312.pyc,,
setuptools/_distutils/__pycache__/_macos_compat.cpython-312.pyc,,
setuptools/_distutils/__pycache__/_modified.cpython-312.pyc,,
setuptools/_distutils/__pycache__/_msvccompiler.cpython-312.pyc,,
setuptools/_distutils/__pycache__/archive_util.cpython-312.pyc,,
setuptools/_distutils/__pycache__/bcppcompiler.cpython-312.pyc,,
setuptools/_distutils/__pycache__/ccompiler.cpython-312.pyc,,
setuptools/_distutils/__pycache__/cmd.cpython-312.pyc,,
setuptools/_distutils/__pycache__/config.cpython-312.pyc,,
setuptools/_distutils/__pycache__/core.cpython-312.pyc,,
setuptools/_distutils/__pycache__/cygwinccompiler.cpython-312.pyc,,
setuptools/_distutils/__pycache__/debug.cpython-312.pyc,,
setuptools/_distutils/__pycache__/dep_util.cpython-312.pyc,,
setuptools/_distutils/__pycache__/dir_util.cpython-312.pyc,,
setuptools/_distutils/__pycache__/dist.cpython-312.pyc,,
setuptools/_distutils/__pycache__/errors.cpython-312.pyc,,
setuptools/_distutils/__pycache__/extension.cpython-312.pyc,,
setuptools/_distutils/__pycache__/fancy_getopt.cpython-312.pyc,,
setuptools/_distutils/__pycache__/file_util.cpython-312.pyc,,
setuptools/_distutils/__pycache__/filelist.cpython-312.pyc,,
setuptools/_distutils/__pycache__/log.cpython-312.pyc,,
setuptools/_distutils/__pycache__/msvc9compiler.cpython-312.pyc,,
setuptools/_distutils/__pycache__/msvccompiler.cpython-312.pyc,,
setuptools/_distutils/__pycache__/py38compat.cpython-312.pyc,,
setuptools/_distutils/__pycache__/py39compat.cpython-312.pyc,,
setuptools/_distutils/__pycache__/spawn.cpython-312.pyc,,
setuptools/_distutils/__pycache__/sysconfig.cpython-312.pyc,,
setuptools/_distutils/__pycache__/text_file.cpython-312.pyc,,
setuptools/_distutils/__pycache__/unixccompiler.cpython-312.pyc,,
setuptools/_distutils/__pycache__/util.cpython-312.pyc,,
setuptools/_distutils/__pycache__/version.cpython-312.pyc,,
setuptools/_distutils/__pycache__/versionpredicate.cpython-312.pyc,,
setuptools/_distutils/_collections.py,sha256=2qMJB2M_i53g0LmeYfD5V3SQ9fx3FScCXdFUS03wfiU,5300
setuptools/_distutils/_functools.py,sha256=X0hb3XXNlzU0KNmF1oUO6rMpeAi12wxD5tSJZiXd3Zc,1771
setuptools/_distutils/_log.py,sha256=zwFOk2ValRHMQa_kCqDXpHnwaqqZzhxGEwuR4zV-dEs,43
setuptools/_distutils/_macos_compat.py,sha256=-v_Z0M1LEH5k-VhSBBbuz_pDp3nSZ4rzU9E7iIskPDc,239
setuptools/_distutils/_modified.py,sha256=yP1_cVGBBWc3_DMGdGpt6PwNlsOLFe6NXfRR7zVQazM,2411
setuptools/_distutils/_msvccompiler.py,sha256=sWNC_gUhWzQ0FkCS6bD3Tj2Fvlnk2AwLnP8OvcV_gvQ,19616
setuptools/_distutils/archive_util.py,sha256=JtMIta8JuFkCXVTHvZhmneAEdIMnpsdX84nOWKF24rk,8572
setuptools/_distutils/bcppcompiler.py,sha256=xCNDrCD4SFoOKv9zf48BG2ZJw0GsNhxE8GyVmIMX0Is,14722
setuptools/_distutils/ccompiler.py,sha256=mDbCWIaSrKUcIpVJ7CteLFPQJpdba3p3Anln4Z0la04,48644
setuptools/_distutils/cmd.py,sha256=cn2W8dh_iisomNRvLkCxl84iY02wzJ1rrzwkTx_Vv6A,17863
setuptools/_distutils/command/__init__.py,sha256=fVUps4DJhvShMAod0y7xl02m46bd7r31irEhNofPrrs,430
setuptools/_distutils/command/__pycache__/__init__.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/_framework_compat.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/bdist.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/bdist_dumb.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/bdist_rpm.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/build.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/build_clib.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/build_ext.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/build_py.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/build_scripts.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/check.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/clean.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/config.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/install.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/install_data.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/install_egg_info.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/install_headers.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/install_lib.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/install_scripts.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/py37compat.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/register.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/sdist.cpython-312.pyc,,
setuptools/_distutils/command/__pycache__/upload.cpython-312.pyc,,
setuptools/_distutils/command/_framework_compat.py,sha256=HW84Z1cWmg4b6aMJvlMI9o6sGZSEH_aWMTlDKstL8lY,1614
setuptools/_distutils/command/bdist.py,sha256=EpbYBIrW4QTYrA6G8uUJIKZaLmj8w4S5KWnXzmr6hQo,5408
setuptools/_distutils/command/bdist_dumb.py,sha256=FvvNgx_B7ypjf7rMxFNNBOsuF_Dj_OV8L4dmkULhQKM,4665
setuptools/_distutils/command/bdist_rpm.py,sha256=QNQku4v38GcOcctHGNbRVoYv5mVMVcexnmCxh9fqpGw,22013
setuptools/_distutils/command/build.py,sha256=XDgkAsMp_jLX9mj-6ESdf7GK_8RuX9kwILwXOhN1GaM,5584
setuptools/_distutils/command/build_clib.py,sha256=stRzgT6gdXMTmsEi8PyudEO32ZDC7iP--sdUErcMuOs,7684
setuptools/_distutils/command/build_ext.py,sha256=GcDFoVJh6X1F45bg48i7Te-8pQfVUUv82nzkM5pWEQM,31504
setuptools/_distutils/command/build_py.py,sha256=LK_l_5gnFv6D02YtyJRBp5kE3SWmHVEC7CbBKe2tjk8,16537
setuptools/_distutils/command/build_scripts.py,sha256=KbHH9uJ4RJGP3Vp1rcbW0kdRKKzbhRrxneFOSIxPZEE,5605
setuptools/_distutils/command/check.py,sha256=f7QOy4LkKUXiRyyti4orzCJX9Z8sY_uOyMYUADADG6g,4872
setuptools/_distutils/command/clean.py,sha256=VCRg7BPVdLXgtevEi7t_iChJW6k6fOaO0GyqR_m_MRw,2594
setuptools/_distutils/command/config.py,sha256=FU8kAanpAvaaecBbRZTvZ7lcoxxBXq5_nTufwOyZUXg,13077
setuptools/_distutils/command/install.py,sha256=5h_6BldPSUPUkYDzdY1t6Jiqaw21yBZZokpkMVaBnyo,30153
setuptools/_distutils/command/install_data.py,sha256=NgW_xUoUqcBGjGFr2VHrkYFejVqeAmwsGSu_fGQb384,2762
setuptools/_distutils/command/install_egg_info.py,sha256=Cv69kqrFORuwb1I1owe-IxyK0ZANirqGgiLyxcYSnBI,2788
setuptools/_distutils/command/install_headers.py,sha256=v-QcVkjaWX5yf0xaup9_KySanVlmd6LhuzEhGpmTiTU,1180
setuptools/_distutils/command/install_lib.py,sha256=v3we1bymtqvE-j_7yCSnb4a0Jy32s3z1SLZzF91NpjY,8409
setuptools/_distutils/command/install_scripts.py,sha256=oiYYD6IhTx9F4CQMfz5LQeGT1y5hZrndxbKBYSvzTa8,1932
setuptools/_distutils/command/py37compat.py,sha256=EoJC8gVYMIv2tA1NpVA2XDyCT1qGp4BEn7aX_5ve1gw,672
setuptools/_distutils/command/register.py,sha256=q8kKVA-6IPWbgHPBbc8HvWwRi9DXerjnyiMgMG1fu8A,11817
setuptools/_distutils/command/sdist.py,sha256=JkT1SJQUgtlZyjFmyqx0lOL45tDb9I9Dn38iz9ySb-k,19232
setuptools/_distutils/command/upload.py,sha256=jsb3Kj3XQtNqwwvtc1WUt_Jk8AEXIehjEXIj3dInv6M,7491
setuptools/_distutils/config.py,sha256=NrQjaUO9B88P-JtOfww3BMt9rSn1TirU4G7u0ut5FrM,4911
setuptools/_distutils/core.py,sha256=2zrS7rdu7Oe2143xsmCld8H61IbSpwnru9GDeSCQLbY,9397
setuptools/_distutils/cygwinccompiler.py,sha256=hBv-OShb_uKvLjo_E2uqtQLEJNBBXTFglvf6mzbUN8o,11924
setuptools/_distutils/debug.py,sha256=N6MrTAqK6l9SVk6tWweR108PM8Ol7qNlfyV-nHcLhsY,139
setuptools/_distutils/dep_util.py,sha256=xN75p6ZpHhMiHEc-rpL2XilJQynHnDNiafHteaZ4tjU,349
setuptools/_distutils/dir_util.py,sha256=Ob0omB4OlZZXfFQtalVoIY6CgIrOkD5YZfATYv2DXZg,8072
setuptools/_distutils/dist.py,sha256=YU6OeLdWPDWMg-GRCeykT21fOp7PxAYn1uwnoRpI-uM,50174
setuptools/_distutils/errors.py,sha256=ZtBwnhDpQA2bxIazPXNDQ25uNxM4p2omsaSRNpV3rpE,3589
setuptools/_distutils/extension.py,sha256=F0TBNjYkMmte_Yg1bhKVHXSNWWNFEPIDUgwhuHdkox8,10270
setuptools/_distutils/fancy_getopt.py,sha256=njv20bPVKKusIRbs8Md1YNWlGZQV1mW5fWPNkdYx-QI,17899
setuptools/_distutils/file_util.py,sha256=zlGwB7KEcVJMrnF7PobgvjVyRetwtqiFRtCQfYZExo4,8213
setuptools/_distutils/filelist.py,sha256=rOKJPBvuLSjElfYuOwju95AzR3Ev5lvJoCJvI_XvZ9g,13715
setuptools/_distutils/log.py,sha256=725W7ISJzoSYNtLnEP1FwZe_IMUn1Xq6NEYwFbXg63k,1201
setuptools/_distutils/msvc9compiler.py,sha256=X2Xf2g-RMKzb_B4MIihiO3ogyTFjJNV1xRWpZTsbbSA,30188
setuptools/_distutils/msvccompiler.py,sha256=Vus9UyDuNCT_PfZjwu253wL0v5PiQ9miiMZmdIro5wM,23577
setuptools/_distutils/py38compat.py,sha256=gZ-NQ5c6ufwVEkJ0BwkbrqG9TvWirVJIrVGqhgvaY-Q,217
setuptools/_distutils/py39compat.py,sha256=hOsD6lwZLqZoMnacNJ3P6nUA-LJQhEpVtYTzVH0o96M,1964
setuptools/_distutils/spawn.py,sha256=E6Il74CIINCRjakXUcWqSWjfC_sdp4Qtod0Bw5y_NNQ,3495
setuptools/_distutils/sysconfig.py,sha256=BbXNQAF9_tErImHCfSori3188FwSw2TUFqLBvU1BLdg,18928
setuptools/_distutils/text_file.py,sha256=SBgU_IeHYRZMvmmqyE6I8qXAbh1Z-wd60Hf0Yv97Cls,12085
setuptools/_distutils/unixccompiler.py,sha256=6NAc0sS_T3Cmsr9JWTKDvU0JZ7-BcPxCOuJKJcJdtdQ,15602
setuptools/_distutils/util.py,sha256=rgSskpxPwLA4cvCOOYPQLaI8iP8hCRqxIE5xwDA0ghw,18100
setuptools/_distutils/version.py,sha256=9dCa7JcCWXBrfGUsv7Zzvqm-Mrf7yaK6cC5xRzx3iqg,12951
setuptools/_distutils/versionpredicate.py,sha256=mkg9LtyF3EWox-KnbBx08gKV8zu0ymIl1izIho2-f7k,5205
setuptools/_entry_points.py,sha256=P-Utt8hvMGkkJdw7VPzZ00uijeA9dohUCMTcDbbeQkU,2235
setuptools/_imp.py,sha256=1Y1gH0NOppV4nbr1eidD5iGQ8UVPfiVZi6rTqrfC06c,2433
setuptools/_importlib.py,sha256=ZWlYbGHjb-QwRpH3SQ9uuxn_X-F2ihcQCS5HtT_W9lk,1468
setuptools/_itertools.py,sha256=pZAgXNz6tRPUFnHAaKJ90xAgD0gLPemcE1396Zgz73o,675
setuptools/_normalization.py,sha256=StTO8d4DR3m5mDqbq5f8zow4NY11ueE30hzvyE7rCbE,4214
setuptools/_path.py,sha256=5xWH5ZZEJVcp_b0JjcAyTuTX2iz1H3F2Yti7fPIxueU,1056
setuptools/_reqs.py,sha256=AQZg5og_HbZlMe67G3lEKufChz8HLzjWWmffR_DPLOI,1120
setuptools/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
setuptools/_vendor/__pycache__/__init__.cpython-312.pyc,,
setuptools/_vendor/__pycache__/ordered_set.cpython-312.pyc,,
setuptools/_vendor/__pycache__/typing_extensions.cpython-312.pyc,,
setuptools/_vendor/__pycache__/zipp.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__init__.py,sha256=fQEsJb7Gs_9Vq9V0xHICB0EFxNRGyxubr4w4ZFmGcxY,26498
setuptools/_vendor/importlib_metadata/__pycache__/__init__.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__pycache__/_adapters.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__pycache__/_collections.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__pycache__/_compat.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__pycache__/_functools.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__pycache__/_itertools.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__pycache__/_meta.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__pycache__/_py39compat.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/__pycache__/_text.cpython-312.pyc,,
setuptools/_vendor/importlib_metadata/_adapters.py,sha256=i8S6Ib1OQjcILA-l4gkzktMZe18TaeUNI49PLRp6OBU,2454
setuptools/_vendor/importlib_metadata/_collections.py,sha256=CJ0OTCHIjWA0ZIVS4voORAsn2R4R2cQBEtPsZEJpASY,743
setuptools/_vendor/importlib_metadata/_compat.py,sha256=GtdqmFy_ykVSTkz6MdGL2g3V5kxvQKHTWxKZCk5Q59Q,1859
setuptools/_vendor/importlib_metadata/_functools.py,sha256=PsY2-4rrKX4RVeRC1oGp1lB1pmC9eKN88_f-bD9uOoA,2895
setuptools/_vendor/importlib_metadata/_itertools.py,sha256=cvr_2v8BRbxcIl5x5ldfqdHjhI8Yi8s8yk50G_nm6jQ,2068
setuptools/_vendor/importlib_metadata/_meta.py,sha256=v5e1ZDG7yZTH3h7TjbS5bM5p8AGzMPVOu8skDMv4h6k,1165
setuptools/_vendor/importlib_metadata/_py39compat.py,sha256=2Tk5twb_VgLCY-1NEAQjdZp_S9OFMC-pUzP2isuaPsQ,1098
setuptools/_vendor/importlib_metadata/_text.py,sha256=HCsFksZpJLeTP3NEk_ngrAeXVRRtTrtyh9eOABoRP4A,2166
setuptools/_vendor/importlib_metadata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
setuptools/_vendor/importlib_resources/__init__.py,sha256=evPm12kLgYqTm-pbzm60bOuumumT8IpBNWFp0uMyrzE,506
setuptools/_vendor/importlib_resources/__pycache__/__init__.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/__pycache__/_adapters.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/__pycache__/_common.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/__pycache__/_compat.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/__pycache__/_itertools.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/__pycache__/_legacy.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/__pycache__/abc.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/__pycache__/readers.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/__pycache__/simple.cpython-312.pyc,,
setuptools/_vendor/importlib_resources/_adapters.py,sha256=o51tP2hpVtohP33gSYyAkGNpLfYDBqxxYsadyiRZi1E,4504
setuptools/_vendor/importlib_resources/_common.py,sha256=jSC4xfLdcMNbtbWHtpzbFkNa0W7kvf__nsYn14C_AEU,5457
setuptools/_vendor/importlib_resources/_compat.py,sha256=L8HTWyAC_MIKuxWZuw0zvTq5qmUA0ttrvK941OzDKU8,2925
setuptools/_vendor/importlib_resources/_itertools.py,sha256=WCdJ1Gs_kNFwKENyIG7TO0Y434IWCu0zjVVSsSbZwU8,884
setuptools/_vendor/importlib_resources/_legacy.py,sha256=0TKdZixxLWA-xwtAZw4HcpqJmj4Xprx1Zkcty0gTRZY,3481
setuptools/_vendor/importlib_resources/abc.py,sha256=Icr2IJ2QtH7vvAB9vC5WRJ9KBoaDyJa7KUs8McuROzo,5140
setuptools/_vendor/importlib_resources/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
setuptools/_vendor/importlib_resources/readers.py,sha256=PZsi5qacr2Qn3KHw4qw3Gm1MzrBblPHoTdjqjH7EKWw,3581
setuptools/_vendor/importlib_resources/simple.py,sha256=0__2TQBTQoqkajYmNPt1HxERcReAT6boVKJA328pr04,2576
setuptools/_vendor/jaraco/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
setuptools/_vendor/jaraco/__pycache__/__init__.cpython-312.pyc,,
setuptools/_vendor/jaraco/__pycache__/context.cpython-312.pyc,,
setuptools/_vendor/jaraco/__pycache__/functools.cpython-312.pyc,,
setuptools/_vendor/jaraco/context.py,sha256=vlyDzb_PvZ9H7R9bbTr_CMRnveW5Dc56eC7eyd_GfoA,7460
setuptools/_vendor/jaraco/functools.py,sha256=0rUJxpJvN1TNlBScfYB2NbFGO1Pv7BeMJwzvqkVqnbY,15053
setuptools/_vendor/jaraco/text/__init__.py,sha256=KfFGMerrkN_0V0rgtJVx-9dHt3tW7i_uJypjwEcLtC0,15517
setuptools/_vendor/jaraco/text/__pycache__/__init__.cpython-312.pyc,,
setuptools/_vendor/more_itertools/__init__.py,sha256=C7sXffHTXM3P-iaLPPfqfmDoxOflQMJLcM7ed9p3jak,82
setuptools/_vendor/more_itertools/__init__.pyi,sha256=5B3eTzON1BBuOLob1vCflyEb2lSd6usXQQ-Cv-hXkeA,43
setuptools/_vendor/more_itertools/__pycache__/__init__.cpython-312.pyc,,
setuptools/_vendor/more_itertools/__pycache__/more.cpython-312.pyc,,
setuptools/_vendor/more_itertools/__pycache__/recipes.cpython-312.pyc,,
setuptools/_vendor/more_itertools/more.py,sha256=0rB_mibFR51sq33UlAI_bWfaNdsYNnJr1v6S0CaW7QA,117959
setuptools/_vendor/more_itertools/more.pyi,sha256=r32pH2raBC1zih3evK4fyvAXvrUamJqc6dgV7QCRL_M,14977
setuptools/_vendor/more_itertools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
setuptools/_vendor/more_itertools/recipes.py,sha256=UkNkrsZyqiwgLHANBTmvMhCvaNSvSNYhyOpz_Jc55DY,16256
setuptools/_vendor/more_itertools/recipes.pyi,sha256=9BpeKd5_qalYVSnuHfqPSCfoGgqnQY2Xu9pNwrDlHU8,3551
setuptools/_vendor/ordered_set.py,sha256=dbaCcs27dyN9gnMWGF5nA_BrVn6Q-NrjKYJpV9_fgBs,15130
setuptools/_vendor/packaging/__init__.py,sha256=kYVZSmXT6CWInT4UJPDtrSQBAZu8fMuFBxpv5GsDTLk,501
setuptools/_vendor/packaging/__pycache__/__init__.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/_parser.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/_structures.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/markers.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/metadata.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/requirements.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/tags.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/utils.cpython-312.pyc,,
setuptools/_vendor/packaging/__pycache__/version.cpython-312.pyc,,
setuptools/_vendor/packaging/_elffile.py,sha256=hbmK8OD6Z7fY6hwinHEUcD1by7czkGiNYu7ShnFEk2k,3266
setuptools/_vendor/packaging/_manylinux.py,sha256=ESGrDEVmBc8jYTtdZRAWiLk72lOzAKWeezFgoJ_MuBc,8926
setuptools/_vendor/packaging/_musllinux.py,sha256=mvPk7FNjjILKRLIdMxR7IvJ1uggLgCszo-L9rjfpi0M,2524
setuptools/_vendor/packaging/_parser.py,sha256=KJQkBh_Xbfb-qsB560YIEItrTpCZaOh4_YMfBtd5XIY,10194
setuptools/_vendor/packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431
setuptools/_vendor/packaging/_tokenizer.py,sha256=alCtbwXhOFAmFGZ6BQ-wCTSFoRAJ2z-ysIf7__MTJ_k,5292
setuptools/_vendor/packaging/markers.py,sha256=eH-txS2zq1HdNpTd9LcZUcVIwewAiNU0grmq5wjKnOk,8208
setuptools/_vendor/packaging/metadata.py,sha256=PjELMLxKG_iu3HWjKAOdKhuNrHfWgpdTF2Q4nObsZeM,16397
setuptools/_vendor/packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
setuptools/_vendor/packaging/requirements.py,sha256=hJzvtJyAvENc_VfwfhnOZV1851-VW8JCGh-R96NE4Pc,3287
setuptools/_vendor/packaging/specifiers.py,sha256=ZOpqL_w_Kj6ZF_OWdliQUzhEyHlDbi6989kr-sF5GHs,39206
setuptools/_vendor/packaging/tags.py,sha256=_1gLX8h1SgpjAdYCP9XqU37zRjXtU5ZliGy3IM-WcSM,18106
setuptools/_vendor/packaging/utils.py,sha256=es0cCezKspzriQ-3V88h3yJzxz028euV2sUwM61kE-o,4355
setuptools/_vendor/packaging/version.py,sha256=2NH3E57hzRhn0BV9boUBvgPsxlTqLJeI0EpYQoNvGi0,16326
setuptools/_vendor/tomli/__init__.py,sha256=JhUwV66DB1g4Hvt1UQCVMdfCu-IgAV8FXmvDU9onxd4,396
setuptools/_vendor/tomli/__pycache__/__init__.cpython-312.pyc,,
setuptools/_vendor/tomli/__pycache__/_parser.cpython-312.pyc,,
setuptools/_vendor/tomli/__pycache__/_re.cpython-312.pyc,,
setuptools/_vendor/tomli/__pycache__/_types.cpython-312.pyc,,
setuptools/_vendor/tomli/_parser.py,sha256=g9-ENaALS-B8dokYpCuzUFalWlog7T-SIYMjLZSWrtM,22633
setuptools/_vendor/tomli/_re.py,sha256=dbjg5ChZT23Ka9z9DHOXfdtSpPwUfdgMXnj8NOoly-w,2943
setuptools/_vendor/tomli/_types.py,sha256=-GTG2VUqkpxwMqzmVO4F7ybKddIbAnuAHXfmWQcTi3Q,254
setuptools/_vendor/tomli/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
setuptools/_vendor/typing_extensions.py,sha256=1uqi_RSlI7gos4eJB_NEV3d5wQwzTUQHd3_jrkbTo8Q,87149
setuptools/_vendor/zipp.py,sha256=ajztOH-9I7KA_4wqDYygtHa6xUBVZgFpmZ8FE74HHHI,8425
setuptools/archive_util.py,sha256=lRK7l7GkpLJeNqnESJWUfDre4q4wR9x6Z8WD3cIagXc,7331
setuptools/build_meta.py,sha256=6epxuXuX-3gon4tT3xV0Tl9ytWA08K8YoE-n34r3EaM,18670
setuptools/command/__init__.py,sha256=HZlSppOB8Vro73ffvP-xrORuMrh4GnVkOqJspFRG8Pg,396
setuptools/command/__pycache__/__init__.cpython-312.pyc,,
setuptools/command/__pycache__/_requirestxt.cpython-312.pyc,,
setuptools/command/__pycache__/alias.cpython-312.pyc,,
setuptools/command/__pycache__/bdist_egg.cpython-312.pyc,,
setuptools/command/__pycache__/bdist_rpm.cpython-312.pyc,,
setuptools/command/__pycache__/build.cpython-312.pyc,,
setuptools/command/__pycache__/build_clib.cpython-312.pyc,,
setuptools/command/__pycache__/build_ext.cpython-312.pyc,,
setuptools/command/__pycache__/build_py.cpython-312.pyc,,
setuptools/command/__pycache__/develop.cpython-312.pyc,,
setuptools/command/__pycache__/dist_info.cpython-312.pyc,,
setuptools/command/__pycache__/easy_install.cpython-312.pyc,,
setuptools/command/__pycache__/editable_wheel.cpython-312.pyc,,
setuptools/command/__pycache__/egg_info.cpython-312.pyc,,
setuptools/command/__pycache__/install.cpython-312.pyc,,
setuptools/command/__pycache__/install_egg_info.cpython-312.pyc,,
setuptools/command/__pycache__/install_lib.cpython-312.pyc,,
setuptools/command/__pycache__/install_scripts.cpython-312.pyc,,
setuptools/command/__pycache__/register.cpython-312.pyc,,
setuptools/command/__pycache__/rotate.cpython-312.pyc,,
setuptools/command/__pycache__/saveopts.cpython-312.pyc,,
setuptools/command/__pycache__/sdist.cpython-312.pyc,,
setuptools/command/__pycache__/setopt.cpython-312.pyc,,
setuptools/command/__pycache__/test.cpython-312.pyc,,
setuptools/command/__pycache__/upload.cpython-312.pyc,,
setuptools/command/__pycache__/upload_docs.cpython-312.pyc,,
setuptools/command/_requirestxt.py,sha256=GtSmJg4FyVaYj0FyAepSjVGBwCxKrNYKkRSBTxlb3qc,4207
setuptools/command/alias.py,sha256=1holrSsdYxp1Esoa2yfRHLjiYlCRi3jYZy2yWm62YVU,2383
setuptools/command/bdist_egg.py,sha256=Y_t_cgP-dicS4Fy6ZBZRsa_nrM0u27FyfO__B7M0oSg,16559
setuptools/command/bdist_rpm.py,sha256=9JLFlvVbcY-ilqbfJtDoDHU5dGQG2iPAWRWkD6T5pQQ,1309
setuptools/command/build.py,sha256=oRWmv6b8a21B3I5X2Fhbmu79w2hXKxtSZTzmNngyzr8,6784
setuptools/command/build_clib.py,sha256=0Ab0Kppziw4ng_51ODfQxF8HxU6ea89EEyBC8kWHtnc,4539
setuptools/command/build_ext.py,sha256=Xhmu6oSZtNyDqaRZIxGcq_mClH0Gx-_ptchHvOxe_a8,17504
setuptools/command/build_py.py,sha256=HZvesvkGTWfhHxM87IxSSENAOeHQDIdKpEzH5je_IC0,15127
setuptools/command/develop.py,sha256=lrh9pCZ5mK634qKhw09_CCR9U6KV14wc5sqM7vSsSWg,6709
setuptools/command/dist_info.py,sha256=ssw7ZmyonQFFfCzcJVxwYR-MbXN0PwB9b7S3XYnvW2E,3560
setuptools/command/easy_install.py,sha256=M_c9UoJmB9wK5EyRsZKwdNYth7Xu_RvXStQrso7JO60,86446
setuptools/command/editable_wheel.py,sha256=gyzLPL06C3fyxw2gFNrUjYsvAmb_rwI9rF-VKfT1rkg,33758
setuptools/command/egg_info.py,sha256=mu9emlfapWr66BKeA3198yPPSm3Ekjk2JmzLyt40-XA,26525
setuptools/command/install.py,sha256=MZBFeNiphOdVcw62El5cOmy76oS5LS_AwCRR-2eWRjw,5627
setuptools/command/install_egg_info.py,sha256=zpDDCmOJspfkEekUON7wU0ABFNW-0uXUZpzpHRYUdiI,2066
setuptools/command/install_lib.py,sha256=gUEW1ACrDcK_Mq7_RiF3YUlKA-9e-Tq9AcQs7KA-glk,3870
setuptools/command/install_scripts.py,sha256=n2toonBXHYFZcn2wkZ7eNl15c816kouMiNpNuTjIKSo,2359
setuptools/command/launcher manifest.xml,sha256=xlLbjWrB01tKC0-hlVkOKkiSPbzMml2eOPtJ_ucCnbE,628
setuptools/command/register.py,sha256=kk3DxXCb5lXTvqnhfwx2g6q7iwbUmgTyXUCaBooBOUk,468
setuptools/command/rotate.py,sha256=2z_6-q4mlnP8KK4E5I61wsFCjBnIAk8RhJxVLXDYGHg,2097
setuptools/command/saveopts.py,sha256=mVAPMRIGE98gl6eXQ3C2Wo-qPOgl9lbH-Q_YsbLuqeg,657
setuptools/command/sdist.py,sha256=b-SOjE6VSAO9b_vI6vbvN5P1vRIAjeFFaJ-n2Na3V3s,7085
setuptools/command/setopt.py,sha256=CTNgVkgm2yV9c1bO9wem86_M8X6TGyuEtitUjBzGwBc,4927
setuptools/command/test.py,sha256=y9YIFfW5TOpg6dES2UOy__QvJ7y-26pBifXzuIjhr6s,8101
setuptools/command/upload.py,sha256=XT3YFVfYPAmA5qhGg0euluU98ftxRUW-PzKcODMLxUs,462
setuptools/command/upload_docs.py,sha256=1MJd-TFDmilsGutLbjd9Nwu8-3OdxwHXIGRN4NTaa6U,7754
setuptools/config/__init__.py,sha256=HVZX0i-bM5lIfhej4Vck0o8ZM6W6w6MEXLqCXcC9lYI,1498
setuptools/config/__pycache__/__init__.cpython-312.pyc,,
setuptools/config/__pycache__/_apply_pyprojecttoml.cpython-312.pyc,,
setuptools/config/__pycache__/expand.cpython-312.pyc,,
setuptools/config/__pycache__/pyprojecttoml.cpython-312.pyc,,
setuptools/config/__pycache__/setupcfg.cpython-312.pyc,,
setuptools/config/_apply_pyprojecttoml.py,sha256=KeSFNXfyzaE-g6kkkj6gfEChE5_Iiwi1IOnaGKeL5Bo,14723
setuptools/config/_validate_pyproject/__init__.py,sha256=5YXPW1sabVn5jpZ25sUjeF6ij3_4odJiwUWi4nRD2Dc,1038
setuptools/config/_validate_pyproject/__pycache__/__init__.cpython-312.pyc,,
setuptools/config/_validate_pyproject/__pycache__/error_reporting.cpython-312.pyc,,
setuptools/config/_validate_pyproject/__pycache__/extra_validations.cpython-312.pyc,,
setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_exceptions.cpython-312.pyc,,
setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_validations.cpython-312.pyc,,
setuptools/config/_validate_pyproject/__pycache__/formats.cpython-312.pyc,,
setuptools/config/_validate_pyproject/error_reporting.py,sha256=vWiDs0hjlCBjZ_g4Xszsh97lIP9M4_JaLQ6MCQ26W9U,11266
setuptools/config/_validate_pyproject/extra_validations.py,sha256=wHzrgfdZUMRPBR1ke1lg5mhqRsBSbjEYOMsuFXQH9jY,1153
setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py,sha256=w749JgqKi8clBFcObdcbZVqsmF4oJ_QByhZ1SGbUFNw,1612
setuptools/config/_validate_pyproject/fastjsonschema_validations.py,sha256=YZrDSH0fbVZIeHkAaJD1MtYn19dYCOKlsAcEXuMgegg,274908
setuptools/config/_validate_pyproject/formats.py,sha256=-3f_VtIrcgY95yILC5-o-jh51Woj9Q0RhL3bmbOjJ-E,9160
setuptools/config/expand.py,sha256=mfWl4RD0VTaBwQ1uFVtQ0uAqEX9FVmi9SbhlqAar0Ew,16388
setuptools/config/pyprojecttoml.py,sha256=eLa78Pceomiu0rjAjEk0VXc6BGG44ena5woMoz5OZzM,17363
setuptools/config/setupcfg.py,sha256=z-jGHfDB9miMqSb0h_2CNpV4sVpde0-qjthXK64_p3Y,25531
setuptools/dep_util.py,sha256=gwvE8CrtOResUCFoGRSJYQPPM2-llLYf1iWyXPsgJ8E,659
setuptools/depends.py,sha256=-9Qf2bEhwVdP1ER12eX6yNhFn6-O2iDcfkB3jmfv1Qc,5582
setuptools/discovery.py,sha256=-PqkaOszc9o-7LTR1aqOL4SqiyAwbGdURKVlgHuHudg,21147
setuptools/dist.py,sha256=l1LlISqPKVvZpErHw-UKhGB6gdEwQlkne0qbBuE3GQg,37205
setuptools/errors.py,sha256=FS-3MTIzgv7ciswOrK71KMuEUcYh9kkWUYXd895Gbew,2669
setuptools/extension.py,sha256=jpsAdQvCBCkAuvmEXYI90TV4kNGO2Y13NqDr_PrvdhA,5591
setuptools/extern/__init__.py,sha256=Ym7fkCaybFYoPEZl0fFH4uZBjoMrl8rmOpC617v9EsA,2539
setuptools/extern/__pycache__/__init__.cpython-312.pyc,,
setuptools/glob.py,sha256=Ip2HBUIz5ma7Wo-S_a4XI6m2-N4vDRgfJxtytV13VUE,4868
setuptools/installer.py,sha256=IMw5qVCEC4Ojyin8v_ql-TZJkCjf10UOIB-SBcPSPvU,4989
setuptools/launch.py,sha256=TyPT-Ic1T2EnYvGO26gfNRP4ysBlrhpbRjQxWsiO414,812
setuptools/logging.py,sha256=JA7DVtLlC3gskysgtORtm9-4UWh9kWr9FjbXbdQsIRo,1239
setuptools/modified.py,sha256=lDbr7ds0ZpxYN8i8b4DmwuGJhDED5QmvQKEd49gZbAY,190
setuptools/monkey.py,sha256=6HfgWEXISdHhWVhdZS5AEn-6gwxXMcZacJm3ctLfPiM,4783
setuptools/msvc.py,sha256=TxPIGbwWWYUE-Y8lwb3V7zEcUfD0xcVNa6-WPvqItP4,47422
setuptools/namespaces.py,sha256=epZT2G6fiQV6l0H--xfm2_s8EOz9H9xv2ceQoAyX2Z4,3073
setuptools/package_index.py,sha256=Fn9FiACuaNptgFllv0w8SgtZjPrkEPiC4ZOYczhY668,38345
setuptools/py312compat.py,sha256=6qfRL57v2DWBBQdqv-w_T70KxK0iowZiCLVhESfj36Y,330
setuptools/sandbox.py,sha256=Xhj-2948bZhytdV_pJDMXAgV7Vg1lBC_7mcYb4DOwRI,14349
setuptools/script (dev).tmpl,sha256=RUzQzCQUaXtwdLtYHWYbIQmOaES5Brqq1FvUA_tu-5I,218
setuptools/script.tmpl,sha256=WGTt5piezO27c-Dbx6l5Q4T3Ff20A5z7872hv3aAhYY,138
setuptools/unicode_utils.py,sha256=aOOFo4JGwAsiBttGYDsqFS7YqWQeZ2j6DWiCuctR_00,941
setuptools/version.py,sha256=WJCeUuyq74Aok2TeK9-OexZOu8XrlQy7-y0BEuWNovQ,161
setuptools/warnings.py,sha256=e-R_k8T3HYIC2DScA4nzjcwigsXF8rn2lCsp3KUrYAo,3697
setuptools/wheel.py,sha256=NoYuHzbajNGm9n_Jma4q6-s0yjjgUr6UaOArBSUvCLM,8628
setuptools/windows_support.py,sha256=0qLEFTYEBly5quTV1EciqKwrvS4ZtU4oHWP0Z3-BOYI,720
python3.12/site-packages/setuptools-69.0.2.dist-info/top_level.txt000064400000000051151732704240020512 0ustar00_distutils_hack
pkg_resources
setuptools
python3.12/site-packages/setuptools-69.0.2.dist-info/WHEEL000064400000000134151732704240016551 0ustar00Wheel-Version: 1.0
Generator: bdist_wheel (0.42.0)
Root-Is-Purelib: true
Tag: py3-none-any

python3.12/site-packages/setuptools-69.0.2.dist-info/direct_url.json000064400000000440151732704240021011 0ustar00{"archive_info": {"hash": "sha256=56c822c4583a2e2be6b2b993fc05cebbbb4e5135ae3291335e6c429fb809293b", "hashes": {"sha256": "56c822c4583a2e2be6b2b993fc05cebbbb4e5135ae3291335e6c429fb809293b"}}, "url": "file:///builddir/build/BUILD/setuptools-69.0.2/dist/setuptools-69.0.2-py3-none-any.whl"}python3.12/site-packages/setuptools-69.0.2.dist-info/REQUESTED000064400000000000151732704240017236 0ustar00python3.12/site-packages/distutils-precedence.pth000064400000000227151732704240015753 0ustar00import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get(var, 'local') == 'local'; enabled and __import__('_distutils_hack').add_shim(); 
python3.3/site-packages/_markerlib/markers.py000064400000007613151733566730015205 0ustar00# -*- coding: utf-8 -*-
"""Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
"""

__all__ = ['default_environment', 'compile', 'interpret']

import ast
import os
import platform
import sys
import weakref

_builtin_compile = compile

try:
    from platform import python_implementation
except ImportError:
    if os.name == "java":
        # Jython 2.5 has ast module, but not platform.python_implementation() function.
        def python_implementation():
            return "Jython"
    else:
        raise


# restricted set of variables
_VARS = {'sys.platform': sys.platform,
         'python_version': '%s.%s' % sys.version_info[:2],
         # FIXME parsing sys.platform is not reliable, but there is no other
         # way to get e.g. 2.7.2+, and the PEP is defined with sys.version
         'python_full_version': sys.version.split(' ', 1)[0],
         'os.name': os.name,
         'platform.version': platform.version(),
         'platform.machine': platform.machine(),
         'platform.python_implementation': python_implementation(),
         'extra': None # wheel extension
        }

for var in list(_VARS.keys()):
    if '.' in var:
        _VARS[var.replace('.', '_')] = _VARS[var]

def default_environment():
    """Return copy of default PEP 385 globals dictionary."""
    return dict(_VARS)

class ASTWhitelist(ast.NodeTransformer):
    def __init__(self, statement):
        self.statement = statement # for error messages

    ALLOWED = (ast.Compare, ast.BoolOp, ast.Attribute, ast.Name, ast.Load, ast.Str)
    # Bool operations
    ALLOWED += (ast.And, ast.Or)
    # Comparison operations
    ALLOWED += (ast.Eq, ast.Gt, ast.GtE, ast.In, ast.Is, ast.IsNot, ast.Lt, ast.LtE, ast.NotEq, ast.NotIn)

    def visit(self, node):
        """Ensure statement only contains allowed nodes."""
        if not isinstance(node, self.ALLOWED):
            raise SyntaxError('Not allowed in environment markers.\n%s\n%s' %
                               (self.statement,
                               (' ' * node.col_offset) + '^'))
        return ast.NodeTransformer.visit(self, node)

    def visit_Attribute(self, node):
        """Flatten one level of attribute access."""
        new_node = ast.Name("%s.%s" % (node.value.id, node.attr), node.ctx)
        return ast.copy_location(new_node, node)

def parse_marker(marker):
    tree = ast.parse(marker, mode='eval')
    new_tree = ASTWhitelist(marker).generic_visit(tree)
    return new_tree

def compile_marker(parsed_marker):
    return _builtin_compile(parsed_marker, '<environment marker>', 'eval',
                   dont_inherit=True)

_cache = weakref.WeakValueDictionary()

def compile(marker):
    """Return compiled marker as a function accepting an environment dict."""
    try:
        return _cache[marker]
    except KeyError:
        pass
    if not marker.strip():
        def marker_fn(environment=None, override=None):
            """"""
            return True
    else:
        compiled_marker = compile_marker(parse_marker(marker))
        def marker_fn(environment=None, override=None):
            """override updates environment"""
            if override is None:
                override = {}
            if environment is None:
                environment = default_environment()
            environment.update(override)
            return eval(compiled_marker, environment)
    marker_fn.__doc__ = marker
    _cache[marker] = marker_fn
    return _cache[marker]

def interpret(marker, environment=None):
    return compile(marker)(environment)
python3.3/site-packages/_markerlib/__pycache__/__init__.cpython-33.pyc000064400000002412151733566730021551 0ustar00�
�Re(c@s�y,ddlZddlmZmZmZWnQek
rde�krQ�ndd�Zdd�Zdddd	�ZYnXdS(
iN(udefault_environmentucompileu	interpretuastcCsiS(N((((u,/tmp/pip-k8wh6o-build/_markerlib/__init__.pyudefault_environmentsudefault_environmentcs%dd�fdd�}�|_|S(Ncs�j�S(N(ustrip(uenvironmentuoverride(umarker(u,/tmp/pip-k8wh6o-build/_markerlib/__init__.pyu	marker_fn
sucompile.<locals>.marker_fn(uNoneu__doc__(umarkeru	marker_fn((umarkeru,/tmp/pip-k8wh6o-build/_markerlib/__init__.pyucompile	s	ucompilecCs
t|��S(N(ucompile(umarkeruenvironmentuoverride((u,/tmp/pip-k8wh6o-build/_markerlib/__init__.pyu	interpretsu	interpret(uastu_markerlib.markersudefault_environmentucompileu	interpretuImportErroruglobalsuNone(((u,/tmp/pip-k8wh6o-build/_markerlib/__init__.pyu<module>s 
python3.3/site-packages/_markerlib/__pycache__/markers.cpython-33.pyc000064400000013114151733566740021460 0ustar00�
�Re�c@s�dZdddgZddlZddlZddlZddlZddlZeZyddlm	Z	Wn3e
k
r�ejdkr�dd	�Z	n�YnXiejd
6dejdd�d
6ej
jdd�dd6ejd6ej
�d6ej�d6e	�d6dd6ZxCeej��D]/Zdekr+eeeejdd�<q+q+Wdd�ZGdd�dej�Zdd�Zdd�Zej�Zdd�Zdd d�ZdS(!u�Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
udefault_environmentucompileu	interpretiN(upython_implementationujavacCsdS(NuJython((((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyupython_implementation!supython_implementationusys.platformu%s.%siupython_versionu iupython_full_versionuos.nameuplatform.versionuplatform.machineuplatform.python_implementationuextrau.u_cCs
tt�S(u2Return copy of default PEP 385 globals dictionary.(udictu_VARS(((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyudefault_environment8scBs�|EeZdZdd�Zejejejejej	ej
fZeejej
f7Zeejejejejejejejejejejf
7Zdd�Zdd�ZdS(uASTWhitelistcCs
||_dS(N(u	statement(uselfu	statement((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu__init__=suASTWhitelist.__init__cCsLt||j�s9td|jd|jdf��ntjj||�S(u-Ensure statement only contains allowed nodes.u)Not allowed in environment markers.
%s
%su u^(u
isinstanceuALLOWEDuSyntaxErroru	statementu
col_offsetuastuNodeTransformeruvisit(uselfunode((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyuvisitFs
uASTWhitelist.visitcCs8tjd|jj|jf|j�}tj||�S(u&Flatten one level of attribute access.u%s.%s(uastuNameuvalueuiduattructxu
copy_location(uselfunodeunew_node((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyuvisit_AttributeNs(uASTWhitelist.visit_AttributeN(u__name__u
__module__u__qualname__u__init__uastuCompareuBoolOpu	AttributeuNameuLoaduStruALLOWEDuAnduOruEquGtuGtEuInuIsuIsNotuLtuLtEuNotEquNotInuvisituvisit_Attribute(u
__locals__((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyuASTWhitelist<s*FuASTWhitelistcCs.tj|dd�}t|�j|�}|S(Numodeueval(uastuparseuASTWhitelistu
generic_visit(umarkerutreeunew_tree((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyuparse_markerSsuparse_markercCst|dddd�S(Nu<environment marker>uevaludont_inheritT(u_builtin_compileuTrue(u
parsed_marker((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyucompile_markerXsucompile_markerc
s�yt|SWntk
r YnX|j�sBdddd�}n*tt|���dd�fdd�}||_|t|<t|S(uCReturn compiled marker as a function accepting an environment dict.cSsdS(uT(uTrue(uenvironmentuoverride((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu	marker_fnesucompile.<locals>.marker_fncsG|dkri}n|dkr-t�}n|j|�t�|�S(uoverride updates environmentN(uNoneudefault_environmentuupdateueval(uenvironmentuoverride(ucompiled_marker(u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu	marker_fnjs	
N(u_cacheuKeyErrorustripuNoneucompile_markeruparse_markeru__doc__(umarkeru	marker_fn((ucompiled_markeru+/tmp/pip-k8wh6o-build/_markerlib/markers.pyucompile^s
	
cCst|�|�S(N(ucompile(umarkeruenvironment((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu	interpretvs(u__doc__u__all__uastuosuplatformusysuweakrefucompileu_builtin_compileupython_implementationuImportErrorunameuversion_infouversionusplitumachineuNoneu_VARSulistukeysuvarureplaceudefault_environmentuNodeTransformeruASTWhitelistuparse_markerucompile_markeruWeakValueDictionaryu_cacheu	interpret(((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu<module>s>






!python3.3/site-packages/_markerlib/__init__.py000064400000001050151733566740015266 0ustar00try:
    import ast
    from _markerlib.markers import default_environment, compile, interpret
except ImportError:
    if 'ast' in globals():
        raise
    def default_environment():
        return {}
    def compile(marker):
        def marker_fn(environment=None, override=None):
            # 'empty markers are True' heuristic won't install extra deps.
            return not marker.strip()
        marker_fn.__doc__ = marker
        return marker_fn
    def interpret(marker, environment=None, override=None):
        return compile(marker)()
python3.3/site-packages/__pycache__/easy_install.cpython-33.pyc000064400000000474151733566740020401 0ustar00�
�Re~c@s0dZedkr,ddlmZe�ndS(uRun the EasyInstall commandu__main__i(umainN(u__doc__u__name__usetuptools.command.easy_installumain(((u%/tmp/pip-k8wh6o-build/easy_install.pyu<module>spython3.3/site-packages/__pycache__/pkg_resources.cpython-33.pyc000064400000377111151733566740020572 0ustar00�
�Re_�cn@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlmZyddl
m
Z
mZWn(ek
r�ddlm
Z
mZYnXyeWn"ek
rddlmZYnXy$edd�ZddlmZWn:ek
rleZdd	lmZeed
d�ZYnXddlmZy&dd
lmZm Z m!Z!e"Z#Wnek
r�e$Z#YnXddlm%Z&ddl'm(Z(m)Z)ej*ddfkoej+j,dkrddl-j.Z/neZ/yddl0Z0Wnek
rGYnXddd�Z1iZ2dd�Z3dd�Z4dd�Z5dd�Z6dd�Z7dd �Z8d!d"�Z9d#d�Z:Z;d$d%�Z<d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjgEZ=GdkdA�dAe>�Z?GdldB�dBe?�Z@GdmdC�dCe?�ZAGdndD�dDe?�ZBiZCejDdd�ZEdZFdoZGdpZHdZIdpZJdqdf�ZKdrd(�ZLgdsdt�ZMdudv�ZNdwdx�ZOejPdy�ZQejPdz�ZReOZSd{dK�ZTd|d'�ZUeUZVd}d)�ZWd~d*�ZXedd+�ZYd�d,�ZZGd�dY�dY�Z[Gd�dZ�dZe[�Z\Gd�d<�d<e]�Z^Gd�d;�d;e]�Z_e_Z`Gd�dE�dEea�ZbGd�d=�d=�Zcd�d:�Zdd�dH�Zed�dI�Zfd�dN�Zgd�dO�Zhid�gd�6d�gd�6d�d�d�gd�6gd�6gd�6gd�6Ziid�d�d�6d�d�d�6d�d�d�6d�d�d�6d�d�d�6d�d�d�6d�d�d�6Zjd�d��Zkd�d��Zld�d��Zmd�dP�Zneid�dQ�Zod�d��Zpd�eq�kr�epZonGd�d`�d`�ZreKe]er�Gd�da�daer�ZsGd�db�dbes�ZteKeue�et�e/ek	r*eKe/jvet�nGd�d^�d^er�Zwew�Zxd�d��ZyGd�dc�dces�ZzeKej{ez�Gd�d[�d[ew�Z|Gd�d\�d\et�Z}Gd�d]�d]ez�Z~e3d�d�i�d�dd�Ze$d�d7�Z�e$d�d��Z�eej{e��e$d�d��Z�ee]e��e$d�d��Z�eej�e��e/ek	raee/j�e��ne3d�d�i�e3d�d�i�d�de�Z�d�d��Z�d�d4�Z�ed�dg�Z�d�d��Z�e�ej�e��e�ej{e��e/ek	r�e�e/j�e��nd�d��Z�e�e]e��d�dS�Z�id�d��Z�d�d��Z�d�dL�Z�ejPd��j�Z�ejPd��j�Z�ejPd��j�Z�ejPd��j�Z�ejPd��j�Z�ejPd��j�Z�ejPd��j�Z�ejPd��j�Z�ejPd�ej�ej�B�j�Z�ejPd�ej��Z�id�d�6d�d�6d�d�6d�d�6d�d�6j�Z�d�d��Z�d�dG�Z�Gd�d@�d@e]�Z�d�d��Z�Gd�d>�d>e]�Z�Gd�d��d�e��Z�ie�d�6e�d�6e�d�6Z�d�d��Z�d�dF�Z�d�d��Z�Gd�d?�d?�Z�id�d�6d�d�6d�d�6d�d�6d�d�6d�d6Z�dd�Z�dd�Z�ddR�Z�ddM�Z�dd�Z�ec�Z�d	d
�Z�e�eq��e3dd5e^��yddl�m�Z�Wnek
r�Yn�Xye�j�e��Wn�e@k
rje^g�Z�x0e�j�e�e��e_��D]Z�e�j�e��qWx0ej�D]%Z�e�e�j�krLe�j�e��nq'We�j�ej�dd�<YnXe�j�Z�e�j�Z�e�j�Z�e�jUZUeUZVe�d
d��ge�_�e�e�e�j�ej���dS(uYPackage resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
iN(uget_importer(uurlparseu
urlunparse(uImmutableSetcCs
|j�S(N(unext(uo((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>(su<lambda>(uStringIO(uBytesIOcCsY|dkrt�}n|dkr-|}nttt|�j�|d�||�dS(Nuexec(uNoneuglobalsuexecucompileuopenuread(ufnuglobsulocs((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuexecfile-s
	uexecfile(uutime(umkdirurenameuunlink(uopen(uisdirusplitiucpythoni�cCs^tstd��nt|�\}}|rZ|rZt|�rZt|�t||�ndS(Nu*"os.mkdir" not supported on this platform.(u
WRITE_SUPPORTuIOErrorusplituisdiru_bypass_ensure_directoryumkdir(unameumodeudirnameufilename((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_bypass_ensure_directoryKs
u_bypass_ensure_directorycKs>t�}x.|j�D] \}}|||<|t|<qWdS(N(uglobalsuitemsu_state_vars(uvartypeukwugunameuval((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_declare_stateWs	
u_declare_statecCsLi}t�}x6tj�D](\}}|d|||�||<qW|S(Nu_sget_(uglobalsu_state_varsuitems(ustateugukuv((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__getstate__]s
	 u__getstate__cCsJt�}x:|j�D],\}}|dt|||||�qW|S(Nu_sset_(uglobalsuitemsu_state_vars(ustateugukuv((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__setstate__ds	$u__setstate__cCs
|j�S(N(ucopy(uval((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_sget_dictjsu
_sget_dictcCs|j�|j|�dS(N(uclearuupdate(ukeyuobustate((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_sset_dictms
u
_sset_dictcCs
|j�S(N(u__getstate__(uval((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_sget_objectqsu_sget_objectcCs|j|�dS(N(u__setstate__(ukeyuobustate((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_sset_objecttsu_sset_objectcGsdS(N(uNone(uargs((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>wscCs�t�}tj|�}|dk	r~tjdkr~y3ddjt�dd��|jd�f}Wq~t	k
rzYq~Xn|S(uZReturn this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    udarwinumacosx-%s-%su.Nii(
uget_build_platformumacosVersionStringumatchuNoneusysuplatformujoinu_macosx_versugroupu
ValueError(uplatum((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_supported_platformzs
	3
uget_supported_platformurequireu
run_scriptuget_provideruget_distributionuload_entry_pointu
get_entry_mapuget_entry_infouiter_entry_pointsuresource_stringuresource_streamuresource_filenameuresource_listdiruresource_existsuresource_isdirudeclare_namespaceuworking_setuadd_activation_listenerufind_distributionsuset_extraction_pathucleanup_resourcesuget_default_cacheuEnvironmentu
WorkingSetuResourceManageruDistributionuRequirementu
EntryPointuResolutionErroruVersionConflictuDistributionNotFounduUnknownExtrauExtractionErroruparse_requirementsu
parse_versionu	safe_nameusafe_versionuget_platformucompatible_platformsuyield_linesusplit_sectionsu
safe_extrauto_filenameuinvalid_markeruevaluate_markeruensure_directoryunormalize_pathuEGG_DISTuBINARY_DISTuSOURCE_DISTu
CHECKOUT_DISTuDEVELOP_DISTuIMetadataProvideruIResourceProvideruFileMetadatauPathMetadatauEggMetadatau
EmptyProvideruempty_provideruNullProvideruEggProvideruDefaultProvideruZipProvideruregister_finderuregister_namespace_handleruregister_loader_typeufixup_namespace_packagesuget_importerurun_mainuAvailableDistributionscBs&|EeZdZdZdd�ZdS(uResolutionErroru.Abstract base for dependency resolution errorscCs|jjt|j�S(N(u	__class__u__name__urepruargs(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__repr__�suResolutionError.__repr__N(u__name__u
__module__u__qualname__u__doc__u__repr__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuResolutionError�scBs|EeZdZdZdS(uVersionConflictuAAn already-installed version conflicts with the requested versionN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuVersionConflict�scBs|EeZdZdZdS(uDistributionNotFoundu&A requested distribution was not foundN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuDistributionNotFound�scBs|EeZdZdZdS(uUnknownExtrau>Distribution doesn't have an "extra feature" of the given nameN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuUnknownExtra�siicCs|t|<dS(uRegister `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    N(u_provider_factories(uloader_typeuprovider_factory((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuregister_loader_type�sc
Cs�t|t�r2tj|�p1tt|��dSytj|}Wn)tk
rnt	|�tj|}YnXt
|dd�}tt
|�|�S(u?Return an IResourceProvider for the named module or requirementiu
__loader__N(u
isinstanceuRequirementuworking_setufindurequireustrusysumodulesuKeyErroru
__import__ugetattruNoneu
_find_adapteru_provider_factories(umoduleOrRequmoduleuloader((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_provider�s#

cCs�|s�ddl}|j�d}|dkr�ddl}d}tjj|�r�t|d�r�|j|�}d|kr�|d}q�q�q�n|j|j	d��n|dS(Niuu0/System/Library/CoreServices/SystemVersion.plistu	readPlistuProductVersionu.(
uplatformumac_veruplistlibuosupathuexistsuhasattru	readPlistuappendusplit(u_cacheuplatformuversionuplistlibuplistu
plist_content((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_macosx_vers�su_macosx_verscCsidd6dd6j||�S(NuppcuPowerPCuPower_Macintosh(uget(umachine((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_macosx_arch�su_macosx_archcCs�yddlm}Wn"tk
r8ddlm}YnX|�}tjdkr�|jd�r�yTt�}tj	�dj
dd�}dt|d�t|d	�t|�fSWq�t
k
r�Yq�Xn|S(
u�Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    i(uget_platformudarwinumacosx-iu u_umacosx-%d.%d-%si(u	sysconfiguget_platformuImportErrorudistutils.utilusysuplatformu
startswithu_macosx_versuosuunameureplaceuintu_macosx_archu
ValueError(uget_platformuplatuversionumachine((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_build_platform�s
		
uget_build_platformumacosx-(\d+)\.(\d+)-(.*)udarwin-(\d+)\.(\d+)\.(\d+)-(.*)c
CsO|d	ks$|d	ks$||kr(d
Stj|�}|rKtj|�}|s�tj|�}|r�t|jd��}d|jd�|jd�f}|dkr�|dks�|dkr�|dkr�d
SndS|jd�|jd�ks|jd�|jd�krdSt|jd��t|jd��krGdSd
SdS(u�Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    iu%s.%siiu10.3iu10.4iNTF(uNoneuTrueumacosVersionStringumatchudarwinVersionStringuintugroupuFalse(uprovidedurequiredureqMacuprovMacu
provDarwinudversionumacosversion((u&/tmp/pip-k8wh6o-build/pkg_resources.pyucompatible_platformss*$"*cCsNtjd�j}|d}|j�||d<t|�dj||�dS(u@Locate distribution `dist_spec` and run its `script_name` scriptiu__name__iN(usysu	_getframeu	f_globalsuclearurequireu
run_script(u	dist_specuscript_nameunsuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
run_scriptHs



cCsdt|t�r!tj|�}nt|t�r?t|�}nt|t�s`td|��n|S(u@Return a current distribution object for a Requirement or stringu-Expected string, Requirement, or Distribution(u
isinstanceu
basestringuRequirementuparseuget_provideruDistributionu	TypeError(udist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_distributionRscCst|�j||�S(uDReturn `name` entry point of `group` for `dist` or raise ImportError(uget_distributionuload_entry_point(udistugroupuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuload_entry_pointZscCst|�j|�S(u=Return the entry point map for `group`, or the full entry map(uget_distributionu
get_entry_map(udistugroup((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
get_entry_map^scCst|�j||�S(u<Return the EntryPoint object for `group`+`name`, or ``None``(uget_distributionuget_entry_info(udistugroupuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_entry_infobscBs\|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S(uIMetadataProvidercCsdS(u;Does the package's distribution contain the named metadata?N((uname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuhas_metadataisuIMetadataProvider.has_metadatacCsdS(u'The named metadata resource as a stringN((uname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_metadatalsuIMetadataProvider.get_metadatacCsdS(u�Yield named metadata resource as list of non-blank non-comment lines

       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted.N((uname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_metadata_linesosu$IMetadataProvider.get_metadata_linescCsdS(u>Is the named metadata a directory?  (like ``os.path.isdir()``)N((uname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyumetadata_isdirusu IMetadataProvider.metadata_isdircCsdS(u?List of metadata names in the directory (like ``os.listdir()``)N((uname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyumetadata_listdirxsu"IMetadataProvider.metadata_listdircCsdS(u=Execute the named script in the supplied namespace dictionaryN((uscript_nameu	namespace((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
run_script{suIMetadataProvider.run_scriptN(	u__name__u
__module__u__qualname__uhas_metadatauget_metadatauget_metadata_linesumetadata_isdirumetadata_listdiru
run_script(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuIMetadataProvidergscBsb|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS(uIResourceProvideru3An object that provides access to package resourcescCsdS(udReturn a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``N((umanageru
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_resource_filename�su'IResourceProvider.get_resource_filenamecCsdS(uiReturn a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``N((umanageru
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_resource_stream�su%IResourceProvider.get_resource_streamcCsdS(umReturn a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``N((umanageru
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_resource_string�su%IResourceProvider.get_resource_stringcCsdS(u,Does the package contain the named resource?N((u
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuhas_resource�suIResourceProvider.has_resourcecCsdS(u>Is the named resource a directory?  (like ``os.path.isdir()``)N((u
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_isdir�su IResourceProvider.resource_isdircCsdS(u?List of resource names in the directory (like ``os.listdir()``)N((u
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_listdir�su"IResourceProvider.resource_listdirN(
u__name__u
__module__u__qualname__u__doc__uget_resource_filenameuget_resource_streamuget_resource_stringuhas_resourceuresource_isdiruresource_listdir(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuIResourceProviderscBs�|EeZdZdZd dd�Zdd�Zdd�Zdd	�Zd d
d�Z	dd
�Z
dd�Zd d!dd�Z
d d dd�Zd d d!dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd S("u
WorkingSetuDA collection of active distributions on sys.path (or a similar list)cCs^g|_i|_i|_g|_|dkr<tj}nx|D]}|j|�qCWdS(u?Create working set from list of path entries (default=sys.path)N(uentriesu
entry_keysuby_keyu	callbacksuNoneusysupathu	add_entry(uselfuentriesuentry((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__�s				
uWorkingSet.__init__cCsT|jj|g�|jj|�x*t|d�D]}|j||d�q3WdS(u�Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        NTF(u
entry_keysu
setdefaultuentriesuappendufind_distributionsuTrueuadduFalse(uselfuentryudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu	add_entry�s
uWorkingSet.add_entrycCs|jj|j�|kS(u9True if `dist` is the active distribution for its project(uby_keyugetukey(uselfudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__contains__�suWorkingSet.__contains__cCsG|jj|j�}|dk	r?||kr?t||��n|SdS(u�Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        N(uby_keyugetukeyuNoneuVersionConflict(uselfurequdist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyufind�s
uWorkingSet.findccsgx`|D]X}|j|�}|dkrGx4|j�D]}|Vq5Wq||kr||VqqWdS(uYield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        N(u
get_entry_mapuNoneuvalues(uselfugroupunameudistuentriesuep((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuiter_entry_points�s
uWorkingSet.iter_entry_pointscCsQtjd�j}|d}|j�||d<|j|�dj||�dS(u?Locate distribution for `requires` and run `script_name` scriptiu__name__iN(usysu	_getframeu	f_globalsuclearurequireu
run_script(uselfurequiresuscript_nameunsuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
run_script�s



uWorkingSet.run_scriptccspi}xc|jD]X}||jkr+qnx:|j|D]+}||kr9d||<|j|Vq9q9WqWdS(u�Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        iN(uentriesu
entry_keysuby_key(uselfuseenuitemukey((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__iter__�s
uWorkingSet.__iter__cCs�|r|j|j|�n|dkr4|j}n|jj|g�}|jj|jg�}|j|jkrwdS||j|j<|j|kr�|j|j�n|j|kr�|j|j�n|j	|�dS(u�Add `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set.  If it's added, any
        callbacks registered with the ``subscribe()`` method will be called.
        N(
u	insert_onuentriesuNoneulocationu
entry_keysu
setdefaultukeyuby_keyuappendu
_added_new(uselfudistuentryuinsertukeysukeys2((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuadd�suWorkingSet.addc	CsVt|�ddd�}i}i}g}x$|rQ|jd�}||krUq.n|j|j�}|dkr|jj|j�}|dkr�|dkr�t|j�}n|j|||�}||j<|dkr�t	|��q�n|j
|�n||krt||��n|j|j
|j�ddd��d||<q.W|S(uList all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
        Niii����i����T(ulistupopugetukeyuNoneuby_keyuEnvironmentuentriesu
best_matchuDistributionNotFounduappenduVersionConflictuextendurequiresuextrasuTrue(	uselfurequirementsuenvu	installeru	processedubestuto_activateurequdist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresolves.	 &uWorkingSet.resolvecCsPt|�}|j�i}i}|dkrJt|j�}||7}n
||}|jg�}	tt|	j|��x�|D]�}
x�||
D]�}|j�g}y|	j	|||�}
Wn9t
k
r�tj�d}|||<|r�w�nPYq�Xtt|	j|
��|j
tj|
��Pq�Wq�Wt|�}|j�||fS(ubFind all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            map(working_set.add, distributions)  # add plugins+libs to sys.path
            print 'Could not load', errors        # display errors

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        iN(ulistusortuNoneuEnvironmentuentriesu	__class__umapuadduas_requirementuresolveuResolutionErrorusysuexc_infouupdateudictufromkeys(uselfu
plugin_envufull_envu	installerufallbackuplugin_projectsu
error_infou
distributionsuenvu
shadow_setuproject_nameudisturequ	resolveesuv((u&/tmp/pip-k8wh6o-build/pkg_resources.pyufind_pluginsAs6"





	
uWorkingSet.find_pluginscGs7|jt|��}x|D]}|j|�qW|S(u�Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        (uresolveuparse_requirementsuadd(uselfurequirementsuneededudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyurequire�s	
uWorkingSet.requirecCsB||jkrdS|jj|�x|D]}||�q*WdS(uAInvoke `callback` for all distributions (including existing ones)N(u	callbacksuappend(uselfucallbackudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu	subscribe�s

uWorkingSet.subscribecCs"x|jD]}||�q
WdS(N(u	callbacks(uselfudistucallback((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_added_new�suWorkingSet._added_newcCs<|jdd�|jj�|jj�|jdd�fS(N(uentriesu
entry_keysucopyuby_keyu	callbacks(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__getstate__�s(uWorkingSet.__getstate__cCsZ|\}}}}|dd�|_|j�|_|j�|_|dd�|_dS(N(uentriesucopyu
entry_keysuby_keyu	callbacks(uselfue_k_b_cuentriesukeysuby_keyu	callbacks((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__setstate__�s
uWorkingSet.__setstate__NT(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u	add_entryu__contains__ufinduiter_entry_pointsu
run_scriptu__iter__uTrueuadduresolveufind_pluginsurequireu	subscribeu
_added_newu__getstate__u__setstate__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
WorkingSet�s"
/McBs�|EeZdZdZde�edd�Zdd�Zdd�Z	ddd	�Z
d
d�Zdd
�Zddd�Z
ddd�Zdd�Zdd�Zdd�ZdS(uEnvironmentu5Searchable snapshot of distributions on a search pathcCs5i|_i|_||_||_|j|�dS(u!Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.3'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        N(u_distmapu_cacheuplatformupythonuscan(uselfusearch_pathuplatformupython((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__�s
				uEnvironment.__init__cCsC|jdks0|jdks0|j|jkoBt|j|j�S(u�Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        N(upythonuNoneu
py_versionucompatible_platformsuplatform(uselfudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyucan_add�suEnvironment.can_addcCs|j|jj|�dS(u"Remove `dist` from the environmentN(u_distmapukeyuremove(uselfudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuremove�suEnvironment.removecCsQ|dkrtj}nx2|D]*}x!t|�D]}|j|�q2WqWdS(udScan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        N(uNoneusysupathufind_distributionsuadd(uselfusearch_pathuitemudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuscan�s

uEnvironment.scancCs�y|j|SWn1tk
rB|j�}||jkr>gSYnX||jkrw|j|}|j|<t|�n|j|S(uKReturn a newest-to-oldest list of distributions for `project_name`
        (u_cacheuKeyErroruloweru_distmapu_sort_dists(uselfuproject_nameudists((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__getitem__�s
	
uEnvironment.__getitem__cCs|j|�r{|j�r{|jj|jg�}||kr{|j|�|j|jkrxt|j|j�qxq{ndS(u<Add `dist` if we ``can_add()`` it and it isn't already addedN(ucan_adduhas_versionu_distmapu
setdefaultukeyuappendu_cacheu_sort_dists(uselfudistudists((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuadds
uEnvironment.addcCsW|j|�}|dk	r|Sx%||jD]}||kr-|Sq-W|j||�S(u�Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        N(ufinduNoneukeyuobtain(uselfurequworking_setu	installerudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
best_match
s
uEnvironment.best_matchcCs|dk	r||�SdS(u�Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument.N(uNone(uselfurequirementu	installer((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuobtains	uEnvironment.obtainccs0x)|jj�D]}||r|VqqWdS(u=Yield the unique project names of the available distributionsN(u_distmapukeys(uselfukey((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__iter__+s
uEnvironment.__iter__cCs{t|t�r|j|�nXt|t�rdxF|D](}x||D]}|j|�qFWq5Wntd|f��|S(u2In-place addition of a distribution or environmentuCan't add %r to environment(u
isinstanceuDistributionuadduEnvironmentu	TypeError(uselfuotheruprojectudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__iadd__0s
uEnvironment.__iadd__cCs@|jgdddd�}x||fD]}||7}q(W|S(u4Add an environment or distribution to an environmentuplatformupythonN(u	__class__uNone(uselfuotherunewuenv((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__add__<suEnvironment.__add__N(u__name__u
__module__u__qualname__u__doc__uNoneuget_supported_platformuPY_MAJORu__init__ucan_adduremoveuscanu__getitem__uaddu
best_matchuobtainu__iter__u__iadd__u__add__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuEnvironment�s	cBs|EeZdZdZdS(uExtractionErroruTAn error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuExtractionErrorGs
cBs�|EeZdZdZdZdd�Zdd�Zdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
fdd�Zedd��Zdd�Zdd�Zddd�ZdS(uResourceManageru'Manage resource extraction and packagescCs
i|_dS(N(ucached_files(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__[suResourceManager.__init__cCst|�j|�S(uDoes the named resource exist?(uget_provideruhas_resource(uselfupackage_or_requirementu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_exists^suResourceManager.resource_existscCst|�j|�S(u,Is the named resource an existing directory?(uget_provideruresource_isdir(uselfupackage_or_requirementu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_isdirbsuResourceManager.resource_isdircCst|�j||�S(u4Return a true filesystem path for specified resource(uget_provideruget_resource_filename(uselfupackage_or_requirementu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_filenamehsu!ResourceManager.resource_filenamecCst|�j||�S(u9Return a readable file-like object for specified resource(uget_provideruget_resource_stream(uselfupackage_or_requirementu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_streamnsuResourceManager.resource_streamcCst|�j||�S(u%Return specified resource as a string(uget_provideruget_resource_string(uselfupackage_or_requirementu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_stringtsuResourceManager.resource_stringcCst|�j|�S(u1List the contents of the named resource directory(uget_provideruresource_listdir(uselfupackage_or_requirementu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_listdirzsu ResourceManager.resource_listdircCs]tj�d}|jpt�}td||f�}||_||_||_|�dS(u5Give an error message for problems extracting file(s)iu}Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  %s

The Python egg cache directory is currently set to:

  %s

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
N(usysuexc_infouextraction_pathuget_default_cacheuExtractionErrorumanageru
cache_pathuoriginal_error(uselfuold_excu
cache_pathuerr((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuextraction_error�s			u ResourceManager.extraction_errorc
Cso|jpt�}tjj||d|�}yt|�Wn|j�YnX|j|�d|j|<|S(u�Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        u-tmpi(	uextraction_pathuget_default_cacheuosupathujoinu_bypass_ensure_directoryuextraction_erroru_warn_unsafe_extraction_pathucached_files(uselfuarchive_nameunamesuextract_pathutarget_path((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_cache_path�s


uResourceManager.get_cache_pathcCswtjdkr*|jtjd�r*dStj|�j}|tj@sV|tj@rsd|}tj	|t
�ndS(uN
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        untuwindirNu�%s is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).(uosunameu
startswithuenvironustatust_modeuS_IWOTHuS_IWGRPuwarningsuwarnuUserWarning(upathumodeumsg((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_warn_unsafe_extraction_path�s
&u,ResourceManager._warn_unsafe_extraction_pathcCs@tjdkr<tj|�jdBd@}tj||�ndS(u4Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        uposiximi�N(uosunameustatust_modeuchmod(uselfutempnameufilenameumode((u&/tmp/pip-k8wh6o-build/pkg_resources.pyupostprocess�suResourceManager.postprocesscCs%|jrtd��n||_dS(u�Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        u5Can't change extraction path, files already extractedN(ucached_filesu
ValueErroruextraction_path(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuset_extraction_path�s	u#ResourceManager.set_extraction_pathcCsdS(uB
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        N((uselfuforce((u&/tmp/pip-k8wh6o-build/pkg_resources.pyucleanup_resources�su!ResourceManager.cleanup_resourcesNF(u__name__u
__module__u__qualname__u__doc__uNoneuextraction_pathu__init__uresource_existsuresource_isdiruresource_filenameuresource_streamuresource_stringuresource_listdiruextraction_erroruget_cache_pathustaticmethodu_warn_unsafe_extraction_pathupostprocessuset_extraction_pathuFalseucleanup_resources(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuResourceManagerWscCsytjdSWntk
r#YnXtjdkrCtjjd�Sd}dd|fd|fd|fdd|fg}x�|D]�\}}d}xn|D]5}|tjkr�tjj|tj|�}q�Pq�W|r�tjj||�}ntjj|d�Sq�Wtd
��dS(uDetermine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    uPYTHON_EGG_CACHEuntu~/.python-eggsuApplication DatauAPPDATAuUSERPROFILEu	HOMEDRIVEuHOMEPATHuHOMEuWINDIRuuPython-Eggsu3Please set the PYTHON_EGG_CACHE enviroment variableN(uAPPDATA((uAPPDATAN(uUSERPROFILE(u	HOMEDRIVEuHOMEPATH(uHOMEPATH(uHOME((uHOMEN(uWINDIR(	uosuenvironuKeyErrorunameupathu
expanduseruNoneujoinuRuntimeError(uapp_datau	app_homesukeysusubdirudirnameukey((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_default_caches0
			
cCstjdd|�S(u�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    u[^A-Za-z0-9.]+u-(ureusub(uname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu	safe_name0scCs%|jdd�}tjdd|�S(u�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    u u.u[^A-Za-z0-9.]+u-(ureplaceureusub(uversion((u&/tmp/pip-k8wh6o-build/pkg_resources.pyusafe_version8scCstjdd|�j�S(u�Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    u[^A-Za-z0-9.]+u_(ureusubulower(uextra((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
safe_extraBscCs|jdd�S(u|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    u-u_(ureplace(uname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuto_filenameKsunameuosuplatformusysuversionumachineupython_implementationupython_versionupython_full_versionuextracCstjS(N(uosuname(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>Ysuos_namecCstjS(N(usysuplatform(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>Zsusys_platformcCstjj�dS(Ni(usysuversionusplit(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>[scCsdtjdtjdfS(Nu%s.%sii(usysuversion_info(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>\scCs
td�S(Nuversion(u	_platinfo(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>]suplatform_versioncCs
td�S(Numachine(u	_platinfo(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>^suplatform_machinecCstd�pt�S(Nupython_implementation(u	_platinfou_pyimp(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>_sc
CsByddl}Wntk
r(dSYnXt||dd���S(NiucSsdS(Nu((((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>gsu_platinfo.<locals>.<lambda>(uplatformuImportErrorugetattr(uattruplatform((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu	_platinfobs

	u	_platinfocCsDtjdkrdStjjd�r)dSdtjkr<dSdSdS(Nucliu
IronPythonujavauJythonu__pypy__uPyPyuCPython(usysuplatformu
startswithubuiltin_module_names(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_pyimpisu_pyimpcCsEidd6dd6}d|_d|_|j|j|j�|_|S(u�
    Given a SyntaxError from a marker evaluation, normalize the error message:
     - Remove indications of filename and line number.
     - Replace platform-specific error messages with standard error messages.
    uinvalid syntaxuunexpected EOF while parsinguparenthesis is never closedN(uNoneufilenameulinenougetumsg(uexcusubs((u&/tmp/pip-k8wh6o-build/pkg_resources.pyunormalize_exceptionss
		unormalize_exceptioncCs;yt|�Wn&tk
r6ttj�d�SYnXdS(uHValidate text as a PEP 426 environment marker; return exception or FalseiF(uevaluate_markeruSyntaxErrorunormalize_exceptionusysuexc_infouFalse(utext((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuinvalid_marker�s

csf�sddlm�m�ddl�ddl�ddl���fdd�}��fdd�}��fdd	�}���fd
d�}�ji|�j6|�j6|�j6|�j	6dd
�d6dd
�d6�j
d6�jd6�t�d�r|��j
<qn��fdd����fdd���tj|�jd�d�S(uV
    Evaluate a PEP 426 environment marker on CPython 2.4+.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.

    This implementation uses the 'parser' module, which is not implemented on
    Jython and has been superseded by the 'ast' module in Python 2.6 and
    later.
    i(uNAMEuSTRINGNcs;tj�j��fdd�tdt��d�D��S(Ncs g|]}��|��qS(((u.0ui(u	interpretunodelist(u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>�s	u5evaluate_marker.<locals>.and_test.<locals>.<listcomp>ii(u	functoolsureduceuand_urangeulen(unodelist(u	interpretuoperator(unodelistu&/tmp/pip-k8wh6o-build/pkg_resources.pyuand_test�su!evaluate_marker.<locals>.and_testcs;tj�j��fdd�tdt��d�D��S(Ncs g|]}��|��qS(((u.0ui(u	interpretunodelist(u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>�s	u1evaluate_marker.<locals>.test.<locals>.<listcomp>ii(u	functoolsureduceuor_urangeulen(unodelist(u	interpretuoperator(unodelistu&/tmp/pip-k8wh6o-build/pkg_resources.pyutest�suevaluate_marker.<locals>.testcsa|dd}|�jkrQ|dd�jkrCtd��n�|d�Std��dS(NiiiuEmpty parenthesesu5Language feature not supported in environment markers(uLPARuRPARuSyntaxError(unodelistut(u	interpretutoken(u&/tmp/pip-k8wh6o-build/pkg_resources.pyuatom�suevaluate_marker.<locals>.atomc
s�t|�dkr!td��n|dd}|d}|d�kr�t|d�dkr�|dkrtd}q}d	}q�ny�|}Wn(tk
r�tt|�d
��YnX|�|d��|d��S(Niu5Chained comparison not allowed in environment markersiiiiunotunot inuis notu, operator not allowed in environment markers(ulenuSyntaxErroruKeyErrorurepr(unodelistucompucop(uNAMEu_opsuevaluate(u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
comparison�s
	
u#evaluate_marker.<locals>.comparisoncSs
||kS(N((uxuy((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>�su!evaluate_marker.<locals>.<lambda>unot incSs
||kS(N((uxuy((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>�suinu==u!=uor_testcs{x t|�dkr"|d}qWy�|d}Wn9tk
rptd��td�j|d��YnX||�S(Niiiu)Comparison or logical expression expectedu7Language feature not supported in environment markers: (ulenuKeyErroruSyntaxErrorusym_name(unodelistuop(u_opsusymbol(u&/tmp/pip-k8wh6o-build/pkg_resources.pyu	interpret�s
 u"evaluate_marker.<locals>.interpretcsx t|�dkr"|d}qW|d}|d}|�kr}yt|}Wn"tk
rutd|��YnX|�S|�kr�|d}|dd�dks�|jd�s�|jd�s�d|kr�td	��n|dd�Std
��dS(NiiiuUnknown name %ru'"u"""u'''u\u1Only plain strings allowed in environment markersu5Language feature not supported in environment markersi����(ulenu_marker_valuesuKeyErroruSyntaxErroru
startswith(unodelistukindunameuopus(uNAMEuSTRING(u&/tmp/pip-k8wh6o-build/pkg_resources.pyuevaluate�s$



4u!evaluate_marker.<locals>.evaluatei(utokenuNAMEuSTRINGusymboluoperatoruupdateutestuand_testuatomu
comparisonuequneuhasattruor_testuparseruexprutotuple(utextuextrau_opsuand_testutestuatomu
comparison((uNAMEuSTRINGu_opsuevaluateu	interpretuoperatorusymbolutokenu&/tmp/pip-k8wh6o-build/pkg_resources.pyuevaluate_marker�s$	%	cCs�ddl}|j�}x9|j�D]+}|jdd�}|j|�||<q%Wy|j||�}Wn5tk
r�tj�d}t	|j
d��YnX|S(u�
    Evaluate a PEP 426 environment marker using markerlib.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.
    iNu.u_i(u
_markerlibudefault_environmentukeysureplaceupopu	interpretu	NameErrorusysuexc_infouSyntaxErroruargs(utextu
_markerlibuenvukeyunew_keyuresultue((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_markerlib_evaluate�s
u_markerlib_evaluateuparsercBs"|EeZdZdZd(Zd(Zd(Zdd�Zdd�Z	dd�Z
dd	�Zd
d�Zdd
�Z
ejd)kr�dd�Zndd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(S(*uNullProvideruETry to implement resources and metadata for arbitrary PEP 302 loaderscCs:t|dd�|_tjjt|dd��|_dS(Nu
__loader__u__file__u(ugetattruNoneuloaderuosupathudirnameumodule_path(uselfumodule((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__suNullProvider.__init__cCs|j|j|�S(N(u_fnumodule_path(uselfumanageru
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_resource_filename	su"NullProvider.get_resource_filenamecCst|j||��S(N(uBytesIOuget_resource_string(uselfumanageru
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_resource_streamsu NullProvider.get_resource_streamcCs|j|j|j|��S(N(u_getu_fnumodule_path(uselfumanageru
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_resource_stringsu NullProvider.get_resource_stringcCs|j|j|j|��S(N(u_hasu_fnumodule_path(uselfu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuhas_resourcesuNullProvider.has_resourcecCs%|jo$|j|j|j|��S(N(uegg_infou_hasu_fn(uselfuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuhas_metadatasuNullProvider.has_metadataicCs)|js
dS|j|j|j|��S(Nu(uegg_infou_getu_fn(uselfuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_metadatas	uNullProvider.get_metadatacCs2|js
dS|j|j|j|��jd�S(Nuuutf-8(uegg_infou_getu_fnudecode(uselfuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_metadatas	cCst|j|��S(N(uyield_linesuget_metadata(uselfuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_metadata_lines#suNullProvider.get_metadata_linescCs|j|j|j|��S(N(u_isdiru_fnumodule_path(uselfu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_isdir&suNullProvider.resource_isdircCs%|jo$|j|j|j|��S(N(uegg_infou_isdiru_fn(uselfuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyumetadata_isdir)suNullProvider.metadata_isdircCs|j|j|j|��S(N(u_listdiru_fnumodule_path(uselfu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuresource_listdir,suNullProvider.resource_listdircCs)|jr%|j|j|j|��SgS(N(uegg_infou_listdiru_fn(uselfuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyumetadata_listdir/s	uNullProvider.metadata_listdircCs�d|}|j|�s,td|��n|j|�jdd�}|jdd�}|j|j|�}||d<tjj|�r�t	|||�nWddl
m}t|�d|j
d�|f||<t||d	�}t|||�dS(
Nuscripts/uNo script named %ru
u
u
u__file__i(ucacheuexec(uhas_metadatauResolutionErroruget_metadataureplaceu_fnuegg_infouosupathuexistsuexecfileu	linecacheucacheulenusplitucompileuexec(uselfuscript_nameu	namespaceuscriptuscript_textuscript_filenameucacheuscript_code((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
run_script4s

%uNullProvider.run_scriptcCstd��dS(Nu9Can't perform this operation for unregistered loader type(uNotImplementedError(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_hasFsuNullProvider._hascCstd��dS(Nu9Can't perform this operation for unregistered loader type(uNotImplementedError(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_isdirKsuNullProvider._isdircCstd��dS(Nu9Can't perform this operation for unregistered loader type(uNotImplementedError(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_listdirPsuNullProvider._listdircCs&|r"tjj||jd��S|S(Nu/(uosupathujoinusplit(uselfubaseu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_fnUsuNullProvider._fncCs2t|jd�r"|jj|�Std��dS(Nuget_datau=Can't perform this operation for loaders without 'get_data()'(uhasattruloaderuget_datauNotImplementedError(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_getZsuNullProvider._getN(i(u__name__u
__module__u__qualname__u__doc__uNoneuegg_nameuegg_infouloaderu__init__uget_resource_filenameuget_resource_streamuget_resource_stringuhas_resourceuhas_metadatausysuversion_infouget_metadatauget_metadata_linesuresource_isdirumetadata_isdiruresource_listdirumetadata_listdiru
run_scriptu_hasu_isdiru_listdiru_fnu_get(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuNullProvider�s0cBs2|EeZdZdZdd�Zdd�ZdS(uEggProvideru&Provider based on a virtual filesystemcCstj||�|j�dS(N(uNullProvideru__init__u
_setup_prefix(uselfumodule((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__gsuEggProvider.__init__cCs�|j}d}x}||kr�|j�jd�rmtjj|�|_tjj|d�|_	||_
Pn|}tjj|�\}}qWdS(Nu.egguEGG-INFO(umodule_pathuNoneuloweruendswithuosupathubasenameuegg_nameujoinuegg_infouegg_rootusplit(uselfupathuoldubase((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_setup_prefixks		uEggProvider._setup_prefixN(u__name__u
__module__u__qualname__u__doc__u__init__u
_setup_prefix(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuEggProviderdscBsV|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS(
uDefaultProvideru6Provides access to package resources in the filesystemcCstjj|�S(N(uosupathuexists(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_has|suDefaultProvider._hascCstjj|�S(N(uosupathuisdir(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_isdirsuDefaultProvider._isdircCs
tj|�S(N(uosulistdir(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_listdir�suDefaultProvider._listdircCst|j|j|�d�S(Nurb(uopenu_fnumodule_path(uselfumanageru
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_resource_stream�su#DefaultProvider.get_resource_streamc
Cs/t|d�}z|j�SWd|j�XdS(Nurb(uopenureaduclose(uselfupathustream((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_get�suDefaultProvider._getN(	u__name__u
__module__u__qualname__u__doc__u_hasu_isdiru_listdiruget_resource_streamu_get(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuDefaultProvideryscBsT|EeZdZdZdd�ZZdd�Zdd�ZdZ	dd�Z
dS(	u
EmptyProvideru.Provider that returns nothing for all requestscCsdS(NF(uFalse(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>�suEmptyProvider.<lambda>cCsdS(Nu((uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>�scCsgS(N((uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>�scCsdS(N((uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__�suEmptyProvider.__init__N(u__name__u
__module__u__qualname__u__doc__u_isdiru_hasu_getu_listdiruNoneumodule_pathu__init__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
EmptyProvider�sc
Cs�t�}tj|�}zYxR|j�D]D}|jdtj�}|j|�||<||dk	s(t	�q(WWd|j
�X|S(uf
    This builds a similar dictionary to the zipimport directory
    caches.  However instead of tuples, ZipInfo objects are stored.

    The translation of the tuple is as follows:
      * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep
              on pypy it is the same (one reason why distribute did work
              in some cases on pypy and win32).
      * [1] - zipinfo.compress_type
      * [2] - zipinfo.compress_size
      * [3] - zipinfo.file_size
      * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
              len(ascii encoding of filename) otherwise
      * [5] - (zipinfo.date_time[0] - 1980) << 9 |
               zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
      * [6] - (zipinfo.date_time[3] - 1980) << 11 |
               zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
      * [7] - zipinfo.CRC
    u/N(udictuzipfileuZipFileunamelistureplaceuosusepugetinfouNoneuAssertionErroruclose(upathuzipinfouzfileuzitemuzpath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyubuild_zipmanifest�s	ubuild_zipmanifestcBs�|EeZdZdZdZdd�Zdd�Zdd�Zdd	�Z	e
d
d��Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS(uZipProvideru"Resource support for zips and eggscCs?tj||�t|jj�|_|jjtj|_dS(N(	uEggProvideru__init__ubuild_zipmanifestuloaderuarchiveuzipinfouosusepuzip_pre(uselfumodule((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__�suZipProvider.__init__cCsF|j|j�r)|t|j�d�Std||jf��dS(Nu%s is not a subpath of %s(u
startswithuzip_preulenuAssertionError(uselfufspath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_zipinfo_name�suZipProvider._zipinfo_namecCsj|j|}|j|jtj�rM|t|j�dd�jtj�Std||jf��dS(Niu%s is not a subpath of %s(uzip_preu
startswithuegg_rootuosusepulenusplituAssertionError(uselfuzip_pathufspath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_parts�s

'uZipProvider._partscCs�|jstd��n|j|�}|j�}dj|j|��|kr~x*|D]}|j||j|��qXWn|j||�S(Nu5resource_filename() only supported for .egg, not .zipu/(uegg_nameuNotImplementedErroru_resource_to_zipu_get_eager_resourcesujoinu_partsu_extract_resourceu
_eager_to_zip(uselfumanageru
resource_nameuzip_pathueagersuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_resource_filename�s	
 u!ZipProvider.get_resource_filenamecCs/|j}|jd}tj|�}||fS(Niii����(iii����(u	file_sizeu	date_timeutimeumktime(uzip_statusizeu	date_timeu	timestamp((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_get_date_and_size�s	
uZipProvider._get_date_and_sizec
Cs�||j�kr^x9|j�|D]'}|j|tjj||��}q#Wtjj|�S|j|j|�\}}ts�t	d��ny)|j
|j|j|��}|j
||�r�|Stddtjj|��\}}	tj||jj|��tj|�t|	||f�|j|	|�yt|	|�Wnmtjk
r�tjj|�r�|j
||�r�|Stjdkr�t|�t|	|�|Sn�YnXWntjk
r�|j�YnX|S(Nu>"os.rename" and "os.unlink" are not supported on this platformu	.$extractudirunt(u_indexu_extract_resourceuosupathujoinudirnameu_get_date_and_sizeuzipinfou
WRITE_SUPPORTuIOErroruget_cache_pathuegg_nameu_partsu_is_currentu_mkstempuwriteuloaderuget_dataucloseuutimeupostprocessurenameuerroruisfileunameuunlinkuextraction_error(
uselfumanageruzip_pathunameulastu	timestampusizeu	real_pathuoutfutmpnam((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_extract_resource�s@$


uZipProvider._extract_resourcec	Cs�|j|j|�\}}tjj|�s2dStj|�}|j|ks_|j|krcdS|j	j
|�}t|d�}|j�}|j
�||kS(uK
        Return True if the file_path is current for this zip_path
        urbF(u_get_date_and_sizeuzipinfouosupathuisfileuFalseustatust_sizeust_mtimeuloaderuget_datauopenureaduclose(	uselfu	file_pathuzip_pathu	timestampusizeustatuzip_contentsufu
file_contents((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_is_current&s
uZipProvider._is_currentcCsa|jdkrZg}x6dD].}|j|�r|j|j|��qqW||_n|jS(Nunative_libs.txtueager_resources.txt(unative_libs.txtueager_resources.txt(ueagersuNoneuhas_metadatauextenduget_metadata_lines(uselfueagersuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_get_eager_resources7s
u ZipProvider._get_eager_resourcescCs�y|jSWn�tk
r�i}x�|jD]y}|jtj�}x^|r�tjj|dd��}||kr�||j|d�PqF|j�g||<qFWq+W||_|SYnXdS(Nii����i����(	u	_dirindexuAttributeErroruzipinfousplituosusepujoinuappendupop(uselfuindupathupartsuparent((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_index@s
		uZipProvider._indexcCs.|j|�}||jkp-||j�kS(N(u
_zipinfo_nameuzipinfou_index(uselfufspathuzip_path((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_hasQsuZipProvider._hascCs|j|�|j�kS(N(u
_zipinfo_nameu_index(uselfufspath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_isdirUsuZipProvider._isdircCs%t|j�j|j|�f��S(N(ulistu_indexugetu
_zipinfo_name(uselfufspath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_listdirXsuZipProvider._listdircCs|j|j|j|��S(N(u
_zipinfo_nameu_fnuegg_root(uselfu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_eager_to_zip[suZipProvider._eager_to_zipcCs|j|j|j|��S(N(u
_zipinfo_nameu_fnumodule_path(uselfu
resource_name((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_resource_to_zip^suZipProvider._resource_to_zipN(u__name__u
__module__u__qualname__u__doc__uNoneueagersu__init__u
_zipinfo_nameu_partsuget_resource_filenameustaticmethodu_get_date_and_sizeu_extract_resourceu_is_currentu_get_eager_resourcesu_indexu_hasu_isdiru_listdiru
_eager_to_zipu_resource_to_zip(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuZipProvider�s 		
1	cBsJ|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S(uFileMetadatau*Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    cCs
||_dS(N(upath(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__psuFileMetadata.__init__cCs
|dkS(NuPKG-INFO((uselfuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuhas_metadatassuFileMetadata.has_metadatacCsH|dkr8t|jd�}|j�}|j�|Std��dS(NuPKG-INFOurUu(No metadata except PKG-INFO is available(uopenupathureaducloseuKeyError(uselfunameufumetadata((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_metadatavs
uFileMetadata.get_metadatacCst|j|��S(N(uyield_linesuget_metadata(uselfuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_metadata_lines~suFileMetadata.get_metadata_linesN(u__name__u
__module__u__qualname__u__doc__u__init__uhas_metadatauget_metadatauget_metadata_lines(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuFileMetadatads

cBs&|EeZdZdZdd�ZdS(uPathMetadatauqMetadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir,project_name=dist_name,metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    cCs||_||_dS(N(umodule_pathuegg_info(uselfupathuegg_info((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__�s	uPathMetadata.__init__N(u__name__u
__module__u__qualname__u__doc__u__init__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuPathMetadata�scBs&|EeZdZdZdd�ZdS(uEggMetadatau Metadata provider for .egg filescCsrt|j�|_|jtj|_||_|jrXtjj	|j|j�|_
n|j|_
|j�dS(u-Create a metadata provider from a zipimporterN(ubuild_zipmanifestuarchiveuzipinfouosusepuzip_preuloaderuprefixupathujoinumodule_pathu
_setup_prefix(uselfuimporter((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__�s		!uEggMetadata.__init__N(u__name__u
__module__u__qualname__u__doc__u__init__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuEggMetadata�sudictu_distribution_finderscCs|t|<dS(uxRegister `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example.N(u_distribution_finders(u
importer_typeudistribution_finder((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuregister_finder�scCs+t|�}tt|�}||||�S(u.Yield distributions accessible via `path_item`(uget_importeru
_find_adapteru_distribution_finders(u	path_itemuonlyuimporterufinder((u&/tmp/pip-k8wh6o-build/pkg_resources.pyufind_distributions�sccs�t|�}|jd�r2tj|d|�Vn|r<dSxf|jd�D]U}|jd�rLtjj||�}x(t	t
j|�|�D]}|Vq�WqLqLWdS(NuPKG-INFOumetadatau/u.egg(uEggMetadatauhas_metadatauDistributionu
from_filenameuresource_listdiruendswithuosupathujoinufind_in_zipu	zipimportuzipimporter(uimporteru	path_itemuonlyumetadatausubitemusubpathudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyufind_in_zip�sufind_in_zipcCsfS(N((uimporteru	path_itemuonly((u&/tmp/pip-k8wh6o-build/pkg_resources.pyufind_nothing�sufind_nothingccst|�}tjj|�rtj|tj�r|j�jd�rwtj	|dt
|tjj|d���Vqx�tj|�D]}}|j�}|jd�s�|jd�rtjj||�}tjj|�r�t
||�}nt
|�}tj|||dt�Vq�|r]|jd�r]x�ttjj||��D]}|VqKWq�|r�|jd�r�ttjj||��}z|j�}	Wd|j�XxU|	D]J}
|
j�s�q�nx.ttjj||
j���D]}|Vq�WPq�Wq�q�WndS(	u6Yield distributions accessible on a sys.path directoryu.eggumetadatauEGG-INFOu	.egg-infou
.dist-infou
precedenceu	.egg-linkN(u_normalize_cacheduosupathuisdiruaccessuR_OKuloweruendswithuDistributionu
from_filenameuPathMetadataujoinulistdiruFileMetadatau
from_locationuDEVELOP_DISTufind_distributionsuopenu	readlinesucloseustripurstrip(uimporteru	path_itemuonlyuentryulowerufullpathumetadataudistu
entry_fileuentry_linesulineuitem((u&/tmp/pip-k8wh6o-build/pkg_resources.pyufind_on_path�s:'	 "
(	ufind_on_pathu_namespace_handlersu_namespace_packagescCs|t|<dS(u�Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer,path_entry,moduleName,module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    N(u_namespace_handlers(u
importer_typeunamespace_handler((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuregister_namespace_handler�scCs
t|�}|dkrdS|j|�}|dkr;dStjj|�}|dkr�tj|�}tj|<g|_t	|�n!t
|d�s�td|��ntt
|�}|||||�}|dk	r	|j}|j|�|j|�||_n|S(uEEnsure that named package includes a subpath of path_item (if needed)u__path__uNot a package:N(uget_importeruNoneufind_moduleusysumodulesugetuimpu
new_moduleu__path__u_set_parent_nsuhasattru	TypeErroru
_find_adapteru_namespace_handlersuappenduload_module(upackageNameu	path_itemuimporteruloaderumoduleuhandlerusubpathupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_handle_nss*	
	

u
_handle_nscCstj�z�|tkrdStjd}}d|kr�dj|jd�dd��}t|�|tkr~t	|�nytj
|j}Wq�tk
r�t
d|��Yq�Xntj|g�j|�tj|g�x|D]}t||�q�WWdtj�XdS(u9Declare that package 'packageName' is a namespace packageNu.iuNot a package:i����(uimpuacquire_locku_namespace_packagesusysupathuNoneujoinusplitudeclare_namespaceu
__import__umodulesu__path__uAttributeErroru	TypeErroru
setdefaultuappendu
_handle_nsurelease_lock(upackageNameupathuparentu	path_item((u&/tmp/pip-k8wh6o-build/pkg_resources.pyudeclare_namespace(s&
"



c
Csbtj�zFx?tj|f�D]+}t||�}|r t||�q q WWdtj�XdS(uDEnsure that previously-declared namespace packages include path_itemN(uimpuacquire_locku_namespace_packagesugetu
_handle_nsufixup_namespace_packagesurelease_lock(u	path_itemuparentupackageusubpath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyufixup_namespace_packagesHs
cCs`tjj||jd�d�}t|�}x+|jD]}t|�|kr8Pq8q8W|SdS(uBCompute an ns-package subpath for a filesystem or zipfile importeru.iNi����(uosupathujoinusplitu_normalize_cachedu__path__(uimporteru	path_itemupackageNameumoduleusubpathu
normalizeduitem((u&/tmp/pip-k8wh6o-build/pkg_resources.pyufile_ns_handlerRs"ufile_ns_handlercCsdS(N(uNone(uimporteru	path_itemupackageNameumodule((u&/tmp/pip-k8wh6o-build/pkg_resources.pyunull_ns_handleresunull_ns_handlercCstjjtjj|��S(u1Normalize a file/dir name for comparison purposes(uosupathunormcaseurealpath(ufilename((u&/tmp/pip-k8wh6o-build/pkg_resources.pyunormalize_pathkscCs=y||SWn*tk
r8t|�||<}|SYnXdS(N(uKeyErrorunormalize_path(ufilenameu_cacheuresult((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_normalize_cachedos

u_normalize_cachedcCsU|jd�}|j�}|rQdj|�}ttj||tj|�ndS(Nu.(usplitupopujoinusetattrusysumodules(upackageNameupartsunameuparent((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_set_parent_nsvs
u_set_parent_nsccs�t|t�rSxn|j�D]0}|j�}|r|jd�r|VqqWn-x*|D]"}xt|�D]}|VqmWqZWdS(uAYield non-empty/non-comment lines of a ``basestring`` or sequenceu#N(u
isinstanceu
basestringu
splitlinesustripu
startswithuyield_lines(ustrsususs((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuyield_lines~s
u
\s*(#.*)?$u\s*\\\s*(#.*)?$u\s*((\w|[-.])+)u!\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)u\s*,u\s*\[u\s*\]u\w+(\.\w+)*$uL(?P<name>[^-]+)( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?u(\d+ | [a-z]+ | \.| -)ucupreupreviewufinal-u-urcu@udevccs{xotj|�D]^}t||�}|s|dkr>qn|dd�dkre|jd�Vqd|VqWdVdS(Nu.iu
0123456789iu*u*final(ucomponent_reusplitureplaceuzfill(usupart((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_parse_version_parts�s
u_parse_version_partscCs�g}x�t|j��D]�}|jd�r�|dkrdx'|r`|ddkr`|j�q=Wnx'|r�|ddkr�|j�qgWn|j|�qWt|�S(u�Convert a version string to a chronologically-sortable key

    This is a rough cross between distutils' StrictVersion and LooseVersion;
    if you give it versions that would work with StrictVersion, then it behaves
    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    *possible* to create pathological version coding schemes that will fool
    this parser, but they should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    than any other pre-release tag.
    u*u*finaliu*final-u00000000i����i����(u_parse_version_partsuloweru
startswithupopuappendutuple(usupartsupart((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
parse_version�scBs�|EeZdZdZffddd�Zdd�Zdd�Zddddd	�Z	ddd
d�Z
ddd
�Zee�Zddd�Z
ee
�Z
ddd�Zee�ZdS(u
EntryPointu3Object representing an advertised importable objectcCsnt|�std|��n||_||_t|�|_tjddj|��j	|_	||_
dS(NuInvalid module nameux[%s]u,(uMODULEu
ValueErrorunameumodule_nameutupleuattrsuRequirementuparseujoinuextrasudist(uselfunameumodule_nameuattrsuextrasudist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__�s		"uEntryPoint.__init__cCsfd|j|jf}|jr<|ddj|j�7}n|jrb|ddj|j�7}n|S(Nu%s = %su:u.u [%s]u,(unameumodule_nameuattrsujoinuextras(uselfus((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__str__�s		uEntryPoint.__str__cCsdt|�S(NuEntryPoint.parse(%r)(ustr(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__repr__�suEntryPoint.__repr__cCs�|r|j||�nt|jt�t�dg�}xO|jD]D}yt||�}WqDtk
r�td||f��YqDXqDW|S(Nu__name__u%r has no %r attribute(urequireu
__import__umodule_nameuglobalsuattrsugetattruAttributeErroruImportError(uselfurequireuenvu	installeruentryuattr((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuload�s!
uEntryPoint.loadcCs]|jr%|jr%td|��ntttjtj|jj|j�||���dS(Nu&Can't require() without a distribution(	uextrasudistuUnknownExtraulistumapuworking_setuadduresolveurequires(uselfuenvu	installer((u&/tmp/pip-k8wh6o-build/pkg_resources.pyurequire�suEntryPoint.requirecCsy�f}}|jdd�\}}d|krz|jdd�\}}tjd|�}|jrnt�n|j}nd|kr�|jdd�\}}t|j��s�t�n|j�jd�}nWn!tk
r�td|��Yn#X||j�|j�|||�SdS(	uParse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        u=iu[ux[u:u.u9EntryPoint must be in 'name=module:attrs [extras]' formatN(	usplituRequirementuparseuspecsu
ValueErroruextrasuMODULEurstripustrip(uclsusrcudistuattrsuextrasunameuvalueureq((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuparse�s&

			
uEntryPoint.parsecCs�t|�std|��ni}xZt|�D]L}|j||�}|j|krptd||j��n|||j<q1W|S(uParse an entry point groupuInvalid group nameuDuplicate entry point(uMODULEu
ValueErroruyield_linesuparseuname(uclsugroupulinesudistuthisulineuep((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuparse_groupsuEntryPoint.parse_groupcCs�t|t�r|j�}nt|�}i}x~|D]v\}}|dkrj|s[q7ntd��n|j�}||kr�td|��n|j|||�||<q7W|S(u!Parse a map of entry point groupsu%Entry points must be listed in groupsuDuplicate group nameN(u
isinstanceudictuitemsusplit_sectionsuNoneu
ValueErrorustripuparse_group(uclsudataudistumapsugroupulines((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu	parse_map)suEntryPoint.parse_mapNT(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u__str__u__repr__uTrueuloadurequireuparseuclassmethoduparse_groupu	parse_map(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
EntryPoint�s	
cCsE|s
dSt|�}|djd�rAt|dd�d�S|S(Nuiumd5=i����i����(u(uurlparseu
startswithu
urlunparse(ulocationuparsed((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_remove_md5_fragment>su_remove_md5_fragmentc	Bs|EeZdZdZdZdAdAdAdAedAedd�ZdAdd�Z	e
e	�Z	edd��Zd	d
�Z
dd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�Zee�Zdd�Zee�Zdd�Zee�Zdd�Zee�Zfdd �Zd!d"�ZdAd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�ZdAd-d.�Ze
e�Zd/d0�Z d1d2�Z!dAd3d4�Z"d5d6�Z#dAd7d8�Z$d9d:�Z%d;d<�Z&d=d>�Z'd?d@�Z(ee(�Z(dAS(BuDistributionu5Wrap an actual or potential sys.path entry w/metadatauPKG-INFOcCsjt|pd�|_|dk	r3t|�|_n||_||_||_||_|p`t	|_
dS(NuUnknown(u	safe_nameuproject_nameuNoneusafe_versionu_versionu
py_versionuplatformulocationu
precedenceuempty_provideru	_provider(uselfulocationumetadatauproject_nameuversionu
py_versionuplatformu
precedence((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__Ks				uDistribution.__init__cKs�dgd\}}}}tjj|�\}}	|	j�tkr�t|�}
|
r||
jdddd�\}}}}nt|	j�}n|||d|d|d|d	||�S(
Niunameuverupyveruplatuproject_nameuversionu
py_versionuplatform(uNoneuosupathusplitextuloweru_distributionImpluEGG_NAMEugroup(uclsulocationubasenameumetadataukwuproject_nameuversionu
py_versionuplatformuextumatch((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
from_locationXs!uDistribution.from_locationcCs7t|df�|j|jt|j�|j|jfS(Nuparsed_version(ugetattru
precedenceukeyu_remove_md5_fragmentulocationu
py_versionuplatform(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>jsuDistribution.<lambda>cCs
t|j�S(N(uhashuhashcmp(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__hash__ssuDistribution.__hash__cCs|j|jkS(N(uhashcmp(uselfuother((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__lt__tsuDistribution.__lt__cCs|j|jkS(N(uhashcmp(uselfuother((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__le__vsuDistribution.__le__cCs|j|jkS(N(uhashcmp(uselfuother((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__gt__xsuDistribution.__gt__cCs|j|jkS(N(uhashcmp(uselfuother((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__ge__zsuDistribution.__ge__cCs&t||j�sdS|j|jkS(NF(u
isinstanceu	__class__uFalseuhashcmp(uselfuother((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__eq__|suDistribution.__eq__cCs||kS(N((uselfuother((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__ne__�suDistribution.__ne__cCs>y|jSWn,tk
r9|jj�|_}|SYnXdS(N(u_keyuAttributeErroruproject_nameulower(uselfukey((u&/tmp/pip-k8wh6o-build/pkg_resources.pyukey�s

uDistribution.keycCs>y|jSWn,tk
r9t|j�|_}|SYnXdS(N(u_parsed_versionuAttributeErroru
parse_versionuversion(uselfupv((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuparsed_version�s

uDistribution.parsed_versioncCs�y|jSWn�tk
r�xq|j|j�D]G}|j�jd�r.t|jdd�dj��|_|jSq.Wt	d|j|��YnXdS(Nuversion:u:iu(Missing 'Version:' header and/or %s file(
u_versionuAttributeErroru
_get_metadatauPKG_INFOuloweru
startswithusafe_versionusplitustripu
ValueError(uselfuline((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuversion�s
%uDistribution.versioncCs�y|jSWn�tk
r�igd6}|_x�dD]�}x�t|j|��D]�\}}|r�d|kr�|jdd�\}}t|�r�g}q�t|�s�g}q�nt|�p�d}n|j	|g�j
t|��qRWq6W|SYnXdS(Nurequires.txtudepends.txtu:i(urequires.txtudepends.txt(u_Distribution__dep_mapuAttributeErroruNoneusplit_sectionsu
_get_metadatausplituinvalid_markeruevaluate_markeru
safe_extrau
setdefaultuextenduparse_requirements(uselfudmunameuextraureqsumarker((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_dep_map�s 

"	'uDistribution._dep_mapcCs�|j}g}|j|jdf��xT|D]L}y|j|t|��Wq/tk
rztd||f��Yq/Xq/W|S(u@List of Requirements needed for this distro if `extras` are usedu%s has no such extra feature %rN(u_dep_mapuextendugetuNoneu
safe_extrauKeyErroruUnknownExtra(uselfuextrasudmudepsuext((u&/tmp/pip-k8wh6o-build/pkg_resources.pyurequires�s	

uDistribution.requiresccs5|j|�r1x|j|�D]}|VqWndS(N(uhas_metadatauget_metadata_lines(uselfunameuline((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_get_metadata�suDistribution._get_metadatacCsd|dkrtj}n|j|�|tjkr`t|j�ttt|j	d���ndS(u>Ensure distribution is importable on `path` (default=sys.path)unamespace_packages.txtN(
uNoneusysupathu	insert_onufixup_namespace_packagesulocationulistumapudeclare_namespaceu
_get_metadata(uselfupath((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuactivate�s

uDistribution.activatecCsOdt|j�t|j�|jp'tf}|jrK|d|j7}n|S(u@Return what this distribution's standard .egg filename should beu
%s-%s-py%su-(uto_filenameuproject_nameuversionu
py_versionuPY_MAJORuplatform(uselfufilename((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuegg_name�s	uDistribution.egg_namecCs(|jrd||jfSt|�SdS(Nu%s (%s)(ulocationustr(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__repr__�s	uDistribution.__repr__cCsNyt|dd�}Wntk
r0d}YnX|p:d}d|j|fS(Nuversionu[unknown version]u%s %s(ugetattruNoneu
ValueErroruproject_name(uselfuversion((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__str__�s
uDistribution.__str__cCs.|jd�rt|��nt|j|�S(uADelegate all unrecognized public attributes to .metadata provideru_(u
startswithuAttributeErrorugetattru	_provider(uselfuattr((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__getattr__�suDistribution.__getattr__cKs(|jt|�tjj|�||�S(N(u
from_locationu_normalize_cacheduosupathubasename(uclsufilenameumetadataukw((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
from_filename�suDistribution.from_filenamecCstjd|j|jf�S(u?Return a ``Requirement`` that matches this distribution exactlyu%s==%s(uRequirementuparseuproject_nameuversion(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuas_requirement�suDistribution.as_requirementcCsD|j||�}|dkr:td||ff��n|j�S(u=Return the `name` entry point of `group` or raise ImportErroruEntry point %r not foundN(uget_entry_infouNoneuImportErroruload(uselfugroupunameuep((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuload_entry_point	suDistribution.load_entry_pointcCsdy
|j}Wn4tk
rCtj|jd�|�}|_YnX|dk	r`|j|i�S|S(u=Return the entry point map for `group`, or the full entry mapuentry_points.txtN(u_ep_mapuAttributeErroru
EntryPointu	parse_mapu
_get_metadatauNoneuget(uselfugroupuep_map((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
get_entry_map		s

!uDistribution.get_entry_mapcCs|j|�j|�S(u<Return the EntryPoint object for `group`+`name`, or ``None``(u
get_entry_mapuget(uselfugroupuname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuget_entry_info	suDistribution.get_entry_infoc	CsM|p|j}|sdSt|�}tjj|�}dd�|D�}x�t|�D]w\}}||krsPqW||krW|jtkrW|tjkr�|j	�n|j
||�|j
||�PqWqWW|tjkr�|j	�n|j|�dSxGy|j||d�}Wnt
k
r1PYqX||=||=|}qdS(u@Insert self.location in path before its nearest parent directoryNcSs(g|]}|rt|�p!|�qS((u_normalize_cached(u.0up((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>"	s	u*Distribution.insert_on.<locals>.<listcomp>i(ulocationu_normalize_cacheduosupathudirnameu	enumerateu
precedenceuEGG_DISTusysucheck_version_conflictuinsertuappenduindexu
ValueError(	uselfupathulocunlocubdirunpathupuitemunp((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu	insert_on	s6



	uDistribution.insert_onc
Cs�|jdkrdStj|jd��}t|j�}x�|jd�D]�}|tjksJ||ksJ|tkr}qJn|dkr�qJnt	tj|dd�}|r�t|�j|�sJ|j|j�r�qJntd|||jf�qJWdS(	Nu
setuptoolsunamespace_packages.txtu
top_level.txtu
pkg_resourcesusiteu__file__uIModule %s was already imported from %s, but %s is being added to sys.path(u
pkg_resourcesu
setuptoolsusite(
ukeyudictufromkeysu
_get_metadataunormalize_pathulocationusysumodulesu_namespace_packagesugetattruNoneu
startswithu
issue_warning(uselfunspulocumodnameufn((u&/tmp/pip-k8wh6o-build/pkg_resources.pyucheck_version_conflict@	s"u#Distribution.check_version_conflictcCs<y|jWn*tk
r7tdt|��dSYnXdS(NuUnbuilt egg for FT(uversionu
ValueErroru
issue_warningurepruFalseuTrue(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuhas_versionU	s
	uDistribution.has_versioncKsMx*dD]"}|j|t||d	��qW|jd|j�|j|�S(
u@Copy this distribution, substituting in any changed keyword argsuproject_nameuversionu
py_versionuplatformulocationu
precedenceumetadata(uproject_nameuversionu
py_versionuplatformulocationu
precedenceN(u
setdefaultugetattruNoneu	_provideru	__class__(uselfukwuattr((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuclone]	s
 uDistribution.clonecCsdd�|jD�S(NcSsg|]}|r|�qS(((u.0udep((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>i	s	u'Distribution.extras.<locals>.<listcomp>(u_dep_map(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuextrash	suDistribution.extrasN()u__name__u
__module__u__qualname__u__doc__uPKG_INFOuNoneuPY_MAJORuEGG_DISTu__init__u
from_locationuclassmethodupropertyuhashcmpu__hash__u__lt__u__le__u__gt__u__ge__u__eq__u__ne__ukeyuparsed_versionuversionu_dep_mapurequiresu
_get_metadatauactivateuegg_nameu__repr__u__str__u__getattr__u
from_filenameuas_requirementuload_entry_pointu
get_entry_mapuget_entry_infou	insert_onucheck_version_conflictuhas_versionucloneuextras(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuDistributionGsV			'cBsk|EeZdZdZdZejd�Zedd��Z	edd��Z
dd	�Zd
d�ZdS(
uDistInfoDistributionuGWrap an actual or potential sys.path entry w/metadata, .dist-info styleuMETADATAu([\(,])\s*(\d.*?)\s*([,\)])cCs\y|jSWnJtk
rWddlm}|�j|j|j��|_|jSYnXdS(uParse and cache metadatai(uParserN(u	_pkg_infouAttributeErroruemail.parseruParseruparsestruget_metadatauPKG_INFO(uselfuParser((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_parsed_pkg_infor	s
!u%DistInfoDistribution._parsed_pkg_infocCs:y|jSWn(tk
r5|j�|_|jSYnXdS(N(u_DistInfoDistribution__dep_mapuAttributeErroru_compute_dependencies(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_dep_map|	s

uDistInfoDistribution._dep_mapcCsy|jdd�dg}|dj�}|dj�}tj|jd|�}|jdd�jdd�}||fS(u�Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz')
        Split environment marker, add == prefix to version specifiers as
        necessary, and remove parenthesis.
        u;iuiu\1==\2\3u(u)(usplitustripureusubuEQEQureplace(uselfu
requires_distupartsudistversumark((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_preparse_requirement�	su*DistInfoDistribution._preparse_requirementc
sddlm}igd6}|_g�xc|jjd�pBgD]I}|j|�\}}tt|��}||�|_	�j
|�qCW�fdd�}t|d��}|dj|�xR|jjd�p�gD]8}	t
|	j��}	tt||	��|�||	<q�W|S(u+Recompute this distribution's dependencies.i(ucompileu
Requires-Distc3s6x/�D]'}|jdi|d6�r|VqqWdS(Nuoverrideuextra(u	marker_fn(uextraureq(ureqs(u&/tmp/pip-k8wh6o-build/pkg_resources.pyureqs_for_extra�	s
uBDistInfoDistribution._compute_dependencies.<locals>.reqs_for_extrauProvides-ExtraN(u
_markerlibucompileuNoneu_DistInfoDistribution__dep_mapu_parsed_pkg_infouget_allu_preparse_requirementunextuparse_requirementsu	marker_fnuappendu	frozensetuextendu
safe_extraustripulist(
uselfucompile_markerudmurequdistversumarkuparsedureqs_for_extraucommonuextra((ureqsu&/tmp/pip-k8wh6o-build/pkg_resources.pyu_compute_dependencies�	s$u*DistInfoDistribution._compute_dependenciesN(
u__name__u
__module__u__qualname__u__doc__uPKG_INFOureucompileuEQEQupropertyu_parsed_pkg_infou_dep_mapu_preparse_requirementu_compute_dependencies(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuDistInfoDistributionm	s
uDistInfoDistributionu.eggu	.egg-infou
.dist-infoc
Os|d}t�}y-x&tj|�j|kr:|d7}qWWntk
rPYnXddlm}|d|d||�dS(Nii(uwarnu
stacklevel(uglobalsusysu	_getframeu	f_globalsu
ValueErroruwarningsuwarn(uargsukwuleveluguwarn((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
issue_warning�	s	
u
issue_warningc#stt|����fdd�}x��D]�}t|�}|sUtd|��n|jd�}|j�}g}t||�}|r�|j�}|tt||dd�\}}}n|tt	||dd�\}}}dd	�|D�}t
|||�Vq+Wd
S(
u�Yield ``Requirement`` objects for each specification in `strs`

    `strs` must be an instance of ``basestring``, or a (possibly-nested)
    iterable thereof.
    csLg}x|||�st||�rayt��}d}Wqatk
r]td��YqaXn|||�}|s�td|d|d||d���n|j|j|��|j�}t||�}|r�|j�}q	|||�s	td|d||d���q	q	W|||�}|r?|j�}n|||fS(Niu+\ must not appear on the last nonblank lineu	Expected u inuatuExpected ',' or end-of-list in(uCONTINUEunextu
StopIterationu
ValueErroruappendugroupuenduCOMMA(uITEMu
TERMINATORulineupugroupsu	item_nameuitemsumatch(ulines(u&/tmp/pip-k8wh6o-build/pkg_resources.pyu	scan_list�	s0

*#u%parse_requirements.<locals>.scan_listuMissing distribution speciu'extra' nameiuversion speccSs(g|]\}}|t|�f�qS((usafe_version(u.0uopuval((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>�	s	u&parse_requirements.<locals>.<listcomp>N(i(ii(uiteruyield_linesuDISTROu
ValueErrorugroupuenduOBRACKETuCBRACKETuVERSIONuLINE_ENDuRequirement(ustrsu	scan_listulineumatchuproject_nameupuextrasuspecs((ulinesu&/tmp/pip-k8wh6o-build/pkg_resources.pyuparse_requirements�	s"!
$$cCsAdd�|D�}|j�dd�|D�|ddd�<dS(NcSsg|]}|j|f�qS((uhashcmp(u.0udist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>
s	u_sort_dists.<locals>.<listcomp>cSsg|]\}}|�qS(((u.0uhcud((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>
s	ii����(usort(udistsutmp((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_sort_dists�	s
u_sort_distscBst|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	e
e	�Z	dS(uRequirementcCs�|t|�|_}||j�|_|_dd�|D�}|j�dd�|D�|_|ttt	|��|_
|_|jtdd�|D��t|j�f|_
t|j
�|_dS(u>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!cSs2g|](\}}t|�t|||f�qS((u
parse_versionu
state_machine(u.0uopuv((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>

s	u(Requirement.__init__.<locals>.<listcomp>cSs(g|]\}}}}||f�qS(((u.0uparsedutransuopuver((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>
s	cSs(g|]\}}}}||f�qS(((u.0uparsedutransuopuver((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>
s	N(u	safe_nameuunsafe_nameuloweruproject_nameukeyusortuspecsutupleumapu
safe_extrauindexuextrasu	frozensetuhashCmpuhashu_Requirement__hash(uselfuproject_nameuspecsuextrasuindex((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__init__
s
"uRequirement.__init__cCsXdjdd�|jD��}dj|j�}|rDd|}nd|j||fS(Nu,cSsg|]}dj|��qS(u(ujoin(u.0us((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
<listcomp>
s	u'Requirement.__str__.<locals>.<listcomp>u[%s]u%s%s%s(ujoinuspecsuextrasuproject_name(uselfuspecsuextras((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__str__
s

uRequirement.__str__cCst|t�o|j|jkS(N(u
isinstanceuRequirementuhashCmp(uselfuother((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__eq__
suRequirement.__eq__c	Cst|t�r=|j|jkr%dS|jr[|j}q[nt|t�r[t|�}nd}dd�}x�|jD]{\}}}}||||�}|dkr�dS|dkr�dS|dkr�d}qw|dks�|dkrwd}qwqwW|dkrd}n|S(	NcSs||k||kS(N((uaub((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>$
su*Requirement.__contains__.<locals>.<lambda>uFuTu+u-FT(
u
isinstanceuDistributionukeyuFalseuindexuparsed_versionu
basestringu
parse_versionuNoneuTrue(	uselfuitemulastucompareuparsedutransuopuveruaction((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__contains__
s,		
	uRequirement.__contains__cCs|jS(N(u_Requirement__hash(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__hash__1
suRequirement.__hash__cCsdt|�S(NuRequirement.parse(%r)(ustr(uself((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu__repr__4
suRequirement.__repr__cCsWtt|��}|rDt|�dkr2|dStd|��ntd|��dS(NiiuExpected only one requirementuNo requirements found(ulistuparse_requirementsulenu
ValueError(usureqs((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuparse7
suRequirement.parseN(u__name__u
__module__u__qualname__u__init__u__str__u__eq__u__contains__u__hash__u__repr__uparseustaticmethod(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuRequirement
su--Tu<uT-Tu<=uF+Fu>uT+Fu>=uT..u==uF++u!=cCs@t|t�s9Gdd�d|t�}|jdd�S|jS(u&Get an mro for a type or classic classcBs|EeZdZdS(u_get_mro.<locals>.clsN(u__name__u
__module__u__qualname__(u
__locals__((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuclsO
suclsiN(u
isinstanceutypeuobjectu__mro__(ucls((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_get_mroL
su_get_mrocCsAx:tt|dt|���D]}||kr||SqWdS(u2Return an adapter factory for `ob` from `registry`u	__class__N(u_get_mrougetattrutype(uregistryuobut((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu
_find_adapterS
s%u
_find_adaptercCs8tjj|�}tjj|�s4tj|�ndS(u1Ensure that the parent directory of `path` existsN(uosupathudirnameuisdirumakedirs(upathudirname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyuensure_directoryZ
sccs�d}g}x�t|�D]|}|jd�r�|jd�rv|sI|rW||fVn|dd�j�}g}q�td|��q|j|�qW||fVdS(urSplit a string or iterable thereof into (section,content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    u[u]iuInvalid section headingNi����(uNoneuyield_linesu
startswithuendswithustripu
ValueErroruappend(ususectionucontentuline((u&/tmp/pip-k8wh6o-build/pkg_resources.pyusplit_sections`
s	cOsDddlm}tj}ztt_|||�SWd|t_XdS(Ni(umkstemp(utempfileumkstempuosuopenuos_open(uargsukwumkstempuold_open((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_mkstempy
s		u_mkstempcCs@x9tt�D]+}|jd�s
tt|�||<q
q
WdS(Nu_(udiru_manageru
startswithugetattr(uguname((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu_initialize�
su_initializeuobject(u__requires__cCs
|j�S(N(uactivate(udist((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<lambda>�
s(�u__doc__usysuosutimeureuimpuzipfileu	zipimportuwarningsustatu	functoolsupkgutiluget_importeruurlparseu
urlunparseuImportErroruurllib.parseu	frozensetu	NameErrorusetsuImmutableSetu
basestringunextu	cStringIOuStringIOuBytesIOustruiouNoneuexecfileuutimeumkdirurenameuunlinkuTrueu
WRITE_SUPPORTuFalseuopenuos_openuos.pathuisdirusplituversion_infouimplementationunameuimportlib._bootstrapu
_bootstrapuimportlib_bootstrapuparseru_bypass_ensure_directoryu_state_varsu_declare_stateu__getstate__u__setstate__u
_sget_dictu
_sset_dictu_sget_objectu_sset_objectu
_sget_noneu
_sset_noneuget_supported_platformu__all__u	ExceptionuResolutionErroruVersionConflictuDistributionNotFounduUnknownExtrau_provider_factoriesuversionuPY_MAJORuEGG_DISTuBINARY_DISTuSOURCE_DISTu
CHECKOUT_DISTuDEVELOP_DISTuregister_loader_typeuget_provideru_macosx_versu_macosx_archuget_build_platformucompileumacosVersionStringudarwinVersionStringuget_platformucompatible_platformsu
run_scripturun_mainuget_distributionuload_entry_pointu
get_entry_mapuget_entry_infouIMetadataProvideruIResourceProvideruobjectu
WorkingSetuEnvironmentuAvailableDistributionsuRuntimeErroruExtractionErroruResourceManageruget_default_cacheu	safe_nameusafe_versionu
safe_extrauto_filenameu
_marker_namesu_marker_valuesu	_platinfou_pyimpunormalize_exceptionuinvalid_markeruevaluate_markeru_markerlib_evaluateuglobalsuNullProvideruEggProvideruDefaultProviderutypeuSourceFileLoaderu
EmptyProvideruempty_providerubuild_zipmanifestuZipProvideruzipimporteruFileMetadatauPathMetadatauEggMetadatauregister_finderufind_distributionsufind_in_zipufind_nothingufind_on_pathuImpImporteru
FileFinderuregister_namespace_handleru
_handle_nsudeclare_namespaceufixup_namespace_packagesufile_ns_handlerunull_ns_handlerunormalize_pathu_normalize_cachedu_set_parent_nsuyield_linesumatchuLINE_ENDuCONTINUEuDISTROuVERSIONuCOMMAuOBRACKETuCBRACKETuMODULEuVERBOSEu
IGNORECASEuEGG_NAMEucomponent_reugetureplaceu_parse_version_partsu
parse_versionu
EntryPointu_remove_md5_fragmentuDistributionuDistInfoDistributionu_distributionImplu
issue_warninguparse_requirementsu_sort_distsuRequirementu
state_machineu_get_mrou
_find_adapteruensure_directoryusplit_sectionsu_mkstempu_manageru_initializeu__main__u__requires__uworking_seturequireuresolveudistuaddupathuentryuentriesu	add_entryuiter_entry_pointsu	subscribeuadd_activation_listenerulistumap(((u&/tmp/pip-k8wh6o-build/pkg_resources.pyu<module>s�




'

									1���)
	






Z	c
	!�

( 

,)n	�'?
><
	


						python3.3/site-packages/easy_install.py000064400000000176151733566740014117 0ustar00"""Run the EasyInstall command"""

if __name__ == '__main__':
    from setuptools.command.easy_install import main
    main()
python3.3/site-packages/pip/download.py000064400000054064151733566740014034 0ustar00import cgi
import email.utils
import hashlib
import getpass
import mimetypes
import os
import platform
import re
import shutil
import sys
import tempfile

import pip

from pip.backwardcompat import urllib, urlparse, raw_input
from pip.exceptions import InstallationError, HashMismatch
from pip.util import (splitext, rmtree, format_size, display_path,
                      backup_dir, ask_path_exists, unpack_file,
                      create_download_cache_folder, cache_download)
from pip.vcs import vcs
from pip.log import logger
from pip._vendor import requests, six
from pip._vendor.requests.adapters import BaseAdapter
from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
from pip._vendor.requests.compat import IncompleteRead
from pip._vendor.requests.exceptions import InvalidURL, ChunkedEncodingError
from pip._vendor.requests.models import Response
from pip._vendor.requests.structures import CaseInsensitiveDict

__all__ = ['get_file_content',
           'is_url', 'url_to_path', 'path_to_url',
           'is_archive_file', 'unpack_vcs_link',
           'unpack_file_url', 'is_vcs_url', 'is_file_url', 'unpack_http_url']


def user_agent():
    """Return a string representing the user agent."""
    _implementation = platform.python_implementation()

    if _implementation == 'CPython':
        _implementation_version = platform.python_version()
    elif _implementation == 'PyPy':
        _implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                                sys.pypy_version_info.minor,
                                                sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            _implementation_version = ''.join([
                _implementation_version,
                sys.pypy_version_info.releaselevel,
            ])
    elif _implementation == 'Jython':
        _implementation_version = platform.python_version()  # Complete Guess
    elif _implementation == 'IronPython':
        _implementation_version = platform.python_version()  # Complete Guess
    else:
        _implementation_version = 'Unknown'

    try:
        p_system = platform.system()
        p_release = platform.release()
    except IOError:
        p_system = 'Unknown'
        p_release = 'Unknown'

    return " ".join(['pip/%s' % pip.__version__,
                     '%s/%s' % (_implementation, _implementation_version),
                     '%s/%s' % (p_system, p_release)])


class MultiDomainBasicAuth(AuthBase):

    def __init__(self, prompting=True):
        self.prompting = prompting
        self.passwords = {}

    def __call__(self, req):
        parsed = urlparse.urlparse(req.url)

        # Get the netloc without any embedded credentials
        netloc = parsed.netloc.split("@", 1)[-1]

        # Set the url of the request to the url without any credentials
        req.url = urlparse.urlunparse(parsed[:1] + (netloc,) + parsed[2:])

        # Use any stored credentials that we have for this netloc
        username, password = self.passwords.get(netloc, (None, None))

        # Extract credentials embedded in the url if we have none stored
        if username is None:
            username, password = self.parse_credentials(parsed.netloc)

        if username or password:
            # Store the username and password
            self.passwords[netloc] = (username, password)

            # Send the basic auth with this request
            req = HTTPBasicAuth(username or "", password or "")(req)

        # Attach a hook to handle 401 responses
        req.register_hook("response", self.handle_401)

        return req

    def handle_401(self, resp, **kwargs):
        # We only care about 401 responses, anything else we want to just
        #   pass through the actual response
        if resp.status_code != 401:
            return resp

        # We are not able to prompt the user so simple return the response
        if not self.prompting:
            return resp

        parsed = urlparse.urlparse(resp.url)

        # Prompt the user for a new username and password
        username = raw_input("User for %s: " % parsed.netloc)
        password = getpass.getpass("Password: ")

        # Store the new username and password to use for future requests
        if username or password:
            self.passwords[parsed.netloc] = (username, password)

        # Consume content and release the original connection to allow our new
        #   request to reuse the same one.
        resp.content
        resp.raw.release_conn()

        # Add our new username and password to the request
        req = HTTPBasicAuth(username or "", password or "")(resp.request)

        # Send our new request
        new_resp = resp.connection.send(req, **kwargs)
        new_resp.history.append(resp)

        return new_resp

    def parse_credentials(self, netloc):
        if "@" in netloc:
            userinfo = netloc.rsplit("@", 1)[0]
            if ":" in userinfo:
                return userinfo.split(":", 1)
            return userinfo, None
        return None, None


class LocalFSResponse(object):

    def __init__(self, fileobj):
        self.fileobj = fileobj

    def __getattr__(self, name):
        return getattr(self.fileobj, name)

    def read(self, amt=None, decode_content=None, cache_content=False):
        return self.fileobj.read(amt)

    # Insert Hacks to Make Cookie Jar work w/ Requests
    @property
    def _original_response(self):
        class FakeMessage(object):
            def getheaders(self, header):
                return []

            def get_all(self, header, default):
                return []

        class FakeResponse(object):
            @property
            def msg(self):
                return FakeMessage()

        return FakeResponse()


class LocalFSAdapter(BaseAdapter):

    def send(self, request, stream=None, timeout=None, verify=None, cert=None,
             proxies=None):
        parsed_url = urlparse.urlparse(request.url)

        # We only work for requests with a host of localhost
        if parsed_url.netloc.lower() != "localhost":
            raise InvalidURL("Invalid URL %r: Only localhost is allowed" %
                request.url)

        real_url = urlparse.urlunparse(parsed_url[:1] + ("",) + parsed_url[2:])
        pathname = url_to_path(real_url)

        resp = Response()
        resp.status_code = 200
        resp.url = real_url

        stats = os.stat(pathname)
        modified = email.utils.formatdate(stats.st_mtime, usegmt=True)
        resp.headers = CaseInsensitiveDict({
            "Content-Type": mimetypes.guess_type(pathname)[0] or "text/plain",
            "Content-Length": stats.st_size,
            "Last-Modified": modified,
        })

        resp.raw = LocalFSResponse(open(pathname, "rb"))
        resp.close = resp.raw.close

        return resp

    def close(self):
        pass


class PipSession(requests.Session):

    timeout = None

    def __init__(self, *args, **kwargs):
        super(PipSession, self).__init__(*args, **kwargs)

        # Attach our User Agent to the request
        self.headers["User-Agent"] = user_agent()

        # Attach our Authentication handler to the session
        self.auth = MultiDomainBasicAuth()

        # Enable file:// urls
        self.mount("file://", LocalFSAdapter())

    def request(self, method, url, *args, **kwargs):
        # Make file:// urls not fail due to lack of a hostname
        parsed = urlparse.urlparse(url)
        if parsed.scheme == "file":
            url = urlparse.urlunparse(parsed[:1] + ("localhost",) + parsed[2:])

        # Allow setting a default timeout on a session
        kwargs.setdefault("timeout", self.timeout)

        # Dispatch the actual request
        return super(PipSession, self).request(method, url, *args, **kwargs)


def get_file_content(url, comes_from=None, session=None):
    """Gets the content of a file; it may be a filename, file: URL, or
    http: URL.  Returns (location, content).  Content is unicode."""
    if session is None:
        session = PipSession()

    match = _scheme_re.search(url)
    if match:
        scheme = match.group(1).lower()
        if (scheme == 'file' and comes_from
            and comes_from.startswith('http')):
            raise InstallationError(
                'Requirements file %s references URL %s, which is local'
                % (comes_from, url))
        if scheme == 'file':
            path = url.split(':', 1)[1]
            path = path.replace('\\', '/')
            match = _url_slash_drive_re.match(path)
            if match:
                path = match.group(1) + ':' + path.split('|', 1)[1]
            path = urllib.unquote(path)
            if path.startswith('/'):
                path = '/' + path.lstrip('/')
            url = path
        else:
            ## FIXME: catch some errors
            resp = session.get(url)
            resp.raise_for_status()

            if six.PY3:
                return resp.url, resp.text
            else:
                return resp.url, resp.content
    try:
        f = open(url)
        content = f.read()
    except IOError:
        e = sys.exc_info()[1]
        raise InstallationError('Could not open requirements file: %s' % str(e))
    else:
        f.close()
    return url, content


_scheme_re = re.compile(r'^(http|https|file):', re.I)
_url_slash_drive_re = re.compile(r'/*([a-z])\|', re.I)


def is_url(name):
    """Returns true if the name looks like a URL"""
    if ':' not in name:
        return False
    scheme = name.split(':', 1)[0].lower()
    return scheme in ['http', 'https', 'file', 'ftp'] + vcs.all_schemes


def url_to_path(url):
    """
    Convert a file: URL to a path.
    """
    assert url.startswith('file:'), (
        "You can only turn file: urls into filenames (not %r)" % url)
    path = url[len('file:'):].lstrip('/')
    path = urllib.unquote(path)
    if _url_drive_re.match(path):
        path = path[0] + ':' + path[2:]
    else:
        path = '/' + path
    return path


_drive_re = re.compile('^([a-z]):', re.I)
_url_drive_re = re.compile('^([a-z])[:|]', re.I)


def path_to_url(path):
    """
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    """
    path = os.path.normpath(os.path.abspath(path))
    drive, path = os.path.splitdrive(path)
    filepath = path.split(os.path.sep)
    url = '/'.join([urllib.quote(part) for part in filepath])
    if not drive:
        url = url.lstrip('/')
    return 'file:///' + drive + url


def is_archive_file(name):
    """Return True if `name` is a considered as an archive file."""
    archives = ('.zip', '.tar.gz', '.tar.bz2', '.tgz', '.tar', '.pybundle',
               '.whl')
    ext = splitext(name)[1].lower()
    if ext in archives:
        return True
    return False


def unpack_vcs_link(link, location, only_download=False):
    vcs_backend = _get_used_vcs_backend(link)
    if only_download:
        vcs_backend.export(location)
    else:
        vcs_backend.unpack(location)


def _get_used_vcs_backend(link):
    for backend in vcs.backends:
        if link.scheme in backend.schemes:
            vcs_backend = backend(link.url)
            return vcs_backend


def is_vcs_url(link):
    return bool(_get_used_vcs_backend(link))


def is_file_url(link):
    return link.url.lower().startswith('file:')


def _check_hash(download_hash, link):
    if download_hash.digest_size != hashlib.new(link.hash_name).digest_size:
        logger.fatal("Hash digest size of the package %d (%s) doesn't match the expected hash name %s!"
                    % (download_hash.digest_size, link, link.hash_name))
        raise HashMismatch('Hash name mismatch for package %s' % link)
    if download_hash.hexdigest() != link.hash:
        logger.fatal("Hash of the package %s (%s) doesn't match the expected hash %s!"
                     % (link, download_hash.hexdigest(), link.hash))
        raise HashMismatch('Bad %s hash for package %s' % (link.hash_name, link))


def _get_hash_from_file(target_file, link):
    try:
        download_hash = hashlib.new(link.hash_name)
    except (ValueError, TypeError):
        logger.warn("Unsupported hash name %s for package %s" % (link.hash_name, link))
        return None

    fp = open(target_file, 'rb')
    while True:
        chunk = fp.read(4096)
        if not chunk:
            break
        download_hash.update(chunk)
    fp.close()
    return download_hash


def _download_url(resp, link, temp_location):
    fp = open(temp_location, 'wb')
    download_hash = None
    if link.hash and link.hash_name:
        try:
            download_hash = hashlib.new(link.hash_name)
        except ValueError:
            logger.warn("Unsupported hash name %s for package %s" % (link.hash_name, link))
    try:
        total_length = int(resp.headers['content-length'])
    except (ValueError, KeyError, TypeError):
        total_length = 0
    downloaded = 0
    show_progress = total_length > 40 * 1000 or not total_length
    show_url = link.show_url
    try:
        if show_progress:
            ## FIXME: the URL can get really long in this message:
            if total_length:
                logger.start_progress('Downloading %s (%s): ' % (show_url, format_size(total_length)))
            else:
                logger.start_progress('Downloading %s (unknown size): ' % show_url)
        else:
            logger.notify('Downloading %s' % show_url)
        logger.info('Downloading from URL %s' % link)

        def resp_read(chunk_size):
            try:
                # Special case for urllib3.
                try:
                    for chunk in resp.raw.stream(
                            chunk_size, decode_content=False):
                        yield chunk
                except IncompleteRead as e:
                    raise ChunkedEncodingError(e)
            except AttributeError:
                # Standard file-like object.
                while True:
                    chunk = resp.raw.read(chunk_size)
                    if not chunk:
                        break
                    yield chunk

        for chunk in resp_read(4096):
            downloaded += len(chunk)
            if show_progress:
                if not total_length:
                    logger.show_progress('%s' % format_size(downloaded))
                else:
                    logger.show_progress('%3i%%  %s' % (100 * downloaded / total_length, format_size(downloaded)))
            if download_hash is not None:
                download_hash.update(chunk)
            fp.write(chunk)
        fp.close()
    finally:
        if show_progress:
            logger.end_progress('%s downloaded' % format_size(downloaded))
    return download_hash


def _copy_file(filename, location, content_type, link):
    copy = True
    download_location = os.path.join(location, link.filename)
    if os.path.exists(download_location):
        response = ask_path_exists(
            'The file %s exists. (i)gnore, (w)ipe, (b)ackup ' %
            display_path(download_location), ('i', 'w', 'b'))
        if response == 'i':
            copy = False
        elif response == 'w':
            logger.warn('Deleting %s' % display_path(download_location))
            os.remove(download_location)
        elif response == 'b':
            dest_file = backup_dir(download_location)
            logger.warn('Backing up %s to %s'
                        % (display_path(download_location), display_path(dest_file)))
            shutil.move(download_location, dest_file)
    if copy:
        shutil.copy(filename, download_location)
        logger.notify('Saved %s' % display_path(download_location))


def unpack_http_url(link, location, download_cache, download_dir=None,
                    session=None):
    if session is None:
        session = PipSession()

    temp_dir = tempfile.mkdtemp('-unpack', 'pip-')
    temp_location = None
    target_url = link.url.split('#', 1)[0]
    already_cached = False
    cache_file = None
    cache_content_type_file = None
    download_hash = None

    # If a download cache is specified, is the file cached there?
    if download_cache:
        cache_file = os.path.join(download_cache,
                                   urllib.quote(target_url, ''))
        cache_content_type_file = cache_file + '.content-type'
        already_cached = (
            os.path.exists(cache_file) and
            os.path.exists(cache_content_type_file)
            )
        if not os.path.isdir(download_cache):
            create_download_cache_folder(download_cache)

    # If a download dir is specified, is the file already downloaded there?
    already_downloaded = None
    if download_dir:
        already_downloaded = os.path.join(download_dir, link.filename)
        if not os.path.exists(already_downloaded):
            already_downloaded = None

    # If already downloaded, does it's hash match?
    if already_downloaded:
        temp_location = already_downloaded
        content_type = mimetypes.guess_type(already_downloaded)[0]
        logger.notify('File was already downloaded %s' % already_downloaded)
        if link.hash:
            download_hash = _get_hash_from_file(temp_location, link)
            try:
                _check_hash(download_hash, link)
            except HashMismatch:
                logger.warn(
                    'Previously-downloaded file %s has bad hash, '
                    're-downloading.' % temp_location
                    )
                temp_location = None
                os.unlink(already_downloaded)
                already_downloaded = None

    # If not a valid download, let's confirm the cached file is valid
    if already_cached and not temp_location:
        with open(cache_content_type_file) as fp:
            content_type = fp.read().strip()
        temp_location = cache_file
        logger.notify('Using download cache from %s' % cache_file)
        if link.hash and link.hash_name:
            download_hash = _get_hash_from_file(cache_file, link)
            try:
                _check_hash(download_hash, link)
            except HashMismatch:
                logger.warn(
                    'Cached file %s has bad hash, '
                    're-downloading.' % temp_location
                    )
                temp_location = None
                os.unlink(cache_file)
                os.unlink(cache_content_type_file)
                already_cached = False

    # We don't have either a cached or a downloaded copy
    # let's download to a tmp dir
    if not temp_location:
        try:
            resp = session.get(target_url, stream=True)
            resp.raise_for_status()
        except requests.HTTPError as exc:
            logger.fatal("HTTP error %s while getting %s" %
                         (exc.response.status_code, link))
            raise

        content_type = resp.headers.get('content-type', '')
        filename = link.filename  # fallback
        # Have a look at the Content-Disposition header for a better guess
        content_disposition = resp.headers.get('content-disposition')
        if content_disposition:
            type, params = cgi.parse_header(content_disposition)
            # We use ``or`` here because we don't want to use an "empty" value
            # from the filename param.
            filename = params.get('filename') or filename
        ext = splitext(filename)[1]
        if not ext:
            ext = mimetypes.guess_extension(content_type)
            if ext:
                filename += ext
        if not ext and link.url != resp.url:
            ext = os.path.splitext(resp.url)[1]
            if ext:
                filename += ext
        temp_location = os.path.join(temp_dir, filename)
        download_hash = _download_url(resp, link, temp_location)
        if link.hash and link.hash_name:
            _check_hash(download_hash, link)

    # a download dir is specified; let's copy the archive there
    if download_dir and not already_downloaded:
        _copy_file(temp_location, download_dir, content_type, link)

    # unpack the archive to the build dir location. even when only downloading
    # archives, they have to be unpacked to parse dependencies
    unpack_file(temp_location, location, content_type, link)

    # if using a download cache, cache it, if needed
    if cache_file and not already_cached:
        cache_download(cache_file, temp_location, content_type)

    if not (already_cached or already_downloaded):
        os.unlink(temp_location)

    os.rmdir(temp_dir)


def unpack_file_url(link, location, download_dir=None):

    link_path = url_to_path(link.url_without_fragment)
    already_downloaded = False

    # If it's a url to a local directory
    if os.path.isdir(link_path):
        if os.path.isdir(location):
            rmtree(location)
        shutil.copytree(link_path, location, symlinks=True)
        return

    # if link has a hash, let's confirm it matches
    if link.hash:
        link_path_hash = _get_hash_from_file(link_path, link)
        _check_hash(link_path_hash, link)

    # If a download dir is specified, is the file already there and valid?
    if download_dir:
        download_path = os.path.join(download_dir, link.filename)
        if os.path.exists(download_path):
            content_type = mimetypes.guess_type(download_path)[0]
            logger.notify('File was already downloaded %s' % download_path)
            if link.hash:
                download_hash = _get_hash_from_file(download_path, link)
                try:
                    _check_hash(download_hash, link)
                    already_downloaded = True
                except HashMismatch:
                    logger.warn(
                        'Previously-downloaded file %s has bad hash, '
                        're-downloading.' % link_path
                        )
                    os.unlink(download_path)
            else:
                already_downloaded = True

    if already_downloaded:
        from_path = download_path
    else:
        from_path = link_path

    content_type = mimetypes.guess_type(from_path)[0]

    # unpack the archive to the build dir location. even when only downloading
    # archives, they have to be unpacked to parse dependencies
    unpack_file(from_path, location, content_type, link)

    # a download dir is specified and not already downloaded
    if download_dir and not already_downloaded:
        _copy_file(from_path, download_dir, content_type, link)
python3.3/site-packages/pip/index.py000064400000116723151733566740013335 0ustar00"""Routines related to PyPI, indexes"""

import sys
import os
import re
import mimetypes
import posixpath

from pip.log import logger
from pip.util import Inf, normalize_name, splitext, is_prerelease
from pip.exceptions import (DistributionNotFound, BestVersionAlreadyInstalled,
                            InstallationError, InvalidWheelFilename, UnsupportedWheel)
from pip.backwardcompat import urlparse, url2pathname
from pip.download import PipSession, url_to_path, path_to_url
from pip.wheel import Wheel, wheel_ext
from pip.pep425tags import supported_tags, supported_tags_noarch, get_platform
from pip._vendor import html5lib, requests, pkg_resources
from pip._vendor.requests.exceptions import SSLError


__all__ = ['PackageFinder']


DEFAULT_MIRROR_HOSTNAME = "last.pypi.python.org"

INSECURE_SCHEMES = {
    "http": ["https"],
}


class PackageFinder(object):
    """This finds packages.

    This is meant to match easy_install's technique for looking for
    packages, by reading pages and looking for appropriate links
    """

    def __init__(self, find_links, index_urls,
            use_wheel=True, allow_external=[], allow_unverified=[],
            allow_all_external=False, allow_all_prereleases=False,
            process_dependency_links=False, session=None):
        self.find_links = find_links
        self.index_urls = index_urls
        self.dependency_links = []
        self.cache = PageCache()
        # These are boring links that have already been logged somehow:
        self.logged_links = set()

        self.use_wheel = use_wheel

        # Do we allow (safe and verifiable) externally hosted files?
        self.allow_external = set(normalize_name(n) for n in allow_external)

        # Which names are allowed to install insecure and unverifiable files?
        self.allow_unverified = set(
            normalize_name(n) for n in allow_unverified
        )

        # Anything that is allowed unverified is also allowed external
        self.allow_external |= self.allow_unverified

        # Do we allow all (safe and verifiable) externally hosted files?
        self.allow_all_external = allow_all_external

        # Stores if we ignored any external links so that we can instruct
        #   end users how to install them if no distributions are available
        self.need_warn_external = False

        # Stores if we ignored any unsafe links so that we can instruct
        #   end users how to install them if no distributions are available
        self.need_warn_unverified = False

        # Do we want to allow _all_ pre-releases?
        self.allow_all_prereleases = allow_all_prereleases

        # Do we process dependency links?
        self.process_dependency_links = process_dependency_links
        self._have_warned_dependency_links = False

        # The Session we'll use to make requests
        self.session = session or PipSession()

    def add_dependency_links(self, links):
        ## FIXME: this shouldn't be global list this, it should only
        ## apply to requirements of the package that specifies the
        ## dependency_links value
        ## FIXME: also, we should track comes_from (i.e., use Link)
        if self.process_dependency_links:
            if not self._have_warned_dependency_links:
                logger.deprecated(
                    "1.6",
                    "Dependency Links processing has been deprecated with an "
                    "accelerated time schedule and will be removed in pip 1.6",
                )
                self._have_warned_dependency_links = True
            self.dependency_links.extend(links)

    def _sort_locations(self, locations):
        """
        Sort locations into "files" (archives) and "urls", and return
        a pair of lists (files,urls)
        """
        files = []
        urls = []

        # puts the url for the given file path into the appropriate list
        def sort_path(path):
            url = path_to_url(path)
            if mimetypes.guess_type(url, strict=False)[0] == 'text/html':
                urls.append(url)
            else:
                files.append(url)

        for url in locations:

            is_local_path = os.path.exists(url)
            is_file_url = url.startswith('file:')
            is_find_link = url in self.find_links

            if is_local_path or is_file_url:
                if is_local_path:
                    path = url
                else:
                    path = url_to_path(url)
                if is_find_link and os.path.isdir(path):
                    path = os.path.realpath(path)
                    for item in os.listdir(path):
                        sort_path(os.path.join(path, item))
                elif is_file_url and os.path.isdir(path):
                    urls.append(url)
                elif os.path.isfile(path):
                    sort_path(path)
            else:
                urls.append(url)

        return files, urls

    def _link_sort_key(self, link_tuple):
        """
        Function used to generate link sort key for link tuples.
        The greater the return value, the more preferred it is.
        If not finding wheels, then sorted by version only.
        If finding wheels, then the sort order is by version, then:
          1. existing installs
          2. wheels ordered via Wheel.support_index_min()
          3. source archives
        Note: it was considered to embed this logic into the Link
              comparison operators, but then different sdist links
              with the same version, would have to be considered equal
        """
        parsed_version, link, _ = link_tuple
        if self.use_wheel:
            support_num = len(supported_tags)
            if link == INSTALLED_VERSION:
                pri = 1
            elif link.ext == wheel_ext:
                wheel = Wheel(link.filename) # can raise InvalidWheelFilename
                if not wheel.supported():
                    raise UnsupportedWheel("%s is not a supported wheel for this platform. It can't be sorted." % wheel.filename)
                pri = -(wheel.support_index_min())
            else: # sdist
                pri = -(support_num)
            return (parsed_version, pri)
        else:
            return parsed_version

    def _sort_versions(self, applicable_versions):
        """
        Bring the latest version (and wheels) to the front, but maintain the existing ordering as secondary.
        See the docstring for `_link_sort_key` for details.
        This function is isolated for easier unit testing.
        """
        return sorted(applicable_versions, key=self._link_sort_key, reverse=True)

    def find_requirement(self, req, upgrade):

        def mkurl_pypi_url(url):
            loc = posixpath.join(url, url_name)
            # For maximum compatibility with easy_install, ensure the path
            # ends in a trailing slash.  Although this isn't in the spec
            # (and PyPI can handle it without the slash) some other index
            # implementations might break if they relied on easy_install's behavior.
            if not loc.endswith('/'):
                loc = loc + '/'
            return loc

        url_name = req.url_name
        # Only check main index if index URL is given:
        main_index_url = None
        if self.index_urls:
            # Check that we have the url_name correctly spelled:
            main_index_url = Link(mkurl_pypi_url(self.index_urls[0]), trusted=True)
            # This will also cache the page, so it's okay that we get it again later:
            page = self._get_page(main_index_url, req)
            if page is None:
                url_name = self._find_url_name(Link(self.index_urls[0], trusted=True), url_name, req) or req.url_name

        if url_name is not None:
            locations = [
                mkurl_pypi_url(url)
                for url in self.index_urls] + self.find_links
        else:
            locations = list(self.find_links)
        for version in req.absolute_versions:
            if url_name is not None and main_index_url is not None:
                locations = [
                    posixpath.join(main_index_url.url, version)] + locations

        file_locations, url_locations = self._sort_locations(locations)
        _flocations, _ulocations = self._sort_locations(self.dependency_links)
        file_locations.extend(_flocations)

        # We trust every url that the user has given us whether it was given
        #   via --index-url or --find-links
        locations = [Link(url, trusted=True) for url in url_locations]

        # We explicitly do not trust links that came from dependency_links
        locations.extend([Link(url) for url in _ulocations])

        logger.debug('URLs to search for versions for %s:' % req)
        for location in locations:
            logger.debug('* %s' % location)

            # Determine if this url used a secure transport mechanism
            parsed = urlparse.urlparse(str(location))
            if parsed.scheme in INSECURE_SCHEMES:
                secure_schemes = INSECURE_SCHEMES[parsed.scheme]

                if len(secure_schemes) == 1:
                    ctx = (location, parsed.scheme, secure_schemes[0],
                           parsed.netloc)
                    logger.warn("%s uses an insecure transport scheme (%s). "
                                "Consider using %s if %s has it available" %
                                ctx)
                elif len(secure_schemes) > 1:
                    ctx = (location, parsed.scheme, ", ".join(secure_schemes),
                                                                parsed.netloc)
                    logger.warn("%s uses an insecure transport scheme (%s). "
                                "Consider using one of %s if %s has any of "
                                "them available" % ctx)
                else:
                    ctx = (location, parsed.scheme)
                    logger.warn("%s uses an insecure transport scheme (%s)." %
                                ctx)

        found_versions = []
        found_versions.extend(
            self._package_versions(
                # We trust every directly linked archive in find_links
                [Link(url, '-f', trusted=True) for url in self.find_links], req.name.lower()))
        page_versions = []
        for page in self._get_pages(locations, req):
            logger.debug('Analyzing links from page %s' % page.url)
            logger.indent += 2
            try:
                page_versions.extend(self._package_versions(page.links, req.name.lower()))
            finally:
                logger.indent -= 2
        dependency_versions = list(self._package_versions(
            [Link(url) for url in self.dependency_links], req.name.lower()))
        if dependency_versions:
            logger.info('dependency_links found: %s' % ', '.join([link.url for parsed, link, version in dependency_versions]))
        file_versions = list(self._package_versions(
                [Link(url) for url in file_locations], req.name.lower()))
        if not found_versions and not page_versions and not dependency_versions and not file_versions:
            logger.fatal('Could not find any downloads that satisfy the requirement %s' % req)

            if self.need_warn_external:
                logger.warn("Some externally hosted files were ignored (use "
                            "--allow-external %s to allow)." % req.name)

            if self.need_warn_unverified:
                logger.warn("Some insecure and unverifiable files were ignored"
                            " (use --allow-unverified %s to allow)." %
                            req.name)

            raise DistributionNotFound('No distributions at all found for %s' % req)
        installed_version = []
        if req.satisfied_by is not None:
            installed_version = [(req.satisfied_by.parsed_version, INSTALLED_VERSION, req.satisfied_by.version)]
        if file_versions:
            file_versions.sort(reverse=True)
            logger.info('Local files found: %s' % ', '.join([url_to_path(link.url) for parsed, link, version in file_versions]))
        #this is an intentional priority ordering
        all_versions = installed_version + file_versions + found_versions + page_versions + dependency_versions
        applicable_versions = []
        for (parsed_version, link, version) in all_versions:
            if version not in req.req:
                logger.info("Ignoring link %s, version %s doesn't match %s"
                            % (link, version, ','.join([''.join(s) for s in req.req.specs])))
                continue
            elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
                # If this version isn't the already installed one, then
                #   ignore it if it's a pre-release.
                if link is not INSTALLED_VERSION:
                    logger.info("Ignoring link %s, version %s is a pre-release (use --pre to allow)." % (link, version))
                    continue
            applicable_versions.append((parsed_version, link, version))
        applicable_versions = self._sort_versions(applicable_versions)
        existing_applicable = bool([link for parsed_version, link, version in applicable_versions if link is INSTALLED_VERSION])
        if not upgrade and existing_applicable:
            if applicable_versions[0][1] is INSTALLED_VERSION:
                logger.info('Existing installed version (%s) is most up-to-date and satisfies requirement'
                            % req.satisfied_by.version)
            else:
                logger.info('Existing installed version (%s) satisfies requirement (most up-to-date version is %s)'
                            % (req.satisfied_by.version, applicable_versions[0][2]))
            return None
        if not applicable_versions:
            logger.fatal('Could not find a version that satisfies the requirement %s (from versions: %s)'
                         % (req, ', '.join([version for parsed_version, link, version in all_versions])))

            if self.need_warn_external:
                logger.warn("Some externally hosted files were ignored (use "
                            "--allow-external to allow).")

            if self.need_warn_unverified:
                logger.warn("Some insecure and unverifiable files were ignored"
                            " (use --allow-unverified %s to allow)." %
                            req.name)

            raise DistributionNotFound('No distributions matching the version for %s' % req)
        if applicable_versions[0][1] is INSTALLED_VERSION:
            # We have an existing version, and its the best version
            logger.info('Installed version (%s) is most up-to-date (past versions: %s)'
                        % (req.satisfied_by.version, ', '.join([version for parsed_version, link, version in applicable_versions[1:]]) or 'none'))
            raise BestVersionAlreadyInstalled
        if len(applicable_versions) > 1:
            logger.info('Using version %s (newest of versions: %s)' %
                        (applicable_versions[0][2], ', '.join([version for parsed_version, link, version in applicable_versions])))

        selected_version = applicable_versions[0][1]

        if (selected_version.internal is not None
                and not selected_version.internal):
            logger.warn("%s an externally hosted file and may be "
                        "unreliable" % req.name)

        if (selected_version.verifiable is not None
                and not selected_version.verifiable):
            logger.warn("%s is potentially insecure and "
                        "unverifiable." % req.name)

        if selected_version._deprecated_regex:
            logger.deprecated(
                "1.7",
                "%s discovered using a deprecated method of parsing, "
                "in the future it will no longer be discovered" % req.name
            )

        return selected_version


    def _find_url_name(self, index_url, url_name, req):
        """Finds the true URL name of a package, when the given name isn't quite correct.
        This is usually used to implement case-insensitivity."""
        if not index_url.url.endswith('/'):
            # Vaguely part of the PyPI API... weird but true.
            ## FIXME: bad to modify this?
            index_url.url += '/'
        page = self._get_page(index_url, req)
        if page is None:
            logger.fatal('Cannot fetch index base URL %s' % index_url)
            return
        norm_name = normalize_name(req.url_name)
        for link in page.links:
            base = posixpath.basename(link.path.rstrip('/'))
            if norm_name == normalize_name(base):
                logger.notify('Real name of requirement %s is %s' % (url_name, base))
                return base
        return None

    def _get_pages(self, locations, req):
        """
        Yields (page, page_url) from the given locations, skipping
        locations that have errors, and adding download/homepage links
        """
        all_locations = list(locations)
        seen = set()

        while all_locations:
            location = all_locations.pop(0)
            if location in seen:
                continue
            seen.add(location)

            page = self._get_page(location, req)
            if page is None:
                continue

            yield page

            for link in page.rel_links():
                normalized = normalize_name(req.name).lower()

                if (not normalized in self.allow_external
                        and not self.allow_all_external):
                    self.need_warn_external = True
                    logger.debug("Not searching %s for files because external "
                                 "urls are disallowed." % link)
                    continue

                if (link.trusted is not None
                        and not link.trusted
                        and not normalized in self.allow_unverified):
                    logger.debug("Not searching %s for urls, it is an "
                                "untrusted link and cannot produce safe or "
                                "verifiable files." % link)
                    self.need_warn_unverified = True
                    continue

                all_locations.append(link)

    _egg_fragment_re = re.compile(r'#egg=([^&]*)')
    _egg_info_re = re.compile(r'([a-z0-9_.]+)-([a-z0-9_.-]+)', re.I)
    _py_version_re = re.compile(r'-py([123]\.?[0-9]?)$')

    def _sort_links(self, links):
        "Returns elements of links in order, non-egg links first, egg links second, while eliminating duplicates"
        eggs, no_eggs = [], []
        seen = set()
        for link in links:
            if link not in seen:
                seen.add(link)
                if link.egg_fragment:
                    eggs.append(link)
                else:
                    no_eggs.append(link)
        return no_eggs + eggs

    def _package_versions(self, links, search_name):
        for link in self._sort_links(links):
            for v in self._link_package_versions(link, search_name):
                yield v

    def _known_extensions(self):
        extensions = ('.tar.gz', '.tar.bz2', '.tar', '.tgz', '.zip')
        if self.use_wheel:
            return extensions + (wheel_ext,)
        return extensions

    def _link_package_versions(self, link, search_name):
        """
        Return an iterable of triples (pkg_resources_version_key,
        link, python_version) that can be extracted from the given
        link.

        Meant to be overridden by subclasses, not called by clients.
        """
        platform = get_platform()

        version = None
        if link.egg_fragment:
            egg_info = link.egg_fragment
        else:
            egg_info, ext = link.splitext()
            if not ext:
                if link not in self.logged_links:
                    logger.debug('Skipping link %s; not a file' % link)
                    self.logged_links.add(link)
                return []
            if egg_info.endswith('.tar'):
                # Special double-extension case:
                egg_info = egg_info[:-4]
                ext = '.tar' + ext
            if ext not in self._known_extensions():
                if link not in self.logged_links:
                    logger.debug('Skipping link %s; unknown archive format: %s' % (link, ext))
                    self.logged_links.add(link)
                return []
            if "macosx10" in link.path and ext == '.zip':
                if link not in self.logged_links:
                    logger.debug('Skipping link %s; macosx10 one' % (link))
                    self.logged_links.add(link)
                return []
            if ext == wheel_ext:
                try:
                    wheel = Wheel(link.filename)
                except InvalidWheelFilename:
                    logger.debug('Skipping %s because the wheel filename is invalid' % link)
                    return []
                if wheel.name.lower() != search_name.lower():
                    logger.debug('Skipping link %s; wrong project name (not %s)' % (link, search_name))
                    return []
                if not wheel.supported():
                    logger.debug('Skipping %s because it is not compatible with this Python' % link)
                    return []
                # This is a dirty hack to prevent installing Binary Wheels from
                # PyPI unless it is a Windows or Mac Binary Wheel. This is
                # paired with a change to PyPI disabling uploads for the
                # same. Once we have a mechanism for enabling support for binary
                # wheels on linux that deals with the inherent problems of
                # binary distribution this can be removed.
                comes_from = getattr(link, "comes_from", None)
                if ((
                        not platform.startswith('win')
                        and not platform.startswith('macosx')
                        )
                    and comes_from is not None
                    and urlparse.urlparse(comes_from.url).netloc.endswith(
                                                        "pypi.python.org")):
                    if not wheel.supported(tags=supported_tags_noarch):
                        logger.debug(
                            "Skipping %s because it is a pypi-hosted binary "
                            "Wheel on an unsupported platform" % link
                        )
                        return []
                version = wheel.version

        if not version:
            version = self._egg_info_matches(egg_info, search_name, link)
        if version is None:
            logger.debug('Skipping link %s; wrong project name (not %s)' % (link, search_name))
            return []

        if (link.internal is not None
                and not link.internal
                and not normalize_name(search_name).lower() in self.allow_external
                and not self.allow_all_external):
            # We have a link that we are sure is external, so we should skip
            #   it unless we are allowing externals
            logger.debug("Skipping %s because it is externally hosted." % link)
            self.need_warn_external = True
            return []

        if (link.verifiable is not None
                and not link.verifiable
                and not (normalize_name(search_name).lower()
                    in self.allow_unverified)):
            # We have a link that we are sure we cannot verify it's integrity,
            #   so we should skip it unless we are allowing unsafe installs
            #   for this requirement.
            logger.debug("Skipping %s because it is an insecure and "
                         "unverifiable file." % link)
            self.need_warn_unverified = True
            return []

        match = self._py_version_re.search(version)
        if match:
            version = version[:match.start()]
            py_version = match.group(1)
            if py_version != sys.version[:3]:
                logger.debug('Skipping %s because Python version is incorrect' % link)
                return []
        logger.debug('Found link %s, version: %s' % (link, version))
        return [(pkg_resources.parse_version(version),
               link,
               version)]

    def _egg_info_matches(self, egg_info, search_name, link):
        match = self._egg_info_re.search(egg_info)
        if not match:
            logger.debug('Could not parse version from link: %s' % link)
            return None
        name = match.group(0).lower()
        # To match the "safe" name that pkg_resources creates:
        name = name.replace('_', '-')
        # project name and version must be separated by a dash
        look_for = search_name.lower() + "-"
        if name.startswith(look_for):
            return match.group(0)[len(look_for):]
        else:
            return None

    def _get_page(self, link, req):
        return HTMLPage.get_page(link, req,
            cache=self.cache,
            session=self.session,
        )


class PageCache(object):
    """Cache of HTML pages"""

    failure_limit = 3

    def __init__(self):
        self._failures = {}
        self._pages = {}
        self._archives = {}

    def too_many_failures(self, url):
        return self._failures.get(url, 0) >= self.failure_limit

    def get_page(self, url):
        return self._pages.get(url)

    def is_archive(self, url):
        return self._archives.get(url, False)

    def set_is_archive(self, url, value=True):
        self._archives[url] = value

    def add_page_failure(self, url, level):
        self._failures[url] = self._failures.get(url, 0)+level

    def add_page(self, urls, page):
        for url in urls:
            self._pages[url] = page


class HTMLPage(object):
    """Represents one page, along with its URL"""

    ## FIXME: these regexes are horrible hacks:
    _homepage_re = re.compile(r'<th>\s*home\s*page', re.I)
    _download_re = re.compile(r'<th>\s*download\s+url', re.I)
    _href_re = re.compile('href=(?:"([^"]*)"|\'([^\']*)\'|([^>\\s\\n]*))', re.I|re.S)

    def __init__(self, content, url, headers=None, trusted=None):
        self.content = content
        self.parsed = html5lib.parse(self.content, namespaceHTMLElements=False)
        self.url = url
        self.headers = headers
        self.trusted = trusted

    def __str__(self):
        return self.url

    @classmethod
    def get_page(cls, link, req, cache=None, skip_archives=True, session=None):
        if session is None:
            session = PipSession()

        url = link.url
        url = url.split('#', 1)[0]
        if cache.too_many_failures(url):
            return None

        # Check for VCS schemes that do not support lookup as web pages.
        from pip.vcs import VcsSupport
        for scheme in VcsSupport.schemes:
            if url.lower().startswith(scheme) and url[len(scheme)] in '+:':
                logger.debug('Cannot look at %(scheme)s URL %(link)s' % locals())
                return None

        if cache is not None:
            inst = cache.get_page(url)
            if inst is not None:
                return inst
        try:
            if skip_archives:
                if cache is not None:
                    if cache.is_archive(url):
                        return None
                filename = link.filename
                for bad_ext in ['.tar', '.tar.gz', '.tar.bz2', '.tgz', '.zip']:
                    if filename.endswith(bad_ext):
                        content_type = cls._get_content_type(url,
                            session=session,
                        )
                        if content_type.lower().startswith('text/html'):
                            break
                        else:
                            logger.debug('Skipping page %s because of Content-Type: %s' % (link, content_type))
                            if cache is not None:
                                cache.set_is_archive(url)
                            return None
            logger.debug('Getting page %s' % url)

            # Tack index.html onto file:// URLs that point to directories
            (scheme, netloc, path, params, query, fragment) = urlparse.urlparse(url)
            if scheme == 'file' and os.path.isdir(url2pathname(path)):
                # add trailing slash if not present so urljoin doesn't trim final segment
                if not url.endswith('/'):
                    url += '/'
                url = urlparse.urljoin(url, 'index.html')
                logger.debug(' file: URL is directory, getting %s' % url)

            resp = session.get(url, headers={"Accept": "text/html"})
            resp.raise_for_status()

            # The check for archives above only works if the url ends with
            #   something that looks like an archive. However that is not a
            #   requirement. For instance http://sourceforge.net/projects/docutils/files/docutils/0.8.1/docutils-0.8.1.tar.gz/download
            #   redirects to http://superb-dca3.dl.sourceforge.net/project/docutils/docutils/0.8.1/docutils-0.8.1.tar.gz
            #   Unless we issue a HEAD request on every url we cannot know
            #   ahead of time for sure if something is HTML or not. However we
            #   can check after we've downloaded it.
            content_type = resp.headers.get('Content-Type', 'unknown')
            if not content_type.lower().startswith("text/html"):
                logger.debug('Skipping page %s because of Content-Type: %s' %
                                            (link, content_type))
                if cache is not None:
                    cache.set_is_archive(url)
                return None

            inst = cls(resp.text, resp.url, resp.headers, trusted=link.trusted)
        except requests.HTTPError as exc:
            level = 2 if exc.response.status_code == 404 else 1
            cls._handle_fail(req, link, exc, url, cache=cache, level=level)
        except requests.ConnectionError as exc:
            cls._handle_fail(
                req, link, "connection error: %s" % exc, url,
                cache=cache,
            )
        except requests.Timeout:
            cls._handle_fail(req, link, "timed out", url, cache=cache)
        except SSLError as exc:
            reason = ("There was a problem confirming the ssl certificate: "
                      "%s" % exc)
            cls._handle_fail(req, link, reason, url,
                cache=cache,
                level=2,
                meth=logger.notify,
            )
        else:
            if cache is not None:
                cache.add_page([url, resp.url], inst)
            return inst

    @staticmethod
    def _handle_fail(req, link, reason, url, cache=None, level=1, meth=None):
        if meth is None:
            meth = logger.info

        meth("Could not fetch URL %s: %s", link, reason)
        meth("Will skip URL %s when looking for download links for %s" %
             (link.url, req))

        if cache is not None:
            cache.add_page_failure(url, level)

    @staticmethod
    def _get_content_type(url, session=None):
        """Get the Content-Type of the given url, using a HEAD request"""
        if session is None:
            session = PipSession()

        scheme, netloc, path, query, fragment = urlparse.urlsplit(url)
        if not scheme in ('http', 'https', 'ftp', 'ftps'):
            ## FIXME: some warning or something?
            ## assertion error?
            return ''

        resp = session.head(url, allow_redirects=True)
        resp.raise_for_status()

        return resp.headers.get("Content-Type", "")

    @property
    def api_version(self):
        if not hasattr(self, "_api_version"):
            _api_version = None

            metas = [x for x in self.parsed.findall(".//meta")
                        if x.get("name", "").lower() == "api-version"]
            if metas:
                try:
                    _api_version = int(metas[0].get("value", None))
                except (TypeError, ValueError):
                    _api_version = None
            self._api_version = _api_version
        return self._api_version

    @property
    def base_url(self):
        if not hasattr(self, "_base_url"):
            base = self.parsed.find(".//base")
            if base is not None and base.get("href"):
                self._base_url = base.get("href")
            else:
                self._base_url = self.url
        return self._base_url

    @property
    def links(self):
        """Yields all links in the page"""
        for anchor in self.parsed.findall(".//a"):
            if anchor.get("href"):
                href = anchor.get("href")
                url = self.clean_link(urlparse.urljoin(self.base_url, href))

                # Determine if this link is internal. If that distinction
                #   doesn't make sense in this context, then we don't make
                #   any distinction.
                internal = None
                if self.api_version and self.api_version >= 2:
                    # Only api_versions >= 2 have a distinction between
                    #   external and internal links
                    internal = bool(anchor.get("rel")
                                and "internal" in anchor.get("rel").split())

                yield Link(url, self, internal=internal)

    def rel_links(self):
        for url in self.explicit_rel_links():
            yield url
        for url in self.scraped_rel_links():
            yield url

    def explicit_rel_links(self, rels=('homepage', 'download')):
        """Yields all links with the given relations"""
        rels = set(rels)

        for anchor in self.parsed.findall(".//a"):
            if anchor.get("rel") and anchor.get("href"):
                found_rels = set(anchor.get("rel").split())
                # Determine the intersection between what rels were found and
                #   what rels were being looked for
                if found_rels & rels:
                    href = anchor.get("href")
                    url = self.clean_link(urlparse.urljoin(self.base_url, href))
                    yield Link(url, self, trusted=False)

    def scraped_rel_links(self):
        # Can we get rid of this horrible horrible method?
        for regex in (self._homepage_re, self._download_re):
            match = regex.search(self.content)
            if not match:
                continue
            href_match = self._href_re.search(self.content, pos=match.end())
            if not href_match:
                continue
            url = href_match.group(1) or href_match.group(2) or href_match.group(3)
            if not url:
                continue
            url = self.clean_link(urlparse.urljoin(self.base_url, url))
            yield Link(url, self, trusted=False, _deprecated_regex=True)

    _clean_re = re.compile(r'[^a-z0-9$&+,/:;=?@.#%_\\|-]', re.I)

    def clean_link(self, url):
        """Makes sure a link is fully encoded.  That is, if a ' ' shows up in
        the link, it will be rewritten to %20 (while not over-quoting
        % or other characters)."""
        return self._clean_re.sub(
            lambda match: '%%%2x' % ord(match.group(0)), url)


class Link(object):

    def __init__(self, url, comes_from=None, internal=None, trusted=None,
            _deprecated_regex=False):
        self.url = url
        self.comes_from = comes_from
        self.internal = internal
        self.trusted = trusted
        self._deprecated_regex = _deprecated_regex

    def __str__(self):
        if self.comes_from:
            return '%s (from %s)' % (self.url, self.comes_from)
        else:
            return str(self.url)

    def __repr__(self):
        return '<Link %s>' % self

    def __eq__(self, other):
        return self.url == other.url

    def __ne__(self, other):
        return self.url != other.url

    def __lt__(self, other):
        return self.url < other.url

    def __le__(self, other):
        return self.url <= other.url

    def __gt__(self, other):
        return self.url > other.url

    def __ge__(self, other):
        return self.url >= other.url

    def __hash__(self):
        return hash(self.url)

    @property
    def filename(self):
        _, netloc, path, _, _ = urlparse.urlsplit(self.url)
        name = posixpath.basename(path.rstrip('/')) or netloc
        assert name, ('URL %r produced no filename' % self.url)
        return name

    @property
    def scheme(self):
        return urlparse.urlsplit(self.url)[0]

    @property
    def path(self):
        return urlparse.urlsplit(self.url)[2]

    def splitext(self):
        return splitext(posixpath.basename(self.path.rstrip('/')))

    @property
    def ext(self):
        return self.splitext()[1]

    @property
    def url_without_fragment(self):
        scheme, netloc, path, query, fragment = urlparse.urlsplit(self.url)
        return urlparse.urlunsplit((scheme, netloc, path, query, None))

    _egg_fragment_re = re.compile(r'#egg=([^&]*)')

    @property
    def egg_fragment(self):
        match = self._egg_fragment_re.search(self.url)
        if not match:
            return None
        return match.group(1)

    _hash_re = re.compile(r'(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)')

    @property
    def hash(self):
        match = self._hash_re.search(self.url)
        if match:
            return match.group(2)
        return None

    @property
    def hash_name(self):
        match = self._hash_re.search(self.url)
        if match:
            return match.group(1)
        return None

    @property
    def show_url(self):
        return posixpath.basename(self.url.split('#', 1)[0].split('?', 1)[0])

    @property
    def verifiable(self):
        """
        Returns True if this link can be verified after download, False if it
        cannot, and None if we cannot determine.
        """
        trusted = self.trusted or getattr(self.comes_from, "trusted", None)
        if trusted is not None and trusted:
            # This link came from a trusted source. It *may* be verifiable but
            #   first we need to see if this page is operating under the new
            #   API version.
            try:
                api_version = getattr(self.comes_from, "api_version", None)
                api_version = int(api_version)
            except (ValueError, TypeError):
                api_version = None

            if api_version is None or api_version <= 1:
                # This link is either trusted, or it came from a trusted,
                #   however it is not operating under the API version 2 so
                #   we can't make any claims about if it's safe or not
                return

            if self.hash:
                # This link came from a trusted source and it has a hash, so we
                #   can consider it safe.
                return True
            else:
                # This link came from a trusted source, using the new API
                #   version, and it does not have a hash. It is NOT verifiable
                return False
        elif trusted is not None:
            # This link came from an untrusted source and we cannot trust it
            return False


# An object to represent the "link" for the installed version of a requirement.
# Using Inf as the url makes it sort higher.
INSTALLED_VERSION = Link(Inf)


def get_requirement_from_url(url):
    """Get a requirement from the URL, if possible.  This looks for #egg
    in the URL"""
    link = Link(url)
    egg_info = link.egg_fragment
    if not egg_info:
        egg_info = splitext(link.filename)[0]
    return package_to_requirement(egg_info)


def package_to_requirement(package_name):
    """Translate a name like Foo-1.2 to Foo==1.3"""
    match = re.search(r'^(.*?)-(dev|\d.*)', package_name)
    if match:
        name = match.group(1)
        version = match.group(2)
    else:
        name = package_name
        version = ''
    if version:
        return '%s==%s' % (name, version)
    else:
        return name
python3.3/site-packages/pip/__pycache__/wheel.cpython-33.pyc000064400000053526151733566740017614 0ustar00�
7�Re@Qc@sZdZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZddlmZmZddlmZmZddlmZdd	lmZdd
lmZddlmZmZmZddlm Z dd
l!m"Z"ddlm Z dZ#d.Z$dd/dd�Z%ye&dd�Z'Wne(k
r�dd�Z'YnXdd�Z)dd�Z*ej+dej,�Z-dd�Z.dd�Z/d0ddd1ddd d!�Z3d"d#�Z4e4d$d%��Z5d&d'�Z6d(d)�Z7Gd*d+�d+e8�Z9Gd,d-�d-e8�Z:dS(2uH
Support for installing and building the "wheel" binary package format.
i(uwith_statementN(uurlsafe_b64encode(uParser(uConfigParseruStringIO(uInvalidWheelFilenameuUnsupportedWheel(udistutils_scheme(ulogger(u
pep425tags(ucall_subprocessunormalize_pathumake_path_relative(u
pkg_resources(uScriptMakeru.whliusha256ic
Cs�tj|�}d}t|d��O}|j|�}x6|rn|t|�7}|j|�|j|�}q9WWdQXdt|j��jd�j	d�}||fS(u6Return (hash, length) for path using hashlib.new(algo)iurbNusha256=ulatin1u=(
uhashlibunewuopenureadulenuupdateuurlsafe_b64encodeudigestudecodeurstrip(upathualgou	blocksizeuhulengthufublockudigest((u"/tmp/pip-zej_zi-build/pip/wheel.pyurehash"s	
(urehashcCs t|t�r|jd�S|S(Nuascii(u
isinstanceuunicodeuencode(us((u"/tmp/pip-zej_zi-build/pip/wheel.pyubinary1s
ubinarycCs t|t�r|jd�SdS(Nuascii(u
isinstanceustruencode(us((u"/tmp/pip-zej_zi-build/pip/wheel.pyubinary6scCsItjddkr"i}d}nidd6}d}t||||�S(Niiubuunewline(usysuversion_infouopen(unameumodeunlubin((u"/tmp/pip-zej_zi-build/pip/wheel.pyuopen_for_csv:s	
uopen_for_csvcCs�tjj|�r�t|d�}zj|j�}|jtd��sIdStj	j
tj��}td�|ttj�}|j
�}Wd|j�Xt|d�}z|j|�|j|�Wd|j�XdSdS(uLReplace #!python with #!/path/to/python
    Return True if file was changed.urbu#!pythonu#!NuwbFT(uosupathuisfileuopenureadlineu
startswithubinaryuFalseusysu
executableuencodeugetfilesystemencodingulinesepureaducloseuwriteuTrue(upathuscriptu	firstlineuexenameurest((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
fix_scriptCs 
u
fix_scriptuZ^(?P<namever>(?P<name>.+?)(-(?P<ver>\d.+?))?)
                                \.dist-info$cCs�|jdd�}x�tj|�D]�}tj|�}|r"|jd�|kr"ttjj||d���:}x0|D](}|j	�j
�}|dkrzdSqzWWdQXq"q"WdS(	uP
    Return True if the extracted wheel in wheeldir should go into purelib.
    u-u_unameuWHEELuroot-is-purelib: trueNTF(
ureplaceuosulistdirudist_info_reumatchugroupuopenupathujoinulowerurstripuTrueuFalse(unameuwheeldiruname_foldeduitemumatchuwheeluline((u"/tmp/pip-zej_zi-build/pip/wheel.pyuroot_is_purelib]s!
uroot_is_purelibc
Cs�tjj|�siifSt|��N}t�}x.|D]&}|j|j��|jd�q;W|jd�WdQXtj	�}|j
|�i}i}|jd�r�t|j
d��}n|jd�r�t|j
d��}n||fS(Nu
iuconsole_scriptsugui_scripts(uosupathuexistsuopenuStringIOuwriteustripuseekuConfigParseruRawConfigParserureadfpuhas_sectionudictuitems(ufilenameufpudataulineucpuconsoleugui((u"/tmp/pip-zej_zi-build/pip/wheel.pyuget_entrypointsms"
	

uget_entrypointsc	$s(|s't|d|d|d|�}nt|��rC|d�n
|d�g�g��jtjj�tjj}	i�t��g}
|r�tj|	dd0dd0�ndd	��d1�����fd
d��	dd���	�
fdd
�}||	�d0��s#td�
��tjj
�dd�}t|�\����fdd�}
x��D]�}d}d}x�tjtjj
�|��D]e}d}|dkr�t}|
}ntjj
�||�}	||}||	|d1d|d|�q�WqjWtd|d��td2��_d0�_�fdd�}|�_d�_�jdd�}|rSdtjkr�d|}|
j�j|��ntjjdd�dkr�dtjdd �|f}|
j�j|��ndtjdd!�|f}|
j�j|��d"d#��D�}x|D]
}�|=q?Wn�jd$d�}|r�dtjkr�d%|}|
j�j|��nd&tjdd!�|f}|
j�j|��d'd#��D�}x|D]
}�|=q�Wnt��dkr<|
j�jd(d#��j�D���nt��dkr�|
j�jd)d#��j�D�id0d*6��ntjj
�dd+�}tjj
�dd,�}t |d-��M}t |d.��5}t!j"|�}t!j#|�}xj|D]b} �j| d| d�| d<| d�krTt$| d�\| d <| d/<n|j%| �q�Wxu|
D]m}!t$|!�\}"}#|r�|!j&|�r�tjj
tjtjj'|!|��}!n|j%|!|"|#f�qlWx(�D] }!|j%�|!ddf�q�WWdQXWdQXt(j)||�dS(3uInstall a wheeluuseruhomeurootupurelibuplatlibuforceuquietcSst||�jtjjd�S(Nu/(umake_path_relativeureplaceuosupathusep(usrcup((u"/tmp/pip-zej_zi-build/pip/wheel.pyunormpath�su"move_wheel_files.<locals>.normpathcsB�|��}�|��}|�|<|r>�j|�ndS(u6Map archive RECORD paths to installation RECORD paths.N(uadd(usrcfileudestfileumodifieduoldpathunewpath(uchangedu	installedulib_dirunormpathuwheeldir(u"/tmp/pip-zej_zi-build/pip/wheel.pyurecord_installed�s

u*move_wheel_files.<locals>.record_installedcs&tjj|�s"tj|�nx�tj|�D]�\}}}|t|�d�jtjj�}tjj||�}	|r�|j	tjjd�dj
d�r�q2nx�|D]�}
tjj|||
�}|r|dkr|j
d�r�j|
�q�q�|r�|
j
d�r�|
j�j
�jjdd�j��r��sWtd���j|�q�q�Wx�|D]�}|r�||�r�qrntjj||�}
tjj|||�}tjj|	�s�tj|	�ntj|
|�d	}|r
||�}n�|
||�qrWq2WdS(
Niiu.datauu
.dist-infou-u_uMultiple .dist-info directoriesF(uosupathuexistsumakedirsuwalkulenulstripusepujoinusplituendswithuappenduloweru
startswithuproject_nameureplaceuAssertionErrorushutilucopy2uFalse(usourceudestuis_baseufixerufilterudirusubdirsufilesubasedirudestdirusu
destsubdirufusrcfileudestfileuchanged(u	data_dirsuinfo_dirurecord_installedureq(u"/tmp/pip-zej_zi-build/pip/wheel.pyuclobber�s:%+
!
*
u!move_wheel_files.<locals>.clobberu!%s .dist-info directory not foundiuentry_points.txtcs�|j�jd�r(|dd�}nV|j�jd�rP|dd�}n.|j�jd�rx|dd�}n|}|�kp�|�kS(	Nu.exeiu
-script.pyi
u.pyai����i����i����(uloweruendswith(unameu	matchname(uconsoleugui(u"/tmp/pip-zej_zi-build/pip/wheel.pyuis_entrypoint_wrapper�su/move_wheel_files.<locals>.is_entrypoint_wrapperuscriptsufixerufilterucs6�ji|jd6|jjd�dd6|jd6S(Numoduleu.iuimport_nameufunc(uscript_templateuprefixusuffixusplit(uentry(umaker(u"/tmp/pip-zej_zi-build/pip/wheel.pyu_get_script_text	s	
u*move_wheel_files.<locals>._get_script_textu�# -*- coding: utf-8 -*-
import re
import sys

from %(module)s import %(import_name)s

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
upipuENSUREPIP_OPTIONSupip = u
altinstallu
pip%s = %sNiicSs(g|]}tjd|�r|�qS(upip(\d(\.\d)?)?$(ureumatch(u.0uk((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>Js	u$move_wheel_files.<locals>.<listcomp>ueasy_installueasy_install = ueasy_install-%s = %scSs(g|]}tjd|�r|�qS(ueasy_install(-\d\.\d)?$(ureumatch(u.0uk((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>Vs	cSsg|]}d|�qS(u%s = %s((u.0ukv((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>]s	cSsg|]}d|�qS(u%s = %s((u.0ukv((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>_s	uguiuRECORDu
RECORD.pipuruw+iTF(u(*udistutils_schemeuroot_is_pureliburstripuosupathusepusetu
compileallucompile_diruTrueuFalseuNoneuAssertionErrorujoinuget_entrypointsulistdiru
fix_scriptuScriptMakeruvariantsuset_modeu_get_script_textuscript_templateupopuenvironuextendumakeugetusysuversionulenu
make_multipleuitemsuopen_for_csvucsvureaderuwriterurehashuwriterowu
startswithurelpathushutilumove($unameurequwheeldiruuseruhomeurootu	pycompileuschemeustrip_file_prefixusourceu	generateduclobberuep_fileuis_entrypoint_wrapperudatadirufixerufilterusubdirudestu_get_script_textu
pip_scriptuspecupip_epukueasy_install_scriptueasy_install_epurecordutemp_recordu	record_inu
record_outureaderuwriterurowufuhul((uchangeduconsoleu	data_dirsuguiuinfo_diru	installedulib_dirumakerunormpathurecord_installedurequwheeldiru"/tmp/pip-zej_zi-build/pip/wheel.pyumove_wheel_files�s�!

	!!(
%	
$		
	#



,6
!
*
*umove_wheel_filescs%tj���fdd��}|S(Nc?sHt�}x8�||�D]'}||kr|j|�|VqqWdS(N(usetuadd(uargsukwuseenuitem(ufn(u"/tmp/pip-zej_zi-build/pip/wheel.pyuuniquevs
	
u_unique.<locals>.unique(u	functoolsuwraps(ufnuunique((ufnu"/tmp/pip-zej_zi-build/pip/wheel.pyu_uniqueus!u_uniqueccs�ddlm}tj||jd���}x�|D]}tjj|j|d�}|V|j	d�r5tjj
|�\}}|dd�}tjj||d�}|Vq5q5WdS(	u
    Yield all the uninstallation paths for dist based on RECORD-without-.pyc

    Yield paths to all the files in RECORD. For each .py file in RECORD, add
    the .pyc in the same directory.

    UninstallPathSet.add() takes care of the __pycache__ .pyc.
    i(uFakeFileuRECORDu.pyNiu.pyci����(upip.requFakeFileucsvureaderuget_metadata_linesuosupathujoinulocationuendswithusplit(udistuFakeFileururowupathudnufnubase((u"/tmp/pip-zej_zi-build/pip/wheel.pyuuninstallation_paths�s

uuninstallation_pathscCs�yzdd�tjd|�D�d}|jd�}t�j|�}|dj�}ttt	|j
d���}|SWndSYnXdS(	u�
    Return the Wheel-Version of an extracted wheel, if possible.

    Otherwise, return False if we couldn't parse / extract it.
    cSsg|]}|�qS(((u.0ud((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>�s	u!wheel_version.<locals>.<listcomp>iuWHEELu
Wheel-Versionu.NF(u
pkg_resourcesufind_on_pathuNoneuget_metadatauParseruparsestrustriputupleumapuintusplituFalse(u
source_dirudistu
wheel_datauversion((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
wheel_version�s#u
wheel_versioncCs�|std|��n|dtdkrXtd|djtt|��f��n2|tkr�tjddjtt|���ndS(u�
    Raises errors or warns if called with an incompatible Wheel-Version.

    Pip should refuse to install a Wheel-Version that's a major series
    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
    installing a version only minor version ahead (e.g 1.2 > 1.1).

    version: a 2-tuple representing a Wheel-Version (Major, Minor)
    name: name of wheel or package to raise exception about

    :raises UnsupportedWheel: when an incompatible Wheel-Version is given
    u(%s is in an unsupported or invalid wheeliuB%s's Wheel-Version (%s) is not compatible with this version of pipu.u*Installing from a newer Wheel-Version (%s)N(uUnsupportedWheeluVERSION_COMPATIBLEujoinumapustruloggeruwarn(uversionuname((u"/tmp/pip-zej_zi-build/pip/wheel.pyucheck_compatibility�s
%	ucheck_compatibilitycBsY|EeZdZdZejdej�Zdd�Zd	dd�Z
d	dd�Zd	S(
uWheeluA wheel fileu�^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))
                ((-(?P<build>\d.*?))?-(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)
                \.whl|\.dist-info)$cs��jj|�}|s+td|��n|�_|jd�jdd��_|jd�jdd��_|jd�jd��_	|jd�jd��_
|jd	�jd��_t�fd
d��j	D���_
dS(
uX
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        u!%s is not a valid wheel filename.unameu_u-uverupyveru.uabiuplatc3s>|]4}�jD]$}�jD]}|||fVqqqdS(N(uabisuplats(u.0uxuyuz(uself(u"/tmp/pip-zej_zi-build/pip/wheel.pyu	<genexpr>�su!Wheel.__init__.<locals>.<genexpr>N(u
wheel_file_reumatchuInvalidWheelFilenameufilenameugroupureplaceunameuversionusplitu
pyversionsuabisuplatsusetu	file_tags(uselfufilenameu
wheel_info((uselfu"/tmp/pip-zej_zi-build/pip/wheel.pyu__init__�s	uWheel.__init__csH�dkrtj�n�fdd�|jD�}|rDt|�SdS(u"
        Return the lowest index that one of the wheel's file_tag combinations
        achieves in the supported_tags list e.g. if there are 8 supported tags,
        and one of the file tags is first in the list, then return 0.  Returns
        None is the wheel is not supported.
        cs+g|]!}|�kr�j|��qS((uindex(u.0uc(utags(u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>�s	u+Wheel.support_index_min.<locals>.<listcomp>N(uNoneu
pep425tagsusupported_tagsu	file_tagsumin(uselfutagsuindexes((utagsu"/tmp/pip-zej_zi-build/pip/wheel.pyusupport_index_min�suWheel.support_index_mincCs4|dkrtj}ntt|�j|j��S(u'Is this wheel supported on this system?N(uNoneu
pep425tagsusupported_tagsuboolusetuintersectionu	file_tags(uselfutags((u"/tmp/pip-zej_zi-build/pip/wheel.pyu	supported�suWheel.supportedN(u__name__u
__module__u__qualname__u__doc__ureucompileuVERBOSEu
wheel_file_reu__init__uNoneusupport_index_minu	supported(u
__locals__((u"/tmp/pip-zej_zi-build/pip/wheel.pyuWheel�suWheelcBsD|EeZdZdZggdd�Zdd�Zdd�ZdS(	uWheelBuilderu#Build wheels from a RequirementSet.cCs7||_||_t|�|_||_||_dS(N(urequirement_setufinderunormalize_pathu	wheel_diru
build_optionsuglobal_options(uselfurequirement_setufinderu	wheel_diru
build_optionsuglobal_options((u"/tmp/pip-zej_zi-build/pip/wheel.pyu__init__�s
			uWheelBuilder.__init__cCs�tjdd|jgt|j�}tjd|j�tjd|j�|dd|jg|j	}y!t
|d|jdd�dSWn tjd	|j�dSYnXd
S(
uBuild one wheel.u-cujimport setuptools;__file__=%r;exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))u#Running setup.py bdist_wheel for %suDestination directory: %subdist_wheelu-ducwdushow_stdoutuFailed building wheel for %sNFT(usysu
executableusetup_pyulistuglobal_optionsuloggerunotifyunameu	wheel_diru
build_optionsucall_subprocessu
source_diruFalseuTrueuerror(uselfurequ	base_argsu
wheel_args((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
_build_ones	
uWheelBuilder._build_onecCs5|jj|j�|jjj�}dd�|D�}|sBdStjddjdd�|D���tjd7_gg}}x:|D]2}|j	|�r�|j
|�q�|j
|�q�Wtjd8_|rtjdd	jd
d�|D���n|r1tjdd	jdd�|D���ndS(
u
Build wheels.cSsg|]}|js|�qS((uis_wheel(u.0ureq((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>s	u&WheelBuilder.build.<locals>.<listcomp>Nu*Building wheels for collected packages: %su,cSsg|]}|j�qS((uname(u.0ureq((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>#s	iuSuccessfully built %su cSsg|]}|j�qS((uname(u.0ureq((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>0s	uFailed to build %scSsg|]}|j�qS((uname(u.0ureq((u"/tmp/pip-zej_zi-build/pip/wheel.pyu
<listcomp>2s	(urequirement_setu
prepare_filesufinderurequirementsuvaluesuloggerunotifyujoinuindentu
_build_oneuappend(uselfureqsetubuildsetu
build_successu
build_failureureq((u"/tmp/pip-zej_zi-build/pip/wheel.pyubuilds&

*uWheelBuilder.buildN(u__name__u
__module__u__qualname__u__doc__u__init__u
_build_oneubuild(u
__locals__((u"/tmp/pip-zej_zi-build/pip/wheel.pyuWheelBuilder�suWheelBuilder(iiiFT(;u__doc__u
__future__uwith_statementu
compileallucsvu	functoolsuhashlibuosureushutilusysubase64uurlsafe_b64encodeuemail.parseruParserupip.backwardcompatuConfigParseruStringIOupip.exceptionsuInvalidWheelFilenameuUnsupportedWheelu
pip.locationsudistutils_schemeupip.loguloggerupipu
pep425tagsupip.utilucall_subprocessunormalize_pathumake_path_relativeupip._vendoru
pkg_resourcesupip._vendor.distlib.scriptsuScriptMakeru	wheel_extuVERSION_COMPATIBLEurehashuunicodeubinaryu	NameErroruopen_for_csvu
fix_scriptucompileuVERBOSEudist_info_reuroot_is_purelibuget_entrypointsuFalseuNoneuTrueumove_wheel_filesu_uniqueuuninstallation_pathsu
wheel_versionucheck_compatibilityuobjectuWheeluWheelBuilder(((u"/tmp/pip-zej_zi-build/pip/wheel.pyu<module>sT

		�2python3.3/site-packages/pip/__pycache__/pep425tags.cpython-33.pyc000064400000006526151733566740020404 0ustar00�
7�Re�c@s�dZddlZddlZyddlZWn!ek
rQddljZYnXddlZdd�Zdd�Z	dd�Z
ddd	d
�Z
e
�Ze
dd
�ZdS(u2Generate and work with PEP 425 Compatibility Tags.iNcCsUttd�rd}n9tjjd�r3d}ntjdkrKd}nd}|S(u'Return abbreviated implementation name.upypy_version_infouppujavaujyucliuipucp(uhasattrusysuplatformu
startswith(upyimpl((u'/tmp/pip-zej_zi-build/pip/pep425tags.pyu
get_abbr_impls			u
get_abbr_implcCs#djtttjdd���S(uReturn implementation version.uNi(ujoinumapustrusysuversion_info(((u'/tmp/pip-zej_zi-build/pip/pep425tags.pyuget_impl_versuget_impl_vercCs%tjj�jdd�jdd�S(u0Return our platform name 'win32', 'linux_x86_64'u.u_u-(u	distutilsuutiluget_platformureplace(((u'/tmp/pip-zej_zi-build/pip/pep425tags.pyuget_platform suget_platformcCs�g}|dkrqg}tjd}xIttjddd�D]+}|jdjtt||f���q?Wnt�}g}yt	j
d�}WnDtk
r�}z$tj
dj|�t�d}WYdd}~XnX|r|jd�rd|jd	d�dg|dd�<nt�}	ddl}
xK|
j�D]=}|djd
�r;|	j|djdd�d�q;q;W|jtt|	���|jd
�|s�t�}x5|D]*}
|jd||df|
|f�q�Wnxqt|�D]c\}}|jd||fd
df�|dkr�|jd||ddfd
df�q�q�Wxdt|�D]V\}}|jd|fd
df�|dkrj|jd|dd
df�qjqjW|S(u�Return a list of supported tags for each version specified in
    `versions`.

    :param versions: a list of string versions, of the form ["33", "32"],
        or None. The first version will be assumed to support our ABI.
    iiuuSOABIu{0}Nucpython-ucpu-u.abiu.iunoneu%s%suanyupy%si����i����i����(uNoneusysuversion_infourangeuappendujoinumapustru
get_abbr_implu	sysconfiguget_config_varuIOErroruwarningsuwarnuformatuRuntimeWarningu
startswithusplitusetuimpuget_suffixesuadduextendusortedulistuget_platformu	enumerate(uversionsunoarchu	supportedumajoruminoruimpluabisusoabiueuabi3suimpusuffixuarchuabiuiuversion((u'/tmp/pip-zej_zi-build/pip/pep425tags.pyu
get_supported&sF
 ,	*	(
	
+ /%u
get_supportedunoarchFT(u__doc__usysuwarningsu	sysconfiguImportErrorudistutils.sysconfigudistutils.utilu	distutilsu
get_abbr_impluget_impl_veruget_platformuNoneuFalseu
get_supportedusupported_tagsuTrueusupported_tags_noarch(((u'/tmp/pip-zej_zi-build/pip/pep425tags.pyu<module>s

?	python3.3/site-packages/pip/__pycache__/log.cpython-33.pyc000064400000026340151733566740017263 0ustar00�
7�Re�$c@s�dZddlZddlZddlZddlmZddlmZmZdd�Z	ej
ejfdd�Zd	d
�Z
Gdd�de�Ze�ZdS(
uLogging
iN(ubackwardcompat(ucoloramau
pkg_resourcescs�fdd�}|S(Ncs#djt��|tjjg�S(Nu(ujoinulistucoloramauStyleu	RESET_ALL(uinp(ucolors(u /tmp/pip-zej_zi-build/pip/log.pyuwrapped
su_color_wrap.<locals>.wrapped((ucolorsuwrapped((ucolorsu /tmp/pip-zej_zi-build/pip/log.pyu_color_wrapsu_color_wrapcCsmt|tj�s|n|j}||kr1dSt|d�rP|j�rPdS|jd�dkridSdS(NuisattyuTERMuANSIFT(	u
isinstanceucoloramauAnsiToWin32uwrappeduFalseuhasattruisattyuTrueuget(uconsumeruenvironustdu
real_consumer((u /tmp/pip-zej_zi-build/pip/log.pyushould_colors	ushould_colorcCs�dj|jd�dd��}dj|jd�dd��}|jd�\}}tt|�d�}dj||g�}tj|�tj|�kS(Nu.ii(ujoinusplitustruintu
pkg_resourcesu
parse_version(ucurrent_versionuremoval_versionumajoruminoruwarn_version((u /tmp/pip-zej_zi-build/pip/log.pyushould_warn&s""ushould_warncBs�|EeZdZdZejdZejZejZejejdZ	ejZZ
ejZejZeeee	eeegZ
ieejj�e6eejj�e6eejj�e6Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zddd�Z d+dd �Z"d!d"�Z#d#d$�Z$d%d&�Z%e&d'd(��Z'd)d*�Z(d+S(,uLoggeru�
    Logging object for use in command-line script.  Allows ranges of
    levels, to avoid some redundancy of displayed information.
    iicCs1g|_d|_d|_d|_d|_dS(NiF(u	consumersuindentuFalseuexplicit_levelsuNoneuin_progressuin_progress_hanging(uself((u /tmp/pip-zej_zi-build/pip/log.pyu__init__Ls
				uLogger.__init__cGs�tjjd�rsxn|D]S\}}t|d�rV|jj|tj|�f�q|jj||f�qWn|jj|�dS(Nuwinuwrite(	usysuplatformu
startswithuhasattru	consumersuappenducoloramauAnsiToWin32uextend(uselfu	consumersuleveluconsumer((u /tmp/pip-zej_zi-build/pip/log.pyu
add_consumersSs	uLogger.add_consumerscOs|j|j|||�dS(N(uloguDEBUG(uselfumsguargsukw((u /tmp/pip-zej_zi-build/pip/log.pyudebug_suLogger.debugcOs|j|j|||�dS(N(uloguINFO(uselfumsguargsukw((u /tmp/pip-zej_zi-build/pip/log.pyuinfobsuLogger.infocOs|j|j|||�dS(N(uloguNOTIFY(uselfumsguargsukw((u /tmp/pip-zej_zi-build/pip/log.pyunotifyesu
Logger.notifycOs|j|j|||�dS(N(uloguWARN(uselfumsguargsukw((u /tmp/pip-zej_zi-build/pip/log.pyuwarnhsuLogger.warncOs|j|j|||�dS(N(uloguERROR(uselfumsguargsukw((u /tmp/pip-zej_zi-build/pip/log.pyuerrorksuLogger.errorcOs|j|j|||�dS(N(uloguFATAL(uselfumsguargsukw((u /tmp/pip-zej_zi-build/pip/log.pyufatalnsuLogger.fatalcOsLddlm}t||�r5|j|||�n|j|||�dS(u�
        Logs deprecation message which is log level WARN if the
        ``removal_version`` is > 1 minor release away and log level ERROR
        otherwise.

        removal_version should be the version that the deprecated feature is
        expected to be removed in, so something that will not exist in
        version 1.7, but will in 1.6 would have a removal_version of 1.7.
        i(u__version__N(upipu__version__ushould_warnuwarnuerror(uselfuremoval_versionumsguargsukwargsu__version__((u /tmp/pip-zej_zi-build/pip/log.pyu
deprecatedqs
uLogger.deprecatedc
Osx|r|rtd��qn|p'|}|r=||}n|}d|j|}|jrpd||f}nx|jD]�\}}|j||�rz|jr�|tjtjfkr�d	|_tjj
d�tjj�nt|d�rc|d}t
|tj�r7|jj|dd��}	|	|�}n|j
|�t|d�rm|j�qmqp||�qzqzWdS(
Nu6You may give positional or keyword arguments, not bothu u%02i %su
uwritecSs|S(N((ux((u /tmp/pip-zej_zi-build/pip/log.pyu<lambda>�suLogger.log.<locals>.<lambda>uflushF(u	TypeErroruindentuexplicit_levelsu	consumersu
level_matchesuin_progress_hangingusysustdoutustderruFalseuwriteuflushuhasattrushould_coloruosuenvironuCOLORSuget(
uselfulevelumsguargsukwurendereduconsumer_leveluconsumeru
write_contentu	colorizer((u /tmp/pip-zej_zi-build/pip/log.pyulog�s6
			

u
Logger.logcCs|j|j�otjj�S(u$Should we display download progress?(ustdout_level_matchesuNOTIFYusysustdoutuisatty(uself((u /tmp/pip-zej_zi-build/pip/log.pyu_show_progress�suLogger._show_progresscCs�|js#td||jf��|j�rctjjd|j|�tjj�d|_	n	d|_	||_d|_dS(Nu0Tried to start_progress(%r) while in_progress %ru TF(
uin_progressuAssertionErroru_show_progressusysustdoutuwriteuindentuflushuTrueuin_progress_hanginguFalseuNoneulast_message(uselfumsg((u /tmp/pip-zej_zi-build/pip/log.pyustart_progress�s

		uLogger.start_progressudone.cCs�|jstd��|j�r�|jsYtjjd|j|d�tjj�q�tj	d�tj	d�tjj|d�tjj�nd|_d|_dS(Nu,Tried to end_progress without start_progressu...u
uF(uin_progressuAssertionErroru_show_progressuin_progress_hangingusysustdoutuwriteuflushuloggeru
show_progressuNoneuFalse(uselfumsg((u /tmp/pip-zej_zi-build/pip/log.pyuend_progress�s		

	uLogger.end_progresscCs�|jr�|dkr5tjjd�tjj�q�|jrgdtdt|j�t|��}nd}tjjdd|j	|j
||f�tjj�||_ndS(uaIf we are in a progress scope, and no log messages have been
        shown, write out another '.'u.u iuu	
%s%s%s%sN(uin_progress_hanginguNoneusysustdoutuwriteuflushulast_messageumaxulenuindentuin_progress(uselfumessageupadding((u /tmp/pip-zej_zi-build/pip/log.pyu
show_progress�s		)
uLogger.show_progresscCs|j||j��S(u9Returns true if a message at this level will go to stdout(u
level_matchesu
_stdout_level(uselfulevel((u /tmp/pip-zej_zi-build/pip/log.pyustdout_level_matches�suLogger.stdout_level_matchescCs4x*|jD]\}}|tjkr
|Sq
W|jS(u%Returns the level that stdout runs at(u	consumersusysustdoutuFATAL(uselfuleveluconsumer((u /tmp/pip-zej_zi-build/pip/log.pyu
_stdout_level�suLogger._stdout_levelcCslt|t�r^|j|j}}|dk	r>||kr>dS|dk	sV||krZdSdS||kSdS(um
        >>> l = Logger()
        >>> l.level_matches(3, 4)
        False
        >>> l.level_matches(3, 2)
        True
        >>> l.level_matches(slice(None, 3), 3)
        False
        >>> l.level_matches(slice(None, 3), 2)
        True
        >>> l.level_matches(slice(1, 3), 1)
        True
        >>> l.level_matches(slice(2, 3), 1)
        False
        NFT(u
isinstanceusliceustartustopuNoneuFalseuTrue(uselfuleveluconsumer_levelustartustop((u /tmp/pip-zej_zi-build/pip/log.pyu
level_matches�suLogger.level_matchescCs?|j}|dkr|dS|t|�kr7|dS||S(Niii����(uLEVELSulen(uclsulevelulevels((u /tmp/pip-zej_zi-build/pip/log.pyulevel_for_integers	uLogger.level_for_integercCs�g}g}xR|jD]G\}}|tjkr|j||f�|j|tjf�qqWx|D]}|jj|�qhW|jj|�dS(N(u	consumersusysustdoutuappendustderruremoveuextend(uselfu	to_removeuto_adduconsumer_leveluconsumeruitem((u /tmp/pip-zej_zi-build/pip/log.pyumove_stdout_to_stderr	s
uLogger.move_stdout_to_stderrN()u__name__u
__module__u__qualname__u__doc__ulogginguDEBUGu
VERBOSE_DEBUGuINFOuWARNuNOTIFYuWARNINGuERRORuFATALuLEVELSu_color_wrapucoloramauForeuYELLOWuREDuCOLORSu__init__u
add_consumersudebuguinfounotifyuwarnuerrorufatalu
deprecatedulogu_show_progressustart_progressuend_progressuNoneu
show_progressustdout_level_matchesu
_stdout_levelu
level_matchesuclassmethodulevel_for_integerumove_stdout_to_stderr(u
__locals__((u /tmp/pip-zej_zi-build/pip/log.pyuLogger7s@
		
		&
	uLogger(u__doc__usysuosuloggingupipubackwardcompatupip._vendorucoloramau
pkg_resourcesu_color_wrapustdoutustderrushould_colorushould_warnuobjectuLoggerulogger(((u /tmp/pip-zej_zi-build/pip/log.pyu<module>s�python3.3/site-packages/pip/__pycache__/__init__.cpython-33.pyc000064400000027042151733566740020241 0ustar00�
7�Re�$c@shddlZddlZddlZddlZddlmZmZmZddlm	Z	ddl
mZmZddl
mZmZmZmZddlmZmZddlmZmZmZddlZejZdZd	d
�Zdd�Zd
d�Zddd�Z!dd�Z"Gdd�de#�Z$e%dkrde!�Z&e&rdej&e&�qdndS(iN(uInstallationErroruCommandErroruPipError(ulogger(uget_installed_distributionsuget_prog(ugitu	mercurialu
subversionubazaar(uConfigOptionParseruUpdatingDefaultsHelpFormatter(ucommandsu
get_summariesuget_similar_commandsu1.5.6csdtjkrdStjdj�dd�}ttjd�}y||d�Wntk
rod�YnXdd�t�D��g}y!�fd	d�|D�d
}Wntk
r�d}YnXt�}|ri|dkr�tj	d�n|dkr��j
d
�r�g}�j�}xUtdd�D]D}|jj
|�r1|j|dd�kr1|j|j�q1q1W|r�x|D]}t|�q�Wtj	d�q�nt|�}|dd�|jjD�7}dd�|d|d�D���fdd�|D�}�fdd�|D�}x�|D]1}	|	d
}
|	drX|
d7}
nt|
�q1Wn��j
d
�s��j
d�r�dd�|jD�}|j|j�dd�|D�}�dd�|D�7�ntdj�fdd��D���tj	d�dS(u�Command and option completion for the main option parser (and options)
    and its subcommands (and options).

    Enable by sourcing one of the completion shell scripts (bash or zsh).
    uPIP_AUTO_COMPLETENu
COMP_WORDSiu
COMP_CWORDucSsg|]\}}|�qS(((u.0ucmdusummary((u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>(s	u autocomplete.<locals>.<listcomp>cs"g|]}|�kr|�qS(((u.0uw(usubcommands(u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>,s	iuhelpu	uninstallu-u
local_onlycSs7g|]-}|jtjkr|j�|jf�qS((uhelpuoptparseu
SUPPRESS_HELPuget_opt_stringunargs(u.0uopt((u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>Ds	cSs#g|]}|jd�d�qS(u=i(usplit(u.0ux((u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>Is	cs.g|]$\}}|�kr||f�qS(((u.0uxuv(u	prev_opts(u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>Js	cs1g|]'\}}|j��r||f�qS((u
startswith(u.0ukuv(ucurrent(u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>Ls	u=u--cSsg|]}|j�qS((uoption_list(u.0ui((u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>Vs	css"|]}|D]}|Vq
qdS(N((u.0uituo((u%/tmp/pip-zej_zi-build/pip/__init__.pyu	<genexpr>Xsuautocomplete.<locals>.<genexpr>cSs.g|]$}|jtjkr|j��qS((uhelpuoptparseu
SUPPRESS_HELPuget_opt_string(u.0ui((u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>Zs	u cs%g|]}|j��r|�qS((u
startswith(u.0ux(ucurrent(u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>]s	T(uosuenvironusplituintu
IndexErroru
get_summariesuNoneucreate_main_parserusysuexitu
startswithuloweruget_installed_distributionsuTrueukeyuappenduprintucommandsuparseruoption_list_allu
option_groupsuoption_listujoin(ucwordsucworduoptionsusubcommand_nameuparseru	installedulcudistu
subcommanduoptionu	opt_labeluopts((ucurrentu	prev_optsusubcommandsu%/tmp/pip-zej_zi-build/pip/__init__.pyuautocompletes\
!
	+

!



&uautocompletecCs�idd6dd6t�d6dd6t�d6}t|�}|j�tjjtjjtjjt	���}dt
|tjdd	�f|_t
jt
j|�}|j|�d|_t�}d
gdd�|D�}d
j|�|_|S(Nu
%prog <command> [options]uusageuadd_help_optionu	formatteruglobalunameuprogupip %s from %s (python %s)iucSs&g|]\}}d||f�qS(u%-27s %s((u.0uiuj((u%/tmp/pip-zej_zi-build/pip/__init__.pyu
<listcomp>ys	u&create_main_parser.<locals>.<listcomp>u
FT(uFalseuUpdatingDefaultsHelpFormatteruget_proguConfigOptionParserudisable_interspersed_argsuosupathudirnameuabspathu__file__u__version__usysuversionu
cmdoptionsumake_option_groupu
general_groupuadd_option_groupuTrueumainu
get_summariesujoinudescription(u	parser_kwuparserupip_pkg_dirugen_optsucommand_summariesudescription((u%/tmp/pip-zej_zi-build/pip/__init__.pyucreate_main_parseras$


* 
		ucreate_main_parsercCs2t�}|j|�\}}|jrZtjj|j�tjjtj�tj�n|s�|ddkr�t	|�dkr�|j
�tj�n|dj�}|dd�}|j|dj��|t
kr(t|�}d|g}|r|jd|�ntdj|���n||fS(Niuhelpiuunknown command "%s"umaybe you meant "%s"u - (ucreate_main_parseru
parse_argsuversionusysustdoutuwriteuosulinesepuexitulenu
print_helpuloweruremoveucommandsuget_similar_commandsuappenduCommandErrorujoin(uargsuparserugeneral_optionsu	args_elseucmd_nameucmd_argsuguessumsg((u%/tmp/pip-zej_zi-build/pip/__init__.pyu	parseoptss&			
)


u	parseoptscCs�|dkr"tjdd�}nt�yt|�\}}WnVtk
r�tj�d}tjjd|�tjjt	j
�tjd�YnXt|�}|j
|�S(Niu	ERROR: %s(uNoneusysuargvuautocompleteu	parseoptsuPipErroruexc_infoustderruwriteuosulinesepuexitucommandsumain(uinitial_argsucmd_nameucmd_argsueucommand((u%/tmp/pip-zej_zi-build/pip/__init__.pyumain�s

umainc
Cs`dg}yddl}Wntk
r:|jd�YnXtddg|tjdd��S(uI
    Bootstrapping function to be called from install-pip.py script.
    upipiNu
setuptoolsuinstallu	--upgradei(u
setuptoolsuImportErroruappendumainusysuargv(upkgsu
setuptools((u%/tmp/pip-zej_zi-build/pip/__init__.pyu	bootstrap�s	
u	bootstrapcBst|EeZdZfdd�Zejd�Zejd�Zeddd��Z
edd��Zd	d
�Z
dS(
uFrozenRequirementcCs(||_||_||_||_dS(N(unameurequeditableucomments(uselfunameurequeditableucomments((u%/tmp/pip-zej_zi-build/pip/__init__.pyu__init__�s			uFrozenRequirement.__init__u-r(\d+)$u-(20\d\d\d\d\d\d)$c
Cs6tjjtjj|j��}g}ddlm}m}|j|�r�d}y||||�}	Wn9t
k
r�tj�d}
t
jd|
�d}	YnX|	dkr t
jd|�|jd�|j�}	d}q n:d}|j�}	|	j}t|�dkr'|dddks-t�|dd}|jj|�}
|jj|�}|
sk|r |jd�}|r�|�j||�}n|s�t
jd	|	�|jd
�q |jd|	�|
r�|
jd�}nd|jd�}d}d
|||j|�f}	n||j|	||�S(Ni(uvcsuget_src_requirementiuYError when trying to get requirement for VCS system %s, falling back to uneditable formatu-Could not determine repository location of %su-## !! Could not determine repository locationu==usvnu(Warning: cannot find svn location for %suF## FIXME: could not find svn URL in dependency_links for this package:u3# Installing as editable to satisfy requirement %s:u{%s}u%s@%s#egg=%sTF(uosupathunormcaseuabspathulocationupip.vcsuvcsuget_src_requirementuget_backend_nameuTrueuInstallationErrorusysuexc_infouloggeruwarnuNoneuappenduas_requirementuFalseuspecsulenuAssertionErroru_rev_reusearchu_date_reuget_backenduget_locationugroupuegg_nameuproject_name(uclsudistudependency_linksu	find_tagsulocationucommentsuvcsuget_src_requirementueditableurequexuspecsuversionu	ver_matchu
date_matchusvn_backendusvn_locationurev((u%/tmp/pip-zej_zi-build/pip/__init__.pyu	from_dist�sN!

	,	uFrozenRequirement.from_distcCsA|j�}tjd|�}|r=|d|j��}n|S(Nu
-py\d\.\d$(uegg_nameureusearchustart(udistunameumatch((u%/tmp/pip-zej_zi-build/pip/__init__.pyuegg_names
uFrozenRequirement.egg_namecCsF|j}|jrd|}ndjt|j�t|�g�dS(Nu-e %su
(urequeditableujoinulistucommentsustr(uselfureq((u%/tmp/pip-zej_zi-build/pip/__init__.pyu__str__
s		
uFrozenRequirement.__str__NF(u__name__u
__module__u__qualname__u__init__ureucompileu_rev_reu_date_reuclassmethoduFalseu	from_distustaticmethoduegg_nameu__str__(u
__locals__((u%/tmp/pip-zej_zi-build/pip/__init__.pyuFrozenRequirement�s,uFrozenRequirementu__main__('uosuoptparseusysureupip.exceptionsuInstallationErroruCommandErroruPipErrorupip.loguloggerupip.utiluget_installed_distributionsuget_progupip.vcsugitu	mercurialu
subversionubazaarupip.baseparseruConfigOptionParseruUpdatingDefaultsHelpFormatterupip.commandsucommandsu
get_summariesuget_similar_commandsupip.cmdoptionsupipu
cmdoptionsu__version__uautocompleteucreate_main_parseru	parseoptsuNoneumainu	bootstrapuobjectuFrozenRequirementu__name__uexit(((u%/tmp/pip-zej_zi-build/pip/__init__.pyu<module>s,"	I*G	python3.3/site-packages/pip/__pycache__/req.cpython-33.pyc000064400000227660151733566740017301 0ustar00�
7�Re)Gc@s\ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZmZmZmZmZddlmZmZmZmZmZmZmZddlmZddlmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0dd	l1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9dd
l:m;Z;ddl
m<Z<ddl=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHddlIZJdd
lImKZKmLZLmMZMddlNmOZOmPZPdd�ZQGdd�deR�ZSGdd�deR�ZTGdd�deR�ZUdd�ZVejWdejX�ZYeZeZeZeZdd�Z[dd�Z\dd�Z]d d!�Z^eZd"d#�Z_Gd$d%�d%eR�Z`Gd&d'�d'eR�ZaGd(d)�d)eR�ZbdS(*i(u
FeedParserN(uchange_root(ubin_pyurunning_under_virtualenvuPIP_DELETE_MARKER_FILENAMEuwrite_delete_marker_fileubin_user(uInstallationErroruUninstallationErroruUnsupportedWheeluBestVersionAlreadyInstalleduInvalidWheelFilenameuDistributionNotFounduPreviousBuildDirError(uvcs(ulogger(udisplay_pathurmtreeuaskuask_path_existsu
backup_diruis_installable_diruis_localu
dist_is_localudist_in_usersiteudist_in_site_packagesurenamesunormalize_pathu
egg_link_pathumake_path_relativeucall_subprocessu
is_prereleaseunormalize_name(uurlparseuurllibuuses_pycacheuConfigParserustring_typesu	HTTPErroruget_python_versionub(uLink(ubuild_prefix(u
PipSessionuget_file_contentuis_urluurl_to_pathupath_to_urluis_archive_fileuunpack_vcs_linku
is_vcs_urluis_file_urluunpack_file_urluunpack_http_url(umove_wheel_filesuWheelu	wheel_ext(u
pkg_resourcesusixcCs�t|d��}|j�}WdQXdtjd�dg}x:|D]2}y|j|�}Wntk
rswCYnXPqCWt|�tks�t	�|S(uQReturn the contents of *filename*.

    Try to decode the file contents with utf-8, the preffered system encoding
    (e.g., cp1252 on some Windows machines) and latin1, in that order. Decoding
    a byte string with latin1 will never raise an error. In the worst case, the
    returned string will contain some garbage characters.

    urbNuutf-8ulatin1F(
uopenureadulocaleugetpreferredencodinguFalseudecodeuUnicodeDecodeErrorutypeubytesuAssertionError(ufilenameufpudatau	encodingsuenc((u /tmp/pip-zej_zi-build/pip/req.pyuread_text_file's	

uread_text_filecBso|EeZdZdMdNdMdNdOdMdMdNdOdd�	ZedMdMdd��ZedMdMdd��Z	dd�Z
d	d
�ZdOdd�Zd
d�Z
edd��Zedd��Zedd��ZdNdd�ZdZdd�Zdd�Zdd�Zdd�Zed d!��Zejd"�Zfd#d$�Zed%d&��Zed'd(��Zd)d*�ZdOd+d,�Z dNd-d.�Z!d/d0�Z"d1d2�Z#d3d4�Z$d5d6�Z%fdMdMd7d8�Z&d9d:�Z'fd;d<�Z(d=d>�Z)d?d@�Z*edAdB��Z+edCdD��Z,dEdF�Z-dGdH�Z.dMdMdIdJ�Z/edKdL��Z0dMS(PuInstallRequirementcCsLf|_t|t�r9tjj|�}|j|_n||_||_||_||_	|	dkrri}	n|	|_||_||_
d|_d|_d|_d|_d|_||_d|_d|_d|_d|_|
|_||_|rd|_n=|jdk	r?tdd�|jjD��|_n	d|_dS(NcSs0g|]&}t|d�o)|ddk�qS(iiu!=(u
is_prerelease(u.0ux((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>ls	u/InstallRequirement.__init__.<locals>.<listcomp>FT(uextrasu
isinstanceustring_typesu
pkg_resourcesuRequirementuparseurequ
comes_fromu
source_dirueditableuNoneueditable_optionsuurluas_eggu_egg_info_pathusatisfied_byuconflicts_withu_temp_build_diru
_is_bundleuupdateuinstall_succeededuuninstalleduFalseu
use_user_siteu
target_dirufrom_bundleu	pycompileuTrueuprereleasesuanyuspecs(uselfurequ
comes_fromu
source_dirueditableuurluas_egguupdateuprereleasesueditable_optionsufrom_bundleu	pycompile((u /tmp/pip-zej_zi-build/pip/req.pyu__init__As<																					%uInstallRequirement.__init__c	
Cs�t||�\}}}|jd�r6t|�}nd}|||d|ddd|d|dd�}|dk	r�||_n|S(Nufile:u
source_dirueditableuurlueditable_optionsuprereleasesT(uparse_editableu
startswithuurl_to_pathuNoneuTrueuextras(	uclsueditable_requ
comes_fromudefault_vcsunameuurluextras_overrideu
source_dirures((u /tmp/pip-zej_zi-build/pip/req.pyu
from_editableps	u InstallRequirement.from_editablec	Cs�d	}|j�}d	}tjjtjj|��}d	}t|�rWt|�}n�tjj|�r�tjj	|ks�|j
d�r�t|�s�td|��ntt
|��}nFt|�rtjj|�s�tjd|�ntt
|��}n|r�|d	kr�|j}|j}|jdkrstjd|�rst
tjjtjj|j���}n|jtkr�t|j�}|j�s�td|j��q�q�n|}|||d|d|�S(
u�Creates an InstallRequirement from a name, which might be a
        requirement, directory containing 'setup.py', filename, or URL.
        u.u;Directory %r is not installable. File 'setup.py' not found.uARequirement %r looks like a filename, but the file does not existufileu\.\./u-%s is not a supported wheel on this platform.uurluprereleasesN(uNoneustripuosupathunormpathuabspathuis_urluLinkuisdirusepu
startswithuis_installable_diruInstallationErrorupath_to_urluis_archive_fileuisfileuloggeruwarnuurl_without_fragmentuegg_fragmentuschemeureusearchuextu	wheel_extuWheelufilenameu	supporteduUnsupportedWheel(	uclsunameu
comes_fromuprereleasesuurlurequpathulinkuwheel((u /tmp/pip-zej_zi-build/pip/req.pyu	from_line�s43		!*uInstallRequirement.from_linecCs�|jr8t|j�}|jrA|d|j7}qAn	|j}|jdk	rm|dt|jj�7}n|jr�t|jt	�r�|j}n|jj
�}|r�|d|7}q�n|S(Nu from %su in %su
 (from %s)(urequstruurlusatisfied_byuNoneudisplay_pathulocationu
comes_fromu
isinstanceustring_typesu	from_path(uselfusu
comes_from((u /tmp/pip-zej_zi-build/pip/req.pyu__str__�s				uInstallRequirement.__str__cCsv|jdkrdSt|j�}|jrrt|jt�rI|j}n|jj�}|rr|d|7}qrn|S(Nu->(urequNoneustru
comes_fromu
isinstanceustring_typesu	from_path(uselfusu
comes_from((u /tmp/pip-zej_zi-build/pip/req.pyu	from_path�s	uInstallRequirement.from_pathcCs�|jdk	r|jS|jdkrJtjdd�|_||_|jS|jre|jj�}n	|j}t	j
j|�s�t|�nt	j
j
||�S(Nu-buildupip-(u_temp_build_diruNoneurequtempfileumkdtempu_ideal_build_dirueditableunameuloweruosupathuexistsu_make_build_dirujoin(uselfu	build_diruunpackuname((u /tmp/pip-zej_zi-build/pip/req.pyubuild_location�s			
u!InstallRequirement.build_locationcCs8|jdk	rdS|jdk	s(t�|js7t�|j}|j}|`|jrj|jj�}n	|j}t	j
j||�}t	j
j|�s�t
jd|�t|�nt	j
j|�r�tdt|���nt
jd|t|�t|�f�tj||�||_||_d|_dS(ukIf the build location was a temporary directory, this will move it
        to a new more permanent locationNuCreating directory %su<A package already exists in %s; please remove it to continueu,Moving package %s from %s to new location %s(u
source_diruNoneurequAssertionErroru_temp_build_diru_ideal_build_dirueditableunameuloweruosupathujoinuexistsuloggerudebugu_make_build_diruInstallationErrorudisplay_pathushutilumoveu_egg_info_path(uselfuold_locationu
new_build_dirunameunew_location((u /tmp/pip-zej_zi-build/pip/req.pyucorrect_build_location�s0				
			u)InstallRequirement.correct_build_locationcCs|jdkrdS|jjS(N(urequNoneuproject_name(uself((u /tmp/pip-zej_zi-build/pip/req.pyuname�suInstallRequirement.namecCs&|jdkrdStj|jj�S(N(urequNoneuurllibuquoteuunsafe_name(uself((u /tmp/pip-zej_zi-build/pip/req.pyuurl_namesuInstallRequirement.url_namec
Cs�yddl}Wntk
r0td��YnXd}|jrtd|jkrttjj|j|jd|�}ntjj|j|�}tj	r�t
|tj�r�|jt
j��}n|S(NiuBsetuptools must be installed to install from a source distributionusetup.pyusubdirectory(u
setuptoolsuImportErroruInstallationErrorueditable_optionsuosupathujoinu
source_dirusixuPY2u
isinstanceu	text_typeuencodeusysugetfilesystemencoding(uselfu
setuptoolsu
setup_fileusetup_py((u /tmp/pip-zej_zi-build/pip/req.pyusetup_pys

uInstallRequirement.setup_pycCs�|jst�|jr8tjd|j|jf�ntjd|j|jf�tjd7_z>|jdkr�tj	j
tj	j|jd��r�ttj	j|jd��n|j
}|jdt|j��}|jdt|j��}tjd	|d
g}|js|r&g}nFtj	j|jd�}tj	j|�s`tj|�nddg}t||d
|jd|jdddtjdd�Wdtjd8_X|js�tjjd|j��|_|j�ndS(Nu2Running setup.py (path:%s) egg_info for package %su7Running setup.py (path:%s) egg_info for package from %siu
distributeu
setuptoolsudistribute.egg-infou__SETUP_PY__u__PKG_NAME__u-cuegg_infoupip-egg-infou
--egg-baseucwdu
filter_stdoutushow_stdoutu
command_levelucommand_descupython setup.py egg_infou%(Name)s==%(Version)sF(u
source_diruAssertionErrorunameuloggerunotifyusetup_pyuurluindentuosupathuisdirujoinurmtreeu
_run_setup_pyureplaceureprusysu
executableueditableuexistsumakedirsucall_subprocessu_filter_installuFalseu
VERBOSE_DEBUGurequ
pkg_resourcesuRequirementuparseupkg_infoucorrect_build_location(uselfuforce_root_egg_infouscriptuegg_info_cmduegg_base_optionuegg_info_dir((u /tmp/pip-zej_zi-build/pip/req.pyurun_egg_info!s8	 	4		
			uInstallRequirement.run_egg_infou}
__file__ = __SETUP_PY__
from setuptools.command import egg_info
import pkg_resources
import os
import tokenize
def replacement_run(self):
    self.mkpath(self.egg_info)
    installer = self.distribution.fetch_build_egg
    for ep in pkg_resources.iter_entry_points('egg_info.writers'):
        # require=False is the change we're making:
        writer = ep.load(require=False)
        if writer:
            writer(self, ep.name, os.path.join(self.egg_info,ep.name))
    self.find_sources()
egg_info.egg_info.run = replacement_run
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))
cCsy|jdk	r5|jj|�s%dS|jj|�S|jsDt�|j|�}tjj	|�sidSt
|�}|S(N(usatisfied_byuNoneuhas_metadatauget_metadatau
source_diruAssertionErroru
egg_info_pathuosupathuexistsuread_text_file(uselfufilenameudata((u /tmp/pip-zej_zi-build/pip/req.pyu
egg_info_databsu InstallRequirement.egg_info_datac	s|jdkr|jr$|j}ntjj|jd�}tj|�}|jr�g}x
tj|�D]�\�}}x-t	j
D]"}||kr�|j|�q�q�Wx�t|�D]�}tjj
tjj�|dd��s
tjj
tjj�|dd��r|j|�n|dks2|dkr�|j|�q�q�W|j�fdd	�|D��qjWd
d	�|D�}n|s�td||f��n|s�td||f��t|�dkr�|jd
dd��ntjj||d�|_ntjj|j|�S(Nupip-egg-infoubinupythonuScriptsu
Python.exeutestutestscs%g|]}tjj�|��qS((uosupathujoin(u.0udir(uroot(u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	u4InstallRequirement.egg_info_path.<locals>.<listcomp>cSs%g|]}|jd�r|�qS(u	.egg-info(uendswith(u.0uf((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	u$No files/directories in %s (from %s)iukeycSs8|jtjj�tjjr3|jtjj�p6dS(Ni(ucountuosupathusepualtsep(ux((u /tmp/pip-zej_zi-build/pip/req.pyu<lambda>�su2InstallRequirement.egg_info_path.<locals>.<lambda>i(u_egg_info_pathuNoneueditableu
source_diruosupathujoinulistdiruwalkuvcsudirnamesuremoveulistuexistsuextenduInstallationErroruAssertionErrorulenusort(uselfufilenameubaseu	filenamesudirsufilesudir((urootu /tmp/pip-zej_zi-build/pip/req.pyu
egg_info_pathns6		''u InstallRequirement.egg_info_pathcCso|j|�}|sgSg}xI|j�D];}|j�}|s,|jd�rZq,n|j|�q,W|S(Nu#(u
egg_info_datau
splitlinesustripu
startswithuappend(uselfufilenameudatauresultuline((u /tmp/pip-zej_zi-build/pip/req.pyuegg_info_lines�su!InstallRequirement.egg_info_linescCs^t�}|jd�}|sAtjdt|jd���n|j|pPd�|j�S(NuPKG-INFOuNo PKG-INFO file found in %su(u
FeedParseru
egg_info_datauloggeruwarnudisplay_pathu
egg_info_pathufeeduclose(uselfupudata((u /tmp/pip-zej_zi-build/pip/req.pyupkg_info�s	#uInstallRequirement.pkg_infocCs
|jd�S(Nudependency_links.txt(uegg_info_lines(uself((u /tmp/pip-zej_zi-build/pip/req.pyudependency_links�su#InstallRequirement.dependency_linksu	\[(.*?)\]ccs�d}xx|jd�D]g}|jj|j��}|rO|jd�}qn|rx||krxtjd|�qn|VqWdS(Nurequires.txtiuskipping extra %s(uNoneuegg_info_linesu_requirements_section_reumatchulowerugroupuloggerudebug(uselfuextrasuin_extraulineumatch((u /tmp/pip-zej_zi-build/pip/req.pyurequirements�suInstallRequirement.requirementsccs5x.|jjD] \}}|dkr
|Vq
q
WdS(Nu==(urequspecs(uselfu	qualifieruversion((u /tmp/pip-zej_zi-build/pip/req.pyuabsolute_versions�su$InstallRequirement.absolute_versionscCs|j�dS(Nuversion(upkg_info(uself((u /tmp/pip-zej_zi-build/pip/req.pyuinstalled_version�su$InstallRequirement.installed_versioncCsk|jst�|j}||jkrDtjd||jf�n#tjdt|j�||f�dS(Nu'Requested %s, but installing version %su;Source in %s has version %s, which satisfies requirement %s(u
source_diruAssertionErroruinstalled_versionurequloggeruwarnudebugudisplay_path(uselfuversion((u /tmp/pip-zej_zi-build/pip/req.pyuassert_source_matches_version�s		u0InstallRequirement.assert_source_matches_versioncCs|js!tjd|j�dS|js0t�|js?t�|jjd�rUdSd|jkswtd|j��|js�dS|jjdd�\}}t	j
|�}|r�||j�}|r�|j|j�q|j|j�ndstd|j|f��dS(Nu>Cannot update repository at %s; repository location is unknownufile:u+ubad url: %riiu+Unexpected version control type (in %s): %s(
uurluloggeruinfou
source_dirueditableuAssertionErroru
startswithuupdateusplituvcsuget_backenduobtainuexport(uselfuobtainuvc_typeuurlubackenduvcs_backend((u /tmp/pip-zej_zi-build/pip/req.pyuupdate_editable�s(	"		u"InstallRequirement.update_editablecsd|j�s%td|jf��n|jp4|j}t|�}tjj|j	|j
��d}tjj|j	dj|j
�jd�dd���d}|jdt
jd�}|j
�d	}t|�}tjj|�}	tjj|�}
tjj|�}|	s|
rR|	r)|}n|}|j|�|jd
�r�x|jd
�j�D]4}
tjjtjj||
��}|j|�qaWq�|jd�r�|jd�r�|jd��ng�xz�fd
d�|jd�j�D�D]M}tjj|j	|�}|j|�|j|d�|j|d�q�Wq�n?|j	j|�r�|j|j	�tjjtjj|j	�d�}|j|d|�n�|r^t|d�}tjj|j�j��}|j�||j	kstd||j|j	f��|j|�tjjtjj|�d�}|j||j	�n3|r�x*tj j!|�D]}|j|�qwWn|jd�r5|j"d�r5x�|j#d�D]o}t$|�r�t%}nt&}|jtjj||��t'j(dkr�|jtjj||�d�q�q�Wn|jd�rJt)j*�}|j+t,|j-d���|j.d�rJx�|j/d�D]�\}}t$|�r�t%}nt&}|jtjj||��t'j(dkr�|jtjj||�d�|jtjj||�d�|jtjj||�d�q�q�WqJn|j0|�||_1dS(u�
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        u.Cannot uninstall requirement %s, not installedu	.egg-infou-Niu
.dist-infou-py%suu.egguinstalled-files.txtu
top_level.txtunamespace_packages.txtcs(g|]}|r|�kr|�qS(((u.0up(u
namespaces(u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>s	u0InstallRequirement.uninstall.<locals>.<listcomp>u.pyu.pycueasy-install.pthu./uru;Egg-link %s does not match installed location of %s (at %s)uscriptsuwin32u.batuentry_points.txtuconsole_scriptsu.exeu
.exe.manifestu
-script.py(2ucheck_if_existsuUninstallationErrorunameusatisfied_byuconflicts_withuUninstallPathSetuosupathujoinulocationuegg_nameusplitureplaceu
pkg_resourcesuPY_MAJORu
egg_link_pathuexistsuadduhas_metadatauget_metadatau
splitlinesunormpathuendswithudirnameuadd_pthuopenunormcaseureadlineustripucloseuAssertionErrorupipuwheeluuninstallation_pathsumetadata_isdirumetadata_listdirudist_in_usersiteubin_userubin_pyusysuplatformuConfigParseruSafeConfigParserureadfpuFakeFileuget_metadata_linesuhas_sectionuitemsuremoveuuninstalled(uselfuauto_confirmudistupaths_to_removeupip_egg_info_pathudist_info_pathudebian_egg_info_pathueasy_install_eggudevelop_egg_linkupip_egg_info_existsudebian_egg_info_existsudist_info_existsu
egg_info_pathuinstalled_fileupathu
top_level_pkgueasy_install_pthufhulink_pointeruscriptubin_diruconfigunameuvalue((u
namespacesu /tmp/pip-zej_zi-build/pip/req.pyu	uninstall�s�
(	
!
	
.
		*	  -
uInstallRequirement.uninstallcCs4|jr|jj�ntjd|jf�dS(Nu'Can't rollback %s, nothing uninstalled.(uuninstalledurollbackuloggeruerroruproject_name(uself((u /tmp/pip-zej_zi-build/pip/req.pyurollback_uninstallYs		u%InstallRequirement.rollback_uninstallcCs4|jr|jj�ntjd|jf�dS(Nu%Can't commit %s, nothing uninstalled.(uuninstalleducommituloggeruerroruproject_name(uself((u /tmp/pip-zej_zi-build/pip/req.pyucommit_uninstall`s		u#InstallRequirement.commit_uninstallcCs�|jst�d}d|j|jf}tjj||�}tjj|�rt	dt
|�d�}|dkr�d}q|dkr�tj
dt
|��tj|�q|dkrt|�}tj
dt
|�t
|�f�tj||�qn|r�tj|dtj�}tjjtjj|j��}xtj|�D]�\}	}
}d|
kr~|
jd�nxl|
D]d}tjj|	|�}|j||�}
tj|jd	|
d	�}d|_|j|d�q�Wxb|D]Z}|tkrq�ntjj|	|�}|j||�}
|j||jd	|
�q�WqSW|j�tjd
8_tj dt
|��ndS(Nu	%s-%s.zipu/The file %s exists. (i)gnore, (w)ipe, (b)ackup uiuwubuDeleting %suBacking up %s to %supip-egg-infou/i�iuiuSaved %sT(uiuwubFi�(!u
source_diruAssertionErroruTrueunameuinstalled_versionuosupathujoinuexistsuask_path_existsudisplay_pathuFalseuloggeruwarnuremoveu
backup_dirushutilumoveuzipfileuZipFileuZIP_DEFLATEDunormcaseuabspathuwalku_clean_zip_nameuZipInfou
external_attruwritestruPIP_DELETE_MARKER_FILENAMEuwriteucloseuindentunotify(uselfu	build_dirucreate_archiveuarchive_nameuarchive_pathuresponseu	dest_fileuzipudirudirpathudirnamesu	filenamesudirnameunameuzipdirufilename((u /tmp/pip-zej_zi-build/pip/req.pyuarchivegsN		!
	
#
uInstallRequirement.archivecCse|j|tjj�s/td||f��|t|�dd�}|jtjjd�}|S(Nu$name %r doesn't start with prefix %riu/(u
startswithuosupathusepuAssertionErrorulenureplace(uselfunameuprefix((u /tmp/pip-zej_zi-build/pip/req.pyu_clean_zip_name�s
u"InstallRequirement._clean_zip_namecs�|jr|j||�dS|jrztjj|j�}tjj||j�|j	|jd�d|�d|_dStj
dd�}tjj|d�}z�tjg}|jd�|jd|j�|t|�dd	|g7}|js|d
g7}n�dk	r&|d�g7}n|jr?|dg7}n
|d
g7}t�r�|dtjjtjdddt��g7}ntjd|j�tjd7_z*t||d|jd|j dd �Wdtjd8_Xtjj"|�stjd|�dSd|_|jr$dS�fdd�}	t#|�}
xN|
D]1}|j$�}|j%d�rI|	|�}PqIqIWtj&d|�dS|
j'�g}
t#|�}
x[|
D]S}|j$�}tjj(|�r�|tjj)7}n|
jt*|	|�|��q�W|
j'�t#tjj|d�d�}
|
j+dj|
�d�|
j'�Wdtjj"|�rtj,|�ntj-|�XdS(!Nurootustrip_file_prefixu-recordupip-uinstall-record.txtu-cu�import setuptools, tokenize;__file__=%r;exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))uinstallu--recordu#--single-version-externally-managedu--rootu	--compileu--no-compileu--install-headersuincludeusiteupythonuRunning setup.py install for %siucwdu
filter_stdoutushow_stdoutuRecord file %s not foundcs4�dkstjj|�r#|St�|�SdS(N(uNoneuosupathuisabsuchange_root(upath(uroot(u /tmp/pip-zej_zi-build/pip/req.pyuprepend_root�su0InstallRequirement.install.<locals>.prepend_rootu	.egg-infou;Could not find .egg-info directory in install record for %suinstalled-files.txtuwu
TF(.ueditableuinstall_editableuis_wheelupipuwheelu
wheel_versionu
source_dirucheck_compatibilityunameumove_wheel_filesuTrueuinstall_succeededutempfileumkdtempuosupathujoinusysu
executableuappendusetup_pyulistuas_egguNoneu	pycompileurunning_under_virtualenvuprefixuget_python_versionuloggerunotifyuindentucall_subprocessu_filter_installuFalseuexistsuopenustripuendswithuwarnucloseuisdirusepumake_path_relativeuwriteuremoveurmdir(uselfuinstall_optionsuglobal_optionsurootustrip_file_prefixuversionu
temp_locationurecord_filenameuinstall_argsuprepend_rootufulineuegg_info_diru	new_linesufilename((urootu /tmp/pip-zej_zi-build/pip/req.pyuinstall�s�				
		
	
		


 
uInstallRequirement.installcCs�|jstjj|j�rWtjd|j�|jrKt|j�nd|_n|j
r�tjj|j
�r�t|j
�nd|_
dS(uVRemove the source files from this requirement, if they are marked
        for deletionuRemoving source in %sN(u	is_bundleuosupathuexistsudelete_marker_filenameuloggeruinfou
source_dirurmtreeuNoneu_temp_build_dir(uself((u /tmp/pip-zej_zi-build/pip/req.pyuremove_temporary_source�s	u*InstallRequirement.remove_temporary_sourcecCs�tjd|j�tjd7_zWttjdd|jgt|�ddgt|�d|j	d|j
d	d
�Wdtjd8_Xd|_
dS(NuRunning setup.py develop for %siu-cu�import setuptools, tokenize; __file__=%r; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))udevelopu	--no-depsucwdu
filter_stdoutushow_stdoutFT(uloggerunotifyunameuindentucall_subprocessusysu
executableusetup_pyulistu
source_diru_filter_installuFalseuTrueuinstall_succeeded(uselfuinstall_optionsuglobal_options((u /tmp/pip-zej_zi-build/pip/req.pyuinstall_editables7u#InstallRequirement.install_editablecCsatj}xKddddddddgD]+}tj||j��r(tj}Pq(q(W||fS(	Nu^running .*u^writing .*u^creating .*u^[Cc]opying .*u^reading .*u4^removing .*\.egg-info' \(and everything under it\)$u^byte-compiling u7^warning: manifest_maker: standard file '-c' not found$(uloggeruNOTIFYureusearchustripuINFO(uselfulineuleveluregex((u /tmp/pip-zej_zi-build/pip/req.pyu_filter_installs	
	u"InstallRequirement._filter_installcCs|jdkrdSyJ|jjdkrG|jrG|jjdkrGdStj|j�|_Wn�tj	k
rxdSYn�tj
k
rtj|jj�}|jr�t|�r�||_q�t
�r�t|�r�td|j|jf��q�n	||_YnXdS(u�Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.conflicts_with appropriately.u
setuptoolsu
distributeuVWill not install to the user site because it will lack sys.path precedence to %s in %sNFT(urequNoneuFalseuproject_nameuconflicts_withuTrueu
pkg_resourcesuget_distributionusatisfied_byuDistributionNotFounduVersionConflictu
use_user_siteudist_in_usersiteurunning_under_virtualenvudist_in_site_packagesuInstallationErrorulocation(uselfu
existing_dist((u /tmp/pip-zej_zi-build/pip/req.pyucheck_if_existss(		u"InstallRequirement.check_if_existscCs|jod|jkS(Nu.whl(uurl(uself((u /tmp/pip-zej_zi-build/pip/req.pyuis_wheel=suInstallRequirement.is_wheelcCsu|jdk	r|jS|j}|s)dStjjtjj|d��phtjjtjj|d��|_|jS(Nupip-manifest.txtupyinstall-manifest.txtF(u
_is_bundleuNoneu_temp_build_diruFalseuosupathuexistsujoin(uselfubase((u /tmp/pip-zej_zi-build/pip/req.pyu	is_bundleAs	!$uInstallRequirement.is_bundlec
csGx|jD]�}tjj|�}x�tjD]�}d}}tjj||j�}tjj	|�r,|j
}t|�}|j�}	|j
�|�j|	�\}}Pq,q,W|r�d|||f}nd}t||ddd|ddd|dd�Vq
Wx=|jD]2}tjj|�}t||d|dd�Vq
WdS(	Nu%s+%s@%sueditableuurluupdateu
source_dirufrom_bundleTF(u_bundle_editable_dirsuosupathubasenameuvcsubackendsuNoneujoinubundle_fileuexistsunameuopenureaducloseuparse_vcs_bundle_fileuInstallRequirementuTrueuFalseu_bundle_build_dirs(
uselfudest_dirupackageuvcs_backenduurlurevuvcs_bundle_fileuvc_typeufpucontent((u /tmp/pip-zej_zi-build/pip/req.pyubundle_requirementsMs,
		
u&InstallRequirement.bundle_requirementsc
Cs�|j}|st�tjj|d�}tjj|d�}g}g}x#|||f|||fgD]\}}	}
tjj|�rjx�tj|�D]�}tjj|	|�}|
j|�tjj|�r�tj	d|||f�q�ntjj|	�s(tj
d|	�tj|	�ntj
tjj||�|�q�Wtj|�smtj|�qmqjqjWd|_||_||_dS(NusrcubuilduZThe directory %s (containing package %s) already exists; cannot move source from bundle %suCreating directory %s(u_temp_build_diruAssertionErroruosupathujoinuexistsulistdiruappenduloggeruwarnuinfoumakedirsushutilumoveurmdiruNoneu_bundle_build_dirsu_bundle_editable_dirs(
uselfudest_build_dirudest_src_dirubaseusrc_diru	build_dirubundle_build_dirsubundle_editable_dirsu
source_dirudest_dirudir_collectionudirnameudest((u /tmp/pip-zej_zi-build/pip/req.pyumove_bundle_filesgs4	
	#		u$InstallRequirement.move_bundle_filescCsAt|j|j|d|jd|jd|d|jd|�dS(Nuuseruhomeurootu	pycompileustrip_file_prefix(umove_wheel_filesunameurequ
use_user_siteu
target_diru	pycompile(uselfuwheeldirurootustrip_file_prefix((u /tmp/pip-zej_zi-build/pip/req.pyumove_wheel_files�s			u#InstallRequirement.move_wheel_filescCs%|jst�tjj|jt�S(N(u
source_diruAssertionErroruosupathujoinuPIP_DELETE_MARKER_FILENAME(uself((u /tmp/pip-zej_zi-build/pip/req.pyudelete_marker_filename�su)InstallRequirement.delete_marker_filenameNFT(1u__name__u
__module__u__qualname__uNoneuFalseuTrueu__init__uclassmethodu
from_editableu	from_lineu__str__u	from_pathubuild_locationucorrect_build_locationupropertyunameuurl_nameusetup_pyurun_egg_infou
_run_setup_pyu
egg_info_datau
egg_info_pathuegg_info_linesupkg_infoudependency_linksureucompileu_requirements_section_reurequirementsuabsolute_versionsuinstalled_versionuassert_source_matches_versionuupdate_editableu	uninstallurollback_uninstallucommit_uninstalluarchiveu_clean_zip_nameuinstalluremove_temporary_sourceuinstall_editableu_filter_installucheck_if_existsuis_wheelu	is_bundleubundle_requirementsumove_bundle_filesumove_wheel_filesudelete_marker_filename(u
__locals__((u /tmp/pip-zej_zi-build/pip/req.pyuInstallRequirement?sV-*
?*
	n)]!
uInstallRequirementcBsh|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS(uRequirementscCsg|_i|_dS(N(u_keysu_dict(uself((u /tmp/pip-zej_zi-build/pip/req.pyu__init__�s	uRequirements.__init__cCs|jS(N(u_keys(uself((u /tmp/pip-zej_zi-build/pip/req.pyukeys�suRequirements.keyscs�fdd��jD�S(Ncsg|]}�j|�qS((u_dict(u.0ukey(uself(u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	u'Requirements.values.<locals>.<listcomp>(u_keys(uself((uselfu /tmp/pip-zej_zi-build/pip/req.pyuvalues�suRequirements.valuescCs
||jkS(N(u_keys(uselfuitem((u /tmp/pip-zej_zi-build/pip/req.pyu__contains__�suRequirements.__contains__cCs3||jkr"|jj|�n||j|<dS(N(u_keysuappendu_dict(uselfukeyuvalue((u /tmp/pip-zej_zi-build/pip/req.pyu__setitem__�suRequirements.__setitem__cCs|j|S(N(u_dict(uselfukey((u /tmp/pip-zej_zi-build/pip/req.pyu__getitem__�suRequirements.__getitem__cs0�fdd��j�D�}ddj|�S(Ncs0g|]&}dt|�t�|�f�qS(u%s: %s(urepr(u.0uk(uself(u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	u)Requirements.__repr__.<locals>.<listcomp>uRequirements({%s})u, (ukeysujoin(uselfuvalues((uselfu /tmp/pip-zej_zi-build/pip/req.pyu__repr__�suRequirements.__repr__N(
u__name__u
__module__u__qualname__u__init__ukeysuvaluesu__contains__u__setitem__u__getitem__u__repr__(u
__locals__((u /tmp/pip-zej_zi-build/pip/req.pyuRequirements�suRequirementsc
BsF|EeZdZd(d)d)d)d(d)d)d)d(d*d(dd�Zdd�Zdd�Zdd�Z	e
d	d
��Ze
dd��Ze
d
d��Z
dd�Zd)dd�Zdd�Zd)d)dd�Zd)dd�Zdd�Zdd�Zd(d)dd�Zfdd �Zd!d"�Zd#Zd$d%�Zd&d'�Zd(S(+uRequirementSetcCs�||_||_||_|r6tjj|�}n||_||_||_|
|_	t
�|_i|_g|_
|	|_g|_g|_g|_||_||_||_|p�t�|_|
|_||_dS(N(u	build_dirusrc_dirudownload_diruosupathu
expanduserudownload_cacheuupgradeuignore_installeduforce_reinstalluRequirementsurequirementsurequirement_aliasesuunnamed_requirementsuignore_dependenciesusuccessfully_downloadedusuccessfully_installedureqs_to_cleanupuas_eggu
use_user_siteu
target_diru
PipSessionusessionu	pycompileuwheel_download_dir(uselfu	build_dirusrc_dirudownload_dirudownload_cacheuupgradeuignore_installeduas_eggu
target_diruignore_dependenciesuforce_reinstallu
use_user_siteusessionu	pycompileuwheel_download_dir((u /tmp/pip-zej_zi-build/pip/req.pyu__init__�s,																	uRequirementSet.__init__cCsLdd�|jj�D�}|jddd��djdd�|D��S(NcSsg|]}|js|�qS((u
comes_from(u.0ureq((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	u*RequirementSet.__str__.<locals>.<listcomp>ukeycSs
|jj�S(N(unameulower(ureq((u /tmp/pip-zej_zi-build/pip/req.pyu<lambda>�su(RequirementSet.__str__.<locals>.<lambda>u cSsg|]}t|j��qS((ustrureq(u.0ureq((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	(urequirementsuvaluesusortujoin(uselfureqs((u /tmp/pip-zej_zi-build/pip/req.pyu__str__�suRequirementSet.__str__cCs�|j}|j|_|j|_|j|_|j|_|sR|jj|�ni|j|�r�td||j	|�|f��n||j
|<|j�|kr�||j|j�<ndS(Nu5Double requirement given: %s (already in %s, name=%r)(
unameuas_eggu
use_user_siteu
target_diru	pycompileuunnamed_requirementsuappenduhas_requirementuInstallationErroruget_requirementurequirementsulowerurequirement_aliases(uselfuinstall_requname((u /tmp/pip-zej_zi-build/pip/req.pyuadd_requirement�s	
uRequirementSet.add_requirementcCsCx<||j�fD](}||jks7||jkrdSqWdS(NTF(ulowerurequirementsurequirement_aliasesuTrueuFalse(uselfuproject_nameuname((u /tmp/pip-zej_zi-build/pip/req.pyuhas_requirement�suRequirementSet.has_requirementcCst|jj��p|jS(N(ulisturequirementsuvaluesuunnamed_requirements(uself((u /tmp/pip-zej_zi-build/pip/req.pyuhas_requirements�suRequirementSet.has_requirementscCsJtdd�|jj�D��r&dStdd�|jD��rFdSdS(Ncss|]}|jVqdS(N(ueditable(u.0ureq((u /tmp/pip-zej_zi-build/pip/req.pyu	<genexpr>�su/RequirementSet.has_editables.<locals>.<genexpr>css|]}|jVqdS(N(ueditable(u.0ureq((u /tmp/pip-zej_zi-build/pip/req.pyu	<genexpr>�sTF(uanyurequirementsuvaluesuTrueuunnamed_requirementsuFalse(uself((u /tmp/pip-zej_zi-build/pip/req.pyu
has_editables�s
"uRequirementSet.has_editablescCsg|jrctjj|j�|_tjj|j�r:dStjd�tdt	|j���ndS(Nu!Could not find download directoryu0Could not find or access download directory '%s'TF(udownload_diruosupathu
expanduseruexistsuTrueuloggerufataluInstallationErrorudisplay_pathuFalse(uself((u /tmp/pip-zej_zi-build/pip/req.pyuis_download�s	
uRequirementSet.is_downloadcCslxU||j�fD]A}||jkr3|j|S||jkr|j|j|SqWtd|��dS(NuNo project with the name %r(ulowerurequirementsurequirement_aliasesuKeyError(uselfuproject_nameuname((u /tmp/pip-zej_zi-build/pip/req.pyuget_requirementsuRequirementSet.get_requirementcCs8x1|jj�D] }|jd|�|j�qWdS(Nuauto_confirm(urequirementsuvaluesu	uninstallucommit_uninstall(uselfuauto_confirmureq((u /tmp/pip-zej_zi-build/pip/req.pyu	uninstallsuRequirementSet.uninstallcCs�t|j�}t|jj��}xc|s3|r�|rK|jd�}n|jd�}d}|jr�|jr�|j�|j	r�|j
r�|jo�t|j	�s�|j	|_
nd|_	q�d}n|j	r�tjd|�q�n|jr |jdkrE|j|j�|_qEn%|rE|j|j|j�|_n|jdk	r'tjj|j�r'td||jf��q'q'WdS(Niu<Requirement already satisfied (use --upgrade to upgrade): %su�Could not install requirement %s because source folder %s does not exist (perhaps --no-download was used without first running an equivalent install with --no-install?)TF(ulistuunnamed_requirementsurequirementsuvaluesupopuTrueuignore_installedueditableucheck_if_existsusatisfied_byuupgradeu
use_user_siteudist_in_usersiteuconflicts_withuNoneuFalseuloggerunotifyu
source_dirubuild_locationusrc_diru	build_diruis_downloaduosupathuisdiruInstallationError(uselfuunnamedureqsureq_to_installuinstall_needed((u /tmp/pip-zej_zi-build/pip/req.pyulocate_filess4
						%uRequirementSet.locate_filesc1Cs�t|j�}t|jj��}x�|s3|r�|rK|jd�}n|jd�}d}d}d}	|jr�|j	r�|j
�|jr`|jrW|j
r|jry|j||j�}
Wn?tk
r�d}d}Yqtk
r
tj�d}	YqX|
j|_n|s]|jo6t|j�sH|j|_nd|_q]q`d}n|jr�|r�tjd|�q�tjd|�q�n|j	r�tjd|�n^|r|jr|jj�jd�rtjdtt|j���qtjd|�ntjd	7_zld}d}|j	r�|jdkri|j|j �}
|
|_n	|j}
t!j"j#|j$�s�t%|j$�n|j&|j'�|j'r�|j(�|j)|j*�q1|j(�nV|r1|j|j$|j'�}
d}d}
|j+rnWt!j"j#t!j"j,|
d
��rUt-t.j/d||
f���n|jdkr�|	rs|	�n|j|d|j�}
nt0|j�}
|
s�t1�|
rcyY|
j2j3t4�r�|j5r�|j5}d}n|j*}|j'}|j6|
|
||�Wqit7k
r_}z5tj8d
||f�t9d|||
f��WYdd}~XqiXnd}|r1|j:}|
o�|
j2j3t4�}|r�|j;|j$|j �x�|j<�D] }|j=|�|j>|�q�Wn�|j'r3|
|_|s|j(�n|
r�|
j?t@jAkr�|j)|j*�q�ny|rQ|
|_|
j|_n[|
|_|j(�|r}|j(dd�n|jB�|r�|jr�|jC|�d}n|js�|j
�n|jr.|js�|jr|jo�t|j�s|j|_nd|_q+tjd|�d}q.q1n|r�ttDjE|
��d}|jFsx|jG�|_F|j>|�n|jHsxd|jI|jJ�D]M}|jK|jL�r�q�ntMtN|�|�}|j=|�|j>|�q�Wqn&|s|jO|jP�|jJr*tjddj,|jJ��n|jHs�x�|j|jJ�D]�}ytDjQjR|�jL}Wn?tSk
r�tj�d}tjTd|||f�wFYnX|jK|�r�qFntM||�}|j=|�|j>|�qFWn|jK|jU�s|j>|�qn|sE|j's/|jVdk	rE|jWj=|�qEn|r�|jXj=|�|r�|jr�|jjd�r�|jC|�q�nWdtjd	8_Xq'WdS(uGPrepare process. Create temp directories, download and/or unpack files.iiu"Requirement already up-to-date: %su<Requirement already satisfied (use --upgrade to upgrade): %suObtaining %sufile:uUnpacking %suDownloading/unpacking %siusetup.pyu�
                          pip can't proceed with requirement '%s' due to a pre-existing build directory.
                           location: %s
                          This is likely due to a previous installation that failed.
                          pip is being responsible and not assuming it can delete this.
                          Please delete it and try again.
                        uupgradeu4Could not install requirement %s because of error %suDCould not install requirement %s because of HTTP error %s for URL %sNuforce_root_egg_infou!Installing extra requirements: %ru,u.Invalid requirement: %r (%s) in requirement %sufile:///TF(Yulistuunnamed_requirementsurequirementsuvaluesupopuTrueuFalseuNoneuignore_installedueditableucheck_if_existsusatisfied_byuupgradeuforce_reinstalluurlufind_requirementuBestVersionAlreadyInstalleduDistributionNotFoundusysuexc_infou
use_user_siteudist_in_usersiteuconflicts_withuloggerunotifyuloweru
startswithudisplay_pathuurl_to_pathuindentu
source_dirubuild_locationusrc_diruosupathuexistsu	build_diru_make_build_diruupdate_editableuis_downloadurun_egg_infouarchiveudownload_dirufrom_bundleujoinuPreviousBuildDirErrorutextwrapudedentuLinkuAssertionErrorufilenameuendswithu	wheel_extuwheel_download_diru
unpack_urlu	HTTPErrorufataluInstallationErroru	is_bundleumove_bundle_filesubundle_requirementsuappenduadd_requirementuschemeuvcsuall_schemesuassert_source_matches_versionucopy_to_build_diru
pkg_resourcesufind_distributionsurequas_requirementuignore_dependenciesurequiresuextrasuhas_requirementuproject_nameuInstallRequirementustruadd_dependency_linksudependency_linksuRequirementuparseu
ValueErroruerrorunameu_temp_build_dirureqs_to_cleanupusuccessfully_downloaded(uselfufinderuforce_root_egg_infoubundleuunnamedureqsureq_to_installuinstallubest_installedu	not_founduurlu	is_bundleuis_wheelulocationuunpackudownload_dirudo_downloaduexcueusubrequdisturequname((u /tmp/pip-zej_zi-build/pip/req.pyu
prepare_files:sV
		


					!#			

	!								)	
		
		


		
					
	 	

	!uRequirementSet.prepare_filescCs�tjd�tjd7_x|jD]}|j�q&Wg}|j�r_|j|j�n|rx|j|j�nx>|D]6}t	j
j|�rtjd|�t
|�qqWtjd8_dS(uClean up files, remove builds.uCleaning up...iuRemoving temporary dir %s...N(uloggerunotifyuindentureqs_to_cleanupuremove_temporary_sourceu_pip_has_created_build_diruappendu	build_dirusrc_diruosupathuexistsuinfourmtree(uselfubundleurequ
remove_dirudir((u /tmp/pip-zej_zi-build/pip/req.pyu
cleanup_files's

uRequirementSet.cleanup_filescCs1|jtko0tjjtjj|jt��S(N(u	build_dirubuild_prefixuosupathuexistsujoinuPIP_DELETE_MARKER_FILENAME(uself((u /tmp/pip-zej_zi-build/pip/req.pyu_pip_has_created_build_dir>su)RequirementSet._pip_has_created_build_dircCs�|jr|jp|j}tjd|j|f�tjj||j�}t	j
|j|�tdd|dgd|dd�dS(NuCopying %s to %supythonu%s/setup.pyucleanucwducommand_descupython setup.py clean(
ueditableusrc_diru	build_diruloggeruinfounameuosupathujoinushutilucopytreeu
source_dirucall_subprocess(uselfureq_to_installu
target_dirudest((u /tmp/pip-zej_zi-build/pip/req.pyucopy_to_build_dirBsu RequirementSet.copy_to_build_dircCs�|dkr|j}nt|�rL|r3|}n|}t|||�nat|�r~t|||�|r�t|�q�n/t|||j||j	�|r�t|�ndS(N(
uNoneudownload_diru
is_vcs_urluunpack_vcs_linkuis_file_urluunpack_file_urluwrite_delete_marker_fileuunpack_http_urludownload_cacheusession(uselfulinkulocationudownload_diru
only_downloaduloc((u /tmp/pip-zej_zi-build/pip/req.pyu
unpack_urlJs&	
uRequirementSet.unpack_urlc"Osdd�|jj�D�}tjjd�}xI|D]A}|jdkr5|j|kr5|j|�|j|�q5q5W|r�t	j
ddjdd�|D���nt	jd7_zCx<|D]4}|jd	kr0y=tjjd
�}	tj
d�}
|
|	kr|
|_nWq0tjk
r,Yq0Xn|jr�t	j
d|j�t	jd7_z|jdd�Wd
t	jd8_Xny|j||||�Wn+|jr�|jr�|j�n�Yn X|jr�|jr�|j�n|j�q�WWd
t	jd8_X||_d
S(uRInstall everything in this set (after having downloaded and unpacked the packages)cSsg|]}|js|�qS((usatisfied_by(u.0ur((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>ks	u*RequirementSet.install.<locals>.<listcomp>udistribute>=0.7u
distributeu!Installing collected packages: %su, cSsg|]}|j�qS((uname(u.0ureq((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>{s	iu
setuptoolsudistribute<0.7uFound existing installation: %suauto_confirmNT(urequirementsuvaluesu
pkg_resourcesuRequirementuparseunameuinstalled_versionuremoveuappenduloggerunotifyujoinuindentuget_distributionuconflicts_withuDistributionNotFoundu	uninstalluTrueuinstalluinstall_succeededurollback_uninstallucommit_uninstalluremove_temporary_sourceusuccessfully_installed(uselfuinstall_optionsuglobal_optionsuargsukwargsu
to_installudistribute_requrequrequirementudistribute_requirementuexisting_distribute((u /tmp/pip-zej_zi-build/pip/req.pyuinstallisJ	

*
		

uRequirementSet.installcCs�tj|dtj�}g}xJ|jdf|jdffD]*\}}tjjtjj|��}x�tj	|�D]�\}}}x�t
jD]�}	|	�}
d}}|
j
|kr�xR|D]}
|j|
�r�Pq�q�W|
jtjj||��\}}|j|�|
j}|
ji|d6|d6}|j|
j
�Pq�q�Wd|kre|jd�nxQ|D]I}tjj||�}|j||�}|j|d|dd�qlWx_|D]W}|tkr�q�ntjj||�}|j||�}|j||d|�q�W|rwtjj||�}|j||�}|j|d||�qwqwWq=W|jd	|j��|j�dS(
Nuwubuildusrcuurlurevupip-egg-infou/uupip-manifest.txt(uzipfileuZipFileuZIP_DEFLATEDu	build_dirusrc_diruosupathunormcaseuabspathuwalkuvcsubackendsuNoneudirnameu
startswithuget_infoujoinuappendubundle_fileuguideuremoveu_clean_zip_nameuwritestruPIP_DELETE_MARKER_FILENAMEuwriteubundle_requirementsuclose(uselfubundle_filenameuzipuvcs_dirsudirubasenameudirpathudirnamesu	filenamesubackenduvcs_backenduvcs_urluvcs_revuvcs_diruvcs_bundle_fileu	vcs_guideudirnameunameufilename((u /tmp/pip-zej_zi-build/pip/req.pyu
create_bundle�sL+	


	
 
#uRequirementSet.create_bundleu�# This is a pip bundle file, that contains many source packages
# that can be installed as a group.  You can install this like:
#     pip this_file.zip
# The rest of the file contains a list of all the packages included:
cCs�|jg}xAdd�|jj�D�D]#}|jd|j|jf�q)W|jd�xAdd�|jj�D�D]#}|jd|j|jf�qzWdj|�S(NcSsg|]}|js|�qS((u
comes_from(u.0ureq((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	u6RequirementSet.bundle_requirements.<locals>.<listcomp>u%s==%s
uC# These packages were installed to satisfy the above requirements:
cSsg|]}|jr|�qS((u
comes_from(u.0ureq((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	u(u
BUNDLE_HEADERurequirementsuvaluesuappendunameuinstalled_versionujoin(uselfupartsureq((u /tmp/pip-zej_zi-build/pip/req.pyubundle_requirements�s#!
#!u"RequirementSet.bundle_requirementscCse|j|tjj�s/td||f��|t|�dd�}|jtjjd�}|S(Nu$name %r doesn't start with prefix %riu/(u
startswithuosupathusepuAssertionErrorulenureplace(uselfunameuprefix((u /tmp/pip-zej_zi-build/pip/req.pyu_clean_zip_name�s
uRequirementSet._clean_zip_nameNFT(u__name__u
__module__u__qualname__uNoneuFalseuTrueu__init__u__str__uadd_requirementuhas_requirementupropertyuhas_requirementsu
has_editablesuis_downloaduget_requirementu	uninstallulocate_filesu
prepare_filesu
cleanup_filesu_pip_has_created_build_dirucopy_to_build_diru
unpack_urluinstallu
create_bundleu
BUNDLE_HEADERubundle_requirementsu_clean_zip_name(u
__locals__((u /tmp/pip-zej_zi-build/pip/req.pyuRequirementSet�s2		
'�E7uRequirementSetcCstj|�t|�dS(N(uosumakedirsuwrite_delete_marker_file(u	build_dir((u /tmp/pip-zej_zi-build/pip/req.pyu_make_build_dir�s
u_make_build_diru^(http|https|file):ccs|dkrt�}nd}|r-|jnd}|rKtj|�}ntjjtjj|��}t	|d|d|�\}}xzt
|j��D]f\}	}
|	d7}	|
j�}
tj
dd|
�}
|
s�|
jd�r�q�n|r|j|
�rq�n|
jd�s&|
jd�r�|
jd�rN|
d	d�j�}n%|
td�d�j�jd
�}tj|�r�tj||�}n3tj|�s�tjjtjj|�|�}nx3t||d|d|d|�D]}|Vq�Wq�|
jd�s|
jd
�rq�|
jd�s=|
jd�r�|
jd�re|
d	d�j�}
n%|
td�d�j�jd
�}
tjj||
�}
tjj|
�r�|
}
n|r|jj|
�qq�|
jd�s�|
jd�rY|
jd�r|
d	d�j�}
n%|
td�d�j�jd
�}
|r|
g|_qq�|
jd�r�|
td�d�j�jd
�}
|r|jj|
�qq�|
jd�r�d!|_q�|
jd�r�g|_q�|
jd�r:|
td�d�j�jd
�}
|jtt|
�j �g�O_q�|
jd�rUd!|_!q�|
jd�rgq�|
jd�ryq�|
jd�r�|
td�d�j�jd
�}
|j"tt|
�j �g�O_"q�|
jd�r/|
td�d�j�jd
�}
|j"tt|
�j �g�O_"q�d||	f}|
jd�s]|
jd�r�|
jd�r�|
d	d�j�}
n%|
td�d�j�jd
�}
t#j$|
d|d|r�|j%nd�}n$t#j&|
|dt'|d d��}|Vq�WdS("Nu
comes_fromusessioniu
(^|\s)#.*$uu#u-ru
--requirementiu=uoptionsu-Zu--always-unzipu-fu--find-linksu-iu--index-urlu--extra-index-urlu--use-wheelu
--no-indexu--allow-externalu--allow-all-externalu--no-allow-externalu--no-allow-insecureu--allow-insecureu--allow-unverifiedu-r %s (line %s)u-eu
--editableudefault_vcsuprereleasesupreT((uNoneu
PipSessionuskip_requirements_regexureucompileuosupathudirnameuabspathuget_file_contentu	enumerateu
splitlinesustripusubu
startswithusearchulenu
_scheme_reuurlparseuurljoinujoinuparse_requirementsulstripuexistsu
find_linksuappendu
index_urlsuTrueu	use_wheeluallow_externalusetunormalize_nameuloweruallow_all_externaluallow_unverifieduInstallRequirementu
from_editableudefault_vcsu	from_lineugetattr(ufilenameufinderu
comes_fromuoptionsusessionu
skip_matchu
skip_regexu
reqs_file_dirucontentuline_numberulineureq_urluitemurelative_to_reqs_fileureq((u /tmp/pip-zej_zi-build/pip/req.pyuparse_requirementss�	
%$(%	%%%'%'%'%'$uparse_requirementscCs.tjd|�}|r*|jd�}n|S(u2
        Strip req postfix ( -dev, 0.2, etc )
    u^(.*?)(?:-dev|-\d.*)$i(ureusearchugroup(urequmatch((u /tmp/pip-zej_zi-build/pip/req.pyu_strip_postfixgsu_strip_postfixcCspdd�|jdd�djd�D�}d}|ddkrO|d}n|dd
krl|d}n|S(NcSsg|]}|r|�qS(((u.0up((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>ts	u'_build_req_from_url.<locals>.<listcomp>u#iiu/iutagsubranchesutagubranchiutrunki����(utagsubranchesutagubranchi����i����i����(usplituNone(uurlupartsureq((u /tmp/pip-zej_zi-build/pip/req.pyu_build_req_from_urlrs,

u_build_req_from_urlcCs{tjd�}|j|�}|rwt�}xC|D];}|\}}||kretd|��n|||<q4W|SdS(uz
        This method generates a dictionary of the query string
        parameters contained in a given editable URL.
    u([\?#&](?P<name>[^&=]+)=(?P<value>[^&=]+)u%s option already definedN(ureucompileufindalludictu	ExceptionuNone(urequregexpumatcheduretuoptionunameuvalue((u /tmp/pip-zej_zi-build/pip/req.pyu_build_editable_options}s	
u_build_editable_optionsc
Csm|}d}tjd|�}|rE|jd�}|jd�}n|}tjj|�r�tjjtjj|d��s�t	d|��nt
|�}n|j�jd�r�|r�d|t
jjd|�jfSd|dfSnx;tD]3}|j�jd|�r�d	||f}Pq�q�Wd
|kr_|rL|d
|}q_t	d|��n|jd
d�dj�}tj|�s�d
|djdd�tjD��d}t	|��nyt|�}	Wn8tk
rtj�d}
t	d||
f��YnX|	s"d|	krJt|�}|sTt	d|��qTn
|	d}t|�}|||	fS(uSParses svn+http://blahblah@rev#egg=Foobar into a requirement
    (Foobar) and a URLu^(.+)(\[[^\]]+\])$iiusetup.pyu;Directory %r is not installable. File 'setup.py' not found.ufile:u__placeholder__u%s:u%s+%su+ub%s should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+iuFor --editable=%s only u, cSsg|]}|jd�qS(u+URL(uname(u.0ubackend((u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>�s	u"parse_editable.<locals>.<listcomp>u is currently supportedu*--editable=%s error in editable options:%sueggu@--editable=%s is not the right format; it must have #egg=PackageN(uNoneureumatchugroupuosupathuisdiruexistsujoinuInstallationErrorupath_to_urluloweru
startswithu
pkg_resourcesuRequirementuparseuextrasuvcsusplituget_backendubackendsu_build_editable_optionsu	Exceptionusysuexc_infou_build_req_from_urlu_strip_postfix(
ueditable_requdefault_vcsuurluextrasumu
url_no_extrasuversion_controluvc_typeu
error_messageuoptionsumessageurequpackage((u /tmp/pip-zej_zi-build/pip/req.pyuparse_editable�sT! 
$

uparse_editablecBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
ddd�Zdd�Z
dd�ZdS(uUninstallPathSetuMA set of file paths to be removed in the uninstallation of a
    requirement.cCs@t�|_t�|_i|_||_d|_g|_dS(N(usetupathsu_refuseupthudistuNoneusave_diru_moved_paths(uselfudist((u /tmp/pip-zej_zi-build/pip/req.pyu__init__�s			uUninstallPathSet.__init__cCs
t|�S(us
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        (uis_local(uselfupath((u /tmp/pip-zej_zi-build/pip/req.pyu
_permitted�suUninstallPathSet._permittedcCsFt|j�sBtjd|jjt|jj�tjf�dSdS(Nu1Not uninstalling %s at %s, outside environment %sFT(u
dist_is_localudistuloggerunotifyuproject_nameunormalize_pathulocationusysuprefixuFalseuTrue(uself((u /tmp/pip-zej_zi-build/pip/req.pyu_can_uninstall�s
	&uUninstallPathSet._can_uninstallcCs�t|�}tjj|�s"dS|j|�rD|jj|�n|jj|�tjj|�ddkr�t	r�|jt
j|��ndS(Niu.py(unormalize_pathuosupathuexistsu
_permittedupathsuaddu_refuseusplitextuuses_pycacheuimpucache_from_source(uselfupath((u /tmp/pip-zej_zi-build/pip/req.pyuadd�s"uUninstallPathSet.addcCskt|�}|j|�rW||jkr@t|�|j|<n|j|j|�n|jj|�dS(N(unormalize_pathu
_permittedupthuUninstallPthEntriesuaddu_refuse(uselfupth_fileuentry((u /tmp/pip-zej_zi-build/pip/req.pyuadd_pth�suUninstallPathSet.add_pthcsYt�}xIt|dt�D]5�t�fdd�|D��s|j��qqW|S(u�Compact a path set to contain the minimal number of paths
        necessary to contain all paths in the set. If /a/path/ and
        /a/path/to/a/file.txt are both in the set, leave only the
        shorter path.ukeycsJg|]@}�j|�oC�t|jtjj��tjjk�qS((u
startswithulenurstripuosupathusep(u.0u	shortpath(upath(u /tmp/pip-zej_zi-build/pip/req.pyu
<listcomp>
s	u,UninstallPathSet.compact.<locals>.<listcomp>(usetusortedulenuanyuadd(uselfupathsushort_paths((upathu /tmp/pip-zej_zi-build/pip/req.pyucompacts	
uUninstallPathSet.compactcCs5tjj|jtjj|�djtjj��S(Ni(uosupathujoinusave_diru
splitdriveulstripusep(uselfupath((u /tmp/pip-zej_zi-build/pip/req.pyu_stashs	uUninstallPathSet._stashcCs�|j�sdS|js4tjd|jj�dStjd|jj�tjd7_t|j|j��}z6|r�d}n-x|D]}tj|�q�Wt	dd�}|j
r�tjd�x*|j|j
�D]}tj|�q�Wn|dkr�tjd	d
dd�|_
xK|D]C}|j|�}tjd
|�|jj|�t||�q"Wx!|jj�D]}|j�qyWtjd|jj�nWdtjd8_XdS(u[Remove paths in ``self.paths`` with confirmation (unless
        ``auto_confirm`` is True).Nu7Can't uninstall '%s'. No files were found to uninstall.uUninstalling %s:iuyuProceed (y/n)? unu.Not removing or modifying (outside of prefix):usuffixu
-uninstalluprefixupip-uRemoving file or directory %suSuccessfully uninstalled %s(uyun(u_can_uninstallupathsuloggerunotifyudistuproject_nameuindentusorteducompactuasku_refuseutempfileumkdtempusave_diru_stashuinfou_moved_pathsuappendurenamesupthuvaluesuremove(uselfuauto_confirmupathsuresponseupathunew_pathupth((u /tmp/pip-zej_zi-build/pip/req.pyuremoves<		
	

uUninstallPathSet.removecCs�|jdkr*tjd|jj�dStjd|jj�x>|jD]3}|j	|�}tj
d|�t||�qKWx|jD]}|j
�q�WdS(u1Rollback the changes previously made by remove().u'Can't roll back %s; was not uninstalleduRolling back uninstall of %suReplacing %sNF(usave_diruNoneuloggeruerrorudistuproject_nameuFalseunotifyu_moved_pathsu_stashuinfourenamesupthurollback(uselfupathutmp_pathupth((u /tmp/pip-zej_zi-build/pip/req.pyurollback9suUninstallPathSet.rollbackcCs5|jdk	r1t|j�d|_g|_ndS(u?Remove temporary save dir: rollback will no longer be possible.N(usave_diruNoneurmtreeu_moved_paths(uself((u /tmp/pip-zej_zi-build/pip/req.pyucommitFs
	uUninstallPathSet.commitNF(u__name__u
__module__u__qualname__u__doc__u__init__u
_permittedu_can_uninstalluadduadd_pthucompactu_stashuFalseuremoveurollbackucommit(u
__locals__((u /tmp/pip-zej_zi-build/pip/req.pyuUninstallPathSet�s	
%
uUninstallPathSetcBsD|EeZdZdd�Zdd�Zdd�Zdd�Zd	S(
uUninstallPthEntriescCsGtjj|�s%td|��n||_t�|_d|_dS(Nu.Cannot remove entries from nonexistent file %s(	uosupathuisfileuUninstallationErrorufileusetuentriesuNoneu_saved_lines(uselfupth_file((u /tmp/pip-zej_zi-build/pip/req.pyu__init__Os
	uUninstallPthEntries.__init__cCsatjj|�}tjdkrMtjj|�drM|jdd�}n|jj|�dS(Nuwin32iu\u/(	uosupathunormcaseusysuplatformu
splitdriveureplaceuentriesuadd(uselfuentry((u /tmp/pip-zej_zi-build/pip/req.pyuaddVs&uUninstallPthEntries.addcCs�tjd|j�t|jd�}|j�}||_|j�tdd�|D��rgd}nd}xR|jD]G}y,tjd|�|j	t
||��Wqwtk
r�YqwXqwWt|jd�}|j|�|j�dS(	NuRemoving pth entries from %s:urbcss!|]}td�|kVqdS(u
N(ub(u.0uline((u /tmp/pip-zej_zi-build/pip/req.pyu	<genexpr>gsu-UninstallPthEntries.remove.<locals>.<genexpr>u
u
uRemoving entry: %suwb(
uloggeruinfoufileuopenu	readlinesu_saved_linesucloseuanyuentriesuremoveubu
ValueErroru
writelines(uselfufhulinesuendlineuentry((u /tmp/pip-zej_zi-build/pip/req.pyuremove`s"	
	
	
uUninstallPthEntries.removecCsk|jdkr'tjd|j�dStjd|j�t|jd�}|j|j�|j	�dS(Nu.Cannot roll back changes to %s, none were madeu!Rolling %s back to previous stateuwbFT(u_saved_linesuNoneuloggeruerrorufileuFalseuinfouopenu
writelinesucloseuTrue(uselfufh((u /tmp/pip-zej_zi-build/pip/req.pyurollbackus
uUninstallPthEntries.rollbackN(u__name__u
__module__u__qualname__u__init__uadduremoveurollback(u
__locals__((u /tmp/pip-zej_zi-build/pip/req.pyuUninstallPthEntriesNs
uUninstallPthEntriescBs>|EeZdZdZdd�Zdd�Zdd�ZdS(	uFakeFileuQWrap a list of lines in an object with readline() to make
    ConfigParser happy.cCsdd�|D�|_dS(Ncss|]}|VqdS(N((u.0ul((u /tmp/pip-zej_zi-build/pip/req.pyu	<genexpr>�su$FakeFile.__init__.<locals>.<genexpr>(u_gen(uselfulines((u /tmp/pip-zej_zi-build/pip/req.pyu__init__�suFakeFile.__init__cCsTy7yt|j�SWntk
r5|jj�SYnXWntk
rOdSYnXdS(Nu(unextu_genu	NameErroru
StopIteration(uself((u /tmp/pip-zej_zi-build/pip/req.pyureadline�s

uFakeFile.readlinecCs|jS(N(u_gen(uself((u /tmp/pip-zej_zi-build/pip/req.pyu__iter__�suFakeFile.__iter__N(u__name__u
__module__u__qualname__u__doc__u__init__ureadlineu__iter__(u
__locals__((u /tmp/pip-zej_zi-build/pip/req.pyuFakeFile�s	uFakeFile(cuemail.parseru
FeedParseruosuimpulocaleureusysushutilutempfileutextwrapuzipfileudistutils.utiluchange_rootu
pip.locationsubin_pyurunning_under_virtualenvuPIP_DELETE_MARKER_FILENAMEuwrite_delete_marker_fileubin_userupip.exceptionsuInstallationErroruUninstallationErroruUnsupportedWheeluBestVersionAlreadyInstalleduInvalidWheelFilenameuDistributionNotFounduPreviousBuildDirErrorupip.vcsuvcsupip.loguloggerupip.utiludisplay_pathurmtreeuaskuask_path_existsu
backup_diruis_installable_diruis_localu
dist_is_localudist_in_usersiteudist_in_site_packagesurenamesunormalize_pathu
egg_link_pathumake_path_relativeucall_subprocessu
is_prereleaseunormalize_nameupip.backwardcompatuurlparseuurllibuuses_pycacheuConfigParserustring_typesu	HTTPErroruget_python_versionubu	pip.indexuLinkubuild_prefixupip.downloadu
PipSessionuget_file_contentuis_urluurl_to_pathupath_to_urluis_archive_fileuunpack_vcs_linku
is_vcs_urluis_file_urluunpack_file_urluunpack_http_urlu	pip.wheelupipumove_wheel_filesuWheelu	wheel_extupip._vendoru
pkg_resourcesusixuread_text_fileuobjectuInstallRequirementuRequirementsuRequirementSetu_make_build_dirucompileuIu
_scheme_reuNoneuparse_requirementsu_strip_postfixu_build_req_from_urlu_build_editable_optionsuparse_editableuUninstallPathSetuUninstallPthEntriesuFakeFile(((u /tmp/pip-zej_zi-build/pip/req.pyu<module>sT(4p:L���W��N	cA|2python3.3/site-packages/pip/__pycache__/locations.cpython-33.pyc000064400000014047151733566740020476 0ustar00�
7�Re:c@sRdZddlZddlZddlZddlZddlmZmZddlZddl	m
Z
mZmZddl
ZdZdZdd�Zd	d
�Zdd�Zd
d�Zdd�Ze�rejjejd�Zejjejd�ZnJe�Zyejjej�d�ZWnek
rMejd�YnXejjejje��Zejje�Ze
�Z ejj!d�Z"ej#dkrqejjejd�Z$er�ejjed�ndZ&ejj'e$�s/ejjejd�Z$er&ejjed�ndZ&nejje"d�Z(ejje(d�Z)ejje(d�Z*n�ejjejd�Z$er�ejjed�ndZ&ejje"d�Z(ejje(d�Z)ejje(d�Z*ej#dd�dkr9ejdd�d kr9d!Z$ejje"d"�Z*nd%ddd#d$�Z,dS(&u7Locations where we look for configs, install stuff, etciN(uinstalluSCHEME_KEYS(uget_python_libuget_path_uidu	user_siteu�This file is placed here by pip to indicate the source was put
here by pip.

Once this package is successfully installed this source code will be
deleted (unless you remove this file).
upip-delete-this-directory.txtcCs?tjj|t�}t|d�}|jt�|j�dS(u?
    Write the pip delete marker file into this directory.
    uwN(uosupathujoinuPIP_DELETE_MARKER_FILENAMEuopenuwriteuDELETE_MARKER_MESSAGEuclose(u	directoryufilepathu	marker_fp((u&/tmp/pip-zej_zi-build/pip/locations.pyuwrite_delete_marker_files
uwrite_delete_marker_filecCs9ttd�rdStjttdtj�kr5dSdS(uM
    Return True if we're running inside a virtualenv, False otherwise.

    ureal_prefixubase_prefixTF(uhasattrusysuTrueuprefixugetattruFalse(((u&/tmp/pip-zej_zi-build/pip/locations.pyurunning_under_virtualenv s
urunning_under_virtualenvcCsYtjjtjjtj��}tjj|d�}t�rUtjj|�rUdSdS(u?
    Return True if in a venv and no system site packages.
    uno-global-site-packages.txtNT(
uosupathudirnameuabspathusiteu__file__ujoinurunning_under_virtualenvuisfileuTrue(usite_mod_diruno_global_file((u&/tmp/pip-zej_zi-build/pip/locations.pyuvirtualenv_no_global-s!uvirtualenv_no_globalcCs;tjdkrtj�Sddl}|jtj��jS(u8 Returns the effective username of the current process. uwin32iN(	usysuplatformugetpassugetuserupwdugetpwuiduosugeteuidupw_name(upwd((u&/tmp/pip-zej_zi-build/pip/locations.pyu__get_username7s
u__get_usernamecCs�tjjtj�dt��}tjdkr5|Sytj|�t	|�Wn�t
k
r�d}yt|�}Wnt
k
r�d}YnX|tj
�kr�d|}t|�tdd�tjj|��nYnX|S(u Returns a safe build_prefix upip_build_%suwin32uSThe temporary folder for building (%s) is either not owned by you, or is a symlink.u0pip will not work until the temporary folder is uAeither deleted or is a real directory owned by your user account.N(uosupathujoinutempfileu
gettempdiru__get_usernameusysuplatformumkdiruwrite_delete_marker_fileuOSErroruNoneuget_path_uidugeteuiduprintupipu
exceptionsuInstallationError(upathufile_uidumsg((u&/tmp/pip-zej_zi-build/pip/locations.pyu_get_build_prefix>s*




u_get_build_prefixubuildusrcu=The folder you are executing pip from can no longer be found.u~uwin32uScriptsubinupipupip.iniupip.logu.pipupip.confiudarwiniu/System/Library/u/usr/local/binuLibrary/Logs/pip.logc	Cs8ddlm}i}|i|d6�}|j�|jddd�}|pT|j|_|pf|j|_|px|j|_|j�x%t	D]}t
|d|�||<q�Wt�r4tj
jtjddd	tjd
d�|�|d<|d
k	r4tj
j|tj
j|d�d
d
��|d<q4n|S(u+
    Return a distutils install scheme
    i(uDistributionunameuinstallucreateuinstall_uincludeusiteupythonNiuheadersiT(udistutils.distuDistributionuparse_config_filesuget_command_objuTrueuuseruhomeurootufinalize_optionsuSCHEME_KEYSugetattrurunning_under_virtualenvuosupathujoinusysuprefixuversionuNoneuabspath(	u	dist_nameuuseruhomeurootuDistributionuschemeuduiukey((u&/tmp/pip-zej_zi-build/pip/locations.pyudistutils_scheme�s,


	
	-udistutils_schemeF(-u__doc__usysusiteuosutempfileudistutils.command.installuinstalluSCHEME_KEYSugetpassupip.backwardcompatuget_python_libuget_path_uidu	user_siteupip.exceptionsupipuDELETE_MARKER_MESSAGEuPIP_DELETE_MARKER_FILENAMEuwrite_delete_marker_fileurunning_under_virtualenvuvirtualenv_no_globalu__get_usernameu_get_build_prefixupathujoinuprefixubuild_prefixu
src_prefixugetcwduOSErroruexituabspathurealpathu
site_packagesu
expanduseruuser_diruplatformubin_pyuNoneubin_useruexistsudefault_storage_dirudefault_config_fileudefault_log_fileuFalseudistutils_scheme(((u&/tmp/pip-zej_zi-build/pip/locations.pyu<module>sZ	


		
	!$!2python3.3/site-packages/pip/__pycache__/cmdoptions.cpython-33.pyc000064400000020512151733566740020654 0ustar00�
7�Rer$c@sJdZddlZddlmZmZmZddlmZdd�ZGdd�de	�Z
e
d	d
ddd
ddd�Ze
ddddd
ddd�de�Z
e
ddddd
ddddd�Ze
ddddd
ddd�Ze
ddddd
ddddd �Ze
d!dd"d#d$dd%�Ze
d&dd'd
ddd�de�Ze
d(d)dd*d#d$dedd+�Ze
d,dd-d
ddd�de�Ze
d.dd/d0d1dd2dd3�Ze
d4d5d#d6dd7d0d8dd9dd:�Ze
d;dd<d0d1dd2de�Ze
d=dd>d0d1dd2de�Ze
d?dd@d0dAdBdCdDdEdFgdgd
dGd#d
ddH�Ze
dIddJd0d1dd2d#d$ddK�Ze
dLdMdNddOd#dPddQddR�Ze
dSddTd#dPd
dGdgddU�Ze
dVddWd
ddd�ddX�Ze
dYdZdd[d
dGdgd#d\dd]�Ze
d^d_dd`d
ddd�de�Ze
daddbd#dPd
dGdgde�Z e
dcdddd
dGdgd#deddf�Z!e
dgddhd
ddd�ddi�Z"e
djddhd
dkdd�de�Z#e
dldmddnd
dGdgd#deddo�Z$e
dpddqd
dkdd�de�Z%e
drddsd
ddd�ddt�Z&e
dudvddwd
dGdgd#dxddy�Z'e
dzdd{d
dde�Z(e
d|dd{d
dkdd�dd}�Z*e
d~ddd#d�dddd��Z,e
d�d�dd�d
ddd�dd��Z-e
d�d�d�d�dd�d#d�dd��Z.e
d�dd�d
dGd#d�dd��Z/e
d�dd�d
dGd#d�dd��Z0e
d�d
ddd�dd��Z1id�d�6ee
eeeeeeeeeeeeegd�6Z2id�d�6eeeeee e!e"e#e$e%e&gd�6Z3dS(�uE
shared options and groups

The principle here is to define options once, but *not* instantiate them globally.
One reason being that options with action='append' can carry state between parses.
pip parse's general options twice internally, and shouldn't pass on state.
To be consistent, all options will follow this design.

iN(uOptionGroupu
SUPPRESS_HELPuOption(udefault_log_filecCs?t||d�}x%|dD]}|j|j��qW|S(u�
    Return an OptionGroup object
    group  -- assumed to be dict with 'name' and 'options' keys
    parser -- an optparse Parser
    unameuoptions(uOptionGroupu
add_optionumake(ugroupuparseruoption_groupuoption((u'/tmp/pip-zej_zi-build/pip/cmdoptions.pyumake_option_groupsumake_option_groupcBs2|EeZdZdZdd�Zdd�ZdS(uOptionMakeru�Class that stores the args/kwargs that would be used to make an Option,
    for making them later, and uses deepcopy's to reset state.cOs||_||_dS(N(uargsukwargs(uselfuargsukwargs((u'/tmp/pip-zej_zi-build/pip/cmdoptions.pyu__init__s	uOptionMaker.__init__cCs1tj|j�}tj|j�}t||�S(N(ucopyudeepcopyuargsukwargsuOption(uselfu	args_copyukwargs_copy((u'/tmp/pip-zej_zi-build/pip/cmdoptions.pyumake suOptionMaker.makeN(u__name__u
__module__u__qualname__u__doc__u__init__umake(u
__locals__((u'/tmp/pip-zej_zi-build/pip/cmdoptions.pyuOptionMakersuOptionMakeru-hu--helpudestuhelpuactionu
Show help.u--require-virtualenvu--require-venvurequire_venvu
store_trueudefaultu-vu	--verboseuverboseucountuDGive more output. Option is additive, and can be used up to 3 times.u-Vu	--versionuversionuShow version and exit.u-qu--quietuquietuGive less output.u--logulogumetavarupathuAPath to a verbose appending log. This log is inactive by default.u--log-explicit-levelsulog_explicit_levelsu
--log-fileu--local-logulog_fileuhPath to a verbose non-appending log, that only logs failures. This log is active by default at %default.u
--no-inputuno_inputu--proxyuproxyutypeustruu<Specify a proxy in the form [user:passwd@]proxy.server:port.u	--timeoutu--default-timeoutusecutimeoutufloatiu2Set the socket timeout (default %default seconds).u
--default-vcsudefault_vcsu--skip-requirements-regexuskip_requirements_regexu--exists-actionu
exists_actionuchoiceuchoicesusuiuwubuappenduPDefault action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.u--certucertuPath to alternate CA bundle.u-iu--index-urlu
--pypi-urlu	index_urluURLuhttps://pypi.python.org/simple/u4Base URL of Python Package Index (default %default).u--extra-index-urluextra_index_urlsu@Extra URLs of package indexes to use in addition to --index-url.u
--no-indexuno_indexuAIgnore package index (only looking at --find-links URLs instead).u-fu--find-linksu
find_linksuurlu�If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.u-Mu
--use-mirrorsuuse_mirrorsu	--mirrorsumirrorsu--allow-externaluallow_externaluPACKAGEu1Allow the installation of externally hosted filesu--allow-all-externaluallow_all_externalu5Allow the installation of all externally hosted filesu--no-allow-externalustore_falseu--allow-unverifiedu--allow-insecureuallow_unverifiedu9Allow the installation of insecure and unverifiable filesu--no-allow-insecureuallow_all_insecureu--process-dependency-linksuprocess_dependency_linksu*Enable the processing of dependency links.u-ru
--requirementurequirementsufileuQInstall from the given requirements file. This option can be used multiple times.u--use-wheelu	use_wheelu--no-use-wheeluVDo not Find and prefer wheel archives when searching indexes and find-links locations.u--download-cacheudownload_cacheudiru#Cache downloaded packages in <dir>.u	--no-depsu--no-dependenciesuignore_dependenciesu#Don't install package dependencies.u-bu--buildu--build-diru--build-directoryu	build_diru/Directory to unpack packages into and build in.u--install-optionuinstall_optionsuoptionsu"Extra arguments to be supplied to the setup.py install command (use like --install-option="--install-scripts=/usr/local/bin"). Use multiple --install-option options to pass multiple options to setup.py install. If you are using an option with a directory path, be sure to use absolute path.u--global-optionuglobal_optionsuTExtra global options to be supplied to the setup.py call before the install command.u
--no-cleanu!Don't clean up build directories.uGeneral OptionsunameuPackage Index OptionsFT(4u__doc__ucopyuoptparseuOptionGroupu
SUPPRESS_HELPuOptionu
pip.locationsudefault_log_fileumake_option_groupuobjectuOptionMakeruhelp_uFalseurequire_virtualenvuverboseuversionuquietulogulog_explicit_levelsulog_fileuno_inputuproxyutimeoutudefault_vcsuskip_requirements_regexu
exists_actionucertu	index_urluextra_index_urluno_indexu
find_linksuuse_mirrorsumirrorsuallow_externaluallow_all_externaluno_allow_externaluallow_unsafeuno_allow_unsafeuprocess_dependency_linksurequirementsu	use_wheeluTrueuno_use_wheeluNoneudownload_cacheuno_depsu	build_diruinstall_optionsuglobal_optionsuno_cleanu
general_groupuindex_group(((u'/tmp/pip-zej_zi-build/pip/cmdoptions.pyu<module>	s																																																
python3.3/site-packages/pip/__pycache__/exceptions.cpython-33.pyc000064400000010164151733566740020660 0ustar00�
7�Re>c@s�dZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZdS(u"Exceptions used throughout packagecBs|EeZdZdZdS(uPipErroruBase pip exceptionN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuPipErrorsuPipErrorcBs|EeZdZdZdS(uInstallationErroru%General exception during installationN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuInstallationErrorsuInstallationErrorcBs|EeZdZdZdS(uUninstallationErroru'General exception during uninstallationN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuUninstallationErrorsuUninstallationErrorcBs|EeZdZdZdS(uDistributionNotFounduCRaised when a distribution cannot be found to satisfy a requirementN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuDistributionNotFoundsuDistributionNotFoundcBs|EeZdZdZdS(uBestVersionAlreadyInstalleduPRaised when the most up-to-date version of a package is already
    installed.  N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuBestVersionAlreadyInstalledsuBestVersionAlreadyInstalledcBs|EeZdZdZdS(u
BadCommandu0Raised when virtualenv or a command is not foundN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyu
BadCommandsu
BadCommandcBs|EeZdZdZdS(uCommandErroru7Raised when there is an error in command-line argumentsN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuCommandErrorsuCommandErrorcBs|EeZdZdZdS(uPreviousBuildDirErroru:Raised when there's a previous conflicting build directoryN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuPreviousBuildDirError!suPreviousBuildDirErrorcBs|EeZdZdZdS(uHashMismatchu*Distribution file hash values don't match.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuHashMismatch%suHashMismatchcBs|EeZdZdZdS(uInvalidWheelFilenameuInvalid wheel filename.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuInvalidWheelFilename)suInvalidWheelFilenamecBs|EeZdZdZdS(uUnsupportedWheeluUnsupported wheel.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u'/tmp/pip-zej_zi-build/pip/exceptions.pyuUnsupportedWheel-suUnsupportedWheelN(
u__doc__u	ExceptionuPipErroruInstallationErroruUninstallationErroruDistributionNotFounduBestVersionAlreadyInstalledu
BadCommanduCommandErroruPreviousBuildDirErroruHashMismatchuInvalidWheelFilenameuUnsupportedWheel(((u'/tmp/pip-zej_zi-build/pip/exceptions.pyu<module>spython3.3/site-packages/pip/__pycache__/status_codes.cpython-33.pyc000064400000000507151733566740021177 0ustar00�
7�Retc@s(dZdZdZdZdZdZdS(iiiiiiN(uSUCCESSuERRORu
UNKNOWN_ERRORuVIRTUALENV_NOT_FOUNDuPREVIOUS_BUILD_DIR_ERRORuNO_MATCHES_FOUND(((u)/tmp/pip-zej_zi-build/pip/status_codes.pyu<module>s
python3.3/site-packages/pip/__pycache__/runner.cpython-33.pyc000064400000001136151733566750020010 0ustar00�
7�Re�c@sVddlZddlZdd�ZedkrRe�ZerReje�qRndS(iNcCsStjjtjjtjjt���}tjjd|�ddl}|j�S(Ni(	uosupathudirnameuabspathu__file__usysuinsertupipumain(ubaseupip((u#/tmp/pip-zej_zi-build/pip/runner.pyuruns*urunu__main__(usysuosurunu__name__uexit(((u#/tmp/pip-zej_zi-build/pip/runner.pyu<module>s
	python3.3/site-packages/pip/__pycache__/util.cpython-33.pyc000064400000075364151733566750017472 0ustar00�
7�Re$bc@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZm
Z
mZddlmZmZmZmZmZmZddlmZmZmZddlmZddlmZddlmZdd	d
ddd
ddddddddddddddddddd gZ d!d�Z!d]d"d�Z#d#d$�Z$d%d	�Z%d&d'd
�Z&ddd(d�Z(dd)d*�Z)d+d,�Z*d-d�Z+Gd.d/�d/e,�Z-e-�Z.[-ej/d0ej0�Z1d1d�Z2d2d�Z3d3d�Z4d4d�Z5d5d�Z6d6d�Z7d7d�Z8d8d�Z9d9d�Z:d:d�Z;d;d�Z<d<d=�Z=d>d?�Z>d@dA�Z?dBdC�Z@dDdE�ZAd^d_d^d]dJdK�ZCdLdM�ZDdNdO�ZEdPd�ZFdQdR�ZGd^dSd�ZHdTd�ZIdUd�ZJdVd�ZKdWd�ZLd^ddd^ejMdddXd �ZNdYdZ�ZOGd[d\�d\e,�ZPdS(`iN(uInstallationErroru
BadCommanduPipError(uWindowsErrorustring_typesu	raw_inputuconsole_to_stru	user_siteuPermissionError(u
site_packagesurunning_under_virtualenvuvirtualenv_no_global(ulogger(u
pkg_resources(uversionurmtreeudisplay_pathu
backup_dirufind_commanduaskuInfunormalize_nameusplitextuformat_sizeuis_installable_diruis_svn_pageu
file_contentsusplit_leading_diruhas_leading_dirumake_path_relativeunormalize_pathurenamesuget_terminal_sizeuget_progu
unzip_fileu
untar_fileucreate_download_cache_folderucache_downloaduunpack_fileucall_subprocessc
CsPy.tjjtjd�dkr-dtjSWntttfk
rKYnXdS(Niu__main__.pyu-cu	%s -m pipupip(u__main__.pyu-c(	uosupathubasenameusysuargvu
executableuAttributeErroru	TypeErroru
IndexError(((u!/tmp/pip-zej_zi-build/pip/util.pyuget_prog!scCstj|d|dt�dS(Nu
ignore_errorsuonerror(ushutilurmtreeurmtree_errorhandler(udiru
ignore_errors((u!/tmp/pip-zej_zi-build/pip/util.pyurmtree*scCs�|dd�\}}|tkr5|jddkpp|tkrT|jddkpp|tkop|jddksy�ntj|�jtj@tjkr��ntj|tj	�||�dS(u�On Windows, the files in .svn are read-only, so when rmtree() tries to
    remove them, an exception is thrown.  We catch that here, remove the
    read-only attribute, and hopefully continue without problems.Niiii
i(
uWindowsErroruargsuOSErroruPermissionErroruosustatust_modeuS_IREADuchmoduS_IWRITE(ufuncupathuexc_infouexctypeuvalue((u!/tmp/pip-zej_zi-build/pip/util.pyurmtree_errorhandler/s"urmtree_errorhandlercCsdtjjtjj|��}|jtj�tjj�r`d|ttj��d�}n|S(uTGives the display value for a given path, making it relative to cwd
    if possible.u.N(uosupathunormcaseuabspathu
startswithugetcwdusepulen(upath((u!/tmp/pip-zej_zi-build/pip/util.pyudisplay_pathBs#u.bakcCsKd}|}x4tjj||�rB|d7}|t|�}qW||S(u\Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)i(uosupathuexistsustr(udiruextunu	extension((u!/tmp/pip-zej_zi-build/pip/util.pyu
backup_dirKs
cCs7|dkr0tjjdd�jtj�}nt|t�rK|g}n|dkrct�}ndd�|j	�jtj�D�}tj
j|�dj	�|kr�dg}nxj|D]b}tj
j||�}x.|D]&}||}tj
j
|�r�|Sq�Wtj
j
|�r�|Sq�Wtd|��dS(u<Searches the PATH for the given command and returns its pathuPATHucSs"g|]}t|�r|�qS((ulen(u.0uext((u!/tmp/pip-zej_zi-build/pip/util.pyu
<listcomp>_s	u find_command.<locals>.<listcomp>iuCannot find command %rN(uNoneuosuenvironugetusplitupathsepu
isinstanceustring_typesuget_pathextulowerupathusplitextujoinuisfileu
BadCommand(ucmdupathsupathextupathucmd_pathuextucmd_path_ext((u!/tmp/pip-zej_zi-build/pip/util.pyufind_commandVs$$%"


cCsF|dkr-tjjddddg�}ntjjd|�}|S(u9Returns the path extensions from environment or a defaultu.COMu.EXEu.BATu.CMDuPATHEXTN(uNoneuosupathsepujoinuenvironuget(udefault_pathextupathext((u!/tmp/pip-zej_zi-build/pip/util.pyuget_pathextqs!uget_pathextcCsCx3tjjdd�j�D]}||kr|SqWt||�S(NuPIP_EXISTS_ACTIONu(uosuenvironugetusplituask(umessageuoptionsuaction((u!/tmp/pip-zej_zi-build/pip/util.pyuask_path_existsys"uask_path_existscCs}xvtjjd�r(td|��nt|�}|j�j�}||krrtd|dj|�f�q|SqdS(u@Ask the message interactively, with the given possible responsesuPIP_NO_INPUTu7No input was expected ($PIP_NO_INPUT set); question: %su<Your response (%r) was not one of the expected responses: %su, N(	uosuenvironugetu	Exceptionu	raw_inputustripuloweruprintujoin(umessageuoptionsuresponse((u!/tmp/pip-zej_zi-build/pip/util.pyuask�scBsn|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS(u_InfuI am bigger than everything!cCs||krdSdSdS(NTF(uTrueuFalse(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__eq__�su_Inf.__eq__cCs|j|�S(N(u__eq__(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__ne__�su_Inf.__ne__cCsdS(NF(uFalse(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__lt__�su_Inf.__lt__cCsdS(NF(uFalse(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__le__�su_Inf.__le__cCsdS(NT(uTrue(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__gt__�su_Inf.__gt__cCsdS(NT(uTrue(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__ge__�su_Inf.__ge__cCsdS(NuInf((uself((u!/tmp/pip-zej_zi-build/pip/util.pyu__repr__�su
_Inf.__repr__N(u__name__u
__module__u__qualname__u__doc__u__eq__u__ne__u__lt__u__le__u__gt__u__ge__u__repr__(u
__locals__((u!/tmp/pip-zej_zi-build/pip/util.pyu_Inf�su_Infu[^a-z]cCstjd|j��S(Nu-(u
_normalize_reusubulower(uname((u!/tmp/pip-zej_zi-build/pip/util.pyunormalize_name�scCsX|dkrd|ddS|d	kr4d|dS|dkrLd|dSd|SdS(
Ni�u%.1fMBg@�@i
u%ikBu%.1fkBu%ibytesi@Bi'((ubytes((u!/tmp/pip-zej_zi-build/pip/util.pyuformat_size�scCsEtjj|�sdStjj|d�}tjj|�rAdSdS(u@Return True if `path` is a directory containing a setup.py file.usetup.pyFT(uosupathuisdiruFalseujoinuisfileuTrue(upathusetup_py((u!/tmp/pip-zej_zi-build/pip/util.pyuis_installable_dir�scCs(tjd|�o'tjd|tj�S(uJReturns true if the page appears to be the index page of an svn repositoryu<title>[^<]*Revision \d+:u#Powered by (?:<a[^>]*?>)?Subversion(ureusearchuI(uhtml((u!/tmp/pip-zej_zi-build/pip/util.pyuis_svn_page�sc
Cs8t|d�}z|j�jd�SWd|j�XdS(Nurbuutf-8(uopenureadudecodeuclose(ufilenameufp((u!/tmp/pip-zej_zi-build/pip/util.pyu
file_contents�scCs�t|�}|jd�jd�}d|krvd|krZ|jd�|jd�ksfd|krv|jdd�Sd|kr�|jdd�S|dfSdS(Nu/u\iu(ustrulstripufindusplit(upath((u!/tmp/pip-zej_zi-build/pip/util.pyusplit_leading_dir�s6cCs\d}xO|D]G}t|�\}}|s/dS|dkrD|}q
||kr
dSq
WdS(uyReturns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)NFT(uNoneusplit_leading_diruFalseuTrue(upathsu
common_prefixupathuprefixurest((u!/tmp/pip-zej_zi-build/pip/util.pyuhas_leading_dir�s
	cCs7tjj|�}tjj|�}tjjtjj|��}tjjtjj|��}|jtjj�jtjj�}|jtjj�jtjj�}x>|r�|r�|d|dkr�|j	d�|j	d�q�Wdgt
|�||g}|dgkr$dtjjStjjj|�S(u
    Make a filename relative, where the filename path, and it is
    relative to rel_to

        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/usr/share/another-place/src/Directory')
        '../../../something/a-file.pth'
        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/home/user/src/Directory')
        '../../../usr/share/something/a-file.pth'
        >>> make_relative_path('/usr/share/a-file.pth', '/usr/share/')
        'a-file.pth'
    iu..uu.(uosupathubasenameudirnameunormpathuabspathustripusepusplitupopulenujoin(upathurel_tou
path_filenameu
path_partsurel_to_partsu
full_parts((u!/tmp/pip-zej_zi-build/pip/util.pyumake_path_relative�s$$#
cCs(tjjtjjtjj|���S(uN
    Convert a path to its canonical, case-normalized, absolute version.

    (uosupathunormcaseurealpathu
expanduser(upath((u!/tmp/pip-zej_zi-build/pip/util.pyunormalize_pathscCs[tj|�\}}|j�jd�rQ|dd�|}|dd�}n||fS(u,Like os.path.splitext, but take off .tar toou.tariNi����i����(u	posixpathusplitextuloweruendswith(upathubaseuext((u!/tmp/pip-zej_zi-build/pip/util.pyusplitexts
cCs�tjj|�\}}|rG|rGtjj|�rGtj|�ntj||�tjj|�\}}|r�|r�ytj|�Wq�tk
r�Yq�XndS(u7Like os.renames(), but handles renaming across devices.N(	uosupathusplituexistsumakedirsushutilumoveu
removedirsuOSError(uoldunewuheadutail((u!/tmp/pip-zej_zi-build/pip/util.pyurenames!s
cCs)t�s
dSt|�jttj��S(u�
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    T(urunning_under_virtualenvuTrueunormalize_pathu
startswithusysuprefix(upath((u!/tmp/pip-zej_zi-build/pip/util.pyuis_local2s	uis_localcCstt|��S(u�
    Return True if given Distribution object is installed locally
    (i.e. within current virtualenv).

    Always True if we're not in a virtualenv.

    (uis_localu
dist_location(udist((u!/tmp/pip-zej_zi-build/pip/util.pyu
dist_is_local>su
dist_is_localcCs-tr%tt|��jtt��SdSdS(uF
    Return True if given Distribution is installed in user site.
    NF(u	user_siteunormalize_pathu
dist_locationu
startswithuFalse(udist((u!/tmp/pip-zej_zi-build/pip/util.pyudist_in_usersiteIsudist_in_usersitecCstt|��jtt��S(ua
    Return True if given Distribution is installed in distutils.sysconfig.get_python_lib().
    (unormalize_pathu
dist_locationu
startswithu
site_packages(udist((u!/tmp/pip-zej_zi-build/pip/util.pyudist_in_site_packagesRsudist_in_site_packagescCs)ddlm}|j|g�}|jS(u$Is distribution an editable install?i(uFrozenRequirement(upipuFrozenRequirementu	from_distueditable(udistuFrozenRequirementureq((u!/tmp/pip-zej_zi-build/pip/util.pyudist_is_editableYsudist_is_editableu
setuptoolsupipupythonu
distributecs�|rt�ndd��|r0dd��ndd��|rQdd��ndd������fdd�tjD�S(	u�
    Return a list of installed Distribution objects.

    If ``local_only`` is True (default), only return installations
    local to the current virtualenv, if in a virtualenv.

    ``skip`` argument is an iterable of lower-case project names to
    ignore; defaults to ('setuptools', 'pip', 'python'). [FIXME also
    skip virtualenv?]

    If ``editables`` is False, don't report editables.

    If ``editables_only`` is True , only report editables.

    cSsdS(NT(uTrue(ud((u!/tmp/pip-zej_zi-build/pip/util.pyu<lambda>vsu-get_installed_distributions.<locals>.<lambda>cSsdS(NT(uTrue(ud((u!/tmp/pip-zej_zi-build/pip/util.pyu<lambda>yscSst|�S(N(udist_is_editable(ud((u!/tmp/pip-zej_zi-build/pip/util.pyu<lambda>{scSs
t|�S(N(udist_is_editable(ud((u!/tmp/pip-zej_zi-build/pip/util.pyu<lambda>~scSsdS(NT(uTrue(ud((u!/tmp/pip-zej_zi-build/pip/util.pyu<lambda>�scsIg|]?}�|�r|j�kr�|�r�|�r|�qS((ukey(u.0ud(u
editable_testueditables_only_testu
local_testuskip(u!/tmp/pip-zej_zi-build/pip/util.pyu
<listcomp>�s
	u/get_installed_distributions.<locals>.<listcomp>(u
dist_is_localu
pkg_resourcesuworking_set(u
local_onlyuskipuinclude_editablesueditables_only((u
editable_testueditables_only_testu
local_testuskipu!/tmp/pip-zej_zi-build/pip/util.pyuget_installed_distributions`s	uget_installed_distributionscCs�g}t�rNt�r(|jt�qq|jt�trq|jt�qqn#trd|jt�n|jt�x@|D]8}tjj||j�d}tjj	|�rx|SqxWdS(u
    Return the path for the .egg-link file if it exists, otherwise, None.

    There's 3 scenarios:
    1) not in a virtualenv
       try to find in site.USER_SITE, then site_packages
    2) in a no-global virtualenv
       try to find in site_packages
    3) in a yes-global virtualenv
       try to find in site_packages, then site.USER_SITE  (don't look in global location)

    For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations.
    This method will just return the first one found.
    u	.egg-linkN(
urunning_under_virtualenvuvirtualenv_no_globaluappendu
site_packagesu	user_siteuosupathujoinuproject_nameuisfile(udistusitesusiteuegglink((u!/tmp/pip-zej_zi-build/pip/util.pyu
egg_link_path�s		


u
egg_link_pathcCst|�}|r|S|jS(u�
    Get the site-packages location of this distribution. Generally
    this is dist.location, except in the case of develop-installed
    packages, where dist.location is the source code location, and we
    want to know where the egg-link file is.

    (u
egg_link_pathulocation(udistuegg_link((u!/tmp/pip-zej_zi-build/pip/util.pyu
dist_location�su
dist_locationcCs�dd�}|d�p-|d�p-|d�}|s|y8tjtj�tj�}||�}tj|�Wq|Yq|Xn|s�tjjdd�tjjdd	�f}nt|d�t|d�fS(
ulReturns a tuple (x, y) representing the width(x) and the height(x)
    in characters of the terminal window.cSsyLddl}ddl}ddl}|jd|j||jd��}WndSYnX|dkrkdS|dkr{dS|S(Niuhhu1234(ii(ii(ufcntlutermiosustructuunpackuioctlu
TIOCGWINSZuNone(ufdufcntlutermiosustructucr((u!/tmp/pip-zej_zi-build/pip/util.pyuioctl_GWINSZ�s	u'get_terminal_size.<locals>.ioctl_GWINSZiiiuLINESiuCOLUMNSiP(uosuopenuctermiduO_RDONLYucloseuenvironugetuint(uioctl_GWINSZucrufd((u!/tmp/pip-zej_zi-build/pip/util.pyuget_terminal_size�s$-cCs tjd�}tj|�|S(uBGet the current umask which involves having to set it temporarily.i(uosuumask(umask((u!/tmp/pip-zej_zi-build/pip/util.pyu
current_umask�s
u
current_umaskc
Cs�tjj|�s"tj|�nt|d�}z}tj|�}t|j��oX|}xO|j	�D]A}|j
}|j|�}|}	|r�t|�d}	ntjj
||	�}	tjj|	�}
tjj|
�s�tj|
�n|	jd�s|	jd�r1tjj|	�s�tj|	�q�qht|	d�}z|j|�Wd|j�|jd?}|r�tj|�r�|d@r�tj|	d	t�dB�nXqhWWd|j�XdS(
u�
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    urbiu/u\uwbNiiIi�(uosupathuexistsumakedirsuopenuzipfileuZipFileuhas_leading_dirunamelistuinfolistufilenameureadusplit_leading_dirujoinudirnameuendswithuwriteucloseu
external_attrustatuS_ISREGuchmodu
current_umask(
ufilenameulocationuflattenuzipfpuzipuleadinguinfounameudataufnudirufpumode((u!/tmp/pip-zej_zi-build/pip/util.pyu
unzip_file�s6		

'cCs�tjj|�s"tj|�n|j�jd�sL|j�jd�rUd}nh|j�jd�s|j�jd�r�d}n5|j�jd�r�d}ntjd	|�d
}tj	||�}zt
dd�|j�D��}x�|j�D]�}|j}|d
krq�n|r8t
|�d}ntjj||�}|j�r~tjj|�s�tj|�q�q�|j�r�y|j||�Wq�tj�d}tjd||j|f�w�Yq�Xq�y|j|�}	WnHttfk
r9tj�d}tjd||j|f�w�YnXtjjtjj|��sttjtjj|��nt	|d�}
ztj|	|
�Wd|
j�X|	j�|jd@r�tj|dt�dB�q�q�WWd|j�XdS(u�
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    u.gzu.tgzur:gzu.bz2u.tbzur:bz2u.taruru-Cannot determine compression type for file %sur:*cSs(g|]}|jdkr|j�qS(upax_global_header(uname(u.0umember((u!/tmp/pip-zej_zi-build/pip/util.pyu
<listcomp>$s	uuntar_file.<locals>.<listcomp>upax_global_headeriu/In the tar file %s the member %s is invalid: %suwbNiIi�(uosupathuexistsumakedirsuloweruendswithuloggeruwarnutarfileuopenuhas_leading_diru
getmembersunameusplit_leading_dirujoinuisdiruissymu_extract_memberusysuexc_infouextractfileuKeyErroruAttributeErrorudirnameushutilucopyfileobjucloseumodeuchmodu
current_umask(ufilenameulocationumodeutaruleadingumemberufnupathueufpudestfp((u!/tmp/pip-zej_zi-build/pip/util.pyu
untar_filesf	*	*			

&cCs@tjd8_tjd|�tjd7_tj|�dS(Niu&Creating supposed download cache at %s(uloggeruindentunotifyuosumakedirs(ufolder((u!/tmp/pip-zej_zi-build/pip/util.pyucreate_download_cache_folderXscCsUtjdt|��tj||�t|dd�}|j|�|j�dS(NuStoring download in cache at %su
.content-typeuw(uloggerunotifyudisplay_pathushutilucopyfileuopenuwriteuclose(utarget_fileu
temp_locationucontent_typeufp((u!/tmp/pip-zej_zi-build/pip/util.pyucache_download_s

c
CsCtjj|�}|dksZ|jd�sZ|jd�sZ|jd�sZtj|�rzt||d|jd��n�|dks�tj|�s�t	|�dj
�dkr�t||�n~|r|jd
�rt
t|��rddlm}|d|j�j|�n*tjd|||f�td|��dS(Nuapplication/zipu.zipu	.pybundleu.whluflattenuapplication/x-gzipiu.taru.tar.gzu.tar.bz2u.tgzu.tbzu	text/htmli(u
Subversionusvn+uZCannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formatu%Cannot determine archive format of %s(u	.pybundleu.whl(u.taru.tar.gzu.tar.bz2u.tgzu.tbz(uosupathurealpathuendswithuzipfileu
is_zipfileu
unzip_fileutarfileu
is_tarfileusplitextuloweru
untar_fileu
startswithuis_svn_pageu
file_contentsupip.vcs.subversionu
SubversionuurluunpackuloggerufataluInstallationError(ufilenameulocationucontent_typeulinku
Subversion((u!/tmp/pip-zej_zi-build/pip/util.pyuunpack_filegs$ 	cCs�|dkr�g}xd|D]\}	d|	ksOd|	ksOd|	ksOd|	krhd|	jdd�}	n|j|	�qWdj|�}n|r�d}
n	tj}
tj|d|�tj	j
�}|r�|j|�ny4tj|dtj
d	dd
|
d|d|�}Wn<tk
rNtj�d
}
tjd|
|f��YnXg}|
dk	r|j}
x�t|
j��}|s�Pn|j�}|j|d�|r||�}t|t�r�|\}}ntj||�tj|�stj�qqmtj|�qmn!|j�\}}|p3dg}|j�|jr�|r�|r�tjd|�tjdj|�d�ntd||j|f��q�tj d||j|f�n|
dk	r�dj|�SdS(Nu u
u"u'u"%s"u\"uRunning command %sustderrustdinustdoutucwduenviu#Error %s while executing command %suu Complete output from command %s:u)
----------------------------------------u*Command %s failed with error code %s in %su"Command %s had error code %s in %s(!uNoneureplaceuappendujoinu
subprocessuPIPEuloggeruloguosuenvironucopyuupdateuPopenuSTDOUTu	Exceptionusysuexc_infoufatalustdoutuconsole_to_strureadlineurstripu
isinstanceutupleustdout_level_matchesu
show_progressuinfoucommunicateuwaitu
returncodeunotifyuInstallationErroruwarn(ucmdushow_stdoutu
filter_stdoutucwduraise_on_returncodeu
command_levelucommand_descu
extra_environu	cmd_partsupartustdoutuenvuprocueu
all_outputulineulevelureturned_stdoutureturned_stderr((u!/tmp/pip-zej_zi-build/pip/util.pyucall_subprocess�sp
0		
	
	cCsEtj|�}|dkrdStj|�}tdd�|D��S(u�
    Attempt to determine if this is a pre-release using PEP386/PEP426 rules.

    Will return True if it is a pre-release and False if not. Versions are
    assumed to be a pre-release if they cannot be parsed.
    cSs)g|]}tdd�|D���qS(c	Ss1g|]'}|tdddddg�k�qS(uaubucurcudev(uset(u.0uy((u!/tmp/pip-zej_zi-build/pip/util.pyu
<listcomp>�s	u,is_prerelease.<locals>.<listcomp>.<listcomp>(uany(u.0ux((u!/tmp/pip-zej_zi-build/pip/util.pyu
<listcomp>�s	u!is_prerelease.<locals>.<listcomp>NT(uversionu_suggest_normalized_versionuNoneuTrueu_normalized_keyuany(uversu
normalizeduparsed((u!/tmp/pip-zej_zi-build/pip/util.pyu
is_prerelease�s
u
is_prereleasecBsV|EeZdZdddd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uBuildDirectorycCsm|dkr!|dkr!d}n|dkrWtjdd�}|dkrWd}qWn||_||_dS(Nuprefixu
pip-build-T(uNoneuTrueutempfileumkdtempunameudelete(uselfunameudelete((u!/tmp/pip-zej_zi-build/pip/util.pyu__init__�s		uBuildDirectory.__init__cCsdj|jj|j�S(Nu	<{} {!r}>(uformatu	__class__u__name__uname(uself((u!/tmp/pip-zej_zi-build/pip/util.pyu__repr__�suBuildDirectory.__repr__cCs|jS(N(uname(uself((u!/tmp/pip-zej_zi-build/pip/util.pyu	__enter__�suBuildDirectory.__enter__cCs|j�dS(N(ucleanup(uselfuexcuvalueutb((u!/tmp/pip-zej_zi-build/pip/util.pyu__exit__�suBuildDirectory.__exit__cCs|jrt|j�ndS(N(udeleteurmtreeuname(uself((u!/tmp/pip-zej_zi-build/pip/util.pyucleanup�s	uBuildDirectory.cleanupN(	u__name__u
__module__u__qualname__uNoneu__init__u__repr__u	__enter__u__exit__ucleanup(u
__locals__((u!/tmp/pip-zej_zi-build/pip/util.pyuBuildDirectory�s
uBuildDirectoryFT(u
setuptoolsupipupythonu
distribute(Qusysushutiluosustatureu	posixpathuzipfileutarfileu
subprocessutextwraputempfileupip.exceptionsuInstallationErroru
BadCommanduPipErrorupip.backwardcompatuWindowsErrorustring_typesu	raw_inputuconsole_to_stru	user_siteuPermissionErroru
pip.locationsu
site_packagesurunning_under_virtualenvuvirtualenv_no_globalupip.loguloggerupip._vendoru
pkg_resourcesupip._vendor.distlibuversionu__all__uget_proguFalseurmtreeurmtree_errorhandlerudisplay_pathu
backup_diruNoneufind_commanduget_pathextuask_path_existsuaskuobjectu_InfuInfucompileuIu
_normalize_reunormalize_nameuformat_sizeuis_installable_diruis_svn_pageu
file_contentsusplit_leading_diruhas_leading_dirumake_path_relativeunormalize_pathusplitexturenamesuis_localu
dist_is_localudist_in_usersiteudist_in_site_packagesudist_is_editableuTrueuget_installed_distributionsu
egg_link_pathu
dist_locationuget_terminal_sizeu
current_umasku
unzip_fileu
untar_fileucreate_download_cache_folderucache_downloaduunpack_fileuDEBUGucall_subprocessu
is_prereleaseuBuildDirectory(((u!/tmp/pip-zej_zi-build/pip/util.pyu<module>s�.							
		'"-L	?python3.3/site-packages/pip/__pycache__/download.cpython-33.pyc000064400000060007151733566750020310 0ustar00�
7�Re4Xc
@sMddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZmZmZddlmZmZddlmZmZmZmZmZmZmZmZmZddlmZddl m!Z!ddl"m#Z#m$Z$ddl%m&Z&dd	l'm(Z(m)Z)dd
l*m+Z+ddl,m-Z-m.Z.ddl/m0Z0dd
l1m2Z2ddddddddddg
Z3dd�Z4Gdd�de(�Z5Gdd�de6�Z7Gdd�de&�Z8Gd d!�d!e#j9�Z:ddd"d�Z<ej=d#ej>�Z?ej=d$ej>�Z@d%d�ZAd&d�ZBej=d'ej>�ZCej=d(ej>�ZDd)d�ZEd*d�ZFd:d+d�ZHd,d-�ZId.d�ZJd/d�ZKd0d1�ZLd2d3�ZMd4d5�ZNd6d7�ZOddd8d�ZPdd9d�ZQdS(;iN(uurllibuurlparseu	raw_input(uInstallationErroruHashMismatch(	usplitexturmtreeuformat_sizeudisplay_pathu
backup_diruask_path_existsuunpack_fileucreate_download_cache_folderucache_download(uvcs(ulogger(urequestsusix(uBaseAdapter(uAuthBaseu
HTTPBasicAuth(uIncompleteRead(u
InvalidURLuChunkedEncodingError(uResponse(uCaseInsensitiveDictuget_file_contentuis_urluurl_to_pathupath_to_urluis_archive_fileuunpack_vcs_linkuunpack_file_urlu
is_vcs_urluis_file_urluunpack_http_urlcCs5tj�}|dkr'tj�}n�|dkr�dtjjtjjtjjf}tjjdkr�dj	|tjjg�}q�n<|dkr�tj�}n!|dkr�tj�}nd}ytj
�}tj�}Wntk
rd}d}YnXd	j	d
t
jd||fd||fg�S(u,Return a string representing the user agent.uCPythonuPyPyu%s.%s.%sufinaluuJythonu
IronPythonuUnknownu upip/%su%s/%s(uplatformupython_implementationupython_versionusysupypy_version_infoumajoruminorumicroureleaselevelujoinusystemureleaseuIOErrorupipu__version__(u_implementationu_implementation_versionup_systemu	p_release((u%/tmp/pip-zej_zi-build/pip/download.pyu
user_agent$s2	

u
user_agentcBsG|EeZdZd
dd�Zdd�Zdd�Zdd�Zd	S(uMultiDomainBasicAuthcCs||_i|_dS(N(u	promptingu	passwords(uselfu	prompting((u%/tmp/pip-zej_zi-build/pip/download.pyu__init__Hs	uMultiDomainBasicAuth.__init__cCs�tj|j�}|jjdd�d}tj|dd�|f|dd��|_|jj|d�\}}|dkr�|j|j�\}}n|s�|r�||f|j|<t	|p�d|p�d�|�}n|j
d|j�|S(Nu@iiuuresponsei����(NN(uurlparseuurlunetlocusplitu
urlunparseu	passwordsugetuNoneuparse_credentialsu
HTTPBasicAuthu
register_hooku
handle_401(uselfurequparsedunetlocuusernameupassword((u%/tmp/pip-zej_zi-build/pip/download.pyu__call__Ls1$uMultiDomainBasicAuth.__call__cKs�|jdkr|S|js |Stj|j�}td|j�}tjd�}|s`|ry||f|j|j<n|j|j	j
�t|p�d|p�d�|j�}|j
j||�}|jj|�|S(Ni�u
User for %s: u
Password: u(ustatus_codeu	promptinguurlparseuurlu	raw_inputunetlocugetpassu	passwordsucontenturawurelease_connu
HTTPBasicAuthurequestu
connectionusenduhistoryuappend(uselfurespukwargsuparseduusernameupasswordurequnew_resp((u%/tmp/pip-zej_zi-build/pip/download.pyu
handle_401hs	
$uMultiDomainBasicAuth.handle_401cCsLd|krH|jdd�d}d|kr>|jdd�S|dfSdS(Nu@iiu:(NN(ursplitusplituNone(uselfunetlocuuserinfo((u%/tmp/pip-zej_zi-build/pip/download.pyuparse_credentials�s
u&MultiDomainBasicAuth.parse_credentialsNT(u__name__u
__module__u__qualname__uTrueu__init__u__call__u
handle_401uparse_credentials(u
__locals__((u%/tmp/pip-zej_zi-build/pip/download.pyuMultiDomainBasicAuthFs"uMultiDomainBasicAuthcBsS|EeZdZdd�Zdd�Zd	d	d
dd�Zedd��Z	d	S(uLocalFSResponsecCs
||_dS(N(ufileobj(uselfufileobj((u%/tmp/pip-zej_zi-build/pip/download.pyu__init__�suLocalFSResponse.__init__cCst|j|�S(N(ugetattrufileobj(uselfuname((u%/tmp/pip-zej_zi-build/pip/download.pyu__getattr__�suLocalFSResponse.__getattr__cCs|jj|�S(N(ufileobjuread(uselfuamtudecode_contentu
cache_content((u%/tmp/pip-zej_zi-build/pip/download.pyuread�suLocalFSResponse.readcs9Gdd�dt��G�fdd�dt�}|�S(NcBs,|EeZdZdd�Zdd�ZdS(u7LocalFSResponse._original_response.<locals>.FakeMessagecSsgS(N((uselfuheader((u%/tmp/pip-zej_zi-build/pip/download.pyu
getheaders�suBLocalFSResponse._original_response.<locals>.FakeMessage.getheaderscSsgS(N((uselfuheaderudefault((u%/tmp/pip-zej_zi-build/pip/download.pyuget_all�su?LocalFSResponse._original_response.<locals>.FakeMessage.get_allN(u__name__u
__module__u__qualname__u
getheadersuget_all(u
__locals__((u%/tmp/pip-zej_zi-build/pip/download.pyuFakeMessage�suFakeMessagecs,|EeZdZe�fdd��ZdS(u8LocalFSResponse._original_response.<locals>.FakeResponsecs��S(N((uself(uFakeMessage(u%/tmp/pip-zej_zi-build/pip/download.pyumsg�su<LocalFSResponse._original_response.<locals>.FakeResponse.msgN(u__name__u
__module__u__qualname__upropertyumsg(u
__locals__(uFakeMessage(u%/tmp/pip-zej_zi-build/pip/download.pyuFakeResponse�suFakeResponse(uobject(uselfuFakeResponse((uFakeMessageu%/tmp/pip-zej_zi-build/pip/download.pyu_original_response�su"LocalFSResponse._original_responseNF(
u__name__u
__module__u__qualname__u__init__u__getattr__uNoneuFalseureadupropertyu_original_response(u
__locals__((u%/tmp/pip-zej_zi-build/pip/download.pyuLocalFSResponse�suLocalFSResponsecBs;|EeZdZddddddd�Zdd�ZdS(uLocalFSAdapterc
Cstj|j�}|jj�dkr=td|j��ntj|dd�d|dd��}t|�}	t�}
d|
_||
_t	j
|	�}tjj
|jdd�}titj|	�dp�d	d
6|jd6|d6�|
_tt|	d
��|
_|
jj|
_|
S(Nu	localhostu)Invalid URL %r: Only localhost is allowediuii�uusegmtiu
text/plainuContent-TypeuContent-Lengthu
Last-Modifiedurb(uT(uurlparseuurlunetloculoweru
InvalidURLu
urlunparseuurl_to_pathuResponseustatus_codeuosustatuemailuutilsu
formatdateust_mtimeuTrueuCaseInsensitiveDictu	mimetypesu
guess_typeust_sizeuheadersuLocalFSResponseuopenurawuclose(
uselfurequestustreamutimeoutuverifyucertuproxiesu
parsed_urlureal_urlupathnameurespustatsumodified((u%/tmp/pip-zej_zi-build/pip/download.pyusend�s$+			
uLocalFSAdapter.sendcCsdS(N((uself((u%/tmp/pip-zej_zi-build/pip/download.pyuclose�suLocalFSAdapter.closeN(u__name__u
__module__u__qualname__uNoneusenduclose(u
__locals__((u%/tmp/pip-zej_zi-build/pip/download.pyuLocalFSAdapter�suLocalFSAdaptercs>|EeZdZdZ�fdd�Z�fdd�Z�S(u
PipSessioncsLtt|�j||�t�|jd<t�|_|jdt��dS(Nu
User-Agentufile://(	usuperu
PipSessionu__init__u
user_agentuheadersuMultiDomainBasicAuthuauthumountuLocalFSAdapter(uselfuargsukwargs(u	__class__(u%/tmp/pip-zej_zi-build/pip/download.pyu__init__�suPipSession.__init__cs~tj|�}|jdkrLtj|dd�d|dd��}n|jd|j�tt|�j||||�S(Nufileiu	localhostiutimeout(u	localhost(uurlparseuschemeu
urlunparseu
setdefaultutimeoutusuperu
PipSessionurequest(uselfumethoduurluargsukwargsuparsed(u	__class__(u%/tmp/pip-zej_zi-build/pip/download.pyurequest�s
.uPipSession.requestN(u__name__u
__module__u__qualname__uNoneutimeoutu__init__urequest(u
__locals__((u	__class__u%/tmp/pip-zej_zi-build/pip/download.pyu
PipSession�su
PipSessionc

Cs�|d
krt�}ntj|�}|rq|jd�j�}|dkr||r||jd�r|td||f��n|dkr,|jdd�d}|j	dd�}t
j|�}|r�|jd�d|jdd�d}ntj
|�}|jd�r#d|jd�}n|}qq|j|�}|j�tjr^|j|jfS|j|jfSnyt|�}|j�}Wn8tk
r�tj�d}	td	t|	���YnX|j�||fS(u�Gets the content of a file; it may be a filename, file: URL, or
    http: URL.  Returns (location, content).  Content is unicode.iufileuhttpu6Requirements file %s references URL %s, which is localu:u\u/u|u$Could not open requirements file: %sN(uNoneu
PipSessionu
_scheme_reusearchugroupuloweru
startswithuInstallationErrorusplitureplaceu_url_slash_drive_reumatchuurllibuunquoteulstripugeturaise_for_statususixuPY3uurlutextucontentuopenureaduIOErrorusysuexc_infoustruclose(
uurlu
comes_fromusessionumatchuschemeupathurespufucontentue((u%/tmp/pip-zej_zi-build/pip/download.pyuget_file_content�sB*	
	

u^(http|https|file):u/*([a-z])\|cCsId|krdS|jdd�dj�}|ddddgtjkS(	u)Returns true if the name looks like a URLu:iiuhttpuhttpsufileuftpF(uFalseusplituloweruvcsuall_schemes(unameuscheme((u%/tmp/pip-zej_zi-build/pip/download.pyuis_url scCs�|jd�std|��|td�d�jd�}tj|�}tj|�r{|dd|dd�}n
d|}|S(u(
    Convert a file: URL to a path.
    ufile:u4You can only turn file: urls into filenames (not %r)Nu/iu:i(u
startswithuAssertionErrorulenulstripuurllibuunquoteu
_url_drive_reumatch(uurlupath((u%/tmp/pip-zej_zi-build/pip/download.pyuurl_to_path(s

u	^([a-z]):u^([a-z])[:|]cCs�tjjtjj|��}tjj|�\}}|jtjj�}djdd�|D��}|s|jd�}nd||S(uh
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    u/cSsg|]}tj|��qS((uurllibuquote(u.0upart((u%/tmp/pip-zej_zi-build/pip/download.pyu
<listcomp>Cs	upath_to_url.<locals>.<listcomp>ufile:///(	uosupathunormpathuabspathu
splitdriveusplitusepujoinulstrip(upathudriveufilepathuurl((u%/tmp/pip-zej_zi-build/pip/download.pyupath_to_url;scCs0d	}t|�dj�}||kr,d
SdS(u9Return True if `name` is a considered as an archive file.u.zipu.tar.gzu.tar.bz2u.tgzu.taru	.pybundleu.whli(u.zipu.tar.gzu.tar.bz2u.tgzu.taru	.pybundleu.whlTF(usplitextuloweruTrueuFalse(unameuarchivesuext((u%/tmp/pip-zej_zi-build/pip/download.pyuis_archive_fileIscCs3t|�}|r"|j|�n
|j|�dS(N(u_get_used_vcs_backenduexportuunpack(ulinkulocationu
only_downloaduvcs_backend((u%/tmp/pip-zej_zi-build/pip/download.pyuunpack_vcs_linkSscCs=x6tjD]+}|j|jkr
||j�}|Sq
WdS(N(uvcsubackendsuschemeuschemesuurl(ulinkubackenduvcs_backend((u%/tmp/pip-zej_zi-build/pip/download.pyu_get_used_vcs_backend[su_get_used_vcs_backendcCstt|��S(N(uboolu_get_used_vcs_backend(ulink((u%/tmp/pip-zej_zi-build/pip/download.pyu
is_vcs_urlbscCs|jj�jd�S(Nufile:(uurluloweru
startswith(ulink((u%/tmp/pip-zej_zi-build/pip/download.pyuis_file_urlfscCs�|jtj|j�jkrQtjd|j||jf�td|��n|j�|jkr�tjd||j�|jf�td|j|f��ndS(NuPHash digest size of the package %d (%s) doesn't match the expected hash name %s!u!Hash name mismatch for package %su?Hash of the package %s (%s) doesn't match the expected hash %s!uBad %s hash for package %s(	udigest_sizeuhashlibunewu	hash_nameuloggerufataluHashMismatchu	hexdigestuhash(u
download_hashulink((u%/tmp/pip-zej_zi-build/pip/download.pyu_check_hashjs		u_check_hashcCs�ytj|j�}Wn6ttfk
rNtjd|j|f�dSYnXt|d�}x)|j	d�}|szPn|j
|�qa|j�|S(Nu'Unsupported hash name %s for package %surbi(uhashlibunewu	hash_nameu
ValueErroru	TypeErroruloggeruwarnuNoneuopenureaduupdateuclose(utarget_fileulinku
download_hashufpuchunk((u%/tmp/pip-zej_zi-build/pip/download.pyu_get_hash_from_fileus	
u_get_hash_from_filecst|d�}d}|jro|jroytj|j�}Wqotk
rktjd|j|f�YqoXnyt	�j
d�}Wn!tttfk
r�d}YnXd}|dkp�|}|j
}z |r|r�tjd|t|�f�q tjd|�ntjd	|�tjd
|��fdd�}	x�|	d
�D]�}
|t|
�7}|r�|s�tjdt|��q�tjdd||t|�f�n|dk	r�|j|
�n|j|
�qPW|j�Wd|rtjdt|��nX|S(Nuwbu'Unsupported hash name %s for package %sucontent-lengthii(i�uDownloading %s (%s): uDownloading %s (unknown size): uDownloading %suDownloading from URL %sc3s�ydy,x%�jj|dd�D]}|VqWWn1tk
rb}zt|��WYdd}~XnXWn9tk
r�x$�jj|�}|s�Pn|VqwYnXdS(Nudecode_contentF(urawustreamuFalseuIncompleteReaduChunkedEncodingErroruAttributeErroruread(u
chunk_sizeuchunkue(uresp(u%/tmp/pip-zej_zi-build/pip/download.pyu	resp_read�s
#
u _download_url.<locals>.resp_readiu%su	%3i%%  %sidu
%s downloadedi@�(uopenuNoneuhashu	hash_nameuhashlibunewu
ValueErroruloggeruwarnuintuheadersuKeyErroru	TypeErrorushow_urlustart_progressuformat_sizeunotifyuinfoulenu
show_progressuupdateuwriteucloseuend_progress(urespulinku
temp_locationufpu
download_hashutotal_lengthu
downloadedu
show_progressushow_urlu	resp_readuchunk((urespu%/tmp/pip-zej_zi-build/pip/download.pyu
_download_url�sF
"	 (u
_download_urlcCsd}tjj||j�}tjj|�r�tdt|�d	�}|dkr^d
}q�|dkr�t	j
dt|��tj|�q�|dkr�t|�}t	j
dt|�t|�f�t
j||�q�n|rt
j||�t	jdt|��ndS(Nu/The file %s exists. (i)gnore, (w)ipe, (b)ackup uiuwubuDeleting %suBacking up %s to %suSaved %sT(uiuwubF(uTrueuosupathujoinufilenameuexistsuask_path_existsudisplay_pathuFalseuloggeruwarnuremoveu
backup_dirushutilumoveucopyunotify(ufilenameulocationucontent_typeulinkucopyudownload_locationuresponseu	dest_file((u%/tmp/pip-zej_zi-build/pip/download.pyu
_copy_file�s&		u
_copy_filec0Cs�|dkrt�}ntjdd�}d}|jjdd�d}d}d}	d}
d}|r�tjj	|t
j|d��}	|	d}
tjj|	�o�tjj|
�}tjj
|�s�t|�q�nd}|rtjj	||j�}tjj|�sd}qn|r�|}tj|�d}
tjd|�|jr�t||�}yt||�Wq�tk
r�tjd	|�d}tj|�d}Yq�Xq�n|r�|r�t|
��}|j�j�}
WdQX|	}tjd
|	�|jr�|jr�t|	|�}yt||�Wq�tk
r�tjd|�d}tj|	�tj|
�d}Yq�Xq�n|s-y#|j|dd�}|j �WnHt!j"k
r�}z%tj#d
|j$j%|f��WYdd}~XnX|j&jdd�}
|j}|j&jd�}|r^t'j(|�\}}|jd�pX|}nt)|�d}|s�tj*|
�}|r�||7}q�n|r�|j|jkr�tjj)|j�d}|r�||7}q�ntjj	||�}t+|||�}|jr-|jr-t||�q-n|rP|rPt,|||
|�nt-|||
|�|	r�|r�t.|	||
�n|p�|s�tj|�ntj/|�dS(Nu-unpackupip-u#iiuu
.content-typeuFile was already downloaded %su;Previously-downloaded file %s has bad hash, re-downloading.uUsing download cache from %su,Cached file %s has bad hash, re-downloading.ustreamuHTTP error %s while getting %sucontent-typeucontent-dispositionufilenameFT(0uNoneu
PipSessionutempfileumkdtempuurlusplituFalseuosupathujoinuurllibuquoteuexistsuisdirucreate_download_cache_folderufilenameu	mimetypesu
guess_typeuloggerunotifyuhashu_get_hash_from_fileu_check_hashuHashMismatchuwarnuunlinkuopenureadustripu	hash_nameugetuTrueuraise_for_statusurequestsu	HTTPErrorufataluresponseustatus_codeuheadersucgiuparse_headerusplitextuguess_extensionu
_download_urlu
_copy_fileuunpack_fileucache_downloadurmdir(ulinkulocationudownload_cacheudownload_dirusessionutemp_diru
temp_locationu
target_urlualready_cachedu
cache_fileucache_content_type_fileu
download_hashualready_downloadeducontent_typeufpurespuexcufilenameucontent_dispositionutypeuparamsuext((u%/tmp/pip-zej_zi-build/pip/download.pyuunpack_http_url�s�
	





		

c
Cs�t|j�}d}tjj|�r`tjj|�rFt|�ntj||dd�dS|j
r�t||�}t||�n|rMtjj
||j�}tjj|�rMtj|�d}tjd|�|j
rAt||�}yt||�d}WqGtk
r=tjd|�tj|�YqGXqJd}qMn|r\|}	n|}	tj|	�d}t|	|||�|r�|r�t|	|||�ndS(NusymlinksiuFile was already downloaded %su;Previously-downloaded file %s has bad hash, re-downloading.FT(uurl_to_pathuurl_without_fragmentuFalseuosupathuisdirurmtreeushutilucopytreeuTrueuhashu_get_hash_from_fileu_check_hashujoinufilenameuexistsu	mimetypesu
guess_typeuloggerunotifyuHashMismatchuwarnuunlinkuunpack_fileu
_copy_file(
ulinkulocationudownload_diru	link_pathualready_downloadedulink_path_hashu
download_pathucontent_typeu
download_hashu	from_path((u%/tmp/pip-zej_zi-build/pip/download.pyuunpack_file_urlRsB
		


	
F(Rucgiuemail.utilsuemailuhashlibugetpassu	mimetypesuosuplatformureushutilusysutempfileupipupip.backwardcompatuurllibuurlparseu	raw_inputupip.exceptionsuInstallationErroruHashMismatchupip.utilusplitexturmtreeuformat_sizeudisplay_pathu
backup_diruask_path_existsuunpack_fileucreate_download_cache_folderucache_downloadupip.vcsuvcsupip.loguloggerupip._vendorurequestsusixupip._vendor.requests.adaptersuBaseAdapterupip._vendor.requests.authuAuthBaseu
HTTPBasicAuthupip._vendor.requests.compatuIncompleteReadupip._vendor.requests.exceptionsu
InvalidURLuChunkedEncodingErrorupip._vendor.requests.modelsuResponseupip._vendor.requests.structuresuCaseInsensitiveDictu__all__u
user_agentuMultiDomainBasicAuthuobjectuLocalFSResponseuLocalFSAdapteruSessionu
PipSessionuNoneuget_file_contentucompileuIu
_scheme_reu_url_slash_drive_reuis_urluurl_to_pathu	_drive_reu
_url_drive_reupath_to_urluis_archive_fileuFalseuunpack_vcs_linku_get_used_vcs_backendu
is_vcs_urluis_file_urlu_check_hashu_get_hash_from_fileu
_download_urlu
_copy_fileuunpack_http_urluunpack_file_url(((u%/tmp/pip-zej_zi-build/pip/download.pyu<module>sh@	"M#,
<ypython3.3/site-packages/pip/__pycache__/baseparser.cpython-33.pyc000064400000030500151733566750020623 0ustar00�
7�Re�c@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
mZddlmZGdd	�d	ej�ZGd
d�de�ZGdd
�d
ej�ZGdd�de�ZdS(uBase option parser setupiN(u	strtobool(uConfigParserustring_types(udefault_config_file(uget_terminal_sizeuget_prog(u
pkg_resourcescBs�|EeZdZdZdd�Zdd�Zdddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS(uPrettyHelpFormatteru4A prettier/less verbose help formatter for optparse.cOsCd|d<d|d<t�dd|d<tjj|||�dS(Niumax_help_positioniuindent_incrementiiuwidth(uget_terminal_sizeuoptparseuIndentedHelpFormatteru__init__(uselfuargsukwargs((u'/tmp/pip-zej_zi-build/pip/baseparser.pyu__init__s

uPrettyHelpFormatter.__init__cCs|j|dd�S(Nu <%s>u, (u_format_option_strings(uselfuoption((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuformat_option_stringssu)PrettyHelpFormatter.format_option_stringsu <%s>u, cCs�g}|jr&|j|jd�n|jrF|j|jd�nt|�dkrk|jd|�n|j�r�|jp�|jj�}|j||j��ndj	|�S(u
        Return a comma-separated list of option strings and metavars.

        :param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
        :param mvarfmt: metavar format string - evaluated as mvarfmt % metavar
        :param optsep:  separator
        iiu(
u_short_optsuappendu
_long_optsulenuinsertutakes_valueumetavarudestulowerujoin(uselfuoptionumvarfmtuoptsepuoptsumetavar((u'/tmp/pip-zej_zi-build/pip/baseparser.pyu_format_option_stringss		u*PrettyHelpFormatter._format_option_stringscCs|dkrdS|dS(NuOptionsuu:
((uselfuheading((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuformat_heading3su"PrettyHelpFormatter.format_headingcCs#d|jtj|�d�}|S(uz
        Ensure there is only one newline between usage and the first heading
        if there is no description.
        u
Usage: %s
u  (uindent_linesutextwrapudedent(uselfuusageumsg((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuformat_usage8su PrettyHelpFormatter.format_usagecCsy|rqt|jd�r!d}nd}|jd�}|j�}|jtj|�d�}d||f}|SdSdS(NumainuCommandsuDescriptionu
u  u%s:
%s
u(uhasattruparserulstripurstripuindent_linesutextwrapudedent(uselfudescriptionulabel((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuformat_description@s	u&PrettyHelpFormatter.format_descriptioncCs|r
|SdSdS(Nu((uselfuepilog((u'/tmp/pip-zej_zi-build/pip/baseparser.pyu
format_epilogRsu!PrettyHelpFormatter.format_epilogcs/�fdd�|jd�D�}dj|�S(Ncsg|]}�|�qS(((u.0uline(uindent(u'/tmp/pip-zej_zi-build/pip/baseparser.pyu
<listcomp>Zs	u4PrettyHelpFormatter.indent_lines.<locals>.<listcomp>u
(usplitujoin(uselfutextuindentu	new_lines((uindentu'/tmp/pip-zej_zi-build/pip/baseparser.pyuindent_linesYs"u PrettyHelpFormatter.indent_linesN(u__name__u
__module__u__qualname__u__doc__u__init__uformat_option_stringsu_format_option_stringsuformat_headinguformat_usageuformat_descriptionu
format_epiloguindent_lines(u
__locals__((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuPrettyHelpFormattersuPrettyHelpFormattercBs&|EeZdZdZdd�ZdS(uUpdatingDefaultsHelpFormatteru�Custom help formatter for use in ConfigOptionParser that updates
    the defaults before expanding them, allowing them to show up correctly
    in the help listingcCs;|jdk	r(|jj|jj�ntjj||�S(N(uparseruNoneuupdate_defaultsudefaultsuoptparseuIndentedHelpFormatteruexpand_default(uselfuoption((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuexpand_defaultcsu,UpdatingDefaultsHelpFormatter.expand_defaultN(u__name__u
__module__u__qualname__u__doc__uexpand_default(u
__locals__((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuUpdatingDefaultsHelpFormatter^suUpdatingDefaultsHelpFormattercBs2|EeZdZdd�Zedd��ZdS(uCustomOptionParsercOs6|j||�}|jj�|jj||�|S(u*Insert an OptionGroup at a given position.(uadd_option_groupu
option_groupsupopuinsert(uselfuidxuargsukwargsugroup((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuinsert_option_groupjs
u&CustomOptionParser.insert_option_groupcCs;|jdd�}x!|jD]}|j|j�qW|S(u<Get a list of all options, including those in option groups.N(uoption_listu
option_groupsuextend(uselfuresui((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuoption_list_allssu"CustomOptionParser.option_list_allN(u__name__u
__module__u__qualname__uinsert_option_groupupropertyuoption_list_all(u
__locals__((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuCustomOptionParseris	uCustomOptionParsercBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	ddd�Z
dd�Zdd�ZdS(uConfigOptionParserusCustom option parser which updates its defaults by checking the
    configuration files and environmental variablescOsxtj�|_|jd�|_|j�|_|jrO|jj|j�n|js^t�t	j
j|||�dS(Nuname(uConfigParseruRawConfigParseruconfigupopunameuget_config_filesufilesureaduAssertionErroruoptparseuOptionParseru__init__(uselfuargsukwargs((u'/tmp/pip-zej_zi-build/pip/baseparser.pyu__init__�s	uConfigOptionParser.__init__cCsNtjjdd�}|tjkr(gS|rGtjj|�rG|gStgS(NuPIP_CONFIG_FILEF(uosuenvironugetuFalseudevnullupathuexistsudefault_config_file(uselfuconfig_file((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuget_config_files�su#ConfigOptionParser.get_config_filescCs[y|j||�SWn@tjk
rVtj�d}td|�tjd�YnXdS(Niu*An error occurred during configuration: %si(ucheck_valueuoptparseuOptionValueErrorusysuexc_infouprintuexit(uselfuoptionukeyuvalue((u'/tmp/pip-zej_zi-build/pip/baseparser.pyu
check_default�su ConfigOptionParser.check_defaultcs#i}x6d�jfD]%}|j�j�j|���qW|j�j�j���x�|j�D]�\�}�j����dk	rh|s�qhn�jd	kr�t	|�}n�jdkr�|j
�}���fdd�|D�}n�j��|�}||�j<qhqhW|S(
u�Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists).uglobalu
store_trueustore_falseucountuappendcs%g|]}�j��|��qS((u
check_default(u.0uv(ukeyuoptionuself(u'/tmp/pip-zej_zi-build/pip/baseparser.pyu
<listcomp>�s	u6ConfigOptionParser.update_defaults.<locals>.<listcomp>N(u
store_trueustore_falseucount(
unameuupdateunormalize_keysuget_config_sectionuget_environ_varsuitemsu
get_optionuNoneuactionu	strtoboolusplitu
check_defaultudest(uselfudefaultsuconfigusectionuval((ukeyuoptionuselfu'/tmp/pip-zej_zi-build/pip/baseparser.pyuupdate_defaults�s"#"u"ConfigOptionParser.update_defaultscCsYi}xL|D]D\}}|jdd�}|jd�sGd|}n|||<q
W|S(u�Return a config dictionary with normalized keys regardless of
        whether the keys were specified in environment variables or in config
        filesu_u-u--u--%s(ureplaceu
startswith(uselfuitemsu
normalizedukeyuval((u'/tmp/pip-zej_zi-build/pip/baseparser.pyunormalize_keys�s
u!ConfigOptionParser.normalize_keyscCs&|jj|�r"|jj|�SgS(u Get a section of a configuration(uconfiguhas_sectionuitems(uselfuname((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuget_config_section�su%ConfigOptionParser.get_config_sectionuPIP_ccsSxLtjj�D];\}}|j|�r|j|d�j�|fVqqWdS(u@Returns a generator with all environmental vars with prefix PIP_uN(uosuenvironuitemsu
startswithureplaceulower(uselfuprefixukeyuval((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuget_environ_vars�su#ConfigOptionParser.get_environ_varscCs�|jstj|j�S|j|jj��}x]|j�D]O}|j|j�}t	|t
�r>|j�}|j||�||j<q>q>Wtj|�S(u�Overridding to make updating the defaults after instantiation of
        the option parser possible, update_defaults() does the dirty work.(
uprocess_default_valuesuoptparseuValuesudefaultsuupdate_defaultsucopyu_get_all_optionsugetudestu
isinstanceustring_typesuget_opt_stringucheck_value(uselfudefaultsuoptionudefaultuopt_str((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuget_default_values�s	 u%ConfigOptionParser.get_default_valuescCs(|jtj�|jdd|�dS(Niu%s
(uprint_usageusysustderruexit(uselfumsg((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuerror�suConfigOptionParser.errorN(
u__name__u
__module__u__qualname__u__doc__u__init__uget_config_filesu
check_defaultuupdate_defaultsunormalize_keysuget_config_sectionuget_environ_varsuget_default_valuesuerror(u
__locals__((u'/tmp/pip-zej_zi-build/pip/baseparser.pyuConfigOptionParser}s	uConfigOptionParser(u__doc__usysuoptparseuosutextwrapudistutils.utilu	strtoboolupip.backwardcompatuConfigParserustring_typesu
pip.locationsudefault_config_fileupip.utiluget_terminal_sizeuget_progupip._vendoru
pkg_resourcesuIndentedHelpFormatteruPrettyHelpFormatteruUpdatingDefaultsHelpFormatteruOptionParseruCustomOptionParseruConfigOptionParser(((u'/tmp/pip-zej_zi-build/pip/baseparser.pyu<module>sOpython3.3/site-packages/pip/__pycache__/index.cpython-33.pyc000064400000121622151733566750017611 0ustar00�
7�Reӝc@s�dZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZddl
mZmZmZmZmZddlmZmZddlmZmZmZddlmZmZdd	lmZmZm Z dd
l!m"Z"m#Z#m$Z$ddl%m&Z&dgZ'd
Z(idgd6Z)Gdd�de*�Z+Gdd�de*�Z,Gdd�de*�Z-Gdd�de*�Z.e.e	�Z/dd�Z0dd�Z1dS(u!Routines related to PyPI, indexesiN(ulogger(uInfunormalize_nameusplitextu
is_prerelease(uDistributionNotFounduBestVersionAlreadyInstalleduInstallationErroruInvalidWheelFilenameuUnsupportedWheel(uurlparseuurl2pathname(u
PipSessionuurl_to_pathupath_to_url(uWheelu	wheel_ext(usupported_tagsusupported_tags_noarchuget_platform(uhtml5liburequestsu
pkg_resources(uSSLErroru
PackageFinderulast.pypi.python.orguhttpsuhttpc	Bs
|EeZdZdZd"ggd#d#d#d!dd�Zdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zejd�Zejdej�Zejd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!S($u
PackageFinderu�This finds packages.

    This is meant to match easy_install's technique for looking for
    packages, by reading pages and looking for appropriate links
    c

Cs�||_||_g|_t�|_t�|_||_tdd�|D��|_tdd�|D��|_	|j|j	O_||_
d|_d|_
||_||_d|_|	p�t�|_dS(Ncss|]}t|�VqdS(N(unormalize_name(u.0un((u"/tmp/pip-zej_zi-build/pip/index.pyu	<genexpr>4su)PackageFinder.__init__.<locals>.<genexpr>css|]}t|�VqdS(N(unormalize_name(u.0un((u"/tmp/pip-zej_zi-build/pip/index.pyu	<genexpr>8sF(u
find_linksu
index_urlsudependency_linksu	PageCacheucacheusetulogged_linksu	use_wheeluallow_externaluallow_unverifieduallow_all_externaluFalseuneed_warn_externaluneed_warn_unverifieduallow_all_prereleasesuprocess_dependency_linksu_have_warned_dependency_linksu
PipSessionusession(
uselfu
find_linksu
index_urlsu	use_wheeluallow_externaluallow_unverifieduallow_all_externaluallow_all_prereleasesuprocess_dependency_linksusession((u"/tmp/pip-zej_zi-build/pip/index.pyu__init__&s"										uPackageFinder.__init__cCsE|jrA|js.tjdd�d|_n|jj|�ndS(Nu1.6upDependency Links processing has been deprecated with an accelerated time schedule and will be removed in pip 1.6T(uprocess_dependency_linksu_have_warned_dependency_linksuloggeru
deprecateduTrueudependency_linksuextend(uselfulinks((u"/tmp/pip-zej_zi-build/pip/index.pyuadd_dependency_linksSs		u"PackageFinder.add_dependency_linksc	sJg�g���fdd�}x|D]}tjj|�}|jd�}||jk}|sj|r/|ry|}nt|�}|r�tjj|�r�tjj|�}xztj|�D]}|tjj	||��q�Wq<|r
tjj|�r
�j
|�q<tjj|�r<||�q<q(�j
|�q(W��fS(ut
        Sort locations into "files" (archives) and "urls", and return
        a pair of lists (files,urls)
        csLt|�}tj|dd�ddkr;�j|�n
�j|�dS(Nustrictiu	text/htmlF(upath_to_urlu	mimetypesu
guess_typeuFalseuappend(upathuurl(ufilesuurls(u"/tmp/pip-zej_zi-build/pip/index.pyu	sort_pathksu0PackageFinder._sort_locations.<locals>.sort_pathufile:(uosupathuexistsu
startswithu
find_linksuurl_to_pathuisdirurealpathulistdirujoinuappenduisfile(	uselfu	locationsu	sort_pathuurlu
is_local_pathuis_file_urluis_find_linkupathuitem((ufilesuurlsu"/tmp/pip-zej_zi-build/pip/index.pyu_sort_locationsbs*
	 uPackageFinder._sort_locationscCs�|\}}}|jr�tt�}|tkr9d}nW|jtkr�t|j�}|j�syt	d|j��n|j
�}n|}||fS|SdS(uL
        Function used to generate link sort key for link tuples.
        The greater the return value, the more preferred it is.
        If not finding wheels, then sorted by version only.
        If finding wheels, then the sort order is by version, then:
          1. existing installs
          2. wheels ordered via Wheel.support_index_min()
          3. source archives
        Note: it was considered to embed this logic into the Link
              comparison operators, but then different sdist links
              with the same version, would have to be considered equal
        iuB%s is not a supported wheel for this platform. It can't be sorted.N(u	use_wheelulenusupported_tagsuINSTALLED_VERSIONuextu	wheel_extuWheelufilenameu	supporteduUnsupportedWheelusupport_index_min(uselfu
link_tupleuparsed_versionulinku_usupport_numupriuwheel((u"/tmp/pip-zej_zi-build/pip/index.pyu_link_sort_key�s
		
uPackageFinder._link_sort_keycCst|d|jdd�S(u�
        Bring the latest version (and wheels) to the front, but maintain the existing ordering as secondary.
        See the docstring for `_link_sort_key` for details.
        This function is isolated for easier unit testing.
        ukeyureverseT(usortedu_link_sort_keyuTrue(uselfuapplicable_versions((u"/tmp/pip-zej_zi-build/pip/index.pyu_sort_versions�suPackageFinder._sort_versionscs�fdd��|j�d}|jr�t�|jd�dd2�}|j||�}|dkr�|jt|jddd2��|�p�|j�q�n�dk	r��fdd�|jD�|j}nt|j�}xH|j	D]=}�dk	r�|dk	r�t
j|j|�g|}q�q�W|j
|�\}}|j
|j�\}	}
|j|	�dd�|D�}|jdd�|
D��tjd	|�x�|D]�}tjd
|�tjt|��}|jtkr�t|j}
t|
�dkr3||j|
d|jf}tjd|�q�t|
�dkrz||jd
j|
�|jf}tjd|�q�||jf}tjd|�q�q�Wg}|j|jdd�|jD�|jj���g}xy|j||�D]e}tjd|j�tjd7_z)|j|j|j|jj���Wdtjd8_Xq�Wt|jdd�|jD�|jj���}|r�tjdd
jdd�|D���nt|jdd�|D�|jj���}|rj|rj|rj|rjtj d|�|j!r7tjd|j�n|j"rWtjd|j�nt#d|��ng}|j$dk	r�|j$j%t&|j$j'fg}n|r�|j(dd2�tjdd
jdd�|D���n|||||}g}x�|D]�\}}}||j)kr]tjd||djd d�|j)j*D��f�qnKt+|�r�|j,px|j-r�|t&k	r�tjd!||f�qq�n|j.|||f�qW|j/|�}t0d"d�|D��}|rN|rN|ddt&kr%tjd#|j$j'�n%tjd$|j$j'|ddf�dS|s�tj d%|d
jd&d�|D��f�|j!r�tjd'�n|j"r�tjd|j�nt#d(|��n|ddt&kr-tjd)|j$j'd
jd*d�|dd�D��pd+f�t1�nt|�dkrwtjd,|ddd
jd-d�|D��f�n|dd}|j2dk	r�|j2r�tjd.|j�n|j3dk	r�|j3r�tjd/|j�n|j4rtj5d0d1|j�n|S(3Ncs2tj|��}|jd�s.|d}n|S(Nu/(u	posixpathujoinuendswith(uurluloc(uurl_name(u"/tmp/pip-zej_zi-build/pip/index.pyumkurl_pypi_url�s
u6PackageFinder.find_requirement.<locals>.mkurl_pypi_urliutrustedcsg|]}�|��qS(((u.0uurl(umkurl_pypi_url(u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>�s	u2PackageFinder.find_requirement.<locals>.<listcomp>cSs"g|]}t|dd��qS(utrustedT(uLinkuTrue(u.0uurl((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>�s	cSsg|]}t|��qS((uLink(u.0uurl((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>�s	u#URLs to search for versions for %s:u* %siuS%s uses an insecure transport scheme (%s). Consider using %s if %s has it availableu, uc%s uses an insecure transport scheme (%s). Consider using one of %s if %s has any of them availableu*%s uses an insecure transport scheme (%s).cSs%g|]}t|ddd��qS(u-futrustedT(uLinkuTrue(u.0uurl((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>�s	uAnalyzing links from page %sicSsg|]}t|��qS((uLink(u.0uurl((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>s	udependency_links found: %scSs"g|]\}}}|j�qS((uurl(u.0uparsedulinkuversion((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>s	cSsg|]}t|��qS((uLink(u.0uurl((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>s	u<Could not find any downloads that satisfy the requirement %suMSome externally hosted files were ignored (use --allow-external %s to allow).uWSome insecure and unverifiable files were ignored (use --allow-unverified %s to allow).u$No distributions at all found for %sureverseuLocal files found: %scSs(g|]\}}}t|j��qS((uurl_to_pathuurl(u.0uparsedulinkuversion((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>s	u-Ignoring link %s, version %s doesn't match %su,cSsg|]}dj|��qS(u(ujoin(u.0us((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>"s	uCIgnoring link %s, version %s is a pre-release (use --pre to allow).cSs+g|]!\}}}|tkr|�qS((uINSTALLED_VERSION(u.0uparsed_versionulinkuversion((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>,s	uLExisting installed version (%s) is most up-to-date and satisfies requirementuUExisting installed version (%s) satisfies requirement (most up-to-date version is %s)uNCould not find a version that satisfies the requirement %s (from versions: %s)cSsg|]\}}}|�qS(((u.0uparsed_versionulinkuversion((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>7s	uJSome externally hosted files were ignored (use --allow-external to allow).u,No distributions matching the version for %su=Installed version (%s) is most up-to-date (past versions: %s)cSsg|]\}}}|�qS(((u.0uparsed_versionulinkuversion((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>Fs	unoneu)Using version %s (newest of versions: %s)cSsg|]\}}}|�qS(((u.0uparsed_versionulinkuversion((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>Js	u2%s an externally hosted file and may be unreliableu,%s is potentially insecure and unverifiable.u1.7ua%s discovered using a deprecated method of parsing, in the future it will no longer be discoveredT(6uurl_nameuNoneu
index_urlsuLinkuTrueu	_get_pageu_find_url_nameu
find_linksulistuabsolute_versionsu	posixpathujoinuurlu_sort_locationsudependency_linksuextenduloggerudebuguurlparseustruschemeuINSECURE_SCHEMESulenunetlocuwarnu_package_versionsunameuloweru
_get_pagesuindentulinksuinfoufataluneed_warn_externaluneed_warn_unverifieduDistributionNotFoundusatisfied_byuparsed_versionuINSTALLED_VERSIONuversionusorturequspecsu
is_prereleaseuallow_all_prereleasesuprereleasesuappendu_sort_versionsubooluBestVersionAlreadyInstalleduinternalu
verifiableu_deprecated_regexu
deprecated(uselfurequupgradeumain_index_urlupageu	locationsuversionufile_locationsu
url_locationsu_flocationsu_ulocationsulocationuparsedusecure_schemesuctxufound_versionsu
page_versionsudependency_versionsu
file_versionsuinstalled_versionuall_versionsuapplicable_versionsuparsed_versionulinkuexisting_applicableuselected_version((umkurl_pypi_urluurl_nameu"/tmp/pip-zej_zi-build/pip/index.pyufind_requirement�s�
		7#


			&)	(*	%				!*	-	
			$				:		/
	
		uPackageFinder.find_requirementcCs�|jjd�s$|jd7_n|j||�}|dkrWtjd|�dSt|j�}xY|jD]N}t	j
|jjd��}|t|�krptj
d||f�|SqpWdS(u�Finds the true URL name of a package, when the given name isn't quite correct.
        This is usually used to implement case-insensitivity.u/uCannot fetch index base URL %sNu!Real name of requirement %s is %s(uurluendswithu	_get_pageuNoneuloggerufatalunormalize_nameuurl_nameulinksu	posixpathubasenameupathurstripunotify(uselfu	index_urluurl_nameurequpageu	norm_nameulinkubase((u"/tmp/pip-zej_zi-build/pip/index.pyu_find_url_namebsuPackageFinder._find_url_namec	cs7t|�}t�}x|r2|jd�}||kr?qn|j|�|j||�}|dkrpqn|Vx�|j�D]�}t|j�j	�}||j
kr�|jr�d|_
tjd|�q�n|jdk	r|jr||jkrtjd|�d|_q�n|j|�q�WqWdS(u�
        Yields (page, page_url) from the given locations, skipping
        locations that have errors, and adding download/homepage links
        iu@Not searching %s for files because external urls are disallowed.u_Not searching %s for urls, it is an untrusted link and cannot produce safe or verifiable files.NT(ulistusetupopuaddu	_get_pageuNoneu	rel_linksunormalize_nameunameuloweruallow_externaluallow_all_externaluTrueuneed_warn_externaluloggerudebugutrusteduallow_unverifieduneed_warn_unverifieduappend(	uselfu	locationsurequ
all_locationsuseenulocationupageulinku
normalized((u"/tmp/pip-zej_zi-build/pip/index.pyu
_get_pagesus6		

		
		uPackageFinder._get_pagesu#egg=([^&]*)u([a-z0-9_.]+)-([a-z0-9_.-]+)u-py([123]\.?[0-9]?)$cCsqgg}}t�}xP|D]H}||kr|j|�|jrU|j|�qe|j|�qqW||S(ugReturns elements of links in order, non-egg links first, egg links second, while eliminating duplicates(usetuadduegg_fragmentuappend(uselfulinksueggsuno_eggsuseenulink((u"/tmp/pip-zej_zi-build/pip/index.pyu_sort_links�s
	

	uPackageFinder._sort_linksccs@x9|j|�D](}x|j||�D]}|Vq)WqWdS(N(u_sort_linksu_link_package_versions(uselfulinksusearch_nameulinkuv((u"/tmp/pip-zej_zi-build/pip/index.pyu_package_versions�suPackageFinder._package_versionscCsd}|jr|tfS|S(Nu.tar.gzu.tar.bz2u.taru.tgzu.zip(u.tar.gzu.tar.bz2u.taru.tgzu.zip(u	use_wheelu	wheel_ext(uselfu
extensions((u"/tmp/pip-zej_zi-build/pip/index.pyu_known_extensions�s	uPackageFinder._known_extensionscCst�}d}|jr$|j}nN|j�\}}|ss||jkrotjd|�|jj|�ngS|jd�r�|dd�}d|}n||j	�kr�||jkr�tjd||f�|jj|�ngSd|j
kr@|dkr@||jkr<tjd|�|jj|�ngS|tkrryt|j
�}Wn'tk
r�tjd	|�gSYnX|jj�|j�kr�tjd
||f�gS|j�s�tjd|�gSt|dd�}|jd
�rf|jd�rf|dk	rftj|j�jjd�rf|jdt�sftjd|�gSn|j}n|s�|j|||�}n|dkr�tjd
||f�gS|jdk	r|jrt|�j�|jkr|jrtjd|�d|_gS|j dk	re|j ret|�j�|j!kretjd|�d|_"gS|j#j$|�}	|	r�|d|	j%��}|	j&d�}
|
t'jdd�kr�tjd|�gSntjd||f�t(j)|�||fgS(u�
        Return an iterable of triples (pkg_resources_version_key,
        link, python_version) that can be extracted from the given
        link.

        Meant to be overridden by subclasses, not called by clients.
        uSkipping link %s; not a fileu.tarNiu,Skipping link %s; unknown archive format: %sumacosx10u.zipuSkipping link %s; macosx10 oneu1Skipping %s because the wheel filename is invalidu-Skipping link %s; wrong project name (not %s)u9Skipping %s because it is not compatible with this Pythonu
comes_fromuwinumacosxupypi.python.orgutagsuOSkipping %s because it is a pypi-hosted binary Wheel on an unsupported platformu,Skipping %s because it is externally hosted.u<Skipping %s because it is an insecure and unverifiable file.iiu/Skipping %s because Python version is incorrectuFound link %s, version: %si����T(*uget_platformuNoneuegg_fragmentusplitextulogged_linksuloggerudebuguadduendswithu_known_extensionsupathu	wheel_extuWheelufilenameuInvalidWheelFilenameunameuloweru	supportedugetattru
startswithuurlparseuurlunetlocusupported_tags_noarchuversionu_egg_info_matchesuinternalunormalize_nameuallow_externaluallow_all_externaluTrueuneed_warn_externalu
verifiableuallow_unverifieduneed_warn_unverifiedu_py_version_reusearchustartugroupusysu
pkg_resourcesu
parse_version(uselfulinkusearch_nameuplatformuversionuegg_infouextuwheelu
comes_fromumatchu
py_version((u"/tmp/pip-zej_zi-build/pip/index.pyu_link_package_versions�s�		

		

	
		u$PackageFinder._link_package_versionscCs�|jj|�}|s-tjd|�dS|jd�j�}|jdd�}|j�d}|j|�r�|jd�t	|�d�SdSdS(Nu%Could not parse version from link: %siu_u-(
u_egg_info_reusearchuloggerudebuguNoneugroupulowerureplaceu
startswithulen(uselfuegg_infousearch_nameulinkumatchunameulook_for((u"/tmp/pip-zej_zi-build/pip/index.pyu_egg_info_matches&suPackageFinder._egg_info_matchescCs"tj||d|jd|j�S(Nucacheusession(uHTMLPageuget_pageucacheusession(uselfulinkureq((u"/tmp/pip-zej_zi-build/pip/index.pyu	_get_page5s	uPackageFinder._get_pageNTF(u__name__u
__module__u__qualname__u__doc__uTrueuFalseuNoneu__init__uadd_dependency_linksu_sort_locationsu_link_sort_keyu_sort_versionsufind_requirementu_find_url_nameu
_get_pagesureucompileu_egg_fragment_reuIu_egg_info_reu_py_version_reu_sort_linksu_package_versionsu_known_extensionsu_link_package_versionsu_egg_info_matchesu	_get_page(u
__locals__((u"/tmp/pip-zej_zi-build/pip/index.pyu
PackageFinders(	*(�)
lcBsw|EeZdZdZdZdd�Zdd�Zdd�Zd	d
�Zddd�Z
d
d�Zdd�ZdS(u	PageCacheuCache of HTML pagesicCsi|_i|_i|_dS(N(u	_failuresu_pagesu	_archives(uself((u"/tmp/pip-zej_zi-build/pip/index.pyu__init__As		uPageCache.__init__cCs|jj|d�|jkS(Ni(u	_failuresugetu
failure_limit(uselfuurl((u"/tmp/pip-zej_zi-build/pip/index.pyutoo_many_failuresFsuPageCache.too_many_failurescCs|jj|�S(N(u_pagesuget(uselfuurl((u"/tmp/pip-zej_zi-build/pip/index.pyuget_pageIsuPageCache.get_pagecCs|jj|d�S(NF(u	_archivesugetuFalse(uselfuurl((u"/tmp/pip-zej_zi-build/pip/index.pyu
is_archiveLsuPageCache.is_archivecCs||j|<dS(N(u	_archives(uselfuurluvalue((u"/tmp/pip-zej_zi-build/pip/index.pyuset_is_archiveOsuPageCache.set_is_archivecCs$|jj|d�||j|<dS(Ni(u	_failuresuget(uselfuurlulevel((u"/tmp/pip-zej_zi-build/pip/index.pyuadd_page_failureRsuPageCache.add_page_failurecCs"x|D]}||j|<qWdS(N(u_pages(uselfuurlsupageuurl((u"/tmp/pip-zej_zi-build/pip/index.pyuadd_pageUs
uPageCache.add_pageNT(
u__name__u
__module__u__qualname__u__doc__u
failure_limitu__init__utoo_many_failuresuget_pageu
is_archiveuTrueuset_is_archiveuadd_page_failureuadd_page(u
__locals__((u"/tmp/pip-zej_zi-build/pip/index.pyu	PageCache<su	PageCachecBsG|EeZdZdZejdej�Zejdej�Zejdejej	B�Z
d!d!dd�Zdd�Z
ed!d"d!d	d
��Zed!dd!dd
��Zed!dd��Zedd��Zedd��Zedd��Zdd�Zd#dd�Zdd�Zejdej�Zdd �Zd!S($uHTMLPageu'Represents one page, along with its URLu<th>\s*home\s*pageu<th>\s*download\s+urlu(href=(?:"([^"]*)"|'([^']*)'|([^>\s\n]*))cCsC||_tj|jdd�|_||_||_||_dS(NunamespaceHTMLElementsF(ucontentuhtml5libuparseuFalseuparseduurluheadersutrusted(uselfucontentuurluheadersutrusted((u"/tmp/pip-zej_zi-build/pip/index.pyu__init__bs
			uHTMLPage.__init__cCs|jS(N(uurl(uself((u"/tmp/pip-zej_zi-build/pip/index.pyu__str__isuHTMLPage.__str__cCs\|dkrt�}n|j}|jdd�d}|j|�rJdSddlm}xT|jD]I}|j�j	|�rd|t
|�dkrdtjdt
��dSqdW|dk	r�|j|�}	|	dk	r�|	Sny|r�|dk	r
|j|�r
dSn|j}
x�ddd	d
dgD]}}|
j|�r)|j|d|�}|j�j	d
�rlPq�tjd||f�|dk	r�|j|�ndSq)q)Wntjd|�tj|�\}}
}}}}|dkrEtjjt|��rE|jd�s|d7}ntj|d�}tjd|�n|j|did
d6�}|j�|jjdd�}|j�j	d
�s�tjd||f�|dk	r�|j|�ndS||j|j|jd|j�}	Wn8tj k
r[}zE|j!j"dkr!dnd}|j#||||d|d|�WYdd}~Xn�tj$k
r�}z%|j#||d||d|�WYdd}~Xn�tj%k
r�|j#||d|d|�Yn�t&k
r+}z:d|}|j#||||d|ddd tj'�WYdd}~Xn-X|dk	rT|j(||jg|	�n|	SdS(!Nu#ii(u
VcsSupportu+:u&Cannot look at %(scheme)s URL %(link)su.taru.tar.gzu.tar.bz2u.tgzu.zipusessionu	text/htmlu,Skipping page %s because of Content-Type: %suGetting page %sufileu/u
index.htmlu# file: URL is directory, getting %suheadersuAcceptuContent-Typeuunknownutrustedi�iucacheuleveluconnection error: %su	timed outu6There was a problem confirming the ssl certificate: %sumeth()uNoneu
PipSessionuurlusplitutoo_many_failuresupip.vcsu
VcsSupportuschemesuloweru
startswithulenuloggerudebugulocalsuget_pageu
is_archiveufilenameuendswithu_get_content_typeuset_is_archiveuurlparseuosupathuisdiruurl2pathnameuurljoinugeturaise_for_statusuheadersutextutrustedurequestsu	HTTPErroruresponseustatus_codeu_handle_failuConnectionErroruTimeoutuSSLErrorunotifyuadd_page(uclsulinkurequcacheu
skip_archivesusessionuurlu
VcsSupportuschemeuinstufilenameubad_extucontent_typeunetlocupathuparamsuqueryufragmenturespuexculevelureason((u"/tmp/pip-zej_zi-build/pip/index.pyuget_pagels�	+		!$

		(4 uHTMLPage.get_pageicCsb|dkrtj}n|d||�|d|j|f�|dk	r^|j||�ndS(NuCould not fetch URL %s: %su7Will skip URL %s when looking for download links for %s(uNoneuloggeruinfouurluadd_page_failure(urequlinkureasonuurlucacheulevelumeth((u"/tmp/pip-zej_zi-build/pip/index.pyu_handle_fail�suHTMLPage._handle_failcCsx|dkrt�}ntj|�\}}}}}|d	krFdS|j|dd
�}|j�|jjdd�S(u;Get the Content-Type of the given url, using a HEAD requestuhttpuhttpsuftpuftpsuuallow_redirectsuContent-TypeN(uhttpuhttpsuftpuftpsT(	uNoneu
PipSessionuurlparseuurlsplituheaduTrueuraise_for_statusuheadersuget(uurlusessionuschemeunetlocupathuqueryufragmenturesp((u"/tmp/pip-zej_zi-build/pip/index.pyu_get_content_type�s
uHTMLPage._get_content_typecCs�t|d�s�d}dd�|jjd�D�}|r~y t|djdd��}Wq~ttfk
rzd}Yq~Xn||_n|jS(Nu_api_versioncSs4g|]*}|jdd�j�dkr|�qS(unameuuapi-version(ugetulower(u.0ux((u"/tmp/pip-zej_zi-build/pip/index.pyu
<listcomp>�s	u(HTMLPage.api_version.<locals>.<listcomp>u.//metaiuvalue(	uhasattruNoneuparsedufindalluintugetu	TypeErroru
ValueErroru_api_version(uselfu_api_versionumetas((u"/tmp/pip-zej_zi-build/pip/index.pyuapi_version�s uHTMLPage.api_versioncCsgt|d�s`|jjd�}|dk	rQ|jd�rQ|jd�|_q`|j|_n|jS(Nu	_base_urlu.//baseuhref(uhasattruparsedufinduNoneugetu	_base_urluurl(uselfubase((u"/tmp/pip-zej_zi-build/pip/index.pyubase_url�suHTMLPage.base_urlccs�x�|jjd�D]�}|jd�r|jd�}|jtj|j|��}d}|jr�|jdkr�t	|jd�o�d|jd�j
�k�}nt||d|�VqqWdS(uYields all links in the pageu.//auhrefiureluinternalN(uparsedufindallugetu
clean_linkuurlparseuurljoinubase_urluNoneuapi_versionuboolusplituLink(uselfuanchoruhrefuurluinternal((u"/tmp/pip-zej_zi-build/pip/index.pyulinks�s!uHTMLPage.linksccs<x|j�D]}|Vq
Wx|j�D]}|Vq)WdS(N(uexplicit_rel_linksuscraped_rel_links(uselfuurl((u"/tmp/pip-zej_zi-build/pip/index.pyu	rel_linkss	uHTMLPage.rel_linksuhomepageudownloadccs�t|�}x�|jjd�D]�}|jd�r|jd�rt|jd�j��}||@r�|jd�}|jtj|j|��}t	||dd�Vq�qqWdS(u)Yields all links with the given relationsu.//aureluhrefutrustedNF(usetuparsedufindallugetusplitu
clean_linkuurlparseuurljoinubase_urluLinkuFalse(uselfurelsuanchoru
found_relsuhrefuurl((u"/tmp/pip-zej_zi-build/pip/index.pyuexplicit_rel_linkss
uHTMLPage.explicit_rel_linksc
cs�x�|j|jfD]�}|j|j�}|s7qn|jj|jd|j��}|sdqn|jd�p�|jd�p�|jd�}|s�qn|jtj	|j
|��}t||dddd�VqWdS(	Nuposiiiutrustedu_deprecated_regexFT(u_homepage_reu_download_reusearchucontentu_href_reuendugroupu
clean_linkuurlparseuurljoinubase_urluLinkuFalseuTrue(uselfuregexumatchu
href_matchuurl((u"/tmp/pip-zej_zi-build/pip/index.pyuscraped_rel_links&s!-uHTMLPage.scraped_rel_linksu[^a-z0-9$&+,/:;=?@.#%_\\|-]cCs|jjdd�|�S(u�Makes sure a link is fully encoded.  That is, if a ' ' shows up in
        the link, it will be rewritten to %20 (while not over-quoting
        % or other characters).cSsdt|jd��S(Nu%%%2xi(uordugroup(umatch((u"/tmp/pip-zej_zi-build/pip/index.pyu<lambda><su%HTMLPage.clean_link.<locals>.<lambda>(u	_clean_reusub(uselfuurl((u"/tmp/pip-zej_zi-build/pip/index.pyu
clean_link7s	uHTMLPage.clean_linkNT(uhomepageudownload(u__name__u
__module__u__qualname__u__doc__ureucompileuIu_homepage_reu_download_reuSu_href_reuNoneu__init__u__str__uclassmethoduTrueuget_pageustaticmethodu_handle_failu_get_content_typeupropertyuapi_versionubase_urlulinksu	rel_linksuexplicit_rel_linksuscraped_rel_linksu	_clean_reu
clean_link(u
__locals__((u"/tmp/pip-zej_zi-build/pip/index.pyuHTMLPageZs([
uHTMLPagecBsv|EeZdZd-d-d-d.dd�Zdd�Zdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zedd��Zedd��Zedd��Zdd�Zedd��Zedd ��Zejd!�Zed"d#��Zejd$�Zed%d&��Zed'd(��Zed)d*��Zed+d,��Zd-S(/uLinkcCs1||_||_||_||_||_dS(N(uurlu
comes_fromuinternalutrustedu_deprecated_regex(uselfuurlu
comes_fromuinternalutrustedu_deprecated_regex((u"/tmp/pip-zej_zi-build/pip/index.pyu__init__As
				u
Link.__init__cCs.|jrd|j|jfSt|j�SdS(Nu%s (from %s)(u
comes_fromuurlustr(uself((u"/tmp/pip-zej_zi-build/pip/index.pyu__str__Is	uLink.__str__cCsd|S(Nu	<Link %s>((uself((u"/tmp/pip-zej_zi-build/pip/index.pyu__repr__Osu
Link.__repr__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-zej_zi-build/pip/index.pyu__eq__RsuLink.__eq__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-zej_zi-build/pip/index.pyu__ne__UsuLink.__ne__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-zej_zi-build/pip/index.pyu__lt__XsuLink.__lt__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-zej_zi-build/pip/index.pyu__le__[suLink.__le__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-zej_zi-build/pip/index.pyu__gt__^suLink.__gt__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-zej_zi-build/pip/index.pyu__ge__asuLink.__ge__cCs
t|j�S(N(uhashuurl(uself((u"/tmp/pip-zej_zi-build/pip/index.pyu__hash__dsu
Link.__hash__cCs\tj|j�\}}}}}tj|jd��p<|}|sXtd|j��|S(Nu/uURL %r produced no filename(uurlparseuurlsplituurlu	posixpathubasenameurstripuAssertionError(uselfu_unetlocupathuname((u"/tmp/pip-zej_zi-build/pip/index.pyufilenamegs!u
Link.filenamecCstj|j�dS(Ni(uurlparseuurlsplituurl(uself((u"/tmp/pip-zej_zi-build/pip/index.pyuschemensuLink.schemecCstj|j�dS(Ni(uurlparseuurlsplituurl(uself((u"/tmp/pip-zej_zi-build/pip/index.pyupathrsu	Link.pathcCsttj|jjd���S(Nu/(usplitextu	posixpathubasenameupathurstrip(uself((u"/tmp/pip-zej_zi-build/pip/index.pyusplitextvsu
Link.splitextcCs|j�dS(Ni(usplitext(uself((u"/tmp/pip-zej_zi-build/pip/index.pyuextysuLink.extcCs=tj|j�\}}}}}tj||||df�S(N(uurlparseuurlsplituurlu
urlunsplituNone(uselfuschemeunetlocupathuqueryufragment((u"/tmp/pip-zej_zi-build/pip/index.pyuurl_without_fragment}s!uLink.url_without_fragmentu#egg=([^&]*)cCs,|jj|j�}|sdS|jd�S(Ni(u_egg_fragment_reusearchuurluNoneugroup(uselfumatch((u"/tmp/pip-zej_zi-build/pip/index.pyuegg_fragment�suLink.egg_fragmentu2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)cCs,|jj|j�}|r(|jd�SdS(Ni(u_hash_reusearchuurlugroupuNone(uselfumatch((u"/tmp/pip-zej_zi-build/pip/index.pyuhash�s
u	Link.hashcCs,|jj|j�}|r(|jd�SdS(Ni(u_hash_reusearchuurlugroupuNone(uselfumatch((u"/tmp/pip-zej_zi-build/pip/index.pyu	hash_name�s
uLink.hash_namecCs0tj|jjdd�djdd�d�S(Nu#iiu?(u	posixpathubasenameuurlusplit(uself((u"/tmp/pip-zej_zi-build/pip/index.pyushow_url�su
Link.show_urlcCs�|jpt|jdd�}|dk	r�|r�y%t|jdd�}t|�}Wnttfk
rud}YnX|dks�|dkr�dS|jr�dSdSn|dk	r�dSdS(u�
        Returns True if this link can be verified after download, False if it
        cannot, and None if we cannot determine.
        utrusteduapi_versioniNTF(
utrustedugetattru
comes_fromuNoneuintu
ValueErroru	TypeErroruhashuTrueuFalse(uselfutrusteduapi_version((u"/tmp/pip-zej_zi-build/pip/index.pyu
verifiable�s	uLink.verifiableNF(u__name__u
__module__u__qualname__uNoneuFalseu__init__u__str__u__repr__u__eq__u__ne__u__lt__u__le__u__gt__u__ge__u__hash__upropertyufilenameuschemeupathusplitextuextuurl_without_fragmentureucompileu_egg_fragment_reuegg_fragmentu_hash_reuhashu	hash_nameushow_urlu
verifiable(u
__locals__((u"/tmp/pip-zej_zi-build/pip/index.pyuLink?s0	uLinkcCs;t|�}|j}|s1t|j�d}nt|�S(uPGet a requirement from the URL, if possible.  This looks for #egg
    in the URLi(uLinkuegg_fragmentusplitextufilenameupackage_to_requirement(uurlulinkuegg_info((u"/tmp/pip-zej_zi-build/pip/index.pyuget_requirement_from_url�s
	uget_requirement_from_urlcCsatjd|�}|r9|jd�}|jd�}n|}d}|rYd||fS|SdS(u)Translate a name like Foo-1.2 to Foo==1.3u^(.*?)-(dev|\d.*)iiuu%s==%sN(ureusearchugroup(upackage_nameumatchunameuversion((u"/tmp/pip-zej_zi-build/pip/index.pyupackage_to_requirement�supackage_to_requirement(2u__doc__usysuosureu	mimetypesu	posixpathupip.loguloggerupip.utiluInfunormalize_nameusplitextu
is_prereleaseupip.exceptionsuDistributionNotFounduBestVersionAlreadyInstalleduInstallationErroruInvalidWheelFilenameuUnsupportedWheelupip.backwardcompatuurlparseuurl2pathnameupip.downloadu
PipSessionuurl_to_pathupath_to_urlu	pip.wheeluWheelu	wheel_extupip.pep425tagsusupported_tagsusupported_tags_noarchuget_platformupip._vendoruhtml5liburequestsu
pkg_resourcesupip._vendor.requests.exceptionsuSSLErroru__all__uDEFAULT_MIRROR_HOSTNAMEuINSECURE_SCHEMESuobjectu
PackageFinderu	PageCacheuHTMLPageuLinkuINSTALLED_VERSIONuget_requirement_from_urlupackage_to_requirement(((u"/tmp/pip-zej_zi-build/pip/index.pyu<module>s6"(	
����
python3.3/site-packages/pip/__pycache__/basecommand.cpython-33.pyc000064400000016074151733566750020757 0ustar00�
7�Re�c@sUdZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZmZmZmZmZddlmZdd	lmZmZdd
lmZmZmZmZmZddl m!Z!dgZ"Gd
d�de#�Z$ddd�Z&ddd�Z'dS(u(Base Command class, and related routinesiN(u
cmdoptions(urunning_under_virtualenv(ulogger(u
PipSession(u
BadCommanduInstallationErroruUninstallationErroruCommandErroruPreviousBuildDirError(uStringIO(uConfigOptionParseruUpdatingDefaultsHelpFormatter(uSUCCESSuERRORu
UNKNOWN_ERRORuVIRTUALENV_NOT_FOUNDuPREVIOUS_BUILD_DIR_ERROR(uget_proguCommandcBsb|EeZdZdZdZdZdd�Zdd�Z	dd�Z
dd�Zd	d
�ZdS(
uCommandcCs�i|jd6dt�|jfd6t�d6d	d6|jd6|jd6}t|�|_d|jj�}t	j
|j|�|_tj
tj|j�}|jj|�dS(
Nuusageu%s %suprogu	formatteruadd_help_optionunameudescriptionu
%s OptionsF(uusageuget_progunameuUpdatingDefaultsHelpFormatteruFalseu__doc__uConfigOptionParseruparseru
capitalizeuoptparseuOptionGroupucmd_optsu
cmdoptionsumake_option_groupu
general_groupuadd_option_group(uselfu	parser_kwu
optgroup_nameugen_opts((u(/tmp/pip-zej_zi-build/pip/basecommand.pyu__init__s



uCommand.__init__cCsvt�}|jr!|j|_n|jr9|j|_n|jrbi|jd6|jd6|_n|j|j_|S(Nuhttpuhttps(	u
PipSessionucertuverifyutimeoutuproxyuproxiesuno_inputuauthu	prompting(uselfuoptionsusession((u(/tmp/pip-zej_zi-build/pip/basecommand.pyu_build_session3s				
uCommand._build_sessioncCsdS(N((uself((u(/tmp/pip-zej_zi-build/pip/basecommand.pyu
setup_loggingJsuCommand.setup_loggingcCs|jj|�S(N(uparseru
parse_args(uselfuargs((u(/tmp/pip-zej_zi-build/pip/basecommand.pyu
parse_argsMsuCommand.parse_argscCs�|j|�\}}d}||j7}||j8}tjd|�}g}tj|tjftj|j	f�|j
r�dt_n|j
�|jr�dtjd<n|jr�dj|j�tjd<n|jrt�stjd�tjt�qn|jr6t|jd�}tjtj|f�nd}t}d}y.|j||�}t|t�ru|}nWn�t k
r�tj!�d}	tjt"|	��tj#d	t$��d}t%}Yn`t&t'fk
r'tj!�d}	tjt"|	��tj#d	t$��d}t(}Ynt)k
r{tj!�d}	tjt"|	��tj#d	t$��d}t(}Yn�t*k
r�tj!�d}	tjd
|	�tj#d	t$��t(}Ynft+k
rtjd�tj#d	t$��d}t(}Yn(tjdt$��d}t,}YnX|r�|j-}
d
j|�}yt|
d�}Wn<t.k
r�t/j0dd�}
|
j1}
t|
d�}YnXtjd|
�|j2|�|j3�n|dk	r�|j3�n|S(Niiu1uPIP_NO_INPUTu uPIP_EXISTS_ACTIONu2Could not find an activated virtualenv (required).uauException information:
%su	ERROR: %suOperation cancelled by useru
Exception:
%su
uwudeleteu#Storing debug log for failure in %sTF(4u
parse_argsuverboseuquietuloggerulevel_for_integeru
add_consumersusysustdoutuDEBUGuappendulog_explicit_levelsuTrueuexplicit_levelsu
setup_logginguno_inputuosuenvironu
exists_actionujoinurequire_venvurunning_under_virtualenvufataluexituVIRTUALENV_NOT_FOUNDuloguopen_logfileuNoneuSUCCESSuFalseurunu
isinstanceuintuPreviousBuildDirErroruexc_infoustruinfou
format_excuPREVIOUS_BUILD_DIR_ERRORuInstallationErroruUninstallationErroruERRORu
BadCommanduCommandErroruKeyboardInterruptu
UNKNOWN_ERRORulog_fileuIOErrorutempfileuNamedTemporaryFileunameuwriteuclose(uselfuargsuoptionsulevelucomplete_logulog_fpuexitu	store_logustatusueulog_file_fnutextulog_file_fputemp((u(/tmp/pip-zej_zi-build/pip/basecommand.pyumainQs�

	
				
	










	
	


uCommand.mainNF(
u__name__u
__module__u__qualname__uNoneunameuusageuFalseuhiddenu__init__u_build_sessionu
setup_loggingu
parse_argsumain(u
__locals__((u(/tmp/pip-zej_zi-build/pip/basecommand.pyuCommandscCsG|dkrtj�}nt�}tj|td|��|j�S(Nufile(uNoneusysuexc_infouStringIOu	tracebackuprint_exceptionudictugetvalue(uexc_infouout((u(/tmp/pip-zej_zi-build/pip/basecommand.pyu
format_exc�s
	u
format_excuacCs�tjj|�}tjj|�}tjj|�}tjj|�sXtj|�ntjj|�}t||�}|r�|jddd�|jdt	j
dtjd�f�n|S(u�Open the named log file in append mode.

    If the file already exists, a separator will also be printed to
    the file to separate past activity from current activity.
    u%s
u-i<u
%s run on %s
iu%c(
uosupathu
expanduseruabspathudirnameuexistsumakedirsuopenuwriteusysuargvutimeustrftime(ufilenameumodeudirnameuexistsulog_fp((u(/tmp/pip-zej_zi-build/pip/basecommand.pyuopen_logfile�s*uopen_logfile((u__doc__uosusysutempfileu	tracebackutimeuoptparseupipu
cmdoptionsu
pip.locationsurunning_under_virtualenvupip.loguloggerupip.downloadu
PipSessionupip.exceptionsu
BadCommanduInstallationErroruUninstallationErroruCommandErroruPreviousBuildDirErrorupip.backwardcompatuStringIOupip.baseparseruConfigOptionParseruUpdatingDefaultsHelpFormatterupip.status_codesuSUCCESSuERRORu
UNKNOWN_ERRORuVIRTUALENV_NOT_FOUNDuPREVIOUS_BUILD_DIR_ERRORupip.utiluget_progu__all__uobjectuCommanduNoneu
format_excuopen_logfile(((u(/tmp/pip-zej_zi-build/pip/basecommand.pyu<module>s&((	�python3.3/site-packages/pip/__pycache__/__main__.cpython-33.pyc000064400000000455151733566750020222 0ustar00�
7�Retc@sNddlZddlmZedkrJe�ZerJeje�qJndS(iNi(urunu__main__(usysurunnerurunu__name__uexit(((u%/tmp/pip-zej_zi-build/pip/__main__.pyu<module>s
	python3.3/site-packages/pip/__main__.py000064400000000164151733566750013736 0ustar00import sys
from .runner import run

if __name__ == '__main__':
    exit = run()
    if exit:
        sys.exit(exit)
python3.3/site-packages/pip/backwardcompat/__pycache__/__init__.cpython-33.pyc000064400000013501151733566750023217 0ustar00�
7�Re�c@s=dZddlZddlZddlZddlZdgZeed�ZGdd�de�Z	y
e
Z
Wnek
r�e	Z
YnXy
eZWnek
r�e	ZYnXej
jZejd$kr�ddlmZmZdd	lmZdd
lmZmZddlmZmZddlmZmZmZdd
l m!Z"ddl#j$Z%ddlj&Z'ddl(Z)ddl*j+Z,ddl#j$Z-ddl.j+Z/dd�Z0dd�Z1dd�Z2dd�Z3dd�Z4e5Z5e6fZ7e8Z9nddl:mZdd
l'mZmZddlmZmZddl%mZmZmZddl m;Z"ddl%Z%ddl'Z'ddl-Z-ddl)Z)ddl,Z,ddl/Z/dd�Z1dd�Z2dd�Z3dd�Z4e6Z5e<fZ7eZe0Z0e9Z9eZddl=m>Z>m?Z?e@edd�ZBd d!�ZCd"d#�ZDdS(%uKStuff that differs in different Python versions and platform
distributions.iNuWindowsErrorucache_from_sourcecBs|EeZdZdZdS(uNeverUsedExceptionu%this exception should never be raisedN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuNeverUsedException
suNeverUsedExceptioni(uStringIOuBytesIO(ureduce(uURLErroru	HTTPError(uQueueuEmpty(uurl2pathnameuurlretrieveupathname2url(umessagecCs||k||kS(N((uaub((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyucmp+sucmpcCs
|jd�S(Nuutf-8(uencode(us((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyub.subcCs
|jd�S(Nuutf-8(udecode(us((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuu1suucCs7y|jt�SWntk
r2|jd�SYnXdS(Nuutf_8(udecodeuconsole_encodinguUnicodeDecodeError(us((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuconsole_to_str4s
uconsole_to_strcCs|j||�S(N(u	get_param(uhttp_messageuparamu
default_value((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuget_http_message_param:suget_http_message_param(uStringIO(uMessagecCs|S(N((us((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyubMscCs|S(N((us((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuuPscCs|S(N((us((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuconsole_to_strSscCs|j|�}|p|S(N(ugetparam(uhttp_messageuparamu
default_valueuresult((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuget_http_message_paramVs(uget_python_libuget_python_versionu	USER_SITEc/sxttt|��|jdd�}gg}x'|D]��fdd�|D�}q5Wx|D]}t|�Vq_WdS(Nurepeatics*g|] }�D]}||g�qqS(((u.0uxuy(upool(u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyu
<listcomp>ns	uproduct.<locals>.<listcomp>(ulistumaputupleuget(uargsukwdsupoolsuresultuprod((upoolu4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuproducths%	

uproductcCs�ttd�rMtj|tjtjB�}tj|�j}tj|�n7tjj	|�sttj
|�j}ntd|��|S(u)
    Return path's uid.

    Does not follow symlinks: https://github.com/pypa/pip/pull/935#discussion_r5307003

    Placed this function in backwardcompat due to differences on AIX and Jython,
    that should eventually go away.

    :raises OSError: When path is a symlink or can't be read.
    u
O_NOFOLLOWu1%s is a symlink; Will not return uid for symlinks(uhasattruosuopenuO_RDONLYu
O_NOFOLLOWufstatust_uiducloseupathuislinkustatuOSError(upathufdufile_uid((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyuget_path_uidssuget_path_uid(i(Eu__doc__uosuimpusysusiteu__all__uhasattruuses_pycacheu	ExceptionuNeverUsedExceptionuWindowsErroru	NameErroruPermissionErroru
__stdout__uencodinguconsole_encodinguversion_infouiouStringIOuBytesIOu	functoolsureduceuurllib.erroruURLErroru	HTTPErroruqueueuQueueuEmptyuurllib.requestuurl2pathnameuurlretrieveupathname2urluemailumessageuemailmessageuurllib.parseuparseuurlliburequestuurllib2uconfigparseruConfigParseru
xmlrpc.clientuclientu	xmlrpclibuurlparseuhttp.clientuhttplibucmpubuuuconsole_to_struget_http_message_paramubytesustrustring_typesuinputu	raw_inputu	cStringIOuMessageu
basestringudistutils.sysconfiguget_python_libuget_python_versionugetattruNoneu	user_siteuproductuget_path_uid(((u4/tmp/pip-zej_zi-build/pip/backwardcompat/__init__.pyu<module>s|	



			python3.3/site-packages/pip/backwardcompat/__init__.py000064400000007254151733566750016746 0ustar00"""Stuff that differs in different Python versions and platform
distributions."""

import os
import imp
import sys
import site

__all__ = ['WindowsError']

uses_pycache = hasattr(imp, 'cache_from_source')

class NeverUsedException(Exception):
    """this exception should never be raised"""

try:
    WindowsError = WindowsError
except NameError:
    WindowsError = NeverUsedException

try:
    #new in Python 3.3
    PermissionError = PermissionError
except NameError:
    PermissionError = NeverUsedException

console_encoding = sys.__stdout__.encoding

if sys.version_info >= (3,):
    from io import StringIO, BytesIO
    from functools import reduce
    from urllib.error import URLError, HTTPError
    from queue import Queue, Empty
    from urllib.request import url2pathname, urlretrieve, pathname2url
    from email import message as emailmessage
    import urllib.parse as urllib
    import urllib.request as urllib2
    import configparser as ConfigParser
    import xmlrpc.client as xmlrpclib
    import urllib.parse as urlparse
    import http.client as httplib

    def cmp(a, b):
        return (a > b) - (a < b)

    def b(s):
        return s.encode('utf-8')

    def u(s):
        return s.decode('utf-8')

    def console_to_str(s):
        try:
            return s.decode(console_encoding)
        except UnicodeDecodeError:
            return s.decode('utf_8')

    def get_http_message_param(http_message, param, default_value):
        return http_message.get_param(param, default_value)

    bytes = bytes
    string_types = (str,)
    raw_input = input
else:
    from cStringIO import StringIO
    from urllib2 import URLError, HTTPError
    from Queue import Queue, Empty
    from urllib import url2pathname, urlretrieve, pathname2url
    from email import Message as emailmessage
    import urllib
    import urllib2
    import urlparse
    import ConfigParser
    import xmlrpclib
    import httplib

    def b(s):
        return s

    def u(s):
        return s

    def console_to_str(s):
        return s

    def get_http_message_param(http_message, param, default_value):
        result = http_message.getparam(param)
        return result or default_value

    bytes = str
    string_types = (basestring,)
    reduce = reduce
    cmp = cmp
    raw_input = raw_input
    BytesIO = StringIO


from distutils.sysconfig import get_python_lib, get_python_version

#site.USER_SITE was created in py2.6
user_site = getattr(site, 'USER_SITE', None)


def product(*args, **kwds):
    # product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy
    # product(range(2), repeat=3) --> 000 001 010 011 100 101 110 111
    pools = list(map(tuple, args)) * kwds.get('repeat', 1)
    result = [[]]
    for pool in pools:
        result = [x + [y] for x in result for y in pool]
    for prod in result:
        yield tuple(prod)


def get_path_uid(path):
    """
    Return path's uid.

    Does not follow symlinks: https://github.com/pypa/pip/pull/935#discussion_r5307003

    Placed this function in backwardcompat due to differences on AIX and Jython,
    that should eventually go away.

    :raises OSError: When path is a symlink or can't be read.
    """
    if hasattr(os, 'O_NOFOLLOW'):
        fd = os.open(path, os.O_RDONLY | os.O_NOFOLLOW)
        file_uid = os.fstat(fd).st_uid
        os.close(fd)
    else:  # AIX and Jython
        # WARNING: time of check vulnerabity, but best we can do w/o NOFOLLOW
        if not os.path.islink(path):
            # older versions of Jython don't have `os.fstat`
            file_uid = os.stat(path).st_uid
        else:
            # raise OSError for parity with os.O_NOFOLLOW above
            raise OSError("%s is a symlink; Will not return uid for symlinks" % path)
    return file_uid
python3.3/site-packages/pip/runner.py000064400000000657151733566750013536 0ustar00import sys
import os


def run():
    base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    ## FIXME: this is kind of crude; if we could create a fake pip
    ## module, then exec into it and update pip.__path__ properly, we
    ## wouldn't have to update sys.path:
    sys.path.insert(0, base)
    import pip
    return pip.main()


if __name__ == '__main__':
    exit = run()
    if exit:
        sys.exit(exit)
python3.3/site-packages/pip/status_codes.py000064400000000164151733566750014716 0ustar00SUCCESS = 0
ERROR = 1
UNKNOWN_ERROR = 2
VIRTUALENV_NOT_FOUND = 3
PREVIOUS_BUILD_DIR_ERROR = 4
NO_MATCHES_FOUND = 23
python3.3/site-packages/pip/req.py000064400000243451151733566750013015 0ustar00from email.parser import FeedParser
import os
import imp
import locale
import re
import sys
import shutil
import tempfile
import textwrap
import zipfile

from distutils.util import change_root
from pip.locations import (bin_py, running_under_virtualenv,PIP_DELETE_MARKER_FILENAME,
                           write_delete_marker_file, bin_user)
from pip.exceptions import (InstallationError, UninstallationError, UnsupportedWheel,
                            BestVersionAlreadyInstalled, InvalidWheelFilename,
                            DistributionNotFound, PreviousBuildDirError)
from pip.vcs import vcs
from pip.log import logger
from pip.util import (display_path, rmtree, ask, ask_path_exists, backup_dir,
                      is_installable_dir, is_local, dist_is_local,
                      dist_in_usersite, dist_in_site_packages, renames,
                      normalize_path, egg_link_path, make_path_relative,
                      call_subprocess, is_prerelease, normalize_name)
from pip.backwardcompat import (urlparse, urllib, uses_pycache,
                                ConfigParser, string_types, HTTPError,
                                get_python_version, b)
from pip.index import Link
from pip.locations import build_prefix
from pip.download import (PipSession, get_file_content, is_url, url_to_path,
                          path_to_url, is_archive_file,
                          unpack_vcs_link, is_vcs_url, is_file_url,
                          unpack_file_url, unpack_http_url)
import pip.wheel
from pip.wheel import move_wheel_files, Wheel, wheel_ext
from pip._vendor import pkg_resources, six


def read_text_file(filename):
    """Return the contents of *filename*.

    Try to decode the file contents with utf-8, the preffered system encoding
    (e.g., cp1252 on some Windows machines) and latin1, in that order. Decoding
    a byte string with latin1 will never raise an error. In the worst case, the
    returned string will contain some garbage characters.

    """
    with open(filename, 'rb') as fp:
        data = fp.read()

    encodings = ['utf-8', locale.getpreferredencoding(False), 'latin1']
    for enc in encodings:
        try:
            data = data.decode(enc)
        except UnicodeDecodeError:
            continue
        break

    assert type(data) != bytes  # Latin1 should have worked.
    return data


class InstallRequirement(object):

    def __init__(self, req, comes_from, source_dir=None, editable=False,
                 url=None, as_egg=False, update=True, prereleases=None,
                 editable_options=None, from_bundle=False, pycompile=True):
        self.extras = ()
        if isinstance(req, string_types):
            req = pkg_resources.Requirement.parse(req)
            self.extras = req.extras
        self.req = req
        self.comes_from = comes_from
        self.source_dir = source_dir
        self.editable = editable

        if editable_options is None:
            editable_options = {}

        self.editable_options = editable_options
        self.url = url
        self.as_egg = as_egg
        self._egg_info_path = None
        # This holds the pkg_resources.Distribution object if this requirement
        # is already available:
        self.satisfied_by = None
        # This hold the pkg_resources.Distribution object if this requirement
        # conflicts with another installed distribution:
        self.conflicts_with = None
        self._temp_build_dir = None
        self._is_bundle = None
        # True if the editable should be updated:
        self.update = update
        # Set to True after successful installation
        self.install_succeeded = None
        # UninstallPathSet of uninstalled distribution (for possible rollback)
        self.uninstalled = None
        self.use_user_site = False
        self.target_dir = None
        self.from_bundle = from_bundle

        self.pycompile = pycompile

        # True if pre-releases are acceptable
        if prereleases:
            self.prereleases = True
        elif self.req is not None:
            self.prereleases = any([is_prerelease(x[1]) and x[0] != "!=" for x in self.req.specs])
        else:
            self.prereleases = False

    @classmethod
    def from_editable(cls, editable_req, comes_from=None, default_vcs=None):
        name, url, extras_override = parse_editable(editable_req, default_vcs)
        if url.startswith('file:'):
            source_dir = url_to_path(url)
        else:
            source_dir = None

        res = cls(name, comes_from, source_dir=source_dir,
                  editable=True,
                  url=url,
                  editable_options=extras_override,
                  prereleases=True)

        if extras_override is not None:
            res.extras = extras_override

        return res

    @classmethod
    def from_line(cls, name, comes_from=None, prereleases=None):
        """Creates an InstallRequirement from a name, which might be a
        requirement, directory containing 'setup.py', filename, or URL.
        """
        url = None
        name = name.strip()
        req = None
        path = os.path.normpath(os.path.abspath(name))
        link = None

        if is_url(name):
            link = Link(name)
        elif os.path.isdir(path) and (os.path.sep in name or name.startswith('.')):
            if not is_installable_dir(path):
                raise InstallationError("Directory %r is not installable. File 'setup.py' not found." % name)
            link = Link(path_to_url(name))
        elif is_archive_file(path):
            if not os.path.isfile(path):
                logger.warn('Requirement %r looks like a filename, but the file does not exist', name)
            link = Link(path_to_url(name))

        # If the line has an egg= definition, but isn't editable, pull the requirement out.
        # Otherwise, assume the name is the req for the non URL/path/archive case.
        if link and req is None:
            url = link.url_without_fragment
            req = link.egg_fragment  #when fragment is None, this will become an 'unnamed' requirement

            # Handle relative file URLs
            if link.scheme == 'file' and re.search(r'\.\./', url):
                url = path_to_url(os.path.normpath(os.path.abspath(link.path)))

            # fail early for invalid or unsupported wheels
            if link.ext == wheel_ext:
                wheel = Wheel(link.filename) # can raise InvalidWheelFilename
                if not wheel.supported():
                    raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)

        else:
            req = name

        return cls(req, comes_from, url=url, prereleases=prereleases)

    def __str__(self):
        if self.req:
            s = str(self.req)
            if self.url:
                s += ' from %s' % self.url
        else:
            s = self.url
        if self.satisfied_by is not None:
            s += ' in %s' % display_path(self.satisfied_by.location)
        if self.comes_from:
            if isinstance(self.comes_from, string_types):
                comes_from = self.comes_from
            else:
                comes_from = self.comes_from.from_path()
            if comes_from:
                s += ' (from %s)' % comes_from
        return s

    def from_path(self):
        if self.req is None:
            return None
        s = str(self.req)
        if self.comes_from:
            if isinstance(self.comes_from, string_types):
                comes_from = self.comes_from
            else:
                comes_from = self.comes_from.from_path()
            if comes_from:
                s += '->' + comes_from
        return s

    def build_location(self, build_dir, unpack=True):
        if self._temp_build_dir is not None:
            return self._temp_build_dir
        if self.req is None:
            self._temp_build_dir = tempfile.mkdtemp('-build', 'pip-')
            self._ideal_build_dir = build_dir
            return self._temp_build_dir
        if self.editable:
            name = self.name.lower()
        else:
            name = self.name
        # FIXME: Is there a better place to create the build_dir? (hg and bzr need this)
        if not os.path.exists(build_dir):
            _make_build_dir(build_dir)
        return os.path.join(build_dir, name)

    def correct_build_location(self):
        """If the build location was a temporary directory, this will move it
        to a new more permanent location"""
        if self.source_dir is not None:
            return
        assert self.req is not None
        assert self._temp_build_dir
        old_location = self._temp_build_dir
        new_build_dir = self._ideal_build_dir
        del self._ideal_build_dir
        if self.editable:
            name = self.name.lower()
        else:
            name = self.name
        new_location = os.path.join(new_build_dir, name)
        if not os.path.exists(new_build_dir):
            logger.debug('Creating directory %s' % new_build_dir)
            _make_build_dir(new_build_dir)
        if os.path.exists(new_location):
            raise InstallationError(
                'A package already exists in %s; please remove it to continue'
                % display_path(new_location))
        logger.debug('Moving package %s from %s to new location %s'
                     % (self, display_path(old_location), display_path(new_location)))
        shutil.move(old_location, new_location)
        self._temp_build_dir = new_location
        self.source_dir = new_location
        self._egg_info_path = None

    @property
    def name(self):
        if self.req is None:
            return None
        return self.req.project_name

    @property
    def url_name(self):
        if self.req is None:
            return None
        return urllib.quote(self.req.unsafe_name)

    @property
    def setup_py(self):
        try:
            import setuptools
        except ImportError:
            # Setuptools is not available
            raise InstallationError(
                "setuptools must be installed to install from a source "
                "distribution"
            )

        setup_file = 'setup.py'

        if self.editable_options and 'subdirectory' in self.editable_options:
            setup_py = os.path.join(self.source_dir,
                                    self.editable_options['subdirectory'],
                                    setup_file)

        else:
            setup_py = os.path.join(self.source_dir, setup_file)

        # Python2 __file__ should not be unicode
        if six.PY2 and isinstance(setup_py, six.text_type):
            setup_py = setup_py.encode(sys.getfilesystemencoding())

        return setup_py

    def run_egg_info(self, force_root_egg_info=False):
        assert self.source_dir
        if self.name:
            logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.setup_py, self.name))
        else:
            logger.notify('Running setup.py (path:%s) egg_info for package from %s' % (self.setup_py, self.url))
        logger.indent += 2
        try:

            # if it's distribute>=0.7, it won't contain an importable
            # setuptools, and having an egg-info dir blocks the ability of
            # setup.py to find setuptools plugins, so delete the egg-info dir if
            # no setuptools. it will get recreated by the run of egg_info
            # NOTE: this self.name check only works when installing from a specifier
            #       (not archive path/urls)
            # TODO: take this out later
            if self.name == 'distribute' and not os.path.isdir(os.path.join(self.source_dir, 'setuptools')):
                rmtree(os.path.join(self.source_dir, 'distribute.egg-info'))

            script = self._run_setup_py
            script = script.replace('__SETUP_PY__', repr(self.setup_py))
            script = script.replace('__PKG_NAME__', repr(self.name))
            egg_info_cmd = [sys.executable, '-c', script, 'egg_info']
            # We can't put the .egg-info files at the root, because then the source code will be mistaken
            # for an installed egg, causing problems
            if self.editable or force_root_egg_info:
                egg_base_option = []
            else:
                egg_info_dir = os.path.join(self.source_dir, 'pip-egg-info')
                if not os.path.exists(egg_info_dir):
                    os.makedirs(egg_info_dir)
                egg_base_option = ['--egg-base', 'pip-egg-info']
            call_subprocess(
                egg_info_cmd + egg_base_option,
                cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False,
                command_level=logger.VERBOSE_DEBUG,
                command_desc='python setup.py egg_info')
        finally:
            logger.indent -= 2
        if not self.req:
            self.req = pkg_resources.Requirement.parse(
                "%(Name)s==%(Version)s" % self.pkg_info())
            self.correct_build_location()

    ## FIXME: This is a lame hack, entirely for PasteScript which has
    ## a self-provided entry point that causes this awkwardness
    _run_setup_py = """
__file__ = __SETUP_PY__
from setuptools.command import egg_info
import pkg_resources
import os
import tokenize
def replacement_run(self):
    self.mkpath(self.egg_info)
    installer = self.distribution.fetch_build_egg
    for ep in pkg_resources.iter_entry_points('egg_info.writers'):
        # require=False is the change we're making:
        writer = ep.load(require=False)
        if writer:
            writer(self, ep.name, os.path.join(self.egg_info,ep.name))
    self.find_sources()
egg_info.egg_info.run = replacement_run
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
"""

    def egg_info_data(self, filename):
        if self.satisfied_by is not None:
            if not self.satisfied_by.has_metadata(filename):
                return None
            return self.satisfied_by.get_metadata(filename)
        assert self.source_dir
        filename = self.egg_info_path(filename)
        if not os.path.exists(filename):
            return None
        data = read_text_file(filename)
        return data

    def egg_info_path(self, filename):
        if self._egg_info_path is None:
            if self.editable:
                base = self.source_dir
            else:
                base = os.path.join(self.source_dir, 'pip-egg-info')
            filenames = os.listdir(base)
            if self.editable:
                filenames = []
                for root, dirs, files in os.walk(base):
                    for dir in vcs.dirnames:
                        if dir in dirs:
                            dirs.remove(dir)
                    # Iterate over a copy of ``dirs``, since mutating
                    # a list while iterating over it can cause trouble.
                    # (See https://github.com/pypa/pip/pull/462.)
                    for dir in list(dirs):
                        # Don't search in anything that looks like a virtualenv environment
                        if (os.path.exists(os.path.join(root, dir, 'bin', 'python'))
                            or os.path.exists(os.path.join(root, dir, 'Scripts', 'Python.exe'))):
                            dirs.remove(dir)
                        # Also don't search through tests
                        if dir == 'test' or dir == 'tests':
                            dirs.remove(dir)
                    filenames.extend([os.path.join(root, dir)
                                     for dir in dirs])
                filenames = [f for f in filenames if f.endswith('.egg-info')]

            if not filenames:
                raise InstallationError('No files/directories in %s (from %s)' % (base, filename))
            assert filenames, "No files/directories in %s (from %s)" % (base, filename)

            # if we have more than one match, we pick the toplevel one.  This can
            # easily be the case if there is a dist folder which contains an
            # extracted tarball for testing purposes.
            if len(filenames) > 1:
                filenames.sort(key=lambda x: x.count(os.path.sep) +
                                             (os.path.altsep and
                                              x.count(os.path.altsep) or 0))
            self._egg_info_path = os.path.join(base, filenames[0])
        return os.path.join(self._egg_info_path, filename)

    def egg_info_lines(self, filename):
        data = self.egg_info_data(filename)
        if not data:
            return []
        result = []
        for line in data.splitlines():
            line = line.strip()
            if not line or line.startswith('#'):
                continue
            result.append(line)
        return result

    def pkg_info(self):
        p = FeedParser()
        data = self.egg_info_data('PKG-INFO')
        if not data:
            logger.warn('No PKG-INFO file found in %s' % display_path(self.egg_info_path('PKG-INFO')))
        p.feed(data or '')
        return p.close()

    @property
    def dependency_links(self):
        return self.egg_info_lines('dependency_links.txt')

    _requirements_section_re = re.compile(r'\[(.*?)\]')

    def requirements(self, extras=()):
        in_extra = None
        for line in self.egg_info_lines('requires.txt'):
            match = self._requirements_section_re.match(line.lower())
            if match:
                in_extra = match.group(1)
                continue
            if in_extra and in_extra not in extras:
                logger.debug('skipping extra %s' % in_extra)
                # Skip requirement for an extra we aren't requiring
                continue
            yield line

    @property
    def absolute_versions(self):
        for qualifier, version in self.req.specs:
            if qualifier == '==':
                yield version

    @property
    def installed_version(self):
        return self.pkg_info()['version']

    def assert_source_matches_version(self):
        assert self.source_dir
        version = self.installed_version
        if version not in self.req:
            logger.warn('Requested %s, but installing version %s' % (self, self.installed_version))
        else:
            logger.debug('Source in %s has version %s, which satisfies requirement %s'
                         % (display_path(self.source_dir), version, self))

    def update_editable(self, obtain=True):
        if not self.url:
            logger.info("Cannot update repository at %s; repository location is unknown" % self.source_dir)
            return
        assert self.editable
        assert self.source_dir
        if self.url.startswith('file:'):
            # Static paths don't get updated
            return
        assert '+' in self.url, "bad url: %r" % self.url
        if not self.update:
            return
        vc_type, url = self.url.split('+', 1)
        backend = vcs.get_backend(vc_type)
        if backend:
            vcs_backend = backend(self.url)
            if obtain:
                vcs_backend.obtain(self.source_dir)
            else:
                vcs_backend.export(self.source_dir)
        else:
            assert 0, (
                'Unexpected version control type (in %s): %s'
                % (self.url, vc_type))

    def uninstall(self, auto_confirm=False):
        """
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        """
        if not self.check_if_exists():
            raise UninstallationError("Cannot uninstall requirement %s, not installed" % (self.name,))
        dist = self.satisfied_by or self.conflicts_with

        paths_to_remove = UninstallPathSet(dist)

        pip_egg_info_path = os.path.join(dist.location,
                                         dist.egg_name()) + '.egg-info'
        dist_info_path = os.path.join(dist.location,
                                      '-'.join(dist.egg_name().split('-')[:2])
                                      ) + '.dist-info'
        # workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618367
        debian_egg_info_path = pip_egg_info_path.replace(
            '-py%s' % pkg_resources.PY_MAJOR, '')
        easy_install_egg = dist.egg_name() + '.egg'
        develop_egg_link = egg_link_path(dist)

        pip_egg_info_exists = os.path.exists(pip_egg_info_path)
        debian_egg_info_exists = os.path.exists(debian_egg_info_path)
        dist_info_exists = os.path.exists(dist_info_path)
        if pip_egg_info_exists or debian_egg_info_exists:
            # package installed by pip
            if pip_egg_info_exists:
                egg_info_path = pip_egg_info_path
            else:
                egg_info_path = debian_egg_info_path
            paths_to_remove.add(egg_info_path)
            if dist.has_metadata('installed-files.txt'):
                for installed_file in dist.get_metadata('installed-files.txt').splitlines():
                    path = os.path.normpath(os.path.join(egg_info_path, installed_file))
                    paths_to_remove.add(path)
            #FIXME: need a test for this elif block
            #occurs with --single-version-externally-managed/--record outside of pip
            elif dist.has_metadata('top_level.txt'):
                if dist.has_metadata('namespace_packages.txt'):
                    namespaces = dist.get_metadata('namespace_packages.txt')
                else:
                    namespaces = []
                for top_level_pkg in [p for p
                                      in dist.get_metadata('top_level.txt').splitlines()
                                      if p and p not in namespaces]:
                    path = os.path.join(dist.location, top_level_pkg)
                    paths_to_remove.add(path)
                    paths_to_remove.add(path + '.py')
                    paths_to_remove.add(path + '.pyc')

        elif dist.location.endswith(easy_install_egg):
            # package installed by easy_install
            paths_to_remove.add(dist.location)
            easy_install_pth = os.path.join(os.path.dirname(dist.location),
                                            'easy-install.pth')
            paths_to_remove.add_pth(easy_install_pth, './' + easy_install_egg)

        elif develop_egg_link:
            # develop egg
            fh = open(develop_egg_link, 'r')
            link_pointer = os.path.normcase(fh.readline().strip())
            fh.close()
            assert (link_pointer == dist.location), 'Egg-link %s does not match installed location of %s (at %s)' % (link_pointer, self.name, dist.location)
            paths_to_remove.add(develop_egg_link)
            easy_install_pth = os.path.join(os.path.dirname(develop_egg_link),
                                            'easy-install.pth')
            paths_to_remove.add_pth(easy_install_pth, dist.location)
        elif dist_info_exists:
            for path in pip.wheel.uninstallation_paths(dist):
                paths_to_remove.add(path)

        # find distutils scripts= scripts
        if dist.has_metadata('scripts') and dist.metadata_isdir('scripts'):
            for script in dist.metadata_listdir('scripts'):
                if dist_in_usersite(dist):
                    bin_dir = bin_user
                else:
                    bin_dir = bin_py
                paths_to_remove.add(os.path.join(bin_dir, script))
                if sys.platform == 'win32':
                    paths_to_remove.add(os.path.join(bin_dir, script) + '.bat')

        # find console_scripts
        if dist.has_metadata('entry_points.txt'):
            config = ConfigParser.SafeConfigParser()
            config.readfp(FakeFile(dist.get_metadata_lines('entry_points.txt')))
            if config.has_section('console_scripts'):
                for name, value in config.items('console_scripts'):
                    if dist_in_usersite(dist):
                        bin_dir = bin_user
                    else:
                        bin_dir = bin_py
                    paths_to_remove.add(os.path.join(bin_dir, name))
                    if sys.platform == 'win32':
                        paths_to_remove.add(os.path.join(bin_dir, name) + '.exe')
                        paths_to_remove.add(os.path.join(bin_dir, name) + '.exe.manifest')
                        paths_to_remove.add(os.path.join(bin_dir, name) + '-script.py')

        paths_to_remove.remove(auto_confirm)
        self.uninstalled = paths_to_remove

    def rollback_uninstall(self):
        if self.uninstalled:
            self.uninstalled.rollback()
        else:
            logger.error("Can't rollback %s, nothing uninstalled."
                         % (self.project_name,))

    def commit_uninstall(self):
        if self.uninstalled:
            self.uninstalled.commit()
        else:
            logger.error("Can't commit %s, nothing uninstalled."
                         % (self.project_name,))

    def archive(self, build_dir):
        assert self.source_dir
        create_archive = True
        archive_name = '%s-%s.zip' % (self.name, self.installed_version)
        archive_path = os.path.join(build_dir, archive_name)
        if os.path.exists(archive_path):
            response = ask_path_exists(
                'The file %s exists. (i)gnore, (w)ipe, (b)ackup ' %
                display_path(archive_path), ('i', 'w', 'b'))
            if response == 'i':
                create_archive = False
            elif response == 'w':
                logger.warn('Deleting %s' % display_path(archive_path))
                os.remove(archive_path)
            elif response == 'b':
                dest_file = backup_dir(archive_path)
                logger.warn('Backing up %s to %s'
                            % (display_path(archive_path), display_path(dest_file)))
                shutil.move(archive_path, dest_file)
        if create_archive:
            zip = zipfile.ZipFile(archive_path, 'w', zipfile.ZIP_DEFLATED)
            dir = os.path.normcase(os.path.abspath(self.source_dir))
            for dirpath, dirnames, filenames in os.walk(dir):
                if 'pip-egg-info' in dirnames:
                    dirnames.remove('pip-egg-info')
                for dirname in dirnames:
                    dirname = os.path.join(dirpath, dirname)
                    name = self._clean_zip_name(dirname, dir)
                    zipdir = zipfile.ZipInfo(self.name + '/' + name + '/')
                    zipdir.external_attr = 0x1ED << 16 # 0o755
                    zip.writestr(zipdir, '')
                for filename in filenames:
                    if filename == PIP_DELETE_MARKER_FILENAME:
                        continue
                    filename = os.path.join(dirpath, filename)
                    name = self._clean_zip_name(filename, dir)
                    zip.write(filename, self.name + '/' + name)
            zip.close()
            logger.indent -= 2
            logger.notify('Saved %s' % display_path(archive_path))

    def _clean_zip_name(self, name, prefix):
        assert name.startswith(prefix+os.path.sep), (
            "name %r doesn't start with prefix %r" % (name, prefix))
        name = name[len(prefix)+1:]
        name = name.replace(os.path.sep, '/')
        return name

    def install(self, install_options, global_options=(), root=None, strip_file_prefix=None):
        if self.editable:
            self.install_editable(install_options, global_options)
            return
        if self.is_wheel:
            version = pip.wheel.wheel_version(self.source_dir)
            pip.wheel.check_compatibility(version, self.name)

            self.move_wheel_files(
                self.source_dir,
                root=root,
                strip_file_prefix=strip_file_prefix
            )
            self.install_succeeded = True
            return

        temp_location = tempfile.mkdtemp('-record', 'pip-')
        record_filename = os.path.join(temp_location, 'install-record.txt')
        try:
            install_args = [sys.executable]
            install_args.append('-c')
            install_args.append(
            "import setuptools, tokenize;__file__=%r;"\
            "exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))" % self.setup_py)
            install_args += list(global_options) + ['install','--record', record_filename]

            if not self.as_egg:
                install_args += ['--single-version-externally-managed']

            if root is not None:
                install_args += ['--root', root]

            if self.pycompile:
                install_args += ["--compile"]
            else:
                install_args += ["--no-compile"]

            if running_under_virtualenv():
                ## FIXME: I'm not sure if this is a reasonable location; probably not
                ## but we can't put it in the default location, as that is a virtualenv symlink that isn't writable
                install_args += ['--install-headers',
                                 os.path.join(sys.prefix, 'include', 'site',
                                              'python' + get_python_version())]
            logger.notify('Running setup.py install for %s' % self.name)
            logger.indent += 2
            try:
                call_subprocess(install_args + install_options,
                    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
            finally:
                logger.indent -= 2
            if not os.path.exists(record_filename):
                logger.notify('Record file %s not found' % record_filename)
                return
            self.install_succeeded = True
            if self.as_egg:
                # there's no --always-unzip option we can pass to install command
                # so we unable to save the installed-files.txt
                return

            def prepend_root(path):
                if root is None or not os.path.isabs(path):
                    return path
                else:
                    return change_root(root, path)

            f = open(record_filename)
            for line in f:
                line = line.strip()
                if line.endswith('.egg-info'):
                    egg_info_dir = prepend_root(line)
                    break
            else:
                logger.warn('Could not find .egg-info directory in install record for %s' % self)
                ## FIXME: put the record somewhere
                ## FIXME: should this be an error?
                return
            f.close()
            new_lines = []
            f = open(record_filename)
            for line in f:
                filename = line.strip()
                if os.path.isdir(filename):
                    filename += os.path.sep
                new_lines.append(make_path_relative(prepend_root(filename), egg_info_dir))
            f.close()
            f = open(os.path.join(egg_info_dir, 'installed-files.txt'), 'w')
            f.write('\n'.join(new_lines)+'\n')
            f.close()
        finally:
            if os.path.exists(record_filename):
                os.remove(record_filename)
            os.rmdir(temp_location)

    def remove_temporary_source(self):
        """Remove the source files from this requirement, if they are marked
        for deletion"""
        if self.is_bundle or os.path.exists(self.delete_marker_filename):
            logger.info('Removing source in %s' % self.source_dir)
            if self.source_dir:
                rmtree(self.source_dir)
            self.source_dir = None
        if self._temp_build_dir and os.path.exists(self._temp_build_dir):
            rmtree(self._temp_build_dir)
        self._temp_build_dir = None

    def install_editable(self, install_options, global_options=()):
        logger.notify('Running setup.py develop for %s' % self.name)
        logger.indent += 2
        try:
            ## FIXME: should we do --install-headers here too?
            call_subprocess(
                [sys.executable, '-c',
                 "import setuptools, tokenize; __file__=%r; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))" % self.setup_py]
                + list(global_options) + ['develop', '--no-deps'] + list(install_options),

                cwd=self.source_dir, filter_stdout=self._filter_install,
                show_stdout=False)
        finally:
            logger.indent -= 2
        self.install_succeeded = True

    def _filter_install(self, line):
        level = logger.NOTIFY
        for regex in [r'^running .*', r'^writing .*', '^creating .*', '^[Cc]opying .*',
                      r'^reading .*', r"^removing .*\.egg-info' \(and everything under it\)$",
                      r'^byte-compiling ',
                      # Not sure what this warning is, but it seems harmless:
                      r"^warning: manifest_maker: standard file '-c' not found$"]:
            if re.search(regex, line.strip()):
                level = logger.INFO
                break
        return (level, line)

    def check_if_exists(self):
        """Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.conflicts_with appropriately."""

        if self.req is None:
            return False
        try:
            # DISTRIBUTE TO SETUPTOOLS UPGRADE HACK (1 of 3 parts)
            # if we've already set distribute as a conflict to setuptools
            # then this check has already run before.  we don't want it to
            # run again, and return False, since it would block the uninstall
            # TODO: remove this later
            if (self.req.project_name == 'setuptools'
                and self.conflicts_with
                and self.conflicts_with.project_name == 'distribute'):
                return True
            else:
                self.satisfied_by = pkg_resources.get_distribution(self.req)
        except pkg_resources.DistributionNotFound:
            return False
        except pkg_resources.VersionConflict:
            existing_dist = pkg_resources.get_distribution(self.req.project_name)
            if self.use_user_site:
                if dist_in_usersite(existing_dist):
                    self.conflicts_with = existing_dist
                elif running_under_virtualenv() and dist_in_site_packages(existing_dist):
                    raise InstallationError("Will not install to the user site because it will lack sys.path precedence to %s in %s"
                                            %(existing_dist.project_name, existing_dist.location))
            else:
                self.conflicts_with = existing_dist
        return True

    @property
    def is_wheel(self):
        return self.url and '.whl' in self.url

    @property
    def is_bundle(self):
        if self._is_bundle is not None:
            return self._is_bundle
        base = self._temp_build_dir
        if not base:
            ## FIXME: this doesn't seem right:
            return False
        self._is_bundle = (os.path.exists(os.path.join(base, 'pip-manifest.txt'))
                           or os.path.exists(os.path.join(base, 'pyinstall-manifest.txt')))
        return self._is_bundle

    def bundle_requirements(self):
        for dest_dir in self._bundle_editable_dirs:
            package = os.path.basename(dest_dir)
            ## FIXME: svnism:
            for vcs_backend in vcs.backends:
                url = rev = None
                vcs_bundle_file = os.path.join(
                    dest_dir, vcs_backend.bundle_file)
                if os.path.exists(vcs_bundle_file):
                    vc_type = vcs_backend.name
                    fp = open(vcs_bundle_file)
                    content = fp.read()
                    fp.close()
                    url, rev = vcs_backend().parse_vcs_bundle_file(content)
                    break
            if url:
                url = '%s+%s@%s' % (vc_type, url, rev)
            else:
                url = None
            yield InstallRequirement(
                package, self, editable=True, url=url,
                update=False, source_dir=dest_dir, from_bundle=True)
        for dest_dir in self._bundle_build_dirs:
            package = os.path.basename(dest_dir)
            yield InstallRequirement(package, self,source_dir=dest_dir, from_bundle=True)

    def move_bundle_files(self, dest_build_dir, dest_src_dir):
        base = self._temp_build_dir
        assert base
        src_dir = os.path.join(base, 'src')
        build_dir = os.path.join(base, 'build')
        bundle_build_dirs = []
        bundle_editable_dirs = []
        for source_dir, dest_dir, dir_collection in [
            (src_dir, dest_src_dir, bundle_editable_dirs),
            (build_dir, dest_build_dir, bundle_build_dirs)]:
            if os.path.exists(source_dir):
                for dirname in os.listdir(source_dir):
                    dest = os.path.join(dest_dir, dirname)
                    dir_collection.append(dest)
                    if os.path.exists(dest):
                        logger.warn('The directory %s (containing package %s) already exists; cannot move source from bundle %s'
                                    % (dest, dirname, self))
                        continue
                    if not os.path.exists(dest_dir):
                        logger.info('Creating directory %s' % dest_dir)
                        os.makedirs(dest_dir)
                    shutil.move(os.path.join(source_dir, dirname), dest)
                if not os.listdir(source_dir):
                    os.rmdir(source_dir)
        self._temp_build_dir = None
        self._bundle_build_dirs = bundle_build_dirs
        self._bundle_editable_dirs = bundle_editable_dirs

    def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None):
        move_wheel_files(
            self.name, self.req, wheeldir,
            user=self.use_user_site,
            home=self.target_dir,
            root=root,
            pycompile=self.pycompile,
            strip_file_prefix=strip_file_prefix,
        )

    @property
    def delete_marker_filename(self):
        assert self.source_dir
        return os.path.join(self.source_dir, PIP_DELETE_MARKER_FILENAME)


class Requirements(object):

    def __init__(self):
        self._keys = []
        self._dict = {}

    def keys(self):
        return self._keys

    def values(self):
        return [self._dict[key] for key in self._keys]

    def __contains__(self, item):
        return item in self._keys

    def __setitem__(self, key, value):
        if key not in self._keys:
            self._keys.append(key)
        self._dict[key] = value

    def __getitem__(self, key):
        return self._dict[key]

    def __repr__(self):
        values = ['%s: %s' % (repr(k), repr(self[k])) for k in self.keys()]
        return 'Requirements({%s})' % ', '.join(values)


class RequirementSet(object):

    def __init__(self, build_dir, src_dir, download_dir, download_cache=None,
                 upgrade=False, ignore_installed=False, as_egg=False,
                 target_dir=None, ignore_dependencies=False,
                 force_reinstall=False, use_user_site=False, session=None,
                 pycompile=True, wheel_download_dir=None):
        self.build_dir = build_dir
        self.src_dir = src_dir
        self.download_dir = download_dir
        if download_cache:
            download_cache = os.path.expanduser(download_cache)
        self.download_cache = download_cache
        self.upgrade = upgrade
        self.ignore_installed = ignore_installed
        self.force_reinstall = force_reinstall
        self.requirements = Requirements()
        # Mapping of alias: real_name
        self.requirement_aliases = {}
        self.unnamed_requirements = []
        self.ignore_dependencies = ignore_dependencies
        self.successfully_downloaded = []
        self.successfully_installed = []
        self.reqs_to_cleanup = []
        self.as_egg = as_egg
        self.use_user_site = use_user_site
        self.target_dir = target_dir #set from --target option
        self.session = session or PipSession()
        self.pycompile = pycompile
        self.wheel_download_dir = wheel_download_dir

    def __str__(self):
        reqs = [req for req in self.requirements.values()
                if not req.comes_from]
        reqs.sort(key=lambda req: req.name.lower())
        return ' '.join([str(req.req) for req in reqs])

    def add_requirement(self, install_req):
        name = install_req.name
        install_req.as_egg = self.as_egg
        install_req.use_user_site = self.use_user_site
        install_req.target_dir = self.target_dir
        install_req.pycompile = self.pycompile
        if not name:
            #url or path requirement w/o an egg fragment
            self.unnamed_requirements.append(install_req)
        else:
            if self.has_requirement(name):
                raise InstallationError(
                    'Double requirement given: %s (already in %s, name=%r)'
                    % (install_req, self.get_requirement(name), name))
            self.requirements[name] = install_req
            ## FIXME: what about other normalizations?  E.g., _ vs. -?
            if name.lower() != name:
                self.requirement_aliases[name.lower()] = name

    def has_requirement(self, project_name):
        for name in project_name, project_name.lower():
            if name in self.requirements or name in self.requirement_aliases:
                return True
        return False

    @property
    def has_requirements(self):
        return list(self.requirements.values()) or self.unnamed_requirements

    @property
    def has_editables(self):
        if any(req.editable for req in self.requirements.values()):
            return True
        if any(req.editable for req in self.unnamed_requirements):
            return True
        return False

    @property
    def is_download(self):
        if self.download_dir:
            self.download_dir = os.path.expanduser(self.download_dir)
            if os.path.exists(self.download_dir):
                return True
            else:
                logger.fatal('Could not find download directory')
                raise InstallationError(
                    "Could not find or access download directory '%s'"
                    % display_path(self.download_dir))
        return False

    def get_requirement(self, project_name):
        for name in project_name, project_name.lower():
            if name in self.requirements:
                return self.requirements[name]
            if name in self.requirement_aliases:
                return self.requirements[self.requirement_aliases[name]]
        raise KeyError("No project with the name %r" % project_name)

    def uninstall(self, auto_confirm=False):
        for req in self.requirements.values():
            req.uninstall(auto_confirm=auto_confirm)
            req.commit_uninstall()

    def locate_files(self):
        ## FIXME: duplicates code from prepare_files; relevant code should
        ##        probably be factored out into a separate method
        unnamed = list(self.unnamed_requirements)
        reqs = list(self.requirements.values())
        while reqs or unnamed:
            if unnamed:
                req_to_install = unnamed.pop(0)
            else:
                req_to_install = reqs.pop(0)
            install_needed = True
            if not self.ignore_installed and not req_to_install.editable:
                req_to_install.check_if_exists()
                if req_to_install.satisfied_by:
                    if self.upgrade:
                        #don't uninstall conflict if user install and and conflict is not user install
                        if not (self.use_user_site and not dist_in_usersite(req_to_install.satisfied_by)):
                            req_to_install.conflicts_with = req_to_install.satisfied_by
                        req_to_install.satisfied_by = None
                    else:
                        install_needed = False
                if req_to_install.satisfied_by:
                    logger.notify('Requirement already satisfied '
                                  '(use --upgrade to upgrade): %s'
                                  % req_to_install)

            if req_to_install.editable:
                if req_to_install.source_dir is None:
                    req_to_install.source_dir = req_to_install.build_location(self.src_dir)
            elif install_needed:
                req_to_install.source_dir = req_to_install.build_location(self.build_dir, not self.is_download)

            if req_to_install.source_dir is not None and not os.path.isdir(req_to_install.source_dir):
                raise InstallationError('Could not install requirement %s '
                                       'because source folder %s does not exist '
                                       '(perhaps --no-download was used without first running '
                                       'an equivalent install with --no-install?)'
                                       % (req_to_install, req_to_install.source_dir))

    def prepare_files(self, finder, force_root_egg_info=False, bundle=False):
        """Prepare process. Create temp directories, download and/or unpack files."""
        unnamed = list(self.unnamed_requirements)
        reqs = list(self.requirements.values())
        while reqs or unnamed:
            if unnamed:
                req_to_install = unnamed.pop(0)
            else:
                req_to_install = reqs.pop(0)
            install = True
            best_installed = False
            not_found = None
            if not self.ignore_installed and not req_to_install.editable:
                req_to_install.check_if_exists()
                if req_to_install.satisfied_by:
                    if self.upgrade:
                        if not self.force_reinstall and not req_to_install.url:
                            try:
                                url = finder.find_requirement(
                                    req_to_install, self.upgrade)
                            except BestVersionAlreadyInstalled:
                                best_installed = True
                                install = False
                            except DistributionNotFound:
                                not_found = sys.exc_info()[1]
                            else:
                                # Avoid the need to call find_requirement again
                                req_to_install.url = url.url

                        if not best_installed:
                            #don't uninstall conflict if user install and conflict is not user install
                            if not (self.use_user_site and not dist_in_usersite(req_to_install.satisfied_by)):
                                req_to_install.conflicts_with = req_to_install.satisfied_by
                            req_to_install.satisfied_by = None
                    else:
                        install = False
                if req_to_install.satisfied_by:
                    if best_installed:
                        logger.notify('Requirement already up-to-date: %s'
                                      % req_to_install)
                    else:
                        logger.notify('Requirement already satisfied '
                                      '(use --upgrade to upgrade): %s'
                                      % req_to_install)
            if req_to_install.editable:
                logger.notify('Obtaining %s' % req_to_install)
            elif install:
                if req_to_install.url and req_to_install.url.lower().startswith('file:'):
                    logger.notify('Unpacking %s' % display_path(url_to_path(req_to_install.url)))
                else:
                    logger.notify('Downloading/unpacking %s' % req_to_install)
            logger.indent += 2
            try:
                is_bundle = False
                is_wheel = False
                if req_to_install.editable:
                    if req_to_install.source_dir is None:
                        location = req_to_install.build_location(self.src_dir)
                        req_to_install.source_dir = location
                    else:
                        location = req_to_install.source_dir
                    if not os.path.exists(self.build_dir):
                        _make_build_dir(self.build_dir)
                    req_to_install.update_editable(not self.is_download)
                    if self.is_download:
                        req_to_install.run_egg_info()
                        req_to_install.archive(self.download_dir)
                    else:
                        req_to_install.run_egg_info()
                elif install:
                    ##@@ if filesystem packages are not marked
                    ##editable in a req, a non deterministic error
                    ##occurs when the script attempts to unpack the
                    ##build directory

                    # NB: This call can result in the creation of a temporary build directory
                    location = req_to_install.build_location(self.build_dir, not self.is_download)
                    unpack = True
                    url = None

                    # In the case where the req comes from a bundle, we should
                    # assume a build dir exists and move on
                    if req_to_install.from_bundle:
                        pass
                    # If a checkout exists, it's unwise to keep going.  version
                    # inconsistencies are logged later, but do not fail the
                    # installation.
                    elif os.path.exists(os.path.join(location, 'setup.py')):
                        raise PreviousBuildDirError(textwrap.dedent("""
                          pip can't proceed with requirement '%s' due to a pre-existing build directory.
                           location: %s
                          This is likely due to a previous installation that failed.
                          pip is being responsible and not assuming it can delete this.
                          Please delete it and try again.
                        """ % (req_to_install, location)))
                    else:
                        ## FIXME: this won't upgrade when there's an existing package unpacked in `location`
                        if req_to_install.url is None:
                            if not_found:
                                raise not_found
                            url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
                        else:
                            ## FIXME: should req_to_install.url already be a link?
                            url = Link(req_to_install.url)
                            assert url
                        if url:
                            try:

                                if (
                                    url.filename.endswith(wheel_ext)
                                    and self.wheel_download_dir
                                ):
                                    # when doing 'pip wheel`
                                    download_dir = self.wheel_download_dir
                                    do_download = True
                                else:
                                    download_dir = self.download_dir
                                    do_download = self.is_download
                                self.unpack_url(
                                    url, location, download_dir,
                                    do_download,
                                    )
                            except HTTPError as exc:
                                logger.fatal(
                                    'Could not install requirement %s because '
                                    'of error %s' % (req_to_install, exc)
                                )
                                raise InstallationError(
                                    'Could not install requirement %s because of HTTP error %s for URL %s'
                                    % (req_to_install, e, url))
                        else:
                            unpack = False
                    if unpack:
                        is_bundle = req_to_install.is_bundle
                        is_wheel = url and url.filename.endswith(wheel_ext)
                        if is_bundle:
                            req_to_install.move_bundle_files(self.build_dir, self.src_dir)
                            for subreq in req_to_install.bundle_requirements():
                                reqs.append(subreq)
                                self.add_requirement(subreq)
                        elif self.is_download:
                            req_to_install.source_dir = location
                            if not is_wheel:
                                # FIXME: see https://github.com/pypa/pip/issues/1112
                                req_to_install.run_egg_info()
                            if url and url.scheme in vcs.all_schemes:
                                req_to_install.archive(self.download_dir)
                        elif is_wheel:
                            req_to_install.source_dir = location
                            req_to_install.url = url.url
                        else:
                            req_to_install.source_dir = location
                            req_to_install.run_egg_info()
                            if force_root_egg_info:
                                # We need to run this to make sure that the .egg-info/
                                # directory is created for packing in the bundle
                                req_to_install.run_egg_info(force_root_egg_info=True)
                            req_to_install.assert_source_matches_version()
                            #@@ sketchy way of identifying packages not grabbed from an index
                            if bundle and req_to_install.url:
                                self.copy_to_build_dir(req_to_install)
                                install = False
                        # req_to_install.req is only avail after unpack for URL pkgs
                        # repeat check_if_exists to uninstall-on-upgrade (#14)
                        if not self.ignore_installed:
                            req_to_install.check_if_exists()
                        if req_to_install.satisfied_by:
                            if self.upgrade or self.ignore_installed:
                                #don't uninstall conflict if user install and and conflict is not user install
                                if not (self.use_user_site and not dist_in_usersite(req_to_install.satisfied_by)):
                                    req_to_install.conflicts_with = req_to_install.satisfied_by
                                req_to_install.satisfied_by = None
                            else:
                                logger.notify(
                                    'Requirement already satisfied (use '
                                    '--upgrade to upgrade): %s' %
                                    req_to_install
                                )
                                install = False
                if is_wheel:
                    dist = list(
                        pkg_resources.find_distributions(location)
                    )[0]
                    if not req_to_install.req:
                        req_to_install.req = dist.as_requirement()
                        self.add_requirement(req_to_install)
                    if not self.ignore_dependencies:
                        for subreq in dist.requires(
                                req_to_install.extras):
                            if self.has_requirement(
                                    subreq.project_name):
                                continue
                            subreq = InstallRequirement(str(subreq),
                                                        req_to_install)
                            reqs.append(subreq)
                            self.add_requirement(subreq)

                # sdists
                elif not is_bundle:
                    ## FIXME: shouldn't be globally added:
                    finder.add_dependency_links(req_to_install.dependency_links)
                    if (req_to_install.extras):
                        logger.notify("Installing extra requirements: %r" % ','.join(req_to_install.extras))
                    if not self.ignore_dependencies:
                        for req in req_to_install.requirements(req_to_install.extras):
                            try:
                                name = pkg_resources.Requirement.parse(req).project_name
                            except ValueError:
                                e = sys.exc_info()[1]
                                ## FIXME: proper warning
                                logger.error('Invalid requirement: %r (%s) in requirement %s' % (req, e, req_to_install))
                                continue
                            if self.has_requirement(name):
                                ## FIXME: check for conflict
                                continue
                            subreq = InstallRequirement(req, req_to_install)
                            reqs.append(subreq)
                            self.add_requirement(subreq)
                    if not self.has_requirement(req_to_install.name):
                        #'unnamed' requirements will get added here
                        self.add_requirement(req_to_install)

                # cleanup tmp src
                if not is_bundle:
                    if (
                        self.is_download or
                        req_to_install._temp_build_dir is not None
                    ):
                        self.reqs_to_cleanup.append(req_to_install)

                if install:
                    self.successfully_downloaded.append(req_to_install)
                    if bundle and (req_to_install.url and req_to_install.url.startswith('file:///')):
                        self.copy_to_build_dir(req_to_install)
            finally:
                logger.indent -= 2

    def cleanup_files(self, bundle=False):
        """Clean up files, remove builds."""
        logger.notify('Cleaning up...')
        logger.indent += 2
        for req in self.reqs_to_cleanup:
            req.remove_temporary_source()

        remove_dir = []
        if self._pip_has_created_build_dir():
            remove_dir.append(self.build_dir)

        # The source dir of a bundle can always be removed.
        # FIXME: not if it pre-existed the bundle!
        if bundle:
            remove_dir.append(self.src_dir)

        for dir in remove_dir:
            if os.path.exists(dir):
                logger.info('Removing temporary dir %s...' % dir)
                rmtree(dir)

        logger.indent -= 2

    def _pip_has_created_build_dir(self):
        return (self.build_dir == build_prefix and
                os.path.exists(os.path.join(self.build_dir, PIP_DELETE_MARKER_FILENAME)))

    def copy_to_build_dir(self, req_to_install):
        target_dir = req_to_install.editable and self.src_dir or self.build_dir
        logger.info("Copying %s to %s" % (req_to_install.name, target_dir))
        dest = os.path.join(target_dir, req_to_install.name)
        shutil.copytree(req_to_install.source_dir, dest)
        call_subprocess(["python", "%s/setup.py" % dest, "clean"], cwd=dest,
                        command_desc='python setup.py clean')

    def unpack_url(self, link, location, download_dir=None,
                   only_download=False):
        if download_dir is None:
            download_dir = self.download_dir

        # non-editable vcs urls
        if is_vcs_url(link):
            if only_download:
                loc = download_dir
            else:
                loc = location
            unpack_vcs_link(link, loc, only_download)

        # file urls
        elif is_file_url(link):
            unpack_file_url(link, location, download_dir)
            if only_download:
                write_delete_marker_file(location)

        # http urls
        else:
            unpack_http_url(
                link,
                location,
                self.download_cache,
                download_dir,
                self.session,
            )
            if only_download:
                write_delete_marker_file(location)

    def install(self, install_options, global_options=(), *args, **kwargs):
        """Install everything in this set (after having downloaded and unpacked the packages)"""
        to_install = [r for r in self.requirements.values()
                      if not r.satisfied_by]

        # DISTRIBUTE TO SETUPTOOLS UPGRADE HACK (1 of 3 parts)
        # move the distribute-0.7.X wrapper to the end because it does not
        # install a setuptools package. by moving it to the end, we ensure it's
        # setuptools dependency is handled first, which will provide the
        # setuptools package
        # TODO: take this out later
        distribute_req = pkg_resources.Requirement.parse("distribute>=0.7")
        for req in to_install:
            if req.name == 'distribute' and req.installed_version in distribute_req:
                to_install.remove(req)
                to_install.append(req)

        if to_install:
            logger.notify('Installing collected packages: %s' % ', '.join([req.name for req in to_install]))
        logger.indent += 2
        try:
            for requirement in to_install:

                # DISTRIBUTE TO SETUPTOOLS UPGRADE HACK (1 of 3 parts)
                # when upgrading from distribute-0.6.X to the new merged
                # setuptools in py2, we need to force setuptools to uninstall
                # distribute. In py3, which is always using distribute, this
                # conversion is already happening in distribute's pkg_resources.
                # It's ok *not* to check if setuptools>=0.7 because if someone
                # were actually trying to ugrade from distribute to setuptools
                # 0.6.X, then all this could do is actually help, although that
                # upgade path was certainly never "supported"
                # TODO: remove this later
                if requirement.name == 'setuptools':
                    try:
                        # only uninstall distribute<0.7. For >=0.7, setuptools
                        # will also be present, and that's what we need to
                        # uninstall
                        distribute_requirement = pkg_resources.Requirement.parse("distribute<0.7")
                        existing_distribute = pkg_resources.get_distribution("distribute")
                        if existing_distribute in distribute_requirement:
                            requirement.conflicts_with = existing_distribute
                    except pkg_resources.DistributionNotFound:
                        # distribute wasn't installed, so nothing to do
                        pass

                if requirement.conflicts_with:
                    logger.notify('Found existing installation: %s'
                                  % requirement.conflicts_with)
                    logger.indent += 2
                    try:
                        requirement.uninstall(auto_confirm=True)
                    finally:
                        logger.indent -= 2
                try:
                    requirement.install(install_options, global_options, *args, **kwargs)
                except:
                    # if install did not succeed, rollback previous uninstall
                    if requirement.conflicts_with and not requirement.install_succeeded:
                        requirement.rollback_uninstall()
                    raise
                else:
                    if requirement.conflicts_with and requirement.install_succeeded:
                        requirement.commit_uninstall()
                requirement.remove_temporary_source()
        finally:
            logger.indent -= 2
        self.successfully_installed = to_install

    def create_bundle(self, bundle_filename):
        ## FIXME: can't decide which is better; zip is easier to read
        ## random files from, but tar.bz2 is smaller and not as lame a
        ## format.

        ## FIXME: this file should really include a manifest of the
        ## packages, maybe some other metadata files.  It would make
        ## it easier to detect as well.
        zip = zipfile.ZipFile(bundle_filename, 'w', zipfile.ZIP_DEFLATED)
        vcs_dirs = []
        for dir, basename in (self.build_dir, 'build'), (self.src_dir, 'src'):
            dir = os.path.normcase(os.path.abspath(dir))
            for dirpath, dirnames, filenames in os.walk(dir):
                for backend in vcs.backends:
                    vcs_backend = backend()
                    vcs_url = vcs_rev = None
                    if vcs_backend.dirname in dirnames:
                        for vcs_dir in vcs_dirs:
                            if dirpath.startswith(vcs_dir):
                                # vcs bundle file already in parent directory
                                break
                        else:
                            vcs_url, vcs_rev = vcs_backend.get_info(
                                os.path.join(dir, dirpath))
                            vcs_dirs.append(dirpath)
                        vcs_bundle_file = vcs_backend.bundle_file
                        vcs_guide = vcs_backend.guide % {'url': vcs_url,
                                                         'rev': vcs_rev}
                        dirnames.remove(vcs_backend.dirname)
                        break
                if 'pip-egg-info' in dirnames:
                    dirnames.remove('pip-egg-info')
                for dirname in dirnames:
                    dirname = os.path.join(dirpath, dirname)
                    name = self._clean_zip_name(dirname, dir)
                    zip.writestr(basename + '/' + name + '/', '')
                for filename in filenames:
                    if filename == PIP_DELETE_MARKER_FILENAME:
                        continue
                    filename = os.path.join(dirpath, filename)
                    name = self._clean_zip_name(filename, dir)
                    zip.write(filename, basename + '/' + name)
                if vcs_url:
                    name = os.path.join(dirpath, vcs_bundle_file)
                    name = self._clean_zip_name(name, dir)
                    zip.writestr(basename + '/' + name, vcs_guide)

        zip.writestr('pip-manifest.txt', self.bundle_requirements())
        zip.close()

    BUNDLE_HEADER = '''\
# This is a pip bundle file, that contains many source packages
# that can be installed as a group.  You can install this like:
#     pip this_file.zip
# The rest of the file contains a list of all the packages included:
'''

    def bundle_requirements(self):
        parts = [self.BUNDLE_HEADER]
        for req in [req for req in self.requirements.values()
                    if not req.comes_from]:
            parts.append('%s==%s\n' % (req.name, req.installed_version))
        parts.append('# These packages were installed to satisfy the above requirements:\n')
        for req in [req for req in self.requirements.values()
                    if req.comes_from]:
            parts.append('%s==%s\n' % (req.name, req.installed_version))
        ## FIXME: should we do something with self.unnamed_requirements?
        return ''.join(parts)

    def _clean_zip_name(self, name, prefix):
        assert name.startswith(prefix+os.path.sep), (
            "name %r doesn't start with prefix %r" % (name, prefix))
        name = name[len(prefix)+1:]
        name = name.replace(os.path.sep, '/')
        return name


def _make_build_dir(build_dir):
    os.makedirs(build_dir)
    write_delete_marker_file(build_dir)


_scheme_re = re.compile(r'^(http|https|file):', re.I)


def parse_requirements(filename, finder=None, comes_from=None, options=None,
                       session=None):
    if session is None:
        session = PipSession()

    skip_match = None
    skip_regex = options.skip_requirements_regex if options else None
    if skip_regex:
        skip_match = re.compile(skip_regex)
    reqs_file_dir = os.path.dirname(os.path.abspath(filename))
    filename, content = get_file_content(filename,
        comes_from=comes_from,
        session=session,
    )
    for line_number, line in enumerate(content.splitlines()):
        line_number += 1
        line = line.strip()

        # Remove comments from file
        line = re.sub(r"(^|\s)#.*$", "", line)

        if not line or line.startswith('#'):
            continue
        if skip_match and skip_match.search(line):
            continue
        if line.startswith('-r') or line.startswith('--requirement'):
            if line.startswith('-r'):
                req_url = line[2:].strip()
            else:
                req_url = line[len('--requirement'):].strip().strip('=')
            if _scheme_re.search(filename):
                # Relative to a URL
                req_url = urlparse.urljoin(filename, req_url)
            elif not _scheme_re.search(req_url):
                req_url = os.path.join(os.path.dirname(filename), req_url)
            for item in parse_requirements(req_url, finder, comes_from=filename, options=options, session=session):
                yield item
        elif line.startswith('-Z') or line.startswith('--always-unzip'):
            # No longer used, but previously these were used in
            # requirement files, so we'll ignore.
            pass
        elif line.startswith('-f') or line.startswith('--find-links'):
            if line.startswith('-f'):
                line = line[2:].strip()
            else:
                line = line[len('--find-links'):].strip().lstrip('=')
            ## FIXME: it would be nice to keep track of the source of
            ## the find_links:
            # support a find-links local path relative to a requirements file
            relative_to_reqs_file = os.path.join(reqs_file_dir, line)
            if os.path.exists(relative_to_reqs_file):
                line = relative_to_reqs_file
            if finder:
                finder.find_links.append(line)
        elif line.startswith('-i') or line.startswith('--index-url'):
            if line.startswith('-i'):
                line = line[2:].strip()
            else:
                line = line[len('--index-url'):].strip().lstrip('=')
            if finder:
                finder.index_urls = [line]
        elif line.startswith('--extra-index-url'):
            line = line[len('--extra-index-url'):].strip().lstrip('=')
            if finder:
                finder.index_urls.append(line)
        elif line.startswith('--use-wheel'):
            finder.use_wheel = True
        elif line.startswith('--no-index'):
            finder.index_urls = []
        elif line.startswith("--allow-external"):
            line = line[len("--allow-external"):].strip().lstrip("=")
            finder.allow_external |= set([normalize_name(line).lower()])
        elif line.startswith("--allow-all-external"):
            finder.allow_all_external = True
        # Remove in 1.7
        elif line.startswith("--no-allow-external"):
            pass
        # Remove in 1.7
        elif line.startswith("--no-allow-insecure"):
            pass
        # Remove after 1.7
        elif line.startswith("--allow-insecure"):
            line = line[len("--allow-insecure"):].strip().lstrip("=")
            finder.allow_unverified |= set([normalize_name(line).lower()])
        elif line.startswith("--allow-unverified"):
            line = line[len("--allow-unverified"):].strip().lstrip("=")
            finder.allow_unverified |= set([normalize_name(line).lower()])
        else:
            comes_from = '-r %s (line %s)' % (filename, line_number)
            if line.startswith('-e') or line.startswith('--editable'):
                if line.startswith('-e'):
                    line = line[2:].strip()
                else:
                    line = line[len('--editable'):].strip().lstrip('=')
                req = InstallRequirement.from_editable(
                    line, comes_from=comes_from, default_vcs=options.default_vcs if options else None)
            else:
                req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
            yield req

def _strip_postfix(req):
    """
        Strip req postfix ( -dev, 0.2, etc )
    """
    ## FIXME: use package_to_requirement?
    match = re.search(r'^(.*?)(?:-dev|-\d.*)$', req)
    if match:
        # Strip off -dev, -0.2, etc.
        req = match.group(1)
    return req

def _build_req_from_url(url):

    parts = [p for p in url.split('#', 1)[0].split('/') if p]

    req = None
    if parts[-2] in ('tags', 'branches', 'tag', 'branch'):
        req = parts[-3]
    elif parts[-1] == 'trunk':
        req = parts[-2]
    return req

def _build_editable_options(req):

    """
        This method generates a dictionary of the query string
        parameters contained in a given editable URL.
    """
    regexp = re.compile(r"[\?#&](?P<name>[^&=]+)=(?P<value>[^&=]+)")
    matched = regexp.findall(req)

    if matched:
        ret = dict()
        for option in matched:
            (name, value) = option
            if name in ret:
                raise Exception("%s option already defined" % name)
            ret[name] = value
        return ret
    return None


def parse_editable(editable_req, default_vcs=None):
    """Parses svn+http://blahblah@rev#egg=Foobar into a requirement
    (Foobar) and a URL"""

    url = editable_req
    extras = None

    # If a file path is specified with extras, strip off the extras.
    m = re.match(r'^(.+)(\[[^\]]+\])$', url)
    if m:
        url_no_extras = m.group(1)
        extras = m.group(2)
    else:
        url_no_extras = url

    if os.path.isdir(url_no_extras):
        if not os.path.exists(os.path.join(url_no_extras, 'setup.py')):
            raise InstallationError("Directory %r is not installable. File 'setup.py' not found." % url_no_extras)
        # Treating it as code that has already been checked out
        url_no_extras = path_to_url(url_no_extras)

    if url_no_extras.lower().startswith('file:'):
        if extras:
            return None, url_no_extras, pkg_resources.Requirement.parse('__placeholder__' + extras).extras
        else:
            return None, url_no_extras, None

    for version_control in vcs:
        if url.lower().startswith('%s:' % version_control):
            url = '%s+%s' % (version_control, url)
            break

    if '+' not in url:
        if default_vcs:
            url = default_vcs + '+' + url
        else:
            raise InstallationError(
                '%s should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+' % editable_req)

    vc_type = url.split('+', 1)[0].lower()

    if not vcs.get_backend(vc_type):
        error_message = 'For --editable=%s only ' % editable_req + \
            ', '.join([backend.name + '+URL' for backend in vcs.backends]) + \
            ' is currently supported'
        raise InstallationError(error_message)

    try:
        options = _build_editable_options(editable_req)
    except Exception:
        message = sys.exc_info()[1]
        raise InstallationError(
            '--editable=%s error in editable options:%s' % (editable_req, message))

    if not options or 'egg' not in options:
        req = _build_req_from_url(editable_req)
        if not req:
            raise InstallationError('--editable=%s is not the right format; it must have #egg=Package' % editable_req)
    else:
        req = options['egg']

    package = _strip_postfix(req)
    return package, url, options


class UninstallPathSet(object):
    """A set of file paths to be removed in the uninstallation of a
    requirement."""
    def __init__(self, dist):
        self.paths = set()
        self._refuse = set()
        self.pth = {}
        self.dist = dist
        self.save_dir = None
        self._moved_paths = []

    def _permitted(self, path):
        """
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        """
        return is_local(path)

    def _can_uninstall(self):
        if not dist_is_local(self.dist):
            logger.notify("Not uninstalling %s at %s, outside environment %s"
                          % (self.dist.project_name, normalize_path(self.dist.location), sys.prefix))
            return False
        return True

    def add(self, path):
        path = normalize_path(path)
        if not os.path.exists(path):
            return
        if self._permitted(path):
            self.paths.add(path)
        else:
            self._refuse.add(path)

        # __pycache__ files can show up after 'installed-files.txt' is created, due to imports
        if os.path.splitext(path)[1] == '.py' and uses_pycache:
            self.add(imp.cache_from_source(path))


    def add_pth(self, pth_file, entry):
        pth_file = normalize_path(pth_file)
        if self._permitted(pth_file):
            if pth_file not in self.pth:
                self.pth[pth_file] = UninstallPthEntries(pth_file)
            self.pth[pth_file].add(entry)
        else:
            self._refuse.add(pth_file)

    def compact(self, paths):
        """Compact a path set to contain the minimal number of paths
        necessary to contain all paths in the set. If /a/path/ and
        /a/path/to/a/file.txt are both in the set, leave only the
        shorter path."""
        short_paths = set()
        for path in sorted(paths, key=len):
            if not any([(path.startswith(shortpath) and
                         path[len(shortpath.rstrip(os.path.sep))] == os.path.sep)
                        for shortpath in short_paths]):
                short_paths.add(path)
        return short_paths

    def _stash(self, path):
        return os.path.join(
            self.save_dir, os.path.splitdrive(path)[1].lstrip(os.path.sep))

    def remove(self, auto_confirm=False):
        """Remove paths in ``self.paths`` with confirmation (unless
        ``auto_confirm`` is True)."""
        if not self._can_uninstall():
            return
        if not self.paths:
            logger.notify("Can't uninstall '%s'. No files were found to uninstall." % self.dist.project_name)
            return
        logger.notify('Uninstalling %s:' % self.dist.project_name)
        logger.indent += 2
        paths = sorted(self.compact(self.paths))
        try:
            if auto_confirm:
                response = 'y'
            else:
                for path in paths:
                    logger.notify(path)
                response = ask('Proceed (y/n)? ', ('y', 'n'))
            if self._refuse:
                logger.notify('Not removing or modifying (outside of prefix):')
                for path in self.compact(self._refuse):
                    logger.notify(path)
            if response == 'y':
                self.save_dir = tempfile.mkdtemp(suffix='-uninstall',
                                                 prefix='pip-')
                for path in paths:
                    new_path = self._stash(path)
                    logger.info('Removing file or directory %s' % path)
                    self._moved_paths.append(path)
                    renames(path, new_path)
                for pth in self.pth.values():
                    pth.remove()
                logger.notify('Successfully uninstalled %s' % self.dist.project_name)

        finally:
            logger.indent -= 2

    def rollback(self):
        """Rollback the changes previously made by remove()."""
        if self.save_dir is None:
            logger.error("Can't roll back %s; was not uninstalled" % self.dist.project_name)
            return False
        logger.notify('Rolling back uninstall of %s' % self.dist.project_name)
        for path in self._moved_paths:
            tmp_path = self._stash(path)
            logger.info('Replacing %s' % path)
            renames(tmp_path, path)
        for pth in self.pth:
            pth.rollback()

    def commit(self):
        """Remove temporary save dir: rollback will no longer be possible."""
        if self.save_dir is not None:
            rmtree(self.save_dir)
            self.save_dir = None
            self._moved_paths = []


class UninstallPthEntries(object):
    def __init__(self, pth_file):
        if not os.path.isfile(pth_file):
            raise UninstallationError("Cannot remove entries from nonexistent file %s" % pth_file)
        self.file = pth_file
        self.entries = set()
        self._saved_lines = None

    def add(self, entry):
        entry = os.path.normcase(entry)
        # On Windows, os.path.normcase converts the entry to use
        # backslashes.  This is correct for entries that describe absolute
        # paths outside of site-packages, but all the others use forward
        # slashes.
        if sys.platform == 'win32' and not os.path.splitdrive(entry)[0]:
            entry = entry.replace('\\', '/')
        self.entries.add(entry)

    def remove(self):
        logger.info('Removing pth entries from %s:' % self.file)
        fh = open(self.file, 'rb')
        # windows uses '\r\n' with py3k, but uses '\n' with py2.x
        lines = fh.readlines()
        self._saved_lines = lines
        fh.close()
        if any(b('\r\n') in line for line in lines):
            endline = '\r\n'
        else:
            endline = '\n'
        for entry in self.entries:
            try:
                logger.info('Removing entry: %s' % entry)
                lines.remove(b(entry + endline))
            except ValueError:
                pass
        fh = open(self.file, 'wb')
        fh.writelines(lines)
        fh.close()

    def rollback(self):
        if self._saved_lines is None:
            logger.error('Cannot roll back changes to %s, none were made' % self.file)
            return False
        logger.info('Rolling %s back to previous state' % self.file)
        fh = open(self.file, 'wb')
        fh.writelines(self._saved_lines)
        fh.close()
        return True


class FakeFile(object):
    """Wrap a list of lines in an object with readline() to make
    ConfigParser happy."""
    def __init__(self, lines):
        self._gen = (l for l in lines)

    def readline(self):
        try:
            try:
                return next(self._gen)
            except NameError:
                return self._gen.next()
        except StopIteration:
            return ''

    def __iter__(self):
        return self._gen
python3.3/site-packages/pip/basecommand.py000064400000014662151733566750014477 0ustar00"""Base Command class, and related routines"""

import os
import sys
import tempfile
import traceback
import time
import optparse

from pip import cmdoptions
from pip.locations import running_under_virtualenv
from pip.log import logger
from pip.download import PipSession
from pip.exceptions import (BadCommand, InstallationError, UninstallationError,
                            CommandError, PreviousBuildDirError)
from pip.backwardcompat import StringIO
from pip.baseparser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.status_codes import (SUCCESS, ERROR, UNKNOWN_ERROR, VIRTUALENV_NOT_FOUND,
                              PREVIOUS_BUILD_DIR_ERROR)
from pip.util import get_prog


__all__ = ['Command']


class Command(object):
    name = None
    usage = None
    hidden = False

    def __init__(self):
        parser_kw = {
            'usage': self.usage,
            'prog': '%s %s' % (get_prog(), self.name),
            'formatter': UpdatingDefaultsHelpFormatter(),
            'add_help_option': False,
            'name': self.name,
            'description': self.__doc__,
        }

        self.parser = ConfigOptionParser(**parser_kw)

        # Commands should add options to this option group
        optgroup_name = '%s Options' % self.name.capitalize()
        self.cmd_opts = optparse.OptionGroup(self.parser, optgroup_name)

        # Add the general options
        gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, self.parser)
        self.parser.add_option_group(gen_opts)

    def _build_session(self, options):
        session = PipSession()

        # Handle custom ca-bundles from the user
        if options.cert:
            session.verify = options.cert

        # Handle timeouts
        if options.timeout:
            session.timeout = options.timeout

        # Handle configured proxies
        if options.proxy:
            session.proxies = {
                "http": options.proxy,
                "https": options.proxy,
            }

        # Determine if we can prompt the user for authentication or not
        session.auth.prompting = not options.no_input

        return session

    def setup_logging(self):
        pass

    def parse_args(self, args):
        # factored out for testability
        return self.parser.parse_args(args)

    def main(self, args):
        options, args = self.parse_args(args)

        level = 1  # Notify
        level += options.verbose
        level -= options.quiet
        level = logger.level_for_integer(4 - level)
        complete_log = []
        logger.add_consumers(
            (level, sys.stdout),
            (logger.DEBUG, complete_log.append),
        )
        if options.log_explicit_levels:
            logger.explicit_levels = True

        self.setup_logging()

        #TODO: try to get these passing down from the command?
        #      without resorting to os.environ to hold these.

        if options.no_input:
            os.environ['PIP_NO_INPUT'] = '1'

        if options.exists_action:
            os.environ['PIP_EXISTS_ACTION'] = ' '.join(options.exists_action)

        if options.require_venv:
            # If a venv is required check if it can really be found
            if not running_under_virtualenv():
                logger.fatal('Could not find an activated virtualenv (required).')
                sys.exit(VIRTUALENV_NOT_FOUND)

        if options.log:
            log_fp = open_logfile(options.log, 'a')
            logger.add_consumers((logger.DEBUG, log_fp))
        else:
            log_fp = None

        exit = SUCCESS
        store_log = False
        try:
            status = self.run(options, args)
            # FIXME: all commands should return an exit status
            # and when it is done, isinstance is not needed anymore
            if isinstance(status, int):
                exit = status
        except PreviousBuildDirError:
            e = sys.exc_info()[1]
            logger.fatal(str(e))
            logger.info('Exception information:\n%s' % format_exc())
            store_log = True
            exit = PREVIOUS_BUILD_DIR_ERROR
        except (InstallationError, UninstallationError):
            e = sys.exc_info()[1]
            logger.fatal(str(e))
            logger.info('Exception information:\n%s' % format_exc())
            store_log = True
            exit = ERROR
        except BadCommand:
            e = sys.exc_info()[1]
            logger.fatal(str(e))
            logger.info('Exception information:\n%s' % format_exc())
            store_log = True
            exit = ERROR
        except CommandError:
            e = sys.exc_info()[1]
            logger.fatal('ERROR: %s' % e)
            logger.info('Exception information:\n%s' % format_exc())
            exit = ERROR
        except KeyboardInterrupt:
            logger.fatal('Operation cancelled by user')
            logger.info('Exception information:\n%s' % format_exc())
            store_log = True
            exit = ERROR
        except:
            logger.fatal('Exception:\n%s' % format_exc())
            store_log = True
            exit = UNKNOWN_ERROR
        if store_log:
            log_file_fn = options.log_file
            text = '\n'.join(complete_log)
            try:
                log_file_fp = open_logfile(log_file_fn, 'w')
            except IOError:
                temp = tempfile.NamedTemporaryFile(delete=False)
                log_file_fn = temp.name
                log_file_fp = open_logfile(log_file_fn, 'w')
            logger.fatal('Storing debug log for failure in %s' % log_file_fn)
            log_file_fp.write(text)
            log_file_fp.close()
        if log_fp is not None:
            log_fp.close()
        return exit


def format_exc(exc_info=None):
    if exc_info is None:
        exc_info = sys.exc_info()
    out = StringIO()
    traceback.print_exception(*exc_info, **dict(file=out))
    return out.getvalue()


def open_logfile(filename, mode='a'):
    """Open the named log file in append mode.

    If the file already exists, a separator will also be printed to
    the file to separate past activity from current activity.
    """
    filename = os.path.expanduser(filename)
    filename = os.path.abspath(filename)
    dirname = os.path.dirname(filename)
    if not os.path.exists(dirname):
        os.makedirs(dirname)
    exists = os.path.exists(filename)

    log_fp = open(filename, mode)
    if exists:
        log_fp.write('%s\n' % ('-' * 60))
        log_fp.write('%s run on %s\n' % (sys.argv[0], time.strftime('%c')))
    return log_fp
python3.3/site-packages/pip/_vendor/_markerlib/markers.py000064400000007613151733566750017433 0ustar00# -*- coding: utf-8 -*-
"""Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
"""

__all__ = ['default_environment', 'compile', 'interpret']

import ast
import os
import platform
import sys
import weakref

_builtin_compile = compile

try:
    from platform import python_implementation
except ImportError:
    if os.name == "java":
        # Jython 2.5 has ast module, but not platform.python_implementation() function.
        def python_implementation():
            return "Jython"
    else:
        raise


# restricted set of variables
_VARS = {'sys.platform': sys.platform,
         'python_version': '%s.%s' % sys.version_info[:2],
         # FIXME parsing sys.platform is not reliable, but there is no other
         # way to get e.g. 2.7.2+, and the PEP is defined with sys.version
         'python_full_version': sys.version.split(' ', 1)[0],
         'os.name': os.name,
         'platform.version': platform.version(),
         'platform.machine': platform.machine(),
         'platform.python_implementation': python_implementation(),
         'extra': None # wheel extension
        }

for var in list(_VARS.keys()):
    if '.' in var:
        _VARS[var.replace('.', '_')] = _VARS[var]

def default_environment():
    """Return copy of default PEP 385 globals dictionary."""
    return dict(_VARS)

class ASTWhitelist(ast.NodeTransformer):
    def __init__(self, statement):
        self.statement = statement # for error messages

    ALLOWED = (ast.Compare, ast.BoolOp, ast.Attribute, ast.Name, ast.Load, ast.Str)
    # Bool operations
    ALLOWED += (ast.And, ast.Or)
    # Comparison operations
    ALLOWED += (ast.Eq, ast.Gt, ast.GtE, ast.In, ast.Is, ast.IsNot, ast.Lt, ast.LtE, ast.NotEq, ast.NotIn)

    def visit(self, node):
        """Ensure statement only contains allowed nodes."""
        if not isinstance(node, self.ALLOWED):
            raise SyntaxError('Not allowed in environment markers.\n%s\n%s' %
                               (self.statement,
                               (' ' * node.col_offset) + '^'))
        return ast.NodeTransformer.visit(self, node)

    def visit_Attribute(self, node):
        """Flatten one level of attribute access."""
        new_node = ast.Name("%s.%s" % (node.value.id, node.attr), node.ctx)
        return ast.copy_location(new_node, node)

def parse_marker(marker):
    tree = ast.parse(marker, mode='eval')
    new_tree = ASTWhitelist(marker).generic_visit(tree)
    return new_tree

def compile_marker(parsed_marker):
    return _builtin_compile(parsed_marker, '<environment marker>', 'eval',
                   dont_inherit=True)

_cache = weakref.WeakValueDictionary()

def compile(marker):
    """Return compiled marker as a function accepting an environment dict."""
    try:
        return _cache[marker]
    except KeyError:
        pass
    if not marker.strip():
        def marker_fn(environment=None, override=None):
            """"""
            return True
    else:
        compiled_marker = compile_marker(parse_marker(marker))
        def marker_fn(environment=None, override=None):
            """override updates environment"""
            if override is None:
                override = {}
            if environment is None:
                environment = default_environment()
            environment.update(override)
            return eval(compiled_marker, environment)
    marker_fn.__doc__ = marker
    _cache[marker] = marker_fn
    return _cache[marker]

def interpret(marker, environment=None):
    return compile(marker)(environment)
python3.3/site-packages/pip/_vendor/_markerlib/__pycache__/__init__.cpython-33.pyc000064400000002522151733566750024001 0ustar00�
7�Re4c@s�y,ddlZddlmZmZmZWnQek
rde�krQ�ndd�Zdd�Zdddd	�ZYnXdS(
iN(udefault_environmentucompileu	interpretuastcCsiS(N((((u8/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/__init__.pyudefault_environmentsudefault_environmentcs%dd�fdd�}�|_|S(Ncs�j�S(N(ustrip(uenvironmentuoverride(umarker(u8/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/__init__.pyu	marker_fn
sucompile.<locals>.marker_fn(uNoneu__doc__(umarkeru	marker_fn((umarkeru8/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/__init__.pyucompile	s	ucompilecCs
t|��S(N(ucompile(umarkeruenvironmentuoverride((u8/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/__init__.pyu	interpretsu	interpret(uastupip._vendor._markerlib.markersudefault_environmentucompileu	interpretuImportErroruglobalsuNone(((u8/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/__init__.pyu<module>s 
python3.3/site-packages/pip/_vendor/_markerlib/__pycache__/markers.cpython-33.pyc000064400000013350151733566750023707 0ustar00�
7�Re�c@s�dZdddgZddlZddlZddlZddlZddlZeZyddlm	Z	Wn3e
k
r�ejdkr�dd	�Z	n�YnXiejd
6dejdd�d
6ej
jdd�dd6ejd6ej
�d6ej�d6e	�d6dd6ZxCeej��D]/Zdekr+eeeejdd�<q+q+Wdd�ZGdd�dej�Zdd�Zdd�Zej�Zdd�Zdd d�ZdS(!u�Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
udefault_environmentucompileu	interpretiN(upython_implementationujavacCsdS(NuJython((((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyupython_implementation!supython_implementationusys.platformu%s.%siupython_versionu iupython_full_versionuos.nameuplatform.versionuplatform.machineuplatform.python_implementationuextrau.u_cCs
tt�S(u2Return copy of default PEP 385 globals dictionary.(udictu_VARS(((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyudefault_environment8scBs�|EeZdZdd�Zejejejejej	ej
fZeejej
f7Zeejejejejejejejejejejf
7Zdd�Zdd�ZdS(uASTWhitelistcCs
||_dS(N(u	statement(uselfu	statement((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyu__init__=suASTWhitelist.__init__cCsLt||j�s9td|jd|jdf��ntjj||�S(u-Ensure statement only contains allowed nodes.u)Not allowed in environment markers.
%s
%su u^(u
isinstanceuALLOWEDuSyntaxErroru	statementu
col_offsetuastuNodeTransformeruvisit(uselfunode((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyuvisitFs
uASTWhitelist.visitcCs8tjd|jj|jf|j�}tj||�S(u&Flatten one level of attribute access.u%s.%s(uastuNameuvalueuiduattructxu
copy_location(uselfunodeunew_node((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyuvisit_AttributeNs(uASTWhitelist.visit_AttributeN(u__name__u
__module__u__qualname__u__init__uastuCompareuBoolOpu	AttributeuNameuLoaduStruALLOWEDuAnduOruEquGtuGtEuInuIsuIsNotuLtuLtEuNotEquNotInuvisituvisit_Attribute(u
__locals__((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyuASTWhitelist<s*FuASTWhitelistcCs.tj|dd�}t|�j|�}|S(Numodeueval(uastuparseuASTWhitelistu
generic_visit(umarkerutreeunew_tree((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyuparse_markerSsuparse_markercCst|dddd�S(Nu<environment marker>uevaludont_inheritT(u_builtin_compileuTrue(u
parsed_marker((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyucompile_markerXsucompile_markerc
s�yt|SWntk
r YnX|j�sBdddd�}n*tt|���dd�fdd�}||_|t|<t|S(uCReturn compiled marker as a function accepting an environment dict.cSsdS(uT(uTrue(uenvironmentuoverride((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyu	marker_fnesucompile.<locals>.marker_fncsG|dkri}n|dkr-t�}n|j|�t�|�S(uoverride updates environmentN(uNoneudefault_environmentuupdateueval(uenvironmentuoverride(ucompiled_marker(u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyu	marker_fnjs	
N(u_cacheuKeyErrorustripuNoneucompile_markeruparse_markeru__doc__(umarkeru	marker_fn((ucompiled_markeru7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyucompile^s
	
cCst|�|�S(N(ucompile(umarkeruenvironment((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyu	interpretvs(u__doc__u__all__uastuosuplatformusysuweakrefucompileu_builtin_compileupython_implementationuImportErrorunameuversion_infouversionusplitumachineuNoneu_VARSulistukeysuvarureplaceudefault_environmentuNodeTransformeruASTWhitelistuparse_markerucompile_markeruWeakValueDictionaryu_cacheu	interpret(((u7/tmp/pip-zej_zi-build/pip/_vendor/_markerlib/markers.pyu<module>s>






!python3.3/site-packages/pip/_vendor/_markerlib/__init__.py000064400000001064151733566750017520 0ustar00try:
    import ast
    from pip._vendor._markerlib.markers import default_environment, compile, interpret
except ImportError:
    if 'ast' in globals():
        raise
    def default_environment():
        return {}
    def compile(marker):
        def marker_fn(environment=None, override=None):
            # 'empty markers are True' heuristic won't install extra deps.
            return not marker.strip()
        marker_fn.__doc__ = marker
        return marker_fn
    def interpret(marker, environment=None, override=None):
        return compile(marker)()
python3.3/site-packages/pip/_vendor/distlib/compat.py000064400000113733151733566750016576 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import absolute_import

import os
import re
import sys

if sys.version_info[0] < 3:
    from StringIO import StringIO
    string_types = basestring,
    text_type = unicode
    from types import FileType as file_type
    import __builtin__ as builtins
    import ConfigParser as configparser
    from ._backport import shutil
    from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
    from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
                        pathname2url, ContentTooShortError, splittype)

    def quote(s):
        if isinstance(s, unicode):
            s = s.encode('utf-8')
        return _quote(s)

    import urllib2
    from urllib2 import (Request, urlopen, URLError, HTTPError,
                         HTTPBasicAuthHandler, HTTPPasswordMgr,
                         HTTPSHandler, HTTPHandler, HTTPRedirectHandler,
                         build_opener)
    import httplib
    import xmlrpclib
    import Queue as queue
    from HTMLParser import HTMLParser
    import htmlentitydefs
    raw_input = raw_input
    from itertools import ifilter as filter
    from itertools import ifilterfalse as filterfalse

    _userprog = None
    def splituser(host):
        """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'."""
        global _userprog
        if _userprog is None:
            import re
            _userprog = re.compile('^(.*)@(.*)$')

        match = _userprog.match(host)
        if match: return match.group(1, 2)
        return None, host

else:
    from io import StringIO
    string_types = str,
    text_type = str
    from io import TextIOWrapper as file_type
    import builtins
    import configparser
    import shutil
    from urllib.parse import (urlparse, urlunparse, urljoin, splituser, quote,
                              unquote, urlsplit, urlunsplit, splittype)
    from urllib.request import (urlopen, urlretrieve, Request, url2pathname,
                                pathname2url,
                                HTTPBasicAuthHandler, HTTPPasswordMgr,
                                HTTPSHandler, HTTPHandler, HTTPRedirectHandler,
                                build_opener)
    from urllib.error import HTTPError, URLError, ContentTooShortError
    import http.client as httplib
    import urllib.request as urllib2
    import xmlrpc.client as xmlrpclib
    import queue
    from html.parser import HTMLParser
    import html.entities as htmlentitydefs
    raw_input = input
    from itertools import filterfalse
    filter = filter

try:
    from ssl import match_hostname, CertificateError
except ImportError:
    class CertificateError(ValueError):
        pass


    def _dnsname_to_pat(dn):
        pats = []
        for frag in dn.split(r'.'):
            if frag == '*':
                # When '*' is a fragment by itself, it matches a non-empty
                # dotless fragment.
                pats.append('[^.]+')
            else:
                # Otherwise, '*' matches any dotless fragment.
                frag = re.escape(frag)
                pats.append(frag.replace(r'\*', '[^.]*'))
        return re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)


    def match_hostname(cert, hostname):
        """Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 rules
        are mostly followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        """
        if not cert:
            raise ValueError("empty or no certificate")
        dnsnames = []
        san = cert.get('subjectAltName', ())
        for key, value in san:
            if key == 'DNS':
                if _dnsname_to_pat(value).match(hostname):
                    return
                dnsnames.append(value)
        if not dnsnames:
            # The subject is only checked when there is no dNSName entry
            # in subjectAltName
            for sub in cert.get('subject', ()):
                for key, value in sub:
                    # XXX according to RFC 2818, the most specific Common Name
                    # must be used.
                    if key == 'commonName':
                        if _dnsname_to_pat(value).match(hostname):
                            return
                        dnsnames.append(value)
        if len(dnsnames) > 1:
            raise CertificateError("hostname %r "
                "doesn't match either of %s"
                % (hostname, ', '.join(map(repr, dnsnames))))
        elif len(dnsnames) == 1:
            raise CertificateError("hostname %r "
                "doesn't match %r"
                % (hostname, dnsnames[0]))
        else:
            raise CertificateError("no appropriate commonName or "
                "subjectAltName fields were found")


try:
    from types import SimpleNamespace as Container
except ImportError:
    class Container(object):
        """
        A generic container for when multiple values need to be returned
        """
        def __init__(self, **kwargs):
            self.__dict__.update(kwargs)


try:
    from shutil import which
except ImportError:
    # Implementation from Python 3.3
    def which(cmd, mode=os.F_OK | os.X_OK, path=None):
        """Given a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.

        """
        # Check that a given file can be accessed with the correct mode.
        # Additionally check that `file` is not a directory, as on Windows
        # directories pass the os.access check.
        def _access_check(fn, mode):
            return (os.path.exists(fn) and os.access(fn, mode)
                    and not os.path.isdir(fn))

        # If we're given a path with a directory part, look it up directly rather
        # than referring to PATH directories. This includes checking relative to the
        # current directory, e.g. ./script
        if os.path.dirname(cmd):
            if _access_check(cmd, mode):
                return cmd
            return None

        if path is None:
            path = os.environ.get("PATH", os.defpath)
        if not path:
            return None
        path = path.split(os.pathsep)

        if sys.platform == "win32":
            # The current directory takes precedence on Windows.
            if not os.curdir in path:
                path.insert(0, os.curdir)

            # PATHEXT is necessary to check on Windows.
            pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
            # See if the given file matches any of the expected path extensions.
            # This will allow us to short circuit when given "python.exe".
            # If it does match, only test that one, otherwise we have to try
            # others.
            if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
                files = [cmd]
            else:
                files = [cmd + ext for ext in pathext]
        else:
            # On other platforms you don't have things like PATHEXT to tell you
            # what file suffixes are executable, so just pass on cmd as-is.
            files = [cmd]

        seen = set()
        for dir in path:
            normdir = os.path.normcase(dir)
            if not normdir in seen:
                seen.add(normdir)
                for thefile in files:
                    name = os.path.join(dir, thefile)
                    if _access_check(name, mode):
                        return name
        return None


# ZipFile is a context manager in 2.7, but not in 2.6

from zipfile import ZipFile as BaseZipFile

if hasattr(BaseZipFile, '__enter__'):
    ZipFile = BaseZipFile
else:
    from zipfile import ZipExtFile as BaseZipExtFile

    class ZipExtFile(BaseZipExtFile):
        def __init__(self, base):
            self.__dict__.update(base.__dict__)

        def __enter__(self):
            return self

        def __exit__(self, *exc_info):
            self.close()
            # return None, so if an exception occurred, it will propagate

    class ZipFile(BaseZipFile):
        def __enter__(self):
            return self

        def __exit__(self, *exc_info):
            self.close()
            # return None, so if an exception occurred, it will propagate

        def open(self, *args, **kwargs):
            base = BaseZipFile.open(self, *args, **kwargs)
            return ZipExtFile(base)

try:
    from platform import python_implementation
except ImportError: # pragma: no cover
    def python_implementation():
        """Return a string identifying the Python implementation."""
        if 'PyPy' in sys.version:
            return 'PyPy'
        if os.name == 'java':
            return 'Jython'
        if sys.version.startswith('IronPython'):
            return 'IronPython'
        return 'CPython'

try:
    import sysconfig
except ImportError: # pragma: no cover
    from ._backport import sysconfig

try:
    callable = callable
except NameError:   # pragma: no cover
    from collections import Callable

    def callable(obj):
        return isinstance(obj, Callable)


try:
    fsencode = os.fsencode
    fsdecode = os.fsdecode
except AttributeError:  # pragma: no cover
    _fsencoding = sys.getfilesystemencoding()
    if _fsencoding == 'mbcs':
        _fserrors = 'strict'
    else:
        _fserrors = 'surrogateescape'

    def fsencode(filename):
        if isinstance(filename, bytes):
            return filename
        elif isinstance(filename, text_type):
            return filename.encode(_fsencoding, _fserrors)
        else:
            raise TypeError("expect bytes or str, not %s" %
                            type(filename).__name__)

    def fsdecode(filename):
        if isinstance(filename, text_type):
            return filename
        elif isinstance(filename, bytes):
            return filename.decode(_fsencoding, _fserrors)
        else:
            raise TypeError("expect bytes or str, not %s" %
                            type(filename).__name__)

try:
    from tokenize import detect_encoding
except ImportError: # pragma: no cover
    from codecs import BOM_UTF8, lookup
    import re

    cookie_re = re.compile("coding[:=]\s*([-\w.]+)")

    def _get_normal_name(orig_enc):
        """Imitates get_normal_name in tokenizer.c."""
        # Only care about the first 12 characters.
        enc = orig_enc[:12].lower().replace("_", "-")
        if enc == "utf-8" or enc.startswith("utf-8-"):
            return "utf-8"
        if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \
           enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")):
            return "iso-8859-1"
        return orig_enc

    def detect_encoding(readline):
        """
        The detect_encoding() function is used to detect the encoding that should
        be used to decode a Python source file.  It requires one argment, readline,
        in the same way as the tokenize() generator.

        It will call readline a maximum of twice, and return the encoding used
        (as a string) and a list of any lines (left as bytes) it has read in.

        It detects the encoding from the presence of a utf-8 bom or an encoding
        cookie as specified in pep-0263.  If both a bom and a cookie are present,
        but disagree, a SyntaxError will be raised.  If the encoding cookie is an
        invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
        'utf-8-sig' is returned.

        If no encoding is specified, then the default of 'utf-8' will be returned.
        """
        try:
            filename = readline.__self__.name
        except AttributeError:
            filename = None
        bom_found = False
        encoding = None
        default = 'utf-8'
        def read_or_stop():
            try:
                return readline()
            except StopIteration:
                return b''

        def find_cookie(line):
            try:
                # Decode as UTF-8. Either the line is an encoding declaration,
                # in which case it should be pure ASCII, or it must be UTF-8
                # per default encoding.
                line_string = line.decode('utf-8')
            except UnicodeDecodeError:
                msg = "invalid or missing encoding declaration"
                if filename is not None:
                    msg = '{} for {!r}'.format(msg, filename)
                raise SyntaxError(msg)

            matches = cookie_re.findall(line_string)
            if not matches:
                return None
            encoding = _get_normal_name(matches[0])
            try:
                codec = lookup(encoding)
            except LookupError:
                # This behaviour mimics the Python interpreter
                if filename is None:
                    msg = "unknown encoding: " + encoding
                else:
                    msg = "unknown encoding for {!r}: {}".format(filename,
                            encoding)
                raise SyntaxError(msg)

            if bom_found:
                if codec.name != 'utf-8':
                    # This behaviour mimics the Python interpreter
                    if filename is None:
                        msg = 'encoding problem: utf-8'
                    else:
                        msg = 'encoding problem for {!r}: utf-8'.format(filename)
                    raise SyntaxError(msg)
                encoding += '-sig'
            return encoding

        first = read_or_stop()
        if first.startswith(BOM_UTF8):
            bom_found = True
            first = first[3:]
            default = 'utf-8-sig'
        if not first:
            return default, []

        encoding = find_cookie(first)
        if encoding:
            return encoding, [first]

        second = read_or_stop()
        if not second:
            return default, [first]

        encoding = find_cookie(second)
        if encoding:
            return encoding, [first, second]

        return default, [first, second]

# For converting & <-> &amp; etc.
try:
    from html import escape
except ImportError:
    from cgi import escape
if sys.version_info[:2] < (3, 4):
    unescape = HTMLParser().unescape
else:
    from html import unescape

try:
    from collections import ChainMap
except ImportError: # pragma: no cover
    from collections import MutableMapping

    try:
        from reprlib import recursive_repr as _recursive_repr
    except ImportError:
        def _recursive_repr(fillvalue='...'):
            '''
            Decorator to make a repr function return fillvalue for a recursive
            call
            '''

            def decorating_function(user_function):
                repr_running = set()

                def wrapper(self):
                    key = id(self), get_ident()
                    if key in repr_running:
                        return fillvalue
                    repr_running.add(key)
                    try:
                        result = user_function(self)
                    finally:
                        repr_running.discard(key)
                    return result

                # Can't use functools.wraps() here because of bootstrap issues
                wrapper.__module__ = getattr(user_function, '__module__')
                wrapper.__doc__ = getattr(user_function, '__doc__')
                wrapper.__name__ = getattr(user_function, '__name__')
                wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
                return wrapper

            return decorating_function

    class ChainMap(MutableMapping):
        ''' A ChainMap groups multiple dicts (or other mappings) together
        to create a single, updateable view.

        The underlying mappings are stored in a list.  That list is public and can
        accessed or updated using the *maps* attribute.  There is no other state.

        Lookups search the underlying mappings successively until a key is found.
        In contrast, writes, updates, and deletions only operate on the first
        mapping.

        '''

        def __init__(self, *maps):
            '''Initialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            '''
            self.maps = list(maps) or [{}]          # always at least one map

        def __missing__(self, key):
            raise KeyError(key)

        def __getitem__(self, key):
            for mapping in self.maps:
                try:
                    return mapping[key]             # can't use 'key in mapping' with defaultdict
                except KeyError:
                    pass
            return self.__missing__(key)            # support subclasses that define __missing__

        def get(self, key, default=None):
            return self[key] if key in self else default

        def __len__(self):
            return len(set().union(*self.maps))     # reuses stored hash values if possible

        def __iter__(self):
            return iter(set().union(*self.maps))

        def __contains__(self, key):
            return any(key in m for m in self.maps)

        def __bool__(self):
            return any(self.maps)

        @_recursive_repr()
        def __repr__(self):
            return '{0.__class__.__name__}({1})'.format(
                self, ', '.join(map(repr, self.maps)))

        @classmethod
        def fromkeys(cls, iterable, *args):
            'Create a ChainMap with a single dict created from the iterable.'
            return cls(dict.fromkeys(iterable, *args))

        def copy(self):
            'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]'
            return self.__class__(self.maps[0].copy(), *self.maps[1:])

        __copy__ = copy

        def new_child(self):                        # like Django's Context.push()
            'New ChainMap with a new dict followed by all previous maps.'
            return self.__class__({}, *self.maps)

        @property
        def parents(self):                          # like Django's Context.pop()
            'New ChainMap from maps[1:].'
            return self.__class__(*self.maps[1:])

        def __setitem__(self, key, value):
            self.maps[0][key] = value

        def __delitem__(self, key):
            try:
                del self.maps[0][key]
            except KeyError:
                raise KeyError('Key not found in the first mapping: {!r}'.format(key))

        def popitem(self):
            'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.'
            try:
                return self.maps[0].popitem()
            except KeyError:
                raise KeyError('No keys found in the first mapping.')

        def pop(self, key, *args):
            'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].'
            try:
                return self.maps[0].pop(key, *args)
            except KeyError:
                raise KeyError('Key not found in the first mapping: {!r}'.format(key))

        def clear(self):
            'Clear maps[0], leaving maps[1:] intact.'
            self.maps[0].clear()

try:
    from imp import cache_from_source
except ImportError: # pragma: no cover
    def cache_from_source(path, debug_override=None):
        assert path.endswith('.py')
        if debug_override is None:
            debug_override = __debug__
        if debug_override:
            suffix = 'c'
        else:
            suffix = 'o'
        return path + suffix

try:
    from collections import OrderedDict
except ImportError: # pragma: no cover
## {{{ http://code.activestate.com/recipes/576693/ (r9)
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
    try:
        from thread import get_ident as _get_ident
    except ImportError:
        from dummy_thread import get_ident as _get_ident

    try:
        from _abcoll import KeysView, ValuesView, ItemsView
    except ImportError:
        pass


    class OrderedDict(dict):
        'Dictionary that remembers insertion order'
        # An inherited dict maps keys to values.
        # The inherited dict provides __getitem__, __len__, __contains__, and get.
        # The remaining methods are order-aware.
        # Big-O running times for all methods are the same as for regular dictionaries.

        # The internal self.__map dictionary maps keys to links in a doubly linked list.
        # The circular doubly linked list starts and ends with a sentinel element.
        # The sentinel element never gets deleted (this simplifies the algorithm).
        # Each link is stored as a list of length three:  [PREV, NEXT, KEY].

        def __init__(self, *args, **kwds):
            '''Initialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            '''
            if len(args) > 1:
                raise TypeError('expected at most 1 arguments, got %d' % len(args))
            try:
                self.__root
            except AttributeError:
                self.__root = root = []                     # sentinel node
                root[:] = [root, root, None]
                self.__map = {}
            self.__update(*args, **kwds)

        def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
            'od.__setitem__(i, y) <==> od[i]=y'
            # Setting a new item creates a new link which goes at the end of the linked
            # list, and the inherited dictionary is updated with the new key/value pair.
            if key not in self:
                root = self.__root
                last = root[0]
                last[1] = root[0] = self.__map[key] = [last, root, key]
            dict_setitem(self, key, value)

        def __delitem__(self, key, dict_delitem=dict.__delitem__):
            'od.__delitem__(y) <==> del od[y]'
            # Deleting an existing item uses self.__map to find the link which is
            # then removed by updating the links in the predecessor and successor nodes.
            dict_delitem(self, key)
            link_prev, link_next, key = self.__map.pop(key)
            link_prev[1] = link_next
            link_next[0] = link_prev

        def __iter__(self):
            'od.__iter__() <==> iter(od)'
            root = self.__root
            curr = root[1]
            while curr is not root:
                yield curr[2]
                curr = curr[1]

        def __reversed__(self):
            'od.__reversed__() <==> reversed(od)'
            root = self.__root
            curr = root[0]
            while curr is not root:
                yield curr[2]
                curr = curr[0]

        def clear(self):
            'od.clear() -> None.  Remove all items from od.'
            try:
                for node in self.__map.itervalues():
                    del node[:]
                root = self.__root
                root[:] = [root, root, None]
                self.__map.clear()
            except AttributeError:
                pass
            dict.clear(self)

        def popitem(self, last=True):
            '''od.popitem() -> (k, v), return and remove a (key, value) pair.
            Pairs are returned in LIFO order if last is true or FIFO order if false.

            '''
            if not self:
                raise KeyError('dictionary is empty')
            root = self.__root
            if last:
                link = root[0]
                link_prev = link[0]
                link_prev[1] = root
                root[0] = link_prev
            else:
                link = root[1]
                link_next = link[1]
                root[1] = link_next
                link_next[0] = root
            key = link[2]
            del self.__map[key]
            value = dict.pop(self, key)
            return key, value

        # -- the following methods do not depend on the internal structure --

        def keys(self):
            'od.keys() -> list of keys in od'
            return list(self)

        def values(self):
            'od.values() -> list of values in od'
            return [self[key] for key in self]

        def items(self):
            'od.items() -> list of (key, value) pairs in od'
            return [(key, self[key]) for key in self]

        def iterkeys(self):
            'od.iterkeys() -> an iterator over the keys in od'
            return iter(self)

        def itervalues(self):
            'od.itervalues -> an iterator over the values in od'
            for k in self:
                yield self[k]

        def iteritems(self):
            'od.iteritems -> an iterator over the (key, value) items in od'
            for k in self:
                yield (k, self[k])

        def update(*args, **kwds):
            '''od.update(E, **F) -> None.  Update od from dict/iterable E and F.

            If E is a dict instance, does:           for k in E: od[k] = E[k]
            If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
            Or if E is an iterable of items, does:   for k, v in E: od[k] = v
            In either case, this is followed by:     for k, v in F.items(): od[k] = v

            '''
            if len(args) > 2:
                raise TypeError('update() takes at most 2 positional '
                                'arguments (%d given)' % (len(args),))
            elif not args:
                raise TypeError('update() takes at least 1 argument (0 given)')
            self = args[0]
            # Make progressively weaker assumptions about "other"
            other = ()
            if len(args) == 2:
                other = args[1]
            if isinstance(other, dict):
                for key in other:
                    self[key] = other[key]
            elif hasattr(other, 'keys'):
                for key in other.keys():
                    self[key] = other[key]
            else:
                for key, value in other:
                    self[key] = value
            for key, value in kwds.items():
                self[key] = value

        __update = update  # let subclasses override update without breaking __init__

        __marker = object()

        def pop(self, key, default=__marker):
            '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
            If key is not found, d is returned if given, otherwise KeyError is raised.

            '''
            if key in self:
                result = self[key]
                del self[key]
                return result
            if default is self.__marker:
                raise KeyError(key)
            return default

        def setdefault(self, key, default=None):
            'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
            if key in self:
                return self[key]
            self[key] = default
            return default

        def __repr__(self, _repr_running=None):
            'od.__repr__() <==> repr(od)'
            if not _repr_running: _repr_running = {}
            call_key = id(self), _get_ident()
            if call_key in _repr_running:
                return '...'
            _repr_running[call_key] = 1
            try:
                if not self:
                    return '%s()' % (self.__class__.__name__,)
                return '%s(%r)' % (self.__class__.__name__, self.items())
            finally:
                del _repr_running[call_key]

        def __reduce__(self):
            'Return state information for pickling'
            items = [[k, self[k]] for k in self]
            inst_dict = vars(self).copy()
            for k in vars(OrderedDict()):
                inst_dict.pop(k, None)
            if inst_dict:
                return (self.__class__, (items,), inst_dict)
            return self.__class__, (items,)

        def copy(self):
            'od.copy() -> a shallow copy of od'
            return self.__class__(self)

        @classmethod
        def fromkeys(cls, iterable, value=None):
            '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            '''
            d = cls()
            for key in iterable:
                d[key] = value
            return d

        def __eq__(self, other):
            '''od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            '''
            if isinstance(other, OrderedDict):
                return len(self)==len(other) and self.items() == other.items()
            return dict.__eq__(self, other)

        def __ne__(self, other):
            return not self == other

        # -- the following methods are only used in Python 2.7 --

        def viewkeys(self):
            "od.viewkeys() -> a set-like object providing a view on od's keys"
            return KeysView(self)

        def viewvalues(self):
            "od.viewvalues() -> an object providing a view on od's values"
            return ValuesView(self)

        def viewitems(self):
            "od.viewitems() -> a set-like object providing a view on od's items"
            return ItemsView(self)

try:
    from logging.config import BaseConfigurator, valid_ident
except ImportError: # pragma: no cover
    IDENTIFIER = re.compile('^[a-z_][a-z0-9_]*$', re.I)


    def valid_ident(s):
        m = IDENTIFIER.match(s)
        if not m:
            raise ValueError('Not a valid Python identifier: %r' % s)
        return True


    # The ConvertingXXX classes are wrappers around standard Python containers,
    # and they serve to convert any suitable values in the container. The
    # conversion converts base dicts, lists and tuples to their wrapped
    # equivalents, whereas strings which match a conversion format are converted
    # appropriately.
    #
    # Each wrapper should have a configurator attribute holding the actual
    # configurator to use for conversion.

    class ConvertingDict(dict):
        """A converting dictionary wrapper."""

        def __getitem__(self, key):
            value = dict.__getitem__(self, key)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

        def get(self, key, default=None):
            value = dict.get(self, key, default)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

    def pop(self, key, default=None):
        value = dict.pop(self, key, default)
        result = self.configurator.convert(value)
        if value is not result:
            if type(result) in (ConvertingDict, ConvertingList,
                                ConvertingTuple):
                result.parent = self
                result.key = key
        return result

    class ConvertingList(list):
        """A converting list wrapper."""
        def __getitem__(self, key):
            value = list.__getitem__(self, key)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

        def pop(self, idx=-1):
            value = list.pop(self, idx)
            result = self.configurator.convert(value)
            if value is not result:
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
            return result

    class ConvertingTuple(tuple):
        """A converting tuple wrapper."""
        def __getitem__(self, key):
            value = tuple.__getitem__(self, key)
            result = self.configurator.convert(value)
            if value is not result:
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

    class BaseConfigurator(object):
        """
        The configurator base class which defines some useful defaults.
        """

        CONVERT_PATTERN = re.compile(r'^(?P<prefix>[a-z]+)://(?P<suffix>.*)$')

        WORD_PATTERN = re.compile(r'^\s*(\w+)\s*')
        DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*')
        INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*')
        DIGIT_PATTERN = re.compile(r'^\d+$')

        value_converters = {
            'ext' : 'ext_convert',
            'cfg' : 'cfg_convert',
        }

        # We might want to use a different one, e.g. importlib
        importer = staticmethod(__import__)

        def __init__(self, config):
            self.config = ConvertingDict(config)
            self.config.configurator = self

        def resolve(self, s):
            """
            Resolve strings to objects using standard import and attribute
            syntax.
            """
            name = s.split('.')
            used = name.pop(0)
            try:
                found = self.importer(used)
                for frag in name:
                    used += '.' + frag
                    try:
                        found = getattr(found, frag)
                    except AttributeError:
                        self.importer(used)
                        found = getattr(found, frag)
                return found
            except ImportError:
                e, tb = sys.exc_info()[1:]
                v = ValueError('Cannot resolve %r: %s' % (s, e))
                v.__cause__, v.__traceback__ = e, tb
                raise v

        def ext_convert(self, value):
            """Default converter for the ext:// protocol."""
            return self.resolve(value)

        def cfg_convert(self, value):
            """Default converter for the cfg:// protocol."""
            rest = value
            m = self.WORD_PATTERN.match(rest)
            if m is None:
                raise ValueError("Unable to convert %r" % value)
            else:
                rest = rest[m.end():]
                d = self.config[m.groups()[0]]
                #print d, rest
                while rest:
                    m = self.DOT_PATTERN.match(rest)
                    if m:
                        d = d[m.groups()[0]]
                    else:
                        m = self.INDEX_PATTERN.match(rest)
                        if m:
                            idx = m.groups()[0]
                            if not self.DIGIT_PATTERN.match(idx):
                                d = d[idx]
                            else:
                                try:
                                    n = int(idx) # try as number first (most likely)
                                    d = d[n]
                                except TypeError:
                                    d = d[idx]
                    if m:
                        rest = rest[m.end():]
                    else:
                        raise ValueError('Unable to convert '
                                         '%r at %r' % (value, rest))
            #rest should be empty
            return d

        def convert(self, value):
            """
            Convert values to an appropriate type. dicts, lists and tuples are
            replaced by their converting alternatives. Strings are checked to
            see if they have a conversion format and are converted if they do.
            """
            if not isinstance(value, ConvertingDict) and isinstance(value, dict):
                value = ConvertingDict(value)
                value.configurator = self
            elif not isinstance(value, ConvertingList) and isinstance(value, list):
                value = ConvertingList(value)
                value.configurator = self
            elif not isinstance(value, ConvertingTuple) and\
                     isinstance(value, tuple):
                value = ConvertingTuple(value)
                value.configurator = self
            elif isinstance(value, string_types):
                m = self.CONVERT_PATTERN.match(value)
                if m:
                    d = m.groupdict()
                    prefix = d['prefix']
                    converter = self.value_converters.get(prefix, None)
                    if converter:
                        suffix = d['suffix']
                        converter = getattr(self, converter)
                        value = converter(suffix)
            return value

        def configure_custom(self, config):
            """Configure an object with a user-supplied factory."""
            c = config.pop('()')
            if not callable(c):
                c = self.resolve(c)
            props = config.pop('.', None)
            # Check for valid identifiers
            kwargs = dict([(k, config[k]) for k in config if valid_ident(k)])
            result = c(**kwargs)
            if props:
                for name, value in props.items():
                    setattr(result, name, value)
            return result

        def as_tuple(self, value):
            """Utility function which converts lists to tuples."""
            if isinstance(value, list):
                value = tuple(value)
            return value
python3.3/site-packages/pip/_vendor/distlib/version.py000064400000054724151733566750017004 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-386,
distribute-compatible and semantic versioning.
"""

import logging
import re

from .compat import string_types

__all__ = ['NormalizedVersion', 'NormalizedMatcher',
           'LegacyVersion', 'LegacyMatcher',
           'SemanticVersion', 'SemanticMatcher',
           'UnsupportedVersionError', 'get_scheme']

logger = logging.getLogger(__name__)


class UnsupportedVersionError(ValueError):
    """This is an unsupported version."""
    pass


class Version(object):
    def __init__(self, s):
        self._string = s = s.strip()
        self._parts = parts = self.parse(s)
        assert isinstance(parts, tuple)
        assert len(parts) > 0

    def parse(self, s):
        raise NotImplementedError('please implement in a subclass')

    def _check_compatible(self, other):
        if type(self) != type(other):
            raise TypeError('cannot compare %r and %r' % (self, other))

    def __eq__(self, other):
        self._check_compatible(other)
        return self._parts == other._parts

    def __ne__(self, other):
        return not self.__eq__(other)

    def __lt__(self, other):
        self._check_compatible(other)
        return self._parts < other._parts

    def __gt__(self, other):
        return not (self.__lt__(other) or self.__eq__(other))

    def __le__(self, other):
        return self.__lt__(other) or self.__eq__(other)

    def __ge__(self, other):
        return self.__gt__(other) or self.__eq__(other)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    def __hash__(self):
        return hash(self._parts)

    def __repr__(self):
        return "%s('%s')" % (self.__class__.__name__, self._string)

    def __str__(self):
        return self._string

    @property
    def is_prerelease(self):
        raise NotImplementedError('Please implement in subclasses.')


class Matcher(object):
    version_class = None

    dist_re = re.compile(r"^(\w[\s\w'.-]*)(\((.*)\))?")
    comp_re = re.compile(r'^(<=|>=|<|>|!=|==|~=)?\s*([^\s,]+)$')
    num_re = re.compile(r'^\d+(\.\d+)*$')

    # value is either a callable or the name of a method
    _operators = {
        '<': lambda v, c, p: v < c,
        '>': lambda v, c, p: v > c,
        '<=': lambda v, c, p: v == c or v < c,
        '>=': lambda v, c, p: v == c or v > c,
        '==': lambda v, c, p: v == c,
        # by default, compatible => >=.
        '~=': lambda v, c, p: v == c or v > c,
        '!=': lambda v, c, p: v != c,
    }

    def __init__(self, s):
        if self.version_class is None:
            raise ValueError('Please specify a version class')
        self._string = s = s.strip()
        m = self.dist_re.match(s)
        if not m:
            raise ValueError('Not valid: %r' % s)
        groups = m.groups('')
        self.name = groups[0].strip()
        self.key = self.name.lower()    # for case-insensitive comparisons
        clist = []
        if groups[2]:
            constraints = [c.strip() for c in groups[2].split(',')]
            for c in constraints:
                m = self.comp_re.match(c)
                if not m:
                    raise ValueError('Invalid %r in %r' % (c, s))
                groups = m.groups()
                op = groups[0] or '~='
                s = groups[1]
                if s.endswith('.*'):
                    if op not in ('==', '!='):
                        raise ValueError('\'.*\' not allowed for '
                                         '%r constraints' % op)
                    # Could be a partial version (e.g. for '2.*') which
                    # won't parse as a version, so keep it as a string
                    vn, prefix = s[:-2], True
                    if not self.num_re.match(vn):
                        # Just to check that vn is a valid version
                        self.version_class(vn)
                else:
                    # Should parse as a version, so we can create an
                    # instance for the comparison
                    vn, prefix = self.version_class(s), False
                clist.append((op, vn, prefix))
        self._parts = tuple(clist)

    def match(self, version):
        """
        Check if the provided version matches the constraints.

        :param version: The version to match against this instance.
        :type version: Strring or :class:`Version` instance.
        """
        if isinstance(version, string_types):
            version = self.version_class(version)
        for operator, constraint, prefix in self._parts:
            f = self._operators.get(operator)
            if isinstance(f, string_types):
                f = getattr(self, f)
            if not f:
                msg = ('%r not implemented '
                       'for %s' % (operator, self.__class__.__name__))
                raise NotImplementedError(msg)
            if not f(version, constraint, prefix):
                return False
        return True

    @property
    def exact_version(self):
        result = None
        if len(self._parts) == 1 and self._parts[0][0] == '==':
            result = self._parts[0][1]
        return result

    def _check_compatible(self, other):
        if type(self) != type(other) or self.name != other.name:
            raise TypeError('cannot compare %s and %s' % (self, other))

    def __eq__(self, other):
        self._check_compatible(other)
        return self.key == other.key and self._parts == other._parts

    def __ne__(self, other):
        return not self.__eq__(other)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    def __hash__(self):
        return hash(self.key) + hash(self._parts)

    def __repr__(self):
        return "%s(%r)" % (self.__class__.__name__, self._string)

    def __str__(self):
        return self._string


PEP426_VERSION_RE = re.compile(r'^(\d+(\.\d+)*)((a|b|c|rc)(\d+))?'
                               r'(\.(post)(\d+))?(\.(dev)(\d+))?'
                               r'(-(\d+(\.\d+)?))?$')


def _pep426_key(s):
    s = s.strip()
    m = PEP426_VERSION_RE.match(s)
    if not m:
        raise UnsupportedVersionError('Not a valid version: %s' % s)
    groups = m.groups()
    nums = tuple(int(v) for v in groups[0].split('.'))
    while len(nums) > 1 and nums[-1] == 0:
        nums = nums[:-1]

    pre = groups[3:5]
    post = groups[6:8]
    dev = groups[9:11]
    local = groups[12]
    if pre == (None, None):
        pre = ()
    else:
        pre = pre[0], int(pre[1])
    if post == (None, None):
        post = ()
    else:
        post = post[0], int(post[1])
    if dev == (None, None):
        dev = ()
    else:
        dev = dev[0], int(dev[1])
    if local is None:
        local = ()
    else:
        local = tuple([int(s) for s in local.split('.')])
    if not pre:
        # either before pre-release, or final release and after
        if not post and dev:
            # before pre-release
            pre = ('a', -1)     # to sort before a0
        else:
            pre = ('z',)        # to sort after all pre-releases
    # now look at the state of post and dev.
    if not post:
        post = ('_',)   # sort before 'a'
    if not dev:
        dev = ('final',)

    #print('%s -> %s' % (s, m.groups()))
    return nums, pre, post, dev, local


_normalized_key = _pep426_key


class NormalizedVersion(Version):
    """A rational version.

    Good:
        1.2         # equivalent to "1.2.0"
        1.2.0
        1.2a1
        1.2.3a2
        1.2.3b1
        1.2.3c1
        1.2.3.4
        TODO: fill this out

    Bad:
        1           # mininum two numbers
        1.2a        # release level must have a release serial
        1.2.3b
    """
    def parse(self, s):
        result = _normalized_key(s)
        # _normalized_key loses trailing zeroes in the release
        # clause, since that's needed to ensure that X.Y == X.Y.0 == X.Y.0.0
        # However, PEP 440 prefix matching needs it: for example,
        # (~= 1.4.5.0) matches differently to (~= 1.4.5.0.0).
        m = PEP426_VERSION_RE.match(s)      # must succeed
        groups = m.groups()
        self._release_clause = tuple(int(v) for v in groups[0].split('.'))
        return result

    PREREL_TAGS = set(['a', 'b', 'c', 'rc', 'dev'])

    @property
    def is_prerelease(self):
        return any(t[0] in self.PREREL_TAGS for t in self._parts if t)


def _match_prefix(x, y):
    x = str(x)
    y = str(y)
    if x == y:
        return True
    if not x.startswith(y):
        return False
    n = len(y)
    return x[n] == '.'


class NormalizedMatcher(Matcher):
    version_class = NormalizedVersion

    # value is either a callable or the name of a method
    _operators = {
        '~=': '_match_compatible',
        '<': '_match_lt',
        '>': '_match_gt',
        '<=': '_match_le',
        '>=': '_match_ge',
        '==': '_match_eq',
        '!=': '_match_ne',
    }

    def _adjust_local(self, version, constraint, prefix):
        if prefix:
            strip_local = '-' not in constraint and version._parts[-1]
        else:
            # both constraint and version are
            # NormalizedVersion instances.
            # If constraint does not have a local component,
            # ensure the version doesn't, either.
            strip_local = not constraint._parts[-1] and version._parts[-1]
        if strip_local:
            s = version._string.split('-', 1)[0]
            version = self.version_class(s)
        return version, constraint

    def _match_lt(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version >= constraint:
            return False
        release_clause = constraint._release_clause
        pfx = '.'.join([str(i) for i in release_clause])
        return not _match_prefix(version, pfx)

    def _match_gt(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version <= constraint:
            return False
        release_clause = constraint._release_clause
        pfx = '.'.join([str(i) for i in release_clause])
        return not _match_prefix(version, pfx)

    def _match_le(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        return version <= constraint

    def _match_ge(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        return version >= constraint

    def _match_eq(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if not prefix:
            result = (version == constraint)
        else:
            result = _match_prefix(version, constraint)
        return result

    def _match_ne(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if not prefix:
            result = (version != constraint)
        else:
            result = not _match_prefix(version, constraint)
        return result

    def _match_compatible(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version == constraint:
            return True
        if version < constraint:
            return False
        release_clause = constraint._release_clause
        if len(release_clause) > 1:
            release_clause = release_clause[:-1]
        pfx = '.'.join([str(i) for i in release_clause])
        return _match_prefix(version, pfx)

_REPLACEMENTS = (
    (re.compile('[.+-]$'), ''),                     # remove trailing puncts
    (re.compile(r'^[.](\d)'), r'0.\1'),             # .N -> 0.N at start
    (re.compile('^[.-]'), ''),                      # remove leading puncts
    (re.compile(r'^\((.*)\)$'), r'\1'),             # remove parentheses
    (re.compile(r'^v(ersion)?\s*(\d+)'), r'\2'),    # remove leading v(ersion)
    (re.compile(r'^r(ev)?\s*(\d+)'), r'\2'),        # remove leading v(ersion)
    (re.compile('[.]{2,}'), '.'),                   # multiple runs of '.'
    (re.compile(r'\b(alfa|apha)\b'), 'alpha'),      # misspelt alpha
    (re.compile(r'\b(pre-alpha|prealpha)\b'),
                'pre.alpha'),                       # standardise
    (re.compile(r'\(beta\)$'), 'beta'),             # remove parentheses
)

_SUFFIX_REPLACEMENTS = (
    (re.compile('^[:~._+-]+'), ''),                   # remove leading puncts
    (re.compile('[,*")([\]]'), ''),                   # remove unwanted chars
    (re.compile('[~:+_ -]'), '.'),                    # replace illegal chars
    (re.compile('[.]{2,}'), '.'),                   # multiple runs of '.'
    (re.compile(r'\.$'), ''),                       # trailing '.'
)

_NUMERIC_PREFIX = re.compile(r'(\d+(\.\d+)*)')


def _suggest_semantic_version(s):
    """
    Try to suggest a semantic form for a version for which
    _suggest_normalized_version couldn't come up with anything.
    """
    result = s.strip().lower()
    for pat, repl in _REPLACEMENTS:
        result = pat.sub(repl, result)
    if not result:
        result = '0.0.0'

    # Now look for numeric prefix, and separate it out from
    # the rest.
    #import pdb; pdb.set_trace()
    m = _NUMERIC_PREFIX.match(result)
    if not m:
        prefix = '0.0.0'
        suffix = result
    else:
        prefix = m.groups()[0].split('.')
        prefix = [int(i) for i in prefix]
        while len(prefix) < 3:
            prefix.append(0)
        if len(prefix) == 3:
            suffix = result[m.end():]
        else:
            suffix = '.'.join([str(i) for i in prefix[3:]]) + result[m.end():]
            prefix = prefix[:3]
        prefix = '.'.join([str(i) for i in prefix])
        suffix = suffix.strip()
    if suffix:
        #import pdb; pdb.set_trace()
        # massage the suffix.
        for pat, repl in _SUFFIX_REPLACEMENTS:
            suffix = pat.sub(repl, suffix)

    if not suffix:
        result = prefix
    else:
        sep = '-' if 'dev' in suffix else '+'
        result = prefix + sep + suffix
    if not is_semver(result):
        result = None
    return result


def _suggest_normalized_version(s):
    """Suggest a normalized version close to the given version string.

    If you have a version string that isn't rational (i.e. NormalizedVersion
    doesn't like it) then you might be able to get an equivalent (or close)
    rational version from this function.

    This does a number of simple normalizations to the given string, based
    on observation of versions currently in use on PyPI. Given a dump of
    those version during PyCon 2009, 4287 of them:
    - 2312 (53.93%) match NormalizedVersion without change
      with the automatic suggestion
    - 3474 (81.04%) match when using this suggestion method

    @param s {str} An irrational version string.
    @returns A rational version string, or None, if couldn't determine one.
    """
    try:
        _normalized_key(s)
        return s   # already rational
    except UnsupportedVersionError:
        pass

    rs = s.lower()

    # part of this could use maketrans
    for orig, repl in (('-alpha', 'a'), ('-beta', 'b'), ('alpha', 'a'),
                       ('beta', 'b'), ('rc', 'c'), ('-final', ''),
                       ('-pre', 'c'),
                       ('-release', ''), ('.release', ''), ('-stable', ''),
                       ('+', '.'), ('_', '.'), (' ', ''), ('.final', ''),
                       ('final', '')):
        rs = rs.replace(orig, repl)

    # if something ends with dev or pre, we add a 0
    rs = re.sub(r"pre$", r"pre0", rs)
    rs = re.sub(r"dev$", r"dev0", rs)

    # if we have something like "b-2" or "a.2" at the end of the
    # version, that is pobably beta, alpha, etc
    # let's remove the dash or dot
    rs = re.sub(r"([abc]|rc)[\-\.](\d+)$", r"\1\2", rs)

    # 1.0-dev-r371 -> 1.0.dev371
    # 0.1-dev-r79 -> 0.1.dev79
    rs = re.sub(r"[\-\.](dev)[\-\.]?r?(\d+)$", r".\1\2", rs)

    # Clean: 2.0.a.3, 2.0.b1, 0.9.0~c1
    rs = re.sub(r"[.~]?([abc])\.?", r"\1", rs)

    # Clean: v0.3, v1.0
    if rs.startswith('v'):
        rs = rs[1:]

    # Clean leading '0's on numbers.
    #TODO: unintended side-effect on, e.g., "2003.05.09"
    # PyPI stats: 77 (~2%) better
    rs = re.sub(r"\b0+(\d+)(?!\d)", r"\1", rs)

    # Clean a/b/c with no version. E.g. "1.0a" -> "1.0a0". Setuptools infers
    # zero.
    # PyPI stats: 245 (7.56%) better
    rs = re.sub(r"(\d+[abc])$", r"\g<1>0", rs)

    # the 'dev-rNNN' tag is a dev tag
    rs = re.sub(r"\.?(dev-r|dev\.r)\.?(\d+)$", r".dev\2", rs)

    # clean the - when used as a pre delimiter
    rs = re.sub(r"-(a|b|c)(\d+)$", r"\1\2", rs)

    # a terminal "dev" or "devel" can be changed into ".dev0"
    rs = re.sub(r"[\.\-](dev|devel)$", r".dev0", rs)

    # a terminal "dev" can be changed into ".dev0"
    rs = re.sub(r"(?![\.\-])dev$", r".dev0", rs)

    # a terminal "final" or "stable" can be removed
    rs = re.sub(r"(final|stable)$", "", rs)

    # The 'r' and the '-' tags are post release tags
    #   0.4a1.r10       ->  0.4a1.post10
    #   0.9.33-17222    ->  0.9.33.post17222
    #   0.9.33-r17222   ->  0.9.33.post17222
    rs = re.sub(r"\.?(r|-|-r)\.?(\d+)$", r".post\2", rs)

    # Clean 'r' instead of 'dev' usage:
    #   0.9.33+r17222   ->  0.9.33.dev17222
    #   1.0dev123       ->  1.0.dev123
    #   1.0.git123      ->  1.0.dev123
    #   1.0.bzr123      ->  1.0.dev123
    #   0.1a0dev.123    ->  0.1a0.dev123
    # PyPI stats:  ~150 (~4%) better
    rs = re.sub(r"\.?(dev|git|bzr)\.?(\d+)$", r".dev\2", rs)

    # Clean '.pre' (normalized from '-pre' above) instead of 'c' usage:
    #   0.2.pre1        ->  0.2c1
    #   0.2-c1         ->  0.2c1
    #   1.0preview123   ->  1.0c123
    # PyPI stats: ~21 (0.62%) better
    rs = re.sub(r"\.?(pre|preview|-c)(\d+)$", r"c\g<2>", rs)

    # Tcl/Tk uses "px" for their post release markers
    rs = re.sub(r"p(\d+)$", r".post\1", rs)

    try:
        _normalized_key(rs)
    except UnsupportedVersionError:
        rs = None
    return rs

#
#   Legacy version processing (distribute-compatible)
#

_VERSION_PART = re.compile(r'([a-z]+|\d+|[\.-])', re.I)
_VERSION_REPLACE = {
    'pre': 'c',
    'preview': 'c',
    '-': 'final-',
    'rc': 'c',
    'dev': '@',
    '': None,
    '.': None,
}


def _legacy_key(s):
    def get_parts(s):
        result = []
        for p in _VERSION_PART.split(s.lower()):
            p = _VERSION_REPLACE.get(p, p)
            if p:
                if '0' <= p[:1] <= '9':
                    p = p.zfill(8)
                else:
                    p = '*' + p
                result.append(p)
        result.append('*final')
        return result

    result = []
    for p in get_parts(s):
        if p.startswith('*'):
            if p < '*final':
                while result and result[-1] == '*final-':
                    result.pop()
            while result and result[-1] == '00000000':
                result.pop()
        result.append(p)
    return tuple(result)


class LegacyVersion(Version):
    def parse(self, s):
        return _legacy_key(s)

    @property
    def is_prerelease(self):
        result = False
        for x in self._parts:
            if (isinstance(x, string_types) and x.startswith('*') and
                x < '*final'):
                result = True
                break
        return result


class LegacyMatcher(Matcher):
    version_class = LegacyVersion

    _operators = dict(Matcher._operators)
    _operators['~='] = '_match_compatible'

    numeric_re = re.compile('^(\d+(\.\d+)*)')

    def _match_compatible(self, version, constraint, prefix):
        if version < constraint:
            return False
        m = self.numeric_re.match(str(constraint))
        if not m:
            logger.warning('Cannot compute compatible match for version %s '
                           ' and constraint %s', version, constraint)
            return True
        s = m.groups()[0]
        if '.' in s:
            s = s.rsplit('.', 1)[0]
        return _match_prefix(version, s)

#
#   Semantic versioning
#

_SEMVER_RE = re.compile(r'^(\d+)\.(\d+)\.(\d+)'
                        r'(-[a-z0-9]+(\.[a-z0-9-]+)*)?'
                        r'(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$', re.I)


def is_semver(s):
    return _SEMVER_RE.match(s)


def _semantic_key(s):
    def make_tuple(s, absent):
        if s is None:
            result = (absent,)
        else:
            parts = s[1:].split('.')
            # We can't compare ints and strings on Python 3, so fudge it
            # by zero-filling numeric values so simulate a numeric comparison
            result = tuple([p.zfill(8) if p.isdigit() else p for p in parts])
        return result

    m = is_semver(s)
    if not m:
        raise UnsupportedVersionError(s)
    groups = m.groups()
    major, minor, patch = [int(i) for i in groups[:3]]
    # choose the '|' and '*' so that versions sort correctly
    pre, build = make_tuple(groups[3], '|'), make_tuple(groups[5], '*')
    return (major, minor, patch), pre, build


class SemanticVersion(Version):
    def parse(self, s):
        return _semantic_key(s)

    @property
    def is_prerelease(self):
        return self._parts[1][0] != '|'


class SemanticMatcher(Matcher):
    version_class = SemanticVersion


class VersionScheme(object):
    def __init__(self, key, matcher, suggester=None):
        self.key = key
        self.matcher = matcher
        self.suggester = suggester

    def is_valid_version(self, s):
        try:
            self.matcher.version_class(s)
            result = True
        except UnsupportedVersionError:
            result = False
        return result

    def is_valid_matcher(self, s):
        try:
            self.matcher(s)
            result = True
        except UnsupportedVersionError:
            result = False
        return result

    def is_valid_constraint_list(self, s):
        """
        Used for processing some metadata fields
        """
        return self.is_valid_matcher('dummy_name (%s)' % s)

    def suggest(self, s):
        if self.suggester is None:
            result = None
        else:
            result = self.suggester(s)
        return result

_SCHEMES = {
    'normalized': VersionScheme(_normalized_key, NormalizedMatcher,
                                _suggest_normalized_version),
    'legacy': VersionScheme(_legacy_key, LegacyMatcher, lambda self, s: s),
    'semantic': VersionScheme(_semantic_key, SemanticMatcher,
                              _suggest_semantic_version),
}

_SCHEMES['default'] = _SCHEMES['normalized']


def get_scheme(name):
    if name not in _SCHEMES:
        raise ValueError('unknown scheme name: %r' % name)
    return _SCHEMES[name]
python3.3/site-packages/pip/_vendor/distlib/scripts.py000064400000030023151733566750016770 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from io import BytesIO
import logging
import os
import re
import struct
import sys

from .compat import sysconfig, fsencode, detect_encoding, ZipFile
from .resources import finder
from .util import (FileOperator, get_export_entry, convert_path,
                   get_executable, in_venv)

logger = logging.getLogger(__name__)

_DEFAULT_MANIFEST = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
 processorArchitecture="X86"
 name="%s"
 type="win32"/>

 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
 <requestedPrivileges>
 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
 </requestedPrivileges>
 </security>
 </trustInfo>
</assembly>'''.strip()

# check if Python is called on the first line with this expression
FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$')
SCRIPT_TEMPLATE = '''# -*- coding: utf-8 -*-
if __name__ == '__main__':
    import sys, re

    def _resolve(module, func):
        __import__(module)
        mod = sys.modules[module]
        parts = func.split('.')
        result = getattr(mod, parts.pop(0))
        for p in parts:
            result = getattr(result, p)
        return result

    try:
        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])

        func = _resolve('%(module)s', '%(func)s')
        rc = func() # None interpreted as 0
    except Exception as e:  # only supporting Python >= 2.6
        sys.stderr.write('%%s\\n' %% e)
        rc = 1
    sys.exit(rc)
'''


class ScriptMaker(object):
    """
    A class to copy or create scripts from source scripts or callable
    specifications.
    """
    script_template = SCRIPT_TEMPLATE

    executable = None  # for shebangs

    def __init__(self, source_dir, target_dir, add_launchers=True,
                 dry_run=False, fileop=None):
        self.source_dir = source_dir
        self.target_dir = target_dir
        self.add_launchers = add_launchers
        self.force = False
        self.clobber = False
        # It only makes sense to set mode bits on POSIX.
        self.set_mode = (os.name == 'posix')
        self.variants = set(('', 'X.Y'))
        self._fileop = fileop or FileOperator(dry_run)

    def _get_alternate_executable(self, executable, options):
        if options.get('gui', False) and os.name == 'nt':
            dn, fn = os.path.split(executable)
            fn = fn.replace('python', 'pythonw')
            executable = os.path.join(dn, fn)
        return executable

    def _get_shebang(self, encoding, post_interp=b'', options=None):
        enquote = True
        if self.executable:
            executable = self.executable
            enquote = False     # assume this will be taken care of
        elif not sysconfig.is_python_build():
            executable = get_executable()
        elif in_venv():
            executable = os.path.join(sysconfig.get_path('scripts'),
                            'python%s' % sysconfig.get_config_var('EXE'))
        else:
            executable = os.path.join(
                sysconfig.get_config_var('BINDIR'),
               'python%s%s' % (sysconfig.get_config_var('VERSION'),
                               sysconfig.get_config_var('EXE')))
        if options:
            executable = self._get_alternate_executable(executable, options)

        # If the user didn't specify an executable, it may be necessary to
        # cater for executable paths with spaces (not uncommon on Windows)
        if enquote and ' ' in executable:
            executable = '"%s"' % executable
        executable = fsencode(executable)
        shebang = b'#!' + executable + post_interp + b'\n'
        # Python parser starts to read a script using UTF-8 until
        # it gets a #coding:xxx cookie. The shebang has to be the
        # first line of a file, the #coding:xxx cookie cannot be
        # written before. So the shebang has to be decodable from
        # UTF-8.
        try:
            shebang.decode('utf-8')
        except UnicodeDecodeError:
            raise ValueError(
                'The shebang (%r) is not decodable from utf-8' % shebang)
        # If the script is encoded to a custom encoding (use a
        # #coding:xxx cookie), the shebang has to be decodable from
        # the script encoding too.
        if encoding != 'utf-8':
            try:
                shebang.decode(encoding)
            except UnicodeDecodeError:
                raise ValueError(
                    'The shebang (%r) is not decodable '
                    'from the script encoding (%r)' % (shebang, encoding))
        return shebang

    def _get_script_text(self, entry):
        return self.script_template % dict(module=entry.prefix,
                                           func=entry.suffix)

    manifest = _DEFAULT_MANIFEST

    def get_manifest(self, exename):
        base = os.path.basename(exename)
        return self.manifest % base

    def _write_script(self, names, shebang, script_bytes, filenames, ext):
        use_launcher = self.add_launchers and os.name == 'nt'
        linesep = os.linesep.encode('utf-8')
        if not use_launcher:
            script_bytes = shebang + linesep + script_bytes
        else:
            if ext == 'py':
                launcher = self._get_launcher('t')
            else:
                launcher = self._get_launcher('w')
            stream = BytesIO()
            with ZipFile(stream, 'w') as zf:
                zf.writestr('__main__.py', script_bytes)
            zip_data = stream.getvalue()
            script_bytes = launcher + shebang + linesep + zip_data
        for name in names:
            outname = os.path.join(self.target_dir, name)
            if use_launcher:
                n, e = os.path.splitext(outname)
                if e.startswith('.py'):
                    outname = n
                outname = '%s.exe' % outname
                try:
                    self._fileop.write_binary_file(outname, script_bytes)
                except Exception:
                    # Failed writing an executable - it might be in use.
                    logger.warning('Failed to write executable - trying to '
                                   'use .deleteme logic')
                    dfname = '%s.deleteme' % outname
                    if os.path.exists(dfname):
                        os.remove(dfname)       # Not allowed to fail here
                    os.rename(outname, dfname)  # nor here
                    self._fileop.write_binary_file(outname, script_bytes)
                    logger.debug('Able to replace executable using '
                                 '.deleteme logic')
                    try:
                        os.remove(dfname)
                    except Exception:
                        pass    # still in use - ignore error
            else:
                if os.name == 'nt' and not outname.endswith('.' + ext):
                    outname = '%s.%s' % (outname, ext)
                if os.path.exists(outname) and not self.clobber:
                    logger.warning('Skipping existing file %s', outname)
                    continue
                self._fileop.write_binary_file(outname, script_bytes)
                if self.set_mode:
                    self._fileop.set_executable_mode([outname])
            filenames.append(outname)

    def _make_script(self, entry, filenames, options=None):
        shebang = self._get_shebang('utf-8', options=options)
        script = self._get_script_text(entry).encode('utf-8')
        name = entry.name
        scriptnames = set()
        if '' in self.variants:
            scriptnames.add(name)
        if 'X' in self.variants:
            scriptnames.add('%s%s' % (name, sys.version[0]))
        if 'X.Y' in self.variants:
            scriptnames.add('%s-%s' % (name, sys.version[:3]))
        if options and options.get('gui', False):
            ext = 'pyw'
        else:
            ext = 'py'
        self._write_script(scriptnames, shebang, script, filenames, ext)

    def _copy_script(self, script, filenames):
        adjust = False
        script = os.path.join(self.source_dir, convert_path(script))
        outname = os.path.join(self.target_dir, os.path.basename(script))
        if not self.force and not self._fileop.newer(script, outname):
            logger.debug('not copying %s (up-to-date)', script)
            return

        # Always open the file, but ignore failures in dry-run mode --
        # that way, we'll get accurate feedback if we can read the
        # script.
        try:
            f = open(script, 'rb')
        except IOError:
            if not self.dry_run:
                raise
            f = None
        else:
            encoding, lines = detect_encoding(f.readline)
            f.seek(0)
            first_line = f.readline()
            if not first_line:
                logger.warning('%s: %s is an empty file (skipping)',
                               self.get_command_name(),  script)
                return

            match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n'))
            if match:
                adjust = True
                post_interp = match.group(1) or b''

        if not adjust:
            if f:
                f.close()
            self._fileop.copy_file(script, outname)
            if self.set_mode:
                self._fileop.set_executable_mode([outname])
            filenames.append(outname)
        else:
            logger.info('copying and adjusting %s -> %s', script,
                        self.target_dir)
            if not self._fileop.dry_run:
                shebang = self._get_shebang(encoding, post_interp)
                if b'pythonw' in first_line:
                    ext = 'pyw'
                else:
                    ext = 'py'
                n = os.path.basename(outname)
                self._write_script([n], shebang, f.read(), filenames, ext)
            if f:
                f.close()

    @property
    def dry_run(self):
        return self._fileop.dry_run

    @dry_run.setter
    def dry_run(self, value):
        self._fileop.dry_run = value

    if os.name == 'nt':
        # Executable launcher support.
        # Launchers are from https://bitbucket.org/vinay.sajip/simple_launcher/

        def _get_launcher(self, kind):
            if struct.calcsize('P') == 8:   # 64-bit
                bits = '64'
            else:
                bits = '32'
            name = '%s%s.exe' % (kind, bits)
            # Issue 31: don't hardcode an absolute package name, but
            # determine it relative to the current package
            distlib_package = __name__.rsplit('.', 1)[0]
            result = finder(distlib_package).find(name).bytes
            return result

    # Public API follows

    def make(self, specification, options=None):
        """
        Make a script.

        :param specification: The specification, which is either a valid export
                              entry specification (to make a script from a
                              callable) or a filename (to make a script by
                              copying from a source location).
        :param options: A dictionary of options controlling script generation.
        :return: A list of all absolute pathnames written to.
        """
        filenames = []
        entry = get_export_entry(specification)
        if entry is None:
            self._copy_script(specification, filenames)
        else:
            self._make_script(entry, filenames, options=options)
        return filenames

    def make_multiple(self, specifications, options=None):
        """
        Take a list of specifications and make scripts from them,
        :param specifications: A list of specifications.
        :return: A list of all absolute pathnames written to,
        """
        filenames = []
        for specification in specifications:
            filenames.extend(self.make(specification, options))
        return filenames
python3.3/site-packages/pip/_vendor/distlib/resources.py000064400000022330151733566750017315 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals

import bisect
import io
import logging
import os
import pkgutil
import shutil
import sys
import types
import zipimport

from . import DistlibException
from .util import cached_property, get_cache_base, path_to_cache_dir, Cache

logger = logging.getLogger(__name__)


cache = None    # created when needed


class ResourceCache(Cache):
    def __init__(self, base=None):
        if base is None:
            # Use native string to avoid issues on 2.x: see Python #20140.
            base = os.path.join(get_cache_base(), str('resource-cache'))
        super(ResourceCache, self).__init__(base)

    def is_stale(self, resource, path):
        """
        Is the cache stale for the given resource?

        :param resource: The :class:`Resource` being cached.
        :param path: The path of the resource in the cache.
        :return: True if the cache is stale.
        """
        # Cache invalidation is a hard problem :-)
        return True

    def get(self, resource):
        """
        Get a resource into the cache,

        :param resource: A :class:`Resource` instance.
        :return: The pathname of the resource in the cache.
        """
        prefix, path = resource.finder.get_cache_info(resource)
        if prefix is None:
            result = path
        else:
            result = os.path.join(self.base, self.prefix_to_dir(prefix), path)
            dirname = os.path.dirname(result)
            if not os.path.isdir(dirname):
                os.makedirs(dirname)
            if not os.path.exists(result):
                stale = True
            else:
                stale = self.is_stale(resource, path)
            if stale:
                # write the bytes of the resource to the cache location
                with open(result, 'wb') as f:
                    f.write(resource.bytes)
        return result


class ResourceBase(object):
    def __init__(self, finder, name):
        self.finder = finder
        self.name = name


class Resource(ResourceBase):
    """
    A class representing an in-package resource, such as a data file. This is
    not normally instantiated by user code, but rather by a
    :class:`ResourceFinder` which manages the resource.
    """
    is_container = False        # Backwards compatibility

    def as_stream(self):
        """
        Get the resource as a stream.

        This is not a property to make it obvious that it returns a new stream
        each time.
        """
        return self.finder.get_stream(self)

    @cached_property
    def file_path(self):
        global cache
        if cache is None:
            cache = ResourceCache()
        return cache.get(self)

    @cached_property
    def bytes(self):
        return self.finder.get_bytes(self)

    @cached_property
    def size(self):
        return self.finder.get_size(self)


class ResourceContainer(ResourceBase):
    is_container = True     # Backwards compatibility

    @cached_property
    def resources(self):
        return self.finder.get_resources(self)


class ResourceFinder(object):
    """
    Resource finder for file system resources.
    """
    def __init__(self, module):
        self.module = module
        self.loader = getattr(module, '__loader__', None)
        self.base = os.path.dirname(getattr(module, '__file__', ''))

    def _adjust_path(self, path):
        return os.path.realpath(path)

    def _make_path(self, resource_name):
        parts = resource_name.split('/')
        parts.insert(0, self.base)
        result = os.path.join(*parts)
        return self._adjust_path(result)

    def _find(self, path):
        return os.path.exists(path)

    def get_cache_info(self, resource):
        return None, resource.path

    def find(self, resource_name):
        path = self._make_path(resource_name)
        if not self._find(path):
            result = None
        else:
            if self._is_directory(path):
                result = ResourceContainer(self, resource_name)
            else:
                result = Resource(self, resource_name)
            result.path = path
        return result

    def get_stream(self, resource):
        return open(resource.path, 'rb')

    def get_bytes(self, resource):
        with open(resource.path, 'rb') as f:
            return f.read()

    def get_size(self, resource):
        return os.path.getsize(resource.path)

    def get_resources(self, resource):
        def allowed(f):
            return f != '__pycache__' and not f.endswith(('.pyc', '.pyo'))
        return set([f for f in os.listdir(resource.path) if allowed(f)])

    def is_container(self, resource):
        return self._is_directory(resource.path)

    _is_directory = staticmethod(os.path.isdir)


class ZipResourceFinder(ResourceFinder):
    """
    Resource finder for resources in .zip files.
    """
    def __init__(self, module):
        super(ZipResourceFinder, self).__init__(module)
        archive = self.loader.archive
        self.prefix_len = 1 + len(archive)
        # PyPy doesn't have a _files attr on zipimporter, and you can't set one
        if hasattr(self.loader, '_files'):
            self._files = self.loader._files
        else:
            self._files = zipimport._zip_directory_cache[archive]
        self.index = sorted(self._files)

    def _adjust_path(self, path):
        return path

    def _find(self, path):
        path = path[self.prefix_len:]
        if path in self._files:
            result = True
        else:
            if path and path[-1] != os.sep:
                path = path + os.sep
            i = bisect.bisect(self.index, path)
            try:
                result = self.index[i].startswith(path)
            except IndexError:
                result = False
        if not result:
            logger.debug('_find failed: %r %r', path, self.loader.prefix)
        else:
            logger.debug('_find worked: %r %r', path, self.loader.prefix)
        return result

    def get_cache_info(self, resource):
        prefix = self.loader.archive
        path = resource.path[1 + len(prefix):]
        return prefix, path

    def get_bytes(self, resource):
        return self.loader.get_data(resource.path)

    def get_stream(self, resource):
        return io.BytesIO(self.get_bytes(resource))

    def get_size(self, resource):
        path = resource.path[self.prefix_len:]
        return self._files[path][3]

    def get_resources(self, resource):
        path = resource.path[self.prefix_len:]
        if path and path[-1] != os.sep:
            path += os.sep
        plen = len(path)
        result = set()
        i = bisect.bisect(self.index, path)
        while i < len(self.index):
            if not self.index[i].startswith(path):
                break
            s = self.index[i][plen:]
            result.add(s.split(os.sep, 1)[0])   # only immediate children
            i += 1
        return result

    def _is_directory(self, path):
        path = path[self.prefix_len:]
        if path and path[-1] != os.sep:
            path += os.sep
        i = bisect.bisect(self.index, path)
        try:
            result = self.index[i].startswith(path)
        except IndexError:
            result = False
        return result

_finder_registry = {
    type(None): ResourceFinder,
    zipimport.zipimporter: ZipResourceFinder
}

try:
    import _frozen_importlib
    _finder_registry[_frozen_importlib.SourceFileLoader] = ResourceFinder
    _finder_registry[_frozen_importlib.FileFinder] = ResourceFinder
except (ImportError, AttributeError):
    pass


def register_finder(loader, finder_maker):
    _finder_registry[type(loader)] = finder_maker

_finder_cache = {}


def finder(package):
    """
    Return a resource finder for a package.
    :param package: The name of the package.
    :return: A :class:`ResourceFinder` instance for the package.
    """
    if package in _finder_cache:
        result = _finder_cache[package]
    else:
        if package not in sys.modules:
            __import__(package)
        module = sys.modules[package]
        path = getattr(module, '__path__', None)
        if path is None:
            raise DistlibException('You cannot get a finder for a module, '
                                   'only for a package')
        loader = getattr(module, '__loader__', None)
        finder_maker = _finder_registry.get(type(loader))
        if finder_maker is None:
            raise DistlibException('Unable to locate finder for %r' % package)
        result = finder_maker(module)
        _finder_cache[package] = result
    return result


_dummy_module = types.ModuleType(str('__dummy__'))


def finder_for_path(path):
    """
    Return a resource finder for a path, which should represent a container.

    :param path: The path.
    :return: A :class:`ResourceFinder` instance for the path.
    """
    result = None
    # calls any path hooks, gets importer into cache
    pkgutil.get_importer(path)
    loader = sys.path_importer_cache.get(path)
    finder = _finder_registry.get(type(loader))
    if finder:
        module = _dummy_module
        module.__file__ = os.path.join(path, '')
        module.__loader__ = loader
        result = finder(module)
    return result
python3.3/site-packages/pip/_vendor/distlib/index.py000064400000046024151733566750016420 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import hashlib
import logging
import os
import shutil
import subprocess
import tempfile
try:
    from threading import Thread
except ImportError:
    from dummy_threading import Thread

from . import DistlibException
from .compat import (HTTPBasicAuthHandler, Request, HTTPPasswordMgr,
                     urlparse, build_opener, string_types)
from .util import cached_property, zip_dir, ServerProxy

logger = logging.getLogger(__name__)

DEFAULT_INDEX = 'https://pypi.python.org/pypi'
DEFAULT_REALM = 'pypi'

class PackageIndex(object):
    """
    This class represents a package index compatible with PyPI, the Python
    Package Index.
    """

    boundary = b'----------ThIs_Is_tHe_distlib_index_bouNdaRY_$'

    def __init__(self, url=None):
        """
        Initialise an instance.

        :param url: The URL of the index. If not specified, the URL for PyPI is
                    used.
        """
        self.url = url or DEFAULT_INDEX
        self.read_configuration()
        scheme, netloc, path, params, query, frag = urlparse(self.url)
        if params or query or frag or scheme not in ('http', 'https'):
            raise DistlibException('invalid repository: %s' % self.url)
        self.password_handler = None
        self.ssl_verifier = None
        self.gpg = None
        self.gpg_home = None
        self.rpc_proxy = None
        with open(os.devnull, 'w') as sink:
            for s in ('gpg2', 'gpg'):
                try:
                    rc = subprocess.check_call([s, '--version'], stdout=sink,
                                               stderr=sink)
                    if rc == 0:
                        self.gpg = s
                        break
                except OSError:
                    pass

    def _get_pypirc_command(self):
        """
        Get the distutils command for interacting with PyPI configurations.
        :return: the command.
        """
        from distutils.core import Distribution
        from distutils.config import PyPIRCCommand
        d = Distribution()
        return PyPIRCCommand(d)

    def read_configuration(self):
        """
        Read the PyPI access configuration as supported by distutils, getting
        PyPI to do the acutal work. This populates ``username``, ``password``,
        ``realm`` and ``url`` attributes from the configuration.
        """
        # get distutils to do the work
        c = self._get_pypirc_command()
        c.repository = self.url
        cfg = c._read_pypirc()
        self.username = cfg.get('username')
        self.password = cfg.get('password')
        self.realm = cfg.get('realm', 'pypi')
        self.url = cfg.get('repository', self.url)

    def save_configuration(self):
        """
        Save the PyPI access configuration. You must have set ``username`` and
        ``password`` attributes before calling this method.

        Again, distutils is used to do the actual work.
        """
        self.check_credentials()
        # get distutils to do the work
        c = self._get_pypirc_command()
        c._store_pypirc(self.username, self.password)

    def check_credentials(self):
        """
        Check that ``username`` and ``password`` have been set, and raise an
        exception if not.
        """
        if self.username is None or self.password is None:
            raise DistlibException('username and password must be set')
        pm = HTTPPasswordMgr()
        _, netloc, _, _, _, _ = urlparse(self.url)
        pm.add_password(self.realm, netloc, self.username, self.password)
        self.password_handler = HTTPBasicAuthHandler(pm)

    def register(self, metadata):
        """
        Register a distribution on PyPI, using the provided metadata.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the distribution to be
                         registered.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        metadata.validate()
        d = metadata.todict()
        d[':action'] = 'verify'
        request = self.encode_request(d.items(), [])
        response = self.send_request(request)
        d[':action'] = 'submit'
        request = self.encode_request(d.items(), [])
        return self.send_request(request)

    def _reader(self, name, stream, outbuf):
        """
        Thread runner for reading lines of from a subprocess into a buffer.

        :param name: The logical name of the stream (used for logging only).
        :param stream: The stream to read from. This will typically a pipe
                       connected to the output stream of a subprocess.
        :param outbuf: The list to append the read lines to.
        """
        while True:
            s = stream.readline()
            if not s:
                break
            s = s.decode('utf-8').rstrip()
            outbuf.append(s)
            logger.debug('%s: %s' % (name, s))
        stream.close()

    def get_sign_command(self, filename, signer, sign_password):
        """
        Return a suitable command for signing a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The signing command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        """
        cmd = [self.gpg, '--status-fd', '2', '--no-tty']
        if self.gpg_home:
            cmd.extend(['--homedir', self.gpg_home])
        if sign_password is not None:
            cmd.extend(['--batch', '--passphrase-fd', '0'])
        td = tempfile.mkdtemp()
        sf = os.path.join(td, os.path.basename(filename) + '.asc')
        cmd.extend(['--detach-sign', '--armor', '--local-user',
                    signer, '--output', sf, filename])
        logger.debug('invoking: %s', ' '.join(cmd))
        return cmd, sf

    def run_command(self, cmd, input_data=None):
        """
        Run a command in a child process , passing it any input data specified.

        :param cmd: The command to run.
        :param input_data: If specified, this must be a byte string containing
                           data to be sent to the child process.
        :return: A tuple consisting of the subprocess' exit code, a list of
                 lines read from the subprocess' ``stdout``, and a list of
                 lines read from the subprocess' ``stderr``.
        """
        kwargs = {
            'stdout': subprocess.PIPE,
            'stderr': subprocess.PIPE,
        }
        if input_data is not None:
            kwargs['stdin'] = subprocess.PIPE
        stdout = []
        stderr = []
        p = subprocess.Popen(cmd, **kwargs)
        # We don't use communicate() here because we may need to
        # get clever with interacting with the command
        t1 = Thread(target=self._reader, args=('stdout', p.stdout, stdout))
        t1.start()
        t2 = Thread(target=self._reader, args=('stderr', p.stderr, stderr))
        t2.start()
        if input_data is not None:
            p.stdin.write(input_data)
            p.stdin.close()

        p.wait()
        t1.join()
        t2.join()
        return p.returncode, stdout, stderr

    def sign_file(self, filename, signer, sign_password):
        """
        Sign a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The absolute pathname of the file where the signature is
                 stored.
        """
        cmd, sig_file = self.get_sign_command(filename, signer, sign_password)
        rc, stdout, stderr = self.run_command(cmd,
                                              sign_password.encode('utf-8'))
        if rc != 0:
            raise DistlibException('sign command failed with error '
                                   'code %s' % rc)
        return sig_file

    def upload_file(self, metadata, filename, signer=None, sign_password=None,
                    filetype='sdist', pyversion='source'):
        """
        Upload a release file to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the file to be uploaded.
        :param filename: The pathname of the file to be uploaded.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param filetype: The type of the file being uploaded. This is the
                        distutils command which produced that file, e.g.
                        ``sdist`` or ``bdist_wheel``.
        :param pyversion: The version of Python which the release relates
                          to. For code compatible with any Python, this would
                          be ``source``, otherwise it would be e.g. ``3.2``.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        if not os.path.exists(filename):
            raise DistlibException('not found: %s' % filename)
        metadata.validate()
        d = metadata.todict()
        sig_file = None
        if signer:
            if not self.gpg:
                logger.warning('no signing program available - not signed')
            else:
                sig_file = self.sign_file(filename, signer, sign_password)
        with open(filename, 'rb') as f:
            file_data = f.read()
        md5_digest = hashlib.md5(file_data).hexdigest()
        sha256_digest = hashlib.sha256(file_data).hexdigest()
        d.update({
            ':action': 'file_upload',
            'protcol_version': '1',
            'filetype': filetype,
            'pyversion': pyversion,
            'md5_digest': md5_digest,
            'sha256_digest': sha256_digest,
        })
        files = [('content', os.path.basename(filename), file_data)]
        if sig_file:
            with open(sig_file, 'rb') as f:
                sig_data = f.read()
            files.append(('gpg_signature', os.path.basename(sig_file),
                         sig_data))
            shutil.rmtree(os.path.dirname(sig_file))
        request = self.encode_request(d.items(), files)
        return self.send_request(request)

    def upload_documentation(self, metadata, doc_dir):
        """
        Upload documentation to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the documentation to be
                         uploaded.
        :param doc_dir: The pathname of the directory which contains the
                        documentation. This should be the directory that
                        contains the ``index.html`` for the documentation.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        if not os.path.isdir(doc_dir):
            raise DistlibException('not a directory: %r' % doc_dir)
        fn = os.path.join(doc_dir, 'index.html')
        if not os.path.exists(fn):
            raise DistlibException('not found: %r' % fn)
        metadata.validate()
        name, version = metadata.name, metadata.version
        zip_data = zip_dir(doc_dir).getvalue()
        fields = [(':action', 'doc_upload'),
                  ('name', name), ('version', version)]
        files = [('content', name, zip_data)]
        request = self.encode_request(fields, files)
        return self.send_request(request)

    def get_verify_command(self, signature_filename, data_filename):
        """
        Return a suitable command for verifying a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: The verifying command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        """
        cmd = [self.gpg, '--status-fd', '2', '--no-tty']
        if self.gpg_home:
            cmd.extend(['--homedir', self.gpg_home])
        cmd.extend(['--verify', signature_filename, data_filename])
        logger.debug('invoking: %s', ' '.join(cmd))
        return cmd

    def verify_signature(self, signature_filename, data_filename):
        """
        Verify a signature for a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: True if the signature was verified, else False.
        """
        if not self.gpg:
            raise DistlibException('verification unavailable because gpg '
                                   'unavailable')
        cmd = self.get_verify_command(signature_filename, data_filename)
        rc, stdout, stderr = self.run_command(cmd)
        if rc not in (0, 1):
            raise DistlibException('verify command failed with error '
                             'code %s' % rc)
        return rc == 0

    def download_file(self, url, destfile, digest=None, reporthook=None):
        """
        This is a convenience method for downloading a file from an URL.
        Normally, this will be a file from the index, though currently
        no check is made for this (i.e. a file can be downloaded from
        anywhere).

        The method is just like the :func:`urlretrieve` function in the
        standard library, except that it allows digest computation to be
        done during download and checking that the downloaded data
        matched any expected value.

        :param url: The URL of the file to be downloaded (assumed to be
                    available via an HTTP GET request).
        :param destfile: The pathname where the downloaded file is to be
                         saved.
        :param digest: If specified, this must be a (hasher, value)
                       tuple, where hasher is the algorithm used (e.g.
                       ``'md5'``) and ``value`` is the expected value.
        :param reporthook: The same as for :func:`urlretrieve` in the
                           standard library.
        """
        if digest is None:
            digester = None
            logger.debug('No digest specified')
        else:
            if isinstance(digest, (list, tuple)):
                hasher, digest = digest
            else:
                hasher = 'md5'
            digester = getattr(hashlib, hasher)()
            logger.debug('Digest specified: %s' % digest)
        # The following code is equivalent to urlretrieve.
        # We need to do it this way so that we can compute the
        # digest of the file as we go.
        with open(destfile, 'wb') as dfp:
            # addinfourl is not a context manager on 2.x
            # so we have to use try/finally
            sfp = self.send_request(Request(url))
            try:
                headers = sfp.info()
                blocksize = 8192
                size = -1
                read = 0
                blocknum = 0
                if "content-length" in headers:
                    size = int(headers["Content-Length"])
                if reporthook:
                    reporthook(blocknum, blocksize, size)
                while True:
                    block = sfp.read(blocksize)
                    if not block:
                        break
                    read += len(block)
                    dfp.write(block)
                    if digester:
                        digester.update(block)
                    blocknum += 1
                    if reporthook:
                        reporthook(blocknum, blocksize, size)
            finally:
                sfp.close()

        # check that we got the whole file, if we can
        if size >= 0 and read < size:
            raise DistlibException(
                'retrieval incomplete: got only %d out of %d bytes'
                % (read, size))
        # if we have a digest, it must match.
        if digester:
            actual = digester.hexdigest()
            if digest != actual:
                raise DistlibException('%s digest mismatch for %s: expected '
                                       '%s, got %s' % (hasher, destfile,
                                                       digest, actual))
            logger.debug('Digest verified: %s', digest)

    def send_request(self, req):
        """
        Send a standard library :class:`Request` to PyPI and return its
        response.

        :param req: The request to send.
        :return: The HTTP response from PyPI (a standard library HTTPResponse).
        """
        handlers = []
        if self.password_handler:
            handlers.append(self.password_handler)
        if self.ssl_verifier:
            handlers.append(self.ssl_verifier)
        opener = build_opener(*handlers)
        return opener.open(req)

    def encode_request(self, fields, files):
        """
        Encode fields and files for posting to an HTTP server.

        :param fields: The fields to send as a list of (fieldname, value)
                       tuples.
        :param files: The files to send as a list of (fieldname, filename,
                      file_bytes) tuple.
        """
        # Adapted from packaging, which in turn was adapted from
        # http://code.activestate.com/recipes/146306

        parts = []
        boundary = self.boundary
        for k, values in fields:
            if not isinstance(values, (list, tuple)):
                values = [values]

            for v in values:
                parts.extend((
                    b'--' + boundary,
                    ('Content-Disposition: form-data; name="%s"' %
                     k).encode('utf-8'),
                    b'',
                    v.encode('utf-8')))
        for key, filename, value in files:
            parts.extend((
                b'--' + boundary,
                ('Content-Disposition: form-data; name="%s"; filename="%s"' %
                 (key, filename)).encode('utf-8'),
                b'',
                value))

        parts.extend((b'--' + boundary + b'--', b''))

        body = b'\r\n'.join(parts)
        ct = b'multipart/form-data; boundary=' + boundary
        headers = {
            'Content-type': ct,
            'Content-length': str(len(body))
        }
        return Request(self.url, body, headers)

    def search(self, terms, operator=None):
        if isinstance(terms, string_types):
            terms = {'name': terms}
        if self.rpc_proxy is None:
            self.rpc_proxy = ServerProxy(self.url, timeout=3.0)
        return self.rpc_proxy.search(terms, operator or 'and')
python3.3/site-packages/pip/_vendor/distlib/database.py000064400000137762151733566750017067 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""PEP 376 implementation."""

from __future__ import unicode_literals

import base64
import codecs
import contextlib
import hashlib
import logging
import os
import posixpath
import sys
import zipimport

from . import DistlibException, resources
from .compat import StringIO
from .version import get_scheme, UnsupportedVersionError
from .metadata import Metadata, METADATA_FILENAME
from .util import (parse_requirement, cached_property, parse_name_and_version,
                   read_exports, write_exports, CSVReader, CSVWriter)


__all__ = ['Distribution', 'BaseInstalledDistribution',
           'InstalledDistribution', 'EggInfoDistribution',
           'DistributionPath']


logger = logging.getLogger(__name__)

EXPORTS_FILENAME = 'pydist-exports.json'
COMMANDS_FILENAME = 'pydist-commands.json'

DIST_FILES = ('INSTALLER', METADATA_FILENAME, 'RECORD', 'REQUESTED',
              'RESOURCES', EXPORTS_FILENAME, 'SHARED')

DISTINFO_EXT = '.dist-info'


class _Cache(object):
    """
    A simple cache mapping names and .dist-info paths to distributions
    """
    def __init__(self):
        """
        Initialise an instance. There is normally one for each DistributionPath.
        """
        self.name = {}
        self.path = {}
        self.generated = False

    def clear(self):
        """
        Clear the cache, setting it to its initial state.
        """
        self.name.clear()
        self.path.clear()
        self.generated = False

    def add(self, dist):
        """
        Add a distribution to the cache.
        :param dist: The distribution to add.
        """
        if dist.path not in self.path:
            self.path[dist.path] = dist
            self.name.setdefault(dist.key, []).append(dist)


class DistributionPath(object):
    """
    Represents a set of distributions installed on a path (typically sys.path).
    """
    def __init__(self, path=None, include_egg=False):
        """
        Create an instance from a path, optionally including legacy (distutils/
        setuptools/distribute) distributions.
        :param path: The path to use, as a list of directories. If not specified,
                     sys.path is used.
        :param include_egg: If True, this instance will look for and return legacy
                            distributions as well as those based on PEP 376.
        """
        if path is None:
            path = sys.path
        self.path = path
        self._include_dist = True
        self._include_egg = include_egg

        self._cache = _Cache()
        self._cache_egg = _Cache()
        self._cache_enabled = True
        self._scheme = get_scheme('default')

    def _get_cache_enabled(self):
        return self._cache_enabled

    def _set_cache_enabled(self, value):
        self._cache_enabled = value

    cache_enabled = property(_get_cache_enabled, _set_cache_enabled)

    def clear_cache(self):
        """
        Clears the internal cache.
        """
        self._cache.clear()
        self._cache_egg.clear()


    def _yield_distributions(self):
        """
        Yield .dist-info and/or .egg(-info) distributions.
        """
        # We need to check if we've seen some resources already, because on
        # some Linux systems (e.g. some Debian/Ubuntu variants) there are
        # symlinks which alias other files in the environment.
        seen = set()
        for path in self.path:
            finder = resources.finder_for_path(path)
            if finder is None:
                continue
            r = finder.find('')
            if not r or not r.is_container:
                continue
            rset = sorted(r.resources)
            for entry in rset:
                r = finder.find(entry)
                if not r or r.path in seen:
                    continue
                if self._include_dist and entry.endswith(DISTINFO_EXT):
                    metadata_path = posixpath.join(entry, METADATA_FILENAME)
                    pydist = finder.find(metadata_path)
                    if not pydist:
                        continue

                    metadata = Metadata(fileobj=pydist.as_stream(),
                                        scheme='legacy')
                    logger.debug('Found %s', r.path)
                    seen.add(r.path)
                    yield new_dist_class(r.path, metadata=metadata,
                                         env=self)
                elif self._include_egg and entry.endswith(('.egg-info',
                                                          '.egg')):
                    logger.debug('Found %s', r.path)
                    seen.add(r.path)
                    yield old_dist_class(r.path, self)

    def _generate_cache(self):
        """
        Scan the path for distributions and populate the cache with
        those that are found.
        """
        gen_dist = not self._cache.generated
        gen_egg = self._include_egg and not self._cache_egg.generated
        if gen_dist or gen_egg:
            for dist in self._yield_distributions():
                if isinstance(dist, InstalledDistribution):
                    self._cache.add(dist)
                else:
                    self._cache_egg.add(dist)

            if gen_dist:
                self._cache.generated = True
            if gen_egg:
                self._cache_egg.generated = True

    @classmethod
    def distinfo_dirname(cls, name, version):
        """
        The *name* and *version* parameters are converted into their
        filename-escaped form, i.e. any ``'-'`` characters are replaced
        with ``'_'`` other than the one in ``'dist-info'`` and the one
        separating the name from the version number.

        :parameter name: is converted to a standard distribution name by replacing
                         any runs of non- alphanumeric characters with a single
                         ``'-'``.
        :type name: string
        :parameter version: is converted to a standard version string. Spaces
                            become dots, and all other non-alphanumeric characters
                            (except dots) become dashes, with runs of multiple
                            dashes condensed to a single dash.
        :type version: string
        :returns: directory name
        :rtype: string"""
        name = name.replace('-', '_')
        return '-'.join([name, version]) + DISTINFO_EXT

    def get_distributions(self):
        """
        Provides an iterator that looks for distributions and returns
        :class:`InstalledDistribution` or
        :class:`EggInfoDistribution` instances for each one of them.

        :rtype: iterator of :class:`InstalledDistribution` and
                :class:`EggInfoDistribution` instances
        """
        if not self._cache_enabled:
            for dist in self._yield_distributions():
                yield dist
        else:
            self._generate_cache()

            for dist in self._cache.path.values():
                yield dist

            if self._include_egg:
                for dist in self._cache_egg.path.values():
                    yield dist

    def get_distribution(self, name):
        """
        Looks for a named distribution on the path.

        This function only returns the first result found, as no more than one
        value is expected. If nothing is found, ``None`` is returned.

        :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
                or ``None``
        """
        result = None
        name = name.lower()
        if not self._cache_enabled:
            for dist in self._yield_distributions():
                if dist.key == name:
                    result = dist
                    break
        else:
            self._generate_cache()

            if name in self._cache.name:
                result = self._cache.name[name][0]
            elif self._include_egg and name in self._cache_egg.name:
                result = self._cache_egg.name[name][0]
        return result

    def provides_distribution(self, name, version=None):
        """
        Iterates over all distributions to find which distributions provide *name*.
        If a *version* is provided, it will be used to filter the results.

        This function only returns the first result found, since no more than
        one values are expected. If the directory is not found, returns ``None``.

        :parameter version: a version specifier that indicates the version
                            required, conforming to the format in ``PEP-345``

        :type name: string
        :type version: string
        """
        matcher = None
        if not version is None:
            try:
                matcher = self._scheme.matcher('%s (%s)' % (name, version))
            except ValueError:
                raise DistlibException('invalid name or version: %r, %r' %
                                      (name, version))

        for dist in self.get_distributions():
            provided = dist.provides

            for p in provided:
                p_name, p_ver = parse_name_and_version(p)
                if matcher is None:
                    if p_name == name:
                        yield dist
                        break
                else:
                    if p_name == name and matcher.match(p_ver):
                        yield dist
                        break

    def get_file_path(self, name, relative_path):
        """
        Return the path to a resource file.
        """
        dist = self.get_distribution(name)
        if dist is None:
            raise LookupError('no distribution named %r found' % name)
        return dist.get_resource_path(relative_path)

    def get_exported_entries(self, category, name=None):
        """
        Return all of the exported entries in a particular category.

        :param category: The category to search for entries.
        :param name: If specified, only entries with that name are returned.
        """
        for dist in self.get_distributions():
            r = dist.exports
            if category in r:
                d = r[category]
                if name is not None:
                    if name in d:
                        yield d[name]
                else:
                    for v in d.values():
                        yield v


class Distribution(object):
    """
    A base class for distributions, whether installed or from indexes.
    Either way, it must have some metadata, so that's all that's needed
    for construction.
    """

    build_time_dependency = False
    """
    Set to True if it's known to be only a build-time dependency (i.e.
    not needed after installation).
    """

    requested = False
    """A boolean that indicates whether the ``REQUESTED`` metadata file is
    present (in other words, whether the package was installed by user
    request or it was installed as a dependency)."""

    def __init__(self, metadata):
        """
        Initialise an instance.
        :param metadata: The instance of :class:`Metadata` describing this
        distribution.
        """
        self.metadata = metadata
        self.name = metadata.name
        self.key = self.name.lower()    # for case-insensitive comparisons
        self.version = metadata.version
        self.locator = None
        self.digest = None
        self.extras = None      # additional features requested
        self.context = None     # environment marker overrides

    @property
    def source_url(self):
        """
        The source archive download URL for this distribution.
        """
        return self.metadata.source_url

    download_url = source_url   # Backward compatibility

    @property
    def name_and_version(self):
        """
        A utility property which displays the name and version in parentheses.
        """
        return '%s (%s)' % (self.name, self.version)

    @property
    def provides(self):
        """
        A set of distribution names and versions provided by this distribution.
        :return: A set of "name (version)" strings.
        """
        plist = self.metadata.provides
        s = '%s (%s)' % (self.name, self.version)
        if s not in plist:
            plist.append(s)
        return plist

    def _get_requirements(self, req_attr):
        reqts = getattr(self.metadata, req_attr)
        return set(self.metadata.get_requirements(reqts, extras=self.extras,
                                                  env=self.context))

    @property
    def run_requires(self):
        return self._get_requirements('run_requires')

    @property
    def meta_requires(self):
        return self._get_requirements('meta_requires')

    @property
    def build_requires(self):
        return self._get_requirements('build_requires')

    @property
    def test_requires(self):
        return self._get_requirements('test_requires')

    @property
    def dev_requires(self):
        return self._get_requirements('dev_requires')

    def matches_requirement(self, req):
        """
        Say if this instance matches (fulfills) a requirement.
        :param req: The requirement to match.
        :rtype req: str
        :return: True if it matches, else False.
        """
        # Requirement may contain extras - parse to lose those
        # from what's passed to the matcher
        r = parse_requirement(req)
        scheme = get_scheme(self.metadata.scheme)
        try:
            matcher = scheme.matcher(r.requirement)
        except UnsupportedVersionError:
            # XXX compat-mode if cannot read the version
            logger.warning('could not read version %r - using name only',
                           req)
            name = req.split()[0]
            matcher = scheme.matcher(name)

        name = matcher.key   # case-insensitive

        result = False
        for p in self.provides:
            p_name, p_ver = parse_name_and_version(p)
            if p_name != name:
                continue
            try:
                result = matcher.match(p_ver)
                break
            except UnsupportedVersionError:
                pass
        return result

    def __repr__(self):
        """
        Return a textual representation of this instance,
        """
        if self.source_url:
            suffix = ' [%s]' % self.source_url
        else:
            suffix = ''
        return '<Distribution %s (%s)%s>' % (self.name, self.version, suffix)

    def __eq__(self, other):
        """
        See if this distribution is the same as another.
        :param other: The distribution to compare with. To be equal to one
                      another. distributions must have the same type, name,
                      version and source_url.
        :return: True if it is the same, else False.
        """
        if type(other) is not type(self):
            result = False
        else:
            result = (self.name == other.name and
                      self.version == other.version and
                      self.source_url == other.source_url)
        return result

    def __hash__(self):
        """
        Compute hash in a way which matches the equality test.
        """
        return hash(self.name) + hash(self.version) + hash(self.source_url)


class BaseInstalledDistribution(Distribution):
    """
    This is the base class for installed distributions (whether PEP 376 or
    legacy).
    """

    hasher = None

    def __init__(self, metadata, path, env=None):
        """
        Initialise an instance.
        :param metadata: An instance of :class:`Metadata` which describes the
                         distribution. This will normally have been initialised
                         from a metadata file in the ``path``.
        :param path:     The path of the ``.dist-info`` or ``.egg-info``
                         directory for the distribution.
        :param env:      This is normally the :class:`DistributionPath`
                         instance where this distribution was found.
        """
        super(BaseInstalledDistribution, self).__init__(metadata)
        self.path = path
        self.dist_path = env

    def get_hash(self, data, hasher=None):
        """
        Get the hash of some data, using a particular hash algorithm, if
        specified.

        :param data: The data to be hashed.
        :type data: bytes
        :param hasher: The name of a hash implementation, supported by hashlib,
                       or ``None``. Examples of valid values are ``'sha1'``,
                       ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
                       ``'sha512'``. If no hasher is specified, the ``hasher``
                       attribute of the :class:`InstalledDistribution` instance
                       is used. If the hasher is determined to be ``None``, MD5
                       is used as the hashing algorithm.
        :returns: The hash of the data. If a hasher was explicitly specified,
                  the returned hash will be prefixed with the specified hasher
                  followed by '='.
        :rtype: str
        """
        if hasher is None:
            hasher = self.hasher
        if hasher is None:
            hasher = hashlib.md5
            prefix = ''
        else:
            hasher = getattr(hashlib, hasher)
            prefix = '%s=' % self.hasher
        digest = hasher(data).digest()
        digest = base64.urlsafe_b64encode(digest).rstrip(b'=').decode('ascii')
        return '%s%s' % (prefix, digest)


class InstalledDistribution(BaseInstalledDistribution):
    """
    Created with the *path* of the ``.dist-info`` directory provided to the
    constructor. It reads the metadata contained in ``pydist.json`` when it is
    instantiated., or uses a passed in Metadata instance (useful for when
    dry-run mode is being used).
    """

    hasher = 'sha256'

    def __init__(self, path, metadata=None, env=None):
        self.finder = finder = resources.finder_for_path(path)
        if finder is None:
            import pdb; pdb.set_trace ()
        if env and env._cache_enabled and path in env._cache.path:
            metadata = env._cache.path[path].metadata
        elif metadata is None:
            r = finder.find(METADATA_FILENAME)
            # Temporary - for legacy support
            if r is None:
                r = finder.find('METADATA')
            if r is None:
                raise ValueError('no %s found in %s' % (METADATA_FILENAME,
                                                        path))
            with contextlib.closing(r.as_stream()) as stream:
                metadata = Metadata(fileobj=stream, scheme='legacy')

        super(InstalledDistribution, self).__init__(metadata, path, env)

        if env and env._cache_enabled:
            env._cache.add(self)

        try:
            r = finder.find('REQUESTED')
        except AttributeError:
            import pdb; pdb.set_trace ()
        self.requested = r is not None

    def __repr__(self):
        return '<InstalledDistribution %r %s at %r>' % (
            self.name, self.version, self.path)

    def __str__(self):
        return "%s %s" % (self.name, self.version)

    def _get_records(self):
        """
        Get the list of installed files for the distribution
        :return: A list of tuples of path, hash and size. Note that hash and
                 size might be ``None`` for some entries. The path is exactly
                 as stored in the file (which is as in PEP 376).
        """
        results = []
        r = self.get_distinfo_resource('RECORD')
        with contextlib.closing(r.as_stream()) as stream:
            with CSVReader(stream=stream) as record_reader:
                # Base location is parent dir of .dist-info dir
                #base_location = os.path.dirname(self.path)
                #base_location = os.path.abspath(base_location)
                for row in record_reader:
                    missing = [None for i in range(len(row), 3)]
                    path, checksum, size = row + missing
                    #if not os.path.isabs(path):
                    #    path = path.replace('/', os.sep)
                    #    path = os.path.join(base_location, path)
                    results.append((path, checksum, size))
        return results

    @cached_property
    def exports(self):
        """
        Return the information exported by this distribution.
        :return: A dictionary of exports, mapping an export category to a dict
                 of :class:`ExportEntry` instances describing the individual
                 export entries, and keyed by name.
        """
        result = {}
        r = self.get_distinfo_resource(EXPORTS_FILENAME)
        if r:
            result = self.read_exports()
        return result

    def read_exports(self):
        """
        Read exports data from a file in .ini format.

        :return: A dictionary of exports, mapping an export category to a list
                 of :class:`ExportEntry` instances describing the individual
                 export entries.
        """
        result = {}
        r = self.get_distinfo_resource(EXPORTS_FILENAME)
        if r:
            with contextlib.closing(r.as_stream()) as stream:
                result = read_exports(stream)
        return result

    def write_exports(self, exports):
        """
        Write a dictionary of exports to a file in .ini format.
        :param exports: A dictionary of exports, mapping an export category to
                        a list of :class:`ExportEntry` instances describing the
                        individual export entries.
        """
        rf = self.get_distinfo_file(EXPORTS_FILENAME)
        with open(rf, 'w') as f:
            write_exports(exports, f)

    def get_resource_path(self, relative_path):
        """
        NOTE: This API may change in the future.

        Return the absolute path to a resource file with the given relative
        path.

        :param relative_path: The path, relative to .dist-info, of the resource
                              of interest.
        :return: The absolute path where the resource is to be found.
        """
        r = self.get_distinfo_resource('RESOURCES')
        with contextlib.closing(r.as_stream()) as stream:
            with CSVReader(stream=stream) as resources_reader:
                for relative, destination in resources_reader:
                    if relative == relative_path:
                        return destination
        raise KeyError('no resource file with relative path %r '
                       'is installed' % relative_path)

    def list_installed_files(self):
        """
        Iterates over the ``RECORD`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: iterator of (path, hash, size)
        """
        for result in self._get_records():
            yield result

    def write_installed_files(self, paths, prefix, dry_run=False):
        """
        Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
        existing ``RECORD`` file is silently overwritten.

        prefix is used to determine when to write absolute paths.
        """
        prefix = os.path.join(prefix, '')
        base = os.path.dirname(self.path)
        base_under_prefix = base.startswith(prefix)
        base = os.path.join(base, '')
        record_path = self.get_distinfo_file('RECORD')
        logger.info('creating %s', record_path)
        if dry_run:
            return None
        with CSVWriter(record_path) as writer:
            for path in paths:
                if os.path.isdir(path) or path.endswith(('.pyc', '.pyo')):
                    # do not put size and hash, as in PEP-376
                    hash_value = size = ''
                else:
                    size = '%d' % os.path.getsize(path)
                    with open(path, 'rb') as fp:
                        hash_value = self.get_hash(fp.read())
                if path.startswith(base) or (base_under_prefix and
                                             path.startswith(prefix)):
                    path = os.path.relpath(path, base)
                writer.writerow((path, hash_value, size))

            # add the RECORD file itself
            if record_path.startswith(base):
                record_path = os.path.relpath(record_path, base)
            writer.writerow((record_path, '', ''))
        return record_path

    def check_installed_files(self):
        """
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        """
        mismatches = []
        base = os.path.dirname(self.path)
        record_path = self.get_distinfo_file('RECORD')
        for path, hash_value, size in self.list_installed_files():
            if not os.path.isabs(path):
                path = os.path.join(base, path)
            if path == record_path:
                continue
            if not os.path.exists(path):
                mismatches.append((path, 'exists', True, False))
            elif os.path.isfile(path):
                actual_size = str(os.path.getsize(path))
                if size and actual_size != size:
                    mismatches.append((path, 'size', size, actual_size))
                elif hash_value:
                    if '=' in hash_value:
                        hasher = hash_value.split('=', 1)[0]
                    else:
                        hasher = None

                    with open(path, 'rb') as f:
                        actual_hash = self.get_hash(f.read(), hasher)
                        if actual_hash != hash_value:
                            mismatches.append((path, 'hash', hash_value, actual_hash))
        return mismatches

    @cached_property
    def shared_locations(self):
        """
        A dictionary of shared locations whose keys are in the set 'prefix',
        'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
        The corresponding value is the absolute path of that category for
        this distribution, and takes into account any paths selected by the
        user at installation time (e.g. via command-line arguments). In the
        case of the 'namespace' key, this would be a list of absolute paths
        for the roots of namespace packages in this distribution.

        The first time this property is accessed, the relevant information is
        read from the SHARED file in the .dist-info directory.
        """
        result = {}
        shared_path = os.path.join(self.path, 'SHARED')
        if os.path.isfile(shared_path):
            with codecs.open(shared_path, 'r', encoding='utf-8') as f:
                lines = f.read().splitlines()
            for line in lines:
                key, value = line.split('=', 1)
                if key == 'namespace':
                    result.setdefault(key, []).append(value)
                else:
                    result[key] = value
        return result

    def write_shared_locations(self, paths, dry_run=False):
        """
        Write shared location information to the SHARED file in .dist-info.
        :param paths: A dictionary as described in the documentation for
        :meth:`shared_locations`.
        :param dry_run: If True, the action is logged but no file is actually
                        written.
        :return: The path of the file written to.
        """
        shared_path = os.path.join(self.path, 'SHARED')
        logger.info('creating %s', shared_path)
        if dry_run:
            return None
        lines = []
        for key in ('prefix', 'lib', 'headers', 'scripts', 'data'):
            path = paths[key]
            if os.path.isdir(paths[key]):
                lines.append('%s=%s' % (key,  path))
        for ns in paths.get('namespace', ()):
            lines.append('namespace=%s' % ns)

        with codecs.open(shared_path, 'w', encoding='utf-8') as f:
            f.write('\n'.join(lines))
        return shared_path

    def get_distinfo_resource(self, path):
        if path not in DIST_FILES:
            raise DistlibException('invalid path for a dist-info file: '
                                   '%r at %r' % (path, self.path))
        finder = resources.finder_for_path(self.path)
        if finder is None:
            raise DistlibException('Unable to get a finder for %s' % self.path)
        return finder.find(path)

    def get_distinfo_file(self, path):
        """
        Returns a path located under the ``.dist-info`` directory. Returns a
        string representing the path.

        :parameter path: a ``'/'``-separated path relative to the
                         ``.dist-info`` directory or an absolute path;
                         If *path* is an absolute path and doesn't start
                         with the ``.dist-info`` directory path,
                         a :class:`DistlibException` is raised
        :type path: str
        :rtype: str
        """
        # Check if it is an absolute path  # XXX use relpath, add tests
        if path.find(os.sep) >= 0:
            # it's an absolute path?
            distinfo_dirname, path = path.split(os.sep)[-2:]
            if distinfo_dirname != self.path.split(os.sep)[-1]:
                raise DistlibException(
                    'dist-info file %r does not belong to the %r %s '
                    'distribution' % (path, self.name, self.version))

        # The file must be relative
        if path not in DIST_FILES:
            raise DistlibException('invalid path for a dist-info file: '
                                   '%r at %r' % (path, self.path))

        return os.path.join(self.path, path)

    def list_distinfo_files(self):
        """
        Iterates over the ``RECORD`` entries and returns paths for each line if
        the path is pointing to a file located in the ``.dist-info`` directory
        or one of its subdirectories.

        :returns: iterator of paths
        """
        base = os.path.dirname(self.path)
        for path, checksum, size in self._get_records():
            # XXX add separator or use real relpath algo
            if not os.path.isabs(path):
                path = os.path.join(base, path)
            if path.startswith(self.path):
                yield path

    def __eq__(self, other):
        return (isinstance(other, InstalledDistribution) and
                self.path == other.path)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    __hash__ = object.__hash__


class EggInfoDistribution(BaseInstalledDistribution):
    """Created with the *path* of the ``.egg-info`` directory or file provided
    to the constructor. It reads the metadata contained in the file itself, or
    if the given path happens to be a directory, the metadata is read from the
    file ``PKG-INFO`` under that directory."""

    requested = True    # as we have no way of knowing, assume it was
    shared_locations = {}

    def __init__(self, path, env=None):
        def set_name_and_version(s, n, v):
            s.name = n
            s.key = n.lower()   # for case-insensitive comparisons
            s.version = v

        self.path = path
        self.dist_path = env
        if env and env._cache_enabled and path in env._cache_egg.path:
            metadata = env._cache_egg.path[path].metadata
            set_name_and_version(self, metadata.name, metadata.version)
        else:
            metadata = self._get_metadata(path)

            # Need to be set before caching
            set_name_and_version(self, metadata.name, metadata.version)

            if env and env._cache_enabled:
                env._cache_egg.add(self)
        super(EggInfoDistribution, self).__init__(metadata, path, env)

    def _get_metadata(self, path):
        requires = None

        def parse_requires_data(data):
            """Create a list of dependencies from a requires.txt file.

            *data*: the contents of a setuptools-produced requires.txt file.
            """
            reqs = []
            lines = data.splitlines()
            for line in lines:
                line = line.strip()
                if line.startswith('['):
                    logger.warning('Unexpected line: quitting requirement scan: %r',
                                   line)
                    break
                r = parse_requirement(line)
                if not r:
                    logger.warning('Not recognised as a requirement: %r', line)
                    continue
                if r.extras:
                    logger.warning('extra requirements in requires.txt are '
                                   'not supported')
                if not r.constraints:
                    reqs.append(r.name)
                else:
                    cons = ', '.join('%s%s' % c for c in r.constraints)
                    reqs.append('%s (%s)' % (r.name, cons))
            return reqs

        def parse_requires_path(req_path):
            """Create a list of dependencies from a requires.txt file.

            *req_path*: the path to a setuptools-produced requires.txt file.
            """

            reqs = []
            try:
                with codecs.open(req_path, 'r', 'utf-8') as fp:
                    reqs = parse_requires_data(fp.read())
            except IOError:
                pass
            return reqs

        if path.endswith('.egg'):
            if os.path.isdir(path):
                meta_path = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
                metadata = Metadata(path=meta_path, scheme='legacy')
                req_path = os.path.join(path, 'EGG-INFO', 'requires.txt')
                requires = parse_requires_path(req_path)
            else:
                # FIXME handle the case where zipfile is not available
                zipf = zipimport.zipimporter(path)
                fileobj = StringIO(
                    zipf.get_data('EGG-INFO/PKG-INFO').decode('utf8'))
                metadata = Metadata(fileobj=fileobj, scheme='legacy')
                try:
                    data = zipf.get_data('EGG-INFO/requires.txt')
                    requires = parse_requires_data(data.decode('utf-8'))
                except IOError:
                    requires = None
        elif path.endswith('.egg-info'):
            if os.path.isdir(path):
                path = os.path.join(path, 'PKG-INFO')
                req_path = os.path.join(path, 'requires.txt')
                requires = parse_requires_path(req_path)
            metadata = Metadata(path=path, scheme='legacy')
        else:
            raise DistlibException('path must end with .egg-info or .egg, '
                                   'got %r' % path)

        if requires:
            metadata.add_requirements(requires)
        return metadata

    def __repr__(self):
        return '<EggInfoDistribution %r %s at %r>' % (
            self.name, self.version, self.path)

    def __str__(self):
        return "%s %s" % (self.name, self.version)

    def check_installed_files(self):
        """
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        """
        mismatches = []
        record_path = os.path.join(self.path, 'installed-files.txt')
        if os.path.exists(record_path):
            for path, _, _ in self.list_installed_files():
                if path == record_path:
                    continue
                if not os.path.exists(path):
                    mismatches.append((path, 'exists', True, False))
        return mismatches

    def list_installed_files(self):
        """
        Iterates over the ``installed-files.txt`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: a list of (path, hash, size)
        """

        def _md5(path):
            f = open(path, 'rb')
            try:
                content = f.read()
            finally:
                f.close()
            return hashlib.md5(content).hexdigest()

        def _size(path):
            return os.stat(path).st_size

        record_path = os.path.join(self.path, 'installed-files.txt')
        result = []
        if os.path.exists(record_path):
            with codecs.open(record_path, 'r', encoding='utf-8') as f:
                for line in f:
                    line = line.strip()
                    p = os.path.normpath(os.path.join(self.path, line))
                    # "./" is present as a marker between installed files
                    # and installation metadata files
                    if not os.path.exists(p):
                        logger.warning('Non-existent file: %s', p)
                        if p.endswith(('.pyc', '.pyo')):
                            continue
                        #otherwise fall through and fail
                    if not os.path.isdir(p):
                        result.append((p, _md5(p), _size(p)))
            result.append((record_path, None, None))
        return result

    def list_distinfo_files(self, absolute=False):
        """
        Iterates over the ``installed-files.txt`` entries and returns paths for
        each line if the path is pointing to a file located in the
        ``.egg-info`` directory or one of its subdirectories.

        :parameter absolute: If *absolute* is ``True``, each returned path is
                          transformed into a local absolute path. Otherwise the
                          raw value from ``installed-files.txt`` is returned.
        :type absolute: boolean
        :returns: iterator of paths
        """
        record_path = os.path.join(self.path, 'installed-files.txt')
        skip = True
        with codecs.open(record_path, 'r', encoding='utf-8') as f:
            for line in f:
                line = line.strip()
                if line == './':
                    skip = False
                    continue
                if not skip:
                    p = os.path.normpath(os.path.join(self.path, line))
                    if p.startswith(self.path):
                        if absolute:
                            yield p
                        else:
                            yield line

    def __eq__(self, other):
        return (isinstance(other, EggInfoDistribution) and
                self.path == other.path)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    __hash__ = object.__hash__

new_dist_class = InstalledDistribution
old_dist_class = EggInfoDistribution


class DependencyGraph(object):
    """
    Represents a dependency graph between distributions.

    The dependency relationships are stored in an ``adjacency_list`` that maps
    distributions to a list of ``(other, label)`` tuples where  ``other``
    is a distribution and the edge is labeled with ``label`` (i.e. the version
    specifier, if such was provided). Also, for more efficient traversal, for
    every distribution ``x``, a list of predecessors is kept in
    ``reverse_list[x]``. An edge from distribution ``a`` to
    distribution ``b`` means that ``a`` depends on ``b``. If any missing
    dependencies are found, they are stored in ``missing``, which is a
    dictionary that maps distributions to a list of requirements that were not
    provided by any other distributions.
    """

    def __init__(self):
        self.adjacency_list = {}
        self.reverse_list = {}
        self.missing = {}

    def add_distribution(self, distribution):
        """Add the *distribution* to the graph.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        """
        self.adjacency_list[distribution] = []
        self.reverse_list[distribution] = []
        #self.missing[distribution] = []

    def add_edge(self, x, y, label=None):
        """Add an edge from distribution *x* to distribution *y* with the given
        *label*.

        :type x: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type y: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type label: ``str`` or ``None``
        """
        self.adjacency_list[x].append((y, label))
        # multiple edges are allowed, so be careful
        if x not in self.reverse_list[y]:
            self.reverse_list[y].append(x)

    def add_missing(self, distribution, requirement):
        """
        Add a missing *requirement* for the given *distribution*.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        :type requirement: ``str``
        """
        logger.debug('%s missing %r', distribution, requirement)
        self.missing.setdefault(distribution, []).append(requirement)

    def _repr_dist(self, dist):
        return '%s %s' % (dist.name, dist.version)

    def repr_node(self, dist, level=1):
        """Prints only a subgraph"""
        output = [self._repr_dist(dist)]
        for other, label in self.adjacency_list[dist]:
            dist = self._repr_dist(other)
            if label is not None:
                dist = '%s [%s]' % (dist, label)
            output.append('    ' * level + str(dist))
            suboutput = self.repr_node(other, level + 1)
            subs = suboutput.split('\n')
            output.extend(subs[1:])
        return '\n'.join(output)

    def to_dot(self, f, skip_disconnected=True):
        """Writes a DOT output for the graph to the provided file *f*.

        If *skip_disconnected* is set to ``True``, then all distributions
        that are not dependent on any other distribution are skipped.

        :type f: has to support ``file``-like operations
        :type skip_disconnected: ``bool``
        """
        disconnected = []

        f.write("digraph dependencies {\n")
        for dist, adjs in self.adjacency_list.items():
            if len(adjs) == 0 and not skip_disconnected:
                disconnected.append(dist)
            for other, label in adjs:
                if not label is None:
                    f.write('"%s" -> "%s" [label="%s"]\n' %
                            (dist.name, other.name, label))
                else:
                    f.write('"%s" -> "%s"\n' % (dist.name, other.name))
        if not skip_disconnected and len(disconnected) > 0:
            f.write('subgraph disconnected {\n')
            f.write('label = "Disconnected"\n')
            f.write('bgcolor = red\n')

            for dist in disconnected:
                f.write('"%s"' % dist.name)
                f.write('\n')
            f.write('}\n')
        f.write('}\n')

    def topological_sort(self):
        """
        Perform a topological sort of the graph.
        :return: A tuple, the first element of which is a topologically sorted
                 list of distributions, and the second element of which is a
                 list of distributions that cannot be sorted because they have
                 circular dependencies and so form a cycle.
        """
        result = []
        # Make a shallow copy of the adjacency list
        alist = {}
        for k, v in self.adjacency_list.items():
            alist[k] = v[:]
        while True:
            # See what we can remove in this run
            to_remove = []
            for k, v in list(alist.items())[:]:
                if not v:
                    to_remove.append(k)
                    del alist[k]
            if not to_remove:
                # What's left in alist (if anything) is a cycle.
                break
            # Remove from the adjacency list of others
            for k, v in alist.items():
                alist[k] = [(d, r) for d, r in v if d not in to_remove]
            logger.debug('Moving to result: %s',
                         ['%s (%s)' % (d.name, d.version) for d in to_remove])
            result.extend(to_remove)
        return result, list(alist.keys())

    def __repr__(self):
        """Representation of the graph"""
        output = []
        for dist, adjs in self.adjacency_list.items():
            output.append(self.repr_node(dist))
        return '\n'.join(output)


def make_graph(dists, scheme='default'):
    """Makes a dependency graph from the given distributions.

    :parameter dists: a list of distributions
    :type dists: list of :class:`distutils2.database.InstalledDistribution` and
                 :class:`distutils2.database.EggInfoDistribution` instances
    :rtype: a :class:`DependencyGraph` instance
    """
    scheme = get_scheme(scheme)
    graph = DependencyGraph()
    provided = {}  # maps names to lists of (version, dist) tuples

    # first, build the graph and find out what's provided
    for dist in dists:
        graph.add_distribution(dist)

        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Add to provided: %s, %s, %s', name, version, dist)
            provided.setdefault(name, []).append((version, dist))

    # now make the edges
    for dist in dists:
        requires = (dist.run_requires | dist.meta_requires |
                    dist.build_requires | dist.dev_requires)
        for req in requires:
            try:
                matcher = scheme.matcher(req)
            except UnsupportedVersionError:
                # XXX compat-mode if cannot read the version
                logger.warning('could not read version %r - using name only',
                               req)
                name = req.split()[0]
                matcher = scheme.matcher(name)

            name = matcher.key   # case-insensitive

            matched = False
            if name in provided:
                for version, provider in provided[name]:
                    try:
                        match = matcher.match(version)
                    except UnsupportedVersionError:
                        match = False

                    if match:
                        graph.add_edge(dist, provider, req)
                        matched = True
                        break
            if not matched:
                graph.add_missing(dist, req)
    return graph


def get_dependent_dists(dists, dist):
    """Recursively generate a list of distributions from *dists* that are
    dependent on *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    """
    if dist not in dists:
        raise DistlibException('given distribution %r is not a member '
                               'of the list' % dist.name)
    graph = make_graph(dists)

    dep = [dist]  # dependent distributions
    todo = graph.reverse_list[dist]  # list of nodes we should inspect

    while todo:
        d = todo.pop()
        dep.append(d)
        for succ in graph.reverse_list[d]:
            if succ not in dep:
                todo.append(succ)

    dep.pop(0)  # remove dist from dep, was there to prevent infinite loops
    return dep


def get_required_dists(dists, dist):
    """Recursively generate a list of distributions from *dists* that are
    required by *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    """
    if dist not in dists:
        raise DistlibException('given distribution %r is not a member '
                               'of the list' % dist.name)
    graph = make_graph(dists)

    req = []  # required distributions
    todo = graph.adjacency_list[dist]  # list of nodes we should inspect

    while todo:
        d = todo.pop()[0]
        req.append(d)
        for pred in graph.adjacency_list[d]:
            if pred not in req:
                todo.append(pred)

    return req


def make_dist(name, version, **kwargs):
    """
    A convenience method for making a dist given just a name and version.
    """
    summary = kwargs.pop('summary', 'Placeholder for summary')
    md = Metadata(**kwargs)
    md.name = name
    md.version = version
    md.summary = summary or 'Plaeholder for summary'
    return Distribution(md)
python3.3/site-packages/pip/_vendor/distlib/metadata.py000064400000107717151733566750017100 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Implementation of the Metadata for Python packages PEPs.

Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
"""
from __future__ import unicode_literals

import codecs
from email import message_from_file
import json
import logging
import re


from . import DistlibException, __version__
from .compat import StringIO, string_types, text_type
from .markers import interpret
from .util import extract_by_key, get_extras
from .version import get_scheme, PEP426_VERSION_RE

logger = logging.getLogger(__name__)


class MetadataMissingError(DistlibException):
    """A required metadata is missing"""


class MetadataConflictError(DistlibException):
    """Attempt to read or write metadata fields that are conflictual."""


class MetadataUnrecognizedVersionError(DistlibException):
    """Unknown metadata version number."""


class MetadataInvalidError(DistlibException):
    """A metadata value is invalid"""

# public API of this module
__all__ = ['Metadata', 'PKG_INFO_ENCODING', 'PKG_INFO_PREFERRED_VERSION']

# Encoding used for the PKG-INFO files
PKG_INFO_ENCODING = 'utf-8'

# preferred version. Hopefully will be changed
# to 1.2 once PEP 345 is supported everywhere
PKG_INFO_PREFERRED_VERSION = '1.1'

_LINE_PREFIX = re.compile('\n       \|')
_241_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'License')

_314_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'License', 'Classifier', 'Download-URL', 'Obsoletes',
               'Provides', 'Requires')

_314_MARKERS = ('Obsoletes', 'Provides', 'Requires', 'Classifier',
                'Download-URL')

_345_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'Maintainer', 'Maintainer-email', 'License',
               'Classifier', 'Download-URL', 'Obsoletes-Dist',
               'Project-URL', 'Provides-Dist', 'Requires-Dist',
               'Requires-Python', 'Requires-External')

_345_MARKERS = ('Provides-Dist', 'Requires-Dist', 'Requires-Python',
                'Obsoletes-Dist', 'Requires-External', 'Maintainer',
                'Maintainer-email', 'Project-URL')

_426_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'Maintainer', 'Maintainer-email', 'License',
               'Classifier', 'Download-URL', 'Obsoletes-Dist',
               'Project-URL', 'Provides-Dist', 'Requires-Dist',
               'Requires-Python', 'Requires-External', 'Private-Version',
               'Obsoleted-By', 'Setup-Requires-Dist', 'Extension',
               'Provides-Extra')

_426_MARKERS = ('Private-Version', 'Provides-Extra', 'Obsoleted-By',
                'Setup-Requires-Dist', 'Extension')

_ALL_FIELDS = set()
_ALL_FIELDS.update(_241_FIELDS)
_ALL_FIELDS.update(_314_FIELDS)
_ALL_FIELDS.update(_345_FIELDS)
_ALL_FIELDS.update(_426_FIELDS)

EXTRA_RE = re.compile(r'''extra\s*==\s*("([^"]+)"|'([^']+)')''')


def _version2fieldlist(version):
    if version == '1.0':
        return _241_FIELDS
    elif version == '1.1':
        return _314_FIELDS
    elif version == '1.2':
        return _345_FIELDS
    elif version == '2.0':
        return _426_FIELDS
    raise MetadataUnrecognizedVersionError(version)


def _best_version(fields):
    """Detect the best version depending on the fields used."""
    def _has_marker(keys, markers):
        for marker in markers:
            if marker in keys:
                return True
        return False

    keys = []
    for key, value in fields.items():
        if value in ([], 'UNKNOWN', None):
            continue
        keys.append(key)

    possible_versions = ['1.0', '1.1', '1.2', '2.0']

    # first let's try to see if a field is not part of one of the version
    for key in keys:
        if key not in _241_FIELDS and '1.0' in possible_versions:
            possible_versions.remove('1.0')
        if key not in _314_FIELDS and '1.1' in possible_versions:
            possible_versions.remove('1.1')
        if key not in _345_FIELDS and '1.2' in possible_versions:
            possible_versions.remove('1.2')
        if key not in _426_FIELDS and '2.0' in possible_versions:
            possible_versions.remove('2.0')

    # possible_version contains qualified versions
    if len(possible_versions) == 1:
        return possible_versions[0]   # found !
    elif len(possible_versions) == 0:
        raise MetadataConflictError('Unknown metadata set')

    # let's see if one unique marker is found
    is_1_1 = '1.1' in possible_versions and _has_marker(keys, _314_MARKERS)
    is_1_2 = '1.2' in possible_versions and _has_marker(keys, _345_MARKERS)
    is_2_0 = '2.0' in possible_versions and _has_marker(keys, _426_MARKERS)
    if int(is_1_1) + int(is_1_2) + int(is_2_0) > 1:
        raise MetadataConflictError('You used incompatible 1.1/1.2/2.0 fields')

    # we have the choice, 1.0, or 1.2, or 2.0
    #   - 1.0 has a broken Summary field but works with all tools
    #   - 1.1 is to avoid
    #   - 1.2 fixes Summary but has little adoption
    #   - 2.0 adds more features and is very new
    if not is_1_1 and not is_1_2 and not is_2_0:
        # we couldn't find any specific marker
        if PKG_INFO_PREFERRED_VERSION in possible_versions:
            return PKG_INFO_PREFERRED_VERSION
    if is_1_1:
        return '1.1'
    if is_1_2:
        return '1.2'

    return '2.0'

_ATTR2FIELD = {
    'metadata_version': 'Metadata-Version',
    'name': 'Name',
    'version': 'Version',
    'platform': 'Platform',
    'supported_platform': 'Supported-Platform',
    'summary': 'Summary',
    'description': 'Description',
    'keywords': 'Keywords',
    'home_page': 'Home-page',
    'author': 'Author',
    'author_email': 'Author-email',
    'maintainer': 'Maintainer',
    'maintainer_email': 'Maintainer-email',
    'license': 'License',
    'classifier': 'Classifier',
    'download_url': 'Download-URL',
    'obsoletes_dist': 'Obsoletes-Dist',
    'provides_dist': 'Provides-Dist',
    'requires_dist': 'Requires-Dist',
    'setup_requires_dist': 'Setup-Requires-Dist',
    'requires_python': 'Requires-Python',
    'requires_external': 'Requires-External',
    'requires': 'Requires',
    'provides': 'Provides',
    'obsoletes': 'Obsoletes',
    'project_url': 'Project-URL',
    'private_version': 'Private-Version',
    'obsoleted_by': 'Obsoleted-By',
    'extension': 'Extension',
    'provides_extra': 'Provides-Extra',
}

_PREDICATE_FIELDS = ('Requires-Dist', 'Obsoletes-Dist', 'Provides-Dist')
_VERSIONS_FIELDS = ('Requires-Python',)
_VERSION_FIELDS = ('Version',)
_LISTFIELDS = ('Platform', 'Classifier', 'Obsoletes',
               'Requires', 'Provides', 'Obsoletes-Dist',
               'Provides-Dist', 'Requires-Dist', 'Requires-External',
               'Project-URL', 'Supported-Platform', 'Setup-Requires-Dist',
               'Provides-Extra', 'Extension')
_LISTTUPLEFIELDS = ('Project-URL',)

_ELEMENTSFIELD = ('Keywords',)

_UNICODEFIELDS = ('Author', 'Maintainer', 'Summary', 'Description')

_MISSING = object()

_FILESAFE = re.compile('[^A-Za-z0-9.]+')


def _get_name_and_version(name, version, for_filename=False):
    """Return the distribution name with version.

    If for_filename is true, return a filename-escaped form."""
    if for_filename:
        # For both name and version any runs of non-alphanumeric or '.'
        # characters are replaced with a single '-'.  Additionally any
        # spaces in the version string become '.'
        name = _FILESAFE.sub('-', name)
        version = _FILESAFE.sub('-', version.replace(' ', '.'))
    return '%s-%s' % (name, version)


class LegacyMetadata(object):
    """The legacy metadata of a release.

    Supports versions 1.0, 1.1 and 1.2 (auto-detected). You can
    instantiate the class with one of these arguments (or none):
    - *path*, the path to a metadata file
    - *fileobj* give a file-like object with metadata as content
    - *mapping* is a dict-like object
    - *scheme* is a version scheme name
    """
    # TODO document the mapping API and UNKNOWN default key

    def __init__(self, path=None, fileobj=None, mapping=None,
                 scheme='default'):
        if [path, fileobj, mapping].count(None) < 2:
            raise TypeError('path, fileobj and mapping are exclusive')
        self._fields = {}
        self.requires_files = []
        self._dependencies = None
        self.scheme = scheme
        if path is not None:
            self.read(path)
        elif fileobj is not None:
            self.read_file(fileobj)
        elif mapping is not None:
            self.update(mapping)
            self.set_metadata_version()

    def set_metadata_version(self):
        self._fields['Metadata-Version'] = _best_version(self._fields)

    def _write_field(self, fileobj, name, value):
        fileobj.write('%s: %s\n' % (name, value))

    def __getitem__(self, name):
        return self.get(name)

    def __setitem__(self, name, value):
        return self.set(name, value)

    def __delitem__(self, name):
        field_name = self._convert_name(name)
        try:
            del self._fields[field_name]
        except KeyError:
            raise KeyError(name)

    def __contains__(self, name):
        return (name in self._fields or
                self._convert_name(name) in self._fields)

    def _convert_name(self, name):
        if name in _ALL_FIELDS:
            return name
        name = name.replace('-', '_').lower()
        return _ATTR2FIELD.get(name, name)

    def _default_value(self, name):
        if name in _LISTFIELDS or name in _ELEMENTSFIELD:
            return []
        return 'UNKNOWN'

    def _remove_line_prefix(self, value):
        return _LINE_PREFIX.sub('\n', value)

    def __getattr__(self, name):
        if name in _ATTR2FIELD:
            return self[name]
        raise AttributeError(name)

    #
    # Public API
    #

#    dependencies = property(_get_dependencies, _set_dependencies)

    def get_fullname(self, filesafe=False):
        """Return the distribution name with version.

        If filesafe is true, return a filename-escaped form."""
        return _get_name_and_version(self['Name'], self['Version'], filesafe)

    def is_field(self, name):
        """return True if name is a valid metadata key"""
        name = self._convert_name(name)
        return name in _ALL_FIELDS

    def is_multi_field(self, name):
        name = self._convert_name(name)
        return name in _LISTFIELDS

    def read(self, filepath):
        """Read the metadata values from a file path."""
        fp = codecs.open(filepath, 'r', encoding='utf-8')
        try:
            self.read_file(fp)
        finally:
            fp.close()

    def read_file(self, fileob):
        """Read the metadata values from a file object."""
        msg = message_from_file(fileob)
        self._fields['Metadata-Version'] = msg['metadata-version']

        # When reading, get all the fields we can
        for field in _ALL_FIELDS:
            if field not in msg:
                continue
            if field in _LISTFIELDS:
                # we can have multiple lines
                values = msg.get_all(field)
                if field in _LISTTUPLEFIELDS and values is not None:
                    values = [tuple(value.split(',')) for value in values]
                self.set(field, values)
            else:
                # single line
                value = msg[field]
                if value is not None and value != 'UNKNOWN':
                    self.set(field, value)
        self.set_metadata_version()

    def write(self, filepath, skip_unknown=False):
        """Write the metadata fields to filepath."""
        fp = codecs.open(filepath, 'w', encoding='utf-8')
        try:
            self.write_file(fp, skip_unknown)
        finally:
            fp.close()

    def write_file(self, fileobject, skip_unknown=False):
        """Write the PKG-INFO format data to a file object."""
        self.set_metadata_version()

        for field in _version2fieldlist(self['Metadata-Version']):
            values = self.get(field)
            if skip_unknown and values in ('UNKNOWN', [], ['UNKNOWN']):
                continue
            if field in _ELEMENTSFIELD:
                self._write_field(fileobject, field, ','.join(values))
                continue
            if field not in _LISTFIELDS:
                if field == 'Description':
                    values = values.replace('\n', '\n       |')
                values = [values]

            if field in _LISTTUPLEFIELDS:
                values = [','.join(value) for value in values]

            for value in values:
                self._write_field(fileobject, field, value)

    def update(self, other=None, **kwargs):
        """Set metadata values from the given iterable `other` and kwargs.

        Behavior is like `dict.update`: If `other` has a ``keys`` method,
        they are looped over and ``self[key]`` is assigned ``other[key]``.
        Else, ``other`` is an iterable of ``(key, value)`` iterables.

        Keys that don't match a metadata field or that have an empty value are
        dropped.
        """
        def _set(key, value):
            if key in _ATTR2FIELD and value:
                self.set(self._convert_name(key), value)

        if not other:
            # other is None or empty container
            pass
        elif hasattr(other, 'keys'):
            for k in other.keys():
                _set(k, other[k])
        else:
            for k, v in other:
                _set(k, v)

        if kwargs:
            for k, v in kwargs.items():
                _set(k, v)

    def set(self, name, value):
        """Control then set a metadata field."""
        name = self._convert_name(name)

        if ((name in _ELEMENTSFIELD or name == 'Platform') and
            not isinstance(value, (list, tuple))):
            if isinstance(value, string_types):
                value = [v.strip() for v in value.split(',')]
            else:
                value = []
        elif (name in _LISTFIELDS and
              not isinstance(value, (list, tuple))):
            if isinstance(value, string_types):
                value = [value]
            else:
                value = []

        if logger.isEnabledFor(logging.WARNING):
            project_name = self['Name']

            scheme = get_scheme(self.scheme)
            if name in _PREDICATE_FIELDS and value is not None:
                for v in value:
                    # check that the values are valid
                    if not scheme.is_valid_matcher(v.split(';')[0]):
                        logger.warning(
                            '%r: %r is not valid (field %r)',
                            project_name, v, name)
            # FIXME this rejects UNKNOWN, is that right?
            elif name in _VERSIONS_FIELDS and value is not None:
                if not scheme.is_valid_constraint_list(value):
                    logger.warning('%r: %r is not a valid version (field %r)',
                                   project_name, value, name)
            elif name in _VERSION_FIELDS and value is not None:
                if not scheme.is_valid_version(value):
                    logger.warning('%r: %r is not a valid version (field %r)',
                                   project_name, value, name)

        if name in _UNICODEFIELDS:
            if name == 'Description':
                value = self._remove_line_prefix(value)

        self._fields[name] = value

    def get(self, name, default=_MISSING):
        """Get a metadata field."""
        name = self._convert_name(name)
        if name not in self._fields:
            if default is _MISSING:
                default = self._default_value(name)
            return default
        if name in _UNICODEFIELDS:
            value = self._fields[name]
            return value
        elif name in _LISTFIELDS:
            value = self._fields[name]
            if value is None:
                return []
            res = []
            for val in value:
                if name not in _LISTTUPLEFIELDS:
                    res.append(val)
                else:
                    # That's for Project-URL
                    res.append((val[0], val[1]))
            return res

        elif name in _ELEMENTSFIELD:
            value = self._fields[name]
            if isinstance(value, string_types):
                return value.split(',')
        return self._fields[name]

    def check(self, strict=False):
        """Check if the metadata is compliant. If strict is True then raise if
        no Name or Version are provided"""
        self.set_metadata_version()

        # XXX should check the versions (if the file was loaded)
        missing, warnings = [], []

        for attr in ('Name', 'Version'):  # required by PEP 345
            if attr not in self:
                missing.append(attr)

        if strict and missing != []:
            msg = 'missing required metadata: %s' % ', '.join(missing)
            raise MetadataMissingError(msg)

        for attr in ('Home-page', 'Author'):
            if attr not in self:
                missing.append(attr)

        # checking metadata 1.2 (XXX needs to check 1.1, 1.0)
        if self['Metadata-Version'] != '1.2':
            return missing, warnings

        scheme = get_scheme(self.scheme)

        def are_valid_constraints(value):
            for v in value:
                if not scheme.is_valid_matcher(v.split(';')[0]):
                    return False
            return True

        for fields, controller in ((_PREDICATE_FIELDS, are_valid_constraints),
                                   (_VERSIONS_FIELDS,
                                    scheme.is_valid_constraint_list),
                                   (_VERSION_FIELDS,
                                    scheme.is_valid_version)):
            for field in fields:
                value = self.get(field, None)
                if value is not None and not controller(value):
                    warnings.append('Wrong value for %r: %s' % (field, value))

        return missing, warnings

    def todict(self, skip_missing=False):
        """Return fields as a dict.

        Field names will be converted to use the underscore-lowercase style
        instead of hyphen-mixed case (i.e. home_page instead of Home-page).
        """
        self.set_metadata_version()

        mapping_1_0 = (
            ('metadata_version', 'Metadata-Version'),
            ('name', 'Name'),
            ('version', 'Version'),
            ('summary', 'Summary'),
            ('home_page', 'Home-page'),
            ('author', 'Author'),
            ('author_email', 'Author-email'),
            ('license', 'License'),
            ('description', 'Description'),
            ('keywords', 'Keywords'),
            ('platform', 'Platform'),
            ('classifier', 'Classifier'),
            ('download_url', 'Download-URL'),
        )

        data = {}
        for key, field_name in mapping_1_0:
            if not skip_missing or field_name in self._fields:
                data[key] = self[field_name]

        if self['Metadata-Version'] == '1.2':
            mapping_1_2 = (
                ('requires_dist', 'Requires-Dist'),
                ('requires_python', 'Requires-Python'),
                ('requires_external', 'Requires-External'),
                ('provides_dist', 'Provides-Dist'),
                ('obsoletes_dist', 'Obsoletes-Dist'),
                ('project_url', 'Project-URL'),
                ('maintainer', 'Maintainer'),
                ('maintainer_email', 'Maintainer-email'),
            )
            for key, field_name in mapping_1_2:
                if not skip_missing or field_name in self._fields:
                    if key != 'project_url':
                        data[key] = self[field_name]
                    else:
                        data[key] = [','.join(u) for u in self[field_name]]

        elif self['Metadata-Version'] == '1.1':
            mapping_1_1 = (
                ('provides', 'Provides'),
                ('requires', 'Requires'),
                ('obsoletes', 'Obsoletes'),
            )
            for key, field_name in mapping_1_1:
                if not skip_missing or field_name in self._fields:
                    data[key] = self[field_name]

        return data

    def add_requirements(self, requirements):
        if self['Metadata-Version'] == '1.1':
            # we can't have 1.1 metadata *and* Setuptools requires
            for field in ('Obsoletes', 'Requires', 'Provides'):
                if field in self:
                    del self[field]
        self['Requires-Dist'] += requirements

    # Mapping API
    # TODO could add iter* variants

    def keys(self):
        return list(_version2fieldlist(self['Metadata-Version']))

    def __iter__(self):
        for key in self.keys():
            yield key

    def values(self):
        return [self[key] for key in self.keys()]

    def items(self):
        return [(key, self[key]) for key in self.keys()]

    def __repr__(self):
        return '<%s %s %s>' % (self.__class__.__name__, self.name,
                               self.version)


METADATA_FILENAME = 'pydist.json'


class Metadata(object):
    """
    The metadata of a release. This implementation uses 2.0 (JSON)
    metadata where possible. If not possible, it wraps a LegacyMetadata
    instance which handles the key-value metadata format.
    """

    METADATA_VERSION_MATCHER = re.compile('^\d+(\.\d+)*$')

    NAME_MATCHER = re.compile('^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$', re.I)

    VERSION_MATCHER = PEP426_VERSION_RE

    SUMMARY_MATCHER = re.compile('.{1,2047}')

    METADATA_VERSION = '2.0'

    GENERATOR = 'distlib (%s)' % __version__

    MANDATORY_KEYS = {
        'name': (),
        'version': (),
        'summary': ('legacy',),
    }

    INDEX_KEYS = ('name version license summary description author '
                  'author_email keywords platform home_page classifiers '
                  'download_url')

    DEPENDENCY_KEYS = ('extras run_requires test_requires build_requires '
                       'dev_requires provides meta_requires obsoleted_by '
                       'supports_environments')

    SYNTAX_VALIDATORS = {
        'metadata_version': (METADATA_VERSION_MATCHER, ()),
        'name': (NAME_MATCHER, ('legacy',)),
        'version': (VERSION_MATCHER, ('legacy',)),
        'summary': (SUMMARY_MATCHER, ('legacy',)),
    }

    __slots__ = ('_legacy', '_data', 'scheme')

    def __init__(self, path=None, fileobj=None, mapping=None,
                 scheme='default'):
        if [path, fileobj, mapping].count(None) < 2:
            raise TypeError('path, fileobj and mapping are exclusive')
        self._legacy = None
        self._data = None
        self.scheme = scheme
        #import pdb; pdb.set_trace()
        if mapping is not None:
            try:
                self._validate_mapping(mapping, scheme)
                self._data = mapping
            except MetadataUnrecognizedVersionError:
                self._legacy = LegacyMetadata(mapping=mapping, scheme=scheme)
                self.validate()
        else:
            data = None
            if path:
                with open(path, 'rb') as f:
                    data = f.read()
            elif fileobj:
                data = fileobj.read()
            if data is None:
                # Initialised with no args - to be added
                self._data = {
                    'metadata_version': self.METADATA_VERSION,
                    'generator': self.GENERATOR,
                }
            else:
                if not isinstance(data, text_type):
                    data = data.decode('utf-8')
                try:
                    self._data = json.loads(data)
                    self._validate_mapping(self._data, scheme)
                except ValueError:
                    # Note: MetadataUnrecognizedVersionError does not
                    # inherit from ValueError (it's a DistlibException,
                    # which should not inherit from ValueError).
                    # The ValueError comes from the json.load - if that
                    # succeeds and we get a validation error, we want
                    # that to propagate
                    self._legacy = LegacyMetadata(fileobj=StringIO(data),
                                                  scheme=scheme)
                    self.validate()

    common_keys = set(('name', 'version', 'license', 'keywords', 'summary'))

    none_list = (None, list)
    none_dict = (None, dict)

    mapped_keys = {
        'run_requires': ('Requires-Dist', list),
        'build_requires': ('Setup-Requires-Dist', list),
        'dev_requires': none_list,
        'test_requires': none_list,
        'meta_requires': none_list,
        'extras': ('Provides-Extra', list),
        'modules': none_list,
        'namespaces': none_list,
        'exports': none_dict,
        'commands': none_dict,
        'classifiers': ('Classifier', list),
        'source_url': ('Download-URL', None),
        'metadata_version': ('Metadata-Version', None),
    }

    del none_list, none_dict

    def __getattribute__(self, key):
        common = object.__getattribute__(self, 'common_keys')
        mapped = object.__getattribute__(self, 'mapped_keys')
        if key in mapped:
            lk, maker = mapped[key]
            if self._legacy:
                if lk is None:
                    result = None if maker is None else maker()
                else:
                    result = self._legacy.get(lk)
            else:
                value = None if maker is None else maker()
                result = self._data.get(key, value)
        elif key not in common:
            result = object.__getattribute__(self, key)
        elif self._legacy:
            result = self._legacy.get(key)
        else:
            result = self._data.get(key)
        return result

    def _validate_value(self, key, value, scheme=None):
        if key in self.SYNTAX_VALIDATORS:
            pattern, exclusions = self.SYNTAX_VALIDATORS[key]
            if (scheme or self.scheme) not in exclusions:
                m = pattern.match(value)
                if not m:
                    raise MetadataInvalidError('%r is an invalid value for '
                                               'the %r property' % (value,
                                                                    key))

    def __setattr__(self, key, value):
        self._validate_value(key, value)
        common = object.__getattribute__(self, 'common_keys')
        mapped = object.__getattribute__(self, 'mapped_keys')
        if key in mapped:
            lk, _ = mapped[key]
            if self._legacy:
                if lk is None:
                    raise NotImplementedError
                self._legacy[lk] = value
            else:
                self._data[key] = value
        elif key not in common:
            object.__setattr__(self, key, value)
        else:
            if key == 'keywords':
                if isinstance(value, string_types):
                    value = value.strip()
                    if value:
                        value = value.split()
                    else:
                        value = []
            if self._legacy:
                self._legacy[key] = value
            else:
                self._data[key] = value

    @property
    def name_and_version(self):
        return _get_name_and_version(self.name, self.version, True)

    @property
    def provides(self):
        if self._legacy:
            result = self._legacy['Provides-Dist']
        else:
            result = self._data.setdefault('provides', [])
        s = '%s (%s)' % (self.name, self.version)
        if s not in result:
            result.append(s)
        return result

    @provides.setter
    def provides(self, value):
        if self._legacy:
            self._legacy['Provides-Dist'] = value
        else:
            self._data['provides'] = value

    def get_requirements(self, reqts, extras=None, env=None):
        """
        Base method to get dependencies, given a set of extras
        to satisfy and an optional environment context.
        :param reqts: A list of sometimes-wanted dependencies,
                      perhaps dependent on extras and environment.
        :param extras: A list of optional components being requested.
        :param env: An optional environment for marker evaluation.
        """
        if self._legacy:
            result = reqts
        else:
            result = []
            extras = get_extras(extras or [], self.extras)
            for d in reqts:
                if 'extra' not in d and 'environment' not in d:
                    # unconditional
                    include = True
                else:
                    if 'extra' not in d:
                        # Not extra-dependent - only environment-dependent
                        include = True
                    else:
                        include = d.get('extra') in extras
                    if include:
                        # Not excluded because of extras, check environment
                        marker = d.get('environment')
                        if marker:
                            include = interpret(marker, env)
                if include:
                    result.extend(d['requires'])
            for key in ('build', 'dev', 'test'):
                e = ':%s:' % key
                if e in extras:
                    extras.remove(e)
                    # A recursive call, but it should terminate since 'test'
                    # has been removed from the extras
                    reqts = self._data.get('%s_requires' % key, [])
                    result.extend(self.get_requirements(reqts, extras=extras,
                                                        env=env))
        return result

    @property
    def dictionary(self):
        if self._legacy:
            return self._from_legacy()
        return self._data

    @property
    def dependencies(self):
        if self._legacy:
            raise NotImplementedError
        else:
            return extract_by_key(self._data, self.DEPENDENCY_KEYS)

    @dependencies.setter
    def dependencies(self, value):
        if self._legacy:
            raise NotImplementedError
        else:
            self._data.update(value)

    def _validate_mapping(self, mapping, scheme):
        if mapping.get('metadata_version') != self.METADATA_VERSION:
            raise MetadataUnrecognizedVersionError()
        missing = []
        for key, exclusions in self.MANDATORY_KEYS.items():
            if key not in mapping:
                if scheme not in exclusions:
                    missing.append(key)
        if missing:
            msg = 'Missing metadata items: %s' % ', '.join(missing)
            raise MetadataMissingError(msg)
        for k, v in mapping.items():
            self._validate_value(k, v, scheme)

    def validate(self):
        if self._legacy:
            missing, warnings = self._legacy.check(True)
            if missing or warnings:
                logger.warning('Metadata: missing: %s, warnings: %s',
                               missing, warnings)
        else:
            self._validate_mapping(self._data, self.scheme)

    def todict(self):
        if self._legacy:
            return self._legacy.todict(True)
        else:
            result = extract_by_key(self._data, self.INDEX_KEYS)
            return result

    def _from_legacy(self):
        assert self._legacy and not self._data
        result = {
            'metadata_version': self.METADATA_VERSION,
            'generator': self.GENERATOR,
        }
        lmd = self._legacy.todict(True)     # skip missing ones
        for k in ('name', 'version', 'license', 'summary', 'description',
                  'classifier'):
            if k in lmd:
                if k == 'classifier':
                    nk = 'classifiers'
                else:
                    nk = k
                result[nk] = lmd[k]
        kw = lmd.get('Keywords', [])
        if kw == ['']:
            kw = []
        result['keywords'] = kw
        keys = (('requires_dist', 'run_requires'),
                ('setup_requires_dist', 'build_requires'))
        for ok, nk in keys:
            if ok in lmd and lmd[ok]:
                result[nk] = [{'requires': lmd[ok]}]
        result['provides'] = self.provides
        author = {}
        maintainer = {}
        return result

    LEGACY_MAPPING = {
        'name': 'Name',
        'version': 'Version',
        'license': 'License',
        'summary': 'Summary',
        'description': 'Description',
        'classifiers': 'Classifier',
    }

    def _to_legacy(self):
        def process_entries(entries):
            reqts = set()
            for e in entries:
                extra = e.get('extra')
                env = e.get('environment')
                rlist = e['requires']
                for r in rlist:
                    if not env and not extra:
                        reqts.add(r)
                    else:
                        marker = ''
                        if extra:
                            marker = 'extra == "%s"' % extra
                        if env:
                            if marker:
                                marker = '(%s) and %s' % (env, marker)
                            else:
                                marker = env
                        reqts.add(';'.join((r, marker)))
            return reqts

        assert self._data and not self._legacy
        result = LegacyMetadata()
        nmd = self._data
        for nk, ok in self.LEGACY_MAPPING.items():
            if nk in nmd:
                result[ok] = nmd[nk]
        r1 = process_entries(self.run_requires + self.meta_requires)
        r2 = process_entries(self.build_requires + self.dev_requires)
        if self.extras:
            result['Provides-Extra'] = sorted(self.extras)
        result['Requires-Dist'] = sorted(r1)
        result['Setup-Requires-Dist'] = sorted(r2)
        # TODO: other fields such as contacts
        return result

    def write(self, path=None, fileobj=None, legacy=False, skip_unknown=True):
        if [path, fileobj].count(None) != 1:
            raise ValueError('Exactly one of path and fileobj is needed')
        self.validate()
        if legacy:
            if self._legacy:
                legacy_md = self._legacy
            else:
                legacy_md = self._to_legacy()
            if path:
                legacy_md.write(path, skip_unknown=skip_unknown)
            else:
                legacy_md.write_file(fileobj, skip_unknown=skip_unknown)
        else:
            if self._legacy:
                d = self._from_legacy()
            else:
                d = self._data
            if fileobj:
                json.dump(d, fileobj, ensure_ascii=True, indent=2,
                          sort_keys=True)
            else:
                with codecs.open(path, 'w', 'utf-8') as f:
                    json.dump(d, f, ensure_ascii=True, indent=2,
                              sort_keys=True)

    def add_requirements(self, requirements):
        if self._legacy:
            self._legacy.add_requirements(requirements)
        else:
            run_requires = self._data.setdefault('run_requires', [])
            always = None
            for entry in run_requires:
                if 'environment' not in entry and 'extra' not in entry:
                    always = entry
                    break
            if always is None:
                always = { 'requires': requirements }
                run_requires.insert(0, always)
            else:
                rset = set(always['requires']) | set(requirements)
                always['requires'] = sorted(rset)

    def __repr__(self):
        name = self.name or '(no name)'
        version = self.version or 'no version'
        return '<%s %s %s (%s)>' % (self.__class__.__name__,
                                    self.metadata_version, name, version)
python3.3/site-packages/pip/_vendor/distlib/markers.py000064400000014212151733566750016747 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Parser for the environment markers micro-language defined in PEP 345."""

import ast
import os
import sys
import platform

from .compat import python_implementation, string_types
from .util import in_venv

__all__ = ['interpret']


class Evaluator(object):
    """
    A limited evaluator for Python expressions.
    """

    operators = {
        'eq': lambda x, y: x == y,
        'gt': lambda x, y: x > y,
        'gte': lambda x, y: x >= y,
        'in': lambda x, y: x in y,
        'lt': lambda x, y: x < y,
        'lte': lambda x, y: x <= y,
        'not': lambda x: not x,
        'noteq': lambda x, y: x != y,
        'notin': lambda x, y: x not in y,
    }

    allowed_values = {
        'sys_platform': sys.platform,
        'python_version': '%s.%s' % sys.version_info[:2],
        # parsing sys.platform is not reliable, but there is no other
        # way to get e.g. 2.7.2+, and the PEP is defined with sys.version
        'python_full_version': sys.version.split(' ', 1)[0],
        'os_name': os.name,
        'platform_in_venv': str(in_venv()),
        'platform_release': platform.release(),
        'platform_version': platform.version(),
        'platform_machine': platform.machine(),
        'platform_python_implementation': python_implementation(),
    }

    def __init__(self, context=None):
        """
        Initialise an instance.

        :param context: If specified, names are looked up in this mapping.
        """
        self.context = context or {}
        self.source = None

    def get_fragment(self, offset):
        """
        Get the part of the source which is causing a problem.
        """
        fragment_len = 10
        s = '%r' % (self.source[offset:offset + fragment_len])
        if offset + fragment_len < len(self.source):
            s += '...'
        return s

    def get_handler(self, node_type):
        """
        Get a handler for the specified AST node type.
        """
        return getattr(self, 'do_%s' % node_type, None)

    def evaluate(self, node, filename=None):
        """
        Evaluate a source string or node, using ``filename`` when
        displaying errors.
        """
        if isinstance(node, string_types):
            self.source = node
            kwargs = {'mode': 'eval'}
            if filename:
                kwargs['filename'] = filename
            try:
                node = ast.parse(node, **kwargs)
            except SyntaxError as e:
                s = self.get_fragment(e.offset)
                raise SyntaxError('syntax error %s' % s)
        node_type = node.__class__.__name__.lower()
        handler = self.get_handler(node_type)
        if handler is None:
            if self.source is None:
                s = '(source not available)'
            else:
                s = self.get_fragment(node.col_offset)
            raise SyntaxError("don't know how to evaluate %r %s" % (
                node_type, s))
        return handler(node)

    def get_attr_key(self, node):
        assert isinstance(node, ast.Attribute), 'attribute node expected'
        return '%s.%s' % (node.value.id, node.attr)

    def do_attribute(self, node):
        if not isinstance(node.value, ast.Name):
            valid = False
        else:
            key = self.get_attr_key(node)
            valid = key in self.context or key in self.allowed_values
        if not valid:
            raise SyntaxError('invalid expression: %s' % key)
        if key in self.context:
            result = self.context[key]
        else:
            result = self.allowed_values[key]
        return result

    def do_boolop(self, node):
        result = self.evaluate(node.values[0])
        is_or = node.op.__class__ is ast.Or
        is_and = node.op.__class__ is ast.And
        assert is_or or is_and
        if (is_and and result) or (is_or and not result):
            for n in node.values[1:]:
                result = self.evaluate(n)
                if (is_or and result) or (is_and and not result):
                    break
        return result

    def do_compare(self, node):
        def sanity_check(lhsnode, rhsnode):
            valid = True
            if isinstance(lhsnode, ast.Str) and isinstance(rhsnode, ast.Str):
                valid = False
            #elif (isinstance(lhsnode, ast.Attribute)
            #      and isinstance(rhsnode, ast.Attribute)):
            #    klhs = self.get_attr_key(lhsnode)
            #    krhs = self.get_attr_key(rhsnode)
            #    valid = klhs != krhs
            if not valid:
                s = self.get_fragment(node.col_offset)
                raise SyntaxError('Invalid comparison: %s' % s)

        lhsnode = node.left
        lhs = self.evaluate(lhsnode)
        result = True
        for op, rhsnode in zip(node.ops, node.comparators):
            sanity_check(lhsnode, rhsnode)
            op = op.__class__.__name__.lower()
            if op not in self.operators:
                raise SyntaxError('unsupported operation: %r' % op)
            rhs = self.evaluate(rhsnode)
            result = self.operators[op](lhs, rhs)
            if not result:
                break
            lhs = rhs
            lhsnode = rhsnode
        return result

    def do_expression(self, node):
        return self.evaluate(node.body)

    def do_name(self, node):
        valid = False
        if node.id in self.context:
            valid = True
            result = self.context[node.id]
        elif node.id in self.allowed_values:
            valid = True
            result = self.allowed_values[node.id]
        if not valid:
            raise SyntaxError('invalid expression: %s' % node.id)
        return result

    def do_str(self, node):
        return node.s


def interpret(marker, execution_context=None):
    """
    Interpret a marker and return a result depending on environment.

    :param marker: The marker to interpret.
    :type marker: str
    :param execution_context: The context used for name lookup.
    :type execution_context: mapping
    """
    return Evaluator(execution_context).evaluate(marker.strip())
python3.3/site-packages/pip/_vendor/distlib/__pycache__/resources.cpython-33.pyc000064400000040443151733566750023603 0ustar00�
7�Re�$c@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZmZmZmZeje�ZdaGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Zieed�6ee
j6Z y*ddl!Z!ee e!j"<ee e!j#<Wne$e%fk
r�YnXdd�Z&iZ'dd�Z(e	j)e*d��Z+dd�Z,dS(i(uunicode_literalsNi(uDistlibException(ucached_propertyuget_cache_baseupath_to_cache_diruCachecsA|EeZdZd�fdd�Zdd�Zdd�Z�S(u
ResourceCachecsG|dkr-tjjt�td��}ntt|�j|�dS(Nuresource-cache(	uNoneuosupathujoinuget_cache_baseustrusuperu
ResourceCacheu__init__(uselfubase(u	__class__(u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu__init__s!uResourceCache.__init__cCsdS(u�
        Is the cache stale for the given resource?

        :param resource: The :class:`Resource` being cached.
        :param path: The path of the resource in the cache.
        :return: True if the cache is stale.
        T(uTrue(uselfuresourceupath((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuis_stale#s	uResourceCache.is_stalec	Cs�|jj|�\}}|dkr-|}n�tjj|j|j|�|�}tjj|�}tjj	|�s�tj
|�ntjj|�s�d}n|j
||�}|r�t|d��}|j|j�WdQXn|S(u�
        Get a resource into the cache,

        :param resource: A :class:`Resource` instance.
        :return: The pathname of the resource in the cache.
        uwbNT(ufinderuget_cache_infouNoneuosupathujoinubaseu
prefix_to_dirudirnameuisdirumakedirsuexistsuTrueuis_staleuopenuwriteubytes(uselfuresourceuprefixupathuresultudirnameustaleuf((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuget.s	$	uResourceCache.getN(u__name__u
__module__u__qualname__uNoneu__init__uis_staleuget(u
__locals__((u	__class__u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu
ResourceCachesu
ResourceCachecBs |EeZdZdd�ZdS(uResourceBasecCs||_||_dS(N(ufinderuname(uselfufinderuname((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu__init__Is	uResourceBase.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuResourceBaseHsuResourceBasecBsb|EeZdZdZdZdd�Zedd��Zedd��Z	edd	��Z
d
S(uResourceu�
    A class representing an in-package resource, such as a data file. This is
    not normally instantiated by user code, but rather by a
    :class:`ResourceFinder` which manages the resource.
    cCs|jj|�S(u�
        Get the resource as a stream.

        This is not a property to make it obvious that it returns a new stream
        each time.
        (ufinderu
get_stream(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu	as_streamVsuResource.as_streamcCs%tdkrt�antj|�S(N(ucacheuNoneu
ResourceCacheuget(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu	file_path_suResource.file_pathcCs|jj|�S(N(ufinderu	get_bytes(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyubytesfsuResource.bytescCs|jj|�S(N(ufinderuget_size(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyusizejsu
Resource.sizeNF(u__name__u
__module__u__qualname__u__doc__uFalseuis_containeru	as_streamucached_propertyu	file_pathubytesusize(u
__locals__((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuResourceNs	uResourcecBs,|EeZdZdZedd��ZdS(uResourceContainercCs|jj|�S(N(ufinderu
get_resources(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu	resourcesrsuResourceContainer.resourcesNT(u__name__u
__module__u__qualname__uTrueuis_containerucached_propertyu	resources(u
__locals__((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuResourceContainerosuResourceContainercBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zeejj�ZdS(uResourceFinderu4
    Resource finder for file system resources.
    cCsC||_t|dd�|_tjjt|dd��|_dS(Nu
__loader__u__file__u(umoduleugetattruNoneuloaderuosupathudirnameubase(uselfumodule((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu__init__{s	uResourceFinder.__init__cCstjj|�S(N(uosupathurealpath(uselfupath((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu_adjust_path�suResourceFinder._adjust_pathcCsA|jd�}|jd|j�tjj|�}|j|�S(Nu/i(usplituinsertubaseuosupathujoinu_adjust_path(uselfu
resource_nameupartsuresult((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu
_make_path�suResourceFinder._make_pathcCstjj|�S(N(uosupathuexists(uselfupath((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu_find�suResourceFinder._findcCs
d|jfS(N(uNoneupath(uselfuresource((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuget_cache_info�suResourceFinder.get_cache_infocCsd|j|�}|j|�s'd}n9|j|�rHt||�}nt||�}||_|S(N(u
_make_pathu_finduNoneu
_is_directoryuResourceContaineruResourceupath(uselfu
resource_nameupathuresult((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyufind�s		uResourceFinder.findcCst|jd�S(Nurb(uopenupath(uselfuresource((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu
get_stream�suResourceFinder.get_streamcCs)t|jd��}|j�SWdQXdS(Nurb(uopenupathuread(uselfuresourceuf((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu	get_bytes�suResourceFinder.get_bytescCstjj|j�S(N(uosupathugetsize(uselfuresource((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuget_size�suResourceFinder.get_sizecs5dd��t�fdd�tj|j�D��S(NcSs|dko|jd�S(Nu__pycache__u.pycu.pyo(u.pycu.pyo(uendswith(uf((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuallowed�su-ResourceFinder.get_resources.<locals>.allowedcs"g|]}�|�r|�qS(((u.0uf(uallowed(u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu
<listcomp>�s	u0ResourceFinder.get_resources.<locals>.<listcomp>(usetuosulistdirupath(uselfuresource((uallowedu6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu
get_resources�suResourceFinder.get_resourcescCs|j|j�S(N(u
_is_directoryupath(uselfuresource((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuis_container�suResourceFinder.is_containerN(u__name__u
__module__u__qualname__u__doc__u__init__u_adjust_pathu
_make_pathu_finduget_cache_infoufindu
get_streamu	get_bytesuget_sizeu
get_resourcesuis_containerustaticmethoduosupathuisdiru
_is_directory(u
__locals__((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuResourceFinderwsuResourceFindercs�|EeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Z�S(uZipResourceFinderu6
    Resource finder for resources in .zip files.
    cstt|�j|�|jj}dt|�|_t|jd�rY|jj|_nt	j
||_t|j�|_dS(Niu_files(
usuperuZipResourceFinderu__init__uloaderuarchiveulenu
prefix_lenuhasattru_filesu	zipimportu_zip_directory_cacheusorteduindex(uselfumoduleuarchive(u	__class__(u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu__init__�suZipResourceFinder.__init__cCs|S(N((uselfupath((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu_adjust_path�suZipResourceFinder._adjust_pathc
Cs�||jd�}||jkr+d}ns|rT|dtjkrT|tj}ntj|j|�}y|j|j|�}Wntk
r�d}YnX|s�t
jd||jj
�nt
jd||jj
�|S(Niu_find failed: %r %ru_find worked: %r %rTi����F(u
prefix_lenu_filesuTrueuosusepubisectuindexu
startswithu
IndexErroruFalseuloggerudebuguloaderuprefix(uselfupathuresultui((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu_find�s	
uZipResourceFinder._findcCs3|jj}|jdt|�d�}||fS(Ni(uloaderuarchiveupathulen(uselfuresourceuprefixupath((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuget_cache_info�su ZipResourceFinder.get_cache_infocCs|jj|j�S(N(uloaderuget_dataupath(uselfuresource((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu	get_bytes�suZipResourceFinder.get_bytescCstj|j|��S(N(uiouBytesIOu	get_bytes(uselfuresource((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu
get_stream�suZipResourceFinder.get_streamcCs%|j|jd�}|j|dS(Ni(upathu
prefix_lenu_files(uselfuresourceupath((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuget_size�suZipResourceFinder.get_sizecCs�|j|jd�}|r?|dtjkr?|tj7}nt|�}t�}tj|j|�}xt|t|j�kr�|j|j|�s�Pn|j||d�}|j	|j
tjd�d�|d7}qlW|S(Niii����(upathu
prefix_lenuosusepulenusetubisectuindexu
startswithuaddusplit(uselfuresourceupathuplenuresultuius((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu
get_resources�s	 uZipResourceFinder.get_resourcescCs�||jd�}|r<|dtjkr<|tj7}ntj|j|�}y|j|j|�}Wntk
r�d}YnX|S(Nii����F(u
prefix_lenuosusepubisectuindexu
startswithu
IndexErroruFalse(uselfupathuiuresult((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu
_is_directory�s
uZipResourceFinder._is_directory(
u__name__u
__module__u__qualname__u__doc__u__init__u_adjust_pathu_finduget_cache_infou	get_bytesu
get_streamuget_sizeu
get_resourcesu
_is_directory(u
__locals__((u	__class__u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuZipResourceFinder�suZipResourceFindercCs|tt|�<dS(N(u_finder_registryutype(uloaderufinder_maker((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyuregister_finder
suregister_findercCs�|tkrt|}n�|tjkr5t|�ntj|}t|dd�}|dkrotd��nt|dd�}tjt	|��}|dkr�td|��n||�}|t|<|S(u�
    Return a resource finder for a package.
    :param package: The name of the package.
    :return: A :class:`ResourceFinder` instance for the package.
    u__path__u8You cannot get a finder for a module, only for a packageu
__loader__uUnable to locate finder for %rN(
u
_finder_cacheusysumodulesu
__import__ugetattruNoneuDistlibExceptionu_finder_registryugetutype(upackageuresultumoduleupathuloaderufinder_maker((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyufinders



ufinderu	__dummy__cCszd}tj|�tjj|�}tjt|��}|rvt}t	j
j|d�|_||_
||�}n|S(u�
    Return a resource finder for a path, which should represent a container.

    :param path: The path.
    :return: A :class:`ResourceFinder` instance for the path.
    uN(uNoneupkgutiluget_importerusysupath_importer_cacheugetu_finder_registryutypeu
_dummy_moduleuosupathujoinu__file__u
__loader__(upathuresultuloaderufinderumodule((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyufinder_for_path,s
	ufinder_for_path(-u
__future__uunicode_literalsubisectuioulogginguosupkgutilushutilusysutypesu	zipimportuuDistlibExceptionuutilucached_propertyuget_cache_baseupath_to_cache_diruCacheu	getLoggeru__name__uloggeruNoneucacheu
ResourceCacheuobjectuResourceBaseuResourceuResourceContaineruResourceFinderuZipResourceFinderutypeuzipimporteru_finder_registryu_frozen_importlibuSourceFileLoaderu
FileFinderuImportErroruAttributeErroruregister_finderu
_finder_cacheufinderu
ModuleTypeustru
_dummy_moduleufinder_for_path(((u6/tmp/pip-zej_zi-build/pip/_vendor/distlib/resources.pyu<module>sB",!9M


python3.3/site-packages/pip/_vendor/distlib/__pycache__/metadata.cpython-33.pyc000064400000122447151733566750023356 0ustar00�
7�ReϏc@s�dZddlmZddlZddlmZddlZddlZddlZddl	m
Z
mZddlm
Z
mZmZddlmZdd	lmZmZdd
lmZmZeje�ZGdd�de
�ZGd
d�de
�ZGdd�de
�ZGdd�de
�ZdddgZdZ dZ!ej"d�Z#dddddddd d!d"d#fZ$ddddd$dddd d!d"d#d%d&d'd(d)fZ%d'd(d)d%d&fZ&ddddd$dddd d!d"d*d+d#d%d&d,d-d.d/d0d1fZ'd.d/d0d,d1d*d+d-fZ(ddddd$dddd d!d"d*d+d#d%d&d,d-d.d/d0d1d2d3d4d5d6fZ)d2d6d3d4d5fZ*e+�Z,e,j-e$�e,j-e%�e,j-e'�e,j-e)�ej"d7�Z.d8d9�Z/d:d;�Z0idd<6dd=6dd>6dd?6d$d@6ddA6ddB6ddC6d dD6d!dE6d"dF6d*dG6d+dH6d#dI6d%dJ6d&dK6d,dL6d.dM6d/dN6d4dO6d0dP6d1dQ6d)dR6d(dS6d'dT6d-dU6d2dV6d3dW6d5dX6d6dY6Z1d/d,d.fZ2d0fZ3dfZ4dd%d'd)d(d,d.d/d1d-d$d4d6d5fZ5d-fZ6dfZ7d!d*ddfZ8e9�Z:ej"dZ�Z;e<d[d\�Z=Gd]d^�d^e9�Z>d_Z?Gd`d�de9�Z@dS(auImplementation of the Metadata for Python packages PEPs.

Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
i(uunicode_literalsN(umessage_from_filei(uDistlibExceptionu__version__(uStringIOustring_typesu	text_type(u	interpret(uextract_by_keyu
get_extras(u
get_schemeuPEP426_VERSION_REcBs|EeZdZdZdS(uMetadataMissingErroruA required metadata is missingN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuMetadataMissingErrorsuMetadataMissingErrorcBs|EeZdZdZdS(uMetadataConflictErroru>Attempt to read or write metadata fields that are conflictual.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuMetadataConflictError suMetadataConflictErrorcBs|EeZdZdZdS(u MetadataUnrecognizedVersionErroru Unknown metadata version number.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu MetadataUnrecognizedVersionError$su MetadataUnrecognizedVersionErrorcBs|EeZdZdZdS(uMetadataInvalidErroruA metadata value is invalidN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuMetadataInvalidError(suMetadataInvalidErroruMetadatauPKG_INFO_ENCODINGuPKG_INFO_PREFERRED_VERSIONuutf-8u1.1u

       \|uMetadata-VersionuNameuVersionuPlatformuSummaryuDescriptionuKeywordsu	Home-pageuAuthoruAuthor-emailuLicenseuSupported-Platformu
ClassifieruDownload-URLu	ObsoletesuProvidesuRequiresu
MaintaineruMaintainer-emailuObsoletes-DistuProject-URLu
Provides-Distu
Requires-DistuRequires-PythonuRequires-ExternaluPrivate-VersionuObsoleted-ByuSetup-Requires-Distu	ExtensionuProvides-Extrau"extra\s*==\s*("([^"]+)"|'([^']+)')cCsP|dkrtS|dkr tS|dkr0tS|dkr@tSt|��dS(Nu1.0u1.1u1.2u2.0(u_241_FIELDSu_314_FIELDSu_345_FIELDSu_426_FIELDSu MetadataUnrecognizedVersionError(uversion((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_version2fieldlistfsu_version2fieldlistc	Csdd�}g}xB|j�D]4\}}|gddfkrFqn|j|�qWddddg}x�|D]�}|tkr�d|kr�|jd�n|tkr�d|kr�|jd�n|tkr�d|kr�|jd�n|tkrpd|krp|jd�qpqpWt|�dkr4|d	St|�d	krUt	d
��nd|kom||t
�}d|ko�||t�}d|ko�||t�}t
|�t
|�t
|�dkr�t	d��n|r|r|rt|krtSn|r
dS|rdSdS(
u5Detect the best version depending on the fields used.cSs%x|D]}||krdSqWdS(NTF(uTrueuFalse(ukeysumarkersumarker((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_has_markerts
u"_best_version.<locals>._has_markeruUNKNOWNu1.0u1.1u1.2u2.0iiuUnknown metadata setu(You used incompatible 1.1/1.2/2.0 fieldsN(uitemsuNoneuappendu_241_FIELDSuremoveu_314_FIELDSu_345_FIELDSu_426_FIELDSulenuMetadataConflictErroru_314_MARKERSu_345_MARKERSu_426_MARKERSuintuPKG_INFO_PREFERRED_VERSION(	ufieldsu_has_markerukeysukeyuvalueupossible_versionsuis_1_1uis_1_2uis_2_0((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
_best_versionrsB
&u
_best_versionumetadata_versionunameuversionuplatformusupported_platformusummaryudescriptionukeywordsu	home_pageuauthoruauthor_emailu
maintainerumaintainer_emailulicenseu
classifierudownload_urluobsoletes_distu
provides_distu
requires_distusetup_requires_disturequires_pythonurequires_externalurequiresuprovidesu	obsoletesuproject_urluprivate_versionuobsoleted_byu	extensionuprovides_extrau[^A-Za-z0-9.]+cCsG|r9tjd|�}tjd|jdd��}nd||fS(uhReturn the distribution name with version.

    If for_filename is true, return a filename-escaped form.u-u u.u%s-%s(u	_FILESAFEusubureplace(unameuversionufor_filename((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_get_name_and_version�s!u_get_name_and_versioncBs�|EeZdZdZd=d=d=ddd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zd>dd�Zdd�Zdd�Zdd �Zd!d"�Zd>d#d$�Zd>d%d&�Zd=d'd(�Zd)d*�Zed+d,�Zd>d-d.�Zd>d/d0�Zd1d2�Zd3d4�Zd5d6�Z d7d8�Z!d9d:�Z"d;d<�Z#d=S(?uLegacyMetadatauaThe legacy metadata of a release.

    Supports versions 1.0, 1.1 and 1.2 (auto-detected). You can
    instantiate the class with one of these arguments (or none):
    - *path*, the path to a metadata file
    - *fileobj* give a file-like object with metadata as content
    - *mapping* is a dict-like object
    - *scheme* is a version scheme name
    udefaultcCs�|||gjd�dkr-td��ni|_g|_d|_||_|dk	rm|j|�nB|dk	r�|j|�n&|dk	r�|j	|�|j
�ndS(Niu'path, fileobj and mapping are exclusive(ucountuNoneu	TypeErroru_fieldsurequires_filesu
_dependenciesuschemeureadu	read_fileuupdateuset_metadata_version(uselfupathufileobjumappinguscheme((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__init__�s				
uLegacyMetadata.__init__cCst|j�|jd<dS(NuMetadata-Version(u
_best_versionu_fields(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuset_metadata_versionsu#LegacyMetadata.set_metadata_versioncCs|jd||f�dS(Nu%s: %s
(uwrite(uselfufileobjunameuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_write_field
suLegacyMetadata._write_fieldcCs
|j|�S(N(uget(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__getitem__
suLegacyMetadata.__getitem__cCs|j||�S(N(uset(uselfunameuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__setitem__suLegacyMetadata.__setitem__cCsB|j|�}y|j|=Wntk
r=t|��YnXdS(N(u
_convert_nameu_fieldsuKeyError(uselfunameu
field_name((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__delitem__s

uLegacyMetadata.__delitem__cCs%||jkp$|j|�|jkS(N(u_fieldsu
_convert_name(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__contains__suLegacyMetadata.__contains__cCs8|tkr|S|jdd�j�}tj||�S(Nu-u_(u_ALL_FIELDSureplaceuloweru_ATTR2FIELDuget(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
_convert_namesuLegacyMetadata._convert_namecCs |tks|tkrgSdS(NuUNKNOWN(u_LISTFIELDSu_ELEMENTSFIELD(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_default_value$suLegacyMetadata._default_valuecCstjd|�S(Nu
(u_LINE_PREFIXusub(uselfuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_remove_line_prefix)su"LegacyMetadata._remove_line_prefixcCs$|tkr||St|��dS(N(u_ATTR2FIELDuAttributeError(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__getattr__,suLegacyMetadata.__getattr__cCst|d|d|�S(uhReturn the distribution name with version.

        If filesafe is true, return a filename-escaped form.uNameuVersion(u_get_name_and_version(uselfufilesafe((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuget_fullname7suLegacyMetadata.get_fullnamecCs|j|�}|tkS(u+return True if name is a valid metadata key(u
_convert_nameu_ALL_FIELDS(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuis_field=suLegacyMetadata.is_fieldcCs|j|�}|tkS(N(u
_convert_nameu_LISTFIELDS(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuis_multi_fieldBsuLegacyMetadata.is_multi_fieldc
Cs;tj|ddd�}z|j|�Wd|j�XdS(u*Read the metadata values from a file path.uruencodinguutf-8N(ucodecsuopenu	read_fileuclose(uselfufilepathufp((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyureadFsuLegacyMetadata.readcCs�t|�}|d|jd<x�tD]�}||kr<q$n|tkr�|j|�}|tkr�|dk	r�dd�|D�}n|j||�q$||}|dk	r$|dkr$|j||�q$q$W|j�dS(u,Read the metadata values from a file object.umetadata-versionuMetadata-VersioncSs%g|]}t|jd���qS(u,(utupleusplit(u.0uvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
<listcomp>[s	u,LegacyMetadata.read_file.<locals>.<listcomp>uUNKNOWNN(	umessage_from_fileu_fieldsu_ALL_FIELDSu_LISTFIELDSuget_allu_LISTTUPLEFIELDSuNoneusetuset_metadata_version(uselfufileobumsgufielduvaluesuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu	read_fileNs

uLegacyMetadata.read_filec
Cs>tj|ddd�}z|j||�Wd|j�XdS(u&Write the metadata fields to filepath.uwuencodinguutf-8N(ucodecsuopenu
write_fileuclose(uselfufilepathuskip_unknownufp((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuwritedsuLegacyMetadata.writecCs	|j�x�t|d�D]�}|j|�}|rT|dgdgfkrTqn|tkr�|j||dj|��qn|tkr�|dkr�|jdd�}n|g}n|tkr�dd�|D�}nx!|D]}|j|||�q�WqWd	S(
u0Write the PKG-INFO format data to a file object.uMetadata-VersionuUNKNOWNu,uDescriptionu
u	
       |cSsg|]}dj|��qS(u,(ujoin(u.0uvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
<listcomp>}s	u-LegacyMetadata.write_file.<locals>.<listcomp>N(	uset_metadata_versionu_version2fieldlistugetu_ELEMENTSFIELDu_write_fieldujoinu_LISTFIELDSureplaceu_LISTTUPLEFIELDS(uselfu
fileobjectuskip_unknownufielduvaluesuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
write_filels 

uLegacyMetadata.write_filecs��fdd�}|sn^t|d�rUxL|j�D]}||||�q7Wn$x!|D]\}}|||�q\W|r�x*|j�D]\}}|||�q�WndS(u�Set metadata values from the given iterable `other` and kwargs.

        Behavior is like `dict.update`: If `other` has a ``keys`` method,
        they are looped over and ``self[key]`` is assigned ``other[key]``.
        Else, ``other`` is an iterable of ``(key, value)`` iterables.

        Keys that don't match a metadata field or that have an empty value are
        dropped.
        cs2|tkr.|r.�j�j|�|�ndS(N(u_ATTR2FIELDusetu
_convert_name(ukeyuvalue(uself(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_set�su#LegacyMetadata.update.<locals>._setukeysN(uhasattrukeysuitems(uselfuotherukwargsu_setukuv((uselfu5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuupdate�s
uLegacyMetadata.updatecCs
|j|�}|tks'|dkrtt|ttf�rtt|t�rkdd�|jd�D�}q�g}nF|tkr�t|ttf�r�t|t�r�|g}q�g}ntj	t
j�r�|d}t|j
�}|tkrF|dk	rFx�|D];}|j|jd�d�stjd|||�qqWq�|tkr�|dk	r�|j|�s�tjd	|||�q�q�|tkr�|dk	r�|j|�s�tjd	|||�q�q�n|tkr�|d
kr�|j|�}q�n||j|<dS(u"Control then set a metadata field.uPlatformcSsg|]}|j��qS((ustrip(u.0uv((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
<listcomp>�s	u&LegacyMetadata.set.<locals>.<listcomp>u,uNameu;iu%r: %r is not valid (field %r)u(%r: %r is not a valid version (field %r)uDescriptionN(u
_convert_nameu_ELEMENTSFIELDu
isinstanceulistutupleustring_typesusplitu_LISTFIELDSuloggeruisEnabledForulogginguWARNINGu
get_schemeuschemeu_PREDICATE_FIELDSuNoneuis_valid_matcheruwarningu_VERSIONS_FIELDSuis_valid_constraint_listu_VERSION_FIELDSuis_valid_versionu_UNICODEFIELDSu_remove_line_prefixu_fields(uselfunameuvalueuproject_nameuschemeuv((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuset�s@		

		uLegacyMetadata.setcCs|j|�}||jkr@|tkr<|j|�}n|S|tkr]|j|}|S|tkr�|j|}|dkr�gSg}xE|D]=}|tkr�|j|�q�|j|d|df�q�W|S|t	kr|j|}t
|t�r|jd�Sn|j|S(uGet a metadata field.iiu,N(
u
_convert_nameu_fieldsu_MISSINGu_default_valueu_UNICODEFIELDSu_LISTFIELDSuNoneu_LISTTUPLEFIELDSuappendu_ELEMENTSFIELDu
isinstanceustring_typesusplit(uselfunameudefaultuvalueuresuval((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuget�s.



uLegacyMetadata.getcsx|j�gg}}x*dD]"}||kr|j|�qqW|rx|gkrxddj|�}t|��nx*d
D]"}||kr|j|�qqW|ddkr�||fSt|j���fd	d
�}x�t|ft�jft	�j
ffD]b\}}xS|D]K}	|j|	d�}
|
dk	r||
�r|jd|	|
f�qqWqW||fS(ukCheck if the metadata is compliant. If strict is True then raise if
        no Name or Version are provideduNameuVersionumissing required metadata: %su, u	Home-pageuAuthoruMetadata-Versionu1.2cs5x.|D]&}�j|jd�d�sdSqWdS(Nu;iFT(uis_valid_matcherusplituFalseuTrue(uvalueuv(uscheme(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuare_valid_constraintss
u3LegacyMetadata.check.<locals>.are_valid_constraintsuWrong value for %r: %s(uNameuVersion(u	Home-pageuAuthorN(
uset_metadata_versionuappendujoinuMetadataMissingErroru
get_schemeuschemeu_PREDICATE_FIELDSu_VERSIONS_FIELDSuis_valid_constraint_listu_VERSION_FIELDSuis_valid_versionugetuNone(uselfustrictumissinguwarningsuattrumsguare_valid_constraintsufieldsu
controllerufielduvalue((uschemeu5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyucheck�s2




	
"uLegacyMetadata.checkcCs0|j�dB}i}x;|D]3\}}|s?||jkr||||<qqW|ddkr�dK}x�|D]]\}}|s�||jkrq|d&kr�||||<q�d,d-�||D�||<qqqqWnW|dd.kr,dO}x>|D]3\}}|s||jkr�||||<q�q�Wn|S(Pu�Return fields as a dict.

        Field names will be converted to use the underscore-lowercase style
        instead of hyphen-mixed case (i.e. home_page instead of Home-page).
        umetadata_versionuMetadata-VersionunameuNameuversionuVersionusummaryuSummaryu	home_pageu	Home-pageuauthoruAuthoruauthor_emailuAuthor-emailulicenseuLicenseudescriptionuDescriptionukeywordsuKeywordsuplatformuPlatformu
classifieru
Classifierudownload_urluDownload-URLu1.2u
requires_distu
Requires-Disturequires_pythonuRequires-Pythonurequires_externaluRequires-Externalu
provides_distu
Provides-Distuobsoletes_distuObsoletes-Distuproject_urluProject-URLu
maintaineru
Maintainerumaintainer_emailuMaintainer-emailcSsg|]}dj|��qS(u,(ujoin(u.0uu((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
<listcomp>@s	u)LegacyMetadata.todict.<locals>.<listcomp>u1.1uprovidesuProvidesurequiresuRequiresu	obsoletesu	Obsoletes(umetadata_versionuMetadata-Version(unameuName(uversionuVersion(usummaryuSummary(u	home_pageu	Home-page(uauthoruAuthor(uauthor_emailuAuthor-email(ulicenseuLicense(udescriptionuDescription(ukeywordsuKeywords(uplatformuPlatform(u
classifieru
Classifier(udownload_urluDownload-URL(
(umetadata_versionuMetadata-Version(unameuName(uversionuVersion(usummaryuSummary(u	home_pageu	Home-page(uauthoruAuthor(uauthor_emailuAuthor-email(ulicenseuLicense(udescriptionuDescription(ukeywordsuKeywords(uplatformuPlatform(u
classifieru
Classifier(udownload_urluDownload-URL(u
requires_distu
Requires-Dist(urequires_pythonuRequires-Python(urequires_externaluRequires-External(u
provides_distu
Provides-Dist(uobsoletes_distuObsoletes-Dist(uproject_urluProject-URL(u
maintaineru
Maintainer(umaintainer_emailuMaintainer-email((u
requires_distu
Requires-Dist(urequires_pythonuRequires-Python(urequires_externaluRequires-External(u
provides_distu
Provides-Dist(uobsoletes_distuObsoletes-Dist(uproject_urluProject-URL(u
maintaineru
Maintainer(umaintainer_emailuMaintainer-email(uprovidesuProvides(urequiresuRequires(u	obsoletesu	Obsoletes((uprovidesuProvides(urequiresuRequires(u	obsoletesu	Obsoletes(uset_metadata_versionu_fields(uselfuskip_missingumapping_1_0udataukeyu
field_nameumapping_1_2umapping_1_1((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyutodictsP
%uLegacyMetadata.todictcCsL|ddkr:x'dD]}||kr||=qqWn|d|7<dS(NuMetadata-Versionu1.1u	ObsoletesuRequiresuProvidesu
Requires-Dist(u	ObsoletesuRequiresuProvides((uselfurequirementsufield((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuadd_requirementsNs

uLegacyMetadata.add_requirementscCstt|d��S(NuMetadata-Version(ulistu_version2fieldlist(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyukeysYsuLegacyMetadata.keysccs x|j�D]}|Vq
WdS(N(ukeys(uselfukey((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__iter__\suLegacyMetadata.__iter__cs�fdd��j�D�S(Ncsg|]}�|�qS(((u.0ukey(uself(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
<listcomp>as	u)LegacyMetadata.values.<locals>.<listcomp>(ukeys(uself((uselfu5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuvalues`suLegacyMetadata.valuescs�fdd��j�D�S(Ncs g|]}|�|f�qS(((u.0ukey(uself(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
<listcomp>ds	u(LegacyMetadata.items.<locals>.<listcomp>(ukeys(uself((uselfu5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuitemscsuLegacyMetadata.itemscCsd|jj|j|jfS(Nu
<%s %s %s>(u	__class__u__name__unameuversion(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__repr__fsuLegacyMetadata.__repr__NF($u__name__u
__module__u__qualname__u__doc__uNoneu__init__uset_metadata_versionu_write_fieldu__getitem__u__setitem__u__delitem__u__contains__u
_convert_nameu_default_valueu_remove_line_prefixu__getattr__uFalseuget_fullnameuis_fielduis_multi_fieldureadu	read_fileuwriteu
write_fileuupdateusetu_MISSINGugetucheckutodictuadd_requirementsukeysu__iter__uvaluesuitemsu__repr__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuLegacyMetadata�s>		,,;uLegacyMetadataupydist.jsoncBs�|EeZdZdZejd�Zejdej�Ze	Z
ejd�ZdZde
Zifd6fd6dQd
6ZdZdZieffd
6edRfd6e
dSfd6edTfd
6ZdUZdPdPdPddd�ZedV�ZdPefZdPefZi
defd6defd6ed6ed6ed6defd6ed6ed 6ed!6ed"6d#efd$6dWd&6dXd
6Z[[d(d)�ZdPd*d+�Zd,d-�Ze d.d/��Z!e d0d1��Z"e"j#d2d1��Z"dPdPd3d4�Z$e d5d6��Z%e d7d8��Z&e&j#d9d8��Z&d:d;�Z'd<d=�Z(d>d?�Z)d@dA�Z*idBd6dCd6dDd6dEd
6dFdG6d#d$6Z+dHdI�Z,dPdPdYdZdJdK�Z/dLdM�Z0dNdO�Z1dPS([uMetadatau�
    The metadata of a release. This implementation uses 2.0 (JSON)
    metadata where possible. If not possible, it wraps a LegacyMetadata
    instance which handles the key-value metadata format.
    u
^\d+(\.\d+)*$u!^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$u	.{1,2047}u2.0udistlib (%s)unameuversionulegacyusummaryuqname version license summary description author author_email keywords platform home_page classifiers download_urluwextras run_requires test_requires build_requires dev_requires provides meta_requires obsoleted_by supports_environmentsumetadata_versionu_legacyu_datauschemeudefaultcCs�|||gjd�dkr-td��nd|_d|_||_|dk	r�y|j||�||_Wq�tk
r�td|d|�|_|j	�Yq�Xn�d}|r�t
|d��}|j�}WdQXn|r�|j�}n|dkri|jd6|j
d6|_n�t|t�s@|jd�}ny)tj|�|_|j|j|�Wn:tk
r�td	t|�d|�|_|j	�YnXdS(
Niu'path, fileobj and mapping are exclusiveumappinguschemeurbumetadata_versionu	generatoruutf-8ufileobj(ucountuNoneu	TypeErroru_legacyu_datauschemeu_validate_mappingu MetadataUnrecognizedVersionErroruLegacyMetadatauvalidateuopenureaduMETADATA_VERSIONu	GENERATORu
isinstanceu	text_typeudecodeujsonuloadsu
ValueErroruStringIO(uselfupathufileobjumappinguschemeudatauf((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__init__�s>			



uMetadata.__init__ulicenseukeywordsu
Requires-Disturun_requiresuSetup-Requires-Distubuild_requiresudev_requiresu
test_requiresu
meta_requiresuProvides-Extrauextrasumodulesu
namespacesuexportsucommandsu
ClassifieruclassifiersuDownload-URLu
source_urluMetadata-VersioncCstj|d�}tj|d�}||kr�||\}}|jr�|dkrs|dkrgdn|�}q�|jj|�}q|dkr�dn|�}|jj||�}nQ||kr�tj||�}n0|jr�|jj|�}n|jj|�}|S(Nucommon_keysumapped_keys(uobjectu__getattribute__u_legacyuNoneugetu_data(uselfukeyucommonumappedulkumakeruresultuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__getattribute__�s 		uMetadata.__getattribute__cCso||jkrk|j|\}}|p.|j|krk|j|�}|shtd||f��qhqkndS(Nu*%r is an invalid value for the %r property(uSYNTAX_VALIDATORSuschemeumatchuMetadataInvalidError(uselfukeyuvalueuschemeupatternu
exclusionsum((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_validate_value�suMetadata._validate_valuecCs"|j||�tj|d�}tj|d�}||kr�||\}}|jr~|dkrnt�n||j|<q||j|<n�||kr�tj|||�nn|dkr�t|t	�r�|j
�}|r�|j�}q�g}q�n|jr||j|<n
||j|<dS(Nucommon_keysumapped_keysukeywords(u_validate_valueuobjectu__getattribute__u_legacyuNoneuNotImplementedErroru_datau__setattr__u
isinstanceustring_typesustripusplit(uselfukeyuvalueucommonumappedulku_((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__setattr__�s*			uMetadata.__setattr__cCst|j|jd�S(NT(u_get_name_and_versionunameuversionuTrue(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuname_and_versionsuMetadata.name_and_versioncCsd|jr|jd}n|jjdg�}d|j|jf}||kr`|j|�n|S(Nu
Provides-Distuprovidesu%s (%s)(u_legacyu_datau
setdefaultunameuversionuappend(uselfuresultus((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuprovidess	uMetadata.providescCs*|jr||jd<n
||jd<dS(Nu
Provides-Distuprovides(u_legacyu_data(uselfuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuprovides%s	c
	CsL|jr|}n6g}t|p$g|j�}x�|D]�}d|kr^d|kr^d}nZd|krsd}n|jd�|k}|r�|jd�}|r�t||�}q�n|r7|j|d�q7q7WxodD]g}d|}	|	|kr�|j|	�|jjd|g�}|j|j	|d	|d
|��q�q�W|S(
u�
        Base method to get dependencies, given a set of extras
        to satisfy and an optional environment context.
        :param reqts: A list of sometimes-wanted dependencies,
                      perhaps dependent on extras and environment.
        :param extras: A list of optional components being requested.
        :param env: An optional environment for marker evaluation.
        uextrauenvironmenturequiresubuildudevutestu:%s:u%s_requiresuextrasuenvT(ubuildudevutest(
u_legacyu
get_extrasuextrasuTrueugetu	interpretuextenduremoveu_datauget_requirements(
uselfureqtsuextrasuenvuresultuduincludeumarkerukeyue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuget_requirements,s0			
		


uMetadata.get_requirementscCs|jr|j�S|jS(N(u_legacyu_from_legacyu_data(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
dictionaryVs	
uMetadata.dictionarycCs)|jrt�nt|j|j�SdS(N(u_legacyuNotImplementedErroruextract_by_keyu_datauDEPENDENCY_KEYS(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyudependencies\s		uMetadata.dependenciescCs&|jrt�n|jj|�dS(N(u_legacyuNotImplementedErroru_datauupdate(uselfuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyudependenciescs		c	Cs�|jd�|jkr$t��ng}xH|jj�D]7\}}||kr:||krq|j|�qqq:q:W|r�ddj|�}t|��nx-|j�D]\}}|j|||�q�WdS(Numetadata_versionuMissing metadata items: %su, (	ugetuMETADATA_VERSIONu MetadataUnrecognizedVersionErroruMANDATORY_KEYSuitemsuappendujoinuMetadataMissingErroru_validate_value(	uselfumappinguschemeumissingukeyu
exclusionsumsgukuv((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_validate_mappingjsuMetadata._validate_mappingcCs`|jrF|jjd�\}}|s-|r\tjd||�q\n|j|j|j�dS(Nu#Metadata: missing: %s, warnings: %sT(u_legacyucheckuTrueuloggeruwarningu_validate_mappingu_datauscheme(uselfumissinguwarnings((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuvalidatexs		uMetadata.validatecCs6|jr|jjd�St|j|j�}|SdS(NT(u_legacyutodictuTrueuextract_by_keyu_datau
INDEX_KEYS(uselfuresult((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyutodict�s	uMetadata.todictc
Cs-|jr|jst�i|jd6|jd6}|jjd�}xFdD]>}||krL|dkrsd	}n|}||||<qLqLW|jd
g�}|dgkr�g}n||d<d}xE|D]=\}}||kr�||r�i||d6g||<q�q�W|j|d<i}i}	|S(Numetadata_versionu	generatorunameuversionulicenseusummaryudescriptionu
classifieruclassifiersuKeywordsuukeywordsu
requires_disturun_requiresusetup_requires_distubuild_requiresurequiresuprovidesT(unameuversionulicenseusummaryudescriptionu
classifier(u
requires_disturun_requires(usetup_requires_distubuild_requires((u
requires_disturun_requires(usetup_requires_distubuild_requires(	u_legacyu_datauAssertionErroruMETADATA_VERSIONu	GENERATORutodictuTrueugetuprovides(
uselfuresultulmdukunkukwukeysuokuauthoru
maintainer((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu_from_legacy�s2


		

uMetadata._from_legacyuNameuVersionuLicenseuSummaryuDescriptionudescriptioncCs�dd�}|jr|js%t�t�}|j}x:|jj�D])\}}||krG||||<qGqGW||j|j�}||j|j	�}|j
r�t|j
�|d<nt|�|d<t|�|d<|S(NcSs�t�}x�|D]�}|jd�}|jd�}|d}x�|D]�}|ri|ri|j|�qEd}|r�d|}n|r�|r�d||f}q�|}n|jdj||f��qEWqW|S(Nuextrauenvironmenturequiresuu
extra == "%s"u(%s) and %su;(usetugetuaddujoin(uentriesureqtsueuextrauenvurlisturumarker((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuprocess_entries�s"	



	$u,Metadata._to_legacy.<locals>.process_entriesuProvides-Extrau
Requires-DistuSetup-Requires-Dist(u_datau_legacyuAssertionErroruLegacyMetadatauLEGACY_MAPPINGuitemsurun_requiresu
meta_requiresubuild_requiresudev_requiresuextrasusorted(uselfuprocess_entriesuresultunmdunkuokur1ur2((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu
_to_legacy�s			uMetadata._to_legacycCs||gjd�dkr*td��n|j�|r�|jrO|j}n|j�}|rw|j|d|�q|j|d|�n�|jr�|j�}n	|j	}|r�t
j||dd
dddd
�n@t
j|dd	��)}t
j||dd
dddd
�WdQXdS(Niu)Exactly one of path and fileobj is neededuskip_unknownuensure_asciiuindentiu	sort_keysuwuutf-8T(ucountuNoneu
ValueErroruvalidateu_legacyu
_to_legacyuwriteu
write_fileu_from_legacyu_dataujsonudumpuTrueucodecsuopen(uselfupathufileobjulegacyuskip_unknownu	legacy_mduduf((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuwrite�s&
			
uMetadata.writecCs�|jr|jj|�n�|jjdg�}d}x0|D](}d|kr>d|kr>|}Pq>q>W|dkr�i|d6}|jd|�n*t|d�t|�B}t|�|d<dS(Nurun_requiresuenvironmentuextraurequiresi(u_legacyuadd_requirementsu_datau
setdefaultuNoneuinsertusetusorted(uselfurequirementsurun_requiresualwaysuentryurset((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuadd_requirements�s	

uMetadata.add_requirementscCs;|jpd}|jpd}d|jj|j||fS(Nu	(no name)u
no versionu<%s %s %s (%s)>(unameuversionu	__class__u__name__umetadata_version(uselfunameuversion((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu__repr__�suMetadata.__repr__N(ulegacy(ulegacy(ulegacy(ulegacy(u_legacyu_datauscheme(unameuversionulicenseukeywordsusummary(uDownload-URLN(uMetadata-VersionNFT(2u__name__u
__module__u__qualname__u__doc__ureucompileuMETADATA_VERSION_MATCHERuIuNAME_MATCHERuPEP426_VERSION_REuVERSION_MATCHERuSUMMARY_MATCHERuMETADATA_VERSIONu__version__u	GENERATORuMANDATORY_KEYSu
INDEX_KEYSuDEPENDENCY_KEYSuSYNTAX_VALIDATORSu	__slots__uNoneu__init__usetucommon_keysulistu	none_listudictu	none_dictumapped_keysu__getattribute__u_validate_valueu__setattr__upropertyuname_and_versionuprovidesusetteruget_requirementsu
dictionaryudependenciesu_validate_mappinguvalidateutodictu_from_legacyuLEGACY_MAPPINGu
_to_legacyuFalseuTrueuwriteuadd_requirementsu__repr__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyuMetadatans�




	,





*	
%(Au__doc__u
__future__uunicode_literalsucodecsuemailumessage_from_fileujsonuloggingureuuDistlibExceptionu__version__ucompatuStringIOustring_typesu	text_typeumarkersu	interpretuutiluextract_by_keyu
get_extrasuversionu
get_schemeuPEP426_VERSION_REu	getLoggeru__name__uloggeruMetadataMissingErroruMetadataConflictErroru MetadataUnrecognizedVersionErroruMetadataInvalidErroru__all__uPKG_INFO_ENCODINGuPKG_INFO_PREFERRED_VERSIONucompileu_LINE_PREFIXu_241_FIELDSu_314_FIELDSu_314_MARKERSu_345_FIELDSu_345_MARKERSu_426_FIELDSu_426_MARKERSusetu_ALL_FIELDSuupdateuEXTRA_REu_version2fieldlistu
_best_versionu_ATTR2FIELDu_PREDICATE_FIELDSu_VERSIONS_FIELDSu_VERSION_FIELDSu_LISTFIELDSu_LISTTUPLEFIELDSu_ELEMENTSFIELDu_UNICODEFIELDSuobjectu_MISSINGu	_FILESAFEuFalseu_get_name_and_versionuLegacyMetadatauMETADATA_FILENAMEuMetadata(((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/metadata.pyu<module>	s�																		



8
									
��python3.3/site-packages/pip/_vendor/distlib/__pycache__/locators.cpython-33.pyc000064400000147504151733566750023425 0ustar00�
7�Reb�c@sddlZddlmZddlZddlZddlZddlZddlZyddlZWne	k
r�ddl
ZYnXddlZddlm
Z
ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZm Z m!Z!ddl"m#Z#ddl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,dd	l-m.Z.m/Z/dd
l0m1Z1m2Z2ej3e4�Z5ej6d�Z7ej6dej8�Z9ej6d
�Z:dZ;e<dd�Z=Gdd�de�Z>Gdd�de?�Z@Gdd�de@�ZAGdd�de@�ZBGdd�de?�ZCGdd�de@�ZDGdd�de@�ZEGdd �d e@�ZFGd!d"�d"e@�ZGGd#d$�d$e@�ZHeHeF�eDd%d&d'�d(d)�ZIeIjJZJej6d*�ZKGd+d,�d,e?�ZLdS(-iN(uBytesIOi(uDistlibException(uurljoinuurlparseu
urlunparseuurl2pathnameupathname2urluqueueuquoteuunescapeustring_typesubuild_openeruHTTPRedirectHandleruRequestu	HTTPErroruURLError(uDistributionuDistributionPathu	make_dist(uMetadata(ucached_propertyuparse_credentialsuensure_slashusplit_filenameuget_project_datauparse_requirementuparse_name_and_versionuServerProxy(u
get_schemeuUnsupportedVersionError(uWheelu
is_compatibleu^(\w+)=([a-f0-9]+)u;\s*charset\s*=\s*(.*)\s*$utext/html|application/x(ht)?mluhttp://python.org/pypicCs1|dkrt}nt|dd�}|j�S(u�
    Return all distribution names known by an index.
    :param url: The URL of the index.
    :return: A list of all known distribution names.
    utimeoutg@N(uNoneu
DEFAULT_INDEXuServerProxyu
list_packages(uurluclient((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_all_distribution_names)s	uget_all_distribution_namescBs4|EeZdZdZdd�ZeZZZdS(uRedirectHandleruE
    A class to work around a bug in some Python 3.2.x releases.
    c	Cs�d}x(dD] }||kr
||}Pq
q
W|dkrAdSt|�}|jdkr�t|j�|�}t|d�r�|j||�q�|||<ntj||||||�S(Nulocationuuriuureplace_header(ulocationuuri(	uNoneuurlparseuschemeuurljoinuget_full_urluhasattrureplace_headeruBaseRedirectHandleruhttp_error_302(	uselfurequfpucodeumsguheadersunewurlukeyuurlparts((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuhttp_error_302=s


uRedirectHandler.http_error_302N(u__name__u
__module__u__qualname__u__doc__uhttp_error_302uhttp_error_301uhttp_error_303uhttp_error_307(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuRedirectHandler4suRedirectHandlercBs�|EeZdZdZd*Zd+Zd,Zd)Zed-Z	dd
d�Z
dd�Zdd�Zdd�Z
eee
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd.d'd(�Zd)S(/uLocatoruG
    A base class for locators - things that locate distributions.
    u.tar.gzu.tar.bz2u.taru.zipu.tgzu.tbzu.eggu.exeu.whlu.pdfudefaultcCs1i|_||_tt��|_d|_dS(u^
        Initialise an instance.
        :param scheme: Because locators look for most recent versions, they
                       need to know the version scheme to use. This specifies
                       the current PEP-recommended scheme - use ``'legacy'``
                       if you need to support existing distributions on PyPI.
        N(u_cacheuschemeubuild_openeruRedirectHandleruopeneruNoneumatcher(uselfuscheme((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__cs		uLocator.__init__cCs|jj�dS(N(u_cacheuclear(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuclear_cacheusuLocator.clear_cachecCs|jS(N(u_scheme(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_schemexsuLocator._get_schemecCs
||_dS(N(u_scheme(uselfuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_set_scheme{suLocator._set_schemecCstd��dS(u=
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This should be implemented in subclasses.

        If called from a locate() request, self.matcher will be set to a
        matcher for the requirement to satisfy, otherwise it will be None.
        u Please implement in the subclassN(uNotImplementedError(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_project�s
uLocator._get_projectcCstd��dS(uJ
        Return all the distribution names known to this locator.
        u Please implement in the subclassN(uNotImplementedError(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_distribution_names�suLocator.get_distribution_namescCs`|jdkr!|j|�}n;||jkr@|j|}n|j|�}||j|<|S(u�
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This calls _get_project to do all the work, and just implements a caching layer on top.
        N(u_cacheuNoneu_get_project(uselfunameuresult((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_project�s
uLocator.get_projectcCs7t|�}|jdkd|jktj|j�fS(uu
        Give an url a score which can be used to choose preferred URLs
        for a given project release.
        uhttpsupypi.python.org(uurlparseuschemeunetlocu	posixpathubasenameupath(uselfuurlut((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu	score_url�suLocator.score_urlcCs{|}|rw|j|�}|j|�}||kr?|}n||kratjd||�qwtjd||�n|S(uL
        Choose one of two URLs where both are candidates for distribution
        archives for the same version of a distribution (for example,
        .tar.gz vs. zip).

        The current implement favours http:// URLs over https://, archives
        from PyPI over those from other locations and then the archive name.
        uNot replacing %r with %ruReplacing %r with %r(u	score_urluloggerudebug(uselfuurl1uurl2uresultus1us2((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu
prefer_url�s		uLocator.prefer_urlcCs
t||�S(uZ
        Attempt to split a filename in project name, version and Python version.
        (usplit_filename(uselfufilenameuproject_name((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyusplit_filename�suLocator.split_filenamecCs�dd�}d}t|�\}}}}}	}
|
j�jd�r[tjd||
�ntj|
�}|r�|j�\}}
nd\}}
|}|r�|ddkr�|dd�}n|j	d�r�y�t
|�}t||j�r�|dkrd}n||j|�}|r�i|jd	6|jd
6|jd6t|||||	df�d
6djdd�|jD��d6}q�nWq�tk
r�}ztjd|�WYdd}~Xq�Xn|j	|j�r�tj|�}}x�|jD]�}|j	|�r�|dt|��}|j||�}|sHtjd|�nu|\}}}|sm|||�r�i|d	6|d
6|d6t|||||	df�d
6}|r�||d<q�nPq�q�Wn|r�|r�|
|d|<n|S(u
        See if a URL is a candidate for a download URL for a project (the URL
        has typically been scraped from an HTML page).

        If it is, a dictionary is returned with keys "name", "version",
        "filename" and "url"; otherwise, None is returned.
        cSsV|j�|j�}}||kr.d}n$|jdd�|jdd�k}|S(Nu_u-T(uloweruTrueureplace(uname1uname2uresult((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyusame_project�s
	$u:Locator.convert_url_to_download_info.<locals>.same_projectuegg=u %s: version hint in fragment: %riu/Nu.whlunameuversionufilenameuuurlu, cSs/g|]%}djt|dd����qS(u.iN(ujoinulist(u.0uv((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu
<listcomp>�s	u8Locator.convert_url_to_download_info.<locals>.<listcomp>upython-versionuinvalid path for wheel: %su No match for project/version: %su	%s_digest(NNi����i����T(uNoneuurlparseuloweru
startswithuloggerudebuguHASHER_HASHumatchugroupsuendswithuWheelu
is_compatibleu
wheel_tagsuTrueunameuversionufilenameu
urlunparseujoinupyveru	Exceptionuwarningudownloadable_extensionsu	posixpathubasenameulenusplit_filename(uselfuurluproject_nameusame_projecturesultuschemeunetlocupathuparamsuqueryufragumualgoudigestuorigpathuwheeluincludeueufilenameuextutunameuversionupyver((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuconvert_url_to_download_info�sj
	
	


'&u$Locator.convert_url_to_download_infocCsEd}x8dD]0}d|}||kr
|||f}Pq
q
W|S(u�
        Get a digest from a dictionary by looking at keys of the form
        'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
        usha256umd5u	%s_digestN(usha256umd5(uNone(uselfuinfouresultualgoukey((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_digests

uLocator._get_digestcCs�|jd�}|jd�}||kr@||}|j}n!t||d|j�}|j}|j|�|_|j|dkr�|j|j|d�|_n||_|||<dS(u�
        Update a result dictionary (the final result from _get_project) with a dictionary for a
        specific version, whih typically holds information gleaned from a filename or URL for an
        archive for the distribution.
        unameuversionuschemeuurlN(	upopumetadatau	make_distuschemeu_get_digestudigestu
source_urlu
prefer_urlulocator(uselfuresultuinfounameuversionudistumd((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_update_version_data#s
		uLocator._update_version_datacCs�d	}t|�}|d	kr1td|��nt|j�}|j|j�|_}tjd|t	|�j
�|j|j�}|r�g}|j
}	x�|D]�}
ye|j|
�s�tjd||
�n<|s�|	|
�jr�|j|
�ntjd|
|j�Wq�tk
r5tjd||
�Yq�Xq�Wt|�dkrdt|d|j�}n|r�tjd|�||d
}q�n|r�|jr�|j|_nd	|_|S(u
        Find the most recent distribution which matches the given
        requirement.

        :param requirement: A requirement of the form 'foo (1.0)' or perhaps
                            'foo (>= 1.0, < 2.0, != 1.3)'
        :param prereleases: If ``True``, allow pre-release versions
                            to be located. Otherwise, pre-release versions
                            are not returned.
        :return: A :class:`Distribution` instance, or ``None`` if no such
                 distribution could be located.
        uNot a valid requirement: %rumatcher: %s (%s)u%s did not match %ru%skipping pre-release version %s of %suerror matching %s with %riukeyusorted list: %sNi����(uNoneuparse_requirementuDistlibExceptionu
get_schemeuschemeumatcherurequirementuloggerudebugutypeu__name__uget_projectunameu
version_classumatchu
is_prereleaseuappendu	Exceptionuwarningulenusortedukeyuextras(uselfurequirementuprereleasesuresulturuschemeumatcheruversionsuslistuvclsuk((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyulocate7s>
	
	
		uLocator.locateN(u.tar.gzu.tar.bz2u.taru.zipu.tgzu.tbz(u.eggu.exeu.whl(u.pdf(u.whlF(u__name__u
__module__u__qualname__u__doc__usource_extensionsubinary_extensionsuexcluded_extensionsuNoneu
wheel_tagsudownloadable_extensionsu__init__uclear_cacheu_get_schemeu_set_schemeupropertyuschemeu_get_projectuget_distribution_namesuget_projectu	score_urlu
prefer_urlusplit_filenameuconvert_url_to_download_infou_get_digestu_update_version_datauFalseulocate(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuLocatorSs*
	MuLocatorcsD|EeZdZdZ�fdd�Zdd�Zdd�Z�S(uPyPIRPCLocatoru�
    This locator uses XML-RPC to locate distributions. It therefore
    cannot be used with simple mirrors (that only mirror file content).
    cs8tt|�j|�||_t|dd�|_dS(u�
        Initialise an instance.

        :param url: The URL to use for XML-RPC.
        :param kwargs: Passed to the superclass constructor.
        utimeoutg@N(usuperuPyPIRPCLocatoru__init__ubase_urluServerProxyuclient(uselfuurlukwargs(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__ms	uPyPIRPCLocator.__init__cCst|jj��S(uJ
        Return all the distribution names known to this locator.
        (usetuclientu
list_packages(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_distribution_namesxsu%PyPIRPCLocator.get_distribution_namesc
Csi}|jj|d	�}x�|D]�}|jj||�}|jj||�}td|j�}|d|_|d|_|j	d�|_
|j	dg�|_|j	d�|_t
|�}|r"|d}	|	d|_|j|	�|_||_|||<q"q"W|S(
NuschemeunameuversionulicenseukeywordsusummaryiuurlT(uclientupackage_releasesuTrueurelease_urlsurelease_datauMetadatauschemeunameuversionugetulicenseukeywordsusummaryuDistributionu
source_urlu_get_digestudigestulocator(
uselfunameuresultuversionsuvuurlsudataumetadataudistuinfo((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_project~s&




	uPyPIRPCLocator._get_project(u__name__u
__module__u__qualname__u__doc__u__init__uget_distribution_namesu_get_project(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuPyPIRPCLocatorhsuPyPIRPCLocatorcsD|EeZdZdZ�fdd�Zdd�Zdd�Z�S(uPyPIJSONLocatoruw
    This locator uses PyPI's JSON interface. It's very limited in functionality
    nad probably not worth using.
    cs)tt|�j|�t|�|_dS(N(usuperuPyPIJSONLocatoru__init__uensure_slashubase_url(uselfuurlukwargs(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__�suPyPIJSONLocator.__init__cCstd��dS(uJ
        Return all the distribution names known to this locator.
        uNot available from this locatorN(uNotImplementedError(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_distribution_names�su&PyPIJSONLocator.get_distribution_namescCsbi}t|jdt|��}y|jj|�}|j�j�}tj|�}t	d|j
�}|d}|d|_|d|_|j
d�|_|j
dg�|_|j
d�|_t|�}|d	}	|	r%|	d
}
|
d|_|j|
�|_||_|||j<nWn5tk
r]}ztjd|�WYdd}~XnX|S(
Nu%s/jsonuschemeuinfounameuversionulicenseukeywordsusummaryuurlsiuurluJSON fetch failed: %s(uurljoinubase_urluquoteuopeneruopenureadudecodeujsonuloadsuMetadatauschemeunameuversionugetulicenseukeywordsusummaryuDistributionu
source_urlu_get_digestudigestulocatoru	Exceptionuloggeru	exception(uselfunameuresultuurlurespudataudumdudistuurlsuinfoue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_project�s0





	#uPyPIJSONLocator._get_project(u__name__u
__module__u__qualname__u__doc__u__init__uget_distribution_namesu_get_project(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuPyPIJSONLocator�suPyPIJSONLocatorcBs�|EeZdZdZejdejejBejB�Z	ejdejejB�Z
dd�Zejdej�Ze
dd��Zd	S(
uPageu4
    This class represents a scraped HTML page.
    u�
(rel\s*=\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\s
]*))\s+)?
href\s*=\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\s
]*))
(\s+rel\s*=\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\s
]*)))?
u!<base\s+href\s*=\s*['"]?([^'">]+)cCsM||_||_|_|jj|j�}|rI|jd�|_ndS(uk
        Initialise an instance with the Unicode page contents and the URL they
        came from.
        iN(udataubase_urluurlu_baseusearchugroup(uselfudatauurlum((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__�s
	u
Page.__init__u[^a-z0-9$&+,/:;=?@.#%_\\|-]cCsdd�}t�}x�|jj|j�D]�}|jd�}|dpy|dpy|dpy|dpy|dpy|d	}|d
p�|dp�|d}t|j|�}t|�}|jj	d
d�|�}|j
||f�q+Wt|ddd�dd�}|S(u�
        Return the URLs of all the links on a page together with information
        about their "rel" attribute, for determining which ones to treat as
        downloads and which ones to queue for further scraping.
        cSs@t|�\}}}}}}t||t|�|||f�S(uTidy up an URL.(uurlparseu
urlunparseuquote(uurluschemeunetlocupathuparamsuqueryufrag((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuclean�suPage.links.<locals>.cleanuurel1urel2urel3urel4urel5urel6uurl1uurl2uurl3cSsdt|jd��S(Nu%%%2xi(uordugroup(um((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu<lambda>�suPage.links.<locals>.<lambda>ukeycSs|dS(Ni((ut((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu<lambda>�sureverseT(
usetu_hrefufinditerudatau	groupdictuurljoinubase_urluunescapeu	_clean_reusubuaddusorteduTrue(uselfucleanuresultumatchudureluurl((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyulinks�s	u
Page.linksN(u__name__u
__module__u__qualname__u__doc__ureucompileuIuSuXu_hrefu_baseu__init__u	_clean_reucached_propertyulinks(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuPage�suPagecs�|EeZdZdZiejd6dd�d6dd�d6Zdd�fd	d
�Zdd�Z	d
d�Z
dd�Zej
dej�Zdd�Zdd�Zdd�Zdd�Zdd�Zej
d�Zdd�Z�S( uSimpleScrapingLocatoru�
    A locator which scrapes HTML pages to locate downloads for a distribution.
    This runs multiple threads to do the I/O; performance is at least as good
    as pip's PackageFinder, which works in an analogous fashion.
    udeflatecCstjdtt��j�S(Nufileobj(ugzipuGzipFileuBytesIOuduread(ub((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu<lambda>suSimpleScrapingLocator.<lambda>ugzipcCs|S(N((ub((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu<lambda>sunonei
cs�tt|�j|�t|�|_||_i|_t�|_t	j
�|_t�|_d|_||_tj�|_tj�|_dS(u�
        Initialise an instance.
        :param url: The root URL to use for scraping.
        :param timeout: The timeout, in seconds, to be applied to requests.
                        This defaults to ``None`` (no timeout specified).
        :param num_workers: The number of worker threads you want to do I/O,
                            This defaults to 10.
        :param kwargs: Passed to the superclass.
        NF(usuperuSimpleScrapingLocatoru__init__uensure_slashubase_urlutimeoutu_page_cacheusetu_seenuqueueuQueueu	_to_fetchu
_bad_hostsuFalseuskip_externalsunum_workersu	threadinguRLocku_locku_gplock(uselfuurlutimeoutunum_workersukwargs(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__s
				uSimpleScrapingLocator.__init__cCscg|_xSt|j�D]B}tjd|j�}|jd�|j�|jj	|�qWdS(u�
        Threads are created only when get_project is called, and terminate
        before it returns. They are there primarily to parallelise I/O (i.e.
        fetching web pages).
        utargetNT(
u_threadsurangeunum_workersu	threadinguThreadu_fetchu	setDaemonuTrueustartuappend(uselfuiut((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_prepare_threadss	

u&SimpleScrapingLocator._prepare_threadscCsOx!|jD]}|jjd�q
Wx|jD]}|j�q.Wg|_dS(uu
        Tell all the threads to terminate (by sending a sentinel value) and
        wait for them to do so.
        N(u_threadsu	_to_fetchuputuNoneujoin(uselfut((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu
_wait_threads,s
u#SimpleScrapingLocator._wait_threadscCs�i}|j��||_||_t|jdt|��}|jj�|jj�|j	�z1t
jd|�|jj
|�|jj�Wd|j�X|`WdQX|S(Nu%s/uQueueing %s(u_gplockuresultuproject_nameuurljoinubase_urluquoteu_seenuclearu_page_cacheu_prepare_threadsuloggerudebugu	_to_fetchuputujoinu
_wait_threads(uselfunameuresultuurl((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_project9s
		


u"SimpleScrapingLocator._get_projectu<\b(linux-(i\d86|x86_64|arm\w+)|win(32|-amd64)|macosx-?\d+)\bcCs|jj|�S(uD
        Does an URL refer to a platform-specific download?
        (uplatform_dependentusearch(uselfuurl((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_is_platform_dependentNsu,SimpleScrapingLocator._is_platform_dependentc
Csp|j|�rd}n|j||j�}tjd||�|rl|j�|j|j|�WdQXn|S(u%
        See if an URL is a suitable download for a project.

        If it is, register information in the result dictionary (for
        _get_project) about the specific version it's for.

        Note that the return value isn't actually used other than as a boolean
        value.
        uprocess_download: %s -> %sN(	u_is_platform_dependentuNoneuconvert_url_to_download_infouproject_nameuloggerudebugu_locku_update_version_datauresult(uselfuurluinfo((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_process_downloadTs
	
u'SimpleScrapingLocator._process_downloadc
Cst|�\}}}}}}|j|j|j|j�rGd}n�|jrl|j|j�rld}n�|j|j�s�d}ny|dkr�d}nd|d
kr�d}nO|j	|�r�d}n7|j
dd�d}	|	j�d	kr�d}nd}t
jd
||||�|S(u�
        Determine whether a link URL from a referring page and with a
        particular "rel" attribute should be queued for scraping.
        uhomepageudownloaduhttpuhttpsuftpu:iiu	localhostu#should_queue: %s (%s) from %s -> %sF(uhomepageudownload(uhttpuhttpsuftpT(uurlparseuendswithusource_extensionsubinary_extensionsuexcluded_extensionsuFalseuskip_externalsu
startswithubase_urlu_is_platform_dependentusplituloweruTrueuloggerudebug(
uselfulinkureferrerureluschemeunetlocupathu_uresultuhost((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu
_should_queuehs*
							
u#SimpleScrapingLocator._should_queuecCs�x�|jj�}z�|r�|j|�}|dkr<wnx�|jD]y\}}||jkrF|jj|�|j|�r�|j|||�r�t	j
d||�|jj|�q�qFqFWnWd|jj�X|sPqqdS(u�
        Get a URL to fetch from the work queue, get the HTML page, examine its
        links for download candidates and candidates for further scraping.

        This is a handy method to run in a thread.
        uQueueing %s from %sN(
u	_to_fetchugetuget_pageuNoneulinksu_seenuaddu_process_downloadu
_should_queueuloggerudebuguputu	task_done(uselfuurlupageulinkurel((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_fetch�s"!uSimpleScrapingLocator._fetchcCst|�\}}}}}}|dkrZtjjt|��rZtt|�d�}n||jkr�|j|}tj	d||�n�|j
dd�d}d}||jkr�tj	d||�nAt
|did	d
6�}zy8tj	d|�|jj|d|j�}	tj	d
|�|	j�}
|
jdd�}tj|�r |	j�}|	j�}
|
jd�}|r�|j|}||
�}
nd}tj|�}|r�|jd�}ny|
j|�}
Wn!tk
r|
jd�}
YnXt|
|�}||j|<nWn�tk
rm}z*|jdkr[tj d||�nWYdd}~Xn�t!k
r�}z8tj d||�|j"�|jj#|�WdQXWYdd}~Xn8t$k
r�}ztj d||�WYdd}~XnXWd||j|<X|S(u
        Get the HTML for an URL, possibly from an in-memory cache.

        XXX TODO Note: this cache is never actually cleared. It's assumed that
        the data won't get stale over the lifetime of a locator instance (not
        necessarily true for the default_locator).
        ufileu
index.htmluReturning %s from cache: %su:iiuSkipping %s due to bad host %suheadersuidentityuAccept-encodinguFetching %sutimeoutu
Fetched %suContent-TypeuuContent-Encodinguutf-8ulatin-1i�uFetch failed: %s: %sN(%uurlparseuosupathuisdiruurl2pathnameuurljoinuensure_slashu_page_cacheuloggerudebugusplituNoneu
_bad_hostsuRequestuopeneruopenutimeoutuinfougetuHTML_CONTENT_TYPEumatchugeturlureadudecodersuCHARSETusearchugroupudecodeuUnicodeErroruPageu	HTTPErrorucodeu	exceptionuURLErroru_lockuaddu	Exception(uselfuurluschemeunetlocupathu_uresultuhosturequrespuheadersucontent_typeu	final_urludatauencodingudecoderumue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_page�sZ	$


(
(*uSimpleScrapingLocator.get_pageu<a href=[^>]*>([^<]+)<cCsqt�}|j|j�}|s7td|j��nx3|jj|j�D]}|j|jd��qMW|S(uJ
        Return all the distribution names known to this locator.
        uUnable to get %si(	usetuget_pageubase_urluDistlibExceptionu_distname_reufinditerudatauaddugroup(uselfuresultupageumatch((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_distribution_names�s	u,SimpleScrapingLocator.get_distribution_namesN(u__name__u
__module__u__qualname__u__doc__uzlibu
decompressudecodersuNoneu__init__u_prepare_threadsu
_wait_threadsu_get_projectureucompileuIuplatform_dependentu_is_platform_dependentu_process_downloadu
_should_queueu_fetchuget_pageu_distname_reuget_distribution_names(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuSimpleScrapingLocator�s$



	;uSimpleScrapingLocatorcsP|EeZdZdZ�fdd�Zdd�Zdd�Zdd	�Z�S(
uDirectoryLocatoru?
    This class locates distributions in a directory tree.
    cso|jdd�|_tt|�j|�tjj|�}tjj	|�sbt
d|��n||_dS(u�
        Initialise an instance.
        :param path: The root of the directory tree to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * recursive - if True (the default), subdirectories are
                         recursed into. If False, only the top-level directory
                         is searched,
        u	recursiveuNot a directory: %rNT(upopuTrueu	recursiveusuperuDirectoryLocatoru__init__uosupathuabspathuisdiruDistlibExceptionubase_dir(uselfupathukwargs(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__�s
uDirectoryLocator.__init__cCs|j|j�S(u�
        Should a filename be considered as a candidate for a distribution
        archive? As well as the filename, the directory which contains it
        is provided, though not used by the current implementation.
        (uendswithudownloadable_extensions(uselfufilenameuparent((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyushould_includesuDirectoryLocator.should_includec		Cs�i}x�tj|j�D]�\}}}x�|D]�}|j||�r/tjj||�}tddttjj|��dddf�}|j	||�}|r�|j
||�q�q/q/W|jsPqqW|S(Nufileu(uosuwalkubase_dirushould_includeupathujoinu
urlunparseupathname2urluabspathuconvert_url_to_download_infou_update_version_datau	recursive(	uselfunameuresulturootudirsufilesufnuurluinfo((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_projects"
		uDirectoryLocator._get_projectc	Cs�t�}x�tj|j�D]�\}}}x�|D]�}|j||�r2tjj||�}tddttjj	|��dddf�}|j
|d�}|r�|j|d�q�q2q2W|j
sPqqW|S(uJ
        Return all the distribution names known to this locator.
        ufileuunameN(usetuosuwalkubase_dirushould_includeupathujoinu
urlunparseupathname2urluabspathuconvert_url_to_download_infouNoneuaddu	recursive(uselfuresulturootudirsufilesufnuurluinfo((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_distribution_namess	"
		u'DirectoryLocator.get_distribution_names(u__name__u
__module__u__qualname__u__doc__u__init__ushould_includeu_get_projectuget_distribution_names(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuDirectoryLocator�s
uDirectoryLocatorcBs2|EeZdZdZdd�Zdd�ZdS(uJSONLocatoru
    This locator uses special extended metadata (not available on PyPI) and is
    the basis of performant dependency resolution in distlib. Other locators
    require archive downloads before dependencies can be determined! As you
    might imagine, that can be slow.
    cCstd��dS(uJ
        Return all the distribution names known to this locator.
        uNot available from this locatorN(uNotImplementedError(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_distribution_names2su"JSONLocator.get_distribution_namesc	Cs
i}t|�}|r	x�|jdg�D]�}|ddks+|ddkrWq+nt|d|dd|jdd	�d
|j�}|j}|d|_d|kr�|dr�d
|df|_n|jdi�|_|jdi�|_|||j	<q+Wn|S(Nufilesuptypeusdistu	pyversionusourceunameuversionusummaryuPlaceholder for summaryuschemeuurludigestumd5urequirementsuexports(
uget_project_dataugetu	make_distuschemeumetadatau
source_urludigestudependenciesuexportsuversion(uselfunameuresultudatauinfoudistumd((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_project8s$ 			
uJSONLocator._get_projectN(u__name__u
__module__u__qualname__u__doc__uget_distribution_namesu_get_project(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuJSONLocator+suJSONLocatorcs8|EeZdZdZ�fdd�Zdd�Z�S(uDistPathLocatoru�
    This locator finds installed distributions in a path. It can be useful for
    adding to an :class:`AggregatingLocator`.
    cs8tt|�j|�t|t�s+t�||_dS(us
        Initialise an instance.

        :param distpath: A :class:`DistributionPath` instance to search.
        N(usuperuDistPathLocatoru__init__u
isinstanceuDistributionPathuAssertionErrorudistpath(uselfudistpathukwargs(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__UsuDistPathLocator.__init__cCs;|jj|�}|dkr'i}ni||j6}|S(N(udistpathuget_distributionuNoneuversion(uselfunameudisturesult((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_project_s
	uDistPathLocator._get_project(u__name__u
__module__u__qualname__u__doc__u__init__u_get_project(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuDistPathLocatorPs
uDistPathLocatorcsw|EeZdZdZ�fdd�Z�fdd�Zdd�Zeej	j
e�Z	dd	�Zd
d�Z�S(uAggregatingLocatoruI
    This class allows you to chain and/or merge a list of locators.
    cs8|jdd�|_||_tt|�j|�dS(u�
        Initialise an instance.

        :param locators: The list of locators to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * merge - if False (the default), the first successful
                         search from any of the locators is returned. If True,
                         the results from all locators are merged (this can be
                         slow).
        umergeNF(upopuFalseumergeulocatorsusuperuAggregatingLocatoru__init__(uselfulocatorsukwargs(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__ls	uAggregatingLocator.__init__cs5tt|�j�x|jD]}|j�qWdS(N(usuperuAggregatingLocatoruclear_cacheulocators(uselfulocator(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuclear_cache|suAggregatingLocator.clear_cachecCs*||_x|jD]}||_qWdS(N(u_schemeulocatorsuscheme(uselfuvalueulocator((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_set_scheme�s	uAggregatingLocator._set_schemecCs�i}x�|jD]�}|j|�}|r|jrD|j|�q�|jdkr\d}n3d}x*|D]"}|jj|�rid}PqiqiW|r�|}Pq�qqW|S(NTF(	ulocatorsuget_projectumergeuupdateumatcheruNoneuTrueuFalseumatch(uselfunameuresultulocatorudufounduk((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu_get_project�s"		
uAggregatingLocator._get_projectcCsJt�}x:|jD]/}y||j�O}Wqtk
rAYqXqW|S(uJ
        Return all the distribution names known to this locator.
        (usetulocatorsuget_distribution_namesuNotImplementedError(uselfuresultulocator((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_distribution_names�s	
	u)AggregatingLocator.get_distribution_names(
u__name__u
__module__u__qualname__u__doc__u__init__uclear_cacheu_set_schemeupropertyuLocatoruschemeufgetu_get_projectuget_distribution_names(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuAggregatingLocatorhsuAggregatingLocatoruhttps://pypi.python.org/simple/utimeoutg@uschemeulegacyu1(?P<name>[\w-]+)\s*\(\s*(==\s*)?(?P<ver>[^)]+)\)$cBsw|EeZdZdZddd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dddd�ZdS(uDependencyFinderu0
    Locate dependencies for distributions.
    cCs(|p	t|_t|jj�|_dS(uf
        Initialise an instance, using the specified locator
        to locate distributions.
        N(udefault_locatorulocatoru
get_schemeuscheme(uselfulocator((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu__init__�suDependencyFinder.__init__cCs�tjd|�|j}||j|<||j||jf<x^|jD]S}t|�\}}tjd|||�|jj	|t
��j||f�qFWdS(u�
        Add a distribution to the finder. This will update internal information
        about who provides what.
        :param dist: The distribution to add.
        uadding distribution %suAdd to provided: %s, %s, %sN(uloggerudebugukeyu
dists_by_nameudistsuversionuprovidesuparse_name_and_versionuprovidedu
setdefaultusetuadd(uselfudistunameupuversion((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuadd_distribution�s	
u!DependencyFinder.add_distributioncCs�tjd|�|j}|j|=|j||jf=xl|jD]a}t|�\}}tjd|||�|j|}|j	||f�|s@|j|=q@q@WdS(u�
        Remove a distribution from the finder. This will update internal
        information about who provides what.
        :param dist: The distribution to remove.
        uremoving distribution %su Remove from provided: %s, %s, %sN(
uloggerudebugukeyu
dists_by_nameudistsuversionuprovidesuparse_name_and_versionuprovideduremove(uselfudistunameupuversionus((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuremove_distribution�s	

u$DependencyFinder.remove_distributioncCsQy|jj|�}Wn4tk
rL|j�d}|jj|�}YnX|S(u�
        Get a version matcher for a requirement.
        :param reqt: The requirement
        :type reqt: str
        :return: A version matcher (an instance of
                 :class:`distlib.version.Matcher`).
        i(uschemeumatcheruUnsupportedVersionErrorusplit(uselfureqtumatcheruname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuget_matcher�s
uDependencyFinder.get_matcherc	Cs�|j|�}|j}t�}|j}||kr�x`||D]Q\}}y|j|�}Wntk
rzd}YnX|rA|j|�PqAqAWn|S(u�
        Find the distributions which can fulfill a requirement.

        :param reqt: The requirement.
         :type reqt: str
        :return: A set of distribution which can fulfill the requirement.
        F(uget_matcherukeyusetuprovidedumatchuUnsupportedVersionErroruFalseuadd(	uselfureqtumatcherunameuresultuprovideduversionuproviderumatch((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyufind_providers�s			

uDependencyFinder.find_providersc	Cs�|j|}t�}x?|D]7}|j|�}|j|j�s|j|�qqW|r�|jd|||f�d}nZ|j|�|j|=x-|D]%}|jj|t��j|�q�W|j	|�d}|S(u�
        Attempt to replace one provider with another. This is typically used
        when resolving dependencies from multiple sources, e.g. A requires
        (B >= 1.0) while C requires (B >= 1.1).

        For successful replacement, ``provider`` must meet all the requirements
        which ``other`` fulfills.

        :param provider: The provider we are trying to replace with.
        :param other: The provider we're trying to replace.
        :param problems: If False is returned, this will contain what
                         problems prevented replacement. This is currently
                         a tuple of the literal string 'cantreplace',
                         ``provider``, ``other``  and the set of requirements
                         that ``provider`` couldn't fulfill.
        :return: True if we can replace ``other`` with ``provider``, else
                 False.
        ucantreplaceFT(ureqtsusetuget_matcherumatchuversionuadduFalseuremove_distributionu
setdefaultuadd_distributionuTrue(	uselfuprovideruotheruproblemsurlistu	unmatchedusumatcheruresult((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyutry_to_replaces 
	
	


#
uDependencyFinder.try_to_replacec	Csi|_i|_i|_i|_t|p0g�}d|krk|jd�|tdddg�O}nt|t�r�|}}tj	d|�nK|j
j|d|�}}|dkr�t
d|��ntj	d|�d|_t�}t|g�}t|g�}x�|r�|j�}|j}	|	|jkrO|j|�n/|j|	}
|
|kr~|j||
|�n|j|jB}|j}t�}
||kr�xAdD]6}d|}||kr�|
t|d
|�O}
q�q�Wn||B|
B}x�|D]�}|j|�}|s+tj	d|�|j
j|d|�}|dkrv|rv|j
j|dd�}n|dkr�tj	d|�|jd|f�q+|j|j}}||f|jkr�|j|�n|j|�||kr+||kr+|j|�tj	d|j�q+nxw|D]o}|j}	|	|jkrr|jj|t��j|�q2|j|	}
|
|kr2|j||
|�q2q2WqWqWt|jj��}x<|D]4}||k|_|jr�tj	d|j�q�q�Wtj	d|�||fS(u�
        Find a distribution and all distributions it depends on.

        :param requirement: The requirement specifying the distribution to
                            find, or a Distribution instance.
        :param meta_extras: A list of meta extras such as :test:, :build: and
                            so on.
        :param prereleases: If ``True``, allow pre-release versions to be
                            returned - otherwise, don't return prereleases
                            unless they're all that's available.

        Return a set of :class:`Distribution` instances and a set of
        problems.

        The distributions returned should be such that they have the
        :attr:`required` attribute set to ``True`` if they were
        from the ``requirement`` passed to ``find()``, and they have the
        :attr:`build_time_dependency` attribute set to ``True`` unless they
        are post-installation dependencies of the ``requirement``.

        The problems should be a tuple consisting of the string
        ``'unsatisfied'`` and the requirement which couldn't be satisfied
        by any distribution known to the locator.
        u:*:u:test:u:build:u:dev:upassed %s as requirementuprereleasesuUnable to locate %ru
located %sutestubuildudevu:%s:u%s_requiresuNo providers found for %ruCannot satisfy %ruunsatisfieduAdding %s to install_distsu#%s is a build-time dependency only.ufind done for %sNT(utestubuildudev(uprovidedudistsu
dists_by_nameureqtsuseturemoveu
isinstanceuDistributionuloggerudebugulocatorulocateuNoneuDistlibExceptionuTrueu	requestedupopukeyuadd_distributionutry_to_replaceurun_requiresu
meta_requiresubuild_requiresugetattrufind_providersuadduversionuname_and_versionu
setdefaultuvaluesubuild_time_dependency(uselfurequirementumeta_extrasuprereleasesudistuodistuproblemsutodou
install_distsunameuotheruireqtsusreqtsuereqtsukeyueu	all_reqtsuru	providersuproviderunuvupudists((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyufind>s�				


				
		

!


	
	"
"
		uDependencyFinder.findNF(
u__name__u
__module__u__qualname__u__doc__uNoneu__init__uadd_distributionuremove_distributionuget_matcherufind_providersutry_to_replaceuFalseufind(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyuDependencyFinder�s'uDependencyFinder(MugzipuiouBytesIOujsonulogginguosu	posixpathureu	threadinguImportErrorudummy_threadinguzlibuuDistlibExceptionucompatuurljoinuurlparseu
urlunparseuurl2pathnameupathname2urluqueueuquoteuunescapeustring_typesubuild_openeruHTTPRedirectHandleruBaseRedirectHandleruRequestu	HTTPErroruURLErrorudatabaseuDistributionuDistributionPathu	make_distumetadatauMetadatauutilucached_propertyuparse_credentialsuensure_slashusplit_filenameuget_project_datauparse_requirementuparse_name_and_versionuServerProxyuversionu
get_schemeuUnsupportedVersionErroruwheeluWheelu
is_compatibleu	getLoggeru__name__uloggerucompileuHASHER_HASHuIuCHARSETuHTML_CONTENT_TYPEu
DEFAULT_INDEXuNoneuget_all_distribution_namesuRedirectHandleruobjectuLocatoruPyPIRPCLocatoruPyPIJSONLocatoruPageuSimpleScrapingLocatoruDirectoryLocatoruJSONLocatoruDistPathLocatoruAggregatingLocatorudefault_locatorulocateuNAME_VERSION_REuDependencyFinder(((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/locators.pyu<module>sV
^:�+*:�A%N				python3.3/site-packages/pip/_vendor/distlib/__pycache__/wheel.cpython-33.pyc000064400000107013151733566750022672 0ustar00�
7�Res�c@s�ddlmZddlZddlZddlZddlZddlmZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlmZmZddlmZmZmZmZmZddlmZddlm Z m!Z!dd	l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+dd
l,m-Z-m.Z.ej/e0�Z1e2a3e4ed�r�dZ5n9ej6j7d
�r�dZ5nej6dkr�dZ5ndZ5ej8d�Z9e9r$dej:dd�Z9nde9Z;e5e9Z<ej"j=�j>dd�j>dd�Z?ej8d�Z@e@o�e@j7d�r�e@j>dd�Z@ndd�ZAeA�Z@[AejBdejCejDB�ZEejBdejCejDB�ZFejBd�ZGe
jHd krd!d"�ZInd#d"�ZIGd$d%�d%eJ�ZKeK�ZLGd&d'�d'eJ�ZMd(d)�ZNeN�ZO[Ne2d*d+�ZPdS(,i(uunicode_literalsN(umessage_from_filei(u__version__uDistlibException(u	sysconfiguZipFileufsdecodeu	text_typeufilter(uInstalledDistribution(uMetadatauMETADATA_FILENAME(	uFileOperatoruconvert_pathu	CSVReaderu	CSVWriteruCacheucached_propertyuget_cache_baseuread_exportsutempdir(uNormalizedVersionuUnsupportedVersionErrorupypy_version_infouppujavaujyucliuipucpupy_version_nodotu%s%siupyu-u_u.uSOABIucpython-cCs|dtg}tjd�r+|jd�ntjd�rJ|jd�ntjd�dkro|jd�nd	j|�S(
NucpuPy_DEBUGudu
WITH_PYMALLOCumuPy_UNICODE_SIZEiuuu(u
VER_SUFFIXu	sysconfiguget_config_varuappendujoin(uparts((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu_derive_abi;su_derive_abiur
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?
-(?P<py>\w+\d+(\.\w+\d+)*)
-(?P<bi>\w+)
-(?P<ar>\w+)
\.whl$
u7
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?$
s
\s*#![^\r\n]*u/cCs|S(N((uo((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu<lambda>Zsu<lambda>cCs|jtjd�S(Nu/(ureplaceuosusep(uo((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu<lambda>\scBsS|EeZdZdd�Zdd�Zdd�Zddd�Zd	d
�ZdS(uMountercCsi|_i|_dS(N(u
impure_wheelsulibs(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu__init__`s	uMounter.__init__cCs!||j|<|jj|�dS(N(u
impure_wheelsulibsuupdate(uselfupathnameu
extensions((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuaddds
uMounter.addcCsI|jj|�}x0|D](\}}||jkr|j|=qqWdS(N(u
impure_wheelsupopulibs(uselfupathnameu
extensionsukuv((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuremovehsuMounter.removecCs"||jkr|}nd}|S(N(ulibsuNone(uselfufullnameupathuresult((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyufind_modulens	uMounter.find_modulecCs�|tjkrtj|}nx||jkrAtd|��ntj||j|�}||_|jdd�}t|�dkr�|d|_	n|S(Nuunable to find extension for %su.ii(
usysumodulesulibsuImportErroruimpuload_dynamicu
__loader__ursplitulenu__package__(uselfufullnameuresultuparts((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuload_moduleus	uMounter.load_moduleN(	u__name__u
__module__u__qualname__u__init__uadduremoveuNoneufind_moduleuload_module(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuMounter_s
uMountercBsd|EeZdZdZd1ZdZd0d2d2dd�Ze	dd��Z
e	dd	��Ze	d
d��Ze
dd
��Zdd�Ze
dd��Zdd�Zd0dd�Zdd�Zdd�Zdd�Zd0d0dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd2d(d)�Zd*d+�Zd,d-�Zd0d.d/�Zd0S(3uWheelu@
    Class to build and install from Wheel files (PEP 427).
    iusha256cCs�||_||_d|_tg|_dg|_dg|_tj�|_	|dkr{d|_d|_|j
|_nEtj|�}|r�|jd�}|d|_|djdd	�|_|d
|_|j
|_n�tjj|�\}}tj|�}|s!td|��n|r?tjj|�|_	n||_|jd�}|d|_|d|_|d
|_|djd
�|_|djd
�|_|djd
�|_dS(uB
        Initialise an instance using a (valid) filename.
        uunoneuanyudummyu0.1unmuvnu_u-ubnuInvalid name or filename: %rupyu.ubiuarN(usignu
should_verifyubuildveruPYVERupyveruabiuarchuosugetcwdudirnameuNoneunameuversionufilenameu	_filenameuNAME_VERSION_REumatchu	groupdictureplaceupathusplituFILENAME_REuDistlibExceptionuabspath(uselfufilenameusignuverifyumuinfoudirname((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu__init__�sB					


	


uWheel.__init__cCs�|jrd|j}nd}dj|j�}dj|j�}dj|j�}|jjdd�}d|j|||||fS(uJ
        Build and return a filename from the various components.
        u-uu.u_u%s-%s%s-%s-%s-%s.whl(ubuildverujoinupyveruabiuarchuversionureplaceuname(uselfubuildverupyveruabiuarchuversion((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyufilename�s	uWheel.filenamecCs+tjj|j|j�}tjj|�S(N(uosupathujoinudirnameufilenameuisfile(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuexists�suWheel.existsccsNxG|jD]<}x3|jD](}x|jD]}|||fVq*WqWq
WdS(N(upyveruabiuarch(uselfupyveruabiuarch((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyutags�su
Wheel.tagscCs-tjj|j|j�}d|j|jf}d|}tjd�}t	|d���}|j
|�}|djdd�}tdd	�|D��}|d
kr�d
}	nt
}	yItj||	�}
|j|
��"}||�}td|�}
WdQXWn"tk
r"td|	��YnXWdQX|
S(Nu%s-%su%s.dist-infouutf-8uru
Wheel-Versionu.icSsg|]}t|��qS((uint(u.0ui((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu
<listcomp>�s	u"Wheel.metadata.<locals>.<listcomp>uMETADATAufileobju$Invalid wheel, because %s is missing(ii(uosupathujoinudirnameufilenameunameuversionucodecsu	getreaderuZipFileuget_wheel_metadatausplitutupleuMETADATA_FILENAMEu	posixpathuopenuMetadatauKeyErroru
ValueError(uselfupathnameuname_veruinfo_diruwrapperuzfuwheel_metadatauwvufile_versionufnumetadata_filenameubfuwfuresult((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyumetadata�s(
	
uWheel.metadatac	Csud|j|jf}d|}tj|d�}|j|��(}tjd�|�}t|�}WdQXt|�S(Nu%s-%su%s.dist-infouWHEELuutf-8(	unameuversionu	posixpathujoinuopenucodecsu	getreaderumessage_from_fileudict(uselfuzfuname_veruinfo_dirumetadata_filenameubfuwfumessage((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuget_wheel_metadata�s
uWheel.get_wheel_metadatac	CsFtjj|j|j�}t|d��}|j|�}WdQX|S(Nur(uosupathujoinudirnameufilenameuZipFileuget_wheel_metadata(uselfupathnameuzfuresult((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuinfo�su
Wheel.infocCs�tj|�}|r2d||j�d�}nv|jd�}|jd�}|dksh||krqd}n)|||d�dkr�d}nd}d||}|S(Ns#!pythons
s
iis
(u
SHEBANG_REumatchuendufind(uselfudataumucrulfuterm((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuprocess_shebang�s		uWheel.process_shebangcCs�|dkr|j}nytt|�}Wn"tk
rOtd|��YnX||�j�}tj|�j	d�j
d�}||fS(NuUnsupported hash algorithm: %rs=uascii(uNoneu	hash_kindugetattruhashlibuAttributeErroruDistlibExceptionudigestubase64uurlsafe_b64encodeurstripudecode(uselfudatau	hash_kinduhasheruresult((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuget_hashs
!uWheel.get_hashcCsht|��V}x|D]}|j|�qWttjj||��}|j|ddf�WdQXdS(Nu(u	CSVWriteruwriterowuto_posixuosupathurelpath(uselfurecordsurecord_pathubaseuwriterurowup((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuwrite_records

uWheel.write_recordcCs�g}|\}}tt|j�}xs|D]k\}}	t|	d��}
|
j�}WdQXd|j|�}tjj|	�}
|j	|||
f�q+Wtjj
|d�}	|j||	|�ttjj
|d��}|j	||	f�dS(Nurbu%s=%suRECORD(
ugetattruhashlibu	hash_kinduopenureaduget_hashuosupathugetsizeuappendujoinuwrite_recorduto_posix(uselfuinfoulibdiru
archive_pathsurecordsudistinfouinfo_diruhasheruapupufudataudigestusize((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu
write_recordssuWheel.write_recordscCs\t|dtj��A}x7|D]/\}}tjd||�|j||�qWWdQXdS(NuwuWrote %s to %s in wheel(uZipFileuzipfileuZIP_DEFLATEDuloggerudebuguwrite(uselfupathnameu
archive_pathsuzfuapup((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu	build_zip.suWheel.build_zipc!s�|dkri}ntt�fdd�d%��d}|dkrjd}tg}tg}tg}n!d}tg}dg}d	g}|jd
|�|_|jd|�|_	|jd|�|_
�|}	d
|j|jf}
d|
}d|
}g}
xKd&D]C}|�kr#qn�|}t
jj|�rxt
j|�D]�\}}}x�|D]�}tt
jj||��}t
jj||�}tt
jj|||��}|
j||f�|dkre|jd�ret|d��}|j�}WdQX|j|�}t|d��}|j|�WdQXqeqeWqOWqqW|	}d}xt
j|�D]�\}}}||kr�xUt|�D]G\}}t|�}|jd�r�t
jj||�}||=Pq�q�W|s�td��nxl|D]d}t|�jd'�rq�nt
jj||�}tt
jj||��}|
j||f�q�WqnWt
j|�}xf|D]^}|d(krtt
jj||��}tt
jj||��}|
j||f�qqWd|p�|jdtd |g}x4|j D])\}}}|jd!|||f�qWt
jj|d"�}t|d#��}|jd$j|��WdQXtt
jj|d"��}|
j||f�|j!||f|	|
�t
jj|j"|j#�} |j$| |
�| S()u�
        Build a wheel from files in specified paths, and use any specified tags
        when determining the name of the wheel.
        cs
|�kS(N((uo(upaths(u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu<lambda><suWheel.build.<locals>.<lambda>upurelibuplatlibiufalseutrueunoneuanyupyveruabiuarchu%s-%su%s.datau%s.dist-infoudatauheadersuscriptsu.exeurbNuwbu
.dist-infou(.dist-info directory expected, not foundu.pycu.pyouRECORDu	INSTALLERuSHAREDuWheel-Version: %d.%duGenerator: distlib %suRoot-Is-Purelib: %su
Tag: %s-%s-%suWHEELuwu
(upurelibuplatlib(udatauheadersuscripts(u.pycu.pyo(uRECORDu	INSTALLERuSHARED(%uNoneulistufilteruIMPVERuABIuARCHuPYVERugetupyveruabiuarchunameuversionuosupathuisdiruwalkufsdecodeujoinurelpathuto_posixuappenduendswithuopenureaduprocess_shebanguwriteu	enumerateuAssertionErrorulistdiru
wheel_versionu__version__utagsu
write_recordsudirnameufilenameu	build_zip(!uselfupathsutagsu
wheel_versionulibkeyuis_pureu
default_pyverudefault_abiudefault_archulibdiruname_verudata_diruinfo_diru
archive_pathsukeyupathurootudirsufilesufnupurpuapufudataudistinfouiudnuwheel_metadataupyveruabiuarchupathname((upathsu2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyubuild4s�	%					





%


uWheel.buildcBIKs	|j}|jd�}|jdd9�}tjj|j|j�}d|j|j	f}d|}	d|}
t
j|
t�}t
j|
d�}t
j|
d�}
tj
d�}t|d	���}|j|��}||�}t|�}Wd
QX|djdd
�}tdd�|D��}||jkrM|rM||j|�n|ddkrj|d}n
|d}i}|j|
��D}td|��,}x"|D]}|d}|||<q�WWd
QXWd
QXt
j|	d�}t
j|
d�}t
j|	dd�}td|�}d:|_tj}g} tj�}!|!|_d
|_zy�x�|j�D]�}"|"j}#t |#t!�r�|#}$n|#j"d�}$|$j#d�r�qan||$}|dr�t$|"j%�|dkr�t&d|$��n|d
rp|d
jdd
�\}%}&|j|#��}|j'�}'Wd
QX|j(|'|%�\}(})|)|&krpt&d|#��qpn|r�|$j)||f�r�t*j+d|$�qan|$j)|�o�|$j#d�}*|$j)|�r|$jd d�\}(}+},tjj||+t,|,��}-n3|$||
fkr$qantjj|t,|$��}-|*sL|j|#��}|j-||-�Wd
QX| j.|-�|r�|d
r�t|-d!��J}|j'�}'|j(|'|%�\}(}.|.|)kr�t&d"|-��nWd
QXn|r�|-j#d#�r�y |j/|-�}/| j.|/�WqIt0k
rEt*j1d$d%d:�YqIXq�qatjj2t,|#��}0tjj|!|0�}1|j|#��}|j-||1�Wd
QXtjj|-�\}2}0|2|_|j3|0�}3|j4|3�| j5|3�qaW|rt*j+d&�d
}4n$d
}5|j6d}|d'kr&t
j|
d(�}6y�|j|6��}t7|�}7Wd
QXi}5x�d;D]�}8d+|8}9|9|7krpi|5d,|8<}:x[|7|9j8�D]F};d-|;j9|;j:f}<|;j;r�|<d.|;j;7}<n|<|:|;j<q�WqpqpWWq�t0k
r"t*j1d/�Yq�Xnby@|j|��+}||�}t<j=|�jd0�}5Wd
QXWnt0k
r�t*j1d1�YnX|5r�|5jd2i�}=|5jd3i�}>|=s�|>r�|jdd�}?tjj>|?�s�t?d4��n|?|_xF|=j@�D]8\}9};d5|9|;f}@|j3|@�}3|j4|3�qW|>r�id:d*6}AxL|>j@�D];\}9};d5|9|;f}@|j3|@|A�}3|j4|3�qcWq�q�ntjj||
�}tA|�}4tB|�}|d=|d=||d6<|4jC||�}|r	| j.|�n|4jD| |d7|�|4SWn,t0k
rb	t*jEd8�|jF��YnXWd
tGjH|!�XWd
QXd
S(<u�
        Install a wheel to the specified paths. If kwarg ``warner`` is
        specified, it should be a callable, which will be called with two
        tuples indicating the wheel version of this software and the wheel
        version in the file, if there is a discrepancy in the versions.
        This can be used to issue any warnings to raise any exceptions.
        If kwarg ``lib_only`` is True, only the purelib/platlib files are
        installed, and the headers, scripts, data and dist-info metadata are
        not written.

        The return value is a :class:`InstalledDistribution` instance unless
        ``options.lib_only`` is True, in which case the return value is ``None``.
        uwarnerulib_onlyu%s-%su%s.datau%s.dist-infouWHEELuRECORDuutf-8urNu
Wheel-Versionu.icSsg|]}t|��qS((uint(u.0ui((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu
<listcomp>�s	u!Wheel.install.<locals>.<listcomp>uRoot-Is-Purelibutrueupurelibuplatlibustreamiuuscriptsudry_runu/RECORD.jwsiusize mismatch for %su=udigest mismatch for %sulib_only: skipping %su.exeu/urbudigest mismatch on write for %su.pyuByte-compilation faileduexc_infoulib_only: returning Noneu1.0uentry_points.txtuconsoleuguiu
%s_scriptsuwrap_%su%s:%su %suAUnable to read legacy script metadata, so cannot generate scriptsucommandsu8Unable to read JSON metadata, so cannot generate scriptsuwrap_consoleuwrap_guiuValid script path not specifiedu%s = %sulibuprefixuinstallation failed.FT(uconsoleugui(Iudry_runugetuFalseuosupathujoinudirnameufilenameunameuversionu	posixpathuMETADATA_FILENAMEucodecsu	getreaderuZipFileuopenumessage_from_fileusplitutupleu
wheel_versionu	CSVReaderuFileOperatoruTrueurecordusysudont_write_bytecodeutempfileumkdtempu
source_diruNoneu
target_diruinfolistu
isinstanceu	text_typeudecodeuendswithustru	file_sizeuDistlibExceptionureaduget_hashu
startswithuloggerudebuguconvert_pathucopy_streamuappendubyte_compileu	Exceptionuwarningubasenameumakeuset_executable_modeuextenduinfouread_exportsuvaluesuprefixusuffixuflagsujsonuloaduisdiru
ValueErroruitemsuInstalledDistributionudictuwrite_shared_locationsuwrite_installed_filesu	exceptionurollbackushutilurmtree(Buselfupathsumakerukwargsudry_runuwarnerulib_onlyupathnameuname_verudata_diruinfo_diru
metadata_nameuwheel_metadata_nameurecord_nameuwrapperuzfubwfuwfumessageuwvufile_versionulibdirurecordsubfureaderurowupudata_pfxuinfo_pfxu
script_pfxufileopubcuoutfilesuworkdiruzinfouarcnameu	u_arcnameukinduvalueudatau_udigestu	is_scriptuwhereurpuoutfileu	newdigestupycufnuworknameudnu	filenamesudistucommandsuepuepdataukeyukuduvusuconsole_scriptsugui_scriptsu
script_diruscriptuoptions((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuinstall�s>	





	
				
#

"

	

	


	
"
	




u
Wheel.installcCsMtdkrItjjt�td�tjdd��}t	|�antS(Nudylib-cachei(
ucacheuNoneuosupathujoinuget_cache_baseustrusysuversionuCache(uselfubase((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu_get_dylib_cache~s
uWheel._get_dylib_cachecCs�tjj|j|j�}d|j|jf}d|}tj|d�}tj	d�}g}t
|d��x}y\|j|��G}||�}	tj
|	�}
|j�}|j|�}tjj|j|�}
tjj|
�s�tj|
�nx�|
j�D]�\}}tjj|
t|��}tjj|�sHd}nQtj|�j}tjj|�}|j|�}tj|j�}||k}|r�|j||
�n|j||f�qWWdQXWntk
r�YnXWdQX|S(Nu%s-%su%s.dist-infou
EXTENSIONSuutf-8urT( uosupathujoinudirnameufilenameunameuversionu	posixpathucodecsu	getreaderuZipFileuopenujsonuloadu_get_dylib_cacheu
prefix_to_dirubaseuisdirumakedirsuitemsuconvert_pathuexistsuTrueustatust_mtimeudatetimeu
fromtimestampugetinfou	date_timeuextractuappenduKeyError(uselfupathnameuname_veruinfo_diruarcnameuwrapperuresultuzfubfuwfu
extensionsucacheuprefixu
cache_baseunameurelpathudestuextractu	file_timeuinfou
wheel_time((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu_get_extensions�s>
	!
uWheel._get_extensionscCs
t|�S(uM
        Determine if a wheel is compatible with the running system.
        (u
is_compatible(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu
is_compatible�suWheel.is_compatiblecCsdS(uP
        Determine if a wheel is asserted as mountable by its metadata.
        T(uTrue(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuis_mountable�suWheel.is_mountablecCs
tjjtjj|j|j��}|j�sLd|}t|��n|j�sqd|}t|��n|t	jkr�t
jd|�ns|r�t	jj|�nt	jj
d|�|j�}|rtt	jkr�t	jjt�ntj||�ndS(Nu)Wheel %s not compatible with this Python.u$Wheel %s is marked as not mountable.u%s already in pathi(uosupathuabspathujoinudirnameufilenameu
is_compatibleuDistlibExceptionuis_mountableusysuloggerudebuguappenduinsertu_get_extensionsu_hooku	meta_pathuadd(uselfuappendupathnameumsgu
extensions((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyumount�s"'

uWheel.mountcCs�tjjtjj|j|j��}|tjkrItjd|�n]tjj	|�|t
jkrxt
j	|�nt
js�t
tjkr�tjj	t
�q�ndS(Nu%s not in path(
uosupathuabspathujoinudirnameufilenameusysuloggerudebuguremoveu_hooku
impure_wheelsu	meta_path(uselfupathname((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuunmount�s'	u
Wheel.unmountc$Cs�tjj|j|j�}d|j|jf}d|}d|}tj|t�}tj|d�}tj|d�}t	j
d�}t|d��}	|	j|��}
||
�}t
|�}WdQX|djd	d
�}
tdd�|
D��}i}|	j|��D}td
|��,}x"|D]}|d}|||<q,WWdQXWdQXx<|	j�D].}|j}t|t�r�|}n|jd�}d|kr�td|��n|jd�r�qcn||}|dr
t|j�|dkr
td|��n|d
rc|d
jdd
�\}}|	j|��}|j�}WdQX|j||�\}}||kr�td|��q�qcqcWWdQXdS(Nu%s-%su%s.datau%s.dist-infouWHEELuRECORDuutf-8uru
Wheel-Versionu.icSsg|]}t|��qS((uint(u.0ui((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu
<listcomp>�s	u Wheel.verify.<locals>.<listcomp>ustreamiu..uinvalid entry in wheel: %ru/RECORD.jwsiusize mismatch for %su=udigest mismatch for %s(uosupathujoinudirnameufilenameunameuversionu	posixpathuMETADATA_FILENAMEucodecsu	getreaderuZipFileuopenumessage_from_fileusplitutupleu	CSVReaderuinfolistu
isinstanceu	text_typeudecodeuDistlibExceptionuendswithustru	file_sizeureaduget_hash(uselfupathnameuname_verudata_diruinfo_diru
metadata_nameuwheel_metadata_nameurecord_nameuwrapperuzfubwfuwfumessageuwvufile_versionurecordsubfureaderurowupuzinfouarcnameu	u_arcnameukinduvalueudatau_udigest((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuverify�sT



		

#

uWheel.verifycKs�dd�}dd�}tjj|j|j�}d|j|jf}d|}tj|d�}	t��(}
t	|d���}i}x�|j
�D]�}
|
j}t|t�r�|}n|j
d	�}||	kr�q�nd
|kr�td|��n|j|
|
�tjj|
t|��}|||<q�WWdQX|||�\}}|||�}|r�|||�\}}|r�||kr�|||�n|dkr�tjd
dddd|
�\}}tj|�n=tjj|�std|��ntjj||j�}t|j��}tjj|
|�}||f}|j||
|�|j||�|dkr�tj||�q�nWdQX|S(u�
        Update the contents of a wheel in a generic way. The modifier should
        be a callable which expects a dictionary argument: its keys are
        archive-entry paths, and its values are absolute filesystem paths
        where the contents the corresponding archive entries can be found. The
        modifier is free to change the contents of the files pointed to, add
        new entries and remove entries, before returning. This method will
        extract the entire contents of the wheel to a temporary location, call
        the modifier, and then use the passed (and possibly updated)
        dictionary to write a new wheel. If ``dest_dir`` is specified, the new
        wheel is written there -- otherwise, the original wheel is overwritten.

        The modifier should return True if it updated the wheel, else False.
        This method returns the same value the modifier returns.
        cSshd}}d|tf}||kr3d|}n||kr^||}td|�j}n||fS(Nu%s/%su%s/PKG-INFOupath(uNoneuMETADATA_FILENAMEuMetadatauversion(upath_mapuinfo_diruversionupathukey((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuget_versions


u!Wheel.update.<locals>.get_versionc
Ss)d}y�t|�}|jd�}|dkr=d|}nhdd�||dd�jd�D�}|dd7<d|d|�djd	d
�|D��f}Wn"tk
r�tjd|�YnX|r%td|�}||_	|j
t�}|jd|d
|�tjd||�ndS(Nu-iu%s-1cSsg|]}t|��qS((uint(u.0us((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu
<listcomp>/s	u8Wheel.update.<locals>.update_version.<locals>.<listcomp>iu.u%s-%scss|]}t|�VqdS(N(ustr(u.0ui((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu	<genexpr>2su7Wheel.update.<locals>.update_version.<locals>.<genexpr>u0Cannot update non-compliant (PEP-440) version %rupathulegacyuVersion updated from %r to %ri����(
uNoneuNormalizedVersionufindusplitujoinuUnsupportedVersionErroruloggerudebuguMetadatauversionuendswithuMETADATA_FILENAMEuwrite(uversionupathuupdateduvuiupartsumdulegacy((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuupdate_version's(
*$
		u$Wheel.update.<locals>.update_versionu%s-%su%s.dist-infouRECORDuruutf-8u..uinvalid entry in wheel: %rNusuffixu.whluprefixu
wheel-update-udiruNot a directory: %r(uosupathujoinudirnameufilenameunameuversionu	posixpathutempdiruZipFileuinfolistu
isinstanceu	text_typeudecodeuDistlibExceptionuextractuconvert_pathuNoneutempfileumkstempucloseuisdirulistuitemsu
write_recordsu	build_zipushutilucopyfile(uselfumodifierudest_dirukwargsuget_versionuupdate_versionupathnameuname_veruinfo_dirurecord_nameuworkdiruzfupath_mapuzinfouarcnameu	u_arcnameupathuoriginal_versionu_umodifieducurrent_versionufdunewpathu
archive_pathsudistinfouinfo((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuupdatesX

		
uWheel.updateN(iiF( u__name__u
__module__u__qualname__u__doc__u
wheel_versionu	hash_kinduNoneuFalseu__init__upropertyufilenameuexistsutagsucached_propertyumetadatauget_wheel_metadatauinfouprocess_shebanguget_hashuwrite_recordu
write_recordsu	build_zipubuilduinstallu_get_dylib_cacheu_get_extensionsu
is_compatibleuis_mountableumountuunmountuverifyuupdate(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyuWheel�s2)	h�	"6uWheelcCs�tg}td}xGttjdddd�D](}|jdj|t|�g��q1Wg}xLtj�D]>\}}}|j	d�rp|j|j
dd�d�qpqpW|j�tdkr�|j
dt�n|jd�g}tg}tjdkr=tjd	t�}|r=|j�\}	}}}
t|�}|
g}|
dkrg|jd�n|
dkr�|jd�n|
dkr�|jd�n|
dkr�|jd�n|
dkr�|jd�nx`|dkr6x@|D]8}d|	|||f}
|
tkr�|j|
�q�q�W|d8}q�Wq=nxH|D]@}x7|D]/}
|jdjt|df�||
f�qQWqDWxwt|�D]i\}}|jdjt|f�ddf�|dkr�|jdjt|df�ddf�q�q�Wxwt|�D]i\}}|jdjd|f�ddf�|dkr|jdjd|df�ddf�qqWt|�S(uG
    Return (pyver, abi, arch) tuples compatible with this Python.
    iiuu.abiu.iunoneudarwinu(\w+)_(\d+)_(\d+)_(\w+)$ui386uppcufatux86_64ufat3uppc64ufat64uintelu	universalu%s_%s_%s_%suanyupyi����i����(ui386uppc(ui386uppcux86_64(uppc64ux86_64(ui386ux86_64(ui386ux86_64uinteluppcuppc64(u
VER_SUFFIXurangeusysuversion_infouappendujoinustruimpuget_suffixesu
startswithusplitusortuABIuinsertuARCHuplatformureumatchugroupsuintu
IMP_PREFIXu	enumerateuset(uversionsumajoruminoruabisusuffixu_uresultuarchesumunameuarchumatchesumatchusuabiuiuversion((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyucompatible_tagsqs`	
$&$

		


1%0%0ucompatible_tagscCs�t|t�st|�}nd}|dkr9t}nxN|D]F\}}}||jkr@||jkr@||jkr@d}Pq@q@W|S(NFT(	u
isinstanceuWheeluFalseuNoneuCOMPATIBLE_TAGSupyveruabiuarchuTrue(uwheelutagsuresultuveruabiuarch((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu
is_compatible�s	-u
is_compatible(Qu
__future__uunicode_literalsubase64ucodecsudatetimeudistutils.utilu	distutilsuemailumessage_from_fileuhashlibuimpujsonulogginguosu	posixpathureushutilusysutempfileuzipfileuu__version__uDistlibExceptionucompatu	sysconfiguZipFileufsdecodeu	text_typeufilterudatabaseuInstalledDistributionumetadatauMetadatauMETADATA_FILENAMEuutiluFileOperatoruconvert_pathu	CSVReaderu	CSVWriteruCacheucached_propertyuget_cache_baseuread_exportsutempdiruversionuNormalizedVersionuUnsupportedVersionErroru	getLoggeru__name__uloggeruNoneucacheuhasattru
IMP_PREFIXuplatformu
startswithuget_config_varu
VER_SUFFIXuversion_infouPYVERuIMPVERuget_platformureplaceuARCHuABIu_derive_abiucompileu
IGNORECASEuVERBOSEuFILENAME_REuNAME_VERSION_REu
SHEBANG_REuseputo_posixuobjectuMounteru_hookuWheelucompatible_tagsuCOMPATIBLE_TAGSu
is_compatible(((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/wheel.pyu<module>sx(@			

'		#	���>	python3.3/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-33.pyc000064400000135151151733566750023055 0ustar00�
7�Reۗc@s�ddlmZddlZddlZddlZejddkr�ddlmZefZe	Z
ddlmZ
ddlZddlZddlmZddlmZmZmZmZmZdd	lmZmZmZmZmZm Z m!Z!d
d�Zddl"Z"ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,ddl-Z-ddl.Z.ddl/Z0dd
l1m1Z1ddl2Z2e3Z3ddl4m5Z6ddl4m7Z8da:dd�Z;noddl<mZe=fZe=Z
ddl<m>Z
ddlZddlZddlZddl?mZmZmZm;Z;mZmZmZmZm!Z!ddl@m$Z$mZm#Z#mZmZm'Z'm(Z(m)Z)m*Z*m+Z+m,Z,ddlAm&Z&m%Z%m Z ddlBjCZ-ddl@jDZ"ddlEjCZ.ddl0Z0dd
lFm1Z1ddlGjHZ2eIZ3ddl4m8Z8e6Z6yddlJmKZKmLZLWn@eMk
r�Gdd�deN�ZLdd�ZOdd�ZKYnXyddlmPZQWn(eMk
r�Gdd �d eR�ZQYnXydd!lmSZSWn.eMk
r"ejTejUBdd"d#�ZSYnXdd$lVmWZXeYeXd%�rKeXZWn<dd&lVmZZ[Gd'd(�d(e[�ZZGd)d*�d*eX�ZWydd+l\m]Z]WneMk
r�d,d-�Z]YnXyddl^Z^Wn"eMk
r�dd.lm^Z^YnXy
e_Z_Wn.e`k
r+dd/lambZbd0d1�Z_YnXyejcZcejdZdWnQeek
r�ejf�Zgegd2krsd3Zhnd4Zhd5d6�Zcd7d8�ZdYnXydd9limjZjWn[eMk
rdd:lkmlZlmmZmddlZejnd;�Zod<d=�Zpd>d?�ZjYnXydd@lqmrZrWn"eMk
r@dd@lsmrZrYnXejddA�dbkrie1�jtZtnddClqmtZtyddDlamuZuWnpeMk
r�ddElamvZvyddFlwmxZyWn!eMk
r�dGdHdI�ZyYnXGdJdK�dKev�ZuYnXyddLlzm{Z{Wn!eMk
r7ddMdN�Z{YnXyddOlam|Z|Wn�eMk
r�yddPl}m~ZWn"eMk
r�ddPl�m~ZYnXy ddQl�m�Z�m�Z�m�Z�WneMk
r�YnXGdRdS�dSe��Z|YnXyddTl�m�Z�m�Z�Wn�eMk
r�ejndUej��Z�dVdW�Z�GdXdY�dYe��Z�ddZd[�Z�Gd\d]�d]e��Z�Gd^d_�d_e��Z�Gd`da�daeR�Z�YnXdS(ci(uabsolute_importNi(uStringIO(uFileTypei(ushutil(uurlparseu
urlunparseuurljoinuurlsplitu
urlunsplit(uurlretrieveuquoteuunquoteuurl2pathnameupathname2urluContentTooShortErroru	splittypecCs+t|t�r!|jd�}nt|�S(Nuutf-8(u
isinstanceuunicodeuencodeu_quote(us((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuquotesuquote(
uRequestuurlopenuURLErroru	HTTPErroruHTTPBasicAuthHandleruHTTPPasswordMgruHTTPSHandleruHTTPHandleruHTTPRedirectHandlerubuild_opener(u
HTMLParser(uifilter(uifilterfalsecCsYtdkr*ddl}|jd�antj|�}|rO|jdd�Sd|fS(uJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.iNu^(.*)@(.*)$ii(u	_userproguNoneureucompileumatchugroup(uhostureumatch((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	splituser-su	splituser(u
TextIOWrapper(	uurlparseu
urlunparseuurljoinu	splituseruquoteuunquoteuurlsplitu
urlunsplitu	splittype(uurlopenuurlretrieveuRequestuurl2pathnameupathname2urluHTTPBasicAuthHandleruHTTPPasswordMgruHTTPSHandleruHTTPHandleruHTTPRedirectHandlerubuild_opener(u	HTTPErroruURLErroruContentTooShortError(ufilterfalse(umatch_hostnameuCertificateErrorcBs|EeZdZdS(uCertificateErrorN(u__name__u
__module__u__qualname__(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuCertificateErrorUsuCertificateErrorcCs�g}x[|jd�D]J}|dkr8|jd�qtj|�}|j|jdd��qWtjddj|�dtj�S(	Nu.u*u[^.]+u\*u[^.]*u\Au\.u\Z(usplituappendureuescapeureplaceucompileujoinu
IGNORECASE(udnupatsufrag((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu_dnsname_to_patYsu_dnsname_to_patcCsg|std��ng}|jdf�}xI|D]A\}}|dkr4t|�j|�redS|j|�q4q4W|s�xi|jdf�D]R}xI|D]A\}}|dkr�t|�j|�r�dS|j|�q�q�Wq�Wnt|�dkr(td|d	jtt	|��f��n;t|�dkrWtd
||df��ntd��dS(
u7Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 rules
        are mostly followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        uempty or no certificateusubjectAltNameuDNSNusubjectu
commonNameiu&hostname %r doesn't match either of %su, uhostname %r doesn't match %riu=no appropriate commonName or subjectAltName fields were found(
u
ValueErrorugetu_dnsname_to_patumatchuappendulenuCertificateErrorujoinumapurepr(ucertuhostnameudnsnamesusanukeyuvalueusub((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyumatch_hostnamegs.%umatch_hostname(uSimpleNamespacecBs&|EeZdZdZdd�ZdS(u	ContaineruR
        A generic container for when multiple values need to be returned
        cKs|jj|�dS(N(u__dict__uupdate(uselfukwargs((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__init__�suContainer.__init__N(u__name__u
__module__u__qualname__u__doc__u__init__(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	Container�su	Container(uwhichcs�dd�}tjj��r5|�|�r1�SdS|dkr\tjjdtj�}n|sfdS|jtj�}t	j
dkrtj|kr�|jdtj�ntjjdd�jtj�}t
�fdd	�|D��r��g}q�fd
d�|D�}n	�g}t�}xu|D]m}tjj|�}||kr-|j|�x9|D].}	tjj||	�}
||
|�re|
SqeWq-q-WdS(
uKGiven a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.

        cSs5tjj|�o4tj||�o4tjj|�S(N(uosupathuexistsuaccessuisdir(ufnumode((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
_access_check�s$uwhich.<locals>._access_checkuPATHuwin32iuPATHEXTuc3s*|] }�j�j|j��VqdS(N(uloweruendswith(u.0uext(ucmd(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	<genexpr>�suwhich.<locals>.<genexpr>csg|]}�|�qS(((u.0uext(ucmd(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
<listcomp>�s	uwhich.<locals>.<listcomp>N(uosupathudirnameuNoneuenvironugetudefpathusplitupathsepusysuplatformucurdiruinsertuanyusetunormcaseuaddujoin(ucmdumodeupathu
_access_checkupathextufilesuseenudirunormdiruthefileuname((ucmdu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuwhich�s8
!		


uwhich(uZipFileu	__enter__(u
ZipExtFilecBs8|EeZdZdd�Zdd�Zdd�ZdS(u
ZipExtFilecCs|jj|j�dS(N(u__dict__uupdate(uselfubase((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__init__�suZipExtFile.__init__cCs|S(N((uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	__enter__�suZipExtFile.__enter__cGs|j�dS(N(uclose(uselfuexc_info((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__exit__�suZipExtFile.__exit__N(u__name__u
__module__u__qualname__u__init__u	__enter__u__exit__(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
ZipExtFile�su
ZipExtFilecBs8|EeZdZdd�Zdd�Zdd�ZdS(uZipFilecCs|S(N((uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	__enter__�suZipFile.__enter__cGs|j�dS(N(uclose(uselfuexc_info((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__exit__�suZipFile.__exit__cOstj|||�}t|�S(N(uBaseZipFileuopenu
ZipExtFile(uselfuargsukwargsubase((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuopen�suZipFile.openN(u__name__u
__module__u__qualname__u	__enter__u__exit__uopen(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuZipFile�suZipFile(upython_implementationcCs@dtjkrdStjdkr&dStjjd�r<dSdS(u6Return a string identifying the Python implementation.uPyPyujavauJythonu
IronPythonuCPython(usysuversionuosunameu
startswith(((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyupython_implementationsupython_implementation(u	sysconfig(uCallablecCs
t|t�S(N(u
isinstanceuCallable(uobj((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyucallablesucallableumbcsustrictusurrogateescapecCsOt|t�r|St|t�r2|jtt�Stdt|�j��dS(Nuexpect bytes or str, not %s(	u
isinstanceubytesu	text_typeuencodeu_fsencodingu	_fserrorsu	TypeErrorutypeu__name__(ufilename((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyufsencode#sufsencodecCsOt|t�r|St|t�r2|jtt�Stdt|�j��dS(Nuexpect bytes or str, not %s(	u
isinstanceu	text_typeubytesudecodeu_fsencodingu	_fserrorsu	TypeErrorutypeu__name__(ufilename((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyufsdecode,sufsdecode(udetect_encoding(uBOM_UTF8ulookupucoding[:=]\s*([-\w.]+)cCsd|dd�j�jdd�}|dks=|jd�rAdS|d
ks\|jd�r`dS|S(u(Imitates get_normal_name in tokenizer.c.Niu_u-uutf-8uutf-8-ulatin-1u
iso-8859-1uiso-latin-1ulatin-1-uiso-8859-1-uiso-latin-1-(ulatin-1u
iso-8859-1uiso-latin-1(ulatin-1-uiso-8859-1-uiso-latin-1-(ulowerureplaceu
startswith(uorig_encuenc((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu_get_normal_name=s"u_get_normal_namecsy�jj�Wntk
r*d�YnXd	�d}d}�fdd�}��fdd�}|�}|jt�r�d
�|dd�}d}n|s�|gfS||�}|r�||gfS|�}|s�||gfS||�}|r|||gfS|||gfS(u>
        The detect_encoding() function is used to detect the encoding that should
        be used to decode a Python source file.  It requires one argment, readline,
        in the same way as the tokenize() generator.

        It will call readline a maximum of twice, and return the encoding used
        (as a string) and a list of any lines (left as bytes) it has read in.

        It detects the encoding from the presence of a utf-8 bom or an encoding
        cookie as specified in pep-0263.  If both a bom and a cookie are present,
        but disagree, a SyntaxError will be raised.  If the encoding cookie is an
        invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
        'utf-8-sig' is returned.

        If no encoding is specified, then the default of 'utf-8' will be returned.
        uutf-8cs(y��SWntk
r#dSYnXdS(Ns(u
StopIteration((ureadline(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuread_or_stop`s
u%detect_encoding.<locals>.read_or_stopcs9y|jd�}WnEtk
rZd}�dk	rJdj|��}nt|��YnXtj|�}|stdSt|d�}yt|�}WnIt	k
r��dkr�d|}ndj�|�}t|��YnX�r5|j
dkr(�dkr
d}ndj��}t|��n|d	7}n|S(
Nuutf-8u'invalid or missing encoding declarationu{} for {!r}iuunknown encoding: uunknown encoding for {!r}: {}uencoding problem: utf-8u encoding problem for {!r}: utf-8u-sig(udecodeuUnicodeDecodeErroruNoneuformatuSyntaxErroru	cookie_reufindallu_get_normal_nameulookupuLookupErroruname(ulineuline_stringumsgumatchesuencodingucodec(u	bom_foundufilename(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyufind_cookiefs6


			
u$detect_encoding.<locals>.find_cookieiNu	utf-8-sigFT(u__self__unameuAttributeErroruNoneuFalseu
startswithuBOM_UTF8uTrue(ureadlineuencodingudefaulturead_or_stopufind_cookieufirstusecond((u	bom_foundufilenameureadlineu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyudetect_encodingHs4
&		

	
udetect_encoding(uescapeii(uunescape(uChainMap(uMutableMapping(urecursive_repru...cs�fdd�}|S(um
            Decorator to make a repr function return fillvalue for a recursive
            call
            cspt�����fdd�}t�d�|_t�d�|_t�d�|_t�di�|_|S(NcsWt|�t�f}|�kr%�S�j|�z�|�}Wd�j|�X|S(N(uidu	get_identuaddudiscard(uselfukeyuresult(u	fillvalueurepr_runningu
user_function(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuwrapper�s
u=_recursive_repr.<locals>.decorating_function.<locals>.wrapperu
__module__u__doc__u__name__u__annotations__(usetugetattru
__module__u__doc__u__name__u__annotations__(u
user_functionuwrapper(u	fillvalue(urepr_runningu
user_functionu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyudecorating_function�s	u,_recursive_repr.<locals>.decorating_function((u	fillvalueudecorating_function((u	fillvalueu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu_recursive_repr�su_recursive_reprcBs|EeZdZdZdd�Zdd�Zdd�Zd&dd	�Zd
d�Z	dd
�Z
dd�Zdd�Ze
�dd��Zedd��Zdd�ZeZdd�Zedd��Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&S('uChainMapu� A ChainMap groups multiple dicts (or other mappings) together
        to create a single, updateable view.

        The underlying mappings are stored in a list.  That list is public and can
        accessed or updated using the *maps* attribute.  There is no other state.

        Lookups search the underlying mappings successively until a key is found.
        In contrast, writes, updates, and deletions only operate on the first
        mapping.

        cGst|�pig|_dS(u�Initialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            N(ulistumaps(uselfumaps((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__init__�suChainMap.__init__cCst|��dS(N(uKeyError(uselfukey((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__missing__�suChainMap.__missing__cCsBx2|jD]'}y||SWq
tk
r0Yq
Xq
W|j|�S(N(umapsuKeyErroru__missing__(uselfukeyumapping((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__getitem__�s
	uChainMap.__getitem__cCs||kr||S|S(N((uselfukeyudefault((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuget�suChainMap.getcCstt�j|j��S(N(ulenusetuunionumaps(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__len__�suChainMap.__len__cCstt�j|j��S(N(uiterusetuunionumaps(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__iter__�suChainMap.__iter__cs t�fdd�|jD��S(Nc3s|]}�|kVqdS(N((u.0um(ukey(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	<genexpr>�su(ChainMap.__contains__.<locals>.<genexpr>(uanyumaps(uselfukey((ukeyu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__contains__�suChainMap.__contains__cCs
t|j�S(N(uanyumaps(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__bool__�suChainMap.__bool__cCs%dj|djtt|j���S(Nu{0.__class__.__name__}({1})u, (uformatujoinumapureprumaps(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__repr__�suChainMap.__repr__cGs|tj||��S(u?Create a ChainMap with a single dict created from the iterable.(udictufromkeys(uclsuiterableuargs((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyufromkeyssuChainMap.fromkeyscCs*|j|jdj�|jdd��S(uHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]iiN(u	__class__umapsucopy(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyucopy	su
ChainMap.copycCs|ji|j�S(u;New ChainMap with a new dict followed by all previous maps.(u	__class__umaps(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	new_childsuChainMap.new_childcCs|j|jdd��S(uNew ChainMap from maps[1:].iN(u	__class__umaps(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuparentssuChainMap.parentscCs||jd|<dS(Ni(umaps(uselfukeyuvalue((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__setitem__suChainMap.__setitem__cCs@y|jd|=Wn'tk
r;tdj|���YnXdS(Niu(Key not found in the first mapping: {!r}(umapsuKeyErroruformat(uselfukey((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__delitem__s
uChainMap.__delitem__cCs:y|jdj�SWntk
r5td��YnXdS(uPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.iu#No keys found in the first mapping.N(umapsupopitemuKeyError(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyupopitem!s
uChainMap.popitemcGsIy|jdj||�SWn'tk
rDtdj|���YnXdS(uWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].iu(Key not found in the first mapping: {!r}N(umapsupopuKeyErroruformat(uselfukeyuargs((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyupop(s
uChainMap.popcCs|jdj�dS(u'Clear maps[0], leaving maps[1:] intact.iN(umapsuclear(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuclear/suChainMap.clearN(u__name__u
__module__u__qualname__u__doc__u__init__u__missing__u__getitem__uNoneugetu__len__u__iter__u__contains__u__bool__u_recursive_repru__repr__uclassmethodufromkeysucopyu__copy__u	new_childupropertyuparentsu__setitem__u__delitem__upopitemupopuclear(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuChainMap�s(uChainMap(ucache_from_sourcecCsG|jd�st�|dkr*t}n|r9d}nd}||S(Nu.pyucuo(uendswithuAssertionErroruNoneu	__debug__(upathudebug_overrideusuffix((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyucache_from_source6s		ucache_from_source(uOrderedDict(u	get_ident(uKeysViewu
ValuesViewu	ItemsViewcBsv|EeZdZdZdd�Zejdd�Zejdd�Zdd	�Zd
d�Z	dd
�Z
d5dd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�ZeZe�Zedd�Zd4d d!�Zd4d"d#�Zd$d%�Zd&d'�Zed4d(d)��Zd*d+�Zd,d-�Z d.d/�Z!d0d1�Z"d2d3�Z#d4S(6uOrderedDictu)Dictionary that remembers insertion ordercOs�t|�dkr+tdt|���ny|jWnAtk
ryg|_}||dg|dd�<i|_YnX|j||�dS(u�Initialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            iu$expected at most 1 arguments, got %dN(ulenu	TypeErroru_OrderedDict__rootuAttributeErroruNoneu_OrderedDict__mapu_OrderedDict__update(uselfuargsukwdsuroot((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__init__]s

uOrderedDict.__init__cCs\||krH|j}|d}|||g|d<|d<|j|<n||||�dS(u!od.__setitem__(i, y) <==> od[i]=yiiN(u_OrderedDict__rootu_OrderedDict__map(uselfukeyuvalueudict_setitemurootulast((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__setitem__ms
	
)uOrderedDict.__setitem__cCs@|||�|jj|�\}}}||d<||d<dS(u od.__delitem__(y) <==> del od[y]iiN(u_OrderedDict__mapupop(uselfukeyudict_delitemu	link_prevu	link_next((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__delitem__ws

uOrderedDict.__delitem__ccs=|j}|d}x#||k	r8|dV|d}qWdS(uod.__iter__() <==> iter(od)iiN(u_OrderedDict__root(uselfurootucurr((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__iter__�s
	
	uOrderedDict.__iter__ccs=|j}|d}x#||k	r8|dV|d}qWdS(u#od.__reversed__() <==> reversed(od)iiN(u_OrderedDict__root(uselfurootucurr((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__reversed__�s
	
	uOrderedDict.__reversed__cCs�yZx$|jj�D]}|dd�=qW|j}||dg|dd�<|jj�Wntk
rnYnXtj|�dS(u.od.clear() -> None.  Remove all items from od.N(u_OrderedDict__mapu
itervaluesu_OrderedDict__rootuNoneuclearuAttributeErrorudict(uselfunodeuroot((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuclear�s	
uOrderedDict.clearcCs�|std��n|j}|rO|d}|d}||d<||d<n(|d}|d}||d<||d<|d}|j|=tj||�}||fS(u�od.popitem() -> (k, v), return and remove a (key, value) pair.
            Pairs are returned in LIFO order if last is true or FIFO order if false.

            udictionary is emptyiii(uKeyErroru_OrderedDict__rootu_OrderedDict__mapudictupop(uselfulasturootulinku	link_prevu	link_nextukeyuvalue((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyupopitem�s 	









uOrderedDict.popitemcCs
t|�S(uod.keys() -> list of keys in od(ulist(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyukeys�suOrderedDict.keyscs�fdd��D�S(u#od.values() -> list of values in odcsg|]}�|�qS(((u.0ukey(uself(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
<listcomp>�s	u&OrderedDict.values.<locals>.<listcomp>((uself((uselfu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuvalues�suOrderedDict.valuescs�fdd��D�S(u.od.items() -> list of (key, value) pairs in odcs g|]}|�|f�qS(((u.0ukey(uself(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
<listcomp>�s	u%OrderedDict.items.<locals>.<listcomp>((uself((uselfu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuitems�suOrderedDict.itemscCs
t|�S(u0od.iterkeys() -> an iterator over the keys in od(uiter(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuiterkeys�suOrderedDict.iterkeysccsx|D]}||VqWdS(u2od.itervalues -> an iterator over the values in odN((uselfuk((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
itervalues�s
uOrderedDict.itervaluesccs$x|D]}|||fVqWdS(u=od.iteritems -> an iterator over the (key, value) items in odN((uselfuk((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	iteritems�s
uOrderedDict.iteritemscOs&t|�dkr.tdt|�f��n|sCtd��n|d}f}t|�dkrr|d}nt|t�r�xw|D]}||||<q�WnXt|d�r�xF|j�D]}||||<q�Wn!x|D]\}}|||<q�Wx$|j�D]\}}|||<qWdS(u�od.update(E, **F) -> None.  Update od from dict/iterable E and F.

            If E is a dict instance, does:           for k in E: od[k] = E[k]
            If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
            Or if E is an iterable of items, does:   for k, v in E: od[k] = v
            In either case, this is followed by:     for k, v in F.items(): od[k] = v

            iu8update() takes at most 2 positional arguments (%d given)u,update() takes at least 1 argument (0 given)iiukeysN(ulenu	TypeErroru
isinstanceudictuhasattrukeysuitems(uargsukwdsuselfuotherukeyuvalue((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuupdate�s&	


uOrderedDict.updatecCsC||kr!||}||=|S||jkr?t|��n|S(u�od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
            If key is not found, d is returned if given, otherwise KeyError is raised.

            (u_OrderedDict__markeruKeyError(uselfukeyudefaulturesult((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyupop�s
uOrderedDict.popcCs"||kr||S|||<|S(uDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od((uselfukeyudefault((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
setdefault�s
uOrderedDict.setdefaultcCs�|si}nt|�t�f}||kr4dSd||<z5|sXd|jjfSd|jj|j�fSWd||=XdS(uod.__repr__() <==> repr(od)u...iu%s()u%s(%r)N(uidu
_get_identu	__class__u__name__uitems(uselfu
_repr_runningucall_key((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__repr__s	
uOrderedDict.__repr__cs~�fdd��D�}t��j�}x'tt��D]}|j|d�q;W|rn�j|f|fS�j|ffS(u%Return state information for picklingcs g|]}|�|g�qS(((u.0uk(uself(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
<listcomp>s	u*OrderedDict.__reduce__.<locals>.<listcomp>N(uvarsucopyuOrderedDictupopuNoneu	__class__(uselfuitemsu	inst_dictuk((uselfu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
__reduce__suOrderedDict.__reduce__cCs
|j|�S(u!od.copy() -> a shallow copy of od(u	__class__(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyucopysuOrderedDict.copycCs(|�}x|D]}|||<qW|S(u�OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            ((uclsuiterableuvalueudukey((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyufromkeys"s	
uOrderedDict.fromkeyscCsMt|t�r=t|�t|�ko<|j�|j�kStj||�S(u�od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            (u
isinstanceuOrderedDictulenuitemsudictu__eq__(uselfuother((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__eq__-s.uOrderedDict.__eq__cCs||kS(N((uselfuother((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__ne__6suOrderedDict.__ne__cCs
t|�S(u@od.viewkeys() -> a set-like object providing a view on od's keys(uKeysView(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuviewkeys;suOrderedDict.viewkeyscCs
t|�S(u<od.viewvalues() -> an object providing a view on od's values(u
ValuesView(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
viewvalues?suOrderedDict.viewvaluescCs
t|�S(uBod.viewitems() -> a set-like object providing a view on od's items(u	ItemsView(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu	viewitemsCsuOrderedDict.viewitemsNT($u__name__u
__module__u__qualname__u__doc__u__init__udictu__setitem__u__delitem__u__iter__u__reversed__uclearuTrueupopitemukeysuvaluesuitemsuiterkeysu
itervaluesu	iteritemsuupdateu_OrderedDict__updateuobjectu_OrderedDict__markerupopuNoneu
setdefaultu__repr__u
__reduce__ucopyuclassmethodufromkeysu__eq__u__ne__uviewkeysu
viewvaluesu	viewitems(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuOrderedDictQs:
		


	uOrderedDict(uBaseConfiguratoruvalid_identu^[a-z_][a-z0-9_]*$cCs,tj|�}|s(td|��ndS(Nu!Not a valid Python identifier: %rT(u
IDENTIFIERumatchu
ValueErroruTrue(usum((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuvalid_identMsuvalid_identcBs5|EeZdZdZdd�Zddd�ZdS(uConvertingDictu A converting dictionary wrapper.cCsqtj||�}|jj|�}||k	rm|||<t|�tttfkrm||_||_	qmn|S(N(
udictu__getitem__uconfiguratoruconvertutypeuConvertingDictuConvertingListuConvertingTupleuparentukey(uselfukeyuvalueuresult((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__getitem__`s
	uConvertingDict.__getitem__cCsttj|||�}|jj|�}||k	rp|||<t|�tttfkrp||_||_	qpn|S(N(
udictugetuconfiguratoruconvertutypeuConvertingDictuConvertingListuConvertingTupleuparentukey(uselfukeyudefaultuvalueuresult((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyugetls
	uConvertingDict.getN(u__name__u
__module__u__qualname__u__doc__u__getitem__uNoneuget(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuConvertingDict]suConvertingDictcCsjtj|||�}|jj|�}||k	rft|�tttfkrf||_||_	qfn|S(N(
udictupopuconfiguratoruconvertutypeuConvertingDictuConvertingListuConvertingTupleuparentukey(uselfukeyudefaultuvalueuresult((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyupopxs	upopcBs5|EeZdZdZdd�Zddd�ZdS(	uConvertingListuA converting list wrapper.cCsqtj||�}|jj|�}||k	rm|||<t|�tttfkrm||_||_	qmn|S(N(
ulistu__getitem__uconfiguratoruconvertutypeuConvertingDictuConvertingListuConvertingTupleuparentukey(uselfukeyuvalueuresult((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__getitem__�s
	uConvertingList.__getitem__icCs^tj||�}|jj|�}||k	rZt|�tttfkrZ||_qZn|S(N(	ulistupopuconfiguratoruconvertutypeuConvertingDictuConvertingListuConvertingTupleuparent(uselfuidxuvalueuresult((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyupop�suConvertingList.popNi����(u__name__u
__module__u__qualname__u__doc__u__getitem__upop(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuConvertingList�suConvertingListcBs&|EeZdZdZdd�ZdS(uConvertingTupleuA converting tuple wrapper.cCsgtj||�}|jj|�}||k	rct|�tttfkrc||_||_	qcn|S(N(
utupleu__getitem__uconfiguratoruconvertutypeuConvertingDictuConvertingListuConvertingTupleuparentukey(uselfukeyuvalueuresult((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__getitem__�s	uConvertingTuple.__getitem__N(u__name__u
__module__u__qualname__u__doc__u__getitem__(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuConvertingTuple�suConvertingTuplecBs�|EeZdZdZejd�Zejd�Zejd�Zejd�Z	ejd�Z
idd6d	d
6Zee
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS(uBaseConfiguratoruQ
        The configurator base class which defines some useful defaults.
        u%^(?P<prefix>[a-z]+)://(?P<suffix>.*)$u^\s*(\w+)\s*u^\.\s*(\w+)\s*u^\[\s*(\w+)\s*\]\s*u^\d+$uext_convertuextucfg_convertucfgcCst|�|_||j_dS(N(uConvertingDictuconfiguconfigurator(uselfuconfig((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu__init__�suBaseConfigurator.__init__c	Cs�|jd�}|jd�}yz|j|�}x`|D]X}|d|7}yt||�}Wq7tk
r�|j|�t||�}Yq7Xq7W|SWn]tk
r�tj�dd�\}}td||f�}|||_	|_
|�YnXdS(ul
            Resolve strings to objects using standard import and attribute
            syntax.
            u.iiNuCannot resolve %r: %s(usplitupopuimporterugetattruAttributeErroruImportErrorusysuexc_infou
ValueErroru	__cause__u
__traceback__(	uselfusunameuusedufoundufragueutbuv((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuresolve�s"



uBaseConfigurator.resolvecCs
|j|�S(u*Default converter for the ext:// protocol.(uresolve(uselfuvalue((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuext_convert�suBaseConfigurator.ext_convertcCs\|}|jj|�}|dkr7td|��n!||j�d�}|j|j�d}x�|rW|jj|�}|r�||j�d}n�|jj|�}|r|j�d}|j	j|�s�||}qyt
|�}||}Wqtk
r||}YqXn|r>||j�d�}qgtd||f��qgW|S(u*Default converter for the cfg:// protocol.uUnable to convert %rNiuUnable to convert %r at %r(uWORD_PATTERNumatchuNoneu
ValueErroruenduconfigugroupsuDOT_PATTERNu
INDEX_PATTERNu
DIGIT_PATTERNuintu	TypeError(uselfuvalueurestumuduidxun((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyucfg_convert�s2	

uBaseConfigurator.cfg_convertcCs/t|t�r7t|t�r7t|�}||_n�t|t�rnt|t�rnt|�}||_n�t|t�r�t|t�r�t|�}||_n�t|t�r+|j	j
|�}|r+|j�}|d}|jj
|d�}|r(|d}t||�}||�}q(q+n|S(u�
            Convert values to an appropriate type. dicts, lists and tuples are
            replaced by their converting alternatives. Strings are checked to
            see if they have a conversion format and are converted if they do.
            uprefixusuffixN(u
isinstanceuConvertingDictudictuconfiguratoruConvertingListulistuConvertingTupleutupleustring_typesuCONVERT_PATTERNumatchu	groupdictuvalue_convertersugetuNoneugetattr(uselfuvalueumuduprefixu	converterusuffix((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuconvert�s*

uBaseConfigurator.convertcs��jd�}t|�s-|j|�}n�jdd�}t�fdd��D��}||�}|r�x-|j�D]\}}t|||�q}Wn|S(u1Configure an object with a user-supplied factory.u()u.cs,g|]"}t|�r|�|f�qS((uvalid_ident(u.0uk(uconfig(u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu
<listcomp>s	u5BaseConfigurator.configure_custom.<locals>.<listcomp>N(upopucallableuresolveuNoneudictuitemsusetattr(uselfuconfigucupropsukwargsuresultunameuvalue((uconfigu3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuconfigure_customsu!BaseConfigurator.configure_customcCs"t|t�rt|�}n|S(u0Utility function which converts lists to tuples.(u
isinstanceulistutuple(uselfuvalue((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuas_tuple$suBaseConfigurator.as_tupleN(u__name__u
__module__u__qualname__u__doc__ureucompileuCONVERT_PATTERNuWORD_PATTERNuDOT_PATTERNu
INDEX_PATTERNu
DIGIT_PATTERNuvalue_convertersustaticmethodu
__import__uimporteru__init__uresolveuext_convertucfg_convertuconvertuconfigure_customuas_tuple(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyuBaseConfigurator�s"
"uBaseConfigurator(ii(�u
__future__uabsolute_importuosureusysuversion_infouStringIOu
basestringustring_typesuunicodeu	text_typeutypesuFileTypeu	file_typeu__builtin__ubuiltinsuConfigParseruconfigparseru	_backportushutiluurlparseu
urlunparseuurljoinuurlsplitu
urlunsplituurllibuurlretrieveuquoteu_quoteuunquoteuurl2pathnameupathname2urluContentTooShortErroru	splittypeuurllib2uRequestuurlopenuURLErroru	HTTPErroruHTTPBasicAuthHandleruHTTPPasswordMgruHTTPSHandleruHTTPHandleruHTTPRedirectHandlerubuild_openeruhttplibu	xmlrpclibuQueueuqueueu
HTMLParseruhtmlentitydefsu	raw_inputu	itertoolsuifilterufilteruifilterfalseufilterfalseuNoneu	_userprogu	splituseruioustru
TextIOWrapperuurllib.parseuurllib.requestuurllib.erroruhttp.clientuclienturequestu
xmlrpc.clientuhtml.parseru
html.entitiesuentitiesuinputusslumatch_hostnameuCertificateErroruImportErroru
ValueErroru_dnsname_to_patuSimpleNamespaceu	ContaineruobjectuwhichuF_OKuX_OKuzipfileuZipFileuBaseZipFileuhasattru
ZipExtFileuBaseZipExtFileuplatformupython_implementationu	sysconfigucallableu	NameErrorucollectionsuCallableufsencodeufsdecodeuAttributeErrorugetfilesystemencodingu_fsencodingu	_fserrorsutokenizeudetect_encodingucodecsuBOM_UTF8ulookupucompileu	cookie_reu_get_normal_nameuhtmluescapeucgiuunescapeuChainMapuMutableMappingureprliburecursive_repru_recursive_repruimpucache_from_sourceuOrderedDictuthreadu	get_identu
_get_identudummy_threadu_abcolluKeysViewu
ValuesViewu	ItemsViewudictulogging.configuBaseConfiguratoruvalid_identuIu
IDENTIFIERuConvertingDictupopulistuConvertingListutupleuConvertingTuple(((u3/tmp/pip-zej_zi-build/pip/_vendor/distlib/compat.pyu<module>s	(4F	@L
)

!A	




	

			
[


b



 
�

python3.3/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-33.pyc000064400000003144151733566750023325 0ustar00�
7�ReEc@s�ddlZdZGdd�de�ZyddlmZWn+ek
riGdd�dej�ZYnXeje�Z	e	j
e��dS(iNu0.1.8cBs|EeZdZdS(uDistlibExceptionN(u__name__u
__module__u__qualname__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/__init__.pyuDistlibExceptionsuDistlibException(uNullHandlercBs8|EeZdZdd�Zdd�Zdd�ZdS(uNullHandlercCsdS(N((uselfurecord((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/__init__.pyuhandlesuNullHandler.handlecCsdS(N((uselfurecord((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/__init__.pyuemitsuNullHandler.emitcCs
d|_dS(N(uNoneulock(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/__init__.pyu
createLocksuNullHandler.createLockN(u__name__u
__module__u__qualname__uhandleuemitu
createLock(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/__init__.pyuNullHandlersuNullHandler(uloggingu__version__u	ExceptionuDistlibExceptionuNullHandleruImportErroruHandleru	getLoggeru__name__uloggeru
addHandler(((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/__init__.pyu<module>s
python3.3/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-33.pyc000064400000030022151733566750023250 0ustar00�
7�Re0c@s�ddlmZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZddlm
Z
ddlmZmZmZmZmZeje�Zdj�Zejd�Zd	ZGd
d�de�ZdS(i(uBytesIONi(u	sysconfigufsencodeudetect_encodinguZipFile(ufinder(uFileOperatoruget_export_entryuconvert_pathuget_executableuin_venvu�
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
 processorArchitecture="X86"
 name="%s"
 type="win32"/>

 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
 <requestedPrivileges>
 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
 </requestedPrivileges>
 </security>
 </trustInfo>
</assembly>s^#!.*pythonw?[0-9.]*([ 	].*)?$u{# -*- coding: utf-8 -*-
if __name__ == '__main__':
    import sys, re

    def _resolve(module, func):
        __import__(module)
        mod = sys.modules[module]
        parts = func.split('.')
        result = getattr(mod, parts.pop(0))
        for p in parts:
            result = getattr(result, p)
        return result

    try:
        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])

        func = _resolve('%(module)s', '%(func)s')
        rc = func() # None interpreted as 0
    except Exception as e:  # only supporting Python >= 2.6
        sys.stderr.write('%%s\n' %% e)
        rc = 1
    sys.exit(rc)
cBs|EeZdZdZeZdZddddd�Z
dd�Zdddd�Zd	d
�Z
eZdd�Zd
d�Zddd�Zdd�Zedd��Zejdd��Zejdkr�dd�Znddd�Zddd�ZdS( uScriptMakeru_
    A class to copy or create scripts from source scripts or callable
    specifications.
    cCsg||_||_||_d|_d|_tjdk|_t	d�|_
|p]t|�|_dS(NuposixuuX.YF(uuX.Y(
u
source_diru
target_diru
add_launchersuFalseuforceuclobberuosunameuset_modeusetuvariantsuFileOperatoru_fileop(uselfu
source_diru
target_diru
add_launchersudry_runufileop((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu__init__Ks					uScriptMaker.__init__cCsg|jdd�rctjdkrctjj|�\}}|jdd�}tjj||�}n|S(NuguiuntupythonupythonwF(ugetuFalseuosunameupathusplitureplaceujoin(uselfu
executableuoptionsudnufn((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu_get_alternate_executableWs
!u%ScriptMaker._get_alternate_executablescCs�d}|jr!|j}d}n�tj�s9t�}nqt�rptjj	tj
d�dtjd��}n:tjj	tjd�dtjd�tjd�f�}|r�|j||�}n|r�d|kr�d|}nt
|�}d	||d
}y|jd�Wn"tk
r7td|��YnX|dkr�y|j|�Wq�tk
rtd
||f��Yq�Xn|S(Nuscriptsupython%suEXEuBINDIRu
python%s%suVERSIONu u"%s"s#!s
uutf-8u,The shebang (%r) is not decodable from utf-8u?The shebang (%r) is not decodable from the script encoding (%r)TF(uTrueu
executableuFalseu	sysconfiguis_python_builduget_executableuin_venvuosupathujoinuget_pathuget_config_varu_get_alternate_executableufsencodeudecodeuUnicodeDecodeErroru
ValueError(uselfuencodingupost_interpuoptionsuenquoteu
executableushebang((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu_get_shebang^s@					


uScriptMaker._get_shebangcCs |jtd|jd|j�S(Numoduleufunc(uscript_templateudictuprefixusuffix(uselfuentry((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu_get_script_text�suScriptMaker._get_script_textcCstjj|�}|j|S(N(uosupathubasenameumanifest(uselfuexenameubase((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyuget_manifest�suScriptMaker.get_manifestcCs�|jotjdk}tjjd�}|sA|||}n||dkr_|jd�}n|jd�}t�}	t|	d��}
|
jd|�WdQX|	j	�}||||}x�|D]�}tj
j|j|�}
|r�tj
j
|
�\}}|jd�r|}
nd|
}
y|jj|
|�Wqztk
r�tjd	�d
|
}tj
j|�r�tj|�ntj|
|�|jj|
|�tjd�ytj|�Wntk
r�YnXYqzXn�tjdkr|
jd|�rd
|
|f}
ntj
j|
�rH|jrHtjd|
�q�n|jj|
|�|jrz|jj|
g�n|j|
�q�WdS(Nuntuutf-8upyutuwu__main__.pyu.pyu%s.exeu:Failed to write executable - trying to use .deleteme logicu%s.deletemeu0Able to replace executable using .deleteme logicu.u%s.%suSkipping existing file %s(u
add_launchersuosunameulinesepuencodeu
_get_launcheruBytesIOuZipFileuwritestrugetvalueupathujoinu
target_dirusplitextu
startswithu_fileopuwrite_binary_fileu	Exceptionuloggeruwarninguexistsuremoveurenameudebuguendswithuclobberuset_modeuset_executable_modeuappend(uselfunamesushebanguscript_bytesu	filenamesuextuuse_launcherulinesepulauncherustreamuzfuzip_dataunameuoutnameunueudfname((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu
_write_script�sT	
	






#	uScriptMaker._write_scriptc	Cs|jdd|�}|j|�jd�}|j}t�}d|jkr^|j|�nd|jkr�|jd|tjdf�nd|jkr�|jd|tjdd	�f�n|r�|j	d
d
�r�d}nd}|j|||||�dS(Nuutf-8uoptionsuuXu%s%siuX.Yu%s-%siuguiupywupyF(u_get_shebangu_get_script_textuencodeunameusetuvariantsuaddusysuversionugetuFalseu
_write_script(	uselfuentryu	filenamesuoptionsushebanguscriptunameuscriptnamesuext((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu_make_script�s		!'	uScriptMaker._make_scriptcCsAd
}tjj|jt|��}tjj|jtjj|��}|jr||j	j
||�r|tjd|�dSyt
|d�}Wn'tk
r�|js��nd}Yn�Xt|j�\}}|jd�|j�}|s
tjd|j�|�dStj|jdd��}	|	rId}|	jd�pCd}
n|s�|rb|j�n|j	j||�|jr�|j	j|g�n|j|�n�tj d	||j�|j	js*|j!||
�}d
|kr�d}nd}tjj|�}
|j"|
g||j#�||�n|r=|j�ndS(Nunot copying %s (up-to-date)urbiu"%s: %s is an empty file (skipping)s
s
isucopying and adjusting %s -> %sspythonwupywupyFT($uFalseuosupathujoinu
source_diruconvert_pathu
target_dirubasenameuforceu_fileopuneweruloggerudebuguopenuIOErrorudry_runuNoneudetect_encodingureadlineuseekuwarninguget_command_nameu
FIRST_LINE_REumatchureplaceuTrueugroupucloseu	copy_fileuset_modeuset_executable_modeuappenduinfou_get_shebangu
_write_scripturead(uselfuscriptu	filenamesuadjustuoutnameufuencodingulinesu
first_lineumatchupost_interpushebanguextun((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu_copy_script�sR$ 
	
	
	
	%uScriptMaker._copy_scriptcCs
|jjS(N(u_fileopudry_run(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyudry_run
suScriptMaker.dry_runcCs||j_dS(N(u_fileopudry_run(uselfuvalue((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyudry_runsuntcCsftjd�dkrd}nd}d||f}tjdd�d}t|�j|�j}|S(	NuPiu64u32u%s%s.exeu.ii(ustructucalcsizeu__name__ursplitufinderufindubytes(uselfukindubitsunameudistlib_packageuresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu
_get_launchers	uScriptMaker._get_launchercCsKg}t|�}|dkr1|j||�n|j||d|�|S(u�
        Make a script.

        :param specification: The specification, which is either a valid export
                              entry specification (to make a script from a
                              callable) or a filename (to make a script by
                              copying from a source location).
        :param options: A dictionary of options controlling script generation.
        :return: A list of all absolute pathnames written to.
        uoptionsN(uget_export_entryuNoneu_copy_scriptu_make_script(uselfu
specificationuoptionsu	filenamesuentry((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyumake'suScriptMaker.makecCs4g}x'|D]}|j|j||��q
W|S(u�
        Take a list of specifications and make scripts from them,
        :param specifications: A list of specifications.
        :return: A list of all absolute pathnames written to,
        (uextendumake(uselfuspecificationsuoptionsu	filenamesu
specification((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu
make_multiple:s
uScriptMaker.make_multipleNTF(u__name__u
__module__u__qualname__u__doc__uSCRIPT_TEMPLATEuscript_templateuNoneu
executableuTrueuFalseu__init__u_get_alternate_executableu_get_shebangu_get_script_textu_DEFAULT_MANIFESTumanifestuget_manifestu
_write_scriptu_make_scriptu_copy_scriptupropertyudry_runusetteruosunameu
_get_launcherumakeu
make_multiple(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyuScriptMakerBs&.24uScriptMaker(uiouBytesIOulogginguosureustructusysucompatu	sysconfigufsencodeudetect_encodinguZipFileu	resourcesufinderuutiluFileOperatoruget_export_entryuconvert_pathuget_executableuin_venvu	getLoggeru__name__uloggerustripu_DEFAULT_MANIFESTucompileu
FIRST_LINE_REuSCRIPT_TEMPLATEuobjectuScriptMaker(((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/scripts.pyu<module>s"(python3.3/site-packages/pip/_vendor/distlib/__pycache__/markers.cpython-33.pyc000064400000022215151733566750023232 0ustar00�
7�Re�c@s�dZddlZddlZddlZddlZddlmZmZddlm	Z	dgZ
Gdd�de�Zdd	d�ZdS(
uEParser for the environment markers micro-language defined in PEP 345.iNi(upython_implementationustring_types(uin_venvu	interpretcBs�|EeZdZdZi	dd�d6dd�d6dd�d6d	d�d
6dd�d6d
d�d6dd�d6dd�d6dd�d6Zi	ejd6dejdd�d6ejj	dd�dd6e
jd6ee
��d6ej�d 6ej�d!6ej�d"6e�d#6Zdd$d%�Zd&d'�Zd(d)�Zdd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�ZdS(:u	Evaluatoru5
    A limited evaluator for Python expressions.
    cCs
||kS(N((uxuy((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda>suEvaluator.<lambda>ueqcCs
||kS(N((uxuy((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda>sugtcCs
||kS(N((uxuy((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda>sugtecCs
||kS(N((uxuy((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda>suincCs
||kS(N((uxuy((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda>sultcCs
||kS(N((uxuy((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda>sultecCs|S(N((ux((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda> sunotcCs
||kS(N((uxuy((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda>!sunoteqcCs
||kS(N((uxuy((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<lambda>"sunotinusys_platformu%s.%sNiupython_versionu iiupython_full_versionuos_nameuplatform_in_venvuplatform_releaseuplatform_versionuplatform_machineuplatform_python_implementationcCs|p	i|_d|_dS(uu
        Initialise an instance.

        :param context: If specified, names are looked up in this mapping.
        N(ucontextuNoneusource(uselfucontext((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu__init__3suEvaluator.__init__cCsKd}d|j|||�}||t|j�krG|d7}n|S(uH
        Get the part of the source which is causing a problem.
        i
u%ru...(usourceulen(uselfuoffsetufragment_lenus((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyuget_fragment<s

uEvaluator.get_fragmentcCst|d|d�S(u@
        Get a handler for the specified AST node type.
        udo_%sN(ugetattruNone(uselfu	node_type((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyuget_handlerFsuEvaluator.get_handlercCst|t�r�||_idd6}|r8||d<nytj||�}Wq�tk
r�}z'|j|j�}td|��WYdd}~Xq�Xn|jj	j
�}|j|�}|dkr|jdkr�d}n|j|j
�}td||f��n||�S(uf
        Evaluate a source string or node, using ``filename`` when
        displaying errors.
        uevalumodeufilenameusyntax error %sNu(source not available)u don't know how to evaluate %r %s(u
isinstanceustring_typesusourceuastuparseuSyntaxErroruget_fragmentuoffsetu	__class__u__name__uloweruget_handleruNoneu
col_offset(uselfunodeufilenameukwargsueusu	node_typeuhandler((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyuevaluateLs&	

&	uEvaluator.evaluatecCs5t|tj�std��d|jj|jfS(Nuattribute node expectedu%s.%s(u
isinstanceuastu	AttributeuAssertionErroruvalueuiduattr(uselfunode((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyuget_attr_keyfsuEvaluator.get_attr_keycCs�t|jtj�sd}n-|j|�}||jkpH||jk}|sdtd|��n||jkr�|j|}n
|j|}|S(Nuinvalid expression: %sF(	u
isinstanceuvalueuastuNameuFalseuget_attr_keyucontextuallowed_valuesuSyntaxError(uselfunodeuvalidukeyuresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyudo_attributejs	
uEvaluator.do_attributec	Cs�|j|jd�}|jjtjk}|jjtjk}|sR|sRt�|r^|sk|r�|r�xJ|jdd�D]2}|j|�}|r�|s�|r|rPqqWn|S(Nii(uevaluateuvaluesuopu	__class__uastuOruAnduAssertionError(uselfunodeuresultuis_oruis_andun((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu	do_boolopxsuEvaluator.do_boolopc	s���fdd�}�j}�j|�}d}x�t�j�j�D]�\}}|||�|jjj�}|�j	kr�t
d|��n�j|�}�j	|||�}|s�Pn|}|}qIW|S(Ncsbd}t|tj�r3t|tj�r3d}n|s^�j�j�}td|��ndS(NuInvalid comparison: %sTF(uTrueu
isinstanceuastuStruFalseuget_fragmentu
col_offsetuSyntaxError(ulhsnodeurhsnodeuvalidus(unodeuself(u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyusanity_check�s$	u*Evaluator.do_compare.<locals>.sanity_checkuunsupported operation: %rT(uleftuevaluateuTrueuzipuopsucomparatorsu	__class__u__name__uloweru	operatorsuSyntaxError(	uselfunodeusanity_checkulhsnodeulhsuresultuopurhsnodeurhs((unodeuselfu4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu
do_compare�s 
	"

uEvaluator.do_comparecCs|j|j�S(N(uevaluateubody(uselfunode((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu
do_expression�suEvaluator.do_expressioncCs|d}|j|jkr1d}|j|j}n+|j|jkr\d}|j|j}n|sxtd|j��n|S(Nuinvalid expression: %sFT(uFalseuiducontextuTrueuallowed_valuesuSyntaxError(uselfunodeuvaliduresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyudo_name�suEvaluator.do_namecCs|jS(N(us(uselfunode((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyudo_str�suEvaluator.do_str(u__name__u
__module__u__qualname__u__doc__u	operatorsusysuplatformuversion_infouversionusplituosunameustruin_venvureleaseumachineupython_implementationuallowed_valuesuNoneu__init__uget_fragmentuget_handleruevaluateuget_attr_keyudo_attributeu	do_boolopu
do_compareu
do_expressionudo_nameudo_str(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu	Evaluators@













	
u	EvaluatorcCst|�j|j��S(u�
    Interpret a marker and return a result depending on environment.

    :param marker: The marker to interpret.
    :type marker: str
    :param execution_context: The context used for name lookup.
    :type execution_context: mapping
    (u	Evaluatoruevaluateustrip(umarkeruexecution_context((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu	interpret�s	(u__doc__uastuosusysuplatformucompatupython_implementationustring_typesuutiluin_venvu__all__uobjectu	EvaluatoruNoneu	interpret(((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/markers.pyu<module>s	�python3.3/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-33.pyc000064400000205101151733566750022540 0ustar00�
7�Re�c@s�ddlZddlmZddlZddlZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZyddlZWnek
rddlZYnXddlZddlmZddlmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/e
j0e1�Z2dZ3e
j4e3�Z5dZ6d	e6d
Z7e6dZ8dZ9d
e9de8de3d
e9de8dZ:dZ;de:de;de:dZ<e7d
e3e7dZ=de=dZ>de6de>de<dZ?e
j4e?�Z@de9de8d
ZAe
j4eA�ZBdd �ZCd!d"�ZDd#d$�ZEd%d&�ZFddd'd(�ZHd)d*�ZId+d,�ZJd-d.�ZKejLd/d0��ZMejLd1d2��ZNejLd3d4d5��ZOGd6d7�d7eP�ZQd8d9�ZRGd:d;�d;eP�ZSd<d=�ZTGd>d?�d?eP�ZUe
j4d@e
jV�ZWdAdB�ZXddCdD�ZYdEdF�ZZdGdH�Z[dIdJ�Z\dKdL�Z]dMdN�Z^e
j4dOe
j_�Z`e
j4dP�ZaddQdR�Zbe
j4dS�ZcdTdU�ZddVdW�ZedXdY�ZfdZd[�Zgd\d]�ZhGd^d_�d_eP�ZiGd`da�daeP�ZjGdbdc�dceP�Zkd�Zldd�dkdl�Zndmdn�Zod�ZpGdudv�dveP�Zqe
j4dw�Zre
j4dx�Zse
j4dy�Ztdzd{�Zd|d}�ZuGd~d�de"jv�ZvGd�d��d�e'�Z&Gd�d��d�e&e%�Zwejxdd��Zyeyd�krGd�d��d�e"jz�ZzGd�d��d�e"j{�Z{nGd�d��d�e#j|�Z|Gd�d��d�e#j}�Z}Gd�d��d�e#j~�Z~d�d��ZGd�d��d�eP�Z�Gd�d��d�e��Z�Gd�d��d�e��Z�Gd�d��d�e(�Z�Gd�d��d�eP�Z�dS(�iN(udeque(uiglobi(uDistlibException(ustring_typesu	text_typeushutilu	raw_inputuStringIOucache_from_sourceuurlopenuhttplibu	xmlrpclibu	splittypeuHTTPHandleruHTTPSHandleruBaseConfiguratoruvalid_identu	ContaineruconfigparseruURLErrorumatch_hostnameuCertificateErroruZipFileu\s*,\s*u
(\w|[.-])+u(\*|:(\*|\w+):|u)u\*?u([<>=!~]=)|[<>]u(u)?\s*(u)(u)\s*(u))*u(from\s+(?P<diref>.*))u\(\s*(?P<c1>u|u)\s*\)|(?P<c2>u\s*)u)*u\[\s*(?P<ex>u)?\s*\]u(?P<dn>u	\s*)?(\s*u)?$u(?P<op>u)\s*(?P<vn>cs^dd��d}tj|�}|rZ|j�}|d}|dpN|d}|dsdd}nd}|dj�}|s�d}d}|d}nk|dd	kr�d
|}ntj|�}	�fdd�|	D�}d
|djdd�|D��f}|dsd}
ntj	|d�}
t
d|d|d|
d|d|d|�}n|S(NcSs|j�}|d|dfS(Nuopuvn(u	groupdict(umud((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_constraintTsu)parse_requirement.<locals>.get_constraintudnuc1uc2udirefuiu<>!=u~=csg|]}�|��qS(((u.0um(uget_constraint(u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
<listcomp>ls	u%parse_requirement.<locals>.<listcomp>u%s (%s)u, cSsg|]}d|�qS(u%s %s((u.0ucon((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
<listcomp>ms	uexunameuconstraintsuextrasurequirementusourceuurl(uNoneuREQUIREMENT_REumatchu	groupdictustripuRELOP_IDENT_REufinditerujoinuCOMMA_REusplitu	Container(usuresultumudunameuconsuurluconstrursuiteratoruextras((uget_constraintu1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuparse_requirementRs4

	

&
	uparse_requirementcCs�dd�}i}x�|D]�\}}}tjj||�}x�t|�D]�}tjj||�}	x�t|	�D]v}
|||
�}|dkr�|j|d�qr|||
�}|jtjjd�jd�}
|
d|||<qrWqJWqW|S(u%Find destinations for resources filescSsb|jtjjd�}|jtjjd�}|j|�sEt�|t|�d�jd�S(Nu/(ureplaceuosupathusepu
startswithuAssertionErrorulenulstrip(ubaseupath((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_rel_pathzsu)get_resources_dests.<locals>.get_rel_pathu/N(	uosupathujoinuiglobuNoneupopureplaceusepurstrip(uresources_rooturulesuget_rel_pathudestinationsubaseusuffixudestuprefixuabs_baseuabs_globuabs_pathu
resource_fileurel_pathurel_dest((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_resources_destsws!uget_resources_destscCs:ttd�rd}ntjttdtj�k}|S(Nureal_prefixubase_prefixT(uhasattrusysuTrueuprefixugetattr(uresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuin_venv�s	uin_venvcCs;tjdkr.dtjkr.tjd}n	tj}|S(Nudarwinu__PYVENV_LAUNCHER__(usysuplatformuosuenvironu
executable(uresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_executable�s
	uget_executablecCs}|}xpt|�}|}|r1|r1|}n|r	|dj�}||krWPn|rvd|||f}qvq	q	|S(Niu	%c: %s
%s(u	raw_inputulower(upromptu
allowed_charsuerror_promptudefaultupusuc((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuproceed�s
	uproceedcCsVt|t�r|j�}ni}x+|D]#}||kr+||||<q+q+W|S(N(u
isinstanceustring_typesusplit(udukeysuresultukey((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuextract_by_key�s
uextract_by_keyc

Cs�tjddkr+tjd�|�}n|j�}t|�}y�tj|�}|d}xo|j�D]a\}}xR|j�D]D\}}d||f}t	|�}|dk	s�t�|||<q�WqlW|SWn"tk
r�|j
dd�YnXtj�}	t|	d�r&|	j|�n
|	j|�i}xz|	j�D]l}
i||
<}xU|	j|
�D]D\}}d||f}t	|�}|dk	s�t�|||<qjWqFW|S(Niiuutf-8uexportsu%s = %su	read_file(usysuversion_infoucodecsu	getreaderureaduStringIOujsonuloaduitemsuget_export_entryuNoneuAssertionErroru	ExceptionuseekuconfigparseruConfigParseruhasattru	read_fileureadfpusections(
ustreamudatauresultugroupuentriesukuvusuentryucpukeyunameuvalue((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuread_exports�s:


uread_exportscCs�tjddkr+tjd�|�}ntj�}x�|j�D]�\}}|j|�x�|j�D]u}|j	dkr�|j}nd|j|j	f}|jr�d|dj
|j�f}n|j||j|�qjWqDW|j|�dS(Niiuutf-8u%s:%su%s [%s]u, (usysuversion_infoucodecsu	getwriteruconfigparseruConfigParseruitemsuadd_sectionuvaluesusuffixuNoneuprefixuflagsujoinusetunameuwrite(uexportsustreamucpukuvuentryus((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
write_exports�s
	u
write_exportsccs*tj�}z	|VWdtj|�XdS(N(utempfileumkdtempushutilurmtree(utd((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyutempdir�s	utempdirccs7tj�}ztj|�dVWdtj|�XdS(N(uosugetcwduchdir(uducwd((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuchdir�s

	uchdiriccs7tj�}ztj|�dVWdtj|�XdS(N(usocketugetdefaulttimeoutusetdefaulttimeout(usecondsucto((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyusocket_timeouts

	usocket_timeoutcBs/|EeZdZdd�Zddd�ZdS(ucached_propertycCs
||_dS(N(ufunc(uselfufunc((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__sucached_property.__init__cCs<|dkr|S|j|�}tj||jj|�|S(N(uNoneufuncuobjectu__setattr__u__name__(uselfuobjuclsuvalue((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__get__s
ucached_property.__get__N(u__name__u
__module__u__qualname__u__init__uNoneu__get__(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyucached_propertysucached_propertycCs�tjdkr|S|s|S|ddkr@td|��n|ddkrctd|��n|jd�}x#tj|kr�|jtj�quW|s�tjStjj|�S(u�Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    u/iupath '%s' cannot be absoluteiupath '%s' cannot end with '/'i����(uosusepu
ValueErrorusplitucurdiruremoveupathujoin(upathnameupaths((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuconvert_paths
uconvert_pathcBs�|EeZdZd"dd�Zdd�Zdd�Zdd�Zd#d	d
�Z	d!dd�Zd
d�Zdd�Z
dd�Zdd�Zdd�Zd"d"d!dd�Zdd�Zdd�Zdd�Zdd �Zd!S($uFileOperatorcCs#||_t�|_|j�dS(N(udry_runusetuensuredu_init_record(uselfudry_run((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__;s	uFileOperator.__init__cCs%d|_t�|_t�|_dS(NF(uFalseurecordusetu
files_writtenudirs_created(uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu_init_record@s	uFileOperator._init_recordcCs |jr|jj|�ndS(N(urecordu
files_writtenuadd(uselfupath((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyurecord_as_writtenEs	uFileOperator.record_as_writtencCsitjj|�s1tdtjj|���ntjj|�sGdStj|�jtj|�jkS(u�Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        ufile '%r' does not existT(uosupathuexistsuDistlibExceptionuabspathuTrueustatust_mtime(uselfusourceutarget((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyunewerIsuFileOperator.newercCs�|jtjj|��tjd||�|js�d}|r�tjj|�r`d|}q�tjj	|�r�tjj
|�r�d|}q�n|r�t|d��ntj
||�n|j|�dS(u8Copy a file respecting dry-run and force flags.
        uCopying %s to %su%s is a symlinku%s is a non-regular fileu which would be overwrittenN(u
ensure_diruosupathudirnameuloggeruinfoudry_runuNoneuislinkuexistsuisfileu
ValueErrorushutilucopyfileurecord_as_written(uselfuinfileuoutfileucheckumsg((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	copy_file]s	
%uFileOperator.copy_filec
Cs�tjj|�st�|jtjj|��tjd||�|js�|dkrlt
|d�}ntj
|dd|�}ztj
||�Wd|j�Xn|j|�dS(NuCopying stream %s to %suwbuwuencoding(uosupathuisdiruAssertionErroru
ensure_dirudirnameuloggeruinfoudry_runuNoneuopenucodecsushutilucopyfileobjucloseurecord_as_written(uselfuinstreamuoutfileuencodingu	outstream((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyucopy_streamns	uFileOperator.copy_streamc	Cs[|jtjj|��|jsJt|d��}|j|�WdQXn|j|�dS(Nuwb(u
ensure_diruosupathudirnameudry_runuopenuwriteurecord_as_written(uselfupathudatauf((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuwrite_binary_file}s
	uFileOperator.write_binary_filec
Csd|jtjj|��|jsSt|d��}|j|j|��WdQXn|j|�dS(Nuwb(	u
ensure_diruosupathudirnameudry_runuopenuwriteuencodeurecord_as_written(uselfupathudatauencodinguf((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuwrite_text_file�s
	uFileOperator.write_text_filecCs�tjdkr|xj|D]_}|jr8tjd|�qtj|�j|B|@}tjd||�tj||�qWndS(Nuposixuchanging mode of %suchanging mode of %s to %o(uosunameudry_runuloggeruinfoustatust_modeuchmod(uselfubitsumaskufilesufumode((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuset_mode�s
	uFileOperator.set_modecCs|jdd|�S(Nimi�(uset_mode(usuf((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu<lambda>�suFileOperator.<lambda>cCs�tjj|�}||jkr�tjj|�r�|jj|�tjj|�\}}|j|�tj	d|�|j
s�tj|�n|jr�|j
j|�q�ndS(NuCreating %s(uosupathuabspathuensureduexistsuaddusplitu
ensure_diruloggeruinfoudry_runumkdirurecordudirs_created(uselfupathuduf((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
ensure_dir�s"
		uFileOperator.ensure_dircCs�t||�}tjd||�|js�|sD|j||�r�|sSd}q�|j|�sht�|t|�d�}nt	j
|||d�n|j|�|S(NuByte-compiling %s to %sT(
ucache_from_sourceuloggeruinfoudry_rununeweruNoneu
startswithuAssertionErrorulenu
py_compileucompileuTrueurecord_as_written(uselfupathuoptimizeuforceuprefixudpathudiagpath((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyubyte_compile�s		
uFileOperator.byte_compilecCstjj|�rtjj|�r�tjj|�r�tjd|�|js`tj	|�n|j
r||jkr�|jj|�q�qqtjj|�r�d}nd}tjd||�|js�tj|�n|j
r||j
kr|j
j|�qqndS(NuRemoving directory tree at %sulinkufileuRemoving %s %s(uosupathuexistsuisdiruislinkuloggerudebugudry_runushutilurmtreeurecordudirs_createduremoveu
files_written(uselfupathus((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuensure_removed�s"%					uFileOperator.ensure_removedcCsjd}x]|setjj|�r:tj|tj�}Pntjj|�}||kr\Pn|}q	W|S(NF(uFalseuosupathuexistsuaccessuW_OKudirname(uselfupathuresultuparent((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuis_writable�s	
uFileOperator.is_writablecCs/|jst�|j|jf}|j�|S(uV
        Commit recorded changes, turn off recording, return
        changes.
        (urecorduAssertionErroru
files_writtenudirs_createdu_init_record(uselfuresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyucommit�s
uFileOperator.commitcCs�|js�x9t|j�D](}tjj|�rtj|�qqWt|jdd�}xq|D]f}tj
|�}|r�|dgks�t�tjj||d�}tj
|�ntj
|�qaWn|j�dS(Nureverseu__pycache__iT(udry_runulistu
files_writtenuosupathuexistsuremoveusortedudirs_createduTrueulistdiruAssertionErrorujoinurmdiru_init_record(uselfufudirsuduflistusd((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyurollback�s	
uFileOperator.rollbackNFT(u__name__u
__module__u__qualname__uFalseu__init__u_init_recordurecord_as_writtenuneweruTrueu	copy_fileuNoneucopy_streamuwrite_binary_fileuwrite_text_fileuset_modeuset_executable_modeu
ensure_dirubyte_compileuensure_removeduis_writableucommiturollback(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuFileOperator:s 
uFileOperatorcCs�|tjkrtj|}nt|�}|dkr@|}nG|jd�}t||jd��}x|D]}t||�}qnW|S(Nu.i(usysumodulesu
__import__uNoneusplitugetattrupop(umodule_nameudotted_pathumoduresultupartsup((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuresolve�s	
uresolvecBsS|EeZdZdd�Zedd��Zdd�Zdd�Zej	Z	d	S(
uExportEntrycCs(||_||_||_||_dS(N(unameuprefixusuffixuflags(uselfunameuprefixusuffixuflags((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__s			uExportEntry.__init__cCst|j|j�S(N(uresolveuprefixusuffix(uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuvaluesuExportEntry.valuecCs d|j|j|j|jfS(Nu<ExportEntry %s = %s:%s %s>(unameuprefixusuffixuflags(uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__repr__
suExportEntry.__repr__cCsdt|t�sd}nH|j|jko]|j|jko]|j|jko]|j|jk}|S(NF(u
isinstanceuExportEntryuFalseunameuprefixusuffixuflags(uselfuotheruresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__eq__s	uExportEntry.__eq__N(
u__name__u
__module__u__qualname__u__init__ucached_propertyuvalueu__repr__u__eq__uobjectu__hash__(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuExportEntry�s

uExportEntryu�(?P<name>(\w|[-.])+)
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>\w+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      c
CsGtj|�}|sId}d|ks3d|krCtd|��qCn�|j�}|d}|d}|jd�}|dkr�|d}}n4|dkr�td|��n|jd�\}}|d	}	|	dkrd|ks�d|kr	td|��ng}	nd
d�|	jd�D�}	t||||	�}|S(
Nu[u]uInvalid specification %runameucallableu:iiuflagscSsg|]}|j��qS((ustrip(u.0uf((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
<listcomp>;s	u$get_export_entry.<locals>.<listcomp>u,(uENTRY_REusearchuNoneuDistlibExceptionu	groupdictucountusplituExportEntry(
u
specificationumuresultudunameupathucolonsuprefixusuffixuflags((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_export_entry!s2




	uget_export_entrycCs|d
krd}ntjdkrHdtjkrHtjjd�}ntjjd�}tjj|�r�tj|tj	�}|s�t
jd|�q�nHytj|�d}Wn.tk
r�t
jd|dd�d}YnX|s
tj�}t
jd	|�ntjj||�S(
u�
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    u.distlibuntuLOCALAPPDATAu
$localappdatau~u(Directory exists but is not writable: %suUnable to create %suexc_infou#Default location unusable, using %sNTF(uNoneuosunameuenvironupathu
expandvarsu
expanduseruisdiruaccessuW_OKuloggeruwarningumakedirsuTrueuOSErroruFalseutempfileumkdtempujoin(usuffixuresultuusable((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_cache_base@s&	


uget_cache_basecCs`tjjtjj|��\}}|r?|jdd�}n|jtjd�}||dS(u
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    u:u---u--u.cache(uosupathu
splitdriveuabspathureplaceusep(upathudup((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyupath_to_cache_diris

$upath_to_cache_dircCs|jd�s|dS|S(Nu/(uendswith(us((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuensure_slashzsuensure_slashcCskd}}d|kr^|jdd�\}}d|krC|}q^|jdd�\}}n|||fS(Nu@iu:(uNoneusplit(unetlocuusernameupassworduprefix((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuparse_credentials�s
	uparse_credentialscCs tjd�}tj|�|S(Ni(uosuumask(uresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_process_umask�s
uget_process_umaskcCsXd}d}x3t|�D]%\}}t|t�sd}PqqW|dk	sTt�|S(NTF(uTrueuNoneu	enumerateu
isinstanceustring_typesuFalseuAssertionError(usequresultuius((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuis_string_sequence�suis_string_sequenceu3([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-([a-z0-9_.+-]+)u
-py(\d\.?\d?)cCsd}d}tj|�}|rI|jd�}|d|j��}n|r�t|�t|�dkr�tjtj|�d|�}|r�|j	�}|d|�||dd�|f}q�n|dkrt
j|�}|r|jd�|jd�|f}qn|S(uw
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    iNu\bi(uNoneuPYTHON_VERSIONusearchugroupustartulenureumatchuescapeuenduPROJECT_NAME_AND_VERSION(ufilenameuproject_nameuresultupyverumun((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyusplit_filename�s "-'usplit_filenameu-(?P<name>[\w .-]+)\s*\(\s*(?P<ver>[^\s)]+)\)$cCsRtj|�}|s(td|��n|j�}|dj�j�|dfS(u�
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    u$Ill-formed name/version string: '%s'unameuver(uNAME_VERSION_REumatchuDistlibExceptionu	groupdictustripulower(upumud((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuparse_name_and_version�s
	uparse_name_and_versioncCst�}t|pg�}t|p'g�}d|krS|jd�||O}nx�|D]�}|dkr||j|�qZ|jd�r�|dd�}||kr�tjd|�n||kr|j|�qqZ||kr�tjd|�n|j|�qZW|S(Nu*u-iuundeclared extra: %s(useturemoveuaddu
startswithuloggeruwarning(u	requestedu	availableuresulturuunwanted((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
get_extras�s&	


u
get_extrascCs�i}yet|�}|j�}|jd�dkrFtjd�n$tjd�|�}tj|�}Wn8t	k
r�}ztj
d||�WYdd}~XnX|S(NuContent-Typeuapplication/jsonu$Unexpected response for JSON requestuutf-8u&Failed to get external data for %s: %s(uurlopenuinfougetuloggerudebugucodecsu	getreaderujsonuloadu	Exceptionu	exception(uurluresulturespuheadersureaderue((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu_get_external_data�s&u_get_external_datacCs*d|dj�|f}t|�}|S(Nu9https://www.red-dove.com/pypi/projects/%s/%s/project.jsoni(uupperu_get_external_data(unameuurluresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_project_data�suget_project_datacCs'd|dj�||f}t|�S(Nu<https://www.red-dove.com/pypi/projects/%s/%s/package-%s.jsoni(uupperu_get_external_data(unameuversionuurl((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_package_data�suget_package_datacBs>|EeZdZdZdd�Zdd�Zdd�ZdS(	uCacheu�
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    cCsvtjj|�s"tj|�ntj|�jd@dkrQtjd|�ntjjtjj	|��|_
dS(uu
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        i?iuDirectory '%s' is not privateN(uosupathuisdirumakedirsustatust_modeuloggeruwarninguabspathunormpathubase(uselfubase((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__	s
uCache.__init__cCs
t|�S(uN
        Converts a resource prefix to a directory name in the cache.
        (upath_to_cache_dir(uselfuprefix((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
prefix_to_dirsuCache.prefix_to_dircCs�g}x�tj|j�D]�}tjj|j|�}yZtjj|�s^tjj|�rntj|�n"tjj|�r�t	j
|�nWqtk
r�|j|�YqXqW|S(u"
        Clear the cache.
        (
uosulistdirubaseupathujoinuislinkuisfileuremoveuisdirushutilurmtreeu	Exceptionuappend(uselfunot_removedufn((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuclears$
uCache.clearN(u__name__u
__module__u__qualname__u__doc__u__init__u
prefix_to_diruclear(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuCachesuCachecBsY|EeZdZdZdd�Zd
dd�Zdd�Zdd	�Zd
d�Z	dS(u
EventMixinu1
    A very simple publish/subscribe system.
    cCs
i|_dS(N(u_subscribers(uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__2suEventMixin.__init__cCs\|j}||kr+t|g�||<n-||}|rK|j|�n
|j|�dS(u`
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        N(u_subscribersudequeuappendu
appendleft(uselfueventu
subscriberuappendusubsusq((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuadd5s
	
uEventMixin.addcCs=|j}||kr(td|��n||j|�dS(u�
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        uNo subscribers: %rN(u_subscribersu
ValueErroruremove(uselfueventu
subscriberusubs((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuremoveIs	uEventMixin.removecCst|jj|f��S(u�
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        (uiteru_subscribersuget(uselfuevent((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuget_subscribersUsuEventMixin.get_subscriberscOs�g}xb|j|�D]Q}y||||�}Wn%tk
rYtjd�d}YnX|j|�qWtjd||||�|S(u^
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        u"Exception during event publicationu/publish %s: args = %s, kwargs = %s, result = %sN(uget_subscribersu	Exceptionuloggeru	exceptionuNoneuappendudebug(uselfueventuargsukwargsuresultu
subscriberuvalue((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyupublish\s

	uEventMixin.publishNT(
u__name__u
__module__u__qualname__u__doc__u__init__uTrueuadduremoveuget_subscribersupublish(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
EventMixin.su
EventMixincBs�|EeZdZdd�Zdd�Zddd�Zdd�Zd	d
�Zdd�Z	d
d�Z
edd��Zedd��Z
dS(u	SequencercCs"i|_i|_t�|_dS(N(u_predsu_succsusetu_nodes(uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__ws		uSequencer.__init__cCs|jj|�dS(N(u_nodesuadd(uselfunode((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuadd_node|suSequencer.add_nodecCs
||jkr"|jj|�n|r	x3t|jj|f��D]}|j||�qDWx3t|jj|f��D]}|j||�qzWx6t|jj��D]\}}|s�|j|=q�q�Wx9t|jj��D]\}}|s�|j|=q�q�WndS(N(u_nodesuremoveusetu_predsugetu_succsulistuitems(uselfunodeuedgesupusukuv((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuremove_nodes""""uSequencer.remove_nodecCsT||kst�|jj|t��j|�|jj|t��j|�dS(N(uAssertionErroru_predsu
setdefaultusetuaddu_succs(uselfupredusucc((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuadd�su
Sequencer.addcCs�||kst�y|j|}|j|}Wn"tk
rTtd|��YnXy|j|�|j|�Wn(tk
r�td||f��YnXdS(Nu%r not a successor of anythingu%r not a successor of %r(uAssertionErroru_predsu_succsuKeyErroru
ValueErroruremove(uselfupredusuccupredsusuccs((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuremove�s



uSequencer.removecCs+||jkp*||jkp*||jkS(N(u_predsu_succsu_nodes(uselfustep((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuis_step�suSequencer.is_stepcCs�|j|�s"td|��ng}g}t�}|j|�x�|r�|jd�}||kr�||kr�|j|�|j|�q�qG|j|�|j|�|jj|f�}|j	|�qGWt
|�S(NuUnknown: %ri(uis_stepu
ValueErrorusetuappendupopuremoveuaddu_predsugetuextendureversed(uselfufinaluresultutodouseenustepupreds((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	get_steps�s"	
	


uSequencer.get_stepscs|dg�g�i�i�g�|j��������fdd��x'�D]}|�krU�|�qUqUW�S(Nic
s8�d�|<�d�|<�dd7<�j|�y�|}Wntk
r_g}YnXxl|D]d}|�kr��|�t�|�|��|<qg|�krgt�|�|��|<qgqgW�|�|kr4g}x,�j�}|j|�||kr�Pq�q�t|�}�j|�ndS(Nii(uappendu	Exceptionuminupoputuple(unodeu
successorsu	successoruconnected_componentu	component(ugraphuindexu
index_counterulowlinksuresultustacku
strongconnect(u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
strongconnect�s.



"
u3Sequencer.strong_connections.<locals>.strongconnect(u_succs(uselfunode((ugraphuindexu
index_counterulowlinksuresultustacku
strongconnectu1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyustrong_connections�s		$"
uSequencer.strong_connectionscCs�dg}xF|jD];}|j|}x%|D]}|jd||f�q-WqWx"|jD]}|jd|�q\W|jd�dj|�S(Nudigraph G {u  %s -> %s;u  %s;u}u
(u_predsuappendu_nodesujoin(uselfuresultusuccupredsupredunode((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyudot�s	


u
Sequencer.dotNF(u__name__u
__module__u__qualname__u__init__uadd_nodeuFalseuremove_nodeuadduremoveuis_stepu	get_stepsupropertyustrong_connectionsudot(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	Sequencervs
3u	Sequenceru.tar.gzu.tar.bz2u.taru.zipu.tgzu.tbzu.whlc
s���fdd�}tjj���t���d}|dkr�|jd�r]d}q�|jd�r{d}d	}q�|jd�r�d}d
}q�|jd�r�d}d}q�td|��nz|dkrt|d�}|r]|j�}x|D]}||�qWq]nBt	j
||�}|r]|j�}x|D]}||�qFWn|dkr�tj
ddkr�xA|j�D]0}	t|	jt�s�|	jjd�|	_q�q�Wn|j��Wd|r�|j�nXdS(Ncs|t|t�s!|jd�}ntjjtjj�|��}|j��se|�tjkrxt	d|��ndS(Nuutf-8upath outside destination: %r(
u
isinstanceu	text_typeudecodeuosupathuabspathujoinu
startswithusepu
ValueError(upathup(udest_diruplen(u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
check_paths
!#uunarchive.<locals>.check_pathu.zipu.whluzipu.tar.gzu.tgzutgzur:gzu.tar.bz2u.tbzutbzur:bz2u.tarutaruruUnknown format for %riiuutf-8(u.zipu.whl(u.tar.gzu.tgz(u.tar.bz2u.tbz(uosupathuabspathulenuNoneuendswithu
ValueErroruZipFileunamelistutarfileuopenugetnamesusysuversion_infou
getmembersu
isinstanceunameu	text_typeudecodeu
extractalluclose(
uarchive_filenameudest_diruformatuchecku
check_pathuarchiveumodeunamesunameutarinfo((udest_diruplenu1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	unarchivesH				

u	unarchivecCs�tj�}t|�}t|d���}x{tj|�D]j\}}}xX|D]P}tjj||�}||d�}	tjj|	|�}
|j||
�qPWq:WWdQX|S(u*zip a directory tree into a BytesIO objectuwN(	uiouBytesIOulenuZipFileuosuwalkupathujoinuwrite(u	directoryuresultudlenuzfurootudirsufilesunameufullureludest((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuzip_dir:s
uzip_diruuKuMuGuTuPcBs�|EeZdZdZdddd�Zdd�Zdd	�Zd
d�Zdd
�Ze	dd��Z
e	dd��Zdd�Ze	dd��Z
e	dd��ZdS(uProgressuUNKNOWNiidcCsV|dks||kst�||_|_||_d|_d|_d|_dS(NiF(	uNoneuAssertionErroruminucurumaxustarteduelapseduFalseudone(uselfuminvalumaxval((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__Qs			uProgress.__init__cCs}|j|kst�|jdks9||jks9t�||_tj�}|jdkri||_n||j|_dS(N(uminuAssertionErrorumaxuNoneucurutimeustarteduelapsed(uselfucurvalunow((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuupdateYs$	uProgress.updatecCs*|dkst�|j|j|�dS(Ni(uAssertionErroruupdateucur(uselfuincr((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	incrementcsuProgress.incrementcCs|j|j�|S(N(uupdateumin(uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyustartgsuProgress.startcCs/|jdk	r"|j|j�nd|_dS(NT(umaxuNoneuupdateuTrueudone(uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyustopksu
Progress.stopcCs|jdkr|jS|jS(N(umaxuNoneuunknown(uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyumaximumpsuProgress.maximumcCsZ|jrd}nD|jdkr*d}n,d|j|j|j|j}d|}|S(Nu100 %u ?? %gY@u%3d %%(udoneumaxuNoneucurumin(uselfuresultuv((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
percentagets			"
uProgress.percentagecCsU|dkr|jdks-|j|jkr6d}ntjdtj|��}|S(Niu??:??:??u%H:%M:%S(umaxuNoneucuruminutimeustrftimeugmtime(uselfudurationuresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuformat_durations-	uProgress.format_durationcCs�|jrd}|j}n�d}|jdkr9d}ne|jdksZ|j|jkrcd}n;t|j|j�}||j|j}|d|j}d||j|�fS(NuDoneuETA iiu%s: %si����(udoneuelapsedumaxuNoneucuruminufloatuformat_duration(uselfuprefixut((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuETA�s		!	uProgress.ETAcCsh|jdkrd}n|j|j|j}x(tD] }|dkrLPn|d}q6Wd||fS(Nigi�g@�@u%d %sB/s(uelapseducuruminuUNITS(uselfuresultuunit((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuspeed�s	
uProgress.speedN(u__name__u
__module__u__qualname__uunknownu__init__uupdateu	incrementustartustopupropertyumaximumu
percentageuformat_durationuETAuspeed(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuProgressNs
	uProgressu\{([^}]*)\}u[^/\\,{]\*\*|\*\*[^/\\,}]u^[^{]*\}|\{[^}]*$cCsZtj|�r(d}t||��ntj|�rPd}t||��nt|�S(uAExtended globbing function that supports ** and {opt1,opt2,opt3}.u7invalid glob %r: recursive glob "**" must be used aloneu2invalid glob %r: mismatching set marker '{' or '}'(u_CHECK_RECURSIVE_GLOBusearchu
ValueErroru_CHECK_MISMATCH_SETu_iglob(u	path_globumsg((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuiglob�suiglobccs�tj|d�}t|�dkr�t|�dksBt|��|\}}}x3|jd�D]4}x+tdj|||f��D]}|Vq�WqaWn�d|kr�x�t|�D]}|Vq�Wn�|jdd�\}}|dkr�d}n|dkr	d}n|jd�}|jd	�}x]tj	|�D]L\}}}	tj
j|�}x(ttj
j||��D]}
|
VqtWq7WdS(
Niiu,uu**u.u*u/u\(u	RICH_GLOBusplitulenuAssertionErroru_iglobujoinu	std_iglobulstripuosuwalkupathunormpath(u	path_globurich_path_globuprefixusetusuffixuitemupathuradicaludirufilesufn((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu_iglob�s*%		"u_iglobcBs,|EeZdZdZdZdd�ZdS(uHTTPSConnectioncCs�tj|j|jf|j�}t|dd
�rI||_|j�nt	t
d�s�|jrmt
j}n	t
j
}t
j||j|jd|dt
jd|j�|_n�t
jt
j�}|jt
jO_|jr�|j|j|j�ni}|jrHt
j|_|jd|j�tt
dd
�rH|j|d<qHn|j||�|_|jr�|jr�y0t|jj�|j�tjd	|j�Wq�tk
r�|jjtj�|jj ��Yq�XndS(Nu_tunnel_hostu
SSLContextu	cert_reqsussl_versionuca_certsucafileuHAS_SNIuserver_hostnameuHost verified: %sF(!usocketucreate_connectionuhostuportutimeoutugetattruFalseusocku_tunneluhasattrussluca_certsu
CERT_REQUIREDu	CERT_NONEuwrap_socketukey_fileu	cert_fileuPROTOCOL_SSLv23u
SSLContextuoptionsuOP_NO_SSLv2uload_cert_chainuverify_modeuload_verify_locationsucheck_domainumatch_hostnameugetpeercertuloggerudebuguCertificateErrorushutdownu	SHUT_RDWRuclose(uselfusocku	cert_reqsucontextukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuconnect�s>!	
					

uHTTPSConnection.connectNT(u__name__u
__module__u__qualname__uNoneuca_certsuTrueucheck_domainuconnect(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuHTTPSConnection�suHTTPSConnectioncBs;|EeZdZddd�Zdd�Zdd�ZdS(	uHTTPSHandlercCs#tj|�||_||_dS(N(uBaseHTTPSHandleru__init__uca_certsucheck_domain(uselfuca_certsucheck_domain((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__s
	uHTTPSHandler.__init__cOs7t||�}|jr3|j|_|j|_n|S(u�
        This is called to create a connection instance. Normally you'd
        pass a connection class to do_open, but it doesn't actually check for
        a class, and just expects a callable. As long as we behave just as a
        constructor would have, we should be OK. If it ever changes so that
        we *must* pass a class, we'll create an UnsafeHTTPSConnection class
        which just sets check_domain to False in the class definition, and
        choose which one to pass to do_open.
        (uHTTPSConnectionuca_certsucheck_domain(uselfuargsukwargsuresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu_conn_makers

	uHTTPSHandler._conn_makercCsqy|j|j|�SWnStk
rl}z3dt|j�krWtd|j��n�WYdd}~XnXdS(Nucertificate verify failedu*Unable to verify server certificate for %s(udo_openu_conn_makeruURLErrorustrureasonuCertificateErroruhost(uselfureque((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
https_opensuHTTPSHandler.https_openNT(u__name__u
__module__u__qualname__uTrueu__init__u_conn_makeru
https_open(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuHTTPSHandlersuHTTPSHandlercBs |EeZdZdd�ZdS(uHTTPSOnlyHandlercCstd|��dS(NuAUnexpected HTTP request on what should be a secure connection: %s(uURLError(uselfureq((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	http_open0suHTTPSOnlyHandler.http_openN(u__name__u
__module__u__qualname__u	http_open(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuHTTPSOnlyHandler/suHTTPSOnlyHandleriicBs&|EeZdZdddd�ZdS(uHTTPucKs5|dkrd}n|j|j|||��dS(Ni(uNoneu_setupu_connection_class(uselfuhostuportukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__<s	u
HTTP.__init__N(u__name__u
__module__u__qualname__uNoneu__init__(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuHTTP;suHTTPcBs&|EeZdZdddd�ZdS(uHTTPSucKs5|dkrd}n|j|j|||��dS(Ni(uNoneu_setupu_connection_class(uselfuhostuportukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__Cs	uHTTPS.__init__N(u__name__u
__module__u__qualname__uNoneu__init__(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuHTTPSBsuHTTPScBs/|EeZdZddd�Zdd�ZdS(u	TransporticCs ||_tjj||�dS(N(utimeoutu	xmlrpclibu	Transportu__init__(uselfutimeoutuuse_datetime((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__Js	uTransport.__init__cCs�|j|�\}}}tdkr<t|d|j�}nN|jsY||jdkr}||_|tj|�f|_n|jd}|S(Niiutimeoutii(ii(u
get_host_infou	_ver_infouHTTPutimeoutu_connectionu_extra_headersuhttplibuHTTPConnection(uselfuhostuhuehux509uresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyumake_connectionNs	
uTransport.make_connectionN(u__name__u
__module__u__qualname__u__init__umake_connection(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	TransportIsu	TransportcBs/|EeZdZddd�Zdd�ZdS(u
SafeTransporticCs ||_tjj||�dS(N(utimeoutu	xmlrpclibu
SafeTransportu__init__(uselfutimeoutuuse_datetime((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__Zs	uSafeTransport.__init__cCs�|j|�\}}}|s'i}n|j|d<tdkrUt|d|�}nT|jsr||jdkr�||_|tj|d|�f|_n|jd}|S(Nutimeoutiiii(ii(	u
get_host_infoutimeoutu	_ver_infouHTTPSuNoneu_connectionu_extra_headersuhttplibuHTTPSConnection(uselfuhostuhuehukwargsuresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyumake_connection^s	
	
uSafeTransport.make_connectionN(u__name__u
__module__u__qualname__u__init__umake_connection(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
SafeTransportYsu
SafeTransportcBs |EeZdZdd�ZdS(uServerProxyc	Ks�|jdd�|_}|dk	r�t|�\}}|jdd�}|dkr^t}nt}||d|�|d<}||_ntj	j
|||�dS(Nutimeoutuuse_datetimeiuhttpsu	transport(upopuNoneutimeoutu	splittypeugetu
SafeTransportu	Transportu	transportu	xmlrpclibuServerProxyu__init__(	uselfuuriukwargsutimeoutuschemeu_uuse_datetimeutclsut((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__os	uServerProxy.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuServerProxynsuServerProxycKs:tjddkr |d7}n
d|d<t|||�S(Niiubuunewline(usysuversion_infouopen(ufnumodeukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	_csv_open�s

u	_csv_opencBsY|EeZdZied�d6ed�d6ed�d6Zdd�Zd	d
�ZdS(uCSVBaseu,u	delimiteru"u	quotecharu
ulineterminatorcCs|S(N((uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	__enter__�suCSVBase.__enter__cGs|jj�dS(N(ustreamuclose(uselfuexc_info((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__exit__�suCSVBase.__exit__N(u__name__u
__module__u__qualname__ustrudefaultsu	__enter__u__exit__(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuCSVBase�s

uCSVBasecBs>|EeZdZdd�Zdd�Zdd�ZeZdS(u	CSVReadercKs�d|krM|d}tjddkrAtjd�|�}n||_nt|dd�|_tj|j|j�|_dS(Nustreamiiuutf-8upathur(	usysuversion_infoucodecsu	getreaderustreamu	_csv_openucsvureaderudefaults(uselfukwargsustream((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__�s
uCSVReader.__init__cCs|S(N((uself((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__iter__�suCSVReader.__iter__cCskt|j�}tjddkrgxBt|�D]1\}}t|t�s/|jd�||<q/q/Wn|S(Niiuutf-8(unextureaderusysuversion_infou	enumerateu
isinstanceu	text_typeudecode(uselfuresultuiuitem((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyunext�suCSVReader.nextN(u__name__u
__module__u__qualname__u__init__u__iter__unextu__next__(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	CSVReader�su	CSVReadercBs,|EeZdZdd�Zdd�ZdS(u	CSVWritercKs1t|d�|_tj|j|j�|_dS(Nuw(u	_csv_openustreamucsvuwriterudefaults(uselfufnukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__�suCSVWriter.__init__cCsutjddkrag}x<|D]4}t|t�rG|jd�}n|j|�q W|}n|jj|�dS(Niiuutf-8(usysuversion_infou
isinstanceu	text_typeuencodeuappenduwriteruwriterow(uselfurowuruitem((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuwriterow�s
	uCSVWriter.writerowN(u__name__u
__module__u__qualname__u__init__uwriterow(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu	CSVWriter�su	CSVWritercsf|EeZdZeej�Zded<d�fdd�Zdd�Zdd�Z	d	d
�Z
�S(uConfiguratoruinc_convertuinccs/tt|�j|�|p%tj�|_dS(N(usuperuConfiguratoru__init__uosugetcwdubase(uselfuconfigubase(u	__class__(u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__�suConfigurator.__init__c
s��fdd���jd�}t|�sB�j|�}n�jdd�}�jdf�}|r�t�fdd�|D��}n��fdd��D�}t|�}|||�}|rx3|j�D]"\}}	t||�|	��q�Wn|S(	Ncs�t|ttf�r=t|��fdd�|D��}njt|t�r�d|krj�j|�}q�i}x4|D]}�||�||<qwWn�j|�}|S(Ncsg|]}�|��qS(((u.0ui(uconvert(u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
<listcomp>�s	uBConfigurator.configure_custom.<locals>.convert.<locals>.<listcomp>u()(u
isinstanceulistutupleutypeudictuconfigure_customuconvert(uouresultuk(uconvertuself(u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuconvert�s(
u.Configurator.configure_custom.<locals>.convertu()u.u[]csg|]}�|��qS(((u.0uo(uconvert(u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
<listcomp>�s	u1Configurator.configure_custom.<locals>.<listcomp>cs2g|](}t|�r|��|�f�qS((uvalid_ident(u.0uk(uconfiguconvert(u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu
<listcomp>�s	(upopucallableuresolveuNoneutupleudictuitemsusetattr(
uselfuconfigucupropsuargsuitemsukwargsuresultunuv((uconfiguconvertuselfu1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuconfigure_custom�s"uConfigurator.configure_customcCsI|j|}t|t�rEd|krE|j|�|j|<}n|S(Nu()(uconfigu
isinstanceudictuconfigure_custom(uselfukeyuresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__getitem__�s
uConfigurator.__getitem__c	Csatjj|�s-tjj|j|�}ntj|ddd��}tj|�}WdQX|S(u*Default converter for the inc:// protocol.uruencodinguutf-8N(	uosupathuisabsujoinubaseucodecsuopenujsonuload(uselfuvalueufuresult((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuinc_convert�s
uConfigurator.inc_convertN(u__name__u
__module__u__qualname__udictuBaseConfiguratoruvalue_convertersuNoneu__init__uconfigure_customu__getitem__uinc_convert(u
__locals__((u	__class__u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuConfigurator�s
uConfiguratorcBs>|EeZdZdddd�Zdd�Zdd�ZdS(	uSubprocessMixincCs||_||_dS(N(uverboseuprogress(uselfuverboseuprogress((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu__init__s	uSubprocessMixin.__init__cCs�|j}|j}xt|j�}|s+Pn|dk	rG|||�q|s`tjjd�ntjj|jd��tjj�q|j	�dS(u�
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        u.uutf-8N(
uprogressuverboseureadlineuNoneusysustderruwriteudecodeuflushuclose(uselfustreamucontextuprogressuverboseus((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyureaders		uSubprocessMixin.readercKs�tj|dtjdtj|�}tjd|jd|jdf�}|j�tjd|jd|jdf�}|j�|j	�|j
�|j
�|jdk	r�|jdd�n|j
r�tjjd�n|S(Nustdoutustderrutargetuargsudone.umainudone.
(u
subprocessuPopenuPIPEu	threadinguThreadureaderustdoutustartustderruwaitujoinuprogressuNoneuverboseusysuwrite(uselfucmdukwargsuput1ut2((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyurun_commands$
$



	uSubprocessMixin.run_commandNF(u__name__u
__module__u__qualname__uFalseuNoneu__init__ureaderurun_command(u
__locals__((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyuSubprocessMixin�suSubprocessMixin(u.tar.gzu.tar.bz2u.taru.zipu.tgzu.tbzu.whlT(uuKuMuGuTuP(ii(�ucodecsucollectionsudequeu
contextlibucsvuglobuiglobu	std_iglobuioujsonulogginguosu
py_compileureushutilusocketusslu
subprocessusysutarfileutempfileu	threadinguImportErrorudummy_threadingutimeuuDistlibExceptionucompatustring_typesu	text_typeu	raw_inputuStringIOucache_from_sourceuurlopenuhttplibu	xmlrpclibu	splittypeuHTTPHandleruHTTPSHandleruBaseHTTPSHandleruBaseConfiguratoruvalid_identu	ContaineruconfigparseruURLErrorumatch_hostnameuCertificateErroruZipFileu	getLoggeru__name__uloggeruCOMMAucompileuCOMMA_REuIDENTuEXTRA_IDENTuVERSPECuRELOPuBARE_CONSTRAINTSu
DIRECT_REFuCONSTRAINTSu
EXTRA_LISTuEXTRASuREQUIREMENTuREQUIREMENT_REuRELOP_IDENTuRELOP_IDENT_REuparse_requirementuget_resources_destsuin_venvuget_executableuNoneuproceeduextract_by_keyuread_exportsu
write_exportsucontextmanagerutempdiruchdirusocket_timeoutuobjectucached_propertyuconvert_pathuFileOperatoruresolveuExportEntryuVERBOSEuENTRY_REuget_export_entryuget_cache_baseupath_to_cache_diruensure_slashuparse_credentialsuget_process_umaskuis_string_sequenceuIuPROJECT_NAME_AND_VERSIONuPYTHON_VERSIONusplit_filenameuNAME_VERSION_REuparse_name_and_versionu
get_extrasu_get_external_datauget_project_datauget_package_datauCacheu
EventMixinu	SequenceruARCHIVE_EXTENSIONSuTrueu	unarchiveuzip_diruUNITSuProgressu	RICH_GLOBu_CHECK_RECURSIVE_GLOBu_CHECK_MISMATCH_SETu_iglobuHTTPSConnectionuHTTPSOnlyHandleruversion_infou	_ver_infouHTTPuHTTPSu	Transportu
SafeTransportuServerProxyu	_csv_openuCSVBaseu	CSVReaderu	CSVWriteruConfiguratoruSubprocessMixin(((u1/tmp/pip-zej_zi-build/pip/_vendor/distlib/util.pyu<module>s�
�
.%
		$
	�)
	,H�6]!*)	:python3.3/site-packages/pip/_vendor/distlib/__pycache__/manifest.cpython-33.pyc000064400000032755151733566750023406 0ustar00�
7�Re�4c@s�dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
dgZeje
�Zejdej�Zejd	ejejB�ZGd
d�de�ZdS(uu
Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.
iNi(uDistlibException(ufsdecode(uconvert_pathuManifestu\\w*
u#.*?(?=
)|
(?=$)cBs�|EeZdZdZddd�Zdd�Zdd�Zdd	�Zdd
d�Z
dd
�Zdd�Zdd�Z
ddddd�Zddddd�Zddddd�Zdd�ZdS(uManifestu~A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    cCsYtjjtjj|p!tj���|_|jtj|_d|_	t
�|_dS(ud
        Initialise an instance.

        :param base: The base directory to explore under.
        N(uosupathuabspathunormpathugetcwdubaseusepuprefixuNoneuallfilesusetufiles(uselfubase((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu__init__#s-	uManifest.__init__cCs�ddlm}m}m}g|_}|j}|g}|j}|j}x�|r�|�}tj	|�}	x�|	D]{}
tj
j||
�}tj|�}|j}
||
�r�|jt
|��qu||
�ru||
�ru||�ququWqPWdS(umFind all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        i(uS_ISREGuS_ISDIRuS_ISLNKN(ustatuS_ISREGuS_ISDIRuS_ISLNKuallfilesubaseupopuappenduosulistdirupathujoinust_modeufsdecode(uselfuS_ISREGuS_ISDIRuS_ISLNKuallfilesurootustackupopupushunamesunameufullnameustatumode((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyufindall2s"
						
	uManifest.findallcCsM|j|j�s-tjj|j|�}n|jjtjj|��dS(uz
        Add a file to the manifest.

        :param item: The pathname to add. This can be relative to the base.
        N(	u
startswithuprefixuosupathujoinubaseufilesuaddunormpath(uselfuitem((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyuaddMsuManifest.addcCs"x|D]}|j|�qWdS(u�
        Add a list of files to the manifest.

        :param items: The pathnames to add. These can be relative to the base.
        N(uadd(uselfuitemsuitem((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyuadd_manyWs
uManifest.add_manycs���fdd��t�j�}|rjt�}x'|D]}�|tjj|��q:W||O}ndd�tdd�|D��D�S(u8
        Return sorted files in directory order
        csj|j|�tjd|�|�jkrftjj|�\}}|dksVt��||�ndS(Nuadd_dir added %suu/(uu/(uadduloggerudebugubaseuosupathusplituAssertionError(udirsuduparentu_(uadd_diruself(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyuadd_dires
u Manifest.sorted.<locals>.add_dircSs"g|]}tjj|��qS((uosupathujoin(u.0u
path_tuple((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu
<listcomp>ss	u#Manifest.sorted.<locals>.<listcomp>css!|]}tjj|�VqdS(N(uosupathusplit(u.0upath((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu	<genexpr>tsu"Manifest.sorted.<locals>.<genexpr>(usetufilesuosupathudirnameusorted(uselfuwantdirsuresultudirsuf((uadd_diruselfu5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyusorted`s	

	uManifest.sortedcCst�|_g|_dS(uClear all collected files.N(usetufilesuallfiles(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyuclearvsuManifest.clearcCsS|j|�\}}}}|dkrcx%|D].}|j|dd�s.tjd|�q.q.Wn�|dkr�x�|D].}|j|dd�svtjd|�qvqvWn�|dkr�x�|D].}|j|dd�s�tjd|�q�q�Wn\|dkr;xM|D].}|j|dd�stjd	|�qqWn|d
kr�x|D]1}|j|d|�sNtjd||�qNqNWn�|d
kr�x�|D]1}|j|d|�s�tjd||�q�q�Wn~|dkr|jdd|�sOtjd|�qOnG|dkr?|jdd|�sOtjd|�qOntd|��dS(uv
        Process a directive which either adds some files from ``allfiles`` to
        ``files``, or removes some files from ``files``.

        :param directive: The directive to process. This should be in a format
                     compatible with distutils ``MANIFEST.in`` files:

                     http://docs.python.org/distutils/sourcedist.html#commands
        uincludeuanchoruno files found matching %ruexcludeu.no previously-included files found matching %ruglobal-includeu3no files found matching %r anywhere in distributionuglobal-excludeuGno previously-included files matching %r found anywhere in distributionurecursive-includeuprefixu-no files found matching %r under directory %rurecursive-excludeuAno previously-included files matching %r found under directory %rugraftu no directories found matching %rupruneu4no previously-included directories found matching %ruinvalid action %rNTF(	u_parse_directiveu_include_patternuTrueuloggeruwarningu_exclude_patternuFalseuNoneuDistlibException(uselfu	directiveuactionupatternsuthediru
dirpatternupattern((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyuprocess_directive{sP

	
	
	
	
		
	
uManifest.process_directivec
Cso|j�}t|�dkrA|ddkrA|jdd�n|d}d}}}|dkr�t|�dkr�td|��nd
d�|dd�D�}n�|dkrt|�dkr�td|��nt|d�}dd�|dd�D�}nT|dkrOt|�dkr<td|��nt|d�}ntd|��||||fS(u�
        Validate a directive.
        :param directive: The directive to validate.
        :return: A tuple of action, patterns, thedir, dir_patterns
        iiuincludeuexcludeuglobal-includeuglobal-excludeurecursive-includeurecursive-excludeugraftupruneiu$%r expects <pattern1> <pattern2> ...cSsg|]}t|��qS((uconvert_path(u.0uword((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu
<listcomp>�s	u-Manifest._parse_directive.<locals>.<listcomp>Niu*%r expects <dir> <pattern1> <pattern2> ...cSsg|]}t|��qS((uconvert_path(u.0uword((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu
<listcomp>�s	u!%r expects a single <dir_pattern>uunknown action %r(uincludeuexcludeuglobal-includeuglobal-excludeurecursive-includeurecursive-excludeugraftuprune(uincludeuexcludeuglobal-includeuglobal-exclude(urecursive-includeurecursive-exclude(ugraftuprune(usplitulenuinsertuNoneuDistlibExceptionuconvert_path(uselfu	directiveuwordsuactionupatternsuthedirudir_pattern((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu_parse_directive�s:	
	  uManifest._parse_directivecCszd}|j||||�}|jdkr:|j�nx9|jD].}|j|�rD|jj|�d}qDqDW|S(u�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found.
        FNT(	uFalseu_translate_patternuallfilesuNoneufindallusearchufilesuadduTrue(uselfupatternuanchoruprefixuis_regexufoundu
pattern_reuname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu_include_pattern�s

uManifest._include_patterncCsdd}|j||||�}x?t|j�D].}|j|�r.|jj|�d}q.q.W|S(utRemove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return True if files are
        found.

        This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
        packaging source distributions
        FT(uFalseu_translate_patternulistufilesusearchuremoveuTrue(uselfupatternuanchoruprefixuis_regexufoundu
pattern_reuf((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu_exclude_patterns
uManifest._exclude_patternc
Cs|r)t|t�r"tj|�S|Sn|rA|j|�}nd}tjtjj|j	d��}|dk	r�|jd�}|j|�dt|��}tj}	tjdkr�d}	nd||	j|d|f�}n|r�d||}ntj|�S(uTranslate a shell-like wildcard pattern to a compiled regular
        expression.

        Return the compiled regex.  If 'is_regex' true,
        then 'pattern' is directly compiled to a regex (if it's a string)
        or just returned as-is (assumes it's a regex object).
        uNu\u\\u^u.*(
u
isinstanceustrureucompileu_glob_to_reuescapeuosupathujoinubaseuNoneulenusep(
uselfupatternuanchoruprefixuis_regexu
pattern_reubaseu
empty_patternu	prefix_reusep((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu_translate_pattern3s&	
! 		uManifest._translate_patterncCsStj|�}tj}tjdkr0d}nd|}tjd||�}|S(u�Translate a shell-like glob pattern to a regular expression.

        Return a string containing the regex.  Differs from
        'fnmatch.translate()' in that '*' does not match "special characters"
        (which are platform-specific).
        u\u\\\\u\1[^%s]u((?<!\\)(\\\\)*)\.(ufnmatchu	translateuosusepureusub(uselfupatternu
pattern_reusepuescaped((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu_glob_to_reWs		
uManifest._glob_to_reNFT(u__name__u
__module__u__qualname__u__doc__uNoneu__init__ufindalluadduadd_manyuFalseusorteduclearuprocess_directiveu_parse_directiveuTrueu_include_patternu_exclude_patternu_translate_patternu_glob_to_re(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyuManifests 
	L/(#(u__doc__ufnmatchulogginguosureuuDistlibExceptionucompatufsdecodeuutiluconvert_pathu__all__u	getLoggeru__name__uloggerucompileuMu_COLLAPSE_PATTERNuSu_COMMENTED_LINEuobjectuManifest(((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu<module>
s	python3.3/site-packages/pip/_vendor/distlib/__pycache__/version.cpython-33.pyc000064400000101547151733566750023261 0ustar00�
7�Re�Yc@s�dZddlZddlZddlmZddddd	d
ddgZeje�ZGd
d�de	�Z
Gdd�de�ZGdd�de�Z
ejd�Zdd�ZeZGdd�de�Zdd�ZGdd�de
�Zejd�dfejd�dfejd�dfejd�dfejd �d!fejd"�d!fejd#�d$fejd%�d&fejd'�d(fejd)�d*ff
Zejd+�dfejd,�dfejd-�d$fejd#�d$fejd.�dffZejd/�Zd0d1�Zd2d3�Zejd4ej�Zid5d66d5d76d8d96d5d:6d;d<6dd6dd$6Zd=d>�ZGd?d�de�ZGd@d�de
�Z ejdAej�Z!dBdC�Z"dDdE�Z#GdFd	�d	e�Z$GdGd
�d
e
�Z%GdHdI�dIe�Z&ie&eee�dJ6e&ee dKdL��dM6e&e#e%e�dN6Z'e'dJe'dO<dPd�Z(dS(Qu~
Implementation of a flexible versioning scheme providing support for PEP-386,
distribute-compatible and semantic versioning.
iNi(ustring_typesuNormalizedVersionuNormalizedMatcheru
LegacyVersionu
LegacyMatcheruSemanticVersionuSemanticMatcheruUnsupportedVersionErroru
get_schemecBs|EeZdZdZdS(uUnsupportedVersionErroruThis is an unsupported version.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuUnsupportedVersionErrorscBs�|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zedd��ZdS(uVersioncCsZ|j�|_}|j|�|_}t|t�s>t�t|�dksVt�dS(Ni(ustripu_stringuparseu_partsu
isinstanceutupleuAssertionErrorulen(uselfusuparts((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__init__suVersion.__init__cCstd��dS(Nuplease implement in a subclass(uNotImplementedError(uselfus((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuparse$su
Version.parsecCs5t|�t|�kr1td||f��ndS(Nucannot compare %r and %r(utypeu	TypeError(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu_check_compatible'suVersion._check_compatiblecCs|j|�|j|jkS(N(u_check_compatibleu_parts(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__eq__+s
uVersion.__eq__cCs|j|�S(N(u__eq__(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__ne__/suVersion.__ne__cCs|j|�|j|jkS(N(u_check_compatibleu_parts(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__lt__2s
uVersion.__lt__cCs|j|�p|j|�S(N(u__lt__u__eq__(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__gt__6suVersion.__gt__cCs|j|�p|j|�S(N(u__lt__u__eq__(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__le__9suVersion.__le__cCs|j|�p|j|�S(N(u__gt__u__eq__(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__ge__<suVersion.__ge__cCs
t|j�S(N(uhashu_parts(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__hash__@suVersion.__hash__cCsd|jj|jfS(Nu%s('%s')(u	__class__u__name__u_string(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__repr__CsuVersion.__repr__cCs|jS(N(u_string(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__str__FsuVersion.__str__cCstd��dS(NuPlease implement in subclasses.(uNotImplementedError(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
is_prereleaseIsuVersion.is_prereleaseN(u__name__u
__module__u__qualname__u__init__uparseu_check_compatibleu__eq__u__ne__u__lt__u__gt__u__le__u__ge__u__hash__u__repr__u__str__upropertyu
is_prerelease(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuVersionsuVersioncBs|EeZdZd%Zejd�Zejd�Zejd�Z	idd�d6dd�d6d	d�d
6dd�d6d
d�d6dd�d6dd�d6Z
dd�Zdd�Ze
dd��Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%S(&uMatcheru^(\w[\s\w'.-]*)(\((.*)\))?u#^(<=|>=|<|>|!=|==|~=)?\s*([^\s,]+)$u
^\d+(\.\d+)*$cCs
||kS(N((uvucup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<lambda>WsuMatcher.<lambda>u<cCs
||kS(N((uvucup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<lambda>Xsu>cCs||kp||kS(N((uvucup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<lambda>Ysu<=cCs||kp||kS(N((uvucup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<lambda>Zsu>=cCs
||kS(N((uvucup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<lambda>[su==cCs||kp||kS(N((uvucup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<lambda>]su~=cCs
||kS(N((uvucup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<lambda>^su!=c
Cs�|jdkrtd��n|j�|_}|jj|�}|s\td|��n|jd�}|dj�|_|jj	�|_
g}|dr�dd�|djd�D�}x�|D]�}|jj|�}|s�td	||f��n|j�}|dpd
}|d}|j
d�r�|dkrRtd|��n|dd�d}}	|jj|�s�|j|�q�n|j|�d}}	|j|||	f�q�Wnt|�|_dS(NuPlease specify a version classu
Not valid: %ruiicSsg|]}|j��qS((ustrip(u.0uc((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>ms	u$Matcher.__init__.<locals>.<listcomp>u,uInvalid %r in %ru~=iu.*u==u!=u#'.*' not allowed for %r constraints(u==u!=i����TF(u
version_classuNoneu
ValueErrorustripu_stringudist_reumatchugroupsunameulowerukeyusplitucomp_reuendswithuTrueunum_reuFalseuappendutupleu_parts(
uselfusumugroupsuclistuconstraintsucuopuvnuprefix((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__init__as:
 


uMatcher.__init__cCs�t|t�r!|j|�}nx�|jD]�\}}}|jj|�}t|t�rmt||�}n|s�d||jjf}t	|��n||||�s+dSq+WdS(u�
        Check if the provided version matches the constraints.

        :param version: The version to match against this instance.
        :type version: Strring or :class:`Version` instance.
        u%r not implemented for %sFT(u
isinstanceustring_typesu
version_classu_partsu
_operatorsugetugetattru	__class__u__name__uNotImplementedErroruFalseuTrue(uselfuversionuoperatoru
constraintuprefixufumsg((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyumatch�su
Matcher.matchcCsJd}t|j�dkrF|jdddkrF|jdd}n|S(Niiu==(uNoneulenu_parts(uselfuresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
exact_version�s,uMatcher.exact_versioncCsGt|�t|�ks*|j|jkrCtd||f��ndS(Nucannot compare %s and %s(utypeunameu	TypeError(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu_check_compatible�s*uMatcher._check_compatiblecCs/|j|�|j|jko.|j|jkS(N(u_check_compatibleukeyu_parts(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__eq__�s
uMatcher.__eq__cCs|j|�S(N(u__eq__(uselfuother((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__ne__�suMatcher.__ne__cCst|j�t|j�S(N(uhashukeyu_parts(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__hash__�suMatcher.__hash__cCsd|jj|jfS(Nu%s(%r)(u	__class__u__name__u_string(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__repr__�suMatcher.__repr__cCs|jS(N(u_string(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__str__�suMatcher.__str__N(u__name__u
__module__u__qualname__uNoneu
version_classureucompileudist_reucomp_reunum_reu
_operatorsu__init__umatchupropertyu
exact_versionu_check_compatibleu__eq__u__ne__u__hash__u__repr__u__str__(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuMatcherNs*





%uMatcheruQ^(\d+(\.\d+)*)((a|b|c|rc)(\d+))?(\.(post)(\d+))?(\.(dev)(\d+))?(-(\d+(\.\d+)?))?$cCs�|j�}tj|�}|s4td|��n|j�}tdd�|djd�D��}x6t|�dkr�|ddkr�|dd�}qiW|dd�}|d	d
�}|dd�}|d
}|dkr�f}n|dt	|d�f}|dkrf}n|dt	|d�f}|dkrLf}n|dt	|d�f}|dkr{f}n"tdd�|jd�D��}|s�|r�|r�d}q�d}n|s�d}n|s�d}n|||||fS(NuNot a valid version: %scss|]}t|�VqdS(N(uint(u.0uv((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	<genexpr>�su_pep426_key.<locals>.<genexpr>iu.iiiiii	iicSsg|]}t|��qS((uint(u.0us((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>�s	u_pep426_key.<locals>.<listcomp>uauzu_ufinali����i����(NN(NN(NNi����(uai����(uz(u_(ufinal(
ustripuPEP426_VERSION_REumatchuUnsupportedVersionErrorugroupsutupleusplitulenuNoneuint(usumugroupsunumsupreupostudevulocal((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu_pep426_key�sB&%
				"
				u_pep426_keycBsS|EeZdZdZdd�Zedddddg�Zed	d
��ZdS(uNormalizedVersionuIA rational version.

    Good:
        1.2         # equivalent to "1.2.0"
        1.2.0
        1.2a1
        1.2.3a2
        1.2.3b1
        1.2.3c1
        1.2.3.4
        TODO: fill this out

    Bad:
        1           # mininum two numbers
        1.2a        # release level must have a release serial
        1.2.3b
    cCsTt|�}tj|�}|j�}tdd�|djd�D��|_|S(Ncss|]}t|�VqdS(N(uint(u.0uv((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	<genexpr>	su*NormalizedVersion.parse.<locals>.<genexpr>iu.(u_normalized_keyuPEP426_VERSION_REumatchugroupsutupleusplitu_release_clause(uselfusuresultumugroups((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuparses
)uNormalizedVersion.parseuaubucurcudevcs t�fdd��jD��S(Nc3s(|]}|r|d�jkVqdS(iN(uPREREL_TAGS(u.0ut(uself(u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	<genexpr>su2NormalizedVersion.is_prerelease.<locals>.<genexpr>(uanyu_parts(uself((uselfu4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
is_prereleasesuNormalizedVersion.is_prereleaseN(	u__name__u
__module__u__qualname__u__doc__uparseusetuPREREL_TAGSupropertyu
is_prerelease(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuNormalizedVersion�scCsUt|�}t|�}||kr(dS|j|�s;dSt|�}||dkS(Nu.TF(ustruTrueu
startswithuFalseulen(uxuyun((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
_match_prefixsu
_match_prefixcBs�|EeZdZeZidd6dd6dd6dd6d	d
6dd6d
d6Zdd�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS( uNormalizedMatcheru_match_compatibleu~=u	_match_ltu<u	_match_gtu>u	_match_leu<=u	_match_geu>=u	_match_equ==u	_match_neu!=cCsx|r"d|ko|jd}n|jdo:|jd}|rn|jjdd�d}|j|�}n||fS(Nu-iii����i����i����(u_partsu_stringusplitu
version_class(uselfuversionu
constraintuprefixustrip_localus((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
_adjust_local,suNormalizedMatcher._adjust_localcCs^|j|||�\}}||kr+dS|j}djdd�|D��}t||�S(Nu.cSsg|]}t|��qS((ustr(u.0ui((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>?s	u/NormalizedMatcher._match_lt.<locals>.<listcomp>F(u
_adjust_localuFalseu_release_clauseujoinu
_match_prefix(uselfuversionu
constraintuprefixurelease_clauseupfx((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	_match_lt:s	uNormalizedMatcher._match_ltcCs^|j|||�\}}||kr+dS|j}djdd�|D��}t||�S(Nu.cSsg|]}t|��qS((ustr(u.0ui((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>Gs	u/NormalizedMatcher._match_gt.<locals>.<listcomp>F(u
_adjust_localuFalseu_release_clauseujoinu
_match_prefix(uselfuversionu
constraintuprefixurelease_clauseupfx((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	_match_gtBs	uNormalizedMatcher._match_gtcCs%|j|||�\}}||kS(N(u
_adjust_local(uselfuversionu
constraintuprefix((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	_match_leJsuNormalizedMatcher._match_lecCs%|j|||�\}}||kS(N(u
_adjust_local(uselfuversionu
constraintuprefix((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	_match_geNsuNormalizedMatcher._match_gecCsC|j|||�\}}|s0||k}nt||�}|S(N(u
_adjust_localu
_match_prefix(uselfuversionu
constraintuprefixuresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	_match_eqRs
uNormalizedMatcher._match_eqcCsD|j|||�\}}|s0||k}nt||�}|S(N(u
_adjust_localu
_match_prefix(uselfuversionu
constraintuprefixuresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	_match_neZs
uNormalizedMatcher._match_necCs�|j|||�\}}||kr+dS||kr;dS|j}t|�dkri|dd�}ndjdd�|D��}t||�S(Niu.cSsg|]}t|��qS((ustr(u.0ui((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>ks	u7NormalizedMatcher._match_compatible.<locals>.<listcomp>TFi����(u
_adjust_localuTrueuFalseu_release_clauseulenujoinu
_match_prefix(uselfuversionu
constraintuprefixurelease_clauseupfx((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu_match_compatiblebs	u#NormalizedMatcher._match_compatibleN(u__name__u
__module__u__qualname__uNormalizedVersionu
version_classu
_operatorsu
_adjust_localu	_match_ltu	_match_gtu	_match_leu	_match_geu	_match_equ	_match_neu_match_compatible(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuNormalizedMatchers"
u[.+-]$uu^[.](\d)u0.\1u^[.-]u
^\((.*)\)$u\1u^v(ersion)?\s*(\d+)u\2u^r(ev)?\s*(\d+)u[.]{2,}u.u\b(alfa|apha)\bualphau\b(pre-alpha|prealpha)\bu	pre.alphau	\(beta\)$ubetau
^[:~._+-]+u
[,*")([\]]u[~:+_ -]u\.$u
(\d+(\.\d+)*)cCs�|j�j�}x&tD]\}}|j||�}qW|sJd}ntj|�}|snd}|}n�|j�djd�}dd�|D�}x#t|�dkr�|j	d�q�Wt|�dkr�||j
�d�}nJdjdd�|dd�D��||j
�d�}|dd�}djd	d�|D��}|j�}|r�x)tD]\}}|j||�}qjWn|s�|}n&d
|kr�dnd}|||}t
|�s�d}n|S(
u�
    Try to suggest a semantic form for a version for which
    _suggest_normalized_version couldn't come up with anything.
    u0.0.0iu.cSsg|]}t|��qS((uint(u.0ui((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>�s	u-_suggest_semantic_version.<locals>.<listcomp>iNcSsg|]}t|��qS((ustr(u.0ui((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>�s	cSsg|]}t|��qS((ustr(u.0ui((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>�s	udevu-u+(ustripuloweru
_REPLACEMENTSusubu_NUMERIC_PREFIXumatchugroupsusplitulenuappenduendujoinu_SUFFIX_REPLACEMENTSu	is_semveruNone(usuresultupatureplumuprefixusuffixusep((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu_suggest_semantic_version�s:		:		u_suggest_semantic_versioncCs�yt|�|SWntk
r&YnX|j�}x&dBD]\}}|j||�}q:Wtjdd|�}tjdd|�}tjdd|�}tjdd|�}tjdd|�}|jd�r�|d d!�}ntjd"d|�}tjd#d$|�}tjd%d&|�}tjd'd|�}tjd(d)|�}tjd*d)|�}tjd+d
|�}tjd,d-|�}tjd.d&|�}tjd/d0|�}tjd1d2|�}yt|�Wntk
r�d!}YnX|S(Cu�Suggest a normalized version close to the given version string.

    If you have a version string that isn't rational (i.e. NormalizedVersion
    doesn't like it) then you might be able to get an equivalent (or close)
    rational version from this function.

    This does a number of simple normalizations to the given string, based
    on observation of versions currently in use on PyPI. Given a dump of
    those version during PyCon 2009, 4287 of them:
    - 2312 (53.93%) match NormalizedVersion without change
      with the automatic suggestion
    - 3474 (81.04%) match when using this suggestion method

    @param s {str} An irrational version string.
    @returns A rational version string, or None, if couldn't determine one.
    u-alphauau-betaubualphaubetaurcucu-finaluu-preu-releaseu.releaseu-stableu+u.u_u u.finalufinalupre$upre0udev$udev0u([abc]|rc)[\-\.](\d+)$u\1\2u[\-\.](dev)[\-\.]?r?(\d+)$u.\1\2u[.~]?([abc])\.?u\1uviNu\b0+(\d+)(?!\d)u(\d+[abc])$u\g<1>0u\.?(dev-r|dev\.r)\.?(\d+)$u.dev\2u-(a|b|c)(\d+)$u[\.\-](dev|devel)$u.dev0u(?![\.\-])dev$u(final|stable)$u\.?(r|-|-r)\.?(\d+)$u.post\2u\.?(dev|git|bzr)\.?(\d+)$u\.?(pre|preview|-c)(\d+)$uc\g<2>up(\d+)$u.post\1(u-alphaua(u-betaub(ualphaua(ubetaub(urcuc(u-finalu(u-preuc(u-releaseu(u.releaseu(u-stableu(u+u.(u_u.(u u(u.finalu(ufinalu((u-alphaua(u-betaub(ualphaua(ubetaub(urcuc(u-finalu(u-preuc(u-releaseu(u.releaseu(u-stableu(u+u.(u_u.(u u(u.finalu(ufinalu(u_normalized_keyuUnsupportedVersionErrorulowerureplaceureusubu
startswithuNone(usursuorigurepl((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu_suggest_normalized_version�sH

	
u_suggest_normalized_versionu([a-z]+|\d+|[\.-])ucupreupreviewufinal-u-urcu@udevcCs�dd�}g}x�||�D]�}|jd�r�|dkrjx'|rf|ddkrf|j�qCWnx'|r�|d	dkr�|j�qmWn|j|�qWt|�S(
NcSs�g}x�tj|j��D]p}tj||�}|rd|dd�ko[dknrr|jd�}n
d|}|j|�qqW|jd�|S(Nu0iu9iu*u*final(u
_VERSION_PARTusplituloweru_VERSION_REPLACEugetuzfilluappend(usuresultup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	get_parts4s&

u_legacy_key.<locals>.get_partsu*u*finaliu*final-u00000000i����i����(u
startswithupopuappendutuple(usu	get_partsuresultup((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu_legacy_key3s
u_legacy_keycBs2|EeZdZdd�Zedd��ZdS(u
LegacyVersioncCs
t|�S(N(u_legacy_key(uselfus((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuparseNsuLegacyVersion.parsecCsRd}xE|jD]:}t|t�r|jd�r|dkrd}PqqW|S(Nu*u*finalFT(uFalseu_partsu
isinstanceustring_typesu
startswithuTrue(uselfuresultux((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
is_prereleaseQsuLegacyVersion.is_prereleaseN(u__name__u
__module__u__qualname__uparseupropertyu
is_prerelease(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
LegacyVersionMscBsN|EeZdZeZeej�Zded<ej	d�Z
dd�ZdS(u
LegacyMatcheru_match_compatibleu~=u^(\d+(\.\d+)*)cCs�||krdS|jjt|��}|sEtjd||�dS|j�d}d|krz|jdd�d}nt	||�S(NuACannot compute compatible match for version %s  and constraint %siu.iFT(
uFalseu
numeric_reumatchustruloggeruwarninguTrueugroupsursplitu
_match_prefix(uselfuversionu
constraintuprefixumus((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu_match_compatibleds	
uLegacyMatcher._match_compatibleN(u__name__u
__module__u__qualname__u
LegacyVersionu
version_classudictuMatcheru
_operatorsureucompileu
numeric_reu_match_compatible(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
LegacyMatcher\s

uN^(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+(\.[a-z0-9-]+)*)?(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$cCs
tj|�S(N(u
_SEMVER_REumatch(us((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu	is_semverzsu	is_semverc	Cs�dd�}t|�}|s-t|��n|j�}dd�|dd�D�\}}}||dd�||dd�}}|||f||fS(	NcSsN|dkr|f}n2|dd�jd�}tdd�|D��}|S(Niu.cSs1g|]'}|j�r'|jd�n|�qS(i(uisdigituzfill(u.0up((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>�s	u5_semantic_key.<locals>.make_tuple.<locals>.<listcomp>(uNoneusplitutuple(usuabsenturesultuparts((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
make_tuples
u!_semantic_key.<locals>.make_tuplecSsg|]}t|��qS((uint(u.0ui((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
<listcomp>�s	u!_semantic_key.<locals>.<listcomp>iu|iu*(u	is_semveruUnsupportedVersionErrorugroups(	usu
make_tupleumugroupsumajoruminorupatchupreubuild((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
_semantic_key~s
&'u
_semantic_keycBs2|EeZdZdd�Zedd��ZdS(uSemanticVersioncCs
t|�S(N(u
_semantic_key(uselfus((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuparse�suSemanticVersion.parsecCs|jdddkS(Niiu|(u_parts(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
is_prerelease�suSemanticVersion.is_prereleaseN(u__name__u
__module__u__qualname__uparseupropertyu
is_prerelease(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuSemanticVersion�scBs|EeZdZeZdS(uSemanticMatcherN(u__name__u
__module__u__qualname__uSemanticVersionu
version_class(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuSemanticMatcher�scBsS|EeZdZddd�Zdd�Zdd�Zdd�Zd	d
�ZdS(u
VersionSchemecCs||_||_||_dS(N(ukeyumatcheru	suggester(uselfukeyumatcheru	suggester((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu__init__�s		uVersionScheme.__init__cCs9y|jj|�d}Wntk
r4d}YnX|S(NTF(umatcheru
version_classuTrueuUnsupportedVersionErroruFalse(uselfusuresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuis_valid_version�s

uVersionScheme.is_valid_versioncCs6y|j|�d}Wntk
r1d}YnX|S(NTF(umatcheruTrueuUnsupportedVersionErroruFalse(uselfusuresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuis_valid_matcher�s


uVersionScheme.is_valid_matchercCs|jd|�S(u:
        Used for processing some metadata fields
        udummy_name (%s)(uis_valid_matcher(uselfus((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyuis_valid_constraint_list�su&VersionScheme.is_valid_constraint_listcCs+|jdkrd}n|j|�}|S(N(u	suggesteruNone(uselfusuresult((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyusuggest�s	uVersionScheme.suggestN(	u__name__u
__module__u__qualname__uNoneu__init__uis_valid_versionuis_valid_matcheruis_valid_constraint_listusuggest(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
VersionScheme�s
u
VersionSchemeu
normalizedcCs|S(N((uselfus((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<lambda>�su<lambda>ulegacyusemanticudefaultcCs'|tkrtd|��nt|S(Nuunknown scheme name: %r(u_SCHEMESu
ValueError(uname((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu
get_scheme�s()u__doc__uloggingureucompatustring_typesu__all__u	getLoggeru__name__uloggeru
ValueErroruUnsupportedVersionErroruobjectuVersionuMatcherucompileuPEP426_VERSION_REu_pep426_keyu_normalized_keyuNormalizedVersionu
_match_prefixuNormalizedMatcheru
_REPLACEMENTSu_SUFFIX_REPLACEMENTSu_NUMERIC_PREFIXu_suggest_semantic_versionu_suggest_normalized_versionuIu
_VERSION_PARTuNoneu_VERSION_REPLACEu_legacy_keyu
LegacyVersionu
LegacyMatcheru
_SEMVER_REu	is_semveru
_semantic_keyuSemanticVersionuSemanticMatcheru
VersionSchemeu_SCHEMESu
get_scheme(((u4/tmp/pip-zej_zi-build/pip/_vendor/distlib/version.pyu<module>	s~1j/$Q.r
		#	
	
python3.3/site-packages/pip/_vendor/distlib/__pycache__/database.cpython-33.pyc000064400000162611151733566750023337 0ustar00�
7�Re�c@s6dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
mZddlmZddlmZmZddlmZmZdd	lmZmZmZmZmZmZmZd
ddd
dgZej e!�Z"dZ#dZ$deddde#dfZ%dZ&Gdd�de'�Z(Gdd�de'�Z)Gdd
�d
e'�Z*Gdd�de*�Z+Gdd�de+�Z,Gdd
�d
e+�Z-e,Z.e-Z/Gdd�de'�Z0d d!d"�Z1d#d$�Z2d%d&�Z3d'd(�Z4dS()uPEP 376 implementation.i(uunicode_literalsNi(uDistlibExceptionu	resources(uStringIO(u
get_schemeuUnsupportedVersionError(uMetadatauMETADATA_FILENAME(uparse_requirementucached_propertyuparse_name_and_versionuread_exportsu
write_exportsu	CSVReaderu	CSVWriteruDistributionuBaseInstalledDistributionuInstalledDistributionuEggInfoDistributionuDistributionPathupydist-exports.jsonupydist-commands.jsonu	INSTALLERuRECORDu	REQUESTEDu	RESOURCESuSHAREDu
.dist-infocBs>|EeZdZdZdd�Zdd�Zdd�ZdS(	u_CacheuL
    A simple cache mapping names and .dist-info paths to distributions
    cCsi|_i|_d|_dS(uZ
        Initialise an instance. There is normally one for each DistributionPath.
        NF(unameupathuFalseu	generated(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__init__0s		u_Cache.__init__cCs'|jj�|jj�d|_dS(uC
        Clear the cache, setting it to its initial state.
        NF(unameuclearupathuFalseu	generated(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuclear8s

u_Cache.clearcCsH|j|jkrD||j|j<|jj|jg�j|�ndS(u`
        Add a distribution to the cache.
        :param dist: The distribution to add.
        N(upathunameu
setdefaultukeyuappend(uselfudist((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuadd@su
_Cache.addN(u__name__u
__module__u__qualname__u__doc__u__init__uclearuadd(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_Cache,su_CachecBs�|EeZdZdZdddd�Zdd�Zdd�Ze	ee�Z
dd	�Zd
d�Zdd
�Z
edd��Zdd�Zdd�Zddd�Zdd�Zddd�ZdS(uDistributionPathuU
    Represents a set of distributions installed on a path (typically sys.path).
    cCsg|dkrtj}n||_d|_||_t�|_t�|_d|_	t
d�|_dS(u�
        Create an instance from a path, optionally including legacy (distutils/
        setuptools/distribute) distributions.
        :param path: The path to use, as a list of directories. If not specified,
                     sys.path is used.
        :param include_egg: If True, this instance will look for and return legacy
                            distributions as well as those based on PEP 376.
        udefaultNT(uNoneusysupathuTrueu
_include_distu_include_eggu_Cacheu_cacheu
_cache_eggu_cache_enabledu
get_schemeu_scheme(uselfupathuinclude_egg((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__init__Ns					uDistributionPath.__init__cCs|jS(N(u_cache_enabled(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_get_cache_enabledbsu#DistributionPath._get_cache_enabledcCs
||_dS(N(u_cache_enabled(uselfuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_set_cache_enabledesu#DistributionPath._set_cache_enabledcCs|jj�|jj�dS(u,
        Clears the internal cache.
        N(u_cacheuclearu
_cache_egg(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuclear_cachejs
uDistributionPath.clear_cachec
cs�t�}x�|jD]�}tj|�}|d
kr:qn|jd�}|s|jr`qnt|j�}x(|D] }|j|�}|sv|j|kr�qvn|jrG|j	t
�rGtj|t
�}|j|�}|s�qvntd|j�dd�}	tjd|j�|j|j�t|jd|	d|�Vqv|jrv|j	d�rvtjd|j�|j|j�t|j|�VqvqvWqWd
S(uD
        Yield .dist-info and/or .egg(-info) distributions.
        uufileobjuschemeulegacyuFound %sumetadatauenvu	.egg-infou.eggN(u	.egg-infou.egg(usetupathu	resourcesufinder_for_pathuNoneufinduis_containerusortedu
_include_distuendswithuDISTINFO_EXTu	posixpathujoinuMETADATA_FILENAMEuMetadatau	as_streamuloggerudebuguaddunew_dist_classu_include_egguold_dist_class(
uselfuseenupathufinderurursetuentryu
metadata_pathupydistumetadata((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_yield_distributionsrs:	
		u%DistributionPath._yield_distributionscCs�|jj}|jo |jj}|s/|r�xF|j�D]8}t|t�rd|jj|�q<|jj|�q<W|r�d|j_n|r�d|j_q�ndS(uk
        Scan the path for distributions and populate the cache with
        those that are found.
        NT(	u_cacheu	generatedu_include_eggu
_cache_eggu_yield_distributionsu
isinstanceuInstalledDistributionuadduTrue(uselfugen_distugen_eggudist((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_generate_cache�s
u DistributionPath._generate_cachecCs)|jdd�}dj||g�tS(uo
        The *name* and *version* parameters are converted into their
        filename-escaped form, i.e. any ``'-'`` characters are replaced
        with ``'_'`` other than the one in ``'dist-info'`` and the one
        separating the name from the version number.

        :parameter name: is converted to a standard distribution name by replacing
                         any runs of non- alphanumeric characters with a single
                         ``'-'``.
        :type name: string
        :parameter version: is converted to a standard version string. Spaces
                            become dots, and all other non-alphanumeric characters
                            (except dots) become dashes, with runs of multiple
                            dashes condensed to a single dash.
        :type version: string
        :returns: directory name
        :rtype: stringu-u_(ureplaceujoinuDISTINFO_EXT(uclsunameuversion((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyudistinfo_dirname�su!DistributionPath.distinfo_dirnameccs�|js(xv|j�D]}|VqWnZ|j�x|jjj�D]}|VqEW|jr�x"|jjj�D]}|VqpWndS(u5
        Provides an iterator that looks for distributions and returns
        :class:`InstalledDistribution` or
        :class:`EggInfoDistribution` instances for each one of them.

        :rtype: iterator of :class:`InstalledDistribution` and
                :class:`EggInfoDistribution` instances
        N(u_cache_enabledu_yield_distributionsu_generate_cacheu_cacheupathuvaluesu_include_eggu
_cache_egg(uselfudist((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_distributions�s		
		u"DistributionPath.get_distributionscCs�d}|j�}|jsNx�|j�D]}|j|kr(|}Pq(q(Wne|j�||jjkr�|jj|d}n2|jr�||j	jkr�|j	j|d}n|S(u=
        Looks for a named distribution on the path.

        This function only returns the first result found, as no more than one
        value is expected. If nothing is found, ``None`` is returned.

        :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
                or ``None``
        iN(
uNoneuloweru_cache_enabledu_yield_distributionsukeyu_generate_cacheu_cacheunameu_include_eggu
_cache_egg(uselfunameuresultudist((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_distribution�s
	
u!DistributionPath.get_distributionc	
cs�d}|dk	r`y |jjd||f�}Wq`tk
r\td||f��Yq`Xnx�|j�D]z}|j}xh|D]`}t|�\}}|dkr�||kr�|VPq�q�||kr�|j|�r�|VPq�q�WqmWdS(u
        Iterates over all distributions to find which distributions provide *name*.
        If a *version* is provided, it will be used to filter the results.

        This function only returns the first result found, since no more than
        one values are expected. If the directory is not found, returns ``None``.

        :parameter version: a version specifier that indicates the version
                            required, conforming to the format in ``PEP-345``

        :type name: string
        :type version: string
        u%s (%s)uinvalid name or version: %r, %rN(	uNoneu_schemeumatcheru
ValueErroruDistlibExceptionuget_distributionsuprovidesuparse_name_and_versionumatch(	uselfunameuversionumatcherudistuprovidedupup_nameup_ver((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuprovides_distribution�s$ 
	
u&DistributionPath.provides_distributioncCs;|j|�}|dkr.td|��n|j|�S(u5
        Return the path to a resource file.
        uno distribution named %r foundN(uget_distributionuNoneuLookupErroruget_resource_path(uselfunameu
relative_pathudist((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
get_file_pathsuDistributionPath.get_file_pathccs�xy|j�D]k}|j}||kr
||}|dk	rY||kru||Vquqxx|j�D]}|VqfWq
q
WdS(u�
        Return all of the exported entries in a particular category.

        :param category: The category to search for entries.
        :param name: If specified, only entries with that name are returned.
        N(uget_distributionsuexportsuNoneuvalues(uselfucategoryunameudisturuduv((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_exported_entriess	
u%DistributionPath.get_exported_entriesNF(u__name__u
__module__u__qualname__u__doc__uNoneuFalseu__init__u_get_cache_enabledu_set_cache_enabledupropertyu
cache_enableduclear_cacheu_yield_distributionsu_generate_cacheuclassmethodudistinfo_dirnameuget_distributionsuget_distributionuprovides_distributionu
get_file_pathuget_exported_entries(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuDistributionPathJs&$	cBs|EeZdZdZdZdZdd�Zedd��Z	e	Z
edd��Zedd	��Zd
d�Z
edd
��Zedd��Zedd��Zedd��Zedd��Zdd�Zdd�Zdd�Zdd�ZdS( uDistributionu�
    A base class for distributions, whether installed or from indexes.
    Either way, it must have some metadata, so that's all that's needed
    for construction.
    cCs[||_|j|_|jj�|_|j|_d|_d|_d|_d|_	dS(u�
        Initialise an instance.
        :param metadata: The instance of :class:`Metadata` describing this
        distribution.
        N(
umetadataunameulowerukeyuversionuNoneulocatorudigestuextrasucontext(uselfumetadata((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__init__Cs				uDistribution.__init__cCs
|jjS(uH
        The source archive download URL for this distribution.
        (umetadatau
source_url(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
source_urlRsuDistribution.source_urlcCsd|j|jfS(uX
        A utility property which displays the name and version in parentheses.
        u%s (%s)(unameuversion(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuname_and_version[suDistribution.name_and_versioncCsB|jj}d|j|jf}||kr>|j|�n|S(u�
        A set of distribution names and versions provided by this distribution.
        :return: A set of "name (version)" strings.
        u%s (%s)(umetadatauprovidesunameuversionuappend(uselfuplistus((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuprovidesbs
uDistribution.providescCs:t|j|�}t|jj|d|jd|j��S(Nuextrasuenv(ugetattrumetadatausetuget_requirementsuextrasucontext(uselfureq_attrureqts((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_get_requirementsnsuDistribution._get_requirementscCs
|jd�S(Nurun_requires(u_get_requirements(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyurun_requiresssuDistribution.run_requirescCs
|jd�S(Nu
meta_requires(u_get_requirements(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
meta_requireswsuDistribution.meta_requirescCs
|jd�S(Nubuild_requires(u_get_requirements(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyubuild_requires{suDistribution.build_requirescCs
|jd�S(Nu
test_requires(u_get_requirements(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
test_requiressuDistribution.test_requirescCs
|jd�S(Nudev_requires(u_get_requirements(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyudev_requires�suDistribution.dev_requiresc
Cs�t|�}t|jj�}y|j|j�}WnAtk
rwtjd|�|j	�d}|j|�}YnX|j
}d}x^|jD]S}t
|�\}}	||kr�q�ny|j|	�}PWq�tk
r�Yq�Xq�W|S(u�
        Say if this instance matches (fulfills) a requirement.
        :param req: The requirement to match.
        :rtype req: str
        :return: True if it matches, else False.
        u+could not read version %r - using name onlyiF(uparse_requirementu
get_schemeumetadatauschemeumatcherurequirementuUnsupportedVersionErroruloggeruwarningusplitukeyuFalseuprovidesuparse_name_and_versionumatch(
uselfurequruschemeumatcherunameuresultupup_nameup_ver((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyumatches_requirement�s*	
		
	u Distribution.matches_requirementcCs6|jrd|j}nd}d|j|j|fS(uC
        Return a textual representation of this instance,
        u [%s]uu<Distribution %s (%s)%s>(u
source_urlunameuversion(uselfusuffix((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__repr__�s	uDistribution.__repr__cCs[t|�t|�k	r!d}n6|j|jkoT|j|jkoT|j|jk}|S(u<
        See if this distribution is the same as another.
        :param other: The distribution to compare with. To be equal to one
                      another. distributions must have the same type, name,
                      version and source_url.
        :return: True if it is the same, else False.
        F(utypeuFalseunameuversionu
source_url(uselfuotheruresult((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__eq__�s	uDistribution.__eq__cCs't|j�t|j�t|j�S(uH
        Compute hash in a way which matches the equality test.
        (uhashunameuversionu
source_url(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__hash__�suDistribution.__hash__NF(u__name__u
__module__u__qualname__u__doc__uFalseubuild_time_dependencyu	requestedu__init__upropertyu
source_urludownload_urluname_and_versionuprovidesu_get_requirementsurun_requiresu
meta_requiresubuild_requiresu
test_requiresudev_requiresumatches_requirementu__repr__u__eq__u__hash__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuDistribution1s$"
csD|EeZdZdZdZd�fdd�Zddd�Z�S(uBaseInstalledDistributionu]
    This is the base class for installed distributions (whether PEP 376 or
    legacy).
    cs,tt|�j|�||_||_dS(u
        Initialise an instance.
        :param metadata: An instance of :class:`Metadata` which describes the
                         distribution. This will normally have been initialised
                         from a metadata file in the ``path``.
        :param path:     The path of the ``.dist-info`` or ``.egg-info``
                         directory for the distribution.
        :param env:      This is normally the :class:`DistributionPath`
                         instance where this distribution was found.
        N(usuperuBaseInstalledDistributionu__init__upathu	dist_path(uselfumetadataupathuenv(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__init__�s	u"BaseInstalledDistribution.__init__cCs�|dkr|j}n|dkr6tj}d}ntt|�}d|j}||�j�}tj|�jd�j	d�}d||fS(u�
        Get the hash of some data, using a particular hash algorithm, if
        specified.

        :param data: The data to be hashed.
        :type data: bytes
        :param hasher: The name of a hash implementation, supported by hashlib,
                       or ``None``. Examples of valid values are ``'sha1'``,
                       ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
                       ``'sha512'``. If no hasher is specified, the ``hasher``
                       attribute of the :class:`InstalledDistribution` instance
                       is used. If the hasher is determined to be ``None``, MD5
                       is used as the hashing algorithm.
        :returns: The hash of the data. If a hasher was explicitly specified,
                  the returned hash will be prefixed with the specified hasher
                  followed by '='.
        :rtype: str
        uu%s=s=uasciiu%s%sN(
uNoneuhasheruhashlibumd5ugetattrudigestubase64uurlsafe_b64encodeurstripudecode(uselfudatauhasheruprefixudigest((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_hash�s		
!u"BaseInstalledDistribution.get_hashN(u__name__u
__module__u__qualname__u__doc__uNoneuhasheru__init__uget_hash(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuBaseInstalledDistribution�scs|EeZdZdZdZd%d%�fdd�Zdd�Zdd�Zd	d
�Z	e
dd��Zd
d�Zdd�Z
dd�Zdd�Zd&dd�Zdd�Ze
dd��Zd&dd�Zdd�Zdd �Zd!d"�Zd#d$�ZejZ�S('uInstalledDistributionu
    Created with the *path* of the ``.dist-info`` directory provided to the
    constructor. It reads the metadata contained in ``pydist.json`` when it is
    instantiated., or uses a passed in Metadata instance (useful for when
    dry-run mode is being used).
    usha256cs�tj|�|_}|dkr;ddl}|j�n|rr|jrr||jjkrr|jj|j	}n�|dkr|j
t�}|dkr�|j
d�}n|dkr�tdt|f��nt
j|j���}td|dd�}WdQXntt|�j|||�|rD|jrD|jj|�ny|j
d�}Wn(tk
r�ddl}|j�YnX|dk	|_dS(NiuMETADATAuno %s found in %sufileobjuschemeulegacyu	REQUESTED(u	resourcesufinder_for_pathufinderuNoneupdbu	set_traceu_cache_enabledu_cacheupathumetadataufinduMETADATA_FILENAMEu
ValueErroru
contextlibuclosingu	as_streamuMetadatausuperuInstalledDistributionu__init__uadduAttributeErroru	requested(uselfupathumetadatauenvufinderupdburustream(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__init__s0
!	
uInstalledDistribution.__init__cCsd|j|j|jfS(Nu#<InstalledDistribution %r %s at %r>(unameuversionupath(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__repr__'suInstalledDistribution.__repr__cCsd|j|jfS(Nu%s %s(unameuversion(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__str__+suInstalledDistribution.__str__c
Cs�g}|jd�}tj|j���{}td|��c}xY|D]Q}dd�tt|�d�D�}||\}}}	|j|||	f�qFWWdQXWdQX|S(u"
        Get the list of installed files for the distribution
        :return: A list of tuples of path, hash and size. Note that hash and
                 size might be ``None`` for some entries. The path is exactly
                 as stored in the file (which is as in PEP 376).
        uRECORDustreamcSsg|]}d�qS(N(uNone(u.0ui((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
<listcomp>=s	u6InstalledDistribution._get_records.<locals>.<listcomp>iN(uget_distinfo_resourceu
contextlibuclosingu	as_streamu	CSVReaderurangeulenuappend(
uselfuresultsurustreamu
record_readerurowumissingupathuchecksumusize((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_get_records.s
"&u"InstalledDistribution._get_recordscCs.i}|jt�}|r*|j�}n|S(u
        Return the information exported by this distribution.
        :return: A dictionary of exports, mapping an export category to a dict
                 of :class:`ExportEntry` instances describing the individual
                 export entries, and keyed by name.
        (uget_distinfo_resourceuEXPORTS_FILENAMEuread_exports(uselfuresultur((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuexportsEs
uInstalledDistribution.exportsc	CsLi}|jt�}|rHtj|j���}t|�}WdQXn|S(u�
        Read exports data from a file in .ini format.

        :return: A dictionary of exports, mapping an export category to a list
                 of :class:`ExportEntry` instances describing the individual
                 export entries.
        N(uget_distinfo_resourceuEXPORTS_FILENAMEu
contextlibuclosingu	as_streamuread_exports(uselfuresulturustream((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuread_exportsSsu"InstalledDistribution.read_exportsc
Cs8|jt�}t|d��}t||�WdQXdS(u
        Write a dictionary of exports to a file in .ini format.
        :param exports: A dictionary of exports, mapping an export category to
                        a list of :class:`ExportEntry` instances describing the
                        individual export entries.
        uwN(uget_distinfo_fileuEXPORTS_FILENAMEuopenu
write_exports(uselfuexportsurfuf((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
write_exportsbsu#InstalledDistribution.write_exportscCs�|jd�}tj|j���F}td|��.}x$|D]\}}||kr@|Sq@WWdQXWdQXtd|��dS(uW
        NOTE: This API may change in the future.

        Return the absolute path to a resource file with the given relative
        path.

        :param relative_path: The path, relative to .dist-info, of the resource
                              of interest.
        :return: The absolute path where the resource is to be found.
        u	RESOURCESustreamNu3no resource file with relative path %r is installed(uget_distinfo_resourceu
contextlibuclosingu	as_streamu	CSVReaderuKeyError(uselfu
relative_pathurustreamuresources_readerurelativeudestination((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_resource_pathmsu'InstalledDistribution.get_resource_pathccs x|j�D]}|Vq
WdS(u�
        Iterates over the ``RECORD`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: iterator of (path, hash, size)
        N(u_get_records(uselfuresult((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyulist_installed_files�su*InstalledDistribution.list_installed_filescCs�tjj|d�}tjj|j�}|j|�}tjj|d�}|jd�}tjd|�|rwdSt	|��}x�|D]�}tjj
|�s�|jd	�r�d}	}
nCdtjj|�}
t
|d��}|j|j��}	WdQX|j|�s(|r@|j|�r@tjj||�}n|j||	|
f�q�W|j|�r�tjj||�}n|j|ddf�WdQX|S(
u�
        Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
        existing ``RECORD`` file is silently overwritten.

        prefix is used to determine when to write absolute paths.
        uuRECORDucreating %su.pycu.pyou%durbN(u.pycu.pyo(uosupathujoinudirnameu
startswithuget_distinfo_fileuloggeruinfouNoneu	CSVWriteruisdiruendswithugetsizeuopenuget_hashureadurelpathuwriterow(uselfupathsuprefixudry_runubaseubase_under_prefixurecord_pathuwriterupathu
hash_valueusizeufp((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuwrite_installed_files�s.
!
u+InstalledDistribution.write_installed_filescCs�g}tjj|j�}|jd�}xn|j�D]`\}}}tjj|�sptjj||�}n||kr�q7ntjj|�s�|j|dd
df�q7tjj|�r7ttjj
|��}|r||kr|j|d||f�q�|r�d|kr3|jdd�d}nd	}t|d��G}	|j|	j�|�}
|
|kr�|j|d||
f�nWd	QXq�q7q7W|S(u�
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        uRECORDuexistsusizeu=iiurbuhashNTF(uosupathudirnameuget_distinfo_fileulist_installed_filesuisabsujoinuexistsuappenduTrueuFalseuisfileustrugetsizeusplituNoneuopenuget_hashuread(uselfu
mismatchesubaseurecord_pathupathu
hash_valueusizeuactual_sizeuhasherufuactual_hash((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyucheck_installed_files�s.	,u+InstalledDistribution.check_installed_filesc
Cs�i}tjj|jd�}tjj|�r�tj|ddd��}|j�j�}WdQXx[|D]P}|jdd�\}}|dkr�|j	|g�j
|�qj|||<qjWn|S(	u�
        A dictionary of shared locations whose keys are in the set 'prefix',
        'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
        The corresponding value is the absolute path of that category for
        this distribution, and takes into account any paths selected by the
        user at installation time (e.g. via command-line arguments). In the
        case of the 'namespace' key, this would be a list of absolute paths
        for the roots of namespace packages in this distribution.

        The first time this property is accessed, the relevant information is
        read from the SHARED file in the .dist-info directory.
        uSHAREDuruencodinguutf-8Nu=iu	namespace(uosupathujoinuisfileucodecsuopenureadu
splitlinesusplitu
setdefaultuappend(uselfuresultushared_pathufulinesulineukeyuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyushared_locations�s
u&InstalledDistribution.shared_locationsc	
Cs�tjj|jd�}tjd|�|r2dSg}xHdD]@}||}tjj||�r?|jd||f�q?q?Wx+|jd	f�D]}|jd
|�q�Wt	j
|ddd
��}|jdj|��WdQX|S(ua
        Write shared location information to the SHARED file in .dist-info.
        :param paths: A dictionary as described in the documentation for
        :meth:`shared_locations`.
        :param dry_run: If True, the action is logged but no file is actually
                        written.
        :return: The path of the file written to.
        uSHAREDucreating %suprefixulibuheadersuscriptsudatau%s=%su	namespaceunamespace=%suwuencodinguutf-8u
N(uprefixulibuheadersuscriptsudata(uosupathujoinuloggeruinfouNoneuisdiruappendugetucodecsuopenuwrite(	uselfupathsudry_runushared_pathulinesukeyupathunsuf((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuwrite_shared_locations�s	

u,InstalledDistribution.write_shared_locationscCsi|tkr(td||jf��ntj|j�}|dkr\td|j��n|j|�S(Nu+invalid path for a dist-info file: %r at %ruUnable to get a finder for %s(u
DIST_FILESuDistlibExceptionupathu	resourcesufinder_for_pathuNoneufind(uselfupathufinder((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_distinfo_resourcesu+InstalledDistribution.get_distinfo_resourcecCs�|jtj�dkr~|jtj�dd�\}}||jjtj�dkr~td||j|jf��q~n|tkr�td||jf��ntjj	|j|�S(	u�
        Returns a path located under the ``.dist-info`` directory. Returns a
        string representing the path.

        :parameter path: a ``'/'``-separated path relative to the
                         ``.dist-info`` directory or an absolute path;
                         If *path* is an absolute path and doesn't start
                         with the ``.dist-info`` directory path,
                         a :class:`DistlibException` is raised
        :type path: str
        :rtype: str
        iiNiu;dist-info file %r does not belong to the %r %s distributionu+invalid path for a dist-info file: %r at %ri����i����(
ufinduosusepusplitupathuDistlibExceptionunameuversionu
DIST_FILESujoin(uselfupathudistinfo_dirname((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_distinfo_files"u'InstalledDistribution.get_distinfo_fileccs}tjj|j�}xa|j�D]S\}}}tjj|�s[tjj||�}n|j|j�r"|Vq"q"WdS(u�
        Iterates over the ``RECORD`` entries and returns paths for each line if
        the path is pointing to a file located in the ``.dist-info`` directory
        or one of its subdirectories.

        :returns: iterator of paths
        N(uosupathudirnameu_get_recordsuisabsujoinu
startswith(uselfubaseupathuchecksumusize((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyulist_distinfo_files+su)InstalledDistribution.list_distinfo_filescCst|t�o|j|jkS(N(u
isinstanceuInstalledDistributionupath(uselfuother((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__eq__;suInstalledDistribution.__eq__NF(u__name__u
__module__u__qualname__u__doc__uhasheruNoneu__init__u__repr__u__str__u_get_recordsucached_propertyuexportsuread_exportsu
write_exportsuget_resource_pathulist_installed_filesuFalseuwrite_installed_filesucheck_installed_filesushared_locationsuwrite_shared_locationsuget_distinfo_resourceuget_distinfo_fileulist_distinfo_filesu__eq__uobjectu__hash__(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuInstalledDistributions(
##	cs�|EeZdZdZdZiZd�fdd�Zdd�Z	dd�Z
dd	�Zd
d�Zdd
�Z
ddd�Zdd�ZejZ�S(uEggInfoDistributionuCreated with the *path* of the ``.egg-info`` directory or file provided
    to the constructor. It reads the metadata contained in the file itself, or
    if the given path happens to be a directory, the metadata is read from the
    file ``PKG-INFO`` under that directory.cs�dd�}||_||_|rk|jrk||jjkrk|jj|j}|||j|j�nG|j|�}|||j|j�|r�|jr�|jj|�nt	t
|�j|||�dS(NcSs%||_|j�|_||_dS(N(unameulowerukeyuversion(usunuv((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuset_name_and_versionMs	u:EggInfoDistribution.__init__.<locals>.set_name_and_version(upathu	dist_pathu_cache_enabledu
_cache_eggumetadataunameuversionu
_get_metadatauaddusuperuEggInfoDistributionu__init__(uselfupathuenvuset_name_and_versionumetadata(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__init__Ls		!uEggInfoDistribution.__init__c
s�d}dd���fdd�}|jd�r!tjj|�r�tjj|dd�}td|d	d
�}tjj|dd�}||�}q�tj|�}t	|j
d�jd
��}td|d	d
�}y(|j
d�}	�|	jd��}Wq�tk
rd}Yq�Xn�|jd�r�tjj|�r{tjj|d�}tjj|d�}||�}ntd|d	d
�}nt
d|��|r�|j|�n|S(NcSs�g}|j�}x�|D]�}|j�}|jd�rNtjd|�Pnt|�}|svtjd|�qn|jr�tjd�n|js�|j|j	�qdj
dd�|jD��}|jd|j	|f�qW|S(	u�Create a list of dependencies from a requires.txt file.

            *data*: the contents of a setuptools-produced requires.txt file.
            u[u.Unexpected line: quitting requirement scan: %ru#Not recognised as a requirement: %ru4extra requirements in requires.txt are not supportedu, css|]}d|VqdS(u%s%sN((u.0uc((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu	<genexpr>{suQEggInfoDistribution._get_metadata.<locals>.parse_requires_data.<locals>.<genexpr>u%s (%s)(u
splitlinesustripu
startswithuloggeruwarninguparse_requirementuextrasuconstraintsuappendunameujoin(udataureqsulinesulineurucons((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuparse_requires_datads&
			u>EggInfoDistribution._get_metadata.<locals>.parse_requires_datacsSg}y4tj|dd��}�|j��}WdQXWntk
rNYnX|S(u�Create a list of dependencies from a requires.txt file.

            *req_path*: the path to a setuptools-produced requires.txt file.
            uruutf-8N(ucodecsuopenureaduIOError(ureq_pathureqsufp(uparse_requires_data(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuparse_requires_paths
u>EggInfoDistribution._get_metadata.<locals>.parse_requires_pathu.egguEGG-INFOuPKG-INFOupathuschemeulegacyurequires.txtuEGG-INFO/PKG-INFOuutf8ufileobjuEGG-INFO/requires.txtuutf-8u	.egg-infou,path must end with .egg-info or .egg, got %r(uNoneuendswithuosupathuisdirujoinuMetadatau	zipimportuzipimporteruStringIOuget_dataudecodeuIOErroruDistlibExceptionuadd_requirements(
uselfupathurequiresuparse_requires_pathu	meta_pathumetadataureq_pathuzipfufileobjudata((uparse_requires_datau5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
_get_metadataas:

u!EggInfoDistribution._get_metadatacCsd|j|j|jfS(Nu!<EggInfoDistribution %r %s at %r>(unameuversionupath(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__repr__�suEggInfoDistribution.__repr__cCsd|j|jfS(Nu%s %s(unameuversion(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__str__�suEggInfoDistribution.__str__cCs�g}tjj|jd�}tjj|�r�x`|j�D]O\}}}||kr^q=ntjj|�s=|j|dddf�q=q=Wn|S(u�
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        uinstalled-files.txtuexistsTF(uosupathujoinuexistsulist_installed_filesuappenduTrueuFalse(uselfu
mismatchesurecord_pathupathu_((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyucheck_installed_files�s	#u)EggInfoDistribution.check_installed_filesc
Cs8dd�}dd�}tjj|jd�}g}tjj|�r4tj|ddd���}x�|D]�}|j�}tjjtjj|j|��}tjj|�s�tj	d	|�|j
d
�r�qjq�ntjj|�sj|j|||�||�f�qjqjWWdQX|j|ddf�n|S(u�
        Iterates over the ``installed-files.txt`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: a list of (path, hash, size)
        c
Ss@t|d�}z|j�}Wd|j�Xtj|�j�S(Nurb(uopenureaducloseuhashlibumd5u	hexdigest(upathufucontent((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_md5�s
u6EggInfoDistribution.list_installed_files.<locals>._md5cSstj|�jS(N(uosustatust_size(upath((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu_size�su7EggInfoDistribution.list_installed_files.<locals>._sizeuinstalled-files.txturuencodinguutf-8uNon-existent file: %su.pycu.pyoN(u.pycu.pyo(uosupathujoinuexistsucodecsuopenustripunormpathuloggeruwarninguendswithuisdiruappenduNone(uselfu_md5u_sizeurecord_pathuresultufulineup((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyulist_installed_files�s"
$	/u(EggInfoDistribution.list_installed_filesccs�tjj|jd�}d}tj|ddd���}x�|D]}|j�}|dkrjd}q@n|s@tjjtjj|j|��}|j	|j�r�|r�|Vq�|Vq�q@q@WWdQXdS(	u
        Iterates over the ``installed-files.txt`` entries and returns paths for
        each line if the path is pointing to a file located in the
        ``.egg-info`` directory or one of its subdirectories.

        :parameter absolute: If *absolute* is ``True``, each returned path is
                          transformed into a local absolute path. Otherwise the
                          raw value from ``installed-files.txt`` is returned.
        :type absolute: boolean
        :returns: iterator of paths
        uinstalled-files.txturuencodinguutf-8u./NTF(
uosupathujoinuTrueucodecsuopenustripuFalseunormpathu
startswith(uselfuabsoluteurecord_pathuskipufulineup((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyulist_distinfo_files�s
$u'EggInfoDistribution.list_distinfo_filescCst|t�o|j|jkS(N(u
isinstanceuEggInfoDistributionupath(uselfuother((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__eq__suEggInfoDistribution.__eq__TNF(u__name__u
__module__u__qualname__u__doc__uTrueu	requestedushared_locationsuNoneu__init__u
_get_metadatau__repr__u__str__ucheck_installed_filesulist_installed_filesuFalseulist_distinfo_filesu__eq__uobjectu__hash__(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuEggInfoDistributionCsK&cBs�|EeZdZdZdd�Zdd�Zddd�Zdd	�Zd
d�Z	dd
d�Z
ddd�Zdd�Z
dd�ZdS(uDependencyGraphu�
    Represents a dependency graph between distributions.

    The dependency relationships are stored in an ``adjacency_list`` that maps
    distributions to a list of ``(other, label)`` tuples where  ``other``
    is a distribution and the edge is labeled with ``label`` (i.e. the version
    specifier, if such was provided). Also, for more efficient traversal, for
    every distribution ``x``, a list of predecessors is kept in
    ``reverse_list[x]``. An edge from distribution ``a`` to
    distribution ``b`` means that ``a`` depends on ``b``. If any missing
    dependencies are found, they are stored in ``missing``, which is a
    dictionary that maps distributions to a list of requirements that were not
    provided by any other distributions.
    cCsi|_i|_i|_dS(N(uadjacency_listureverse_listumissing(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__init__#s		uDependencyGraph.__init__cCsg|j|<g|j|<dS(u�Add the *distribution* to the graph.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        N(uadjacency_listureverse_list(uselfudistribution((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuadd_distribution(s
u DependencyGraph.add_distributioncCsH|j|j||f�||j|krD|j|j|�ndS(u�Add an edge from distribution *x* to distribution *y* with the given
        *label*.

        :type x: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type y: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type label: ``str`` or ``None``
        N(uadjacency_listuappendureverse_list(uselfuxuyulabel((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuadd_edge2s
uDependencyGraph.add_edgecCs3tjd||�|jj|g�j|�dS(u
        Add a missing *requirement* for the given *distribution*.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        :type requirement: ``str``
        u
%s missing %rN(uloggerudebugumissingu
setdefaultuappend(uselfudistributionurequirement((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuadd_missingAsuDependencyGraph.add_missingcCsd|j|jfS(Nu%s %s(unameuversion(uselfudist((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
_repr_distLsuDependencyGraph._repr_disticCs�|j|�g}x�|j|D]�\}}|j|�}|dk	rZd||f}n|jd|t|��|j||d�}|jd�}|j|dd��q Wdj|�S(uPrints only a subgraphu%s [%s]u    iu
N(	u
_repr_distuadjacency_listuNoneuappendustru	repr_nodeusplituextendujoin(uselfudistuleveluoutputuotherulabelu	suboutputusubs((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu	repr_nodeOsuDependencyGraph.repr_nodecCsRg}|jd�x�|jj�D]�\}}t|�dkrX|rX|j|�nx`|D]X\}}|dk	r�|jd|j|j|f�q_|jd|j|jf�q_Wq#W|rAt|�dkrA|jd�|jd�|jd�x/|D]'}|jd|j�|jd	�qW|jd
�n|jd
�dS(u9Writes a DOT output for the graph to the provided file *f*.

        If *skip_disconnected* is set to ``True``, then all distributions
        that are not dependent on any other distribution are skipped.

        :type f: has to support ``file``-like operations
        :type skip_disconnected: ``bool``
        udigraph dependencies {
iu"%s" -> "%s" [label="%s"]
u
"%s" -> "%s"
usubgraph disconnected {
ulabel = "Disconnected"
ubgcolor = red
u"%s"u
u}
N(uwriteuadjacency_listuitemsulenuappenduNoneuname(uselfufuskip_disconnectedudisconnectedudistuadjsuotherulabel((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuto_dot\s&	
	%



uDependencyGraph.to_dotcsg}i}x1|jj�D] \}}|dd�||<qWx�g�xGt|j��dd�D])\}}|sf�j|�||=qfqfW�s�Pnx7|j�D])\}}�fdd�|D�||<q�Wtjddd��D��|j��qC|t|j��fS(ua
        Perform a topological sort of the graph.
        :return: A tuple, the first element of which is a topologically sorted
                 list of distributions, and the second element of which is a
                 list of distributions that cannot be sorted because they have
                 circular dependencies and so form a cycle.
        Ncs.g|]$\}}|�kr||f�qS(((u.0udur(u	to_remove(u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
<listcomp>�s	u4DependencyGraph.topological_sort.<locals>.<listcomp>uMoving to result: %scSs&g|]}d|j|jf�qS(u%s (%s)(unameuversion(u.0ud((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
<listcomp>�s	(uadjacency_listuitemsulistuappenduloggerudebuguextendukeys(uselfuresultualistukuv((u	to_removeu5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyutopological_sort|s$)
!	u DependencyGraph.topological_sortcCsIg}x3|jj�D]"\}}|j|j|��qWdj|�S(uRepresentation of the graphu
(uadjacency_listuitemsuappendu	repr_nodeujoin(uselfuoutputudistuadjs((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu__repr__�suDependencyGraph.__repr__NT(u__name__u
__module__u__qualname__u__doc__u__init__uadd_distributionuNoneuadd_edgeuadd_missingu
_repr_distu	repr_nodeuTrueuto_dotutopological_sortu__repr__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuDependencyGraphs

 uDependencyGraphudefaultcCs�t|�}t�}i}xv|D]n}|j|�xX|jD]M}t|�\}}tjd|||�|j|g�j||f�q?Wq"Wx7|D]/}|j	|j
B|jB|jB}x|D]}	y|j
|	�}
WnAtk
r"tjd|	�|	j�d}|j
|�}
YnX|
j}d}||kr�xl||D]]\}}y|
j|�}
Wntk
r�d}
YnX|
rI|j|||	�d}PqIqIWn|s�|j||	�q�q�Wq�W|S(u6Makes a dependency graph from the given distributions.

    :parameter dists: a list of distributions
    :type dists: list of :class:`distutils2.database.InstalledDistribution` and
                 :class:`distutils2.database.EggInfoDistribution` instances
    :rtype: a :class:`DependencyGraph` instance
    uAdd to provided: %s, %s, %su+could not read version %r - using name onlyiFT(u
get_schemeuDependencyGraphuadd_distributionuprovidesuparse_name_and_versionuloggerudebugu
setdefaultuappendurun_requiresu
meta_requiresubuild_requiresudev_requiresumatcheruUnsupportedVersionErroruwarningusplitukeyuFalseumatchuadd_edgeuTrueuadd_missing(udistsuschemeugraphuprovidedudistupunameuversionurequiresurequmatcherumatcheduproviderumatch((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu
make_graph�sD	

'


		
u
make_graphcCs�||kr"td|j��nt|�}|g}|j|}xW|r�|j�}|j|�x1|j|D]"}||krt|j|�qtqtWqGW|jd�|S(u�Recursively generate a list of distributions from *dists* that are
    dependent on *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    u1given distribution %r is not a member of the listi(uDistlibExceptionunameu
make_graphureverse_listupopuappend(udistsudistugraphudeputodoudusucc((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_dependent_dists�s	
	

uget_dependent_distscCs�||kr"td|j��nt|�}g}|j|}x[|r�|j�d}|j|�x1|j|D]"}||kru|j|�ququWqDW|S(u�Recursively generate a list of distributions from *dists* that are
    required by *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    u1given distribution %r is not a member of the listi(uDistlibExceptionunameu
make_graphuadjacency_listupopuappend(udistsudistugraphurequtodoudupred((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyuget_required_dists�s
	
uget_required_distscKsI|jdd�}t|�}||_||_|p9d|_t|�S(uO
    A convenience method for making a dist given just a name and version.
    usummaryuPlaceholder for summaryuPlaeholder for summary(upopuMetadataunameuversionusummaryuDistribution(unameuversionukwargsusummaryumd((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu	make_dists		u	make_dist(5u__doc__u
__future__uunicode_literalsubase64ucodecsu
contextlibuhashlibulogginguosu	posixpathusysu	zipimportuuDistlibExceptionu	resourcesucompatuStringIOuversionu
get_schemeuUnsupportedVersionErrorumetadatauMetadatauMETADATA_FILENAMEuutiluparse_requirementucached_propertyuparse_name_and_versionuread_exportsu
write_exportsu	CSVReaderu	CSVWriteru__all__u	getLoggeru__name__uloggeruEXPORTS_FILENAMEuCOMMANDS_FILENAMEu
DIST_FILESuDISTINFO_EXTuobjectu_CacheuDistributionPathuDistributionuBaseInstalledDistributionuInstalledDistributionuEggInfoDistributionunew_dist_classuold_dist_classuDependencyGraphu
make_graphuget_dependent_distsuget_required_distsu	make_dist(((u5/tmp/pip-zej_zi-build/pip/_vendor/distlib/database.pyu<module>sL4	��7�C��6python3.3/site-packages/pip/_vendor/distlib/__pycache__/index.cpython-33.pyc000064400000051447151733566750022706 0ustar00�
7�ReLc@sddlZddlZddlZddlZddlZddlZyddlmZWn"ek
r�ddl	mZYnXddl
mZddlm
Z
mZmZmZmZmZddlmZmZmZeje�ZdZdZGd	d
�d
e�ZdS(iN(uThreadi(uDistlibException(uHTTPBasicAuthHandleruRequestuHTTPPasswordMgruurlparseubuild_openerustring_types(ucached_propertyuzip_diruServerProxyuhttps://pypi.python.org/pypiupypicBs|EeZdZdZdZd)dd�Zdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
d)dd�Zdd�Zd)d)dddd�Zdd�Zdd�Zdd �Zd)d)d!d"�Zd#d$�Zd%d&�Zd)d'd(�Zd)S(*uPackageIndexuc
    This class represents a package index compatible with PyPI, the Python
    Package Index.
    s.----------ThIs_Is_tHe_distlib_index_bouNdaRY_$cCs|p	t|_|j�t|j�\}}}}}}|sX|sX|sX|dkrntd|j��nd|_d|_d|_d|_	d|_
ttj
d��k}xad
D]Y}	y>tj|	dgd|d	|�}
|
d
kr�|	|_PnWq�tk
rYq�Xq�WWdQXdS(u�
        Initialise an instance.

        :param url: The URL of the index. If not specified, the URL for PyPI is
                    used.
        uhttpuhttpsuinvalid repository: %suwugpg2ugpgu	--versionustdoutustderriN(uhttpuhttps(ugpg2ugpg(u
DEFAULT_INDEXuurluread_configurationuurlparseuDistlibExceptionuNoneupassword_handlerussl_verifierugpgugpg_homeu	rpc_proxyuopenuosudevnullu
subprocessu
check_calluOSError(uselfuurluschemeunetlocupathuparamsuqueryufragusinkusurc((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu__init__$s(
!					
		
uPackageIndex.__init__cCs3ddlm}ddlm}|�}||�S(us
        Get the distutils command for interacting with PyPI configurations.
        :return: the command.
        i(uDistribution(u
PyPIRCCommand(udistutils.coreuDistributionudistutils.configu
PyPIRCCommand(uselfuDistributionu
PyPIRCCommandud((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu_get_pypirc_command@s	u PackageIndex._get_pypirc_commandcCsy|j�}|j|_|j�}|jd�|_|jd�|_|jdd�|_|jd|j�|_dS(u�
        Read the PyPI access configuration as supported by distutils, getting
        PyPI to do the acutal work. This populates ``username``, ``password``,
        ``realm`` and ``url`` attributes from the configuration.
        uusernameupasswordurealmupypiu
repositoryN(u_get_pypirc_commanduurlu
repositoryu_read_pypircugetuusernameupasswordurealm(uselfucucfg((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuread_configurationJsuPackageIndex.read_configurationcCs0|j�|j�}|j|j|j�dS(u�
        Save the PyPI access configuration. You must have set ``username`` and
        ``password`` attributes before calling this method.

        Again, distutils is used to do the actual work.
        N(ucheck_credentialsu_get_pypirc_commandu
_store_pypircuusernameupassword(uselfuc((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyusave_configurationYs
uPackageIndex.save_configurationcCs�|jdks|jdkr-td��nt�}t|j�\}}}}}}|j|j||j|j�t	|�|_
dS(up
        Check that ``username`` and ``password`` have been set, and raise an
        exception if not.
        u!username and password must be setN(uusernameuNoneupassworduDistlibExceptionuHTTPPasswordMgruurlparseuurluadd_passwordurealmuHTTPBasicAuthHandlerupassword_handler(uselfupmu_unetloc((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyucheck_credentialses	!uPackageIndex.check_credentialscCs�|j�|j�|j�}d|d<|j|j�g�}|j|�}d|d<|j|j�g�}|j|�S(uq
        Register a distribution on PyPI, using the provided metadata.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the distribution to be
                         registered.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        uverifyu:actionusubmit(ucheck_credentialsuvalidateutodictuencode_requestuitemsusend_request(uselfumetadataudurequesturesponse((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuregisterqs




uPackageIndex.registercCscxR|j�}|sPn|jd�j�}|j|�tjd||f�q|j�dS(ur
        Thread runner for reading lines of from a subprocess into a buffer.

        :param name: The logical name of the stream (used for logging only).
        :param stream: The stream to read from. This will typically a pipe
                       connected to the output stream of a subprocess.
        :param outbuf: The list to append the read lines to.
        uutf-8u%s: %sN(ureadlineudecodeurstripuappenduloggerudebuguclose(uselfunameustreamuoutbufus((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu_reader�s	
uPackageIndex._readercCs�|jdddg}|jr7|jd|jg�n|dk	r\|jdddg�ntj�}tjj|tjj	|�d�}|jd	d
d|d||g�t
jd
dj|��||fS(u�
        Return a suitable command for signing a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The signing command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        u--status-fdu2u--no-ttyu	--homediru--batchu--passphrase-fdu0u.ascu
--detach-signu--armoru--local-useru--outputuinvoking: %su N(ugpgugpg_homeuextenduNoneutempfileumkdtempuosupathujoinubasenameuloggerudebug(uselfufilenameusigneru
sign_passworducmdutdusf((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuget_sign_command�s	%uPackageIndex.get_sign_commandc	Cs
itjd6tjd6}|dk	r6tj|d<ng}g}tj||�}td|jdd|j|f�}|j�td|jdd|j|f�}|j�|dk	r�|j	j
|�|j	j�n|j�|j
�|j
�|j||fS(u�
        Run a command in a child process , passing it any input data specified.

        :param cmd: The command to run.
        :param input_data: If specified, this must be a byte string containing
                           data to be sent to the child process.
        :return: A tuple consisting of the subprocess' exit code, a list of
                 lines read from the subprocess' ``stdout``, and a list of
                 lines read from the subprocess' ``stderr``.
        ustdoutustderrustdinutargetuargsN(u
subprocessuPIPEuNoneuPopenuThreadu_readerustdoutustartustderrustdinuwriteucloseuwaitujoinu
returncode(	uselfucmdu
input_dataukwargsustdoutustderruput1ut2((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyurun_command�s&

$
$



uPackageIndex.run_commandc	Csb|j|||�\}}|j||jd��\}}}|dkr^td|��n|S(u}
        Sign a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The absolute pathname of the file where the signature is
                 stored.
        uutf-8iu&sign command failed with error code %s(uget_sign_commandurun_commanduencodeuDistlibException(	uselfufilenameusigneru
sign_passworducmdusig_fileurcustdoutustderr((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu	sign_file�s	
uPackageIndex.sign_fileusdistusourcecCs�|j�tjj|�s/td|��n|j�|j�}d}|r�|jsjt	j
d�q�|j|||�}nt|d��}	|	j
�}
WdQXtj|
�j�}tj|
�j�}|jidd6dd6|d	6|d
6|d6|d6�d
tjj|�|
fg}
|r�t|d��}	|	j
�}WdQX|
jdtjj|�|f�tjtjj|��n|j|j�|
�}|j|�S(u�
        Upload a release file to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the file to be uploaded.
        :param filename: The pathname of the file to be uploaded.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param filetype: The type of the file being uploaded. This is the
                        distutils command which produced that file, e.g.
                        ``sdist`` or ``bdist_wheel``.
        :param pyversion: The version of Python which the release relates
                          to. For code compatible with any Python, this would
                          be ``source``, otherwise it would be e.g. ``3.2``.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        u
not found: %su)no signing program available - not signedurbNufile_uploadu:actionu1uprotcol_versionufiletypeu	pyversionu
md5_digestu
sha256_digestucontentu
gpg_signature(ucheck_credentialsuosupathuexistsuDistlibExceptionuvalidateutodictuNoneugpguloggeruwarningu	sign_fileuopenureaduhashlibumd5u	hexdigestusha256uupdateubasenameuappendushutilurmtreeudirnameuencode_requestuitemsusend_request(uselfumetadataufilenameusigneru
sign_passwordufiletypeu	pyversionudusig_fileufu	file_datau
md5_digestu
sha256_digestufilesusig_dataurequest((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuupload_file�s<

		
uPackageIndex.upload_filec
Cs�|j�tjj|�s/td|��ntjj|d�}tjj|�sitd|��n|j�|j|j	}}t
|�j�}d	d|fd|fg}d||fg}|j||�}	|j
|	�S(
u2
        Upload documentation to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the documentation to be
                         uploaded.
        :param doc_dir: The pathname of the directory which contains the
                        documentation. This should be the directory that
                        contains the ``index.html`` for the documentation.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        unot a directory: %ru
index.htmlu
not found: %ru:actionu
doc_uploadunameuversionucontent(u:actionu
doc_upload(ucheck_credentialsuosupathuisdiruDistlibExceptionujoinuexistsuvalidateunameuversionuzip_dirugetvalueuencode_requestusend_request(
uselfumetadataudoc_dirufnunameuversionuzip_dataufieldsufilesurequest((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuupload_documentations

u!PackageIndex.upload_documentationcCsj|jdddg}|jr7|jd|jg�n|jd||g�tjddj|��|S(u�
        Return a suitable command for verifying a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: The verifying command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        u--status-fdu2u--no-ttyu	--homediru--verifyuinvoking: %su (ugpgugpg_homeuextenduloggerudebugujoin(uselfusignature_filenameu
data_filenameucmd((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuget_verify_command5s	uPackageIndex.get_verify_commandcCsk|jstd��n|j||�}|j|�\}}}|dkratd|��n|dkS(u\
        Verify a signature for a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: True if the signature was verified, else False.
        u0verification unavailable because gpg unavailableiiu(verify command failed with error code %s(ii(ugpguDistlibExceptionuget_verify_commandurun_command(uselfusignature_filenameu
data_filenameucmdurcustdoutustderr((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuverify_signatureGs
	
uPackageIndex.verify_signaturecCs|d
kr"d
}tjd�nMt|ttf�rF|\}}nd}tt|��}tjd|�t|d���}|j	t
|��}z�|j�}	d}
d}d}d}
d|	kr�t|	d	�}n|r�||
|
|�nxr|j
|
�}|sPn|t|�7}|j|�|rD|j|�n|
d7}
|r�||
|
|�q�q�Wd
|j�XWd
QX|dkr�||kr�td||f��n|r|j�}||kr�td||||f��ntjd
|�nd
S(u
        This is a convenience method for downloading a file from an URL.
        Normally, this will be a file from the index, though currently
        no check is made for this (i.e. a file can be downloaded from
        anywhere).

        The method is just like the :func:`urlretrieve` function in the
        standard library, except that it allows digest computation to be
        done during download and checking that the downloaded data
        matched any expected value.

        :param url: The URL of the file to be downloaded (assumed to be
                    available via an HTTP GET request).
        :param destfile: The pathname where the downloaded file is to be
                         saved.
        :param digest: If specified, this must be a (hasher, value)
                       tuple, where hasher is the algorithm used (e.g.
                       ``'md5'``) and ``value`` is the expected value.
        :param reporthook: The same as for :func:`urlretrieve` in the
                           standard library.
        uNo digest specifiedumd5uDigest specified: %suwbi iiucontent-lengthuContent-LengthNu1retrieval incomplete: got only %d out of %d bytesu.%s digest mismatch for %s: expected %s, got %suDigest verified: %si����(uNoneuloggerudebugu
isinstanceulistutupleugetattruhashlibuopenusend_requestuRequestuinfouintureadulenuwriteuupdateucloseuDistlibExceptionu	hexdigest(uselfuurludestfileudigestu
reporthookudigesteruhasherudfpusfpuheadersu	blocksizeusizeureadublocknumublockuactual((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu
download_file[sV

uPackageIndex.download_filecCsWg}|jr"|j|j�n|jr>|j|j�nt|�}|j|�S(u�
        Send a standard library :class:`Request` to PyPI and return its
        response.

        :param req: The request to send.
        :return: The HTTP response from PyPI (a standard library HTTPResponse).
        (upassword_handleruappendussl_verifierubuild_openeruopen(uselfurequhandlersuopener((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyusend_request�s		uPackageIndex.send_requestcCs<g}|j}xy|D]q\}}t|ttf�sC|g}nxA|D]9}|jd|d|jd�d|jd�f�qJWqWxG|D]?\}}	}
|jd|d||	fjd�d|
f�q�W|jd|ddf�dj|�}d|}i|d6tt|��d	6}
t	|j
||
�S(
u&
        Encode fields and files for posting to an HTTP server.

        :param fields: The fields to send as a list of (fieldname, value)
                       tuples.
        :param files: The files to send as a list of (fieldname, filename,
                      file_bytes) tuple.
        s--u)Content-Disposition: form-data; name="%s"uutf-8su8Content-Disposition: form-data; name="%s"; filename="%s"s
smultipart/form-data; boundary=uContent-typeuContent-length(uboundaryu
isinstanceulistutupleuextenduencodeujoinustrulenuRequestuurl(uselfufieldsufilesupartsuboundaryukuvaluesuvukeyufilenameuvalueubodyuctuheaders((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuencode_request�s4	


uPackageIndex.encode_requestcCsbt|t�ri|d6}n|jdkrIt|jdd�|_n|jj||p^d�S(Nunameutimeoutg@uand(u
isinstanceustring_typesu	rpc_proxyuNoneuServerProxyuurlusearch(uselfutermsuoperator((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyusearch�s
uPackageIndex.searchN(u__name__u
__module__u__qualname__u__doc__uboundaryuNoneu__init__u_get_pypirc_commanduread_configurationusave_configurationucheck_credentialsuregisteru_readeruget_sign_commandurun_commandu	sign_fileuupload_fileuupload_documentationuget_verify_commanduverify_signatureu
download_fileusend_requestuencode_requestusearch(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyuPackageIndexs*
#4M+uPackageIndex(uhashlibulogginguosushutilu
subprocessutempfileu	threadinguThreaduImportErrorudummy_threadinguuDistlibExceptionucompatuHTTPBasicAuthHandleruRequestuHTTPPasswordMgruurlparseubuild_openerustring_typesuutilucached_propertyuzip_diruServerProxyu	getLoggeru__name__uloggeru
DEFAULT_INDEXu
DEFAULT_REALMuobjectuPackageIndex(((u2/tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu<module>s 
.python3.3/site-packages/pip/_vendor/distlib/w32.exe000064400000252000151733566750016046 0ustar00MZ����@���	�!�L�!This program cannot be run in DOS mode.

$�4�m�U�>�U�>�U�>+>�U�>�->�U�>�->�U�>�->�U�>�->�U�>�U�>�U�>�->�U�>�->�U�>�->�U�>Rich�U�>PEL1�R�	���'�@�2�@���(0�P�D	��H�@�H.textڹ� `.rdata2#�$�@@.data�,�@�.rsrc�P0R�@@.reloc�D@BVh��@�<�@��pA��u��t7h��@V�8�@�pA��th�jhh�@�t$j��^�V��@3�^�U����A3ʼnE��}u4�EP�u������h�hP��/������P�h�����j��@�M�3��y�ËL$W3��F��0P��APQ�����t��A�	;u���H�D$+��D0���}̋�_�U���(Wh�@�E�3�hhAP�}��}��
3�;���h �@Q�/���jW�u��4�u��4�E�������$;ljE�}�}�SVW�u��u��	�u��Sj�u�D�u���5����� ;�tj��Y�}��}+�E����~�V�
�E�E��;�Y�E�}�}�W�u��u���u�Vj�u����u��������3�����h<�@P�f�����+]�j]�Y�u�}�����}��,�+u�+u�+�y3�jV�u��:�u�SjW�|��3�;����h`�@P�	�����$�D>�^[�f��|�@f;tH;�s���E�u����E�Y_��V���@�&jjjVP�t$P�H�@��u�4�@��uF��^Ã|$u�lA��t	jP��@3�@�U�����SVW3�WW�,�@�؍D$Pjp�D$pPj	S�(�@��t�|$pu3�@�3�h��@P�9�����$�0YYjp�D$lPj	S��@h��@P����jD^V�D$,WP�S���t$ �50�@j���P�D$\�����$��@P����YYj���P�D$`���$��@P���YYj��P�D$d�����$��@P���YYjh�@�D$T�@�@�D$P�D$$PWWWjWW�uW�$�@�uh�@P�`����D$$���t$�lAS��@�t$�L�@j��t$��@�D$P�t$� �@h8�@P����YY�t$��@�U��$p������A3ʼn��SVW��@�8"t� �@�"@��QP�3�YY;�u	�E��@��p���P��Y��tF���u�u�h�hAVW�D�@�=hA"t�u��	H�E�iAH�]���E�P��AP������3�;����$\�@P�M���Y��Y��;�s���
t��
tA;�r����3�����ht�@P����YY���P�Y��tF�>u�3��>#h��@��P���YY���P��Y��tF���u�3��>!h��@��P���YY���P�Y��tF���u�ƍP�@��u�+‹��ÍH�@��u�+��ȋE��P�@��u�+���|8jW�4��3�����h�@P�T����u��u�Vh8�@WWS�W��,S�����%����;
Au���Z��U��W��W�T�@�u�P�@�����`�w��t�_]Ë�U���n�u��5A�h��Ѓ�]Ë�U��h��@�P�@��th��@P�8�@��t�u��]Ë�U��u����Y�u��@�j�Y�j��YË�U��V������t�Ѓ�;ur�^]Ë�U��V�u3����u���t�у�;ur�^]Ë�U��=�,Ath�,A�Y��t
�u��,AY��hh�@hP�@���YY��uBh5@�e�H�@�$L�@�c����=�,AYth�,A�\Y��tjjj��,A3�]�jh�@�j��Y�e�3�C90A���,A�E�(A�}���5�,A�Y���}؅�tx�5�,A�Y��u܉}�u���u�;�rW��9t�;�rJ�6���������5�,A�����5�,A���9}�u9E�t�}�}؉E��u܋}��hx�@�l�@�_���Yh��@�|�@�O���Y�E�������}u(�0Aj�Y�u���3�C�}tj��Y��!Ë�U��jj�u������]Ë�U��jj�u�����]�jjj������jjj�����Ë�V����V�#V�B#V�V�'#V�#V� V�V�|h�@�2��$�A^Ë�U��EPj�u�u�u�u��%��]Ë�U��EV���F��uc��F�Hl��Hh�N�;
�	At�
�A�Hpu�80��F;�At�F�
�A�Hpu�(�F�F�@pu�Hp�F�
���@�F��^]���U����u�M��f����E�~�E�Pj�u�:0�������M�H���}�t�M��ap���U��=0Au�E�
�	A�A��]�j�u���YY]�jh �@��u��tu�=�,AuCj��Y�e�V�0Y�E�t	VP��0YY�E�������}�u7�u�
j��Y�Vj�5TA�X�@��u�Y��4�@P�	�Y���U��Q�e�V�E�P�u�u��:�����u9E�t���t
��M����^��jh@�@�B�e��u;5�,Aw"j�Y�e�V�7Y�E��E������	�E��N�j�	YË�U��V�u�����SW�=\�@�=TAu�j�Rh�����YY��,A��u��t���3�@P���uV�S���Y��u��uF�����Vj�5TA�׋؅�u.j^9\At�u� Y��t�u�{�����0��0_��[�V� Y���3�^]�����̍B�[Í�$�d$3��D$S����T$��t�
��:�tτ�tQ��u��W���V؋
����~����3������3�3ƃ����u%�t�%u���u�^_[3�ËB�:�t6��t�:�t'��t��:�t��t�:�t��t��^_�B�[ÍB�^_[ÍB�^_[ÍB�^_[��̋D$S��tR�T$3ۊ\$��t�
��2�tr��t2��u��rW����ߋ�����_��t�
��2�t@��u�[�r�
3˿���~���3σ����t�J�2�t#2�t��2�t2�t��_�B�[ÍB�_[ÍB�_[ÍB�_[�jh`�@�3ۉ]�3��};���;�u�C�SSSSS����3��y3��u;���;�t�3�8��;�t��n=�E;�u
���ʉ]�8u ���j��E�PhA�p>���P�uVW�_:���E��E������	�E��?�u��9YË�U��VW�}3�;�u�j_VVVVV�8������$h��u�u�������;�t3���V�_^]Ë�U����MS�]VW3��M��]�9}t!9}t;�u�$WWWW�W���3�_^[�Ëu;�t
��3�u9Ev!���tSWQ�uG��;�t���3�u9Ew��}�}�F�}��t�F�E���E������FtD�F��t=�5��;�r��;}���W�6�u��u��{F)~>}�+߃�)}��}��;]�rh�}�t����3�;�v	���u����u��+������;�w��;E���P�u�V��EYP��D�����������E�+�)E��(V��=Y������}�tN�M��E���FK�M��E�������E���3��}�t�uV�u�/F���VVVV�"V�r����}�t�uj�u�F���p�"3�PPPPP�E����N ��+�3�u�=����N��jh��@�3��u�9ut79ut29uu5�}�t�uV�u�E����VVVVV���3���u�6Y�u��u�u�u�u�u������E��E�������E���u��6YË�U��u�u�uj��u�R�����]Ë�U���SW�}3�;�u �{SSSSS�������fW�/D9_Y�E�}�_jSP�H��;ÉE�|ӋW��u+G�.��OV��+�u��tA�U��u������A�����D2�t��;�s��:
u�E�3�B;�r�9]�u�E�����x������G���W;�u�]���]��u�+��������A�E����D0�tyjj�u��EG��;E�u �G�M��	�8
u�E@;�r�G �@j�u��u��G����}���:�9Ew�O��t��t�G�E��D0t�E�E)E��E�M��^_[��jh��@�63�3�9u��;�u���VVVVV�_�����'�u�p4Y�u��u����Y�E��E������	�E��$�u�4YË�U��V�u�F��u�s����g���}�FuV����E�eYV��F�FY��y��F��t�t�u�F�u�uV��AYP��E3Ƀ������I��^]�jh��@�>3�3�9u��;�u���VVVVV�g�����>�};�t
��t��u�u�g3Y�u�W�u�u�������E��E������	�E���u�3Y�U��SV�uW3���;�u�`WWWWW���
����B�F�t7V��EV����HV�AP�H����}����F;�t
P�@���Y�~�~��_^[]�jh��@�B�M�3��u3�;���;�u��
�WWWWW�e
������F@t�~�E��E�V�f2Y�}�V�*���Y�E��E�������ՋuV�2YË�U��=<Au��	�u�9h���YY]�jXh�@�3��u��E�P�`�@j�_�}��MZf9@u8�<@��@PEu'�f9�@u��t@v3�9��@���M���u�3�CS�$Y��uj�X���Y���uj�G���Y�N�]���@��}j��Y��@��,A�]K�4A�J��}j��Y�H��}j	�~�YS�6�Y;�tP�l�Y�G�]�t�M��j
YQPVh@���E�9u�uP�����}��5�E��	�M�PQ�YYËe�E܉E�}�uP�����E������E��3�@Ëe��E��������q���K�x�����U���(�HA�
DA�@A�<A�58A�=4Af�`Af�
TAf�0Af�,Af�%(Af�-$A��XA�E�LA�E�PA�E�\A������A�PA�LA�@A	��DA�A������A������p�@��Aj�KYj�l�@h��@�h�@�=�Auj�kKYh	���@P�d�@�Ë�U��V�5 A�5t�@�օ�t!�A���tP�5 A��Ѕ�t����'���@V�P�@��uV�Q�Y��th��@P�8�@��t�u�ЉE�E^]�j���YË�U��V�5 A�5t�@�օ�t!�A���tP�5 A��Ѕ�t����'���@V�P�@��uV���Y��th�@P�8�@��t�u�ЉE�E^]�x�@���V�5 A�t�@��u�5hA�e���Y��V�5 A�|�@��^áA���tP�5pA�;���Y�Ѓ
A�� A���tP���@�
 A��ejh(�@����@V�P�@��uV��Y�E�u�F\�@3�G�~��t$h��@P�8�@�Ӊ��h�@�u�Ӊ���~pƆ�CƆKC�Fh�Aj
�Y�e��vh���@�E������>j�Y�}��E�Fl��u��	A�Fl�vl��Y�E�������+�3�G�uj
��Y�j��YË�VW�4�@�5A������Ћ�uNhj�*I��YY��t:V�5A�5lA���Y�Ѕ�tjV����YY���@�N���	V�G�Y3�W���@_��^Ë�V������uj���Y��^�jhP�@�.�u�����F$��tP��Y�F,��tP���Y�F4��tP���Y�F<��tP���Y�F@��tP���Y�FD��tP��Y�FH��tP��Y�F\=�@tP��Yj
�Y�e��~h��tW���@��u���AtW�h�Y�E������Wj�RY�E��~l��t#W��Y;=�	At���At�?uW��Y�E������V��Y�k
��uj
�!YËuj�YË�VW���@V�P�@��uV�v�Y�����^�58�@h8�@W��h,�@W�dA��h �@W�hA��h�@W�lA�փ=dA�5|�@�pAt�=hAt
�=lAt��u$�t�@�hA���@�dA�)@�5lA�pA�x�@� A������5hAP�օ������5dA�����5hA�dA�����5lA�hA���5pA�lA������pA�W��tehv+@�5dA�=���Y�УA���tHhj�LF��YY��t4V�5A�5lA�
���Y�Ѕ�tjV���YY���@�N��3�@����3�_^Ë�U��QQS�]VW3�3��}�;�(At	G�}���r��wj�IY���4j��IY��u
�=A�����Ah��@�S�xAW�NI����t
VVVVV���h��AVj��A�D�@��u&h��@h�V�I����t3�PPPPP����V�eH@Y��<v8V�XH��;�j��Ah��@+�QP�}G����t3�VVVVV����3�h��@SW��F����t
VVVVV�k���E��4�,ASW�F����t
VVVVV�F��h h��@W�1E���2j�0�@��;�t$���tj�E�P�4�,A�6�GYP�6S���@_^[��j�HY��tj�rHY��u�=Auh��)���h�����YYË�VW3���A�<��Au���A�8h��0���CYY��tF��$|�3�@_^Ã$��A3���S���@V��AW�>��t�~t
W��W���&Y����A|ܾ�A_���t	�~uP�Ӄ���A|�^[Ë�U��E�4��A���@]�jhx�@��3�G�}�3�9TAu���j�;���h���YY�u�4��A9t���nj��BY��;�u�<�3��Qj
�YY�]�9u,h�W�:YY��uW�<�Y���]���>�W�!�Y�E������	�E��m�j
�(���YË�U��EV�4��A�>uP�"���Y��uj��Y�6���@^]Ë�U��E��A]Ë�U���(�A3ʼnE������SjL�����jP��4�������(�����0�������,��������������������������������f������f����f�����f�����f������f�����������E�MDž0�����������I�����Dž����Dž��������p�@j��l�@��(���P�h�@��u��uj�AYh���@P�d�@�M�3�[�,��Ë�U��5�A����Y��t]��j��@Y]�����U��E3�;�AtA��-r�H�wj
X]Ë�A]�D���jY;��#���]��z�����u�hAÃ���g�����u�lAÃ�Ë�U��V����MQ����Y������0^]Ë�U��QSVW�5�,A�O����5�,A���}��?�����YY;�����+ߍC��rwW�D���CY;�sH�;�s���;�rP�u��q@YY��u�G;�r@P�u��[@YY��t1��P�4��Z�Y��,A�u�L���V�A�Y��,A�EY�3�_^[�Ë�Vjj ��?��V�����,A��,A��ujX^Ã&3�^�jh��@��(��e��u���Y�E��E������	�E��(���Ë�U��u��������YH]Ë�V���@���@W��;�s���t�Ѓ�;�r�_^Ë�V���@���@W��;�s���t�Ѓ�;�r�_^Ë�VW3���pA�6�K��Y���(r�_^��������̋�U��M�MZf9t3�]ËA<��8PEu�3ҹf9H�‹�]�����������̋�U��E�H<��ASV�q3�W�D��v�}�H;�r	�X�;�r
B��(;�r�3�_^[]������������̋�U��j�h��@h7@d�P��SVW�A1E�3�P�E�d��e��E�h@�*�������tU�E-@Ph@�P�������t;�@$���Ѓ��E������M�d�
Y_^[��]ËE��3�=��‹�Ëe��E�����3��M�d�
Y_^[��]����h7@d�5�D$�l$�l$+�SVW�A1E�3�P�e�u��E��E������E��E�d�ËM�d�
Y__^[��]Q�������̋�U���S�]V�s35AW��E��E��{���t
�N�38�����N�F�38�����E�@f��M�U�S��[�E�M��t_�I�[�L��D��E��E���t���P&�E���|@G�E��؃��u΀}�t$����t
�N�38�Z���N�V�3:�J���E�_^[��]��E��ɋM�9csm�u)�=�,At h�,A�������t�UjR��,A���M��%�E9XthAW�Ӌ��%�E�M��H����t
�N�38�����N�V�3:����E�H���%�����9S�R���hAW���%����jh��@������@x��t�e����3�@Ëe��E������@�!����h�8@��Y��A�Ë�U��QQV�����F�V\��AW�}��S99t��k����;�r�k��;�s99u���3���t
�X�]���u3����u�`3�@�������N`�M��M�N`�H�����
�A�=�A���;�}$k��~\�d9�=�A��AB߃�;�|�]���~d=��u	�Fd��^=��u	�Fd��N=��u	�Fd��>=��u	�Fd��.=��u	�Fd��=��u	�Fd��=��u�Fd��vdj��Y�~d��`Q�ӋE�Y�F`��[_^�Ë�U��E��A��A��A��A]Ë�U��E�
�AV9Pt��k�u��;�r�k�M^;�s9Pt3�]�5�A�i�Y�j h��@���3��}�}؋]��Lt��jY+�t"+�t+�td+�uD����}؅�u���a��A��A�`�w\���]��������Z�Ã�t<��t+Ht�?����3�PPPPP������뮾�A��A���A��A�
��A��A�E�P���E�Y3��}���9E�uj�d��9E�tP����Y3��E���t
��t��u�O`�MԉG`��u@�Od�M��Gd���u.�
�A�M܋
�A��A�9M�}�M�k��W\�D�E����
���E��������u�wdS�U�Y��]�}؃}�tj��Y�S�U�Y��t
��t��u�EԉG`��u�EЉGd3����Ë�U��E��A]Ë�U��E�A]Ë�U��E�A]�jh�@�����e��u�u���@�E��/�E���E�3�=�����Ëe�}��uj���@�e��E������E�����Ë�U��E�A]Ë�U��5A��Y��t�u��Y��t3�@]�3�]Ë�U��QV�uV�)�E�FY��u�'����	�N ���/�@t
�����"��S3ۨt�^����N���F�F�����F�^�]��u,��� ;�t���@;�u
�u�EJY��uV��IY�FW���F�>�H��N+�I;��N~WP�u��H���E��M�� �F���y�M���t���t�����������A��P
A�@ tjSSQ�N@#ƒ����t%�F�M��3�GW�EP�u�vH���E�9}�t	�N ����E%�_[^�Ë�U��� S3�9]u ���SSSSS��V�����V�uW�};�t!;�u��SSSSS��&�����j�����E�;�w�}�u�E�u�E�B�u�u�P�u�U���E;�t4;�|"�M�x�E���E�PS���YY���t�E�3�9]�\>���HH_^[�Ë�U��QS3�9]u ��SSSSS��������V�uW9]u;�u9]u3��;�t�};�w������u�u�u;}v-�8�E@PVh��@��������uL��8"ue�x�8�\�WVh��@�E�������\>����u�}�u�L�8"u/�B�M���#;�}"����u�+��"SSSSS�����_^[�Ë�U��uj�u�u�u�u������]�-�t"��t��
tHt3�øøøøË�VW��h3��FWP�6&3��ȋ��~�~�~����~�����A���F+ο��@Ou������@Nu�_^Ë�U����A3ʼnE�SW����P�v���@�����3�������@;�r���ƅ���� ��t.�������;�w+�@P��
����j R�s%��C�C��u�j�v�������vPW������Pjj�W[3�S�v������WPW������PW�vS�8Y��DS�v������WPW������Ph�vS�Y��$3���E������t�L���������t�L ���������Ƅ@;�r��V��Dž������3�)���������ЍZ ��w�L�р� ���w�L �р� ���A;�r‹M�_3�[�����jh8�@�
�������A�Gpt�lt�wh��uj ���Y���"��j
��Y�e��wh�u�;5�At6��tV���@��u���AtV���Y��A�Gh�5�A�u�V���@�E������뎋u�j
�|�YË�U���S3�S�M��<���A���u�A���@8]�tE�M��ap��<���u�A���@�ۃ��u�E�@�A��8]�t�E��`p���[�Ë�U��� �A3ʼnE�S�]V�uW�d�����3��};�u�����3���u�3�9��A���E�0=�r���p����d��P���@���R�E�PW���@���3h�CVP�"3�B���{�s9U����}����u������F����h�CVP�L"�M��k�0�u��A�u��*�F��t(�>����E��AD;�FG;�v�}FF�>uыu�E���}��u�r�lj{�C�g���j�C�C���AZf�1Af�0A@@Ju����������L@;�v�FF�~��4����C���@Iu��C�����C�S��s3��ȋ�����{����95A�X������M�_^3�[�����jhX�@��M������}������_h�u�u����E;C�Wh �.Y�؅��F���wh���#S�u���YY�E����u�vh���@��u�Fh=�AtP�e��Y�^hS�=��@��Fp����A��j
�8�Y�e��C�$A�C�(A�C�,A3��E�}f�LCf�EA@��3��E�=}
�L���A@��3��E�=}�����A@��5�A���@��u��A=�AtP���Y��AS���E�������0j
��Y��%���u ���AtS�v��Y�@����e��E���Ã=�,Auj��V���Y��,A3�Ë�U��SV�u���3�W;�to=hAth���;�t^9uZ���;�t9uP�������yWYY���;�t9uP��������WYY�������������YY���;�tD9u@���-�P��������+�P������+�P�w������l��������=�
At9��uP�T�7�E��YY�~P�E���At�;�t9uP� ��Y9_�t�G;�t9uP�	��Y���Mu�V���Y_^[]Ë�U��SV�5��@W�}W�֋����tP�֋����tP�֋����tP�֋����tP�֍_P�E�{��At	���tP�փ{�t
�C��tP�փ��Mu֋���P��_^[]Ë�U��W�}����SV�5��@W�֋����tP�֋����tP�֋����tP�֋����tP�֍_P�E�{��At	���tP�փ{�t
�C��tP�փ��Mu֋���P��^[��_]Å�t7��t3V�0;�t(W�8���Y��tV�E����>Yu���AtV�Y���Y��^�3��jhx�@���E����A�Fpt"�~lt�.��pl��uj �)��Y�����j�F�Y�e��Fl�=�	A�i����E��E�������j�A�Y�u�Ë�U���S�u�M�����]�C=w�E苀��X�u�]�}�E�P�E%�P�9?YY��t�Ej�E��]��E�Y�
3Ɉ]��E�A�E�j�p�p�E�PQ�E�P�E�jP�Q�� ��u8E�t�E�`p�3���E�#E�}�t�M�ap�[�Ë�U��3�9Ej��hP���@�TA��u]�3�@��,A]Ë�U��
�,A��,Ak����U+P��r	��;�r�3�]Ë�U����M�AV�uW��+y������i���D�M�I�M�����S�1��U�V��U��U�]��ut��J��?vj?Z�K;KuB���� s����L��!\�D�	u#�M!��J���L��!����	u�M!Y�]�S�[�M�M�Z�U�Z�R�S�M����J��?vj?Z�]����]���+u��]���j?�uK^;�v��M����J�M�;�v��;�t^�M�q;qu;���� s�����!t�D�Lu!�M!1��K����!����Lu�M!q�M�q�I�N�M�q�I�N�u��]�}�u;����M�ыY�N�^�q�N�q�N;Nu`�L�M���L�� s%�}u�ʻ���M	������D�D	�)�}u�J����M	Y�J���ꍄ��	�E���D0��E����XA�����
�,A�5��@h@��H��SQ�֋
�,A�XA����	P�XA�@�
�,A�����XA�@�HC�XA�H�yCu	�`��XA�x�ueSj�p�֡XA�pj�5TA�X�@�
�,A�XAk���,A+ȍL�Q�HQP�S�E���
�,A;XAv�m��,A��,A�E�XA�=�,A[_^�á�,AV�5�,AW3�;�u4��k�P�5�,AW�5TA���@;�u3��x��,A�5�,A��,Ak�5�,Ah�Aj�5TA�\�@�F;�t�jh hW���@�F;�u�vW�5TA�X�@뛃N��>�~��,A�F����_^Ë�U��QQ�M�ASV�qW3���C��}���i���0Dj?�E�Z�@�@��Ju�j��h��yh�W���@��u�����p�U�;�wC��+���GA�H���������������@���Pǀ��IuˋU��E���O�H�A�J�H�A�d�D3�G�����FC������E�NCu	x�������!P��_^[�Ë�U����M�ASV�uW�}��+Q������i���D�M�O����I;�|9���M�]��U���E�;��;�M���I�M���?vj?Y�M��_;_uC���� s��M��L��!\�D�	u&�M!������M��L��!����	u�M!Y�O�_�Y�O��y�M+�M��}����}��M��O�L1���?vj?_�]���]�[�Y�]�Y�K�Y�K�Y;YuW�L�M���L�� s�}u�ϻ���M	�D�D��� �}u�O����M	Y�����O����	�U�M��D2���L���U�F�B��D2��<3��8�/�])u�N�K��\3��u��N�]�K���?vj?^�E����u���N��?vj?^�O;OuB���� s����t��!\�D�u#�M!��N���L��!����	u�M!Y�]�O�w�q�w�O�q�uu��u��N��?vj?^�M��y�K�{�Y�K�Y�K;KuW�L�M���L�� s�}u�ο���M	9�D�D��� �}u�N����M	y�����N����	�E��D�3�@_^[�Ë�U�����,A�Mk��,A�����M�SI�� VW}����M���
����3���U��
�,A����S�;#U�#��u
���];�r�;�u��,A��S�;#U�#��u
���];�r�;�u[��{u
���];�r�;�u1��,A�	�{u
���];�r�;�u����؉]��u3��	S�:���Y�K��C�8�t��,A�C��U����t�����|�D#M�#��u)�e�����HD�9#U�#��u�E��������U���i���D�M�L�D3�#�u����#M�j _��G��}��M�T��
+M��N��?�M�~j?^;���J;Ju\�� ��}&����M��|8�Ӊ]�#\�D�\�D�u3�M�]!�,�O���M������|8��!��]�u�]�M�!K��]�}��J�z�y�J�z�y���M��y�J�z�Q�J�Q�J;Ju^�L�M���� �L}#�}u������	;�ο���M�	|�D�)�}u
�N����	{�M������N����	7�M���t�
�L���M��u�эN�
�L2��u��y�>��u;XAu�M�;
�,Au�%XA�M���B_^[��jh��@�|��M3�;�v.j�X3��;E�@u����WWWWW�����3����M��u;�u3�F3ۉ]��wi�=�,AuK�����u�E;�,Aw7j����Y�}��u���Y�E��E������_�]�;�t�uWS���;�uaVj�5TA�\�@��;�uL9=\At3V��Y���r����E;��P�����E���3��uj���Y�;�u
�E;�t������ø�	Aá�,AVj^��u��;�}�ƣ�,AjP��YY��A��ujV�5�,A�YY��A��ujX^�3ҹ�	A���A��� ����PA|�j�^3ҹ�	AW������A����������t;�t��u�1�� B��@
A|�_3�^���=(At��L�5�A�y��Y�U��V�u��	A;�r"��0Aw��+����Q�K���N�Y�
�� V���@^]Ë�U��E��}��P����E�H�Y]ËE�� P���@]Ë�U��E��	A;�r=0Aw�`���+�����P���Y]Ã� P���@]Ë�U��M���E}�`�����Q����Y]Ã� P���@]Ë�U�����AS3�V�u�E��]�]��]��F�> t��<at9<rt,<wt�.��SSSSS������3��p�E��M��]��E	�M�3�AF�W:����Q�@;��.����S������ ���tVHtG��t/��
t"����9]����M�E���	U���E@���M@��E���E���E����E�E���‰E��9]�uw�M �E��u��Tt\��tEHt1��t����E�uF	}�L9]�u<�e������E��79]�u'	}��E��&�E�u�M���Et3���MF�:�����9]����F�> t�jVhx�@�vV���������F�> t��>=upF�> t�jh|�@V��T����u���M�Ajh��@V�T����u���M�!jh��@V�T����u���M�F�> t�8t���SSSSS�������h��u�E�u�uP��Q����t3�� �E�`A�M��H�M�X��X�X�H_^[��jh��@����3�3��}�j���Y�]�3��u�;5�,A����A��9t[��@��uH��uA�F���w�FP���Y������A�4�V�'���YY��A���@�tPV�~���YYF둋��}��h��j8�Y�
�A���A�9tIh���� P���YY����Au�4���Y��A����� P���@��A�<�}�_;�t�g��_�_��_�O��E�����������Ë}�j���Y�SVW�T$�D$�L$URPQQh�]@d�5�A3ĉD$d�%�D$0�X�L$,3�p���t;�T$4���t;�v.�4v�\���H�{u�h�C�U��C� U�d���_^[ËL$�A�t3�D$�H3��z���U�h�p�p�p�>�����]�D$�T$���U�L$�)�q�q�q(������]�UVWS��3�3�3�3�3���[_^]Ë��j�kT3�3�3�3�3���U��SVWjjh3^@Q�k_^[]�U�l$RQ�t$�����]���U��V�uW3�;�u���WWWWW��������F�����@���t�� �F�����F�u	V�)Y��F��v�vV�tYP�p���F;���������F�uOV�JY���t.V�>Y���t"V�2��V�<��A�"��Y��Y��P
A�@$�<�u�N �~u�F�t�u�F��N�A���������	F�~��_^]Ë�U����UV�uj�X�E�U�;�u����� ����	���S3�;�|;5|Ar'�������SSSSS�	� �������Q���W�<��A�����ƊH��u�l����R���	�j�����wP�]�;������9]t7�@$���E���HjYtHu��Шt��U�E�E����Шu!���������SSSSS�n�����4����M;�r�E�u�JY�E�;�u�����������hjSS�u�*��D(�E���T,��AHtt�I��
tl9]tg��@�M�E��D
8]�tN��L%��
tC9]t>��@�M�}��E��D%
u$��L&��
t9]t��@�M�E��D&
S�M�Q�uP��4���@���{�M�;��p;M�g�M�D�����}��;�t
�M�9
u��� ��]�E�É]�E�;����M�<��<
t�CA�M��E�H;�s�A�8
u
AA�M�
�u�E�m�Ej�E�Pj�E�P��4���@��u
�4�@��uE�}�t?��DHt�}�
t��
��M��L�%;]�u�}�
t�jj�j��u����}�
t�
C�E�9E�G������D�@u����C��+E�}��E�������K���xC�3�@�����;]�rK�@��PAt�����PA��u
�Y���*�zA;�u��@��AHt$C���Q|	���T%C��u	���T&C+���ؙjRP�u����E�+]���P�uS�u�jh����@�E�u4�4�@P���Y�M�E�;EtP���Y�E�����E���E�3�;�����E�L0��;�t�M�f�9
u��� ��]�E�É]�E�;����E�f����f��
tf�CC@@�E��M�;�s�Hf�9
u
���Ej
��M��Ej�E�Pj�E�P��4���@��u
�4�@��u[�}�tU��DHt(f�}�
t�j
Xf���M��L��M��L%��D&
�*;]�uf�}�
t�jj�j��u�H��f�}�
tj
Xf�CC�E�9E�������t�@u��f�f�CC+]�]�����4�@j^;�u�R���	�Z���0�i�����m�Y����]��\���3�_[^��jh��@�h���E���u�"��� ����	���3�;�|;|Ar!����0�����	VVVVV�g�����ɋ�����A��������L9��t�����;M�Au����0�����P�<NY�u���D8t�u�u�u�~������E���[���	�c���0�M��E������	�E������u�NYË�U��EV3�;�u���VVVVV����������@^]Ë�U��V�uW3�;�u3��e9}u����j^�0WWWWW�d�������E9}t9urV�u�u�����uW�u�*��9}t�9us���j"Y����jX_^]��������̋T$�L$��ti3��D$��u��r�=tAt�OW����r1�ك�t+ш����u����������ʃ���t��t
�����u��D$_ËD$�jTh��@�:��3��}��E�P�`�@�E�����j@j ^V�YY;����A�5|A���0�@���@
�x�@$�@%
�@&
�x8�@4��@�
�A��;�r�f9}��
�E�;����8�X�;�E�;�|���E��[j@j �YY��tV�M���A��|A ���*�@���@
�`�`$��@%
�@&
�`8�@4��@��;�r�E�9=|A|���=|A�e���~m�E����tV���tQ��tK�uQ���@��t<�u�������4��A�E����Fh��FP���YY�����F�E�C�E�9}�|�3ۋ��5�A����t���t�N��r�F���uj�X�
��H������P�0�@�����tC��t?W���@��t4�>%���u�N@�	��u�Nh��FP���YY��t7�F�
�N@�����C���g����5|A���@3��3�@Ëe��E��������8��Ë�U��V�uV��IY���u����	���MW�uj�uP���@�����u�4�@�3���tP�|��Y���������A�����D0� ���_^]�jh�@�q���E���u�+��� ����	���3�;�|;|Ar!����8�����	WWWWW�p�����ɋ�����A�������L1��t�P�fIY�}���D0t�u�u�u������E������	����8�M��E������	�E������u�IYË�U��SV�u�F�Ȁ�3ۀ�u@�t9�FW�>+���~,WPV���YP���;�u�F��y��F��N ��_�F�f�^��[]Ë�U��V�u��u	V�5Y�/V�|���Y��t����F@tV���P�qLY��Y��3�^]�jh8�@����3��}�}�j���Y�}�3��u�;5�,A����A��98t^��@�tVPV�T�YY3�B�U���A���H���t/9UuP�J���Y���t�E��9}u��tP�/���Y���u	E܉}��F�3��uࡀA�4�V�]�YY��E�������}�E�t�E��f���j�!��Y�j����YË�U��V�uWV��FY���tP��A��u	���u��u�@Dtj��Fj���FYY;�tV�FYP�L�@��u
�4�@���3�V�F������A����Y�D0��tW�X��Y���3�_^]�jh`�@�f���E���u� ��� ����	���3�;�|;|Ar!����8�����	WWWWW�e�����ɋ�����A�������L1��t�P�[FY�}���D0t�u����Y�E������	�M��E������	�E�����u�FYË�U��V�u�F��t�t�v�m����f����3�Y��F�F^]Ë�U��E��8csm�u*�xu$�@= �t=!�t="�t=@�u�$��3�]�h<n@�l�@3�Ë�VW3�9=�,Au����5�,A��u��@�< w��t.��t$<"u	3Ʌ�������P�JY��tFF��< wF���u�_��^Ã=�,Au�@��V�54AW3���u���<=tGV�VY�t���u�jGW�
��YY�=A��tˋ54AS�BV�%��C�>=Yt1jS��YY���tNVSP�����t3�PPPPP�U�������>u��54A����%4A�'��,A3�Y[_^�5A�ת���%A����U��Q�MS3�V���U�9Et	�]�E��E��>"u3�9E��"��F�E��<���t��B�U���PF�4IY��t��}t
�M��E�F�U�M��t2�}�u��� t��	u���t�B��e��>���< t<	uF��N��>���}t	�E�E��3�C3��FA�>\t��>"u&��u�}�t�F�8"u���
3�3�9E����E����tI��t�\B���u�U���tU�}�u< tK<	tG��t=��P��t#�OHY��t
��M�E�F��M��E��
�,HY��tF���UF�V�����t�B�U��M�����E^[��t� ���U���S3�VW9�,Au���h�hAVS�lA�D�@��,A�5 A;�t�E�8u�u��U��E�PSS�}��
����E���=���?sJ�M�sB�����;�r6P�
��Y;�t)�U��E�P�WV�}������E���H�A�5A3����_^[�Ë�U��pA��SV�5��@W3�3�;�u.�֋�;�t�pA�#�4�@��xu
jX�pA��pA����;�u�֋�;�u3�����f9t@@f9u�@@f9u�5��@SSS+�S�@PWSS�E�։E�;�t/P�3Y�E�;�t!SS�u�P�u�WSS�օ�u�u�貧��Y�]��]�W���@���\��t;�u����@��;��r���8t
@8u�@8u�+�@P�E�����Y;�uV���@�E����u�VW�<��V���@��_^[��U����A�e��e�SW�N�@����;�t
��t	�УA�`V�E�P��@�u�3u����@3���@3���@3�E�P���@�E�3E�3�;�u�O�@����u����5A�։5A^_[�Ã%xAË�U��VW3��u譧����Y��u'9tAvV�T�@���;tAv����uʋ�_^]Ë�U��VW3�j�u�u���������u'9tAvV�T�@���;tAv����uË�_^]Ë�U��VW3��u�u��D��YY��u,9Et'9tAvV�T�@���;tAv����u���_^]Ë�U���SVW�%����e��=xA����h��@�<�@�����*�58�@h��@W�օ��P�o����$��@W�xA��P�Z����$��@W�|A��P�E����$��@W��A��P�0���Y��A��th��@W��P����Y��A��A;�tO9�AtGP�v����5�A���i���YY����t,��t(�օ�t�M�Qj�M�QjP�ׅ�t�E�u	�M �9�|A;�t0P�&���Y��t%�ЉE���t��A;�tP�	���Y��t�u��ЉE��5xA��Y��t�u�u�u�u����3�_^[�Ë�U��ES3�VW;�t�};�w����j^�0SSSSS蕼�������<�u;�u��ڋ�8tBOu�;�t��
BF:�tOu�;�u��ż��j"Y����3�_^[]Ë�U��SV�u3�W9]u;�u9]u3�_^[]�;�t�};�w胼��j^�0SSSSS����������9]u��ʋU;�u��у}���u�
�@B:�tOu���
�@B:�tOt�Mu�9]u�;�u��}�u�EjP�\�X�x�����	���j"Y���������������̋L$��t$�����tN��u���$��$�����~Ѓ�3ƒ���t�A���t2��t$��t��t�͍A��L$+�ÍA��L$+�ÍA��L$+�ÍA��L$+�Ë�U��MS3�VW;�t�};�w�L���j^�0SSSSS�պ�������0�u;�u��ڋъ�BF:�tOu�;�u�����j"Y����3�_^[]Ë�U��MV3�;�|��~��u�<A�(�<A�
<A��Ϻ��VVVVV��W�������^]�jh��@���3��]3�;���;�u蕺���WWWWW���������S�=�,Au8j蛸��Y�}�S�c��Y�E�;�t�s���	�u���u��E������%9}�uSW�5TA��@���趽���3��]�u�j�i���Y�j�
���YË�U���(�A3ʼnE���
AVtj
貴��Y������tj����Y��
A�������������������������������f������f����f�����f�����f������f�����������u�E���Dž0��������@�jP���������jP������������(�����0���jDž���@������,����l�@��(���P�h�@j�{�������������������U��WV�u�M�}�����;�v;�����r�=tAtWV����;�^_u^_]�JA��u������r*�$��{@��Ǻ��r���$�{@�$�|@��$��{@�{@D{@h{@#ъ��F�G�F���G������r��$��{@�I#ъ��F���G������r��$��{@�#ъ���������r��$��{@�I�{@�{@�{@�{@�{@�{@�{@�{@�D��D��D��D��D��D��D��D��D��D��D���D���D���D�������$��{@��|@|@|@,|@�E^_�Ð���E^_�Ð���F�G�E^_�ÍI���F�G�F�G�E^_�Ð�t1��|9���u$������r
��$��}@����$�@}@�I�Ǻ��r��+�$��|@�$��}@��|@�|@�|@�F#шG��������r���$��}@�I�F#шG�F���G������r���$��}@��F#шG�F�G�F���G�������V�����$��}@�ID}@L}@T}@\}@d}@l}@t}@�}@�D��D��D��D��D��D��D��D��D��D��D��D��D��D������$��}@���}@�}@�}@�}@�E^_�Ð�F�G�E^_�ÍI�F�G�F�G�E^_�Ð�F�G�F�G�F�G�E^_�Ë�U��E��t���8��uP蒜��Y]Ë�U��QQ�EV�u�E��EWV�E��5��Y;�u�4����	�Nj��J�u�M�Q�u�P���@�E�;�u�4�@��t	P�&���Y�ϋ�����A�����D0� ��E��U�_^��jh��@�������u܉u�E���u�˴��� 谴���	�Ƌ���3�;�|;|Ar!衴���8致���	WWWWW�������ȋ�����A�������L1��u&�`����8�F����	WWWWW�γ���������[P��4Y�}���D0t�u�u�u�u������E܉U������	�����8�M��M��E�������E܋U��]����u�5YË�U����~?�A3ʼnE��EV3���4���8���0�9uu3���;�u'莳���0�t���VVVVV���������SW�}����4��A�����NJX$����(���'���t��u0�M���u&�%���3��0�	���VVVVV�葲�����C�@ tjjj�u�~������u�iY������D���诪���@l3�9H�����P��4�� ���@���`3�9� �t���P��@��4����3���<�9E�B��D���'����g���(�3���
���� ��ǃx8t�P4�U�M��`8j�E�P�K��P��Y��t:��4�+�M3�@;���j��@�SP�=�������C��D��jS��@�P�[=�������3�PPj�M�Qj��@�QP���C��D����@���\j��<�PV�E�P��(���4���@���)��D���0��9�<���8���� ���j��<�Pj�E�P��(���E�
�4���@������<�����0���8��<t<u!�33�f��
��CC��D���@��� �<t<uR��@��h:Yf;�@��h��8��� �t)j
XP��@��;:Yf;�@��;��8���0��E9�D�������'����8��T4��D8�3ɋ�@�����4���@�������<�9M� ���(���<���D�+�4���H�;Ms9��<���<��A��
u��0��
@��D��@��D���D��r‹؍�H�+�j��,�PS��H�P��4���@���B��,��8�;��:��<�+�4�;E�L���� ��D�����9M�M���(���D���<�+�4���H�;MsF��D���D��AAf��
u��0�j
[f�@@��<���<�f�@@��<��r��؍�H�+�j��,�PS��H�P��4���@���b��,��8�;��Z��D�+�4�;E�?����@9M�|��D���<�+�4�j��H���^;Ms<��D���D��f��
uj
[f���<��<�f�Ɓ�<��r�3�VVhU
����Q��H���+��+��P��PVh����@��;���j��,�P��+�P��5��P��(���4���@��t�,�;����4�@��@�;�\��D�+�4���8�;E�
����?j��,�Q�u��4��0���@��t��,���@���8���4�@��@���8�ul��@�t-j^9�@�u����	�����0�?��@�����Y�1��(���D@t��4��8u3��$輬����Ĭ��� �����8�+�0�_[�M�3�^�R�����jh��@�ί���E���u般��� �m����	���3�;�|;|Ar!�_����8�E����	WWWWW�ͫ�����ɋ�����A�������L1��t�P��,Y�}���D0t�u�u�u�.������E������	����8�M��E������	�E��N����u�
-Y�U��`Ah�,�Y�M�A��t
�I�A��I�A�A�A�A�a�]Ë�U��E���u�W����	3�]�V3�;�|;|Ar�9���VVVVV�	�����3���ȃ������A���D��@^]áA��3�9�A����Ë�U���SV�u3�W�};�u;�v�E;�t�3���E;�t�������v譪��j^SSSSS�0�6��������V�u�M�趐���E�9X��f�E��f;�v6;�t;�vWSV�������Z����*�O����8]�t�M��ap�_^[��;�t2;�w,�/���j"^SSSSS�0踩����8]��y����E��`p��m�����E;�t�8]��%����E��`p������MQSWVj�MQS�]�p���@;�t9]�^����M;�t���4�@��z�D���;��g���;��_���WSV������O�����U��j�u�u�u�u�|�����]Ë�U����u�M��}����E�M���A%��}�t�M��ap��Ë�U��j�u���YY]��������V�D$�u(�L$�D$3��؋D$����d$�ȋ�d$��G�ȋ\$�T$�D$���������u���d$�ȋD$���r;T$wr;D$v	N+D$T$3�+D$T$��؃��ʋӋًȋ�^��A@t�yt$�Ix��������QP����YY���u	�Ë�U��V����M�E�M����>�t�}�^]Ë�U��G@SV���t2�u,�E�+��M���}���C�>�u���8*u�ϰ?�d����}�^[]Ë�U���x�A3ʼnE�S�]V�u3�W�}�u���������������������������������������������������蜍����u5�i����3�PPPPP�����������t
�������`p����
�F@u^V���Y�P
A���t���t�ȃ�������A���A$u����t���t�ȃ�������A���@$��g���3�;��]��������������������������������P
C3�9����������
�ʀ� ��Xw
������@��������k�	���@j��^������;����jY;���	�$�;�@3�������������������������������������t	�ƒ� tH��t4+�t$HHt���V		���K	����?	����3	�����$	����	��*u,���������������������������������k�
�ʍDЉ�������������*u&���������������������������k�
�ʍDЉ����z��ItU��htD��lt��w�b����S�;luC���������8����,��� � �<6u�{4uCC����������<3u�{2uCC�������������<d��<i��<o��<u��<x��<X�������������������P��P����Y������Yt"���������������C������������������������j����J�ƒ�d���w��S������AtHHtYHHtHH���� Dž�����������@�������������������EDž������0���������0u
����������u������������������������u��A��������Dž����{��X��HHty+��&���HH������������t0�G�Ph���P����P��������tDž������G����Dž����������1����������t<�H��t5��������t�+��Dž��������������A����P��Y����p������e����g�2�����itm��nt$��o����������ta����U�7������������������� tf�����f��������Dž��������@Dž��
����������G��W���u��gufDž���Z9���~���������~@������]V�{�����Y������j��t�������������
Dž���^��G��������G�������������P����������������P������������SP�5�A� ���Y�Ћ������t!����u������PS�5�A��Y��YY����gu��u������PS�5�A�˕��Y��YY�;-u���C����S���������������$��s�����HH���������Dž����'����Dž���k���������Qƅ���0�����Dž����G������M������� t�������@t�G���G����G���@t��3҉������@t��|��s�؃��ځ�������ڋ�u3ۃ���}Dž��������9���~�������u!�����u������������t-�����RPSW�����0��9����������~������N뽍E�+�F�����������tb��t�΀90tW���������0@�?If�8t@@��u�+�����(��u��A���������I�8t@��u�+��������������\����@t2�t	ƅ���-��t	ƅ���+��tƅ��� Dž��������+���+�������u�����������Sj �[���������������������������a������Yt���uWSj0��������������������tf��~b�����������������Pj�E�P������FPF�����u(9�����t ������������M���������Yu�������������P�������Y�����|���tWSj ������m��������t�������҃��������Y������������t
�����������3�9�����t������t�c���VVVV�V�������t
�������`p�������M�_^3�[��~����%�@$�@V�@��@��@
�@P�@��@��U����A3ʼnE�SV3�W��9�Au8SS3�GWhd�@hS��@��t�=�A��4�@��xu
��A9]~"�M�EI8t@;�u����E+�H;E}@�E��A����;��������]�9] u��@�E �5��@3�9]$SS�u���u��P�u �֋�;���~Cj�3�X����r7�D?=w�$��;�t����P�H���Y;�t	������E���]�9]��>W�u�u�uj�u �օ����5�@SSW�u�u�u�֋ȉM�;����Et)9]��;M���u�uW�u�u�u���;�~Ej�3�X��r9�D	=w��#��;�tj������P膂��Y;�t	��������3�;�tA�u�VW�u�u�u��@��t"SS9]uSS��u�u�u�VS�u ���@�E�V�b�Y�u��Y��E�Y�Y�]�]�9]u��@�E9] u��@�E �u�'Y�E��u3��!;E ��SS�MQ�uP�u �(���E�;�tԋ5�@SS�uP�u�u�։E�;�u3��~=���w8��=w��"��;�t�������P�p���Y;�t	��������3�;�t��u�SW������u�W�u�u�u�u�։E�;�u3��%�u�E��uPW�u �u��e'��u�����#u�W�7�Y��u�u�u�u�u�u��@��9]�t	�u����Y�E�;�t9EtP���Y�ƍe�_^[�M�3��({���Ë�U����u�M��{~���u(�M�u$�u �u�u�u�u�u�(����� �}�t�M��ap��Ë�U��QQ�A3ʼnE���ASV3�W��;�u:�E�P3�FVhd�@V� �@��t�5�A�4�4�@��xu
jX��A���A����;��������]�9]u��@�E�5��@3�9] SS�u���u��P�u�֋�;���~<���w4�D?=w�� ��;�t����P���Y;�t	������؅�ti�?PjS�����WS�u�uj�u�օ�t�uPS�u� �@�E�S�s��E�Y�u3�9]u��@�E9]u��@�E�u�%Y���u3��G;EtSS�MQ�uP�u�A%���;�t܉u�u�u�u�u�u��@��;�tV�}��Y�Ǎe�_^[�M�3��)y���Ë�U����u�M��||���u$�M�u �u�u�u�u�u�������}�t�M��ap��Ë�U��V�u�����v�:}���v�2}���v�*}���v�"}���v�}���v�}���6�}���v �}���v$�|���v(��|���v,��|���v0��|���v4��|���v��|���v8��|���v<��|����@�v@�|���vD�|���vH�|���vL�|���vP�|���vT�|���vX�|���v\�|���v`�x|���vd�p|���vh�h|���vl�`|���vp�X|���vt�P|���vx�H|���v|�@|����@����2|������'|������|������|������|������{�������{�������{�������{�������{�������{����,^]Ë�U��V�u��t5�;hAtP�{��Y�F;lAtP�{��Y�v;5pAtV�}{��Y^]Ë�U��V�u��t~�F;tAtP�[{��Y�F;xAtP�I{��Y�F;|AtP�7{��Y�F;�AtP�%{��Y�F;�AtP�{��Y�F ;�AtP�{��Y�v$;5�AtV��z��Y^]��������U��V3�PPPPPPPP�U�I�
�t	���$��u���I���
�t	���$s��� ^�����������̋T$�L$��u<�:u.
�t&:au%
�t��:Au
�t:au����
�uҋ�3�Ð�����t���:u�
�t��t�f���:u�
�t�:au�
�t���눋�U��Q�e�S�]��u3��W��ru�{���vn�M�E�������tR:Q�uM�P���t<:Q�u7�P���t&:Q�u!�P���t:Q�u�E�9}�r��?�@��I��F�@��I��<�@��I��2�@��I��(�M�E����t:u@A�E�9]�r�3�_[����	+�����������U��V3�PPPPPPPP�U�I�
�t	���$��u���
�t���$s�F��� ^��U��WV�u�M�}�����;�v;�����r�=tAtWV����;�^_u^_]�:��u������r*�$��@��Ǻ��r���$��@�$��@��$���@�(�@T�@x�@#ъ��F�G�F���G������r��$��@�I#ъ��F���G������r��$��@�#ъ���������r��$��@�I��@�@�@آ@Т@Ȣ@��@��@�D��D��D��D��D��D��D��D��D��D��D���D���D���D�������$��@���@�@(�@<�@�E^_�Ð���E^_�Ð���F�G�E^_�ÍI���F�G�F�G�E^_�Ð�t1��|9���u$������r
��$���@����$�P�@�I�Ǻ��r��+�$���@�$���@���@أ@�@�F#шG��������r���$���@�I�F#шG�F���G������r���$���@��F#шG�F�G�F���G�������V�����$���@�IT�@\�@d�@l�@t�@|�@��@��@�D��D��D��D��D��D��D��D��D��D��D��D��D��D������$���@����@��@Ȥ@ܤ@�E^_�Ð�F�G�E^_�ÍI�F�G�F�G�E^_�Ð�F�G�F�G�F�G�E^_��jh��@译��3ۉ]�j腌��Y�]�j_�}�;=�,A}W������A�9tD��@�tP�%���Y���t�E�|(��A��� P���@��A�4�*u��Y��A�G��E������	�E��k����j�&���YË�U���0S3�E�VW��]�]��E��]�t	�]��E��
�E��]��E�P�!Y��t
SSSSS�����M����u��@u9E�t�M������+ú���tGHt.Ht&�U�������8���j^SSSSS�0�������U����t��u��E�@��}��EjY+�t7+�t*+�t+�t��@u�9}����E���E���E���E���]�E�#¹;��;t0;�t,;�t=��=�@����E��/�E��&�E��=t=t`;������E��E�E���t�
A��#M��x�E��@t�M��M��M��t	}� t�M���E�릨t�M��e
����u�������ϋ�����E�=$�@S�u���u�E�P�u�u��u�׉E��um�M���#�;�u+�Et%�e����S�u�E�u�P�u�u��u�׉E��u4�6������A�����D0� ��4�@P�]���Y�1�����t�u���@;�uD�6������A�����D0� ��4�@��V����Y�u�L�@;�u�����
룃�u�M�@�	��u�M��u�6�	��Ѓ������AY��Y�M����L��Ѓ������A���D$� ��M��e�H�M���������Etqj��W�6������E�;�u�X����8�tM�6�t�����j�E�P�6�]��7�������u�}�u�E�RP�6���;�t�SS�6�Q�����;�t��E���0�@�@�}u�E�#�u	M�	E�E#�;�tD=t)=@t"=t)=@t"=t=@u�E���M�#�;�u	�E���]��E���E�@�]����E���#�=@��=�tw;����E�;��y��v��v0���f�E�3�H�&H�R�E��E��jSS�6������t�SSS�6�z��#ƒ���������j�E�P�6�Դ��������u�����tk�����}�uY�E����E�;������b������P���jSS�6�������C���SSS�6�����#ƒ���������E�%��=��u�6�j���Y�&���j^�0���d=��uSj�6�c��������������E��ASS�6�H�������E��E��E�+�P�D=�P�6�;�������������9}�ۋ������A�����D$�2M���0�������A�����D$�M�������
ʈ8]�u!�Et��ȃ������A���D� �}�����#�;�u|�Etv�u�L�@S�u�E�jP�u���W�u�$�@���u4�4�@P������ȃ������A���D� ��6�Y����6������A�������_^[��jh�@��3��u�3��};���;�u荆��j_�8VVVVV���������Y��3�9u��;�t�9ut�E%������@t‰u��u�u�u�u�E�P���j������E��E�������E�;�t��誉���3��}9u�t(9u�t�����������A�D� ��7�@YË�U��j�u�u�u�u�u������]Ë�U���S�u�M���k��3�9]u8]�t�E�`p�3����E�9Xu&�u�u�u����8]����M�ap��9]u.�_���SSSSS������8]�t�E�`p������W�};�u.�)���SSSSS�豄����8]�t�E�`p������NV�Mf�	�M�E����D�M�ti9]u��D�]����f�����U�:�u�]��Z��f��f�E��f��M�f;prf;pwfp�6f;pr0f;pw*fp�$�U���At
f������ʉM�f�u�f�����G�D�M�tH9]u�]��^��M:�t��f��f���G�M�f;Hrf;HwfH�6f;Hr0f;Hw*fH�$�U���At
f������ʉM�f�M�f;�u!f;�t	9]����8]�t�E�`p�3�^_[�����H8]�t�M�ap���U��j�u�u�u�����]Ë�U���S3�9]u3���W�u�M��i���}�9_u&�u�u�u�k��8]����M��ap��9]u+�%���SSSSS�譂����8]�t�E��`p������mV�u;�u+��SSSSS��z�����8]�t�E��`p������9�Ef��M�E�����D8tA9]u�3�D8t_8]�t�E��`p�3�^_[�ËE�:�u3����f��f�E��f�����F�D:t 9]u3����M:�t�f���f�F��f;�uf;�t�9]�`�������H8]�t��M��ap�냋�U��j�u�u�u�����]�U��SVWUjjh��@�u�T]_^[��]ËL$�A�t2�D$�H�3��~d��U�h�P(R�P$R���]�D$�T$���SVW�D$UPj�h��@d�5�A3�P�D$d��D$(�X�p���t:�|$,�t;t$,v-�4v���L$�H�|�uh�D��I�D��_뷋L$d�
��_^[�3�d�
�y��@u�Q�R9Qu��SQ��A�SQ��A�L$�K�C�kUQPXY]Y[����U��EVW��|Y;|AsQ�������<��A����<�u5�=AS�]u��tHtHuSj��Sj��Sj��(�@��3�[��Y����	�a���� ��_^]�U��MS3�;�VW|[;
|AsS������<��A������@t5�8�t0�=Au+�tItIuSj��Sj��Sj��(�@���3�������	�������_^[]Ë�U��E���u���� ����	��]�V3�;�|";|As�ȃ������A����@u$�~���0�d��VVVVV�	��~��������^]�jh �@臂���}���������4��A�E�3�9^u6j
�=}��Y�]�9^uh��FP����YY��u�]�F�E������09]�t����������A�D8P���@�E��G����3ۋ}j
�{��YË�U��E�ȃ������A���DP���@]�jh@�@����M�3��}�j��{��Y��u���bj�~|��Y�}��}؃�@�<�4��A�����u���A;����Fu\�~u9j
�5|��Y3�C�]��~uh��FP����YY��u�]���F�e��(�}�u�^S���@�FtS���@��@낋}؋u�j
�z��YÃ}�u��F��+4��A������u�}�uyG�+���j@j �B���YY�E�ta���A��|A ���;�s�@���@
�`��@�E�����}����σ������A�DW����Y��u�M��E������	�E�聀���j�<z��Y�U����}��}�M��f����$�ffGfG fG0fG@fGPfG`fGp���IuЋ}���]�U����}��E���3�+���3�+���u<�M�у��U�;�t+�QP�s������E�U��tEE+‰E�3��}��M��E�.�߃��}�3��}�M��E�M�U�+�RjQ�~������E�}���]�jhh�@�@���e�f(��E��#�E��=�t
=�t3��3�@Ëe�e��E������E��B��Ë�U���3�S�E��E�E�S�X��5 P��Z+�tQ�3���E�]�U�M���U��E�[�E�t�\�����t3�@�3�[������tA3��jh��@�~���E���u�({���	���3�;�|;|Ar�{���	SSSSS�z�����Ћ���<��A�������L��t�P���Y�]���Dt1�u���YP�,�@��u�4�@�E���]�9]�t�z���M��z���	�M��E������	�E��}���u���YË�U����u�M��w`���E�M�U�Tu�}t�M���A#E�3���t3�@�}�t�M��ap��Ë�U��jj�uj�����]�jh��@�5}���]��u�u�'b��Y���u��uS�`��Y��=�,A��3��}����j��w��Y�}�S蕑��Y�E�;���;5�,AwIVSP�w�������t�]��5V�F���Y�E�;�t'�C�H;�r��PS�u��g���S�E����E�SP�k�����9}�uH;�u3�F�u�����uVW�5TA�\�@�E�;�t �C�H;�r��PS�u�����S�u��������E������.�}�u1��uF�����uVSj�5TA���@����u�]j�u��YË}���9=\At,V� ���Y�������x��9}�ul��4�@P�,x��Y��_�����\x��9}�th��q��uFVSj�5TA���@����uV9\At4V跁��Y��t���v�V见��Y�x���3��{����w���|�����u��w����4�@P�w���Y����U����}��u��u�}�M�����fofoNfoV fo^0ffOfW f_0fof@fonPfov`fo~pfg@foPfw`fp������Iu��u��}���]�U����}�u��]��]�Ù�ȋE3�+ʃ�3�+ʙ��3�+���3�+����uJ�u�΃��M�;�t+�VSP�'������E�M��tw�]�U�+щU��+ى]�u�}�M��E�S;�u5�ك��M�u�}�M��MM�UU�E+E�PRQ�L������E��u�}�M����ʃ��E�]��u��}��]�������������Q�L$+ȃ����Y�Q�L$+ȃ����Y���U����A3ʼnE�V3�95�AtO�=�A�u�l
��A���u����pV�M�Qj�MQP�8�@��ug�=�Au�4�@��xuω5�AVVj�E�Pj�EPV�4�@P���@�
�A���t�V�U�RP�E�PQ�0�@��t�f�E�M�3�^�CX������A��U���SV�u3�;�t9]t8u�E;�t3�f�3�^[��u�M��d[���E�9Xu�E;�tf�f�8]�t�E��`p�3�@�ʍE�P�P���YY��t}�E���~%9M| 3�9]��R�uQVj	�p���@���E�u�M;��r 8^t���8]��e����M��ap��Y����t���*8]�t�E��`p����:���3�9]��P�u�E�jVj	�p���@���:���뺋�U��j�u�u�u������]���������������Q�L$+����#ȋ�%�;�r
��Y���$�-���U���VW�u�M��Z���E�u3�;�t�0;�u,��s��WWWWW��es�����}�t�E�`p�3���9}t�}|Ƀ}$ËM�S��}��~���~�E�P��jP虊���M���������B����t�G�ǀ�-u�M���+u�G�E���K���B��$�9��u*��0t	�E
�4�<xt
<Xt	�E�!�E�
��u��0u�<xt<XuG�G��������3�u���N��t�˃�0���t1�ˀ�a����w�� ���;Ms�M9E�r'u;�v!�M�}u#�EO�u �}t�}�e��[�]��]ى]��G닾����u�u=��t	�}��w	��u+9u�v&�<r���E�"t�M����EjX��ƉE��E��t�8�Et�]��}�t�E�`p��E���E��t�0�}�t�E�`p�3�[_^�Ë�U��3�P�u�u�u90Auh�	A�P�����]Ë�U����A3ʼnE�j�E�Ph�u�E���@��u���
�E�P�Y�M�3��*T���Ë�U���4�A3ʼnE��E�M�E؋ES�EЋV�E܋EW3��M̉}�}�;E�_�5��@�M�QP�֋��@��t^�}�uX�E�P�u�օ�tK�}�uE�u��E����u�u������YF;�~[���wS�D6=w/�[�����;�t8����-WW�u�u�j�u�Ӌ�;�u�3���P��X��Y;�t	������E���}�9}�t؍6PW�u�����V�u�u�u�j�u�Ӆ�t�]�;�tWW�uSV�u�W�u���@��t`�]��[���@9}�uWWWWV�u�W�u�Ӌ�;�t<Vj�ذ��YY�E�;�t+WWVPV�u�W�u��;�u�u��W��Y�}���}�t�MЉ�u��I���Y�E�e�_^[�M�3��vR���Ë�U��j
j�u������]Ë�U���S3�VW9]���u�M��U��9]u.�qo��SSSSS��n����8]�t�E��`p�������};�t˾���9uv(�2o��SSSSS��n����8]�t�E��`p����`�E�9Xu�uW�u����8]�tD�M��ap��;�E��M�QP��E����M�QP�s��G�Mt;�t;�t�+���3�_^[�Ë�U��V3�950Au99uu�n��VVVVV��n���������'9ut܁}���w�^]�-V�u�u�u�����^]Ë�U���SVW3�jSS�u�]�]��θ���E�#ƒ��U��tYjSS�u貸����#ʃ����tA�u�}+����;����Sj�@�@P�\�@�E���u��m����m���_^[��h��u�YY�E���|
;�r�����P�u��u�ɹ�������t6�+��xӅ�wϋu�u��u��YY�u�j�@�@P�X�@3���Zm���8u�=m���
���u��;�q|;�skS�u�u�u跷��#ƒ�����D����u�B�YP�<�@�����H��E�#‰U�u)��l���
��l����4�@��u�#u������S�u�u�u�L���#ƒ��������3�������U��S�]V�u������A������0�A$�W�y�������@tP���tB��t&��t��u=�I��
�L1$��⁀���'�I��
�L1$��₀���a�
�I��
�L1$�!���_^[u��]���%�@]�U��EV3�;�u��k��VVVVV��Nk����jX�
�
`A�3�^]�3�PPjPjh@h��@�$�@��Aá�AV�5L�@���t���tP�֡�A���t���tP��^Ë�U���SV�u�M��jQ���]�;�sT�M胹�~�E�PjS�4����M���
����X����t������}�t�E�`p�����E胸�~1�]�}�E�P�E%�P�U���YY��t�Ej�E��]��E�Y��j���*3Ɉ]��E�A�E�j�p�U�jRQ�M�QV�p�E�P�
����$���o������E�t	�M�����}�t�M�ap�^[��������������U��WVS�M�tM�u�}�A�Z� �I�&
�t'
�t#����:�r:�w�:�r:�w�:�u��u�3�:�t	�����r�ً�[^_����������������̋D$�L$ȋL$u	�D$���S��؋D$�d$؋D$���[��%��@4�B�\�j�~������������"�6�F�V�h�x�����������������.�J�h�|�����������������(�@�X�����������������������.�<�N�h�������������
�$�0�B�R�d�t����������������� �g4@9G@LW@�@~n@��@�W@1�RL����CorExitProcessmscoree.dll@A�AEncodePointerKERNEL32.DLLDecodePointerFlsFreeFlsSetValueFlsGetValueFlsAllocruntime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...<program name unknown>Runtime Error!

Program: ������������������(null)(null)EEE50P( 8PX700WP  `h````xpxxxx	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ccsUTF-8UTF-16LEUNICODEGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLL�����������EEE���00�P��('8PW�700PP� (����`h`hhhxppwpp         (((((                  H����������������������          h((((                  H����������������������                                 H�����������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~�����������������������������������������������������������������������������������������������������������������������������HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$user32.dllMessageBoxTimeoutAFatal Error in LauncherrbFailed to open executableUnable to find an appended archive.Unable to read from file#!Job information querying failedJob information setting failedstdin duplication failedstdout duplication failedstderr duplication failedUnable to create process using '%s'Failed to get exit code of processFailed to find shebangExpected to find terminator in shebang lineExpected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to be able to allocate command line memory"%s" "%s" %sHA��@RSDS�j�!���N���~Dx1c:\Users\Vinay\Projects\SimpleLauncher\dist\w32.pdb7�]��������������@������������@������������@������������@������������!@������������#@������������$@������������%@������������l'@p'@����2'@F'@������������*@�����*@������������,@�����,@������������1@������������4@�����������{6@�6@������������8@�8@������������<@������������<@�<@�����������2C@�����������G@�����������pJ@�����������W@������������\@�����������/f@�������������i@�i@�����������k@������������l@\l@�����������n@�����������@y@������������@�������������@�������������@�����������L�@�������������@�����������u�@��@�������������@��@�������������@�������������@�����4�B�\�j�~������������"�6�F�V�h�x�����������������.�J�h�|�����������������(�@�X�����������������������.�<�N�h�������������
�$�0�B�R�d�t����������������� �ExitProcessqSetInformationJobObjectbFreeLibrary�GetCurrentProcess�WaitForSingleObjectgGenerateConsoleCtrlEvent�GetCommandLineAAssignProcessToJobObject�GetExitCodeProcess�CreateProcessA�QueryInformationJobObject�CreateJobObjectAdGetStdHandleGetLastErrorEGetProcAddress<LoadLibraryA-SetConsoleCtrlHandlerGetModuleFileNameA�DuplicateHandleRCloseHandleKERNEL32.dllGetModuleHandleW�Sleep�HeapFree�HeapAllocbGetStartupInfoA�TerminateProcess�UnhandledExceptionFilter�SetUnhandledExceptionFilterIsDebuggerPresent�TlsGetValue�TlsAlloc�TlsSetValue�TlsFree�InterlockedIncrementsSetLastError�GetCurrentThreadId�InterlockedDecrement%WriteFile�DeleteCriticalSection9LeaveCriticalSection�EnterCriticalSection�InitializeCriticalSectionAndSpinCountrGetCPInfohGetACP7GetOEMCP
IsValidCodePage�HeapCreate�VirtualFree�VirtualAlloc�HeapReAllocRtlUnwindgMultiByteToWideChar�ReadFileoSetHandleCount�GetFileTypefSetFilePointer`FreeEnvironmentStringsA�GetEnvironmentStringsaFreeEnvironmentStringsWWideCharToMultiByte�GetEnvironmentStringsW�QueryPerformanceCounter�GetTickCount�GetCurrentProcessIdyGetSystemTimeAsFileTime�HeapSizeGetLocaleInfoA�GetConsoleCP�GetConsoleMode+LCMapStringA-LCMapStringWfGetStringTypeAiGetStringTypeW�CreateFileA�SetStdHandleWFlushFileBuffersWriteConsoleA�GetConsoleOutputCP$WriteConsoleWSSetEndOfFileJGetProcessHeap�@N�@���D��������p�@D�@	�@
��@T�@$�@�@��@��@t�@<�@�@��@��@X�@  �@!(�@"��@xx�@yh�@zX�@�T�@�D�@
		


!
5A
CPR
S
WYl
m pr	�
�
�	��
�)�
���
���Qy@Qy@Qy@Qy@Qy@Qy@Qy@Qy@Qy@Qy@x
��@��@                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ�A�`�y�!�������@~�����ڣ ��@����ڣ ��A��Ϣ���[��@~��QQ�^� _�j�2�����1~��l�@����C�A�A�A�A�AhAh�@��@p�@�
A�A�A�A�A�A�����
h�@j�@��@��@��@��@��@��@��@x�@p�@h�@\�@P�@H�@<�@8�@4�@0�@,�@(�@$�@ �@�@�@�@�@�@�@��@��@��@(�@��@��@��@��@��@��@��@��@��@��@|�@p�@	�
A.dA�A�A�A�A�A�A�A�A�AhA. ��p��PSTPDT�A A��������������������;Zx����0Nm����:Yw����/MlK(�p�������������0�eH�`�x�������	�2���4(�6���>h�(D�%��i��xzh��~h�HZ�( @...GGGWWWiiiuuu����������������������������������̀�ww����ww||�����ww��������wwww��������ww��������f�wwwww|�����f�wwwwww����ff�wwwwww�����ff��wwwww���ffl����ww����ffffff��w����ffffffl�w������ffffff�w�����ffffff�|����������ff��������ffff�������ff��R\I���lffl���)����ff�ح���������2L���������18�������Ϥ"������A<��������ΣT��π�����U���������������������������؀����������������������?������������������?�?�?�?�?�?�������������( 444MMMSSSzzz������������������������������p�p�����{p{��f���fko�f�����_fffk�_�fff��[���f}��UUU�fL4�UUU_kJqO���_�~�'�[U_����U�����������wwwww{~����������������( @%%%+++000===AAAIIIMMMQQQVVVYYY]]]~dFgggjjjmmmrrruuu}}}�u?�z=�~;�gE�kC�oA�r@��:��I��b��pƏKУk(��,�1�?�5�<�\�C�K�Q�s�U�[�c�b�����������������������������������������ð����������������������������������������������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$"  _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_L'%$"_I_MMMMMMJJ__('%%_I_CEMIJJMEM_(''*_I_?BMDJEMDMF_)(-LI_MMMCMMMMM_________<____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/
N______MMMMJIDAI_9/	HJJMMJMMMJ??BAI_A7503	IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O;
@__C_C?J?AJI_?A_DJJI@O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ�����?������������������?������������������?�( 444MMMRRRYYY~eGuuu}}}�x>�iE�rC��E��~7�?�H�V�b�x����������������������������������������������������������������������������������/!P7pL�c�yϏ���1��Q��q�������������/Pp"�,�6�@�J�[1�qQ��q�������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������!%///* !*/"(%%'%/)
/!#''////+/+"*(/
/

!%(/
(

  (*/(///)
*/
	)*

	/"/////	/+///#
		+ !%//
+"*+'#+//+'!%*++$++!+!    !!!<(0` !!$&			&"

 ���W���������������������������������ܱ��Nj+<<</	&&&#&[[[?6666��׏��������������������������������������������Ҟ���BBB3"


mmm3����,����!!!4777&�����������������������������������������������������ʟ���}���}___E���OpppD���P,)+3���Z2226DDD(���,�����###5��������������������������������������������������������������������������������չ�������������5�������,�������������������������������������������������������������������������������������������������������������,������Ì222"��Є�����������������������������������������������������������������������������������������������������&&&2����   4888&�������������������������������������������������������������������������e��?��4��/��+���.���R�������ӎ����������$$$5��Ď���������������������������������������������������������������������D��@��;��7��3��/��*���&���"�����������������������������������������������������������������������������������������W��G��C��?��;��6��2��n������f��0�������������nj333"��ӄ��������������������������������������������������������������������O��K��G��B��>��:��5��p������i��$�����������!!!4888&���������������������������������������������������������������������S�N��J��F��B��=��9��5��0��,��(���������������%%%5��ǎ���������������������������������������������������������������������V�R�N��I��E���������������������������������������������������������������������������������������������������������ѹ���|J��q?��o@�����Z�U�Q�M��I��D��@��<��7��3��/��+���&���"���-����������������Ɍ444"��ք�������������������������������������������������̴��w<��u=��s>��q?�����]�Y�U�P��L��H��C��?��;��7��2��.��*���%���!����������������"""4888&���������������������������������������������������d��y<��w=��u=��s>�����a�\�X�T�P��K��G��C��>��:��6��1��-��)���%��� ���O������������Ñ%%%5��ʎ���������������������������������������������������A��{;��y<��w=��t>�����s�`�\�W�S�O��J��F��B��>��9��5��1��,��(���$���(����������������������������������������������������������������������9��|:��z;��x<��v=�������s�_�[�W�R�N��J��E��A��=��8��4��0��,��'���#�������������̌555"��ل���������������������������������������������������9��~9��|:��z;��x<���o�����������������������������������������m��8��3��/��+���'�����������"""4:::&������������������������������������������������������8���9��~:��|;��z;��w<��u=��s>��q?��o@��mA��kB��iC��gC�dD��uZ������;��7��3��.��*�������������Ǒ%%%5��̎���������������������������������������������������È>���8���9��}:��{;��y<��w<��u=��s>��q?��o@��mA��jB��hC��fD�~dE��uZ�����?��:��6��2��5�����������������������������������������������������������������������������Оa���7���8��9��}:��{;��y<��w=��u>��r>��p?��n@��lA��jB��hC��fD�}dE�����B��>��:��5��^������������ό555"��܄����������������������������������������������������������ѳ�„7���7���8��9��}:��{;��x<��v=��t>��r?��p@��n@��lA��jB��gC��eD�����F��A��=��9������������"""4;;;&�����������������������������������������������������������������ŌC���8���9��~9��|:��z;��x<��v=��t>��r?��p@��mA��kA��iB��gC�����I��E��L��������������ɑQQQJnnn����������~~~�������������������������������������������������������������������������������������������Į��q?��o@��mA��kB��iC�������������������������HHH�"""���������������vvv������������������������������������������������������������������9��~:��{;��y<��w<��u=��s>��q?��o@��mA��kB�������������:::�'''�___���������sss�ttt��������������������������������������������������������������8�Ϧu�����ǣv��y<��w=��u=��s>��p?��n@��lA��������888T����---6fffnddd�%%%�"""�����OOO�SSS������������������������������������������������������������ċD�ҧu�����ʤv��{;��y<��v=��t>��r?��p?��xM�����<<<�MMM�������̑&&&5����;;;�<<<�xxx�QQQ�;;;�KKK����������������������������������������������������������8���8��~9��|:��z;��x<��v=��t>��r?�̷������999�����������������������VVV�###�)))�444��������������������������������������������������������������������ѳ�͝b���@��~9��|:��z;��}C���g��˶����Ӎ���������󑑑�����ZZZ�lll�;;;�!!!�"""�)))�___���������������������������������������������������������������������������������������&&&2����:::�ppp�{{{�___�WWW�WWW�:::�!!!�"""�***�www�������������������������������������������������������������������"""4888&���,������̑999����Ԗ���JJJ�|||�lll�:::�"""�BBB�XXX�|||��������������������������������������������������������������������$$$6�������,��������������������������������uuu�KKK�CCC�@@@�...�www����������������������������������������������������������������������������������*������Ҍ666"������������������������KKK�aaa�LLL�WWW��������������������������������������������������������������@��������$����"""4;;;&���������������������nnn�fff�!!!�$$$�999������������������������������������������������������������444]ttt|������ȇ������ɑ&&&5��Ў������������������������vvv�mmm�VVV�{{{�OOO����������������������������������������������������������������ڥ�����������������������������������������������aaa�CCC�����ppp�������������������������������������������������������������������������ό555"��ބ����������������������������������|||�MMM�����fff���������������������������������������������������������������"""4;;;&�������������������������������������������\\\�����������������������������������������������������������������Ǒ%%%5��Ύ�����������������������������������������������������������������������������������������������ݧ�����������������������������������������������������������������������������������������������������������������ܦ������͌555"��ۄ�����������������������������������������������������������������������������������ۥ����"""4:::&������������������������������������������������������������������������������������ڤ������Ñ%%%5��ˎ�����������������������������������������������������������������������ܤ��������������������������������������������������������������������������������������������������ׇ
������ww���?ww�?�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww��ww��ww��ww��ww��ww��ww�?�ww��ww���ww���ww( @ ����������������������������������!!!0\\\JeeeQ666D555A0$
�������v�H��<��6��0��2��\�������7���q��������������������ڴ���vvvj&&&D1"����g�L��F��@��;��5������?��������������������������������������������������к����V�Q�K��E��?��9������(�����������a���V�������������������������������������[�U�P��J��D��>��8��2��-���������uuun{{{j���������������������������������������`�Z�T�O������������������������������������������������������������������������V��o@��lA�����b�_�Y�S�M��G��B��<��6��0��+���%���<���������������a���V�����������������������m��t>��q?��n@�����b�b�^�X�R�L��F��A��;��5��/��)���$���Y����������wwwn}}}j����������������������~C��v=��s>��p?�����b�b�a�]�W�Q�K��E��@��:��4��.��(���+���������������������������������������{;��x<��v=��s>�����b�b�a�[�V�P��J��D��?��9��3��-��'��������������a���V����������������������~:��{;��x<��u=���p���������������������������������r��=��7��2��,����������yyynj�����������������������9��}:��z;��w<��u>��r?��o@��lA��iB��fD�}dE�|cE�|cE���i���B��<��6��1��������������������������������������?��9��}:��z;��w=��t>��q?��n@��kA��iC��fD�}cE�|cE�}dF�����G��A��;��=�������������a���V���������������������ңi���8��9��|:��y<��v=��s>��q?��n@��kB��hC��eD�|cE�|cE�����L��F��@��m����������zzzn���j�������������������������ʓP���8��~9��{;��y<��v=��s>��p?��mA��jB��gC�eD�|cE�����P��J��\��������������������������������������������������������������������������������¯��mA��jB��gC�~dE��������������������������a���V��������������������������������������}:��z;��x<��u=��r?��o@��lA��iB��fD���������|||n���m���������������������������������������9��������w=��t>��q?��n@��lA��iC�������������JJJ��������������������������������������������őP��������y<��v=��t>��q?��n@��~Y������������VVV�???�www�����iii�����������������������������������Ρk���A��|;��y<��v=��yF���p��������>>>3@@@y����~~~obbb�000�kkk�@@@������������������������������������������������������������������---U��������������<<<�&&&�[[[�������������������������������������������������������6���uuu�sss�WWW�III�$$$�&&&�qqq�����������������������������������lllg|||s���4����bbb�hhhƑ�������UUU�000�QQQ�}}}��������������������������������---{bbb�����(����������������������iii�LLL�BBB������������������������������������������������������a���V����������������ggg�+++�NNN�������������������������������������������|||n���j����������������]]]�ttt�kkk�������������������������������������������������������������������rrr�www���������������������������Ӧ�������a���V���������������������������������������������������Ӧ����zzzn���j�������������������������������������������Ӧ�����������������������������������������������������������ˉ��?������������������?�?�?���������������?�(  ������C�������������������﫫�o���������I�����������������������������������������ਨ������������S��=��?���������������������������������_�Q�F����4���������������������������������a�Z��������������������������������������м���oE�����c�a�X�M��B��7��0��������������������~I��q?�����c�`�V�K��@��5��8��������������������z;��u=���q�����������������v�>��3����������������������E��y<��t>��n@��iB�~dE�}dF�������G��H������YYY�uuu����������ġ���=��x<��s>��mA��hC�}dE�}eG�����S���������444�|||����������������������������gC�}cE�������������������������MMM������������������~>�����q?��kA��iG������������������RRR��������������¢���G��u=��xK�ʺ��������������������������������������������������������������������������������������������������������������������������������������������~�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A  �(  �h00 �%   � h<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD�0000#0(0=0N0`0�0�0�0�011�1C2\2�2�2�2�2�2�2�2363;3]3r3�3�3�3�3�3�34	444.434E4Y4j4�4�4�4�4�4�4�445_5�5�5
6(6C6L6y6�6�6�6�6�6+737F7Q7V7f7p7w7�7�7�7�7�7�7�7�7�7?8L8v8{8�8�8�8Z9g9�9�9�9�9m:y:�:�:�:�:;e;w;�;�;�;$<5<>�> @!1Z2�2q3i4e5�5
660676=6O6W6b6�6�6�67�7�7�7�7�7�7�7�7�7�7�7�7�7�7�78888"8,858@8L8Q8a8f8l8r8�8�8�8�8�8�8�8�8�8�899)959J9Q9e9l9�9�9�9�9�9�9�9�9�9�9�9�9�9	::(:7:>:K:n:�:�:�:�:;;;;S;y;�;< <X<`<�<�<�<�<�<�<�<�<�<�<==
===*=/=4=:=>=D=I=O=T=c=y=�=�=�=�=�=�=�=�=�=�=�=�=>I>�>�>�>�>�>�>�> ?%?M?r?�?�?�?�?�?0�0$0.0X0f0l0�0�0�0�0�0�0�0	1�1�1�1�1�2�2�2�2�23/3K3n3�3�3�3=4V44�4�4�4�455?5�5�56-6A6G6�6�6"7�78848�8�8�8�89{9�9�9�9P:U:Z:_:o:�:�:�:�:=;B;I;N;U;Z;�;�;�;b<q<�<�<�<�<�<�<!>(>�?�?@��01*1�2�2�2�2�2
33 3T3_3i3�3�3�3�3�3/4B4�4�45�5�56#666H6c6k6s6�6�6�6�6�6�6�6�67;7L7o748^8�8�8D9�9�9	::V:K;P;^;k;p;�=�=�=�=�=�=�=>>(>;>F>L>R>W>`>}>�>�>�>�>�>�>�>�>�>�>�>�>�>�>?	?#?4?:?K?�?P�L3X3�3�3�304666+6�6�6�6�6�6G7M7g7v7�7�7�7�7�7�7�7�788'818W8�8�8�8�8�89�:�:;<;�;�;�;�;*<:<g<o<�<�<�<�<==)>?$?�?�?`�y112;2�2�2u3�3Z4d45?5s5�57m7�7�7�7�71898y8�8�8�8959G9�9�9�9�9:6:j:�:�;�;�;<b<�<�<==A=u=�=>�>�>�>�>�>�>4?>?�?�?�?�?�?pr1�1�1�1�1�122$2/2F2R2_2f2�2�2�213J3^3�3�3�3�3�3�3�3�3�3
44"4Y4b4n4�4�4�4�4�4�455)5/5>5D5S5Y5g5p55�5�5�5�5�56}8�8�8�8�8,929f9q9�9X:e:�:�:�:�:;;;;=;c;�;�;�;�;�;�;�;�;�;�;�;�;�;<f<q<�<�<�<�<�<�<�<=$=(=,=0=4=8=<=@=�=�=�=�=�=I>V>o>�>�>�>�?�D0�0�0�12^2�3�4�5�5�56<6�6
7<7�7 8M8`8k8�9�9�;9<W<}<�<�< =�lo0`1�23<35;7?7C7G7K7O7S7W7d7v7�7�7�7�7�7�78�8S9v9�9�:M;W;o;v;�;�;�;�;�;e<�<�>�>?-???Q?c?u?�?�?���1�12222 2$2M2s2�2�2�2�2�2�2�2�2�2�23333v3�3�3�3�3�3�3�3�3-44484<4@4D4H4L4P4�4�4�4�4�4�45%5L5Y5^5l5%7�78#8?8Q8d8v8�8�8�;�;<;<X<c<z<�<�<k=��t1�1�1]2w2�2�2�2�2�233C3^3~3�3�3 4<4�4�4�4�4�4'595�5�5�56
6H6g78&8R8z8�8�8r9�9�9H:N:�:�:�:�: ;&;2;y;5=C=K=X=v=�=�=�=�=�=�=�=�=�>�>�<�1�1�1�12@2M2,3;3�4�5�56
6h6�6�6�7�7�7�7�7�7�7�9�T1X1\1`1d1p1t1�1�1�p�6�6787X7x7�7�7�7�788 8$8@8L8h8t8�8�8�8�8�8�89,909P9p9�9�9�9�9::0:P:\:x:�:�:�:�:;8;X;d;|;�;�;�;�0,040<0D0L0T0\0d0l0t0|0�0�0�0�0�0�0�0�0�0�0�0�0p3t3x3|3�3�3�3�3�3�3�3�3�7�889H9X9h9x9�9�9�9�9�9�9�9�9�9�9�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=>>>>>>>> >$>(>,>0>4>8><>@>D>H>L>P>`>h>l>p>t>x>|>�>�>�>�>�>`?d?python3.3/site-packages/pip/_vendor/distlib/t32.exe000064400000262000151733566750016044 0ustar00MZ����@���	�!�L�!This program cannot be run in DOS mode.

$����՚��՚��՚�e���՚�ѭ��՚�ѭ��՚�ѭ��՚�ѭ	��՚��՛��՚�ѭ��՚�ѭ��՚�ѭ��՚�Rich�՚�PEL1�R�	���&�@� @���(@�P�x	��(�@�D.textz�� `.rdata#�$�@@.data�,�@�.rsrc�P@R@@.reloc�R@BU�����A3ʼnE��}uE�EP�u������h�hP�(��������Ph��@���@P���j��@�M�3��x�ËL$W3��F��0P��APQ�����t��A�	;u���H�D$+��D0���}̋�_�U���(Wh��@�E�3�h`*AP�}��}��13�;���h�@Q����jW�u����u����E�������$;ljE�}�}�SVW�u��u���u��Sj�u���u���5����� ;�tj��Y�}��}+�E����~�V���E�E��;�Y�E�}�}�W�u��u��C�u�Vj�u��g�u��������3�����h�@P�U�����+]�j]�Y�u�}����Q�}��,�+u�+u�+�y3�jV�u����u�SjW���3�;����h@�@P�����$�D>�^[�f��\�@f;tH;�s���E�u���E�Y_��V���@�&jjjVP�t$P�<�@��u�0�@��uF��^Ã|$u�d+A��t	jP��@3�@�U�����SVW3�WW�(�@�؍D$Pjp�D$pPj	S�$�@��t�|$pu3�@�3�h`�@P�(�����$�0YYjp�D$lPj	S��@h��@P����jD^V�D$,WP�^���t$ �5,�@j���P�D$\�����$��@P����YYj���P�D$`���$��@P���YYj��P�D$d�����$��@P���YYjhn@�D$T�4�@�D$P�D$$PWWWjWW�uW� �@�uh��@P�O����D$$���t$�d+AS��@�t$�@�@j��t$��@�D$P�t$��@h�@P����YY�t$��@�U��$p�������A3ʼn��SVW��@�8"t� �@�"@��QP�3�YY;�u	�E�_�@��p���P�Y��tF���u�u�h�`*AVW�8�@�=`*A"t�u��	H�E�a*AH�]���E�P��AP������3�;����$<�@P�<���Y��Y��;�s���
t��
tA;�r����3�����hT�@P����YY���P��Y��tF�>u�3��>#h��@��P����YY���P�Y��tF���u�3��>!h��@��P���YY���P�Y��tF���u�ƍP�@��u�+‹��ÍH�@��u�+��ȋE��P�@��u�+���|8jW���3�����h�@P�C����u��u�Vh�@WWS���,S�����%���;
�Au������U��EPj�u�u�u�u�!��]�U��EV���F��uc�/�F�Hl��Hh�N�;
At�
,A�Hpu�+,��F;0At�F�
,A�Hpu�$�F�F�@pu�Hp�F�
���@�F��^]���U����u�M��f����E�~�E�Pj�u��1�������M�H���}�t�M��ap���U��=T#Au�E�
A�A��]�j�u���YY]�jh�@��>�u��tu�=�,AuCj�3Y�e�V��3Y�E�t	VP�4YY�E�������}�u7�u�
j�2Y�Vj�5�#A�D�@��u� ��0�@P���Y�>�U��Q�e�V�E�P�u�u�@�����u9E�t����t
���M����^��jh�@�=�e��u;5�,Aw"j��2Y�e�V��:Y�E��E������	�E��>�j��1YË�U��V�u�����SW�=H�@�=�#Au�Ej��Ch��AYY��,A��u��t���3�@P���uV�S���Y��u��uF�����Vj�5�#A�׋؅�u.j^90(At�u�`EY��t�u�{������0���0_��[�V�9EY��3�^]øAá�<AVj^��u��;�}�ƣ�<AjP�GYY��,A��ujV�5�<A�GYY��,A��ujX^�3ҹA���,A��� �����A|�j�^3ҹAW������+A����������t;�t��u�1�� B��pA|�_3�^���I�=%At�G�5�,A�D���YË�U��V�u�A;�r"��`Aw��+����Q��0�N�Y�
�� V�L�@^]Ë�U��E��}��P��0�E�H�Y]ËE�� P�L�@]Ë�U��E�A;�r=`Aw�`���+�����P�/Y]Ã� P�P�@]Ë�U��M���E}�`�����Q�u/Y]Ã� P�P�@]��������������̍B�[Í�$�d$3��D$S����T$��t�
��:�tτ�tQ��u��W���V؋
����~����3������3�3ƃ����u%�t�%u���u�^_[3�ËB�:�t6��t�:�t'��t��:�t��t�:�t��t��^_�B�[ÍB�^_[ÍB�^_[ÍB�^_[��̋D$S��tR�T$3ۊ\$��t�
��2�tr��t2��u��rW����ߋ�����_��t�
��2�t@��u�[�r�
3˿���~���3σ����t�J�2�t#2�t��2�t2�t��_�B�[ÍB�_[ÍB�_[ÍB�_[�jh �@�93ۉ]�3��};���;�u�L�SSSSS����3��y3��u;���;�t�3�8��;�t���I�E;�u
���ʉ]�8u ��j��E�Ph�A��J���P�uVW��F���E��E������	�E��;9�u�H���YË�U��VW�}3�;�u�j_VVVVV�8� �����$h��u�u�������;�t3���_�_^]Ë�U����MS�]VW3��M��]�9}t!9}t;�u�-WWWW�W���3�_^[�Ëu;�t
��3�u9Ev!���tSWQ��S��;�t���3�u9Ew��}�}�F�}��t�F�E���E������FtD�F��t=�5��;�r��;}���W�6�u��u���R)~>}�+߃�)}��}��;]�rh�}�t����3�;�v	���u����u��+������;�w��;E���P�u�V�aRYP�]Q�����������E�+�)E��(V�LJY������}�tN�M��E���FK�M��E�������E���3��}�t�uV�u�R���VVVV�"V�r����}�t�uj�u�tR���y�"3�PPPPP�E����N ��+�3�u�=����N��jh@�@�63��u�9ut79ut29uu5�}�t�uV�u�R����VVVVV���3��6�u����Y�u��u�u�u�u�u������E��E�������E���u�U���YË�U��u�u�uj��u�R�����]�jh`�@��53��u�3��];���;�u �x�VVVVV�������3�9u��;�tԉ]S�o���Y�u��C@uwS�|PY���t���t����ȃ�����+A��A�A$u)���t���t���������+A��A�@$�t���VVVVV�f���M�9u�u#S�)Q���EPV�uS�u�E�SW�Q���E������	�E��5�u����YË�U���SW�}3�;�u �hSSSSS��������fW�O9_Y�E�}�_jSP��Q��;ÉE�|ӋW��u+G�.��OV��+�u��tA�U��u������+A�����D2�t��;�s��:
u�E�3�B;�r�9]�u�E�����x�����G���W;�u�]���]��u�+��������+A�E����D0�tyjj�u��Q��;E�u �G�M��	�8
u�E@;�r�G �@j�u��u���P����}���:�9Ew�O��t��t�G�E��D0t�E�E)E��E�M��^_[��jh��@�33�3�9u��;�u���VVVVV�L�����'�u����Y�u��u����Y�E��E������	�E��3�u����YË�U��V�u�F��u�`����g���}�FuV����E�eYV�>�FY��y��F��t�t�u�F�u�uV�GMYP�O3Ƀ������I��^]�jh��@�23�3�9u��;�u���VVVVV�T�����>�};�t
��t��u�u����Y�u�W�u�u�������E��E������	�E��1�u����Y�U��SV�uW3���;�u�MWWWWW�������B�F�t7V�=V���QV�`LP�@P����}����F;�t
P�f�Y�~�~��_^[]�jh��@�"1�M�3��u3�;���;�u���WWWWW�R������F@t�~�E��%1�V��Y�}�V�*���Y�E��E�������ՋuV����YË�U��= At�8�u��6h��4YY]�jh�@�}0�MZf9@u8�<@��@PEu'�f9�@u��t@v3�9��@���M���e�j�#Y��uj�n���Y�/!��uj�]���Y�
V�e��a8��}j�33Y��@��,A�T� A��S��}j�
3Y�cQ��}j	�2Yj�3Y��tP��2Y��$A��$AP�5�$A�5�$A�}����E�}�uP�*5�Q5�.�E��	�M�PQ�OYYËe�E܉E�}�uP�5�05�E������E��}/��U�����U���(�!A�
!A�!A�!A�5!A�=!Af�0!Af�
$!Af�!Af�� Af�%� Af�-� A��(!A�E�!A�E� !A�E�,!A�����h A� !A� A� A	�� A��A�������A������`�@�` Aj�FUYj�\�@h��@�X�@�=` Auj�"UYh	���@P�T�@��U��QV�uV�I�E�FY��u���	�N ���/�@t
��"��S3ۨt�^����N���F�F�����F�^�]��u,��� ;�t���@;�u
�u�r^Y��uV�^Y�FW���F�>�H��N+�I;��N~WP�u�]���E��M�� �F���y�M���t���t�����������+A��A�@ tjSSQ�{T#ƒ����t%�F�M��3�GW�EP�u�\���E�9}�t	�N ����E%�_[^�Ë�U��G@SV���t2�u,�E�+��M���aC�>�u�O
�8*u�ϰ?�`�}�^[]Ë�U���x��A3ʼnE�S�]V�u3�W�}�u����������������������������������������������������3���u5���3�PPPPP�M��������t
�������`p�����
�F@u^V��FY�A���t���t�ȃ�������+A���A$u����t���t�ȃ�������+A���@$��g���3�;��]��������������������������
C�����������
��, <Xw������@��3��3�3������@j��Y������;���	�$��4@������������������������������������v	�ƒ� tJ��t6��t%HHt���W	����K	����?	����3	�����$	����	��*u,���������;�����������������������k�
�ʍDЉ�������������*u&���������;�����������������k�
�ʍDЉ����{��ItU��htD��lt��w�c����T�;luC���������9����-��� �!�<6u�{4uCC����������<3u�{2uCC�������������<d��<i��<o��<u��<x��<X��������������P��P������u\Y������Yt"������������9]�C������������������������]�M�ƒ�d���y��S������AtHHtXHHtHH���� Dž�����������@9������������������HDž������0���������0u
����������u����������������������;�u��A��������Dž������X��HHty+��'���HH������������t0�G�Ph���P����P�Z����tDž������G����Dž����������5��������;�t;�H;�t4��������t�+��Dž��������������A����P�/XY����p������e����g�4�����itq��nt(��o������Dž��ta����U�7��������W���/������ tf�����f��������Dž��������@Dž��
����������W����u��gueDž���Y9���~���������~?������]V�T0����Y��������t�������������
Dž���3�����������G�������������P����������������P������������SP�5xA�Y�Ћ������t 9���u������PS�5�A�yY��YY����gu;�u������PS�5�A�TY��YY�;-u���C����S����Dž���������$��s�����HH���������Dž����'����Dž���i���������Qƅ���0�����Dž����E������K������� t�������@t�G���G����G���@t��3҉������@t;�|;�s�؃��ځ�������ڋ�u3ۃ���}Dž��������9���~�������u!�����u������������t-�����RPSW�QW��0��9����������~������N뽍E�+�F�����������ta��t�΀90tV���������0@�>If90t@@;�u�+�����(;�u��A���������I�8t@;�u�+��������������\����@t2�t	ƅ���-��t	ƅ���+��tƅ��� Dž��������+���+�������u�����������Sj �W������������������������v������Yt���uWSj0�������V�����������tf��~b�����������������Pj�E�P������FPF�RU����u(9�����t ������������M���������Yu�������������P��������Y�����|���tWSj ������V��������t�������~�������Y������������t����������������������t
�������`p�������M�_^3�[���Ð�,@�*@*+@�+@�+@�+@%,@S-@��U��E�4#A]Ë�U���(��A3ʼnE������SjL�����jP�V<�������(�����0�������,��������������������������������f������f����f�����f�����f������f�����������E�MDž0�����������I�����Dž����Dž��������`�@j��\�@��(���P�X�@��u��uj�FYh���@P�T�@�M�3�[����Ë�U��54#A�
Y��t]��j�nFY]�����U��E3�;͘AtA��-r�H�wj
X]Ë͜A]�D���jY;��#���]����u�AÃ���z��u�AÃ�Ë�U��V����MQ����Y������0^]Ë�U��� S3�9]u ���SSSSS��*��������V�uW�};�t!;�u�r���SSSSS���������j�����E�;�w�}�u�E�u�E�B�u�u�P�u�U���E;�t4;�|"�M�x�E���E�PS�"�YY���t�E�3�9]�\>���HH_^[�Ë�U��QS3�9]u ����SSSSS��`���������V�uW9]u;�u9]u3��;�t�};�w���������u�u�u;}v-�8�E@PVh��@��������uL�V����8"ue�L����8�\�WVh��@�E�������\>����u�}�u� ����8"u/�����M���#;�}"����u����"SSSSS�������_^[�Ë�U��uj�u�u�u�u������]�-�t"��t��
tHt3�øøøøË�VW��h3��FWP�q83��ȋ��~�~�~����~����A���F+ο��@Ou������@Nu�_^Ë�U�����A3ʼnE�SW����P�v�d�@�����3�������@;�r���ƅ���� ��t.�������;�w+�@P��
����j R�7��C�C��u�j�v�������vPW������Pjj�5b3�S�v������WPW������PW�vS�`��DS�v������WPW������Ph�vS��_��$3���E������t�L���������t�L ���������Ƅ@;�r��V��Dž������3�)���������ЍZ ��w�L�р� ���w�L �р� ���A;�r‹M�_3�[������jh�@���
���,A�Gpt�lt�wh��uj ��Y�����j
�Y�e��wh�u�;50At6��tV�l�@��u��AtV���Y�0A�Gh�50A�u�V�h�@�E������뎋u�j
�gYË�U���S3�S�M��I���8#A���u�8#A�t�@8]�tE�M��ap��<���u�8#A�p�@�ۃ��u�E�@�8#A��8]�t�E��`p���[�Ë�U��� ��A3ʼnE�S�]V�uW�d�����3��};�u�����3���u�3�9�8A���E�0=�r���p����d��P�x�@���R�E�PW�d�@���3h�CVP��43�B���{�s9U����}����u������F����h�CVP�4�M��k�0�u�HA�u��*�F��t(�>����E�4AD;�FG;�v�}FF�>uыu�E���}��u�r�lj{�C�g���j�C�C��<AZf�1Af�0A@@Ju����������L@;�v�FF�~��4����C���@Iu��C�����C�S��s3��ȋ�����{����958#A�X������M�_^3�[������jh �@���M�����}������_h�u�u����E;C�Wh �M"Y�؅��F���wh���#S�u���YY�E����u�vh�l�@��u�Fh=AtP�r��Y�^hS�=h�@��Fp���,A��j
�#Y�e��C�H#A�C�L#A�C�P#A3��E�}f�LCf�E<#A@��3��E�=}
�L��(A@��3��E�=}����0A@��50A�l�@��u�0A=AtP���Y�0AS���E�������0j
�
Y��%���u ��AtS���Y�������e��E��Ã=�,Auj��V���Y��,A3�Ë�U��SV�u���3�W;�to=XAth���;�t^9uZ���;�t9uP�
������W^YY���;�t9uP���������]YY��������������YY���;�tD9u@���-�P��������+�P������+�P�������y��������=�At9��uP��[�7�R��YY�~P�E��0At�;�t9uP�-��Y9_�t�G;�t9uP���Y���Mu�V���Y_^[]Ë�U��SV�5h�@W�}W�֋����tP�֋����tP�֋����tP�֋����tP�֍_P�E�{�0At	���tP�փ{�t
�C��tP�փ��Mu֋���P��_^[]Ë�U��W�}����SV�5l�@W�֋����tP�֋����tP�֋����tP�֋����tP�֍_P�E�{�0At	���tP�փ{�t
�C��tP�փ��Mu֋���P��^[��_]Å�t7��t3V�0;�t(W�8���Y��tV�E����>Yu��8AtV�Y���Y��^�3��jh@�@�e�,��,A�Fpt"�~lt��pl��uj �yY���x�j�1Y�e��Fl�=A�i����E��E�������j�,Y�u�Ë�U��V�5$A�5��@�օ�t!� A���tP�5$A��Ѕ�t����'���@V�|�@��uV�Y��th��@P���@��t�u�ЉE�E^]�j���YË�U��V�5$A�5��@�օ�t!� A���tP�5$A��Ѕ�t����'���@V�|�@��uV�?Y��th��@P���@��t�u�ЉE�E^]���@���V�5$A���@��u�5|#A�e���Y��V�5$A���@��^á A���tP�5�#A�;���Y�Ѓ
 A��$A���tP���@�
$A��ijh`�@����@V�|�@��uV�Y�E�u�F\�@3�G�~��t$h��@P���@�Ӊ��h��@�u�Ӊ���~pƆ�CƆKC�FhAj
�Y�e��vh�h�@�E������>j�Y�}��E�Fl��u�A�Fl�vl����Y�E��������3�G�uj
��Y�j��YË�VW�0�@�5 A������Ћ�uNhj�|��YY��t:V�5 A�5�#A���Y�Ѕ�tjV����YY���@�N���	V�m��Y3�W���@_��^Ë�V������uj�]Y��^�jh��@��u�����F$��tP� ��Y�F,��tP���Y�F4��tP���Y�F<��tP���Y�F@��tP����Y�FD��tP����Y�FH��tP����Y�F\=�@tP���Yj
�Y�e��~h��tW�l�@��u��AtW���Y�E������Wj�VY�E��~l��t#W��Y;=At��8At�?uW���Y�E������V�6��Y�K��uj
�%YËuj�YË�VW���@V�|�@��uV��Y�����^�5��@h��@W��h��@W�x#A��h��@W�|#A��h��@W��#A�փ=x#A�5��@��#At�=|#At
�=�#At��u$���@�|#A���@�x#A�C@�5�#A��#A���@�$A������5|#AP�օ�����5x#A�����5|#A�x#A�����5�#A�|#A���5�#A��#A�������#A�[��teh�E@�5x#A�=���Y�У A���tHhj���YY��t4V�5 A�5�#A�
���Y�Ѕ�tjV���YY���@�N��3�@����3�_^Ë�U���S�u�M��n���]�C=w�E苀��X�u�]�}�E�P�E%�P�@YY��t�Ej�E��]��E�Y�
3Ɉ]��E�A�E�j�p�p�E�PQ�E�P�E�jP�:S�� ��u8E�t�E�`p�3���E�#E�}�t�M�ap�[�Ë�U��3�9Ej��hP���@��#A��u]�3�@��,A]Ë�VW3���#A�<�4Au��0A�8h��0���L\YY��tF��$|�3�@_^Ã$�0A3���S���@V�0AW�>��t�~t
W��W�0���&Y����PA|ܾ0A_���t	�~uP�Ӄ���PA|�^[Ë�U��E�4�0A�P�@]�jh��@�3�G�}�3�9�#Au�j��h��YY�u�4�0A9t���nj�%Y��;�u�%��3��Qj
�YY�]�9u,h�W�C[YY��uW�^��Y�����]���>�W�C��Y�E������	�E��I�j
�(���Y�U��EV�4�0A�>uP�"���Y��uj�Y�6�L�@^]�U��
�,A��,Ak����U+P��r	��;�r�3�]Ë�U����M�AV�uW��+y������i���D�M�I�M�����S�1��U�V��U��U�]��ut��J��?vj?Z�K;KuB���� s����L��!\�D�	u#�M!��J���L��!����	u�M!Y�]�S�[�M�M�Z�U�Z�R�S�M����J��?vj?Z�]����]���+u��]���j?�uK^;�v��M����J�M�;�v��;�t^�M�q;qu;���� s�����!t�D�Lu!�M!1��K����!����Lu�M!q�M�q�I�N�M�q�I�N�u��]�}�u;����M�ыY�N�^�q�N�q�N;Nu`�L�M���L�� s%�}u�ʻ���M	������D�D	�)�}u�J����M	Y�J���ꍄ��	�E���D0��E�����$A�����
�,A�5��@h@��H��SQ�֋
�,A��$A����	P��$A�@�
�,A������$A�@�HC��$A�H�yCu	�`���$A�x�ueSj�p�֡�$A�pj�5�#A�D�@�
�,A��$Ak���,A+ȍL�Q�HQP�X�E���
�,A;�$Av�m��,A��,A�E��$A�=�,A[_^�á�,AV�5�,AW3�;�u4��k�P�5�,AW�5�#A���@;�u3��x��,A�5�,A��,Ak�5�,Ah�Aj�5�#A�H�@�F;�t�jh hW���@�F;�u�vW�5�#A�D�@뛃N��>�~��,A�F����_^Ë�U��QQ�M�ASV�qW3���C��}���i���0Dj?�E�Z�@�@��Ju�j��h��yh�W���@��u�����p�U�;�wC��+���GA�H���������������@���Pǀ��IuˋU��E���O�H�A�J�H�A�d�D3�G�����FC������E�NCu	x�������!P��_^[�Ë�U����M�ASV�uW�}��+Q������i���D�M�O����I;�|9���M�]��U���E�;��;�M���I�M���?vj?Y�M��_;_uC���� s��M��L��!\�D�	u&�M!������M��L��!����	u�M!Y�O�_�Y�O��y�M+�M��}����}��M��O�L1���?vj?_�]���]�[�Y�]�Y�K�Y�K�Y;YuW�L�M���L�� s�}u�ϻ���M	�D�D��� �}u�O����M	Y�����O����	�U�M��D2���L���U�F�B��D2��<3��8�/�])u�N�K��\3��u��N�]�K���?vj?^�E����u���N��?vj?^�O;OuB���� s����t��!\�D�u#�M!��N���L��!����	u�M!Y�]�O�w�q�w�O�q�uu��u��N��?vj?^�M��y�K�{�Y�K�Y�K;KuW�L�M���L�� s�}u�ο���M	9�D�D��� �}u�N����M	y�����N����	�E��D�3�@_^[�Ë�U�����,A�Mk��,A�����M�SI�� VW}����M���
����3���U��
�,A����S�;#U�#��u
���];�r�;�u��,A��S�;#U�#��u
���];�r�;�u[��{u
���];�r�;�u1��,A�	�{u
���];�r�;�u����؉]��u3��	S�:���Y�K��C�8�t��,A�C��U����t�����|�D#M�#��u)�e�����HD�9#U�#��u�E��������U���i���D�M�L�D3�#�u����#M�j _��G��}��M�T��
+M��N��?�M�~j?^;���J;Ju\�� ��}&����M��|8�Ӊ]�#\�D�\�D�u3�M�]!�,�O���M������|8��!��]�u�]�M�!K��]�}��J�z�y�J�z�y���M��y�J�z�Q�J�Q�J;Ju^�L�M���� �L}#�}u������	;�ο���M�	|�D�)�}u
�N����	{�M������N����	7�M���t�
�L���M��u�эN�
�L2��u��y�>��u;�$Au�M�;
�,Au�%�$A�M���B_^[�����hPV@d�5�D$�l$�l$+�SVW��A1E�3�P�e�u��E��E������E��E�d�ËM�d�
Y__^[��]Q�����������̋�U���S�]V�s35�AW��E��E��{���t
�N�38�W����N�F�38�G����E�@f��M�U�S��[�E�M��t_�I�[�L��D��E��E���t�����E���|@G�E��؃��u΀}�t$����t
�N�38�Ծ���N�V�3:�ľ���E�_^[��]��E��ɋM�9csm�u)�=�,At h�,A�S����t�UjR��,A���M�k�E9Xth�AW�Ӌ��n�E�M��H����t
�N�38�A����N�V�3:�1����E�H��������9S�R���h�AW�������jh�@�����M3�;�v.j�X3��;E�@u����WWWWW�0����3����M��u;�u3�F3ۉ]��wi�=�,AuK�����u�E;�,Aw7j��Y�}��u���Y�E��E������_�]�;�t�uWS���;�uaVj�5�#A�H�@��;�uL9=0(At3V�qY���r����E;��P�����E���3��uj�9�Y�;�u
�E;�t����8���Ë�U��W��W���@�u�|�@�����`�w��t�_]Ë�U����u��5PA�%�h��Ѓ�]Ë�U��h�@�|�@��th�@P���@��t�u��]Ë�U��u����Y�u��@�j�U�Y�j�r�YË�U��V������t�Ѓ�;ur�^]Ë�U��V�u3����u���t�у�;ur�^]Ë�U��=�,Ath�,A�OPY��t
�u��,AY�-hd�@hL�@���YY��uBh|@�R�D�@�$H�@�c����=�,AYth�,A�OY��tjjj��,A3�]�jh�@�r���j�q�Y�e�3�C9%A���%A�E�%A�}���5�,A��Y���}؅�tx�5�,A��Y��u܉}�u���u�;�rW�{�9t�;�rJ�6�u����e����5�,A�_����5�,A�R���9}�u9E�t�}�}؉E��u܋}��ht�@�h�@�_���Yh|�@�x�@�O���Y�E�������}u(�%Aj��Y�u���3�C�}tj��Y����Ë�U��jj�u������]Ë�U��jj�u�����]�jjj������jjj�����Ë�V�w���V�"V��IV���V�RV�RV�PV�
V�fPh�[@�����$�PA^�U��QQS�]VW3�3��}�;�XAt	G�}���r��wj��SY���4j�SY��u
�=�A�����Ah��@�S�%AW�C����t
VVVVV�_����h�1%AVj�5&A�8�@��u&h��@h�V�|C����t3�PPPPP�����V�e*@Y��<v8V�X*��;�j�,(Ah��@+�QP�B����t3�VVVVV�������3�h��@SW�A����t
VVVVV������E��4�\ASW�A����t
VVVVV�����h h��@W�$Q���2j�,�@��;�t$���tj�E�P�4�\A�6�)YP�6S���@_^[��j�JRY��tj�=RY��u�=�Auh��)���h�����YY�U��E�,(A]�U��5,(A�7�Y��t�u��Y��t3�@]�3�]�jTh�@���3��}��E�P���@�E�����j@j ^V�lYY;����+A�5p+A���0�@���@
�x�@$�@%
�@&
�x8�@4��@�
�+A��;�r�f9}��
�E�;����8�X�;�E�;�|���E��[j@j ��YY��tV�M���+A��p+A ���*�@���@
�`�`$��@%
�@&
�`8�@4��@��;�r�E�9=p+A|���=p+A�e���~m�E����tV���tQ��tK�uQ���@��t<�u�������4��+A�E����Fh��FP�*FYY�����F�E�C�E�9}�|�3ۋ��5�+A����t���t�N��r�F���uj�X�
��H������P�,�@�����tC��t?W���@��t4�>%���u�N@�	��u�Nh��FP�EYY��t7�F�
�N@�����C���g����5p+A���@3��3�@Ëe��E����������Ë�U��VW3��u職����Y��u'94(AvV���@���;4(Av����uʋ�_^]Ë�U��VW3�j�u�u���������u'94(AvV���@���;4(Av����uË�_^]Ë�U��VW3��u�u�3O��YY��u,9Et'94(AvV���@���;4(Av����u���_^]�jh0�@�`�3ۉ]�j�Z�Y�]�j_�}�;=�<A}W������,A�9tD��@�tP���Y���t�E�|(��,A��� P���@��,A�4�!���Y��,A�G��E������	�E����j��YË�U��SV�u�F�Ȁ�3ۀ�u@�t9�FW�>+���~,WPV�YP�Q#��;�u�F��y��F��N ��_�F�f�^��[]Ë�U��V�u��u	V�5Y�/V�|���Y��t����F@tV�5P��OY��Y��3�^]�jhP�@��3��}�}�j��Y�}�3��u�;5�<A����,A��98t^��@�tVPV���YY3�B�U���,A���H���t/9UuP�J���Y���t�E��9}u��tP�/���Y���u	E܉}��F�3��uࡼ,A�4�V����YY��E�������}�E�t�E����j�q�Y�j����YË�U�����)AS3�V�u�E��]�]��]��F�> t��<at9<rt,<wt���SSSSS��H����3��p�E��M��]��E	�M�3�AF�W:����Q�@;��.����S������ ���tVHtG��t/��
t"����9]����M�E���	U���E@���M@��E���E���E����E�E���‰E��9]�uw�M �E��u��Tt\��tEHt1��t����E�uF	}�L9]�u<�e������E��79]�u'	}��E��&�E�u�M���Et3���MF�:�����9]����F�> t�jVh��@�Y���������F�> t��>=upF�> t�jh��@V��W����u���M�Ajh�@V��W����u���M�!jh�@V�W����u���M�F�> t�8t���SSSSS�������h��u�E�u�uP�U����t3�� �E� A�M��H�M�X��X�X�H_^[��jhx�@�e�3�3��}�j�]�Y�]�3��u�;5�<A����,A��9t[��@��uH��uA�F���w�FP�X�Y������,A�4�V�'���YY��,A���@�tPV�~���YYF둋��}��h��j8���Y�
�,A���,A�9tIh���� P�>YY����,Au�4�ï��Y��,A����� P�L�@��,A�<�}�_;�t�g��_�_��_�O��E����������Ë}�j�g�Y��SVW�T$�D$�L$URPQQhDh@d�5��A3ĉD$d�%�D$0�X�L$,3�p���t;�T$4���t;�v.�4v�\���H�{u�h�C�:X��C�LX�d���_^[ËL$�A�t3�D$�H3��|���U�h�p�p�p�>�����]�D$�T$���U�L$�)�q�q�q(������]�UVWS��3�3�3�3�3���[_^]Ë��j�W3�3�3�3�3���U��SVWjjh�h@Q�m_^[]�U�l$RQ�t$�����]���U��V�uW3�;�u���WWWWW��������F�����@���t�� �F�����F�u	V�Y��F��v�vV�tYP�p���F;���������F�uOV�JY���t.V�>Y���t"V�2��V�<��+A�"��Y��Y��A�@$�<�u�N �~u�F�t�u�F��N�A���������	F�~��_^]Ë�U����UV�uj�X�E�U�;�u�m��� �R���	���S3�;�|;5p+Ar'�C����)��SSSSS�	��������Q���W�<��+A�����ƊH��u���������	�j�����wP�]�;������9]t7�@$���E���HjYtHu��Шt��U�E�E����Шu!�����w���SSSSS������4����M;�r�E�u�@���Y�E�;�u�?����G������hjSS�u�G��D(�E���T,��AHtt�I��
tl9]tg��@�M�E��D
8]�tN��L%��
tC9]t>��@�M�}��E��D%
u$��L&��
t9]t��@�M�E��D&
S�M�Q�uP��4���@���{�M�;��p;M�g�M�D�����}��;�t
�M�9
u��� ��]�E�É]�E�;����M�<��<
t�CA�M��E�H;�s�A�8
u
AA�M�
�u�E�m�Ej�E�Pj�E�P��4���@��u
�0�@��uE�}�t?��DHt�}�
t��
��M��L�%;]�u�}�
t�jj�j��u����}�
t�
C�E�9E�G������D�@u����C��+E�}��E�������K���xC�3�@�����;]�rK�@��PAt�����PA��u
�����*�zA;�u��@��AHt$C���Q|	���T%C��u	���T&C+���ؙjRP�u�����E�+]���P�uS�u�jh����@�E�u4�0�@P���Y�M�E�;EtP迨��Y�E�����E���E�3�;�����E�L0��;�t�M�f�9
u��� ��]�E�É]�E�;����E�f����f��
tf�CC@@�E��M�;�s�Hf�9
u
���Ej
��M��Ej�E�Pj�E�P��4���@��u
�0�@��u[�}�tU��DHt(f�}�
t�j
Xf���M��L��M��L%��D&
�*;]�uf�}�
t�jj�j��u�e
��f�}�
tj
Xf�CC�E�9E�������t�@u��f�f�CC+]�]�����0�@j^;�u�����	�����0�i�����m�Y����]��\���3�_[^��jh��@����E���u���� ����	���3�;�|;p+Ar!����0�p���	VVVVV������ɋ�����+A��������L9��t�����;M�Au�<���0�"����P�hQY�u���D8t�u�u�u�~������E�������	�����0�M��E������	�E��K��u�QYË�U��EV3�;�u���VVVVV��0��������@^]Ë�U��V�uW3�;�u3��e9}u�l��j^�0WWWWW��������E9}t9urV�u�u�0���uW�u�"��9}t�9us���j"Y����jX_^]ËT$�L$��ti3��D$��u��r�=h+At��RW����r1�ك�t+ш����u����������ʃ���t��t
�����u��D$_ËD$Ë�U��V�uV����P�YY��t|�æ���� ;�u3��賦����@;�u`3�@� A�FuNSW�<�8(A�?�u S�%�Y���u�Fj�F�X�F�F�
�?�~�>�^�^�N3�_@[�3�^]Ë�U��}t'V�u�FtV�K��f���f�&�fY^]Ë�U��V�uV�NY���u����	���MW�uj�uP���@�����u�0�@�3���tP���Y���������+A�����D0� ���_^]�jh��@���E���u�H��� �-���	���3�;�|;p+Ar!����8����	WWWWW������ɋ�����+A�������L1��t�P�NY�}���D0t�u�u�u������E������	����8�M��E������	�E����u�hNYË�U��V�uWV�?MY���tP��+A��u	���u��u�@Dtj�Mj���MYY;�tV�LYP�@�@��u
�0�@���3�V�[L������+A����Y�D0��tW���Y���3�_^]�jh�@�	��E���u����� ����	���3�;�|;p+Ar!����8����	WWWWW�������ɋ�����+A�������L1��t�P�LY�}���D0t�u����Y�E���2����	�M��E������	�E����u�LYË�U��V�u�F��t�t�v�V����f����3�Y��F�F^]Ë�U��E��8csm�u*�xu$�@= �t=!�t="�t=@�u�:63�]�h�u@�\�@3��Ë�U��QQV������F�V\�\AW�}��S99t��k����;�r�k��;�s99u���3���t
�X�]���u3����u�`3�@�������N`�M��M�N`�H�����
PA�=TA���;�}$k��~\�d9�=PA�TAB߃�;�|�]���~d=��u	�Fd��^=��u	�Fd��N=��u	�Fd��>=��u	�Fd��.=��u	�Fd��=��u	�Fd��=��u�Fd��vdj��Y�~d��`Q�ӋE�Y�F`��[_^�Ã=�,Au���V�5 AW3���u���<=tGV�Y�t���u�jGW����YY�=�$A��tˋ5 AS�BV���C�>=Yt1jS���YY���tNVSP�d(����t3�PPPPP���������>u��5 A����% A�'��,A3�Y[_^�5�$A辞���%�$A����U��Q�MS3�V���U�9Et	�]�E��E��>"u3�9E��"��F�E��<���t��B�U���PF�MY��t��}t
�M��E�F�U�M��t2�}�u��� t��	u���t�B��e��>���< t<	uF��N��>���}t	�E�E��3�C3��FA�>\t��>"u&��u�}�t�F�8"u���
3�3�9E����E����tI��t�\B���u�U���tU�}�u< tK<	tG��t=��P��t#�LY��t
��M�E�F��M��E��
�LY��tF���UF�V�����t�B�U��M�����E^[��t� ���U���S3�VW9�,Au���h�@(AVS�D)A�8�@��,A�5%A;�t�E�8u�u��U��E�PSS�}��
����E���=���?sJ�M�sB�����;�r6P� ���Y;�t)�U��E�P�WV�}������E���H��$A�5�$A3����_^[�Ë�U��H)A��SV�5��@W3�3�;�u.�֋�;�t�H)A�#�0�@��xu
jX�H)A��H)A����;�u�֋�;�u3�����f9t@@f9u�@@f9u�5��@SSS+�S�@PWSS�E�։E�;�t/P�F�Y�E�;�t!SS�u�P�u�WSS�օ�u�u�虛��Y�]��]�W���@���\��t;�u����@��;��r���8t
@8u�@8u�+�@P�E������Y;�uV���@�E����u�VW�%��V���@��_^[�Ë�V��@��@W��;�s���t�Ѓ�;�r�_^Ë�V��@��@W��;�s���t�Ѓ�;�r�_^Ë�U�����A�e��e�SW�N�@����;�t
��t	�У�A�`V�E�P���@�u�3u����@3���@3���@3�E�P���@�E�3E�3�;�u�O�@����u����5�A�։5�A^_[�Ã%l+AË�U��QQ�EV�u�E��EWV�E��D��Y;�u訹���	�Nj��J�u�M�Q�u�P���@�E�;�u�0�@��t	P蚹��Y�ϋ�����+A�����D0� ��E��U�_^��jh��@������u܉u�E���u�?���� �$����	�Ƌ���3�;�|;p+Ar!�����8����	WWWWW胸�����ȋ�����+A�������L1��u&�Ը���8躸���	WWWWW�B����������[P��CY�}���D0t�u�u�u�u������E܉U���l����	�t����8�M��M��E�������E܋U������u�+DYË�U�����I��A3ʼnE��EV3���4���8���0�9uu3���;�u'�����0���VVVVV��p��������SW�}����4��+A�����NJX$����(���'���t��u0�M���u&虷��3��0�}���VVVVV��������C�@ tjjj�u�~������u�iY������D����6���@l3�9H�����P��4�� ����@���`3�9� �t���P���@��4����3���<�9E�B��D���'����g���(�3���
���� ��ǃx8t�P4�U�M��`8j�E�P�K��P�	Y��t:��4�+�M3�@;���j��@�SP��G�������C��D��jS��@�P��G�������3�PPj�M�Qj��@�QP���C��D����@���\j��<�PV�E�P��(���4���@���)��D���0��9�<���8���� ���j��<�Pj�E�P��(���E�
�4���@������<�����0���8��<t<u!�33�f��
��CC��D���@��� �<t<uR��@���DYf;�@��h��8��� �t)j
XP��@��DYf;�@��;��8���0��E9�D�������'����8��T4��D8�3ɋ�@�����4���@�������<�9M� ���(���<���D�+�4���H�;Ms9��<���<��A��
u��0��
@��D��@��D���D��r‹؍�H�+�j��,�PS��H�P��4���@���B��,��8�;��:��<�+�4�;E�L���� ��D�����9M�M���(���D���<�+�4���H�;MsF��D���D��AAf��
u��0�j
[f�@@��<���<�f�@@��<��r��؍�H�+�j��,�PS��H�P��4���@���b��,��8�;��Z��D�+�4�;E�?����@9M�|��D���<�+�4�j��H���^;Ms<��D���D��f��
uj
[f���<��<�f�Ɓ�<��r�3�VVhU
����Q��H���+��+��P��PVh����@��;���j��,�P��+�P��5��P��(���4���@��t�,�;����0�@��@�;�\��D�+�4���8�;E�
����?j��,�Q�u��4��0���@��t��,���@���8���0�@��@���8�ul��@�t-j^9�@�u�p����	�x����0�?��@��|���Y�1��(���D@t��4��8u3��$�0�����8���� �����8�+�0�_[�M�3�^�7�����jh�@�5���E���u���� ����	���3�;�|;p+Ar!�Ӱ���8蹰���	WWWWW�A������ɋ�����+A�������L1��t�P��;Y�}���D0t�u�u�u�.������E���V����	�^����8�M��E������	�E�����u�<YË�U�� Ah���Y�M�A��t
�I�A��I�A�A�A�A�a�]Ë�U��E���u�˯���	3�]�V3�;�|;p+Ar譯��VVVVV�	�5�����3���ȃ������+A���D��@^]Ë�VW3���`A�6誻����Y���(r�_^á�A��3�9L)A���������̋L$��t$�����tN��u���$��$�����~Ѓ�3ƒ���t�A���t2��t$��t��t�͍A��L$+�ÍA��L$+�ÍA��L$+�ÍA��L$+�Ë�U���SV�u3�W�};�u;�v�E;�t�3���E;�t�������v�p���j^SSSSS�0��������V�u�M�貍���E�9X��f�E��f;�v6;�t;�vWSV���������*�����8]�t�M��ap�_^[��;�t2;�w,��j"^SSSSS�0�{�����8]��y����E��`p��m�����E;�t�8]��%����E��`p������MQSWVj�MQS�]�p���@;�t9]�^����M;�t���0�@��z�D���;��g���;��_���WSV�A����O�����U��j�u�u�u�u�|�����]Ë�U����u�M��y����E�M���A%��}�t�M��ap��Ë�U��j�u���YY]��V�D$�u(�L$�D$3��؋D$����d$�ȋ�d$��G�ȋ\$�T$�D$���������u���d$�ȋD$���r;T$wr;D$v	N+D$T$3�+D$T$��؃��ʋӋًȋ�^��A@t�yt$�Ix��������QP�:���YY���u	�Ë�U��V����M�E�M����>�t�}�^]Ë�U���x��A3ʼnE�S�]V�u3�W�}�u��������������������������������������������������������u5�����3�PPPPP������������t
�������`p����
�F@u^V��Y�A���t���t�ȃ�������+A���A$u����t���t�ȃ�������+A���@$��g���3�;��]��������������������������������P
C3�9����������
�ʀ� ��Xw
����p�@��������k�	����@j��^������;����jY;���	�$�n�@3�������������������������������������t	�ƒ� tH��t4+�t$HHt���V		���K	����?	����3	�����$	����	��*u,���������������������������������k�
�ʍDЉ�������������*u&���������������������������k�
�ʍDЉ����z��ItU��htD��lt��w�b����S�;luC���������8����,��� � �<6u�{4uCC����������<3u�{2uCC�������������<d��<i��<o��<u��<x��<X�������������������P��P����Y������Yt"����������������C���������������������������J�ƒ�d���w��S������AtHHtYHHtHH���� Dž�����������@�������������������EDž������0���������0u
����������u������������������������u��A��������Dž����{��X��HHty+��&���HH������������t0�G�Ph���P����P�W�������tDž������G����Dž����������1����������t<�H��t5��������t�+��Dž��������������A����P����Y����p������e����g�2�����itm��nt$��o����������ta����U�7��������M������������ tf�����f��������Dž��������@Dž��
����������G��W���u��gufDž���Z9���~���������~@������]V�������Y������j��t�������������
Dž���^��G��������G�������������P����������������P������������SP�5xA�I���Y�Ћ������t!����u������PS�5�A����Y��YY����gu��u������PS�5�A��Y��YY�;-u���C����S���������������$��s�����HH���������Dž����'����Dž���k���������Qƅ���0�����Dž����G������M������� t�������@t�G���G����G���@t��3҉������@t��|��s�؃��ځ�������ڋ�u3ۃ���}Dž��������9���~�������u!�����u������������t-�����RPSW�����0��9����������~������N뽍E�+�F�����������tb��t�΀90tW���������0@�?If�8t@@��u�+�����(��u��A���������I�8t@��u�+��������������\����@t2�t	ƅ���-��t	ƅ���+��tƅ��� Dž��������+���+�������u�����������Sj ���������������������������������Yt���uWSj0������f��������������tf��~b�����������������Pj�E�P������FPF�����u(9�����t ������������M�蔓��������Yu�������������P������m���Y�����|���tWSj ��������������t�������!���������Y������������t
�����������3�9�����t������t�y���VVVV�V�������t
�������`p�������M�_^3�[�v���Ë�X�@W�@��@�@1�@=�@��@��@��U��E��t���8��uP�k���Y]Ë�U�����A3ʼnE�SV3�W��9P)Au8SS3�GWh��@hS��@��t�=P)A��0�@��xu
�P)A9]~"�M�EI8t@;�u����E+�H;E}@�E�P)A����;��������]�9] u��@�E �5��@3�9]$SS�u���u��P�u �֋�;���~Cj�3�X����r7�D?=w�X5��;�t����P�w���Y;�t	������E���]�9]��>W�u�u�uj�u �օ����5�@SSW�u�u�u�֋ȉM�;����Et)9]��;M���u�uW�u�u�u���;�~Ej�3�X��r9�D	=w�4��;�tj������P���Y;�t	��������3�;�tA�u�VW�u�u�u��@��t"SS9]uSS��u�u�u�VS�u ���@�E�V���Y�u�����E�Y�Y�]�]�9]u��@�E9] u��@�E �u��1Y�E��u3��!;E ��SS�MQ�uP�u �2���E�;�tԋ5�@SS�uP�u�u�։E�;�u3��~=���w8��=w�3��;�t�������P�~��Y;�t	��������3�;�t��u�SW�������u�W�u�u�u�u�։E�;�u3��%�u�E��uPW�u �u��[1��u�����#u�W���Y��u�u�u�u�u�u��@��9]�t	�u���|��Y�E�;�t9EtP��|��Y�ƍe�_^[�M�3��{���Ë�U����u�M��{���u(�M�u$�u �u�u�u�u�u�(����� �}�t�M��ap��Ë�U��QQ��A3ʼnE��T)ASV3�W��;�u:�E�P3�FVh��@V��@��t�5T)A�4�0�@��xu
jX�T)A��T)A����;��������]�9]u��@�E�5��@3�9] SS�u���u��P�u�֋�;���~<���w4�D?=w�1��;�t����P�|��Y;�t	������؅�ti�?PjS�����WS�u�uj�u�օ�t�uPS�u��@�E�S�����E�Y�u3�9]u��@�E9]u��@�E�u�/Y���u3��G;EtSS�MQ�uP�u�7/���;�t܉u�u�u�u�u�u��@��;�tV��z��Y�Ǎe�_^[�M�3��y���Ë�U����u�M��y���u$�M�u �u�u�u�u�u�������}�t�M��ap��Ë�U��V�u�����v�iz���v�az���v�Yz���v�Qz���v�Iz���v�Az���6�:z���v �2z���v$�*z���v(�"z���v,�z���v0�z���v4�
z���v�z���v8�y���v<��y����@�v@��y���vD��y���vH��y���vL��y���vP��y���vT�y���vX�y���v\�y���v`�y���vd�y���vh�y���vl�y���vp�y���vt�y���vx�wy���v|�oy����@����ay������Vy������Ky������@y������5y������*y������y������y������	y������x�������x����,^]Ë�U��V�u��t5�;XAtP��x��Y�F;\AtP�x��Y�v;5`AtV�x��Y^]Ë�U��V�u��t~�F;dAtP�x��Y�F;hAtP�xx��Y�F;lAtP�fx��Y�F;pAtP�Tx��Y�F;tAtP�Bx��Y�F ;xAtP�0x��Y�v$;5|AtV�x��Y^]Ë�U��ES3�VW;�t�};�w蔗��j^�0SSSSS���������<�u;�u��ڋ�8tBOu�;�t��
BF:�tOu�;�u��M���j"Y����3�_^[]�U��V3�PPPPPPPP�U�I�
�t	���$��u���I���
�t	���$s��� ^�Ë�U��SV�u3�W9]u;�u9]u3�_^[]�;�t�};�w�Ŗ��j^�0SSSSS�N���������9]u��ʋU;�u��у}���u�
�@B:�tOu���
�@B:�tOt�Mu�9]u�;�u��}�u�EjP�\�X�x�����K���j"Y���낋�U��MS3�VW;�t�};�w�%���j^�0SSSSS讕�������0�u;�u��ڋъ�BF:�tOu�;�u����j"Y����3�_^[]�������������̋T$�L$��u<�:u.
�t&:au%
�t��:Au
�t:au����
�uҋ�3�Ð�����t���:u�
�t��t�f���:u�
�t�:au�
�t������������U��WV�u�M�}�����;�v;�����r�=h+AtWV����;�^_u^_]�+��u������r*�$��@��Ǻ��r���$���@�$��@��$�x�@��@4�@X�@#ъ��F�G�F���G������r��$��@�I#ъ��F���G������r��$��@�#ъ���������r��$��@�Iۢ@Ȣ@��@��@��@��@��@��@�D��D��D��D��D��D��D��D��D��D��D���D���D���D�������$��@���@��@�@�@�E^_�Ð���E^_�Ð���F�G�E^_�ÍI���F�G�F�G�E^_�Ð�t1��|9���u$������r
��$���@����$�0�@�I�Ǻ��r��+�$���@�$���@���@��@�@�F#шG��������r���$���@�I�F#шG�F���G������r���$���@��F#шG�F�G�F���G�������V�����$���@�I4�@<�@D�@L�@T�@\�@d�@w�@�D��D��D��D��D��D��D��D��D��D��D��D��D��D������$���@����@��@��@��@�E^_�Ð�F�G�E^_�ÍI�F�G�F�G�E^_�Ð�F�G�F�G�F�G�E^_�Ë�U��Q�e�S�]��u3��W��ru�{���vn�M�E�������tR:Q�uM�P���t<:Q�u7�P���t&:Q�u!�P���t:Q�u�E�9}�r��?�@��I��F�@��I��<�@��I��2�@��I��(�M�E����t:u@A�E�9]�r�3�_[����	+��������������U��V3�PPPPPPPP�U�I�
�t	���$��u���
�t���$s�F��� ^�Ë�U��E�\)A]�jh8�@���e��u�u��@�E��/�E���E�3�=�����Ëe�}��uj���@�e��E������E������U��WV�u�M�}�����;�v;�����r�=h+AtWV����;�^_u^_]�'��u������r*�$�ħ@��Ǻ��r���$�ئ@�$�ԧ@��$�X�@��@�@8�@#ъ��F�G�F���G������r��$�ħ@�I#ъ��F���G������r��$�ħ@�#ъ���������r��$�ħ@�I��@��@��@��@��@��@��@x�@�D��D��D��D��D��D��D��D��D��D��D���D���D���D�������$�ħ@��ԧ@ܧ@�@��@�E^_�Ð���E^_�Ð���F�G�E^_�ÍI���F�G�F�G�E^_�Ð�t1��|9���u$������r
��$�`�@����$��@�I�Ǻ��r��+�$�d�@�$�`�@�t�@��@��@�F#шG��������r���$�`�@�I�F#шG�F���G������r���$�`�@��F#шG�F�G�F���G�������V�����$�`�@�I�@�@$�@,�@4�@<�@D�@W�@�D��D��D��D��D��D��D��D��D��D��D��D��D��D������$�`�@��p�@x�@��@��@�E^_�Ð�F�G�E^_�ÍI�F�G�F�G�E^_�Ð�F�G�F�G�F�G�E^_������������̋�U��M�MZf9t3�]ËA<��8PEu�3ҹf9H�‹�]�����������̋�U��E�H<��ASV�q3�W�D��v�}�H;�r	�X�;�r
B��(;�r�3�_^[]������������̋�U��j�hX�@hPV@d�P��SVW��A1E�3�P�E�d��e��E�h@�*�������tU�E-@Ph@�P�������t;�@$���Ѓ��E������M�d�
Y_^[��]ËE��3�=��‹�Ëe��E�����3��M�d�
Y_^[��]Ë�U��QSVW�5�,A�K����5�,A���}��;�����YY;�����+ߍC��rwW�$���CY;�sH�;�s���;�rP�u�迵��YY��u�G;�r@P�u�詵��YY��t1��P�4��V���Y��,A�u�H������V�=���Y��,A�EY�3�_^[�Ë�Vjj ������V��������,A��,A��ujX^Ã&3�^�jhx�@���荭���e��u���Y�E��E������	�E�������l���Ë�U��u��������YH]�jh��@蕩���\����@x��t�e����3�@Ëe��E������"$让���hK�@�c���Y�`)AË�U��E�d)A�h)A�l)A�p)A]Ë�U��E�
\AV9Pt��k�u��;�r�k�M^;�s9Pt3�]�5l)A�w���Y�j h��@���3��}�}؋]��Lt��jY+�t"+�t+�td+�uD�������}؅�u���a�d)A�d)A�`�w\���]��������Z�Ã�t<��t+Ht�:����3�PPPPP�����뮾l)A�l)A��h)A�h)A�
�p)A�p)A�E�P賕���E�Y3��}���9E�uj�ۭ��9E�tP����Y3��E���t
��t��u�O`�MԉG`��u@�Od�M��Gd���u.�
PA�M܋
TA�PA�9M�}�M�k��W\�D�E���������E��������u�wdS�U�Y��]�}؃}�tj蠛��Y�S�U�Y��t
��t��u�EԉG`��u�EЉGd3�苧��Ë�U��E�x)A]Ë�U��E��)A]Ë�U���SVW莔���e��=�)A����h��@��@�����*�5��@h|�@W�օ��P�ؓ���$l�@W��)A��P�Ó���$X�@W��)A��P讓���$<�@W��)A��P虓��Y��)A��th$�@W��P聓��Y��)A��)A;�tO9�)AtGP�ߓ���5�)A���ғ��YY����t,��t(�օ�t�M�Qj�M�QjP�ׅ�t�E�u	�M �9��)A;�t0P菓��Y��t%�ЉE���t��)A;�tP�r���Y��t�u��ЉE��5�)A�Z���Y��t�u�u�u�u����3�_^[�Ë�U��MV3�;�|��~��u� A�(� A�
 A��M���VVVVV��Յ������^]�jh�@�g����]��u�u�g��Y���u��uS�of��Y��=�,A��3��}����j�#���Y�}�S�L���Y�E�;���;5�,AwIVSP�.�������t�]��5V���Y�E�;�t'�C�H;�r��PS�u��M�S����E�SP�"�����9}�uH;�u3�F�u�����uVW�5�#A�H�@�E�;�t �C�H;�r��PS�u���S�u��ՙ�����E������.�}�u1��uF�����uVSj�5�#A���@����u�]j�T���YË}���9=0(At,V�F���Y���������9}�ul��0�@P�k���Y��_����蛄��9}�th��q��uFVSj�5�#A���@����uV90(At4V�ݫ��Y��t���v�V�ͫ��Y�O����3��ƣ����<����|�����u�.�����0�@P�ރ���Y����jh��@�L����E���u�����	���3�;�|;p+Ar�߃���	SSSSS�g������Ћ���<��+A�������L��t�P�Y�]���Dt1�u�lYP��@��u�0�@�E���]�9]�t�~����M��a����	�M��E������	�E��Ǣ���u�.YË�U���0S3�E�VW��]�]��E��]�t	�]��E��
�E��]��E�P�s Y��t
SSSSS�X������M����u��@u9E�t�M������+ú���tGHt.Ht&轂�����蠂��j^SSSSS�0�)�������U����t��u��E�@��}��EjY+�t7+�t*+�t+�t��@u�9}����E���E���E���E���]�E�#¹;��;t0;�t,;�t=��=�@����E��/�E��&�E��=t=t`;������E��E�E���t�
�$A��#M��x�E��@t�M��M��M��t	}� t�M���E�릨t�M��h
����u�T�������7������E�= �@S�u���u�E�P�u�u��u�׉E��um�M���#�;�u+�Et%�e����S�u�E�u�P�u�u��u�׉E��u4�6������+A�����D0� ��0�@P�ŀ��Y虀����t�u���@;�uD�6������+A�����D0� ��0�@��V肀��Y�u�@�@;�u��I����
룃�u�M�@�	��u�M��u�6�	��Ѓ������+AY��Y�M����L��Ѓ������+A���D$� ��M��e�H�M���������Etqj��W�6������E�;�u����8�tM�6�,������j�E�P�6�]���������u�}�u�E�RP�6�y��;�t�SS�6蜻����;�t��E���0�@�@�}u�E�#�u	M�	E�E#�;�tD=t)=@t"=t)=@t"=t=@u�E���M�#�;�u	�E���]��E���E�@�]����E���#�=@��=�tw;����E�;��y��v��v0���f�E�3�H�&H�R�E��E��jSS�6������t�SSS�6�n��#ƒ���������j�E�P�6諱��������u�����tk�����}�uY�E����E�;������b������P���jSS�6�������C���SSS�6������#ƒ���������E�%��=��u�6�"���Y�}��j^�0���d=��uSj�6讹�������������E��ASS�6蓹������E��E��E�+�P�D=�P�6�/�������������9}�ۋ������+A�����D$�2M���0�������+A�����D$�M�������
ʈ8]�u!�Et��ȃ������+A���D� �}�����#�;�u|�Etv�u�@�@S�u�E�jP�u���W�u� �@���u4�0�@P�|����ȃ������+A���D� ��6�Y����6������+A�������_^[��jh�@�L���3��u�3��};���;�u�{��j_�8VVVVV�~{�������Y��3�9u��;�t�9ut�E%������@t‰u��u�u�u�u�E�P���j������E��E�������E�;�t�������3��}9u�t(9u�t�����������+A�D� ��7�CYË�U��j�u�u�u�u�u������]Ë�U���S�u�M��|Z��3�9]u8]�t�E�`p�3����E�9Xu&�u�u�u����8]����M�ap��9]u.��z��SSSSS��Oz����8]�t�E�`p������W�};�u.�z��SSSSS��z����8]�t�E�`p������NV�Mf�	�M�E����D�M�ti9]u��D�]����f�����U�:�u�]��Z��f��f�E��f��M�f;prf;pwfp�6f;pr0f;pw*fp�$�U���At
f������ʉM�f�u�f�����G�D�M�tH9]u�]��^��M:�t��f��f���G�M�f;Hrf;HwfH�6f;Hr0f;Hw*fH�$�U���At
f������ʉM�f�M�f;�u!f;�t	9]����8]�t�E�`p�3�^_[�����H8]�t�M�ap���U��j�u�u�u�����]Ë�U���S3�9]u3���W�u�M��(X���}�9_u&�u�u�u�����8]����M��ap��9]u+�x��SSSSS��x����8]�t�E��`p������mV�u;�u+�Zx��SSSSS���w����8]�t�E��`p������9�Ef��M�E�����D8tA9]u�3�D8t_8]�t�E��`p�3�^_[�ËE�:�u3����f��f�E��f�����F�D:t 9]u3����M:�t�f���f�F��f;�uf;�t�9]�`�������H8]�t��M��ap�냋�U��j�u�u�u�����]����U��SVWUjjhd�@�u�]_^[��]ËL$�A�t2�D$�H�3��TV��U�h�P(R�P$R���]�D$�T$���SVW�D$UPj�hl�@d�5��A3�P�D$d��D$(�X�p���t:�|$,�t;t$,v-�4v���L$�H�|�uh�D��I�D��_뷋L$d�
��_^[�3�d�
�yl�@u�Q�R9Qu��SQ��A�SQ��A�L$�K�C�kUQPXY]Y[����U��EVW��|Y;p+AsQ�������<��+A����<�u5�=�AS�]u��tHtHuSj��Sj��Sj��$�@��3�[��u���	��u��� ��_^]�U��MS3�;�VW|[;
p+AsS������<��+A������@t5�8�t0�=�Au+�tItIuSj��Sj��Sj��$�@���3���8u���	�@u�����_^[]Ë�U��E���u�$u��� �	u���	��]�V3�;�|";p+As�ȃ������+A����@u$��t���0��t��VVVVV�	�Qt��������^]�jh8�@�ߓ���}���������4��+A�E�3�9^u6j
蹈��Y�]�9^uh��FP��YY��u�]�F�E������09]�t����������+A�D8P�L�@�E�蟓���3ۋ}j
�y���YË�U��E�ȃ������+A���DP�P�@]�jhX�@�����M�3��}�j�K���Y��u���bj���Y�}��}؃�@�<�4��+A�����u���+A;����Fu\�~u9j
豇��Y3�C�]��~uh��FP��YY��u�]���F�e��(�}�u�^S�L�@�FtS�P�@��@낋}؋u�j
�v���YÃ}�u��F��+4��+A������u�}�uyG�+���j@j ����YY�E�ta���+A��p+A ���;�s�@���@
�`��@�E�����}����σ������+A�DW����Y��u�M��E������	�E��ّ���j踅��Y�U����}��}�M��f����$�ffGfG fG0fG@fGPfG`fGp���IuЋ}���]�U����}��E���3�+���3�+���u<�M�у��U�;�t+�QP�s������E�U��tEE+‰E�3��}��M��E�.�߃��}�3��}�M��E�M�U�+�RjQ�~������E�}���]�jh��@蘐���e�f(��E��#�E��=�t
=�t3��3�@Ëe�e��E������E�蚐��Ë�U���3�S�E��E�E�S�X��5 P��Z+�tQ�3���E�]�U�M���U��E�[�E�t�\�����t3�@�3�[������h+A3�Ë�U����u�M��O���E�M�U�Tu�}t�M���A#E�3���t3�@�}�t�M��ap��Ë�U��jj�uj�����]Ë�U�����A3ʼnE�V3�95�AtO�=xA�u��
�xA���u����pV�M�Qj�MQP�0�@��ug�=�Au�0�@��xuω5�AVVj�E�Pj�EPV�,�@P���@�
xA���t�V�U�RP�E�PQ�(�@��t�f�E�M�3�^�N������A��U���SV�u3�;�t9]t8u�E;�t3�f�3�^[��u�M��N���E�9Xu�E;�tf�f�8]�t�E��`p�3�@�ʍE�P�P���YY��t}�E���~%9M| 3�9]��R�uQVj	�p���@���E�u�M;��r 8^t���8]��e����M��ap��Y����n���*8]�t�E��`p����:���3�9]��P�u�E�jVj	�p���@���:���뺋�U��j�u�u�u������]���������Q�L$+����#ȋ�%�;�r
��Y���$�-���j舐��YË�U���VW�u�M��WM���E�u3�;�t�0;�u,��m��WWWWW��em�����}�t�E�`p�3���9}t�}|Ƀ}$ËM�S��}��~���~�E�P��jP�b���M���������B����t�G�ǀ�-u�M���+u�G�E���K���B��$�9��u*��0t	�E
�4�<xt
<Xt	�E�!�E�
��u��0u�<xt<XuG�G��������3�u���N��t�˃�0���t1�ˀ�a����w�� ���;Ms�M9E�r'u;�v!�M�}u#�EO�u �}t�}�e��[�]��]ى]��G닾����u�u=��t	�}��w	��u+9u�v&�<l���E�"t�M����EjX��ƉE��E��t�8�Et�]��}�t�E�`p��E���E��t�0�}�t�E�`p�3�[_^�Ë�U��3�P�u�u�u9T#AuhA�P�����]Ë�U�����A3ʼnE�j�E�Ph�u�E���@��u���
�E�P�\Y�M�3��J���Ë�U���4��A3ʼnE��E�M�E؋ES�EЋV�E܋EW3��M̉}�}�;E�_�5d�@�M�QP�֋��@��t^�}�uX�E�P�u�օ�tK�}�uE�u��E����u�u�袻����YF;�~[���wS�D6=w/���;�t8����-WW�u�u�j�u�Ӌ�;�u�3���P�L��Y;�t	������E���}�9}�t؍6PW�u��Z�����V�u�u�u�j�u�Ӆ�t�]�;�tWW�uSV�u�W�u���@��t`�]��[���@9}�uWWWWV�u�W�u�Ӌ�;�t<Vj�=���YY�E�;�t+WWVPV�u�W�u��;�u�u��JJ��Y�}���}�t�MЉ�u����Y�E�e�_^[�M�3���H���������Q�L$+ȃ����Y�Z���Q�L$+ȃ����Y�D���U����}��u��u�}�M�����fofoNfoV fo^0ffOfW f_0fof@fonPfov`fo~pfg@foPfw`fp������Iu��u��}���]�U����}�u��]��]�Ù�ȋE3�+ʃ�3�+ʙ��3�+���3�+����uJ�u�΃��M�;�t+�VSP�'������E�M��tw�]�U�+щU��+ى]�u�}�M��E�S;�u5�ك��M�u�}�M��MM�UU�E+E�PRQ�L������E��u�}�M����ʃ��E�]��u��}��]Ë�U��j
j�u�,�����]Ë�U���S3�VW9]���u�M��CG��9]u.��g��SSSSS��^g����8]�t�E��`p�������};�t˾���9uv(�g��SSSSS��g����8]�t�E��`p����`�E�9Xu�uW�u���8]�tD�M��ap��;�E��M�QP�@�E����M�QP�.��G�Mt;�t;�t�+���3�_^[�Ë�U��V3�95T#Au99uu�f��VVVVV��}f���������'9ut܁}���w�^]��V�u�u�u�����^]��jh��@���3��]3�;���;�u�f���WWWWW�f�������S�=�,Au8j�z��Y�}�S��z��Y�E�;�t�s���	�u���u��E������%9}�uSW�5�#A�4�@���装���3��]�u�j�zy��YË�U���(��A3ʼnE��pAVtj
�l���Y�����tj� ��Y�pA�������������������������������f������f����f�����f�����f������f�����������u�E���Dž0��������@�jP���������jP�1������������(�����0���jDž���@������,����\�@��(���P�X�@j���̋�U���SVW3�jSS�u�]�]������E�#ƒ��U��tYjSS�u�����#ʃ����tA�u�}+����;����Sj�<�@P�H�@�E���u�td����id���_^[��h��u�YY�E���|
;�r�����P�u��u��������t6�+��xӅ�wϋu�u��u��YY�u�j�<�@P�D�@3���d���8u��c���
���u��;�q|;�skS�u�u�u���#ƒ�����D����u��YP�8�@�����H��E�#‰U�u)�c���
�c����0�@��u�#u������S�u�u�u肩��#ƒ��������3�������U��S�]V�u������+A������0�A$�W�y�������@tP���tB��t&��t��u=�I��
�L1$��⁀���'�I��
�L1$��₀���a�
�I��
�L1$�!���_^[u��]���%�@]�U��EV3�;�u�pb��VVVVV��a����jX�
�
X*A�3�^]�3�PPjPjh@h��@� �@�xAáxAV�5@�@���t���tP�֡tA���t���tP��^Ë�U���SV�u�M��MA���]�;�sT�M胹�~�E�PjS�s���M���
����X����t������}�t�E�`p�����E胸�~1�]�}�E�P�E%�P�<���YY��t�Ej�E��]��E�Y��Ha���*3Ɉ]��E�A�E�j�p�U�jRQ�M�QV�p�E�P�����$���o������E�t	�M�����}�t�M�ap�^[���������������U��WVS�M�tM�u�}�A�Z� �I�&
�t'
�t#����:�r:�w�:�r:�w�:�u��u�3�:�t	�����r�ً�[^_����������������̋D$�L$ȋL$u	�D$���S��؋D$�d$؋D$���[��%��@(�6�P�d�z����������,�<�T�j�|�����������.�B�N�f�~���������������$2@Xhv~��������.H^x������&8Jr��������@�?@ǫ@��@v@��@�@1�RLp�p� Ah A(null)(null)EEE50P( 8PX700WP  `h````xpxxxx	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~EncodePointerKERNEL32.DLLDecodePointerFlsFreeFlsSetValueFlsGetValueFlsAllocCorExitProcessmscoree.dllruntime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...<program name unknown>Runtime Error!

Program: ccsUTF-8UTF-16LEUNICODE�����������������������������EEE���00�P��('8PW�700PP� (����`h`hhhxppwpp         (((((                  H����������������������          h((((                  H����������������������                                 H�����������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~�����������������������������������������������������������������������������������������������������������������������������HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$Fatal error in launcher: %s
rbFailed to open executableUnable to find an appended archive.Unable to read from file#!Job information querying failedJob information setting failedstdin duplication failedstdout duplication failedstderr duplication failedUnable to create process using '%s'Failed to get exit code of processFailed to find shebangExpected to find terminator in shebang lineExpected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to be able to allocate command line memory"%s" "%s" %sH�A��@RSDS���z~-�C��"Iu�G�c:\Users\Vinay\Projects\SimpleLauncher\dist\t32.pdbPVDhl������������l@�����������*@������������@������������@�����������#!@�����������.#@�����������=$@�����������/%@�����������w&@�&@������������;@�����������u?@������������B@�����������'E@����6E@������������F@�����F@������������J@������������X@������������[@�������������`@�`@�����������b@������������c@lc@������������g@������������p@�����������1t@������������u@�����������n~@�����������}�@������������@'�@�����������۪@�@�����������.�@�����������k�@o�@������������e�@�������������@�����������k�@�����������-�@�������������@�����������Y�@��@�����������e�@��@�������������@����(�6�P�d�z����������,�<�T�j�|�����������.�B�N�f�~���������������$2@Xhv~��������.H^x������&8Jr��������ExitProcessqSetInformationJobObject�GetCurrentProcess�WaitForSingleObjectgGenerateConsoleCtrlEvent�GetCommandLineAAssignProcessToJobObject�GetExitCodeProcess�CreateProcessA�QueryInformationJobObject�CreateJobObjectAdGetStdHandleGetLastError-SetConsoleCtrlHandlerGetModuleFileNameA�DuplicateHandleRCloseHandleKERNEL32.dll�HeapFree�HeapAlloc�EnterCriticalSection9LeaveCriticalSection�TerminateProcess�UnhandledExceptionFilter�SetUnhandledExceptionFilterIsDebuggerPresentrGetCPInfo�InterlockedIncrement�InterlockedDecrementhGetACP7GetOEMCP
IsValidCodePageGetModuleHandleWEGetProcAddress�TlsGetValue�TlsAlloc�TlsSetValue�TlsFreesSetLastError�GetCurrentThreadId�HeapCreate�VirtualFree�DeleteCriticalSection�VirtualAlloc�HeapReAlloc�Sleep%WriteFileoSetHandleCount�GetFileTypebGetStartupInfoARtlUnwindgMultiByteToWideChar�ReadFilefSetFilePointer`FreeEnvironmentStringsA�GetEnvironmentStringsaFreeEnvironmentStringsWWideCharToMultiByte�GetEnvironmentStringsW�QueryPerformanceCounter�GetTickCount�GetCurrentProcessIdyGetSystemTimeAsFileTime�GetConsoleCP�GetConsoleMode+LCMapStringA-LCMapStringWfGetStringTypeAiGetStringTypeWGetLocaleInfoA�InitializeCriticalSectionAndSpinCount<LoadLibraryAWFlushFileBuffers�CreateFileA�SetStdHandleWriteConsoleA�GetConsoleOutputCP$WriteConsoleW�HeapSizeSSetEndOfFileJGetProcessHeap�,A�,AN�@���D��@��@
		


!
5A
CPR
S
WYl
m pr	�
�
�	��
�)�
���
���                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZA�`�y�!�������@~�����ڣ ��@����ڣ ��A��Ϣ���[��@~��QQ�^� _�j�2�����1~����@����C0A0A0A0A0AXA��@x�@��@�A8A8AA���������[@`�@4�@	�@
p�@D�@�@��@��@��@d�@,�@��@��@��@H�@ �@!�@"x�@xd�@yT�@zD�@�@�@�0�@�����
x
��@��@��@��@��@��@��@��@��@��@��@��@ �@�@�@�@�@�@�@�@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@x�@p�@��@h�@`�@X�@L�@D�@8�@,�@(�@$�@�@�@��@	�A.TAX)AX)AX)AX)AX)AX)AX)AX)AX)AXA. ��p��PSTPDT�AA��������������������;Zx����0Nm����:Yw����/MlK(�p�������������0�eH�`�x�������	�B���D(�F���Nh�(T�%��y��x�h��h�H�Z�( @...GGGWWWiiiuuu����������������������������������̀�ww����ww||�����ww��������wwww��������ww��������f�wwwww|�����f�wwwwww����ff�wwwwww�����ff��wwwww���ffl����ww����ffffff��w����ffffffl�w������ffffff�w�����ffffff�|����������ff��������ffff�������ff��R\I���lffl���)����ff�ح���������2L���������18�������Ϥ"������A<��������ΣT��π�����U���������������������������؀����������������������?������������������?�?�?�?�?�?�������������( 444MMMSSSzzz������������������������������p�p�����{p{��f���fko�f�����_fffk�_�fff��[���f}��UUU�fL4�UUU_kJqO���_�~�'�[U_����U�����������wwwww{~����������������( @%%%+++000===AAAIIIMMMQQQVVVYYY]]]~dFgggjjjmmmrrruuu}}}�u?�z=�~;�gE�kC�oA�r@��:��I��b��pƏKУk(��,�1�?�5�<�\�C�K�Q�s�U�[�c�b�����������������������������������������ð����������������������������������������������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$"  _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_L'%$"_I_MMMMMMJJ__('%%_I_CEMIJJMEM_(''*_I_?BMDJEMDMF_)(-LI_MMMCMMMMM_________<____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/
N______MMMMJIDAI_9/	HJJMMJMMMJ??BAI_A7503	IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O;
@__C_C?J?AJI_?A_DJJI@O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ�����?������������������?������������������?�( 444MMMRRRYYY~eGuuu}}}�x>�iE�rC��E��~7�?�H�V�b�x����������������������������������������������������������������������������������/!P7pL�c�yϏ���1��Q��q�������������/Pp"�,�6�@�J�[1�qQ��q�������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������!%///* !*/"(%%'%/)
/!#''////+/+"*(/
/

!%(/
(

  (*/(///)
*/
	)*

	/"/////	/+///#
		+ !%//
+"*+'#+//+'!%*++$++!+!    !!!<(0` !!$&			&"

 ���W���������������������������������ܱ��Nj+<<</	&&&#&[[[?6666��׏��������������������������������������������Ҟ���BBB3"


mmm3����,����!!!4777&�����������������������������������������������������ʟ���}���}___E���OpppD���P,)+3���Z2226DDD(���,�����###5��������������������������������������������������������������������������������չ�������������5�������,�������������������������������������������������������������������������������������������������������������,������Ì222"��Є�����������������������������������������������������������������������������������������������������&&&2����   4888&�������������������������������������������������������������������������e��?��4��/��+���.���R�������ӎ����������$$$5��Ď���������������������������������������������������������������������D��@��;��7��3��/��*���&���"�����������������������������������������������������������������������������������������W��G��C��?��;��6��2��n������f��0�������������nj333"��ӄ��������������������������������������������������������������������O��K��G��B��>��:��5��p������i��$�����������!!!4888&���������������������������������������������������������������������S�N��J��F��B��=��9��5��0��,��(���������������%%%5��ǎ���������������������������������������������������������������������V�R�N��I��E���������������������������������������������������������������������������������������������������������ѹ���|J��q?��o@�����Z�U�Q�M��I��D��@��<��7��3��/��+���&���"���-����������������Ɍ444"��ք�������������������������������������������������̴��w<��u=��s>��q?�����]�Y�U�P��L��H��C��?��;��7��2��.��*���%���!����������������"""4888&���������������������������������������������������d��y<��w=��u=��s>�����a�\�X�T�P��K��G��C��>��:��6��1��-��)���%��� ���O������������Ñ%%%5��ʎ���������������������������������������������������A��{;��y<��w=��t>�����s�`�\�W�S�O��J��F��B��>��9��5��1��,��(���$���(����������������������������������������������������������������������9��|:��z;��x<��v=�������s�_�[�W�R�N��J��E��A��=��8��4��0��,��'���#�������������̌555"��ل���������������������������������������������������9��~9��|:��z;��x<���o�����������������������������������������m��8��3��/��+���'�����������"""4:::&������������������������������������������������������8���9��~:��|;��z;��w<��u=��s>��q?��o@��mA��kB��iC��gC�dD��uZ������;��7��3��.��*�������������Ǒ%%%5��̎���������������������������������������������������È>���8���9��}:��{;��y<��w<��u=��s>��q?��o@��mA��jB��hC��fD�~dE��uZ�����?��:��6��2��5�����������������������������������������������������������������������������Оa���7���8��9��}:��{;��y<��w=��u>��r>��p?��n@��lA��jB��hC��fD�}dE�����B��>��:��5��^������������ό555"��܄����������������������������������������������������������ѳ�„7���7���8��9��}:��{;��x<��v=��t>��r?��p@��n@��lA��jB��gC��eD�����F��A��=��9������������"""4;;;&�����������������������������������������������������������������ŌC���8���9��~9��|:��z;��x<��v=��t>��r?��p@��mA��kA��iB��gC�����I��E��L��������������ɑQQQJnnn����������~~~�������������������������������������������������������������������������������������������Į��q?��o@��mA��kB��iC�������������������������HHH�"""���������������vvv������������������������������������������������������������������9��~:��{;��y<��w<��u=��s>��q?��o@��mA��kB�������������:::�'''�___���������sss�ttt��������������������������������������������������������������8�Ϧu�����ǣv��y<��w=��u=��s>��p?��n@��lA��������888T����---6fffnddd�%%%�"""�����OOO�SSS������������������������������������������������������������ċD�ҧu�����ʤv��{;��y<��v=��t>��r?��p?��xM�����<<<�MMM�������̑&&&5����;;;�<<<�xxx�QQQ�;;;�KKK����������������������������������������������������������8���8��~9��|:��z;��x<��v=��t>��r?�̷������999�����������������������VVV�###�)))�444��������������������������������������������������������������������ѳ�͝b���@��~9��|:��z;��}C���g��˶����Ӎ���������󑑑�����ZZZ�lll�;;;�!!!�"""�)))�___���������������������������������������������������������������������������������������&&&2����:::�ppp�{{{�___�WWW�WWW�:::�!!!�"""�***�www�������������������������������������������������������������������"""4888&���,������̑999����Ԗ���JJJ�|||�lll�:::�"""�BBB�XXX�|||��������������������������������������������������������������������$$$6�������,��������������������������������uuu�KKK�CCC�@@@�...�www����������������������������������������������������������������������������������*������Ҍ666"������������������������KKK�aaa�LLL�WWW��������������������������������������������������������������@��������$����"""4;;;&���������������������nnn�fff�!!!�$$$�999������������������������������������������������������������444]ttt|������ȇ������ɑ&&&5��Ў������������������������vvv�mmm�VVV�{{{�OOO����������������������������������������������������������������ڥ�����������������������������������������������aaa�CCC�����ppp�������������������������������������������������������������������������ό555"��ބ����������������������������������|||�MMM�����fff���������������������������������������������������������������"""4;;;&�������������������������������������������\\\�����������������������������������������������������������������Ǒ%%%5��Ύ�����������������������������������������������������������������������������������������������ݧ�����������������������������������������������������������������������������������������������������������������ܦ������͌555"��ۄ�����������������������������������������������������������������������������������ۥ����"""4:::&������������������������������������������������������������������������������������ڤ������Ñ%%%5��ˎ�����������������������������������������������������������������������ܤ��������������������������������������������������������������������������������������������������ׇ
������ww���?ww�?�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww��ww��ww��ww��ww��ww��ww�?�ww��ww���ww���ww( @ ����������������������������������!!!0\\\JeeeQ666D555A0$
�������v�H��<��6��0��2��\�������7���q��������������������ڴ���vvvj&&&D1"����g�L��F��@��;��5������?��������������������������������������������������к����V�Q�K��E��?��9������(�����������a���V�������������������������������������[�U�P��J��D��>��8��2��-���������uuun{{{j���������������������������������������`�Z�T�O������������������������������������������������������������������������V��o@��lA�����b�_�Y�S�M��G��B��<��6��0��+���%���<���������������a���V�����������������������m��t>��q?��n@�����b�b�^�X�R�L��F��A��;��5��/��)���$���Y����������wwwn}}}j����������������������~C��v=��s>��p?�����b�b�a�]�W�Q�K��E��@��:��4��.��(���+���������������������������������������{;��x<��v=��s>�����b�b�a�[�V�P��J��D��?��9��3��-��'��������������a���V����������������������~:��{;��x<��u=���p���������������������������������r��=��7��2��,����������yyynj�����������������������9��}:��z;��w<��u>��r?��o@��lA��iB��fD�}dE�|cE�|cE���i���B��<��6��1��������������������������������������?��9��}:��z;��w=��t>��q?��n@��kA��iC��fD�}cE�|cE�}dF�����G��A��;��=�������������a���V���������������������ңi���8��9��|:��y<��v=��s>��q?��n@��kB��hC��eD�|cE�|cE�����L��F��@��m����������zzzn���j�������������������������ʓP���8��~9��{;��y<��v=��s>��p?��mA��jB��gC�eD�|cE�����P��J��\��������������������������������������������������������������������������������¯��mA��jB��gC�~dE��������������������������a���V��������������������������������������}:��z;��x<��u=��r?��o@��lA��iB��fD���������|||n���m���������������������������������������9��������w=��t>��q?��n@��lA��iC�������������JJJ��������������������������������������������őP��������y<��v=��t>��q?��n@��~Y������������VVV�???�www�����iii�����������������������������������Ρk���A��|;��y<��v=��yF���p��������>>>3@@@y����~~~obbb�000�kkk�@@@������������������������������������������������������������������---U��������������<<<�&&&�[[[�������������������������������������������������������6���uuu�sss�WWW�III�$$$�&&&�qqq�����������������������������������lllg|||s���4����bbb�hhhƑ�������UUU�000�QQQ�}}}��������������������������������---{bbb�����(����������������������iii�LLL�BBB������������������������������������������������������a���V����������������ggg�+++�NNN�������������������������������������������|||n���j����������������]]]�ttt�kkk�������������������������������������������������������������������rrr�www���������������������������Ӧ�������a���V���������������������������������������������������Ӧ����zzzn���j�������������������������������������������Ӧ�����������������������������������������������������������ˉ��?������������������?�?�?���������������?�(  ������C�������������������﫫�o���������I�����������������������������������������ਨ������������S��=��?���������������������������������_�Q�F����4���������������������������������a�Z��������������������������������������м���oE�����c�a�X�M��B��7��0��������������������~I��q?�����c�`�V�K��@��5��8��������������������z;��u=���q�����������������v�>��3����������������������E��y<��t>��n@��iB�~dE�}dF�������G��H������YYY�uuu����������ġ���=��x<��s>��mA��hC�}dE�}eG�����S���������444�|||����������������������������gC�}cE�������������������������MMM������������������~>�����q?��kA��iG������������������RRR��������������¢���G��u=��xK�ʺ��������������������������������������������������������������������������������������������������������������������������������������������~�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A  �(  �h00 �%   � h<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD�
0A0Z0z0�0�0�0�0�1�12>2T2`2v2�2�2�2�2�2�23-3J3g3v3�3�3�3�3�3�3�3�3�344%4K4t4|4�4�4�4�4�45F5�5�5�5:6B6W6b6�6�67+7z7�7�7�7�7I8O8o8�8�8�899-9:9F9V9]9l9x9�9�9�9�9�9�9:A:P:Y:}:�:@<�<a? �0�0�0�0�0�1+2�2�3�4A5f5w5~5�5�5�5�5�5�5	6C6H6O6U6�6�6�6�6�6�6�6�6�67777"7*727>7G7L7R7\7e7p7|7�7�7�7�7�7�7�7�8�8�9$:B:h:�:�:�:A>1?0��0�01�2�4�4�4�4�455
55)5�566-646L6x6�6�6�6A8j8K9�9�9;#;];j;t;�;�;�;�;�;�;�;<<8<o<�<�<'=D=�=�=>�>�>�>�>�>�>�>�>?4?=?C?L?Q?`?�?�?�?�?@D�0�01j1�12g2~2�2�2�2�2
33+323F3M3t3z3�3�3�3�3�3�3�3�3�3�3
444(464<4H4N4[4e4l4�4�4�4�4�4�45E5K5u5{5�5�5�5O6r6|6�6�67
7(7-757;7B7H7O7U7]7d7i7q7z7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7888 8&838S8Y8u8]9b9p9}9�9�9�9�9�9�9�9:#:):2:E:i:�:;,;1;t=�=�=�=�=�=�=�=�=�=�=>
>>>!>>>D>O>T>\>b>l>s>�>�>�>�>�>�>�>�>�>�>�>�>?q?P�
33L3r3�3�3�5�5�5�5
6b6<7D7\7t7�7�7;8P8�8�8�899>9Y9_9h9o9�9�9�9:::+:5:<:G:P:f:q:�:�:�:�:�:;;;;@;K;P;n;<,<I<�<�<�<�<�<�<�< =%=M=r=�=�=�=�=�=>,>P>d>�>�>�>??\?f?�?�?�?`�0*0|0�0�0�0�0111U1^1j1�1�1�1�1�1�1�1�2�23#3r3�3�5�5�5�5[6~6�6�6�6�67&7E7U7g7l7�7�7�8�9�9r:�:1<�<�<�=�=->:>??�?�?p�+0Z0�1V2h23(3H3b3�3�3R4�4�4�4�45=566A6�6�6�6�6�7�7�7�7)848>8O8Z8
::&:,:1:7:�:�:�:�:�:�:�:;8;�;�;�;�;�;�;<<E<h<u<�<�<�<�<�<�<�<=+=D=b=�=�=�>�>�?�?�D�0�031�2�3j4�4�4�45�5�56�6�6"7<7V7a79:9�:l;�;�;<-<S<�?�h�02J2o2O4n6r6v6z6~6�6�6�6�6�6�6�6�6�6�6/7_7�7�8�8G9:�:�:�:�:�:�:�:�:;�;-<:>L>^>�>�>�>�>�>�>�>�<�1�1�1�1�1�122-2S2q2x2|2�2�2�2�2�2�2�2�2�2�2�2V3a3|3�3�3�3�3�3�3
4444 4$4(4,404z4�4�4�4�4�5�5676z6�6�6�6�6�6�6�6
737Q7X7\7`7d7h7l7p7t7�7�7�7�7�768A8\8c8h8l8p8�8�8�8�8�8�899999Z9`9d9h9l9X:]:o:�:�:�:;#;�;�;�;�;�;N<�<�<�<�<�<�<�<�<�<A=F=�=�=�=�=�=�=> >&>�>�>�>�>�>�>??"?1?7?F?L?Z?c?r?w?�?�?�?�?�d	0H0O0U0|0�0�0R1X1�1�1�1�1*202<2�2�2�2�2"3,35�5�56 626E6W6�6�6�9�9�9:9:D:[:�:�:L;X?�?�?�xA0[0d0�0�0�0�01'1B1b1�1�12 2{2�2�2�2�2333�3�3�3�3,4K56{6�6�6�6�6�6�6�6�6�6�67-7�7@8�:�:;$;P;�;�;u<�<�?�8080{0�0�0�0�0�1�1"2)2�2�2343�3W4q4w4|4�4�4�4v6�P1T1X1\1`1l1p1�1�1�ld6h6�6787X7x7�7�7�7�7�7888X8x8�8�8�8�8�89$9(9H9h9t9�9�9�9�9:0:L:P:l:p:�:�:�:�:�:;0;P;p;|;�;�;�;�00�2�208(9�9�9�9�9�9�9:::::::P;\;d;l;t;|;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;<<`=d=h=l=p=t=x=|=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=>>>>>>>> >$>(>,>0>4>8><>@>P>X>\>`>d>h>l>p>t>x>|>�>P?T?python3.3/site-packages/pip/_vendor/distlib/t64.exe000064400000271000151733566750016051 0ustar00MZ����@���	�!�L�!This program cannot be run in DOS mode.

$x�<�r,<�r,<�r,���,=�r,5��,�r,5��,Q�r,5��,5�r,5��,?�r,<�s,]�r,5��,=�r,5��,=�r,5��,=�r,Rich<�r,PEd�1�R�"	��$)@�*w@�(`�PP�	����.textk�� `.rdata�+�,�@@.data�6�@�.pdata�	P
@@.rsrc�P`R@@.reloc��n@B��umL��I�SM�CM�K H��HH��H3�H��$0L�ʺI�CD�B�H�L$0H�D$ ��+�	L�D$0H�H`H�P����������H�\$H�t$WH�� �r�3�H��L�ًօ�x5�bLc�I������L��H��t�F��A;ID�I��A+��y�H�t$8H��H�\$0H�� _�H��H�XH�hH�PVWATAUAVH��@L��L���H�"H�H3�H�h����;�H���������H�L$xD�E3��H�L$x�xH�L$x������D��;�L�E3����wL�L$xD�uI��A�I����D�ML�vH��I�����H��H;�tH�L$ D�EH���&�A+����H����H�L$xA���;�H��L�E3����L�L$xL��I��H���nL�A�H��H���j�����H���H;�H��������H�L$ H��A�蜏+�H�����+\$0H�L$x+\$,��H�E3����xL�L$xA�I��I������H���H;�H�����s���N�\#�M;�r���fA9t
M+�M;�s��I��H�L$x�YL�\$@H��I�[0I�k@I��A^A]A\_^��H�\$H�t$WH��@H��H����H�#�D$0�L��H��L��H�׉t$(�d$ �Y��؅�u�5���D�H�t$X��H�\$PH��@_��H��(��u�
� ��t3����H��(�H�\$WH��pH��3�3���L��$�A��H��H��$��	H��H�D$ �����t��$��u��3�H�q��,�����$�0L��$�A���	H��
�H�^������3�H�L$pD�Bh�Z������D$ph�,�H��$�H�����H�=�������������H��$�H���s���H�4�����������H��$�H���J���H�+����d���H�
�����DŽ$����L�\$PL�\$HH�D$pE3�H�D$@H�d$8H�d$0�d$(E3�H��3��D$ �I�H���L�Nj����D�\$`H�T$PH��D���H�L$X�S�H�L$P�����H�L$PH��$����H����������$�������H�\$H�l$H�t$WATAUH��`H�:�H3�H��$P����8"t� ��"H����H���3�H;�u	L�%x��L�`����;�tI��A�$@:�u�L�-2�3�I��D��o��="��uL�-H��A�lH�L$@H����P�����H;�H���H�������H��H��H��H;�s�8
t�8
t
H��H;�r��H��H;���H������|���@�/���;�tH��@8.u�>#��H������O��������;�t
H�Ɗ@:�u�>!��H������#�������;�t
H�Ɗ@:�u�3�I��I��I�ɍP�H��H��L�A�I���I��H��H��L�I���H��I�\H���H���H;�H��@�ŋ����L�d$0L�
��L��H��H��L�l$(H�t$ �NH�������H��(��������������������ff�H;
!�uH��f����u��H���y�L��M�K H��8I�C(I�C�I�c���"H��8���@SH�� H���AH�����1H�CH���H�H���H�KH�
�H;�t����hu�y/H�H�OH9CtH�C����
Au	�Z&H�CH�C���u����C��o�H��H�� [����@SH��@�=Hc�uH�G�X���VH�L$ 3��&���H�D$ ��~L�D$ ����2D���H��@D�XA���|$8tH�D$0����A��H��@[���H��t7SH�� L��H�
�3�\���u� H��"������H�� [����@SH�� �d$@L�D$@�w3H��H��u9D$@t��H��t���L$@�H��H�� [����H�\$H�t$WH�� H��H���w|�H��HE�H�
!H��u ��9��7���4H�
�L��3���H��H��u,9ctH����9��t
��>��3�H����9��3�H�\$0H�t$8H�� _���H����@SH�� � ,���u��;�L�HcȺ��+��<H��H��u$�PH�ˉ�+��<H��H��u��x3�H�?�H�H��0H��H��t	H����E3�H�6�E�HI��L�LI��H����I��Hk�XL�I���tI���tM��u�����I��H��0I��u�3�H�� [���H��(�?�=�t�5=H�
"H��(����@SH�� H��H�
��H;�r:H��H;�w.H��H��������*H+�H��H��H��H��?�L�`A�k�
H�K0���H�� [��@SH�� ��H��}���2A�k�
H�J0���H�� [����H��(H��H;�r7H���H;�w+�qH+�H��������*H��H��H��H��?�L��?�
H��0�_�H��(���H��(��}�r���?�
H�J0�6�H��(���:�t
H�����u�:�uH���3����M��t
8t	H��I��u�I��H�H#��H�\$H�t$H�|$ ATH��@H�d$0E��H��H��3�H������u'�t�H�d$ E3�E3�3�3��3���3�H������u'�A�H�d$ E3�E3�3�3��V3��3�8����u$��H�d$ E3�E3�3�3��$3��g�SDH��H�D$PH��u���3��F�>u"���H�H�L$0�E��3��L��E��H��H���7AH��H���,���H��H�\$XH�t$`H�|$hH��@A\����@SH��0I��L��H��H��u%�WH�d$ �E3�E3�3�3ɉ�k���$A��H��I���~���H�H��t3����H��0[��H�\$ UVWATAUAVAWH��03�L��L��H�L$xM��M��H��H��$�H��L;�t)L;�t$L;�u9��H�\$ �E3�E3�3�3���3�H��$�H��0A_A^A]A\_^]�H��$�H;�t3�H��I��L;�v)H���tL��3�I����OH��H;�t�3�H��I��L;�w�I��I��GH��tD�O$�A�D�L$pH���g�GA����taLcwE��tS�/I;�DB�E��L;���L�H��H�L$x�ND)wA��L�t$xH+�HH��$�D�L$pL�H+��L�t$xE��I;�rhE��t 3�I;�vA��E��A���	H��D��I��D+��
D��I;�EG�A��H;�wuH���ME��L�t$xI�֋��uL�������tw��H+��s���H���zC���tdH��$�H��t*A�D�O$H��I��H��D�L$pL�t$xH��$�H������H���t
L��3�I���gN��H�d$ �"�����O H+�3�H��I�������O��I���������H��H�XH�pH�xL�` AUH��0I��M��H��L��M��trM��tmH�\$`H��u4H���t
L��3���M�^�H�d$ E3�E3�3�3��s3��1H���G����H�\$ L��M��H��I������H��H�����H���3�H�\$@H�t$HH�|$PL�d$XH��0A]����H��8L�L$ M��L��H���,���H��8����H��H�PH�HL�@L�H SVWATH��8H��3ۋ��H;���;�u'��H�\$ E3�E3�3�3�������H;���;�u'�i�H�\$ E3�E3�3�3������L�d$p�M�����G@��H���K���t*���t%Hc�H��H��L����Hk�XI�H�
]��H�
T�H��L���B8u%���t���tHc�H��H����Hk�XI��A8�t"��H�\$ E3�E3�3�3�����;�u*H���L��M��E3�H�T$hH���	��H�׋��M�H��������H��8A\_^[����H��H�XH�hH�pH�x ATAUAVH��0H��H��u'�.H!\$ E3�E3�3�3���D���X�J�{Lc�}�c3�A��D�B�M��xҋS��u
+s����;L����+k��t<I��I��H����I��Hk�X�D�tH�C�
�8
u��H��H;r�u������x��y��Z��������{u3��+{M��M��{I��A��K��Mk�XA�D�tz3�A��D�B�6M;�u#H�C��H��
�8
u��H��H;�r��c
sG�CE3���A���M�������;�w�Ct	�c
��s�{$H��J��A�Dt��+��D5H�\$PH�l$XH�t$`H�|$hH��0A^A]A\��H�\$H�L$WH��0H��3�H������u%�q�H�d$ E3�E3�3�3������\����H�������H��������H�\$HH��0_�H�\$H�l$H�t$WH�� �AA����H�٨�u�����j���3�AA��u	������H���3D�[E��y
A��D�[�A��tA��tA��
r�C$H���9HD�Nj֋��K���@�ōE�H�\$0H�l$8H�t$@H�� _���H�\$H�t$H�L$WH��0A�؋�H��3�H������u%�K�H�d$ E3�E3�3�3��`���R��t/��t*��t%��H�d$ E3�E3�3�3��-��������D�Ë�H�������H���{�����H�\$HH�t$PH��0_��H�\$WH��0��H��H��u#�H!\$ E3�E3�3�3������F�A�t:�i2H�ˋ��MH���G���lL��y���H�K(H��t
��H�c(�c��H�\$@H��0_����H�\$H�L$WH��0H�ك�3�H������u$��H�d$ E3�E3�3�3��+���&�A@t�a���H��������H���s��H�\$HH��0_���H�\$WH��0�MZf9^��uVHc���H�
N��H��8PEt3ۉ\$@�;�f9Ht3ۉ\$@�(���w3ۉ\$@�3�9���É\$@�3ۉ\$@����$��u"�=�t�~+��L)����%��"��u"�=�t�S+��!)���%�T��+��y
��%���H��
�@RH�y��<Q��y
���$�)N��y
�	��$����%��t����$L�2L�3H��
�����D$ ��u����'��'����|$@u����'���'���H�\$HH��0_��H��(�SH��(�V�����H�L$H��H�
u����L�`�L�\$XE3�H�T$`H�L$X�ӭH�D$PH�|$PtAH�D$8H�D$HH�D$0H�D$@H�D$(H� �H�D$ L�L$PL�D$XH�T$`3�聭�"H��$�H��H��$�H��H�y�H��H�C�H��$�H�D���	���H���H�D$hH���H�D$p��������bS3�r�H�
��]��=^�u
��:S����	�H��.�H�Ĉ���H��H�XH�hH�p �HWH�� H��H���>C�KHc�u��	�K ���4��@t
�~�"��3���t�{����H�C��H��K�C�{�����C�u/�7�H��0H;�t�)�H��`H;�u���-];�uH����\�C���+H�S+kH�BH��C$��;�C~D�ŋ��f[���W�� �K�?������t#���tH��H��H����H��Hk�XH��H�
��A t3ҋ�D�B�}RH������H�K�D$0���H�T$0��D����Z��;������D$0H�\$8H�l$@H�t$HH�� _���̅�~LH�\$H�l$H�t$WH�� I��I���@��L��H��@�����`�?�t���H�\$0H�l$8H�t$@H�� _����H�\$UVWATAUAVAWH���H�B�H3�H��$�3�H��H�L$hH��H�L$xI��M��D$`D��D$TD��D$H�D$X�D$P��E3�I;�uA�{3�E3�E3�3�3��H�\$ �8�$�tH��$��������A���C@L�
�����H���@H�{�A;�t(���t#Lc�L�
���I��A��H��Mk�XM��@4�
L��L�
���A�@8u)A;�t���tHc�H�ƒ�H��Hk�XI��@4�B8�tA�3�E3�E3�3�3��H�\$ ��
8�$�tH��$�����A���1E3�I;�t�@�/A��D�T$@D�T$DA��L��$�A:���H��$�A�H��A;�H��$����E�<XwH��B��@����A��Hc�Hc�H��B��
`����T$\��A;��y�������/�������������������<@�Ń�d�~����A�@��C����E�.��G�%��Stm��X����Zt��a���c���HI�EI��I;�t/H�XI;�t&A���s��D$P+���D�T$P�H�����A��0uA��I�]E;�A�ƹ���D�I��A���I;��D$PHDH�H����A��0uA��I��A��t,E�M�H��$�H�L$DM���3]E3�A;�t�D$X�A�E��D$D��$�H��$��M�D$p@�� A��@E;�H��$�A���-A��k��e���g~σ�i����n����o����pte��s�������u����x���'�S��fD9t	H��A;�u�H+�H��!I;�HD.�H���
��D8tH��A;�u�+ˉL$D�A�A����D$`A�E��y`Q�D$L0A�Q�D$M�SA�E��yDA��	�=I�}I����YE3�A;��x���A�� tf�7��7�D$X�lA��@A�
�T$HA��rA��s
M�EI���.I��A�� tA��@tM�E��E�E��A��@tMcE��E�E�A��@t
M;�}I��A��A��r
A��rE��E;�}A��A��E;�EO�D�|$`I��H��$�H���#ʉL$HA��A��A;�M;�t 3�I��Ic�H��L���B0��9~ALjH����H��$�A�����+�H��A��	�D$D�A;�t	�;0�H��D$D�0�u@��guAA��9E;�EO�A���~)A��]Hc��$H��$�H��tH�؋��A��I�EH�
��I��@��Hc�H��$��xH�L$xD��H�L$0�L$pL�ƉL$(H��$�H��D�t$ ��A��3���tD;�uH�
���0H�T$xH���3�@��gu;�uH�
w��H�T$xH��Ѐ;-uA��H��H���VE3҉D$DD9T$X�KA��@t1A��s�D$L-�A��t�D$L+��|$H�A��t�D$L ��|$H�t$TH�l$h+t$D+�A��uL�L$@L�ŋֱ �T���L�L$@H�L$LL�ŋ��YA��tA��uL�L$@L�ŋֱ0�#����|$D3�9D$Ptu;�~qH��D�MH��$�H��$�A���H����XE3�A;�u2��$�A;�t&L�D$hL�L$@H��$��YE3�A;�u�H�l$h�#H�l$hA�ljD$@�L�L$@L�ŋ�H����XE3ҋD$@A;�|A��tL�L$@L�ŋֱ �m���E3�H��$�I;�tH���Q�E3�L��$�H��$��t$@�T$\L�
��A�@�/A:��$���D8�$�tH��$�������H��$�H3���H��$ H���A_A^A]A\_^]�@��It:@��ht+@��lt
@��wu�A��돀?lu
H��A���A���w���A�� �n����A��<6u�4uH��A���O���<3u�2uH��A���7���<d�/���<i�'���<o����<u����<x����<X����D�T$\H�T$x@��D�T$P�\S3�;�t!H�T$hL�D$@@���W@�/H��@:��H�T$hL�D$@@����VE3����@��*uE�uI��E;������E�����C��@��D�tH��}���E���u���@��*uA�EI��A;‰D$T�Z���A������D$T��@�ōDHЉD$T�:���@�� tA@��#t1@��+t"@��-t@��0����A������A������A�����A����A�����D�T$pD�T$XD�T$TD�T$HE��E��D�T$P�����*E3�E3�3�3�H�t$ ��@@8�$��w������H�
9��@SH����d$pH�L$t3�A���X7L�\$pH��$H��$L�\$HH�D$P�;�H��$H�T$@H��E3�荟H��t;H�d$8H�T$@H�L$`H�L$0H�L$XL��H�L$(H��$L��H�L$ 3��I�� H��$�H��$H��$�H��$�H��$��D$p��D$tH��$����3ɋ�s�H�L$H�`���u��u�H�@E�����H��4�H���[����H�\$H�l$H�t$WH��0H��H�
��A��I��H���H��tL�T$`D��L��H��H��L�T$ ���%���DL�\$`D��L��H��H��L�\$ �h���H�\$@H�l$HH�t$PH��0_����L�
��3�I��D�@;
t+��IЃ�-r�A�w�
Á�D������AF��H�A�D���H��(��H��u	H����H��H��(�H��(�H��u	H����H��H��(�@SH�� ���H��u	H����H����jL���H��tL�P���;���A�H�� [���H�\$H�l$H�t$WH��`3�M��I��H��L��L;�u'�L���E3�E3�3�3�H�\$ ��b������L;�tH;�t�L��$�����A��L;�L��$�H�T$@G�H�T$0H�L$0I���D$HB�D$8A�Ӌ�H;�t7;�|%�l$8x	H�D$0��H�T$03�������t���9\$8�\.��ÍC�L�\$`I�[I�kI�s I��_��H��H�XH�hH�pH�x ATH��0I��I��H��H��M����M��uH��uH����3��H����H����I;�vP�(���L�FH�
�R�H�D$hL��H�D$(H�D$`H��H�D$ ������uo���8"�����������H�
eRL��D� H�D$hL��H�D$(H�D$`H��H�D$ �4����D����uH���u����8"uC���D� �9��y8����u-�w����"��j����H�d$ E3�E3�3�3�������H�\$@H�l$HH�t$PH�|$XH��0A\��H��8H�D$`H�D$(H�d$ ���H��8���H�\$H�l$H�t$WH�� H�YH��H��L��3��c2E3�H�}A�KA��D�]D�]D�]f�H�=��H+���H��H��u�H����9�H��H��u�H�\$0H�l$8H�t$@H�� _���H�\$H�t$WH��H���H3�H��$pH��IH�T$P�ף����=3�H�T$p���H��;�r��D$V�D$p H�|$V�)�WD��D;�wA+�I��J�LpD�B� �u1H�����uӋF�d$8L�D$p�D$0�FD�ˉD$(H��$p�3�H�D$ �c�d$@�F�V�D$8H��$p�\$0H�D$(L�L$pD��3ɉ\$ �\`�d$@�F�V�D$8H��$p�\$0H�D$(L�L$pA�3ɉ\$ �&`L��$pH�N3�A�t�	��p�A�t�	 ��p���ƁH��H��I��H��u��?3�H�ND�B�A�@ ��w�	�B �A��w�	 �B��Ɓ��H��;�r�H��$pH3����L��$�I�[I�s I��_��H�\$WH�� ��
H������
��tH���t	H����n�
��H���H�\$0H;��tDH��t��uH�C�H�L$0H;�t����H�]�H���H�O�H�D$0�H�\$0�
�H��u�K �&H��H�\$8H�� _�@SH��@��H�L$ 3��\���%	����u%����L��|$8tSH�L$0�����E���u������ԃ��uH�D$ ����@뻀|$8tH�D$0������H��@[�H�\$UVWATAUH��@H���H3�H�D$8H���I���3ۋ�;�u
H�������L�-Y���H��I��A�98�'A�I�H��0��r����������k�;���H�T$ ��>�;���H�N3�A��.�~�^D9d$ ��H�D$&8\$&t-8Xt(�8�H;�w+�H�T7I�I+�u�H��8u�H�F���I�I+�u��N��t(��t��
tA;�t�����������FD�f��^H�~�ùf���9"����������H�N3�A��;-H�lmL���H�A�M�D�I��A8t18Yt,��A;�wL�L2A�A�A�AM�;�v�H��8u�I��M�M+�u��~��D�ft$��t��
tA;�u��������^H�VI�|���H��f�H��I+�u�H���|���3�H�L$8H3��9��H��$�H��@A]A\_^]��H��H�XH�pH�xL�` AUH��0��A���H������H��������D��;C��� �@H��3�H;��|H���H��A� ��^�;H��A������D��;��$H�����uH���L�%>�I;�t�����L�%+�H��������	�D����
���C�>��C�9��C�4��׉T$ L�s�����}Hc��DKfA��H�*�‰T$ ��׉T$ ��}HcʊDB����‰T$ ��|$ ��}Hcϊ�B����lj|$ ��H�����uH�
��I;�t���H�u���
���+���u&L�%)�I;�tH������������3�D��A��H�\$@H�t$HH�|$PL�d$XH��0A]�H��(�=��u����������3�H��(�H�\$H�t$WH�� H��(H��H��tyH�
�H;�tmH��H��ta�8u\H�� H��t�9u�#��H��(�?bH��H��t�9u���H��(��aH������H��(����H��0H��tG�8uBH��8H�����H��H��H+����H��PH+����H��0���H��XH�,�H;�t��`u�]_H��X�]��H�{X�H���H9G�tH�H��t
�9u�5��H��tH�OH��t
�9u���H�� H��u�H��H�\$0H�t$8H�� _������H��H��t�H�� H��t�H��H��t�H��0H��t�H�AXA�H�3�H9P�tH�H��t�H�x�t
H�PH��t�H�� I��u�H��X�`����H����A���D	H��H��t�DH�� H��t�DH��H��t�DH��0H��t�DH�AXA�H���H9P�tH�H��t�D
H�x�t
H�PH��t�D
H�� I��u�H��X�D�`H������@SH�� H��H��tAH��t<L�L;�t/H�H�����M��tI���%���A�:uH��L;�t���H���3�H�� [��@SH�� ��H�؋���
��tH���t��H����+���H���H���V���H�ع�H��u�K �pH��H�� [����H�%ј�3�H�%ǘ���H�%Ř�H��(�
�����t
�ǘ�
���H��(����H�\$WH�� H��H��H���H����Aǁ�ƁtCƁ�CH���H����
�G�H�����
�1��'�H���H��uH��H���H����������H�\$0H�� _���H�\$WH�� �0��
�����җH��H��uH�H���%H��H��t3�
��H����H�˅�t3������H�K������3ۋ���H��H�\$0H�� _�@SH�� �q���H��H��u�H��H��H�� [�H���+H�\$WH�� H��H�I8H��t�$��H�KHH��t���H�KXH��t���H�KhH��t���H�KpH��t����H�KxH��t����H���H��t����H���H�/�H;�t����
��H���H�L$0H��t��uH���H�L$0H;�t�}����
�j��`�H���H��t+H����H;=L�tH���H;�t�?u	H��������H�����H�\$8H�� _����@SH�� �����t`H�
�������	����tH����=H��H��t1�
��H��ƕ��t3�H�������ʕH�K��������3�H�� [����H�l$H�t$WH��`Hc���H�L$@I���?��D�_A��wH�D$@H��@�y���H�T$@��@���z=���t@��$�@��$�Ƅ$�D�J�@��$�Ƅ$�D��H�L$@�T$8L��$��A�D$0�AH�L$@�D$(H�D$pH�D$ ��T��u8D$XtH�D$P����3���D$p#ŀ|$XtH�L$P����L�\$`I�kI�s I��_���̉L$H��(E3��3���H�1�H��t#L�D$0A�3�H���D$0�n��H��(�H�\$WH��0I��H��H��t23�H�B�H��H;�s$�L�H�d$ E3�E3�3�3���a�3��]H���H��HD�3�H���wH�
���PL��B�H��u-�=�tH�����u�H��t���H��t�H�\$@H��0_��@SH�� �������H�
�������H�� [H�����@SH�� ��H�
����H��tH�c�H��z�H��t���H�� [����@SH�� ����������̹���̹��
��H;�s-H�\$WH�� H��H��H�H��t��H��H;�r�H�\$0H�� _��H�\$WH�� 3�H��H��H;�s��uH�H��t��H��H;�r�H�\$0H�� _����H�\$WH�� H�=����tH�
���F_��t������;H���H�
ϓ�~�����uZH�
�-�v^H���H�=���H�H��t��H��H;�r�H�=O�tH�
F���^��tE3�3�A�P�.�3�H�\$0H�� _��H�\$H�t$D�D$WATAUAVAWH��@E���D����
��=�������D�%������H�
�����H��H�D$0H����H�
���v���H��H�D$ L��H�t$(L��H�D$8H��H�|$ H;�r�?���H9u��H;�r\H��7���H���#���H���H�
7�����H��H�
 �����L;�uL;�t L��H�\$(H��H�\$0L��H�D$8H��H�D$ �H���H�
q����H���H�
~�����E��t
��yE��u&���A�L$�`A������A��G��H�\$pH�t$xH��@A_A^A]A\_���E3�3��j�����E3�A�P�\���3�3�D�B�O�����̺3�D���=����@SH�� ����H��H���H���
`H����H����_H����_H���:]H���#H���]H�
�������H���H�� [��H�\$H�|$L�l$ AVH��0L�5����3�I��;t��H����r�����a���|��a��u
�=��a�����H�=P�A�L�3�H��I���,W��tH�d$ E3�E3�3�3��7�H�1�A�3��&��3���u1L�ЗH�
�����V��tH�d$ E3�E3�3�3����H�
���7H��H��<vFH�
���m7H���L�s�H�L8�A�H+��U��tH�d$ E3�E3�3�3���L�<�I��H����T��tH�d$ E3�E3�3�3��`�Lc�I��H��M�O�D���T��tH�d$ E3�E3�3�3��1�H���A� H���8^�E����H��H��t2H���t,Hc�H�I�L��6I�T�H�d$ L�L$HL��H���H�\$@H�|$PL�l$XH��0A^����H��(��_��t��_��u�=��u����������H��(��H�
q��@SH�� H��H�
`��?�H��tH��Ѕ�t��3�H�� [���H��H�XH�pH�xL�` AUAVAWH��H�L$ �9���XD�b�I���L��E3�I;�u���{H���A�̉
��HL;�sCE�{I��A�C	
E�{E�{8A�C9
A�C:
E�{PE�{LI��XH���HL;�rË
n�fD9|$b�IH�D$hI;��;L�hHc0I��9L�;���L�54��XI���_L��I;�tiI���
�Aĉ�I��L;�sAE�{I��A�C	
E�{A�c8�A�C9
A�C:
E�{PE�{LI��XI��HL;�rŋ��H��;�|������L�5��A��A;�~~H�>�tkH�>�teA�Et^A�EuH����A;�tILc�I��H��A��Mk�XM$�H�I�$A�EA�D$I�L$���>[A;�tA�D$�������I��H��;�|�E��I��H��Hk�XH
�H�;�tH�;�t�K���C�A�D$���Ƀ�������E;�D��H��H���tJI;�tEH����A;�t7H�3����u�K@�	��u�KH�K���ZA;�t�C����.�K@H�����A��H��H���Q����
^����3����L��$�I�[ I�s(I�{0M�c8I��A_A^A]����H�\$H�l$H�t$WH�� 3�H���H���d��H��H��u(9&�v ���D���D;�A��G�;�u�H�l$8H�t$@H��H�\$0H�� _�H��H�XH�hH�pH�x ATH�� 3�H��H��A��E3�H��H���1���H��H��u*9��v"����D���D;��A��AG�A;�u�H�l$8H�t$@H�|$HH��H�\$0H�� A\��H��H�XH�hH�pH�x ATH�� 3�H��H��A��H��H���[H��H��u/H��t*9%�v"���D���D;
�A��AG�A;�u�H�l$8H�t$@H�|$HH��H�\$0H�� A\����H�\$H�t$ATH��03��N�j��^�\$ ;��}iLc�H���J�<�tPJ��A�t�F�����t�Ɖt$$��|1H���J��H��0���H�
~�J���
���L�n�K�$��É\$ 돹����H�\$@H�t$HH��0A\�H�\$H�t$WH�� �A3�H��$<u?�At6�9+y��~-�|H�SD�Nj��b-;�u�C��y��C��K ��H�K�c��H�t$8H�H�\$0H�� _����@SH�� H��H��u�5�,�j�����t����csH������Z����3�H�� [��H�t$H�|$L�d$AUAVAWH��0D��E3�3��N���3��|$ A��;=N���Lc�H�6�J�<�tjJ��B�t`���f����H��J��A�t5A��u�9���A;�t%A��D�d$$�E��u�At����A;�AD��t$(H���J�������lj|$ �n�����@A��AD��H�t$PH�|$XL�d$`H��0A_A^A]ù������H�\$H�t$H�|$ATH�� L�%��3�3�I�܃{u%Hcƺ���H��H�:�H��H��U��t-H��H����H;�|øH�\$0H�t$8H�|$@H�� A\�Hc�H�I�$�3�����H�\$H�l$H�t$WH�� H�q�H�-��H��H�7H��t�tH��ȅH���H���H�'H��H;�|�H�H��t�{u���H��H;�|�H�\$0H�l$8H�t$@H�� _��Hc�H���H�H��H�%��H�\$H�t$H�|$AUH�� HcپH�=��u�P����N� �������H��H�L�-��I�|�t���{�(���H��H��u�����3��Z�
�f�I�|�u/��H���T��uH���L�������3��I�\��	H���.����H�
������H�\$0H�t$8H�|$@H�� A]�H�\$WH�� Hc�H�=�H�H�<�u�����u�H�U�H��H�\$0H�� _H�%L�H��H�XH�hH�p H�PWATAUAVAWH��@M�yM�!I�q8M+�AfM��H��L����3�H�H�L�@�9>�+H�^�C�L;����C�L;����{���;t�H�L$0H��I�Ѕ���~sA�}csm�u(H�=;�tH�
2��O��t�I����KA�H��I��7I�F@�SMcMH�D$(I�F(I�M��H��H�D$ �?��:��H��;>sj�>���3��fI�y 3�I+�9.vTH�^�K�L;�r>�C�L;�s6H;�rH;�sA�E u/�;t	�H;�t#�H�T$xIDZI�D�C�M�A���H��;.r��L�\$@I�[0I�k@I�sHI��A_A^A]A\_����H�\$H�l$VWATAUAWH��0�-D�I��E3�E3�E3ۀ: E�yE��H��L��uI߀; t��;at?�;rt3�;wt'�
��H�d$ E3�E3�3�3�����3��9��3�A���	��I�A�׊����A�������ȃ�S~to�� ����tLA+�tB��t+��
t���u���E����E�׃�����@��@����@�E���w@��uq�������jE��u]E�׃� �]��TtJ��t:A+�t'��t������A��u3���5E��u(E�����'E��uE�����A��u�����s3����Iߊ������E�����I߀; t�H�
��A�H���a�������H���I߀; t��;=�n���I߀; t�H�r�A�H���`��u
H�����MH�[�A�H����_��u
H�����*H�H�A�H����_������H�����I߀; t��;���H�L$hE��D��I���D$ ��d]�����D=}�!F�D$hH�&H�fH�f(�F�nH��H�\$`H�l$pH��0A_A]A\_^�H�\$H�t$WH��03ۍK�7����3��|$ ;=����Hc�H���H�<�tkH��@�uV�`rO�G���w�O�
�������H�S�H���萹��L�A�I��@�tH�Ћ�����H����lj|$ �x���Hc��X��H�
�H��H�
��H�<�tXH��H��0���N��uH�
��H���d���L���I�$��$H���H��H��0��}L���I���cH��t�c��cH�cH�#H�c(�K�����H��H�\$@H�t$HH��0_����������ff�H���M3�M3�H�d$ L�D$(�sH����������fDH�L$H�T$D�D$I� ��������f��������f�����H�\$H�t$WH��0H��H��u$���H!|$ E3�E3�3�3�������A����@���t�� �A�����A�u�	$�H�AH�H����	D�G$H�W���M�G����������G�u_H���	���t<H���	���t/H���	H��H�5��Hc�H���o	D��A��Mk�XL��L�#�A�C$�<�u�o
�$u�Gt�g
r�G$H��O�H��H���������	G�g��H�\$@H�t$HH��0_���H�T$�L$SUVWATAUAVAWH��XA�����Hc�A��D�d$4�\$8A;�u�H��3��8����	�3�;���;����H��L��L�
����I����K���@4Hk�X�D1��������v�����8�������;������H;�t�D�|18A�E�A�A�σ�t��u��Шt���L���d��Шt���A;�AB؋���L��H;�u�H����]����=��$�3�D�B�xL�
ə��L��K���@4L�\0@K���@4I��A�
�D0H���L0	A:���;���A�MK���@4A��A�I�UA�h�D�D0	D:�tbK���@4�L09A:�tQ;�tM�
K���@4A�H��A�h�D�D09A��u.K���@4�L0:A:�t;�t�
K���@4H��A�h�A�D�D0:K���@4L�L$0D��H�1H�|$ ��z;���HcT$0;�����H;���L������K���@4�D0��yA����;�tA�}
u�L0��d0�Hc�I��M��I�H�D$@L;��:�
A�$<�
@:�t
�H��I����H�D$@H��L;�sI�D$�8
u	I���L���K���@4L�L$0H��$�H�1A�I��H�|$ ��y;�u
�Ix;�u{9|$0tuL�ؗ��K���@4�D0Ht"��$�
t'@�+K���@4��$��D1	�GI;�u��$�
u�
�3��$�A�H���%��$�
L�n���t�L�c���@�+H��L;d$@����K���@4�D0@u�L0�	A�$�H�Ë�A+�A����;���A�I+��uI��A�����I;�rI+�A��B8�P t��B��P ;�u����*A�����;�uHc�H��^K���@4�D0Ht;I߃��L0	|�K���@4I߈D19��u�K���@4I߈D1:Hc�H+����$���E��Hc���D$8L��$�A+���D��M�ʼnD$(3ҹ�L�|$ ��w��;�u�yv�����A����D�d$4;�H�����J���@4@���|0H�;׺
tfA9Uu�L0��d0�Hc�I��M��N�<(M;��{�
A�$f���Ef;�tf�H��I���%I�G�L;�sI�D$f9u	I����L���K���@4L�L$0H��$�H�1A�I��H�|$ ��v;�u��u;���9|$0��L����K���@4�D0HtF�
f9�$�tKf�+��$�K���@4�D1	��$�K���@4�D19K���@4�T0:�WI;�u�
f9�$�uf��>��$�H�����D�B�7�
L�����f9�$�t��
L�k���f�+H��M;�������"K���@4�D0@u�L0�A�$f�H����A+�D�d$4L��$�M;�tI���(���A���DD�A���i�et��u�K���	�`���������muD��뮋��d������3��)�6���8����	E3�E3�3�3�H�|$ �%����H��XA_A^A]A\_^][��H�\$H�t$�L$WATAUAVAWH��0A��L��Hc����u����3ۉ����	���3�;���;=s���L��L��I��L�=d�A��Mk�XK��B�L ��u.�x����Q���	H�\$ E3�E3�3�3��g�������A�������;�u+�:�������H�\$ E3�E3�3�3��)�����n����V�K��B�D tD��I�Ջ��s�����������	����������[W���)���������	H�\$ E3�E3�3�3������H�\$hH�t$pH��0A_A^A]A\_���H��8H��u%�^��H�d$ E3�E3�3�3���s������AH��8���H�\$H�t$WH��0I��I��H��M��u3��fH��u%�	���H�d$ E3�E3�3�3ɉ������<M��tH;�r
L��H���T3�L��3��HH��t�H;�s����"뮸H�\$@H�t$HH��0_��������������������ff�H��I��rS��I�I��I��@rH�ك�tL+�H�H�M��I��?I��u9M��I��I��tfff��H�H��I��u�M��t
�H��I��u��@fff�ff�I��s0H�H�QH�QH��@H�Q�H�Q�I��H�Q�H�Q�H�Q�u��fDH�H�QH�QH��@H�Q�H�Q�I��H�Q�H�Q�H�Q�u��$�T�����H�\$H�|$ATH�� H��������������d���H��0H;�u3���R���H��`H;�uw����CucL�%��Hc�I�<�u+����I��H��uH�C H�CH���C$�C�I���C$�CH�KH��K��3�H�\$0H�|$8H�� A\���̅�t0SH�� �bH��sH�����c���c$H�#H�cH�� [����H�\$H�t$WH�� Hc�A�������RH���u�_���	���RD��E3���H���p�����u�Fo�3���t	���g����H��H��H��H����H��Hk�X�d���H�\$0H�t$8H�� _���H�\$H�t$�L$WATAUAVAWH��0E��D��Hcك��u����3��8����	����3�;���;����H��L��I��L�=t���Hk�XK���L0��u+����8�c���	H�|$ E3�E3�3�3��y�����m���=R�K���D0tE��A�Ջ�����������	�0���8�����R���)����8�����	H�|$ E3�E3�3�3��
����H�\$hH�t$pH��0A_A^A]A\_����H�\$WH�� Hc����$QH���tYH������u	@���u
;�u�@`t�P�H����PH;�t����PH���m��u
�]m���3ۋ��PL��H��H��A��H��H��Mk�XB�D��t���R�����3�H�\$0H�� _�H�\$H�t$ �L$WATAUH��0Hcك��u���3��8�����	����3�;���;����H��L��I��L�-����Hk�XK�D��L0��u+����8�|���	H�|$ E3�E3�3�3�������a���VP�K�D��D0t���������9���	������P���)�@���8����	H�|$ E3�E3�3�3��/����H�\$`H�t$hH��0A]A\_�@SH�� �A�H��t"�AtH�I芤���c����3�H�H�C�CH�� [��H��(H��8csm�u+�xu%�@ = �t=!�t="�t=@�u�k9�3�H��(����H��(H�
������k3�H��(���H�\$H�l$H�t$WH�� H�����E3�H��I;���H���Lc!�H��9:tI��H��H��H�H;�r�I��H��H�H;�s9:tI��I;��CL�BM;��6I��u
L�ZA�@��%I��u���H���H����J����Lc���
��A�M��D;�}*I��H���A��I��M�\��
_��]��D;�|ځ:�����uǃ���v�:��uǃ���b�:��uǃ���N�:��uǃ���:�:��uǃ���&�:��uǃ����:��u
ǃ������A�Љ���L�ZA��H������3�H�\$0H�l$8H�t$@H�� _���H�\$H�l$H�t$WH��0�=m�u���H��3�H��u����<=t��H����H�\���u�G�Hc��G�H��H�ųH��t�H����;teH����;=�ptCHc�H����H�H��trL��H��H���1��tH�d$ E3�E3�3�3�轿��H��Hc�H؀;u�H�W�H���W���H�%G�H�'�q�3�H�\$@H�l$HH�t$PH��0_�H�
�����H�%������H��H�XH�hH�pH�x ATAUAVH�� L�l$`M��I��A�eL��H��A�H��tL�I��3�;"u3���@�"��H�Ë��9A�EH��t��H���3H�Ë��=O��tA�EH��t��H��H��@��t��u�@�� t@��	u�H��t	�G��H��3��;���; t�;	uH����;��M��tI�<$I��A��3��H����;\t��;"u6��u��tH�C�8"uH���3�3҅����������H��t�\H��A�E��u���tO��u< tG<	tC��t7���`NH��t��t�H�ÈH��A�E��H�����tH��A�EA�EH���Y���H��t�H��A�E����M��tI�$$A�H�\$@H�l$HH�t$PH�|$XH�� A^A]A\��H�\$H�t$ WH��0�=r�u���H�=��A�3�H������dfH�]�H�=�H��t�;uH��H�D$HL�L$@E3�3�H��H�D$ ���Hct$@H��������H;�s\HcL$HH���sQH��H;�rHH�����H��H��t8L��H�D$HL�L$@H��H��H�D$ �g���D�\$@H�=K�A��3�D�;����H�\$PH�t$XH��0_���H��H�XH�hH�pH�x ATH��@�
ѶE3�I��A�t$A;�u2��fH��I;�t����!�Ie�
����xDΉ
������I;�u��fH��I;�u3��H��fD9#tH�fD9'u�H�fD9'u�L�d$8L�d$0H+�H�L��3�D�O3�D�d$(L�d$ �6fHc�A;�tAH���j��H��I;�t1L�d$8L�d$0D�OL��3�3ɉl$(H�D$ ��eA;�uH���5���I��H���eH���s;�t	A;��L�����eH��I;��:���D8 tH��D8 u�H��D8 u�+��Hc�H������H��I;�uH��pe����L��H��H���}%H��TeH��H�\$PH�l$XH�t$`H�|$hH��@A\���H�\$WH�� H��{H�=�{�H�H��t��H��H;�r�H�\$0H�� _�H�\$WH�� H��{H�=�{�H�H��t��H��H;�r�H�\$0H�� _�H�\$WH�� H�˖H�d$0H�2��-�+H;�tH��H����vH�L$0��dH�\$0��dD��I3��cD��I3��dH�L$8D��I3�{dL�\$8L3�H�������L#�H�3��-�+L;�LD�L�>�I��L�<�H�\$@H�� _�̃%���H�\$WH�� Hc�A��H�T$8���FH���u聻���	H���W�T$8L�D$<D��H���c�D$8���u�ab��t	��膻����H��H��H�'�H����H��Hk�X�d�H�D$8H�\$0H�� _����H�\$H�t$�L$WATAUAVAWH��0E��L��Hcك��u����3��8�ٺ���	H����3�;���;����H��L��I��L�=����Hk�XK���L0��u,詺���8肺���	H�|$ E3�E3�3�3�蘹��H���q���[E�K���D0tE��I�Ջ����H����8����	�M����8H������EH���*�6����8�����	H�|$ E3�E3�3�3��%���H��H�\$hH�t$pH��0A_A^A]A\_��H�\$ UVWATAUAVAW�0��WH+�H�,�H3�H��$ 3�3�E��L��Hcىl$@E��u3���H��u.袹��!8�{���H!|$ E3�E3�3�3��葸�����L��L��H�<�I��A��J��L�t$PMk�XA�t8@�@�@��t@��u	A��Шt�A�D t
3ҋ�D�B�Z����������H�ܳJ��A�D����+��3�H�T$XH���H���9YJ��I���^a������t	@�����;a!|$LI�܉D$XE���wD�t$X�
@����H�T$P�E3���
H�-H�H�T�A��A�|Pt A�DL�L$]A��D$\A�dPH�T$\�I���k��t4I��H+�I�H����H�L$DA�H���H����vH���A�H��H�L$D��H����UH�d$8H�d$0�L$XH�D$\L�D$DA�3��D$(H��H�D$ �`���H�D$PH�d$ H�
g�H��L�L$LH�T$\I�D��t_���B��A+�|$@9l$L���
E����H�D$PH�d$ @�l$\H�
�L�L$LD�E�H��H�T$\I��_�����|$L|{�D$@���e@��t@��u�E3�f��
f�D$DA��H��@��t@��u6�L$D�,Ef;D$D����E��t��f�l$D�
Ef;D$Dux��D$@��A+�A;������\$LL�t$P�l$@�������z���e�K����	�`���������L�t$P��J�L�A�DLJ�D�A�DP�\$L�]��떋\$L�H��J��A�D���3�I��@����E�����S
D�t$@H��$ 3ɋ�A+�A;�s&�EH��<
u�A��H��H��H���H��H���r�H!\$ H��$ D��D+�H�h�D�t$@L�t$PL�L$HH��$ J��I��k]��t5|$HH��$ H+�HcD$HH;������ź
A+�A;��N�������$\�����@����E���"�
D�t$@H��$ 3ɋ�A+�A;�s1�EH��f��
uf�A��H��H��H��f�H��H���r�H!\$ H��$ D��D+�H���D�t$@L�t$PL�L$HH��$ J��I���\���J���|$HH��$ H+�HcD$HH;������ź
A+�A;��?�������E���NA�
H�L$p3ҋ�A+�A;�s.�EH��f��
ufD�H��H��H��f�H��H���r�H�d$8H�d$0H�D$p+�L�D$p�D$(U
�����+�3��D��H��$ H�D$ �\D�������3�H�D$PH�d$ Hc�H�� E��H�
`�H��L�L$HD+�I��r[��tt$HD;����UZ��D;�������A�
A+�A;��������I�H!|$ L�L$HE��I��[��t�|$H3�����Z��������$����~���H�ȭJ��A�D@tA�<$�.���輲����Ѳ��� �H���+���H��$ H3����H��$�H��0A_A^A]A\_^]���H�\$H�t$�L$WATAUAVAWH��0E��L��Hcك��u�j���3��8�A����	����3�;���;���H��L��I��L�=����Hk�XK���L0��u+�����8����	H�|$ E3�E3�3�3��������m����<�K���D0tE��I�Ջ��������裱���	踱���8�����4=���)裱���8�|����	H�|$ E3�E3�3�3�蒰����H�\$hH�t$pH��0A_A^A]A\_����@SH�� ��H�ٹ����H�CH��t
�K�C$��KH�C �C$H�CH�C�cH�H�� [��H��8���u
����	�R��x.;
��s&Hc�H���H����H��Hk�XH���D��@�"裰��H�d$ E3�E3�3�3��	踯��3�H��8��@SH�� E�H��L��A��A�L��tA�@McP��L�Hc�L#�Ic�J�H�C�HHK�At�A���H�L�L3�I��H�� [�m����H��(M�A8H��I������H��(����@SH��@��H�L$ �~���H�D$ D��H��@B�Y%��|$8tH�L$0����H��@[����@SH��@��H�L$ 3��4���H�D$ D��H��@B�Y%��|$8tH�L$0����H��@[��������������������ff�H��H��H�tf��H����t_�u�I��������~I��H�M��H��L�H��I3�I#�t�H�P���tQ��tGH����t9��t/H����t!��t����t
��u�H�D��H�D��H�D��H�D��H�D��H�D��H�D��H�D��H�\$WH�� H����
H��b���H�H��H��u�H�\$0H�� _���H�
�3�H��H9
̦���H�\$fD�L$ UVWH��`3�I��H��H��H;�uL;�vH;�t�)3��H;�t�	�I�����v$�
����E3�E3�3�3ɉH�l$ �"������oH��$�H�L$@�p���L�\$@A9k����$���f;�vLH;�tH;�v
L��3�H���$�蟭���*蔭���@8l$XtH�L$P����H��$�H��`_^]�H;�tCH;�w<�`����"E3�E3�3�3ɉH�l$ �u���@8l$X�H���H�L$P�����7����H;�t�@8l$X���H�D$P��������H��$���$�A�KH�D$8H�l$0L��$�A�3҉|$(H�t$ �<U;�t9�$�����H;�t����S��z�����H;�tH;�v
L��3�H���������"E3�E3�3�3ɉH�l$ 蔫��@8l$X�g���H�D$P�����V���H��8H�d$ ���H��8�@SH�� �B@I��tH�zuA��&�B�x
H��H�������2������u	��H�� [��H�\$H�l$H�t$WH�� A�@@I��I���H��tI�xuA�7��~3�ML��H����r���H�Ń?�u虫���8*uL��H�ֱ?�S������H�\$0H�l$8H�t$@H�� _���H�\$UVWATAUAVAWH���H�ƅH3�H��$�3�H��H�L$hH��H�L$xI��M��D$`D��D$TD���D$H�D$X�D$P蠉��E3�I;�uA���3�E3�E3�3�3��H�\$ ����8�$�tH��$��������A���C@L�
dq����H���:��H���A;�t(���t#Lc�L�
;q��I��A��H��Mk�XM��@4�
L��L�
q��A�@8u)A;�t���tHc�H�ƒ�H��Hk�XI��@4�B8�tA�3���3�E3�E3�3�3��H�\$ �G���8�$�tH��$�����A���KE3�I;�t�@�/A��D�T$@D�T$DA��L��$�A:��H��$�A�H��A;�H��$����E�<XwH��B������A��Hc�H��Hc�H�B��	 ����T$\���/�����A;����������@�������������������<@�Ń�d�~����A�@��C����E�.��G�%��Stm��X����Zt��a���c���HI�EI��I;�t/H�XI;�t&A���s��D$P+���D�T$P�H����A��0uA��I�]E;�A�ǹ���D�I��A���I;��D$PHD��H����A��0uA��I��A��t,E�M�H��$�H�L$DM�����E3�A;�t�D$X�A�E��D$D��$�H��$��M�D$p@�� A��@E;�H��$�A���-A��k��e���g~σ�i����n����o����pte��s�������u����x���'�S��fD9t	H��A;�u�H+�H��!I;�HD��H���
��D8tH��A;�u�+ˉL$D�A�A����D$`A�E��y`Q�D$L0A�Q�D$M�SA�E��yDA��	�=I�}I���@���E3�A;��l���A�� tf�7��7�D$X�lA��@A�
�T$HA��rA��s
M�EI���.I��A�� tA��@tM�E��E�E��A��@tMcE��E�E�A��@t
M;�}I��A��A��r
A��rE��E;�}A��A��E;�EO�D�t$`I��H��$�H���#ʉL$HA��A��A;�M;�t 3�I��Ic�H��L���B0��9~AƈH����H��$�A�����+�H��A��	�D$D�A;�t	�;0�H��D$D�0�u@��guAA��9E;�EO�A���~)A��]Hc����H��$�H��tH�؋��A��I�EH�
\�I��@��Hc�H��$���H�L$xD��H�L$0�L$pL�ƉL$(H��$�H��D�|$ ��A��3���tD;�uH�
�訳��H�T$xH���3�@��gu;�uH�
�膳��H�T$xH��Ѐ;-uA��H��H���+���E3҉D$DD9T$X�KA��@t1A��s�D$L-�A��t�D$L+��|$H�A��t�D$L ��|$H�t$TH�l$h+t$D+�A��uL�L$@L�ŋֱ �̖��L�L$@H�L$LL�ŋ�����A��tA��uL�L$@L�ŋֱ0蛖���|$D3�9D$Ptu;�~qH��D�MH��$�H��$�A���H���V���E3�A;�u2��$�A;�t&L�D$hL�L$@H��$����E3�A;�u�H�l$h�#H�l$hA�ƉD$@�L�L$@L�ŋ�H���X���E3ҋD$@A;�|A��tL�L$@L�ŋֱ ���E3�H��$�I;�tH���ɂ��E3�L��$�H��$��t$@�T$\L�
�i��A�@�/A:�����A;�t	�������D8�$�tH��$�������H��$�H3����H��$ H���A_A^A]A\_^]�@��It=@��ht.@��lt
@��wu�A��끀?lu
H��A���o���A���f���A�� �]����A��<6u�4uH��A���>���<3u�2uH��A���&���<d����<i����<o����<u����<x�����<X�����D�T$\H�T$x@��D�T$P���3�;�t!H�T$hL�D$@@���s���@�/H��@:��H�T$hL�D$@@���R���E3����@��*uE�}I��E;������E���~���C��@��D�|H��l���E���d���@��*uA�EI��A;‰D$T�I���A������D$T��@�ōDHЉD$T�)���@�� tA@��#t1@��+t"@��-t@��0����A�����A�����A�����A�����A������D�T$pD�T$XD�T$TD�T$HE��E��D�T$P���葠��E3�E3�3�3�H�t$ �觟��@8�$��Z�����@UATAUAVAWH��`H�l$@H�]PH�uXH�}`H��zH3�H�ED����3�M��L�MD�ED��UH��D�n�D;�uOL�5RE�ͺ3ɉ|$(H�|$ ��H;�tE��D�-Z����FD�K���xDD�D�=�L�]D�MpD;�~5A��I��A+�@88t
I�;�u��A��+�A+�A;�}
D�HD�Mp�D�ȉEpD;��\D;��SE;���D�����D;�uH�D�`���M��A��҉|$(H�|$ ��A�xGLc�D;��<H�����A���A�~[3�H�B�I��H��rLK�L?I;�w.H�AH;�wH��H�����<H+�H�|$@H�����������H��H��tD�0H��H����D�MpL�E�A��D�|$(H�|$ ��F3�;��K�U�L$(H�L$ �ME��L��#GE3�Hc�A;��!D�UA��
s;���A;��;����M�D$(H�ExE��L��A��H�D$ ��F��A;�~`3�H�B�H��H��rQH�L6I;�w*H�AH;�wH��H�����;H+�H�\$@I;�t�����~��E3�H��I;�tD�0H��D�U�I��I;�tn�ME��L��A�҉t$(H�\$ �FF3�;�t?���3�H�L$8D��L��H�L$0;�u�L$(H�L$ �
�D$(H�ExH�D$ A���E��H�K�D91u��|��H�O�D91u��|������H��L��D;�uH�D�pD�u�����uH��xA���0D���u3��L�}xL�E;��<3�L�Mp�Ћω\$(H�\$ ��0H��H;�t�D�Mp�UL��A�Ή\$(H�\$ �MELc�D�MD;�u���D;�A���~bI��I���wYH��H��w4H�YH;�w
H�����H���H���R:H+�H�\$@H��t%�����l|��H��H��tD�0H��D�MH��u3��Mc�3�H�����D�]D�Mp�U�MD�\$(L��H�\$ ��D�E��u3��.���L�ML�ÉD$(��A��L�|$ ��/�}L��3�L;�D�H�K�D91u(�W{���!���D�Mp�U�D$(A��L�|$ �.D��3�H;�tH���%{��L;�t
M;�tI���{����H�MH3��y��H�]PH�uXH�}`H�e A_A^A]A\]����H�\$H�t$WH��p��H��H�L$PI��A���y����$�D��$�H�L$PD�\$@�D$8��$��D$0H��$�L��H�D$(��$�D�Nj։D$ �O����|$htH�L$`����L�\$pI�[I�sI��_���D�L$ UATAUAVAWH��@H�l$0H�]@H�uHH�}PH��tH3�H�ED�
Ԓ�3�M��D��L��wD;�u=L�MH�aLD�Nj��B;�t�=���6�(AD�
����xDD�D�
�D;��&D;��D;��C�uh;�uI�E�p�]xD�MXM��ҋΉ\$(��H�\$ �BLc�D;��A���~hH�����L;�wYK�L$H��w5H�AH;�w
H�����H����{7H+�H�|$0H;��������y��H��H;�tD�(H���H��H;���M��3�H��M����D�MXM�ƺ��D�d$(H�|$ �JA;�tL�M`D��H��A���A��H�O�D9)u�x�����D�epH��D;�uI�ED�`�uh;�uI�E�pA���z,���u3��U;�t$L�MXM�ƋЋΉ\$(H�\$ �,H��H;�t�L��H�E`D�MXM��A��A��H�D$ �%A��H;�tH���x����H�MH3��v��H�]@H�uHH�}PH�eA_A^A]A\]���H�\$H�t$WH��`��H��H�L$@A��I���v����$�D��$�H�L$@D�\$8�D$0��$��D$(H��$�D��L�Nj�H�D$ �.����|$XtH�L$P����H�\$pH�t$xH��`_������������������ff�L��H+���I��ra��t6��t�
I�ȈH����tf�
I��f�H����t
�
I���H��M��I��uQM��I��tH�
H�H��I��u�I��M��uI���@�
�H��I��u�I���fffffff�fff�ff�I�� sBH�
L�T
H�� H�A�L�Q�H�D
�L�T
�I��H�A�L�Q�u�I���q���fff�f�H��r�� 
D
@H�����u�H���@L�
L�T
L�	L�QL�L
L�T
L�IL�QL�L
 L�T
(H��@L�I�L�Q�L�L
�L�T
���L�I�L�Q�u�I��I���q����$���ffff�fff�fff�f�I�I��ra��t6��tH�Ɋ
I�Ȉ��tH��f�
I��f���t
H���
I���M��I��uPM��I��tH��H�
I��H�u�I��M��uI���H�Ɋ
I�Ȉu�I���fffffff�fff�ff�I�� sBH�D
�L�T
�H�� H�AL�QH�D
L�
I��H�AL�u�I���s���ffff�f�H���w�� H��
D
@��u�H���@L�L
�L�T
�L�I�L�Q�L�L
�L�T
�L�I�L�Q�L�L
�L�T
�H��@L�IL�QL�L
L�
��L�IL�u�I��I���q����$���H����SH�� H��H�I��s��H�K��s��H�K��s��H�K ��s��H�K(��s��H�K0��s��H��s��H�K@�s��H�KH�s��H�KP�s��H�KX�s��H�K`�s��H�Kh�s��H�K8�~s��H�Kp�us��H�Kx�ls��H����`s��H����Ts��H����Hs��H����<s��H����0s��H����$s��H����s��H����s��H����s��H�����r��H�����r��H�����r��H�����r��H�����r��H����r��H����r��H���r��H���r��H���r��H���|r��H�� �pr��H��(�dr��H��0�Xr��H��8�Lr��H��@�@r��H��H�4r��H��P�(r��H�� [���H��tBSH�� H��H�	H;
9|t�r��H�KH;
/|t��q��H�KH;
%|t��q��H�� [�H����SH�� H��H�IH;
|t�q��H�K H;
�{t�q��H�K(H;
�{t�q��H�K0H;
�{t�q��H�K8H;
�{t�mq��H�K@H;
�{t�[q��H�KHH;
�{t�Iq��H�� [����@SH��0L��H��t
H��tM��u,D��`����H�d$ E3�E3�3�3ɉ�t�����H��0[À9t	H��H��u�H��uA��A�I���H����tH��u�H��uA������"�3�����@SH��0M��M��uH��uH��u 3��?H��tH��tM��uD�	��M��u,D�跐���H�d$ E3�E3�3�3ɉ�ˏ����H��0[�L��L��I���uA�I��A�I�„�t,I��u��$A�I��A�I�„�tI��tI��u�M��uE�
M���f���I���uD�D�A�@P���)����"�m������@SH��0H��t
H��tM��u,D�����H�d$ E3�E3�3�3ɉ������H��0[�L��A�I��A�I����tH��u�H��u�趏���"�3��������������������ff�H+�L���t�B�	:�uVH����tWH��u�I��J�	f��f���w�H�J�	H;�u�I��������~L�H��H��I3�I��t��H�H���3��fff���t'��t#H����t��tH����t��t����t��u�3��H�H���������ff�H+�I��r"��tf��:
u,H��I���u�M��I��uM��t�:
uH��I��u�H3�����ÐI��t7H�H;
u[H�AH;D
uLH�AH;D
u=H�AH;D
u.H�� I��u�I��M��I��t�H�H;
uH��I��u�I���H��H��H��H�H�H�H;��������������������ff�M��tuH+�L��I����t�B�	H��:�uWI��tN��tJH��u�J�	f��f���w�H�J�	H;�u�H��I��I��������~vH��L�I3�I��t��H3��H�H��Ä�t'��t#H����t��tH����t��t����t��u�H3�����@SH�� ��J�M���H��H����H��H��H��u�C�H�#3�H�� [���H�\$H�t$H�|$ATAUAVH�� L��蓡���H�
ˉ貛��L��H�
��裛��H��I;���H��I+�L�oI����I���$H��I;�sT�H;�HB�H�H;�rI������3�H;�u�3�H�V H;�rFI�����H;�t9H��H��H������H�3�I������H�H�K���H��I���3��ؠ��H��H�\$@H�t$HH�|$PH�� A^A]A\����H��(���H������H��(������H���MZf9t3��HcH<H�3��9PEu�f9Q�����LcA<E3�L��L�A�@E�XJ�LE��t�QL;�r
�A�L;�rA��H��(E;�r�3��H�������������H��(L��L�
�Q��I���j�����t"M+�I��I�����H��t�@$���Ѓ��3�H��(����H��(�W���H���H��t����#H��(��H��(H�
���谙��H�Y�H��(�H�
U�H�
V�H�
W�H�
X�����H�
E�錙��H�\$H�t$WATAUAVAWH��@��3��|$p3��у��	������������������tM��t,��t_�<����H!t$ E3�E3�3�3��R�������L�%��H�
����|$p�L�%��H�
����|$p�L�%{�H�
t���|$p�u蔙��H��H��u���kH���H��Lc�q9YtH��I��H��H�H;�r�I��H��H�H;�s9Yt3�L�aM�,$�L�%�H�
���|$p�;���L��I��u3��M��u
A�M���̅�t3��ݬ�����t��t��tL�|$8D�t$p�1L���L�|$8H�����uD���dž���D�t$p��u9�
�p�щL$0��p�;�}*Hc�H�H���H�d��‰T$0�
�p���u���I�$��t3��>����;�u
�����A�����A��;�t
��t��uL���;�uD���3�L�\$@I�[8I�s@I��A_A^A]A\_����H�
݀�H�
��H�
��H��8��0D�؉D$ �=�u���/E3�D�\$ A��H��8����H�\$H�l$VWATAUAVH��@A��L��L��蘖��3�H��H9����H�
�C�y0H��H����H�~CH���/H���sH���D���H�MCH��H�3��e/H���%���H�CH��H���F/H������H��BH��H���'/H�����L��H��H��t!H��BH��/H�����H���H���H��L��H;�tcL;�t^H��袕��H�
�H��蓕��L��H��t?H��t:��H��t-H��$�A�L�D$0H�L$ A�Q�H��A�ԅ�t�D$8u���>H�
9H;�t2�;���H��t(��H��H��tH�
!H;�t����H��tH���H��H�
�~����H��tD��M��I��H����3�H�\$pH�l$xH��@A^A]A\_^�H��8��x ��~
��u��q�1��q�
�q�#軅��H�d$ E3�E3�3�3���Є����H��8�H�\$H�t$WH�� H��H��H��u
H���e���jH��u�*e���\H���wCH�
�v�H��HD�L��3�L��1.H��H��uo9CztPH�������t+H���v�H��诟�������3�H�\$0H�t$8H�� _����H���+��蝄������܄��H���+��脄���H����H�\$�L$VWATH��0Hc����u覄���	��������;=r��H��H��H��L�%c��Hk�XI���L��u%�Y����	H�d$ E3�E3�3�3��n������z���2�I��Dt+���H��-��u
�+���3ۅ�t���������	��������#�݃���	H�d$ E3�E3�3�3�����H�\$`H��0A\_^��H��H�XL�@H�HUVWATAUAVAWH��3�A��A��H���@��o�x�@��$�H�x�E��t�x�A���l$pD��H�L$T�;�tE3�E3�3�3�H�|$ �=�����r��@u
�|$T�tE
��A���A#Ⱥ�;�tT+�t:;�t1�����8������E3�E3�3�3�H�|$ �������D���@��t��u�A�@�D����$�A���t,��t#��t��t��@u�D;������A���A�������ϋƺ�L$H#�tF=t8=t*=t=t*=t&=t;�t�/���A�����
��A����A��D�l$Ps��s��"�$���A�E�DD�D�l$P@��@tA��A����D�l$P�L$H��s
A��D�l$P@�� tA���@��t
A��D�l$P�e
����u!詁���8��������t�����H��$�D�D$HH��$�H�|$0L�L$`A��D�l$(��l$ �6*H�D$XH�������A��#�;�uC�@��t9D�D$HH��$�H�|$0A��L�L$`D�l$(A�׉l$ ��)H�D$XH���u;HcL�-�{H����H��Hk�XI�D��d���'�����袀���8��H���(;�uMHcL�-t{H����H��Hk�XI�D��d��v'�ȋ�蝀��H�L$X��';�u��I����
�A;�uA��@�	��uA��H�T$X��A	HcL�-{H�����H��D
�I�D�Hk�XD�tHcH����H��Hk�XI�D��d8�A��$H�D$L��E����A��tx�E�ă��*����D$D���u�����8�tP��ٸ������H�T$@A�@�|$@����;�u�|$@uHcT$D�����t��E3�3��ɶ�����t��E���<�@��u�D$T#�u�����#�=@tJ=t,=@t%=t+=@t$=t=@u(��$�����#�;�uD��$��@��$������|$DA��@��A��%�=@�$=�t|=���;��A;�v��v8���l��$�A���A+�� A;��P�D$D����E��3����H;�t��E3�3��z��H����|����H�T$DA�覩������a���A;�t ��uk�|$DuD�@�D��$����D$D=��u��	����}��������=��u#�E3�A��������������D��$���E3�3�������;;�vqA;������������E��3����H;������E3�3����H���u8����D$DA��Hc�E��H�TDD+��������m����D;��A�Hc@��$�H����@��H��Hk�XI�D��d8�@l8HcH�ƒ�H��Hk�XI�L��ƀd8����D8@8|$Lu!@��tHcH����H��Hk�XI�D��L A��%�=���A����H�L$X��#�D$PD�D$HH��$�H�|$0�D$(A��L�L$`�D$ A��%%H���u6�)#���R|��LcI��A��H��Mk�XI�D�B�d����B���HcH�ʃ�H��Hk�XI�L�H�
��H��$�H�ĀA_A^A]A\_^]���H�t$WH��PE��L���d$@3�H��$�H������u(�{����8H�d$ E3�E3�3�3��z��������3�H������u(�K{����8H�d$ E3�E3�3�3��_z�������$���t8A����������u%�{����8H�d$ E3�E3�3�3��z�����`�L$0D�L$(D�T$ D��H��H�L$@�������D$D�|$@t,��t!HcH��H��L��u��Hk�XI���d���6��t����H�t$`H��P_���H��8A��D�L$`E��L���D$(H�L$ D��A��I�����H��8���H��H�XH�hH�pWH��PH��H��H�H�I��I���X��3�H;�u@8l$HtH�D$@����3��H�L$89iuL��H��H����[H;�u<��y��E3�E3�3�3�H�l$ ���x��@8l$HtH�D$@���������-H;�t�A��H��H��D�L
tUH;�u�f��D�L�Z�����@8/u���C�f��H��f�f;Qrf;QwfQ�$f;Qrf;QwfQ���Dt��D�H��I��E�LtNH;�u���^H��@8.uf���Q�fA��H��fD�fA��fD;Arf;AwfA�+f;Ar%f;AwfA�A���Dt
���fA��f;�uf;������H;�������u��������@8l$HtH�L$@����H�\$`H�l$hH�t$pH��P_���E3�����H�\$H�l$H�t$WH��P3�I��H��H��L;�u3��&H�L$0I���V��L�\$8A9kuL��H��H������H;�u<��w��E3�E3�3�3�H�l$ ��w��@8l$HtH�D$@���������H;�t�A��H��H��F�Dt-H;�u���F�Du[f���G@8/uf���
�f��f�H���H��F�Dt#H;�u���H��@8.uf���
�f��f�H��f;�u&f;�tH;�u�@8l$H�����H�D$@������������@8l$HtH�L$@����H�\$`H�l$hH�t$pH��P_���E3����H�\$H�l$H�t$WH�� H�څ�xi;
�qsaHc�H�-�qH����H��Hk�XH�D�H�<�u=�=Qu'��t��t��u���������������qH�D�H�3���Wv���	�lv��� ��H�\$0H�l$8H�t$@H�� _��H�\$H�l$WH�� ��xs;
�pskHc�H�-�pH����H��Hk�XH�D��DtGH�<�t@�=SPu)��t��t��u��������������3��H�D�H��3���u���	�u��� ��H�\$0H�l$8H�� _�H��8���u�u��� �nu���	�]��x1;
Dps)Hc�H�
@pH�ƒ�H��Hk�XH���DtH��,�Lu��� �$u��H�d$ E3�E3�3�3��	�9t��H��H��8�H��H�XH�pH�xL�` AUH�� Hc�L��I��L�-�o��Hk�XK�t���|3u3�O	�n�����|3uH�L3�������#��D3�
�C�����tK�L�H�L����H�\$0H�t$8H�|$@L�d$HH�� A]���Hc�H�
>oH�ƒ�H��Hk�XH��H�LH�%�H�\$H�|$L�d$AUAVAWH��@I��E��E3�A�L$�Ӗ����uA�����襗���3��|$$H��n��@��Lc�J��H���H�\$0J��HH;����C���{u;�
�L�����{u H�K���k���uD�pD�t$(��C�
����E��u H�K���CtH�K���HI��E��u?�CL�#L�nK+�H���.�袋.H��L��I��I��H��?L���D�D�l$ �H��XH�\$0I��H��m� ���E;����lj|$$H��m����X�J����H�D$0H��ttHc�L��mI�Ѓ�m I��H��H;�s�@L� �@	
�`H��XH�D$0����|$ Hc�H��H����Hk�XI���D���H�����AD�D��|$ ����A��H�\$`H�|$hL�d$pH��@A_A^A]�H�\$H�t$WH��@��H��H�L$ A��A���P��H�D$(D��A�|u��tH�D$ H��@B�Y#��3���t��|$8tH�L$0����H�\$PH�t$XH��@_�̋�A�E3�3��r�����H��hH��KH3�H�D$P�=�[f�L$@tfH�
�\H���u�U
H�
�\H�����H�d$ L�L$DH�T$@A��D�����=u[�����xu}�%][�H�d$8H�d$0��H�D$HL�D$@A�3��D$(H�D$ �<H�
�[H���t0H�d$ L�L$DH�T$HD������tf�D$@���Z���H�L$PH3���N��H��h�H�\$H�l$H�t$WH��P3�I��H��H��H;�tL;�t
@8*uH;�tf�)3�H�\$`H�l$hH�t$pH��P_�H�L$0I���N��L�\$0A9ku%H;�t�f�@8l$HtH�D$@�������H�T$0�ݿ��;���H�L$0D��A��~0A;�|+�I��H;���L�Ǻ	�D$(H�\$ ��H�L$0;�uHc�H;�r(@8ot"��@8l$H�4���H�L$@�����#����Vo���*@8l$HtH�D$@�����������A�H;���A�QL�ljD$(H�D$0H�\$ �H�Q;���������E3�������̹�"�����H��H�XH�hH�pH�x ATAUAVH��PL��H��H�H�E��M���FM��M��tM�uM��u*�n��H�d$ E3�E3�3�3���m���|$H��E��tA��|�A��$�A�.L�D$03�I�^A��~L�D$0@�ͺ�r���L�D$0�I��@@���H����t@�+H��뾋�$�@��-u���@��+u@�+H��E���SA���IA��$�?E��u(@��0tA�
�8�;xt
�;XtA��&A��A��u@��0u�;xt�;Xu@�kH��M��@3҃�A��D��@��E�JA��t	@�̓�0�A��t,�E�@��<w�� ���A;�s��A;�r"u;�v��M��uH��@��uM��IE�3��YA���@�+H��둽���@��u@��u:�ƃ�t���w��u';�v#��l���"@��t���
@��$������M��tI�]@��t�߀|$HtH�L$@�������M��tM�u@8|$HtH�D$@����3�L�\$PI�[ I�k(I�s0I�{8I��A^A]A\���H��83�E��L�‰D$ H��9�]u	H�
O�3��Q���H��8�H��8H��FH3�H�D$(L�D$ A���D$&����u���
H�L$ �H�L$(H3��2J��H��8��@USVWATAUAVAWH��H�l$@H�4FH3�H�E0L���E�!3�I��H���}L�MD��D��H�];��H�U�;����}��H�UA���;����}uz�EA���t`A������Hc�H�����H;���H�L	H��wlH�AH;�w
H�����H����	H+�H�\$@H��t<����NH��莻���x�E��L�úA�ω|$(H�|$ ������o���3��7��J��H��H��t���H���3�H��t�Lc�3�H��M����L�EE�̺A�ω|$(H�\$ ��E3�A;���M;�t;���L�|$8L�|$0�D$(D��L��3�A��L�t$ ��A;���I���D9}u,L�|$8L�|$0D��L��3�A��D�|$(L�|$ �^��A;�tWHc׹���H��I;�tBL�|$8L�|$0D��L��3�A�͉|$(H�D$ �A;�u
H���YI��I���A���tH�M�H�K�9��u�7I��H��H�M0H3��G��H�eHA_A^A]A\_^[]����3�D�B
����L��M��t<E�
I��A�A���wA�� �
H�A���w�� I��t
E��tD;�t�D+�A���3���H��H�XH�hH�pWH��PI��H��H��M����H�H�I���bG��H��u=��h��H�d$ E3�E3�3�3����g���|$HtH�D$@���������H��t�H�����w�H�D$0�xu#L��H��H�������|$HtZH�L$@�����L�MH�T$0��H�T$0��H���H��H��t��t;�t�+؀|$HtH�L$@�������3�H�\$`H�l$hH�t$pH��P_����H��8�=IYuAH��u'��g��H�d$ E3�E3�3�3����f�������H��t�I�����w��X����E3����H��8��H��8H��u&�g��H�d$ E3�E3�3�3���f��H���L��H�
�X3�wH��8���H���fRt
�
�R���}��H��t
��z���?Rt_H��$���H�L$03�A���q���H��$�3�H�D$@H�D$0�D$0@H�D$ H��$�H�D$(�%H�L$ ���8~������H��H�XH�hH�pH�x ATAUAWH�� H��3�3�D�G���ͪ��L��H���tPD�G3ҋ�跪��H���t=H��H+�H;����|A��WH��M��o
H��H;�u1�"f����f���H�\$@H�l$HH�t$PH�|$XH�� A_A]A\ú�����D��D��I;�H��EMNj�������tH�H+�H;�~����e���8u�e���
H��A�ԋ����L��H��3���U}]E3�H�Ջ��ҩ��H����T��������H�����H�H��H��H���u%�Je���
�_e��H��F�H�������E3�I�Ջ��u���H��������3����H�\$Lc�H��_M��A��I��Mk�XJ��B�D8F�\�A��D��A���@tX���tH��t(��t ��uHB�L�J��B�d8�B�L8�0B�L�J��B�d8�B�L8�B�d�B�L�J��B�d8�E��u���A���%�@H�\$���H��8H��u'�.d��H�d$ E3�E3�3�3���Cc����
��]�3�H��8��H��HH�d$0�d$(A�H�
8 E3ɺ@D�D$ ��H��NH��H��H��(H�
�NH���tH���t��
H�
�NH���tH���t��
H��(��H�l$WH��pHc�H�L$P�B����sbH�T$P��~L�D$P����zu��H�T$P�H��@�x����tH��H�8���|$htH�D$`��������H�D$P��~6��H�T$P��@�������t@��$�@��$�Ƅ$��� �b����*@��$�Ƅ$�H�L$P�D$@L��$��AA��D$8H��$��D$0H�D$(�T$ �QH�L$P�/�����2�������$�t
��$�����|$htH�L$`����H��$�H��p_�%�	�%�	�%B
��������ff�H��L�$L�\$M3�L�T$L+�MB�eL�%M;�sfA���M���A�M;�u�L�$L�\$H�����@UH��0H��H�MP�.D��H��0]�@UH��0H��H�M`�D��H��0]�@UH��0H��H�M@�C��H��0]�@UH�� H��H�H�ы��H�� ]�@UH�� H��
���H�� ]�@UH�� H���ȃ��H�� ]�@UH�� H��
诃��H�� ]��������@UH�� H��菃��H�� ]�@UH�� H�ꃽ�t
��m���H�� ]�@UH�� H��HcM H��H��]H���C��H�� ]�����������@UH�� H���$���H�� ]�@UH�� H��H�
�E��H�� ]�@UH�� H�����H�� ]�@UH��0H��M`���H��0]�@UH�� H����t��H�� ]�������@UH�� H��H�3Ɂ8�������H�� ]�@UH��0H��}pt3�聂��H��0]�@UH�� H��H�E3ہ8�A��A��H�� ]�@UH��0H��MP�8�H��0]�@UH��@H��}@t>�}Dt*H���Hc
H��H��L�MZ��Hk�XI���d��H����
���H��@]�@UH�� H��
�܁��H�� ]�@UH�� H��
�Á��H�� ]��������@UH�� H��裁��H�� ]����6Hdz������
8DPh������$0:FXhx��������		"	.	@	N	`	x	�	�	�	�	�	�	

6
P
`
v
�
�
�
�
�
�
�
@Nbp������T@tD@�@�t@��@8@1�RL(�(� %@�%@(null)(null)EEE50P( 8PX700WP  `h````xpxxxx	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~CorExitProcessmscoree.dllruntime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...<program name unknown>Runtime Error!

Program: ccsUTF-8UTF-16LEUNICODE�����������������������������EEE���00�P��('8PW�700PP� (����`h`hhhxppwpp         (((((                  H����������������������          h((((                  H����������������������                                 H�����������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~�����������������������������������������������������������������������������������������������������������������������������HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$Fatal error in launcher: %s
rbFailed to open executableUnable to find an appended archive.Unable to read from file#!Job information querying failedJob information setting failedstdin duplication failedstdout duplication failedstderr duplication failedUnable to create process using '%s'Failed to get exit code of processFailed to find shebangExpected to find terminator in shebang lineExpected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to be able to allocate command line memory"%s" "%s" %sRSDSu�|NbmC��E/�uKc:\Users\Vinay\Projects\SimpleLauncher\dist\t64.pdbb

2020t
d4r�L]��������
4R���
�p`P
�t
d	4R�L]!3!��b�p`0L]"�"��t
dT4
R���4	RpL]%%��d
4	RpL]^&m&��4	RpL]k'u'��	

4	
RpL]c(�(���(d	T42pdT42p)4dZ���
�p`P4��		�0d
T	4RpdT4�p
td
T	4R�$d�4��p4�p

4
2pL]�>O?�4r�
�p`P4�8
�t
d	4R�L]eCD�20L]�GH-�

4
2pL]�H�HF��H	If�42pL]fJ�JF��J�Jf�dT�pB

4
Rp42p
d4r����pL]wO�P��t
4R�	 
 � t d 4 ���L]<THT�V
t	dT42�d	4R�L]�XY�
�td
R���L][Z�Z��"Z�Z��td42�td42�L]�\�\��  d T 4 r����p
T4R���p`d	4RpL]�ac��d	4Rp	�����
p`P
0
d4
R����pL]dm�m�t42�		20RP
d4
R����pL]rEr�d
4R��pL]�s t��td
T	42���d4
Rp
t
dT4
r�

4
2p
d4
R����pL]�~)�/4qf���
�p`P4� 
d4
R����pL]�����r0

4
2p4�p
`P-
Etd4C�
����P4�Xd4�p1
5#td43r��
��P4�8d4�p2
0R02P
t
d	42���L]~�?�6�	BL]�:�P�:�	BL]Y�]�]�
d4r���
�pL],���q�	bL]@�O���O�
T4r���p`b4R
�p
`L]�c���!
!4!�����p`PrP

d
�pL]k�����dT42pT42p
�	td42�L]�����
�t
4r���L]����2�d��R��4�PdT
4�ptdT4����b4�('EC
��	��p`0P4�p�td
T	42���4�

T
�pd4
rpd42p,�4�0

40
.p
T4r���p`-d2T140,��p4�PB0*����6Hdz������
8DPh������$0:FXhx��������		"	.	@	N	`	x	�	�	�	�	�	�	

6
P
`
v
�
�
�
�
�
�
�
@Nbp������ExitProcess~SetInformationJobObject�GetCurrentProcessWaitForSingleObjectmGenerateConsoleCtrlEvent�GetCommandLineAAssignProcessToJobObject�GetExitCodeProcess�CreateProcessA�QueryInformationJobObject�CreateJobObjectAkGetStdHandleGetLastError;SetConsoleCtrlHandlerGetModuleFileNameA�DuplicateHandleRCloseHandleKERNEL32.dll�HeapFree�HeapAlloc�EnterCriticalSection;LeaveCriticalSection�TerminateProcess�UnhandledExceptionFilter�SetUnhandledExceptionFilterIsDebuggerPresent&RtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContextxGetCPInfonGetACP>GetOEMCPIsValidCodePage�EncodePointer�DecodePointerZFlsGetValue[FlsSetValueYFlsFree�SetLastError�GetCurrentThreadIdXFlsAlloc�HeapSetInformation�HeapCreateGetModuleHandleW�SleepLGetProcAddress4WriteFile|SetHandleCount�GetFileTypeiGetStartupInfoA�DeleteCriticalSection%RtlUnwindExiMultiByteToWideChar�ReadFiletSetFilePointerfFreeEnvironmentStringsA�GetEnvironmentStringsgFreeEnvironmentStringsW WideCharToMultiByte�GetEnvironmentStringsW�QueryPerformanceCounter�GetTickCount�GetCurrentProcessId�GetSystemTimeAsFileTime�GetConsoleCP�GetConsoleMode-LCMapStringA/LCMapStringWmGetStringTypeApGetStringTypeW
GetLocaleInfoA>LoadLibraryA�InitializeCriticalSectionAndSpinCount�HeapReAlloc]FlushFileBuffers�CreateFileA�SetStdHandle)WriteConsoleA�GetConsoleOutputCP3WriteConsoleW�HeapSizeaSetEndOfFileQGetProcessHeap�6@�6@2��-�+�] �f��P�@@�@
		


!
5A
CPR
S
WYl
m pr	�
�
�	��
�)�
���
���                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`@�`�y�!�������@~�����ڣ ��@����ڣ ��A��Ϣ���[��@~��QQ�^� _�j�2�����1~����@����C�@�@�@�@�@@#@��@�@��@�!@�@�@`@�����P@��@��@	X�@
��@��@X�@0�@�@��@��@h�@0�@�@��@��@ H�@!P�@"��@x��@y��@z��@�x�@�h�@���������
�
`�@`�@`�@`�@`�@`�@`�@`�@`�@`�@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@x�@t�@p�@l�@h�@d�@`�@\�@X�@T�@P�@L�@H�@@�@0�@$�@�@d�@�@�@�@��@��@��@��@��@��@��@��@��@	�!@.0#@�1@�1@�1@�1@�1@�1@�1@�1@�1@@#@.�p��PSTPDT�#@$@����������������������������;Zx����0Nm����:Yw����/MlKr�t������C�Dh�hj�l{�|�����������8�M��P����J�T6��8_�`��������F�Ho������C�D� �� ]!�`!}!��!�"4��"�$\��$$%x�$%�%0�%�&���&'�'�'��'#)�$)6)�8)�*��*,�,e,(�h,M7<�X7}8`��89l�P9p9�p9�9��9�9���9�:���:<�� <><�@<�<0�<�>���>t?�t?@8�@{B�|BtD�tD�D��DF�XG�G���G%H8�DHiH�lHIX� I�I@��I�I���I�J��K�K���K�L���L�L��L�M��M�M���M�M���MN��(N[N�\N�N@��NGO@�HO�P�QsQ��tQ�S ��S�S��ST��T	W4�WxW0xW�Wl��W�Xl��X4Y��4Y�Y��Y�Y���Y�Z���Z�[��[\0 \]�]L]@�L]�^,��^�aH��ac`�0cTc���c�d���dol��pl�m���mn�n�n���o�p��p�p���p^q�`q�r��rPs@�Psht8�ht�t���t�t��t�t�u�v0�v�wl�x�yd��y�z���zz|��||�|@��|�|@��|�}���}=~@�@~w��xֆ�؆	���_���`�ψ�Ј3���4�Q��T���8����8���ފ@����L�����c���d��0��<��%�\�(�������*���,���������8���8�ͧ�ЧY��\�1��4�����Z���\�a��d�{���A�D�g�4h������!�T<�q��t�h��h���������������������־ؾ
�������f��p��0 ���D��P��P���T �<��<�����������Q��l������ �� �s�t���P�a��d�����������@��D�HD��d�S��T���l�������<�t`������������������������-��-�F��F�_��f�������������������������6��6�J��P�q��q������������������2��2�K��R�k��(�p�������������0�eH�`�x�������	�b���d(�f���nh�(t�%�Й��x�h��h�H�Z�( @...GGGWWWiiiuuu����������������������������������̀�ww����ww||�����ww��������wwww��������ww��������f�wwwww|�����f�wwwwww����ff�wwwwww�����ff��wwwww���ffl����ww����ffffff��w����ffffffl�w������ffffff�w�����ffffff�|����������ff��������ffff�������ff��R\I���lffl���)����ff�ح���������2L���������18�������Ϥ"������A<��������ΣT��π�����U���������������������������؀����������������������?������������������?�?�?�?�?�?�������������( 444MMMSSSzzz������������������������������p�p�����{p{��f���fko�f�����_fffk�_�fff��[���f}��UUU�fL4�UUU_kJqO���_�~�'�[U_����U�����������wwwww{~����������������( @%%%+++000===AAAIIIMMMQQQVVVYYY]]]~dFgggjjjmmmrrruuu}}}�u?�z=�~;�gE�kC�oA�r@��:��I��b��pƏKУk(��,�1�?�5�<�\�C�K�Q�s�U�[�c�b�����������������������������������������ð����������������������������������������������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$"  _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_L'%$"_I_MMMMMMJJ__('%%_I_CEMIJJMEM_(''*_I_?BMDJEMDMF_)(-LI_MMMCMMMMM_________<____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/
N______MMMMJIDAI_9/	HJJMMJMMMJ??BAI_A7503	IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O;
@__C_C?J?AJI_?A_DJJI@O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ�����?������������������?������������������?�( 444MMMRRRYYY~eGuuu}}}�x>�iE�rC��E��~7�?�H�V�b�x����������������������������������������������������������������������������������/!P7pL�c�yϏ���1��Q��q�������������/Pp"�,�6�@�J�[1�qQ��q�������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������!%///* !*/"(%%'%/)
/!#''////+/+"*(/
/

!%(/
(

  (*/(///)
*/
	)*

	/"/////	/+///#
		+ !%//
+"*+'#+//+'!%*++$++!+!    !!!<(0` !!$&			&"

 ���W���������������������������������ܱ��Nj+<<</	&&&#&[[[?6666��׏��������������������������������������������Ҟ���BBB3"


mmm3����,����!!!4777&�����������������������������������������������������ʟ���}���}___E���OpppD���P,)+3���Z2226DDD(���,�����###5��������������������������������������������������������������������������������չ�������������5�������,�������������������������������������������������������������������������������������������������������������,������Ì222"��Є�����������������������������������������������������������������������������������������������������&&&2����   4888&�������������������������������������������������������������������������e��?��4��/��+���.���R�������ӎ����������$$$5��Ď���������������������������������������������������������������������D��@��;��7��3��/��*���&���"�����������������������������������������������������������������������������������������W��G��C��?��;��6��2��n������f��0�������������nj333"��ӄ��������������������������������������������������������������������O��K��G��B��>��:��5��p������i��$�����������!!!4888&���������������������������������������������������������������������S�N��J��F��B��=��9��5��0��,��(���������������%%%5��ǎ���������������������������������������������������������������������V�R�N��I��E���������������������������������������������������������������������������������������������������������ѹ���|J��q?��o@�����Z�U�Q�M��I��D��@��<��7��3��/��+���&���"���-����������������Ɍ444"��ք�������������������������������������������������̴��w<��u=��s>��q?�����]�Y�U�P��L��H��C��?��;��7��2��.��*���%���!����������������"""4888&���������������������������������������������������d��y<��w=��u=��s>�����a�\�X�T�P��K��G��C��>��:��6��1��-��)���%��� ���O������������Ñ%%%5��ʎ���������������������������������������������������A��{;��y<��w=��t>�����s�`�\�W�S�O��J��F��B��>��9��5��1��,��(���$���(����������������������������������������������������������������������9��|:��z;��x<��v=�������s�_�[�W�R�N��J��E��A��=��8��4��0��,��'���#�������������̌555"��ل���������������������������������������������������9��~9��|:��z;��x<���o�����������������������������������������m��8��3��/��+���'�����������"""4:::&������������������������������������������������������8���9��~:��|;��z;��w<��u=��s>��q?��o@��mA��kB��iC��gC�dD��uZ������;��7��3��.��*�������������Ǒ%%%5��̎���������������������������������������������������È>���8���9��}:��{;��y<��w<��u=��s>��q?��o@��mA��jB��hC��fD�~dE��uZ�����?��:��6��2��5�����������������������������������������������������������������������������Оa���7���8��9��}:��{;��y<��w=��u>��r>��p?��n@��lA��jB��hC��fD�}dE�����B��>��:��5��^������������ό555"��܄����������������������������������������������������������ѳ�„7���7���8��9��}:��{;��x<��v=��t>��r?��p@��n@��lA��jB��gC��eD�����F��A��=��9������������"""4;;;&�����������������������������������������������������������������ŌC���8���9��~9��|:��z;��x<��v=��t>��r?��p@��mA��kA��iB��gC�����I��E��L��������������ɑQQQJnnn����������~~~�������������������������������������������������������������������������������������������Į��q?��o@��mA��kB��iC�������������������������HHH�"""���������������vvv������������������������������������������������������������������9��~:��{;��y<��w<��u=��s>��q?��o@��mA��kB�������������:::�'''�___���������sss�ttt��������������������������������������������������������������8�Ϧu�����ǣv��y<��w=��u=��s>��p?��n@��lA��������888T����---6fffnddd�%%%�"""�����OOO�SSS������������������������������������������������������������ċD�ҧu�����ʤv��{;��y<��v=��t>��r?��p?��xM�����<<<�MMM�������̑&&&5����;;;�<<<�xxx�QQQ�;;;�KKK����������������������������������������������������������8���8��~9��|:��z;��x<��v=��t>��r?�̷������999�����������������������VVV�###�)))�444��������������������������������������������������������������������ѳ�͝b���@��~9��|:��z;��}C���g��˶����Ӎ���������󑑑�����ZZZ�lll�;;;�!!!�"""�)))�___���������������������������������������������������������������������������������������&&&2����:::�ppp�{{{�___�WWW�WWW�:::�!!!�"""�***�www�������������������������������������������������������������������"""4888&���,������̑999����Ԗ���JJJ�|||�lll�:::�"""�BBB�XXX�|||��������������������������������������������������������������������$$$6�������,��������������������������������uuu�KKK�CCC�@@@�...�www����������������������������������������������������������������������������������*������Ҍ666"������������������������KKK�aaa�LLL�WWW��������������������������������������������������������������@��������$����"""4;;;&���������������������nnn�fff�!!!�$$$�999������������������������������������������������������������444]ttt|������ȇ������ɑ&&&5��Ў������������������������vvv�mmm�VVV�{{{�OOO����������������������������������������������������������������ڥ�����������������������������������������������aaa�CCC�����ppp�������������������������������������������������������������������������ό555"��ބ����������������������������������|||�MMM�����fff���������������������������������������������������������������"""4;;;&�������������������������������������������\\\�����������������������������������������������������������������Ǒ%%%5��Ύ�����������������������������������������������������������������������������������������������ݧ�����������������������������������������������������������������������������������������������������������������ܦ������͌555"��ۄ�����������������������������������������������������������������������������������ۥ����"""4:::&������������������������������������������������������������������������������������ڤ������Ñ%%%5��ˎ�����������������������������������������������������������������������ܤ��������������������������������������������������������������������������������������������������ׇ
������ww���?ww�?�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww��ww��ww��ww��ww��ww��ww�?�ww��ww���ww���ww( @ ����������������������������������!!!0\\\JeeeQ666D555A0$
�������v�H��<��6��0��2��\�������7���q��������������������ڴ���vvvj&&&D1"����g�L��F��@��;��5������?��������������������������������������������������к����V�Q�K��E��?��9������(�����������a���V�������������������������������������[�U�P��J��D��>��8��2��-���������uuun{{{j���������������������������������������`�Z�T�O������������������������������������������������������������������������V��o@��lA�����b�_�Y�S�M��G��B��<��6��0��+���%���<���������������a���V�����������������������m��t>��q?��n@�����b�b�^�X�R�L��F��A��;��5��/��)���$���Y����������wwwn}}}j����������������������~C��v=��s>��p?�����b�b�a�]�W�Q�K��E��@��:��4��.��(���+���������������������������������������{;��x<��v=��s>�����b�b�a�[�V�P��J��D��?��9��3��-��'��������������a���V����������������������~:��{;��x<��u=���p���������������������������������r��=��7��2��,����������yyynj�����������������������9��}:��z;��w<��u>��r?��o@��lA��iB��fD�}dE�|cE�|cE���i���B��<��6��1��������������������������������������?��9��}:��z;��w=��t>��q?��n@��kA��iC��fD�}cE�|cE�}dF�����G��A��;��=�������������a���V���������������������ңi���8��9��|:��y<��v=��s>��q?��n@��kB��hC��eD�|cE�|cE�����L��F��@��m����������zzzn���j�������������������������ʓP���8��~9��{;��y<��v=��s>��p?��mA��jB��gC�eD�|cE�����P��J��\��������������������������������������������������������������������������������¯��mA��jB��gC�~dE��������������������������a���V��������������������������������������}:��z;��x<��u=��r?��o@��lA��iB��fD���������|||n���m���������������������������������������9��������w=��t>��q?��n@��lA��iC�������������JJJ��������������������������������������������őP��������y<��v=��t>��q?��n@��~Y������������VVV�???�www�����iii�����������������������������������Ρk���A��|;��y<��v=��yF���p��������>>>3@@@y����~~~obbb�000�kkk�@@@������������������������������������������������������������������---U��������������<<<�&&&�[[[�������������������������������������������������������6���uuu�sss�WWW�III�$$$�&&&�qqq�����������������������������������lllg|||s���4����bbb�hhhƑ�������UUU�000�QQQ�}}}��������������������������������---{bbb�����(����������������������iii�LLL�BBB������������������������������������������������������a���V����������������ggg�+++�NNN�������������������������������������������|||n���j����������������]]]�ttt�kkk�������������������������������������������������������������������rrr�www���������������������������Ӧ�������a���V���������������������������������������������������Ӧ����zzzn���j�������������������������������������������Ӧ�����������������������������������������������������������ˉ��?������������������?�?�?���������������?�(  ������C�������������������﫫�o���������I�����������������������������������������ਨ������������S��=��?���������������������������������_�Q�F����4���������������������������������a�Z��������������������������������������м���oE�����c�a�X�M��B��7��0��������������������~I��q?�����c�`�V�K��@��5��8��������������������z;��u=���q�����������������v�>��3����������������������E��y<��t>��n@��iB�~dE�}dF�������G��H������YYY�uuu����������ġ���=��x<��s>��mA��hC�}dE�}eG�����S���������444�|||����������������������������gC�}cE�������������������������MMM������������������~>�����q?��kA��iG������������������RRR��������������¢���G��u=��xK�ʺ��������������������������������������������������������������������������������������������������������������������������������������������~�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A  �(  �h00 �%   � h<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD�������Ȣ��0�8�`��أ࣐����8�X�x���ث���� �(�8�H�X�h�x���������Ȭج����(�8�H�X�h�x������� �`�h�p�x�������������������ȡСء������� �(�0�8�@�H�P�X�`�h�p�x�������������������ȢТآ������(�@�H�P�X�`�h�p�x�������P�X�python3.3/site-packages/pip/_vendor/distlib/w64.exe000064400000263000151733566750016055 0ustar00MZ����@���	�!�L�!This program cannot be run in DOS mode.

$p���4���4���4���g�5���=�u����=�r�X���=�d�=���=�b�7���4���U���=�x�5���=�e�5���=�`�5���Rich4���PEd�1�R�"	��4*@�fv@��(P�P@`	����.textV�� `.rdata�+�,�@@.data�6�@�.pdata`	@
@@.rsrc�PPR@@.reloc��b@BL��I�SM�CM�K SWH��HH���H3�H��$03�;���L�ʺI�CD�B�H�L$0H�D$ �}3H�
V���H��H��H;�u,H;�tJH�E�H���H��H;�uH��w��#L�6�H�T$0A�3��D$(�f�|$ �й�7��H��$0H3��FH��H_[�H�\$H�t$WH�� �r�3�H��L�ًօ�x5�Lc�I�����
L��H��t����A;ID�I��A+��y�H�t$8H��H�\$0H�� _�H��H�XH�hH�PVWATAUAVH��@L��L��H��H�H3�H�h���;�H�f����f���H�L$xD�E3��H�L$x��H�L$x������D��;�L�E3�����L�L$xD�uI��A�I���D�ML�&H��I�����H��H;�tH�L$ D�EH���iA+����H����H�L$xA���;�H��L�E3����UL�L$xL��I��H���BL��A�H��H���j�����H���H;�H�����o���H�L$ H��A��li+�H�����
+\$0H�L$x+\$,��H�E3�����L�L$xA�I��I�����H�Q�H;�H��������N�\#�M;�r�N�fA9t
M+�M;�s��I��H�L$x�L�\$@H��I�[0I�k@I��A^A]A\_^��H�\$H�t$WH��@H��H�����H�#�D$0�L��H��L��H�׉t$(�d$ ���؅�u�ͼ��D�H�t$X��H�\$PH��@_��H��(��u�
r��t3�Z��H��(�H�\$WH��pH��3�3�f�L��$�A��H��H��$��	H��H�D$ �2���t��$��u��3�H�!������$�0L��$�A���	H����H�������3�H�L$pD�Bh�gO������D$ph�ĻH��$�H�����H������F�����������H��$�H���s���H������������r�H��$�H���J���H�������H�
�����DŽ$��W�L�\$PL�\$HH�D$pE3�H�D$@H�d$8H�d$0�d$(E3�H��3��D$ ��H���L�Nj����D�\$`H�T$PH��D�����H�L$X���H�L$P���u�H�L$PH��$����H�c����4�����$��'����H�\$H�l$H�t$WATAUH��`H��H3�H��$P�!��8"t� ��"H����H���3�H;�u	L�%(��L�`����;�tI��A�$@:�u�L�-��3�I��D����=�"��uL�-�H��A�lH�L$@H�����P�����H;�H���H�����I���H��H��H��H;�s�8
t�8
t
H��H;�r��H��H;���H�|�������@�/���;�tH��@8.u�>#��H�������������;�t
H�Ɗ@:�u�>!��H������������;�t
H�Ɗ@:�u�3�I��I��I�ɍP�H��H��L�A�I���I��H��H��L�I���H��I�\H���H�S�H;�H��@�ŋ��B���L�d$0L�
n�L��H��H��L�l$(H�t$ �FH�������H��(H�1��
'�������������������������ff�H;
��uH��f����u��H���	�@SH�� �������H�
���H��H�� [H�����@SH�� ��H�
����H��tH���H��ַH��t���H�� [����@SH�� �������?���̹��̹���H;�s-H�\$WH�� H��H��H�H��t��H��H;�r�H�\$0H�� _��H�\$WH�� 3�H��H��H;�s��uH�H��t��H��H;�r�H�\$0H�� _����H�\$WH�� H�=Z��tH�
O�b��t��>�H�R�H�
#��~�����uZH�
7��H���H�=���H�H��t��H��H;�r�H�=�tH�
����tE3�3�A�P��3�H�\$0H�� _��H�\$H�t$D�D$WATAUAVAWH��@E���D����B��=>����*�D�%�����H�
P�KH��H�D$0H����H�
+�.H��H�D$ L��H�t$(L��H�D$8H��H�|$ H;�r�H9u��H;�r\H���H����H���H�
���H��H�
���L;�uL;�t L��H�\$(H��H�\$0L��H�D$8H��H�D$ �H��H�
ŷ���H��H�
ҷ����E��t
��)E��u&��A�L$�A������A�����H�\$pH�t$xH��@A_A^A]A\_���E3�3��j�����E3�A�P�\���3�3�D�B�O�����̺3�D���=����@SH�� ��H��H����#H���#H����H���#H���v#H���� H����H����H�
����zH���H�� [��L��M�K H��8I�C(I�C�I�c��/&H��8���@SH�� H���AH�����H�CH���H�H���H�KH�
��H;�t����`�u�2H�H�G�H9CtH�C����
9�u	�)H�CH�C���u����C��o�H��H�� [����@SH��@�=�Hc�uH�?��X���VH�L$ 3��&���H�D$ ��~L�D$ ����2D���H��@D�XA���|$8tH�D$0����A��H��@[���H��t7SH�� L��H�
l3����u�H��²����H�� [����@SH�� �d$@L�D$@�c3H��H��u9D$@t��H��t���L$@�H��H�� [����H�\$H�t$WH�� H��H���w|�H��HE�H�
�H��u �������g���H�
�L��3�a�H��H��u,9�tH���U!��t
��6��+�H����/!��3�H�\$0H�t$8H�� _����:�t
H�����u�:�uH���3����M��t
8t	H��I��u�I��H�H#��H�\$H�t$H�|$ ATH��@H�d$0E��H��H��3�H������u'��H�d$ E3�E3�3�3��3���3�H������u'�]�H�d$ E3�E3�3�3��r3��3�8����u$�+�H�d$ E3�E3�3�3��@3��g�#7H��H�D$PH��u��3��F�>u"���H�H�L$0�j8��3��L��E��H��H���4H��H���|3H��H�\$XH�t$`H�|$hH��@A\����@SH��0I��L��H��H��u%�sH�d$ �E3�E3�3�3ɉ����$A��H��I���~���H�H��t3���1�H��0[��H�\$ UVWATAUAVAWH��03�L��L��H�L$xM��M��H��H��$�H��L;�t)L;�t$L;�u9��H�\$ �E3�E3�3�3��3�H��$�H��0A_A^A]A\_^]�H��$�H;�t3�H��I��L;�v)H���tL��3�I���BH��H;�t�3�H��I��L;�w�I��I��GH��tD�O$�A�D�L$pH���g�GA����taLcwE��tS�/I;�DB�E��L;���L�H��H�L$x�AD)wA��L�t$xH+�HH��$�D�L$pL�H+��L�t$xE��I;�rhE��t 3�I;�vA��E��A���	H��D��I��D+��
D��I;�EG�A��H;�wuH����@E��L�t$xI�֋��Q?�������tw��H+��s���H���V6���tdH��$�H��t*A�D�O$H��I��H��D�L$pL�t$xH��$�H������H���t
L��3�I���CA�H�d$ �"�����O H+�3�H��I�������O��I���������H��H�XH�pH�xL�` AUH��0I��M��H��L��M��trM��tmH�\$`H��u4H���t
L��3��@�z�H�d$ E3�E3�3�3��3��1H���/�H�\$ L��M��H��I������H��H���0H���3�H�\$@H�t$HH�|$PL�d$XH��0A]����H��8L�L$ M��L��H���,���H��8����H��H�XH�hH�pH�x ATAUAVH��0H��H��u'��H!\$ E3�E3�3�3�������X��>�{Lc�}�c3�A��D�B�4D��xҋS��u
+s����;L���+k��t<I��I��H����I��Hk�X�D�tH�C�
�8
u��H��H;r�u������x��
��Z��������{u3��+{M��M��{I��A��K��Mk�XA�D�tz3�A��D�B�nC;�u#H�C��H��
�8
u��H��H;�r��c
sG�CE3���A���:C�������;�w�Ct	�c
��s�{$H��J��A�Dt��+��D5H�\$PH�l$XH�t$`H�|$hH��0A^A]A\��H�\$H�L$WH��0H��3�H������u%��H�d$ E3�E3�3�3������$-�H�������H���-��H�\$HH��0_�H�\$H�l$H�t$WH�� �AA����H�٨�u�����j���3�AA��u	������H���VCD�[E��y
A��D�[�A��tA��tA��
r�C$H���<D�Nj֋���A���@�ōE�H�\$0H�l$8H�t$@H�� _���H�\$H�t$H�L$WH��0A�؋�H��3�H������u%���H�d$ E3�E3�3�3���
���R��t/��t*��t%��H�d$ E3�E3�3�3��
�����+�D��H�������H���C,��H�\$HH�t$PH��0_��H�\$WH��0��H��H��u#�BH!\$ E3�E3�3�3���X
��F�A�t:�BH�ˋ��EH���[;���hD��y���H�K(H��t
���H�c(�c��H�\$@H��0_����H�\$H�L$WH��0H�ك�3�H������u$�
�H�d$ E3�E3�3�3�����&�A@t�a��*�H��������H���;+��H�\$HH��0_���H�\$H�t$WH��H�L$0�K���MZf9~��ubHc���H�5n��HƁ8PEt3ۉ�$��N�f9Ht3ۉ�$��8���w3ۉ�$��$3�9���É�$��3ۉ�$�H�5
�������'��u!9=|�u���������@��u!9=R�u�������[��F��;��y
�������H�
�HH����G��y
����D��y
�	��������t�����D@�|$l�T$pA�
DE�L��3�H�������D$ ��u�����������$�u������������L��$�I�[I�s I��_����H��(�IH��(������H�L$H��H�
�����L���L�\$XE3�H�T$`H�L$X諠H�D$PH�|$PtAH�D$8H�D$HH�D$0H�D$@H�D$(H���H�D$ L�L$PL�D$XH�T$`3��Y��"H��$�H�L�H��$�H��H���H�2�H���H��$�H����z�	��t�H���H�D$hH���H�D$p��������RI3���H�
���m��=��u
��*I����	�H��>�H�Ĉ���H�%e��3�H�%[����H�%Y��H��(�
f����t
�[��
T��H��(����H�\$WH�� H��H��H�a�H����Aǁ�ƁtCƁ�CH���H����
�?�H�����
�)���H���H��uH��H���H����T!����H�\$0H�� _���H�\$WH�� �̣�
~����f�H��H��uH�H���UHH��H��t3�
S�H��B�H�˅�t3����F�H�K�����3ۋ�&�H��H�\$0H�� _�@SH�� �q���H��H��u�H��H��H�� [�H���+H�\$WH�� H��H�I8H��t� �H�KHH��t��H�KXH��t��H�KhH��t��H�KpH��t���H�KxH��t���H���H��t���H���H���H;�t���
��H���H�L$0H��t��uH���H�L$0H;�t�y���
�b��X�H���H��t+H���7 H;=@�tH���H;�t�?u	H������H����H�\$8H�� _����@SH�� �I�����t`H�
�������������tH����mFH��H��t1�
k�H��Z���t3�H�������^�H�K��������3�H�� [����H�\$H�|$L�l$ AVH��0L�5$���3�I��;t��H����r�����wK���|��dK��u
�=���a�����H�=��A�L���H��I���J��tH�d$ E3�E3�3�3��H�u�A�3��j��Ϡ��u1L�T�H�
N����cJ��tH�d$ E3�E3�3�3���H�
$��IH��H��<vFH�
��IH���L���H�L8�A�H+��pH��tH�d$ E3�E3�3�3��oL���I��H���G��tH�d$ E3�E3�3�3��DLc�I��H��M�O�D��G��tH�d$ E3�E3�3�3��H�>�A� H���hE�E�����H��H��t2H���t,Hc�H�I�L��HI�T�H�d$ L�L$HL��H��A�H�\$@H�|$PL�l$XH��0A^����H��(��I��t��wI��u�=��u����������H��(��H�\$H�t$H�|$ATH�� L�%(�3�3�I�܃{u%Hcƺ���H��H���H��H���
��t-H�/�H����H;�|øH�\$0H�t$8H�|$@H�� A\�Hc�H�I�$�3�����H�\$H�l$H�t$WH�� H���H�-��H��H�7H��t�tH��$�H���L�H�'H��H;�|�H�H��t�{u���H��H;�|�H�\$0H�l$8H�t$@H�� _��Hc�H�*�H�H��H�%̞H�\$H�t$H�|$AUH�� HcپH�=O�u�h����N�8��������H��H�L�-��I�|�t���{�(��AH��H��u��3��Z�
�f�I�|�u/��H���h��uH���P���3��I�\��	H���2��H�
�������H�\$0H�t$8H�|$@H�� A]�H�\$WH�� Hc�H�= �H�H�<�u�����u�H��H��H�\$0H�� _H�%��H�
���@SH����d$pH�L$t3�A���0L�\$pH��$H��$L�\$HH�D$P���H��$H�T$@H��E3���H��t;H�d$8H�T$@H�L$`H�L$0H�L$XL��H�L$(H��$L��H�L$ 3��і� H��$�H��$H��$�H��$�H��$��D$p��D$tH��$��E�3ɋ�3�H�L$H� ���u��u�H��?�R���H���H���[����H�\$H�l$H�t$WH��0H��H�
R�A��I��H�����H��tL�T$`D��L��H��H��L�T$ ���%��k?L�\$`D��L��H��H��L�\$ �h���H�\$@H�l$HH�t$PH��0_����L�
q�3�I��D�@;
t+��IЃ�-r�A�w�
Á�D������AF��H�A�D���H��(����H��u	H����H��H��(�H��(���H��u	H�g��H��H��(�@SH�� �����H��u	H�C��H����v���L�+�H��tL�P���;���A�H�� [���@SH�� ��J��>H��H���>���H�KH�<H��u�C�H�#3�H�� [���H�\$H�t$H�|$ATAUAVH�� L���'��H�
��L��H�
����H��I;���H��I+�L�oI����I���DH��I;�sT�H;�HB�H�H;�rI���>3�H;�u�3�H�V H;�rFI���w>H;�t9H��H��H���^�H�k�I���O�H�H�K�C�H�H�I���3��l�H��H�\$@H�t$HH�|$PH�� A^A]A\����H��(���H������H��(��H�\$WH�� H��H�=��H�H��t��H��H;�r�H�\$0H�� _�H�\$WH�� H�˰H�=İ�H�H��t��H��H;�r�H�\$0H�� _�H�\$WH�� H�3��
H��j�H�H��H��u�H�\$0H�� _���������������H���MZf9t3��HcH<H�3��9PEu�f9Q�����LcA<E3�L��L�A�@E�XJ�LE��t�QL;�r
�A�L;�rA��H��(E;�r�3��H�������������H��(L��L�
"��I���j�����t"M+�I��I�����H��t�@$���Ѓ��3�H��(����H��H�XH�hH�p H�PWATAUAVAWH��@M�yM�!I�q8M+�AfM��H��L����3�H�H�L�@�9>�+H�^�C�L;����C�L;����{���;t�H�L$0H��I�Ѕ���~sA�}csm�u(H�=�tH�
�������t�I�����KA�H��I��I�F@�SMcMH�D$(I�F(I�M��H��H�D$ �G����H��;>sj�>���3��fI�y 3�I+�9.vTH�^�K�L;�r>�C�L;�s6H;�rH;�sA�E u/�;t	�H;�t#�H�T$xIDZI�D�C�M�A���H��;.r��L�\$@I�[0I�k@I�sHI��A_A^A]A\_����H��(�O�H���H��t����z@H��(��H��(H�
�����H�e�H��(���H�\$H�l$H�t$WH�� H���r�E3�H��I;���H���Lcu�H��9:tI��H��H��H�H;�r�I��H��H�H;�s9:tI��I;��CL�BM;��6I��u
L�ZA�@��%I��u���H���H����J����Lc���
��A�M��D;�}*I��H���A��I��M�\��
������D;�|ځ:�����uǃ���v�:��uǃ���b�:��uǃ���N�:��uǃ���:�:��uǃ���&�:��uǃ����:��u
ǃ������A�Љ���L�ZA��H������3�H�\$0H�l$8H�t$@H�� _���H�
��H�
��H�
��H�
������H�
}���H�\$H�t$WATAUAVAWH��@��3��|$p3��у��	������������������tM��t,��t_�T����H!t$ E3�E3�3�3��j�������L�%��H�
����|$p�L�%��H�
����|$p�L�%��H�
����|$p�u��H��H��u���kH���H��Lc��9YtH��I��H��H�H;�r�I��H��H�H;�s9Yt3�L�aM�,$�L�%,�H�
%���|$p�_�L��I��u3��M��u
A�M�-��̅�t3�����t��t��tL�|$8D�t$p�1L���L�|$8H�����uD���dž���D�t$p��u9�
���щL$0����;�}*Hc�H�H���H�d��‰T$0�
������I�$��t3��Z�;�u
�����A�����A��;�t
��t��uL���;�uD���3�L�\$@I�[8I�s@I��A_A^A]A\_����H�
��H�
��H�
��H��8�ڑD�؉D$ �=�u���E3�D�\$ A��H��8����H�
���@SH�� H��H�
�����H��tH��Ѕ�t��3�H�� [���H��H�XH�hH�p �HWH�� H��H����"�KHc�u����	�K ���4��@t
�j����"��3���t�{����H�C��H��K�C�{�����C�u/�WH��0H;�t�IH��`H;�u����I;�uH���yI�C���+H�S+kH�BH��C$��;�C~D�ŋ��H���W�� �K�?������t#���tH��H��H�T���H��Hk�XH��H�
<��A t3ҋ�D�B�)?H������H�K�D$0���H�T$0��D���G��;������D$0H�\$8H�l$@H�t$HH�� _����H�\$H�l$H�t$WH��`3�M��I��H��L��L;�u'��E3�E3�3�3�H�\$ �����L;�tH;�t�L��$�����A��L;�L��$�H�T$@G�H�T$0H�L$0I���D$HB�D$8A�Ӌ�H;�t7;�|%�l$8x	H�D$0��H�T$03�������t���9\$8�\.��ÍC�L�\$`I�[I�kI�s I��_��H��H�XH�hH�pH�x ATH��0I��I��H��H��M����M��uH��uH����3��H����H����I;�vP���L�FH�
�K�H�D$hL��H�D$(H�D$`H��H�D$ ������uo��8"�������H�
�KL��D� H�D$hL��H�D$(H�D$`H��H�D$ �4����D����uH���u�G�8"uC�=�D� �9��y8����u-�'��"����H�d$ E3�E3�3�3��/��H�\$@H�l$HH�t$PH�|$XH��0A\��H��8H�D$`H�D$(H�d$ ���H��8���H�\$H�l$H�t$WH�� H�YH��H��L��3���E3�H�}A�KA��D�]D�]D�]f�H�=~�H+���H��H��u�H����9�H��H��u�H�\$0H�l$8H�t$@H�� _���H�\$H�t$WH��H�s�H3�H��$pH��IH�T$P�������=3�H�T$p���H��;�r��D$V�D$p H�|$V�)�WD��D;�wA+�I��J�LpD�B� ��H�����uӋF�d$8L�D$p�D$0�FD�ˉD$(H��$p�3�H�D$ ��\�d$@�F�V�D$8H��$p�\$0H�D$(L�L$pD��3ɉ\$ �Y�d$@�F�V�D$8H��$p�\$0H�D$(L�L$pA�3ɉ\$ �jYL��$pH�N3�A�t�	��p�A�t�	 ��p���ƁH��H��I��H��u��?3�H�ND�B�A�@ ��w�	�B �A��w�	 �B��Ɓ��H��;�r�H��$pH3�����L��$�I�[I�s I��_��H�\$WH�� ��H������
r�tH���t	H����n�
����H���H�\$0H;7�tDH��t��uH��H�L$0H;�t���H�
�H���H���H�D$0�H�\$0�
�c�H��u�K �*��H��H�\$8H�� _�@SH��@��H�L$ 3�����%q����u%�b��,��|$8tSH�L$0�����E���u�8�����ԃ��uH�D$ ���@뻀|$8tH�D$0������H��@[�H�\$UVWATAUH��@H�E�H3�H�D$8H���I���3ۋ�;�u
H�������L�-	���H��I��A�98�'A�I�H��0��r����������K�;���H�T$ ���;���H�N3�A���~�^D9d$ ��H�D$&8\$&t-8Xt(�8�H;�w+�H�T7I�I+�u�H��8u�H�F���I�I+�u��N��t(��t��
tA;�t�����������FD�f��^H�~�ùf���9�����������H�N3�A��H�lmL���H�A�M�D�I��A8t18Yt,��A;�wL�L2A�A�A�AM�;�v�H��8u�I��M�M+�u��~��D�ft$��t��
tA;�u��������^H�VI�|���H��f�H��I+�u�H���|���3�H�L$8H3��	��H��$�H��@A]A\_^]��H��H�XH�pH�xL�` AUH��0��A����H������H��������D��;C��� �,*H��3�H;��|H���H��A� �q1�;H��A������D��;��$H�����uH���L�%�I;�t����L�%ۺH��������	�����
�X���C����C����C����׉T$ L�ô����}Hc��DKfA��H� �‰T$ ��׉T$ ��}HcʊDB����‰T$ ��|$ ��}Hcϊ�B����lj|$ ��H�C���uH�
6�I;�t���H�%���
���+���u&L�%ٹI;�tH���������3�D��A��H�\$@H�t$HH�|$PL�d$XH��0A]�H��(�=��u��������k�3�H��(�H�\$H�t$WH�� H��(H��H��tyH�
��H;�tmH��H��ta�8u\H�� H��t�9u����H��(�7XH��H��t�9u���H��(��WH�����H��(���H��0H��tG�8uBH��8H���q��H��H��H+��]��H��PH+��N��H��0�B��H��XH���H;�t��`u�UUH��X���H�{X�H���H9G�tH�H��t
�9u����H��tH�OH��t
�9u����H�� H��u�H��H�\$0H�t$8H�� _������H��H��t�H�� H��t�H��H��t�H��0H��t�H�AXA�H��H9P�tH�H��t�H�x�t
H�PH��t�H�� I��u�H��X�`����H����A���D	H��H��t�DH�� H��t�DH��H��t�DH��0H��t�DH�AXA�H�>�H9P�tH�H��t�D
H�x�t
H�PH��t�D
H�� I��u�H��X�D�`H������@SH�� H��H��tAH��t<L�L;�t/H�H�����M��tI���%���A�:uH�ȻL;�t���H���3�H�� [��@SH�� ���H�؋���
~�tH���t���H����+�����H���H�ü�V���H�ع��H��u�K �t��H��H�� [����H�l$H�t$WH��`Hc���H�L$@I���S��D�_A��wH�D$@H��@�y���H�T$@��@����:���t@��$�@��$�Ƅ$�D�J�@��$�Ƅ$�D��H�L$@�T$8L��$��A�D$0�AH�L$@�D$(H�D$pH�D$ �Q��u8D$XtH�D$P����3���D$p#ŀ|$XtH�L$P����L�\$`I�kI�s I��_���̉L$H��(E3��3���H���H��t#L�D$0A�3�H���D$0�j��H��(�H�\$WH��0I��H��H��t23�H�B�H��H;�s$�X�H�d$ E3�E3�3�3���m�3��]H���H��HD�3�H���wH�
b��PL��H��u-�=R�tH������u�H��t���H��t�H�\$@H��0_��H����@SH�� ������u��;�L�HcȺ�i��"H�=�H��u$�PH�ˉL���"H� �H��u��x3�H�K�H�H��0H��H��t	H�����E3�H�B�E�HI��L���I��H����I��Hk�XL�I���tI���tM��u�����I��H��0I��u�3�H�� [���H��(�{�=��t�UH�
v�H��(����@SH�� H��H�
��H;�r:H� �H;�w.H��H��������*H+�H��H��H��H��?�L�0��k�
H�K0�~H�� [��@SH�� ��H��}�����k�
H�J0��}H�� [����H��(H��H;�r7H���H;�w+�qH+�H��������*H��H��H��H��?�L����
H��0�{}H��(���H��(��}�r���z���
H�J0�R}H��(��H�\$H�l$VWATAUAWH��0�-<�I��E3�E3�E3ۀ: E�yE��H��L��uI߀; t��;at?�;rt3�;wt'�V�H�d$ E3�E3�3�3���k�3��9��3�A���	��I�A�׊����A�������ȃ�S~to�� ����tLA+�tB��t+��
t���u���E����E�׃�����@��@����@�E���w@��uq�������jE��u]E�׃� �]��TtJ��t:A+�t'��t������A��u3���5E��u(E�����'E��uE�����A��u�����s3����Iߊ������E�����I߀; t�H�
6�A�H���_�������H���I߀; t��;=�n���I߀; t�H���A�H����]��u
H�����MH��A�H����]��u
H�����*H�ԄA�H���]������H�����I߀; t��;���H�L$hE��D��I���D$ ��H[�����D=m�!F�D$hH�&H�fH�f(�F�nH��H�\$`H�l$pH��0A_A]A\_^�H�\$H�t$WH��03ۍK����3��|$ ;=����Hc�H�^�H�<�tkH��@�uV�`rO�G���w�O�Z������H�'�H�������L��I��@�tH�Ћ��}����H����lj|$ �x���Hc��X�'H�
��H��H�
��H�<�tXH��H��0�������uH�
��H�����L���I�$��$H���H��H��0�uyL�v�I���cH��t�c��cH�cH�#H�c(�K���N��H��H�\$@H�t$HH��0_����������������������ff�H���M3�M3�H�d$ L�D$(��rH����������fDH�L$H�T$D�D$I� ��������f��������f�����H�\$H�t$WH��0H��H��u$����H!|$ E3�E3�3�3�������A����@���t�� �A�����A�u�	1�H�AH�H����	D�G$H�W���M�G����������G�u_H���	���t<H���	���t/H���	H��H�5��Hc�H���o	D��A��Mk�XL��L���A�C$�<�u�o
�$u�Gt�g
r�G$H��O�H��H���������	G�g��H�\$@H�t$HH��0_���H�T$�L$SUVWATAUAVAWH��XA�����Hc�A��D�d$4�\$8A;�u���3��8�_���	�3�;���;����H��L��L�
����I����K���`$Hk�X�D1��������v�%���8�������;������H;�t�D�|18A�E�A�A�σ�t��u��Шt���L���d��Шt���A;�AB؋��L��H;�u���������=��$�3�D�B�x$L�
����L��K���`$L�\0@K���`$I��A�
�D0H���L0	A:���;���A�MK���`$A��A�I�UA�h�D�D0	D:�tbK���`$�L09A:�tQ;�tM�
K���`$A�H��A�h�D�D09A��u.K���`$�L0:A:�t;�t�
K���`$H��A�h�A�D�D0:K���`$L�L$0D��H�1H�|$ �ju;���HcT$0;�����H;���L������K���`$�D0��yA����;�tA�}
u�L0��d0�Hc�I��M��I�H�D$@L;��:�
A�$<�
@:�t
�H��I����H�D$@H��L;�sI�D$�8
u	I���L���K���`$L�L$0H��$�H�1A�I��H�|$ �{t;�u
�1s;�u{9|$0tuL�����K���`$�D0Ht"��$�
t'@�+K���`$��$��D1	�GI;�u��$�
u�
�3��$�A�H���%"��$�
L�N���t�L�C���@�+H��L;d$@����K���`$�D0@u�L0�	A�$�H�Ë�A+�A����;���A�I+��uI��A�����I;�rI+�A��B8�`t��B��`;�u�]���*A�����;�uHc�H��^K���`$�D0Ht;I߃��L0	|�K���`$I߈D19��u�K���`$I߈D1:Hc�H+����$���E��Hc�� �D$8L��$�A+���D��M�ʼnD$(3ҹ�L�|$ ��r��;�u�aq������A����D�d$4;�H�۠��J���`$@���|0H�;׺
tfA9Uu�L0��d0�Hc�I��M��N�<(M;��{�
A�$f���Ef;�tf�H��I���%I�G�L;�sI�D$f9u	I����L���K���`$L�L$0H��$�H�1A�I��H�|$ ��q;�u�up;���9|$0��L��K���`$�D0HtF�
f9�$�tKf�+��$�K���`$�D1	��$�K���`$�D19K���`$�T0:�WI;�u�
f9�$�uf��>��$�H�����D�B�7�
L�c���f9�$�t��
L�K���f�+H��M;�������"K���`$�D0@u�L0�A�$f�H����A+�D�d$4L��$�M;�tI���p���A���DD�A���i�Mo��u����	����������muD��뮋��������3��)�v���8�O���	E3�E3�3�3�H�|$ �e����H��XA_A^A]A\_^][��H�\$H�t$�L$WATAUAVAWH��0A��L��Hc����u���3ۉ�����	���3�;���;=_���L��L��I��L�=d�A��Mk�XK��B�L ��u.��������	H�\$ E3�E3�3�3���������A�������;�u+�z����S���H�\$ E3�E3�3�3��i�����n����T�K��B�D tD��I�Ջ��s�������
���	���������3U���)�
��������	H�\$ E3�E3�3�3������H�\$hH�t$pH��0A_A^A]A\_���H��8H��u%���H�d$ E3�E3�3�3���������AH��8���H�\$H�t$WH��0I��I��H��M��u3��fH��u%�I���H�d$ E3�E3�3�3ɉ�]�����<M��tH;�r
L��H���t�L��3��HH��t�H;�s����"뮸H�\$@H�t$HH��0_��������������������ff�H��I��rS��I�I��I��@rH�ك�tL+�H�H�M��I��?I��u9M��I��I��tfff��H�H��I��u�M��t
�H��I��u��@fff�ff�I��s0H�H�QH�QH��@H�Q�H�Q�I��H�Q�H�Q�H�Q�u��fDH�H�QH�QH��@H�Q�H�Q�I��H�Q�H�Q�H�Q�u��$�T�����H��H�XH�pH�xL�` AUAVAWH��H�L$ ��k��XD�b�I���L��E3�I;�u���{H�-�A�̉
�HL;�sCE�{I��A�C	
E�{E�{8A�C9
A�C:
E�{PE�{LI��XH��HL;�rË
��fD9|$b�IH�D$hI;��;L�hHc0I��9L�;���L�5���XI���;L��I;�tiI���Y�AĉP�I��L;�sAE�{I��A�C	
E�{A�c8�A�C9
A�C:
E�{PE�{LI��XI��HL;�rŋ�H��;�|�����L�5�A��A;�~~H�>�tkH�>�teA�Et^A�EuH��4kA;�tILc�I��H��A��Mk�XM$�H�I�$A�EA�D$I�L$������A;�tA�D$�������I��H��;�|�E��I��H��Hk�XHm�H�;�tH�;�t�K���C�A�D$���Ƀ�������E;�D�:iH��H���tJI;�tEH��{jA;�t7H�3����u�K@�	��u�KH�K�����A;�t�C����.�K@H�����A��H��H���Q����
���j3����L��$�I�[ I�s(I�{0M�c8I��A_A^A]����H�\$H�t$WH�� Hc�A�������NH���u����	���RD��E3���H���i�����u�Jh�3���t	��������H��H��H�$�H����H��Hk�X�d���H�\$0H�t$8H�� _���H�\$H�t$�L$WATAUAVAWH��0E��D��Hcك��u�>��3��8����	����3�;���;����H��L��I��L�=����Hk�XK���L0��u+�����8����	H�|$ E3�E3�3�3��������m���1N�K���D0tE��A�Ջ��������w���	����8�����N���)�w���8�P���	H�|$ E3�E3�3�3��f����H�\$hH�t$pH��0A_A^A]A\_����H�\$H�t$WH�� �A3�H��$<u?�At6�9+y��~-�8���H�SD�Nj��;�u�C��y��C��K ��H�K�c��H�t$8H�H�\$0H�� _����@SH�� H��H��u�5�,�j�����t����csH���������O����3�H�� [��H�t$H�|$L�d$AUAVAWH��0D��E3�3��N�����3��|$ A��;=����Lc�H���J�<�tjJ��B�t`�����H���J��A�t5A��u�9���A;�t%A��D�d$$�E��u�At����A;�AD��t$(H�T�J�������lj|$ �n�����@��A��AD��H�t$PH�|$XL�d$`H��0A_A^A]ù������H�\$WH�� Hc����TKH���tYH�����u	@���u
;�u�@`t�%K�H���KH;�t���KH���d��u
��d���3ۋ��@JL��H��H��A��H�s�H��Mk�XB�D��t���������3�H�\$0H�� _�H�\$H�t$ �L$WATAUH��0Hcك��u���3��8�k���	����3�;���;���H��L��I��L�-���Hk�XK�D��L0��u+�;���8����	H�|$ E3�E3�3�3��*�����a���J�K�D��D0t�������������	�����K���)�����8����	H�|$ E3�E3�3�3�������H�\$`H�t$hH��0A]A\_�@SH�� �A�H��t"�AtH�I�*����c����3�H�H�C�CH�� [��H��(H��8csm�u+�xu%�@ = �t=!�t="�t=@�u����3�H��(����H��(H�
�����c3�H��(�H�\$WH�� 3�9=��u�G��H���H�txH��HD؀; w	�;t3��t)�;"u	3���������M��tH��H����< w	H�Ê��u�H��H�\$0H�� _����H�\$H�l$H�t$WH��0�=U�u����H��3�H��u����<=t��H���
H�\���u�G�Hc��sH��H���H��t�H����;teH����
�;=�ptCHc�H���8H�H��trL��H��H���F��tH�d$ E3�E3�3�3����H��Hc�H؀;u�H�W�H���O���H�%G�H�'�Y�3�H�\$@H�l$HH�t$PH��0_�H�
ۥ����H�%Υ�����H��H�XH�hH�pH�x ATAUAVH�� L�l$`M��I��A�eL��H��A�H��tL�I��3�;"u3���@�"��H�Ë��9A�EH��t��H���3H�Ë���K��tA�EH��t��H��H��@��t��u�@�� t@��	u�H��t	�G��H��3��;���; t�;	uH����;��M��tI�<$I��A��3��H����;\t��;"u6��u��tH�C�8"uH���3�3҅����������H��t�\H��A�E��u���tO��u< tG<	tC��t7���JH��t��t�H�ÈH��A�E��H�����tH��A�EA�EH���Y���H��t�H��A�E����M��tI�$$A�H�\$@H�l$HH�t$PH�|$XH�� A^A]A\��H�\$H�t$ WH��0�=Z�u����H�=��A�3�H������_H�
�H�=ΣH��t�;uH��H�D$HL�L$@E3�3�H��H�D$ ���Hct$@H��������H;�s\HcL$HH���sQH��H;�rHH����H��H��t8L��H�D$HL�L$@H��H��H�D$ �g���D�\$@H�=�A��3�D�����H�\$PH�t$XH��0_���H��H�XH�hH�pH�x ATH��@�
��E3�I��A�t$A;�u2�{_H��I;�t����!��]�
����xDΉ
�����I;�u�;_H��I;�u3��H��fD9#tH�fD9'u�H�fD9'u�L�d$8L�d$0H+�H�L��3�D�O3�D�d$(L�d$ ��^Hc�A;�tAH���H��I;�t1L�d$8L�d$0D�OL��3�3ɉl$(H�D$ ��^A;�uH���-���I��H���^H���s;�t	A;��L����a^H��I;��:���D8 tH��D8 u�H��D8 u�+��Hc�H���	H��I;�uH��^����L��H��H���MH���]H��H�\$PH�l$XH�t$`H�|$hH��@A\���H�\$WH�� H��H�d$0H�2��-�+H;�tH��H����vH�L$0��]H�\$0��]D��I3��\D��I3��]H�L$8D��I3��]L�\$8L3�H�������L#�H�3��-�+L;�LD�L���I��L���H�\$@H�� _�̃%���H�\$H�l$H�t$WH�� 3�H���H���0���H��H��u(9B�v ���[D���D;*�A��G�;�u�H�l$8H�t$@H��H�\$0H�� _�H��H�XH�hH�pH�x ATH�� 3�H��H��A��E3�H��H������H��H��u*9Ǭv"��I[D���D;��A��AG�A;�u�H�l$8H�t$@H�|$HH��H�\$0H�� A\��H��H�XH�hH�pH�x ATH�� 3�H��H��A��H��H���FH��H��u/H��t*9A�v"���ZD���D;)�A��AG�A;�u�H�l$8H�t$@H�|$HH��H�\$0H�� A\����H�\$H�l$VWATAUAVH��@A��L��L���X���3�H��H9Ы��H�
+e�ZH��H����H�eH���YH���sH������H��dH��H����YH�����H��dH��H�h���YH���ƴ��H�[dH��H�Q���YH��觴��L��H�I�H��t!H�dH��dYH��耴��H���H���H��L��H;�tcL;�t^H���b���H�
�H���S���L��H��t?H��t:��H��t-H��$�A�L�D$0H�L$ A�Q�H��A�ԅ�t�D$8u���>H�
��H;�t2���H��t(��H��H��tH�
m�H;�t�۳��H��tH���H��H�
?��³��H��tD��M��I��H����3�H�\$pH�l$xH��@A^A]A\_^�@SH��0L��H��t
H��tM��u,D��|����H�d$ E3�E3�3�3ɉ萼����H��0[À9t	H��H��u�H��uA��A�I���H����tH��u�H��uA������"�3�����@SH��0M��M��uH��uH��u 3��?H��tH��tM��uD�	��M��u,D��Ӽ���H�d$ E3�E3�3�3ɉ�����H��0[�L��L��I���uA�I��A�I�„�t,I��u��$A�I��A�I�„�tI��tI��u�M��uE�
M���f���I���uD�D�A�@P���E����"�m��������������������ff�H��H��H�tf��H����t_�u�I��������~I��H�M��H��L�H��I3�I#�t�H�P���tQ��tGH����t9��t/H����t!��t����t
��u�H�D��H�D��H�D��H�D��H�D��H�D��H�D��H�D��@SH��0H��t
H��tM��u,D��[����H�d$ E3�E3�3�3ɉ�o�����H��0[�L��A�I��A�I����tH��u�H��u������"�3������H��8��x ��~
��u��1����
���#�׺��H�d$ E3�E3�3�3�������H��8�H��8H��u&覺��H�d$ E3�E3�3�3��軹��H���L��H�
å3��VH��8��̹����H���b�t
�
膳���}���H��t
��z����;�t_H��$��cUH�L$03�A���I�H��$�3�H�D$@H�D$0�D$0@H�D$ H��$�H�D$(��TH�L$ ��T�褟������������������������ff�L��H+���I��ra��t6��t�
I�ȈH����tf�
I��f�H����t
�
I���H��M��I��uQM��I��tH�
H�H��I��u�I��M��uI���@�
�H��I��u�I���fffffff�fff�ff�I�� sBH�
L�T
H�� H�A�L�Q�H�D
�L�T
�I��H�A�L�Q�u�I���q���fff�f�H��r�� 
D
@H�����u�H���@L�
L�T
L�	L�QL�L
L�T
L�IL�QL�L
 L�T
(H��@L�I�L�Q�L�L
�L�T
���L�I�L�Q�u�I��I���q����$���ffff�fff�fff�f�I�I��ra��t6��tH�Ɋ
I�Ȉ��tH��f�
I��f���t
H���
I���M��I��uPM��I��tH��H�
I��H�u�I��M��uI���H�Ɋ
I�Ȉu�I���fffffff�fff�ff�I�� sBH�D
�L�T
�H�� H�AL�QH�D
L�
I��H�AL�u�I���s���ffff�f�H���w�� H��
D
@��u�H���@L�L
�L�T
�L�I�L�Q�L�L
�L�T
�L�I�L�Q�L�L
�L�T
�H��@L�IL�QL�L
L�
��L�IL�u�I��I���q����$���@SH�� E�H��L��A��A�L��tA�@McP��L�Hc�L#�Ic�J�H�C�HHK�At�A���H�L�L3�I��H�� [�y����H��(M�A8H��I������H��(����H�\$WH�� Hc�A��H�T$8����6H���u����	H���W�T$8L�D$<D��H���Q�D$8���u�IP��t	���Ƶ����H��H��H�'�H����H��Hk�X�d�H�D$8H�\$0H�� _����H�\$H�t$�L$WATAUAVAWH��0E��L��Hcك��u�B���3��8�����	H����3�;���;����H��L��I��L�=����Hk�XK���L0��u,����8�´���	H�|$ E3�E3�3�3��س��H���q���36�K���D0tE��I�Ջ����H����x����	荴���8H�����6H���*�v����8�O����	H�|$ E3�E3�3�3��e���H��H�\$hH�t$pH��0A_A^A]A\_��H�\$ UVWATAUAVAW�0�IH+�H�T~H3�H��$ 3�3�E��L��Hcىl$@E��u3���H��u.���!8軳��H!|$ E3�E3�3�3���Ѳ�����L��L��H�<�I��A��J��L�t$PMk�XA�t8@�@�@��t@��u	A��Шt�A�D t
3ҋ�D�B�Z����������H�ܡJ��A�D����w���3�H�T$XH���H���9YJ��I���fO������t	@�����CO!|$LI�܉D$XE���wD�t$X�
@����H�T$P�E3���
H�-H�H�T�A��A�|Pt A�DL�L$]A��D$\A�dPH�T$\�I������t4I��H+�I�H����H�L$DA�H���;����vH���A�H��H�L$D�;����UH�d$8H�d$0�L$XH�D$\L�D$DA�3��D$(H��H�D$ �N���H�D$PH�d$ H�
g�H��L�L$LH�T$\I�D��,M���B��A+�|$@9l$L���
E����H�D$PH�d$ @�l$\H�
�L�L$LD�E�H��H�T$\I���L�����|$L|{�D$@���e@��t@��u�E3�f��
f�D$DA��H��@��t@��u6�L$D��7f;D$D����E��t��f�l$D��7f;D$Dux��D$@��A+�A;������\$LL�t$P�l$@�������z���e苰���	蠰��������L�t$P��J�L�A�DLJ�D�A�DP�\$L�K��떋\$L�H��J��A�D���3�I��@����E�����S
D�t$@H��$ 3ɋ�A+�A;�s&�EH��<
u�A��H��H��H���H��H���r�H!\$ H��$ D��D+�H�h�D�t$@L�t$PL�L$HH��$ J��I��#K��t5|$HH��$ H+�HcD$HH;������ź
A+�A;��N�������J�����@����E���"�
D�t$@H��$ 3ɋ�A+�A;�s1�EH��f��
uf�A��H��H��H��f�H��H���r�H!\$ H��$ D��D+�H���D�t$@L�t$PL�L$HH��$ J��I��<J���J���|$HH��$ H+�HcD$HH;������ź
A+�A;��?�������E���NA�
H�L$p3ҋ�A+�A;�s.�EH��f��
ufD�H��H��H��f�H��H���r�H�d$8H�d$0H�D$p+�L�D$p�D$(U
�����+�3��D��H��$ H�D$ �
JD�������3�H�D$PH�d$ Hc�H�� E��H�
`�H��L�L$HD+�I��*I��tt$HD;����=H��D;�������A�
A+�A;��������I�H!|$ L�L$HE��I���H��t�|$H3������G��������d����~���H�țJ��A�D@tA�<$�.������������ �H���+���H��$ H3��E���H��$�H��0A_A^A]A\_^]���H�\$H�t$�L$WATAUAVAWH��0E��L��Hcك��u説��3��8聬���	����3�;���;����H��L��I��L�=����Hk�XK���L0��u+�R����8�+����	H�|$ E3�E3�3�3��A������m���-�K���D0tE��I�Ջ������������	����8�����.���)����8輫���	H�|$ E3�E3�3�3��Ҫ����H�\$hH�t$pH��0A_A^A]A\_����@SH�� �̖H�ٹ�c�H�CH��t
�K�C$��KH�C �C$H�CH�C�cH�H�� [��H��8���u
�"����	�R��x.;
��s&Hc�H���H����H��Hk�XH���D��@�"���H�d$ E3�E3�3�3��	���3�H��8��@SH��@��H�L$ �J���H�D$ D��H��@B�Y%��|$8tH�L$0����H��@[����@SH��@��H�L$ 3�����H�D$ D��H��@B�Y%��|$8tH�L$0����H��@[��H�
�t3�H��H9
�����H�\$fD�L$ UVWH��`3�I��H��H��H;�uL;�vH;�t�)3��H;�t�	�I�����v$�ͩ���E3�E3�3�3ɉH�l$ ������oH��$�H�L$@�8���L�\$@A9k����$���f;�vLH;�tH;�v
L��3�H������_����*�T����@8l$XtH�L$P����H��$�H��`_^]�H;�tCH;�w<� ����"E3�E3�3�3ɉH�l$ �5���@8l$X�H���H�L$P�����7����H;�t�@8l$X���H�D$P��������H��$���$�A�KH�D$8H�l$0L��$�A�3҉|$(H�t$ ��D;�t9�$�����H;�t���C��z�����H;�tH;�v
L��3�H������?����"E3�E3�3�3ɉH�l$ �T���@8l$X�g���H�D$P�����V���H��8H�d$ ���H��8�@SH�� �B@I��tH�zuA��&�B�x
H��H�������������u	��H�� [�̅�~LH�\$H�l$H�t$WH�� I��I���@��L��H��@�������?�t���H�\$0H�l$8H�t$@H�� _����H�\$H�l$H�t$WH�� A�@@I��I���H��tI�xuA�7��~3�ML��H�������H�Ń?�u�����8*uL��H�ֱ?������H�\$0H�l$8H�t$@H�� _���H�\$UVWATAUAVAWH���H�qH3�H��$�3�H��H�L$hH��H�L$xI��M��D$`D��D$TD���D$H�D$X�D$P����E3�I;�uA�k���3�E3�E3�3�3��H�\$ ����8�$�tH��$��������A���C@L�
pp����H���f��H���A;�t(���t#Lc�L�
Gp��I��A��H��Mk�XM��`$�
L��L�
$p��A�@8u)A;�t���tHc�H�ƒ�H��Hk�XI��`$�B8�tA蟥��3�E3�E3�3�3��H�\$ 賤��8�$�tH��$�����A���KE3�I;�t�@�/A��D�T$@D�T$DA��L��$�A:��H��$�A�H��A;�H��$����E�<XwH��B�������A��Hc�H��Hc�H�B��	�����T$\���/�����A;����������@�������������������<@�Ń�d�~����A�@��C����E�.��G�%��Stm��X����Zt��a���c���HI�EI��I;�t/H�XI;�t&A���s��D$P+���D�T$P�H��s��A��0uA��I�]E;�A�ǹ���D�I��A���I;��D$PHD�sH����A��0uA��I��A��t,E�M�H��$�H�L$DM���W���E3�A;�t�D$X�A�E��D$D��$�H��$��M�D$p@�� A��@E;�H��$�A���-A��k��e���g~σ�i����n����o����pte��s�������u����x���'�S��fD9t	H��A;�u�H+�H��!I;�HD�rH���
��D8tH��A;�u�+ˉL$D�A�A����D$`A�E��y`Q�D$L0A�Q�D$M�SA�E��yDA��	�=I�}I�����E3�A;��l���A�� tf�7��7�D$X�lA��@A�
�T$HA��rA��s
M�EI���.I��A�� tA��@tM�E��E�E��A��@tMcE��E�E�A��@t
M;�}I��A��A��r
A��rE��E;�}A��A��E;�EO�D�t$`I��H��$�H���#ʉL$HA��A��A;�M;�t 3�I��Ic�H��L���B0��9~AƈH����H��$�A�����+�H��A��	�D$D�A;�t	�;0�H��D$D�0�u@��guAA��9E;�EO�A���~)A��]Hc����H��$�H��tH�؋��A��I�EH�
XpI��@��Hc�H��$��h���H�L$xD��H�L$0�L$pL�ƉL$(H��$�H��D�|$ ��A��3���tD;�uH�
p� ���H�T$xH���3�@��gu;�uH�
�o���H�T$xH��Ѐ;-uA��H��H�����E3҉D$DD9T$X�KA��@t1A��s�D$L-�A��t�D$L+��|$H�A��t�D$L ��|$H�t$TH�l$h+t$D+�A��uL�L$@L�ŋֱ ����L�L$@H�L$LL�ŋ�����A��tA��uL�L$@L�ŋֱ0����|$D3�9D$Ptu;�~qH��D�MH��$�H��$�A���H������E3�A;�u2��$�A;�t&L�D$hL�L$@H��$����E3�A;�u�H�l$h�#H�l$hA�ƉD$@�L�L$@L�ŋ�H���X���E3ҋD$@A;�|A��tL�L$@L�ŋֱ ���E3�H��$�I;�tH���=���E3�L��$�H��$��t$@�T$\L�
�h��A�@�/A:�����A;�t	�������D8�$�tH��$�������H��$�H3��x���H��$ H���A_A^A]A\_^]�@��It=@��ht.@��lt
@��wu�A��끀?lu
H��A���o���A���f���A�� �]����A��<6u�4uH��A���>���<3u�2uH��A���&���<d����<i����<o����<u����<x�����<X�����D�T$\H�T$x@��D�T$P�k�3�;�t!H�T$hL�D$@@������@�/H��@:��H�T$hL�D$@@����E3����@��*uE�}I��E;������E���~���C��@��D�|H��l���E���d���@��*uA�EI��A;‰D$T�I���A������D$T��@�ōDHЉD$T�)���@�� tA@��#t1@��+t"@��-t@��0����A�����A�����A�����A�����A������D�T$pD�T$XD�T$TD�T$HE��E��D�T$P������E3�E3�3�3�H�t$ �����@8�$��Z�����@UATAUAVAWH��`H�l$@H�]PH�uXH�}`H�fH3�H�ED�@��3�M��L�MD�ED��UH��D�n�D;�uOL��AE�ͺ3ɉ|$(H�|$ ��7;�tE��D�-����5D�߇��xDD�D�чL�]D�MpD;�~5A��I��A+�@88t
I�;�u��A��+�A+�A;�}
D�HD�Mp�D�ȉEpD;��\D;��SE;���D�����D;�uH�D�`���M��A��҉|$(H�|$ ��A��6Lc�D;��<H�����A���A�~[3�H�B�I��H��rLK�L?I;�w.H�AH;�wH��H�����/H+�H�|$@H���������x���H��H��tD�0H��H����D�MpL�E�A��D�|$(H�|$ ��53�;��K�U�L$(H�L$ �ME��L��W6E3�Hc�A;��!D�UA��
s;���A;��;����M�D$(H�ExE��L��A��H�D$ �6��A;�~`3�H�B�H��H��rQH�L6I;�w*H�AH;�wH��H�����.H+�H�\$@I;�t�����y���E3�H��I;�tD�0H��D�U�I��I;�tn�ME��L��A�҉t$(H�\$ �z53�;�t?���3�H�L$8D��L��H�L$0;�u�L$(H�L$ �
�D$(H�ExH�D$ A���4��H�K�D91u�g���H�O�D91u�Y�������H��L��D;�uH�D�pD�u�����uH��xA���$D���u3��L�}xL�E;��<3�L�Mp�Ћω\$(H�\$ �$H��H;�t�D�Mp�UL��A�Ή\$(H�\$ ��4Lc�D�MD;�u���D;�A���~bI��I���wYH��H��w4H�YH;�w
H�����H���H���N-H+�H�\$@H��t%��������H��H��tD�0H��D�MH��u3��Mc�3�H�����D�]D�Mp�U�MD�\$(L��H�\$ ��3�E��u3��.���L�ML�ÉD$(��A��L�|$ �#�}L��3�L;�D�H�K�D91u(��~���!���D�Mp�U�D$(A��L�|$ �b3��3�H;�tH���~��L;�t
M;�tI���~����H�MH3��!y��H�]PH�uXH�}`H�e A_A^A]A\]����H�\$H�t$WH��p��H��H�L$PI��A���}����$�D��$�H�L$PD�\$@�D$8��$��D$0H��$�L��H�D$(��$�D�Nj։D$ �O����|$htH�L$`����L�\$pI�[I�sI��_���D�L$ UATAUAVAWH��@H�l$0H�]@H�uHH�}PH�2`H3�H�ED�
h��3�M��D��L��wD;�u=L�MH��;D�Nj�.2;�t�=0��6�<0D�
!���xDD�D�
�D;��&D;��D;��C�uh;�uI�E�p�]xD�MXM��ҋΉ\$(��H�\$ �1Lc�D;��A���~hH�����L;�wYK�L$H��w5H�AH;�w
H�����H����w*H+�H�|$0H;��������}��H��H;�tD�(H���H��H;���M��3�H��M�����D�MXM�ƺ��D�d$(H�|$ �^0;�tL�M`D��H��A���0��H�O�D9)u�|�����D�epH��D;�uI�ED�`�uh;�uI�E�pA���Z ���u3��U;�t$L�MXM�ƋЋΉ\$(H�\$ � H��H;�t�L��H�E`D�MXM��A��A��H�D$ �Y0��H;�tH���{����H�MH3��v��H�]@H�uHH�}PH�eA_A^A]A\]���H�\$H�t$WH��`��H��H�L$@A��I���z����$�D��$�H�L$@D�\$8�D$0��$��D$(H��$�D��L�Nj�H�D$ �.����|$XtH�L$P����H�\$pH�t$xH��`_����H����SH�� H��H�I�z��H�K�z��H�K�z��H�K �z��H�K(�z��H�K0�z��H��}z��H�K@�tz��H�KH�kz��H�KP�bz��H�KX�Yz��H�K`�Pz��H�Kh�Gz��H�K8�>z��H�Kp�5z��H�Kx�,z��H���� z��H����z��H����z��H����y��H�����y��H�����y��H�����y��H�����y��H����y��H����y��H����y��H����y��H����y��H����y��H����xy��H����ly��H���`y��H���Ty��H���Hy��H���<y��H�� �0y��H��(�$y��H��0�y��H��8�y��H��@�y��H��H��x��H��P��x��H�� [���H��tBSH�� H��H�	H;
�nt��x��H�KH;
�nt�x��H�KH;
�nt�x��H�� [�H����SH�� H��H�IH;
|nt�ux��H�K H;
rnt�cx��H�K(H;
hnt�Qx��H�K0H;
^nt�?x��H�K8H;
Tnt�-x��H�K@H;
Jnt�x��H�KHH;
@nt�	x��H�� [������������������ff�H+�L���t�B�	:�uVH����tWH��u�I��J�	f��f���w�H�J�	H;�u�I��������~L�H��H��I3�I��t��H�H���3��fff���t'��t#H����t��tH����t��t����t��u�3��H�H���������ff�H+�I��r"��tf��:
u,H��I���u�M��I��uM��t�:
uH��I��u�H3�����ÐI��t7H�H;
u[H�AH;D
uLH�AH;D
u=H�AH;D
u.H�� I��u�I��M��I��t�H�H;
uH��I��u�I���H��H��H��H�H�H�H;��������������������ff�M��tuH+�L��I����t�B�	H��:�uWI��tN��tJH��u�J�	f��f���w�H�J�	H;�u�H��I��I��������~vH��L�I3�I��t��H3��H�H��Ä�t'��t#H����t��tH����t��t����t��u�H3�����H�\$H�t$ATH��03��N�j�����^�\$ ;p�}iLc�H�D~J�<�tPJ��A�t������t�Ɖt$$��|1H�~J��H��0��(H�
~J���u��L��}K�$��É\$ 돹�����H�\$@H�t$HH��0A\�H��H�XL�@H�HUVWATAUAVAWH��3�A��A��H���@��o�x�@��$�H�x�E��t�x�A���l$pD��H�L$T� ;�tE3�E3�3�3�H�|$ 襊����r��@u
�|$T�tE
��A���A#Ⱥ�;�tT+�t:;�t1�|����8���R����E3�E3�3�3�H�|$ ��g������D���@��t��u�A�@�D����$�A���t,��t#��t��t��@u�D;������A���A�������ϋƺ�L$H#�tF=t8=t*=t=t*=t&=t;�t�/���A�����
��A����A��D�l$Ps��j��"�$���A�E�DD�D�l$P@��@tA��A����D�l$P�L$H��s
A��D�l$P@�� tA���@��t
A��D�l$P�e
����u!�����8�������܊����H��$�D�D$HH��$�H�|$0L�L$`A��D�l$(��l$ �>'H�D$XH�������A��#�;�uC�@��t9D�D$HH��$�H�|$0A��L�L$`D�l$(A�׉l$ ��&H�D$XH���u;HcL�-�xH����H��Hk�XI�D��d���$���O����
����8��H��&;�uMHcL�-�xH����H��Hk�XI�D��d���$�ȋ�����H�L$X��$;�u�豉���
�A;�uA��@�	��uA��H�T$X��A	HcL�-/xH�����H��D
�I�D�Hk�XD�tHcH����H��Hk�XI�D��d8�A��$H�D$L��E����A��tx�E�ă��6����D$D���u�,����8�tP�詾������H�T$@A�@�|$@�A���;�u�|$@uHcT$D�����t��E3�3��պ�����t��E���<�@��u�D$T#�u�����#�=@tJ=t,=@t%=t+=@t$=t=@u(��$�����#�;�uD��$��@��$������|$DA��@��A��%�=@�$=�t|=���;��A;�v��v8���l��$�A���A+�� A;��P�D$D����E��3����H;�t��E3�3����H����|����H�T$DA��Ϋ������a���A;�t ��uk�|$DuD�@�D��$����D$D=��u��ټ���(���������=��u#�E3�A���"�����������D��$���E3�3���������;;�vqA;������������E��3�����H;������E3�3����H���u8����D$DA��Hc�E��H�TDD+���������m����D;��A�Hc@��$�H����@��H��Hk�XI�D��d8�@l8HcH�ƒ�H��Hk�XI�L��ƀd8����D8@8|$Lu!@��tHcH����H��Hk�XI�D��L A��%�=���A����H�L$X�� �D$PD�D$HH��$�H�|$0�D$(A��L�L$`�D$ A��-"H���u6�9 ��躅��LcI��A��H��Mk�XI�D�B�d����B���HcH�ʃ�H��Hk�XI�L�H�
��H��$�H�ĀA_A^A]A\_^]���H�t$WH��PE��L���d$@3�H��$�H������u(�����8H�d$ E3�E3�3�3����������3�H������u(賄����8H�d$ E3�E3�3�3��ǃ�������$���t8A����������u%�m�����8H�d$ E3�E3�3�3�聃�����`�L$0D�L$(D�T$ D��H��H�L$@�������D$D�|$@t,��t!HcH��H��L��r��Hk�XI���d���6��t����H�t$`H��P_���H��8A��D�L$`E��L���D$(H�L$ D��A��I�����H��8���H��H�XH�hH�pWH��PH��H��H�H�I��I���j��3�H;�u@8l$HtH�D$@����3��H�L$89iuL��H��H�����[H;�u<�;���E3�E3�3�3�H�l$ ��Q���@8l$HtH�D$@���������-H;�t�A��H��H��D�L
tUH;�u�f��D�L�Z�����@8/u���C�f��H��f�f;Qrf;QwfQ�$f;Qrf;QwfQ���Dt��D�H��I��E�LtNH;�u���^H��@8.uf���Q�fA��H��fD�fA��fD;Arf;AwfA�+f;Ar%f;AwfA�A���Dt
���fA��f;�uf;������H;�������u��������@8l$HtH�L$@����H�\$`H�l$hH�t$pH��P_���E3�����H�\$H�l$H�t$WH��P3�I��H��H��L;�u3��&H�L$0I���h��L�\$8A9kuL��H��H�������H;�u<�X���E3�E3�3�3�H�l$ ��n���@8l$HtH�D$@���������H;�t�A��H��H��F�Dt-H;�u���F�Du[f���G@8/uf���
�f��f�H���H��F�Dt#H;�u���H��@8.uf���
�f��f�H��f;�u&f;�tH;�u�@8l$H�����H�D$@������������@8l$HtH�L$@����H�\$`H�l$hH�t$pH��P_���E3����H�\$H�l$H�t$WH�� H�څ�xi;
�nsaHc�H�-�nH����H��Hk�XH�D�H�<�u=�=RJu'��t��t��u���������������yH�D�H�3������	����� ��H�\$0H�l$8H�t$@H�� _��H�\$H�l$WH�� ��xs;
nskHc�H�-#nH����H��Hk�XH�D��DtGH�<�t@�=�Iu)��t��t��u��������������3��H�D�H��3���
���	�"��� ��H�\$0H�l$8H�� _�H��8���u�~��� ��~���	�]��x1;
Xms)Hc�H�
hmH�ƒ�H��Hk�XH���DtH��,�~��� �~��H�d$ E3�E3�3�3��	�}��H��H��8�H��H�XH�pH�xL�` AUH�� Hc�L��I��L�-�l��Hk�XK�t���|3u3�O	��{����|3uH�L3���ۇ�����#��D3�
�z����tK�L�H�L����H�\$0H�t$8H�|$@L�d$HH�� A]���Hc�H�
flH�ƒ�H��Hk�XH��H�LH�%8H�\$H�|$L�d$AUAVAWH��@I��E��E3�A�L$�?z����uA������{���3��|$$H��k��@��Lc�J��H���H�\$0J��HH;����C���{u;�
�z����{u H�K��軆����uD�pD�t$(��C�
�y��E��u H�K�d�CtH�K�L�HI��E��u?�CL�#L�CkK+�H���.�袋.H��L��I��I��H��?L���D�D�l$ �H��XH�\$0I��H��j� ���E;����lj|$$H��j����X�J�腻��H�D$0H��ttHc�L��jI�Ѓ�j I��H��H;�s�@L� �@	
�`H��XH�D$0����|$ Hc�H��H����Hk�XI���D���H�����AD�D��|$ ��Ux��A��H�\$`H�|$hL�d$pH��@A_A^A]�H�\$�L$VWATH��0Hc����u�^{���	��������;=�i��H��H��H��L�%�i��Hk�XI���L��u%�{���	H�d$ E3�E3�3�3��&z�����z������I��Dt+�����H��~��u
�|���3ۅ�t��z����z���	�����������#�z���	H�d$ E3�E3�3�3��y����H�\$`H��0A\_^��H�\$H�t$WH��@��H��H�L$ A��A����`��H�D$(D��A�|u��tH�D$ H��@B�Y#��3���t��|$8tH�L$0����H�\$PH�t$XH��@_�̋�A�E3�3��r�����H�\$H�t$WH�� H��H��H��u
H���b���jH��u�ra���\H���wCH�
�d�H��HD�L��3�L��9H��H��uo9�dtPH���}�����t+H���v�H���k����Ry���3�H�\$0H�t$8H�� _��5y��H�������x������y��H�������x���H��������H��hH�UCH3�H�D$P�=Wf�L$@tfH�
�WH���u�YH�
�WH�����H�d$ L�L$DH�T$@A��p�����=�V���=��xu}�%�V�;H�d$8H�d$0��H�D$HL�D$@A�3��D$(H�D$ �pH�
1WH���t0H�d$ L�L$DH�T$HD������tf�D$@��%V���H�L$PH3��aZ��H��h�H�\$H�l$H�t$WH��P3�I��H��H��H;�tL;�t
@8*uH;�tf�)3�H�\$`H�l$hH�t$pH��P_�H�L$0I���.^��L�\$0A9ku%H;�t�f�@8l$HtH�D$@�������H�T$0���;���H�L$0D��A��~0A;�|+�I��H;���L�Ǻ	�D$(H�\$ �H�L$0;�uHc�H;�r(@8ot"��@8l$H�4���H�L$@�����#�����v���*@8l$HtH�D$@�����������A�H;���A�QL�ljD$(H�D$0H�\$ �H�u;���������E3����H��H�XH�hH�pH�x ATAUAVH��PL��H��H�H�E��M����\��M��tM�uM��u*�+v��H�d$ E3�E3�3�3���@u���|$H��E��tA��|�A��$�A�.L�D$03�I�^A��~L�D$0@�ͺ��L�D$0�I��@@���H����t@�+H��뾋�$�@��-u���@��+u@�+H��E���SA���IA��$�?E��u(@��0tA�
�8�;xt
�;XtA��&A��A��u@��0u�;xt�;Xu@�kH��M��@3҃�A��D��@��E�JA��t	@�̓�0�A��t,�E�@��<w�� ���A;�s��A;�r"u;�v��M��uH��@��uM��IE�3��YA���@�+H��둽���@��u@��u:�ƃ�t���w��u';�v#�qt���"@��t���
@��$������M��tI�]@��t�߀|$HtH�L$@�������M��tM�u@8|$HtH�D$@����3�L�\$PI�[ I�k(I�s0I�{8I��A^A]A\���H��83�E��L�‰D$ H��9�^u	H�
�J�3��Q���H��8�H��8H�>H3�H�D$(L�D$ A���D$&����u���
H�L$ �H�L$(H3���U��H��8��@USVWATAUAVAWH��H�l$@H��=H3�H�E0L���E�!3�I��H���}L�MD��D��H�];��H�U��;����}��H�UA���;����}uz�EA���t`A������Hc�H�����H;���H�L	H��wlH�AH;�w
H�����H����'H+�H�\$@H��t<����NH���J����x�E��L�úA�ω|$(H�|$ �8�����o���3��7�~Z��H��H��t���H���3�H��t�Lc�3�H��M��G���L�EE�̺A�ω|$(H�\$ ��
E3�A;���M;�t;���L�|$8L�|$0�D$(D��L��3�A��L�t$ ��
A;���I���D9}u,L�|$8L�|$0D��L��3�A��D�|$(L�|$ ��
��A;�tWHc׹�°��H��I;�tBL�|$8L�|$0D��L��3�A�͉|$(H�D$ �b
A;�u
H����X��I���A���tH�M�H�K�9��u��X��H��H�M0H3��dS��H�eHA_A^A]A\_^[]����3�D�B
����L��M��t<E�
I��A�A���wA�� �
H�A���w�� I��t
E��tD;�t�D+�A���3���H��H�XH�hH�pWH��PI��H��H��M����H�H�I���V��H��u=�Pp��H�d$ E3�E3�3�3���eo���|$HtH�D$@���������H��t�H�����w�H�D$0�xu#L��H��H�������|$HtZH�L$@�����L�MH�T$0���H�T$0��H���H��H��t��t;�t�+؀|$HtH�L$@�������3�H�\$`H�l$hH�t$pH��P_����H��8�=�ZuAH��u'�ao��H�d$ E3�E3�3�3���vn�������H��t�I�����w��X����E3����H��8��H��H�XH�hH�pH�x ATAUAWH�� H��3�3�D�G������L��H���tPD�G3ҋ����H���t=H��H+�H;�����A��WH��M���	H��H;�u1�n����n���H�\$@H�l$HH�t$PH�|$XH�� A_A]A\ú�����D��D��I;�H��EMNj��3������tH�H+�H;�~���Un���8u�+n���
H��A�ԋ����
L��H��3�	�U}]E3�H�Ջ��
���H����T�������H���
��H�H��H��H���u%��m���
��m��H��f�H�������E3�I�Ջ�護��H��������3����H�\$Lc�H�%\M��A��I��Mk�XJ��B�D8F�\�A��D��A���@tX���tH��t(��t ��uHB�L�J��B�d8�B�L8�0B�L�J��B�d8�B�L8�B�d�B�L�J��B�d8�E��u���A���%�@H�\$���H��8H��u'�l��H�d$ E3�E3�3�3���k����
��Y�3�H��8��H��HH�d$0�d$(A�H�
PE3ɺ@D�D$ ��H�6KH��H��H��(H�
%KH���tH���t�H�
KH���tH���t��H��(��H�l$WH��pHc�H�L$P�R����sbH�T$P��~L�D$P������H�T$P�H��@�x����tH��H�8���|$htH�D$`��������H�D$P��~6��H�T$P��@�������t@��$�@��$�Ƅ$��� �2k����*@��$�Ƅ$�H�L$P�D$@L��$��AA��D$8H��$��D$0H�D$(�T$ �QH�L$P�;�����2�������$�t
��$�����|$htH�L$`����H��$�H��p_�%��%��%*����������������ff�H��L�$L�\$M3�L�T$L+�MB�eL�%M;�sfA���M���A�M;�u�L�$L�\$H�����@UH�� H�ꃽ�t
��f��H�� ]�@UH��0H��H�MP谇��H��0]�@UH��0H��H�M`蘇��H��0]�@UH��0H��H�M@耇��H��0]�@UH�� H��H�H�ы��n��H�� ]�@UH�� H��
�3f��H�� ]��������@UH�� H���f��H�� ]�@UH�� H��H�
�5��H�� ]�@UH�� H���GL��H�� ]��@UH�� H��H�3Ɂ8�������H�� ]�@UH��0H��}pt3��e��H��0]�@UH�� H��H�E3ہ8�A��A��H�� ]�@UH�� H��
�je��H�� ]�@UH�� H���Qe��H�� ]�@UH�� H���8e��H�� ]�@UH�� H��HcM H��H�YH��肆��H�� ]�����������@UH�� H����d��H�� ]�@UH��0H��MP�\�H��0]�@UH��0H��M`�E�H��0]�@UH��@H��}@t>�}Dt*H���Hc
H��H��L��V��Hk�XI���d��H����
���H��@]�@UH�� H��
�Ud��H�� ]�@UH�� H��
�<d��H�� ]��������@UH�� H���d��H�� ]�������(�D�V�r�������������$�:�L�h�|��������������$�>�R�b�r����������������,�T�`�j�v�������������2�L�b�|������������&�6�H�Z�h�x�����������86@$L@�Q@�m@x�@�R@1�RLH�H�CorExitProcessmscoree.dll�@0@runtime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...<program name unknown>Runtime Error!

Program: ������������������(null)(null)EEE50P( 8PX700WP  `h````xpxxxx	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ccsUTF-8UTF-16LEUNICODEGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLL�����������EEE���00�P��('8PW�700PP� (����`h`hhhxppwpp         (((((                  H����������������������          h((((                  H����������������������                                 H�����������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~�����������������������������������������������������������������������������������������������������������������������������HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$user32.dllMessageBoxTimeoutAFatal Error in LauncherrbFailed to open executableUnable to find an appended archive.Unable to read from file#!Job information querying failedJob information setting failedstdin duplication failedstdout duplication failedstderr duplication failedUnable to create process using '%s'Failed to get exit code of processFailed to find shebangExpected to find terminator in shebang lineExpected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to be able to allocate command line memory"%s" "%s" %sRSDS��م�ƋI�{஦`��c:\Users\Vinay\Projects\SimpleLauncher\dist\w64.pdb42p
d4r����p9+4��b

20t
d4r�9����� ��
4R���
�p`P
�t
d	4R�9^#w#��t
dT4
R���4	Rp9�%�%��d
4	Rp9*'9'��

4
Rp4	Rp97(A(��	d4p9j(v(*W)�)
��)

4
2p9.,9,&�N,u,F�42p9�-.&�.L.F��t
4R�td42�td42�93G3_�		�0d
T	4Rp
t
d	42���9�6_7{�	B9�8
9��
9  d T 4 r����p	B9�:�:�:RP
d4r���
�p9t>?��	b9�?�?���?d	T42pdT4�p
td
T	4R�$d�4��p�p

4
2p9�F�F��4r�
�p`P�8
�t
d	4R�9K�K��d42p209�O�O�dT�pB20
T4R���p`d	4Rp9�VX!��d	4Rp	�����
p`P
0
d4
R����p9�b�b��	 
 � t d 4 ���9�de�g
d4
R����p9iIi��
�td
R���9�jk:��j"kj�d
4R��p9�l�l��B

4
2ptd
T	42���d4
Rp
t
dT4
r�

4
2p
t	dT42�
T4r���p`R0�
d4
R����p9�I���/4qf���
�p`P� 
d4
R����p9��݉��r04�p
`PbdT42pdT42p)4dZ���
�p`P��-
Etd4C�
����P�Xd4�p1
5#td43r��
��P�8d4�p2
0d	4R�9�{�!�!
!4!�����p`PrP

d
�p9c�����dT
4�pT42p2P
�	td42�9�����
�t
4r���9��۸�\�
�=�4R
�p
`9Ǻ�����PtdT4����b�('EC
��	��p`0P�ptd
T	42���4�

T
�pd4
rp*�p0�0

40
.p
T4r���p`-d2T140,��p�P(�Z��������(�D�V�r�������������$�:�L�h�|��������������$�>�R�b�r����������������,�T�`�j�v�������������2�L�b�|������������&�6�H�Z�h�x�����������ExitProcess~SetInformationJobObjecthFreeLibrary�GetCurrentProcessWaitForSingleObjectmGenerateConsoleCtrlEvent�GetCommandLineAAssignProcessToJobObject�GetExitCodeProcess�CreateProcessA�QueryInformationJobObject�CreateJobObjectAkGetStdHandleGetLastErrorLGetProcAddress>LoadLibraryA;SetConsoleCtrlHandlerGetModuleFileNameA�DuplicateHandleRCloseHandleKERNEL32.dllGetModuleHandleW�Sleep�HeapFree�HeapAllociGetStartupInfoA�TerminateProcess�UnhandledExceptionFilter�SetUnhandledExceptionFilterIsDebuggerPresent&RtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContext�EncodePointer�DecodePointerZFlsGetValue[FlsSetValueYFlsFree�SetLastError�GetCurrentThreadIdXFlsAlloc4WriteFile�DeleteCriticalSection;LeaveCriticalSection�EnterCriticalSection%RtlUnwindEx�InitializeCriticalSectionAndSpinCountxGetCPInfonGetACP>GetOEMCPIsValidCodePage�HeapSetInformation�HeapCreateiMultiByteToWideChar�ReadFile|SetHandleCount�GetFileTypetSetFilePointerfFreeEnvironmentStringsA�GetEnvironmentStringsgFreeEnvironmentStringsW WideCharToMultiByte�GetEnvironmentStringsW�QueryPerformanceCounter�GetTickCount�GetCurrentProcessId�GetSystemTimeAsFileTime�HeapSize
GetLocaleInfoA�GetConsoleCP�GetConsoleMode-LCMapStringA/LCMapStringWmGetStringTypeApGetStringTypeW�CreateFileA�SetStdHandle]FlushFileBuffers�HeapReAlloc)WriteConsoleA�GetConsoleOutputCP3WriteConsoleWaSetEndOfFileQGetProcessHeap�@2��-�+�] �f��������@��@	X�@
��@��@X�@0�@�@��@��@h�@0�@�@��@��@ H�@!P�@"��@x��@y��@z��@�x�@�h�@
		


!
5A
CPR
S
WYl
m pr	�
�
�	��
�)�
���
���D{@D{@D{@D{@D{@D{@D{@D{@D{@D{@�
�@��@                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ�@�`�y�!�������@~�����ڣ ��@����ڣ ��A��Ϣ���[��@~��QQ�^� _�j�2�����1~���@����C@@@@@`@�@��@�@�@@@�@�&@�&@���������
�@�@`�@\�@X�@T�@P�@L�@H�@@�@8�@0�@ �@�@�@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@x�@p�@`�@P�@H�@D�@8�@ �@�@	�@.P@X"@X"@X"@X"@X"@X"@X"@X"@X"@`@.�p��PSTPDT�@0@����������������������������;Zx����0Nm����:Yw����/MlK����L��LG��H������������������@m8�p�8���8����I��L��������'8�(J��L�8��v��x�����8������! �$ � H�� �"@��"�#X��#�#���#�%���%�%���%�&��&S'��T'�'���'V(��X(1* �4*F*��H*�+\��+�+���+�,d��,-��-4-8�4-i.��l.�.8��.1��1[1��\1�1���1k2��2l3��l3�3���3�4 ��4e5,��5�5���5�5���5668�86z68�|6�7@��7�7���7�7���78��8B8���89p�9�:���:�:���:�:���:�<��<i?���?�?��?�?8��?�A$��AsB8�tB�CL��C�C���C�D��DgFd�hF$G��$G�G���G+J��,J$L��$LLL��LL�M��O_O8�`O�O��O�P ��P0Q0�0Q�Q���Q�R8��R�R���RSS8�TS�S8��S�S���ST��T�V@��V1XX�PXtX���XZ��Z�a���ac��c:c��<c�c���d�g���gbh��dh�i��ij��j[j8�\jPkH�\kl��l0m��0mgm8�hm�m���m�m���m=n��@noo,�po?q��@q6r��8r�s���s�t��tu�u�u��uv� vx0�x�xH��xuyH�8z�zH��z�z���zB{��P{�{P�D�8������]���`���X���������)���,��8�������5���8�������������������8��U���X�֎�؎ڙ$�ܙ�H����p������ �����������������u����������������α�б�����,���^�,�h����Ķ@�ĶH���H��X��4���4�G���H�û��ػ������Ľ��Ľ5�,�@��������G�$�H���4�$�5�,�8�������,�X�,���t���;���<�w�|�x�������$���P���������P���������������
���
�&�P�&�?�P�F�_�P�_�{�P�{���P�����P�����������P����P��!�P�!�:�P�:�`�P�j���P�������������������P��6�P�=�V�P�(�p�������������0�eH�`�x�������	�R���T(�V���^h�(d�%�Љ��x�h��h�H�Z�( @...GGGWWWiiiuuu����������������������������������̀�ww����ww||�����ww��������wwww��������ww��������f�wwwww|�����f�wwwwww����ff�wwwwww�����ff��wwwww���ffl����ww����ffffff��w����ffffffl�w������ffffff�w�����ffffff�|����������ff��������ffff�������ff��R\I���lffl���)����ff�ح���������2L���������18�������Ϥ"������A<��������ΣT��π�����U���������������������������؀����������������������?������������������?�?�?�?�?�?�������������( 444MMMSSSzzz������������������������������p�p�����{p{��f���fko�f�����_fffk�_�fff��[���f}��UUU�fL4�UUU_kJqO���_�~�'�[U_����U�����������wwwww{~����������������( @%%%+++000===AAAIIIMMMQQQVVVYYY]]]~dFgggjjjmmmrrruuu}}}�u?�z=�~;�gE�kC�oA�r@��:��I��b��pƏKУk(��,�1�?�5�<�\�C�K�Q�s�U�[�c�b�����������������������������������������ð����������������������������������������������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$"  _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_L'%$"_I_MMMMMMJJ__('%%_I_CEMIJJMEM_(''*_I_?BMDJEMDMF_)(-LI_MMMCMMMMM_________<____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/
N______MMMMJIDAI_9/	HJJMMJMMMJ??BAI_A7503	IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O;
@__C_C?J?AJI_?A_DJJI@O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ�����?������������������?������������������?�( 444MMMRRRYYY~eGuuu}}}�x>�iE�rC��E��~7�?�H�V�b�x����������������������������������������������������������������������������������/!P7pL�c�yϏ���1��Q��q�������������/Pp"�,�6�@�J�[1�qQ��q�������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������!%///* !*/"(%%'%/)
/!#''////+/+"*(/
/

!%(/
(

  (*/(///)
*/
	)*

	/"/////	/+///#
		+ !%//
+"*+'#+//+'!%*++$++!+!    !!!<(0` !!$&			&"

 ���W���������������������������������ܱ��Nj+<<</	&&&#&[[[?6666��׏��������������������������������������������Ҟ���BBB3"


mmm3����,����!!!4777&�����������������������������������������������������ʟ���}���}___E���OpppD���P,)+3���Z2226DDD(���,�����###5��������������������������������������������������������������������������������չ�������������5�������,�������������������������������������������������������������������������������������������������������������,������Ì222"��Є�����������������������������������������������������������������������������������������������������&&&2����   4888&�������������������������������������������������������������������������e��?��4��/��+���.���R�������ӎ����������$$$5��Ď���������������������������������������������������������������������D��@��;��7��3��/��*���&���"�����������������������������������������������������������������������������������������W��G��C��?��;��6��2��n������f��0�������������nj333"��ӄ��������������������������������������������������������������������O��K��G��B��>��:��5��p������i��$�����������!!!4888&���������������������������������������������������������������������S�N��J��F��B��=��9��5��0��,��(���������������%%%5��ǎ���������������������������������������������������������������������V�R�N��I��E���������������������������������������������������������������������������������������������������������ѹ���|J��q?��o@�����Z�U�Q�M��I��D��@��<��7��3��/��+���&���"���-����������������Ɍ444"��ք�������������������������������������������������̴��w<��u=��s>��q?�����]�Y�U�P��L��H��C��?��;��7��2��.��*���%���!����������������"""4888&���������������������������������������������������d��y<��w=��u=��s>�����a�\�X�T�P��K��G��C��>��:��6��1��-��)���%��� ���O������������Ñ%%%5��ʎ���������������������������������������������������A��{;��y<��w=��t>�����s�`�\�W�S�O��J��F��B��>��9��5��1��,��(���$���(����������������������������������������������������������������������9��|:��z;��x<��v=�������s�_�[�W�R�N��J��E��A��=��8��4��0��,��'���#�������������̌555"��ل���������������������������������������������������9��~9��|:��z;��x<���o�����������������������������������������m��8��3��/��+���'�����������"""4:::&������������������������������������������������������8���9��~:��|;��z;��w<��u=��s>��q?��o@��mA��kB��iC��gC�dD��uZ������;��7��3��.��*�������������Ǒ%%%5��̎���������������������������������������������������È>���8���9��}:��{;��y<��w<��u=��s>��q?��o@��mA��jB��hC��fD�~dE��uZ�����?��:��6��2��5�����������������������������������������������������������������������������Оa���7���8��9��}:��{;��y<��w=��u>��r>��p?��n@��lA��jB��hC��fD�}dE�����B��>��:��5��^������������ό555"��܄����������������������������������������������������������ѳ�„7���7���8��9��}:��{;��x<��v=��t>��r?��p@��n@��lA��jB��gC��eD�����F��A��=��9������������"""4;;;&�����������������������������������������������������������������ŌC���8���9��~9��|:��z;��x<��v=��t>��r?��p@��mA��kA��iB��gC�����I��E��L��������������ɑQQQJnnn����������~~~�������������������������������������������������������������������������������������������Į��q?��o@��mA��kB��iC�������������������������HHH�"""���������������vvv������������������������������������������������������������������9��~:��{;��y<��w<��u=��s>��q?��o@��mA��kB�������������:::�'''�___���������sss�ttt��������������������������������������������������������������8�Ϧu�����ǣv��y<��w=��u=��s>��p?��n@��lA��������888T����---6fffnddd�%%%�"""�����OOO�SSS������������������������������������������������������������ċD�ҧu�����ʤv��{;��y<��v=��t>��r?��p?��xM�����<<<�MMM�������̑&&&5����;;;�<<<�xxx�QQQ�;;;�KKK����������������������������������������������������������8���8��~9��|:��z;��x<��v=��t>��r?�̷������999�����������������������VVV�###�)))�444��������������������������������������������������������������������ѳ�͝b���@��~9��|:��z;��}C���g��˶����Ӎ���������󑑑�����ZZZ�lll�;;;�!!!�"""�)))�___���������������������������������������������������������������������������������������&&&2����:::�ppp�{{{�___�WWW�WWW�:::�!!!�"""�***�www�������������������������������������������������������������������"""4888&���,������̑999����Ԗ���JJJ�|||�lll�:::�"""�BBB�XXX�|||��������������������������������������������������������������������$$$6�������,��������������������������������uuu�KKK�CCC�@@@�...�www����������������������������������������������������������������������������������*������Ҍ666"������������������������KKK�aaa�LLL�WWW��������������������������������������������������������������@��������$����"""4;;;&���������������������nnn�fff�!!!�$$$�999������������������������������������������������������������444]ttt|������ȇ������ɑ&&&5��Ў������������������������vvv�mmm�VVV�{{{�OOO����������������������������������������������������������������ڥ�����������������������������������������������aaa�CCC�����ppp�������������������������������������������������������������������������ό555"��ބ����������������������������������|||�MMM�����fff���������������������������������������������������������������"""4;;;&�������������������������������������������\\\�����������������������������������������������������������������Ǒ%%%5��Ύ�����������������������������������������������������������������������������������������������ݧ�����������������������������������������������������������������������������������������������������������������ܦ������͌555"��ۄ�����������������������������������������������������������������������������������ۥ����"""4:::&������������������������������������������������������������������������������������ڤ������Ñ%%%5��ˎ�����������������������������������������������������������������������ܤ��������������������������������������������������������������������������������������������������ׇ
������ww���?ww�?�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww��ww��ww��ww��ww��ww��ww�?�ww��ww���ww���ww( @ ����������������������������������!!!0\\\JeeeQ666D555A0$
�������v�H��<��6��0��2��\�������7���q��������������������ڴ���vvvj&&&D1"����g�L��F��@��;��5������?��������������������������������������������������к����V�Q�K��E��?��9������(�����������a���V�������������������������������������[�U�P��J��D��>��8��2��-���������uuun{{{j���������������������������������������`�Z�T�O������������������������������������������������������������������������V��o@��lA�����b�_�Y�S�M��G��B��<��6��0��+���%���<���������������a���V�����������������������m��t>��q?��n@�����b�b�^�X�R�L��F��A��;��5��/��)���$���Y����������wwwn}}}j����������������������~C��v=��s>��p?�����b�b�a�]�W�Q�K��E��@��:��4��.��(���+���������������������������������������{;��x<��v=��s>�����b�b�a�[�V�P��J��D��?��9��3��-��'��������������a���V����������������������~:��{;��x<��u=���p���������������������������������r��=��7��2��,����������yyynj�����������������������9��}:��z;��w<��u>��r?��o@��lA��iB��fD�}dE�|cE�|cE���i���B��<��6��1��������������������������������������?��9��}:��z;��w=��t>��q?��n@��kA��iC��fD�}cE�|cE�}dF�����G��A��;��=�������������a���V���������������������ңi���8��9��|:��y<��v=��s>��q?��n@��kB��hC��eD�|cE�|cE�����L��F��@��m����������zzzn���j�������������������������ʓP���8��~9��{;��y<��v=��s>��p?��mA��jB��gC�eD�|cE�����P��J��\��������������������������������������������������������������������������������¯��mA��jB��gC�~dE��������������������������a���V��������������������������������������}:��z;��x<��u=��r?��o@��lA��iB��fD���������|||n���m���������������������������������������9��������w=��t>��q?��n@��lA��iC�������������JJJ��������������������������������������������őP��������y<��v=��t>��q?��n@��~Y������������VVV�???�www�����iii�����������������������������������Ρk���A��|;��y<��v=��yF���p��������>>>3@@@y����~~~obbb�000�kkk�@@@������������������������������������������������������������������---U��������������<<<�&&&�[[[�������������������������������������������������������6���uuu�sss�WWW�III�$$$�&&&�qqq�����������������������������������lllg|||s���4����bbb�hhhƑ�������UUU�000�QQQ�}}}��������������������������������---{bbb�����(����������������������iii�LLL�BBB������������������������������������������������������a���V����������������ggg�+++�NNN�������������������������������������������|||n���j����������������]]]�ttt�kkk�������������������������������������������������������������������rrr�www���������������������������Ӧ�������a���V���������������������������������������������������Ӧ����zzzn���j�������������������������������������������Ӧ�����������������������������������������������������������ˉ��?������������������?�?�?���������������?�(  ������C�������������������﫫�o���������I�����������������������������������������ਨ������������S��=��?���������������������������������_�Q�F����4���������������������������������a�Z��������������������������������������м���oE�����c�a�X�M��B��7��0��������������������~I��q?�����c�`�V�K��@��5��8��������������������z;��u=���q�����������������v�>��3����������������������E��y<��t>��n@��iB�~dE�}dF�������G��H������YYY�uuu����������ġ���=��x<��s>��mA��hC�}dE�}eG�����S���������444�|||����������������������������gC�}cE�������������������������MMM������������������~>�����q?��kA��iG������������������RRR��������������¢���G��u=��xK�ʺ��������������������������������������������������������������������������������������������������������������������������������������������~�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A  �(  �h00 �%   � h<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD�����ȢТ��X�`�t�8�H�X�h�x���������Ƞؠ����(�8�H�X�h�x�����P�X�`�h�p�x���������������x�����ث��8�P�X�`�h�p����������Сء������� �(�0�8�@�H�P�X�`�h�p�x�������������������ȢТآ������� �(�0�H�`�h�p�x���������������p�x�python3.3/site-packages/pip/_vendor/distlib/wheel.py000064400000112563151733566750016417 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2014 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals

import base64
import codecs
import datetime
import distutils.util
from email import message_from_file
import hashlib
import imp
import json
import logging
import os
import posixpath
import re
import shutil
import sys
import tempfile
import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import Metadata, METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)
from .version import NormalizedVersion, UnsupportedVersionError

logger = logging.getLogger(__name__)

cache = None    # created when needed

if hasattr(sys, 'pypy_version_info'):
    IMP_PREFIX = 'pp'
elif sys.platform.startswith('java'):
    IMP_PREFIX = 'jy'
elif sys.platform == 'cli':
    IMP_PREFIX = 'ip'
else:
    IMP_PREFIX = 'cp'

VER_SUFFIX = sysconfig.get_config_var('py_version_nodot')
if not VER_SUFFIX:   # pragma: no cover
    VER_SUFFIX = '%s%s' % sys.version_info[:2]
PYVER = 'py' + VER_SUFFIX
IMPVER = IMP_PREFIX + VER_SUFFIX

ARCH = distutils.util.get_platform().replace('-', '_').replace('.', '_')

ABI = sysconfig.get_config_var('SOABI')
if ABI and ABI.startswith('cpython-'):
    ABI = ABI.replace('cpython-', 'cp')
else:
    def _derive_abi():
        parts = ['cp', VER_SUFFIX]
        if sysconfig.get_config_var('Py_DEBUG'):
            parts.append('d')
        if sysconfig.get_config_var('WITH_PYMALLOC'):
            parts.append('m')
        if sysconfig.get_config_var('Py_UNICODE_SIZE') == 4:
            parts.append('u')
        return ''.join(parts)
    ABI = _derive_abi()
    del _derive_abi

FILENAME_RE = re.compile(r'''
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?
-(?P<py>\w+\d+(\.\w+\d+)*)
-(?P<bi>\w+)
-(?P<ar>\w+)
\.whl$
''', re.IGNORECASE | re.VERBOSE)

NAME_VERSION_RE = re.compile(r'''
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?$
''', re.IGNORECASE | re.VERBOSE)

SHEBANG_RE = re.compile(br'\s*#![^\r\n]*')

if os.sep == '/':
    to_posix = lambda o: o
else:
    to_posix = lambda o: o.replace(os.sep, '/')


class Mounter(object):
    def __init__(self):
        self.impure_wheels = {}
        self.libs = {}

    def add(self, pathname, extensions):
        self.impure_wheels[pathname] = extensions
        self.libs.update(extensions)

    def remove(self, pathname):
        extensions = self.impure_wheels.pop(pathname)
        for k, v in extensions:
            if k in self.libs:
                del self.libs[k]

    def find_module(self, fullname, path=None):
        if fullname in self.libs:
            result = self
        else:
            result = None
        return result

    def load_module(self, fullname):
        if fullname in sys.modules:
            result = sys.modules[fullname]
        else:
            if fullname not in self.libs:
                raise ImportError('unable to find extension for %s' % fullname)
            result = imp.load_dynamic(fullname, self.libs[fullname])
            result.__loader__ = self
            parts = fullname.rsplit('.', 1)
            if len(parts) > 1:
                result.__package__ = parts[0]
        return result

_hook = Mounter()


class Wheel(object):
    """
    Class to build and install from Wheel files (PEP 427).
    """

    wheel_version = (1, 1)
    hash_kind = 'sha256'

    def __init__(self, filename=None, sign=False, verify=False):
        """
        Initialise an instance using a (valid) filename.
        """
        self.sign = sign
        self.should_verify = verify
        self.buildver = ''
        self.pyver = [PYVER]
        self.abi = ['none']
        self.arch = ['any']
        self.dirname = os.getcwd()
        if filename is None:
            self.name = 'dummy'
            self.version = '0.1'
            self._filename = self.filename
        else:
            m = NAME_VERSION_RE.match(filename)
            if m:
                info = m.groupdict('')
                self.name = info['nm']
                # Reinstate the local version separator
                self.version = info['vn'].replace('_', '-')
                self.buildver = info['bn']
                self._filename = self.filename
            else:
                dirname, filename = os.path.split(filename)
                m = FILENAME_RE.match(filename)
                if not m:
                    raise DistlibException('Invalid name or '
                                           'filename: %r' % filename)
                if dirname:
                    self.dirname = os.path.abspath(dirname)
                self._filename = filename
                info = m.groupdict('')
                self.name = info['nm']
                self.version = info['vn']
                self.buildver = info['bn']
                self.pyver = info['py'].split('.')
                self.abi = info['bi'].split('.')
                self.arch = info['ar'].split('.')

    @property
    def filename(self):
        """
        Build and return a filename from the various components.
        """
        if self.buildver:
            buildver = '-' + self.buildver
        else:
            buildver = ''
        pyver = '.'.join(self.pyver)
        abi = '.'.join(self.abi)
        arch = '.'.join(self.arch)
        # replace - with _ as a local version separator
        version = self.version.replace('-', '_')
        return '%s-%s%s-%s-%s-%s.whl' % (self.name, version, buildver,
                                         pyver, abi, arch)

    @property
    def exists(self):
        path = os.path.join(self.dirname, self.filename)
        return os.path.isfile(path)

    @property
    def tags(self):
        for pyver in self.pyver:
            for abi in self.abi:
                for arch in self.arch:
                    yield pyver, abi, arch

    @cached_property
    def metadata(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        wrapper = codecs.getreader('utf-8')
        with ZipFile(pathname, 'r') as zf:
            wheel_metadata = self.get_wheel_metadata(zf)
            wv = wheel_metadata['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            if file_version < (1, 1):
                fn = 'METADATA'
            else:
                fn = METADATA_FILENAME
            try:
                metadata_filename = posixpath.join(info_dir, fn)
                with zf.open(metadata_filename) as bf:
                    wf = wrapper(bf)
                    result = Metadata(fileobj=wf)
            except KeyError:
                raise ValueError('Invalid wheel, because %s is '
                                 'missing' % fn)
        return result

    def get_wheel_metadata(self, zf):
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        metadata_filename = posixpath.join(info_dir, 'WHEEL')
        with zf.open(metadata_filename) as bf:
            wf = codecs.getreader('utf-8')(bf)
            message = message_from_file(wf)
        return dict(message)

    @cached_property
    def info(self):
        pathname = os.path.join(self.dirname, self.filename)
        with ZipFile(pathname, 'r') as zf:
            result = self.get_wheel_metadata(zf)
        return result

    def process_shebang(self, data):
        m = SHEBANG_RE.match(data)
        if m:
            data = b'#!python' + data[m.end():]
        else:
            cr = data.find(b'\r')
            lf = data.find(b'\n')
            if cr < 0 or cr > lf:
                term = b'\n'
            else:
                if data[cr:cr + 2] == b'\r\n':
                    term = b'\r\n'
                else:
                    term = b'\r'
            data = b'#!python' + term + data
        return data

    def get_hash(self, data, hash_kind=None):
        if hash_kind is None:
            hash_kind = self.hash_kind
        try:
            hasher = getattr(hashlib, hash_kind)
        except AttributeError:
            raise DistlibException('Unsupported hash algorithm: %r' % hash_kind)
        result = hasher(data).digest()
        result = base64.urlsafe_b64encode(result).rstrip(b'=').decode('ascii')
        return hash_kind, result

    def write_record(self, records, record_path, base):
        with CSVWriter(record_path) as writer:
            for row in records:
                writer.writerow(row)
            p = to_posix(os.path.relpath(record_path, base))
            writer.writerow((p, '', ''))

    def write_records(self, info, libdir, archive_paths):
        records = []
        distinfo, info_dir = info
        hasher = getattr(hashlib, self.hash_kind)
        for ap, p in archive_paths:
            with open(p, 'rb') as f:
                data = f.read()
            digest = '%s=%s' % self.get_hash(data)
            size = os.path.getsize(p)
            records.append((ap, digest, size))

        p = os.path.join(distinfo, 'RECORD')
        self.write_record(records, p, libdir)
        ap = to_posix(os.path.join(info_dir, 'RECORD'))
        archive_paths.append((ap, p))

    def build_zip(self, pathname, archive_paths):
        with ZipFile(pathname, 'w', zipfile.ZIP_DEFLATED) as zf:
            for ap, p in archive_paths:
                logger.debug('Wrote %s to %s in wheel', p, ap)
                zf.write(p, ap)

    def build(self, paths, tags=None, wheel_version=None):
        """
        Build a wheel from files in specified paths, and use any specified tags
        when determining the name of the wheel.
        """
        if tags is None:
            tags = {}

        libkey = list(filter(lambda o: o in paths, ('purelib', 'platlib')))[0]
        if libkey == 'platlib':
            is_pure = 'false'
            default_pyver = [IMPVER]
            default_abi = [ABI]
            default_arch = [ARCH]
        else:
            is_pure = 'true'
            default_pyver = [PYVER]
            default_abi = ['none']
            default_arch = ['any']

        self.pyver = tags.get('pyver', default_pyver)
        self.abi = tags.get('abi', default_abi)
        self.arch = tags.get('arch', default_arch)

        libdir = paths[libkey]

        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        archive_paths = []

        # First, stuff which is not in site-packages
        for key in ('data', 'headers', 'scripts'):
            if key not in paths:
                continue
            path = paths[key]
            if os.path.isdir(path):
                for root, dirs, files in os.walk(path):
                    for fn in files:
                        p = fsdecode(os.path.join(root, fn))
                        rp = os.path.relpath(p, path)
                        ap = to_posix(os.path.join(data_dir, key, rp))
                        archive_paths.append((ap, p))
                        if key == 'scripts' and not p.endswith('.exe'):
                            with open(p, 'rb') as f:
                                data = f.read()
                            data = self.process_shebang(data)
                            with open(p, 'wb') as f:
                                f.write(data)

        # Now, stuff which is in site-packages, other than the
        # distinfo stuff.
        path = libdir
        distinfo = None
        for root, dirs, files in os.walk(path):
            if root == path:
                # At the top level only, save distinfo for later
                # and skip it for now
                for i, dn in enumerate(dirs):
                    dn = fsdecode(dn)
                    if dn.endswith('.dist-info'):
                        distinfo = os.path.join(root, dn)
                        del dirs[i]
                        break
                assert distinfo, '.dist-info directory expected, not found'

            for fn in files:
                # comment out next suite to leave .pyc files in
                if fsdecode(fn).endswith(('.pyc', '.pyo')):
                    continue
                p = os.path.join(root, fn)
                rp = to_posix(os.path.relpath(p, path))
                archive_paths.append((rp, p))

        # Now distinfo. Assumed to be flat, i.e. os.listdir is enough.
        files = os.listdir(distinfo)
        for fn in files:
            if fn not in ('RECORD', 'INSTALLER', 'SHARED'):
                p = fsdecode(os.path.join(distinfo, fn))
                ap = to_posix(os.path.join(info_dir, fn))
                archive_paths.append((ap, p))

        wheel_metadata = [
            'Wheel-Version: %d.%d' % (wheel_version or self.wheel_version),
            'Generator: distlib %s' % __version__,
            'Root-Is-Purelib: %s' % is_pure,
        ]
        for pyver, abi, arch in self.tags:
            wheel_metadata.append('Tag: %s-%s-%s' % (pyver, abi, arch))
        p = os.path.join(distinfo, 'WHEEL')
        with open(p, 'w') as f:
            f.write('\n'.join(wheel_metadata))
        ap = to_posix(os.path.join(info_dir, 'WHEEL'))
        archive_paths.append((ap, p))

        # Now, at last, RECORD.
        # Paths in here are archive paths - nothing else makes sense.
        self.write_records((distinfo, info_dir), libdir, archive_paths)
        # Now, ready to build the zip file
        pathname = os.path.join(self.dirname, self.filename)
        self.build_zip(pathname, archive_paths)
        return pathname

    def install(self, paths, maker, **kwargs):
        """
        Install a wheel to the specified paths. If kwarg ``warner`` is
        specified, it should be a callable, which will be called with two
        tuples indicating the wheel version of this software and the wheel
        version in the file, if there is a discrepancy in the versions.
        This can be used to issue any warnings to raise any exceptions.
        If kwarg ``lib_only`` is True, only the purelib/platlib files are
        installed, and the headers, scripts, data and dist-info metadata are
        not written.

        The return value is a :class:`InstalledDistribution` instance unless
        ``options.lib_only`` is True, in which case the return value is ``None``.
        """

        dry_run = maker.dry_run
        warner = kwargs.get('warner')
        lib_only = kwargs.get('lib_only', False)

        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        metadata_name = posixpath.join(info_dir, METADATA_FILENAME)
        wheel_metadata_name = posixpath.join(info_dir, 'WHEEL')
        record_name = posixpath.join(info_dir, 'RECORD')

        wrapper = codecs.getreader('utf-8')

        with ZipFile(pathname, 'r') as zf:
            with zf.open(wheel_metadata_name) as bwf:
                wf = wrapper(bwf)
                message = message_from_file(wf)
            wv = message['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            if (file_version != self.wheel_version) and warner:
                warner(self.wheel_version, file_version)

            if message['Root-Is-Purelib'] == 'true':
                libdir = paths['purelib']
            else:
                libdir = paths['platlib']

            records = {}
            with zf.open(record_name) as bf:
                with CSVReader(stream=bf) as reader:
                    for row in reader:
                        p = row[0]
                        records[p] = row

            data_pfx = posixpath.join(data_dir, '')
            info_pfx = posixpath.join(info_dir, '')
            script_pfx = posixpath.join(data_dir, 'scripts', '')

            # make a new instance rather than a copy of maker's,
            # as we mutate it
            fileop = FileOperator(dry_run=dry_run)
            fileop.record = True    # so we can rollback if needed

            bc = not sys.dont_write_bytecode    # Double negatives. Lovely!

            outfiles = []   # for RECORD writing

            # for script copying/shebang processing
            workdir = tempfile.mkdtemp()
            # set target dir later
            # we default add_launchers to False, as the
            # Python Launcher should be used instead
            maker.source_dir = workdir
            maker.target_dir = None
            try:
                for zinfo in zf.infolist():
                    arcname = zinfo.filename
                    if isinstance(arcname, text_type):
                        u_arcname = arcname
                    else:
                        u_arcname = arcname.decode('utf-8')
                    # The signature file won't be in RECORD,
                    # and we  don't currently don't do anything with it
                    if u_arcname.endswith('/RECORD.jws'):
                        continue
                    row = records[u_arcname]
                    if row[2] and str(zinfo.file_size) != row[2]:
                        raise DistlibException('size mismatch for '
                                               '%s' % u_arcname)
                    if row[1]:
                        kind, value = row[1].split('=', 1)
                        with zf.open(arcname) as bf:
                            data = bf.read()
                        _, digest = self.get_hash(data, kind)
                        if digest != value:
                            raise DistlibException('digest mismatch for '
                                                   '%s' % arcname)

                    if lib_only and u_arcname.startswith((info_pfx, data_pfx)):
                        logger.debug('lib_only: skipping %s', u_arcname)
                        continue
                    is_script = (u_arcname.startswith(script_pfx)
                                 and not u_arcname.endswith('.exe'))

                    if u_arcname.startswith(data_pfx):
                        _, where, rp = u_arcname.split('/', 2)
                        outfile = os.path.join(paths[where], convert_path(rp))
                    else:
                        # meant for site-packages.
                        if u_arcname in (wheel_metadata_name, record_name):
                            continue
                        outfile = os.path.join(libdir, convert_path(u_arcname))
                    if not is_script:
                        with zf.open(arcname) as bf:
                            fileop.copy_stream(bf, outfile)
                        outfiles.append(outfile)
                        # Double check the digest of the written file
                        if not dry_run and row[1]:
                            with open(outfile, 'rb') as bf:
                                data = bf.read()
                                _, newdigest = self.get_hash(data, kind)
                                if newdigest != digest:
                                    raise DistlibException('digest mismatch '
                                                           'on write for '
                                                           '%s' % outfile)
                        if bc and outfile.endswith('.py'):
                            try:
                                pyc = fileop.byte_compile(outfile)
                                outfiles.append(pyc)
                            except Exception:
                                # Don't give up if byte-compilation fails,
                                # but log it and perhaps warn the user
                                logger.warning('Byte-compilation failed',
                                               exc_info=True)
                    else:
                        fn = os.path.basename(convert_path(arcname))
                        workname = os.path.join(workdir, fn)
                        with zf.open(arcname) as bf:
                            fileop.copy_stream(bf, workname)

                        dn, fn = os.path.split(outfile)
                        maker.target_dir = dn
                        filenames = maker.make(fn)
                        fileop.set_executable_mode(filenames)
                        outfiles.extend(filenames)

                if lib_only:
                    logger.debug('lib_only: returning None')
                    dist = None
                else:
                    # Generate scripts

                    # Try to get pydist.json so we can see if there are
                    # any commands to generate. If this fails (e.g. because
                    # of a legacy wheel), log a warning but don't give up.
                    commands = None
                    file_version = self.info['Wheel-Version']
                    if file_version == '1.0':
                        # Use legacy info
                        ep = posixpath.join(info_dir, 'entry_points.txt')
                        try:
                            with zf.open(ep) as bwf:
                                epdata = read_exports(bwf)
                            commands = {}
                            for key in ('console', 'gui'):
                                k = '%s_scripts' % key
                                if k in epdata:
                                    commands['wrap_%s' % key] = d = {}
                                    for v in epdata[k].values():
                                        s = '%s:%s' % (v.prefix, v.suffix)
                                        if v.flags:
                                            s += ' %s' % v.flags
                                        d[v.name] = s
                        except Exception:
                            logger.warning('Unable to read legacy script '
                                           'metadata, so cannot generate '
                                           'scripts')
                    else:
                        try:
                            with zf.open(metadata_name) as bwf:
                                wf = wrapper(bwf)
                                commands = json.load(wf).get('commands')
                        except Exception:
                            logger.warning('Unable to read JSON metadata, so '
                                           'cannot generate scripts')
                    if commands:
                        console_scripts = commands.get('wrap_console', {})
                        gui_scripts = commands.get('wrap_gui', {})
                        if console_scripts or gui_scripts:
                            script_dir = paths.get('scripts', '')
                            if not os.path.isdir(script_dir):
                                raise ValueError('Valid script path not '
                                                 'specified')
                            maker.target_dir = script_dir
                            for k, v in console_scripts.items():
                                script = '%s = %s' % (k, v)
                                filenames = maker.make(script)
                                fileop.set_executable_mode(filenames)

                            if gui_scripts:
                                options = {'gui': True }
                                for k, v in gui_scripts.items():
                                    script = '%s = %s' % (k, v)
                                    filenames = maker.make(script, options)
                                    fileop.set_executable_mode(filenames)

                    p = os.path.join(libdir, info_dir)
                    dist = InstalledDistribution(p)

                    # Write SHARED
                    paths = dict(paths)     # don't change passed in dict
                    del paths['purelib']
                    del paths['platlib']
                    paths['lib'] = libdir
                    p = dist.write_shared_locations(paths, dry_run)
                    if p:
                        outfiles.append(p)

                    # Write RECORD
                    dist.write_installed_files(outfiles, paths['prefix'],
                                               dry_run)
                return dist
            except Exception:  # pragma: no cover
                logger.exception('installation failed.')
                fileop.rollback()
                raise
            finally:
                shutil.rmtree(workdir)

    def _get_dylib_cache(self):
        global cache
        if cache is None:
            # Use native string to avoid issues on 2.x: see Python #20140.
            base = os.path.join(get_cache_base(), str('dylib-cache'),
                                sys.version[:3])
            cache = Cache(base)
        return cache

    def _get_extensions(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        arcname = posixpath.join(info_dir, 'EXTENSIONS')
        wrapper = codecs.getreader('utf-8')
        result = []
        with ZipFile(pathname, 'r') as zf:
            try:
                with zf.open(arcname) as bf:
                    wf = wrapper(bf)
                    extensions = json.load(wf)
                    cache = self._get_dylib_cache()
                    prefix = cache.prefix_to_dir(pathname)
                    cache_base = os.path.join(cache.base, prefix)
                    if not os.path.isdir(cache_base):
                        os.makedirs(cache_base)
                    for name, relpath in extensions.items():
                        dest = os.path.join(cache_base, convert_path(relpath))
                        if not os.path.exists(dest):
                            extract = True
                        else:
                            file_time = os.stat(dest).st_mtime
                            file_time = datetime.datetime.fromtimestamp(file_time)
                            info = zf.getinfo(relpath)
                            wheel_time = datetime.datetime(*info.date_time)
                            extract = wheel_time > file_time
                        if extract:
                            zf.extract(relpath, cache_base)
                        result.append((name, dest))
            except KeyError:
                pass
        return result

    def is_compatible(self):
        """
        Determine if a wheel is compatible with the running system.
        """
        return is_compatible(self)

    def is_mountable(self):
        """
        Determine if a wheel is asserted as mountable by its metadata.
        """
        return True # for now - metadata details TBD

    def mount(self, append=False):
        pathname = os.path.abspath(os.path.join(self.dirname, self.filename))
        if not self.is_compatible():
            msg = 'Wheel %s not compatible with this Python.' % pathname
            raise DistlibException(msg)
        if not self.is_mountable():
            msg = 'Wheel %s is marked as not mountable.' % pathname
            raise DistlibException(msg)
        if pathname in sys.path:
            logger.debug('%s already in path', pathname)
        else:
            if append:
                sys.path.append(pathname)
            else:
                sys.path.insert(0, pathname)
            extensions = self._get_extensions()
            if extensions:
                if _hook not in sys.meta_path:
                    sys.meta_path.append(_hook)
                _hook.add(pathname, extensions)

    def unmount(self):
        pathname = os.path.abspath(os.path.join(self.dirname, self.filename))
        if pathname not in sys.path:
            logger.debug('%s not in path', pathname)
        else:
            sys.path.remove(pathname)
            if pathname in _hook.impure_wheels:
                _hook.remove(pathname)
            if not _hook.impure_wheels:
                if _hook in sys.meta_path:
                    sys.meta_path.remove(_hook)

    def verify(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        metadata_name = posixpath.join(info_dir, METADATA_FILENAME)
        wheel_metadata_name = posixpath.join(info_dir, 'WHEEL')
        record_name = posixpath.join(info_dir, 'RECORD')

        wrapper = codecs.getreader('utf-8')

        with ZipFile(pathname, 'r') as zf:
            with zf.open(wheel_metadata_name) as bwf:
                wf = wrapper(bwf)
                message = message_from_file(wf)
            wv = message['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            # TODO version verification

            records = {}
            with zf.open(record_name) as bf:
                with CSVReader(stream=bf) as reader:
                    for row in reader:
                        p = row[0]
                        records[p] = row

            for zinfo in zf.infolist():
                arcname = zinfo.filename
                if isinstance(arcname, text_type):
                    u_arcname = arcname
                else:
                    u_arcname = arcname.decode('utf-8')
                if '..' in u_arcname:
                    raise DistlibException('invalid entry in '
                                           'wheel: %r' % u_arcname)

                # The signature file won't be in RECORD,
                # and we  don't currently don't do anything with it
                if u_arcname.endswith('/RECORD.jws'):
                    continue
                row = records[u_arcname]
                if row[2] and str(zinfo.file_size) != row[2]:
                    raise DistlibException('size mismatch for '
                                           '%s' % u_arcname)
                if row[1]:
                    kind, value = row[1].split('=', 1)
                    with zf.open(arcname) as bf:
                        data = bf.read()
                    _, digest = self.get_hash(data, kind)
                    if digest != value:
                        raise DistlibException('digest mismatch for '
                                               '%s' % arcname)

    def update(self, modifier, dest_dir=None, **kwargs):
        """
        Update the contents of a wheel in a generic way. The modifier should
        be a callable which expects a dictionary argument: its keys are
        archive-entry paths, and its values are absolute filesystem paths
        where the contents the corresponding archive entries can be found. The
        modifier is free to change the contents of the files pointed to, add
        new entries and remove entries, before returning. This method will
        extract the entire contents of the wheel to a temporary location, call
        the modifier, and then use the passed (and possibly updated)
        dictionary to write a new wheel. If ``dest_dir`` is specified, the new
        wheel is written there -- otherwise, the original wheel is overwritten.

        The modifier should return True if it updated the wheel, else False.
        This method returns the same value the modifier returns.
        """

        def get_version(path_map, info_dir):
            version = path = None
            key = '%s/%s' % (info_dir, METADATA_FILENAME)
            if key not in path_map:
                key = '%s/PKG-INFO' % info_dir
            if key in path_map:
                path = path_map[key]
                version = Metadata(path=path).version
            return version, path

        def update_version(version, path):
            updated = None
            try:
                v = NormalizedVersion(version)
                i = version.find('-')
                if i < 0:
                    updated = '%s-1' % version
                else:
                    parts = [int(s) for s in version[i + 1:].split('.')]
                    parts[-1] += 1
                    updated = '%s-%s' % (version[:i],
                                         '.'.join(str(i) for i in parts))
            except UnsupportedVersionError:
                logger.debug('Cannot update non-compliant (PEP-440) '
                             'version %r', version)
            if updated:
                md = Metadata(path=path)
                md.version = updated
                legacy = not path.endswith(METADATA_FILENAME)
                md.write(path=path, legacy=legacy)
                logger.debug('Version updated from %r to %r', version,
                             updated)

        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        record_name = posixpath.join(info_dir, 'RECORD')
        with tempdir() as workdir:
            with ZipFile(pathname, 'r') as zf:
                path_map = {}
                for zinfo in zf.infolist():
                    arcname = zinfo.filename
                    if isinstance(arcname, text_type):
                        u_arcname = arcname
                    else:
                        u_arcname = arcname.decode('utf-8')
                    if u_arcname == record_name:
                        continue
                    if '..' in u_arcname:
                        raise DistlibException('invalid entry in '
                                               'wheel: %r' % u_arcname)
                    zf.extract(zinfo, workdir)
                    path = os.path.join(workdir, convert_path(u_arcname))
                    path_map[u_arcname] = path

            # Remember the version.
            original_version, _ = get_version(path_map, info_dir)
            # Files extracted. Call the modifier.
            modified = modifier(path_map, **kwargs)
            if modified:
                # Something changed - need to build a new wheel.
                current_version, path = get_version(path_map, info_dir)
                if current_version and (current_version == original_version):
                    # Add or update local version to signify changes.
                    update_version(current_version, path)
                # Decide where the new wheel goes.
                if dest_dir is None:
                    fd, newpath = tempfile.mkstemp(suffix='.whl',
                                                   prefix='wheel-update-',
                                                   dir=workdir)
                    os.close(fd)
                else:
                    if not os.path.isdir(dest_dir):
                        raise DistlibException('Not a directory: %r' % dest_dir)
                    newpath = os.path.join(dest_dir, self.filename)
                archive_paths = list(path_map.items())
                distinfo = os.path.join(workdir, info_dir)
                info = distinfo, info_dir
                self.write_records(info, workdir, archive_paths)
                self.build_zip(newpath, archive_paths)
                if dest_dir is None:
                    shutil.copyfile(newpath, pathname)
        return modified

def compatible_tags():
    """
    Return (pyver, abi, arch) tuples compatible with this Python.
    """
    versions = [VER_SUFFIX]
    major = VER_SUFFIX[0]
    for minor in range(sys.version_info[1] - 1, - 1, -1):
        versions.append(''.join([major, str(minor)]))

    abis = []
    for suffix, _, _ in imp.get_suffixes():
        if suffix.startswith('.abi'):
            abis.append(suffix.split('.', 2)[1])
    abis.sort()
    if ABI != 'none':
        abis.insert(0, ABI)
    abis.append('none')
    result = []

    arches = [ARCH]
    if sys.platform == 'darwin':
        m = re.match('(\w+)_(\d+)_(\d+)_(\w+)$', ARCH)
        if m:
            name, major, minor, arch = m.groups()
            minor = int(minor)
            matches = [arch]
            if arch in ('i386', 'ppc'):
                matches.append('fat')
            if arch in ('i386', 'ppc', 'x86_64'):
                matches.append('fat3')
            if arch in ('ppc64', 'x86_64'):
                matches.append('fat64')
            if arch in ('i386', 'x86_64'):
                matches.append('intel')
            if arch in ('i386', 'x86_64', 'intel', 'ppc', 'ppc64'):
                matches.append('universal')
            while minor >= 0:
                for match in matches:
                    s = '%s_%s_%s_%s' % (name, major, minor, match)
                    if s != ARCH:   # already there
                        arches.append(s)
                minor -= 1

    # Most specific - our Python version, ABI and arch
    for abi in abis:
        for arch in arches:
            result.append((''.join((IMP_PREFIX, versions[0])), abi, arch))

    # where no ABI / arch dependency, but IMP_PREFIX dependency
    for i, version in enumerate(versions):
        result.append((''.join((IMP_PREFIX, version)), 'none', 'any'))
        if i == 0:
            result.append((''.join((IMP_PREFIX, version[0])), 'none', 'any'))

    # no IMP_PREFIX, ABI or arch dependency
    for i, version in enumerate(versions):
        result.append((''.join(('py', version)), 'none', 'any'))
        if i == 0:
            result.append((''.join(('py', version[0])), 'none', 'any'))
    return set(result)


COMPATIBLE_TAGS = compatible_tags()

del compatible_tags


def is_compatible(wheel, tags=None):
    if not isinstance(wheel, Wheel):
        wheel = Wheel(wheel)    # assume it's a filename
    result = False
    if tags is None:
        tags = COMPATIBLE_TAGS
    for ver, abi, arch in tags:
        if ver in wheel.pyver and abi in wheel.abi and arch in wheel.arch:
            result = True
            break
    return result
python3.3/site-packages/pip/_vendor/distlib/__init__.py000064400000001105151733566750017037 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2014 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import logging

__version__ = '0.1.8'

class DistlibException(Exception):
    pass

try:
    from logging import NullHandler
except ImportError: # pragma: no cover
    class NullHandler(logging.Handler):
        def handle(self, record): pass
        def emit(self, record): pass
        def createLock(self): self.lock = None

logger = logging.getLogger(__name__)
logger.addHandler(NullHandler())
python3.3/site-packages/pip/_vendor/distlib/locators.py000064400000133542151733566750017141 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#

import gzip
from io import BytesIO
import json
import logging
import os
import posixpath
import re
try:
    import threading
except ImportError:
    import dummy_threading as threading
import zlib

from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
                     queue, quote, unescape, string_types, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata
from .util import (cached_property, parse_credentials, ensure_slash,
                   split_filename, get_project_data, parse_requirement,
                   parse_name_and_version, ServerProxy)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

logger = logging.getLogger(__name__)

HASHER_HASH = re.compile('^(\w+)=([a-f0-9]+)')
CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I)
HTML_CONTENT_TYPE = re.compile('text/html|application/x(ht)?ml')
DEFAULT_INDEX = 'http://python.org/pypi'

def get_all_distribution_names(url=None):
    """
    Return all distribution names known by an index.
    :param url: The URL of the index.
    :return: A list of all known distribution names.
    """
    if url is None:
        url = DEFAULT_INDEX
    client = ServerProxy(url, timeout=3.0)
    return client.list_packages()

class RedirectHandler(BaseRedirectHandler):
    """
    A class to work around a bug in some Python 3.2.x releases.
    """
    # There's a bug in the base version for some 3.2.x
    # (e.g. 3.2.2 on Ubuntu Oneiric). If a Location header
    # returns e.g. /abc, it bails because it says the scheme ''
    # is bogus, when actually it should use the request's
    # URL for the scheme. See Python issue #13696.
    def http_error_302(self, req, fp, code, msg, headers):
        # Some servers (incorrectly) return multiple Location headers
        # (so probably same goes for URI).  Use first header.
        newurl = None
        for key in ('location', 'uri'):
            if key in headers:
                newurl = headers[key]
                break
        if newurl is None:
            return
        urlparts = urlparse(newurl)
        if urlparts.scheme == '':
            newurl = urljoin(req.get_full_url(), newurl)
            if hasattr(headers, 'replace_header'):
                headers.replace_header(key, newurl)
            else:
                headers[key] = newurl
        return BaseRedirectHandler.http_error_302(self, req, fp, code, msg,
                                                  headers)

    http_error_301 = http_error_303 = http_error_307 = http_error_302

class Locator(object):
    """
    A base class for locators - things that locate distributions.
    """
    source_extensions = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz')
    binary_extensions = ('.egg', '.exe', '.whl')
    excluded_extensions = ('.pdf',)

    # A list of tags indicating which wheels you want to match. The default
    # value of None matches against the tags compatible with the running
    # Python. If you want to match other values, set wheel_tags on a locator
    # instance to a list of tuples (pyver, abi, arch) which you want to match.
    wheel_tags = None

    downloadable_extensions = source_extensions + ('.whl',)

    def __init__(self, scheme='default'):
        """
        Initialise an instance.
        :param scheme: Because locators look for most recent versions, they
                       need to know the version scheme to use. This specifies
                       the current PEP-recommended scheme - use ``'legacy'``
                       if you need to support existing distributions on PyPI.
        """
        self._cache = {}
        self.scheme = scheme
        # Because of bugs in some of the handlers on some of the platforms,
        # we use our own opener rather than just using urlopen.
        self.opener = build_opener(RedirectHandler())
        # If get_project() is called from locate(), the matcher instance
        # is set from the requirement passed to locate(). See issue #18 for
        # why this can be useful to know.
        self.matcher = None

    def clear_cache(self):
        self._cache.clear()

    def _get_scheme(self):
        return self._scheme

    def _set_scheme(self, value):
        self._scheme = value

    scheme = property(_get_scheme, _set_scheme)

    def _get_project(self, name):
        """
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This should be implemented in subclasses.

        If called from a locate() request, self.matcher will be set to a
        matcher for the requirement to satisfy, otherwise it will be None.
        """
        raise NotImplementedError('Please implement in the subclass')

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Please implement in the subclass')

    def get_project(self, name):
        """
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This calls _get_project to do all the work, and just implements a caching layer on top.
        """
        if self._cache is None:
            result = self._get_project(name)
        elif name in self._cache:
            result = self._cache[name]
        else:
            result = self._get_project(name)
            self._cache[name] = result
        return result

    def score_url(self, url):
        """
        Give an url a score which can be used to choose preferred URLs
        for a given project release.
        """
        t = urlparse(url)
        return (t.scheme != 'https', 'pypi.python.org' in t.netloc,
                posixpath.basename(t.path))

    def prefer_url(self, url1, url2):
        """
        Choose one of two URLs where both are candidates for distribution
        archives for the same version of a distribution (for example,
        .tar.gz vs. zip).

        The current implement favours http:// URLs over https://, archives
        from PyPI over those from other locations and then the archive name.
        """
        result = url2
        if url1:
            s1 = self.score_url(url1)
            s2 = self.score_url(url2)
            if s1 > s2:
                result = url1
            if result != url2:
                logger.debug('Not replacing %r with %r', url1, url2)
            else:
                logger.debug('Replacing %r with %r', url1, url2)
        return result

    def split_filename(self, filename, project_name):
        """
        Attempt to split a filename in project name, version and Python version.
        """
        return split_filename(filename, project_name)

    def convert_url_to_download_info(self, url, project_name):
        """
        See if a URL is a candidate for a download URL for a project (the URL
        has typically been scraped from an HTML page).

        If it is, a dictionary is returned with keys "name", "version",
        "filename" and "url"; otherwise, None is returned.
        """
        def same_project(name1, name2):
            name1, name2 = name1.lower(), name2.lower()
            if name1 == name2:
                result = True
            else:
                # distribute replaces '-' by '_' in project names, so it
                # can tell where the version starts in a filename.
                result = name1.replace('_', '-') == name2.replace('_', '-')
            return result

        result = None
        scheme, netloc, path, params, query, frag = urlparse(url)
        if frag.lower().startswith('egg='):
            logger.debug('%s: version hint in fragment: %r',
                         project_name, frag)
        m = HASHER_HASH.match(frag)
        if m:
            algo, digest = m.groups()
        else:
            algo, digest = None, None
        origpath = path
        if path and path[-1] == '/':
            path = path[:-1]
        if path.endswith('.whl'):
            try:
                wheel = Wheel(path)
                if is_compatible(wheel, self.wheel_tags):
                    if project_name is None:
                        include = True
                    else:
                        include = same_project(wheel.name, project_name)
                    if include:
                        result = {
                            'name': wheel.name,
                            'version': wheel.version,
                            'filename': wheel.filename,
                            'url': urlunparse((scheme, netloc, origpath,
                                               params, query, '')),
                            'python-version': ', '.join(
                                ['.'.join(list(v[2:])) for v in wheel.pyver]),
                        }
            except Exception as e:
                logger.warning('invalid path for wheel: %s', path)
        elif path.endswith(self.downloadable_extensions):
            path = filename = posixpath.basename(path)
            for ext in self.downloadable_extensions:
                if path.endswith(ext):
                    path = path[:-len(ext)]
                    t = self.split_filename(path, project_name)
                    if not t:
                        logger.debug('No match for project/version: %s', path)
                    else:
                        name, version, pyver = t
                        if not project_name or same_project(project_name, name):
                            result = {
                                'name': name,
                                'version': version,
                                'filename': filename,
                                'url': urlunparse((scheme, netloc, origpath,
                                                   params, query, '')),
                                #'packagetype': 'sdist',
                            }
                            if pyver:
                                result['python-version'] = pyver
                    break
        if result and algo:
            result['%s_digest' % algo] = digest
        return result

    def _get_digest(self, info):
        """
        Get a digest from a dictionary by looking at keys of the form
        'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
        """
        result = None
        for algo in ('sha256', 'md5'):
            key = '%s_digest' % algo
            if key in info:
                result = (algo, info[key])
                break
        return result

    def _update_version_data(self, result, info):
        """
        Update a result dictionary (the final result from _get_project) with a dictionary for a
        specific version, whih typically holds information gleaned from a filename or URL for an
        archive for the distribution.
        """
        name = info.pop('name')
        version = info.pop('version')
        if version in result:
            dist = result[version]
            md = dist.metadata
        else:
            dist = make_dist(name, version, scheme=self.scheme)
            md = dist.metadata
        dist.digest = self._get_digest(info)
        if md.source_url != info['url']:
            md.source_url = self.prefer_url(md.source_url, info['url'])
        dist.locator = self
        result[version] = dist

    def locate(self, requirement, prereleases=False):
        """
        Find the most recent distribution which matches the given
        requirement.

        :param requirement: A requirement of the form 'foo (1.0)' or perhaps
                            'foo (>= 1.0, < 2.0, != 1.3)'
        :param prereleases: If ``True``, allow pre-release versions
                            to be located. Otherwise, pre-release versions
                            are not returned.
        :return: A :class:`Distribution` instance, or ``None`` if no such
                 distribution could be located.
        """
        result = None
        r = parse_requirement(requirement)
        if r is None:
            raise DistlibException('Not a valid requirement: %r' % requirement)
        scheme = get_scheme(self.scheme)
        self.matcher = matcher = scheme.matcher(r.requirement)
        logger.debug('matcher: %s (%s)', matcher, type(matcher).__name__)
        versions = self.get_project(r.name)
        if versions:
            # sometimes, versions are invalid
            slist = []
            vcls = matcher.version_class
            for k in versions:
                try:
                    if not matcher.match(k):
                        logger.debug('%s did not match %r', matcher, k)
                    else:
                        if prereleases or not vcls(k).is_prerelease:
                            slist.append(k)
                        else:
                            logger.debug('skipping pre-release '
                                         'version %s of %s', k, matcher.name)
                except Exception:
                    logger.warning('error matching %s with %r', matcher, k)
                    pass # slist.append(k)
            if len(slist) > 1:
                slist = sorted(slist, key=scheme.key)
            if slist:
                logger.debug('sorted list: %s', slist)
                result = versions[slist[-1]]
        if result and r.extras:
            result.extras = r.extras
        self.matcher = None
        return result


class PyPIRPCLocator(Locator):
    """
    This locator uses XML-RPC to locate distributions. It therefore
    cannot be used with simple mirrors (that only mirror file content).
    """
    def __init__(self, url, **kwargs):
        """
        Initialise an instance.

        :param url: The URL to use for XML-RPC.
        :param kwargs: Passed to the superclass constructor.
        """
        super(PyPIRPCLocator, self).__init__(**kwargs)
        self.base_url = url
        self.client = ServerProxy(url, timeout=3.0)

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        return set(self.client.list_packages())

    def _get_project(self, name):
        result = {}
        versions = self.client.package_releases(name, True)
        for v in versions:
            urls = self.client.release_urls(name, v)
            data = self.client.release_data(name, v)
            metadata = Metadata(scheme=self.scheme)
            metadata.name = data['name']
            metadata.version = data['version']
            metadata.license = data.get('license')
            metadata.keywords = data.get('keywords', [])
            metadata.summary = data.get('summary')
            dist = Distribution(metadata)
            if urls:
                info = urls[0]
                metadata.source_url = info['url']
                dist.digest = self._get_digest(info)
                dist.locator = self
                result[v] = dist
        return result

class PyPIJSONLocator(Locator):
    """
    This locator uses PyPI's JSON interface. It's very limited in functionality
    nad probably not worth using.
    """
    def __init__(self, url, **kwargs):
        super(PyPIJSONLocator, self).__init__(**kwargs)
        self.base_url = ensure_slash(url)

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Not available from this locator')

    def _get_project(self, name):
        result = {}
        url = urljoin(self.base_url, '%s/json' % quote(name))
        try:
            resp = self.opener.open(url)
            data = resp.read().decode() # for now
            d = json.loads(data)
            md = Metadata(scheme=self.scheme)
            data = d['info']
            md.name = data['name']
            md.version = data['version']
            md.license = data.get('license')
            md.keywords = data.get('keywords', [])
            md.summary = data.get('summary')
            dist = Distribution(md)
            urls = d['urls']
            if urls:
                info = urls[0]
                md.source_url = info['url']
                dist.digest = self._get_digest(info)
                dist.locator = self
                result[md.version] = dist
        except Exception as e:
            logger.exception('JSON fetch failed: %s', e)
        return result


class Page(object):
    """
    This class represents a scraped HTML page.
    """
    # The following slightly hairy-looking regex just looks for the contents of
    # an anchor link, which has an attribute "href" either immediately preceded
    # or immediately followed by a "rel" attribute. The attribute values can be
    # declared with double quotes, single quotes or no quotes - which leads to
    # the length of the expression.
    _href = re.compile("""
(rel\s*=\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\s\n]*))\s+)?
href\s*=\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\s\n]*))
(\s+rel\s*=\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\s\n]*)))?
""", re.I | re.S | re.X)
    _base = re.compile(r"""<base\s+href\s*=\s*['"]?([^'">]+)""", re.I | re.S)

    def __init__(self, data, url):
        """
        Initialise an instance with the Unicode page contents and the URL they
        came from.
        """
        self.data = data
        self.base_url = self.url = url
        m = self._base.search(self.data)
        if m:
            self.base_url = m.group(1)

    _clean_re = re.compile(r'[^a-z0-9$&+,/:;=?@.#%_\\|-]', re.I)

    @cached_property
    def links(self):
        """
        Return the URLs of all the links on a page together with information
        about their "rel" attribute, for determining which ones to treat as
        downloads and which ones to queue for further scraping.
        """
        def clean(url):
            "Tidy up an URL."
            scheme, netloc, path, params, query, frag = urlparse(url)
            return urlunparse((scheme, netloc, quote(path),
                               params, query, frag))

        result = set()
        for match in self._href.finditer(self.data):
            d = match.groupdict('')
            rel = (d['rel1'] or d['rel2'] or d['rel3'] or
                   d['rel4'] or d['rel5'] or d['rel6'])
            url = d['url1'] or d['url2'] or d['url3']
            url = urljoin(self.base_url, url)
            url = unescape(url)
            url = self._clean_re.sub(lambda m: '%%%2x' % ord(m.group(0)), url)
            result.add((url, rel))
        # We sort the result, hoping to bring the most recent versions
        # to the front
        result = sorted(result, key=lambda t: t[0], reverse=True)
        return result


class SimpleScrapingLocator(Locator):
    """
    A locator which scrapes HTML pages to locate downloads for a distribution.
    This runs multiple threads to do the I/O; performance is at least as good
    as pip's PackageFinder, which works in an analogous fashion.
    """

    # These are used to deal with various Content-Encoding schemes.
    decoders = {
        'deflate': zlib.decompress,
        'gzip': lambda b: gzip.GzipFile(fileobj=BytesIO(d)).read(),
        'none': lambda b: b,
    }

    def __init__(self, url, timeout=None, num_workers=10, **kwargs):
        """
        Initialise an instance.
        :param url: The root URL to use for scraping.
        :param timeout: The timeout, in seconds, to be applied to requests.
                        This defaults to ``None`` (no timeout specified).
        :param num_workers: The number of worker threads you want to do I/O,
                            This defaults to 10.
        :param kwargs: Passed to the superclass.
        """
        super(SimpleScrapingLocator, self).__init__(**kwargs)
        self.base_url = ensure_slash(url)
        self.timeout = timeout
        self._page_cache = {}
        self._seen = set()
        self._to_fetch = queue.Queue()
        self._bad_hosts = set()
        self.skip_externals = False
        self.num_workers = num_workers
        self._lock = threading.RLock()
        # See issue #45: we need to be resilient when the locator is used
        # in a thread, e.g. with concurrent.futures. We can't use self._lock
        # as it is for coordinating our internal threads - the ones created
        # in _prepare_threads.
        self._gplock = threading.RLock()

    def _prepare_threads(self):
        """
        Threads are created only when get_project is called, and terminate
        before it returns. They are there primarily to parallelise I/O (i.e.
        fetching web pages).
        """
        self._threads = []
        for i in range(self.num_workers):
            t = threading.Thread(target=self._fetch)
            t.setDaemon(True)
            t.start()
            self._threads.append(t)

    def _wait_threads(self):
        """
        Tell all the threads to terminate (by sending a sentinel value) and
        wait for them to do so.
        """
        # Note that you need two loops, since you can't say which
        # thread will get each sentinel
        for t in self._threads:
            self._to_fetch.put(None)    # sentinel
        for t in self._threads:
            t.join()
        self._threads = []

    def _get_project(self, name):
        result = {}
        with self._gplock:
            self.result = result
            self.project_name = name
            url = urljoin(self.base_url, '%s/' % quote(name))
            self._seen.clear()
            self._page_cache.clear()
            self._prepare_threads()
            try:
                logger.debug('Queueing %s', url)
                self._to_fetch.put(url)
                self._to_fetch.join()
            finally:
                self._wait_threads()
            del self.result
        return result

    platform_dependent = re.compile(r'\b(linux-(i\d86|x86_64|arm\w+)|'
                                    r'win(32|-amd64)|macosx-?\d+)\b', re.I)

    def _is_platform_dependent(self, url):
        """
        Does an URL refer to a platform-specific download?
        """
        return self.platform_dependent.search(url)

    def _process_download(self, url):
        """
        See if an URL is a suitable download for a project.

        If it is, register information in the result dictionary (for
        _get_project) about the specific version it's for.

        Note that the return value isn't actually used other than as a boolean
        value.
        """
        if self._is_platform_dependent(url):
            info = None
        else:
            info = self.convert_url_to_download_info(url, self.project_name)
        logger.debug('process_download: %s -> %s', url, info)
        if info:
            with self._lock:    # needed because self.result is shared
                self._update_version_data(self.result, info)
        return info

    def _should_queue(self, link, referrer, rel):
        """
        Determine whether a link URL from a referring page and with a
        particular "rel" attribute should be queued for scraping.
        """
        scheme, netloc, path, _, _, _ = urlparse(link)
        if path.endswith(self.source_extensions + self.binary_extensions +
                         self.excluded_extensions):
            result = False
        elif self.skip_externals and not link.startswith(self.base_url):
            result = False
        elif not referrer.startswith(self.base_url):
            result = False
        elif rel not in ('homepage', 'download'):
            result = False
        elif scheme not in ('http', 'https', 'ftp'):
            result = False
        elif self._is_platform_dependent(link):
            result = False
        else:
            host = netloc.split(':', 1)[0]
            if host.lower() == 'localhost':
                result = False
            else:
                result = True
        logger.debug('should_queue: %s (%s) from %s -> %s', link, rel,
                     referrer, result)
        return result

    def _fetch(self):
        """
        Get a URL to fetch from the work queue, get the HTML page, examine its
        links for download candidates and candidates for further scraping.

        This is a handy method to run in a thread.
        """
        while True:
            url = self._to_fetch.get()
            try:
                if url:
                    page = self.get_page(url)
                    if page is None:    # e.g. after an error
                        continue
                    for link, rel in page.links:
                        if link not in self._seen:
                            self._seen.add(link)
                            if (not self._process_download(link) and
                                self._should_queue(link, url, rel)):
                                logger.debug('Queueing %s from %s', link, url)
                                self._to_fetch.put(link)
            finally:
                # always do this, to avoid hangs :-)
                self._to_fetch.task_done()
            if not url:
                #logger.debug('Sentinel seen, quitting.')
                break

    def get_page(self, url):
        """
        Get the HTML for an URL, possibly from an in-memory cache.

        XXX TODO Note: this cache is never actually cleared. It's assumed that
        the data won't get stale over the lifetime of a locator instance (not
        necessarily true for the default_locator).
        """
        # http://peak.telecommunity.com/DevCenter/EasyInstall#package-index-api
        scheme, netloc, path, _, _, _ = urlparse(url)
        if scheme == 'file' and os.path.isdir(url2pathname(path)):
            url = urljoin(ensure_slash(url), 'index.html')

        if url in self._page_cache:
            result = self._page_cache[url]
            logger.debug('Returning %s from cache: %s', url, result)
        else:
            host = netloc.split(':', 1)[0]
            result = None
            if host in self._bad_hosts:
                logger.debug('Skipping %s due to bad host %s', url, host)
            else:
                req = Request(url, headers={'Accept-encoding': 'identity'})
                try:
                    logger.debug('Fetching %s', url)
                    resp = self.opener.open(req, timeout=self.timeout)
                    logger.debug('Fetched %s', url)
                    headers = resp.info()
                    content_type = headers.get('Content-Type', '')
                    if HTML_CONTENT_TYPE.match(content_type):
                        final_url = resp.geturl()
                        data = resp.read()
                        encoding = headers.get('Content-Encoding')
                        if encoding:
                            decoder = self.decoders[encoding]   # fail if not found
                            data = decoder(data)
                        encoding = 'utf-8'
                        m = CHARSET.search(content_type)
                        if m:
                            encoding = m.group(1)
                        try:
                            data = data.decode(encoding)
                        except UnicodeError:
                            data = data.decode('latin-1')    # fallback
                        result = Page(data, final_url)
                        self._page_cache[final_url] = result
                except HTTPError as e:
                    if e.code != 404:
                        logger.exception('Fetch failed: %s: %s', url, e)
                except URLError as e:
                    logger.exception('Fetch failed: %s: %s', url, e)
                    with self._lock:
                        self._bad_hosts.add(host)
                except Exception as e:
                    logger.exception('Fetch failed: %s: %s', url, e)
                finally:
                    self._page_cache[url] = result   # even if None (failure)
        return result

    _distname_re = re.compile('<a href=[^>]*>([^<]+)<')

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        page = self.get_page(self.base_url)
        if not page:
            raise DistlibException('Unable to get %s' % self.base_url)
        for match in self._distname_re.finditer(page.data):
            result.add(match.group(1))
        return result

class DirectoryLocator(Locator):
    """
    This class locates distributions in a directory tree.
    """

    def __init__(self, path, **kwargs):
        """
        Initialise an instance.
        :param path: The root of the directory tree to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * recursive - if True (the default), subdirectories are
                         recursed into. If False, only the top-level directory
                         is searched,
        """
        self.recursive = kwargs.pop('recursive', True)
        super(DirectoryLocator, self).__init__(**kwargs)
        path = os.path.abspath(path)
        if not os.path.isdir(path):
            raise DistlibException('Not a directory: %r' % path)
        self.base_dir = path

    def should_include(self, filename, parent):
        """
        Should a filename be considered as a candidate for a distribution
        archive? As well as the filename, the directory which contains it
        is provided, though not used by the current implementation.
        """
        return filename.endswith(self.downloadable_extensions)

    def _get_project(self, name):
        result = {}
        for root, dirs, files in os.walk(self.base_dir):
            for fn in files:
                if self.should_include(fn, root):
                    fn = os.path.join(root, fn)
                    url = urlunparse(('file', '',
                                      pathname2url(os.path.abspath(fn)),
                                      '', '', ''))
                    info = self.convert_url_to_download_info(url, name)
                    if info:
                        self._update_version_data(result, info)
            if not self.recursive:
                break
        return result

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        for root, dirs, files in os.walk(self.base_dir):
            for fn in files:
                if self.should_include(fn, root):
                    fn = os.path.join(root, fn)
                    url = urlunparse(('file', '',
                                      pathname2url(os.path.abspath(fn)),
                                      '', '', ''))
                    info = self.convert_url_to_download_info(url, None)
                    if info:
                        result.add(info['name'])
            if not self.recursive:
                break
        return result

class JSONLocator(Locator):
    """
    This locator uses special extended metadata (not available on PyPI) and is
    the basis of performant dependency resolution in distlib. Other locators
    require archive downloads before dependencies can be determined! As you
    might imagine, that can be slow.
    """
    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Not available from this locator')

    def _get_project(self, name):
        result = {}
        data = get_project_data(name)
        if data:
            for info in data.get('files', []):
                if info['ptype'] != 'sdist' or info['pyversion'] != 'source':
                    continue
                # We don't store summary in project metadata as it makes
                # the data bigger for no benefit during dependency
                # resolution
                dist = make_dist(data['name'], info['version'],
                                 summary=data.get('summary',
                                                  'Placeholder for summary'),
                                 scheme=self.scheme)
                md = dist.metadata
                md.source_url = info['url']
                # TODO SHA256 digest
                if 'digest' in info and info['digest']:
                    dist.digest = ('md5', info['digest'])
                md.dependencies = info.get('requirements', {})
                dist.exports = info.get('exports', {})
                result[dist.version] = dist
        return result

class DistPathLocator(Locator):
    """
    This locator finds installed distributions in a path. It can be useful for
    adding to an :class:`AggregatingLocator`.
    """
    def __init__(self, distpath, **kwargs):
        """
        Initialise an instance.

        :param distpath: A :class:`DistributionPath` instance to search.
        """
        super(DistPathLocator, self).__init__(**kwargs)
        assert isinstance(distpath, DistributionPath)
        self.distpath = distpath

    def _get_project(self, name):
        dist = self.distpath.get_distribution(name)
        if dist is None:
            result = {}
        else:
            result = { dist.version: dist }
        return result


class AggregatingLocator(Locator):
    """
    This class allows you to chain and/or merge a list of locators.
    """
    def __init__(self, *locators, **kwargs):
        """
        Initialise an instance.

        :param locators: The list of locators to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * merge - if False (the default), the first successful
                         search from any of the locators is returned. If True,
                         the results from all locators are merged (this can be
                         slow).
        """
        self.merge = kwargs.pop('merge', False)
        self.locators = locators
        super(AggregatingLocator, self).__init__(**kwargs)

    def clear_cache(self):
        super(AggregatingLocator, self).clear_cache()
        for locator in self.locators:
            locator.clear_cache()

    def _set_scheme(self, value):
        self._scheme = value
        for locator in self.locators:
            locator.scheme = value

    scheme = property(Locator.scheme.fget, _set_scheme)

    def _get_project(self, name):
        result = {}
        for locator in self.locators:
            d = locator.get_project(name)
            if d:
                if self.merge:
                    result.update(d)
                else:
                    # See issue #18. If any dists are found and we're looking
                    # for specific constraints, we only return something if
                    # a match is found. For example, if a DirectoryLocator
                    # returns just foo (1.0) while we're looking for
                    # foo (>= 2.0), we'll pretend there was nothing there so
                    # that subsequent locators can be queried. Otherwise we
                    # would just return foo (1.0) which would then lead to a
                    # failure to find foo (>= 2.0), because other locators
                    # weren't searched. Note that this only matters when
                    # merge=False.
                    if self.matcher is None:
                        found = True
                    else:
                        found = False
                        for k in d:
                            if self.matcher.match(k):
                                found = True
                                break
                    if found:
                        result = d
                        break
        return result

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        for locator in self.locators:
            try:
                result |= locator.get_distribution_names()
            except NotImplementedError:
                pass
        return result


# We use a legacy scheme simply because most of the dists on PyPI use legacy
# versions which don't conform to PEP 426 / PEP 440.
default_locator = AggregatingLocator(
                    JSONLocator(),
                    SimpleScrapingLocator('https://pypi.python.org/simple/',
                                          timeout=3.0),
                    scheme='legacy')

locate = default_locator.locate

NAME_VERSION_RE = re.compile(r'(?P<name>[\w-]+)\s*'
                             r'\(\s*(==\s*)?(?P<ver>[^)]+)\)$')

class DependencyFinder(object):
    """
    Locate dependencies for distributions.
    """

    def __init__(self, locator=None):
        """
        Initialise an instance, using the specified locator
        to locate distributions.
        """
        self.locator = locator or default_locator
        self.scheme = get_scheme(self.locator.scheme)

    def add_distribution(self, dist):
        """
        Add a distribution to the finder. This will update internal information
        about who provides what.
        :param dist: The distribution to add.
        """
        logger.debug('adding distribution %s', dist)
        name = dist.key
        self.dists_by_name[name] = dist
        self.dists[(name, dist.version)] = dist
        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Add to provided: %s, %s, %s', name, version, dist)
            self.provided.setdefault(name, set()).add((version, dist))

    def remove_distribution(self, dist):
        """
        Remove a distribution from the finder. This will update internal
        information about who provides what.
        :param dist: The distribution to remove.
        """
        logger.debug('removing distribution %s', dist)
        name = dist.key
        del self.dists_by_name[name]
        del self.dists[(name, dist.version)]
        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Remove from provided: %s, %s, %s', name, version, dist)
            s = self.provided[name]
            s.remove((version, dist))
            if not s:
                del self.provided[name]

    def get_matcher(self, reqt):
        """
        Get a version matcher for a requirement.
        :param reqt: The requirement
        :type reqt: str
        :return: A version matcher (an instance of
                 :class:`distlib.version.Matcher`).
        """
        try:
            matcher = self.scheme.matcher(reqt)
        except UnsupportedVersionError:
            # XXX compat-mode if cannot read the version
            name = reqt.split()[0]
            matcher = self.scheme.matcher(name)
        return matcher

    def find_providers(self, reqt):
        """
        Find the distributions which can fulfill a requirement.

        :param reqt: The requirement.
         :type reqt: str
        :return: A set of distribution which can fulfill the requirement.
        """
        matcher = self.get_matcher(reqt)
        name = matcher.key   # case-insensitive
        result = set()
        provided = self.provided
        if name in provided:
            for version, provider in provided[name]:
                try:
                    match = matcher.match(version)
                except UnsupportedVersionError:
                    match = False

                if match:
                    result.add(provider)
                    break
        return result

    def try_to_replace(self, provider, other, problems):
        """
        Attempt to replace one provider with another. This is typically used
        when resolving dependencies from multiple sources, e.g. A requires
        (B >= 1.0) while C requires (B >= 1.1).

        For successful replacement, ``provider`` must meet all the requirements
        which ``other`` fulfills.

        :param provider: The provider we are trying to replace with.
        :param other: The provider we're trying to replace.
        :param problems: If False is returned, this will contain what
                         problems prevented replacement. This is currently
                         a tuple of the literal string 'cantreplace',
                         ``provider``, ``other``  and the set of requirements
                         that ``provider`` couldn't fulfill.
        :return: True if we can replace ``other`` with ``provider``, else
                 False.
        """
        rlist = self.reqts[other]
        unmatched = set()
        for s in rlist:
            matcher = self.get_matcher(s)
            if not matcher.match(provider.version):
                unmatched.add(s)
        if unmatched:
            # can't replace other with provider
            problems.add(('cantreplace', provider, other, unmatched))
            result = False
        else:
            # can replace other with provider
            self.remove_distribution(other)
            del self.reqts[other]
            for s in rlist:
                self.reqts.setdefault(provider, set()).add(s)
            self.add_distribution(provider)
            result = True
        return result

    def find(self, requirement, meta_extras=None, prereleases=False):
        """
        Find a distribution and all distributions it depends on.

        :param requirement: The requirement specifying the distribution to
                            find, or a Distribution instance.
        :param meta_extras: A list of meta extras such as :test:, :build: and
                            so on.
        :param prereleases: If ``True``, allow pre-release versions to be
                            returned - otherwise, don't return prereleases
                            unless they're all that's available.

        Return a set of :class:`Distribution` instances and a set of
        problems.

        The distributions returned should be such that they have the
        :attr:`required` attribute set to ``True`` if they were
        from the ``requirement`` passed to ``find()``, and they have the
        :attr:`build_time_dependency` attribute set to ``True`` unless they
        are post-installation dependencies of the ``requirement``.

        The problems should be a tuple consisting of the string
        ``'unsatisfied'`` and the requirement which couldn't be satisfied
        by any distribution known to the locator.
        """

        self.provided = {}
        self.dists = {}
        self.dists_by_name = {}
        self.reqts = {}

        meta_extras = set(meta_extras or [])
        if ':*:' in meta_extras:
            meta_extras.remove(':*:')
            # :meta: and :run: are implicitly included
            meta_extras |= set([':test:', ':build:', ':dev:'])

        if isinstance(requirement, Distribution):
            dist = odist = requirement
            logger.debug('passed %s as requirement', odist)
        else:
            dist = odist = self.locator.locate(requirement,
                                               prereleases=prereleases)
            if dist is None:
                raise DistlibException('Unable to locate %r' % requirement)
            logger.debug('located %s', odist)
        dist.requested = True
        problems = set()
        todo = set([dist])
        install_dists = set([odist])
        while todo:
            dist = todo.pop()
            name = dist.key     # case-insensitive
            if name not in self.dists_by_name:
                self.add_distribution(dist)
            else:
                #import pdb; pdb.set_trace()
                other = self.dists_by_name[name]
                if other != dist:
                    self.try_to_replace(dist, other, problems)

            ireqts = dist.run_requires | dist.meta_requires
            sreqts = dist.build_requires
            ereqts = set()
            if dist in install_dists:
                for key in ('test', 'build', 'dev'):
                    e = ':%s:' % key
                    if e in meta_extras:
                        ereqts |= getattr(dist, '%s_requires' % key)
            all_reqts = ireqts | sreqts | ereqts
            for r in all_reqts:
                providers = self.find_providers(r)
                if not providers:
                    logger.debug('No providers found for %r', r)
                    provider = self.locator.locate(r, prereleases=prereleases)
                    # If no provider is found and we didn't consider
                    # prereleases, consider them now.
                    if provider is None and not prereleases:
                        provider = self.locator.locate(r, prereleases=True)
                    if provider is None:
                        logger.debug('Cannot satisfy %r', r)
                        problems.add(('unsatisfied', r))
                    else:
                        n, v = provider.key, provider.version
                        if (n, v) not in self.dists:
                            todo.add(provider)
                        providers.add(provider)
                        if r in ireqts and dist in install_dists:
                            install_dists.add(provider)
                            logger.debug('Adding %s to install_dists',
                                         provider.name_and_version)
                for p in providers:
                    name = p.key
                    if name not in self.dists_by_name:
                        self.reqts.setdefault(p, set()).add(r)
                    else:
                        other = self.dists_by_name[name]
                        if other != p:
                            # see if other can be replaced by p
                            self.try_to_replace(p, other, problems)

        dists = set(self.dists.values())
        for dist in dists:
            dist.build_time_dependency = dist not in install_dists
            if dist.build_time_dependency:
                logger.debug('%s is a build-time dependency only.',
                             dist.name_and_version)
        logger.debug('find done for %s', odist)
        return dists, problems
python3.3/site-packages/pip/_vendor/distlib/_backport/__pycache__/shutil.cpython-33.pyc000064400000073165151733566750025054 0ustar00�
7�Re2dc-@s�dZddlZddlZddlZddlmZddlZddlZddlZddl	m
Z
yddlZdcZ
Wnek
r�ddZ
YnXyddlmZWnek
r�dZYnXyddlmZWnek
r�dZYnXdd	d
ddd
dddddddddddddddgZGdd�de�ZGdd�de�ZGdd�de�ZGd d!�d!e�ZGd"d#�d#e�ZyeWnek
r�dZYnXded&d�Zd'd(�Z d)d	�Z!d*d
�Z"d+d�Z#d,d�Z$d-d
�Z%d.d�Z&ddde%ddd/d�Z'dddd0d�Z(d1d2�Z)d3d�Z*d4d5�Z+d6d7�Z,d8d9�Z-d:dddddd;d<�Z.ddddd=d>�Z/dddd?d@�Z0ie.dfgdBfdC6e.dggdEfdF6e.dhgdGfdH6e0gdIfdJ6Z1e
rOe.digdEfe1dF<ndKd�Z2ddLdMd�Z3dNd�Z4ddddddddOd�Z5dPd�Z6dQdR�Z7ddLdSd�Z8dTd�Z9dUdV�Z:dWdX�Z;dYdZ�Z<id[d\ge<gdBfdC6d]ge<gdGfdH6d^ge;gdIfdJ6Z=e
rad_ge<gdEfe=dF<nd`da�Z>dddbd�Z?dS(ju�Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.

iN(uabspathi(utarfile(ugetpwnam(ugetgrnamucopyfileobjucopyfileucopymodeucopystatucopyucopy2ucopytreeumoveurmtreeuErroruSpecialFileErroru	ExecErrorumake_archiveuget_archive_formatsuregister_archive_formatuunregister_archive_formatuget_unpack_formatsuregister_unpack_formatuunregister_unpack_formatuunpack_archiveuignore_patternscBs|EeZdZdS(uErrorN(u__name__u
__module__u__qualname__(u
__locals__((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuError,scBs|EeZdZdZdS(uSpecialFileErroru|Raised when trying to do a kind of operation (e.g. copying) which is
    not supported on a special file (e.g. a named pipe)N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuSpecialFileError/scBs|EeZdZdZdS(u	ExecErroru+Raised when a command could not be executedN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu	ExecError3scBs|EeZdZdZdS(u	ReadErroru%Raised when an archive cannot be readN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu	ReadError6su	ReadErrorcBs|EeZdZdZdS(u
RegistryErroruXRaised when a registery operation with the archiving
    and unpacking registeries failsN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu
RegistryError9su
RegistryErroriicCs0x)|j|�}|sPn|j|�qdS(u=copy data from file-like object fsrc to file-like object fdstN(ureaduwrite(ufsrcufdstulengthubuf((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyucopyfileobjCs
cCsttjd�rEytjj||�SWqEtk
rAdSYqEXntjjtjj|��tjjtjj|��kS(NusamefileF(uhasattruosupathusamefileuOSErroruFalseunormcaseuabspath(usrcudst((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu	_samefileKs
u	_samefilecCs�t||�r(td||f��nxa||gD]S}ytj|�}Wntk
rbYq5Xtj|j�r5td|��q5q5Wt|d��,}t|d��}t	||�WdQXWdQXdS(uCopy data from src to dstu`%s` and `%s` are the same fileu`%s` is a named pipeurbuwbN(
u	_samefileuErroruosustatuOSErroruS_ISFIFOust_modeuSpecialFileErroruopenucopyfileobj(usrcudstufnustufsrcufdst((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyucopyfileWs
cCsGttd�rCtj|�}tj|j�}tj||�ndS(uCopy mode bits from src to dstuchmodN(uhasattruosustatuS_IMODEust_modeuchmod(usrcudstustumode((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyucopymodekscCs�tj|�}tj|j�}ttd�rOtj||j|jf�nttd�rqtj||�nttd�r�t|d�r�ytj	||j
�Wq�tk
r�}z-ttd�s�|jtj
kr��nWYdd}~Xq�XndS(uCCopy all stat info (mode bits, atime, mtime, flags) from src to dstuutimeuchmoduchflagsust_flagsu
EOPNOTSUPPN(uosustatuS_IMODEust_modeuhasattruutimeust_atimeust_mtimeuchmoduchflagsust_flagsuOSErroruerrnou
EOPNOTSUPP(usrcudstustumodeuwhy((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyucopystatrscCsTtjj|�r6tjj|tjj|��}nt||�t||�dS(uVCopy data and mode bits ("cp src dst").

    The destination may be a directory.

    N(uosupathuisdirujoinubasenameucopyfileucopymode(usrcudst((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyucopy�s$
cCsTtjj|�r6tjj|tjj|��}nt||�t||�dS(u]Copy data and all stat info ("cp -p src dst").

    The destination may be a directory.

    N(uosupathuisdirujoinubasenameucopyfileucopystat(usrcudst((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyucopy2�s$
cs�fdd�}|S(u�Function that can be used as copytree() ignore parameter.

    Patterns is a sequence of glob-style patterns
    that are used to exclude filescs:g}x'�D]}|jtj||��q
Wt|�S(N(uextendufnmatchufilteruset(upathunamesu
ignored_namesupattern(upatterns(u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_ignore_patterns�s
u)ignore_patterns.<locals>._ignore_patterns((upatternsu_ignore_patterns((upatternsu=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuignore_patterns�scCsCtj|�}|dk	r-|||�}n	t�}tj|�g}xk|D]c}	|	|krhqPntjj||	�}
tjj||	�}y�tjj|
�r�tj|
�}|r�tj	||�q6tjj
|�r�|r�wPn||
|�n8tjj|
�r)t|
||||�n
||
|�WqPt
k
rr}
z|j|
jd�WYdd}
~
XqPtk
r�}z!|j|
|t|�f�WYdd}~XqPXqPWyt||�Wn_tk
r)}z?tdk	r�t|t�r�n|j||t|�f�WYdd}~XnX|r?t
|��ndS(u�Recursively copy a directory tree.

    The destination directory must not already exist.
    If exception(s) occur, an Error is raised with a list of reasons.

    If the optional symlinks flag is true, symbolic links in the
    source tree result in symbolic links in the destination tree; if
    it is false, the contents of the files pointed to by symbolic
    links are copied. If the file pointed by the symlink doesn't
    exist, an exception will be added in the list of errors raised in
    an Error exception at the end of the copy process.

    You can set the optional ignore_dangling_symlinks flag to true if you
    want to silence this exception. Notice that this has no effect on
    platforms that don't support os.symlink.

    The optional ignore argument is a callable. If given, it
    is called with the `src` parameter, which is the directory
    being visited by copytree(), and `names` which is the list of
    `src` contents, as returned by os.listdir():

        callable(src, names) -> ignored_names

    Since copytree() is called recursively, the callable will be
    called once for each directory that is copied. It returns a
    list of names relative to the `src` directory that should
    not be copied.

    The optional copy_function argument is a callable that will be used
    to copy each file. It will be called with the source path and the
    destination path as arguments. By default, copy2() is used, but any
    function that supports the same signature (like copy()) can be used.

    iN(uosulistdiruNoneusetumakedirsupathujoinuislinkureadlinkusymlinkuexistsuisdirucopytreeuErroruextenduargsuEnvironmentErroruappendustrucopystatuOSErroruWindowsErroru
isinstance(usrcudstusymlinksuignoreu
copy_functionuignore_dangling_symlinksunamesu
ignored_namesuerrorsunameusrcnameudstnameulinktouerruwhy((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyucopytree�sD$	

&3/c$Cs�|rdd�}n|dkr0dd�}ny%tjj|�rTtd��nWn2tk
r�|tjj|tj��dSYnXg}ytj|�}Wn.tjk
r�|tj|tj��YnXx�|D]�}tjj	||�}ytj
|�j}Wntjk
r)d}YnXtj
|�rLt|||�q�ytj|�Wq�tjk
r�|tj|tj��Yq�Xq�Wytj|�Wn.tjk
r�|tj|tj��YnXdS(u�Recursively delete a directory tree.

    If ignore_errors is set, errors are ignored; otherwise, if onerror
    is set, it is called to handle the error with arguments (func,
    path, exc_info) where func is os.listdir, os.remove, or os.rmdir;
    path is the argument to that function that caused it to fail; and
    exc_info is a tuple returned by sys.exc_info().  If ignore_errors
    is false and onerror is None, an exception is raised.

    cWsdS(N((uargs((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuonerrorsurmtree.<locals>.onerrorcWs�dS(N((uargs((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuonerrorsu%Cannot call rmtree on a symbolic linkNi(uNoneuosupathuislinkuOSErrorusysuexc_infoulistdiruerrorujoinulstatust_modeustatuS_ISDIRurmtreeuremoveurmdir(upathu
ignore_errorsuonerrorunamesunameufullnameumode((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyurmtree�s>
	
"cCstjj|jtjj��S(N(uosupathubasenameurstripusep(upath((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu	_basename'su	_basenamecCs|}tjj|�r~t||�r;tj||�dStjj|t|��}tjj|�r~td|��q~nytj||�Wn�t	k
rtjj|�r�t
||�r�td||f��nt||dd�t
|�nt||�tj|�YnXdS(u�Recursively move a file or directory to another location. This is
    similar to the Unix "mv" command.

    If the destination is a directory or a symlink to a directory, the source
    is moved inside the directory. The destination path must not already
    exist.

    If the destination already exists but is not a directory, it may be
    overwritten depending on os.rename() semantics.

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed.
    A lot more could be done here...  A look at a mv.c shows a lot of
    the issues this implementation glosses over.

    Nu$Destination path '%s' already existsu.Cannot move a directory '%s' into itself '%s'.usymlinksT(uosupathuisdiru	_samefileurenameujoinu	_basenameuexistsuErroruOSErroru
_destinsrcucopytreeuTrueurmtreeucopy2uunlink(usrcudstureal_dst((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyumove,s$


cCsut|�}t|�}|jtjj�s@|tjj7}n|jtjj�sh|tjj7}n|j|�S(N(uabspathuendswithuosupathusepu
startswith(usrcudst((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu
_destinsrcTsu
_destinsrccCs_tdks|dkrdSyt|�}Wntk
rFd}YnX|dk	r[|dSdS(u"Returns a gid, given a group name.iN(ugetgrnamuNoneuKeyError(unameuresult((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_get_gid]s
u_get_gidcCs_tdks|dkrdSyt|�}Wntk
rFd}YnX|dk	r[|dSdS(u"Returns an uid, given a user name.iN(ugetpwnamuNoneuKeyError(unameuresult((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_get_uidis
u_get_uidugzipcsidd6dd6}idd6}	tr>d|d<d|	d<n|dk	rn||	krntdj|���n|d	|	j|d�}
tjj|
�}tjj|�s�|dk	r�|j	d
|�n|s�tj
|�q�n|dk	r|j	d�nt���t�������fdd
�}|s{t
j|
d||�}
z|
j|d|�Wd|
j�Xn|
S(u�Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", or None.

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_name' +  ".tar", possibly plus
    the appropriate compression extension (".gz", or ".bz2").

    Returns the output filename.
    ugzugzipuu.gzubz2ubzip2u.bz2uCbad value for 'compress', or compression format not supported : {0}u.tarucreating %suCreating tar archivecsF�dk	r!�|_�|_n�dk	rB�|_�|_n|S(N(uNoneugidugnameuuiduuname(utarinfo(ugidugroupuowneruuid(u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_set_uid_gid�s		u#_make_tarball.<locals>._set_uid_giduw|%sufilterN(uNoneu_BZ2_SUPPORTEDu
ValueErroruformatugetuosupathudirnameuexistsuinfoumakedirsu_get_uidu_get_gidutarfileuopenuadduclose(u	base_nameubase_dirucompressuverboseudry_runuownerugroupuloggerutar_compressionucompress_extuarchive_nameuarchive_diru_set_uid_gidutar((ugidugroupuowneruuidu=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu
_make_tarballus4


		u
_make_tarballcCs~|rd}nd}ddlm}ddlm}y |d|||gd|�Wn"|k
rytd�|�YnXdS(	Nu-ru-rqi(uDistutilsExecError(uspawnuzipudry_runukunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utility(udistutils.errorsuDistutilsExecErrorudistutils.spawnuspawnu	ExecError(ubase_diruzip_filenameuverboseudry_runu
zipoptionsuDistutilsExecErroruspawn((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_call_external_zip�s	 
	u_call_external_zipcCs�|d}tjj|�}tjj|�sf|dk	rM|jd|�n|sftj|�qfnyddl}Wntk
r�d}YnX|dkr�t	||||�n�|dk	r�|jd||�n|s�|j
|dd|j�}x�tj|�D]�\}	}
}xs|D]k}tjj
tjj|	|��}
tjj|
�r|j|
|
�|dk	r�|jd|
�q�qqWqW|j�n|S(	umCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises ExecError.  Returns the name of the output zip
    file.
    u.zipucreating %siNu#creating '%s' and adding '%s' to ituwucompressionuadding '%s'(uosupathudirnameuexistsuNoneuinfoumakedirsuzipfileuImportErroru_call_external_zipuZipFileuZIP_DEFLATEDuwalkunormpathujoinuisfileuwriteuclose(u	base_nameubase_diruverboseudry_runuloggeruzip_filenameuarchive_diruzipfileuzipudirpathudirnamesu	filenamesunameupath((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu
_make_zipfile�s8	

	

!
u
_make_zipfileucompressugzip'ed tar-fileugztarubzip2ubzip2'ed tar-fileubztaruuncompressed tar fileutaruZIP fileuzipcCs'dd�tj�D�}|j�|S(u�Returns a list of supported formats for archiving and unarchiving.

    Each element of the returned sequence is a tuple (name, description)
    cSs&g|]\}}||df�qS(i((u.0unameuregistry((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu
<listcomp>s	u'get_archive_formats.<locals>.<listcomp>(u_ARCHIVE_FORMATSuitemsusort(uformats((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuget_archive_formats�s	
ucCs�|dkrg}nt|tj�s:td|��nt|ttf�s^td��nxE|D]=}t|ttf�s�t|�dkretd��qeqeW|||ft|<dS(uuRegisters an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    uThe %s object is not callableu!extra_args needs to be a sequenceiu+extra_args elements are : (arg_name, value)N(	uNoneu
isinstanceucollectionsuCallableu	TypeErrorutupleulistulenu_ARCHIVE_FORMATS(unameufunctionu
extra_argsudescriptionuelement((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuregister_archive_formats		
(cCst|=dS(N(u_ARCHIVE_FORMATS(uname((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuunregister_archive_formatsc	Csltj�}	|d
k	rb|d
k	r7|jd|�ntjj|�}|sbtj|�qbn|d
krztj}ni|d6|d6}
yt|}Wn"t	k
r�t
d|��YnX|d}x"|dD]\}
}||
|
<q�W|dkr||
d<||
d	<nz||||
�}Wd
|d
k	rg|d
k	rW|jd|	�ntj|	�nX|S(u�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "bztar"
    or "gztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    uchanging into '%s'udry_runuloggeruunknown archive format '%s'iiuzipuownerugroupNuchanging back to '%s'(uosugetcwduNoneudebugupathuabspathuchdirucurdiru_ARCHIVE_FORMATSuKeyErroru
ValueError(u	base_nameuformaturoot_dirubase_diruverboseudry_runuownerugroupuloggerusave_cwdukwargsuformat_infoufuncuarguvalufilename((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyumake_archive s6



cCs'dd�tj�D�}|j�|S(u�Returns a list of supported formats for unpacking.

    Each element of the returned sequence is a tuple
    (name, extensions, description)
    cSs-g|]#\}}||d|df�qS(ii((u.0unameuinfo((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu
<listcomp>]s	u&get_unpack_formats.<locals>.<listcomp>(u_UNPACK_FORMATSuitemsusort(uformats((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuget_unpack_formatsWs	
c	Cs�i}x9tj�D]+\}}x|dD]}|||<q*WqWx=|D]5}||krId}t||||f��qIqIWt|tj�s�td��ndS(u+Checks what gets registered as an unpacker.iu!%s is already registered for "%s"u*The registered function must be a callableN(u_UNPACK_FORMATSuitemsu
RegistryErroru
isinstanceucollectionsuCallableu	TypeError(	u
extensionsufunctionu
extra_argsuexisting_extensionsunameuinfouextu	extensionumsg((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_check_unpack_optionsbs
	u_check_unpack_optionscCs?|dkrg}nt|||�||||ft|<dS(uMRegisters an unpack format.

    `name` is the name of the format. `extensions` is a list of extensions
    corresponding to the format.

    `function` is the callable that will be
    used to unpack archives. The callable will receive archives to unpack.
    If it's unable to handle an archive, it needs to raise a ReadError
    exception.

    If provided, `extra_args` is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_unpack_formats() function.
    N(uNoneu_check_unpack_optionsu_UNPACK_FORMATS(unameu
extensionsufunctionu
extra_argsudescription((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuregister_unpack_formatts	cCst|=dS(u+Removes the pack format from the registery.N(u_UNPACK_FORMATS(uname((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuunregister_unpack_format�scCs8tjj|�}tjj|�s4tj|�ndS(u1Ensure that the parent directory of `path` existsN(uosupathudirnameuisdirumakedirs(upathudirname((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_ensure_directory�su_ensure_directoryc	CsByddl}Wntk
r0td��YnX|j|�sStd|��n|j|�}z�x�|j�D]�}|j}|jd�srd|kr�qrntj	j
||jd��}|s�qrnt|�|j
d�sr|j|j�}t|d�}z|j|�Wd|j�~XqrqrWWd|j�XdS(u+Unpack zip `filename` to `extract_dir`
    iNu/zlib not supported, cannot unpack this archive.u%s is not a zip fileu/u..uwb(uzipfileuImportErroru	ReadErroru
is_zipfileuZipFileuinfolistufilenameu
startswithuosupathujoinusplitu_ensure_directoryuendswithureaduopenuwriteuclose(	ufilenameuextract_diruzipfileuzipuinfounameutargetudatauf((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_unpack_zipfile�s0
	

u_unpack_zipfilecCs^ytj|�}Wn%tjk
r:td|��YnXz|j|�Wd|j�XdS(u:Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`
    u/%s is not a compressed or uncompressed tar fileN(utarfileuopenuTarErroru	ReadErroru
extractalluclose(ufilenameuextract_dirutarobj((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_unpack_tarfile�su_unpack_tarfileu.tar.gzu.tgzu.taru.zipu.bz2cCsIxBtj�D]4\}}x%|dD]}|j|�r$|Sq$Wq
WdS(Ni(u_UNPACK_FORMATSuitemsuendswithuNone(ufilenameunameuinfou	extension((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu_find_unpack_format�s
u_find_unpack_formatcCs�|dkrtj�}n|dk	r�yt|}Wn'tk
r^tdj|���YnX|d}|||t|d��nbt|�}|dkr�t	dj|���nt|d}tt|d�}||||�dS(u�Unpack an archive.

    `filename` is the name of the archive.

    `extract_dir` is the name of the target directory, where the archive
    is unpacked. If not provided, the current working directory is used.

    `format` is the archive format: one of "zip", "tar", or "gztar". Or any
    other registered format. If not provided, unpack_archive will use the
    filename extension and see if an unpacker was registered for that
    extension.

    In case none is found, a ValueError is raised.
    uUnknown unpack format '{0}'iiuUnknown archive format '{0}'N(
uNoneuosugetcwdu_UNPACK_FORMATSuKeyErroru
ValueErroruformatudictu_find_unpack_formatu	ReadError(ufilenameuextract_diruformatuformat_infoufuncukwargs((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyuunpack_archive�s

TFi@(ucompressugzip(ucompressubzip2(ucompressN(ucompressubzip2(@u__doc__uosusysustatuos.pathuabspathufnmatchucollectionsuerrnouutarfileubz2uTrueu_BZ2_SUPPORTEDuImportErroruFalseupwdugetpwnamuNoneugrpugetgrnamu__all__uEnvironmentErroruErroruSpecialFileErroru	ExecErroru	ReadErroru	Exceptionu
RegistryErroruWindowsErroru	NameErrorucopyfileobju	_samefileucopyfileucopymodeucopystatucopyucopy2uignore_patternsucopytreeurmtreeu	_basenameumoveu
_destinsrcu_get_gidu_get_uidu
_make_tarballu_call_external_zipu
_make_zipfileu_ARCHIVE_FORMATSuget_archive_formatsuregister_archive_formatuunregister_archive_formatumake_archiveuget_unpack_formatsu_check_unpack_optionsuregister_unpack_formatuunregister_unpack_formatu_ensure_directoryu_unpack_zipfileu_unpack_tarfileu_UNPACK_FORMATSu_find_unpack_formatuunpack_archive(((u=/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/shutil.pyu<module>
s�



	
	Q1(		=/	
	6%
python3.3/site-packages/pip/_vendor/distlib/_backport/__pycache__/__init__.cpython-33.pyc000064400000000700151733566750025264 0ustar00�
7�Rec@s
dZdS(uModules copied from Python 3 standard libraries, for internal use only.

Individual classes and functions are found in d2._backport.misc.  Intended
usage is to always import things missing from 3.1 from that module: the
built-in/stdlib objects will be used if found.
N(u__doc__(((u?/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/distlib/_backport/__pycache__/tarfile.cpython-33.pyc000064400000272577151733566750025202 0ustar00�
7�Re�ic@sXddlmZdZdZdZdZdZdZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZyddlZddlZWnek
r�eZZYnXeefZyeef7ZWnek
rYnXd	d
ddgZejdd
kr5ddlZnddlZejZdZdZ e dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2d Z3d!Z4d"Z5dZ6d#Z7d$Z8e7Z9e'e(e)e*e-e.e/e+e,e0e1e2fZ:e'e(e/e2fZ;e0e1e2fZ<d%d&d'd(d)d*d+d,fZ=e>d%d&d+d,f�Z?ie@d-6e@d.6e@d(6eAd)6eAd*6eAd'6ZBd/ZCd0ZDd1ZEd2ZFd3ZGd4ZHd5ZId6ZJdZKd7ZLd8ZMd9ZNd:ZOd;ZPd<ZQd=ZRd$ZSd#ZTe	jUd>d?fkr+d@ZVnejW�ZVdAdB�ZXdCdD�ZYdEdF�ZZd<e9dGdH�Z[dIdJ�Z\edKdL�Z]eCdMfeDdNfeEdOfeFdPfeGdQfeHdRffeLdSffeMdTffeNeIBdUfeIdVfeNdWffeOdSffePdTffeQeJBdUfeJdVfeQdWffeRdSffeSdTffeTeKBdXfeKdYfeTdWfff
Z^dZd[�Z_Gd\d�de`�ZaGd]d^�d^ea�ZbGd_d`�d`ea�ZcGdadb�dbea�ZdGdcdd�ddea�ZeGdedf�dfea�ZfGdgdh�dhef�ZgGdidj�djef�ZhGdkdl�dlef�ZiGdmdn�dnef�ZjGdodp�dpef�ZkGdqdr�drel�ZmGdsdt�dtel�ZnGdudv�dvel�ZoGdwdx�dxel�ZpGdydz�dzel�ZqGd{d|�d|el�ZrGd}d
�d
el�ZsGd~d	�d	el�ZtGdd��d�el�Zud�d�ZveZwetjZdS(�i(uprint_functionu
$Revision$u0.9.0u"Lars Gustäbel (lars@gustaebel.de)u5$Date: 2011-02-25 17:42:01 +0200 (Fri, 25 Feb 2011) $u?$Id: tarfile.py 88586 2011-02-25 15:42:01Z marc-andre.lemburg $u4Gustavo Niemeyer, Niels Gustäbel, Richard Townsend.NuTarFileuTarInfou
is_tarfileuTarErrorisiisustar  sustar00idi�s0s1s2s3s4s5s6s7sLsKsSsxsgsXiiupathulinkpathusizeumtimeuuidugiduunameugnameuatimeuctimei�i�i`i@i iiiii�i@i iiiuntuceuutf-8cCs2|j||�}|d|�|t|�tS(u8Convert a string to a null-terminated bytes object.
    N(uencodeulenuNUL(usulengthuencodinguerrors((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyustn�sustncCs>|jd�}|dkr.|d|�}n|j||�S(u8Convert a null-terminated bytes object to a string.
    siNi����(ufindudecode(usuencodinguerrorsup((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyunts�suntscCs�|dtd�kr_y%tt|dd�p1dd�}Wq�tk
r[td��Yq�XnId}x@tt|�d�D](}|dK}|t||d�7}q|W|S(	u/Convert a number field to a python number.
    ii�uasciiustrictu0iuinvalid headeri(uchruintuntsu
ValueErroruInvalidHeaderErrorurangeulenuord(usunui((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyunti�s%

unticCs�d|kod|dknrHd|d|fjd�t}n�|tksh|d|dkrwtd��n|dkr�tjdtjd	|��d}nt�}x6t|d�D]$}|j	d|d
@�|dL}q�W|j	dd�|S(u/Convert a python number to a number field.
    iiiu%0*ouasciiiuoverflow in number fielduLuli�i�(
uencodeuNULu
GNU_FORMATu
ValueErrorustructuunpackupacku	bytearrayurangeuinsert(unudigitsuformatusui((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuitn�s	$$ %	uitncCs�dttjd|dd��tjd|dd���}dttjd|dd��tjd	|dd���}||fS(
u�Calculate the checksum for a member's header by summing up all
       characters except for the chksum field which is treated as if
       it was filled with spaces. According to the GNU tar sources,
       some tars (Sun and NeXT) calculate chksum with signed char,
       which will be different if there are chars in the buffer with
       the high bit set. So we calculate two checksums, unsigned and
       signed.
    iu148BNi�u356Bi�iu148bu356b(usumustructuunpack(ubufuunsigned_chksumu
signed_chksum((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyucalc_chksums�s	@@ucalc_chksumscCs|dkrdS|dkrLx)|jd�}|s8Pn|j|�qdSd}t||�\}}xQt|�D]C}|j|�}t|�|kr�td��n|j|�qtW|dkr|j|�}t|�|kr�td��n|j|�ndS(ujCopy length bytes from fileobj src to fileobj dst.
       If length is None, copy the entire content.
    iNiiuend of file reachedi@i@(uNoneureaduwriteudivmodurangeulenuIOError(usrcudstulengthubufuBUFSIZEublocksu	remainderub((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyucopyfileobjs,ucopyfileobjulu-ubuducupuruwusuSuxutuTcCsig}xStD]K}xB|D]-\}}||@|kr|j|�PqqW|jd�q
Wdj|�S(ucConvert a file's mode to a string of the form
       -rwxrwxrwx.
       Used by TarFile.list()
    u-u(ufilemode_tableuappendujoin(umodeupermutableubituchar((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyufilemode8s

ufilemodecBs|EeZdZdZdS(uTarErroruBase exception.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuTarErrorGscBs|EeZdZdZdS(uExtractErroru%General exception for extract errors.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuExtractErrorJsuExtractErrorcBs|EeZdZdZdS(u	ReadErroru%Exception for unreadble tar archives.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu	ReadErrorMsu	ReadErrorcBs|EeZdZdZdS(uCompressionErroru.Exception for unavailable compression methods.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuCompressionErrorPsuCompressionErrorcBs|EeZdZdZdS(uStreamErroru=Exception for unsupported operations on stream-like TarFiles.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuStreamErrorSsuStreamErrorcBs|EeZdZdZdS(uHeaderErroru!Base exception for header errors.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuHeaderErrorVsuHeaderErrorcBs|EeZdZdZdS(uEmptyHeaderErroruException for empty headers.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuEmptyHeaderErrorYsuEmptyHeaderErrorcBs|EeZdZdZdS(uTruncatedHeaderErroru Exception for truncated headers.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuTruncatedHeaderError\suTruncatedHeaderErrorcBs|EeZdZdZdS(uEOFHeaderErroru"Exception for end of file headers.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuEOFHeaderError_suEOFHeaderErrorcBs|EeZdZdZdS(uInvalidHeaderErroruException for invalid headers.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuInvalidHeaderErrorbsuInvalidHeaderErrorcBs|EeZdZdZdS(uSubsequentHeaderErroru3Exception for missing and invalid extended headers.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuSubsequentHeaderErroresuSubsequentHeaderErrorcBsJ|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S(u
_LowLevelFileu�Low-level file object. Supports reading and writing.
       It is used instead of a regular file object for streaming
       access.
    cCsgitjd6tjtjBtjBd6|}ttd�rK|tjO}ntj||d�|_dS(NuruwuO_BINARYi�(	uosuO_RDONLYuO_WRONLYuO_CREATuO_TRUNCuhasattruO_BINARYuopenufd(uselfunameumode((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__rs
u_LowLevelFile.__init__cCstj|j�dS(N(uosucloseufd(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuclose{su_LowLevelFile.closecCstj|j|�S(N(uosureadufd(uselfusize((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuread~su_LowLevelFile.readcCstj|j|�dS(N(uosuwriteufd(uselfus((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuwrite�su_LowLevelFile.writeN(u__name__u
__module__u__qualname__u__doc__u__init__ucloseureaduwrite(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
_LowLevelFilels
	u
_LowLevelFilecBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zddd�Zddd�Zdd�Zdd�ZdS(u_Streamu�Class that serves as an adapter between TarFile and
       a stream-like object.  The stream-like object only
       needs to have a read() or write() method and is accessed
       blockwise.  Use of gzip or bzip2 compression is possible.
       A stream-like object could be for example: sys.stdin,
       sys.stdout, a socket, a tape device etc.

       _Stream is intended to be used only internally.
    cCs�d|_|dkr0t||�}d|_n|dkrWt|�}|j�}n|p`d|_||_||_	||_
||_d|_d|_
d|_y�|dkr&yddl}Wntk
r�td��YnX||_|jd�|_|dkr|j�q&|j�n|d	kr�yddl}Wntk
rbtd
��YnX|dkr�d|_|j�|_q�|j�|_nWn-|js�|j
j�nd|_�YnXdS(
u$Construct a _Stream object.
        u*usiugzNuzlib module is not availableurubz2ubz2 module is not availableTF(uTrueu_extfileobjuNoneu
_LowLevelFileuFalseu_StreamProxyugetcomptypeunameumodeucomptypeufileobjubufsizeubufuposucloseduzlibuImportErroruCompressionErrorucrc32ucrcu
_init_read_gzu_init_write_gzubz2udbufuBZ2Decompressorucmpu
BZ2Compressoruclose(uselfunameumodeucomptypeufileobjubufsizeuzlibubz2((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__�sP								
	


			u_Stream.__init__cCs*t|d�r&|jr&|j�ndS(Nuclosed(uhasattrucloseduclose(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__del__�su_Stream.__del__cCs�|jjd|jj|jj|jjd�|_tjdtt	j	���}|j
d|d�|jjd�r�|jdd�|_n|j
|jj
d	d
�t�dS(u6Initialize for writing with gzip compression.
        i	iu<Ls�s�u.gzNiu
iso-8859-1ureplacei����(uzlibucompressobjuDEFLATEDu	MAX_WBITSu
DEF_MEM_LEVELucmpustructupackuintutimeu_Stream__writeunameuendswithuencodeuNUL(uselfu	timestamp((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_init_write_gz�s
	u_Stream._init_write_gzcCsw|jdkr-|jj||j�|_n|jt|�7_|jdkrf|jj|�}n|j|�dS(u&Write string s to the stream.
        ugzutarN(	ucomptypeuzlibucrc32ucrcuposulenucmpucompressu_Stream__write(uselfus((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuwrite�su
_Stream.writecCsk|j|7_xUt|j�|jkrf|jj|jd|j��|j|jd�|_qWdS(u]Write string s to the stream if a whole new block
           is ready to be written.
        N(ubufulenubufsizeufileobjuwrite(uselfus((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__write�s u_Stream.__writecCs�|jr
dS|jdkrF|jdkrF|j|jj�7_n|jdkr�|jr�|jj|j�d|_|jdkr�|jjtj	d|j
d@��|jjtj	d|jd@��q�n|js�|jj
�nd|_dS(	u[Close the _Stream object. No operation should be
           done on it afterwards.
        Nuwutarsugzu<Ll��T(uclosedumodeucomptypeubufucmpuflushufileobjuwriteustructupackucrcuposu_extfileobjucloseuTrue(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuclose�s		#)	u
_Stream.closecCse|jj|jj�|_d|_|jd�dkrItd��n|jd�dkrmtd��nt|jd��}|jd�|d	@r�t|jd��d
t|jd��}|j	|�n|d@rx,|jd�}|s|t
kr�Pq�q�n|d@rGx,|jd�}|s=|t
krPqqn|d@ra|jd�nd
S(u:Initialize for reading a gzip compressed fileobj.
        sis�unot a gzip fileisuunsupported compression methodiiiiiN(uzlibu
decompressobju	MAX_WBITSucmpudbufu
_Stream__readu	ReadErroruCompressionErroruordureaduNUL(uselfuflaguxlenus((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
_init_read_gzs.	

,




u_Stream._init_read_gzcCs|jS(u3Return the stream's file pointer position.
        (upos(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyutell#su_Stream.tellicCs|||jdkrit||j|j�\}}x$t|�D]}|j|j�q?W|j|�ntd��|jS(uXSet the stream's file pointer to pos. Negative seeking
           is forbidden.
        iu seeking backwards is not allowed(uposudivmodubufsizeurangeureaduStreamError(uselfuposublocksu	remainderui((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuseek(su_Stream.seekcCs{|dkrSg}x,|j|j�}|s1Pn|j|�qdj|�}n|j|�}|jt|�7_|S(u�Return the next size number of bytes from the stream.
           If size is not defined, return all bytes of the stream
           up to EOF.
        uN(uNoneu_readubufsizeuappendujoinuposulen(uselfusizeutubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuread5su_Stream.readcCs�|jdkr|j|�St|j�}x�||kr�|j|j�}|sVPny|jj|�}Wntk
r�td��YnX|j|7_|t|�7}q.W|jd|�}|j|d�|_|S(u+Return size bytes from the stream.
        utaruinvalid compressed dataN(	ucomptypeu
_Stream__readulenudbufubufsizeucmpu
decompressuIOErroru	ReadError(uselfusizeucubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_readGs 

u
_Stream._readcCs�t|j�}xN||kr_|jj|j�}|s=Pn|j|7_|t|�7}qW|jd|�}|j|d�|_|S(usReturn size bytes from stream. If internal buffer is empty,
           read another block from the stream.
        N(ulenubufufileobjureadubufsize(uselfusizeucubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__read\su_Stream.__readN(u__name__u
__module__u__qualname__u__doc__u__init__u__del__u_init_write_gzuwriteu_Stream__writeucloseu
_init_read_gzutelluseekuNoneureadu_readu
_Stream__read(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_Stream�s	4
	
u_StreamcBsJ|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S(u_StreamProxyusSmall proxy class that enables transparent compression
       detection for the Stream interface (mode 'r|*').
    cCs"||_|jjt�|_dS(N(ufileobjureadu	BLOCKSIZEubuf(uselfufileobj((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__qs	u_StreamProxy.__init__cCs|jj|_|jS(N(ufileobjureadubuf(uselfusize((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyureadusu_StreamProxy.readcCs0|jjd�rdS|jjd�r,dSdS(Ns�ugzsBZh91ubz2utar(ubufu
startswith(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyugetcomptypeys
u_StreamProxy.getcomptypecCs|jj�dS(N(ufileobjuclose(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuclose�su_StreamProxy.closeN(u__name__u
__module__u__qualname__u__doc__u__init__ureadugetcomptypeuclose(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_StreamProxyls
u_StreamProxycBst|EeZdZdZdZdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS(u	_BZ2ProxyuSmall proxy class that enables external file object
       support for "r:bz2" and "w:bz2" modes. This is actually
       a workaround for a limitation in bz2 module's BZ2File
       class which (unlike gzip.GzipFile) has no support for
       a file object argument.
    iicCs8||_||_t|jdd�|_|j�dS(Nuname(ufileobjumodeugetattruNoneunameuinit(uselfufileobjumode((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__�s		u_BZ2Proxy.__init__cCsbddl}d|_|jdkrO|j�|_|jjd�d|_n|j�|_dS(Niurs(	ubz2uposumodeuBZ2Decompressorubz2objufileobjuseekubufu
BZ2Compressor(uselfubz2((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuinit�s	u_BZ2Proxy.initcCs�t|j�}x`||krq|jj|j�}|s=Pn|jj|�}|j|7_|t|�7}qW|jd|�}|j|d�|_|jt|�7_|S(N(ulenubufufileobjureadu	blocksizeubz2obju
decompressupos(uselfusizeuxurawudataubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuread�su_BZ2Proxy.readcCs4||jkr|j�n|j||j�dS(N(uposuinituread(uselfupos((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuseek�s
u_BZ2Proxy.seekcCs|jS(N(upos(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyutell�su_BZ2Proxy.tellcCs;|jt|�7_|jj|�}|jj|�dS(N(uposulenubz2objucompressufileobjuwrite(uselfudatauraw((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuwrite�su_BZ2Proxy.writecCs5|jdkr1|jj�}|jj|�ndS(Nuw(umodeubz2objuflushufileobjuwrite(uselfuraw((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuclose�su_BZ2Proxy.closeNi@(u__name__u
__module__u__qualname__u__doc__u	blocksizeu__init__uinitureaduseekutelluwriteuclose(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu	_BZ2Proxy�s
u	_BZ2ProxycBs\|EeZdZdZddd�Zdd�Zdd�Zdd	�Zdd
d�Z	dS(
u_FileInFileuA thin wrapper around an existing file object that
       provides a part of its data as an individual file
       object.
    cCs||_||_||_d|_|dkrBd|fg}nd|_g|_d}|j}xs|D]k\}}||kr�|jjd||df�n|jjd||||f�||7}||}qjW||jkr
|jjd||jdf�ndS(NiFT(
ufileobjuoffsetusizeupositionuNoneu	map_indexumapuappenduFalseuTrue(uselfufileobjuoffsetusizeu	blockinfoulastposurealpos((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__�s$							 
u_FileInFile.__init__cCs#t|jd�sdS|jj�S(NuseekableT(uhasattrufileobjuTrueuseekable(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuseekable�su_FileInFile.seekablecCs|jS(u*Return the current file position.
        (uposition(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyutell�su_FileInFile.tellcCs
||_dS(u(Seek to a position in the file.
        N(uposition(uselfuposition((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuseek�su_FileInFile.seekcCsD|dkr|j|j}nt||j|j�}d}x�|dkr?xu|j|j\}}}}||jko�|knr�PqP|jd7_|jt|j�krPd|_qPqPt|||j�}|r|jj||j|�||jj	|�7}n|t
|7}||8}|j|7_qAW|S(u!Read data from the file.
        siiN(uNoneusizeupositionuminumapu	map_indexulenufileobjuseekureaduNUL(uselfusizeubufudataustartustopuoffsetulength((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuread�s(
u_FileInFile.readN(
u__name__u
__module__u__qualname__u__doc__uNoneu__init__useekableutelluseekuread(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_FileInFile�su_FileInFilecBs�|EeZdZdZdZdd�Zdd�Zdd�Zd	d
�Zddd�Z
e
Zddd�Zdd�Z
dd�Zejdd�Zdd�Zdd�ZdS(uExFileObjectuaFile-like object for reading an archive member.
       Is returned by TarFile.extractfile().
    icCsdt|j|j|j|j�|_|j|_d|_d|_|j|_d|_	d|_
dS(NurisF(u_FileInFileufileobjuoffset_datausizeusparseunameumodeuFalseuclosedupositionubuffer(uselfutarfileutarinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__s				uExFileObject.__init__cCsdS(NT(uTrue(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyureadable!suExFileObject.readablecCsdS(NF(uFalse(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuwritable$suExFileObject.writablecCs
|jj�S(N(ufileobjuseekable(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuseekable'suExFileObject.seekablecCs�|jrtd��nd}|jrt|dkrH|j}d|_qt|jd|�}|j|d�|_n|dkr�||jj�7}n ||jj|t|��7}|jt|�7_|S(u~Read at most size bytes from the file. If size is not
           present or None, read all data until EOF is reached.
        uI/O operation on closed filesN(uclosedu
ValueErrorubufferuNoneufileobjureadulenuposition(uselfusizeubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuread*s			 uExFileObject.readicCs|jrtd��n|jjd�d}|dkr�xu|jj|j�}|j|7_|std|kr=|jjd�d}|dkr�t|j�}nPq=q=n|dkr�t||�}n|jd|�}|j|d�|_|j	t|�7_	|S(u�Read one entire line from the file. If size is present
           and non-negative, return a string with at most that
           size, which may be an incomplete line.
        uI/O operation on closed files
iiNi����(
uclosedu
ValueErrorubufferufindufileobjureadu	blocksizeulenuminuposition(uselfusizeuposubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyureadlineEs$	
uExFileObject.readlinecCs3g}x&|j�}|sPn|j|�q	|S(u0Return a list with all remaining lines.
        (ureadlineuappend(uselfuresultuline((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu	readlinesbsuExFileObject.readlinescCs|jrtd��n|jS(u*Return the current file position.
        uI/O operation on closed file(uclosedu
ValueErroruposition(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyutellls	uExFileObject.tellcCs|jrtd��n|tjkrHtt|d�|j�|_n�|tjkr�|dkrt|j|d�|_q�t|j||j�|_nC|tj	kr�tt|j||j�d�|_ntd��d|_
|jj|j�dS(u(Seek to a position in the file.
        uI/O operation on closed fileiuInvalid argumentsN(
uclosedu
ValueErroruosuSEEK_SETuminumaxusizeupositionuSEEK_CURuSEEK_ENDubufferufileobjuseek(uselfuposuwhence((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuseekts	!(	uExFileObject.seekcCs
d|_dS(uClose the file object.
        NT(uTrueuclosed(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuclose�suExFileObject.closeccs%x|j�}|sPn|VqdS(u/Get an iterator over the file's lines.
        N(ureadline(uselfuline((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__iter__�s
uExFileObject.__iter__Ni����(u__name__u
__module__u__qualname__u__doc__u	blocksizeu__init__ureadableuwritableuseekableuNoneureaduread1ureadlineu	readlinesutelluosuSEEK_SETuseekucloseu__iter__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuExFileObjects

uExFileObjectcBsT|EeZdZdZdiZddd�Zdd�Zdd�Zeee�Z	dd�Z
dd �Zee
e�Zd!d"�Z
d#d$�Zeed%d&d'�Zd(d)�Zd*d+�Zd,d-�Zed.d/��Zd0d1�Zed2d3��Zed4d5��Zed6d7��Zed8d9��Zed:d;��Zed<d=��Zd>d?�Zd@dA�Z dBdC�Z!dDdE�Z"dFdG�Z#dHdI�Z$dJdK�Z%dLdM�Z&dNdO�Z'dPdQ�Z(dRdS�Z)dTdU�Z*dVdW�Z+dXdY�Z,dZd[�Z-d\d]�Z.d^d_�Z/d`da�Z0dbdc�Z1ddde�Z2dfdg�Z3dhS(juTarInfouInformational class which holds the details about an
       archive member given by a tar header block.
       TarInfo objects are returned by TarFile.getmember(),
       TarFile.getmembers() and TarFile.gettarinfo() and are
       usually created internally.
    unameumodeuuidugidusizeumtimeuchksumutypeulinknameuunameugnameudevmajorudevminoruoffsetuoffset_dataupax_headersusparseutarfileu_sparse_structsu_link_targetucCs�||_d|_d|_d|_d|_d|_d|_t|_d|_	d|_
d|_d|_d|_
d|_d|_d|_i|_dS(uXConstruct a TarInfo object. name is the optional name
           of the member.
        i�iuN(unameumodeuuidugidusizeumtimeuchksumuREGTYPEutypeulinknameuunameugnameudevmajorudevminoruoffsetuoffset_datauNoneusparseupax_headers(uselfuname((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__�s"																uTarInfo.__init__cCs|jS(N(uname(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_getpath�suTarInfo._getpathcCs
||_dS(N(uname(uselfuname((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_setpath�suTarInfo._setpathcCs|jS(N(ulinkname(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_getlinkpath�suTarInfo._getlinkpathcCs
||_dS(N(ulinkname(uselfulinkname((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_setlinkpath�suTarInfo._setlinkpathcCs d|jj|jt|�fS(Nu<%s %r at %#x>(u	__class__u__name__unameuid(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__repr__�suTarInfo.__repr__cCs�i
|jd6|jd@d6|jd6|jd6|jd6|jd6|jd6|jd	6|jd
6|j	d6|j
d6|jd
6|jd6}|d	t
kr�|djd�r�|dd7<n|S(u9Return the TarInfo's attributes as a dictionary.
        unamei�umodeuuidugidusizeumtimeuchksumutypeulinknameuunameugnameudevmajorudevminoru/(unameumodeuuidugidusizeumtimeuchksumutypeulinknameuunameugnameudevmajorudevminoruDIRTYPEuendswith(uselfuinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuget_info�s"











$uTarInfo.get_infousurrogateescapecCsv|j�}|tkr+|j|||�S|tkrJ|j|||�S|tkrf|j||�Std��dS(u<Return a tar header as a string of 512 byte blocks.
        uinvalid formatN(uget_infouUSTAR_FORMATucreate_ustar_headeru
GNU_FORMATucreate_gnu_headeru
PAX_FORMATucreate_pax_headeru
ValueError(uselfuformatuencodinguerrorsuinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyutobuf�su
TarInfo.tobufcCst|d<t|d�tkr/td��nt|d�tkri|j|d�\|d<|d<n|j|t||�S(u3Return the object as a ustar header block.
        umagiculinknameulinkname is too longunameuprefix(uPOSIX_MAGICulenuLENGTH_LINKu
ValueErroruLENGTH_NAMEu_posix_split_nameu_create_headeruUSTAR_FORMAT(uselfuinfouencodinguerrors((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyucreate_ustar_header�s
$uTarInfo.create_ustar_headercCs�t|d<d}t|d�tkrI||j|dt||�7}nt|d�tkr�||j|dt||�7}n||j|t||�S(u:Return the object as a GNU header block sequence.
        umagicsulinknameuname(	u	GNU_MAGICulenuLENGTH_LINKu_create_gnu_long_headeruGNUTYPE_LONGLINKuLENGTH_NAMEuGNUTYPE_LONGNAMEu_create_headeru
GNU_FORMAT(uselfuinfouencodinguerrorsubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyucreate_gnu_headers
##uTarInfo.create_gnu_headerc
Cs�t|d<|jj�}x�ddtfddtfddfD]�\}}}||kr_q>ny||jd	d
�Wn#tk
r�||||<w>YnXt||�|kr>||||<q>q>Wx�dD]�\}}||kr�d||<q�n||}d|ko d|dkns5t|t	�r�t
|�||<d||<q�q�W|rt|j|t|�}	nd}	|	|j
|td	d�S(u�Return the object as a ustar header block. If it cannot be
           represented this way, prepend a pax extended header sequence
           with supplement information.
        umagicunameupathulinknameulinkpathuunamei ugnameuasciiustrictuuidiugidusizeiumtimeiisureplace(uunameuunamei (ugnameugnamei (uuidi(ugidi(usizei(umtimei((uuidi(ugidi(usizei(umtimei(uPOSIX_MAGICupax_headersucopyuLENGTH_NAMEuLENGTH_LINKuencodeuUnicodeEncodeErrorulenu
isinstanceufloatustru_create_pax_generic_headeruXHDTYPEu_create_headeruUSTAR_FORMAT(
uselfuinfouencodingupax_headersunameuhnameulengthudigitsuvalubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyucreate_pax_headers4



4uTarInfo.create_pax_headercCs|j|td�S(uAReturn the object as a pax global header block sequence.
        uutf8(u_create_pax_generic_headeruXGLTYPE(uclsupax_headers((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyucreate_pax_global_headerDsu TarInfo.create_pax_global_headercCs�|dtd�}x*|r@|ddkr@|dd�}qW|t|�d�}|dd�}|s�t|�tkr�td��n||fS(uUSplit a name longer than 100 chars into a prefix
           and a name part.
        Niu/uname is too longi����i����i����(u
LENGTH_PREFIXulenuLENGTH_NAMEu
ValueError(uselfunameuprefix((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_posix_split_nameJsuTarInfo._posix_split_namecCs�t|jdd�d||�t|jdd�d@d|�t|jdd�d|�t|jd	d�d|�t|jd
d�d|�t|jdd�d|�d
|jdt�t|jdd�d||�|jdt�t|jdd�d||�t|jdd�d||�t|jdd�d|�t|jdd�d|�t|jdd�d||�g}tjdtdj|��}t	|td��d}|dd�d|j
d�|d d�}|S(!u�Return a header block. info is a dictionary with file
           information, format must be one of the *_FORMAT constants.
        unameuidumodeii�iuuidugidusizeiumtimes        utypeulinknameumagicuunamei ugnameudevmajorudevminoruprefixi�u%dssNilu%06ouasciiiei����i����(ustnugetuitnuREGTYPEuPOSIX_MAGICustructupacku	BLOCKSIZEujoinucalc_chksumsuencode(uinfouformatuencodinguerrorsupartsubufuchksum((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_create_headerYs&$/uTarInfo._create_headercCs@tt|�t�\}}|dkr<|t|t7}n|S(udReturn the string payload filled with zero bytes
           up to the next 512 byte border.
        i(udivmodulenu	BLOCKSIZEuNUL(upayloadublocksu	remainder((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_create_payloadusuTarInfo._create_payloadcCsm|j||�t}i}d|d<||d<t|�|d<t|d<|j|t||�|j|�S(uTReturn a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
           for name.
        u
././@LongLinkunameutypeusizeumagic(uencodeuNULulenu	GNU_MAGICu_create_headeruUSTAR_FORMATu_create_payload(uclsunameutypeuencodinguerrorsuinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_create_gnu_long_headers


uTarInfo._create_gnu_long_headercCs�d}xJ|j�D]<\}}y|jdd�Wqtk
rNd}PYqXqWd}|rl|d7}nx�|j�D]�\}}|jd�}|r�|j|d�}n|jd�}t|�t|�d}d}	}
x/|tt|
��}	|	|
krPn|	}
q�|tt|
�d�d	|d
|d7}qyWi}d|d
<||d<t|�|d<t|d<|j	|t
dd�|j|�S(u�Return a POSIX.1-2008 extended or global header sequence
           that contains a list of keyword, value pairs. The values
           must be strings.
        uutf8ustrictss21 hdrcharset=BINARY
usurrogateescapeiiuasciis s=s
u././@PaxHeaderunameutypeusizeumagicureplaceFT(uFalseuitemsuencodeuUnicodeEncodeErroruTrueulenustrubytesuPOSIX_MAGICu_create_headeruUSTAR_FORMATu_create_payload(uclsupax_headersutypeuencodingubinaryukeyworduvalueurecordsulunupuinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_create_pax_generic_header�s<



	1


u"TarInfo._create_pax_generic_headerc
Csft|�dkr!td��nt|�tkrBtd��n|jt�tkrftd��nt|dd��}|t|�kr�t	d��n|�}t
|dd�||�|_t|dd	��|_t|d	d
��|_
t|d
d��|_t|dd��|_t|dd��|_||_|dd
�|_t
|d
d�||�|_t
|dd�||�|_t
|dd�||�|_t|dd��|_t|dd��|_t
|dd�||�}|jtkr6|jjd�r6t|_n|jtkrd}g}x�td�D]u}	y<t|||d��}
t||d|d��}Wntk
r�PYnX|j|
|f�|d7}q^Wt|d�}t|dd��}
|||
f|_ n|j!�r6|jj"d�|_n|rb|jt#krb|d|j|_n|S(uAConstruct a TarInfo object from a 512 byte bytes object.
        iuempty headerutruncated headeruend of file headeri�i�ubad checksumidiliti|i�i�ii	i)iIiQiYi�u/i�iiii�i�i�($ulenuEmptyHeaderErroru	BLOCKSIZEuTruncatedHeaderErrorucountuNULuEOFHeaderErroruntiucalc_chksumsuInvalidHeaderErroruntsunameumodeuuidugidusizeumtimeuchksumutypeulinknameuunameugnameudevmajorudevminoruAREGTYPEuendswithuDIRTYPEuGNUTYPE_SPARSEurangeu
ValueErroruappenduboolu_sparse_structsuisdirurstripu	GNU_TYPES(uclsubufuencodinguerrorsuchksumuobjuprefixuposustructsuiuoffsetunumbytesu
isextendeduorigsize((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyufrombuf�sZ		!"
uTarInfo.frombufcCsP|jjt�}|j||j|j�}|jj�t|_|j|�S(uOReturn the next TarInfo object from TarFile object
           tarfile.
        (	ufileobjureadu	BLOCKSIZEufrombufuencodinguerrorsutelluoffsetu_proc_member(uclsutarfileubufuobj((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyufromtarfilesuTarInfo.fromtarfilecCst|jttfkr"|j|�S|jtkr>|j|�S|jtttfkrc|j	|�S|j
|�SdS(uYChoose the right processing method depending on
           the type and call it.
        N(utypeuGNUTYPE_LONGNAMEuGNUTYPE_LONGLINKu
_proc_gnulonguGNUTYPE_SPARSEu_proc_sparseuXHDTYPEuXGLTYPEuSOLARIS_XHDTYPEu	_proc_paxu
_proc_builtin(uselfutarfile((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_proc_members


uTarInfo._proc_membercCsx|jj�|_|j}|j�s6|jtkrO||j|j�7}n||_|j	|j
|j|j�|S(ufProcess a builtin type or an unknown type which
           will be treated as a regular file.
        (
ufileobjutelluoffset_datauisregutypeuSUPPORTED_TYPESu_blockusizeuoffsetu_apply_pax_infoupax_headersuencodinguerrors(uselfutarfileuoffset((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
_proc_builtin$s		uTarInfo._proc_builtincCs�|jj|j|j��}y|j|�}Wntk
rQtd��YnX|j|_|jt	kr�t
||j|j�|_
n-|jtkr�t
||j|j�|_n|S(uSProcess the blocks that hold a GNU longname
           or longlink member.
        u missing or bad subsequent header(ufileobjureadu_blockusizeufromtarfileuHeaderErroruSubsequentHeaderErroruoffsetutypeuGNUTYPE_LONGNAMEuntsuencodinguerrorsunameuGNUTYPE_LONGLINKulinkname(uselfutarfileubufunext((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
_proc_gnulong5s
uTarInfo._proc_gnulongc

Cs&|j\}}}|`x�|r�|jjt�}d}x�td�D]�}y<t|||d��}t||d|d��}	Wntk
r�PYnX|r�|	r�|j||	f�n|d7}qFWt|d�}qW||_	|jj
�|_|j|j|j
�|_||_
|S(u8Process a GNU sparse header plus extra headers.
        iiiii�(u_sparse_structsufileobjureadu	BLOCKSIZEurangeuntiu
ValueErroruappenduboolusparseutelluoffset_datau_blockusizeuoffset(
uselfutarfileustructsu
isextendeduorigsizeubufuposuiuoffsetunumbytes((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_proc_sparseKs(	"
		uTarInfo._proc_sparsec
Cs�|jj|j|j��}|jtkr9|j}n|jj�}tj	d|�}|dk	r�|jd�jd�|d<n|j
d�}|dkr�|j}nd}tjd�}d}x�|j||�}|s�Pn|j�\}	}
t|	�}	||jd�d|jd�|	d�}|j|
dd|j�}
|
tkrz|j|||j|j�}n|j|dd|j�}|||
<||	7}q�y|j|�}Wntk
r�td	��YnXd
|kr�|j||�nbd|kr!|j|||�n@|j
d�d
kra|j
d�dkra|j|||�n|jttfkr�|j ||j|j�|j!|_!d|kr�|j"}
|j#�s�|jt$kr�|
|j|j�7}
n|
|_!q�n|S(uVProcess an extended or global header as described in
           POSIX.1-2008.
        s\d+ hdrcharset=([^\n]+)\niuutf8u
hdrcharsetuBINARYs(\d+) ([^=]+)=iiu missing or bad subsequent headeruGNU.sparse.mapuGNU.sparse.sizeuGNU.sparse.majoru1uGNU.sparse.minoru0usizeN(%ufileobjureadu_blockusizeutypeuXGLTYPEupax_headersucopyureusearchuNoneugroupudecodeugetuencodingucompileumatchugroupsuintuendustartu_decode_pax_fielduerrorsuPAX_NAME_FIELDSufromtarfileuHeaderErroruSubsequentHeaderErroru_proc_gnusparse_01u_proc_gnusparse_00u_proc_gnusparse_10uXHDTYPEuSOLARIS_XHDTYPEu_apply_pax_infouoffsetuoffset_datauisreguSUPPORTED_TYPES(uselfutarfileubufupax_headersumatchu
hdrcharsetuencodinguregexuposulengthukeyworduvalueunextuoffset((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu	_proc_paxgs`.	


*	uTarInfo._proc_paxcCs�g}x6tjd|�D]"}|jt|jd���qWg}x6tjd|�D]"}|jt|jd���qXWtt||��|_dS(u?Process a GNU tar extended sparse header, version 0.0.
        s\d+ GNU.sparse.offset=(\d+)\nis\d+ GNU.sparse.numbytes=(\d+)\nN(ureufinditeruappenduintugroupulistuzipusparse(uselfunextupax_headersubufuoffsetsumatchunumbytes((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_proc_gnusparse_00�s  uTarInfo._proc_gnusparse_00cCsVdd�|djd�D�}tt|ddd�|ddd���|_dS(u?Process a GNU tar extended sparse header, version 0.1.
        cSsg|]}t|��qS((uint(u.0ux((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
<listcomp>�s	u.TarInfo._proc_gnusparse_01.<locals>.<listcomp>uGNU.sparse.mapu,Nii(usplitulistuzipusparse(uselfunextupax_headersusparse((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_proc_gnusparse_01�s uTarInfo._proc_gnusparse_01cCs�d}g}|jjt�}|jdd�\}}t|�}xjt|�|dkr�d|kr�||jjt�7}n|jdd�\}}|jt|��qEW|jj�|_	t
t|ddd�|ddd���|_dS(u?Process a GNU tar extended sparse header, version 1.0.
        s
iiN(
uNoneufileobjureadu	BLOCKSIZEusplituintulenuappendutelluoffset_dataulistuzipusparse(uselfunextupax_headersutarfileufieldsusparseubufunumber((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_proc_gnusparse_10�suTarInfo._proc_gnusparse_10c
Csx�|j�D]�\}}|dkr8t|d|�q
|dkr]t|dt|��q
|dkr�t|dt|��q
|tkr
|tkr�yt||�}Wq�tk
r�d}Yq�Xn|dkr�|jd�}nt|||�q
q
W|j�|_dS(	uoReplace fields with supplemental information from a previous
           pax extended or global header.
        uGNU.sparse.nameupathuGNU.sparse.sizeusizeuGNU.sparse.realsizeiu/N(	uitemsusetattruintu
PAX_FIELDSuPAX_NUMBER_FIELDSu
ValueErrorurstripucopyupax_headers(uselfupax_headersuencodinguerrorsukeyworduvalue((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_apply_pax_info�s"
uTarInfo._apply_pax_infocCs=y|j|d�SWn"tk
r8|j||�SYnXdS(u1Decode a single field from a pax record.
        ustrictN(udecodeuUnicodeDecodeError(uselfuvalueuencodingufallback_encodingufallback_errors((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_decode_pax_fields
uTarInfo._decode_pax_fieldcCs0t|t�\}}|r(|d7}n|tS(u_Round up a byte count by BLOCKSIZE and return it,
           e.g. _block(834) => 1024.
        i(udivmodu	BLOCKSIZE(uselfucountublocksu	remainder((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_block
s
uTarInfo._blockcCs
|jtkS(N(utypeu
REGULAR_TYPES(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuisregsu
TarInfo.isregcCs
|j�S(N(uisreg(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuisfilesuTarInfo.isfilecCs
|jtkS(N(utypeuDIRTYPE(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuisdirsu
TarInfo.isdircCs
|jtkS(N(utypeuSYMTYPE(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuissymsu
TarInfo.issymcCs
|jtkS(N(utypeuLNKTYPE(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuislnksu
TarInfo.islnkcCs
|jtkS(N(utypeuCHRTYPE(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuischr su
TarInfo.ischrcCs
|jtkS(N(utypeuBLKTYPE(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuisblk"su
TarInfo.isblkcCs
|jtkS(N(utypeuFIFOTYPE(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuisfifo$suTarInfo.isfifocCs
|jdk	S(N(usparseuNone(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuissparse&suTarInfo.issparsecCs|jtttfkS(N(utypeuCHRTYPEuBLKTYPEuFIFOTYPE(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuisdev(su
TarInfo.isdevN(unameumodeuuidugidusizeumtimeuchksumutypeulinknameuunameugnameudevmajorudevminoruoffsetuoffset_dataupax_headersusparseutarfileu_sparse_structsu_link_target(4u__name__u
__module__u__qualname__u__doc__u	__slots__u__init__u_getpathu_setpathupropertyupathu_getlinkpathu_setlinkpathulinkpathu__repr__uget_infouDEFAULT_FORMATuENCODINGutobufucreate_ustar_headerucreate_gnu_headerucreate_pax_headeruclassmethoducreate_pax_global_headeru_posix_split_nameustaticmethodu_create_headeru_create_payloadu_create_gnu_long_headeru_create_pax_generic_headerufrombufufromtarfileu_proc_memberu
_proc_builtinu
_proc_gnulongu_proc_sparseu	_proc_paxu_proc_gnusparse_00u_proc_gnusparse_01u_proc_gnusparse_10u_apply_pax_infou_decode_pax_fieldu_blockuisreguisfileuisdiruissymuislnkuischruisblkuisfifouissparseuisdev(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuTarInfo�s`
1
3?
f	cBs�|EeZdZdZdZdVZdVZdZe	Z
eZdUZeZeZdUddUdUdUdUdUdUddUdUdUdd�ZedUddUedd	��ZeddUd
d��ZeddUdd
d��ZeddUddd��Zidd6dd6dd6Zdd�Zdd�Zdd�Zdd�ZdUdUdUdd �ZdWd!d"�Z!dUdWdUdUd#d$�Z"dUd%d&�Z#d'dUd(d)�Z$d*dWd+d,�Z%d-d.�Z&dWd/d0�Z'd1d2�Z(d3d4�Z)d5d6�Z*d7d8�Z+d9d:�Z,d;d<�Z-d=d>�Z.d?d@�Z/dAdB�Z0dCdD�Z1dUdVdEdF�Z2dGdH�Z3dUdIdJ�Z4dKdL�Z5dMdN�Z6dOdP�Z7dQdR�Z8dSdT�Z9dUS(XuTarFileu=The TarFile Class provides an interface to tar archives.
    iiurusurrogateescapec
Cs�t|�dks|dkr-td��n||_idd6dd6dd	6||_|s�|jdkr�tjj|�r�d	|_d|_nt||j�}d|_	nN|dkr�t|d
�r�|j}nt|d�r�|j|_nd|_	|rtjj|�nd|_||_|dk	rC||_n|dk	r[||_n|dk	rs||_n|dk	r�||_n|dk	r�||_n|	|_|
dk	r�|jtkr�|
|_n	i|_|dk	r�||_n|dk	r||_nd|_g|_d|_|jj�|_i|_yE|jdkrod|_ |j!�|_ n|jdkrx�|jj"|j�y&|jj#|�}|jj$|�Wq�t%k
r�|jj"|j�PYq�t&k
r}
zt't(|
���WYdd}
~
Xq�Xq�n|jd
kr�d|_|jr�|jj)|jj*��}|jj+|�|jt|�7_q�nWn-|j	s�|jj,�nd|_�YnXdS(u�Open an (uncompressed) tar archive `name'. `mode' is either 'r' to
           read from an existing archive, 'a' to append data to an existing
           file or 'w' to create a new file overwriting an existing one. `mode'
           defaults to 'r'.
           If `fileobj' is given, it is used for reading or writing data. If it
           can be determined, `mode' is overridden by `fileobj's mode.
           `fileobj' is not closed, when TarFile is closed.
        iurawumode must be 'r', 'a' or 'w'urburur+buauwbuwunameumodeNuawFT(-ulenu
ValueErrorumodeu_modeuosupathuexistsu	bltn_openuFalseu_extfileobjuNoneuhasattrunameuTrueuabspathufileobjuformatutarinfoudereferenceuignore_zerosuencodinguerrorsu
PAX_FORMATupax_headersudebugu
errorleveluclosedumembersu_loadedutelluoffsetuinodesufirstmemberunextuseekufromtarfileuappenduEOFHeaderErroruHeaderErroru	ReadErrorustrucreate_pax_global_headerucopyuwriteuclose(uselfunameumodeufileobjuformatutarinfoudereferenceuignore_zerosuencodinguerrorsupax_headersudebugu
errorlevelueubuf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__Fs�	""		!								
+				uTarFile.__init__c
KsG|r|rtd��n|dkr�x�|jD]�}t||j|�}|dk	rj|j�}ny||d||�SWq3ttfk
r�}	z$|dk	r�|j|�nw3WYdd}	~	Xq3Xq3Wtd��nVd|krh|jdd�\}
}|
pd}
|pd}||jkrEt||j|�}ntd	|��|||
||�Sd
|kr|jd
d�\}
}|
p�d}
|p�d}|
dkr�td��nt	||
|||�}y|||
||�}Wn|j
��YnXd|_|S|d
kr7|j
||||�Std��dS(u|Open a tar archive for reading, writing or appending. Return
           an appropriate TarFile class.

           mode:
           'r' or 'r:*' open for reading with transparent compression
           'r:'         open for reading exclusively uncompressed
           'r:gz'       open for reading with gzip compression
           'r:bz2'      open for reading with bzip2 compression
           'a' or 'a:'  open for appending, creating the file if necessary
           'w' or 'w:'  open for writing without compression
           'w:gz'       open for writing with gzip compression
           'w:bz2'      open for writing with bzip2 compression

           'r|*'        open a stream of tar blocks with transparent compression
           'r|'         open an uncompressed stream of tar blocks for reading
           'r|gz'       open a gzip compressed stream of tar blocks
           'r|bz2'      open a bzip2 compressed stream of tar blocks
           'w|'         open an uncompressed stream for writing
           'w|gz'       open a gzip compressed stream for writing
           'w|bz2'      open a bzip2 compressed stream for writing
        unothing to openurur:*Nu%file could not be opened successfullyu:iutaruunknown compression type %ru|urwumode must be 'r' or 'w'uawuundiscernible mode(urur:*F(u
ValueErroru	OPEN_METHugetattruNoneutellu	ReadErroruCompressionErroruseekusplitu_StreamucloseuFalseu_extfileobjutaropen(
uclsunameumodeufileobjubufsizeukwargsucomptypeufuncu	saved_posueufilemodeustreamut((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuopen�sN
	uTarFile.opencKs@t|�dks|dkr-td��n|||||�S(uCOpen uncompressed tar archive name for reading or writing.
        iurawumode must be 'r', 'a' or 'w'(ulenu
ValueError(uclsunameumodeufileobjukwargs((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyutaropen�suTarFile.taropeni	c	Ks9t|�dks|dkr-td��nyddl}|jWn$ttfk
rjtd��YnX|dk	}y8|j||d||�}|j||||�}Wnzt	k
r|r�|dk	r�|j
�n|dkr��ntd��Yn+|r$|dk	r$|j
�n�YnX||_|S(	ukOpen gzip compressed tar archive name for reading or writing.
           Appending is not allowed.
        iurwumode must be 'r' or 'w'iNugzip module is not availableubunot a gzip file(
ulenu
ValueErrorugzipuGzipFileuImportErroruAttributeErroruCompressionErroruNoneutaropenuIOErrorucloseu	ReadErroru_extfileobj(	uclsunameumodeufileobju
compresslevelukwargsugzipu
extfileobjut((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyugzopens.


	uTarFile.gzopencKs�t|�dks|dkr-td��nyddl}Wntk
r]td��YnX|dk	r|t||�}n|j||d|�}y|j||||�}Wn.t	t
fk
r�|j�td��YnXd	|_|S(
ulOpen bzip2 compressed tar archive name for reading or writing.
           Appending is not allowed.
        iurwumode must be 'r' or 'w'.iNubz2 module is not availableu
compresslevelunot a bzip2 fileF(ulenu
ValueErrorubz2uImportErroruCompressionErroruNoneu	_BZ2ProxyuBZ2FileutaropenuIOErroruEOFErrorucloseu	ReadErroruFalseu_extfileobj(uclsunameumodeufileobju
compresslevelukwargsubz2ut((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyubz2open$s 

	uTarFile.bz2openutaropenutarugzopenugzubz2openubz2cCs�|jr
dS|jdkr�|jjttd�|jtd7_t|jt�\}}|dkr�|jjtt|�q�n|j	s�|jj
�nd|_dS(ulClose the TarFile. In write-mode, two finishing zero blocks are
           appended to the archive.
        NuawiiT(uclosedumodeufileobjuwriteuNULu	BLOCKSIZEuoffsetudivmodu
RECORDSIZEu_extfileobjucloseuTrue(uselfublocksu	remainder((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyucloseHs		u
TarFile.closecCs2|j|�}|dkr.td|��n|S(uReturn a TarInfo object for member `name'. If `name' can not be
           found in the archive, KeyError is raised. If a member occurs more
           than once in the archive, its last occurrence is assumed to be the
           most up-to-date version.
        ufilename %r not foundN(u
_getmemberuNoneuKeyError(uselfunameutarinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu	getmember\suTarFile.getmembercCs'|j�|js |j�n|jS(u�Return the members of the archive as a list of TarInfo objects. The
           list has the same order as the members in the archive.
        (u_checku_loadedu_loadumembers(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
getmembersgs
	
uTarFile.getmemberscCsdd�|j�D�S(u�Return the members of the archive as a list of their names. It has
           the same order as the list returned by getmembers().
        cSsg|]}|j�qS((uname(u.0utarinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
<listcomp>us	u$TarFile.getnames.<locals>.<listcomp>(u
getmembers(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyugetnamesqsuTarFile.getnamescCs^|jd�|d	k	r%|j}n|d	kr:|}ntjj|�\}}|jtjd�}|jd�}|j	�}||_
|d	kr�ttd�r�|jr�tj
|�}q�tj|�}ntj|j��}d}|j}tj|�r�|j|jf}	|jrj|jdkrj|	|jkrj||j|	krjt}
|j|	}qt}
|	dr||j|	<qn�tj|�r�t}
nstj|�r�t}
n[tj|�r�t}
tj|�}n4tj |�r�t!}
ntj"|�rt#}
nd	S||_||_$|j%|_&|j'|_(|
tkr]|j)|_*n	d|_*|j+|_,|
|_-||_.t/r�yt/j0|j&�d|_1Wq�t2k
r�Yq�Xnt3r�yt3j4|j(�d|_5Wq�t2k
r�Yq�Xn|
t!t#fkrZttd�rZttd�rZtj6|j7�|_8tj9|j7�|_:qZn|S(
uOCreate a TarInfo object for either the file `name' or the file
           object `fileobj' (using os.fstat on its file descriptor). You can
           modify some of the TarInfo's attributes before you add it using
           addfile(). If given, `arcname' specifies an alternative name for the
           file in the archive.
        uawu/ulstatuiiumajoruminorN(;u_checkuNoneunameuosupathu
splitdriveureplaceusepulstriputarinfoutarfileuhasattrudereferenceulstatustatufstatufilenoust_modeuS_ISREGust_inoust_devust_nlinkuinodesuLNKTYPEuREGTYPEuS_ISDIRuDIRTYPEuS_ISFIFOuFIFOTYPEuS_ISLNKuSYMTYPEureadlinkuS_ISCHRuCHRTYPEuS_ISBLKuBLKTYPEumodeust_uiduuidust_gidugidust_sizeusizeust_mtimeumtimeutypeulinknameupwdugetpwuiduunameuKeyErrorugrpugetgrgidugnameumajorust_rdevudevmajoruminorudevminor(uselfunameuarcnameufileobjudrvutarinfoustatresulinknameustmduinodeutype((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
gettarinfows~
			"
									

uTarFile.gettarinfoc	Csv|j�xe|D]]}|r�tt|j�dd�td|jpK|j|jpZ|jfdd�|j�s�|j	�r�tdd|j
|jfdd�ntd|jdd�tdt
j|j�dd	�dd�nt|j|j�rd
nddd�|rg|j�r?td|jdd�n|j�rgtd
|jdd�qgnt�qWdS(u�Print a table of contents to sys.stdout. If `verbose' is False, only
           the names of the members are printed. If it is True, an `ls -l'-like
           output is produced.
        uendu u%s/%su%10su%d,%du%10du%d-%02d-%02d %02d:%02d:%02dNiu/uu->ulink to(u_checkuprintufilemodeumodeuunameuuidugnameugiduischruisblkudevmajorudevminorusizeutimeu	localtimeumtimeunameuisdiruissymulinknameuislnk(uselfuverboseutarinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyulist�s&

	')uTarFile.listc		Cs�|jd�|dkr"|}n|dk	rtddl}|jdtd�||�rt|jdd|�dSn|jdk	r�tjj	|�|jkr�|jdd|�dS|jd|�|j
||�}|dkr�|jdd	|�dS|dk	r;||�}|dkr;|jdd|�dSn|j�rst|d
�}|j
||�|j�n�|j�r�|j
|�|r�xTtj|�D]@}|jtjj||�tjj||�||d|�q�Wq�n
|j
|�dS(u~Add the file `name' to the archive. `name' may be any type of file
           (directory, fifo, symbolic link, etc.). If given, `arcname'
           specifies an alternative name for the file in the archive.
           Directories are added recursively by default. This can be avoided by
           setting `recursive' to False. `exclude' is a function that should
           return True for each filename to be excluded. `filter' is a function
           that expects a TarInfo object argument and returns the changed
           TarInfo object, if it returns None the TarInfo object will be
           excluded from the archive.
        uawiNuuse the filter argument insteadiutarfile: Excluded %rutarfile: Skipped %riutarfile: Unsupported type %rurbufilter(u_checkuNoneuwarningsuwarnuDeprecationWarningu_dbgunameuosupathuabspathu
gettarinfouisregu	bltn_openuaddfileucloseuisdirulistdiruaddujoin(	uselfunameuarcnameu	recursiveuexcludeufilteruwarningsutarinfouf((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuadd�sD
		
*

*uTarFile.addcCs�|jd�tj|�}|j|j|j|j�}|jj|�|jt	|�7_|dk	r�t||j|j�t
|jt�\}}|dkr�|jjtt|�|d7}n|j|t7_n|jj|�dS(u]Add the TarInfo object `tarinfo' to the archive. If `fileobj' is
           given, tarinfo.size bytes are read from it and added to the archive.
           You can create TarInfo objects using gettarinfo().
           On Windows platforms, `fileobj' should always be opened with mode
           'rb' to avoid irritation about the file size.
        uawiiN(u_checkucopyutobufuformatuencodinguerrorsufileobjuwriteuoffsetulenuNoneucopyfileobjusizeudivmodu	BLOCKSIZEuNULumembersuappend(uselfutarinfoufileobjubufublocksu	remainder((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuaddfile4s

uTarFile.addfileu.cCsOg}|dkr|}nx_|D]W}|j�r\|j|�tj|�}d|_n|j||d|j��q"W|jddd��|j�x�|D]�}tj	j
||j�}y4|j||�|j
||�|j||�Wq�tk
rF}z.|jdkr �n|jdd|�WYdd}~Xq�Xq�WdS(	uMExtract all members from the archive to the current working
           directory and set owner, modification time and permissions on
           directories afterwards. `path' specifies a different directory
           to extract to. `members' is optional and must be a subset of the
           list returned by getmembers().
        i�u	set_attrsukeycSs|jS(N(uname(ua((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu<lambda>dsu$TarFile.extractall.<locals>.<lambda>iutarfile: %sN(uNoneuisdiruappenducopyumodeuextractusortureverseuosupathujoinunameuchownuutimeuchmoduExtractErroru
errorlevelu_dbg(uselfupathumembersudirectoriesutarinfoudirpathue((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
extractallNs*	

!

uTarFile.extractallucCsa|jd�t|t�r.|j|�}n|}|j�r^tjj||j�|_	ny,|j
|tjj||j�d|�Wn�tk
r}zc|j
dkr��nI|jdkr�|jdd|j�n |jdd|j|jf�WYdd}~XnNtk
r\}z.|j
dkr6�n|jdd|�WYdd}~XnXdS(uxExtract a member from the archive to the current working directory,
           using its full name. Its file information is extracted as accurately
           as possible. `member' may be a filename or a TarInfo object. You can
           specify a different directory using `path'. File attributes (owner,
           mtime, mode) are set unless `set_attrs' is False.
        uru	set_attrsiiutarfile: %sutarfile: %s %rN(u_checku
isinstanceustru	getmemberuislnkuosupathujoinulinknameu_link_targetu_extract_memberunameuEnvironmentErroru
errorlevelufilenameuNoneu_dbgustrerroruExtractError(uselfumemberupathu	set_attrsutarinfoue((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuextractts&
!2uTarFile.extractcCs�|jd�t|t�r.|j|�}n|}|j�rP|j||�S|jtkro|j||�S|j�s�|j	�r�t|j
t�r�td��q�|j
|j|��SndSdS(u�Extract a member from the archive as a file object. `member' may be
           a filename or a TarInfo object. If `member' is a regular file, a
           file-like object is returned. If `member' is a link, a file-like
           object is constructed from the link's target. If `member' is none of
           the above, None is returned.
           The file-like object is read-only and provides the following
           methods: read(), readline(), readlines(), seek() and tell()
        uru'cannot extract (sym)link as file objectN(u_checku
isinstanceustru	getmemberuisregu
fileobjectutypeuSUPPORTED_TYPESuislnkuissymufileobju_StreamuStreamErroruextractfileu_find_link_targetuNone(uselfumemberutarinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuextractfile�s	
uTarFile.extractfilecCs�|jd�}|jdtj�}tjj|�}|r_tjj|�r_tj|�n|j�sw|j	�r�|j
dd|j|jf�n|j
d|j�|j
�r�|j||�n�|j�r�|j||�n�|j�r
|j||�n�|j�s"|j�r5|j||�n]|j�sM|j	�r`|j||�n2|jtkr�|j||�n|j||�|r�|j||�|j	�s�|j||�|j||�q�ndS(u\Extract the TarInfo object tarinfo to a physical
           file called targetpath.
        u/iu%s -> %sN(urstripureplaceuosusepupathudirnameuexistsumakedirsuislnkuissymu_dbgunameulinknameuisregumakefileuisdirumakediruisfifoumakefifouischruisblkumakedevumakelinkutypeuSUPPORTED_TYPESumakeunknownuchownuchmoduutime(uselfutarinfou
targetpathu	set_attrsu	upperdirs((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_extract_member�s4#uTarFile._extract_membercCsXytj|d�Wn=tk
rS}z|jtjkrA�nWYdd}~XnXdS(u,Make a directory called targetpath.
        i�N(uosumkdiruEnvironmentErroruerrnouEEXIST(uselfutarinfou
targetpathue((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyumakedir�s
uTarFile.makedircCs�|j}|j|j�t|d�}|jdk	rqxJ|jD])\}}|j|�t|||�qAWnt|||j�|j|j�|j�|j	�dS(u'Make a file called targetpath.
        uwbN(
ufileobjuseekuoffset_datau	bltn_openusparseuNoneucopyfileobjusizeutruncateuclose(uselfutarinfou
targetpathusourceutargetuoffsetusize((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyumakefile�s	

uTarFile.makefilecCs+|j||�|jdd|j�dS(uYMake a file from a TarInfo object with an unknown type
           at targetpath.
        iu9tarfile: Unknown file type %r, extracted as regular file.N(umakefileu_dbgutype(uselfutarinfou
targetpath((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyumakeunknown	suTarFile.makeunknowncCs/ttd�rtj|�ntd��dS(u'Make a fifo called targetpath.
        umkfifoufifo not supported by systemN(uhasattruosumkfifouExtractError(uselfutarinfou
targetpath((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyumakefifo	suTarFile.makefifocCs�ttd�s ttd�r/td��n|j}|j�rT|tjO}n
|tjO}tj||tj	|j
|j��dS(u<Make a character or block device called targetpath.
        umknodumakedevu'special devices not supported by systemN(uhasattruosuExtractErrorumodeuisblkustatuS_IFBLKuS_IFCHRumknodumakedevudevmajorudevminor(uselfutarinfou
targetpathumode((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyumakedev	s 	
uTarFile.makedevcCsyj|j�r%tj|j|�nDtjj|j�rPtj|j|�n|j|j	|�|�WnQt
k
r�|j�r�tjjtjj|j
�|j�}n	|j}Yn?Xy|j|j	|�|�Wntk
r�td��YnXdS(u�Make a (symbolic) link called targetpath. If it cannot be created
          (platform limitation), we try to make a copy of the referenced file
          instead of a link.
        u%unable to resolve link inside archiveN(uissymuosusymlinkulinknameupathuexistsu_link_targetulinku_extract_memberu_find_link_targetusymlink_exceptionujoinudirnameunameuKeyErroruExtractError(uselfutarinfou
targetpathulinkpath((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyumakelink'	s"

uTarFile.makelinkc"Cs,tr(ttd�r(tj�dkr(ytj|j�d}Wntk
r^|j}YnXytj	|j
�d}Wntk
r�|j}YnXyZ|j�r�ttd�r�tj
|||�n%tjdkr�tj|||�nWq(tk
r$}ztd��WYdd}~Xq(XndS(u6Set owner of targetpath according to tarinfo.
        ugeteuidiiulchownuos2emxucould not change ownerN(upwduhasattruosugeteuidugrpugetgrnamugnameuKeyErrorugidugetpwnamuunameuuiduissymulchownusysuplatformuchownuEnvironmentErroruExtractError(uselfutarinfou
targetpathuguuue((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuchownD	s '

u
TarFile.chowncCsattd�r]ytj||j�Wq]tk
rY}ztd��WYdd}~Xq]XndS(uASet file permissions of targetpath according to tarinfo.
        uchmoducould not change modeN(uhasattruosuchmodumodeuEnvironmentErroruExtractError(uselfutarinfou
targetpathue((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuchmodZ	s
u
TarFile.chmodcCskttd�sdSy tj||j|jf�Wn1tk
rf}ztd��WYdd}~XnXdS(uBSet modification time of targetpath according to tarinfo.
        uutimeNu"could not change modification time(uhasattruosuutimeumtimeuEnvironmentErroruExtractError(uselfutarinfou
targetpathue((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuutimec	s u
TarFile.utimecCs'|jd�|jdk	r2|j}d|_|S|jj|j�d}x�y|jj|�}Wn�tk
r�}z@|j	r�|j
dd|j|f�|jt7_wNnWYdd}~Xn1tk
rI}zd|j	r|j
dd|j|f�|jt7_wNn$|jdkr7t
t|���nWYdd}~Xn�tk
rx|jdkrtt
d��nYntk
r�}z)|jdkr�t
t|���nWYdd}~Xn7tk
r�}zt
t|���WYdd}~XnXPqN|dk	r|jj|�n	d|_|S(u�Return the next member of the archive as a TarInfo object, when
           TarFile is opened for reading. Return None if there is no more
           available.
        uraiu0x%X: %sNiu
empty fileT(u_checkufirstmemberuNoneufileobjuseekuoffsetutarinfoufromtarfileuEOFHeaderErroruignore_zerosu_dbgu	BLOCKSIZEuInvalidHeaderErroru	ReadErrorustruEmptyHeaderErroruTruncatedHeaderErroruSubsequentHeaderErrorumembersuappenduTrueu_loaded(uselfumutarinfoue((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyunextn	sF
				'
'%	uTarFile.nextcCs�|j�}|dk	r4|d|j|��}n|rOtjj|�}nxKt|�D]=}|r�tjj|j�}n	|j}||kr\|Sq\WdS(u}Find an archive member by name from bottom to top.
           If tarinfo is given, it is used as the starting point.
        N(u
getmembersuNoneuindexuosupathunormpathureverseduname(uselfunameutarinfou	normalizeumembersumemberumember_name((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
_getmember�	s	uTarFile._getmembercCs/x|j�}|dkrPqqd|_dS(uWRead through the entire archive file and look for readable
           members.
        NT(unextuNoneuTrueu_loaded(uselfutarinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_load�	s
u
TarFile._loadcCsW|jr"td|jj��n|dk	rS|j|krStd|j��ndS(unCheck if TarFile is still open, and if the operation's mode
           corresponds to TarFile's mode.
        u%s is closedubad operation for mode %rN(ucloseduIOErroru	__class__u__name__uNoneumode(uselfumode((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_check�	s	uTarFile._checkcCs�|j�r5tjj|j�d|j}d}n|j}|}|j|d|dd�}|dkr~t	d|��n|S(uZFind the target member of a symlink or hardlink member in the
           archive.
        u/utarinfou	normalizeulinkname %r not foundNT(
uissymuosupathudirnameunameulinknameuNoneu
_getmemberuTrueuKeyError(uselfutarinfoulinknameulimitumember((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_find_link_target�	s 		uTarFile._find_link_targetcCs$|jrt|j�St|�SdS(u$Provide an iterator object.
        N(u_loadeduiterumembersuTarIter(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__iter__�	s	
uTarFile.__iter__cCs)||jkr%t|dtj�ndS(u.Write debugging output to sys.stderr.
        ufileN(udebuguprintusysustderr(uselfulevelumsg((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu_dbg�	suTarFile._dbgcCs|j�|S(N(u_check(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu	__enter__�	s
uTarFile.__enter__cCs?|dkr|j�n"|js2|jj�nd|_dS(NT(uNoneucloseu_extfileobjufileobjuTrueuclosed(uselfutypeuvalueu	traceback((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__exit__�	s

	uTarFile.__exit__NFT(:u__name__u
__module__u__qualname__u__doc__udebuguFalseudereferenceuignore_zerosu
errorleveluDEFAULT_FORMATuformatuENCODINGuencodinguNoneuerrorsuTarInfoutarinfouExFileObjectu
fileobjectu__init__uclassmethodu
RECORDSIZEuopenutaropenugzopenubz2openu	OPEN_METHucloseu	getmemberu
getmembersugetnamesu
gettarinfouTrueulistuadduaddfileu
extractalluextractuextractfileu_extract_memberumakedirumakefileumakeunknownumakefifoumakedevumakelinkuchownuchmoduutimeunextu
_getmemberu_loadu_checku_find_link_targetu__iter__u_dbgu	__enter__u__exit__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuTarFile,sniK

b>&#&0	1
	cBsD|EeZdZdZdd�Zdd�Zdd�ZeZdS(	uTarIteruMIterator Class.

       for tarinfo in TarFile(...):
           suite...
    cCs||_d|_dS(u$Construct a TarIter object.
        iN(utarfileuindex(uselfutarfile((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__init__
s	uTarIter.__init__cCs|S(u Return iterator object.
        ((uself((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__iter__
suTarIter.__iter__cCs~|jjs9|jj�}|skd|j_t�qkn2y|jj|j}Wntk
rjt�YnX|jd7_|S(u�Return the next item using TarFile's next() method.
           When all members have been read, set TarFile as _loaded.
        iT(utarfileu_loadedunextuTrueu
StopIterationumembersuindexu
IndexError(uselfutarinfo((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu__next__

s
uTarIter.__next__N(u__name__u
__module__u__qualname__u__doc__u__init__u__iter__u__next__unext(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyuTarIter�	s
uTarItercCs;yt|�}|j�dSWntk
r6dSYnXdS(ufReturn True if name points to a tar archive that we
       are able to handle, else return False.
    NTF(uopenucloseuTrueuTarErroruFalse(unameut((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu
is_tarfile#
s

(xu
__future__uprint_functionu__version__uversionu
__author__u__date__u	__cvsid__u__credits__usysuosustatuerrnoutimeustructucopyureugrpupwduImportErroruNoneuAttributeErroruNotImplementedErrorusymlink_exceptionuWindowsErroru	NameErroru__all__uversion_infou__builtin__ubuiltinsuopenu_openuNULu	BLOCKSIZEu
RECORDSIZEu	GNU_MAGICuPOSIX_MAGICuLENGTH_NAMEuLENGTH_LINKu
LENGTH_PREFIXuREGTYPEuAREGTYPEuLNKTYPEuSYMTYPEuCHRTYPEuBLKTYPEuDIRTYPEuFIFOTYPEuCONTTYPEuGNUTYPE_LONGNAMEuGNUTYPE_LONGLINKuGNUTYPE_SPARSEuXHDTYPEuXGLTYPEuSOLARIS_XHDTYPEuUSTAR_FORMATu
GNU_FORMATu
PAX_FORMATuDEFAULT_FORMATuSUPPORTED_TYPESu
REGULAR_TYPESu	GNU_TYPESu
PAX_FIELDSusetuPAX_NAME_FIELDSufloatuintuPAX_NUMBER_FIELDSuS_IFLNKuS_IFREGuS_IFBLKuS_IFDIRuS_IFCHRuS_IFIFOuTSUIDuTSGIDuTSVTXuTUREADuTUWRITEuTUEXECuTGREADuTGWRITEuTGEXECuTOREADuTOWRITEuTOEXECunameuENCODINGugetfilesystemencodingustnuntsuntiuitnucalc_chksumsucopyfileobjufilemode_tableufilemodeu	ExceptionuTarErroruExtractErroru	ReadErroruCompressionErroruStreamErroruHeaderErroruEmptyHeaderErroruTruncatedHeaderErroruEOFHeaderErroruInvalidHeaderErroruSubsequentHeaderErroruobjectu
_LowLevelFileu_Streamu_StreamProxyu	_BZ2Proxyu_FileInFileuExFileObjectuTarInfouTarFileuTarIteru
is_tarfileu	bltn_open(((u>/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/tarfile.pyu<module>s.

	
					
	
					
	
	
	�?K��������*python3.3/site-packages/pip/_vendor/distlib/_backport/__pycache__/misc.cpython-33.pyc000064400000002770151733566750024471 0ustar00�
7�Re�c@s�dZddlZddlZdddgZyddlmZWn!ek
rdedd�ZYnXy
eZWn.e	k
r�ddl
mZd	d�ZYnXy
ejZWne
k
r�d
d�ZYnXdS(u/Backports for individual classes and functions.iNucache_from_sourceucallableufsencode(ucache_from_sourcecCs|rdpd}||S(Nucuo((upy_fileudebuguext((u;/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/misc.pyucache_from_sources(uCallablecCs
t|t�S(N(u
isinstanceuCallable(uobj((u;/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/misc.pyucallablescCsRt|t�r|St|t�r5|jtj��Stdt|�j��dS(Nuexpect bytes or str, not %s(	u
isinstanceubytesustruencodeusysugetfilesystemencodingu	TypeErrorutypeu__name__(ufilename((u;/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/misc.pyufsencode"s(u__doc__uosusysu__all__uimpucache_from_sourceuImportErroru	__debug__ucallableu	NameErrorucollectionsuCallableufsencodeuAttributeError(((u;/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/misc.pyu<module>s 




python3.3/site-packages/pip/_vendor/distlib/_backport/__pycache__/sysconfig.cpython-33.pyc000064400000056406151733566750025547 0ustar00�
7�ReNic@s�dZddlZddlZddlZddlZddlmZmZyddlZWne	k
r|ddl
ZYnXdddddd	d
ddd
dgZdd�Zej
r�ejjeej
��Zneej��Zejdkr2dedCd�j�kr2eejjee��Znejdkr~dedDd�j�kr~eejjeee��Znejdkr�dedEd�j�kr�eejjeee��Zndd�Ze�ZdFadd�Zej�Zejd�Zdd�Zejj �dZ!ejdd�Z"e!de!d Z#ejj$ej%�Z&ejj$ej'�Z(da*dZ+d!d"�Z,d#d$�Z-d%d&�Z.d'd(�Z/d)d*�Z0d+d,�Z1dd-d.�Z2d/d�Z3d0d1�Z4d2d3�Z5dd4d�Z6d5d�Z7d6d
�Z8d7d	�Z9e0�ddGd8d
�Z;e0�ddGd9d�Z<d:d�Z=d;d�Z>d<d�Z?d=d�Z@d>d?�ZAd@dA�ZBeCdBkr�eB�ndS(Hu-Access to Python's configuration information.iN(upardirurealpathuget_config_h_filenameuget_config_varuget_config_varsuget_makefile_filenameuget_pathuget_path_namesu	get_pathsuget_platformuget_python_versionuget_scheme_namesuparse_config_hcCs+yt|�SWntk
r&|SYnXdS(N(urealpathuOSError(upath((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_safe_realpath"s
u_safe_realpathuntupcbuildiu\pc\vi
u\pcbuild\amd64icCs=x6dD].}tjjtjjtd|��rdSqWdS(Nu
Setup.distuSetup.localuModules(u
Setup.distuSetup.localTF(uosupathuisfileujoinu
_PROJECT_BASEuTrueuFalse(ufn((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuis_python_build:s
$uis_python_buildcCs�ts�ddlm}tjdd�d}||�}|jd�}|sYtd��|j��}tj	|�WdQXt
r�x7dD],}tj|d
d�tj|dd
�q�WndandS(Ni(ufinderu.iiu
sysconfig.cfgusysconfig.cfg existsuposix_prefixu
posix_homeuincludeu{srcdir}/Includeuplatincludeu{projectbase}/.(uposix_prefixu
posix_homeT(
u	_cfg_readu	resourcesufinderu__name__ursplitufinduAssertionErroru	as_streamu_SCHEMESureadfpu
_PYTHON_BUILDusetuTrue(ufinderubackport_packageu_finderu_cfgfileususcheme((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_ensure_cfg_readDs
u_ensure_cfg_readu\{([^{]*?)\}cs0t�|jd�r(|jd�}n	t�}|j�}xb|D]Z}|dkr\qDnx?|D]7\}}|j||�r�qcn|j|||�qcWqDW|jd�xz|j�D]l}t|j|����fdd�}x<|j|�D]+\}}|j||t	j
||��q�Wq�WdS(Nuglobalscs0|jd�}|�kr#�|S|jd�S(Nii(ugroup(umatchobjuname(u	variables(u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu	_replacerosu"_expand_globals.<locals>._replacer(u_ensure_cfg_readuhas_sectionuitemsutupleusectionsu
has_optionuseturemove_sectionudictu	_VAR_REPLusub(uconfiguglobalsusectionsusectionuoptionuvalueu	_replacer((u	variablesu@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_expand_globalsYs$	

u_expand_globalsiics"�fdd�}tj||�S(u�In the string `path`, replace tokens like {some.thing} with the
    corresponding value from the map `local_vars`.

    If there is no corresponding value, leave the token unchanged.
    csJ|jd�}|�kr#�|S|tjkr=tj|S|jd�S(Nii(ugroupuosuenviron(umatchobjuname(u
local_vars(u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu	_replacer�su_subst_vars.<locals>._replacer(u	_VAR_REPLusub(upathu
local_varsu	_replacer((u
local_varsu@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_subst_vars�su_subst_varscCsI|j�}x6|j�D](\}}||kr7qn|||<qWdS(N(ukeysuitems(utarget_dictu
other_dictutarget_keysukeyuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_extend_dict�s
u_extend_dictcCs�i}|dkri}nt|t��x`tj|�D]O\}}tjdkrktjj|�}ntjj	t
||��||<q;W|S(Nuposixunt(uposixunt(uNoneu_extend_dictuget_config_varsu_SCHEMESuitemsuosunameupathu
expanduserunormpathu_subst_vars(uschemeuvarsuresukeyuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_expand_vars�s	#u_expand_varscs"�fdd�}tj||�S(Ncs0|jd�}|�kr#�|S|jd�S(Nii(ugroup(umatchobjuname(uvars(u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu	_replacer�suformat_value.<locals>._replacer(u	_VAR_REPLusub(uvalueuvarsu	_replacer((uvarsu@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuformat_value�suformat_valuecCstjdkrdStjS(Nuposixuposix_prefix(uosuname(((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_get_default_scheme�su_get_default_schemec	Cs�tjjdd�}dd�}tjdkrbtjjd�pEd}|rR|S||d�Sntjdkr�td	�}|r�|r�|S|dd
|dtjdd��Sq�n|r�|S|dd
�SdS(NuPYTHONUSERBASEcWstjjtjj|��S(N(uosupathu
expanduserujoin(uargs((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyujoinuser�su_getuserbase.<locals>.joinuseruntuAPPDATAu~uPythonudarwinuPYTHONFRAMEWORKuLibraryu%d.%diu.local(	uosuenvironugetuNoneunameusysuplatformuget_config_varuversion_info(uenv_baseujoinuserubaseu	framework((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_getuserbase�s"u_getuserbasecCstjd�}tjd�}tjd�}|dkrBi}ni}i}tj|dddd��}|j�}WdQXx�|D]�}	|	jd	�s�|	j�d
kr�q�n|j|	�}
|
r�|
j	dd�\}}|j�}|j
d
d
�}
d|
kr|||<q^yt|�}Wn(tk
rP|j
d
d�||<Yq^X|||<q�q�Wt
|j��}d}xNt|�dkr�x5t|�D]'}||}|j|�p�|j|�}
|
dk	r�|
j	d�}d}||kr
t||�}n�||krd}n�|tjkr>tj|}nx||kr�|jd�rx|dd�|krxd
}q�d||kr�d}q�t|d|�}nd
||<}|r�||
j�d�}|d|
j��||}d|kr	|||<q�yt|�}Wn"tk
r=|j�||<YnX|||<|j|�|jd�r�|dd�|kr�|dd�}||kr�|||<q�q�q�q�|||<|j|�q�Wq}Wx<|j�D].\}}t|t�r�|j�||<q�q�W|j|�|S(u�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    u"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)u\$\(([A-Za-z][A-Za-z0-9_]*)\)u\${([A-Za-z][A-Za-z0-9_]*)}uencodinguutf-8uerrorsusurrogateescapeNu#uiiu$$u$uCFLAGSuLDFLAGSuCPPFLAGSiuPY_i(uCFLAGSuLDFLAGSuCPPFLAGSTF(ureucompileuNoneucodecsuopenu	readlinesu
startswithustripumatchugroupureplaceuintu
ValueErrorulistukeysulenutupleusearchuTrueustruFalseuosuenvironuendustarturemoveuitemsu
isinstanceuupdate(ufilenameuvarsu_variable_rxu_findvar1_rxu_findvar2_rxudoneunotdoneufulinesulineumunuvutmpvu	variablesurenamed_variablesunameuvalueufounduitemuafteruk((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_parse_makefile�s�		
!


			





u_parse_makefilecCs`trtjjtd�Sttd�r>dttjf}nd}tjjt	d�|d�S(u Return the path of the Makefile.uMakefileuabiflagsuconfig-%s%suconfigustdlib(
u
_PYTHON_BUILDuosupathujoinu
_PROJECT_BASEuhasattrusysu_PY_VERSION_SHORTuabiflagsuget_path(uconfig_dir_name((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_makefile_filenameMscCs&t�}yt||�Wn^tk
rz}z>d|}t|d�r\|d|j}nt|��WYdd}~XnXt�}y&t|��}t||�WdQXWn^tk
r
}z>d|}t|d�r�|d|j}nt|��WYdd}~XnXtr"|d|d<ndS(u7Initialize the module as appropriate for POSIX systems.u.invalid Python installation: unable to open %sustrerroru (%s)Nu	BLDSHAREDuLDSHARED(	uget_makefile_filenameu_parse_makefileuIOErroruhasattrustrerroruget_config_h_filenameuopenuparse_config_hu
_PYTHON_BUILD(uvarsumakefileueumsguconfig_huf((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_init_posixXs&	
	
u_init_posixcCsqtd�|d<td�|d<td�|d<d|d<d	|d
<t|d<tjjttj��|d<d
S(u+Initialize the module as appropriate for NTustdlibuLIBDESTu
platstdlibu
BINLIBDESTuincludeu	INCLUDEPYu.pyduSOu.exeuEXEuVERSIONuBINDIRN(uget_pathu_PY_VERSION_SHORT_NO_DOTuosupathudirnameu_safe_realpathusysu
executable(uvars((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_init_non_posixts


u_init_non_posixcCs�|dkri}ntjd�}tjd�}x�|j�}|sLPn|j|�}|r�|jdd�\}}yt|�}Wntk
r�YnX|||<q6|j|�}|r6d||jd�<q6q6|S(u�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    u"#define ([A-Z][A-Za-z0-9_]+) (.*)
u&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
iiiN(uNoneureucompileureadlineumatchugroupuintu
ValueError(ufpuvarsu	define_rxuundef_rxulineumunuv((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuparse_config_h�s(	

cCsUtr6tjdkr-tjjtd�}qBt}ntd�}tjj|d�S(uReturn the path of pyconfig.h.untuPCuplatincludeu
pyconfig.h(u
_PYTHON_BUILDuosunameupathujoinu
_PROJECT_BASEuget_path(uinc_dir((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_config_h_filename�s	cCstttj���S(u,Return a tuple containing the schemes names.(utupleusortedu_SCHEMESusections(((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_scheme_names�scCs
tjd�S(u*Return a tuple containing the paths names.uposix_prefix(u_SCHEMESuoptions(((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_path_names�scCs1t�|rt||�Sttj|��SdS(u�Return a mapping containing an install scheme.

    ``scheme`` is the install scheme name. If not provided, it will
    return the default scheme for the current platform.
    N(u_ensure_cfg_readu_expand_varsudictu_SCHEMESuitems(uschemeuvarsuexpand((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu	get_paths�s
cCst|||�|S(u[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    (u	get_paths(unameuschemeuvarsuexpand((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_path�scGs�td"krTiattd<ttd<ttd<ttd<tdtdtd<ttd<ttd	<ttd
<ytjtd<Wnt	k
r�dtd<YnXt
jd#kr�tt�nt
jdkr�t
t�ntjdkr�t�td<ndtkrttd<nttd�td<tr�t
jdkr�t}yt
j�}Wntk
rgd"}YnXt
jjtd�r�||kr�t
jj|td�}t
jj|�td<q�ntjdkrTt
j�d}t|jd�d�}|dkrVxGd$D]D}t|}tjdd|�}tjdd|�}|t|<qWqQdt
jkr�t
jd}xHd%D]=}t|}tjdd|�}|d|}|t|<qyWntjdd�}	tj d|	�}
|
d"k	rQ|
j!d �}t
jj"|�sNx:d&D]/}t|}tjd!d|�}|t|<qWqNqQqTn|r�g}x$|D]}
|j#tj|
��qgW|StSd"S('uyWith no arguments, return a dictionary of all configuration
    variables relevant for the current platform.

    On Unix, this means every variable defined in Python's installed Makefile;
    On Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    uprefixuexec_prefixu
py_versionupy_version_shortiiupy_version_nodotubaseuplatbaseuprojectbaseuabiflagsuuntuos2uposixu2.6uuserbaseusrcdirudarwinu.iuLDFLAGSu
BASECFLAGSuCFLAGSu	PY_CFLAGSu	BLDSHAREDu
-arch\s+\w+\su u-isysroot [^ 	]*u	ARCHFLAGSu-isysroot\s+(\S+)iu-isysroot\s+\S+(\s|$)N(untuos2(uLDFLAGSu
BASECFLAGSuCFLAGSu	PY_CFLAGSu	BLDSHARED(uLDFLAGSu
BASECFLAGSuCFLAGSu	PY_CFLAGSu	BLDSHARED(uLDFLAGSu
BASECFLAGSuCFLAGSu	PY_CFLAGSu	BLDSHARED($u_CONFIG_VARSuNoneu_PREFIXu_EXEC_PREFIXu_PY_VERSIONu_PY_VERSION_SHORTu
_PROJECT_BASEusysuabiflagsuAttributeErroruosunameu_init_non_posixu_init_posixuversionu_getuserbaseu_safe_realpathu
_PYTHON_BUILDugetcwduOSErrorupathuisabsujoinunormpathuplatformuunameuintusplitureusubuenvironugetusearchugroupuexistsuappend(uargsubaseucwdusrcdirukernel_versionu
major_versionukeyuflagsuarchuCFLAGSumusdkuvalsuname((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_config_vars�s�



















cCst�j|�S(u�Return the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    (uget_config_varsuget(uname((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_config_varRscCs�tjdkr�d}tjj|�}|d:kr:tjStjjd|�}tj|t|�|�j�}|dkr�dS|dkr�dStjStjd	ks�ttd
�r�tjStj	�\}}}}}|j�j
dd�}|j
d
d�}|j
dd�}|dd�dkr:d||fS|dd�dkr�|ddkrzd}dt|d�d|dd�f}qzn�|dd�dkr�d||fS|dd�dkr�d|||fS|dd�d kr1d }tj
d!�}	|	j|�}
|
rz|
j�}qznI|dd�d"krzt�}|jd#�}|}
ytd$�}Wntk
r�YneXztjd%|j��}
Wd|j�X|
dk	r�d&j|
jd�jd&�dd��}
n|s�|
}n|rz|}d'}|
d&d(kr d)t�jd*d�j�kr d+}t�jd*�}tjd,|�}ttt|���}t|�dkr�|d}qt|d;kr�d+}qt|d<kr�d0}qt|d=kr�d1}qt|d>kr�d3}qt|d?kr
d4}qttd5|f��qw|d-krGtj d@krtd/}qtqw|dAkrwtj dBkrkd2}qtd.}qwqznd9|||fS(Cu�Return a string that identifies the current platform.

    This is used mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    untu bit (iu)uamd64u	win-amd64uitaniumuwin-ia64uposixuunameu/uu u_u-Niulinuxu%s-%susunosiu5usolarisu%d.%siiiuirixuaixu%s-%s.%siucygwinu[\d.]+udarwinuMACOSX_DEPLOYMENT_TARGETu0/System/Library/CoreServices/SystemVersion.plistu=<key>ProductUserVisibleVersion</key>\s*<string>(.*?)</string>u.umacosxu10.4.u-archuCFLAGSufatu
-arch\s+(\S+)ui386uppcux86_64uintelufat3uppc64ufat64u	universalu%Don't know machine value for archs=%ri uPowerPCuPower_Macintoshu%s-%s-%si����(ui386uppc(ui386ux86_64(ui386uppcux86_64(uppc64ux86_64(ui386uppcuppc64ux86_64l(uPowerPCuPower_Macintoshl(!uosunameusysuversionufinduplatformulenuloweruhasattruunameureplaceuintureucompileumatchugroupuget_config_varsugetuopenuIOErrorusearchureaducloseuNoneujoinusplitustripufindallutupleusortedusetu
ValueErrorumaxsize(uprefixuiujulookuosnameuhostureleaseuversionumachineurel_reumucfgvarsumacveru
macreleaseufucflagsuarchs((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_platform[s�#.	
	.	!
						cCstS(N(u_PY_VERSION_SHORT(((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyuget_python_version�scCsdx]tt|j���D]C\}\}}|dkrHtd|�ntd||f�qWdS(Niu%s: u
	%s = "%s"(u	enumerateusorteduitemsuprint(utitleudatauindexukeyuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_print_dicts+u_print_dictcCsetdt��tdt��tdt��t�tdt��t�tdt��dS(u*Display all information sysconfig detains.uPlatform: "%s"uPython version: "%s"u!Current installation scheme: "%s"uPathsu	VariablesN(uprintuget_platformuget_python_versionu_get_default_schemeu_print_dictu	get_pathsuget_config_vars(((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu_mainsu_mainu__main__i����i����i�FT(Du__doc__ucodecsuosureusysuos.pathupardirurealpathuconfigparseruImportErroruConfigParseru__all__u_safe_realpathu
executableupathudirnameu
_PROJECT_BASEugetcwdunameulowerujoinuis_python_buildu
_PYTHON_BUILDuFalseu	_cfg_readu_ensure_cfg_readuRawConfigParseru_SCHEMESucompileu	_VAR_REPLu_expand_globalsuversionusplitu_PY_VERSIONu_PY_VERSION_SHORTu_PY_VERSION_SHORT_NO_DOTunormpathuprefixu_PREFIXuexec_prefixu_EXEC_PREFIXuNoneu_CONFIG_VARSu
_USER_BASEu_subst_varsu_extend_dictu_expand_varsuformat_valueu_get_default_schemeu_getuserbaseu_parse_makefileuget_makefile_filenameu_init_posixu_init_non_posixuparse_config_huget_config_h_filenameuget_scheme_namesuget_path_namesuTrueu	get_pathsuget_pathuget_config_varsuget_config_varuget_platformuget_python_versionu_print_dictu_mainu__name__(((u@/tmp/pip-zej_zi-build/pip/_vendor/distlib/_backport/sysconfig.pyu<module>s�
		++!+!	#
	v
�	�python3.3/site-packages/pip/_vendor/distlib/_backport/tarfile.py000064400000264723151733566750020713 0ustar00#-------------------------------------------------------------------
# tarfile.py
#-------------------------------------------------------------------
# Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de>
# All rights reserved.
#
# Permission  is  hereby granted,  free  of charge,  to  any person
# obtaining a  copy of  this software  and associated documentation
# files  (the  "Software"),  to   deal  in  the  Software   without
# restriction,  including  without limitation  the  rights to  use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies  of  the  Software,  and to  permit  persons  to  whom the
# Software  is  furnished  to  do  so,  subject  to  the  following
# conditions:
#
# The above copyright  notice and this  permission notice shall  be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS  IS", WITHOUT WARRANTY OF ANY  KIND,
# EXPRESS OR IMPLIED, INCLUDING  BUT NOT LIMITED TO  THE WARRANTIES
# OF  MERCHANTABILITY,  FITNESS   FOR  A  PARTICULAR   PURPOSE  AND
# NONINFRINGEMENT.  IN  NO  EVENT SHALL  THE  AUTHORS  OR COPYRIGHT
# HOLDERS  BE LIABLE  FOR ANY  CLAIM, DAMAGES  OR OTHER  LIABILITY,
# WHETHER  IN AN  ACTION OF  CONTRACT, TORT  OR OTHERWISE,  ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
from __future__ import print_function

"""Read from and write to tar format archives.
"""

__version__ = "$Revision$"

version     = "0.9.0"
__author__  = "Lars Gust\u00e4bel (lars@gustaebel.de)"
__date__    = "$Date: 2011-02-25 17:42:01 +0200 (Fri, 25 Feb 2011) $"
__cvsid__   = "$Id: tarfile.py 88586 2011-02-25 15:42:01Z marc-andre.lemburg $"
__credits__ = "Gustavo Niemeyer, Niels Gust\u00e4bel, Richard Townsend."

#---------
# Imports
#---------
import sys
import os
import stat
import errno
import time
import struct
import copy
import re

try:
    import grp, pwd
except ImportError:
    grp = pwd = None

# os.symlink on Windows prior to 6.0 raises NotImplementedError
symlink_exception = (AttributeError, NotImplementedError)
try:
    # WindowsError (1314) will be raised if the caller does not hold the
    # SeCreateSymbolicLinkPrivilege privilege
    symlink_exception += (WindowsError,)
except NameError:
    pass

# from tarfile import *
__all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError"]

if sys.version_info[0] < 3:
    import __builtin__ as builtins
else:
    import builtins

_open = builtins.open   # Since 'open' is TarFile.open

#---------------------------------------------------------
# tar constants
#---------------------------------------------------------
NUL = b"\0"                     # the null character
BLOCKSIZE = 512                 # length of processing blocks
RECORDSIZE = BLOCKSIZE * 20     # length of records
GNU_MAGIC = b"ustar  \0"        # magic gnu tar string
POSIX_MAGIC = b"ustar\x0000"    # magic posix tar string

LENGTH_NAME = 100               # maximum length of a filename
LENGTH_LINK = 100               # maximum length of a linkname
LENGTH_PREFIX = 155             # maximum length of the prefix field

REGTYPE = b"0"                  # regular file
AREGTYPE = b"\0"                # regular file
LNKTYPE = b"1"                  # link (inside tarfile)
SYMTYPE = b"2"                  # symbolic link
CHRTYPE = b"3"                  # character special device
BLKTYPE = b"4"                  # block special device
DIRTYPE = b"5"                  # directory
FIFOTYPE = b"6"                 # fifo special device
CONTTYPE = b"7"                 # contiguous file

GNUTYPE_LONGNAME = b"L"         # GNU tar longname
GNUTYPE_LONGLINK = b"K"         # GNU tar longlink
GNUTYPE_SPARSE = b"S"           # GNU tar sparse file

XHDTYPE = b"x"                  # POSIX.1-2001 extended header
XGLTYPE = b"g"                  # POSIX.1-2001 global header
SOLARIS_XHDTYPE = b"X"          # Solaris extended header

USTAR_FORMAT = 0                # POSIX.1-1988 (ustar) format
GNU_FORMAT = 1                  # GNU tar format
PAX_FORMAT = 2                  # POSIX.1-2001 (pax) format
DEFAULT_FORMAT = GNU_FORMAT

#---------------------------------------------------------
# tarfile constants
#---------------------------------------------------------
# File types that tarfile supports:
SUPPORTED_TYPES = (REGTYPE, AREGTYPE, LNKTYPE,
                   SYMTYPE, DIRTYPE, FIFOTYPE,
                   CONTTYPE, CHRTYPE, BLKTYPE,
                   GNUTYPE_LONGNAME, GNUTYPE_LONGLINK,
                   GNUTYPE_SPARSE)

# File types that will be treated as a regular file.
REGULAR_TYPES = (REGTYPE, AREGTYPE,
                 CONTTYPE, GNUTYPE_SPARSE)

# File types that are part of the GNU tar format.
GNU_TYPES = (GNUTYPE_LONGNAME, GNUTYPE_LONGLINK,
             GNUTYPE_SPARSE)

# Fields from a pax header that override a TarInfo attribute.
PAX_FIELDS = ("path", "linkpath", "size", "mtime",
              "uid", "gid", "uname", "gname")

# Fields from a pax header that are affected by hdrcharset.
PAX_NAME_FIELDS = set(("path", "linkpath", "uname", "gname"))

# Fields in a pax header that are numbers, all other fields
# are treated as strings.
PAX_NUMBER_FIELDS = {
    "atime": float,
    "ctime": float,
    "mtime": float,
    "uid": int,
    "gid": int,
    "size": int
}

#---------------------------------------------------------
# Bits used in the mode field, values in octal.
#---------------------------------------------------------
S_IFLNK = 0o120000        # symbolic link
S_IFREG = 0o100000        # regular file
S_IFBLK = 0o060000        # block device
S_IFDIR = 0o040000        # directory
S_IFCHR = 0o020000        # character device
S_IFIFO = 0o010000        # fifo

TSUID   = 0o4000          # set UID on execution
TSGID   = 0o2000          # set GID on execution
TSVTX   = 0o1000          # reserved

TUREAD  = 0o400           # read by owner
TUWRITE = 0o200           # write by owner
TUEXEC  = 0o100           # execute/search by owner
TGREAD  = 0o040           # read by group
TGWRITE = 0o020           # write by group
TGEXEC  = 0o010           # execute/search by group
TOREAD  = 0o004           # read by other
TOWRITE = 0o002           # write by other
TOEXEC  = 0o001           # execute/search by other

#---------------------------------------------------------
# initialization
#---------------------------------------------------------
if os.name in ("nt", "ce"):
    ENCODING = "utf-8"
else:
    ENCODING = sys.getfilesystemencoding()

#---------------------------------------------------------
# Some useful functions
#---------------------------------------------------------

def stn(s, length, encoding, errors):
    """Convert a string to a null-terminated bytes object.
    """
    s = s.encode(encoding, errors)
    return s[:length] + (length - len(s)) * NUL

def nts(s, encoding, errors):
    """Convert a null-terminated bytes object to a string.
    """
    p = s.find(b"\0")
    if p != -1:
        s = s[:p]
    return s.decode(encoding, errors)

def nti(s):
    """Convert a number field to a python number.
    """
    # There are two possible encodings for a number field, see
    # itn() below.
    if s[0] != chr(0o200):
        try:
            n = int(nts(s, "ascii", "strict") or "0", 8)
        except ValueError:
            raise InvalidHeaderError("invalid header")
    else:
        n = 0
        for i in range(len(s) - 1):
            n <<= 8
            n += ord(s[i + 1])
    return n

def itn(n, digits=8, format=DEFAULT_FORMAT):
    """Convert a python number to a number field.
    """
    # POSIX 1003.1-1988 requires numbers to be encoded as a string of
    # octal digits followed by a null-byte, this allows values up to
    # (8**(digits-1))-1. GNU tar allows storing numbers greater than
    # that if necessary. A leading 0o200 byte indicates this particular
    # encoding, the following digits-1 bytes are a big-endian
    # representation. This allows values up to (256**(digits-1))-1.
    if 0 <= n < 8 ** (digits - 1):
        s = ("%0*o" % (digits - 1, n)).encode("ascii") + NUL
    else:
        if format != GNU_FORMAT or n >= 256 ** (digits - 1):
            raise ValueError("overflow in number field")

        if n < 0:
            # XXX We mimic GNU tar's behaviour with negative numbers,
            # this could raise OverflowError.
            n = struct.unpack("L", struct.pack("l", n))[0]

        s = bytearray()
        for i in range(digits - 1):
            s.insert(0, n & 0o377)
            n >>= 8
        s.insert(0, 0o200)
    return s

def calc_chksums(buf):
    """Calculate the checksum for a member's header by summing up all
       characters except for the chksum field which is treated as if
       it was filled with spaces. According to the GNU tar sources,
       some tars (Sun and NeXT) calculate chksum with signed char,
       which will be different if there are chars in the buffer with
       the high bit set. So we calculate two checksums, unsigned and
       signed.
    """
    unsigned_chksum = 256 + sum(struct.unpack("148B", buf[:148]) + struct.unpack("356B", buf[156:512]))
    signed_chksum = 256 + sum(struct.unpack("148b", buf[:148]) + struct.unpack("356b", buf[156:512]))
    return unsigned_chksum, signed_chksum

def copyfileobj(src, dst, length=None):
    """Copy length bytes from fileobj src to fileobj dst.
       If length is None, copy the entire content.
    """
    if length == 0:
        return
    if length is None:
        while True:
            buf = src.read(16*1024)
            if not buf:
                break
            dst.write(buf)
        return

    BUFSIZE = 16 * 1024
    blocks, remainder = divmod(length, BUFSIZE)
    for b in range(blocks):
        buf = src.read(BUFSIZE)
        if len(buf) < BUFSIZE:
            raise IOError("end of file reached")
        dst.write(buf)

    if remainder != 0:
        buf = src.read(remainder)
        if len(buf) < remainder:
            raise IOError("end of file reached")
        dst.write(buf)
    return

filemode_table = (
    ((S_IFLNK,      "l"),
     (S_IFREG,      "-"),
     (S_IFBLK,      "b"),
     (S_IFDIR,      "d"),
     (S_IFCHR,      "c"),
     (S_IFIFO,      "p")),

    ((TUREAD,       "r"),),
    ((TUWRITE,      "w"),),
    ((TUEXEC|TSUID, "s"),
     (TSUID,        "S"),
     (TUEXEC,       "x")),

    ((TGREAD,       "r"),),
    ((TGWRITE,      "w"),),
    ((TGEXEC|TSGID, "s"),
     (TSGID,        "S"),
     (TGEXEC,       "x")),

    ((TOREAD,       "r"),),
    ((TOWRITE,      "w"),),
    ((TOEXEC|TSVTX, "t"),
     (TSVTX,        "T"),
     (TOEXEC,       "x"))
)

def filemode(mode):
    """Convert a file's mode to a string of the form
       -rwxrwxrwx.
       Used by TarFile.list()
    """
    perm = []
    for table in filemode_table:
        for bit, char in table:
            if mode & bit == bit:
                perm.append(char)
                break
        else:
            perm.append("-")
    return "".join(perm)

class TarError(Exception):
    """Base exception."""
    pass
class ExtractError(TarError):
    """General exception for extract errors."""
    pass
class ReadError(TarError):
    """Exception for unreadble tar archives."""
    pass
class CompressionError(TarError):
    """Exception for unavailable compression methods."""
    pass
class StreamError(TarError):
    """Exception for unsupported operations on stream-like TarFiles."""
    pass
class HeaderError(TarError):
    """Base exception for header errors."""
    pass
class EmptyHeaderError(HeaderError):
    """Exception for empty headers."""
    pass
class TruncatedHeaderError(HeaderError):
    """Exception for truncated headers."""
    pass
class EOFHeaderError(HeaderError):
    """Exception for end of file headers."""
    pass
class InvalidHeaderError(HeaderError):
    """Exception for invalid headers."""
    pass
class SubsequentHeaderError(HeaderError):
    """Exception for missing and invalid extended headers."""
    pass

#---------------------------
# internal stream interface
#---------------------------
class _LowLevelFile(object):
    """Low-level file object. Supports reading and writing.
       It is used instead of a regular file object for streaming
       access.
    """

    def __init__(self, name, mode):
        mode = {
            "r": os.O_RDONLY,
            "w": os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
        }[mode]
        if hasattr(os, "O_BINARY"):
            mode |= os.O_BINARY
        self.fd = os.open(name, mode, 0o666)

    def close(self):
        os.close(self.fd)

    def read(self, size):
        return os.read(self.fd, size)

    def write(self, s):
        os.write(self.fd, s)

class _Stream(object):
    """Class that serves as an adapter between TarFile and
       a stream-like object.  The stream-like object only
       needs to have a read() or write() method and is accessed
       blockwise.  Use of gzip or bzip2 compression is possible.
       A stream-like object could be for example: sys.stdin,
       sys.stdout, a socket, a tape device etc.

       _Stream is intended to be used only internally.
    """

    def __init__(self, name, mode, comptype, fileobj, bufsize):
        """Construct a _Stream object.
        """
        self._extfileobj = True
        if fileobj is None:
            fileobj = _LowLevelFile(name, mode)
            self._extfileobj = False

        if comptype == '*':
            # Enable transparent compression detection for the
            # stream interface
            fileobj = _StreamProxy(fileobj)
            comptype = fileobj.getcomptype()

        self.name     = name or ""
        self.mode     = mode
        self.comptype = comptype
        self.fileobj  = fileobj
        self.bufsize  = bufsize
        self.buf      = b""
        self.pos      = 0
        self.closed   = False

        try:
            if comptype == "gz":
                try:
                    import zlib
                except ImportError:
                    raise CompressionError("zlib module is not available")
                self.zlib = zlib
                self.crc = zlib.crc32(b"")
                if mode == "r":
                    self._init_read_gz()
                else:
                    self._init_write_gz()

            if comptype == "bz2":
                try:
                    import bz2
                except ImportError:
                    raise CompressionError("bz2 module is not available")
                if mode == "r":
                    self.dbuf = b""
                    self.cmp = bz2.BZ2Decompressor()
                else:
                    self.cmp = bz2.BZ2Compressor()
        except:
            if not self._extfileobj:
                self.fileobj.close()
            self.closed = True
            raise

    def __del__(self):
        if hasattr(self, "closed") and not self.closed:
            self.close()

    def _init_write_gz(self):
        """Initialize for writing with gzip compression.
        """
        self.cmp = self.zlib.compressobj(9, self.zlib.DEFLATED,
                                            -self.zlib.MAX_WBITS,
                                            self.zlib.DEF_MEM_LEVEL,
                                            0)
        timestamp = struct.pack("<L", int(time.time()))
        self.__write(b"\037\213\010\010" + timestamp + b"\002\377")
        if self.name.endswith(".gz"):
            self.name = self.name[:-3]
        # RFC1952 says we must use ISO-8859-1 for the FNAME field.
        self.__write(self.name.encode("iso-8859-1", "replace") + NUL)

    def write(self, s):
        """Write string s to the stream.
        """
        if self.comptype == "gz":
            self.crc = self.zlib.crc32(s, self.crc)
        self.pos += len(s)
        if self.comptype != "tar":
            s = self.cmp.compress(s)
        self.__write(s)

    def __write(self, s):
        """Write string s to the stream if a whole new block
           is ready to be written.
        """
        self.buf += s
        while len(self.buf) > self.bufsize:
            self.fileobj.write(self.buf[:self.bufsize])
            self.buf = self.buf[self.bufsize:]

    def close(self):
        """Close the _Stream object. No operation should be
           done on it afterwards.
        """
        if self.closed:
            return

        if self.mode == "w" and self.comptype != "tar":
            self.buf += self.cmp.flush()

        if self.mode == "w" and self.buf:
            self.fileobj.write(self.buf)
            self.buf = b""
            if self.comptype == "gz":
                # The native zlib crc is an unsigned 32-bit integer, but
                # the Python wrapper implicitly casts that to a signed C
                # long.  So, on a 32-bit box self.crc may "look negative",
                # while the same crc on a 64-bit box may "look positive".
                # To avoid irksome warnings from the `struct` module, force
                # it to look positive on all boxes.
                self.fileobj.write(struct.pack("<L", self.crc & 0xffffffff))
                self.fileobj.write(struct.pack("<L", self.pos & 0xffffFFFF))

        if not self._extfileobj:
            self.fileobj.close()

        self.closed = True

    def _init_read_gz(self):
        """Initialize for reading a gzip compressed fileobj.
        """
        self.cmp = self.zlib.decompressobj(-self.zlib.MAX_WBITS)
        self.dbuf = b""

        # taken from gzip.GzipFile with some alterations
        if self.__read(2) != b"\037\213":
            raise ReadError("not a gzip file")
        if self.__read(1) != b"\010":
            raise CompressionError("unsupported compression method")

        flag = ord(self.__read(1))
        self.__read(6)

        if flag & 4:
            xlen = ord(self.__read(1)) + 256 * ord(self.__read(1))
            self.read(xlen)
        if flag & 8:
            while True:
                s = self.__read(1)
                if not s or s == NUL:
                    break
        if flag & 16:
            while True:
                s = self.__read(1)
                if not s or s == NUL:
                    break
        if flag & 2:
            self.__read(2)

    def tell(self):
        """Return the stream's file pointer position.
        """
        return self.pos

    def seek(self, pos=0):
        """Set the stream's file pointer to pos. Negative seeking
           is forbidden.
        """
        if pos - self.pos >= 0:
            blocks, remainder = divmod(pos - self.pos, self.bufsize)
            for i in range(blocks):
                self.read(self.bufsize)
            self.read(remainder)
        else:
            raise StreamError("seeking backwards is not allowed")
        return self.pos

    def read(self, size=None):
        """Return the next size number of bytes from the stream.
           If size is not defined, return all bytes of the stream
           up to EOF.
        """
        if size is None:
            t = []
            while True:
                buf = self._read(self.bufsize)
                if not buf:
                    break
                t.append(buf)
            buf = "".join(t)
        else:
            buf = self._read(size)
        self.pos += len(buf)
        return buf

    def _read(self, size):
        """Return size bytes from the stream.
        """
        if self.comptype == "tar":
            return self.__read(size)

        c = len(self.dbuf)
        while c < size:
            buf = self.__read(self.bufsize)
            if not buf:
                break
            try:
                buf = self.cmp.decompress(buf)
            except IOError:
                raise ReadError("invalid compressed data")
            self.dbuf += buf
            c += len(buf)
        buf = self.dbuf[:size]
        self.dbuf = self.dbuf[size:]
        return buf

    def __read(self, size):
        """Return size bytes from stream. If internal buffer is empty,
           read another block from the stream.
        """
        c = len(self.buf)
        while c < size:
            buf = self.fileobj.read(self.bufsize)
            if not buf:
                break
            self.buf += buf
            c += len(buf)
        buf = self.buf[:size]
        self.buf = self.buf[size:]
        return buf
# class _Stream

class _StreamProxy(object):
    """Small proxy class that enables transparent compression
       detection for the Stream interface (mode 'r|*').
    """

    def __init__(self, fileobj):
        self.fileobj = fileobj
        self.buf = self.fileobj.read(BLOCKSIZE)

    def read(self, size):
        self.read = self.fileobj.read
        return self.buf

    def getcomptype(self):
        if self.buf.startswith(b"\037\213\010"):
            return "gz"
        if self.buf.startswith(b"BZh91"):
            return "bz2"
        return "tar"

    def close(self):
        self.fileobj.close()
# class StreamProxy

class _BZ2Proxy(object):
    """Small proxy class that enables external file object
       support for "r:bz2" and "w:bz2" modes. This is actually
       a workaround for a limitation in bz2 module's BZ2File
       class which (unlike gzip.GzipFile) has no support for
       a file object argument.
    """

    blocksize = 16 * 1024

    def __init__(self, fileobj, mode):
        self.fileobj = fileobj
        self.mode = mode
        self.name = getattr(self.fileobj, "name", None)
        self.init()

    def init(self):
        import bz2
        self.pos = 0
        if self.mode == "r":
            self.bz2obj = bz2.BZ2Decompressor()
            self.fileobj.seek(0)
            self.buf = b""
        else:
            self.bz2obj = bz2.BZ2Compressor()

    def read(self, size):
        x = len(self.buf)
        while x < size:
            raw = self.fileobj.read(self.blocksize)
            if not raw:
                break
            data = self.bz2obj.decompress(raw)
            self.buf += data
            x += len(data)

        buf = self.buf[:size]
        self.buf = self.buf[size:]
        self.pos += len(buf)
        return buf

    def seek(self, pos):
        if pos < self.pos:
            self.init()
        self.read(pos - self.pos)

    def tell(self):
        return self.pos

    def write(self, data):
        self.pos += len(data)
        raw = self.bz2obj.compress(data)
        self.fileobj.write(raw)

    def close(self):
        if self.mode == "w":
            raw = self.bz2obj.flush()
            self.fileobj.write(raw)
# class _BZ2Proxy

#------------------------
# Extraction file object
#------------------------
class _FileInFile(object):
    """A thin wrapper around an existing file object that
       provides a part of its data as an individual file
       object.
    """

    def __init__(self, fileobj, offset, size, blockinfo=None):
        self.fileobj = fileobj
        self.offset = offset
        self.size = size
        self.position = 0

        if blockinfo is None:
            blockinfo = [(0, size)]

        # Construct a map with data and zero blocks.
        self.map_index = 0
        self.map = []
        lastpos = 0
        realpos = self.offset
        for offset, size in blockinfo:
            if offset > lastpos:
                self.map.append((False, lastpos, offset, None))
            self.map.append((True, offset, offset + size, realpos))
            realpos += size
            lastpos = offset + size
        if lastpos < self.size:
            self.map.append((False, lastpos, self.size, None))

    def seekable(self):
        if not hasattr(self.fileobj, "seekable"):
            # XXX gzip.GzipFile and bz2.BZ2File
            return True
        return self.fileobj.seekable()

    def tell(self):
        """Return the current file position.
        """
        return self.position

    def seek(self, position):
        """Seek to a position in the file.
        """
        self.position = position

    def read(self, size=None):
        """Read data from the file.
        """
        if size is None:
            size = self.size - self.position
        else:
            size = min(size, self.size - self.position)

        buf = b""
        while size > 0:
            while True:
                data, start, stop, offset = self.map[self.map_index]
                if start <= self.position < stop:
                    break
                else:
                    self.map_index += 1
                    if self.map_index == len(self.map):
                        self.map_index = 0
            length = min(size, stop - self.position)
            if data:
                self.fileobj.seek(offset + (self.position - start))
                buf += self.fileobj.read(length)
            else:
                buf += NUL * length
            size -= length
            self.position += length
        return buf
#class _FileInFile


class ExFileObject(object):
    """File-like object for reading an archive member.
       Is returned by TarFile.extractfile().
    """
    blocksize = 1024

    def __init__(self, tarfile, tarinfo):
        self.fileobj = _FileInFile(tarfile.fileobj,
                                   tarinfo.offset_data,
                                   tarinfo.size,
                                   tarinfo.sparse)
        self.name = tarinfo.name
        self.mode = "r"
        self.closed = False
        self.size = tarinfo.size

        self.position = 0
        self.buffer = b""

    def readable(self):
        return True

    def writable(self):
        return False

    def seekable(self):
        return self.fileobj.seekable()

    def read(self, size=None):
        """Read at most size bytes from the file. If size is not
           present or None, read all data until EOF is reached.
        """
        if self.closed:
            raise ValueError("I/O operation on closed file")

        buf = b""
        if self.buffer:
            if size is None:
                buf = self.buffer
                self.buffer = b""
            else:
                buf = self.buffer[:size]
                self.buffer = self.buffer[size:]

        if size is None:
            buf += self.fileobj.read()
        else:
            buf += self.fileobj.read(size - len(buf))

        self.position += len(buf)
        return buf

    # XXX TextIOWrapper uses the read1() method.
    read1 = read

    def readline(self, size=-1):
        """Read one entire line from the file. If size is present
           and non-negative, return a string with at most that
           size, which may be an incomplete line.
        """
        if self.closed:
            raise ValueError("I/O operation on closed file")

        pos = self.buffer.find(b"\n") + 1
        if pos == 0:
            # no newline found.
            while True:
                buf = self.fileobj.read(self.blocksize)
                self.buffer += buf
                if not buf or b"\n" in buf:
                    pos = self.buffer.find(b"\n") + 1
                    if pos == 0:
                        # no newline found.
                        pos = len(self.buffer)
                    break

        if size != -1:
            pos = min(size, pos)

        buf = self.buffer[:pos]
        self.buffer = self.buffer[pos:]
        self.position += len(buf)
        return buf

    def readlines(self):
        """Return a list with all remaining lines.
        """
        result = []
        while True:
            line = self.readline()
            if not line: break
            result.append(line)
        return result

    def tell(self):
        """Return the current file position.
        """
        if self.closed:
            raise ValueError("I/O operation on closed file")

        return self.position

    def seek(self, pos, whence=os.SEEK_SET):
        """Seek to a position in the file.
        """
        if self.closed:
            raise ValueError("I/O operation on closed file")

        if whence == os.SEEK_SET:
            self.position = min(max(pos, 0), self.size)
        elif whence == os.SEEK_CUR:
            if pos < 0:
                self.position = max(self.position + pos, 0)
            else:
                self.position = min(self.position + pos, self.size)
        elif whence == os.SEEK_END:
            self.position = max(min(self.size + pos, self.size), 0)
        else:
            raise ValueError("Invalid argument")

        self.buffer = b""
        self.fileobj.seek(self.position)

    def close(self):
        """Close the file object.
        """
        self.closed = True

    def __iter__(self):
        """Get an iterator over the file's lines.
        """
        while True:
            line = self.readline()
            if not line:
                break
            yield line
#class ExFileObject

#------------------
# Exported Classes
#------------------
class TarInfo(object):
    """Informational class which holds the details about an
       archive member given by a tar header block.
       TarInfo objects are returned by TarFile.getmember(),
       TarFile.getmembers() and TarFile.gettarinfo() and are
       usually created internally.
    """

    __slots__ = ("name", "mode", "uid", "gid", "size", "mtime",
                 "chksum", "type", "linkname", "uname", "gname",
                 "devmajor", "devminor",
                 "offset", "offset_data", "pax_headers", "sparse",
                 "tarfile", "_sparse_structs", "_link_target")

    def __init__(self, name=""):
        """Construct a TarInfo object. name is the optional name
           of the member.
        """
        self.name = name        # member name
        self.mode = 0o644       # file permissions
        self.uid = 0            # user id
        self.gid = 0            # group id
        self.size = 0           # file size
        self.mtime = 0          # modification time
        self.chksum = 0         # header checksum
        self.type = REGTYPE     # member type
        self.linkname = ""      # link name
        self.uname = ""         # user name
        self.gname = ""         # group name
        self.devmajor = 0       # device major number
        self.devminor = 0       # device minor number

        self.offset = 0         # the tar header starts here
        self.offset_data = 0    # the file's data starts here

        self.sparse = None      # sparse member information
        self.pax_headers = {}   # pax header information

    # In pax headers the "name" and "linkname" field are called
    # "path" and "linkpath".
    def _getpath(self):
        return self.name
    def _setpath(self, name):
        self.name = name
    path = property(_getpath, _setpath)

    def _getlinkpath(self):
        return self.linkname
    def _setlinkpath(self, linkname):
        self.linkname = linkname
    linkpath = property(_getlinkpath, _setlinkpath)

    def __repr__(self):
        return "<%s %r at %#x>" % (self.__class__.__name__,self.name,id(self))

    def get_info(self):
        """Return the TarInfo's attributes as a dictionary.
        """
        info = {
            "name":     self.name,
            "mode":     self.mode & 0o7777,
            "uid":      self.uid,
            "gid":      self.gid,
            "size":     self.size,
            "mtime":    self.mtime,
            "chksum":   self.chksum,
            "type":     self.type,
            "linkname": self.linkname,
            "uname":    self.uname,
            "gname":    self.gname,
            "devmajor": self.devmajor,
            "devminor": self.devminor
        }

        if info["type"] == DIRTYPE and not info["name"].endswith("/"):
            info["name"] += "/"

        return info

    def tobuf(self, format=DEFAULT_FORMAT, encoding=ENCODING, errors="surrogateescape"):
        """Return a tar header as a string of 512 byte blocks.
        """
        info = self.get_info()

        if format == USTAR_FORMAT:
            return self.create_ustar_header(info, encoding, errors)
        elif format == GNU_FORMAT:
            return self.create_gnu_header(info, encoding, errors)
        elif format == PAX_FORMAT:
            return self.create_pax_header(info, encoding)
        else:
            raise ValueError("invalid format")

    def create_ustar_header(self, info, encoding, errors):
        """Return the object as a ustar header block.
        """
        info["magic"] = POSIX_MAGIC

        if len(info["linkname"]) > LENGTH_LINK:
            raise ValueError("linkname is too long")

        if len(info["name"]) > LENGTH_NAME:
            info["prefix"], info["name"] = self._posix_split_name(info["name"])

        return self._create_header(info, USTAR_FORMAT, encoding, errors)

    def create_gnu_header(self, info, encoding, errors):
        """Return the object as a GNU header block sequence.
        """
        info["magic"] = GNU_MAGIC

        buf = b""
        if len(info["linkname"]) > LENGTH_LINK:
            buf += self._create_gnu_long_header(info["linkname"], GNUTYPE_LONGLINK, encoding, errors)

        if len(info["name"]) > LENGTH_NAME:
            buf += self._create_gnu_long_header(info["name"], GNUTYPE_LONGNAME, encoding, errors)

        return buf + self._create_header(info, GNU_FORMAT, encoding, errors)

    def create_pax_header(self, info, encoding):
        """Return the object as a ustar header block. If it cannot be
           represented this way, prepend a pax extended header sequence
           with supplement information.
        """
        info["magic"] = POSIX_MAGIC
        pax_headers = self.pax_headers.copy()

        # Test string fields for values that exceed the field length or cannot
        # be represented in ASCII encoding.
        for name, hname, length in (
                ("name", "path", LENGTH_NAME), ("linkname", "linkpath", LENGTH_LINK),
                ("uname", "uname", 32), ("gname", "gname", 32)):

            if hname in pax_headers:
                # The pax header has priority.
                continue

            # Try to encode the string as ASCII.
            try:
                info[name].encode("ascii", "strict")
            except UnicodeEncodeError:
                pax_headers[hname] = info[name]
                continue

            if len(info[name]) > length:
                pax_headers[hname] = info[name]

        # Test number fields for values that exceed the field limit or values
        # that like to be stored as float.
        for name, digits in (("uid", 8), ("gid", 8), ("size", 12), ("mtime", 12)):
            if name in pax_headers:
                # The pax header has priority. Avoid overflow.
                info[name] = 0
                continue

            val = info[name]
            if not 0 <= val < 8 ** (digits - 1) or isinstance(val, float):
                pax_headers[name] = str(val)
                info[name] = 0

        # Create a pax extended header if necessary.
        if pax_headers:
            buf = self._create_pax_generic_header(pax_headers, XHDTYPE, encoding)
        else:
            buf = b""

        return buf + self._create_header(info, USTAR_FORMAT, "ascii", "replace")

    @classmethod
    def create_pax_global_header(cls, pax_headers):
        """Return the object as a pax global header block sequence.
        """
        return cls._create_pax_generic_header(pax_headers, XGLTYPE, "utf8")

    def _posix_split_name(self, name):
        """Split a name longer than 100 chars into a prefix
           and a name part.
        """
        prefix = name[:LENGTH_PREFIX + 1]
        while prefix and prefix[-1] != "/":
            prefix = prefix[:-1]

        name = name[len(prefix):]
        prefix = prefix[:-1]

        if not prefix or len(name) > LENGTH_NAME:
            raise ValueError("name is too long")
        return prefix, name

    @staticmethod
    def _create_header(info, format, encoding, errors):
        """Return a header block. info is a dictionary with file
           information, format must be one of the *_FORMAT constants.
        """
        parts = [
            stn(info.get("name", ""), 100, encoding, errors),
            itn(info.get("mode", 0) & 0o7777, 8, format),
            itn(info.get("uid", 0), 8, format),
            itn(info.get("gid", 0), 8, format),
            itn(info.get("size", 0), 12, format),
            itn(info.get("mtime", 0), 12, format),
            b"        ", # checksum field
            info.get("type", REGTYPE),
            stn(info.get("linkname", ""), 100, encoding, errors),
            info.get("magic", POSIX_MAGIC),
            stn(info.get("uname", ""), 32, encoding, errors),
            stn(info.get("gname", ""), 32, encoding, errors),
            itn(info.get("devmajor", 0), 8, format),
            itn(info.get("devminor", 0), 8, format),
            stn(info.get("prefix", ""), 155, encoding, errors)
        ]

        buf = struct.pack("%ds" % BLOCKSIZE, b"".join(parts))
        chksum = calc_chksums(buf[-BLOCKSIZE:])[0]
        buf = buf[:-364] + ("%06o\0" % chksum).encode("ascii") + buf[-357:]
        return buf

    @staticmethod
    def _create_payload(payload):
        """Return the string payload filled with zero bytes
           up to the next 512 byte border.
        """
        blocks, remainder = divmod(len(payload), BLOCKSIZE)
        if remainder > 0:
            payload += (BLOCKSIZE - remainder) * NUL
        return payload

    @classmethod
    def _create_gnu_long_header(cls, name, type, encoding, errors):
        """Return a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
           for name.
        """
        name = name.encode(encoding, errors) + NUL

        info = {}
        info["name"] = "././@LongLink"
        info["type"] = type
        info["size"] = len(name)
        info["magic"] = GNU_MAGIC

        # create extended header + name blocks.
        return cls._create_header(info, USTAR_FORMAT, encoding, errors) + \
                cls._create_payload(name)

    @classmethod
    def _create_pax_generic_header(cls, pax_headers, type, encoding):
        """Return a POSIX.1-2008 extended or global header sequence
           that contains a list of keyword, value pairs. The values
           must be strings.
        """
        # Check if one of the fields contains surrogate characters and thereby
        # forces hdrcharset=BINARY, see _proc_pax() for more information.
        binary = False
        for keyword, value in pax_headers.items():
            try:
                value.encode("utf8", "strict")
            except UnicodeEncodeError:
                binary = True
                break

        records = b""
        if binary:
            # Put the hdrcharset field at the beginning of the header.
            records += b"21 hdrcharset=BINARY\n"

        for keyword, value in pax_headers.items():
            keyword = keyword.encode("utf8")
            if binary:
                # Try to restore the original byte representation of `value'.
                # Needless to say, that the encoding must match the string.
                value = value.encode(encoding, "surrogateescape")
            else:
                value = value.encode("utf8")

            l = len(keyword) + len(value) + 3   # ' ' + '=' + '\n'
            n = p = 0
            while True:
                n = l + len(str(p))
                if n == p:
                    break
                p = n
            records += bytes(str(p), "ascii") + b" " + keyword + b"=" + value + b"\n"

        # We use a hardcoded "././@PaxHeader" name like star does
        # instead of the one that POSIX recommends.
        info = {}
        info["name"] = "././@PaxHeader"
        info["type"] = type
        info["size"] = len(records)
        info["magic"] = POSIX_MAGIC

        # Create pax header + record blocks.
        return cls._create_header(info, USTAR_FORMAT, "ascii", "replace") + \
                cls._create_payload(records)

    @classmethod
    def frombuf(cls, buf, encoding, errors):
        """Construct a TarInfo object from a 512 byte bytes object.
        """
        if len(buf) == 0:
            raise EmptyHeaderError("empty header")
        if len(buf) != BLOCKSIZE:
            raise TruncatedHeaderError("truncated header")
        if buf.count(NUL) == BLOCKSIZE:
            raise EOFHeaderError("end of file header")

        chksum = nti(buf[148:156])
        if chksum not in calc_chksums(buf):
            raise InvalidHeaderError("bad checksum")

        obj = cls()
        obj.name = nts(buf[0:100], encoding, errors)
        obj.mode = nti(buf[100:108])
        obj.uid = nti(buf[108:116])
        obj.gid = nti(buf[116:124])
        obj.size = nti(buf[124:136])
        obj.mtime = nti(buf[136:148])
        obj.chksum = chksum
        obj.type = buf[156:157]
        obj.linkname = nts(buf[157:257], encoding, errors)
        obj.uname = nts(buf[265:297], encoding, errors)
        obj.gname = nts(buf[297:329], encoding, errors)
        obj.devmajor = nti(buf[329:337])
        obj.devminor = nti(buf[337:345])
        prefix = nts(buf[345:500], encoding, errors)

        # Old V7 tar format represents a directory as a regular
        # file with a trailing slash.
        if obj.type == AREGTYPE and obj.name.endswith("/"):
            obj.type = DIRTYPE

        # The old GNU sparse format occupies some of the unused
        # space in the buffer for up to 4 sparse structures.
        # Save the them for later processing in _proc_sparse().
        if obj.type == GNUTYPE_SPARSE:
            pos = 386
            structs = []
            for i in range(4):
                try:
                    offset = nti(buf[pos:pos + 12])
                    numbytes = nti(buf[pos + 12:pos + 24])
                except ValueError:
                    break
                structs.append((offset, numbytes))
                pos += 24
            isextended = bool(buf[482])
            origsize = nti(buf[483:495])
            obj._sparse_structs = (structs, isextended, origsize)

        # Remove redundant slashes from directories.
        if obj.isdir():
            obj.name = obj.name.rstrip("/")

        # Reconstruct a ustar longname.
        if prefix and obj.type not in GNU_TYPES:
            obj.name = prefix + "/" + obj.name
        return obj

    @classmethod
    def fromtarfile(cls, tarfile):
        """Return the next TarInfo object from TarFile object
           tarfile.
        """
        buf = tarfile.fileobj.read(BLOCKSIZE)
        obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors)
        obj.offset = tarfile.fileobj.tell() - BLOCKSIZE
        return obj._proc_member(tarfile)

    #--------------------------------------------------------------------------
    # The following are methods that are called depending on the type of a
    # member. The entry point is _proc_member() which can be overridden in a
    # subclass to add custom _proc_*() methods. A _proc_*() method MUST
    # implement the following
    # operations:
    # 1. Set self.offset_data to the position where the data blocks begin,
    #    if there is data that follows.
    # 2. Set tarfile.offset to the position where the next member's header will
    #    begin.
    # 3. Return self or another valid TarInfo object.
    def _proc_member(self, tarfile):
        """Choose the right processing method depending on
           the type and call it.
        """
        if self.type in (GNUTYPE_LONGNAME, GNUTYPE_LONGLINK):
            return self._proc_gnulong(tarfile)
        elif self.type == GNUTYPE_SPARSE:
            return self._proc_sparse(tarfile)
        elif self.type in (XHDTYPE, XGLTYPE, SOLARIS_XHDTYPE):
            return self._proc_pax(tarfile)
        else:
            return self._proc_builtin(tarfile)

    def _proc_builtin(self, tarfile):
        """Process a builtin type or an unknown type which
           will be treated as a regular file.
        """
        self.offset_data = tarfile.fileobj.tell()
        offset = self.offset_data
        if self.isreg() or self.type not in SUPPORTED_TYPES:
            # Skip the following data blocks.
            offset += self._block(self.size)
        tarfile.offset = offset

        # Patch the TarInfo object with saved global
        # header information.
        self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors)

        return self

    def _proc_gnulong(self, tarfile):
        """Process the blocks that hold a GNU longname
           or longlink member.
        """
        buf = tarfile.fileobj.read(self._block(self.size))

        # Fetch the next header and process it.
        try:
            next = self.fromtarfile(tarfile)
        except HeaderError:
            raise SubsequentHeaderError("missing or bad subsequent header")

        # Patch the TarInfo object from the next header with
        # the longname information.
        next.offset = self.offset
        if self.type == GNUTYPE_LONGNAME:
            next.name = nts(buf, tarfile.encoding, tarfile.errors)
        elif self.type == GNUTYPE_LONGLINK:
            next.linkname = nts(buf, tarfile.encoding, tarfile.errors)

        return next

    def _proc_sparse(self, tarfile):
        """Process a GNU sparse header plus extra headers.
        """
        # We already collected some sparse structures in frombuf().
        structs, isextended, origsize = self._sparse_structs
        del self._sparse_structs

        # Collect sparse structures from extended header blocks.
        while isextended:
            buf = tarfile.fileobj.read(BLOCKSIZE)
            pos = 0
            for i in range(21):
                try:
                    offset = nti(buf[pos:pos + 12])
                    numbytes = nti(buf[pos + 12:pos + 24])
                except ValueError:
                    break
                if offset and numbytes:
                    structs.append((offset, numbytes))
                pos += 24
            isextended = bool(buf[504])
        self.sparse = structs

        self.offset_data = tarfile.fileobj.tell()
        tarfile.offset = self.offset_data + self._block(self.size)
        self.size = origsize
        return self

    def _proc_pax(self, tarfile):
        """Process an extended or global header as described in
           POSIX.1-2008.
        """
        # Read the header information.
        buf = tarfile.fileobj.read(self._block(self.size))

        # A pax header stores supplemental information for either
        # the following file (extended) or all following files
        # (global).
        if self.type == XGLTYPE:
            pax_headers = tarfile.pax_headers
        else:
            pax_headers = tarfile.pax_headers.copy()

        # Check if the pax header contains a hdrcharset field. This tells us
        # the encoding of the path, linkpath, uname and gname fields. Normally,
        # these fields are UTF-8 encoded but since POSIX.1-2008 tar
        # implementations are allowed to store them as raw binary strings if
        # the translation to UTF-8 fails.
        match = re.search(br"\d+ hdrcharset=([^\n]+)\n", buf)
        if match is not None:
            pax_headers["hdrcharset"] = match.group(1).decode("utf8")

        # For the time being, we don't care about anything other than "BINARY".
        # The only other value that is currently allowed by the standard is
        # "ISO-IR 10646 2000 UTF-8" in other words UTF-8.
        hdrcharset = pax_headers.get("hdrcharset")
        if hdrcharset == "BINARY":
            encoding = tarfile.encoding
        else:
            encoding = "utf8"

        # Parse pax header information. A record looks like that:
        # "%d %s=%s\n" % (length, keyword, value). length is the size
        # of the complete record including the length field itself and
        # the newline. keyword and value are both UTF-8 encoded strings.
        regex = re.compile(br"(\d+) ([^=]+)=")
        pos = 0
        while True:
            match = regex.match(buf, pos)
            if not match:
                break

            length, keyword = match.groups()
            length = int(length)
            value = buf[match.end(2) + 1:match.start(1) + length - 1]

            # Normally, we could just use "utf8" as the encoding and "strict"
            # as the error handler, but we better not take the risk. For
            # example, GNU tar <= 1.23 is known to store filenames it cannot
            # translate to UTF-8 as raw strings (unfortunately without a
            # hdrcharset=BINARY header).
            # We first try the strict standard encoding, and if that fails we
            # fall back on the user's encoding and error handler.
            keyword = self._decode_pax_field(keyword, "utf8", "utf8",
                    tarfile.errors)
            if keyword in PAX_NAME_FIELDS:
                value = self._decode_pax_field(value, encoding, tarfile.encoding,
                        tarfile.errors)
            else:
                value = self._decode_pax_field(value, "utf8", "utf8",
                        tarfile.errors)

            pax_headers[keyword] = value
            pos += length

        # Fetch the next header.
        try:
            next = self.fromtarfile(tarfile)
        except HeaderError:
            raise SubsequentHeaderError("missing or bad subsequent header")

        # Process GNU sparse information.
        if "GNU.sparse.map" in pax_headers:
            # GNU extended sparse format version 0.1.
            self._proc_gnusparse_01(next, pax_headers)

        elif "GNU.sparse.size" in pax_headers:
            # GNU extended sparse format version 0.0.
            self._proc_gnusparse_00(next, pax_headers, buf)

        elif pax_headers.get("GNU.sparse.major") == "1" and pax_headers.get("GNU.sparse.minor") == "0":
            # GNU extended sparse format version 1.0.
            self._proc_gnusparse_10(next, pax_headers, tarfile)

        if self.type in (XHDTYPE, SOLARIS_XHDTYPE):
            # Patch the TarInfo object with the extended header info.
            next._apply_pax_info(pax_headers, tarfile.encoding, tarfile.errors)
            next.offset = self.offset

            if "size" in pax_headers:
                # If the extended header replaces the size field,
                # we need to recalculate the offset where the next
                # header starts.
                offset = next.offset_data
                if next.isreg() or next.type not in SUPPORTED_TYPES:
                    offset += next._block(next.size)
                tarfile.offset = offset

        return next

    def _proc_gnusparse_00(self, next, pax_headers, buf):
        """Process a GNU tar extended sparse header, version 0.0.
        """
        offsets = []
        for match in re.finditer(br"\d+ GNU.sparse.offset=(\d+)\n", buf):
            offsets.append(int(match.group(1)))
        numbytes = []
        for match in re.finditer(br"\d+ GNU.sparse.numbytes=(\d+)\n", buf):
            numbytes.append(int(match.group(1)))
        next.sparse = list(zip(offsets, numbytes))

    def _proc_gnusparse_01(self, next, pax_headers):
        """Process a GNU tar extended sparse header, version 0.1.
        """
        sparse = [int(x) for x in pax_headers["GNU.sparse.map"].split(",")]
        next.sparse = list(zip(sparse[::2], sparse[1::2]))

    def _proc_gnusparse_10(self, next, pax_headers, tarfile):
        """Process a GNU tar extended sparse header, version 1.0.
        """
        fields = None
        sparse = []
        buf = tarfile.fileobj.read(BLOCKSIZE)
        fields, buf = buf.split(b"\n", 1)
        fields = int(fields)
        while len(sparse) < fields * 2:
            if b"\n" not in buf:
                buf += tarfile.fileobj.read(BLOCKSIZE)
            number, buf = buf.split(b"\n", 1)
            sparse.append(int(number))
        next.offset_data = tarfile.fileobj.tell()
        next.sparse = list(zip(sparse[::2], sparse[1::2]))

    def _apply_pax_info(self, pax_headers, encoding, errors):
        """Replace fields with supplemental information from a previous
           pax extended or global header.
        """
        for keyword, value in pax_headers.items():
            if keyword == "GNU.sparse.name":
                setattr(self, "path", value)
            elif keyword == "GNU.sparse.size":
                setattr(self, "size", int(value))
            elif keyword == "GNU.sparse.realsize":
                setattr(self, "size", int(value))
            elif keyword in PAX_FIELDS:
                if keyword in PAX_NUMBER_FIELDS:
                    try:
                        value = PAX_NUMBER_FIELDS[keyword](value)
                    except ValueError:
                        value = 0
                if keyword == "path":
                    value = value.rstrip("/")
                setattr(self, keyword, value)

        self.pax_headers = pax_headers.copy()

    def _decode_pax_field(self, value, encoding, fallback_encoding, fallback_errors):
        """Decode a single field from a pax record.
        """
        try:
            return value.decode(encoding, "strict")
        except UnicodeDecodeError:
            return value.decode(fallback_encoding, fallback_errors)

    def _block(self, count):
        """Round up a byte count by BLOCKSIZE and return it,
           e.g. _block(834) => 1024.
        """
        blocks, remainder = divmod(count, BLOCKSIZE)
        if remainder:
            blocks += 1
        return blocks * BLOCKSIZE

    def isreg(self):
        return self.type in REGULAR_TYPES
    def isfile(self):
        return self.isreg()
    def isdir(self):
        return self.type == DIRTYPE
    def issym(self):
        return self.type == SYMTYPE
    def islnk(self):
        return self.type == LNKTYPE
    def ischr(self):
        return self.type == CHRTYPE
    def isblk(self):
        return self.type == BLKTYPE
    def isfifo(self):
        return self.type == FIFOTYPE
    def issparse(self):
        return self.sparse is not None
    def isdev(self):
        return self.type in (CHRTYPE, BLKTYPE, FIFOTYPE)
# class TarInfo

class TarFile(object):
    """The TarFile Class provides an interface to tar archives.
    """

    debug = 0                   # May be set from 0 (no msgs) to 3 (all msgs)

    dereference = False         # If true, add content of linked file to the
                                # tar file, else the link.

    ignore_zeros = False        # If true, skips empty or invalid blocks and
                                # continues processing.

    errorlevel = 1              # If 0, fatal errors only appear in debug
                                # messages (if debug >= 0). If > 0, errors
                                # are passed to the caller as exceptions.

    format = DEFAULT_FORMAT     # The format to use when creating an archive.

    encoding = ENCODING         # Encoding for 8-bit character strings.

    errors = None               # Error handler for unicode conversion.

    tarinfo = TarInfo           # The default TarInfo class to use.

    fileobject = ExFileObject   # The default ExFileObject class to use.

    def __init__(self, name=None, mode="r", fileobj=None, format=None,
            tarinfo=None, dereference=None, ignore_zeros=None, encoding=None,
            errors="surrogateescape", pax_headers=None, debug=None, errorlevel=None):
        """Open an (uncompressed) tar archive `name'. `mode' is either 'r' to
           read from an existing archive, 'a' to append data to an existing
           file or 'w' to create a new file overwriting an existing one. `mode'
           defaults to 'r'.
           If `fileobj' is given, it is used for reading or writing data. If it
           can be determined, `mode' is overridden by `fileobj's mode.
           `fileobj' is not closed, when TarFile is closed.
        """
        if len(mode) > 1 or mode not in "raw":
            raise ValueError("mode must be 'r', 'a' or 'w'")
        self.mode = mode
        self._mode = {"r": "rb", "a": "r+b", "w": "wb"}[mode]

        if not fileobj:
            if self.mode == "a" and not os.path.exists(name):
                # Create nonexistent files in append mode.
                self.mode = "w"
                self._mode = "wb"
            fileobj = bltn_open(name, self._mode)
            self._extfileobj = False
        else:
            if name is None and hasattr(fileobj, "name"):
                name = fileobj.name
            if hasattr(fileobj, "mode"):
                self._mode = fileobj.mode
            self._extfileobj = True
        self.name = os.path.abspath(name) if name else None
        self.fileobj = fileobj

        # Init attributes.
        if format is not None:
            self.format = format
        if tarinfo is not None:
            self.tarinfo = tarinfo
        if dereference is not None:
            self.dereference = dereference
        if ignore_zeros is not None:
            self.ignore_zeros = ignore_zeros
        if encoding is not None:
            self.encoding = encoding
        self.errors = errors

        if pax_headers is not None and self.format == PAX_FORMAT:
            self.pax_headers = pax_headers
        else:
            self.pax_headers = {}

        if debug is not None:
            self.debug = debug
        if errorlevel is not None:
            self.errorlevel = errorlevel

        # Init datastructures.
        self.closed = False
        self.members = []       # list of members as TarInfo objects
        self._loaded = False    # flag if all members have been read
        self.offset = self.fileobj.tell()
                                # current position in the archive file
        self.inodes = {}        # dictionary caching the inodes of
                                # archive members already added

        try:
            if self.mode == "r":
                self.firstmember = None
                self.firstmember = self.next()

            if self.mode == "a":
                # Move to the end of the archive,
                # before the first empty block.
                while True:
                    self.fileobj.seek(self.offset)
                    try:
                        tarinfo = self.tarinfo.fromtarfile(self)
                        self.members.append(tarinfo)
                    except EOFHeaderError:
                        self.fileobj.seek(self.offset)
                        break
                    except HeaderError as e:
                        raise ReadError(str(e))

            if self.mode in "aw":
                self._loaded = True

                if self.pax_headers:
                    buf = self.tarinfo.create_pax_global_header(self.pax_headers.copy())
                    self.fileobj.write(buf)
                    self.offset += len(buf)
        except:
            if not self._extfileobj:
                self.fileobj.close()
            self.closed = True
            raise

    #--------------------------------------------------------------------------
    # Below are the classmethods which act as alternate constructors to the
    # TarFile class. The open() method is the only one that is needed for
    # public use; it is the "super"-constructor and is able to select an
    # adequate "sub"-constructor for a particular compression using the mapping
    # from OPEN_METH.
    #
    # This concept allows one to subclass TarFile without losing the comfort of
    # the super-constructor. A sub-constructor is registered and made available
    # by adding it to the mapping in OPEN_METH.

    @classmethod
    def open(cls, name=None, mode="r", fileobj=None, bufsize=RECORDSIZE, **kwargs):
        """Open a tar archive for reading, writing or appending. Return
           an appropriate TarFile class.

           mode:
           'r' or 'r:*' open for reading with transparent compression
           'r:'         open for reading exclusively uncompressed
           'r:gz'       open for reading with gzip compression
           'r:bz2'      open for reading with bzip2 compression
           'a' or 'a:'  open for appending, creating the file if necessary
           'w' or 'w:'  open for writing without compression
           'w:gz'       open for writing with gzip compression
           'w:bz2'      open for writing with bzip2 compression

           'r|*'        open a stream of tar blocks with transparent compression
           'r|'         open an uncompressed stream of tar blocks for reading
           'r|gz'       open a gzip compressed stream of tar blocks
           'r|bz2'      open a bzip2 compressed stream of tar blocks
           'w|'         open an uncompressed stream for writing
           'w|gz'       open a gzip compressed stream for writing
           'w|bz2'      open a bzip2 compressed stream for writing
        """

        if not name and not fileobj:
            raise ValueError("nothing to open")

        if mode in ("r", "r:*"):
            # Find out which *open() is appropriate for opening the file.
            for comptype in cls.OPEN_METH:
                func = getattr(cls, cls.OPEN_METH[comptype])
                if fileobj is not None:
                    saved_pos = fileobj.tell()
                try:
                    return func(name, "r", fileobj, **kwargs)
                except (ReadError, CompressionError) as e:
                    if fileobj is not None:
                        fileobj.seek(saved_pos)
                    continue
            raise ReadError("file could not be opened successfully")

        elif ":" in mode:
            filemode, comptype = mode.split(":", 1)
            filemode = filemode or "r"
            comptype = comptype or "tar"

            # Select the *open() function according to
            # given compression.
            if comptype in cls.OPEN_METH:
                func = getattr(cls, cls.OPEN_METH[comptype])
            else:
                raise CompressionError("unknown compression type %r" % comptype)
            return func(name, filemode, fileobj, **kwargs)

        elif "|" in mode:
            filemode, comptype = mode.split("|", 1)
            filemode = filemode or "r"
            comptype = comptype or "tar"

            if filemode not in "rw":
                raise ValueError("mode must be 'r' or 'w'")

            stream = _Stream(name, filemode, comptype, fileobj, bufsize)
            try:
                t = cls(name, filemode, stream, **kwargs)
            except:
                stream.close()
                raise
            t._extfileobj = False
            return t

        elif mode in "aw":
            return cls.taropen(name, mode, fileobj, **kwargs)

        raise ValueError("undiscernible mode")

    @classmethod
    def taropen(cls, name, mode="r", fileobj=None, **kwargs):
        """Open uncompressed tar archive name for reading or writing.
        """
        if len(mode) > 1 or mode not in "raw":
            raise ValueError("mode must be 'r', 'a' or 'w'")
        return cls(name, mode, fileobj, **kwargs)

    @classmethod
    def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
        """Open gzip compressed tar archive name for reading or writing.
           Appending is not allowed.
        """
        if len(mode) > 1 or mode not in "rw":
            raise ValueError("mode must be 'r' or 'w'")

        try:
            import gzip
            gzip.GzipFile
        except (ImportError, AttributeError):
            raise CompressionError("gzip module is not available")

        extfileobj = fileobj is not None
        try:
            fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj)
            t = cls.taropen(name, mode, fileobj, **kwargs)
        except IOError:
            if not extfileobj and fileobj is not None:
                fileobj.close()
            if fileobj is None:
                raise
            raise ReadError("not a gzip file")
        except:
            if not extfileobj and fileobj is not None:
                fileobj.close()
            raise
        t._extfileobj = extfileobj
        return t

    @classmethod
    def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
        """Open bzip2 compressed tar archive name for reading or writing.
           Appending is not allowed.
        """
        if len(mode) > 1 or mode not in "rw":
            raise ValueError("mode must be 'r' or 'w'.")

        try:
            import bz2
        except ImportError:
            raise CompressionError("bz2 module is not available")

        if fileobj is not None:
            fileobj = _BZ2Proxy(fileobj, mode)
        else:
            fileobj = bz2.BZ2File(name, mode, compresslevel=compresslevel)

        try:
            t = cls.taropen(name, mode, fileobj, **kwargs)
        except (IOError, EOFError):
            fileobj.close()
            raise ReadError("not a bzip2 file")
        t._extfileobj = False
        return t

    # All *open() methods are registered here.
    OPEN_METH = {
        "tar": "taropen",   # uncompressed tar
        "gz":  "gzopen",    # gzip compressed tar
        "bz2": "bz2open"    # bzip2 compressed tar
    }

    #--------------------------------------------------------------------------
    # The public methods which TarFile provides:

    def close(self):
        """Close the TarFile. In write-mode, two finishing zero blocks are
           appended to the archive.
        """
        if self.closed:
            return

        if self.mode in "aw":
            self.fileobj.write(NUL * (BLOCKSIZE * 2))
            self.offset += (BLOCKSIZE * 2)
            # fill up the end with zero-blocks
            # (like option -b20 for tar does)
            blocks, remainder = divmod(self.offset, RECORDSIZE)
            if remainder > 0:
                self.fileobj.write(NUL * (RECORDSIZE - remainder))

        if not self._extfileobj:
            self.fileobj.close()
        self.closed = True

    def getmember(self, name):
        """Return a TarInfo object for member `name'. If `name' can not be
           found in the archive, KeyError is raised. If a member occurs more
           than once in the archive, its last occurrence is assumed to be the
           most up-to-date version.
        """
        tarinfo = self._getmember(name)
        if tarinfo is None:
            raise KeyError("filename %r not found" % name)
        return tarinfo

    def getmembers(self):
        """Return the members of the archive as a list of TarInfo objects. The
           list has the same order as the members in the archive.
        """
        self._check()
        if not self._loaded:    # if we want to obtain a list of
            self._load()        # all members, we first have to
                                # scan the whole archive.
        return self.members

    def getnames(self):
        """Return the members of the archive as a list of their names. It has
           the same order as the list returned by getmembers().
        """
        return [tarinfo.name for tarinfo in self.getmembers()]

    def gettarinfo(self, name=None, arcname=None, fileobj=None):
        """Create a TarInfo object for either the file `name' or the file
           object `fileobj' (using os.fstat on its file descriptor). You can
           modify some of the TarInfo's attributes before you add it using
           addfile(). If given, `arcname' specifies an alternative name for the
           file in the archive.
        """
        self._check("aw")

        # When fileobj is given, replace name by
        # fileobj's real name.
        if fileobj is not None:
            name = fileobj.name

        # Building the name of the member in the archive.
        # Backward slashes are converted to forward slashes,
        # Absolute paths are turned to relative paths.
        if arcname is None:
            arcname = name
        drv, arcname = os.path.splitdrive(arcname)
        arcname = arcname.replace(os.sep, "/")
        arcname = arcname.lstrip("/")

        # Now, fill the TarInfo object with
        # information specific for the file.
        tarinfo = self.tarinfo()
        tarinfo.tarfile = self

        # Use os.stat or os.lstat, depending on platform
        # and if symlinks shall be resolved.
        if fileobj is None:
            if hasattr(os, "lstat") and not self.dereference:
                statres = os.lstat(name)
            else:
                statres = os.stat(name)
        else:
            statres = os.fstat(fileobj.fileno())
        linkname = ""

        stmd = statres.st_mode
        if stat.S_ISREG(stmd):
            inode = (statres.st_ino, statres.st_dev)
            if not self.dereference and statres.st_nlink > 1 and \
                    inode in self.inodes and arcname != self.inodes[inode]:
                # Is it a hardlink to an already
                # archived file?
                type = LNKTYPE
                linkname = self.inodes[inode]
            else:
                # The inode is added only if its valid.
                # For win32 it is always 0.
                type = REGTYPE
                if inode[0]:
                    self.inodes[inode] = arcname
        elif stat.S_ISDIR(stmd):
            type = DIRTYPE
        elif stat.S_ISFIFO(stmd):
            type = FIFOTYPE
        elif stat.S_ISLNK(stmd):
            type = SYMTYPE
            linkname = os.readlink(name)
        elif stat.S_ISCHR(stmd):
            type = CHRTYPE
        elif stat.S_ISBLK(stmd):
            type = BLKTYPE
        else:
            return None

        # Fill the TarInfo object with all
        # information we can get.
        tarinfo.name = arcname
        tarinfo.mode = stmd
        tarinfo.uid = statres.st_uid
        tarinfo.gid = statres.st_gid
        if type == REGTYPE:
            tarinfo.size = statres.st_size
        else:
            tarinfo.size = 0
        tarinfo.mtime = statres.st_mtime
        tarinfo.type = type
        tarinfo.linkname = linkname
        if pwd:
            try:
                tarinfo.uname = pwd.getpwuid(tarinfo.uid)[0]
            except KeyError:
                pass
        if grp:
            try:
                tarinfo.gname = grp.getgrgid(tarinfo.gid)[0]
            except KeyError:
                pass

        if type in (CHRTYPE, BLKTYPE):
            if hasattr(os, "major") and hasattr(os, "minor"):
                tarinfo.devmajor = os.major(statres.st_rdev)
                tarinfo.devminor = os.minor(statres.st_rdev)
        return tarinfo

    def list(self, verbose=True):
        """Print a table of contents to sys.stdout. If `verbose' is False, only
           the names of the members are printed. If it is True, an `ls -l'-like
           output is produced.
        """
        self._check()

        for tarinfo in self:
            if verbose:
                print(filemode(tarinfo.mode), end=' ')
                print("%s/%s" % (tarinfo.uname or tarinfo.uid,
                                 tarinfo.gname or tarinfo.gid), end=' ')
                if tarinfo.ischr() or tarinfo.isblk():
                    print("%10s" % ("%d,%d" \
                                    % (tarinfo.devmajor, tarinfo.devminor)), end=' ')
                else:
                    print("%10d" % tarinfo.size, end=' ')
                print("%d-%02d-%02d %02d:%02d:%02d" \
                      % time.localtime(tarinfo.mtime)[:6], end=' ')

            print(tarinfo.name + ("/" if tarinfo.isdir() else ""), end=' ')

            if verbose:
                if tarinfo.issym():
                    print("->", tarinfo.linkname, end=' ')
                if tarinfo.islnk():
                    print("link to", tarinfo.linkname, end=' ')
            print()

    def add(self, name, arcname=None, recursive=True, exclude=None, filter=None):
        """Add the file `name' to the archive. `name' may be any type of file
           (directory, fifo, symbolic link, etc.). If given, `arcname'
           specifies an alternative name for the file in the archive.
           Directories are added recursively by default. This can be avoided by
           setting `recursive' to False. `exclude' is a function that should
           return True for each filename to be excluded. `filter' is a function
           that expects a TarInfo object argument and returns the changed
           TarInfo object, if it returns None the TarInfo object will be
           excluded from the archive.
        """
        self._check("aw")

        if arcname is None:
            arcname = name

        # Exclude pathnames.
        if exclude is not None:
            import warnings
            warnings.warn("use the filter argument instead",
                    DeprecationWarning, 2)
            if exclude(name):
                self._dbg(2, "tarfile: Excluded %r" % name)
                return

        # Skip if somebody tries to archive the archive...
        if self.name is not None and os.path.abspath(name) == self.name:
            self._dbg(2, "tarfile: Skipped %r" % name)
            return

        self._dbg(1, name)

        # Create a TarInfo object from the file.
        tarinfo = self.gettarinfo(name, arcname)

        if tarinfo is None:
            self._dbg(1, "tarfile: Unsupported type %r" % name)
            return

        # Change or exclude the TarInfo object.
        if filter is not None:
            tarinfo = filter(tarinfo)
            if tarinfo is None:
                self._dbg(2, "tarfile: Excluded %r" % name)
                return

        # Append the tar header and data to the archive.
        if tarinfo.isreg():
            f = bltn_open(name, "rb")
            self.addfile(tarinfo, f)
            f.close()

        elif tarinfo.isdir():
            self.addfile(tarinfo)
            if recursive:
                for f in os.listdir(name):
                    self.add(os.path.join(name, f), os.path.join(arcname, f),
                            recursive, exclude, filter=filter)

        else:
            self.addfile(tarinfo)

    def addfile(self, tarinfo, fileobj=None):
        """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is
           given, tarinfo.size bytes are read from it and added to the archive.
           You can create TarInfo objects using gettarinfo().
           On Windows platforms, `fileobj' should always be opened with mode
           'rb' to avoid irritation about the file size.
        """
        self._check("aw")

        tarinfo = copy.copy(tarinfo)

        buf = tarinfo.tobuf(self.format, self.encoding, self.errors)
        self.fileobj.write(buf)
        self.offset += len(buf)

        # If there's data to follow, append it.
        if fileobj is not None:
            copyfileobj(fileobj, self.fileobj, tarinfo.size)
            blocks, remainder = divmod(tarinfo.size, BLOCKSIZE)
            if remainder > 0:
                self.fileobj.write(NUL * (BLOCKSIZE - remainder))
                blocks += 1
            self.offset += blocks * BLOCKSIZE

        self.members.append(tarinfo)

    def extractall(self, path=".", members=None):
        """Extract all members from the archive to the current working
           directory and set owner, modification time and permissions on
           directories afterwards. `path' specifies a different directory
           to extract to. `members' is optional and must be a subset of the
           list returned by getmembers().
        """
        directories = []

        if members is None:
            members = self

        for tarinfo in members:
            if tarinfo.isdir():
                # Extract directories with a safe mode.
                directories.append(tarinfo)
                tarinfo = copy.copy(tarinfo)
                tarinfo.mode = 0o700
            # Do not set_attrs directories, as we will do that further down
            self.extract(tarinfo, path, set_attrs=not tarinfo.isdir())

        # Reverse sort directories.
        directories.sort(key=lambda a: a.name)
        directories.reverse()

        # Set correct owner, mtime and filemode on directories.
        for tarinfo in directories:
            dirpath = os.path.join(path, tarinfo.name)
            try:
                self.chown(tarinfo, dirpath)
                self.utime(tarinfo, dirpath)
                self.chmod(tarinfo, dirpath)
            except ExtractError as e:
                if self.errorlevel > 1:
                    raise
                else:
                    self._dbg(1, "tarfile: %s" % e)

    def extract(self, member, path="", set_attrs=True):
        """Extract a member from the archive to the current working directory,
           using its full name. Its file information is extracted as accurately
           as possible. `member' may be a filename or a TarInfo object. You can
           specify a different directory using `path'. File attributes (owner,
           mtime, mode) are set unless `set_attrs' is False.
        """
        self._check("r")

        if isinstance(member, str):
            tarinfo = self.getmember(member)
        else:
            tarinfo = member

        # Prepare the link target for makelink().
        if tarinfo.islnk():
            tarinfo._link_target = os.path.join(path, tarinfo.linkname)

        try:
            self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
                                 set_attrs=set_attrs)
        except EnvironmentError as e:
            if self.errorlevel > 0:
                raise
            else:
                if e.filename is None:
                    self._dbg(1, "tarfile: %s" % e.strerror)
                else:
                    self._dbg(1, "tarfile: %s %r" % (e.strerror, e.filename))
        except ExtractError as e:
            if self.errorlevel > 1:
                raise
            else:
                self._dbg(1, "tarfile: %s" % e)

    def extractfile(self, member):
        """Extract a member from the archive as a file object. `member' may be
           a filename or a TarInfo object. If `member' is a regular file, a
           file-like object is returned. If `member' is a link, a file-like
           object is constructed from the link's target. If `member' is none of
           the above, None is returned.
           The file-like object is read-only and provides the following
           methods: read(), readline(), readlines(), seek() and tell()
        """
        self._check("r")

        if isinstance(member, str):
            tarinfo = self.getmember(member)
        else:
            tarinfo = member

        if tarinfo.isreg():
            return self.fileobject(self, tarinfo)

        elif tarinfo.type not in SUPPORTED_TYPES:
            # If a member's type is unknown, it is treated as a
            # regular file.
            return self.fileobject(self, tarinfo)

        elif tarinfo.islnk() or tarinfo.issym():
            if isinstance(self.fileobj, _Stream):
                # A small but ugly workaround for the case that someone tries
                # to extract a (sym)link as a file-object from a non-seekable
                # stream of tar blocks.
                raise StreamError("cannot extract (sym)link as file object")
            else:
                # A (sym)link's file object is its target's file object.
                return self.extractfile(self._find_link_target(tarinfo))
        else:
            # If there's no data associated with the member (directory, chrdev,
            # blkdev, etc.), return None instead of a file object.
            return None

    def _extract_member(self, tarinfo, targetpath, set_attrs=True):
        """Extract the TarInfo object tarinfo to a physical
           file called targetpath.
        """
        # Fetch the TarInfo object for the given name
        # and build the destination pathname, replacing
        # forward slashes to platform specific separators.
        targetpath = targetpath.rstrip("/")
        targetpath = targetpath.replace("/", os.sep)

        # Create all upper directories.
        upperdirs = os.path.dirname(targetpath)
        if upperdirs and not os.path.exists(upperdirs):
            # Create directories that are not part of the archive with
            # default permissions.
            os.makedirs(upperdirs)

        if tarinfo.islnk() or tarinfo.issym():
            self._dbg(1, "%s -> %s" % (tarinfo.name, tarinfo.linkname))
        else:
            self._dbg(1, tarinfo.name)

        if tarinfo.isreg():
            self.makefile(tarinfo, targetpath)
        elif tarinfo.isdir():
            self.makedir(tarinfo, targetpath)
        elif tarinfo.isfifo():
            self.makefifo(tarinfo, targetpath)
        elif tarinfo.ischr() or tarinfo.isblk():
            self.makedev(tarinfo, targetpath)
        elif tarinfo.islnk() or tarinfo.issym():
            self.makelink(tarinfo, targetpath)
        elif tarinfo.type not in SUPPORTED_TYPES:
            self.makeunknown(tarinfo, targetpath)
        else:
            self.makefile(tarinfo, targetpath)

        if set_attrs:
            self.chown(tarinfo, targetpath)
            if not tarinfo.issym():
                self.chmod(tarinfo, targetpath)
                self.utime(tarinfo, targetpath)

    #--------------------------------------------------------------------------
    # Below are the different file methods. They are called via
    # _extract_member() when extract() is called. They can be replaced in a
    # subclass to implement other functionality.

    def makedir(self, tarinfo, targetpath):
        """Make a directory called targetpath.
        """
        try:
            # Use a safe mode for the directory, the real mode is set
            # later in _extract_member().
            os.mkdir(targetpath, 0o700)
        except EnvironmentError as e:
            if e.errno != errno.EEXIST:
                raise

    def makefile(self, tarinfo, targetpath):
        """Make a file called targetpath.
        """
        source = self.fileobj
        source.seek(tarinfo.offset_data)
        target = bltn_open(targetpath, "wb")
        if tarinfo.sparse is not None:
            for offset, size in tarinfo.sparse:
                target.seek(offset)
                copyfileobj(source, target, size)
        else:
            copyfileobj(source, target, tarinfo.size)
        target.seek(tarinfo.size)
        target.truncate()
        target.close()

    def makeunknown(self, tarinfo, targetpath):
        """Make a file from a TarInfo object with an unknown type
           at targetpath.
        """
        self.makefile(tarinfo, targetpath)
        self._dbg(1, "tarfile: Unknown file type %r, " \
                     "extracted as regular file." % tarinfo.type)

    def makefifo(self, tarinfo, targetpath):
        """Make a fifo called targetpath.
        """
        if hasattr(os, "mkfifo"):
            os.mkfifo(targetpath)
        else:
            raise ExtractError("fifo not supported by system")

    def makedev(self, tarinfo, targetpath):
        """Make a character or block device called targetpath.
        """
        if not hasattr(os, "mknod") or not hasattr(os, "makedev"):
            raise ExtractError("special devices not supported by system")

        mode = tarinfo.mode
        if tarinfo.isblk():
            mode |= stat.S_IFBLK
        else:
            mode |= stat.S_IFCHR

        os.mknod(targetpath, mode,
                 os.makedev(tarinfo.devmajor, tarinfo.devminor))

    def makelink(self, tarinfo, targetpath):
        """Make a (symbolic) link called targetpath. If it cannot be created
          (platform limitation), we try to make a copy of the referenced file
          instead of a link.
        """
        try:
            # For systems that support symbolic and hard links.
            if tarinfo.issym():
                os.symlink(tarinfo.linkname, targetpath)
            else:
                # See extract().
                if os.path.exists(tarinfo._link_target):
                    os.link(tarinfo._link_target, targetpath)
                else:
                    self._extract_member(self._find_link_target(tarinfo),
                                         targetpath)
        except symlink_exception:
            if tarinfo.issym():
                linkpath = os.path.join(os.path.dirname(tarinfo.name),
                                        tarinfo.linkname)
            else:
                linkpath = tarinfo.linkname
        else:
            try:
                self._extract_member(self._find_link_target(tarinfo),
                                     targetpath)
            except KeyError:
                raise ExtractError("unable to resolve link inside archive")

    def chown(self, tarinfo, targetpath):
        """Set owner of targetpath according to tarinfo.
        """
        if pwd and hasattr(os, "geteuid") and os.geteuid() == 0:
            # We have to be root to do so.
            try:
                g = grp.getgrnam(tarinfo.gname)[2]
            except KeyError:
                g = tarinfo.gid
            try:
                u = pwd.getpwnam(tarinfo.uname)[2]
            except KeyError:
                u = tarinfo.uid
            try:
                if tarinfo.issym() and hasattr(os, "lchown"):
                    os.lchown(targetpath, u, g)
                else:
                    if sys.platform != "os2emx":
                        os.chown(targetpath, u, g)
            except EnvironmentError as e:
                raise ExtractError("could not change owner")

    def chmod(self, tarinfo, targetpath):
        """Set file permissions of targetpath according to tarinfo.
        """
        if hasattr(os, 'chmod'):
            try:
                os.chmod(targetpath, tarinfo.mode)
            except EnvironmentError as e:
                raise ExtractError("could not change mode")

    def utime(self, tarinfo, targetpath):
        """Set modification time of targetpath according to tarinfo.
        """
        if not hasattr(os, 'utime'):
            return
        try:
            os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
        except EnvironmentError as e:
            raise ExtractError("could not change modification time")

    #--------------------------------------------------------------------------
    def next(self):
        """Return the next member of the archive as a TarInfo object, when
           TarFile is opened for reading. Return None if there is no more
           available.
        """
        self._check("ra")
        if self.firstmember is not None:
            m = self.firstmember
            self.firstmember = None
            return m

        # Read the next block.
        self.fileobj.seek(self.offset)
        tarinfo = None
        while True:
            try:
                tarinfo = self.tarinfo.fromtarfile(self)
            except EOFHeaderError as e:
                if self.ignore_zeros:
                    self._dbg(2, "0x%X: %s" % (self.offset, e))
                    self.offset += BLOCKSIZE
                    continue
            except InvalidHeaderError as e:
                if self.ignore_zeros:
                    self._dbg(2, "0x%X: %s" % (self.offset, e))
                    self.offset += BLOCKSIZE
                    continue
                elif self.offset == 0:
                    raise ReadError(str(e))
            except EmptyHeaderError:
                if self.offset == 0:
                    raise ReadError("empty file")
            except TruncatedHeaderError as e:
                if self.offset == 0:
                    raise ReadError(str(e))
            except SubsequentHeaderError as e:
                raise ReadError(str(e))
            break

        if tarinfo is not None:
            self.members.append(tarinfo)
        else:
            self._loaded = True

        return tarinfo

    #--------------------------------------------------------------------------
    # Little helper methods:

    def _getmember(self, name, tarinfo=None, normalize=False):
        """Find an archive member by name from bottom to top.
           If tarinfo is given, it is used as the starting point.
        """
        # Ensure that all members have been loaded.
        members = self.getmembers()

        # Limit the member search list up to tarinfo.
        if tarinfo is not None:
            members = members[:members.index(tarinfo)]

        if normalize:
            name = os.path.normpath(name)

        for member in reversed(members):
            if normalize:
                member_name = os.path.normpath(member.name)
            else:
                member_name = member.name

            if name == member_name:
                return member

    def _load(self):
        """Read through the entire archive file and look for readable
           members.
        """
        while True:
            tarinfo = self.next()
            if tarinfo is None:
                break
        self._loaded = True

    def _check(self, mode=None):
        """Check if TarFile is still open, and if the operation's mode
           corresponds to TarFile's mode.
        """
        if self.closed:
            raise IOError("%s is closed" % self.__class__.__name__)
        if mode is not None and self.mode not in mode:
            raise IOError("bad operation for mode %r" % self.mode)

    def _find_link_target(self, tarinfo):
        """Find the target member of a symlink or hardlink member in the
           archive.
        """
        if tarinfo.issym():
            # Always search the entire archive.
            linkname = os.path.dirname(tarinfo.name) + "/" + tarinfo.linkname
            limit = None
        else:
            # Search the archive before the link, because a hard link is
            # just a reference to an already archived file.
            linkname = tarinfo.linkname
            limit = tarinfo

        member = self._getmember(linkname, tarinfo=limit, normalize=True)
        if member is None:
            raise KeyError("linkname %r not found" % linkname)
        return member

    def __iter__(self):
        """Provide an iterator object.
        """
        if self._loaded:
            return iter(self.members)
        else:
            return TarIter(self)

    def _dbg(self, level, msg):
        """Write debugging output to sys.stderr.
        """
        if level <= self.debug:
            print(msg, file=sys.stderr)

    def __enter__(self):
        self._check()
        return self

    def __exit__(self, type, value, traceback):
        if type is None:
            self.close()
        else:
            # An exception occurred. We must not call close() because
            # it would try to write end-of-archive blocks and padding.
            if not self._extfileobj:
                self.fileobj.close()
            self.closed = True
# class TarFile

class TarIter(object):
    """Iterator Class.

       for tarinfo in TarFile(...):
           suite...
    """

    def __init__(self, tarfile):
        """Construct a TarIter object.
        """
        self.tarfile = tarfile
        self.index = 0
    def __iter__(self):
        """Return iterator object.
        """
        return self

    def __next__(self):
        """Return the next item using TarFile's next() method.
           When all members have been read, set TarFile as _loaded.
        """
        # Fix for SF #1100429: Under rare circumstances it can
        # happen that getmembers() is called during iteration,
        # which will cause TarIter to stop prematurely.
        if not self.tarfile._loaded:
            tarinfo = self.tarfile.next()
            if not tarinfo:
                self.tarfile._loaded = True
                raise StopIteration
        else:
            try:
                tarinfo = self.tarfile.members[self.index]
            except IndexError:
                raise StopIteration
        self.index += 1
        return tarinfo

    next = __next__ # for Python 2.x

#--------------------
# exported functions
#--------------------
def is_tarfile(name):
    """Return True if name points to a tar archive that we
       are able to handle, else return False.
    """
    try:
        t = open(name)
        t.close()
        return True
    except TarError:
        return False

bltn_open = open
open = TarFile.open
python3.3/site-packages/pip/_vendor/distlib/_backport/__init__.py000064400000000422151733566750021004 0ustar00"""Modules copied from Python 3 standard libraries, for internal use only.

Individual classes and functions are found in d2._backport.misc.  Intended
usage is to always import things missing from 3.1 from that module: the
built-in/stdlib objects will be used if found.
"""
python3.3/site-packages/pip/_vendor/distlib/_backport/shutil.py000064400000062062151733566750020565 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.

"""

import os
import sys
import stat
from os.path import abspath
import fnmatch
import collections
import errno
from . import tarfile

try:
    import bz2
    _BZ2_SUPPORTED = True
except ImportError:
    _BZ2_SUPPORTED = False

try:
    from pwd import getpwnam
except ImportError:
    getpwnam = None

try:
    from grp import getgrnam
except ImportError:
    getgrnam = None

__all__ = ["copyfileobj", "copyfile", "copymode", "copystat", "copy", "copy2",
           "copytree", "move", "rmtree", "Error", "SpecialFileError",
           "ExecError", "make_archive", "get_archive_formats",
           "register_archive_format", "unregister_archive_format",
           "get_unpack_formats", "register_unpack_format",
           "unregister_unpack_format", "unpack_archive", "ignore_patterns"]

class Error(EnvironmentError):
    pass

class SpecialFileError(EnvironmentError):
    """Raised when trying to do a kind of operation (e.g. copying) which is
    not supported on a special file (e.g. a named pipe)"""

class ExecError(EnvironmentError):
    """Raised when a command could not be executed"""

class ReadError(EnvironmentError):
    """Raised when an archive cannot be read"""

class RegistryError(Exception):
    """Raised when a registery operation with the archiving
    and unpacking registeries fails"""


try:
    WindowsError
except NameError:
    WindowsError = None

def copyfileobj(fsrc, fdst, length=16*1024):
    """copy data from file-like object fsrc to file-like object fdst"""
    while 1:
        buf = fsrc.read(length)
        if not buf:
            break
        fdst.write(buf)

def _samefile(src, dst):
    # Macintosh, Unix.
    if hasattr(os.path, 'samefile'):
        try:
            return os.path.samefile(src, dst)
        except OSError:
            return False

    # All other platforms: check for same pathname.
    return (os.path.normcase(os.path.abspath(src)) ==
            os.path.normcase(os.path.abspath(dst)))

def copyfile(src, dst):
    """Copy data from src to dst"""
    if _samefile(src, dst):
        raise Error("`%s` and `%s` are the same file" % (src, dst))

    for fn in [src, dst]:
        try:
            st = os.stat(fn)
        except OSError:
            # File most likely does not exist
            pass
        else:
            # XXX What about other special files? (sockets, devices...)
            if stat.S_ISFIFO(st.st_mode):
                raise SpecialFileError("`%s` is a named pipe" % fn)

    with open(src, 'rb') as fsrc:
        with open(dst, 'wb') as fdst:
            copyfileobj(fsrc, fdst)

def copymode(src, dst):
    """Copy mode bits from src to dst"""
    if hasattr(os, 'chmod'):
        st = os.stat(src)
        mode = stat.S_IMODE(st.st_mode)
        os.chmod(dst, mode)

def copystat(src, dst):
    """Copy all stat info (mode bits, atime, mtime, flags) from src to dst"""
    st = os.stat(src)
    mode = stat.S_IMODE(st.st_mode)
    if hasattr(os, 'utime'):
        os.utime(dst, (st.st_atime, st.st_mtime))
    if hasattr(os, 'chmod'):
        os.chmod(dst, mode)
    if hasattr(os, 'chflags') and hasattr(st, 'st_flags'):
        try:
            os.chflags(dst, st.st_flags)
        except OSError as why:
            if (not hasattr(errno, 'EOPNOTSUPP') or
                why.errno != errno.EOPNOTSUPP):
                raise

def copy(src, dst):
    """Copy data and mode bits ("cp src dst").

    The destination may be a directory.

    """
    if os.path.isdir(dst):
        dst = os.path.join(dst, os.path.basename(src))
    copyfile(src, dst)
    copymode(src, dst)

def copy2(src, dst):
    """Copy data and all stat info ("cp -p src dst").

    The destination may be a directory.

    """
    if os.path.isdir(dst):
        dst = os.path.join(dst, os.path.basename(src))
    copyfile(src, dst)
    copystat(src, dst)

def ignore_patterns(*patterns):
    """Function that can be used as copytree() ignore parameter.

    Patterns is a sequence of glob-style patterns
    that are used to exclude files"""
    def _ignore_patterns(path, names):
        ignored_names = []
        for pattern in patterns:
            ignored_names.extend(fnmatch.filter(names, pattern))
        return set(ignored_names)
    return _ignore_patterns

def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2,
             ignore_dangling_symlinks=False):
    """Recursively copy a directory tree.

    The destination directory must not already exist.
    If exception(s) occur, an Error is raised with a list of reasons.

    If the optional symlinks flag is true, symbolic links in the
    source tree result in symbolic links in the destination tree; if
    it is false, the contents of the files pointed to by symbolic
    links are copied. If the file pointed by the symlink doesn't
    exist, an exception will be added in the list of errors raised in
    an Error exception at the end of the copy process.

    You can set the optional ignore_dangling_symlinks flag to true if you
    want to silence this exception. Notice that this has no effect on
    platforms that don't support os.symlink.

    The optional ignore argument is a callable. If given, it
    is called with the `src` parameter, which is the directory
    being visited by copytree(), and `names` which is the list of
    `src` contents, as returned by os.listdir():

        callable(src, names) -> ignored_names

    Since copytree() is called recursively, the callable will be
    called once for each directory that is copied. It returns a
    list of names relative to the `src` directory that should
    not be copied.

    The optional copy_function argument is a callable that will be used
    to copy each file. It will be called with the source path and the
    destination path as arguments. By default, copy2() is used, but any
    function that supports the same signature (like copy()) can be used.

    """
    names = os.listdir(src)
    if ignore is not None:
        ignored_names = ignore(src, names)
    else:
        ignored_names = set()

    os.makedirs(dst)
    errors = []
    for name in names:
        if name in ignored_names:
            continue
        srcname = os.path.join(src, name)
        dstname = os.path.join(dst, name)
        try:
            if os.path.islink(srcname):
                linkto = os.readlink(srcname)
                if symlinks:
                    os.symlink(linkto, dstname)
                else:
                    # ignore dangling symlink if the flag is on
                    if not os.path.exists(linkto) and ignore_dangling_symlinks:
                        continue
                    # otherwise let the copy occurs. copy2 will raise an error
                    copy_function(srcname, dstname)
            elif os.path.isdir(srcname):
                copytree(srcname, dstname, symlinks, ignore, copy_function)
            else:
                # Will raise a SpecialFileError for unsupported file types
                copy_function(srcname, dstname)
        # catch the Error from the recursive copytree so that we can
        # continue with other files
        except Error as err:
            errors.extend(err.args[0])
        except EnvironmentError as why:
            errors.append((srcname, dstname, str(why)))
    try:
        copystat(src, dst)
    except OSError as why:
        if WindowsError is not None and isinstance(why, WindowsError):
            # Copying file access times may fail on Windows
            pass
        else:
            errors.extend((src, dst, str(why)))
    if errors:
        raise Error(errors)

def rmtree(path, ignore_errors=False, onerror=None):
    """Recursively delete a directory tree.

    If ignore_errors is set, errors are ignored; otherwise, if onerror
    is set, it is called to handle the error with arguments (func,
    path, exc_info) where func is os.listdir, os.remove, or os.rmdir;
    path is the argument to that function that caused it to fail; and
    exc_info is a tuple returned by sys.exc_info().  If ignore_errors
    is false and onerror is None, an exception is raised.

    """
    if ignore_errors:
        def onerror(*args):
            pass
    elif onerror is None:
        def onerror(*args):
            raise
    try:
        if os.path.islink(path):
            # symlinks to directories are forbidden, see bug #1669
            raise OSError("Cannot call rmtree on a symbolic link")
    except OSError:
        onerror(os.path.islink, path, sys.exc_info())
        # can't continue even if onerror hook returns
        return
    names = []
    try:
        names = os.listdir(path)
    except os.error:
        onerror(os.listdir, path, sys.exc_info())
    for name in names:
        fullname = os.path.join(path, name)
        try:
            mode = os.lstat(fullname).st_mode
        except os.error:
            mode = 0
        if stat.S_ISDIR(mode):
            rmtree(fullname, ignore_errors, onerror)
        else:
            try:
                os.remove(fullname)
            except os.error:
                onerror(os.remove, fullname, sys.exc_info())
    try:
        os.rmdir(path)
    except os.error:
        onerror(os.rmdir, path, sys.exc_info())


def _basename(path):
    # A basename() variant which first strips the trailing slash, if present.
    # Thus we always get the last component of the path, even for directories.
    return os.path.basename(path.rstrip(os.path.sep))

def move(src, dst):
    """Recursively move a file or directory to another location. This is
    similar to the Unix "mv" command.

    If the destination is a directory or a symlink to a directory, the source
    is moved inside the directory. The destination path must not already
    exist.

    If the destination already exists but is not a directory, it may be
    overwritten depending on os.rename() semantics.

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed.
    A lot more could be done here...  A look at a mv.c shows a lot of
    the issues this implementation glosses over.

    """
    real_dst = dst
    if os.path.isdir(dst):
        if _samefile(src, dst):
            # We might be on a case insensitive filesystem,
            # perform the rename anyway.
            os.rename(src, dst)
            return

        real_dst = os.path.join(dst, _basename(src))
        if os.path.exists(real_dst):
            raise Error("Destination path '%s' already exists" % real_dst)
    try:
        os.rename(src, real_dst)
    except OSError:
        if os.path.isdir(src):
            if _destinsrc(src, dst):
                raise Error("Cannot move a directory '%s' into itself '%s'." % (src, dst))
            copytree(src, real_dst, symlinks=True)
            rmtree(src)
        else:
            copy2(src, real_dst)
            os.unlink(src)

def _destinsrc(src, dst):
    src = abspath(src)
    dst = abspath(dst)
    if not src.endswith(os.path.sep):
        src += os.path.sep
    if not dst.endswith(os.path.sep):
        dst += os.path.sep
    return dst.startswith(src)

def _get_gid(name):
    """Returns a gid, given a group name."""
    if getgrnam is None or name is None:
        return None
    try:
        result = getgrnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None

def _get_uid(name):
    """Returns an uid, given a user name."""
    if getpwnam is None or name is None:
        return None
    try:
        result = getpwnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None

def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
                  owner=None, group=None, logger=None):
    """Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", or None.

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_name' +  ".tar", possibly plus
    the appropriate compression extension (".gz", or ".bz2").

    Returns the output filename.
    """
    tar_compression = {'gzip': 'gz', None: ''}
    compress_ext = {'gzip': '.gz'}

    if _BZ2_SUPPORTED:
        tar_compression['bzip2'] = 'bz2'
        compress_ext['bzip2'] = '.bz2'

    # flags for compression program, each element of list will be an argument
    if compress is not None and compress not in compress_ext:
        raise ValueError("bad value for 'compress', or compression format not "
                         "supported : {0}".format(compress))

    archive_name = base_name + '.tar' + compress_ext.get(compress, '')
    archive_dir = os.path.dirname(archive_name)

    if not os.path.exists(archive_dir):
        if logger is not None:
            logger.info("creating %s", archive_dir)
        if not dry_run:
            os.makedirs(archive_dir)

    # creating the tarball
    if logger is not None:
        logger.info('Creating tar archive')

    uid = _get_uid(owner)
    gid = _get_gid(group)

    def _set_uid_gid(tarinfo):
        if gid is not None:
            tarinfo.gid = gid
            tarinfo.gname = group
        if uid is not None:
            tarinfo.uid = uid
            tarinfo.uname = owner
        return tarinfo

    if not dry_run:
        tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress])
        try:
            tar.add(base_dir, filter=_set_uid_gid)
        finally:
            tar.close()

    return archive_name

def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False):
    # XXX see if we want to keep an external call here
    if verbose:
        zipoptions = "-r"
    else:
        zipoptions = "-rq"
    from distutils.errors import DistutilsExecError
    from distutils.spawn import spawn
    try:
        spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run)
    except DistutilsExecError:
        # XXX really should distinguish between "couldn't find
        # external 'zip' command" and "zip failed".
        raise ExecError("unable to create zip file '%s': "
            "could neither import the 'zipfile' module nor "
            "find a standalone zip utility") % zip_filename

def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
    """Create a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises ExecError.  Returns the name of the output zip
    file.
    """
    zip_filename = base_name + ".zip"
    archive_dir = os.path.dirname(base_name)

    if not os.path.exists(archive_dir):
        if logger is not None:
            logger.info("creating %s", archive_dir)
        if not dry_run:
            os.makedirs(archive_dir)

    # If zipfile module is not available, try spawning an external 'zip'
    # command.
    try:
        import zipfile
    except ImportError:
        zipfile = None

    if zipfile is None:
        _call_external_zip(base_dir, zip_filename, verbose, dry_run)
    else:
        if logger is not None:
            logger.info("creating '%s' and adding '%s' to it",
                        zip_filename, base_dir)

        if not dry_run:
            zip = zipfile.ZipFile(zip_filename, "w",
                                  compression=zipfile.ZIP_DEFLATED)

            for dirpath, dirnames, filenames in os.walk(base_dir):
                for name in filenames:
                    path = os.path.normpath(os.path.join(dirpath, name))
                    if os.path.isfile(path):
                        zip.write(path, path)
                        if logger is not None:
                            logger.info("adding '%s'", path)
            zip.close()

    return zip_filename

_ARCHIVE_FORMATS = {
    'gztar': (_make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
    'bztar': (_make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
    'tar':   (_make_tarball, [('compress', None)], "uncompressed tar file"),
    'zip':   (_make_zipfile, [], "ZIP file"),
    }

if _BZ2_SUPPORTED:
    _ARCHIVE_FORMATS['bztar'] = (_make_tarball, [('compress', 'bzip2')],
                                "bzip2'ed tar-file")

def get_archive_formats():
    """Returns a list of supported formats for archiving and unarchiving.

    Each element of the returned sequence is a tuple (name, description)
    """
    formats = [(name, registry[2]) for name, registry in
               _ARCHIVE_FORMATS.items()]
    formats.sort()
    return formats

def register_archive_format(name, function, extra_args=None, description=''):
    """Registers an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    """
    if extra_args is None:
        extra_args = []
    if not isinstance(function, collections.Callable):
        raise TypeError('The %s object is not callable' % function)
    if not isinstance(extra_args, (tuple, list)):
        raise TypeError('extra_args needs to be a sequence')
    for element in extra_args:
        if not isinstance(element, (tuple, list)) or len(element) !=2:
            raise TypeError('extra_args elements are : (arg_name, value)')

    _ARCHIVE_FORMATS[name] = (function, extra_args, description)

def unregister_archive_format(name):
    del _ARCHIVE_FORMATS[name]

def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
                 dry_run=0, owner=None, group=None, logger=None):
    """Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "bztar"
    or "gztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    """
    save_cwd = os.getcwd()
    if root_dir is not None:
        if logger is not None:
            logger.debug("changing into '%s'", root_dir)
        base_name = os.path.abspath(base_name)
        if not dry_run:
            os.chdir(root_dir)

    if base_dir is None:
        base_dir = os.curdir

    kwargs = {'dry_run': dry_run, 'logger': logger}

    try:
        format_info = _ARCHIVE_FORMATS[format]
    except KeyError:
        raise ValueError("unknown archive format '%s'" % format)

    func = format_info[0]
    for arg, val in format_info[1]:
        kwargs[arg] = val

    if format != 'zip':
        kwargs['owner'] = owner
        kwargs['group'] = group

    try:
        filename = func(base_name, base_dir, **kwargs)
    finally:
        if root_dir is not None:
            if logger is not None:
                logger.debug("changing back to '%s'", save_cwd)
            os.chdir(save_cwd)

    return filename


def get_unpack_formats():
    """Returns a list of supported formats for unpacking.

    Each element of the returned sequence is a tuple
    (name, extensions, description)
    """
    formats = [(name, info[0], info[3]) for name, info in
               _UNPACK_FORMATS.items()]
    formats.sort()
    return formats

def _check_unpack_options(extensions, function, extra_args):
    """Checks what gets registered as an unpacker."""
    # first make sure no other unpacker is registered for this extension
    existing_extensions = {}
    for name, info in _UNPACK_FORMATS.items():
        for ext in info[0]:
            existing_extensions[ext] = name

    for extension in extensions:
        if extension in existing_extensions:
            msg = '%s is already registered for "%s"'
            raise RegistryError(msg % (extension,
                                       existing_extensions[extension]))

    if not isinstance(function, collections.Callable):
        raise TypeError('The registered function must be a callable')


def register_unpack_format(name, extensions, function, extra_args=None,
                           description=''):
    """Registers an unpack format.

    `name` is the name of the format. `extensions` is a list of extensions
    corresponding to the format.

    `function` is the callable that will be
    used to unpack archives. The callable will receive archives to unpack.
    If it's unable to handle an archive, it needs to raise a ReadError
    exception.

    If provided, `extra_args` is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_unpack_formats() function.
    """
    if extra_args is None:
        extra_args = []
    _check_unpack_options(extensions, function, extra_args)
    _UNPACK_FORMATS[name] = extensions, function, extra_args, description

def unregister_unpack_format(name):
    """Removes the pack format from the registery."""
    del _UNPACK_FORMATS[name]

def _ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    if not os.path.isdir(dirname):
        os.makedirs(dirname)

def _unpack_zipfile(filename, extract_dir):
    """Unpack zip `filename` to `extract_dir`
    """
    try:
        import zipfile
    except ImportError:
        raise ReadError('zlib not supported, cannot unpack this archive.')

    if not zipfile.is_zipfile(filename):
        raise ReadError("%s is not a zip file" % filename)

    zip = zipfile.ZipFile(filename)
    try:
        for info in zip.infolist():
            name = info.filename

            # don't extract absolute paths or ones with .. in them
            if name.startswith('/') or '..' in name:
                continue

            target = os.path.join(extract_dir, *name.split('/'))
            if not target:
                continue

            _ensure_directory(target)
            if not name.endswith('/'):
                # file
                data = zip.read(info.filename)
                f = open(target, 'wb')
                try:
                    f.write(data)
                finally:
                    f.close()
                    del data
    finally:
        zip.close()

def _unpack_tarfile(filename, extract_dir):
    """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`
    """
    try:
        tarobj = tarfile.open(filename)
    except tarfile.TarError:
        raise ReadError(
            "%s is not a compressed or uncompressed tar file" % filename)
    try:
        tarobj.extractall(extract_dir)
    finally:
        tarobj.close()

_UNPACK_FORMATS = {
    'gztar': (['.tar.gz', '.tgz'], _unpack_tarfile, [], "gzip'ed tar-file"),
    'tar':   (['.tar'], _unpack_tarfile, [], "uncompressed tar file"),
    'zip':   (['.zip'], _unpack_zipfile, [], "ZIP file")
    }

if _BZ2_SUPPORTED:
    _UNPACK_FORMATS['bztar'] = (['.bz2'], _unpack_tarfile, [],
                                "bzip2'ed tar-file")

def _find_unpack_format(filename):
    for name, info in _UNPACK_FORMATS.items():
        for extension in info[0]:
            if filename.endswith(extension):
                return name
    return None

def unpack_archive(filename, extract_dir=None, format=None):
    """Unpack an archive.

    `filename` is the name of the archive.

    `extract_dir` is the name of the target directory, where the archive
    is unpacked. If not provided, the current working directory is used.

    `format` is the archive format: one of "zip", "tar", or "gztar". Or any
    other registered format. If not provided, unpack_archive will use the
    filename extension and see if an unpacker was registered for that
    extension.

    In case none is found, a ValueError is raised.
    """
    if extract_dir is None:
        extract_dir = os.getcwd()

    if format is not None:
        try:
            format_info = _UNPACK_FORMATS[format]
        except KeyError:
            raise ValueError("Unknown unpack format '{0}'".format(format))

        func = format_info[1]
        func(filename, extract_dir, **dict(format_info[2]))
    else:
        # we need to look at the registered unpackers supported extensions
        format = _find_unpack_format(filename)
        if format is None:
            raise ReadError("Unknown archive format '{0}'".format(filename))

        func = _UNPACK_FORMATS[format][1]
        kwargs = dict(_UNPACK_FORMATS[format][2])
        func(filename, extract_dir, **kwargs)
python3.3/site-packages/pip/_vendor/distlib/_backport/sysconfig.py000064400000064516151733566750021267 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Access to Python's configuration information."""

import codecs
import os
import re
import sys
from os.path import pardir, realpath
try:
    import configparser
except ImportError:
    import ConfigParser as configparser


__all__ = [
    'get_config_h_filename',
    'get_config_var',
    'get_config_vars',
    'get_makefile_filename',
    'get_path',
    'get_path_names',
    'get_paths',
    'get_platform',
    'get_python_version',
    'get_scheme_names',
    'parse_config_h',
]


def _safe_realpath(path):
    try:
        return realpath(path)
    except OSError:
        return path


if sys.executable:
    _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
else:
    # sys.executable can be empty if argv[0] has been changed and Python is
    # unable to retrieve the real program name
    _PROJECT_BASE = _safe_realpath(os.getcwd())

if os.name == "nt" and "pcbuild" in _PROJECT_BASE[-8:].lower():
    _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir))
# PC/VS7.1
if os.name == "nt" and "\\pc\\v" in _PROJECT_BASE[-10:].lower():
    _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))
# PC/AMD64
if os.name == "nt" and "\\pcbuild\\amd64" in _PROJECT_BASE[-14:].lower():
    _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))


def is_python_build():
    for fn in ("Setup.dist", "Setup.local"):
        if os.path.isfile(os.path.join(_PROJECT_BASE, "Modules", fn)):
            return True
    return False

_PYTHON_BUILD = is_python_build()

_cfg_read = False

def _ensure_cfg_read():
    global _cfg_read
    if not _cfg_read:
        from ..resources import finder
        backport_package = __name__.rsplit('.', 1)[0]
        _finder = finder(backport_package)
        _cfgfile = _finder.find('sysconfig.cfg')
        assert _cfgfile, 'sysconfig.cfg exists'
        with _cfgfile.as_stream() as s:
            _SCHEMES.readfp(s)
        if _PYTHON_BUILD:
            for scheme in ('posix_prefix', 'posix_home'):
                _SCHEMES.set(scheme, 'include', '{srcdir}/Include')
                _SCHEMES.set(scheme, 'platinclude', '{projectbase}/.')

        _cfg_read = True


_SCHEMES = configparser.RawConfigParser()
_VAR_REPL = re.compile(r'\{([^{]*?)\}')

def _expand_globals(config):
    _ensure_cfg_read()
    if config.has_section('globals'):
        globals = config.items('globals')
    else:
        globals = tuple()

    sections = config.sections()
    for section in sections:
        if section == 'globals':
            continue
        for option, value in globals:
            if config.has_option(section, option):
                continue
            config.set(section, option, value)
    config.remove_section('globals')

    # now expanding local variables defined in the cfg file
    #
    for section in config.sections():
        variables = dict(config.items(section))

        def _replacer(matchobj):
            name = matchobj.group(1)
            if name in variables:
                return variables[name]
            return matchobj.group(0)

        for option, value in config.items(section):
            config.set(section, option, _VAR_REPL.sub(_replacer, value))

#_expand_globals(_SCHEMES)

 # FIXME don't rely on sys.version here, its format is an implementation detail
 # of CPython, use sys.version_info or sys.hexversion
_PY_VERSION = sys.version.split()[0]
_PY_VERSION_SHORT = sys.version[:3]
_PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2]
_PREFIX = os.path.normpath(sys.prefix)
_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
_CONFIG_VARS = None
_USER_BASE = None


def _subst_vars(path, local_vars):
    """In the string `path`, replace tokens like {some.thing} with the
    corresponding value from the map `local_vars`.

    If there is no corresponding value, leave the token unchanged.
    """
    def _replacer(matchobj):
        name = matchobj.group(1)
        if name in local_vars:
            return local_vars[name]
        elif name in os.environ:
            return os.environ[name]
        return matchobj.group(0)
    return _VAR_REPL.sub(_replacer, path)


def _extend_dict(target_dict, other_dict):
    target_keys = target_dict.keys()
    for key, value in other_dict.items():
        if key in target_keys:
            continue
        target_dict[key] = value


def _expand_vars(scheme, vars):
    res = {}
    if vars is None:
        vars = {}
    _extend_dict(vars, get_config_vars())

    for key, value in _SCHEMES.items(scheme):
        if os.name in ('posix', 'nt'):
            value = os.path.expanduser(value)
        res[key] = os.path.normpath(_subst_vars(value, vars))
    return res


def format_value(value, vars):
    def _replacer(matchobj):
        name = matchobj.group(1)
        if name in vars:
            return vars[name]
        return matchobj.group(0)
    return _VAR_REPL.sub(_replacer, value)


def _get_default_scheme():
    if os.name == 'posix':
        # the default scheme for posix is posix_prefix
        return 'posix_prefix'
    return os.name


def _getuserbase():
    env_base = os.environ.get("PYTHONUSERBASE", None)

    def joinuser(*args):
        return os.path.expanduser(os.path.join(*args))

    # what about 'os2emx', 'riscos' ?
    if os.name == "nt":
        base = os.environ.get("APPDATA") or "~"
        if env_base:
            return env_base
        else:
            return joinuser(base, "Python")

    if sys.platform == "darwin":
        framework = get_config_var("PYTHONFRAMEWORK")
        if framework:
            if env_base:
                return env_base
            else:
                return joinuser("~", "Library", framework, "%d.%d" %
                                sys.version_info[:2])

    if env_base:
        return env_base
    else:
        return joinuser("~", ".local")


def _parse_makefile(filename, vars=None):
    """Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    # Regexes needed for parsing Makefile (and similar syntaxes,
    # like old-style Setup files).
    _variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
    _findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
    _findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")

    if vars is None:
        vars = {}
    done = {}
    notdone = {}

    with codecs.open(filename, encoding='utf-8', errors="surrogateescape") as f:
        lines = f.readlines()

    for line in lines:
        if line.startswith('#') or line.strip() == '':
            continue
        m = _variable_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            v = v.strip()
            # `$$' is a literal `$' in make
            tmpv = v.replace('$$', '')

            if "$" in tmpv:
                notdone[n] = v
            else:
                try:
                    v = int(v)
                except ValueError:
                    # insert literal `$'
                    done[n] = v.replace('$$', '$')
                else:
                    done[n] = v

    # do variable interpolation here
    variables = list(notdone.keys())

    # Variables with a 'PY_' prefix in the makefile. These need to
    # be made available without that prefix through sysconfig.
    # Special care is needed to ensure that variable expansion works, even
    # if the expansion uses the name without a prefix.
    renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')

    while len(variables) > 0:
        for name in tuple(variables):
            value = notdone[name]
            m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
            if m is not None:
                n = m.group(1)
                found = True
                if n in done:
                    item = str(done[n])
                elif n in notdone:
                    # get it on a subsequent round
                    found = False
                elif n in os.environ:
                    # do it like make: fall back to environment
                    item = os.environ[n]

                elif n in renamed_variables:
                    if (name.startswith('PY_') and
                        name[3:] in renamed_variables):
                        item = ""

                    elif 'PY_' + n in notdone:
                        found = False

                    else:
                        item = str(done['PY_' + n])

                else:
                    done[n] = item = ""

                if found:
                    after = value[m.end():]
                    value = value[:m.start()] + item + after
                    if "$" in after:
                        notdone[name] = value
                    else:
                        try:
                            value = int(value)
                        except ValueError:
                            done[name] = value.strip()
                        else:
                            done[name] = value
                        variables.remove(name)

                        if (name.startswith('PY_') and
                            name[3:] in renamed_variables):

                            name = name[3:]
                            if name not in done:
                                done[name] = value

            else:
                # bogus variable reference (e.g. "prefix=$/opt/python");
                # just drop it since we can't deal
                done[name] = value
                variables.remove(name)

    # strip spurious spaces
    for k, v in done.items():
        if isinstance(v, str):
            done[k] = v.strip()

    # save the results in the global dictionary
    vars.update(done)
    return vars


def get_makefile_filename():
    """Return the path of the Makefile."""
    if _PYTHON_BUILD:
        return os.path.join(_PROJECT_BASE, "Makefile")
    if hasattr(sys, 'abiflags'):
        config_dir_name = 'config-%s%s' % (_PY_VERSION_SHORT, sys.abiflags)
    else:
        config_dir_name = 'config'
    return os.path.join(get_path('stdlib'), config_dir_name, 'Makefile')


def _init_posix(vars):
    """Initialize the module as appropriate for POSIX systems."""
    # load the installed Makefile:
    makefile = get_makefile_filename()
    try:
        _parse_makefile(makefile, vars)
    except IOError as e:
        msg = "invalid Python installation: unable to open %s" % makefile
        if hasattr(e, "strerror"):
            msg = msg + " (%s)" % e.strerror
        raise IOError(msg)
    # load the installed pyconfig.h:
    config_h = get_config_h_filename()
    try:
        with open(config_h) as f:
            parse_config_h(f, vars)
    except IOError as e:
        msg = "invalid Python installation: unable to open %s" % config_h
        if hasattr(e, "strerror"):
            msg = msg + " (%s)" % e.strerror
        raise IOError(msg)
    # On AIX, there are wrong paths to the linker scripts in the Makefile
    # -- these paths are relative to the Python source, but when installed
    # the scripts are in another directory.
    if _PYTHON_BUILD:
        vars['LDSHARED'] = vars['BLDSHARED']


def _init_non_posix(vars):
    """Initialize the module as appropriate for NT"""
    # set basic install directories
    vars['LIBDEST'] = get_path('stdlib')
    vars['BINLIBDEST'] = get_path('platstdlib')
    vars['INCLUDEPY'] = get_path('include')
    vars['SO'] = '.pyd'
    vars['EXE'] = '.exe'
    vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
    vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))

#
# public APIs
#


def parse_config_h(fp, vars=None):
    """Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    if vars is None:
        vars = {}
    define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n")
    undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n")

    while True:
        line = fp.readline()
        if not line:
            break
        m = define_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            try:
                v = int(v)
            except ValueError:
                pass
            vars[n] = v
        else:
            m = undef_rx.match(line)
            if m:
                vars[m.group(1)] = 0
    return vars


def get_config_h_filename():
    """Return the path of pyconfig.h."""
    if _PYTHON_BUILD:
        if os.name == "nt":
            inc_dir = os.path.join(_PROJECT_BASE, "PC")
        else:
            inc_dir = _PROJECT_BASE
    else:
        inc_dir = get_path('platinclude')
    return os.path.join(inc_dir, 'pyconfig.h')


def get_scheme_names():
    """Return a tuple containing the schemes names."""
    return tuple(sorted(_SCHEMES.sections()))


def get_path_names():
    """Return a tuple containing the paths names."""
    # xxx see if we want a static list
    return _SCHEMES.options('posix_prefix')


def get_paths(scheme=_get_default_scheme(), vars=None, expand=True):
    """Return a mapping containing an install scheme.

    ``scheme`` is the install scheme name. If not provided, it will
    return the default scheme for the current platform.
    """
    _ensure_cfg_read()
    if expand:
        return _expand_vars(scheme, vars)
    else:
        return dict(_SCHEMES.items(scheme))


def get_path(name, scheme=_get_default_scheme(), vars=None, expand=True):
    """Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    """
    return get_paths(scheme, vars, expand)[name]


def get_config_vars(*args):
    """With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.

    On Unix, this means every variable defined in Python's installed Makefile;
    On Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    """
    global _CONFIG_VARS
    if _CONFIG_VARS is None:
        _CONFIG_VARS = {}
        # Normalized versions of prefix and exec_prefix are handy to have;
        # in fact, these are the standard versions used most places in the
        # distutils2 module.
        _CONFIG_VARS['prefix'] = _PREFIX
        _CONFIG_VARS['exec_prefix'] = _EXEC_PREFIX
        _CONFIG_VARS['py_version'] = _PY_VERSION
        _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT
        _CONFIG_VARS['py_version_nodot'] = _PY_VERSION[0] + _PY_VERSION[2]
        _CONFIG_VARS['base'] = _PREFIX
        _CONFIG_VARS['platbase'] = _EXEC_PREFIX
        _CONFIG_VARS['projectbase'] = _PROJECT_BASE
        try:
            _CONFIG_VARS['abiflags'] = sys.abiflags
        except AttributeError:
            # sys.abiflags may not be defined on all platforms.
            _CONFIG_VARS['abiflags'] = ''

        if os.name in ('nt', 'os2'):
            _init_non_posix(_CONFIG_VARS)
        if os.name == 'posix':
            _init_posix(_CONFIG_VARS)
        # Setting 'userbase' is done below the call to the
        # init function to enable using 'get_config_var' in
        # the init-function.
        if sys.version >= '2.6':
            _CONFIG_VARS['userbase'] = _getuserbase()

        if 'srcdir' not in _CONFIG_VARS:
            _CONFIG_VARS['srcdir'] = _PROJECT_BASE
        else:
            _CONFIG_VARS['srcdir'] = _safe_realpath(_CONFIG_VARS['srcdir'])

        # Convert srcdir into an absolute path if it appears necessary.
        # Normally it is relative to the build directory.  However, during
        # testing, for example, we might be running a non-installed python
        # from a different directory.
        if _PYTHON_BUILD and os.name == "posix":
            base = _PROJECT_BASE
            try:
                cwd = os.getcwd()
            except OSError:
                cwd = None
            if (not os.path.isabs(_CONFIG_VARS['srcdir']) and
                base != cwd):
                # srcdir is relative and we are not in the same directory
                # as the executable. Assume executable is in the build
                # directory and make srcdir absolute.
                srcdir = os.path.join(base, _CONFIG_VARS['srcdir'])
                _CONFIG_VARS['srcdir'] = os.path.normpath(srcdir)

        if sys.platform == 'darwin':
            kernel_version = os.uname()[2]  # Kernel version (8.4.3)
            major_version = int(kernel_version.split('.')[0])

            if major_version < 8:
                # On Mac OS X before 10.4, check if -arch and -isysroot
                # are in CFLAGS or LDFLAGS and remove them if they are.
                # This is needed when building extensions on a 10.3 system
                # using a universal build of python.
                for key in ('LDFLAGS', 'BASECFLAGS',
                        # a number of derived variables. These need to be
                        # patched up as well.
                        'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
                    flags = _CONFIG_VARS[key]
                    flags = re.sub('-arch\s+\w+\s', ' ', flags)
                    flags = re.sub('-isysroot [^ \t]*', ' ', flags)
                    _CONFIG_VARS[key] = flags
            else:
                # Allow the user to override the architecture flags using
                # an environment variable.
                # NOTE: This name was introduced by Apple in OSX 10.5 and
                # is used by several scripting languages distributed with
                # that OS release.
                if 'ARCHFLAGS' in os.environ:
                    arch = os.environ['ARCHFLAGS']
                    for key in ('LDFLAGS', 'BASECFLAGS',
                        # a number of derived variables. These need to be
                        # patched up as well.
                        'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):

                        flags = _CONFIG_VARS[key]
                        flags = re.sub('-arch\s+\w+\s', ' ', flags)
                        flags = flags + ' ' + arch
                        _CONFIG_VARS[key] = flags

                # If we're on OSX 10.5 or later and the user tries to
                # compiles an extension using an SDK that is not present
                # on the current machine it is better to not use an SDK
                # than to fail.
                #
                # The major usecase for this is users using a Python.org
                # binary installer  on OSX 10.6: that installer uses
                # the 10.4u SDK, but that SDK is not installed by default
                # when you install Xcode.
                #
                CFLAGS = _CONFIG_VARS.get('CFLAGS', '')
                m = re.search('-isysroot\s+(\S+)', CFLAGS)
                if m is not None:
                    sdk = m.group(1)
                    if not os.path.exists(sdk):
                        for key in ('LDFLAGS', 'BASECFLAGS',
                             # a number of derived variables. These need to be
                             # patched up as well.
                            'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):

                            flags = _CONFIG_VARS[key]
                            flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags)
                            _CONFIG_VARS[key] = flags

    if args:
        vals = []
        for name in args:
            vals.append(_CONFIG_VARS.get(name))
        return vals
    else:
        return _CONFIG_VARS


def get_config_var(name):
    """Return the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    """
    return get_config_vars().get(name)


def get_platform():
    """Return a string that identifies the current platform.

    This is used mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    """
    if os.name == 'nt':
        # sniff sys.version for architecture.
        prefix = " bit ("
        i = sys.version.find(prefix)
        if i == -1:
            return sys.platform
        j = sys.version.find(")", i)
        look = sys.version[i+len(prefix):j].lower()
        if look == 'amd64':
            return 'win-amd64'
        if look == 'itanium':
            return 'win-ia64'
        return sys.platform

    if os.name != "posix" or not hasattr(os, 'uname'):
        # XXX what about the architecture? NT is Intel or Alpha,
        # Mac OS is M68k or PPC, etc.
        return sys.platform

    # Try to distinguish various flavours of Unix
    osname, host, release, version, machine = os.uname()

    # Convert the OS name to lowercase, remove '/' characters
    # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh")
    osname = osname.lower().replace('/', '')
    machine = machine.replace(' ', '_')
    machine = machine.replace('/', '-')

    if osname[:5] == "linux":
        # At least on Linux/Intel, 'machine' is the processor --
        # i386, etc.
        # XXX what about Alpha, SPARC, etc?
        return  "%s-%s" % (osname, machine)
    elif osname[:5] == "sunos":
        if release[0] >= "5":           # SunOS 5 == Solaris 2
            osname = "solaris"
            release = "%d.%s" % (int(release[0]) - 3, release[2:])
        # fall through to standard osname-release-machine representation
    elif osname[:4] == "irix":              # could be "irix64"!
        return "%s-%s" % (osname, release)
    elif osname[:3] == "aix":
        return "%s-%s.%s" % (osname, version, release)
    elif osname[:6] == "cygwin":
        osname = "cygwin"
        rel_re = re.compile(r'[\d.]+')
        m = rel_re.match(release)
        if m:
            release = m.group()
    elif osname[:6] == "darwin":
        #
        # For our purposes, we'll assume that the system version from
        # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set
        # to. This makes the compatibility story a bit more sane because the
        # machine is going to compile and link as if it were
        # MACOSX_DEPLOYMENT_TARGET.
        cfgvars = get_config_vars()
        macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET')

        if True:
            # Always calculate the release of the running machine,
            # needed to determine if we can build fat binaries or not.

            macrelease = macver
            # Get the system version. Reading this plist is a documented
            # way to get the system version (see the documentation for
            # the Gestalt Manager)
            try:
                f = open('/System/Library/CoreServices/SystemVersion.plist')
            except IOError:
                # We're on a plain darwin box, fall back to the default
                # behaviour.
                pass
            else:
                try:
                    m = re.search(r'<key>ProductUserVisibleVersion</key>\s*'
                                  r'<string>(.*?)</string>', f.read())
                finally:
                    f.close()
                if m is not None:
                    macrelease = '.'.join(m.group(1).split('.')[:2])
                # else: fall back to the default behaviour

        if not macver:
            macver = macrelease

        if macver:
            release = macver
            osname = "macosx"

            if ((macrelease + '.') >= '10.4.' and
                '-arch' in get_config_vars().get('CFLAGS', '').strip()):
                # The universal build will build fat binaries, but not on
                # systems before 10.4
                #
                # Try to detect 4-way universal builds, those have machine-type
                # 'universal' instead of 'fat'.

                machine = 'fat'
                cflags = get_config_vars().get('CFLAGS')

                archs = re.findall('-arch\s+(\S+)', cflags)
                archs = tuple(sorted(set(archs)))

                if len(archs) == 1:
                    machine = archs[0]
                elif archs == ('i386', 'ppc'):
                    machine = 'fat'
                elif archs == ('i386', 'x86_64'):
                    machine = 'intel'
                elif archs == ('i386', 'ppc', 'x86_64'):
                    machine = 'fat3'
                elif archs == ('ppc64', 'x86_64'):
                    machine = 'fat64'
                elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'):
                    machine = 'universal'
                else:
                    raise ValueError(
                       "Don't know machine value for archs=%r" % (archs,))

            elif machine == 'i386':
                # On OSX the machine type returned by uname is always the
                # 32-bit variant, even if the executable architecture is
                # the 64-bit variant
                if sys.maxsize >= 2**32:
                    machine = 'x86_64'

            elif machine in ('PowerPC', 'Power_Macintosh'):
                # Pick a sane name for the PPC architecture.
                # See 'i386' case
                if sys.maxsize >= 2**32:
                    machine = 'ppc64'
                else:
                    machine = 'ppc'

    return "%s-%s-%s" % (osname, release, machine)


def get_python_version():
    return _PY_VERSION_SHORT


def _print_dict(title, data):
    for index, (key, value) in enumerate(sorted(data.items())):
        if index == 0:
            print('%s: ' % (title))
        print('\t%s = "%s"' % (key, value))


def _main():
    """Display all information sysconfig detains."""
    print('Platform: "%s"' % get_platform())
    print('Python version: "%s"' % get_python_version())
    print('Current installation scheme: "%s"' % _get_default_scheme())
    print()
    _print_dict('Paths', get_paths())
    print()
    _print_dict('Variables', get_config_vars())


if __name__ == '__main__':
    _main()
python3.3/site-packages/pip/_vendor/distlib/_backport/misc.py000064400000001713151733566750020204 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Backports for individual classes and functions."""

import os
import sys

__all__ = ['cache_from_source', 'callable', 'fsencode']


try:
    from imp import cache_from_source
except ImportError:
    def cache_from_source(py_file, debug=__debug__):
        ext = debug and 'c' or 'o'
        return py_file + ext


try:
    callable = callable
except NameError:
    from collections import Callable

    def callable(obj):
        return isinstance(obj, Callable)


try:
    fsencode = os.fsencode
except AttributeError:
    def fsencode(filename):
        if isinstance(filename, bytes):
            return filename
        elif isinstance(filename, str):
            return filename.encode(sys.getfilesystemencoding())
        else:
            raise TypeError("expect bytes or str, not %s" %
                            type(filename).__name__)
python3.3/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg000064400000005071151733566750021365 0ustar00[posix_prefix]
# Configuration directories.  Some of these come straight out of the
# configure script.  They are for implementing the other variables, not to
# be used directly in [resource_locations].
confdir = /etc
datadir = /usr/share
libdir = /usr/lib
statedir = /var
# User resource directory
local = ~/.local/{distribution.name}

stdlib = {base}/lib/python{py_version_short}
platstdlib = {platbase}/lib/python{py_version_short}
purelib = {base}/lib/python{py_version_short}/site-packages
platlib = {platbase}/lib/python{py_version_short}/site-packages
include = {base}/include/python{py_version_short}{abiflags}
platinclude = {platbase}/include/python{py_version_short}{abiflags}
data = {base}

[posix_home]
stdlib = {base}/lib/python
platstdlib = {base}/lib/python
purelib = {base}/lib/python
platlib = {base}/lib/python
include = {base}/include/python
platinclude = {base}/include/python
scripts = {base}/bin
data = {base}

[nt]
stdlib = {base}/Lib
platstdlib = {base}/Lib
purelib = {base}/Lib/site-packages
platlib = {base}/Lib/site-packages
include = {base}/Include
platinclude = {base}/Include
scripts = {base}/Scripts
data = {base}

[os2]
stdlib = {base}/Lib
platstdlib = {base}/Lib
purelib = {base}/Lib/site-packages
platlib = {base}/Lib/site-packages
include = {base}/Include
platinclude = {base}/Include
scripts = {base}/Scripts
data = {base}

[os2_home]
stdlib = {userbase}/lib/python{py_version_short}
platstdlib = {userbase}/lib/python{py_version_short}
purelib = {userbase}/lib/python{py_version_short}/site-packages
platlib = {userbase}/lib/python{py_version_short}/site-packages
include = {userbase}/include/python{py_version_short}
scripts = {userbase}/bin
data = {userbase}

[nt_user]
stdlib = {userbase}/Python{py_version_nodot}
platstdlib = {userbase}/Python{py_version_nodot}
purelib = {userbase}/Python{py_version_nodot}/site-packages
platlib = {userbase}/Python{py_version_nodot}/site-packages
include = {userbase}/Python{py_version_nodot}/Include
scripts = {userbase}/Scripts
data = {userbase}

[posix_user]
stdlib = {userbase}/lib/python{py_version_short}
platstdlib = {userbase}/lib/python{py_version_short}
purelib = {userbase}/lib/python{py_version_short}/site-packages
platlib = {userbase}/lib/python{py_version_short}/site-packages
include = {userbase}/include/python{py_version_short}
scripts = {userbase}/bin
data = {userbase}

[osx_framework_user]
stdlib = {userbase}/lib/python
platstdlib = {userbase}/lib/python
purelib = {userbase}/lib/python/site-packages
platlib = {userbase}/lib/python/site-packages
include = {userbase}/include
scripts = {userbase}/bin
data = {userbase}
python3.3/site-packages/pip/_vendor/distlib/manifest.py000064400000032271151733566750017116 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.
"""
import fnmatch
import logging
import os
import re

from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']

logger = logging.getLogger(__name__)

# a \ followed by some spaces + EOL
_COLLAPSE_PATTERN = re.compile('\\\w*\n', re.M)
_COMMENTED_LINE = re.compile('#.*?(?=\n)|\n(?=$)', re.M | re.S)


class Manifest(object):
    """A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    """

    def __init__(self, base=None):
        """
        Initialise an instance.

        :param base: The base directory to explore under.
        """
        self.base = os.path.abspath(os.path.normpath(base or os.getcwd()))
        self.prefix = self.base + os.sep
        self.allfiles = None
        self.files = set()

    #
    # Public API
    #

    def findall(self):
        """Find all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        """
        from stat import S_ISREG, S_ISDIR, S_ISLNK

        self.allfiles = allfiles = []
        root = self.base
        stack = [root]
        pop = stack.pop
        push = stack.append

        while stack:
            root = pop()
            names = os.listdir(root)

            for name in names:
                fullname = os.path.join(root, name)

                # Avoid excess stat calls -- just one will do, thank you!
                stat = os.stat(fullname)
                mode = stat.st_mode
                if S_ISREG(mode):
                    allfiles.append(fsdecode(fullname))
                elif S_ISDIR(mode) and not S_ISLNK(mode):
                    push(fullname)

    def add(self, item):
        """
        Add a file to the manifest.

        :param item: The pathname to add. This can be relative to the base.
        """
        if not item.startswith(self.prefix):
            item = os.path.join(self.base, item)
        self.files.add(os.path.normpath(item))

    def add_many(self, items):
        """
        Add a list of files to the manifest.

        :param items: The pathnames to add. These can be relative to the base.
        """
        for item in items:
            self.add(item)

    def sorted(self, wantdirs=False):
        """
        Return sorted files in directory order
        """

        def add_dir(dirs, d):
            dirs.add(d)
            logger.debug('add_dir added %s', d)
            if d != self.base:
                parent, _ = os.path.split(d)
                assert parent not in ('', '/')
                add_dir(dirs, parent)

        result = set(self.files)    # make a copy!
        if wantdirs:
            dirs = set()
            for f in result:
                add_dir(dirs, os.path.dirname(f))
            result |= dirs
        return [os.path.join(*path_tuple) for path_tuple in
                sorted(os.path.split(path) for path in result)]

    def clear(self):
        """Clear all collected files."""
        self.files = set()
        self.allfiles = []

    def process_directive(self, directive):
        """
        Process a directive which either adds some files from ``allfiles`` to
        ``files``, or removes some files from ``files``.

        :param directive: The directive to process. This should be in a format
                     compatible with distutils ``MANIFEST.in`` files:

                     http://docs.python.org/distutils/sourcedist.html#commands
        """
        # Parse the line: split it up, make sure the right number of words
        # is there, and return the relevant words.  'action' is always
        # defined: it's the first word of the line.  Which of the other
        # three are defined depends on the action; it'll be either
        # patterns, (dir and patterns), or (dirpattern).
        action, patterns, thedir, dirpattern = self._parse_directive(directive)

        # OK, now we know that the action is valid and we have the
        # right number of words on the line for that action -- so we
        # can proceed with minimal error-checking.
        if action == 'include':
            for pattern in patterns:
                if not self._include_pattern(pattern, anchor=True):
                    logger.warning('no files found matching %r', pattern)

        elif action == 'exclude':
            for pattern in patterns:
                if not self._exclude_pattern(pattern, anchor=True):
                    logger.warning('no previously-included files '
                                   'found matching %r', pattern)

        elif action == 'global-include':
            for pattern in patterns:
                if not self._include_pattern(pattern, anchor=False):
                    logger.warning('no files found matching %r '
                                   'anywhere in distribution', pattern)

        elif action == 'global-exclude':
            for pattern in patterns:
                if not self._exclude_pattern(pattern, anchor=False):
                    logger.warning('no previously-included files '
                                   'matching %r found anywhere in '
                                   'distribution', pattern)

        elif action == 'recursive-include':
            for pattern in patterns:
                if not self._include_pattern(pattern, prefix=thedir):
                    logger.warning('no files found matching %r '
                                   'under directory %r', pattern, thedir)

        elif action == 'recursive-exclude':
            for pattern in patterns:
                if not self._exclude_pattern(pattern, prefix=thedir):
                    logger.warning('no previously-included files '
                                   'matching %r found under directory %r',
                                   pattern, thedir)

        elif action == 'graft':
            if not self._include_pattern(None, prefix=dirpattern):
                logger.warning('no directories found matching %r',
                               dirpattern)

        elif action == 'prune':
            if not self._exclude_pattern(None, prefix=dirpattern):
                logger.warning('no previously-included directories found '
                               'matching %r', dirpattern)
        else:   # pragma: no cover
            # This should never happen, as it should be caught in
            # _parse_template_line
            raise DistlibException(
                'invalid action %r' % action)

    #
    # Private API
    #

    def _parse_directive(self, directive):
        """
        Validate a directive.
        :param directive: The directive to validate.
        :return: A tuple of action, patterns, thedir, dir_patterns
        """
        words = directive.split()
        if len(words) == 1 and words[0] not in ('include', 'exclude',
                                                'global-include',
                                                'global-exclude',
                                                'recursive-include',
                                                'recursive-exclude',
                                                'graft', 'prune'):
            # no action given, let's use the default 'include'
            words.insert(0, 'include')

        action = words[0]
        patterns = thedir = dir_pattern = None

        if action in ('include', 'exclude',
                      'global-include', 'global-exclude'):
            if len(words) < 2:
                raise DistlibException(
                    '%r expects <pattern1> <pattern2> ...' % action)

            patterns = [convert_path(word) for word in words[1:]]

        elif action in ('recursive-include', 'recursive-exclude'):
            if len(words) < 3:
                raise DistlibException(
                    '%r expects <dir> <pattern1> <pattern2> ...' % action)

            thedir = convert_path(words[1])
            patterns = [convert_path(word) for word in words[2:]]

        elif action in ('graft', 'prune'):
            if len(words) != 2:
                raise DistlibException(
                    '%r expects a single <dir_pattern>' % action)

            dir_pattern = convert_path(words[1])

        else:
            raise DistlibException('unknown action %r' % action)

        return action, patterns, thedir, dir_pattern

    def _include_pattern(self, pattern, anchor=True, prefix=None,
                         is_regex=False):
        """Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found.
        """
        # XXX docstring lying about what the special chars are?
        found = False
        pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)

        # delayed loading of allfiles list
        if self.allfiles is None:
            self.findall()

        for name in self.allfiles:
            if pattern_re.search(name):
                self.files.add(name)
                found = True
        return found

    def _exclude_pattern(self, pattern, anchor=True, prefix=None,
                         is_regex=False):
        """Remove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return True if files are
        found.

        This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
        packaging source distributions
        """
        found = False
        pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)
        for f in list(self.files):
            if pattern_re.search(f):
                self.files.remove(f)
                found = True
        return found

    def _translate_pattern(self, pattern, anchor=True, prefix=None,
                           is_regex=False):
        """Translate a shell-like wildcard pattern to a compiled regular
        expression.

        Return the compiled regex.  If 'is_regex' true,
        then 'pattern' is directly compiled to a regex (if it's a string)
        or just returned as-is (assumes it's a regex object).
        """
        if is_regex:
            if isinstance(pattern, str):
                return re.compile(pattern)
            else:
                return pattern

        if pattern:
            pattern_re = self._glob_to_re(pattern)
        else:
            pattern_re = ''

        base = re.escape(os.path.join(self.base, ''))
        if prefix is not None:
            # ditch end of pattern character
            empty_pattern = self._glob_to_re('')
            prefix_re = self._glob_to_re(prefix)[:-len(empty_pattern)]
            sep = os.sep
            if os.sep == '\\':
                sep = r'\\'
            pattern_re = '^' + base + sep.join((prefix_re,
                                                '.*' + pattern_re))
        else:                               # no prefix -- respect anchor flag
            if anchor:
                pattern_re = '^' + base + pattern_re

        return re.compile(pattern_re)

    def _glob_to_re(self, pattern):
        """Translate a shell-like glob pattern to a regular expression.

        Return a string containing the regex.  Differs from
        'fnmatch.translate()' in that '*' does not match "special characters"
        (which are platform-specific).
        """
        pattern_re = fnmatch.translate(pattern)

        # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
        # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
        # and by extension they shouldn't match such "special characters" under
        # any OS.  So change all non-escaped dots in the RE to match any
        # character except the special characters (currently: just os.sep).
        sep = os.sep
        if os.sep == '\\':
            # we're using a regex to manipulate a regex, so we need
            # to escape the backslash twice
            sep = r'\\\\'
        escaped = r'\1[^%s]' % sep
        pattern_re = re.sub(r'((?<!\\)(\\\\)*)\.', escaped, pattern_re)
        return pattern_re
python3.3/site-packages/pip/_vendor/distlib/util.py000064400000144036151733566750016270 0ustar00#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import codecs
from collections import deque
import contextlib
import csv
from glob import iglob as std_iglob
import io
import json
import logging
import os
import py_compile
import re
import shutil
import socket
import ssl
import subprocess
import sys
import tarfile
import tempfile
try:
    import threading
except ImportError:
    import dummy_threading as threading
import time

from . import DistlibException
from .compat import (string_types, text_type, shutil, raw_input, StringIO,
                     cache_from_source, urlopen, httplib, xmlrpclib, splittype,
                     HTTPHandler, HTTPSHandler as BaseHTTPSHandler,
                     BaseConfigurator, valid_ident, Container, configparser,
                     URLError, match_hostname, CertificateError, ZipFile)

logger = logging.getLogger(__name__)

#
# Requirement parsing code for name + optional constraints + optional extras
#
# e.g. 'foo >= 1.2, < 2.0 [bar, baz]'
#
# The regex can seem a bit hairy, so we build it up out of smaller pieces
# which are manageable.
#

COMMA = r'\s*,\s*'
COMMA_RE = re.compile(COMMA)

IDENT = r'(\w|[.-])+'
EXTRA_IDENT = r'(\*|:(\*|\w+):|' + IDENT + ')'
VERSPEC = IDENT + r'\*?'

RELOP = '([<>=!~]=)|[<>]'

#
# The first relop is optional - if absent, will be taken as '~='
#
BARE_CONSTRAINTS = ('(' + RELOP + r')?\s*(' + VERSPEC + ')(' + COMMA + '(' +
                    RELOP + r')\s*(' + VERSPEC + '))*')

DIRECT_REF = '(from\s+(?P<diref>.*))'

#
# Either the bare constraints or the bare constraints in parentheses
#
CONSTRAINTS = (r'\(\s*(?P<c1>' + BARE_CONSTRAINTS + '|' + DIRECT_REF +
               r')\s*\)|(?P<c2>' + BARE_CONSTRAINTS + '\s*)')

EXTRA_LIST = EXTRA_IDENT + '(' + COMMA + EXTRA_IDENT + ')*'
EXTRAS = r'\[\s*(?P<ex>' + EXTRA_LIST + r')?\s*\]'
REQUIREMENT = ('(?P<dn>'  + IDENT + r')\s*(' + EXTRAS + r'\s*)?(\s*' +
               CONSTRAINTS + ')?$')
REQUIREMENT_RE = re.compile(REQUIREMENT)

#
# Used to scan through the constraints
#
RELOP_IDENT = '(?P<op>' + RELOP + r')\s*(?P<vn>' + VERSPEC + ')'
RELOP_IDENT_RE = re.compile(RELOP_IDENT)

def parse_requirement(s):

    def get_constraint(m):
        d = m.groupdict()
        return d['op'], d['vn']

    result = None
    m = REQUIREMENT_RE.match(s)
    if m:
        d = m.groupdict()
        name = d['dn']
        cons = d['c1'] or d['c2']
        if not d['diref']:
            url = None
        else:
            # direct reference
            cons = None
            url = d['diref'].strip()
        if not cons:
            cons = None
            constr = ''
            rs = d['dn']
        else:
            if cons[0] not in '<>!=':
                cons = '~=' + cons
            iterator = RELOP_IDENT_RE.finditer(cons)
            cons = [get_constraint(m) for m in iterator]
            rs = '%s (%s)' % (name, ', '.join(['%s %s' % con for con in cons]))
        if not d['ex']:
            extras = None
        else:
            extras = COMMA_RE.split(d['ex'])
        result = Container(name=name, constraints=cons, extras=extras,
                           requirement=rs, source=s, url=url)
    return result


def get_resources_dests(resources_root, rules):
    """Find destinations for resources files"""

    def get_rel_path(base, path):
        # normalizes and returns a lstripped-/-separated path
        base = base.replace(os.path.sep, '/')
        path = path.replace(os.path.sep, '/')
        assert path.startswith(base)
        return path[len(base):].lstrip('/')


    destinations = {}
    for base, suffix, dest in rules:
        prefix = os.path.join(resources_root, base)
        for abs_base in iglob(prefix):
            abs_glob = os.path.join(abs_base, suffix)
            for abs_path in iglob(abs_glob):
                resource_file = get_rel_path(resources_root, abs_path)
                if dest is None:  # remove the entry if it was here
                    destinations.pop(resource_file, None)
                else:
                    rel_path = get_rel_path(abs_base, abs_path)
                    rel_dest = dest.replace(os.path.sep, '/').rstrip('/')
                    destinations[resource_file] = rel_dest + '/' + rel_path
    return destinations


def in_venv():
    if hasattr(sys, 'real_prefix'):
        # virtualenv venvs
        result = True
    else:
        # PEP 405 venvs
        result = sys.prefix != getattr(sys, 'base_prefix', sys.prefix)
    return result


def get_executable():
    if sys.platform == 'darwin' and ('__PYVENV_LAUNCHER__'
                                     in os.environ):
        result =  os.environ['__PYVENV_LAUNCHER__']
    else:
        result = sys.executable
    return result


def proceed(prompt, allowed_chars, error_prompt=None, default=None):
    p = prompt
    while True:
        s = raw_input(p)
        p = prompt
        if not s and default:
            s = default
        if s:
            c = s[0].lower()
            if c in allowed_chars:
                break
            if error_prompt:
                p = '%c: %s\n%s' % (c, error_prompt, prompt)
    return c


def extract_by_key(d, keys):
    if isinstance(keys, string_types):
        keys = keys.split()
    result = {}
    for key in keys:
        if key in d:
            result[key] = d[key]
    return result

def read_exports(stream):
    if sys.version_info[0] >= 3:
        # needs to be a text stream
        stream = codecs.getreader('utf-8')(stream)
    # Try to load as JSON, falling back on legacy format
    data = stream.read()
    stream = StringIO(data)
    try:
        data = json.load(stream)
        result = data['exports']
        for group, entries in result.items():
            for k, v in entries.items():
                s = '%s = %s' % (k, v)
                entry = get_export_entry(s)
                assert entry is not None
                entries[k] = entry
        return result
    except Exception:
        stream.seek(0, 0)
    cp = configparser.ConfigParser()
    if hasattr(cp, 'read_file'):
        cp.read_file(stream)
    else:
        cp.readfp(stream)
    result = {}
    for key in cp.sections():
        result[key] = entries = {}
        for name, value in cp.items(key):
            s = '%s = %s' % (name, value)
            entry = get_export_entry(s)
            assert entry is not None
            #entry.dist = self
            entries[name] = entry
    return result


def write_exports(exports, stream):
    if sys.version_info[0] >= 3:
        # needs to be a text stream
        stream = codecs.getwriter('utf-8')(stream)
    cp = configparser.ConfigParser()
    for k, v in exports.items():
        # TODO check k, v for valid values
        cp.add_section(k)
        for entry in v.values():
            if entry.suffix is None:
                s = entry.prefix
            else:
                s = '%s:%s' % (entry.prefix, entry.suffix)
            if entry.flags:
                s = '%s [%s]' % (s, ', '.join(entry.flags))
            cp.set(k, entry.name, s)
    cp.write(stream)


@contextlib.contextmanager
def tempdir():
    td = tempfile.mkdtemp()
    try:
        yield td
    finally:
        shutil.rmtree(td)

@contextlib.contextmanager
def chdir(d):
    cwd = os.getcwd()
    try:
        os.chdir(d)
        yield
    finally:
        os.chdir(cwd)


@contextlib.contextmanager
def socket_timeout(seconds=15):
    cto = socket.getdefaulttimeout()
    try:
        socket.setdefaulttimeout(seconds)
        yield
    finally:
        socket.setdefaulttimeout(cto)


class cached_property(object):
    def __init__(self, func):
        self.func = func
        #for attr in ('__name__', '__module__', '__doc__'):
        #    setattr(self, attr, getattr(func, attr, None))

    def __get__(self, obj, cls=None):
        if obj is None:
            return self
        value = self.func(obj)
        object.__setattr__(obj, self.func.__name__, value)
        #obj.__dict__[self.func.__name__] = value = self.func(obj)
        return value

def convert_path(pathname):
    """Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    """
    if os.sep == '/':
        return pathname
    if not pathname:
        return pathname
    if pathname[0] == '/':
        raise ValueError("path '%s' cannot be absolute" % pathname)
    if pathname[-1] == '/':
        raise ValueError("path '%s' cannot end with '/'" % pathname)

    paths = pathname.split('/')
    while os.curdir in paths:
        paths.remove(os.curdir)
    if not paths:
        return os.curdir
    return os.path.join(*paths)


class FileOperator(object):
    def __init__(self, dry_run=False):
        self.dry_run = dry_run
        self.ensured = set()
        self._init_record()

    def _init_record(self):
        self.record = False
        self.files_written = set()
        self.dirs_created = set()

    def record_as_written(self, path):
        if self.record:
            self.files_written.add(path)

    def newer(self, source, target):
        """Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        """
        if not os.path.exists(source):
            raise DistlibException("file '%r' does not exist" %
                                   os.path.abspath(source))
        if not os.path.exists(target):
            return True

        return os.stat(source).st_mtime > os.stat(target).st_mtime

    def copy_file(self, infile, outfile, check=True):
        """Copy a file respecting dry-run and force flags.
        """
        self.ensure_dir(os.path.dirname(outfile))
        logger.info('Copying %s to %s', infile, outfile)
        if not self.dry_run:
            msg = None
            if check:
                if os.path.islink(outfile):
                    msg = '%s is a symlink' % outfile
                elif os.path.exists(outfile) and not os.path.isfile(outfile):
                    msg = '%s is a non-regular file' % outfile
            if msg:
                raise ValueError(msg + ' which would be overwritten')
            shutil.copyfile(infile, outfile)
        self.record_as_written(outfile)

    def copy_stream(self, instream, outfile, encoding=None):
        assert not os.path.isdir(outfile)
        self.ensure_dir(os.path.dirname(outfile))
        logger.info('Copying stream %s to %s', instream, outfile)
        if not self.dry_run:
            if encoding is None:
                outstream = open(outfile, 'wb')
            else:
                outstream = codecs.open(outfile, 'w', encoding=encoding)
            try:
                shutil.copyfileobj(instream, outstream)
            finally:
                outstream.close()
        self.record_as_written(outfile)

    def write_binary_file(self, path, data):
        self.ensure_dir(os.path.dirname(path))
        if not self.dry_run:
            with open(path, 'wb') as f:
                f.write(data)
        self.record_as_written(path)

    def write_text_file(self, path, data, encoding):
        self.ensure_dir(os.path.dirname(path))
        if not self.dry_run:
            with open(path, 'wb') as f:
                f.write(data.encode(encoding))
        self.record_as_written(path)

    def set_mode(self, bits, mask, files):
        if os.name == 'posix':
            # Set the executable bits (owner, group, and world) on
            # all the files specified.
            for f in files:
                if self.dry_run:
                    logger.info("changing mode of %s", f)
                else:
                    mode = (os.stat(f).st_mode | bits) & mask
                    logger.info("changing mode of %s to %o", f, mode)
                    os.chmod(f, mode)

    set_executable_mode = lambda s, f: s.set_mode(0o555, 0o7777, f)

    def ensure_dir(self, path):
        path = os.path.abspath(path)
        if path not in self.ensured and not os.path.exists(path):
            self.ensured.add(path)
            d, f = os.path.split(path)
            self.ensure_dir(d)
            logger.info('Creating %s' % path)
            if not self.dry_run:
                os.mkdir(path)
            if self.record:
                self.dirs_created.add(path)

    def byte_compile(self, path, optimize=False, force=False, prefix=None):
        dpath = cache_from_source(path, not optimize)
        logger.info('Byte-compiling %s to %s', path, dpath)
        if not self.dry_run:
            if force or self.newer(path, dpath):
                if not prefix:
                    diagpath = None
                else:
                    assert path.startswith(prefix)
                    diagpath = path[len(prefix):]
            py_compile.compile(path, dpath, diagpath, True)     # raise error
        self.record_as_written(dpath)
        return dpath

    def ensure_removed(self, path):
        if os.path.exists(path):
            if os.path.isdir(path) and not os.path.islink(path):
                logger.debug('Removing directory tree at %s', path)
                if not self.dry_run:
                    shutil.rmtree(path)
                if self.record:
                    if path in self.dirs_created:
                        self.dirs_created.remove(path)
            else:
                if os.path.islink(path):
                    s = 'link'
                else:
                    s = 'file'
                logger.debug('Removing %s %s', s, path)
                if not self.dry_run:
                    os.remove(path)
                if self.record:
                    if path in self.files_written:
                        self.files_written.remove(path)

    def is_writable(self, path):
        result = False
        while not result:
            if os.path.exists(path):
                result = os.access(path, os.W_OK)
                break
            parent = os.path.dirname(path)
            if parent == path:
                break
            path = parent
        return result

    def commit(self):
        """
        Commit recorded changes, turn off recording, return
        changes.
        """
        assert self.record
        result = self.files_written, self.dirs_created
        self._init_record()
        return result

    def rollback(self):
        if not self.dry_run:
            for f in list(self.files_written):
                if os.path.exists(f):
                    os.remove(f)
            # dirs should all be empty now, except perhaps for
            # __pycache__ subdirs
            # reverse so that subdirs appear before their parents
            dirs = sorted(self.dirs_created, reverse=True)
            for d in dirs:
                flist = os.listdir(d)
                if flist:
                    assert flist == ['__pycache__']
                    sd = os.path.join(d, flist[0])
                    os.rmdir(sd)
                os.rmdir(d)     # should fail if non-empty
        self._init_record()

def resolve(module_name, dotted_path):
    if module_name in sys.modules:
        mod = sys.modules[module_name]
    else:
        mod = __import__(module_name)
    if dotted_path is None:
        result = mod
    else:
        parts = dotted_path.split('.')
        result = getattr(mod, parts.pop(0))
        for p in parts:
            result = getattr(result, p)
    return result


class ExportEntry(object):
    def __init__(self, name, prefix, suffix, flags):
        self.name = name
        self.prefix = prefix
        self.suffix = suffix
        self.flags = flags

    @cached_property
    def value(self):
        return resolve(self.prefix, self.suffix)

    def __repr__(self):
        return '<ExportEntry %s = %s:%s %s>' % (self.name, self.prefix,
                                                self.suffix, self.flags)

    def __eq__(self, other):
        if not isinstance(other, ExportEntry):
            result = False
        else:
            result = (self.name == other.name and
                      self.prefix == other.prefix and
                      self.suffix == other.suffix and
                      self.flags == other.flags)
        return result

    __hash__ = object.__hash__


ENTRY_RE = re.compile(r'''(?P<name>(\w|[-.])+)
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>\w+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      ''', re.VERBOSE)


def get_export_entry(specification):
    m = ENTRY_RE.search(specification)
    if not m:
        result = None
        if '[' in specification or ']' in specification:
            raise DistlibException('Invalid specification '
                                   '%r' % specification)
    else:
        d = m.groupdict()
        name = d['name']
        path = d['callable']
        colons = path.count(':')
        if colons == 0:
            prefix, suffix = path, None
        else:
            if colons != 1:
                raise DistlibException('Invalid specification '
                                       '%r' % specification)
            prefix, suffix = path.split(':')
        flags = d['flags']
        if flags is None:
            if '[' in specification or ']' in specification:
                raise DistlibException('Invalid specification '
                                       '%r' % specification)
            flags = []
        else:
            flags = [f.strip() for f in flags.split(',')]
        result = ExportEntry(name, prefix, suffix, flags)
    return result


def get_cache_base(suffix=None):
    """
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    """
    if suffix is None:
        suffix = '.distlib'
    if os.name == 'nt' and 'LOCALAPPDATA' in os.environ:
        result = os.path.expandvars('$localappdata')
    else:
        # Assume posix, or old Windows
        result = os.path.expanduser('~')
    # we use 'isdir' instead of 'exists', because we want to
    # fail if there's a file with that name
    if os.path.isdir(result):
        usable = os.access(result, os.W_OK)
        if not usable:
            logger.warning('Directory exists but is not writable: %s', result)
    else:
        try:
            os.makedirs(result)
            usable = True
        except OSError:
            logger.warning('Unable to create %s', result, exc_info=True)
            usable = False
    if not usable:
        result = tempfile.mkdtemp()
        logger.warning('Default location unusable, using %s', result)
    return os.path.join(result, suffix)


def path_to_cache_dir(path):
    """
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    """
    d, p = os.path.splitdrive(os.path.abspath(path))
    if d:
        d = d.replace(':', '---')
    p = p.replace(os.sep, '--')
    return d + p + '.cache'


def ensure_slash(s):
    if not s.endswith('/'):
        return s + '/'
    return s


def parse_credentials(netloc):
    username = password = None
    if '@' in netloc:
        prefix, netloc = netloc.split('@', 1)
        if ':' not in prefix:
            username = prefix
        else:
            username, password = prefix.split(':', 1)
    return username, password, netloc


def get_process_umask():
    result = os.umask(0o22)
    os.umask(result)
    return result

def is_string_sequence(seq):
    result = True
    i = None
    for i, s in enumerate(seq):
        if not isinstance(s, string_types):
            result = False
            break
    assert i is not None
    return result

PROJECT_NAME_AND_VERSION = re.compile('([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-'
                                      '([a-z0-9_.+-]+)', re.I)
PYTHON_VERSION = re.compile(r'-py(\d\.?\d?)')


def split_filename(filename, project_name=None):
    """
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    """
    result = None
    pyver = None
    m = PYTHON_VERSION.search(filename)
    if m:
        pyver = m.group(1)
        filename = filename[:m.start()]
    if project_name and len(filename) > len(project_name) + 1:
        m = re.match(re.escape(project_name) + r'\b', filename)
        if m:
            n = m.end()
            result = filename[:n], filename[n + 1:], pyver
    if result is None:
        m = PROJECT_NAME_AND_VERSION.match(filename)
        if m:
            result = m.group(1), m.group(3), pyver
    return result

# Allow spaces in name because of legacy dists like "Twisted Core"
NAME_VERSION_RE = re.compile(r'(?P<name>[\w .-]+)\s*'
                             r'\(\s*(?P<ver>[^\s)]+)\)$')

def parse_name_and_version(p):
    """
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    """
    m = NAME_VERSION_RE.match(p)
    if not m:
        raise DistlibException('Ill-formed name/version string: \'%s\'' % p)
    d = m.groupdict()
    return d['name'].strip().lower(), d['ver']

def get_extras(requested, available):
    result = set()
    requested = set(requested or [])
    available = set(available or [])
    if '*' in requested:
        requested.remove('*')
        result |= available
    for r in requested:
        if r == '-':
            result.add(r)
        elif r.startswith('-'):
            unwanted = r[1:]
            if unwanted not in available:
                logger.warning('undeclared extra: %s' % unwanted)
            if unwanted in result:
                result.remove(unwanted)
        else:
            if r not in available:
                logger.warning('undeclared extra: %s' % r)
            result.add(r)
    return result
#
# Extended metadata functionality
#

def _get_external_data(url):
    result = {}
    try:
        # urlopen might fail if it runs into redirections,
        # because of Python issue #13696. Fixed in locators
        # using a custom redirect handler.
        resp = urlopen(url)
        headers = resp.info()
        if headers.get('Content-Type') != 'application/json':
            logger.debug('Unexpected response for JSON request')
        else:
            reader = codecs.getreader('utf-8')(resp)
            #data = reader.read().decode('utf-8')
            #result = json.loads(data)
            result = json.load(reader)
    except Exception as e:
        logger.exception('Failed to get external data for %s: %s', url, e)
    return result


def get_project_data(name):
    url = ('https://www.red-dove.com/pypi/projects/'
           '%s/%s/project.json' % (name[0].upper(), name))
    result = _get_external_data(url)
    return result

def get_package_data(name, version):
    url = ('https://www.red-dove.com/pypi/projects/'
           '%s/%s/package-%s.json' % (name[0].upper(), name, version))
    return _get_external_data(url)


class Cache(object):
    """
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    """

    def __init__(self, base):
        """
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        """
        # we use 'isdir' instead of 'exists', because we want to
        # fail if there's a file with that name
        if not os.path.isdir(base):
            os.makedirs(base)
        if (os.stat(base).st_mode & 0o77) != 0:
            logger.warning('Directory \'%s\' is not private', base)
        self.base = os.path.abspath(os.path.normpath(base))

    def prefix_to_dir(self, prefix):
        """
        Converts a resource prefix to a directory name in the cache.
        """
        return path_to_cache_dir(prefix)

    def clear(self):
        """
        Clear the cache.
        """
        not_removed = []
        for fn in os.listdir(self.base):
            fn = os.path.join(self.base, fn)
            try:
                if os.path.islink(fn) or os.path.isfile(fn):
                    os.remove(fn)
                elif os.path.isdir(fn):
                    shutil.rmtree(fn)
            except Exception:
                not_removed.append(fn)
        return not_removed


class EventMixin(object):
    """
    A very simple publish/subscribe system.
    """
    def __init__(self):
        self._subscribers = {}

    def add(self, event, subscriber, append=True):
        """
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        """
        subs = self._subscribers
        if event not in subs:
            subs[event] = deque([subscriber])
        else:
            sq = subs[event]
            if append:
                sq.append(subscriber)
            else:
                sq.appendleft(subscriber)

    def remove(self, event, subscriber):
        """
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        """
        subs = self._subscribers
        if event not in subs:
            raise ValueError('No subscribers: %r' % event)
        subs[event].remove(subscriber)

    def get_subscribers(self, event):
        """
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        """
        return iter(self._subscribers.get(event, ()))

    def publish(self, event, *args, **kwargs):
        """
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        """
        result = []
        for subscriber in self.get_subscribers(event):
            try:
                value = subscriber(event, *args, **kwargs)
            except Exception:
                logger.exception('Exception during event publication')
                value = None
            result.append(value)
        logger.debug('publish %s: args = %s, kwargs = %s, result = %s',
                     event, args, kwargs, result)
        return result

#
# Simple sequencing
#
class Sequencer(object):
    def __init__(self):
        self._preds = {}
        self._succs = {}
        self._nodes = set()     # nodes with no preds/succs

    def add_node(self, node):
        self._nodes.add(node)

    def remove_node(self, node, edges=False):
        if node in self._nodes:
            self._nodes.remove(node)
        if edges:
            for p in set(self._preds.get(node, ())):
                self.remove(p, node)
            for s in set(self._succs.get(node, ())):
                self.remove(node, s)
            # Remove empties
            for k, v in list(self._preds.items()):
                if not v:
                    del self._preds[k]
            for k, v in list(self._succs.items()):
                if not v:
                    del self._succs[k]

    def add(self, pred, succ):
        assert pred != succ
        self._preds.setdefault(succ, set()).add(pred)
        self._succs.setdefault(pred, set()).add(succ)

    def remove(self, pred, succ):
        assert pred != succ
        try:
            preds = self._preds[succ]
            succs = self._succs[pred]
        except KeyError:
            raise ValueError('%r not a successor of anything' % succ)
        try:
            preds.remove(pred)
            succs.remove(succ)
        except KeyError:
            raise ValueError('%r not a successor of %r' % (succ, pred))

    def is_step(self, step):
        return (step in self._preds or step in self._succs or
                step in self._nodes)

    def get_steps(self, final):
        if not self.is_step(final):
            raise ValueError('Unknown: %r' % final)
        result = []
        todo = []
        seen = set()
        todo.append(final)
        while todo:
            step = todo.pop(0)
            if step in seen:
                # if a step was already seen,
                # move it to the end (so it will appear earlier
                # when reversed on return) ... but not for the
                # final step, as that would be confusing for
                # users
                if step != final:
                    result.remove(step)
                    result.append(step)
            else:
                seen.add(step)
                result.append(step)
                preds = self._preds.get(step, ())
                todo.extend(preds)
        return reversed(result)

    @property
    def strong_connections(self):
        #http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
        index_counter = [0]
        stack = []
        lowlinks = {}
        index = {}
        result = []

        graph = self._succs

        def strongconnect(node):
            # set the depth index for this node to the smallest unused index
            index[node] = index_counter[0]
            lowlinks[node] = index_counter[0]
            index_counter[0] += 1
            stack.append(node)

            # Consider successors
            try:
                successors = graph[node]
            except Exception:
                successors = []
            for successor in successors:
                if successor not in lowlinks:
                    # Successor has not yet been visited
                    strongconnect(successor)
                    lowlinks[node] = min(lowlinks[node],lowlinks[successor])
                elif successor in stack:
                    # the successor is in the stack and hence in the current
                    # strongly connected component (SCC)
                    lowlinks[node] = min(lowlinks[node],index[successor])

            # If `node` is a root node, pop the stack and generate an SCC
            if lowlinks[node] == index[node]:
                connected_component = []

                while True:
                    successor = stack.pop()
                    connected_component.append(successor)
                    if successor == node: break
                component = tuple(connected_component)
                # storing the result
                result.append(component)

        for node in graph:
            if node not in lowlinks:
                strongconnect(node)

        return result

    @property
    def dot(self):
        result = ['digraph G {']
        for succ in self._preds:
            preds = self._preds[succ]
            for pred in preds:
                result.append('  %s -> %s;' % (pred, succ))
        for node in self._nodes:
            result.append('  %s;' % node)
        result.append('}')
        return '\n'.join(result)

#
# Unarchiving functionality for zip, tar, tgz, tbz, whl
#

ARCHIVE_EXTENSIONS = ('.tar.gz', '.tar.bz2', '.tar', '.zip',
                      '.tgz', '.tbz', '.whl')

def unarchive(archive_filename, dest_dir, format=None, check=True):

    def check_path(path):
        if not isinstance(path, text_type):
            path = path.decode('utf-8')
        p = os.path.abspath(os.path.join(dest_dir, path))
        if not p.startswith(dest_dir) or p[plen] != os.sep:
            raise ValueError('path outside destination: %r' % p)

    dest_dir = os.path.abspath(dest_dir)
    plen = len(dest_dir)
    archive = None
    if format is None:
        if archive_filename.endswith(('.zip', '.whl')):
            format = 'zip'
        elif archive_filename.endswith(('.tar.gz', '.tgz')):
            format = 'tgz'
            mode = 'r:gz'
        elif archive_filename.endswith(('.tar.bz2', '.tbz')):
            format = 'tbz'
            mode = 'r:bz2'
        elif archive_filename.endswith('.tar'):
            format = 'tar'
            mode = 'r'
        else:
            raise ValueError('Unknown format for %r' % archive_filename)
    try:
        if format == 'zip':
            archive = ZipFile(archive_filename, 'r')
            if check:
                names = archive.namelist()
                for name in names:
                    check_path(name)
        else:
            archive = tarfile.open(archive_filename, mode)
            if check:
                names = archive.getnames()
                for name in names:
                    check_path(name)
        if format != 'zip' and sys.version_info[0] < 3:
            # See Python issue 17153. If the dest path contains Unicode,
            # tarfile extraction fails on Python 2.x if a member path name
            # contains non-ASCII characters - it leads to an implicit
            # bytes -> unicode conversion using ASCII to decode.
            for tarinfo in archive.getmembers():
                if not isinstance(tarinfo.name, text_type):
                    tarinfo.name = tarinfo.name.decode('utf-8')
        archive.extractall(dest_dir)

    finally:
        if archive:
            archive.close()


def zip_dir(directory):
    """zip a directory tree into a BytesIO object"""
    result = io.BytesIO()
    dlen = len(directory)
    with ZipFile(result, "w") as zf:
        for root, dirs, files in os.walk(directory):
            for name in files:
                full = os.path.join(root, name)
                rel = root[dlen:]
                dest = os.path.join(rel, name)
                zf.write(full, dest)
    return result

#
# Simple progress bar
#

UNITS = ('', 'K', 'M', 'G','T','P')


class Progress(object):
    unknown = 'UNKNOWN'

    def __init__(self, minval=0, maxval=100):
        assert maxval is None or maxval >= minval
        self.min = self.cur = minval
        self.max = maxval
        self.started = None
        self.elapsed = 0
        self.done = False

    def update(self, curval):
        assert self.min <= curval
        assert self.max is None or curval <= self.max
        self.cur = curval
        now = time.time()
        if self.started is None:
            self.started = now
        else:
            self.elapsed = now - self.started

    def increment(self, incr):
        assert incr >= 0
        self.update(self.cur + incr)

    def start(self):
        self.update(self.min)
        return self

    def stop(self):
        if self.max is not None:
            self.update(self.max)
        self.done = True

    @property
    def maximum(self):
        return self.unknown if self.max is None else self.max

    @property
    def percentage(self):
        if self.done:
            result = '100 %'
        elif self.max is None:
            result = ' ?? %'
        else:
            v = 100.0 * (self.cur - self.min) / (self.max - self.min)
            result = '%3d %%' % v
        return result

    def format_duration(self, duration):
        if (duration <= 0) and self.max is None or self.cur == self.min:
            result = '??:??:??'
        #elif duration < 1:
        #    result = '--:--:--'
        else:
            result = time.strftime('%H:%M:%S', time.gmtime(duration))
        return result

    @property
    def ETA(self):
        if self.done:
            prefix = 'Done'
            t = self.elapsed
            #import pdb; pdb.set_trace()
        else:
            prefix = 'ETA '
            if self.max is None:
                t = -1
            elif self.elapsed == 0 or (self.cur == self.min):
                t = 0
            else:
                #import pdb; pdb.set_trace()
                t = float(self.max - self.min)
                t /= self.cur - self.min
                t = (t - 1) * self.elapsed
        return '%s: %s' % (prefix, self.format_duration(t))

    @property
    def speed(self):
        if self.elapsed == 0:
            result = 0.0
        else:
            result = (self.cur - self.min) / self.elapsed
        for unit in UNITS:
            if result < 1000:
                break
            result /= 1000.0
        return '%d %sB/s' % (result, unit)

#
# Glob functionality
#

RICH_GLOB = re.compile(r'\{([^}]*)\}')
_CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]')
_CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$')


def iglob(path_glob):
    """Extended globbing function that supports ** and {opt1,opt2,opt3}."""
    if _CHECK_RECURSIVE_GLOB.search(path_glob):
        msg = """invalid glob %r: recursive glob "**" must be used alone"""
        raise ValueError(msg % path_glob)
    if _CHECK_MISMATCH_SET.search(path_glob):
        msg = """invalid glob %r: mismatching set marker '{' or '}'"""
        raise ValueError(msg % path_glob)
    return _iglob(path_glob)


def _iglob(path_glob):
    rich_path_glob = RICH_GLOB.split(path_glob, 1)
    if len(rich_path_glob) > 1:
        assert len(rich_path_glob) == 3, rich_path_glob
        prefix, set, suffix = rich_path_glob
        for item in set.split(','):
            for path in _iglob(''.join((prefix, item, suffix))):
                yield path
    else:
        if '**' not in path_glob:
            for item in std_iglob(path_glob):
                yield item
        else:
            prefix, radical = path_glob.split('**', 1)
            if prefix == '':
                prefix = '.'
            if radical == '':
                radical = '*'
            else:
                # we support both
                radical = radical.lstrip('/')
                radical = radical.lstrip('\\')
            for path, dir, files in os.walk(prefix):
                path = os.path.normpath(path)
                for fn in _iglob(os.path.join(path, radical)):
                    yield fn



#
# HTTPSConnection which verifies certificates/matches domains
#

class HTTPSConnection(httplib.HTTPSConnection):
    ca_certs = None # set this to the path to the certs file (.pem)
    check_domain = True # only used if ca_certs is not None

    # noinspection PyPropertyAccess
    def connect(self):
        sock = socket.create_connection((self.host, self.port), self.timeout)
        if getattr(self, '_tunnel_host', False):
            self.sock = sock
            self._tunnel()

        if not hasattr(ssl, 'SSLContext'):
            # For 2.x
            if self.ca_certs:
                cert_reqs = ssl.CERT_REQUIRED
            else:
                cert_reqs = ssl.CERT_NONE
            self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
                                        cert_reqs=cert_reqs,
                                        ssl_version=ssl.PROTOCOL_SSLv23,
                                        ca_certs=self.ca_certs)
        else:
            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            context.options |= ssl.OP_NO_SSLv2
            if self.cert_file:
                context.load_cert_chain(self.cert_file, self.key_file)
            kwargs = {}
            if self.ca_certs:
                context.verify_mode = ssl.CERT_REQUIRED
                context.load_verify_locations(cafile=self.ca_certs)
                if getattr(ssl, 'HAS_SNI', False):
                    kwargs['server_hostname'] = self.host
            self.sock = context.wrap_socket(sock, **kwargs)
        if self.ca_certs and self.check_domain:
            try:
                match_hostname(self.sock.getpeercert(), self.host)
                logger.debug('Host verified: %s', self.host)
            except CertificateError:
                self.sock.shutdown(socket.SHUT_RDWR)
                self.sock.close()
                raise

class HTTPSHandler(BaseHTTPSHandler):
    def __init__(self, ca_certs, check_domain=True):
        BaseHTTPSHandler.__init__(self)
        self.ca_certs = ca_certs
        self.check_domain = check_domain

    def _conn_maker(self, *args, **kwargs):
        """
        This is called to create a connection instance. Normally you'd
        pass a connection class to do_open, but it doesn't actually check for
        a class, and just expects a callable. As long as we behave just as a
        constructor would have, we should be OK. If it ever changes so that
        we *must* pass a class, we'll create an UnsafeHTTPSConnection class
        which just sets check_domain to False in the class definition, and
        choose which one to pass to do_open.
        """
        result = HTTPSConnection(*args, **kwargs)
        if self.ca_certs:
            result.ca_certs = self.ca_certs
            result.check_domain = self.check_domain
        return result

    def https_open(self, req):
        try:
            return self.do_open(self._conn_maker, req)
        except URLError as e:
            if 'certificate verify failed' in str(e.reason):
                raise CertificateError('Unable to verify server certificate '
                                       'for %s' % req.host)
            else:
                raise

#
# To prevent against mixing HTTP traffic with HTTPS (examples: A Man-In-The-
# Middle proxy using HTTP listens on port 443, or an index mistakenly serves
# HTML containing a http://xyz link when it should be https://xyz),
# you can use the following handler class, which does not allow HTTP traffic.
#
# It works by inheriting from HTTPHandler - so build_opener won't add a
# handler for HTTP itself.
#
class HTTPSOnlyHandler(HTTPSHandler, HTTPHandler):
    def http_open(self, req):
        raise URLError('Unexpected HTTP request on what should be a secure '
                       'connection: %s' % req)

#
# XML-RPC with timeouts
#

_ver_info = sys.version_info[:2]

if _ver_info == (2, 6):
    class HTTP(httplib.HTTP):
        def __init__(self, host='', port=None, **kwargs):
            if port == 0:   # 0 means use port 0, not the default port
                port = None
            self._setup(self._connection_class(host, port, **kwargs))


    class HTTPS(httplib.HTTPS):
        def __init__(self, host='', port=None, **kwargs):
            if port == 0:   # 0 means use port 0, not the default port
                port = None
            self._setup(self._connection_class(host, port, **kwargs))


class Transport(xmlrpclib.Transport):
    def __init__(self, timeout, use_datetime=0):
        self.timeout = timeout
        xmlrpclib.Transport.__init__(self, use_datetime)

    def make_connection(self, host):
        h, eh, x509 = self.get_host_info(host)
        if _ver_info == (2, 6):
            result = HTTP(h, timeout=self.timeout)
        else:
            if not self._connection or host != self._connection[0]:
                self._extra_headers = eh
                self._connection = host, httplib.HTTPConnection(h)
            result = self._connection[1]
        return result

class SafeTransport(xmlrpclib.SafeTransport):
    def __init__(self, timeout, use_datetime=0):
        self.timeout = timeout
        xmlrpclib.SafeTransport.__init__(self, use_datetime)

    def make_connection(self, host):
        h, eh, kwargs = self.get_host_info(host)
        if not kwargs:
            kwargs = {}
        kwargs['timeout'] = self.timeout
        if _ver_info == (2, 6):
            result = HTTPS(host, None, **kwargs)
        else:
            if not self._connection or host != self._connection[0]:
                self._extra_headers = eh
                self._connection = host, httplib.HTTPSConnection(h, None,
                                                                 **kwargs)
            result = self._connection[1]
        return result


class ServerProxy(xmlrpclib.ServerProxy):
    def __init__(self, uri, **kwargs):
        self.timeout = timeout = kwargs.pop('timeout', None)
        # The above classes only come into play if a timeout
        # is specified
        if timeout is not None:
            scheme, _ = splittype(uri)
            use_datetime = kwargs.get('use_datetime', 0)
            if scheme == 'https':
                tcls = SafeTransport
            else:
                tcls = Transport
            kwargs['transport'] = t = tcls(timeout, use_datetime=use_datetime)
            self.transport = t
        xmlrpclib.ServerProxy.__init__(self, uri, **kwargs)

#
# CSV functionality. This is provided because on 2.x, the csv module can't
# handle Unicode. However, we need to deal with Unicode in e.g. RECORD files.
#

def _csv_open(fn, mode, **kwargs):
    if sys.version_info[0] < 3:
        mode += 'b'
    else:
        kwargs['newline'] = ''
    return open(fn, mode, **kwargs)


class CSVBase(object):
    defaults = {
        'delimiter': str(','),      # The strs are used because we need native
        'quotechar': str('"'),      # str in the csv API (2.x won't take
        'lineterminator': str('\n') # Unicode)
    }

    def __enter__(self):
        return self

    def __exit__(self, *exc_info):
        self.stream.close()


class CSVReader(CSVBase):
    def __init__(self, **kwargs):
        if 'stream' in kwargs:
            stream = kwargs['stream']
            if sys.version_info[0] >= 3:
                # needs to be a text stream
                stream = codecs.getreader('utf-8')(stream)
            self.stream = stream
        else:
            self.stream = _csv_open(kwargs['path'], 'r')
        self.reader = csv.reader(self.stream, **self.defaults)

    def __iter__(self):
        return self

    def next(self):
        result = next(self.reader)
        if sys.version_info[0] < 3:
            for i, item in enumerate(result):
                if not isinstance(item, text_type):
                    result[i] = item.decode('utf-8')
        return result

    __next__ = next

class CSVWriter(CSVBase):
    def __init__(self, fn, **kwargs):
        self.stream = _csv_open(fn, 'w')
        self.writer = csv.writer(self.stream, **self.defaults)

    def writerow(self, row):
        if sys.version_info[0] < 3:
            r = []
            for item in row:
                if isinstance(item, text_type):
                    item = item.encode('utf-8')
                r.append(item)
            row = r
        self.writer.writerow(row)

#
#   Configurator functionality
#

class Configurator(BaseConfigurator):

    value_converters = dict(BaseConfigurator.value_converters)
    value_converters['inc'] = 'inc_convert'

    def __init__(self, config, base=None):
        super(Configurator, self).__init__(config)
        self.base = base or os.getcwd()

    def configure_custom(self, config):
        def convert(o):
            if isinstance(o, (list, tuple)):
                result = type(o)([convert(i) for i in o])
            elif isinstance(o, dict):
                if '()' in o:
                    result = self.configure_custom(o)
                else:
                    result = {}
                    for k in o:
                        result[k] = convert(o[k])
            else:
                result = self.convert(o)
            return result

        c = config.pop('()')
        if not callable(c):
            c = self.resolve(c)
        props = config.pop('.', None)
        # Check for valid identifiers
        args = config.pop('[]', ())
        if args:
            args = tuple([convert(o) for o in args])
        items = [(k, convert(config[k])) for k in config if valid_ident(k)]
        kwargs = dict(items)
        result = c(*args, **kwargs)
        if props:
            for n, v in props.items():
                setattr(result, n, convert(v))
        return result

    def __getitem__(self, key):
        result = self.config[key]
        if isinstance(result, dict) and '()' in result:
            self.config[key] = result = self.configure_custom(result)
        return result

    def inc_convert(self, value):
        """Default converter for the inc:// protocol."""
        if not os.path.isabs(value):
            value = os.path.join(self.base, value)
        with codecs.open(value, 'r', encoding='utf-8') as f:
            result = json.load(f)
        return result

#
# Mixin for running subprocesses and capturing their output
#

class SubprocessMixin(object):
    def __init__(self, verbose=False, progress=None):
        self.verbose = verbose
        self.progress = progress

    def reader(self, stream, context):
        """
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        """
        progress = self.progress
        verbose = self.verbose
        while True:
            s = stream.readline()
            if not s:
                break
            if progress is not None:
                progress(s, context)
            else:
                if not verbose:
                    sys.stderr.write('.')
                else:
                    sys.stderr.write(s.decode('utf-8'))
                sys.stderr.flush()
        stream.close()

    def run_command(self, cmd, **kwargs):
        p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE, **kwargs)
        t1 = threading.Thread(target=self.reader, args=(p.stdout, 'stdout'))
        t1.start()
        t2 = threading.Thread(target=self.reader, args=(p.stderr, 'stderr'))
        t2.start()
        p.wait()
        t1.join()
        t2.join()
        if self.progress is not None:
            self.progress('done.', 'main')
        elif self.verbose:
            sys.stderr.write('done.\n')
        return p
python3.3/site-packages/pip/_vendor/__pycache__/__init__.cpython-33.pyc000064400000000722151733566750021672 0ustar00�
7�Re
c@sdZddlmZdS(u�
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.

Files inside of pip._vendor should be considered immutable and should only be
updated to versions from upstream.
i(uabsolute_importN(u__doc__u
__future__uabsolute_import(((u-/tmp/pip-zej_zi-build/pip/_vendor/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/__pycache__/re-vendor.cpython-33.pyc000064400000003005151733566750022031 0ustar00�
7�Rec@s�ddlZddlZddlZddlZddlZejjejje��Z	dd�Z
dd�Zdd�Ze
dkr�eej�d	kr�e
�nejd
dkr�e�q�ejd
dkr�e�q�e
�ndS(iNcCstd�tjd�dS(Nu"Usage: re-vendor.py [clean|vendor]i(uprintusysuexit(((u./tmp/pip-zej_zi-build/pip/_vendor/re-vendor.pyuusage	s
uusagecCsqxNtjt�D]=}tjjt|�}tjj|�rtj|�qqWtjtjjtd��dS(Nusix.py(	uosulistdiruhereupathujoinuisdirushutilurmtreeuunlink(ufnudirname((u./tmp/pip-zej_zi-build/pip/_vendor/re-vendor.pyuclean
s
ucleancCsGtjddtddg�x$tjd�D]}tj|�q,WdS(Nuinstallu-tu-ru
vendor.txtu
*.egg-info(upipumainuhereuglobushutilurmtree(udirname((u./tmp/pip-zej_zi-build/pip/_vendor/re-vendor.pyuvendorsuvendoru__main__ii(uosusysupipuglobushutilupathuabspathudirnameu__file__uhereuusageucleanuvendoru__name__ulenuargv(((u./tmp/pip-zej_zi-build/pip/_vendor/re-vendor.pyu<module>s 


python3.3/site-packages/pip/_vendor/__pycache__/pkg_resources.cpython-33.pyc000064400000407133151733566750023015 0ustar00�
7�Re��cn@sOdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlmZyddlmZmZWn(ek
rddlmZmZYnXyeWn"ek
r;ddlmZYnXy$edd�ZddlmZWn:ek
r�eZdd	lmZe e d
d�Z!YnXddlm"Z"y&dd
lm#Z#m$Z$m%Z%e&Z'Wnek
r�e(Z'YnXddlm)Z*ddl+m,Z,m-Z-ej.ddfko8ej/j0dkrMddl1j2Z3ne Z3yddl4Z4Wnek
rwYnXddd�Z5iZ6dd�Z7dd�Z8dd�Z9dd�Z:dd�Z;dd �Z<d!d"�Z=d#d�Z>Z?d$d%�Z@d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjgEZAGdkdA�dAeB�ZCGdldB�dBeC�ZDGdmdC�dCeC�ZEGdndD�dDeC�ZFiZGejHdd�ZIdZJdoZKdpZLdZMdpZNdqdf�ZOdrd(�ZPgdsdt�ZQdudv�ZRdwdx�ZSejTdy�ZUejTdz�ZVeSZWd{dK�ZXd|d'�ZYeYZZd}d)�Z[d~d*�Z\e dd+�Z]d�d,�Z^Gd�dY�dY�Z_Gd�dZ�dZe_�Z`Gd�d<�d<ea�ZbGd�d;�d;ea�ZcecZdGd�dE�dEee�ZfGd�d=�d=�Zgd�d:�Zhd�dH�Zid�dI�Zjd�dN�Zkd�dO�ZlGd�d��d�ea�ZmemjnZoemjpZpGd�d`�d`�ZqeOeaeq�Gd�da�daeq�ZrGd�db�dber�ZseOete �es�e3e k	r|eOe3jues�nGd�d^�d^eq�Zvev�Zwd�d��ZxGd�dc�dcer�ZyeOejzey�Gd�d[�d[ev�Z{Gd�d\�d\es�Z|Gd�d]�d]ey�Z}e7d�d�i�d�dd�Z~e(d�d7�Ze(d�d��Z�e~ejze��e(d�d��Z�e~eae��e(d�d��Z�e~ej�e��e3e k	r�e~e3j�e��ne7d�d�i�e7d�d�i�d�de�Z�d�d��Z�d�d4�Z�e d�dg�Z�d�d��Z�e�ej�e��e�ejze��e3e k	rQe�e3j�e��nd�d��Z�e�eae��d�dS�Z�id�d��Z�d�d��Z�d�dL�Z�ejTd��j�Z�ejTd��j�Z�ejTd��j�Z�ejTd��j�Z�ejTd��j�Z�ejTd��j�Z�ejTd��j�Z�ejTd��j�Z�ejTd�ej�ej�B�j�Z�ejTd�ej��Z�id�d�6d�d�6d�d�6d�d�6d�d�6j�Z�d�d��Z�d�dG�Z�Gd�d@�d@ea�Z�d�d��Z�Gd�d>�d>ea�Z�Gd�d��d�e��Z�ie�d�6e�d�6e�d�6Z�d�d��Z�d�dF�Z�d�d��Z�Gd�d?�d?�Z�id�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Z�d�d��Z�d�d��Z�d�dR�Z�d�dM�Z�d�d��Z�eg�Z�d�d��Z�e�e���ebj��Z�e7d�d5e��e�j�Z�e�j�Z�e�j�Z�e�jYZYeYZZe�d�d��ge�_�e�e�e�j�ej���dS(�uZ
Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
iN(uget_importer(uurlparseu
urlunparse(uImmutableSetcCs
|j�S(N(unext(uo((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>-su<lambda>(uStringIO(uBytesIOcCsY|dkrt�}n|dkr-|}nttt|�j�|d�||�dS(Nuexec(uNoneuglobalsuexecucompileuopenuread(ufnuglobsulocs((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuexecfile2s
	uexecfile(uutime(umkdirurenameuunlink(uopen(uisdirusplitiucpythoni�cCs^tstd��nt|�\}}|rZ|rZt|�rZt|�t||�ndS(Nu*"os.mkdir" not supported on this platform.(u
WRITE_SUPPORTuIOErrorusplituisdiru_bypass_ensure_directoryumkdir(unameumodeudirnameufilename((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_bypass_ensure_directoryPs
u_bypass_ensure_directorycKs-t�j|�tjtj||��dS(N(uglobalsuupdateu_state_varsudictufromkeys(uvartypeukw((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_declare_state\su_declare_statecCsLi}t�}x6tj�D](\}}|d|||�||<qW|S(Nu_sget_(uglobalsu_state_varsuitems(ustateugukuv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__getstate__`s
	 u__getstate__cCsJt�}x:|j�D],\}}|dt|||||�qW|S(Nu_sset_(uglobalsuitemsu_state_vars(ustateugukuv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__setstate__gs	$u__setstate__cCs
|j�S(N(ucopy(uval((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_sget_dictmsu
_sget_dictcCs|j�|j|�dS(N(uclearuupdate(ukeyuobustate((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_sset_dictps
u
_sset_dictcCs
|j�S(N(u__getstate__(uval((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_sget_objecttsu_sget_objectcCs|j|�dS(N(u__setstate__(ukeyuobustate((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_sset_objectwsu_sset_objectcGsdS(N(uNone(uargs((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>zscCs�t�}tj|�}|dk	r~tjdkr~y3ddjt�dd��|jd�f}Wq~t	k
rzYq~Xn|S(uZReturn this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    udarwinumacosx-%s-%su.Nii(
uget_build_platformumacosVersionStringumatchuNoneusysuplatformujoinu_macosx_versugroupu
ValueError(uplatum((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_supported_platform}s
	3
uget_supported_platformurequireu
run_scriptuget_provideruget_distributionuload_entry_pointu
get_entry_mapuget_entry_infouiter_entry_pointsuresource_stringuresource_streamuresource_filenameuresource_listdiruresource_existsuresource_isdirudeclare_namespaceuworking_setuadd_activation_listenerufind_distributionsuset_extraction_pathucleanup_resourcesuget_default_cacheuEnvironmentu
WorkingSetuResourceManageruDistributionuRequirementu
EntryPointuResolutionErroruVersionConflictuDistributionNotFounduUnknownExtrauExtractionErroruparse_requirementsu
parse_versionu	safe_nameusafe_versionuget_platformucompatible_platformsuyield_linesusplit_sectionsu
safe_extrauto_filenameuinvalid_markeruevaluate_markeruensure_directoryunormalize_pathuEGG_DISTuBINARY_DISTuSOURCE_DISTu
CHECKOUT_DISTuDEVELOP_DISTuIMetadataProvideruIResourceProvideruFileMetadatauPathMetadatauEggMetadatau
EmptyProvideruempty_provideruNullProvideruEggProvideruDefaultProvideruZipProvideruregister_finderuregister_namespace_handleruregister_loader_typeufixup_namespace_packagesuget_importerurun_mainuAvailableDistributionscBs&|EeZdZdZdd�ZdS(uResolutionErroru.Abstract base for dependency resolution errorscCs|jjt|j�S(N(u	__class__u__name__urepruargs(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__repr__�suResolutionError.__repr__N(u__name__u
__module__u__qualname__u__doc__u__repr__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuResolutionError�scBs|EeZdZdZdS(uVersionConflictuAAn already-installed version conflicts with the requested versionN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuVersionConflict�scBs|EeZdZdZdS(uDistributionNotFoundu&A requested distribution was not foundN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuDistributionNotFound�scBs|EeZdZdZdS(uUnknownExtrau>Distribution doesn't have an "extra feature" of the given nameN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuUnknownExtra�siicCs|t|<dS(uRegister `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    N(u_provider_factories(uloader_typeuprovider_factory((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuregister_loader_type�sc
Cs�t|t�r2tj|�p1tt|��dSytj|}Wn)tk
rnt	|�tj|}YnXt
|dd�}tt
|�|�S(u?Return an IResourceProvider for the named module or requirementiu
__loader__N(u
isinstanceuRequirementuworking_setufindurequireustrusysumodulesuKeyErroru
__import__ugetattruNoneu
_find_adapteru_provider_factories(umoduleOrRequmoduleuloader((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_provider�s#

cCs�|s�ddl}|j�d}|dkr�ddl}d}tjj|�r�t|d�r�|j|�}d|kr�|d}q�q�q�n|j|j	d��n|dS(Niuu0/System/Library/CoreServices/SystemVersion.plistu	readPlistuProductVersionu.(
uplatformumac_veruplistlibuosupathuexistsuhasattru	readPlistuappendusplit(u_cacheuplatformuversionuplistlibuplistu
plist_content((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_macosx_vers�su_macosx_verscCsidd6dd6j||�S(NuppcuPowerPCuPower_Macintosh(uget(umachine((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_macosx_arch�su_macosx_archcCs�yddlm}Wn"tk
r8ddlm}YnX|�}tjdkr�|jd�r�yTt�}tj	�dj
dd�}dt|d�t|d	�t|�fSWq�t
k
r�Yq�Xn|S(
u�Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    i(uget_platformudarwinumacosx-iu u_umacosx-%d.%d-%si(u	sysconfiguget_platformuImportErrorudistutils.utilusysuplatformu
startswithu_macosx_versuosuunameureplaceuintu_macosx_archu
ValueError(uget_platformuplatuversionumachine((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_build_platform�s
		
uget_build_platformumacosx-(\d+)\.(\d+)-(.*)udarwin-(\d+)\.(\d+)\.(\d+)-(.*)c
CsO|d	ks$|d	ks$||kr(d
Stj|�}|rKtj|�}|s�tj|�}|r�t|jd��}d|jd�|jd�f}|dkr�|dks�|dkr�|dkr�d
SndS|jd�|jd�ks|jd�|jd�krdSt|jd��t|jd��krGdSd
SdS(u�Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    iu%s.%siiu10.3iu10.4iNTF(uNoneuTrueumacosVersionStringumatchudarwinVersionStringuintugroupuFalse(uprovidedurequiredureqMacuprovMacu
provDarwinudversionumacosversion((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyucompatible_platformss*$"*cCsNtjd�j}|d}|j�||d<t|�dj||�dS(u@Locate distribution `dist_spec` and run its `script_name` scriptiu__name__iN(usysu	_getframeu	f_globalsuclearurequireu
run_script(u	dist_specuscript_nameunsuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
run_scriptKs



cCsdt|t�r!tj|�}nt|t�r?t|�}nt|t�s`td|��n|S(u@Return a current distribution object for a Requirement or stringu-Expected string, Requirement, or Distribution(u
isinstanceu
basestringuRequirementuparseuget_provideruDistributionu	TypeError(udist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_distributionUscCst|�j||�S(uDReturn `name` entry point of `group` for `dist` or raise ImportError(uget_distributionuload_entry_point(udistugroupuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuload_entry_point]scCst|�j|�S(u=Return the entry point map for `group`, or the full entry map(uget_distributionu
get_entry_map(udistugroup((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
get_entry_mapascCst|�j||�S(u<Return the EntryPoint object for `group`+`name`, or ``None``(uget_distributionuget_entry_info(udistugroupuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_entry_infoescBs\|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S(uIMetadataProvidercCsdS(u;Does the package's distribution contain the named metadata?N((uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuhas_metadatalsuIMetadataProvider.has_metadatacCsdS(u'The named metadata resource as a stringN((uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_metadataosuIMetadataProvider.get_metadatacCsdS(u�Yield named metadata resource as list of non-blank non-comment lines

       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted.N((uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_metadata_linesrsu$IMetadataProvider.get_metadata_linescCsdS(u>Is the named metadata a directory?  (like ``os.path.isdir()``)N((uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyumetadata_isdirxsu IMetadataProvider.metadata_isdircCsdS(u?List of metadata names in the directory (like ``os.listdir()``)N((uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyumetadata_listdir{su"IMetadataProvider.metadata_listdircCsdS(u=Execute the named script in the supplied namespace dictionaryN((uscript_nameu	namespace((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
run_script~suIMetadataProvider.run_scriptN(	u__name__u
__module__u__qualname__uhas_metadatauget_metadatauget_metadata_linesumetadata_isdirumetadata_listdiru
run_script(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuIMetadataProviderjscBsb|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS(uIResourceProvideru3An object that provides access to package resourcescCsdS(udReturn a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``N((umanageru
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_filename�su'IResourceProvider.get_resource_filenamecCsdS(uiReturn a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``N((umanageru
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_stream�su%IResourceProvider.get_resource_streamcCsdS(umReturn a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``N((umanageru
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_string�su%IResourceProvider.get_resource_stringcCsdS(u,Does the package contain the named resource?N((u
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuhas_resource�suIResourceProvider.has_resourcecCsdS(u>Is the named resource a directory?  (like ``os.path.isdir()``)N((u
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_isdir�su IResourceProvider.resource_isdircCsdS(u?List of resource names in the directory (like ``os.listdir()``)N((u
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_listdir�su"IResourceProvider.resource_listdirN(
u__name__u
__module__u__qualname__u__doc__uget_resource_filenameuget_resource_streamuget_resource_stringuhas_resourceuresource_isdiruresource_listdir(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuIResourceProvider�scBs|EeZdZdZd$dd�Zedd��Zedd��Zdd	�Z	d
d�Z
dd
�Zd$dd�Zdd�Z
dd�Zd$d%d&dd�Zd$d$d&dd�Zd$d$d%dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$S('u
WorkingSetuDA collection of active distributions on sys.path (or a similar list)cCs^g|_i|_i|_g|_|dkr<tj}nx|D]}|j|�qCWdS(u?Create working set from list of path entries (default=sys.path)N(uentriesu
entry_keysuby_keyu	callbacksuNoneusysupathu	add_entry(uselfuentriesuentry((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�s				
uWorkingSet.__init__cCsm|�}yddlm}Wntk
r5|SYnXy|j|�Wntk
rh|j|�SYnX|S(u1
        Prepare the master working set.
        i(u__requires__(u__main__u__requires__uImportErrorurequireuVersionConflictu_build_from_requirements(uclsuwsu__requires__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_build_master�s	
	
uWorkingSet._build_mastercCs�|g�}t|�}|j|t��}x|D]}|j|�q4Wx0tjD]%}||jkrU|j|�qUqUW|jtjdd�<|S(uQ
        Build a working set from a requirement spec. Rewrites sys.path.
        N(uparse_requirementsuresolveuEnvironmentuaddusysupathuentriesu	add_entry(uclsureq_specuwsureqsudistsudistuentry((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_build_from_requirements�s
u#WorkingSet._build_from_requirementscCsT|jj|g�|jj|�x*t|d�D]}|j||d�q3WdS(u�Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        NTF(u
entry_keysu
setdefaultuentriesuappendufind_distributionsuTrueuadduFalse(uselfuentryudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu	add_entry�s
uWorkingSet.add_entrycCs|jj|j�|kS(u9True if `dist` is the active distribution for its project(uby_keyugetukey(uselfudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__contains__�suWorkingSet.__contains__cCsG|jj|j�}|dk	r?||kr?t||��n|SdS(u�Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        N(uby_keyugetukeyuNoneuVersionConflict(uselfurequdist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufind�s
uWorkingSet.findccsgx`|D]X}|j|�}|dkrGx4|j�D]}|Vq5Wq||kr||VqqWdS(uYield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        N(u
get_entry_mapuNoneuvalues(uselfugroupunameudistuentriesuep((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuiter_entry_points�s
uWorkingSet.iter_entry_pointscCsQtjd�j}|d}|j�||d<|j|�dj||�dS(u?Locate distribution for `requires` and run `script_name` scriptiu__name__iN(usysu	_getframeu	f_globalsuclearurequireu
run_script(uselfurequiresuscript_nameunsuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
run_script
s



uWorkingSet.run_scriptccspi}xc|jD]X}||jkr+qnx:|j|D]+}||kr9d||<|j|Vq9q9WqWdS(u�Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        iN(uentriesu
entry_keysuby_key(uselfuseenuitemukey((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__iter__s
uWorkingSet.__iter__cCs�|r|j|j|�n|dkr4|j}n|jj|g�}|jj|jg�}|r~|j|jkr~dS||j|j<|j|kr�|j|j�n|j|kr�|j|j�n|j	|�dS(uAdd `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        N(
u	insert_onuentriesuNoneulocationu
entry_keysu
setdefaultukeyuby_keyuappendu
_added_new(uselfudistuentryuinsertureplaceukeysukeys2((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuadd#suWorkingSet.addcCs�t|�ddd�}i}i}g}xc|r�|jd�}||krUq.n|j|j�}	|	dkr?|jj|j�}	|	dks�|	|kr/|r/|}
|dkr�|	dkr�t|j�}q�tg�}tg�}
n|j	||
|�}	||j<|	dkr/t
|��q/n|j|	�n|	|kr]t|	|��n|j
|	j|j�ddd��d||<q.W|S(ueList all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.

        Unless `replace_conflicting=True`, raises a VersionConflict exception if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
        Niii����i����T(ulistupopugetukeyuNoneuby_keyuEnvironmentuentriesu
WorkingSetu
best_matchuDistributionNotFounduappenduVersionConflictuextendurequiresuextrasuTrue(uselfurequirementsuenvu	installerureplace_conflictingu	processedubestuto_activateurequdistuws((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresolve@s6	 &uWorkingSet.resolvecCsPt|�}|j�i}i}|dkrJt|j�}||7}n
||}|jg�}	tt|	j|��x�|D]�}
x�||
D]�}|j�g}y|	j	|||�}
Wn9t
k
r�tj�d}|||<|r�w�nPYq�Xtt|	j|
��|j
tj|
��Pq�Wq�Wt|�}|j�||fS(ubFind all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            map(working_set.add, distributions)  # add plugins+libs to sys.path
            print 'Could not load', errors        # display errors

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        iN(ulistusortuNoneuEnvironmentuentriesu	__class__umapuadduas_requirementuresolveuResolutionErrorusysuexc_infouupdateudictufromkeys(uselfu
plugin_envufull_envu	installerufallbackuplugin_projectsu
error_infou
distributionsuenvu
shadow_setuproject_nameudisturequ	resolveesuv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufind_plugins~s6"





	
uWorkingSet.find_pluginscGs7|jt|��}x|D]}|j|�qW|S(u�Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        (uresolveuparse_requirementsuadd(uselfurequirementsuneededudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyurequire�s	
uWorkingSet.requirecCsB||jkrdS|jj|�x|D]}||�q*WdS(uAInvoke `callback` for all distributions (including existing ones)N(u	callbacksuappend(uselfucallbackudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu	subscribe�s

uWorkingSet.subscribecCs"x|jD]}||�q
WdS(N(u	callbacks(uselfudistucallback((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_added_new�suWorkingSet._added_newcCs<|jdd�|jj�|jj�|jdd�fS(N(uentriesu
entry_keysucopyuby_keyu	callbacks(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__getstate__�s(uWorkingSet.__getstate__cCsZ|\}}}}|dd�|_|j�|_|j�|_|dd�|_dS(N(uentriesucopyu
entry_keysuby_keyu	callbacks(uselfue_k_b_cuentriesukeysuby_keyu	callbacks((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__setstate__�s
uWorkingSet.__setstate__NTF(u__name__u
__module__u__qualname__u__doc__uNoneu__init__uclassmethodu
_build_masteru_build_from_requirementsu	add_entryu__contains__ufinduiter_entry_pointsu
run_scriptu__iter__uTrueuFalseuadduresolveufind_pluginsurequireu	subscribeu
_added_newu__getstate__u__setstate__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
WorkingSet�s(
=McBs�|EeZdZdZde�edd�Zdd�Zdd�Z	ddd	�Z
d
d�Zdd
�Zddd�Z
ddd�Zdd�Zdd�Zdd�ZdS(uEnvironmentu5Searchable snapshot of distributions on a search pathcCs5i|_i|_||_||_|j|�dS(u!Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.3'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        N(u_distmapu_cacheuplatformupythonuscan(uselfusearch_pathuplatformupython((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�s
				uEnvironment.__init__cCsC|jdks0|jdks0|j|jkoBt|j|j�S(u�Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        N(upythonuNoneu
py_versionucompatible_platformsuplatform(uselfudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyucan_addsuEnvironment.can_addcCs|j|jj|�dS(u"Remove `dist` from the environmentN(u_distmapukeyuremove(uselfudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuremovesuEnvironment.removecCsQ|dkrtj}nx2|D]*}x!t|�D]}|j|�q2WqWdS(udScan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        N(uNoneusysupathufind_distributionsuadd(uselfusearch_pathuitemudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuscans

uEnvironment.scancCs�y|j|SWn1tk
rB|j�}||jkr>gSYnX||jkrw|j|}|j|<t|�n|j|S(uKReturn a newest-to-oldest list of distributions for `project_name`
        (u_cacheuKeyErroruloweru_distmapu_sort_dists(uselfuproject_nameudists((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__getitem__.s
	
uEnvironment.__getitem__cCs|j|�r{|j�r{|jj|jg�}||kr{|j|�|j|jkrxt|j|j�qxq{ndS(u<Add `dist` if we ``can_add()`` it and it isn't already addedN(ucan_adduhas_versionu_distmapu
setdefaultukeyuappendu_cacheu_sort_dists(uselfudistudists((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuadd>s
uEnvironment.addcCsW|j|�}|dk	r|Sx%||jD]}||kr-|Sq-W|j||�S(u�Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        N(ufinduNoneukeyuobtain(uselfurequworking_setu	installerudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
best_matchGs
uEnvironment.best_matchcCs|dk	r||�SdS(u�Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument.N(uNone(uselfurequirementu	installer((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuobtain\s	uEnvironment.obtainccs0x)|jj�D]}||r|VqqWdS(u=Yield the unique project names of the available distributionsN(u_distmapukeys(uselfukey((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__iter__hs
uEnvironment.__iter__cCs{t|t�r|j|�nXt|t�rdxF|D](}x||D]}|j|�qFWq5Wntd|f��|S(u2In-place addition of a distribution or environmentuCan't add %r to environment(u
isinstanceuDistributionuadduEnvironmentu	TypeError(uselfuotheruprojectudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__iadd__ms
uEnvironment.__iadd__cCs@|jgdddd�}x||fD]}||7}q(W|S(u4Add an environment or distribution to an environmentuplatformupythonN(u	__class__uNone(uselfuotherunewuenv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__add__ysuEnvironment.__add__N(u__name__u
__module__u__qualname__u__doc__uNoneuget_supported_platformuPY_MAJORu__init__ucan_adduremoveuscanu__getitem__uaddu
best_matchuobtainu__iter__u__iadd__u__add__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuEnvironment�s	cBs|EeZdZdZdS(uExtractionErroruTAn error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuExtractionError�s
cBs�|EeZdZdZdZdd�Zdd�Zdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
fdd�Zedd��Zdd�Zdd�Zddd�ZdS(uResourceManageru'Manage resource extraction and packagescCs
i|_dS(N(ucached_files(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�suResourceManager.__init__cCst|�j|�S(uDoes the named resource exist?(uget_provideruhas_resource(uselfupackage_or_requirementu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_exists�suResourceManager.resource_existscCst|�j|�S(u,Is the named resource an existing directory?(uget_provideruresource_isdir(uselfupackage_or_requirementu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_isdir�suResourceManager.resource_isdircCst|�j||�S(u4Return a true filesystem path for specified resource(uget_provideruget_resource_filename(uselfupackage_or_requirementu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_filename�su!ResourceManager.resource_filenamecCst|�j||�S(u9Return a readable file-like object for specified resource(uget_provideruget_resource_stream(uselfupackage_or_requirementu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_stream�suResourceManager.resource_streamcCst|�j||�S(u%Return specified resource as a string(uget_provideruget_resource_string(uselfupackage_or_requirementu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_string�suResourceManager.resource_stringcCst|�j|�S(u1List the contents of the named resource directory(uget_provideruresource_listdir(uselfupackage_or_requirementu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_listdir�su ResourceManager.resource_listdircCs]tj�d}|jpt�}td||f�}||_||_||_|�dS(u5Give an error message for problems extracting file(s)iu}Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  %s

The Python egg cache directory is currently set to:

  %s

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
N(usysuexc_infouextraction_pathuget_default_cacheuExtractionErrorumanageru
cache_pathuoriginal_error(uselfuold_excu
cache_pathuerr((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuextraction_error�s			u ResourceManager.extraction_errorc
Cso|jpt�}tjj||d|�}yt|�Wn|j�YnX|j|�d|j|<|S(u�Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        u-tmpi(	uextraction_pathuget_default_cacheuosupathujoinu_bypass_ensure_directoryuextraction_erroru_warn_unsafe_extraction_pathucached_files(uselfuarchive_nameunamesuextract_pathutarget_path((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_cache_path�s


uResourceManager.get_cache_pathcCswtjdkr*|jtjd�r*dStj|�j}|tj@sV|tj@rsd|}tj	|t
�ndS(uN
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        untuwindirNu�%s is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).(uosunameu
startswithuenvironustatust_modeuS_IWOTHuS_IWGRPuwarningsuwarnuUserWarning(upathumodeumsg((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_warn_unsafe_extraction_path�s
&u,ResourceManager._warn_unsafe_extraction_pathcCs@tjdkr<tj|�jdBd@}tj||�ndS(u4Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        uposiximi�N(uosunameustatust_modeuchmod(uselfutempnameufilenameumode((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyupostprocess	suResourceManager.postprocesscCs%|jrtd��n||_dS(u�Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        u5Can't change extraction path, files already extractedN(ucached_filesu
ValueErroruextraction_path(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuset_extraction_paths	u#ResourceManager.set_extraction_pathcCsdS(uB
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        N((uselfuforce((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyucleanup_resources7su!ResourceManager.cleanup_resourcesNF(u__name__u
__module__u__qualname__u__doc__uNoneuextraction_pathu__init__uresource_existsuresource_isdiruresource_filenameuresource_streamuresource_stringuresource_listdiruextraction_erroruget_cache_pathustaticmethodu_warn_unsafe_extraction_pathupostprocessuset_extraction_pathuFalseucleanup_resources(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuResourceManager�scCsytjdSWntk
r#YnXtjdkrCtjjd�Sd}dd|fd|fd|fdd|fg}x�|D]�\}}d}xn|D]5}|tjkr�tjj|tj|�}q�Pq�W|r�tjj||�}ntjj|d�Sq�Wtd
��dS(uDetermine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    uPYTHON_EGG_CACHEuntu~/.python-eggsuApplication DatauAPPDATAuUSERPROFILEu	HOMEDRIVEuHOMEPATHuHOMEuWINDIRuuPython-Eggsu3Please set the PYTHON_EGG_CACHE enviroment variableN(uAPPDATA((uAPPDATAN(uUSERPROFILE(u	HOMEDRIVEuHOMEPATH(uHOMEPATH(uHOME((uHOMEN(uWINDIR(	uosuenvironuKeyErrorunameupathu
expanduseruNoneujoinuRuntimeError(uapp_datau	app_homesukeysusubdirudirnameukey((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_default_cacheDs0
			
cCstjdd|�S(u�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    u[^A-Za-z0-9.]+u-(ureusub(uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu	safe_namemscCs%|jdd�}tjdd|�S(u�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    u u.u[^A-Za-z0-9.]+u-(ureplaceureusub(uversion((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyusafe_versionuscCstjdd|�j�S(u�Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    u[^A-Za-z0-9.]+u_(ureusubulower(uextra((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
safe_extrascCs|jdd�S(u|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    u-u_(ureplace(uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuto_filename�scBsM|EeZdZidd�d6dd�d6dd�d6dd�d	6ejd
6ejd6ejd6Zed
d��Z	e
dd��Zedd��Zedd��Z
edd��Zedd��Zedd��Zed$dd��Zedd��Zde�kr%eZned d!��Zed"d#��Zd$S(%uMarkerEvaluationcCstjS(N(uosuname(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�suMarkerEvaluation.<lambda>uos_namecCstjS(N(usysuplatform(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�susys_platformcCstjj�dS(Ni(usysuversionusplit(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�supython_full_versioncCsdtjdtjdfS(Nu%s.%sii(usysuversion_info(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�supython_versionuplatform_versionuplatform_machineupython_implementationcCsAy|j|�Wn)tk
r<|jtj�d�SYnXdS(u{
        Validate text as a PEP 426 environment marker; return an exception
        if invalid or False otherwise.
        iF(uevaluate_markeruSyntaxErrorunormalize_exceptionusysuexc_infouFalse(uclsutext((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuis_invalid_marker�s

u"MarkerEvaluation.is_invalid_markercCsEidd6dd6}d|_d|_|j|j|j�|_|S(u�
        Given a SyntaxError from a marker evaluation, normalize the error message:
         - Remove indications of filename and line number.
         - Replace platform-specific error messages with standard error messages.
        uinvalid syntaxuunexpected EOF while parsinguparenthesis is never closedN(uNoneufilenameulinenougetumsg(uexcusubs((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyunormalize_exception�s
		u$MarkerEvaluation.normalize_exceptioncs;tjtj��fdd�tdt��d�D��S(Ncs#g|]}�j�|��qS((u	interpret(u.0ui(uclsunodelist(u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>�s	u-MarkerEvaluation.and_test.<locals>.<listcomp>ii(u	functoolsureduceuoperatoruand_urangeulen(uclsunodelist((uclsunodelistu2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuand_test�suMarkerEvaluation.and_testcs;tjtj��fdd�tdt��d�D��S(Ncs#g|]}�j�|��qS((u	interpret(u.0ui(uclsunodelist(u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>�s	u)MarkerEvaluation.test.<locals>.<listcomp>ii(u	functoolsureduceuoperatoruor_urangeulen(uclsunodelist((uclsunodelistu2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyutest�suMarkerEvaluation.testcCsd|dd}|tjkrT|ddtjkrCtd��n|j|d�Std��dS(NiiiuEmpty parenthesesu5Language feature not supported in environment markers(utokenuLPARuRPARuSyntaxErroru	interpret(uclsunodelistut((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuatom�suMarkerEvaluation.atomc
Cs�t|�dkr!td��n|dd}|d}|dtjkr�t|d�dkr�|dkrwd}q�d	}q�ny|j|�}Wn(tk
r�tt|�d
��YnX||j|d�|j|d��S(Niu5Chained comparison not allowed in environment markersiiiiunotunot inuis notu, operator not allowed in environment markers(ulenuSyntaxErrorutokenuNAMEuget_opuKeyErrorurepruevaluate(uclsunodelistucompucop((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
comparison�s
	
uMarkerEvaluation.comparisoncCs�i|jtj6|jtj6|jtj6|jtj6dd�d6dd�d6tjd6tjd6}ttd�r�|j|tj	<n||S(	NcSs
||kS(N((uxuy((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�su)MarkerEvaluation.get_op.<locals>.<lambda>unot incSs
||kS(N((uxuy((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�suinu==u!=uor_test(
utestusymboluand_testuatomu
comparisonuoperatoruequneuhasattruor_test(uclsuopuops((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_op�s







uMarkerEvaluation.get_opcCs#|jtj|�jd�d�S(ur
        Evaluate a PEP 426 environment marker on CPython 2.4+.
        Return a boolean indicating the marker result in this environment.
        Raise SyntaxError if marker is invalid.

        This implementation uses the 'parser' module, which is not implemented on
        Jython and has been superseded by the 'ast' module in Python 2.6 and
        later.
        i(u	interpretuparseruexprutotuple(uclsutextuextra((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuevaluate_marker�su MarkerEvaluation.evaluate_markercCs�ddlm}|j�}x9|j�D]+}|jdd�}|j|�||<q)Wy|j||�}Wn5tk
r�tj	�d}t
|jd��YnX|S(u�
        Evaluate a PEP 426 environment marker using markerlib.
        Return a boolean indicating the marker result in this environment.
        Raise SyntaxError if marker is invalid.
        i(u
_markerlibu.u_i(upip._vendoru
_markerlibudefault_environmentukeysureplaceupopu	interpretu	NameErrorusysuexc_infouSyntaxErroruargs(uclsutextu
_markerlibuenvukeyunew_keyuresultue((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_markerlib_evaluate�s
u$MarkerEvaluation._markerlib_evaluateuparsercCsex t|�dkr"|d}qWy|j|d�}Wntk
rZtd��YnX||�S(Niiiu)Comparison or logical expression expected(ulenuget_opuKeyErroruSyntaxError(uclsunodelistuop((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu	interprets
uMarkerEvaluation.interpretcCs	x t|�dkr"|d}qW|d}|d}|tjkr�y|j|}Wn"tk
r{td|��YnX|�S|tjkr�|d}|dd�dks�|jd�s�|jd�s�d|kr�td	��n|dd�Std
��dS(NiiiuUnknown name %ru'"u"""u'''u\u1Only plain strings allowed in environment markersu5Language feature not supported in environment markersi����(ulenutokenuNAMEuvaluesuKeyErroruSyntaxErroruSTRINGu
startswith(uclsunodelistukindunameuopus((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuevaluates$



4uMarkerEvaluation.evaluateN(u__name__u
__module__u__qualname__uplatformuversionumachineupython_implementationuvaluesuclassmethoduis_invalid_markerustaticmethodunormalize_exceptionuand_testutestuatomu
comparisonuget_opuNoneuevaluate_markeru_markerlib_evaluateuglobalsu	interpretuevaluate(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuMarkerEvaluation�s,






			uMarkerEvaluationcBs"|EeZdZdZd(Zd(Zd(Zdd�Zdd�Z	dd�Z
dd	�Zd
d�Zdd
�Z
ejd)kr�dd�Zndd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(S(*uNullProvideruETry to implement resources and metadata for arbitrary PEP 302 loaderscCs:t|dd�|_tjjt|dd��|_dS(Nu
__loader__u__file__u(ugetattruNoneuloaderuosupathudirnameumodule_path(uselfumodule((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__:suNullProvider.__init__cCs|j|j|�S(N(u_fnumodule_path(uselfumanageru
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_filename>su"NullProvider.get_resource_filenamecCst|j||��S(N(uBytesIOuget_resource_string(uselfumanageru
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_streamAsu NullProvider.get_resource_streamcCs|j|j|j|��S(N(u_getu_fnumodule_path(uselfumanageru
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_stringDsu NullProvider.get_resource_stringcCs|j|j|j|��S(N(u_hasu_fnumodule_path(uselfu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuhas_resourceGsuNullProvider.has_resourcecCs%|jo$|j|j|j|��S(N(uegg_infou_hasu_fn(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuhas_metadataJsuNullProvider.has_metadataicCs)|js
dS|j|j|j|��S(Nu(uegg_infou_getu_fn(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_metadataNs	uNullProvider.get_metadatacCs2|js
dS|j|j|j|��jd�S(Nuuutf-8(uegg_infou_getu_fnudecode(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_metadataSs	cCst|j|��S(N(uyield_linesuget_metadata(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_metadata_linesXsuNullProvider.get_metadata_linescCs|j|j|j|��S(N(u_isdiru_fnumodule_path(uselfu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_isdir[suNullProvider.resource_isdircCs%|jo$|j|j|j|��S(N(uegg_infou_isdiru_fn(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyumetadata_isdir^suNullProvider.metadata_isdircCs|j|j|j|��S(N(u_listdiru_fnumodule_path(uselfu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_listdirasuNullProvider.resource_listdircCs)|jr%|j|j|j|��SgS(N(uegg_infou_listdiru_fn(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyumetadata_listdirds	uNullProvider.metadata_listdircCs�d|}|j|�s,td|��n|j|�jdd�}|jdd�}|j|j|�}||d<tjj|�r�t	|||�nWddl
m}t|�d|j
d�|f||<t||d	�}t|||�dS(
Nuscripts/uNo script named %ru
u
u
u__file__i(ucacheuexec(uhas_metadatauResolutionErroruget_metadataureplaceu_fnuegg_infouosupathuexistsuexecfileu	linecacheucacheulenusplitucompileuexec(uselfuscript_nameu	namespaceuscriptuscript_textuscript_filenameucacheuscript_code((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
run_scriptis

%uNullProvider.run_scriptcCstd��dS(Nu9Can't perform this operation for unregistered loader type(uNotImplementedError(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_has{suNullProvider._hascCstd��dS(Nu9Can't perform this operation for unregistered loader type(uNotImplementedError(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_isdir�suNullProvider._isdircCstd��dS(Nu9Can't perform this operation for unregistered loader type(uNotImplementedError(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_listdir�suNullProvider._listdircCs&|r"tjj||jd��S|S(Nu/(uosupathujoinusplit(uselfubaseu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_fn�suNullProvider._fncCs2t|jd�r"|jj|�Std��dS(Nuget_datau=Can't perform this operation for loaders without 'get_data()'(uhasattruloaderuget_datauNotImplementedError(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_get�suNullProvider._getN(i(u__name__u
__module__u__qualname__u__doc__uNoneuegg_nameuegg_infouloaderu__init__uget_resource_filenameuget_resource_streamuget_resource_stringuhas_resourceuhas_metadatausysuversion_infouget_metadatauget_metadata_linesuresource_isdirumetadata_isdiruresource_listdirumetadata_listdiru
run_scriptu_hasu_isdiru_listdiru_fnu_get(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuNullProvider3s0cBs2|EeZdZdZdd�Zdd�ZdS(uEggProvideru&Provider based on a virtual filesystemcCstj||�|j�dS(N(uNullProvideru__init__u
_setup_prefix(uselfumodule((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�suEggProvider.__init__cCs�|j}d}x}||kr�|j�jd�rmtjj|�|_tjj|d�|_	||_
Pn|}tjj|�\}}qWdS(Nu.egguEGG-INFO(umodule_pathuNoneuloweruendswithuosupathubasenameuegg_nameujoinuegg_infouegg_rootusplit(uselfupathuoldubase((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_setup_prefix�s		uEggProvider._setup_prefixN(u__name__u
__module__u__qualname__u__doc__u__init__u
_setup_prefix(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuEggProvider�scBsV|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS(
uDefaultProvideru6Provides access to package resources in the filesystemcCstjj|�S(N(uosupathuexists(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_has�suDefaultProvider._hascCstjj|�S(N(uosupathuisdir(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_isdir�suDefaultProvider._isdircCs
tj|�S(N(uosulistdir(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_listdir�suDefaultProvider._listdircCst|j|j|�d�S(Nurb(uopenu_fnumodule_path(uselfumanageru
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_stream�su#DefaultProvider.get_resource_streamc
Cs/t|d�}z|j�SWd|j�XdS(Nurb(uopenureaduclose(uselfupathustream((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_get�suDefaultProvider._getN(	u__name__u
__module__u__qualname__u__doc__u_hasu_isdiru_listdiruget_resource_streamu_get(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuDefaultProvider�scBsT|EeZdZdZdd�ZZdd�Zdd�ZdZ	dd�Z
dS(	u
EmptyProvideru.Provider that returns nothing for all requestscCsdS(NF(uFalse(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�suEmptyProvider.<lambda>cCsdS(Nu((uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�scCsgS(N((uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�scCsdS(N((uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�suEmptyProvider.__init__N(u__name__u
__module__u__qualname__u__doc__u_isdiru_hasu_getu_listdiruNoneumodule_pathu__init__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
EmptyProvider�sc
Cs�t�}tj|�}zYxR|j�D]D}|jdtj�}|j|�||<||dk	s(t	�q(WWd|j
�X|S(uf
    This builds a similar dictionary to the zipimport directory
    caches.  However instead of tuples, ZipInfo objects are stored.

    The translation of the tuple is as follows:
      * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep
              on pypy it is the same (one reason why distribute did work
              in some cases on pypy and win32).
      * [1] - zipinfo.compress_type
      * [2] - zipinfo.compress_size
      * [3] - zipinfo.file_size
      * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
              len(ascii encoding of filename) otherwise
      * [5] - (zipinfo.date_time[0] - 1980) << 9 |
               zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
      * [6] - (zipinfo.date_time[3] - 1980) << 11 |
               zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
      * [7] - zipinfo.CRC
    u/N(udictuzipfileuZipFileunamelistureplaceuosusepugetinfouNoneuAssertionErroruclose(upathuzipinfouzfileuzitemuzpath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyubuild_zipmanifest�s	ubuild_zipmanifestcBs�|EeZdZdZdZdd�Zdd�Zdd�Zdd	�Z	e
d
d��Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS(uZipProvideru"Resource support for zips and eggscCs?tj||�t|jj�|_|jjtj|_dS(N(	uEggProvideru__init__ubuild_zipmanifestuloaderuarchiveuzipinfouosusepuzip_pre(uselfumodule((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�suZipProvider.__init__cCsF|j|j�r)|t|j�d�Std||jf��dS(Nu%s is not a subpath of %s(u
startswithuzip_preulenuAssertionError(uselfufspath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_zipinfo_namesuZipProvider._zipinfo_namecCsj|j|}|j|jtj�rM|t|j�dd�jtj�Std||jf��dS(Niu%s is not a subpath of %s(uzip_preu
startswithuegg_rootuosusepulenusplituAssertionError(uselfuzip_pathufspath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_partss

'uZipProvider._partscCs�|jstd��n|j|�}|j�}dj|j|��|kr~x*|D]}|j||j|��qXWn|j||�S(Nu5resource_filename() only supported for .egg, not .zipu/(uegg_nameuNotImplementedErroru_resource_to_zipu_get_eager_resourcesujoinu_partsu_extract_resourceu
_eager_to_zip(uselfumanageru
resource_nameuzip_pathueagersuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_filenames	
 u!ZipProvider.get_resource_filenamecCs/|j}|jd}tj|�}||fS(Niii����(iii����(u	file_sizeu	date_timeutimeumktime(uzip_statusizeu	date_timeu	timestamp((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_get_date_and_size"s	
uZipProvider._get_date_and_sizec
Cs�||j�kr^x9|j�|D]'}|j|tjj||��}q#Wtjj|�S|j|j|�\}}ts�t	d��ny)|j
|j|j|��}|j
||�r�|Stddtjj|��\}}	tj||jj|��tj|�t|	||f�|j|	|�yt|	|�Wnmtjk
r�tjj|�r�|j
||�r�|Stjdkr�t|�t|	|�|Sn�YnXWntjk
r�|j�YnX|S(Nu>"os.rename" and "os.unlink" are not supported on this platformu	.$extractudirunt(u_indexu_extract_resourceuosupathujoinudirnameu_get_date_and_sizeuzipinfou
WRITE_SUPPORTuIOErroruget_cache_pathuegg_nameu_partsu_is_currentu_mkstempuwriteuloaderuget_dataucloseuutimeupostprocessurenameuerroruisfileunameuunlinkuextraction_error(
uselfumanageruzip_pathunameulastu	timestampusizeu	real_pathuoutfutmpnam((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_extract_resource*s@$


uZipProvider._extract_resourcec	Cs�|j|j|�\}}tjj|�s2dStj|�}|j|ks_|j|krcdS|j	j
|�}t|d�}|j�}|j
�||kS(uK
        Return True if the file_path is current for this zip_path
        urbF(u_get_date_and_sizeuzipinfouosupathuisfileuFalseustatust_sizeust_mtimeuloaderuget_datauopenureaduclose(	uselfu	file_pathuzip_pathu	timestampusizeustatuzip_contentsufu
file_contents((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_is_current[s
uZipProvider._is_currentcCsa|jdkrZg}x6dD].}|j|�r|j|j|��qqW||_n|jS(Nunative_libs.txtueager_resources.txt(unative_libs.txtueager_resources.txt(ueagersuNoneuhas_metadatauextenduget_metadata_lines(uselfueagersuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_get_eager_resourcesls
u ZipProvider._get_eager_resourcescCs�y|jSWn�tk
r�i}x�|jD]y}|jtj�}x^|r�tjj|dd��}||kr�||j|d�PqF|j�g||<qFWq+W||_|SYnXdS(Nii����i����(	u	_dirindexuAttributeErroruzipinfousplituosusepujoinuappendupop(uselfuindupathupartsuparent((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_indexus
		uZipProvider._indexcCs.|j|�}||jkp-||j�kS(N(u
_zipinfo_nameuzipinfou_index(uselfufspathuzip_path((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_has�suZipProvider._hascCs|j|�|j�kS(N(u
_zipinfo_nameu_index(uselfufspath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_isdir�suZipProvider._isdircCs%t|j�j|j|�f��S(N(ulistu_indexugetu
_zipinfo_name(uselfufspath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_listdir�suZipProvider._listdircCs|j|j|j|��S(N(u
_zipinfo_nameu_fnuegg_root(uselfu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_eager_to_zip�suZipProvider._eager_to_zipcCs|j|j|j|��S(N(u
_zipinfo_nameu_fnumodule_path(uselfu
resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_resource_to_zip�suZipProvider._resource_to_zipN(u__name__u
__module__u__qualname__u__doc__uNoneueagersu__init__u
_zipinfo_nameu_partsuget_resource_filenameustaticmethodu_get_date_and_sizeu_extract_resourceu_is_currentu_get_eager_resourcesu_indexu_hasu_isdiru_listdiru
_eager_to_zipu_resource_to_zip(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuZipProvider�s 		
1	cBsJ|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S(uFileMetadatau*Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    cCs
||_dS(N(upath(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�suFileMetadata.__init__cCs
|dkS(NuPKG-INFO((uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuhas_metadata�suFileMetadata.has_metadatacCsH|dkr8t|jd�}|j�}|j�|Std��dS(NuPKG-INFOurUu(No metadata except PKG-INFO is available(uopenupathureaducloseuKeyError(uselfunameufumetadata((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_metadata�s
uFileMetadata.get_metadatacCst|j|��S(N(uyield_linesuget_metadata(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_metadata_lines�suFileMetadata.get_metadata_linesN(u__name__u
__module__u__qualname__u__doc__u__init__uhas_metadatauget_metadatauget_metadata_lines(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuFileMetadata�s

cBs&|EeZdZdZdd�ZdS(uPathMetadatauqMetadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir,project_name=dist_name,metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    cCs||_||_dS(N(umodule_pathuegg_info(uselfupathuegg_info((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�s	uPathMetadata.__init__N(u__name__u
__module__u__qualname__u__doc__u__init__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuPathMetadata�scBs&|EeZdZdZdd�ZdS(uEggMetadatau Metadata provider for .egg filescCsrt|j�|_|jtj|_||_|jrXtjj	|j|j�|_
n|j|_
|j�dS(u-Create a metadata provider from a zipimporterN(ubuild_zipmanifestuarchiveuzipinfouosusepuzip_preuloaderuprefixupathujoinumodule_pathu
_setup_prefix(uselfuimporter((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�s		!uEggMetadata.__init__N(u__name__u
__module__u__qualname__u__doc__u__init__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuEggMetadata�sudictu_distribution_finderscCs|t|<dS(uxRegister `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example.N(u_distribution_finders(u
importer_typeudistribution_finder((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuregister_finder�scCs+t|�}tt|�}||||�S(u.Yield distributions accessible via `path_item`(uget_importeru
_find_adapteru_distribution_finders(u	path_itemuonlyuimporterufinder((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufind_distributions�sccs�|jjd�rdSt|�}|jd�rHtj|d|�Vn|rRdSxf|jd�D]U}|jd�rbtjj	||�}x(t
tj|�|�D]}|Vq�WqbqbWdS(u@
    Find eggs in zip files; possibly multiple nested eggs.
    u.whlNuPKG-INFOumetadatau/u.egg(
uarchiveuendswithuEggMetadatauhas_metadatauDistributionu
from_filenameuresource_listdiruosupathujoinufind_eggs_in_zipu	zipimportuzipimporter(uimporteru	path_itemuonlyumetadatausubitemusubpathudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufind_eggs_in_zip�sufind_eggs_in_zipcCsfS(N((uimporteru	path_itemuonly((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufind_nothingsufind_nothingccst|�}tjj|�rtj|tj�r|j�jd�rwtj	|dt
|tjj|d���Vqx�tj|�D]}}|j�}|jd�s�|jd�rtjj||�}tjj|�r�t
||�}nt
|�}tj|||dt�Vq�|r]|jd�r]x�ttjj||��D]}|VqKWq�|r�|jd�r�ttjj||��}z|j�}	Wd|j�XxU|	D]J}
|
j�s�q�nx.ttjj||
j���D]}|Vq�WPq�Wq�q�WndS(	u6Yield distributions accessible on a sys.path directoryu.eggumetadatauEGG-INFOu	.egg-infou
.dist-infou
precedenceu	.egg-linkN(u_normalize_cacheduosupathuisdiruaccessuR_OKuloweruendswithuDistributionu
from_filenameuPathMetadataujoinulistdiruFileMetadatau
from_locationuDEVELOP_DISTufind_distributionsuopenu	readlinesucloseustripurstrip(uimporteru	path_itemuonlyuentryulowerufullpathumetadataudistu
entry_fileuentry_linesulineuitem((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufind_on_path
s:'	 "
(	ufind_on_pathu_namespace_handlersu_namespace_packagescCs|t|<dS(u�Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer,path_entry,moduleName,module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    N(u_namespace_handlers(u
importer_typeunamespace_handler((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuregister_namespace_handler;scCs7t|�}|dkrdS|j|�}|dkr;dStjj|�}|dkr�tj|�}tj|<g|_t	|�n!t
|d�s�td|��ntt
|�}|||||�}|dk	r3|j}|j|�|j|�x3|D](}||jkr|jj|�qqWn|S(uEEnsure that named package includes a subpath of path_item (if needed)u__path__uNot a package:N(uget_importeruNoneufind_moduleusysumodulesugetuimpu
new_moduleu__path__u_set_parent_nsuhasattru	TypeErroru
_find_adapteru_namespace_handlersuappenduload_module(upackageNameu	path_itemuimporteruloaderumoduleuhandlerusubpathupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_handle_nsLs.	
	


u
_handle_nscCstj�z�|tkrdStjd}}d|kr�dj|jd�dd��}t|�|tkr~t	|�nytj
|j}Wq�tk
r�t
d|��Yq�Xntj|g�j|�tj|g�x|D]}t||�q�WWdtj�XdS(u9Declare that package 'packageName' is a namespace packageNu.iuNot a package:i����(uimpuacquire_locku_namespace_packagesusysupathuNoneujoinusplitudeclare_namespaceu
__import__umodulesu__path__uAttributeErroru	TypeErroru
setdefaultuappendu
_handle_nsurelease_lock(upackageNameupathuparentu	path_item((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyudeclare_namespacegs&
"



c
Csbtj�zFx?tj|f�D]+}t||�}|r t||�q q WWdtj�XdS(uDEnsure that previously-declared namespace packages include path_itemN(uimpuacquire_locku_namespace_packagesugetu
_handle_nsufixup_namespace_packagesurelease_lock(u	path_itemuparentupackageusubpath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufixup_namespace_packages�s
cCs`tjj||jd�d�}t|�}x+|jD]}t|�|kr8Pq8q8W|SdS(uBCompute an ns-package subpath for a filesystem or zipfile importeru.iNi����(uosupathujoinusplitu_normalize_cachedu__path__(uimporteru	path_itemupackageNameumoduleusubpathu
normalizeduitem((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufile_ns_handler�s"ufile_ns_handlercCsdS(N(uNone(uimporteru	path_itemupackageNameumodule((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyunull_ns_handler�sunull_ns_handlercCstjjtjj|��S(u1Normalize a file/dir name for comparison purposes(uosupathunormcaseurealpath(ufilename((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyunormalize_path�scCs=y||SWn*tk
r8t|�||<}|SYnXdS(N(uKeyErrorunormalize_path(ufilenameu_cacheuresult((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_normalize_cached�s

u_normalize_cachedcCsU|jd�}|j�}|rQdj|�}ttj||tj|�ndS(Nu.(usplitupopujoinusetattrusysumodules(upackageNameupartsunameuparent((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_set_parent_ns�s
u_set_parent_nsccs�t|t�rSxn|j�D]0}|j�}|r|jd�r|VqqWn-x*|D]"}xt|�D]}|VqmWqZWdS(uAYield non-empty/non-comment lines of a ``basestring`` or sequenceu#N(u
isinstanceu
basestringu
splitlinesustripu
startswithuyield_lines(ustrsususs((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuyield_lines�s
u
\s*(#.*)?$u\s*\\\s*(#.*)?$u\s*((\w|[-.])+)u!\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)u\s*,u\s*\[u\s*\]u\w+(\.\w+)*$uL(?P<name>[^-]+)( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?u(\d+ | [a-z]+ | \.| -)ucupreupreviewufinal-u-urcu@udevccs{xotj|�D]^}t||�}|s|dkr>qn|dd�dkre|jd�Vqd|VqWdVdS(Nu.iu
0123456789iu*u*final(ucomponent_reusplitureplaceuzfill(usupart((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_parse_version_parts�s
u_parse_version_partscCs�g}x�t|j��D]�}|jd�r�|dkrdx'|r`|ddkr`|j�q=Wnx'|r�|ddkr�|j�qgWn|j|�qWt|�S(u�Convert a version string to a chronologically-sortable key

    This is a rough cross between distutils' StrictVersion and LooseVersion;
    if you give it versions that would work with StrictVersion, then it behaves
    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    *possible* to create pathological version coding schemes that will fool
    this parser, but they should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    than any other pre-release tag.
    u*u*finaliu*final-u00000000i����i����(u_parse_version_partsuloweru
startswithupopuappendutuple(usupartsupart((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
parse_version�scBs�|EeZdZdZffddd�Zdd�Zdd�Zddddd	�Z	ddd
d�Z
eddd
��Zeddd��Z
eddd��ZdS(u
EntryPointu3Object representing an advertised importable objectcCsnt|�std|��n||_||_t|�|_tjddj|��j	|_	||_
dS(NuInvalid module nameux[%s]u,(uMODULEu
ValueErrorunameumodule_nameutupleuattrsuRequirementuparseujoinuextrasudist(uselfunameumodule_nameuattrsuextrasudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__s		"uEntryPoint.__init__cCsfd|j|jf}|jr<|ddj|j�7}n|jrb|ddj|j�7}n|S(Nu%s = %su:u.u [%s]u,(unameumodule_nameuattrsujoinuextras(uselfus((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__str__s		uEntryPoint.__str__cCsdt|�S(NuEntryPoint.parse(%r)(ustr(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__repr__#suEntryPoint.__repr__cCs�|r|j||�nt|jt�t�dg�}xO|jD]D}yt||�}WqDtk
r�td||f��YqDXqDW|S(Nu__name__u%r has no %r attribute(urequireu
__import__umodule_nameuglobalsuattrsugetattruAttributeErroruImportError(uselfurequireuenvu	installeruentryuattr((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuload&s!
uEntryPoint.loadcCs]|jr%|jr%td|��ntttjtj|jj|j�||���dS(Nu&Can't require() without a distribution(	uextrasudistuUnknownExtraulistumapuworking_setuadduresolveurequires(uselfuenvu	installer((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyurequire0suEntryPoint.requirecCsy�f}}|jdd�\}}d|krz|jdd�\}}tjd|�}|jrnt�n|j}nd|kr�|jdd�\}}t|j��s�t�n|j�jd�}nWn!tk
r�td|��Yn#X||j�|j�|||�SdS(	uParse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        u=iu[ux[u:u.u9EntryPoint must be in 'name=module:attrs [extras]' formatN(	usplituRequirementuparseuspecsu
ValueErroruextrasuMODULEurstripustrip(uclsusrcudistuattrsuextrasunameuvalueureq((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparse6s&
			
uEntryPoint.parsecCs�t|�std|��ni}xZt|�D]L}|j||�}|j|krptd||j��n|||j<q1W|S(uParse an entry point groupuInvalid group nameuDuplicate entry point(uMODULEu
ValueErroruyield_linesuparseuname(uclsugroupulinesudistuthisulineuep((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparse_groupVsuEntryPoint.parse_groupcCs�t|t�r|j�}nt|�}i}x~|D]v\}}|dkrj|s[q7ntd��n|j�}||kr�td|��n|j|||�||<q7W|S(u!Parse a map of entry point groupsu%Entry points must be listed in groupsuDuplicate group nameN(u
isinstanceudictuitemsusplit_sectionsuNoneu
ValueErrorustripuparse_group(uclsudataudistumapsugroupulines((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu	parse_mapcsuEntryPoint.parse_mapNT(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u__str__u__repr__uTrueuloadurequireuclassmethoduparseuparse_groupu	parse_map(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
EntryPoints	
cCsE|s
dSt|�}|djd�rAt|dd�d�S|S(Nuiumd5=i����i����(u(uurlparseu
startswithu
urlunparse(ulocationuparsed((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_remove_md5_fragmentwsu_remove_md5_fragmentc	Bs�|EeZdZdZdZdAdAdAdAedAedd�Ze	dAdd��Z
edd��Zd	d
�Z
dd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zedd��Zedd��Zedd��Zedd��Zfdd �Zd!d"�ZdAd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Ze	dAd-d.��Zd/d0�Z d1d2�Z!dAd3d4�Z"d5d6�Z#dAd7d8�Z$d9d:�Z%d;d<�Z&d=d>�Z'ed?d@��Z(dAS(BuDistributionu5Wrap an actual or potential sys.path entry w/metadatauPKG-INFOcCsjt|pd�|_|dk	r3t|�|_n||_||_||_||_|p`t	|_
dS(NuUnknown(u	safe_nameuproject_nameuNoneusafe_versionu_versionu
py_versionuplatformulocationu
precedenceuempty_provideru	_provider(uselfulocationumetadatauproject_nameuversionu
py_versionuplatformu
precedence((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__�s				uDistribution.__init__cKs�dgd\}}}}tjj|�\}}	|	j�tkr�t|�}
|
r||
jdddd�\}}}}nt|	j�}n|||d|d|d|d	||�S(
Niunameuverupyveruplatuproject_nameuversionu
py_versionuplatform(uNoneuosupathusplitextuloweru_distributionImpluEGG_NAMEugroup(uclsulocationubasenameumetadataukwuproject_nameuversionu
py_versionuplatformuextumatch((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
from_location�s!uDistribution.from_locationcCs7t|df�|j|jt|j�|j|jfS(Nuparsed_version(ugetattru
precedenceukeyu_remove_md5_fragmentulocationu
py_versionuplatform(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�suDistribution.<lambda>cCs
t|j�S(N(uhashuhashcmp(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__hash__�suDistribution.__hash__cCs|j|jkS(N(uhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__lt__�suDistribution.__lt__cCs|j|jkS(N(uhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__le__�suDistribution.__le__cCs|j|jkS(N(uhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__gt__�suDistribution.__gt__cCs|j|jkS(N(uhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__ge__�suDistribution.__ge__cCs&t||j�sdS|j|jkS(NF(u
isinstanceu	__class__uFalseuhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__eq__�suDistribution.__eq__cCs||kS(N((uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__ne__�suDistribution.__ne__cCs>y|jSWn,tk
r9|jj�|_}|SYnXdS(N(u_keyuAttributeErroruproject_nameulower(uselfukey((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyukey�s

uDistribution.keycCs>y|jSWn,tk
r9t|j�|_}|SYnXdS(N(u_parsed_versionuAttributeErroru
parse_versionuversion(uselfupv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparsed_version�s

uDistribution.parsed_versioncCs�y|jSWn�tk
r�xq|j|j�D]G}|j�jd�r.t|jdd�dj��|_|jSq.Wt	d|j|��YnXdS(Nuversion:u:iu(Missing 'Version:' header and/or %s file(
u_versionuAttributeErroru
_get_metadatauPKG_INFOuloweru
startswithusafe_versionusplitustripu
ValueError(uselfuline((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuversion�s
%uDistribution.versioncCs�y|jSWn�tk
r�igd6}|_x�dD]�}x�t|j|��D]�\}}|r�d|kr�|jdd�\}}t|�r�g}q�t|�s�g}q�nt|�p�d}n|j	|g�j
t|��qRWq6W|SYnXdS(Nurequires.txtudepends.txtu:i(urequires.txtudepends.txt(u_Distribution__dep_mapuAttributeErroruNoneusplit_sectionsu
_get_metadatausplituinvalid_markeruevaluate_markeru
safe_extrau
setdefaultuextenduparse_requirements(uselfudmunameuextraureqsumarker((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_dep_map�s 

"	'uDistribution._dep_mapcCs�|j}g}|j|jdf��xT|D]L}y|j|t|��Wq/tk
rztd||f��Yq/Xq/W|S(u@List of Requirements needed for this distro if `extras` are usedu%s has no such extra feature %rN(u_dep_mapuextendugetuNoneu
safe_extrauKeyErroruUnknownExtra(uselfuextrasudmudepsuext((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyurequires�s	

uDistribution.requiresccs5|j|�r1x|j|�D]}|VqWndS(N(uhas_metadatauget_metadata_lines(uselfunameuline((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_get_metadata�suDistribution._get_metadatacCs~|dkrtj}n|j|�|tjkrzt|j�x6|jd�D]"}|tjkrQt|�qQqQWndS(u>Ensure distribution is importable on `path` (default=sys.path)unamespace_packages.txtN(	uNoneusysupathu	insert_onufixup_namespace_packagesulocationu
_get_metadataumodulesudeclare_namespace(uselfupathupkg((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuactivate	s

uDistribution.activatecCsOdt|j�t|j�|jp'tf}|jrK|d|j7}n|S(u@Return what this distribution's standard .egg filename should beu
%s-%s-py%su-(uto_filenameuproject_nameuversionu
py_versionuPY_MAJORuplatform(uselfufilename((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuegg_name	s	uDistribution.egg_namecCs(|jrd||jfSt|�SdS(Nu%s (%s)(ulocationustr(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__repr__	s	uDistribution.__repr__cCsNyt|dd�}Wntk
r0d}YnX|p:d}d|j|fS(Nuversionu[unknown version]u%s %s(ugetattruNoneu
ValueErroruproject_name(uselfuversion((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__str__	s
uDistribution.__str__cCs.|jd�rt|��nt|j|�S(uADelegate all unrecognized public attributes to .metadata provideru_(u
startswithuAttributeErrorugetattru	_provider(uselfuattr((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__getattr__%	suDistribution.__getattr__cKs(|jt|�tjj|�||�S(N(u
from_locationu_normalize_cacheduosupathubasename(uclsufilenameumetadataukw((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
from_filename+	suDistribution.from_filenamecCstjd|j|jf�S(u?Return a ``Requirement`` that matches this distribution exactlyu%s==%s(uRequirementuparseuproject_nameuversion(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuas_requirement2	suDistribution.as_requirementcCsD|j||�}|dkr:td||ff��n|j�S(u=Return the `name` entry point of `group` or raise ImportErroruEntry point %r not foundN(uget_entry_infouNoneuImportErroruload(uselfugroupunameuep((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuload_entry_point6	suDistribution.load_entry_pointcCsdy
|j}Wn4tk
rCtj|jd�|�}|_YnX|dk	r`|j|i�S|S(u=Return the entry point map for `group`, or the full entry mapuentry_points.txtN(u_ep_mapuAttributeErroru
EntryPointu	parse_mapu
_get_metadatauNoneuget(uselfugroupuep_map((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
get_entry_map=	s

!uDistribution.get_entry_mapcCs|j|�j|�S(u<Return the EntryPoint object for `group`+`name`, or ``None``(u
get_entry_mapuget(uselfugroupuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_entry_infoI	suDistribution.get_entry_infoc	CsM|p|j}|sdSt|�}tjj|�}dd�|D�}x�t|�D]w\}}||krsPqW||krW|jtkrW|tjkr�|j	�n|j
||�|j
||�PqWqWW|tjkr�|j	�n|j|�dSxGy|j||d�}Wnt
k
r1PYqX||=||=|}qdS(u@Insert self.location in path before its nearest parent directoryNcSs(g|]}|rt|�p!|�qS((u_normalize_cached(u.0up((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>V	s	u*Distribution.insert_on.<locals>.<listcomp>i(ulocationu_normalize_cacheduosupathudirnameu	enumerateu
precedenceuEGG_DISTusysucheck_version_conflictuinsertuappenduindexu
ValueError(	uselfupathulocunlocubdirunpathupuitemunp((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu	insert_onM	s6



	uDistribution.insert_onc
Cs�|jdkrdStj|jd��}t|j�}x�|jd�D]�}|tjksJ||ksJ|tkr}qJn|dkr�qJnt	tj|dd�}|r�t|�j|�sJ|j|j�r�qJntd|||jf�qJWdS(	Nu
setuptoolsunamespace_packages.txtu
top_level.txtu
pkg_resourcesusiteu__file__uIModule %s was already imported from %s, but %s is being added to sys.path(u
pkg_resourcesu
setuptoolsusite(
ukeyudictufromkeysu
_get_metadataunormalize_pathulocationusysumodulesu_namespace_packagesugetattruNoneu
startswithu
issue_warning(uselfunspulocumodnameufn((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyucheck_version_conflictt	s"u#Distribution.check_version_conflictcCs<y|jWn*tk
r7tdt|��dSYnXdS(NuUnbuilt egg for FT(uversionu
ValueErroru
issue_warningurepruFalseuTrue(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuhas_version�	s
	uDistribution.has_versioncKsMx*dD]"}|j|t||d	��qW|jd|j�|j|�S(
u@Copy this distribution, substituting in any changed keyword argsuproject_nameuversionu
py_versionuplatformulocationu
precedenceumetadata(uproject_nameuversionu
py_versionuplatformulocationu
precedenceN(u
setdefaultugetattruNoneu	_provideru	__class__(uselfukwuattr((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuclone�	s
 uDistribution.clonecCsdd�|jD�S(NcSsg|]}|r|�qS(((u.0udep((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>�	s	u'Distribution.extras.<locals>.<listcomp>(u_dep_map(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuextras�	suDistribution.extrasN()u__name__u
__module__u__qualname__u__doc__uPKG_INFOuNoneuPY_MAJORuEGG_DISTu__init__uclassmethodu
from_locationupropertyuhashcmpu__hash__u__lt__u__le__u__gt__u__ge__u__eq__u__ne__ukeyuparsed_versionuversionu_dep_mapurequiresu
_get_metadatauactivateuegg_nameu__repr__u__str__u__getattr__u
from_filenameuas_requirementuload_entry_pointu
get_entry_mapuget_entry_infou	insert_onucheck_version_conflictuhas_versionucloneuextras(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuDistribution�sL		
	
'
cBsk|EeZdZdZdZejd�Zedd��Z	edd��Z
dd	�Zd
d�ZdS(
uDistInfoDistributionuGWrap an actual or potential sys.path entry w/metadata, .dist-info styleuMETADATAu([\(,])\s*(\d.*?)\s*([,\)])cCs\y|jSWnJtk
rWddlm}|�j|j|j��|_|jSYnXdS(uParse and cache metadatai(uParserN(u	_pkg_infouAttributeErroruemail.parseruParseruparsestruget_metadatauPKG_INFO(uselfuParser((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_parsed_pkg_info�	s
!u%DistInfoDistribution._parsed_pkg_infocCs:y|jSWn(tk
r5|j�|_|jSYnXdS(N(u_DistInfoDistribution__dep_mapuAttributeErroru_compute_dependencies(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_dep_map�	s

uDistInfoDistribution._dep_mapcCsy|jdd�dg}|dj�}|dj�}tj|jd|�}|jdd�jdd�}||fS(u�Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz')
        Split environment marker, add == prefix to version specifiers as
        necessary, and remove parenthesis.
        u;iuiu\1==\2\3u(u)(usplitustripureusubuEQEQureplace(uselfu
requires_distupartsudistversumark((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_preparse_requirement�	su*DistInfoDistribution._preparse_requirementc
sddlm}igd6}|_g�xc|jjd�pBgD]I}|j|�\}}tt|��}||�|_	�j
|�qCW�fdd�}t|d��}|dj|�xR|jjd�p�gD]8}	t
|	j��}	tt||	��|�||	<q�W|S(u+Recompute this distribution's dependencies.i(ucompileu
Requires-Distc3s6x/�D]'}|jdi|d6�r|VqqWdS(Nuoverrideuextra(u	marker_fn(uextraureq(ureqs(u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyureqs_for_extra�	s
uBDistInfoDistribution._compute_dependencies.<locals>.reqs_for_extrauProvides-ExtraN(upip._vendor._markerlibucompileuNoneu_DistInfoDistribution__dep_mapu_parsed_pkg_infouget_allu_preparse_requirementunextuparse_requirementsu	marker_fnuappendu	frozensetuextendu
safe_extraustripulist(
uselfucompile_markerudmurequdistversumarkuparsedureqs_for_extraucommonuextra((ureqsu2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_compute_dependencies�	s$u*DistInfoDistribution._compute_dependenciesN(
u__name__u
__module__u__qualname__u__doc__uPKG_INFOureucompileuEQEQupropertyu_parsed_pkg_infou_dep_mapu_preparse_requirementu_compute_dependencies(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuDistInfoDistribution�	s
uDistInfoDistributionu.eggu	.egg-infou
.dist-infoc
Os|d}t�}y-x&tj|�j|kr:|d7}qWWntk
rPYnXddlm}|d|d||�dS(Nii(uwarnu
stacklevel(uglobalsusysu	_getframeu	f_globalsu
ValueErroruwarningsuwarn(uargsukwuleveluguwarn((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
issue_warning�	s	
u
issue_warningc#stt|����fdd�}x��D]�}t|�}|sUtd|��n|jd�}|j�}g}t||�}|r�|j�}|tt||dd�\}}}n|tt	||dd�\}}}dd	�|D�}t
|||�Vq+Wd
S(
u�Yield ``Requirement`` objects for each specification in `strs`

    `strs` must be an instance of ``basestring``, or a (possibly-nested)
    iterable thereof.
    csLg}x|||�st||�rayt��}d}Wqatk
r]td��YqaXn|||�}|s�td|d|d||d���n|j|j|��|j�}t||�}|r�|j�}q	|||�s	td|d||d���q	q	W|||�}|r?|j�}n|||fS(Niu+\ must not appear on the last nonblank lineu	Expected u inuatuExpected ',' or end-of-list in(uCONTINUEunextu
StopIterationu
ValueErroruappendugroupuenduCOMMA(uITEMu
TERMINATORulineupugroupsu	item_nameuitemsumatch(ulines(u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu	scan_list�	s0

*#u%parse_requirements.<locals>.scan_listuMissing distribution speciu'extra' nameiuversion speccSs(g|]\}}|t|�f�qS((usafe_version(u.0uopuval((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>.
s	u&parse_requirements.<locals>.<listcomp>N(i(ii(uiteruyield_linesuDISTROu
ValueErrorugroupuenduOBRACKETuCBRACKETuVERSIONuLINE_ENDuRequirement(ustrsu	scan_listulineumatchuproject_nameupuextrasuspecs((ulinesu2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparse_requirements�	s"!
$$cCsAdd�|D�}|j�dd�|D�|ddd�<dS(NcSsg|]}|j|f�qS((uhashcmp(u.0udist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>3
s	u_sort_dists.<locals>.<listcomp>cSsg|]\}}|�qS(((u.0uhcud((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>5
s	ii����(usort(udistsutmp((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_sort_dists2
s
u_sort_distscBsn|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Ze	d
d��Z
dS(uRequirementcCs�|t|�|_}||j�|_|_dd�|D�}|j�dd�|D�|_|ttt	|��|_
|_|jtdd�|D��t|j�f|_
t|j
�|_dS(u>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!cSs2g|](\}}t|�t|||f�qS((u
parse_versionu
state_machine(u.0uopuv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>=
s	u(Requirement.__init__.<locals>.<listcomp>cSs(g|]\}}}}||f�qS(((u.0uparsedutransuopuver((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>?
s	cSs(g|]\}}}}||f�qS(((u.0uparsedutransuopuver((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>B
s	N(u	safe_nameuunsafe_nameuloweruproject_nameukeyusortuspecsutupleumapu
safe_extrauindexuextrasu	frozensetuhashCmpuhashu_Requirement__hash(uselfuproject_nameuspecsuextrasuindex((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__9
s
"uRequirement.__init__cCsXdjdd�|jD��}dj|j�}|rDd|}nd|j||fS(Nu,cSsg|]}dj|��qS(u(ujoin(u.0us((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
<listcomp>H
s	u'Requirement.__str__.<locals>.<listcomp>u[%s]u%s%s%s(ujoinuspecsuextrasuproject_name(uselfuspecsuextras((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__str__G
s

uRequirement.__str__cCst|t�o|j|jkS(N(u
isinstanceuRequirementuhashCmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__eq__M
suRequirement.__eq__c	Cst|t�r=|j|jkr%dS|jr[|j}q[nt|t�r[t|�}nd}dd�}x�|jD]{\}}}}||||�}|dkr�dS|dkr�dS|dkr�d}qw|dks�|dkrwd}qwqwW|dkrd}n|S(	NcSs||k||kS(N((uaub((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>W
su*Requirement.__contains__.<locals>.<lambda>uFuTu+u-FT(
u
isinstanceuDistributionukeyuFalseuindexuparsed_versionu
basestringu
parse_versionuNoneuTrue(	uselfuitemulastucompareuparsedutransuopuveruaction((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__contains__P
s,		
	uRequirement.__contains__cCs|jS(N(u_Requirement__hash(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__hash__d
suRequirement.__hash__cCsdt|�S(NuRequirement.parse(%r)(ustr(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__repr__g
suRequirement.__repr__cCsWtt|��}|rDt|�dkr2|dStd|��ntd|��dS(NiiuExpected only one requirementuNo requirements found(ulistuparse_requirementsulenu
ValueError(usureqs((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparsei
suRequirement.parseN(u__name__u
__module__u__qualname__u__init__u__str__u__eq__u__contains__u__hash__u__repr__ustaticmethoduparse(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuRequirement8
su--Tu<uT-Tu<=uF+Fu>uT+Fu>=uT..u==uF++u!=cCs@t|t�s9Gdd�d|t�}|jdd�S|jS(u&Get an mro for a type or classic classcBs|EeZdZdS(u_get_mro.<locals>.clsN(u__name__u
__module__u__qualname__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyucls�
suclsiN(u
isinstanceutypeuobjectu__mro__(ucls((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_get_mro}
su_get_mrocCsAx:tt|dt|���D]}||kr||SqWdS(u2Return an adapter factory for `ob` from `registry`u	__class__N(u_get_mrougetattrutype(uregistryuobut((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu
_find_adapter�
s%u
_find_adaptercCs8tjj|�}tjj|�s4tj|�ndS(u1Ensure that the parent directory of `path` existsN(uosupathudirnameuisdirumakedirs(upathudirname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuensure_directory�
sccs�d}g}x�t|�D]|}|jd�r�|jd�rv|sI|rW||fVn|dd�j�}g}q�td|��q|j|�qW||fVdS(urSplit a string or iterable thereof into (section,content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    u[u]iuInvalid section headingNi����(uNoneuyield_linesu
startswithuendswithustripu
ValueErroruappend(ususectionucontentuline((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyusplit_sections�
s	cOsDddlm}tj}ztt_|||�SWd|t_XdS(Ni(umkstemp(utempfileumkstempuosuopenuos_open(uargsukwumkstempuold_open((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_mkstemp�
s		u_mkstempcCs@x9tt�D]+}|jd�s
tt|�||<q
q
WdS(Nu_(udiru_manageru
startswithugetattr(uguname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_initialize�
su_initializeuobjectcCs
|j�S(N(uactivate(udist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<lambda>�
s(�u__doc__usysuosutimeureuimpuzipfileu	zipimportuwarningsustatu	functoolsupkgutilutokenusymboluoperatoruplatformuget_importeruurlparseu
urlunparseuImportErroruurllib.parseu	frozensetu	NameErrorusetsuImmutableSetu
basestringunextu	cStringIOuStringIOuBytesIOustruiouNoneuexecfileuutimeumkdirurenameuunlinkuTrueu
WRITE_SUPPORTuFalseuopenuos_openuos.pathuisdirusplituversion_infouimplementationunameuimportlib._bootstrapu
_bootstrapuimportlib_bootstrapuparseru_bypass_ensure_directoryu_state_varsu_declare_stateu__getstate__u__setstate__u
_sget_dictu
_sset_dictu_sget_objectu_sset_objectu
_sget_noneu
_sset_noneuget_supported_platformu__all__u	ExceptionuResolutionErroruVersionConflictuDistributionNotFounduUnknownExtrau_provider_factoriesuversionuPY_MAJORuEGG_DISTuBINARY_DISTuSOURCE_DISTu
CHECKOUT_DISTuDEVELOP_DISTuregister_loader_typeuget_provideru_macosx_versu_macosx_archuget_build_platformucompileumacosVersionStringudarwinVersionStringuget_platformucompatible_platformsu
run_scripturun_mainuget_distributionuload_entry_pointu
get_entry_mapuget_entry_infouIMetadataProvideruIResourceProvideruobjectu
WorkingSetuEnvironmentuAvailableDistributionsuRuntimeErroruExtractionErroruResourceManageruget_default_cacheu	safe_nameusafe_versionu
safe_extrauto_filenameuMarkerEvaluationuis_invalid_markeruinvalid_markeruevaluate_markeruNullProvideruEggProvideruDefaultProviderutypeuSourceFileLoaderu
EmptyProvideruempty_providerubuild_zipmanifestuZipProvideruzipimporteruFileMetadatauPathMetadatauEggMetadatauregister_finderufind_distributionsufind_eggs_in_zipufind_nothingufind_on_pathuImpImporteru
FileFinderuregister_namespace_handleru
_handle_nsudeclare_namespaceufixup_namespace_packagesufile_ns_handlerunull_ns_handlerunormalize_pathu_normalize_cachedu_set_parent_nsuyield_linesumatchuLINE_ENDuCONTINUEuDISTROuVERSIONuCOMMAuOBRACKETuCBRACKETuMODULEuVERBOSEu
IGNORECASEuEGG_NAMEucomponent_reugetureplaceu_parse_version_partsu
parse_versionu
EntryPointu_remove_md5_fragmentuDistributionuDistInfoDistributionu_distributionImplu
issue_warninguparse_requirementsu_sort_distsuRequirementu
state_machineu_get_mrou
_find_adapteruensure_directoryusplit_sectionsu_mkstempu_manageru_initializeuglobalsu
_build_masteruworking_seturequireuiter_entry_pointsu	subscribeuadd_activation_listeneruentriesulistumapu	add_entryupath(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu<module>s�




'

									1�Y��)
	�		c
	!�

( 

,)h	�!?
>:
	
					python3.3/site-packages/pip/_vendor/__pycache__/six.cpython-33.pyc000064400000064611151733566750020745 0ustar00�
7�Re�[cA@sdZddlZddlZddlZdZdZejddkZejddkZer�e	fZ
efZe
fZe	ZeZejZn�efZ
eefZe
ejfZeZe	Zejjd�r�ed:�ZnWGd
d�de�Zyee��Wnek
r-ed<�ZYn
Xed>�Z[d
d�Zdd�ZGdd�de�Z Gdd�de �Z!Gdd�dej"�Z#Gdd�de �Z$Gdd�de#�Z%e$dddd�e$ddd d!d�e$d"ddd#d"�e$d$d%d d&d$�e$d'dd d(d'�e$d)d%d d*d)�e$d+d%d,d-�e$d.d%d/�e$ddd�e$d0d0d1�e$d*d%d d*d)�e$d2dd d3d2�e$d4ddd5d4�e!d d%�e!d6d7�e!d8d9�e!d:d;d<�e!d=d>d?�e!d@dAdB�e!dCdDdE�e!dFdGdH�e!dIdJdK�e!dLdMdN�e!dOdPdQ�e!dRdSdT�e!dUdUdV�e!dWdWdV�e!dXdXdV�e!dYdYdZ�e!d[d\�e!d]d^�e!d_d`�e!dadbda�e!dcdd�e!dedfdg�e!dhdidj�e!dkdldm�e!dndodp�e!dqdrds�e!dtdudv�e!dwdxdy�e!dzd{d|�e!d}d~d�e!d�d�d��e!d�d�dj�e!d�d�d��e!d�d�d��e!d�d�dp�e!d�e&d�d��e!d�e&d�d��e!d�e&d�e&d��e!d�d�d��e!d�d�d��e!d�d�d��e!d�d��g7Z'xKe'D]CZ(e)e%e(j*e(�e+e(e!�r:e(ej,e&d�e(j*<q:q:W[(e'e%_'e%e&d��Z-ej,e&d�<Gd�d��d�e#�Z.e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��gZ/x!e/D]Z(e)e.e(j*e(�q�W[(e/e._'e.e&d��ej,e&d�<ej,e&d�<Gd�d��d�e#�Z0e$d�d�d��e$d�d�d��e$d�d�d��gZ1x!e1D]Z(e)e0e(j*e(�qbW[(e1e0_'e0e&d��ej,e&d�<ej,e&d�<Gd�d��d�e#�Z2e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��g!Z3x!e3D]Z(e)e2e(j*e(�q�	W[(e3e2_'e2e&d��ej,e&d�<ej,e&d�<Gd�d��d�e#�Z4e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��gZ5x!e5D]Z(e)e4e(j*e(�qy
W[(e5e4_'e4e&d��ej,e&d�<ej,e&d�<Gd�d��d�e#�Z6e$d�d�d��gZ7x!e7D]Z(e)e6e(j*e(�q�
W[(e7e6_'e6e&d��ej,e&d�<ej,e&d�<Gd�d��d�ej"�Z8e8e&d��ej,e&d�<d�d��Z9d�d��Z:er�d�Z;d�Z<d�Z=d�Z>d�Z?d�Z@d�ZAd�ZBd�ZCd�ZDn<d�Z;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDy
eEZFWneGk
rHd	d
�ZFYnXeFZEy
eHZHWneGk
rydd�ZHYnXer�d
d�ZIejJZKeZLn4dd�ZIdd�ZKGdd�de�ZLeHZHeeId�ejMe;�ZNejMe<�ZOejMe=�ZPejMe>�ZQejMe?�ZRejMe@�ZSdd�ZTdd�ZUdd�ZVdd�ZWerdd�ZXdd�ZYeZZ[ejddkr�
dd�Z\nej]ddd �Z\ej^d�Z_ej`ZaebZcddldZdedjeZeedjfZfnad!d�ZXd"d�ZYe[Z[eZZ\d#d$�Z_d%d&�Zad'd(�ZcddleZeeejeZeZfeeXd)�eeYd*�er�ege-jhd+�Zidd,d-�Zknddd.d/�Zieid0�ege-jhd1d�Zleldkr�d2d3�Zlneekd4�d5d6�Zmd7d8�ZndS(?u6Utilities for writing code that runs on Python 2 and 3iNu'Benjamin Peterson <benjamin@python.org>u1.6.1iiujavaiicBs |EeZdZdd�ZdS(uXcCsdS(Niil((uself((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__len__8su	X.__len__N(u__name__u
__module__u__qualname__u__len__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuX7suXi?cCs
||_dS(u Add documentation to a function.N(u__doc__(ufuncudoc((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu_add_docEsu_add_doccCst|�tj|S(u7Import module, returning the module after the last dot.(u
__import__usysumodules(uname((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu_import_moduleJs
u_import_modulecBs,|EeZdZdd�Zdd�ZdS(u
_LazyDescrcCs
||_dS(N(uname(uselfuname((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__init__Rsu_LazyDescr.__init__cCsby|j�}Wn%tk
r7td|j��YnXt||j|�t|j|j�|S(Nu%s could not be imported (u_resolveuImportErroruAttributeErrorunameusetattrudelattru	__class__(uselfuobjutpuresult((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__get__Us
u_LazyDescr.__get__N(u__name__u
__module__u__qualname__u__init__u__get__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu
_LazyDescrPsu
_LazyDescrcsA|EeZdZd�fdd�Zdd�Zdd�Z�S(uMovedModulecsJtt|�j|�tr=|dkr1|}n||_n	||_dS(N(usuperuMovedModuleu__init__uPY3uNoneumod(uselfunameuoldunew(u	__class__(u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__init__cs	uMovedModule.__init__cCs
t|j�S(N(u_import_moduleumod(uself((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu_resolvelsuMovedModule._resolvec
Cs�|dkr-|jtjkr-t|��ny|j�}Wntk
r]t|��YnXt||�}t|||�|S(Nu__file__u__name__u__path__(u__file__u__name__u__path__(umodusysumodulesuAttributeErroru_resolveuImportErrorugetattrusetattr(uselfuattru_moduleuvalue((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__getattr__os

uMovedModule.__getattr__N(u__name__u
__module__u__qualname__uNoneu__init__u_resolveu__getattr__(u
__locals__((u	__class__u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuMovedModuleas	uMovedModulecs8|EeZdZ�fdd�Zdd�ZgZ�S(u_LazyModulecs)tt|�j|�|jj|_dS(N(usuperu_LazyModuleu__init__u	__class__u__doc__(uselfuname(u	__class__(u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__init__�su_LazyModule.__init__cCs*ddg}|dd�|jD�7}|S(Nu__doc__u__name__cSsg|]}|j�qS((uname(u.0uattr((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu
<listcomp>�s	u'_LazyModule.__dir__.<locals>.<listcomp>(u_moved_attributes(uselfuattrs((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__dir__�su_LazyModule.__dir__(u__name__u
__module__u__qualname__u__init__u__dir__u_moved_attributes(u
__locals__((u	__class__u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu_LazyModule�su_LazyModulecs8|EeZdZdd�fdd�Zdd�Z�S(uMovedAttributecs�tt|�j|�trp|dkr1|}n||_|dkrd|dkr[|}qd|}n||_n'||_|dkr�|}n||_dS(N(usuperuMovedAttributeu__init__uPY3uNoneumoduattr(uselfunameuold_modunew_moduold_attrunew_attr(u	__class__(u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__init__�s						uMovedAttribute.__init__cCst|j�}t||j�S(N(u_import_moduleumodugetattruattr(uselfumodule((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu_resolve�suMovedAttribute._resolveN(u__name__u
__module__u__qualname__uNoneu__init__u_resolve(u
__locals__((u	__class__u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuMovedAttribute�suMovedAttributecBs|EeZdZdZdS(u_MovedItemsuLazy loading of moved objectsN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu_MovedItems�su_MovedItemsu	cStringIOuiouStringIOufilteru	itertoolsubuiltinsuifilterufilterfalseuifilterfalseuinputu__builtin__u	raw_inputumapuimapurangeuxrangeu
reload_moduleuimpureloadureduceu	functoolsu
UserStringucollectionsuzipuizipuzip_longestuizip_longestuconfigparseruConfigParserucopyregucopy_regudbm_gnuugdbmudbm.gnuuhttp_cookiejaru	cookielibuhttp.cookiejaruhttp_cookiesuCookieuhttp.cookiesu
html_entitiesuhtmlentitydefsu
html.entitiesuhtml_parseru
HTMLParseruhtml.parseruhttp_clientuhttplibuhttp.clientuemail_mime_multipartuemail.MIMEMultipartuemail.mime.multipartuemail_mime_textuemail.MIMETextuemail.mime.textuemail_mime_baseuemail.MIMEBaseuemail.mime.baseuBaseHTTPServeruhttp.serveru
CGIHTTPServeruSimpleHTTPServerucPickleupickleuqueueuQueueureprlibureprusocketserveruSocketServeru_threaduthreadutkinteruTkinterutkinter_dialoguDialogutkinter.dialogutkinter_filedialogu
FileDialogutkinter.filedialogutkinter_scrolledtextuScrolledTextutkinter.scrolledtextutkinter_simpledialoguSimpleDialogutkinter.simpledialogutkinter_tixuTixutkinter.tixutkinter_ttkuttkutkinter.ttkutkinter_constantsuTkconstantsutkinter.constantsutkinter_dnduTkdndutkinter.dndutkinter_colorchooserutkColorChooserutkinter.colorchooserutkinter_commondialogutkCommonDialogutkinter.commondialogutkinter_tkfiledialogutkFileDialogutkinter_fontutkFontutkinter.fontutkinter_messageboxutkMessageBoxutkinter.messageboxutkinter_tksimpledialogutkSimpleDialoguurllib_parseu.moves.urllib_parseuurllib.parseuurllib_erroru.moves.urllib_erroruurllib.erroruurllibu
.moves.urllibuurllib_robotparserurobotparseruurllib.robotparseru
xmlrpc_clientu	xmlrpclibu
xmlrpc.clientu
xmlrpc_serveru
xmlrpc.serveruwinregu_winregu.moves.u.movescBs|EeZdZdZdS(uModule_six_moves_urllib_parseu7Lazy loading of moved objects in six.moves.urllib_parseN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuModule_six_moves_urllib_parse�suModule_six_moves_urllib_parseuParseResultuurlparseuSplitResultuparse_qsu	parse_qslu	urldefraguurljoinuurlsplitu
urlunparseu
urlunsplituquoteu
quote_plusuunquoteuunquote_plusu	urlencodeu
splitqueryu.moves.urllib.parsecBs|EeZdZdZdS(uModule_six_moves_urllib_erroru7Lazy loading of moved objects in six.moves.urllib_errorN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuModule_six_moves_urllib_errorsuModule_six_moves_urllib_erroruURLErroruurllib2u	HTTPErroruContentTooShortErroru.moves.urllib.errorcBs|EeZdZdZdS(uModule_six_moves_urllib_requestu9Lazy loading of moved objects in six.moves.urllib_requestN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuModule_six_moves_urllib_request+suModule_six_moves_urllib_requestuurlopenuurllib.requestuinstall_openerubuild_openerupathname2urluurl2pathnameu
getproxiesuRequestuOpenerDirectoruHTTPDefaultErrorHandleruHTTPRedirectHandleruHTTPCookieProcessoruProxyHandleruBaseHandleruHTTPPasswordMgruHTTPPasswordMgrWithDefaultRealmuAbstractBasicAuthHandleruHTTPBasicAuthHandleruProxyBasicAuthHandleruAbstractDigestAuthHandleruHTTPDigestAuthHandleruProxyDigestAuthHandleruHTTPHandleruHTTPSHandleruFileHandleru
FTPHandleruCacheFTPHandleruUnknownHandleruHTTPErrorProcessoruurlretrieveu
urlcleanupu	URLopeneruFancyURLopeneruproxy_bypassu.moves.urllib.requestu.moves.urllib_requestcBs|EeZdZdZdS(u Module_six_moves_urllib_responseu:Lazy loading of moved objects in six.moves.urllib_responseN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu Module_six_moves_urllib_response[su Module_six_moves_urllib_responseuaddbaseuurllib.responseuaddclosehookuaddinfou
addinfourlu.moves.urllib.responseu.moves.urllib_responsecBs|EeZdZdZdS(u#Module_six_moves_urllib_robotparseru=Lazy loading of moved objects in six.moves.urllib_robotparserN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu#Module_six_moves_urllib_robotparsernsu#Module_six_moves_urllib_robotparseruRobotFileParseru.moves.urllib.robotparseru.moves.urllib_robotparsercBs{|EeZdZdZejedZejedZejedZejedZ	ejedZ
dd�Zd	S(
uModule_six_moves_urllibuICreate a six.moves.urllib namespace that resembles the Python 3 namespaceu.moves.urllib_parseu.moves.urllib_erroru.moves.urllib_requestu.moves.urllib_responseu.moves.urllib_robotparsercCsdddddgS(Nuparseuerrorurequesturesponseurobotparser((uself((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu__dir__�suModule_six_moves_urllib.__dir__N(u__name__u
__module__u__qualname__u__doc__usysumodulesuparseuerrorurequesturesponseurobotparseru__dir__(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuModule_six_moves_urllib~suModule_six_moves_urllibcCstt|j|�dS(uAdd an item to six.moves.N(usetattru_MovedItemsuname(umove((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuadd_move�suadd_movecCs`ytt|�WnHtk
r[ytj|=Wn%tk
rVtd|f��YnXYnXdS(uRemove item from six.moves.uno such move, %rN(udelattru_MovedItemsuAttributeErrorumovesu__dict__uKeyError(uname((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuremove_move�s

uremove_moveu__func__u__self__u__closure__u__code__u__defaults__u__globals__ukeysuvaluesuitemsulistsuim_funcuim_selfufunc_closureu	func_codeu
func_defaultsufunc_globalsuiterkeysu
itervaluesu	iteritemsu	iterlistscCs
|j�S(N(unext(uit((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuadvance_iterator�suadvance_iteratorcCs tdd�t|�jD��S(Ncss|]}d|jkVqdS(u__call__N(u__dict__(u.0uklass((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu	<genexpr>�sucallable.<locals>.<genexpr>(uanyutypeu__mro__(uobj((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyucallable�sucallablecCs|S(N((uunbound((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuget_unbound_function�suget_unbound_functioncCs|jS(N(uim_func(uunbound((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuget_unbound_function�scCstj|||j�S(N(utypesu
MethodTypeu	__class__(ufuncuobj((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyucreate_bound_method�sucreate_bound_methodcBs |EeZdZdd�ZdS(uIteratorcCst|�j|�S(N(utypeu__next__(uself((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyunext�su
Iterator.nextN(u__name__u
__module__u__qualname__unext(u
__locals__((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuIterator�suIteratoru3Get the function out of a possibly unbound functioncKstt|t�|��S(u1Return an iterator over the keys of a dictionary.(uiterugetattru	_iterkeys(udukw((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuiterkeys�scKstt|t�|��S(u3Return an iterator over the values of a dictionary.(uiterugetattru_itervalues(udukw((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu
itervalues�scKstt|t�|��S(u?Return an iterator over the (key, value) pairs of a dictionary.(uiterugetattru
_iteritems(udukw((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu	iteritems�scKstt|t�|��S(uBReturn an iterator over the (key, [values]) pairs of a dictionary.(uiterugetattru
_iterlists(udukw((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu	iterlists�scCs
|jd�S(Nulatin-1(uencode(us((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyub�subcCs|S(N((us((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuu�suucCs
t|f�S(N(ubytes(ui((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuint2bytesuint2byteuto_bytesubigcCs|S(N((us((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyubscCst|jdd�d�S(Nu\\u\\\\uunicode_escape(uunicodeureplace(us((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuuscCst|d�S(Ni(uord(ubs((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyubyte2intsubyte2intcCst||�S(N(uord(ubufui((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu
indexbytessu
indexbytescCsdd�|D�S(Ncss|]}t|�VqdS(N(uord(u.0ubyte((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu	<genexpr>suiterbytes.<locals>.<genexpr>((ubuf((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu	iterbytessu	iterbytesuByte literaluText literaluexeccCs+|j|k	r!|j|��n|�dS(N(u
__traceback__uwith_traceback(utpuvalueutb((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyureraise#sureraisecCse|dkrBtjd�}|j}|dkr<|j}n~n|dkrW|}ntd�dS(uExecute code in a namespace.iuexec _code_ in _globs_, _locs_N(uNoneusysu	_getframeu	f_globalsuf_localsuexec(u_code_u_globs_u_locs_uframe((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuexec_)s		uexec_u9def reraise(tp, value, tb=None):
    raise tp, value, tb
uprintc
s�|jdtj���dkr%dS�fdd�}d}|jdd�}|dk	r�t|t�rsd
}q�t|t�s�t	d��q�n|jdd�}|dk	r�t|t�r�d
}q�t|t�s�t	d��q�n|rt	d	��n|s3x*|D]}t|t�r
d
}Pq
q
Wn|rTtd
�}td�}nd
}d}|dkru|}n|dkr�|}nx7t
|�D])\}	}|	r�||�n||�q�W||�dS(u4The new-style print function for Python 2.4 and 2.5.ufileNcs�t|t�st|�}nt�t�r�t|t�r��jdk	r�t�dd�}|dkrrd}n|j�j|�}n�j	|�dS(Nuerrorsustrict(
u
isinstanceu
basestringustrufileuunicodeuencodinguNoneugetattruencodeuwrite(udatauerrors(ufp(u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuwriteBs	uprint_.<locals>.writeusepusep must be None or a stringuenduend must be None or a stringu$invalid keyword arguments to print()u
u FT(upopusysustdoutuNoneuFalseu
isinstanceuunicodeuTrueustru	TypeErroru	enumerate(
uargsukwargsuwriteuwant_unicodeusepuenduargunewlineuspaceui((ufpu(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuprint_=sL		
		
uprint_uReraise an exception.cGs|d|i�S(u%Create a base class with a metaclass.uNewBase((umetaubases((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuwith_metaclassusuwith_metaclasscs�fdd�}|S(u6Class decorator for creating a class with a metaclass.cs�|jj�}|jdd�|jdd�|jd�}|dk	r�t|t�re|g}nx|D]}|j|�qlWn�|j|j|�S(Nu__dict__u__weakref__u	__slots__(	u__dict__ucopyupopuNoneugetu
isinstanceustru__name__u	__bases__(uclsu	orig_varsuslotsu	slots_var(u	metaclass(u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyuwrapper{s
uadd_metaclass.<locals>.wrapper((u	metaclassuwrapper((u	metaclassu(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu
add_metaclassysu
add_metaclassli���li���ll����(ou__doc__uoperatorusysutypesu
__author__u__version__uversion_infouPY2uPY3ustrustring_typesuintu
integer_typesutypeuclass_typesu	text_typeubytesubinary_typeumaxsizeuMAXSIZEu
basestringulongu	ClassTypeuunicodeuplatformu
startswithuobjectuXulenu
OverflowErroru_add_docu_import_moduleu
_LazyDescruMovedModuleu
ModuleTypeu_LazyModuleuMovedAttributeu_MovedItemsu__name__u_moved_attributesuattrusetattrunameu
isinstanceumodulesumovesuModule_six_moves_urllib_parseu_urllib_parse_moved_attributesuModule_six_moves_urllib_erroru_urllib_error_moved_attributesuModule_six_moves_urllib_requestu _urllib_request_moved_attributesu Module_six_moves_urllib_responseu!_urllib_response_moved_attributesu#Module_six_moves_urllib_robotparseru$_urllib_robotparser_moved_attributesuModule_six_moves_urllibuadd_moveuremove_moveu
_meth_funcu
_meth_selfu
_func_closureu
_func_codeu_func_defaultsu
_func_globalsu	_iterkeysu_itervaluesu
_iteritemsu
_iterlistsunextuadvance_iteratoru	NameErrorucallableuget_unbound_functionu
MethodTypeucreate_bound_methoduIteratoru
attrgetteruget_method_functionuget_method_selfuget_function_closureuget_function_codeuget_function_defaultsuget_function_globalsuiterkeysu
itervaluesu	iteritemsu	iterlistsubuuuchruunichruint2byteumethodcalleru
itemgetterubyte2intugetitemu
indexbytesuiteru	iterbytesuiouStringIOuBytesIOugetattrubuiltinsuexec_uNoneureraiseuprint_uwith_metaclassu
add_metaclass(((u(/tmp/pip-zej_zi-build/pip/_vendor/six.pyu<module>s*				
$			
	
	*
	*
	*
	*
	*	



				



5
python3.3/site-packages/pip/_vendor/six.py000064400000055646151733566750014474 0ustar00"""Utilities for writing code that runs on Python 2 and 3"""

# Copyright (c) 2010-2014 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import operator
import sys
import types

__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.6.1"


# Useful for very coarse version differentiation.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3

if PY3:
    string_types = str,
    integer_types = int,
    class_types = type,
    text_type = str
    binary_type = bytes

    MAXSIZE = sys.maxsize
else:
    string_types = basestring,
    integer_types = (int, long)
    class_types = (type, types.ClassType)
    text_type = unicode
    binary_type = str

    if sys.platform.startswith("java"):
        # Jython always uses 32 bits.
        MAXSIZE = int((1 << 31) - 1)
    else:
        # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
        class X(object):
            def __len__(self):
                return 1 << 31
        try:
            len(X())
        except OverflowError:
            # 32-bit
            MAXSIZE = int((1 << 31) - 1)
        else:
            # 64-bit
            MAXSIZE = int((1 << 63) - 1)
        del X


def _add_doc(func, doc):
    """Add documentation to a function."""
    func.__doc__ = doc


def _import_module(name):
    """Import module, returning the module after the last dot."""
    __import__(name)
    return sys.modules[name]


class _LazyDescr(object):

    def __init__(self, name):
        self.name = name

    def __get__(self, obj, tp):
        try:
            result = self._resolve()
        except ImportError:
            # See the nice big comment in MovedModule.__getattr__.
            raise AttributeError("%s could not be imported " % self.name)
        setattr(obj, self.name, result) # Invokes __set__.
        # This is a bit ugly, but it avoids running this again.
        delattr(obj.__class__, self.name)
        return result


class MovedModule(_LazyDescr):

    def __init__(self, name, old, new=None):
        super(MovedModule, self).__init__(name)
        if PY3:
            if new is None:
                new = name
            self.mod = new
        else:
            self.mod = old

    def _resolve(self):
        return _import_module(self.mod)

    def __getattr__(self, attr):
        # It turns out many Python frameworks like to traverse sys.modules and
        # try to load various attributes. This causes problems if this is a
        # platform-specific module on the wrong platform, like _winreg on
        # Unixes. Therefore, we silently pretend unimportable modules do not
        # have any attributes. See issues #51, #53, #56, and #63 for the full
        # tales of woe.
        #
        # First, if possible, avoid loading the module just to look at __file__,
        # __name__, or __path__.
        if (attr in ("__file__", "__name__", "__path__") and
            self.mod not in sys.modules):
            raise AttributeError(attr)
        try:
            _module = self._resolve()
        except ImportError:
            raise AttributeError(attr)
        value = getattr(_module, attr)
        setattr(self, attr, value)
        return value


class _LazyModule(types.ModuleType):

    def __init__(self, name):
        super(_LazyModule, self).__init__(name)
        self.__doc__ = self.__class__.__doc__

    def __dir__(self):
        attrs = ["__doc__", "__name__"]
        attrs += [attr.name for attr in self._moved_attributes]
        return attrs

    # Subclasses should override this
    _moved_attributes = []


class MovedAttribute(_LazyDescr):

    def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
        super(MovedAttribute, self).__init__(name)
        if PY3:
            if new_mod is None:
                new_mod = name
            self.mod = new_mod
            if new_attr is None:
                if old_attr is None:
                    new_attr = name
                else:
                    new_attr = old_attr
            self.attr = new_attr
        else:
            self.mod = old_mod
            if old_attr is None:
                old_attr = name
            self.attr = old_attr

    def _resolve(self):
        module = _import_module(self.mod)
        return getattr(module, self.attr)



class _MovedItems(_LazyModule):
    """Lazy loading of moved objects"""


_moved_attributes = [
    MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
    MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
    MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"),
    MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
    MovedAttribute("map", "itertools", "builtins", "imap", "map"),
    MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("reload_module", "__builtin__", "imp", "reload"),
    MovedAttribute("reduce", "__builtin__", "functools"),
    MovedAttribute("StringIO", "StringIO", "io"),
    MovedAttribute("UserString", "UserString", "collections"),
    MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
    MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),

    MovedModule("builtins", "__builtin__"),
    MovedModule("configparser", "ConfigParser"),
    MovedModule("copyreg", "copy_reg"),
    MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
    MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
    MovedModule("http_cookies", "Cookie", "http.cookies"),
    MovedModule("html_entities", "htmlentitydefs", "html.entities"),
    MovedModule("html_parser", "HTMLParser", "html.parser"),
    MovedModule("http_client", "httplib", "http.client"),
    MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
    MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
    MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
    MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
    MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
    MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
    MovedModule("cPickle", "cPickle", "pickle"),
    MovedModule("queue", "Queue"),
    MovedModule("reprlib", "repr"),
    MovedModule("socketserver", "SocketServer"),
    MovedModule("_thread", "thread", "_thread"),
    MovedModule("tkinter", "Tkinter"),
    MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
    MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
    MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
    MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
    MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
    MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
    MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
    MovedModule("tkinter_colorchooser", "tkColorChooser",
                "tkinter.colorchooser"),
    MovedModule("tkinter_commondialog", "tkCommonDialog",
                "tkinter.commondialog"),
    MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_font", "tkFont", "tkinter.font"),
    MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
    MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
                "tkinter.simpledialog"),
    MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
    MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
    MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
    MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
    MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
    MovedModule("xmlrpc_server", "xmlrpclib", "xmlrpc.server"),
    MovedModule("winreg", "_winreg"),
]
for attr in _moved_attributes:
    setattr(_MovedItems, attr.name, attr)
    if isinstance(attr, MovedModule):
        sys.modules[__name__ + ".moves." + attr.name] = attr
del attr

_MovedItems._moved_attributes = _moved_attributes

moves = sys.modules[__name__ + ".moves"] = _MovedItems(__name__ + ".moves")


class Module_six_moves_urllib_parse(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_parse"""


_urllib_parse_moved_attributes = [
    MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
    MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
    MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
    MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
    MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
    MovedAttribute("urljoin", "urlparse", "urllib.parse"),
    MovedAttribute("urlparse", "urlparse", "urllib.parse"),
    MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
    MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
    MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
    MovedAttribute("quote", "urllib", "urllib.parse"),
    MovedAttribute("quote_plus", "urllib", "urllib.parse"),
    MovedAttribute("unquote", "urllib", "urllib.parse"),
    MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
    MovedAttribute("urlencode", "urllib", "urllib.parse"),
    MovedAttribute("splitquery", "urllib", "urllib.parse"),
]
for attr in _urllib_parse_moved_attributes:
    setattr(Module_six_moves_urllib_parse, attr.name, attr)
del attr

Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes

sys.modules[__name__ + ".moves.urllib_parse"] = sys.modules[__name__ + ".moves.urllib.parse"] = Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse")


class Module_six_moves_urllib_error(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_error"""


_urllib_error_moved_attributes = [
    MovedAttribute("URLError", "urllib2", "urllib.error"),
    MovedAttribute("HTTPError", "urllib2", "urllib.error"),
    MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
]
for attr in _urllib_error_moved_attributes:
    setattr(Module_six_moves_urllib_error, attr.name, attr)
del attr

Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes

sys.modules[__name__ + ".moves.urllib_error"] = sys.modules[__name__ + ".moves.urllib.error"] = Module_six_moves_urllib_error(__name__ + ".moves.urllib.error")


class Module_six_moves_urllib_request(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_request"""


_urllib_request_moved_attributes = [
    MovedAttribute("urlopen", "urllib2", "urllib.request"),
    MovedAttribute("install_opener", "urllib2", "urllib.request"),
    MovedAttribute("build_opener", "urllib2", "urllib.request"),
    MovedAttribute("pathname2url", "urllib", "urllib.request"),
    MovedAttribute("url2pathname", "urllib", "urllib.request"),
    MovedAttribute("getproxies", "urllib", "urllib.request"),
    MovedAttribute("Request", "urllib2", "urllib.request"),
    MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
    MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
    MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
    MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
    MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
    MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
    MovedAttribute("FileHandler", "urllib2", "urllib.request"),
    MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
    MovedAttribute("urlretrieve", "urllib", "urllib.request"),
    MovedAttribute("urlcleanup", "urllib", "urllib.request"),
    MovedAttribute("URLopener", "urllib", "urllib.request"),
    MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
    MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
]
for attr in _urllib_request_moved_attributes:
    setattr(Module_six_moves_urllib_request, attr.name, attr)
del attr

Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes

sys.modules[__name__ + ".moves.urllib_request"] = sys.modules[__name__ + ".moves.urllib.request"] = Module_six_moves_urllib_request(__name__ + ".moves.urllib.request")


class Module_six_moves_urllib_response(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_response"""


_urllib_response_moved_attributes = [
    MovedAttribute("addbase", "urllib", "urllib.response"),
    MovedAttribute("addclosehook", "urllib", "urllib.response"),
    MovedAttribute("addinfo", "urllib", "urllib.response"),
    MovedAttribute("addinfourl", "urllib", "urllib.response"),
]
for attr in _urllib_response_moved_attributes:
    setattr(Module_six_moves_urllib_response, attr.name, attr)
del attr

Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes

sys.modules[__name__ + ".moves.urllib_response"] = sys.modules[__name__ + ".moves.urllib.response"] = Module_six_moves_urllib_response(__name__ + ".moves.urllib.response")


class Module_six_moves_urllib_robotparser(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_robotparser"""


_urllib_robotparser_moved_attributes = [
    MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
]
for attr in _urllib_robotparser_moved_attributes:
    setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
del attr

Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes

sys.modules[__name__ + ".moves.urllib_robotparser"] = sys.modules[__name__ + ".moves.urllib.robotparser"] = Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser")


class Module_six_moves_urllib(types.ModuleType):
    """Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
    parse = sys.modules[__name__ + ".moves.urllib_parse"]
    error = sys.modules[__name__ + ".moves.urllib_error"]
    request = sys.modules[__name__ + ".moves.urllib_request"]
    response = sys.modules[__name__ + ".moves.urllib_response"]
    robotparser = sys.modules[__name__ + ".moves.urllib_robotparser"]

    def __dir__(self):
        return ['parse', 'error', 'request', 'response', 'robotparser']


sys.modules[__name__ + ".moves.urllib"] = Module_six_moves_urllib(__name__ + ".moves.urllib")


def add_move(move):
    """Add an item to six.moves."""
    setattr(_MovedItems, move.name, move)


def remove_move(name):
    """Remove item from six.moves."""
    try:
        delattr(_MovedItems, name)
    except AttributeError:
        try:
            del moves.__dict__[name]
        except KeyError:
            raise AttributeError("no such move, %r" % (name,))


if PY3:
    _meth_func = "__func__"
    _meth_self = "__self__"

    _func_closure = "__closure__"
    _func_code = "__code__"
    _func_defaults = "__defaults__"
    _func_globals = "__globals__"

    _iterkeys = "keys"
    _itervalues = "values"
    _iteritems = "items"
    _iterlists = "lists"
else:
    _meth_func = "im_func"
    _meth_self = "im_self"

    _func_closure = "func_closure"
    _func_code = "func_code"
    _func_defaults = "func_defaults"
    _func_globals = "func_globals"

    _iterkeys = "iterkeys"
    _itervalues = "itervalues"
    _iteritems = "iteritems"
    _iterlists = "iterlists"


try:
    advance_iterator = next
except NameError:
    def advance_iterator(it):
        return it.next()
next = advance_iterator


try:
    callable = callable
except NameError:
    def callable(obj):
        return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)


if PY3:
    def get_unbound_function(unbound):
        return unbound

    create_bound_method = types.MethodType

    Iterator = object
else:
    def get_unbound_function(unbound):
        return unbound.im_func

    def create_bound_method(func, obj):
        return types.MethodType(func, obj, obj.__class__)

    class Iterator(object):

        def next(self):
            return type(self).__next__(self)

    callable = callable
_add_doc(get_unbound_function,
         """Get the function out of a possibly unbound function""")


get_method_function = operator.attrgetter(_meth_func)
get_method_self = operator.attrgetter(_meth_self)
get_function_closure = operator.attrgetter(_func_closure)
get_function_code = operator.attrgetter(_func_code)
get_function_defaults = operator.attrgetter(_func_defaults)
get_function_globals = operator.attrgetter(_func_globals)


def iterkeys(d, **kw):
    """Return an iterator over the keys of a dictionary."""
    return iter(getattr(d, _iterkeys)(**kw))

def itervalues(d, **kw):
    """Return an iterator over the values of a dictionary."""
    return iter(getattr(d, _itervalues)(**kw))

def iteritems(d, **kw):
    """Return an iterator over the (key, value) pairs of a dictionary."""
    return iter(getattr(d, _iteritems)(**kw))

def iterlists(d, **kw):
    """Return an iterator over the (key, [values]) pairs of a dictionary."""
    return iter(getattr(d, _iterlists)(**kw))


if PY3:
    def b(s):
        return s.encode("latin-1")
    def u(s):
        return s
    unichr = chr
    if sys.version_info[1] <= 1:
        def int2byte(i):
            return bytes((i,))
    else:
        # This is about 2x faster than the implementation above on 3.2+
        int2byte = operator.methodcaller("to_bytes", 1, "big")
    byte2int = operator.itemgetter(0)
    indexbytes = operator.getitem
    iterbytes = iter
    import io
    StringIO = io.StringIO
    BytesIO = io.BytesIO
else:
    def b(s):
        return s
    # Workaround for standalone backslash
    def u(s):
        return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
    unichr = unichr
    int2byte = chr
    def byte2int(bs):
        return ord(bs[0])
    def indexbytes(buf, i):
        return ord(buf[i])
    def iterbytes(buf):
        return (ord(byte) for byte in buf)
    import StringIO
    StringIO = BytesIO = StringIO.StringIO
_add_doc(b, """Byte literal""")
_add_doc(u, """Text literal""")


if PY3:
    exec_ = getattr(moves.builtins, "exec")


    def reraise(tp, value, tb=None):
        if value.__traceback__ is not tb:
            raise value.with_traceback(tb)
        raise value

else:
    def exec_(_code_, _globs_=None, _locs_=None):
        """Execute code in a namespace."""
        if _globs_ is None:
            frame = sys._getframe(1)
            _globs_ = frame.f_globals
            if _locs_ is None:
                _locs_ = frame.f_locals
            del frame
        elif _locs_ is None:
            _locs_ = _globs_
        exec("""exec _code_ in _globs_, _locs_""")


    exec_("""def reraise(tp, value, tb=None):
    raise tp, value, tb
""")


print_ = getattr(moves.builtins, "print", None)
if print_ is None:
    def print_(*args, **kwargs):
        """The new-style print function for Python 2.4 and 2.5."""
        fp = kwargs.pop("file", sys.stdout)
        if fp is None:
            return
        def write(data):
            if not isinstance(data, basestring):
                data = str(data)
            # If the file has an encoding, encode unicode with it.
            if (isinstance(fp, file) and
                isinstance(data, unicode) and
                fp.encoding is not None):
                errors = getattr(fp, "errors", None)
                if errors is None:
                    errors = "strict"
                data = data.encode(fp.encoding, errors)
            fp.write(data)
        want_unicode = False
        sep = kwargs.pop("sep", None)
        if sep is not None:
            if isinstance(sep, unicode):
                want_unicode = True
            elif not isinstance(sep, str):
                raise TypeError("sep must be None or a string")
        end = kwargs.pop("end", None)
        if end is not None:
            if isinstance(end, unicode):
                want_unicode = True
            elif not isinstance(end, str):
                raise TypeError("end must be None or a string")
        if kwargs:
            raise TypeError("invalid keyword arguments to print()")
        if not want_unicode:
            for arg in args:
                if isinstance(arg, unicode):
                    want_unicode = True
                    break
        if want_unicode:
            newline = unicode("\n")
            space = unicode(" ")
        else:
            newline = "\n"
            space = " "
        if sep is None:
            sep = space
        if end is None:
            end = newline
        for i, arg in enumerate(args):
            if i:
                write(sep)
            write(arg)
        write(end)

_add_doc(reraise, """Reraise an exception.""")


def with_metaclass(meta, *bases):
    """Create a base class with a metaclass."""
    return meta("NewBase", bases, {})

def add_metaclass(metaclass):
    """Class decorator for creating a class with a metaclass."""
    def wrapper(cls):
        orig_vars = cls.__dict__.copy()
        orig_vars.pop('__dict__', None)
        orig_vars.pop('__weakref__', None)
        slots = orig_vars.get('__slots__')
        if slots is not None:
            if isinstance(slots, str):
                slots = [slots]
            for slots_var in slots:
                orig_vars.pop(slots_var)
        return metaclass(cls.__name__, cls.__bases__, orig_vars)
    return wrapper
python3.3/site-packages/pip/_vendor/html5lib/ihatexml.py000064400000040305151733566750017206 0ustar00from __future__ import absolute_import, division, unicode_literals

import re
import warnings

from .constants import DataLossWarning

baseChar = """
[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] |
[#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] |
[#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] |
[#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 |
[#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] |
[#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] |
[#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] |
[#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] |
[#x04EE-#x04F5] | [#x04F8-#x04F9] | [#x0531-#x0556] | #x0559 |
[#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] |
[#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] |
[#x06D0-#x06D3] | #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D |
[#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] |
[#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] |
[#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] |
[#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] |
[#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | [#x0A72-#x0A74] |
[#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] |
[#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 |
[#x0B05-#x0B0C] | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] |
[#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] |
[#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] |
[#x0B99-#x0B9A] | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] |
[#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] |
[#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] |
[#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] |
[#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] |
[#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | [#x0D2A-#x0D39] |
[#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] |
[#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A |
#x0E8D | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 |
#x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] |
#x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] |
[#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] |
[#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C |
#x113E | #x1140 | #x114C | #x114E | #x1150 | [#x1154-#x1155] | #x1159 |
[#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] |
[#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] |
[#x11B7-#x11B8] | #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 |
[#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] |
[#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | #x1F5B |
#x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE |
[#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] |
[#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 |
[#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] |
[#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3]"""

ideographic = """[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]"""

combiningCharacter = """
[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] |
[#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 |
[#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] |
[#x06E0-#x06E4] | [#x06E7-#x06E8] | [#x06EA-#x06ED] | [#x0901-#x0903] |
#x093C | [#x093E-#x094C] | #x094D | [#x0951-#x0954] | [#x0962-#x0963] |
[#x0981-#x0983] | #x09BC | #x09BE | #x09BF | [#x09C0-#x09C4] |
[#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 | [#x09E2-#x09E3] | #x0A02 |
#x0A3C | #x0A3E | #x0A3F | [#x0A40-#x0A42] | [#x0A47-#x0A48] |
[#x0A4B-#x0A4D] | [#x0A70-#x0A71] | [#x0A81-#x0A83] | #x0ABC |
[#x0ABE-#x0AC5] | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] |
#x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] | [#x0B4B-#x0B4D] |
[#x0B56-#x0B57] | [#x0B82-#x0B83] | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] |
[#x0BCA-#x0BCD] | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] |
[#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] | [#x0C82-#x0C83] |
[#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] |
[#x0D02-#x0D03] | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] |
#x0D57 | #x0E31 | [#x0E34-#x0E3A] | [#x0E47-#x0E4E] | #x0EB1 |
[#x0EB4-#x0EB9] | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] |
#x0F35 | #x0F37 | #x0F39 | #x0F3E | #x0F3F | [#x0F71-#x0F84] |
[#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] |
[#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] |
#x3099 | #x309A"""

digit = """
[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] |
[#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] |
[#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] |
[#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]"""

extender = """
#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 |
#[#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]"""

letter = " | ".join([baseChar, ideographic])

# Without the
name = " | ".join([letter, digit, ".", "-", "_", combiningCharacter,
                   extender])
nameFirst = " | ".join([letter, "_"])

reChar = re.compile(r"#x([\d|A-F]{4,4})")
reCharRange = re.compile(r"\[#x([\d|A-F]{4,4})-#x([\d|A-F]{4,4})\]")


def charStringToList(chars):
    charRanges = [item.strip() for item in chars.split(" | ")]
    rv = []
    for item in charRanges:
        foundMatch = False
        for regexp in (reChar, reCharRange):
            match = regexp.match(item)
            if match is not None:
                rv.append([hexToInt(item) for item in match.groups()])
                if len(rv[-1]) == 1:
                    rv[-1] = rv[-1] * 2
                foundMatch = True
                break
        if not foundMatch:
            assert len(item) == 1

            rv.append([ord(item)] * 2)
    rv = normaliseCharList(rv)
    return rv


def normaliseCharList(charList):
    charList = sorted(charList)
    for item in charList:
        assert item[1] >= item[0]
    rv = []
    i = 0
    while i < len(charList):
        j = 1
        rv.append(charList[i])
        while i + j < len(charList) and charList[i + j][0] <= rv[-1][1] + 1:
            rv[-1][1] = charList[i + j][1]
            j += 1
        i += j
    return rv

# We don't really support characters above the BMP :(
max_unicode = int("FFFF", 16)


def missingRanges(charList):
    rv = []
    if charList[0] != 0:
        rv.append([0, charList[0][0] - 1])
    for i, item in enumerate(charList[:-1]):
        rv.append([item[1] + 1, charList[i + 1][0] - 1])
    if charList[-1][1] != max_unicode:
        rv.append([charList[-1][1] + 1, max_unicode])
    return rv


def listToRegexpStr(charList):
    rv = []
    for item in charList:
        if item[0] == item[1]:
            rv.append(escapeRegexp(chr(item[0])))
        else:
            rv.append(escapeRegexp(chr(item[0])) + "-" +
                      escapeRegexp(chr(item[1])))
    return "[%s]" % "".join(rv)


def hexToInt(hex_str):
    return int(hex_str, 16)


def escapeRegexp(string):
    specialCharacters = (".", "^", "$", "*", "+", "?", "{", "}",
                         "[", "]", "|", "(", ")", "-")
    for char in specialCharacters:
        string = string.replace(char, "\\" + char)

    return string

# output from the above
nonXmlNameBMPRegexp = re.compile('[\x00-,/:-@\\[-\\^`\\{-\xb6\xb8-\xbf\xd7\xf7\u0132-\u0133\u013f-\u0140\u0149\u017f\u01c4-\u01cc\u01f1-\u01f3\u01f6-\u01f9\u0218-\u024f\u02a9-\u02ba\u02c2-\u02cf\u02d2-\u02ff\u0346-\u035f\u0362-\u0385\u038b\u038d\u03a2\u03cf\u03d7-\u03d9\u03db\u03dd\u03df\u03e1\u03f4-\u0400\u040d\u0450\u045d\u0482\u0487-\u048f\u04c5-\u04c6\u04c9-\u04ca\u04cd-\u04cf\u04ec-\u04ed\u04f6-\u04f7\u04fa-\u0530\u0557-\u0558\u055a-\u0560\u0587-\u0590\u05a2\u05ba\u05be\u05c0\u05c3\u05c5-\u05cf\u05eb-\u05ef\u05f3-\u0620\u063b-\u063f\u0653-\u065f\u066a-\u066f\u06b8-\u06b9\u06bf\u06cf\u06d4\u06e9\u06ee-\u06ef\u06fa-\u0900\u0904\u093a-\u093b\u094e-\u0950\u0955-\u0957\u0964-\u0965\u0970-\u0980\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09bb\u09bd\u09c5-\u09c6\u09c9-\u09ca\u09ce-\u09d6\u09d8-\u09db\u09de\u09e4-\u09e5\u09f2-\u0a01\u0a03-\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a3b\u0a3d\u0a43-\u0a46\u0a49-\u0a4a\u0a4e-\u0a58\u0a5d\u0a5f-\u0a65\u0a75-\u0a80\u0a84\u0a8c\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abb\u0ac6\u0aca\u0ace-\u0adf\u0ae1-\u0ae5\u0af0-\u0b00\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34-\u0b35\u0b3a-\u0b3b\u0b44-\u0b46\u0b49-\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b62-\u0b65\u0b70-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bb6\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce-\u0bd6\u0bd8-\u0be6\u0bf0-\u0c00\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c3d\u0c45\u0c49\u0c4e-\u0c54\u0c57-\u0c5f\u0c62-\u0c65\u0c70-\u0c81\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cbd\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce2-\u0ce5\u0cf0-\u0d01\u0d04\u0d0d\u0d11\u0d29\u0d3a-\u0d3d\u0d44-\u0d45\u0d49\u0d4e-\u0d56\u0d58-\u0d5f\u0d62-\u0d65\u0d70-\u0e00\u0e2f\u0e3b-\u0e3f\u0e4f\u0e5a-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eaf\u0eba\u0ebe-\u0ebf\u0ec5\u0ec7\u0ece-\u0ecf\u0eda-\u0f17\u0f1a-\u0f1f\u0f2a-\u0f34\u0f36\u0f38\u0f3a-\u0f3d\u0f48\u0f6a-\u0f70\u0f85\u0f8c-\u0f8f\u0f96\u0f98\u0fae-\u0fb0\u0fb8\u0fba-\u109f\u10c6-\u10cf\u10f7-\u10ff\u1101\u1104\u1108\u110a\u110d\u1113-\u113b\u113d\u113f\u1141-\u114b\u114d\u114f\u1151-\u1153\u1156-\u1158\u115a-\u115e\u1162\u1164\u1166\u1168\u116a-\u116c\u116f-\u1171\u1174\u1176-\u119d\u119f-\u11a7\u11a9-\u11aa\u11ac-\u11ad\u11b0-\u11b6\u11b9\u11bb\u11c3-\u11ea\u11ec-\u11ef\u11f1-\u11f8\u11fa-\u1dff\u1e9c-\u1e9f\u1efa-\u1eff\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fbd\u1fbf-\u1fc1\u1fc5\u1fcd-\u1fcf\u1fd4-\u1fd5\u1fdc-\u1fdf\u1fed-\u1ff1\u1ff5\u1ffd-\u20cf\u20dd-\u20e0\u20e2-\u2125\u2127-\u2129\u212c-\u212d\u212f-\u217f\u2183-\u3004\u3006\u3008-\u3020\u3030\u3036-\u3040\u3095-\u3098\u309b-\u309c\u309f-\u30a0\u30fb\u30ff-\u3104\u312d-\u4dff\u9fa6-\uabff\ud7a4-\uffff]')

nonXmlNameFirstBMPRegexp = re.compile('[\x00-@\\[-\\^`\\{-\xbf\xd7\xf7\u0132-\u0133\u013f-\u0140\u0149\u017f\u01c4-\u01cc\u01f1-\u01f3\u01f6-\u01f9\u0218-\u024f\u02a9-\u02ba\u02c2-\u0385\u0387\u038b\u038d\u03a2\u03cf\u03d7-\u03d9\u03db\u03dd\u03df\u03e1\u03f4-\u0400\u040d\u0450\u045d\u0482-\u048f\u04c5-\u04c6\u04c9-\u04ca\u04cd-\u04cf\u04ec-\u04ed\u04f6-\u04f7\u04fa-\u0530\u0557-\u0558\u055a-\u0560\u0587-\u05cf\u05eb-\u05ef\u05f3-\u0620\u063b-\u0640\u064b-\u0670\u06b8-\u06b9\u06bf\u06cf\u06d4\u06d6-\u06e4\u06e7-\u0904\u093a-\u093c\u093e-\u0957\u0962-\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09db\u09de\u09e2-\u09ef\u09f2-\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a58\u0a5d\u0a5f-\u0a71\u0a75-\u0a84\u0a8c\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abc\u0abe-\u0adf\u0ae1-\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34-\u0b35\u0b3a-\u0b3c\u0b3e-\u0b5b\u0b5e\u0b62-\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bb6\u0bba-\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c5f\u0c62-\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cdd\u0cdf\u0ce2-\u0d04\u0d0d\u0d11\u0d29\u0d3a-\u0d5f\u0d62-\u0e00\u0e2f\u0e31\u0e34-\u0e3f\u0e46-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eaf\u0eb1\u0eb4-\u0ebc\u0ebe-\u0ebf\u0ec5-\u0f3f\u0f48\u0f6a-\u109f\u10c6-\u10cf\u10f7-\u10ff\u1101\u1104\u1108\u110a\u110d\u1113-\u113b\u113d\u113f\u1141-\u114b\u114d\u114f\u1151-\u1153\u1156-\u1158\u115a-\u115e\u1162\u1164\u1166\u1168\u116a-\u116c\u116f-\u1171\u1174\u1176-\u119d\u119f-\u11a7\u11a9-\u11aa\u11ac-\u11ad\u11b0-\u11b6\u11b9\u11bb\u11c3-\u11ea\u11ec-\u11ef\u11f1-\u11f8\u11fa-\u1dff\u1e9c-\u1e9f\u1efa-\u1eff\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fbd\u1fbf-\u1fc1\u1fc5\u1fcd-\u1fcf\u1fd4-\u1fd5\u1fdc-\u1fdf\u1fed-\u1ff1\u1ff5\u1ffd-\u2125\u2127-\u2129\u212c-\u212d\u212f-\u217f\u2183-\u3006\u3008-\u3020\u302a-\u3040\u3095-\u30a0\u30fb-\u3104\u312d-\u4dff\u9fa6-\uabff\ud7a4-\uffff]')

# Simpler things
nonPubidCharRegexp = re.compile("[^\x20\x0D\x0Aa-zA-Z0-9\-\'()+,./:=?;!*#@$_%]")


class InfosetFilter(object):
    replacementRegexp = re.compile(r"U[\dA-F]{5,5}")

    def __init__(self, replaceChars=None,
                 dropXmlnsLocalName=False,
                 dropXmlnsAttrNs=False,
                 preventDoubleDashComments=False,
                 preventDashAtCommentEnd=False,
                 replaceFormFeedCharacters=True,
                 preventSingleQuotePubid=False):

        self.dropXmlnsLocalName = dropXmlnsLocalName
        self.dropXmlnsAttrNs = dropXmlnsAttrNs

        self.preventDoubleDashComments = preventDoubleDashComments
        self.preventDashAtCommentEnd = preventDashAtCommentEnd

        self.replaceFormFeedCharacters = replaceFormFeedCharacters

        self.preventSingleQuotePubid = preventSingleQuotePubid

        self.replaceCache = {}

    def coerceAttribute(self, name, namespace=None):
        if self.dropXmlnsLocalName and name.startswith("xmlns:"):
            warnings.warn("Attributes cannot begin with xmlns", DataLossWarning)
            return None
        elif (self.dropXmlnsAttrNs and
              namespace == "http://www.w3.org/2000/xmlns/"):
            warnings.warn("Attributes cannot be in the xml namespace", DataLossWarning)
            return None
        else:
            return self.toXmlName(name)

    def coerceElement(self, name, namespace=None):
        return self.toXmlName(name)

    def coerceComment(self, data):
        if self.preventDoubleDashComments:
            while "--" in data:
                warnings.warn("Comments cannot contain adjacent dashes", DataLossWarning)
                data = data.replace("--", "- -")
        return data

    def coerceCharacters(self, data):
        if self.replaceFormFeedCharacters:
            for i in range(data.count("\x0C")):
                warnings.warn("Text cannot contain U+000C", DataLossWarning)
            data = data.replace("\x0C", " ")
        # Other non-xml characters
        return data

    def coercePubid(self, data):
        dataOutput = data
        for char in nonPubidCharRegexp.findall(data):
            warnings.warn("Coercing non-XML pubid", DataLossWarning)
            replacement = self.getReplacementCharacter(char)
            dataOutput = dataOutput.replace(char, replacement)
        if self.preventSingleQuotePubid and dataOutput.find("'") >= 0:
            warnings.warn("Pubid cannot contain single quote", DataLossWarning)
            dataOutput = dataOutput.replace("'", self.getReplacementCharacter("'"))
        return dataOutput

    def toXmlName(self, name):
        nameFirst = name[0]
        nameRest = name[1:]
        m = nonXmlNameFirstBMPRegexp.match(nameFirst)
        if m:
            warnings.warn("Coercing non-XML name", DataLossWarning)
            nameFirstOutput = self.getReplacementCharacter(nameFirst)
        else:
            nameFirstOutput = nameFirst

        nameRestOutput = nameRest
        replaceChars = set(nonXmlNameBMPRegexp.findall(nameRest))
        for char in replaceChars:
            warnings.warn("Coercing non-XML name", DataLossWarning)
            replacement = self.getReplacementCharacter(char)
            nameRestOutput = nameRestOutput.replace(char, replacement)
        return nameFirstOutput + nameRestOutput

    def getReplacementCharacter(self, char):
        if char in self.replaceCache:
            replacement = self.replaceCache[char]
        else:
            replacement = self.escapeChar(char)
        return replacement

    def fromXmlName(self, name):
        for item in set(self.replacementRegexp.findall(name)):
            name = name.replace(item, self.unescapeChar(item))
        return name

    def escapeChar(self, char):
        replacement = "U%05X" % ord(char)
        self.replaceCache[char] = replacement
        return replacement

    def unescapeChar(self, charcode):
        return chr(int(charcode[1:], 16))
python3.3/site-packages/pip/_vendor/html5lib/filters/sanitizer.py000064400000000540151733566750021050 0ustar00from __future__ import absolute_import, division, unicode_literals

from . import _base
from ..sanitizer import HTMLSanitizerMixin


class Filter(_base.Filter, HTMLSanitizerMixin):
    def __iter__(self):
        for token in _base.Filter.__iter__(self):
            token = self.sanitize_token(token)
            if token:
                yield token
python3.3/site-packages/pip/_vendor/html5lib/filters/__pycache__/optionaltags.cpython-33.pyc000064400000011161151733566750026026 0ustar00�
7�Re)c@sIddlmZmZmZddlmZGdd�dej�ZdS(i(uabsolute_importudivisionuunicode_literalsi(u_basecBsD|EeZdZdd�Zdd�Zdd�Zdd�Zd	S(
uFilterccsYd}}x:|jD]/}|dk	r7|||fVn|}|}qW||dfVdS(N(uNoneusource(uselfu	previous1u	previous2utoken((uB/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/optionaltags.pyusliders

u
Filter.sliderccs�x�|j�D]�\}}}|d}|dkra|dsV|j|d||�r�|Vq�q
|dkr�|j|d|�s�|Vq�q
|Vq
WdS(NutypeuStartTagudataunameuEndTag(uslideruis_optional_startuis_optional_end(uselfupreviousutokenunextutype((uB/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/optionaltags.pyu__iter__s

uFilter.__iter__cCs*|r|dpd}|dkr,|dkS|dkre|dkrHdS|dkr&|d	dkSn�|d
kr�|dkr�dS|dkr�|d	dkSdSn�|d
kr�|dkr�|d	dkSdSnW|dkr&|dkr|r|ddkr|d	dkrdS|d	dkSdSndS(NutypeuhtmluCommentuSpaceCharactersuheaduStartTaguEmptyTaguEndTagunameubodyuscriptustyleucolgroupucolutbodyutheadutfootutr(uCommentuSpaceCharacters(uStartTaguEmptyTagT(uCommentuSpaceCharactersF(uscriptustyle(uStartTaguEmptyTag(utbodyutheadutfoot(uNoneuTrueuFalse(uselfutagnameupreviousunextutype((uB/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/optionaltags.pyuis_optional_starts4
uFilter.is_optional_startcCs�|r|dpd}|d5kr,|d6kS|d7krk|d
krR|d|kS|dkpg|dkSn|d8kr�|d
kr�|dd9kS|dkr�|dkp�|dkSd:Sn�|dkr�|d;kr�|dd<kS|dkp�|dkSn�|d,kr8|d
kr|dd=kS|dkp4|dkSnI|d>krw|d
kr^|dd?kS|dkps|dkSn
|d/kr�|d@kr�d:S|d
kr�|dd/kSdASn�|dBkr|d
kr�|ddCkS|d1kr�|dkp�|dkSd:Sn~|d2krB|d
kr)|dd1kS|dkp>|dkSn?|dDkr�|d
krh|ddEkS|dkp}|dkSnd:S(FNutypeuhtmluheadubodyuCommentuSpaceCharactersuliuoptgrouputruStartTagunameuEndTagudtuddupuEmptyTaguaddressuarticleuasideu
blockquoteudatagridudialogudirudivudlufieldsetufooteruformuh1uh2uh3uh4uh5uh6uheaderuhrumenuunavuolupreusectionutableuuluoptionurturpucolgrouputheadutbodyutfootutduth(uhtmluheadubody(uCommentuSpaceCharacters(uliuoptgrouputr(udtudd(udtuddF(uStartTaguEmptyTag(uaddressuarticleuasideu
blockquoteudatagridudialogudirudivudlufieldsetufooteruformuh1uh2uh3uh4uh5uh6uheaderuhrumenuunavuolupupreusectionutableuul(uoptionuoptgroup(urturp(urturp(uCommentuSpaceCharactersT(utheadutbody(utbodyutfoot(utduth(utduth(uNoneuFalseuTrue(uselfutagnameunextutype((uB/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/optionaltags.pyuis_optional_endVsf

uFilter.is_optional_endN(u__name__u
__module__u__qualname__uslideru__iter__uis_optional_startuis_optional_end(u
__locals__((uB/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/optionaltags.pyuFilters	
9uFilterN(u
__future__uabsolute_importudivisionuunicode_literalsuu_baseuFilter(((uB/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/optionaltags.pyu<module>ssite-packages/pip/_vendor/html5lib/filters/__pycache__/alphabeticalattributes.cpython-33.pyc000064400000003075151733566750027770 0ustar00python3.3�
7�Repc@s�ddlmZmZmZddlmZyddlmZWn"ek
rdddl	mZYnXGdd�dej
�Z
dS(i(uabsolute_importudivisionuunicode_literalsi(u_base(uOrderedDictcBs |EeZdZdd�ZdS(uFilterccs�x�tjj|�D]n}|ddkr|t�}x:t|dj�ddd��D]\}}|||<qUW||d<n|VqWdS(	NutypeuStartTaguEmptyTagudataukeycSs|dS(Ni((ux((uL/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/alphabeticalattributes.pyu<lambda>su!Filter.__iter__.<locals>.<lambda>(uStartTaguEmptyTag(u_baseuFilteru__iter__uOrderedDictusorteduitems(uselfutokenuattrsunameuvalue((uL/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/alphabeticalattributes.pyu__iter__s	
uFilter.__iter__N(u__name__u
__module__u__qualname__u__iter__(u
__locals__((uL/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/alphabeticalattributes.pyuFiltersuFilterN(u
__future__uabsolute_importudivisionuunicode_literalsuu_baseucollectionsuOrderedDictuImportErroruordereddictuFilter(((uL/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/alphabeticalattributes.pyu<module>s
python3.3/site-packages/pip/_vendor/html5lib/filters/__pycache__/__init__.cpython-33.pyc000064400000000235151733566750025061 0ustar00�
7�Rec@sdS(N((((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/filters/__pycache__/lint.cpython-33.pyc000064400000007756151733566750024307 0ustar00�
7�Re�c@s�ddlmZmZmZddlmZeZddlmZddlm	Z	m
Z
mZddlmZdj
e�ZGd	d
�d
e�ZGdd�dej�Zd
S(i(uabsolute_importudivisionuunicode_literals(ugettexti(u_basei(u
cdataElementsurcdataElementsuvoidElements(uspaceCharactersucBs|EeZdZdS(u	LintErrorN(u__name__u
__module__u__qualname__(u
__locals__((u:/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/lint.pyu	LintError
su	LintErrorcBs |EeZdZdd�ZdS(uFilterc		cs�g}d}xqtjj|�D]]}|d}|d&kr!|d}|dkrqttd�i|d6��nt|t�s�ttd�i|d6��n|s�ttd	���n|dkr�|tkr�ttd
�i|d6��n<|dkr/|tkr/ttd�i|dd6��n|dkrK|j|�nx�|dD]�\}}t|t�s�ttd
�i|d6��n|s�ttd���nt|t�sVttd�i|d6��qVqVW|t	kr�d}qw|t
kr	d}qw|dkrwd}qwnV|dkr�|d}t|t�sfttd�i|d6��n|s�ttd	���n|tkr�ttd�i|d6��n|j�}||kr�ttd�i|d6|d6��nd}n�|dkr%|dkrwttd���qwnR|d'kr�|d}t|t�sjttd
�i|d6��n|s�ttd�i|d6��n|dkrw|jt
�}|r�ttd�i|d 6��q�qwn�|d!krK|d}|dkrttd"�i|d6��nt|t�swttd�i|d6��qwn,|d(krZnttd%�i|d6��|VqWdS()NuPCDATAutypeuStartTaguEmptyTagunameu2StartTag not in PCDATA content model flag: %(tag)sutagu!Tag name is not a string: %(tag)ruEmpty tag nameu0Void element reported as StartTag token: %(tag)su4Non-void element reported as EmptyTag token: %(tag)sudatau(Attribute name is not a string: %(name)ruEmpty attribute nameu*Attribute value is not a string: %(value)ruvalueuCDATAuRCDATAu	plaintextu	PLAINTEXTuEndTagu.Void element reported as EndTag token: %(tag)su4EndTag (%(end)s) does not match StartTag (%(start)s)uendustartuCommentu(Comment not in PCDATA content model flagu
CharactersuSpaceCharactersu%(type)s token with empty datau@Non-space character(s) found in SpaceCharacters token: %(token)rutokenuDoctypeu2Doctype not in PCDATA content model flag: %(name)su
ParseErroruSerializeErroruUnknown token type: %(type)s(uStartTaguEmptyTag(u
CharactersuSpaceCharacters(u
ParseErroruSerializeError(u_baseuFilteru__iter__u	LintErroru_u
isinstanceustruvoidElementsuappendu
cdataElementsurcdataElementsupopustripuspaceCharacters(	uselfu
open_elementsucontentModelFlagutokenutypeunameuvalueu
start_nameudata((u:/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/lint.pyu__iter__s�

   $ $		
  '	
  &
 #uFilter.__iter__N(u__name__u
__module__u__qualname__u__iter__(u
__locals__((u:/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/lint.pyuFiltersuFilterN(u
__future__uabsolute_importudivisionuunicode_literalsugettextu_uu_baseu	constantsu
cdataElementsurcdataElementsuvoidElementsuspaceCharactersujoinu	Exceptionu	LintErroruFilter(((u:/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/lint.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/filters/__pycache__/_base.cpython-33.pyc000064400000002440151733566750024373 0ustar00�
7�Rec@s6ddlmZmZmZGdd�de�ZdS(i(uabsolute_importudivisionuunicode_literalscBs8|EeZdZdd�Zdd�Zdd�ZdS(uFiltercCs
||_dS(N(usource(uselfusource((u;/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/_base.pyu__init__suFilter.__init__cCs
t|j�S(N(uiterusource(uself((u;/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/_base.pyu__iter__suFilter.__iter__cCst|j|�S(N(ugetattrusource(uselfuname((u;/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/_base.pyu__getattr__suFilter.__getattr__N(u__name__u
__module__u__qualname__u__init__u__iter__u__getattr__(u
__locals__((u;/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/_base.pyuFiltersuFilterN(u
__future__uabsolute_importudivisionuunicode_literalsuobjectuFilter(((u;/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/_base.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/filters/__pycache__/inject_meta_charset.cpython-33.pyc000064400000004640151733566750027321 0ustar00�
7�Re�
c@sIddlmZmZmZddlmZGdd�dej�ZdS(i(uabsolute_importudivisionuunicode_literalsi(u_basecBs,|EeZdZdd�Zdd�ZdS(uFiltercCs tjj||�||_dS(N(u_baseuFilteru__init__uencoding(uselfusourceuencoding((uI/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/inject_meta_charset.pyu__init__suFilter.__init__c
cs�d}|jdk}g}xvtjj|�D]b}|d}|dkrl|dj�dkrod}qon|dkr�|dj�dkr^d}xE|d	j�D]~\\}}}	|dk	r�q�q�|j�d
kr�|j|d	||f<d}Pq�|dkr�|	j�dkr�d}q�q�W|r�d|d	kr�d|j|d	d<d}q�qo|dj�dkro|roidd6dd6|d	d	6Vidd6dd6i|jd6d	6Vidd6dd6Vd}q.qon�|dkro|dj�dkro|ro|j	d�V|sBidd6dd6i|jd6d	6Vnx|r\|j	d�VqEWd}d}qon|dkr�|j
|�q.|Vq.WdS(Nupre_headutypeuStartTagunameuheaduin_headuEmptyTagumetaudataucharsetu
http-equivucontent-typeucontentutext/html; charset=%suEndTagiu	post_headFT(Nucontent(Nucontent(Nucharset(Nucharset(uencodinguNoneu_baseuFilteru__iter__uloweruFalseuitemsuTrueupopuappend(
uselfustateu
meta_foundupendingutokenutypeuhas_http_equiv_content_typeu	namespaceunameuvalue((uI/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/inject_meta_charset.pyu__iter__sX
#

		uFilter.__iter__N(u__name__u
__module__u__qualname__u__init__u__iter__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/inject_meta_charset.pyuFiltersuFilterN(u
__future__uabsolute_importudivisionuunicode_literalsuu_baseuFilter(((uI/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/inject_meta_charset.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/filters/__pycache__/whitespace.cpython-33.pyc000064400000003613151733566750025461 0ustar00�
7�Revc@s�ddlmZmZmZddlZddlmZddlmZm	Z	dj
e	�Z	ejde	�ZGd	d
�d
ej
�Z
dd�ZdS(
i(uabsolute_importudivisionuunicode_literalsNi(u_basei(urcdataElementsuspaceCharactersuu[%s]+cBs<|EeZdZeddgee��Zdd�ZdS(uFilterupreutextareac
cs�d}x�tjj|�D]�}|d}|dkr[|sN|d|jkr[|d7}ns|dkrz|rz|d8}nT|r�|dkr�|dr�d	|d<n*|r�|d
kr�t|d�|d<n|VqWdS(NiutypeuStartTagunameiuEndTaguSpaceCharactersudatau u
Characters(u_baseuFilteru__iter__uspacePreserveElementsucollapse_spaces(uselfupreserveutokenutype((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/whitespace.pyu__iter__s



uFilter.__iter__N(u__name__u
__module__u__qualname__u	frozensetulisturcdataElementsuspacePreserveElementsu__iter__(u
__locals__((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/whitespace.pyuFiltersuFiltercCstjd|�S(Nu (uSPACES_REGEXusub(utext((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/whitespace.pyucollapse_spaces%sucollapse_spaces(u
__future__uabsolute_importudivisionuunicode_literalsureuu_baseu	constantsurcdataElementsuspaceCharactersujoinucompileuSPACES_REGEXuFilterucollapse_spaces(((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/whitespace.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/filters/__pycache__/sanitizer.cpython-33.pyc000064400000002062151733566750025332 0ustar00�
7�Re`c@s\ddlmZmZmZddlmZddlmZGdd�deje�ZdS(	i(uabsolute_importudivisionuunicode_literalsi(u_basei(uHTMLSanitizerMixincBs |EeZdZdd�ZdS(uFilterccs>x7tjj|�D]#}|j|�}|r|VqqWdS(N(u_baseuFilteru__iter__usanitize_token(uselfutoken((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/sanitizer.pyu__iter__suFilter.__iter__N(u__name__u
__module__u__qualname__u__iter__(u
__locals__((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/sanitizer.pyuFiltersuFilterN(	u
__future__uabsolute_importudivisionuunicode_literalsuu_baseu	sanitizeruHTMLSanitizerMixinuFilter(((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/filters/sanitizer.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py000064400000001160151733566750023557 0ustar00from __future__ import absolute_import, division, unicode_literals

from . import _base

try:
    from collections import OrderedDict
except ImportError:
    from ordereddict import OrderedDict


class Filter(_base.Filter):
    def __iter__(self):
        for token in _base.Filter.__iter__(self):
            if token["type"] in ("StartTag", "EmptyTag"):
                attrs = OrderedDict()
                for name, value in sorted(token["data"].items(),
                                          key=lambda x: x[0]):
                    attrs[name] = value
                token["data"] = attrs
            yield token
python3.3/site-packages/pip/_vendor/html5lib/filters/_base.py000064400000000436151733566750020115 0ustar00from __future__ import absolute_import, division, unicode_literals


class Filter(object):
    def __init__(self, source):
        self.source = source

    def __iter__(self):
        return iter(self.source)

    def __getattr__(self, name):
        return getattr(self.source, name)
python3.3/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py000064400000005272151733566750023042 0ustar00from __future__ import absolute_import, division, unicode_literals

from . import _base


class Filter(_base.Filter):
    def __init__(self, source, encoding):
        _base.Filter.__init__(self, source)
        self.encoding = encoding

    def __iter__(self):
        state = "pre_head"
        meta_found = (self.encoding is None)
        pending = []

        for token in _base.Filter.__iter__(self):
            type = token["type"]
            if type == "StartTag":
                if token["name"].lower() == "head":
                    state = "in_head"

            elif type == "EmptyTag":
                if token["name"].lower() == "meta":
                    # replace charset with actual encoding
                    has_http_equiv_content_type = False
                    for (namespace, name), value in token["data"].items():
                        if namespace is not None:
                            continue
                        elif name.lower() == 'charset':
                            token["data"][(namespace, name)] = self.encoding
                            meta_found = True
                            break
                        elif name == 'http-equiv' and value.lower() == 'content-type':
                            has_http_equiv_content_type = True
                    else:
                        if has_http_equiv_content_type and (None, "content") in token["data"]:
                            token["data"][(None, "content")] = 'text/html; charset=%s' % self.encoding
                            meta_found = True

                elif token["name"].lower() == "head" and not meta_found:
                    # insert meta into empty head
                    yield {"type": "StartTag", "name": "head",
                           "data": token["data"]}
                    yield {"type": "EmptyTag", "name": "meta",
                           "data": {(None, "charset"): self.encoding}}
                    yield {"type": "EndTag", "name": "head"}
                    meta_found = True
                    continue

            elif type == "EndTag":
                if token["name"].lower() == "head" and pending:
                    # insert meta into head (if necessary) and flush pending queue
                    yield pending.pop(0)
                    if not meta_found:
                        yield {"type": "EmptyTag", "name": "meta",
                               "data": {(None, "charset"): self.encoding}}
                    while pending:
                        yield pending.pop(0)
                    meta_found = True
                    state = "post_head"

            if state == "in_head":
                pending.append(token)
            else:
                yield token
python3.3/site-packages/pip/_vendor/html5lib/filters/__init__.py000064400000000000151733566750020566 0ustar00python3.3/site-packages/pip/_vendor/html5lib/filters/optionaltags.py000064400000024404151733566750021551 0ustar00from __future__ import absolute_import, division, unicode_literals

from . import _base


class Filter(_base.Filter):
    def slider(self):
        previous1 = previous2 = None
        for token in self.source:
            if previous1 is not None:
                yield previous2, previous1, token
            previous2 = previous1
            previous1 = token
        yield previous2, previous1, None

    def __iter__(self):
        for previous, token, next in self.slider():
            type = token["type"]
            if type == "StartTag":
                if (token["data"] or
                        not self.is_optional_start(token["name"], previous, next)):
                    yield token
            elif type == "EndTag":
                if not self.is_optional_end(token["name"], next):
                    yield token
            else:
                yield token

    def is_optional_start(self, tagname, previous, next):
        type = next and next["type"] or None
        if tagname in 'html':
            # An html element's start tag may be omitted if the first thing
            # inside the html element is not a space character or a comment.
            return type not in ("Comment", "SpaceCharacters")
        elif tagname == 'head':
            # A head element's start tag may be omitted if the first thing
            # inside the head element is an element.
            # XXX: we also omit the start tag if the head element is empty
            if type in ("StartTag", "EmptyTag"):
                return True
            elif type == "EndTag":
                return next["name"] == "head"
        elif tagname == 'body':
            # A body element's start tag may be omitted if the first thing
            # inside the body element is not a space character or a comment,
            # except if the first thing inside the body element is a script
            # or style element and the node immediately preceding the body
            # element is a head element whose end tag has been omitted.
            if type in ("Comment", "SpaceCharacters"):
                return False
            elif type == "StartTag":
                # XXX: we do not look at the preceding event, so we never omit
                # the body element's start tag if it's followed by a script or
                # a style element.
                return next["name"] not in ('script', 'style')
            else:
                return True
        elif tagname == 'colgroup':
            # A colgroup element's start tag may be omitted if the first thing
            # inside the colgroup element is a col element, and if the element
            # is not immediately preceeded by another colgroup element whose
            # end tag has been omitted.
            if type in ("StartTag", "EmptyTag"):
                # XXX: we do not look at the preceding event, so instead we never
                # omit the colgroup element's end tag when it is immediately
                # followed by another colgroup element. See is_optional_end.
                return next["name"] == "col"
            else:
                return False
        elif tagname == 'tbody':
            # A tbody element's start tag may be omitted if the first thing
            # inside the tbody element is a tr element, and if the element is
            # not immediately preceeded by a tbody, thead, or tfoot element
            # whose end tag has been omitted.
            if type == "StartTag":
                # omit the thead and tfoot elements' end tag when they are
                # immediately followed by a tbody element. See is_optional_end.
                if previous and previous['type'] == 'EndTag' and \
                        previous['name'] in ('tbody', 'thead', 'tfoot'):
                    return False
                return next["name"] == 'tr'
            else:
                return False
        return False

    def is_optional_end(self, tagname, next):
        type = next and next["type"] or None
        if tagname in ('html', 'head', 'body'):
            # An html element's end tag may be omitted if the html element
            # is not immediately followed by a space character or a comment.
            return type not in ("Comment", "SpaceCharacters")
        elif tagname in ('li', 'optgroup', 'tr'):
            # A li element's end tag may be omitted if the li element is
            # immediately followed by another li element or if there is
            # no more content in the parent element.
            # An optgroup element's end tag may be omitted if the optgroup
            # element is immediately followed by another optgroup element,
            # or if there is no more content in the parent element.
            # A tr element's end tag may be omitted if the tr element is
            # immediately followed by another tr element, or if there is
            # no more content in the parent element.
            if type == "StartTag":
                return next["name"] == tagname
            else:
                return type == "EndTag" or type is None
        elif tagname in ('dt', 'dd'):
            # A dt element's end tag may be omitted if the dt element is
            # immediately followed by another dt element or a dd element.
            # A dd element's end tag may be omitted if the dd element is
            # immediately followed by another dd element or a dt element,
            # or if there is no more content in the parent element.
            if type == "StartTag":
                return next["name"] in ('dt', 'dd')
            elif tagname == 'dd':
                return type == "EndTag" or type is None
            else:
                return False
        elif tagname == 'p':
            # A p element's end tag may be omitted if the p element is
            # immediately followed by an address, article, aside,
            # blockquote, datagrid, dialog, dir, div, dl, fieldset,
            # footer, form, h1, h2, h3, h4, h5, h6, header, hr, menu,
            # nav, ol, p, pre, section, table, or ul, element, or if
            # there is no more content in the parent element.
            if type in ("StartTag", "EmptyTag"):
                return next["name"] in ('address', 'article', 'aside',
                                        'blockquote', 'datagrid', 'dialog',
                                        'dir', 'div', 'dl', 'fieldset', 'footer',
                                        'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
                                        'header', 'hr', 'menu', 'nav', 'ol',
                                        'p', 'pre', 'section', 'table', 'ul')
            else:
                return type == "EndTag" or type is None
        elif tagname == 'option':
            # An option element's end tag may be omitted if the option
            # element is immediately followed by another option element,
            # or if it is immediately followed by an <code>optgroup</code>
            # element, or if there is no more content in the parent
            # element.
            if type == "StartTag":
                return next["name"] in ('option', 'optgroup')
            else:
                return type == "EndTag" or type is None
        elif tagname in ('rt', 'rp'):
            # An rt element's end tag may be omitted if the rt element is
            # immediately followed by an rt or rp element, or if there is
            # no more content in the parent element.
            # An rp element's end tag may be omitted if the rp element is
            # immediately followed by an rt or rp element, or if there is
            # no more content in the parent element.
            if type == "StartTag":
                return next["name"] in ('rt', 'rp')
            else:
                return type == "EndTag" or type is None
        elif tagname == 'colgroup':
            # A colgroup element's end tag may be omitted if the colgroup
            # element is not immediately followed by a space character or
            # a comment.
            if type in ("Comment", "SpaceCharacters"):
                return False
            elif type == "StartTag":
                # XXX: we also look for an immediately following colgroup
                # element. See is_optional_start.
                return next["name"] != 'colgroup'
            else:
                return True
        elif tagname in ('thead', 'tbody'):
            # A thead element's end tag may be omitted if the thead element
            # is immediately followed by a tbody or tfoot element.
            # A tbody element's end tag may be omitted if the tbody element
            # is immediately followed by a tbody or tfoot element, or if
            # there is no more content in the parent element.
            # A tfoot element's end tag may be omitted if the tfoot element
            # is immediately followed by a tbody element, or if there is no
            # more content in the parent element.
            # XXX: we never omit the end tag when the following element is
            # a tbody. See is_optional_start.
            if type == "StartTag":
                return next["name"] in ['tbody', 'tfoot']
            elif tagname == 'tbody':
                return type == "EndTag" or type is None
            else:
                return False
        elif tagname == 'tfoot':
            # A tfoot element's end tag may be omitted if the tfoot element
            # is immediately followed by a tbody element, or if there is no
            # more content in the parent element.
            # XXX: we never omit the end tag when the following element is
            # a tbody. See is_optional_start.
            if type == "StartTag":
                return next["name"] == 'tbody'
            else:
                return type == "EndTag" or type is None
        elif tagname in ('td', 'th'):
            # A td element's end tag may be omitted if the td element is
            # immediately followed by a td or th element, or if there is
            # no more content in the parent element.
            # A th element's end tag may be omitted if the th element is
            # immediately followed by a td or th element, or if there is
            # no more content in the parent element.
            if type == "StartTag":
                return next["name"] in ('td', 'th')
            else:
                return type == "EndTag" or type is None
        return False
python3.3/site-packages/pip/_vendor/html5lib/filters/whitespace.py000064400000002166151733566750021202 0ustar00from __future__ import absolute_import, division, unicode_literals

import re

from . import _base
from ..constants import rcdataElements, spaceCharacters
spaceCharacters = "".join(spaceCharacters)

SPACES_REGEX = re.compile("[%s]+" % spaceCharacters)


class Filter(_base.Filter):

    spacePreserveElements = frozenset(["pre", "textarea"] + list(rcdataElements))

    def __iter__(self):
        preserve = 0
        for token in _base.Filter.__iter__(self):
            type = token["type"]
            if type == "StartTag" \
                    and (preserve or token["name"] in self.spacePreserveElements):
                preserve += 1

            elif type == "EndTag" and preserve:
                preserve -= 1

            elif not preserve and type == "SpaceCharacters" and token["data"]:
                # Test on token["data"] above to not introduce spaces where there were not
                token["data"] = " "

            elif not preserve and type == "Characters":
                token["data"] = collapse_spaces(token["data"])

            yield token


def collapse_spaces(text):
    return SPACES_REGEX.sub(' ', text)
python3.3/site-packages/pip/_vendor/html5lib/filters/lint.py000064400000010322151733566750020005 0ustar00from __future__ import absolute_import, division, unicode_literals

from gettext import gettext
_ = gettext

from . import _base
from ..constants import cdataElements, rcdataElements, voidElements

from ..constants import spaceCharacters
spaceCharacters = "".join(spaceCharacters)


class LintError(Exception):
    pass


class Filter(_base.Filter):
    def __iter__(self):
        open_elements = []
        contentModelFlag = "PCDATA"
        for token in _base.Filter.__iter__(self):
            type = token["type"]
            if type in ("StartTag", "EmptyTag"):
                name = token["name"]
                if contentModelFlag != "PCDATA":
                    raise LintError(_("StartTag not in PCDATA content model flag: %(tag)s") % {"tag": name})
                if not isinstance(name, str):
                    raise LintError(_("Tag name is not a string: %(tag)r") % {"tag": name})
                if not name:
                    raise LintError(_("Empty tag name"))
                if type == "StartTag" and name in voidElements:
                    raise LintError(_("Void element reported as StartTag token: %(tag)s") % {"tag": name})
                elif type == "EmptyTag" and name not in voidElements:
                    raise LintError(_("Non-void element reported as EmptyTag token: %(tag)s") % {"tag": token["name"]})
                if type == "StartTag":
                    open_elements.append(name)
                for name, value in token["data"]:
                    if not isinstance(name, str):
                        raise LintError(_("Attribute name is not a string: %(name)r") % {"name": name})
                    if not name:
                        raise LintError(_("Empty attribute name"))
                    if not isinstance(value, str):
                        raise LintError(_("Attribute value is not a string: %(value)r") % {"value": value})
                if name in cdataElements:
                    contentModelFlag = "CDATA"
                elif name in rcdataElements:
                    contentModelFlag = "RCDATA"
                elif name == "plaintext":
                    contentModelFlag = "PLAINTEXT"

            elif type == "EndTag":
                name = token["name"]
                if not isinstance(name, str):
                    raise LintError(_("Tag name is not a string: %(tag)r") % {"tag": name})
                if not name:
                    raise LintError(_("Empty tag name"))
                if name in voidElements:
                    raise LintError(_("Void element reported as EndTag token: %(tag)s") % {"tag": name})
                start_name = open_elements.pop()
                if start_name != name:
                    raise LintError(_("EndTag (%(end)s) does not match StartTag (%(start)s)") % {"end": name, "start": start_name})
                contentModelFlag = "PCDATA"

            elif type == "Comment":
                if contentModelFlag != "PCDATA":
                    raise LintError(_("Comment not in PCDATA content model flag"))

            elif type in ("Characters", "SpaceCharacters"):
                data = token["data"]
                if not isinstance(data, str):
                    raise LintError(_("Attribute name is not a string: %(name)r") % {"name": data})
                if not data:
                    raise LintError(_("%(type)s token with empty data") % {"type": type})
                if type == "SpaceCharacters":
                    data = data.strip(spaceCharacters)
                    if data:
                        raise LintError(_("Non-space character(s) found in SpaceCharacters token: %(token)r") % {"token": data})

            elif type == "Doctype":
                name = token["name"]
                if contentModelFlag != "PCDATA":
                    raise LintError(_("Doctype not in PCDATA content model flag: %(name)s") % {"name": name})
                if not isinstance(name, str):
                    raise LintError(_("Tag name is not a string: %(tag)r") % {"tag": name})
                # XXX: what to do with token["data"] ?

            elif type in ("ParseError", "SerializeError"):
                pass

            else:
                raise LintError(_("Unknown token type: %(type)s") % {"type": type})

            yield token
python3.3/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py000064400000014107151733566750021725 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

from lxml import etree
from ..treebuilders.etree import tag_regexp

from gettext import gettext
_ = gettext

from . import _base

from .. import ihatexml


def ensure_str(s):
    if s is None:
        return None
    elif isinstance(s, text_type):
        return s
    else:
        return s.decode("utf-8", "strict")


class Root(object):
    def __init__(self, et):
        self.elementtree = et
        self.children = []
        if et.docinfo.internalDTD:
            self.children.append(Doctype(self,
                                         ensure_str(et.docinfo.root_name),
                                         ensure_str(et.docinfo.public_id),
                                         ensure_str(et.docinfo.system_url)))
        root = et.getroot()
        node = root

        while node.getprevious() is not None:
            node = node.getprevious()
        while node is not None:
            self.children.append(node)
            node = node.getnext()

        self.text = None
        self.tail = None

    def __getitem__(self, key):
        return self.children[key]

    def getnext(self):
        return None

    def __len__(self):
        return 1


class Doctype(object):
    def __init__(self, root_node, name, public_id, system_id):
        self.root_node = root_node
        self.name = name
        self.public_id = public_id
        self.system_id = system_id

        self.text = None
        self.tail = None

    def getnext(self):
        return self.root_node.children[1]


class FragmentRoot(Root):
    def __init__(self, children):
        self.children = [FragmentWrapper(self, child) for child in children]
        self.text = self.tail = None

    def getnext(self):
        return None


class FragmentWrapper(object):
    def __init__(self, fragment_root, obj):
        self.root_node = fragment_root
        self.obj = obj
        if hasattr(self.obj, 'text'):
            self.text = ensure_str(self.obj.text)
        else:
            self.text = None
        if hasattr(self.obj, 'tail'):
            self.tail = ensure_str(self.obj.tail)
        else:
            self.tail = None
        self.isstring = isinstance(obj, str) or isinstance(obj, bytes)
        # Support for bytes here is Py2
        if self.isstring:
            self.obj = ensure_str(self.obj)

    def __getattr__(self, name):
        return getattr(self.obj, name)

    def getnext(self):
        siblings = self.root_node.children
        idx = siblings.index(self)
        if idx < len(siblings) - 1:
            return siblings[idx + 1]
        else:
            return None

    def __getitem__(self, key):
        return self.obj[key]

    def __bool__(self):
        return bool(self.obj)

    def getparent(self):
        return None

    def __str__(self):
        return str(self.obj)

    def __unicode__(self):
        return str(self.obj)

    def __len__(self):
        return len(self.obj)


class TreeWalker(_base.NonRecursiveTreeWalker):
    def __init__(self, tree):
        if hasattr(tree, "getroot"):
            tree = Root(tree)
        elif isinstance(tree, list):
            tree = FragmentRoot(tree)
        _base.NonRecursiveTreeWalker.__init__(self, tree)
        self.filter = ihatexml.InfosetFilter()

    def getNodeDetails(self, node):
        if isinstance(node, tuple):  # Text node
            node, key = node
            assert key in ("text", "tail"), _("Text nodes are text or tail, found %s") % key
            return _base.TEXT, ensure_str(getattr(node, key))

        elif isinstance(node, Root):
            return (_base.DOCUMENT,)

        elif isinstance(node, Doctype):
            return _base.DOCTYPE, node.name, node.public_id, node.system_id

        elif isinstance(node, FragmentWrapper) and node.isstring:
            return _base.TEXT, node.obj

        elif node.tag == etree.Comment:
            return _base.COMMENT, ensure_str(node.text)

        elif node.tag == etree.Entity:
            return _base.ENTITY, ensure_str(node.text)[1:-1]  # strip &;

        else:
            # This is assumed to be an ordinary element
            match = tag_regexp.match(ensure_str(node.tag))
            if match:
                namespace, tag = match.groups()
            else:
                namespace = None
                tag = ensure_str(node.tag)
            attrs = {}
            for name, value in list(node.attrib.items()):
                name = ensure_str(name)
                value = ensure_str(value)
                match = tag_regexp.match(name)
                if match:
                    attrs[(match.group(1), match.group(2))] = value
                else:
                    attrs[(None, name)] = value
            return (_base.ELEMENT, namespace, self.filter.fromXmlName(tag),
                    attrs, len(node) > 0 or node.text)

    def getFirstChild(self, node):
        assert not isinstance(node, tuple), _("Text nodes have no children")

        assert len(node) or node.text, "Node has no children"
        if node.text:
            return (node, "text")
        else:
            return node[0]

    def getNextSibling(self, node):
        if isinstance(node, tuple):  # Text node
            node, key = node
            assert key in ("text", "tail"), _("Text nodes are text or tail, found %s") % key
            if key == "text":
                # XXX: we cannot use a "bool(node) and node[0] or None" construct here
                # because node[0] might evaluate to False if it has no child element
                if len(node):
                    return node[0]
                else:
                    return None
            else:  # tail
                return node.getnext()

        return (node, "tail") if node.tail else node.getnext()

    def getParentNode(self, node):
        if isinstance(node, tuple):  # Text node
            node, key = node
            assert key in ("text", "tail"), _("Text nodes are text or tail, found %s") % key
            if key == "text":
                return node
            # else: fallback to "normal" processing

        return node.getparent()
python3.3/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py000064400000004346151733566750022421 0ustar00from __future__ import absolute_import, division, unicode_literals

from genshi.core import QName
from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT
from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT

from . import _base

from ..constants import voidElements, namespaces


class TreeWalker(_base.TreeWalker):
    def __iter__(self):
        # Buffer the events so we can pass in the following one
        previous = None
        for event in self.tree:
            if previous is not None:
                for token in self.tokens(previous, event):
                    yield token
            previous = event

        # Don't forget the final event!
        if previous is not None:
            for token in self.tokens(previous, None):
                yield token

    def tokens(self, event, next):
        kind, data, pos = event
        if kind == START:
            tag, attribs = data
            name = tag.localname
            namespace = tag.namespace
            converted_attribs = {}
            for k, v in attribs:
                if isinstance(k, QName):
                    converted_attribs[(k.namespace, k.localname)] = v
                else:
                    converted_attribs[(None, k)] = v

            if namespace == namespaces["html"] and name in voidElements:
                for token in self.emptyTag(namespace, name, converted_attribs,
                                           not next or next[0] != END
                                           or next[1] != tag):
                    yield token
            else:
                yield self.startTag(namespace, name, converted_attribs)

        elif kind == END:
            name = data.localname
            namespace = data.namespace
            if name not in voidElements:
                yield self.endTag(namespace, name)

        elif kind == COMMENT:
            yield self.comment(data)

        elif kind == TEXT:
            for token in self.text(data):
                yield token

        elif kind == DOCTYPE:
            yield self.doctype(*data)

        elif kind in (XML_NAMESPACE, DOCTYPE, START_NS, END_NS,
                      START_CDATA, END_CDATA, PI):
            pass

        else:
            yield self.unknown(kind)
python3.3/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/genshistream.cpython-33.pyc000064400000005444151733566750026702 0ustar00�
7�Re�c@s�ddlmZmZmZddlmZddlmZmZmZm	Z	m
Z
ddlmZmZm
Z
mZmZmZddlmZddlmZmZGd	d
�d
ej�ZdS(i(uabsolute_importudivisionuunicode_literals(uQName(uSTARTuENDu
XML_NAMESPACEuDOCTYPEuTEXT(uSTART_NSuEND_NSuSTART_CDATAu	END_CDATAuPIuCOMMENTi(u_basei(uvoidElementsu
namespacescBs,|EeZdZdd�Zdd�ZdS(u
TreeWalkerccs�d}xH|jD]=}|dk	rGx"|j||�D]}|Vq5Wn|}qW|dk	r�x"|j|d�D]}|VqpWndS(N(uNoneutreeutokens(uselfupreviousueventutoken((uF/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/genshistream.pyu__iter__
s
uTreeWalker.__iter__c	cs�|\}}}|tkr
|\}}|j}|j}	i}
xL|D]D\}}t|t�rz||
|j|jf<qF||
d|f<qFW|	tdkr�|tkr�x]|j|	||
|p�|dt	kp�|d|k�D]}
|
Vq�Wq�|j
|	||
�Vn�|t	krN|j}|j}	|tkr�|j|	|�Vq�n�|tkrk|j
|�Vn}|tkr�xn|j|�D]}
|
Vq�WnO|tkr�|j|�Vn2|tttttttfkr�n|j|�VdS(Nuhtmlii(uSTARTu	localnameu	namespaceu
isinstanceuQNameuNoneu
namespacesuvoidElementsuemptyTaguENDustartTaguendTaguCOMMENTucommentuTEXTutextuDOCTYPEudoctypeu
XML_NAMESPACEuSTART_NSuEND_NSuSTART_CDATAu	END_CDATAuPIuunknown(uselfueventunextukindudatauposutaguattribsunameu	namespaceuconverted_attribsukuvutoken((uF/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/genshistream.pyutokenss@				uTreeWalker.tokensN(u__name__u
__module__u__qualname__u__iter__utokens(u
__locals__((uF/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/genshistream.pyu
TreeWalkersu
TreeWalkerN(u
__future__uabsolute_importudivisionuunicode_literalsugenshi.coreuQNameuSTARTuENDu
XML_NAMESPACEuDOCTYPEuTEXTuSTART_NSuEND_NSuSTART_CDATAu	END_CDATAuPIuCOMMENTuu_baseu	constantsuvoidElementsu
namespacesu
TreeWalker(((uF/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/genshistream.pyu<module>s(.python3.3/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/lxmletree.cpython-33.pyc000064400000026357151733566750026220 0ustar00�
7�ReGc@sddlmZmZmZddlmZddlmZddlm	Z	ddl
m
Z
e
Zddlm
Z
dd	lmZd
d�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de
j�ZdS(i(uabsolute_importudivisionuunicode_literals(u	text_type(uetreei(u
tag_regexp(ugettexti(u_base(uihatexmlcCs7|dkrdSt|t�r#|S|jdd�SdS(Nuutf-8ustrict(uNoneu
isinstanceu	text_typeudecode(us((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu
ensure_strs
u
ensure_strcBsD|EeZdZdd�Zdd�Zdd�Zdd�Zd	S(
uRootcCs�||_g|_|jjrd|jjt|t|jj�t|jj�t|jj	���n|j
�}|}x"|j�dk	r�|j�}qyWx,|dk	r�|jj|�|j
�}q�Wd|_d|_dS(N(uelementtreeuchildrenudocinfouinternalDTDuappenduDoctypeu
ensure_stru	root_nameu	public_idu
system_urlugetrootugetpreviousuNoneugetnextutextutail(uselfueturootunode((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__init__s 			u
Root.__init__cCs|j|S(N(uchildren(uselfukey((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__getitem__-suRoot.__getitem__cCsdS(N(uNone(uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyugetnext0suRoot.getnextcCsdS(Ni((uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__len__3suRoot.__len__N(u__name__u
__module__u__qualname__u__init__u__getitem__ugetnextu__len__(u
__locals__((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyuRootsuRootcBs,|EeZdZdd�Zdd�ZdS(uDoctypecCs:||_||_||_||_d|_d|_dS(N(u	root_nodeunameu	public_idu	system_iduNoneutextutail(uselfu	root_nodeunameu	public_idu	system_id((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__init__8s					uDoctype.__init__cCs|jjdS(Ni(u	root_nodeuchildren(uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyugetnextAsuDoctype.getnextN(u__name__u
__module__u__qualname__u__init__ugetnext(u
__locals__((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyuDoctype7s	uDoctypecBs,|EeZdZdd�Zdd�ZdS(uFragmentRootcs0�fdd�|D��_d�_�_dS(Ncsg|]}t�|��qS((uFragmentWrapper(u.0uchild(uself(uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu
<listcomp>Gs	u)FragmentRoot.__init__.<locals>.<listcomp>(uchildrenuNoneutextutail(uselfuchildren((uselfuC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__init__FsuFragmentRoot.__init__cCsdS(N(uNone(uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyugetnextJsuFragmentRoot.getnextN(u__name__u
__module__u__qualname__u__init__ugetnext(u
__locals__((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyuFragmentRootEsuFragmentRootcBs�|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS(uFragmentWrappercCs�||_||_t|jd�r<t|jj�|_n	d|_t|jd�rot|jj�|_n	d|_t|t�p�t|t	�|_
|j
r�t|j�|_ndS(Nutextutail(u	root_nodeuobjuhasattru
ensure_strutextuNoneutailu
isinstanceustrubytesuisstring(uselfu
fragment_rootuobj((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__init__Os				!	uFragmentWrapper.__init__cCst|j|�S(N(ugetattruobj(uselfuname((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__getattr___suFragmentWrapper.__getattr__cCsE|jj}|j|�}|t|�dkr=||dSdSdS(Ni(u	root_nodeuchildrenuindexulenuNone(uselfusiblingsuidx((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyugetnextbs
uFragmentWrapper.getnextcCs|j|S(N(uobj(uselfukey((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__getitem__jsuFragmentWrapper.__getitem__cCs
t|j�S(N(ubooluobj(uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__bool__msuFragmentWrapper.__bool__cCsdS(N(uNone(uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu	getparentpsuFragmentWrapper.getparentcCs
t|j�S(N(ustruobj(uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__str__ssuFragmentWrapper.__str__cCs
t|j�S(N(ustruobj(uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__unicode__vsuFragmentWrapper.__unicode__cCs
t|j�S(N(ulenuobj(uself((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__len__ysuFragmentWrapper.__len__N(u__name__u
__module__u__qualname__u__init__u__getattr__ugetnextu__getitem__u__bool__u	getparentu__str__u__unicode__u__len__(u
__locals__((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyuFragmentWrapperNsuFragmentWrappercBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(u
TreeWalkercCsbt|d�rt|�}nt|t�r<t|�}ntjj||�tj	�|_
dS(Nugetroot(uhasattruRootu
isinstanceulistuFragmentRootu_baseuNonRecursiveTreeWalkeru__init__uihatexmlu
InfosetFilterufilter(uselfutree((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu__init__~suTreeWalker.__init__c	Cs0t|t�rY|\}}|dks=ttd�|��tjtt||��fSt|t�rrtj	fSt|t
�r�tj|j|j
|jfSt|t�r�|jr�tj|jfS|jtjkr�tjt|j�fS|jtjkrtjt|j�dd�fStjt|j��}|rR|j�\}}nd}t|j�}i}x�t|jj��D]n\}}t|�}t|�}tj|�}|r�|||j d�|j d�f<q�||d|f<q�Wtj!||j"j#|�|t$|�dkp(|jfSdS(	Nutextutailu%Text nodes are text or tail, found %siii(utextutaili����(%u
isinstanceutupleuAssertionErroru_u_baseuTEXTu
ensure_strugetattruRootuDOCUMENTuDoctypeuDOCTYPEunameu	public_idu	system_iduFragmentWrapperuisstringuobjutaguetreeuCommentuCOMMENTutextuEntityuENTITYu
tag_regexpumatchugroupsuNoneulistuattribuitemsugroupuELEMENTufilterufromXmlNameulen(	uselfunodeukeyumatchu	namespaceutaguattrsunameuvalue((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyugetNodeDetails�s:"
 "%uTreeWalker.getNodeDetailscCsbt|t�s"ttd���t|�sC|jsCtd��|jrV|dfS|dSdS(NuText nodes have no childrenuNode has no childrenutexti(u
isinstanceutupleuAssertionErroru_ulenutext(uselfunode((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu
getFirstChild�s
"!	
uTreeWalker.getFirstChildcCs�t|t�rq|\}}|dks=ttd�|��|dkrdt|�r]|dSdSqq|j�Sn|jr�|dfS|j�S(Nutextutailu%Text nodes are text or tail, found %si(utextutail(u
isinstanceutupleuAssertionErroru_ulenuNoneugetnextutail(uselfunodeukey((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyugetNextSibling�s"
uTreeWalker.getNextSiblingcCsZt|t�rP|\}}|dks=ttd�|��|dkrP|Sn|j�S(Nutextutailu%Text nodes are text or tail, found %s(utextutail(u
isinstanceutupleuAssertionErroru_u	getparent(uselfunodeukey((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu
getParentNode�s"uTreeWalker.getParentNodeN(u__name__u
__module__u__qualname__u__init__ugetNodeDetailsu
getFirstChildugetNextSiblingu
getParentNode(u
__locals__((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu
TreeWalker}s
)	u
TreeWalkerN(u
__future__uabsolute_importudivisionuunicode_literalsupip._vendor.sixu	text_typeulxmluetreeutreebuilders.etreeu
tag_regexpugettextu_uu_baseuihatexmlu
ensure_struobjectuRootuDoctypeuFragmentRootuFragmentWrapperuNonRecursiveTreeWalkeru
TreeWalker(((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/lxmletree.pyu<module>s		/python3.3/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/__init__.cpython-33.pyc000064400000005113151733566750025741 0ustar00�
7�Re	c@sWdZddlmZmZmZddlZddlmZiZddd�Z
dS(u�A collection of modules for iterating through different kinds of
tree, generating tokens identical to those produced by the tokenizer
module.

To create a tree walker for a new type of tree, you need to do
implement a tree walker object (called TreeWalker by convention) that
implements a 'serialize' method taking a tree as sole argument and
returning an iterator generating tokens.
i(uabsolute_importudivisionuunicode_literalsNi(u
default_etreecKs|j�}|tkr�|dkr[dt|f}t|�tj|}|jt|<q�|dkr�ddlm}|jt|<q�|dkr�ddlm	}|jt|<q�|d	kr�dd
lm
}|dkr�t}n|j
||�jSntj|�S(
u6Get a TreeWalker class for various types of tree with built-in support

    treeType - the name of the tree type required (case-insensitive). Supported
               values are:

                "dom" - The xml.dom.minidom DOM implementation
                "pulldom" - The xml.dom.pulldom event stream
                "etree" - A generic walker for tree implementations exposing an
                          elementtree-like interface (known to work with
                          ElementTree, cElementTree and lxml.etree).
                "lxml" - Optimized walker for lxml.etree
                "genshi" - a Genshi stream

    implementation - (Currently applies to the "etree" tree type only). A module
                      implementing the tree type e.g. xml.etree.ElementTree or
                      cElementTree.udomupulldomu%s.%sugenshii(ugenshistreamulxml(u	lxmletreeuetree(uetree(udomupulldomN(ulowerutreeWalkerCacheu__name__u
__import__usysumodulesu
TreeWalkeruugenshistreamu	lxmletreeuetreeuNoneu
default_etreeugetETreeModuleuget(utreeTypeuimplementationukwargsunameumodugenshistreamu	lxmletreeuetree((uB/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/__init__.pyu
getTreeWalkers&

	u
getTreeWalker(u__doc__u
__future__uabsolute_importudivisionuunicode_literalsusysuutilsu
default_etreeutreeWalkerCacheuNoneu
getTreeWalker(((uB/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/__init__.pyu<module>	s
python3.3/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/pulldom.cpython-33.pyc000064400000005214151733566750025660 0ustar00�
7�Re�c@s�ddlmZmZmZddlmZmZmZmZm	Z	ddl
mZddlm
Z
Gdd�dej�Zd	S(
i(uabsolute_importudivisionuunicode_literals(u
START_ELEMENTuEND_ELEMENTuCOMMENTuIGNORABLE_WHITESPACEu
CHARACTERSi(u_basei(uvoidElementscBs,|EeZdZdd�Zdd�ZdS(u
TreeWalkerccs	d}d}x�|jD]�}|dk	r�|dksD|d|kr�|d|kr]d}nx?|j||�D](}|V|ddkrp|d}qpqpWn|}qW|dks�|d|kr�x=|j|d�D]}|Vq�Wn|dk	rtd��ndS(NiutypeuEmptyTagu<Illformed DOM event stream: void element without END_ELEMENT(uNoneutreeutokensu
ValueError(uselfuignore_untilupreviousueventutoken((uA/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/pulldom.pyu__iter__s"	
uTreeWalker.__iter__c
cs�|\}}|tkr�|j}|j}i}xEt|jj��D].}|j|�}|j||j|jf<qFW|t	kr�xM|j
||||p�|d|k	�D]}	|	Vq�Wq}|j|||�Vn�|tkr|j}|j}|t	kr}|j
||�Vq}ne|tkr8|j|j�VnE|ttfkrox0|j|j�D]}	|	Vq]Wn|j|�VdS(Ni(u
START_ELEMENTunodeNameunamespaceURIulistu
attributesukeysugetAttributeNodeuvalueu	localNameuvoidElementsuemptyTagustartTaguEND_ELEMENTuendTaguCOMMENTucommentu	nodeValueuIGNORABLE_WHITESPACEu
CHARACTERSutextuunknown(
uselfueventunextutypeunodeunameu	namespaceuattrsuattrutoken((uA/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/pulldom.pyutokenss4				uTreeWalker.tokensN(u__name__u
__module__u__qualname__u__iter__utokens(u
__locals__((uA/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/pulldom.pyu
TreeWalkersu
TreeWalkerN(u
__future__uabsolute_importudivisionuunicode_literalsuxml.dom.pulldomu
START_ELEMENTuEND_ELEMENTuCOMMENTuIGNORABLE_WHITESPACEu
CHARACTERSuu_baseu	constantsuvoidElementsu
TreeWalker(((uA/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/pulldom.pyu<module>s(python3.3/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/etree.cpython-33.pyc000064400000012242151733566750025307 0ustar00�
7�Rec@s�ddlmZmZmZyddlmZWnAek
rsyddlmZWnek
rneZYnXYnXddl	Z	e	j	Z
ddlZddlm
Z
ddlmZddlmZejd	�Zd
d�Zee�ZdS(i(uabsolute_importudivisionuunicode_literals(uOrderedDictN(u	text_typei(u_basei(umoduleFactoryFactoryu
{([^}]*)}(.*)cs>|}|jd�j�G�fdd�dtj�}t�S(NuasdcsP|EeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
S(u#getETreeBuilder.<locals>.TreeWalkeru�Given the particular ElementTree representation, this implementation,
        to avoid using recursion, returns "nodes" as tuples with the following
        content:

        1. The current element

        2. The index of the element relative to its parent

        3. A stack of ancestor elements

        4. A flag "text", "tail" or None to indicate if the current node is a
           text node; either the text or tail of the current element (1)
        cs�t|t�rL|\}}}}|dkrCtjt||�fS|}nt|d�sj|j�}n|jdkr�tjfS|jdkr�tj	|j
|jd�|jd�fS|j�kr�tj|j
fSt
|j�tkstt
|j���tj|j�}|r0|j�\}}nd}|j}t�}	xmt|jj��D]V\}
}tj|
�}|r�||	|jd	�|jd
�f<q^||	d|
f<q^Wtj|||	t|�p�|j
fSdS(
Nutextutailutagu
DOCUMENT_ROOTuDOCUMENT_FRAGMENTu
<!DOCTYPE>upublicIdusystemIdii(utextutail(u
DOCUMENT_ROOTuDOCUMENT_FRAGMENT(u
isinstanceutupleu_baseuTEXTugetattruhasattrugetrootutaguDOCUMENTuDOCTYPEutextugetuCOMMENTutypeu	text_typeuAssertionErroru
tag_regexpumatchugroupsuNoneuOrderedDictulistuattribuitemsugroupuELEMENTulen(uselfunodeueltukeyuparentsuflagumatchu	namespaceutaguattrsunameuvalue(uElementTreeCommentType(u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/etree.pyugetNodeDetails)s8	
*		"%u2getETreeBuilder.<locals>.TreeWalker.getNodeDetailscSs�t|t�r$|\}}}}n|dgdf\}}}}|dkrRdS|jrk|||dfSt|�r�|j|�|dd|dfSdSdS(Nutextutaili(utextutail(u
isinstanceutupleuNoneutextulenuappend(uselfunodeuelementukeyuparentsuflag((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/etree.pyu
getFirstChildQs	
u1getETreeBuilder.<locals>.TreeWalker.getFirstChildcSs�t|t�r$|\}}}}ndS|dkrht|�ra|j|�|dd|dfSdSnc|jr�|dkr�|||dfS|t|d�dkr�|d|d|d|dfSdSdS(Nutextiutailii����i����(u
isinstanceutupleuNoneulenuappendutail(uselfunodeuelementukeyuparentsuflag((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/etree.pyugetNextSiblingbs
 u2getETreeBuilder.<locals>.TreeWalker.getNextSiblingcSs�t|t�r$|\}}}}ndS|dkrQ|s>|S|||dfSn9|j�}|sg|S|t|d�j|�|dfSdS(Nutextii����(u
isinstanceutupleuNoneupopulistuindex(uselfunodeuelementukeyuparentsuflaguparent((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/etree.pyu
getParentNodevsu1getETreeBuilder.<locals>.TreeWalker.getParentNodeN(u__name__u
__module__u__qualname__u__doc__ugetNodeDetailsu
getFirstChildugetNextSiblingu
getParentNode(u
__locals__(uElementTreeCommentType(u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/etree.pyu
TreeWalkers

(u
TreeWalker(uCommentutagu_baseuNonRecursiveTreeWalkerulocals(uElementTreeImplementationuElementTreeu
TreeWalker((uElementTreeCommentTypeu?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/etree.pyugetETreeBuildersmugetETreeBuilder(u
__future__uabsolute_importudivisionuunicode_literalsucollectionsuOrderedDictuImportErroruordereddictudictugettextu_ureupip._vendor.sixu	text_typeuu_baseuutilsumoduleFactoryFactoryucompileu
tag_regexpugetETreeBuilderugetETreeModule(((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/etree.pyu<module>s 

	spython3.3/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/_base.cpython-33.pyc000064400000024504151733566750025260 0ustar00�
7�Rec@sddlmZmZmZddlmZmZddlZejZddl	m
Z
e
jZe
j
Ze
jZe
jZe
jZe
jZdZddlmZmZdje�Zdd	d
�Zdd�ZGd
d�de�Z Gdd�de �Z!dS(i(uabsolute_importudivisionuunicode_literals(u	text_typeustring_typesN(uNodeu<#UNKNOWN#>i(uvoidElementsuspaceCharactersucCs>|dkr|rdSdSnt|t�r0|St|�SdS(u<Wrapper around six.text_type to convert None to empty stringuN(uNoneu
isinstanceu	text_type(usu
blank_if_none((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyuto_textsuto_textcCs|dkpt|t�S(u2Wrapper around isinstance(string_types) or is NoneN(uNoneu
isinstanceustring_types(ustring((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyuis_text_or_none"suis_text_or_nonecBs�|EeZdZdd�Zdd�Zdd�Zddd�Zd	d
�Zdd�Z	d
d�Z
dd�Zddddd�Zdd�Zdd�ZdS(u
TreeWalkercCs
||_dS(N(utree(uselfutree((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu__init__(suTreeWalker.__init__cCs
t�dS(N(uNotImplementedError(uself((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu__iter__+suTreeWalker.__iter__cCsidd6|d6S(NuSerializeErrorutypeudata((uselfumsg((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyuerror.suTreeWalker.errorccs�|dks-t|t�s-tt|���t|t�sNtt|���tdd�|j�D��sst�idd6t|d	�d6t|�d6|d6V|r�|j	t
d��VndS(
NcssT|]J\\}}}|dks0t|t�oKt|t�oKt|t�VqdS(N(uNoneu
isinstanceustring_types(u.0u	namespaceunameuvalue((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu	<genexpr>4su&TreeWalker.emptyTag.<locals>.<genexpr>uEmptyTagutypeunameu	namespaceudatauVoid element has childrenF(uNoneu
isinstanceustring_typesuAssertionErrorutypeualluitemsuto_textuFalseuerroru_(uselfu	namespaceunameuattrsuhasChildren((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyuemptyTag1s-!
	uTreeWalker.emptyTagcCs�|dks-t|t�s-tt|���t|t�sNtt|���tdd�|j�D��sst�idd6t|�d6t|�d6t	dd�|j�D��d6S(	NcssT|]J\\}}}|dks0t|t�oKt|t�oKt|t�VqdS(N(uNoneu
isinstanceustring_types(u.0u	namespaceunameuvalue((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu	<genexpr>Bsu&TreeWalker.startTag.<locals>.<genexpr>uStartTagutypeunameu	namespacecssE|];\\}}}t|d�t|�ft|d�fVqdS(NF(uto_textuFalse(u.0u	namespaceunameuvalue((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu	<genexpr>Jsudata(
uNoneu
isinstanceustring_typesuAssertionErrorutypeualluitemsu	text_typeuto_textudict(uselfu	namespaceunameuattrs((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyustartTag?s-!


uTreeWalker.startTagcCs}|dks-t|t�s-tt|���t|t�sNtt|���idd6t|d�d6t|�d6id6S(NuEndTagutypeunameu	namespaceudataF(uNoneu
isinstanceustring_typesuAssertionErrorutypeuto_textuFalse(uselfu	namespaceuname((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyuendTagNs-!

uTreeWalker.endTagccs�t|t�s!tt|���t|�}|jt�}|dt|�t|��}|rxidd6|d6Vn|}|jt�}|t|�d�}|r�idd6|d6Vn|r�idd6|d6VndS(NuSpaceCharactersutypeudatau
Characters(	u
isinstanceustring_typesuAssertionErrorutypeuto_textulstripuspaceCharactersulenurstrip(uselfudataumiddleulefturight((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyutextWs! uTreeWalker.textcCs9t|t�s!tt|���idd6t|�d6S(NuCommentutypeudata(u
isinstanceustring_typesuAssertionErrorutypeu	text_type(uselfudata((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyucommentgs!uTreeWalker.commentcCs�t|�stt|���t|�s<tt|���t|�sZtt|���idd6t|�d6t|�d6t|�d6t|�d6S(NuDoctypeutypeunameupublicIdusystemIducorrect(uis_text_or_noneuAssertionErrorutypeuto_text(uselfunameupublicIdusystemIducorrect((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyudoctypels



uTreeWalker.doctypecCs9t|t�s!tt|���idd6t|�d6S(NuEntityutypeuname(u
isinstanceustring_typesuAssertionErrorutypeu	text_type(uselfuname((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyuentityws!uTreeWalker.entitycCs|jtd�|�S(NuUnknown node type: (uerroru_(uselfunodeType((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyuunknown|suTreeWalker.unknownNFT(u__name__u
__module__u__qualname__u__init__u__iter__uerroruFalseuemptyTagustartTaguendTagutextucommentuNoneuTrueudoctypeuentityuunknown(u
__locals__((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu
TreeWalker's	u
TreeWalkercBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uNonRecursiveTreeWalkercCs
t�dS(N(uNotImplementedError(uselfunode((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyugetNodeDetails�su%NonRecursiveTreeWalker.getNodeDetailscCs
t�dS(N(uNotImplementedError(uselfunode((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu
getFirstChild�su$NonRecursiveTreeWalker.getFirstChildcCs
t�dS(N(uNotImplementedError(uselfunode((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyugetNextSibling�su%NonRecursiveTreeWalker.getNextSiblingcCs
t�dS(N(uNotImplementedError(uselfunode((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu
getParentNode�su$NonRecursiveTreeWalker.getParentNodeccst|j}xd|dk	ro|j|�}|d|dd�}}d}|tkre|j|�Vn	|tkr�x�|j|�D]}|Vq�Wn�|tkr|\}}}}|t	kr�x%|j
||||�D]}|Vq�Wd}qn|j|||�Vni|tkr&|j
|d�VnH|tkrG|j|d�Vn'|tkr\d}n|j|d�V|r�|j|�}	nd}	|	dk	r�|	}qx�|dk	rk|j|�}|d|dd�}}|tkr|\}}}}|t	kr|j||�Vqn|j|kr4d}Pn|j|�}
|
dk	rY|
}Pq�|j|�}q�WqWdS(NiiFT(utreeuNoneugetNodeDetailsuFalseuDOCTYPEudoctypeuTEXTutextuELEMENTuvoidElementsuemptyTagustartTaguCOMMENTucommentuENTITYuentityuDOCUMENTuTrueuunknownu
getFirstChilduendTagugetNextSiblingu
getParentNode(uselfucurrentNodeudetailsutypeuhasChildrenutokenu	namespaceunameu
attributesu
firstChildunextSibling((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu__iter__�sZ	
				uNonRecursiveTreeWalker.__iter__N(u__name__u
__module__u__qualname__ugetNodeDetailsu
getFirstChildugetNextSiblingu
getParentNodeu__iter__(u
__locals__((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyuNonRecursiveTreeWalker�s
uNonRecursiveTreeWalkerT("u
__future__uabsolute_importudivisionuunicode_literalsupip._vendor.sixu	text_typeustring_typesugettextu_uxml.domuNodeu
DOCUMENT_NODEuDOCUMENTuDOCUMENT_TYPE_NODEuDOCTYPEu	TEXT_NODEuTEXTuELEMENT_NODEuELEMENTuCOMMENT_NODEuCOMMENTuENTITY_NODEuENTITYuUNKNOWNu	constantsuvoidElementsuspaceCharactersujoinuTrueuto_textuis_text_or_noneuobjectu
TreeWalkeruNonRecursiveTreeWalker(((u?/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/_base.pyu<module>s"							
Ypython3.3/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/dom.cpython-33.pyc000064400000005032151733566750024761 0ustar00�
7�Re�c@snddlmZmZmZddlmZddlZejZddlm	Z	Gdd�de	j
�ZdS(i(uabsolute_importudivisionuunicode_literals(uNodeNi(u_basecBsD|EeZdZdd�Zdd�Zdd�Zdd�Zd	S(
u
TreeWalkercCsX|jtjkr.tj|j|j|jfS|jtjtj	fkrYtj
|jfS|jtjkr�i}xgt
|jj��D]P}|j|�}|jr�|j||j|jf<q�|j|d|jf<q�Wtj|j|j||j�fS|jtjkrtj|jfS|jtjtjfkrDtjfStj|jfSdS(N(unodeTypeuNodeuDOCUMENT_TYPE_NODEu_baseuDOCTYPEunameupublicIdusystemIdu	TEXT_NODEuCDATA_SECTION_NODEuTEXTu	nodeValueuELEMENT_NODEulistu
attributesukeysugetAttributeNodeunamespaceURIuvalueu	localNameuNoneuELEMENTunodeNameu
hasChildNodesuCOMMENT_NODEuCOMMENTu
DOCUMENT_NODEuDOCUMENT_FRAGMENT_NODEuDOCUMENTuUNKNOWN(uselfunodeuattrsuattr((u=/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/dom.pyugetNodeDetailss$	
uTreeWalker.getNodeDetailscCs|jS(N(u
firstChild(uselfunode((u=/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/dom.pyu
getFirstChild'suTreeWalker.getFirstChildcCs|jS(N(unextSibling(uselfunode((u=/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/dom.pyugetNextSibling*suTreeWalker.getNextSiblingcCs|jS(N(u
parentNode(uselfunode((u=/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/dom.pyu
getParentNode-suTreeWalker.getParentNodeN(u__name__u
__module__u__qualname__ugetNodeDetailsu
getFirstChildugetNextSiblingu
getParentNode(u
__locals__((u=/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/dom.pyu
TreeWalkersu
TreeWalker(u
__future__uabsolute_importudivisionuunicode_literalsuxml.domuNodeugettextu_uu_baseuNonRecursiveTreeWalkeru
TreeWalker(((u=/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/dom.pyu<module>s
	python3.3/site-packages/pip/_vendor/html5lib/treewalkers/_base.py000064400000015407151733566750021001 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type, string_types

import gettext
_ = gettext.gettext

from xml.dom import Node

DOCUMENT = Node.DOCUMENT_NODE
DOCTYPE = Node.DOCUMENT_TYPE_NODE
TEXT = Node.TEXT_NODE
ELEMENT = Node.ELEMENT_NODE
COMMENT = Node.COMMENT_NODE
ENTITY = Node.ENTITY_NODE
UNKNOWN = "<#UNKNOWN#>"

from ..constants import voidElements, spaceCharacters
spaceCharacters = "".join(spaceCharacters)


def to_text(s, blank_if_none=True):
    """Wrapper around six.text_type to convert None to empty string"""
    if s is None:
        if blank_if_none:
            return ""
        else:
            return None
    elif isinstance(s, text_type):
        return s
    else:
        return text_type(s)


def is_text_or_none(string):
    """Wrapper around isinstance(string_types) or is None"""
    return string is None or isinstance(string, string_types)


class TreeWalker(object):
    def __init__(self, tree):
        self.tree = tree

    def __iter__(self):
        raise NotImplementedError

    def error(self, msg):
        return {"type": "SerializeError", "data": msg}

    def emptyTag(self, namespace, name, attrs, hasChildren=False):
        assert namespace is None or isinstance(namespace, string_types), type(namespace)
        assert isinstance(name, string_types), type(name)
        assert all((namespace is None or isinstance(namespace, string_types)) and
                   isinstance(name, string_types) and
                   isinstance(value, string_types)
                   for (namespace, name), value in attrs.items())

        yield {"type": "EmptyTag", "name": to_text(name, False),
               "namespace": to_text(namespace),
               "data": attrs}
        if hasChildren:
            yield self.error(_("Void element has children"))

    def startTag(self, namespace, name, attrs):
        assert namespace is None or isinstance(namespace, string_types), type(namespace)
        assert isinstance(name, string_types), type(name)
        assert all((namespace is None or isinstance(namespace, string_types)) and
                   isinstance(name, string_types) and
                   isinstance(value, string_types)
                   for (namespace, name), value in attrs.items())

        return {"type": "StartTag",
                "name": text_type(name),
                "namespace": to_text(namespace),
                "data": dict(((to_text(namespace, False), to_text(name)),
                              to_text(value, False))
                             for (namespace, name), value in attrs.items())}

    def endTag(self, namespace, name):
        assert namespace is None or isinstance(namespace, string_types), type(namespace)
        assert isinstance(name, string_types), type(namespace)

        return {"type": "EndTag",
                "name": to_text(name, False),
                "namespace": to_text(namespace),
                "data": {}}

    def text(self, data):
        assert isinstance(data, string_types), type(data)

        data = to_text(data)
        middle = data.lstrip(spaceCharacters)
        left = data[:len(data) - len(middle)]
        if left:
            yield {"type": "SpaceCharacters", "data": left}
        data = middle
        middle = data.rstrip(spaceCharacters)
        right = data[len(middle):]
        if middle:
            yield {"type": "Characters", "data": middle}
        if right:
            yield {"type": "SpaceCharacters", "data": right}

    def comment(self, data):
        assert isinstance(data, string_types), type(data)

        return {"type": "Comment", "data": text_type(data)}

    def doctype(self, name, publicId=None, systemId=None, correct=True):
        assert is_text_or_none(name), type(name)
        assert is_text_or_none(publicId), type(publicId)
        assert is_text_or_none(systemId), type(systemId)

        return {"type": "Doctype",
                "name": to_text(name),
                "publicId": to_text(publicId),
                "systemId": to_text(systemId),
                "correct": to_text(correct)}

    def entity(self, name):
        assert isinstance(name, string_types), type(name)

        return {"type": "Entity", "name": text_type(name)}

    def unknown(self, nodeType):
        return self.error(_("Unknown node type: ") + nodeType)


class NonRecursiveTreeWalker(TreeWalker):
    def getNodeDetails(self, node):
        raise NotImplementedError

    def getFirstChild(self, node):
        raise NotImplementedError

    def getNextSibling(self, node):
        raise NotImplementedError

    def getParentNode(self, node):
        raise NotImplementedError

    def __iter__(self):
        currentNode = self.tree
        while currentNode is not None:
            details = self.getNodeDetails(currentNode)
            type, details = details[0], details[1:]
            hasChildren = False

            if type == DOCTYPE:
                yield self.doctype(*details)

            elif type == TEXT:
                for token in self.text(*details):
                    yield token

            elif type == ELEMENT:
                namespace, name, attributes, hasChildren = details
                if name in voidElements:
                    for token in self.emptyTag(namespace, name, attributes,
                                               hasChildren):
                        yield token
                    hasChildren = False
                else:
                    yield self.startTag(namespace, name, attributes)

            elif type == COMMENT:
                yield self.comment(details[0])

            elif type == ENTITY:
                yield self.entity(details[0])

            elif type == DOCUMENT:
                hasChildren = True

            else:
                yield self.unknown(details[0])

            if hasChildren:
                firstChild = self.getFirstChild(currentNode)
            else:
                firstChild = None

            if firstChild is not None:
                currentNode = firstChild
            else:
                while currentNode is not None:
                    details = self.getNodeDetails(currentNode)
                    type, details = details[0], details[1:]
                    if type == ELEMENT:
                        namespace, name, attributes, hasChildren = details
                        if name not in voidElements:
                            yield self.endTag(namespace, name)
                    if self.tree is currentNode:
                        currentNode = None
                        break
                    nextSibling = self.getNextSibling(currentNode)
                    if nextSibling is not None:
                        currentNode = nextSibling
                        break
                    else:
                        currentNode = self.getParentNode(currentNode)
python3.3/site-packages/pip/_vendor/html5lib/treewalkers/dom.py000064400000002661151733566750020505 0ustar00from __future__ import absolute_import, division, unicode_literals

from xml.dom import Node

import gettext
_ = gettext.gettext

from . import _base


class TreeWalker(_base.NonRecursiveTreeWalker):
    def getNodeDetails(self, node):
        if node.nodeType == Node.DOCUMENT_TYPE_NODE:
            return _base.DOCTYPE, node.name, node.publicId, node.systemId

        elif node.nodeType in (Node.TEXT_NODE, Node.CDATA_SECTION_NODE):
            return _base.TEXT, node.nodeValue

        elif node.nodeType == Node.ELEMENT_NODE:
            attrs = {}
            for attr in list(node.attributes.keys()):
                attr = node.getAttributeNode(attr)
                if attr.namespaceURI:
                    attrs[(attr.namespaceURI, attr.localName)] = attr.value
                else:
                    attrs[(None, attr.name)] = attr.value
            return (_base.ELEMENT, node.namespaceURI, node.nodeName,
                    attrs, node.hasChildNodes())

        elif node.nodeType == Node.COMMENT_NODE:
            return _base.COMMENT, node.nodeValue

        elif node.nodeType in (Node.DOCUMENT_NODE, Node.DOCUMENT_FRAGMENT_NODE):
            return (_base.DOCUMENT,)

        else:
            return _base.UNKNOWN, node.nodeType

    def getFirstChild(self, node):
        return node.firstChild

    def getNextSibling(self, node):
        return node.nextSibling

    def getParentNode(self, node):
        return node.parentNode
python3.3/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py000064400000004376151733566750021407 0ustar00from __future__ import absolute_import, division, unicode_literals

from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \
    COMMENT, IGNORABLE_WHITESPACE, CHARACTERS

from . import _base

from ..constants import voidElements


class TreeWalker(_base.TreeWalker):
    def __iter__(self):
        ignore_until = None
        previous = None
        for event in self.tree:
            if previous is not None and \
                    (ignore_until is None or previous[1] is ignore_until):
                if previous[1] is ignore_until:
                    ignore_until = None
                for token in self.tokens(previous, event):
                    yield token
                    if token["type"] == "EmptyTag":
                        ignore_until = previous[1]
            previous = event
        if ignore_until is None or previous[1] is ignore_until:
            for token in self.tokens(previous, None):
                yield token
        elif ignore_until is not None:
            raise ValueError("Illformed DOM event stream: void element without END_ELEMENT")

    def tokens(self, event, next):
        type, node = event
        if type == START_ELEMENT:
            name = node.nodeName
            namespace = node.namespaceURI
            attrs = {}
            for attr in list(node.attributes.keys()):
                attr = node.getAttributeNode(attr)
                attrs[(attr.namespaceURI, attr.localName)] = attr.value
            if name in voidElements:
                for token in self.emptyTag(namespace,
                                           name,
                                           attrs,
                                           not next or next[1] is not node):
                    yield token
            else:
                yield self.startTag(namespace, name, attrs)

        elif type == END_ELEMENT:
            name = node.nodeName
            namespace = node.namespaceURI
            if name not in voidElements:
                yield self.endTag(namespace, name)

        elif type == COMMENT:
            yield self.comment(node.nodeValue)

        elif type in (IGNORABLE_WHITESPACE, CHARACTERS):
            for token in self.text(node.nodeValue):
                yield token

        else:
            yield self.unknown(type)
python3.3/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py000064400000004423151733566750021463 0ustar00"""A collection of modules for iterating through different kinds of
tree, generating tokens identical to those produced by the tokenizer
module.

To create a tree walker for a new type of tree, you need to do
implement a tree walker object (called TreeWalker by convention) that
implements a 'serialize' method taking a tree as sole argument and
returning an iterator generating tokens.
"""

from __future__ import absolute_import, division, unicode_literals

import sys

from ..utils import default_etree

treeWalkerCache = {}


def getTreeWalker(treeType, implementation=None, **kwargs):
    """Get a TreeWalker class for various types of tree with built-in support

    treeType - the name of the tree type required (case-insensitive). Supported
               values are:

                "dom" - The xml.dom.minidom DOM implementation
                "pulldom" - The xml.dom.pulldom event stream
                "etree" - A generic walker for tree implementations exposing an
                          elementtree-like interface (known to work with
                          ElementTree, cElementTree and lxml.etree).
                "lxml" - Optimized walker for lxml.etree
                "genshi" - a Genshi stream

    implementation - (Currently applies to the "etree" tree type only). A module
                      implementing the tree type e.g. xml.etree.ElementTree or
                      cElementTree."""

    treeType = treeType.lower()
    if treeType not in treeWalkerCache:
        if treeType in ("dom", "pulldom"):
            name = "%s.%s" % (__name__, treeType)
            __import__(name)
            mod = sys.modules[name]
            treeWalkerCache[treeType] = mod.TreeWalker
        elif treeType == "genshi":
            from . import genshistream
            treeWalkerCache[treeType] = genshistream.TreeWalker
        elif treeType == "lxml":
            from . import lxmletree
            treeWalkerCache[treeType] = lxmletree.TreeWalker
        elif treeType == "etree":
            from . import etree
            if implementation is None:
                implementation = default_etree
            # XXX: NEVER cache here, caching is done in the etree submodule
            return etree.getETreeModule(implementation, **kwargs).TreeWalker
    return treeWalkerCache.get(treeType)
python3.3/site-packages/pip/_vendor/html5lib/treewalkers/etree.py000064400000011021151733566750021020 0ustar00from __future__ import absolute_import, division, unicode_literals

try:
    from collections import OrderedDict
except ImportError:
    try:
        from ordereddict import OrderedDict
    except ImportError:
        OrderedDict = dict
import gettext
_ = gettext.gettext

import re

from pip._vendor.six import text_type

from . import _base
from ..utils import moduleFactoryFactory

tag_regexp = re.compile("{([^}]*)}(.*)")


def getETreeBuilder(ElementTreeImplementation):
    ElementTree = ElementTreeImplementation
    ElementTreeCommentType = ElementTree.Comment("asd").tag

    class TreeWalker(_base.NonRecursiveTreeWalker):
        """Given the particular ElementTree representation, this implementation,
        to avoid using recursion, returns "nodes" as tuples with the following
        content:

        1. The current element

        2. The index of the element relative to its parent

        3. A stack of ancestor elements

        4. A flag "text", "tail" or None to indicate if the current node is a
           text node; either the text or tail of the current element (1)
        """
        def getNodeDetails(self, node):
            if isinstance(node, tuple):  # It might be the root Element
                elt, key, parents, flag = node
                if flag in ("text", "tail"):
                    return _base.TEXT, getattr(elt, flag)
                else:
                    node = elt

            if not(hasattr(node, "tag")):
                node = node.getroot()

            if node.tag in ("DOCUMENT_ROOT", "DOCUMENT_FRAGMENT"):
                return (_base.DOCUMENT,)

            elif node.tag == "<!DOCTYPE>":
                return (_base.DOCTYPE, node.text,
                        node.get("publicId"), node.get("systemId"))

            elif node.tag == ElementTreeCommentType:
                return _base.COMMENT, node.text

            else:
                assert type(node.tag) == text_type, type(node.tag)
                # This is assumed to be an ordinary element
                match = tag_regexp.match(node.tag)
                if match:
                    namespace, tag = match.groups()
                else:
                    namespace = None
                    tag = node.tag
                attrs = OrderedDict()
                for name, value in list(node.attrib.items()):
                    match = tag_regexp.match(name)
                    if match:
                        attrs[(match.group(1), match.group(2))] = value
                    else:
                        attrs[(None, name)] = value
                return (_base.ELEMENT, namespace, tag,
                        attrs, len(node) or node.text)

        def getFirstChild(self, node):
            if isinstance(node, tuple):
                element, key, parents, flag = node
            else:
                element, key, parents, flag = node, None, [], None

            if flag in ("text", "tail"):
                return None
            else:
                if element.text:
                    return element, key, parents, "text"
                elif len(element):
                    parents.append(element)
                    return element[0], 0, parents, None
                else:
                    return None

        def getNextSibling(self, node):
            if isinstance(node, tuple):
                element, key, parents, flag = node
            else:
                return None

            if flag == "text":
                if len(element):
                    parents.append(element)
                    return element[0], 0, parents, None
                else:
                    return None
            else:
                if element.tail and flag != "tail":
                    return element, key, parents, "tail"
                elif key < len(parents[-1]) - 1:
                    return parents[-1][key + 1], key + 1, parents, None
                else:
                    return None

        def getParentNode(self, node):
            if isinstance(node, tuple):
                element, key, parents, flag = node
            else:
                return None

            if flag == "text":
                if not parents:
                    return element
                else:
                    return element, key, parents, None
            else:
                parent = parents.pop()
                if not parents:
                    return parent
                else:
                    return parent, list(parents[-1]).index(parent), parents, None

    return locals()

getETreeModule = moduleFactoryFactory(getETreeBuilder)
python3.3/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py000064400000033317151733566750022231 0ustar00"""Module for supporting the lxml.etree library. The idea here is to use as much
of the native library as possible, without using fragile hacks like custom element
names that break between releases. The downside of this is that we cannot represent
all possible trees; specifically the following are known to cause problems:

Text or comments as siblings of the root element
Docypes with no name

When any of these things occur, we emit a DataLossWarning
"""

from __future__ import absolute_import, division, unicode_literals

import warnings
import re
import sys

from . import _base
from ..constants import DataLossWarning
from .. import constants
from . import etree as etree_builders
from .. import ihatexml

import lxml.etree as etree


fullTree = True
tag_regexp = re.compile("{([^}]*)}(.*)")

comment_type = etree.Comment("asd").tag


class DocumentType(object):
    def __init__(self, name, publicId, systemId):
        self.name = name
        self.publicId = publicId
        self.systemId = systemId


class Document(object):
    def __init__(self):
        self._elementTree = None
        self._childNodes = []

    def appendChild(self, element):
        self._elementTree.getroot().addnext(element._element)

    def _getChildNodes(self):
        return self._childNodes

    childNodes = property(_getChildNodes)


def testSerializer(element):
    rv = []
    finalText = None
    infosetFilter = ihatexml.InfosetFilter()

    def serializeElement(element, indent=0):
        if not hasattr(element, "tag"):
            if hasattr(element, "getroot"):
                # Full tree case
                rv.append("#document")
                if element.docinfo.internalDTD:
                    if not (element.docinfo.public_id or
                            element.docinfo.system_url):
                        dtd_str = "<!DOCTYPE %s>" % element.docinfo.root_name
                    else:
                        dtd_str = """<!DOCTYPE %s "%s" "%s">""" % (
                            element.docinfo.root_name,
                            element.docinfo.public_id,
                            element.docinfo.system_url)
                    rv.append("|%s%s" % (' ' * (indent + 2), dtd_str))
                next_element = element.getroot()
                while next_element.getprevious() is not None:
                    next_element = next_element.getprevious()
                while next_element is not None:
                    serializeElement(next_element, indent + 2)
                    next_element = next_element.getnext()
            elif isinstance(element, str) or isinstance(element, bytes):
                # Text in a fragment
                assert isinstance(element, str) or sys.version_info.major == 2
                rv.append("|%s\"%s\"" % (' ' * indent, element))
            else:
                # Fragment case
                rv.append("#document-fragment")
                for next_element in element:
                    serializeElement(next_element, indent + 2)
        elif element.tag == comment_type:
            rv.append("|%s<!-- %s -->" % (' ' * indent, element.text))
            if hasattr(element, "tail") and element.tail:
                rv.append("|%s\"%s\"" % (' ' * indent, element.tail))
        else:
            assert isinstance(element, etree._Element)
            nsmatch = etree_builders.tag_regexp.match(element.tag)
            if nsmatch is not None:
                ns = nsmatch.group(1)
                tag = nsmatch.group(2)
                prefix = constants.prefixes[ns]
                rv.append("|%s<%s %s>" % (' ' * indent, prefix,
                                          infosetFilter.fromXmlName(tag)))
            else:
                rv.append("|%s<%s>" % (' ' * indent,
                                       infosetFilter.fromXmlName(element.tag)))

            if hasattr(element, "attrib"):
                attributes = []
                for name, value in element.attrib.items():
                    nsmatch = tag_regexp.match(name)
                    if nsmatch is not None:
                        ns, name = nsmatch.groups()
                        name = infosetFilter.fromXmlName(name)
                        prefix = constants.prefixes[ns]
                        attr_string = "%s %s" % (prefix, name)
                    else:
                        attr_string = infosetFilter.fromXmlName(name)
                    attributes.append((attr_string, value))

                for name, value in sorted(attributes):
                    rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))

            if element.text:
                rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
            indent += 2
            for child in element:
                serializeElement(child, indent)
            if hasattr(element, "tail") and element.tail:
                rv.append("|%s\"%s\"" % (' ' * (indent - 2), element.tail))
    serializeElement(element, 0)

    if finalText is not None:
        rv.append("|%s\"%s\"" % (' ' * 2, finalText))

    return "\n".join(rv)


def tostring(element):
    """Serialize an element and its child nodes to a string"""
    rv = []
    finalText = None

    def serializeElement(element):
        if not hasattr(element, "tag"):
            if element.docinfo.internalDTD:
                if element.docinfo.doctype:
                    dtd_str = element.docinfo.doctype
                else:
                    dtd_str = "<!DOCTYPE %s>" % element.docinfo.root_name
                rv.append(dtd_str)
            serializeElement(element.getroot())

        elif element.tag == comment_type:
            rv.append("<!--%s-->" % (element.text,))

        else:
            # This is assumed to be an ordinary element
            if not element.attrib:
                rv.append("<%s>" % (element.tag,))
            else:
                attr = " ".join(["%s=\"%s\"" % (name, value)
                                 for name, value in element.attrib.items()])
                rv.append("<%s %s>" % (element.tag, attr))
            if element.text:
                rv.append(element.text)

            for child in element:
                serializeElement(child)

            rv.append("</%s>" % (element.tag,))

        if hasattr(element, "tail") and element.tail:
            rv.append(element.tail)

    serializeElement(element)

    if finalText is not None:
        rv.append("%s\"" % (' ' * 2, finalText))

    return "".join(rv)


class TreeBuilder(_base.TreeBuilder):
    documentClass = Document
    doctypeClass = DocumentType
    elementClass = None
    commentClass = None
    fragmentClass = Document
    implementation = etree

    def __init__(self, namespaceHTMLElements, fullTree=False):
        builder = etree_builders.getETreeModule(etree, fullTree=fullTree)
        infosetFilter = self.infosetFilter = ihatexml.InfosetFilter()
        self.namespaceHTMLElements = namespaceHTMLElements

        class Attributes(dict):
            def __init__(self, element, value={}):
                self._element = element
                dict.__init__(self, value)
                for key, value in self.items():
                    if isinstance(key, tuple):
                        name = "{%s}%s" % (key[2], infosetFilter.coerceAttribute(key[1]))
                    else:
                        name = infosetFilter.coerceAttribute(key)
                    self._element._element.attrib[name] = value

            def __setitem__(self, key, value):
                dict.__setitem__(self, key, value)
                if isinstance(key, tuple):
                    name = "{%s}%s" % (key[2], infosetFilter.coerceAttribute(key[1]))
                else:
                    name = infosetFilter.coerceAttribute(key)
                self._element._element.attrib[name] = value

        class Element(builder.Element):
            def __init__(self, name, namespace):
                name = infosetFilter.coerceElement(name)
                builder.Element.__init__(self, name, namespace=namespace)
                self._attributes = Attributes(self)

            def _setName(self, name):
                self._name = infosetFilter.coerceElement(name)
                self._element.tag = self._getETreeTag(
                    self._name, self._namespace)

            def _getName(self):
                return infosetFilter.fromXmlName(self._name)

            name = property(_getName, _setName)

            def _getAttributes(self):
                return self._attributes

            def _setAttributes(self, attributes):
                self._attributes = Attributes(self, attributes)

            attributes = property(_getAttributes, _setAttributes)

            def insertText(self, data, insertBefore=None):
                data = infosetFilter.coerceCharacters(data)
                builder.Element.insertText(self, data, insertBefore)

            def appendChild(self, child):
                builder.Element.appendChild(self, child)

        class Comment(builder.Comment):
            def __init__(self, data):
                data = infosetFilter.coerceComment(data)
                builder.Comment.__init__(self, data)

            def _setData(self, data):
                data = infosetFilter.coerceComment(data)
                self._element.text = data

            def _getData(self):
                return self._element.text

            data = property(_getData, _setData)

        self.elementClass = Element
        self.commentClass = builder.Comment
        # self.fragmentClass = builder.DocumentFragment
        _base.TreeBuilder.__init__(self, namespaceHTMLElements)

    def reset(self):
        _base.TreeBuilder.reset(self)
        self.insertComment = self.insertCommentInitial
        self.initial_comments = []
        self.doctype = None

    def testSerializer(self, element):
        return testSerializer(element)

    def getDocument(self):
        if fullTree:
            return self.document._elementTree
        else:
            return self.document._elementTree.getroot()

    def getFragment(self):
        fragment = []
        element = self.openElements[0]._element
        if element.text:
            fragment.append(element.text)
        fragment.extend(list(element))
        if element.tail:
            fragment.append(element.tail)
        return fragment

    def insertDoctype(self, token):
        name = token["name"]
        publicId = token["publicId"]
        systemId = token["systemId"]

        if not name:
            warnings.warn("lxml cannot represent empty doctype", DataLossWarning)
            self.doctype = None
        else:
            coercedName = self.infosetFilter.coerceElement(name)
            if coercedName != name:
                warnings.warn("lxml cannot represent non-xml doctype", DataLossWarning)

            doctype = self.doctypeClass(coercedName, publicId, systemId)
            self.doctype = doctype

    def insertCommentInitial(self, data, parent=None):
        self.initial_comments.append(data)

    def insertCommentMain(self, data, parent=None):
        if (parent == self.document and
                self.document._elementTree.getroot()[-1].tag == comment_type):
                warnings.warn("lxml cannot represent adjacent comments beyond the root elements", DataLossWarning)
        super(TreeBuilder, self).insertComment(data, parent)

    def insertRoot(self, token):
        """Create the document root"""
        # Because of the way libxml2 works, it doesn't seem to be possible to
        # alter information like the doctype after the tree has been parsed.
        # Therefore we need to use the built-in parser to create our iniial
        # tree, after which we can add elements like normal
        docStr = ""
        if self.doctype:
            assert self.doctype.name
            docStr += "<!DOCTYPE %s" % self.doctype.name
            if (self.doctype.publicId is not None or
                    self.doctype.systemId is not None):
                docStr += (' PUBLIC "%s" ' %
                           (self.infosetFilter.coercePubid(self.doctype.publicId or "")))
                if self.doctype.systemId:
                    sysid = self.doctype.systemId
                    if sysid.find("'") >= 0 and sysid.find('"') >= 0:
                        warnings.warn("DOCTYPE system cannot contain single and double quotes", DataLossWarning)
                        sysid = sysid.replace("'", 'U00027')
                    if sysid.find("'") >= 0:
                        docStr += '"%s"' % sysid
                    else:
                        docStr += "'%s'" % sysid
                else:
                    docStr += "''"
            docStr += ">"
            if self.doctype.name != token["name"]:
                warnings.warn("lxml cannot represent doctype with a different name to the root element", DataLossWarning)
        docStr += "<THIS_SHOULD_NEVER_APPEAR_PUBLICLY/>"
        root = etree.fromstring(docStr)

        # Append the initial comments:
        for comment_token in self.initial_comments:
            root.addprevious(etree.Comment(comment_token["data"]))

        # Create the root document and add the ElementTree to it
        self.document = self.documentClass()
        self.document._elementTree = root.getroottree()

        # Give the root element the right name
        name = token["name"]
        namespace = token.get("namespace", self.defaultNamespace)
        if namespace is None:
            etree_tag = name
        else:
            etree_tag = "{%s}%s" % (namespace, name)
        root.tag = etree_tag

        # Add the root element to the internal child/open data structures
        root_element = self.elementClass(name, namespace)
        root_element._element = root
        self.document._childNodes.append(root_element)
        self.openElements.append(root_element)

        # Reset to the default insert comment function
        self.insertComment = self.insertCommentMain
python3.3/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/__init__.cpython-33.pyc000064400000006726151733566750026115 0ustar00�
7�ReM
c@sKdZddlmZmZmZddlmZiZddd�Z	dS(u�A collection of modules for building different kinds of tree from
HTML documents.

To create a treebuilder for a new type of tree, you need to do
implement several things:

1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders.Node (although comment nodes have a different
signature for their constructor, see treebuilders.etree.Comment)
Textual content may also be implemented as another node type, or not, as
your tree implementation requires.

2) A treebuilder object (called TreeBuilder by convention) that
inherits from treebuilders._base.TreeBuilder. This has 4 required attributes:
documentClass - the class to use for the bottommost node of a document
elementClass - the class to use for HTML Elements
commentClass - the class to use for comments
doctypeClass - the class to use for doctypes
It also has one required method:
getDocument - Returns the root node of the complete document tree

3) If you wish to run the unit tests, you must also create a
testSerializer method on your treebuilder which accepts a node and
returns a string containing Node and its children serialized according
to the format used in the unittests
i(uabsolute_importudivisionuunicode_literalsi(u
default_etreecKs�|j�}|tkr�|dkrlddlm}|dkrYddlm}|}n|j||�jS|dkr�ddlm	}|jt|<q�|dkr�dd	lm
}|dkr�t}n|j||�jSt
d
|��ntj|�S(u�Get a TreeBuilder class for various types of tree with built-in support

    treeType - the name of the tree type required (case-insensitive). Supported
               values are:

               "dom" - A generic builder for DOM implementations, defaulting to
                       a xml.dom.minidom based implementation.
               "etree" - A generic builder for tree implementations exposing an
                         ElementTree-like interface, defaulting to
                         xml.etree.cElementTree if available and
                         xml.etree.ElementTree if not.
               "lxml" - A etree-based builder for lxml.etree, handling
                        limitations of lxml's implementation.

    implementation - (Currently applies to the "etree" and "dom" tree types). A
                      module implementing the tree type e.g.
                      xml.etree.ElementTree or xml.etree.cElementTree.udomi(udomi(uminidomulxml(u
etree_lxmluetree(uetreeuUnrecognised treebuilder "%s" N(ulowerutreeBuilderCacheuudomuNoneuxml.domuminidomugetDomModuleuTreeBuilderu
etree_lxmluetreeu
default_etreeugetETreeModuleu
ValueErroruget(utreeTypeuimplementationukwargsudomuminidomu
etree_lxmluetree((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/__init__.pyugetTreeBuilder$s$		ugetTreeBuilderN(
u__doc__u
__future__uabsolute_importudivisionuunicode_literalsuutilsu
default_etreeutreeBuilderCacheuNoneugetTreeBuilder(((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/etree.cpython-33.pyc000064400000046016151733566750025456 0ustar00�
7�ReM1c@s�ddlmZmZmZddlmZddlZddlmZddlm	Z	ddlm
Z
dd	l
mZdd
lm
Z
ejd�Zedd
�Ze
e�ZdS(i(uabsolute_importudivisionuunicode_literals(u	text_typeNi(u_basei(uihatexml(u	constants(u
namespaces(umoduleFactoryFactoryu
{([^}]*)}(.*)c	s	���jd�j�G�fdd�dtj��G�fdd�d���G�fdd�d���G�fdd	�d	���G�fd
d�d����fdd
��	��fdd�}G��������	fdd�dtj�}t�S(Nuasdcs(|EeZdZd#�fdd�Zdd�Zdd�Zdd�Zeee�Z	d	d
�Z
dd�Zeee
�Zd
d�Z
dd�Zee
e�Zdd�Zdd�Zeee�Zdd�Zdd�Zdd�Zdd�Zd#dd�Zdd �Zd!d"�Zd#S($u getETreeBuilder.<locals>.Elementcs�||_||_�j|j||��|_|dkrUtd|jf|_n|j|jf|_d|_g|_	g|_
dS(Nuhtml(u_nameu
_namespaceuElementu_getETreeTagu_elementuNoneu
namespacesu	nameTupleuparentu_childNodesu_flags(uselfunameu	namespace(uElementTree(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu__init__s				u)getETreeBuilder.<locals>.Element.__init__cSs)|dkr|}nd||f}|S(Nu{%s}%s(uNone(uselfunameu	namespaceu	etree_tag((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_getETreeTag!s	u-getETreeBuilder.<locals>.Element._getETreeTagcSs+||_|j|j|j�|j_dS(N(u_nameu_getETreeTagu
_namespaceu_elementutag(uselfuname((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_setName(s	u)getETreeBuilder.<locals>.Element._setNamecSs|jS(N(u_name(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_getName,su)getETreeBuilder.<locals>.Element._getNamecSs+||_|j|j|j�|j_dS(N(u
_namespaceu_getETreeTagu_nameu_elementutag(uselfu	namespace((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu
_setNamespace1s	u.getETreeBuilder.<locals>.Element._setNamespacecSs|jS(N(u
_namespace(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu
_getNamespace5su.getETreeBuilder.<locals>.Element._getNamespacecSs
|jjS(N(u_elementuattrib(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_getAttributes:su/getETreeBuilder.<locals>.Element._getAttributescSs�x-t|jjj��D]}|jj|=qWx]|j�D]O\}}t|t�rsd|d|df}n|}|jj||�q=WdS(Nu{%s}%sii(ulistu_elementuattribukeysuitemsu
isinstanceutupleuset(uselfu
attributesukeyuvalueuname((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_setAttributes=su/getETreeBuilder.<locals>.Element._setAttributescSs|jS(N(u_childNodes(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_getChildNodesKsu/getETreeBuilder.<locals>.Element._getChildNodescSs;|jdd�=g|_x|D]}|j|�q WdS(N(u_elementu_childNodesuinsertChild(uselfuvalueuelement((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_setChildNodesNs	
u/getETreeBuilder.<locals>.Element._setChildNodescSst|jjpt|j��S(u,Return true if the node has children or text(uboolu_elementutextulen(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu
hasContentVsu+getETreeBuilder.<locals>.Element.hasContentcSs0|jj|�|jj|j�||_dS(N(u_childNodesuappendu_elementuparent(uselfunode((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuappendChildZsu,getETreeBuilder.<locals>.Element.appendChildcSs>t|j�j|j�}|jj||j�||_dS(N(ulistu_elementuindexuinsertuparent(uselfunodeurefNodeuindex((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuinsertBefore_su-getETreeBuilder.<locals>.Element.insertBeforecSs |jj|j�d|_dS(N(u_elementuremoveuNoneuparent(uselfunode((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuremoveChilddsu,getETreeBuilder.<locals>.Element.removeChildcSs-t|j�s?|jjs*d|j_n|jj|7_n�|dkr�|jdjsnd|jd_n|jdj|7_n�t|j�}|j|j�}|dkr�|j|djs�d|j|d_n|j|dj|7_n-|jjsd|j_n|jj|7_dS(Nuiii����i����i����(ulenu_elementutextuNoneutailulistuindex(uselfudatauinsertBeforeuchildrenuindex((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu
insertTexths"u+getETreeBuilder.<locals>.Element.insertTextcSsLt|�|j|j�}x*|jj�D]\}}||j|<q+W|S(N(utypeunameu	namespaceu
attributesuitems(uselfuelementunameuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu	cloneNodesu*getETreeBuilder.<locals>.Element.cloneNodecSs�|jr+|jdjj|jj7_nH|jjsFd|j_n|jjdk	rs|jj|jj7_nd|j_tjj||�dS(Niui����(u
childNodesu_elementutailutextuNoneu_baseuNodeureparentChildren(uselfu	newParent((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyureparentChildren�s	"u1getETreeBuilder.<locals>.Element.reparentChildrenN(u__name__u
__module__u__qualname__uNoneu__init__u_getETreeTagu_setNameu_getNameupropertyunameu
_setNamespaceu
_getNamespaceu	namespaceu_getAttributesu_setAttributesu
attributesu_getChildNodesu_setChildNodesu
childNodesu
hasContentuappendChilduinsertBeforeuremoveChildu
insertTextu	cloneNodeureparentChildren(u
__locals__(uElementTree(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuElements*
uElementcsM|EeZdZ�fdd�Zdd�Zdd�Zeee�ZdS(u getETreeBuilder.<locals>.Commentcs1�j|�|_d|_g|_g|_dS(N(uCommentu_elementuNoneuparentu_childNodesu_flags(uselfudata(uElementTree(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu__init__�s		u)getETreeBuilder.<locals>.Comment.__init__cSs
|jjS(N(u_elementutext(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_getData�su)getETreeBuilder.<locals>.Comment._getDatacSs||j_dS(N(u_elementutext(uselfuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_setData�su)getETreeBuilder.<locals>.Comment._setDataN(u__name__u
__module__u__qualname__u__init__u_getDatau_setDataupropertyudata(u
__locals__(uElementTree(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuComment�suCommentcst|EeZdZ�fdd�Zdd�Zdd�Zeee�Zdd�Zd	d
�Z	eee	�Z
dS(u%getETreeBuilder.<locals>.DocumentTypecs2�j|d�||j_||_||_dS(Nu
<!DOCTYPE>(u__init__u_elementutextupublicIdusystemId(uselfunameupublicIdusystemId(uElement(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu__init__�s	u.getETreeBuilder.<locals>.DocumentType.__init__cSs|jjdd�S(NupublicIdu(u_elementuget(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_getPublicId�su2getETreeBuilder.<locals>.DocumentType._getPublicIdcSs&|dk	r"|jjd|�ndS(NupublicId(uNoneu_elementuset(uselfuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_setPublicId�su2getETreeBuilder.<locals>.DocumentType._setPublicIdcSs|jjdd�S(NusystemIdu(u_elementuget(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_getSystemId�su2getETreeBuilder.<locals>.DocumentType._getSystemIdcSs&|dk	r"|jjd|�ndS(NusystemId(uNoneu_elementuset(uselfuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu_setSystemId�su2getETreeBuilder.<locals>.DocumentType._setSystemIdN(u__name__u
__module__u__qualname__u__init__u_getPublicIdu_setPublicIdupropertyupublicIdu_getSystemIdu_setSystemIdusystemId(u
__locals__(uElement(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuDocumentType�suDocumentTypecs&|EeZdZ�fdd�ZdS(u!getETreeBuilder.<locals>.Documentcs�j|d�dS(Nu
DOCUMENT_ROOT(u__init__(uself(uElement(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu__init__�su*getETreeBuilder.<locals>.Document.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__(uElement(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuDocument�suDocumentcs&|EeZdZ�fdd�ZdS(u)getETreeBuilder.<locals>.DocumentFragmentcs�j|d�dS(NuDOCUMENT_FRAGMENT(u__init__(uself(uElement(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu__init__�su2getETreeBuilder.<locals>.DocumentFragment.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__(uElement(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuDocumentFragment�suDocumentFragmentcs;g�d���fdd���|d�dj��S(Nics�t|d�s|j�}n|jdkr�|jd�sK|jd�r�|jd�p]d}|jd�prd}�jd|j||f�q0�jd|jf�n�|jdkrM�jd	�|jdk	r��jd
d|d|jf�n|jdk	rtd
��nt|d�r0t	|j
�r0td��q0n�|j�kr}�jdd||jf�n�t|jt�s�t
dt|j�|jf��tj|j�}|dkr�|j}n/|j�\}}tj|}d||f}�jdd||f�t|d�rg}x�|j
j�D]r\}}	tj|�}|dk	r�|j�\}}tj|}d||f}
n|}
|j|
|	f�qJWx?t|�D].\}}	�jdd|d||	f�q�Wn|jr0�jd
d|d|jf�n|d7}x|D]}�||�qAW|jr��jd
d|d|jf�ndS(Nutagu
<!DOCTYPE>upublicIdusystemIduu<!DOCTYPE %s "%s" "%s">u
<!DOCTYPE %s>u
DOCUMENT_ROOTu	#documentu|%s"%s"u iuDocument node cannot have tailuattribu$Document node cannot have attributesu|%s<!-- %s -->uExpected unicode, got %s, %su%s %su|%s<%s>u
|%s%s="%s"(uhasattrugetrootutagugetuappendutextuNoneutailu	TypeErrorulenuattribu
isinstanceu	text_typeuAssertionErrorutypeu
tag_regexpumatchugroupsu	constantsuprefixesuitemsusorted(uelementuindentupublicIdusystemIdunsmatchunameunsuprefixu
attributesuvalueuattr_stringuchild(uElementTreeCommentTypeurvuserializeElement(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuserializeElement�s^	
%!

)	%

	uAgetETreeBuilder.<locals>.testSerializer.<locals>.serializeElementu
(ujoin(uelement(uElementTreeCommentType(urvuserializeElementu@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyutestSerializer�s7
u'getETreeBuilder.<locals>.testSerializercsGg�tj�������fdd���|�dj��S(u4Serialize an element and its child nodes to a stringcsTt|�j�r!|j�}n|jdkr�|jd�sN|jd�r�|jd�p`d}|jd�pud}�jd|j||f�q4�jd|jf�n�|jdkrL|jdk	r��j|j�n|jdk	rt	d��nt
|d	�r.t|j�r.t	d
��nx|D]}�|�q5Wn�|j�kru�jd|jf�n�|js��jd�j
|j�f�nEd
j�fdd�|jj�D��}�jd|j|f�|jr�j|j�nx|D]}�|�q	W�jd|jf�|jrP�j|j�ndS(Nu
<!DOCTYPE>upublicIdusystemIduu<!DOCTYPE %s PUBLIC "%s" "%s">u
<!DOCTYPE %s>u
DOCUMENT_ROOTuDocument node cannot have tailuattribu$Document node cannot have attributesu	<!--%s-->u<%s>u cs/g|]%\}}d�j|�|f�qS(u%s="%s"(ufromXmlName(u.0unameuvalue(ufilter(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu
<listcomp>#s	uOgetETreeBuilder.<locals>.tostring.<locals>.serializeElement.<locals>.<listcomp>u<%s %s>u</%s>(u
isinstanceuElementTreeugetrootutagugetuappendutextuNoneutailu	TypeErroruhasattrulenuattribufromXmlNameujoinuitems(uelementupublicIdusystemIduchilduattr(uElementTreeuElementTreeCommentTypeufilterurvuserializeElement(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuserializeElements@	
	#	
	u;getETreeBuilder.<locals>.tostring.<locals>.serializeElementu(uihatexmlu
InfosetFilterujoin(uelement(uElementTreeuElementTreeCommentType(ufilterurvuserializeElementu@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyutostrings
-
u!getETreeBuilder.<locals>.tostringcsh|EeZdZ�Z�Z�Z�Z�Z�Z�fdd�Z	�fdd�Z
dd�ZdS(u$getETreeBuilder.<locals>.TreeBuildercs
�|�S(N((uselfuelement(utestSerializer(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyutestSerializer>su3getETreeBuilder.<locals>.TreeBuilder.testSerializercsP�r|jjS|jdk	r9|jjjd|j�S|jjjd�SdS(Nu{%s}htmluhtml(udocumentu_elementudefaultNamespaceuNoneufind(uself(ufullTree(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyugetDocumentAs
u0getETreeBuilder.<locals>.TreeBuilder.getDocumentcSstjj|�jS(N(u_baseuTreeBuilderugetFragmentu_element(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyugetFragmentKsu0getETreeBuilder.<locals>.TreeBuilder.getFragmentN(u__name__u
__module__u__qualname__u
documentClassudoctypeClassuelementClassucommentClassu
fragmentClassuimplementationutestSerializerugetDocumentugetFragment(u
__locals__(uCommentuDocumentuDocumentFragmentuDocumentTypeuElementuElementTreeImplementationufullTreeutestSerializer(u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyuTreeBuilder6s
uTreeBuilder(uCommentutagu_baseuNodeuTreeBuilderulocals(uElementTreeImplementationufullTreeutostringuTreeBuilder((
uCommentuDocumentuDocumentFragmentuDocumentTypeuElementuElementTreeuElementTreeCommentTypeuElementTreeImplementationufullTreeutestSerializeru@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyugetETreeBuilders}>64ugetETreeBuilder(u
__future__uabsolute_importudivisionuunicode_literalsupip._vendor.sixu	text_typeureuu_baseuihatexmlu	constantsu
namespacesuutilsumoduleFactoryFactoryucompileu
tag_regexpuFalseugetETreeBuilderugetETreeModule(((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree.pyu<module>s�Cpython3.3/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/etree_lxml.cpython-33.pyc000064400000045757151733566750026525 0ustar00�
7�Re�6c@s-dZddlmZmZmZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
dd	lmZ
dd
lmZddljZdZejd�Zejd�jZGd
d�de�ZGdd�de�Zdd�Zdd�ZGdd�de	j�ZdS(u�Module for supporting the lxml.etree library. The idea here is to use as much
of the native library as possible, without using fragile hacks like custom element
names that break between releases. The downside of this is that we cannot represent
all possible trees; specifically the following are known to cause problems:

Text or comments as siblings of the root element
Docypes with no name

When any of these things occur, we emit a DataLossWarning
i(uabsolute_importudivisionuunicode_literalsNi(u_basei(uDataLossWarning(u	constants(uetree(uihatexmlu
{([^}]*)}(.*)uasdcBs |EeZdZdd�ZdS(uDocumentTypecCs||_||_||_dS(N(unameupublicIdusystemId(uselfunameupublicIdusystemId((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu__init__"s		uDocumentType.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuDocumentType!suDocumentTypecBsD|EeZdZdd�Zdd�Zdd�Zee�ZdS(uDocumentcCsd|_g|_dS(N(uNoneu_elementTreeu_childNodes(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu__init__)s	uDocument.__init__cCs|jj�j|j�dS(N(u_elementTreeugetrootuaddnextu_element(uselfuelement((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuappendChild-suDocument.appendChildcCs|jS(N(u_childNodes(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu_getChildNodes0suDocument._getChildNodesN(u__name__u
__module__u__qualname__u__init__uappendChildu_getChildNodesupropertyu
childNodes(u
__locals__((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuDocument(suDocumentcssg�d}tj��d���fdd���|d�|dk	rf�jdd|f�ndj��S(	Nic
sLt|d�s�t|d�r
�jd�|jjr�|jjpL|jjsbd|jj}n%d|jj|jj|jjf}�jdd|d|f�n|j�}x"|j�dk	r�|j�}q�Wx�|dk	r	�||d�|j
�}q�WqHt|t�s+t|t
�rpt|t�sRtjjdksRt��jd	d||f�qH�jd
�x�|D]}�||d�q�Wn�|jtkr�jdd||jf�t|d�rH|jrH�jd	d||jf�qHn=t|tj�s#t�tjj|j�}|dk	r�|jd
�}|jd�}tj|}�jdd||�j|�f�n'�jdd|�j|j�f�t|d�r�g}x�|jj �D]�\}	}
tj|	�}|dk	rM|j!�\}}	�j|	�}	tj|}d||	f}n�j|	�}|j||
f�q�Wx?t"|�D].\}	}
�jdd|d|	|
f�q�Wn|jr��jd	d|d|jf�n|d7}x|D]}�||�q�Wt|d�rH|jrH�jd	d|d|jf�ndS(Nutagugetrootu	#documentu
<!DOCTYPE %s>u<!DOCTYPE %s "%s" "%s">u|%s%su iu|%s"%s"u#document-fragmentu|%s<!-- %s -->utailiu
|%s<%s %s>u|%s<%s>uattribu%s %su
|%s%s="%s"(#uhasattruappendudocinfouinternalDTDu	public_idu
system_urlu	root_nameugetrootugetpreviousuNoneugetnextu
isinstanceustrubytesusysuversion_infoumajoruAssertionErrorutagucomment_typeutextutailuetreeu_Elementuetree_buildersu
tag_regexpumatchugroupu	constantsuprefixesufromXmlNameuattribuitemsugroupsusorted(
uelementuindentudtd_strunext_elementunsmatchunsutaguprefixu
attributesunameuvalueuattr_stringuchild(u
infosetFilterurvuserializeElement(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuserializeElement;st
		"'

$

)	%

u(testSerializer.<locals>.serializeElementu|%s"%s"u iu
u  (uNoneuihatexmlu
InfosetFilteruappendujoin(uelementu	finalText((u
infosetFilterurvuserializeElementuE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyutestSerializer6sF
utestSerializercs^g�d}��fdd���|�|dk	rQ�jdd|f�ndj��S(	u4Serialize an element and its child nodes to a stringcsqt|d�si|jjrV|jjr6|jj}nd|jj}�j|�n�|j��n�|jtkr��jd|j	f�n�|j
s��jd|jf�n?djdd�|j
j�D��}�jd|j|f�|j	r�j|j	�nx|D]}�|�qW�jd	|jf�t|d
�rm|j
rm�j|j
�ndS(Nutagu
<!DOCTYPE %s>u	<!--%s-->u<%s>u cSs&g|]\}}d||f�qS(u%s="%s"((u.0unameuvalue((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu
<listcomp>�s	u6tostring.<locals>.serializeElement.<locals>.<listcomp>u<%s %s>u</%s>utail(uhasattrudocinfouinternalDTDudoctypeu	root_nameuappendugetrootutagucomment_typeutextuattribujoinuitemsutail(uelementudtd_struattruchild(urvuserializeElement(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuserializeElement�s*		
u"tostring.<locals>.serializeElementu%s"u iuNu  (uNoneuappendujoin(uelementu	finalText((urvuserializeElementuE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyutostring�s 
utostringcs�|EeZdZeZeZdZdZ	eZ
eZddd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zdd
d�Zd�fdd�Zdd�Z�S(uTreeBuildercs�tjtd|��tj��|_||_G�fdd�dt��G���fdd�d�j�}G��fdd�d�j	�}||_
�j	|_tj
j||�dS(NufullTreecs;|EeZdZi�fdd�Z�fdd�ZdS(u(TreeBuilder.__init__.<locals>.Attributescs�||_tj||�xo|j�D]a\}}t|t�red|d�j|d�f}n�j|�}||jjj|<q&WdS(Nu{%s}%sii(u_elementudictu__init__uitemsu
isinstanceutupleucoerceAttributeuattrib(uselfuelementuvalueukeyuname(u
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu__init__�s	$u1TreeBuilder.__init__.<locals>.Attributes.__init__csltj|||�t|t�rFd|d�j|d�f}n�j|�}||jjj|<dS(Nu{%s}%sii(udictu__setitem__u
isinstanceutupleucoerceAttributeu_elementuattrib(uselfukeyuvalueuname(u
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu__setitem__�s
$u4TreeBuilder.__init__.<locals>.Attributes.__setitem__N(u__name__u
__module__u__qualname__u__init__u__setitem__(u
__locals__(u
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu
Attributes�s
u
Attributescs�|EeZdZ���fdd�Z�fdd�Z�fdd�Zeee�Zdd�Z�fd	d
�Z	eee	�Z
d��fdd�Z�fd
d�Z
dS(u%TreeBuilder.__init__.<locals>.Elementcs;�j|�}�jj||d|��|�|_dS(Nu	namespace(u
coerceElementuElementu__init__u_attributes(uselfunameu	namespace(u
Attributesubuilderu
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu__init__�su.TreeBuilder.__init__.<locals>.Element.__init__cs4�j|�|_|j|j|j�|j_dS(N(u
coerceElementu_nameu_getETreeTagu
_namespaceu_elementutag(uselfuname(u
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu_setName�su.TreeBuilder.__init__.<locals>.Element._setNamecs�j|j�S(N(ufromXmlNameu_name(uself(u
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu_getName�su.TreeBuilder.__init__.<locals>.Element._getNamecSs|jS(N(u_attributes(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu_getAttributes�su4TreeBuilder.__init__.<locals>.Element._getAttributescs�||�|_dS(N(u_attributes(uselfu
attributes(u
Attributes(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu_setAttributes�su4TreeBuilder.__init__.<locals>.Element._setAttributescs)�j|�}�jj|||�dS(N(ucoerceCharactersuElementu
insertText(uselfudatauinsertBefore(ubuilderu
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu
insertText�su0TreeBuilder.__init__.<locals>.Element.insertTextcs�jj||�dS(N(uElementuappendChild(uselfuchild(ubuilder(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuappendChild�su1TreeBuilder.__init__.<locals>.Element.appendChildN(u__name__u
__module__u__qualname__u__init__u_setNameu_getNameupropertyunameu_getAttributesu_setAttributesu
attributesuNoneu
insertTextuappendChild(u
__locals__(u
Attributesubuilderu
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuElement�suElementcsV|EeZdZ��fdd�Z�fdd�Zdd�Zeee�ZdS(u%TreeBuilder.__init__.<locals>.Commentcs&�j|�}�jj||�dS(N(u
coerceCommentuCommentu__init__(uselfudata(ubuilderu
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu__init__�su.TreeBuilder.__init__.<locals>.Comment.__init__cs�j|�}||j_dS(N(u
coerceCommentu_elementutext(uselfudata(u
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu_setData�su.TreeBuilder.__init__.<locals>.Comment._setDatacSs
|jjS(N(u_elementutext(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu_getData�su.TreeBuilder.__init__.<locals>.Comment._getDataN(u__name__u
__module__u__qualname__u__init__u_setDatau_getDataupropertyudata(u
__locals__(ubuilderu
infosetFilter(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuComment�suComment(uetree_buildersugetETreeModuleuetreeuihatexmlu
InfosetFilteru
infosetFilterunamespaceHTMLElementsudictuElementuCommentuelementClassucommentClassu_baseuTreeBuilderu__init__(uselfunamespaceHTMLElementsufullTreeuElementuComment((u
Attributesubuilderu
infosetFilteruE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu__init__�s	%"	uTreeBuilder.__init__cCs2tjj|�|j|_g|_d|_dS(N(u_baseuTreeBuilderuresetuinsertCommentInitialu
insertCommentuinitial_commentsuNoneudoctype(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuresets	uTreeBuilder.resetcCs
t|�S(N(utestSerializer(uselfuelement((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyutestSerializersuTreeBuilder.testSerializercCs$tr|jjS|jjj�SdS(N(ufullTreeudocumentu_elementTreeugetroot(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyugetDocuments
uTreeBuilder.getDocumentcCseg}|jdj}|jr2|j|j�n|jt|��|jra|j|j�n|S(Ni(uopenElementsu_elementutextuappenduextendulistutail(uselfufragmentuelement((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyugetFragments		uTreeBuilder.getFragmentcCs�|d}|d}|d}|s@tjdt�d|_nO|jj|�}||krqtjdt�n|j|||�}||_dS(NunameupublicIdusystemIdu#lxml cannot represent empty doctypeu%lxml cannot represent non-xml doctype(uwarningsuwarnuDataLossWarninguNoneudoctypeu
infosetFilteru
coerceElementudoctypeClass(uselfutokenunameupublicIdusystemIducoercedNameudoctype((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu
insertDoctype!s


uTreeBuilder.insertDoctypecCs|jj|�dS(N(uinitial_commentsuappend(uselfudatauparent((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuinsertCommentInitial1su TreeBuilder.insertCommentInitialcs^||jkrA|jjj�djtkrAtjdt�ntt	|�j
||�dS(Niu@lxml cannot represent adjacent comments beyond the root elementsi����(udocumentu_elementTreeugetrootutagucomment_typeuwarningsuwarnuDataLossWarningusuperuTreeBuilderu
insertComment(uselfudatauparent(u	__class__(uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuinsertCommentMain4suTreeBuilder.insertCommentMainc
Cscd}|jr`|jjs!t�|d|jj7}|jjdk	sY|jjdk	r*|d|jj|jjpwd�7}|jjr|jj}|jd�dkr�|jd�dkr�t	j
dt�|jdd�}n|jd�dkr|d	|7}q'|d
|7}q*|d7}n|d7}|jj|d
kr`t	j
dt�q`n|d7}t
j|�}x+|jD] }|jt
j|d��q�W|j�|_|j�|j_|d
}|jd|j�}|dkr�|}nd||f}||_|j||�}	||	_|jjj|	�|jj|	�|j|_dS(uCreate the document rootuu<!DOCTYPE %su
 PUBLIC "%s" u'iu"u6DOCTYPE system cannot contain single and double quotesuU00027u"%s"u'%s'u''u>unameuGlxml cannot represent doctype with a different name to the root elementu$<THIS_SHOULD_NEVER_APPEAR_PUBLICLY/>udatau	namespaceu{%s}%sN( udoctypeunameuAssertionErrorupublicIduNoneusystemIdu
infosetFilterucoercePubidufinduwarningsuwarnuDataLossWarningureplaceuetreeu
fromstringuinitial_commentsuaddpreviousuCommentu
documentClassudocumentugetroottreeu_elementTreeugetudefaultNamespaceutaguelementClassu_elementu_childNodesuappenduopenElementsuinsertCommentMainu
insertComment(
uselfutokenudocStrusysidurootu
comment_tokenunameu	namespaceu	etree_taguroot_element((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu
insertRoot:sJ	 *



			uTreeBuilder.insertRootNF(u__name__u
__module__u__qualname__uDocumentu
documentClassuDocumentTypeudoctypeClassuNoneuelementClassucommentClassu
fragmentClassuetreeuimplementationuFalseu__init__uresetutestSerializerugetDocumentugetFragmentu
insertDoctypeuinsertCommentInitialuinsertCommentMainu
insertRoot(u
__locals__((u	__class__uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyuTreeBuilder�sJ
uTreeBuilderT(u__doc__u
__future__uabsolute_importudivisionuunicode_literalsuwarningsureusysuu_baseu	constantsuDataLossWarninguetreeuetree_buildersuihatexmlu
lxml.etreeuTrueufullTreeucompileu
tag_regexpuCommentutagucomment_typeuobjectuDocumentTypeuDocumentutestSerializerutostringuTreeBuilder(((uE/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/etree_lxml.pyu<module>
s$S-python3.3/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/_base.cpython-33.pyc000064400000042306151733566750025421 0ustar00�
7�Re�5c@shddlmZmZmZddlmZddlmZmZm	Z	dZiee�dfd6eeee	ddfg�B�dfd6eeee	ddfe	ddfg�B�dfd	6ee	ddfe	dd
fg�dfd
6ee	ddfe	ddfg�dfd
6ZGdd�de�ZGdd�de�ZGdd�de�ZdS(i(uabsolute_importudivisionuunicode_literals(u	text_typei(uscopingElementsutableInsertModeElementsu
namespacesuhtmlubuttonuoluululistutableuoptgroupuoptionuselectcBs�|EeZdZdd�Zdd�Zdd�Zdd�Zdd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dS(uNodecCs:||_d|_d|_i|_g|_g|_dS(u6Node representing an item in the tree.
        name - The tag name associated with the node
        parent - The parent of the current node (or None for the document node)
        value - The value of the current node (applies to text nodes and
        comments
        attributes - a dict holding name, value pairs for attributes of the node
        childNodes - a list of child nodes of the current node. This must
        include all elements but not necessarily other node types
        _flags - A list of miscellaneous flags that can be set on the node
        N(unameuNoneuparentuvalueu
attributesu
childNodesu_flags(uselfuname((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu__init__s					u
Node.__init__cCsKdjdd�|jj�D��}|r<d|j|fSd|jSdS(Nu cSs&g|]\}}d||f�qS(u%s="%s"((u.0unameuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
<listcomp>+s	u Node.__str__.<locals>.<listcomp>u<%s %s>u<%s>(ujoinu
attributesuitemsuname(uselfu
attributesStr((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu__str__*s
uNode.__str__cCsd|jS(Nu<%s>(uname(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu__repr__3su
Node.__repr__cCs
t�dS(u3Insert node as a child of the current node
        N(uNotImplementedError(uselfunode((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuappendChild6suNode.appendChildcCs
t�dS(u�Insert data as text in the current node, positioned before the
        start of node insertBefore or to the end of the node's text.
        N(uNotImplementedError(uselfudatauinsertBefore((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
insertText;suNode.insertTextcCs
t�dS(u�Insert node as a child of the current node, before refNode in the
        list of child nodes. Raises ValueError if refNode is not a child of
        the current nodeN(uNotImplementedError(uselfunodeurefNode((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuinsertBeforeAsuNode.insertBeforecCs
t�dS(u:Remove node from the children of the current node
        N(uNotImplementedError(uselfunode((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuremoveChildGsuNode.removeChildcCs.x|jD]}|j|�q
Wg|_dS(u�Move all the children of the current node to newParent.
        This is needed so that trees that don't store text as nodes move the
        text in the correct way
        N(u
childNodesuappendChild(uselfu	newParentuchild((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyureparentChildrenLsuNode.reparentChildrencCs
t�dS(u�Return a shallow copy of the current node i.e. a node with the same
        name and attributes but with no parent or child nodes
        N(uNotImplementedError(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu	cloneNodeVsuNode.cloneNodecCs
t�dS(uFReturn true if the node has children or text, false otherwise
        N(uNotImplementedError(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
hasContent\suNode.hasContentN(u__name__u
__module__u__qualname__u__init__u__str__u__repr__uappendChilduNoneu
insertTextuinsertBeforeuremoveChildureparentChildrenu	cloneNodeu
hasContent(u
__locals__((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuNodes	
uNodecBs,|EeZdZdd�Zdd�ZdS(uActiveFormattingElementscCs�d}|tkrxj|ddd�D]R}|tkr<Pn|j||�r[|d7}n|dkr&|j|�Pq&q&Wntj||�dS(Niiii����(uMarkeru
nodesEqualuremoveulistuappend(uselfunodeu
equalCountuelement((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuappendcs

uActiveFormattingElements.appendcCs0|j|jksdS|j|jks,dSdS(NFT(u	nameTupleuFalseu
attributesuTrue(uselfunode1unode2((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
nodesEqualps
u#ActiveFormattingElements.nodesEqualN(u__name__u
__module__u__qualname__uappendu
nodesEqual(u
__locals__((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuActiveFormattingElementsbs
uActiveFormattingElementscBsC|EeZdZdZd*Zd*Zd*Zd*Zd*Z	dd�Z
dd�Zd*dd�Zdd	�Z
d
d�Zdd
�Zdd�Zdd�Zd*dd�Zdd�Zdd�Zdd�Zeee�Zdd�Zdd�Zd*dd�Zd d!�Zd*d"d#�Zd$d%�Zd&d'�Zd(d)�Zd*S(+uTreeBuilderuBase treebuilder implementation
    documentClass - the class to use for the bottommost node of a document
    elementClass - the class to use for HTML Elements
    commentClass - the class to use for comments
    doctypeClass - the class to use for doctypes
    cCs)|rd|_n	d|_|j�dS(Nuhttp://www.w3.org/1999/xhtml(udefaultNamespaceuNoneureset(uselfunamespaceHTMLElements((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu__init__�s	uTreeBuilder.__init__cCsCg|_t�|_d|_d|_d|_|j�|_	dS(NF(
uopenElementsuActiveFormattingElementsuactiveFormattingElementsuNoneuheadPointeruformPointeruFalseuinsertFromTableu
documentClassudocument(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyureset�s				uTreeBuilder.resetcCs�t|d�}t|\}}xZt|j�D]I}|j|krK|s]||kra|radS||j|kAr/dSq/Wds�t�dS(Nu	nameTupleTF(	uhasattrulistElementsMapureverseduopenElementsunameuTrueu	nameTupleuFalseuAssertionError(uselfutargetuvariantu	exactNodeulistElementsuinvertunode((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuelementInScope�suTreeBuilder.elementInScopecCs |js
dSt|j�d}|j|}|tksH||jkrLdSxL|tkr�||jkr�|dkr�d}Pn|d8}|j|}qOWx~|d7}|j|}|j�}|jidd6|jd6|jd6|jd6�}||j|<||jd	kr�Pq�q�dS(
NiiuStartTagutypeunameu	namespaceudatai����i����(	uactiveFormattingElementsulenuMarkeruopenElementsu	cloneNodeu
insertElementunameu	namespaceu
attributes(uselfuiuentryucloneuelement((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu#reconstructActiveFormattingElements�s.	






u/TreeBuilder.reconstructActiveFormattingElementscCs>|jj�}x(|jr9|tkr9|jj�}qWdS(N(uactiveFormattingElementsupopuMarker(uselfuentry((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuclearActiveFormattingElements�su)TreeBuilder.clearActiveFormattingElementscCsHxA|jddd�D])}|tkr-Pq|j|kr|SqWdS(u�Check if an element exists between the end of the active
        formatting elements and the last marker. If it does, return it, else
        return falseNii����F(uactiveFormattingElementsuMarkerunameuFalse(uselfunameuitem((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu!elementInActiveFormattingElements�su-TreeBuilder.elementInActiveFormattingElementscCs3|j|�}|jj|�|jj|�dS(N(u
createElementuopenElementsuappendudocumentuappendChild(uselfutokenuelement((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
insertRoot�suTreeBuilder.insertRootcCsG|d}|d}|d}|j|||�}|jj|�dS(NunameupublicIdusystemId(udoctypeClassudocumentuappendChild(uselfutokenunameupublicIdusystemIdudoctype((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
insertDoctype�s



uTreeBuilder.insertDoctypecCs:|dkr|jd}n|j|j|d��dS(Niudatai����(uNoneuopenElementsuappendChilducommentClass(uselfutokenuparent((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
insertCommentsuTreeBuilder.insertCommentcCsB|d}|jd|j�}|j||�}|d|_|S(u.Create an element but don't insert it anywhereunameu	namespaceudata(ugetudefaultNamespaceuelementClassu
attributes(uselfutokenunameu	namespaceuelement((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
createElements


uTreeBuilder.createElementcCs|jS(N(u_insertFromTable(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu_getInsertFromTablesuTreeBuilder._getInsertFromTablecCs.||_|r|j|_n|j|_dS(usSwitch the function used to insert an element from the
        normal one to the misnested table one and back againN(u_insertFromTableuinsertElementTableu
insertElementuinsertElementNormal(uselfuvalue((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu_setInsertFromTables	uTreeBuilder._setInsertFromTablecCs�|d}t|t�s)td|��|jd|j�}|j||�}|d|_|jdj|�|jj	|�|S(NunameuElement %s not unicodeu	namespaceudataii����(
u
isinstanceu	text_typeuAssertionErrorugetudefaultNamespaceuelementClassu
attributesuopenElementsuappendChilduappend(uselfutokenunameu	namespaceuelement((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuinsertElementNormals

uTreeBuilder.insertElementNormalcCs�|j|�}|jdjtkr2|j|�S|j�\}}|dkr`|j|�n|j||�|jj	|�|S(u-Create an element and insert it into the treeii����N(
u
createElementuopenElementsunameutableInsertModeElementsuinsertElementNormalugetTableMisnestedNodePositionuNoneuappendChilduinsertBeforeuappend(uselfutokenuelementuparentuinsertBefore((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuinsertElementTable(s
uTreeBuilder.insertElementTablecCs{|dkr|jd}n|jsE|jrU|jdjtkrU|j|�n"|j�\}}|j||�dS(uInsert text data.iNi����i����(uNoneuopenElementsuinsertFromTableunameutableInsertModeElementsu
insertTextugetTableMisnestedNodePosition(uselfudatauparentuinsertBefore((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu
insertText8s
	uTreeBuilder.insertTextcCs�d}d}d}x7|jddd�D]}|jdkr)|}Pq)q)W|r�|jrm|j}|}q�|j|jj|�d}n
|jd}||fS(usGet the foster parent element, and sibling to insert before
        (or None) when inserting a misnested table nodeNiutableii����(uNoneuopenElementsunameuparentuindex(uselfu	lastTableufosterParentuinsertBeforeuelm((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyugetTableMisnestedNodePositionGs			
u)TreeBuilder.getTableMisnestedNodePositionc
CsO|jd
j}|td�krK||krK|jj�|j|�ndS(Niuddudtuliuoptionuoptgroupupurpurti����(uddudtuliuoptionuoptgroupupurpurt(uopenElementsunameu	frozensetupopugenerateImpliedEndTags(uselfuexcludeuname((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyugenerateImpliedEndTagsas

u"TreeBuilder.generateImpliedEndTagscCs|jS(uReturn the final tree(udocument(uself((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyugetDocumentksuTreeBuilder.getDocumentcCs$|j�}|jdj|�|S(uReturn the final fragmenti(u
fragmentClassuopenElementsureparentChildren(uselfufragment((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyugetFragmentosuTreeBuilder.getFragmentcCs
t�dS(uzSerialize the subtree of node in the format required by unit tests
        node - the node from which to start serializingN(uNotImplementedError(uselfunode((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyutestSerializervsuTreeBuilder.testSerializerN( u__name__u
__module__u__qualname__u__doc__uNoneu
documentClassuelementClassucommentClassudoctypeClassu
fragmentClassu__init__uresetuelementInScopeu#reconstructActiveFormattingElementsuclearActiveFormattingElementsu!elementInActiveFormattingElementsu
insertRootu
insertDoctypeu
insertCommentu
createElementu_getInsertFromTableu_setInsertFromTableupropertyuinsertFromTableuinsertElementNormaluinsertElementTableu
insertTextugetTableMisnestedNodePositionugenerateImpliedEndTagsugetDocumentugetFragmentutestSerializer(u
__locals__((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyuTreeBuilderzs6.	

uTreeBuilderNFT(u
__future__uabsolute_importudivisionuunicode_literalsupip._vendor.sixu	text_typeu	constantsuscopingElementsutableInsertModeElementsu
namespacesuNoneuMarkeru	frozensetuFalseusetuTrueulistElementsMapuobjectuNodeulistuActiveFormattingElementsuTreeBuilder(((u@/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/_base.pyu<module>s*! Kpython3.3/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/dom.cpython-33.pyc000064400000035667151733566750025143 0ustar00�
7�Re!c@s�ddlmZmZmZddlmZmZddlZddlm	Z	ddlm
Z
ddl
mZdd	lm
Z
d
d�Ze
e�ZdS(i(uabsolute_importudivisionuunicode_literals(uminidomuNodeNi(u_basei(u	constants(u
namespaces(umoduleFactoryFactorycsy��Gdd�dt��G��fdd�dtj��G����fdd�dtj�}dd��t�S(	NcBst|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS(ugetDomBuilder.<locals>.AttrListcSs
||_dS(N(uelement(uselfuelement((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu__init__su(getDomBuilder.<locals>.AttrList.__init__cSst|jjj��j�S(N(ulistuelementu
attributesuitemsu__iter__(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu__iter__su(getDomBuilder.<locals>.AttrList.__iter__cSs|jj||�dS(N(uelementusetAttribute(uselfunameuvalue((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu__setitem__su+getDomBuilder.<locals>.AttrList.__setitem__cSstt|jjj���S(N(ulenulistuelementu
attributesuitems(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu__len__su'getDomBuilder.<locals>.AttrList.__len__cSs#dd�t|jjj��D�S(NcSs$g|]}|d|df�qS(ii((u.0uitem((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
<listcomp>s	u9getDomBuilder.<locals>.AttrList.items.<locals>.<listcomp>(ulistuelementu
attributesuitems(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuitemss	u%getDomBuilder.<locals>.AttrList.itemscSst|jjj��S(N(ulistuelementu
attributesukeys(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyukeys!su$getDomBuilder.<locals>.AttrList.keyscSs|jj|�S(N(uelementugetAttribute(uselfuname((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu__getitem__$su+getDomBuilder.<locals>.AttrList.__getitem__cSs,t|t�rt�n|jj|�SdS(N(u
isinstanceutupleuNotImplementedErroruelementuhasAttribute(uselfuname((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu__contains__'s	u,getDomBuilder.<locals>.AttrList.__contains__N(u__name__u
__module__u__qualname__u__init__u__iter__u__setitem__u__len__uitemsukeysu__getitem__u__contains__(u
__locals__((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuAttrListsuAttrListcs�|EeZdZdd�Zedd��Zdd�Zddd�Zd	d
�Z	dd�Z
d
d�Z�fdd�Zdd�Z
eee
�Z�fdd�Zdd�Zdd�Zee�ZdS(u"getDomBuilder.<locals>.NodeBuildercSs#tjj||j�||_dS(N(u_baseuNodeu__init__unodeNameuelement(uselfuelement((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu__init__.su+getDomBuilder.<locals>.NodeBuilder.__init__cSs"t|jd�r|jjp!dS(NunamespaceURI(uhasattruelementunamespaceURIuNone(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu<lambda>2su+getDomBuilder.<locals>.NodeBuilder.<lambda>cSs ||_|jj|j�dS(N(uparentuelementuappendChild(uselfunode((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuappendChild5s	u.getDomBuilder.<locals>.NodeBuilder.appendChildcSsH|jjj|�}|r4|jj||j�n|jj|�dS(N(uelementu
ownerDocumentucreateTextNodeuinsertBeforeuappendChild(uselfudatauinsertBeforeutext((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
insertText9su-getDomBuilder.<locals>.NodeBuilder.insertTextcSs&|jj|j|j�||_dS(N(uelementuinsertBeforeuparent(uselfunodeurefNode((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuinsertBefore@su/getDomBuilder.<locals>.NodeBuilder.insertBeforecSs8|jj|jkr+|jj|j�nd|_dS(N(uelementu
parentNodeuremoveChilduNoneuparent(uselfunode((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuremoveChildDsu.getDomBuilder.<locals>.NodeBuilder.removeChildcSsOx?|jj�rA|jj}|jj|�|jj|�qWg|_dS(N(uelementu
hasChildNodesu
firstChilduremoveChilduappendChildu
childNodes(uselfu	newParentuchild((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyureparentChildrenIs
u3getDomBuilder.<locals>.NodeBuilder.reparentChildrencs
�|j�S(N(uelement(uself(uAttrList(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
getAttributesPsu0getDomBuilder.<locals>.NodeBuilder.getAttributescSs�|r�x�t|j��D]~\}}t|t�r�|ddk	r]|dd|d}n
|d}|jj|d||�q|jj||�qWndS(Niu:ii(ulistuitemsu
isinstanceutupleuNoneuelementusetAttributeNSusetAttribute(uselfu
attributesunameuvalueu
qualifiedName((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
setAttributesSs

	u0getDomBuilder.<locals>.NodeBuilder.setAttributescs�|jjd��S(NF(uelementu	cloneNodeuFalse(uself(uNodeBuilder(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu	cloneNodebsu,getDomBuilder.<locals>.NodeBuilder.cloneNodecSs
|jj�S(N(uelementu
hasChildNodes(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
hasContentesu-getDomBuilder.<locals>.NodeBuilder.hasContentcSs4|jdkr td|jfS|j|jfSdS(Nuhtml(u	namespaceuNoneu
namespacesuname(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyugetNameTuplehsu/getDomBuilder.<locals>.NodeBuilder.getNameTupleN(u__name__u
__module__u__qualname__u__init__upropertyu	namespaceuappendChilduNoneu
insertTextuinsertBeforeuremoveChildureparentChildrenu
getAttributesu
setAttributesu
attributesu	cloneNodeu
hasContentugetNameTupleu	nameTuple(u
__locals__(uAttrListuNodeBuilder(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuNodeBuilder-s
uNodeBuildercs�|EeZdZ�fdd�Z��fdd�Zd�fdd�Z�fdd�Z�fd	d
�Zdd�Z	�fd
d�Z
dd�Zdd�Zddd�Z
�ZdZdS(u"getDomBuilder.<locals>.TreeBuildercs+�j�jddd�|_tj|�S(N(ugetDOMImplementationucreateDocumentuNoneudomuweakrefuproxy(uself(uDom(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
documentClassqsu0getDomBuilder.<locals>.TreeBuilder.documentClasscst|d}|d}|d}�j�}|j|||�}|jj�|���tkrp|j|_ndS(NunameupublicIdusystemId(ugetDOMImplementationucreateDocumentTypeudocumentuappendChilduminidomudomu
ownerDocument(uselfutokenunameupublicIdusystemIdudomimpludoctype(uDomuNodeBuilder(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
insertDoctypeus


u0getDomBuilder.<locals>.TreeBuilder.insertDoctypecsO|dkr0|jdkr0|jj|�}n|jj||�}�|�S(N(uNoneudefaultNamespaceudomu
createElementucreateElementNS(uselfunameu	namespaceunode(uNodeBuilder(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuelementClass�su/getDomBuilder.<locals>.TreeBuilder.elementClasscs�|jj|��S(N(udomu
createComment(uselfudata(uNodeBuilder(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyucommentClass�su/getDomBuilder.<locals>.TreeBuilder.commentClasscs�|jj��S(N(udomucreateDocumentFragment(uself(uNodeBuilder(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
fragmentClass�su0getDomBuilder.<locals>.TreeBuilder.fragmentClasscSs|jj|j�dS(N(udomuappendChilduelement(uselfunode((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuappendChild�su.getDomBuilder.<locals>.TreeBuilder.appendChildcs
�|�S(N((uselfuelement(utestSerializer(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyutestSerializer�su1getDomBuilder.<locals>.TreeBuilder.testSerializercSs|jS(N(udom(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyugetDocument�su.getDomBuilder.<locals>.TreeBuilder.getDocumentcSstjj|�jS(N(u_baseuTreeBuilderugetFragmentuelement(uself((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyugetFragment�su.getDomBuilder.<locals>.TreeBuilder.getFragmentcSs�|}||kr+tjj|||�nwt|jd�r�tj|jjkr�t|jj�|j_|jjj	tj�q�n|jj
|jj|��dS(Nu_child_node_types(u_baseuTreeBuilderu
insertTextuhasattrudomuNodeu	TEXT_NODEu_child_node_typesulistuappenduappendChilducreateTextNode(uselfudatauparent((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
insertText�su-getDomBuilder.<locals>.TreeBuilder.insertTextN(u__name__u
__module__u__qualname__u
documentClassu
insertDoctypeuNoneuelementClassucommentClassu
fragmentClassuappendChildutestSerializerugetDocumentugetFragmentu
insertTextuimplementationuname(u
__locals__(uDomuDomImplementationuNodeBuilderutestSerializer(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuTreeBuilderpsuTreeBuildercsB|j�g�d��fdd���|d�dj��S(Nic	s�|jtjkr�|jr�|js-|jrr|jp9d}|jpHd}�jdd||j||f�q��jdd||jf�q��jdd|f�n�|jtjkr��jd�n�|jtjkr��jd�n�|jtj	kr%�jdd||j
f�nu|jtjkrX�jd	d||j
f�nBt|d
�r�|j
dk	r�dtj|j
|jf}n	|j}�jdd||f�|j�r�g}x�tt|j��D]r}|jj|�}|j}|j}|j
}	|	r8dtj|	|jf}n	|j}|j||f�q�Wx?t|�D].\}}�jd
d|d||f�qeWn|d7}x|jD]}
�|
|�q�WdS(Nuu|%s<!DOCTYPE %s "%s" "%s">u u|%s<!DOCTYPE %s>u|%s<!DOCTYPE >u	#documentu#document-fragmentu|%s<!-- %s -->u|%s"%s"unamespaceURIu%s %su|%s<%s>u
|%s%s="%s"i(unodeTypeuNodeuDOCUMENT_TYPE_NODEunameupublicIdusystemIduappendu
DOCUMENT_NODEuDOCUMENT_FRAGMENT_NODEuCOMMENT_NODEu	nodeValueu	TEXT_NODEuhasattrunamespaceURIuNoneu	constantsuprefixesunodeNameu
hasAttributesurangeulenu
attributesuitemuvalueu	localNameusortedu
childNodes(uelementuindentupublicIdusystemIdunameu
attributesuiuattruvalueunsuchild(urvuserializeElement(u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyuserializeElement�sN		!!!					)
u?getDomBuilder.<locals>.testSerializer.<locals>.serializeElementu
(u	normalizeujoin(uelement((urvuserializeElementu>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyutestSerializer�s

.
u%getDomBuilder.<locals>.testSerializer(uobjectu_baseuNodeuTreeBuilderulocals(uDomImplementationuTreeBuilder((uAttrListuDomuDomImplementationuNodeBuilderutestSerializeru>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu
getDomBuilder
s"C(96u
getDomBuilder(u
__future__uabsolute_importudivisionuunicode_literalsuxml.domuminidomuNodeuweakrefuu_baseu	constantsu
namespacesuutilsumoduleFactoryFactoryu
getDomBuilderugetDomModule(((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treebuilders/dom.pyu<module>s�python3.3/site-packages/pip/_vendor/html5lib/treebuilders/_base.py000064400000032617151733566750021144 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

from ..constants import scopingElements, tableInsertModeElements, namespaces

# The scope markers are inserted when entering object elements,
# marquees, table cells, and table captions, and are used to prevent formatting
# from "leaking" into tables, object elements, and marquees.
Marker = None

listElementsMap = {
    None: (frozenset(scopingElements), False),
    "button": (frozenset(scopingElements | set([(namespaces["html"], "button")])), False),
    "list": (frozenset(scopingElements | set([(namespaces["html"], "ol"),
                                              (namespaces["html"], "ul")])), False),
    "table": (frozenset([(namespaces["html"], "html"),
                         (namespaces["html"], "table")]), False),
    "select": (frozenset([(namespaces["html"], "optgroup"),
                          (namespaces["html"], "option")]), True)
}


class Node(object):
    def __init__(self, name):
        """Node representing an item in the tree.
        name - The tag name associated with the node
        parent - The parent of the current node (or None for the document node)
        value - The value of the current node (applies to text nodes and
        comments
        attributes - a dict holding name, value pairs for attributes of the node
        childNodes - a list of child nodes of the current node. This must
        include all elements but not necessarily other node types
        _flags - A list of miscellaneous flags that can be set on the node
        """
        self.name = name
        self.parent = None
        self.value = None
        self.attributes = {}
        self.childNodes = []
        self._flags = []

    def __str__(self):
        attributesStr = " ".join(["%s=\"%s\"" % (name, value)
                                  for name, value in
                                  self.attributes.items()])
        if attributesStr:
            return "<%s %s>" % (self.name, attributesStr)
        else:
            return "<%s>" % (self.name)

    def __repr__(self):
        return "<%s>" % (self.name)

    def appendChild(self, node):
        """Insert node as a child of the current node
        """
        raise NotImplementedError

    def insertText(self, data, insertBefore=None):
        """Insert data as text in the current node, positioned before the
        start of node insertBefore or to the end of the node's text.
        """
        raise NotImplementedError

    def insertBefore(self, node, refNode):
        """Insert node as a child of the current node, before refNode in the
        list of child nodes. Raises ValueError if refNode is not a child of
        the current node"""
        raise NotImplementedError

    def removeChild(self, node):
        """Remove node from the children of the current node
        """
        raise NotImplementedError

    def reparentChildren(self, newParent):
        """Move all the children of the current node to newParent.
        This is needed so that trees that don't store text as nodes move the
        text in the correct way
        """
        # XXX - should this method be made more general?
        for child in self.childNodes:
            newParent.appendChild(child)
        self.childNodes = []

    def cloneNode(self):
        """Return a shallow copy of the current node i.e. a node with the same
        name and attributes but with no parent or child nodes
        """
        raise NotImplementedError

    def hasContent(self):
        """Return true if the node has children or text, false otherwise
        """
        raise NotImplementedError


class ActiveFormattingElements(list):
    def append(self, node):
        equalCount = 0
        if node != Marker:
            for element in self[::-1]:
                if element == Marker:
                    break
                if self.nodesEqual(element, node):
                    equalCount += 1
                if equalCount == 3:
                    self.remove(element)
                    break
        list.append(self, node)

    def nodesEqual(self, node1, node2):
        if not node1.nameTuple == node2.nameTuple:
            return False

        if not node1.attributes == node2.attributes:
            return False

        return True


class TreeBuilder(object):
    """Base treebuilder implementation
    documentClass - the class to use for the bottommost node of a document
    elementClass - the class to use for HTML Elements
    commentClass - the class to use for comments
    doctypeClass - the class to use for doctypes
    """

    # Document class
    documentClass = None

    # The class to use for creating a node
    elementClass = None

    # The class to use for creating comments
    commentClass = None

    # The class to use for creating doctypes
    doctypeClass = None

    # Fragment class
    fragmentClass = None

    def __init__(self, namespaceHTMLElements):
        if namespaceHTMLElements:
            self.defaultNamespace = "http://www.w3.org/1999/xhtml"
        else:
            self.defaultNamespace = None
        self.reset()

    def reset(self):
        self.openElements = []
        self.activeFormattingElements = ActiveFormattingElements()

        # XXX - rename these to headElement, formElement
        self.headPointer = None
        self.formPointer = None

        self.insertFromTable = False

        self.document = self.documentClass()

    def elementInScope(self, target, variant=None):

        # If we pass a node in we match that. if we pass a string
        # match any node with that name
        exactNode = hasattr(target, "nameTuple")

        listElements, invert = listElementsMap[variant]

        for node in reversed(self.openElements):
            if (node.name == target and not exactNode or
                    node == target and exactNode):
                return True
            elif (invert ^ (node.nameTuple in listElements)):
                return False

        assert False  # We should never reach this point

    def reconstructActiveFormattingElements(self):
        # Within this algorithm the order of steps described in the
        # specification is not quite the same as the order of steps in the
        # code. It should still do the same though.

        # Step 1: stop the algorithm when there's nothing to do.
        if not self.activeFormattingElements:
            return

        # Step 2 and step 3: we start with the last element. So i is -1.
        i = len(self.activeFormattingElements) - 1
        entry = self.activeFormattingElements[i]
        if entry == Marker or entry in self.openElements:
            return

        # Step 6
        while entry != Marker and entry not in self.openElements:
            if i == 0:
                # This will be reset to 0 below
                i = -1
                break
            i -= 1
            # Step 5: let entry be one earlier in the list.
            entry = self.activeFormattingElements[i]

        while True:
            # Step 7
            i += 1

            # Step 8
            entry = self.activeFormattingElements[i]
            clone = entry.cloneNode()  # Mainly to get a new copy of the attributes

            # Step 9
            element = self.insertElement({"type": "StartTag",
                                          "name": clone.name,
                                          "namespace": clone.namespace,
                                          "data": clone.attributes})

            # Step 10
            self.activeFormattingElements[i] = element

            # Step 11
            if element == self.activeFormattingElements[-1]:
                break

    def clearActiveFormattingElements(self):
        entry = self.activeFormattingElements.pop()
        while self.activeFormattingElements and entry != Marker:
            entry = self.activeFormattingElements.pop()

    def elementInActiveFormattingElements(self, name):
        """Check if an element exists between the end of the active
        formatting elements and the last marker. If it does, return it, else
        return false"""

        for item in self.activeFormattingElements[::-1]:
            # Check for Marker first because if it's a Marker it doesn't have a
            # name attribute.
            if item == Marker:
                break
            elif item.name == name:
                return item
        return False

    def insertRoot(self, token):
        element = self.createElement(token)
        self.openElements.append(element)
        self.document.appendChild(element)

    def insertDoctype(self, token):
        name = token["name"]
        publicId = token["publicId"]
        systemId = token["systemId"]

        doctype = self.doctypeClass(name, publicId, systemId)
        self.document.appendChild(doctype)

    def insertComment(self, token, parent=None):
        if parent is None:
            parent = self.openElements[-1]
        parent.appendChild(self.commentClass(token["data"]))

    def createElement(self, token):
        """Create an element but don't insert it anywhere"""
        name = token["name"]
        namespace = token.get("namespace", self.defaultNamespace)
        element = self.elementClass(name, namespace)
        element.attributes = token["data"]
        return element

    def _getInsertFromTable(self):
        return self._insertFromTable

    def _setInsertFromTable(self, value):
        """Switch the function used to insert an element from the
        normal one to the misnested table one and back again"""
        self._insertFromTable = value
        if value:
            self.insertElement = self.insertElementTable
        else:
            self.insertElement = self.insertElementNormal

    insertFromTable = property(_getInsertFromTable, _setInsertFromTable)

    def insertElementNormal(self, token):
        name = token["name"]
        assert isinstance(name, text_type), "Element %s not unicode" % name
        namespace = token.get("namespace", self.defaultNamespace)
        element = self.elementClass(name, namespace)
        element.attributes = token["data"]
        self.openElements[-1].appendChild(element)
        self.openElements.append(element)
        return element

    def insertElementTable(self, token):
        """Create an element and insert it into the tree"""
        element = self.createElement(token)
        if self.openElements[-1].name not in tableInsertModeElements:
            return self.insertElementNormal(token)
        else:
            # We should be in the InTable mode. This means we want to do
            # special magic element rearranging
            parent, insertBefore = self.getTableMisnestedNodePosition()
            if insertBefore is None:
                parent.appendChild(element)
            else:
                parent.insertBefore(element, insertBefore)
            self.openElements.append(element)
        return element

    def insertText(self, data, parent=None):
        """Insert text data."""
        if parent is None:
            parent = self.openElements[-1]

        if (not self.insertFromTable or (self.insertFromTable and
                                         self.openElements[-1].name
                                         not in tableInsertModeElements)):
            parent.insertText(data)
        else:
            # We should be in the InTable mode. This means we want to do
            # special magic element rearranging
            parent, insertBefore = self.getTableMisnestedNodePosition()
            parent.insertText(data, insertBefore)

    def getTableMisnestedNodePosition(self):
        """Get the foster parent element, and sibling to insert before
        (or None) when inserting a misnested table node"""
        # The foster parent element is the one which comes before the most
        # recently opened table element
        # XXX - this is really inelegant
        lastTable = None
        fosterParent = None
        insertBefore = None
        for elm in self.openElements[::-1]:
            if elm.name == "table":
                lastTable = elm
                break
        if lastTable:
            # XXX - we should really check that this parent is actually a
            # node here
            if lastTable.parent:
                fosterParent = lastTable.parent
                insertBefore = lastTable
            else:
                fosterParent = self.openElements[
                    self.openElements.index(lastTable) - 1]
        else:
            fosterParent = self.openElements[0]
        return fosterParent, insertBefore

    def generateImpliedEndTags(self, exclude=None):
        name = self.openElements[-1].name
        # XXX td, th and tr are not actually needed
        if (name in frozenset(("dd", "dt", "li", "option", "optgroup", "p", "rp", "rt"))
                and name != exclude):
            self.openElements.pop()
            # XXX This is not entirely what the specification says. We should
            # investigate it more closely.
            self.generateImpliedEndTags(exclude)

    def getDocument(self):
        "Return the final tree"
        return self.document

    def getFragment(self):
        "Return the final fragment"
        # assert self.innerHTML
        fragment = self.fragmentClass()
        self.openElements[0].reparentChildren(fragment)
        return fragment

    def testSerializer(self, node):
        """Serialize the subtree of node in the format required by unit tests
        node - the node from which to start serializing"""
        raise NotImplementedError
python3.3/site-packages/pip/_vendor/html5lib/treebuilders/dom.py000064400000020425151733566750020644 0ustar00from __future__ import absolute_import, division, unicode_literals


from xml.dom import minidom, Node
import weakref

from . import _base
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory


def getDomBuilder(DomImplementation):
    Dom = DomImplementation

    class AttrList(object):
        def __init__(self, element):
            self.element = element

        def __iter__(self):
            return list(self.element.attributes.items()).__iter__()

        def __setitem__(self, name, value):
            self.element.setAttribute(name, value)

        def __len__(self):
            return len(list(self.element.attributes.items()))

        def items(self):
            return [(item[0], item[1]) for item in
                    list(self.element.attributes.items())]

        def keys(self):
            return list(self.element.attributes.keys())

        def __getitem__(self, name):
            return self.element.getAttribute(name)

        def __contains__(self, name):
            if isinstance(name, tuple):
                raise NotImplementedError
            else:
                return self.element.hasAttribute(name)

    class NodeBuilder(_base.Node):
        def __init__(self, element):
            _base.Node.__init__(self, element.nodeName)
            self.element = element

        namespace = property(lambda self: hasattr(self.element, "namespaceURI")
                             and self.element.namespaceURI or None)

        def appendChild(self, node):
            node.parent = self
            self.element.appendChild(node.element)

        def insertText(self, data, insertBefore=None):
            text = self.element.ownerDocument.createTextNode(data)
            if insertBefore:
                self.element.insertBefore(text, insertBefore.element)
            else:
                self.element.appendChild(text)

        def insertBefore(self, node, refNode):
            self.element.insertBefore(node.element, refNode.element)
            node.parent = self

        def removeChild(self, node):
            if node.element.parentNode == self.element:
                self.element.removeChild(node.element)
            node.parent = None

        def reparentChildren(self, newParent):
            while self.element.hasChildNodes():
                child = self.element.firstChild
                self.element.removeChild(child)
                newParent.element.appendChild(child)
            self.childNodes = []

        def getAttributes(self):
            return AttrList(self.element)

        def setAttributes(self, attributes):
            if attributes:
                for name, value in list(attributes.items()):
                    if isinstance(name, tuple):
                        if name[0] is not None:
                            qualifiedName = (name[0] + ":" + name[1])
                        else:
                            qualifiedName = name[1]
                        self.element.setAttributeNS(name[2], qualifiedName,
                                                    value)
                    else:
                        self.element.setAttribute(
                            name, value)
        attributes = property(getAttributes, setAttributes)

        def cloneNode(self):
            return NodeBuilder(self.element.cloneNode(False))

        def hasContent(self):
            return self.element.hasChildNodes()

        def getNameTuple(self):
            if self.namespace is None:
                return namespaces["html"], self.name
            else:
                return self.namespace, self.name

        nameTuple = property(getNameTuple)

    class TreeBuilder(_base.TreeBuilder):
        def documentClass(self):
            self.dom = Dom.getDOMImplementation().createDocument(None, None, None)
            return weakref.proxy(self)

        def insertDoctype(self, token):
            name = token["name"]
            publicId = token["publicId"]
            systemId = token["systemId"]

            domimpl = Dom.getDOMImplementation()
            doctype = domimpl.createDocumentType(name, publicId, systemId)
            self.document.appendChild(NodeBuilder(doctype))
            if Dom == minidom:
                doctype.ownerDocument = self.dom

        def elementClass(self, name, namespace=None):
            if namespace is None and self.defaultNamespace is None:
                node = self.dom.createElement(name)
            else:
                node = self.dom.createElementNS(namespace, name)

            return NodeBuilder(node)

        def commentClass(self, data):
            return NodeBuilder(self.dom.createComment(data))

        def fragmentClass(self):
            return NodeBuilder(self.dom.createDocumentFragment())

        def appendChild(self, node):
            self.dom.appendChild(node.element)

        def testSerializer(self, element):
            return testSerializer(element)

        def getDocument(self):
            return self.dom

        def getFragment(self):
            return _base.TreeBuilder.getFragment(self).element

        def insertText(self, data, parent=None):
            data = data
            if parent != self:
                _base.TreeBuilder.insertText(self, data, parent)
            else:
                # HACK: allow text nodes as children of the document node
                if hasattr(self.dom, '_child_node_types'):
                    if not Node.TEXT_NODE in self.dom._child_node_types:
                        self.dom._child_node_types = list(self.dom._child_node_types)
                        self.dom._child_node_types.append(Node.TEXT_NODE)
                self.dom.appendChild(self.dom.createTextNode(data))

        implementation = DomImplementation
        name = None

    def testSerializer(element):
        element.normalize()
        rv = []

        def serializeElement(element, indent=0):
            if element.nodeType == Node.DOCUMENT_TYPE_NODE:
                if element.name:
                    if element.publicId or element.systemId:
                        publicId = element.publicId or ""
                        systemId = element.systemId or ""
                        rv.append("""|%s<!DOCTYPE %s "%s" "%s">""" %
                                  (' ' * indent, element.name, publicId, systemId))
                    else:
                        rv.append("|%s<!DOCTYPE %s>" % (' ' * indent, element.name))
                else:
                    rv.append("|%s<!DOCTYPE >" % (' ' * indent,))
            elif element.nodeType == Node.DOCUMENT_NODE:
                rv.append("#document")
            elif element.nodeType == Node.DOCUMENT_FRAGMENT_NODE:
                rv.append("#document-fragment")
            elif element.nodeType == Node.COMMENT_NODE:
                rv.append("|%s<!-- %s -->" % (' ' * indent, element.nodeValue))
            elif element.nodeType == Node.TEXT_NODE:
                rv.append("|%s\"%s\"" % (' ' * indent, element.nodeValue))
            else:
                if (hasattr(element, "namespaceURI") and
                        element.namespaceURI is not None):
                    name = "%s %s" % (constants.prefixes[element.namespaceURI],
                                      element.nodeName)
                else:
                    name = element.nodeName
                rv.append("|%s<%s>" % (' ' * indent, name))
                if element.hasAttributes():
                    attributes = []
                    for i in range(len(element.attributes)):
                        attr = element.attributes.item(i)
                        name = attr.nodeName
                        value = attr.value
                        ns = attr.namespaceURI
                        if ns:
                            name = "%s %s" % (constants.prefixes[ns], attr.localName)
                        else:
                            name = attr.nodeName
                        attributes.append((name, value))

                    for name, value in sorted(attributes):
                        rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))
            indent += 2
            for child in element.childNodes:
                serializeElement(child, indent)
        serializeElement(element, 0)

        return "\n".join(rv)

    return locals()


# The actual means to get a module!
getDomModule = moduleFactoryFactory(getDomBuilder)
python3.3/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py000064400000006515151733566750021630 0ustar00"""A collection of modules for building different kinds of tree from
HTML documents.

To create a treebuilder for a new type of tree, you need to do
implement several things:

1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders.Node (although comment nodes have a different
signature for their constructor, see treebuilders.etree.Comment)
Textual content may also be implemented as another node type, or not, as
your tree implementation requires.

2) A treebuilder object (called TreeBuilder by convention) that
inherits from treebuilders._base.TreeBuilder. This has 4 required attributes:
documentClass - the class to use for the bottommost node of a document
elementClass - the class to use for HTML Elements
commentClass - the class to use for comments
doctypeClass - the class to use for doctypes
It also has one required method:
getDocument - Returns the root node of the complete document tree

3) If you wish to run the unit tests, you must also create a
testSerializer method on your treebuilder which accepts a node and
returns a string containing Node and its children serialized according
to the format used in the unittests
"""

from __future__ import absolute_import, division, unicode_literals

from ..utils import default_etree

treeBuilderCache = {}


def getTreeBuilder(treeType, implementation=None, **kwargs):
    """Get a TreeBuilder class for various types of tree with built-in support

    treeType - the name of the tree type required (case-insensitive). Supported
               values are:

               "dom" - A generic builder for DOM implementations, defaulting to
                       a xml.dom.minidom based implementation.
               "etree" - A generic builder for tree implementations exposing an
                         ElementTree-like interface, defaulting to
                         xml.etree.cElementTree if available and
                         xml.etree.ElementTree if not.
               "lxml" - A etree-based builder for lxml.etree, handling
                        limitations of lxml's implementation.

    implementation - (Currently applies to the "etree" and "dom" tree types). A
                      module implementing the tree type e.g.
                      xml.etree.ElementTree or xml.etree.cElementTree."""

    treeType = treeType.lower()
    if treeType not in treeBuilderCache:
        if treeType == "dom":
            from . import dom
            # Come up with a sane default (pref. from the stdlib)
            if implementation is None:
                from xml.dom import minidom
                implementation = minidom
            # NEVER cache here, caching is done in the dom submodule
            return dom.getDomModule(implementation, **kwargs).TreeBuilder
        elif treeType == "lxml":
            from . import etree_lxml
            treeBuilderCache[treeType] = etree_lxml.TreeBuilder
        elif treeType == "etree":
            from . import etree
            if implementation is None:
                implementation = default_etree
            # NEVER cache here, caching is done in the etree submodule
            return etree.getETreeModule(implementation, **kwargs).TreeBuilder
        else:
            raise ValueError("""Unrecognised treebuilder "%s" """ % treeType)
    return treeBuilderCache.get(treeType)
python3.3/site-packages/pip/_vendor/html5lib/treebuilders/etree.py000064400000030515151733566750021172 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

import re

from . import _base
from .. import ihatexml
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory

tag_regexp = re.compile("{([^}]*)}(.*)")


def getETreeBuilder(ElementTreeImplementation, fullTree=False):
    ElementTree = ElementTreeImplementation
    ElementTreeCommentType = ElementTree.Comment("asd").tag

    class Element(_base.Node):
        def __init__(self, name, namespace=None):
            self._name = name
            self._namespace = namespace
            self._element = ElementTree.Element(self._getETreeTag(name,
                                                                  namespace))
            if namespace is None:
                self.nameTuple = namespaces["html"], self._name
            else:
                self.nameTuple = self._namespace, self._name
            self.parent = None
            self._childNodes = []
            self._flags = []

        def _getETreeTag(self, name, namespace):
            if namespace is None:
                etree_tag = name
            else:
                etree_tag = "{%s}%s" % (namespace, name)
            return etree_tag

        def _setName(self, name):
            self._name = name
            self._element.tag = self._getETreeTag(self._name, self._namespace)

        def _getName(self):
            return self._name

        name = property(_getName, _setName)

        def _setNamespace(self, namespace):
            self._namespace = namespace
            self._element.tag = self._getETreeTag(self._name, self._namespace)

        def _getNamespace(self):
            return self._namespace

        namespace = property(_getNamespace, _setNamespace)

        def _getAttributes(self):
            return self._element.attrib

        def _setAttributes(self, attributes):
            # Delete existing attributes first
            # XXX - there may be a better way to do this...
            for key in list(self._element.attrib.keys()):
                del self._element.attrib[key]
            for key, value in attributes.items():
                if isinstance(key, tuple):
                    name = "{%s}%s" % (key[2], key[1])
                else:
                    name = key
                self._element.set(name, value)

        attributes = property(_getAttributes, _setAttributes)

        def _getChildNodes(self):
            return self._childNodes

        def _setChildNodes(self, value):
            del self._element[:]
            self._childNodes = []
            for element in value:
                self.insertChild(element)

        childNodes = property(_getChildNodes, _setChildNodes)

        def hasContent(self):
            """Return true if the node has children or text"""
            return bool(self._element.text or len(self._element))

        def appendChild(self, node):
            self._childNodes.append(node)
            self._element.append(node._element)
            node.parent = self

        def insertBefore(self, node, refNode):
            index = list(self._element).index(refNode._element)
            self._element.insert(index, node._element)
            node.parent = self

        def removeChild(self, node):
            self._element.remove(node._element)
            node.parent = None

        def insertText(self, data, insertBefore=None):
            if not(len(self._element)):
                if not self._element.text:
                    self._element.text = ""
                self._element.text += data
            elif insertBefore is None:
                # Insert the text as the tail of the last child element
                if not self._element[-1].tail:
                    self._element[-1].tail = ""
                self._element[-1].tail += data
            else:
                # Insert the text before the specified node
                children = list(self._element)
                index = children.index(insertBefore._element)
                if index > 0:
                    if not self._element[index - 1].tail:
                        self._element[index - 1].tail = ""
                    self._element[index - 1].tail += data
                else:
                    if not self._element.text:
                        self._element.text = ""
                    self._element.text += data

        def cloneNode(self):
            element = type(self)(self.name, self.namespace)
            for name, value in self.attributes.items():
                element.attributes[name] = value
            return element

        def reparentChildren(self, newParent):
            if newParent.childNodes:
                newParent.childNodes[-1]._element.tail += self._element.text
            else:
                if not newParent._element.text:
                    newParent._element.text = ""
                if self._element.text is not None:
                    newParent._element.text += self._element.text
            self._element.text = ""
            _base.Node.reparentChildren(self, newParent)

    class Comment(Element):
        def __init__(self, data):
            # Use the superclass constructor to set all properties on the
            # wrapper element
            self._element = ElementTree.Comment(data)
            self.parent = None
            self._childNodes = []
            self._flags = []

        def _getData(self):
            return self._element.text

        def _setData(self, value):
            self._element.text = value

        data = property(_getData, _setData)

    class DocumentType(Element):
        def __init__(self, name, publicId, systemId):
            Element.__init__(self, "<!DOCTYPE>")
            self._element.text = name
            self.publicId = publicId
            self.systemId = systemId

        def _getPublicId(self):
            return self._element.get("publicId", "")

        def _setPublicId(self, value):
            if value is not None:
                self._element.set("publicId", value)

        publicId = property(_getPublicId, _setPublicId)

        def _getSystemId(self):
            return self._element.get("systemId", "")

        def _setSystemId(self, value):
            if value is not None:
                self._element.set("systemId", value)

        systemId = property(_getSystemId, _setSystemId)

    class Document(Element):
        def __init__(self):
            Element.__init__(self, "DOCUMENT_ROOT")

    class DocumentFragment(Element):
        def __init__(self):
            Element.__init__(self, "DOCUMENT_FRAGMENT")

    def testSerializer(element):
        rv = []

        def serializeElement(element, indent=0):
            if not(hasattr(element, "tag")):
                element = element.getroot()
            if element.tag == "<!DOCTYPE>":
                if element.get("publicId") or element.get("systemId"):
                    publicId = element.get("publicId") or ""
                    systemId = element.get("systemId") or ""
                    rv.append("""<!DOCTYPE %s "%s" "%s">""" %
                              (element.text, publicId, systemId))
                else:
                    rv.append("<!DOCTYPE %s>" % (element.text,))
            elif element.tag == "DOCUMENT_ROOT":
                rv.append("#document")
                if element.text is not None:
                    rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
                if element.tail is not None:
                    raise TypeError("Document node cannot have tail")
                if hasattr(element, "attrib") and len(element.attrib):
                    raise TypeError("Document node cannot have attributes")
            elif element.tag == ElementTreeCommentType:
                rv.append("|%s<!-- %s -->" % (' ' * indent, element.text))
            else:
                assert isinstance(element.tag, text_type), \
                    "Expected unicode, got %s, %s" % (type(element.tag), element.tag)
                nsmatch = tag_regexp.match(element.tag)

                if nsmatch is None:
                    name = element.tag
                else:
                    ns, name = nsmatch.groups()
                    prefix = constants.prefixes[ns]
                    name = "%s %s" % (prefix, name)
                rv.append("|%s<%s>" % (' ' * indent, name))

                if hasattr(element, "attrib"):
                    attributes = []
                    for name, value in element.attrib.items():
                        nsmatch = tag_regexp.match(name)
                        if nsmatch is not None:
                            ns, name = nsmatch.groups()
                            prefix = constants.prefixes[ns]
                            attr_string = "%s %s" % (prefix, name)
                        else:
                            attr_string = name
                        attributes.append((attr_string, value))

                    for name, value in sorted(attributes):
                        rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))
                if element.text:
                    rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
            indent += 2
            for child in element:
                serializeElement(child, indent)
            if element.tail:
                rv.append("|%s\"%s\"" % (' ' * (indent - 2), element.tail))
        serializeElement(element, 0)

        return "\n".join(rv)

    def tostring(element):
        """Serialize an element and its child nodes to a string"""
        rv = []
        filter = ihatexml.InfosetFilter()

        def serializeElement(element):
            if isinstance(element, ElementTree.ElementTree):
                element = element.getroot()

            if element.tag == "<!DOCTYPE>":
                if element.get("publicId") or element.get("systemId"):
                    publicId = element.get("publicId") or ""
                    systemId = element.get("systemId") or ""
                    rv.append("""<!DOCTYPE %s PUBLIC "%s" "%s">""" %
                              (element.text, publicId, systemId))
                else:
                    rv.append("<!DOCTYPE %s>" % (element.text,))
            elif element.tag == "DOCUMENT_ROOT":
                if element.text is not None:
                    rv.append(element.text)
                if element.tail is not None:
                    raise TypeError("Document node cannot have tail")
                if hasattr(element, "attrib") and len(element.attrib):
                    raise TypeError("Document node cannot have attributes")

                for child in element:
                    serializeElement(child)

            elif element.tag == ElementTreeCommentType:
                rv.append("<!--%s-->" % (element.text,))
            else:
                # This is assumed to be an ordinary element
                if not element.attrib:
                    rv.append("<%s>" % (filter.fromXmlName(element.tag),))
                else:
                    attr = " ".join(["%s=\"%s\"" % (
                        filter.fromXmlName(name), value)
                        for name, value in element.attrib.items()])
                    rv.append("<%s %s>" % (element.tag, attr))
                if element.text:
                    rv.append(element.text)

                for child in element:
                    serializeElement(child)

                rv.append("</%s>" % (element.tag,))

            if element.tail:
                rv.append(element.tail)

        serializeElement(element)

        return "".join(rv)

    class TreeBuilder(_base.TreeBuilder):
        documentClass = Document
        doctypeClass = DocumentType
        elementClass = Element
        commentClass = Comment
        fragmentClass = DocumentFragment
        implementation = ElementTreeImplementation

        def testSerializer(self, element):
            return testSerializer(element)

        def getDocument(self):
            if fullTree:
                return self.document._element
            else:
                if self.defaultNamespace is not None:
                    return self.document._element.find(
                        "{%s}html" % self.defaultNamespace)
                else:
                    return self.document._element.find("html")

        def getFragment(self):
            return _base.TreeBuilder.getFragment(self)._element

    return locals()


getETreeModule = moduleFactoryFactory(getETreeBuilder)
python3.3/site-packages/pip/_vendor/html5lib/sanitizer.py000064400000040054151733566750017404 0ustar00from __future__ import absolute_import, division, unicode_literals

import re
from xml.sax.saxutils import escape, unescape

from .tokenizer import HTMLTokenizer
from .constants import tokenTypes


class HTMLSanitizerMixin(object):
    """ sanitization of XHTML+MathML+SVG and of inline style attributes."""

    acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area',
                           'article', 'aside', 'audio', 'b', 'big', 'blockquote', 'br', 'button',
                           'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup',
                           'command', 'datagrid', 'datalist', 'dd', 'del', 'details', 'dfn',
                           'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'event-source', 'fieldset',
                           'figcaption', 'figure', 'footer', 'font', 'form', 'header', 'h1',
                           'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'input', 'ins',
                           'keygen', 'kbd', 'label', 'legend', 'li', 'm', 'map', 'menu', 'meter',
                           'multicol', 'nav', 'nextid', 'ol', 'output', 'optgroup', 'option',
                           'p', 'pre', 'progress', 'q', 's', 'samp', 'section', 'select',
                           'small', 'sound', 'source', 'spacer', 'span', 'strike', 'strong',
                           'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'time', 'tfoot',
                           'th', 'thead', 'tr', 'tt', 'u', 'ul', 'var', 'video']

    mathml_elements = ['maction', 'math', 'merror', 'mfrac', 'mi',
                       'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom',
                       'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', 'msub',
                       'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder',
                       'munderover', 'none']

    svg_elements = ['a', 'animate', 'animateColor', 'animateMotion',
                    'animateTransform', 'clipPath', 'circle', 'defs', 'desc', 'ellipse',
                    'font-face', 'font-face-name', 'font-face-src', 'g', 'glyph', 'hkern',
                    'linearGradient', 'line', 'marker', 'metadata', 'missing-glyph',
                    'mpath', 'path', 'polygon', 'polyline', 'radialGradient', 'rect',
                    'set', 'stop', 'svg', 'switch', 'text', 'title', 'tspan', 'use']

    acceptable_attributes = ['abbr', 'accept', 'accept-charset', 'accesskey',
                             'action', 'align', 'alt', 'autocomplete', 'autofocus', 'axis',
                             'background', 'balance', 'bgcolor', 'bgproperties', 'border',
                             'bordercolor', 'bordercolordark', 'bordercolorlight', 'bottompadding',
                             'cellpadding', 'cellspacing', 'ch', 'challenge', 'char', 'charoff',
                             'choff', 'charset', 'checked', 'cite', 'class', 'clear', 'color',
                             'cols', 'colspan', 'compact', 'contenteditable', 'controls', 'coords',
                             'data', 'datafld', 'datapagesize', 'datasrc', 'datetime', 'default',
                             'delay', 'dir', 'disabled', 'draggable', 'dynsrc', 'enctype', 'end',
                             'face', 'for', 'form', 'frame', 'galleryimg', 'gutter', 'headers',
                             'height', 'hidefocus', 'hidden', 'high', 'href', 'hreflang', 'hspace',
                             'icon', 'id', 'inputmode', 'ismap', 'keytype', 'label', 'leftspacing',
                             'lang', 'list', 'longdesc', 'loop', 'loopcount', 'loopend',
                             'loopstart', 'low', 'lowsrc', 'max', 'maxlength', 'media', 'method',
                             'min', 'multiple', 'name', 'nohref', 'noshade', 'nowrap', 'open',
                             'optimum', 'pattern', 'ping', 'point-size', 'poster', 'pqg', 'preload',
                             'prompt', 'radiogroup', 'readonly', 'rel', 'repeat-max', 'repeat-min',
                             'replace', 'required', 'rev', 'rightspacing', 'rows', 'rowspan',
                             'rules', 'scope', 'selected', 'shape', 'size', 'span', 'src', 'start',
                             'step', 'style', 'summary', 'suppress', 'tabindex', 'target',
                             'template', 'title', 'toppadding', 'type', 'unselectable', 'usemap',
                             'urn', 'valign', 'value', 'variable', 'volume', 'vspace', 'vrml',
                             'width', 'wrap', 'xml:lang']

    mathml_attributes = ['actiontype', 'align', 'columnalign', 'columnalign',
                         'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'depth',
                         'display', 'displaystyle', 'equalcolumns', 'equalrows', 'fence',
                         'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', 'lspace',
                         'mathbackground', 'mathcolor', 'mathvariant', 'mathvariant', 'maxsize',
                         'minsize', 'other', 'rowalign', 'rowalign', 'rowalign', 'rowlines',
                         'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection',
                         'separator', 'stretchy', 'width', 'width', 'xlink:href', 'xlink:show',
                         'xlink:type', 'xmlns', 'xmlns:xlink']

    svg_attributes = ['accent-height', 'accumulate', 'additive', 'alphabetic',
                      'arabic-form', 'ascent', 'attributeName', 'attributeType',
                      'baseProfile', 'bbox', 'begin', 'by', 'calcMode', 'cap-height',
                      'class', 'clip-path', 'color', 'color-rendering', 'content', 'cx',
                      'cy', 'd', 'dx', 'dy', 'descent', 'display', 'dur', 'end', 'fill',
                      'fill-opacity', 'fill-rule', 'font-family', 'font-size',
                      'font-stretch', 'font-style', 'font-variant', 'font-weight', 'from',
                      'fx', 'fy', 'g1', 'g2', 'glyph-name', 'gradientUnits', 'hanging',
                      'height', 'horiz-adv-x', 'horiz-origin-x', 'id', 'ideographic', 'k',
                      'keyPoints', 'keySplines', 'keyTimes', 'lang', 'marker-end',
                      'marker-mid', 'marker-start', 'markerHeight', 'markerUnits',
                      'markerWidth', 'mathematical', 'max', 'min', 'name', 'offset',
                      'opacity', 'orient', 'origin', 'overline-position',
                      'overline-thickness', 'panose-1', 'path', 'pathLength', 'points',
                      'preserveAspectRatio', 'r', 'refX', 'refY', 'repeatCount',
                      'repeatDur', 'requiredExtensions', 'requiredFeatures', 'restart',
                      'rotate', 'rx', 'ry', 'slope', 'stemh', 'stemv', 'stop-color',
                      'stop-opacity', 'strikethrough-position', 'strikethrough-thickness',
                      'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap',
                      'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity',
                      'stroke-width', 'systemLanguage', 'target', 'text-anchor', 'to',
                      'transform', 'type', 'u1', 'u2', 'underline-position',
                      'underline-thickness', 'unicode', 'unicode-range', 'units-per-em',
                      'values', 'version', 'viewBox', 'visibility', 'width', 'widths', 'x',
                      'x-height', 'x1', 'x2', 'xlink:actuate', 'xlink:arcrole',
                      'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type',
                      'xml:base', 'xml:lang', 'xml:space', 'xmlns', 'xmlns:xlink', 'y',
                      'y1', 'y2', 'zoomAndPan']

    attr_val_is_uri = ['href', 'src', 'cite', 'action', 'longdesc', 'poster',
                       'xlink:href', 'xml:base']

    svg_attr_val_allows_ref = ['clip-path', 'color-profile', 'cursor', 'fill',
                               'filter', 'marker', 'marker-start', 'marker-mid', 'marker-end',
                               'mask', 'stroke']

    svg_allow_local_href = ['altGlyph', 'animate', 'animateColor',
                            'animateMotion', 'animateTransform', 'cursor', 'feImage', 'filter',
                            'linearGradient', 'pattern', 'radialGradient', 'textpath', 'tref',
                            'set', 'use']

    acceptable_css_properties = ['azimuth', 'background-color',
                                 'border-bottom-color', 'border-collapse', 'border-color',
                                 'border-left-color', 'border-right-color', 'border-top-color', 'clear',
                                 'color', 'cursor', 'direction', 'display', 'elevation', 'float', 'font',
                                 'font-family', 'font-size', 'font-style', 'font-variant', 'font-weight',
                                 'height', 'letter-spacing', 'line-height', 'overflow', 'pause',
                                 'pause-after', 'pause-before', 'pitch', 'pitch-range', 'richness',
                                 'speak', 'speak-header', 'speak-numeral', 'speak-punctuation',
                                 'speech-rate', 'stress', 'text-align', 'text-decoration', 'text-indent',
                                 'unicode-bidi', 'vertical-align', 'voice-family', 'volume',
                                 'white-space', 'width']

    acceptable_css_keywords = ['auto', 'aqua', 'black', 'block', 'blue',
                               'bold', 'both', 'bottom', 'brown', 'center', 'collapse', 'dashed',
                               'dotted', 'fuchsia', 'gray', 'green', '!important', 'italic', 'left',
                               'lime', 'maroon', 'medium', 'none', 'navy', 'normal', 'nowrap', 'olive',
                               'pointer', 'purple', 'red', 'right', 'solid', 'silver', 'teal', 'top',
                               'transparent', 'underline', 'white', 'yellow']

    acceptable_svg_properties = ['fill', 'fill-opacity', 'fill-rule',
                                 'stroke', 'stroke-width', 'stroke-linecap', 'stroke-linejoin',
                                 'stroke-opacity']

    acceptable_protocols = ['ed2k', 'ftp', 'http', 'https', 'irc',
                            'mailto', 'news', 'gopher', 'nntp', 'telnet', 'webcal',
                            'xmpp', 'callto', 'feed', 'urn', 'aim', 'rsync', 'tag',
                            'ssh', 'sftp', 'rtsp', 'afs']

    # subclasses may define their own versions of these constants
    allowed_elements = acceptable_elements + mathml_elements + svg_elements
    allowed_attributes = acceptable_attributes + mathml_attributes + svg_attributes
    allowed_css_properties = acceptable_css_properties
    allowed_css_keywords = acceptable_css_keywords
    allowed_svg_properties = acceptable_svg_properties
    allowed_protocols = acceptable_protocols

    # Sanitize the +html+, escaping all elements not in ALLOWED_ELEMENTS, and
    # stripping out all # attributes not in ALLOWED_ATTRIBUTES. Style
    # attributes are parsed, and a restricted set, # specified by
    # ALLOWED_CSS_PROPERTIES and ALLOWED_CSS_KEYWORDS, are allowed through.
    # attributes in ATTR_VAL_IS_URI are scanned, and only URI schemes specified
    # in ALLOWED_PROTOCOLS are allowed.
    #
    #   sanitize_html('<script> do_nasty_stuff() </script>')
    #    => &lt;script> do_nasty_stuff() &lt;/script>
    #   sanitize_html('<a href="javascript: sucker();">Click here for $100</a>')
    #    => <a>Click here for $100</a>
    def sanitize_token(self, token):

        # accommodate filters which use token_type differently
        token_type = token["type"]
        if token_type in list(tokenTypes.keys()):
            token_type = tokenTypes[token_type]

        if token_type in (tokenTypes["StartTag"], tokenTypes["EndTag"],
                          tokenTypes["EmptyTag"]):
            if token["name"] in self.allowed_elements:
                return self.allowed_token(token, token_type)
            else:
                return self.disallowed_token(token, token_type)
        elif token_type == tokenTypes["Comment"]:
            pass
        else:
            return token

    def allowed_token(self, token, token_type):
        if "data" in token:
            attrs = dict([(name, val) for name, val in
                          token["data"][::-1]
                          if name in self.allowed_attributes])
            for attr in self.attr_val_is_uri:
                if attr not in attrs:
                    continue
                val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '',
                                       unescape(attrs[attr])).lower()
                # remove replacement characters from unescaped characters
                val_unescaped = val_unescaped.replace("\ufffd", "")
                if (re.match("^[a-z0-9][-+.a-z0-9]*:", val_unescaped) and
                    (val_unescaped.split(':')[0] not in
                     self.allowed_protocols)):
                    del attrs[attr]
            for attr in self.svg_attr_val_allows_ref:
                if attr in attrs:
                    attrs[attr] = re.sub(r'url\s*\(\s*[^#\s][^)]+?\)',
                                         ' ',
                                         unescape(attrs[attr]))
            if (token["name"] in self.svg_allow_local_href and
                'xlink:href' in attrs and re.search('^\s*[^#\s].*',
                                                    attrs['xlink:href'])):
                del attrs['xlink:href']
            if 'style' in attrs:
                attrs['style'] = self.sanitize_css(attrs['style'])
            token["data"] = [[name, val] for name, val in list(attrs.items())]
        return token

    def disallowed_token(self, token, token_type):
        if token_type == tokenTypes["EndTag"]:
            token["data"] = "</%s>" % token["name"]
        elif token["data"]:
            attrs = ''.join([' %s="%s"' % (k, escape(v)) for k, v in token["data"]])
            token["data"] = "<%s%s>" % (token["name"], attrs)
        else:
            token["data"] = "<%s>" % token["name"]
        if token.get("selfClosing"):
            token["data"] = token["data"][:-1] + "/>"

        if token["type"] in list(tokenTypes.keys()):
            token["type"] = "Characters"
        else:
            token["type"] = tokenTypes["Characters"]

        del token["name"]
        return token

    def sanitize_css(self, style):
        # disallow urls
        style = re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style)

        # gauntlet
        if not re.match("""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style):
            return ''
        if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style):
            return ''

        clean = []
        for prop, value in re.findall("([-\w]+)\s*:\s*([^:;]*)", style):
            if not value:
                continue
            if prop.lower() in self.allowed_css_properties:
                clean.append(prop + ': ' + value + ';')
            elif prop.split('-')[0].lower() in ['background', 'border', 'margin',
                                                'padding']:
                for keyword in value.split():
                    if not keyword in self.acceptable_css_keywords and \
                            not re.match("^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$", keyword):
                        break
                else:
                    clean.append(prop + ': ' + value + ';')
            elif prop.lower() in self.allowed_svg_properties:
                clean.append(prop + ': ' + value + ';')

        return ' '.join(clean)


class HTMLSanitizer(HTMLTokenizer, HTMLSanitizerMixin):
    def __init__(self, stream, encoding=None, parseMeta=True, useChardet=True,
                 lowercaseElementName=False, lowercaseAttrName=False, parser=None):
        # Change case matching defaults as we only output lowercase html anyway
        # This solution doesn't seem ideal...
        HTMLTokenizer.__init__(self, stream, encoding, parseMeta, useChardet,
                               lowercaseElementName, lowercaseAttrName, parser=parser)

    def __iter__(self):
        for token in HTMLTokenizer.__iter__(self):
            token = self.sanitize_token(token)
            if token:
                yield token
python3.3/site-packages/pip/_vendor/html5lib/__pycache__/ihatexml.cpython-33.pyc000064400000042214151733566750023470 0ustar00�
7�Re�@c@slddlmZmZmZddlZddlZddlmZdZdZ	dZ
dZd	Zd
j
ee	g�Zd
j
eeddd
e
eg�Zd
j
ed
g�Zejd�Zejd�Zdd�Zdd�Zedd�Zdd�Zdd�Zdd�Zdd�Zejd�Zejd�Zejd �ZGd!d"�d"e�Z dS(#i(uabsolute_importudivisionuunicode_literalsNi(uDataLossWarningu^
[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] |
[#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] |
[#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] |
[#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 |
[#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] |
[#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] |
[#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] |
[#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] |
[#x04EE-#x04F5] | [#x04F8-#x04F9] | [#x0531-#x0556] | #x0559 |
[#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] |
[#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] |
[#x06D0-#x06D3] | #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D |
[#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] |
[#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] |
[#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] |
[#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] |
[#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | [#x0A72-#x0A74] |
[#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] |
[#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 |
[#x0B05-#x0B0C] | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] |
[#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] |
[#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] |
[#x0B99-#x0B9A] | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] |
[#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] |
[#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] |
[#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] |
[#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] |
[#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | [#x0D2A-#x0D39] |
[#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] |
[#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A |
#x0E8D | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 |
#x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] |
#x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] |
[#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] |
[#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C |
#x113E | #x1140 | #x114C | #x114E | #x1150 | [#x1154-#x1155] | #x1159 |
[#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] |
[#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] |
[#x11B7-#x11B8] | #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 |
[#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] |
[#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | #x1F5B |
#x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE |
[#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] |
[#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 |
[#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] |
[#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3]u*[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]u�
[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] |
[#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 |
[#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] |
[#x06E0-#x06E4] | [#x06E7-#x06E8] | [#x06EA-#x06ED] | [#x0901-#x0903] |
#x093C | [#x093E-#x094C] | #x094D | [#x0951-#x0954] | [#x0962-#x0963] |
[#x0981-#x0983] | #x09BC | #x09BE | #x09BF | [#x09C0-#x09C4] |
[#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 | [#x09E2-#x09E3] | #x0A02 |
#x0A3C | #x0A3E | #x0A3F | [#x0A40-#x0A42] | [#x0A47-#x0A48] |
[#x0A4B-#x0A4D] | [#x0A70-#x0A71] | [#x0A81-#x0A83] | #x0ABC |
[#x0ABE-#x0AC5] | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] |
#x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] | [#x0B4B-#x0B4D] |
[#x0B56-#x0B57] | [#x0B82-#x0B83] | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] |
[#x0BCA-#x0BCD] | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] |
[#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] | [#x0C82-#x0C83] |
[#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] |
[#x0D02-#x0D03] | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] |
#x0D57 | #x0E31 | [#x0E34-#x0E3A] | [#x0E47-#x0E4E] | #x0EB1 |
[#x0EB4-#x0EB9] | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] |
#x0F35 | #x0F37 | #x0F39 | #x0F3E | #x0F3F | [#x0F71-#x0F84] |
[#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] |
[#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] |
#x3099 | #x309Au
[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] |
[#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] |
[#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] |
[#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]u}
#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 |
#[#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]u | u.u-u_u#x([\d|A-F]{4,4})u'\[#x([\d|A-F]{4,4})-#x([\d|A-F]{4,4})\]cCsdd�|jd�D�}g}x�|D]�}d}x�ttfD]v}|j|�}|dk	rB|jdd�|j�D��t|d�dkr�|d	d|d
<nd}PqBqBW|s)t|�dks�t
�|jt|�gd�q)q)Wt|�}|S(NcSsg|]}|j��qS((ustrip(u.0uitem((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu
<listcomp>hs	u$charStringToList.<locals>.<listcomp>u | cSsg|]}t|��qS((uhexToInt(u.0uitem((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu
<listcomp>os	iiFi����i����i����T(
usplituFalseureCharureCharRangeumatchuNoneuappendugroupsulenuTrueuAssertionErroruordunormaliseCharList(ucharsu
charRangesurvuitemu
foundMatchuregexpumatch((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyucharStringToListgs"
 !ucharStringToListcCs�t|�}x(|D] }|d|dkst�qWg}d}x�|t|�kr�d}|j||�xb||t|�kr�|||d|dddkr�|||d|dd<|d7}qrW||7}qFW|S(Niii����i����(usorteduAssertionErrorulenuappend(ucharListuitemurvuiuj((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyunormaliseCharList|s
=unormaliseCharListuFFFFicCs�g}|ddkr8|jd|dddg�nxOt|dd��D]7\}}|j|dd||dddg�qOW|ddtkr�|j|dddtg�n|S(Niii����i����i����(uappendu	enumerateumax_unicode(ucharListurvuiuitem((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu
missingRanges�s"#/"u
missingRangescCs�g}xw|D]o}|d|dkrG|jtt|d���q
|jtt|d��dtt|d���q
Wddj|�S(Niiu-u[%s]u(uappenduescapeRegexpuchrujoin(ucharListurvuitem((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyulistToRegexpStr�s
 ulistToRegexpStrcCs
t|d�S(Ni(uint(uhex_str((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyuhexToInt�suhexToIntcCs1d}x$|D]}|j|d|�}q
W|S(Nu.u^u$u*u+u?u{u}u[u]u|u(u)u-u\(u.u^u$u*u+u?u{u}u[u]u|u(u)u-(ureplace(ustringuspecialCharactersuchar((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyuescapeRegexp�s

uescapeRegexpu�[-,/:-@\[-\^`\{-¶¸-¿×÷IJ-ijĿ-ŀʼnſDŽ-njDZ-dzǶ-ǹȘ-ɏʩ-ʺ˂-ˏ˒-˿͆-͟͢-΅΋΍΢Ϗϗ-ϙϛϝϟϡϴ-ЀЍѐѝ҂҇-ҏӅ-ӆӉ-ӊӍ-ӏӬ-ӭӶ-ӷӺ-԰՗-՘՚-ՠև-֐ֺ֢־׀׃ׅ-׏׫-ׯ׳-ؠػ-ؿٓ-ٟ٪-ٯڸ-ڹڿۏ۔۩ۮ-ۯۺ-ऀऄऺ-ऻॎ-ॐॕ-ॗ।-॥॰-ঀ঄঍-঎঑-঒঩঱঳-঵঺-঻ঽ৅-৆৉-৊ৎ-৖৘-৛৞৤-৥৲-ਁਃ-਄਋-਎਑-਒਩਱਴਷਺-਻਽੃-੆੉-੊੎-੘੝੟-੥ੵ-઀઄ઌ઎઒઩઱઴઺-઻૆૊૎-૟ૡ-૥૰-଀଄଍-଎଑-଒଩଱଴-ଵ଺-଻ୄ-୆୉-୊୎-୕୘-୛୞ୢ-୥୰-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭ஶ஺-஽௃-௅௉௎-௖௘-௦௰-ఀఄ఍఑఩ఴ఺-ఽ౅౉౎-౔౗-౟ౢ-౥౰-ಁ಄಍಑಩಴಺-ಽ೅೉೎-೔೗-ೝ೟ೢ-೥೰-ഁഄ഍഑ഩഺ-ഽൄ-൅൉ൎ-ൖ൘-ൟൢ-൥൰-฀ฯ฻-฿๏๚-຀຃຅-ຆຉ຋-ຌຎ-ຓຘຠ຤຦ຨ-ຩຬຯ຺຾-຿໅໇໎-໏໚-༗༚-༟༪-༴༶༸༺-༽཈ཪ-཰྅ྌ-ྏྖ྘ྮ-ྰྸྺ-႟჆-჏ჷ-ჿᄁᄄᄈᄊᄍᄓ-ᄻᄽᄿᅁ-ᅋᅍᅏᅑ-ᅓᅖ-ᅘᅚ-ᅞᅢᅤᅦᅨᅪ-ᅬᅯ-ᅱᅴᅶ-ᆝᆟ-ᆧᆩ-ᆪᆬ-ᆭᆰ-ᆶᆹᆻᇃ-ᇪᇬ-ᇯᇱ-ᇸᇺ-᷿ẜ-ẟỺ-ỿ἖-἗἞-἟὆-὇὎-὏὘὚὜὞὾-὿᾵᾽᾿-῁῅῍-῏῔-῕῜-῟῭-῱῵´-⃏⃝-⃠⃢-℥℧-℩ℬ-ℭℯ-ⅿↃ-〄〆〈-〠〰〶-぀ゕ-゘゛-゜ゟ-゠・ヿ-㄄ㄭ-䷿龦-꯿힤-￿]u�[-@\[-\^`\{-¿×÷IJ-ijĿ-ŀʼnſDŽ-njDZ-dzǶ-ǹȘ-ɏʩ-ʺ˂-΅·΋΍΢Ϗϗ-ϙϛϝϟϡϴ-ЀЍѐѝ҂-ҏӅ-ӆӉ-ӊӍ-ӏӬ-ӭӶ-ӷӺ-԰՗-՘՚-ՠև-׏׫-ׯ׳-ؠػ-ـً-ٰڸ-ڹڿۏ۔ۖ-ۤۧ-ऄऺ-़ा-ॗॢ-঄঍-঎঑-঒঩঱঳-঵঺-৛৞ৢ-৯৲-਄਋-਎਑-਒਩਱਴਷਺-੘੝੟-ੱੵ-઄ઌ઎઒઩઱઴઺-઼ા-૟ૡ-଄଍-଎଑-଒଩଱଴-ଵ଺-଼ା-୛୞ୢ-஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭ஶ஺-ఄ఍఑఩ఴ఺-౟ౢ-಄಍಑಩಴಺-ೝ೟ೢ-ഄ഍഑ഩഺ-ൟൢ-฀ฯัิ-฿ๆ-຀຃຅-ຆຉ຋-ຌຎ-ຓຘຠ຤຦ຨ-ຩຬຯັິ-ຼ຾-຿໅-༿཈ཪ-႟჆-჏ჷ-ჿᄁᄄᄈᄊᄍᄓ-ᄻᄽᄿᅁ-ᅋᅍᅏᅑ-ᅓᅖ-ᅘᅚ-ᅞᅢᅤᅦᅨᅪ-ᅬᅯ-ᅱᅴᅶ-ᆝᆟ-ᆧᆩ-ᆪᆬ-ᆭᆰ-ᆶᆹᆻᇃ-ᇪᇬ-ᇯᇱ-ᇸᇺ-᷿ẜ-ẟỺ-ỿ἖-἗἞-἟὆-὇὎-὏὘὚὜὞὾-὿᾵᾽᾿-῁῅῍-῏῔-῕῜-῟῭-῱῵´-℥℧-℩ℬ-ℭℯ-ⅿↃ-〆〈-〠〪-぀ゕ-゠・-㄄ㄭ-䷿龦-꯿힤-￿]u#[^ 
a-zA-Z0-9\-'()+,./:=?;!*#@$_%]c	Bs�|EeZdZejd�Zddddddddd�Z	ddd�Z
ddd�Zdd	�Zd
d�Z
dd
�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS(u
InfosetFilteru
U[\dA-F]{5,5}cCsC||_||_||_||_||_||_i|_dS(N(udropXmlnsLocalNameudropXmlnsAttrNsupreventDoubleDashCommentsupreventDashAtCommentEndureplaceFormFeedCharactersupreventSingleQuotePubidureplaceCache(uselfureplaceCharsudropXmlnsLocalNameudropXmlnsAttrNsupreventDoubleDashCommentsupreventDashAtCommentEndureplaceFormFeedCharactersupreventSingleQuotePubid((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu__init__�s						uInfosetFilter.__init__cCsf|jr,|jd�r,tjdt�dS|jrU|dkrUtjdt�dS|j|�SdS(Nuxmlns:u"Attributes cannot begin with xmlnsuhttp://www.w3.org/2000/xmlns/u)Attributes cannot be in the xml namespace(udropXmlnsLocalNameu
startswithuwarningsuwarnuDataLossWarninguNoneudropXmlnsAttrNsu	toXmlName(uselfunameu	namespace((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyucoerceAttribute�s	uInfosetFilter.coerceAttributecCs
|j|�S(N(u	toXmlName(uselfunameu	namespace((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu
coerceElement�suInfosetFilter.coerceElementcCsE|jrAx5d|kr=tjdt�|jdd�}qWn|S(Nu--u'Comments cannot contain adjacent dashesu- -(upreventDoubleDashCommentsuwarningsuwarnuDataLossWarningureplace(uselfudata((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu
coerceComment�s
	uInfosetFilter.coerceCommentcCsR|jrNx-t|jd��D]}tjdt�qW|jdd�}n|S(NuuText cannot contain U+000Cu (ureplaceFormFeedCharactersurangeucountuwarningsuwarnuDataLossWarningureplace(uselfudataui((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyucoerceCharacters�s
	uInfosetFilter.coerceCharacterscCs�|}xHtj|�D]7}tjdt�|j|�}|j||�}qW|jr�|jd�dkr�tjdt�|jd|jd��}n|S(NuCoercing non-XML pubidu'iu!Pubid cannot contain single quote(	unonPubidCharRegexpufindalluwarningsuwarnuDataLossWarningugetReplacementCharacterureplaceupreventSingleQuotePubidufind(uselfudatau
dataOutputucharureplacement((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyucoercePubid�suInfosetFilter.coercePubidc
Cs�|d}|dd�}tj|�}|rQtjdt�|j|�}n|}|}ttj|��}x?|D]7}tjdt�|j|�}	|j	||	�}qyW||S(NiiuCoercing non-XML name(
unonXmlNameFirstBMPRegexpumatchuwarningsuwarnuDataLossWarningugetReplacementCharacterusetunonXmlNameBMPRegexpufindallureplace(
uselfunameu	nameFirstunameRestumunameFirstOutputunameRestOutputureplaceCharsucharureplacement((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu	toXmlName�s

uInfosetFilter.toXmlNamecCs2||jkr|j|}n|j|�}|S(N(ureplaceCacheu
escapeChar(uselfucharureplacement((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyugetReplacementCharactersu%InfosetFilter.getReplacementCharactercCsBx;t|jj|��D]!}|j||j|��}qW|S(N(usetureplacementRegexpufindallureplaceuunescapeChar(uselfunameuitem((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyufromXmlNamesuInfosetFilter.fromXmlNamecCs!dt|�}||j|<|S(NuU%05X(uordureplaceCache(uselfucharureplacement((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu
escapeChars
uInfosetFilter.escapeCharcCstt|dd�d��S(Nii(uchruint(uselfucharcode((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyuunescapeCharsuInfosetFilter.unescapeCharNFT(u__name__u
__module__u__qualname__ureucompileureplacementRegexpuNoneuFalseuTrueu__init__ucoerceAttributeu
coerceElementu
coerceCommentucoerceCharactersucoercePubidu	toXmlNameugetReplacementCharacterufromXmlNameu
escapeCharuunescapeChar(u
__locals__((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu
InfosetFilter�s$u
InfosetFilter(!u
__future__uabsolute_importudivisionuunicode_literalsureuwarningsu	constantsuDataLossWarningubaseCharuideographicucombiningCharacterudigituextenderujoinuletterunameu	nameFirstucompileureCharureCharRangeucharStringToListunormaliseCharListuintumax_unicodeu
missingRangesulistToRegexpStruhexToIntuescapeRegexpunonXmlNameBMPRegexpunonXmlNameFirstBMPRegexpunonPubidCharRegexpuobjectu
InfosetFilter(((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/ihatexml.pyu<module>s20	python3.3/site-packages/pip/_vendor/html5lib/__pycache__/tokenizer.cpython-33.pyc000064400000207021151733566750023666 0ustar00�
7�Re�,c@s	ddlmZmZmZy
eZWnek
r:YnXddlmZddl	m
Z
ddl	mZddl	mZm
Z
ddl	mZmZmZddl	mZmZdd	l	mZdd
lmZddlmZee�ZGdd
�d
e�ZdS(i(uabsolute_importudivisionuunicode_literals(udequei(uspaceCharacters(uentities(uasciiLettersuasciiUpper2Lower(udigitsu	hexDigitsuEOF(u
tokenTypesu
tagTokenTypes(ureplacementCharacters(uHTMLInputStream(uTriec	s�|EeZdZdZd�d�d�d�d�d��fdd�Zdd�Zdd�Zd�d�dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Z d6d7�Z!d8d9�Z"d:d;�Z#d<d=�Z$d>d?�Z%d@dA�Z&dBdC�Z'dDdE�Z(dFdG�Z)dHdI�Z*dJdK�Z+dLdM�Z,dNdO�Z-dPdQ�Z.dRdS�Z/dTdU�Z0dVdW�Z1dXdY�Z2dZd[�Z3d\d]�Z4d^d_�Z5d`da�Z6dbdc�Z7ddde�Z8dfdg�Z9dhdi�Z:djdk�Z;dldm�Z<dndo�Z=dpdq�Z>drds�Z?dtdu�Z@dvdw�ZAdxdy�ZBdzd{�ZCd|d}�ZDd~d�ZEd�d��ZFd�d��ZGd�d��ZHd�d��ZId�d��ZJd�d��ZKd�d��ZLd�d��ZMd�d��ZNd�d��ZO�S(�u
HTMLTokenizeru	 This class takes care of tokenizing HTML.

    * self.currentToken
      Holds the token that is currently being processed.

    * self.state
      Holds a reference to the method to be invoked... XXX

    * self.stream
      Points to HTMLInputStream object.
    cszt||||�|_||_||_||_d|_g|_|j|_	d|_
d|_t
t|�j�dS(NF(uHTMLInputStreamustreamuparserulowercaseElementNameulowercaseAttrNameuFalseu
escapeFlagu
lastFourCharsu	dataStateustateuescapeuNoneucurrentTokenusuperu
HTMLTokenizeru__init__(uselfustreamuencodingu	parseMetau
useChardetulowercaseElementNameulowercaseAttrNameuparser(u	__class__(u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu__init__%s							uHTMLTokenizer.__init__ccs}tg�|_xg|j�rxx6|jjrVitdd6|jjjd�d6Vq!Wx|jrt|jj�VqZWqWdS(u� This is where the magic happens.

        We do our usually processing through the states and when we have a token
        to return we yield the token which pauses processing until the next token
        is requested.
        u
ParseErrorutypeiudataN(udequeu
tokenQueueustateustreamuerrorsu
tokenTypesupopupopleft(uself((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu__iter__9s*uHTMLTokenizer.__iter__c	0Cs�t}d}|r!t}d}ng}|jj�}x8||krp|tk	rp|j|�|jj�}q9Wtdj|�|�}|tkr�t|}|j	jit
dd6dd6i|d6d	6�n�d
|ko�dkns�|dkr3d
}|j	jit
dd6dd6i|d6d	6�nsd|koJdknsd|kofdknsd|ko�dknsd|ko�dkns|tddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7dg#�krQ|j	jit
dd6dd6i|d6d	6�nyt|�}WnBt
k
r�|d8}td
|d?B�td9|d:@B�}YnX|d;kr�|j	jit
dd6d<d6�|jj|�n|S(=u�This function returns either U+FFFD or the character based on the
        decimal or hexadecimal representation. It also discards ";" if present.
        If not present self.tokenQueue.append({"type": tokenTypes["ParseError"]}) is invoked.
        i
iuu
ParseErrorutypeu$illegal-codepoint-for-numeric-entityudatau	charAsIntudatavarsi�i��i��u�iiiiii�i�i�ii��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��	i��	i��
i��
i��i��i��i��i��
i��
i��i��i��i��i��ii�i�u;u numeric-entity-without-semicolon(udigitsu	hexDigitsustreamucharuEOFuappenduintujoinureplacementCharactersu
tokenQueueu
tokenTypesu	frozensetuchru
ValueErroruunget(	uselfuisHexualloweduradixu	charStackucu	charAsIntucharuv((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuconsumeNumberEntityIs`	



+u!HTMLTokenizer.consumeNumberEntityc	Cs�d}|jj�g}|dtks]|dtddfks]|dk	rt||dkrt|jj|d�n�|ddkrpd}|j|jj��|ddkr�d}|j|jj��n|r�|dt	ks�|r"|dt
kr"|jj|d�|j|�}qD|jjit
dd	6d
d6�|jj|j��ddj|�}n�xF|dtk	r�tjdj|��s�Pn|j|jj��qsWy2tjdj|dd���}t|�}Wntk
rd}YnX|dk	r�|dd
krG|jjit
dd	6dd6�n|dd
kr�|r�||tks�||t
ks�||dkr�|jj|j��ddj|�}qDt|}|jj|j��|dj||d��7}nK|jjit
dd	6dd6�|jj|j��ddj|�}|rf|jddd|7<n=|tkr{d}nd}|jjit
|d	6|d6�dS(Nu&iu<u#iuxuXu
ParseErrorutypeuexpected-numeric-entityudatauu;unamed-entity-without-semicolonu=uexpected-named-entityuSpaceCharactersu
CharactersFi����(uxuXTi����i����i����i����i����i����i����i����(ustreamucharuspaceCharactersuEOFuNoneuungetuFalseuappenduTrueu	hexDigitsudigitsuconsumeNumberEntityu
tokenQueueu
tokenTypesupopujoinuentitiesTrieuhas_keys_with_prefixulongest_prefixulenuKeyErroruasciiLettersuentitiesucurrentToken(	uselfuallowedCharu
fromAttributeuoutputu	charStackuhexu
entityNameuentityLengthu	tokenType((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu
consumeEntity�sf)"

 	uHTMLTokenizer.consumeEntitycCs|jd|dd�dS(uIThis method replaces the need for "entityInAttributeValueState".
        uallowedCharu
fromAttributeNT(u
consumeEntityuTrue(uselfuallowedChar((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuprocessEntityInAttribute�su&HTMLTokenizer.processEntityInAttributecCs�|j}|dtkr�|jr<|djt�|d<n|dtdkr�|dr|jjitdd6dd6�n|dr�|jjitdd6dd6�q�q�n|jj|�|j|_	d	S(
u�This method is a generic handler for emitting the tags. It also sets
        the state to "data" because that's what's needed after a token has been
        emitted.
        utypeunameuEndTagudatau
ParseErroruattributes-in-end-taguselfClosinguself-closing-flag-on-end-tagN(
ucurrentTokenu
tagTokenTypesulowercaseElementNameu	translateuasciiUpper2Loweru
tokenTypesu
tokenQueueuappendu	dataStateustate(uselfutoken((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuemitCurrentToken�s		

uHTMLTokenizer.emitCurrentTokencCs(|jj�}|dkr*|j|_n�|dkrE|j|_n�|dkr�|jjitdd6dd6�|jjitdd6dd6�n�|tkr�d
S|t
kr�|jjitd	d6||jjt
d�d6�n8|jjd�}|jjitdd6||d6�dS(
Nu&u<uu
ParseErrorutypeuinvalid-codepointudatau
CharactersuSpaceCharactersFT(u&u<u(
ustreamucharuentityDataStateustateutagOpenStateu
tokenQueueuappendu
tokenTypesuEOFuFalseuspaceCharactersu
charsUntiluTrue(uselfudatauchars((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu	dataState�s&!uHTMLTokenizer.dataStatecCs|j�|j|_dS(NT(u
consumeEntityu	dataStateustateuTrue(uself((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuentityDataStates
uHTMLTokenizer.entityDataStatecCs(|jj�}|dkr*|j|_n�|dkrE|j|_n�|tkrUdS|dkr�|jjit	dd6dd6�|jjit	dd6d	d6�n||t
kr�|jjit	d
d6||jjt
d�d6�n8|jjd
�}|jjit	dd6||d6�dS(Nu&u<uu
ParseErrorutypeuinvalid-codepointudatau
Charactersu�uSpaceCharactersFT(u&u<u(
ustreamucharucharacterReferenceInRcdataustateurcdataLessThanSignStateuEOFuFalseu
tokenQueueuappendu
tokenTypesuspaceCharactersu
charsUntiluTrue(uselfudatauchars((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyurcdataStates&!uHTMLTokenizer.rcdataStatecCs|j�|j|_dS(NT(u
consumeEntityurcdataStateustateuTrue(uself((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucharacterReferenceInRcdata:s
u(HTMLTokenizer.characterReferenceInRcdatacCs�|jj�}|dkr*|j|_n�|dkr}|jjitdd6dd6�|jjitdd6dd6�nH|tkr�d	S|jj	d
�}|jjitdd6||d6�dS(Nu<uu
ParseErrorutypeuinvalid-codepointudatau
Charactersu�F(u<uT(ustreamucharurawtextLessThanSignStateustateu
tokenQueueuappendu
tokenTypesuEOFuFalseu
charsUntiluTrue(uselfudatauchars((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyurawtextState?suHTMLTokenizer.rawtextStatecCs�|jj�}|dkr*|j|_n�|dkr}|jjitdd6dd6�|jjitdd6dd6�nH|tkr�d	S|jj	d
�}|jjitdd6||d6�dS(Nu<uu
ParseErrorutypeuinvalid-codepointudatau
Charactersu�F(u<uT(ustreamucharuscriptDataLessThanSignStateustateu
tokenQueueuappendu
tokenTypesuEOFuFalseu
charsUntiluTrue(uselfudatauchars((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataStateQsuHTMLTokenizer.scriptDataStatecCs�|jj�}|tkrdS|dkrr|jjitdd6dd6�|jjitdd6dd6�n2|jjitdd6||jjd�d6�d	S(
Nuu
ParseErrorutypeuinvalid-codepointudatau
Charactersu�FT(	ustreamucharuEOFuFalseu
tokenQueueuappendu
tokenTypesu
charsUntiluTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuplaintextStatecsuHTMLTokenizer.plaintextStatecCs�|jj�}|dkr*|j|_nr|dkrE|j|_nW|tkr�itdd6|d6gd6dd6dd6|_|j	|_n|d	kr�|j
jitd
d6dd6�|j
jitdd6d
d6�|j|_n�|dkr<|j
jitd
d6dd6�|jj
|�|j|_n`|j
jitd
d6dd6�|j
jitdd6dd6�|jj
|�|j|_dS(Nu!u/uStartTagutypeunameudatauselfClosinguselfClosingAcknowledgedu>u
ParseErroru'expected-tag-name-but-got-right-bracketu
Charactersu<>u?u'expected-tag-name-but-got-question-markuexpected-tag-nameu<FT(ustreamucharumarkupDeclarationOpenStateustateucloseTagOpenStateuasciiLettersu
tokenTypesuFalseucurrentTokenutagNameStateu
tokenQueueuappendu	dataStateuungetubogusCommentStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyutagOpenStaters6
""uHTMLTokenizer.tagOpenStatecCs?|jj�}|tkrSitdd6|d6gd6dd6|_|j|_n�|dkr�|jj	itdd6dd6�|j
|_n�|tkr�|jj	itdd6d	d6�|jj	itd
d6dd6�|j
|_nL|jj	itdd6dd6i|d6d
6�|jj|�|j
|_dS(NuEndTagutypeunameudatauselfClosingu>u
ParseErroru*expected-closing-tag-but-got-right-bracketu expected-closing-tag-but-got-eofu
Charactersu</u!expected-closing-tag-but-got-charudatavarsFT(ustreamucharuasciiLettersu
tokenTypesuFalseucurrentTokenutagNameStateustateu
tokenQueueuappendu	dataStateuEOFuungetubogusCommentStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucloseTagOpenState�s("uHTMLTokenizer.closeTagOpenStatecCs�|jj�}|tkr*|j|_n�|dkrC|j�n�|tkr�|jjit	dd6dd6�|j
|_nn|dkr�|j|_nS|dkr�|jjit	dd6dd6�|jd	d
7<n|jd	|7<dS(Nu>u
ParseErrorutypeueof-in-tag-nameudatau/uuinvalid-codepointunameu�T(ustreamucharuspaceCharactersubeforeAttributeNameStateustateuemitCurrentTokenuEOFu
tokenQueueuappendu
tokenTypesu	dataStateuselfClosingStartTagStateucurrentTokenuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyutagNameState�s"
uHTMLTokenizer.tagNameStatecCsu|jj�}|dkr3d|_|j|_n>|jjitdd6dd6�|jj|�|j	|_dS(Nu/uu
Charactersutypeu<udataT(ustreamucharutemporaryBufferurcdataEndTagOpenStateustateu
tokenQueueuappendu
tokenTypesuungeturcdataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyurcdataLessThanSignState�s	"u%HTMLTokenizer.rcdataLessThanSignStatecCs{|jj�}|tkr9|j|7_|j|_n>|jjitdd6dd6�|jj	|�|j
|_dS(Nu
Charactersutypeu</udataT(ustreamucharuasciiLettersutemporaryBufferurcdataEndTagNameStateustateu
tokenQueueuappendu
tokenTypesuungeturcdataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyurcdataEndTagOpenState�s"u#HTMLTokenizer.rcdataEndTagOpenStatecCs�|jo(|jdj�|jj�k}|jj�}|tkr�|r�itdd6|jd6gd6d
d6|_|j|_	n|dkr�|r�itdd6|jd6gd6d
d6|_|j
|_	n�|dkr+|r+itdd6|jd6gd6d
d6|_|j�|j|_	nc|t
krI|j|7_nE|jjitdd6d	|jd6�|jj|�|j|_	dS(NunameuEndTagutypeudatauselfClosingu/u>u
Charactersu</FT(ucurrentTokenulowerutemporaryBufferustreamucharuspaceCharactersu
tokenTypesuFalseubeforeAttributeNameStateustateuselfClosingStartTagStateuemitCurrentTokenu	dataStateuasciiLettersu
tokenQueueuappenduungeturcdataStateuTrue(uselfuappropriateudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyurcdataEndTagNameState�s2+



u#HTMLTokenizer.rcdataEndTagNameStatecCsu|jj�}|dkr3d|_|j|_n>|jjitdd6dd6�|jj|�|j	|_dS(Nu/uu
Charactersutypeu<udataT(ustreamucharutemporaryBufferurawtextEndTagOpenStateustateu
tokenQueueuappendu
tokenTypesuungeturawtextStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyurawtextLessThanSignState�s	"u&HTMLTokenizer.rawtextLessThanSignStatecCs{|jj�}|tkr9|j|7_|j|_n>|jjitdd6dd6�|jj	|�|j
|_dS(Nu
Charactersutypeu</udataT(ustreamucharuasciiLettersutemporaryBufferurawtextEndTagNameStateustateu
tokenQueueuappendu
tokenTypesuungeturawtextStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyurawtextEndTagOpenStates"u$HTMLTokenizer.rawtextEndTagOpenStatecCs�|jo(|jdj�|jj�k}|jj�}|tkr�|r�itdd6|jd6gd6d
d6|_|j|_	n|dkr�|r�itdd6|jd6gd6d
d6|_|j
|_	n�|dkr+|r+itdd6|jd6gd6d
d6|_|j�|j|_	nc|t
krI|j|7_nE|jjitdd6d	|jd6�|jj|�|j|_	dS(NunameuEndTagutypeudatauselfClosingu/u>u
Charactersu</FT(ucurrentTokenulowerutemporaryBufferustreamucharuspaceCharactersu
tokenTypesuFalseubeforeAttributeNameStateustateuselfClosingStartTagStateuemitCurrentTokenu	dataStateuasciiLettersu
tokenQueueuappenduungeturawtextStateuTrue(uselfuappropriateudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyurawtextEndTagNameStates2+



u$HTMLTokenizer.rawtextEndTagNameStatecCs�|jj�}|dkr3d|_|j|_n{|dkrp|jjitdd6dd6�|j|_n>|jjitdd6dd6�|jj	|�|j
|_d	S(
Nu/uu!u
Charactersutypeu<!udatau<T(ustreamucharutemporaryBufferuscriptDataEndTagOpenStateustateu
tokenQueueuappendu
tokenTypesuscriptDataEscapeStartStateuungetuscriptDataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataLessThanSignState's	""u)HTMLTokenizer.scriptDataLessThanSignStatecCs{|jj�}|tkr9|j|7_|j|_n>|jjitdd6dd6�|jj	|�|j
|_dS(Nu
Charactersutypeu</udataT(ustreamucharuasciiLettersutemporaryBufferuscriptDataEndTagNameStateustateu
tokenQueueuappendu
tokenTypesuungetuscriptDataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataEndTagOpenState5s"u'HTMLTokenizer.scriptDataEndTagOpenStatecCs�|jo(|jdj�|jj�k}|jj�}|tkr�|r�itdd6|jd6gd6d
d6|_|j|_	n|dkr�|r�itdd6|jd6gd6d
d6|_|j
|_	n�|dkr+|r+itdd6|jd6gd6d
d6|_|j�|j|_	nc|t
krI|j|7_nE|jjitdd6d	|jd6�|jj|�|j|_	dS(NunameuEndTagutypeudatauselfClosingu/u>u
Charactersu</FT(ucurrentTokenulowerutemporaryBufferustreamucharuspaceCharactersu
tokenTypesuFalseubeforeAttributeNameStateustateuselfClosingStartTagStateuemitCurrentTokenu	dataStateuasciiLettersu
tokenQueueuappenduungetuscriptDataStateuTrue(uselfuappropriateudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataEndTagNameState@s2+



u'HTMLTokenizer.scriptDataEndTagNameStatecCsl|jj�}|dkrL|jjitdd6dd6�|j|_n|jj|�|j|_dS(Nu-u
CharactersutypeudataT(
ustreamucharu
tokenQueueuappendu
tokenTypesuscriptDataEscapeStartDashStateustateuungetuscriptDataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataEscapeStartState\s"u(HTMLTokenizer.scriptDataEscapeStartStatecCsl|jj�}|dkrL|jjitdd6dd6�|j|_n|jj|�|j|_dS(Nu-u
CharactersutypeudataT(
ustreamucharu
tokenQueueuappendu
tokenTypesuscriptDataEscapedDashDashStateustateuungetuscriptDataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataEscapeStartDashStatefs"u,HTMLTokenizer.scriptDataEscapeStartDashStatecCs|jj�}|dkrL|jjitdd6dd6�|j|_n�|dkrg|j|_n�|dkr�|jjitdd6dd6�|jjitdd6d	d6�nS|tkr�|j	|_n8|jj
d
�}|jjitdd6||d6�dS(Nu-u
Charactersutypeudatau<uu
ParseErroruinvalid-codepointu�(u<u-uT(ustreamucharu
tokenQueueuappendu
tokenTypesuscriptDataEscapedDashStateustateu"scriptDataEscapedLessThanSignStateuEOFu	dataStateu
charsUntiluTrue(uselfudatauchars((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataEscapedStateps""u$HTMLTokenizer.scriptDataEscapedStatecCs|jj�}|dkrL|jjitdd6dd6�|j|_n�|dkrg|j|_n�|dkr�|jjitdd6dd6�|jjitdd6d	d6�|j|_nI|t	kr�|j
|_n.|jjitdd6|d6�|j|_d
S(Nu-u
Charactersutypeudatau<uu
ParseErroruinvalid-codepointu�T(ustreamucharu
tokenQueueuappendu
tokenTypesuscriptDataEscapedDashDashStateustateu"scriptDataEscapedLessThanSignStateuscriptDataEscapedStateuEOFu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataEscapedDashState�s"""u(HTMLTokenizer.scriptDataEscapedDashStatecCsD|jj�}|dkr@|jjitdd6dd6�n|dkr[|j|_n�|dkr�|jjitdd6dd6�|j|_n�|dkr�|jjitdd6d	d6�|jjitdd6d
d6�|j|_nI|t	kr|j
|_n.|jjitdd6|d6�|j|_dS(Nu-u
Charactersutypeudatau<u>uu
ParseErroruinvalid-codepointu�T(ustreamucharu
tokenQueueuappendu
tokenTypesu"scriptDataEscapedLessThanSignStateustateuscriptDataStateuscriptDataEscapedStateuEOFu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataEscapedDashDashState�s&%""u,HTMLTokenizer.scriptDataEscapedDashDashStatecCs�|jj�}|dkr3d|_|j|_n�|tkr}|jjitdd6d|d6�||_|j	|_n>|jjitdd6dd6�|jj
|�|j|_dS(Nu/uu
Charactersutypeu<udataT(
ustreamucharutemporaryBufferu scriptDataEscapedEndTagOpenStateustateuasciiLettersu
tokenQueueuappendu
tokenTypesu scriptDataDoubleEscapeStartStateuungetuscriptDataEscapedStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu"scriptDataEscapedLessThanSignState�s	&	"u0HTMLTokenizer.scriptDataEscapedLessThanSignStatecCsu|jj�}|tkr3||_|j|_n>|jjitdd6dd6�|jj	|�|j
|_dS(Nu
Charactersutypeu</udataT(ustreamucharuasciiLettersutemporaryBufferu scriptDataEscapedEndTagNameStateustateu
tokenQueueuappendu
tokenTypesuungetuscriptDataEscapedStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu scriptDataEscapedEndTagOpenState�s	"u.HTMLTokenizer.scriptDataEscapedEndTagOpenStatecCs�|jo(|jdj�|jj�k}|jj�}|tkr�|r�itdd6|jd6gd6d
d6|_|j|_	n|dkr�|r�itdd6|jd6gd6d
d6|_|j
|_	n�|dkr+|r+itdd6|jd6gd6d
d6|_|j�|j|_	nc|t
krI|j|7_nE|jjitdd6d	|jd6�|jj|�|j|_	dS(NunameuEndTagutypeudatauselfClosingu/u>u
Charactersu</FT(ucurrentTokenulowerutemporaryBufferustreamucharuspaceCharactersu
tokenTypesuFalseubeforeAttributeNameStateustateuselfClosingStartTagStateuemitCurrentTokenu	dataStateuasciiLettersu
tokenQueueuappenduungetuscriptDataEscapedStateuTrue(uselfuappropriateudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu scriptDataEscapedEndTagNameState�s2+



u.HTMLTokenizer.scriptDataEscapedEndTagNameStatecCs�|jj�}|ttd�Bkrz|jjitdd6|d6�|jj�dkrk|j	|_
q�|j|_
n\|tkr�|jjitdd6|d6�|j|7_n|jj
|�|j|_
dS(	Nu/u>u
Charactersutypeudatauscript(u/u>T(ustreamucharuspaceCharactersu	frozensetu
tokenQueueuappendu
tokenTypesutemporaryBufferuloweruscriptDataDoubleEscapedStateustateuscriptDataEscapedStateuasciiLettersuungetuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu scriptDataDoubleEscapeStartState�s""u.HTMLTokenizer.scriptDataDoubleEscapeStartStatecCs?|jj�}|dkrL|jjitdd6dd6�|j|_n�|dkr�|jjitdd6dd6�|j|_n�|dkr�|jjitdd6dd6�|jjitdd6d	d6�n_|tkr|jjitdd6d
d6�|j	|_n"|jjitdd6|d6�dS(Nu-u
Charactersutypeudatau<uu
ParseErroruinvalid-codepointu�ueof-in-script-in-scriptT(ustreamucharu
tokenQueueuappendu
tokenTypesu scriptDataDoubleEscapedDashStateustateu(scriptDataDoubleEscapedLessThanSignStateuEOFu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataDoubleEscapedState�s$"""u*HTMLTokenizer.scriptDataDoubleEscapedStatecCsW|jj�}|dkrL|jjitdd6dd6�|j|_n|dkr�|jjitdd6dd6�|j|_n�|dkr�|jjitdd6dd6�|jjitdd6d	d6�|j|_nk|t	kr%|jjitdd6d
d6�|j
|_n.|jjitdd6|d6�|j|_dS(Nu-u
Charactersutypeudatau<uu
ParseErroruinvalid-codepointu�ueof-in-script-in-scriptT(ustreamucharu
tokenQueueuappendu
tokenTypesu$scriptDataDoubleEscapedDashDashStateustateu(scriptDataDoubleEscapedLessThanSignStateuscriptDataDoubleEscapedStateuEOFu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu scriptDataDoubleEscapedDashState	s("""u.HTMLTokenizer.scriptDataDoubleEscapedDashStatecCs�|jj�}|dkr@|jjitdd6dd6�nD|dkr}|jjitdd6dd6�|j|_n|dkr�|jjitdd6dd6�|j|_n�|dkr|jjitdd6d	d6�|jjitdd6d
d6�|j|_nk|t	krV|jjitdd6dd6�|j
|_n.|jjitdd6|d6�|j|_dS(
Nu-u
Charactersutypeudatau<u>uu
ParseErroruinvalid-codepointu�ueof-in-script-in-scriptT(ustreamucharu
tokenQueueuappendu
tokenTypesu(scriptDataDoubleEscapedLessThanSignStateustateuscriptDataStateuscriptDataDoubleEscapedStateuEOFu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu$scriptDataDoubleEscapedDashDashState s,%"""u2HTMLTokenizer.scriptDataDoubleEscapedDashDashStatecCsu|jj�}|dkrU|jjitdd6dd6�d|_|j|_n|jj|�|j	|_dS(Nu/u
CharactersutypeudatauT(ustreamucharu
tokenQueueuappendu
tokenTypesutemporaryBufferuscriptDataDoubleEscapeEndStateustateuungetuscriptDataDoubleEscapedStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu(scriptDataDoubleEscapedLessThanSignState9s"	u6HTMLTokenizer.scriptDataDoubleEscapedLessThanSignStatecCs�|jj�}|ttd�Bkrz|jjitdd6|d6�|jj�dkrk|j	|_
q�|j|_
n\|tkr�|jjitdd6|d6�|j|7_n|jj
|�|j|_
dS(	Nu/u>u
Charactersutypeudatauscript(u/u>T(ustreamucharuspaceCharactersu	frozensetu
tokenQueueuappendu
tokenTypesutemporaryBufferuloweruscriptDataEscapedStateustateuscriptDataDoubleEscapedStateuasciiLettersuungetuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuscriptDataDoubleEscapeEndStateDs""u,HTMLTokenizer.scriptDataDoubleEscapeEndStatecCs�|jj�}|tkr1|jjtd�nz|tkrf|jdj|dg�|j|_	nE|dkr|j
�n,|dkr�|j|_	n|dkr�|jjit
d	d
6dd6�|jdj|dg�|j|_	n�|dkrH|jjit
d	d
6d
d6�|jdjddg�|j|_	nc|tkr�|jjit
d	d
6dd6�|j|_	n&|jdj|dg�|j|_	dS(Nudatauu>u/u'u"u=u<u
ParseErrorutypeu#invalid-character-in-attribute-nameuuinvalid-codepointu�u#expected-attribute-name-but-got-eofT(u'u"u=u<(ustreamucharuspaceCharactersu
charsUntiluTrueuasciiLettersucurrentTokenuappenduattributeNameStateustateuemitCurrentTokenuselfClosingStartTagStateu
tokenQueueu
tokenTypesuEOFu	dataState(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyubeforeAttributeNameStateTs6
u&HTMLTokenizer.beforeAttributeNameStatecCs�|jj�}d}d}|dkr6|j|_n�|tkrw|jddd||jjtd�7<d}nG|dkr�d}n2|t	kr�|j
|_n|dkr�|j|_n�|dkr|jj
itdd	6d
d6�|jdddd7<d}n�|dkrb|jj
itdd	6dd6�|jddd|7<d}n\|tkr�|jj
itdd	6dd6�|j|_n|jddd|7<d}|r||jr�|jdddjt�|jddd<nxf|jddd�D]M\}}|jddd|kr|jj
itdd	6dd6�PqqW|r||j�q|ndS(Nu=udataiiu>u/uu
ParseErrorutypeuinvalid-codepointu�u'u"u<u#invalid-character-in-attribute-nameueof-in-attribute-nameuduplicate-attributeTFi����i����(u'u"u<i����i����i����i����i����i����(ustreamucharuTrueuFalseubeforeAttributeValueStateustateuasciiLettersucurrentTokenu
charsUntiluspaceCharactersuafterAttributeNameStateuselfClosingStartTagStateu
tokenQueueuappendu
tokenTypesuEOFu	dataStateulowercaseAttrNameu	translateuasciiUpper2LoweruemitCurrentToken(uselfudatauleavingThisStateu	emitTokenunameuvalue((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuattributeNameStatersT					0$u HTMLTokenizer.attributeNameStatecCs�|jj�}|tkr1|jjtd�n�|dkrL|j|_nz|dkre|j�na|tkr�|j	dj
|dg�|j|_n,|dkr�|j|_n|dkr|j
j
itdd6d	d6�|j	dj
d
dg�|j|_n�|dkrc|j
j
itdd6dd6�|j	dj
|dg�|j|_nc|tkr�|j
j
itdd6dd6�|j|_n&|j	dj
|dg�|j|_dS(Nu=u>udatauu/uu
ParseErrorutypeuinvalid-codepointu�u'u"u<u&invalid-character-after-attribute-nameuexpected-end-of-tag-but-got-eofT(u'u"u<(ustreamucharuspaceCharactersu
charsUntiluTrueubeforeAttributeValueStateustateuemitCurrentTokenuasciiLettersucurrentTokenuappenduattributeNameStateuselfClosingStartTagStateu
tokenQueueu
tokenTypesuEOFu	dataState(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuafterAttributeNameState�s:
u%HTMLTokenizer.afterAttributeNameStatecCs�|jj�}|tkr1|jjtd�n�|dkrL|j|_n�|dkrw|j|_|jj|�nd|dkr�|j	|_nI|dkr�|j
jitdd6dd6�|j
�n|d	kr#|j
jitdd6d
d6�|jdddd7<|j|_n�|dkry|j
jitdd6dd6�|jddd|7<|j|_nb|tkr�|j
jitdd6dd6�|j|_n%|jddd|7<|j|_dS(Nu"u&u'u>u
ParseErrorutypeu.expected-attribute-value-but-got-right-bracketudatauuinvalid-codepointiu�u=u<u`u"equals-in-unquoted-attribute-valueu$expected-attribute-value-but-got-eofTi����(u=u<u`i����i����(ustreamucharuspaceCharactersu
charsUntiluTrueuattributeValueDoubleQuotedStateustateuattributeValueUnQuotedStateuungetuattributeValueSingleQuotedStateu
tokenQueueuappendu
tokenTypesuemitCurrentTokenucurrentTokenuEOFu	dataState(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyubeforeAttributeValueState�s>
u'HTMLTokenizer.beforeAttributeValueStatecCs�|jj�}|dkr*|j|_n�|dkrF|jd�n�|dkr�|jjitdd6dd6�|jdddd	7<nf|t	kr�|jjitdd6d
d6�|j
|_n)|jddd||jjd
�7<dS(Nu"u&uu
ParseErrorutypeuinvalid-codepointudataiu�u#eof-in-attribute-value-double-quotei����i����(u"u&uT(
ustreamucharuafterAttributeValueStateustateuprocessEntityInAttributeu
tokenQueueuappendu
tokenTypesucurrentTokenuEOFu	dataStateu
charsUntiluTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuattributeValueDoubleQuotedState�s u-HTMLTokenizer.attributeValueDoubleQuotedStatecCs�|jj�}|dkr*|j|_n�|dkrF|jd�n�|dkr�|jjitdd6dd6�|jdddd	7<nf|t	kr�|jjitdd6d
d6�|j
|_n)|jddd||jjd
�7<dS(Nu'u&uu
ParseErrorutypeuinvalid-codepointudataiu�u#eof-in-attribute-value-single-quotei����i����(u'u&uT(
ustreamucharuafterAttributeValueStateustateuprocessEntityInAttributeu
tokenQueueuappendu
tokenTypesucurrentTokenuEOFu	dataStateu
charsUntiluTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuattributeValueSingleQuotedState�s u-HTMLTokenizer.attributeValueSingleQuotedStatecCsg|jj�}|tkr*|j|_n9|dkrF|jd�n|dkr_|j�n|dkr�|jjit	dd	6d
d6�|j
ddd|7<n�|d
kr�|jjit	dd	6dd6�|j
dddd7<np|tkr0|jjit	dd	6dd6�|j|_n3|j
ddd||jj
td�tB�7<dS(Nu&u>u"u'u=u<u`u
ParseErrorutypeu0unexpected-character-in-unquoted-attribute-valueudataiuuinvalid-codepointu�u eof-in-attribute-value-no-quotes(u"u'u=u<u`i����i����i����(u&u>u"u'u=u<u`uT(ustreamucharuspaceCharactersubeforeAttributeNameStateustateuprocessEntityInAttributeuemitCurrentTokenu
tokenQueueuappendu
tokenTypesucurrentTokenuEOFu	dataStateu
charsUntilu	frozensetuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuattributeValueUnQuotedStates,
u)HTMLTokenizer.attributeValueUnQuotedStatecCs�|jj�}|tkr*|j|_n�|dkrC|j�n�|dkr^|j|_n�|tkr�|jj	it
dd6dd6�|jj|�|j|_n>|jj	it
dd6dd6�|jj|�|j|_dS(	Nu>u/u
ParseErrorutypeu$unexpected-EOF-after-attribute-valueudatau*unexpected-character-after-attribute-valueT(ustreamucharuspaceCharactersubeforeAttributeNameStateustateuemitCurrentTokenuselfClosingStartTagStateuEOFu
tokenQueueuappendu
tokenTypesuungetu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuafterAttributeValueState*s"
u&HTMLTokenizer.afterAttributeValueStatecCs�|jj�}|dkr5d|jd<|j�n�|tkr�|jjitdd6dd6�|jj	|�|j
|_n>|jjitdd6dd6�|jj	|�|j|_dS(	Nu>uselfClosingu
ParseErrorutypeu#unexpected-EOF-after-solidus-in-tagudatau)unexpected-character-after-solidus-in-tagT(
ustreamucharuTrueucurrentTokenuemitCurrentTokenuEOFu
tokenQueueuappendu
tokenTypesuungetu	dataStateustateubeforeAttributeNameState(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuselfClosingStartTagState>s

u&HTMLTokenizer.selfClosingStartTagStatecCsc|jjd�}|jdd�}|jjitdd6|d6�|jj�|j|_dS(Nu>uu�uCommentutypeudataT(
ustreamu
charsUntilureplaceu
tokenQueueuappendu
tokenTypesucharu	dataStateustateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyubogusCommentStatePs	
uHTMLTokenizer.bogusCommentStatec	Cs0|jj�g}|ddkrv|j|jj��|ddkr�itdd6dd6|_|j|_d Sne|d!d"krd }x>d)D]6}|j|jj��|d*|kr�d+}Pq�q�W|r�itdd6dd6dd6dd6d d6|_|j
|_d Sn�|d,dkr�|jdk	r�|jjj
r�|jjj
d-j|jjjkr�d }xPddddddgD]6}|j|jj��|d.|kr�d+}Pq�q�W|r�|j|_d Sn|jjitdd6dd6�x |r|jj|j��qW|j|_d S(/Niu-uCommentutypeuudatauduDuouOucuCutuTuyuYupuPueuEuDoctypeunameupublicIdusystemIducorrectu[uAu
ParseErroruexpected-dashes-or-doctypei����i����Ti����(uduD(uouO(ucuC(utuT(uyuY(upuP(ueuE((uouO(ucuC(utuT(uyuY(upuP(ueuEi����Fi����i����i����(ustreamucharuappendu
tokenTypesucurrentTokenucommentStartStateustateuTrueuFalseuNoneudoctypeStateuparserutreeuopenElementsu	namespaceudefaultNamespaceucdataSectionStateu
tokenQueueuungetupopubogusCommentState(uselfu	charStackumatcheduexpected((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyumarkupDeclarationOpenState_sR

%	u(HTMLTokenizer.markupDeclarationOpenStatecCs-|jj�}|dkr*|j|_n�|dkrl|jjitdd6dd6�|jdd7<n�|dkr�|jjitdd6d	d6�|jj|j�|j|_nm|t	kr|jjitdd6d
d6�|jj|j�|j|_n|jd|7<|j
|_dS(Nu-uu
ParseErrorutypeuinvalid-codepointudatau�u>uincorrect-commentueof-in-commentT(ustreamucharucommentStartDashStateustateu
tokenQueueuappendu
tokenTypesucurrentTokenu	dataStateuEOFucommentStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucommentStartState�s(uHTMLTokenizer.commentStartStatecCs1|jj�}|dkr*|j|_n|dkrl|jjitdd6dd6�|jdd7<n�|dkr�|jjitdd6d	d6�|jj|j�|j|_nq|t	kr|jjitdd6d
d6�|jj|j�|j|_n!|jdd|7<|j
|_dS(Nu-uu
ParseErrorutypeuinvalid-codepointudatau-�u>uincorrect-commentueof-in-commentT(ustreamucharucommentEndStateustateu
tokenQueueuappendu
tokenTypesucurrentTokenu	dataStateuEOFucommentStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucommentStartDashState�s(u#HTMLTokenizer.commentStartDashStatecCs�|jj�}|dkr*|j|_n�|dkrl|jjitdd6dd6�|jdd7<nq|tkr�|jjitdd6dd6�|jj|j�|j	|_n!|jd||jj
d	�7<d
S(Nu-uu
ParseErrorutypeuinvalid-codepointudatau�ueof-in-comment(u-uT(ustreamucharucommentEndDashStateustateu
tokenQueueuappendu
tokenTypesucurrentTokenuEOFu	dataStateu
charsUntiluTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucommentState�suHTMLTokenizer.commentStatecCs�|jj�}|dkr*|j|_n�|dkrx|jjitdd6dd6�|jdd7<|j|_nq|t	kr�|jjitdd6dd6�|jj|j�|j
|_n!|jdd|7<|j|_d	S(
Nu-uu
ParseErrorutypeuinvalid-codepointudatau-�ueof-in-comment-end-dashT(ustreamucharucommentEndStateustateu
tokenQueueuappendu
tokenTypesucurrentTokenucommentStateuEOFu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucommentEndDashState�s u!HTMLTokenizer.commentEndDashStatecCs�|jj�}|dkr=|jj|j�|j|_n`|dkr�|jjitdd6dd6�|jdd7<|j|_n|dkr�|jjitdd6d	d6�|j	|_n�|d
kr
|jjitdd6dd6�|jd|7<n�|t
krZ|jjitdd6dd6�|jj|j�|j|_nC|jjitdd6d
d6�|jdd|7<|j|_dS(Nu>uu
ParseErrorutypeuinvalid-codepointudatau--�u!u,unexpected-bang-after-double-dash-in-commentu-u,unexpected-dash-after-double-dash-in-commentueof-in-comment-double-dashuunexpected-char-in-commentu--T(ustreamucharu
tokenQueueuappenducurrentTokenu	dataStateustateu
tokenTypesucommentStateucommentEndBangStateuEOFuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucommentEndState�s6uHTMLTokenizer.commentEndStatecCs,|jj�}|dkr=|jj|j�|j|_n�|dkri|jdd7<|j|_n�|dkr�|jjitdd6dd6�|jdd	7<|j	|_nq|t
kr|jjitdd6d
d6�|jj|j�|j|_n!|jdd|7<|j	|_dS(Nu>u-udatau--!uu
ParseErrorutypeuinvalid-codepointu--!�ueof-in-comment-end-bang-stateT(ustreamucharu
tokenQueueuappenducurrentTokenu	dataStateustateucommentEndDashStateu
tokenTypesucommentStateuEOFuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucommentEndBangState�s(u!HTMLTokenizer.commentEndBangStatecCs�|jj�}|tkr*|j|_n�|tkr�|jjitdd6dd6�d|j
d<|jj|j
�|j|_n>|jjitdd6dd6�|jj|�|j|_dS(	Nu
ParseErrorutypeu!expected-doctype-name-but-got-eofudataucorrectuneed-space-after-doctypeFT(ustreamucharuspaceCharactersubeforeDoctypeNameStateustateuEOFu
tokenQueueuappendu
tokenTypesuFalseucurrentTokenu	dataStateuungetuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyudoctypeStates
uHTMLTokenizer.doctypeStatecCs?|jj�}|tkrn|dkr{|jjitdd6dd6�d|jd<|jj|j�|j|_	n�|dkr�|jjitdd6dd6�d	|jd
<|j
|_	nv|tkr"|jjitdd6dd6�d|jd<|jj|j�|j|_	n||jd
<|j
|_	d
S(Nu>u
ParseErrorutypeu+expected-doctype-name-but-got-right-bracketudataucorrectuuinvalid-codepointu�unameu!expected-doctype-name-but-got-eofFT(
ustreamucharuspaceCharactersu
tokenQueueuappendu
tokenTypesuFalseucurrentTokenu	dataStateustateudoctypeNameStateuEOFuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyubeforeDoctypeNameState&s.



u$HTMLTokenizer.beforeDoctypeNameStatecCso|jj�}|tkrG|jdjt�|jd<|j|_n$|dkr�|jdjt�|jd<|jj	|j�|j
|_n�|dkr�|jj	itdd6dd6�|jdd7<|j|_n�|t
krZ|jj	itdd6d	d6�d|jd
<|jdjt�|jd<|jj	|j�|j
|_n|jd|7<dS(
Nunameu>uu
ParseErrorutypeuinvalid-codepointudatau�ueof-in-doctype-nameucorrectFT(ustreamucharuspaceCharactersucurrentTokenu	translateuasciiUpper2LoweruafterDoctypeNameStateustateu
tokenQueueuappendu	dataStateu
tokenTypesudoctypeNameStateuEOFuFalseuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyudoctypeNameState@s,
uHTMLTokenizer.doctypeNameStatecCs�|jj�}|tkrn�|dkrL|jj|j�|j|_n�|tkr�d|jd<|jj
|�|jjitdd6dd6�|jj|j�|j|_n|d krd!}x3d'D]+}|jj�}||kr�d}Pq�q�W|r{|j
|_d!Sna|d(kr{d!}x3d.D]+}|jj�}||kr3d}Pq3q3W|r{|j|_d!Sn|jj
|�|jjitdd6dd6i|d6d6�d|jd<|j|_d!S(/Nu>ucorrectu
ParseErrorutypeueof-in-doctypeudataupuPuuuUubuBuluLuiuIucuCusuSuyuYutuTueuEumuMu*expected-space-or-right-bracket-in-doctypeudatavarsF(upuPT(uuuU(ubuB(uluL(uiuI(ucuC((uuuU(ubuB(uluL(uiuI(ucuC(usuS(uyuY(usuS(utuT(ueuE(umuM((uyuY(usuS(utuT(ueuE(umuM(ustreamucharuspaceCharactersu
tokenQueueuappenducurrentTokenu	dataStateustateuEOFuFalseuungetu
tokenTypesuTrueuafterDoctypePublicKeywordStateuafterDoctypeSystemKeywordStateubogusDoctypeState(uselfudataumatcheduexpected((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuafterDoctypeNameStateYsT



u#HTMLTokenizer.afterDoctypeNameStatecCs�|jj�}|tkr*|j|_n�|d	krw|jjitdd6dd6�|jj|�|j|_ny|t	kr�|jjitdd6dd6�d
|jd<|jj|j�|j|_n|jj|�|j|_dS(Nu'u"u
ParseErrorutypeuunexpected-char-in-doctypeudataueof-in-doctypeucorrect(u'u"FT(ustreamucharuspaceCharactersu"beforeDoctypePublicIdentifierStateustateu
tokenQueueuappendu
tokenTypesuungetuEOFuFalseucurrentTokenu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuafterDoctypePublicKeywordState�s"
u,HTMLTokenizer.afterDoctypePublicKeywordStatecCsg|jj�}|tkrnE|dkrFd|jd<|j|_n|dkrnd|jd<|j|_n�|dkr�|jjit	dd6dd	6�d
|jd
<|jj|j�|j|_n�|tkr(|jjit	dd6dd	6�d
|jd
<|jj|j�|j|_n;|jjit	dd6dd	6�d
|jd
<|j
|_dS(Nu"uupublicIdu'u>u
ParseErrorutypeuunexpected-end-of-doctypeudataucorrectueof-in-doctypeuunexpected-char-in-doctypeFT(ustreamucharuspaceCharactersucurrentTokenu(doctypePublicIdentifierDoubleQuotedStateustateu(doctypePublicIdentifierSingleQuotedStateu
tokenQueueuappendu
tokenTypesuFalseu	dataStateuEOFubogusDoctypeStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu"beforeDoctypePublicIdentifierState�s4




u0HTMLTokenizer.beforeDoctypePublicIdentifierStatecCs;|jj�}|dkr*|j|_n
|dkrl|jjitdd6dd6�|jdd7<n�|d	kr�|jjitdd6d
d6�d
|jd<|jj|j�|j	|_nn|t
kr&|jjitdd6dd6�d
|jd<|jj|j�|j	|_n|jd|7<dS(Nu"uu
ParseErrorutypeuinvalid-codepointudataupublicIdu�u>uunexpected-end-of-doctypeucorrectueof-in-doctypeFT(ustreamucharu!afterDoctypePublicIdentifierStateustateu
tokenQueueuappendu
tokenTypesucurrentTokenuFalseu	dataStateuEOFuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu(doctypePublicIdentifierDoubleQuotedState�s*

u6HTMLTokenizer.doctypePublicIdentifierDoubleQuotedStatecCs;|jj�}|dkr*|j|_n
|dkrl|jjitdd6dd6�|jdd7<n�|d	kr�|jjitdd6d
d6�d
|jd<|jj|j�|j	|_nn|t
kr&|jjitdd6dd6�d
|jd<|jj|j�|j	|_n|jd|7<dS(Nu'uu
ParseErrorutypeuinvalid-codepointudataupublicIdu�u>uunexpected-end-of-doctypeucorrectueof-in-doctypeFT(ustreamucharu!afterDoctypePublicIdentifierStateustateu
tokenQueueuappendu
tokenTypesucurrentTokenuFalseu	dataStateuEOFuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu(doctypePublicIdentifierSingleQuotedState�s*

u6HTMLTokenizer.doctypePublicIdentifierSingleQuotedStatecCs�|jj�}|tkr*|j|_nZ|dkrX|jj|j�|j|_n,|dkr�|jjit	dd6dd6�d|jd<|j
|_n�|d	kr�|jjit	dd6dd6�d|jd<|j|_n�|tkrI|jjit	dd6d
d6�d|jd<|jj|j�|j|_n;|jjit	dd6dd6�d|jd<|j|_d
S(Nu>u"u
ParseErrorutypeuunexpected-char-in-doctypeudatauusystemIdu'ueof-in-doctypeucorrectFT(ustreamucharuspaceCharactersu-betweenDoctypePublicAndSystemIdentifiersStateustateu
tokenQueueuappenducurrentTokenu	dataStateu
tokenTypesu(doctypeSystemIdentifierDoubleQuotedStateu(doctypeSystemIdentifierSingleQuotedStateuEOFuFalseubogusDoctypeStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu!afterDoctypePublicIdentifierState�s6



u/HTMLTokenizer.afterDoctypePublicIdentifierStatecCs8|jj�}|tkrn|dkrL|jj|j�|j|_n�|dkrtd|jd<|j|_n�|dkr�d|jd<|j	|_n�|t
kr�|jjitdd6dd	6�d|jd
<|jj|j�|j|_n;|jjitdd6dd	6�d|jd
<|j
|_d
S(Nu>u"uusystemIdu'u
ParseErrorutypeueof-in-doctypeudataucorrectuunexpected-char-in-doctypeFT(ustreamucharuspaceCharactersu
tokenQueueuappenducurrentTokenu	dataStateustateu(doctypeSystemIdentifierDoubleQuotedStateu(doctypeSystemIdentifierSingleQuotedStateuEOFu
tokenTypesuFalseubogusDoctypeStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu-betweenDoctypePublicAndSystemIdentifiersStates.



u;HTMLTokenizer.betweenDoctypePublicAndSystemIdentifiersStatecCs�|jj�}|tkr*|j|_n�|d	krw|jjitdd6dd6�|jj|�|j|_ny|t	kr�|jjitdd6dd6�d
|jd<|jj|j�|j|_n|jj|�|j|_dS(Nu'u"u
ParseErrorutypeuunexpected-char-in-doctypeudataueof-in-doctypeucorrect(u'u"FT(ustreamucharuspaceCharactersu"beforeDoctypeSystemIdentifierStateustateu
tokenQueueuappendu
tokenTypesuungetuEOFuFalseucurrentTokenu	dataStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyuafterDoctypeSystemKeywordState%s"
u,HTMLTokenizer.afterDoctypeSystemKeywordStatecCsg|jj�}|tkrnE|dkrFd|jd<|j|_n|dkrnd|jd<|j|_n�|dkr�|jjit	dd6dd	6�d|jd
<|jj|j�|j|_n�|tkr(|jjit	dd6dd	6�d|jd
<|jj|j�|j|_n;|jjit	dd6dd	6�d|jd
<|j
|_d
S(Nu"uusystemIdu'u>u
ParseErrorutypeuunexpected-char-in-doctypeudataucorrectueof-in-doctypeFT(ustreamucharuspaceCharactersucurrentTokenu(doctypeSystemIdentifierDoubleQuotedStateustateu(doctypeSystemIdentifierSingleQuotedStateu
tokenQueueuappendu
tokenTypesuFalseu	dataStateuEOFubogusDoctypeStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu"beforeDoctypeSystemIdentifierState9s4




u0HTMLTokenizer.beforeDoctypeSystemIdentifierStatecCs;|jj�}|dkr*|j|_n
|dkrl|jjitdd6dd6�|jdd7<n�|d	kr�|jjitdd6d
d6�d
|jd<|jj|j�|j	|_nn|t
kr&|jjitdd6dd6�d
|jd<|jj|j�|j	|_n|jd|7<dS(Nu"uu
ParseErrorutypeuinvalid-codepointudatausystemIdu�u>uunexpected-end-of-doctypeucorrectueof-in-doctypeFT(ustreamucharu!afterDoctypeSystemIdentifierStateustateu
tokenQueueuappendu
tokenTypesucurrentTokenuFalseu	dataStateuEOFuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu(doctypeSystemIdentifierDoubleQuotedStateVs*

u6HTMLTokenizer.doctypeSystemIdentifierDoubleQuotedStatecCs;|jj�}|dkr*|j|_n
|dkrl|jjitdd6dd6�|jdd7<n�|d	kr�|jjitdd6d
d6�d
|jd<|jj|j�|j	|_nn|t
kr&|jjitdd6dd6�d
|jd<|jj|j�|j	|_n|jd|7<dS(Nu'uu
ParseErrorutypeuinvalid-codepointudatausystemIdu�u>uunexpected-end-of-doctypeucorrectueof-in-doctypeFT(ustreamucharu!afterDoctypeSystemIdentifierStateustateu
tokenQueueuappendu
tokenTypesucurrentTokenuFalseu	dataStateuEOFuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu(doctypeSystemIdentifierSingleQuotedStatens*

u6HTMLTokenizer.doctypeSystemIdentifierSingleQuotedStatecCs�|jj�}|tkrn�|dkrL|jj|j�|j|_n�|tkr�|jjit	dd6dd6�d|jd<|jj|j�|j|_n.|jjit	dd6dd6�|j|_d	S(
Nu>u
ParseErrorutypeueof-in-doctypeudataucorrectuunexpected-char-in-doctypeFT(
ustreamucharuspaceCharactersu
tokenQueueuappenducurrentTokenu	dataStateustateuEOFu
tokenTypesuFalseubogusDoctypeStateuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu!afterDoctypeSystemIdentifierState�s 
u/HTMLTokenizer.afterDoctypeSystemIdentifierStatecCs|jj�}|dkr=|jj|j�|j|_n>|tkr{|jj|�|jj|j�|j|_ndS(Nu>T(
ustreamucharu
tokenQueueuappenducurrentTokenu	dataStateustateuEOFuungetuTrue(uselfudata((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyubogusDoctypeState�suHTMLTokenizer.bogusDoctypeStatecCseg}x�|j|jjd��|j|jjd��|jj�}|tkrZPq	|dkslt�|ddd�dkr�|ddd�|d<Pq	|j|�q	dj|�}|jd�}|dkr*x6t|�D](}|j	jit
d	d
6dd6�q�W|jdd
�}n|rU|j	jit
dd
6|d6�n|j|_
dS(Nu]u>iiu]]uuiu
ParseErrorutypeuinvalid-codepointudatau�u
Charactersi����i����i����i����i����T(uappendustreamu
charsUntilucharuEOFuAssertionErrorujoinucounturangeu
tokenQueueu
tokenTypesureplaceu	dataStateustateuTrue(uselfudataucharu	nullCountui((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyucdataSectionState�s0uHTMLTokenizer.cdataSectionStateNTF(Pu__name__u
__module__u__qualname__u__doc__uNoneuTrueu__init__u__iter__uconsumeNumberEntityuFalseu
consumeEntityuprocessEntityInAttributeuemitCurrentTokenu	dataStateuentityDataStateurcdataStateucharacterReferenceInRcdataurawtextStateuscriptDataStateuplaintextStateutagOpenStateucloseTagOpenStateutagNameStateurcdataLessThanSignStateurcdataEndTagOpenStateurcdataEndTagNameStateurawtextLessThanSignStateurawtextEndTagOpenStateurawtextEndTagNameStateuscriptDataLessThanSignStateuscriptDataEndTagOpenStateuscriptDataEndTagNameStateuscriptDataEscapeStartStateuscriptDataEscapeStartDashStateuscriptDataEscapedStateuscriptDataEscapedDashStateuscriptDataEscapedDashDashStateu"scriptDataEscapedLessThanSignStateu scriptDataEscapedEndTagOpenStateu scriptDataEscapedEndTagNameStateu scriptDataDoubleEscapeStartStateuscriptDataDoubleEscapedStateu scriptDataDoubleEscapedDashStateu$scriptDataDoubleEscapedDashDashStateu(scriptDataDoubleEscapedLessThanSignStateuscriptDataDoubleEscapeEndStateubeforeAttributeNameStateuattributeNameStateuafterAttributeNameStateubeforeAttributeValueStateuattributeValueDoubleQuotedStateuattributeValueSingleQuotedStateuattributeValueUnQuotedStateuafterAttributeValueStateuselfClosingStartTagStateubogusCommentStateumarkupDeclarationOpenStateucommentStartStateucommentStartDashStateucommentStateucommentEndDashStateucommentEndStateucommentEndBangStateudoctypeStateubeforeDoctypeNameStateudoctypeNameStateuafterDoctypeNameStateuafterDoctypePublicKeywordStateu"beforeDoctypePublicIdentifierStateu(doctypePublicIdentifierDoubleQuotedStateu(doctypePublicIdentifierSingleQuotedStateu!afterDoctypePublicIdentifierStateu-betweenDoctypePublicAndSystemIdentifiersStateuafterDoctypeSystemKeywordStateu"beforeDoctypeSystemIdentifierStateu(doctypeSystemIdentifierDoubleQuotedStateu(doctypeSystemIdentifierSingleQuotedStateu!afterDoctypeSystemIdentifierStateubogusDoctypeStateucdataSectionState(u
__locals__((u	__class__u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu
HTMLTokenizers�	HP#

7 "-3u
HTMLTokenizerN(u
__future__uabsolute_importudivisionuunicode_literalsuunichruchru	NameErrorucollectionsudequeu	constantsuspaceCharactersuentitiesuasciiLettersuasciiUpper2Lowerudigitsu	hexDigitsuEOFu
tokenTypesu
tagTokenTypesureplacementCharactersuinputstreamuHTMLInputStreamutrieuTrieuentitiesTrieuobjectu
HTMLTokenizer(((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/tokenizer.pyu<module>s

python3.3/site-packages/pip/_vendor/html5lib/__pycache__/__init__.cpython-33.pyc000064400000002255151733566750023415 0ustar00�
7�Re�c@s�dZddlmZmZmZddlmZmZmZddl	m
Z
ddlmZddl
mZdd	d
ddd
gZdZdS(uM
HTML parsing library based on the WHATWG "HTML5"
specification. The parser is designed to be compatible with existing
HTML found in the wild and implements well-defined error recovery that
is largely compatible with modern desktop web browsers.

Example usage:

import html5lib
f = open("my_document.html")
tree = html5lib.parse(f)
i(uabsolute_importudivisionuunicode_literalsi(u
HTMLParseruparseu
parseFragment(ugetTreeBuilder(u
getTreeWalker(u	serializeu
HTMLParseruparseu
parseFragmentugetTreeBuilderu
getTreeWalkeru	serializeu1.0b3N(u__doc__u
__future__uabsolute_importudivisionuunicode_literalsuhtml5parseru
HTMLParseruparseu
parseFragmentutreebuildersugetTreeBuilderutreewalkersu
getTreeWalkeru
serializeru	serializeu__all__u__version__(((u6/tmp/pip-zej_zi-build/pip/_vendor/html5lib/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/__pycache__/constants.cpython-33.pyc000064400000253063151733566750023677 0ustar00�
7�Re2UcP@s�TddlmZmZmZddlZddlZejZdZied�d6ed�d6ed�d6ed	�d
6ed�d6ed
�d6ed�d6ed�d6ed�d6ed�d6ed�d6ed�d6ed�d6ed�d6ed�d 6ed!�d"6ed#�d$6ed%�d&6ed'�d(6ed)�d*6ed+�d,6ed-�d.6ed/�d06ed1�d26ed3�d46ed5�d66ed7�d86ed9�d:6ed;�d<6ed=�d>6ed?�d@6edA�dB6edC�dD6edE�dF6edG�dH6edI�dJ6edK�dL6edM�dN6edO�dP6edQ�dR6edS�dT6edU�dV6edW�dX6edY�dZ6ed[�d\6edU�d]6edU�d^6ed_�d`6eda�db6edc�dd6ede�df6edg�dh6edi�dj6edk�dl6edm�dn6edo�dp6edq�dr6eds�dt6edu�dv6edw�dx6edy�dz6ed{�d|6ed}�d~6ed�d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6Z	id�d6dd6dd6dd6dd6d	d
6Z
ee
ddfe
ddfe
ddfe
dd
fe
ddfe
ddfe
ddfe
ddfe
ddfe
ddfe
ddfe
ddfe
ddfe
ddfe
ddfe
ddfe
ddff�Zee
ddfe
ddfe
ddfe
ddfe
ddfe
dd fe
dd!fe
dd"fe
dd#fe
dd$fe
dd%fe
dd&fe
dd'fe
dd(ff�Z
ee
dd)fe
ddfe
dd*fe
dd+fe
dd,fe
dd-fe
dd.fe
dd/fe
dd0fe
dd1fe
dd2fe
dd3fe
ddfe
dd4fe
dd5fe
dd6fe
dd7fe
dd8fe
dd9fe
dd:fe
dd;fe
dd<fe
dd=fe
dd>fe
dd?fe
dd@fe
ddAfe
ddBfe
ddCfe
ddDfe
ddEfe
ddFfe
ddGfe
ddHfe
ddIfe
ddJfe
ddKfe
ddLfe
ddMfe
ddfe
ddNfe
ddOfe
ddPfe
ddQfe
ddRfe
ddSfe
ddTfe
ddUfe
dd
fe
ddVfe
ddWfe
ddXfe
ddYfe
ddZfe
dd[fe
ddfe
dd\fe
dd]fe
dd^fe
dd_fe
dd`fe
ddafe
ddbfe
ddcfe
dddfe
ddfe
ddefe
ddfe
ddffe
ddgfe
ddfe
ddhfe
ddfe
ddife
ddjfe
ddkfe
ddlfe
ddffN�Zee
ddmfe
ddfe
ddfe
ddff�Zee
ddfe
ddfe
ddfe
ddfe
ddff�Ziddne
dfdo6ddpe
dfdq6ddre
dfds6ddte
dfdu6ddve
dfdw6dde
dfdx6ddye
dfdz6dd-e
dfd{6dd|e
dfd}6dd~e
dfd6dd
e
d
fd
6d
de
d
fd�6Zed�d��ej�D��Zed��Zed��Zeej�Zeej�Zeej�Zeej�Zeej�Zed�d��ejD��Z d�Z!ed��Z"ed��Z#ed��Z$ied��d�6ed��dd6ed��dP6ed��d�6ed��d�6ed��da6ed��d96ed��d�6ed��d76ed��dM6ed��dV6ed��d?6ed��d�6ed��d�6ed��d36ed��dQ6ed��dc6ed��d�6Z%d�Z&ed��Z'i�d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6dd6dd6dd6dd6d�d	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6dd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6ddQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d?d�6dzd�6d�d�6d�d�6d�d�6d^d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d3d96d:d;6d
d<6d=d>6d?d@6dAdB6dCdD6dEdF6dEdG6dHdI6dHdJ6dKdL6dMdN6dOdP6dQdR6dQdS6dOdT6dUdV6dWdX6d�dY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6dpdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6d'd"6dd#6d�d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d1d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d9d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6d�d6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6d�dG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6d�dh6d�di6ddj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dkd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6d�d6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dLdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dde6dfdg6dhdi6djdk6dldm6dndo6dndp6dqdr6dsdt6dudv6dwdx6dydz6dyd{6djd|6djd}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dOd�6d�d�6d�d�6d�d�6d�d�6dGd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6dd6d^d6d	d
6d�d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6d6d6dd6d d!6d�d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d�d=6d�d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6d7ds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d
d�6d�d�6d=d�6d=d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d+d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d$d�6d$d�6d�d�6d�d�6d�d�6d&d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6d�d6d�d6dd6d	d
6dd6dod
6dd6dCd6d�d6dd6dAd6dd6dEd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6d/dI6d1dJ6dKdL6dMdN6dOdP6dOdQ6d3dR6dEdS6dKdT6dMdU6d3dV6dWdX6dYdZ6d�d[6d\d]6d^d_6d`da6d�db6dcdd6d�de6dfdg6dndh6didj6dkdl6dvdm6dZdn6dodp6dqdr6dsdt6dsdu6dvdw6dxdy6dzd{6d|d}6d�d~6d)d6dtd�6dtd�6d�d�6d�d�6dzd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dld�6d~d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dod�6d�d�6d)d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d%d�6d�d�6dd�6d�d�6d�d�6d�d�6dqd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d	d	6d	d	6d	d	6d	d	6d	d		6d
	d	6d
	d	6d
	d	6d�d	6d�d	6d�d	6d�d	6d�d	6d	d	6d	d	6d=d	6d	d	6d	d	6d	d	6d	d 	6d!	d"	6d~d#	6d�d$	6d%	d&	6d'	d(	6d'	d)	6d*	d+	6d*	d,	6d-	d.	6d/	d0	6d�d1	6d�d2	6d�d3	6d�d4	6d5	d6	6d7	d8	6d9	d:	6d;	d<	6d=	d>	6d?	d@	6dA	dB	6dC	dD	6dE	dF	6dG	dH	6dI	dJ	6dK	dL	6dM	dN	6d�dO	6dP	dQ	6dR	dS	6dT	dU	6dV	dW	6dV	dX	6dY	dZ	6d[	d\	6d[	d]	6d^	d_	6d`	da	6db	dc	6dd	de	6df	dg	6dh	di	6dh	dj	6dk	dl	6dm	dn	6do	dp	6dq	dr	6ds	dt	6du	dv	6dw	dx	6dy	dz	6d{	d|	6dd}	6d~	d	6d�	d�	6d�	d�	6d�d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6dd�	6dd�	6dd�	6dd�	6d!d�	6d!d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d'd�	6dd�	6d�	d�	6d�	d�	6dd�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6dpd�	6d�	d�	6d#d�	6d�	d�	6d�	d�	6dd�	6dd�6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6dd�	6d~	d�	6dd�	6d#d�	6d�	d�	6d�	d�	6d�d�	6d*d�	6dV	d�	6d3d�	6d�	d�	6d�d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d
6d
d
6d
d
6d�	d
6d
d
6d
d	
6dcd

6d
d
6d
d
6d`d
6d
d
6d
d
6d
d
6d
d
6d
d
6d
d
6d�d
6d
d
6d
d
6d
d
6dWd
6d 
d!
6d"
d#
6d$
d%
6d&
d'
6d(
d)
6d*
d+
6dOd,
6djd-
6dOd.
6d/
d0
6d1
d2
6d3
d4
6d�d5
6d6
d7
6d8
d9
6d:
d;
6d/
d<
6d\d=
6d>
d?
6djd@
6d>
dA
6dB
dC
6dD
dE
6dF
dG
6dH
dI
6dJ
dK
6dL
dM
6dD
dN
6dO
dP
6dO
dQ
6dR
dS
6d�dT
6dU
dV
6dW
dX
6dY
dZ
6d[
d\
6d�d]
6dbd^
6d_
d`
6da
db
6dc
dd
6dc
de
6df
dg
6dh
di
6dj
dk
6dl
dm
6dn
do
6dp
dq
6dr
ds
6dt
du
6dv
dw
6dx
dy
6dz
d{
6d|
d}
6d~
d
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�d�
6d�
d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d�
d�
6d�	d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d�d�
6d�d�
6dd�
6d�	d�
6d�
d�
6d�d�
6d�
d�
6d�d�
6d�d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�d6d�d6dd6d�d6dd6d�d6dd	6d�d
6d�d6dd
6dd6dd6dd6d�
d6d�d6dd6dd6dd6dd6dd6dd6d d!6d d"6d#d$6d#d%6dd&6d'd(6d)d*6d+d,6d�d-6d�d.6d�d/6d0d16d�d26d�
d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d�d@6dAdB6dAdC6d dD6dEdF6dGdH6d�dI6d�dJ6ddK6dLdM6dNdO6dPdQ6dRdS6dTdU6d�dV6d�dW6dXdY6dZd[6d�
d\6d�d]6d^d_6d`da6d�db6d�d�6dcdd6dedf6d�
dg6d�
dh6didj6dkdl6dmdn6dodp6dqdr6d�ds6d'dt6dudv6dwdx6dydz6dyd{6d|d}6d~d6d~d�6d�d�6d�d�6d�d�6d1d�6d1d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d"d�6d�d�6d�d�6d&d�6d&d�6d�d�6d|d�6d�d�6d�d�6d�d�6d�	d�6dd�6d�d�6d�d�6dd�6d�d�6dsd�6d�d�6d�d�6d�d�6d�d�6d�d�6dCd�6d�d�6d�d�6d�d�6d�d�6d[d�6d�d�6d�d�6d�d�6ddd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d+d�6d)d�6d)d�6dKd�6dMd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d7d�6d�d�6d�d�6dd�6dd�6d�d�6d/d�6d�d�6d9d�6d;d�6d;d�6d�d6dAd6d?d6d?d6dAd6dGd6dGd6dId6d=d6d=d	6d�d
6dd6d
d6dd6dd6dd6dd6dd6d�d6dd6dd6dd6dWd6dd6dd 6dWd!6dd"6d]d#6d]d$6dUd%6d_d&6dUd'6dOd(6dSd)6d�d*6d+d,6d-d.6d-d/6d5d06d1d26d3d46d5d56d6d76d8d96dkd:6dkd;6d<d=6d>d?6d3d@6d3dA6dBdC6dDdE6dFdG6dedH6didI6dgdJ6dedK6dgdL6d�dM6dNdO6dPdQ6dRdS6dNdT6dmdU6dqdV6ddW6d�dX6d�dY6dZd[6d�d\6d3d]6d�d^6d�d_6d�d`6d�da6d3db6dudc6dydd6dedf6dgdh6d}di6d{dj6d}dk6dgdl6ddm6d�dn6dodp6dqdr6d�ds6d�dt6d�du6dqdv6dEdw6dxdy6dxdz6dYd{6dOd|6dSd}6dmd~6dqd6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d+d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dAd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d-d�6d�d�6d�d�6d�d�6d/d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d
6d�d
6d
d
6d
d
6d
d
6d1d
6d
d	
6d

d
6d

d
6d

d
6d�d
6d
d
6d
d
6d�d
6d
d
6d
d
6d�d
6d
d
6d
d
6d
d
6d
d 
6d�d!
6d"
d#
6d$
d%
6d&
d'
6d(
d)
6dd*
6d+
d,
6d-
d.
6dP	d/
6d0
d1
6d�	d2
6d3
d4
6d�	d5
6d6
d7
6d8
d9
6d~d:
6d;
d<
6d�d=
6d>
d?
6d@
dA
6d�dB
6d�dC
6dD
dE
6dF
dG
6d�dH
6dI
dJ
6dK
dL
6dM
dN
6dM
dO
6d�dP
6dQ
dR
6dS
dT
6d�dU
6d�dV
6d�dW
6dS
dX
6d�dY
6d�dZ
6d[
d\
6d]
d^
6d_
d`
6d�da
6db
dc
6d�dd
6d]
de
6d[
df
6d_
dg
6d�dh
6di
dj
6dk
dl
6dm
dn
6d�do
6d�dp
6d�dq
6dr
ds
6dt
du
6dv
dw
6dx
dy
6dz
d{
6d 
d|
6d}
d~
6d
d�
6d�
d�
6d5d�
6d�
d�
6d�
d�
6d	d�
6d�d�
6d�d�6dLd�
6d�d�
6d�
d�
6dfd�
6d�
d�
6d�
d�
6d�
d�
6dsd�
6d�
d�
6dd�
6d�
d�
6d�
d�
6dd�
6d�
d�
6d�
d�
6dd�
6d�
d�
6dd�
6d�
d�
6d�
d�
6d�
d�
6d�	d�
6d4d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6dd�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d#d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d5d�
6d5d�
6d�
d�
6dd�
6dNd�
6dd�
6dHd�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d-d�
6d�
d�
6d�d�
6dCd�
6d�
d�
6d�
d�
6d�
d�
6dd�
6d�
d�
6d�d�
6dCd�
6d!d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d	d�
6d!d�
6d�d�
6d�
d�
6d�
d�
6d�
d6dd6dd6dd6d%d6dd	6d
d6dd
6dd6dd6dd6dd6d�
d6dd6dd6dPd6d�
d6d7d6d7d6d�
d6d d!6d"d#6d9d$6d)d%6d&d'6d(d)6d*d+6d,d-6d^d.6d�d/6d0d16d2d36d4d56d�d66d�d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6d�dD6dEdF6dGdH6d�dI6dJdK6dLdM6d�	dN6d�dO6d�dP6dQdR6dQdS6dTdU6dVdW6d�dX6d�dY6dZd[6d\d]6dy	d^6d_d`6dadb6dcdd6d"de6d�df6dgdh6dgdi6djdk6dldm6dldn6d�do6dpdq6d�dr6d�ds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d"d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dwd�6d�d�6d�d�6d�d�6dyd�6d{d�6dyd�6d{d�6d}d�6dd�6d}d�6dd�6dud�6dud�6d�d�6d�d�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6dd�6d
	d�6d(
d�6d~d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d2d�6d�d�6d�d�6d>d�6d<d�6d@d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6dd6dd6dd6d�d6d�d6d�d	6dd
6dd6dd
6dd6dd6dd6d�	d6d�d6d�d6dd6dd6dd6dd6dd6d�d 6d!d"6d#d$6d%d&6d�d'6d(d)6d*d+6d�d,6d�d-6d.d/6d0d16d0d26d�d36d�d46d�d56d�d66d�d76d8d96d8d:6drd;6d<d=6d<d>6d�d?6d@dA6dBdC6d"
dD6d�dE6d�dF6dGdH6dIdJ6dKdL6dMdN6dVdO6dPdQ6d�dR6dSdT6d�dU6dqdV6d�dW6dXdY6d"dZ6d9d[6d\d]6dXd^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6ddq6d�dr6dds6d�dt6dudv6dwdx6dwdy6dkdz6d{d|6d}d~6dd�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d?d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dzd�6dzd�6d�d�6d�d�6dkd�6d�d�6d�d�6d?d�6d�d�6d�d�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dSd�6d#d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d
	d�6dx
d�6d�d�6d(
d�6d0
d�6d�d�6d�d�6d�
d�6dld�6d�d�6d�d�6d�d�6d�d�6d0d�6d�d�6d5d�6d�d�6d/d�6d�d�6d�d�6d�d�6d�d�6d$d�6d$d�6d�d�6d�d�6d{d�6d�d�6d�d�6d�d�6d5d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6d�d6dd6dd6dd6dd	6dd
6d(d6d(d6d
d6d^d6d	d6d�d6dd6dd6d�d6d�d6dd6d�d6d�d6d0d6dd6dd6dd 6dd!6dd"6d�d#6d�d$6d%d&6dd'6dd(6dd)6dd*6d6d+6d,d-6d,d.6d/d06d1d26d3d46d5d66d5d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dBdD6dEdF6dGdH6dIdJ6dKdL6dhdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6Z(i#d^d6d�d_6d-	d`6dadb6dadb6d^dc6dK	dd6d�de6d�	df6d^dg6dZdh6d�di6d
dj6d^dk6dRdl6d�dm6dndo6d_dp6dqdr6dsdt6d�du6d7dv6d�dw6d5dx6d�dy6d�dz6d�d{6drd|6d�d}6d4d~6dd6d�d�6d�d�6dGd�6dYd�6Z)i�d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6d�d6d�d6d�d�6d�d6d�d6d�d6d�d6dd6d�d	6d�d
6d�d6d�d6d�d
6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d 6d�d!6d�d"6d�d#6d�d$6d�d%6d&d'6d(d)6d(d*6d+d,6d-d.6d-d/6d�d06d�d16d�d26d�d36d�d46d�d56d�d66d�d76d�d86d�d96d�d:6d�d;6d�d<6d�d=6d�d>6d�d?6d(d@6d�dA6d�dB6d�dC6d�dD6d�dE6d�dF6d�dG6d�dH6d�dI6d�dJ6d�dK6d(dL6d-dM6d�dN6d�dO6d�dP6dQdR6d�dS6d�dT6d�dU6d�dV6d�dW6d-dX6d�dY6d�dZ6d�d[6d�d\6d�d]6d(d^6d�d_6d-d`6d�da6d�db6d�dc6d�dd6d�de6d(df6d+dg6d�dh6d�di6d�dj6d�d�6d�dk6d�dl6d�dm6dndo6d�dp6d�dq6d�dr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Z*idd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Z+ee+d�e+d�e+d�f�Z,ed�d��e
j�D��Z-d�e-d<Gd�d��d�e.�Z/Gd�d��d�e0�Z1dS(�i(uabsolute_importudivisionuunicode_literalsNu5Null character in input stream, replaced with U+FFFD.unull-characteruInvalid codepoint in stream.uinvalid-codepointu&Solidus (/) incorrectly placed in tag.uincorrectly-placed-solidusu.Incorrect CR newline entity, replaced with LF.uincorrect-cr-newline-entityu9Entity used with illegal number (windows-1252 reference).uillegal-windows-1252-entityuPNumeric entity couldn't be converted to character (codepoint U+%(charAsInt)08x).ucant-convert-numeric-entityuBNumeric entity represents an illegal codepoint: U+%(charAsInt)08x.u$illegal-codepoint-for-numeric-entityu#Numeric entity didn't end with ';'.u numeric-entity-without-semicolonu1Numeric entity expected. Got end of file instead.u#expected-numeric-entity-but-got-eofu'Numeric entity expected but none found.uexpected-numeric-entityu!Named entity didn't end with ';'.unamed-entity-without-semicolonu Named entity expected. Got none.uexpected-named-entityu'End tag contains unexpected attributes.uattributes-in-end-tagu.End tag contains unexpected self-closing flag.uself-closing-flag-on-end-tagu#Expected tag name. Got '>' instead.u'expected-tag-name-but-got-right-bracketuSExpected tag name. Got '?' instead. (HTML doesn't support processing instructions.)u'expected-tag-name-but-got-question-marku-Expected tag name. Got something else insteaduexpected-tag-nameu6Expected closing tag. Got '>' instead. Ignoring '</>'.u*expected-closing-tag-but-got-right-bracketu-Expected closing tag. Unexpected end of file.u expected-closing-tag-but-got-eofu<Expected closing tag. Unexpected character '%(data)s' found.u!expected-closing-tag-but-got-charu'Unexpected end of file in the tag name.ueof-in-tag-nameu8Unexpected end of file. Expected attribute name instead.u#expected-attribute-name-but-got-eofu)Unexpected end of file in attribute name.ueof-in-attribute-nameu#Invalid character in attribute nameu#invalid-character-in-attribute-nameu#Dropped duplicate attribute on tag.uduplicate-attributeu1Unexpected end of file. Expected = or end of tag.u$expected-end-of-tag-name-but-got-eofu1Unexpected end of file. Expected attribute value.u$expected-attribute-value-but-got-eofu*Expected attribute value. Got '>' instead.u.expected-attribute-value-but-got-right-bracketu"Unexpected = in unquoted attributeu"equals-in-unquoted-attribute-valueu*Unexpected character in unquoted attributeu0unexpected-character-in-unquoted-attribute-valueu*Unexpected character after attribute name.u&invalid-character-after-attribute-nameu+Unexpected character after attribute value.u*unexpected-character-after-attribute-valueu.Unexpected end of file in attribute value (").u#eof-in-attribute-value-double-quoteu.Unexpected end of file in attribute value (').u#eof-in-attribute-value-single-quoteu*Unexpected end of file in attribute value.u eof-in-attribute-value-no-quotesu)Unexpected end of file in tag. Expected >u#unexpected-EOF-after-solidus-in-tagu/Unexpected character after / in tag. Expected >u)unexpected-character-after-solidus-in-tagu&Expected '--' or 'DOCTYPE'. Not found.uexpected-dashes-or-doctypeu Unexpected ! after -- in commentu,unexpected-bang-after-double-dash-in-commentu$Unexpected space after -- in commentu-unexpected-space-after-double-dash-in-commentuIncorrect comment.uincorrect-commentu"Unexpected end of file in comment.ueof-in-commentu%Unexpected end of file in comment (-)ueof-in-comment-end-dashu+Unexpected '-' after '--' found in comment.u,unexpected-dash-after-double-dash-in-commentu'Unexpected end of file in comment (--).ueof-in-comment-double-dashueof-in-comment-end-space-stateueof-in-comment-end-bang-stateu&Unexpected character in comment found.uunexpected-char-in-commentu(No space after literal string 'DOCTYPE'.uneed-space-after-doctypeu.Unexpected > character. Expected DOCTYPE name.u+expected-doctype-name-but-got-right-bracketu.Unexpected end of file. Expected DOCTYPE name.u!expected-doctype-name-but-got-eofu'Unexpected end of file in DOCTYPE name.ueof-in-doctype-nameu"Unexpected end of file in DOCTYPE.ueof-in-doctypeu%Expected space or '>'. Got '%(data)s'u*expected-space-or-right-bracket-in-doctypeuUnexpected end of DOCTYPE.uunexpected-end-of-doctypeu Unexpected character in DOCTYPE.uunexpected-char-in-doctypeuXXX innerHTML EOFueof-in-innerhtmluUnexpected DOCTYPE. Ignored.uunexpected-doctypeu%html needs to be the first start tag.u
non-html-rootu)Unexpected End of file. Expected DOCTYPE.uexpected-doctype-but-got-eofuErroneous DOCTYPE.uunknown-doctypeu2Unexpected non-space characters. Expected DOCTYPE.uexpected-doctype-but-got-charsu2Unexpected start tag (%(name)s). Expected DOCTYPE.u"expected-doctype-but-got-start-tagu0Unexpected end tag (%(name)s). Expected DOCTYPE.u expected-doctype-but-got-end-tagu?Unexpected end tag (%(name)s) after the (implied) root element.uend-tag-after-implied-rootu4Unexpected end of file. Expected end tag (%(name)s).u&expected-named-closing-tag-but-got-eofu4Unexpected start tag head in existing head. Ignored.u!two-heads-are-not-better-than-oneu'Unexpected end tag (%(name)s). Ignored.uunexpected-end-tagu;Unexpected start tag (%(name)s) that can be in head. Moved.u#unexpected-start-tag-out-of-my-headu Unexpected start tag (%(name)s).uunexpected-start-taguMissing end tag (%(name)s).umissing-end-taguMissing end tags (%(name)s).umissing-end-tagsuCUnexpected start tag (%(startName)s) implies end tag (%(endName)s).u$unexpected-start-tag-implies-end-tagu@Unexpected start tag (%(originalName)s). Treated as %(newName)s.uunexpected-start-tag-treated-asu,Unexpected start tag %(name)s. Don't use it!udeprecated-tagu'Unexpected start tag %(name)s. Ignored.uunexpected-start-tag-ignoreduEUnexpected end tag (%(gotName)s). Missing end tag (%(expectedName)s).u$expected-one-end-tag-but-got-anotheru:End tag (%(name)s) seen too early. Expected other end tag.uend-tag-too-earlyuFUnexpected end tag (%(gotName)s). Expected end tag (%(expectedName)s).uend-tag-too-early-namedu+End tag (%(name)s) seen too early. Ignored.uend-tag-too-early-ignoreduQEnd tag (%(name)s) violates step 1, paragraph 1 of the adoption agency algorithm.uadoption-agency-1.1uQEnd tag (%(name)s) violates step 1, paragraph 2 of the adoption agency algorithm.uadoption-agency-1.2uQEnd tag (%(name)s) violates step 1, paragraph 3 of the adoption agency algorithm.uadoption-agency-1.3uQEnd tag (%(name)s) violates step 4, paragraph 4 of the adoption agency algorithm.uadoption-agency-4.4u>Unexpected end tag (%(originalName)s). Treated as %(newName)s.uunexpected-end-tag-treated-asu'This element (%(name)s) has no end tag.u
no-end-tagu9Unexpected implied end tag (%(name)s) in the table phase.u#unexpected-implied-end-tag-in-tableu>Unexpected implied end tag (%(name)s) in the table body phase.u(unexpected-implied-end-tag-in-table-bodyuDUnexpected non-space characters in table context caused voodoo mode.u$unexpected-char-implies-table-voodoou3Unexpected input with type hidden in table context.u unexpected-hidden-input-in-tableu!Unexpected form in table context.uunexpected-form-in-tableuDUnexpected start tag (%(name)s) in table context caused voodoo mode.u)unexpected-start-tag-implies-table-voodoouBUnexpected end tag (%(name)s) in table context caused voodoo mode.u'unexpected-end-tag-implies-table-voodoouCUnexpected table cell start tag (%(name)s) in the table body phase.uunexpected-cell-in-table-bodyuFGot table cell end tag (%(name)s) while required end tags are missing.uunexpected-cell-end-tagu?Unexpected end tag (%(name)s) in the table body phase. Ignored.u unexpected-end-tag-in-table-bodyu=Unexpected implied end tag (%(name)s) in the table row phase.u'unexpected-implied-end-tag-in-table-rowu>Unexpected end tag (%(name)s) in the table row phase. Ignored.uunexpected-end-tag-in-table-rowuJUnexpected select start tag in the select phase treated as select end tag.uunexpected-select-in-selectu/Unexpected input start tag in the select phase.uunexpected-input-in-selectuBUnexpected start tag token (%(name)s in the select phase. Ignored.uunexpected-start-tag-in-selectu;Unexpected end tag (%(name)s) in the select phase. Ignored.uunexpected-end-tag-in-selectuKUnexpected table element start tag (%(name)s) in the select in table phase.u5unexpected-table-element-start-tag-in-select-in-tableuIUnexpected table element end tag (%(name)s) in the select in table phase.u3unexpected-table-element-end-tag-in-select-in-tableu8Unexpected non-space characters in the after body phase.uunexpected-char-after-bodyu>Unexpected start tag token (%(name)s) in the after body phase.uunexpected-start-tag-after-bodyu<Unexpected end tag token (%(name)s) in the after body phase.uunexpected-end-tag-after-bodyu@Unexpected characters in the frameset phase. Characters ignored.uunexpected-char-in-framesetuEUnexpected start tag token (%(name)s) in the frameset phase. Ignored.u unexpected-start-tag-in-framesetuFUnexpected end tag token (frameset) in the frameset phase (innerHTML).u)unexpected-frameset-in-frameset-innerhtmluCUnexpected end tag token (%(name)s) in the frameset phase. Ignored.uunexpected-end-tag-in-framesetuEUnexpected non-space characters in the after frameset phase. Ignored.uunexpected-char-after-framesetuEUnexpected start tag (%(name)s) in the after frameset phase. Ignored.u#unexpected-start-tag-after-framesetuCUnexpected end tag (%(name)s) in the after frameset phase. Ignored.u!unexpected-end-tag-after-framesetu(Unexpected end tag after body(innerHtml)u'unexpected-end-tag-after-body-innerhtmlu6Unexpected non-space characters. Expected end of file.uexpected-eof-but-got-charu6Unexpected start tag (%(name)s). Expected end of file.uexpected-eof-but-got-start-tagu4Unexpected end tag (%(name)s). Expected end of file.uexpected-eof-but-got-end-tagu/Unexpected end of file. Expected table content.ueof-in-tableu0Unexpected end of file. Expected select content.u
eof-in-selectu2Unexpected end of file. Expected frameset content.ueof-in-framesetu0Unexpected end of file. Expected script content.ueof-in-script-in-scriptu0Unexpected end of file. Expected foreign contentueof-in-foreign-landsu0Trailing solidus not allowed on element %(name)su&non-void-element-with-trailing-solidusu2Element %(name)s not allowed in a non-html contextu*unexpected-html-element-in-foreign-contentu*Unexpected end tag (%(name)s) before html.uunexpected-end-tag-before-htmlu0Undefined error (this sucks and should be fixed)uXXX-undefined-erroruhttp://www.w3.org/1999/xhtmluhtmlu"http://www.w3.org/1998/Math/MathMLumathmluhttp://www.w3.org/2000/svgusvguhttp://www.w3.org/1999/xlinkuxlinku$http://www.w3.org/XML/1998/namespaceuxmluhttp://www.w3.org/2000/xmlns/uxmlnsuappletucaptionumarqueeuobjectutableutduthumiumoumnumsumtextuannotation-xmlu
foreignObjectudescutitleuaububigucodeuemufontuiunobrususmallustrikeustronguttuuuaddressuareauarticleuasideubaseubasefontubgsoundu
blockquoteubodyubrubuttonucenterucolucolgroupucommanduddudetailsudirudivudludtuembedufieldsetufigureufooteruformuframeuframesetuh1uh2uh3uh4uh5uh6uheaduheaderuhruiframeuimageuimguinputuisindexuliulinkulistingumenuumetaunavunoembedunoframesunoscriptuolupuparamu	plaintextupreuscriptusectionuselectustyleutbodyutextareautfootutheadutruuluwbruxmpu
annotaion-xmluactuateu
xlink:actuateuarcroleu
xlink:arcroleuhrefu
xlink:hrefuroleu
xlink:roleushowu
xlink:showuxlink:titleutypeu
xlink:typeuxml:baseulanguxml:languspaceu	xml:spaceuxmlns:xlinkcCs1g|]'\}\}}}||f|f�qS(((u.0uqnameuprefixulocaluns((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/constants.pyu
<listcomp>�s	u
<listcomp>u	u
uu u
cCs.g|]$}t|�t|j��f�qS((uordulower(u.0uc((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/constants.pyu
<listcomp>�s	uevent-sourceusourceutracku
irrelevantuuscopeduismapuautoplayucontrolsuaudiouvideoudeferuasyncuopenumultipleudisabledudatagriduhiddenucheckedudefaultunoshadeu
autosubmitureadonlyuselecteduoptionuoptgroupu	autofocusurequireduoutputi� i��i i�i i& i  i! i�i0 i`i9 iRi}i i i i i" i i i�i"!iai: iSi~ixult;ugt;uamp;uapos;uquot;uÆuAEliguAElig;u&uAMPuAMP;uÁuAacuteuAacute;uĂuAbreve;uÂuAcircuAcirc;uАuAcy;u𝔄uAfr;uÀuAgraveuAgrave;uΑuAlpha;uĀuAmacr;u⩓uAnd;uĄuAogon;u𝔸uAopf;u⁡uApplyFunction;uÅuAringuAring;u𝒜uAscr;u≔uAssign;uÃuAtildeuAtilde;uÄuAumluAuml;u∖u
Backslash;u⫧uBarv;u⌆uBarwed;uБuBcy;u∵uBecause;uℬuBernoullis;uΒuBeta;u𝔅uBfr;u𝔹uBopf;u˘uBreve;uBscr;u≎uBumpeq;uЧuCHcy;u©uCOPYuCOPY;uĆuCacute;u⋒uCap;uⅅuCapitalDifferentialD;uℭuCayleys;uČuCcaron;uÇuCcediluCcedil;uĈuCcirc;u∰uCconint;uĊuCdot;u¸uCedilla;u·u
CenterDot;uCfr;uΧuChi;u⊙u
CircleDot;u⊖uCircleMinus;u⊕uCirclePlus;u⊗uCircleTimes;u∲uClockwiseContourIntegral;u”uCloseCurlyDoubleQuote;u’uCloseCurlyQuote;u∷uColon;u⩴uColone;u≡u
Congruent;u∯uConint;u∮uContourIntegral;uℂuCopf;u∐u
Coproduct;u∳u CounterClockwiseContourIntegral;u⨯uCross;u𝒞uCscr;u⋓uCup;u≍uCupCap;uDD;u⤑u	DDotrahd;uЂuDJcy;uЅuDScy;uЏuDZcy;u‡uDagger;u↡uDarr;u⫤uDashv;uĎuDcaron;uДuDcy;u∇uDel;uΔuDelta;u𝔇uDfr;u´uDiacriticalAcute;u˙uDiacriticalDot;u˝uDiacriticalDoubleAcute;u`uDiacriticalGrave;u˜uDiacriticalTilde;u⋄uDiamond;uⅆuDifferentialD;u𝔻uDopf;u¨uDot;u⃜uDotDot;u≐u	DotEqual;uDoubleContourIntegral;u
DoubleDot;u⇓uDoubleDownArrow;u⇐uDoubleLeftArrow;u⇔uDoubleLeftRightArrow;uDoubleLeftTee;u⟸uDoubleLongLeftArrow;u⟺uDoubleLongLeftRightArrow;u⟹uDoubleLongRightArrow;u⇒uDoubleRightArrow;u⊨uDoubleRightTee;u⇑uDoubleUpArrow;u⇕uDoubleUpDownArrow;u∥uDoubleVerticalBar;u↓u
DownArrow;u⤓u
DownArrowBar;u⇵uDownArrowUpArrow;ȗu
DownBreve;u⥐uDownLeftRightVector;u⥞uDownLeftTeeVector;u↽uDownLeftVector;u⥖uDownLeftVectorBar;u⥟uDownRightTeeVector;u⇁uDownRightVector;u⥗uDownRightVectorBar;u⊤uDownTee;u↧u
DownTeeArrow;u
Downarrow;u𝒟uDscr;uĐuDstrok;uŊuENG;uÐuETHuETH;uÉuEacuteuEacute;uĚuEcaron;uÊuEcircuEcirc;uЭuEcy;uĖuEdot;u𝔈uEfr;uÈuEgraveuEgrave;u∈uElement;uĒuEmacr;u◻uEmptySmallSquare;u▫uEmptyVerySmallSquare;uĘuEogon;u𝔼uEopf;uΕuEpsilon;u⩵uEqual;u≂uEqualTilde;u⇌uEquilibrium;uℰuEscr;u⩳uEsim;uΗuEta;uËuEumluEuml;u∃uExists;uⅇu
ExponentialE;uФuFcy;u𝔉uFfr;u◼uFilledSmallSquare;u▪uFilledVerySmallSquare;u𝔽uFopf;u∀uForAll;uℱuFouriertrf;uFscr;uЃuGJcy;u>uGTuGT;uΓuGamma;uϜuGammad;uĞuGbreve;uĢuGcedil;uĜuGcirc;uГuGcy;uĠuGdot;u𝔊uGfr;u⋙uGg;u𝔾uGopf;u≥u
GreaterEqual;u⋛uGreaterEqualLess;u≧uGreaterFullEqual;u⪢uGreaterGreater;u≷uGreaterLess;u⩾uGreaterSlantEqual;u≳u
GreaterTilde;u𝒢uGscr;u≫uGt;uЪuHARDcy;uˇuHacek;u^uHat;uĤuHcirc;uℌuHfr;uℋu
HilbertSpace;uℍuHopf;u─uHorizontalLine;uHscr;uĦuHstrok;u
HumpDownHump;u≏u
HumpEqual;uЕuIEcy;uIJuIJlig;uЁuIOcy;uÍuIacuteuIacute;uÎuIcircuIcirc;uИuIcy;uİuIdot;uℑuIfr;uÌuIgraveuIgrave;uIm;uĪuImacr;uⅈuImaginaryI;uImplies;u∬uInt;u∫u	Integral;u⋂u
Intersection;u⁣uInvisibleComma;u⁢uInvisibleTimes;uĮuIogon;u𝕀uIopf;uΙuIota;uℐuIscr;uĨuItilde;uІuIukcy;uÏuIumluIuml;uĴuJcirc;uЙuJcy;u𝔍uJfr;u𝕁uJopf;u𝒥uJscr;uЈuJsercy;uЄuJukcy;uХuKHcy;uЌuKJcy;uΚuKappa;uĶuKcedil;uКuKcy;u𝔎uKfr;u𝕂uKopf;u𝒦uKscr;uЉuLJcy;u<uLTuLT;uĹuLacute;uΛuLambda;u⟪uLang;uℒuLaplacetrf;u↞uLarr;uĽuLcaron;uĻuLcedil;uЛuLcy;u⟨uLeftAngleBracket;u←u
LeftArrow;u⇤u
LeftArrowBar;u⇆uLeftArrowRightArrow;u⌈uLeftCeiling;u⟦uLeftDoubleBracket;u⥡uLeftDownTeeVector;u⇃uLeftDownVector;u⥙uLeftDownVectorBar;u⌊u
LeftFloor;u↔uLeftRightArrow;u⥎uLeftRightVector;u⊣uLeftTee;u↤u
LeftTeeArrow;u⥚uLeftTeeVector;u⊲u
LeftTriangle;u⧏uLeftTriangleBar;u⊴uLeftTriangleEqual;u⥑uLeftUpDownVector;u⥠uLeftUpTeeVector;u↿u
LeftUpVector;u⥘uLeftUpVectorBar;u↼uLeftVector;u⥒uLeftVectorBar;u
Leftarrow;uLeftrightarrow;u⋚uLessEqualGreater;u≦uLessFullEqual;u≶uLessGreater;u⪡u	LessLess;u⩽uLessSlantEqual;u≲u
LessTilde;u𝔏uLfr;u⋘uLl;u⇚uLleftarrow;uĿuLmidot;u⟵uLongLeftArrow;u⟷uLongLeftRightArrow;u⟶uLongRightArrow;uLongleftarrow;uLongleftrightarrow;uLongrightarrow;u𝕃uLopf;u↙uLowerLeftArrow;u↘uLowerRightArrow;uLscr;u↰uLsh;uŁuLstrok;u≪uLt;u⤅uMap;uМuMcy;u uMediumSpace;uℳu
Mellintrf;u𝔐uMfr;u∓u
MinusPlus;u𝕄uMopf;uMscr;uΜuMu;uЊuNJcy;uŃuNacute;uŇuNcaron;uŅuNcedil;uНuNcy;u​uNegativeMediumSpace;uNegativeThickSpace;uNegativeThinSpace;uNegativeVeryThinSpace;uNestedGreaterGreater;uNestedLessLess;uNewLine;u𝔑uNfr;u⁠uNoBreak;u uNonBreakingSpace;uℕuNopf;u⫬uNot;u≢u
NotCongruent;u≭u
NotCupCap;u∦uNotDoubleVerticalBar;u∉uNotElement;u≠u	NotEqual;u≂̸uNotEqualTilde;u∄u
NotExists;u≯uNotGreater;u≱uNotGreaterEqual;u≧̸uNotGreaterFullEqual;u≫̸uNotGreaterGreater;u≹uNotGreaterLess;u⩾̸uNotGreaterSlantEqual;u≵uNotGreaterTilde;u≎̸uNotHumpDownHump;u≏̸u
NotHumpEqual;u⋪uNotLeftTriangle;u⧏̸uNotLeftTriangleBar;u⋬uNotLeftTriangleEqual;u≮uNotLess;u≰u
NotLessEqual;u≸uNotLessGreater;u≪̸uNotLessLess;u⩽̸uNotLessSlantEqual;u≴u
NotLessTilde;u⪢̸uNotNestedGreaterGreater;u⪡̸uNotNestedLessLess;u⊀uNotPrecedes;u⪯̸uNotPrecedesEqual;u⋠uNotPrecedesSlantEqual;u∌uNotReverseElement;u⋫uNotRightTriangle;u⧐̸uNotRightTriangleBar;u⋭uNotRightTriangleEqual;u⊏̸uNotSquareSubset;u⋢uNotSquareSubsetEqual;u⊐̸uNotSquareSuperset;u⋣uNotSquareSupersetEqual;u⊂⃒u
NotSubset;u⊈uNotSubsetEqual;u⊁uNotSucceeds;u⪰̸uNotSucceedsEqual;u⋡uNotSucceedsSlantEqual;u≿̸uNotSucceedsTilde;u⊃⃒uNotSuperset;u⊉uNotSupersetEqual;u≁u	NotTilde;u≄uNotTildeEqual;u≇uNotTildeFullEqual;u≉uNotTildeTilde;u∤uNotVerticalBar;u𝒩uNscr;uÑuNtildeuNtilde;uΝuNu;uŒuOElig;uÓuOacuteuOacute;uÔuOcircuOcirc;uОuOcy;uŐuOdblac;u𝔒uOfr;uÒuOgraveuOgrave;uŌuOmacr;uΩuOmega;uΟuOmicron;u𝕆uOopf;u“uOpenCurlyDoubleQuote;u‘uOpenCurlyQuote;u⩔uOr;u𝒪uOscr;uØuOslashuOslash;uÕuOtildeuOtilde;u⨷uOtimes;uÖuOumluOuml;u‾uOverBar;u⏞u
OverBrace;u⎴uOverBracket;u⏜uOverParenthesis;u∂u	PartialD;uПuPcy;u𝔓uPfr;uΦuPhi;uΠuPi;u±u
PlusMinus;uPoincareplane;uℙuPopf;u⪻uPr;u≺u	Precedes;u⪯uPrecedesEqual;u≼uPrecedesSlantEqual;u≾uPrecedesTilde;u″uPrime;u∏uProduct;uProportion;u∝u
Proportional;u𝒫uPscr;uΨuPsi;u"uQUOTuQUOT;u𝔔uQfr;uℚuQopf;u𝒬uQscr;u⤐uRBarr;u®uREGuREG;uŔuRacute;u⟫uRang;u↠uRarr;u⤖uRarrtl;uŘuRcaron;uŖuRcedil;uРuRcy;uℜuRe;u∋uReverseElement;u⇋uReverseEquilibrium;u⥯uReverseUpEquilibrium;uRfr;uΡuRho;u⟩uRightAngleBracket;u→uRightArrow;u⇥uRightArrowBar;u⇄uRightArrowLeftArrow;u⌉u
RightCeiling;u⟧uRightDoubleBracket;u⥝uRightDownTeeVector;u⇂uRightDownVector;u⥕uRightDownVectorBar;u⌋uRightFloor;u⊢u	RightTee;u↦uRightTeeArrow;u⥛uRightTeeVector;u⊳uRightTriangle;u⧐uRightTriangleBar;u⊵uRightTriangleEqual;u⥏uRightUpDownVector;u⥜uRightUpTeeVector;u↾uRightUpVector;u⥔uRightUpVectorBar;u⇀uRightVector;u⥓uRightVectorBar;uRightarrow;uℝuRopf;u⥰u
RoundImplies;u⇛uRrightarrow;uℛuRscr;u↱uRsh;u⧴uRuleDelayed;uЩuSHCHcy;uШuSHcy;uЬuSOFTcy;uŚuSacute;u⪼uSc;uŠuScaron;uŞuScedil;uŜuScirc;uСuScy;u𝔖uSfr;uShortDownArrow;uShortLeftArrow;uShortRightArrow;u↑u
ShortUpArrow;uΣuSigma;u∘uSmallCircle;u𝕊uSopf;u√uSqrt;u□uSquare;u⊓uSquareIntersection;u⊏u
SquareSubset;u⊑uSquareSubsetEqual;u⊐uSquareSuperset;u⊒uSquareSupersetEqual;u⊔uSquareUnion;u𝒮uSscr;u⋆uStar;u⋐uSub;uSubset;u⊆uSubsetEqual;u≻u	Succeeds;u⪰uSucceedsEqual;u≽uSucceedsSlantEqual;u≿uSucceedsTilde;u	SuchThat;u∑uSum;u⋑uSup;u⊃u	Superset;u⊇uSupersetEqual;uSupset;uÞuTHORNuTHORN;u™uTRADE;uЋuTSHcy;uЦuTScy;uTab;uΤuTau;uŤuTcaron;uŢuTcedil;uТuTcy;u𝔗uTfr;u∴u
Therefore;uΘuTheta;u  uThickSpace;u u
ThinSpace;u∼uTilde;u≃uTildeEqual;u≅uTildeFullEqual;u≈uTildeTilde;u𝕋uTopf;u⃛u
TripleDot;u𝒯uTscr;uŦuTstrok;uÚuUacuteuUacute;u↟uUarr;u⥉u	Uarrocir;uЎuUbrcy;uŬuUbreve;uÛuUcircuUcirc;uУuUcy;uŰuUdblac;u𝔘uUfr;uÙuUgraveuUgrave;uŪuUmacr;u_u	UnderBar;u⏟uUnderBrace;u⎵u
UnderBracket;u⏝uUnderParenthesis;u⋃uUnion;u⊎u
UnionPlus;uŲuUogon;u𝕌uUopf;uUpArrow;u⤒uUpArrowBar;u⇅uUpArrowDownArrow;u↕uUpDownArrow;u⥮uUpEquilibrium;u⊥uUpTee;u↥uUpTeeArrow;uUparrow;uUpdownarrow;u↖uUpperLeftArrow;u↗uUpperRightArrow;uϒuUpsi;uΥuUpsilon;uŮuUring;u𝒰uUscr;uŨuUtilde;uÜuUumluUuml;u⊫uVDash;u⫫uVbar;uВuVcy;u⊩uVdash;u⫦uVdashl;u⋁uVee;u‖uVerbar;uVert;u∣uVerticalBar;u|u
VerticalLine;u❘uVerticalSeparator;u≀uVerticalTilde;u uVeryThinSpace;u𝔙uVfr;u𝕍uVopf;u𝒱uVscr;u⊪uVvdash;uŴuWcirc;u⋀uWedge;u𝔚uWfr;u𝕎uWopf;u𝒲uWscr;u𝔛uXfr;uΞuXi;u𝕏uXopf;u𝒳uXscr;uЯuYAcy;uЇuYIcy;uЮuYUcy;uÝuYacuteuYacute;uŶuYcirc;uЫuYcy;u𝔜uYfr;u𝕐uYopf;u𝒴uYscr;uŸuYuml;uЖuZHcy;uŹuZacute;uŽuZcaron;uЗuZcy;uŻuZdot;uZeroWidthSpace;uΖuZeta;uℨuZfr;uℤuZopf;u𝒵uZscr;uáuaacuteuaacute;uăuabreve;u∾uac;u∾̳uacE;u∿uacd;uâuacircuacirc;uacuteuacute;uаuacy;uæuaeliguaelig;uaf;u𝔞uafr;uàuagraveuagrave;uℵualefsym;ualeph;uαualpha;uāuamacr;u⨿uamalg;uampu∧uand;u⩕uandand;u⩜uandd;u⩘u	andslope;u⩚uandv;u∠uang;u⦤uange;uangle;u∡uangmsd;u⦨u	angmsdaa;u⦩u	angmsdab;u⦪u	angmsdac;u⦫u	angmsdad;u⦬u	angmsdae;u⦭u	angmsdaf;u⦮u	angmsdag;u⦯u	angmsdah;u∟uangrt;u⊾uangrtvb;u⦝u	angrtvbd;u∢uangsph;uangst;u⍼uangzarr;uąuaogon;u𝕒uaopf;uap;u⩰uapE;u⩯uapacir;u≊uape;u≋uapid;u'uapprox;u	approxeq;uåuaringuaring;u𝒶uascr;u*uast;uasymp;uasympeq;uãuatildeuatilde;uäuaumluauml;u	awconint;u⨑uawint;u⫭ubNot;u≌u	backcong;u϶ubackepsilon;u‵u
backprime;u∽ubacksim;u⋍u
backsimeq;u⊽ubarvee;u⌅ubarwed;u	barwedge;ubbrk;u⎶u	bbrktbrk;ubcong;uбubcy;u„ubdquo;ubecaus;ubecause;u⦰ubemptyv;ubepsi;ubernou;uβubeta;uℶubeth;u≬ubetween;u𝔟ubfr;ubigcap;u◯ubigcirc;ubigcup;u⨀ubigodot;u⨁u	bigoplus;u⨂u
bigotimes;u⨆u	bigsqcup;u★ubigstar;u▽ubigtriangledown;u△ubigtriangleup;u⨄u	biguplus;ubigvee;u	bigwedge;u⤍ubkarow;u⧫u
blacklozenge;ublacksquare;u▴ublacktriangle;u▾ublacktriangledown;u◂ublacktriangleleft;u▸ublacktriangleright;u␣ublank;u▒ublk12;u░ublk14;u▓ublk34;u█ublock;u=⃥ubne;u≡⃥ubnequiv;u⌐ubnot;u𝕓ubopf;ubot;ubottom;u⋈ubowtie;u╗uboxDL;u╔uboxDR;u╖uboxDl;u╓uboxDr;u═uboxH;u╦uboxHD;u╩uboxHU;u╤uboxHd;u╧uboxHu;u╝uboxUL;u╚uboxUR;u╜uboxUl;u╙uboxUr;u║uboxV;u╬uboxVH;u╣uboxVL;u╠uboxVR;u╫uboxVh;u╢uboxVl;u╟uboxVr;u⧉uboxbox;u╕uboxdL;u╒uboxdR;u┐uboxdl;u┌uboxdr;uboxh;u╥uboxhD;u╨uboxhU;u┬uboxhd;u┴uboxhu;u⊟u	boxminus;u⊞uboxplus;u⊠u	boxtimes;u╛uboxuL;u╘uboxuR;u┘uboxul;u└uboxur;u│uboxv;u╪uboxvH;u╡uboxvL;u╞uboxvR;u┼uboxvh;u┤uboxvl;u├uboxvr;ubprime;ubreve;u¦ubrvbarubrvbar;u𝒷ubscr;u⁏ubsemi;ubsim;ubsime;u\ubsol;u⧅ubsolb;u⟈u	bsolhsub;u•ubull;ubullet;ubump;u⪮ubumpE;ubumpe;ubumpeq;ućucacute;u∩ucap;u⩄ucapand;u⩉u	capbrcup;u⩋ucapcap;u⩇ucapcup;u⩀ucapdot;u∩︀ucaps;u⁁ucaret;ucaron;u⩍uccaps;učuccaron;uçuccediluccedil;uĉuccirc;u⩌uccups;u⩐uccupssm;uċucdot;ucedilucedil;u⦲ucemptyv;u¢ucentucent;u
centerdot;u𝔠ucfr;uчuchcy;u✓ucheck;u
checkmark;uχuchi;u○ucir;u⧃ucirE;uˆucirc;u≗ucirceq;u↺ucirclearrowleft;u↻ucirclearrowright;u	circledR;uⓈu	circledS;u⊛ucircledast;u⊚ucircledcirc;u⊝ucircleddash;ucire;u⨐u	cirfnint;u⫯ucirmid;u⧂ucirscir;u♣uclubs;u	clubsuit;u:ucolon;ucolone;ucoloneq;u,ucomma;u@ucommat;u∁ucomp;ucompfn;ucomplement;u
complexes;ucong;u⩭ucongdot;uconint;u𝕔ucopf;ucoprod;ucopyucopy;u℗ucopysr;u↵ucrarr;u✗ucross;u𝒸ucscr;u⫏ucsub;u⫑ucsube;u⫐ucsup;u⫒ucsupe;u⋯uctdot;u⤸ucudarrl;u⤵ucudarrr;u⋞ucuepr;u⋟ucuesc;u↶ucularr;u⤽ucularrp;u∪ucup;u⩈u	cupbrcap;u⩆ucupcap;u⩊ucupcup;u⊍ucupdot;u⩅ucupor;u∪︀ucups;u↷ucurarr;u⤼ucurarrm;ucurlyeqprec;ucurlyeqsucc;u⋎u	curlyvee;u⋏ucurlywedge;u¤ucurrenucurren;ucurvearrowleft;ucurvearrowright;ucuvee;ucuwed;u	cwconint;u∱ucwint;u⌭ucylcty;udArr;u⥥udHar;u†udagger;uℸudaleth;udarr;u‐udash;udashv;u⤏udbkarow;udblac;uďudcaron;uдudcy;udd;uddagger;u⇊uddarr;u⩷uddotseq;u°udegudeg;uδudelta;u⦱udemptyv;u⥿udfisht;u𝔡udfr;udharl;udharr;udiam;udiamond;u♦udiamondsuit;udiams;udie;uϝudigamma;u⋲udisin;u÷udiv;udivideudivide;u⋇udivideontimes;udivonx;uђudjcy;u⌞udlcorn;u⌍udlcrop;u$udollar;u𝕕udopf;udot;udoteq;u≑u	doteqdot;u∸u	dotminus;u∔udotplus;u⊡u
dotsquare;udoublebarwedge;u
downarrow;udowndownarrows;udownharpoonleft;udownharpoonright;u	drbkarow;u⌟udrcorn;u⌌udrcrop;u𝒹udscr;uѕudscy;u⧶udsol;uđudstrok;u⋱udtdot;u▿udtri;udtrif;uduarr;uduhar;u⦦udwangle;uџudzcy;u⟿u	dzigrarr;ueDDot;ueDot;uéueacuteueacute;u⩮ueaster;uěuecaron;u≖uecir;uêuecircuecirc;u≕uecolon;uэuecy;uėuedot;uee;u≒uefDot;u𝔢uefr;u⪚ueg;uèuegraveuegrave;u⪖uegs;u⪘uegsdot;u⪙uel;u⏧u	elinters;uℓuell;u⪕uels;u⪗uelsdot;uēuemacr;u∅uempty;u	emptyset;uemptyv;u uemsp13;u uemsp14;u uemsp;uŋueng;u uensp;uęueogon;u𝕖ueopf;u⋕uepar;u⧣ueparsl;u⩱ueplus;uεuepsi;uepsilon;uϵuepsiv;ueqcirc;ueqcolon;ueqsim;ueqslantgtr;ueqslantless;u=uequals;u≟uequest;uequiv;u⩸uequivDD;u⧥u	eqvparsl;u≓uerDot;u⥱uerarr;uℯuescr;uesdot;uesim;uηueta;uðuethueth;uëueumlueuml;u€ueuro;u!uexcl;uexist;uexpectation;u
exponentiale;ufallingdotseq;uфufcy;u♀ufemale;uffiuffilig;uffufflig;uffluffllig;u𝔣uffr;ufiufilig;ufjufjlig;u♭uflat;uflufllig;u▱ufltns;uƒufnof;u𝕗ufopf;uforall;u⋔ufork;u⫙uforkv;u⨍u	fpartint;u½ufrac12ufrac12;u⅓ufrac13;u¼ufrac14ufrac14;u⅕ufrac15;u⅙ufrac16;u⅛ufrac18;u⅔ufrac23;u⅖ufrac25;u¾ufrac34ufrac34;u⅗ufrac35;u⅜ufrac38;u⅘ufrac45;u⅚ufrac56;u⅝ufrac58;u⅞ufrac78;u⁄ufrasl;u⌢ufrown;u𝒻ufscr;ugE;u⪌ugEl;uǵugacute;uγugamma;ugammad;u⪆ugap;uğugbreve;uĝugcirc;uгugcy;uġugdot;uge;ugel;ugeq;ugeqq;u	geqslant;uges;u⪩ugescc;u⪀ugesdot;u⪂ugesdoto;u⪄u	gesdotol;u⋛︀ugesl;u⪔ugesles;u𝔤ugfr;ugg;uggg;uℷugimel;uѓugjcy;ugl;u⪒uglE;u⪥ugla;u⪤uglj;u≩ugnE;u⪊ugnap;u	gnapprox;u⪈ugne;ugneq;ugneqq;u⋧ugnsim;u𝕘ugopf;ugrave;uℊugscr;ugsim;u⪎ugsime;u⪐ugsiml;ugtu⪧ugtcc;u⩺ugtcir;u⋗ugtdot;u⦕ugtlPar;u⩼ugtquest;u
gtrapprox;u⥸ugtrarr;ugtrdot;u
gtreqless;ugtreqqless;ugtrless;ugtrsim;u≩︀u
gvertneqq;ugvnE;uhArr;uhairsp;uhalf;uhamilt;uъuhardcy;uharr;u⥈uharrcir;u↭uharrw;uℏuhbar;uĥuhcirc;u♥uhearts;u
heartsuit;u…uhellip;u⊹uhercon;u𝔥uhfr;u⤥u	hksearow;u⤦u	hkswarow;u⇿uhoarr;u∻uhomtht;u↩uhookleftarrow;u↪uhookrightarrow;u𝕙uhopf;u―uhorbar;u𝒽uhscr;uhslash;uħuhstrok;u⁃uhybull;uhyphen;uíuiacuteuiacute;uic;uîuicircuicirc;uиuicy;uеuiecy;u¡uiexcluiexcl;uiff;u𝔦uifr;uìuigraveuigrave;uii;u⨌uiiiint;u∭uiiint;u⧜uiinfin;u℩uiiota;uijuijlig;uīuimacr;uimage;u	imagline;u	imagpart;uıuimath;u⊷uimof;uƵuimped;uin;u℅uincare;u∞uinfin;u⧝u	infintie;uinodot;uint;u⊺uintcal;u	integers;u	intercal;u⨗u	intlarhk;u⨼uintprod;uёuiocy;uįuiogon;u𝕚uiopf;uιuiota;uiprod;u¿uiquestuiquest;u𝒾uiscr;uisin;u⋹uisinE;u⋵uisindot;u⋴uisins;u⋳uisinsv;uisinv;uit;uĩuitilde;uіuiukcy;uïuiumluiuml;uĵujcirc;uйujcy;u𝔧ujfr;uȷujmath;u𝕛ujopf;u𝒿ujscr;uјujsercy;uєujukcy;uκukappa;uϰukappav;uķukcedil;uкukcy;u𝔨ukfr;uĸukgreen;uхukhcy;uќukjcy;u𝕜ukopf;u𝓀ukscr;ulAarr;ulArr;u⤛ulAtail;u⤎ulBarr;ulE;u⪋ulEg;u⥢ulHar;uĺulacute;u⦴u	laemptyv;ulagran;uλulambda;ulang;u⦑ulangd;ulangle;u⪅ulap;u«ulaquoulaquo;ularr;ularrb;u⤟ularrbfs;u⤝ularrfs;ularrhk;u↫ularrlp;u⤹ularrpl;u⥳ularrsim;u↢ularrtl;u⪫ulat;u⤙ulatail;u⪭ulate;u⪭︀ulates;u⤌ulbarr;u❲ulbbrk;u{ulbrace;u[ulbrack;u⦋ulbrke;u⦏ulbrksld;u⦍ulbrkslu;uľulcaron;uļulcedil;ulceil;ulcub;uлulcy;u⤶uldca;uldquo;uldquor;u⥧uldrdhar;u⥋u	ldrushar;u↲uldsh;u≤ule;u
leftarrow;uleftarrowtail;uleftharpoondown;uleftharpoonup;u⇇uleftleftarrows;uleftrightarrow;uleftrightarrows;uleftrightharpoons;uleftrightsquigarrow;u⋋uleftthreetimes;uleg;uleq;uleqq;u	leqslant;ules;u⪨ulescc;u⩿ulesdot;u⪁ulesdoto;u⪃u	lesdotor;u⋚︀ulesg;u⪓ulesges;ulessapprox;u⋖ulessdot;u
lesseqgtr;ulesseqqgtr;ulessgtr;ulesssim;u⥼ulfisht;ulfloor;u𝔩ulfr;ulg;u⪑ulgE;ulhard;ulharu;u⥪ulharul;u▄ulhblk;uљuljcy;ull;ullarr;u	llcorner;u⥫ullhard;u◺ulltri;uŀulmidot;u⎰ulmoust;ulmoustache;u≨ulnE;u⪉ulnap;u	lnapprox;u⪇ulne;ulneq;ulneqq;u⋦ulnsim;u⟬uloang;u⇽uloarr;ulobrk;ulongleftarrow;ulongleftrightarrow;u⟼ulongmapsto;ulongrightarrow;ulooparrowleft;u↬ulooparrowright;u⦅ulopar;u𝕝ulopf;u⨭uloplus;u⨴ulotimes;u∗ulowast;ulowbar;u◊uloz;ulozenge;ulozf;u(ulpar;u⦓ulparlt;ulrarr;u	lrcorner;ulrhar;u⥭ulrhard;u‎ulrm;u⊿ulrtri;u‹ulsaquo;u𝓁ulscr;ulsh;ulsim;u⪍ulsime;u⪏ulsimg;ulsqb;ulsquo;u‚ulsquor;ułulstrok;ultu⪦ultcc;u⩹ultcir;ultdot;ulthree;u⋉ultimes;u⥶ultlarr;u⩻ultquest;u⦖ultrPar;u◃ultri;ultrie;ultrif;u⥊u	lurdshar;u⥦uluruhar;u≨︀u
lvertneqq;ulvnE;u∺umDDot;u¯umacrumacr;u♂umale;u✠umalt;umaltese;umap;umapsto;umapstodown;umapstoleft;u	mapstoup;u▮umarker;u⨩umcomma;uмumcy;u—umdash;umeasuredangle;u𝔪umfr;u℧umho;uµumicroumicro;umid;umidast;u⫰umidcir;umiddotumiddot;u−uminus;uminusb;uminusd;u⨪uminusdu;u⫛umlcp;umldr;umnplus;u⊧umodels;u𝕞umopf;ump;u𝓂umscr;umstpos;uμumu;u⊸u	multimap;umumap;u⋙̸unGg;u≫⃒unGt;unGtv;u⇍unLeftarrow;u⇎unLeftrightarrow;u⋘̸unLl;u≪⃒unLt;unLtv;u⇏unRightarrow;u⊯unVDash;u⊮unVdash;unabla;uńunacute;u∠⃒unang;unap;u⩰̸unapE;u≋̸unapid;uʼnunapos;unapprox;u♮unatur;unatural;u	naturals;unbspunbsp;unbump;unbumpe;u⩃uncap;uňuncaron;uņuncedil;uncong;u⩭̸u	ncongdot;u⩂uncup;uнuncy;u–undash;une;u⇗uneArr;u⤤unearhk;unearr;unearrow;u≐̸unedot;unequiv;u⤨unesear;unesim;unexist;unexists;u𝔫unfr;ungE;unge;ungeq;ungeqq;u
ngeqslant;unges;ungsim;ungt;ungtr;unhArr;u↮unharr;u⫲unhpar;uni;u⋼unis;u⋺unisd;univ;uњunjcy;unlArr;u≦̸unlE;u↚unlarr;u‥unldr;unle;unleftarrow;unleftrightarrow;unleq;unleqq;u
nleqslant;unles;unless;unlsim;unlt;unltri;unltrie;unmid;u𝕟unopf;u¬unotunot;unotin;u⋹̸unotinE;u⋵̸u	notindot;unotinva;u⋷unotinvb;u⋶unotinvc;unotni;unotniva;u⋾unotnivb;u⋽unotnivc;unpar;u
nparallel;u⫽⃥unparsl;u∂̸unpart;u⨔unpolint;unpr;unprcue;unpre;unprec;unpreceq;unrArr;u↛unrarr;u⤳̸unrarrc;u↝̸unrarrw;unrightarrow;unrtri;unrtrie;unsc;unsccue;unsce;u𝓃unscr;u
nshortmid;unshortparallel;unsim;unsime;unsimeq;unsmid;unspar;unsqsube;unsqsupe;u⊄unsub;u⫅̸unsubE;unsube;unsubset;u
nsubseteq;unsubseteqq;unsucc;unsucceq;u⊅unsup;u⫆̸unsupE;unsupe;unsupset;u
nsupseteq;unsupseteqq;untgl;uñuntildeuntilde;untlg;untriangleleft;untrianglelefteq;untriangleright;untrianglerighteq;uνunu;u#unum;u№unumero;u unumsp;u⊭unvDash;u⤄unvHarr;u≍⃒unvap;u⊬unvdash;u≥⃒unvge;u>⃒unvgt;u⧞unvinfin;u⤂unvlArr;u≤⃒unvle;u<⃒unvlt;u⊴⃒unvltrie;u⤃unvrArr;u⊵⃒unvrtrie;u∼⃒unvsim;u⇖unwArr;u⤣unwarhk;unwarr;unwarrow;u⤧unwnear;uoS;uóuoacuteuoacute;uoast;uocir;uôuocircuocirc;uоuocy;uodash;uőuodblac;u⨸uodiv;uodot;u⦼uodsold;uœuoelig;u⦿uofcir;u𝔬uofr;u˛uogon;uòuograveuograve;u⧁uogt;u⦵uohbar;uohm;uoint;uolarr;u⦾uolcir;u⦻uolcross;uoline;u⧀uolt;uōuomacr;uωuomega;uοuomicron;u⦶uomid;uominus;u𝕠uoopf;u⦷uopar;u⦹uoperp;uoplus;u∨uor;uorarr;u⩝uord;uℴuorder;uorderof;uªuordfuordf;uºuordmuordm;u⊶uorigof;u⩖uoror;u⩗uorslope;u⩛uorv;uoscr;uøuoslashuoslash;u⊘uosol;uõuotildeuotilde;uotimes;u⨶u	otimesas;uöuoumluouml;u⌽uovbar;upar;u¶uparaupara;u	parallel;u⫳uparsim;u⫽uparsl;upart;uпupcy;u%upercnt;u.uperiod;u‰upermil;uperp;u‱upertenk;u𝔭upfr;uφuphi;uϕuphiv;uphmmat;u☎uphone;uπupi;u
pitchfork;uϖupiv;uplanck;uℎuplanckh;uplankv;u+uplus;u⨣u	plusacir;uplusb;u⨢upluscir;uplusdo;u⨥uplusdu;u⩲upluse;uplusmnuplusmn;u⨦uplussim;u⨧uplustwo;upm;u⨕u	pointint;u𝕡upopf;u£upoundupound;upr;u⪳uprE;u⪷uprap;uprcue;upre;uprec;uprecapprox;upreccurlyeq;upreceq;u⪹uprecnapprox;u⪵u	precneqq;u⋨u	precnsim;uprecsim;u′uprime;uprimes;uprnE;uprnap;uprnsim;uprod;u⌮u	profalar;u⌒u	profline;u⌓u	profsurf;uprop;upropto;uprsim;u⊰uprurel;u𝓅upscr;uψupsi;u upuncsp;u𝔮uqfr;uqint;u𝕢uqopf;u⁗uqprime;u𝓆uqscr;uquaternions;u⨖uquatint;u?uquest;uquesteq;uquoturAarr;urArr;u⤜urAtail;urBarr;u⥤urHar;u∽̱urace;uŕuracute;uradic;u⦳u	raemptyv;urang;u⦒urangd;u⦥urange;urangle;u»uraquouraquo;urarr;u⥵urarrap;urarrb;u⤠urarrbfs;u⤳urarrc;u⤞urarrfs;urarrhk;urarrlp;u⥅urarrpl;u⥴urarrsim;u↣urarrtl;u↝urarrw;u⤚uratail;u∶uratio;u
rationals;urbarr;u❳urbbrk;u}urbrace;u]urbrack;u⦌urbrke;u⦎urbrksld;u⦐urbrkslu;uřurcaron;uŗurcedil;urceil;urcub;uрurcy;u⤷urdca;u⥩urdldhar;urdquo;urdquor;u↳urdsh;ureal;urealine;u	realpart;ureals;u▭urect;uregureg;u⥽urfisht;urfloor;u𝔯urfr;urhard;urharu;u⥬urharul;uρurho;uϱurhov;urightarrow;urightarrowtail;urightharpoondown;urightharpoonup;urightleftarrows;urightleftharpoons;u⇉urightrightarrows;urightsquigarrow;u⋌urightthreetimes;u˚uring;u
risingdotseq;urlarr;urlhar;u‏urlm;u⎱urmoust;urmoustache;u⫮urnmid;u⟭uroang;u⇾uroarr;urobrk;u⦆uropar;u𝕣uropf;u⨮uroplus;u⨵urotimes;u)urpar;u⦔urpargt;u⨒u	rppolint;urrarr;u›ursaquo;u𝓇urscr;ursh;ursqb;ursquo;ursquor;urthree;u⋊urtimes;u▹urtri;urtrie;urtrif;u⧎u	rtriltri;u⥨uruluhar;u℞urx;uśusacute;usbquo;usc;u⪴uscE;u⪸uscap;ušuscaron;usccue;usce;uşuscedil;uŝuscirc;u⪶uscnE;u⪺uscnap;u⋩uscnsim;u⨓u	scpolint;uscsim;uсuscy;u⋅usdot;usdotb;u⩦usdote;u⇘useArr;usearhk;usearr;usearrow;u§usectusect;u;usemi;u⤩useswar;u	setminus;usetmn;u✶usext;u𝔰usfr;usfrown;u♯usharp;uщushchcy;uшushcy;u	shortmid;ushortparallel;u­ushyushy;uσusigma;uςusigmaf;usigmav;usim;u⩪usimdot;usime;usimeq;u⪞usimg;u⪠usimgE;u⪝usiml;u⪟usimlE;u≆usimne;u⨤usimplus;u⥲usimrarr;uslarr;usmallsetminus;u⨳usmashp;u⧤u	smeparsl;usmid;u⌣usmile;u⪪usmt;u⪬usmte;u⪬︀usmtes;uьusoftcy;u/usol;u⧄usolb;u⌿usolbar;u𝕤usopf;u♠uspades;u
spadesuit;uspar;usqcap;u⊓︀usqcaps;usqcup;u⊔︀usqcups;usqsub;usqsube;u	sqsubset;usqsubseteq;usqsup;usqsupe;u	sqsupset;usqsupseteq;usqu;usquare;usquarf;usquf;usrarr;u𝓈usscr;ussetmn;ussmile;usstarf;u☆ustar;ustarf;ustraightepsilon;ustraightphi;ustrns;u⊂usub;u⫅usubE;u⪽usubdot;usube;u⫃usubedot;u⫁usubmult;u⫋usubnE;u⊊usubne;u⪿usubplus;u⥹usubrarr;usubset;u	subseteq;u
subseteqq;u
subsetneq;usubsetneqq;u⫇usubsim;u⫕usubsub;u⫓usubsup;usucc;usuccapprox;usucccurlyeq;usucceq;usuccnapprox;u	succneqq;u	succnsim;usuccsim;usum;u♪usung;u¹usup1usup1;u²usup2usup2;u³usup3usup3;usup;u⫆usupE;u⪾usupdot;u⫘usupdsub;usupe;u⫄usupedot;u⟉usuphsol;u⫗usuphsub;u⥻usuplarr;u⫂usupmult;u⫌usupnE;u⊋usupne;u⫀usupplus;usupset;u	supseteq;u
supseteqq;u
supsetneq;usupsetneqq;u⫈usupsim;u⫔usupsub;u⫖usupsup;u⇙uswArr;uswarhk;uswarr;uswarrow;u⤪uswnwar;ußuszliguszlig;u⌖utarget;uτutau;utbrk;uťutcaron;uţutcedil;uтutcy;utdot;u⌕utelrec;u𝔱utfr;uthere4;u
therefore;uθutheta;uϑu	thetasym;uthetav;uthickapprox;u	thicksim;uthinsp;uthkap;uthksim;uþuthornuthorn;utilde;u×utimesutimes;utimesb;u⨱u	timesbar;u⨰utimesd;utint;utoea;utop;u⌶utopbot;u⫱utopcir;u𝕥utopf;u⫚utopfork;utosa;u‴utprime;utrade;u▵u	triangle;u
triangledown;u
triangleleft;utrianglelefteq;u≜u
triangleq;utriangleright;utrianglerighteq;u◬utridot;utrie;u⨺u	triminus;u⨹utriplus;u⧍utrisb;u⨻utritime;u⏢u	trpezium;u𝓉utscr;uцutscy;uћutshcy;uŧutstrok;utwixt;utwoheadleftarrow;utwoheadrightarrow;uuArr;u⥣uuHar;uúuuacuteuuacute;uuarr;uўuubrcy;uŭuubreve;uûuucircuucirc;uуuucy;uudarr;uűuudblac;uudhar;u⥾uufisht;u𝔲uufr;uùuugraveuugrave;uuharl;uuharr;u▀uuhblk;u⌜uulcorn;u	ulcorner;u⌏uulcrop;u◸uultri;uūuumacr;uumluuml;uųuuogon;u𝕦uuopf;uuparrow;uupdownarrow;uupharpoonleft;uupharpoonright;uuplus;uυuupsi;uupsih;uupsilon;u⇈uupuparrows;u⌝uurcorn;u	urcorner;u⌎uurcrop;uůuuring;u◹uurtri;u𝓊uuscr;u⋰uutdot;uũuutilde;uutri;uutrif;uuuarr;uüuuumluuuml;u⦧uuwangle;uvArr;u⫨uvBar;u⫩uvBarv;uvDash;u⦜uvangrt;uvarepsilon;u	varkappa;uvarnothing;uvarphi;uvarpi;u
varpropto;uvarr;uvarrho;u	varsigma;u⊊︀u
varsubsetneq;u⫋︀uvarsubsetneqq;u⊋︀u
varsupsetneq;u⫌︀uvarsupsetneqq;u	vartheta;uvartriangleleft;uvartriangleright;uвuvcy;uvdash;uvee;u⊻uveebar;u≚uveeeq;u⋮uvellip;uverbar;uvert;u𝔳uvfr;uvltri;uvnsub;uvnsup;u𝕧uvopf;uvprop;uvrtri;u𝓋uvscr;uvsubnE;uvsubne;uvsupnE;uvsupne;u⦚uvzigzag;uŵuwcirc;u⩟uwedbar;uwedge;u≙uwedgeq;u℘uweierp;u𝔴uwfr;u𝕨uwopf;uwp;uwr;uwreath;u𝓌uwscr;uxcap;uxcirc;uxcup;uxdtri;u𝔵uxfr;uxhArr;uxharr;uξuxi;uxlArr;uxlarr;uxmap;u⋻uxnis;uxodot;u𝕩uxopf;uxoplus;uxotime;uxrArr;uxrarr;u𝓍uxscr;uxsqcup;uxuplus;uxutri;uxvee;uxwedge;uýuyacuteuyacute;uяuyacy;uŷuycirc;uыuycy;u¥uyenuyen;u𝔶uyfr;uїuyicy;u𝕪uyopf;u𝓎uyscr;uюuyucy;uÿuyumluyuml;uźuzacute;užuzcaron;uзuzcy;użuzdot;uzeetrf;uζuzeta;u𝔷uzfr;uжuzhcy;u⇝uzigrarr;u𝕫uzopf;u𝓏uzscr;u‍uzwj;u‌uzwnj;u�i
i�ui�i�i�i�i�i�i�i�i�i�i�i�ui�i�ui�ui�i�i�i�i�i�i�i�i�i�i�i�i�ui�i�i�ucp437u437ucp850u850ucp852u852ucp855u855ucp857u857ucp860u860ucp861u861ucp862u862ucp863u863ucp865u865ucp866u866ucp869u869uasciiuansix341968uansix341986u	iso8859-6uarabicuasmo708ubig5u	big5hkscsugbkuchineseucp037ucp1026uptcp154ucp154ucp367ucp424ucp500ucp775uwindows-1252ucp819ucp864ucp936ucpgrucpisucsasciiucsbig5ucp949ucseuckrueuc_jpucseucpkdfmtjapaneseucsgb2312u	hp-roman8u
cshproman8ucsibm037u	csibm1026ucsibm424ucsibm500ucsibm855ucsibm857ucsibm860ucsibm861ucsibm863ucsibm864ucsibm865ucsibm866ucsibm869u
iso2022_jpucsiso2022jpuiso2022_jp_2ucsiso2022jp2u
iso2022_krucsiso2022krucsiso58gb231280ucsisolatin1u	iso8859-2ucsisolatin2u	iso8859-3ucsisolatin3u	iso8859-4ucsisolatin4uwindows-1254ucsisolatin5u
iso8859-10ucsisolatin6ucsisolatinarabicu	iso8859-5ucsisolatincyrillicu	iso8859-7ucsisolatingreeku	iso8859-8ucsisolatinhebrewukoi8-rucskoi8ru
csksc56011987u
cspc775balticucspc850multilingualucspc862latinhebrewucspc8codepage437ucspcp852u	csptcp154u	shift_jisu
csshiftjisuutf-7ucsunicode11utf7ucyrillicu
cyrillicasianu
ebcdiccpbeu
ebcdiccpcau
ebcdiccpchu
ebcdiccpheu
ebcdiccpnlu
ebcdiccpusu
ebcdiccpwtuecma114uecma118uelot928ueucjpueuckru'extendedunixcodepackedformatforjapaneseugb18030ugb2312ugb231280ugreekugreek8uhebrewuhproman8uhzuhzgb2312uibm037uibm1026uibm367uibm424uibm437uibm500uibm775uibm819uibm850uibm852uibm855uibm857uibm860uibm861uibm862uibm863uibm864uibm865uibm866uibm869u	iso2022jpu
iso2022jp2u	iso2022kru
iso646irv1991uiso646usuiso88591u	iso885910u
iso8859101992uiso885911987u
iso8859-13u	iso885913u
iso8859-14u	iso885914u
iso8859141998u
iso8859-15u	iso885915u
iso8859-16u	iso885916u
iso8859162001uiso88592uiso885921987uiso88593uiso885931988uiso88594uiso885941988uiso88595uiso885951988uiso88596uiso885961987uiso88597uiso885971987uiso88598uiso885981988uiso88599uiso885991989u	isocelticuisoir100uisoir101uisoir109uisoir110uisoir126uisoir127uisoir138uisoir144uisoir148uisoir149uisoir157uisoir199uisoir226uisoir58uisoir6ukoi8rukoi8-uukoi8uukoreanuksc5601uksc56011987uksc56011989ul1ul10ul2ul3ul4ul5ul6ul8ulatin1ulatin10ulatin2ulatin3ulatin4ulatin5ulatin6ulatin8ulatin9ums936umskanjiupt154ur8uroman8ushiftjisucp874utis620u
unicode11utf7uusuusasciiuutf-16uutf16u	utf-16-beuutf16beu	utf-16-leuutf16leuutf-8uutf8ucp1250uwindows1250ucp1251uwindows1251ucp1252uwindows1252ucp1253uwindows1253ucp1254uwindows1254ucp1255uwindows1255ucp1256uwindows1256ucp1257uwindows1257ucp1258uwindows1258u
windows936ux-x-big5uDoctypeiu
CharactersiuSpaceCharactersiuStartTagiuEndTagiuEmptyTagiuCommentiu
ParseErrorcCs"g|]\}}||f�qS(((u.0ukuv((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/constants.pyu
<listcomp>s	umathcBs|EeZdZdS(uDataLossWarningN(u__name__u
__module__u__qualname__(u
__locals__((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/constants.pyuDataLossWarningsuDataLossWarningcBs|EeZdZdS(uReparseExceptionN(u__name__u
__module__u__qualname__(u
__locals__((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/constants.pyuReparseExceptionsuReparseException(u	u
uu u
(utableutbodyutfootutheadutr(uh1uh2uh3uh4uh5uh6(ubaseucommanduevent-sourceulinkumetauhrubruimguembeduparamuareaucoluinputusourceutrack(utitleutextarea(ustyleuscriptuxmpuiframeunoembedunoframesunoscript(u
irrelevant(uscoped(uismap(uautoplayucontrols(uautoplayucontrols(udeferuasync(uopen(umultipleudisabled(uhiddenudisableducheckedudefault(u
autosubmit(udisabledureadonly(udisabledureadonlyuselected(udisabledureadonly(udisabledu	autofocus(udisabledureadonlyurequiredu	autofocusucheckeduismap(udisabledureadonlyu	autofocusumultiple(udisabledureadonly( i� i��i i�i i& i  i! i�i0 i`i9 iRi��i}i��i��i i i i i" i i i�i"!iai: iSi��i~ix(ult;ugt;uamp;uapos;uquot;(2u
__future__uabsolute_importudivisionuunicode_literalsustringugettextu_uNoneuEOFuEu
namespacesu	frozensetuscopingElementsuformattingElementsuspecialElementsuhtmlIntegrationPointElementsu"mathmlTextIntegrationPointElementsuadjustForeignAttributesudictuitemsuunadjustForeignAttributesuspaceCharactersutableInsertModeElementsuascii_lowercaseuasciiLowercaseuascii_uppercaseuasciiUppercaseu
ascii_lettersuasciiLettersudigitsu	hexdigitsu	hexDigitsuasciiUpper2LoweruheadingElementsuvoidElementsu
cdataElementsurcdataElementsubooleanAttributesuentitiesWindows1252uxmlEntitiesuentitiesureplacementCharactersu	encodingsu
tokenTypesu
tagTokenTypesuprefixesuUserWarninguDataLossWarningu	ExceptionuReparseException(((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/constants.pyu<module>s�	















































































































































































































































				





















python3.3/site-packages/pip/_vendor/html5lib/__pycache__/inputstream.cpython-33.pyc000064400000103034151733566750024226 0ustar00�
7�Re�wc1@s�ddlmZmZmZddlmZddlZddlZddlm	Z	m
Z
mZmZddlm
Z
mZddlmZddlmZydd	lmZWnek
r�eZYnXydd
lmZWn(ek
r	Gdd�de�ZYnXed
d�e
D��Zedd�eD��Zedd�eD��Zeeddg�BZejd�Zeddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3g �Zejd4�Z iZ!Gd5d6�d6e�Z"ddEdEd7d8�Z%Gd9d:�d:e�Z&Gd;d<�d<e&�Z'Gd=d>�d>e(�Z)Gd?d@�d@e�Z*GdAdB�dBe�Z+dCdD�Z,dS(Fi(uabsolute_importudivisionuunicode_literals(u	text_typeNi(uEOFuspaceCharactersuasciiLettersuasciiUppercase(u	encodingsuReparseException(uutils(uStringIO(uBytesIO(uBufferedIOBasecBs|EeZdZdS(uBufferedIOBaseN(u__name__u
__module__u__qualname__(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuBufferedIOBasesuBufferedIOBasecCsg|]}|jd��qS(uascii(uencode(u.0uitem((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
<listcomp>s	u
<listcomp>cCsg|]}|jd��qS(uascii(uencode(u.0uitem((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
<listcomp>s	cCsg|]}|jd��qS(uascii(uencode(u.0uitem((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
<listcomp>s	s>s<u�[---Ÿ�-�﷐-﷯￾￿🿾🿿𯿾𯿿𿿾𿿿񏿾񏿿񟿾񟿿񯿾񯿿񿿾񿿿򏿾򏿿򟿾򟿿򯿾򯿿򿿾򿿿󏿾󏿿󟿾󟿿󯿾󯿿󿿾󿿿􏿾􏿿]i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��	i��	i��
i��
i��i��i��i��i��
i��
i��i��i��i��i��i��u[	-
 -/:-@[-`{-~]cBsn|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS(uBufferedStreamu�Buffering for streams that do not have buffering of their own

    The buffer is implemented as a list of chunks on the assumption that
    joining many strings will be slow since it is O(n**2)
    cCs%||_g|_ddg|_dS(Niii����(ustreamubufferuposition(uselfustream((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__init__5s		uBufferedStream.__init__cCsPd}x2|jd|jd�D]}|t|�7}q!W||jd7}|S(Nii(ubufferupositionulen(uselfuposuchunk((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyutell:s
!uBufferedStream.tellcCsx||j�kst�|}d}x>t|j|�|krd|t|j|�8}|d7}q'W||g|_dS(Nii(u_bufferedBytesuAssertionErrorulenubufferuposition(uselfuposuoffsetui((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuseekAsuBufferedStream.seekcCsp|js|j|�S|jdt|j�kr_|jdt|jd�kr_|j|�S|j|�SdS(Niii����(ubufferu_readStreamupositionulenu_readFromBuffer(uselfubytes((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyureadJs	
 
uBufferedStream.readcCstdd�|jD��S(NcSsg|]}t|��qS((ulen(u.0uitem((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
<listcomp>Ts	u1BufferedStream._bufferedBytes.<locals>.<listcomp>(usumubuffer(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu_bufferedBytesSsuBufferedStream._bufferedBytescCsJ|jj|�}|jj|�|jdd7<t|�|jd<|S(Nii(ustreamureadubufferuappendupositionulen(uselfubytesudata((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu_readStreamVs
uBufferedStream._readStreamcCs%|}g}|jd}|jd}x�|t|j�kr�|dkr�|dks\t�|j|}|t|�|kr�|}|||g|_n/t|�|}|t|�g|_|d7}|j||||��||8}d}q)W|r|j|j|��ndj|�S(Niis(upositionulenubufferuAssertionErroruappendu_readStreamujoin(uselfubytesuremainingBytesurvubufferIndexubufferOffsetubufferedDataubytesToRead((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu_readFromBuffer]s&

$



uBufferedStream._readFromBufferN(u__name__u
__module__u__qualname__u__doc__u__init__utelluseekureadu_bufferedBytesu_readStreamu_readFromBuffer(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuBufferedStream.s		uBufferedStreamcCs{t|d�r*t|jd�t�}nt|t�}|rd|dk	rZtd��nt|�St||||�SdS(Nureadiu7Cannot explicitly set an encoding with a unicode string(uhasattru
isinstanceureadu	text_typeuNoneu	TypeErroruHTMLUnicodeInputStreamuHTMLBinaryInputStream(usourceuencodingu	parseMetauchardetu	isUnicode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuHTMLInputStreamxs
uHTMLInputStreamcBs�|EeZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
ddd�Zdd�Z
dd�Zddd�Zdd�ZdS(uHTMLUnicodeInputStreamu�Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    i(cCs�td�dkr3|j|_tjd�|_n|j|_tjd�|_dg|_d	|_|j	|�|_
|j�dS(
uInitialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        u􏿿iu	[�-�]u0([�-�](?![�-�])|(?<![�-�])[�-�])iuutf-8ucertainN(uutf-8ucertain(ulenucharacterErrorsUCS4ureportCharacterErrorsureucompileureplaceCharactersRegexpucharacterErrorsUCS2unewLinesucharEncodingu
openStreamu
dataStreamureset(uselfusource((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__init__�s	uHTMLUnicodeInputStream.__init__cCsCd|_d|_d|_g|_d|_d|_d|_dS(Nui(uchunku	chunkSizeuchunkOffsetuerrorsuprevNumLinesuprevNumColsuNoneu_bufferedCharacter(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyureset�s						uHTMLUnicodeInputStream.resetcCs(t|d�r|}nt|�}|S(uvProduces a file object from source.

        source can be either a file object, local filename or a string.

        uread(uhasattruStringIO(uselfusourceustream((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
openStream�s	u!HTMLUnicodeInputStream.openStreamcCst|j}|jdd|�}|j|}|jdd|�}|dkr\|j|}n||d}||fS(Nu
iii����(uchunkucountuprevNumLinesurfinduprevNumCols(uselfuoffsetuchunkunLinesupositionLineulastLinePosupositionColumn((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	_position�s	
u HTMLUnicodeInputStream._positioncCs&|j|j�\}}|d|fS(u:Returns (line, col) of the current position in the stream.i(u	_positionuchunkOffset(uselfulineucol((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuposition�suHTMLUnicodeInputStream.positioncCsL|j|jkr%|j�s%tSn|j}|j|}|d|_|S(uo Read one character from the stream or queue if available. Return
            EOF when EOF is reached.
        i(uchunkOffsetu	chunkSizeu	readChunkuEOFuchunk(uselfuchunkOffsetuchar((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuchar�s	

uHTMLUnicodeInputStream.charcCs^|dkr|j}n|j|j�\|_|_d|_d|_d|_|jj	|�}|j
r�|j
|}d|_
n
|s�dSt|�dkr�t
|d�}|dks�d|ko�dknr�|d
|_
|dd�}q�n|j|�|jjd|�}|jdd	�}|jd
d	�}||_t|�|_dS(Nuiii
i�i��u�u
u
u
Fi����i����i����T(uNoneu_defaultChunkSizeu	_positionu	chunkSizeuprevNumLinesuprevNumColsuchunkuchunkOffsetu
dataStreamureadu_bufferedCharacteruFalseulenuordureportCharacterErrorsureplaceCharactersRegexpusubureplaceuTrue(uselfu	chunkSizeudataulastv((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	readChunk�s0				
(

	u HTMLUnicodeInputStream.readChunkcCs:x3tttj|���D]}|jjd�qWdS(Nuinvalid-codepoint(urangeulenuinvalid_unicode_reufindalluerrorsuappend(uselfudataui((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyucharacterErrorsUCS4s"u*HTMLUnicodeInputStream.characterErrorsUCS4cCsd}x�tj|�D]�}|r(qnt|j��}|j�}tj|||d��r�tj|||d��}|t	kr�|j
jd�nd}q|dkr�|dkr�|t
|�dkr�|j
jd�qd}|j
jd�qWdS(Niuinvalid-codepointi�i��iFT(uFalseuinvalid_unicode_reufinditeruordugroupustartuutilsuisSurrogatePairusurrogatePairToCodepointunon_bmp_invalid_codepointsuerrorsuappenduTrueulen(uselfudatauskipumatchu	codepointuposuchar_val((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyucharacterErrorsUCS2s 	u*HTMLUnicodeInputStream.characterErrorsUCS2c
Cspyt||f}Wn�tk
r�x&|D]}t|�dks+t�q+Wdjdd�|D��}|s|d|}ntjd|�}t||f<YnXg}x�|j|j|j	�}|dkr�|j	|jkr-Pq-nE|j�}||jkr-|j
|j|j	|��||_	Pn|j
|j|j	d��|j�s�Pq�q�dj|�}	|	S(u� Returns a string of characters from the stream up to but not
        including any character in 'characters' or EOF. 'characters' must be
        a container that supports the 'in' method and iteration over its
        characters.
        i�ucSs g|]}dt|��qS(u\x%02x(uord(u.0uc((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
<listcomp>>s	u5HTMLUnicodeInputStream.charsUntil.<locals>.<listcomp>u^%su[%s]+N(ucharsUntilRegExuKeyErroruorduAssertionErrorujoinureucompileumatchuchunkuchunkOffsetuNoneu	chunkSizeuenduappendu	readChunk(
uselfu
charactersuoppositeucharsucuregexurvumuendur((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
charsUntil0s2


&	u!HTMLUnicodeInputStream.charsUntilcCso|dk	rk|jdkr=||j|_|jd7_qk|jd8_|j|j|kskt�ndS(Nii(uNoneuchunkOffsetuchunku	chunkSizeuAssertionError(uselfuchar((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuunget_suHTMLUnicodeInputStream.ungetNF(u__name__u
__module__u__qualname__u__doc__u_defaultChunkSizeu__init__uresetu
openStreamu	_positionupositionucharuNoneu	readChunkucharacterErrorsUCS4ucharacterErrorsUCS2uFalseu
charsUntiluunget(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuHTMLUnicodeInputStream�s!(/uHTMLUnicodeInputStreamcBs}|EeZdZdZddddd�Zdd�Zdd�Zdddd	�Z	d
d�Z
dd
�Zdd�ZdS(uHTMLBinaryInputStreamu�Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    cCs�|j|�|_tj||j�t|�df|_d|_d|_d|_|jddkr�|j
||�|_n|j�dS(uInitialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        ucertainiiduwindows-1252iN(u
openStreamu	rawStreamuHTMLUnicodeInputStreamu__init__u	codecNameucharEncodingunumBytesMetaunumBytesChardetudefaultEncodinguNoneudetectEncodingureset(uselfusourceuencodingu	parseMetauchardet((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__init__xs			uHTMLBinaryInputStream.__init__cCs6tj|jd�|jd�|_tj|�dS(Niureplace(ucodecsu	getreaderucharEncodingu	rawStreamu
dataStreamuHTMLUnicodeInputStreamureset(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyureset�suHTMLBinaryInputStream.resetc	CsVt|d�r|}nt|�}y|j|j��Wnt|�}YnX|S(uvProduces a file object from source.

        source can be either a file object, local filename or a string.

        uread(uhasattruBytesIOuseekutelluBufferedStream(uselfusourceustream((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
openStream�s	u HTMLBinaryInputStream.openStreamc
Cs�|j�}d}|dkr9|r9|j�}d}n|dkr:|r:d}y�yddlm}Wn"tk
r�ddlm}YnXg}|�}x[|js�|jj	|j
�}t|t�s�t
�|s�Pn|j|�|j|�q�W|j�|jd}|jjd�Wq:tk
r6Yq:Xn|dkrXd}|j}nidd6}	|j�|	kr�|	|j�}n||fS(Nucertainu	tentativei(uUniversalDetectoruencodinguwindows-1252u
iso-8859-1(u	detectBOMuNoneudetectEncodingMetaucharade.universaldetectoruUniversalDetectoruImportErroruchardet.universaldetectorudoneu	rawStreamureadunumBytesChardetu
isinstanceubytesuAssertionErroruappendufeeducloseuresultuseekudefaultEncodingulower(
uselfu	parseMetauchardetuencodingu
confidenceuUniversalDetectorubuffersudetectorubufferuencodingSub((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyudetectEncoding�sB	
	




u$HTMLBinaryInputStream.detectEncodingcCs�|jddkst�t|�}|d	kr:d}n|dkrJdS||jdkrv|jddf|_nF|jjd�|j�|df|_td|jd|f��dS(
Niucertainuutf-16u	utf-16-beu	utf-16-leuutf-8iuEncoding changed from %s to %s(uutf-16u	utf-16-beu	utf-16-le(ucharEncodinguAssertionErroru	codecNameuNoneu	rawStreamuseekuresetuReparseException(uselfunewEncoding((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuchangeEncoding�s	
u$HTMLBinaryInputStream.changeEncodingcCs�idtj6dtj6dtj6dtj6dtj6}|jjd�}t|t	�s_t
�|j|dd��}d}|s�|j|�}d}|s�|j|dd	��}d	}q�n|jj|r�|p�d
�|S(u�Attempts to detect at BOM at the start of the stream. If
        an encoding can be determined from the BOM return the name of the
        encoding otherwise return Noneuutf-8u	utf-16-leu	utf-16-beu	utf-32-leu	utf-32-beiNiii(
ucodecsuBOM_UTF8uBOM_UTF16_LEuBOM_UTF16_BEuBOM_UTF32_LEuBOM_UTF32_BEu	rawStreamureadu
isinstanceubytesuAssertionErrorugetuseek(uselfubomDictustringuencodinguseek((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	detectBOM�s 
uHTMLBinaryInputStream.detectBOMcCsk|jj|j�}t|t�s*t�t|�}|jjd�|j�}|dkrgd}n|S(u9Report the encoding declared by the meta element
        iuutf-16u	utf-16-beu	utf-16-leuutf-8(uutf-16u	utf-16-beu	utf-16-le(	u	rawStreamureadunumBytesMetau
isinstanceubytesuAssertionErroruEncodingParseruseekugetEncoding(uselfubufferuparseruencoding((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyudetectEncodingMetas	u(HTMLBinaryInputStream.detectEncodingMetaNT(
u__name__u
__module__u__qualname__u__doc__uNoneuTrueu__init__uresetu
openStreamudetectEncodinguchangeEncodingu	detectBOMudetectEncodingMeta(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuHTMLBinaryInputStreamps(-uHTMLBinaryInputStreamcBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zeee
�Z
dd�Zee�Zedd�Zdd�Zdd�Zdd�ZdS(u
EncodingBytesu�String-like object with an associated position and various extra methods
    If the position is ever greater than the string length then an exception is
    raisedcCs+t|t�st�tj||j��S(N(u
isinstanceubytesuAssertionErroru__new__ulower(uselfuvalue((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__new__&suEncodingBytes.__new__cCs
d|_dS(Nii����(u	_position(uselfuvalue((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__init__*suEncodingBytes.__init__cCs|S(N((uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__iter__-suEncodingBytes.__iter__cCsV|jd}|_|t|�kr/t�n|dkrDt�n|||d�S(Nii(u	_positionulenu
StopIterationu	TypeError(uselfup((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__next__0s		uEncodingBytes.__next__cCs
|j�S(N(u__next__(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyunext8suEncodingBytes.nextcCs\|j}|t|�kr$t�n|dkr9t�n|d|_}|||d�S(Nii(u	_positionulenu
StopIterationu	TypeError(uselfup((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuprevious<s			uEncodingBytes.previouscCs+|jt|�krt�n||_dS(N(u	_positionulenu
StopIteration(uselfuposition((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyusetPositionEs	uEncodingBytes.setPositioncCs<|jt|�krt�n|jdkr4|jSdSdS(Ni(u	_positionulenu
StopIterationuNone(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyugetPositionJs
	uEncodingBytes.getPositioncCs||j|jd�S(Ni(uposition(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyugetCurrentByteTsuEncodingBytes.getCurrentBytecCsf|j}xM|t|�krX|||d�}||krK||_|S|d7}qW||_dS(uSkip past a list of charactersiN(upositionulenu	_positionuNone(uselfucharsupuc((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuskipYs			uEncodingBytes.skipcCsf|j}xM|t|�krX|||d�}||krK||_|S|d7}qW||_dS(Ni(upositionulenu	_positionuNone(uselfucharsupuc((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	skipUntiles			uEncodingBytes.skipUntilcCsT|j}|||t|��}|j|�}|rP|jt|�7_n|S(u�Look for a sequence of bytes at the start of a string. If the bytes
        are found return True and advance the position to the byte after the
        match. Otherwise return False and leave the position alone(upositionulenu
startswith(uselfubytesupudataurv((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
matchBytesps	uEncodingBytes.matchBytescCsn||jd�j|�}|dkrd|jdkrCd|_n|j|t|�d7_dSt�dS(u�Look for the next sequence of bytes matching a given sequence. If
        a match is found advance the position to the last byte of the matchNiii����i����T(upositionufindu	_positionulenuTrueu
StopIteration(uselfubytesunewPosition((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyujumpTo{suEncodingBytes.jumpToN(u__name__u
__module__u__qualname__u__doc__u__new__u__init__u__iter__u__next__unextuprevioususetPositionugetPositionupropertyupositionugetCurrentByteucurrentByteuspaceCharactersBytesuskipu	skipUntilu
matchBytesujumpTo(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
EncodingBytes"s 	u
EncodingBytescBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS(uEncodingParseru?Mini parser for detecting character encoding from meta elementscCst|�|_d|_dS(u3string - the data to work on for encoding detectionN(u
EncodingBytesudatauNoneuencoding(uselfudata((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__init__�suEncodingParser.__init__c
Cs�d|jfd|jfd|jfd|jfd|jfd|jff}xw|jD]l}d}xS|D]K\}}|jj|�rky|�}PWq�tk
r�d}PYq�XqkqkW|sXPqXqXW|j
S(	Ns<!--s<metas</s<!s<?s<TF(u
handleCommentu
handleMetauhandlePossibleEndTaguhandleOtheruhandlePossibleStartTagudatauTrueu
matchBytesu
StopIterationuFalseuencoding(uselfumethodDispatchubyteukeepParsingukeyumethod((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyugetEncoding�s&	

uEncodingParser.getEncodingcCs|jjd�S(uSkip over commentss-->(udataujumpTo(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
handleComment�suEncodingParser.handleCommentcCsD|jjtkrdSd}d}x|j�}|dkrAdS|ddkr�|ddk}|r=|dk	r=||_dSq%|ddkr�|d}t|�}|dk	r=||_dSq%|ddkr%t	t
|d��}|j�}|dk	r=t|�}|dk	r:|r.||_dS|}q:q=q%q%dS(	Nis
http-equiviscontent-typescharsetscontentTF(udataucurrentByteuspaceCharactersBytesuTrueuFalseuNoneugetAttributeuencodingu	codecNameuContentAttrParseru
EncodingBytesuparse(uselfu	hasPragmaupendingEncodinguattrutentativeEncodingucodecu
contentParser((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
handleMeta�s:	
		uEncodingParser.handleMetacCs
|jd�S(NF(uhandlePossibleTaguFalse(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuhandlePossibleStartTag�su%EncodingParser.handlePossibleStartTagcCst|j�|jd�S(NT(unextudatauhandlePossibleTaguTrue(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuhandlePossibleEndTag�s
u#EncodingParser.handlePossibleEndTagcCs�|j}|jtkr9|r5|j�|j�ndS|jt�}|dkra|j�n+|j�}x|dk	r�|j�}qpWdS(Ns<T(
udataucurrentByteuasciiLettersBytesupreviousuhandleOtheruTrueu	skipUntiluspacesAngleBracketsugetAttributeuNone(uselfuendTagudataucuattr((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuhandlePossibleTag�s	


u EncodingParser.handlePossibleTagcCs|jjd�S(Ns>(udataujumpTo(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuhandleOther�suEncodingParser.handleOthercCs�|j}|jttdg�B�}|dksIt|�dksIt�|d	krYdSg}g}x�|dkr~|r~Pnz|tkr�|j�}Pn^|d
kr�dj|�dfS|tkr�|j	|j
��n|dkr�dS|j	|�t|�}qh|dkr0|j�dj|�dfSt|�|j�}|dkr�|}x�t|�}||kr�t|�dj|�dj|�fS|tkr�|j	|j
��q[|j	|�q[n^|dkr�dj|�dfS|tkr|j	|j
��n|dkrdS|j	|�xvt|�}|t
krcdj|�dj|�fS|tkr�|j	|j
��q/|dkr�dS|j	|�q/dS(u_Return a name,value pair for the next attribute in the stream,
        if one is found, or Nones/is>s=ss's"N(s>N(s/s>(s's"(udatauskipuspaceCharactersBytesu	frozensetuNoneulenuAssertionErrorujoinuasciiUppercaseBytesuappendulowerunextuprevioususpacesAngleBrackets(uselfudataucuattrNameu	attrValueu	quoteChar((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyugetAttribute�sh	$




uEncodingParser.getAttributeN(
u__name__u
__module__u__qualname__u__doc__u__init__ugetEncodingu
handleCommentu
handleMetauhandlePossibleStartTaguhandlePossibleEndTaguhandlePossibleTaguhandleOtherugetAttribute(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuEncodingParser�s$uEncodingParsercBs,|EeZdZdd�Zdd�ZdS(uContentAttrParsercCs"t|t�st�||_dS(N(u
isinstanceubytesuAssertionErrorudata(uselfudata((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu__init__?suContentAttrParser.__init__cCsNy1|jjd�|jjd7_|jj�|jjdksHdS|jjd7_|jj�|jjdkr�|jj}|jjd7_|jj}|jj|�r�|j||jj�SdSn]|jj}y+|jjt�|j||jj�SWn#tk
r/|j|d�SYnXWntk
rIdSYnXdS(Nscharsetis=s"s'(s"s'(	udataujumpToupositionuskipucurrentByteuNoneu	skipUntiluspaceCharactersBytesu
StopIteration(uselfu	quoteMarkuoldPosition((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuparseCs.



uContentAttrParser.parseN(u__name__u
__module__u__qualname__u__init__uparse(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyuContentAttrParser>suContentAttrParsercCstt|t�r>y|jd�}Wq>tk
r:dSYq>Xn|rltjd|�j�}tj	|d�SdSdS(u{Return the python codec name corresponding to an encoding or None if the
    string doesn't correspond to a valid encoding.uasciiuN(
u
isinstanceubytesudecodeuUnicodeDecodeErroruNoneuascii_punctuation_reusubuloweru	encodingsuget(uencodingu
canonicalName((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	codecNamees
u	codecNameT(-u
__future__uabsolute_importudivisionuunicode_literalsupip._vendor.sixu	text_typeucodecsureu	constantsuEOFuspaceCharactersuasciiLettersuasciiUppercaseu	encodingsuReparseExceptionuuutilsuiouStringIOuBytesIOuImportErroruBufferedIOBaseuobjectu	frozensetuspaceCharactersBytesuasciiLettersBytesuasciiUppercaseBytesuspacesAngleBracketsucompileuinvalid_unicode_reusetunon_bmp_invalid_codepointsuascii_punctuation_reucharsUntilRegExuBufferedStreamuNoneuTrueuHTMLInputStreamuHTMLUnicodeInputStreamuHTMLBinaryInputStreamubytesu
EncodingBytesuEncodingParseruContentAttrParseru	codecName(((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu<module>sJ"

J��g�'python3.3/site-packages/pip/_vendor/html5lib/__pycache__/html5parser.cpython-33.pyc000064400000503222151733566750024124 0ustar00�
7�Re%�c@s�ddlmZmZmZddlmZddlZddlmZddlm	Z	ddlm
Z
ddlmZdd	lm
Z
dd
lmZddlmZmZddlmZdd
lmZddlmZmZddlmZmZmZddlmZmZddlmZdeedd�Zddeedd�Zdd�Z Gdd�de!�Z"dd�Z#dee$dd �Z%Gd!d"�d"e&�Z'dS(#i(uabsolute_importudivisionuunicode_literals(uwith_metaclassNi(uinputstream(u	tokenizer(utreebuilders(uMarker(uutils(u	constants(uspaceCharactersuasciiUpper2Lower(uspecialElements(uheadingElements(u
cdataElementsurcdataElements(u
tokenTypesuReparseExceptionu
namespaces(uhtmlIntegrationPointElementsu"mathmlTextIntegrationPointElements(uadjustForeignAttributesuetreecCs4tj|�}t|d|�}|j|d|�S(u.Parse a string or file-like object into a treeunamespaceHTMLElementsuencoding(utreebuildersugetTreeBuilderu
HTMLParseruparse(udocutreebuilderuencodingunamespaceHTMLElementsutbup((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuparsesuparseudivcCs:tj|�}t|d|�}|j|d|d|�S(NunamespaceHTMLElementsu	containeruencoding(utreebuildersugetTreeBuilderu
HTMLParseru
parseFragment(udocu	containerutreebuilderuencodingunamespaceHTMLElementsutbup((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
parseFragmentsu
parseFragmentcs G�fdd�dt�}|S(Ncs&|EeZdZ�fdd�ZdS(u-method_decorator_metaclass.<locals>.Decoratedcs^xE|j�D]7\}}t|tj�r:�|�}n|||<q
Wtj||||�S(N(uitemsu
isinstanceutypesuFunctionTypeutypeu__new__(umetau	classnameubasesu	classDictu
attributeNameu	attribute(ufunction(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__new__(s
u5method_decorator_metaclass.<locals>.Decorated.__new__N(u__name__u
__module__u__qualname__u__new__(u
__locals__(ufunction(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu	Decorated'su	Decorated(utype(ufunctionu	Decorated((ufunctionu9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyumethod_decorator_metaclass&sumethod_decorator_metaclasscBs"|EeZdZdZd&ejd'd(d'dd�Z	d'dd&d(d(dd�Z
dd�Zd	d
�Zdd�Z
d
d�Zdd�Zd&d(d(dd�Zdd&d'd(dd�Zdidd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&S()u
HTMLParseruZHTML parser. Generates a tree structure from a stream of (possibly
        malformed) HTMLcsz|�_|dkr'tjd�}n||��_|�_g�_t�fdd�t|�j	�D���_
dS(u�
        strict - raise an exception when a parse error is encountered

        tree - a treebuilder class controlling the type of tree that will be
        returned. Built in treebuilders can be accessed through
        html5lib.treebuilders.getTreeBuilder(treeType)

        tokenizer - a class that provides a stream of tokens to the treebuilder.
        This may be replaced for e.g. a sanitizer which converts some tags to
        text
        uetreecs.g|]$\}}||��j�f�qS((utree(u.0unameucls(uself(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
<listcomp>Ms	u'HTMLParser.__init__.<locals>.<listcomp>N(ustrictuNoneutreebuildersugetTreeBuilderutreeutokenizer_classuerrorsudictu	getPhasesuitemsuphases(uselfutreeu	tokenizerustrictunamespaceHTMLElementsudebug((uselfu9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__6s			uHTMLParser.__init__udivcKs�||_||_|j|d|d|d|d||�|_|j�x1y|j�PWqLtk
ry|j�YqLXqLdS(Nuencodingu	parseMetau
useChardetuparser(u
innerHTMLModeu	containerutokenizer_classu	tokenizeruresetumainLoopuReparseException(uselfustreamu	innerHTMLu	containeruencodingu	parseMetau
useChardetukwargs((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu_parsePs		


uHTMLParser._parsecCs|jj�d|_g|_g|_d|_|jr�|jj	�|_
|j
tkrp|jj
|j_nH|j
tkr�|jj|j_n$|j
dkr�|jj|j_n|jd|_|jj�|j�nd|_
|jd|_d|_d|_d|_dS(Nu	no quirksu	plaintextu
beforeHtmluinitialFT(utreeuresetuFalseu
firstStartTaguerrorsulogu
compatModeu
innerHTMLModeu	containeruloweru	innerHTMLu
cdataElementsu	tokenizerurcdataStateustateurcdataElementsurawtextStateuplaintextStateuphasesuphaseuinsertHtmlElementuresetInsertionModeuNoneu	lastPhaseubeforeRCDataPhaseuTrueu
framesetOK(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuresetbs*
					

			uHTMLParser.resetcCse|jdkrK|jtdkrKd|jkoJ|jdjt�dkS|j|jftkSdS(Nuannotation-xmlumathmluencodingu	text/htmluapplication/xhtml+xml(u	text/htmluapplication/xhtml+xml(unameu	namespaceu
namespacesu
attributesu	translateuasciiUpper2LoweruhtmlIntegrationPointElements(uselfuelement((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuisHTMLIntegrationPoint�s
u!HTMLParser.isHTMLIntegrationPointcCs|j|jftkS(N(u	namespaceunameu"mathmlTextIntegrationPointElements(uselfuelement((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuisMathMLTextIntegrationPoint�su'HTMLParser.isMathMLTextIntegrationPointcCs*td}td}td}td}td}td}td}x�|j�D]y}|}	x+|	dk	r�|jjr�|jjdnd}
|
r�|
jnd}|
r�|
jnd}|	d	}
|
|kr�|j|	d
|	jdi��d}	qbt	|jj�dks�||jj
ks�|j|
�rl|
|krZ|d
tddg�ks�|
||fks�|t
dkr�|dkr�|d
dks�|j|
�r�|
|||fkr�|j}n
|jd}|
|kr�|j|	�}	qb|
|kr|j|	�}	qb|
|kr/|j|	�}	qb|
|krM|j|	�}	qb|
|krk|j|	�}	qb|
|krb|j|	�}	qbqbW|
|krS|drS|drS|jdi|d
d
6�qSqSWd}g}xG|r%|j|j�|jj�}|r�|j|ks"t�q�q�WdS(Nu
CharactersuSpaceCharactersuStartTaguEndTaguCommentuDoctypeu
ParseErroriutypeudataudatavarsiunameumglyphu
malignmarkumathmluannotation-xmlusvguinForeignContentuselfClosinguselfClosingAcknowledgedu&non-void-element-with-trailing-solidusi����T(u
tokenTypesunormalizedTokensuNoneutreeuopenElementsu	namespaceunameu
parseErrorugetulenudefaultNamespaceuisMathMLTextIntegrationPointu	frozensetu
namespacesuisHTMLIntegrationPointuphaseuphasesuprocessCharactersuprocessSpaceCharactersuprocessStartTagu
processEndTaguprocessCommentuprocessDoctypeuTrueuappendu
processEOFuAssertionError(uselfuCharactersTokenuSpaceCharactersTokenu
StartTagTokenuEndTagTokenuCommentTokenuDoctypeTokenuParseErrorTokenutokenu	new_tokenucurrentNodeucurrentNodeNamespaceucurrentNodeNameutypeuphaseu	reprocessuphases((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyumainLoop�sj






"
 	
		uHTMLParser.mainLoopccs&x|jD]}|j|�Vq
WdS(N(u	tokenizerunormalizeToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyunormalizedTokens�suHTMLParser.normalizedTokensc
Cs2|j|ddd|d|d|�|jj�S(ufParse a HTML document into a well-formed tree

        stream - a filelike object or string containing the HTML to be parsed

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)
        u	innerHTMLuencodingu	parseMetau
useChardetF(u_parseuFalseutreeugetDocument(uselfustreamuencodingu	parseMetau
useChardet((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuparse�s

uHTMLParser.parsecCs)|j|dd|d|�|jj�S(u�Parse a HTML fragment into a well-formed tree fragment

        container - name of the element we're setting the innerHTML property
        if set to None, default to 'div'

        stream - a filelike object or string containing the HTML to be parsed

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)
        u	containeruencodingT(u_parseuTrueutreeugetFragment(uselfustreamu	containeruencodingu	parseMetau
useChardet((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
parseFragment�suHTMLParser.parseFragmentuXXX-undefined-errorcCs;|jj|jjj�||f�|jr7t�ndS(N(uerrorsuappendu	tokenizerustreamupositionustrictu
ParseError(uselfu	errorcodeudatavars((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
parseError�s%	uHTMLParser.parseErrorcCs<|dtdkr8t|dddd��|d<n|S(u3 HTML5 specific normalizations to the token stream utypeuStartTagudataNii����(u
tokenTypesudict(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyunormalizeToken�s$uHTMLParser.normalizeTokencCsbidd6}xN|j�D]@\}}||dkr|d||d|<|d|=qqWdS(Nu
definitionURLu
definitionurludata(uitems(uselfutokenureplacementsukuv((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuadjustMathMLAttributess

u!HTMLParser.adjustMathMLAttributescCsi>dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6}xXt|d}j��D]@}||kr�||}|d}||d}|<|d}|=q�q�WdS(~Nu
attributeNameu
attributenameu
attributeTypeu
attributetypeu
baseFrequencyu
basefrequencyubaseProfileubaseprofileucalcModeucalcmodeu
clipPathUnitsu
clippathunitsucontentScriptTypeucontentscripttypeucontentStyleTypeucontentstyletypeudiffuseConstantudiffuseconstantuedgeModeuedgemodeuexternalResourcesRequireduexternalresourcesrequiredu	filterResu	filterresufilterUnitsufilterunitsuglyphRefuglyphrefugradientTransformugradienttransformu
gradientUnitsu
gradientunitsukernelMatrixukernelmatrixukernelUnitLengthukernelunitlengthu	keyPointsu	keypointsu
keySplinesu
keysplinesukeyTimesukeytimesulengthAdjustulengthadjustulimitingConeAngleulimitingconeangleumarkerHeightumarkerheightumarkerUnitsumarkerunitsumarkerWidthumarkerwidthumaskContentUnitsumaskcontentunitsu	maskUnitsu	maskunitsu
numOctavesu
numoctavesu
pathLengthu
pathlengthupatternContentUnitsupatterncontentunitsupatternTransformupatterntransformupatternUnitsupatternunitsu	pointsAtXu	pointsatxu	pointsAtYu	pointsatyu	pointsAtZu	pointsatzu
preserveAlphau
preservealphaupreserveAspectRatioupreserveaspectratiouprimitiveUnitsuprimitiveunitsurefXurefxurefYurefyurepeatCounturepeatcountu	repeatDuru	repeatdururequiredExtensionsurequiredextensionsurequiredFeaturesurequiredfeaturesuspecularConstantuspecularconstantuspecularExponentuspecularexponentuspreadMethoduspreadmethodustartOffsetustartoffsetustdDeviationustddeviationustitchTilesustitchtilesusurfaceScaleusurfacescaleusystemLanguageusystemlanguageutableValuesutablevaluesutargetXutargetxutargetYutargetyu
textLengthu
textlengthuviewBoxuviewboxu
viewTargetu
viewtargetuxChannelSelectoruxchannelselectoruyChannelSelectoruychannelselectoru
zoomAndPanu
zoomandpanudata(ulistukeys(uselfutokenureplacementsuoriginalNameusvgName((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuadjustSVGAttributes	s�

uHTMLParser.adjustSVGAttributescCs_t}xR|dj�D]@}||kr||}|d||d|<|d|=qqWdS(Nudata(uadjustForeignAttributesMapukeys(uselfutokenureplacementsuoriginalNameuforeignName((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuadjustForeignAttributesPs
u"HTMLParser.adjustForeignAttributescCs|jj�dS(N(uparseruphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyureparseTokenNormalYsuHTMLParser.reparseTokenNormalcCs]d}idd6dd6dd6dd6dd	6dd
6dd6dd
6dd6dd6dd6dd6dd6dd6}x�|jjddd�D]�}|j}d}||jjdkr�|js�t�d}|j}n|dkr�|js�t�n|r|j|jj	krq�n||kr5|j
||}Pq�|r�|j
d}Pq�q�W||_dS(NuinSelectuselectuinCellutduthuinRowutruinTableBodyutbodyutheadutfootu	inCaptionucaptionu
inColumnGroupucolgroupuinTableutableuinBodyuheadubodyu
inFramesetuframesetu
beforeHeaduhtmliiFi����T(uselectucolgroupuheaduhtml(uFalseutreeuopenElementsunameuNoneu	innerHTMLuAssertionErroruTrueu	namespaceudefaultNamespaceuphasesuphase(uselfulastunewModesunodeunodeNameu	new_phase((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuresetInsertionMode\sD
 	
uHTMLParser.resetInsertionModecCsu|dkst�|jj|�|dkrC|jj|j_n|jj|j_|j|_|j	d|_dS(uYGeneric RCDATA/RAWTEXT Parsing algorithm
        contentType - RCDATA or RAWTEXT
        uRAWTEXTuRCDATAutextN(uRAWTEXTuRCDATA(
uAssertionErrorutreeu
insertElementu	tokenizerurawtextStateustateurcdataStateuphaseu
originalPhaseuphases(uselfutokenucontentType((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuparseRCDataRawtext�suHTMLParser.parseRCDataRawtextNFT(u__name__u
__module__u__qualname__u__doc__uNoneu	tokenizeru
HTMLTokenizeruFalseuTrueu__init__u_parseuresetuisHTMLIntegrationPointuisMathMLTextIntegrationPointumainLoopunormalizedTokensuparseu
parseFragmentu
parseErrorunormalizeTokenuadjustMathMLAttributesuadjustSVGAttributesuadjustForeignAttributesureparseTokenNormaluresetInsertionModeuparseRCDataRawtext(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
HTMLParser2s*	"
@G	,u
HTMLParsercs7dd�}dd�}Gdd�dt|||����Gdd�d��}Gd	d
�d
��}G�fdd�d��}G�fd
d�d��}G�fdd�d��}G�fdd�d��}G�fdd�d��}	G�fdd�d��}
G�fdd�d��}G�fdd�d��}G�fdd�d��}
G�fdd�d��}G�fdd �d ��}G�fd!d"�d"��}G�fd#d$�d$��}G�fd%d&�d&��}G�fd'd(�d(��}G�fd)d*�d*��}G�fd+d,�d,��}G�fd-d.�d.��}G�fd/d0�d0��}G�fd1d2�d2��}i|d36|d46|d56|d66|d76|d86|	d96|
d:6|d;6|d<6|
d=6|d>6|d?6|d@6|dA6|dB6|dC6|dD6|dE6|dF6|dG6|dH6S(INcs;tdd�tjj�D�����fdd�}|S(u4Logger that records which phase processes each tokencss!|]\}}||fVqdS(N((u.0ukeyuvalue((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu	<genexpr>�su)getPhases.<locals>.log.<locals>.<genexpr>c
s��jjd�r�t|�dkr�|d}yi�|dd6}Wn�YnX|dtjkry|d|d<n|jjj|jjj	j|jj
jj|jj�j|f��|||�S�|||�SdS(Nuprocessiutypeuname(u__name__u
startswithulenu	constantsu
tagTokenTypesuparseruloguappendu	tokenizerustateuphaseu	__class__(uselfuargsukwargsutokenuinfo(ufunctionu
type_names(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuwrapped�s$
	
u'getPhases.<locals>.log.<locals>.wrapped(udictu	constantsu
tokenTypesuitems(ufunctionuwrapped((ufunctionu
type_namesu9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyulog�sugetPhases.<locals>.logcSs|rt|�StSdS(N(umethod_decorator_metaclassutype(u
use_metaclassumetaclass_func((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyugetMetaclass�s
ugetPhases.<locals>.getMetaclasscBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS(ugetPhases.<locals>.PhaseuNBase class for helper object that implements each phase of processing
        cSs||_||_dS(N(uparserutree(uselfuparserutree((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�s	u!getPhases.<locals>.Phase.__init__cSs
t�dS(N(uNotImplementedError(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�su#getPhases.<locals>.Phase.processEOFcSs!|jj||jjd�dS(Nii����(utreeu
insertCommentuopenElements(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessComment�su'getPhases.<locals>.Phase.processCommentcSs|jjd�dS(Nuunexpected-doctype(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessDoctype�su'getPhases.<locals>.Phase.processDoctypecSs|jj|d�dS(Nudata(utreeu
insertText(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�su*getPhases.<locals>.Phase.processCharacterscSs|jj|d�dS(Nudata(utreeu
insertText(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacters�su/getPhases.<locals>.Phase.processSpaceCharacterscSs|j|d|�S(Nuname(ustartTagHandler(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessStartTag�su(getPhases.<locals>.Phase.processStartTagcSs�|jjr0|ddkr0|jjd�nxQ|dj�D]?\}}||jjdjkrA||jjdj|<qAqAWd|j_dS(Nunameuhtmlu
non-html-rootudataiF(uparseru
firstStartTagu
parseErroruitemsutreeuopenElementsu
attributesuFalse(uselfutokenuattruvalue((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHtml�su%getPhases.<locals>.Phase.startTagHtmlcSs|j|d|�S(Nuname(u
endTagHandler(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEndTag�su&getPhases.<locals>.Phase.processEndTagN(
u__name__u
__module__u__qualname__u__doc__u__init__u
processEOFuprocessCommentuprocessDoctypeuprocessCharactersuprocessSpaceCharactersuprocessStartTagustartTagHtmlu
processEndTag(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuPhase�s
uPhasecBst|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS(ugetPhases.<locals>.InitialPhasecSsdS(N((uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacters�su6getPhases.<locals>.InitialPhase.processSpaceCharacterscSs|jj||jj�dS(N(utreeu
insertCommentudocument(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessComment�su.getPhases.<locals>.InitialPhase.processCommentc=Ssu|d}|d}|d}|d}|dksX|dk	sX|dk	rk|dkrk|jjd�n|dkr�d}n|jj|�|dkr�|jt�}n|s|ddks|jdJ�s|dKks|jdL�r�|dks|r"|j�dDkr"dE|j_	n9|jdM�sL|jdN�r[|dk	r[dH|j_	n|jj
dI|j_dS(ONunameupublicIdusystemIducorrectuhtmluabout:legacy-compatuunknown-doctypeuu*+//silmaril//dtd html pro v0r11 19970101//u4-//advasoft ltd//dtd html 3.0 aswedit + extensions//u*-//as//dtd html 3.0 aswedit + extensions//u-//ietf//dtd html 2.0 level 1//u-//ietf//dtd html 2.0 level 2//u&-//ietf//dtd html 2.0 strict level 1//u&-//ietf//dtd html 2.0 strict level 2//u-//ietf//dtd html 2.0 strict//u-//ietf//dtd html 2.0//u-//ietf//dtd html 2.1e//u-//ietf//dtd html 3.0//u-//ietf//dtd html 3.2 final//u-//ietf//dtd html 3.2//u-//ietf//dtd html 3//u-//ietf//dtd html level 0//u-//ietf//dtd html level 1//u-//ietf//dtd html level 2//u-//ietf//dtd html level 3//u"-//ietf//dtd html strict level 0//u"-//ietf//dtd html strict level 1//u"-//ietf//dtd html strict level 2//u"-//ietf//dtd html strict level 3//u-//ietf//dtd html strict//u-//ietf//dtd html//u(-//metrius//dtd metrius presentational//u5-//microsoft//dtd internet explorer 2.0 html strict//u.-//microsoft//dtd internet explorer 2.0 html//u0-//microsoft//dtd internet explorer 2.0 tables//u5-//microsoft//dtd internet explorer 3.0 html strict//u.-//microsoft//dtd internet explorer 3.0 html//u0-//microsoft//dtd internet explorer 3.0 tables//u#-//netscape comm. corp.//dtd html//u*-//netscape comm. corp.//dtd strict html//u*-//o'reilly and associates//dtd html 2.0//u3-//o'reilly and associates//dtd html extended 1.0//u;-//o'reilly and associates//dtd html extended relaxed 1.0//uN-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//uE-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//u$-//spyglass//dtd html 2.0 extended//u+-//sq//dtd html 2.0 hotmetal + extensions//u--//sun microsystems corp.//dtd hotjava html//u4-//sun microsystems corp.//dtd hotjava strict html//u-//w3c//dtd html 3 1995-03-24//u-//w3c//dtd html 3.2 draft//u-//w3c//dtd html 3.2 final//u-//w3c//dtd html 3.2//u-//w3c//dtd html 3.2s draft//u-//w3c//dtd html 4.0 frameset//u#-//w3c//dtd html 4.0 transitional//u(-//w3c//dtd html experimental 19960712//u&-//w3c//dtd html experimental 970421//u-//w3c//dtd w3 html//u-//w3o//dtd w3 html 3.0//u#-//webtechs//dtd mozilla html 2.0//u-//webtechs//dtd mozilla html//u$-//w3o//dtd w3 html strict 3.0//en//u"-/w3c/dtd html 4.0 transitional/enu -//w3c//dtd html 4.01 frameset//u$-//w3c//dtd html 4.01 transitional//u:http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtduquirksu -//w3c//dtd xhtml 1.0 frameset//u$-//w3c//dtd xhtml 1.0 transitional//ulimited quirksu
beforeHtml(7u*+//silmaril//dtd html pro v0r11 19970101//u4-//advasoft ltd//dtd html 3.0 aswedit + extensions//u*-//as//dtd html 3.0 aswedit + extensions//u-//ietf//dtd html 2.0 level 1//u-//ietf//dtd html 2.0 level 2//u&-//ietf//dtd html 2.0 strict level 1//u&-//ietf//dtd html 2.0 strict level 2//u-//ietf//dtd html 2.0 strict//u-//ietf//dtd html 2.0//u-//ietf//dtd html 2.1e//u-//ietf//dtd html 3.0//u-//ietf//dtd html 3.2 final//u-//ietf//dtd html 3.2//u-//ietf//dtd html 3//u-//ietf//dtd html level 0//u-//ietf//dtd html level 1//u-//ietf//dtd html level 2//u-//ietf//dtd html level 3//u"-//ietf//dtd html strict level 0//u"-//ietf//dtd html strict level 1//u"-//ietf//dtd html strict level 2//u"-//ietf//dtd html strict level 3//u-//ietf//dtd html strict//u-//ietf//dtd html//u(-//metrius//dtd metrius presentational//u5-//microsoft//dtd internet explorer 2.0 html strict//u.-//microsoft//dtd internet explorer 2.0 html//u0-//microsoft//dtd internet explorer 2.0 tables//u5-//microsoft//dtd internet explorer 3.0 html strict//u.-//microsoft//dtd internet explorer 3.0 html//u0-//microsoft//dtd internet explorer 3.0 tables//u#-//netscape comm. corp.//dtd html//u*-//netscape comm. corp.//dtd strict html//u*-//o'reilly and associates//dtd html 2.0//u3-//o'reilly and associates//dtd html extended 1.0//u;-//o'reilly and associates//dtd html extended relaxed 1.0//uN-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//uE-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//u$-//spyglass//dtd html 2.0 extended//u+-//sq//dtd html 2.0 hotmetal + extensions//u--//sun microsystems corp.//dtd hotjava html//u4-//sun microsystems corp.//dtd hotjava strict html//u-//w3c//dtd html 3 1995-03-24//u-//w3c//dtd html 3.2 draft//u-//w3c//dtd html 3.2 final//u-//w3c//dtd html 3.2//u-//w3c//dtd html 3.2s draft//u-//w3c//dtd html 4.0 frameset//u#-//w3c//dtd html 4.0 transitional//u(-//w3c//dtd html experimental 19960712//u&-//w3c//dtd html experimental 970421//u-//w3c//dtd w3 html//u-//w3o//dtd w3 html 3.0//u#-//webtechs//dtd mozilla html 2.0//u-//webtechs//dtd mozilla html//(u$-//w3o//dtd w3 html strict 3.0//en//u"-/w3c/dtd html 4.0 transitional/enuhtml(u -//w3c//dtd html 4.01 frameset//u$-//w3c//dtd html 4.01 transitional//(u -//w3c//dtd xhtml 1.0 frameset//u$-//w3c//dtd xhtml 1.0 transitional//(u -//w3c//dtd html 4.01 frameset//u$-//w3c//dtd html 4.01 transitional//(uNoneuparseru
parseErrorutreeu
insertDoctypeu	translateuasciiUpper2Loweru
startswithuloweru
compatModeuphasesuphase(uselfutokenunameupublicIdusystemIducorrect((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessDoctype�s�



						u.getPhases.<locals>.InitialPhase.processDoctypecSs&d|j_|jjd|j_dS(Nuquirksu
beforeHtml(uparseru
compatModeuphasesuphase(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuanythingElseJsu,getPhases.<locals>.InitialPhase.anythingElsecSs|jjd�|j�|S(Nuexpected-doctype-but-got-chars(uparseru
parseErroruanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharactersNs
u1getPhases.<locals>.InitialPhase.processCharacterscSs,|jjdi|dd6�|j�|S(Nu"expected-doctype-but-got-start-taguname(uparseru
parseErroruanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessStartTagSs
u/getPhases.<locals>.InitialPhase.processStartTagcSs,|jjdi|dd6�|j�|S(Nu expected-doctype-but-got-end-taguname(uparseru
parseErroruanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEndTagYs
u-getPhases.<locals>.InitialPhase.processEndTagcSs|jjd�|j�dS(Nuexpected-doctype-but-got-eofT(uparseru
parseErroruanythingElseuTrue(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF_s
u*getPhases.<locals>.InitialPhase.processEOFN(u__name__u
__module__u__qualname__uprocessSpaceCharactersuprocessCommentuprocessDoctypeuanythingElseuprocessCharactersuprocessStartTagu
processEndTagu
processEOF(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInitialPhase�s`uInitialPhasecBsh|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS(u"getPhases.<locals>.BeforeHtmlPhasecSs3|jjtdd��|jjd|j_dS(NuhtmluStartTagu
beforeHead(utreeu
insertRootuimpliedTagTokenuparseruphasesuphase(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuinsertHtmlElementfsu4getPhases.<locals>.BeforeHtmlPhase.insertHtmlElementcSs|j�dS(NT(uinsertHtmlElementuTrue(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOFks
u-getPhases.<locals>.BeforeHtmlPhase.processEOFcSs|jj||jj�dS(N(utreeu
insertCommentudocument(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCommentosu1getPhases.<locals>.BeforeHtmlPhase.processCommentcSsdS(N((uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharactersrsu9getPhases.<locals>.BeforeHtmlPhase.processSpaceCharacterscSs|j�|S(N(uinsertHtmlElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharactersus
u4getPhases.<locals>.BeforeHtmlPhase.processCharacterscSs-|ddkrd|j_n|j�|S(NunameuhtmlT(uTrueuparseru
firstStartTaguinsertHtmlElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessStartTagys
u2getPhases.<locals>.BeforeHtmlPhase.processStartTagcSsC|ddkr1|jjdi|dd6�n|j�|SdS(Nunameuheadubodyuhtmlubruunexpected-end-tag-before-html(uheadubodyuhtmlubr(uparseru
parseErroruinsertHtmlElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEndTags

u0getPhases.<locals>.BeforeHtmlPhase.processEndTagN(
u__name__u
__module__u__qualname__uinsertHtmlElementu
processEOFuprocessCommentuprocessSpaceCharactersuprocessCharactersuprocessStartTagu
processEndTag(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuBeforeHtmlPhasedsuBeforeHtmlPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS(u"getPhases.<locals>.BeforeHeadPhasecs}�j|||�tjd|jfd|jfg�|_|j|j_tjd|jfg�|_	|j
|j	_dS(Nuhtmluheadubodyubr(uheadubodyuhtmlubr(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagHeadustartTagHandleru
startTagOtherudefaultuendTagImplyHeadu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�su+getPhases.<locals>.BeforeHeadPhase.__init__cSs|jtdd��dS(NuheaduStartTagT(ustartTagHeaduimpliedTagTokenuTrue(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�su-getPhases.<locals>.BeforeHeadPhase.processEOFcSsdS(N((uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacters�su9getPhases.<locals>.BeforeHeadPhase.processSpaceCharacterscSs|jtdd��|S(NuheaduStartTag(ustartTagHeaduimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�su4getPhases.<locals>.BeforeHeadPhase.processCharacterscSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHtml�su/getPhases.<locals>.BeforeHeadPhase.startTagHtmlcSs@|jj|�|jjd|j_|jjd|j_dS(NiuinHeadi����(utreeu
insertElementuopenElementsuheadPointeruparseruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHead�su/getPhases.<locals>.BeforeHeadPhase.startTagHeadcSs|jtdd��|S(NuheaduStartTag(ustartTagHeaduimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther�su0getPhases.<locals>.BeforeHeadPhase.startTagOthercSs|jtdd��|S(NuheaduStartTag(ustartTagHeaduimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagImplyHead�su2getPhases.<locals>.BeforeHeadPhase.endTagImplyHeadcSs"|jjdi|dd6�dS(Nuend-tag-after-implied-rootuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther�su.getPhases.<locals>.BeforeHeadPhase.endTagOtherN(u__name__u
__module__u__qualname__u__init__u
processEOFuprocessSpaceCharactersuprocessCharactersustartTagHtmlustartTagHeadu
startTagOtheruendTagImplyHeaduendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuBeforeHeadPhase�suBeforeHeadPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS( ugetPhases.<locals>.InHeadPhasec
s��j|||�tjd|jfd|jfd|jfd|jfd|jfd|jfd
|j	fg�|_
|j|j
_tjd
|j
fd|jfg�|_|j|j_dS(Nuhtmlutitleunoscriptunoframesustyleuscriptubaseubasefontubgsounducommandulinkumetauheadubrubody(unoscriptunoframesustyle(ubaseubasefontubgsounducommandulink(ubruhtmlubody(u__init__uutilsuMethodDispatcherustartTagHtmlu
startTagTitleustartTagNoScriptNoFramesStyleustartTagScriptustartTagBaseLinkCommandustartTagMetaustartTagHeadustartTagHandleru
startTagOtherudefaultu
endTagHeaduendTagHtmlBodyBru
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�s	u'getPhases.<locals>.InHeadPhase.__init__cSs|j�dS(NT(uanythingElseuTrue(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�s
u)getPhases.<locals>.InHeadPhase.processEOFcSs|j�|S(N(uanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�s
u0getPhases.<locals>.InHeadPhase.processCharacterscSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHtml�su+getPhases.<locals>.InHeadPhase.startTagHtmlcSs|jjd�dS(Nu!two-heads-are-not-better-than-one(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHead�su+getPhases.<locals>.InHeadPhase.startTagHeadcSs.|jj|�|jjj�d|d<dS(NuselfClosingAcknowledgedT(utreeu
insertElementuopenElementsupopuTrue(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagBaseLinkCommand�su6getPhases.<locals>.InHeadPhase.startTagBaseLinkCommandcSs�|jj|�|jjj�d
|d<|d}|jjjjddkr�d|kry|jjjj	|d�q�d|kr�d|kr�|dj
�dkr�tj|dj
d	��}tj|�}|j�}|jjjj	|�q�ndS(NuselfClosingAcknowledgedudataiu	tentativeucharsetucontentu
http-equivucontent-typeuutf-8T(utreeu
insertElementuopenElementsupopuTrueuparseru	tokenizerustreamucharEncodinguchangeEncodinguloweruinputstreamu
EncodingBytesuencodeuContentAttrParseruparse(uselfutokenu
attributesudatauparserucodec((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagMeta�s

u+getPhases.<locals>.InHeadPhase.startTagMetacSs|jj|d�dS(NuRCDATA(uparseruparseRCDataRawtext(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagTitle�su,getPhases.<locals>.InHeadPhase.startTagTitlecSs|jj|d�dS(NuRAWTEXT(uparseruparseRCDataRawtext(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagNoScriptNoFramesStyle�su<getPhases.<locals>.InHeadPhase.startTagNoScriptNoFramesStylecSsT|jj|�|jjj|jj_|jj|j_|jjd|j_dS(Nutext(	utreeu
insertElementuparseru	tokenizeruscriptDataStateustateuphaseu
originalPhaseuphases(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagScript�su-getPhases.<locals>.InHeadPhase.startTagScriptcSs|j�|S(N(uanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOthers
u,getPhases.<locals>.InHeadPhase.startTagOthercSsQ|jjjj�}|jdks7td|j��|jjd|j_dS(NuheaduExpected head got %su	afterHead(uparserutreeuopenElementsupopunameuAssertionErroruphasesuphase(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
endTagHeads"u)getPhases.<locals>.InHeadPhase.endTagHeadcSs|j�|S(N(uanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagHtmlBodyBr
s
u/getPhases.<locals>.InHeadPhase.endTagHtmlBodyBrcSs"|jjdi|dd6�dS(Nuunexpected-end-taguname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOthersu*getPhases.<locals>.InHeadPhase.endTagOthercSs|jtd��dS(Nuhead(u
endTagHeaduimpliedTagToken(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuanythingElsesu+getPhases.<locals>.InHeadPhase.anythingElseN(u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCharactersustartTagHtmlustartTagHeadustartTagBaseLinkCommandustartTagMetau
startTagTitleustartTagNoScriptNoFramesStyleustartTagScriptu
startTagOtheru
endTagHeaduendTagHtmlBodyBruendTagOtheruanythingElse(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInHeadPhase�suInHeadPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS(u!getPhases.<locals>.AfterHeadPhasec
s��j|||�tjd|jfd|jfd|jfd|jfd
|jfg�|_|j	|j_
tjd|jfg�|_|j
|j_
dS(Nuhtmlubodyuframesetubaseubasefontubgsoundulinkumetaunoframesuscriptustyleutitleuheadubr(	ubaseubasefontubgsoundulinkumetaunoframesuscriptustyleutitle(ubodyuhtmlubr(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagBodyustartTagFramesetustartTagFromHeadustartTagHeadustartTagHandleru
startTagOtherudefaultuendTagHtmlBodyBru
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__s		u*getPhases.<locals>.AfterHeadPhase.__init__cSs|j�dS(NT(uanythingElseuTrue(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF*s
u,getPhases.<locals>.AfterHeadPhase.processEOFcSs|j�|S(N(uanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters.s
u3getPhases.<locals>.AfterHeadPhase.processCharacterscSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHtml2su.getPhases.<locals>.AfterHeadPhase.startTagHtmlcSs6d|j_|jj|�|jjd|j_dS(NuinBodyF(uFalseuparseru
framesetOKutreeu
insertElementuphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagBody5su.getPhases.<locals>.AfterHeadPhase.startTagBodycSs*|jj|�|jjd|j_dS(Nu
inFrameset(utreeu
insertElementuparseruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagFrameset:su2getPhases.<locals>.AfterHeadPhase.startTagFramesetcSs�|jjdi|dd6�|jjj|jj�|jjdj|�xG|jjddd�D],}|jdkrh|jjj	|�PqhqhWdS(Nu#unexpected-start-tag-out-of-my-headunameuinHeadiuheadi����(
uparseru
parseErrorutreeuopenElementsuappenduheadPointeruphasesuprocessStartTagunameuremove(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagFromHead>s u2getPhases.<locals>.AfterHeadPhase.startTagFromHeadcSs"|jjdi|dd6�dS(Nuunexpected-start-taguname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHeadHsu.getPhases.<locals>.AfterHeadPhase.startTagHeadcSs|j�|S(N(uanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOtherKs
u/getPhases.<locals>.AfterHeadPhase.startTagOthercSs|j�|S(N(uanythingElse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagHtmlBodyBrOs
u2getPhases.<locals>.AfterHeadPhase.endTagHtmlBodyBrcSs"|jjdi|dd6�dS(Nuunexpected-end-taguname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOtherSsu-getPhases.<locals>.AfterHeadPhase.endTagOthercSs?|jjtdd��|jjd|j_d|j_dS(NubodyuStartTaguinBodyT(utreeu
insertElementuimpliedTagTokenuparseruphasesuphaseuTrueu
framesetOK(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuanythingElseVsu.getPhases.<locals>.AfterHeadPhase.anythingElseN(u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCharactersustartTagHtmlustartTagBodyustartTagFramesetustartTagFromHeadustartTagHeadu
startTagOtheruendTagHtmlBodyBruendTagOtheruanythingElse(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuAfterHeadPhases
uAfterHeadPhasecsr|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dEdF�Z%dGdH�Z&dIdJ�Z'dKdL�Z(dMdN�Z)dOdP�Z*dQdR�Z+dSdT�Z,dUdV�Z-dWdX�Z.dYdZ�Z/d[d\�Z0d]d^�Z1d_d`�Z2dadb�Z3dcdd�Z4deS(fugetPhases.<locals>.InBodyPhasec+s]�j|||�|j|_tjd|jfdd|jfd|jfd
|jfde|j	ft
|jfdf|jfd'|j
fdg|jfd+|jfd,|jfdh|jfd9|jfd:|jfdi|jfd>|jfd?|jfdj|jfdk|jfdI|jfdJ|jfdK|jfdL|jfdM|jfdN|jfdl|jfdQ|j fdm|j!fdn|j"fdV|j#fdW|j$fdo|j%fg �|_&|j'|j&_(tjd|j)fd|j*fdp|j+fd'|j,fd!|j-fdq|j.ft
|j/fdr|j0fds|j1fdA|j2fg
�|_3|j4|j3_(dS(tNuhtmlubaseubasefontubgsounducommandulinkumetaunoframesuscriptustyleutitleubodyuframesetuaddressuarticleuasideu
blockquoteucenterudetailsudirudivudlufieldsetu
figcaptionufigureufooteruheaderuhgroupumainumenuunavuolupusectionusummaryuulupreulistinguformuliuddudtu	plaintextuaububigucodeuemufontuiususmallustrikeustronguttuuunobrubuttonuappletumarqueeuobjectuxmputableuareaubruembeduimgukeygenuwbruparamusourceutrackuinputuhruimageuisindexutextareauiframeunoembedunoscriptuselecturpurtuoptionuoptgroupumathusvgucaptionucolucolgroupuframeuheadutbodyutdutfootuthutheadutrudialog(
ubaseubasefontubgsounducommandulinkumetaunoframesuscriptustyleutitle(uaddressuarticleuasideu
blockquoteucenterudetailsudetailsudirudivudlufieldsetu
figcaptionufigureufooteruheaderuhgroupumainumenuunavuolupusectionusummaryuul(upreulisting(uliuddudt(ububigucodeuemufontuiususmallustrikeustronguttuu(uappletumarqueeuobject(uareaubruembeduimgukeygenuwbr(uparamusourceutrack(unoembedunoframesunoscript(urpurt(uoptionuoptgroup(ucaptionucolucolgroupuframeuheadutbodyutdutfootuthutheadutr(uaddressuarticleuasideu
blockquoteubuttonucenterudetailsudialogudirudivudlufieldsetu
figcaptionufigureufooteruheaderuhgroupulistingumainumenuunavuolupreusectionusummaryuul(uddudtuli(uaububigucodeuemufontuiunobrususmallustrikeustronguttuu(uappletumarqueeuobject(5u__init__uprocessSpaceCharactersuprocessSpaceCharactersNonPreuutilsuMethodDispatcherustartTagHtmlustartTagProcessInHeadustartTagBodyustartTagFramesetustartTagClosePuheadingElementsustartTagHeadingustartTagPreListingustartTagFormustartTagListItemustartTagPlaintextu	startTagAustartTagFormattingustartTagNobrustartTagButtonustartTagAppletMarqueeObjectustartTagXmpu
startTagTableustartTagVoidFormattingustartTagParamSourceu
startTagInputu
startTagHru
startTagImageustartTagIsIndexustartTagTextareaustartTagIFrameustartTagRawtextustartTagSelectustartTagRpRtustartTagOptustartTagMathustartTagSvgustartTagMisplacedustartTagHandleru
startTagOtherudefaultu
endTagBodyu
endTagHtmluendTagBlocku
endTagFormuendTagPuendTagListItemu
endTagHeadinguendTagFormattinguendTagAppletMarqueeObjectuendTagBru
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__^s|			u'getPhases.<locals>.InBodyPhase.__init__cSs�|j|jks$|j|jkr(dSt|j�t|j�krJdSt|jj��}t|jj��}x-t||�D]\}}||kr�dSq�WdS(NFT(	unameu	namespaceuFalseulenu
attributesusorteduitemsuzipuTrue(uselfunode1unode2uattributes1uattributes2uattr1uattr2((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuisMatchingFormattingElement�s$u:getPhases.<locals>.InBodyPhase.isMatchingFormattingElementcSs�|jj|�|jjd}g}xS|jjddd�D]8}|tkrVPq@|j||�r@|j|�q@q@Wt|�dks�t�t|�dkr�|jjj	|d�n|jjj|�dS(Niii����i����i����(
utreeu
insertElementuopenElementsuactiveFormattingElementsuMarkeruisMatchingFormattingElementuappendulenuAssertionErroruremove(uselfutokenuelementumatchingElementsunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuaddFormattingElement�s u3getPhases.<locals>.InBodyPhase.addFormattingElementc
SsWtd�}xD|jjddd�D])}|j|kr&|jjd�Pq&q&WdS(Nuddudtuliuputbodyutdutfootuthutheadutrubodyuhtmliu expected-closing-tag-but-got-eof(uddudtuliuputbodyutdutfootuthutheadutrubodyuhtmli����(u	frozensetutreeuopenElementsunameuparseru
parseError(uselfuallowed_elementsunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�s	 u)getPhases.<locals>.InBodyPhase.processEOFcSs�|d}|j|_|jd�rh|jjdjdkrh|jjd	j�rh|dd�}n|r�|jj�|jj|�ndS(
Nudatau
iupreulistingutextareai����(upreulistingutextareai����(	uprocessSpaceCharactersNonPreuprocessSpaceCharactersu
startswithutreeuopenElementsunameu
hasContentu#reconstructActiveFormattingElementsu
insertText(uselfutokenudata((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu!processSpaceCharactersDropNewline�s

u@getPhases.<locals>.InBodyPhase.processSpaceCharactersDropNewlinecSsq|ddkrdS|jj�|jj|d�|jjrmtdd�|dD��rmd|j_ndS(NudataucSsg|]}|tk�qS((uspaceCharacters(u.0uchar((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
<listcomp>�s	uDgetPhases.<locals>.InBodyPhase.processCharacters.<locals>.<listcomp>F(utreeu#reconstructActiveFormattingElementsu
insertTextuparseru
framesetOKuanyuFalse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�s
u0getPhases.<locals>.InBodyPhase.processCharacterscSs%|jj�|jj|d�dS(Nudata(utreeu#reconstructActiveFormattingElementsu
insertText(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacters�s
u5getPhases.<locals>.InBodyPhase.processSpaceCharacterscSs|jjdj|�S(NuinHead(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagProcessInHead�su4getPhases.<locals>.InBodyPhase.startTagProcessInHeadcSs�|jjdidd6�t|jj�dksK|jjdjdkr`|jjs�t�n`d|j_	xQ|dj
�D]?\}}||jjdjkr}||jjdj|<q}q}WdS(Nuunexpected-start-tagubodyunameiudataF(uparseru
parseErrorulenutreeuopenElementsunameu	innerHTMLuAssertionErroruFalseu
framesetOKuitemsu
attributes(uselfutokenuattruvalue((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagBody�su+getPhases.<locals>.InBodyPhase.startTagBodycSs|jjdidd6�t|jj�dksK|jjdjdkr`|jjs�t�n�|jjson�|jjdj	r�|jjdj	j
|jjd�nx-|jjdjdkr�|jjj�q�W|jj|�|jj
d|j_dS(	Nuunexpected-start-taguframesetunameiubodyuhtmlu
inFrameseti����(uparseru
parseErrorulenutreeuopenElementsunameu	innerHTMLuAssertionErroru
framesetOKuparenturemoveChildupopu
insertElementuphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagFrameset�s1'u/getPhases.<locals>.InBodyPhase.startTagFramesetcSsB|jjddd�r.|jtd��n|jj|�dS(Nupuvariantubutton(utreeuelementInScopeuendTagPuimpliedTagTokenu
insertElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagClosePsu-getPhases.<locals>.InBodyPhase.startTagClosePcSsZ|jjddd�r.|jtd��n|jj|�d|j_|j|_	dS(NupuvariantubuttonF(
utreeuelementInScopeuendTagPuimpliedTagTokenu
insertElementuFalseuparseru
framesetOKu!processSpaceCharactersDropNewlineuprocessSpaceCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagPreListings
u1getPhases.<locals>.InBodyPhase.startTagPreListingcSs�|jjr)|jjdidd6�nT|jjddd�rW|jtd��n|jj|�|jjd|j_dS(	Nuunexpected-start-taguformunameupuvariantubuttonii����(	utreeuformPointeruparseru
parseErroruelementInScopeuendTagPuimpliedTagTokenu
insertElementuopenElements(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagFormsu+getPhases.<locals>.InBodyPhase.startTagFormcSsd|j_idgd6ddgd6ddgd6}||d}xnt|jj�D]Z}|j|kr�|jjjt	|jd��Pn|j
tkrW|jdkrWPqWqWW|jjdd	d
�r�|jjjt	dd��n|jj
|�dS(
NuliudtuddunameuEndTaguaddressudivupuvariantubuttonF(uaddressudivup(uFalseuparseru
framesetOKureversedutreeuopenElementsunameuphaseu
processEndTaguimpliedTagTokenu	nameTupleuspecialElementsuelementInScopeu
insertElement(uselfutokenustopNamesMapu	stopNamesunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagListItems"

u/getPhases.<locals>.InBodyPhase.startTagListItemcSsZ|jjddd�r.|jtd��n|jj|�|jjj|jj_dS(Nupuvariantubutton(	utreeuelementInScopeuendTagPuimpliedTagTokenu
insertElementuparseru	tokenizeruplaintextStateustate(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagPlaintext1su0getPhases.<locals>.InBodyPhase.startTagPlaintextcSs�|jjddd�r.|jtd��n|jjdjtkrx|jjdi|dd6�|jjj	�n|jj
|�dS(Nupuvariantubuttoniuunexpected-start-tagunamei����(utreeuelementInScopeuendTagPuimpliedTagTokenuopenElementsunameuheadingElementsuparseru
parseErrorupopu
insertElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHeading7su.getPhases.<locals>.InBodyPhase.startTagHeadingcSs�|jjd�}|r�|jjdidd6dd6�|jtd��||jjkrt|jjj|�n||jjkr�|jjj|�q�n|jj	�|j
|�dS(Nuau$unexpected-start-tag-implies-end-tagu	startNameuendName(utreeu!elementInActiveFormattingElementsuparseru
parseErroruendTagFormattinguimpliedTagTokenuopenElementsuremoveuactiveFormattingElementsu#reconstructActiveFormattingElementsuaddFormattingElement(uselfutokenuafeAElement((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu	startTagA?s
u(getPhases.<locals>.InBodyPhase.startTagAcSs|jj�|j|�dS(N(utreeu#reconstructActiveFormattingElementsuaddFormattingElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagFormattingLs
u1getPhases.<locals>.InBodyPhase.startTagFormattingcSst|jj�|jjd�rc|jjdidd6dd6�|jtd��|jj�n|j|�dS(Nunobru$unexpected-start-tag-implies-end-tagu	startNameuendName(utreeu#reconstructActiveFormattingElementsuelementInScopeuparseru
parseErroru
processEndTaguimpliedTagTokenuaddFormattingElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagNobrPs
u+getPhases.<locals>.InBodyPhase.startTagNobrcSsw|jjd�rJ|jjdidd6dd6�|jtd��|S|jj�|jj|�d|j_	dS(Nubuttonu$unexpected-start-tag-implies-end-tagu	startNameuendNameF(
utreeuelementInScopeuparseru
parseErroru
processEndTaguimpliedTagTokenu#reconstructActiveFormattingElementsu
insertElementuFalseu
framesetOK(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagButtonZs
u-getPhases.<locals>.InBodyPhase.startTagButtoncSs@|jj�|jj|�|jjjt�d|j_dS(NF(	utreeu#reconstructActiveFormattingElementsu
insertElementuactiveFormattingElementsuappenduMarkeruFalseuparseru
framesetOK(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagAppletMarqueeObjectes
u:getPhases.<locals>.InBodyPhase.startTagAppletMarqueeObjectcSs^|jjddd�r.|jtd��n|jj�d|j_|jj|d�dS(NupuvariantubuttonuRAWTEXTF(	utreeuelementInScopeuendTagPuimpliedTagTokenu#reconstructActiveFormattingElementsuFalseuparseru
framesetOKuparseRCDataRawtext(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagXmpks

u*getPhases.<locals>.InBodyPhase.startTagXmpcSsy|jjdkrC|jjddd�rC|jtd��qCn|jj|�d|j_|jj	d|j_
dS(NuquirksupuvariantubuttonuinTableF(uparseru
compatModeutreeuelementInScopeu
processEndTaguimpliedTagTokenu
insertElementuFalseu
framesetOKuphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagTablersu,getPhases.<locals>.InBodyPhase.startTagTablecSsG|jj�|jj|�|jjj�d|d<d|j_dS(NuselfClosingAcknowledgedTF(	utreeu#reconstructActiveFormattingElementsu
insertElementuopenElementsupopuTrueuFalseuparseru
framesetOK(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagVoidFormattingzs


u5getPhases.<locals>.InBodyPhase.startTagVoidFormattingcSsY|jj}|j|�d|dkrU|ddjt�dkrU||j_ndS(Nutypeudatauhidden(uparseru
framesetOKustartTagVoidFormattingu	translateuasciiUpper2Lower(uselfutokenu
framesetOK((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagInput�s

u,getPhases.<locals>.InBodyPhase.startTagInputcSs.|jj|�|jjj�d|d<dS(NuselfClosingAcknowledgedT(utreeu
insertElementuopenElementsupopuTrue(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagParamSource�su2getPhases.<locals>.InBodyPhase.startTagParamSourcecSsh|jjddd�r.|jtd��n|jj|�|jjj�d|d<d|j	_
dS(NupuvariantubuttonuselfClosingAcknowledgedTF(utreeuelementInScopeuendTagPuimpliedTagTokenu
insertElementuopenElementsupopuTrueuFalseuparseru
framesetOK(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagHr�s
u)getPhases.<locals>.InBodyPhase.startTagHrc	SsO|jjdidd6dd6�|jtddd|dd	|d	��dS(
Nuunexpected-start-tag-treated-asuimageuoriginalNameuimgunewNameuStartTagu
attributesudatauselfClosing(uparseru
parseErroruprocessStartTaguimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagImage�s

u,getPhases.<locals>.InBodyPhase.startTagImagec	Ss�|jjdidd6�|jjr*dSi}d|dkrU|dd|d<n|jtddd|��|jtd	d��|jtd
d��d|dkr�|dd}nd}|jitd
d6|d6�|dj�}d|kr	|d=nd|kr|d=nd|d<|jtddd|d|d��|j	td
��|jtd	d��|j	td��dS(Nudeprecated-taguisindexunameuactionudatauformuStartTagu
attributesuhrulabelupromptu3This is a searchable index. Enter search keywords: u
CharactersutypeuinputuselfClosing(
uparseru
parseErrorutreeuformPointeruprocessStartTaguimpliedTagTokenuprocessCharactersu
tokenTypesucopyu
processEndTag(uselfutokenu
form_attrsupromptu
attributes((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagIsIndex�s6



u.getPhases.<locals>.InBodyPhase.startTagIsIndexcSsD|jj|�|jjj|jj_|j|_d|j_	dS(NF(
utreeu
insertElementuparseru	tokenizerurcdataStateustateu!processSpaceCharactersDropNewlineuprocessSpaceCharactersuFalseu
framesetOK(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagTextarea�su/getPhases.<locals>.InBodyPhase.startTagTextareacSsd|j_|j|�dS(NF(uFalseuparseru
framesetOKustartTagRawtext(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagIFrame�su-getPhases.<locals>.InBodyPhase.startTagIFramecSs|jj|d�dS(u8iframe, noembed noframes, noscript(if scripting enabled)uRAWTEXTN(uparseruparseRCDataRawtext(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagRawtext�su.getPhases.<locals>.InBodyPhase.startTagRawtextcSsY|jjdjdkr5|jjjtd��n|jj�|jjj|�dS(Niuoptioni����(	utreeuopenElementsunameuparseruphaseu
processEndTaguimpliedTagTokenu#reconstructActiveFormattingElementsu
insertElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagOpt�s
u*getPhases.<locals>.InBodyPhase.startTagOptcSs�|jj�|jj|�d	|j_|jj|jjd|jjd|jjd|jjd|jjd|jjdfkr�|jjd|j_n|jjd|j_dS(
NuinTableu	inCaptionu
inColumnGroupuinTableBodyuinRowuinCelluinSelectInTableuinSelectF(utreeu#reconstructActiveFormattingElementsu
insertElementuFalseuparseru
framesetOKuphaseuphases(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagSelect�s




u-getPhases.<locals>.InBodyPhase.startTagSelectcSs_|jjd�rK|jj�|jjdjdkrK|jj�qKn|jj|�dS(Nurubyii����(utreeuelementInScopeugenerateImpliedEndTagsuopenElementsunameuparseru
parseErroru
insertElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagRpRt�s

u+getPhases.<locals>.InBodyPhase.startTagRpRtcSsv|jj�|jj|�|jj|�td|d<|jj|�|drr|jjj�d|d<ndS(Numathmlu	namespaceuselfClosinguselfClosingAcknowledgedT(
utreeu#reconstructActiveFormattingElementsuparseruadjustMathMLAttributesuadjustForeignAttributesu
namespacesu
insertElementuopenElementsupopuTrue(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagMath�s

u+getPhases.<locals>.InBodyPhase.startTagMathcSsv|jj�|jj|�|jj|�td|d<|jj|�|drr|jjj�d|d<ndS(Nusvgu	namespaceuselfClosinguselfClosingAcknowledgedT(
utreeu#reconstructActiveFormattingElementsuparseruadjustSVGAttributesuadjustForeignAttributesu
namespacesu
insertElementuopenElementsupopuTrue(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagSvg�s

u*getPhases.<locals>.InBodyPhase.startTagSvgcSs"|jjdi|dd6�dS(u5 Elements that should be children of other elements that have a
            different insertion mode; here they are ignored
            "caption", "col", "colgroup", "frame", "frameset", "head",
            "option", "optgroup", "tbody", "td", "tfoot", "th", "thead",
            "tr", "noscript"
            uunexpected-start-tag-ignoredunameN(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagMisplaced�su0getPhases.<locals>.InBodyPhase.startTagMisplacedcSs!|jj�|jj|�dS(N(utreeu#reconstructActiveFormattingElementsu
insertElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOthers
u,getPhases.<locals>.InBodyPhase.startTagOthercSs�|jjddd�sa|jtdd��|jjdidd6�|jtdd��n�|jjd�|jjd	j	dkr�|jjdidd6�n|jjj
�}x%|j	dkr�|jjj
�}q�WdS(
NupuvariantubuttonuStartTaguunexpected-end-tagunameuEndTagii����(utreeuelementInScopeustartTagClosePuimpliedTagTokenuparseru
parseErroruendTagPugenerateImpliedEndTagsuopenElementsunameupop(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagPsu&getPhases.<locals>.InBodyPhase.endTagPcSs�|jjd�s#|jj�dS|jjdjdkr�x^|jjdd�D]C}|jtd�krS|jjdidd6|jd6�PqSqSWn|jjd|j_dS(Nubodyiiuddudtuliuoptgroupuoptionupurpurtutbodyutdutfootuthutheadutruhtmlu$expected-one-end-tag-but-got-anotheruexpectedNameugotNameu	afterBodyi����(uddudtuliuoptgroupuoptionupurpurtutbodyutdutfootuthutheadutrubodyuhtml(	utreeuelementInScopeuparseru
parseErroruopenElementsunameu	frozensetuphasesuphase(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
endTagBodys
		u)getPhases.<locals>.InBodyPhase.endTagBodycSs-|jjd�r)|jtd��|SdS(Nubody(utreeuelementInScopeu
endTagBodyuimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
endTagHtml+su)getPhases.<locals>.InBodyPhase.endTagHtmlcSs�|ddkr|j|_n|jj|d�}|rK|jj�n|jjdj|dkr�|jjdi|dd6�n|r�|jjj	�}x,|j|dkr�|jjj	�}q�WndS(Nunameupreiuend-tag-too-earlyi����(
uprocessSpaceCharactersNonPreuprocessSpaceCharactersutreeuelementInScopeugenerateImpliedEndTagsuopenElementsunameuparseru
parseErrorupop(uselfutokenuinScopeunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagBlock1s!u*getPhases.<locals>.InBodyPhase.endTagBlockcSs�|jj}d|j_|dks7|jj|�rT|jjdidd6�nS|jj�|jjd|kr�|jjdidd6�n|jjj|�dS(Nuunexpected-end-taguformunameiuend-tag-too-early-ignoredi����(	utreeuformPointeruNoneuelementInScopeuparseru
parseErrorugenerateImpliedEndTagsuopenElementsuremove(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
endTagForm?s
u)getPhases.<locals>.InBodyPhase.endTagFormcSs�|ddkrd}nd}|jj|dd|�s\|jjdi|dd6�n�|jjd|d�|jjd	j|dkr�|jjdi|dd6�n|jjj�}x)|j|dkr�|jjj�}q�WdS(
Nunameuliulistuvariantuunexpected-end-taguexcludeiuend-tag-too-earlyi����(	uNoneutreeuelementInScopeuparseru
parseErrorugenerateImpliedEndTagsuopenElementsunameupop(uselfutokenuvariantunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagListItemLs	!	u-getPhases.<locals>.InBodyPhase.endTagListItemcSs�x1tD])}|jj|�r|jj�PqqW|jjdj|dkrr|jjdi|dd6�nx^tD]V}|jj|�ry|jjj�}x%|jtkr�|jjj�}q�WPqyqyWdS(Niunameuend-tag-too-earlyi����(	uheadingElementsutreeuelementInScopeugenerateImpliedEndTagsuopenElementsunameuparseru
parseErrorupop(uselfutokenuitem((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
endTagHeading]s

!
u,getPhases.<locals>.InBodyPhase.endTagHeadingc	Ss9d}x,|dkr4|d7}|jj|d�}|sd||jjkru|jj|j�ru|j|�dS||jjkr�|jjdi|dd6�|jjj	|�dS|jj|j�s�|jjdi|dd6�dS||jjdkr*|jjdi|dd6�n|jjj
|�}d}x7|jj|d�D]}|jt
kr\|}Pq\q\W|dkr�|jjj�}x"||kr�|jjj�}q�W|jjj	|�dS|jj|d}|jjj
|�}|}	}
d}|jjj
|
�}x|d	kr?|d7}|d8}|jj|}
|
|jjkr�|jjj	|
�q*n|
|kr�Pn|	|kr�|jjj
|
�d}n|
j�}
|
|jj|jjj
|
�<|
|jj|jjj
|
�<|
}
|	jr)|	jj|	�n|
j|	�|
}	q*W|	jr\|	jj|	�n|jtd�kr�|jj�\}}|j|	|�n
|j|	�|j�}
|j|
�|j|
�|jjj	|�|jjj||
�|jjj	|�|jjj|jjj
|�d|
�q	WdS(u)The much-feared adoption agency algorithmiiiunameNuadoption-agency-1.2uadoption-agency-4.4uadoption-agency-1.3iutableutbodyutfootutheadutri����(utableutbodyutfootutheadutr(utreeu!elementInActiveFormattingElementsuopenElementsuelementInScopeunameuendTagOtheruparseru
parseErroruactiveFormattingElementsuremoveuindexuNoneu	nameTupleuspecialElementsupopu	cloneNodeuparenturemoveChilduappendChildu	frozensetugetTableMisnestedNodePositionuinsertBeforeureparentChildrenuinsert(uselfutokenuouterLoopCounteruformattingElementuafeIndexu
furthestBlockuelementucommonAncestorubookmarkulastNodeunodeuinnerLoopCounteruindexucloneuparentuinsertBefore((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagFormattingls�

	

!



	

	


u/getPhases.<locals>.InBodyPhase.endTagFormattingcSs�|jj|d�r&|jj�n|jjdj|dkrd|jjdi|dd6�n|jj|d�r�|jjj�}x)|j|dkr�|jjj�}q�W|jj�ndS(Nunameiuend-tag-too-earlyi����(	utreeuelementInScopeugenerateImpliedEndTagsuopenElementsunameuparseru
parseErrorupopuclearActiveFormattingElements(uselfutokenuelement((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagAppletMarqueeObjects!u8getPhases.<locals>.InBodyPhase.endTagAppletMarqueeObjectcSs[|jjdidd6dd6�|jj�|jjtdd��|jjj�dS(Nuunexpected-end-tag-treated-asubruoriginalNameu
br elementunewNameuStartTag(uparseru
parseErrorutreeu#reconstructActiveFormattingElementsu
insertElementuimpliedTagTokenuopenElementsupop(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagBrs

u'getPhases.<locals>.InBodyPhase.endTagBrcSs�x�|jjddd�D]�}|j|dkr�|jjd|d�|jjdj|dkr�|jjdi|dd6�nx|jjj�|kr�q�WPq|jtkr|jjdi|dd6�PqqWdS(Niunameuexcludeuunexpected-end-tagi����i����(	utreeuopenElementsunameugenerateImpliedEndTagsuparseru
parseErrorupopu	nameTupleuspecialElements(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther"s !u*getPhases.<locals>.InBodyPhase.endTagOtherN(5u__name__u
__module__u__qualname__u__init__uisMatchingFormattingElementuaddFormattingElementu
processEOFu!processSpaceCharactersDropNewlineuprocessCharactersuprocessSpaceCharactersustartTagProcessInHeadustartTagBodyustartTagFramesetustartTagClosePustartTagPreListingustartTagFormustartTagListItemustartTagPlaintextustartTagHeadingu	startTagAustartTagFormattingustartTagNobrustartTagButtonustartTagAppletMarqueeObjectustartTagXmpu
startTagTableustartTagVoidFormattingu
startTagInputustartTagParamSourceu
startTagHru
startTagImageustartTagIsIndexustartTagTextareaustartTagIFrameustartTagRawtextustartTagOptustartTagSelectustartTagRpRtustartTagMathustartTagSvgustartTagMisplacedu
startTagOtheruendTagPu
endTagBodyu
endTagHtmluendTagBlocku
endTagFormuendTagListItemu
endTagHeadinguendTagFormattinguendTagAppletMarqueeObjectuendTagBruendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInBodyPhase[sdF

	

 	

�uInBodyPhasecsb|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S(ugetPhases.<locals>.TextPhasecse�j|||�tjg�|_|j|j_tjd|jfg�|_|j|j_dS(Nuscript(	u__init__uutilsuMethodDispatcherustartTagHandleru
startTagOtherudefaultuendTagScriptu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__1su%getPhases.<locals>.TextPhase.__init__cSs|jj|d�dS(Nudata(utreeu
insertText(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters9su.getPhases.<locals>.TextPhase.processCharacterscSsM|jjdi|jjdjd6�|jjj�|jj|j_dS(Nu&expected-named-closing-tag-but-got-eofiunamei����T(	uparseru
parseErrorutreeuopenElementsunameupopu
originalPhaseuphaseuTrue(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF<s
u'getPhases.<locals>.TextPhase.processEOFcSsdstd|d��dS(Nu4Tried to process start tag %s in RCDATA/RAWTEXT modeunameF(uFalseuAssertionError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOtherCsu*getPhases.<locals>.TextPhase.startTagOthercSs=|jjj�}|jdks't�|jj|j_dS(Nuscript(utreeuopenElementsupopunameuAssertionErroruparseru
originalPhaseuphase(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagScriptFsu)getPhases.<locals>.TextPhase.endTagScriptcSs&|jjj�|jj|j_dS(N(utreeuopenElementsupopuparseru
originalPhaseuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOtherMsu(getPhases.<locals>.TextPhase.endTagOtherN(	u__name__u
__module__u__qualname__u__init__uprocessCharactersu
processEOFu
startTagOtheruendTagScriptuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu	TextPhase0su	TextPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'S((ugetPhases.<locals>.InTablePhasec
s��j|||�tjd|jfd|jfd|jfd|jfd|jfd|jfd|j	fd|j
fd|jfd|jfg
�|_
|j|j
_tjd|jfd|jfg�|_|j|j_dS(Nuhtmlucaptionucolgroupucolutbodyutfootutheadutduthutrutableustyleuscriptuinputuformubody(utbodyutfootuthead(utduthutr(ustyleuscript(ubodyucaptionucolucolgroupuhtmlutbodyutdutfootuthutheadutr(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagCaptionustartTagColgroupustartTagColustartTagRowGroupustartTagImplyTbodyu
startTagTableustartTagStyleScriptu
startTagInputustartTagFormustartTagHandleru
startTagOtherudefaultuendTagTableuendTagIgnoreu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__Ss$u(getPhases.<locals>.InTablePhase.__init__cSs4x-|jjdjdkr/|jjj�qWdS(Niutableuhtmli����(utableuhtml(utreeuopenElementsunameupop(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuclearStackToTableContextksu8getPhases.<locals>.InTablePhase.clearStackToTableContextcSsB|jjdjdkr,|jjd�n|jjs>t�dS(Niuhtmlueof-in-tablei����(utreeuopenElementsunameuparseru
parseErroru	innerHTMLuAssertionError(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOFtsu*getPhases.<locals>.InTablePhase.processEOFcSsH|jj}|jjd|j_||jj_|jjj|�dS(NuinTableText(uparseruphaseuphasesu
originalPhaseuprocessSpaceCharacters(uselfutokenu
originalPhase((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacters{su6getPhases.<locals>.InTablePhase.processSpaceCharacterscSsH|jj}|jjd|j_||jj_|jjj|�dS(NuinTableText(uparseruphaseuphasesu
originalPhaseuprocessCharacters(uselfutokenu
originalPhase((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�su1getPhases.<locals>.InTablePhase.processCharacterscSs3d|j_|jjdj|�d|j_dS(NuinBodyTF(uTrueutreeuinsertFromTableuparseruphasesuprocessCharactersuFalse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
insertText�su*getPhases.<locals>.InTablePhase.insertTextcSsG|j�|jjjt�|jj|�|jjd|j_dS(Nu	inCaption(	uclearStackToTableContextutreeuactiveFormattingElementsuappenduMarkeru
insertElementuparseruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagCaption�s
u/getPhases.<locals>.InTablePhase.startTagCaptioncSs4|j�|jj|�|jjd|j_dS(Nu
inColumnGroup(uclearStackToTableContextutreeu
insertElementuparseruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagColgroup�s
u0getPhases.<locals>.InTablePhase.startTagColgroupcSs|jtdd��|S(NucolgroupuStartTag(ustartTagColgroupuimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagCol�su+getPhases.<locals>.InTablePhase.startTagColcSs4|j�|jj|�|jjd|j_dS(NuinTableBody(uclearStackToTableContextutreeu
insertElementuparseruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagRowGroup�s
u0getPhases.<locals>.InTablePhase.startTagRowGroupcSs|jtdd��|S(NutbodyuStartTag(ustartTagRowGroupuimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagImplyTbody�su2getPhases.<locals>.InTablePhase.startTagImplyTbodycSsN|jjdidd6dd6�|jjjtd��|jjsJ|SdS(Nu$unexpected-start-tag-implies-end-tagutableu	startNameuendName(uparseru
parseErroruphaseu
processEndTaguimpliedTagTokenu	innerHTML(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagTable�s
u-getPhases.<locals>.InTablePhase.startTagTablecSs|jjdj|�S(NuinHead(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagStyleScript�su3getPhases.<locals>.InTablePhase.startTagStyleScriptcSsqd|dkr`|ddjt�dkr`|jjd�|jj|�|jjj�n
|j|�dS(Nutypeudatauhiddenu unexpected-hidden-input-in-table(	u	translateuasciiUpper2Loweruparseru
parseErrorutreeu
insertElementuopenElementsupopu
startTagOther(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagInput�su-getPhases.<locals>.InTablePhase.startTagInputcSs_|jjd�|jjdkr[|jj|�|jjd|j_|jjj�ndS(Nuunexpected-form-in-tableii����(uparseru
parseErrorutreeuformPointeruNoneu
insertElementuopenElementsupop(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagForm�s
u,getPhases.<locals>.InTablePhase.startTagFormcSsQ|jjdi|dd6�d|j_|jjdj|�d|j_dS(Nu)unexpected-start-tag-implies-table-voodoounameuinBodyTF(uparseru
parseErroruTrueutreeuinsertFromTableuphasesuprocessStartTaguFalse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther�su-getPhases.<locals>.InTablePhase.startTagOthercSs�|jjddd�r�|jj�|jjdjdkro|jjdidd6|jjdjd6�nx-|jjd	jdkr�|jjj�qrW|jjj�|jj�n|jj	s�t
�|jj�dS(
Nutableuvariantiuend-tag-too-early-namedugotNameuexpectedNamei����i����i����(utreeuelementInScopeugenerateImpliedEndTagsuopenElementsunameuparseru
parseErrorupopuresetInsertionModeu	innerHTMLuAssertionError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTable�s

u+getPhases.<locals>.InTablePhase.endTagTablecSs"|jjdi|dd6�dS(Nuunexpected-end-taguname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagIgnore�su,getPhases.<locals>.InTablePhase.endTagIgnorecSsQ|jjdi|dd6�d|j_|jjdj|�d|j_dS(Nu'unexpected-end-tag-implies-table-voodoounameuinBodyTF(uparseru
parseErroruTrueutreeuinsertFromTableuphasesu
processEndTaguFalse(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther�su+getPhases.<locals>.InTablePhase.endTagOtherN(u__name__u
__module__u__qualname__u__init__uclearStackToTableContextu
processEOFuprocessSpaceCharactersuprocessCharactersu
insertTextustartTagCaptionustartTagColgroupustartTagColustartTagRowGroupustartTagImplyTbodyu
startTagTableustartTagStyleScriptu
startTagInputustartTagFormu
startTagOtheruendTagTableuendTagIgnoreuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInTablePhaseQs&	
uInTablePhasecsz|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS(u#getPhases.<locals>.InTableTextPhasecs)�j|||�d|_g|_dS(N(u__init__uNoneu
originalPhaseucharacterTokens(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�s	u,getPhases.<locals>.InTableTextPhase.__init__cSs�djdd�|jD��}tdd�|D��rjitdd6|d6}|jjdj|�n|r�|jj|�ng|_dS(	NucSsg|]}|d�qS(udata((u.0uitem((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
<listcomp>�s	uGgetPhases.<locals>.InTableTextPhase.flushCharacters.<locals>.<listcomp>cSsg|]}|tk�qS((uspaceCharacters(u.0uitem((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
<listcomp>�s	u
CharactersutypeudatauinTable(ujoinucharacterTokensuanyu
tokenTypesuparseruphasesu
insertTextutree(uselfudatautoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuflushCharacters�su3getPhases.<locals>.InTableTextPhase.flushCharacterscSs|j�|j|j_|S(N(uflushCharactersu
originalPhaseuparseruphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessComment�s
u2getPhases.<locals>.InTableTextPhase.processCommentcSs|j�|j|j_dS(NT(uflushCharactersu
originalPhaseuparseruphaseuTrue(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�s
u.getPhases.<locals>.InTableTextPhase.processEOFcSs(|ddkrdS|jj|�dS(Nudatau(ucharacterTokensuappend(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�su5getPhases.<locals>.InTableTextPhase.processCharacterscSs|jj|�dS(N(ucharacterTokensuappend(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacterssu:getPhases.<locals>.InTableTextPhase.processSpaceCharacterscSs|j�|j|j_|S(N(uflushCharactersu
originalPhaseuparseruphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessStartTags
u3getPhases.<locals>.InTableTextPhase.processStartTagcSs|j�|j|j_|S(N(uflushCharactersu
originalPhaseuparseruphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEndTag
s
u1getPhases.<locals>.InTableTextPhase.processEndTagN(u__name__u
__module__u__qualname__u__init__uflushCharactersuprocessCommentu
processEOFuprocessCharactersuprocessSpaceCharactersuprocessStartTagu
processEndTag(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInTableTextPhase�s	uInTableTextPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�ZdS(u!getPhases.<locals>.InCaptionPhasec
s��j|||�tjd|jfd
|jfg�|_|j|j_tjd|jfd|j	fd|j
fg�|_|j|j_dS(Nuhtmlucaptionucolucolgrouputbodyutdutfootuthutheadutrutableubody(	ucaptionucolucolgrouputbodyutdutfootuthutheadutr(
ubodyucolucolgroupuhtmlutbodyutdutfootuthutheadutr(
u__init__uutilsuMethodDispatcherustartTagHtmlustartTagTableElementustartTagHandleru
startTagOtherudefaultu
endTagCaptionuendTagTableuendTagIgnoreu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__su*getPhases.<locals>.InCaptionPhase.__init__cSs|jjddd�S(Nucaptionuvariantutable(utreeuelementInScope(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuignoreEndTagCaption#su5getPhases.<locals>.InCaptionPhase.ignoreEndTagCaptioncSs|jjdj�dS(NuinBody(uparseruphasesu
processEOF(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF&su,getPhases.<locals>.InCaptionPhase.processEOFcSs|jjdj|�S(NuinBody(uparseruphasesuprocessCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters)su3getPhases.<locals>.InCaptionPhase.processCharacterscSs@|jj�|j�}|jjjtd��|s<|SdS(Nucaption(uparseru
parseErroruignoreEndTagCaptionuphaseu
processEndTaguimpliedTagToken(uselfutokenuignoreEndTag((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagTableElement,s

u6getPhases.<locals>.InCaptionPhase.startTagTableElementcSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther4su/getPhases.<locals>.InCaptionPhase.startTagOthercSs�|j�s�|jj�|jjdjdkrc|jjdidd6|jjdjd6�nx-|jjd	jdkr�|jjj�qfW|jjj�|jj�|jj	d|j_
n|jjs�t�|jj�dS(
Niucaptionu$expected-one-end-tag-but-got-anotherugotNameuexpectedNameuinTablei����i����i����(
uignoreEndTagCaptionutreeugenerateImpliedEndTagsuopenElementsunameuparseru
parseErrorupopuclearActiveFormattingElementsuphasesuphaseu	innerHTMLuAssertionError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
endTagCaption7s


u/getPhases.<locals>.InCaptionPhase.endTagCaptioncSs@|jj�|j�}|jjjtd��|s<|SdS(Nucaption(uparseru
parseErroruignoreEndTagCaptionuphaseu
processEndTaguimpliedTagToken(uselfutokenuignoreEndTag((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTableIs

u-getPhases.<locals>.InCaptionPhase.endTagTablecSs"|jjdi|dd6�dS(Nuunexpected-end-taguname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagIgnorePsu.getPhases.<locals>.InCaptionPhase.endTagIgnorecSs|jjdj|�S(NuinBody(uparseruphasesu
processEndTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOtherSsu-getPhases.<locals>.InCaptionPhase.endTagOtherN(
u__name__u
__module__u__qualname__u__init__uignoreEndTagCaptionu
processEOFuprocessCharactersustartTagTableElementu
startTagOtheru
endTagCaptionuendTagTableuendTagIgnoreuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInCaptionPhasesuInCaptionPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS(u%getPhases.<locals>.InColumnGroupPhasecs��j|||�tjd|jfd|jfg�|_|j|j_tjd|jfd|j	fg�|_
|j|j
_dS(Nuhtmlucolucolgroup(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagColustartTagHandleru
startTagOtherudefaultuendTagColgroupu	endTagColu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__Ysu.getPhases.<locals>.InColumnGroupPhase.__init__cSs|jjdjdkS(Niuhtmli����(utreeuopenElementsuname(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuignoreEndTagColgrouphsu:getPhases.<locals>.InColumnGroupPhase.ignoreEndTagColgroupcSs\|jjdjdkr/|jjs+t�dS|j�}|jtd��|sXdSdS(Niuhtmlucolgroupi����T(
utreeuopenElementsunameuparseru	innerHTMLuAssertionErroruignoreEndTagColgroupuendTagColgroupuimpliedTagTokenuTrue(uselfuignoreEndTag((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOFksu0getPhases.<locals>.InColumnGroupPhase.processEOFcSs-|j�}|jtd��|s)|SdS(Nucolgroup(uignoreEndTagColgroupuendTagColgroupuimpliedTagToken(uselfutokenuignoreEndTag((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharactersusu7getPhases.<locals>.InColumnGroupPhase.processCharacterscSs$|jj|�|jjj�dS(N(utreeu
insertElementuopenElementsupop(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagCol{su1getPhases.<locals>.InColumnGroupPhase.startTagColcSs-|j�}|jtd��|s)|SdS(Nucolgroup(uignoreEndTagColgroupuendTagColgroupuimpliedTagToken(uselfutokenuignoreEndTag((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOthersu3getPhases.<locals>.InColumnGroupPhase.startTagOthercSsX|j�r.|jjst�|jj�n&|jjj�|jjd|j_	dS(NuinTable(
uignoreEndTagColgroupuparseru	innerHTMLuAssertionErroru
parseErrorutreeuopenElementsupopuphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagColgroup�s
u4getPhases.<locals>.InColumnGroupPhase.endTagColgroupcSs|jjdidd6�dS(Nu
no-end-tagucoluname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu	endTagCol�su/getPhases.<locals>.InColumnGroupPhase.endTagColcSs-|j�}|jtd��|s)|SdS(Nucolgroup(uignoreEndTagColgroupuendTagColgroupuimpliedTagToken(uselfutokenuignoreEndTag((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther�su1getPhases.<locals>.InColumnGroupPhase.endTagOtherN(u__name__u
__module__u__qualname__u__init__uignoreEndTagColgroupu
processEOFuprocessCharactersustartTagColu
startTagOtheruendTagColgroupu	endTagColuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInColumnGroupPhaseVs
	uInColumnGroupPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS(u#getPhases.<locals>.InTableBodyPhasecs��j|||�tjd|jfd|jfd
|jfd|jfg�|_|j|j_	tjd|j
fd|jfd|jfg�|_
|j|j
_	dS(Nuhtmlutrutduthucaptionucolucolgrouputbodyutfootutheadutableubody(utduth(ucaptionucolucolgrouputbodyutfootuthead(utbodyutfootuthead(ubodyucaptionucolucolgroupuhtmlutduthutr(u__init__uutilsuMethodDispatcherustartTagHtmlu
startTagTrustartTagTableCellustartTagTableOtherustartTagHandleru
startTagOtherudefaultuendTagTableRowGroupuendTagTableuendTagIgnoreu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�su,getPhases.<locals>.InTableBodyPhase.__init__cSsbx-|jjdjdkr/|jjj�qW|jjdjdkr^|jjs^t�ndS(	Niutbodyutfootutheaduhtmli����(utbodyutfootutheaduhtmli����(utreeuopenElementsunameupopuparseru	innerHTMLuAssertionError(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuclearStackToTableBodyContext�s
	u@getPhases.<locals>.InTableBodyPhase.clearStackToTableBodyContextcSs|jjdj�dS(NuinTable(uparseruphasesu
processEOF(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�su.getPhases.<locals>.InTableBodyPhase.processEOFcSs|jjdj|�S(NuinTable(uparseruphasesuprocessSpaceCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacters�su:getPhases.<locals>.InTableBodyPhase.processSpaceCharacterscSs|jjdj|�S(NuinTable(uparseruphasesuprocessCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�su5getPhases.<locals>.InTableBodyPhase.processCharacterscSs4|j�|jj|�|jjd|j_dS(NuinRow(uclearStackToTableBodyContextutreeu
insertElementuparseruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagTr�s
u.getPhases.<locals>.InTableBodyPhase.startTagTrcSs8|jjdi|dd6�|jtdd��|S(Nuunexpected-cell-in-table-bodyunameutruStartTag(uparseru
parseErroru
startTagTruimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagTableCell�su5getPhases.<locals>.InTableBodyPhase.startTagTableCellcSs�|jjddd�sH|jjddd�sH|jjddd�rv|j�|jt|jjdj��|S|jjs�t	�|jj
�dS(Nutbodyuvariantutableutheadutfootii����(utreeuelementInScopeuclearStackToTableBodyContextuendTagTableRowGroupuimpliedTagTokenuopenElementsunameuparseru	innerHTMLuAssertionErroru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagTableOther�s
u6getPhases.<locals>.InTableBodyPhase.startTagTableOthercSs|jjdj|�S(NuinTable(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther�su1getPhases.<locals>.InTableBodyPhase.startTagOthercSsq|jj|ddd�rO|j�|jjj�|jjd|j_n|jjdi|dd6�dS(NunameuvariantutableuinTableu unexpected-end-tag-in-table-body(	utreeuelementInScopeuclearStackToTableBodyContextuopenElementsupopuparseruphasesuphaseu
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTableRowGroup�s
u7getPhases.<locals>.InTableBodyPhase.endTagTableRowGroupcSs�|jjddd�sH|jjddd�sH|jjddd�rv|j�|jt|jjdj��|S|jjs�t	�|jj
�dS(Nutbodyuvariantutableutheadutfootii����(utreeuelementInScopeuclearStackToTableBodyContextuendTagTableRowGroupuimpliedTagTokenuopenElementsunameuparseru	innerHTMLuAssertionErroru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTable�s
u/getPhases.<locals>.InTableBodyPhase.endTagTablecSs"|jjdi|dd6�dS(Nu unexpected-end-tag-in-table-bodyuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagIgnore�su0getPhases.<locals>.InTableBodyPhase.endTagIgnorecSs|jjdj|�S(NuinTable(uparseruphasesu
processEndTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther�su/getPhases.<locals>.InTableBodyPhase.endTagOtherN(u__name__u
__module__u__qualname__u__init__uclearStackToTableBodyContextu
processEOFuprocessSpaceCharactersuprocessCharactersu
startTagTrustartTagTableCellustartTagTableOtheru
startTagOtheruendTagTableRowGroupuendTagTableuendTagIgnoreuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInTableBodyPhase�s
	
uInTableBodyPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS(ugetPhases.<locals>.InRowPhasecs��j|||�tjd|jfd
|jfd|jfg�|_|j|j_tjd
|j	fd|j
fd|jfd|jfg�|_
|j|j
_dS(Nuhtmlutduthucaptionucolucolgrouputbodyutfootutheadutrutableubody(utduth(ucaptionucolucolgrouputbodyutfootutheadutr(utbodyutfootuthead(ubodyucaptionucolucolgroupuhtmlutduth(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagTableCellustartTagTableOtherustartTagHandleru
startTagOtherudefaultuendTagTruendTagTableuendTagTableRowGroupuendTagIgnoreu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�su&getPhases.<locals>.InRowPhase.__init__cSs[xT|jjdjdkrV|jjdi|jjdjd6�|jjj�qWdS(	Niutruhtmlu'unexpected-implied-end-tag-in-table-rowunamei����(utruhtmli����(utreeuopenElementsunameuparseru
parseErrorupop(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuclearStackToTableRowContextsu9getPhases.<locals>.InRowPhase.clearStackToTableRowContextcSs|jjddd�S(Nutruvariantutable(utreeuelementInScope(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuignoreEndTagTrsu,getPhases.<locals>.InRowPhase.ignoreEndTagTrcSs|jjdj�dS(NuinTable(uparseruphasesu
processEOF(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOFsu(getPhases.<locals>.InRowPhase.processEOFcSs|jjdj|�S(NuinTable(uparseruphasesuprocessSpaceCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacterssu4getPhases.<locals>.InRowPhase.processSpaceCharacterscSs|jjdj|�S(NuinTable(uparseruphasesuprocessCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacterssu/getPhases.<locals>.InRowPhase.processCharacterscSsG|j�|jj|�|jjd|j_|jjjt�dS(NuinCell(	uclearStackToTableRowContextutreeu
insertElementuparseruphasesuphaseuactiveFormattingElementsuappenduMarker(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagTableCell"s
u/getPhases.<locals>.InRowPhase.startTagTableCellcSs-|j�}|jtd��|s)|SdS(Nutr(uignoreEndTagTruendTagTruimpliedTagToken(uselfutokenuignoreEndTag((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagTableOther(su0getPhases.<locals>.InRowPhase.startTagTableOthercSs|jjdj|�S(NuinTable(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther/su+getPhases.<locals>.InRowPhase.startTagOthercSsb|j�s?|j�|jjj�|jjd|j_n|jjsQt	�|jj
�dS(NuinTableBody(uignoreEndTagTruclearStackToTableRowContextutreeuopenElementsupopuparseruphasesuphaseu	innerHTMLuAssertionErroru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTr2s
u&getPhases.<locals>.InRowPhase.endTagTrcSs-|j�}|jtd��|s)|SdS(Nutr(uignoreEndTagTruendTagTruimpliedTagToken(uselfutokenuignoreEndTag((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTable<su)getPhases.<locals>.InRowPhase.endTagTablecSsD|jj|ddd�r3|jtd��|S|jj�dS(Nunameuvariantutableutr(utreeuelementInScopeuendTagTruimpliedTagTokenuparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTableRowGroupDsu1getPhases.<locals>.InRowPhase.endTagTableRowGroupcSs"|jjdi|dd6�dS(Nuunexpected-end-tag-in-table-rowuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagIgnoreKsu*getPhases.<locals>.InRowPhase.endTagIgnorecSs|jjdj|�S(NuinTable(uparseruphasesu
processEndTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOtherOsu)getPhases.<locals>.InRowPhase.endTagOtherN(u__name__u
__module__u__qualname__u__init__uclearStackToTableRowContextuignoreEndTagTru
processEOFuprocessSpaceCharactersuprocessCharactersustartTagTableCellustartTagTableOtheru
startTagOtheruendTagTruendTagTableuendTagTableRowGroupuendTagIgnoreuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
InRowPhase�s
u
InRowPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�ZdS(ugetPhases.<locals>.InCellPhasecs��j|||�tjd|jfd
|jfg�|_|j|j_tjd|jfd|j	fd|j
fg�|_|j|j_dS(Nuhtmlucaptionucolucolgrouputbodyutdutfootuthutheadutrubodyutable(	ucaptionucolucolgrouputbodyutdutfootuthutheadutr(utduth(ubodyucaptionucolucolgroupuhtml(utableutbodyutfootutheadutr(
u__init__uutilsuMethodDispatcherustartTagHtmlustartTagTableOtherustartTagHandleru
startTagOtherudefaultuendTagTableCelluendTagIgnoreuendTagImplyu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__Tsu'getPhases.<locals>.InCellPhase.__init__cSs`|jjddd�r.|jtd��n.|jjddd�r\|jtd��ndS(Nutduvariantutableuth(utreeuelementInScopeuendTagTableCelluimpliedTagToken(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu	closeCellesu(getPhases.<locals>.InCellPhase.closeCellcSs|jjdj�dS(NuinBody(uparseruphasesu
processEOF(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOFlsu)getPhases.<locals>.InCellPhase.processEOFcSs|jjdj|�S(NuinBody(uparseruphasesuprocessCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharactersosu0getPhases.<locals>.InCellPhase.processCharacterscSsa|jjddd�s0|jjddd�r>|j�|S|jjsPt�|jj�dS(Nutduvariantutableuth(utreeuelementInScopeu	closeCelluparseru	innerHTMLuAssertionErroru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagTableOtherrs
u1getPhases.<locals>.InCellPhase.startTagTableOthercSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther|su,getPhases.<locals>.InCellPhase.startTagOthercSs�|jj|ddd�r�|jj|d�|jjdj|dkr�|jjdi|dd6�x?|jjj�}|j|dkrnPqnqnn|jjj�|jj�|jj	d|j_
n|jjdi|dd6�dS(	Nunameuvariantutableiuunexpected-cell-end-taguinRowuunexpected-end-tagi����(utreeuelementInScopeugenerateImpliedEndTagsuopenElementsunameuparseru
parseErrorupopuclearActiveFormattingElementsuphasesuphase(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTableCells

u.getPhases.<locals>.InCellPhase.endTagTableCellcSs"|jjdi|dd6�dS(Nuunexpected-end-taguname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagIgnore�su+getPhases.<locals>.InCellPhase.endTagIgnorecSs;|jj|ddd�r*|j�|S|jj�dS(Nunameuvariantutable(utreeuelementInScopeu	closeCelluparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagImply�s
u*getPhases.<locals>.InCellPhase.endTagImplycSs|jjdj|�S(NuinBody(uparseruphasesu
processEndTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther�su*getPhases.<locals>.InCellPhase.endTagOtherN(
u__name__u
__module__u__qualname__u__init__u	closeCellu
processEOFuprocessCharactersustartTagTableOtheru
startTagOtheruendTagTableCelluendTagIgnoreuendTagImplyuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInCellPhaseRs
uInCellPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS(u getPhases.<locals>.InSelectPhasecs��j|||�tjd|jfd|jfd|jfd|jfd	|jfd|jfg�|_	|j
|j	_tjd|jfd|j
fd|jfg�|_|j|j_dS(
Nuhtmluoptionuoptgroupuselectuinputukeygenutextareauscript(uinputukeygenutextarea(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagOptionustartTagOptgroupustartTagSelectu
startTagInputustartTagScriptustartTagHandleru
startTagOtherudefaultuendTagOptionuendTagOptgroupuendTagSelectu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�su)getPhases.<locals>.InSelectPhase.__init__cSsB|jjdjdkr,|jjd�n|jjs>t�dS(Niuhtmlu
eof-in-selecti����(utreeuopenElementsunameuparseru
parseErroru	innerHTMLuAssertionError(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�su+getPhases.<locals>.InSelectPhase.processEOFcSs,|ddkrdS|jj|d�dS(Nudatau(utreeu
insertText(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�su2getPhases.<locals>.InSelectPhase.processCharacterscSs@|jjdjdkr,|jjj�n|jj|�dS(Niuoptioni����(utreeuopenElementsunameupopu
insertElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagOption�su/getPhases.<locals>.InSelectPhase.startTagOptioncSsl|jjdjdkr,|jjj�n|jjdjdkrX|jjj�n|jj|�dS(Niuoptionuoptgroupi����i����(utreeuopenElementsunameupopu
insertElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagOptgroup�s
u1getPhases.<locals>.InSelectPhase.startTagOptgroupcSs'|jjd�|jtd��dS(Nuunexpected-select-in-selectuselect(uparseru
parseErroruendTagSelectuimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagSelect�su/getPhases.<locals>.InSelectPhase.startTagSelectcSsU|jjd�|jjddd�r?|jtd��|S|jjsQt�dS(Nuunexpected-input-in-selectuselectuvariant(uparseru
parseErrorutreeuelementInScopeuendTagSelectuimpliedTagTokenu	innerHTMLuAssertionError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagInput�s
u.getPhases.<locals>.InSelectPhase.startTagInputcSs|jjdj|�S(NuinHead(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagScript�su/getPhases.<locals>.InSelectPhase.startTagScriptcSs"|jjdi|dd6�dS(Nuunexpected-start-tag-in-selectuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther�su.getPhases.<locals>.InSelectPhase.startTagOthercSsJ|jjdjdkr,|jjj�n|jjdidd6�dS(Niuoptionuunexpected-end-tag-in-selectunamei����(utreeuopenElementsunameupopuparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOption�su-getPhases.<locals>.InSelectPhase.endTagOptioncSs�|jjdjdkrE|jjdjdkrE|jjj�n|jjd	jdkrq|jjj�n|jjdidd6�dS(
Niuoptioniuoptgroupuunexpected-end-tag-in-selectunamei����i����i����(utreeuopenElementsunameupopuparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOptgroup�su/getPhases.<locals>.InSelectPhase.endTagOptgroupcSs�|jjddd�rb|jjj�}x%|jdkrQ|jjj�}q-W|jj�n|jjstt�|jj	�dS(Nuselectuvariant(
utreeuelementInScopeuopenElementsupopunameuparseruresetInsertionModeu	innerHTMLuAssertionErroru
parseError(uselfutokenunode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagSelect�su-getPhases.<locals>.InSelectPhase.endTagSelectcSs"|jjdi|dd6�dS(Nuunexpected-end-tag-in-selectuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther�su,getPhases.<locals>.InSelectPhase.endTagOtherN(u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCharactersustartTagOptionustartTagOptgroupustartTagSelectu
startTagInputustartTagScriptu
startTagOtheruendTagOptionuendTagOptgroupuendTagSelectuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
InSelectPhase�s
u
InSelectPhasecsn|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS(u'getPhases.<locals>.InSelectInTablePhasec	sq�j|||�tjd	|jfg�|_|j|j_tjd
|jfg�|_|j	|j_dS(Nucaptionutableutbodyutfootutheadutrutduth(ucaptionutableutbodyutfootutheadutrutduth(ucaptionutableutbodyutfootutheadutrutduth(
u__init__uutilsuMethodDispatcheru
startTagTableustartTagHandleru
startTagOtherudefaultuendTagTableu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__	su0getPhases.<locals>.InSelectInTablePhase.__init__cSs|jjdj�dS(NuinSelect(uparseruphasesu
processEOF(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF	su2getPhases.<locals>.InSelectInTablePhase.processEOFcSs|jjdj|�S(NuinSelect(uparseruphasesuprocessCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters	su9getPhases.<locals>.InSelectInTablePhase.processCharacterscSs5|jjdi|dd6�|jtd��|S(Nu5unexpected-table-element-start-tag-in-select-in-tableunameuselect(uparseru
parseErroruendTagOtheruimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagTable	su5getPhases.<locals>.InSelectInTablePhase.startTagTablecSs|jjdj|�S(NuinSelect(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther	su5getPhases.<locals>.InSelectInTablePhase.startTagOthercSsU|jjdi|dd6�|jj|ddd�rQ|jtd��|SdS(Nu3unexpected-table-element-end-tag-in-select-in-tableunameuvariantutableuselect(uparseru
parseErrorutreeuelementInScopeuendTagOtheruimpliedTagToken(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagTable 	su3getPhases.<locals>.InSelectInTablePhase.endTagTablecSs|jjdj|�S(NuinSelect(uparseruphasesu
processEndTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther&	su3getPhases.<locals>.InSelectInTablePhase.endTagOtherN(
u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCharactersu
startTagTableu
startTagOtheruendTagTableuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInSelectInTablePhase	suInSelectInTablePhasec-s�|EeZdZeddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,g,�Z�fd-d.�Zd/d0�Z�fd1d2�Zd3d4�Zd5d6�Z	d7S(8u(getPhases.<locals>.InForeignContentPhaseububigu
blockquoteubodyubrucenterucodeuddudivudludtuemuembeduh1uh2uh3uh4uh5uh6uheaduhruiuimguliulistingumenuumetaunobruolupupreurubyususmalluspanustrongustrikeusubusuputableuttuuuuluvarcs�j|||�dS(N(u__init__(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__3	su1getPhases.<locals>.InForeignContentPhase.__init__cSs+i$dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6}|dI|kr'||dI|dI<ndS(JNualtGlyphualtglyphualtGlyphDefualtglyphdefualtGlyphItemualtglyphitemuanimateColoruanimatecoloru
animateMotionu
animatemotionuanimateTransformuanimatetransformuclipPathuclippathufeBlendufeblendu
feColorMatrixu
fecolormatrixufeComponentTransferufecomponenttransferufeCompositeufecompositeufeConvolveMatrixufeconvolvematrixufeDiffuseLightingufediffuselightingufeDisplacementMapufedisplacementmapufeDistantLightufedistantlightufeFloodufefloodufeFuncAufefuncaufeFuncBufefuncbufeFuncGufefuncgufeFuncRufefuncrufeGaussianBlurufegaussianblurufeImageufeimageufeMergeufemergeufeMergeNodeufemergenodeufeMorphologyufemorphologyufeOffsetufeoffsetufePointLightufepointlightufeSpecularLightingufespecularlightingufeSpotLightufespotlightufeTileufetileufeTurbulenceufeturbulenceu
foreignObjectu
foreignobjectuglyphRefuglyphrefulinearGradientulineargradienturadialGradienturadialgradientutextPathutextpathuname((uselfutokenureplacements((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuadjustSVGTagNames6	sL

u:getPhases.<locals>.InForeignContentPhase.adjustSVGTagNamescsi|ddkrd|d<n8|jjrUtdd�|dD��rUd|j_n�j||�dS(Nudatauu�css|]}|tkVqdS(N(uspaceCharacters(u.0uchar((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu	<genexpr>c	suMgetPhases.<locals>.InForeignContentPhase.processCharacters.<locals>.<genexpr>F(uparseru
framesetOKuanyuFalseuprocessCharacters(uselfutoken(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters_	s
u:getPhases.<locals>.InForeignContentPhase.processCharacterscSs�|jjd}|d|jks\|ddkr�t|dj��tdddg�@r�|jjdi|dd6�xm|jjdj|jjkr�|jj	|jjd�r�|jj
|jjd�r�|jjj�q}W|S|jtd	kr|jj
|�n3|jtd
krG|j|�|jj|�n|jj|�|j|d<|jj|�|dr�|jjj�d|d
<ndS(Niunameufontudataucolorufaceusizeu*unexpected-html-element-in-foreign-contentumathmlusvgu	namespaceuselfClosinguselfClosingAcknowledgedi����i����i����i����T(utreeuopenElementsubreakoutElementsusetukeysuparseru
parseErroru	namespaceudefaultNamespaceuisHTMLIntegrationPointuisMathMLTextIntegrationPointupopu
namespacesuadjustMathMLAttributesuadjustSVGTagNamesuadjustSVGAttributesuadjustForeignAttributesu
insertElementuTrue(uselfutokenucurrentNode((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessStartTagg	s.)


u8getPhases.<locals>.InForeignContentPhase.processStartTagcSsJt|jj�d}|jjd}|j|dkrZ|jjdi|dd6�nx�|jjt�|dkr�|jj|jj	dkr�|jjj
�|jjj|j_nx.|jjj�|kr�|jjs�t
�q�Wd}Pn|d8}|jj|}|j|jjkr-q]q]|jjj|�}Pq]|S(Niunameuunexpected-end-taguinTableTexti����(ulenutreeuopenElementsunameuparseru
parseErroru	translateuasciiUpper2LoweruphaseuphasesuflushCharactersu
originalPhaseupopuAssertionErroruNoneu	namespaceudefaultNamespaceu
processEndTag(uselfutokenu	nodeIndexunodeu	new_token((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEndTag�	s(!
u6getPhases.<locals>.InForeignContentPhase.processEndTagN(
u__name__u
__module__u__qualname__u	frozensetubreakoutElementsu__init__uadjustSVGTagNamesuprocessCharactersuprocessStartTagu
processEndTag(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInForeignContentPhase)	s)uInForeignContentPhasecsz|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS(u!getPhases.<locals>.AfterBodyPhasecsq�j|||�tjd|jfg�|_|j|j_tjd|jfg�|_|j	|j_dS(Nuhtml(
u__init__uutilsuMethodDispatcherustartTagHtmlustartTagHandleru
startTagOtherudefaultu
endTagHtmlu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�	su*getPhases.<locals>.AfterBodyPhase.__init__cSsdS(N((uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�	su,getPhases.<locals>.AfterBodyPhase.processEOFcSs!|jj||jjd�dS(Ni(utreeu
insertCommentuopenElements(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessComment�	su0getPhases.<locals>.AfterBodyPhase.processCommentcSs*|jjd�|jjd|j_|S(Nuunexpected-char-after-bodyuinBody(uparseru
parseErroruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�	su3getPhases.<locals>.AfterBodyPhase.processCharacterscSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHtml�	su.getPhases.<locals>.AfterBodyPhase.startTagHtmlcSs8|jjdi|dd6�|jjd|j_|S(Nuunexpected-start-tag-after-bodyunameuinBody(uparseru
parseErroruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther�	su/getPhases.<locals>.AfterBodyPhase.startTagOthercSs9|jjr|jjd�n|jjd|j_dS(Nu'unexpected-end-tag-after-body-innerhtmluafterAfterBody(uparseru	innerHTMLu
parseErroruphasesuphase(uselfuname((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
endTagHtml�	su,getPhases.<locals>.AfterBodyPhase.endTagHtmlcSs8|jjdi|dd6�|jjd|j_|S(Nuunexpected-end-tag-after-bodyunameuinBody(uparseru
parseErroruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther�	su-getPhases.<locals>.AfterBodyPhase.endTagOtherN(u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCommentuprocessCharactersustartTagHtmlu
startTagOtheru
endTagHtmluendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuAfterBodyPhase�	suAfterBodyPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS(u"getPhases.<locals>.InFramesetPhasecs��j|||�tjd|jfd|jfd|jfd|jfg�|_|j|j_	tjd|j
fg�|_|j|j_	dS(Nuhtmluframesetuframeunoframes(
u__init__uutilsuMethodDispatcherustartTagHtmlustartTagFramesetu
startTagFrameustartTagNoframesustartTagHandleru
startTagOtherudefaultuendTagFramesetu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__�	su+getPhases.<locals>.InFramesetPhase.__init__cSsB|jjdjdkr,|jjd�n|jjs>t�dS(Niuhtmlueof-in-frameseti����(utreeuopenElementsunameuparseru
parseErroru	innerHTMLuAssertionError(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF�	su-getPhases.<locals>.InFramesetPhase.processEOFcSs|jjd�dS(Nuunexpected-char-in-frameset(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters�	su4getPhases.<locals>.InFramesetPhase.processCharacterscSs|jj|�dS(N(utreeu
insertElement(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagFrameset�	su3getPhases.<locals>.InFramesetPhase.startTagFramesetcSs$|jj|�|jjj�dS(N(utreeu
insertElementuopenElementsupop(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagFrame�	su0getPhases.<locals>.InFramesetPhase.startTagFramecSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagNoframes�	su3getPhases.<locals>.InFramesetPhase.startTagNoframescSs"|jjdi|dd6�dS(Nu unexpected-start-tag-in-framesetuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther�	su0getPhases.<locals>.InFramesetPhase.startTagOthercSs|jjdjdkr,|jjd�n|jjj�|jjr{|jjdjdkr{|jjd|j_ndS(Niuhtmlu)unexpected-frameset-in-frameset-innerhtmluframesetu
afterFrameseti����i����(	utreeuopenElementsunameuparseru
parseErrorupopu	innerHTMLuphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagFrameset�	s
u1getPhases.<locals>.InFramesetPhase.endTagFramesetcSs"|jjdi|dd6�dS(Nuunexpected-end-tag-in-framesetuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther
su.getPhases.<locals>.InFramesetPhase.endTagOtherN(u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCharactersustartTagFramesetu
startTagFrameustartTagNoframesu
startTagOtheruendTagFramesetuendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuInFramesetPhase�	suInFramesetPhasecsn|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS(u%getPhases.<locals>.AfterFramesetPhasecs}�j|||�tjd|jfd|jfg�|_|j|j_tjd|jfg�|_	|j
|j	_dS(Nuhtmlunoframes(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagNoframesustartTagHandleru
startTagOtherudefaultu
endTagHtmlu
endTagHandleruendTagOther(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__
su.getPhases.<locals>.AfterFramesetPhase.__init__cSsdS(N((uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF
su0getPhases.<locals>.AfterFramesetPhase.processEOFcSs|jjd�dS(Nuunexpected-char-after-frameset(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters
su7getPhases.<locals>.AfterFramesetPhase.processCharacterscSs|jjdj|�S(NuinHead(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagNoframes
su6getPhases.<locals>.AfterFramesetPhase.startTagNoframescSs"|jjdi|dd6�dS(Nu#unexpected-start-tag-after-framesetuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOther
su3getPhases.<locals>.AfterFramesetPhase.startTagOthercSs|jjd|j_dS(NuafterAfterFrameset(uparseruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
endTagHtml"
su0getPhases.<locals>.AfterFramesetPhase.endTagHtmlcSs"|jjdi|dd6�dS(Nu!unexpected-end-tag-after-framesetuname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuendTagOther%
su1getPhases.<locals>.AfterFramesetPhase.endTagOtherN(
u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCharactersustartTagNoframesu
startTagOtheru
endTagHtmluendTagOther(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuAfterFramesetPhase
suAfterFramesetPhasecsz|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS(u&getPhases.<locals>.AfterAfterBodyPhasecsD�j|||�tjd|jfg�|_|j|j_dS(Nuhtml(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagHandleru
startTagOtherudefault(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__*
su/getPhases.<locals>.AfterAfterBodyPhase.__init__cSsdS(N((uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOF2
su1getPhases.<locals>.AfterAfterBodyPhase.processEOFcSs|jj||jj�dS(N(utreeu
insertCommentudocument(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessComment5
su5getPhases.<locals>.AfterAfterBodyPhase.processCommentcSs|jjdj|�S(NuinBody(uparseruphasesuprocessSpaceCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacters8
su=getPhases.<locals>.AfterAfterBodyPhase.processSpaceCharacterscSs*|jjd�|jjd|j_|S(Nuexpected-eof-but-got-charuinBody(uparseru
parseErroruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharacters;
su8getPhases.<locals>.AfterAfterBodyPhase.processCharacterscSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHtml@
su3getPhases.<locals>.AfterAfterBodyPhase.startTagHtmlcSs8|jjdi|dd6�|jjd|j_|S(Nuexpected-eof-but-got-start-tagunameuinBody(uparseru
parseErroruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOtherC
su4getPhases.<locals>.AfterAfterBodyPhase.startTagOthercSs8|jjdi|dd6�|jjd|j_|S(Nuexpected-eof-but-got-end-tagunameuinBody(uparseru
parseErroruphasesuphase(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEndTagI
su4getPhases.<locals>.AfterAfterBodyPhase.processEndTagN(u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCommentuprocessSpaceCharactersuprocessCharactersustartTagHtmlu
startTagOtheru
processEndTag(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuAfterAfterBodyPhase)
suAfterAfterBodyPhasecs�|EeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS(u*getPhases.<locals>.AfterAfterFramesetPhasecsP�j|||�tjd|jfd|jfg�|_|j|j_dS(Nuhtmlunoframes(u__init__uutilsuMethodDispatcherustartTagHtmlustartTagNoFramesustartTagHandleru
startTagOtherudefault(uselfuparserutree(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu__init__P
s
u3getPhases.<locals>.AfterAfterFramesetPhase.__init__cSsdS(N((uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEOFY
su5getPhases.<locals>.AfterAfterFramesetPhase.processEOFcSs|jj||jj�dS(N(utreeu
insertCommentudocument(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessComment\
su9getPhases.<locals>.AfterAfterFramesetPhase.processCommentcSs|jjdj|�S(NuinBody(uparseruphasesuprocessSpaceCharacters(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessSpaceCharacters_
suAgetPhases.<locals>.AfterAfterFramesetPhase.processSpaceCharacterscSs|jjd�dS(Nuexpected-eof-but-got-char(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuprocessCharactersb
su<getPhases.<locals>.AfterAfterFramesetPhase.processCharacterscSs|jjdj|�S(NuinBody(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagHtmle
su7getPhases.<locals>.AfterAfterFramesetPhase.startTagHtmlcSs|jjdj|�S(NuinHead(uparseruphasesuprocessStartTag(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyustartTagNoFramesh
su;getPhases.<locals>.AfterAfterFramesetPhase.startTagNoFramescSs"|jjdi|dd6�dS(Nuexpected-eof-but-got-start-taguname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
startTagOtherk
su8getPhases.<locals>.AfterAfterFramesetPhase.startTagOthercSs"|jjdi|dd6�dS(Nuexpected-eof-but-got-end-taguname(uparseru
parseError(uselfutoken((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
processEndTago
su8getPhases.<locals>.AfterAfterFramesetPhase.processEndTagN(u__name__u
__module__u__qualname__u__init__u
processEOFuprocessCommentuprocessSpaceCharactersuprocessCharactersustartTagHtmlustartTagNoFramesu
startTagOtheru
processEndTag(u
__locals__(uPhase(u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuAfterAfterFramesetPhaseO
s	uAfterAfterFramesetPhaseuinitialu
beforeHtmlu
beforeHeaduinHeadu	afterHeaduinBodyutextuinTableuinTableTextu	inCaptionu
inColumnGroupuinTableBodyuinRowuinCelluinSelectuinSelectInTableuinForeignContentu	afterBodyu
inFramesetu
afterFramesetuafterAfterBodyuafterAfterFrameset(uwith_metaclass(udebugulogugetMetaclassuInitialPhaseuBeforeHtmlPhaseuBeforeHeadPhaseuInHeadPhaseuAfterHeadPhaseuInBodyPhaseu	TextPhaseuInTablePhaseuInTableTextPhaseuInCaptionPhaseuInColumnGroupPhaseuInTableBodyPhaseu
InRowPhaseuInCellPhaseu
InSelectPhaseuInSelectInTablePhaseuInForeignContentPhaseuAfterBodyPhaseuInFramesetPhaseuAfterFramesetPhaseuAfterAfterBodyPhaseuAfterAfterFramesetPhase((uPhaseu9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu	getPhases�sd%)�#.cC���!�-GAbYLd's/9%&$u	getPhasesuEndTagcCs9|dkri}nit|d6|d6|d6|d6S(NutypeunameudatauselfClosing(uNoneu
tokenTypes(unameutypeu
attributesuselfClosing((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyuimpliedTagToken�
s	uimpliedTagTokencBs|EeZdZdZdS(u
ParseErroruError in parsed documentN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu
ParseError�
su
ParseError((u
__future__uabsolute_importudivisionuunicode_literalsupip._vendor.sixuwith_metaclassutypesuuinputstreamu	tokenizerutreebuildersutreebuilders._baseuMarkeruutilsu	constantsuspaceCharactersuasciiUpper2LoweruspecialElementsuheadingElementsu
cdataElementsurcdataElementsu
tokenTypesuReparseExceptionu
namespacesuhtmlIntegrationPointElementsu"mathmlTextIntegrationPointElementsuadjustForeignAttributesuadjustForeignAttributesMapuNoneuTrueuparseu
parseFragmentumethod_decorator_metaclassuobjectu
HTMLParseru	getPhasesuFalseuimpliedTagTokenu	Exceptionu
ParseError(((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/html5parser.pyu<module>sD	�i���������python3.3/site-packages/pip/_vendor/html5lib/__pycache__/utils.cpython-33.pyc000064400000007107151733566750023017 0ustar00�
7�Re�	c
@s�ddlmZmZmZddlmZyddljjZ	Wn$e
k
rhddljjZ	YnXdddddgZ
Gd	d�de�Zd
d�Zdd�Zdd�ZdS(
i(uabsolute_importudivisionuunicode_literals(u
ModuleTypeNu
default_etreeuMethodDispatcheruisSurrogatePairusurrogatePairToCodepointumoduleFactoryFactorycBs5|EeZdZdZfdd�Zdd�ZdS(uMethodDispatcherupDict with 2 special properties:

    On initiation, keys that are lists, sets or tuples are converted to
    multiple keys so accessing any one of the items in the original
    list-like object returns the matching value

    md = MethodDispatcher({("foo", "bar"):"baz"})
    md["foo"] == "baz"

    A default value which can be set through the default attribute.
    cCs�g}xl|D]d\}}t|�ttttfkr^x7|D]}|j||f�q>Wq
|j||f�q
Wtj||�d|_	dS(N(
utypeulistutupleu	frozensetusetuappendudictu__init__uNoneudefault(uselfuitemsu_dictEntriesunameuvalueuitem((u3/tmp/pip-zej_zi-build/pip/_vendor/html5lib/utils.pyu__init__s
uMethodDispatcher.__init__cCstj|||j�S(N(udictugetudefault(uselfukey((u3/tmp/pip-zej_zi-build/pip/_vendor/html5lib/utils.pyu__getitem__*suMethodDispatcher.__getitem__N(u__name__u
__module__u__qualname__u__doc__u__init__u__getitem__(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/html5lib/utils.pyuMethodDispatcherscCsht|�dkogt|d�dkogt|d�dkogt|d�dkogt|d�dkS(Niii�i��ii�i��(ulenuord(udata((u3/tmp/pip-zej_zi-build/pip/_vendor/html5lib/utils.pyuisSurrogatePair1s,cCs2dt|d�ddt|d�d}|S(Niii�iii�(uord(udatauchar_val((u3/tmp/pip-zej_zi-build/pip/_vendor/html5lib/utils.pyusurrogatePairToCodepoint7scsi���fdd�}|S(Ncs�ttjtd��r(d|j}n
d|j}|�krI�|St|�}�|||�}|jj|�|�|<|SdS(Nuu_%s_factorys_%s_factory(u
isinstanceu
ModuleTypeu__name__utypeu__dict__uupdate(u
baseModuleuargsukwargsunameumoduobjs(ufactoryumoduleCache(u3/tmp/pip-zej_zi-build/pip/_vendor/html5lib/utils.pyu
moduleFactoryCs

u+moduleFactoryFactory.<locals>.moduleFactory((ufactoryu
moduleFactory((ufactoryumoduleCacheu3/tmp/pip-zej_zi-build/pip/_vendor/html5lib/utils.pyumoduleFactoryFactory@s(u
__future__uabsolute_importudivisionuunicode_literalsutypesu
ModuleTypeuxml.etree.cElementTreeuetreeucElementTreeu
default_etreeuImportErroruxml.etree.ElementTreeuElementTreeu__all__udictuMethodDispatcheruisSurrogatePairusurrogatePairToCodepointumoduleFactoryFactory(((u3/tmp/pip-zej_zi-build/pip/_vendor/html5lib/utils.pyu<module>s
	"	python3.3/site-packages/pip/_vendor/html5lib/__pycache__/sanitizer.cpython-33.pyc000064400000036722151733566750023674 0ustar00�
7�Re,@c@s�ddlmZmZmZddlZddlmZmZddlm	Z	ddl
mZGdd�de�Z
Gd	d
�d
e	e
�ZdS(i(uabsolute_importudivisionuunicode_literalsN(uescapeuunescapei(u
HTMLTokenizer(u
tokenTypesc�BsC|EeZdZdZdddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcddgcZdedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dgZdd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�g#Zdd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d)d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d8d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddRdddddddddd�ddddddd d!d"d#d$d%d&d'g�Zd(d�d)d)d)d*d+d,d-d.d/d0d1d2d3d4d�d�d5d6d7d8d9d9d:d;d<d=d=d=d>d?dd@dAdBdCdDd%d%dEdFdGdHdIg-ZdJdKdLdMdNdOdPdQdRdSdTdUdVdWd�dXd�dYdZd[d\d]d^d_d`d.dad�dbdcdddedfdgdhdidjdkdldmdndodpdqdrd�dsdtd�dudvdwdxdyd�dzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�dd�d�d�d�d�d�d�d�d�d�d�d%d�d�d�d�d�d�d�dEd�dFd�dGd�d'd�dHdId�d�d�d�g�Z	d�ddd�d�d�dEd�gZ
dXd�d�dbd�d�d|d{dzd�d�gZd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZd�d�d�d�d�d�d�d�d�d�d�d�d.d�d�d(dedfdhdidjd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d"d�d%g.Z
d�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d�d�d�d�ddddd�ddddddd	d
ddd
ddg'Zdbdcddd�d�d�d�d�gZdddddddddddddddddd d!d"d#d$gZeeeZeee	Ze
ZeZeZeZd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-S(.uHTMLSanitizerMixinuA sanitization of XHTML+MathML+SVG and of inline style attributes.uauabbruacronymuaddressuareauarticleuasideuaudioububigu
blockquoteubrubuttonucanvasucaptionucenteruciteucodeucolucolgroupucommandudatagridudatalistuddudeludetailsudfnudialogudirudivudludtuemuevent-sourceufieldsetu
figcaptionufigureufooterufontuformuheaderuh1uh2uh3uh4uh5uh6uhruiuimguinputuinsukeygenukbdulabelulegenduliumumapumenuumeterumulticolunavunextiduoluoutputuoptgroupuoptionupupreuprogressuqususampusectionuselectusmallusoundusourceuspaceruspanustrikeustrongusubusuputableutbodyutdutextareautimeutfootuthutheadutruttuuuuluvaruvideoumactionumathumerrorumfracumiu
mmultiscriptsumnumoumoverumpaddedumphantomumprescriptsumrootumrowumspaceumsqrtumstyleumsubumsubsupumsupumtableumtdumtextumtrumunderu
munderoverunoneuanimateuanimateColoru
animateMotionuanimateTransformuclipPathucircleudefsudescuellipseu	font-faceufont-face-nameu
font-face-srcuguglyphuhkernulinearGradientulineumarkerumetadatau
missing-glyphumpathupathupolygonupolylineuradialGradienturectusetustopusvguswitchutextutitleutspanuuseuacceptuaccept-charsetu	accesskeyuactionualignualtuautocompleteu	autofocusuaxisu
backgroundubalanceubgcolorubgpropertiesuborderubordercolorubordercolordarkubordercolorlightu
bottompaddingucellpaddingucellspacinguchu	challengeucharucharoffuchoffucharsetucheckeduclassuclearucolorucolsucolspanucompactucontenteditableucontrolsucoordsudataudatafldudatapagesizeudatasrcudatetimeudefaultudelayudisabledu	draggableudynsrcuenctypeuendufaceuforuframeu
galleryimgugutteruheadersuheightu	hidefocusuhiddenuhighuhrefuhreflanguhspaceuiconuidu	inputmodeuismapukeytypeuleftspacingulangulistulongdesculoopu	loopcountuloopendu	loopstartulowulowsrcumaxu	maxlengthumediaumethoduminumultipleunameunohrefunoshadeunowrapuopenuoptimumupatternupingu
point-sizeuposterupqgupreloadupromptu
radiogroupureadonlyurelu
repeat-maxu
repeat-minureplaceurequiredurevurightspacingurowsurowspanurulesuscopeuselectedushapeusizeusrcustartustepustyleusummaryusuppressutabindexutargetutemplateu
toppaddingutypeuunselectableuusemapuurnuvalignuvalueuvariableuvolumeuvspaceuvrmluwidthuwrapuxml:langu
actiontypeucolumnalignucolumnlinesu
columnspacingu
columnspanudepthudisplayudisplaystyleuequalcolumnsu	equalrowsufenceu	fontstyleu
fontweightu
linethicknessulspaceumathbackgroundu	mathcolorumathvariantumaxsizeuminsizeuotherurowalignurowlinesu
rowspacingurspaceuscriptlevelu	selectionu	separatorustretchyu
xlink:hrefu
xlink:showu
xlink:typeuxmlnsuxmlns:xlinku
accent-heightu
accumulateuadditiveu
alphabeticuarabic-formuascentu
attributeNameu
attributeTypeubaseProfileubboxubeginubyucalcModeu
cap-heightu	clip-pathucolor-renderingucontentucxucyududxudyudescentudurufillufill-opacityu	fill-ruleufont-familyu	font-sizeufont-stretchu
font-styleufont-variantufont-weightufromufxufyug1ug2u
glyph-nameu
gradientUnitsuhanginguhoriz-adv-xuhoriz-origin-xuideographicuku	keyPointsu
keySplinesukeyTimesu
marker-endu
marker-midumarker-startumarkerHeightumarkerUnitsumarkerWidthumathematicaluoffsetuopacityuorientuoriginuoverline-positionuoverline-thicknessupanose-1u
pathLengthupointsupreserveAspectRatioururefXurefYurepeatCountu	repeatDururequiredExtensionsurequiredFeaturesurestarturotateurxuryuslopeustemhustemvu
stop-colorustop-opacityustrikethrough-positionustrikethrough-thicknessustrokeustroke-dasharrayustroke-dashoffsetustroke-linecapustroke-linejoinustroke-miterlimitustroke-opacityustroke-widthusystemLanguageutext-anchorutou	transformuu1uu2uunderline-positionuunderline-thicknessuunicodeu
unicode-rangeuunits-per-emuvaluesuversionuviewBoxu
visibilityuwidthsuxux-heightux1ux2u
xlink:actuateu
xlink:arcroleu
xlink:roleuxlink:titleuxml:baseu	xml:spaceuyuy1uy2u
zoomAndPanu
color-profileucursorufilterumaskualtGlyphufeImageutextpathutrefuazimuthubackground-coloruborder-bottom-coloruborder-collapseuborder-coloruborder-left-coloruborder-right-coloruborder-top-coloru	directionu	elevationufloatuletter-spacinguline-heightuoverflowupauseupause-afterupause-beforeupitchupitch-rangeurichnessuspeakuspeak-headeru
speak-numeraluspeak-punctuationuspeech-rateustressu
text-alignutext-decorationutext-indentuunicode-bidiuvertical-alignuvoice-familyuwhite-spaceuautouaquaublackublockublueuboldubothubottomubrownucollapseudashedudottedufuchsiaugrayugreenu
!importantuitaliculeftulimeumaroonumediumunavyunormaluoliveupointerupurpleuredurightusolidusilverutealutoputransparentu	underlineuwhiteuyellowued2kuftpuhttpuhttpsuircumailtounewsugopherunntputelnetuwebcaluxmppucalltoufeeduaimursyncutagusshusftpurtspuafscCs�|d}|ttj��kr/t|}n|tdtdtdfkr�|d|jkrs|j||�S|j||�Sn|tdkr�n|SdS(NutypeuStartTaguEndTaguEmptyTagunameuComment(ulistu
tokenTypesukeysuallowed_elementsu
allowed_tokenudisallowed_token(uselfutokenu
token_type((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyusanitize_token�s

u!HTMLSanitizerMixin.sanitize_tokencs�d|kr�t�fdd�|dddd�D��}x��jD]�}||kr^qFntjddt||��j�}|jdd�}tjd|�rF|jd	�d
�j	krF||=qFqFWxC�j
D]8}||kr�tjddt||��||<q�q�W|d
�jkrVd|krVtjd|d�rV|d=nd|kr|�j
|d�|d<ndd�t|j��D�|d<n|S(Nudatacs1g|]'\}}|�jkr||f�qS((uallowed_attributes(u.0unameuval(uself(u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyu
<listcomp>�s		u4HTMLSanitizerMixin.allowed_token.<locals>.<listcomp>iu
[`- - \s]+uu�u^[a-z0-9][-+.a-z0-9]*:u:iuurl\s*\(\s*[^#\s][^)]+?\)u unameu
xlink:hrefu^\s*[^#\s].*ustylecSs"g|]\}}||g�qS(((u.0unameuval((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyu
<listcomp>�s	i����(udictuattr_val_is_uriureusubuunescapeulowerureplaceumatchusplituallowed_protocolsusvg_attr_val_allows_refusvg_allow_local_hrefusearchusanitize_cssulistuitems(uselfutokenu
token_typeuattrsuattru
val_unescaped((uselfu7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyu
allowed_token�s4	

&u HTMLSanitizerMixin.allowed_tokencCs�|tdkr%d|d|d<nW|drjdjdd�|dD��}d|d|f|d<nd	|d|d<|jd
�r�|ddd�d|d<n|d
ttj��kr�d|d
<ntd|d
<|d=|S(NuEndTagu</%s>unameudataucSs,g|]"\}}d|t|�f�qS(u %s="%s"(uescape(u.0ukuv((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyu
<listcomp>�s	u7HTMLSanitizerMixin.disallowed_token.<locals>.<listcomp>u<%s%s>u<%s>uselfClosingiu/>utypeu
Charactersi����(u
tokenTypesujoinugetulistukeys(uselfutokenu
token_typeuattrs((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyudisallowed_token�s
 
u#HTMLSanitizerMixin.disallowed_tokencCsctjd�jd|�}tjd|�s1dStjd|�sGdSg}xtjd|�D]�\}}|sxq`n|j�|jkr�|j|d|d�q`|jd	�d
j�dkr!x�|j�D],}||j	kr�tjd|�r�Pq�q�W|j|d|d�q`|j�|j
kr`|j|d|d�q`q`Wdj|�S(Nuurl\s*\(\s*[^\s)]+?\s*\)\s*u u@^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$uu ^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$u([-\w]+)\s*:\s*([^:;]*)u: u;u-iu
backgrounduborderumarginupaddingu\^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$(u
backgrounduborderumarginupadding(ureucompileusubumatchufindalluloweruallowed_css_propertiesuappendusplituacceptable_css_keywordsuallowed_svg_propertiesujoin(uselfustyleucleanupropuvalueukeyword((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyusanitize_css�s*	 uHTMLSanitizerMixin.sanitize_cssN(u__name__u
__module__u__qualname__u__doc__uacceptable_elementsumathml_elementsusvg_elementsuacceptable_attributesumathml_attributesusvg_attributesuattr_val_is_uriusvg_attr_val_allows_refusvg_allow_local_hrefuacceptable_css_propertiesuacceptable_css_keywordsuacceptable_svg_propertiesuacceptable_protocolsuallowed_elementsuallowed_attributesuallowed_css_propertiesuallowed_css_keywordsuallowed_svg_propertiesuallowed_protocolsusanitize_tokenu
allowed_tokenudisallowed_tokenusanitize_css(u
__locals__((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyuHTMLSanitizerMixin
s						
uHTMLSanitizerMixincBs>|EeZdZdddddddd�Zdd�ZdS(u
HTMLSanitizerc
Cs)tj|||||||d|�dS(Nuparser(u
HTMLTokenizeru__init__(uselfustreamuencodingu	parseMetau
useChardetulowercaseElementNameulowercaseAttrNameuparser((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyu__init__suHTMLSanitizer.__init__ccs;x4tj|�D]#}|j|�}|r|VqqWdS(N(u
HTMLTokenizeru__iter__usanitize_token(uselfutoken((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyu__iter__suHTMLSanitizer.__iter__NTF(u__name__u
__module__u__qualname__uNoneuTrueuFalseu__init__u__iter__(u
__locals__((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyu
HTMLSanitizers	u
HTMLSanitizer(u
__future__uabsolute_importudivisionuunicode_literalsureuxml.sax.saxutilsuescapeuunescapeu	tokenizeru
HTMLTokenizeru	constantsu
tokenTypesuobjectuHTMLSanitizerMixinu
HTMLSanitizer(((u7/tmp/pip-zej_zi-build/pip/_vendor/html5lib/sanitizer.pyu<module>s�python3.3/site-packages/pip/_vendor/html5lib/treeadapters/__pycache__/__init__.cpython-33.pyc000064400000000242151733566750026072 0ustar00�
7�Rec@sdS(N((((uC/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treeadapters/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/treeadapters/__pycache__/sax.cpython-33.pyc000064400000003631151733566750025133 0ustar00�
7�Re}c@s�ddlmZmZmZddlmZddlmZmZiZ	x6ej
�D](\ZZZ
edk	rUe
e	e<qUqUWdd�ZdS(i(uabsolute_importudivisionuunicode_literals(uAttributesNSImpli(uadjustForeignAttributesuunadjustForeignAttributescCs�|j�x*tj�D]\}}|j||�qWx|D]}|d}|dkr`q>q>|dkr�t|dt�}|j|d|df|d|�|dkrJ|j|d|df|d�qJq>|dkr	|j|d|df|d�q>|dkr)|j|d�q>|dkr8q>ds>t
d��q>Wx'tj�D]\}}|j|�q[W|j�d
S(u8Call SAX-like content handler based on treewalker walkerutypeuDoctypeuStartTaguEmptyTagudatau	namespaceunameuEndTagu
CharactersuSpaceCharactersuCommentuUnknown token typeN(uStartTaguEmptyTag(u
CharactersuSpaceCharactersF(
u
startDocumentuprefix_mappinguitemsustartPrefixMappinguAttributesNSImpluunadjustForeignAttributesustartElementNSuendElementNSu
charactersuFalseuAssertionErroruendPrefixMappinguendDocument(uwalkeruhandleruprefixu	namespaceutokenutypeuattrs((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treeadapters/sax.pyuto_sax
s6



	uto_saxN(u
__future__uabsolute_importudivisionuunicode_literalsuxml.sax.xmlreaderuAttributesNSImplu	constantsuadjustForeignAttributesuunadjustForeignAttributesuprefix_mappinguvaluesuprefixu	localNameu	namespaceuNoneuto_sax(((u>/tmp/pip-zej_zi-build/pip/_vendor/html5lib/treeadapters/sax.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/treeadapters/sax.py000064400000003175151733566750020655 0ustar00from __future__ import absolute_import, division, unicode_literals

from xml.sax.xmlreader import AttributesNSImpl

from ..constants import adjustForeignAttributes, unadjustForeignAttributes

prefix_mapping = {}
for prefix, localName, namespace in adjustForeignAttributes.values():
    if prefix is not None:
        prefix_mapping[prefix] = namespace


def to_sax(walker, handler):
    """Call SAX-like content handler based on treewalker walker"""
    handler.startDocument()
    for prefix, namespace in prefix_mapping.items():
        handler.startPrefixMapping(prefix, namespace)

    for token in walker:
        type = token["type"]
        if type == "Doctype":
            continue
        elif type in ("StartTag", "EmptyTag"):
            attrs = AttributesNSImpl(token["data"],
                                     unadjustForeignAttributes)
            handler.startElementNS((token["namespace"], token["name"]),
                                   token["name"],
                                   attrs)
            if type == "EmptyTag":
                handler.endElementNS((token["namespace"], token["name"]),
                                     token["name"])
        elif type == "EndTag":
            handler.endElementNS((token["namespace"], token["name"]),
                                 token["name"])
        elif type in ("Characters", "SpaceCharacters"):
            handler.characters(token["data"])
        elif type == "Comment":
            pass
        else:
            assert False, "Unknown token type"

    for prefix, namespace in prefix_mapping.items():
        handler.endPrefixMapping(prefix)
    handler.endDocument()
python3.3/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py000064400000000000151733566750021601 0ustar00python3.3/site-packages/pip/_vendor/html5lib/constants.py000064400000252462151733566750017420 0ustar00from __future__ import absolute_import, division, unicode_literals

import string
import gettext
_ = gettext.gettext

EOF = None

E = {
    "null-character":
        _("Null character in input stream, replaced with U+FFFD."),
    "invalid-codepoint":
        _("Invalid codepoint in stream."),
    "incorrectly-placed-solidus":
        _("Solidus (/) incorrectly placed in tag."),
    "incorrect-cr-newline-entity":
        _("Incorrect CR newline entity, replaced with LF."),
    "illegal-windows-1252-entity":
        _("Entity used with illegal number (windows-1252 reference)."),
    "cant-convert-numeric-entity":
        _("Numeric entity couldn't be converted to character "
          "(codepoint U+%(charAsInt)08x)."),
    "illegal-codepoint-for-numeric-entity":
        _("Numeric entity represents an illegal codepoint: "
          "U+%(charAsInt)08x."),
    "numeric-entity-without-semicolon":
        _("Numeric entity didn't end with ';'."),
    "expected-numeric-entity-but-got-eof":
        _("Numeric entity expected. Got end of file instead."),
    "expected-numeric-entity":
        _("Numeric entity expected but none found."),
    "named-entity-without-semicolon":
        _("Named entity didn't end with ';'."),
    "expected-named-entity":
        _("Named entity expected. Got none."),
    "attributes-in-end-tag":
        _("End tag contains unexpected attributes."),
    'self-closing-flag-on-end-tag':
        _("End tag contains unexpected self-closing flag."),
    "expected-tag-name-but-got-right-bracket":
        _("Expected tag name. Got '>' instead."),
    "expected-tag-name-but-got-question-mark":
        _("Expected tag name. Got '?' instead. (HTML doesn't "
          "support processing instructions.)"),
    "expected-tag-name":
        _("Expected tag name. Got something else instead"),
    "expected-closing-tag-but-got-right-bracket":
        _("Expected closing tag. Got '>' instead. Ignoring '</>'."),
    "expected-closing-tag-but-got-eof":
        _("Expected closing tag. Unexpected end of file."),
    "expected-closing-tag-but-got-char":
        _("Expected closing tag. Unexpected character '%(data)s' found."),
    "eof-in-tag-name":
        _("Unexpected end of file in the tag name."),
    "expected-attribute-name-but-got-eof":
        _("Unexpected end of file. Expected attribute name instead."),
    "eof-in-attribute-name":
        _("Unexpected end of file in attribute name."),
    "invalid-character-in-attribute-name":
        _("Invalid character in attribute name"),
    "duplicate-attribute":
        _("Dropped duplicate attribute on tag."),
    "expected-end-of-tag-name-but-got-eof":
        _("Unexpected end of file. Expected = or end of tag."),
    "expected-attribute-value-but-got-eof":
        _("Unexpected end of file. Expected attribute value."),
    "expected-attribute-value-but-got-right-bracket":
        _("Expected attribute value. Got '>' instead."),
    'equals-in-unquoted-attribute-value':
        _("Unexpected = in unquoted attribute"),
    'unexpected-character-in-unquoted-attribute-value':
        _("Unexpected character in unquoted attribute"),
    "invalid-character-after-attribute-name":
        _("Unexpected character after attribute name."),
    "unexpected-character-after-attribute-value":
        _("Unexpected character after attribute value."),
    "eof-in-attribute-value-double-quote":
        _("Unexpected end of file in attribute value (\")."),
    "eof-in-attribute-value-single-quote":
        _("Unexpected end of file in attribute value (')."),
    "eof-in-attribute-value-no-quotes":
        _("Unexpected end of file in attribute value."),
    "unexpected-EOF-after-solidus-in-tag":
        _("Unexpected end of file in tag. Expected >"),
    "unexpected-character-after-solidus-in-tag":
        _("Unexpected character after / in tag. Expected >"),
    "expected-dashes-or-doctype":
        _("Expected '--' or 'DOCTYPE'. Not found."),
    "unexpected-bang-after-double-dash-in-comment":
        _("Unexpected ! after -- in comment"),
    "unexpected-space-after-double-dash-in-comment":
        _("Unexpected space after -- in comment"),
    "incorrect-comment":
        _("Incorrect comment."),
    "eof-in-comment":
        _("Unexpected end of file in comment."),
    "eof-in-comment-end-dash":
        _("Unexpected end of file in comment (-)"),
    "unexpected-dash-after-double-dash-in-comment":
        _("Unexpected '-' after '--' found in comment."),
    "eof-in-comment-double-dash":
        _("Unexpected end of file in comment (--)."),
    "eof-in-comment-end-space-state":
        _("Unexpected end of file in comment."),
    "eof-in-comment-end-bang-state":
        _("Unexpected end of file in comment."),
    "unexpected-char-in-comment":
        _("Unexpected character in comment found."),
    "need-space-after-doctype":
        _("No space after literal string 'DOCTYPE'."),
    "expected-doctype-name-but-got-right-bracket":
        _("Unexpected > character. Expected DOCTYPE name."),
    "expected-doctype-name-but-got-eof":
        _("Unexpected end of file. Expected DOCTYPE name."),
    "eof-in-doctype-name":
        _("Unexpected end of file in DOCTYPE name."),
    "eof-in-doctype":
        _("Unexpected end of file in DOCTYPE."),
    "expected-space-or-right-bracket-in-doctype":
        _("Expected space or '>'. Got '%(data)s'"),
    "unexpected-end-of-doctype":
        _("Unexpected end of DOCTYPE."),
    "unexpected-char-in-doctype":
        _("Unexpected character in DOCTYPE."),
    "eof-in-innerhtml":
        _("XXX innerHTML EOF"),
    "unexpected-doctype":
        _("Unexpected DOCTYPE. Ignored."),
    "non-html-root":
        _("html needs to be the first start tag."),
    "expected-doctype-but-got-eof":
        _("Unexpected End of file. Expected DOCTYPE."),
    "unknown-doctype":
        _("Erroneous DOCTYPE."),
    "expected-doctype-but-got-chars":
        _("Unexpected non-space characters. Expected DOCTYPE."),
    "expected-doctype-but-got-start-tag":
        _("Unexpected start tag (%(name)s). Expected DOCTYPE."),
    "expected-doctype-but-got-end-tag":
        _("Unexpected end tag (%(name)s). Expected DOCTYPE."),
    "end-tag-after-implied-root":
        _("Unexpected end tag (%(name)s) after the (implied) root element."),
    "expected-named-closing-tag-but-got-eof":
        _("Unexpected end of file. Expected end tag (%(name)s)."),
    "two-heads-are-not-better-than-one":
        _("Unexpected start tag head in existing head. Ignored."),
    "unexpected-end-tag":
        _("Unexpected end tag (%(name)s). Ignored."),
    "unexpected-start-tag-out-of-my-head":
        _("Unexpected start tag (%(name)s) that can be in head. Moved."),
    "unexpected-start-tag":
        _("Unexpected start tag (%(name)s)."),
    "missing-end-tag":
        _("Missing end tag (%(name)s)."),
    "missing-end-tags":
        _("Missing end tags (%(name)s)."),
    "unexpected-start-tag-implies-end-tag":
        _("Unexpected start tag (%(startName)s) "
          "implies end tag (%(endName)s)."),
    "unexpected-start-tag-treated-as":
        _("Unexpected start tag (%(originalName)s). Treated as %(newName)s."),
    "deprecated-tag":
        _("Unexpected start tag %(name)s. Don't use it!"),
    "unexpected-start-tag-ignored":
        _("Unexpected start tag %(name)s. Ignored."),
    "expected-one-end-tag-but-got-another":
        _("Unexpected end tag (%(gotName)s). "
          "Missing end tag (%(expectedName)s)."),
    "end-tag-too-early":
        _("End tag (%(name)s) seen too early. Expected other end tag."),
    "end-tag-too-early-named":
        _("Unexpected end tag (%(gotName)s). Expected end tag (%(expectedName)s)."),
    "end-tag-too-early-ignored":
        _("End tag (%(name)s) seen too early. Ignored."),
    "adoption-agency-1.1":
        _("End tag (%(name)s) violates step 1, "
          "paragraph 1 of the adoption agency algorithm."),
    "adoption-agency-1.2":
        _("End tag (%(name)s) violates step 1, "
          "paragraph 2 of the adoption agency algorithm."),
    "adoption-agency-1.3":
        _("End tag (%(name)s) violates step 1, "
          "paragraph 3 of the adoption agency algorithm."),
    "adoption-agency-4.4":
        _("End tag (%(name)s) violates step 4, "
          "paragraph 4 of the adoption agency algorithm."),
    "unexpected-end-tag-treated-as":
        _("Unexpected end tag (%(originalName)s). Treated as %(newName)s."),
    "no-end-tag":
        _("This element (%(name)s) has no end tag."),
    "unexpected-implied-end-tag-in-table":
        _("Unexpected implied end tag (%(name)s) in the table phase."),
    "unexpected-implied-end-tag-in-table-body":
        _("Unexpected implied end tag (%(name)s) in the table body phase."),
    "unexpected-char-implies-table-voodoo":
        _("Unexpected non-space characters in "
          "table context caused voodoo mode."),
    "unexpected-hidden-input-in-table":
        _("Unexpected input with type hidden in table context."),
    "unexpected-form-in-table":
        _("Unexpected form in table context."),
    "unexpected-start-tag-implies-table-voodoo":
        _("Unexpected start tag (%(name)s) in "
          "table context caused voodoo mode."),
    "unexpected-end-tag-implies-table-voodoo":
        _("Unexpected end tag (%(name)s) in "
          "table context caused voodoo mode."),
    "unexpected-cell-in-table-body":
        _("Unexpected table cell start tag (%(name)s) "
          "in the table body phase."),
    "unexpected-cell-end-tag":
        _("Got table cell end tag (%(name)s) "
          "while required end tags are missing."),
    "unexpected-end-tag-in-table-body":
        _("Unexpected end tag (%(name)s) in the table body phase. Ignored."),
    "unexpected-implied-end-tag-in-table-row":
        _("Unexpected implied end tag (%(name)s) in the table row phase."),
    "unexpected-end-tag-in-table-row":
        _("Unexpected end tag (%(name)s) in the table row phase. Ignored."),
    "unexpected-select-in-select":
        _("Unexpected select start tag in the select phase "
          "treated as select end tag."),
    "unexpected-input-in-select":
        _("Unexpected input start tag in the select phase."),
    "unexpected-start-tag-in-select":
        _("Unexpected start tag token (%(name)s in the select phase. "
          "Ignored."),
    "unexpected-end-tag-in-select":
        _("Unexpected end tag (%(name)s) in the select phase. Ignored."),
    "unexpected-table-element-start-tag-in-select-in-table":
        _("Unexpected table element start tag (%(name)s) in the select in table phase."),
    "unexpected-table-element-end-tag-in-select-in-table":
        _("Unexpected table element end tag (%(name)s) in the select in table phase."),
    "unexpected-char-after-body":
        _("Unexpected non-space characters in the after body phase."),
    "unexpected-start-tag-after-body":
        _("Unexpected start tag token (%(name)s)"
          " in the after body phase."),
    "unexpected-end-tag-after-body":
        _("Unexpected end tag token (%(name)s)"
          " in the after body phase."),
    "unexpected-char-in-frameset":
        _("Unexpected characters in the frameset phase. Characters ignored."),
    "unexpected-start-tag-in-frameset":
        _("Unexpected start tag token (%(name)s)"
          " in the frameset phase. Ignored."),
    "unexpected-frameset-in-frameset-innerhtml":
        _("Unexpected end tag token (frameset) "
          "in the frameset phase (innerHTML)."),
    "unexpected-end-tag-in-frameset":
        _("Unexpected end tag token (%(name)s)"
          " in the frameset phase. Ignored."),
    "unexpected-char-after-frameset":
        _("Unexpected non-space characters in the "
          "after frameset phase. Ignored."),
    "unexpected-start-tag-after-frameset":
        _("Unexpected start tag (%(name)s)"
          " in the after frameset phase. Ignored."),
    "unexpected-end-tag-after-frameset":
        _("Unexpected end tag (%(name)s)"
          " in the after frameset phase. Ignored."),
    "unexpected-end-tag-after-body-innerhtml":
        _("Unexpected end tag after body(innerHtml)"),
    "expected-eof-but-got-char":
        _("Unexpected non-space characters. Expected end of file."),
    "expected-eof-but-got-start-tag":
        _("Unexpected start tag (%(name)s)"
          ". Expected end of file."),
    "expected-eof-but-got-end-tag":
        _("Unexpected end tag (%(name)s)"
          ". Expected end of file."),
    "eof-in-table":
        _("Unexpected end of file. Expected table content."),
    "eof-in-select":
        _("Unexpected end of file. Expected select content."),
    "eof-in-frameset":
        _("Unexpected end of file. Expected frameset content."),
    "eof-in-script-in-script":
        _("Unexpected end of file. Expected script content."),
    "eof-in-foreign-lands":
        _("Unexpected end of file. Expected foreign content"),
    "non-void-element-with-trailing-solidus":
        _("Trailing solidus not allowed on element %(name)s"),
    "unexpected-html-element-in-foreign-content":
        _("Element %(name)s not allowed in a non-html context"),
    "unexpected-end-tag-before-html":
        _("Unexpected end tag (%(name)s) before html."),
    "XXX-undefined-error":
        _("Undefined error (this sucks and should be fixed)"),
}

namespaces = {
    "html": "http://www.w3.org/1999/xhtml",
    "mathml": "http://www.w3.org/1998/Math/MathML",
    "svg": "http://www.w3.org/2000/svg",
    "xlink": "http://www.w3.org/1999/xlink",
    "xml": "http://www.w3.org/XML/1998/namespace",
    "xmlns": "http://www.w3.org/2000/xmlns/"
}

scopingElements = frozenset((
    (namespaces["html"], "applet"),
    (namespaces["html"], "caption"),
    (namespaces["html"], "html"),
    (namespaces["html"], "marquee"),
    (namespaces["html"], "object"),
    (namespaces["html"], "table"),
    (namespaces["html"], "td"),
    (namespaces["html"], "th"),
    (namespaces["mathml"], "mi"),
    (namespaces["mathml"], "mo"),
    (namespaces["mathml"], "mn"),
    (namespaces["mathml"], "ms"),
    (namespaces["mathml"], "mtext"),
    (namespaces["mathml"], "annotation-xml"),
    (namespaces["svg"], "foreignObject"),
    (namespaces["svg"], "desc"),
    (namespaces["svg"], "title"),
))

formattingElements = frozenset((
    (namespaces["html"], "a"),
    (namespaces["html"], "b"),
    (namespaces["html"], "big"),
    (namespaces["html"], "code"),
    (namespaces["html"], "em"),
    (namespaces["html"], "font"),
    (namespaces["html"], "i"),
    (namespaces["html"], "nobr"),
    (namespaces["html"], "s"),
    (namespaces["html"], "small"),
    (namespaces["html"], "strike"),
    (namespaces["html"], "strong"),
    (namespaces["html"], "tt"),
    (namespaces["html"], "u")
))

specialElements = frozenset((
    (namespaces["html"], "address"),
    (namespaces["html"], "applet"),
    (namespaces["html"], "area"),
    (namespaces["html"], "article"),
    (namespaces["html"], "aside"),
    (namespaces["html"], "base"),
    (namespaces["html"], "basefont"),
    (namespaces["html"], "bgsound"),
    (namespaces["html"], "blockquote"),
    (namespaces["html"], "body"),
    (namespaces["html"], "br"),
    (namespaces["html"], "button"),
    (namespaces["html"], "caption"),
    (namespaces["html"], "center"),
    (namespaces["html"], "col"),
    (namespaces["html"], "colgroup"),
    (namespaces["html"], "command"),
    (namespaces["html"], "dd"),
    (namespaces["html"], "details"),
    (namespaces["html"], "dir"),
    (namespaces["html"], "div"),
    (namespaces["html"], "dl"),
    (namespaces["html"], "dt"),
    (namespaces["html"], "embed"),
    (namespaces["html"], "fieldset"),
    (namespaces["html"], "figure"),
    (namespaces["html"], "footer"),
    (namespaces["html"], "form"),
    (namespaces["html"], "frame"),
    (namespaces["html"], "frameset"),
    (namespaces["html"], "h1"),
    (namespaces["html"], "h2"),
    (namespaces["html"], "h3"),
    (namespaces["html"], "h4"),
    (namespaces["html"], "h5"),
    (namespaces["html"], "h6"),
    (namespaces["html"], "head"),
    (namespaces["html"], "header"),
    (namespaces["html"], "hr"),
    (namespaces["html"], "html"),
    (namespaces["html"], "iframe"),
    # Note that image is commented out in the spec as "this isn't an
    # element that can end up on the stack, so it doesn't matter,"
    (namespaces["html"], "image"),
    (namespaces["html"], "img"),
    (namespaces["html"], "input"),
    (namespaces["html"], "isindex"),
    (namespaces["html"], "li"),
    (namespaces["html"], "link"),
    (namespaces["html"], "listing"),
    (namespaces["html"], "marquee"),
    (namespaces["html"], "menu"),
    (namespaces["html"], "meta"),
    (namespaces["html"], "nav"),
    (namespaces["html"], "noembed"),
    (namespaces["html"], "noframes"),
    (namespaces["html"], "noscript"),
    (namespaces["html"], "object"),
    (namespaces["html"], "ol"),
    (namespaces["html"], "p"),
    (namespaces["html"], "param"),
    (namespaces["html"], "plaintext"),
    (namespaces["html"], "pre"),
    (namespaces["html"], "script"),
    (namespaces["html"], "section"),
    (namespaces["html"], "select"),
    (namespaces["html"], "style"),
    (namespaces["html"], "table"),
    (namespaces["html"], "tbody"),
    (namespaces["html"], "td"),
    (namespaces["html"], "textarea"),
    (namespaces["html"], "tfoot"),
    (namespaces["html"], "th"),
    (namespaces["html"], "thead"),
    (namespaces["html"], "title"),
    (namespaces["html"], "tr"),
    (namespaces["html"], "ul"),
    (namespaces["html"], "wbr"),
    (namespaces["html"], "xmp"),
    (namespaces["svg"], "foreignObject")
))

htmlIntegrationPointElements = frozenset((
    (namespaces["mathml"], "annotaion-xml"),
    (namespaces["svg"], "foreignObject"),
    (namespaces["svg"], "desc"),
    (namespaces["svg"], "title")
))

mathmlTextIntegrationPointElements = frozenset((
    (namespaces["mathml"], "mi"),
    (namespaces["mathml"], "mo"),
    (namespaces["mathml"], "mn"),
    (namespaces["mathml"], "ms"),
    (namespaces["mathml"], "mtext")
))

adjustForeignAttributes = {
    "xlink:actuate": ("xlink", "actuate", namespaces["xlink"]),
    "xlink:arcrole": ("xlink", "arcrole", namespaces["xlink"]),
    "xlink:href": ("xlink", "href", namespaces["xlink"]),
    "xlink:role": ("xlink", "role", namespaces["xlink"]),
    "xlink:show": ("xlink", "show", namespaces["xlink"]),
    "xlink:title": ("xlink", "title", namespaces["xlink"]),
    "xlink:type": ("xlink", "type", namespaces["xlink"]),
    "xml:base": ("xml", "base", namespaces["xml"]),
    "xml:lang": ("xml", "lang", namespaces["xml"]),
    "xml:space": ("xml", "space", namespaces["xml"]),
    "xmlns": (None, "xmlns", namespaces["xmlns"]),
    "xmlns:xlink": ("xmlns", "xlink", namespaces["xmlns"])
}

unadjustForeignAttributes = dict([((ns, local), qname) for qname, (prefix, local, ns) in
                                  adjustForeignAttributes.items()])

spaceCharacters = frozenset((
    "\t",
    "\n",
    "\u000C",
    " ",
    "\r"
))

tableInsertModeElements = frozenset((
    "table",
    "tbody",
    "tfoot",
    "thead",
    "tr"
))

asciiLowercase = frozenset(string.ascii_lowercase)
asciiUppercase = frozenset(string.ascii_uppercase)
asciiLetters = frozenset(string.ascii_letters)
digits = frozenset(string.digits)
hexDigits = frozenset(string.hexdigits)

asciiUpper2Lower = dict([(ord(c), ord(c.lower()))
                         for c in string.ascii_uppercase])

# Heading elements need to be ordered
headingElements = (
    "h1",
    "h2",
    "h3",
    "h4",
    "h5",
    "h6"
)

voidElements = frozenset((
    "base",
    "command",
    "event-source",
    "link",
    "meta",
    "hr",
    "br",
    "img",
    "embed",
    "param",
    "area",
    "col",
    "input",
    "source",
    "track"
))

cdataElements = frozenset(('title', 'textarea'))

rcdataElements = frozenset((
    'style',
    'script',
    'xmp',
    'iframe',
    'noembed',
    'noframes',
    'noscript'
))

booleanAttributes = {
    "": frozenset(("irrelevant",)),
    "style": frozenset(("scoped",)),
    "img": frozenset(("ismap",)),
    "audio": frozenset(("autoplay", "controls")),
    "video": frozenset(("autoplay", "controls")),
    "script": frozenset(("defer", "async")),
    "details": frozenset(("open",)),
    "datagrid": frozenset(("multiple", "disabled")),
    "command": frozenset(("hidden", "disabled", "checked", "default")),
    "hr": frozenset(("noshade")),
    "menu": frozenset(("autosubmit",)),
    "fieldset": frozenset(("disabled", "readonly")),
    "option": frozenset(("disabled", "readonly", "selected")),
    "optgroup": frozenset(("disabled", "readonly")),
    "button": frozenset(("disabled", "autofocus")),
    "input": frozenset(("disabled", "readonly", "required", "autofocus", "checked", "ismap")),
    "select": frozenset(("disabled", "readonly", "autofocus", "multiple")),
    "output": frozenset(("disabled", "readonly")),
}

# entitiesWindows1252 has to be _ordered_ and needs to have an index. It
# therefore can't be a frozenset.
entitiesWindows1252 = (
    8364,   # 0x80  0x20AC  EURO SIGN
    65533,  # 0x81          UNDEFINED
    8218,   # 0x82  0x201A  SINGLE LOW-9 QUOTATION MARK
    402,    # 0x83  0x0192  LATIN SMALL LETTER F WITH HOOK
    8222,   # 0x84  0x201E  DOUBLE LOW-9 QUOTATION MARK
    8230,   # 0x85  0x2026  HORIZONTAL ELLIPSIS
    8224,   # 0x86  0x2020  DAGGER
    8225,   # 0x87  0x2021  DOUBLE DAGGER
    710,    # 0x88  0x02C6  MODIFIER LETTER CIRCUMFLEX ACCENT
    8240,   # 0x89  0x2030  PER MILLE SIGN
    352,    # 0x8A  0x0160  LATIN CAPITAL LETTER S WITH CARON
    8249,   # 0x8B  0x2039  SINGLE LEFT-POINTING ANGLE QUOTATION MARK
    338,    # 0x8C  0x0152  LATIN CAPITAL LIGATURE OE
    65533,  # 0x8D          UNDEFINED
    381,    # 0x8E  0x017D  LATIN CAPITAL LETTER Z WITH CARON
    65533,  # 0x8F          UNDEFINED
    65533,  # 0x90          UNDEFINED
    8216,   # 0x91  0x2018  LEFT SINGLE QUOTATION MARK
    8217,   # 0x92  0x2019  RIGHT SINGLE QUOTATION MARK
    8220,   # 0x93  0x201C  LEFT DOUBLE QUOTATION MARK
    8221,   # 0x94  0x201D  RIGHT DOUBLE QUOTATION MARK
    8226,   # 0x95  0x2022  BULLET
    8211,   # 0x96  0x2013  EN DASH
    8212,   # 0x97  0x2014  EM DASH
    732,    # 0x98  0x02DC  SMALL TILDE
    8482,   # 0x99  0x2122  TRADE MARK SIGN
    353,    # 0x9A  0x0161  LATIN SMALL LETTER S WITH CARON
    8250,   # 0x9B  0x203A  SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
    339,    # 0x9C  0x0153  LATIN SMALL LIGATURE OE
    65533,  # 0x9D          UNDEFINED
    382,    # 0x9E  0x017E  LATIN SMALL LETTER Z WITH CARON
    376     # 0x9F  0x0178  LATIN CAPITAL LETTER Y WITH DIAERESIS
)

xmlEntities = frozenset(('lt;', 'gt;', 'amp;', 'apos;', 'quot;'))

entities = {
    "AElig": "\xc6",
    "AElig;": "\xc6",
    "AMP": "&",
    "AMP;": "&",
    "Aacute": "\xc1",
    "Aacute;": "\xc1",
    "Abreve;": "\u0102",
    "Acirc": "\xc2",
    "Acirc;": "\xc2",
    "Acy;": "\u0410",
    "Afr;": "\U0001d504",
    "Agrave": "\xc0",
    "Agrave;": "\xc0",
    "Alpha;": "\u0391",
    "Amacr;": "\u0100",
    "And;": "\u2a53",
    "Aogon;": "\u0104",
    "Aopf;": "\U0001d538",
    "ApplyFunction;": "\u2061",
    "Aring": "\xc5",
    "Aring;": "\xc5",
    "Ascr;": "\U0001d49c",
    "Assign;": "\u2254",
    "Atilde": "\xc3",
    "Atilde;": "\xc3",
    "Auml": "\xc4",
    "Auml;": "\xc4",
    "Backslash;": "\u2216",
    "Barv;": "\u2ae7",
    "Barwed;": "\u2306",
    "Bcy;": "\u0411",
    "Because;": "\u2235",
    "Bernoullis;": "\u212c",
    "Beta;": "\u0392",
    "Bfr;": "\U0001d505",
    "Bopf;": "\U0001d539",
    "Breve;": "\u02d8",
    "Bscr;": "\u212c",
    "Bumpeq;": "\u224e",
    "CHcy;": "\u0427",
    "COPY": "\xa9",
    "COPY;": "\xa9",
    "Cacute;": "\u0106",
    "Cap;": "\u22d2",
    "CapitalDifferentialD;": "\u2145",
    "Cayleys;": "\u212d",
    "Ccaron;": "\u010c",
    "Ccedil": "\xc7",
    "Ccedil;": "\xc7",
    "Ccirc;": "\u0108",
    "Cconint;": "\u2230",
    "Cdot;": "\u010a",
    "Cedilla;": "\xb8",
    "CenterDot;": "\xb7",
    "Cfr;": "\u212d",
    "Chi;": "\u03a7",
    "CircleDot;": "\u2299",
    "CircleMinus;": "\u2296",
    "CirclePlus;": "\u2295",
    "CircleTimes;": "\u2297",
    "ClockwiseContourIntegral;": "\u2232",
    "CloseCurlyDoubleQuote;": "\u201d",
    "CloseCurlyQuote;": "\u2019",
    "Colon;": "\u2237",
    "Colone;": "\u2a74",
    "Congruent;": "\u2261",
    "Conint;": "\u222f",
    "ContourIntegral;": "\u222e",
    "Copf;": "\u2102",
    "Coproduct;": "\u2210",
    "CounterClockwiseContourIntegral;": "\u2233",
    "Cross;": "\u2a2f",
    "Cscr;": "\U0001d49e",
    "Cup;": "\u22d3",
    "CupCap;": "\u224d",
    "DD;": "\u2145",
    "DDotrahd;": "\u2911",
    "DJcy;": "\u0402",
    "DScy;": "\u0405",
    "DZcy;": "\u040f",
    "Dagger;": "\u2021",
    "Darr;": "\u21a1",
    "Dashv;": "\u2ae4",
    "Dcaron;": "\u010e",
    "Dcy;": "\u0414",
    "Del;": "\u2207",
    "Delta;": "\u0394",
    "Dfr;": "\U0001d507",
    "DiacriticalAcute;": "\xb4",
    "DiacriticalDot;": "\u02d9",
    "DiacriticalDoubleAcute;": "\u02dd",
    "DiacriticalGrave;": "`",
    "DiacriticalTilde;": "\u02dc",
    "Diamond;": "\u22c4",
    "DifferentialD;": "\u2146",
    "Dopf;": "\U0001d53b",
    "Dot;": "\xa8",
    "DotDot;": "\u20dc",
    "DotEqual;": "\u2250",
    "DoubleContourIntegral;": "\u222f",
    "DoubleDot;": "\xa8",
    "DoubleDownArrow;": "\u21d3",
    "DoubleLeftArrow;": "\u21d0",
    "DoubleLeftRightArrow;": "\u21d4",
    "DoubleLeftTee;": "\u2ae4",
    "DoubleLongLeftArrow;": "\u27f8",
    "DoubleLongLeftRightArrow;": "\u27fa",
    "DoubleLongRightArrow;": "\u27f9",
    "DoubleRightArrow;": "\u21d2",
    "DoubleRightTee;": "\u22a8",
    "DoubleUpArrow;": "\u21d1",
    "DoubleUpDownArrow;": "\u21d5",
    "DoubleVerticalBar;": "\u2225",
    "DownArrow;": "\u2193",
    "DownArrowBar;": "\u2913",
    "DownArrowUpArrow;": "\u21f5",
    "DownBreve;": "\u0311",
    "DownLeftRightVector;": "\u2950",
    "DownLeftTeeVector;": "\u295e",
    "DownLeftVector;": "\u21bd",
    "DownLeftVectorBar;": "\u2956",
    "DownRightTeeVector;": "\u295f",
    "DownRightVector;": "\u21c1",
    "DownRightVectorBar;": "\u2957",
    "DownTee;": "\u22a4",
    "DownTeeArrow;": "\u21a7",
    "Downarrow;": "\u21d3",
    "Dscr;": "\U0001d49f",
    "Dstrok;": "\u0110",
    "ENG;": "\u014a",
    "ETH": "\xd0",
    "ETH;": "\xd0",
    "Eacute": "\xc9",
    "Eacute;": "\xc9",
    "Ecaron;": "\u011a",
    "Ecirc": "\xca",
    "Ecirc;": "\xca",
    "Ecy;": "\u042d",
    "Edot;": "\u0116",
    "Efr;": "\U0001d508",
    "Egrave": "\xc8",
    "Egrave;": "\xc8",
    "Element;": "\u2208",
    "Emacr;": "\u0112",
    "EmptySmallSquare;": "\u25fb",
    "EmptyVerySmallSquare;": "\u25ab",
    "Eogon;": "\u0118",
    "Eopf;": "\U0001d53c",
    "Epsilon;": "\u0395",
    "Equal;": "\u2a75",
    "EqualTilde;": "\u2242",
    "Equilibrium;": "\u21cc",
    "Escr;": "\u2130",
    "Esim;": "\u2a73",
    "Eta;": "\u0397",
    "Euml": "\xcb",
    "Euml;": "\xcb",
    "Exists;": "\u2203",
    "ExponentialE;": "\u2147",
    "Fcy;": "\u0424",
    "Ffr;": "\U0001d509",
    "FilledSmallSquare;": "\u25fc",
    "FilledVerySmallSquare;": "\u25aa",
    "Fopf;": "\U0001d53d",
    "ForAll;": "\u2200",
    "Fouriertrf;": "\u2131",
    "Fscr;": "\u2131",
    "GJcy;": "\u0403",
    "GT": ">",
    "GT;": ">",
    "Gamma;": "\u0393",
    "Gammad;": "\u03dc",
    "Gbreve;": "\u011e",
    "Gcedil;": "\u0122",
    "Gcirc;": "\u011c",
    "Gcy;": "\u0413",
    "Gdot;": "\u0120",
    "Gfr;": "\U0001d50a",
    "Gg;": "\u22d9",
    "Gopf;": "\U0001d53e",
    "GreaterEqual;": "\u2265",
    "GreaterEqualLess;": "\u22db",
    "GreaterFullEqual;": "\u2267",
    "GreaterGreater;": "\u2aa2",
    "GreaterLess;": "\u2277",
    "GreaterSlantEqual;": "\u2a7e",
    "GreaterTilde;": "\u2273",
    "Gscr;": "\U0001d4a2",
    "Gt;": "\u226b",
    "HARDcy;": "\u042a",
    "Hacek;": "\u02c7",
    "Hat;": "^",
    "Hcirc;": "\u0124",
    "Hfr;": "\u210c",
    "HilbertSpace;": "\u210b",
    "Hopf;": "\u210d",
    "HorizontalLine;": "\u2500",
    "Hscr;": "\u210b",
    "Hstrok;": "\u0126",
    "HumpDownHump;": "\u224e",
    "HumpEqual;": "\u224f",
    "IEcy;": "\u0415",
    "IJlig;": "\u0132",
    "IOcy;": "\u0401",
    "Iacute": "\xcd",
    "Iacute;": "\xcd",
    "Icirc": "\xce",
    "Icirc;": "\xce",
    "Icy;": "\u0418",
    "Idot;": "\u0130",
    "Ifr;": "\u2111",
    "Igrave": "\xcc",
    "Igrave;": "\xcc",
    "Im;": "\u2111",
    "Imacr;": "\u012a",
    "ImaginaryI;": "\u2148",
    "Implies;": "\u21d2",
    "Int;": "\u222c",
    "Integral;": "\u222b",
    "Intersection;": "\u22c2",
    "InvisibleComma;": "\u2063",
    "InvisibleTimes;": "\u2062",
    "Iogon;": "\u012e",
    "Iopf;": "\U0001d540",
    "Iota;": "\u0399",
    "Iscr;": "\u2110",
    "Itilde;": "\u0128",
    "Iukcy;": "\u0406",
    "Iuml": "\xcf",
    "Iuml;": "\xcf",
    "Jcirc;": "\u0134",
    "Jcy;": "\u0419",
    "Jfr;": "\U0001d50d",
    "Jopf;": "\U0001d541",
    "Jscr;": "\U0001d4a5",
    "Jsercy;": "\u0408",
    "Jukcy;": "\u0404",
    "KHcy;": "\u0425",
    "KJcy;": "\u040c",
    "Kappa;": "\u039a",
    "Kcedil;": "\u0136",
    "Kcy;": "\u041a",
    "Kfr;": "\U0001d50e",
    "Kopf;": "\U0001d542",
    "Kscr;": "\U0001d4a6",
    "LJcy;": "\u0409",
    "LT": "<",
    "LT;": "<",
    "Lacute;": "\u0139",
    "Lambda;": "\u039b",
    "Lang;": "\u27ea",
    "Laplacetrf;": "\u2112",
    "Larr;": "\u219e",
    "Lcaron;": "\u013d",
    "Lcedil;": "\u013b",
    "Lcy;": "\u041b",
    "LeftAngleBracket;": "\u27e8",
    "LeftArrow;": "\u2190",
    "LeftArrowBar;": "\u21e4",
    "LeftArrowRightArrow;": "\u21c6",
    "LeftCeiling;": "\u2308",
    "LeftDoubleBracket;": "\u27e6",
    "LeftDownTeeVector;": "\u2961",
    "LeftDownVector;": "\u21c3",
    "LeftDownVectorBar;": "\u2959",
    "LeftFloor;": "\u230a",
    "LeftRightArrow;": "\u2194",
    "LeftRightVector;": "\u294e",
    "LeftTee;": "\u22a3",
    "LeftTeeArrow;": "\u21a4",
    "LeftTeeVector;": "\u295a",
    "LeftTriangle;": "\u22b2",
    "LeftTriangleBar;": "\u29cf",
    "LeftTriangleEqual;": "\u22b4",
    "LeftUpDownVector;": "\u2951",
    "LeftUpTeeVector;": "\u2960",
    "LeftUpVector;": "\u21bf",
    "LeftUpVectorBar;": "\u2958",
    "LeftVector;": "\u21bc",
    "LeftVectorBar;": "\u2952",
    "Leftarrow;": "\u21d0",
    "Leftrightarrow;": "\u21d4",
    "LessEqualGreater;": "\u22da",
    "LessFullEqual;": "\u2266",
    "LessGreater;": "\u2276",
    "LessLess;": "\u2aa1",
    "LessSlantEqual;": "\u2a7d",
    "LessTilde;": "\u2272",
    "Lfr;": "\U0001d50f",
    "Ll;": "\u22d8",
    "Lleftarrow;": "\u21da",
    "Lmidot;": "\u013f",
    "LongLeftArrow;": "\u27f5",
    "LongLeftRightArrow;": "\u27f7",
    "LongRightArrow;": "\u27f6",
    "Longleftarrow;": "\u27f8",
    "Longleftrightarrow;": "\u27fa",
    "Longrightarrow;": "\u27f9",
    "Lopf;": "\U0001d543",
    "LowerLeftArrow;": "\u2199",
    "LowerRightArrow;": "\u2198",
    "Lscr;": "\u2112",
    "Lsh;": "\u21b0",
    "Lstrok;": "\u0141",
    "Lt;": "\u226a",
    "Map;": "\u2905",
    "Mcy;": "\u041c",
    "MediumSpace;": "\u205f",
    "Mellintrf;": "\u2133",
    "Mfr;": "\U0001d510",
    "MinusPlus;": "\u2213",
    "Mopf;": "\U0001d544",
    "Mscr;": "\u2133",
    "Mu;": "\u039c",
    "NJcy;": "\u040a",
    "Nacute;": "\u0143",
    "Ncaron;": "\u0147",
    "Ncedil;": "\u0145",
    "Ncy;": "\u041d",
    "NegativeMediumSpace;": "\u200b",
    "NegativeThickSpace;": "\u200b",
    "NegativeThinSpace;": "\u200b",
    "NegativeVeryThinSpace;": "\u200b",
    "NestedGreaterGreater;": "\u226b",
    "NestedLessLess;": "\u226a",
    "NewLine;": "\n",
    "Nfr;": "\U0001d511",
    "NoBreak;": "\u2060",
    "NonBreakingSpace;": "\xa0",
    "Nopf;": "\u2115",
    "Not;": "\u2aec",
    "NotCongruent;": "\u2262",
    "NotCupCap;": "\u226d",
    "NotDoubleVerticalBar;": "\u2226",
    "NotElement;": "\u2209",
    "NotEqual;": "\u2260",
    "NotEqualTilde;": "\u2242\u0338",
    "NotExists;": "\u2204",
    "NotGreater;": "\u226f",
    "NotGreaterEqual;": "\u2271",
    "NotGreaterFullEqual;": "\u2267\u0338",
    "NotGreaterGreater;": "\u226b\u0338",
    "NotGreaterLess;": "\u2279",
    "NotGreaterSlantEqual;": "\u2a7e\u0338",
    "NotGreaterTilde;": "\u2275",
    "NotHumpDownHump;": "\u224e\u0338",
    "NotHumpEqual;": "\u224f\u0338",
    "NotLeftTriangle;": "\u22ea",
    "NotLeftTriangleBar;": "\u29cf\u0338",
    "NotLeftTriangleEqual;": "\u22ec",
    "NotLess;": "\u226e",
    "NotLessEqual;": "\u2270",
    "NotLessGreater;": "\u2278",
    "NotLessLess;": "\u226a\u0338",
    "NotLessSlantEqual;": "\u2a7d\u0338",
    "NotLessTilde;": "\u2274",
    "NotNestedGreaterGreater;": "\u2aa2\u0338",
    "NotNestedLessLess;": "\u2aa1\u0338",
    "NotPrecedes;": "\u2280",
    "NotPrecedesEqual;": "\u2aaf\u0338",
    "NotPrecedesSlantEqual;": "\u22e0",
    "NotReverseElement;": "\u220c",
    "NotRightTriangle;": "\u22eb",
    "NotRightTriangleBar;": "\u29d0\u0338",
    "NotRightTriangleEqual;": "\u22ed",
    "NotSquareSubset;": "\u228f\u0338",
    "NotSquareSubsetEqual;": "\u22e2",
    "NotSquareSuperset;": "\u2290\u0338",
    "NotSquareSupersetEqual;": "\u22e3",
    "NotSubset;": "\u2282\u20d2",
    "NotSubsetEqual;": "\u2288",
    "NotSucceeds;": "\u2281",
    "NotSucceedsEqual;": "\u2ab0\u0338",
    "NotSucceedsSlantEqual;": "\u22e1",
    "NotSucceedsTilde;": "\u227f\u0338",
    "NotSuperset;": "\u2283\u20d2",
    "NotSupersetEqual;": "\u2289",
    "NotTilde;": "\u2241",
    "NotTildeEqual;": "\u2244",
    "NotTildeFullEqual;": "\u2247",
    "NotTildeTilde;": "\u2249",
    "NotVerticalBar;": "\u2224",
    "Nscr;": "\U0001d4a9",
    "Ntilde": "\xd1",
    "Ntilde;": "\xd1",
    "Nu;": "\u039d",
    "OElig;": "\u0152",
    "Oacute": "\xd3",
    "Oacute;": "\xd3",
    "Ocirc": "\xd4",
    "Ocirc;": "\xd4",
    "Ocy;": "\u041e",
    "Odblac;": "\u0150",
    "Ofr;": "\U0001d512",
    "Ograve": "\xd2",
    "Ograve;": "\xd2",
    "Omacr;": "\u014c",
    "Omega;": "\u03a9",
    "Omicron;": "\u039f",
    "Oopf;": "\U0001d546",
    "OpenCurlyDoubleQuote;": "\u201c",
    "OpenCurlyQuote;": "\u2018",
    "Or;": "\u2a54",
    "Oscr;": "\U0001d4aa",
    "Oslash": "\xd8",
    "Oslash;": "\xd8",
    "Otilde": "\xd5",
    "Otilde;": "\xd5",
    "Otimes;": "\u2a37",
    "Ouml": "\xd6",
    "Ouml;": "\xd6",
    "OverBar;": "\u203e",
    "OverBrace;": "\u23de",
    "OverBracket;": "\u23b4",
    "OverParenthesis;": "\u23dc",
    "PartialD;": "\u2202",
    "Pcy;": "\u041f",
    "Pfr;": "\U0001d513",
    "Phi;": "\u03a6",
    "Pi;": "\u03a0",
    "PlusMinus;": "\xb1",
    "Poincareplane;": "\u210c",
    "Popf;": "\u2119",
    "Pr;": "\u2abb",
    "Precedes;": "\u227a",
    "PrecedesEqual;": "\u2aaf",
    "PrecedesSlantEqual;": "\u227c",
    "PrecedesTilde;": "\u227e",
    "Prime;": "\u2033",
    "Product;": "\u220f",
    "Proportion;": "\u2237",
    "Proportional;": "\u221d",
    "Pscr;": "\U0001d4ab",
    "Psi;": "\u03a8",
    "QUOT": "\"",
    "QUOT;": "\"",
    "Qfr;": "\U0001d514",
    "Qopf;": "\u211a",
    "Qscr;": "\U0001d4ac",
    "RBarr;": "\u2910",
    "REG": "\xae",
    "REG;": "\xae",
    "Racute;": "\u0154",
    "Rang;": "\u27eb",
    "Rarr;": "\u21a0",
    "Rarrtl;": "\u2916",
    "Rcaron;": "\u0158",
    "Rcedil;": "\u0156",
    "Rcy;": "\u0420",
    "Re;": "\u211c",
    "ReverseElement;": "\u220b",
    "ReverseEquilibrium;": "\u21cb",
    "ReverseUpEquilibrium;": "\u296f",
    "Rfr;": "\u211c",
    "Rho;": "\u03a1",
    "RightAngleBracket;": "\u27e9",
    "RightArrow;": "\u2192",
    "RightArrowBar;": "\u21e5",
    "RightArrowLeftArrow;": "\u21c4",
    "RightCeiling;": "\u2309",
    "RightDoubleBracket;": "\u27e7",
    "RightDownTeeVector;": "\u295d",
    "RightDownVector;": "\u21c2",
    "RightDownVectorBar;": "\u2955",
    "RightFloor;": "\u230b",
    "RightTee;": "\u22a2",
    "RightTeeArrow;": "\u21a6",
    "RightTeeVector;": "\u295b",
    "RightTriangle;": "\u22b3",
    "RightTriangleBar;": "\u29d0",
    "RightTriangleEqual;": "\u22b5",
    "RightUpDownVector;": "\u294f",
    "RightUpTeeVector;": "\u295c",
    "RightUpVector;": "\u21be",
    "RightUpVectorBar;": "\u2954",
    "RightVector;": "\u21c0",
    "RightVectorBar;": "\u2953",
    "Rightarrow;": "\u21d2",
    "Ropf;": "\u211d",
    "RoundImplies;": "\u2970",
    "Rrightarrow;": "\u21db",
    "Rscr;": "\u211b",
    "Rsh;": "\u21b1",
    "RuleDelayed;": "\u29f4",
    "SHCHcy;": "\u0429",
    "SHcy;": "\u0428",
    "SOFTcy;": "\u042c",
    "Sacute;": "\u015a",
    "Sc;": "\u2abc",
    "Scaron;": "\u0160",
    "Scedil;": "\u015e",
    "Scirc;": "\u015c",
    "Scy;": "\u0421",
    "Sfr;": "\U0001d516",
    "ShortDownArrow;": "\u2193",
    "ShortLeftArrow;": "\u2190",
    "ShortRightArrow;": "\u2192",
    "ShortUpArrow;": "\u2191",
    "Sigma;": "\u03a3",
    "SmallCircle;": "\u2218",
    "Sopf;": "\U0001d54a",
    "Sqrt;": "\u221a",
    "Square;": "\u25a1",
    "SquareIntersection;": "\u2293",
    "SquareSubset;": "\u228f",
    "SquareSubsetEqual;": "\u2291",
    "SquareSuperset;": "\u2290",
    "SquareSupersetEqual;": "\u2292",
    "SquareUnion;": "\u2294",
    "Sscr;": "\U0001d4ae",
    "Star;": "\u22c6",
    "Sub;": "\u22d0",
    "Subset;": "\u22d0",
    "SubsetEqual;": "\u2286",
    "Succeeds;": "\u227b",
    "SucceedsEqual;": "\u2ab0",
    "SucceedsSlantEqual;": "\u227d",
    "SucceedsTilde;": "\u227f",
    "SuchThat;": "\u220b",
    "Sum;": "\u2211",
    "Sup;": "\u22d1",
    "Superset;": "\u2283",
    "SupersetEqual;": "\u2287",
    "Supset;": "\u22d1",
    "THORN": "\xde",
    "THORN;": "\xde",
    "TRADE;": "\u2122",
    "TSHcy;": "\u040b",
    "TScy;": "\u0426",
    "Tab;": "\t",
    "Tau;": "\u03a4",
    "Tcaron;": "\u0164",
    "Tcedil;": "\u0162",
    "Tcy;": "\u0422",
    "Tfr;": "\U0001d517",
    "Therefore;": "\u2234",
    "Theta;": "\u0398",
    "ThickSpace;": "\u205f\u200a",
    "ThinSpace;": "\u2009",
    "Tilde;": "\u223c",
    "TildeEqual;": "\u2243",
    "TildeFullEqual;": "\u2245",
    "TildeTilde;": "\u2248",
    "Topf;": "\U0001d54b",
    "TripleDot;": "\u20db",
    "Tscr;": "\U0001d4af",
    "Tstrok;": "\u0166",
    "Uacute": "\xda",
    "Uacute;": "\xda",
    "Uarr;": "\u219f",
    "Uarrocir;": "\u2949",
    "Ubrcy;": "\u040e",
    "Ubreve;": "\u016c",
    "Ucirc": "\xdb",
    "Ucirc;": "\xdb",
    "Ucy;": "\u0423",
    "Udblac;": "\u0170",
    "Ufr;": "\U0001d518",
    "Ugrave": "\xd9",
    "Ugrave;": "\xd9",
    "Umacr;": "\u016a",
    "UnderBar;": "_",
    "UnderBrace;": "\u23df",
    "UnderBracket;": "\u23b5",
    "UnderParenthesis;": "\u23dd",
    "Union;": "\u22c3",
    "UnionPlus;": "\u228e",
    "Uogon;": "\u0172",
    "Uopf;": "\U0001d54c",
    "UpArrow;": "\u2191",
    "UpArrowBar;": "\u2912",
    "UpArrowDownArrow;": "\u21c5",
    "UpDownArrow;": "\u2195",
    "UpEquilibrium;": "\u296e",
    "UpTee;": "\u22a5",
    "UpTeeArrow;": "\u21a5",
    "Uparrow;": "\u21d1",
    "Updownarrow;": "\u21d5",
    "UpperLeftArrow;": "\u2196",
    "UpperRightArrow;": "\u2197",
    "Upsi;": "\u03d2",
    "Upsilon;": "\u03a5",
    "Uring;": "\u016e",
    "Uscr;": "\U0001d4b0",
    "Utilde;": "\u0168",
    "Uuml": "\xdc",
    "Uuml;": "\xdc",
    "VDash;": "\u22ab",
    "Vbar;": "\u2aeb",
    "Vcy;": "\u0412",
    "Vdash;": "\u22a9",
    "Vdashl;": "\u2ae6",
    "Vee;": "\u22c1",
    "Verbar;": "\u2016",
    "Vert;": "\u2016",
    "VerticalBar;": "\u2223",
    "VerticalLine;": "|",
    "VerticalSeparator;": "\u2758",
    "VerticalTilde;": "\u2240",
    "VeryThinSpace;": "\u200a",
    "Vfr;": "\U0001d519",
    "Vopf;": "\U0001d54d",
    "Vscr;": "\U0001d4b1",
    "Vvdash;": "\u22aa",
    "Wcirc;": "\u0174",
    "Wedge;": "\u22c0",
    "Wfr;": "\U0001d51a",
    "Wopf;": "\U0001d54e",
    "Wscr;": "\U0001d4b2",
    "Xfr;": "\U0001d51b",
    "Xi;": "\u039e",
    "Xopf;": "\U0001d54f",
    "Xscr;": "\U0001d4b3",
    "YAcy;": "\u042f",
    "YIcy;": "\u0407",
    "YUcy;": "\u042e",
    "Yacute": "\xdd",
    "Yacute;": "\xdd",
    "Ycirc;": "\u0176",
    "Ycy;": "\u042b",
    "Yfr;": "\U0001d51c",
    "Yopf;": "\U0001d550",
    "Yscr;": "\U0001d4b4",
    "Yuml;": "\u0178",
    "ZHcy;": "\u0416",
    "Zacute;": "\u0179",
    "Zcaron;": "\u017d",
    "Zcy;": "\u0417",
    "Zdot;": "\u017b",
    "ZeroWidthSpace;": "\u200b",
    "Zeta;": "\u0396",
    "Zfr;": "\u2128",
    "Zopf;": "\u2124",
    "Zscr;": "\U0001d4b5",
    "aacute": "\xe1",
    "aacute;": "\xe1",
    "abreve;": "\u0103",
    "ac;": "\u223e",
    "acE;": "\u223e\u0333",
    "acd;": "\u223f",
    "acirc": "\xe2",
    "acirc;": "\xe2",
    "acute": "\xb4",
    "acute;": "\xb4",
    "acy;": "\u0430",
    "aelig": "\xe6",
    "aelig;": "\xe6",
    "af;": "\u2061",
    "afr;": "\U0001d51e",
    "agrave": "\xe0",
    "agrave;": "\xe0",
    "alefsym;": "\u2135",
    "aleph;": "\u2135",
    "alpha;": "\u03b1",
    "amacr;": "\u0101",
    "amalg;": "\u2a3f",
    "amp": "&",
    "amp;": "&",
    "and;": "\u2227",
    "andand;": "\u2a55",
    "andd;": "\u2a5c",
    "andslope;": "\u2a58",
    "andv;": "\u2a5a",
    "ang;": "\u2220",
    "ange;": "\u29a4",
    "angle;": "\u2220",
    "angmsd;": "\u2221",
    "angmsdaa;": "\u29a8",
    "angmsdab;": "\u29a9",
    "angmsdac;": "\u29aa",
    "angmsdad;": "\u29ab",
    "angmsdae;": "\u29ac",
    "angmsdaf;": "\u29ad",
    "angmsdag;": "\u29ae",
    "angmsdah;": "\u29af",
    "angrt;": "\u221f",
    "angrtvb;": "\u22be",
    "angrtvbd;": "\u299d",
    "angsph;": "\u2222",
    "angst;": "\xc5",
    "angzarr;": "\u237c",
    "aogon;": "\u0105",
    "aopf;": "\U0001d552",
    "ap;": "\u2248",
    "apE;": "\u2a70",
    "apacir;": "\u2a6f",
    "ape;": "\u224a",
    "apid;": "\u224b",
    "apos;": "'",
    "approx;": "\u2248",
    "approxeq;": "\u224a",
    "aring": "\xe5",
    "aring;": "\xe5",
    "ascr;": "\U0001d4b6",
    "ast;": "*",
    "asymp;": "\u2248",
    "asympeq;": "\u224d",
    "atilde": "\xe3",
    "atilde;": "\xe3",
    "auml": "\xe4",
    "auml;": "\xe4",
    "awconint;": "\u2233",
    "awint;": "\u2a11",
    "bNot;": "\u2aed",
    "backcong;": "\u224c",
    "backepsilon;": "\u03f6",
    "backprime;": "\u2035",
    "backsim;": "\u223d",
    "backsimeq;": "\u22cd",
    "barvee;": "\u22bd",
    "barwed;": "\u2305",
    "barwedge;": "\u2305",
    "bbrk;": "\u23b5",
    "bbrktbrk;": "\u23b6",
    "bcong;": "\u224c",
    "bcy;": "\u0431",
    "bdquo;": "\u201e",
    "becaus;": "\u2235",
    "because;": "\u2235",
    "bemptyv;": "\u29b0",
    "bepsi;": "\u03f6",
    "bernou;": "\u212c",
    "beta;": "\u03b2",
    "beth;": "\u2136",
    "between;": "\u226c",
    "bfr;": "\U0001d51f",
    "bigcap;": "\u22c2",
    "bigcirc;": "\u25ef",
    "bigcup;": "\u22c3",
    "bigodot;": "\u2a00",
    "bigoplus;": "\u2a01",
    "bigotimes;": "\u2a02",
    "bigsqcup;": "\u2a06",
    "bigstar;": "\u2605",
    "bigtriangledown;": "\u25bd",
    "bigtriangleup;": "\u25b3",
    "biguplus;": "\u2a04",
    "bigvee;": "\u22c1",
    "bigwedge;": "\u22c0",
    "bkarow;": "\u290d",
    "blacklozenge;": "\u29eb",
    "blacksquare;": "\u25aa",
    "blacktriangle;": "\u25b4",
    "blacktriangledown;": "\u25be",
    "blacktriangleleft;": "\u25c2",
    "blacktriangleright;": "\u25b8",
    "blank;": "\u2423",
    "blk12;": "\u2592",
    "blk14;": "\u2591",
    "blk34;": "\u2593",
    "block;": "\u2588",
    "bne;": "=\u20e5",
    "bnequiv;": "\u2261\u20e5",
    "bnot;": "\u2310",
    "bopf;": "\U0001d553",
    "bot;": "\u22a5",
    "bottom;": "\u22a5",
    "bowtie;": "\u22c8",
    "boxDL;": "\u2557",
    "boxDR;": "\u2554",
    "boxDl;": "\u2556",
    "boxDr;": "\u2553",
    "boxH;": "\u2550",
    "boxHD;": "\u2566",
    "boxHU;": "\u2569",
    "boxHd;": "\u2564",
    "boxHu;": "\u2567",
    "boxUL;": "\u255d",
    "boxUR;": "\u255a",
    "boxUl;": "\u255c",
    "boxUr;": "\u2559",
    "boxV;": "\u2551",
    "boxVH;": "\u256c",
    "boxVL;": "\u2563",
    "boxVR;": "\u2560",
    "boxVh;": "\u256b",
    "boxVl;": "\u2562",
    "boxVr;": "\u255f",
    "boxbox;": "\u29c9",
    "boxdL;": "\u2555",
    "boxdR;": "\u2552",
    "boxdl;": "\u2510",
    "boxdr;": "\u250c",
    "boxh;": "\u2500",
    "boxhD;": "\u2565",
    "boxhU;": "\u2568",
    "boxhd;": "\u252c",
    "boxhu;": "\u2534",
    "boxminus;": "\u229f",
    "boxplus;": "\u229e",
    "boxtimes;": "\u22a0",
    "boxuL;": "\u255b",
    "boxuR;": "\u2558",
    "boxul;": "\u2518",
    "boxur;": "\u2514",
    "boxv;": "\u2502",
    "boxvH;": "\u256a",
    "boxvL;": "\u2561",
    "boxvR;": "\u255e",
    "boxvh;": "\u253c",
    "boxvl;": "\u2524",
    "boxvr;": "\u251c",
    "bprime;": "\u2035",
    "breve;": "\u02d8",
    "brvbar": "\xa6",
    "brvbar;": "\xa6",
    "bscr;": "\U0001d4b7",
    "bsemi;": "\u204f",
    "bsim;": "\u223d",
    "bsime;": "\u22cd",
    "bsol;": "\\",
    "bsolb;": "\u29c5",
    "bsolhsub;": "\u27c8",
    "bull;": "\u2022",
    "bullet;": "\u2022",
    "bump;": "\u224e",
    "bumpE;": "\u2aae",
    "bumpe;": "\u224f",
    "bumpeq;": "\u224f",
    "cacute;": "\u0107",
    "cap;": "\u2229",
    "capand;": "\u2a44",
    "capbrcup;": "\u2a49",
    "capcap;": "\u2a4b",
    "capcup;": "\u2a47",
    "capdot;": "\u2a40",
    "caps;": "\u2229\ufe00",
    "caret;": "\u2041",
    "caron;": "\u02c7",
    "ccaps;": "\u2a4d",
    "ccaron;": "\u010d",
    "ccedil": "\xe7",
    "ccedil;": "\xe7",
    "ccirc;": "\u0109",
    "ccups;": "\u2a4c",
    "ccupssm;": "\u2a50",
    "cdot;": "\u010b",
    "cedil": "\xb8",
    "cedil;": "\xb8",
    "cemptyv;": "\u29b2",
    "cent": "\xa2",
    "cent;": "\xa2",
    "centerdot;": "\xb7",
    "cfr;": "\U0001d520",
    "chcy;": "\u0447",
    "check;": "\u2713",
    "checkmark;": "\u2713",
    "chi;": "\u03c7",
    "cir;": "\u25cb",
    "cirE;": "\u29c3",
    "circ;": "\u02c6",
    "circeq;": "\u2257",
    "circlearrowleft;": "\u21ba",
    "circlearrowright;": "\u21bb",
    "circledR;": "\xae",
    "circledS;": "\u24c8",
    "circledast;": "\u229b",
    "circledcirc;": "\u229a",
    "circleddash;": "\u229d",
    "cire;": "\u2257",
    "cirfnint;": "\u2a10",
    "cirmid;": "\u2aef",
    "cirscir;": "\u29c2",
    "clubs;": "\u2663",
    "clubsuit;": "\u2663",
    "colon;": ":",
    "colone;": "\u2254",
    "coloneq;": "\u2254",
    "comma;": ",",
    "commat;": "@",
    "comp;": "\u2201",
    "compfn;": "\u2218",
    "complement;": "\u2201",
    "complexes;": "\u2102",
    "cong;": "\u2245",
    "congdot;": "\u2a6d",
    "conint;": "\u222e",
    "copf;": "\U0001d554",
    "coprod;": "\u2210",
    "copy": "\xa9",
    "copy;": "\xa9",
    "copysr;": "\u2117",
    "crarr;": "\u21b5",
    "cross;": "\u2717",
    "cscr;": "\U0001d4b8",
    "csub;": "\u2acf",
    "csube;": "\u2ad1",
    "csup;": "\u2ad0",
    "csupe;": "\u2ad2",
    "ctdot;": "\u22ef",
    "cudarrl;": "\u2938",
    "cudarrr;": "\u2935",
    "cuepr;": "\u22de",
    "cuesc;": "\u22df",
    "cularr;": "\u21b6",
    "cularrp;": "\u293d",
    "cup;": "\u222a",
    "cupbrcap;": "\u2a48",
    "cupcap;": "\u2a46",
    "cupcup;": "\u2a4a",
    "cupdot;": "\u228d",
    "cupor;": "\u2a45",
    "cups;": "\u222a\ufe00",
    "curarr;": "\u21b7",
    "curarrm;": "\u293c",
    "curlyeqprec;": "\u22de",
    "curlyeqsucc;": "\u22df",
    "curlyvee;": "\u22ce",
    "curlywedge;": "\u22cf",
    "curren": "\xa4",
    "curren;": "\xa4",
    "curvearrowleft;": "\u21b6",
    "curvearrowright;": "\u21b7",
    "cuvee;": "\u22ce",
    "cuwed;": "\u22cf",
    "cwconint;": "\u2232",
    "cwint;": "\u2231",
    "cylcty;": "\u232d",
    "dArr;": "\u21d3",
    "dHar;": "\u2965",
    "dagger;": "\u2020",
    "daleth;": "\u2138",
    "darr;": "\u2193",
    "dash;": "\u2010",
    "dashv;": "\u22a3",
    "dbkarow;": "\u290f",
    "dblac;": "\u02dd",
    "dcaron;": "\u010f",
    "dcy;": "\u0434",
    "dd;": "\u2146",
    "ddagger;": "\u2021",
    "ddarr;": "\u21ca",
    "ddotseq;": "\u2a77",
    "deg": "\xb0",
    "deg;": "\xb0",
    "delta;": "\u03b4",
    "demptyv;": "\u29b1",
    "dfisht;": "\u297f",
    "dfr;": "\U0001d521",
    "dharl;": "\u21c3",
    "dharr;": "\u21c2",
    "diam;": "\u22c4",
    "diamond;": "\u22c4",
    "diamondsuit;": "\u2666",
    "diams;": "\u2666",
    "die;": "\xa8",
    "digamma;": "\u03dd",
    "disin;": "\u22f2",
    "div;": "\xf7",
    "divide": "\xf7",
    "divide;": "\xf7",
    "divideontimes;": "\u22c7",
    "divonx;": "\u22c7",
    "djcy;": "\u0452",
    "dlcorn;": "\u231e",
    "dlcrop;": "\u230d",
    "dollar;": "$",
    "dopf;": "\U0001d555",
    "dot;": "\u02d9",
    "doteq;": "\u2250",
    "doteqdot;": "\u2251",
    "dotminus;": "\u2238",
    "dotplus;": "\u2214",
    "dotsquare;": "\u22a1",
    "doublebarwedge;": "\u2306",
    "downarrow;": "\u2193",
    "downdownarrows;": "\u21ca",
    "downharpoonleft;": "\u21c3",
    "downharpoonright;": "\u21c2",
    "drbkarow;": "\u2910",
    "drcorn;": "\u231f",
    "drcrop;": "\u230c",
    "dscr;": "\U0001d4b9",
    "dscy;": "\u0455",
    "dsol;": "\u29f6",
    "dstrok;": "\u0111",
    "dtdot;": "\u22f1",
    "dtri;": "\u25bf",
    "dtrif;": "\u25be",
    "duarr;": "\u21f5",
    "duhar;": "\u296f",
    "dwangle;": "\u29a6",
    "dzcy;": "\u045f",
    "dzigrarr;": "\u27ff",
    "eDDot;": "\u2a77",
    "eDot;": "\u2251",
    "eacute": "\xe9",
    "eacute;": "\xe9",
    "easter;": "\u2a6e",
    "ecaron;": "\u011b",
    "ecir;": "\u2256",
    "ecirc": "\xea",
    "ecirc;": "\xea",
    "ecolon;": "\u2255",
    "ecy;": "\u044d",
    "edot;": "\u0117",
    "ee;": "\u2147",
    "efDot;": "\u2252",
    "efr;": "\U0001d522",
    "eg;": "\u2a9a",
    "egrave": "\xe8",
    "egrave;": "\xe8",
    "egs;": "\u2a96",
    "egsdot;": "\u2a98",
    "el;": "\u2a99",
    "elinters;": "\u23e7",
    "ell;": "\u2113",
    "els;": "\u2a95",
    "elsdot;": "\u2a97",
    "emacr;": "\u0113",
    "empty;": "\u2205",
    "emptyset;": "\u2205",
    "emptyv;": "\u2205",
    "emsp13;": "\u2004",
    "emsp14;": "\u2005",
    "emsp;": "\u2003",
    "eng;": "\u014b",
    "ensp;": "\u2002",
    "eogon;": "\u0119",
    "eopf;": "\U0001d556",
    "epar;": "\u22d5",
    "eparsl;": "\u29e3",
    "eplus;": "\u2a71",
    "epsi;": "\u03b5",
    "epsilon;": "\u03b5",
    "epsiv;": "\u03f5",
    "eqcirc;": "\u2256",
    "eqcolon;": "\u2255",
    "eqsim;": "\u2242",
    "eqslantgtr;": "\u2a96",
    "eqslantless;": "\u2a95",
    "equals;": "=",
    "equest;": "\u225f",
    "equiv;": "\u2261",
    "equivDD;": "\u2a78",
    "eqvparsl;": "\u29e5",
    "erDot;": "\u2253",
    "erarr;": "\u2971",
    "escr;": "\u212f",
    "esdot;": "\u2250",
    "esim;": "\u2242",
    "eta;": "\u03b7",
    "eth": "\xf0",
    "eth;": "\xf0",
    "euml": "\xeb",
    "euml;": "\xeb",
    "euro;": "\u20ac",
    "excl;": "!",
    "exist;": "\u2203",
    "expectation;": "\u2130",
    "exponentiale;": "\u2147",
    "fallingdotseq;": "\u2252",
    "fcy;": "\u0444",
    "female;": "\u2640",
    "ffilig;": "\ufb03",
    "fflig;": "\ufb00",
    "ffllig;": "\ufb04",
    "ffr;": "\U0001d523",
    "filig;": "\ufb01",
    "fjlig;": "fj",
    "flat;": "\u266d",
    "fllig;": "\ufb02",
    "fltns;": "\u25b1",
    "fnof;": "\u0192",
    "fopf;": "\U0001d557",
    "forall;": "\u2200",
    "fork;": "\u22d4",
    "forkv;": "\u2ad9",
    "fpartint;": "\u2a0d",
    "frac12": "\xbd",
    "frac12;": "\xbd",
    "frac13;": "\u2153",
    "frac14": "\xbc",
    "frac14;": "\xbc",
    "frac15;": "\u2155",
    "frac16;": "\u2159",
    "frac18;": "\u215b",
    "frac23;": "\u2154",
    "frac25;": "\u2156",
    "frac34": "\xbe",
    "frac34;": "\xbe",
    "frac35;": "\u2157",
    "frac38;": "\u215c",
    "frac45;": "\u2158",
    "frac56;": "\u215a",
    "frac58;": "\u215d",
    "frac78;": "\u215e",
    "frasl;": "\u2044",
    "frown;": "\u2322",
    "fscr;": "\U0001d4bb",
    "gE;": "\u2267",
    "gEl;": "\u2a8c",
    "gacute;": "\u01f5",
    "gamma;": "\u03b3",
    "gammad;": "\u03dd",
    "gap;": "\u2a86",
    "gbreve;": "\u011f",
    "gcirc;": "\u011d",
    "gcy;": "\u0433",
    "gdot;": "\u0121",
    "ge;": "\u2265",
    "gel;": "\u22db",
    "geq;": "\u2265",
    "geqq;": "\u2267",
    "geqslant;": "\u2a7e",
    "ges;": "\u2a7e",
    "gescc;": "\u2aa9",
    "gesdot;": "\u2a80",
    "gesdoto;": "\u2a82",
    "gesdotol;": "\u2a84",
    "gesl;": "\u22db\ufe00",
    "gesles;": "\u2a94",
    "gfr;": "\U0001d524",
    "gg;": "\u226b",
    "ggg;": "\u22d9",
    "gimel;": "\u2137",
    "gjcy;": "\u0453",
    "gl;": "\u2277",
    "glE;": "\u2a92",
    "gla;": "\u2aa5",
    "glj;": "\u2aa4",
    "gnE;": "\u2269",
    "gnap;": "\u2a8a",
    "gnapprox;": "\u2a8a",
    "gne;": "\u2a88",
    "gneq;": "\u2a88",
    "gneqq;": "\u2269",
    "gnsim;": "\u22e7",
    "gopf;": "\U0001d558",
    "grave;": "`",
    "gscr;": "\u210a",
    "gsim;": "\u2273",
    "gsime;": "\u2a8e",
    "gsiml;": "\u2a90",
    "gt": ">",
    "gt;": ">",
    "gtcc;": "\u2aa7",
    "gtcir;": "\u2a7a",
    "gtdot;": "\u22d7",
    "gtlPar;": "\u2995",
    "gtquest;": "\u2a7c",
    "gtrapprox;": "\u2a86",
    "gtrarr;": "\u2978",
    "gtrdot;": "\u22d7",
    "gtreqless;": "\u22db",
    "gtreqqless;": "\u2a8c",
    "gtrless;": "\u2277",
    "gtrsim;": "\u2273",
    "gvertneqq;": "\u2269\ufe00",
    "gvnE;": "\u2269\ufe00",
    "hArr;": "\u21d4",
    "hairsp;": "\u200a",
    "half;": "\xbd",
    "hamilt;": "\u210b",
    "hardcy;": "\u044a",
    "harr;": "\u2194",
    "harrcir;": "\u2948",
    "harrw;": "\u21ad",
    "hbar;": "\u210f",
    "hcirc;": "\u0125",
    "hearts;": "\u2665",
    "heartsuit;": "\u2665",
    "hellip;": "\u2026",
    "hercon;": "\u22b9",
    "hfr;": "\U0001d525",
    "hksearow;": "\u2925",
    "hkswarow;": "\u2926",
    "hoarr;": "\u21ff",
    "homtht;": "\u223b",
    "hookleftarrow;": "\u21a9",
    "hookrightarrow;": "\u21aa",
    "hopf;": "\U0001d559",
    "horbar;": "\u2015",
    "hscr;": "\U0001d4bd",
    "hslash;": "\u210f",
    "hstrok;": "\u0127",
    "hybull;": "\u2043",
    "hyphen;": "\u2010",
    "iacute": "\xed",
    "iacute;": "\xed",
    "ic;": "\u2063",
    "icirc": "\xee",
    "icirc;": "\xee",
    "icy;": "\u0438",
    "iecy;": "\u0435",
    "iexcl": "\xa1",
    "iexcl;": "\xa1",
    "iff;": "\u21d4",
    "ifr;": "\U0001d526",
    "igrave": "\xec",
    "igrave;": "\xec",
    "ii;": "\u2148",
    "iiiint;": "\u2a0c",
    "iiint;": "\u222d",
    "iinfin;": "\u29dc",
    "iiota;": "\u2129",
    "ijlig;": "\u0133",
    "imacr;": "\u012b",
    "image;": "\u2111",
    "imagline;": "\u2110",
    "imagpart;": "\u2111",
    "imath;": "\u0131",
    "imof;": "\u22b7",
    "imped;": "\u01b5",
    "in;": "\u2208",
    "incare;": "\u2105",
    "infin;": "\u221e",
    "infintie;": "\u29dd",
    "inodot;": "\u0131",
    "int;": "\u222b",
    "intcal;": "\u22ba",
    "integers;": "\u2124",
    "intercal;": "\u22ba",
    "intlarhk;": "\u2a17",
    "intprod;": "\u2a3c",
    "iocy;": "\u0451",
    "iogon;": "\u012f",
    "iopf;": "\U0001d55a",
    "iota;": "\u03b9",
    "iprod;": "\u2a3c",
    "iquest": "\xbf",
    "iquest;": "\xbf",
    "iscr;": "\U0001d4be",
    "isin;": "\u2208",
    "isinE;": "\u22f9",
    "isindot;": "\u22f5",
    "isins;": "\u22f4",
    "isinsv;": "\u22f3",
    "isinv;": "\u2208",
    "it;": "\u2062",
    "itilde;": "\u0129",
    "iukcy;": "\u0456",
    "iuml": "\xef",
    "iuml;": "\xef",
    "jcirc;": "\u0135",
    "jcy;": "\u0439",
    "jfr;": "\U0001d527",
    "jmath;": "\u0237",
    "jopf;": "\U0001d55b",
    "jscr;": "\U0001d4bf",
    "jsercy;": "\u0458",
    "jukcy;": "\u0454",
    "kappa;": "\u03ba",
    "kappav;": "\u03f0",
    "kcedil;": "\u0137",
    "kcy;": "\u043a",
    "kfr;": "\U0001d528",
    "kgreen;": "\u0138",
    "khcy;": "\u0445",
    "kjcy;": "\u045c",
    "kopf;": "\U0001d55c",
    "kscr;": "\U0001d4c0",
    "lAarr;": "\u21da",
    "lArr;": "\u21d0",
    "lAtail;": "\u291b",
    "lBarr;": "\u290e",
    "lE;": "\u2266",
    "lEg;": "\u2a8b",
    "lHar;": "\u2962",
    "lacute;": "\u013a",
    "laemptyv;": "\u29b4",
    "lagran;": "\u2112",
    "lambda;": "\u03bb",
    "lang;": "\u27e8",
    "langd;": "\u2991",
    "langle;": "\u27e8",
    "lap;": "\u2a85",
    "laquo": "\xab",
    "laquo;": "\xab",
    "larr;": "\u2190",
    "larrb;": "\u21e4",
    "larrbfs;": "\u291f",
    "larrfs;": "\u291d",
    "larrhk;": "\u21a9",
    "larrlp;": "\u21ab",
    "larrpl;": "\u2939",
    "larrsim;": "\u2973",
    "larrtl;": "\u21a2",
    "lat;": "\u2aab",
    "latail;": "\u2919",
    "late;": "\u2aad",
    "lates;": "\u2aad\ufe00",
    "lbarr;": "\u290c",
    "lbbrk;": "\u2772",
    "lbrace;": "{",
    "lbrack;": "[",
    "lbrke;": "\u298b",
    "lbrksld;": "\u298f",
    "lbrkslu;": "\u298d",
    "lcaron;": "\u013e",
    "lcedil;": "\u013c",
    "lceil;": "\u2308",
    "lcub;": "{",
    "lcy;": "\u043b",
    "ldca;": "\u2936",
    "ldquo;": "\u201c",
    "ldquor;": "\u201e",
    "ldrdhar;": "\u2967",
    "ldrushar;": "\u294b",
    "ldsh;": "\u21b2",
    "le;": "\u2264",
    "leftarrow;": "\u2190",
    "leftarrowtail;": "\u21a2",
    "leftharpoondown;": "\u21bd",
    "leftharpoonup;": "\u21bc",
    "leftleftarrows;": "\u21c7",
    "leftrightarrow;": "\u2194",
    "leftrightarrows;": "\u21c6",
    "leftrightharpoons;": "\u21cb",
    "leftrightsquigarrow;": "\u21ad",
    "leftthreetimes;": "\u22cb",
    "leg;": "\u22da",
    "leq;": "\u2264",
    "leqq;": "\u2266",
    "leqslant;": "\u2a7d",
    "les;": "\u2a7d",
    "lescc;": "\u2aa8",
    "lesdot;": "\u2a7f",
    "lesdoto;": "\u2a81",
    "lesdotor;": "\u2a83",
    "lesg;": "\u22da\ufe00",
    "lesges;": "\u2a93",
    "lessapprox;": "\u2a85",
    "lessdot;": "\u22d6",
    "lesseqgtr;": "\u22da",
    "lesseqqgtr;": "\u2a8b",
    "lessgtr;": "\u2276",
    "lesssim;": "\u2272",
    "lfisht;": "\u297c",
    "lfloor;": "\u230a",
    "lfr;": "\U0001d529",
    "lg;": "\u2276",
    "lgE;": "\u2a91",
    "lhard;": "\u21bd",
    "lharu;": "\u21bc",
    "lharul;": "\u296a",
    "lhblk;": "\u2584",
    "ljcy;": "\u0459",
    "ll;": "\u226a",
    "llarr;": "\u21c7",
    "llcorner;": "\u231e",
    "llhard;": "\u296b",
    "lltri;": "\u25fa",
    "lmidot;": "\u0140",
    "lmoust;": "\u23b0",
    "lmoustache;": "\u23b0",
    "lnE;": "\u2268",
    "lnap;": "\u2a89",
    "lnapprox;": "\u2a89",
    "lne;": "\u2a87",
    "lneq;": "\u2a87",
    "lneqq;": "\u2268",
    "lnsim;": "\u22e6",
    "loang;": "\u27ec",
    "loarr;": "\u21fd",
    "lobrk;": "\u27e6",
    "longleftarrow;": "\u27f5",
    "longleftrightarrow;": "\u27f7",
    "longmapsto;": "\u27fc",
    "longrightarrow;": "\u27f6",
    "looparrowleft;": "\u21ab",
    "looparrowright;": "\u21ac",
    "lopar;": "\u2985",
    "lopf;": "\U0001d55d",
    "loplus;": "\u2a2d",
    "lotimes;": "\u2a34",
    "lowast;": "\u2217",
    "lowbar;": "_",
    "loz;": "\u25ca",
    "lozenge;": "\u25ca",
    "lozf;": "\u29eb",
    "lpar;": "(",
    "lparlt;": "\u2993",
    "lrarr;": "\u21c6",
    "lrcorner;": "\u231f",
    "lrhar;": "\u21cb",
    "lrhard;": "\u296d",
    "lrm;": "\u200e",
    "lrtri;": "\u22bf",
    "lsaquo;": "\u2039",
    "lscr;": "\U0001d4c1",
    "lsh;": "\u21b0",
    "lsim;": "\u2272",
    "lsime;": "\u2a8d",
    "lsimg;": "\u2a8f",
    "lsqb;": "[",
    "lsquo;": "\u2018",
    "lsquor;": "\u201a",
    "lstrok;": "\u0142",
    "lt": "<",
    "lt;": "<",
    "ltcc;": "\u2aa6",
    "ltcir;": "\u2a79",
    "ltdot;": "\u22d6",
    "lthree;": "\u22cb",
    "ltimes;": "\u22c9",
    "ltlarr;": "\u2976",
    "ltquest;": "\u2a7b",
    "ltrPar;": "\u2996",
    "ltri;": "\u25c3",
    "ltrie;": "\u22b4",
    "ltrif;": "\u25c2",
    "lurdshar;": "\u294a",
    "luruhar;": "\u2966",
    "lvertneqq;": "\u2268\ufe00",
    "lvnE;": "\u2268\ufe00",
    "mDDot;": "\u223a",
    "macr": "\xaf",
    "macr;": "\xaf",
    "male;": "\u2642",
    "malt;": "\u2720",
    "maltese;": "\u2720",
    "map;": "\u21a6",
    "mapsto;": "\u21a6",
    "mapstodown;": "\u21a7",
    "mapstoleft;": "\u21a4",
    "mapstoup;": "\u21a5",
    "marker;": "\u25ae",
    "mcomma;": "\u2a29",
    "mcy;": "\u043c",
    "mdash;": "\u2014",
    "measuredangle;": "\u2221",
    "mfr;": "\U0001d52a",
    "mho;": "\u2127",
    "micro": "\xb5",
    "micro;": "\xb5",
    "mid;": "\u2223",
    "midast;": "*",
    "midcir;": "\u2af0",
    "middot": "\xb7",
    "middot;": "\xb7",
    "minus;": "\u2212",
    "minusb;": "\u229f",
    "minusd;": "\u2238",
    "minusdu;": "\u2a2a",
    "mlcp;": "\u2adb",
    "mldr;": "\u2026",
    "mnplus;": "\u2213",
    "models;": "\u22a7",
    "mopf;": "\U0001d55e",
    "mp;": "\u2213",
    "mscr;": "\U0001d4c2",
    "mstpos;": "\u223e",
    "mu;": "\u03bc",
    "multimap;": "\u22b8",
    "mumap;": "\u22b8",
    "nGg;": "\u22d9\u0338",
    "nGt;": "\u226b\u20d2",
    "nGtv;": "\u226b\u0338",
    "nLeftarrow;": "\u21cd",
    "nLeftrightarrow;": "\u21ce",
    "nLl;": "\u22d8\u0338",
    "nLt;": "\u226a\u20d2",
    "nLtv;": "\u226a\u0338",
    "nRightarrow;": "\u21cf",
    "nVDash;": "\u22af",
    "nVdash;": "\u22ae",
    "nabla;": "\u2207",
    "nacute;": "\u0144",
    "nang;": "\u2220\u20d2",
    "nap;": "\u2249",
    "napE;": "\u2a70\u0338",
    "napid;": "\u224b\u0338",
    "napos;": "\u0149",
    "napprox;": "\u2249",
    "natur;": "\u266e",
    "natural;": "\u266e",
    "naturals;": "\u2115",
    "nbsp": "\xa0",
    "nbsp;": "\xa0",
    "nbump;": "\u224e\u0338",
    "nbumpe;": "\u224f\u0338",
    "ncap;": "\u2a43",
    "ncaron;": "\u0148",
    "ncedil;": "\u0146",
    "ncong;": "\u2247",
    "ncongdot;": "\u2a6d\u0338",
    "ncup;": "\u2a42",
    "ncy;": "\u043d",
    "ndash;": "\u2013",
    "ne;": "\u2260",
    "neArr;": "\u21d7",
    "nearhk;": "\u2924",
    "nearr;": "\u2197",
    "nearrow;": "\u2197",
    "nedot;": "\u2250\u0338",
    "nequiv;": "\u2262",
    "nesear;": "\u2928",
    "nesim;": "\u2242\u0338",
    "nexist;": "\u2204",
    "nexists;": "\u2204",
    "nfr;": "\U0001d52b",
    "ngE;": "\u2267\u0338",
    "nge;": "\u2271",
    "ngeq;": "\u2271",
    "ngeqq;": "\u2267\u0338",
    "ngeqslant;": "\u2a7e\u0338",
    "nges;": "\u2a7e\u0338",
    "ngsim;": "\u2275",
    "ngt;": "\u226f",
    "ngtr;": "\u226f",
    "nhArr;": "\u21ce",
    "nharr;": "\u21ae",
    "nhpar;": "\u2af2",
    "ni;": "\u220b",
    "nis;": "\u22fc",
    "nisd;": "\u22fa",
    "niv;": "\u220b",
    "njcy;": "\u045a",
    "nlArr;": "\u21cd",
    "nlE;": "\u2266\u0338",
    "nlarr;": "\u219a",
    "nldr;": "\u2025",
    "nle;": "\u2270",
    "nleftarrow;": "\u219a",
    "nleftrightarrow;": "\u21ae",
    "nleq;": "\u2270",
    "nleqq;": "\u2266\u0338",
    "nleqslant;": "\u2a7d\u0338",
    "nles;": "\u2a7d\u0338",
    "nless;": "\u226e",
    "nlsim;": "\u2274",
    "nlt;": "\u226e",
    "nltri;": "\u22ea",
    "nltrie;": "\u22ec",
    "nmid;": "\u2224",
    "nopf;": "\U0001d55f",
    "not": "\xac",
    "not;": "\xac",
    "notin;": "\u2209",
    "notinE;": "\u22f9\u0338",
    "notindot;": "\u22f5\u0338",
    "notinva;": "\u2209",
    "notinvb;": "\u22f7",
    "notinvc;": "\u22f6",
    "notni;": "\u220c",
    "notniva;": "\u220c",
    "notnivb;": "\u22fe",
    "notnivc;": "\u22fd",
    "npar;": "\u2226",
    "nparallel;": "\u2226",
    "nparsl;": "\u2afd\u20e5",
    "npart;": "\u2202\u0338",
    "npolint;": "\u2a14",
    "npr;": "\u2280",
    "nprcue;": "\u22e0",
    "npre;": "\u2aaf\u0338",
    "nprec;": "\u2280",
    "npreceq;": "\u2aaf\u0338",
    "nrArr;": "\u21cf",
    "nrarr;": "\u219b",
    "nrarrc;": "\u2933\u0338",
    "nrarrw;": "\u219d\u0338",
    "nrightarrow;": "\u219b",
    "nrtri;": "\u22eb",
    "nrtrie;": "\u22ed",
    "nsc;": "\u2281",
    "nsccue;": "\u22e1",
    "nsce;": "\u2ab0\u0338",
    "nscr;": "\U0001d4c3",
    "nshortmid;": "\u2224",
    "nshortparallel;": "\u2226",
    "nsim;": "\u2241",
    "nsime;": "\u2244",
    "nsimeq;": "\u2244",
    "nsmid;": "\u2224",
    "nspar;": "\u2226",
    "nsqsube;": "\u22e2",
    "nsqsupe;": "\u22e3",
    "nsub;": "\u2284",
    "nsubE;": "\u2ac5\u0338",
    "nsube;": "\u2288",
    "nsubset;": "\u2282\u20d2",
    "nsubseteq;": "\u2288",
    "nsubseteqq;": "\u2ac5\u0338",
    "nsucc;": "\u2281",
    "nsucceq;": "\u2ab0\u0338",
    "nsup;": "\u2285",
    "nsupE;": "\u2ac6\u0338",
    "nsupe;": "\u2289",
    "nsupset;": "\u2283\u20d2",
    "nsupseteq;": "\u2289",
    "nsupseteqq;": "\u2ac6\u0338",
    "ntgl;": "\u2279",
    "ntilde": "\xf1",
    "ntilde;": "\xf1",
    "ntlg;": "\u2278",
    "ntriangleleft;": "\u22ea",
    "ntrianglelefteq;": "\u22ec",
    "ntriangleright;": "\u22eb",
    "ntrianglerighteq;": "\u22ed",
    "nu;": "\u03bd",
    "num;": "#",
    "numero;": "\u2116",
    "numsp;": "\u2007",
    "nvDash;": "\u22ad",
    "nvHarr;": "\u2904",
    "nvap;": "\u224d\u20d2",
    "nvdash;": "\u22ac",
    "nvge;": "\u2265\u20d2",
    "nvgt;": ">\u20d2",
    "nvinfin;": "\u29de",
    "nvlArr;": "\u2902",
    "nvle;": "\u2264\u20d2",
    "nvlt;": "<\u20d2",
    "nvltrie;": "\u22b4\u20d2",
    "nvrArr;": "\u2903",
    "nvrtrie;": "\u22b5\u20d2",
    "nvsim;": "\u223c\u20d2",
    "nwArr;": "\u21d6",
    "nwarhk;": "\u2923",
    "nwarr;": "\u2196",
    "nwarrow;": "\u2196",
    "nwnear;": "\u2927",
    "oS;": "\u24c8",
    "oacute": "\xf3",
    "oacute;": "\xf3",
    "oast;": "\u229b",
    "ocir;": "\u229a",
    "ocirc": "\xf4",
    "ocirc;": "\xf4",
    "ocy;": "\u043e",
    "odash;": "\u229d",
    "odblac;": "\u0151",
    "odiv;": "\u2a38",
    "odot;": "\u2299",
    "odsold;": "\u29bc",
    "oelig;": "\u0153",
    "ofcir;": "\u29bf",
    "ofr;": "\U0001d52c",
    "ogon;": "\u02db",
    "ograve": "\xf2",
    "ograve;": "\xf2",
    "ogt;": "\u29c1",
    "ohbar;": "\u29b5",
    "ohm;": "\u03a9",
    "oint;": "\u222e",
    "olarr;": "\u21ba",
    "olcir;": "\u29be",
    "olcross;": "\u29bb",
    "oline;": "\u203e",
    "olt;": "\u29c0",
    "omacr;": "\u014d",
    "omega;": "\u03c9",
    "omicron;": "\u03bf",
    "omid;": "\u29b6",
    "ominus;": "\u2296",
    "oopf;": "\U0001d560",
    "opar;": "\u29b7",
    "operp;": "\u29b9",
    "oplus;": "\u2295",
    "or;": "\u2228",
    "orarr;": "\u21bb",
    "ord;": "\u2a5d",
    "order;": "\u2134",
    "orderof;": "\u2134",
    "ordf": "\xaa",
    "ordf;": "\xaa",
    "ordm": "\xba",
    "ordm;": "\xba",
    "origof;": "\u22b6",
    "oror;": "\u2a56",
    "orslope;": "\u2a57",
    "orv;": "\u2a5b",
    "oscr;": "\u2134",
    "oslash": "\xf8",
    "oslash;": "\xf8",
    "osol;": "\u2298",
    "otilde": "\xf5",
    "otilde;": "\xf5",
    "otimes;": "\u2297",
    "otimesas;": "\u2a36",
    "ouml": "\xf6",
    "ouml;": "\xf6",
    "ovbar;": "\u233d",
    "par;": "\u2225",
    "para": "\xb6",
    "para;": "\xb6",
    "parallel;": "\u2225",
    "parsim;": "\u2af3",
    "parsl;": "\u2afd",
    "part;": "\u2202",
    "pcy;": "\u043f",
    "percnt;": "%",
    "period;": ".",
    "permil;": "\u2030",
    "perp;": "\u22a5",
    "pertenk;": "\u2031",
    "pfr;": "\U0001d52d",
    "phi;": "\u03c6",
    "phiv;": "\u03d5",
    "phmmat;": "\u2133",
    "phone;": "\u260e",
    "pi;": "\u03c0",
    "pitchfork;": "\u22d4",
    "piv;": "\u03d6",
    "planck;": "\u210f",
    "planckh;": "\u210e",
    "plankv;": "\u210f",
    "plus;": "+",
    "plusacir;": "\u2a23",
    "plusb;": "\u229e",
    "pluscir;": "\u2a22",
    "plusdo;": "\u2214",
    "plusdu;": "\u2a25",
    "pluse;": "\u2a72",
    "plusmn": "\xb1",
    "plusmn;": "\xb1",
    "plussim;": "\u2a26",
    "plustwo;": "\u2a27",
    "pm;": "\xb1",
    "pointint;": "\u2a15",
    "popf;": "\U0001d561",
    "pound": "\xa3",
    "pound;": "\xa3",
    "pr;": "\u227a",
    "prE;": "\u2ab3",
    "prap;": "\u2ab7",
    "prcue;": "\u227c",
    "pre;": "\u2aaf",
    "prec;": "\u227a",
    "precapprox;": "\u2ab7",
    "preccurlyeq;": "\u227c",
    "preceq;": "\u2aaf",
    "precnapprox;": "\u2ab9",
    "precneqq;": "\u2ab5",
    "precnsim;": "\u22e8",
    "precsim;": "\u227e",
    "prime;": "\u2032",
    "primes;": "\u2119",
    "prnE;": "\u2ab5",
    "prnap;": "\u2ab9",
    "prnsim;": "\u22e8",
    "prod;": "\u220f",
    "profalar;": "\u232e",
    "profline;": "\u2312",
    "profsurf;": "\u2313",
    "prop;": "\u221d",
    "propto;": "\u221d",
    "prsim;": "\u227e",
    "prurel;": "\u22b0",
    "pscr;": "\U0001d4c5",
    "psi;": "\u03c8",
    "puncsp;": "\u2008",
    "qfr;": "\U0001d52e",
    "qint;": "\u2a0c",
    "qopf;": "\U0001d562",
    "qprime;": "\u2057",
    "qscr;": "\U0001d4c6",
    "quaternions;": "\u210d",
    "quatint;": "\u2a16",
    "quest;": "?",
    "questeq;": "\u225f",
    "quot": "\"",
    "quot;": "\"",
    "rAarr;": "\u21db",
    "rArr;": "\u21d2",
    "rAtail;": "\u291c",
    "rBarr;": "\u290f",
    "rHar;": "\u2964",
    "race;": "\u223d\u0331",
    "racute;": "\u0155",
    "radic;": "\u221a",
    "raemptyv;": "\u29b3",
    "rang;": "\u27e9",
    "rangd;": "\u2992",
    "range;": "\u29a5",
    "rangle;": "\u27e9",
    "raquo": "\xbb",
    "raquo;": "\xbb",
    "rarr;": "\u2192",
    "rarrap;": "\u2975",
    "rarrb;": "\u21e5",
    "rarrbfs;": "\u2920",
    "rarrc;": "\u2933",
    "rarrfs;": "\u291e",
    "rarrhk;": "\u21aa",
    "rarrlp;": "\u21ac",
    "rarrpl;": "\u2945",
    "rarrsim;": "\u2974",
    "rarrtl;": "\u21a3",
    "rarrw;": "\u219d",
    "ratail;": "\u291a",
    "ratio;": "\u2236",
    "rationals;": "\u211a",
    "rbarr;": "\u290d",
    "rbbrk;": "\u2773",
    "rbrace;": "}",
    "rbrack;": "]",
    "rbrke;": "\u298c",
    "rbrksld;": "\u298e",
    "rbrkslu;": "\u2990",
    "rcaron;": "\u0159",
    "rcedil;": "\u0157",
    "rceil;": "\u2309",
    "rcub;": "}",
    "rcy;": "\u0440",
    "rdca;": "\u2937",
    "rdldhar;": "\u2969",
    "rdquo;": "\u201d",
    "rdquor;": "\u201d",
    "rdsh;": "\u21b3",
    "real;": "\u211c",
    "realine;": "\u211b",
    "realpart;": "\u211c",
    "reals;": "\u211d",
    "rect;": "\u25ad",
    "reg": "\xae",
    "reg;": "\xae",
    "rfisht;": "\u297d",
    "rfloor;": "\u230b",
    "rfr;": "\U0001d52f",
    "rhard;": "\u21c1",
    "rharu;": "\u21c0",
    "rharul;": "\u296c",
    "rho;": "\u03c1",
    "rhov;": "\u03f1",
    "rightarrow;": "\u2192",
    "rightarrowtail;": "\u21a3",
    "rightharpoondown;": "\u21c1",
    "rightharpoonup;": "\u21c0",
    "rightleftarrows;": "\u21c4",
    "rightleftharpoons;": "\u21cc",
    "rightrightarrows;": "\u21c9",
    "rightsquigarrow;": "\u219d",
    "rightthreetimes;": "\u22cc",
    "ring;": "\u02da",
    "risingdotseq;": "\u2253",
    "rlarr;": "\u21c4",
    "rlhar;": "\u21cc",
    "rlm;": "\u200f",
    "rmoust;": "\u23b1",
    "rmoustache;": "\u23b1",
    "rnmid;": "\u2aee",
    "roang;": "\u27ed",
    "roarr;": "\u21fe",
    "robrk;": "\u27e7",
    "ropar;": "\u2986",
    "ropf;": "\U0001d563",
    "roplus;": "\u2a2e",
    "rotimes;": "\u2a35",
    "rpar;": ")",
    "rpargt;": "\u2994",
    "rppolint;": "\u2a12",
    "rrarr;": "\u21c9",
    "rsaquo;": "\u203a",
    "rscr;": "\U0001d4c7",
    "rsh;": "\u21b1",
    "rsqb;": "]",
    "rsquo;": "\u2019",
    "rsquor;": "\u2019",
    "rthree;": "\u22cc",
    "rtimes;": "\u22ca",
    "rtri;": "\u25b9",
    "rtrie;": "\u22b5",
    "rtrif;": "\u25b8",
    "rtriltri;": "\u29ce",
    "ruluhar;": "\u2968",
    "rx;": "\u211e",
    "sacute;": "\u015b",
    "sbquo;": "\u201a",
    "sc;": "\u227b",
    "scE;": "\u2ab4",
    "scap;": "\u2ab8",
    "scaron;": "\u0161",
    "sccue;": "\u227d",
    "sce;": "\u2ab0",
    "scedil;": "\u015f",
    "scirc;": "\u015d",
    "scnE;": "\u2ab6",
    "scnap;": "\u2aba",
    "scnsim;": "\u22e9",
    "scpolint;": "\u2a13",
    "scsim;": "\u227f",
    "scy;": "\u0441",
    "sdot;": "\u22c5",
    "sdotb;": "\u22a1",
    "sdote;": "\u2a66",
    "seArr;": "\u21d8",
    "searhk;": "\u2925",
    "searr;": "\u2198",
    "searrow;": "\u2198",
    "sect": "\xa7",
    "sect;": "\xa7",
    "semi;": ";",
    "seswar;": "\u2929",
    "setminus;": "\u2216",
    "setmn;": "\u2216",
    "sext;": "\u2736",
    "sfr;": "\U0001d530",
    "sfrown;": "\u2322",
    "sharp;": "\u266f",
    "shchcy;": "\u0449",
    "shcy;": "\u0448",
    "shortmid;": "\u2223",
    "shortparallel;": "\u2225",
    "shy": "\xad",
    "shy;": "\xad",
    "sigma;": "\u03c3",
    "sigmaf;": "\u03c2",
    "sigmav;": "\u03c2",
    "sim;": "\u223c",
    "simdot;": "\u2a6a",
    "sime;": "\u2243",
    "simeq;": "\u2243",
    "simg;": "\u2a9e",
    "simgE;": "\u2aa0",
    "siml;": "\u2a9d",
    "simlE;": "\u2a9f",
    "simne;": "\u2246",
    "simplus;": "\u2a24",
    "simrarr;": "\u2972",
    "slarr;": "\u2190",
    "smallsetminus;": "\u2216",
    "smashp;": "\u2a33",
    "smeparsl;": "\u29e4",
    "smid;": "\u2223",
    "smile;": "\u2323",
    "smt;": "\u2aaa",
    "smte;": "\u2aac",
    "smtes;": "\u2aac\ufe00",
    "softcy;": "\u044c",
    "sol;": "/",
    "solb;": "\u29c4",
    "solbar;": "\u233f",
    "sopf;": "\U0001d564",
    "spades;": "\u2660",
    "spadesuit;": "\u2660",
    "spar;": "\u2225",
    "sqcap;": "\u2293",
    "sqcaps;": "\u2293\ufe00",
    "sqcup;": "\u2294",
    "sqcups;": "\u2294\ufe00",
    "sqsub;": "\u228f",
    "sqsube;": "\u2291",
    "sqsubset;": "\u228f",
    "sqsubseteq;": "\u2291",
    "sqsup;": "\u2290",
    "sqsupe;": "\u2292",
    "sqsupset;": "\u2290",
    "sqsupseteq;": "\u2292",
    "squ;": "\u25a1",
    "square;": "\u25a1",
    "squarf;": "\u25aa",
    "squf;": "\u25aa",
    "srarr;": "\u2192",
    "sscr;": "\U0001d4c8",
    "ssetmn;": "\u2216",
    "ssmile;": "\u2323",
    "sstarf;": "\u22c6",
    "star;": "\u2606",
    "starf;": "\u2605",
    "straightepsilon;": "\u03f5",
    "straightphi;": "\u03d5",
    "strns;": "\xaf",
    "sub;": "\u2282",
    "subE;": "\u2ac5",
    "subdot;": "\u2abd",
    "sube;": "\u2286",
    "subedot;": "\u2ac3",
    "submult;": "\u2ac1",
    "subnE;": "\u2acb",
    "subne;": "\u228a",
    "subplus;": "\u2abf",
    "subrarr;": "\u2979",
    "subset;": "\u2282",
    "subseteq;": "\u2286",
    "subseteqq;": "\u2ac5",
    "subsetneq;": "\u228a",
    "subsetneqq;": "\u2acb",
    "subsim;": "\u2ac7",
    "subsub;": "\u2ad5",
    "subsup;": "\u2ad3",
    "succ;": "\u227b",
    "succapprox;": "\u2ab8",
    "succcurlyeq;": "\u227d",
    "succeq;": "\u2ab0",
    "succnapprox;": "\u2aba",
    "succneqq;": "\u2ab6",
    "succnsim;": "\u22e9",
    "succsim;": "\u227f",
    "sum;": "\u2211",
    "sung;": "\u266a",
    "sup1": "\xb9",
    "sup1;": "\xb9",
    "sup2": "\xb2",
    "sup2;": "\xb2",
    "sup3": "\xb3",
    "sup3;": "\xb3",
    "sup;": "\u2283",
    "supE;": "\u2ac6",
    "supdot;": "\u2abe",
    "supdsub;": "\u2ad8",
    "supe;": "\u2287",
    "supedot;": "\u2ac4",
    "suphsol;": "\u27c9",
    "suphsub;": "\u2ad7",
    "suplarr;": "\u297b",
    "supmult;": "\u2ac2",
    "supnE;": "\u2acc",
    "supne;": "\u228b",
    "supplus;": "\u2ac0",
    "supset;": "\u2283",
    "supseteq;": "\u2287",
    "supseteqq;": "\u2ac6",
    "supsetneq;": "\u228b",
    "supsetneqq;": "\u2acc",
    "supsim;": "\u2ac8",
    "supsub;": "\u2ad4",
    "supsup;": "\u2ad6",
    "swArr;": "\u21d9",
    "swarhk;": "\u2926",
    "swarr;": "\u2199",
    "swarrow;": "\u2199",
    "swnwar;": "\u292a",
    "szlig": "\xdf",
    "szlig;": "\xdf",
    "target;": "\u2316",
    "tau;": "\u03c4",
    "tbrk;": "\u23b4",
    "tcaron;": "\u0165",
    "tcedil;": "\u0163",
    "tcy;": "\u0442",
    "tdot;": "\u20db",
    "telrec;": "\u2315",
    "tfr;": "\U0001d531",
    "there4;": "\u2234",
    "therefore;": "\u2234",
    "theta;": "\u03b8",
    "thetasym;": "\u03d1",
    "thetav;": "\u03d1",
    "thickapprox;": "\u2248",
    "thicksim;": "\u223c",
    "thinsp;": "\u2009",
    "thkap;": "\u2248",
    "thksim;": "\u223c",
    "thorn": "\xfe",
    "thorn;": "\xfe",
    "tilde;": "\u02dc",
    "times": "\xd7",
    "times;": "\xd7",
    "timesb;": "\u22a0",
    "timesbar;": "\u2a31",
    "timesd;": "\u2a30",
    "tint;": "\u222d",
    "toea;": "\u2928",
    "top;": "\u22a4",
    "topbot;": "\u2336",
    "topcir;": "\u2af1",
    "topf;": "\U0001d565",
    "topfork;": "\u2ada",
    "tosa;": "\u2929",
    "tprime;": "\u2034",
    "trade;": "\u2122",
    "triangle;": "\u25b5",
    "triangledown;": "\u25bf",
    "triangleleft;": "\u25c3",
    "trianglelefteq;": "\u22b4",
    "triangleq;": "\u225c",
    "triangleright;": "\u25b9",
    "trianglerighteq;": "\u22b5",
    "tridot;": "\u25ec",
    "trie;": "\u225c",
    "triminus;": "\u2a3a",
    "triplus;": "\u2a39",
    "trisb;": "\u29cd",
    "tritime;": "\u2a3b",
    "trpezium;": "\u23e2",
    "tscr;": "\U0001d4c9",
    "tscy;": "\u0446",
    "tshcy;": "\u045b",
    "tstrok;": "\u0167",
    "twixt;": "\u226c",
    "twoheadleftarrow;": "\u219e",
    "twoheadrightarrow;": "\u21a0",
    "uArr;": "\u21d1",
    "uHar;": "\u2963",
    "uacute": "\xfa",
    "uacute;": "\xfa",
    "uarr;": "\u2191",
    "ubrcy;": "\u045e",
    "ubreve;": "\u016d",
    "ucirc": "\xfb",
    "ucirc;": "\xfb",
    "ucy;": "\u0443",
    "udarr;": "\u21c5",
    "udblac;": "\u0171",
    "udhar;": "\u296e",
    "ufisht;": "\u297e",
    "ufr;": "\U0001d532",
    "ugrave": "\xf9",
    "ugrave;": "\xf9",
    "uharl;": "\u21bf",
    "uharr;": "\u21be",
    "uhblk;": "\u2580",
    "ulcorn;": "\u231c",
    "ulcorner;": "\u231c",
    "ulcrop;": "\u230f",
    "ultri;": "\u25f8",
    "umacr;": "\u016b",
    "uml": "\xa8",
    "uml;": "\xa8",
    "uogon;": "\u0173",
    "uopf;": "\U0001d566",
    "uparrow;": "\u2191",
    "updownarrow;": "\u2195",
    "upharpoonleft;": "\u21bf",
    "upharpoonright;": "\u21be",
    "uplus;": "\u228e",
    "upsi;": "\u03c5",
    "upsih;": "\u03d2",
    "upsilon;": "\u03c5",
    "upuparrows;": "\u21c8",
    "urcorn;": "\u231d",
    "urcorner;": "\u231d",
    "urcrop;": "\u230e",
    "uring;": "\u016f",
    "urtri;": "\u25f9",
    "uscr;": "\U0001d4ca",
    "utdot;": "\u22f0",
    "utilde;": "\u0169",
    "utri;": "\u25b5",
    "utrif;": "\u25b4",
    "uuarr;": "\u21c8",
    "uuml": "\xfc",
    "uuml;": "\xfc",
    "uwangle;": "\u29a7",
    "vArr;": "\u21d5",
    "vBar;": "\u2ae8",
    "vBarv;": "\u2ae9",
    "vDash;": "\u22a8",
    "vangrt;": "\u299c",
    "varepsilon;": "\u03f5",
    "varkappa;": "\u03f0",
    "varnothing;": "\u2205",
    "varphi;": "\u03d5",
    "varpi;": "\u03d6",
    "varpropto;": "\u221d",
    "varr;": "\u2195",
    "varrho;": "\u03f1",
    "varsigma;": "\u03c2",
    "varsubsetneq;": "\u228a\ufe00",
    "varsubsetneqq;": "\u2acb\ufe00",
    "varsupsetneq;": "\u228b\ufe00",
    "varsupsetneqq;": "\u2acc\ufe00",
    "vartheta;": "\u03d1",
    "vartriangleleft;": "\u22b2",
    "vartriangleright;": "\u22b3",
    "vcy;": "\u0432",
    "vdash;": "\u22a2",
    "vee;": "\u2228",
    "veebar;": "\u22bb",
    "veeeq;": "\u225a",
    "vellip;": "\u22ee",
    "verbar;": "|",
    "vert;": "|",
    "vfr;": "\U0001d533",
    "vltri;": "\u22b2",
    "vnsub;": "\u2282\u20d2",
    "vnsup;": "\u2283\u20d2",
    "vopf;": "\U0001d567",
    "vprop;": "\u221d",
    "vrtri;": "\u22b3",
    "vscr;": "\U0001d4cb",
    "vsubnE;": "\u2acb\ufe00",
    "vsubne;": "\u228a\ufe00",
    "vsupnE;": "\u2acc\ufe00",
    "vsupne;": "\u228b\ufe00",
    "vzigzag;": "\u299a",
    "wcirc;": "\u0175",
    "wedbar;": "\u2a5f",
    "wedge;": "\u2227",
    "wedgeq;": "\u2259",
    "weierp;": "\u2118",
    "wfr;": "\U0001d534",
    "wopf;": "\U0001d568",
    "wp;": "\u2118",
    "wr;": "\u2240",
    "wreath;": "\u2240",
    "wscr;": "\U0001d4cc",
    "xcap;": "\u22c2",
    "xcirc;": "\u25ef",
    "xcup;": "\u22c3",
    "xdtri;": "\u25bd",
    "xfr;": "\U0001d535",
    "xhArr;": "\u27fa",
    "xharr;": "\u27f7",
    "xi;": "\u03be",
    "xlArr;": "\u27f8",
    "xlarr;": "\u27f5",
    "xmap;": "\u27fc",
    "xnis;": "\u22fb",
    "xodot;": "\u2a00",
    "xopf;": "\U0001d569",
    "xoplus;": "\u2a01",
    "xotime;": "\u2a02",
    "xrArr;": "\u27f9",
    "xrarr;": "\u27f6",
    "xscr;": "\U0001d4cd",
    "xsqcup;": "\u2a06",
    "xuplus;": "\u2a04",
    "xutri;": "\u25b3",
    "xvee;": "\u22c1",
    "xwedge;": "\u22c0",
    "yacute": "\xfd",
    "yacute;": "\xfd",
    "yacy;": "\u044f",
    "ycirc;": "\u0177",
    "ycy;": "\u044b",
    "yen": "\xa5",
    "yen;": "\xa5",
    "yfr;": "\U0001d536",
    "yicy;": "\u0457",
    "yopf;": "\U0001d56a",
    "yscr;": "\U0001d4ce",
    "yucy;": "\u044e",
    "yuml": "\xff",
    "yuml;": "\xff",
    "zacute;": "\u017a",
    "zcaron;": "\u017e",
    "zcy;": "\u0437",
    "zdot;": "\u017c",
    "zeetrf;": "\u2128",
    "zeta;": "\u03b6",
    "zfr;": "\U0001d537",
    "zhcy;": "\u0436",
    "zigrarr;": "\u21dd",
    "zopf;": "\U0001d56b",
    "zscr;": "\U0001d4cf",
    "zwj;": "\u200d",
    "zwnj;": "\u200c",
}

replacementCharacters = {
    0x0: "\uFFFD",
    0x0d: "\u000D",
    0x80: "\u20AC",
    0x81: "\u0081",
    0x81: "\u0081",
    0x82: "\u201A",
    0x83: "\u0192",
    0x84: "\u201E",
    0x85: "\u2026",
    0x86: "\u2020",
    0x87: "\u2021",
    0x88: "\u02C6",
    0x89: "\u2030",
    0x8A: "\u0160",
    0x8B: "\u2039",
    0x8C: "\u0152",
    0x8D: "\u008D",
    0x8E: "\u017D",
    0x8F: "\u008F",
    0x90: "\u0090",
    0x91: "\u2018",
    0x92: "\u2019",
    0x93: "\u201C",
    0x94: "\u201D",
    0x95: "\u2022",
    0x96: "\u2013",
    0x97: "\u2014",
    0x98: "\u02DC",
    0x99: "\u2122",
    0x9A: "\u0161",
    0x9B: "\u203A",
    0x9C: "\u0153",
    0x9D: "\u009D",
    0x9E: "\u017E",
    0x9F: "\u0178",
}

encodings = {
    '437': 'cp437',
    '850': 'cp850',
    '852': 'cp852',
    '855': 'cp855',
    '857': 'cp857',
    '860': 'cp860',
    '861': 'cp861',
    '862': 'cp862',
    '863': 'cp863',
    '865': 'cp865',
    '866': 'cp866',
    '869': 'cp869',
    'ansix341968': 'ascii',
    'ansix341986': 'ascii',
    'arabic': 'iso8859-6',
    'ascii': 'ascii',
    'asmo708': 'iso8859-6',
    'big5': 'big5',
    'big5hkscs': 'big5hkscs',
    'chinese': 'gbk',
    'cp037': 'cp037',
    'cp1026': 'cp1026',
    'cp154': 'ptcp154',
    'cp367': 'ascii',
    'cp424': 'cp424',
    'cp437': 'cp437',
    'cp500': 'cp500',
    'cp775': 'cp775',
    'cp819': 'windows-1252',
    'cp850': 'cp850',
    'cp852': 'cp852',
    'cp855': 'cp855',
    'cp857': 'cp857',
    'cp860': 'cp860',
    'cp861': 'cp861',
    'cp862': 'cp862',
    'cp863': 'cp863',
    'cp864': 'cp864',
    'cp865': 'cp865',
    'cp866': 'cp866',
    'cp869': 'cp869',
    'cp936': 'gbk',
    'cpgr': 'cp869',
    'cpis': 'cp861',
    'csascii': 'ascii',
    'csbig5': 'big5',
    'cseuckr': 'cp949',
    'cseucpkdfmtjapanese': 'euc_jp',
    'csgb2312': 'gbk',
    'cshproman8': 'hp-roman8',
    'csibm037': 'cp037',
    'csibm1026': 'cp1026',
    'csibm424': 'cp424',
    'csibm500': 'cp500',
    'csibm855': 'cp855',
    'csibm857': 'cp857',
    'csibm860': 'cp860',
    'csibm861': 'cp861',
    'csibm863': 'cp863',
    'csibm864': 'cp864',
    'csibm865': 'cp865',
    'csibm866': 'cp866',
    'csibm869': 'cp869',
    'csiso2022jp': 'iso2022_jp',
    'csiso2022jp2': 'iso2022_jp_2',
    'csiso2022kr': 'iso2022_kr',
    'csiso58gb231280': 'gbk',
    'csisolatin1': 'windows-1252',
    'csisolatin2': 'iso8859-2',
    'csisolatin3': 'iso8859-3',
    'csisolatin4': 'iso8859-4',
    'csisolatin5': 'windows-1254',
    'csisolatin6': 'iso8859-10',
    'csisolatinarabic': 'iso8859-6',
    'csisolatincyrillic': 'iso8859-5',
    'csisolatingreek': 'iso8859-7',
    'csisolatinhebrew': 'iso8859-8',
    'cskoi8r': 'koi8-r',
    'csksc56011987': 'cp949',
    'cspc775baltic': 'cp775',
    'cspc850multilingual': 'cp850',
    'cspc862latinhebrew': 'cp862',
    'cspc8codepage437': 'cp437',
    'cspcp852': 'cp852',
    'csptcp154': 'ptcp154',
    'csshiftjis': 'shift_jis',
    'csunicode11utf7': 'utf-7',
    'cyrillic': 'iso8859-5',
    'cyrillicasian': 'ptcp154',
    'ebcdiccpbe': 'cp500',
    'ebcdiccpca': 'cp037',
    'ebcdiccpch': 'cp500',
    'ebcdiccphe': 'cp424',
    'ebcdiccpnl': 'cp037',
    'ebcdiccpus': 'cp037',
    'ebcdiccpwt': 'cp037',
    'ecma114': 'iso8859-6',
    'ecma118': 'iso8859-7',
    'elot928': 'iso8859-7',
    'eucjp': 'euc_jp',
    'euckr': 'cp949',
    'extendedunixcodepackedformatforjapanese': 'euc_jp',
    'gb18030': 'gb18030',
    'gb2312': 'gbk',
    'gb231280': 'gbk',
    'gbk': 'gbk',
    'greek': 'iso8859-7',
    'greek8': 'iso8859-7',
    'hebrew': 'iso8859-8',
    'hproman8': 'hp-roman8',
    'hzgb2312': 'hz',
    'ibm037': 'cp037',
    'ibm1026': 'cp1026',
    'ibm367': 'ascii',
    'ibm424': 'cp424',
    'ibm437': 'cp437',
    'ibm500': 'cp500',
    'ibm775': 'cp775',
    'ibm819': 'windows-1252',
    'ibm850': 'cp850',
    'ibm852': 'cp852',
    'ibm855': 'cp855',
    'ibm857': 'cp857',
    'ibm860': 'cp860',
    'ibm861': 'cp861',
    'ibm862': 'cp862',
    'ibm863': 'cp863',
    'ibm864': 'cp864',
    'ibm865': 'cp865',
    'ibm866': 'cp866',
    'ibm869': 'cp869',
    'iso2022jp': 'iso2022_jp',
    'iso2022jp2': 'iso2022_jp_2',
    'iso2022kr': 'iso2022_kr',
    'iso646irv1991': 'ascii',
    'iso646us': 'ascii',
    'iso88591': 'windows-1252',
    'iso885910': 'iso8859-10',
    'iso8859101992': 'iso8859-10',
    'iso885911987': 'windows-1252',
    'iso885913': 'iso8859-13',
    'iso885914': 'iso8859-14',
    'iso8859141998': 'iso8859-14',
    'iso885915': 'iso8859-15',
    'iso885916': 'iso8859-16',
    'iso8859162001': 'iso8859-16',
    'iso88592': 'iso8859-2',
    'iso885921987': 'iso8859-2',
    'iso88593': 'iso8859-3',
    'iso885931988': 'iso8859-3',
    'iso88594': 'iso8859-4',
    'iso885941988': 'iso8859-4',
    'iso88595': 'iso8859-5',
    'iso885951988': 'iso8859-5',
    'iso88596': 'iso8859-6',
    'iso885961987': 'iso8859-6',
    'iso88597': 'iso8859-7',
    'iso885971987': 'iso8859-7',
    'iso88598': 'iso8859-8',
    'iso885981988': 'iso8859-8',
    'iso88599': 'windows-1254',
    'iso885991989': 'windows-1254',
    'isoceltic': 'iso8859-14',
    'isoir100': 'windows-1252',
    'isoir101': 'iso8859-2',
    'isoir109': 'iso8859-3',
    'isoir110': 'iso8859-4',
    'isoir126': 'iso8859-7',
    'isoir127': 'iso8859-6',
    'isoir138': 'iso8859-8',
    'isoir144': 'iso8859-5',
    'isoir148': 'windows-1254',
    'isoir149': 'cp949',
    'isoir157': 'iso8859-10',
    'isoir199': 'iso8859-14',
    'isoir226': 'iso8859-16',
    'isoir58': 'gbk',
    'isoir6': 'ascii',
    'koi8r': 'koi8-r',
    'koi8u': 'koi8-u',
    'korean': 'cp949',
    'ksc5601': 'cp949',
    'ksc56011987': 'cp949',
    'ksc56011989': 'cp949',
    'l1': 'windows-1252',
    'l10': 'iso8859-16',
    'l2': 'iso8859-2',
    'l3': 'iso8859-3',
    'l4': 'iso8859-4',
    'l5': 'windows-1254',
    'l6': 'iso8859-10',
    'l8': 'iso8859-14',
    'latin1': 'windows-1252',
    'latin10': 'iso8859-16',
    'latin2': 'iso8859-2',
    'latin3': 'iso8859-3',
    'latin4': 'iso8859-4',
    'latin5': 'windows-1254',
    'latin6': 'iso8859-10',
    'latin8': 'iso8859-14',
    'latin9': 'iso8859-15',
    'ms936': 'gbk',
    'mskanji': 'shift_jis',
    'pt154': 'ptcp154',
    'ptcp154': 'ptcp154',
    'r8': 'hp-roman8',
    'roman8': 'hp-roman8',
    'shiftjis': 'shift_jis',
    'tis620': 'cp874',
    'unicode11utf7': 'utf-7',
    'us': 'ascii',
    'usascii': 'ascii',
    'utf16': 'utf-16',
    'utf16be': 'utf-16-be',
    'utf16le': 'utf-16-le',
    'utf8': 'utf-8',
    'windows1250': 'cp1250',
    'windows1251': 'cp1251',
    'windows1252': 'cp1252',
    'windows1253': 'cp1253',
    'windows1254': 'cp1254',
    'windows1255': 'cp1255',
    'windows1256': 'cp1256',
    'windows1257': 'cp1257',
    'windows1258': 'cp1258',
    'windows936': 'gbk',
    'x-x-big5': 'big5'}

tokenTypes = {
    "Doctype": 0,
    "Characters": 1,
    "SpaceCharacters": 2,
    "StartTag": 3,
    "EndTag": 4,
    "EmptyTag": 5,
    "Comment": 6,
    "ParseError": 7
}

tagTokenTypes = frozenset((tokenTypes["StartTag"], tokenTypes["EndTag"],
                           tokenTypes["EmptyTag"]))


prefixes = dict([(v, k) for k, v in namespaces.items()])
prefixes["http://www.w3.org/1998/Math/MathML"] = "math"


class DataLossWarning(UserWarning):
    pass


class ReparseException(Exception):
    pass
python3.3/site-packages/pip/_vendor/html5lib/html5parser.py000064400000344445151733566750017655 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import with_metaclass

import types

from . import inputstream
from . import tokenizer

from . import treebuilders
from .treebuilders._base import Marker

from . import utils
from . import constants
from .constants import spaceCharacters, asciiUpper2Lower
from .constants import specialElements
from .constants import headingElements
from .constants import cdataElements, rcdataElements
from .constants import tokenTypes, ReparseException, namespaces
from .constants import htmlIntegrationPointElements, mathmlTextIntegrationPointElements
from .constants import adjustForeignAttributes as adjustForeignAttributesMap


def parse(doc, treebuilder="etree", encoding=None,
          namespaceHTMLElements=True):
    """Parse a string or file-like object into a tree"""
    tb = treebuilders.getTreeBuilder(treebuilder)
    p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements)
    return p.parse(doc, encoding=encoding)


def parseFragment(doc, container="div", treebuilder="etree", encoding=None,
                  namespaceHTMLElements=True):
    tb = treebuilders.getTreeBuilder(treebuilder)
    p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements)
    return p.parseFragment(doc, container=container, encoding=encoding)


def method_decorator_metaclass(function):
    class Decorated(type):
        def __new__(meta, classname, bases, classDict):
            for attributeName, attribute in classDict.items():
                if isinstance(attribute, types.FunctionType):
                    attribute = function(attribute)

                classDict[attributeName] = attribute
            return type.__new__(meta, classname, bases, classDict)
    return Decorated


class HTMLParser(object):
    """HTML parser. Generates a tree structure from a stream of (possibly
        malformed) HTML"""

    def __init__(self, tree=None, tokenizer=tokenizer.HTMLTokenizer,
                 strict=False, namespaceHTMLElements=True, debug=False):
        """
        strict - raise an exception when a parse error is encountered

        tree - a treebuilder class controlling the type of tree that will be
        returned. Built in treebuilders can be accessed through
        html5lib.treebuilders.getTreeBuilder(treeType)

        tokenizer - a class that provides a stream of tokens to the treebuilder.
        This may be replaced for e.g. a sanitizer which converts some tags to
        text
        """

        # Raise an exception on the first error encountered
        self.strict = strict

        if tree is None:
            tree = treebuilders.getTreeBuilder("etree")
        self.tree = tree(namespaceHTMLElements)
        self.tokenizer_class = tokenizer
        self.errors = []

        self.phases = dict([(name, cls(self, self.tree)) for name, cls in
                            getPhases(debug).items()])

    def _parse(self, stream, innerHTML=False, container="div",
               encoding=None, parseMeta=True, useChardet=True, **kwargs):

        self.innerHTMLMode = innerHTML
        self.container = container
        self.tokenizer = self.tokenizer_class(stream, encoding=encoding,
                                              parseMeta=parseMeta,
                                              useChardet=useChardet,
                                              parser=self, **kwargs)
        self.reset()

        while True:
            try:
                self.mainLoop()
                break
            except ReparseException:
                self.reset()

    def reset(self):
        self.tree.reset()
        self.firstStartTag = False
        self.errors = []
        self.log = []  # only used with debug mode
        # "quirks" / "limited quirks" / "no quirks"
        self.compatMode = "no quirks"

        if self.innerHTMLMode:
            self.innerHTML = self.container.lower()

            if self.innerHTML in cdataElements:
                self.tokenizer.state = self.tokenizer.rcdataState
            elif self.innerHTML in rcdataElements:
                self.tokenizer.state = self.tokenizer.rawtextState
            elif self.innerHTML == 'plaintext':
                self.tokenizer.state = self.tokenizer.plaintextState
            else:
                # state already is data state
                # self.tokenizer.state = self.tokenizer.dataState
                pass
            self.phase = self.phases["beforeHtml"]
            self.phase.insertHtmlElement()
            self.resetInsertionMode()
        else:
            self.innerHTML = False
            self.phase = self.phases["initial"]

        self.lastPhase = None

        self.beforeRCDataPhase = None

        self.framesetOK = True

    def isHTMLIntegrationPoint(self, element):
        if (element.name == "annotation-xml" and
                element.namespace == namespaces["mathml"]):
            return ("encoding" in element.attributes and
                    element.attributes["encoding"].translate(
                        asciiUpper2Lower) in
                    ("text/html", "application/xhtml+xml"))
        else:
            return (element.namespace, element.name) in htmlIntegrationPointElements

    def isMathMLTextIntegrationPoint(self, element):
        return (element.namespace, element.name) in mathmlTextIntegrationPointElements

    def mainLoop(self):
        CharactersToken = tokenTypes["Characters"]
        SpaceCharactersToken = tokenTypes["SpaceCharacters"]
        StartTagToken = tokenTypes["StartTag"]
        EndTagToken = tokenTypes["EndTag"]
        CommentToken = tokenTypes["Comment"]
        DoctypeToken = tokenTypes["Doctype"]
        ParseErrorToken = tokenTypes["ParseError"]

        for token in self.normalizedTokens():
            new_token = token
            while new_token is not None:
                currentNode = self.tree.openElements[-1] if self.tree.openElements else None
                currentNodeNamespace = currentNode.namespace if currentNode else None
                currentNodeName = currentNode.name if currentNode else None

                type = new_token["type"]

                if type == ParseErrorToken:
                    self.parseError(new_token["data"], new_token.get("datavars", {}))
                    new_token = None
                else:
                    if (len(self.tree.openElements) == 0 or
                        currentNodeNamespace == self.tree.defaultNamespace or
                        (self.isMathMLTextIntegrationPoint(currentNode) and
                         ((type == StartTagToken and
                           token["name"] not in frozenset(["mglyph", "malignmark"])) or
                          type in (CharactersToken, SpaceCharactersToken))) or
                        (currentNodeNamespace == namespaces["mathml"] and
                         currentNodeName == "annotation-xml" and
                         token["name"] == "svg") or
                        (self.isHTMLIntegrationPoint(currentNode) and
                         type in (StartTagToken, CharactersToken, SpaceCharactersToken))):
                        phase = self.phase
                    else:
                        phase = self.phases["inForeignContent"]

                    if type == CharactersToken:
                        new_token = phase.processCharacters(new_token)
                    elif type == SpaceCharactersToken:
                        new_token = phase.processSpaceCharacters(new_token)
                    elif type == StartTagToken:
                        new_token = phase.processStartTag(new_token)
                    elif type == EndTagToken:
                        new_token = phase.processEndTag(new_token)
                    elif type == CommentToken:
                        new_token = phase.processComment(new_token)
                    elif type == DoctypeToken:
                        new_token = phase.processDoctype(new_token)

            if (type == StartTagToken and token["selfClosing"]
                    and not token["selfClosingAcknowledged"]):
                self.parseError("non-void-element-with-trailing-solidus",
                                {"name": token["name"]})

        # When the loop finishes it's EOF
        reprocess = True
        phases = []
        while reprocess:
            phases.append(self.phase)
            reprocess = self.phase.processEOF()
            if reprocess:
                assert self.phase not in phases

    def normalizedTokens(self):
        for token in self.tokenizer:
            yield self.normalizeToken(token)

    def parse(self, stream, encoding=None, parseMeta=True, useChardet=True):
        """Parse a HTML document into a well-formed tree

        stream - a filelike object or string containing the HTML to be parsed

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)
        """
        self._parse(stream, innerHTML=False, encoding=encoding,
                    parseMeta=parseMeta, useChardet=useChardet)
        return self.tree.getDocument()

    def parseFragment(self, stream, container="div", encoding=None,
                      parseMeta=False, useChardet=True):
        """Parse a HTML fragment into a well-formed tree fragment

        container - name of the element we're setting the innerHTML property
        if set to None, default to 'div'

        stream - a filelike object or string containing the HTML to be parsed

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)
        """
        self._parse(stream, True, container=container, encoding=encoding)
        return self.tree.getFragment()

    def parseError(self, errorcode="XXX-undefined-error", datavars={}):
        # XXX The idea is to make errorcode mandatory.
        self.errors.append((self.tokenizer.stream.position(), errorcode, datavars))
        if self.strict:
            raise ParseError

    def normalizeToken(self, token):
        """ HTML5 specific normalizations to the token stream """

        if token["type"] == tokenTypes["StartTag"]:
            token["data"] = dict(token["data"][::-1])

        return token

    def adjustMathMLAttributes(self, token):
        replacements = {"definitionurl": "definitionURL"}
        for k, v in replacements.items():
            if k in token["data"]:
                token["data"][v] = token["data"][k]
                del token["data"][k]

    def adjustSVGAttributes(self, token):
        replacements = {
            "attributename": "attributeName",
            "attributetype": "attributeType",
            "basefrequency": "baseFrequency",
            "baseprofile": "baseProfile",
            "calcmode": "calcMode",
            "clippathunits": "clipPathUnits",
            "contentscripttype": "contentScriptType",
            "contentstyletype": "contentStyleType",
            "diffuseconstant": "diffuseConstant",
            "edgemode": "edgeMode",
            "externalresourcesrequired": "externalResourcesRequired",
            "filterres": "filterRes",
            "filterunits": "filterUnits",
            "glyphref": "glyphRef",
            "gradienttransform": "gradientTransform",
            "gradientunits": "gradientUnits",
            "kernelmatrix": "kernelMatrix",
            "kernelunitlength": "kernelUnitLength",
            "keypoints": "keyPoints",
            "keysplines": "keySplines",
            "keytimes": "keyTimes",
            "lengthadjust": "lengthAdjust",
            "limitingconeangle": "limitingConeAngle",
            "markerheight": "markerHeight",
            "markerunits": "markerUnits",
            "markerwidth": "markerWidth",
            "maskcontentunits": "maskContentUnits",
            "maskunits": "maskUnits",
            "numoctaves": "numOctaves",
            "pathlength": "pathLength",
            "patterncontentunits": "patternContentUnits",
            "patterntransform": "patternTransform",
            "patternunits": "patternUnits",
            "pointsatx": "pointsAtX",
            "pointsaty": "pointsAtY",
            "pointsatz": "pointsAtZ",
            "preservealpha": "preserveAlpha",
            "preserveaspectratio": "preserveAspectRatio",
            "primitiveunits": "primitiveUnits",
            "refx": "refX",
            "refy": "refY",
            "repeatcount": "repeatCount",
            "repeatdur": "repeatDur",
            "requiredextensions": "requiredExtensions",
            "requiredfeatures": "requiredFeatures",
            "specularconstant": "specularConstant",
            "specularexponent": "specularExponent",
            "spreadmethod": "spreadMethod",
            "startoffset": "startOffset",
            "stddeviation": "stdDeviation",
            "stitchtiles": "stitchTiles",
            "surfacescale": "surfaceScale",
            "systemlanguage": "systemLanguage",
            "tablevalues": "tableValues",
            "targetx": "targetX",
            "targety": "targetY",
            "textlength": "textLength",
            "viewbox": "viewBox",
            "viewtarget": "viewTarget",
            "xchannelselector": "xChannelSelector",
            "ychannelselector": "yChannelSelector",
            "zoomandpan": "zoomAndPan"
        }
        for originalName in list(token["data"].keys()):
            if originalName in replacements:
                svgName = replacements[originalName]
                token["data"][svgName] = token["data"][originalName]
                del token["data"][originalName]

    def adjustForeignAttributes(self, token):
        replacements = adjustForeignAttributesMap

        for originalName in token["data"].keys():
            if originalName in replacements:
                foreignName = replacements[originalName]
                token["data"][foreignName] = token["data"][originalName]
                del token["data"][originalName]

    def reparseTokenNormal(self, token):
        self.parser.phase()

    def resetInsertionMode(self):
        # The name of this method is mostly historical. (It's also used in the
        # specification.)
        last = False
        newModes = {
            "select": "inSelect",
            "td": "inCell",
            "th": "inCell",
            "tr": "inRow",
            "tbody": "inTableBody",
            "thead": "inTableBody",
            "tfoot": "inTableBody",
            "caption": "inCaption",
            "colgroup": "inColumnGroup",
            "table": "inTable",
            "head": "inBody",
            "body": "inBody",
            "frameset": "inFrameset",
            "html": "beforeHead"
        }
        for node in self.tree.openElements[::-1]:
            nodeName = node.name
            new_phase = None
            if node == self.tree.openElements[0]:
                assert self.innerHTML
                last = True
                nodeName = self.innerHTML
            # Check for conditions that should only happen in the innerHTML
            # case
            if nodeName in ("select", "colgroup", "head", "html"):
                assert self.innerHTML

            if not last and node.namespace != self.tree.defaultNamespace:
                continue

            if nodeName in newModes:
                new_phase = self.phases[newModes[nodeName]]
                break
            elif last:
                new_phase = self.phases["inBody"]
                break

        self.phase = new_phase

    def parseRCDataRawtext(self, token, contentType):
        """Generic RCDATA/RAWTEXT Parsing algorithm
        contentType - RCDATA or RAWTEXT
        """
        assert contentType in ("RAWTEXT", "RCDATA")

        self.tree.insertElement(token)

        if contentType == "RAWTEXT":
            self.tokenizer.state = self.tokenizer.rawtextState
        else:
            self.tokenizer.state = self.tokenizer.rcdataState

        self.originalPhase = self.phase

        self.phase = self.phases["text"]


def getPhases(debug):
    def log(function):
        """Logger that records which phase processes each token"""
        type_names = dict((value, key) for key, value in
                          constants.tokenTypes.items())

        def wrapped(self, *args, **kwargs):
            if function.__name__.startswith("process") and len(args) > 0:
                token = args[0]
                try:
                    info = {"type": type_names[token['type']]}
                except:
                    raise
                if token['type'] in constants.tagTokenTypes:
                    info["name"] = token['name']

                self.parser.log.append((self.parser.tokenizer.state.__name__,
                                        self.parser.phase.__class__.__name__,
                                        self.__class__.__name__,
                                        function.__name__,
                                        info))
                return function(self, *args, **kwargs)
            else:
                return function(self, *args, **kwargs)
        return wrapped

    def getMetaclass(use_metaclass, metaclass_func):
        if use_metaclass:
            return method_decorator_metaclass(metaclass_func)
        else:
            return type

    class Phase(with_metaclass(getMetaclass(debug, log))):
        """Base class for helper object that implements each phase of processing
        """

        def __init__(self, parser, tree):
            self.parser = parser
            self.tree = tree

        def processEOF(self):
            raise NotImplementedError

        def processComment(self, token):
            # For most phases the following is correct. Where it's not it will be
            # overridden.
            self.tree.insertComment(token, self.tree.openElements[-1])

        def processDoctype(self, token):
            self.parser.parseError("unexpected-doctype")

        def processCharacters(self, token):
            self.tree.insertText(token["data"])

        def processSpaceCharacters(self, token):
            self.tree.insertText(token["data"])

        def processStartTag(self, token):
            return self.startTagHandler[token["name"]](token)

        def startTagHtml(self, token):
            if not self.parser.firstStartTag and token["name"] == "html":
                self.parser.parseError("non-html-root")
            # XXX Need a check here to see if the first start tag token emitted is
            # this token... If it's not, invoke self.parser.parseError().
            for attr, value in token["data"].items():
                if attr not in self.tree.openElements[0].attributes:
                    self.tree.openElements[0].attributes[attr] = value
            self.parser.firstStartTag = False

        def processEndTag(self, token):
            return self.endTagHandler[token["name"]](token)

    class InitialPhase(Phase):
        def processSpaceCharacters(self, token):
            pass

        def processComment(self, token):
            self.tree.insertComment(token, self.tree.document)

        def processDoctype(self, token):
            name = token["name"]
            publicId = token["publicId"]
            systemId = token["systemId"]
            correct = token["correct"]

            if (name != "html" or publicId is not None or
                    systemId is not None and systemId != "about:legacy-compat"):
                self.parser.parseError("unknown-doctype")

            if publicId is None:
                publicId = ""

            self.tree.insertDoctype(token)

            if publicId != "":
                publicId = publicId.translate(asciiUpper2Lower)

            if (not correct or token["name"] != "html"
                or publicId.startswith(
                    ("+//silmaril//dtd html pro v0r11 19970101//",
                     "-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
                     "-//as//dtd html 3.0 aswedit + extensions//",
                     "-//ietf//dtd html 2.0 level 1//",
                     "-//ietf//dtd html 2.0 level 2//",
                     "-//ietf//dtd html 2.0 strict level 1//",
                     "-//ietf//dtd html 2.0 strict level 2//",
                     "-//ietf//dtd html 2.0 strict//",
                     "-//ietf//dtd html 2.0//",
                     "-//ietf//dtd html 2.1e//",
                     "-//ietf//dtd html 3.0//",
                     "-//ietf//dtd html 3.2 final//",
                     "-//ietf//dtd html 3.2//",
                     "-//ietf//dtd html 3//",
                     "-//ietf//dtd html level 0//",
                     "-//ietf//dtd html level 1//",
                     "-//ietf//dtd html level 2//",
                     "-//ietf//dtd html level 3//",
                     "-//ietf//dtd html strict level 0//",
                     "-//ietf//dtd html strict level 1//",
                     "-//ietf//dtd html strict level 2//",
                     "-//ietf//dtd html strict level 3//",
                     "-//ietf//dtd html strict//",
                     "-//ietf//dtd html//",
                     "-//metrius//dtd metrius presentational//",
                     "-//microsoft//dtd internet explorer 2.0 html strict//",
                     "-//microsoft//dtd internet explorer 2.0 html//",
                     "-//microsoft//dtd internet explorer 2.0 tables//",
                     "-//microsoft//dtd internet explorer 3.0 html strict//",
                     "-//microsoft//dtd internet explorer 3.0 html//",
                     "-//microsoft//dtd internet explorer 3.0 tables//",
                     "-//netscape comm. corp.//dtd html//",
                     "-//netscape comm. corp.//dtd strict html//",
                     "-//o'reilly and associates//dtd html 2.0//",
                     "-//o'reilly and associates//dtd html extended 1.0//",
                     "-//o'reilly and associates//dtd html extended relaxed 1.0//",
                     "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//",
                     "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//",
                     "-//spyglass//dtd html 2.0 extended//",
                     "-//sq//dtd html 2.0 hotmetal + extensions//",
                     "-//sun microsystems corp.//dtd hotjava html//",
                     "-//sun microsystems corp.//dtd hotjava strict html//",
                     "-//w3c//dtd html 3 1995-03-24//",
                     "-//w3c//dtd html 3.2 draft//",
                     "-//w3c//dtd html 3.2 final//",
                     "-//w3c//dtd html 3.2//",
                     "-//w3c//dtd html 3.2s draft//",
                     "-//w3c//dtd html 4.0 frameset//",
                     "-//w3c//dtd html 4.0 transitional//",
                     "-//w3c//dtd html experimental 19960712//",
                     "-//w3c//dtd html experimental 970421//",
                     "-//w3c//dtd w3 html//",
                     "-//w3o//dtd w3 html 3.0//",
                     "-//webtechs//dtd mozilla html 2.0//",
                     "-//webtechs//dtd mozilla html//"))
                or publicId in
                    ("-//w3o//dtd w3 html strict 3.0//en//",
                     "-/w3c/dtd html 4.0 transitional/en",
                     "html")
                or publicId.startswith(
                    ("-//w3c//dtd html 4.01 frameset//",
                     "-//w3c//dtd html 4.01 transitional//")) and
                    systemId is None
                    or systemId and systemId.lower() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"):
                self.parser.compatMode = "quirks"
            elif (publicId.startswith(
                    ("-//w3c//dtd xhtml 1.0 frameset//",
                     "-//w3c//dtd xhtml 1.0 transitional//"))
                  or publicId.startswith(
                      ("-//w3c//dtd html 4.01 frameset//",
                       "-//w3c//dtd html 4.01 transitional//")) and
                  systemId is not None):
                self.parser.compatMode = "limited quirks"

            self.parser.phase = self.parser.phases["beforeHtml"]

        def anythingElse(self):
            self.parser.compatMode = "quirks"
            self.parser.phase = self.parser.phases["beforeHtml"]

        def processCharacters(self, token):
            self.parser.parseError("expected-doctype-but-got-chars")
            self.anythingElse()
            return token

        def processStartTag(self, token):
            self.parser.parseError("expected-doctype-but-got-start-tag",
                                   {"name": token["name"]})
            self.anythingElse()
            return token

        def processEndTag(self, token):
            self.parser.parseError("expected-doctype-but-got-end-tag",
                                   {"name": token["name"]})
            self.anythingElse()
            return token

        def processEOF(self):
            self.parser.parseError("expected-doctype-but-got-eof")
            self.anythingElse()
            return True

    class BeforeHtmlPhase(Phase):
        # helper methods
        def insertHtmlElement(self):
            self.tree.insertRoot(impliedTagToken("html", "StartTag"))
            self.parser.phase = self.parser.phases["beforeHead"]

        # other
        def processEOF(self):
            self.insertHtmlElement()
            return True

        def processComment(self, token):
            self.tree.insertComment(token, self.tree.document)

        def processSpaceCharacters(self, token):
            pass

        def processCharacters(self, token):
            self.insertHtmlElement()
            return token

        def processStartTag(self, token):
            if token["name"] == "html":
                self.parser.firstStartTag = True
            self.insertHtmlElement()
            return token

        def processEndTag(self, token):
            if token["name"] not in ("head", "body", "html", "br"):
                self.parser.parseError("unexpected-end-tag-before-html",
                                       {"name": token["name"]})
            else:
                self.insertHtmlElement()
                return token

    class BeforeHeadPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("head", self.startTagHead)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                (("head", "body", "html", "br"), self.endTagImplyHead)
            ])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            self.startTagHead(impliedTagToken("head", "StartTag"))
            return True

        def processSpaceCharacters(self, token):
            pass

        def processCharacters(self, token):
            self.startTagHead(impliedTagToken("head", "StartTag"))
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagHead(self, token):
            self.tree.insertElement(token)
            self.tree.headPointer = self.tree.openElements[-1]
            self.parser.phase = self.parser.phases["inHead"]

        def startTagOther(self, token):
            self.startTagHead(impliedTagToken("head", "StartTag"))
            return token

        def endTagImplyHead(self, token):
            self.startTagHead(impliedTagToken("head", "StartTag"))
            return token

        def endTagOther(self, token):
            self.parser.parseError("end-tag-after-implied-root",
                                   {"name": token["name"]})

    class InHeadPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("title", self.startTagTitle),
                (("noscript", "noframes", "style"), self.startTagNoScriptNoFramesStyle),
                ("script", self.startTagScript),
                (("base", "basefont", "bgsound", "command", "link"),
                 self.startTagBaseLinkCommand),
                ("meta", self.startTagMeta),
                ("head", self.startTagHead)
            ])
            self.startTagHandler.default = self.startTagOther

            self. endTagHandler = utils.MethodDispatcher([
                ("head", self.endTagHead),
                (("br", "html", "body"), self.endTagHtmlBodyBr)
            ])
            self.endTagHandler.default = self.endTagOther

        # the real thing
        def processEOF(self):
            self.anythingElse()
            return True

        def processCharacters(self, token):
            self.anythingElse()
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagHead(self, token):
            self.parser.parseError("two-heads-are-not-better-than-one")

        def startTagBaseLinkCommand(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True

        def startTagMeta(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True

            attributes = token["data"]
            if self.parser.tokenizer.stream.charEncoding[1] == "tentative":
                if "charset" in attributes:
                    self.parser.tokenizer.stream.changeEncoding(attributes["charset"])
                elif ("content" in attributes and
                      "http-equiv" in attributes and
                      attributes["http-equiv"].lower() == "content-type"):
                    # Encoding it as UTF-8 here is a hack, as really we should pass
                    # the abstract Unicode string, and just use the
                    # ContentAttrParser on that, but using UTF-8 allows all chars
                    # to be encoded and as a ASCII-superset works.
                    data = inputstream.EncodingBytes(attributes["content"].encode("utf-8"))
                    parser = inputstream.ContentAttrParser(data)
                    codec = parser.parse()
                    self.parser.tokenizer.stream.changeEncoding(codec)

        def startTagTitle(self, token):
            self.parser.parseRCDataRawtext(token, "RCDATA")

        def startTagNoScriptNoFramesStyle(self, token):
            # Need to decide whether to implement the scripting-disabled case
            self.parser.parseRCDataRawtext(token, "RAWTEXT")

        def startTagScript(self, token):
            self.tree.insertElement(token)
            self.parser.tokenizer.state = self.parser.tokenizer.scriptDataState
            self.parser.originalPhase = self.parser.phase
            self.parser.phase = self.parser.phases["text"]

        def startTagOther(self, token):
            self.anythingElse()
            return token

        def endTagHead(self, token):
            node = self.parser.tree.openElements.pop()
            assert node.name == "head", "Expected head got %s" % node.name
            self.parser.phase = self.parser.phases["afterHead"]

        def endTagHtmlBodyBr(self, token):
            self.anythingElse()
            return token

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def anythingElse(self):
            self.endTagHead(impliedTagToken("head"))

    # XXX If we implement a parser for which scripting is disabled we need to
    # implement this phase.
    #
    # class InHeadNoScriptPhase(Phase):
    class AfterHeadPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("body", self.startTagBody),
                ("frameset", self.startTagFrameset),
                (("base", "basefont", "bgsound", "link", "meta", "noframes", "script",
                  "style", "title"),
                 self.startTagFromHead),
                ("head", self.startTagHead)
            ])
            self.startTagHandler.default = self.startTagOther
            self.endTagHandler = utils.MethodDispatcher([(("body", "html", "br"),
                                                          self.endTagHtmlBodyBr)])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            self.anythingElse()
            return True

        def processCharacters(self, token):
            self.anythingElse()
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagBody(self, token):
            self.parser.framesetOK = False
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inBody"]

        def startTagFrameset(self, token):
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inFrameset"]

        def startTagFromHead(self, token):
            self.parser.parseError("unexpected-start-tag-out-of-my-head",
                                   {"name": token["name"]})
            self.tree.openElements.append(self.tree.headPointer)
            self.parser.phases["inHead"].processStartTag(token)
            for node in self.tree.openElements[::-1]:
                if node.name == "head":
                    self.tree.openElements.remove(node)
                    break

        def startTagHead(self, token):
            self.parser.parseError("unexpected-start-tag", {"name": token["name"]})

        def startTagOther(self, token):
            self.anythingElse()
            return token

        def endTagHtmlBodyBr(self, token):
            self.anythingElse()
            return token

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def anythingElse(self):
            self.tree.insertElement(impliedTagToken("body", "StartTag"))
            self.parser.phase = self.parser.phases["inBody"]
            self.parser.framesetOK = True

    class InBodyPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#parsing-main-inbody
        # the really-really-really-very crazy mode
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            # Keep a ref to this for special handling of whitespace in <pre>
            self.processSpaceCharactersNonPre = self.processSpaceCharacters

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                (("base", "basefont", "bgsound", "command", "link", "meta",
                  "noframes", "script", "style", "title"),
                 self.startTagProcessInHead),
                ("body", self.startTagBody),
                ("frameset", self.startTagFrameset),
                (("address", "article", "aside", "blockquote", "center", "details",
                  "details", "dir", "div", "dl", "fieldset", "figcaption", "figure",
                  "footer", "header", "hgroup", "main", "menu", "nav", "ol", "p",
                  "section", "summary", "ul"),
                 self.startTagCloseP),
                (headingElements, self.startTagHeading),
                (("pre", "listing"), self.startTagPreListing),
                ("form", self.startTagForm),
                (("li", "dd", "dt"), self.startTagListItem),
                ("plaintext", self.startTagPlaintext),
                ("a", self.startTagA),
                (("b", "big", "code", "em", "font", "i", "s", "small", "strike",
                  "strong", "tt", "u"), self.startTagFormatting),
                ("nobr", self.startTagNobr),
                ("button", self.startTagButton),
                (("applet", "marquee", "object"), self.startTagAppletMarqueeObject),
                ("xmp", self.startTagXmp),
                ("table", self.startTagTable),
                (("area", "br", "embed", "img", "keygen", "wbr"),
                 self.startTagVoidFormatting),
                (("param", "source", "track"), self.startTagParamSource),
                ("input", self.startTagInput),
                ("hr", self.startTagHr),
                ("image", self.startTagImage),
                ("isindex", self.startTagIsIndex),
                ("textarea", self.startTagTextarea),
                ("iframe", self.startTagIFrame),
                (("noembed", "noframes", "noscript"), self.startTagRawtext),
                ("select", self.startTagSelect),
                (("rp", "rt"), self.startTagRpRt),
                (("option", "optgroup"), self.startTagOpt),
                (("math"), self.startTagMath),
                (("svg"), self.startTagSvg),
                (("caption", "col", "colgroup", "frame", "head",
                  "tbody", "td", "tfoot", "th", "thead",
                  "tr"), self.startTagMisplaced)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("body", self.endTagBody),
                ("html", self.endTagHtml),
                (("address", "article", "aside", "blockquote", "button", "center",
                  "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure",
                  "footer", "header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre",
                  "section", "summary", "ul"), self.endTagBlock),
                ("form", self.endTagForm),
                ("p", self.endTagP),
                (("dd", "dt", "li"), self.endTagListItem),
                (headingElements, self.endTagHeading),
                (("a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small",
                  "strike", "strong", "tt", "u"), self.endTagFormatting),
                (("applet", "marquee", "object"), self.endTagAppletMarqueeObject),
                ("br", self.endTagBr),
            ])
            self.endTagHandler.default = self.endTagOther

        def isMatchingFormattingElement(self, node1, node2):
            if node1.name != node2.name or node1.namespace != node2.namespace:
                return False
            elif len(node1.attributes) != len(node2.attributes):
                return False
            else:
                attributes1 = sorted(node1.attributes.items())
                attributes2 = sorted(node2.attributes.items())
                for attr1, attr2 in zip(attributes1, attributes2):
                    if attr1 != attr2:
                        return False
            return True

        # helper
        def addFormattingElement(self, token):
            self.tree.insertElement(token)
            element = self.tree.openElements[-1]

            matchingElements = []
            for node in self.tree.activeFormattingElements[::-1]:
                if node is Marker:
                    break
                elif self.isMatchingFormattingElement(node, element):
                    matchingElements.append(node)

            assert len(matchingElements) <= 3
            if len(matchingElements) == 3:
                self.tree.activeFormattingElements.remove(matchingElements[-1])
            self.tree.activeFormattingElements.append(element)

        # the real deal
        def processEOF(self):
            allowed_elements = frozenset(("dd", "dt", "li", "p", "tbody", "td",
                                          "tfoot", "th", "thead", "tr", "body",
                                          "html"))
            for node in self.tree.openElements[::-1]:
                if node.name not in allowed_elements:
                    self.parser.parseError("expected-closing-tag-but-got-eof")
                    break
            # Stop parsing

        def processSpaceCharactersDropNewline(self, token):
            # Sometimes (start of <pre>, <listing>, and <textarea> blocks) we
            # want to drop leading newlines
            data = token["data"]
            self.processSpaceCharacters = self.processSpaceCharactersNonPre
            if (data.startswith("\n") and
                self.tree.openElements[-1].name in ("pre", "listing", "textarea")
                    and not self.tree.openElements[-1].hasContent()):
                data = data[1:]
            if data:
                self.tree.reconstructActiveFormattingElements()
                self.tree.insertText(data)

        def processCharacters(self, token):
            if token["data"] == "\u0000":
                # The tokenizer should always emit null on its own
                return
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertText(token["data"])
            # This must be bad for performance
            if (self.parser.framesetOK and
                any([char not in spaceCharacters
                     for char in token["data"]])):
                self.parser.framesetOK = False

        def processSpaceCharacters(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertText(token["data"])

        def startTagProcessInHead(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagBody(self, token):
            self.parser.parseError("unexpected-start-tag", {"name": "body"})
            if (len(self.tree.openElements) == 1
                    or self.tree.openElements[1].name != "body"):
                assert self.parser.innerHTML
            else:
                self.parser.framesetOK = False
                for attr, value in token["data"].items():
                    if attr not in self.tree.openElements[1].attributes:
                        self.tree.openElements[1].attributes[attr] = value

        def startTagFrameset(self, token):
            self.parser.parseError("unexpected-start-tag", {"name": "frameset"})
            if (len(self.tree.openElements) == 1 or self.tree.openElements[1].name != "body"):
                assert self.parser.innerHTML
            elif not self.parser.framesetOK:
                pass
            else:
                if self.tree.openElements[1].parent:
                    self.tree.openElements[1].parent.removeChild(self.tree.openElements[1])
                while self.tree.openElements[-1].name != "html":
                    self.tree.openElements.pop()
                self.tree.insertElement(token)
                self.parser.phase = self.parser.phases["inFrameset"]

        def startTagCloseP(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.insertElement(token)

        def startTagPreListing(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.insertElement(token)
            self.parser.framesetOK = False
            self.processSpaceCharacters = self.processSpaceCharactersDropNewline

        def startTagForm(self, token):
            if self.tree.formPointer:
                self.parser.parseError("unexpected-start-tag", {"name": "form"})
            else:
                if self.tree.elementInScope("p", variant="button"):
                    self.endTagP(impliedTagToken("p"))
                self.tree.insertElement(token)
                self.tree.formPointer = self.tree.openElements[-1]

        def startTagListItem(self, token):
            self.parser.framesetOK = False

            stopNamesMap = {"li": ["li"],
                            "dt": ["dt", "dd"],
                            "dd": ["dt", "dd"]}
            stopNames = stopNamesMap[token["name"]]
            for node in reversed(self.tree.openElements):
                if node.name in stopNames:
                    self.parser.phase.processEndTag(
                        impliedTagToken(node.name, "EndTag"))
                    break
                if (node.nameTuple in specialElements and
                        node.name not in ("address", "div", "p")):
                    break

            if self.tree.elementInScope("p", variant="button"):
                self.parser.phase.processEndTag(
                    impliedTagToken("p", "EndTag"))

            self.tree.insertElement(token)

        def startTagPlaintext(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.insertElement(token)
            self.parser.tokenizer.state = self.parser.tokenizer.plaintextState

        def startTagHeading(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            if self.tree.openElements[-1].name in headingElements:
                self.parser.parseError("unexpected-start-tag", {"name": token["name"]})
                self.tree.openElements.pop()
            self.tree.insertElement(token)

        def startTagA(self, token):
            afeAElement = self.tree.elementInActiveFormattingElements("a")
            if afeAElement:
                self.parser.parseError("unexpected-start-tag-implies-end-tag",
                                       {"startName": "a", "endName": "a"})
                self.endTagFormatting(impliedTagToken("a"))
                if afeAElement in self.tree.openElements:
                    self.tree.openElements.remove(afeAElement)
                if afeAElement in self.tree.activeFormattingElements:
                    self.tree.activeFormattingElements.remove(afeAElement)
            self.tree.reconstructActiveFormattingElements()
            self.addFormattingElement(token)

        def startTagFormatting(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.addFormattingElement(token)

        def startTagNobr(self, token):
            self.tree.reconstructActiveFormattingElements()
            if self.tree.elementInScope("nobr"):
                self.parser.parseError("unexpected-start-tag-implies-end-tag",
                                       {"startName": "nobr", "endName": "nobr"})
                self.processEndTag(impliedTagToken("nobr"))
                # XXX Need tests that trigger the following
                self.tree.reconstructActiveFormattingElements()
            self.addFormattingElement(token)

        def startTagButton(self, token):
            if self.tree.elementInScope("button"):
                self.parser.parseError("unexpected-start-tag-implies-end-tag",
                                       {"startName": "button", "endName": "button"})
                self.processEndTag(impliedTagToken("button"))
                return token
            else:
                self.tree.reconstructActiveFormattingElements()
                self.tree.insertElement(token)
                self.parser.framesetOK = False

        def startTagAppletMarqueeObject(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(token)
            self.tree.activeFormattingElements.append(Marker)
            self.parser.framesetOK = False

        def startTagXmp(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.reconstructActiveFormattingElements()
            self.parser.framesetOK = False
            self.parser.parseRCDataRawtext(token, "RAWTEXT")

        def startTagTable(self, token):
            if self.parser.compatMode != "quirks":
                if self.tree.elementInScope("p", variant="button"):
                    self.processEndTag(impliedTagToken("p"))
            self.tree.insertElement(token)
            self.parser.framesetOK = False
            self.parser.phase = self.parser.phases["inTable"]

        def startTagVoidFormatting(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True
            self.parser.framesetOK = False

        def startTagInput(self, token):
            framesetOK = self.parser.framesetOK
            self.startTagVoidFormatting(token)
            if ("type" in token["data"] and
                    token["data"]["type"].translate(asciiUpper2Lower) == "hidden"):
                # input type=hidden doesn't change framesetOK
                self.parser.framesetOK = framesetOK

        def startTagParamSource(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True

        def startTagHr(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True
            self.parser.framesetOK = False

        def startTagImage(self, token):
            # No really...
            self.parser.parseError("unexpected-start-tag-treated-as",
                                   {"originalName": "image", "newName": "img"})
            self.processStartTag(impliedTagToken("img", "StartTag",
                                                 attributes=token["data"],
                                                 selfClosing=token["selfClosing"]))

        def startTagIsIndex(self, token):
            self.parser.parseError("deprecated-tag", {"name": "isindex"})
            if self.tree.formPointer:
                return
            form_attrs = {}
            if "action" in token["data"]:
                form_attrs["action"] = token["data"]["action"]
            self.processStartTag(impliedTagToken("form", "StartTag",
                                                 attributes=form_attrs))
            self.processStartTag(impliedTagToken("hr", "StartTag"))
            self.processStartTag(impliedTagToken("label", "StartTag"))
            # XXX Localization ...
            if "prompt" in token["data"]:
                prompt = token["data"]["prompt"]
            else:
                prompt = "This is a searchable index. Enter search keywords: "
            self.processCharacters(
                {"type": tokenTypes["Characters"], "data": prompt})
            attributes = token["data"].copy()
            if "action" in attributes:
                del attributes["action"]
            if "prompt" in attributes:
                del attributes["prompt"]
            attributes["name"] = "isindex"
            self.processStartTag(impliedTagToken("input", "StartTag",
                                                 attributes=attributes,
                                                 selfClosing=
                                                 token["selfClosing"]))
            self.processEndTag(impliedTagToken("label"))
            self.processStartTag(impliedTagToken("hr", "StartTag"))
            self.processEndTag(impliedTagToken("form"))

        def startTagTextarea(self, token):
            self.tree.insertElement(token)
            self.parser.tokenizer.state = self.parser.tokenizer.rcdataState
            self.processSpaceCharacters = self.processSpaceCharactersDropNewline
            self.parser.framesetOK = False

        def startTagIFrame(self, token):
            self.parser.framesetOK = False
            self.startTagRawtext(token)

        def startTagRawtext(self, token):
            """iframe, noembed noframes, noscript(if scripting enabled)"""
            self.parser.parseRCDataRawtext(token, "RAWTEXT")

        def startTagOpt(self, token):
            if self.tree.openElements[-1].name == "option":
                self.parser.phase.processEndTag(impliedTagToken("option"))
            self.tree.reconstructActiveFormattingElements()
            self.parser.tree.insertElement(token)

        def startTagSelect(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(token)
            self.parser.framesetOK = False
            if self.parser.phase in (self.parser.phases["inTable"],
                                     self.parser.phases["inCaption"],
                                     self.parser.phases["inColumnGroup"],
                                     self.parser.phases["inTableBody"],
                                     self.parser.phases["inRow"],
                                     self.parser.phases["inCell"]):
                self.parser.phase = self.parser.phases["inSelectInTable"]
            else:
                self.parser.phase = self.parser.phases["inSelect"]

        def startTagRpRt(self, token):
            if self.tree.elementInScope("ruby"):
                self.tree.generateImpliedEndTags()
                if self.tree.openElements[-1].name != "ruby":
                    self.parser.parseError()
            self.tree.insertElement(token)

        def startTagMath(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.parser.adjustMathMLAttributes(token)
            self.parser.adjustForeignAttributes(token)
            token["namespace"] = namespaces["mathml"]
            self.tree.insertElement(token)
            # Need to get the parse error right for the case where the token
            # has a namespace not equal to the xmlns attribute
            if token["selfClosing"]:
                self.tree.openElements.pop()
                token["selfClosingAcknowledged"] = True

        def startTagSvg(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.parser.adjustSVGAttributes(token)
            self.parser.adjustForeignAttributes(token)
            token["namespace"] = namespaces["svg"]
            self.tree.insertElement(token)
            # Need to get the parse error right for the case where the token
            # has a namespace not equal to the xmlns attribute
            if token["selfClosing"]:
                self.tree.openElements.pop()
                token["selfClosingAcknowledged"] = True

        def startTagMisplaced(self, token):
            """ Elements that should be children of other elements that have a
            different insertion mode; here they are ignored
            "caption", "col", "colgroup", "frame", "frameset", "head",
            "option", "optgroup", "tbody", "td", "tfoot", "th", "thead",
            "tr", "noscript"
            """
            self.parser.parseError("unexpected-start-tag-ignored", {"name": token["name"]})

        def startTagOther(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(token)

        def endTagP(self, token):
            if not self.tree.elementInScope("p", variant="button"):
                self.startTagCloseP(impliedTagToken("p", "StartTag"))
                self.parser.parseError("unexpected-end-tag", {"name": "p"})
                self.endTagP(impliedTagToken("p", "EndTag"))
            else:
                self.tree.generateImpliedEndTags("p")
                if self.tree.openElements[-1].name != "p":
                    self.parser.parseError("unexpected-end-tag", {"name": "p"})
                node = self.tree.openElements.pop()
                while node.name != "p":
                    node = self.tree.openElements.pop()

        def endTagBody(self, token):
            if not self.tree.elementInScope("body"):
                self.parser.parseError()
                return
            elif self.tree.openElements[-1].name != "body":
                for node in self.tree.openElements[2:]:
                    if node.name not in frozenset(("dd", "dt", "li", "optgroup",
                                                   "option", "p", "rp", "rt",
                                                   "tbody", "td", "tfoot",
                                                   "th", "thead", "tr", "body",
                                                   "html")):
                        # Not sure this is the correct name for the parse error
                        self.parser.parseError(
                            "expected-one-end-tag-but-got-another",
                            {"expectedName": "body", "gotName": node.name})
                        break
            self.parser.phase = self.parser.phases["afterBody"]

        def endTagHtml(self, token):
            # We repeat the test for the body end tag token being ignored here
            if self.tree.elementInScope("body"):
                self.endTagBody(impliedTagToken("body"))
                return token

        def endTagBlock(self, token):
            # Put us back in the right whitespace handling mode
            if token["name"] == "pre":
                self.processSpaceCharacters = self.processSpaceCharactersNonPre
            inScope = self.tree.elementInScope(token["name"])
            if inScope:
                self.tree.generateImpliedEndTags()
            if self.tree.openElements[-1].name != token["name"]:
                self.parser.parseError("end-tag-too-early", {"name": token["name"]})
            if inScope:
                node = self.tree.openElements.pop()
                while node.name != token["name"]:
                    node = self.tree.openElements.pop()

        def endTagForm(self, token):
            node = self.tree.formPointer
            self.tree.formPointer = None
            if node is None or not self.tree.elementInScope(node):
                self.parser.parseError("unexpected-end-tag",
                                       {"name": "form"})
            else:
                self.tree.generateImpliedEndTags()
                if self.tree.openElements[-1] != node:
                    self.parser.parseError("end-tag-too-early-ignored",
                                           {"name": "form"})
                self.tree.openElements.remove(node)

        def endTagListItem(self, token):
            if token["name"] == "li":
                variant = "list"
            else:
                variant = None
            if not self.tree.elementInScope(token["name"], variant=variant):
                self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
            else:
                self.tree.generateImpliedEndTags(exclude=token["name"])
                if self.tree.openElements[-1].name != token["name"]:
                    self.parser.parseError(
                        "end-tag-too-early",
                        {"name": token["name"]})
                node = self.tree.openElements.pop()
                while node.name != token["name"]:
                    node = self.tree.openElements.pop()

        def endTagHeading(self, token):
            for item in headingElements:
                if self.tree.elementInScope(item):
                    self.tree.generateImpliedEndTags()
                    break
            if self.tree.openElements[-1].name != token["name"]:
                self.parser.parseError("end-tag-too-early", {"name": token["name"]})

            for item in headingElements:
                if self.tree.elementInScope(item):
                    item = self.tree.openElements.pop()
                    while item.name not in headingElements:
                        item = self.tree.openElements.pop()
                    break

        def endTagFormatting(self, token):
            """The much-feared adoption agency algorithm"""
            # http://svn.whatwg.org/webapps/complete.html#adoptionAgency revision 7867
            # XXX Better parseError messages appreciated.

            # Step 1
            outerLoopCounter = 0

            # Step 2
            while outerLoopCounter < 8:

                # Step 3
                outerLoopCounter += 1

                # Step 4:

                # Let the formatting element be the last element in
                # the list of active formatting elements that:
                # - is between the end of the list and the last scope
                # marker in the list, if any, or the start of the list
                # otherwise, and
                # - has the same tag name as the token.
                formattingElement = self.tree.elementInActiveFormattingElements(
                    token["name"])
                if (not formattingElement or
                    (formattingElement in self.tree.openElements and
                     not self.tree.elementInScope(formattingElement.name))):
                    # If there is no such node, then abort these steps
                    # and instead act as described in the "any other
                    # end tag" entry below.
                    self.endTagOther(token)
                    return

                # Otherwise, if there is such a node, but that node is
                # not in the stack of open elements, then this is a
                # parse error; remove the element from the list, and
                # abort these steps.
                elif formattingElement not in self.tree.openElements:
                    self.parser.parseError("adoption-agency-1.2", {"name": token["name"]})
                    self.tree.activeFormattingElements.remove(formattingElement)
                    return

                # Otherwise, if there is such a node, and that node is
                # also in the stack of open elements, but the element
                # is not in scope, then this is a parse error; ignore
                # the token, and abort these steps.
                elif not self.tree.elementInScope(formattingElement.name):
                    self.parser.parseError("adoption-agency-4.4", {"name": token["name"]})
                    return

                # Otherwise, there is a formatting element and that
                # element is in the stack and is in scope. If the
                # element is not the current node, this is a parse
                # error. In any case, proceed with the algorithm as
                # written in the following steps.
                else:
                    if formattingElement != self.tree.openElements[-1]:
                        self.parser.parseError("adoption-agency-1.3", {"name": token["name"]})

                # Step 5:

                # Let the furthest block be the topmost node in the
                # stack of open elements that is lower in the stack
                # than the formatting element, and is an element in
                # the special category. There might not be one.
                afeIndex = self.tree.openElements.index(formattingElement)
                furthestBlock = None
                for element in self.tree.openElements[afeIndex:]:
                    if element.nameTuple in specialElements:
                        furthestBlock = element
                        break

                # Step 6:

                # If there is no furthest block, then the UA must
                # first pop all the nodes from the bottom of the stack
                # of open elements, from the current node up to and
                # including the formatting element, then remove the
                # formatting element from the list of active
                # formatting elements, and finally abort these steps.
                if furthestBlock is None:
                    element = self.tree.openElements.pop()
                    while element != formattingElement:
                        element = self.tree.openElements.pop()
                    self.tree.activeFormattingElements.remove(element)
                    return

                # Step 7
                commonAncestor = self.tree.openElements[afeIndex - 1]

                # Step 8:
                # The bookmark is supposed to help us identify where to reinsert
                # nodes in step 15. We have to ensure that we reinsert nodes after
                # the node before the active formatting element. Note the bookmark
                # can move in step 9.7
                bookmark = self.tree.activeFormattingElements.index(formattingElement)

                # Step 9
                lastNode = node = furthestBlock
                innerLoopCounter = 0

                index = self.tree.openElements.index(node)
                while innerLoopCounter < 3:
                    innerLoopCounter += 1
                    # Node is element before node in open elements
                    index -= 1
                    node = self.tree.openElements[index]
                    if node not in self.tree.activeFormattingElements:
                        self.tree.openElements.remove(node)
                        continue
                    # Step 9.6
                    if node == formattingElement:
                        break
                    # Step 9.7
                    if lastNode == furthestBlock:
                        bookmark = self.tree.activeFormattingElements.index(node) + 1
                    # Step 9.8
                    clone = node.cloneNode()
                    # Replace node with clone
                    self.tree.activeFormattingElements[
                        self.tree.activeFormattingElements.index(node)] = clone
                    self.tree.openElements[
                        self.tree.openElements.index(node)] = clone
                    node = clone
                    # Step 9.9
                    # Remove lastNode from its parents, if any
                    if lastNode.parent:
                        lastNode.parent.removeChild(lastNode)
                    node.appendChild(lastNode)
                    # Step 9.10
                    lastNode = node

                # Step 10
                # Foster parent lastNode if commonAncestor is a
                # table, tbody, tfoot, thead, or tr we need to foster
                # parent the lastNode
                if lastNode.parent:
                    lastNode.parent.removeChild(lastNode)

                if commonAncestor.name in frozenset(("table", "tbody", "tfoot", "thead", "tr")):
                    parent, insertBefore = self.tree.getTableMisnestedNodePosition()
                    parent.insertBefore(lastNode, insertBefore)
                else:
                    commonAncestor.appendChild(lastNode)

                # Step 11
                clone = formattingElement.cloneNode()

                # Step 12
                furthestBlock.reparentChildren(clone)

                # Step 13
                furthestBlock.appendChild(clone)

                # Step 14
                self.tree.activeFormattingElements.remove(formattingElement)
                self.tree.activeFormattingElements.insert(bookmark, clone)

                # Step 15
                self.tree.openElements.remove(formattingElement)
                self.tree.openElements.insert(
                    self.tree.openElements.index(furthestBlock) + 1, clone)

        def endTagAppletMarqueeObject(self, token):
            if self.tree.elementInScope(token["name"]):
                self.tree.generateImpliedEndTags()
            if self.tree.openElements[-1].name != token["name"]:
                self.parser.parseError("end-tag-too-early", {"name": token["name"]})

            if self.tree.elementInScope(token["name"]):
                element = self.tree.openElements.pop()
                while element.name != token["name"]:
                    element = self.tree.openElements.pop()
                self.tree.clearActiveFormattingElements()

        def endTagBr(self, token):
            self.parser.parseError("unexpected-end-tag-treated-as",
                                   {"originalName": "br", "newName": "br element"})
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(impliedTagToken("br", "StartTag"))
            self.tree.openElements.pop()

        def endTagOther(self, token):
            for node in self.tree.openElements[::-1]:
                if node.name == token["name"]:
                    self.tree.generateImpliedEndTags(exclude=token["name"])
                    if self.tree.openElements[-1].name != token["name"]:
                        self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
                    while self.tree.openElements.pop() != node:
                        pass
                    break
                else:
                    if node.nameTuple in specialElements:
                        self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
                        break

    class TextPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([])
            self.startTagHandler.default = self.startTagOther
            self.endTagHandler = utils.MethodDispatcher([
                ("script", self.endTagScript)])
            self.endTagHandler.default = self.endTagOther

        def processCharacters(self, token):
            self.tree.insertText(token["data"])

        def processEOF(self):
            self.parser.parseError("expected-named-closing-tag-but-got-eof",
                                   {"name": self.tree.openElements[-1].name})
            self.tree.openElements.pop()
            self.parser.phase = self.parser.originalPhase
            return True

        def startTagOther(self, token):
            assert False, "Tried to process start tag %s in RCDATA/RAWTEXT mode" % token['name']

        def endTagScript(self, token):
            node = self.tree.openElements.pop()
            assert node.name == "script"
            self.parser.phase = self.parser.originalPhase
            # The rest of this method is all stuff that only happens if
            # document.write works

        def endTagOther(self, token):
            self.tree.openElements.pop()
            self.parser.phase = self.parser.originalPhase

    class InTablePhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-table
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("caption", self.startTagCaption),
                ("colgroup", self.startTagColgroup),
                ("col", self.startTagCol),
                (("tbody", "tfoot", "thead"), self.startTagRowGroup),
                (("td", "th", "tr"), self.startTagImplyTbody),
                ("table", self.startTagTable),
                (("style", "script"), self.startTagStyleScript),
                ("input", self.startTagInput),
                ("form", self.startTagForm)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("table", self.endTagTable),
                (("body", "caption", "col", "colgroup", "html", "tbody", "td",
                  "tfoot", "th", "thead", "tr"), self.endTagIgnore)
            ])
            self.endTagHandler.default = self.endTagOther

        # helper methods
        def clearStackToTableContext(self):
            # "clear the stack back to a table context"
            while self.tree.openElements[-1].name not in ("table", "html"):
                # self.parser.parseError("unexpected-implied-end-tag-in-table",
                #  {"name":  self.tree.openElements[-1].name})
                self.tree.openElements.pop()
            # When the current node is <html> it's an innerHTML case

        # processing methods
        def processEOF(self):
            if self.tree.openElements[-1].name != "html":
                self.parser.parseError("eof-in-table")
            else:
                assert self.parser.innerHTML
            # Stop parsing

        def processSpaceCharacters(self, token):
            originalPhase = self.parser.phase
            self.parser.phase = self.parser.phases["inTableText"]
            self.parser.phase.originalPhase = originalPhase
            self.parser.phase.processSpaceCharacters(token)

        def processCharacters(self, token):
            originalPhase = self.parser.phase
            self.parser.phase = self.parser.phases["inTableText"]
            self.parser.phase.originalPhase = originalPhase
            self.parser.phase.processCharacters(token)

        def insertText(self, token):
            # If we get here there must be at least one non-whitespace character
            # Do the table magic!
            self.tree.insertFromTable = True
            self.parser.phases["inBody"].processCharacters(token)
            self.tree.insertFromTable = False

        def startTagCaption(self, token):
            self.clearStackToTableContext()
            self.tree.activeFormattingElements.append(Marker)
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inCaption"]

        def startTagColgroup(self, token):
            self.clearStackToTableContext()
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inColumnGroup"]

        def startTagCol(self, token):
            self.startTagColgroup(impliedTagToken("colgroup", "StartTag"))
            return token

        def startTagRowGroup(self, token):
            self.clearStackToTableContext()
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inTableBody"]

        def startTagImplyTbody(self, token):
            self.startTagRowGroup(impliedTagToken("tbody", "StartTag"))
            return token

        def startTagTable(self, token):
            self.parser.parseError("unexpected-start-tag-implies-end-tag",
                                   {"startName": "table", "endName": "table"})
            self.parser.phase.processEndTag(impliedTagToken("table"))
            if not self.parser.innerHTML:
                return token

        def startTagStyleScript(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagInput(self, token):
            if ("type" in token["data"] and
                    token["data"]["type"].translate(asciiUpper2Lower) == "hidden"):
                self.parser.parseError("unexpected-hidden-input-in-table")
                self.tree.insertElement(token)
                # XXX associate with form
                self.tree.openElements.pop()
            else:
                self.startTagOther(token)

        def startTagForm(self, token):
            self.parser.parseError("unexpected-form-in-table")
            if self.tree.formPointer is None:
                self.tree.insertElement(token)
                self.tree.formPointer = self.tree.openElements[-1]
                self.tree.openElements.pop()

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-implies-table-voodoo", {"name": token["name"]})
            # Do the table magic!
            self.tree.insertFromTable = True
            self.parser.phases["inBody"].processStartTag(token)
            self.tree.insertFromTable = False

        def endTagTable(self, token):
            if self.tree.elementInScope("table", variant="table"):
                self.tree.generateImpliedEndTags()
                if self.tree.openElements[-1].name != "table":
                    self.parser.parseError("end-tag-too-early-named",
                                           {"gotName": "table",
                                            "expectedName": self.tree.openElements[-1].name})
                while self.tree.openElements[-1].name != "table":
                    self.tree.openElements.pop()
                self.tree.openElements.pop()
                self.parser.resetInsertionMode()
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-implies-table-voodoo", {"name": token["name"]})
            # Do the table magic!
            self.tree.insertFromTable = True
            self.parser.phases["inBody"].processEndTag(token)
            self.tree.insertFromTable = False

    class InTableTextPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.originalPhase = None
            self.characterTokens = []

        def flushCharacters(self):
            data = "".join([item["data"] for item in self.characterTokens])
            if any([item not in spaceCharacters for item in data]):
                token = {"type": tokenTypes["Characters"], "data": data}
                self.parser.phases["inTable"].insertText(token)
            elif data:
                self.tree.insertText(data)
            self.characterTokens = []

        def processComment(self, token):
            self.flushCharacters()
            self.parser.phase = self.originalPhase
            return token

        def processEOF(self):
            self.flushCharacters()
            self.parser.phase = self.originalPhase
            return True

        def processCharacters(self, token):
            if token["data"] == "\u0000":
                return
            self.characterTokens.append(token)

        def processSpaceCharacters(self, token):
            # pretty sure we should never reach here
            self.characterTokens.append(token)
    #        assert False

        def processStartTag(self, token):
            self.flushCharacters()
            self.parser.phase = self.originalPhase
            return token

        def processEndTag(self, token):
            self.flushCharacters()
            self.parser.phase = self.originalPhase
            return token

    class InCaptionPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-caption
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                (("caption", "col", "colgroup", "tbody", "td", "tfoot", "th",
                  "thead", "tr"), self.startTagTableElement)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("caption", self.endTagCaption),
                ("table", self.endTagTable),
                (("body", "col", "colgroup", "html", "tbody", "td", "tfoot", "th",
                  "thead", "tr"), self.endTagIgnore)
            ])
            self.endTagHandler.default = self.endTagOther

        def ignoreEndTagCaption(self):
            return not self.tree.elementInScope("caption", variant="table")

        def processEOF(self):
            self.parser.phases["inBody"].processEOF()

        def processCharacters(self, token):
            return self.parser.phases["inBody"].processCharacters(token)

        def startTagTableElement(self, token):
            self.parser.parseError()
            # XXX Have to duplicate logic here to find out if the tag is ignored
            ignoreEndTag = self.ignoreEndTagCaption()
            self.parser.phase.processEndTag(impliedTagToken("caption"))
            if not ignoreEndTag:
                return token

        def startTagOther(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def endTagCaption(self, token):
            if not self.ignoreEndTagCaption():
                # AT this code is quite similar to endTagTable in "InTable"
                self.tree.generateImpliedEndTags()
                if self.tree.openElements[-1].name != "caption":
                    self.parser.parseError("expected-one-end-tag-but-got-another",
                                           {"gotName": "caption",
                                            "expectedName": self.tree.openElements[-1].name})
                while self.tree.openElements[-1].name != "caption":
                    self.tree.openElements.pop()
                self.tree.openElements.pop()
                self.tree.clearActiveFormattingElements()
                self.parser.phase = self.parser.phases["inTable"]
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagTable(self, token):
            self.parser.parseError()
            ignoreEndTag = self.ignoreEndTagCaption()
            self.parser.phase.processEndTag(impliedTagToken("caption"))
            if not ignoreEndTag:
                return token

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def endTagOther(self, token):
            return self.parser.phases["inBody"].processEndTag(token)

    class InColumnGroupPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-column

        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("col", self.startTagCol)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("colgroup", self.endTagColgroup),
                ("col", self.endTagCol)
            ])
            self.endTagHandler.default = self.endTagOther

        def ignoreEndTagColgroup(self):
            return self.tree.openElements[-1].name == "html"

        def processEOF(self):
            if self.tree.openElements[-1].name == "html":
                assert self.parser.innerHTML
                return
            else:
                ignoreEndTag = self.ignoreEndTagColgroup()
                self.endTagColgroup(impliedTagToken("colgroup"))
                if not ignoreEndTag:
                    return True

        def processCharacters(self, token):
            ignoreEndTag = self.ignoreEndTagColgroup()
            self.endTagColgroup(impliedTagToken("colgroup"))
            if not ignoreEndTag:
                return token

        def startTagCol(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()

        def startTagOther(self, token):
            ignoreEndTag = self.ignoreEndTagColgroup()
            self.endTagColgroup(impliedTagToken("colgroup"))
            if not ignoreEndTag:
                return token

        def endTagColgroup(self, token):
            if self.ignoreEndTagColgroup():
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()
            else:
                self.tree.openElements.pop()
                self.parser.phase = self.parser.phases["inTable"]

        def endTagCol(self, token):
            self.parser.parseError("no-end-tag", {"name": "col"})

        def endTagOther(self, token):
            ignoreEndTag = self.ignoreEndTagColgroup()
            self.endTagColgroup(impliedTagToken("colgroup"))
            if not ignoreEndTag:
                return token

    class InTableBodyPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-table0
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("tr", self.startTagTr),
                (("td", "th"), self.startTagTableCell),
                (("caption", "col", "colgroup", "tbody", "tfoot", "thead"),
                 self.startTagTableOther)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                (("tbody", "tfoot", "thead"), self.endTagTableRowGroup),
                ("table", self.endTagTable),
                (("body", "caption", "col", "colgroup", "html", "td", "th",
                  "tr"), self.endTagIgnore)
            ])
            self.endTagHandler.default = self.endTagOther

        # helper methods
        def clearStackToTableBodyContext(self):
            while self.tree.openElements[-1].name not in ("tbody", "tfoot",
                                                          "thead", "html"):
                # self.parser.parseError("unexpected-implied-end-tag-in-table",
                #  {"name": self.tree.openElements[-1].name})
                self.tree.openElements.pop()
            if self.tree.openElements[-1].name == "html":
                assert self.parser.innerHTML

        # the rest
        def processEOF(self):
            self.parser.phases["inTable"].processEOF()

        def processSpaceCharacters(self, token):
            return self.parser.phases["inTable"].processSpaceCharacters(token)

        def processCharacters(self, token):
            return self.parser.phases["inTable"].processCharacters(token)

        def startTagTr(self, token):
            self.clearStackToTableBodyContext()
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inRow"]

        def startTagTableCell(self, token):
            self.parser.parseError("unexpected-cell-in-table-body",
                                   {"name": token["name"]})
            self.startTagTr(impliedTagToken("tr", "StartTag"))
            return token

        def startTagTableOther(self, token):
            # XXX AT Any ideas on how to share this with endTagTable?
            if (self.tree.elementInScope("tbody", variant="table") or
                self.tree.elementInScope("thead", variant="table") or
                    self.tree.elementInScope("tfoot", variant="table")):
                self.clearStackToTableBodyContext()
                self.endTagTableRowGroup(
                    impliedTagToken(self.tree.openElements[-1].name))
                return token
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def startTagOther(self, token):
            return self.parser.phases["inTable"].processStartTag(token)

        def endTagTableRowGroup(self, token):
            if self.tree.elementInScope(token["name"], variant="table"):
                self.clearStackToTableBodyContext()
                self.tree.openElements.pop()
                self.parser.phase = self.parser.phases["inTable"]
            else:
                self.parser.parseError("unexpected-end-tag-in-table-body",
                                       {"name": token["name"]})

        def endTagTable(self, token):
            if (self.tree.elementInScope("tbody", variant="table") or
                self.tree.elementInScope("thead", variant="table") or
                    self.tree.elementInScope("tfoot", variant="table")):
                self.clearStackToTableBodyContext()
                self.endTagTableRowGroup(
                    impliedTagToken(self.tree.openElements[-1].name))
                return token
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag-in-table-body",
                                   {"name": token["name"]})

        def endTagOther(self, token):
            return self.parser.phases["inTable"].processEndTag(token)

    class InRowPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-row
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                (("td", "th"), self.startTagTableCell),
                (("caption", "col", "colgroup", "tbody", "tfoot", "thead",
                  "tr"), self.startTagTableOther)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("tr", self.endTagTr),
                ("table", self.endTagTable),
                (("tbody", "tfoot", "thead"), self.endTagTableRowGroup),
                (("body", "caption", "col", "colgroup", "html", "td", "th"),
                 self.endTagIgnore)
            ])
            self.endTagHandler.default = self.endTagOther

        # helper methods (XXX unify this with other table helper methods)
        def clearStackToTableRowContext(self):
            while self.tree.openElements[-1].name not in ("tr", "html"):
                self.parser.parseError("unexpected-implied-end-tag-in-table-row",
                                       {"name": self.tree.openElements[-1].name})
                self.tree.openElements.pop()

        def ignoreEndTagTr(self):
            return not self.tree.elementInScope("tr", variant="table")

        # the rest
        def processEOF(self):
            self.parser.phases["inTable"].processEOF()

        def processSpaceCharacters(self, token):
            return self.parser.phases["inTable"].processSpaceCharacters(token)

        def processCharacters(self, token):
            return self.parser.phases["inTable"].processCharacters(token)

        def startTagTableCell(self, token):
            self.clearStackToTableRowContext()
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inCell"]
            self.tree.activeFormattingElements.append(Marker)

        def startTagTableOther(self, token):
            ignoreEndTag = self.ignoreEndTagTr()
            self.endTagTr(impliedTagToken("tr"))
            # XXX how are we sure it's always ignored in the innerHTML case?
            if not ignoreEndTag:
                return token

        def startTagOther(self, token):
            return self.parser.phases["inTable"].processStartTag(token)

        def endTagTr(self, token):
            if not self.ignoreEndTagTr():
                self.clearStackToTableRowContext()
                self.tree.openElements.pop()
                self.parser.phase = self.parser.phases["inTableBody"]
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagTable(self, token):
            ignoreEndTag = self.ignoreEndTagTr()
            self.endTagTr(impliedTagToken("tr"))
            # Reprocess the current tag if the tr end tag was not ignored
            # XXX how are we sure it's always ignored in the innerHTML case?
            if not ignoreEndTag:
                return token

        def endTagTableRowGroup(self, token):
            if self.tree.elementInScope(token["name"], variant="table"):
                self.endTagTr(impliedTagToken("tr"))
                return token
            else:
                self.parser.parseError()

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag-in-table-row",
                                   {"name": token["name"]})

        def endTagOther(self, token):
            return self.parser.phases["inTable"].processEndTag(token)

    class InCellPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-cell
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                (("caption", "col", "colgroup", "tbody", "td", "tfoot", "th",
                  "thead", "tr"), self.startTagTableOther)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                (("td", "th"), self.endTagTableCell),
                (("body", "caption", "col", "colgroup", "html"), self.endTagIgnore),
                (("table", "tbody", "tfoot", "thead", "tr"), self.endTagImply)
            ])
            self.endTagHandler.default = self.endTagOther

        # helper
        def closeCell(self):
            if self.tree.elementInScope("td", variant="table"):
                self.endTagTableCell(impliedTagToken("td"))
            elif self.tree.elementInScope("th", variant="table"):
                self.endTagTableCell(impliedTagToken("th"))

        # the rest
        def processEOF(self):
            self.parser.phases["inBody"].processEOF()

        def processCharacters(self, token):
            return self.parser.phases["inBody"].processCharacters(token)

        def startTagTableOther(self, token):
            if (self.tree.elementInScope("td", variant="table") or
                    self.tree.elementInScope("th", variant="table")):
                self.closeCell()
                return token
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def startTagOther(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def endTagTableCell(self, token):
            if self.tree.elementInScope(token["name"], variant="table"):
                self.tree.generateImpliedEndTags(token["name"])
                if self.tree.openElements[-1].name != token["name"]:
                    self.parser.parseError("unexpected-cell-end-tag",
                                           {"name": token["name"]})
                    while True:
                        node = self.tree.openElements.pop()
                        if node.name == token["name"]:
                            break
                else:
                    self.tree.openElements.pop()
                self.tree.clearActiveFormattingElements()
                self.parser.phase = self.parser.phases["inRow"]
            else:
                self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def endTagImply(self, token):
            if self.tree.elementInScope(token["name"], variant="table"):
                self.closeCell()
                return token
            else:
                # sometimes innerHTML case
                self.parser.parseError()

        def endTagOther(self, token):
            return self.parser.phases["inBody"].processEndTag(token)

    class InSelectPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("option", self.startTagOption),
                ("optgroup", self.startTagOptgroup),
                ("select", self.startTagSelect),
                (("input", "keygen", "textarea"), self.startTagInput),
                ("script", self.startTagScript)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("option", self.endTagOption),
                ("optgroup", self.endTagOptgroup),
                ("select", self.endTagSelect)
            ])
            self.endTagHandler.default = self.endTagOther

        # http://www.whatwg.org/specs/web-apps/current-work/#in-select
        def processEOF(self):
            if self.tree.openElements[-1].name != "html":
                self.parser.parseError("eof-in-select")
            else:
                assert self.parser.innerHTML

        def processCharacters(self, token):
            if token["data"] == "\u0000":
                return
            self.tree.insertText(token["data"])

        def startTagOption(self, token):
            # We need to imply </option> if <option> is the current node.
            if self.tree.openElements[-1].name == "option":
                self.tree.openElements.pop()
            self.tree.insertElement(token)

        def startTagOptgroup(self, token):
            if self.tree.openElements[-1].name == "option":
                self.tree.openElements.pop()
            if self.tree.openElements[-1].name == "optgroup":
                self.tree.openElements.pop()
            self.tree.insertElement(token)

        def startTagSelect(self, token):
            self.parser.parseError("unexpected-select-in-select")
            self.endTagSelect(impliedTagToken("select"))

        def startTagInput(self, token):
            self.parser.parseError("unexpected-input-in-select")
            if self.tree.elementInScope("select", variant="select"):
                self.endTagSelect(impliedTagToken("select"))
                return token
            else:
                assert self.parser.innerHTML

        def startTagScript(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-in-select",
                                   {"name": token["name"]})

        def endTagOption(self, token):
            if self.tree.openElements[-1].name == "option":
                self.tree.openElements.pop()
            else:
                self.parser.parseError("unexpected-end-tag-in-select",
                                       {"name": "option"})

        def endTagOptgroup(self, token):
            # </optgroup> implicitly closes <option>
            if (self.tree.openElements[-1].name == "option" and
                    self.tree.openElements[-2].name == "optgroup"):
                self.tree.openElements.pop()
            # It also closes </optgroup>
            if self.tree.openElements[-1].name == "optgroup":
                self.tree.openElements.pop()
            # But nothing else
            else:
                self.parser.parseError("unexpected-end-tag-in-select",
                                       {"name": "optgroup"})

        def endTagSelect(self, token):
            if self.tree.elementInScope("select", variant="select"):
                node = self.tree.openElements.pop()
                while node.name != "select":
                    node = self.tree.openElements.pop()
                self.parser.resetInsertionMode()
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-in-select",
                                   {"name": token["name"]})

    class InSelectInTablePhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                (("caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th"),
                 self.startTagTable)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                (("caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th"),
                 self.endTagTable)
            ])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            self.parser.phases["inSelect"].processEOF()

        def processCharacters(self, token):
            return self.parser.phases["inSelect"].processCharacters(token)

        def startTagTable(self, token):
            self.parser.parseError("unexpected-table-element-start-tag-in-select-in-table", {"name": token["name"]})
            self.endTagOther(impliedTagToken("select"))
            return token

        def startTagOther(self, token):
            return self.parser.phases["inSelect"].processStartTag(token)

        def endTagTable(self, token):
            self.parser.parseError("unexpected-table-element-end-tag-in-select-in-table", {"name": token["name"]})
            if self.tree.elementInScope(token["name"], variant="table"):
                self.endTagOther(impliedTagToken("select"))
                return token

        def endTagOther(self, token):
            return self.parser.phases["inSelect"].processEndTag(token)

    class InForeignContentPhase(Phase):
        breakoutElements = frozenset(["b", "big", "blockquote", "body", "br",
                                      "center", "code", "dd", "div", "dl", "dt",
                                      "em", "embed", "h1", "h2", "h3",
                                      "h4", "h5", "h6", "head", "hr", "i", "img",
                                      "li", "listing", "menu", "meta", "nobr",
                                      "ol", "p", "pre", "ruby", "s", "small",
                                      "span", "strong", "strike", "sub", "sup",
                                      "table", "tt", "u", "ul", "var"])

        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

        def adjustSVGTagNames(self, token):
            replacements = {"altglyph": "altGlyph",
                            "altglyphdef": "altGlyphDef",
                            "altglyphitem": "altGlyphItem",
                            "animatecolor": "animateColor",
                            "animatemotion": "animateMotion",
                            "animatetransform": "animateTransform",
                            "clippath": "clipPath",
                            "feblend": "feBlend",
                            "fecolormatrix": "feColorMatrix",
                            "fecomponenttransfer": "feComponentTransfer",
                            "fecomposite": "feComposite",
                            "feconvolvematrix": "feConvolveMatrix",
                            "fediffuselighting": "feDiffuseLighting",
                            "fedisplacementmap": "feDisplacementMap",
                            "fedistantlight": "feDistantLight",
                            "feflood": "feFlood",
                            "fefunca": "feFuncA",
                            "fefuncb": "feFuncB",
                            "fefuncg": "feFuncG",
                            "fefuncr": "feFuncR",
                            "fegaussianblur": "feGaussianBlur",
                            "feimage": "feImage",
                            "femerge": "feMerge",
                            "femergenode": "feMergeNode",
                            "femorphology": "feMorphology",
                            "feoffset": "feOffset",
                            "fepointlight": "fePointLight",
                            "fespecularlighting": "feSpecularLighting",
                            "fespotlight": "feSpotLight",
                            "fetile": "feTile",
                            "feturbulence": "feTurbulence",
                            "foreignobject": "foreignObject",
                            "glyphref": "glyphRef",
                            "lineargradient": "linearGradient",
                            "radialgradient": "radialGradient",
                            "textpath": "textPath"}

            if token["name"] in replacements:
                token["name"] = replacements[token["name"]]

        def processCharacters(self, token):
            if token["data"] == "\u0000":
                token["data"] = "\uFFFD"
            elif (self.parser.framesetOK and
                  any(char not in spaceCharacters for char in token["data"])):
                self.parser.framesetOK = False
            Phase.processCharacters(self, token)

        def processStartTag(self, token):
            currentNode = self.tree.openElements[-1]
            if (token["name"] in self.breakoutElements or
                (token["name"] == "font" and
                 set(token["data"].keys()) & set(["color", "face", "size"]))):
                self.parser.parseError("unexpected-html-element-in-foreign-content",
                                       {"name": token["name"]})
                while (self.tree.openElements[-1].namespace !=
                       self.tree.defaultNamespace and
                       not self.parser.isHTMLIntegrationPoint(self.tree.openElements[-1]) and
                       not self.parser.isMathMLTextIntegrationPoint(self.tree.openElements[-1])):
                    self.tree.openElements.pop()
                return token

            else:
                if currentNode.namespace == namespaces["mathml"]:
                    self.parser.adjustMathMLAttributes(token)
                elif currentNode.namespace == namespaces["svg"]:
                    self.adjustSVGTagNames(token)
                    self.parser.adjustSVGAttributes(token)
                self.parser.adjustForeignAttributes(token)
                token["namespace"] = currentNode.namespace
                self.tree.insertElement(token)
                if token["selfClosing"]:
                    self.tree.openElements.pop()
                    token["selfClosingAcknowledged"] = True

        def processEndTag(self, token):
            nodeIndex = len(self.tree.openElements) - 1
            node = self.tree.openElements[-1]
            if node.name != token["name"]:
                self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

            while True:
                if node.name.translate(asciiUpper2Lower) == token["name"]:
                    # XXX this isn't in the spec but it seems necessary
                    if self.parser.phase == self.parser.phases["inTableText"]:
                        self.parser.phase.flushCharacters()
                        self.parser.phase = self.parser.phase.originalPhase
                    while self.tree.openElements.pop() != node:
                        assert self.tree.openElements
                    new_token = None
                    break
                nodeIndex -= 1

                node = self.tree.openElements[nodeIndex]
                if node.namespace != self.tree.defaultNamespace:
                    continue
                else:
                    new_token = self.parser.phase.processEndTag(token)
                    break
            return new_token

    class AfterBodyPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([("html", self.endTagHtml)])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            # Stop parsing
            pass

        def processComment(self, token):
            # This is needed because data is to be appended to the <html> element
            # here and not to whatever is currently open.
            self.tree.insertComment(token, self.tree.openElements[0])

        def processCharacters(self, token):
            self.parser.parseError("unexpected-char-after-body")
            self.parser.phase = self.parser.phases["inBody"]
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-after-body",
                                   {"name": token["name"]})
            self.parser.phase = self.parser.phases["inBody"]
            return token

        def endTagHtml(self, name):
            if self.parser.innerHTML:
                self.parser.parseError("unexpected-end-tag-after-body-innerhtml")
            else:
                self.parser.phase = self.parser.phases["afterAfterBody"]

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-after-body",
                                   {"name": token["name"]})
            self.parser.phase = self.parser.phases["inBody"]
            return token

    class InFramesetPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-frameset
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("frameset", self.startTagFrameset),
                ("frame", self.startTagFrame),
                ("noframes", self.startTagNoframes)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("frameset", self.endTagFrameset)
            ])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            if self.tree.openElements[-1].name != "html":
                self.parser.parseError("eof-in-frameset")
            else:
                assert self.parser.innerHTML

        def processCharacters(self, token):
            self.parser.parseError("unexpected-char-in-frameset")

        def startTagFrameset(self, token):
            self.tree.insertElement(token)

        def startTagFrame(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()

        def startTagNoframes(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-in-frameset",
                                   {"name": token["name"]})

        def endTagFrameset(self, token):
            if self.tree.openElements[-1].name == "html":
                # innerHTML case
                self.parser.parseError("unexpected-frameset-in-frameset-innerhtml")
            else:
                self.tree.openElements.pop()
            if (not self.parser.innerHTML and
                    self.tree.openElements[-1].name != "frameset"):
                # If we're not in innerHTML mode and the the current node is not a
                # "frameset" element (anymore) then switch.
                self.parser.phase = self.parser.phases["afterFrameset"]

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-in-frameset",
                                   {"name": token["name"]})

    class AfterFramesetPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#after3
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("noframes", self.startTagNoframes)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("html", self.endTagHtml)
            ])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            # Stop parsing
            pass

        def processCharacters(self, token):
            self.parser.parseError("unexpected-char-after-frameset")

        def startTagNoframes(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-after-frameset",
                                   {"name": token["name"]})

        def endTagHtml(self, token):
            self.parser.phase = self.parser.phases["afterAfterFrameset"]

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-after-frameset",
                                   {"name": token["name"]})

    class AfterAfterBodyPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml)
            ])
            self.startTagHandler.default = self.startTagOther

        def processEOF(self):
            pass

        def processComment(self, token):
            self.tree.insertComment(token, self.tree.document)

        def processSpaceCharacters(self, token):
            return self.parser.phases["inBody"].processSpaceCharacters(token)

        def processCharacters(self, token):
            self.parser.parseError("expected-eof-but-got-char")
            self.parser.phase = self.parser.phases["inBody"]
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("expected-eof-but-got-start-tag",
                                   {"name": token["name"]})
            self.parser.phase = self.parser.phases["inBody"]
            return token

        def processEndTag(self, token):
            self.parser.parseError("expected-eof-but-got-end-tag",
                                   {"name": token["name"]})
            self.parser.phase = self.parser.phases["inBody"]
            return token

    class AfterAfterFramesetPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("noframes", self.startTagNoFrames)
            ])
            self.startTagHandler.default = self.startTagOther

        def processEOF(self):
            pass

        def processComment(self, token):
            self.tree.insertComment(token, self.tree.document)

        def processSpaceCharacters(self, token):
            return self.parser.phases["inBody"].processSpaceCharacters(token)

        def processCharacters(self, token):
            self.parser.parseError("expected-eof-but-got-char")

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagNoFrames(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("expected-eof-but-got-start-tag",
                                   {"name": token["name"]})

        def processEndTag(self, token):
            self.parser.parseError("expected-eof-but-got-end-tag",
                                   {"name": token["name"]})

    return {
        "initial": InitialPhase,
        "beforeHtml": BeforeHtmlPhase,
        "beforeHead": BeforeHeadPhase,
        "inHead": InHeadPhase,
        # XXX "inHeadNoscript": InHeadNoScriptPhase,
        "afterHead": AfterHeadPhase,
        "inBody": InBodyPhase,
        "text": TextPhase,
        "inTable": InTablePhase,
        "inTableText": InTableTextPhase,
        "inCaption": InCaptionPhase,
        "inColumnGroup": InColumnGroupPhase,
        "inTableBody": InTableBodyPhase,
        "inRow": InRowPhase,
        "inCell": InCellPhase,
        "inSelect": InSelectPhase,
        "inSelectInTable": InSelectInTablePhase,
        "inForeignContent": InForeignContentPhase,
        "afterBody": AfterBodyPhase,
        "inFrameset": InFramesetPhase,
        "afterFrameset": AfterFramesetPhase,
        "afterAfterBody": AfterAfterBodyPhase,
        "afterAfterFrameset": AfterAfterFramesetPhase,
        # XXX after after frameset
    }


def impliedTagToken(name, type="EndTag", attributes=None,
                    selfClosing=False):
    if attributes is None:
        attributes = {}
    return {"type": tokenTypes[type], "name": name, "data": attributes,
            "selfClosing": selfClosing}


class ParseError(Exception):
    """Error in parsed document"""
    pass
python3.3/site-packages/pip/_vendor/html5lib/__init__.py000064400000001312151733566750017125 0ustar00"""
HTML parsing library based on the WHATWG "HTML5"
specification. The parser is designed to be compatible with existing
HTML found in the wild and implements well-defined error recovery that
is largely compatible with modern desktop web browsers.

Example usage:

import html5lib
f = open("my_document.html")
tree = html5lib.parse(f)
"""

from __future__ import absolute_import, division, unicode_literals

from .html5parser import HTMLParser, parse, parseFragment
from .treebuilders import getTreeBuilder
from .treewalkers import getTreeWalker
from .serializer import serialize

__all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder",
           "getTreeWalker", "serialize"]
__version__ = "1.0b3"
python3.3/site-packages/pip/_vendor/html5lib/trie/py.py000064400000003357151733566750016774 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

from bisect import bisect_left

from ._base import Trie as ABCTrie


class Trie(ABCTrie):
    def __init__(self, data):
        if not all(isinstance(x, text_type) for x in data.keys()):
            raise TypeError("All keys must be strings")

        self._data = data
        self._keys = sorted(data.keys())
        self._cachestr = ""
        self._cachepoints = (0, len(data))

    def __contains__(self, key):
        return key in self._data

    def __len__(self):
        return len(self._data)

    def __iter__(self):
        return iter(self._data)

    def __getitem__(self, key):
        return self._data[key]

    def keys(self, prefix=None):
        if prefix is None or prefix == "" or not self._keys:
            return set(self._keys)

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints
            start = i = bisect_left(self._keys, prefix, lo, hi)
        else:
            start = i = bisect_left(self._keys, prefix)

        keys = set()
        if start == len(self._keys):
            return keys

        while self._keys[i].startswith(prefix):
            keys.add(self._keys[i])
            i += 1

        self._cachestr = prefix
        self._cachepoints = (start, i)

        return keys

    def has_keys_with_prefix(self, prefix):
        if prefix in self._data:
            return True

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints
            i = bisect_left(self._keys, prefix, lo, hi)
        else:
            i = bisect_left(self._keys, prefix)

        if i == len(self._keys):
            return False

        return self._keys[i].startswith(prefix)
python3.3/site-packages/pip/_vendor/html5lib/trie/__pycache__/__init__.cpython-33.pyc000064400000000742151733566750024357 0ustar00�
7�Re�c@seddlmZmZmZddlmZeZyddlmZWne	k
rZYnXeZdS(i(uabsolute_importudivisionuunicode_literalsi(uTrieN(
u
__future__uabsolute_importudivisionuunicode_literalsupyuTrieuPyTrieudatrieuDATrieuImportError(((u;/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/__init__.pyu<module>s
python3.3/site-packages/pip/_vendor/html5lib/trie/__pycache__/_base.cpython-33.pyc000064400000004421151733566750023667 0ustar00�
7�Re�c@sFddlmZmZmZddlmZGdd�de�ZdS(i(uabsolute_importudivisionuunicode_literals(uMappingcsS|EeZdZdZd
�fdd�Zdd�Zdd�Zdd	�Z�S(uTrieuAbstract base class for triescsBt�j�}�dkr%t|�St�fdd�|D��S(Ncs%g|]}|j��r|�qS((u
startswith(u.0ux(uprefix(u8/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/_base.pyu
<listcomp>s	uTrie.keys.<locals>.<listcomp>(usuperukeysuNoneuset(uselfuprefixukeys(u	__class__(uprefixu8/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/_base.pyukeys	s
u	Trie.keyscCs.x'|j�D]}|j|�r
dSq
WdS(NTF(ukeysu
startswithuTrueuFalse(uselfuprefixukey((u8/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/_base.pyuhas_keys_with_prefixsuTrie.has_keys_with_prefixcCsj||kr|SxGtdt|�d�D],}|d|�|kr*|d|�Sq*Wt|��dS(Ni(urangeulenuKeyError(uselfuprefixui((u8/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/_base.pyulongest_prefixs uTrie.longest_prefixcCs|j|�}|||fS(N(ulongest_prefix(uselfuprefixulprefix((u8/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/_base.pyulongest_prefix_item#suTrie.longest_prefix_itemN(	u__name__u
__module__u__qualname__u__doc__uNoneukeysuhas_keys_with_prefixulongest_prefixulongest_prefix_item(u
__locals__((u	__class__u8/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/_base.pyuTries
	
uTrieN(u
__future__uabsolute_importudivisionuunicode_literalsucollectionsuMappinguTrie(((u8/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/_base.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/trie/__pycache__/datrie.cpython-33.pyc000064400000006342151733566750024072 0ustar00�
7�Re�c@sfddlmZmZmZddlmZddlmZddl	mZ
Gdd�de
�ZdS(i(uabsolute_importudivisionuunicode_literals(uTrie(u	text_typeicBs�|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zddd�Z	d
d�Z
dd�Zdd�ZdS(uTriecCs�t�}xP|j�D]B}t|t�s:td��nx|D]}|j|�qAWqWtdj|��|_x'|j	�D]\}}||j|<q�WdS(NuAll keys must be stringsu(
usetukeysu
isinstanceu	text_typeu	TypeErroruadduDATrieujoinu_datauitems(uselfudataucharsukeyucharuvalue((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyu__init__
s	
u
Trie.__init__cCs
||jkS(N(u_data(uselfukey((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyu__contains__suTrie.__contains__cCs
t|j�S(N(ulenu_data(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyu__len__suTrie.__len__cCs
t��dS(N(uNotImplementedError(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyu__iter__su
Trie.__iter__cCs|j|S(N(u_data(uselfukey((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyu__getitem__suTrie.__getitem__cCs|jj|�S(N(u_dataukeys(uselfuprefix((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyukeys"su	Trie.keyscCs|jj|�S(N(u_datauhas_keys_with_prefix(uselfuprefix((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyuhas_keys_with_prefix%suTrie.has_keys_with_prefixcCs|jj|�S(N(u_dataulongest_prefix(uselfuprefix((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyulongest_prefix(suTrie.longest_prefixcCs|jj|�S(N(u_dataulongest_prefix_item(uselfuprefix((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyulongest_prefix_item+suTrie.longest_prefix_itemN(
u__name__u
__module__u__qualname__u__init__u__contains__u__len__u__iter__u__getitem__uNoneukeysuhas_keys_with_prefixulongest_prefixulongest_prefix_item(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyuTrie	suTrieN(u
__future__uabsolute_importudivisionuunicode_literalsudatrieuTrieuDATrieupip._vendor.sixu	text_typeu_baseuABCTrie(((u9/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/datrie.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/trie/__pycache__/py.cpython-33.pyc000064400000006675151733566750023263 0ustar00�
7�Re�c@sfddlmZmZmZddlmZddlmZddlm	Z
Gdd�de
�Z	dS(	i(uabsolute_importudivisionuunicode_literals(u	text_type(ubisect_lefti(uTriecBsk|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zddd�Z	d
d�Z
dS(uTriecCsntdd�|j�D��s.td��n||_t|j��|_d|_dt|�f|_dS(Ncss|]}t|t�VqdS(N(u
isinstanceu	text_type(u.0ux((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyu	<genexpr>su Trie.__init__.<locals>.<genexpr>uAll keys must be stringsui(	uallukeysu	TypeErroru_datausortedu_keysu	_cachestrulenu_cachepoints(uselfudata((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyu__init__
s		u
Trie.__init__cCs
||jkS(N(u_data(uselfukey((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyu__contains__suTrie.__contains__cCs
t|j�S(N(ulenu_data(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyu__len__suTrie.__len__cCs
t|j�S(N(uiteru_data(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyu__iter__su
Trie.__iter__cCs|j|S(N(u_data(uselfukey((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyu__getitem__suTrie.__getitem__cCs�|dks"|dks"|jr/t|j�S|j|j�ro|j\}}t|j|||�}}nt|j|�}}t�}|t|j�kr�|Sx8|j|j|�r�|j|j|�|d7}q�W||_||f|_|S(Nui(	uNoneu_keysusetu
startswithu	_cachestru_cachepointsubisect_leftulenuadd(uselfuprefixulouhiustartuiukeys((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyukeyss"
		u	Trie.keyscCs�||jkrdS|j|j�rO|j\}}t|j|||�}nt|j|�}|t|j�krzdS|j|j|�S(NTF(	u_datauTrueu
startswithu	_cachestru_cachepointsubisect_leftu_keysulenuFalse(uselfuprefixulouhiui((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyuhas_keys_with_prefix6suTrie.has_keys_with_prefixN(u__name__u
__module__u__qualname__u__init__u__contains__u__len__u__iter__u__getitem__uNoneukeysuhas_keys_with_prefix(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyuTrie	s	uTrieN(u
__future__uabsolute_importudivisionuunicode_literalsupip._vendor.sixu	text_typeubisectubisect_leftu_baseuTrieuABCTrie(((u5/tmp/pip-zej_zi-build/pip/_vendor/html5lib/trie/py.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/trie/_base.py000064400000001637151733566750017414 0ustar00from __future__ import absolute_import, division, unicode_literals

from collections import Mapping


class Trie(Mapping):
    """Abstract base class for tries"""

    def keys(self, prefix=None):
        keys = super().keys()

        if prefix is None:
            return set(keys)

        # Python 2.6: no set comprehensions
        return set([x for x in keys if x.startswith(prefix)])

    def has_keys_with_prefix(self, prefix):
        for key in self.keys():
            if key.startswith(prefix):
                return True

        return False

    def longest_prefix(self, prefix):
        if prefix in self:
            return prefix

        for i in range(1, len(prefix) + 1):
            if prefix[:-i] in self:
                return prefix[:-i]

        raise KeyError(prefix)

    def longest_prefix_item(self, prefix):
        lprefix = self.longest_prefix(prefix)
        return (lprefix, self[lprefix])
python3.3/site-packages/pip/_vendor/html5lib/trie/datrie.py000064400000002232151733566750017603 0ustar00from __future__ import absolute_import, division, unicode_literals

from datrie import Trie as DATrie
from pip._vendor.six import text_type

from ._base import Trie as ABCTrie


class Trie(ABCTrie):
    def __init__(self, data):
        chars = set()
        for key in data.keys():
            if not isinstance(key, text_type):
                raise TypeError("All keys must be strings")
            for char in key:
                chars.add(char)

        self._data = DATrie("".join(chars))
        for key, value in data.items():
            self._data[key] = value

    def __contains__(self, key):
        return key in self._data

    def __len__(self):
        return len(self._data)

    def __iter__(self):
        raise NotImplementedError()

    def __getitem__(self, key):
        return self._data[key]

    def keys(self, prefix=None):
        return self._data.keys(prefix)

    def has_keys_with_prefix(self, prefix):
        return self._data.has_keys_with_prefix(prefix)

    def longest_prefix(self, prefix):
        return self._data.longest_prefix(prefix)

    def longest_prefix_item(self, prefix):
        return self._data.longest_prefix_item(prefix)
python3.3/site-packages/pip/_vendor/html5lib/trie/__init__.py000064400000000324151733566750020072 0ustar00from __future__ import absolute_import, division, unicode_literals

from .py import Trie as PyTrie

Trie = PyTrie

try:
    from .datrie import Trie as DATrie
except ImportError:
    pass
else:
    Trie = DATrie
python3.3/site-packages/pip/_vendor/html5lib/tokenizer.py000064400000226201151733566750017406 0ustar00from __future__ import absolute_import, division, unicode_literals

try:
    chr = unichr # flake8: noqa
except NameError:
    pass

from collections import deque

from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, hexDigits, EOF
from .constants import tokenTypes, tagTokenTypes
from .constants import replacementCharacters

from .inputstream import HTMLInputStream

from .trie import Trie

entitiesTrie = Trie(entities)


class HTMLTokenizer(object):
    """ This class takes care of tokenizing HTML.

    * self.currentToken
      Holds the token that is currently being processed.

    * self.state
      Holds a reference to the method to be invoked... XXX

    * self.stream
      Points to HTMLInputStream object.
    """

    def __init__(self, stream, encoding=None, parseMeta=True, useChardet=True,
                 lowercaseElementName=True, lowercaseAttrName=True, parser=None):

        self.stream = HTMLInputStream(stream, encoding, parseMeta, useChardet)
        self.parser = parser

        # Perform case conversions?
        self.lowercaseElementName = lowercaseElementName
        self.lowercaseAttrName = lowercaseAttrName

        # Setup the initial tokenizer state
        self.escapeFlag = False
        self.lastFourChars = []
        self.state = self.dataState
        self.escape = False

        # The current token being created
        self.currentToken = None
        super(HTMLTokenizer, self).__init__()

    def __iter__(self):
        """ This is where the magic happens.

        We do our usually processing through the states and when we have a token
        to return we yield the token which pauses processing until the next token
        is requested.
        """
        self.tokenQueue = deque([])
        # Start processing. When EOF is reached self.state will return False
        # instead of True and the loop will terminate.
        while self.state():
            while self.stream.errors:
                yield {"type": tokenTypes["ParseError"], "data": self.stream.errors.pop(0)}
            while self.tokenQueue:
                yield self.tokenQueue.popleft()

    def consumeNumberEntity(self, isHex):
        """This function returns either U+FFFD or the character based on the
        decimal or hexadecimal representation. It also discards ";" if present.
        If not present self.tokenQueue.append({"type": tokenTypes["ParseError"]}) is invoked.
        """

        allowed = digits
        radix = 10
        if isHex:
            allowed = hexDigits
            radix = 16

        charStack = []

        # Consume all the characters that are in range while making sure we
        # don't hit an EOF.
        c = self.stream.char()
        while c in allowed and c is not EOF:
            charStack.append(c)
            c = self.stream.char()

        # Convert the set of characters consumed to an int.
        charAsInt = int("".join(charStack), radix)

        # Certain characters get replaced with others
        if charAsInt in replacementCharacters:
            char = replacementCharacters[charAsInt]
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "illegal-codepoint-for-numeric-entity",
                                    "datavars": {"charAsInt": charAsInt}})
        elif ((0xD800 <= charAsInt <= 0xDFFF) or
              (charAsInt > 0x10FFFF)):
            char = "\uFFFD"
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "illegal-codepoint-for-numeric-entity",
                                    "datavars": {"charAsInt": charAsInt}})
        else:
            # Should speed up this check somehow (e.g. move the set to a constant)
            if ((0x0001 <= charAsInt <= 0x0008) or
                (0x000E <= charAsInt <= 0x001F) or
                (0x007F <= charAsInt <= 0x009F) or
                (0xFDD0 <= charAsInt <= 0xFDEF) or
                charAsInt in frozenset([0x000B, 0xFFFE, 0xFFFF, 0x1FFFE,
                                        0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE,
                                        0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE,
                                        0x5FFFF, 0x6FFFE, 0x6FFFF, 0x7FFFE,
                                        0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE,
                                        0x9FFFF, 0xAFFFE, 0xAFFFF, 0xBFFFE,
                                        0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE,
                                        0xDFFFF, 0xEFFFE, 0xEFFFF, 0xFFFFE,
                                        0xFFFFF, 0x10FFFE, 0x10FFFF])):
                self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                        "data":
                                        "illegal-codepoint-for-numeric-entity",
                                        "datavars": {"charAsInt": charAsInt}})
            try:
                # Try/except needed as UCS-2 Python builds' unichar only works
                # within the BMP.
                char = chr(charAsInt)
            except ValueError:
                v = charAsInt - 0x10000
                char = chr(0xD800 | (v >> 10)) + chr(0xDC00 | (v & 0x3FF))

        # Discard the ; if present. Otherwise, put it back on the queue and
        # invoke parseError on parser.
        if c != ";":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "numeric-entity-without-semicolon"})
            self.stream.unget(c)

        return char

    def consumeEntity(self, allowedChar=None, fromAttribute=False):
        # Initialise to the default output for when no entity is matched
        output = "&"

        charStack = [self.stream.char()]
        if (charStack[0] in spaceCharacters or charStack[0] in (EOF, "<", "&")
                or (allowedChar is not None and allowedChar == charStack[0])):
            self.stream.unget(charStack[0])

        elif charStack[0] == "#":
            # Read the next character to see if it's hex or decimal
            hex = False
            charStack.append(self.stream.char())
            if charStack[-1] in ("x", "X"):
                hex = True
                charStack.append(self.stream.char())

            # charStack[-1] should be the first digit
            if (hex and charStack[-1] in hexDigits) \
                    or (not hex and charStack[-1] in digits):
                # At least one digit found, so consume the whole number
                self.stream.unget(charStack[-1])
                output = self.consumeNumberEntity(hex)
            else:
                # No digits found
                self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                        "data": "expected-numeric-entity"})
                self.stream.unget(charStack.pop())
                output = "&" + "".join(charStack)

        else:
            # At this point in the process might have named entity. Entities
            # are stored in the global variable "entities".
            #
            # Consume characters and compare to these to a substring of the
            # entity names in the list until the substring no longer matches.
            while (charStack[-1] is not EOF):
                if not entitiesTrie.has_keys_with_prefix("".join(charStack)):
                    break
                charStack.append(self.stream.char())

            # At this point we have a string that starts with some characters
            # that may match an entity
            # Try to find the longest entity the string will match to take care
            # of &noti for instance.
            try:
                entityName = entitiesTrie.longest_prefix("".join(charStack[:-1]))
                entityLength = len(entityName)
            except KeyError:
                entityName = None

            if entityName is not None:
                if entityName[-1] != ";":
                    self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                            "named-entity-without-semicolon"})
                if (entityName[-1] != ";" and fromAttribute and
                    (charStack[entityLength] in asciiLetters or
                     charStack[entityLength] in digits or
                     charStack[entityLength] == "=")):
                    self.stream.unget(charStack.pop())
                    output = "&" + "".join(charStack)
                else:
                    output = entities[entityName]
                    self.stream.unget(charStack.pop())
                    output += "".join(charStack[entityLength:])
            else:
                self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                        "expected-named-entity"})
                self.stream.unget(charStack.pop())
                output = "&" + "".join(charStack)

        if fromAttribute:
            self.currentToken["data"][-1][1] += output
        else:
            if output in spaceCharacters:
                tokenType = "SpaceCharacters"
            else:
                tokenType = "Characters"
            self.tokenQueue.append({"type": tokenTypes[tokenType], "data": output})

    def processEntityInAttribute(self, allowedChar):
        """This method replaces the need for "entityInAttributeValueState".
        """
        self.consumeEntity(allowedChar=allowedChar, fromAttribute=True)

    def emitCurrentToken(self):
        """This method is a generic handler for emitting the tags. It also sets
        the state to "data" because that's what's needed after a token has been
        emitted.
        """
        token = self.currentToken
        # Add token to the queue to be yielded
        if (token["type"] in tagTokenTypes):
            if self.lowercaseElementName:
                token["name"] = token["name"].translate(asciiUpper2Lower)
            if token["type"] == tokenTypes["EndTag"]:
                if token["data"]:
                    self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                            "data": "attributes-in-end-tag"})
                if token["selfClosing"]:
                    self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                            "data": "self-closing-flag-on-end-tag"})
        self.tokenQueue.append(token)
        self.state = self.dataState

    # Below are the various tokenizer states worked out.
    def dataState(self):
        data = self.stream.char()
        if data == "&":
            self.state = self.entityDataState
        elif data == "<":
            self.state = self.tagOpenState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\u0000"})
        elif data is EOF:
            # Tokenization ends.
            return False
        elif data in spaceCharacters:
            # Directly after emitting a token you switch back to the "data
            # state". At that point spaceCharacters are important so they are
            # emitted separately.
            self.tokenQueue.append({"type": tokenTypes["SpaceCharacters"], "data":
                                    data + self.stream.charsUntil(spaceCharacters, True)})
            # No need to update lastFourChars here, since the first space will
            # have already been appended to lastFourChars and will have broken
            # any <!-- or --> sequences
        else:
            chars = self.stream.charsUntil(("&", "<", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def entityDataState(self):
        self.consumeEntity()
        self.state = self.dataState
        return True

    def rcdataState(self):
        data = self.stream.char()
        if data == "&":
            self.state = self.characterReferenceInRcdata
        elif data == "<":
            self.state = self.rcdataLessThanSignState
        elif data == EOF:
            # Tokenization ends.
            return False
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data in spaceCharacters:
            # Directly after emitting a token you switch back to the "data
            # state". At that point spaceCharacters are important so they are
            # emitted separately.
            self.tokenQueue.append({"type": tokenTypes["SpaceCharacters"], "data":
                                    data + self.stream.charsUntil(spaceCharacters, True)})
            # No need to update lastFourChars here, since the first space will
            # have already been appended to lastFourChars and will have broken
            # any <!-- or --> sequences
        else:
            chars = self.stream.charsUntil(("&", "<", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def characterReferenceInRcdata(self):
        self.consumeEntity()
        self.state = self.rcdataState
        return True

    def rawtextState(self):
        data = self.stream.char()
        if data == "<":
            self.state = self.rawtextLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data == EOF:
            # Tokenization ends.
            return False
        else:
            chars = self.stream.charsUntil(("<", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def scriptDataState(self):
        data = self.stream.char()
        if data == "<":
            self.state = self.scriptDataLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data == EOF:
            # Tokenization ends.
            return False
        else:
            chars = self.stream.charsUntil(("<", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def plaintextState(self):
        data = self.stream.char()
        if data == EOF:
            # Tokenization ends.
            return False
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + self.stream.charsUntil("\u0000")})
        return True

    def tagOpenState(self):
        data = self.stream.char()
        if data == "!":
            self.state = self.markupDeclarationOpenState
        elif data == "/":
            self.state = self.closeTagOpenState
        elif data in asciiLetters:
            self.currentToken = {"type": tokenTypes["StartTag"],
                                 "name": data, "data": [],
                                 "selfClosing": False,
                                 "selfClosingAcknowledged": False}
            self.state = self.tagNameState
        elif data == ">":
            # XXX In theory it could be something besides a tag name. But
            # do we really care?
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-tag-name-but-got-right-bracket"})
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<>"})
            self.state = self.dataState
        elif data == "?":
            # XXX In theory it could be something besides a tag name. But
            # do we really care?
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-tag-name-but-got-question-mark"})
            self.stream.unget(data)
            self.state = self.bogusCommentState
        else:
            # XXX
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-tag-name"})
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.dataState
        return True

    def closeTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.currentToken = {"type": tokenTypes["EndTag"], "name": data,
                                 "data": [], "selfClosing": False}
            self.state = self.tagNameState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-closing-tag-but-got-right-bracket"})
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-closing-tag-but-got-eof"})
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.state = self.dataState
        else:
            # XXX data can be _'_...
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-closing-tag-but-got-char",
                                    "datavars": {"data": data}})
            self.stream.unget(data)
            self.state = self.bogusCommentState
        return True

    def tagNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeAttributeNameState
        elif data == ">":
            self.emitCurrentToken()
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-tag-name"})
            self.state = self.dataState
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["name"] += "\uFFFD"
        else:
            self.currentToken["name"] += data
            # (Don't use charsUntil here, because tag names are
            # very short and it's faster to not do anything fancy)
        return True

    def rcdataLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.temporaryBuffer = ""
            self.state = self.rcdataEndTagOpenState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.rcdataState
        return True

    def rcdataEndTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.temporaryBuffer += data
            self.state = self.rcdataEndTagNameState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.stream.unget(data)
            self.state = self.rcdataState
        return True

    def rcdataEndTagNameState(self):
        appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
        data = self.stream.char()
        if data in spaceCharacters and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.beforeAttributeNameState
        elif data == "/" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.selfClosingStartTagState
        elif data == ">" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.emitCurrentToken()
            self.state = self.dataState
        elif data in asciiLetters:
            self.temporaryBuffer += data
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "</" + self.temporaryBuffer})
            self.stream.unget(data)
            self.state = self.rcdataState
        return True

    def rawtextLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.temporaryBuffer = ""
            self.state = self.rawtextEndTagOpenState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.rawtextState
        return True

    def rawtextEndTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.temporaryBuffer += data
            self.state = self.rawtextEndTagNameState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.stream.unget(data)
            self.state = self.rawtextState
        return True

    def rawtextEndTagNameState(self):
        appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
        data = self.stream.char()
        if data in spaceCharacters and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.beforeAttributeNameState
        elif data == "/" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.selfClosingStartTagState
        elif data == ">" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.emitCurrentToken()
            self.state = self.dataState
        elif data in asciiLetters:
            self.temporaryBuffer += data
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "</" + self.temporaryBuffer})
            self.stream.unget(data)
            self.state = self.rawtextState
        return True

    def scriptDataLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.temporaryBuffer = ""
            self.state = self.scriptDataEndTagOpenState
        elif data == "!":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<!"})
            self.state = self.scriptDataEscapeStartState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEndTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.temporaryBuffer += data
            self.state = self.scriptDataEndTagNameState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEndTagNameState(self):
        appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
        data = self.stream.char()
        if data in spaceCharacters and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.beforeAttributeNameState
        elif data == "/" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.selfClosingStartTagState
        elif data == ">" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.emitCurrentToken()
            self.state = self.dataState
        elif data in asciiLetters:
            self.temporaryBuffer += data
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "</" + self.temporaryBuffer})
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEscapeStartState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataEscapeStartDashState
        else:
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEscapeStartDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataEscapedDashDashState
        else:
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEscapedState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataEscapedDashState
        elif data == "<":
            self.state = self.scriptDataEscapedLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data == EOF:
            self.state = self.dataState
        else:
            chars = self.stream.charsUntil(("<", "-", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def scriptDataEscapedDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataEscapedDashDashState
        elif data == "<":
            self.state = self.scriptDataEscapedLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
            self.state = self.scriptDataEscapedState
        elif data == EOF:
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataEscapedDashDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
        elif data == "<":
            self.state = self.scriptDataEscapedLessThanSignState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": ">"})
            self.state = self.scriptDataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
            self.state = self.scriptDataEscapedState
        elif data == EOF:
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataEscapedLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.temporaryBuffer = ""
            self.state = self.scriptDataEscapedEndTagOpenState
        elif data in asciiLetters:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<" + data})
            self.temporaryBuffer = data
            self.state = self.scriptDataDoubleEscapeStartState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataEscapedEndTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.temporaryBuffer = data
            self.state = self.scriptDataEscapedEndTagNameState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.stream.unget(data)
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataEscapedEndTagNameState(self):
        appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
        data = self.stream.char()
        if data in spaceCharacters and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.beforeAttributeNameState
        elif data == "/" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.selfClosingStartTagState
        elif data == ">" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.emitCurrentToken()
            self.state = self.dataState
        elif data in asciiLetters:
            self.temporaryBuffer += data
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "</" + self.temporaryBuffer})
            self.stream.unget(data)
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataDoubleEscapeStartState(self):
        data = self.stream.char()
        if data in (spaceCharacters | frozenset(("/", ">"))):
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            if self.temporaryBuffer.lower() == "script":
                self.state = self.scriptDataDoubleEscapedState
            else:
                self.state = self.scriptDataEscapedState
        elif data in asciiLetters:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.temporaryBuffer += data
        else:
            self.stream.unget(data)
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataDoubleEscapedState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataDoubleEscapedDashState
        elif data == "<":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.state = self.scriptDataDoubleEscapedLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data == EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-script-in-script"})
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
        return True

    def scriptDataDoubleEscapedDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataDoubleEscapedDashDashState
        elif data == "<":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.state = self.scriptDataDoubleEscapedLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
            self.state = self.scriptDataDoubleEscapedState
        elif data == EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-script-in-script"})
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.state = self.scriptDataDoubleEscapedState
        return True

    def scriptDataDoubleEscapedDashDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
        elif data == "<":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.state = self.scriptDataDoubleEscapedLessThanSignState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": ">"})
            self.state = self.scriptDataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
            self.state = self.scriptDataDoubleEscapedState
        elif data == EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-script-in-script"})
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.state = self.scriptDataDoubleEscapedState
        return True

    def scriptDataDoubleEscapedLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "/"})
            self.temporaryBuffer = ""
            self.state = self.scriptDataDoubleEscapeEndState
        else:
            self.stream.unget(data)
            self.state = self.scriptDataDoubleEscapedState
        return True

    def scriptDataDoubleEscapeEndState(self):
        data = self.stream.char()
        if data in (spaceCharacters | frozenset(("/", ">"))):
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            if self.temporaryBuffer.lower() == "script":
                self.state = self.scriptDataEscapedState
            else:
                self.state = self.scriptDataDoubleEscapedState
        elif data in asciiLetters:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.temporaryBuffer += data
        else:
            self.stream.unget(data)
            self.state = self.scriptDataDoubleEscapedState
        return True

    def beforeAttributeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.stream.charsUntil(spaceCharacters, True)
        elif data in asciiLetters:
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        elif data == ">":
            self.emitCurrentToken()
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data in ("'", '"', "=", "<"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "invalid-character-in-attribute-name"})
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"].append(["\uFFFD", ""])
            self.state = self.attributeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-attribute-name-but-got-eof"})
            self.state = self.dataState
        else:
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        return True

    def attributeNameState(self):
        data = self.stream.char()
        leavingThisState = True
        emitToken = False
        if data == "=":
            self.state = self.beforeAttributeValueState
        elif data in asciiLetters:
            self.currentToken["data"][-1][0] += data +\
                self.stream.charsUntil(asciiLetters, True)
            leavingThisState = False
        elif data == ">":
            # XXX If we emit here the attributes are converted to a dict
            # without being checked and when the code below runs we error
            # because data is a dict not a list
            emitToken = True
        elif data in spaceCharacters:
            self.state = self.afterAttributeNameState
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][0] += "\uFFFD"
            leavingThisState = False
        elif data in ("'", '"', "<"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data":
                                    "invalid-character-in-attribute-name"})
            self.currentToken["data"][-1][0] += data
            leavingThisState = False
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "eof-in-attribute-name"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][0] += data
            leavingThisState = False

        if leavingThisState:
            # Attributes are not dropped at this stage. That happens when the
            # start tag token is emitted so values can still be safely appended
            # to attributes, but we do want to report the parse error in time.
            if self.lowercaseAttrName:
                self.currentToken["data"][-1][0] = (
                    self.currentToken["data"][-1][0].translate(asciiUpper2Lower))
            for name, value in self.currentToken["data"][:-1]:
                if self.currentToken["data"][-1][0] == name:
                    self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                            "duplicate-attribute"})
                    break
            # XXX Fix for above XXX
            if emitToken:
                self.emitCurrentToken()
        return True

    def afterAttributeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.stream.charsUntil(spaceCharacters, True)
        elif data == "=":
            self.state = self.beforeAttributeValueState
        elif data == ">":
            self.emitCurrentToken()
        elif data in asciiLetters:
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"].append(["\uFFFD", ""])
            self.state = self.attributeNameState
        elif data in ("'", '"', "<"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "invalid-character-after-attribute-name"})
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-end-of-tag-but-got-eof"})
            self.state = self.dataState
        else:
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        return True

    def beforeAttributeValueState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.stream.charsUntil(spaceCharacters, True)
        elif data == "\"":
            self.state = self.attributeValueDoubleQuotedState
        elif data == "&":
            self.state = self.attributeValueUnQuotedState
            self.stream.unget(data)
        elif data == "'":
            self.state = self.attributeValueSingleQuotedState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-attribute-value-but-got-right-bracket"})
            self.emitCurrentToken()
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][1] += "\uFFFD"
            self.state = self.attributeValueUnQuotedState
        elif data in ("=", "<", "`"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "equals-in-unquoted-attribute-value"})
            self.currentToken["data"][-1][1] += data
            self.state = self.attributeValueUnQuotedState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-attribute-value-but-got-eof"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][1] += data
            self.state = self.attributeValueUnQuotedState
        return True

    def attributeValueDoubleQuotedState(self):
        data = self.stream.char()
        if data == "\"":
            self.state = self.afterAttributeValueState
        elif data == "&":
            self.processEntityInAttribute('"')
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][1] += "\uFFFD"
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-attribute-value-double-quote"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][1] += data +\
                self.stream.charsUntil(("\"", "&", "\u0000"))
        return True

    def attributeValueSingleQuotedState(self):
        data = self.stream.char()
        if data == "'":
            self.state = self.afterAttributeValueState
        elif data == "&":
            self.processEntityInAttribute("'")
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][1] += "\uFFFD"
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-attribute-value-single-quote"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][1] += data +\
                self.stream.charsUntil(("'", "&", "\u0000"))
        return True

    def attributeValueUnQuotedState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeAttributeNameState
        elif data == "&":
            self.processEntityInAttribute(">")
        elif data == ">":
            self.emitCurrentToken()
        elif data in ('"', "'", "=", "<", "`"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-character-in-unquoted-attribute-value"})
            self.currentToken["data"][-1][1] += data
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][1] += "\uFFFD"
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-attribute-value-no-quotes"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][1] += data + self.stream.charsUntil(
                frozenset(("&", ">", '"', "'", "=", "<", "`", "\u0000")) | spaceCharacters)
        return True

    def afterAttributeValueState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeAttributeNameState
        elif data == ">":
            self.emitCurrentToken()
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-EOF-after-attribute-value"})
            self.stream.unget(data)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-character-after-attribute-value"})
            self.stream.unget(data)
            self.state = self.beforeAttributeNameState
        return True

    def selfClosingStartTagState(self):
        data = self.stream.char()
        if data == ">":
            self.currentToken["selfClosing"] = True
            self.emitCurrentToken()
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data":
                                    "unexpected-EOF-after-solidus-in-tag"})
            self.stream.unget(data)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-character-after-solidus-in-tag"})
            self.stream.unget(data)
            self.state = self.beforeAttributeNameState
        return True

    def bogusCommentState(self):
        # Make a new comment token and give it as value all the characters
        # until the first > or EOF (charsUntil checks for EOF automatically)
        # and emit it.
        data = self.stream.charsUntil(">")
        data = data.replace("\u0000", "\uFFFD")
        self.tokenQueue.append(
            {"type": tokenTypes["Comment"], "data": data})

        # Eat the character directly after the bogus comment which is either a
        # ">" or an EOF.
        self.stream.char()
        self.state = self.dataState
        return True

    def markupDeclarationOpenState(self):
        charStack = [self.stream.char()]
        if charStack[-1] == "-":
            charStack.append(self.stream.char())
            if charStack[-1] == "-":
                self.currentToken = {"type": tokenTypes["Comment"], "data": ""}
                self.state = self.commentStartState
                return True
        elif charStack[-1] in ('d', 'D'):
            matched = True
            for expected in (('o', 'O'), ('c', 'C'), ('t', 'T'),
                             ('y', 'Y'), ('p', 'P'), ('e', 'E')):
                charStack.append(self.stream.char())
                if charStack[-1] not in expected:
                    matched = False
                    break
            if matched:
                self.currentToken = {"type": tokenTypes["Doctype"],
                                     "name": "",
                                     "publicId": None, "systemId": None,
                                     "correct": True}
                self.state = self.doctypeState
                return True
        elif (charStack[-1] == "[" and
              self.parser is not None and
              self.parser.tree.openElements and
              self.parser.tree.openElements[-1].namespace != self.parser.tree.defaultNamespace):
            matched = True
            for expected in ["C", "D", "A", "T", "A", "["]:
                charStack.append(self.stream.char())
                if charStack[-1] != expected:
                    matched = False
                    break
            if matched:
                self.state = self.cdataSectionState
                return True

        self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                "expected-dashes-or-doctype"})

        while charStack:
            self.stream.unget(charStack.pop())
        self.state = self.bogusCommentState
        return True

    def commentStartState(self):
        data = self.stream.char()
        if data == "-":
            self.state = self.commentStartDashState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "incorrect-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += data
            self.state = self.commentState
        return True

    def commentStartDashState(self):
        data = self.stream.char()
        if data == "-":
            self.state = self.commentEndState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "-\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "incorrect-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += "-" + data
            self.state = self.commentState
        return True

    def commentState(self):
        data = self.stream.char()
        if data == "-":
            self.state = self.commentEndDashState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "\uFFFD"
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "eof-in-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += data + \
                self.stream.charsUntil(("-", "\u0000"))
        return True

    def commentEndDashState(self):
        data = self.stream.char()
        if data == "-":
            self.state = self.commentEndState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "-\uFFFD"
            self.state = self.commentState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment-end-dash"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += "-" + data
            self.state = self.commentState
        return True

    def commentEndState(self):
        data = self.stream.char()
        if data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "--\uFFFD"
            self.state = self.commentState
        elif data == "!":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-bang-after-double-dash-in-comment"})
            self.state = self.commentEndBangState
        elif data == "-":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-dash-after-double-dash-in-comment"})
            self.currentToken["data"] += data
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment-double-dash"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            # XXX
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-comment"})
            self.currentToken["data"] += "--" + data
            self.state = self.commentState
        return True

    def commentEndBangState(self):
        data = self.stream.char()
        if data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == "-":
            self.currentToken["data"] += "--!"
            self.state = self.commentEndDashState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "--!\uFFFD"
            self.state = self.commentState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment-end-bang-state"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += "--!" + data
            self.state = self.commentState
        return True

    def doctypeState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeDoctypeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-doctype-name-but-got-eof"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "need-space-after-doctype"})
            self.stream.unget(data)
            self.state = self.beforeDoctypeNameState
        return True

    def beforeDoctypeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-doctype-name-but-got-right-bracket"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["name"] = "\uFFFD"
            self.state = self.doctypeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-doctype-name-but-got-eof"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["name"] = data
            self.state = self.doctypeNameState
        return True

    def doctypeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
            self.state = self.afterDoctypeNameState
        elif data == ">":
            self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["name"] += "\uFFFD"
            self.state = self.doctypeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype-name"})
            self.currentToken["correct"] = False
            self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["name"] += data
        return True

    def afterDoctypeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.currentToken["correct"] = False
            self.stream.unget(data)
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            if data in ("p", "P"):
                matched = True
                for expected in (("u", "U"), ("b", "B"), ("l", "L"),
                                 ("i", "I"), ("c", "C")):
                    data = self.stream.char()
                    if data not in expected:
                        matched = False
                        break
                if matched:
                    self.state = self.afterDoctypePublicKeywordState
                    return True
            elif data in ("s", "S"):
                matched = True
                for expected in (("y", "Y"), ("s", "S"), ("t", "T"),
                                 ("e", "E"), ("m", "M")):
                    data = self.stream.char()
                    if data not in expected:
                        matched = False
                        break
                if matched:
                    self.state = self.afterDoctypeSystemKeywordState
                    return True

            # All the characters read before the current 'data' will be
            # [a-zA-Z], so they're garbage in the bogus doctype and can be
            # discarded; only the latest character might be '>' or EOF
            # and needs to be ungetted
            self.stream.unget(data)
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-space-or-right-bracket-in-doctype", "datavars":
                                    {"data": data}})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState

        return True

    def afterDoctypePublicKeywordState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeDoctypePublicIdentifierState
        elif data in ("'", '"'):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.stream.unget(data)
            self.state = self.beforeDoctypePublicIdentifierState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.stream.unget(data)
            self.state = self.beforeDoctypePublicIdentifierState
        return True

    def beforeDoctypePublicIdentifierState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == "\"":
            self.currentToken["publicId"] = ""
            self.state = self.doctypePublicIdentifierDoubleQuotedState
        elif data == "'":
            self.currentToken["publicId"] = ""
            self.state = self.doctypePublicIdentifierSingleQuotedState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState
        return True

    def doctypePublicIdentifierDoubleQuotedState(self):
        data = self.stream.char()
        if data == "\"":
            self.state = self.afterDoctypePublicIdentifierState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["publicId"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["publicId"] += data
        return True

    def doctypePublicIdentifierSingleQuotedState(self):
        data = self.stream.char()
        if data == "'":
            self.state = self.afterDoctypePublicIdentifierState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["publicId"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["publicId"] += data
        return True

    def afterDoctypePublicIdentifierState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.betweenDoctypePublicAndSystemIdentifiersState
        elif data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == '"':
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierDoubleQuotedState
        elif data == "'":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierSingleQuotedState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState
        return True

    def betweenDoctypePublicAndSystemIdentifiersState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == '"':
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierDoubleQuotedState
        elif data == "'":
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierSingleQuotedState
        elif data == EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState
        return True

    def afterDoctypeSystemKeywordState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeDoctypeSystemIdentifierState
        elif data in ("'", '"'):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.stream.unget(data)
            self.state = self.beforeDoctypeSystemIdentifierState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.stream.unget(data)
            self.state = self.beforeDoctypeSystemIdentifierState
        return True

    def beforeDoctypeSystemIdentifierState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == "\"":
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierDoubleQuotedState
        elif data == "'":
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierSingleQuotedState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState
        return True

    def doctypeSystemIdentifierDoubleQuotedState(self):
        data = self.stream.char()
        if data == "\"":
            self.state = self.afterDoctypeSystemIdentifierState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["systemId"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["systemId"] += data
        return True

    def doctypeSystemIdentifierSingleQuotedState(self):
        data = self.stream.char()
        if data == "'":
            self.state = self.afterDoctypeSystemIdentifierState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["systemId"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["systemId"] += data
        return True

    def afterDoctypeSystemIdentifierState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.state = self.bogusDoctypeState
        return True

    def bogusDoctypeState(self):
        data = self.stream.char()
        if data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            # XXX EMIT
            self.stream.unget(data)
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            pass
        return True

    def cdataSectionState(self):
        data = []
        while True:
            data.append(self.stream.charsUntil("]"))
            data.append(self.stream.charsUntil(">"))
            char = self.stream.char()
            if char == EOF:
                break
            else:
                assert char == ">"
                if data[-1][-2:] == "]]":
                    data[-1] = data[-1][:-2]
                    break
                else:
                    data.append(char)

        data = "".join(data)
        # Deal with null here rather than in the parser
        nullCount = data.count("\u0000")
        if nullCount > 0:
            for i in range(nullCount):
                self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                        "data": "invalid-codepoint"})
            data = data.replace("\u0000", "\uFFFD")
        if data:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": data})
        self.state = self.dataState
        return True
python3.3/site-packages/pip/_vendor/html5lib/inputstream.py000064400000073654151733566750017763 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

import codecs
import re

from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
from .constants import encodings, ReparseException
from . import utils

from io import StringIO

try:
    from io import BytesIO
except ImportError:
    BytesIO = StringIO

try:
    from io import BufferedIOBase
except ImportError:
    class BufferedIOBase(object):
        pass

# Non-unicode versions of constants for use in the pre-parser
spaceCharactersBytes = frozenset([item.encode("ascii") for item in spaceCharacters])
asciiLettersBytes = frozenset([item.encode("ascii") for item in asciiLetters])
asciiUppercaseBytes = frozenset([item.encode("ascii") for item in asciiUppercase])
spacesAngleBrackets = spaceCharactersBytes | frozenset([b">", b"<"])

invalid_unicode_re = re.compile("[\u0001-\u0008\u000B\u000E-\u001F\u007F-\u009F\uD800-\uDFFF\uFDD0-\uFDEF\uFFFE\uFFFF\U0001FFFE\U0001FFFF\U0002FFFE\U0002FFFF\U0003FFFE\U0003FFFF\U0004FFFE\U0004FFFF\U0005FFFE\U0005FFFF\U0006FFFE\U0006FFFF\U0007FFFE\U0007FFFF\U0008FFFE\U0008FFFF\U0009FFFE\U0009FFFF\U000AFFFE\U000AFFFF\U000BFFFE\U000BFFFF\U000CFFFE\U000CFFFF\U000DFFFE\U000DFFFF\U000EFFFE\U000EFFFF\U000FFFFE\U000FFFFF\U0010FFFE\U0010FFFF]")

non_bmp_invalid_codepoints = set([0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE,
                                  0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE, 0x5FFFF,
                                  0x6FFFE, 0x6FFFF, 0x7FFFE, 0x7FFFF, 0x8FFFE,
                                  0x8FFFF, 0x9FFFE, 0x9FFFF, 0xAFFFE, 0xAFFFF,
                                  0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE,
                                  0xDFFFF, 0xEFFFE, 0xEFFFF, 0xFFFFE, 0xFFFFF,
                                  0x10FFFE, 0x10FFFF])

ascii_punctuation_re = re.compile("[\u0009-\u000D\u0020-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]")

# Cache for charsUntil()
charsUntilRegEx = {}


class BufferedStream(object):
    """Buffering for streams that do not have buffering of their own

    The buffer is implemented as a list of chunks on the assumption that
    joining many strings will be slow since it is O(n**2)
    """

    def __init__(self, stream):
        self.stream = stream
        self.buffer = []
        self.position = [-1, 0]  # chunk number, offset

    def tell(self):
        pos = 0
        for chunk in self.buffer[:self.position[0]]:
            pos += len(chunk)
        pos += self.position[1]
        return pos

    def seek(self, pos):
        assert pos <= self._bufferedBytes()
        offset = pos
        i = 0
        while len(self.buffer[i]) < offset:
            offset -= len(self.buffer[i])
            i += 1
        self.position = [i, offset]

    def read(self, bytes):
        if not self.buffer:
            return self._readStream(bytes)
        elif (self.position[0] == len(self.buffer) and
              self.position[1] == len(self.buffer[-1])):
            return self._readStream(bytes)
        else:
            return self._readFromBuffer(bytes)

    def _bufferedBytes(self):
        return sum([len(item) for item in self.buffer])

    def _readStream(self, bytes):
        data = self.stream.read(bytes)
        self.buffer.append(data)
        self.position[0] += 1
        self.position[1] = len(data)
        return data

    def _readFromBuffer(self, bytes):
        remainingBytes = bytes
        rv = []
        bufferIndex = self.position[0]
        bufferOffset = self.position[1]
        while bufferIndex < len(self.buffer) and remainingBytes != 0:
            assert remainingBytes > 0
            bufferedData = self.buffer[bufferIndex]

            if remainingBytes <= len(bufferedData) - bufferOffset:
                bytesToRead = remainingBytes
                self.position = [bufferIndex, bufferOffset + bytesToRead]
            else:
                bytesToRead = len(bufferedData) - bufferOffset
                self.position = [bufferIndex, len(bufferedData)]
                bufferIndex += 1
            rv.append(bufferedData[bufferOffset:bufferOffset + bytesToRead])
            remainingBytes -= bytesToRead

            bufferOffset = 0

        if remainingBytes:
            rv.append(self._readStream(remainingBytes))

        return b"".join(rv)


def HTMLInputStream(source, encoding=None, parseMeta=True, chardet=True):
    if hasattr(source, "read"):
        isUnicode = isinstance(source.read(0), text_type)
    else:
        isUnicode = isinstance(source, text_type)

    if isUnicode:
        if encoding is not None:
            raise TypeError("Cannot explicitly set an encoding with a unicode string")

        return HTMLUnicodeInputStream(source)
    else:
        return HTMLBinaryInputStream(source, encoding, parseMeta, chardet)


class HTMLUnicodeInputStream(object):
    """Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    """

    _defaultChunkSize = 10240

    def __init__(self, source):
        """Initialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        """

        # Craziness
        if len("\U0010FFFF") == 1:
            self.reportCharacterErrors = self.characterErrorsUCS4
            self.replaceCharactersRegexp = re.compile("[\uD800-\uDFFF]")
        else:
            self.reportCharacterErrors = self.characterErrorsUCS2
            self.replaceCharactersRegexp = re.compile("([\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF])")

        # List of where new lines occur
        self.newLines = [0]

        self.charEncoding = ("utf-8", "certain")
        self.dataStream = self.openStream(source)

        self.reset()

    def reset(self):
        self.chunk = ""
        self.chunkSize = 0
        self.chunkOffset = 0
        self.errors = []

        # number of (complete) lines in previous chunks
        self.prevNumLines = 0
        # number of columns in the last line of the previous chunk
        self.prevNumCols = 0

        # Deal with CR LF and surrogates split over chunk boundaries
        self._bufferedCharacter = None

    def openStream(self, source):
        """Produces a file object from source.

        source can be either a file object, local filename or a string.

        """
        # Already a file object
        if hasattr(source, 'read'):
            stream = source
        else:
            stream = StringIO(source)

        return stream

    def _position(self, offset):
        chunk = self.chunk
        nLines = chunk.count('\n', 0, offset)
        positionLine = self.prevNumLines + nLines
        lastLinePos = chunk.rfind('\n', 0, offset)
        if lastLinePos == -1:
            positionColumn = self.prevNumCols + offset
        else:
            positionColumn = offset - (lastLinePos + 1)
        return (positionLine, positionColumn)

    def position(self):
        """Returns (line, col) of the current position in the stream."""
        line, col = self._position(self.chunkOffset)
        return (line + 1, col)

    def char(self):
        """ Read one character from the stream or queue if available. Return
            EOF when EOF is reached.
        """
        # Read a new chunk from the input stream if necessary
        if self.chunkOffset >= self.chunkSize:
            if not self.readChunk():
                return EOF

        chunkOffset = self.chunkOffset
        char = self.chunk[chunkOffset]
        self.chunkOffset = chunkOffset + 1

        return char

    def readChunk(self, chunkSize=None):
        if chunkSize is None:
            chunkSize = self._defaultChunkSize

        self.prevNumLines, self.prevNumCols = self._position(self.chunkSize)

        self.chunk = ""
        self.chunkSize = 0
        self.chunkOffset = 0

        data = self.dataStream.read(chunkSize)

        # Deal with CR LF and surrogates broken across chunks
        if self._bufferedCharacter:
            data = self._bufferedCharacter + data
            self._bufferedCharacter = None
        elif not data:
            # We have no more data, bye-bye stream
            return False

        if len(data) > 1:
            lastv = ord(data[-1])
            if lastv == 0x0D or 0xD800 <= lastv <= 0xDBFF:
                self._bufferedCharacter = data[-1]
                data = data[:-1]

        self.reportCharacterErrors(data)

        # Replace invalid characters
        # Note U+0000 is dealt with in the tokenizer
        data = self.replaceCharactersRegexp.sub("\ufffd", data)

        data = data.replace("\r\n", "\n")
        data = data.replace("\r", "\n")

        self.chunk = data
        self.chunkSize = len(data)

        return True

    def characterErrorsUCS4(self, data):
        for i in range(len(invalid_unicode_re.findall(data))):
            self.errors.append("invalid-codepoint")

    def characterErrorsUCS2(self, data):
        # Someone picked the wrong compile option
        # You lose
        skip = False
        for match in invalid_unicode_re.finditer(data):
            if skip:
                continue
            codepoint = ord(match.group())
            pos = match.start()
            # Pretty sure there should be endianness issues here
            if utils.isSurrogatePair(data[pos:pos + 2]):
                # We have a surrogate pair!
                char_val = utils.surrogatePairToCodepoint(data[pos:pos + 2])
                if char_val in non_bmp_invalid_codepoints:
                    self.errors.append("invalid-codepoint")
                skip = True
            elif (codepoint >= 0xD800 and codepoint <= 0xDFFF and
                  pos == len(data) - 1):
                self.errors.append("invalid-codepoint")
            else:
                skip = False
                self.errors.append("invalid-codepoint")

    def charsUntil(self, characters, opposite=False):
        """ Returns a string of characters from the stream up to but not
        including any character in 'characters' or EOF. 'characters' must be
        a container that supports the 'in' method and iteration over its
        characters.
        """

        # Use a cache of regexps to find the required characters
        try:
            chars = charsUntilRegEx[(characters, opposite)]
        except KeyError:
            if __debug__:
                for c in characters:
                    assert(ord(c) < 128)
            regex = "".join(["\\x%02x" % ord(c) for c in characters])
            if not opposite:
                regex = "^%s" % regex
            chars = charsUntilRegEx[(characters, opposite)] = re.compile("[%s]+" % regex)

        rv = []

        while True:
            # Find the longest matching prefix
            m = chars.match(self.chunk, self.chunkOffset)
            if m is None:
                # If nothing matched, and it wasn't because we ran out of chunk,
                # then stop
                if self.chunkOffset != self.chunkSize:
                    break
            else:
                end = m.end()
                # If not the whole chunk matched, return everything
                # up to the part that didn't match
                if end != self.chunkSize:
                    rv.append(self.chunk[self.chunkOffset:end])
                    self.chunkOffset = end
                    break
            # If the whole remainder of the chunk matched,
            # use it all and read the next chunk
            rv.append(self.chunk[self.chunkOffset:])
            if not self.readChunk():
                # Reached EOF
                break

        r = "".join(rv)
        return r

    def unget(self, char):
        # Only one character is allowed to be ungotten at once - it must
        # be consumed again before any further call to unget
        if char is not None:
            if self.chunkOffset == 0:
                # unget is called quite rarely, so it's a good idea to do
                # more work here if it saves a bit of work in the frequently
                # called char and charsUntil.
                # So, just prepend the ungotten character onto the current
                # chunk:
                self.chunk = char + self.chunk
                self.chunkSize += 1
            else:
                self.chunkOffset -= 1
                assert self.chunk[self.chunkOffset] == char


class HTMLBinaryInputStream(HTMLUnicodeInputStream):
    """Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    """

    def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
        """Initialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        """
        # Raw Stream - for unicode objects this will encode to utf-8 and set
        #              self.charEncoding as appropriate
        self.rawStream = self.openStream(source)

        HTMLUnicodeInputStream.__init__(self, self.rawStream)

        self.charEncoding = (codecName(encoding), "certain")

        # Encoding Information
        # Number of bytes to use when looking for a meta element with
        # encoding information
        self.numBytesMeta = 512
        # Number of bytes to use when using detecting encoding using chardet
        self.numBytesChardet = 100
        # Encoding to use if no other information can be found
        self.defaultEncoding = "windows-1252"

        # Detect encoding iff no explicit "transport level" encoding is supplied
        if (self.charEncoding[0] is None):
            self.charEncoding = self.detectEncoding(parseMeta, chardet)

        # Call superclass
        self.reset()

    def reset(self):
        self.dataStream = codecs.getreader(self.charEncoding[0])(self.rawStream,
                                                                 'replace')
        HTMLUnicodeInputStream.reset(self)

    def openStream(self, source):
        """Produces a file object from source.

        source can be either a file object, local filename or a string.

        """
        # Already a file object
        if hasattr(source, 'read'):
            stream = source
        else:
            stream = BytesIO(source)

        try:
            stream.seek(stream.tell())
        except:
            stream = BufferedStream(stream)

        return stream

    def detectEncoding(self, parseMeta=True, chardet=True):
        # First look for a BOM
        # This will also read past the BOM if present
        encoding = self.detectBOM()
        confidence = "certain"
        # If there is no BOM need to look for meta elements with encoding
        # information
        if encoding is None and parseMeta:
            encoding = self.detectEncodingMeta()
            confidence = "tentative"
        # Guess with chardet, if avaliable
        if encoding is None and chardet:
            confidence = "tentative"
            try:
                try:
                    from charade.universaldetector import UniversalDetector
                except ImportError:
                    from chardet.universaldetector import UniversalDetector
                buffers = []
                detector = UniversalDetector()
                while not detector.done:
                    buffer = self.rawStream.read(self.numBytesChardet)
                    assert isinstance(buffer, bytes)
                    if not buffer:
                        break
                    buffers.append(buffer)
                    detector.feed(buffer)
                detector.close()
                encoding = detector.result['encoding']
                self.rawStream.seek(0)
            except ImportError:
                pass
        # If all else fails use the default encoding
        if encoding is None:
            confidence = "tentative"
            encoding = self.defaultEncoding

        # Substitute for equivalent encodings:
        encodingSub = {"iso-8859-1": "windows-1252"}

        if encoding.lower() in encodingSub:
            encoding = encodingSub[encoding.lower()]

        return encoding, confidence

    def changeEncoding(self, newEncoding):
        assert self.charEncoding[1] != "certain"
        newEncoding = codecName(newEncoding)
        if newEncoding in ("utf-16", "utf-16-be", "utf-16-le"):
            newEncoding = "utf-8"
        if newEncoding is None:
            return
        elif newEncoding == self.charEncoding[0]:
            self.charEncoding = (self.charEncoding[0], "certain")
        else:
            self.rawStream.seek(0)
            self.reset()
            self.charEncoding = (newEncoding, "certain")
            raise ReparseException("Encoding changed from %s to %s" % (self.charEncoding[0], newEncoding))

    def detectBOM(self):
        """Attempts to detect at BOM at the start of the stream. If
        an encoding can be determined from the BOM return the name of the
        encoding otherwise return None"""
        bomDict = {
            codecs.BOM_UTF8: 'utf-8',
            codecs.BOM_UTF16_LE: 'utf-16-le', codecs.BOM_UTF16_BE: 'utf-16-be',
            codecs.BOM_UTF32_LE: 'utf-32-le', codecs.BOM_UTF32_BE: 'utf-32-be'
        }

        # Go to beginning of file and read in 4 bytes
        string = self.rawStream.read(4)
        assert isinstance(string, bytes)

        # Try detecting the BOM using bytes from the string
        encoding = bomDict.get(string[:3])         # UTF-8
        seek = 3
        if not encoding:
            # Need to detect UTF-32 before UTF-16
            encoding = bomDict.get(string)         # UTF-32
            seek = 4
            if not encoding:
                encoding = bomDict.get(string[:2])  # UTF-16
                seek = 2

        # Set the read position past the BOM if one was found, otherwise
        # set it to the start of the stream
        self.rawStream.seek(encoding and seek or 0)

        return encoding

    def detectEncodingMeta(self):
        """Report the encoding declared by the meta element
        """
        buffer = self.rawStream.read(self.numBytesMeta)
        assert isinstance(buffer, bytes)
        parser = EncodingParser(buffer)
        self.rawStream.seek(0)
        encoding = parser.getEncoding()

        if encoding in ("utf-16", "utf-16-be", "utf-16-le"):
            encoding = "utf-8"

        return encoding


class EncodingBytes(bytes):
    """String-like object with an associated position and various extra methods
    If the position is ever greater than the string length then an exception is
    raised"""
    def __new__(self, value):
        assert isinstance(value, bytes)
        return bytes.__new__(self, value.lower())

    def __init__(self, value):
        self._position = -1

    def __iter__(self):
        return self

    def __next__(self):
        p = self._position = self._position + 1
        if p >= len(self):
            raise StopIteration
        elif p < 0:
            raise TypeError
        return self[p:p + 1]

    def next(self):
        # Py2 compat
        return self.__next__()

    def previous(self):
        p = self._position
        if p >= len(self):
            raise StopIteration
        elif p < 0:
            raise TypeError
        self._position = p = p - 1
        return self[p:p + 1]

    def setPosition(self, position):
        if self._position >= len(self):
            raise StopIteration
        self._position = position

    def getPosition(self):
        if self._position >= len(self):
            raise StopIteration
        if self._position >= 0:
            return self._position
        else:
            return None

    position = property(getPosition, setPosition)

    def getCurrentByte(self):
        return self[self.position:self.position + 1]

    currentByte = property(getCurrentByte)

    def skip(self, chars=spaceCharactersBytes):
        """Skip past a list of characters"""
        p = self.position               # use property for the error-checking
        while p < len(self):
            c = self[p:p + 1]
            if c not in chars:
                self._position = p
                return c
            p += 1
        self._position = p
        return None

    def skipUntil(self, chars):
        p = self.position
        while p < len(self):
            c = self[p:p + 1]
            if c in chars:
                self._position = p
                return c
            p += 1
        self._position = p
        return None

    def matchBytes(self, bytes):
        """Look for a sequence of bytes at the start of a string. If the bytes
        are found return True and advance the position to the byte after the
        match. Otherwise return False and leave the position alone"""
        p = self.position
        data = self[p:p + len(bytes)]
        rv = data.startswith(bytes)
        if rv:
            self.position += len(bytes)
        return rv

    def jumpTo(self, bytes):
        """Look for the next sequence of bytes matching a given sequence. If
        a match is found advance the position to the last byte of the match"""
        newPosition = self[self.position:].find(bytes)
        if newPosition > -1:
            # XXX: This is ugly, but I can't see a nicer way to fix this.
            if self._position == -1:
                self._position = 0
            self._position += (newPosition + len(bytes) - 1)
            return True
        else:
            raise StopIteration


class EncodingParser(object):
    """Mini parser for detecting character encoding from meta elements"""

    def __init__(self, data):
        """string - the data to work on for encoding detection"""
        self.data = EncodingBytes(data)
        self.encoding = None

    def getEncoding(self):
        methodDispatch = (
            (b"<!--", self.handleComment),
            (b"<meta", self.handleMeta),
            (b"</", self.handlePossibleEndTag),
            (b"<!", self.handleOther),
            (b"<?", self.handleOther),
            (b"<", self.handlePossibleStartTag))
        for byte in self.data:
            keepParsing = True
            for key, method in methodDispatch:
                if self.data.matchBytes(key):
                    try:
                        keepParsing = method()
                        break
                    except StopIteration:
                        keepParsing = False
                        break
            if not keepParsing:
                break

        return self.encoding

    def handleComment(self):
        """Skip over comments"""
        return self.data.jumpTo(b"-->")

    def handleMeta(self):
        if self.data.currentByte not in spaceCharactersBytes:
            # if we have <meta not followed by a space so just keep going
            return True
        # We have a valid meta element we want to search for attributes
        hasPragma = False
        pendingEncoding = None
        while True:
            # Try to find the next attribute after the current position
            attr = self.getAttribute()
            if attr is None:
                return True
            else:
                if attr[0] == b"http-equiv":
                    hasPragma = attr[1] == b"content-type"
                    if hasPragma and pendingEncoding is not None:
                        self.encoding = pendingEncoding
                        return False
                elif attr[0] == b"charset":
                    tentativeEncoding = attr[1]
                    codec = codecName(tentativeEncoding)
                    if codec is not None:
                        self.encoding = codec
                        return False
                elif attr[0] == b"content":
                    contentParser = ContentAttrParser(EncodingBytes(attr[1]))
                    tentativeEncoding = contentParser.parse()
                    if tentativeEncoding is not None:
                        codec = codecName(tentativeEncoding)
                        if codec is not None:
                            if hasPragma:
                                self.encoding = codec
                                return False
                            else:
                                pendingEncoding = codec

    def handlePossibleStartTag(self):
        return self.handlePossibleTag(False)

    def handlePossibleEndTag(self):
        next(self.data)
        return self.handlePossibleTag(True)

    def handlePossibleTag(self, endTag):
        data = self.data
        if data.currentByte not in asciiLettersBytes:
            # If the next byte is not an ascii letter either ignore this
            # fragment (possible start tag case) or treat it according to
            # handleOther
            if endTag:
                data.previous()
                self.handleOther()
            return True

        c = data.skipUntil(spacesAngleBrackets)
        if c == b"<":
            # return to the first step in the overall "two step" algorithm
            # reprocessing the < byte
            data.previous()
        else:
            # Read all attributes
            attr = self.getAttribute()
            while attr is not None:
                attr = self.getAttribute()
        return True

    def handleOther(self):
        return self.data.jumpTo(b">")

    def getAttribute(self):
        """Return a name,value pair for the next attribute in the stream,
        if one is found, or None"""
        data = self.data
        # Step 1 (skip chars)
        c = data.skip(spaceCharactersBytes | frozenset([b"/"]))
        assert c is None or len(c) == 1
        # Step 2
        if c in (b">", None):
            return None
        # Step 3
        attrName = []
        attrValue = []
        # Step 4 attribute name
        while True:
            if c == b"=" and attrName:
                break
            elif c in spaceCharactersBytes:
                # Step 6!
                c = data.skip()
                break
            elif c in (b"/", b">"):
                return b"".join(attrName), b""
            elif c in asciiUppercaseBytes:
                attrName.append(c.lower())
            elif c is None:
                return None
            else:
                attrName.append(c)
            # Step 5
            c = next(data)
        # Step 7
        if c != b"=":
            data.previous()
            return b"".join(attrName), b""
        # Step 8
        next(data)
        # Step 9
        c = data.skip()
        # Step 10
        if c in (b"'", b'"'):
            # 10.1
            quoteChar = c
            while True:
                # 10.2
                c = next(data)
                # 10.3
                if c == quoteChar:
                    next(data)
                    return b"".join(attrName), b"".join(attrValue)
                # 10.4
                elif c in asciiUppercaseBytes:
                    attrValue.append(c.lower())
                # 10.5
                else:
                    attrValue.append(c)
        elif c == b">":
            return b"".join(attrName), b""
        elif c in asciiUppercaseBytes:
            attrValue.append(c.lower())
        elif c is None:
            return None
        else:
            attrValue.append(c)
        # Step 11
        while True:
            c = next(data)
            if c in spacesAngleBrackets:
                return b"".join(attrName), b"".join(attrValue)
            elif c in asciiUppercaseBytes:
                attrValue.append(c.lower())
            elif c is None:
                return None
            else:
                attrValue.append(c)


class ContentAttrParser(object):
    def __init__(self, data):
        assert isinstance(data, bytes)
        self.data = data

    def parse(self):
        try:
            # Check if the attr name is charset
            # otherwise return
            self.data.jumpTo(b"charset")
            self.data.position += 1
            self.data.skip()
            if not self.data.currentByte == b"=":
                # If there is no = sign keep looking for attrs
                return None
            self.data.position += 1
            self.data.skip()
            # Look for an encoding between matching quote marks
            if self.data.currentByte in (b'"', b"'"):
                quoteMark = self.data.currentByte
                self.data.position += 1
                oldPosition = self.data.position
                if self.data.jumpTo(quoteMark):
                    return self.data[oldPosition:self.data.position]
                else:
                    return None
            else:
                # Unquoted value
                oldPosition = self.data.position
                try:
                    self.data.skipUntil(spaceCharactersBytes)
                    return self.data[oldPosition:self.data.position]
                except StopIteration:
                    # Return the whole remaining value
                    return self.data[oldPosition:]
        except StopIteration:
            return None


def codecName(encoding):
    """Return the python codec name corresponding to an encoding or None if the
    string doesn't correspond to a valid encoding."""
    if isinstance(encoding, bytes):
        try:
            encoding = encoding.decode("ascii")
        except UnicodeDecodeError:
            return None
    if encoding:
        canonicalName = ascii_punctuation_re.sub("", encoding).lower()
        return encodings.get(canonicalName, None)
    else:
        return None
python3.3/site-packages/pip/_vendor/html5lib/serializer/__pycache__/__init__.cpython-33.pyc000064400000001713151733566750025564 0ustar00�
7�Re�c@sUddlmZmZmZddlmZddlmZddd
dd	�Z	d
S(i(uabsolute_importudivisionuunicode_literalsi(utreewalkersi(uHTMLSerializeruetreeuhtmlcKsLtj|�}|dkr*t|�}ntd��|j||�|�S(Nuhtmlutype must be html(utreewalkersu
getTreeWalkeruHTMLSerializeru
ValueErrorurender(uinpututreeuformatuencodinguserializer_optsuwalkerus((uA/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/__init__.pyu	serializes
u	serializeN(
u
__future__uabsolute_importudivisionuunicode_literalsuutreewalkersuhtmlserializeruHTMLSerializeruNoneu	serialize(((uA/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/html5lib/serializer/__pycache__/htmlserializer.cpython-33.pyc000064400000030537151733566750027071 0ustar00�
7�Rem2c@s$ddlmZmZmZddlmZddlZejZyddlm	Z	Wne
k
riYnXddlmZm
Z
mZddlmZmZmZddlmZdd	lmZd
je�ZyddlmZmZWne
k
rdZYn�Xd
ZiZed�dkZx�eej��D]�\Z Z!er[ee!�dks7erzee!�dkrzq7ne!dkr7ee!�dkr�ej"e!�Z!ne#e!�Z!e!eks�e j$�r�e ee!<q�q7q7Wdd�Z%eee%�[Gdd�de&�Z'dd�Z(dS(i(uabsolute_importudivisionuunicode_literals(u	text_typeN(ureducei(uvoidElementsubooleanAttributesuspaceCharacters(urcdataElementsuentitiesuxmlEntities(uutils(uescapeu(uregister_erroruxmlcharrefreplace_errorsustrictuhtmlentityreplaceu􏿿iu&c
Cs�t|ttf�r�g}g}d}x�t|j|j|j��D]�\}}|red}qGn||j}tj	|j|t
|j|dg���r�tj|j||d��}d}nt
|�}|j|�qGWx�|D]x}tj|�}	|	rE|jd�|j|	�|	jd�sf|jd�qfq�|jdt|�dd��q�Wdj|�|jfSt|�SdS(Niu&u;u&#x%s;uFT(u
isinstanceuUnicodeEncodeErroruUnicodeTranslateErroruFalseu	enumerateuobjectustartuenduutilsuisSurrogatePairuminusurrogatePairToCodepointuTrueuorduappenduencode_entity_mapugetuendswithuhexujoinuxmlcharrefreplace_errors(
uexcuresu
codepointsuskipuiucuindexu	codepointucpue((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyuhtmlentityreplace_errors*s0,
/ 	


%uhtmlentityreplace_errorscBs�|EeZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZd Zdd�Zdd�Zdd�Zddd�Zddd�Zddd�ZdS(!uHTMLSerializeru"uquote_attr_valuesu
quote_charuuse_best_quote_charuomit_optional_tagsuminimize_boolean_attributesuuse_trailing_solidususpace_before_trailing_solidusuescape_lt_in_attrsu
escape_rcdatauresolve_entitiesualphabetical_attributesuinject_meta_charsetustrip_whitespaceusanitizec	Ksgd|krd|_nx6|jD]+}t|||j|t||���q"Wg|_d|_dS(u�Initialize HTMLSerializer.

        Keyword options (default given first unless specified) include:

        inject_meta_charset=True|False
          Whether it insert a meta element to define the character set of the
          document.
        quote_attr_values=True|False
          Whether to quote attribute values that don't require quoting
          per HTML5 parsing rules.
        quote_char=u'"'|u"'"
          Use given quote character for attribute quoting. Default is to
          use double quote unless attribute value contains a double quote,
          in which case single quotes are used instead.
        escape_lt_in_attrs=False|True
          Whether to escape < in attribute values.
        escape_rcdata=False|True
          Whether to escape characters that need to be escaped within normal
          elements within rcdata elements such as style.
        resolve_entities=True|False
          Whether to resolve named character entities that appear in the
          source tree. The XML predefined entities &lt; &gt; &amp; &quot; &apos;
          are unaffected by this setting.
        strip_whitespace=False|True
          Whether to remove semantically meaningless whitespace. (This
          compresses all whitespace to a single space except within pre.)
        minimize_boolean_attributes=True|False
          Shortens boolean attributes to give just the attribute value,
          for example <input disabled="disabled"> becomes <input disabled>.
        use_trailing_solidus=False|True
          Includes a close-tag slash at the end of the start tag of void
          elements (empty elements whose end tag is forbidden). E.g. <hr/>.
        space_before_trailing_solidus=True|False
          Places a space immediately before the closing slash in a tag
          using a trailing solidus. E.g. <hr />. Requires use_trailing_solidus.
        sanitize=False|True
          Strip all unsafe or unknown constructs from output.
          See `html5lib user documentation`_
        omit_optional_tags=True|False
          Omit start/end tags that are optional.
        alphabetical_attributes=False|True
          Reorder attributes to be in alphabetical order.

        .. _html5lib user documentation: http://code.google.com/p/html5lib/wiki/UserDocumentation
        u
quote_charNF(uFalseuuse_best_quote_charuoptionsusetattrugetugetattruerrorsustrict(uselfukwargsuattr((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyu__init__ks.)	uHTMLSerializer.__init__cCs9t|t�st�|jr1|j|jt�S|SdS(N(u
isinstanceu	text_typeuAssertionErroruencodinguencodeuunicode_encode_errors(uselfustring((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyuencode�s	uHTMLSerializer.encodecCs9t|t�st�|jr1|j|jd�S|SdS(Nustrict(u
isinstanceu	text_typeuAssertionErroruencodinguencode(uselfustring((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyuencodeStrict�s	uHTMLSerializer.encodeStrictc#sI||_d2}g|_|rI|jrIddlm}|||�}n|jrqddlm}||�}n|jr�ddl	m}||�}n|j
r�ddlm}||�}n|jr�ddl
m}||�}nxY|D]Q}|d}|dkr�d|d}|dr9|d|d7}n|d	rP|d
7}n|d	r�|d	jd�dkr�|d	jd
�dkr�|jtd��nd
}nd}|d||d	|f7}n|d7}|j|�Vq�|d3krm|dks|rR|r=|djd�dkr=|jtd��n|j|d�VqA|jt|d��Vq�|d4kr�|d}	|jd|	�V|	tkr�|jr�d5}n|r�|jtd��nx�|dj�D]�\\}
}}|}
|�|jd�V|j|
�V|js[|
tj|	t��kr�|
tjdt��kr�|jd�V|jsy�r�d5}n"t�fdd�tdd2�}�jd d!��|j r��jd"d#��n|r�|j!}|j"r1d
�kr
d�kr
d}q1d�kr1d
�kr1d
}q1n|d
krR�jd
d$��n�jdd%��|j|�V|j��V|j|�Vq�|j��Vq�q�W|	t#kr�|j$r�|j%r�|jd&�Vq�|jd'�Vn|jd�Vq�|d(krS|d}	|	tkr"d2}n|r>|jtd��n|jd)|	�Vq�|d*kr�|d}|jd+�dkr�|jtd,��n|jd-|d�Vq�|d.kr0|d}	|	d/}|t&kr�|jtd0|	��n|j'r|t(krt&|}n
d1|	}|j|�Vq�|j|d�q�WdS(6Ni(uFilterutypeuDoctypeu<!DOCTYPE %sunameupublicIdu PUBLIC "%s"usystemIdu SYSTEMu"iu'uASystem identifer contains both single and double quote charactersu %s%s%su>u
CharactersuSpaceCharactersudatau</uUnexpected </ in CDATAuStartTaguEmptyTagu<%su+Unexpected child element of a CDATA elementu uu=cs|p|�kS(N((uxuy(uv(uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyu<lambda>�su*HTMLSerializer.serialize.<locals>.<lambda>u>"'=u&u&amp;u<u&lt;u&#39;u&quot;u /u/uEndTagu</%s>uCommentu--uComment contains --u	<!--%s-->uEntityu;uEntity %s not recognizedu&%s;F(u
CharactersuSpaceCharacters(uStartTaguEmptyTagT()uencodinguFalseuerrorsuinject_meta_charsetufilters.inject_meta_charsetuFilterustrip_whitespaceufilters.whitespaceusanitizeufilters.sanitizeruomit_optional_tagsufilters.optionaltagsualphabetical_attributesufilters.alphabeticalattributesufinduserializeErroru_uencodeStrictuencodeuescapeurcdataElementsu
escape_rcdatauTrueuitemsuminimize_boolean_attributesubooleanAttributesugetutupleuquote_attr_valuesureduceuspaceCharactersureplaceuescape_lt_in_attrsu
quote_charuuse_best_quote_charuvoidElementsuuse_trailing_solidususpace_before_trailing_solidusuentitiesuresolve_entitiesuxmlEntities(uselfu
treewalkeruencodinguin_cdatauFilterutokenutypeudoctypeu
quote_charunameuattr_namespaceu	attr_nameu
attr_valueuku
quote_attrudataukey((uvuG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyu	serialize�s�						





	

	#
						
	




uHTMLSerializer.serializecCsE|r%djt|j||���Sdjt|j|���SdS(Nsu(ujoinulistu	serialize(uselfu
treewalkeruencoding((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyurender1suHTMLSerializer.renderuXXX ERROR MESSAGE NEEDEDcCs&|jj|�|jr"t�ndS(N(uerrorsuappendustrictuSerializeError(uselfudata((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyuserializeError7s	uHTMLSerializer.serializeErrorNFT(uquote_attr_valuesu
quote_charuuse_best_quote_charuomit_optional_tagsuminimize_boolean_attributesuuse_trailing_solidususpace_before_trailing_solidusuescape_lt_in_attrsu
escape_rcdatauresolve_entitiesualphabetical_attributesuinject_meta_charsetustrip_whitespaceusanitize(u__name__u
__module__u__qualname__uFalseuquote_attr_valuesu
quote_charuTrueuuse_best_quote_charuomit_optional_tagsuminimize_boolean_attributesuuse_trailing_solidususpace_before_trailing_solidusuescape_lt_in_attrsu
escape_rcdatauresolve_entitiesualphabetical_attributesuinject_meta_charsetustrip_whitespaceusanitizeuoptionsu__init__uencodeuencodeStrictuNoneu	serializeurenderuserializeError(u
__locals__((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyuHTMLSerializerLs45�uHTMLSerializercCsdS(uError in serialized treeN((u	Exception((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyuSerializeError>suSerializeError()u
__future__uabsolute_importudivisionuunicode_literalsupip._vendor.sixu	text_typeugettextu_u	functoolsureduceuImportErroru	constantsuvoidElementsubooleanAttributesuspaceCharactersurcdataElementsuentitiesuxmlEntitiesuuutilsuxml.sax.saxutilsuescapeujoinucodecsuregister_erroruxmlcharrefreplace_errorsuunicode_encode_errorsuencode_entity_mapulenuis_ucs4ulistuitemsukuvusurrogatePairToCodepointuorduisloweruhtmlentityreplace_errorsuobjectuHTMLSerializeruSerializeError(((uG/tmp/pip-zej_zi-build/pip/_vendor/html5lib/serializer/htmlserializer.pyu<module>sD	


�python3.3/site-packages/pip/_vendor/html5lib/serializer/__init__.py000064400000000752151733566750021305 0ustar00from __future__ import absolute_import, division, unicode_literals

from .. import treewalkers

from .htmlserializer import HTMLSerializer


def serialize(input, tree="etree", format="html", encoding=None,
              **serializer_opts):
    # XXX: Should we cache this?
    walker = treewalkers.getTreeWalker(tree)
    if format == "html":
        s = HTMLSerializer(**serializer_opts)
    else:
        raise ValueError("type must be html")
    return s.render(walker(input), encoding)
python3.3/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py000064400000031155151733566750022605 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

import gettext
_ = gettext.gettext

try:
    from functools import reduce
except ImportError:
    pass

from ..constants import voidElements, booleanAttributes, spaceCharacters
from ..constants import rcdataElements, entities, xmlEntities
from .. import utils
from xml.sax.saxutils import escape

spaceCharacters = "".join(spaceCharacters)

try:
    from codecs import register_error, xmlcharrefreplace_errors
except ImportError:
    unicode_encode_errors = "strict"
else:
    unicode_encode_errors = "htmlentityreplace"

    encode_entity_map = {}
    is_ucs4 = len("\U0010FFFF") == 1
    for k, v in list(entities.items()):
        # skip multi-character entities
        if ((is_ucs4 and len(v) > 1) or
                (not is_ucs4 and len(v) > 2)):
            continue
        if v != "&":
            if len(v) == 2:
                v = utils.surrogatePairToCodepoint(v)
            else:
                v = ord(v)
            if not v in encode_entity_map or k.islower():
                # prefer &lt; over &LT; and similarly for &amp;, &gt;, etc.
                encode_entity_map[v] = k

    def htmlentityreplace_errors(exc):
        if isinstance(exc, (UnicodeEncodeError, UnicodeTranslateError)):
            res = []
            codepoints = []
            skip = False
            for i, c in enumerate(exc.object[exc.start:exc.end]):
                if skip:
                    skip = False
                    continue
                index = i + exc.start
                if utils.isSurrogatePair(exc.object[index:min([exc.end, index + 2])]):
                    codepoint = utils.surrogatePairToCodepoint(exc.object[index:index + 2])
                    skip = True
                else:
                    codepoint = ord(c)
                codepoints.append(codepoint)
            for cp in codepoints:
                e = encode_entity_map.get(cp)
                if e:
                    res.append("&")
                    res.append(e)
                    if not e.endswith(";"):
                        res.append(";")
                else:
                    res.append("&#x%s;" % (hex(cp)[2:]))
            return ("".join(res), exc.end)
        else:
            return xmlcharrefreplace_errors(exc)

    register_error(unicode_encode_errors, htmlentityreplace_errors)

    del register_error


class HTMLSerializer(object):

    # attribute quoting options
    quote_attr_values = False
    quote_char = '"'
    use_best_quote_char = True

    # tag syntax options
    omit_optional_tags = True
    minimize_boolean_attributes = True
    use_trailing_solidus = False
    space_before_trailing_solidus = True

    # escaping options
    escape_lt_in_attrs = False
    escape_rcdata = False
    resolve_entities = True

    # miscellaneous options
    alphabetical_attributes = False
    inject_meta_charset = True
    strip_whitespace = False
    sanitize = False

    options = ("quote_attr_values", "quote_char", "use_best_quote_char",
               "omit_optional_tags", "minimize_boolean_attributes",
               "use_trailing_solidus", "space_before_trailing_solidus",
               "escape_lt_in_attrs", "escape_rcdata", "resolve_entities",
               "alphabetical_attributes", "inject_meta_charset",
               "strip_whitespace", "sanitize")

    def __init__(self, **kwargs):
        """Initialize HTMLSerializer.

        Keyword options (default given first unless specified) include:

        inject_meta_charset=True|False
          Whether it insert a meta element to define the character set of the
          document.
        quote_attr_values=True|False
          Whether to quote attribute values that don't require quoting
          per HTML5 parsing rules.
        quote_char=u'"'|u"'"
          Use given quote character for attribute quoting. Default is to
          use double quote unless attribute value contains a double quote,
          in which case single quotes are used instead.
        escape_lt_in_attrs=False|True
          Whether to escape < in attribute values.
        escape_rcdata=False|True
          Whether to escape characters that need to be escaped within normal
          elements within rcdata elements such as style.
        resolve_entities=True|False
          Whether to resolve named character entities that appear in the
          source tree. The XML predefined entities &lt; &gt; &amp; &quot; &apos;
          are unaffected by this setting.
        strip_whitespace=False|True
          Whether to remove semantically meaningless whitespace. (This
          compresses all whitespace to a single space except within pre.)
        minimize_boolean_attributes=True|False
          Shortens boolean attributes to give just the attribute value,
          for example <input disabled="disabled"> becomes <input disabled>.
        use_trailing_solidus=False|True
          Includes a close-tag slash at the end of the start tag of void
          elements (empty elements whose end tag is forbidden). E.g. <hr/>.
        space_before_trailing_solidus=True|False
          Places a space immediately before the closing slash in a tag
          using a trailing solidus. E.g. <hr />. Requires use_trailing_solidus.
        sanitize=False|True
          Strip all unsafe or unknown constructs from output.
          See `html5lib user documentation`_
        omit_optional_tags=True|False
          Omit start/end tags that are optional.
        alphabetical_attributes=False|True
          Reorder attributes to be in alphabetical order.

        .. _html5lib user documentation: http://code.google.com/p/html5lib/wiki/UserDocumentation
        """
        if 'quote_char' in kwargs:
            self.use_best_quote_char = False
        for attr in self.options:
            setattr(self, attr, kwargs.get(attr, getattr(self, attr)))
        self.errors = []
        self.strict = False

    def encode(self, string):
        assert(isinstance(string, text_type))
        if self.encoding:
            return string.encode(self.encoding, unicode_encode_errors)
        else:
            return string

    def encodeStrict(self, string):
        assert(isinstance(string, text_type))
        if self.encoding:
            return string.encode(self.encoding, "strict")
        else:
            return string

    def serialize(self, treewalker, encoding=None):
        self.encoding = encoding
        in_cdata = False
        self.errors = []

        if encoding and self.inject_meta_charset:
            from ..filters.inject_meta_charset import Filter
            treewalker = Filter(treewalker, encoding)
        # WhitespaceFilter should be used before OptionalTagFilter
        # for maximum efficiently of this latter filter
        if self.strip_whitespace:
            from ..filters.whitespace import Filter
            treewalker = Filter(treewalker)
        if self.sanitize:
            from ..filters.sanitizer import Filter
            treewalker = Filter(treewalker)
        if self.omit_optional_tags:
            from ..filters.optionaltags import Filter
            treewalker = Filter(treewalker)
        # Alphabetical attributes must be last, as other filters
        # could add attributes and alter the order
        if self.alphabetical_attributes:
            from ..filters.alphabeticalattributes import Filter
            treewalker = Filter(treewalker)

        for token in treewalker:
            type = token["type"]
            if type == "Doctype":
                doctype = "<!DOCTYPE %s" % token["name"]

                if token["publicId"]:
                    doctype += ' PUBLIC "%s"' % token["publicId"]
                elif token["systemId"]:
                    doctype += " SYSTEM"
                if token["systemId"]:
                    if token["systemId"].find('"') >= 0:
                        if token["systemId"].find("'") >= 0:
                            self.serializeError(_("System identifer contains both single and double quote characters"))
                        quote_char = "'"
                    else:
                        quote_char = '"'
                    doctype += " %s%s%s" % (quote_char, token["systemId"], quote_char)

                doctype += ">"
                yield self.encodeStrict(doctype)

            elif type in ("Characters", "SpaceCharacters"):
                if type == "SpaceCharacters" or in_cdata:
                    if in_cdata and token["data"].find("</") >= 0:
                        self.serializeError(_("Unexpected </ in CDATA"))
                    yield self.encode(token["data"])
                else:
                    yield self.encode(escape(token["data"]))

            elif type in ("StartTag", "EmptyTag"):
                name = token["name"]
                yield self.encodeStrict("<%s" % name)
                if name in rcdataElements and not self.escape_rcdata:
                    in_cdata = True
                elif in_cdata:
                    self.serializeError(_("Unexpected child element of a CDATA element"))
                for (attr_namespace, attr_name), attr_value in token["data"].items():
                    # TODO: Add namespace support here
                    k = attr_name
                    v = attr_value
                    yield self.encodeStrict(' ')

                    yield self.encodeStrict(k)
                    if not self.minimize_boolean_attributes or \
                        (k not in booleanAttributes.get(name, tuple())
                         and k not in booleanAttributes.get("", tuple())):
                        yield self.encodeStrict("=")
                        if self.quote_attr_values or not v:
                            quote_attr = True
                        else:
                            quote_attr = reduce(lambda x, y: x or (y in v),
                                                spaceCharacters + ">\"'=", False)
                        v = v.replace("&", "&amp;")
                        if self.escape_lt_in_attrs:
                            v = v.replace("<", "&lt;")
                        if quote_attr:
                            quote_char = self.quote_char
                            if self.use_best_quote_char:
                                if "'" in v and '"' not in v:
                                    quote_char = '"'
                                elif '"' in v and "'" not in v:
                                    quote_char = "'"
                            if quote_char == "'":
                                v = v.replace("'", "&#39;")
                            else:
                                v = v.replace('"', "&quot;")
                            yield self.encodeStrict(quote_char)
                            yield self.encode(v)
                            yield self.encodeStrict(quote_char)
                        else:
                            yield self.encode(v)
                if name in voidElements and self.use_trailing_solidus:
                    if self.space_before_trailing_solidus:
                        yield self.encodeStrict(" /")
                    else:
                        yield self.encodeStrict("/")
                yield self.encode(">")

            elif type == "EndTag":
                name = token["name"]
                if name in rcdataElements:
                    in_cdata = False
                elif in_cdata:
                    self.serializeError(_("Unexpected child element of a CDATA element"))
                yield self.encodeStrict("</%s>" % name)

            elif type == "Comment":
                data = token["data"]
                if data.find("--") >= 0:
                    self.serializeError(_("Comment contains --"))
                yield self.encodeStrict("<!--%s-->" % token["data"])

            elif type == "Entity":
                name = token["name"]
                key = name + ";"
                if not key in entities:
                    self.serializeError(_("Entity %s not recognized" % name))
                if self.resolve_entities and key not in xmlEntities:
                    data = entities[key]
                else:
                    data = "&%s;" % name
                yield self.encodeStrict(data)

            else:
                self.serializeError(token["data"])

    def render(self, treewalker, encoding=None):
        if encoding:
            return b"".join(list(self.serialize(treewalker, encoding)))
        else:
            return "".join(list(self.serialize(treewalker)))

    def serializeError(self, data="XXX ERROR MESSAGE NEEDED"):
        # XXX The idea is to make data mandatory.
        self.errors.append(data)
        if self.strict:
            raise SerializeError


def SerializeError(Exception):
    """Error in serialized tree"""
    pass
python3.3/site-packages/pip/_vendor/html5lib/utils.py000064400000004761151733566750016541 0ustar00from __future__ import absolute_import, division, unicode_literals

from types import ModuleType

try:
    import xml.etree.cElementTree as default_etree
except ImportError:
    import xml.etree.ElementTree as default_etree


__all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair",
           "surrogatePairToCodepoint", "moduleFactoryFactory"]


class MethodDispatcher(dict):
    """Dict with 2 special properties:

    On initiation, keys that are lists, sets or tuples are converted to
    multiple keys so accessing any one of the items in the original
    list-like object returns the matching value

    md = MethodDispatcher({("foo", "bar"):"baz"})
    md["foo"] == "baz"

    A default value which can be set through the default attribute.
    """

    def __init__(self, items=()):
        # Using _dictEntries instead of directly assigning to self is about
        # twice as fast. Please do careful performance testing before changing
        # anything here.
        _dictEntries = []
        for name, value in items:
            if type(name) in (list, tuple, frozenset, set):
                for item in name:
                    _dictEntries.append((item, value))
            else:
                _dictEntries.append((name, value))
        dict.__init__(self, _dictEntries)
        self.default = None

    def __getitem__(self, key):
        return dict.get(self, key, self.default)


# Some utility functions to dal with weirdness around UCS2 vs UCS4
# python builds

def isSurrogatePair(data):
    return (len(data) == 2 and
            ord(data[0]) >= 0xD800 and ord(data[0]) <= 0xDBFF and
            ord(data[1]) >= 0xDC00 and ord(data[1]) <= 0xDFFF)


def surrogatePairToCodepoint(data):
    char_val = (0x10000 + (ord(data[0]) - 0xD800) * 0x400 +
                (ord(data[1]) - 0xDC00))
    return char_val

# Module Factory Factory (no, this isn't Java, I know)
# Here to stop this being duplicated all over the place.


def moduleFactoryFactory(factory):
    moduleCache = {}

    def moduleFactory(baseModule, *args, **kwargs):
        if isinstance(ModuleType.__name__, type("")):
            name = "_%s_factory" % baseModule.__name__
        else:
            name = b"_%s_factory" % baseModule.__name__

        if name in moduleCache:
            return moduleCache[name]
        else:
            mod = ModuleType(name)
            objs = factory(baseModule, *args, **kwargs)
            mod.__dict__.update(objs)
            moduleCache[name] = mod
            return mod

    return moduleFactory
python3.3/site-packages/pip/_vendor/requests/compat.py000064400000004774151733566750017023 0ustar00# -*- coding: utf-8 -*-

"""
pythoncompat
"""

from .packages import chardet

import sys

# -------
# Pythons
# -------

# Syntax sugar.
_ver = sys.version_info

#: Python 2.x?
is_py2 = (_ver[0] == 2)

#: Python 3.x?
is_py3 = (_ver[0] == 3)

#: Python 3.0.x
is_py30 = (is_py3 and _ver[1] == 0)

#: Python 3.1.x
is_py31 = (is_py3 and _ver[1] == 1)

#: Python 3.2.x
is_py32 = (is_py3 and _ver[1] == 2)

#: Python 3.3.x
is_py33 = (is_py3 and _ver[1] == 3)

#: Python 3.4.x
is_py34 = (is_py3 and _ver[1] == 4)

#: Python 2.7.x
is_py27 = (is_py2 and _ver[1] == 7)

#: Python 2.6.x
is_py26 = (is_py2 and _ver[1] == 6)

#: Python 2.5.x
is_py25 = (is_py2 and _ver[1] == 5)

#: Python 2.4.x
is_py24 = (is_py2 and _ver[1] == 4)   # I'm assuming this is not by choice.


# ---------
# Platforms
# ---------


# Syntax sugar.
_ver = sys.version.lower()

is_pypy = ('pypy' in _ver)
is_jython = ('jython' in _ver)
is_ironpython = ('iron' in _ver)

# Assume CPython, if nothing else.
is_cpython = not any((is_pypy, is_jython, is_ironpython))

# Windows-based system.
is_windows = 'win32' in str(sys.platform).lower()

# Standard Linux 2+ system.
is_linux = ('linux' in str(sys.platform).lower())
is_osx = ('darwin' in str(sys.platform).lower())
is_hpux = ('hpux' in str(sys.platform).lower())   # Complete guess.
is_solaris = ('solar==' in str(sys.platform).lower())   # Complete guess.

try:
    import simplejson as json
except ImportError:
    import json

# ---------
# Specifics
# ---------

if is_py2:
    from urllib import quote, unquote, quote_plus, unquote_plus, urlencode, getproxies, proxy_bypass
    from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag
    from urllib2 import parse_http_list
    import cookielib
    from Cookie import Morsel
    from StringIO import StringIO
    from .packages.urllib3.packages.ordered_dict import OrderedDict
    from httplib import IncompleteRead

    builtin_str = str
    bytes = str
    str = unicode
    basestring = basestring
    numeric_types = (int, long, float)


elif is_py3:
    from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag
    from urllib.request import parse_http_list, getproxies, proxy_bypass
    from http import cookiejar as cookielib
    from http.cookies import Morsel
    from io import StringIO
    from collections import OrderedDict
    from http.client import IncompleteRead

    builtin_str = str
    str = str
    bytes = bytes
    basestring = (str, bytes)
    numeric_types = (int, float)
python3.3/site-packages/pip/_vendor/requests/certs.py000064400000001040151733566750016637 0ustar00#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
certs.py
~~~~~~~~

This module returns the preferred default CA certificate bundle.

If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.
"""

import os.path


def where():
    """Return the preferred certificate bundle."""
    # vendored bundle inside Requests
    return os.path.join(os.path.dirname(__file__), 'cacert.pem')

if __name__ == '__main__':
    print(where())
python3.3/site-packages/pip/_vendor/requests/models.py000064400000063504151733566750017017 0ustar00# -*- coding: utf-8 -*-

"""
requests.models
~~~~~~~~~~~~~~~

This module contains the primary objects that power Requests.
"""

import collections
import datetime

from io import BytesIO, UnsupportedOperation
from .hooks import default_hooks
from .structures import CaseInsensitiveDict

from .auth import HTTPBasicAuth
from .cookies import cookiejar_from_dict, get_cookie_header
from .packages.urllib3.fields import RequestField
from .packages.urllib3.filepost import encode_multipart_formdata
from .packages.urllib3.util import parse_url
from .packages.urllib3.exceptions import DecodeError
from .exceptions import (
    HTTPError, RequestException, MissingSchema, InvalidURL,
    ChunkedEncodingError, ContentDecodingError)
from .utils import (
    guess_filename, get_auth_from_url, requote_uri,
    stream_decode_response_unicode, to_key_val_list, parse_header_links,
    iter_slices, guess_json_utf, super_len, to_native_string)
from .compat import (
    cookielib, urlunparse, urlsplit, urlencode, str, bytes, StringIO,
    is_py2, chardet, json, builtin_str, basestring, IncompleteRead)
from .status_codes import codes

#: The set of HTTP status codes that indicate an automatically
#: processable redirect.
REDIRECT_STATI = (
    codes.moved,  # 301
    codes.found,  # 302
    codes.other,  # 303
    codes.temporary_moved,  # 307
)
DEFAULT_REDIRECT_LIMIT = 30
CONTENT_CHUNK_SIZE = 10 * 1024
ITER_CHUNK_SIZE = 512


class RequestEncodingMixin(object):
    @property
    def path_url(self):
        """Build the path URL to use."""

        url = []

        p = urlsplit(self.url)

        path = p.path
        if not path:
            path = '/'

        url.append(path)

        query = p.query
        if query:
            url.append('?')
            url.append(query)

        return ''.join(url)

    @staticmethod
    def _encode_params(data):
        """Encode parameters in a piece of data.

        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        """

        if isinstance(data, (str, bytes)):
            return data
        elif hasattr(data, 'read'):
            return data
        elif hasattr(data, '__iter__'):
            result = []
            for k, vs in to_key_val_list(data):
                if isinstance(vs, basestring) or not hasattr(vs, '__iter__'):
                    vs = [vs]
                for v in vs:
                    if v is not None:
                        result.append(
                            (k.encode('utf-8') if isinstance(k, str) else k,
                             v.encode('utf-8') if isinstance(v, str) else v))
            return urlencode(result, doseq=True)
        else:
            return data

    @staticmethod
    def _encode_files(files, data):
        """Build the body for a multipart/form-data request.

        Will successfully encode files when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.

        """
        if (not files):
            raise ValueError("Files must be provided.")
        elif isinstance(data, basestring):
            raise ValueError("Data must not be a string.")

        new_fields = []
        fields = to_key_val_list(data or {})
        files = to_key_val_list(files or {})

        for field, val in fields:
            if isinstance(val, basestring) or not hasattr(val, '__iter__'):
                val = [val]
            for v in val:
                if v is not None:
                    # Don't call str() on bytestrings: in Py3 it all goes wrong.
                    if not isinstance(v, bytes):
                        v = str(v)

                    new_fields.append(
                        (field.decode('utf-8') if isinstance(field, bytes) else field,
                         v.encode('utf-8') if isinstance(v, str) else v))

        for (k, v) in files:
            # support for explicit filename
            ft = None
            fh = None
            if isinstance(v, (tuple, list)):
                if len(v) == 2:
                    fn, fp = v
                elif len(v) == 3:
                    fn, fp, ft = v
                else:
                    fn, fp, ft, fh = v
            else:
                fn = guess_filename(v) or k
                fp = v
            if isinstance(fp, str):
                fp = StringIO(fp)
            if isinstance(fp, bytes):
                fp = BytesIO(fp)

            rf = RequestField(name=k, data=fp.read(),
                              filename=fn, headers=fh)
            rf.make_multipart(content_type=ft)
            new_fields.append(rf)

        body, content_type = encode_multipart_formdata(new_fields)

        return body, content_type


class RequestHooksMixin(object):
    def register_hook(self, event, hook):
        """Properly register a hook."""

        if event not in self.hooks:
            raise ValueError('Unsupported event specified, with event name "%s"' % (event))

        if isinstance(hook, collections.Callable):
            self.hooks[event].append(hook)
        elif hasattr(hook, '__iter__'):
            self.hooks[event].extend(h for h in hook if isinstance(h, collections.Callable))

    def deregister_hook(self, event, hook):
        """Deregister a previously registered hook.
        Returns True if the hook existed, False if not.
        """

        try:
            self.hooks[event].remove(hook)
            return True
        except ValueError:
            return False


class Request(RequestHooksMixin):
    """A user-created :class:`Request <Request>` object.

    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach the request. If a dictionary is provided, form-encoding will take place.
    :param params: dictionary of URL parameters to append to the URL.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'http://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>

    """
    def __init__(self,
        method=None,
        url=None,
        headers=None,
        files=None,
        data=None,
        params=None,
        auth=None,
        cookies=None,
        hooks=None):

        # Default empty dicts for dict params.
        data = [] if data is None else data
        files = [] if files is None else files
        headers = {} if headers is None else headers
        params = {} if params is None else params
        hooks = {} if hooks is None else hooks

        self.hooks = default_hooks()
        for (k, v) in list(hooks.items()):
            self.register_hook(event=k, hook=v)

        self.method = method
        self.url = url
        self.headers = headers
        self.files = files
        self.data = data
        self.params = params
        self.auth = auth
        self.cookies = cookies

    def __repr__(self):
        return '<Request [%s]>' % (self.method)

    def prepare(self):
        """Constructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it."""
        p = PreparedRequest()
        p.prepare(
            method=self.method,
            url=self.url,
            headers=self.headers,
            files=self.files,
            data=self.data,
            params=self.params,
            auth=self.auth,
            cookies=self.cookies,
            hooks=self.hooks,
        )
        return p


class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
    """The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.

    Generated from either a :class:`Request <Request>` object or manually.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'http://httpbin.org/get')
      >>> r = req.prepare()
      <PreparedRequest [GET]>

      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>

    """

    def __init__(self):
        #: HTTP verb to send to the server.
        self.method = None
        #: HTTP URL to send the request to.
        self.url = None
        #: dictionary of HTTP headers.
        self.headers = None
        # The `CookieJar` used to create the Cookie header will be stored here
        # after prepare_cookies is called
        self._cookies = None
        #: request body to send to the server.
        self.body = None
        #: dictionary of callback hooks, for internal usage.
        self.hooks = default_hooks()

    def prepare(self, method=None, url=None, headers=None, files=None,
                data=None, params=None, auth=None, cookies=None, hooks=None):
        """Prepares the entire request with the given parameters."""

        self.prepare_method(method)
        self.prepare_url(url, params)
        self.prepare_headers(headers)
        self.prepare_cookies(cookies)
        self.prepare_body(data, files)
        self.prepare_auth(auth, url)
        # Note that prepare_auth must be last to enable authentication schemes
        # such as OAuth to work on a fully prepared request.

        # This MUST go after prepare_auth. Authenticators could add a hook
        self.prepare_hooks(hooks)

    def __repr__(self):
        return '<PreparedRequest [%s]>' % (self.method)

    def copy(self):
        p = PreparedRequest()
        p.method = self.method
        p.url = self.url
        p.headers = self.headers.copy()
        p._cookies = self._cookies.copy()
        p.body = self.body
        p.hooks = self.hooks
        return p

    def prepare_method(self, method):
        """Prepares the given HTTP method."""
        self.method = method
        if self.method is not None:
            self.method = self.method.upper()

    def prepare_url(self, url, params):
        """Prepares the given HTTP URL."""
        #: Accept objects that have string representations.
        try:
            url = unicode(url)
        except NameError:
            # We're on Python 3.
            url = str(url)
        except UnicodeDecodeError:
            pass

        # Don't do any URL preparation for oddball schemes
        if ':' in url and not url.lower().startswith('http'):
            self.url = url
            return

        # Support for unicode domain names and paths.
        scheme, auth, host, port, path, query, fragment = parse_url(url)

        if not scheme:
            raise MissingSchema("Invalid URL {0!r}: No schema supplied. "
                                "Perhaps you meant http://{0}?".format(url))

        if not host:
            raise InvalidURL("Invalid URL %r: No host supplied" % url)

        # Only want to apply IDNA to the hostname
        try:
            host = host.encode('idna').decode('utf-8')
        except UnicodeError:
            raise InvalidURL('URL has an invalid label.')

        # Carefully reconstruct the network location
        netloc = auth or ''
        if netloc:
            netloc += '@'
        netloc += host
        if port:
            netloc += ':' + str(port)

        # Bare domains aren't valid URLs.
        if not path:
            path = '/'

        if is_py2:
            if isinstance(scheme, str):
                scheme = scheme.encode('utf-8')
            if isinstance(netloc, str):
                netloc = netloc.encode('utf-8')
            if isinstance(path, str):
                path = path.encode('utf-8')
            if isinstance(query, str):
                query = query.encode('utf-8')
            if isinstance(fragment, str):
                fragment = fragment.encode('utf-8')

        enc_params = self._encode_params(params)
        if enc_params:
            if query:
                query = '%s&%s' % (query, enc_params)
            else:
                query = enc_params

        url = requote_uri(urlunparse([scheme, netloc, path, None, query, fragment]))
        self.url = url

    def prepare_headers(self, headers):
        """Prepares the given HTTP headers."""

        if headers:
            self.headers = CaseInsensitiveDict((to_native_string(name), value) for name, value in headers.items())
        else:
            self.headers = CaseInsensitiveDict()

    def prepare_body(self, data, files):
        """Prepares the given HTTP body data."""

        # Check if file, fo, generator, iterator.
        # If not, run through normal process.

        # Nottin' on you.
        body = None
        content_type = None
        length = None

        is_stream = all([
            hasattr(data, '__iter__'),
            not isinstance(data, (basestring, list, tuple, dict))
        ])

        try:
            length = super_len(data)
        except (TypeError, AttributeError, UnsupportedOperation):
            length = None

        if is_stream:
            body = data

            if files:
                raise NotImplementedError('Streamed bodies and files are mutually exclusive.')

            if length is not None:
                self.headers['Content-Length'] = builtin_str(length)
            else:
                self.headers['Transfer-Encoding'] = 'chunked'
        else:
            # Multi-part file uploads.
            if files:
                (body, content_type) = self._encode_files(files, data)
            else:
                if data:
                    body = self._encode_params(data)
                    if isinstance(data, str) or isinstance(data, builtin_str) or hasattr(data, 'read'):
                        content_type = None
                    else:
                        content_type = 'application/x-www-form-urlencoded'

            self.prepare_content_length(body)

            # Add content-type if it wasn't explicitly provided.
            if (content_type) and (not 'content-type' in self.headers):
                self.headers['Content-Type'] = content_type

        self.body = body

    def prepare_content_length(self, body):
        if hasattr(body, 'seek') and hasattr(body, 'tell'):
            body.seek(0, 2)
            self.headers['Content-Length'] = builtin_str(body.tell())
            body.seek(0, 0)
        elif body is not None:
            l = super_len(body)
            if l:
                self.headers['Content-Length'] = builtin_str(l)
        elif self.method not in ('GET', 'HEAD'):
            self.headers['Content-Length'] = '0'

    def prepare_auth(self, auth, url=''):
        """Prepares the given HTTP auth data."""

        # If no Auth is explicitly provided, extract it from the URL first.
        if auth is None:
            url_auth = get_auth_from_url(self.url)
            auth = url_auth if any(url_auth) else None

        if auth:
            if isinstance(auth, tuple) and len(auth) == 2:
                # special-case basic HTTP auth
                auth = HTTPBasicAuth(*auth)

            # Allow auth to make its changes.
            r = auth(self)

            # Update self to reflect the auth changes.
            self.__dict__.update(r.__dict__)

            # Recompute Content-Length
            self.prepare_content_length(self.body)

    def prepare_cookies(self, cookies):
        """Prepares the given HTTP cookie data."""

        if isinstance(cookies, cookielib.CookieJar):
            self._cookies = cookies
        else:
            self._cookies = cookiejar_from_dict(cookies)

        cookie_header = get_cookie_header(self._cookies, self)
        if cookie_header is not None:
            self.headers['Cookie'] = cookie_header

    def prepare_hooks(self, hooks):
        """Prepares the given hooks."""
        for event in hooks:
            self.register_hook(event, hooks[event])


class Response(object):
    """The :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    """

    __attrs__ = [
        '_content',
        'status_code',
        'headers',
        'url',
        'history',
        'encoding',
        'reason',
        'cookies',
        'elapsed',
        'request',
    ]

    def __init__(self):
        super(Response, self).__init__()

        self._content = False
        self._content_consumed = False

        #: Integer Code of responded HTTP Status, e.g. 404 or 200.
        self.status_code = None

        #: Case-insensitive Dictionary of Response Headers.
        #: For example, ``headers['content-encoding']`` will return the
        #: value of a ``'Content-Encoding'`` response header.
        self.headers = CaseInsensitiveDict()

        #: File-like object representation of response (for advanced usage).
        #: Use of ``raw`` requires that ``stream=True`` be set on the request.
        # This requirement does not apply for use internally to Requests.
        self.raw = None

        #: Final URL location of Response.
        self.url = None

        #: Encoding to decode with when accessing r.text.
        self.encoding = None

        #: A list of :class:`Response <Response>` objects from
        #: the history of the Request. Any redirect responses will end
        #: up here. The list is sorted from the oldest to the most recent request.
        self.history = []

        #: Textual reason of responded HTTP Status, e.g. "Not Found" or "OK".
        self.reason = None

        #: A CookieJar of Cookies the server sent back.
        self.cookies = cookiejar_from_dict({})

        #: The amount of time elapsed between sending the request
        #: and the arrival of the response (as a timedelta)
        self.elapsed = datetime.timedelta(0)

    def __getstate__(self):
        # Consume everything; accessing the content attribute makes
        # sure the content has been fully read.
        if not self._content_consumed:
            self.content

        return dict(
            (attr, getattr(self, attr, None))
            for attr in self.__attrs__
        )

    def __setstate__(self, state):
        for name, value in state.items():
            setattr(self, name, value)

        # pickled objects do not have .raw
        setattr(self, '_content_consumed', True)
        setattr(self, 'raw', None)

    def __repr__(self):
        return '<Response [%s]>' % (self.status_code)

    def __bool__(self):
        """Returns true if :attr:`status_code` is 'OK'."""
        return self.ok

    def __nonzero__(self):
        """Returns true if :attr:`status_code` is 'OK'."""
        return self.ok

    def __iter__(self):
        """Allows you to use a response as an iterator."""
        return self.iter_content(128)

    @property
    def ok(self):
        try:
            self.raise_for_status()
        except RequestException:
            return False
        return True

    @property
    def is_redirect(self):
        """True if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        """
        return ('location' in self.headers and self.status_code in REDIRECT_STATI)

    @property
    def apparent_encoding(self):
        """The apparent encoding, provided by the chardet library"""
        return chardet.detect(self.content)['encoding']

    def iter_content(self, chunk_size=1, decode_unicode=False):
        """Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        """
        def generate():
            try:
                # Special case for urllib3.
                try:
                    for chunk in self.raw.stream(chunk_size, decode_content=True):
                        yield chunk
                except IncompleteRead as e:
                    raise ChunkedEncodingError(e)
                except DecodeError as e:
                    raise ContentDecodingError(e)
            except AttributeError:
                # Standard file-like object.
                while True:
                    chunk = self.raw.read(chunk_size)
                    if not chunk:
                        break
                    yield chunk

            self._content_consumed = True

        # simulate reading small chunks of the content
        reused_chunks = iter_slices(self._content, chunk_size)

        stream_chunks = generate()

        chunks = reused_chunks if self._content_consumed else stream_chunks

        if decode_unicode:
            chunks = stream_decode_response_unicode(chunks, self)

        return chunks

    def iter_lines(self, chunk_size=ITER_CHUNK_SIZE, decode_unicode=None):
        """Iterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.
        """

        pending = None

        for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode):

            if pending is not None:
                chunk = pending + chunk
            lines = chunk.splitlines()

            if lines and lines[-1] and chunk and lines[-1][-1] == chunk[-1]:
                pending = lines.pop()
            else:
                pending = None

            for line in lines:
                yield line

        if pending is not None:
            yield pending

    @property
    def content(self):
        """Content of the response, in bytes."""

        if self._content is False:
            # Read the contents.
            try:
                if self._content_consumed:
                    raise RuntimeError(
                        'The content for this response was already consumed')

                if self.status_code == 0:
                    self._content = None
                else:
                    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()

            except AttributeError:
                self._content = None

        self._content_consumed = True
        # don't need to release the connection; that's been handled by urllib3
        # since we exhausted the data.
        return self._content

    @property
    def text(self):
        """Content of the response, in unicode.

        If Response.encoding is None, encoding will be guessed using
        ``chardet``.

        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        """

        # Try charset from content-type
        content = None
        encoding = self.encoding

        if not self.content:
            return str('')

        # Fallback to auto-detected encoding.
        if self.encoding is None:
            encoding = self.apparent_encoding

        # Decode unicode from given encoding.
        try:
            content = str(self.content, encoding, errors='replace')
        except (LookupError, TypeError):
            # A LookupError is raised if the encoding was not found which could
            # indicate a misspelling or similar mistake.
            #
            # A TypeError can be raised if encoding is None
            #
            # So we try blindly encoding.
            content = str(self.content, errors='replace')

        return content

    def json(self, **kwargs):
        """Returns the json-encoded content of a response, if any.

        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        """

        if not self.encoding and len(self.content) > 3:
            # No encoding set. JSON RFC 4627 section 3 states we should expect
            # UTF-8, -16 or -32. Detect which one to use; If the detection or
            # decoding fails, fall back to `self.text` (using chardet to make
            # a best guess).
            encoding = guess_json_utf(self.content)
            if encoding is not None:
                try:
                    return json.loads(self.content.decode(encoding), **kwargs)
                except UnicodeDecodeError:
                    # Wrong UTF codec detected; usually because it's not UTF-8
                    # but some other 8-bit codec.  This is an RFC violation,
                    # and the server didn't bother to tell us what codec *was*
                    # used.
                    pass
        return json.loads(self.text, **kwargs)

    @property
    def links(self):
        """Returns the parsed header links of the response, if any."""

        header = self.headers.get('link')

        # l = MultiDict()
        l = {}

        if header:
            links = parse_header_links(header)

            for link in links:
                key = link.get('rel') or link.get('url')
                l[key] = link

        return l

    def raise_for_status(self):
        """Raises stored :class:`HTTPError`, if one occurred."""

        http_error_msg = ''

        if 400 <= self.status_code < 500:
            http_error_msg = '%s Client Error: %s' % (self.status_code, self.reason)

        elif 500 <= self.status_code < 600:
            http_error_msg = '%s Server Error: %s' % (self.status_code, self.reason)

        if http_error_msg:
            raise HTTPError(http_error_msg, response=self)

    def close(self):
        """Releases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.

        *Note: Should not normally need to be called explicitly.*
        """
        return self.raw.release_conn()
python3.3/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-33.pyc000064400000017521151733566750024236 0ustar00�
7�Re�
c@swdZddlZddlZddlmZGdd�de�ZGdd�dej�ZGdd	�d	e	�Z
dS(
uP
requests.structures
~~~~~~~~~~~~~~~~~~~

Data structures that power Requests.

iN(uislicecBsJ|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S(u
IteratorProxyudocstring for IteratorProxycCs
||_dS(N(ui(uselfui((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__init__suIteratorProxy.__init__cCs|jS(N(ui(uself((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__iter__suIteratorProxy.__iter__cCsjt|jd�rt|j�St|jd�r;|jjSt|jd�rftj|jj��jSdS(Nu__len__ulenufileno(uhasattruiulenuosufstatufilenoust_size(uself((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__len__s

uIteratorProxy.__len__cCsdjt|jd|��S(Nu(ujoinuisliceuiuNone(uselfun((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyuread!suIteratorProxy.readN(u__name__u
__module__u__qualname__u__doc__u__init__u__iter__u__len__uread(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu
IteratorProxys
u
IteratorProxycBs�|EeZdZdZddd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�ZdS(uCaseInsensitiveDictu�
    A case-insensitive ``dict``-like object.

    Implements all methods and operations of
    ``collections.MutableMapping`` as well as dict's ``copy``. Also
    provides ``lower_items``.

    All keys are expected to be strings. The structure remembers the
    case of the last key to be set, and ``iter(instance)``,
    ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()``
    will contain case-sensitive keys. However, querying and contains
    testing is case insensitive:

        cid = CaseInsensitiveDict()
        cid['Accept'] = 'application/json'
        cid['aCCEPT'] == 'application/json'  # True
        list(cid) == ['Accept']  # True

    For example, ``headers['content-encoding']`` will return the
    value of a ``'Content-Encoding'`` response header, regardless
    of how the header name was originally stored.

    If the constructor, ``.update``, or equality comparison
    operations are given keys that have equal ``.lower()``s, the
    behavior is undefined.

    cKs5t�|_|dkr!i}n|j||�dS(N(udictu_storeuNoneuupdate(uselfudataukwargs((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__init__As	uCaseInsensitiveDict.__init__cCs||f|j|j�<dS(N(u_storeulower(uselfukeyuvalue((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__setitem__GsuCaseInsensitiveDict.__setitem__cCs|j|j�dS(Ni(u_storeulower(uselfukey((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__getitem__LsuCaseInsensitiveDict.__getitem__cCs|j|j�=dS(N(u_storeulower(uselfukey((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__delitem__OsuCaseInsensitiveDict.__delitem__cCsdd�|jj�D�S(Ncss|]\}}|VqdS(N((u.0ucasedkeyumappedvalue((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu	<genexpr>Ssu/CaseInsensitiveDict.__iter__.<locals>.<genexpr>(u_storeuvalues(uself((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__iter__RsuCaseInsensitiveDict.__iter__cCs
t|j�S(N(ulenu_store(uself((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__len__UsuCaseInsensitiveDict.__len__cCsdd�|jj�D�S(u.Like iteritems(), but with all lowercase keys.css%|]\}}||dfVqdS(iN((u.0ulowerkeyukeyval((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu	<genexpr>[su2CaseInsensitiveDict.lower_items.<locals>.<genexpr>(u_storeuitems(uself((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyulower_itemsXs	uCaseInsensitiveDict.lower_itemscCsGt|tj�r!t|�}ntSt|j��t|j��kS(N(u
isinstanceucollectionsuMappinguCaseInsensitiveDictuNotImplementedudictulower_items(uselfuother((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__eq__`suCaseInsensitiveDict.__eq__cCst|jj��S(N(uCaseInsensitiveDictu_storeuvalues(uself((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyucopyisuCaseInsensitiveDict.copycCstt|j���S(N(ustrudictuitems(uself((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__repr__lsuCaseInsensitiveDict.__repr__N(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u__setitem__u__getitem__u__delitem__u__iter__u__len__ulower_itemsu__eq__ucopyu__repr__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyuCaseInsensitiveDict%s	uCaseInsensitiveDictcsV|EeZdZdZd
�fdd�Zdd�Zdd�Zd
dd	�Z�S(u
LookupDictuDictionary lookup object.cs ||_tt|�j�dS(N(unameusuperu
LookupDictu__init__(uselfuname(u	__class__(u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__init__rs	uLookupDict.__init__cCsd|jS(Nu
<lookup '%s'>(uname(uself((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__repr__vsuLookupDict.__repr__cCs|jj|d�S(N(u__dict__ugetuNone(uselfukey((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu__getitem__ysuLookupDict.__getitem__cCs|jj||�S(N(u__dict__uget(uselfukeyudefault((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyuget~suLookupDict.getN(	u__name__u
__module__u__qualname__u__doc__uNoneu__init__u__repr__u__getitem__uget(u
__locals__((u	__class__u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu
LookupDictos
u
LookupDict(u__doc__uosucollectionsu	itertoolsuisliceuobjectu
IteratorProxyuMutableMappinguCaseInsensitiveDictudictu
LookupDict(((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/structures.pyu<module>	sJpython3.3/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-33.pyc000064400000005501151733566750023271 0ustar00�
7�Re�	c@s�dZddlmZddlZejZeddkZeddkZeo^eddkZeoteddkZ	eo�eddkZ
eo�eddkZeo�eddkZeo�eddkZ
eo�edd	kZeo�edd
kZeoeddkZejj�ZdekZdekZd
ekZeeeef�Zdeej�j�kZdeej�j�kZdeej�j�kZdeej�j�kZdeej�j�kZyddlZ Wne!k
rddl Z YnXer�ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)ddl*m*Z*m+Z+m,Z,m-Z-m.Z.ddl/m0Z0ddl1Z1ddl2m3Z3ddl4m4Z4ddl5m6Z6ddl7m8Z8eZ9eZ:e;Ze<Z<e=e>e?fZ@n�er�ddlAm*Z*m+Z+m,Z,m-Z-m'Z'm#Z#m$Z$m%Z%m&Z&m.Z.ddlBm0Z0m(Z(m)Z)ddlCmDZ1ddlEm3Z3ddlFm4Z4ddlGm6Z6ddlHm8Z8eZ9eZe:Z:ee:fZ<e=e?fZ@ndS(u
pythoncompat
i(uchardetiNiiiiiiupypyujythonuironuwin32ulinuxudarwinuhpuxusolar==(uquoteuunquoteu
quote_plusuunquote_plusu	urlencodeu
getproxiesuproxy_bypass(uurlparseu
urlunparseuurljoinuurlsplitu	urldefrag(uparse_http_list(uMorsel(uStringIO(uOrderedDict(uIncompleteRead(
uurlparseu
urlunparseuurljoinuurlsplitu	urlencodeuquoteuunquoteu
quote_plusuunquote_plusu	urldefrag(uparse_http_listu
getproxiesuproxy_bypass(u	cookiejar(Iu__doc__upackagesuchardetusysuversion_infou_veruis_py2uis_py3uis_py30uis_py31uis_py32uis_py33uis_py34uis_py27uis_py26uis_py25uis_py24uversionuloweruis_pypyu	is_jythonu
is_ironpythonuanyu
is_cpythonustruplatformu
is_windowsuis_linuxuis_osxuis_hpuxu
is_solarisu
simplejsonujsonuImportErroruurllibuquoteuunquoteu
quote_plusuunquote_plusu	urlencodeu
getproxiesuproxy_bypassuurlparseu
urlunparseuurljoinuurlsplitu	urldefraguurllib2uparse_http_listu	cookielibuCookieuMorseluStringIOu&packages.urllib3.packages.ordered_dictuOrderedDictuhttplibuIncompleteReadubuiltin_strubytesuunicodeu
basestringuintulongufloatu
numeric_typesuurllib.parseuurllib.requestuhttpu	cookiejaruhttp.cookiesuioucollectionsuhttp.client(((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/compat.pyu<module>sn		
4(Fpython3.3/site-packages/pip/_vendor/requests/__pycache__/api.cpython-33.pyc000064400000013124151733566750022557 0ustar00�
7�Re�c@s�dZddlmZdd�Zdd�Zdd�Zd	d
�Zddd�Zdd
d�Z	ddd�Z
dd�ZdS(u�
requests.api
~~~~~~~~~~~~

This module implements the Requests API.

:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.

i(usessionscKs%tj�}|jd|d||�S(u%Constructs and sends a :class:`Request <Request>`.
    Returns :class:`Response <Response>` object.

    :param method: method for the new :class:`Request` object.
    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
    :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
    :param files: (optional) Dictionary of 'name': file-like-objects (or {'name': ('filename', fileobj)}) for multipart encoding upload.
    :param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
    :param timeout: (optional) Float describing the timeout of the request in seconds.
    :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.
    :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
    :param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.
    :param stream: (optional) if ``False``, the response content will be immediately downloaded.
    :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.

    Usage::

      >>> import requests
      >>> req = requests.request('GET', 'http://httpbin.org/get')
      <Response [200]>
    umethoduurl(usessionsuSessionurequest(umethoduurlukwargsusession((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyurequestsurequestcKs |jdd�td||�S(u�Sends a GET request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    uallow_redirectsugetT(u
setdefaultuTrueurequest(uurlukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyuget/sugetcKs |jdd�td||�S(u�Sends a OPTIONS request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    uallow_redirectsuoptionsT(u
setdefaultuTrueurequest(uurlukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyuoptions:suoptionscKs |jdd�td||�S(u�Sends a HEAD request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    uallow_redirectsuheadF(u
setdefaultuFalseurequest(uurlukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyuheadEsuheadcKstd|d||�S(u(Sends a POST request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    upostudata(urequest(uurludataukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyupostPsupostcKstd|d||�S(u'Sends a PUT request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    uputudata(urequest(uurludataukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyuput[suputcKstd|d||�S(u)Sends a PATCH request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    upatchudata(urequest(uurludataukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyupatchfsupatchcKstd||�S(u�Sends a DELETE request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    udelete(urequest(uurlukwargs((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyudeleteqsudeleteN(u__doc__uusessionsurequestugetuoptionsuheaduNoneupostuputupatchudelete(((u1/tmp/pip-zej_zi-build/pip/_vendor/requests/api.pyu<module>spython3.3/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-33.pyc000064400000005425151733566750023552 0ustar00�
7�Re@c@s�dZdZdZdZdZdZdZyddlmZej	�Wne
k
r\YnXdd	lmZdd
l
mZmZmZddlmZmZmZmZmZmZmZmZddlmZmZdd
lmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%ddl&Z&yddl&m'Z'Wn+e
k
rdGdd�de&j(�Z'YnXe&j)e*�j+e'��dS(u�
requests HTTP library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:

   >>> import requests
   >>> r = requests.get('http://python.org')
   >>> r.status_code
   200
   >>> 'Python is a programming language' in r.content
   True

... or POST:

   >>> payload = dict(key1='value1', key2='value2')
   >>> r = requests.post("http://httpbin.org/post", data=payload)
   >>> print(r.text)
   {
     ...
     "form": {
       "key2": "value2",
       "key1": "value1"
     },
     ...
   }

The other HTTP methods are supported - see `requests.api`. Full documentation
is at <http://python-requests.org>.

:copyright: (c) 2014 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.

urequestsu2.3.0iu
Kenneth Reitzu
Apache 2.0uCopyright 2014 Kenneth Reitzi(u	pyopenssl(uutils(uRequestuResponseuPreparedRequest(urequestugetuheadupostupatchuputudeleteuoptions(usessionuSession(ucodes(uRequestExceptionuTimeoutuURLRequireduTooManyRedirectsu	HTTPErroruConnectionErroriN(uNullHandlercBs |EeZdZdd�ZdS(uNullHandlercCsdS(N((uselfurecord((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/__init__.pyuemitJsuNullHandler.emitN(u__name__u
__module__u__qualname__uemit(u
__locals__((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/__init__.pyuNullHandlerIsuNullHandler(,u__doc__u	__title__u__version__u	__build__u
__author__u__license__u
__copyright__upackages.urllib3.contribu	pyopenssluinject_into_urllib3uImportErroruuutilsumodelsuRequestuResponseuPreparedRequestuapiurequestugetuheadupostupatchuputudeleteuoptionsusessionsusessionuSessionustatus_codesucodesu
exceptionsuRequestExceptionuTimeoutuURLRequireduTooManyRedirectsu	HTTPErroruConnectionErrorulogginguNullHandleruHandleru	getLoggeru__name__u
addHandler(((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/__init__.pyu<module>*s.
:.
python3.3/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-33.pyc000064400000040042151733566750023610 0ustar00�
7�Re9c@s�dZddlZddlmZddlmZmZddlmZddl	m
Zddlm
Z
mZmZmZdd	lmZmZmZmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZ ddl!m"Z"ddl#m$Z$m
Z
mZmZddl%m&Z&dZ(dZ)dZ*Gdd�de+�Z,Gdd�de,�Z-dS(u�
requests.adapters
~~~~~~~~~~~~~~~~~

This module contains the transport adapters that Requests uses to define
and maintain connections.
iNi(uResponse(uPoolManageruproxy_from_url(uHTTPResponse(uTimeout(uurlparseu
basestringu	urldefraguunquote(uDEFAULT_CA_BUNDLE_PATHuget_encoding_from_headersuprepend_scheme_if_neededuget_auth_from_url(uCaseInsensitiveDict(u
MaxRetryError(uTimeoutError(uSSLError(u	HTTPError(u
ProxyError(uextract_cookies_to_jar(uConnectionErroruTimeoutuSSLErroru
ProxyError(u_basic_auth_stri
csD|EeZdZdZ�fdd�Zdd�Zdd�Z�S(uBaseAdapteruThe Base Transport Adaptercstt|�j�dS(N(usuperuBaseAdapteru__init__(uself(u	__class__(u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyu__init__&suBaseAdapter.__init__cCs
t�dS(N(uNotImplementedError(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyusend)suBaseAdapter.sendcCs
t�dS(N(uNotImplementedError(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyuclose,suBaseAdapter.close(u__name__u
__module__u__qualname__u__doc__u__init__usenduclose(u
__locals__((u	__class__u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyuBaseAdapter#suBaseAdaptercs�|EeZdZdZdddddgZeeee�fdd�Zd	d
�Z	dd�Z
ed
d�Zdd�Zdd�Z
ddd�Zdd�Zdd�Zdd�Zdd�Zd dd!dddd�Z�S("uHTTPAdapteru�The built-in HTTP Adapter for urllib3.

    Provides a general-case interface for Requests sessions to contact HTTP and
    HTTPS urls by implementing the Transport Adapter interface. This class will
    usually be created by the :class:`Session <Session>` class under the
    covers.

    :param pool_connections: The number of urllib3 connection pools to cache.
    :param pool_maxsize: The maximum number of connections to save in the pool.
    :param int max_retries: The maximum number of retries each connection
        should attempt. Note, this applies only to failed connections and
        timeouts, never to requests where the server returns a response.
    :param pool_block: Whether the connection pool should block for connections.

    Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> a = requests.adapters.HTTPAdapter(max_retries=3)
      >>> s.mount('http://', a)
    umax_retriesuconfigu_pool_connectionsu
_pool_maxsizeu_pool_blockcsc||_i|_i|_tt|�j�||_||_||_|j	||d|�dS(Nublock(
umax_retriesuconfigu
proxy_managerusuperuHTTPAdapteru__init__u_pool_connectionsu
_pool_maxsizeu_pool_blockuinit_poolmanager(uselfupool_connectionsupool_maxsizeumax_retriesu
pool_block(u	__class__(u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyu__init__Is						uHTTPAdapter.__init__cs t�fdd��jD��S(Nc3s'|]}|t�|d�fVqdS(N(ugetattruNone(u.0uattr(uself(u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyu	<genexpr>Ysu+HTTPAdapter.__getstate__.<locals>.<genexpr>(udictu	__attrs__(uself((uselfu6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyu__getstate__XsuHTTPAdapter.__getstate__cCsbi|_i|_x*|j�D]\}}t|||�qW|j|j|jd|j�dS(Nublock(u
proxy_manageruconfiguitemsusetattruinit_poolmanageru_pool_connectionsu
_pool_maxsizeu_pool_block(uselfustateuattruvalue((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyu__setstate__\s		uHTTPAdapter.__setstate__cCs=||_||_||_td|d|d|�|_dS(u�Initializes a urllib3 PoolManager. This method should not be called
        from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param connections: The number of urllib3 connection pools to cache.
        :param maxsize: The maximum number of connections to save in the pool.
        :param block: Block when no free connections are available.
        u	num_poolsumaxsizeublockN(u_pool_connectionsu
_pool_maxsizeu_pool_blockuPoolManagerupoolmanager(uselfuconnectionsumaxsizeublock((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyuinit_poolmanagerhs

			uHTTPAdapter.init_poolmanagercCs�|j�jd�ro|rod}|dk	r6|}n|sEt}n|sZtd��nd|_||_nd|_d|_|r�t|t	�s�|d|_
|d|_q�||_
ndS(	u�Verify a SSL certificate. This method should not be called from user
        code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param conn: The urllib3 connection object associated with the cert.
        :param url: The requested URL.
        :param verify: Whether we should actually verify the certificate.
        :param cert: The SSL certificate to verify.
        uhttpsu4Could not find a suitable SSL CA certificate bundle.u
CERT_REQUIREDu	CERT_NONEiiNT(uloweru
startswithuNoneuTrueuDEFAULT_CA_BUNDLE_PATHu	Exceptionu	cert_reqsuca_certsu
isinstanceu
basestringu	cert_fileukey_file(uselfuconnuurluverifyucertucert_loc((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyucert_verifyys"
					
uHTTPAdapter.cert_verifycCs�t�}t|dd�|_tt|di��|_t|j�|_||_|jj	|_	t
|jt�r�|jj
d�|_n|j|_t|j||�||_||_|S(u�Builds a :class:`Response <requests.Response>` object from a urllib3
        response. This should not be called from user code, and is only exposed
        for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`

        :param req: The :class:`PreparedRequest <PreparedRequest>` used to generate the response.
        :param resp: The urllib3 response object.
        ustatusuheadersuutf-8N(uResponseugetattruNoneustatus_codeuCaseInsensitiveDictuheadersuget_encoding_from_headersuencodingurawureasonu
isinstanceuurlubytesudecodeuextract_cookies_to_jarucookiesurequestu
connection(uselfurequrespuresponse((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyubuild_response�s					uHTTPAdapter.build_responsecCs�|p	i}|jt|j��j�}|r�t|d�}|j|�}||jkr�t|d|d|jd|j	d|j
�|j|<n|j|j|�}n*t|�}|j�}|j
j|�}|S(ueReturns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        uhttpu
proxy_headersu	num_poolsumaxsizeublock(ugetuurlparseuloweruschemeuprepend_scheme_if_neededu
proxy_headersu
proxy_manageruproxy_from_urlu_pool_connectionsu
_pool_maxsizeu_pool_blockuconnection_from_urlugeturlupoolmanager(uselfuurluproxiesuproxyu
proxy_headersuconnuparsed((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyuget_connection�s"		uHTTPAdapter.get_connectioncCs|jj�dS(u�Disposes of any internal state.

        Currently, this just closes the PoolManager, which closes pooled
        connections.
        N(upoolmanageruclear(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyuclose�suHTTPAdapter.closecCsd|p	i}t|j�j}|j|�}|rW|dkrWt|j�\}}n	|j}|S(uObtain the url to use when making the final request.

        If the message is being sent through a HTTP proxy, the full URL has to
        be used. Otherwise, we should only use the path portion of the URL.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param proxies: A dictionary of schemes to proxy URLs.
        uhttps(uurlparseuurluschemeugetu	urldefragupath_url(uselfurequestuproxiesuschemeuproxyuurlu_((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyurequest_url�s
	uHTTPAdapter.request_urlcKsdS(u"Add any headers needed by the connection. As of v2.0 this does
        nothing by default, but is left for overriding by users that subclass
        the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
        :param kwargs: The keyword arguments from the call to send().
        N((uselfurequestukwargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyuadd_headerssuHTTPAdapter.add_headerscCs>i}t|�\}}|r:|r:t||�|d<n|S(u3Returns a dictionary of the headers to add to any request sent
        through a proxy. This works with urllib3 magic to ensure that they are
        correctly sent to the proxy, rather than in a tunnelled request if
        CONNECT is being used.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxies: The url of the proxy being used for this request.
        :param kwargs: Optional additional keyword arguments.
        uProxy-Authorization(uget_auth_from_urlu_basic_auth_str(uselfuproxyuheadersuusernameupassword((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyu
proxy_headerss
uHTTPAdapter.proxy_headerscCsZ|j|j|�}|j||j||�|j||�}|j|�|jdkphd|jk}	td|d|�}y�|	s�|j	d|j
d|d|jd|jddd	dd
dddd|jd
|�
}
nPt
|d�r�|j}n|jd
|�}y�|j|j
|dd�x-|jj�D]\}}
|j||
�q:W|j�xd|jD]Y}|jtt|��dd�jd��|jd�|j|�|jd�qnW|jd�|j�}tj|d|d|d
ddd�}
Wn|j��YnX|j|�Wntjk
rn}zt |d|��WYdd}~Xn�t!k
r�}zt |d|��WYdd}~Xn�t"k
r�}zt#|��WYdd}~Xnvt$t%fk
rI}zPt&|t$�rt'|d|��n't&|t(�r4t)|d|��n�WYdd}~XnX|j*||
�S(uSends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) The timeout on the request.
        :param verify: (optional) Whether to verify SSL certificates.
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        uContent-Lengthuconnectureadumethoduurlubodyuheadersuredirectuassert_same_hostupreload_contentudecode_contenturetriesutimeoutu
proxy_pooluskip_accept_encodingiNuutf-8s
s0

upoolu
connectionurequestFT(+uget_connectionuurlucert_verifyurequest_urluadd_headersubodyuNoneuheadersuTimeoutSauceuurlopenumethoduFalseumax_retriesuhasattru
proxy_poolu	_get_connu
putrequestuTrueuitemsu	putheaderu
endheadersusenduhexulenuencodeugetresponseuHTTPResponseufrom_httplibucloseu	_put_connusocketuerroruConnectionErroru
MaxRetryErroru_ProxyErroru
ProxyErroru	_SSLErroru
_HTTPErroru
isinstanceuSSLErroruTimeoutErroruTimeoutubuild_response(uselfurequestustreamutimeoutuverifyucertuproxiesuconnuurluchunkedurespulow_connuheaderuvalueuiurusockerrue((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyusend&sv
					
,




$$uHTTPAdapter.sendNFT(u__name__u
__module__u__qualname__u__doc__u	__attrs__uDEFAULT_POOLSIZEuDEFAULT_RETRIESuDEFAULT_POOLBLOCKu__init__u__getstate__u__setstate__uinit_poolmanagerucert_verifyubuild_responseuNoneuget_connectionucloseurequest_urluadd_headersu
proxy_headersuFalseuTrueusend(u
__locals__((u	__class__u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyuHTTPAdapter0s"	
%$ uHTTPAdapterF(.u__doc__usocketumodelsuResponseupackages.urllib3.poolmanageruPoolManageruproxy_from_urlupackages.urllib3.responseuHTTPResponseupackages.urllib3.utiluTimeoutuTimeoutSauceucompatuurlparseu
basestringu	urldefraguunquoteuutilsuDEFAULT_CA_BUNDLE_PATHuget_encoding_from_headersuprepend_scheme_if_neededuget_auth_from_urlu
structuresuCaseInsensitiveDictupackages.urllib3.exceptionsu
MaxRetryErroruTimeoutErroruSSLErroru	_SSLErroru	HTTPErroru
_HTTPErroru
ProxyErroru_ProxyErrorucookiesuextract_cookies_to_jaru
exceptionsuConnectionErroruauthu_basic_auth_struFalseuDEFAULT_POOLBLOCKuDEFAULT_POOLSIZEuDEFAULT_RETRIESuobjectuBaseAdapteruHTTPAdapter(((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/adapters.pyu<module>	s*"""
python3.3/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-33.pyc000064400000021233151733566750022747 0ustar00�
7�Re�c@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
dZd	Zd
d�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�ZdS(u]
requests.auth
~~~~~~~~~~~~~

This module contains the authentication handlers for Requests.
iN(u	b64encodei(uurlparseustr(uextract_cookies_to_jar(uparse_dict_headeru!application/x-www-form-urlencodedumultipart/form-datacCs0dtd||fjd��j�jd�S(uReturns a Basic Auth string.uBasic u%s:%sulatin1(u	b64encodeuencodeustripudecode(uusernameupassword((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu_basic_auth_strsu_basic_auth_strcBs&|EeZdZdZdd�ZdS(uAuthBaseu4Base class that all auth implementations derive fromcCstd��dS(NuAuth hooks must be callable.(uNotImplementedError(uselfur((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu__call__"suAuthBase.__call__N(u__name__u
__module__u__qualname__u__doc__u__call__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyuAuthBasesuAuthBasecBs2|EeZdZdZdd�Zdd�ZdS(u
HTTPBasicAuthu?Attaches HTTP Basic Authentication to the given Request object.cCs||_||_dS(N(uusernameupassword(uselfuusernameupassword((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu__init__(s	uHTTPBasicAuth.__init__cCs t|j|j�|jd<|S(Nu
Authorization(u_basic_auth_struusernameupassworduheaders(uselfur((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu__call__,suHTTPBasicAuth.__call__N(u__name__u
__module__u__qualname__u__doc__u__init__u__call__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu
HTTPBasicAuth&su
HTTPBasicAuthcBs&|EeZdZdZdd�ZdS(u
HTTPProxyAuthu=Attaches HTTP Proxy Authentication to a given Request object.cCs t|j|j�|jd<|S(NuProxy-Authorization(u_basic_auth_struusernameupassworduheaders(uselfur((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu__call__3suHTTPProxyAuth.__call__N(u__name__u
__module__u__qualname__u__doc__u__call__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu
HTTPProxyAuth1su
HTTPProxyAuthcBsJ|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S(uHTTPDigestAuthu@Attaches HTTP Digest Authentication to the given Request object.cCs:||_||_d|_d|_i|_d|_dS(Nui(uusernameupasswordu
last_nonceunonce_countuchaluNoneupos(uselfuusernameupassword((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu__init__:s					uHTTPDigestAuth.__init__cs6|jd}|jd}|jjd�}|jjd�}|jjd�}|dkred}n|j�}|dks�|dkr�dd	�}	|	�n!|d
kr�dd�}
|
�n�fd
d�}�dkr�dSd}t|�}
|
j}|
jr|d|
j7}nd|j||jf}d||f}�|�}�|�}||j	kr{|j
d7_
n	d|_
d|j
}t|j
�jd�}||jd�7}|t
j�jd�7}|tjd�7}tj|�j�dd�}d|||||f}|dkrH�d|||f�}n|dkrp||d||f�}n7|dks�d|jd�kr�|||�}ndS||_	d|j||||f}|r�|d|7}n|r�|d|7}n|r|d|7}n|r.|d||f7}nd|S( Nurealmunonceuqopu	algorithmuopaqueuMD5uMD5-SESScSs4t|t�r!|jd�}ntj|�j�S(Nuutf-8(u
isinstanceustruencodeuhashlibumd5u	hexdigest(ux((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyumd5_utf8Psu4HTTPDigestAuth.build_digest_header.<locals>.md5_utf8uSHAcSs4t|t�r!|jd�}ntj|�j�S(Nuutf-8(u
isinstanceustruencodeuhashlibusha1u	hexdigest(ux((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyusha_utf8Vsu4HTTPDigestAuth.build_digest_header.<locals>.sha_utf8cs�d||f�S(Nu%s:%s((usud(u	hash_utf8(u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu<lambda>\su4HTTPDigestAuth.build_digest_header.<locals>.<lambda>u?u%s:%s:%su%s:%siu%08xuutf-8iiu%s:%s:%s:%s:%suauthu,u>username="%s", realm="%s", nonce="%s", uri="%s", response="%s"u
, opaque="%s"u, algorithm="%s"u
, digest="%s"u , qop="auth", nc=%s, cnonce="%s"u	Digest %s(uchalugetuNoneuupperuurlparseupathuqueryuusernameupasswordu
last_nonceunonce_countustruencodeutimeuctimeuosuurandomuhashlibusha1u	hexdigestusplit(uselfumethoduurlurealmunonceuqopu	algorithmuopaqueu
_algorithmumd5_utf8usha_utf8uKDuentdigup_parsedupathuA1uA2uHA1uHA2uncvalueusucnonceunoncebiturespdigubase((u	hash_utf8u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyubuild_digest_headerBsn

						
!	u"HTTPDigestAuth.build_digest_headercKsk|jdk	r(|jjj|j�nt|dd�}|jjdd�}d|j�krW|dkrWt	|d|d�t
jddt
j�}t
|jd|d	d��|_|j|jj�|jj�}t|j|j|j�|j|j�|j|j|j�|jd
<|jj||�}|jj|�||_|St	|dd�|S(u:Takes the given response and tries digest-auth, if needed.u
num_401_callsiuwww-authenticateuudigestiudigest uflagsucountu
AuthorizationN(uposuNoneurequestubodyuseekugetattruheadersugetulowerusetattrureucompileu
IGNORECASEuparse_dict_headerusubuchalucontenturawurelease_connucopyuextract_cookies_to_jaru_cookiesuprepare_cookiesubuild_digest_headerumethoduurlu
connectionusenduhistoryuappend(uselfurukwargsu
num_401_callsus_authupatuprepu_r((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu
handle_401�s*!
	uHTTPDigestAuth.handle_401cCsm|jr+|j|j|j�|jd<ny|jj�|_Wntk
rUYnX|j	d|j
�|S(Nu
Authorizationuresponse(u
last_nonceubuild_digest_headerumethoduurluheadersubodyutelluposuAttributeErroru
register_hooku
handle_401(uselfur((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu__call__�s	"
uHTTPDigestAuth.__call__N(u__name__u
__module__u__qualname__u__doc__u__init__ubuild_digest_headeru
handle_401u__call__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyuHTTPDigestAuth8s
S#uHTTPDigestAuth(u__doc__uosureutimeuhashlibubase64u	b64encodeucompatuurlparseustrucookiesuextract_cookies_to_jaruutilsuparse_dict_headeruCONTENT_TYPE_FORM_URLENCODEDuCONTENT_TYPE_MULTI_PARTu_basic_auth_struobjectuAuthBaseu
HTTPBasicAuthu
HTTPProxyAuthuHTTPDigestAuth(((u2/tmp/pip-zej_zi-build/pip/_vendor/requests/auth.pyu<module>spython3.3/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-33.pyc000064400000013100151733566750024161 0ustar00�
7�ReUc@sDdZddlmZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�Z	Gdd�de�Z
Gdd�de�ZGdd�dee�Z
Gdd�dee�ZGdd�dee�ZGdd�de�ZGdd�dee�ZdS(ua
requests.exceptions
~~~~~~~~~~~~~~~~~~~

This module contains the set of Requests' exceptions.

i(u	HTTPErrorcs,|EeZdZdZ�fdd�Z�S(uRequestExceptionuOThere was an ambiguous exception that occurred while handling your
    request.cs�|jdd�}||_|jdd�|_|dk	rg|jrgt|d�rg|jj|_ntt|�j||�dS(uT
        Initialize RequestException with `request` and `response` objects.
        uresponseurequestN(upopuNoneuresponseurequestuhasattrusuperuRequestExceptionu__init__(uselfuargsukwargsuresponse(u	__class__(u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyu__init__s	uRequestException.__init__(u__name__u
__module__u__qualname__u__doc__u__init__(u
__locals__((u	__class__u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyuRequestException
suRequestExceptioncBs|EeZdZdZdS(u	HTTPErroruAn HTTP error occurred.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyu	HTTPErrorsu	HTTPErrorcBs|EeZdZdZdS(uConnectionErroruA Connection error occurred.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyuConnectionError"suConnectionErrorcBs|EeZdZdZdS(u
ProxyErroruA proxy error occurred.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyu
ProxyError&su
ProxyErrorcBs|EeZdZdZdS(uSSLErroruAn SSL error occurred.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyuSSLError*suSSLErrorcBs|EeZdZdZdS(uTimeoutuThe request timed out.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyuTimeout.suTimeoutcBs|EeZdZdZdS(uURLRequiredu*A valid URL is required to make a request.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyuURLRequired2suURLRequiredcBs|EeZdZdZdS(uTooManyRedirectsuToo many redirects.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyuTooManyRedirects6suTooManyRedirectscBs|EeZdZdZdS(u
MissingSchemau/The URL schema (e.g. http or https) is missing.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyu
MissingSchema:su
MissingSchemacBs|EeZdZdZdS(u
InvalidSchemau"See defaults.py for valid schemas.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyu
InvalidSchema>su
InvalidSchemacBs|EeZdZdZdS(u
InvalidURLu' The URL provided was somehow invalid. N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyu
InvalidURLBsu
InvalidURLcBs|EeZdZdZdS(uChunkedEncodingErroru?The server declared chunked encoding but sent an invalid chunk.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyuChunkedEncodingErrorFsuChunkedEncodingErrorcBs|EeZdZdZdS(uContentDecodingErroru!Failed to decode response contentN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyuContentDecodingErrorJsuContentDecodingErrorN(u__doc__upackages.urllib3.exceptionsu	HTTPErroru
BaseHTTPErroruIOErroruRequestExceptionuConnectionErroru
ProxyErroruSSLErroruTimeoutuURLRequireduTooManyRedirectsu
ValueErroru
MissingSchemau
InvalidSchemau
InvalidURLuChunkedEncodingErroruContentDecodingError(((u8/tmp/pip-zej_zi-build/pip/_vendor/requests/exceptions.pyu<module>	spython3.3/site-packages/pip/_vendor/requests/__pycache__/models.cpython-33.pyc000064400000071754151733566750023306 0ustar00�
7�ReDgc@s;dZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
mZdd	lmZdd
lmZddlmZddlmZdd
lmZmZmZmZmZmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(ddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6ddl7m8Z8e8j9e8j:e8j;e8j<fZ=dZ>dZ?dZ@Gdd�deA�ZBGdd�deA�ZCGdd�deC�ZDGdd�deBeC�ZEGdd�deA�ZFdS( u`
requests.models
~~~~~~~~~~~~~~~

This module contains the primary objects that power Requests.
iN(uBytesIOuUnsupportedOperationi(u
default_hooks(uCaseInsensitiveDict(u
HTTPBasicAuth(ucookiejar_from_dictuget_cookie_header(uRequestField(uencode_multipart_formdata(u	parse_url(uDecodeError(u	HTTPErroruRequestExceptionu
MissingSchemau
InvalidURLuChunkedEncodingErroruContentDecodingError(
uguess_filenameuget_auth_from_urlurequote_uriustream_decode_response_unicodeuto_key_val_listuparse_header_linksuiter_slicesuguess_json_utfu	super_lenuto_native_string(
u	cookielibu
urlunparseuurlsplitu	urlencodeustrubytesuStringIOuis_py2uchardetujsonubuiltin_stru
basestringuIncompleteRead(ucodesii
iicBsJ|EeZdZedd��Zedd��Zedd��ZdS(uRequestEncodingMixincCssg}t|j�}|j}|s-d}n|j|�|j}|rf|jd�|j|�ndj|�S(uBuild the path URL to use.u/u?u(uurlsplituurlupathuappenduqueryujoin(uselfuurlupupathuquery((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyupath_url1s		
	
uRequestEncodingMixin.path_urlcCst|ttf�r|St|d�r,|St|d�rg}x�t|�D]�\}}t|t�syt|d�r�|g}nxl|D]d}|dk	r�|jt|t�r�|jd�n|t|t�r�|jd�n|f�q�q�WqNWt	|dd�S|SdS(u�Encode parameters in a piece of data.

        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        ureadu__iter__uutf-8udoseqNT(u
isinstanceustrubytesuhasattruto_key_val_listu
basestringuNoneuappenduencodeu	urlencodeuTrue(udatauresultukuvsuv((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu_encode_paramsFs 	
!3u#RequestEncodingMixin._encode_paramsc
Csr|std��nt|t�r3td��ng}t|pEi�}t|pWi�}x�|D]�\}}t|t�s�t|d�r�|g}nx�|D]�}|dk	r�t|t�s�t|�}n|jt|t�r�|j	d�n|t|t�r|j
d�n|f�q�q�WqdWx'|D]\}}d}d}	t|ttf�r�t
|�dkr�|\}
}q�t
|�dkr�|\}
}}q�|\}
}}}	nt|�p�|}
|}t|t�r�t|�}nt|t�rt|�}ntd|d|j�d	|
d
|	�}|jd|�|j|�q3Wt|�\}
}|
|fS(
uBuild the body for a multipart/form-data request.

        Will successfully encode files when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.

        uFiles must be provided.uData must not be a string.u__iter__uutf-8iiunameudataufilenameuheadersucontent_typeN(u
ValueErroru
isinstanceu
basestringuto_key_val_listuhasattruNoneubytesustruappendudecodeuencodeutupleulistulenuguess_filenameuStringIOuBytesIOuRequestFieldureadumake_multipartuencode_multipart_formdata(ufilesudatau
new_fieldsufieldsufielduvaluvukuftufhufnufpurfubodyucontent_type((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu
_encode_filesasL	
!3u"RequestEncodingMixin._encode_filesN(u__name__u
__module__u__qualname__upropertyupath_urlustaticmethodu_encode_paramsu
_encode_files(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuRequestEncodingMixin0suRequestEncodingMixincBs,|EeZdZdd�Zdd�ZdS(uRequestHooksMixincCs�||jkr"td|��nt|tj�rK|j|j|�n3t|d�r~|j|jdd�|D��ndS(uProperly register a hook.u1Unsupported event specified, with event name "%s"u__iter__css'|]}t|tj�r|VqdS(N(u
isinstanceucollectionsuCallable(u.0uh((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu	<genexpr>�su2RequestHooksMixin.register_hook.<locals>.<genexpr>N(uhooksu
ValueErroru
isinstanceucollectionsuCallableuappenduhasattruextend(uselfueventuhook((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu
register_hook�suRequestHooksMixin.register_hookcCs9y|j|j|�dSWntk
r4dSYnXdS(uiDeregister a previously registered hook.
        Returns True if the hook existed, False if not.
        NTF(uhooksuremoveuTrueu
ValueErroruFalse(uselfueventuhook((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuderegister_hook�s

u!RequestHooksMixin.deregister_hookN(u__name__u
__module__u__qualname__u
register_hookuderegister_hook(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuRequestHooksMixin�suRequestHooksMixincBsY|EeZdZdZddddddddddd�	Zdd�Zdd�ZdS(	uRequestuA user-created :class:`Request <Request>` object.

    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach the request. If a dictionary is provided, form-encoding will take place.
    :param params: dictionary of URL parameters to append to the URL.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'http://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>

    c
Cs	|dkrgn|}|dkr*gn|}|dkrBin|}|dkrZin|}|	dkrrin|	}	t�|_x6t|	j��D]"\}
}|jd|
d|�q�W||_||_||_||_	||_
||_||_||_
dS(Nueventuhook(uNoneu
default_hooksuhooksulistuitemsu
register_hookumethoduurluheadersufilesudatauparamsuauthucookies(uselfumethoduurluheadersufilesudatauparamsuauthucookiesuhooksukuv((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__init__�s 							uRequest.__init__cCsd|jS(Nu<Request [%s]>(umethod(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__repr__�suRequest.__repr__cCsht�}|jd|jd|jd|jd|jd|jd|jd|jd|j	d	|j
�	|S(
uXConstructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it.umethoduurluheadersufilesudatauparamsuauthucookiesuhooks(uPreparedRequestuprepareumethoduurluheadersufilesudatauparamsuauthucookiesuhooks(uselfup((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare�s										
uRequest.prepareN(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u__repr__uprepare(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuRequest�suRequestcBs�|EeZdZdZdd�Zddddddddddd�	Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
ddd�Zdd�Zdd�ZdS(uPreparedRequestu�The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.

    Generated from either a :class:`Request <Request>` object or manually.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'http://httpbin.org/get')
      >>> r = req.prepare()
      <PreparedRequest [GET]>

      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>

    cCs=d|_d|_d|_d|_d|_t�|_dS(N(uNoneumethoduurluheadersu_cookiesubodyu
default_hooksuhooks(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__init__s					uPreparedRequest.__init__c

Csh|j|�|j||�|j|�|j|�|j||�|j||�|j|	�dS(u6Prepares the entire request with the given parameters.N(uprepare_methoduprepare_urluprepare_headersuprepare_cookiesuprepare_bodyuprepare_authu
prepare_hooks(
uselfumethoduurluheadersufilesudatauparamsuauthucookiesuhooks((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare!s


uPreparedRequest.preparecCsd|jS(Nu<PreparedRequest [%s]>(umethod(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__repr__1suPreparedRequest.__repr__cCsat�}|j|_|j|_|jj�|_|jj�|_|j|_|j|_|S(N(uPreparedRequestumethoduurluheadersucopyu_cookiesubodyuhooks(uselfup((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyucopy4s	uPreparedRequest.copycCs1||_|jdk	r-|jj�|_ndS(uPrepares the given HTTP method.N(umethoduNoneuupper(uselfumethod((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare_method>s	uPreparedRequest.prepare_methodcCsqyt|�}Wn/tk
r0t|�}Yntk
rAYnXd|krq|j�jd�rq||_dSt|�\}}}}}}}	|s�tdj	|���n|s�t
d|��ny|jd�jd�}Wnt
k
rt
d��YnX|pd	}
|
r%|
d
7}
n|
|7}
|rL|
dt|�7}
n|s[d}ntr	t|t�r�|jd�}nt|
t�r�|
jd�}
nt|t�r�|jd�}nt|t�r�|jd�}nt|	t�r	|	jd�}	q	n|j|�}|r@|r7d||f}q@|}ntt||
|d||	g��}||_dS(
uPrepares the given HTTP URL.u:uhttpNuDInvalid URL {0!r}: No schema supplied. Perhaps you meant http://{0}?u Invalid URL %r: No host supplieduidnauutf-8uURL has an invalid label.uu@u/u%s&%s(uunicodeu	NameErrorustruUnicodeDecodeErroruloweru
startswithuurlu	parse_urlu
MissingSchemauformatu
InvalidURLuencodeudecodeuUnicodeErroruis_py2u
isinstanceu_encode_paramsurequote_uriu
urlunparseuNone(uselfuurluparamsuschemeuauthuhostuportupathuqueryufragmentunetlocu
enc_params((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare_urlDsZ

"	!	


		$uPreparedRequest.prepare_urlcCs;|r+tdd�|j�D��|_nt�|_dS(u Prepares the given HTTP headers.css'|]\}}t|�|fVqdS(N(uto_native_string(u.0unameuvalue((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu	<genexpr>�su2PreparedRequest.prepare_headers.<locals>.<genexpr>N(uCaseInsensitiveDictuitemsuheaders(uselfuheaders((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare_headers�s%uPreparedRequest.prepare_headerscCs~d
}d
}d
}tt|d�t|ttttf�g�}yt|�}Wn!t	t
tfk
rvd
}YnX|r�|}|r�td��n|d
k	r�t
|�|jd<qqd|jd<n�|r�|j||�\}}nT|r?|j|�}t|t�s-t|t
�s-t|d�r6d
}q?d}n|j|�|rqd|jkrq||jd	<n||_d
S(u"Prepares the given HTTP body data.u__iter__u1Streamed bodies and files are mutually exclusive.uContent-LengthuchunkeduTransfer-Encodingureadu!application/x-www-form-urlencodeducontent-typeuContent-TypeN(uNoneualluhasattru
isinstanceu
basestringulistutupleudictu	super_lenu	TypeErroruAttributeErroruUnsupportedOperationuNotImplementedErrorubuiltin_struheadersu
_encode_filesu_encode_paramsustruprepare_content_lengthubody(uselfudataufilesubodyucontent_typeulengthu	is_stream((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare_body�s8"-		
uPreparedRequest.prepare_bodycCs�t|d�rZt|d�rZ|jdd�t|j��|jd<|jdd�nV|dk	r�t|�}|r�t|�|jd<q�n|jd	kr�d|jd<ndS(
NuseekutelliiuContent-LengthuGETuHEADu0(uGETuHEAD(uhasattruseekubuiltin_strutelluheadersuNoneu	super_lenumethod(uselfubodyul((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare_content_length�su&PreparedRequest.prepare_content_lengthucCs�|dkr6t|j�}t|�r-|nd}n|r�t|t�rlt|�dkrlt|�}n||�}|jj	|j�|j
|j�ndS(u"Prepares the given HTTP auth data.iN(uNoneuget_auth_from_urluurluanyu
isinstanceutupleulenu
HTTPBasicAuthu__dict__uupdateuprepare_content_lengthubody(uselfuauthuurluurl_authur((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare_auth�s!uPreparedRequest.prepare_authcCs_t|tj�r||_nt|�|_t|j|�}|dk	r[||jd<ndS(u$Prepares the given HTTP cookie data.uCookieN(u
isinstanceu	cookielibu	CookieJaru_cookiesucookiejar_from_dictuget_cookie_headeruNoneuheaders(uselfucookiesu
cookie_header((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuprepare_cookies�suPreparedRequest.prepare_cookiescCs)x"|D]}|j|||�qWdS(uPrepares the given hooks.N(u
register_hook(uselfuhooksuevent((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu
prepare_hooks�s
uPreparedRequest.prepare_hooksN(u__name__u
__module__u__qualname__u__doc__u__init__uNoneuprepareu__repr__ucopyuprepare_methoduprepare_urluprepare_headersuprepare_bodyuprepare_content_lengthuprepare_authuprepare_cookiesu
prepare_hooks(u
__locals__((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuPreparedRequest�s
B3uPreparedRequestc
sL|EeZdZdZdddddddd	d
dg
Z�fdd
�Zdd�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zedd��Z
edd��Zedd��Zd d1d!d"�Zed2d#d$�Zed%d&��Zed'd(��Zd)d*�Zed+d,��Zd-d.�Zd/d0�Z�S(3uResponseuhThe :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    u_contentustatus_codeuheadersuurluhistoryuencodingureasonucookiesuelapsedurequestcs�tt|�j�d|_d|_d|_t�|_	d|_
d|_d|_g|_
d|_ti�|_tjd�|_dS(NiF(usuperuResponseu__init__uFalseu_contentu_content_consumeduNoneustatus_codeuCaseInsensitiveDictuheadersurawuurluencodinguhistoryureasonucookiejar_from_dictucookiesudatetimeu	timedeltauelapsed(uself(u	__class__(u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__init__s								uResponse.__init__cs3�js�jnt�fdd��jD��S(Nc3s'|]}|t�|d�fVqdS(N(ugetattruNone(u.0uattr(uself(u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu	<genexpr>6su(Response.__getstate__.<locals>.<genexpr>(u_content_consumeducontentudictu	__attrs__(uself((uselfu4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__getstate__/s
	
uResponse.__getstate__cCsQx*|j�D]\}}t|||�q
Wt|dd�t|dd�dS(Nu_content_consumedurawT(uitemsusetattruTrueuNone(uselfustateunameuvalue((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__setstate__:suResponse.__setstate__cCsd|jS(Nu<Response [%s]>(ustatus_code(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__repr__BsuResponse.__repr__cCs|jS(u,Returns true if :attr:`status_code` is 'OK'.(uok(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__bool__EsuResponse.__bool__cCs|jS(u,Returns true if :attr:`status_code` is 'OK'.(uok(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__nonzero__IsuResponse.__nonzero__cCs
|jd�S(u,Allows you to use a response as an iterator.i�(uiter_content(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu__iter__MsuResponse.__iter__cCs+y|j�Wntk
r&dSYnXdS(NFT(uraise_for_statusuRequestExceptionuFalseuTrue(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuokQs

	uResponse.okcCsd|jko|jtkS(u�True if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        ulocation(uheadersustatus_codeuREDIRECT_STATI(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuis_redirectYsuResponse.is_redirectcCstj|j�dS(u6The apparent encoding, provided by the chardet libraryuencoding(uchardetudetectucontent(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuapparent_encoding`suResponse.apparent_encodingicsa��fdd�}t�j��}|�}�jr?|n|}|r]t|��}n|S(u�Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        c3s�y�y,x%�jj�dd�D]}|VqWWnatk
rb}zt|��WYdd}~Xn1tk
r�}zt|��WYdd}~XnXWn9tk
r�x$�jj��}|s�Pn|Vq�YnXd�_	dS(Nudecode_contentT(
urawustreamuTrueuIncompleteReaduChunkedEncodingErroruDecodeErroruContentDecodingErroruAttributeErrorureadu_content_consumed(uchunkue(u
chunk_sizeuself(u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyugenerateos
#

u'Response.iter_content.<locals>.generate(uiter_slicesu_contentu_content_consumedustream_decode_response_unicode(uselfu
chunk_sizeudecode_unicodeugenerateu
reused_chunksu
stream_chunksuchunks((u
chunk_sizeuselfu4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuiter_contentes
	uResponse.iter_contentccs�d}x�|jd|d|�D]�}|dk	r>||}n|j�}|r�|dr�|r�|dd|dkr�|j�}nd}x|D]}|Vq�WqW|dk	r�|VndS(	u�Iterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.
        u
chunk_sizeudecode_unicodeiNi����i����i����i����(uNoneuiter_contentu
splitlinesupop(uselfu
chunk_sizeudecode_unicodeupendinguchunkulinesuline((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu
iter_lines�s
.

uResponse.iter_linescCs�|jdkr�y^|jr*td��n|jdkrEd|_n't�j|jt	��pft�|_Wq�t
k
r�d|_Yq�Xnd|_|jS(u"Content of the response, in bytes.u2The content for this response was already consumediFNT(u_contentuFalseu_content_consumeduRuntimeErrorustatus_codeuNoneubytesujoinuiter_contentuCONTENT_CHUNK_SIZEuAttributeErroruTrue(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyucontent�s	+
	uResponse.contentcCs�d}|j}|js"td�S|jdkr=|j}nyt|j|dd�}Wn-ttfk
r�t|jdd�}YnX|S(u�Content of the response, in unicode.

        If Response.encoding is None, encoding will be guessed using
        ``chardet``.

        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        uuerrorsureplaceN(uNoneuencodingucontentustruapparent_encodinguLookupErroru	TypeError(uselfucontentuencoding((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyutext�s		
u
Response.textcKs�|jrut|j�dkrut|j�}|dk	ruy tj|jj|�|�SWqrtk
rnYqrXquntj|j	|�S(u�Returns the json-encoded content of a response, if any.

        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        iN(
uencodingulenucontentuguess_json_utfuNoneujsonuloadsudecodeuUnicodeDecodeErrorutext(uselfukwargsuencoding((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyujson�s 
u
Response.jsoncCsj|jjd�}i}|rft|�}x9|D].}|jd�pR|jd�}|||<q1Wn|S(u8Returns the parsed header links of the response, if any.ulinkureluurl(uheadersugetuparse_header_links(uselfuheaderululinksulinkukey((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyulinks�s
uResponse.linkscCs�d}d|jko dknr>d|j|jf}n8d|jkoXdknrvd|j|jf}n|r�t|d|��ndS(	u2Raises stored :class:`HTTPError`, if one occurred.ui�i�u%s Client Error: %siXu%s Server Error: %suresponseN(ustatus_codeureasonu	HTTPError(uselfuhttp_error_msg((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuraise_for_statussuResponse.raise_for_statuscCs
|jj�S(u�Releases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.

        *Note: Should not normally need to be called explicitly.*
        (urawurelease_conn(uself((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuclosesuResponse.closeFN(u__name__u
__module__u__qualname__u__doc__u	__attrs__u__init__u__getstate__u__setstate__u__repr__u__bool__u__nonzero__u__iter__upropertyuokuis_redirectuapparent_encodinguFalseuiter_contentuITER_CHUNK_SIZEuNoneu
iter_linesucontentutextujsonulinksuraise_for_statusuclose(u
__locals__((u	__class__u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyuResponse�s:	(*&uResponsei((Gu__doc__ucollectionsudatetimeuiouBytesIOuUnsupportedOperationuhooksu
default_hooksu
structuresuCaseInsensitiveDictuauthu
HTTPBasicAuthucookiesucookiejar_from_dictuget_cookie_headerupackages.urllib3.fieldsuRequestFieldupackages.urllib3.filepostuencode_multipart_formdataupackages.urllib3.utilu	parse_urlupackages.urllib3.exceptionsuDecodeErroru
exceptionsu	HTTPErroruRequestExceptionu
MissingSchemau
InvalidURLuChunkedEncodingErroruContentDecodingErroruutilsuguess_filenameuget_auth_from_urlurequote_uriustream_decode_response_unicodeuto_key_val_listuparse_header_linksuiter_slicesuguess_json_utfu	super_lenuto_native_stringucompatu	cookielibu
urlunparseuurlsplitu	urlencodeustrubytesuStringIOuis_py2uchardetujsonubuiltin_stru
basestringuIncompleteReadustatus_codesucodesumovedufounduotherutemporary_moveduREDIRECT_STATIuDEFAULT_REDIRECT_LIMITuCONTENT_CHUNK_SIZEuITER_CHUNK_SIZEuobjectuRequestEncodingMixinuRequestHooksMixinuRequestuPreparedRequestuResponse(((u4/tmp/pip-zej_zi-build/pip/_vendor/requests/models.pyu<module>s6.FXmJ�python3.3/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-33.pyc000064400000054357151733566750023671 0ustar00�
7�ReWc@s�dZddlZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZddl
mZmZmZmZdd	lmZmZmZdd
lmZmZddlmZmZmZddlmZmZm Z m!Z!dd
l"m#Z#ddl$m%Z%ddlm&Z&m'Z'm(Z(m)Z)m*Z*ddl+m,Z,ddlm-Z-e	dd�Z.e	dd�Z/Gdd�de0�Z1Gdd�de1�Z2dd�Z3dS(u�
requests.session
~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).

iN(uMapping(udatetimei(u_basic_auth_str(u	cookielibuOrderedDictuurljoinuurlparseubuiltin_str(ucookiejar_from_dictuextract_cookies_to_jaruRequestsCookieJaru
merge_cookies(uRequestuPreparedRequestuDEFAULT_REDIRECT_LIMIT(u
default_hooksu
dispatch_hook(uto_key_val_listudefault_headersuto_native_string(uTooManyRedirectsu
InvalidSchemauChunkedEncodingErroruContentDecodingError(uCaseInsensitiveDict(uHTTPAdapter(urequote_uriuget_environ_proxiesuget_netrc_authushould_bypass_proxiesuget_auth_from_url(ucodes(uREDIRECT_STATIcCs�|dkr|S|dkr |St|t�o;t|t�sB|S|t|��}|jt|��x0|j�D]"\}}|dkrt||=qtqtWtdd�|j�D��}|S(u�
    Determines appropriate setting for a given request, taking into account the
    explicit setting on that request, and the setting in the session. If a
    setting is a dictionary, they will be merged together using `dict_class`
    css-|]#\}}|dk	r||fVqdS(N(uNone(u.0ukuv((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu	<genexpr>Csu merge_setting.<locals>.<genexpr>N(uNoneu
isinstanceuMappinguto_key_val_listuupdateuitemsudict(urequest_settingusession_settingu
dict_classumerged_settingukuv((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu
merge_setting'su
merge_settingcCsZ|dks!|jd�gkr%|S|dksF|jd�gkrJ|St|||�S(u�
    Properly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    uresponseN(uNoneugetu
merge_setting(u
request_hooksu
session_hooksu
dict_class((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyumerge_hooksHs
!!umerge_hookscBsG|EeZdZddd	dddd�Zdd�Zdd�ZdS(
uSessionRedirectMixinc!cs�d}x�|jr�|j�}	y|jWn.tttfk
rY|jjdd�YnX||j	krt
d|j	��n|j�|jd}
|j
}|
jd�r�t|j�}d|j|
f}
nt|
�}
|
j�}
t|
�jst|jt|
��}
nt|
�}
t|
�|	_|jtjkrW|dkrWd}n|jtjkr~|dkr~d}n|jtjkr�|d	kr�d}n||	_
|jtjtjfkr�d
|	jkr�|	jd
=nd|	_n|	j}y|d=Wnt k
rYnXt!|	j"|	|j�|	j"j#|j$�|	j%|	j"�|j&|	|�}|j'|	|�|	}|j(|d|d
|d|d|d|dd�}t!|j$|	|j�|d7}|Vq	WdS(u6Receives a Response. Returns a generator of Responses.iudecode_contentuExceeded %s redirects.ulocationu//u%s:%suHEADuGETuPOSTuContent-LengthuCookieustreamutimeoutuverifyucertuproxiesuallow_redirectsiNF()uis_redirectucopyucontentuChunkedEncodingErroruContentDecodingErroruRuntimeErrorurawureaduFalseu
max_redirectsuTooManyRedirectsucloseuheadersumethodu
startswithuurlparseuurluschemeugeturlunetlocuurljoinurequote_uriuto_native_stringustatus_codeucodesu	see_otherufoundumovedu	temporaryuresumeuNoneubodyuKeyErroruextract_cookies_to_jaru_cookiesuupdateucookiesuprepare_cookiesurebuild_proxiesurebuild_authusend(uselfurespurequstreamutimeoutuverifyucertuproxiesuiuprepared_requestuurlumethoduparsed_rurluparseduheaders((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuresolve_redirectsYsn

					
	
	
u&SessionRedirectMixin.resolve_redirectscCs�|j}|j}d|kr[t|jj�}t|�}|j|jkr[|d=q[n|jrpt|�nd}|dk	r�|j|�ndS(u�
        When being redirected we may want to strip authentication from the
        request to avoid leaking credentials. This method intelligently removes
        and reapplies authentication where possible to avoid credential loss.
        u
AuthorizationN(	uheadersuurluurlparseurequestuhostnameu	trust_envuget_netrc_authuNoneuprepare_auth(uselfuprepared_requesturesponseuheadersuurluoriginal_parseduredirect_parsedunew_auth((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyurebuild_auth�s		
u!SessionRedirectMixin.rebuild_authc
Cs|j}|j}t|�j}|dk	r9|j�ni}|jr�t|�r�t|�}|j	|�}|r�|j
|||�q�nd|kr�|d=nyt||�\}	}
Wntk
r�d\}	}
YnX|	r|
rt
|	|
�|d<n|S(u�
        This method re-evaluates the proxy configuration by considering the
        environment variables. If we are redirected to a URL covered by
        NO_PROXY, we strip the proxy configuration. Otherwise, we set missing
        proxy keys for this URL (in case they were stripped by a previous
        redirect).

        This method also replaces the Proxy-Authorization header where
        necessary.
        uProxy-AuthorizationN(NN(uheadersuurluurlparseuschemeuNoneucopyu	trust_envushould_bypass_proxiesuget_environ_proxiesugetu
setdefaultuget_auth_from_urluKeyErroru_basic_auth_str(uselfuprepared_requestuproxiesuheadersuurluschemeunew_proxiesuenviron_proxiesuproxyuusernameupassword((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyurebuild_proxies�s$		

u$SessionRedirectMixin.rebuild_proxiesNFT(	u__name__u
__module__u__qualname__uFalseuNoneuTrueuresolve_redirectsurebuild_authurebuild_proxies(u
__locals__((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuSessionRedirectMixinXsauSessionRedirectMixincBsR|EeZdZdZdddddddd	d
ddd
ddgZdd�Zdd�Zdd�Zdd�Zd4d4d4d4d4d4d4d5d4d4d4d4d4dd�
Zdd�Zdd�Z
dd�Zd4d d!�Zd4d"d#�Zd4d$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4S(6uSessionu�A Requests session.

    Provides cookie persistence, connection-pooling, and configuration.

    Basic Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> s.get('http://httpbin.org/get')
      200
    uheadersucookiesuauthutimeoutuproxiesuhooksuparamsuverifyucertuprefetchuadaptersustreamu	trust_envu
max_redirectscCs�t�|_d|_i|_t�|_i|_d|_	d|_d|_t
|_d|_ti�|_t�|_|jdt��|jdt��dS(Nuhttps://uhttp://FT(udefault_headersuheadersuNoneuauthuproxiesu
default_hooksuhooksuparamsuFalseustreamuTrueuverifyucertuDEFAULT_REDIRECT_LIMITu
max_redirectsu	trust_envucookiejar_from_dictucookiesuOrderedDictuadaptersumountuHTTPAdapter(uself((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu__init__s								uSession.__init__cCs|S(N((uself((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu	__enter__?suSession.__enter__cGs|j�dS(N(uclose(uselfuargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu__exit__BsuSession.__exit__cCs!|jpi}t|tj�s0t|�}nttt�|j�|�}|j}|jr�|r�|jr�t	|j
�}nt�}|jd|j
j�d|j
d|jd|jdt|j|jdt�dt|j|j�dt||j�d	|d
t|j|j��	|S(ubConstructs a :class:`PreparedRequest <PreparedRequest>` for
        transmission and returns it. The :class:`PreparedRequest` has settings
        merged from the :class:`Request <Request>` instance and those of the
        :class:`Session`.

        :param request: :class:`Request` instance to prepare with this
            session's settings.
        umethoduurlufilesudatauheadersu
dict_classuparamsuauthucookiesuhooks(ucookiesu
isinstanceu	cookielibu	CookieJarucookiejar_from_dictu
merge_cookiesuRequestsCookieJaruauthu	trust_envuget_netrc_authuurluPreparedRequestuprepareumethoduupperufilesudatau
merge_settinguheadersuCaseInsensitiveDictuparamsumerge_hooksuhooks(uselfurequestucookiesumerged_cookiesuauthup((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuprepare_requestEs(							uSession.prepare_requestcCs�t|�}td|j�d|d|d|d|p9id|pEid|d|d	|�	}|j|�}|pui}|jrt|�p�i}x*|j�D]\}}|j||�q�W|r�|dk	r�t	j
jd
�}n|r|dk	rt	j
jd�}qnt||j
�}t|
|j�}
t||j�}t||j�}i|
d6|	d
6|d6|d6|d6|
d6}|j||�}|S(u4Constructs a :class:`Request <Request>`, prepares it and sends it.
        Returns :class:`Response <Response>` object.

        :param method: method for the new :class:`Request` object.
        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary or bytes to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of 'filename': file-like-objects
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) Float describing the timeout of the
            request in seconds.
        :param allow_redirects: (optional) Boolean. Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol to the URL of
            the proxy.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) if ``True``, the SSL cert will be verified.
            A CA_BUNDLE path can also be provided.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair.
        umethoduurluheadersufilesudatauparamsuauthucookiesuhooksuREQUESTS_CA_BUNDLEuCURL_CA_BUNDLEustreamutimeoutuverifyucertuproxiesuallow_redirectsF(ubuiltin_struRequestuupperuprepare_requestu	trust_envuget_environ_proxiesuitemsu
setdefaultuFalseuosuenvironugetu
merge_settinguproxiesustreamuverifyucertusend(uselfumethoduurluparamsudatauheadersucookiesufilesuauthutimeoutuallow_redirectsuproxiesuhooksustreamuverifyucerturequprepuenv_proxiesukuvusend_kwargsuresp((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyurequestlsD,		
uSession.requestcKs#|jdd�|jd||�S(u�Sends a GET request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        uallow_redirectsuGETT(u
setdefaultuTrueurequest(uselfuurlukwargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuget�suSession.getcKs#|jdd�|jd||�S(u�Sends a OPTIONS request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        uallow_redirectsuOPTIONST(u
setdefaultuTrueurequest(uselfuurlukwargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuoptions�suSession.optionscKs#|jdd�|jd||�S(u�Sends a HEAD request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        uallow_redirectsuHEADF(u
setdefaultuFalseurequest(uselfuurlukwargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuhead�suSession.headcKs|jd|d||�S(u8Sends a POST request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        uPOSTudata(urequest(uselfuurludataukwargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyupost�suSession.postcKs|jd|d||�S(u7Sends a PUT request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        uPUTudata(urequest(uselfuurludataukwargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuput�suSession.putcKs|jd|d||�S(u9Sends a PATCH request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        uPATCHudata(urequest(uselfuurludataukwargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyupatch�su
Session.patchcKs|jd||�S(u�Sends a DELETE request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        uDELETE(urequest(uselfuurlukwargs((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyudeletesuSession.deletec
Ks|jd|j�|jd|j�|jd|j�|jd|j�t|t�sjtd��n|jdd
�}|j
d�}|j
d�}|j
d�}|j
d�}|j
d�}|j}	|jd|j
�}
tj�}|
j||�}tj�||_td	|	||�}|jrdx-|jD]}
t|j|
j|
j�q>Wnt|j||j�|j||d|d|d|d|d|�}|r�d
d�|D�ng}|r�|jd|�|j�}||_n|s|jn|S(uSend a given PreparedRequest.ustreamuverifyucertuproxiesu#You can only send PreparedRequests.uallow_redirectsutimeoutuurluresponsecSsg|]}|�qS(((u.0uresp((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu
<listcomp>Is	u Session.send.<locals>.<listcomp>iT(u
setdefaultustreamuverifyucertuproxiesu
isinstanceuPreparedRequestu
ValueErrorupopuTrueugetuhooksuget_adapteruurludatetimeuutcnowusenduelapsedu
dispatch_hookuhistoryuextract_cookies_to_jarucookiesurequesturawuresolve_redirectsuinsertucontent(uselfurequestukwargsuallow_redirectsustreamutimeoutuverifyucertuproxiesuhooksuadapterustartururespugenuhistory((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyusendsH		 	
uSession.sendcCsMx6|jj�D]%\}}|j�j|�r|SqWtd|��dS(u>Returns the appropriate connnection adapter for the given URL.u*No connection adapters were found for '%s'N(uadaptersuitemsuloweru
startswithu
InvalidSchema(uselfuurluprefixuadapter((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuget_adapterXsuSession.get_adaptercCs(x!|jj�D]}|j�qWdS(u+Closes all adapters and as such the sessionN(uadaptersuvaluesuclose(uselfuv((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuclosebsu
Session.closecsW||j�<�fdd�|jD�}x'|D]}|jj|�|j|<q0WdS(ukRegisters a connection adapter to a prefix.

        Adapters are sorted in descending order by key length.cs.g|]$}t|�t��kr|�qS((ulen(u.0uk(uprefix(u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu
<listcomp>ms	u!Session.mount.<locals>.<listcomp>N(uadaptersupop(uselfuprefixuadapterukeys_to_moveukey((uprefixu6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyumountgs

u
Session.mountcs t�fdd��jD��S(Nc3s'|]}|t�|d�fVqdS(N(ugetattruNone(u.0uattr(uself(u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu	<genexpr>ssu'Session.__getstate__.<locals>.<genexpr>(udictu	__attrs__(uself((uselfu6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu__getstate__rsuSession.__getstate__cCs1x*|j�D]\}}t|||�q
WdS(N(uitemsusetattr(uselfustateuattruvalue((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu__setstate__usuSession.__setstate__NT(u__name__u
__module__u__qualname__u__doc__u	__attrs__u__init__u	__enter__u__exit__uprepare_requestuNoneuTrueurequestugetuoptionsuheadupostuputupatchudeleteusenduget_adapterucloseumountu__getstate__u__setstate__(u
__locals__((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyuSession�sD3(S





	G
uSessioncCst�S(u2Returns a :class:`Session` for context-management.(uSession(((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyusessionzsusession(4u__doc__uosucollectionsuMappingudatetimeuauthu_basic_auth_strucompatu	cookielibuOrderedDictuurljoinuurlparseubuiltin_strucookiesucookiejar_from_dictuextract_cookies_to_jaruRequestsCookieJaru
merge_cookiesumodelsuRequestuPreparedRequestuDEFAULT_REDIRECT_LIMITuhooksu
default_hooksu
dispatch_hookuutilsuto_key_val_listudefault_headersuto_native_stringu
exceptionsuTooManyRedirectsu
InvalidSchemauChunkedEncodingErroruContentDecodingErroru
structuresuCaseInsensitiveDictuadaptersuHTTPAdapterurequote_uriuget_environ_proxiesuget_netrc_authushould_bypass_proxiesuget_auth_from_urlustatus_codesucodesuREDIRECT_STATIu
merge_settingumerge_hooksuobjectuSessionRedirectMixinuSessionusession(((u6/tmp/pip-zej_zi-build/pip/_vendor/requests/sessions.pyu<module>
s*(""(!���python3.3/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-33.pyc000064400000013467151733566750024520 0ustar00�
7�Re@c@scddlmZiBd�d6d�d6d�d6d�d	6d�d6d�d6d�d6d�d6d�d6d�d6d�d 6d�d#6d�d(6d�d*6d�d,6d�d.6d�d26d�d46d�d76d�d96d�d;6d�d=6d�dA6d�dD6d�dG6d�dI6d�dL6d�dN6d�dQ6d�dT6d�dV6d�dZ6d�d]6d�d_6d�da6d�dc6d�df6d�dh6d�dj6d�dn6d�dr6d�dt6d�dx6d�d{6d�d}6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Zed�d��Zxieej��D]U\ZZxFeD]>Ze	eee�ej
d��se	eej�e�qqWqWd�S(�i(u
LookupDictucontinueiduswitching_protocolsieu
processingifu
checkpointiguuri_too_longurequest_uri_too_longizuokuokayuall_okuall_okayuall_goodu\o/u✓i�ucreatedi�uacceptedi�unon_authoritative_infounon_authoritative_informationi�u
no_contenti�u
reset_contentureseti�upartial_contentupartiali�umulti_statusumultiple_statusumulti_statiumultiple_statii�ualready_reportedi�uim_usedi�umultiple_choicesi,umoved_permanentlyumovedu\o-i-ufoundi.u	see_otheruotheri/unot_modifiedi0u	use_proxyi1uswitch_proxyi2utemporary_redirectutemporary_movedu	temporaryi3uresume_incompleteuresumei4ubad_requestubadi�uunauthorizedi�upayment_requiredupaymenti�u	forbiddeni�u	not_foundu-o-i�umethod_not_allowedunot_allowedi�unot_acceptablei�uproxy_authentication_requiredu
proxy_authuproxy_authenticationi�urequest_timeoututimeouti�uconflicti�ugonei�ulength_requiredi�uprecondition_failedupreconditioni�urequest_entity_too_largei�urequest_uri_too_largei�uunsupported_media_typeuunsupported_mediau
media_typei�urequested_range_not_satisfiableurequested_rangeurange_not_satisfiablei�uexpectation_failedi�uim_a_teapotuteapotu
i_am_a_teapoti�uunprocessable_entityu
unprocessablei�ulockedi�ufailed_dependencyu
dependencyi�uunordered_collectionu	unorderedi�uupgrade_requireduupgradei�uprecondition_requiredi�utoo_many_requestsutoo_manyi�uheader_fields_too_largeufields_too_largei�uno_responseunonei�u
retry_withuretryi�u$blocked_by_windows_parental_controlsuparental_controlsi�uunavailable_for_legal_reasonsu
legal_reasonsi�uclient_closed_requesti�uinternal_server_erroruserver_erroru/o\u✗i�unot_implementedi�ubad_gatewayi�uservice_unavailableuunavailablei�ugateway_timeouti�uhttp_version_not_supporteduhttp_versioni�uvariant_also_negotiatesi�uinsufficient_storagei�ubandwidth_limit_exceededu	bandwidthi�unot_extendedi�unameustatus_codesu\N(ucontinue(uswitching_protocols(u
processing(u
checkpoint(uuri_too_longurequest_uri_too_long(uokuokayuall_okuall_okayuall_goodu\o/u✓(ucreated(uaccepted(unon_authoritative_infounon_authoritative_information(u
no_content(u
reset_contentureset(upartial_contentupartial(umulti_statusumultiple_statusumulti_statiumultiple_stati(ualready_reported(uim_used(umultiple_choices(umoved_permanentlyumovedu\o-(ufound(u	see_otheruother(unot_modified(u	use_proxy(uswitch_proxy(utemporary_redirectutemporary_movedu	temporary(uresume_incompleteuresume(ubad_requestubad(uunauthorized(upayment_requiredupayment(u	forbidden(u	not_foundu-o-(umethod_not_allowedunot_allowed(unot_acceptable(uproxy_authentication_requiredu
proxy_authuproxy_authentication(urequest_timeoututimeout(uconflict(ugone(ulength_required(uprecondition_faileduprecondition(urequest_entity_too_large(urequest_uri_too_large(uunsupported_media_typeuunsupported_mediau
media_type(urequested_range_not_satisfiableurequested_rangeurange_not_satisfiable(uexpectation_failed(uim_a_teapotuteapotu
i_am_a_teapot(uunprocessable_entityu
unprocessable(ulocked(ufailed_dependencyu
dependency(uunordered_collectionu	unordered(uupgrade_requireduupgrade(uprecondition_requireduprecondition(utoo_many_requestsutoo_many(uheader_fields_too_largeufields_too_large(uno_responseunone(u
retry_withuretry(u$blocked_by_windows_parental_controlsuparental_controls(uunavailable_for_legal_reasonsu
legal_reasons(uclient_closed_request(uinternal_server_erroruserver_erroru/o\u✗(unot_implemented(ubad_gateway(uservice_unavailableuunavailable(ugateway_timeout(uhttp_version_not_supporteduhttp_version(uvariant_also_negotiates(uinsufficient_storage(ubandwidth_limit_exceededu	bandwidth(unot_extended(u
structuresu
LookupDictu_codesucodesulistuitemsucodeutitlesutitleusetattru
startswithuupper(((u:/tmp/pip-zej_zi-build/pip/_vendor/requests/status_codes.pyu<module>s�

python3.3/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-33.pyc000064400000060340151733566750023444 0ustar00�
7�Re.Ac
@s:dZddlZddlZddlmZmZmZmZyddlZeWne	k
rtddl
ZYnXGdd�de�ZGdd�de�Z
d	d
�Zdd�Zddd
d�ZGdd�de�ZGdd�dejej�Zdd�Zdd�Zdddd�Zdd�ZdS(u�
Compatibility code to be able to use `cookielib.CookieJar` with requests.

requests.utils imports from here, so be careful with imports.
iNi(u	cookielibuurlparseu
urlunparseuMorselcBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
ddd�Zdd�Z
dd�Zdd�Zedd��Zedd��Zedd��ZdS(uMockRequestu�Wraps a `requests.Request` to mimic a `urllib2.Request`.

    The code in `cookielib.CookieJar` expects this interface in order to correctly
    manage cookie policies, i.e., determine whether a cookie can be set, given the
    domains of the request and the cookie.

    The original request object is read-only. The client is responsible for collecting
    the new headers via `get_new_headers()` and interpreting them appropriately. You
    probably want `get_cookie_header`, defined below.
    cCs.||_i|_t|jj�j|_dS(N(u_ru_new_headersuurlparseuurluschemeutype(uselfurequest((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu__init__!s		uMockRequest.__init__cCs|jS(N(utype(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuget_type&suMockRequest.get_typecCst|jj�jS(N(uurlparseu_ruurlunetloc(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuget_host)suMockRequest.get_hostcCs
|j�S(N(uget_host(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuget_origin_req_host,suMockRequest.get_origin_req_hostcCsl|jjjd�s|jjS|jjd}t|jj�}t|j||j|j|j	|j
g�S(NuHost(u_ruheadersugetuurluurlparseu
urlunparseuschemeupathuparamsuqueryufragment(uselfuhostuparsed((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuget_full_url/s
uMockRequest.get_full_urlcCsdS(NT(uTrue(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuis_unverifiable=suMockRequest.is_unverifiablecCs||jjkp||jkS(N(u_ruheadersu_new_headers(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
has_header@suMockRequest.has_headercCs%|jjj||jj||��S(N(u_ruheadersugetu_new_headers(uselfunameudefault((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
get_headerCsuMockRequest.get_headercCstd��dS(uMcookielib has no legitimate use for this method; add it back if you find one.u=Cookie headers should be added with add_unredirected_header()N(uNotImplementedError(uselfukeyuval((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
add_headerFsuMockRequest.add_headercCs||j|<dS(N(u_new_headers(uselfunameuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuadd_unredirected_headerJsu#MockRequest.add_unredirected_headercCs|jS(N(u_new_headers(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuget_new_headersMsuMockRequest.get_new_headerscCs
|j�S(N(uis_unverifiable(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuunverifiablePsuMockRequest.unverifiablecCs
|j�S(N(uget_origin_req_host(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuorigin_req_hostTsuMockRequest.origin_req_hostcCs
|j�S(N(uget_host(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuhostXsuMockRequest.hostN(u__name__u
__module__u__qualname__u__doc__u__init__uget_typeuget_hostuget_origin_req_hostuget_full_urluis_unverifiableu
has_headeruNoneu
get_headeru
add_headeruadd_unredirected_headeruget_new_headersupropertyuunverifiableuorigin_req_hostuhost(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuMockRequests
uMockRequestcBs>|EeZdZdZdd�Zdd�Zdd�ZdS(	uMockResponseu�Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.

    ...what? Basically, expose the parsed HTTP headers from the server response
    the way `cookielib` expects to see them.
    cCs
||_dS(u�Make a MockResponse for `cookielib` to read.

        :param headers: a httplib.HTTPMessage or analogous carrying the headers
        N(u_headers(uselfuheaders((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu__init__dsuMockResponse.__init__cCs|jS(N(u_headers(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuinfoksuMockResponse.infocCs|jj|�dS(N(u_headersu
getheaders(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
getheadersnsuMockResponse.getheadersN(u__name__u
__module__u__qualname__u__doc__u__init__uinfou
getheaders(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuMockResponse]suMockResponsecCsNt|d�o|jsdSt|�}t|jj�}|j||�dS(u�Extract the cookies from the response into a CookieJar.

    :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)
    :param request: our own requests.Request object
    :param response: urllib3.HTTPResponse object
    u_original_responseN(uhasattru_original_responseuMockRequestuMockResponseumsguextract_cookies(ujarurequesturesponseurequres((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuextract_cookies_to_jarrs	uextract_cookies_to_jarcCs,t|�}|j|�|j�jd�S(uOProduce an appropriate Cookie header string to be sent with `request`, or None.uCookie(uMockRequestuadd_cookie_headeruget_new_headersuget(ujarurequestur((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuget_cookie_header�s
uget_cookie_headercCs�g}x{|D]s}|j|kr
|dks=||jkr�|dksX||jkr}|j|j|j|jf�q}q�q
q
Wx*|D]"\}}}|j|||�q�WdS(ukUnsets a cookie by name, by default over all domains and paths.

    Wraps CookieJar.clear(), is O(n).
    N(unameuNoneudomainupathuappenduclear(u	cookiejarunameudomainupathu
clearablesucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuremove_cookie_by_name�s
,uremove_cookie_by_namecBs|EeZdZdZdS(uCookieConflictErroru�There are two cookies that meet the criteria specified in the cookie jar.
    Use .get and .set and include domain and path args in order to be more specific.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuCookieConflictError�suCookieConflictErrorcsI|EeZdZdZd.d.d.dd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zd.d.dd�Zdd�Zdd�Zdd�Z�fd d!�Z�fd"d#�Zd.d.d$d%�Zd.d.d&d'�Zd(d)�Zd*d+�Zd,d-�Z�S(/uRequestsCookieJaru�Compatibility class; is a cookielib.CookieJar, but exposes a dict interface.

    This is the CookieJar we create by default for requests and sessions that
    don't specify one, since some clients may expect response.cookies and
    session.cookies to support dict operations.

    Don't use the dict interface internally; it's just for compatibility with
    with external client code. All `requests` code should work out of the box
    with externally provided instances of CookieJar, e.g., LWPCookieJar and
    FileCookieJar.

    Caution: dictionary operations that are normally O(1) may be O(n).

    Unlike a regular CookieJar, this class is pickleable.
    cCs4y|j|||�SWntk
r/|SYnXdS(u�Dict-like get() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains. Caution: operation is O(n), not O(1).N(u_find_no_duplicatesuKeyError(uselfunameudefaultudomainupath((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuget�s
uRequestsCookieJar.getcKs||dkr;t||d|jd�d|jd��dSt|t�rYt|�}nt|||�}|j|�|S(u�Dict-like set() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains.udomainupathN(uNoneuremove_cookie_by_nameugetu
isinstanceuMorselumorsel_to_cookieu
create_cookieu
set_cookie(uselfunameuvalueukwargsuc((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuset�s+
uRequestsCookieJar.setccs#xt|�D]}|jVq
WdS(uyDict-like iterkeys() that returns an iterator of names of cookies from the jar.
        See itervalues() and iteritems().N(uiteruname(uselfucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuiterkeys�suRequestsCookieJar.iterkeyscCst|j��S(uhDict-like keys() that returns a list of names of cookies from the jar.
        See values() and items().(ulistuiterkeys(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyukeys�suRequestsCookieJar.keysccs#xt|�D]}|jVq
WdS(uzDict-like itervalues() that returns an iterator of values of cookies from the jar.
        See iterkeys() and iteritems().N(uiteruvalue(uselfucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
itervalues�suRequestsCookieJar.itervaluescCst|j��S(uiDict-like values() that returns a list of values of cookies from the jar.
        See keys() and items().(ulistu
itervalues(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuvalues�suRequestsCookieJar.valuesccs,x%t|�D]}|j|jfVq
WdS(uzDict-like iteritems() that returns an iterator of name-value tuples from the jar.
        See iterkeys() and itervalues().N(uiterunameuvalue(uselfucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu	iteritems�suRequestsCookieJar.iteritemscCst|j��S(u�Dict-like items() that returns a list of name-value tuples from the jar.
        See keys() and values(). Allows client-code to call "dict(RequestsCookieJar)
        and get a vanilla python dict of key value pairs.(ulistu	iteritems(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuitems�suRequestsCookieJar.itemscCsCg}x6t|�D](}|j|kr|j|j�qqW|S(u2Utility method to list all the domains in the jar.(uiterudomainuappend(uselfudomainsucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyulist_domains�s
uRequestsCookieJar.list_domainscCsCg}x6t|�D](}|j|kr|j|j�qqW|S(u0Utility method to list all the paths in the jar.(uiterupathuappend(uselfupathsucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
list_paths�s
uRequestsCookieJar.list_pathscCsSg}xFt|�D]8}|jdk	r;|j|kr;dS|j|j�qWdS(uWReturns True if there are multiple domains in the jar.
        Returns False otherwise.NTF(uiterudomainuNoneuTrueuappenduFalse(uselfudomainsucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyumultiple_domains�su"RequestsCookieJar.multiple_domainscCsji}x]t|�D]O}|dks4|j|kr|dksO|j|kr|j||j<qqW|S(u�Takes as an argument an optional domain and path and returns a plain old
        Python dict of name-value pairs of cookies that meet the requirements.N(uiteruNoneudomainupathuvalueuname(uselfudomainupathu
dictionaryucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuget_dicts'uRequestsCookieJar.get_dictcCs
|j|�S(u�Dict-like __getitem__() for compatibility with client code. Throws exception
        if there are more than one cookie with name. In that case, use the more
        explicit get() method instead. Caution: operation is O(n), not O(1).(u_find_no_duplicates(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu__getitem__suRequestsCookieJar.__getitem__cCs|j||�dS(u�Dict-like __setitem__ for compatibility with client code. Throws exception
        if there is already a cookie of that name in the jar. In that case, use the more
        explicit set() method instead.N(uset(uselfunameuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu__setitem__suRequestsCookieJar.__setitem__cCst||�dS(uSDeletes a cookie given a name. Wraps cookielib.CookieJar's remove_cookie_by_name().N(uremove_cookie_by_name(uselfuname((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu__delitem__suRequestsCookieJar.__delitem__csmt|jd�rQ|jjd�rQ|jjd�rQ|jjdd�|_ntt|�j|||�S(Nu
startswithu"u\"u(uhasattruvalueu
startswithuendswithureplaceusuperuRequestsCookieJaru
set_cookie(uselfucookieuargsukwargs(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
set_cookie!s6uRequestsCookieJar.set_cookiecsMt|tj�r3x4|D]}|j|�qWntt|�j|�dS(uAUpdates this jar with cookies from another CookieJar or dict-likeN(u
isinstanceu	cookielibu	CookieJaru
set_cookieusuperuRequestsCookieJaruupdate(uselfuotherucookie(u	__class__(u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuupdate&s
uRequestsCookieJar.updatecCs�xft|�D]X}|j|kr
|dks=|j|kre|dksX|j|krb|jSqeq
q
Wtd|||f��dS(u6Requests uses this method internally to get cookie values. Takes as args name
        and optional domain and path. Returns a cookie.value. If there are conflicting cookies,
        _find arbitrarily chooses one. See _find_no_duplicates if you want an exception thrown
        if there are conflicting cookies.uname=%r, domain=%r, path=%rN(uiterunameuNoneudomainupathuvalueuKeyError(uselfunameudomainupathucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu_find.suRequestsCookieJar._findcCs�d}x�t|�D]|}|j|kr|dksC|j|kr�|dks^|j|kr�|dk	r}td|��n|j}q�q�qqW|r�|Std|||f��dS(uA__get_item__ and get call _find_no_duplicates -- never used in Requests internally.
        Takes as args name and optional domain and path. Returns a cookie.value.
        Throws KeyError if cookie is not found and CookieConflictError if there are
        multiple cookies that match name and optionally domain and path.u(There are multiple cookies with name, %runame=%r, domain=%r, path=%rN(uNoneuiterunameudomainupathuCookieConflictErroruvalueuKeyError(uselfunameudomainupathutoReturnucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu_find_no_duplicates;su%RequestsCookieJar._find_no_duplicatescCs |jj�}|jd�|S(u4Unlike a normal CookieJar, this class is pickleable.u
_cookies_lock(u__dict__ucopyupop(uselfustate((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu__getstate__Ms
uRequestsCookieJar.__getstate__cCs5|jj|�d|jkr1tj�|_ndS(u4Unlike a normal CookieJar, this class is pickleable.u
_cookies_lockN(u__dict__uupdateu	threadinguRLocku
_cookies_lock(uselfustate((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu__setstate__TsuRequestsCookieJar.__setstate__cCst�}|j|�|S(u(Return a copy of this RequestsCookieJar.(uRequestsCookieJaruupdate(uselfunew_cj((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyucopyZs	
uRequestsCookieJar.copyN(u__name__u
__module__u__qualname__u__doc__uNoneugetusetuiterkeysukeysu
itervaluesuvaluesu	iteritemsuitemsulist_domainsu
list_pathsumultiple_domainsuget_dictu__getitem__u__setitem__u__delitem__u
set_cookieuupdateu_findu_find_no_duplicatesu__getstate__u__setstate__ucopy(u
__locals__((u	__class__u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyuRequestsCookieJar�s.	


uRequestsCookieJarcKstddd|d|dddddd	d
dddddd
ddddidd6dd�
}t|�t|�}|r�d}t|t|���n|j|�t|d�|d<t|d�|d<|dj	d�|d<t|d�|d<t
j|�S(u�Make a cookie from underspecified parameters.

    By default, the pair of `name` and `value` will be set for the domain ''
    and sent on every request (this is sometimes called a "supercookie").
    uversioniunameuvalueuportudomainuupathu/usecureuexpiresudiscarducommentucomment_urlurestuHttpOnlyurfc2109u4create_cookie() got unexpected keyword arguments: %suport_specifiedudomain_specifiedu.udomain_initial_dotupath_specifiedNFT(udictuNoneuFalseuTrueusetu	TypeErrorulistuupdateuboolu
startswithu	cookielibuCookie(unameuvalueukwargsuresultubadargsuerr((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
create_cookieas0
	
u
create_cookiecCs�d}|dr'tj�|d}n9|dr`d}tjtj|d|��tj}ntd|ddt|d�ddd|dd|d|jd	|d	d
ddi|dd
6dddt|d�d|j	d|dp�d�
S(uBConvert a Morsel object into a Cookie containing the one k/v pair.umax-ageuexpiresu%a, %d-%b-%Y %H:%M:%S GMTucommentucomment_urludiscardudomainunameupathuporturestuhttponlyuHttpOnlyurfc2109usecureuvalueuversioniNF(
uNoneutimeumktimeustrptimeutimezoneu
create_cookieubooluFalseukeyuvalue(umorseluexpiresu
time_template((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyumorsel_to_cookie�s*

#

	
	umorsel_to_cookiecCs~|dkrt�}n|dk	rzdd�|D�}x@|D]5}|sV||kr>|jt|||��q>q>Wn|S(u-Returns a CookieJar from a key/value dictionary.

    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :param cookiejar: (optional) A cookiejar to add the cookies to.
    :param overwrite: (optional) If False, will not replace cookies
        already in the jar with new ones.
    cSsg|]}|j�qS((uname(u.0ucookie((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
<listcomp>�s	u'cookiejar_from_dict.<locals>.<listcomp>N(uNoneuRequestsCookieJaru
set_cookieu
create_cookie(ucookie_dictu	cookiejaru	overwriteunames_from_jaruname((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyucookiejar_from_dict�s
$ucookiejar_from_dictcCs�t|tj�s!td��nt|t�rKt|d|dd�}nYt|tj�r�y|j|�Wq�tk
r�x|D]}|j	|�q�WYq�Xn|S(u�Add cookies to cookiejar and returns a merged CookieJar.

    :param cookiejar: CookieJar object to add the cookies to.
    :param cookies: Dictionary or CookieJar object to be added.
    u!You can only merge into CookieJaru	cookiejaru	overwriteF(
u
isinstanceu	cookielibu	CookieJaru
ValueErrorudictucookiejar_from_dictuFalseuupdateuAttributeErroru
set_cookie(u	cookiejarucookiesu
cookie_in_jar((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu
merge_cookies�s

u
merge_cookiesT(u__doc__utimeucollectionsucompatu	cookielibuurlparseu
urlunparseuMorselu	threadinguImportErrorudummy_threadinguobjectuMockRequestuMockResponseuextract_cookies_to_jaruget_cookie_headeruNoneuremove_cookie_by_nameuRuntimeErroruCookieConflictErroru	CookieJaruMutableMappinguRequestsCookieJaru
create_cookieumorsel_to_cookieuTrueucookiejar_from_dictu
merge_cookies(((u5/tmp/pip-zej_zi-build/pip/_vendor/requests/cookies.pyu<module>s&"
H�#python3.3/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-33.pyc000064400000001504151733566750023125 0ustar00�
7�Re c@s>dZddlZdd�Zedkr:ee��ndS(u
certs.py
~~~~~~~~

This module returns the preferred default CA certificate bundle.

If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.
iNcCstjjtjjt�d�S(u(Return the preferred certificate bundle.u
cacert.pem(uosupathujoinudirnameu__file__(((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/certs.pyuwheresuwhereu__main__(u__doc__uos.pathuosuwhereu__name__uprint(((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/certs.pyu<module>
spython3.3/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-33.pyc000064400000053672151733566750023162 0ustar00�
7�ReNc@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddlm
Z
ddlmZddlmZmZmZmZmZmZmZmZmZmZmZddlmZmZdd	lm Z dd
l!m"Z"efZ#dRZ$e
j%�Z&d
d�Z'dd�Z(dd�Z)dd�Z*dd�Z+dd�Z,dd�Z-dd�Z.dSdd�Z0dd �Z1d!d"�Z2d#d$�Z3d%d&�Z4d'd(�Z5d)d*�Z6d+d,�Z7e8d-d.�Z9d/d0�Z:d1d2�Z;d3d4�Z<d5d6�Z=d7d8�Z>d9d:�Z?d;d<�Z@d=d>�ZAd?d@dA�ZBdBdC�ZCdDdE�ZDdFjEdG�ZFeFdHZGeFdIZHdJdK�ZIdLdM�ZJdNdO�ZKdGdPdQ�ZLdS(Tu�
requests.utils
~~~~~~~~~~~~~~

This module provides utility functions that are used within Requests
that are also useful for external consumption.

iNi(u__version__(ucerts(uparse_http_list(uquoteuurlparseubytesustruOrderedDictuunquoteuis_py2ubuiltin_stru
getproxiesuproxy_bypassu
urlunparse(uRequestsCookieJarucookiejar_from_dict(uCaseInsensitiveDict(u
InvalidURLu.netrcu_netrccCs"t|d�r|j�}n|S(u/Returns an internal sequence dictionary update.uitems(uhasattruitems(ud((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyudict_to_sequence'sudict_to_sequencecCs�t|d�rt|�St|d�r/|jSt|d�ryy|j�}Wntjk
reYqyXtj|�jSnt|d�r�t|j��SdS(Nu__len__ulenufilenougetvalue(	uhasattrulenufilenouiouUnsupportedOperationuosufstatust_sizeugetvalue(uoufileno((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyu	super_len0s
u	super_lenc
Cs8yddlm}m}d}xbtD]Z}ytjjdj|��}Wntk
rcdSYnXtjj	|�r&|}Pq&q&W|dkr�dSt
|�}|jjd�d}yG||�j
|�}|r�|dr�dnd}	||	|dfSWn|tfk
rYnXWnttfk
r3YnXdS(u;Returns the Requests tuple auth for a given url from netrc.i(unetrcuNetrcParseErroru~/{0}Nu:ii(unetrcuNetrcParseErroruNoneuNETRC_FILESuosupathu
expanduseruformatuKeyErroruexistsuurlparseunetlocusplituauthenticatorsuIOErroruImportErroruAttributeError(
uurlunetrcuNetrcParseErroru
netrc_pathufulocuriuhostu_netrculogin_i((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuget_netrc_authDs0

		uget_netrc_authcCsLt|dd�}|rH|ddkrH|ddkrHtjj|�SdS(u0Tries to guess the filename of the given object.unameiu<iu>Ni����(ugetattruNoneuosupathubasename(uobjuname((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuguess_filenamers&uguess_filenamecCsD|dkrdSt|ttttf�r:td��nt|�S(u�Take an object and test to see if it can be represented as a
    dictionary. Unless it can not be represented as such, return an
    OrderedDict, e.g.,

    ::

        >>> from_key_val_list([('key', 'val')])
        OrderedDict([('key', 'val')])
        >>> from_key_val_list('string')
        ValueError: need more than 1 value to unpack
        >>> from_key_val_list({'key': 'val'})
        OrderedDict([('key', 'val')])
    u+cannot encode objects that are not 2-tuplesN(uNoneu
isinstanceustrubytesubooluintu
ValueErroruOrderedDict(uvalue((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyufrom_key_val_listys
ufrom_key_val_listcCse|dkrdSt|ttttf�r:td��nt|tj�r[|j	�}nt
|�S(uzTake an object and test to see if it can be represented as a
    dictionary. If it can be, return a list of tuples, e.g.,

    ::

        >>> to_key_val_list([('key', 'val')])
        [('key', 'val')]
        >>> to_key_val_list({'key': 'val'})
        [('key', 'val')]
        >>> to_key_val_list('string')
        ValueError: cannot encode objects that are not 2-tuples.
    u+cannot encode objects that are not 2-tuplesN(uNoneu
isinstanceustrubytesubooluintu
ValueErrorucollectionsuMappinguitemsulist(uvalue((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuto_key_val_list�s
uto_key_val_listcCswg}xjt|�D]\}|dd�|dd�koDdknrbt|dd��}n|j|�qW|S(u�Parse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Quotes are removed automatically after parsing.

    It basically works like :func:`parse_set_header` just that items
    may appear multiple times and case sensitivity is preserved.

    The return value is a standard :class:`list`:

    >>> parse_list_header('token, "quoted value"')
    ['token', 'quoted value']

    To create a header from the :class:`list` again, use the
    :func:`dump_header` function.

    :param value: a string with a list header.
    :return: :class:`list`
    Niu"i����i����(u_parse_list_headeruunquote_header_valueuappend(uvalueuresultuitem((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuparse_list_header�s0uparse_list_headercCs�i}x�t|�D]�}d|kr5d||<qn|jdd�\}}|dd�|dd�koxdknr�t|dd��}n|||<qW|S(uMParse lists of key, value pairs as described by RFC 2068 Section 2 and
    convert them into a python dict:

    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
    >>> type(d) is dict
    True
    >>> sorted(d.items())
    [('bar', 'as well'), ('foo', 'is a fish')]

    If there is no value for a key it will be `None`:

    >>> parse_dict_header('key_without_value')
    {'key_without_value': None}

    To create a header from the :class:`dict` again, use the
    :func:`dump_header` function.

    :param value: a string with a dict header.
    :return: :class:`dict`
    u=iNu"i����i����(u_parse_list_headeruNoneusplituunquote_header_value(uvalueuresultuitemuname((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuparse_dict_header�s
0uparse_dict_headercCsz|rv|d|d	ko%dknrv|dd
�}|sW|dd�dkrv|jdd�jdd�Sn|S(u�Unquotes a header value.  (Reversal of :func:`quote_header_value`).
    This does not use the real unquoting but what browsers are actually
    using for quoting.

    :param value: the header value to unquote.
    iiu"Niu\\u\u\"i����i����(ureplace(uvalueuis_filename((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuunquote_header_value�s
*uunquote_header_valuecCs+i}x|D]}|j||j<q
W|S(uoReturns a key/value dictionary from a CookieJar.

    :param cj: CookieJar object to extract cookies from.
    (uvalueuname(ucjucookie_dictucookie((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyudict_from_cookiejars
udict_from_cookiejarcCst|�}|j|�|S(u�Returns a CookieJar from a key/value dictionary.

    :param cj: CookieJar to insert cookies into.
    :param cookie_dict: Dict of key/values to insert into CookieJar.
    (ucookiejar_from_dictuupdate(ucjucookie_dictucj2((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuadd_dict_to_cookiejars
uadd_dict_to_cookiejarcCsftjddtj�}tjddtj�}tjd�}|j|�|j|�|j|�S(ulReturns encodings from given content string.

    :param content: bytestring to extract encodings from.
    u!<meta.*?charset=["\']*(.+?)["\'>]uflagsu+<meta.*?content=["\']*;?charset=(.+?)["\'>]u$^<\?xml.*?encoding=["\']*(.+?)["\'>](ureucompileuIufindall(ucontentu
charset_reu	pragma_reuxml_re((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuget_encodings_from_contents
uget_encodings_from_contentcCs_|jd�}|sdStj|�\}}d|krK|djd�Sd|kr[dSdS(umReturns encodings from given HTTP Header Dict.

    :param headers: dictionary to extract encoding from.
    ucontent-typeucharsetu'"utextu
ISO-8859-1N(ugetuNoneucgiuparse_headerustrip(uheadersucontent_typeuparams((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuget_encoding_from_headers,suget_encoding_from_headersccs�|jdkr)x|D]}|VqWdStj|j�dd�}x+|D]#}|j|�}|rK|VqKqKW|jddd�}|r�|VndS(uStream decodes a iterator.NuerrorsureplacesufinalT(uencodinguNoneucodecsugetincrementaldecoderudecodeuTrue(uiteratoruruitemudecoderuchunkurv((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyustream_decode_response_unicode@s
	
ustream_decode_response_unicodeccs@d}x3|t|�kr;||||�V||7}q	WdS(u Iterate over slices of a string.iN(ulen(ustringuslice_lengthupos((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuiter_slicesRsuiter_slicescCs�g}t|j�}|rTyt|j|�SWqTtk
rP|j|�YqTXnyt|j|dd�SWntk
r�|jSYnXdS(uReturns the requested content back in unicode.

    :param r: Response object to get unicode content from.

    Tried:

    1. charset from content-type

    2. every encodings from ``<meta ... charset=XXX>``

    3. fall back and replace all unicode characters

    uerrorsureplaceN(uget_encoding_from_headersuheadersustrucontentuUnicodeErroruappendu	TypeError(urutried_encodingsuencoding((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuget_unicode_from_responseZs

uget_unicode_from_responseu4ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzu0123456789-._~cCs�|jd�}x�tdt|��D]�}||dd�}t|�dkr�|j�r�ytt|d��}Wn"tk
r�td|��YnX|tkr�|||dd�||<q�d||||<q%d||||<q%Wdj	|�S(	u�Un-escape any percent-escape sequences in a URI that are unreserved
    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
    u%iiiiu%Invalid percent-escape sequence: '%s'Nu(
uspliturangeulenuisalnumuchruintu
ValueErroru
InvalidURLuUNRESERVED_SETujoin(uuriupartsuiuhuc((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuunquote_unreserved�s
uunquote_unreservedcCstt|�dd�S(u�Re-quote the given URI.

    This function passes the given URI through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.
    usafeu!#$%&'()*+,/:;=?@[]~(uquoteuunquote_unreserved(uuri((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyurequote_uri�s	urequote_uricCs�tjdtj|��d}|jd�\}}tjdtjtt|����d}tjdtj|��d|@}||@||@kS(u�
    This function allows you to check if on IP belongs to a network subnet
    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
    u=Liu/(ustructuunpackusocketu	inet_atonusplitudotted_netmaskuint(uipunetuipaddrunetaddrubitsunetmaskunetwork((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuaddress_in_network�s
+#uaddress_in_networkcCs/ddd|>dA}tjtjd|��S(ut
    Converts mask from /xx format to xxx.xxx.xxx.xxx
    Example: if mask is 24 function returns 255.255.255.0
    l��ii u>I(usocketu	inet_ntoaustructupack(umaskubits((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyudotted_netmask�sudotted_netmaskcCs1ytj|�Wntjk
r,dSYnXdS(NFT(usocketu	inet_atonuerroruFalseuTrue(u	string_ip((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuis_ipv4_address�s
	uis_ipv4_addresscCs�|jd�dkr�yt|jd�d�}Wntk
rJdSYnX|dksc|dkrgdSytj|jd�d�Wq�tjk
r�dSYq�XndSdS(u9Very simple check of the cidr format in no_proxy variableu/ii iFT(	ucountuintusplitu
ValueErroruFalseusocketu	inet_atonuerroruTrue(ustring_networkumask((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyu
is_valid_cidr�s
	u
is_valid_cidrcCs"dd�}|d�}t|�j}|r�|jdd�jd�}|jd�d}t|�r�xs|D](}t|�rnt||�r�d	SqnqnWq�x@|D]5}|j|�s�|jd�dj|�r�d	Sq�Wnyt	|�}Wn!t
tjfk
rd
}YnX|rd	Sd
S(u:
    Returns whether we should bypass proxies or not.
    cSs(tjj|�p'tjj|j��S(N(uosuenvironugetuupper(uk((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyu<lambda>�su'should_bypass_proxies.<locals>.<lambda>uno_proxyu uu,u:iTF(uurlparseunetlocureplaceusplituis_ipv4_addressu
is_valid_cidruaddress_in_networkuTrueuendswithuproxy_bypassu	TypeErrorusocketugaierroruFalse(uurlu	get_proxyuno_proxyunetlocuipuproxy_ipuhostubypass((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyushould_bypass_proxies�s*

+ushould_bypass_proxiescCst|�riSt�SdS(u%Return a dict of environment proxies.N(ushould_bypass_proxiesu
getproxies(uurl((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuget_environ_proxiessuget_environ_proxiesupython-requestscCs8tj�}|dkr'tj�}n�|dkr�dtjjtjjtjjf}tjjdkr�dj	|tjjg�}q�n<|dkr�tj�}n!|dkr�tj�}nd}ytj
�}tj�}Wntk
rd}d}YnXd	j	d
|t
fd
||fd
||fg�S(u4Return a string representing the default user agent.uCPythonuPyPyu%s.%s.%sufinaluuJythonu
IronPythonuUnknownu u%s/%s(uplatformupython_implementationupython_versionusysupypy_version_infoumajoruminorumicroureleaselevelujoinusystemureleaseuIOErroru__version__(unameu_implementationu_implementation_versionup_systemu	p_release((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyudefault_user_agent
s.	!

udefault_user_agentcCs+tit�d6djd�d6dd6�S(	Nu
User-Agentu, ugzipudeflateuAccept-Encodingu*/*uAccept(ugzipudeflate(uCaseInsensitiveDictudefault_user_agentujoin(((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyudefault_headers)s
udefault_headersc	Cs�g}d}x�|jd�D]�}y|jdd�\}}Wntk
r_|d}}YnXi}|jd�|d<xb|jd�D]Q}y|jd�\}}Wntk
r�PYnX|j|�||j|�<q�W|j|�qW|S(	u�Return a dict of parsed link headers proxies.

    i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

    u '"u,u;iuu<> '"uurlu=(usplitu
ValueErrorustripuappend(	uvalueulinksu
replace_charsuvaluurluparamsulinkuparamukey((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuparse_header_links1s"

 uparse_header_linksuuasciiiicCs|dd�}|tjtjfkr,dS|dd�tjkrIdS|dd�tjtjfkrodS|jt�}|dkr�dS|dkr�|ddd�tkr�d	S|d
dd�tkr�dSn|dkr|dd�t	kr�dS|d
d�t	krd
SndS(Niuutf-32iu	utf-8-sigiuutf-16iuutf-8u	utf-16-beiu	utf-16-leu	utf-32-beu	utf-32-le(ucodecsuBOM_UTF32_LEuBOM32_BEuBOM_UTF8uBOM_UTF16_LEuBOM_UTF16_BEucountu_nullu_null2u_null3uNone(udatausampleu	nullcount((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuguess_json_utfYs*"uguess_json_utfcCsSt||�\}}}}}}|s7||}}nt||||||f�S(u�Given a URL that may or may not have a scheme, prepend the given scheme.
    Does not replace a present scheme with the one provided as an argument.(uurlparseu
urlunparse(uurlu
new_schemeuschemeunetlocupathuparamsuqueryufragment((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuprepend_scheme_if_neededvs!uprepend_scheme_if_neededcCsSt|�}y"t|j�t|j�f}Wnttfk
rNd}YnX|S(u_Given a url with authentication components, extract them into a tuple of
    username,password.u(uu(uurlparseuunquoteuusernameupassworduAttributeErroru	TypeError(uurluparseduauth((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuget_auth_from_url�s"uget_auth_from_urlcCsId}t|t�r|}n'tr6|j|�}n|j|�}|S(u�
    Given a string object, regardless of type, returns a representation of that
    string in the native string type, encoding and decoding where necessary.
    This assumes ASCII unless told otherwise.
    N(uNoneu
isinstanceubuiltin_struis_py2uencodeudecode(ustringuencodinguout((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyuto_native_string�s	uto_native_string(u.netrcu_netrcF(Mu__doc__ucgiucodecsucollectionsuiouosuplatformureusysusocketustructuu__version__ucertsucompatuparse_http_listu_parse_list_headeruquoteuurlparseubytesustruOrderedDictuunquoteuis_py2ubuiltin_stru
getproxiesuproxy_bypassu
urlunparseucookiesuRequestsCookieJarucookiejar_from_dictu
structuresuCaseInsensitiveDictu
exceptionsu
InvalidURLu_hush_pyflakesuNETRC_FILESuwhereuDEFAULT_CA_BUNDLE_PATHudict_to_sequenceu	super_lenuget_netrc_authuguess_filenameufrom_key_val_listuto_key_val_listuparse_list_headeruparse_dict_headeruFalseuunquote_header_valueudict_from_cookiejaruadd_dict_to_cookiejaruget_encodings_from_contentuget_encoding_from_headersustream_decode_response_unicodeuiter_slicesuget_unicode_from_responseu	frozensetuUNRESERVED_SETuunquote_unreservedurequote_uriuaddress_in_networkudotted_netmaskuis_ipv4_addressu
is_valid_cidrushould_bypass_proxiesuget_environ_proxiesudefault_user_agentudefault_headersuparse_header_linksuencodeu_nullu_null2u_null3uguess_json_utfuprepend_scheme_if_neededuget_auth_from_urluto_native_string(((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/utils.pyu<module>
srL		.""

	-#


python3.3/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-33.pyc000064400000002200151733566750023122 0ustar00�
7�Re4c@s+dZdgZdd�Zdd�ZdS(u�
requests.hooks
~~~~~~~~~~~~~~

This module provides the capabilities for the Requests hooks system.

Available hooks:

``response``:
    The response generated from a Request.

uresponsecCs%i}xtD]}g||<q
W|S(N(uHOOKS(uhooksuevent((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/hooks.pyu
default_hookss
u
default_hookscKs�|pt�}||kr}|j|�}t|d�rE|g}nx5|D]*}|||�}|dk	rL|}qLqLWn|S(u6Dispatches a hook dictionary on a given piece of data.u__call__N(udictugetuhasattruNone(ukeyuhooksu	hook_dataukwargsuhooku
_hook_data((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/hooks.pyu
dispatch_hooks
u
dispatch_hookN(u__doc__uHOOKSu
default_hooksu
dispatch_hook(((u3/tmp/pip-zej_zi-build/pip/_vendor/requests/hooks.pyu<module>s		python3.3/site-packages/pip/_vendor/requests/status_codes.py000064400000006100151733566750020221 0ustar00# -*- coding: utf-8 -*-

from .structures import LookupDict

_codes = {

    # Informational.
    100: ('continue',),
    101: ('switching_protocols',),
    102: ('processing',),
    103: ('checkpoint',),
    122: ('uri_too_long', 'request_uri_too_long'),
    200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/', '✓'),
    201: ('created',),
    202: ('accepted',),
    203: ('non_authoritative_info', 'non_authoritative_information'),
    204: ('no_content',),
    205: ('reset_content', 'reset'),
    206: ('partial_content', 'partial'),
    207: ('multi_status', 'multiple_status', 'multi_stati', 'multiple_stati'),
    208: ('already_reported',),
    226: ('im_used',),

    # Redirection.
    300: ('multiple_choices',),
    301: ('moved_permanently', 'moved', '\\o-'),
    302: ('found',),
    303: ('see_other', 'other'),
    304: ('not_modified',),
    305: ('use_proxy',),
    306: ('switch_proxy',),
    307: ('temporary_redirect', 'temporary_moved', 'temporary'),
    308: ('resume_incomplete', 'resume'),

    # Client Error.
    400: ('bad_request', 'bad'),
    401: ('unauthorized',),
    402: ('payment_required', 'payment'),
    403: ('forbidden',),
    404: ('not_found', '-o-'),
    405: ('method_not_allowed', 'not_allowed'),
    406: ('not_acceptable',),
    407: ('proxy_authentication_required', 'proxy_auth', 'proxy_authentication'),
    408: ('request_timeout', 'timeout'),
    409: ('conflict',),
    410: ('gone',),
    411: ('length_required',),
    412: ('precondition_failed', 'precondition'),
    413: ('request_entity_too_large',),
    414: ('request_uri_too_large',),
    415: ('unsupported_media_type', 'unsupported_media', 'media_type'),
    416: ('requested_range_not_satisfiable', 'requested_range', 'range_not_satisfiable'),
    417: ('expectation_failed',),
    418: ('im_a_teapot', 'teapot', 'i_am_a_teapot'),
    422: ('unprocessable_entity', 'unprocessable'),
    423: ('locked',),
    424: ('failed_dependency', 'dependency'),
    425: ('unordered_collection', 'unordered'),
    426: ('upgrade_required', 'upgrade'),
    428: ('precondition_required', 'precondition'),
    429: ('too_many_requests', 'too_many'),
    431: ('header_fields_too_large', 'fields_too_large'),
    444: ('no_response', 'none'),
    449: ('retry_with', 'retry'),
    450: ('blocked_by_windows_parental_controls', 'parental_controls'),
    451: ('unavailable_for_legal_reasons', 'legal_reasons'),
    499: ('client_closed_request',),

    # Server Error.
    500: ('internal_server_error', 'server_error', '/o\\', '✗'),
    501: ('not_implemented',),
    502: ('bad_gateway',),
    503: ('service_unavailable', 'unavailable'),
    504: ('gateway_timeout',),
    505: ('http_version_not_supported', 'http_version'),
    506: ('variant_also_negotiates',),
    507: ('insufficient_storage',),
    509: ('bandwidth_limit_exceeded', 'bandwidth'),
    510: ('not_extended',),
}

codes = LookupDict(name='status_codes')

for (code, titles) in list(_codes.items()):
    for title in titles:
        setattr(codes, title, code)
        if not title.startswith('\\'):
            setattr(codes, title.upper(), code)
python3.3/site-packages/pip/_vendor/requests/structures.py000064400000006725151733566750017761 0ustar00# -*- coding: utf-8 -*-

"""
requests.structures
~~~~~~~~~~~~~~~~~~~

Data structures that power Requests.

"""

import os
import collections
from itertools import islice


class IteratorProxy(object):
    """docstring for IteratorProxy"""
    def __init__(self, i):
        self.i = i
        # self.i = chain.from_iterable(i)

    def __iter__(self):
        return self.i

    def __len__(self):
        if hasattr(self.i, '__len__'):
            return len(self.i)
        if hasattr(self.i, 'len'):
            return self.i.len
        if hasattr(self.i, 'fileno'):
            return os.fstat(self.i.fileno()).st_size

    def read(self, n):
        return "".join(islice(self.i, None, n))


class CaseInsensitiveDict(collections.MutableMapping):
    """
    A case-insensitive ``dict``-like object.

    Implements all methods and operations of
    ``collections.MutableMapping`` as well as dict's ``copy``. Also
    provides ``lower_items``.

    All keys are expected to be strings. The structure remembers the
    case of the last key to be set, and ``iter(instance)``,
    ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()``
    will contain case-sensitive keys. However, querying and contains
    testing is case insensitive:

        cid = CaseInsensitiveDict()
        cid['Accept'] = 'application/json'
        cid['aCCEPT'] == 'application/json'  # True
        list(cid) == ['Accept']  # True

    For example, ``headers['content-encoding']`` will return the
    value of a ``'Content-Encoding'`` response header, regardless
    of how the header name was originally stored.

    If the constructor, ``.update``, or equality comparison
    operations are given keys that have equal ``.lower()``s, the
    behavior is undefined.

    """
    def __init__(self, data=None, **kwargs):
        self._store = dict()
        if data is None:
            data = {}
        self.update(data, **kwargs)

    def __setitem__(self, key, value):
        # Use the lowercased key for lookups, but store the actual
        # key alongside the value.
        self._store[key.lower()] = (key, value)

    def __getitem__(self, key):
        return self._store[key.lower()][1]

    def __delitem__(self, key):
        del self._store[key.lower()]

    def __iter__(self):
        return (casedkey for casedkey, mappedvalue in self._store.values())

    def __len__(self):
        return len(self._store)

    def lower_items(self):
        """Like iteritems(), but with all lowercase keys."""
        return (
            (lowerkey, keyval[1])
            for (lowerkey, keyval)
            in self._store.items()
        )

    def __eq__(self, other):
        if isinstance(other, collections.Mapping):
            other = CaseInsensitiveDict(other)
        else:
            return NotImplemented
        # Compare insensitively
        return dict(self.lower_items()) == dict(other.lower_items())

    # Copy is required
    def copy(self):
        return CaseInsensitiveDict(self._store.values())

    def __repr__(self):
        return str(dict(self.items()))

class LookupDict(dict):
    """Dictionary lookup object."""

    def __init__(self, name=None):
        self.name = name
        super(LookupDict, self).__init__()

    def __repr__(self):
        return '<lookup \'%s\'>' % (self.name)

    def __getitem__(self, key):
        # We allow fall-through here, so values default to None

        return self.__dict__.get(key, None)

    def get(self, key, default=None):
        return self.__dict__.get(key, default)
python3.3/site-packages/pip/_vendor/requests/sessions.py000064400000053422151733566750017400 0ustar00# -*- coding: utf-8 -*-

"""
requests.session
~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).

"""
import os
from collections import Mapping
from datetime import datetime

from .auth import _basic_auth_str
from .compat import cookielib, OrderedDict, urljoin, urlparse, builtin_str
from .cookies import (
    cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)
from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook
from .utils import to_key_val_list, default_headers, to_native_string
from .exceptions import (
    TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)
from .structures import CaseInsensitiveDict

from .adapters import HTTPAdapter

from .utils import (
    requote_uri, get_environ_proxies, get_netrc_auth, should_bypass_proxies,
    get_auth_from_url
)

from .status_codes import codes

# formerly defined here, reexposed here for backward compatibility
from .models import REDIRECT_STATI


def merge_setting(request_setting, session_setting, dict_class=OrderedDict):
    """
    Determines appropriate setting for a given request, taking into account the
    explicit setting on that request, and the setting in the session. If a
    setting is a dictionary, they will be merged together using `dict_class`
    """

    if session_setting is None:
        return request_setting

    if request_setting is None:
        return session_setting

    # Bypass if not a dictionary (e.g. verify)
    if not (
            isinstance(session_setting, Mapping) and
            isinstance(request_setting, Mapping)
    ):
        return request_setting

    merged_setting = dict_class(to_key_val_list(session_setting))
    merged_setting.update(to_key_val_list(request_setting))

    # Remove keys that are set to None.
    for (k, v) in request_setting.items():
        if v is None:
            del merged_setting[k]

    merged_setting = dict((k, v) for (k, v) in merged_setting.items() if v is not None)

    return merged_setting


def merge_hooks(request_hooks, session_hooks, dict_class=OrderedDict):
    """
    Properly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    """
    if session_hooks is None or session_hooks.get('response') == []:
        return request_hooks

    if request_hooks is None or request_hooks.get('response') == []:
        return session_hooks

    return merge_setting(request_hooks, session_hooks, dict_class)


class SessionRedirectMixin(object):
    def resolve_redirects(self, resp, req, stream=False, timeout=None,
                          verify=True, cert=None, proxies=None):
        """Receives a Response. Returns a generator of Responses."""

        i = 0

        while resp.is_redirect:
            prepared_request = req.copy()

            try:
                resp.content  # Consume socket so it can be released
            except (ChunkedEncodingError, ContentDecodingError, RuntimeError):
                resp.raw.read(decode_content=False)

            if i >= self.max_redirects:
                raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)

            # Release the connection back into the pool.
            resp.close()

            url = resp.headers['location']
            method = req.method

            # Handle redirection without scheme (see: RFC 1808 Section 4)
            if url.startswith('//'):
                parsed_rurl = urlparse(resp.url)
                url = '%s:%s' % (parsed_rurl.scheme, url)

            # The scheme should be lower case...
            parsed = urlparse(url)
            url = parsed.geturl()

            # Facilitate non-RFC2616-compliant 'location' headers
            # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')
            # Compliant with RFC3986, we percent encode the url.
            if not urlparse(url).netloc:
                url = urljoin(resp.url, requote_uri(url))
            else:
                url = requote_uri(url)

            prepared_request.url = to_native_string(url)

            # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
            if (resp.status_code == codes.see_other and
                    method != 'HEAD'):
                method = 'GET'

            # Do what the browsers do, despite standards...
            # First, turn 302s into GETs.
            if resp.status_code == codes.found and method != 'HEAD':
                method = 'GET'

            # Second, if a POST is responded to with a 301, turn it into a GET.
            # This bizarre behaviour is explained in Issue 1704.
            if resp.status_code == codes.moved and method == 'POST':
                method = 'GET'

            prepared_request.method = method

            # https://github.com/kennethreitz/requests/issues/1084
            if resp.status_code not in (codes.temporary, codes.resume):
                if 'Content-Length' in prepared_request.headers:
                    del prepared_request.headers['Content-Length']

                prepared_request.body = None

            headers = prepared_request.headers
            try:
                del headers['Cookie']
            except KeyError:
                pass

            extract_cookies_to_jar(prepared_request._cookies, prepared_request, resp.raw)
            prepared_request._cookies.update(self.cookies)
            prepared_request.prepare_cookies(prepared_request._cookies)

            # Rebuild auth and proxy information.
            proxies = self.rebuild_proxies(prepared_request, proxies)
            self.rebuild_auth(prepared_request, resp)

            # Override the original request.
            req = prepared_request

            resp = self.send(
                req,
                stream=stream,
                timeout=timeout,
                verify=verify,
                cert=cert,
                proxies=proxies,
                allow_redirects=False,
            )

            extract_cookies_to_jar(self.cookies, prepared_request, resp.raw)

            i += 1
            yield resp

    def rebuild_auth(self, prepared_request, response):
        """
        When being redirected we may want to strip authentication from the
        request to avoid leaking credentials. This method intelligently removes
        and reapplies authentication where possible to avoid credential loss.
        """
        headers = prepared_request.headers
        url = prepared_request.url

        if 'Authorization' in headers:
            # If we get redirected to a new host, we should strip out any
            # authentication headers.
            original_parsed = urlparse(response.request.url)
            redirect_parsed = urlparse(url)

            if (original_parsed.hostname != redirect_parsed.hostname):
                del headers['Authorization']

        # .netrc might have more auth for us on our new host.
        new_auth = get_netrc_auth(url) if self.trust_env else None
        if new_auth is not None:
            prepared_request.prepare_auth(new_auth)

        return

    def rebuild_proxies(self, prepared_request, proxies):
        """
        This method re-evaluates the proxy configuration by considering the
        environment variables. If we are redirected to a URL covered by
        NO_PROXY, we strip the proxy configuration. Otherwise, we set missing
        proxy keys for this URL (in case they were stripped by a previous
        redirect).

        This method also replaces the Proxy-Authorization header where
        necessary.
        """
        headers = prepared_request.headers
        url = prepared_request.url
        scheme = urlparse(url).scheme
        new_proxies = proxies.copy() if proxies is not None else {}

        if self.trust_env and not should_bypass_proxies(url):
            environ_proxies = get_environ_proxies(url)

            proxy = environ_proxies.get(scheme)

            if proxy:
                new_proxies.setdefault(scheme, environ_proxies[scheme])

        if 'Proxy-Authorization' in headers:
            del headers['Proxy-Authorization']

        try:
            username, password = get_auth_from_url(new_proxies[scheme])
        except KeyError:
            username, password = None, None

        if username and password:
            headers['Proxy-Authorization'] = _basic_auth_str(username, password)

        return new_proxies


class Session(SessionRedirectMixin):
    """A Requests session.

    Provides cookie persistence, connection-pooling, and configuration.

    Basic Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> s.get('http://httpbin.org/get')
      200
    """

    __attrs__ = [
        'headers', 'cookies', 'auth', 'timeout', 'proxies', 'hooks',
        'params', 'verify', 'cert', 'prefetch', 'adapters', 'stream',
        'trust_env', 'max_redirects']

    def __init__(self):

        #: A case-insensitive dictionary of headers to be sent on each
        #: :class:`Request <Request>` sent from this
        #: :class:`Session <Session>`.
        self.headers = default_headers()

        #: Default Authentication tuple or object to attach to
        #: :class:`Request <Request>`.
        self.auth = None

        #: Dictionary mapping protocol to the URL of the proxy (e.g.
        #: {'http': 'foo.bar:3128'}) to be used on each
        #: :class:`Request <Request>`.
        self.proxies = {}

        #: Event-handling hooks.
        self.hooks = default_hooks()

        #: Dictionary of querystring data to attach to each
        #: :class:`Request <Request>`. The dictionary values may be lists for
        #: representing multivalued query parameters.
        self.params = {}

        #: Stream response content default.
        self.stream = False

        #: SSL Verification default.
        self.verify = True

        #: SSL certificate default.
        self.cert = None

        #: Maximum number of redirects allowed. If the request exceeds this
        #: limit, a :class:`TooManyRedirects` exception is raised.
        self.max_redirects = DEFAULT_REDIRECT_LIMIT

        #: Should we trust the environment?
        self.trust_env = True

        #: A CookieJar containing all currently outstanding cookies set on this
        #: session. By default it is a
        #: :class:`RequestsCookieJar <requests.cookies.RequestsCookieJar>`, but
        #: may be any other ``cookielib.CookieJar`` compatible object.
        self.cookies = cookiejar_from_dict({})

        # Default connection adapters.
        self.adapters = OrderedDict()
        self.mount('https://', HTTPAdapter())
        self.mount('http://', HTTPAdapter())

    def __enter__(self):
        return self

    def __exit__(self, *args):
        self.close()

    def prepare_request(self, request):
        """Constructs a :class:`PreparedRequest <PreparedRequest>` for
        transmission and returns it. The :class:`PreparedRequest` has settings
        merged from the :class:`Request <Request>` instance and those of the
        :class:`Session`.

        :param request: :class:`Request` instance to prepare with this
            session's settings.
        """
        cookies = request.cookies or {}

        # Bootstrap CookieJar.
        if not isinstance(cookies, cookielib.CookieJar):
            cookies = cookiejar_from_dict(cookies)

        # Merge with session cookies
        merged_cookies = merge_cookies(
            merge_cookies(RequestsCookieJar(), self.cookies), cookies)


        # Set environment's basic authentication if not explicitly set.
        auth = request.auth
        if self.trust_env and not auth and not self.auth:
            auth = get_netrc_auth(request.url)

        p = PreparedRequest()
        p.prepare(
            method=request.method.upper(),
            url=request.url,
            files=request.files,
            data=request.data,
            headers=merge_setting(request.headers, self.headers, dict_class=CaseInsensitiveDict),
            params=merge_setting(request.params, self.params),
            auth=merge_setting(auth, self.auth),
            cookies=merged_cookies,
            hooks=merge_hooks(request.hooks, self.hooks),
        )
        return p

    def request(self, method, url,
        params=None,
        data=None,
        headers=None,
        cookies=None,
        files=None,
        auth=None,
        timeout=None,
        allow_redirects=True,
        proxies=None,
        hooks=None,
        stream=None,
        verify=None,
        cert=None):
        """Constructs a :class:`Request <Request>`, prepares it and sends it.
        Returns :class:`Response <Response>` object.

        :param method: method for the new :class:`Request` object.
        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary or bytes to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of 'filename': file-like-objects
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) Float describing the timeout of the
            request in seconds.
        :param allow_redirects: (optional) Boolean. Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol to the URL of
            the proxy.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) if ``True``, the SSL cert will be verified.
            A CA_BUNDLE path can also be provided.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair.
        """

        method = builtin_str(method)

        # Create the Request.
        req = Request(
            method = method.upper(),
            url = url,
            headers = headers,
            files = files,
            data = data or {},
            params = params or {},
            auth = auth,
            cookies = cookies,
            hooks = hooks,
        )
        prep = self.prepare_request(req)

        proxies = proxies or {}

        # Gather clues from the surrounding environment.
        if self.trust_env:
            # Set environment's proxies.
            env_proxies = get_environ_proxies(url) or {}
            for (k, v) in env_proxies.items():
                proxies.setdefault(k, v)

            # Look for configuration.
            if not verify and verify is not False:
                verify = os.environ.get('REQUESTS_CA_BUNDLE')

            # Curl compatibility.
            if not verify and verify is not False:
                verify = os.environ.get('CURL_CA_BUNDLE')

        # Merge all the kwargs.
        proxies = merge_setting(proxies, self.proxies)
        stream = merge_setting(stream, self.stream)
        verify = merge_setting(verify, self.verify)
        cert = merge_setting(cert, self.cert)

        # Send the request.
        send_kwargs = {
            'stream': stream,
            'timeout': timeout,
            'verify': verify,
            'cert': cert,
            'proxies': proxies,
            'allow_redirects': allow_redirects,
        }
        resp = self.send(prep, **send_kwargs)

        return resp

    def get(self, url, **kwargs):
        """Sends a GET request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        kwargs.setdefault('allow_redirects', True)
        return self.request('GET', url, **kwargs)

    def options(self, url, **kwargs):
        """Sends a OPTIONS request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        kwargs.setdefault('allow_redirects', True)
        return self.request('OPTIONS', url, **kwargs)

    def head(self, url, **kwargs):
        """Sends a HEAD request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        kwargs.setdefault('allow_redirects', False)
        return self.request('HEAD', url, **kwargs)

    def post(self, url, data=None, **kwargs):
        """Sends a POST request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        return self.request('POST', url, data=data, **kwargs)

    def put(self, url, data=None, **kwargs):
        """Sends a PUT request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        return self.request('PUT', url, data=data, **kwargs)

    def patch(self, url, data=None, **kwargs):
        """Sends a PATCH request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        return self.request('PATCH', url,  data=data, **kwargs)

    def delete(self, url, **kwargs):
        """Sends a DELETE request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        return self.request('DELETE', url, **kwargs)

    def send(self, request, **kwargs):
        """Send a given PreparedRequest."""
        # Set defaults that the hooks can utilize to ensure they always have
        # the correct parameters to reproduce the previous request.
        kwargs.setdefault('stream', self.stream)
        kwargs.setdefault('verify', self.verify)
        kwargs.setdefault('cert', self.cert)
        kwargs.setdefault('proxies', self.proxies)

        # It's possible that users might accidentally send a Request object.
        # Guard against that specific failure case.
        if not isinstance(request, PreparedRequest):
            raise ValueError('You can only send PreparedRequests.')

        # Set up variables needed for resolve_redirects and dispatching of hooks
        allow_redirects = kwargs.pop('allow_redirects', True)
        stream = kwargs.get('stream')
        timeout = kwargs.get('timeout')
        verify = kwargs.get('verify')
        cert = kwargs.get('cert')
        proxies = kwargs.get('proxies')
        hooks = request.hooks

        # Get the appropriate adapter to use
        adapter = self.get_adapter(url=request.url)

        # Start time (approximately) of the request
        start = datetime.utcnow()

        # Send the request
        r = adapter.send(request, **kwargs)

        # Total elapsed time of the request (approximately)
        r.elapsed = datetime.utcnow() - start

        # Response manipulation hooks
        r = dispatch_hook('response', hooks, r, **kwargs)

        # Persist cookies
        if r.history:

            # If the hooks create history then we want those cookies too
            for resp in r.history:
                extract_cookies_to_jar(self.cookies, resp.request, resp.raw)

        extract_cookies_to_jar(self.cookies, request, r.raw)

        # Redirect resolving generator.
        gen = self.resolve_redirects(r, request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies)

        # Resolve redirects if allowed.
        history = [resp for resp in gen] if allow_redirects else []

        # Shuffle things around if there's history.
        if history:
            # Insert the first (original) request at the start
            history.insert(0, r)
            # Get the last request made
            r = history.pop()
            r.history = history

        if not stream:
            r.content

        return r

    def get_adapter(self, url):
        """Returns the appropriate connnection adapter for the given URL."""
        for (prefix, adapter) in self.adapters.items():

            if url.lower().startswith(prefix):
                return adapter

        # Nothing matches :-/
        raise InvalidSchema("No connection adapters were found for '%s'" % url)

    def close(self):
        """Closes all adapters and as such the session"""
        for v in self.adapters.values():
            v.close()

    def mount(self, prefix, adapter):
        """Registers a connection adapter to a prefix.

        Adapters are sorted in descending order by key length."""

        self.adapters[prefix] = adapter
        keys_to_move = [k for k in self.adapters if len(k) < len(prefix)]

        for key in keys_to_move:
            self.adapters[key] = self.adapters.pop(key)

    def __getstate__(self):
        return dict((attr, getattr(self, attr, None)) for attr in self.__attrs__)

    def __setstate__(self, state):
        for attr, value in state.items():
            setattr(self, attr, value)


def session():
    """Returns a :class:`Session` for context-management."""

    return Session()
python3.3/site-packages/pip/_vendor/requests/api.py000064400000010370151733566750016276 0ustar00# -*- coding: utf-8 -*-

"""
requests.api
~~~~~~~~~~~~

This module implements the Requests API.

:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.

"""

from . import sessions


def request(method, url, **kwargs):
    """Constructs and sends a :class:`Request <Request>`.
    Returns :class:`Response <Response>` object.

    :param method: method for the new :class:`Request` object.
    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
    :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
    :param files: (optional) Dictionary of 'name': file-like-objects (or {'name': ('filename', fileobj)}) for multipart encoding upload.
    :param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
    :param timeout: (optional) Float describing the timeout of the request in seconds.
    :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.
    :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
    :param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.
    :param stream: (optional) if ``False``, the response content will be immediately downloaded.
    :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.

    Usage::

      >>> import requests
      >>> req = requests.request('GET', 'http://httpbin.org/get')
      <Response [200]>
    """

    session = sessions.Session()
    return session.request(method=method, url=url, **kwargs)


def get(url, **kwargs):
    """Sends a GET request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    kwargs.setdefault('allow_redirects', True)
    return request('get', url, **kwargs)


def options(url, **kwargs):
    """Sends a OPTIONS request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    kwargs.setdefault('allow_redirects', True)
    return request('options', url, **kwargs)


def head(url, **kwargs):
    """Sends a HEAD request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    kwargs.setdefault('allow_redirects', False)
    return request('head', url, **kwargs)


def post(url, data=None, **kwargs):
    """Sends a POST request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    return request('post', url, data=data, **kwargs)


def put(url, data=None, **kwargs):
    """Sends a PUT request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    return request('put', url, data=data, **kwargs)


def patch(url, data=None, **kwargs):
    """Sends a PATCH request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    return request('patch', url,  data=data, **kwargs)


def delete(url, **kwargs):
    """Sends a DELETE request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    return request('delete', url, **kwargs)
python3.3/site-packages/pip/_vendor/requests/__init__.py000064400000003500151733566750017261 0ustar00# -*- coding: utf-8 -*-

#   __
#  /__)  _  _     _   _ _/   _
# / (   (- (/ (/ (- _)  /  _)
#          /

"""
requests HTTP library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:

   >>> import requests
   >>> r = requests.get('http://python.org')
   >>> r.status_code
   200
   >>> 'Python is a programming language' in r.content
   True

... or POST:

   >>> payload = dict(key1='value1', key2='value2')
   >>> r = requests.post("http://httpbin.org/post", data=payload)
   >>> print(r.text)
   {
     ...
     "form": {
       "key2": "value2",
       "key1": "value1"
     },
     ...
   }

The other HTTP methods are supported - see `requests.api`. Full documentation
is at <http://python-requests.org>.

:copyright: (c) 2014 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.

"""

__title__ = 'requests'
__version__ = '2.3.0'
__build__ = 0x020300
__author__ = 'Kenneth Reitz'
__license__ = 'Apache 2.0'
__copyright__ = 'Copyright 2014 Kenneth Reitz'

# Attempt to enable urllib3's SNI support, if possible
try:
    from .packages.urllib3.contrib import pyopenssl
    pyopenssl.inject_into_urllib3()
except ImportError:
    pass

from . import utils
from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options
from .sessions import session, Session
from .status_codes import codes
from .exceptions import (
    RequestException, Timeout, URLRequired,
    TooManyRedirects, HTTPError, ConnectionError
)

# Set default logging handler to avoid "No handler found" warnings.
import logging
try:  # Python 2.7+
    from logging import NullHandler
except ImportError:
    class NullHandler(logging.Handler):
        def emit(self, record):
            pass

logging.getLogger(__name__).addHandler(NullHandler())
python3.3/site-packages/pip/_vendor/requests/auth.py000064400000013753151733566750016476 0ustar00# -*- coding: utf-8 -*-

"""
requests.auth
~~~~~~~~~~~~~

This module contains the authentication handlers for Requests.
"""

import os
import re
import time
import hashlib

from base64 import b64encode

from .compat import urlparse, str
from .cookies import extract_cookies_to_jar
from .utils import parse_dict_header

CONTENT_TYPE_FORM_URLENCODED = 'application/x-www-form-urlencoded'
CONTENT_TYPE_MULTI_PART = 'multipart/form-data'


def _basic_auth_str(username, password):
    """Returns a Basic Auth string."""

    return 'Basic ' + b64encode(('%s:%s' % (username, password)).encode('latin1')).strip().decode('latin1')


class AuthBase(object):
    """Base class that all auth implementations derive from"""

    def __call__(self, r):
        raise NotImplementedError('Auth hooks must be callable.')


class HTTPBasicAuth(AuthBase):
    """Attaches HTTP Basic Authentication to the given Request object."""
    def __init__(self, username, password):
        self.username = username
        self.password = password

    def __call__(self, r):
        r.headers['Authorization'] = _basic_auth_str(self.username, self.password)
        return r


class HTTPProxyAuth(HTTPBasicAuth):
    """Attaches HTTP Proxy Authentication to a given Request object."""
    def __call__(self, r):
        r.headers['Proxy-Authorization'] = _basic_auth_str(self.username, self.password)
        return r


class HTTPDigestAuth(AuthBase):
    """Attaches HTTP Digest Authentication to the given Request object."""
    def __init__(self, username, password):
        self.username = username
        self.password = password
        self.last_nonce = ''
        self.nonce_count = 0
        self.chal = {}
        self.pos = None

    def build_digest_header(self, method, url):

        realm = self.chal['realm']
        nonce = self.chal['nonce']
        qop = self.chal.get('qop')
        algorithm = self.chal.get('algorithm')
        opaque = self.chal.get('opaque')

        if algorithm is None:
            _algorithm = 'MD5'
        else:
            _algorithm = algorithm.upper()
        # lambdas assume digest modules are imported at the top level
        if _algorithm == 'MD5' or _algorithm == 'MD5-SESS':
            def md5_utf8(x):
                if isinstance(x, str):
                    x = x.encode('utf-8')
                return hashlib.md5(x).hexdigest()
            hash_utf8 = md5_utf8
        elif _algorithm == 'SHA':
            def sha_utf8(x):
                if isinstance(x, str):
                    x = x.encode('utf-8')
                return hashlib.sha1(x).hexdigest()
            hash_utf8 = sha_utf8

        KD = lambda s, d: hash_utf8("%s:%s" % (s, d))

        if hash_utf8 is None:
            return None

        # XXX not implemented yet
        entdig = None
        p_parsed = urlparse(url)
        path = p_parsed.path
        if p_parsed.query:
            path += '?' + p_parsed.query

        A1 = '%s:%s:%s' % (self.username, realm, self.password)
        A2 = '%s:%s' % (method, path)

        HA1 = hash_utf8(A1)
        HA2 = hash_utf8(A2)

        if nonce == self.last_nonce:
            self.nonce_count += 1
        else:
            self.nonce_count = 1
        ncvalue = '%08x' % self.nonce_count
        s = str(self.nonce_count).encode('utf-8')
        s += nonce.encode('utf-8')
        s += time.ctime().encode('utf-8')
        s += os.urandom(8)

        cnonce = (hashlib.sha1(s).hexdigest()[:16])
        noncebit = "%s:%s:%s:%s:%s" % (nonce, ncvalue, cnonce, qop, HA2)
        if _algorithm == 'MD5-SESS':
            HA1 = hash_utf8('%s:%s:%s' % (HA1, nonce, cnonce))

        if qop is None:
            respdig = KD(HA1, "%s:%s" % (nonce, HA2))
        elif qop == 'auth' or 'auth' in qop.split(','):
            respdig = KD(HA1, noncebit)
        else:
            # XXX handle auth-int.
            return None

        self.last_nonce = nonce

        # XXX should the partial digests be encoded too?
        base = 'username="%s", realm="%s", nonce="%s", uri="%s", ' \
               'response="%s"' % (self.username, realm, nonce, path, respdig)
        if opaque:
            base += ', opaque="%s"' % opaque
        if algorithm:
            base += ', algorithm="%s"' % algorithm
        if entdig:
            base += ', digest="%s"' % entdig
        if qop:
            base += ', qop="auth", nc=%s, cnonce="%s"' % (ncvalue, cnonce)

        return 'Digest %s' % (base)

    def handle_401(self, r, **kwargs):
        """Takes the given response and tries digest-auth, if needed."""

        if self.pos is not None:
            # Rewind the file position indicator of the body to where
            # it was to resend the request.
            r.request.body.seek(self.pos)
        num_401_calls = getattr(self, 'num_401_calls', 1)
        s_auth = r.headers.get('www-authenticate', '')

        if 'digest' in s_auth.lower() and num_401_calls < 2:

            setattr(self, 'num_401_calls', num_401_calls + 1)
            pat = re.compile(r'digest ', flags=re.IGNORECASE)
            self.chal = parse_dict_header(pat.sub('', s_auth, count=1))

            # Consume content and release the original connection
            # to allow our new request to reuse the same one.
            r.content
            r.raw.release_conn()
            prep = r.request.copy()
            extract_cookies_to_jar(prep._cookies, r.request, r.raw)
            prep.prepare_cookies(prep._cookies)

            prep.headers['Authorization'] = self.build_digest_header(
                prep.method, prep.url)
            _r = r.connection.send(prep, **kwargs)
            _r.history.append(r)
            _r.request = prep

            return _r

        setattr(self, 'num_401_calls', 1)
        return r

    def __call__(self, r):
        # If we have a saved nonce, skip the 401
        if self.last_nonce:
            r.headers['Authorization'] = self.build_digest_header(r.method, r.url)
        try:
            self.pos = r.body.tell()
        except AttributeError:
            pass
        r.register_hook('response', self.handle_401)
        return r
python3.3/site-packages/pip/_vendor/requests/hooks.py000064400000001464151733566750016654 0ustar00# -*- coding: utf-8 -*-

"""
requests.hooks
~~~~~~~~~~~~~~

This module provides the capabilities for the Requests hooks system.

Available hooks:

``response``:
    The response generated from a Request.

"""


HOOKS = ['response']


def default_hooks():
    hooks = {}
    for event in HOOKS:
        hooks[event] = []
    return hooks

# TODO: response is the only one


def dispatch_hook(key, hooks, hook_data, **kwargs):
    """Dispatches a hook dictionary on a given piece of data."""

    hooks = hooks or dict()

    if key in hooks:
        hooks = hooks.get(key)

        if hasattr(hooks, '__call__'):
            hooks = [hooks]

        for hook in hooks:
            _hook_data = hook(hook_data, **kwargs)
            if _hook_data is not None:
                hook_data = _hook_data

    return hook_data
python3.3/site-packages/pip/_vendor/requests/adapters.py000064400000034420151733566750017332 0ustar00# -*- coding: utf-8 -*-

"""
requests.adapters
~~~~~~~~~~~~~~~~~

This module contains the transport adapters that Requests uses to define
and maintain connections.
"""

import socket

from .models import Response
from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
from .packages.urllib3.response import HTTPResponse
from .packages.urllib3.util import Timeout as TimeoutSauce
from .compat import urlparse, basestring, urldefrag, unquote
from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
                    prepend_scheme_if_needed, get_auth_from_url)
from .structures import CaseInsensitiveDict
from .packages.urllib3.exceptions import MaxRetryError
from .packages.urllib3.exceptions import TimeoutError
from .packages.urllib3.exceptions import SSLError as _SSLError
from .packages.urllib3.exceptions import HTTPError as _HTTPError
from .packages.urllib3.exceptions import ProxyError as _ProxyError
from .cookies import extract_cookies_to_jar
from .exceptions import ConnectionError, Timeout, SSLError, ProxyError
from .auth import _basic_auth_str

DEFAULT_POOLBLOCK = False
DEFAULT_POOLSIZE = 10
DEFAULT_RETRIES = 0


class BaseAdapter(object):
    """The Base Transport Adapter"""

    def __init__(self):
        super(BaseAdapter, self).__init__()

    def send(self):
        raise NotImplementedError

    def close(self):
        raise NotImplementedError


class HTTPAdapter(BaseAdapter):
    """The built-in HTTP Adapter for urllib3.

    Provides a general-case interface for Requests sessions to contact HTTP and
    HTTPS urls by implementing the Transport Adapter interface. This class will
    usually be created by the :class:`Session <Session>` class under the
    covers.

    :param pool_connections: The number of urllib3 connection pools to cache.
    :param pool_maxsize: The maximum number of connections to save in the pool.
    :param int max_retries: The maximum number of retries each connection
        should attempt. Note, this applies only to failed connections and
        timeouts, never to requests where the server returns a response.
    :param pool_block: Whether the connection pool should block for connections.

    Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> a = requests.adapters.HTTPAdapter(max_retries=3)
      >>> s.mount('http://', a)
    """
    __attrs__ = ['max_retries', 'config', '_pool_connections', '_pool_maxsize',
                 '_pool_block']

    def __init__(self, pool_connections=DEFAULT_POOLSIZE,
                 pool_maxsize=DEFAULT_POOLSIZE, max_retries=DEFAULT_RETRIES,
                 pool_block=DEFAULT_POOLBLOCK):
        self.max_retries = max_retries
        self.config = {}
        self.proxy_manager = {}

        super(HTTPAdapter, self).__init__()

        self._pool_connections = pool_connections
        self._pool_maxsize = pool_maxsize
        self._pool_block = pool_block

        self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block)

    def __getstate__(self):
        return dict((attr, getattr(self, attr, None)) for attr in
                    self.__attrs__)

    def __setstate__(self, state):
        # Can't handle by adding 'proxy_manager' to self.__attrs__ because
        # because self.poolmanager uses a lambda function, which isn't pickleable.
        self.proxy_manager = {}
        self.config = {}

        for attr, value in state.items():
            setattr(self, attr, value)

        self.init_poolmanager(self._pool_connections, self._pool_maxsize,
                              block=self._pool_block)

    def init_poolmanager(self, connections, maxsize, block=DEFAULT_POOLBLOCK):
        """Initializes a urllib3 PoolManager. This method should not be called
        from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param connections: The number of urllib3 connection pools to cache.
        :param maxsize: The maximum number of connections to save in the pool.
        :param block: Block when no free connections are available.
        """
        # save these values for pickling
        self._pool_connections = connections
        self._pool_maxsize = maxsize
        self._pool_block = block

        self.poolmanager = PoolManager(num_pools=connections, maxsize=maxsize,
                                       block=block)

    def cert_verify(self, conn, url, verify, cert):
        """Verify a SSL certificate. This method should not be called from user
        code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param conn: The urllib3 connection object associated with the cert.
        :param url: The requested URL.
        :param verify: Whether we should actually verify the certificate.
        :param cert: The SSL certificate to verify.
        """
        if url.lower().startswith('https') and verify:

            cert_loc = None

            # Allow self-specified cert location.
            if verify is not True:
                cert_loc = verify

            if not cert_loc:
                cert_loc = DEFAULT_CA_BUNDLE_PATH

            if not cert_loc:
                raise Exception("Could not find a suitable SSL CA certificate bundle.")

            conn.cert_reqs = 'CERT_REQUIRED'
            conn.ca_certs = cert_loc
        else:
            conn.cert_reqs = 'CERT_NONE'
            conn.ca_certs = None

        if cert:
            if not isinstance(cert, basestring):
                conn.cert_file = cert[0]
                conn.key_file = cert[1]
            else:
                conn.cert_file = cert

    def build_response(self, req, resp):
        """Builds a :class:`Response <requests.Response>` object from a urllib3
        response. This should not be called from user code, and is only exposed
        for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`

        :param req: The :class:`PreparedRequest <PreparedRequest>` used to generate the response.
        :param resp: The urllib3 response object.
        """
        response = Response()

        # Fallback to None if there's no status_code, for whatever reason.
        response.status_code = getattr(resp, 'status', None)

        # Make headers case-insensitive.
        response.headers = CaseInsensitiveDict(getattr(resp, 'headers', {}))

        # Set encoding.
        response.encoding = get_encoding_from_headers(response.headers)
        response.raw = resp
        response.reason = response.raw.reason

        if isinstance(req.url, bytes):
            response.url = req.url.decode('utf-8')
        else:
            response.url = req.url

        # Add new cookies from the server.
        extract_cookies_to_jar(response.cookies, req, resp)

        # Give the Response some context.
        response.request = req
        response.connection = self

        return response

    def get_connection(self, url, proxies=None):
        """Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        """
        proxies = proxies or {}
        proxy = proxies.get(urlparse(url.lower()).scheme)

        if proxy:
            proxy = prepend_scheme_if_needed(proxy, 'http')
            proxy_headers = self.proxy_headers(proxy)

            if not proxy in self.proxy_manager:
                self.proxy_manager[proxy] = proxy_from_url(
                                                proxy,
                                                proxy_headers=proxy_headers,
                                                num_pools=self._pool_connections,
                                                maxsize=self._pool_maxsize,
                                                block=self._pool_block)

            conn = self.proxy_manager[proxy].connection_from_url(url)
        else:
            # Only scheme should be lower case
            parsed = urlparse(url)
            url = parsed.geturl()
            conn = self.poolmanager.connection_from_url(url)

        return conn

    def close(self):
        """Disposes of any internal state.

        Currently, this just closes the PoolManager, which closes pooled
        connections.
        """
        self.poolmanager.clear()

    def request_url(self, request, proxies):
        """Obtain the url to use when making the final request.

        If the message is being sent through a HTTP proxy, the full URL has to
        be used. Otherwise, we should only use the path portion of the URL.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param proxies: A dictionary of schemes to proxy URLs.
        """
        proxies = proxies or {}
        scheme = urlparse(request.url).scheme
        proxy = proxies.get(scheme)

        if proxy and scheme != 'https':
            url, _ = urldefrag(request.url)
        else:
            url = request.path_url

        return url

    def add_headers(self, request, **kwargs):
        """Add any headers needed by the connection. As of v2.0 this does
        nothing by default, but is left for overriding by users that subclass
        the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
        :param kwargs: The keyword arguments from the call to send().
        """
        pass

    def proxy_headers(self, proxy):
        """Returns a dictionary of the headers to add to any request sent
        through a proxy. This works with urllib3 magic to ensure that they are
        correctly sent to the proxy, rather than in a tunnelled request if
        CONNECT is being used.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxies: The url of the proxy being used for this request.
        :param kwargs: Optional additional keyword arguments.
        """
        headers = {}
        username, password = get_auth_from_url(proxy)

        if username and password:
            headers['Proxy-Authorization'] = _basic_auth_str(username,
                                                             password)

        return headers

    def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None):
        """Sends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) The timeout on the request.
        :param verify: (optional) Whether to verify SSL certificates.
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        """

        conn = self.get_connection(request.url, proxies)

        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(request)

        chunked = not (request.body is None or 'Content-Length' in request.headers)

        timeout = TimeoutSauce(connect=timeout, read=timeout)

        try:
            if not chunked:
                resp = conn.urlopen(
                    method=request.method,
                    url=url,
                    body=request.body,
                    headers=request.headers,
                    redirect=False,
                    assert_same_host=False,
                    preload_content=False,
                    decode_content=False,
                    retries=self.max_retries,
                    timeout=timeout
                )

            # Send the request.
            else:
                if hasattr(conn, 'proxy_pool'):
                    conn = conn.proxy_pool

                low_conn = conn._get_conn(timeout=timeout)

                try:
                    low_conn.putrequest(request.method,
                                        url,
                                        skip_accept_encoding=True)

                    for header, value in request.headers.items():
                        low_conn.putheader(header, value)

                    low_conn.endheaders()

                    for i in request.body:
                        low_conn.send(hex(len(i))[2:].encode('utf-8'))
                        low_conn.send(b'\r\n')
                        low_conn.send(i)
                        low_conn.send(b'\r\n')
                    low_conn.send(b'0\r\n\r\n')

                    r = low_conn.getresponse()
                    resp = HTTPResponse.from_httplib(
                        r,
                        pool=conn,
                        connection=low_conn,
                        preload_content=False,
                        decode_content=False
                    )
                except:
                    # If we hit any problems here, clean up the connection.
                    # Then, reraise so that we can handle the actual exception.
                    low_conn.close()
                    raise
                else:
                    # All is well, return the connection to the pool.
                    conn._put_conn(low_conn)

        except socket.error as sockerr:
            raise ConnectionError(sockerr, request=request)

        except MaxRetryError as e:
            raise ConnectionError(e, request=request)

        except _ProxyError as e:
            raise ProxyError(e)

        except (_SSLError, _HTTPError) as e:
            if isinstance(e, _SSLError):
                raise SSLError(e, request=request)
            elif isinstance(e, TimeoutError):
                raise Timeout(e, request=request)
            else:
                raise

        return self.build_response(request, resp)
python3.3/site-packages/pip/_vendor/requests/cookies.py000064400000040456151733566750017171 0ustar00# -*- coding: utf-8 -*-

"""
Compatibility code to be able to use `cookielib.CookieJar` with requests.

requests.utils imports from here, so be careful with imports.
"""

import time
import collections
from .compat import cookielib, urlparse, urlunparse, Morsel

try:
    import threading
    # grr, pyflakes: this fixes "redefinition of unused 'threading'"
    threading
except ImportError:
    import dummy_threading as threading


class MockRequest(object):
    """Wraps a `requests.Request` to mimic a `urllib2.Request`.

    The code in `cookielib.CookieJar` expects this interface in order to correctly
    manage cookie policies, i.e., determine whether a cookie can be set, given the
    domains of the request and the cookie.

    The original request object is read-only. The client is responsible for collecting
    the new headers via `get_new_headers()` and interpreting them appropriately. You
    probably want `get_cookie_header`, defined below.
    """

    def __init__(self, request):
        self._r = request
        self._new_headers = {}
        self.type = urlparse(self._r.url).scheme

    def get_type(self):
        return self.type

    def get_host(self):
        return urlparse(self._r.url).netloc

    def get_origin_req_host(self):
        return self.get_host()

    def get_full_url(self):
        # Only return the response's URL if the user hadn't set the Host
        # header
        if not self._r.headers.get('Host'):
            return self._r.url
        # If they did set it, retrieve it and reconstruct the expected domain
        host = self._r.headers['Host']
        parsed = urlparse(self._r.url)
        # Reconstruct the URL as we expect it
        return urlunparse([
            parsed.scheme, host, parsed.path, parsed.params, parsed.query,
            parsed.fragment
        ])

    def is_unverifiable(self):
        return True

    def has_header(self, name):
        return name in self._r.headers or name in self._new_headers

    def get_header(self, name, default=None):
        return self._r.headers.get(name, self._new_headers.get(name, default))

    def add_header(self, key, val):
        """cookielib has no legitimate use for this method; add it back if you find one."""
        raise NotImplementedError("Cookie headers should be added with add_unredirected_header()")

    def add_unredirected_header(self, name, value):
        self._new_headers[name] = value

    def get_new_headers(self):
        return self._new_headers

    @property
    def unverifiable(self):
        return self.is_unverifiable()

    @property
    def origin_req_host(self):
        return self.get_origin_req_host()

    @property
    def host(self):
        return self.get_host()


class MockResponse(object):
    """Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.

    ...what? Basically, expose the parsed HTTP headers from the server response
    the way `cookielib` expects to see them.
    """

    def __init__(self, headers):
        """Make a MockResponse for `cookielib` to read.

        :param headers: a httplib.HTTPMessage or analogous carrying the headers
        """
        self._headers = headers

    def info(self):
        return self._headers

    def getheaders(self, name):
        self._headers.getheaders(name)


def extract_cookies_to_jar(jar, request, response):
    """Extract the cookies from the response into a CookieJar.

    :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)
    :param request: our own requests.Request object
    :param response: urllib3.HTTPResponse object
    """
    if not (hasattr(response, '_original_response') and
            response._original_response):
        return
    # the _original_response field is the wrapped httplib.HTTPResponse object,
    req = MockRequest(request)
    # pull out the HTTPMessage with the headers and put it in the mock:
    res = MockResponse(response._original_response.msg)
    jar.extract_cookies(res, req)


def get_cookie_header(jar, request):
    """Produce an appropriate Cookie header string to be sent with `request`, or None."""
    r = MockRequest(request)
    jar.add_cookie_header(r)
    return r.get_new_headers().get('Cookie')


def remove_cookie_by_name(cookiejar, name, domain=None, path=None):
    """Unsets a cookie by name, by default over all domains and paths.

    Wraps CookieJar.clear(), is O(n).
    """
    clearables = []
    for cookie in cookiejar:
        if cookie.name == name:
            if domain is None or domain == cookie.domain:
                if path is None or path == cookie.path:
                    clearables.append((cookie.domain, cookie.path, cookie.name))

    for domain, path, name in clearables:
        cookiejar.clear(domain, path, name)


class CookieConflictError(RuntimeError):
    """There are two cookies that meet the criteria specified in the cookie jar.
    Use .get and .set and include domain and path args in order to be more specific."""


class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
    """Compatibility class; is a cookielib.CookieJar, but exposes a dict interface.

    This is the CookieJar we create by default for requests and sessions that
    don't specify one, since some clients may expect response.cookies and
    session.cookies to support dict operations.

    Don't use the dict interface internally; it's just for compatibility with
    with external client code. All `requests` code should work out of the box
    with externally provided instances of CookieJar, e.g., LWPCookieJar and
    FileCookieJar.

    Caution: dictionary operations that are normally O(1) may be O(n).

    Unlike a regular CookieJar, this class is pickleable.
    """

    def get(self, name, default=None, domain=None, path=None):
        """Dict-like get() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains. Caution: operation is O(n), not O(1)."""
        try:
            return self._find_no_duplicates(name, domain, path)
        except KeyError:
            return default

    def set(self, name, value, **kwargs):
        """Dict-like set() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains."""
        # support client code that unsets cookies by assignment of a None value:
        if value is None:
            remove_cookie_by_name(self, name, domain=kwargs.get('domain'), path=kwargs.get('path'))
            return

        if isinstance(value, Morsel):
            c = morsel_to_cookie(value)
        else:
            c = create_cookie(name, value, **kwargs)
        self.set_cookie(c)
        return c

    def iterkeys(self):
        """Dict-like iterkeys() that returns an iterator of names of cookies from the jar.
        See itervalues() and iteritems()."""
        for cookie in iter(self):
            yield cookie.name

    def keys(self):
        """Dict-like keys() that returns a list of names of cookies from the jar.
        See values() and items()."""
        return list(self.iterkeys())

    def itervalues(self):
        """Dict-like itervalues() that returns an iterator of values of cookies from the jar.
        See iterkeys() and iteritems()."""
        for cookie in iter(self):
            yield cookie.value

    def values(self):
        """Dict-like values() that returns a list of values of cookies from the jar.
        See keys() and items()."""
        return list(self.itervalues())

    def iteritems(self):
        """Dict-like iteritems() that returns an iterator of name-value tuples from the jar.
        See iterkeys() and itervalues()."""
        for cookie in iter(self):
            yield cookie.name, cookie.value

    def items(self):
        """Dict-like items() that returns a list of name-value tuples from the jar.
        See keys() and values(). Allows client-code to call "dict(RequestsCookieJar)
        and get a vanilla python dict of key value pairs."""
        return list(self.iteritems())

    def list_domains(self):
        """Utility method to list all the domains in the jar."""
        domains = []
        for cookie in iter(self):
            if cookie.domain not in domains:
                domains.append(cookie.domain)
        return domains

    def list_paths(self):
        """Utility method to list all the paths in the jar."""
        paths = []
        for cookie in iter(self):
            if cookie.path not in paths:
                paths.append(cookie.path)
        return paths

    def multiple_domains(self):
        """Returns True if there are multiple domains in the jar.
        Returns False otherwise."""
        domains = []
        for cookie in iter(self):
            if cookie.domain is not None and cookie.domain in domains:
                return True
            domains.append(cookie.domain)
        return False  # there is only one domain in jar

    def get_dict(self, domain=None, path=None):
        """Takes as an argument an optional domain and path and returns a plain old
        Python dict of name-value pairs of cookies that meet the requirements."""
        dictionary = {}
        for cookie in iter(self):
            if (domain is None or cookie.domain == domain) and (path is None
                                                or cookie.path == path):
                dictionary[cookie.name] = cookie.value
        return dictionary

    def __getitem__(self, name):
        """Dict-like __getitem__() for compatibility with client code. Throws exception
        if there are more than one cookie with name. In that case, use the more
        explicit get() method instead. Caution: operation is O(n), not O(1)."""

        return self._find_no_duplicates(name)

    def __setitem__(self, name, value):
        """Dict-like __setitem__ for compatibility with client code. Throws exception
        if there is already a cookie of that name in the jar. In that case, use the more
        explicit set() method instead."""

        self.set(name, value)

    def __delitem__(self, name):
        """Deletes a cookie given a name. Wraps cookielib.CookieJar's remove_cookie_by_name()."""
        remove_cookie_by_name(self, name)

    def set_cookie(self, cookie, *args, **kwargs):
        if hasattr(cookie.value, 'startswith') and cookie.value.startswith('"') and cookie.value.endswith('"'):
            cookie.value = cookie.value.replace('\\"', '')
        return super(RequestsCookieJar, self).set_cookie(cookie, *args, **kwargs)

    def update(self, other):
        """Updates this jar with cookies from another CookieJar or dict-like"""
        if isinstance(other, cookielib.CookieJar):
            for cookie in other:
                self.set_cookie(cookie)
        else:
            super(RequestsCookieJar, self).update(other)

    def _find(self, name, domain=None, path=None):
        """Requests uses this method internally to get cookie values. Takes as args name
        and optional domain and path. Returns a cookie.value. If there are conflicting cookies,
        _find arbitrarily chooses one. See _find_no_duplicates if you want an exception thrown
        if there are conflicting cookies."""
        for cookie in iter(self):
            if cookie.name == name:
                if domain is None or cookie.domain == domain:
                    if path is None or cookie.path == path:
                        return cookie.value

        raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))

    def _find_no_duplicates(self, name, domain=None, path=None):
        """__get_item__ and get call _find_no_duplicates -- never used in Requests internally.
        Takes as args name and optional domain and path. Returns a cookie.value.
        Throws KeyError if cookie is not found and CookieConflictError if there are
        multiple cookies that match name and optionally domain and path."""
        toReturn = None
        for cookie in iter(self):
            if cookie.name == name:
                if domain is None or cookie.domain == domain:
                    if path is None or cookie.path == path:
                        if toReturn is not None:  # if there are multiple cookies that meet passed in criteria
                            raise CookieConflictError('There are multiple cookies with name, %r' % (name))
                        toReturn = cookie.value  # we will eventually return this as long as no cookie conflict

        if toReturn:
            return toReturn
        raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))

    def __getstate__(self):
        """Unlike a normal CookieJar, this class is pickleable."""
        state = self.__dict__.copy()
        # remove the unpickleable RLock object
        state.pop('_cookies_lock')
        return state

    def __setstate__(self, state):
        """Unlike a normal CookieJar, this class is pickleable."""
        self.__dict__.update(state)
        if '_cookies_lock' not in self.__dict__:
            self._cookies_lock = threading.RLock()

    def copy(self):
        """Return a copy of this RequestsCookieJar."""
        new_cj = RequestsCookieJar()
        new_cj.update(self)
        return new_cj


def create_cookie(name, value, **kwargs):
    """Make a cookie from underspecified parameters.

    By default, the pair of `name` and `value` will be set for the domain ''
    and sent on every request (this is sometimes called a "supercookie").
    """
    result = dict(
        version=0,
        name=name,
        value=value,
        port=None,
        domain='',
        path='/',
        secure=False,
        expires=None,
        discard=True,
        comment=None,
        comment_url=None,
        rest={'HttpOnly': None},
        rfc2109=False,)

    badargs = set(kwargs) - set(result)
    if badargs:
        err = 'create_cookie() got unexpected keyword arguments: %s'
        raise TypeError(err % list(badargs))

    result.update(kwargs)
    result['port_specified'] = bool(result['port'])
    result['domain_specified'] = bool(result['domain'])
    result['domain_initial_dot'] = result['domain'].startswith('.')
    result['path_specified'] = bool(result['path'])

    return cookielib.Cookie(**result)


def morsel_to_cookie(morsel):
    """Convert a Morsel object into a Cookie containing the one k/v pair."""

    expires = None
    if morsel['max-age']:
        expires = time.time() + morsel['max-age']
    elif morsel['expires']:
        time_template = '%a, %d-%b-%Y %H:%M:%S GMT'
        expires = time.mktime(
            time.strptime(morsel['expires'], time_template)) - time.timezone
    return create_cookie(
        comment=morsel['comment'],
        comment_url=bool(morsel['comment']),
        discard=False,
        domain=morsel['domain'],
        expires=expires,
        name=morsel.key,
        path=morsel['path'],
        port=None,
        rest={'HttpOnly': morsel['httponly']},
        rfc2109=False,
        secure=bool(morsel['secure']),
        value=morsel.value,
        version=morsel['version'] or 0,
    )


def cookiejar_from_dict(cookie_dict, cookiejar=None, overwrite=True):
    """Returns a CookieJar from a key/value dictionary.

    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :param cookiejar: (optional) A cookiejar to add the cookies to.
    :param overwrite: (optional) If False, will not replace cookies
        already in the jar with new ones.
    """
    if cookiejar is None:
        cookiejar = RequestsCookieJar()

    if cookie_dict is not None:
        names_from_jar = [cookie.name for cookie in cookiejar]
        for name in cookie_dict:
            if overwrite or (name not in names_from_jar):
                cookiejar.set_cookie(create_cookie(name, cookie_dict[name]))

    return cookiejar


def merge_cookies(cookiejar, cookies):
    """Add cookies to cookiejar and returns a merged CookieJar.

    :param cookiejar: CookieJar object to add the cookies to.
    :param cookies: Dictionary or CookieJar object to be added.
    """
    if not isinstance(cookiejar, cookielib.CookieJar):
        raise ValueError('You can only merge into CookieJar')
    
    if isinstance(cookies, dict):
        cookiejar = cookiejar_from_dict(
            cookies, cookiejar=cookiejar, overwrite=False)
    elif isinstance(cookies, cookielib.CookieJar):
        try:
            cookiejar.update(cookies)
        except AttributeError:
            for cookie_in_jar in cookies:
                cookiejar.set_cookie(cookie_in_jar)

    return cookiejar
python3.3/site-packages/pip/_vendor/requests/exceptions.py000064400000003525151733566750017712 0ustar00# -*- coding: utf-8 -*-

"""
requests.exceptions
~~~~~~~~~~~~~~~~~~~

This module contains the set of Requests' exceptions.

"""
from .packages.urllib3.exceptions import HTTPError as BaseHTTPError


class RequestException(IOError):
    """There was an ambiguous exception that occurred while handling your
    request."""

    def __init__(self, *args, **kwargs):
        """
        Initialize RequestException with `request` and `response` objects.
        """
        response = kwargs.pop('response', None)
        self.response = response
        self.request = kwargs.pop('request', None)
        if (response is not None and not self.request and
                hasattr(response, 'request')):
            self.request = self.response.request
        super(RequestException, self).__init__(*args, **kwargs)


class HTTPError(RequestException):
    """An HTTP error occurred."""


class ConnectionError(RequestException):
    """A Connection error occurred."""


class ProxyError(ConnectionError):
    """A proxy error occurred."""


class SSLError(ConnectionError):
    """An SSL error occurred."""


class Timeout(RequestException):
    """The request timed out."""


class URLRequired(RequestException):
    """A valid URL is required to make a request."""


class TooManyRedirects(RequestException):
    """Too many redirects."""


class MissingSchema(RequestException, ValueError):
    """The URL schema (e.g. http or https) is missing."""


class InvalidSchema(RequestException, ValueError):
    """See defaults.py for valid schemas."""


class InvalidURL(RequestException, ValueError):
    """ The URL provided was somehow invalid. """


class ChunkedEncodingError(RequestException):
    """The server declared chunked encoding but sent an invalid chunk."""


class ContentDecodingError(RequestException, BaseHTTPError):
    """Failed to decode response content"""
python3.3/site-packages/pip/_vendor/requests/cacert.pem000064400001132322151733566750017122 0ustar00# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Issuer: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
# Subject: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
# Label: "GTE CyberTrust Global Root"
# Serial: 421
# MD5 Fingerprint: ca:3d:d3:68:f1:03:5c:d0:32:fa:b8:2b:59:e8:5a:db
# SHA1 Fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74
# SHA256 Fingerprint: a5:31:25:18:8d:21:10:aa:96:4b:02:c7:b7:c6:da:32:03:17:08:94:e5:fb:71:ff:fb:66:67:d5:e6:81:0a:36
-----BEGIN CERTIFICATE-----
MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
-----END CERTIFICATE-----

# Issuer: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
# Subject: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
# Label: "Thawte Server CA"
# Serial: 1
# MD5 Fingerprint: c5:70:c4:a2:ed:53:78:0c:c8:10:53:81:64:cb:d0:1d
# SHA1 Fingerprint: 23:e5:94:94:51:95:f2:41:48:03:b4:d5:64:d2:a3:a3:f5:d8:8b:8c
# SHA256 Fingerprint: b4:41:0b:73:e2:e6:ea:ca:47:fb:c4:2f:8f:a4:01:8a:f4:38:1d:c5:4c:fa:a8:44:50:46:1e:ed:09:45:4d:e9
-----BEGIN CERTIFICATE-----
MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
-----END CERTIFICATE-----

# Issuer: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
# Subject: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
# Label: "Thawte Premium Server CA"
# Serial: 1
# MD5 Fingerprint: 06:9f:69:79:16:66:90:02:1b:8c:8c:a2:c3:07:6f:3a
# SHA1 Fingerprint: 62:7f:8d:78:27:65:63:99:d2:7d:7f:90:44:c9:fe:b3:f3:3e:fa:9a
# SHA256 Fingerprint: ab:70:36:36:5c:71:54:aa:29:c2:c2:9f:5d:41:91:16:3b:16:2a:22:25:01:13:57:d5:6d:07:ff:a7:bc:1f:72
-----BEGIN CERTIFICATE-----
MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
-----END CERTIFICATE-----

# Issuer: O=Equifax OU=Equifax Secure Certificate Authority
# Subject: O=Equifax OU=Equifax Secure Certificate Authority
# Label: "Equifax Secure CA"
# Serial: 903804111
# MD5 Fingerprint: 67:cb:9d:c0:13:24:8a:82:9b:b2:17:1e:d1:1b:ec:d4
# SHA1 Fingerprint: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a
# SHA256 Fingerprint: 08:29:7a:40:47:db:a2:36:80:c7:31:db:6e:31:76:53:ca:78:48:e1:be:bd:3a:0b:01:79:a7:07:f9:2c:f1:78
-----BEGIN CERTIFICATE-----
MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
-----END CERTIFICATE-----

# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
# Label: "Verisign Class 3 Public Primary Certification Authority"
# Serial: 149843929435818692848040365716851702463
# MD5 Fingerprint: 10:fc:63:5d:f6:26:3e:0d:f3:25:be:5f:79:cd:67:67
# SHA1 Fingerprint: 74:2c:31:92:e6:07:e4:24:eb:45:49:54:2b:e1:bb:c5:3e:61:74:e2
# SHA256 Fingerprint: e7:68:56:34:ef:ac:f6:9a:ce:93:9a:6b:25:5b:7b:4f:ab:ef:42:93:5b:50:a2:65:ac:b5:cb:60:27:e4:4e:70
-----BEGIN CERTIFICATE-----
MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
-----END CERTIFICATE-----

# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
# Label: "Verisign Class 3 Public Primary Certification Authority - G2"
# Serial: 167285380242319648451154478808036881606
# MD5 Fingerprint: a2:33:9b:4c:74:78:73:d4:6c:e7:c1:f3:8d:cb:5c:e9
# SHA1 Fingerprint: 85:37:1c:a6:e5:50:14:3d:ce:28:03:47:1b:de:3a:09:e8:f8:77:0f
# SHA256 Fingerprint: 83:ce:3c:12:29:68:8a:59:3d:48:5f:81:97:3c:0f:91:95:43:1e:da:37:cc:5e:36:43:0e:79:c7:a8:88:63:8b
-----BEGIN CERTIFICATE-----
MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
oJ2daZH9
-----END CERTIFICATE-----

# Issuer: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
# Subject: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
# Label: "GlobalSign Root CA"
# Serial: 4835703278459707669005204
# MD5 Fingerprint: 3e:45:52:15:09:51:92:e1:b7:5d:37:9f:b1:87:29:8a
# SHA1 Fingerprint: b1:bc:96:8b:d4:f4:9d:62:2a:a8:9a:81:f2:15:01:52:a4:1d:82:9c
# SHA256 Fingerprint: eb:d4:10:40:e4:bb:3e:c7:42:c9:e3:81:d3:1e:f2:a4:1a:48:b6:68:5c:96:e7:ce:f3:c1:df:6c:d4:33:1c:99
-----BEGIN CERTIFICATE-----
MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B
AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz
yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE
38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP
AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
-----END CERTIFICATE-----

# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
# Label: "GlobalSign Root CA - R2"
# Serial: 4835703278459682885658125
# MD5 Fingerprint: 94:14:77:7e:3e:5e:fd:8f:30:bd:41:b0:cf:e7:d0:30
# SHA1 Fingerprint: 75:e0:ab:b6:13:85:12:27:1c:04:f8:5f:dd:de:38:e4:b7:24:2e:fe
# SHA256 Fingerprint: ca:42:dd:41:74:5f:d0:b8:1e:b9:02:36:2c:f9:d8:bf:71:9d:a1:bd:1b:1e:fc:94:6f:5b:4c:99:f4:2c:1b:9e
-----BEGIN CERTIFICATE-----
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
-----END CERTIFICATE-----

# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
# Label: "ValiCert Class 1 VA"
# Serial: 1
# MD5 Fingerprint: 65:58:ab:15:ad:57:6c:1e:a8:a7:b5:69:ac:bf:ff:eb
# SHA1 Fingerprint: e5:df:74:3c:b6:01:c4:9b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e
# SHA256 Fingerprint: f4:c1:49:55:1a:30:13:a3:5b:c7:bf:fe:17:a7:f3:44:9b:c1:ab:5b:5a:0a:e7:4b:06:c2:3b:90:00:4c:01:04
-----BEGIN CERTIFICATE-----
MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
-----END CERTIFICATE-----

# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
# Label: "ValiCert Class 2 VA"
# Serial: 1
# MD5 Fingerprint: a9:23:75:9b:ba:49:36:6e:31:c2:db:f2:e7:66:ba:87
# SHA1 Fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6
# SHA256 Fingerprint: 58:d0:17:27:9c:d4:dc:63:ab:dd:b1:96:a6:c9:90:6c:30:c4:e0:87:83:ea:e8:c1:60:99:54:d6:93:55:59:6b
-----BEGIN CERTIFICATE-----
MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
-----END CERTIFICATE-----

# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
# Label: "RSA Root Certificate 1"
# Serial: 1
# MD5 Fingerprint: a2:6f:53:b7:ee:40:db:4a:68:e7:fa:18:d9:10:4b:72
# SHA1 Fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb
# SHA256 Fingerprint: bc:23:f9:8a:31:3c:b9:2d:e3:bb:fc:3a:5a:9f:44:61:ac:39:49:4c:4a:e1:5a:9e:9d:f1:31:e9:9b:73:01:9a
-----BEGIN CERTIFICATE-----
MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy
NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD
cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs
2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY
JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE
Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
# Label: "Verisign Class 3 Public Primary Certification Authority - G3"
# Serial: 206684696279472310254277870180966723415
# MD5 Fingerprint: cd:68:b6:a7:c7:c4:ce:75:e0:1d:4f:57:44:61:92:09
# SHA1 Fingerprint: 13:2d:0d:45:53:4b:69:97:cd:b2:d5:c3:39:e2:55:76:60:9b:5c:c6
# SHA256 Fingerprint: eb:04:cf:5e:b1:f3:9a:fa:76:2f:2b:b1:20:f2:96:cb:a5:20:c1:b9:7d:b1:58:95:65:b8:1c:b9:a1:7b:72:44
-----BEGIN CERTIFICATE-----
MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b
N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t
KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu
kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm
CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ
Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
# Label: "Verisign Class 4 Public Primary Certification Authority - G3"
# Serial: 314531972711909413743075096039378935511
# MD5 Fingerprint: db:c8:f2:27:2e:b1:ea:6a:29:23:5d:fe:56:3e:33:df
# SHA1 Fingerprint: c8:ec:8c:87:92:69:cb:4b:ab:39:e9:8d:7e:57:67:f3:14:95:73:9d
# SHA256 Fingerprint: e3:89:36:0d:0f:db:ae:b3:d2:50:58:4b:47:30:31:4e:22:2f:39:c1:56:a0:20:14:4e:8d:96:05:61:79:15:06
-----BEGIN CERTIFICATE-----
MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1
GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ
+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd
U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm
NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY
ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/
ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1
CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
-----END CERTIFICATE-----

# Issuer: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
# Subject: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
# Label: "Entrust.net Secure Server CA"
# Serial: 927650371
# MD5 Fingerprint: df:f2:80:73:cc:f1:e6:61:73:fc:f5:42:e9:c5:7c:ee
# SHA1 Fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39
# SHA256 Fingerprint: 62:f2:40:27:8c:56:4c:4d:d8:bf:7d:9d:4f:6f:36:6e:a8:94:d2:2f:5f:34:d9:89:a9:83:ac:ec:2f:ff:ed:50
-----BEGIN CERTIFICATE-----
MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3
wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC
AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb
oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5
BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p
dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
-----END CERTIFICATE-----

# Issuer: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
# Subject: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
# Label: "Entrust.net Premium 2048 Secure Server CA"
# Serial: 946069240
# MD5 Fingerprint: ee:29:31:bc:32:7e:9a:e6:e8:b5:f7:51:b4:34:71:90
# SHA1 Fingerprint: 50:30:06:09:1d:97:d4:f5:ae:39:f7:cb:e7:92:7d:7d:65:2d:34:31
# SHA256 Fingerprint: 6d:c4:71:72:e0:1c:bc:b0:bf:62:58:0d:89:5f:e2:b8:ac:9a:d4:f8:73:80:1e:0c:10:b9:c8:37:d2:1e:b1:77
-----BEGIN CERTIFICATE-----
MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0yOTA3
MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
4QIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV
HQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJKoZIhvcNAQEFBQADggEBADub
j1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPyT/4xmf3IDExo
U8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf
zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5b
u/8j72gZyxKTJ1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+
bYQLCIt+jerXmCHG8+c8eS9enNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/Er
fF6adulZkMV8gzURZVE=
-----END CERTIFICATE-----

# Issuer: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
# Subject: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
# Label: "Baltimore CyberTrust Root"
# Serial: 33554617
# MD5 Fingerprint: ac:b6:94:a5:9c:17:e0:d7:91:52:9b:b1:97:06:a6:e4
# SHA1 Fingerprint: d4:de:20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74
# SHA256 Fingerprint: 16:af:57:a9:f6:76:b0:ab:12:60:95:aa:5e:ba:de:f2:2a:b3:11:19:d6:44:ac:95:cd:4b:93:db:f3:f2:6a:eb
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
-----END CERTIFICATE-----

# Issuer: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
# Subject: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
# Label: "Equifax Secure Global eBusiness CA"
# Serial: 1
# MD5 Fingerprint: 8f:5d:77:06:27:c4:98:3c:5b:93:78:e7:d7:7d:9b:cc
# SHA1 Fingerprint: 7e:78:4a:10:1c:82:65:cc:2d:e1:f1:6d:47:b4:40:ca:d9:0a:19:45
# SHA256 Fingerprint: 5f:0b:62:ea:b5:e3:53:ea:65:21:65:16:58:fb:b6:53:59:f4:43:28:0a:4a:fb:d1:04:d7:7d:10:f9:f0:4c:07
-----BEGIN CERTIFICATE-----
MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc
MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT
ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw
MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj
dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l
c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC
UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc
58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/
o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH
MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr
aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA
A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA
Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv
8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
-----END CERTIFICATE-----

# Issuer: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
# Subject: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
# Label: "Equifax Secure eBusiness CA 1"
# Serial: 4
# MD5 Fingerprint: 64:9c:ef:2e:44:fc:c6:8f:52:07:d0:51:73:8f:cb:3d
# SHA1 Fingerprint: da:40:18:8b:91:89:a3:ed:ee:ae:da:97:fe:2f:9d:f5:b7:d1:8a:41
# SHA256 Fingerprint: cf:56:ff:46:a4:a1:86:10:9d:d9:65:84:b5:ee:b5:8a:51:0c:42:75:b0:e5:f9:4f:40:bb:ae:86:5e:19:f6:73
-----BEGIN CERTIFICATE-----
MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc
MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT
ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw
MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j
LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ
KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo
RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu
WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw
Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD
AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK
eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM
zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+
WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
/Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==
-----END CERTIFICATE-----

# Issuer: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
# Subject: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
# Label: "AddTrust Low-Value Services Root"
# Serial: 1
# MD5 Fingerprint: 1e:42:95:02:33:92:6b:b9:5f:c0:7f:da:d6:b2:4b:fc
# SHA1 Fingerprint: cc:ab:0e:a0:4c:23:01:d6:69:7b:dd:37:9f:cd:12:eb:24:e3:94:9d
# SHA256 Fingerprint: 8c:72:09:27:9a:c0:4e:27:5e:16:d0:7f:d3:b7:75:e8:01:54:b5:96:80:46:e3:1f:52:dd:25:76:63:24:e9:a7
-----BEGIN CERTIFICATE-----
MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMw
MTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYD
VQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUA
A4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ul
CDtbKRY654eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6n
tGO0/7Gcrjyvd7ZWxbWroulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyl
dI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1Zmne3yzxbrww2ywkEtvrNTVokMsAsJch
PXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJuiGMx1I4S+6+JNM3GOGvDC
+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8wHQYDVR0O
BBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8E
BTADAQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBl
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFk
ZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENB
IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxtZBsfzQ3duQH6lmM0MkhHma6X
7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0PhiVYrqW9yTkkz
43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl
pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA
WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
-----END CERTIFICATE-----

# Issuer: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
# Subject: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
# Label: "AddTrust External Root"
# Serial: 1
# MD5 Fingerprint: 1d:35:54:04:85:78:b0:3f:42:42:4d:bf:20:73:0a:3f
# SHA1 Fingerprint: 02:fa:f3:e2:91:43:54:68:60:78:57:69:4d:f5:e4:5b:68:85:18:68
# SHA256 Fingerprint: 68:7f:a4:51:38:22:78:ff:f0:c8:b1:1f:8d:43:d5:76:67:1c:6e:b2:bc:ea:b4:13:fb:83:d9:65:d0:6d:2f:f2
-----BEGIN CERTIFICATE-----
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
-----END CERTIFICATE-----

# Issuer: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
# Subject: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
# Label: "AddTrust Public Services Root"
# Serial: 1
# MD5 Fingerprint: c1:62:3e:23:c5:82:73:9c:03:59:4b:2b:e9:77:49:7f
# SHA1 Fingerprint: 2a:b6:28:48:5e:78:fb:f3:ad:9e:79:10:dd:6b:df:99:72:2c:96:e5
# SHA256 Fingerprint: 07:91:ca:07:49:b2:07:82:aa:d3:c7:d7:bd:0c:df:c9:48:58:35:84:3e:b2:d7:99:60:09:ce:43:ab:6c:69:27
-----BEGIN CERTIFICATE-----
MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
b3JrMSAwHgYDVQQDExdBZGRUcnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAx
MDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtB
ZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIDAeBgNV
BAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV
6tsfSlbunyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nX
GCwwfQ56HmIexkvA/X1id9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnP
dzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSGAa2Il+tmzV7R/9x98oTaunet3IAIx6eH
1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAwHM+A+WD+eeSI8t0A65RF
62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0GA1UdDgQW
BBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUw
AwEB/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDEL
MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRU
cnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJv
b3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6
IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/
iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh
4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm
XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
-----END CERTIFICATE-----

# Issuer: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
# Subject: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
# Label: "AddTrust Qualified Certificates Root"
# Serial: 1
# MD5 Fingerprint: 27:ec:39:47:cd:da:5a:af:e2:9a:01:65:21:a9:4c:bb
# SHA1 Fingerprint: 4d:23:78:ec:91:95:39:b5:00:7f:75:8f:03:3b:21:1e:c5:4d:8b:cf
# SHA256 Fingerprint: 80:95:21:08:05:db:4b:bc:35:5e:44:28:d8:fd:6e:c2:cd:e3:ab:5f:b9:7a:99:42:98:8e:b8:f4:dc:d0:60:16
-----BEGIN CERTIFICATE-----
MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1
MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK
EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIzAh
BgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq
xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G
87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i
2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U
WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G
A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T
AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr
pGkwZzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQL
ExRBZGRUcnVzdCBUVFAgTmV0d29yazEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlm
aWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBABmrder4i2VhlRO6aQTv
hsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxGGuoYQ992zPlm
hpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3
P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y
iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
xqE=
-----END CERTIFICATE-----

# Issuer: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
# Subject: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
# Label: "Entrust Root Certification Authority"
# Serial: 1164660820
# MD5 Fingerprint: d6:a5:c3:ed:5d:dd:3e:00:c1:3d:87:92:1f:1d:3f:e4
# SHA1 Fingerprint: b3:1e:b1:b7:40:e3:6c:84:02:da:dc:37:d4:4d:f5:d4:67:49:52:f9
# SHA256 Fingerprint: 73:c1:76:43:4f:1b:c6:d5:ad:f4:5b:0e:76:e7:27:28:7c:8d:e5:76:16:c1:e6:e6:14:1a:2b:2c:bc:7d:8e:4c
-----BEGIN CERTIFICATE-----
MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC
VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0
Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW
KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl
cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw
NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw
NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy
ZWZlcmVuY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNV
BAMTJEVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBALaVtkNC+sZtKm9I35RMOVcF7sN5EUFo
Nu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYszA9u3g3s+IIRe7bJWKKf4
4LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOwwCj0Yzfv9
KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGI
rb68j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi
94DkZfs0Nw4pgHBNrziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOB
sDCBrTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAi
gA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1MzQyWjAfBgNVHSMEGDAWgBRo
kORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DHhmak8fdLQ/uE
vW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9t
O1KzKtvn1ISMY/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6Zua
AGAT/3B+XxFNSRuzFVJ7yVTav52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP
9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/
eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m
0vdXcDazv/wor3ElhVsT/h5/WrQ8
-----END CERTIFICATE-----

# Issuer: O=RSA Security Inc OU=RSA Security 2048 V3
# Subject: O=RSA Security Inc OU=RSA Security 2048 V3
# Label: "RSA Security 2048 v3"
# Serial: 13297492616345471454730593562152402946
# MD5 Fingerprint: 77:0d:19:b1:21:fd:00:42:9c:3e:0c:a5:dd:0b:02:8e
# SHA1 Fingerprint: 25:01:90:19:cf:fb:d9:99:1c:b7:68:25:74:8d:94:5f:30:93:95:42
# SHA256 Fingerprint: af:8b:67:62:a1:e5:28:22:81:61:a9:5d:5c:55:9e:e2:66:27:8f:75:d7:9e:83:01:89:a5:03:50:6a:bd:6b:4c
-----BEGIN CERTIFICATE-----
MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6
MRkwFwYDVQQKExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJp
dHkgMjA0OCBWMzAeFw0wMTAyMjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAX
BgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAbBgNVBAsTFFJTQSBTZWN1cml0eSAy
MDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt49VcdKA3Xtp
eafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7Jylg
/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGl
wSMiuLgbWhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnh
AMFRD0xS+ARaqn1y07iHKrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2
PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP+Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpu
AWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
BjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4EFgQUB8NR
MKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYc
HnmYv/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/
Zb5gEydxiKRz44Rj0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+
f00/FGj1EVDVwfSQpQgdMWD/YIwjVAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVO
rSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395nzIlQnQFgCi/vcEkllgVsRch
6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kApKnXwiJPZ9d3
7CAFYd4=
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Global CA O=GeoTrust Inc.
# Subject: CN=GeoTrust Global CA O=GeoTrust Inc.
# Label: "GeoTrust Global CA"
# Serial: 144470
# MD5 Fingerprint: f7:75:ab:29:fb:51:4e:b7:77:5e:ff:05:3c:99:8e:f5
# SHA1 Fingerprint: de:28:f4:a4:ff:e5:b9:2f:a3:c5:03:d1:a3:49:a7:f9:96:2a:82:12
# SHA256 Fingerprint: ff:85:6a:2d:25:1d:cd:88:d3:66:56:f4:50:12:67:98:cf:ab:aa:de:40:79:9c:72:2d:e4:d2:b5:db:36:a7:3a
-----BEGIN CERTIFICATE-----
MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
# Subject: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
# Label: "GeoTrust Global CA 2"
# Serial: 1
# MD5 Fingerprint: 0e:40:a7:6c:de:03:5d:8f:d1:0f:e4:d1:8d:f9:6c:a9
# SHA1 Fingerprint: a9:e9:78:08:14:37:58:88:f2:05:19:b0:6d:2b:0d:2b:60:16:90:7d
# SHA256 Fingerprint: ca:2d:82:a0:86:77:07:2f:8a:b6:76:4f:f0:35:67:6c:fe:3e:5e:32:5e:01:21:72:df:3f:92:09:6d:b7:9b:85
-----BEGIN CERTIFICATE-----
MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEW
MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFs
IENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3Qg
R2xvYmFsIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDvPE1A
PRDfO1MA4Wf+lGAVPoWI8YkNkMgoI5kF6CsgncbzYEbYwbLVjDHZ3CB5JIG/NTL8
Y2nbsSpr7iFY8gjpeMtvy/wWUsiRxP89c96xPqfCfWbB9X5SJBri1WeR0IIQ13hL
TytCOb1kLUCgsBDTOEhGiKEMuzozKmKY+wCdE1l/bztyqu6mD4b5BWHqZ38MN5aL
5mkWRxHCJ1kDs6ZgwiFAVvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7
S4wMcoKK+xfNAGw6EzywhIdLFnopsk/bHdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe
2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNHK266ZUap
EBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6td
EPx7srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv
/NgdRN3ggX+d6YvhZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywN
A0ZF66D0f0hExghAzN4bcLUprbqLOzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0
abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkCx1YAzUm5s2x7UwQa4qjJqhIF
I8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqFH4z1Ir+rzoPz
4iIprn2DQKi6bA==
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Universal CA O=GeoTrust Inc.
# Subject: CN=GeoTrust Universal CA O=GeoTrust Inc.
# Label: "GeoTrust Universal CA"
# Serial: 1
# MD5 Fingerprint: 92:65:58:8b:a2:1a:31:72:73:68:5c:b4:a5:7a:07:48
# SHA1 Fingerprint: e6:21:f3:35:43:79:05:9a:4b:68:30:9d:8a:2f:74:22:15:87:ec:79
# SHA256 Fingerprint: a0:45:9b:9f:63:b2:25:59:f5:fa:5d:4c:6d:b3:f9:f7:2f:f1:93:42:03:35:78:f0:73:bf:1d:1b:46:cb:b9:12
-----BEGIN CERTIFICATE-----
MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW
MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVy
c2FsIENBMB4XDTA0MDMwNDA1MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UE
BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHjAcBgNVBAMTFUdlb1RydXN0
IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKYV
VaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9tJPi8
cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTT
QjOgNB0eRXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFh
F7em6fgemdtzbvQKoiFs7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2v
c7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d8Lsrlh/eezJS/R27tQahsiFepdaVaH/w
mZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7VqnJNk22CDtucvc+081xd
VHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3CgaRr0BHdCX
teGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZ
f9hBZ3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfRe
Bi9Fi1jUIxaS5BZuKGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+
nhutxx9z3SxPGWX9f5NAEC7S8O08ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB
/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0XG0D08DYj3rWMB8GA1UdIwQY
MBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG
9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fX
IwjhmF7DWgh2qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzyn
ANXH/KttgCJwpQzgXQQpAvvLoJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0z
uzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsKxr2EoyNB3tZ3b4XUhRxQ4K5RirqN
Pnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxFKyDuSN/n3QmOGKja
QI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2DFKW
koRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9
ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt
DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm
bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw=
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
# Subject: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
# Label: "GeoTrust Universal CA 2"
# Serial: 1
# MD5 Fingerprint: 34:fc:b8:d0:36:db:9e:14:b3:c2:f2:db:8f:e4:94:c7
# SHA1 Fingerprint: 37:9a:19:7b:41:85:45:35:0c:a6:03:69:f3:3c:2e:af:47:4f:20:79
# SHA256 Fingerprint: a0:23:4f:3b:c8:52:7c:a5:62:8e:ec:81:ad:5d:69:89:5d:a5:68:0d:c9:1d:1c:b8:47:7f:33:f8:78:b9:5b:0b
-----BEGIN CERTIFICATE-----
MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW
MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy
c2FsIENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYD
VQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1
c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
AQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0DE81
WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUG
FF+3Qs17j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdq
XbboW0W63MOhBW9Wjo8QJqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxL
se4YuU6W3Nx2/zu+z18DwPw76L5GG//aQMJS9/7jOvdqdzXQ2o3rXhhqMcceujwb
KNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2WP0+GfPtDCapkzj4T8Fd
IgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP20gaXT73
y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRt
hAAnZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgoc
QIgfksILAAX/8sgCSqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4
Lt1ZrtmhN79UNdxzMk+MBB4zsslG8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAfBgNV
HSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8EBAMCAYYwDQYJ
KoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQ
L1EuxBRa3ugZ4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgr
Fg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSo
ag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaY
T1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz
GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m
1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV
OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH
6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX
QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
-----END CERTIFICATE-----

# Issuer: CN=America Online Root Certification Authority 1 O=America Online Inc.
# Subject: CN=America Online Root Certification Authority 1 O=America Online Inc.
# Label: "America Online Root Certification Authority 1"
# Serial: 1
# MD5 Fingerprint: 14:f1:08:ad:9d:fa:64:e2:89:e7:1c:cf:a8:ad:7d:5e
# SHA1 Fingerprint: 39:21:c1:15:c1:5d:0e:ca:5c:cb:5b:c4:f0:7d:21:d8:05:0b:56:6a
# SHA256 Fingerprint: 77:40:73:12:c6:3a:15:3d:5b:c0:0b:4e:51:75:9c:df:da:c2:37:dc:2a:33:b6:79:46:e9:8e:9b:fa:68:0a:e3
-----BEGIN CERTIFICATE-----
MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2
MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lk
hsmj76CGv2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym
1BW32J/X3HGrfpq/m44zDyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsW
OqMFf6Dch9Wc/HKpoH145LcxVR5lu9RhsCFg7RAycsWSJR74kEoYeEfffjA3PlAb
2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP8c9GsEsPPt2IYriMqQko
O3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAU
AK3Zo/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
BQUAA4IBAQB8itEfGDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkF
Zu90821fnZmv9ov761KyBZiibyrFVL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAb
LjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir
oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C
MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
-----END CERTIFICATE-----

# Issuer: CN=America Online Root Certification Authority 2 O=America Online Inc.
# Subject: CN=America Online Root Certification Authority 2 O=America Online Inc.
# Label: "America Online Root Certification Authority 2"
# Serial: 1
# MD5 Fingerprint: d6:ed:3c:ca:e2:66:0f:af:10:43:0d:77:9b:04:09:bf
# SHA1 Fingerprint: 85:b5:ff:67:9b:0c:79:96:1f:c8:6e:44:22:00:46:13:db:17:92:84
# SHA256 Fingerprint: 7d:3b:46:5a:60:14:e5:26:c0:af:fc:ee:21:27:d2:31:17:27:ad:81:1c:26:84:2d:00:6a:f3:73:06:cc:80:bd
-----BEGIN CERTIFICATE-----
MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2
MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
ADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC
206B89enfHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFci
KtZHgVdEglZTvYYUAQv8f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2
JxhP7JsowtS013wMPgwr38oE18aO6lhOqKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9
BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JNRvCAOVIyD+OEsnpD8l7e
Xz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0gBe4lL8B
PeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67
Xnfn6KVuY8INXWHQjNJsWiEOyiijzirplcdIz5ZvHZIlyMbGwcEMBawmxNJ10uEq
Z8A9W6Wa6897GqidFEXlD6CaZd4vKL3Ob5Rmg0gp2OpljK+T2WSfVVcmv2/LNzGZ
o2C7HK2JNDJiuEMhBnIMoVxtRsX6Kc8w3onccVvdtjc+31D1uAclJuW8tf48ArO3
+L5DwYcRlJ4jbBeKuIonDFRH8KmzwICMoCfrHRnjB453cMor9H124HhnAgMBAAGj
YzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE1FwWg4u3OpaaEg5+31IqEj
FNeeMB8GA1UdIwQYMBaAFE1FwWg4u3OpaaEg5+31IqEjFNeeMA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmn
xPBUlgtk87FYT15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2
LHo1YGwRgJfMqZJS5ivmae2p+DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzccc
obGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXgJXUjhx5c3LqdsKyzadsXg8n33gy8
CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//ZoyzH1kUQ7rVyZ2OuMe
IjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgOZtMA
DjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2F
AjgQ5ANh1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUX
Om/9riW99XJZZLF0KjhfGEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPb
AZO1XB4Y3WRayhgoPmMEEf0cjQAPuDffZ4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQl
Zvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuPcX/9XhmgD0uRuMRUvAaw
RY8mkaKO/qk=
-----END CERTIFICATE-----

# Issuer: CN=Visa eCommerce Root O=VISA OU=Visa International Service Association
# Subject: CN=Visa eCommerce Root O=VISA OU=Visa International Service Association
# Label: "Visa eCommerce Root"
# Serial: 25952180776285836048024890241505565794
# MD5 Fingerprint: fc:11:b8:d8:08:93:30:00:6d:23:f9:7e:eb:52:1e:02
# SHA1 Fingerprint: 70:17:9b:86:8c:00:a4:fa:60:91:52:22:3f:9f:3e:32:bd:e0:05:62
# SHA256 Fingerprint: 69:fa:c9:bd:55:fb:0a:c7:8d:53:bb:ee:5c:f1:d5:97:98:9f:d0:aa:ab:20:a2:51:51:bd:f1:73:3e:e7:d1:22
-----BEGIN CERTIFICATE-----
MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBr
MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl
cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv
bW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2WhcNMjIwNjI0MDAxNjEyWjBrMQsw
CQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5h
dGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1l
cmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h
2mCxlCfLF9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4E
lpF7sDPwsRROEW+1QK8bRaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdV
ZqW1LS7YgFmypw23RuwhY/81q6UCzyr0TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq
299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI/k4+oKsGGelT84ATB+0t
vz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzsGHxBvfaL
dXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD
AgEGMB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUF
AAOCAQEAX/FBfXxcCLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcR
zCSs00Rsca4BIGsDoo8Ytyk6feUWYFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3
LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd
7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw
++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
398znM/jra6O1I7mT1GvFpLgXPYHDw==
-----END CERTIFICATE-----

# Issuer: CN=Certum CA O=Unizeto Sp. z o.o.
# Subject: CN=Certum CA O=Unizeto Sp. z o.o.
# Label: "Certum Root CA"
# Serial: 65568
# MD5 Fingerprint: 2c:8f:9f:66:1d:18:90:b1:47:26:9d:8e:86:82:8c:a9
# SHA1 Fingerprint: 62:52:dc:40:f7:11:43:a2:2f:de:9e:f7:34:8e:06:42:51:b1:81:18
# SHA256 Fingerprint: d8:e0:fe:bc:1d:b2:e3:8d:00:94:0f:37:d2:7d:41:34:4d:99:3e:73:4b:99:d5:65:6d:97:78:d4:d8:14:36:24
-----BEGIN CERTIFICATE-----
MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM
MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD
QTAeFw0wMjA2MTExMDQ2MzlaFw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBM
MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD
QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6xwS7TT3zNJc4YPk/E
jG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdLkKWo
ePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GI
ULdtlkIJ89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapu
Ob7kky/ZR6By6/qmW6/KUz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUg
AKpoC6EahQGcxEZjgoi2IrHu/qpGWX7PNSzVttpd90gzFFS269lvzs2I1qsb2pY7
HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEA
uI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+GXYkHAQa
TOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTg
xSvgGrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1q
CjqTE5s7FCMTY5w/0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5x
O/fIR/RpbxXyEV6DHpx8Uq79AtoSqFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs
6GAqm4VKQPNriiTsBhYscw==
-----END CERTIFICATE-----

# Issuer: CN=AAA Certificate Services O=Comodo CA Limited
# Subject: CN=AAA Certificate Services O=Comodo CA Limited
# Label: "Comodo AAA Services root"
# Serial: 1
# MD5 Fingerprint: 49:79:04:b0:eb:87:19:ac:47:b0:bc:11:51:9b:74:d0
# SHA1 Fingerprint: d1:eb:23:a4:6d:17:d6:8f:d9:25:64:c2:f1:f1:60:17:64:d8:e3:49
# SHA256 Fingerprint: d7:a7:a0:fb:5d:7e:27:31:d7:71:e9:48:4e:bc:de:f7:1d:5f:0c:3e:0a:29:48:78:2b:c8:3e:e0:ea:69:9e:f4
-----BEGIN CERTIFICATE-----
MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj
YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL
MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM
GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua
BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe
3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4
YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR
rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm
ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU
oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v
QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
-----END CERTIFICATE-----

# Issuer: CN=Secure Certificate Services O=Comodo CA Limited
# Subject: CN=Secure Certificate Services O=Comodo CA Limited
# Label: "Comodo Secure Services root"
# Serial: 1
# MD5 Fingerprint: d3:d9:bd:ae:9f:ac:67:24:b3:c8:1b:52:e1:b9:a9:bd
# SHA1 Fingerprint: 4a:65:d5:f4:1d:ef:39:b8:b8:90:4a:4a:d3:64:81:33:cf:c7:a1:d1
# SHA256 Fingerprint: bd:81:ce:3b:4f:65:91:d1:1a:67:b5:fc:7a:47:fd:ef:25:52:1b:f9:aa:4e:18:b9:e3:df:2e:34:a7:80:3b:e8
-----BEGIN CERTIFICATE-----
MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRp
ZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVow
fjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAiBgNV
BAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPM
cm3ye5drswfxdySRXyWP9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3S
HpR7LZQdqnXXs5jLrLxkU0C8j6ysNstcrbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996
CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rCoznl2yY4rYsK7hljxxwk
3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3Vp6ea5EQz
6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNV
HQ4EFgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1Ud
EwEB/wQFMAMBAf8wgYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2Rv
Y2EuY29tL1NlY3VyZUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRw
Oi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmww
DQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q0
5qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj
Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI
gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ
aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl
izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk=
-----END CERTIFICATE-----

# Issuer: CN=Trusted Certificate Services O=Comodo CA Limited
# Subject: CN=Trusted Certificate Services O=Comodo CA Limited
# Label: "Comodo Trusted Services root"
# Serial: 1
# MD5 Fingerprint: 91:1b:3f:6e:cd:9e:ab:ee:07:fe:1f:71:d2:b3:61:27
# SHA1 Fingerprint: e1:9f:e3:0e:8b:84:60:9e:80:9b:17:0d:72:a8:c5:ba:6e:14:09:bd
# SHA256 Fingerprint: 3f:06:e5:56:81:d4:96:f5:be:16:9e:b5:38:9f:9f:2b:8f:f6:1e:17:08:df:68:81:72:48:49:cd:5d:27:cb:69
-----BEGIN CERTIFICATE-----
MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0
aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEwMDAwMDBaFw0yODEyMzEyMzU5NTla
MH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
BgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUwIwYD
VQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWW
fnJSoBVC21ndZHoa0Lh73TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMt
TGo87IvDktJTdyR0nAducPy9C1t2ul/y/9c3S0pgePfw+spwtOpZqqPOSC+pw7IL
fhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6juljatEPmsbS9Is6FARW
1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsSivnkBbA7
kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0G
A1UdDgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYD
VR0TAQH/BAUwAwEB/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21v
ZG9jYS5jb20vVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRo
dHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMu
Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFTQQuS9/
HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS
jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+
xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn
dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi
-----END CERTIFICATE-----

# Issuer: CN=QuoVadis Root Certification Authority O=QuoVadis Limited OU=Root Certification Authority
# Subject: CN=QuoVadis Root Certification Authority O=QuoVadis Limited OU=Root Certification Authority
# Label: "QuoVadis Root CA"
# Serial: 985026699
# MD5 Fingerprint: 27:de:36:fe:72:b7:00:03:00:9d:f4:f0:1e:6c:04:24
# SHA1 Fingerprint: de:3f:40:bd:50:93:d3:9b:6c:60:f6:da:bc:07:62:01:00:89:76:c9
# SHA256 Fingerprint: a4:5e:de:3b:bb:f0:9c:8a:e1:5c:72:ef:c0:72:68:d6:93:a2:1c:99:6f:d5:1e:67:ca:07:94:60:fd:6d:88:73
-----BEGIN CERTIFICATE-----
MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC
TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0
aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0
aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAzMTkxODMzMzNaFw0yMTAzMTcxODMz
MzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUw
IwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQDEyVR
dW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Yp
li4kVEAkOPcahdxYTMukJ0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2D
rOpm2RgbaIr1VxqYuvXtdj182d6UajtLF8HVj71lODqV0D1VNk7feVcxKh7YWWVJ
WCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeLYzcS19Dsw3sgQUSj7cug
F+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWenAScOospU
xbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCC
Ak4wPQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVv
dmFkaXNvZmZzaG9yZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREw
ggENMIIBCQYJKwYBBAG+WAABMIH7MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNl
IG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBh
c3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFy
ZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYI
KwYBBQUHAgEWFmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3T
KbkGGew5Oanwl4Rqy+/fMIGuBgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rq
y+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1p
dGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYD
VQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCL
MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSk
fnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf8
7C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1R
cHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0y
mQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQW
xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK
SnQ2+Q==
-----END CERTIFICATE-----

# Issuer: CN=QuoVadis Root CA 2 O=QuoVadis Limited
# Subject: CN=QuoVadis Root CA 2 O=QuoVadis Limited
# Label: "QuoVadis Root CA 2"
# Serial: 1289
# MD5 Fingerprint: 5e:39:7b:dd:f8:ba:ec:82:e9:ac:62:ba:0c:54:00:2b
# SHA1 Fingerprint: ca:3a:fb:cf:12:40:36:4b:44:b2:16:20:88:80:48:39:19:93:7c:f7
# SHA256 Fingerprint: 85:a0:dd:7d:d7:20:ad:b7:ff:05:f8:3d:54:2b:20:9d:c7:ff:45:28:f7:d6:77:b1:83:89:fe:a5:e5:c4:9e:86
-----BEGIN CERTIFICATE-----
MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x
GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv
b3QgQ0EgMjAeFw0wNjExMjQxODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNV
BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W
YWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCa
GMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6XJxg
Fyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55J
WpzmM+Yklvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bB
rrcCaoF6qUWD4gXmuVbBlDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp
+ARz8un+XJiM9XOva7R+zdRcAitMOeGylZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1
ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt66/3FsvbzSUr5R/7mp/i
Ucw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1JdxnwQ5hYIiz
PtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og
/zOhD7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UH
oycR7hYQe7xFSkyyBNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuI
yV77zGHcizN300QyNQliBJIWENieJ0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1Ud
EwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBQahGK8SEwzJQTU7tD2
A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGUa6FJpEcwRTEL
MAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2f
BluornFdLwUvZ+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzn
g/iN/Ae42l9NLmeyhP3ZRPx3UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2Bl
fF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodmVjB3pjd4M1IQWK4/YY7yarHvGH5K
WWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK+JDSV6IZUaUtl0Ha
B0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrWIozc
hLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPR
TUIZ3Ph1WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWD
mbA4CD/pXvk1B+TJYm5Xf6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0Z
ohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y
4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8VCLAAVBpQ570su9t+Oza
8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
-----END CERTIFICATE-----

# Issuer: CN=QuoVadis Root CA 3 O=QuoVadis Limited
# Subject: CN=QuoVadis Root CA 3 O=QuoVadis Limited
# Label: "QuoVadis Root CA 3"
# Serial: 1478
# MD5 Fingerprint: 31:85:3c:62:94:97:63:b9:aa:fd:89:4e:af:6f:e0:cf
# SHA1 Fingerprint: 1f:49:14:f7:d8:74:95:1d:dd:ae:02:c0:be:fd:3a:2d:82:75:51:85
# SHA256 Fingerprint: 18:f1:fc:7f:20:5d:f8:ad:dd:eb:7f:e0:07:dd:57:e3:af:37:5a:9c:4d:8d:73:54:6b:f4:f1:fe:d1:e1:8d:35
-----BEGIN CERTIFICATE-----
MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x
GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv
b3QgQ0EgMzAeFw0wNjExMjQxOTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNV
BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W
YWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDM
V0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNggDhoB
4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUr
H556VOijKTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd
8lyyBTNvijbO0BNO/79KDDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9Cabwv
vWhDFlaJKjdhkf2mrk7AyxRllDdLkgbvBNDInIjbC3uBr7E9KsRlOni27tyAsdLT
mZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwpp5ijJUMv7/FfJuGITfhe
btfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8nT8KKdjc
T5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDt
WAEXMJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZ
c6tsgLjoC2SToJyMGf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A
4iLItLRkT9a6fUg+qGkM17uGcclzuD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYD
VR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHTBgkrBgEEAb5YAAMwgcUwgZMG
CCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmljYXRlIGNvbnN0
aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0
aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVu
dC4wLQYIKwYBBQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2Nw
czALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4G
A1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4ywLQoUmkRzBFMQswCQYDVQQGEwJC
TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UEAxMSUXVvVmFkaXMg
Um9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZVqyM0
7ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSem
d1o417+shvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd
+LJ2w/w4E6oM3kJpK27zPOuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B
4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadN
t54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp8kokUvd0/bpO5qgdAm6x
DYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBCbjPsMZ57
k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6s
zHXug/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0j
Wy10QJLZYxkNc91pvGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeT
mJlglFwjz1onl14LBQaTNx47aTbrqZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK
4SVhM7JZG+Ju1zdXtg2pEto=
-----END CERTIFICATE-----

# Issuer: O=SECOM Trust.net OU=Security Communication RootCA1
# Subject: O=SECOM Trust.net OU=Security Communication RootCA1
# Label: "Security Communication Root CA"
# Serial: 0
# MD5 Fingerprint: f1:bc:63:6a:54:e0:b5:27:f5:cd:e7:1a:e3:4d:6e:4a
# SHA1 Fingerprint: 36:b1:2b:49:f9:81:9e:d7:4c:9e:bc:38:0f:c6:56:8f:5d:ac:b2:f7
# SHA256 Fingerprint: e7:5e:72:ed:9f:56:0e:ec:6e:b4:80:00:73:a4:3f:c3:ad:19:19:5a:39:22:82:01:78:95:97:4a:99:02:6b:6c
-----BEGIN CERTIFICATE-----
MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEY
MBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21t
dW5pY2F0aW9uIFJvb3RDQTEwHhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5
WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYD
VQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw8yl8
9f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJ
DKaVv0uMDPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9
Ms+k2Y7CI9eNqPPYJayX5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/N
QV3Is00qVUarH9oe4kA92819uZKAnDfdDJZkndwi92SL32HeFZRSFaB9UslLqCHJ
xrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2JChzAgMBAAGjPzA9MB0G
A1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYwDwYDVR0T
AQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vG
kl3g0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfr
Uj94nK9NrvjVT8+amCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5
Bw+SUEmK3TGXX8npN6o7WWWXlDLJs58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJU
JRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ6rBK+1YWc26sTfcioU+tHXot
RSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAiFL39vmwLAw==
-----END CERTIFICATE-----

# Issuer: CN=Sonera Class2 CA O=Sonera
# Subject: CN=Sonera Class2 CA O=Sonera
# Label: "Sonera Class 2 Root CA"
# Serial: 29
# MD5 Fingerprint: a3:ec:75:0f:2e:88:df:fa:48:01:4e:0b:5c:48:6f:fb
# SHA1 Fingerprint: 37:f7:6d:e6:07:7c:90:c5:b1:3e:93:1a:b7:41:10:b4:f2:e4:9a:27
# SHA256 Fingerprint: 79:08:b4:03:14:c1:38:10:0b:51:8d:07:35:80:7f:fb:fc:f8:51:8a:00:95:33:71:05:ba:38:6b:15:3d:d9:27
-----BEGIN CERTIFICATE-----
MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP
MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAx
MDQwNjA3Mjk0MFoXDTIxMDQwNjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNV
BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMiBDQTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3/Ei9vX+ALTU74W+o
Z6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybTdXnt
5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s
3TmVToMGf+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2Ej
vOr7nQKV0ba5cTppCD8PtOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu
8nYybieDwnPz3BjotJPqdURrBGAgcVeHnfO+oJAjPYok4doh28MCAwEAAaMzMDEw
DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITTXjwwCwYDVR0PBAQDAgEG
MA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt0jSv9zil
zqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/
3DEIcbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvD
FNr450kkkdAdavphOe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6
Tk6ezAyNlNzZRZxe7EJQY670XcSxEtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2
ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLHllpwrN9M
-----END CERTIFICATE-----

# Issuer: CN=Staat der Nederlanden Root CA O=Staat der Nederlanden
# Subject: CN=Staat der Nederlanden Root CA O=Staat der Nederlanden
# Label: "Staat der Nederlanden Root CA"
# Serial: 10000010
# MD5 Fingerprint: 60:84:7c:5a:ce:db:0c:d4:cb:a7:e9:fe:02:c6:a9:c0
# SHA1 Fingerprint: 10:1d:fa:3f:d5:0b:cb:bb:9b:b5:60:0c:19:55:a4:1a:f4:73:3a:04
# SHA256 Fingerprint: d4:1d:82:9e:8c:16:59:82:2a:f9:3f:ce:62:bf:fc:de:26:4f:c8:4e:8b:95:0c:5f:f2:75:d0:52:35:46:95:a3
-----BEGIN CERTIFICATE-----
MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJO
TDEeMBwGA1UEChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFh
dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEy
MTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4wHAYDVQQKExVTdGFhdCBkZXIgTmVk
ZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxhbmRlbiBSb290IENB
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFtvszn
ExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw71
9tV2U02PjLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MO
hXeiD+EwR+4A5zN9RGcaC1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+U
tFE5A3+y3qcym7RHjm+0Sq7lr7HcsBthvJly3uSJt3omXdozSVtSnA71iq3DuD3o
BmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn622r+I/q85Ej0ZytqERAh
SQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRVHSAAMDww
OgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMv
cm9vdC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA
7Jbg0zTBLL9s+DANBgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k
/rvuFbQvBgwp8qiSpGEN/KtcCFtREytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzm
eafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbwMVcoEoJz6TMvplW0C5GUR5z6
u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3ynGQI0DvDKcWy
7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
-----END CERTIFICATE-----

# Issuer: O=TDC Internet OU=TDC Internet Root CA
# Subject: O=TDC Internet OU=TDC Internet Root CA
# Label: "TDC Internet Root CA"
# Serial: 986490188
# MD5 Fingerprint: 91:f4:03:55:20:a1:f8:63:2c:62:de:ac:fb:61:1c:8e
# SHA1 Fingerprint: 21:fc:bd:8e:7f:6c:af:05:1b:d1:b3:43:ec:a8:e7:61:47:f2:0f:8a
# SHA256 Fingerprint: 48:98:c6:88:8c:0c:ff:b0:d3:e3:1a:ca:8a:37:d4:e3:51:5f:f7:46:d0:26:35:d8:66:46:cf:a0:a3:18:5a:e7
-----BEGIN CERTIFICATE-----
MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJE
SzEVMBMGA1UEChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQg
Um9vdCBDQTAeFw0wMTA0MDUxNjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNV
BAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJuZXQxHTAbBgNVBAsTFFREQyBJbnRl
cm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxLhA
vJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20jxsNu
Zp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a
0vnRrEvLznWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc1
4izbSysseLlJ28TQx5yc5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGN
eGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcD
R0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZIAYb4QgEBBAQDAgAHMGUG
A1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMMVERDIElu
dGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxME
Q1JMMTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3
WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAw
HQYDVR0OBBYEFGxkAcf9hW2syNqeUAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJ
KoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4IBAQBO
Q8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540mgwV5dOy0uaOX
wTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+
2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm89
9qNLPg7kbWzbO0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0
jUNAE4z9mQNUecYu6oah9jrUCbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38
aQNiuJkFBT1reBK9sG9l
-----END CERTIFICATE-----

# Issuer: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
# Subject: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
# Label: "UTN DATACorp SGC Root CA"
# Serial: 91374294542884689855167577680241077609
# MD5 Fingerprint: b3:a5:3e:77:21:6d:ac:4a:c0:c9:fb:d5:41:3d:ca:06
# SHA1 Fingerprint: 58:11:9f:0e:12:82:87:ea:50:fd:d9:87:45:6f:4f:78:dc:fa:d6:d4
# SHA256 Fingerprint: 85:fb:2f:91:dd:12:27:5a:01:45:b6:36:53:4f:84:02:4a:d6:8b:69:b8:ee:88:68:4f:f7:11:37:58:05:b3:48
-----BEGIN CERTIFICATE-----
MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB
kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG
EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD
VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cu
dXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6
E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ
D0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlowHDyUwDAXlCCpVZvNvlK
4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA9P4yPykq
lXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulW
bfXv33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQAB
o4GrMIGoMAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRT
MtGzz3/64PGgXYVOktKeRR20TzA9BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3Js
LnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dDLmNybDAqBgNVHSUEIzAhBggr
BgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IB
AQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft
Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyj
j98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH
KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv
2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3
mfnGV/TJVTl4uix5yaaIK/QI
-----END CERTIFICATE-----

# Issuer: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
# Subject: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
# Label: "UTN USERFirst Hardware Root CA"
# Serial: 91374294542884704022267039221184531197
# MD5 Fingerprint: 4c:56:41:e5:0d:bb:2b:e8:ca:a3:ed:18:08:ad:43:39
# SHA1 Fingerprint: 04:83:ed:33:99:ac:36:08:05:87:22:ed:bc:5e:46:00:e3:be:f9:d7
# SHA256 Fingerprint: 6e:a5:47:41:d0:04:66:7e:ed:1b:48:16:63:4a:a3:a7:9e:6e:4b:96:95:0f:82:79:da:fc:8d:9b:d8:81:21:37
-----BEGIN CERTIFICATE-----
MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG
A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe
MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v
d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh
cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn
0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ
M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a
MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd
oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI
DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy
oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0
dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy
bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF
BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli
CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE
CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t
3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS
KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA==
-----END CERTIFICATE-----

# Issuer: CN=Chambers of Commerce Root O=AC Camerfirma SA CIF A82743287 OU=http://www.chambersign.org
# Subject: CN=Chambers of Commerce Root O=AC Camerfirma SA CIF A82743287 OU=http://www.chambersign.org
# Label: "Camerfirma Chambers of Commerce Root"
# Serial: 0
# MD5 Fingerprint: b0:01:ee:14:d9:af:29:18:94:76:8e:f1:69:33:2a:84
# SHA1 Fingerprint: 6e:3a:55:a4:19:0c:19:5c:93:84:3c:c0:db:72:2e:31:30:61:f0:b1
# SHA256 Fingerprint: 0c:25:8a:12:a5:67:4a:ef:25:f2:8b:a7:dc:fa:ec:ee:a3:48:e5:41:e6:f5:cc:4e:e6:3b:71:b3:61:60:6a:c3
-----BEGIN CERTIFICATE-----
MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEn
MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL
ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMg
b2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAxNjEzNDNaFw0zNzA5MzAxNjEzNDRa
MH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZpcm1hIFNBIENJRiBB
ODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3JnMSIw
IAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0B
AQEFAAOCAQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtb
unXF/KGIJPov7coISjlUxFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0d
BmpAPrMMhe5cG3nCYsS4No41XQEMIwRHNaqbYE6gZj3LJgqcQKH0XZi/caulAGgq
7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jWDA+wWFjbw2Y3npuRVDM3
0pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFVd9oKDMyX
roDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIG
A1UdEwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5j
aGFtYmVyc2lnbi5vcmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p
26EpW1eLTXYGduHRooowDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIA
BzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hhbWJlcnNpZ24ub3JnMCcGA1Ud
EgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYDVR0gBFEwTzBN
BgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz
aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEB
AAxBl8IahsAifJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZd
p0AJPaxJRUXcLo0waLIJuvvDL8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi
1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wNUPf6s+xCX6ndbcj0dc97wXImsQEc
XCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/nADydb47kMgkdTXg0
eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1erfu
tGWaIZDgqtCYvDi1czyL+Nw=
-----END CERTIFICATE-----

# Issuer: CN=Global Chambersign Root O=AC Camerfirma SA CIF A82743287 OU=http://www.chambersign.org
# Subject: CN=Global Chambersign Root O=AC Camerfirma SA CIF A82743287 OU=http://www.chambersign.org
# Label: "Camerfirma Global Chambersign Root"
# Serial: 0
# MD5 Fingerprint: c5:e6:7b:bf:06:d0:4f:43:ed:c4:7a:65:8a:fb:6b:19
# SHA1 Fingerprint: 33:9b:6b:14:50:24:9b:55:7a:01:87:72:84:d9:e0:2f:c3:d2:d8:e9
# SHA256 Fingerprint: ef:3c:b4:17:fc:8e:bf:6f:97:87:6c:9e:4e:ce:39:de:1e:a5:fe:64:91:41:d1:02:8b:7d:11:c0:b2:29:8c:ed
-----BEGIN CERTIFICATE-----
MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEn
MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL
ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENo
YW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYxNDE4WhcNMzcwOTMwMTYxNDE4WjB9
MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgy
NzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4G
A1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUA
A4IBDQAwggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0
Mi+ITaFgCPS3CU6gSS9J1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/s
QJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8Oby4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpV
eAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl6DJWk0aJqCWKZQbua795
B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c8lCrEqWh
z0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0T
AQH/BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1i
ZXJzaWduLm9yZy9jaGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4w
TcbOX60Qq+UDpfqpFDAOBgNVHQ8BAf8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAH
MCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBjaGFtYmVyc2lnbi5vcmcwKgYD
VR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9yZzBbBgNVHSAE
VDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh
bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0B
AQUFAAOCAQEAPDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUM
bKGKfKX0j//U2K0X1S0E0T9YgOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXi
ryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJPJ7oKXqJ1/6v/2j1pReQvayZzKWG
VwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4IBHNfTIzSJRUTN3c
ecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREest2d/
AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
-----END CERTIFICATE-----

# Issuer: CN=NetLock Kozjegyzoi (Class A) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Subject: CN=NetLock Kozjegyzoi (Class A) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Label: "NetLock Notary (Class A) Root"
# Serial: 259
# MD5 Fingerprint: 86:38:6d:5e:49:63:6c:85:5c:db:6d:dc:94:b7:d0:f7
# SHA1 Fingerprint: ac:ed:5f:65:53:fd:25:ce:01:5f:1f:7a:48:3b:6a:74:9f:61:78:c6
# SHA256 Fingerprint: 7f:12:cd:5f:7e:5e:29:0e:c7:d8:51:79:d5:b7:2c:20:a5:be:75:08:ff:db:5b:f8:1a:b9:68:4a:7f:c9:f6:67
-----BEGIN CERTIFICATE-----
MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhV
MRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMe
TmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0
dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBB
KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oXDTE5MDIxOTIzMTQ0
N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhC
dWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQu
MRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBL
b3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSMD7tM9DceqQWC2ObhbHDqeLVu0ThEDaiD
zl3S1tWBxdRL51uUcCbbO51qTGL3cfNk1mE7PetzozfZz+qMkjvN9wfcZnSX9EUi
3fRc4L9t875lM+QVOr/bmJBVOMTtplVjC7B4BPTjbsE/jvxReB+SnoPC/tmwqcm8
WgD/qaiYdPv2LD4VOQ22BFWoDpggQrOxJa1+mm9dU7GrDPzr4PN6s6iz/0b2Y6LY
Oph7tqyF/7AlT3Rj5xMHpQqPBffAZG9+pyeAlt7ULoZgx2srXnN7F+eRP2QM2Esi
NCubMvJIH5+hCoR64sKtlz2O1cH5VqNQ6ca0+pii7pXmKgOM3wIDAQABo4ICnzCC
ApswDgYDVR0PAQH/BAQDAgAGMBIGA1UdEwEB/wQIMAYBAf8CAQQwEQYJYIZIAYb4
QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1GSUdZRUxFTSEgRXplbiB0
YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pvbGdhbHRhdGFz
aSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQu
IEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtm
ZWxlbG9zc2VnLWJpenRvc2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMg
ZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVs
amFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJhc2EgbWVndGFsYWxoYXRv
IGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBzOi8vd3d3
Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6
ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1
YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3Qg
dG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRs
b2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNAbmV0bG9jay5uZXQuMA0G
CSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5ayZrU3/b39/zcT0mwBQO
xmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjPytoUMaFP
0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQ
QeJBCWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxk
f1qbFFgBJ34TUMdrKuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK
8CtmdWOMovsEPoMOmzbwGOQmIMOM8CgHrTwXZoi1/baI
-----END CERTIFICATE-----

# Issuer: CN=NetLock Uzleti (Class B) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Subject: CN=NetLock Uzleti (Class B) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Label: "NetLock Business (Class B) Root"
# Serial: 105
# MD5 Fingerprint: 39:16:aa:b9:6a:41:e1:14:69:df:9e:6c:3b:72:dc:b6
# SHA1 Fingerprint: 87:9f:4b:ee:05:df:98:58:3b:e3:60:d6:33:e7:0d:3f:fe:98:71:af
# SHA256 Fingerprint: 39:df:7b:68:2b:7b:93:8f:84:71:54:81:cc:de:8d:60:d8:f2:2e:c5:98:87:7d:0a:aa:c1:2b:59:18:2b:03:12
-----BEGIN CERTIFICATE-----
MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUx
ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQD
EylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikgVGFudXNpdHZhbnlraWFkbzAeFw05
OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYDVQQGEwJIVTERMA8G
A1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNh
Z2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5l
dExvY2sgVXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqG
SIb3DQEBAQUAA4GNADCBiQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xK
gZjupNTKihe5In+DCnVMm8Bp2GQ5o+2So/1bXHQawEfKOml2mrriRBf8TKPV/riX
iK+IA4kfpPIEPsgHC+b5sy96YhQJRhTKZPWLgLViqNhr1nGTLbO/CVRY7QbrqHvc
Q7GhaQIDAQABo4ICnzCCApswEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNVHQ8BAf8E
BAMCAAYwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1G
SUdZRUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFu
b3MgU3pvbGdhbHRhdGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBh
bGFwamFuIGtlc3p1bHQuIEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExv
Y2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2VnLWJpenRvc2l0YXNhIHZlZGkuIEEgZGln
aXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYXogZWxvaXJ0
IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh
c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGph
biBhIGh0dHBzOi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJo
ZXRvIGF6IGVsbGVub3J6ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBP
UlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmlj
YXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBo
dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNA
bmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06
sPgzTEdM43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXa
n3BukxowOR0w2y7jfLKRstE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKS
NitjrFgBazMpUIaD8QFI
-----END CERTIFICATE-----

# Issuer: CN=NetLock Expressz (Class C) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Subject: CN=NetLock Expressz (Class C) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Label: "NetLock Express (Class C) Root"
# Serial: 104
# MD5 Fingerprint: 4f:eb:f1:f0:70:c2:80:63:5d:58:9f:da:12:3c:a9:c4
# SHA1 Fingerprint: e3:92:51:2f:0a:cf:f5:05:df:f6:de:06:7f:75:37:e1:65:ea:57:4b
# SHA256 Fingerprint: 0b:5e:ed:4e:84:64:03:cf:55:e0:65:84:84:40:ed:2a:82:75:8b:f5:b9:aa:1f:25:3d:46:13:cf:a0:80:ff:3f
-----BEGIN CERTIFICATE-----
MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUx
ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQD
EytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBDKSBUYW51c2l0dmFueWtpYWRvMB4X
DTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJBgNVBAYTAkhVMREw
DwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9u
c2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMr
TmV0TG9jayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzAN
BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNA
OoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3ZW3oDvV3zOwzDUXmbrVWg6dADEK8KuhRC
2VImESLH0iDMgqSaqf64gXadarfSNnU+sYYJ9m5tfk63euyucYT2BDMIJTLrdKwW
RMbkQJMdf60CAwEAAaOCAp8wggKbMBIGA1UdEwEB/wQIMAYBAf8CAQQwDgYDVR0P
AQH/BAQDAgAGMBEGCWCGSAGG+EIBAQQEAwIABzCCAmAGCWCGSAGG+EIBDQSCAlEW
ggJNRklHWUVMRU0hIEV6ZW4gdGFudXNpdHZhbnkgYSBOZXRMb2NrIEtmdC4gQWx0
YWxhbm9zIFN6b2xnYWx0YXRhc2kgRmVsdGV0ZWxlaWJlbiBsZWlydCBlbGphcmFz
b2sgYWxhcGphbiBrZXN6dWx0LiBBIGhpdGVsZXNpdGVzIGZvbHlhbWF0YXQgYSBO
ZXRMb2NrIEtmdC4gdGVybWVrZmVsZWxvc3NlZy1iaXp0b3NpdGFzYSB2ZWRpLiBB
IGRpZ2l0YWxpcyBhbGFpcmFzIGVsZm9nYWRhc2FuYWsgZmVsdGV0ZWxlIGF6IGVs
b2lydCBlbGxlbm9yemVzaSBlbGphcmFzIG1lZ3RldGVsZS4gQXogZWxqYXJhcyBs
ZWlyYXNhIG1lZ3RhbGFsaGF0byBhIE5ldExvY2sgS2Z0LiBJbnRlcm5ldCBob25s
YXBqYW4gYSBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIGNpbWVuIHZhZ3kg
a2VyaGV0byBheiBlbGxlbm9yemVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4g
SU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5kIHRoZSB1c2Ugb2YgdGhpcyBjZXJ0
aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQUyBhdmFpbGFibGUg
YXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwgYXQg
Y3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmY
ta3UzbM2xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2g
pO0u9f38vf5NNwgMvOOWgyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4
Fp1hBWeAyNDYpQcCNJgEjTME1A==
-----END CERTIFICATE-----

# Issuer: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
# Subject: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
# Label: "XRamp Global CA Root"
# Serial: 107108908803651509692980124233745014957
# MD5 Fingerprint: a1:0b:44:b3:ca:10:d8:00:6e:9d:0f:d8:0f:92:0a:d1
# SHA1 Fingerprint: b8:01:86:d1:eb:9c:86:a5:41:04:cf:30:54:f3:4c:52:b7:e5:58:c6
# SHA256 Fingerprint: ce:cd:dc:90:50:99:d8:da:df:c5:b1:d2:09:b7:37:cb:e2:c1:8c:fb:2c:10:c0:ff:0b:cf:0d:32:86:fc:1a:a2
-----BEGIN CERTIFICATE-----
MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB
gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk
MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY
UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx
NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3
dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy
dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS6
38eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCP
KZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7Q
DxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4
qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRa
JSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNVi
PvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0P
BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASs
jVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0
eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcNAQEFBQAD
ggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR
vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLa
IR9NmXmd4c8nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy
i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ
O+7ETPTsJ3xCwnR8gooJybQDJbw=
-----END CERTIFICATE-----

# Issuer: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
# Subject: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
# Label: "Go Daddy Class 2 CA"
# Serial: 0
# MD5 Fingerprint: 91:de:06:25:ab:da:fd:32:17:0c:bb:25:17:2a:84:67
# SHA1 Fingerprint: 27:96:ba:e6:3f:18:01:e2:77:26:1b:a0:d7:77:70:02:8f:20:ee:e4
# SHA256 Fingerprint: c3:84:6b:f2:4b:9e:93:ca:64:27:4c:0e:c6:7c:1e:cc:5e:02:4f:fc:ac:d2:d7:40:19:35:0e:81:fe:54:6a:e4
-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh
MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE
YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3
MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo
ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg
MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN
ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA
PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w
wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi
EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY
avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+
YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE
sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h
/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
ReYNnyicsbkqWletNw+vHX/bvZ8=
-----END CERTIFICATE-----

# Issuer: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
# Subject: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
# Label: "Starfield Class 2 CA"
# Serial: 0
# MD5 Fingerprint: 32:4a:4b:bb:c8:63:69:9b:be:74:9a:c6:dd:1d:46:24
# SHA1 Fingerprint: ad:7e:1c:28:b0:64:ef:8f:60:03:40:20:14:c3:d0:e3:37:0e:b5:8a
# SHA256 Fingerprint: 14:65:fa:20:53:97:b8:76:fa:a6:f0:a9:95:8e:55:90:e4:0f:cc:7f:aa:4f:b7:c2:c8:67:75:21:fb:5f:b6:58
-----BEGIN CERTIFICATE-----
MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp
U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw
NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE
ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp
ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3
DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf
8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN
+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0
X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa
K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA
1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G
A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR
zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0
YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD
bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w
DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3
L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D
eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
-----END CERTIFICATE-----

# Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
# Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
# Label: "StartCom Certification Authority"
# Serial: 1
# MD5 Fingerprint: 22:4d:8f:8a:fc:f7:35:c2:bb:57:34:90:7b:8b:22:16
# SHA1 Fingerprint: 3e:2b:f7:f2:03:1b:96:f3:8c:e6:c4:d8:a8:5d:3e:2d:58:47:6a:0f
# SHA256 Fingerprint: c7:66:a9:be:f2:d4:07:1c:86:3a:31:aa:49:20:e8:13:b2:d1:98:60:8c:b7:b7:cf:e2:11:43:b8:36:df:09:ea
-----BEGIN CERTIFICATE-----
MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW
MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9
MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w
+2OqqGwaVLRcJXrJosmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+
Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3
Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVcUjyJthkqcwEKDwOzEmDyei+B
26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT37uMdBNSSwID
AQABo4ICUjCCAk4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAa4wHQYDVR0OBBYE
FE4L7xqkQFulF2mHMMo0aEPQQa7yMGQGA1UdHwRdMFswLKAqoCiGJmh0dHA6Ly9j
ZXJ0LnN0YXJ0Y29tLm9yZy9zZnNjYS1jcmwuY3JsMCugKaAnhiVodHRwOi8vY3Js
LnN0YXJ0Y29tLm9yZy9zZnNjYS1jcmwuY3JsMIIBXQYDVR0gBIIBVDCCAVAwggFM
BgsrBgEEAYG1NwEBATCCATswLwYIKwYBBQUHAgEWI2h0dHA6Ly9jZXJ0LnN0YXJ0
Y29tLm9yZy9wb2xpY3kucGRmMDUGCCsGAQUFBwIBFilodHRwOi8vY2VydC5zdGFy
dGNvbS5vcmcvaW50ZXJtZWRpYXRlLnBkZjCB0AYIKwYBBQUHAgIwgcMwJxYgU3Rh
cnQgQ29tbWVyY2lhbCAoU3RhcnRDb20pIEx0ZC4wAwIBARqBl0xpbWl0ZWQgTGlh
YmlsaXR5LCByZWFkIHRoZSBzZWN0aW9uICpMZWdhbCBMaW1pdGF0aW9ucyogb2Yg
dGhlIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFp
bGFibGUgYXQgaHR0cDovL2NlcnQuc3RhcnRjb20ub3JnL3BvbGljeS5wZGYwEQYJ
YIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNT
TCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAgEAFmyZ
9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8
jhvh3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUW
FjgKXlf2Ysd6AgXmvB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJz
ewT4F+irsfMuXGRuczE6Eri8sxHkfY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1
ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L
EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu
L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC
O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V
um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh
NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14=
-----END CERTIFICATE-----

# Issuer: O=Government Root Certification Authority
# Subject: O=Government Root Certification Authority
# Label: "Taiwan GRCA"
# Serial: 42023070807708724159991140556527066870
# MD5 Fingerprint: 37:85:44:53:32:45:1f:20:f0:f3:95:e1:25:c4:43:4e
# SHA1 Fingerprint: f4:8b:11:bf:de:ab:be:94:54:20:71:e6:41:de:6b:be:88:2b:40:b9
# SHA256 Fingerprint: 76:00:29:5e:ef:e8:5b:9e:1f:d6:24:db:76:06:2a:aa:ae:59:81:8a:54:d2:77:4c:d4:c0:b2:c0:11:31:e1:b3
-----BEGIN CERTIFICATE-----
MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/
MQswCQYDVQQGEwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmlj
YXRpb24gQXV0aG9yaXR5MB4XDTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1ow
PzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dvdmVybm1lbnQgUm9vdCBDZXJ0aWZp
Y2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
AJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qNw8XR
IePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1q
gQdW8or5BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKy
yhwOeYHWtXBiCAEuTk8O1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAts
F/tnyMKtsc2AtJfcdgEWFelq16TheEfOhtX7MfP6Mb40qij7cEwdScevLJ1tZqa2
jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wovJ5pGfaENda1UhhXcSTvx
ls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7Q3hub/FC
VGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHK
YS1tB6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoH
EgKXTiCQ8P8NHuJBO9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThN
Xo+EHWbNxWCWtFJaBYmOlXqYwZE8lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1Ud
DgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNVHRMEBTADAQH/MDkGBGcqBwAE
MTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg209yewDL7MTqK
UWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ
TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyf
qzvS/3WXy6TjZwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaK
ZEk9GhiHkASfQlK3T8v+R0F2Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFE
JPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlUD7gsL0u8qV1bYH+Mh6XgUmMqvtg7
hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6QzDxARvBMB1uUO07+1
EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+HbkZ6Mm
nD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WX
udpVBrkk7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44Vbnz
ssQwmSNOXfJIoRIM3BKQCZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDe
LMDDav7v3Aun+kbfYNucpllQdSNpc5Oy+fwC00fmcc4QAu4njIT/rEUNE1yDMuAl
pYYsfPQS
-----END CERTIFICATE-----

# Issuer: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
# Subject: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
# Label: "Firmaprofesional Root CA"
# Serial: 1
# MD5 Fingerprint: 11:92:79:40:3c:b1:83:40:e5:ab:66:4a:67:92:80:df
# SHA1 Fingerprint: a9:62:8f:4b:98:a9:1b:48:35:ba:d2:c1:46:32:86:bb:66:64:6a:8c
# SHA256 Fingerprint: c1:cf:0b:52:09:64:35:e3:f1:b7:1d:aa:ec:45:5a:23:11:c8:40:4f:55:83:a9:e2:13:c6:9d:85:7d:94:33:05
-----BEGIN CERTIFICATE-----
MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMx
IjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1
dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20w
HhcNMDExMDI0MjIwMDAwWhcNMTMxMDI0MjIwMDAwWjCBnTELMAkGA1UEBhMCRVMx
IjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1
dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20w
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDnIwNvbyOlXnjOlSztlB5u
Cp4Bx+ow0Syd3Tfom5h5VtP8c9/Qit5Vj1H5WuretXDE7aTt/6MNbg9kUDGvASdY
rv5sp0ovFy3Tc9UTHI9ZpTQsHVQERc1ouKDAA6XPhUJHlShbz++AbOCQl4oBPB3z
hxAwJkh91/zpnZFx/0GaqUC1N5wpIE8fUuOgfRNtVLcK3ulqTgesrBlf3H5idPay
BQC6haD9HThuy1q7hryUZzM1gywfI834yJFxzJeL764P3CkDG8A563DtwW4O2GcL
iam8NeTvtjS0pbbELaW+0MOUJEjb35bTALVmGotmBQ/dPz/LP6pemkr4tErvlTcb
AgMBAAGjgZ8wgZwwKgYDVR0RBCMwIYYfaHR0cDovL3d3dy5maXJtYXByb2Zlc2lv
bmFsLmNvbTASBgNVHRMBAf8ECDAGAQH/AgEBMCsGA1UdEAQkMCKADzIwMDExMDI0
MjIwMDAwWoEPMjAxMzEwMjQyMjAwMDBaMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4E
FgQUMwugZtHq2s7eYpMEKFK1FH84aLcwDQYJKoZIhvcNAQEFBQADggEBAEdz/o0n
VPD11HecJ3lXV7cVVuzH2Fi3AQL0M+2TUIiefEaxvT8Ub/GzR0iLjJcG1+p+o1wq
u00vR+L4OQbJnC4xGgN49Lw4xiKLMzHwFgQEffl25EvXwOaD7FnMP97/T2u3Z36m
hoEyIwOdyPdfwUpgpZKpsaSgYMN4h7Mi8yrrW6ntBas3D7Hi05V2Y1Z0jFhyGzfl
ZKG+TQyTmAyX9odtsz/ny4Cm7YjHX1BiAuiZdBbQ5rQ58SfLyEDW44YQqSMSkuBp
QWOnryULwMWSyx6Yo1q6xTMPoJcB3X/ge9YGVM+h4k0460tQtcsm9MracEpqoeJ5
quGnM/b9Sh/22WA=
-----END CERTIFICATE-----

# Issuer: CN=Swisscom Root CA 1 O=Swisscom OU=Digital Certificate Services
# Subject: CN=Swisscom Root CA 1 O=Swisscom OU=Digital Certificate Services
# Label: "Swisscom Root CA 1"
# Serial: 122348795730808398873664200247279986742
# MD5 Fingerprint: f8:38:7c:77:88:df:2c:16:68:2e:c2:e2:52:4b:b8:f9
# SHA1 Fingerprint: 5f:3a:fc:0a:8b:64:f6:86:67:34:74:df:7e:a9:a2:fe:f9:fa:7a:51
# SHA256 Fingerprint: 21:db:20:12:36:60:bb:2e:d4:18:20:5d:a1:1e:e7:a8:5a:65:e2:bc:6e:55:b5:af:7e:78:99:c8:a2:66:d9:2e
-----BEGIN CERTIFICATE-----
MIIF2TCCA8GgAwIBAgIQXAuFXAvnWUHfV8w/f52oNjANBgkqhkiG9w0BAQUFADBk
MQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0
YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3Qg
Q0EgMTAeFw0wNTA4MTgxMjA2MjBaFw0yNTA4MTgyMjA2MjBaMGQxCzAJBgNVBAYT
AmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGlnaXRhbCBDZXJ0aWZp
Y2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAxMIICIjAN
BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0LmwqAzZuz8h+BvVM5OAFmUgdbI9
m2BtRsiMMW8Xw/qabFbtPMWRV8PNq5ZJkCoZSx6jbVfd8StiKHVFXqrWW/oLJdih
FvkcxC7mlSpnzNApbjyFNDhhSbEAn9Y6cV9Nbc5fuankiX9qUvrKm/LcqfmdmUc/
TilftKaNXXsLmREDA/7n29uj/x2lzZAeAR81sH8A25Bvxn570e56eqeqDFdvpG3F
EzuwpdntMhy0XmeLVNxzh+XTF3xmUHJd1BpYwdnP2IkCb6dJtDZd0KTeByy2dbco
kdaXvij1mB7qWybJvbCXc9qukSbraMH5ORXWZ0sKbU/Lz7DkQnGMU3nn7uHbHaBu
HYwadzVcFh4rUx80i9Fs/PJnB3r1re3WmquhsUvhzDdf/X/NTa64H5xD+SpYVUNF
vJbNcA78yeNmuk6NO4HLFWR7uZToXTNShXEuT46iBhFRyePLoW4xCGQMwtI89Tbo
19AOeCMgkckkKmUpWyL3Ic6DXqTz3kvTaI9GdVyDCW4pa8RwjPWd1yAv/0bSKzjC
L3UcPX7ape8eYIVpQtPM+GP+HkM5haa2Y0EQs3MevNP6yn0WR+Kn1dCjigoIlmJW
bjTb2QK5MHXjBNLnj8KwEUAKrNVxAmKLMb7dxiNYMUJDLXT5xp6mig/p/r+D5kNX
JLrvRjSq1xIBOO0CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0hBBYw
FDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j
BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzc
K6FptWfUjNP9MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzf
ky9NfEBWMXrrpA9gzXrzvsMnjgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7Ik
Vh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQMbFamIp1TpBcahQq4FJHgmDmHtqB
sfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4HVtA4oJVwIHaM190e
3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtlvrsR
ls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ip
mXeascClOS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HH
b6D0jqTsNFFbjCYDcKF31QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksf
rK/7DZBaZmBwXarNeNQk7shBoJMBkpxqnvy5JMWzFYJ+vq6VK+uxwNrjAWALXmms
hFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCyx/yP2FS1k2Kdzs9Z+z0Y
zirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMWNY6E0F/6
MBr1mmz0DlP5OlvRHA==
-----END CERTIFICATE-----

# Issuer: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
# Subject: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
# Label: "DigiCert Assured ID Root CA"
# Serial: 17154717934120587862167794914071425081
# MD5 Fingerprint: 87:ce:0b:7b:2a:0e:49:00:e1:58:71:9b:37:a8:93:72
# SHA1 Fingerprint: 05:63:b8:63:0d:62:d7:5a:bb:c8:ab:1e:4b:df:b5:a8:99:b2:4d:43
# SHA256 Fingerprint: 3e:90:99:b5:01:5e:8f:48:6c:00:bc:ea:9d:11:1e:e7:21:fa:ba:35:5a:89:bc:f1:df:69:56:1e:3d:c6:32:5c
-----BEGIN CERTIFICATE-----
MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl
cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c
JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP
mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+
wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4
VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/
AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB
AAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
BBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC
dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf
fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm
NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx
H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
-----END CERTIFICATE-----

# Issuer: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
# Subject: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
# Label: "DigiCert Global Root CA"
# Serial: 10944719598952040374951832963794454346
# MD5 Fingerprint: 79:e4:a9:84:0d:7d:3a:96:d7:c0:4f:e2:43:4c:89:2e
# SHA1 Fingerprint: a8:98:5d:3a:65:e5:e5:c4:b2:d7:d6:6d:40:c6:dd:2f:b1:9c:54:36
# SHA256 Fingerprint: 43:48:a0:e9:44:4c:78:cb:26:5e:05:8d:5e:89:44:b4:d8:4f:96:62:bd:26:db:25:7f:89:34:a4:43:c7:01:61
-----BEGIN CERTIFICATE-----
MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB
CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97
nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt
43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P
T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4
gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO
BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR
TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw
DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr
hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg
06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF
PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls
YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
-----END CERTIFICATE-----

# Issuer: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
# Subject: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
# Label: "DigiCert High Assurance EV Root CA"
# Serial: 3553400076410547919724730734378100087
# MD5 Fingerprint: d4:74:de:57:5c:39:b2:d3:9c:85:83:c5:c0:65:49:8a
# SHA1 Fingerprint: 5f:b7:ee:06:33:e2:59:db:ad:0c:4c:9a:e6:d3:8f:1a:61:c7:dc:25
# SHA256 Fingerprint: 74:31:e5:f4:c3:c1:ce:46:90:77:4f:0b:61:e0:54:40:88:3b:a9:a0:1e:d0:0b:a6:ab:d7:80:6e:d3:b1:18:cf
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL
MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3
LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug
RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm
+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW
PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM
xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB
Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3
hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg
EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA
FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec
nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z
eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF
hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2
Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
+OkuE6N36B9K
-----END CERTIFICATE-----

# Issuer: CN=Class 2 Primary CA O=Certplus
# Subject: CN=Class 2 Primary CA O=Certplus
# Label: "Certplus Class 2 Primary CA"
# Serial: 177770208045934040241468760488327595043
# MD5 Fingerprint: 88:2c:8c:52:b8:a2:3c:f3:f7:bb:03:ea:ae:ac:42:0b
# SHA1 Fingerprint: 74:20:74:41:72:9c:dd:92:ec:79:31:d8:23:10:8d:c2:81:92:e2:bb
# SHA256 Fingerprint: 0f:99:3c:8a:ef:97:ba:af:56:87:14:0e:d5:9a:d1:82:1b:b4:af:ac:f0:aa:9a:58:b5:d5:7a:33:8a:3a:fb:cb
-----BEGIN CERTIFICATE-----
MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAw
PTELMAkGA1UEBhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFz
cyAyIFByaW1hcnkgQ0EwHhcNOTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9
MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2VydHBsdXMxGzAZBgNVBAMTEkNsYXNz
IDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANxQ
ltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR5aiR
VhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyL
kcAbmXuZVg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCd
EgETjdyAYveVqUSISnFOYFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yas
H7WLO7dDWWuwJKZtkIvEcupdM5i3y95ee++U8Rs+yskhwcWYAqqi9lt3m/V+llU0
HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRMECDAGAQH/AgEKMAsGA1Ud
DwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJYIZIAYb4
QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMu
Y29tL0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/
AN9WM2K191EBkOvDP9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8
yfFC82x/xXp8HVGIutIKPidd3i1RTtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMR
FcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+7UCmnYR0ObncHoUW2ikbhiMA
ybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW//1IMwrh3KWB
kJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
l7+ijrRU
-----END CERTIFICATE-----

# Issuer: CN=DST Root CA X3 O=Digital Signature Trust Co.
# Subject: CN=DST Root CA X3 O=Digital Signature Trust Co.
# Label: "DST Root CA X3"
# Serial: 91299735575339953335919266965803778155
# MD5 Fingerprint: 41:03:52:dc:0f:f7:50:1b:16:f0:02:8e:ba:6f:45:c5
# SHA1 Fingerprint: da:c9:02:4f:54:d8:f6:df:94:93:5f:b1:73:26:38:ca:6a:d7:7c:13
# SHA256 Fingerprint: 06:87:26:03:31:a7:24:03:d9:09:f1:05:e6:9b:cf:0d:32:e1:bd:24:93:ff:c6:d9:20:6d:11:bc:d6:77:07:39
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----

# Issuer: CN=DST ACES CA X6 O=Digital Signature Trust OU=DST ACES
# Subject: CN=DST ACES CA X6 O=Digital Signature Trust OU=DST ACES
# Label: "DST ACES CA X6"
# Serial: 17771143917277623872238992636097467865
# MD5 Fingerprint: 21:d8:4c:82:2b:99:09:33:a2:eb:14:24:8d:8e:5f:e8
# SHA1 Fingerprint: 40:54:da:6f:1c:3f:40:74:ac:ed:0f:ec:cd:db:79:d1:53:fb:90:1d
# SHA256 Fingerprint: 76:7c:95:5a:76:41:2c:89:af:68:8e:90:a1:c7:0f:55:6c:fd:6b:60:25:db:ea:10:41:6d:7e:b6:83:1f:8c:40
-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBb
MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3Qx
ETAPBgNVBAsTCERTVCBBQ0VTMRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0w
MzExMjAyMTE5NThaFw0xNzExMjAyMTE5NThaMFsxCzAJBgNVBAYTAlVTMSAwHgYD
VQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UECxMIRFNUIEFDRVMx
FzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPu
ktKe1jzIDZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7
gLFViYsx+tC3dr5BPTCapCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZH
fAjIgrrep4c9oW24MFbCswKBXy314powGCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4a
ahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPyMjwmR/onJALJfh1biEIT
ajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1UdEwEB/wQF
MAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rk
c3QuY29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjto
dHRwOi8vd3d3LnRydXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMt
aW5kZXguaHRtbDAdBgNVHQ4EFgQUCXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZI
hvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V25FYrnJmQ6AgwbN99Pe7lv7Uk
QIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6tFr8hlxCBPeP/
h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq
nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpR
rscL9yuwNwXsvFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf2
9w4LTJxoeHtxMcfrHuBnQfO3oKfN5XozNmr6mis=
-----END CERTIFICATE-----

# Issuer: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=(c) 2005 TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş.
# Subject: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=(c) 2005 TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş.
# Label: "TURKTRUST Certificate Services Provider Root 1"
# Serial: 1
# MD5 Fingerprint: f1:6a:22:18:c9:cd:df:ce:82:1d:1d:b7:78:5c:a9:a5
# SHA1 Fingerprint: 79:98:a3:08:e1:4d:65:85:e6:c2:1e:15:3a:71:9f:ba:5a:d3:4a:d9
# SHA256 Fingerprint: 44:04:e3:3b:5e:14:0d:cf:99:80:51:fd:fc:80:28:c7:c8:16:15:c5:ee:73:7b:11:1b:58:82:33:a9:b5:35:a0
-----BEGIN CERTIFICATE-----
MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOc
UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
c8SxMQswCQYDVQQGDAJUUjEPMA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykg
MjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8
dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMxMDI3MTdaFw0xNTAz
MjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsgU2Vy
dGlmaWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYMAlRSMQ8wDQYD
VQQHDAZBTktBUkExVjBUBgNVBAoMTShjKSAyMDA1IFTDnFJLVFJVU1QgQmlsZ2kg
xLBsZXRpxZ9pbSB2ZSBCaWxpxZ9pbSBHw7x2ZW5sacSfaSBIaXptZXRsZXJpIEEu
xZ4uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAylIF1mMD2Bxf3dJ7
XfIMYGFbazt0K3gNfUW9InTojAPBxhEqPZW8qZSwu5GXyGl8hMW0kWxsE2qkVa2k
heiVfrMArwDCBRj1cJ02i67L5BuBf5OI+2pVu32Fks66WJ/bMsW9Xe8iSi9BB35J
YbOG7E6mQW6EvAPs9TscyB/C7qju6hJKjRTP8wrgUDn5CDX4EVmt5yLqS8oUBt5C
urKZ8y1UiBAG6uEaPj1nH/vO+3yC6BFdSsG5FOpU2WabfIl9BJpiyelSPJ6c79L1
JuTm5Rh8i27fbMx4W09ysstcP4wFjdFMjK2Sx+F4f2VsSQZQLJ4ywtdKxnWKWU51
b0dewQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAV
9VX/N5aAWSGk/KEVTCD21F/aAyT8z5Aa9CEKmu46sWrv7/hg0Uw2ZkUd82YCdAR7
kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxEq8Sn5RTOPEFh
fEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy
B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdA
aLX/7KfS0zgYnNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKS
RGQDJereW26fyfJOrN3H
-----END CERTIFICATE-----

# Issuer: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş. (c) Kasım 2005
# Subject: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş. (c) Kasım 2005
# Label: "TURKTRUST Certificate Services Provider Root 2"
# Serial: 1
# MD5 Fingerprint: 37:a5:6e:d4:b1:25:84:97:b7:fd:56:15:7a:f9:a2:00
# SHA1 Fingerprint: b4:35:d4:e1:11:9d:1c:66:90:a7:49:eb:b3:94:bd:63:7b:a7:82:b7
# SHA256 Fingerprint: c4:70:cf:54:7e:23:02:b9:77:fb:29:dd:71:a8:9a:7b:6c:1f:60:77:7b:03:29:f5:60:17:f3:28:bf:4f:6b:e6
-----BEGIN CERTIFICATE-----
MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOc
UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
c8SxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xS
S1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kg
SGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcNMDUxMTA3MTAwNzU3
WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVrdHJv
bmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJU
UjEPMA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSw
bGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWe
LiAoYykgS2FzxLFtIDIwMDUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqeLCDe2JAOCtFp0if7qnef
J1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKIx+XlZEdh
R3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJ
Qv2gQrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGX
JHpsmxcPbe9TmJEr5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1p
zpwACPI2/z7woQ8arBT9pmAPAgMBAAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58S
Fq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
KoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/nttRbj2hWyfIvwq
ECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4
Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFz
gw2lGh1uEpJ+hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotH
uFEJjOp9zYhys2AzsfAKRO8P9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LS
y3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5UrbnBEI=
-----END CERTIFICATE-----

# Issuer: CN=SwissSign Gold CA - G2 O=SwissSign AG
# Subject: CN=SwissSign Gold CA - G2 O=SwissSign AG
# Label: "SwissSign Gold CA - G2"
# Serial: 13492815561806991280
# MD5 Fingerprint: 24:77:d9:a8:91:d1:3b:fa:88:2d:c2:ff:f8:cd:33:93
# SHA1 Fingerprint: d8:c5:38:8a:b7:30:1b:1b:6e:d4:7a:e6:45:25:3a:6f:9f:1a:27:61
# SHA256 Fingerprint: 62:dd:0b:e9:b9:f5:0a:16:3e:a0:f8:e7:5c:05:3b:1e:ca:57:ea:55:c8:68:8f:64:7c:68:81:f2:c8:35:7b:95
-----BEGIN CERTIFICATE-----
MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
BAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2ln
biBHb2xkIENBIC0gRzIwHhcNMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBF
MQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMR8wHQYDVQQDExZT
d2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
CgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUqt2/8
76LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+
bbqBHH5CjCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c
6bM8K8vzARO/Ws/BtQpgvd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqE
emA8atufK+ze3gE/bk3lUIbLtK/tREDFylqM2tIrfKjuvqblCqoOpd8FUrdVxyJd
MmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvRAiTysybUa9oEVeXBCsdt
MDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuendjIj3o02y
MszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69y
FGkOpeUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPi
aG59je883WX0XaxR7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxM
gI93e2CaHt+28kgeDrpOVG2Y4OGiGqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCB
qTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWyV7
lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64OfPAeGZe6Drn
8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe6
45R88a7A3hfm5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczO
UYrHUDFu4Up+GC9pWbY9ZIEr44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5
O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOfMke6UiI0HTJ6CVanfCU2qT1L2sCC
bwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6mGu6uLftIdxf+u+yv
GPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxpmo/a
77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCC
hdiDyyJkvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid3
92qgQmwLOM7XdVAyksLfKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEpp
Ld6leNcG2mqeSz53OiATIgHQv2ieY2BrNU0LbbqhPcCT4H8js1WtciVORvnSFu+w
ZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6LqjviOvrv1vA+ACOzB2+htt
Qc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
-----END CERTIFICATE-----

# Issuer: CN=SwissSign Silver CA - G2 O=SwissSign AG
# Subject: CN=SwissSign Silver CA - G2 O=SwissSign AG
# Label: "SwissSign Silver CA - G2"
# Serial: 5700383053117599563
# MD5 Fingerprint: e0:06:a1:c9:7d:cf:c9:fc:0d:c0:56:75:96:d8:62:13
# SHA1 Fingerprint: 9b:aa:e5:9f:56:ee:21:cb:43:5a:be:25:93:df:a7:f0:40:d1:1d:cb
# SHA256 Fingerprint: be:6c:4d:a2:bb:b9:ba:59:b6:f3:93:97:68:37:42:46:c3:c0:05:99:3f:a9:8f:02:0d:1d:ed:be:d4:8a:81:d5
-----BEGIN CERTIFICATE-----
MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UE
BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWdu
IFNpbHZlciBDQSAtIEcyMB4XDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0Nlow
RzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMY
U3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644N0Mv
Fz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7br
YT7QbNHm+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieF
nbAVlDLaYQ1HTWBCrpJH6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH
6ATK72oxh9TAtvmUcXtnZLi2kUpCe2UuMGoM9ZDulebyzYLs2aFK7PayS+VFheZt
eJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5hqAaEuSh6XzjZG6k4sIN/
c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5FZGkECwJ
MoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRH
HTBsROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTf
jNFusB3hB48IHpmccelM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb6
5i/4z3GcRm25xBWNOHkDRUjvxF3XCO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOB
rDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU
F6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRBtjpbO8tFnb0c
wpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIB
AHPGgeAn0i0P4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShp
WJHckRE1qTodvBqlYJ7YH39FkWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9
xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L3XWgwF15kIwb4FDm3jH+mHtwX6WQ
2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx/uNncqCxv1yL5PqZ
IseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFaDGi8
aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2X
em1ZqSqPe97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQR
dAtq/gsD/KNVV4n+SsuuWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/
OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+
hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLy
tGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
# Subject: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
# Label: "GeoTrust Primary Certification Authority"
# Serial: 32798226551256963324313806436981982369
# MD5 Fingerprint: 02:26:c3:01:5e:08:30:37:43:a9:d0:7d:cf:37:e6:bf
# SHA1 Fingerprint: 32:3c:11:8e:1b:f7:b8:b6:52:54:e2:e2:10:0d:d6:02:90:37:f0:96
# SHA256 Fingerprint: 37:d5:10:06:c5:12:ea:ab:62:64:21:f1:ec:8c:92:01:3f:c5:f8:2a:e9:8e:e5:33:eb:46:19:b8:de:b4:d0:6c
-----BEGIN CERTIFICATE-----
MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY
MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo
R2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEx
MjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
Ew1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQcmltYXJ5IENlcnRp
ZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9
AWbK7hWNb6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjA
ZIVcFU2Ix7e64HXprQU9nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE0
7e9GceBrAqg1cmuXm2bgyxx5X9gaBGgeRwLmnWDiNpcB3841kt++Z8dtd1k7j53W
kBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGttm/81w7a4DSwDRp35+MI
mO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G
A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJ
KoZIhvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ1
6CePbJC/kRYkRj5KTs4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl
4b7UVXGYNTq+k+qurUKykG/g/CFNNWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6K
oKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHaFloxt/m0cYASSJlyc1pZU8Fj
UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU
AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
-----END CERTIFICATE-----

# Issuer: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
# Subject: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
# Label: "thawte Primary Root CA"
# Serial: 69529181992039203566298953787712940909
# MD5 Fingerprint: 8c:ca:dc:0b:22:ce:f5:be:72:ac:41:1a:11:a8:d8:12
# SHA1 Fingerprint: 91:c6:d6:ee:3e:8a:c8:63:84:e5:48:c2:99:29:5c:75:6c:81:7b:81
# SHA256 Fingerprint: 8d:72:2f:81:a9:c1:13:c0:79:1d:f1:36:a2:96:6d:b2:6c:95:0a:97:1d:b4:6b:41:99:f4:ea:54:b7:8b:fb:9f
-----BEGIN CERTIFICATE-----
MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB
qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV
BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw
NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j
LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG
A1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
IG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs
W0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta
3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk
6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6
Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J
NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA
MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP
r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU
DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz
YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2
/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/
LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7
jVaMaA==
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
# Label: "VeriSign Class 3 Public Primary Certification Authority - G5"
# Serial: 33037644167568058970164719475676101450
# MD5 Fingerprint: cb:17:e4:31:67:3e:e2:09:fe:45:57:93:f3:0a:fa:1c
# SHA1 Fingerprint: 4e:b6:d5:78:49:9b:1c:cf:5f:58:1e:ad:56:be:3d:9b:67:44:a5:e5
# SHA256 Fingerprint: 9a:cf:ab:7e:43:c8:d8:80:d0:6b:26:2a:94:de:ee:e4:b4:65:99:89:c3:d0:ca:f1:9b:af:64:05:e4:1a:b7:df
-----BEGIN CERTIFICATE-----
MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB
yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp
U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW
ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0
aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL
MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln
biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1
nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex
t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz
SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG
BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+
rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/
NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv
MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE
p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y
5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK
WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
-----END CERTIFICATE-----

# Issuer: CN=SecureTrust CA O=SecureTrust Corporation
# Subject: CN=SecureTrust CA O=SecureTrust Corporation
# Label: "SecureTrust CA"
# Serial: 17199774589125277788362757014266862032
# MD5 Fingerprint: dc:32:c3:a7:6d:25:57:c7:68:09:9d:ea:2d:a9:a2:d1
# SHA1 Fingerprint: 87:82:c6:c3:04:35:3b:cf:d2:96:92:d2:59:3e:7d:44:d9:34:ff:11
# SHA256 Fingerprint: f1:c1:b5:0a:e5:a2:0d:d8:03:0e:c9:f6:bc:24:82:3d:d3:67:b5:25:57:59:b4:e7:1b:61:fc:e9:f7:37:5d:73
-----BEGIN CERTIFICATE-----
MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBI
MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x
FzAVBgNVBAMTDlNlY3VyZVRydXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIz
MTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1NlY3VyZVRydXN0IENv
cnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQXOZEz
Zum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO
0gMdA+9tDWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIao
wW8xQmxSPmjL8xk037uHGFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj
7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b01k/unK8RCSc43Oz969XL0Imnal0ugBS
8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmHursCAwEAAaOBnTCBmjAT
BgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCeg
JYYjaHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGC
NxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt3
6Z3q059c4EVlew3KW+JwULKUBRSuSceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/
3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHfmbx8IVQr5Fiiu1cprp6poxkm
D5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZnMUFdAvnZyPS
CPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
-----END CERTIFICATE-----

# Issuer: CN=Secure Global CA O=SecureTrust Corporation
# Subject: CN=Secure Global CA O=SecureTrust Corporation
# Label: "Secure Global CA"
# Serial: 9751836167731051554232119481456978597
# MD5 Fingerprint: cf:f4:27:0d:d4:ed:dc:65:16:49:6d:3d:da:bf:6e:de
# SHA1 Fingerprint: 3a:44:73:5a:e5:81:90:1f:24:86:61:46:1e:3b:9c:c4:5f:f5:3a:1b
# SHA256 Fingerprint: 42:00:f5:04:3a:c8:59:0e:bb:52:7d:20:9e:d1:50:30:29:fb:cb:d4:1c:a1:b5:06:ec:27:f1:5a:de:7d:ac:69
-----BEGIN CERTIFICATE-----
MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBK
MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x
GTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkx
MjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3Qg
Q29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jxYDiJ
iQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa
/FHtaMbQbqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJ
jnIFHovdRIWCQtBJwB1g8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnI
HmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYVHDGA76oYa8J719rO+TMg1fW9ajMtgQT7
sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi0XPnj3pDAgMBAAGjgZ0w
gZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCsw
KaAnoCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsG
AQQBgjcVAQQDAgEAMA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0L
URYD7xh8yOOvaliTFGCRsoTciE6+OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXO
H0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cnCDpOGR86p1hcF895P4vkp9Mm
I50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/53CYNv6ZHdAbY
iNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
-----END CERTIFICATE-----

# Issuer: CN=COMODO Certification Authority O=COMODO CA Limited
# Subject: CN=COMODO Certification Authority O=COMODO CA Limited
# Label: "COMODO Certification Authority"
# Serial: 104350513648249232941998508985834464573
# MD5 Fingerprint: 5c:48:dc:f7:42:72:ec:56:94:6d:1c:cc:71:35:80:75
# SHA1 Fingerprint: 66:31:bf:9e:f7:4f:9e:b6:c9:d5:a6:0c:ba:6a:be:d1:f7:bd:ef:7b
# SHA256 Fingerprint: 0c:2c:d6:3d:f7:80:6f:a3:99:ed:e8:09:11:6b:57:5b:f8:79:89:f0:65:18:f9:80:8c:86:05:03:17:8b:af:66
-----BEGIN CERTIFICATE-----
MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB
gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV
BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw
MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl
YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P
RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0
aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3
UcEbVASY06m/weaKXTuH+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI
2GqGd0S7WWaXUF601CxwRM/aN5VCaTwwxHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8
Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV4EajcNxo2f8ESIl33rXp
+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA1KGzqSX+
DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5O
nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW
/zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g
PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u
QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY
SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv
IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4
zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd
BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB
ZQ==
-----END CERTIFICATE-----

# Issuer: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
# Subject: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
# Label: "Network Solutions Certificate Authority"
# Serial: 116697915152937497490437556386812487904
# MD5 Fingerprint: d3:f3:a6:16:c0:fa:6b:1d:59:b1:2d:96:4d:0e:11:2e
# SHA1 Fingerprint: 74:f8:a3:c3:ef:e7:b3:90:06:4b:83:90:3c:21:64:60:20:e5:df:ce
# SHA256 Fingerprint: 15:f0:ba:00:a3:ac:7a:f3:ac:88:4c:07:2b:10:11:a0:77:bd:77:c0:97:f4:01:64:b2:f8:59:8a:bd:83:86:0c
-----BEGIN CERTIFICATE-----
MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi
MQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3Jp
dHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMxMjM1OTU5WjBiMQswCQYDVQQGEwJV
UzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydO
ZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwz
c7MEL7xxjOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPP
OCwGJgl6cvf6UDL4wpPTaaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rl
mGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXTcrA/vGp97Eh/jcOrqnErU2lBUzS1sLnF
BgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc/Qzpf14Dl847ABSHJ3A4
qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMBAAGjgZcw
gZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIB
BjAPBgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwu
bmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3Jp
dHkuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc8
6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/
h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH
/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN
pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
-----END CERTIFICATE-----

# Issuer: CN=WellsSecure Public Root Certificate Authority O=Wells Fargo WellsSecure OU=Wells Fargo Bank NA
# Subject: CN=WellsSecure Public Root Certificate Authority O=Wells Fargo WellsSecure OU=Wells Fargo Bank NA
# Label: "WellsSecure Public Root Certificate Authority"
# Serial: 1
# MD5 Fingerprint: 15:ac:a5:c2:92:2d:79:bc:e8:7f:cb:67:ed:02:cf:36
# SHA1 Fingerprint: e7:b4:f6:9d:61:ec:90:69:db:7e:90:a7:40:1a:3c:f4:7d:4f:e8:ee
# SHA256 Fingerprint: a7:12:72:ae:aa:a3:cf:e8:72:7f:7f:b3:9f:0f:b3:d1:e5:42:6e:90:60:b0:6e:e6:f1:3e:9a:3c:58:33:cd:43
-----BEGIN CERTIFICATE-----
MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMx
IDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxs
cyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9v
dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDcxMjEzMTcwNzU0WhcNMjIxMjE0
MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdl
bGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQD
DC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkw
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+r
WxxTkqxtnt3CxC5FlAM1iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjU
Dk/41itMpBb570OYj7OeUt9tkTmPOL13i0Nj67eT/DBMHAGTthP796EfvyXhdDcs
HqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8bJVhHlfXBIEyg1J55oNj
z7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiBK0HmOFaf
SZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/Slwxl
AgMBAAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqG
KGh0dHA6Ly9jcmwucGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0P
AQH/BAQDAgHGMB0GA1UdDgQWBBQmlRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0j
BIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGBi6SBiDCBhTELMAkGA1UEBhMC
VVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNX
ZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg
Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEB
ALkVsUSRzCPIK0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd
/ZDJPHV3V3p9+N701NX3leZ0bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pB
A4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSljqHyita04pO2t/caaH/+Xc/77szWn
k4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+esE2fDbbFwRnzVlhE9
iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJtylv
2G0xffX8oRAHh84vWdw+WNs=
-----END CERTIFICATE-----

# Issuer: CN=COMODO ECC Certification Authority O=COMODO CA Limited
# Subject: CN=COMODO ECC Certification Authority O=COMODO CA Limited
# Label: "COMODO ECC Certification Authority"
# Serial: 41578283867086692638256921589707938090
# MD5 Fingerprint: 7c:62:ff:74:9d:31:53:5e:68:4a:d5:78:aa:1e:bf:23
# SHA1 Fingerprint: 9f:74:4e:9f:2b:4d:ba:ec:0f:31:2c:50:b6:56:3b:8e:2d:93:c3:11
# SHA256 Fingerprint: 17:93:92:7a:06:14:54:97:89:ad:ce:2f:8f:34:f7:f0:b6:6d:0f:3a:e3:a3:b8:4d:21:ec:15:db:ba:4f:ad:c7
-----BEGIN CERTIFICATE-----
MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL
MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT
IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw
MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy
ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N
T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR
FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J
cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW
BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm
fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv
GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
-----END CERTIFICATE-----

# Issuer: CN=IGC/A O=PM/SGDN OU=DCSSI
# Subject: CN=IGC/A O=PM/SGDN OU=DCSSI
# Label: "IGC/A"
# Serial: 245102874772
# MD5 Fingerprint: 0c:7f:dd:6a:f4:2a:b9:c8:9b:bd:20:7e:a9:db:5c:37
# SHA1 Fingerprint: 60:d6:89:74:b5:c2:65:9e:8a:0f:c1:88:7c:88:d2:46:69:1b:18:2c
# SHA256 Fingerprint: b9:be:a7:86:0a:96:2e:a3:61:1d:ab:97:ab:6d:a3:e2:1c:10:68:b9:7d:55:57:5e:d0:e1:12:79:c1:1c:89:32
-----BEGIN CERTIFICATE-----
MIIEAjCCAuqgAwIBAgIFORFFEJQwDQYJKoZIhvcNAQEFBQAwgYUxCzAJBgNVBAYT
AkZSMQ8wDQYDVQQIEwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQ
TS9TR0ROMQ4wDAYDVQQLEwVEQ1NTSTEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG
9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZyMB4XDTAyMTIxMzE0MjkyM1oXDTIw
MTAxNzE0MjkyMlowgYUxCzAJBgNVBAYTAkZSMQ8wDQYDVQQIEwZGcmFuY2UxDjAM
BgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVEQ1NTSTEO
MAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2
LmZyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsh/R0GLFMzvABIaI
s9z4iPf930Pfeo2aSVz2TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2
xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCWSo7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4
u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYyHF2fYPepraX/z9E0+X1b
F8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNdfrGoRpAx
Vs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGd
PDPQtQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNV
HSAEDjAMMAoGCCqBegF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAx
NjAfBgNVHSMEGDAWgBSjBS8YYFDCiQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUF
AAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RKq89toB9RlPhJy3Q2FLwV3duJ
L92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3QMZsyK10XZZOY
YLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg
Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2a
NjSaTFR+FwNIlQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R
0982gaEbeC9xs/FZTEYYKKuF0mBWWg==
-----END CERTIFICATE-----

# Issuer: O=SECOM Trust Systems CO.,LTD. OU=Security Communication EV RootCA1
# Subject: O=SECOM Trust Systems CO.,LTD. OU=Security Communication EV RootCA1
# Label: "Security Communication EV RootCA1"
# Serial: 0
# MD5 Fingerprint: 22:2d:a6:01:ea:7c:0a:f7:f0:6c:56:43:3f:77:76:d3
# SHA1 Fingerprint: fe:b8:c4:32:dc:f9:76:9a:ce:ae:3d:d8:90:8f:fd:28:86:65:64:7d
# SHA256 Fingerprint: a2:2d:ba:68:1e:97:37:6e:2d:39:7d:72:8a:ae:3a:9b:62:96:b9:fd:ba:60:bc:2e:11:f6:47:f2:c6:75:fb:37
-----BEGIN CERTIFICATE-----
MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDEl
MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMh
U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIz
MloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09N
IFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNlY3VyaXR5IENvbW11
bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSE
RMqm4miO/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gO
zXppFodEtZDkBp2uoQSXWHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5
bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4zZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDF
MxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4bepJz11sS6/vmsJWXMY1
VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK9U2vP9eC
OKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0G
CSqGSIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HW
tWS3irO4G8za+6xmiEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZ
q51ihPZRwSzJIxXYKLerJRO1RuGGAv8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDb
EJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnWmHyojf6GPgcWkuF75x3sM3Z+
Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEWT1MKZPlO9L9O
VL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490
-----END CERTIFICATE-----

# Issuer: CN=OISTE WISeKey Global Root GA CA O=WISeKey OU=Copyright (c) 2005/OISTE Foundation Endorsed
# Subject: CN=OISTE WISeKey Global Root GA CA O=WISeKey OU=Copyright (c) 2005/OISTE Foundation Endorsed
# Label: "OISTE WISeKey Global Root GA CA"
# Serial: 86718877871133159090080555911823548314
# MD5 Fingerprint: bc:6c:51:33:a7:e9:d3:66:63:54:15:72:1b:21:92:93
# SHA1 Fingerprint: 59:22:a1:e1:5a:ea:16:35:21:f8:98:39:6a:46:46:b0:44:1b:0f:a9
# SHA256 Fingerprint: 41:c9:23:86:6a:b4:ca:d6:b7:ad:57:80:81:58:2e:02:07:97:a6:cb:df:4f:ff:78:ce:83:96:b3:89:37:d7:f5
-----BEGIN CERTIFICATE-----
MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCB
ijELMAkGA1UEBhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHly
aWdodCAoYykgMjAwNTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQSBDQTAeFw0w
NTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYDVQQGEwJDSDEQMA4G
A1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIwIAYD
VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBX
SVNlS2V5IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAy0+zAJs9Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxR
VVuuk+g3/ytr6dTqvirdqFEr12bDYVxgAsj1znJ7O7jyTmUIms2kahnBAbtzptf2
w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbDd50kc3vkDIzh2TbhmYsF
mQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ/yxViJGg
4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t9
4B3RLoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQw
EAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOx
SPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vImMMkQyh2I+3QZH4VFvbBsUfk2
ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4+vg1YFkCExh8
vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZi
Fj4A4xylNoEYokxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ
/L7fCg0=
-----END CERTIFICATE-----

# Issuer: CN=Microsec e-Szigno Root CA O=Microsec Ltd. OU=e-Szigno CA
# Subject: CN=Microsec e-Szigno Root CA O=Microsec Ltd. OU=e-Szigno CA
# Label: "Microsec e-Szigno Root CA"
# Serial: 272122594155480254301341951808045322001
# MD5 Fingerprint: f0:96:b6:2f:c5:10:d5:67:8e:83:25:32:e8:5e:2e:e5
# SHA1 Fingerprint: 23:88:c9:d3:71:cc:9e:96:3d:ff:7d:3c:a7:ce:fc:d6:25:ec:19:0d
# SHA256 Fingerprint: 32:7a:3d:76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f:55:67:d0
-----BEGIN CERTIFICATE-----
MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAw
cjELMAkGA1UEBhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNy
b3NlYyBMdGQuMRQwEgYDVQQLEwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9z
ZWMgZS1Temlnbm8gUm9vdCBDQTAeFw0wNTA0MDYxMjI4NDRaFw0xNzA0MDYxMjI4
NDRaMHIxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEWMBQGA1UEChMN
TWljcm9zZWMgTHRkLjEUMBIGA1UECxMLZS1Temlnbm8gQ0ExIjAgBgNVBAMTGU1p
Y3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDtyADVgXvNOABHzNuEwSFpLHSQDCHZU4ftPkNEU6+r+ICbPHiN1I2u
uO/TEdyB5s87lozWbxXGd36hL+BfkrYn13aaHUM86tnsL+4582pnS4uCzyL4ZVX+
LMsvfUh6PXX5qqAnu3jCBspRwn5mS6/NoqdNAoI/gqyFxuEPkEeZlApxcpMqyabA
vjxWTHOSJ/FrtfX9/DAFYJLG65Z+AZHCabEeHXtTRbjcQR/Ji3HWVBTji1R4P770
Yjtb9aPs1ZJ04nQw7wHb4dSrmZsqa/i9phyGI0Jf7Enemotb9HI6QMVJPqW+jqpx
62z69Rrkav17fVVA71hu5tnVvCSrwe+3AgMBAAGjggQ3MIIEMzBnBggrBgEFBQcB
AQRbMFkwKAYIKwYBBQUHMAGGHGh0dHBzOi8vcmNhLmUtc3ppZ25vLmh1L29jc3Aw
LQYIKwYBBQUHMAKGIWh0dHA6Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNydDAP
BgNVHRMBAf8EBTADAQH/MIIBcwYDVR0gBIIBajCCAWYwggFiBgwrBgEEAYGoGAIB
AQEwggFQMCgGCCsGAQUFBwIBFhxodHRwOi8vd3d3LmUtc3ppZ25vLmh1L1NaU1ov
MIIBIgYIKwYBBQUHAgIwggEUHoIBEABBACAAdABhAG4A+gBzAO0AdAB2AOEAbgB5
ACAA6QByAHQAZQBsAG0AZQB6AOkAcwDpAGgAZQB6ACAA6QBzACAAZQBsAGYAbwBn
AGEAZADhAHMA4QBoAG8AegAgAGEAIABTAHoAbwBsAGcA4QBsAHQAYQB0APMAIABT
AHoAbwBsAGcA4QBsAHQAYQB0AOEAcwBpACAAUwB6AGEAYgDhAGwAeQB6AGEAdABh
ACAAcwB6AGUAcgBpAG4AdAAgAGsAZQBsAGwAIABlAGwAagDhAHIAbgBpADoAIABo
AHQAdABwADoALwAvAHcAdwB3AC4AZQAtAHMAegBpAGcAbgBvAC4AaAB1AC8AUwBa
AFMAWgAvMIHIBgNVHR8EgcAwgb0wgbqggbeggbSGIWh0dHA6Ly93d3cuZS1zemln
bm8uaHUvUm9vdENBLmNybIaBjmxkYXA6Ly9sZGFwLmUtc3ppZ25vLmh1L0NOPU1p
Y3Jvc2VjJTIwZS1Temlnbm8lMjBSb290JTIwQ0EsT1U9ZS1Temlnbm8lMjBDQSxP
PU1pY3Jvc2VjJTIwTHRkLixMPUJ1ZGFwZXN0LEM9SFU/Y2VydGlmaWNhdGVSZXZv
Y2F0aW9uTGlzdDtiaW5hcnkwDgYDVR0PAQH/BAQDAgEGMIGWBgNVHREEgY4wgYuB
EGluZm9AZS1zemlnbm8uaHWkdzB1MSMwIQYDVQQDDBpNaWNyb3NlYyBlLVN6aWdu
w7MgUm9vdCBDQTEWMBQGA1UECwwNZS1TemlnbsOzIEhTWjEWMBQGA1UEChMNTWlj
cm9zZWMgS2Z0LjERMA8GA1UEBxMIQnVkYXBlc3QxCzAJBgNVBAYTAkhVMIGsBgNV
HSMEgaQwgaGAFMegSXUWYYTbMUuE0vE3QJDvTtz3oXakdDByMQswCQYDVQQGEwJI
VTERMA8GA1UEBxMIQnVkYXBlc3QxFjAUBgNVBAoTDU1pY3Jvc2VjIEx0ZC4xFDAS
BgNVBAsTC2UtU3ppZ25vIENBMSIwIAYDVQQDExlNaWNyb3NlYyBlLVN6aWdubyBS
b290IENBghEAzLjnv04pGv2i3GalHCwPETAdBgNVHQ4EFgQUx6BJdRZhhNsxS4TS
8TdAkO9O3PcwDQYJKoZIhvcNAQEFBQADggEBANMTnGZjWS7KXHAM/IO8VbH0jgds
ZifOwTsgqRy7RlRw7lrMoHfqaEQn6/Ip3Xep1fvj1KcExJW4C+FEaGAHQzAxQmHl
7tnlJNUb3+FKG6qfx1/4ehHqE5MAyopYse7tDk2016g2JnzgOsHVV4Lxdbb9iV/a
86g4nzUGCM4ilb7N1fy+W955a9x6qWVmvrElWl/tftOsRm1M9DKHtCAE4Gx4sHfR
hUZLphK3dehKyVZs15KrnfVJONJPU+NVkBHbmJbGSfI+9J8b4PeI3CVimUTYc78/
MPMMNz7UwiiAc7EBt51alhQBS6kRnSlqLtBdgcDPsiBDxwPgN05dCtxZICU=
-----END CERTIFICATE-----

# Issuer: CN=Certigna O=Dhimyotis
# Subject: CN=Certigna O=Dhimyotis
# Label: "Certigna"
# Serial: 18364802974209362175
# MD5 Fingerprint: ab:57:a6:5b:7d:42:82:19:b5:d8:58:26:28:5e:fd:ff
# SHA1 Fingerprint: b1:2e:13:63:45:86:a4:6f:1a:b2:60:68:37:58:2d:c4:ac:fd:94:97
# SHA256 Fingerprint: e3:b6:a2:db:2e:d7:ce:48:84:2f:7a:c5:32:41:c7:b7:1d:54:14:4b:fb:40:c1:1f:3f:1d:0b:42:f5:ee:a1:2d
-----BEGIN CERTIFICATE-----
MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV
BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X
DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ
BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4
QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny
gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw
zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q
130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2
JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw
ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT
AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj
AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG
9w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h
bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc
fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu
HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w
t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
-----END CERTIFICATE-----

# Issuer: CN=AC Raíz Certicámara S.A. O=Sociedad Cameral de Certificación Digital - Certicámara S.A.
# Subject: CN=AC Raíz Certicámara S.A. O=Sociedad Cameral de Certificación Digital - Certicámara S.A.
# Label: "AC Ra\xC3\xADz Certic\xC3\xA1mara S.A."
# Serial: 38908203973182606954752843738508300
# MD5 Fingerprint: 93:2a:3e:f6:fd:23:69:0d:71:20:d4:2b:47:99:2b:a6
# SHA1 Fingerprint: cb:a1:c5:f8:b0:e3:5e:b8:b9:45:12:d3:f9:34:a2:e9:06:10:d3:36
# SHA256 Fingerprint: a6:c5:1e:0d:a5:ca:0a:93:09:d2:e4:c0:e4:0c:2a:f9:10:7a:ae:82:03:85:7f:e1:98:e3:e7:69:e3:43:08:5c
-----BEGIN CERTIFICATE-----
MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsx
CzAJBgNVBAYTAkNPMUcwRQYDVQQKDD5Tb2NpZWRhZCBDYW1lcmFsIGRlIENlcnRp
ZmljYWNpw7NuIERpZ2l0YWwgLSBDZXJ0aWPDoW1hcmEgUy5BLjEjMCEGA1UEAwwa
QUMgUmHDrXogQ2VydGljw6FtYXJhIFMuQS4wHhcNMDYxMTI3MjA0NjI5WhcNMzAw
NDAyMjE0MjAyWjB7MQswCQYDVQQGEwJDTzFHMEUGA1UECgw+U29jaWVkYWQgQ2Ft
ZXJhbCBkZSBDZXJ0aWZpY2FjacOzbiBEaWdpdGFsIC0gQ2VydGljw6FtYXJhIFMu
QS4xIzAhBgNVBAMMGkFDIFJhw616IENlcnRpY8OhbWFyYSBTLkEuMIICIjANBgkq
hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq2uJo1PMSCMI+8PPUZYILrgIem08kBeG
qentLhM0R7LQcNzJPNCNyu5LF6vQhbCnIwTLqKL85XXbQMpiiY9QngE9JlsYhBzL
fDe3fezTf3MZsGqy2IiKLUV0qPezuMDU2s0iiXRNWhU5cxh0T7XrmafBHoi0wpOQ
Y5fzp6cSsgkiBzPZkc0OnB8OIMfuuzONj8LSWKdf/WU34ojC2I+GdV75LaeHM/J4
Ny+LvB2GNzmxlPLYvEqcgxhaBvzz1NS6jBUJJfD5to0EfhcSM2tXSExP2yYe68yQ
54v5aHxwD6Mq0Do43zeX4lvegGHTgNiRg0JaTASJaBE8rF9ogEHMYELODVoqDA+b
MMCm8Ibbq0nXl21Ii/kDwFJnmxL3wvIumGVC2daa49AZMQyth9VXAnow6IYm+48j
ilSH5L887uvDdUhfHjlvgWJsxS3EF1QZtzeNnDeRyPYL1epjb4OsOMLzP96a++Ej
YfDIJss2yKHzMI+ko6Kh3VOz3vCaMh+DkXkwwakfU5tTohVTP92dsxA7SH2JD/zt
A/X7JWR1DhcZDY8AFmd5ekD8LVkH2ZD6mq093ICK5lw1omdMEWux+IBkAC1vImHF
rEsm5VoQgpukg3s0956JkSCXjrdCx2bD0Omk1vUgjcTDlaxECp1bczwmPS9KvqfJ
pxAe+59QafMCAwEAAaOB5jCB4zAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
AwIBBjAdBgNVHQ4EFgQU0QnQ6dfOeXRU+Tows/RtLAMDG2gwgaAGA1UdIASBmDCB
lTCBkgYEVR0gADCBiTArBggrBgEFBQcCARYfaHR0cDovL3d3dy5jZXJ0aWNhbWFy
YS5jb20vZHBjLzBaBggrBgEFBQcCAjBOGkxMaW1pdGFjaW9uZXMgZGUgZ2FyYW50
7WFzIGRlIGVzdGUgY2VydGlmaWNhZG8gc2UgcHVlZGVuIGVuY29udHJhciBlbiBs
YSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEfAygPU3zmpFmps4p6
xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuXEpBc
unvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/
Jre7Ir5v/zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dp
ezy4ydV/NgIlqmjCMRW3MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42
gzmRkBDI8ck1fj+404HGIGQatlDCIaR43NAvO2STdPCWkPHv+wlaNECW8DYSwaN0
jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wkeZBWN7PGKX6jD/EpOe9+
XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f/RWmnkJD
W2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/
RL5hRqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35r
MDOhYil/SrnhLecUIw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxk
BYn8eNZcLCZDqQ==
-----END CERTIFICATE-----

# Issuer: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
# Subject: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
# Label: "TC TrustCenter Class 2 CA II"
# Serial: 941389028203453866782103406992443
# MD5 Fingerprint: ce:78:33:5c:59:78:01:6e:18:ea:b9:36:a0:b9:2e:23
# SHA1 Fingerprint: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e
# SHA256 Fingerprint: e6:b8:f8:76:64:85:f8:07:ae:7f:8d:ac:16:70:46:1f:07:c0:a1:3e:ef:3a:1f:f7:17:53:8d:7a:ba:d3:91:b4
-----BEGIN CERTIFICATE-----
MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjEL
MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYwMTEyMTQzODQzWhcNMjUxMjMxMjI1
OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UEAxMc
VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jf
tMjWQ+nEdVl//OEd+DFwIxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKg
uNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2J
XjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQXa7pIXSSTYtZgo+U4+lK
8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7uSNQZu+99
5OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1Ud
EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3
kUrL84J6E1wIqzCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6
Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
JTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iS
GNn3Bzn1LL4GdXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprt
ZjluS5TmVfwLG4t3wVMTZonZKNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8
au0WOB9/WIFaGusyiC2y8zl3gK9etmF1KdsjTYjKUCjLhdLTEKJZbtOTVAB6okaV
hgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kPJOzHdiEoZa5X6AeI
dUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfkvQ==
-----END CERTIFICATE-----

# Issuer: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
# Subject: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
# Label: "TC TrustCenter Class 3 CA II"
# Serial: 1506523511417715638772220530020799
# MD5 Fingerprint: 56:5f:aa:80:61:12:17:f6:67:21:e6:2b:6d:61:56:8e
# SHA1 Fingerprint: 80:25:ef:f4:6e:70:c8:d4:72:24:65:84:fe:40:3b:8a:8d:6a:db:f5
# SHA256 Fingerprint: 8d:a0:84:fc:f9:9c:e0:77:22:f8:9b:32:05:93:98:06:fa:5c:b8:11:e1:c8:13:f6:a1:08:c7:d3:36:b3:40:8e
-----BEGIN CERTIFICATE-----
MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjEL
MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYwMTEyMTQ0MTU3WhcNMjUxMjMxMjI1
OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UEAxMc
VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBALTgu1G7OVyLBMVMeRwjhjEQY0NVJz/GRcekPewJDRoeIMJW
Ht4bNwcwIi9v8Qbxq63WyKthoy9DxLCyLfzDlml7forkzMA5EpBCYMnMNWju2l+Q
Vl/NHE1bWEnrDgFPZPosPIlY2C8u4rBo6SI7dYnWRBpl8huXJh0obazovVkdKyT2
1oQDZogkAHhg8fir/gKya/si+zXmFtGt9i4S5Po1auUZuV3bOx4a+9P/FRQI2Alq
ukWdFHlgfa9Aigdzs5OW03Q0jTo3Kd5c7PXuLjHCINy+8U9/I1LZW+Jk2ZyqBwi1
Rb3R0DHBq1SfqdLDYmAD8bs5SpJKPQq5ncWg/jcCAwEAAaOCATQwggEwMA8GA1Ud
EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTUovyfs8PYA9NX
XAek0CSnwPIA1DCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6
Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
JTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlN
irTzwppVMXzEO2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8
TtXqluJucsG7Kv5sbviRmEb8yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6
g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9IJqDnxrcOfHFcqMRA/07QlIp2+gB
95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal092Y+tTmBvTwtiBj
S+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc5A==
-----END CERTIFICATE-----

# Issuer: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
# Subject: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
# Label: "TC TrustCenter Universal CA I"
# Serial: 601024842042189035295619584734726
# MD5 Fingerprint: 45:e1:a5:72:c5:a9:36:64:40:9e:f5:e4:58:84:67:8c
# SHA1 Fingerprint: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3
# SHA256 Fingerprint: eb:f3:c0:2a:87:89:b1:fb:7d:51:19:95:d6:63:b7:29:06:d9:13:ce:0d:5e:10:56:8a:8a:77:e2:58:61:67:e7
-----BEGIN CERTIFICATE-----
MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTEL
MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1
c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcNMDYwMzIyMTU1NDI4WhcNMjUxMjMx
MjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIg
R21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYwJAYD
VQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSR
JJZ4Hgmgm5qVSkr1YnwCqMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3T
fCZdzHd55yx4Oagmcw6iXSVphU9VDprvxrlE4Vc93x9UIuVvZaozhDrzznq+VZeu
jRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtwag+1m7Z3W0hZneTvWq3z
wZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9OgdwZu5GQ
fezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYD
VR0jBBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAO
BgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0G
CSqGSIb3DQEBBQUAA4IBAQAo0uCG1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X1
7caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/CyvwbZ71q+s2IhtNerNXxTPqYn
8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3ghUJGooWMNjs
ydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT
ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/
2TYcuiUaUj0a7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY
-----END CERTIFICATE-----

# Issuer: CN=Deutsche Telekom Root CA 2 O=Deutsche Telekom AG OU=T-TeleSec Trust Center
# Subject: CN=Deutsche Telekom Root CA 2 O=Deutsche Telekom AG OU=T-TeleSec Trust Center
# Label: "Deutsche Telekom Root CA 2"
# Serial: 38
# MD5 Fingerprint: 74:01:4a:91:b1:08:c4:58:ce:47:cd:f0:dd:11:53:08
# SHA1 Fingerprint: 85:a4:08:c0:9c:19:3e:5d:51:58:7d:cd:d6:13:30:fd:8c:de:37:bf
# SHA256 Fingerprint: b6:19:1a:50:d0:c3:97:7f:7d:a9:9b:cd:aa:c8:6a:22:7d:ae:b9:67:9e:c7:0b:a3:b0:c9:d9:22:71:c1:70:d3
-----BEGIN CERTIFICATE-----
MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEc
MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2Vj
IFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENB
IDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5MjM1OTAwWjBxMQswCQYDVQQGEwJE
RTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxl
U2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290
IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEU
ha88EOQ5bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhC
QN/Po7qCWWqSG6wcmtoIKyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1Mjwr
rFDa1sPeg5TKqAyZMg4ISFZbavva4VhYAUlfckE8FQYBjl2tqriTtM2e66foai1S
NNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aKSe5TBY8ZTNXeWHmb0moc
QqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTVjlsB9WoH
txa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAP
BgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
AQEAlGRZrTlk5ynrE/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756Abrsp
tJh6sTtU6zkXR34ajgv8HzFZMQSyzhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpa
IzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8rZ7/gFnkm0W09juwzTkZmDLl
6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4Gdyd1Lx+4ivn+
xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
Cm26OWMohpLzGITY+9HPBVZkVw==
-----END CERTIFICATE-----

# Issuer: CN=ComSign Secured CA O=ComSign
# Subject: CN=ComSign Secured CA O=ComSign
# Label: "ComSign Secured CA"
# Serial: 264725503855295744117309814499492384489
# MD5 Fingerprint: 40:01:25:06:8d:21:43:6a:0e:43:00:9c:e7:43:f3:d5
# SHA1 Fingerprint: f9:cd:0e:2c:da:76:24:c1:8f:bd:f0:f0:ab:b6:45:b8:f7:fe:d5:7a
# SHA256 Fingerprint: 50:79:41:c7:44:60:a0:b4:70:86:22:0d:4e:99:32:57:2a:b5:d1:b5:bb:cb:89:80:ab:1c:b1:76:51:a8:44:d2
-----BEGIN CERTIFICATE-----
MIIDqzCCApOgAwIBAgIRAMcoRwmzuGxFjB36JPU2TukwDQYJKoZIhvcNAQEFBQAw
PDEbMBkGA1UEAxMSQ29tU2lnbiBTZWN1cmVkIENBMRAwDgYDVQQKEwdDb21TaWdu
MQswCQYDVQQGEwJJTDAeFw0wNDAzMjQxMTM3MjBaFw0yOTAzMTYxNTA0NTZaMDwx
GzAZBgNVBAMTEkNvbVNpZ24gU2VjdXJlZCBDQTEQMA4GA1UEChMHQ29tU2lnbjEL
MAkGA1UEBhMCSUwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGtWhf
HZQVw6QIVS3joFd67+l0Kru5fFdJGhFeTymHDEjWaueP1H5XJLkGieQcPOqs49oh
gHMhCu95mGwfCP+hUH3ymBvJVG8+pSjsIQQPRbsHPaHA+iqYHU4Gk/v1iDurX8sW
v+bznkqH7Rnqwp9D5PGBpX8QTz7RSmKtUxvLg/8HZaWSLWapW7ha9B20IZFKF3ue
Mv5WJDmyVIRD9YTC2LxBkMyd1mja6YJQqTtoz7VdApRgFrFD2UNd3V2Hbuq7s8lr
9gOUCXDeFhF6K+h2j0kQmHe5Y1yLM5d19guMsqtb3nQgJT/j8xH5h2iGNXHDHYwt
6+UarA9z1YJZQIDTAgMBAAGjgacwgaQwDAYDVR0TBAUwAwEB/zBEBgNVHR8EPTA7
MDmgN6A1hjNodHRwOi8vZmVkaXIuY29tc2lnbi5jby5pbC9jcmwvQ29tU2lnblNl
Y3VyZWRDQS5jcmwwDgYDVR0PAQH/BAQDAgGGMB8GA1UdIwQYMBaAFMFL7XC29z58
ADsAj8c+DkWfHl3sMB0GA1UdDgQWBBTBS+1wtvc+fAA7AI/HPg5Fnx5d7DANBgkq
hkiG9w0BAQUFAAOCAQEAFs/ukhNQq3sUnjO2QiBq1BW9Cav8cujvR3qQrFHBZE7p
iL1DRYHjZiM/EoZNGeQFsOY3wo3aBijJD4mkU6l1P7CW+6tMM1X5eCZGbxs2mPtC
dsGCuY7e+0X5YxtiOzkGynd6qDwJz2w2PQ8KRUtpFhpFfTMDZflScZAmlaxMDPWL
kz/MdXSFmLr/YnpNH4n+rr2UAJm/EaXc4HnFFgt9AmEd6oX5AhVP51qJThRv4zdL
hfXBPGHg/QVBspJ/wx2g0K5SZGBrGMYmnNj1ZOQ2GmKfig8+/21OGVZOIJFsnzQz
OjRXUDpvgV4GxvU+fE6OK85lBi5d0ipTdF7Tbieejw==
-----END CERTIFICATE-----

# Issuer: CN=Cybertrust Global Root O=Cybertrust, Inc
# Subject: CN=Cybertrust Global Root O=Cybertrust, Inc
# Label: "Cybertrust Global Root"
# Serial: 4835703278459682877484360
# MD5 Fingerprint: 72:e4:4a:87:e3:69:40:80:77:ea:bc:e3:f4:ff:f0:e1
# SHA1 Fingerprint: 5f:43:e5:b1:bf:f8:78:8c:ac:1c:c7:ca:4a:9a:c6:22:2b:cc:34:c6
# SHA256 Fingerprint: 96:0a:df:00:63:e9:63:56:75:0c:29:65:dd:0a:08:67:da:0b:9c:bd:6e:77:71:4a:ea:fb:23:49:ab:39:3d:a3
-----BEGIN CERTIFICATE-----
MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYG
A1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2Jh
bCBSb290MB4XDTA2MTIxNTA4MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UE
ChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBS
b290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Mi8vRRQZhP/8NN5
7CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW0ozS
J8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2y
HLtgwEZLAfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iP
t3sMpTjr3kfb1V05/Iin89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNz
FtApD0mpSPCzqrdsxacwOUBdrsTiXSZT8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAY
XSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2MDSgMqAw
hi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3Js
MB8GA1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUA
A4IBAQBW7wojoFROlZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMj
Wqd8BfP9IjsO0QbE2zZMcwSO5bAi5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUx
XOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2hO0j9n0Hq0V+09+zv+mKts2o
omcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+TX3EJIrduPuoc
A06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
WL1WMRJOEcgh4LMRkWXbtKaIOM5V
-----END CERTIFICATE-----

# Issuer: O=Chunghwa Telecom Co., Ltd. OU=ePKI Root Certification Authority
# Subject: O=Chunghwa Telecom Co., Ltd. OU=ePKI Root Certification Authority
# Label: "ePKI Root Certification Authority"
# Serial: 28956088682735189655030529057352760477
# MD5 Fingerprint: 1b:2e:00:ca:26:06:90:3d:ad:fe:6f:15:68:d3:6b:b3
# SHA1 Fingerprint: 67:65:0d:f1:7e:8e:7e:5b:82:40:a4:f4:56:4b:cf:e2:3d:69:c6:f0
# SHA256 Fingerprint: c0:a6:f4:dc:63:a2:4b:fd:cf:54:ef:2a:6a:08:2a:0a:72:de:35:80:3e:2f:f5:ff:52:7a:e5:d8:72:06:df:d5
-----BEGIN CERTIFICATE-----
MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBe
MQswCQYDVQQGEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0
ZC4xKjAoBgNVBAsMIWVQS0kgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
Fw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMxMjdaMF4xCzAJBgNVBAYTAlRXMSMw
IQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEqMCgGA1UECwwhZVBL
SSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEF
AAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAH
SyZbCUNsIZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAh
ijHyl3SJCRImHJ7K2RKilTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3X
DZoTM1PRYfl61dd4s5oz9wCGzh1NlDivqOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1
TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX12ruOzjjK9SXDrkb5wdJ
fzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0OWQqraffA
sgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uU
WH1+ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLS
nT0IFaUQAS2zMnaolQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pH
dmX2Os+PYhcZewoozRrSgx4hxyy/vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJip
NiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXiZo1jDiVN1Rmy5nk3pyKdVDEC
AwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/QkqiMAwGA1UdEwQF
MAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH
ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGB
uvl2ICO1J2B01GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6Yl
PwZpVnPDimZI+ymBV3QGypzqKOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkP
JXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdVxrsStZf0X4OFunHB2WyBEXYKCrC/
gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEPNXubrjlpC2JgQCA2
j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+rGNm6
5ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUB
o2M3IUxExJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS
/jQ6fbjpKdx2qcgw+BRxgMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2z
Gp1iro2C6pSe3VkQw63d4k3jMdXH7OjysP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTE
W9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmODBCEIZ43ygknQW/2xzQ+D
hNQ+IIX3Sj0rnP0qCglN6oH4EZw=
-----END CERTIFICATE-----

# Issuer: CN=TÜBİTAK UEKAE Kök Sertifika Hizmet Sağlayıcısı - Sürüm 3 O=Türkiye Bilimsel ve Teknolojik Araştırma Kurumu - TÜBİTAK OU=Ulusal Elektronik ve Kriptoloji Araştırma Enstitüsü - UEKAE/Kamu Sertifikasyon Merkezi
# Subject: CN=TÜBİTAK UEKAE Kök Sertifika Hizmet Sağlayıcısı - Sürüm 3 O=Türkiye Bilimsel ve Teknolojik Araştırma Kurumu - TÜBİTAK OU=Ulusal Elektronik ve Kriptoloji Araştırma Enstitüsü - UEKAE/Kamu Sertifikasyon Merkezi
# Label: "T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3"
# Serial: 17
# MD5 Fingerprint: ed:41:f5:8c:50:c5:2b:9c:73:e6:ee:6c:eb:c2:a8:26
# SHA1 Fingerprint: 1b:4b:39:61:26:27:6b:64:91:a2:68:6d:d7:02:43:21:2d:1f:1d:96
# SHA256 Fingerprint: e4:c7:34:30:d7:a5:b5:09:25:df:43:37:0a:0d:21:6e:9a:79:b9:d6:db:83:73:a0:c6:9e:b1:cc:31:c7:c5:2a
-----BEGIN CERTIFICATE-----
MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRS
MRgwFgYDVQQHDA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJp
bGltc2VsIHZlIFRla25vbG9qaWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSw
VEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ryb25payB2ZSBLcmlwdG9sb2ppIEFy
YcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNVBAsMGkthbXUgU2Vy
dGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUgS8O2
ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAe
Fw0wNzA4MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIx
GDAWBgNVBAcMD0dlYnplIC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmls
aW1zZWwgdmUgVGVrbm9sb2ppayBBcmHFn3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBU
QUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZlIEtyaXB0b2xvamkgQXJh
xZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2FtdSBTZXJ0
aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7Zr
IFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4h
gb46ezzb8R1Sf1n68yJMlaCQvEhOEav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yK
O7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1xnnRFDDtG1hba+818qEhTsXO
fJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR6Oqeyjh1jmKw
lZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL
hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQID
AQABo0IwQDAdBgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/
BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmP
NOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4N5EY3ATIZJkrGG2AA1nJrvhY0D7t
wyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLTy9LQQfMmNkqblWwM
7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYhLBOh
gLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5n
oN+J1q2MdqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUs
yZyQ2uypQjyttgI=
-----END CERTIFICATE-----

# Issuer: CN=Buypass Class 2 CA 1 O=Buypass AS-983163327
# Subject: CN=Buypass Class 2 CA 1 O=Buypass AS-983163327
# Label: "Buypass Class 2 CA 1"
# Serial: 1
# MD5 Fingerprint: b8:08:9a:f0:03:cc:1b:0d:c8:6c:0b:76:a1:75:64:23
# SHA1 Fingerprint: a0:a1:ab:90:c9:fc:84:7b:3b:12:61:e8:97:7d:5f:d3:22:61:d3:cc
# SHA256 Fingerprint: 0f:4e:9c:dd:26:4b:02:55:50:d1:70:80:63:40:21:4f:e9:44:34:c9:b0:2f:69:7e:c7:10:fc:5f:ea:fb:5e:38
-----BEGIN CERTIFICATE-----
MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEd
MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3Mg
Q2xhc3MgMiBDQSAxMB4XDTA2MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzEL
MAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MR0wGwYD
VQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7McXA0
ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLX
l18xoS830r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVB
HfCuuCkslFJgNJQ72uA40Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B
5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/RuFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3
WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0PAQH/BAQD
AgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLP
gcIV1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+
DKhQ7SLHrQVMdvvt7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKu
BctN518fV4bVIJwo+28TOPX2EZL2fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHs
h7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5wwDX3OaJdZtB7WZ+oRxKaJyOk
LY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho
-----END CERTIFICATE-----

# Issuer: CN=Buypass Class 3 CA 1 O=Buypass AS-983163327
# Subject: CN=Buypass Class 3 CA 1 O=Buypass AS-983163327
# Label: "Buypass Class 3 CA 1"
# Serial: 2
# MD5 Fingerprint: df:3c:73:59:81:e7:39:50:81:04:4c:34:a2:cb:b3:7b
# SHA1 Fingerprint: 61:57:3a:11:df:0e:d8:7e:d5:92:65:22:ea:d0:56:d7:44:b3:23:71
# SHA256 Fingerprint: b7:b1:2b:17:1f:82:1d:aa:99:0c:d0:fe:50:87:b1:28:44:8b:a8:e5:18:4f:84:c5:1e:02:b5:c8:fb:96:2b:24
-----BEGIN CERTIFICATE-----
MIIDUzCCAjugAwIBAgIBAjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEd
MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3Mg
Q2xhc3MgMyBDQSAxMB4XDTA1MDUwOTE0MTMwM1oXDTE1MDUwOTE0MTMwM1owSzEL
MAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MR0wGwYD
VQQDDBRCdXlwYXNzIENsYXNzIDMgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAKSO13TZKWTeXx+HgJHqTjnmGcZEC4DVC69TB4sSveZn8AKxifZg
isRbsELRwCGoy+Gb72RRtqfPFfV0gGgEkKBYouZ0plNTVUhjP5JW3SROjvi6K//z
NIqeKNc0n6wv1g/xpC+9UrJJhW05NfBEMJNGJPO251P7vGGvqaMU+8IXF4Rs4HyI
+MkcVyzwPX6UvCWThOiaAJpFBUJXgPROztmuOfbIUxAMZTpHe2DC1vqRycZxbL2R
hzyRhkmr8w+gbCZ2Xhysm3HljbybIR6c1jh+JIAVMYKWsUnTYjdbiAwKYjT+p0h+
mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0PAQH/BAQD
AgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFP
Bdy7pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27s
EzNxZy5p+qksP2bAEllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2
mSlf56oBzKwzqBwKu5HEA6BvtjT5htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yC
e/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQjel/wroQk5PMr+4okoyeYZdow
dXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915
-----END CERTIFICATE-----

# Issuer: CN=EBG Elektronik Sertifika Hizmet Sağlayıcısı O=EBG Bilişim Teknolojileri ve Hizmetleri A.Ş.
# Subject: CN=EBG Elektronik Sertifika Hizmet Sağlayıcısı O=EBG Bilişim Teknolojileri ve Hizmetleri A.Ş.
# Label: "EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1"
# Serial: 5525761995591021570
# MD5 Fingerprint: 2c:20:26:9d:cb:1a:4a:00:85:b5:b7:5a:ae:c2:01:37
# SHA1 Fingerprint: 8c:96:ba:eb:dd:2b:07:07:48:ee:30:32:66:a0:f3:98:6e:7c:ae:58
# SHA256 Fingerprint: 35:ae:5b:dd:d8:f7:ae:63:5c:ff:ba:56:82:a8:f0:0b:95:f4:84:62:c7:10:8e:e9:a0:e5:29:2b:07:4a:af:b2
-----BEGIN CERTIFICATE-----
MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNV
BAMML0VCRyBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
c8SxMTcwNQYDVQQKDC5FQkcgQmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXpt
ZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAeFw0wNjA4MTcwMDIxMDlaFw0xNjA4
MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25payBTZXJ0aWZpa2Eg
SGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2ltIFRl
a25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIi
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h
4fuXd7hxlugTlkaDT7byX3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAk
tiHq6yOU/im/+4mRDGSaBUorzAzu8T2bgmmkTPiab+ci2hC6X5L8GCcKqKpE+i4s
tPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfreYteIAbTdgtsApWjluTL
dlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZTqNGFav4
c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8Um
TDGyY5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z
+kI2sSXFCjEmN1ZnuqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0O
Lna9XvNRiYuoP1Vzv9s6xiQFlpJIqkuNKgPlV5EQ9GooFW5Hd4RcUXSfGenmHmMW
OeMRFeNYGkS9y8RsZteEBt8w9DeiQyJ50hBs37vmExH8nYQKE3vwO9D8owrXieqW
fo1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0Nokb+Clsi7n2
l9GkLqq+CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
/wQEAwIBBjAdBgNVHQ4EFgQU587GT/wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgw
FoAU587GT/wWZ5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2+
8ygjdsZs93/mQJ7ANtyVDR2tFcU22NU57/IeIl6zgrRdu0waypIN30ckHrMk2pGI
6YNw3ZPX6bqz3xZaPt7gyPvT/Wwp+BVGoGgmzJNSroIBk5DKd8pNSe/iWtkqvTDO
TLKBtjDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64kXPBfrAowzIpAoHME
wfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqTbCmY
Iai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJn
xk1Gj7sURT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4Q
DgZxGhBM/nV+/x5XOULK1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9q
Kd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11t
hie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQY9iJSrSq3RZj9W6+YKH4
7ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9AahH3eU7
QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT
-----END CERTIFICATE-----

# Issuer: O=certSIGN OU=certSIGN ROOT CA
# Subject: O=certSIGN OU=certSIGN ROOT CA
# Label: "certSIGN ROOT CA"
# Serial: 35210227249154
# MD5 Fingerprint: 18:98:c0:d6:e9:3a:fc:f9:b0:f5:0c:f7:4b:01:44:17
# SHA1 Fingerprint: fa:b7:ee:36:97:26:62:fb:2d:b0:2a:f6:bf:03:fd:e8:7c:4b:2f:9b
# SHA256 Fingerprint: ea:a9:62:c4:fa:4a:6b:af:eb:e4:15:19:6d:35:1c:cd:88:8d:4f:53:f3:fa:8a:e6:d7:c4:66:a9:4e:60:42:bb
-----BEGIN CERTIFICATE-----
MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYT
AlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBD
QTAeFw0wNjA3MDQxNzIwMDRaFw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJP
MREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7IJUqOtdu0KBuqV5Do
0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHHrfAQ
UySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5d
RdY4zTW2ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQ
OA7+j0xbm0bqQfWwCHTD0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwv
JoIQ4uNllAoEwF73XVv4EOLQunpL+943AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08C
AwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAcYwHQYDVR0O
BBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IBAQA+0hyJ
LjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecY
MnQ8SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ
44gx+FkagQnIl6Z0x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6I
Jd1hJyMctTEHBDa0GpC9oHRxUIltvBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNw
i/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7NzTogVZ96edhBiIL5VaZVDADlN
9u6wWk5JRFRYX0KD
-----END CERTIFICATE-----

# Issuer: CN=CNNIC ROOT O=CNNIC
# Subject: CN=CNNIC ROOT O=CNNIC
# Label: "CNNIC ROOT"
# Serial: 1228079105
# MD5 Fingerprint: 21:bc:82:ab:49:c4:13:3b:4b:b2:2b:5c:6b:90:9c:19
# SHA1 Fingerprint: 8b:af:4c:9b:1d:f0:2a:92:f7:da:12:8e:b9:1b:ac:f4:98:60:4b:6f
# SHA256 Fingerprint: e2:83:93:77:3d:a8:45:a6:79:f2:08:0c:c7:fb:44:a3:b7:a1:c3:79:2c:b7:eb:77:29:fd:cb:6a:8d:99:ae:a7
-----BEGIN CERTIFICATE-----
MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJD
TjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2
MDcwOTE0WhcNMjcwNDE2MDcwOTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMF
Q05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzDo+/hn7E7SIX1mlwh
IhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tizVHa6
dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZO
V/kbZKKTVrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrC
GHn2emU1z5DrvTOTn1OrczvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gN
v7Sg2Ca+I19zN38m5pIEo3/PIKe38zrKy5nLAgMBAAGjczBxMBEGCWCGSAGG+EIB
AQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscCwQ7vptU7ETAPBgNVHRMB
Af8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991SlgrHAsEO
76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnK
OOK5Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvH
ugDnuL8BV8F3RTIMO/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7Hgvi
yJA/qIYM/PmLXoXLT1tLYhFHxUV8BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fL
buXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2G8kS1sHNzYDzAgE8yGnLRUhj
2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5mmxE=
-----END CERTIFICATE-----

# Issuer: O=Japanese Government OU=ApplicationCA
# Subject: O=Japanese Government OU=ApplicationCA
# Label: "ApplicationCA - Japanese Government"
# Serial: 49
# MD5 Fingerprint: 7e:23:4e:5b:a7:a5:b4:25:e9:00:07:74:11:62:ae:d6
# SHA1 Fingerprint: 7f:8a:b0:cf:d0:51:87:6a:66:f3:36:0f:47:c8:8d:8c:d3:35:fc:74
# SHA256 Fingerprint: 2d:47:43:7d:e1:79:51:21:5a:12:f3:c5:8e:51:c7:29:a5:80:26:ef:1f:cc:0a:5f:b3:d9:dc:01:2f:60:0d:19
-----BEGIN CERTIFICATE-----
MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEc
MBoGA1UEChMTSmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRp
b25DQTAeFw0wNzEyMTIxNTAwMDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYT
AkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zlcm5tZW50MRYwFAYDVQQLEw1BcHBs
aWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp23gdE6H
j6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4fl+K
f5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55
IrmTwcrNwVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cw
FO5cjFW6WY2H/CPek9AEjP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDiht
QWEjdnjDuGWk81quzMKq2edY3rZ+nYVunyoKb58DKTCXKB28t89UKU5RMfkntigm
/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRUWssmP3HMlEYNllPqa0jQ
k/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNVBAYTAkpQ
MRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOC
seODvOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
ggEBADlqRHZ3ODrso2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJ
hyzjVOGjprIIC8CFqMjSnHH2HZ9g/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+
eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYDio+nEhEMy/0/ecGc/WLuo89U
DNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmWdupwX3kSa+Sj
B1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
rosot4LKGAfmt1t06SAZf7IbiVQ=
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
# Subject: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
# Label: "GeoTrust Primary Certification Authority - G3"
# Serial: 28809105769928564313984085209975885599
# MD5 Fingerprint: b5:e8:34:36:c9:10:44:58:48:70:6d:2e:83:d4:b8:05
# SHA1 Fingerprint: 03:9e:ed:b8:0b:e7:a0:3c:69:53:89:3b:20:d2:d9:32:3a:4c:2a:fd
# SHA256 Fingerprint: b4:78:b8:12:25:0d:f8:78:63:5c:2a:a7:ec:7d:15:5e:aa:62:5e:e8:29:16:e2:cd:29:43:61:88:6c:d1:fb:d4
-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT
MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhv
cml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIzNTk1OVowgZgxCzAJ
BgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
MjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0
BgNVBAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz
+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5jK/BGvESyiaHAKAxJcCGVn2TAppMSAmUm
hsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdEc5IiaacDiGydY8hS2pgn
5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3CIShwiP/W
JmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exAL
DmKudlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZC
huOl1UcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw
HQYDVR0OBBYEFMR5yo6hTgMdHNxr2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IB
AQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9cr5HqQ6XErhK8WTTOd8lNNTB
zU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbEAp7aDHdlDkQN
kv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH
SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G
spki4cErx5z481+oghLrGREt
-----END CERTIFICATE-----

# Issuer: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
# Subject: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
# Label: "thawte Primary Root CA - G2"
# Serial: 71758320672825410020661621085256472406
# MD5 Fingerprint: 74:9d:ea:60:24:c4:fd:22:53:3e:cc:3a:72:d9:29:4f
# SHA1 Fingerprint: aa:db:bc:22:23:8f:c4:01:a1:27:bb:38:dd:f4:1d:db:08:9e:f0:12
# SHA256 Fingerprint: a4:31:0d:50:af:18:a6:44:71:90:37:2a:86:af:af:8b:95:1f:fb:43:1d:83:7f:1e:56:88:b4:59:71:ed:15:57
-----BEGIN CERTIFICATE-----
MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL
MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp
IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi
BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw
MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig
YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v
dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/
BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6
papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E
BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K
DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3
KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox
XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
-----END CERTIFICATE-----

# Issuer: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
# Subject: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
# Label: "thawte Primary Root CA - G3"
# Serial: 127614157056681299805556476275995414779
# MD5 Fingerprint: fb:1b:5d:43:8a:94:cd:44:c6:76:f2:43:4b:47:e7:31
# SHA1 Fingerprint: f1:8b:53:8d:1b:e9:03:b6:a6:f0:56:43:5b:17:15:89:ca:f3:6b:f2
# SHA256 Fingerprint: 4b:03:f4:58:07:ad:70:f2:1b:fc:2c:ae:71:c9:fd:e4:60:4c:06:4c:f5:ff:b6:86:ba:e5:db:aa:d7:fd:d3:4c
-----BEGIN CERTIFICATE-----
MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCB
rjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
MDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNV
BAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0wODA0MDIwMDAwMDBa
Fw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3Rl
LCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u
MTgwNgYDVQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXpl
ZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEcz
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr8nLPvb2FvdeHsbnndm
gcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2AtP0LMqmsywCPLLEHd5N/8
YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC+BsUa0Lf
b1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS9
9irY7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2S
zhkGcuYMXDhpxwTWvGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUk
OQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV
HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA
2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW
oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c
KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM
m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu
MdRAGmI0Nj81Aa6sY6A=
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
# Subject: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
# Label: "GeoTrust Primary Certification Authority - G2"
# Serial: 80682863203381065782177908751794619243
# MD5 Fingerprint: 01:5e:d8:6b:bd:6f:3d:8e:a1:31:f8:12:e0:98:73:6a
# SHA1 Fingerprint: 8d:17:84:d5:37:f3:03:7d:ec:70:fe:57:8b:51:9a:99:e6:10:d7:b0
# SHA256 Fingerprint: 5e:db:7a:c4:3b:82:a0:6a:87:61:e8:d7:be:49:79:eb:f2:61:1f:7d:d7:9b:f9:1c:1c:6b:56:6a:21:9e:d7:66
-----BEGIN CERTIFICATE-----
MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDEL
MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChj
KSAyMDA3IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2
MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1OVowgZgxCzAJBgNV
BAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykgMjAw
NyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNV
BAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
MjB2MBAGByqGSM49AgEGBSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcL
So17VDs6bl8VAsBQps8lL33KSLjHUGMcKiEIfJo22Av+0SbFWDEwKCXzXV2juLal
tJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+EVXVMAoG
CCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGT
qQ7mndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBucz
rD6ogRLQy7rQkgu2npaqBA+K
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
# Label: "VeriSign Universal Root Certification Authority"
# Serial: 85209574734084581917763752644031726877
# MD5 Fingerprint: 8e:ad:b5:01:aa:4d:81:e4:8c:1d:d1:e1:14:00:95:19
# SHA1 Fingerprint: 36:79:ca:35:66:87:72:30:4d:30:a5:fb:87:3b:0f:a7:7b:b7:0d:54
# SHA256 Fingerprint: 23:99:56:11:27:a5:71:25:de:8c:ef:ea:61:0d:df:2f:a0:78:b5:c8:06:7f:4e:82:82:90:bf:b8:60:e8:4b:3c
-----BEGIN CERTIFICATE-----
MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCB
vTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJp
U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYDVQQDEy9W
ZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
Fw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJVUzEX
MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0
IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9y
IGF1dGhvcml6ZWQgdXNlIG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNh
bCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj1mCOkdeQmIN65lgZOIzF
9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGPMiJhgsWH
H26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+H
LL729fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN
/BMReYTtXlT2NJ8IAfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPT
rJ9VAMf2CGqUuV/c4DPxhGD5WycRtPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1Ud
EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0GCCsGAQUFBwEMBGEwX6FdoFsw
WTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2Oa8PPgGrUSBgs
exkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4
sAPmLGd75JR3Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+
seQxIcaBlVZaDrHC1LGmWazxY8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz
4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTxP/jgdFcrGJ2BtMQo2pSXpXDrrB2+
BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+PwGZsY6rp2aQW9IHR
lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3
7M2CYfE45k+XmCpajQ==
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
# Label: "VeriSign Class 3 Public Primary Certification Authority - G4"
# Serial: 63143484348153506665311985501458640051
# MD5 Fingerprint: 3a:52:e1:e7:fd:6f:3a:e3:6f:f3:6f:99:1b:f9:22:41
# SHA1 Fingerprint: 22:d5:d8:df:8f:02:31:d1:8d:f7:9d:b7:cf:8a:2d:64:c9:3f:6c:3a
# SHA256 Fingerprint: 69:dd:d7:ea:90:bb:57:c9:3e:13:5d:c8:5e:a6:fc:d5:48:0b:60:32:39:bd:c4:54:fc:75:8b:2a:26:cf:7f:79
-----BEGIN CERTIFICATE-----
MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjEL
MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2ln
biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
aXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjELMAkG
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
U2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwg
SW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2ln
biBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8Utpkmw4tXNherJI9/gHm
GUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGzrl0Bp3ve
fLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUw
AwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJ
aW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYj
aHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMW
kf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMDA2gAMGUCMGYhDBgmYFo4e1ZC
4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIxAJw9SDkjOVga
FRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
-----END CERTIFICATE-----

# Issuer: CN=NetLock Arany (Class Gold) Főtanúsítvány O=NetLock Kft. OU=Tanúsítványkiadók (Certification Services)
# Subject: CN=NetLock Arany (Class Gold) Főtanúsítvány O=NetLock Kft. OU=Tanúsítványkiadók (Certification Services)
# Label: "NetLock Arany (Class Gold) Főtanúsítvány"
# Serial: 80544274841616
# MD5 Fingerprint: c5:a1:b7:ff:73:dd:d6:d7:34:32:18:df:fc:3c:ad:88
# SHA1 Fingerprint: 06:08:3f:59:3f:15:a1:04:a0:69:a4:6b:a9:03:d0:06:b7:97:09:91
# SHA256 Fingerprint: 6c:61:da:c3:a2:de:f0:31:50:6b:e0:36:d2:a6:fe:40:19:94:fb:d1:3d:f9:c8:d4:66:59:92:74:c4:46:ec:98
-----BEGIN CERTIFICATE-----
MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQG
EwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3
MDUGA1UECwwuVGFuw7pzw610dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNl
cnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBBcmFueSAoQ2xhc3MgR29sZCkgRsWR
dGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgxMjA2MTUwODIxWjCB
pzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxOZXRM
b2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlm
aWNhdGlvbiBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNz
IEdvbGQpIEbFkXRhbsO6c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAxCRec75LbRTDofTjl5Bu0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrT
lF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw/HpYzY6b7cNGbIRwXdrz
AZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAkH3B5r9s5
VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRG
ILdwfzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2
BJtr+UBdADTHLpl1neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAG
AQH/AgEEMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2M
U9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwWqZw8UQCgwBEIBaeZ5m8BiFRh
bvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTtaYtOUZcTh5m2C
+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2F
uLjbvrW5KfnaNwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2
XjG4Kvte9nHfRCaexOYNkbQudZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
-----END CERTIFICATE-----

# Issuer: CN=Staat der Nederlanden Root CA - G2 O=Staat der Nederlanden
# Subject: CN=Staat der Nederlanden Root CA - G2 O=Staat der Nederlanden
# Label: "Staat der Nederlanden Root CA - G2"
# Serial: 10000012
# MD5 Fingerprint: 7c:a5:0f:f8:5b:9a:7d:6d:30:ae:54:5a:e3:42:a2:8a
# SHA1 Fingerprint: 59:af:82:79:91:86:c7:b4:75:07:cb:cf:03:57:46:eb:04:dd:b7:16
# SHA256 Fingerprint: 66:8c:83:94:7d:a6:3b:72:4b:ec:e1:74:3c:31:a0:e6:ae:d0:db:8e:c5:b3:1b:e3:77:bb:78:4f:91:b6:71:6f
-----BEGIN CERTIFICATE-----
MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJO
TDEeMBwGA1UECgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFh
dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oX
DTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMCTkwxHjAcBgNVBAoMFVN0YWF0IGRl
ciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5lZGVybGFuZGVuIFJv
b3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ5291
qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8Sp
uOUfiUtnvWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPU
Z5uW6M7XxgpT0GtJlvOjCwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvE
pMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiile7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp
5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCROME4HYYEhLoaJXhena/M
UGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpICT0ugpTN
GmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy
5V6548r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv
6q012iDTiIJh8BIitrzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEK
eN5KzlW/HdXZt1bv8Hb/C3m1r737qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6
B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMBAAGjgZcwgZQwDwYDVR0TAQH/
BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcCARYxaHR0cDov
L3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqG
SIb3DQEBCwUAA4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLyS
CZa59sCrI2AGeYwRTlHSeYAz+51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen
5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwjf/ST7ZwaUb7dRUG/kSS0H4zpX897
IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaNkqbG9AclVMwWVxJK
gnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfkCpYL
+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxL
vJxxcypFURmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkm
bEgeqmiSBeGCc1qb3AdbCG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvk
N1trSt8sV4pAWja63XVECDdCcAz+3F4hoKOKwJCcaNpQ5kUQR3i2TtJlycM33+FC
Y7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoVIPVVYpbtbZNQvOSqeK3Z
ywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm66+KAQ==
-----END CERTIFICATE-----

# Issuer: CN=CA Disig O=Disig a.s.
# Subject: CN=CA Disig O=Disig a.s.
# Label: "CA Disig"
# Serial: 1
# MD5 Fingerprint: 3f:45:96:39:e2:50:87:f7:bb:fe:98:0c:3c:20:98:e6
# SHA1 Fingerprint: 2a:c8:d5:8b:57:ce:bf:2f:49:af:f2:fc:76:8f:51:14:62:90:7a:41
# SHA256 Fingerprint: 92:bf:51:19:ab:ec:ca:d0:b1:33:2d:c4:e1:d0:5f:ba:75:b5:67:90:44:ee:0c:a2:6e:93:1f:74:4f:2f:33:cf
-----BEGIN CERTIFICATE-----
MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzET
MBEGA1UEBxMKQnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UE
AxMIQ0EgRGlzaWcwHhcNMDYwMzIyMDEzOTM0WhcNMTYwMzIyMDEzOTM0WjBKMQsw
CQYDVQQGEwJTSzETMBEGA1UEBxMKQnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcg
YS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQCS9jHBfYj9mQGp2HvycXXxMcbzdWb6UShGhJd4NLxs/LxFWYgmGErE
Nx+hSkS943EE9UQX4j/8SFhvXJ56CbpRNyIjZkMhsDxkovhqFQ4/61HhVKndBpnX
mjxUizkDPw/Fzsbrg3ICqB9x8y34dQjbYkzo+s7552oftms1grrijxaSfQUMbEYD
XcDtab86wYqg6I7ZuUUohwjstMoVvoLdtUSLLa2GDGhibYVW8qwUYzrG0ZmsNHhW
S8+2rT+MitcE5eN4TPWGqvWP+j1scaMtymfraHtuM6kMgiioTGohQBUgDCZbg8Kp
FhXAJIJdKxatymP2dACw30PEEGBWZ2NFAgMBAAGjgf8wgfwwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUjbJJaJ1yCCW5wCf1UJNWSEZx+Y8wDgYDVR0PAQH/BAQD
AgEGMDYGA1UdEQQvMC2BE2Nhb3BlcmF0b3JAZGlzaWcuc2uGFmh0dHA6Ly93d3cu
ZGlzaWcuc2svY2EwZgYDVR0fBF8wXTAtoCugKYYnaHR0cDovL3d3dy5kaXNpZy5z
ay9jYS9jcmwvY2FfZGlzaWcuY3JsMCygKqAohiZodHRwOi8vY2EuZGlzaWcuc2sv
Y2EvY3JsL2NhX2Rpc2lnLmNybDAaBgNVHSAEEzARMA8GDSuBHpGT5goAAAABAQEw
DQYJKoZIhvcNAQEFBQADggEBAF00dGFMrzvY/59tWDYcPQuBDRIrRhCA/ec8J9B6
yKm2fnQwM6M6int0wHl5QpNt/7EpFIKrIYwvF/k/Ji/1WcbvgAa3mkkp7M5+cTxq
EEHA9tOasnxakZzArFvITV734VP/Q3f8nktnbNfzg9Gg4H8l37iYC5oyOGwwoPP/
CBUz91BKez6jPiCp3C9WgArtQVCwyfTssuMmRAAOb54GvCKWU3BlxFAKRmukLyeB
EicTXxChds6KezfqwzlhA5WYOudsiCUI/HloDYd9Yvi0X/vF2Ey9WLw/Q1vUHgFN
PGO+I++MzVpQuGhU+QqZMxEA4Z7CRneC9VkGjCFMhwnN5ag=
-----END CERTIFICATE-----

# Issuer: CN=Juur-SK O=AS Sertifitseerimiskeskus
# Subject: CN=Juur-SK O=AS Sertifitseerimiskeskus
# Label: "Juur-SK"
# Serial: 999181308
# MD5 Fingerprint: aa:8e:5d:d9:f8:db:0a:58:b7:8d:26:87:6c:82:35:55
# SHA1 Fingerprint: 40:9d:4b:d9:17:b5:5c:27:b6:9b:64:cb:98:22:44:0d:cd:09:b8:89
# SHA256 Fingerprint: ec:c3:e9:c3:40:75:03:be:e0:91:aa:95:2f:41:34:8f:f8:8b:aa:86:3b:22:64:be:fa:c8:07:90:15:74:e9:39
-----BEGIN CERTIFICATE-----
MIIE5jCCA86gAwIBAgIEO45L/DANBgkqhkiG9w0BAQUFADBdMRgwFgYJKoZIhvcN
AQkBFglwa2lAc2suZWUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKExlBUyBTZXJ0aWZp
dHNlZXJpbWlza2Vza3VzMRAwDgYDVQQDEwdKdXVyLVNLMB4XDTAxMDgzMDE0MjMw
MVoXDTE2MDgyNjE0MjMwMVowXTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMQsw
CQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEQ
MA4GA1UEAxMHSnV1ci1TSzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AIFxNj4zB9bjMI0TfncyRsvPGbJgMUaXhvSYRqTCZUXP00B841oiqBB4M8yIsdOB
SvZiF3tfTQou0M+LI+5PAk676w7KvRhj6IAcjeEcjT3g/1tf6mTll+g/mX8MCgkz
ABpTpyHhOEvWgxutr2TC+Rx6jGZITWYfGAriPrsfB2WThbkasLnE+w0R9vXW+RvH
LCu3GFH+4Hv2qEivbDtPL+/40UceJlfwUR0zlv/vWT3aTdEVNMfqPxZIe5EcgEMP
PbgFPtGzlc3Yyg/CQ2fbt5PgIoIuvvVoKIO5wTtpeyDaTpxt4brNj3pssAki14sL
2xzVWiZbDcDq5WDQn/413z8CAwEAAaOCAawwggGoMA8GA1UdEwEB/wQFMAMBAf8w
ggEWBgNVHSAEggENMIIBCTCCAQUGCisGAQQBzh8BAQEwgfYwgdAGCCsGAQUFBwIC
MIHDHoHAAFMAZQBlACAAcwBlAHIAdABpAGYAaQBrAGEAYQB0ACAAbwBuACAAdgDk
AGwAagBhAHMAdABhAHQAdQBkACAAQQBTAC0AaQBzACAAUwBlAHIAdABpAGYAaQB0
AHMAZQBlAHIAaQBtAGkAcwBrAGUAcwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABz
AGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABrAGkAbgBuAGkAdABhAG0AaQBz
AGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nwcy8wKwYDVR0f
BCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE
FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcY
P2/v6X2+MA4GA1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOi
CfP+JmeaUOTDBS8rNXiRTHyoERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+g
kcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyLabVAyJRld/JXIWY7zoVAtjNjGr95
HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678IIbsSt4beDI3poHS
na9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkhMp6q
qIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0Z
TbvGRNs2yyqcjg==
-----END CERTIFICATE-----

# Issuer: CN=Hongkong Post Root CA 1 O=Hongkong Post
# Subject: CN=Hongkong Post Root CA 1 O=Hongkong Post
# Label: "Hongkong Post Root CA 1"
# Serial: 1000
# MD5 Fingerprint: a8:0d:6f:39:78:b9:43:6d:77:42:6d:98:5a:cc:23:ca
# SHA1 Fingerprint: d6:da:a8:20:8d:09:d2:15:4d:24:b5:2f:cb:34:6e:b2:58:b2:8a:58
# SHA256 Fingerprint: f9:e6:7d:33:6c:51:00:2a:c0:54:c6:32:02:2d:66:dd:a2:e7:e3:ff:f1:0a:d0:61:ed:31:d8:bb:b4:10:cf:b2
-----BEGIN CERTIFICATE-----
MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsx
FjAUBgNVBAoTDUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3Qg
Um9vdCBDQSAxMB4XDTAzMDUxNTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkG
A1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdr
b25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1ApzQ
jVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEn
PzlTCeqrauh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjh
ZY4bXSNmO7ilMlHIhqqhqZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9
nnV0ttgCXjqQesBCNnLsak3c78QA3xMYV18meMjWCnl3v/evt3a5pQuEF10Q6m/h
q5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNVHRMBAf8ECDAGAQH/AgED
MA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7ih9legYsC
mEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI3
7piol7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clB
oiMBdDhViw+5LmeiIAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJs
EhTkYY2sEJCehFC78JZvRZ+K88psT/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpO
fMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilTc4afU9hDDl3WY4JxHYB0yvbi
AmvZWg==
-----END CERTIFICATE-----

# Issuer: CN=SecureSign RootCA11 O=Japan Certification Services, Inc.
# Subject: CN=SecureSign RootCA11 O=Japan Certification Services, Inc.
# Label: "SecureSign RootCA11"
# Serial: 1
# MD5 Fingerprint: b7:52:74:e2:92:b4:80:93:f2:75:e4:cc:d7:f2:ea:26
# SHA1 Fingerprint: 3b:c4:9f:48:f8:f3:73:a0:9c:1e:bd:f8:5b:b1:c3:65:c7:d8:11:b3
# SHA256 Fingerprint: bf:0f:ee:fb:9e:3a:58:1a:d5:f9:e9:db:75:89:98:57:43:d2:61:08:5c:4d:31:4f:6f:5d:72:59:aa:42:16:12
-----BEGIN CERTIFICATE-----
MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDEr
MCkGA1UEChMiSmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoG
A1UEAxMTU2VjdXJlU2lnbiBSb290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0
MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSswKQYDVQQKEyJKYXBhbiBDZXJ0aWZp
Y2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1cmVTaWduIFJvb3RD
QTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvLTJsz
i1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8
h9uuywGOwvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOV
MdrAG/LuYpmGYz+/3ZMqg6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9
UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rPO7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni
8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitAbpSACW22s293bzUIUPsC
h8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZXt94wDgYD
VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB
AKChOBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xm
KbabfSVSSUOrTC4rbnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQ
X5Ucv+2rIrVls4W6ng+4reV6G4pQOh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWr
QbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01y8hSyn+B/tlr0/cR7SXf+Of5
pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061lgeLKBObjBmN
QSdJQO7e5iNEOdyhIta6A/I=
-----END CERTIFICATE-----

# Issuer: CN=ACEDICOM Root O=EDICOM OU=PKI
# Subject: CN=ACEDICOM Root O=EDICOM OU=PKI
# Label: "ACEDICOM Root"
# Serial: 7029493972724711941
# MD5 Fingerprint: 42:81:a0:e2:1c:e3:55:10:de:55:89:42:65:96:22:e6
# SHA1 Fingerprint: e0:b4:32:2e:b2:f6:a5:68:b6:54:53:84:48:18:4a:50:36:87:43:84
# SHA256 Fingerprint: 03:95:0f:b4:9a:53:1f:3e:19:91:94:23:98:df:a9:e0:ea:32:d7:ba:1c:dd:9b:c8:5d:b5:7e:d9:40:0b:43:4a
-----BEGIN CERTIFICATE-----
MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UE
AwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00x
CzAJBgNVBAYTAkVTMB4XDTA4MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEW
MBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZF
RElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
AgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHkWLn7
09gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7
XBZXehuDYAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5P
Grjm6gSSrj0RuVFCPYewMYWveVqc/udOXpJPQ/yrOq2lEiZmueIM15jO1FillUAK
t0SdE3QrwqXrIhWYENiLxQSfHY9g5QYbm8+5eaA9oiM/Qj9r+hwDezCNzmzAv+Yb
X79nuIQZ1RXve8uQNjFiybwCq0Zfm/4aaJQ0PZCOrfbkHQl/Sog4P75n/TSW9R28
MHTLOO7VbKvU/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXTTxKJxqvQU
fecyuB+81fFOvW8XAjnXDpVCOscAPukmYxHqC9FK/xidstd7LzrZlvvoHpKuE1XI
2Sf23EgbsCTBheN3nZqk8wwRHQ3ItBTutYJXCb8gWH8vIiPYcMt5bMlL8qkqyPyH
K9caUPgn6C9D4zq92Fdx/c6mUlv53U3t5fZvie27k5x2IXXwkkwp9y+cAS7+UEae
ZAwUswdbxcJzbPEHXEUkFDWug/FqTYl6+rPYLWbwNof1K1MCAwEAAaOBqjCBpzAP
BgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKaz4SsrSbbXc6GqlPUB53NlTKxQ
MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU9QHnc2VMrFAw
RAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv
bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWIm
fQwng4/F9tqgaHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3
gvoFNTPhNahXwOf9jU8/kzJPeGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKe
I6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1PwkzQSulgUV1qzOMPPKC8W64iLgpq0i
5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1ThCojz2GuHURwCRi
ipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oIKiMn
MCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZ
o5NjEFIqnxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6
zqylfDJKZ0DcMDQj3dcEI2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacN
GHk0vFQYXlPKNFHtRQrmjseCNj6nOGOpMCwXEGCSn1WHElkQwg9naRHMTh5+Spqt
r0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3otkYNbn5XOmeUwssfnHdK
Z05phkOTOPu220+DkdRgfks+KzgHVZhepA==
-----END CERTIFICATE-----

# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
# Label: "Verisign Class 3 Public Primary Certification Authority"
# Serial: 80507572722862485515306429940691309246
# MD5 Fingerprint: ef:5a:f1:33:ef:f1:cd:bb:51:02:ee:12:14:4b:96:c4
# SHA1 Fingerprint: a1:db:63:93:91:6f:17:e4:18:55:09:40:04:15:c7:02:40:b0:ae:6b
# SHA256 Fingerprint: a4:b6:b3:99:6f:c2:f3:06:b3:fd:86:81:bd:63:41:3d:8c:50:09:cc:4f:a3:29:c2:cc:f0:e2:fa:1b:14:03:05
-----BEGIN CERTIFICATE-----
MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
CSqGSIb3DQEBBQUAA4GBABByUqkFFBkyCEHwxWsKzH4PIRnN5GfcX6kb5sroc50i
2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWXbj9T/UWZYB2oK0z5XqcJ
2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/D/xwzoiQ
-----END CERTIFICATE-----

# Issuer: CN=Microsec e-Szigno Root CA 2009 O=Microsec Ltd.
# Subject: CN=Microsec e-Szigno Root CA 2009 O=Microsec Ltd.
# Label: "Microsec e-Szigno Root CA 2009"
# Serial: 14014712776195784473
# MD5 Fingerprint: f8:49:f4:03:bc:44:2d:83:be:48:69:7d:29:64:fc:b1
# SHA1 Fingerprint: 89:df:74:fe:5c:f4:0f:4a:80:f9:e3:37:7d:54:da:91:e1:01:31:8e
# SHA256 Fingerprint: 3c:5f:81:fe:a5:fa:b8:2c:64:bf:a2:ea:ec:af:cd:e8:e0:77:fc:86:20:a7:ca:e5:37:16:3d:f3:6e:db:f3:78
-----BEGIN CERTIFICATE-----
MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD
VQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0
ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0G
CSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTAeFw0wOTA2MTYxMTMwMThaFw0y
OTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3Qx
FjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3pp
Z25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o
dTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvP
kd6mJviZpWNwrZuuyjNAfW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tc
cbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG0IMZfcChEhyVbUr02MelTTMuhTlAdX4U
fIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKApxn1ntxVUwOXewdI/5n7
N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm1HxdrtbC
xkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1
+rUCAwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G
A1UdDgQWBBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPM
Pcu1SCOhGnqmKrs0aDAbBgNVHREEFDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqG
SIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0olZMEyL/azXm4Q5DwpL7v8u8h
mLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfXI/OMn74dseGk
ddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c
2Pm2G2JwCz02yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5t
HMN1Rq41Bab2XD0h7lbwyYIiLXpUq3DDfSJlgnCW
-----END CERTIFICATE-----

# Issuer: CN=e-Guven Kok Elektronik Sertifika Hizmet Saglayicisi O=Elektronik Bilgi Guvenligi A.S.
# Subject: CN=e-Guven Kok Elektronik Sertifika Hizmet Saglayicisi O=Elektronik Bilgi Guvenligi A.S.
# Label: "E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi"
# Serial: 91184789765598910059173000485363494069
# MD5 Fingerprint: 3d:41:29:cb:1e:aa:11:74:cd:5d:b0:62:af:b0:43:5b
# SHA1 Fingerprint: dd:e1:d2:a9:01:80:2e:1d:87:5e:84:b3:80:7e:4b:b1:fd:99:41:34
# SHA256 Fingerprint: e6:09:07:84:65:a4:19:78:0c:b6:ac:4c:1c:0b:fb:46:53:d9:d9:cc:6e:b3:94:6e:b7:f3:d6:99:97:ba:d5:98
-----BEGIN CERTIFICATE-----
MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1
MQswCQYDVQQGEwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxp
Z2kgQS5TLjE8MDoGA1UEAxMzZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZp
a2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3MDEwNDExMzI0OFoXDTE3MDEwNDEx
MzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0cm9uaWsgQmlsZ2kg
R3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9uaWsg
U2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAMMSIJ6wXgBljU5Gu4Bc6SwGl9XzcslwuedLZYDBS75+PNdU
MZTe1RK6UxYC6lhj71vY8+0qGqpxSKPcEC1fX+tcS5yWCEIlKBHMilpiAVDV6wlT
L/jDj/6z/P2douNffb7tC+Bg62nsM+3YjfsSSYMAyYuXjDtzKjKzEve5TfL0TW3H
5tYmNwjy2f1rXKPlSFxYvEK+A1qBuhw1DADT9SN+cTAIJjjcJRFHLfO6IxClv7wC
90Nex/6wN1CZew+TzuZDLMN+DfIcQ2Zgy2ExR4ejT669VmxMvLz4Bcpk9Ok0oSy1
c+HCPujIyTQlCFzz7abHlJ+tiEMl1+E5YP6sOVkCAwEAAaNCMEAwDgYDVR0PAQH/
BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ/uRLOU1fqRTy7ZVZoE
VtstxNulMA0GCSqGSIb3DQEBBQUAA4IBAQB/X7lTW2M9dTLn+sR0GstG30ZpHFLP
qk/CaOv/gKlR6D1id4k9CnU58W5dF4dvaAXBlGzZXd/aslnLpRCKysw5zZ/rTt5S
/wzw9JKp8mxTq5vSR6AfdPebmvEvFZ96ZDAYBzwqD2fK/A+JYZ1lpTzlvBNbCNvj
/+27BrtqBrF6T2XGgv0enIu1De5Iu7i9qgi0+6N8y5/NkHZchpZ4Vwpm+Vganf2X
KWDeEaaQHBkc7gGWIjQ0LpH5t8Qn0Xvmv/uARFoW5evg1Ao4vOSR49XrXMGs3xtq
fJ7lddK2l4fbzIcrQzqECK+rPNv3PGYxhrCdU3nt+CPeQuMtgvEP5fqX
-----END CERTIFICATE-----

# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
# Label: "GlobalSign Root CA - R3"
# Serial: 4835703278459759426209954
# MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
# SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
# SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
-----BEGIN CERTIFICATE-----
MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
WD9f
-----END CERTIFICATE-----

# Issuer: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
# Subject: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
# Label: "Autoridad de Certificacion Firmaprofesional CIF A62634068"
# Serial: 6047274297262753887
# MD5 Fingerprint: 73:3a:74:7a:ec:bb:a3:96:a6:c2:e4:e2:c8:9b:c0:c3
# SHA1 Fingerprint: ae:c5:fb:3f:c8:e1:bf:c4:e5:4f:03:07:5a:9a:e8:00:b7:f7:b6:fa
# SHA256 Fingerprint: 04:04:80:28:bf:1f:28:64:d4:8f:9a:d4:d8:32:94:36:6a:82:88:56:55:3f:3b:14:30:3f:90:14:7f:5d:40:ef
-----BEGIN CERTIFICATE-----
MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UE
BhMCRVMxQjBABgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1h
cHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEy
MzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUg
Q2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBBNjI2MzQwNjgwggIi
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDDUtd9
thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQM
cas9UX4PB99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefG
L9ItWY16Ck6WaVICqjaY7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15i
NA9wBj4gGFrO93IbJWyTdBSTo3OxDqqHECNZXyAFGUftaI6SEspd/NYrspI8IM/h
X68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyIplD9amML9ZMWGxmPsu2b
m8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctXMbScyJCy
Z/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirja
EbsXLZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/T
KI8xWVvTyQKmtFLKbpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF
6NkBiDkal4ZkQdU7hwxu+g/GvUgUvzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVh
OSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYD
VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNHDhpkLzCBpgYD
VR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBv
ACAAZABlACAAbABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBl
AGwAbwBuAGEAIAAwADgAMAAxADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF
661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx51tkljYyGOylMnfX40S2wBEqgLk9
am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qkR71kMrv2JYSiJ0L1
ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaPT481
PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS
3a/DTg4fJl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5k
SeTy36LssUzAKh3ntLFlosS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF
3dvd6qJ2gHN99ZwExEWN57kci57q13XRcrHedUTnQn3iV2t93Jm8PYMo6oCTjcVM
ZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoRsaS8I8nkvof/uZS2+F0g
StRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTDKCOM/icz
Q0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQB
jLMi6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
-----END CERTIFICATE-----

# Issuer: CN=Izenpe.com O=IZENPE S.A.
# Subject: CN=Izenpe.com O=IZENPE S.A.
# Label: "Izenpe.com"
# Serial: 917563065490389241595536686991402621
# MD5 Fingerprint: a6:b0:cd:85:80:da:5c:50:34:a3:39:90:2f:55:67:73
# SHA1 Fingerprint: 2f:78:3d:25:52:18:a7:4a:65:39:71:b5:2c:a2:9c:45:15:6f:e9:19
# SHA256 Fingerprint: 25:30:cc:8e:98:32:15:02:ba:d9:6f:9b:1f:ba:1b:09:9e:2d:29:9e:0f:45:48:bb:91:4f:36:3b:c0:d4:53:1f
-----BEGIN CERTIFICATE-----
MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4
MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6
ZW5wZS5jb20wHhcNMDcxMjEzMTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYD
VQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5j
b20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ03rKDx6sp4boFmVq
scIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAKClaO
xdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6H
LmYRY2xU+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFX
uaOKmMPsOzTFlUFpfnXCPCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQD
yCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxTOTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+
JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbKF7jJeodWLBoBHmy+E60Q
rLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK0GqfvEyN
BjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8L
hij+0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIB
QFqNeb+Lz0vPqhbBleStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+
HMh3/1uaD7euBUbl8agW7EekFwIDAQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2lu
Zm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+SVpFTlBFIFMuQS4gLSBDSUYg
QTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBGNjIgUzgxQzBB
BgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx
MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AQYwHQYDVR0OBBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUA
A4ICAQB4pgwWSp9MiDrAyw6lFn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWb
laQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbgakEyrkgPH7UIBzg/YsfqikuFgba56
awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8qhT/AQKM6WfxZSzwo
JNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Csg1lw
LDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCT
VyvehQP5aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGk
LhObNA5me0mrZJfQRsN5nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJb
UjWumDqtujWTI6cfSN01RpiyEGjkpTHCClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/
QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZoQ0iy2+tzJOeRf1SktoA+
naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1ZWrOZyGls
QyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
-----END CERTIFICATE-----

# Issuer: CN=Chambers of Commerce Root - 2008 O=AC Camerfirma S.A.
# Subject: CN=Chambers of Commerce Root - 2008 O=AC Camerfirma S.A.
# Label: "Chambers of Commerce Root - 2008"
# Serial: 11806822484801597146
# MD5 Fingerprint: 5e:80:9e:84:5a:0e:65:0b:17:02:f3:55:18:2a:3e:d7
# SHA1 Fingerprint: 78:6a:74:ac:76:ab:14:7f:9c:6a:30:50:ba:9e:a8:7e:fe:9a:ce:3c
# SHA256 Fingerprint: 06:3e:4a:fa:c4:91:df:d3:32:f3:08:9b:85:42:e9:46:17:d8:93:d7:fe:94:4e:10:a7:93:7e:e2:9d:96:93:c0
-----BEGIN CERTIFICATE-----
MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYD
VQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0
IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3
MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xKTAnBgNVBAMTIENoYW1iZXJz
IG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEyMjk1MFoXDTM4MDcz
MTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBj
dXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIw
EAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEp
MCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0G
CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW9
28sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKAXuFixrYp4YFs8r/lfTJq
VKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorjh40G072Q
DuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR
5gN/ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfL
ZEFHcpOrUMPrCXZkNNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05a
Sd+pZgvMPMZ4fKecHePOjlO+Bd5gD2vlGts/4+EhySnB8esHnFIbAURRPHsl18Tl
UlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331lubKgdaX8ZSD6e2wsWsSaR6s
+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ0wlf2eOKNcx5
Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj
ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAx
hduub+84Mxh2EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNV
HQ4EFgQU+SSsD7K1+HnA+mCIG8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1
+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpN
YWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29t
L2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVy
ZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAt
IDIwMDiCCQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRV
HSAAMCowKAYIKwYBBQUHAgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20w
DQYJKoZIhvcNAQEFBQADggIBAJASryI1wqM58C7e6bXpeHxIvj99RZJe6dqxGfwW
PJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH3qLPaYRgM+gQDROpI9CF
5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbURWpGqOt1
glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaH
FoI6M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2
pSB7+R5KBWIBpih1YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MD
xvbxrN8y8NmBGuScvfaAFPDRLLmF9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QG
tjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcKzBIKinmwPQN/aUv0NCB9szTq
jktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvGnrDQWzilm1De
fhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZ
d0jQ
-----END CERTIFICATE-----

# Issuer: CN=Global Chambersign Root - 2008 O=AC Camerfirma S.A.
# Subject: CN=Global Chambersign Root - 2008 O=AC Camerfirma S.A.
# Label: "Global Chambersign Root - 2008"
# Serial: 14541511773111788494
# MD5 Fingerprint: 9e:80:ff:78:01:0c:2e:c1:36:bd:fe:96:90:6e:08:f3
# SHA1 Fingerprint: 4a:bd:ee:ec:95:0d:35:9c:89:ae:c7:52:a1:2c:5b:29:f6:d6:aa:0c
# SHA256 Fingerprint: 13:63:35:43:93:34:a7:69:80:16:a0:d3:24:de:72:28:4e:07:9d:7b:52:20:bb:8f:bd:74:78:16:ee:be:ba:ca
-----BEGIN CERTIFICATE-----
MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYD
VQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0
IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3
MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
aGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMxNDBaFw0zODA3MzEx
MjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3Vy
cmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAG
A1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAl
BgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZI
hvcNAQEBBQADggIPADCCAgoCggIBAMDfVtPkOpt2RbQT2//BthmLN0EYlVJH6xed
KYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXfXjaOcNFccUMd2drvXNL7
G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0ZJJ0YPP2
zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4
ddPB/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyG
HoiMvvKRhI9lNNgATH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2
Id3UwD2ln58fQ1DJu7xsepeY7s2MH/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3V
yJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfeOx2YItaswTXbo6Al/3K1dh3e
beksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSFHTynyQbehP9r
6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh
wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsog
zCtLkykPAgMBAAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQW
BBS5CcqcHtvTbDprru1U8VuTBjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDpr
ru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UEBhMCRVUxQzBBBgNVBAcTOk1hZHJp
ZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJmaXJtYS5jb20vYWRk
cmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJmaXJt
YSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiC
CQDJzdPp1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCow
KAYIKwYBBQUHAgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZI
hvcNAQEFBQADggIBAICIf3DekijZBZRG/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZ
UohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6ReAJ3spED8IXDneRRXoz
X1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/sdZ7LoR/x
fxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVz
a2Mg9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yyd
Yhz2rXzdpjEetrHHfoUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMd
SqlapskD7+3056huirRXhOukP9DuqqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9O
AP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETrP3iZ8ntxPjzxmKfFGBI/5rso
M0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVqc5iJWzouE4ge
v8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
-----END CERTIFICATE-----

# Issuer: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
# Subject: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
# Label: "Go Daddy Root Certificate Authority - G2"
# Serial: 0
# MD5 Fingerprint: 80:3a:bc:22:c1:e6:fb:8d:9b:3b:27:4a:32:1b:9a:01
# SHA1 Fingerprint: 47:be:ab:c9:22:ea:e8:0e:78:78:34:62:a7:9f:45:c2:54:fd:e6:8b
# SHA256 Fingerprint: 45:14:0b:32:47:eb:9c:c8:c5:b4:f0:d7:b5:30:91:f7:32:92:08:9e:6e:5a:63:e2:74:9d:d3:ac:a9:19:8e:da
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT
EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp
ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz
NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH
EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE
AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD
E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH
/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy
DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh
GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR
tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA
AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX
WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu
9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr
gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo
2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI
4uJEvlz36hz1
-----END CERTIFICATE-----

# Issuer: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
# Subject: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
# Label: "Starfield Root Certificate Authority - G2"
# Serial: 0
# MD5 Fingerprint: d6:39:81:c6:52:7e:96:69:fc:fc:ca:66:ed:05:f2:96
# SHA1 Fingerprint: b5:1c:06:7c:ee:2b:0c:3d:f8:55:ab:2d:92:f4:fe:39:d4:e7:0f:0e
# SHA256 Fingerprint: 2c:e1:cb:0b:f9:d2:f9:e1:02:99:3f:be:21:51:52:c3:b2:dd:0c:ab:de:1c:68:e5:31:9b:83:91:54:db:b7:f5
-----BEGIN CERTIFICATE-----
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs
ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw
MFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj
aG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZp
Y2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAL3twQP89o/8ArFvW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMg
nLRJdzIpVv257IzdIvpy3Cdhl+72WoTsbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1
HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNkN3mSwOxGXn/hbVNMYq/N
Hwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7NfZTD4p7dN
dloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0
HZbUJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0G
CSqGSIb3DQEBCwUAA4IBAQARWfolTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjU
sHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx4mcujJUDJi5DnUox9g61DLu3
4jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUwF5okxBDgBPfg
8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1
mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
-----END CERTIFICATE-----

# Issuer: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
# Subject: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
# Label: "Starfield Services Root Certificate Authority - G2"
# Serial: 0
# MD5 Fingerprint: 17:35:74:af:7b:61:1c:eb:f4:f9:3c:e2:ee:40:f9:a2
# SHA1 Fingerprint: 92:5a:8f:8d:2c:6d:04:e0:66:5f:59:6a:ff:22:d8:63:e8:25:6f:3f
# SHA256 Fingerprint: 56:8d:69:05:a2:c8:87:08:a4:b3:02:51:90:ed:cf:ed:b1:97:4a:60:6a:13:c6:e5:29:0f:cb:2a:e6:3e:da:b5
-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
sSi6
-----END CERTIFICATE-----

# Issuer: CN=AffirmTrust Commercial O=AffirmTrust
# Subject: CN=AffirmTrust Commercial O=AffirmTrust
# Label: "AffirmTrust Commercial"
# Serial: 8608355977964138876
# MD5 Fingerprint: 82:92:ba:5b:ef:cd:8a:6f:a6:3d:55:f9:84:f6:d6:b7
# SHA1 Fingerprint: f9:b5:b6:32:45:5f:9c:be:ec:57:5f:80:dc:e9:6e:2c:c7:b2:78:b7
# SHA256 Fingerprint: 03:76:ab:1d:54:c5:f9:80:3c:e4:b2:e2:01:a0:ee:7e:ef:7b:57:b6:36:e8:a9:3c:9b:8d:48:60:c9:6f:5f:a7
-----BEGIN CERTIFICATE-----
MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UE
BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
dCBDb21tZXJjaWFsMB4XDTEwMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDEL
MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
cm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6EqdbDuKP
Hx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yr
ba0F8PrVC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPAL
MeIrJmqbTFeurCA+ukV6BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1
yHp52UKqK39c/s4mT6NmgTWvRLpUHhwwMmWd5jyTXlBOeuM61G7MGvv50jeuJCqr
VwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNVHQ4EFgQUnZPGU4teyq8/
nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
KoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYG
XUPGhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNj
vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt
Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g
N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC
nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
-----END CERTIFICATE-----

# Issuer: CN=AffirmTrust Networking O=AffirmTrust
# Subject: CN=AffirmTrust Networking O=AffirmTrust
# Label: "AffirmTrust Networking"
# Serial: 8957382827206547757
# MD5 Fingerprint: 42:65:ca:be:01:9a:9a:4c:a9:8c:41:49:cd:c0:d5:7f
# SHA1 Fingerprint: 29:36:21:02:8b:20:ed:02:f5:66:c5:32:d1:d6:ed:90:9f:45:00:2f
# SHA256 Fingerprint: 0a:81:ec:5a:92:97:77:f1:45:90:4a:f3:8d:5d:50:9f:66:b5:e2:c5:8f:cd:b5:31:05:8b:0e:17:f3:f0:b4:1b
-----BEGIN CERTIFICATE-----
MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE
BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDEL
MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
cm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SEHi3y
YJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbua
kCNrmreIdIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRL
QESxG9fhwoXA3hA/Pe24/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp
6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gbh+0t+nvujArjqWaJGctB+d1ENmHP4ndG
yH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNVHQ4EFgQUBx/S55zawm6i
QLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
KoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfO
tDIuUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzu
QY0x2+c06lkh1QF612S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZ
Lgo/bNjR9eUJtGxUAArgFU2HdW23WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4u
olu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9/ZFvgrG+CJPbFEfxojfHRZ48
x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
-----END CERTIFICATE-----

# Issuer: CN=AffirmTrust Premium O=AffirmTrust
# Subject: CN=AffirmTrust Premium O=AffirmTrust
# Label: "AffirmTrust Premium"
# Serial: 7893706540734352110
# MD5 Fingerprint: c4:5d:0e:48:b6:ac:28:30:4e:0a:bc:f9:38:16:87:57
# SHA1 Fingerprint: d8:a6:33:2c:e0:03:6f:b1:85:f6:63:4f:7d:6a:06:65:26:32:28:27
# SHA256 Fingerprint: 70:a7:3f:7f:37:6b:60:07:42:48:90:45:34:b1:14:82:d5:bf:0e:69:8e:cc:49:8d:f5:25:77:eb:f2:e9:3b:9a
-----BEGIN CERTIFICATE-----
MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UE
BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVz
dCBQcmVtaXVtMB4XDTEwMDEyOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkG
A1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1U
cnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxBLf
qV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtnBKAQ
JG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ
+jjeRFcV5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrS
s8PhaJyJ+HoAVt70VZVs+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5
HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmdGPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d7
70O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5Rp9EixAqnOEhss/n/fauG
V+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NIS+LI+H+S
qHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S
5u046uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4Ia
C1nEWTJ3s7xgaVY5/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TX
OwF0lkLgAOIua+rF7nKsu7/+6qqo+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYE
FJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByvMiPIs0laUZx2
KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B
8OWycvpEgjNC6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQ
MKSOyARiqcTtNd56l+0OOF6SL5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc
0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK+4w1IX2COPKpVJEZNZOUbWo6xbLQ
u4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmVBtWVyuEklut89pMF
u+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFgIxpH
YoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8
GKa1qF60g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaO
RtGdFNrHF+QFlozEJLUbzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6e
KeC2uAloGRwYQw==
-----END CERTIFICATE-----

# Issuer: CN=AffirmTrust Premium ECC O=AffirmTrust
# Subject: CN=AffirmTrust Premium ECC O=AffirmTrust
# Label: "AffirmTrust Premium ECC"
# Serial: 8401224907861490260
# MD5 Fingerprint: 64:b0:09:55:cf:b1:d5:99:e2:be:13:ab:a6:5d:ea:4d
# SHA1 Fingerprint: b8:23:6b:00:2f:1d:16:86:53:01:55:6c:11:a4:37:ca:eb:ff:c3:bb
# SHA256 Fingerprint: bd:71:fd:f6:da:97:e4:cf:62:d1:64:7a:dd:25:81:b0:7d:79:ad:f8:39:7e:b4:ec:ba:9c:5e:84:88:82:14:23
-----BEGIN CERTIFICATE-----
MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC
VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ
cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ
BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt
VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D
0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9
ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G
A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G
A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs
aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I
flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ==
-----END CERTIFICATE-----

# Issuer: CN=Certum Trusted Network CA O=Unizeto Technologies S.A. OU=Certum Certification Authority
# Subject: CN=Certum Trusted Network CA O=Unizeto Technologies S.A. OU=Certum Certification Authority
# Label: "Certum Trusted Network CA"
# Serial: 279744
# MD5 Fingerprint: d5:e9:81:40:c5:18:69:fc:46:2c:89:75:62:0f:aa:78
# SHA1 Fingerprint: 07:e0:32:e0:20:b7:2c:3f:19:2f:06:28:a2:59:3a:19:a7:0f:06:9e
# SHA256 Fingerprint: 5c:58:46:8d:55:f5:8e:49:7e:74:39:82:d2:b5:00:10:b6:d1:65:37:4a:cf:83:a7:d4:a3:2d:b7:68:c4:40:8e
-----BEGIN CERTIFICATE-----
MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBM
MSIwIAYDVQQKExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5D
ZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBU
cnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIyMTIwNzM3WhcNMjkxMjMxMTIwNzM3
WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMg
Uy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSIw
IAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rH
UV+rpDKmYYe2bg+G0jACl/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LM
TXPb865Px1bVWqeWifrzq2jUI4ZZJ88JJ7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVU
BBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4fOQtf/WsX+sWn7Et0brM
kUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0cvW0QM8x
AcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNV
HQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15y
sHhE49wcrwn9I0j6vSrEuVUEtRCjjSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfL
I9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1mS1FhIrlQgnXdAIv94nYmem8
J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5ajZt3hrvJBW8qY
VoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
-----END CERTIFICATE-----

# Issuer: CN=Certinomis - Autorité Racine O=Certinomis OU=0002 433998903
# Subject: CN=Certinomis - Autorité Racine O=Certinomis OU=0002 433998903
# Label: "Certinomis - Autorité Racine"
# Serial: 1
# MD5 Fingerprint: 7f:30:78:8c:03:e3:ca:c9:0a:e2:c9:ea:1e:aa:55:1a
# SHA1 Fingerprint: 2e:14:da:ec:28:f0:fa:1e:8e:38:9a:4e:ab:eb:26:c0:0a:d3:83:c3
# SHA256 Fingerprint: fc:bf:e2:88:62:06:f7:2b:27:59:3c:8b:07:02:97:e1:2d:76:9e:d1:0e:d7:93:07:05:a8:09:8e:ff:c1:4d:17
-----BEGIN CERTIFICATE-----
MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjET
MBEGA1UEChMKQ2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAk
BgNVBAMMHUNlcnRpbm9taXMgLSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4
Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkGA1UEBhMCRlIxEzARBgNVBAoTCkNl
cnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYwJAYDVQQDDB1DZXJ0
aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
ADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jY
F1AMnmHawE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N
8y4oH3DfVS9O7cdxbwlyLu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWe
rP5pqZ56XjUl+rSnSTV3lqc2W+HN3yNw2F1MpQiD8aYkOBOo7C+ooWfHpi2GR+6K
/OybDnT0K0kCe5B1jPyZOQE51kqJ5Z52qz6WKDgmi92NjMD2AR5vpTESOH2VwnHu
7XSu5DaiQ3XV8QCb4uTXzEIDS3h65X27uK4uIJPT5GHfceF2Z5c/tt9qc1pkIuVC
28+BA5PY9OMQ4HL2AHCs8MF6DwV/zzRpRbWT5BnbUhYjBYkOjUjkJW+zeL9i9Qf6
lSTClrLooyPCXQP8w9PlfMl1I9f09bze5N/NgL+RiH2nE7Q5uiy6vdFrzPOlKO1E
nn1So2+WLhl+HPNbxxaOu2B9d2ZHVIIAEWBsMsGoOBvrbpgT1u449fCfDu/+MYHB
0iSVL1N6aaLwD4ZFjliCK0wi1F6g530mJ0jfJUaNSih8hp75mxpZuWW/Bd22Ql09
5gBIgl4g9xGC3srYn+Y3RyYe63j3YcNBZFgCQfna4NH4+ej9Uji29YnfAgMBAAGj
WzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQN
jLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ
KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9s
ov3/4gbIOZ/xWqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZM
OH8oMDX/nyNTt7buFHAAQCvaR6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q
619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40nJ+U8/aGH88bc62UeYdocMMzpXDn
2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1BCxMjidPJC+iKunqj
o3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjvJL1v
nxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG
5ERQL1TEqkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWq
pdEdnV1j6CTmNhTih60bWfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZb
dsLLO7XSAPCjDuGtbkD326C00EauFddEwk01+dIL8hf2rGbVJLJP0RyZwG71fet0
BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/vgt2Fl43N+bYdJeimUV5
-----END CERTIFICATE-----

# Issuer: CN=Root CA Generalitat Valenciana O=Generalitat Valenciana OU=PKIGVA
# Subject: CN=Root CA Generalitat Valenciana O=Generalitat Valenciana OU=PKIGVA
# Label: "Root CA Generalitat Valenciana"
# Serial: 994436456
# MD5 Fingerprint: 2c:8c:17:5e:b1:54:ab:93:17:b5:36:5a:db:d1:c6:f2
# SHA1 Fingerprint: a0:73:e5:c5:bd:43:61:0d:86:4c:21:13:0a:85:58:57:cc:9c:ea:46
# SHA256 Fingerprint: 8c:4e:df:d0:43:48:f3:22:96:9e:7e:29:a4:cd:4d:ca:00:46:55:06:1c:16:e1:b0:76:42:2e:f3:42:ad:63:0e
-----BEGIN CERTIFICATE-----
MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJF
UzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJ
R1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwHhcN
MDEwNzA2MTYyMjQ3WhcNMjEwNzAxMTUyMjQ3WjBoMQswCQYDVQQGEwJFUzEfMB0G
A1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScw
JQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGKqtXETcvIorKA3Qdyu0togu8M1JAJke+
WmmmO3I2F0zo37i7L3bhQEZ0ZQKQUgi0/6iMweDHiVYQOTPvaLRfX9ptI6GJXiKj
SgbwJ/BXufjpTjJ3Cj9BZPPrZe52/lSqfR0grvPXdMIKX/UIKFIIzFVd0g/bmoGl
u6GzwZTNVOAydTGRGmKy3nXiz0+J2ZGQD0EbtFpKd71ng+CT516nDOeB0/RSrFOy
A8dEJvt55cs0YFAQexvba9dHq198aMpunUEDEO5rmXteJajCq+TA81yc477OMUxk
Hl6AovWDfgzWyoxVjr7gvkkHD6MkQXpYHYTqWBLI4bft75PelAgxAgMBAAGjggM7
MIIDNzAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLnBr
aS5ndmEuZXMwEgYDVR0TAQH/BAgwBgEB/wIBAjCCAjQGA1UdIASCAiswggInMIIC
IwYKKwYBBAG/VQIBADCCAhMwggHoBggrBgEFBQcCAjCCAdoeggHWAEEAdQB0AG8A
cgBpAGQAYQBkACAAZABlACAAQwBlAHIAdABpAGYAaQBjAGEAYwBpAPMAbgAgAFIA
YQDtAHoAIABkAGUAIABsAGEAIABHAGUAbgBlAHIAYQBsAGkAdABhAHQAIABWAGEA
bABlAG4AYwBpAGEAbgBhAC4ADQAKAEwAYQAgAEQAZQBjAGwAYQByAGEAYwBpAPMA
bgAgAGQAZQAgAFAAcgDhAGMAdABpAGMAYQBzACAAZABlACAAQwBlAHIAdABpAGYA
aQBjAGEAYwBpAPMAbgAgAHEAdQBlACAAcgBpAGcAZQAgAGUAbAAgAGYAdQBuAGMA
aQBvAG4AYQBtAGkAZQBuAHQAbwAgAGQAZQAgAGwAYQAgAHAAcgBlAHMAZQBuAHQA
ZQAgAEEAdQB0AG8AcgBpAGQAYQBkACAAZABlACAAQwBlAHIAdABpAGYAaQBjAGEA
YwBpAPMAbgAgAHMAZQAgAGUAbgBjAHUAZQBuAHQAcgBhACAAZQBuACAAbABhACAA
ZABpAHIAZQBjAGMAaQDzAG4AIAB3AGUAYgAgAGgAdAB0AHAAOgAvAC8AdwB3AHcA
LgBwAGsAaQAuAGcAdgBhAC4AZQBzAC8AYwBwAHMwJQYIKwYBBQUHAgEWGWh0dHA6
Ly93d3cucGtpLmd2YS5lcy9jcHMwHQYDVR0OBBYEFHs100DSHHgZZu90ECjcPk+y
eAT8MIGVBgNVHSMEgY0wgYqAFHs100DSHHgZZu90ECjcPk+yeAT8oWykajBoMQsw
CQYDVQQGEwJFUzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0G
A1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVu
Y2lhbmGCBDtF5WgwDQYJKoZIhvcNAQEFBQADggEBACRhTvW1yEICKrNcda3Fbcrn
lD+laJWIwVTAEGmiEi8YPyVQqHxK6sYJ2fR1xkDar1CdPaUWu20xxsdzCkj+IHLt
b8zog2EWRpABlUt9jppSCS/2bxzkoXHPjCpaF3ODR00PNvsETUlR4hTJZGH71BTg
9J63NI8KJr2XXPR5OkowGcytT6CYirQxlyric21+eLj4iIlPsSKRZEv1UN4D2+XF
ducTZnV+ZfsBn5OHiJ35Rld8TWCvmHMTI6QgkYH60GFmuH3Rr9ZvHmw96RH9qfmC
IoaZM3Fa6hlXPZHNqcCjbgcTpsnt+GijnsNacgmHKNHEc8RzGF9QdRYxn7fofMM=
-----END CERTIFICATE-----

# Issuer: CN=A-Trust-nQual-03 O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH OU=A-Trust-nQual-03
# Subject: CN=A-Trust-nQual-03 O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH OU=A-Trust-nQual-03
# Label: "A-Trust-nQual-03"
# Serial: 93214
# MD5 Fingerprint: 49:63:ae:27:f4:d5:95:3d:d8:db:24:86:b8:9c:07:53
# SHA1 Fingerprint: d3:c0:63:f2:19:ed:07:3e:34:ad:5d:75:0b:32:76:29:ff:d5:9a:f2
# SHA256 Fingerprint: 79:3c:bf:45:59:b9:fd:e3:8a:b2:2d:f1:68:69:f6:98:81:ae:14:c4:b0:13:9a:c7:88:a7:8a:1a:fc:ca:02:fb
-----BEGIN CERTIFICATE-----
MIIDzzCCAregAwIBAgIDAWweMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJB
VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRkwFwYDVQQLDBBBLVRydXN0LW5R
dWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5RdWFsLTAzMB4XDTA1MDgxNzIyMDAw
MFoXDTE1MDgxNzIyMDAwMFowgY0xCzAJBgNVBAYTAkFUMUgwRgYDVQQKDD9BLVRy
dXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0ZW52
ZXJrZWhyIEdtYkgxGTAXBgNVBAsMEEEtVHJ1c3QtblF1YWwtMDMxGTAXBgNVBAMM
EEEtVHJ1c3QtblF1YWwtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCtPWFuA/OQO8BBC4SAzewqo51ru27CQoT3URThoKgtUaNR8t4j8DRE/5TrzAUj
lUC5B3ilJfYKvUWG6Nm9wASOhURh73+nyfrBJcyFLGM/BWBzSQXgYHiVEEvc+RFZ
znF/QJuKqiTfC0Li21a8StKlDJu3Qz7dg9MmEALP6iPESU7l0+m0iKsMrmKS1GWH
2WrX9IWf5DMiJaXlyDO6w8dB3F/GaswADm0yqLaHNgBid5seHzTLkDx4iHQF63n1
k3Flyp3HaxgtPVxO59X4PzF9j4fsCiIvI+n+u33J4PTs63zEsMMtYrWacdaxaujs
2e3Vcuy+VwHOBVWf3tFgiBCzAgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYD
VR0OBAoECERqlWdVeRFPMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
AQEAVdRU0VlIXLOThaq/Yy/kgM40ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fG
KOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmrsQd7TZjTXLDR8KdCoLXEjq/+
8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZdJXDRZslo+S4R
FGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS
mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmE
DNuxUCAKGkq6ahq97BvIxYSazQ==
-----END CERTIFICATE-----

# Issuer: CN=TWCA Root Certification Authority O=TAIWAN-CA OU=Root CA
# Subject: CN=TWCA Root Certification Authority O=TAIWAN-CA OU=Root CA
# Label: "TWCA Root Certification Authority"
# Serial: 1
# MD5 Fingerprint: aa:08:8f:f6:f9:7b:b7:f2:b1:a7:1e:9b:ea:ea:bd:79
# SHA1 Fingerprint: cf:9e:87:6d:d3:eb:fc:42:26:97:a3:b5:a3:7a:a0:76:a9:06:23:48
# SHA256 Fingerprint: bf:d8:8f:e1:10:1c:41:ae:3e:80:1b:f8:be:56:35:0e:e9:ba:d1:a6:b9:bd:51:5e:dc:5c:6d:5b:87:11:ac:44
-----BEGIN CERTIFICATE-----
MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzES
MBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFU
V0NBIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMz
WhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJVEFJV0FO
LUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlm
aWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFE
AcK0HMMxQhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HH
K3XLfJ+utdGdIzdjp9xCoi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeX
RfwZVzsrb+RH9JlF/h3x+JejiB03HFyP4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/z
rX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1ry+UPizgN7gr8/g+YnzAx
3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkq
hkiG9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeC
MErJk/9q56YAf4lCmtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdls
XebQ79NqZp4VKIV66IIArB6nCWlWQtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62D
lhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVYT0bf+215WfKEIlKuD8z7fDvn
aspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocnyYh0igzyXxfkZ
YiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
-----END CERTIFICATE-----

# Issuer: O=SECOM Trust Systems CO.,LTD. OU=Security Communication RootCA2
# Subject: O=SECOM Trust Systems CO.,LTD. OU=Security Communication RootCA2
# Label: "Security Communication RootCA2"
# Serial: 0
# MD5 Fingerprint: 6c:39:7d:a4:0e:55:59:b2:3f:d6:41:b1:12:50:de:43
# SHA1 Fingerprint: 5f:3b:8c:f2:f8:10:b3:7d:78:b4:ce:ec:19:19:c3:73:34:b9:c7:74
# SHA256 Fingerprint: 51:3b:2c:ec:b8:10:d4:cd:e5:dd:85:39:1a:df:c6:c2:dd:60:d8:7b:b7:36:d2:b5:21:48:4a:a4:7a:0e:be:f6
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDEl
MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMe
U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoX
DTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy
dXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj
YXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV
OVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr
zbl+dp+++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM
VAX3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQ
hNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWO
ojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY6rCcMU/Gt1SSw
awNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8QIH4D5cs
OPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3
DQEBCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF
coJxDjrSzG+ntKEju/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc
okgfGT+Ok+vx+hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8
t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy
1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHIRc/
SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
-----END CERTIFICATE-----

# Issuer: CN=Hellenic Academic and Research Institutions RootCA 2011 O=Hellenic Academic and Research Institutions Cert. Authority
# Subject: CN=Hellenic Academic and Research Institutions RootCA 2011 O=Hellenic Academic and Research Institutions Cert. Authority
# Label: "Hellenic Academic and Research Institutions RootCA 2011"
# Serial: 0
# MD5 Fingerprint: 73:9f:4c:4b:73:5b:79:e9:fa:ba:1c:ef:6e:cb:d5:c9
# SHA1 Fingerprint: fe:45:65:9b:79:03:5b:98:a1:61:b5:51:2e:ac:da:58:09:48:22:4d
# SHA256 Fingerprint: bc:10:4f:15:a4:8b:e7:09:dc:a5:42:a7:e1:d4:b9:df:6f:05:45:27:e8:02:ea:a9:2d:59:54:44:25:8a:fe:71
-----BEGIN CERTIFICATE-----
MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1Ix
RDBCBgNVBAoTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1
dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1p
YyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIFJvb3RDQSAyMDExMB4XDTExMTIw
NjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYTAkdSMUQwQgYDVQQK
EztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIENl
cnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJl
c2VhcmNoIEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPz
dYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJ
fel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa71HFK9+WXesyHgLacEns
bgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u8yBRQlqD
75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSP
FEDH3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNV
HRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp
5dgTBCPuQSUwRwYDVR0eBEAwPqA8MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQu
b3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQub3JnMA0GCSqGSIb3DQEBBQUA
A4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVtXdMiKahsog2p
6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7
dIsXRSZMFpGD/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8Acys
Nnq/onN694/BtZqhFLKPM58N7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXI
l7WdmplNsDz4SgCbZN2fOUvRJ9e4
-----END CERTIFICATE-----

# Issuer: CN=Actalis Authentication Root CA O=Actalis S.p.A./03358520967
# Subject: CN=Actalis Authentication Root CA O=Actalis S.p.A./03358520967
# Label: "Actalis Authentication Root CA"
# Serial: 6271844772424770508
# MD5 Fingerprint: 69:c1:0d:4f:07:a3:1b:c3:fe:56:3d:04:bc:11:f6:a6
# SHA1 Fingerprint: f3:73:b3:87:06:5a:28:84:8a:f2:f3:4a:ce:19:2b:dd:c7:8e:9c:ac
# SHA256 Fingerprint: 55:92:60:84:ec:96:3a:64:b9:6e:2a:be:01:ce:0b:a8:6a:64:fb:fe:bc:c7:aa:b5:af:c1:55:b3:7f:d7:60:66
-----BEGIN CERTIFICATE-----
MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UE
BhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8w
MzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDkyMjExMjIwMlowazELMAkGA1UEBhMC
SVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1
ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENB
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNv
UTufClrJwkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX
4ay8IMKx4INRimlNAJZaby/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9
KK3giq0itFZljoZUj5NDKd45RnijMCO6zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/
gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1fYVEiVRvjRuPjPdA1Yprb
rxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2oxgkg4YQ
51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2F
be8lEfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxe
KF+w6D9Fz8+vm2/7hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4F
v6MGn8i1zeQf1xcGDXqVdFUNaBr8EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbn
fpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5jF66CyCU3nuDuP/jVo23Eek7
jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLYiDrIn3hm7Ynz
ezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt
ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQAL
e3KHwGCmSUyIWOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70
jsNjLiNmsGe+b7bAEzlgqqI0JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDz
WochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKxK3JCaKygvU5a2hi/a5iB0P2avl4V
SM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+Xlff1ANATIGk0k9j
pwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC4yyX
X04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+Ok
fcvHlXHo2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7R
K4X9p2jIugErsWx0Hbhzlefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btU
ZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXemOR/qnuOf0GZvBeyqdn6/axag67XH/JJU
LysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9vwGYT7JZVEc+NHt4bVaT
LnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
-----END CERTIFICATE-----

# Issuer: O=Trustis Limited OU=Trustis FPS Root CA
# Subject: O=Trustis Limited OU=Trustis FPS Root CA
# Label: "Trustis FPS Root CA"
# Serial: 36053640375399034304724988975563710553
# MD5 Fingerprint: 30:c9:e7:1e:6b:e6:14:eb:65:b2:16:69:20:31:67:4d
# SHA1 Fingerprint: 3b:c0:38:0b:33:c3:f6:a6:0c:86:15:22:93:d9:df:f5:4b:81:c0:04
# SHA256 Fingerprint: c1:b4:82:99:ab:a5:20:8f:e9:63:0a:ce:55:ca:68:a0:3e:da:5a:51:9c:88:02:a0:d3:a6:73:be:8f:8e:55:7d
-----BEGIN CERTIFICATE-----
MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBF
MQswCQYDVQQGEwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQL
ExNUcnVzdGlzIEZQUyBSb290IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTEx
MzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNVBAoTD1RydXN0aXMgTGltaXRlZDEc
MBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQRUN+
AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihH
iTHcDnlkH5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjj
vSkCqPoc4Vu5g6hBSLwacY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA
0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zto3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlB
OrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEAAaNTMFEwDwYDVR0TAQH/
BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAdBgNVHQ4E
FgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01
GX2cGE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmW
zaD+vkAMXBJV+JOCyinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP4
1BIy+Q7DsdwyhEQsb8tGD+pmQQ9P8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZE
f1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHVl/9D7S3B2l0pKoU/rGXuhg8F
jZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYliB6XzCGcKQEN
ZetX2fNXlrtIzYE=
-----END CERTIFICATE-----

# Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
# Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
# Label: "StartCom Certification Authority"
# Serial: 45
# MD5 Fingerprint: c9:3b:0d:84:41:fc:a4:76:79:23:08:57:de:10:19:16
# SHA1 Fingerprint: a3:f1:33:3f:e2:42:bf:cf:c5:d1:4e:8f:39:42:98:40:68:10:d1:a0
# SHA256 Fingerprint: e1:78:90:ee:09:a3:fb:f4:f4:8b:9c:41:4a:17:d6:37:b7:a5:06:47:e9:bc:75:23:22:72:7f:cc:17:42:a9:11
-----BEGIN CERTIFICATE-----
MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEW
MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM3WhcNMzYwOTE3MTk0NjM2WjB9
MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w
+2OqqGwaVLRcJXrJosmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+
Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3
Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVcUjyJthkqcwEKDwOzEmDyei+B
26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT37uMdBNSSwID
AQABo4ICEDCCAgwwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD
VR0OBBYEFE4L7xqkQFulF2mHMMo0aEPQQa7yMB8GA1UdIwQYMBaAFE4L7xqkQFul
F2mHMMo0aEPQQa7yMIIBWgYDVR0gBIIBUTCCAU0wggFJBgsrBgEEAYG1NwEBATCC
ATgwLgYIKwYBBQUHAgEWImh0dHA6Ly93d3cuc3RhcnRzc2wuY29tL3BvbGljeS5w
ZGYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cuc3RhcnRzc2wuY29tL2ludGVybWVk
aWF0ZS5wZGYwgc8GCCsGAQUFBwICMIHCMCcWIFN0YXJ0IENvbW1lcmNpYWwgKFN0
YXJ0Q29tKSBMdGQuMAMCAQEagZZMaW1pdGVkIExpYWJpbGl0eSwgcmVhZCB0aGUg
c2VjdGlvbiAqTGVnYWwgTGltaXRhdGlvbnMqIG9mIHRoZSBTdGFydENvbSBDZXJ0
aWZpY2F0aW9uIEF1dGhvcml0eSBQb2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93
d3cuc3RhcnRzc2wuY29tL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgG
CWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5fPGFf59Jb2vKXfuM/gTF
wWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWmN3PH/UvS
Ta0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst
0OcNOrg+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNc
pRJvkrKTlMeIFw6Ttn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKl
CcWw0bdT82AUuoVpaiF8H3VhFyAXe2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVF
P0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA2MFrLH9ZXF2RsXAiV+uKa0hK
1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBsHvUwyKMQ5bLm
KhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE
JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ
8dCAWZvLMdibD4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnm
fyWl8kgAwKQB2j8=
-----END CERTIFICATE-----

# Issuer: CN=StartCom Certification Authority G2 O=StartCom Ltd.
# Subject: CN=StartCom Certification Authority G2 O=StartCom Ltd.
# Label: "StartCom Certification Authority G2"
# Serial: 59
# MD5 Fingerprint: 78:4b:fb:9e:64:82:0a:d3:b8:4c:62:f3:64:f2:90:64
# SHA1 Fingerprint: 31:f1:fd:68:22:63:20:ee:c6:3b:3f:9d:ea:4a:3e:53:7c:7c:39:17
# SHA256 Fingerprint: c7:ba:65:67:de:93:a7:98:ae:1f:aa:79:1e:71:2d:37:8f:ae:1f:93:c4:39:7f:ea:44:1b:b7:cb:e6:fd:59:95
-----BEGIN CERTIFICATE-----
MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEW
MBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlm
aWNhdGlvbiBBdXRob3JpdHkgRzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1
OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoG
A1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRzIwggIiMA0G
CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8Oo1XJ
JZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsD
vfOpL9HG4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnoo
D/Uefyf3lLE3PbfHkffiAez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/
Q0kGi4xDuFby2X8hQxfqp0iVAXV16iulQ5XqFYSdCI0mblWbq9zSOdIxHWDirMxW
RST1HFSr7obdljKF+ExP6JV2tgXdNiNnvP8V4so75qbsO+wmETRIjfaAKxojAuuK
HDp2KntWFhxyKrOq42ClAJ8Em+JvHhRYW6Vsi1g8w7pOOlz34ZYrPu8HvKTlXcxN
nw3h3Kq74W4a7I/htkxNeXJdFzULHdfBR9qWJODQcqhaX2YtENwvKhOuJv4KHBnM
0D4LnMgJLvlblnpHnOl68wVQdJVznjAJ85eCXuaPOQgeWeU1FEIT/wCc976qUM/i
UUjXuG+v+E5+M5iSFGI6dWPPe/regjupuznixL0sAA7IF6wT700ljtizkC+p2il9
Ha90OrInwMEePnWjFqmveiJdnxMaz6eg6+OGCtP95paV1yPIN93EfKo2rJgaErHg
TuixO/XWb/Ew1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
AwIBBjAdBgNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJKoZIhvcNAQEL
BQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K
2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfX
UfEpY9Z1zRbkJ4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl
6/2o1PXWT6RbdejF0mCy2wl+JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK
9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG/+gyRr61M3Z3qAFdlsHB1b6uJcDJ
HgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTcnIhT76IxW1hPkWLI
wpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/XldblhY
XzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5l
IxKVCCIcl85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoo
hdVddLHRDiBYmxOlsGOm7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulr
so8uBtjRkcfGEvRM/TAXw8HaOFvjqermobp573PYtlNXLfbQ4ddI
-----END CERTIFICATE-----

# Issuer: CN=Buypass Class 2 Root CA O=Buypass AS-983163327
# Subject: CN=Buypass Class 2 Root CA O=Buypass AS-983163327
# Label: "Buypass Class 2 Root CA"
# Serial: 2
# MD5 Fingerprint: 46:a7:d2:fe:45:fb:64:5a:a8:59:90:9b:78:44:9b:29
# SHA1 Fingerprint: 49:0a:75:74:de:87:0a:47:fe:58:ee:f6:c7:6b:eb:c6:0b:12:40:99
# SHA256 Fingerprint: 9a:11:40:25:19:7c:5b:b9:5d:94:e6:3d:55:cd:43:79:08:47:b6:46:b2:3c:df:11:ad:a4:a0:0e:ff:15:fb:48
-----BEGIN CERTIFICATE-----
MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd
MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg
Q2xhc3MgMiBSb290IENBMB4XDTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1ow
TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw
HgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB
BQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1g1Lr
6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPV
L4O2fuPn9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC91
1K2GScuVr1QGbNgGE41b/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHx
MlAQTn/0hpPshNOOvEu/XAFOBz3cFIqUCqTqc/sLUegTBxj6DvEr0VQVfTzh97QZ
QmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeffawrbD02TTqigzXsu8lkB
arcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgIzRFo1clr
Us3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLi
FRhnBkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRS
P/TizPJhk9H9Z2vXUq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN
9SG9dKpN6nIDSdvHXx1iY8f93ZHsM+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxP
AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMmAd+BikoL1Rpzz
uvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAU18h
9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3t
OluwlN5E40EIosHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo
+fsicdl9sz1Gv7SEr5AcD48Saq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7
KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYdDnkM/crqJIByw5c/8nerQyIKx+u2
DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWDLfJ6v9r9jv6ly0Us
H8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0oyLQ
I+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK7
5t98biGCwWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h
3PFaTWwyI0PurKju7koSCTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPz
Y11aWOIv4x3kqdbQCtCev9eBCfHJxyYNrJgWVqA=
-----END CERTIFICATE-----

# Issuer: CN=Buypass Class 3 Root CA O=Buypass AS-983163327
# Subject: CN=Buypass Class 3 Root CA O=Buypass AS-983163327
# Label: "Buypass Class 3 Root CA"
# Serial: 2
# MD5 Fingerprint: 3d:3b:18:9e:2c:64:5a:e8:d5:88:ce:0e:f9:37:c2:ec
# SHA1 Fingerprint: da:fa:f7:fa:66:84:ec:06:8f:14:50:bd:c7:c2:81:a5:bc:a9:64:57
# SHA256 Fingerprint: ed:f7:eb:bc:a2:7a:2a:38:4d:38:7b:7d:40:10:c6:66:e2:ed:b4:84:3e:4c:29:b4:ae:1d:5b:93:32:e6:b2:4d
-----BEGIN CERTIFICATE-----
MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd
MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg
Q2xhc3MgMyBSb290IENBMB4XDTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFow
TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw
HgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB
BQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRHsJ8Y
ZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3E
N3coTRiR5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9
tznDDgFHmV0ST9tD+leh7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX
0DJq1l1sDPGzbjniazEuOQAnFN44wOwZZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c
/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH2xc519woe2v1n/MuwU8X
KhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV/afmiSTY
zIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvS
O1UQRwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D
34xFMFbG02SrZvPAXpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgP
K9Dx2hzLabjKSWJtyNBjYt1gD1iqj6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3
AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEe4zf/lb+74suwv
Tg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAACAj
QTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV
cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXS
IGrs/CIBKM+GuIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2
HJLw5QY33KbmkJs4j1xrG0aGQ0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsa
O5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8ZORK15FTAaggiG6cX0S5y2CBNOxv
033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2KSb12tjE8nVhz36u
dmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz6MkE
kbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg41
3OEMXbugUZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvD
u79leNKGef9JOxqDDPDeeOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq
4/g7u9xN12TyUb7mqqta6THuBrxzvxNiCp/HuZc=
-----END CERTIFICATE-----

# Issuer: CN=T-TeleSec GlobalRoot Class 3 O=T-Systems Enterprise Services GmbH OU=T-Systems Trust Center
# Subject: CN=T-TeleSec GlobalRoot Class 3 O=T-Systems Enterprise Services GmbH OU=T-Systems Trust Center
# Label: "T-TeleSec GlobalRoot Class 3"
# Serial: 1
# MD5 Fingerprint: ca:fb:40:a8:4e:39:92:8a:1d:fe:8e:2f:c4:27:ea:ef
# SHA1 Fingerprint: 55:a6:72:3e:cb:f2:ec:cd:c3:23:74:70:19:9d:2a:be:11:e3:81:d1
# SHA256 Fingerprint: fd:73:da:d3:1c:64:4f:f1:b4:3b:ef:0c:cd:da:96:71:0b:9c:d9:87:5e:ca:7e:31:70:7a:f3:e9:6d:52:2b:bd
-----BEGIN CERTIFICATE-----
MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUx
KzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAd
BgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNl
YyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgxMDAxMTAyOTU2WhcNMzMxMDAxMjM1
OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnBy
aXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50
ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN
8ELg63iIVl6bmlQdTQyK9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/
RLyTPWGrTs0NvvAgJ1gORH8EGoel15YUNpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4
hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZFiP0Zf3WHHx+xGwpzJFu5
ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W0eDrXltM
EnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGj
QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1
A/d2O2GCahKqGFPrAyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOy
WL6ukK2YJ5f+AbGwUgC4TeQbIXQbfsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ
1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzTucpH9sry9uetuUg/vBa3wW30
6gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7hP0HHRwA11fXT
91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4p
TpPDpFQUWw==
-----END CERTIFICATE-----

# Issuer: CN=EE Certification Centre Root CA O=AS Sertifitseerimiskeskus
# Subject: CN=EE Certification Centre Root CA O=AS Sertifitseerimiskeskus
# Label: "EE Certification Centre Root CA"
# Serial: 112324828676200291871926431888494945866
# MD5 Fingerprint: 43:5e:88:d4:7d:1a:4a:7e:fd:84:2e:52:eb:01:d4:6f
# SHA1 Fingerprint: c9:a8:b9:e7:55:80:5e:58:e3:53:77:a7:25:eb:af:c3:7b:27:cc:d7
# SHA256 Fingerprint: 3e:84:ba:43:42:90:85:16:e7:75:73:c0:99:2f:09:79:ca:08:4e:46:85:68:1f:f1:95:cc:ba:8a:22:9b:8a:76
-----BEGIN CERTIFICATE-----
MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1
MQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1
czEoMCYGA1UEAwwfRUUgQ2VydGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYG
CSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIwMTAxMDMwMTAxMDMwWhgPMjAzMDEy
MTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlBUyBTZXJ0aWZpdHNl
ZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRyZSBS
b290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUy
euuOF0+W2Ap7kaJjbMeMTC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvO
bntl8jixwKIy72KyaOBhU8E2lf/slLo2rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIw
WFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw93X2PaRka9ZP585ArQ/d
MtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtNP2MbRMNE
1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYD
VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/
zQas8fElyalL1BSZMEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYB
BQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEF
BQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+RjxY6hUFaTlrg4wCQiZrxTFGGV
v9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqMlIpPnTX/dqQG
E5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u
uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIW
iAYLtqZLICjU3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/v
GVCJYMzpJJUPwssd8m92kMfMdcGWxZ0=
-----END CERTIFICATE-----

# Issuer: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş. (c) Aralık 2007
# Subject: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş. (c) Aralık 2007
# Label: "TURKTRUST Certificate Services Provider Root 2007"
# Serial: 1
# MD5 Fingerprint: 2b:70:20:56:86:82:a0:18:c8:07:53:12:28:70:21:72
# SHA1 Fingerprint: f1:7f:6f:b6:31:dc:99:e3:a3:c8:7f:fe:1c:f1:81:10:88:d9:60:33
# SHA256 Fingerprint: 97:8c:d9:66:f2:fa:a0:7b:a7:aa:95:00:d9:c0:2e:9d:77:f2:cd:ad:a6:ad:6b:a7:4a:f4:b9:1c:66:59:3c:50
-----BEGIN CERTIFICATE-----
MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOc
UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
c8SxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xS
S1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kg
SGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4XDTA3MTIyNTE4Mzcx
OVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxla3Ry
b25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMC
VFIxDzANBgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDE
sGxldGnFn2ltIHZlIEJpbGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7F
ni4gKGMpIEFyYWzEsWsgMjAwNzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9NYvDdE3ePYakqtdTyuTFY
KTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQvKUmi8wUG
+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveG
HtyaKhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6P
IzdezKKqdfcYbwnTrqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M
733WB2+Y8a+xwXrXgTW4qhe04MsCAwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHk
Yb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0G
CSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/sPx+EnWVUXKgW
AkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I
aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5
mxRZNTZPz/OOXl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsa
XRik7r4EW5nVcV9VZWRi1aKbBFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZ
qxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAKpoRq0Tl9
-----END CERTIFICATE-----

# Issuer: CN=D-TRUST Root Class 3 CA 2 2009 O=D-Trust GmbH
# Subject: CN=D-TRUST Root Class 3 CA 2 2009 O=D-Trust GmbH
# Label: "D-TRUST Root Class 3 CA 2 2009"
# Serial: 623603
# MD5 Fingerprint: cd:e0:25:69:8d:47:ac:9c:89:35:90:f7:fd:51:3d:2f
# SHA1 Fingerprint: 58:e8:ab:b0:36:15:33:fb:80:f7:9b:1b:6d:29:d3:ff:8d:5f:00:f0
# SHA256 Fingerprint: 49:e7:a4:42:ac:f0:ea:62:87:05:00:54:b5:25:64:b6:50:e4:f4:9e:42:e3:48:d6:aa:38:e0:39:e9:57:b1:c1
-----BEGIN CERTIFICATE-----
MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRF
MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBD
bGFzcyAzIENBIDIgMjAwOTAeFw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NTha
ME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMM
HkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOADER03
UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42
tSHKXzlABF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9R
ySPocq60vFYJfxLLHLGvKZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsM
lFqVlNpQmvH/pStmMaTJOKDfHR+4CS7zp+hnUquVH+BGPtikw8paxTGA6Eian5Rp
/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUCAwEAAaOCARowggEWMA8G
A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ4PGEMA4G
A1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVj
dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUy
MENBJTIwMiUyMDIwMDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRl
cmV2b2NhdGlvbmxpc3QwQ6BBoD+GPWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3Js
L2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAwOS5jcmwwDQYJKoZIhvcNAQEL
BQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm2H6NMLVwMeni
acfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4K
zCUqNQT4YJEVdT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8
PIWmawomDeCTmGCufsYkl4phX5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3Y
Johw1+qRzT65ysCQblrGXnRl11z+o+I=
-----END CERTIFICATE-----

# Issuer: CN=D-TRUST Root Class 3 CA 2 EV 2009 O=D-Trust GmbH
# Subject: CN=D-TRUST Root Class 3 CA 2 EV 2009 O=D-Trust GmbH
# Label: "D-TRUST Root Class 3 CA 2 EV 2009"
# Serial: 623604
# MD5 Fingerprint: aa:c6:43:2c:5e:2d:cd:c4:34:c0:50:4f:11:02:4f:b6
# SHA1 Fingerprint: 96:c9:1b:0b:95:b4:10:98:42:fa:d0:d8:22:79:fe:60:fa:b9:16:83
# SHA256 Fingerprint: ee:c5:49:6b:98:8c:e9:86:25:b9:34:09:2e:ec:29:08:be:d0:b0:f3:16:c2:d4:73:0c:84:ea:f1:f3:d3:48:81
-----BEGIN CERTIFICATE-----
MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRF
MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBD
bGFzcyAzIENBIDIgRVYgMjAwOTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUw
NDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNV
BAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAwOTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfSegpn
ljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM0
3TP1YtHhzRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6Z
qQTMFexgaDbtCHu39b+T7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lR
p75mpoo6Kr3HGrHhFPC+Oh25z1uxav60sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8
HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure3511H3a6UCAwEAAaOCASQw
ggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyvcop9Ntea
HNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFw
Oi8vZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xh
c3MlMjAzJTIwQ0ElMjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1E
RT9jZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0MEagRKBChkBodHRwOi8vd3d3LmQt
dHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xhc3NfM19jYV8yX2V2XzIwMDku
Y3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+PPoeUSbrh/Yp
3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05
nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNF
CSuGdXzfX2lXANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7na
xpeG0ILD5EJt/rDiZE4OJudANCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqX
KVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVvw9y4AyHqnxbxLFS1
-----END CERTIFICATE-----

# Issuer: CN=Autoridad de Certificacion Raiz del Estado Venezolano O=Sistema Nacional de Certificacion Electronica OU=Superintendencia de Servicios de Certificacion Electronica
# Subject: CN=PSCProcert O=Sistema Nacional de Certificacion Electronica OU=Proveedor de Certificados PROCERT
# Label: "PSCProcert"
# Serial: 11
# MD5 Fingerprint: e6:24:e9:12:01:ae:0c:de:8e:85:c4:ce:a3:12:dd:ec
# SHA1 Fingerprint: 70:c1:8d:74:b4:28:81:0a:e4:fd:a5:75:d7:01:9f:99:b0:3d:50:74
# SHA256 Fingerprint: 3c:fc:3c:14:d1:f6:84:ff:17:e3:8c:43:ca:44:0c:00:b9:67:ec:93:3e:8b:fe:06:4c:a1:d7:2c:90:f2:ad:b0
-----BEGIN CERTIFICATE-----
MIIJhjCCB26gAwIBAgIBCzANBgkqhkiG9w0BAQsFADCCAR4xPjA8BgNVBAMTNUF1
dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIFJhaXogZGVsIEVzdGFkbyBWZW5lem9s
YW5vMQswCQYDVQQGEwJWRTEQMA4GA1UEBxMHQ2FyYWNhczEZMBcGA1UECBMQRGlz
dHJpdG8gQ2FwaXRhbDE2MDQGA1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0
aWZpY2FjaW9uIEVsZWN0cm9uaWNhMUMwQQYDVQQLEzpTdXBlcmludGVuZGVuY2lh
IGRlIFNlcnZpY2lvcyBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMSUwIwYJ
KoZIhvcNAQkBFhZhY3JhaXpAc3VzY2VydGUuZ29iLnZlMB4XDTEwMTIyODE2NTEw
MFoXDTIwMTIyNTIzNTk1OVowgdExJjAkBgkqhkiG9w0BCQEWF2NvbnRhY3RvQHBy
b2NlcnQubmV0LnZlMQ8wDQYDVQQHEwZDaGFjYW8xEDAOBgNVBAgTB01pcmFuZGEx
KjAoBgNVBAsTIVByb3ZlZWRvciBkZSBDZXJ0aWZpY2Fkb3MgUFJPQ0VSVDE2MDQG
A1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9u
aWNhMQswCQYDVQQGEwJWRTETMBEGA1UEAxMKUFNDUHJvY2VydDCCAiIwDQYJKoZI
hvcNAQEBBQADggIPADCCAgoCggIBANW39KOUM6FGqVVhSQ2oh3NekS1wwQYalNo9
7BVCwfWMrmoX8Yqt/ICV6oNEolt6Vc5Pp6XVurgfoCfAUFM+jbnADrgV3NZs+J74
BCXfgI8Qhd19L3uA3VcAZCP4bsm+lU/hdezgfl6VzbHvvnpC2Mks0+saGiKLt38G
ieU89RLAu9MLmV+QfI4tL3czkkohRqipCKzx9hEC2ZUWno0vluYC3XXCFCpa1sl9
JcLB/KpnheLsvtF8PPqv1W7/U0HU9TI4seJfxPmOEO8GqQKJ/+MMbpfg353bIdD0
PghpbNjU5Db4g7ayNo+c7zo3Fn2/omnXO1ty0K+qP1xmk6wKImG20qCZyFSTXai2
0b1dCl53lKItwIKOvMoDKjSuc/HUtQy9vmebVOvh+qBa7Dh+PsHMosdEMXXqP+UH
0quhJZb25uSgXTcYOWEAM11G1ADEtMo88aKjPvM6/2kwLkDd9p+cJsmWN63nOaK/
6mnbVSKVUyqUtd+tFjiBdWbjxywbk5yqjKPK2Ww8F22c3HxT4CAnQzb5EuE8XL1m
v6JpIzi4mWCZDlZTOpx+FIywBm/xhnaQr/2v/pDGj59/i5IjnOcVdo/Vi5QTcmn7
K2FjiO/mpF7moxdqWEfLcU8UC17IAggmosvpr2uKGcfLFFb14dq12fy/czja+eev
bqQ34gcnAgMBAAGjggMXMIIDEzASBgNVHRMBAf8ECDAGAQH/AgEBMDcGA1UdEgQw
MC6CD3N1c2NlcnRlLmdvYi52ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAzNi0w
MB0GA1UdDgQWBBRBDxk4qpl/Qguk1yeYVKIXTC1RVDCCAVAGA1UdIwSCAUcwggFD
gBStuyIdxuDSAaj9dlBSk+2YwU2u06GCASakggEiMIIBHjE+MDwGA1UEAxM1QXV0
b3JpZGFkIGRlIENlcnRpZmljYWNpb24gUmFpeiBkZWwgRXN0YWRvIFZlbmV6b2xh
bm8xCzAJBgNVBAYTAlZFMRAwDgYDVQQHEwdDYXJhY2FzMRkwFwYDVQQIExBEaXN0
cml0byBDYXBpdGFsMTYwNAYDVQQKEy1TaXN0ZW1hIE5hY2lvbmFsIGRlIENlcnRp
ZmljYWNpb24gRWxlY3Ryb25pY2ExQzBBBgNVBAsTOlN1cGVyaW50ZW5kZW5jaWEg
ZGUgU2VydmljaW9zIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExJTAjBgkq
hkiG9w0BCQEWFmFjcmFpekBzdXNjZXJ0ZS5nb2IudmWCAQowDgYDVR0PAQH/BAQD
AgEGME0GA1UdEQRGMESCDnByb2NlcnQubmV0LnZloBUGBWCGXgIBoAwMClBTQy0w
MDAwMDKgGwYFYIZeAgKgEgwQUklGLUotMzE2MzUzNzMtNzB2BgNVHR8EbzBtMEag
RKBChkBodHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9sY3IvQ0VSVElGSUNBRE8t
UkFJWi1TSEEzODRDUkxERVIuY3JsMCOgIaAfhh1sZGFwOi8vYWNyYWl6LnN1c2Nl
cnRlLmdvYi52ZTA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9v
Y3NwLnN1c2NlcnRlLmdvYi52ZTBBBgNVHSAEOjA4MDYGBmCGXgMBAjAsMCoGCCsG
AQUFBwIBFh5odHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9kcGMwDQYJKoZIhvcN
AQELBQADggIBACtZ6yKZu4SqT96QxtGGcSOeSwORR3C7wJJg7ODU523G0+1ng3dS
1fLld6c2suNUvtm7CpsR72H0xpkzmfWvADmNg7+mvTV+LFwxNG9s2/NkAZiqlCxB
3RWGymspThbASfzXg0gTB1GEMVKIu4YXx2sviiCtxQuPcD4quxtxj7mkoP3Yldmv
Wb8lK5jpY5MvYB7Eqvh39YtsL+1+LrVPQA3uvFd359m21D+VJzog1eWuq2w1n8Gh
HVnchIHuTQfiSLaeS5UtQbHh6N5+LwUeaO6/u5BlOsju6rEYNxxik6SgMexxbJHm
pHmJWhSnFFAFTKQAVzAswbVhltw+HoSvOULP5dAssSS830DD7X9jSr3hTxJkhpXz
sOfIt+FTvZLm8wyWuevo5pLtp4EJFAv8lXrPj9Y0TzYS3F7RNHXGRoAvlQSMx4bE
qCaJqD8Zm4G7UaRKhqsLEQ+xrmNTbSjq3TNWOByyrYDT13K9mmyZY+gAu0F2Bbdb
mRiKw7gSXFbPVgx96OLP7bx0R/vu0xdOIk9W/1DzLuY5poLWccret9W6aAjtmcz9
opLLabid+Qqkpj5PkygqYWwHJgD/ll9ohri4zspV4KuxPX+Y1zMOWj3YeMLEYC/H
YvBhkdI4sPaeVdtAgAUSM84dkpvRabP/v/GSCmE1P93+hvS84Bpxs2Km
-----END CERTIFICATE-----

# Issuer: CN=China Internet Network Information Center EV Certificates Root O=China Internet Network Information Center
# Subject: CN=China Internet Network Information Center EV Certificates Root O=China Internet Network Information Center
# Label: "China Internet Network Information Center EV Certificates Root"
# Serial: 1218379777
# MD5 Fingerprint: 55:5d:63:00:97:bd:6a:97:f5:67:ab:4b:fb:6e:63:15
# SHA1 Fingerprint: 4f:99:aa:93:fb:2b:d1:37:26:a1:99:4a:ce:7f:f0:05:f2:93:5d:1e
# SHA256 Fingerprint: 1c:01:c6:f4:db:b2:fe:fc:22:55:8b:2b:ca:32:56:3f:49:84:4a:cf:c3:2b:7b:e4:b0:ff:59:9f:9e:8c:7a:f7
-----BEGIN CERTIFICATE-----
MIID9zCCAt+gAwIBAgIESJ8AATANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC
Q04xMjAwBgNVBAoMKUNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24g
Q2VudGVyMUcwRQYDVQQDDD5DaGluYSBJbnRlcm5ldCBOZXR3b3JrIEluZm9ybWF0
aW9uIENlbnRlciBFViBDZXJ0aWZpY2F0ZXMgUm9vdDAeFw0xMDA4MzEwNzExMjVa
Fw0zMDA4MzEwNzExMjVaMIGKMQswCQYDVQQGEwJDTjEyMDAGA1UECgwpQ2hpbmEg
SW50ZXJuZXQgTmV0d29yayBJbmZvcm1hdGlvbiBDZW50ZXIxRzBFBgNVBAMMPkNo
aW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyIEVWIENlcnRp
ZmljYXRlcyBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm35z
7r07eKpkQ0H1UN+U8i6yjUqORlTSIRLIOTJCBumD1Z9S7eVnAztUwYyZmczpwA//
DdmEEbK40ctb3B75aDFk4Zv6dOtouSCV98YPjUesWgbdYavi7NifFy2cyjw1l1Vx
zUOFsUcW9SxTgHbP0wBkvUCZ3czY28Sf1hNfQYOL+Q2HklY0bBoQCxfVWhyXWIQ8
hBouXJE0bhlffxdpxWXvayHG1VA6v2G5BY3vbzQ6sm8UY78WO5upKv23KzhmBsUs
4qpnHkWnjQRmQvaPK++IIGmPMowUc9orhpFjIpryp9vOiYurXccUwVswah+xt54u
gQEC7c+WXmPbqOY4twIDAQABo2MwYTAfBgNVHSMEGDAWgBR8cks5x8DbYqVPm6oY
NJKiyoOCWTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4E
FgQUfHJLOcfA22KlT5uqGDSSosqDglkwDQYJKoZIhvcNAQEFBQADggEBACrDx0M3
j92tpLIM7twUbY8opJhJywyA6vPtI2Z1fcXTIWd50XPFtQO3WKwMVC/GVhMPMdoG
52U7HW8228gd+f2ABsqjPWYWqJ1MFn3AlUa1UeTiH9fqBk1jjZaM7+czV0I664zB
echNdn3e9rG3geCg+aF4RhcaVpjwTj2rHO3sOdwHSPdj/gauwqRcalsyiMXHM4Ws
ZkJHwlgkmeHlPuV1LI5D1l08eB6olYIpUNHRFrrvwb562bTYzB5MRuF3sTGrvSrI
zo9uoV1/A3U05K2JRVRevq4opbs/eHnrc7MKDf2+yfdWrPa37S+bISnHOLaVxATy
wy39FCqQmbkHzJ8=
-----END CERTIFICATE-----

# Issuer: CN=Swisscom Root CA 2 O=Swisscom OU=Digital Certificate Services
# Subject: CN=Swisscom Root CA 2 O=Swisscom OU=Digital Certificate Services
# Label: "Swisscom Root CA 2"
# Serial: 40698052477090394928831521023204026294
# MD5 Fingerprint: 5b:04:69:ec:a5:83:94:63:18:a7:86:d0:e4:f2:6e:19
# SHA1 Fingerprint: 77:47:4f:c6:30:e4:0f:4c:47:64:3f:84:ba:b8:c6:95:4a:8a:41:ec
# SHA256 Fingerprint: f0:9b:12:2c:71:14:f4:a0:9b:d4:ea:4f:4a:99:d5:58:b4:6e:4c:25:cd:81:14:0d:29:c0:56:13:91:4c:38:41
-----BEGIN CERTIFICATE-----
MIIF2TCCA8GgAwIBAgIQHp4o6Ejy5e/DfEoeWhhntjANBgkqhkiG9w0BAQsFADBk
MQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0
YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3Qg
Q0EgMjAeFw0xMTA2MjQwODM4MTRaFw0zMTA2MjUwNzM4MTRaMGQxCzAJBgNVBAYT
AmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGlnaXRhbCBDZXJ0aWZp
Y2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAyMIICIjAN
BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlUJOhJ1R5tMJ6HJaI2nbeHCOFvEr
jw0DzpPMLgAIe6szjPTpQOYXTKueuEcUMncy3SgM3hhLX3af+Dk7/E6J2HzFZ++r
0rk0X2s682Q2zsKwzxNoysjL67XiPS4h3+os1OD5cJZM/2pYmLcX5BtS5X4HAB1f
2uY+lQS3aYg5oUFgJWFLlTloYhyxCwWJwDaCFCE/rtuh/bxvHGCGtlOUSbkrRsVP
ACu/obvLP+DHVxxX6NZp+MEkUp2IVd3Chy50I9AU/SpHWrumnf2U5NGKpV+GY3aF
y6//SSj8gO1MedK75MDvAe5QQQg1I3ArqRa0jG6F6bYRzzHdUyYb3y1aSgJA/MTA
tukxGggo5WDDH8SQjhBiYEQN7Aq+VRhxLKX0srwVYv8c474d2h5Xszx+zYIdkeNL
6yxSNLCK/RJOlrDrcH+eOfdmQrGrrFLadkBXeyq96G4DsguAhYidDMfCd7Camlf0
uPoTXGiTOmekl9AbmbeGMktg2M7v0Ax/lZ9vh0+Hio5fCHyqW/xavqGRn1V9TrAL
acywlKinh/LTSlDcX3KwFnUey7QYYpqwpzmqm59m2I2mbJYV4+by+PGDYmy7Velh
k6M99bFXi08jsJvllGov34zflVEpYKELKeRcVVi3qPyZ7iVNTA6z00yPhOgpD/0Q
VAKFyPnlw4vP5w8CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0hBBYw
FDASBgdghXQBUwIBBgdghXQBUwIBMBIGA1UdEwEB/wQIMAYBAf8CAQcwHQYDVR0O
BBYEFE0mICKJS9PVpAqhb97iEoHF8TwuMB8GA1UdIwQYMBaAFE0mICKJS9PVpAqh
b97iEoHF8TwuMA0GCSqGSIb3DQEBCwUAA4ICAQAyCrKkG8t9voJXiblqf/P0wS4R
fbgZPnm3qKhyN2abGu2sEzsOv2LwnN+ee6FTSA5BesogpxcbtnjsQJHzQq0Qw1zv
/2BZf82Fo4s9SBwlAjxnffUy6S8w5X2lejjQ82YqZh6NM4OKb3xuqFp1mrjX2lhI
REeoTPpMSQpKwhI3qEAMw8jh0FcNlzKVxzqfl9NX+Ave5XLzo9v/tdhZsnPdTSpx
srpJ9csc1fV5yJmz/MFMdOO0vSk3FQQoHt5FRnDsr7p4DooqzgB53MBfGWcsa0vv
aGgLQ+OswWIJ76bdZWGgr4RVSJFSHMYlkSrQwSIjYVmvRRGFHQEkNI/Ps/8XciAT
woCqISxxOQ7Qj1zB09GOInJGTB2Wrk9xseEFKZZZ9LuedT3PDTcNYtsmjGOpI99n
Bjx8Oto0QuFmtEYE3saWmA9LSHokMnWRn6z3aOkquVVlzl1h0ydw2Df+n7mvoC5W
t6NlUe07qxS/TFED6F+KBZvuim6c779o+sjaC+NCydAXFJy3SuCvkychVSa1ZC+N
8f+mQAWFBVzKBxlcCxMoTFh/wqXvRdpg065lYZ1Tg3TCrvJcwhbtkj6EPnNgiLx2
9CzP0H1907he0ZESEOnN3col49XtmS++dYFLJPlFRpTJKSFTnCZFqhMX5OfNeOI5
wSsSnqaeG8XmDtkx2Q==
-----END CERTIFICATE-----

# Issuer: CN=Swisscom Root EV CA 2 O=Swisscom OU=Digital Certificate Services
# Subject: CN=Swisscom Root EV CA 2 O=Swisscom OU=Digital Certificate Services
# Label: "Swisscom Root EV CA 2"
# Serial: 322973295377129385374608406479535262296
# MD5 Fingerprint: 7b:30:34:9f:dd:0a:4b:6b:35:ca:31:51:28:5d:ae:ec
# SHA1 Fingerprint: e7:a1:90:29:d3:d5:52:dc:0d:0f:c6:92:d3:ea:88:0d:15:2e:1a:6b
# SHA256 Fingerprint: d9:5f:ea:3c:a4:ee:dc:e7:4c:d7:6e:75:fc:6d:1f:f6:2c:44:1f:0f:a8:bc:77:f0:34:b1:9e:5d:b2:58:01:5d
-----BEGIN CERTIFICATE-----
MIIF4DCCA8igAwIBAgIRAPL6ZOJ0Y9ON/RAdBB92ylgwDQYJKoZIhvcNAQELBQAw
ZzELMAkGA1UEBhMCY2gxETAPBgNVBAoTCFN3aXNzY29tMSUwIwYDVQQLExxEaWdp
dGFsIENlcnRpZmljYXRlIFNlcnZpY2VzMR4wHAYDVQQDExVTd2lzc2NvbSBSb290
IEVWIENBIDIwHhcNMTEwNjI0MDk0NTA4WhcNMzEwNjI1MDg0NTA4WjBnMQswCQYD
VQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2Vy
dGlmaWNhdGUgU2VydmljZXMxHjAcBgNVBAMTFVN3aXNzY29tIFJvb3QgRVYgQ0Eg
MjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMT3HS9X6lds93BdY7Bx
UglgRCgzo3pOCvrY6myLURYaVa5UJsTMRQdBTxB5f3HSek4/OE6zAMaVylvNwSqD
1ycfMQ4jFrclyxy0uYAyXhqdk/HoPGAsp15XGVhRXrwsVgu42O+LgrQ8uMIkqBPH
oCE2G3pXKSinLr9xJZDzRINpUKTk4RtiGZQJo/PDvO/0vezbE53PnUgJUmfANykR
HvvSEaeFGHR55E+FFOtSN+KxRdjMDUN/rhPSays/p8LiqG12W0OfvrSdsyaGOx9/
5fLoZigWJdBLlzin5M8J0TbDC77aO0RYjb7xnglrPvMyxyuHxuxenPaHZa0zKcQv
idm5y8kDnftslFGXEBuGCxobP/YCfnvUxVFkKJ3106yDgYjTdLRZncHrYTNaRdHL
OdAGalNgHa/2+2m8atwBz735j9m9W8E6X47aD0upm50qKGsaCnw8qyIL5XctcfaC
NYGu+HuB5ur+rPQam3Rc6I8k9l2dRsQs0h4rIWqDJ2dVSqTjyDKXZpBy2uPUZC5f
46Fq9mDU5zXNysRojddxyNMkM3OxbPlq4SjbX8Y96L5V5jcb7STZDxmPX2MYWFCB
UWVv8p9+agTnNCRxunZLWB4ZvRVgRaoMEkABnRDixzgHcgplwLa7JSnaFp6LNYth
7eVxV4O1PHGf40+/fh6Bn0GXAgMBAAGjgYYwgYMwDgYDVR0PAQH/BAQDAgGGMB0G
A1UdIQQWMBQwEgYHYIV0AVMCAgYHYIV0AVMCAjASBgNVHRMBAf8ECDAGAQH/AgED
MB0GA1UdDgQWBBRF2aWBbj2ITY1x0kbBbkUe88SAnTAfBgNVHSMEGDAWgBRF2aWB
bj2ITY1x0kbBbkUe88SAnTANBgkqhkiG9w0BAQsFAAOCAgEAlDpzBp9SSzBc1P6x
XCX5145v9Ydkn+0UjrgEjihLj6p7jjm02Vj2e6E1CqGdivdj5eu9OYLU43otb98T
PLr+flaYC/NUn81ETm484T4VvwYmneTwkLbUwp4wLh/vx3rEUMfqe9pQy3omywC0
Wqu1kx+AiYQElY2NfwmTv9SoqORjbdlk5LgpWgi/UOGED1V7XwgiG/W9mR4U9s70
WBCCswo9GcG/W6uqmdjyMb3lOGbcWAXH7WMaLgqXfIeTK7KK4/HsGOV1timH59yL
Gn602MnTihdsfSlEvoqq9X46Lmgxk7lq2prg2+kupYTNHAq4Sgj5nPFhJpiTt3tm
7JFe3VE/23MPrQRYCd0EApUKPtN236YQHoA96M2kZNEzx5LH4k5E4wnJTsJdhw4S
nr8PyQUQ3nqjsTzyP6WqJ3mtMX0f/fwZacXduT98zca0wjAefm6S139hdlqP65VN
vBFuIXxZN5nQBrz5Bm0yFqXZaajh3DyAHmBR3NdUIR7KYndP+tiPsys6DXhyyWhB
WkdKwqPrGtcKqzwyVcgKEZzfdNbwQBUdyLmPtTbFr/giuMod89a2GQ+fYWVq6nTI
fI/DT11lgh/ZDYnadXL77/FHZxOzyNEZiCcmmpl5fx7kLD977vHeTYuWl8PVP3wb
I+2ksx0WckNLIOFZfsLorSa/ovc=
-----END CERTIFICATE-----

# Issuer: CN=CA Disig Root R1 O=Disig a.s.
# Subject: CN=CA Disig Root R1 O=Disig a.s.
# Label: "CA Disig Root R1"
# Serial: 14052245610670616104
# MD5 Fingerprint: be:ec:11:93:9a:f5:69:21:bc:d7:c1:c0:67:89:cc:2a
# SHA1 Fingerprint: 8e:1c:74:f8:a6:20:b9:e5:8a:f4:61:fa:ec:2b:47:56:51:1a:52:c6
# SHA256 Fingerprint: f9:6f:23:f4:c3:e7:9c:07:7a:46:98:8d:5a:f5:90:06:76:a0:f0:39:cb:64:5d:d1:75:49:b2:16:c8:24:40:ce
-----BEGIN CERTIFICATE-----
MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNV
BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu
MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQy
MDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx
EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjEw
ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy3QRk
D2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/o
OI7bm+V8u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3A
fQ+lekLZWnDZv6fXARz2m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJe
IgpFy4QxTaz+29FHuvlglzmxZcfe+5nkCiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8n
oc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTaYVKvJrT1cU/J19IG32PK
/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6vpmumwKj
rckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD
3AjLLhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE
7cderVC6xkGbrPAXZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkC
yC2fg69naQanMVXVz0tv/wQFx1isXxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLd
qvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
DwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ04IwDQYJKoZI
hvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR
xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaA
SfX8MPWbTx9BLxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXo
HqJPYNcHKfyyo6SdbhWSVhlMCrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpB
emOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5GfbVSUZP/3oNn6z4eGBrxEWi1CXYBmC
AMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85YmLLW1AL14FABZyb
7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKSds+x
DzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvk
F7mGnjixlAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqF
a3qdnom2piiZk4hA9z7NUaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsT
Q6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJa7+h89n07eLw4+1knj0vllJPgFOL
-----END CERTIFICATE-----

# Issuer: CN=CA Disig Root R2 O=Disig a.s.
# Subject: CN=CA Disig Root R2 O=Disig a.s.
# Label: "CA Disig Root R2"
# Serial: 10572350602393338211
# MD5 Fingerprint: 26:01:fb:d8:27:a7:17:9a:45:54:38:1a:43:01:3b:03
# SHA1 Fingerprint: b5:61:eb:ea:a4:de:e4:25:4b:69:1a:98:a5:57:47:c2:34:c7:d9:71
# SHA256 Fingerprint: e2:3d:4a:03:6d:7b:70:e9:f5:95:b1:42:20:79:d2:b9:1e:df:bb:1f:b6:51:a0:63:3e:aa:8a:9d:c5:f8:07:03
-----BEGIN CERTIFICATE-----
MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV
BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu
MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQy
MDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx
EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjIw
ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbCw3Oe
NcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNH
PWSb6WiaxswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3I
x2ymrdMxp7zo5eFm1tL7A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbe
QTg06ov80egEFGEtQX6sx3dOy1FU+16SGBsEWmjGycT6txOgmLcRK7fWV8x8nhfR
yyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqVg8NTEQxzHQuyRpDRQjrO
QG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa5Beny912
H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJ
QfYEkoopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUD
i/ZnWejBBhG93c+AAk9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORs
nLMOPReisjQS1n6yqEm70XooQL6iFh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1
rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
DwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5uQu0wDQYJKoZI
hvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM
tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqf
GopTpti72TVVsRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkb
lvdhuDvEK7Z4bLQjb/D907JedR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka
+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W81k/BfDxujRNt+3vrMNDcTa/F1bal
TFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjxmHHEt38OFdAlab0i
nSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01utI3
gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18Dr
G5gPcFw0sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3Os
zMOl6W8KjptlwlCFtaOgUxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8x
L4ysEr3vQCj8KWefshNPZiTEUxnpHikV7+ZtsH8tZ/3zbBt1RqPlShfppNcL
-----END CERTIFICATE-----

# Issuer: CN=ACCVRAIZ1 O=ACCV OU=PKIACCV
# Subject: CN=ACCVRAIZ1 O=ACCV OU=PKIACCV
# Label: "ACCVRAIZ1"
# Serial: 6828503384748696800
# MD5 Fingerprint: d0:a0:5a:ee:05:b6:09:94:21:a1:7d:f1:b2:29:82:02
# SHA1 Fingerprint: 93:05:7a:88:15:c6:4f:ce:88:2f:fa:91:16:52:28:78:bc:53:64:17
# SHA256 Fingerprint: 9a:6e:c0:12:e1:a7:da:9d:be:34:19:4d:47:8a:d7:c0:db:18:22:fb:07:1d:f1:29:81:49:6e:d1:04:38:41:13
-----BEGIN CERTIFICATE-----
MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE
AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw
CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQ
BgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwHUEtJQUNDVjENMAsGA1UECgwEQUND
VjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCb
qau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gMjmoY
HtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWo
G2ioPej0RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpA
lHPrzg5XPAOBOp0KoVdDaaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhr
IA8wKFSVf+DuzgpmndFALW4ir50awQUZ0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/
0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDGWuzndN9wrqODJerWx5eH
k6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs78yM2x/47
4KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMO
m3WR5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpa
cXpkatcnYGMN285J9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPl
uUsXQA+xtrn13k/c4LOsOxFwYIRKQ26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYI
KwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRwOi8vd3d3LmFjY3YuZXMvZmls
ZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEuY3J0MB8GCCsG
AQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2
VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeT
VfZW6oHlNsyMHj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIG
CCsGAQUFBwICMIIBFB6CARAAQQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUA
cgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBhAO0AegAgAGQAZQAgAGwAYQAgAEEA
QwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUAYwBuAG8AbABvAGcA
7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBjAHQA
cgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAA
QwBQAFMAIABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUA
czAwBggrBgEFBQcCARYkaHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2Mu
aHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRt
aW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2MV9kZXIuY3JsMA4GA1Ud
DwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZIhvcNAQEF
BQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdp
D70ER9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gU
JyCpZET/LtZ1qmxNYEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+m
AM/EKXMRNt6GGT6d7hmKG9Ww7Y49nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepD
vV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJTS+xJlsndQAJxGJ3KQhfnlms
tn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3sCPdK6jT2iWH
7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h
I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szA
h1xA2syVP1XgNce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xF
d3+YJ5oyXSrjhO7FmGYvliAd3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2H
pPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3pEfbRD0tVNEYqi4Y7
-----END CERTIFICATE-----

# Issuer: CN=TWCA Global Root CA O=TAIWAN-CA OU=Root CA
# Subject: CN=TWCA Global Root CA O=TAIWAN-CA OU=Root CA
# Label: "TWCA Global Root CA"
# Serial: 3262
# MD5 Fingerprint: f9:03:7e:cf:e6:9e:3c:73:7a:2a:90:07:69:ff:2b:96
# SHA1 Fingerprint: 9c:bb:48:53:f6:a4:f6:d3:52:a4:e8:32:52:55:60:13:f5:ad:af:65
# SHA256 Fingerprint: 59:76:90:07:f7:68:5d:0f:cd:50:87:2f:9f:95:d5:75:5a:5b:2b:45:7d:81:f3:69:2b:61:0a:98:67:2f:0e:1b
-----BEGIN CERTIFICATE-----
MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcx
EjAQBgNVBAoTCVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMT
VFdDQSBHbG9iYWwgUm9vdCBDQTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5
NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQKEwlUQUlXQU4tQ0ExEDAOBgNVBAsT
B1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3QgQ0EwggIiMA0GCSqG
SIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2CnJfF
10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz
0ALfUPZVr2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfCh
MBwqoJimFb3u/Rk28OKRQ4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbH
zIh1HrtsBv+baz4X7GGqcXzGHaL3SekVtTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc
46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1WKKD+u4ZqyPpcC1jcxkt2
yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99sy2sbZCi
laLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYP
oA/pyJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQA
BDzfuBSO6N+pjWxnkjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcE
qYSjMq+u7msXi7Kx/mzhkIyIqJdIzshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm
4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6gcFGn90xHNcgL
1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn
LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WF
H6vPNOw/KP4M8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNo
RI2T9GRwoD2dKAXDOXC4Ynsg/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+
nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlglPx4mI88k1HtQJAH32RjJMtOcQWh
15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryPA9gK8kxkRr05YuWW
6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3mi4TW
nsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5j
wa19hAM8EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWz
aGHQRiapIVJpLesux+t3zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmy
KwbQBM0=
-----END CERTIFICATE-----
python3.3/site-packages/pip/_vendor/requests/packages/__pycache__/__init__.cpython-33.pyc000064400000000450151733566750025321 0ustar00�
7�Re>c@s$ddlmZddlmZdS(i(uabsolute_importi(uurllib3N(u
__future__uabsolute_importuuurllib3(((u?/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/requests/packages/urllib3/connection.py000064400000014605151733566750023023 0ustar00# urllib3/connection.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import sys
import socket
from socket import timeout as SocketTimeout

try: # Python 3
    from http.client import HTTPConnection as _HTTPConnection, HTTPException
except ImportError:
    from httplib import HTTPConnection as _HTTPConnection, HTTPException

class DummyConnection(object):
    "Used to detect a failed ConnectionCls import."
    pass

try: # Compiled with SSL?
    ssl = None
    HTTPSConnection = DummyConnection

    class BaseSSLError(BaseException):
        pass

    try: # Python 3
        from http.client import HTTPSConnection as _HTTPSConnection
    except ImportError:
        from httplib import HTTPSConnection as _HTTPSConnection

    import ssl
    BaseSSLError = ssl.SSLError

except (ImportError, AttributeError): # Platform-specific: No SSL.
    pass

from .exceptions import (
    ConnectTimeoutError,
)
from .packages.ssl_match_hostname import match_hostname
from .packages import six
from .util import (
    assert_fingerprint,
    resolve_cert_reqs,
    resolve_ssl_version,
    ssl_wrap_socket,
)


port_by_scheme = {
    'http': 80,
    'https': 443,
}


class HTTPConnection(_HTTPConnection, object):
    """
    Based on httplib.HTTPConnection but provides an extra constructor
    backwards-compatibility layer between older and newer Pythons.
    """

    default_port = port_by_scheme['http']

    # By default, disable Nagle's Algorithm.
    tcp_nodelay = 1

    def __init__(self, *args, **kw):
        if six.PY3:  # Python 3
            kw.pop('strict', None)
        if sys.version_info < (2, 7):  # Python 2.6 and older
            kw.pop('source_address', None)

        # Pre-set source_address in case we have an older Python like 2.6.
        self.source_address = kw.get('source_address')

        # Superclass also sets self.source_address in Python 2.7+.
        _HTTPConnection.__init__(self, *args, **kw)  

    def _new_conn(self):
        """ Establish a socket connection and set nodelay settings on it.

        :return: a new socket connection
        """
        extra_args = []
        if self.source_address:  # Python 2.7+
            extra_args.append(self.source_address)

        conn = socket.create_connection(
            (self.host, self.port), self.timeout, *extra_args)
        conn.setsockopt(
            socket.IPPROTO_TCP, socket.TCP_NODELAY, self.tcp_nodelay)

        return conn

    def _prepare_conn(self, conn):
        self.sock = conn
        # the _tunnel_host attribute was added in python 2.6.3 (via
        # http://hg.python.org/cpython/rev/0f57b30a152f) so pythons 2.6(0-2) do
        # not have them.
        if getattr(self, '_tunnel_host', None):
            # TODO: Fix tunnel so it doesn't depend on self.sock state.
            self._tunnel()

    def connect(self):
        conn = self._new_conn()
        self._prepare_conn(conn)


class HTTPSConnection(HTTPConnection):
    default_port = port_by_scheme['https']

    def __init__(self, host, port=None, key_file=None, cert_file=None,
                 strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, **kw):

        HTTPConnection.__init__(self, host, port, strict=strict,
                                timeout=timeout, **kw)

        self.key_file = key_file
        self.cert_file = cert_file

        # Required property for Google AppEngine 1.9.0 which otherwise causes
        # HTTPS requests to go out as HTTP. (See Issue #356)
        self._protocol = 'https'

    def connect(self):
        conn = self._new_conn()
        self._prepare_conn(conn)
        self.sock = ssl.wrap_socket(conn, self.key_file, self.cert_file)


class VerifiedHTTPSConnection(HTTPSConnection):
    """
    Based on httplib.HTTPSConnection but wraps the socket with
    SSL certification.
    """
    cert_reqs = None
    ca_certs = None
    ssl_version = None
    conn_kw = {}

    def set_cert(self, key_file=None, cert_file=None,
                 cert_reqs=None, ca_certs=None,
                 assert_hostname=None, assert_fingerprint=None):

        self.key_file = key_file
        self.cert_file = cert_file
        self.cert_reqs = cert_reqs
        self.ca_certs = ca_certs
        self.assert_hostname = assert_hostname
        self.assert_fingerprint = assert_fingerprint

    def connect(self):
        # Add certificate verification

        try:
            sock = socket.create_connection(
                address=(self.host, self.port), timeout=self.timeout,
                **self.conn_kw)
        except SocketTimeout:
            raise ConnectTimeoutError(
                self, "Connection to %s timed out. (connect timeout=%s)" %
                (self.host, self.timeout))

        sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY,
                        self.tcp_nodelay)

        resolved_cert_reqs = resolve_cert_reqs(self.cert_reqs)
        resolved_ssl_version = resolve_ssl_version(self.ssl_version)

        hostname = self.host
        if getattr(self, '_tunnel_host', None):
            # _tunnel_host was added in Python 2.6.3
            # (See: http://hg.python.org/cpython/rev/0f57b30a152f)

            self.sock = sock
            # Calls self._set_hostport(), so self.host is
            # self._tunnel_host below.
            self._tunnel()

            # Override the host with the one we're requesting data from.
            hostname = self._tunnel_host

        # Wrap socket using verification with the root certs in
        # trusted_root_certs
        self.sock = ssl_wrap_socket(sock, self.key_file, self.cert_file,
                                    cert_reqs=resolved_cert_reqs,
                                    ca_certs=self.ca_certs,
                                    server_hostname=hostname,
                                    ssl_version=resolved_ssl_version)

        if resolved_cert_reqs != ssl.CERT_NONE:
            if self.assert_fingerprint:
                assert_fingerprint(self.sock.getpeercert(binary_form=True),
                                   self.assert_fingerprint)
            elif self.assert_hostname is not False:
                match_hostname(self.sock.getpeercert(),
                               self.assert_hostname or hostname)


if ssl:
    # Make a copy for testing.
    UnverifiedHTTPSConnection = HTTPSConnection
    HTTPSConnection = VerifiedHTTPSConnection
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py000064400000014635151733566750023344 0ustar00# urllib3/_collections.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

from collections import Mapping, MutableMapping
try:
    from threading import RLock
except ImportError: # Platform-specific: No threads available
    class RLock:
        def __enter__(self):
            pass

        def __exit__(self, exc_type, exc_value, traceback):
            pass


try: # Python 2.7+
    from collections import OrderedDict
except ImportError:
    from .packages.ordered_dict import OrderedDict
from .packages.six import itervalues


__all__ = ['RecentlyUsedContainer', 'HTTPHeaderDict']


_Null = object()


class RecentlyUsedContainer(MutableMapping):
    """
    Provides a thread-safe dict-like container which maintains up to
    ``maxsize`` keys while throwing away the least-recently-used keys beyond
    ``maxsize``.

    :param maxsize:
        Maximum number of recent elements to retain.

    :param dispose_func:
        Every time an item is evicted from the container,
        ``dispose_func(value)`` is called.  Callback which will get called
    """

    ContainerCls = OrderedDict

    def __init__(self, maxsize=10, dispose_func=None):
        self._maxsize = maxsize
        self.dispose_func = dispose_func

        self._container = self.ContainerCls()
        self.lock = RLock()

    def __getitem__(self, key):
        # Re-insert the item, moving it to the end of the eviction line.
        with self.lock:
            item = self._container.pop(key)
            self._container[key] = item
            return item

    def __setitem__(self, key, value):
        evicted_value = _Null
        with self.lock:
            # Possibly evict the existing value of 'key'
            evicted_value = self._container.get(key, _Null)
            self._container[key] = value

            # If we didn't evict an existing value, we might have to evict the
            # least recently used item from the beginning of the container.
            if len(self._container) > self._maxsize:
                _key, evicted_value = self._container.popitem(last=False)

        if self.dispose_func and evicted_value is not _Null:
            self.dispose_func(evicted_value)

    def __delitem__(self, key):
        with self.lock:
            value = self._container.pop(key)

        if self.dispose_func:
            self.dispose_func(value)

    def __len__(self):
        with self.lock:
            return len(self._container)

    def __iter__(self):
        raise NotImplementedError('Iteration over this class is unlikely to be threadsafe.')

    def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            # under Python 2, this copies the list of values twice :-|
            values = list(self._container.values())
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)

    def keys(self):
        with self.lock:
            return self._container.keys()


class HTTPHeaderDict(MutableMapping):
    """
    :param headers:
        An iterable of field-value pairs. Must not contain multiple field names
        when compared case-insensitively.

    :param kwargs:
        Additional field-value pairs to pass in to ``dict.update``.

    A ``dict`` like container for storing HTTP Headers.

    Field names are stored and compared case-insensitively in compliance with
    RFC 2616. Iteration provides the first case-sensitive key seen for each
    case-insensitive pair.

    Using ``__setitem__`` syntax overwrites fields that compare equal
    case-insensitively in order to maintain ``dict``'s api. For fields that
    compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
    in a loop.

    If multiple fields that are equal case-insensitively are passed to the
    constructor or ``.update``, the behavior is undefined and some will be
    lost.

    >>> headers = HTTPHeaderDict()
    >>> headers.add('Set-Cookie', 'foo=bar')
    >>> headers.add('set-cookie', 'baz=quxx')
    >>> headers['content-length'] = '7'
    >>> headers['SET-cookie']
    'foo=bar, baz=quxx'
    >>> headers['Content-Length']
    '7'

    If you want to access the raw headers with their original casing
    for debugging purposes you can access the private ``._data`` attribute
    which is a normal python ``dict`` that maps the case-insensitive key to a
    list of tuples stored as (case-sensitive-original-name, value). Using the
    structure from above as our example:

    >>> headers._data
    {'set-cookie': [('Set-Cookie', 'foo=bar'), ('set-cookie', 'baz=quxx')],
    'content-length': [('content-length', '7')]}
    """

    def __init__(self, headers=None, **kwargs):
        self._data = {}
        if headers is None:
            headers = {}
        self.update(headers, **kwargs)

    def add(self, key, value):
        """Adds a (name, value) pair, doesn't overwrite the value if it already
        exists.

        >>> headers = HTTPHeaderDict(foo='bar')
        >>> headers.add('Foo', 'baz')
        >>> headers['foo']
        'bar, baz'
        """
        self._data.setdefault(key.lower(), []).append((key, value))

    def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        return self[key].split(', ') if key in self else []

    def copy(self):
        h = HTTPHeaderDict()
        for key in self._data:
            for rawkey, value in self._data[key]:
                h.add(rawkey, value)
        return h

    def __eq__(self, other):
        if not isinstance(other, Mapping):
            return False
        other = HTTPHeaderDict(other)
        return dict((k1, self[k1]) for k1 in self._data) == \
                dict((k2, other[k2]) for k2 in other._data)

    def __getitem__(self, key):
        values = self._data[key.lower()]
        return ', '.join(value[1] for value in values)

    def __setitem__(self, key, value):
        self._data[key.lower()] = [(key, value)]

    def __delitem__(self, key):
        del self._data[key.lower()]

    def __len__(self):
        return len(self._data)

    def __iter__(self):
        for headers in itervalues(self._data):
            yield headers[0][0]

    def __repr__(self):
        return '%s(%r)' % (self.__class__.__name__, dict(self.items()))
site-packages/pip/_vendor/requests/packages/urllib3/contrib/__pycache__/pyopenssl.cpython-33.pyc000064400000033174151733566750030564 0ustar00python3.3�
7�Re�:c@s�dZddlmZddlmZddlZddlm	Z
ddlmZm
Z
ddlmZmZddlZddlZddlmZd	d
lmZd	dlmZdd
gZeZiejjej6ejjej6ejjej 6Z!iejj"ej#6ejj$ej%6ejj$ejj&ej'6Z(dddZ)ejZ*ej+Z,dd�Z-dd
�Z.Gdd�de�Zdd�Z/Gdd�de�Z0Gdd�de1�Z2dd�Z3dddddddd�Z+dS(u�SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.

This needs the following packages installed:

* pyOpenSSL (tested with 0.13)
* ndg-httpsclient (tested with 0.3.2)
* pyasn1 (tested with 0.1.6)

You can install them with the following command:

    pip install pyopenssl ndg-httpsclient pyasn1

To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this::

    try:
        import urllib3.contrib.pyopenssl
        urllib3.contrib.pyopenssl.inject_into_urllib3()
    except ImportError:
        pass

Now you can use :mod:`urllib3` as you normally would, and it will support SNI
when the required modules are installed.

Activating this module also has the positive side effect of disabling SSL/TLS
encryption in Python 2 (see `CRIME attack`_).

If you want to configure the default list of supported cipher suites, you can
set the ``urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST`` variable.

Module Variables
----------------

:var DEFAULT_SSL_CIPHER_LIST: The list of supported SSL/TLS cipher suites.
    Default: ``ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:
    ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS``

.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)

i(uSUBJ_ALT_NAME_SUPPORT(uSubjectAltNameN(udecoder(uunivu
constraint(u_fileobjectutimeout(uStringIOi(u
connection(uutiluinject_into_urllib3uextract_from_urllib3u,ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:uAECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:u!aNULL:!MD5:!DSScCstt_tt_dS(u7Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.N(ussl_wrap_socketu
connectionuHAS_SNIuutil(((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyuinject_into_urllib3fs	cCstt_tt_dS(u4Undo monkey-patching by :func:`inject_into_urllib3`.N(uorig_connection_ssl_wrap_socketu
connectionussl_wrap_socketuorig_util_HAS_SNIuutiluHAS_SNI(((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyuextract_from_urllib3ms	cBs6|EeZdZdZejjejdd�ZdS(uSubjectAltNameu0ASN.1 implementation for subjectAltNames supportiiN(	u__name__u
__module__u__qualname__u__doc__uunivu
SequenceOfusizeSpecu
constraintuValueSizeConstraint(u
__locals__((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyuSubjectAltNameus	uSubjectAltNamecCsg}ts|St�}x�t|j��D]�}|j|�}|j�}|dkr_q,n|j�}tj|d|�}x�|D]x}t	|t�s�q�nxZtt
|��D]F}	|j|	�}
|
j�dkr�q�n|j
t|
j���q�Wq�Wq,W|S(NusubjectAltNameuasn1SpecudNSName(uSUBJ_ALT_NAME_SUPPORTuSubjectAltNameurangeuget_extension_countu
get_extensionuget_short_nameuget_datauder_decoderudecodeu
isinstanceulenugetComponentByPositionugetNameuappendustrugetComponent(u	peer_certudns_nameu
general_namesuiuextuext_nameuext_datudecoded_datunameuentryu	component((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyuget_subj_alt_name�s*		
%uget_subj_alt_namecBs>|EeZdZdd�Zd	dd�Zd
dd�ZdS(u
fileobjectcCsFtj|jggg|jj��\}}}|sBt��ndS(N(uselectu_socku
gettimeoututimeout(uselfurduwdued((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyu_wait_for_sock�sufileobject._wait_for_sockic	
Cs�t|j|j�}|j}|jdd�|dkr�t�|_xXy|jj|�}Wn%tj	j
k
r�|j�wIYnX|s�Pn|j|�qI|j
�S|j�}||kr|jd�|j|�}t�|_|jj|j��|St�|_x�||}y|jj|�}Wn%tj	j
k
r[|j�wYnX|sfPnt|�}||kr�|r�|S||kr�|j|�~Pn||ks�td||f��|j|�||7}~q|j
�SdS(Niiurecv(%d) returned %d bytes(umaxu	_rbufsizeudefault_bufsizeu_rbufuseekuStringIOu_sockurecvuOpenSSLuSSLu
WantReadErroru_wait_for_sockuwriteugetvalueutellureadulenuAssertionError(	uselfusizeurbufsizeubufudataubuf_lenurvuleftun((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyuread�sX	





"

ufileobject.readcCs|j}|jdd�|j�dkr�|jd�|j|�}|jd�sht|�|kr�t�|_|jj|j��|S~n|dkr@|j	dkr_|jd�|j�g}t�|_d}|jj}xfy:x3|dkr$|d�}|sPn|j
|�q�WWn%tjjk
rM|j�w�YnXPq�dj|�S|jdd�t�|_x�y|jj|j	�}Wn%tjjk
r�|j�w~YnX|s�Pn|jd�}|dkr&|d7}|j|d|��|jj||d��~Pn|j|�q~|j�S|jdd�|j�}||kr�|jd�|j|�}	t�|_|jj|j��|	St�|_xJy|jj|j	�}Wn%tjjk
r�|j�w�YnX|sPn||}
|jdd|
�}|dkr�|d7}|jj||d��|rt|j|d|��Pq�|d|�Snt|�}||kr�|r�|S||
kr�|j|d|
��|jj||
d��Pn|j|�||7}q�|j�SdS(Niiu
iu(u_rbufuseekutellureadlineuendswithulenuStringIOuwriteureadu	_rbufsizeuNoneu_sockurecvuappenduOpenSSLuSSLu
WantReadErroru_wait_for_sockujoinufindugetvalue(uselfusizeubufublineubuffersudataurecvunlubuf_lenurvuleftun((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyureadline�s�	
!











ufileobject.readlineNi����i����(u__name__u
__module__u__qualname__u_wait_for_sockureadureadline(u
__locals__((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyu
fileobject�sDu
fileobjectcBst|EeZdZdZdd�Zdd�Zddd�Zd	d
�Zdd�Zd
d�Z	ddd�ZdS(u
WrappedSocketu@API-compatibility wrapper for Python OpenSSL's Connection-class.cCs||_||_dS(N(u
connectionusocket(uselfu
connectionusocket((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyu__init__Ss	uWrappedSocket.__init__cCs
|jj�S(N(usocketufileno(uself((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyufilenoWsuWrappedSocket.filenoicCst|j||�S(N(u
fileobjectu
connection(uselfumodeubufsize((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyumakefileZsuWrappedSocket.makefilecCs|jj|�S(N(usocketu
settimeout(uselfutimeout((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyu
settimeout]suWrappedSocket.settimeoutcCs|jj|�S(N(u
connectionusendall(uselfudata((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyusendall`suWrappedSocket.sendallcCs
|jj�S(N(u
connectionushutdown(uself((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyuclosecsuWrappedSocket.closecCsr|jj�}|s|S|r8tjjtjj|�Sid|j�jfffd6dd�t|�D�d6S(Nu
commonNameusubjectcSsg|]}d|f�qS(uDNS((u.0uvalue((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyu
<listcomp>vs	u-WrappedSocket.getpeercert.<locals>.<listcomp>usubjectAltName(	u
connectionuget_peer_certificateuOpenSSLucryptoudump_certificateu
FILETYPE_ASN1uget_subjectuCNuget_subj_alt_name(uselfubinary_formux509((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyugetpeercertfs			uWrappedSocket.getpeercertNi����F(u__name__u
__module__u__qualname__u__doc__u__init__ufilenoumakefileu
settimeoutusendallucloseuFalseugetpeercert(u
__locals__((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyu
WrappedSocketPsu
WrappedSocketcCs
|dkS(Ni((ucnxux509uerr_nou	err_depthureturn_code((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyu_verify_callback|su_verify_callbackcCs�tjjt|�}|r,|j|�n|rB|j|�n|tjkrh|jt	|t
�n|r�y|j|d�Wq�tjj
k
r�}ztjd||��WYdd}~Xq�Xn
|j�d}	|j|	�|jt�tjj||�}
|
j|�|
j�x�y|
j�Wnmtjjk
rctj|ggg�w"Yn=tjj
k
r�}ztjd|��WYdd}~XnXPq"t|
|�S(Nubad ca_certs: %riu
bad handshake(uOpenSSLuSSLuContextu_openssl_versionsuuse_certificate_fileuuse_privatekey_fileusslu	CERT_NONEu
set_verifyu_openssl_verifyu_verify_callbackuload_verify_locationsuNoneuErroruSSLErroruset_default_verify_pathsuset_optionsuset_cipher_listuDEFAULT_SSL_CIPHER_LISTu
Connectionuset_tlsext_host_nameuset_connect_stateudo_handshakeu
WantReadErroruselectu
WrappedSocket(usockukeyfileucertfileu	cert_reqsuca_certsuserver_hostnameussl_versionuctxueuOP_NO_COMPRESSIONucnx((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyussl_wrap_socket�s:,




%ussl_wrap_socket(5u__doc__u%ndg.httpsclient.ssl_peer_verificationuSUBJ_ALT_NAME_SUPPORTundg.httpsclient.subj_alt_nameuSubjectAltNameuBaseSubjectAltNameuOpenSSL.SSLuOpenSSLupyasn1.codec.derudecoderuder_decoderupyasn1.typeuunivu
constraintusocketu_fileobjectutimeoutussluselectu	cStringIOuStringIOuu
connectionuutilu__all__uHAS_SNIuSSLu
SSLv23_METHODuPROTOCOL_SSLv23uSSLv3_METHODuPROTOCOL_SSLv3uTLSv1_METHODuPROTOCOL_TLSv1u_openssl_versionsuVERIFY_NONEu	CERT_NONEuVERIFY_PEERu
CERT_OPTIONALuVERIFY_FAIL_IF_NO_PEER_CERTu
CERT_REQUIREDu_openssl_verifyuDEFAULT_SSL_CIPHER_LISTuorig_util_HAS_SNIussl_wrap_socketuorig_connection_ssl_wrap_socketuinject_into_urllib3uextract_from_urllib3uget_subj_alt_nameu
fileobjectuobjectu
WrappedSocketu_verify_callbackuNone(((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyu<module>/sH			�,	site-packages/pip/_vendor/requests/packages/urllib3/contrib/__pycache__/__init__.cpython-33.pyc000064400000000256151733566750030262 0ustar00python3.3�
7�Rec@sdS(N((((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/__init__.pyu<module>ssite-packages/pip/_vendor/requests/packages/urllib3/contrib/__pycache__/ntlmpool.cpython-33.pyc000064400000010701151733566750030363 0ustar00python3.3�
7�Re�c@s�dZyddlmZWn"ek
r>ddlmZYnXddlmZddlmZddlm	Z	ee
�ZGdd�de	�ZdS(	u
NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
i(uHTTPSConnection(u	getLogger(untlm(uHTTPSConnectionPoolcs_|EeZdZdZdZ�fdd�Zdd�Zd
d
ddd�fdd	�Z	�S(uNTLMConnectionPooluQ
    Implements an NTLM authentication version of an urllib3 connection pool
    uhttpscsjtt|�j||�||_||_|jdd�}|dj�|_|d|_||_	dS(u�
        authurl is a random URL on the server that is protected by NTLM.
        user is the Windows user, probably in the DOMAIN\username format.
        pw is the password for the user.
        u\iiN(
usuperuNTLMConnectionPoolu__init__uauthurlurawuserusplituupperudomainuuserupw(uselfuuserupwuauthurluargsukwargsu
user_parts(u	__class__(uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.pyu__init__!s		
uNTLMConnectionPool.__init__c
Cs�|jd7_tjd|j|j|jf�i}d|d<d}d}td|jd|j�}d	tj|j	�||<tjd
|�|j
d|jd|�|j�}t
|j��}tjd|j|jf�tjd
|�tjd|jd��d|_||jd�}d}x7|D]/}	|	dd�dkr<|	dd�}q<q<W|dkr�td|||f��ntj|�\}
}tj|
|j|j|j|�}d	|||<tjd
|�|j
d|jd|�|j�}tjd|j|jf�tjd
t
|j���tjd|j�dd��|jdkr�|jdkr�td��ntd|j|jf��nd|_tjd�|S(Niu3Starting NTLM HTTPS connection no. %d: https://%s%su
Keep-Aliveu
Connectionu
Authorizationuwww-authenticateuhostuportuNTLM %suRequest headers: %suGETuResponse status: %s %suResponse headers: %suResponse data: %s [...]idu, iuNTLM u!Unexpected %s response header: %si�i�u3Server rejected request: wrong username or passworduWrong server response: %s %suConnection established(unum_connectionsulogudebuguhostuauthurluHTTPSConnectionuportuntlmucreate_NTLM_NEGOTIATE_MESSAGEurawuserurequestuNoneugetresponseudictu
getheadersustatusureasonureadufpusplitu	Exceptionuparse_NTLM_CHALLENGE_MESSAGEu create_NTLM_AUTHENTICATE_MESSAGEuuserudomainupw(
uselfuheadersu
req_headeruresp_headeruconnuresureshdruauth_header_valuesuauth_header_valueusuServerChallengeuNegotiateFlagsuauth_msg((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.pyu	_new_conn/s\	
	
		!	
uNTLMConnectionPool._new_connicsG|dkri}nd|d<tt|�j|||||||�S(Nu
Keep-Aliveu
Connection(uNoneusuperuNTLMConnectionPooluurlopen(uselfumethoduurlubodyuheadersuretriesuredirectuassert_same_host(u	__class__(uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.pyuurlopenps	
uNTLMConnectionPool.urlopenNT(
u__name__u
__module__u__qualname__u__doc__uschemeu__init__u	_new_connuNoneuTrueuurlopen(u
__locals__((u	__class__uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.pyuNTLMConnectionPoolsA	uNTLMConnectionPoolN(
u__doc__uhttp.clientuHTTPSConnectionuImportErroruhttplibuloggingu	getLoggeruntlmuurllib3uHTTPSConnectionPoolu__name__uloguNTLMConnectionPool(((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.pyu<module>s
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py000064400000011205151733566750024161 0ustar00# urllib3/contrib/ntlmpool.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

"""
NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""

try:
    from http.client import HTTPSConnection
except ImportError:
    from httplib import HTTPSConnection
from logging import getLogger
from ntlm import ntlm

from urllib3 import HTTPSConnectionPool


log = getLogger(__name__)


class NTLMConnectionPool(HTTPSConnectionPool):
    """
    Implements an NTLM authentication version of an urllib3 connection pool
    """

    scheme = 'https'

    def __init__(self, user, pw, authurl, *args, **kwargs):
        """
        authurl is a random URL on the server that is protected by NTLM.
        user is the Windows user, probably in the DOMAIN\\username format.
        pw is the password for the user.
        """
        super(NTLMConnectionPool, self).__init__(*args, **kwargs)
        self.authurl = authurl
        self.rawuser = user
        user_parts = user.split('\\', 1)
        self.domain = user_parts[0].upper()
        self.user = user_parts[1]
        self.pw = pw

    def _new_conn(self):
        # Performs the NTLM handshake that secures the connection. The socket
        # must be kept open while requests are performed.
        self.num_connections += 1
        log.debug('Starting NTLM HTTPS connection no. %d: https://%s%s' %
                  (self.num_connections, self.host, self.authurl))

        headers = {}
        headers['Connection'] = 'Keep-Alive'
        req_header = 'Authorization'
        resp_header = 'www-authenticate'

        conn = HTTPSConnection(host=self.host, port=self.port)

        # Send negotiation message
        headers[req_header] = (
            'NTLM %s' % ntlm.create_NTLM_NEGOTIATE_MESSAGE(self.rawuser))
        log.debug('Request headers: %s' % headers)
        conn.request('GET', self.authurl, None, headers)
        res = conn.getresponse()
        reshdr = dict(res.getheaders())
        log.debug('Response status: %s %s' % (res.status, res.reason))
        log.debug('Response headers: %s' % reshdr)
        log.debug('Response data: %s [...]' % res.read(100))

        # Remove the reference to the socket, so that it can not be closed by
        # the response object (we want to keep the socket open)
        res.fp = None

        # Server should respond with a challenge message
        auth_header_values = reshdr[resp_header].split(', ')
        auth_header_value = None
        for s in auth_header_values:
            if s[:5] == 'NTLM ':
                auth_header_value = s[5:]
        if auth_header_value is None:
            raise Exception('Unexpected %s response header: %s' %
                            (resp_header, reshdr[resp_header]))

        # Send authentication message
        ServerChallenge, NegotiateFlags = \
            ntlm.parse_NTLM_CHALLENGE_MESSAGE(auth_header_value)
        auth_msg = ntlm.create_NTLM_AUTHENTICATE_MESSAGE(ServerChallenge,
                                                         self.user,
                                                         self.domain,
                                                         self.pw,
                                                         NegotiateFlags)
        headers[req_header] = 'NTLM %s' % auth_msg
        log.debug('Request headers: %s' % headers)
        conn.request('GET', self.authurl, None, headers)
        res = conn.getresponse()
        log.debug('Response status: %s %s' % (res.status, res.reason))
        log.debug('Response headers: %s' % dict(res.getheaders()))
        log.debug('Response data: %s [...]' % res.read()[:100])
        if res.status != 200:
            if res.status == 401:
                raise Exception('Server rejected request: wrong '
                                'username or password')
            raise Exception('Wrong server response: %s %s' %
                            (res.status, res.reason))

        res.fp = None
        log.debug('Connection established')
        return conn

    def urlopen(self, method, url, body=None, headers=None, retries=3,
                redirect=True, assert_same_host=True):
        if headers is None:
            headers = {}
        headers['Connection'] = 'Keep-Alive'
        return super(NTLMConnectionPool, self).urlopen(method, url, body,
                                                       headers, retries,
                                                       redirect,
                                                       assert_same_host)
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py000064400000035356151733566750024366 0ustar00'''SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.

This needs the following packages installed:

* pyOpenSSL (tested with 0.13)
* ndg-httpsclient (tested with 0.3.2)
* pyasn1 (tested with 0.1.6)

You can install them with the following command:

    pip install pyopenssl ndg-httpsclient pyasn1

To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this::

    try:
        import urllib3.contrib.pyopenssl
        urllib3.contrib.pyopenssl.inject_into_urllib3()
    except ImportError:
        pass

Now you can use :mod:`urllib3` as you normally would, and it will support SNI
when the required modules are installed.

Activating this module also has the positive side effect of disabling SSL/TLS
encryption in Python 2 (see `CRIME attack`_).

If you want to configure the default list of supported cipher suites, you can
set the ``urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST`` variable.

Module Variables
----------------

:var DEFAULT_SSL_CIPHER_LIST: The list of supported SSL/TLS cipher suites.
    Default: ``ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:
    ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS``

.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)

'''

from ndg.httpsclient.ssl_peer_verification import SUBJ_ALT_NAME_SUPPORT
from ndg.httpsclient.subj_alt_name import SubjectAltName as BaseSubjectAltName
import OpenSSL.SSL
from pyasn1.codec.der import decoder as der_decoder
from pyasn1.type import univ, constraint
from socket import _fileobject, timeout
import ssl
import select
from cStringIO import StringIO

from .. import connection
from .. import util

__all__ = ['inject_into_urllib3', 'extract_from_urllib3']

# SNI only *really* works if we can read the subjectAltName of certificates.
HAS_SNI = SUBJ_ALT_NAME_SUPPORT

# Map from urllib3 to PyOpenSSL compatible parameter-values.
_openssl_versions = {
    ssl.PROTOCOL_SSLv23: OpenSSL.SSL.SSLv23_METHOD,
    ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
    ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
}
_openssl_verify = {
    ssl.CERT_NONE: OpenSSL.SSL.VERIFY_NONE,
    ssl.CERT_OPTIONAL: OpenSSL.SSL.VERIFY_PEER,
    ssl.CERT_REQUIRED: OpenSSL.SSL.VERIFY_PEER
                       + OpenSSL.SSL.VERIFY_FAIL_IF_NO_PEER_CERT,
}

# A secure default.
# Sources for more information on TLS ciphers:
#
# - https://wiki.mozilla.org/Security/Server_Side_TLS
# - https://www.ssllabs.com/projects/best-practices/index.html
# - https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
#
# The general intent is:
# - Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE),
# - prefer ECDHE over DHE for better performance,
# - prefer any AES-GCM over any AES-CBC for better performance and security,
# - use 3DES as fallback which is secure but slow,
# - disable NULL authentication, MD5 MACs and DSS for security reasons.
DEFAULT_SSL_CIPHER_LIST = "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:" + \
    "ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:" + \
    "!aNULL:!MD5:!DSS"


orig_util_HAS_SNI = util.HAS_SNI
orig_connection_ssl_wrap_socket = connection.ssl_wrap_socket


def inject_into_urllib3():
    'Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.'

    connection.ssl_wrap_socket = ssl_wrap_socket
    util.HAS_SNI = HAS_SNI


def extract_from_urllib3():
    'Undo monkey-patching by :func:`inject_into_urllib3`.'

    connection.ssl_wrap_socket = orig_connection_ssl_wrap_socket
    util.HAS_SNI = orig_util_HAS_SNI


### Note: This is a slightly bug-fixed version of same from ndg-httpsclient.
class SubjectAltName(BaseSubjectAltName):
    '''ASN.1 implementation for subjectAltNames support'''

    # There is no limit to how many SAN certificates a certificate may have,
    #   however this needs to have some limit so we'll set an arbitrarily high
    #   limit.
    sizeSpec = univ.SequenceOf.sizeSpec + \
        constraint.ValueSizeConstraint(1, 1024)


### Note: This is a slightly bug-fixed version of same from ndg-httpsclient.
def get_subj_alt_name(peer_cert):
    # Search through extensions
    dns_name = []
    if not SUBJ_ALT_NAME_SUPPORT:
        return dns_name

    general_names = SubjectAltName()
    for i in range(peer_cert.get_extension_count()):
        ext = peer_cert.get_extension(i)
        ext_name = ext.get_short_name()
        if ext_name != 'subjectAltName':
            continue

        # PyOpenSSL returns extension data in ASN.1 encoded form
        ext_dat = ext.get_data()
        decoded_dat = der_decoder.decode(ext_dat,
                                         asn1Spec=general_names)

        for name in decoded_dat:
            if not isinstance(name, SubjectAltName):
                continue
            for entry in range(len(name)):
                component = name.getComponentByPosition(entry)
                if component.getName() != 'dNSName':
                    continue
                dns_name.append(str(component.getComponent()))

    return dns_name


class fileobject(_fileobject):

    def _wait_for_sock(self):
        rd, wd, ed = select.select([self._sock], [], [],
                                   self._sock.gettimeout())
        if not rd:
            raise timeout()


    def read(self, size=-1):
        # Use max, disallow tiny reads in a loop as they are very inefficient.
        # We never leave read() with any leftover data from a new recv() call
        # in our internal buffer.
        rbufsize = max(self._rbufsize, self.default_bufsize)
        # Our use of StringIO rather than lists of string objects returned by
        # recv() minimizes memory usage and fragmentation that occurs when
        # rbufsize is large compared to the typical return value of recv().
        buf = self._rbuf
        buf.seek(0, 2)  # seek end
        if size < 0:
            # Read until EOF
            self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
            while True:
                try:
                    data = self._sock.recv(rbufsize)
                except OpenSSL.SSL.WantReadError:
                    self._wait_for_sock()
                    continue
                if not data:
                    break
                buf.write(data)
            return buf.getvalue()
        else:
            # Read until size bytes or EOF seen, whichever comes first
            buf_len = buf.tell()
            if buf_len >= size:
                # Already have size bytes in our buffer?  Extract and return.
                buf.seek(0)
                rv = buf.read(size)
                self._rbuf = StringIO()
                self._rbuf.write(buf.read())
                return rv

            self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
            while True:
                left = size - buf_len
                # recv() will malloc the amount of memory given as its
                # parameter even though it often returns much less data
                # than that.  The returned data string is short lived
                # as we copy it into a StringIO and free it.  This avoids
                # fragmentation issues on many platforms.
                try:
                    data = self._sock.recv(left)
                except OpenSSL.SSL.WantReadError:
                    self._wait_for_sock()
                    continue
                if not data:
                    break
                n = len(data)
                if n == size and not buf_len:
                    # Shortcut.  Avoid buffer data copies when:
                    # - We have no data in our buffer.
                    # AND
                    # - Our call to recv returned exactly the
                    #   number of bytes we were asked to read.
                    return data
                if n == left:
                    buf.write(data)
                    del data  # explicit free
                    break
                assert n <= left, "recv(%d) returned %d bytes" % (left, n)
                buf.write(data)
                buf_len += n
                del data  # explicit free
                #assert buf_len == buf.tell()
            return buf.getvalue()

    def readline(self, size=-1):
        buf = self._rbuf
        buf.seek(0, 2)  # seek end
        if buf.tell() > 0:
            # check if we already have it in our buffer
            buf.seek(0)
            bline = buf.readline(size)
            if bline.endswith('\n') or len(bline) == size:
                self._rbuf = StringIO()
                self._rbuf.write(buf.read())
                return bline
            del bline
        if size < 0:
            # Read until \n or EOF, whichever comes first
            if self._rbufsize <= 1:
                # Speed up unbuffered case
                buf.seek(0)
                buffers = [buf.read()]
                self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
                data = None
                recv = self._sock.recv
                while True:
                    try:
                        while data != "\n":
                            data = recv(1)
                            if not data:
                                break
                            buffers.append(data)
                    except OpenSSL.SSL.WantReadError:
                        self._wait_for_sock()
                        continue
                    break
                return "".join(buffers)

            buf.seek(0, 2)  # seek end
            self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
            while True:
                try:
                    data = self._sock.recv(self._rbufsize)
                except OpenSSL.SSL.WantReadError:
                    self._wait_for_sock()
                    continue
                if not data:
                    break
                nl = data.find('\n')
                if nl >= 0:
                    nl += 1
                    buf.write(data[:nl])
                    self._rbuf.write(data[nl:])
                    del data
                    break
                buf.write(data)
            return buf.getvalue()
        else:
            # Read until size bytes or \n or EOF seen, whichever comes first
            buf.seek(0, 2)  # seek end
            buf_len = buf.tell()
            if buf_len >= size:
                buf.seek(0)
                rv = buf.read(size)
                self._rbuf = StringIO()
                self._rbuf.write(buf.read())
                return rv
            self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
            while True:
                try:
                    data = self._sock.recv(self._rbufsize)
                except OpenSSL.SSL.WantReadError:
                    self._wait_for_sock()
                    continue
                if not data:
                    break
                left = size - buf_len
                # did we just receive a newline?
                nl = data.find('\n', 0, left)
                if nl >= 0:
                    nl += 1
                    # save the excess data to _rbuf
                    self._rbuf.write(data[nl:])
                    if buf_len:
                        buf.write(data[:nl])
                        break
                    else:
                        # Shortcut.  Avoid data copy through buf when returning
                        # a substring of our first recv().
                        return data[:nl]
                n = len(data)
                if n == size and not buf_len:
                    # Shortcut.  Avoid data copy through buf when
                    # returning exactly all of our first recv().
                    return data
                if n >= left:
                    buf.write(data[:left])
                    self._rbuf.write(data[left:])
                    break
                buf.write(data)
                buf_len += n
                #assert buf_len == buf.tell()
            return buf.getvalue()


class WrappedSocket(object):
    '''API-compatibility wrapper for Python OpenSSL's Connection-class.'''

    def __init__(self, connection, socket):
        self.connection = connection
        self.socket = socket

    def fileno(self):
        return self.socket.fileno()

    def makefile(self, mode, bufsize=-1):
        return fileobject(self.connection, mode, bufsize)

    def settimeout(self, timeout):
        return self.socket.settimeout(timeout)

    def sendall(self, data):
        return self.connection.sendall(data)

    def close(self):
        return self.connection.shutdown()

    def getpeercert(self, binary_form=False):
        x509 = self.connection.get_peer_certificate()

        if not x509:
            return x509

        if binary_form:
            return OpenSSL.crypto.dump_certificate(
                OpenSSL.crypto.FILETYPE_ASN1,
                x509)

        return {
            'subject': (
                (('commonName', x509.get_subject().CN),),
            ),
            'subjectAltName': [
                ('DNS', value)
                for value in get_subj_alt_name(x509)
            ]
        }


def _verify_callback(cnx, x509, err_no, err_depth, return_code):
    return err_no == 0


def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None,
                    ca_certs=None, server_hostname=None,
                    ssl_version=None):
    ctx = OpenSSL.SSL.Context(_openssl_versions[ssl_version])
    if certfile:
        ctx.use_certificate_file(certfile)
    if keyfile:
        ctx.use_privatekey_file(keyfile)
    if cert_reqs != ssl.CERT_NONE:
        ctx.set_verify(_openssl_verify[cert_reqs], _verify_callback)
    if ca_certs:
        try:
            ctx.load_verify_locations(ca_certs, None)
        except OpenSSL.SSL.Error as e:
            raise ssl.SSLError('bad ca_certs: %r' % ca_certs, e)
    else:
        ctx.set_default_verify_paths()

    # Disable TLS compression to migitate CRIME attack (issue #309)
    OP_NO_COMPRESSION = 0x20000
    ctx.set_options(OP_NO_COMPRESSION)

    # Set list of supported ciphersuites.
    ctx.set_cipher_list(DEFAULT_SSL_CIPHER_LIST)

    cnx = OpenSSL.SSL.Connection(ctx, sock)
    cnx.set_tlsext_host_name(server_hostname)
    cnx.set_connect_state()
    while True:
        try:
            cnx.do_handshake()
        except OpenSSL.SSL.WantReadError:
            select.select([sock], [], [])
            continue
        except OpenSSL.SSL.Error as e:
            raise ssl.SSLError('bad handshake', e)
        break

    return WrappedSocket(cnx, sock)
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py000064400000000000151733566750024043 0ustar00site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/_collections.cpython-33.pyc000064400000026733151733566750027550 0ustar00python3.3�
7�Re�c@s�ddlmZmZyddlmZWn%ek
rQGdd�d�ZYnXyddlmZWn"ek
r�ddlmZYnXddlm	Z	dd	gZ
e�ZGd
d�de�Z
Gdd	�d	e�ZdS(
i(uMappinguMutableMapping(uRLockcBs,|EeZdZdd�Zdd�ZdS(uRLockcCsdS(N((uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu	__enter__suRLock.__enter__cCsdS(N((uselfuexc_typeu	exc_valueu	traceback((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__exit__suRLock.__exit__N(u__name__u
__module__u__qualname__u	__enter__u__exit__(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyuRLocksuRLock(uOrderedDicti(u
itervaluesuRecentlyUsedContaineruHTTPHeaderDictcBs�|EeZdZdZeZdddd�Zdd�Zdd�Z	d	d
�Z
dd�Zd
d�Zdd�Z
dd�ZdS(uRecentlyUsedContaineru�
    Provides a thread-safe dict-like container which maintains up to
    ``maxsize`` keys while throwing away the least-recently-used keys beyond
    ``maxsize``.

    :param maxsize:
        Maximum number of recent elements to retain.

    :param dispose_func:
        Every time an item is evicted from the container,
        ``dispose_func(value)`` is called.  Callback which will get called
    i
cCs1||_||_|j�|_t�|_dS(N(u_maxsizeudispose_funcuContainerClsu
_containeruRLockulock(uselfumaxsizeudispose_func((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__init__0s		uRecentlyUsedContainer.__init__c
Cs7|j�(|jj|�}||j|<|SWdQXdS(N(ulocku
_containerupop(uselfukeyuitem((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__getitem__7s

u!RecentlyUsedContainer.__getitem__c
Cs�t}|j�]|jj|t�}||j|<t|j�|jkrh|jjdd�\}}nWdQX|jr�|tk	r�|j|�ndS(NulastF(	u_Nullulocku
_containerugetulenu_maxsizeupopitemuFalseudispose_func(uselfukeyuvalueu
evicted_valueu_key((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__setitem__>s

$u!RecentlyUsedContainer.__setitem__c	Cs?|j�|jj|�}WdQX|jr;|j|�ndS(N(ulocku
_containerupopudispose_func(uselfukeyuvalue((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__delitem__Ms
	u!RecentlyUsedContainer.__delitem__c	Cs!|j�t|j�SWdQXdS(N(ulockulenu
_container(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__len__Ts
uRecentlyUsedContainer.__len__cCstd��dS(Nu7Iteration over this class is unlikely to be threadsafe.(uNotImplementedError(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__iter__XsuRecentlyUsedContainer.__iter__c	Cs`|j�'t|jj��}|jj�WdQX|jr\x|D]}|j|�qBWndS(N(ulockulistu
_containeruvaluesuclearudispose_func(uselfuvaluesuvalue((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyuclear[s
	
uRecentlyUsedContainer.clearcCs!|j�|jj�SWdQXdS(N(ulocku
_containerukeys(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyukeysfs
uRecentlyUsedContainer.keysN(u__name__u
__module__u__qualname__u__doc__uOrderedDictuContainerClsuNoneu__init__u__getitem__u__setitem__u__delitem__u__len__u__iter__uclearukeys(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyuRecentlyUsedContainer scBs�|EeZdZdZddd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS(uHTTPHeaderDictuZ
    :param headers:
        An iterable of field-value pairs. Must not contain multiple field names
        when compared case-insensitively.

    :param kwargs:
        Additional field-value pairs to pass in to ``dict.update``.

    A ``dict`` like container for storing HTTP Headers.

    Field names are stored and compared case-insensitively in compliance with
    RFC 2616. Iteration provides the first case-sensitive key seen for each
    case-insensitive pair.

    Using ``__setitem__`` syntax overwrites fields that compare equal
    case-insensitively in order to maintain ``dict``'s api. For fields that
    compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
    in a loop.

    If multiple fields that are equal case-insensitively are passed to the
    constructor or ``.update``, the behavior is undefined and some will be
    lost.

    >>> headers = HTTPHeaderDict()
    >>> headers.add('Set-Cookie', 'foo=bar')
    >>> headers.add('set-cookie', 'baz=quxx')
    >>> headers['content-length'] = '7'
    >>> headers['SET-cookie']
    'foo=bar, baz=quxx'
    >>> headers['Content-Length']
    '7'

    If you want to access the raw headers with their original casing
    for debugging purposes you can access the private ``._data`` attribute
    which is a normal python ``dict`` that maps the case-insensitive key to a
    list of tuples stored as (case-sensitive-original-name, value). Using the
    structure from above as our example:

    >>> headers._data
    {'set-cookie': [('Set-Cookie', 'foo=bar'), ('set-cookie', 'baz=quxx')],
    'content-length': [('content-length', '7')]}
    cKs2i|_|dkri}n|j||�dS(N(u_datauNoneuupdate(uselfuheadersukwargs((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__init__�s		uHTTPHeaderDict.__init__cCs,|jj|j�g�j||f�dS(u�Adds a (name, value) pair, doesn't overwrite the value if it already
        exists.

        >>> headers = HTTPHeaderDict(foo='bar')
        >>> headers.add('Foo', 'baz')
        >>> headers['foo']
        'bar, baz'
        N(u_datau
setdefaultuloweruappend(uselfukeyuvalue((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyuadd�s	uHTTPHeaderDict.addcCs!||kr||jd�SgS(umReturns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist.u, (usplit(uselfukey((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyugetlist�suHTTPHeaderDict.getlistcCsOt�}x?|jD]4}x+|j|D]\}}|j||�q'WqW|S(N(uHTTPHeaderDictu_datauadd(uselfuhukeyurawkeyuvalue((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyucopy�s
	uHTTPHeaderDict.copycsat�t�sdSt���t�fdd��jD��t�fdd��jD��kS(Nc3s|]}|�|fVqdS(N((u.0uk1(uself(uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu	<genexpr>�su(HTTPHeaderDict.__eq__.<locals>.<genexpr>c3s|]}|�|fVqdS(N((u.0uk2(uother(uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu	<genexpr>�sF(u
isinstanceuMappinguFalseuHTTPHeaderDictudictu_data(uselfuother((uotheruselfuK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__eq__�s
uHTTPHeaderDict.__eq__cCs-|j|j�}djdd�|D��S(Nu, css|]}|dVqdS(iN((u.0uvalue((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu	<genexpr>�su-HTTPHeaderDict.__getitem__.<locals>.<genexpr>(u_dataulowerujoin(uselfukeyuvalues((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__getitem__�suHTTPHeaderDict.__getitem__cCs ||fg|j|j�<dS(N(u_dataulower(uselfukeyuvalue((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__setitem__�suHTTPHeaderDict.__setitem__cCs|j|j�=dS(N(u_dataulower(uselfukey((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__delitem__�suHTTPHeaderDict.__delitem__cCs
t|j�S(N(ulenu_data(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__len__�suHTTPHeaderDict.__len__ccs+x$t|j�D]}|ddVqWdS(Ni(u
itervaluesu_data(uselfuheaders((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__iter__�suHTTPHeaderDict.__iter__cCs d|jjt|j��fS(Nu%s(%r)(u	__class__u__name__udictuitems(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu__repr__�suHTTPHeaderDict.__repr__N(u__name__u
__module__u__qualname__u__doc__uNoneu__init__uaddugetlistucopyu__eq__u__getitem__u__setitem__u__delitem__u__len__u__iter__u__repr__(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyuHTTPHeaderDictks*N(ucollectionsuMappinguMutableMappingu	threadinguRLockuImportErroruOrderedDictupackages.ordered_dictupackages.sixu
itervaluesu__all__uobjectu_NulluRecentlyUsedContaineruHTTPHeaderDict(((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/_collections.pyu<module>s

	Kpython3.3/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/request.cpython-33.pyc000064400000014660151733566750026636 0ustar00�
7�Re�c@slyddlmZWn"ek
r8ddlmZYnXddlmZdgZGdd�de�ZdS(i(u	urlencodei(uencode_multipart_formdatauRequestMethodscBs�|EeZdZdZeddddg�Zddd�Zdddddd	�Z	ddd
d�Z
ddd
�Zdddddd�ZdS(uRequestMethodsu�
    Convenience mixin for classes who implement a :meth:`urlopen` method, such
    as :class:`~urllib3.connectionpool.HTTPConnectionPool` and
    :class:`~urllib3.poolmanager.PoolManager`.

    Provides behavior for making common types of HTTP request methods and
    decides which type of request field encoding to use.

    Specifically,

    :meth:`.request_encode_url` is for sending requests whose fields are encoded
    in the URL (such as GET, HEAD, DELETE).

    :meth:`.request_encode_body` is for sending requests whose fields are
    encoded in the *body* of the request using multipart or www-form-urlencoded
    (such as for POST, PUT, PATCH).

    :meth:`.request` is for making any kind of request, it will look up the
    appropriate encoding format and use one of the above two methods to make
    the request.

    Initializer parameters:

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
    uDELETEuGETuHEADuOPTIONScCs|p	i|_dS(N(uheaders(uselfuheaders((uF/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/request.pyu__init__1suRequestMethods.__init__cKstd��dS(NuMClasses extending RequestMethods must implement their own ``urlopen`` method.(uNotImplemented(uselfumethoduurlubodyuheadersuencode_multipartumultipart_boundaryukw((uF/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/request.pyuurlopen4suRequestMethods.urlopencKs]|j�}||jkr:|j||d|d||�S|j||d|d||�SdS(u�
        Make a request using :meth:`urlopen` with the appropriate encoding of
        ``fields`` based on the ``method`` used.

        This is a convenience method that requires the least amount of manual
        effort. It can be used in most situations, while still having the option
        to drop down to more specific methods when necessary, such as
        :meth:`request_encode_url`, :meth:`request_encode_body`,
        or even the lowest level :meth:`urlopen`.
        ufieldsuheadersN(uupperu_encode_url_methodsurequest_encode_urlurequest_encode_body(uselfumethoduurlufieldsuheadersu
urlopen_kw((uF/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/request.pyurequest:suRequestMethods.requestcKs0|r|dt|�7}n|j|||�S(u�
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
        u?(u	urlencodeuurlopen(uselfumethoduurlufieldsu
urlopen_kw((uF/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/request.pyurequest_encode_urlPsu!RequestMethods.request_encode_urlc	Ks�|r't|pid|�\}}	nt|p3i�d}}	|dkrX|j}ni|	d6}
|
j|�|j||d|d|
|�S(u�
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the body. This is useful for request methods like POST, PUT, PATCH, etc.

        When ``encode_multipart=True`` (default), then
        :meth:`urllib3.filepost.encode_multipart_formdata` is used to encode the
        payload with the appropriate content type. Otherwise
        :meth:`urllib.urlencode` is used with the
        'application/x-www-form-urlencoded' content type.

        Multipart encoding must be used when posting files, and it's reasonably
        safe to use it in other times too. However, it may break request signing,
        such as with OAuth.

        Supports an optional ``fields`` parameter of key/value strings AND
        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
        the MIME type is optional. For example: ::

            fields = {
                'foo': 'bar',
                'fakefile': ('foofile.txt', 'contents of foofile'),
                'realfile': ('barfile.txt', open('realfile').read()),
                'typedfile': ('bazfile.bin', open('bazfile').read(),
                              'image/jpeg'),
                'nonamefile': 'contents of nonamefile field',
            }

        When uploading a file, providing a filename (the first parameter of the
        tuple) is optional but recommended to best mimick behavior of browsers.

        Note that if ``headers`` are supplied, the 'Content-Type' header will be
        overwritten because it depends on the dynamic random boundary string
        which is used to compose the body of the request. The random boundary
        string can be explicitly set with the ``multipart_boundary`` parameter.
        uboundaryu!application/x-www-form-urlencodeduContent-TypeubodyuheadersN(uencode_multipart_formdatau	urlencodeuNoneuheadersuupdateuurlopen(uselfumethoduurlufieldsuheadersuencode_multipartumultipart_boundaryu
urlopen_kwubodyucontent_typeuheaders_((uF/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/request.pyurequest_encode_bodyYs&


u"RequestMethods.request_encode_bodyNT(
u__name__u
__module__u__qualname__u__doc__usetu_encode_url_methodsuNoneu__init__uTrueuurlopenurequesturequest_encode_urlurequest_encode_body(u
__locals__((uF/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/request.pyuRequestMethodss	N(	uurllib.parseu	urlencodeuImportErroruurllibufilepostuencode_multipart_formdatau__all__uobjectuRequestMethods(((uF/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/request.pyu<module>s
	python3.3/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/connection.cpython-33.pyc000064400000020013151733566750027272 0ustar00�
7�Re�c@s�ddlZddlZddlmZyddlmZmZWn(ek
rlddl	mZmZYnXGdd�de
�ZytdZ
eZGdd�de�ZyddlmZWn"ek
r�ddl	mZYnXddl
Z
e
jZWneefk
rYnXd	d
lmZd	dlmZd	dlmZd	d
lmZmZmZmZidd6dd6ZGdd�dee
�ZGdd�de�ZGdd�de�Z e
r�eZ!e ZndS(iN(utimeout(uHTTPConnectionu
HTTPExceptioncBs|EeZdZdZdS(uDummyConnectionu-Used to detect a failed ConnectionCls import.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuDummyConnectionsuDummyConnectioncBs|EeZdZdS(uBaseSSLErrorN(u__name__u
__module__u__qualname__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuBaseSSLErrorsuBaseSSLError(uHTTPSConnectioni(uConnectTimeoutError(umatch_hostname(usix(uassert_fingerprinturesolve_cert_reqsuresolve_ssl_versionussl_wrap_socketiPuhttpi�uhttpscBsZ|EeZdZdZedZdZdd�Zdd�Zdd	�Z	d
d�Z
dS(
uHTTPConnectionu�
    Based on httplib.HTTPConnection but provides an extra constructor
    backwards-compatibility layer between older and newer Pythons.
    uhttpicOsgtjr|jdd�ntjdkr>|jdd�n|jd�|_tj	|||�dS(Nustrictiiusource_address(ii(
usixuPY3upopuNoneusysuversion_infougetusource_addressu_HTTPConnectionu__init__(uselfuargsukw((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyu__init__Ds	uHTTPConnection.__init__cCsfg}|jr"|j|j�ntj|j|jf|j|�}|jtjtj	|j
�|S(uq Establish a socket connection and set nodelay settings on it.

        :return: a new socket connection
        (usource_addressuappendusocketucreate_connectionuhostuportutimeoutu
setsockoptuIPPROTO_TCPuTCP_NODELAYutcp_nodelay(uselfu
extra_argsuconn((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyu	_new_connPs	uHTTPConnection._new_conncCs,||_t|dd�r(|j�ndS(Nu_tunnel_host(usockugetattruNoneu_tunnel(uselfuconn((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyu
_prepare_conn`s	uHTTPConnection._prepare_conncCs|j�}|j|�dS(N(u	_new_connu
_prepare_conn(uselfuconn((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuconnectisuHTTPConnection.connectN(u__name__u
__module__u__qualname__u__doc__uport_by_schemeudefault_portutcp_nodelayu__init__u	_new_connu
_prepare_connuconnect(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuHTTPConnection9s
	uHTTPConnectioncBsH|EeZdZedZddddejdd�Zdd�Z	dS(uHTTPSConnectionuhttpsc	KsAtj|||d|d||�||_||_d|_dS(Nustrictutimeoutuhttps(uHTTPConnectionu__init__ukey_fileu	cert_fileu	_protocol(uselfuhostuportukey_fileu	cert_fileustrictutimeoutukw((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyu__init__qs

		uHTTPSConnection.__init__cCs;|j�}|j|�tj||j|j�|_dS(N(u	_new_connu
_prepare_connussluwrap_socketukey_fileu	cert_fileusock(uselfuconn((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuconnect~s
uHTTPSConnection.connectN(
u__name__u
__module__u__qualname__uport_by_schemeudefault_portuNoneusocketu_GLOBAL_DEFAULT_TIMEOUTu__init__uconnect(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuHTTPSConnectionns
	uHTTPSConnectioncBs\|EeZdZdZdZdZdZiZdddddddd�Z	dd�Z
dS(uVerifiedHTTPSConnectionu[
    Based on httplib.HTTPSConnection but wraps the socket with
    SSL certification.
    cCs:||_||_||_||_||_||_dS(N(ukey_fileu	cert_fileu	cert_reqsuca_certsuassert_hostnameuassert_fingerprint(uselfukey_fileu	cert_fileu	cert_reqsuca_certsuassert_hostnameuassert_fingerprint((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuset_cert�s					u VerifiedHTTPSConnection.set_certcCs�y1tjd|j|jfd|j|j�}Wn1tk
rdt|d|j|jf��YnX|jtj	tj
|j�t|j
�}t|j�}|j}t|dd�r�||_|j�|j}nt||j|jd|d|jd|d|�|_|tjkr}|jrIt|jjd	d
�|j�q}|jdk	r}t |jj�|jps|�q}ndS(Nuaddressutimeoutu0Connection to %s timed out. (connect timeout=%s)u_tunnel_hostu	cert_reqsuca_certsuserver_hostnameussl_versionubinary_formTF(!usocketucreate_connectionuhostuportutimeoutuconn_kwu
SocketTimeoutuConnectTimeoutErroru
setsockoptuIPPROTO_TCPuTCP_NODELAYutcp_nodelayuresolve_cert_reqsu	cert_reqsuresolve_ssl_versionussl_versionugetattruNoneusocku_tunnelu_tunnel_hostussl_wrap_socketukey_fileu	cert_fileuca_certsusslu	CERT_NONEuassert_fingerprintugetpeercertuTrueuassert_hostnameuFalseumatch_hostname(uselfusockuresolved_cert_reqsuresolved_ssl_versionuhostname((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuconnect�s:	

		
		
uVerifiedHTTPSConnection.connectN(u__name__u
__module__u__qualname__u__doc__uNoneu	cert_reqsuca_certsussl_versionuconn_kwuset_certuconnect(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyuVerifiedHTTPSConnection�s	uVerifiedHTTPSConnection("usysusocketutimeoutu
SocketTimeoutuhttp.clientuHTTPConnectionu_HTTPConnectionu
HTTPExceptionuImportErroruhttplibuobjectuDummyConnectionuNoneussluHTTPSConnectionu
BaseExceptionuBaseSSLErroru_HTTPSConnectionuSSLErroruAttributeErroru
exceptionsuConnectTimeoutErrorupackages.ssl_match_hostnameumatch_hostnameupackagesusixuutiluassert_fingerprinturesolve_cert_reqsuresolve_ssl_versionussl_wrap_socketuport_by_schemeuVerifiedHTTPSConnectionuUnverifiedHTTPSConnection(((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connection.pyu<module>s@


"
5Epython3.3/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/response.cpython-33.pyc000064400000030760151733566750027003 0ustar00�
7�Rek(c@s�ddlZddlZddlZddlmZddlmZddlmZ	m
Z
ddlmZej
e�ZGdd�de�Zd	d
�ZGdd�dej�ZdS(
iNi(uHTTPHeaderDict(uDecodeError(ustring_typesubinary_type(uis_fp_closedcBs8|EeZdZdd�Zdd�Zdd�ZdS(uDeflateDecodercCs(d|_t�|_tj�|_dS(NT(uTrueu
_first_tryubinary_typeu_datauzlibu
decompressobju_obj(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyu__init__s	uDeflateDecoder.__init__cCst|j|�S(N(ugetattru_obj(uselfuname((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyu__getattr__suDeflateDecoder.__getattr__cCs�|js|jj|�S|j|7_y|jj|�SWnUtjk
r�d|_tjtj�|_z|j|j�SWdd|_XYnXdS(NF(
u
_first_tryu_obju
decompressu_datauzlibuerroruFalseu
decompressobju	MAX_WBITSuNone(uselfudata((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyu
decompresss		uDeflateDecoder.decompressN(u__name__u
__module__u__qualname__u__init__u__getattr__u
decompress(u
__locals__((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyuDeflateDecodersuDeflateDecodercCs'|dkr tjdtj�St�S(Nugzipi(uzlibu
decompressobju	MAX_WBITSuDeflateDecoder(umode((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyu_get_decoder/su_get_decoderc
Bs4|EeZdZdZddgZdddddgZd	d+d
d
d+d
d,d,d+d+d+dd�Zd
d�Z	dd�Z
edd��Zdd�Z
d+d+d-dd�Zd.d+dd�Zedd��Zdd�Zd+dd �Zd!d"�Zed#d$��Zd%d&�Zd'd(�Zd)d*�Zd+S(/uHTTPResponseu
    HTTP Response container.

    Backwards-compatible to httplib's HTTPResponse but the response ``body`` is
    loaded and decoded on-demand when the ``data`` property is accessed.

    Extra parameters for behaviour not present in httplib.HTTPResponse:

    :param preload_content:
        If True, the response's body will be preloaded during construction.

    :param decode_content:
        If True, attempts to decode specific content-encoding's based on headers
        (like 'gzip' and 'deflate') will be skipped and raw data will be used
        instead.

    :param original_response:
        When this HTTPResponse wrapper is generated from an httplib.HTTPResponse
        object, it's convenient to include the original for debug purposes. It's
        otherwise unused.
    ugzipudeflatei-i.i/i3i4uicCs�t�|_|r%|jj|�n||_||_||_||_||_d|_	|rvt
|t�rv|nd|_d|_
|	|_d|_|
|_||_t|d�r�||_
n|r�|jr�|jd|�|_ndS(Niureadudecode_content(uHTTPHeaderDictuheadersuupdateustatusuversionureasonustrictudecode_contentuNoneu_decoderu
isinstanceu
basestringu_bodyu_fpu_original_responseu_fp_bytes_readu_poolu_connectionuhasattruread(uselfubodyuheadersustatusuversionureasonustrictupreload_contentudecode_contentuoriginal_responseupoolu
connection((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyu__init__Ps&						$					uHTTPResponse.__init__cCs&|j|jkr"|jjd�SdS(u
        Should we redirect and where to?

        :returns: Truthy redirect location string if we got a redirect status
            code and valid location. ``None`` if redirect status and no
            location. ``False`` if not a redirect status code.
        ulocationF(ustatusuREDIRECT_STATUSESuheadersugetuFalse(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyuget_redirect_locationlsu"HTTPResponse.get_redirect_locationcCs8|js|jrdS|jj|j�d|_dS(N(u_poolu_connectionu	_put_connuNone(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyurelease_connysuHTTPResponse.release_conncCs-|jr|jS|jr)|jdd�SdS(Nu
cache_contentT(u_bodyu_fpureaduTrue(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyudata�s		uHTTPResponse.datacCs|jS(u�
        Obtain the number of bytes pulled over the wire so far. May differ from
        the amount of content returned by :meth:``HTTPResponse.read`` if bytes
        are encoded on the wire (e.g, compressed).
        (u_fp_bytes_read(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyutell�suHTTPResponse.tellc	Cs�|jjdd�j�}|jdkrN||jkrNt|�|_qNn|dkrf|j}n|jdkrydSd}zD|dkr�|jj
�}d}nAd}|jj
|�}|dkr�|r�|jj�d}n|j
t|�7_
y(|r#|jr#|jj|�}nWnAttjfk
rg}ztd||��WYdd}~XnX|r�|r�|jr�|jjt��}|||jj�7}n|r�||_n|SWd|jr�|jj�r�|j�nXdS(uP
        Similar to :meth:`httplib.HTTPResponse.read`, but with two additional
        parameters: ``decode_content`` and ``cache_content``.

        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the ``.data`` property to continue working
            after having ``.read()`` the file object. (Overridden if ``amt`` is
            set.)
        ucontent-encodinguNiuEReceived response with content-encoding: %s, but failed to decode it.FT(uheadersugetuloweru_decoderuNoneuCONTENT_DECODERSu_get_decoderudecode_contentu_fpuFalseureaduTrueucloseu_fp_bytes_readulenu
decompressuIOErroruzlibuerroruDecodeErrorubinary_typeuflushu_bodyu_original_responseuisclosedurelease_conn(	uselfuamtudecode_contentu
cache_contentucontent_encodingu
flush_decoderudataueubuf((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyuread�sF	
	uHTTPResponse.readiiccs@x9t|j�s;|jd|d|�}|r|VqqWdS(u_
        A generator wrapper for the read() method. A call will block until
        ``amt`` bytes have been read from the connection or until the
        connection is closed.

        :param amt:
            How much of the content to read. The generator will return up to
            much data per iteration, but may return less. This is particularly
            likely when using compressed data. However, the empty string will
            never be returned.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
        uamtudecode_contentN(uis_fp_closedu_fpuread(uselfuamtudecode_contentudata((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyustream�suHTTPResponse.streamcKs�t�}x*|j�D]\}}|j||�qWt|dd�}|d|d|d|jd|jd|jd|d||�S(	u
        Given an :class:`httplib.HTTPResponse` instance ``r``, return a
        corresponding :class:`urllib3.response.HTTPResponse` object.

        Remaining parameters are passed to the HTTPResponse constructor, along
        with ``original_response=r``.
        ustrictiubodyuheadersustatusuversionureasonuoriginal_response(uHTTPHeaderDictu
getheadersuaddugetattrustatusuversionureason(uResponseClsururesponse_kwuheadersukuvustrict((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyufrom_httplib�s
				uHTTPResponse.from_httplibcCs|jS(N(uheaders(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyu
getheaderssuHTTPResponse.getheaderscCs|jj||�S(N(uheadersuget(uselfunameudefault((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyu	getheadersuHTTPResponse.getheadercCs|js|jj�ndS(N(uclosedu_fpuclose(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyucloses	uHTTPResponse.closecCsV|jdkrdSt|jd�r/|jjSt|jd�rN|jj�SdSdS(NucloseduisclosedT(u_fpuNoneuTrueuhasattrucloseduisclosed(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyucloseds

uHTTPResponse.closedcCsM|jdkrtd��n+t|jd�r=|jj�Std��dS(Nu-HTTPResponse has no file to get a fileno fromufilenouPThe file-like object  this HTTPResponse is wrapped around has no file descriptor(u_fpuNoneuIOErroruhasattrufileno(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyufileno&s

uHTTPResponse.filenocCs2|jdk	r.t|jd�r.|jj�SdS(Nuflush(u_fpuNoneuhasattruflush(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyuflush/s!uHTTPResponse.flushcCsdS(NT(uTrue(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyureadable3suHTTPResponse.readableNTFi(u__name__u
__module__u__qualname__u__doc__uCONTENT_DECODERSuREDIRECT_STATUSESuNoneuTrueu__init__uget_redirect_locationurelease_connupropertyudatautelluFalseureadustreamuclassmethodufrom_httplibu
getheadersu	getheaderucloseuclosedufilenouflushureadable(u
__locals__((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyuHTTPResponse6s(	
	N	uHTTPResponse(ulogginguzlibuiou_collectionsuHTTPHeaderDictu
exceptionsuDecodeErrorupackages.sixustring_typesu
basestringubinary_typeuutiluis_fp_closedu	getLoggeru__name__uloguobjectuDeflateDecoderu_get_decoderuIOBaseuHTTPResponse(((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/response.pyu<module>spython3.3/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/fields.cpython-33.pyc000064400000016634151733566750026417 0ustar00�
7�ReXc@s]ddlZddlZddlmZddd�Zdd�ZGd	d
�d
e�ZdS(iNi(usixuapplication/octet-streamcCs!|rtj|�dp|S|S(u�
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    i(u	mimetypesu
guess_type(ufilenameudefault((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyuguess_content_type
s	uguess_content_typecs�t�fdd�dD��s\d|�f}y|jd�Wntk
rTYq\X|Sntjsw�jd��ntjj�d��d|�f��S(u�
    Helper function to format and quote a single header parameter.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows RFC 2231, as
    suggested by RFC 2388 Section 4.4.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as a unicode string.
    c3s|]}|�kVqdS(N((u.0uch(uvalue(uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyu	<genexpr>(su&format_header_param.<locals>.<genexpr>u"\
u%s="%s"uasciiuutf-8u%s*=%s(uanyuencodeuUnicodeEncodeErrorusixuPY3uemailuutilsuencode_rfc2231(unameuvalueuresult((uvalueuE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyuformat_header_params

	uformat_header_paramcBsw|EeZdZdZdddd�Zedd��Zdd�Zdd	�Z	d
d�Z
ddddd
�ZdS(uRequestFielduK
    A data container for request body parameters.

    :param name:
        The name of this request field.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field.
    :param headers:
        An optional dict-like object of headers to initially use for the field.
    cCs@||_||_||_i|_|r<t|�|_ndS(N(u_nameu	_filenameudatauheadersudict(uselfunameudataufilenameuheaders((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyu__init__Ds				uRequestField.__init__cCs�t|t�rNt|�dkr3|\}}}q`|\}}t|�}nd}d}|}|||d|�}|jd|�|S(u�
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from parameter
        of key/value strings AND key/filetuple. A filetuple is a (filename, data, MIME type)
        tuple where the MIME type is optional. For example: ::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        iufilenameucontent_typeN(u
isinstanceutupleulenuguess_content_typeuNoneumake_multipart(uclsu	fieldnameuvalueufilenameudataucontent_typeu
request_param((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyufrom_tuplesLsuRequestField.from_tuplescCs
t||�S(u
        Overridable helper function to format a single header parameter.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        (uformat_header_param(uselfunameuvalue((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyu_render_partms	uRequestField._render_partcCspg}|}t|t�r*|j�}nx6|D].\}}|r1|j|j||��q1q1Wdj|�S(uO
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) typles or a :class:`dict` of (k, v) to format as
            `k1="v1"; k2="v2"; ...`.
        u; (u
isinstanceudictuitemsuappendu_render_partujoin(uselfuheader_partsupartsuiterableunameuvalue((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyu
_render_partsxs uRequestField._render_partscCs�g}dddg}xD|D]<}|jj|d�r|jd||j|f�qqWxL|jj�D];\}}||krl|r�|jd||f�q�qlqlW|jd�dj|�S(u=
        Renders the headers for this request field.
        uContent-DispositionuContent-TypeuContent-Locationu%s: %su
F(uheadersugetuFalseuappenduitemsujoin(uselfulinesu	sort_keysusort_keyuheader_nameuheader_value((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyurender_headers�s
%!
uRequestField.render_headersc
Csr|p	d|jd<|jddjd|jd|jfd|jff�g�7<||jd<||jd<d	S(
u|
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        u	form-datauContent-Dispositionu; uunameufilenameuContent-TypeuContent-LocationN(uheadersujoinu
_render_partsu_nameu	_filename(uselfucontent_dispositionucontent_typeucontent_location((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyumake_multipart�s
A
uRequestField.make_multipartN(u__name__u
__module__u__qualname__u__doc__uNoneu__init__uclassmethodufrom_tuplesu_render_partu
_render_partsurender_headersumake_multipart(u
__locals__((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyuRequestField7s!uRequestField(	uemail.utilsuemailu	mimetypesupackagesusixuguess_content_typeuformat_header_paramuobjectuRequestField(((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/fields.pyu<module>s
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/__init__.cpython-33.pyc000064400000004756151733566750026712 0ustar00�
7�Re�c@sdZdZdZdZddlmZmZmZddlm	Z	ddl
mZddlm
Z
mZmZdd	lmZdd
lmZmZmZddlZydd
lmZWn+ek
r�Gdd�dej�ZYnXeje�je��ejdd�Z[dS(u8
urllib3 - Thread-safe connection pooling and re-using.
u(Andrey Petrov (andrey.petrov@shazow.net)uMITudevi(uHTTPConnectionPooluHTTPSConnectionPooluconnection_from_url(u
exceptions(uencode_multipart_formdata(uPoolManageruProxyManageruproxy_from_url(uHTTPResponse(umake_headersuget_hostuTimeoutiN(uNullHandlercBs |EeZdZdd�ZdS(uNullHandlercCsdS(N((uselfurecord((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/__init__.pyuemit#suNullHandler.emitN(u__name__u
__module__u__qualname__uemit(u
__locals__((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/__init__.pyuNullHandler"suNullHandlercCs`tjt�}tj�}|jtjd��|j|�|j|�|jdt�|S(u�
    Helper for quickly adding a StreamHandler to the logger. Useful for
    debugging.

    Returns the handler after adding it.
    u%%(asctime)s %(levelname)s %(message)su-Added an stderr logging handler to logger: %s(	uloggingu	getLoggeru__name__u
StreamHandlerusetFormatteru	Formatteru
addHandlerusetLeveludebug(uleveluloggeruhandler((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/__init__.pyuadd_stderr_logger(s	

uadd_stderr_logger(u__doc__u
__author__u__license__u__version__uconnectionpooluHTTPConnectionPooluHTTPSConnectionPooluconnection_from_urluu
exceptionsufilepostuencode_multipart_formdataupoolmanageruPoolManageruProxyManageruproxy_from_urluresponseuHTTPResponseuutilumake_headersuget_hostuTimeoutulogginguNullHandleruImportErroruHandleru	getLoggeru__name__u
addHandleruDEBUGuadd_stderr_logger(((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/__init__.pyu<module>	s"
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/exceptions.cpython-33.pyc000064400000021703151733566750027323 0ustar00�
7�Re$
c@sjGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�dee�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�dee�Zd S(!cBs|EeZdZdZdS(u	HTTPErroru#Base exception used by this module.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu	HTTPError
su	HTTPErrorcBs2|EeZdZdZdd�Zdd�ZdS(u	PoolErroru/Base exception for errors caused within a pool.cCs'||_tj|d||f�dS(Nu%s: %s(upoolu	HTTPErroru__init__(uselfupoolumessage((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu__init__s	uPoolError.__init__cCs
|jdfS(N(NN(u	__class__uNone(uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu
__reduce__suPoolError.__reduce__N(u__name__u
__module__u__qualname__u__doc__u__init__u
__reduce__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu	PoolErrorsu	PoolErrorcBs2|EeZdZdZdd�Zdd�ZdS(uRequestErroru8Base exception for PoolErrors that have associated URLs.cCs ||_tj|||�dS(N(uurlu	PoolErroru__init__(uselfupooluurlumessage((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu__init__s	uRequestError.__init__cCs|jd|jdffS(N(u	__class__uNoneuurl(uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu
__reduce__ suRequestError.__reduce__N(u__name__u
__module__u__qualname__u__doc__u__init__u
__reduce__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuRequestErrorsuRequestErrorcBs|EeZdZdZdS(uSSLErroru9Raised when SSL certificate fails in an HTTPS connection.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuSSLError%suSSLErrorcBs|EeZdZdZdS(u
ProxyErroru,Raised when the connection to a proxy fails.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu
ProxyError*su
ProxyErrorcBs|EeZdZdZdS(uConnectionErroru&Raised when a normal connection fails.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuConnectionError/suConnectionErrorcBs|EeZdZdZdS(uDecodeErroru;Raised when automatic decoding based on Content-Type fails.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuDecodeError4suDecodeErrorcBs)|EeZdZdZddd�ZdS(u
MaxRetryErroru6Raised when the maximum number of retries is exceeded.cCsZ||_d|}|r6|dt|�|f7}n
|d7}tj||||�dS(Nu!Max retries exceeded with url: %su (Caused by %s: %s)u (Caused by redirect)(ureasonutypeuRequestErroru__init__(uselfupooluurlureasonumessage((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu__init__>s	

uMaxRetryError.__init__N(u__name__u
__module__u__qualname__u__doc__uNoneu__init__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu
MaxRetryError;su
MaxRetryErrorcBs)|EeZdZdZddd�ZdS(uHostChangedErroru?Raised when an existing pool gets a request for a foreign host.icCs-d|}tj||||�||_dS(Nu)Tried to open a foreign host with url: %s(uRequestErroru__init__uretries(uselfupooluurluretriesumessage((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu__init__Ms
uHostChangedError.__init__N(u__name__u
__module__u__qualname__u__doc__u__init__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuHostChangedErrorJsuHostChangedErrorcBs|EeZdZdZdS(uTimeoutStateErroru3 Raised when passing an invalid state to a timeout N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuTimeoutStateErrorSsuTimeoutStateErrorcBs|EeZdZdZdS(uTimeoutErroru� Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuTimeoutErrorXsuTimeoutErrorcBs|EeZdZdZdS(uReadTimeoutErroruFRaised when a socket timeout occurs while receiving data from a serverN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuReadTimeoutErrorasuReadTimeoutErrorcBs|EeZdZdZdS(uConnectTimeoutErroru@Raised when a socket timeout occurs while connecting to a serverN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuConnectTimeoutErrorhsuConnectTimeoutErrorcBs|EeZdZdZdS(uEmptyPoolErroruCRaised when a pool runs out of connections and no more are allowed.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuEmptyPoolErrormsuEmptyPoolErrorcBs|EeZdZdZdS(uClosedPoolErroruCRaised when a request enters a pool after the pool has been closed.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuClosedPoolErrorrsuClosedPoolErrorcBs&|EeZdZdZdd�ZdS(uLocationParseErroru=Raised when get_host or similar fails to parse the URL input.cCs'd|}tj||�||_dS(NuFailed to parse: %s(u	HTTPErroru__init__ulocation(uselfulocationumessage((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu__init__zs
uLocationParseError.__init__N(u__name__u
__module__u__qualname__u__doc__u__init__(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyuLocationParseErrorwsuLocationParseErrorN(u	Exceptionu	HTTPErroru	PoolErroruRequestErroruSSLErroru
ProxyErroruConnectionErroruDecodeErroru
MaxRetryErroruHostChangedErroruTimeoutStateErroruTimeoutErroruReadTimeoutErroruConnectTimeoutErroruEmptyPoolErroruClosedPoolErroru
ValueErroruLocationParseError(((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/exceptions.pyu<module>
s		python3.3/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/poolmanager.cpython-33.pyc000064400000025622151733566750027452 0ustar00�
7�Re#c
@sddlZyddlmZWn"ek
rDddlmZYnXddlmZddlmZm	Z	ddlm
Z
ddlmZddl
mZd	d
dgZied6e	d
6Zeje�ZdZGdd	�d	e�ZGdd
�d
e�Zdd�ZdS(iN(uurljoini(uRecentlyUsedContainer(uHTTPConnectionPooluHTTPSConnectionPool(uport_by_scheme(uRequestMethods(u	parse_urluPoolManageruProxyManageruproxy_from_urluhttpuhttpsukey_fileu	cert_fileu	cert_reqsuca_certsussl_versioncBsw|EeZdZdZdZdddd�Zdd�Zdd�Zdd	d
d�Z	dd
�Z
ddd�ZdS(uPoolManageru&
    Allows for arbitrary requests while transparently keeping track of
    necessary connection pools for you.

    :param num_pools:
        Number of connection pools to cache before discarding the least
        recently used pool.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param \**connection_pool_kw:
        Additional parameters are used to create fresh
        :class:`urllib3.connectionpool.ConnectionPool` instances.

    Example: ::

        >>> manager = PoolManager(num_pools=2)
        >>> r = manager.request('GET', 'http://google.com/')
        >>> r = manager.request('GET', 'http://google.com/mail')
        >>> r = manager.request('GET', 'http://yahoo.com/')
        >>> len(manager.pools)
        2

    i
cKs8tj||�||_t|ddd��|_dS(Nudispose_funccSs
|j�S(N(uclose(up((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyu<lambda>Esu&PoolManager.__init__.<locals>.<lambda>(uRequestMethodsu__init__uconnection_pool_kwuRecentlyUsedContainerupools(uselfu	num_poolsuheadersuconnection_pool_kw((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyu__init__As		uPoolManager.__init__cCsbt|}|j}|dkrR|jj�}x!tD]}|j|d�q5Wn||||�S(u
        Create a new :class:`ConnectionPool` based on host, port and scheme.

        This method is used to actually create the connection pools handed out
        by :meth:`connection_from_url` and companion methods. It is intended
        to be overridden for customization.
        uhttpN(upool_classes_by_schemeuconnection_pool_kwucopyuSSL_KEYWORDSupopuNone(uselfuschemeuhostuportupool_clsukwargsukw((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyu	_new_poolGs
	
uPoolManager._new_poolcCs|jj�dS(u�
        Empty our store of pools and direct them all to close.

        This will not affect in-flight connections, but they will not be
        re-used after completion.
        N(upoolsuclear(uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuclearXsuPoolManager.clearuhttpc
Cs�|p	d}|p!tj|d�}|||f}|jj�C|jj|�}|r\|S|j|||�}||j|<WdQX|S(u�
        Get a :class:`ConnectionPool` based on the host, port, and scheme.

        If ``port`` isn't given, it will be derived from the ``scheme`` using
        ``urllib3.connectionpool.port_by_scheme``.
        uhttpiPN(uport_by_schemeugetupoolsulocku	_new_pool(uselfuhostuportuschemeupool_keyupool((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuconnection_from_hostas
u PoolManager.connection_from_hostcCs.t|�}|j|jd|jd|j�S(u*
        Similar to :func:`urllib3.connectionpool.connection_from_url` but
        doesn't pass any additional parameters to the
        :class:`urllib3.connectionpool.ConnectionPool` constructor.

        Additional parameters are taken from the :class:`.PoolManager`
        constructor.
        uportuscheme(u	parse_urluconnection_from_hostuhostuportuscheme(uselfuurluu((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuconnection_from_url{s	uPoolManager.connection_from_urlc	Ks?t|�}|j|jd|jd|j�}d
|d<d
|d<d|kr`|j|d<n|jdk	r�|jdkr�|j	|||�}n|j	||j
|�}|o�|j�}|s�|St||�}|j
dkr�d}ntjd	||f�|jd
d�d|d
<||d<|j	|||�S(u]
        Same as :meth:`urllib3.connectionpool.HTTPConnectionPool.urlopen`
        with custom cross-host redirect logic and only sends the request-uri
        portion of the ``url``.

        The given ``url`` parameter must be absolute, such that an appropriate
        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
        uportuschemeuassert_same_hosturedirectuheadersuhttpi/uGETuRedirecting %s -> %suretriesiiFN(u	parse_urluconnection_from_hostuhostuportuschemeuFalseuheadersuproxyuNoneuurlopenurequest_uriuget_redirect_locationuurljoinustatusuloguinfouget(	uselfumethoduurluredirectukwuuuconnuresponseuredirect_location((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuurlopen�s&	$

	
uPoolManager.urlopenNT(
u__name__u
__module__u__qualname__u__doc__uNoneuproxyu__init__u	_new_pooluclearuconnection_from_hostuconnection_from_urluTrueuurlopen(u
__locals__((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuPoolManager#s	csq|EeZdZdZddd�fdd�Zdd�fdd�Zddd	�Zd
�fd
d�Z	�S(uProxyManageruw
    Behaves just like :class:`PoolManager`, but sends all requests through
    the defined proxy, using the CONNECT method for HTTPS URLs.

    :param proxy_url:
        The URL of the proxy to be used.

    :param proxy_headers:
        A dictionary contaning headers that will be sent to the proxy. In case
        of HTTP they are being sent with each request, while in the
        HTTPS/CONNECT case they are sent only once. Could be used for proxy
        authentication.

    Example:
        >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
        >>> r1 = proxy.request('GET', 'http://google.com/')
        >>> r2 = proxy.request('GET', 'http://httpbin.org/')
        >>> len(proxy.pools)
        1
        >>> r3 = proxy.request('GET', 'https://httpbin.org/')
        >>> r4 = proxy.request('GET', 'https://twitter.com/')
        >>> len(proxy.pools)
        3

    i
cs�t|t�r.d|j|j|jf}nt|�}|jsmtj|jd�}|jd|�}n||_	|pi|_
|j	jd	ks�td|j	j��|j	|d<|j
|d<tt
|�j|||�dS(
Nu
%s://%s:%iiPuportuhttpuhttpsuNot supported proxy scheme %su_proxyu_proxy_headers(uhttpuhttps(u
isinstanceuHTTPConnectionPooluschemeuhostuportu	parse_urluport_by_schemeugetu_replaceuproxyu
proxy_headersuAssertionErrorusuperuProxyManageru__init__(uselfu	proxy_urlu	num_poolsuheadersu
proxy_headersuconnection_pool_kwuproxyuport(u	__class__(uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyu__init__�s		

uProxyManager.__init__uhttpcsV|dkr(tt|�j|||�Stt|�j|jj|jj|jj�S(Nuhttps(usuperuProxyManageruconnection_from_hostuproxyuhostuportuscheme(uselfuhostuportuscheme(u	__class__(uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuconnection_from_host�s

u!ProxyManager.connection_from_hostcCsIidd6}t|�j}|r/||d<n|rE|j|�n|S(u�
        Sets headers needed by proxies: specifically, the Accept and Host
        headers. Only sets headers not provided by the user.
        u*/*uAcceptuHost(u	parse_urlunetlocuupdate(uselfuurluheadersuheaders_unetloc((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyu_set_proxy_headers�s

uProxyManager._set_proxy_headerscsbt|�}|jdkrC|j||jd|j��|d<ntt|�j||||�S(u@Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute.uhttpuheaders(u	parse_urluschemeu_set_proxy_headersugetuheadersusuperuProxyManageruurlopen(uselfumethoduurluredirectukwuu(u	__class__(uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuurlopen�s
uProxyManager.urlopenNT(
u__name__u
__module__u__qualname__u__doc__uNoneu__init__uconnection_from_hostu_set_proxy_headersuTrueuurlopen(u
__locals__((u	__class__uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuProxyManager�scKstd||�S(Nu	proxy_url(uProxyManager(uurlukw((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyuproxy_from_urls(ukey_fileu	cert_fileu	cert_reqsuca_certsussl_version(ulogginguurllib.parseuurljoinuImportErroruurlparseu_collectionsuRecentlyUsedContaineruconnectionpooluHTTPConnectionPooluHTTPSConnectionPooluport_by_schemeurequestuRequestMethodsuutilu	parse_urlu__all__upool_classes_by_schemeu	getLoggeru__name__uloguSSL_KEYWORDSuPoolManageruProxyManageruproxy_from_url(((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/poolmanager.pyu<module>s&

�Spython3.3/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/filepost.cpython-33.pyc000064400000007250151733566750026770 0ustar00�
7�Re�	c@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZejd�d	Z
d
d�Zdd
�Zdd�Zddd�ZdS(iN(uuuid4(uBytesIOi(usix(ub(uRequestFielduutf-8icCs
t�jS(uM
    Our embarassingly-simple replacement for mimetools.choose_boundary.
    (uuuid4uhex(((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/filepost.pyuchoose_boundarysuchoose_boundaryccsgt|t�r!tj|�}nt|�}x3|D]+}t|t�rQ|Vq4tj|�Vq4WdS(u�
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    N(u
isinstanceudictusixu	iteritemsuiteruRequestFieldufrom_tuples(ufieldsuiufield((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/filepost.pyuiter_field_objectss
uiter_field_objectscCs:t|t�r)dd�tj|�D�Sdd�|D�S(u-
    .. deprecated:: 1.6

    Iterate over fields.

    The addition of :class:`~urllib3.fields.RequestField` makes this function
    obsolete. Instead, use :func:`iter_field_objects`, which returns
    :class:`~urllib3.fields.RequestField` objects.

    Supports list of (k, v) tuples and dicts.
    css!|]\}}||fVqdS(N((u.0ukuv((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/filepost.pyu	<genexpr><suiter_fields.<locals>.<genexpr>css!|]\}}||fVqdS(N((u.0ukuv((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/filepost.pyu	<genexpr>>s(u
isinstanceudictusixu	iteritems(ufields((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/filepost.pyuiter_fields/suiter_fieldscCst�}|dkr!t�}nx�t|�D]�}|jtd|��t|�j|j��|j}t	|t
�r�t|�}nt	|tj
�r�t|�j|�n
|j|�|jd�q.W|jtd|��td|�}|j�|fS(uJ
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`mimetools.choose_boundary`.
    u--%s
s
u--%s--
u multipart/form-data; boundary=%sN(uBytesIOuNoneuchoose_boundaryuiter_field_objectsuwriteubuwriterurender_headersudatau
isinstanceuintustrusixu	text_typeugetvalue(ufieldsuboundaryubodyufieldudataucontent_type((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/filepost.pyuencode_multipart_formdataAs 		
uencode_multipart_formdata(ucodecsu	mimetypesuuuiduuuid4uiouBytesIOupackagesusixupackages.sixubufieldsuRequestFieldulookupuwriteruchoose_boundaryuiter_field_objectsuiter_fieldsuNoneuencode_multipart_formdata(((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/filepost.pyu<module>ssite-packages/pip/_vendor/requests/packages/urllib3/__pycache__/connectionpool.cpython-33.pyc000064400000057544151733566750030130 0ustar00python3.3�
7�Reic
@sddlZddlZddlZddlmZmZddlZy ddlm	Z	m
Z
mZWn:ek
r�ddl
m	Z	m
Z
mZddl
ZYnXddlmZmZmZmZmZmZmZmZmZmZmZddlmZddlmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&dd	l'm(Z(dd
l)m*Z*ddl+m,Z,m-Z-m.Z.ej/j0Z0ej1e2�Z3e4�Z5Gdd
�d
e4�Z6e7ej8ej9g�Z:Gdd�de6e(�Z;Gdd�de;�Z<dd�Z=dS(iN(uerrorutimeout(u	LifoQueueuEmptyuFulli(uClosedPoolErroruConnectionErroruConnectTimeoutErroruEmptyPoolErroruHostChangedErroruLocationParseErroru
MaxRetryErroruSSLErroruTimeoutErroruReadTimeoutErroru
ProxyError(uCertificateError(usix(uport_by_schemeuDummyConnectionuHTTPConnectionuHTTPSConnectionuVerifiedHTTPSConnectionu
HTTPExceptionuBaseSSLError(uRequestMethods(uHTTPResponse(uget_hostuis_connection_droppeduTimeoutcBsA|EeZdZdZdZeZddd�Zdd�Z	dS(uConnectionPooluz
    Base class for all connection pools, such as
    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.
    cCs@|dkrt|��n|jd�}||_||_dS(Nu[](uNoneuLocationParseErrorustripuhostuport(uselfuhostuport((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu__init__Ds
	uConnectionPool.__init__cCs dt|�j|j|jfS(Nu%s(host=%r, port=%r)(utypeu__name__uhostuport(uself((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu__str__NsuConnectionPool.__str__N(
u__name__u
__module__u__qualname__u__doc__uNoneuschemeu	LifoQueueuQueueClsu__init__u__str__(u
__locals__((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyuConnectionPool;s

uConnectionPoolc
Bs�|EeZdZdZdZeZdde	j
ddddddd�Zdd�Zddd	�Z
d
d�Zdd
�Zedd�Zdd�Zdd�Zdddddedddd�ZdS(uHTTPConnectionPoolu5
    Thread-safe connection pool for one host.

    :param host:
        Host used for this HTTP Connection (e.g. "localhost"), passed into
        :class:`httplib.HTTPConnection`.

    :param port:
        Port used for this HTTP Connection (None is equivalent to 80), passed
        into :class:`httplib.HTTPConnection`.

    :param strict:
        Causes BadStatusLine to be raised if the status line can't be parsed
        as a valid HTTP/1.0 or 1.1 status line, passed into
        :class:`httplib.HTTPConnection`.

        .. note::
           Only works in Python 2. This parameter is ignored in Python 3.

    :param timeout:
        Socket timeout in seconds for each individual connection. This can
        be a float or integer, which sets the timeout for the HTTP request,
        or an instance of :class:`urllib3.util.Timeout` which gives you more
        fine-grained control over request timeouts. After the constructor has
        been parsed, this is always a `urllib3.util.Timeout` object.

    :param maxsize:
        Number of connections to save that can be reused. More than 1 is useful
        in multithreaded situations. If ``block`` is set to false, more
        connections will be created but they will not be saved once they've
        been used.

    :param block:
        If set to True, no more than ``maxsize`` connections will be used at
        a time. When no free connections are available, the call will block
        until a connection has been released. This is a useful side effect for
        particular multithreaded situations where one does not want to use more
        than maxsize connections per host to prevent flooding.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param _proxy:
        Parsed proxy URL, should not be used directly, instead, see
        :class:`urllib3.connectionpool.ProxyManager`"

    :param _proxy_headers:
        A dictionary with proxy headers, should not be used directly,
        instead, see :class:`urllib3.connectionpool.ProxyManager`"
    uhttpic
Ks�tj|||�tj||�||_t|t�sMtj|�}n||_|j|�|_	||_
||_|	p�i|_x$t
|�D]}|j	jd�q�Wd|_d|_tjdkr�|
jdd�n|
|_dS(Niiiusource_address(ii(uConnectionPoolu__init__uRequestMethodsustrictu
isinstanceuTimeoutu
from_floatutimeoutuQueueClsupoolublockuproxyu
proxy_headersuxrangeuputuNoneunum_connectionsunum_requestsusysuversion_infoupopuconn_kw(uselfuhostuportustrictutimeoutumaxsizeublockuheadersu_proxyu_proxy_headersuconn_kwu_((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu__init__�s"						uHTTPConnectionPool.__init__c
Cs�|jd7_tjd|j|jf�|jd|jd|jd|jjd|j|j	�}|j
dk	r�d|_n|S(	u9
        Return a fresh :class:`HTTPConnection`.
        iu%Starting new HTTP connection (%d): %suhostuportutimeoutustrictiN(
unum_connectionsuloguinfouhostu
ConnectionClsuportutimeoutuconnect_timeoutustrictuconn_kwuproxyuNoneutcp_nodelay(uselfuconn((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu	_new_conn�s	uHTTPConnectionPool._new_conncCs�d}y"|jjd|jd|�}WnMtk
rKt|d��Yn-tk
rw|jrst|d��nYnX|r�t|�r�t	j
d|j�|j�n|p�|j
�S(u�
        Get a connection. Will return a pooled connection if one is available.

        If no connections are available and :prop:`.block` is ``False``, then a
        fresh connection is returned.

        :param timeout:
            Seconds to wait before giving up and raising
            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
            :prop:`.block` is ``True``.
        ublockutimeoutuPool is closed.u>Pool reached maximum size and no more connections are allowed.u Resetting dropped connection: %sN(uNoneupoolugetublockuAttributeErroruClosedPoolErroruEmptyuEmptyPoolErroruis_connection_droppeduloguinfouhostucloseu	_new_conn(uselfutimeoutuconn((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu	_get_conn�s"

	
uHTTPConnectionPool._get_conncCsoy|jj|dd�dSWn7tk
r2Yn&tk
rWtjd|j�YnX|rk|j�ndS(u�
        Put a connection back into the pool.

        :param conn:
            Connection object for the current host and port as returned by
            :meth:`._new_conn` or :meth:`._get_conn`.

        If the pool is already full, the connection is closed and discarded
        because we exceeded maxsize. If connections are discarded frequently,
        then maxsize should be increased.

        If the pool is closed, then the connection will be closed and discarded.
        ublockNu2Connection pool is full, discarding connection: %sF(	upooluputuFalseuAttributeErroruFulluloguwarninguhostuclose(uselfuconn((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu	_put_conn�s

uHTTPConnectionPool._put_conncCsC|tkr|jj�St|t�r2|j�Stj|�SdS(u< Helper that always returns a :class:`urllib3.util.Timeout` N(u_Defaultutimeoutucloneu
isinstanceuTimeoutu
from_float(uselfutimeout((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu_get_timeout�s


uHTTPConnectionPool._get_timeoutcKsH|jd7_|j|�}y-|j�|j|_|j|||�Wn1tk
r~t|d|j|jf��YnX|j	}t
|d�r�|dkr�t||d|��n|tj
kr�|jjtj��q�|jj|�ny;y|jdd�}Wntk
r0|j�}YnXWn�tk
r\t||d|��Yn�tk
r�}	zAdt|	�ks�dt|	�kr�t||d	��n�WYd
d
}	~	XnPtk
r}	z0|	jtkr�t||d|��n�WYd
d
}	~	XnXt|dd�}
tjd
|||
|j|jf�|S(u
        Perform a request on a given urllib connection object taken from our
        pool.

        :param conn:
            a connection from one of our connection pools

        :param timeout:
            Socket timeout in seconds for the request. This can be a
            float or integer, which will set the same timeout value for
            the socket connect and the socket read, or an instance of
            :class:`urllib3.util.Timeout`, which gives you more fine-grained
            control over your timeouts.
        iu0Connection to %s timed out. (connect timeout=%s)usockiu!Read timed out. (read timeout=%s)u	bufferingu	timed outudid not complete (read)uRead timed out.Nu
_http_vsn_struHTTP/?u"%s %s %s" %s %sT(unum_requestsu_get_timeoutu
start_connectuconnect_timeoututimeouturequestu
SocketTimeoutuConnectTimeoutErroruhosturead_timeoutuhasattruReadTimeoutErroruTimeoutuDEFAULT_TIMEOUTusocku
settimeoutusocketugetdefaulttimeoutugetresponseuTrueu	TypeErroruBaseSSLErrorustruSocketErroruerrnou_blocking_errnosugetattrulogudebugustatusulength(uselfuconnumethoduurlutimeoutuhttplib_request_kwutimeout_objuread_timeoutuhttplib_responseueuhttp_version((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu
_make_request
sV

	

u HTTPConnectionPool._make_requestcCs[|jd}|_y/x(|jdd�}|r|j�qqWntk
rVYnXdS(uD
        Close all pooled connections and disable the pool.
        ublockNF(upooluNoneugetuFalseucloseuEmpty(uselfuold_pooluconn((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyucloseas
uHTTPConnectionPool.closecCs�|jd�rdSt|�\}}}|jrJ|rJtj|�}n(|jrr|tj|�krrd}n|||f|j|j|jfkS(uj
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        u/TN(	u
startswithuTrueuget_hostuportuport_by_schemeugetuNoneuschemeuhost(uselfuurluschemeuhostuport((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyuis_same_hostqs	uHTTPConnectionPool.is_same_hostic'Ks]|dkr|j}n|dkrB|dk	rBt||��n|
dkrc|jdd�}
n|r�|j|�r�t|||d��nd}|jdkr�|j	�}|j
|j�nd}
z�yh|jd|	�}|j
|||d|d|d|�}|
o|}tj|d|d	||�}Wn!tk
rZt|d
��Ynttfk
r�}zd}
t|��WYdd}~Xn�tttfk
rZ}z�|r�|j�d}n|sBt|t�r��nt|t�r|jrtd|��n|dkr-td
|��nt|||��n|}
WYdd}~XnXWd|
ru|j|�nX|s�tjd||
|f�|j |||||d||d|d|	d|
|�S|o�|j!�}|rY|dk	rY|j"dkr
d}ntj#d||f�|j |||||d||d|d|	d|
|�S|S(u�
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param body:
            Data to send in the request body (useful for creating
            POST requests, see HTTPConnectionPool.post_url for
            more convenience).

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Number of retries to allow before raising a MaxRetryError exception.
            If `False`, then retries are disabled and any exception is raised
            immediately.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When False, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param \**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        iupreload_contentiuhttputimeoutubodyuheadersupoolu
connectionu"No pool connections are available.NuCannot connect to proxy.uConnection failed.uARetrying (%d attempts remain) after connection broken by '%r': %supool_timeouturelease_conni/uGETuRedirecting %s -> %sFT($uNoneuheadersuFalseu
MaxRetryErrorugetuTrueuis_same_hostuHostChangedErroruschemeucopyuupdateu
proxy_headersu	_get_connu
_make_requestuHTTPResponseufrom_httplibuEmptyuEmptyPoolErroruBaseSSLErroruCertificateErroruSSLErroruTimeoutErroru
HTTPExceptionuSocketErrorucloseu
isinstanceuproxyu
ProxyErroruConnectionErroru	_put_connuloguwarninguurlopenuget_redirect_locationustatusuinfo(uselfumethoduurlubodyuheadersuretriesuredirectuassert_same_hostutimeoutupool_timeouturelease_connuresponse_kwuconnuerruhttplib_responseu
response_connuresponseueuredirect_location((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyuurlopen�sxH



			
	
uHTTPConnectionPool.urlopenNFT(u__name__u
__module__u__qualname__u__doc__uschemeuHTTPConnectionu
ConnectionClsuNoneuFalseuTimeoutuDEFAULT_TIMEOUTu__init__u	_new_connu	_get_connu	_put_connu_get_timeoutu_Defaultu
_make_requestucloseuis_same_hostuTrueuurlopen(u
__locals__((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyuHTTPConnectionPoolUs 3!W		uHTTPConnectionPoolcBsw|EeZdZdZdZeZd
dd
ddd
d
d
d
d
d
d
d
d
d
dd�Z	dd�Z
dd	�Zd
S(uHTTPSConnectionPoolu�
    Same as :class:`.HTTPConnectionPool`, but HTTPS.

    When Python is compiled with the :mod:`ssl` module, then
    :class:`.VerifiedHTTPSConnection` is used, which *can* verify certificates,
    instead of :class:`.HTTPSConnection`.

    :class:`.VerifiedHTTPSConnection` uses one of ``assert_fingerprint``,
    ``assert_hostname`` and ``host`` in this order to verify connections.
    If ``assert_hostname`` is False, no verification is done.

    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs`` and
    ``ssl_version`` are only used if :mod:`ssl` is available and are fed into
    :meth:`urllib3.util.ssl_wrap_socket` to upgrade the connection socket
    into an SSL socket.
    uhttpsicKs�tjdkr"|jdd�ntj||||||||||	|�
|
|_||_||_|
|_	||_
||_||_||_
dS(Niiusource_address(ii(usysuversion_infoupopuNoneuHTTPConnectionPoolu__init__ukey_fileu	cert_fileu	cert_reqsuca_certsussl_versionuassert_hostnameuassert_fingerprintuconn_kw(uselfuhostuportustrictutimeoutumaxsizeublockuheadersu_proxyu_proxy_headersukey_fileu	cert_fileu	cert_reqsuca_certsussl_versionuassert_hostnameuassert_fingerprintuconn_kw((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu__init__Ws								uHTTPSConnectionPool.__init__c
Cs�t|t�rj|jd|jd|jd|jd|jd|jd|j�|j	|_	|j
|_
n|jdk	r�y
|j
}Wntk
r�|j}YnX||j|j|j�|j�n|S(u�
        Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
        and establish the tunnel if proxy is used.
        ukey_fileu	cert_fileu	cert_reqsuca_certsuassert_hostnameuassert_fingerprintN(u
isinstanceuVerifiedHTTPSConnectionuset_certukey_fileu	cert_fileu	cert_reqsuca_certsuassert_hostnameuassert_fingerprintussl_versionuconn_kwuproxyuNoneu
set_tunneluAttributeErroru_set_tunneluhostuportu
proxy_headersuconnect(uselfuconnu
set_tunnel((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu
_prepare_connns"				



u!HTTPSConnectionPool._prepare_connc	Cs|jd7_tjd|j|jf�|jsE|jtkrTtd��n|j}|j}|jd	k	r�|jj}|jj}ni}t
js�|j|d<n|j
|j�|jd|d|d|jj|�}|jd	k	rd|_n|j|�S(
uB
        Return a fresh :class:`httplib.HTTPSConnection`.
        iu&Starting new HTTPS connection (%d): %suCCan't connect to HTTPS URL because the SSL module is not available.ustrictuhostuportutimeoutiN(unum_connectionsuloguinfouhostu
ConnectionClsuDummyConnectionuSSLErroruportuproxyuNoneusixuPY3ustrictuupdateuconn_kwutimeoutuconnect_timeoututcp_nodelayu
_prepare_conn(uselfuactual_hostuactual_portuextra_paramsuconn((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu	_new_conn�s(						uHTTPSConnectionPool._new_connNF(u__name__u
__module__u__qualname__u__doc__uschemeuHTTPSConnectionu
ConnectionClsuNoneuFalseu__init__u
_prepare_connu	_new_conn(u
__locals__((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyuHTTPSConnectionPoolBs		uHTTPSConnectionPoolcKsKt|�\}}}|dkr4t|d||�St|d||�SdS(u�
    Given a url, return an :class:`.ConnectionPool` instance of its host.

    This is a shortcut for not having to parse out the scheme, host, and port
    of the url before creating an :class:`.ConnectionPool` instance.

    :param url:
        Absolute URL string that must include the scheme. Port is optional.

    :param \**kw:
        Passes additional parameters to the constructor of the appropriate
        :class:`.ConnectionPool`. Useful for specifying things like
        timeout, maxsize, headers, etc.

    Example: ::

        >>> conn = connection_from_url('http://google.com/')
        >>> r = conn.request('GET', '/')
    uhttpsuportN(uget_hostuHTTPSConnectionPooluHTTPConnectionPool(uurlukwuschemeuhostuport((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyuconnection_from_url�suconnection_from_url(>usysuerrnouloggingusocketuerroruSocketErrorutimeoutu
SocketTimeoutuqueueu	LifoQueueuEmptyuFulluImportErroruQueueu_u
exceptionsuClosedPoolErroruConnectionErroruConnectTimeoutErroruEmptyPoolErroruHostChangedErroruLocationParseErroru
MaxRetryErroruSSLErroruTimeoutErroruReadTimeoutErroru
ProxyErrorupackages.ssl_match_hostnameuCertificateErrorupackagesusixu
connectionuport_by_schemeuDummyConnectionuHTTPConnectionuHTTPSConnectionuVerifiedHTTPSConnectionu
HTTPExceptionuBaseSSLErrorurequestuRequestMethodsuresponseuHTTPResponseuutiluget_hostuis_connection_droppeduTimeoutumovesuxrangeu	getLoggeru__name__uloguobjectu_DefaultuConnectionPoolusetuEAGAINuEWOULDBLOCKu_blocking_errnosuHTTPConnectionPooluHTTPSConnectionPooluconnection_from_url(((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/connectionpool.pyu<module>s2 
L
4	��lpython3.3/site-packages/pip/_vendor/requests/packages/urllib3/response.py000064400000024153151733566750022521 0ustar00# urllib3/response.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php


import logging
import zlib
import io

from ._collections import HTTPHeaderDict
from .exceptions import DecodeError
from .packages.six import string_types as basestring, binary_type
from .util import is_fp_closed


log = logging.getLogger(__name__)


class DeflateDecoder(object):

    def __init__(self):
        self._first_try = True
        self._data = binary_type()
        self._obj = zlib.decompressobj()

    def __getattr__(self, name):
        return getattr(self._obj, name)

    def decompress(self, data):
        if not self._first_try:
            return self._obj.decompress(data)

        self._data += data
        try:
            return self._obj.decompress(data)
        except zlib.error:
            self._first_try = False
            self._obj = zlib.decompressobj(-zlib.MAX_WBITS)
            try:
                return self.decompress(self._data)
            finally:
                self._data = None


def _get_decoder(mode):
    if mode == 'gzip':
        return zlib.decompressobj(16 + zlib.MAX_WBITS)

    return DeflateDecoder()


class HTTPResponse(io.IOBase):
    """
    HTTP Response container.

    Backwards-compatible to httplib's HTTPResponse but the response ``body`` is
    loaded and decoded on-demand when the ``data`` property is accessed.

    Extra parameters for behaviour not present in httplib.HTTPResponse:

    :param preload_content:
        If True, the response's body will be preloaded during construction.

    :param decode_content:
        If True, attempts to decode specific content-encoding's based on headers
        (like 'gzip' and 'deflate') will be skipped and raw data will be used
        instead.

    :param original_response:
        When this HTTPResponse wrapper is generated from an httplib.HTTPResponse
        object, it's convenient to include the original for debug purposes. It's
        otherwise unused.
    """

    CONTENT_DECODERS = ['gzip', 'deflate']
    REDIRECT_STATUSES = [301, 302, 303, 307, 308]

    def __init__(self, body='', headers=None, status=0, version=0, reason=None,
                 strict=0, preload_content=True, decode_content=True,
                 original_response=None, pool=None, connection=None):

        self.headers = HTTPHeaderDict()
        if headers:
            self.headers.update(headers)
        self.status = status
        self.version = version
        self.reason = reason
        self.strict = strict
        self.decode_content = decode_content

        self._decoder = None
        self._body = body if body and isinstance(body, basestring) else None
        self._fp = None
        self._original_response = original_response
        self._fp_bytes_read = 0

        self._pool = pool
        self._connection = connection

        if hasattr(body, 'read'):
            self._fp = body

        if preload_content and not self._body:
            self._body = self.read(decode_content=decode_content)

    def get_redirect_location(self):
        """
        Should we redirect and where to?

        :returns: Truthy redirect location string if we got a redirect status
            code and valid location. ``None`` if redirect status and no
            location. ``False`` if not a redirect status code.
        """
        if self.status in self.REDIRECT_STATUSES:
            return self.headers.get('location')

        return False

    def release_conn(self):
        if not self._pool or not self._connection:
            return

        self._pool._put_conn(self._connection)
        self._connection = None

    @property
    def data(self):
        # For backwords-compat with earlier urllib3 0.4 and earlier.
        if self._body:
            return self._body

        if self._fp:
            return self.read(cache_content=True)

    def tell(self):
        """
        Obtain the number of bytes pulled over the wire so far. May differ from
        the amount of content returned by :meth:``HTTPResponse.read`` if bytes
        are encoded on the wire (e.g, compressed).
        """
        return self._fp_bytes_read

    def read(self, amt=None, decode_content=None, cache_content=False):
        """
        Similar to :meth:`httplib.HTTPResponse.read`, but with two additional
        parameters: ``decode_content`` and ``cache_content``.

        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the ``.data`` property to continue working
            after having ``.read()`` the file object. (Overridden if ``amt`` is
            set.)
        """
        # Note: content-encoding value should be case-insensitive, per RFC 2616
        # Section 3.5
        content_encoding = self.headers.get('content-encoding', '').lower()
        if self._decoder is None:
            if content_encoding in self.CONTENT_DECODERS:
                self._decoder = _get_decoder(content_encoding)
        if decode_content is None:
            decode_content = self.decode_content

        if self._fp is None:
            return

        flush_decoder = False

        try:
            if amt is None:
                # cStringIO doesn't like amt=None
                data = self._fp.read()
                flush_decoder = True
            else:
                cache_content = False
                data = self._fp.read(amt)
                if amt != 0 and not data:  # Platform-specific: Buggy versions of Python.
                    # Close the connection when no data is returned
                    #
                    # This is redundant to what httplib/http.client _should_
                    # already do.  However, versions of python released before
                    # December 15, 2012 (http://bugs.python.org/issue16298) do not
                    # properly close the connection in all cases. There is no harm
                    # in redundantly calling close.
                    self._fp.close()
                    flush_decoder = True

            self._fp_bytes_read += len(data)

            try:
                if decode_content and self._decoder:
                    data = self._decoder.decompress(data)
            except (IOError, zlib.error) as e:
                raise DecodeError(
                    "Received response with content-encoding: %s, but "
                    "failed to decode it." % content_encoding,
                    e)

            if flush_decoder and decode_content and self._decoder:
                buf = self._decoder.decompress(binary_type())
                data += buf + self._decoder.flush()

            if cache_content:
                self._body = data

            return data

        finally:
            if self._original_response and self._original_response.isclosed():
                self.release_conn()

    def stream(self, amt=2**16, decode_content=None):
        """
        A generator wrapper for the read() method. A call will block until
        ``amt`` bytes have been read from the connection or until the
        connection is closed.

        :param amt:
            How much of the content to read. The generator will return up to
            much data per iteration, but may return less. This is particularly
            likely when using compressed data. However, the empty string will
            never be returned.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
        """
        while not is_fp_closed(self._fp):
            data = self.read(amt=amt, decode_content=decode_content)

            if data:
                yield data


    @classmethod
    def from_httplib(ResponseCls, r, **response_kw):
        """
        Given an :class:`httplib.HTTPResponse` instance ``r``, return a
        corresponding :class:`urllib3.response.HTTPResponse` object.

        Remaining parameters are passed to the HTTPResponse constructor, along
        with ``original_response=r``.
        """

        headers = HTTPHeaderDict()
        for k, v in r.getheaders():
            headers.add(k, v)

        # HTTPResponse objects in Python 3 don't have a .strict attribute
        strict = getattr(r, 'strict', 0)
        return ResponseCls(body=r,
                           headers=headers,
                           status=r.status,
                           version=r.version,
                           reason=r.reason,
                           strict=strict,
                           original_response=r,
                           **response_kw)

    # Backwards-compatibility methods for httplib.HTTPResponse
    def getheaders(self):
        return self.headers

    def getheader(self, name, default=None):
        return self.headers.get(name, default)

    # Overrides from io.IOBase
    def close(self):
        if not self.closed:
            self._fp.close()

    @property
    def closed(self):
        if self._fp is None:
            return True
        elif hasattr(self._fp, 'closed'):
            return self._fp.closed
        elif hasattr(self._fp, 'isclosed'):  # Python 2
            return self._fp.isclosed()
        else:
            return True

    def fileno(self):
        if self._fp is None:
            raise IOError("HTTPResponse has no file to get a fileno from")
        elif hasattr(self._fp, "fileno"):
            return self._fp.fileno()
        else:
            raise IOError("The file-like object  this HTTPResponse is wrapped "
                          "around has no file descriptor")

    def flush(self):
        if self._fp is not None and hasattr(self._fp, 'flush'):
            return self._fp.flush()

    def readable(self):
        return True
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/fields.py000064400000013530151733566750022126 0ustar00# urllib3/fields.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import email.utils
import mimetypes

from .packages import six


def guess_content_type(filename, default='application/octet-stream'):
    """
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    """
    if filename:
        return mimetypes.guess_type(filename)[0] or default
    return default


def format_header_param(name, value):
    """
    Helper function to format and quote a single header parameter.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows RFC 2231, as
    suggested by RFC 2388 Section 4.4.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as a unicode string.
    """
    if not any(ch in value for ch in '"\\\r\n'):
        result = '%s="%s"' % (name, value)
        try:
            result.encode('ascii')
        except UnicodeEncodeError:
            pass
        else:
            return result
    if not six.PY3:  # Python 2:
        value = value.encode('utf-8')
    value = email.utils.encode_rfc2231(value, 'utf-8')
    value = '%s*=%s' % (name, value)
    return value


class RequestField(object):
    """
    A data container for request body parameters.

    :param name:
        The name of this request field.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field.
    :param headers:
        An optional dict-like object of headers to initially use for the field.
    """
    def __init__(self, name, data, filename=None, headers=None):
        self._name = name
        self._filename = filename
        self.data = data
        self.headers = {}
        if headers:
            self.headers = dict(headers)

    @classmethod
    def from_tuples(cls, fieldname, value):
        """
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from parameter
        of key/value strings AND key/filetuple. A filetuple is a (filename, data, MIME type)
        tuple where the MIME type is optional. For example: ::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        """
        if isinstance(value, tuple):
            if len(value) == 3:
                filename, data, content_type = value
            else:
                filename, data = value
                content_type = guess_content_type(filename)
        else:
            filename = None
            content_type = None
            data = value

        request_param = cls(fieldname, data, filename=filename)
        request_param.make_multipart(content_type=content_type)

        return request_param

    def _render_part(self, name, value):
        """
        Overridable helper function to format a single header parameter.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        """
        return format_header_param(name, value)

    def _render_parts(self, header_parts):
        """
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) typles or a :class:`dict` of (k, v) to format as
            `k1="v1"; k2="v2"; ...`.
        """
        parts = []
        iterable = header_parts
        if isinstance(header_parts, dict):
            iterable = header_parts.items()

        for name, value in iterable:
            if value:
                parts.append(self._render_part(name, value))

        return '; '.join(parts)

    def render_headers(self):
        """
        Renders the headers for this request field.
        """
        lines = []

        sort_keys = ['Content-Disposition', 'Content-Type', 'Content-Location']
        for sort_key in sort_keys:
            if self.headers.get(sort_key, False):
                lines.append('%s: %s' % (sort_key, self.headers[sort_key]))

        for header_name, header_value in self.headers.items():
            if header_name not in sort_keys:
                if header_value:
                    lines.append('%s: %s' % (header_name, header_value))

        lines.append('\r\n')
        return '\r\n'.join(lines)

    def make_multipart(self, content_disposition=None, content_type=None, content_location=None):
        """
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        """
        self.headers['Content-Disposition'] = content_disposition or 'form-data'
        self.headers['Content-Disposition'] += '; '.join(['', self._render_parts((('name', self._name), ('filename', self._filename)))])
        self.headers['Content-Type'] = content_type
        self.headers['Content-Location'] = content_location
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py000064400000003245151733566750022421 0ustar00# urllib3/__init__.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

"""
urllib3 - Thread-safe connection pooling and re-using.
"""

__author__ = 'Andrey Petrov (andrey.petrov@shazow.net)'
__license__ = 'MIT'
__version__ = 'dev'


from .connectionpool import (
    HTTPConnectionPool,
    HTTPSConnectionPool,
    connection_from_url
)

from . import exceptions
from .filepost import encode_multipart_formdata
from .poolmanager import PoolManager, ProxyManager, proxy_from_url
from .response import HTTPResponse
from .util import make_headers, get_host, Timeout


# Set default logging handler to avoid "No handler found" warnings.
import logging
try:  # Python 2.7+
    from logging import NullHandler
except ImportError:
    class NullHandler(logging.Handler):
        def emit(self, record):
            pass

logging.getLogger(__name__).addHandler(NullHandler())

def add_stderr_logger(level=logging.DEBUG):
    """
    Helper for quickly adding a StreamHandler to the logger. Useful for
    debugging.

    Returns the handler after adding it.
    """
    # This method needs to be in this __init__.py to get the __name__ correct
    # even if urllib3 is vendored within another package.
    logger = logging.getLogger(__name__)
    handler = logging.StreamHandler()
    handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s'))
    logger.addHandler(handler)
    logger.setLevel(level)
    logger.debug('Added an stderr logging handler to logger: %s' % __name__)
    return handler

# ... Clean up.
del NullHandler
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py000064400000064430151733566750023716 0ustar00# urllib3/connectionpool.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import sys
import errno
import logging

from socket import error as SocketError, timeout as SocketTimeout
import socket

try: # Python 3
    from queue import LifoQueue, Empty, Full
except ImportError:
    from Queue import LifoQueue, Empty, Full
    import Queue as _  # Platform-specific: Windows


from .exceptions import (
    ClosedPoolError,
    ConnectionError,
    ConnectTimeoutError,
    EmptyPoolError,
    HostChangedError,
    LocationParseError,
    MaxRetryError,
    SSLError,
    TimeoutError,
    ReadTimeoutError,
    ProxyError,
)
from .packages.ssl_match_hostname import CertificateError
from .packages import six
from .connection import (
    port_by_scheme,
    DummyConnection,
    HTTPConnection, HTTPSConnection, VerifiedHTTPSConnection,
    HTTPException, BaseSSLError,
)
from .request import RequestMethods
from .response import HTTPResponse
from .util import (
    get_host,
    is_connection_dropped,
    Timeout,
)


xrange = six.moves.xrange

log = logging.getLogger(__name__)

_Default = object()

## Pool objects

class ConnectionPool(object):
    """
    Base class for all connection pools, such as
    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.
    """

    scheme = None
    QueueCls = LifoQueue

    def __init__(self, host, port=None):
        if host is None:
            raise LocationParseError(host)

        # httplib doesn't like it when we include brackets in ipv6 addresses
        host = host.strip('[]')

        self.host = host
        self.port = port

    def __str__(self):
        return '%s(host=%r, port=%r)' % (type(self).__name__,
                                         self.host, self.port)

# This is taken from http://hg.python.org/cpython/file/7aaba721ebc0/Lib/socket.py#l252
_blocking_errnos = set([errno.EAGAIN, errno.EWOULDBLOCK])

class HTTPConnectionPool(ConnectionPool, RequestMethods):
    """
    Thread-safe connection pool for one host.

    :param host:
        Host used for this HTTP Connection (e.g. "localhost"), passed into
        :class:`httplib.HTTPConnection`.

    :param port:
        Port used for this HTTP Connection (None is equivalent to 80), passed
        into :class:`httplib.HTTPConnection`.

    :param strict:
        Causes BadStatusLine to be raised if the status line can't be parsed
        as a valid HTTP/1.0 or 1.1 status line, passed into
        :class:`httplib.HTTPConnection`.

        .. note::
           Only works in Python 2. This parameter is ignored in Python 3.

    :param timeout:
        Socket timeout in seconds for each individual connection. This can
        be a float or integer, which sets the timeout for the HTTP request,
        or an instance of :class:`urllib3.util.Timeout` which gives you more
        fine-grained control over request timeouts. After the constructor has
        been parsed, this is always a `urllib3.util.Timeout` object.

    :param maxsize:
        Number of connections to save that can be reused. More than 1 is useful
        in multithreaded situations. If ``block`` is set to false, more
        connections will be created but they will not be saved once they've
        been used.

    :param block:
        If set to True, no more than ``maxsize`` connections will be used at
        a time. When no free connections are available, the call will block
        until a connection has been released. This is a useful side effect for
        particular multithreaded situations where one does not want to use more
        than maxsize connections per host to prevent flooding.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param _proxy:
        Parsed proxy URL, should not be used directly, instead, see
        :class:`urllib3.connectionpool.ProxyManager`"

    :param _proxy_headers:
        A dictionary with proxy headers, should not be used directly,
        instead, see :class:`urllib3.connectionpool.ProxyManager`"
    """

    scheme = 'http'
    ConnectionCls = HTTPConnection

    def __init__(self, host, port=None, strict=False,
                 timeout=Timeout.DEFAULT_TIMEOUT, maxsize=1, block=False,
                 headers=None, _proxy=None, _proxy_headers=None, **conn_kw):
        ConnectionPool.__init__(self, host, port)
        RequestMethods.__init__(self, headers)

        self.strict = strict

        # This is for backwards compatibility and can be removed once a timeout
        # can only be set to a Timeout object
        if not isinstance(timeout, Timeout):
            timeout = Timeout.from_float(timeout)

        self.timeout = timeout

        self.pool = self.QueueCls(maxsize)
        self.block = block

        self.proxy = _proxy
        self.proxy_headers = _proxy_headers or {}

        # Fill the queue up so that doing get() on it will block properly
        for _ in xrange(maxsize):
            self.pool.put(None)

        # These are mostly for testing and debugging purposes.
        self.num_connections = 0
        self.num_requests = 0

        if sys.version_info < (2, 7):  # Python 2.6 and older
            conn_kw.pop('source_address', None)
        self.conn_kw = conn_kw

    def _new_conn(self):
        """
        Return a fresh :class:`HTTPConnection`.
        """
        self.num_connections += 1
        log.info("Starting new HTTP connection (%d): %s" %
                 (self.num_connections, self.host))

        conn = self.ConnectionCls(host=self.host, port=self.port,
                                  timeout=self.timeout.connect_timeout,
                                  strict=self.strict, **self.conn_kw)
        if self.proxy is not None:
            # Enable Nagle's algorithm for proxies, to avoid packet
            # fragmentation.
            conn.tcp_nodelay = 0
        return conn

    def _get_conn(self, timeout=None):
        """
        Get a connection. Will return a pooled connection if one is available.

        If no connections are available and :prop:`.block` is ``False``, then a
        fresh connection is returned.

        :param timeout:
            Seconds to wait before giving up and raising
            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
            :prop:`.block` is ``True``.
        """
        conn = None
        try:
            conn = self.pool.get(block=self.block, timeout=timeout)

        except AttributeError: # self.pool is None
            raise ClosedPoolError(self, "Pool is closed.")

        except Empty:
            if self.block:
                raise EmptyPoolError(self,
                                     "Pool reached maximum size and no more "
                                     "connections are allowed.")
            pass  # Oh well, we'll create a new connection then

        # If this is a persistent connection, check if it got disconnected
        if conn and is_connection_dropped(conn):
            log.info("Resetting dropped connection: %s" % self.host)
            conn.close()

        return conn or self._new_conn()

    def _put_conn(self, conn):
        """
        Put a connection back into the pool.

        :param conn:
            Connection object for the current host and port as returned by
            :meth:`._new_conn` or :meth:`._get_conn`.

        If the pool is already full, the connection is closed and discarded
        because we exceeded maxsize. If connections are discarded frequently,
        then maxsize should be increased.

        If the pool is closed, then the connection will be closed and discarded.
        """
        try:
            self.pool.put(conn, block=False)
            return # Everything is dandy, done.
        except AttributeError:
            # self.pool is None.
            pass
        except Full:
            # This should never happen if self.block == True
            log.warning(
                "Connection pool is full, discarding connection: %s" %
                self.host)

        # Connection never got put back into the pool, close it.
        if conn:
            conn.close()

    def _get_timeout(self, timeout):
        """ Helper that always returns a :class:`urllib3.util.Timeout` """
        if timeout is _Default:
            return self.timeout.clone()

        if isinstance(timeout, Timeout):
            return timeout.clone()
        else:
            # User passed us an int/float. This is for backwards compatibility,
            # can be removed later
            return Timeout.from_float(timeout)

    def _make_request(self, conn, method, url, timeout=_Default,
                      **httplib_request_kw):
        """
        Perform a request on a given urllib connection object taken from our
        pool.

        :param conn:
            a connection from one of our connection pools

        :param timeout:
            Socket timeout in seconds for the request. This can be a
            float or integer, which will set the same timeout value for
            the socket connect and the socket read, or an instance of
            :class:`urllib3.util.Timeout`, which gives you more fine-grained
            control over your timeouts.
        """
        self.num_requests += 1

        timeout_obj = self._get_timeout(timeout)

        try:
            timeout_obj.start_connect()
            conn.timeout = timeout_obj.connect_timeout
            # conn.request() calls httplib.*.request, not the method in
            # urllib3.request. It also calls makefile (recv) on the socket.
            conn.request(method, url, **httplib_request_kw)
        except SocketTimeout:
            raise ConnectTimeoutError(
                self, "Connection to %s timed out. (connect timeout=%s)" %
                (self.host, timeout_obj.connect_timeout))

        # Reset the timeout for the recv() on the socket
        read_timeout = timeout_obj.read_timeout

        # App Engine doesn't have a sock attr
        if hasattr(conn, 'sock'):
            # In Python 3 socket.py will catch EAGAIN and return None when you
            # try and read into the file pointer created by http.client, which
            # instead raises a BadStatusLine exception. Instead of catching
            # the exception and assuming all BadStatusLine exceptions are read
            # timeouts, check for a zero timeout before making the request.
            if read_timeout == 0:
                raise ReadTimeoutError(
                    self, url,
                    "Read timed out. (read timeout=%s)" % read_timeout)
            if read_timeout is Timeout.DEFAULT_TIMEOUT:
                conn.sock.settimeout(socket.getdefaulttimeout())
            else: # None or a value
                conn.sock.settimeout(read_timeout)

        # Receive the response from the server
        try:
            try: # Python 2.7+, use buffering of HTTP responses
                httplib_response = conn.getresponse(buffering=True)
            except TypeError: # Python 2.6 and older
                httplib_response = conn.getresponse()
        except SocketTimeout:
            raise ReadTimeoutError(
                self, url, "Read timed out. (read timeout=%s)" % read_timeout)

        except BaseSSLError as e:
            # Catch possible read timeouts thrown as SSL errors. If not the
            # case, rethrow the original. We need to do this because of:
            # http://bugs.python.org/issue10272
            if 'timed out' in str(e) or \
               'did not complete (read)' in str(e):  # Python 2.6
                raise ReadTimeoutError(self, url, "Read timed out.")

            raise

        except SocketError as e: # Platform-specific: Python 2
            # See the above comment about EAGAIN in Python 3. In Python 2 we
            # have to specifically catch it and throw the timeout error
            if e.errno in _blocking_errnos:
                raise ReadTimeoutError(
                    self, url,
                    "Read timed out. (read timeout=%s)" % read_timeout)

            raise

        # AppEngine doesn't have a version attr.
        http_version = getattr(conn, '_http_vsn_str', 'HTTP/?')
        log.debug("\"%s %s %s\" %s %s" % (method, url, http_version,
                                          httplib_response.status,
                                          httplib_response.length))
        return httplib_response

    def close(self):
        """
        Close all pooled connections and disable the pool.
        """
        # Disable access to the pool
        old_pool, self.pool = self.pool, None

        try:
            while True:
                conn = old_pool.get(block=False)
                if conn:
                    conn.close()

        except Empty:
            pass # Done.

    def is_same_host(self, url):
        """
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        """
        if url.startswith('/'):
            return True

        # TODO: Add optional support for socket.gethostbyname checking.
        scheme, host, port = get_host(url)

        # Use explicit default port for comparison when none is given
        if self.port and not port:
            port = port_by_scheme.get(scheme)
        elif not self.port and port == port_by_scheme.get(scheme):
            port = None

        return (scheme, host, port) == (self.scheme, self.host, self.port)

    def urlopen(self, method, url, body=None, headers=None, retries=3,
                redirect=True, assert_same_host=True, timeout=_Default,
                pool_timeout=None, release_conn=None, **response_kw):
        """
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param body:
            Data to send in the request body (useful for creating
            POST requests, see HTTPConnectionPool.post_url for
            more convenience).

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Number of retries to allow before raising a MaxRetryError exception.
            If `False`, then retries are disabled and any exception is raised
            immediately.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When False, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param \**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        """
        if headers is None:
            headers = self.headers

        if retries < 0 and retries is not False:
            raise MaxRetryError(self, url)

        if release_conn is None:
            release_conn = response_kw.get('preload_content', True)

        # Check host
        if assert_same_host and not self.is_same_host(url):
            raise HostChangedError(self, url, retries - 1)

        conn = None

        # Merge the proxy headers. Only do this in HTTP. We have to copy the
        # headers dict so we can safely change it without those changes being
        # reflected in anyone else's copy.
        if self.scheme == 'http':
            headers = headers.copy()
            headers.update(self.proxy_headers)

        # Must keep the exception bound to a separate variable or else Python 3
        # complains about UnboundLocalError.
        err = None

        try:
            # Request a connection from the queue
            conn = self._get_conn(timeout=pool_timeout)

            # Make the request on the httplib connection object
            httplib_response = self._make_request(conn, method, url,
                                                  timeout=timeout,
                                                  body=body, headers=headers)

            # If we're going to release the connection in ``finally:``, then
            # the request doesn't need to know about the connection. Otherwise
            # it will also try to release it and we'll have a double-release
            # mess.
            response_conn = not release_conn and conn

            # Import httplib's response into our own wrapper object
            response = HTTPResponse.from_httplib(httplib_response,
                                                 pool=self,
                                                 connection=response_conn,
                                                 **response_kw)

            # else:
            #     The connection will be put back into the pool when
            #     ``response.release_conn()`` is called (implicitly by
            #     ``response.read()``)

        except Empty:
            # Timed out by queue.
            raise EmptyPoolError(self, "No pool connections are available.")

        except (BaseSSLError, CertificateError) as e:
            # Release connection unconditionally because there is no way to
            # close it externally in case of exception.
            release_conn = True
            raise SSLError(e)

        except (TimeoutError, HTTPException, SocketError) as e:
            if conn:
                # Discard the connection for these exceptions. It will be
                # be replaced during the next _get_conn() call.
                conn.close()
                conn = None

            if not retries:
                if isinstance(e, TimeoutError):
                    # TimeoutError is exempt from MaxRetryError-wrapping.
                    # FIXME: ... Not sure why. Add a reason here.
                    raise

                # Wrap unexpected exceptions with the most appropriate
                # module-level exception and re-raise.
                if isinstance(e, SocketError) and self.proxy:
                    raise ProxyError('Cannot connect to proxy.', e)

                if retries is False:
                    raise ConnectionError('Connection failed.', e)

                raise MaxRetryError(self, url, e)

            # Keep track of the error for the retry warning.
            err = e

        finally:
            if release_conn:
                # Put the connection back to be reused. If the connection is
                # expired then it will be None, which will get replaced with a
                # fresh connection during _get_conn.
                self._put_conn(conn)

        if not conn:
            # Try again
            log.warning("Retrying (%d attempts remain) after connection "
                        "broken by '%r': %s" % (retries, err, url))
            return self.urlopen(method, url, body, headers, retries - 1,
                                redirect, assert_same_host,
                                timeout=timeout, pool_timeout=pool_timeout,
                                release_conn=release_conn, **response_kw)

        # Handle redirect?
        redirect_location = redirect and response.get_redirect_location()
        if redirect_location and retries is not False:
            if response.status == 303:
                method = 'GET'
            log.info("Redirecting %s -> %s" % (url, redirect_location))
            return self.urlopen(method, redirect_location, body, headers,
                                retries - 1, redirect, assert_same_host,
                                timeout=timeout, pool_timeout=pool_timeout,
                                release_conn=release_conn, **response_kw)

        return response


class HTTPSConnectionPool(HTTPConnectionPool):
    """
    Same as :class:`.HTTPConnectionPool`, but HTTPS.

    When Python is compiled with the :mod:`ssl` module, then
    :class:`.VerifiedHTTPSConnection` is used, which *can* verify certificates,
    instead of :class:`.HTTPSConnection`.

    :class:`.VerifiedHTTPSConnection` uses one of ``assert_fingerprint``,
    ``assert_hostname`` and ``host`` in this order to verify connections.
    If ``assert_hostname`` is False, no verification is done.

    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs`` and
    ``ssl_version`` are only used if :mod:`ssl` is available and are fed into
    :meth:`urllib3.util.ssl_wrap_socket` to upgrade the connection socket
    into an SSL socket.
    """

    scheme = 'https'
    ConnectionCls = HTTPSConnection

    def __init__(self, host, port=None,
                 strict=False, timeout=None, maxsize=1,
                 block=False, headers=None,
                 _proxy=None, _proxy_headers=None,
                 key_file=None, cert_file=None, cert_reqs=None,
                 ca_certs=None, ssl_version=None,
                 assert_hostname=None, assert_fingerprint=None,
                 **conn_kw):

        if sys.version_info < (2, 7):  # Python 2.6 or older
            conn_kw.pop('source_address', None)

        HTTPConnectionPool.__init__(self, host, port, strict, timeout, maxsize,
                                    block, headers, _proxy, _proxy_headers, **conn_kw)
        self.key_file = key_file
        self.cert_file = cert_file
        self.cert_reqs = cert_reqs
        self.ca_certs = ca_certs
        self.ssl_version = ssl_version
        self.assert_hostname = assert_hostname
        self.assert_fingerprint = assert_fingerprint
        self.conn_kw = conn_kw

    def _prepare_conn(self, conn):
        """
        Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
        and establish the tunnel if proxy is used.
        """

        if isinstance(conn, VerifiedHTTPSConnection):
            conn.set_cert(key_file=self.key_file,
                          cert_file=self.cert_file,
                          cert_reqs=self.cert_reqs,
                          ca_certs=self.ca_certs,
                          assert_hostname=self.assert_hostname,
                          assert_fingerprint=self.assert_fingerprint)
            conn.ssl_version = self.ssl_version
            conn.conn_kw = self.conn_kw

        if self.proxy is not None:
            # Python 2.7+
            try:
                set_tunnel = conn.set_tunnel
            except AttributeError:  # Platform-specific: Python 2.6
                set_tunnel = conn._set_tunnel
            set_tunnel(self.host, self.port, self.proxy_headers)
            # Establish tunnel connection early, because otherwise httplib
            # would improperly set Host: header to proxy's IP:port.
            conn.connect()

        return conn

    def _new_conn(self):
        """
        Return a fresh :class:`httplib.HTTPSConnection`.
        """
        self.num_connections += 1
        log.info("Starting new HTTPS connection (%d): %s"
                 % (self.num_connections, self.host))

        if not self.ConnectionCls or self.ConnectionCls is DummyConnection:
            # Platform-specific: Python without ssl
            raise SSLError("Can't connect to HTTPS URL because the SSL "
                           "module is not available.")

        actual_host = self.host
        actual_port = self.port
        if self.proxy is not None:
            actual_host = self.proxy.host
            actual_port = self.proxy.port

        extra_params = {}
        if not six.PY3:  # Python 2
            extra_params['strict'] = self.strict
        extra_params.update(self.conn_kw)

        conn = self.ConnectionCls(host=actual_host, port=actual_port,
                                  timeout=self.timeout.connect_timeout,
                                  **extra_params)
        if self.proxy is not None:
            # Enable Nagle's algorithm for proxies, to avoid packet
            # fragmentation.
            conn.tcp_nodelay = 0

        return self._prepare_conn(conn)


def connection_from_url(url, **kw):
    """
    Given a url, return an :class:`.ConnectionPool` instance of its host.

    This is a shortcut for not having to parse out the scheme, host, and port
    of the url before creating an :class:`.ConnectionPool` instance.

    :param url:
        Absolute URL string that must include the scheme. Port is optional.

    :param \**kw:
        Passes additional parameters to the constructor of the appropriate
        :class:`.ConnectionPool`. Useful for specifying things like
        timeout, maxsize, headers, etc.

    Example: ::

        >>> conn = connection_from_url('http://google.com/')
        >>> r = conn.request('GET', '/')
    """
    scheme, host, port = get_host(url)
    if scheme == 'https':
        return HTTPSConnectionPool(host, port=port, **kw)
    else:
        return HTTPConnectionPool(host, port=port, **kw)
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/request.py000064400000013260151733566750022350 0ustar00# urllib3/request.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

try:
    from urllib.parse import urlencode
except ImportError:
    from urllib import urlencode

from .filepost import encode_multipart_formdata


__all__ = ['RequestMethods']


class RequestMethods(object):
    """
    Convenience mixin for classes who implement a :meth:`urlopen` method, such
    as :class:`~urllib3.connectionpool.HTTPConnectionPool` and
    :class:`~urllib3.poolmanager.PoolManager`.

    Provides behavior for making common types of HTTP request methods and
    decides which type of request field encoding to use.

    Specifically,

    :meth:`.request_encode_url` is for sending requests whose fields are encoded
    in the URL (such as GET, HEAD, DELETE).

    :meth:`.request_encode_body` is for sending requests whose fields are
    encoded in the *body* of the request using multipart or www-form-urlencoded
    (such as for POST, PUT, PATCH).

    :meth:`.request` is for making any kind of request, it will look up the
    appropriate encoding format and use one of the above two methods to make
    the request.

    Initializer parameters:

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
    """

    _encode_url_methods = set(['DELETE', 'GET', 'HEAD', 'OPTIONS'])

    def __init__(self, headers=None):
        self.headers = headers or {}

    def urlopen(self, method, url, body=None, headers=None,
                encode_multipart=True, multipart_boundary=None,
                **kw): # Abstract
        raise NotImplemented("Classes extending RequestMethods must implement "
                             "their own ``urlopen`` method.")

    def request(self, method, url, fields=None, headers=None, **urlopen_kw):
        """
        Make a request using :meth:`urlopen` with the appropriate encoding of
        ``fields`` based on the ``method`` used.

        This is a convenience method that requires the least amount of manual
        effort. It can be used in most situations, while still having the option
        to drop down to more specific methods when necessary, such as
        :meth:`request_encode_url`, :meth:`request_encode_body`,
        or even the lowest level :meth:`urlopen`.
        """
        method = method.upper()

        if method in self._encode_url_methods:
            return self.request_encode_url(method, url, fields=fields,
                                            headers=headers,
                                            **urlopen_kw)
        else:
            return self.request_encode_body(method, url, fields=fields,
                                             headers=headers,
                                             **urlopen_kw)

    def request_encode_url(self, method, url, fields=None, **urlopen_kw):
        """
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
        """
        if fields:
            url += '?' + urlencode(fields)
        return self.urlopen(method, url, **urlopen_kw)

    def request_encode_body(self, method, url, fields=None, headers=None,
                            encode_multipart=True, multipart_boundary=None,
                            **urlopen_kw):
        """
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the body. This is useful for request methods like POST, PUT, PATCH, etc.

        When ``encode_multipart=True`` (default), then
        :meth:`urllib3.filepost.encode_multipart_formdata` is used to encode the
        payload with the appropriate content type. Otherwise
        :meth:`urllib.urlencode` is used with the
        'application/x-www-form-urlencoded' content type.

        Multipart encoding must be used when posting files, and it's reasonably
        safe to use it in other times too. However, it may break request signing,
        such as with OAuth.

        Supports an optional ``fields`` parameter of key/value strings AND
        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
        the MIME type is optional. For example: ::

            fields = {
                'foo': 'bar',
                'fakefile': ('foofile.txt', 'contents of foofile'),
                'realfile': ('barfile.txt', open('realfile').read()),
                'typedfile': ('bazfile.bin', open('bazfile').read(),
                              'image/jpeg'),
                'nonamefile': 'contents of nonamefile field',
            }

        When uploading a file, providing a filename (the first parameter of the
        tuple) is optional but recommended to best mimick behavior of browsers.

        Note that if ``headers`` are supplied, the 'Content-Type' header will be
        overwritten because it depends on the dynamic random boundary string
        which is used to compose the body of the request. The random boundary
        string can be explicitly set with the ``multipart_boundary`` parameter.
        """
        if encode_multipart:
            body, content_type = encode_multipart_formdata(fields or {},
                                    boundary=multipart_boundary)
        else:
            body, content_type = (urlencode(fields or {}),
                                    'application/x-www-form-urlencoded')

        if headers is None:
            headers = self.headers

        headers_ = {'Content-Type': content_type}
        headers_.update(headers)

        return self.urlopen(method, url, body=body, headers=headers_,
                            **urlopen_kw)
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py000064400000010213151733566760022571 0ustar00from binascii import hexlify, unhexlify
from hashlib import md5, sha1

from ..exceptions import SSLError


try:  # Test for SSL features
    SSLContext = None
    HAS_SNI = False

    import ssl
    from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23
    from ssl import SSLContext  # Modern SSL?
    from ssl import HAS_SNI  # Has SNI?
except ImportError:
    pass


def assert_fingerprint(cert, fingerprint):
    """
    Checks if given fingerprint matches the supplied certificate.

    :param cert:
        Certificate as bytes object.
    :param fingerprint:
        Fingerprint as string of hexdigits, can be interspersed by colons.
    """

    # Maps the length of a digest to a possible hash function producing
    # this digest.
    hashfunc_map = {
        16: md5,
        20: sha1
    }

    fingerprint = fingerprint.replace(':', '').lower()

    digest_length, rest = divmod(len(fingerprint), 2)

    if rest or digest_length not in hashfunc_map:
        raise SSLError('Fingerprint is of invalid length.')

    # We need encode() here for py32; works on py2 and p33.
    fingerprint_bytes = unhexlify(fingerprint.encode())

    hashfunc = hashfunc_map[digest_length]

    cert_digest = hashfunc(cert).digest()

    if not cert_digest == fingerprint_bytes:
        raise SSLError('Fingerprints did not match. Expected "{0}", got "{1}".'
                       .format(hexlify(fingerprint_bytes),
                               hexlify(cert_digest)))


def resolve_cert_reqs(candidate):
    """
    Resolves the argument to a numeric constant, which can be passed to
    the wrap_socket function/method from the ssl module.
    Defaults to :data:`ssl.CERT_NONE`.
    If given a string it is assumed to be the name of the constant in the
    :mod:`ssl` module or its abbrevation.
    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
    If it's neither `None` nor a string we assume it is already the numeric
    constant which can directly be passed to wrap_socket.
    """
    if candidate is None:
        return CERT_NONE

    if isinstance(candidate, str):
        res = getattr(ssl, candidate, None)
        if res is None:
            res = getattr(ssl, 'CERT_' + candidate)
        return res

    return candidate


def resolve_ssl_version(candidate):
    """
    like resolve_cert_reqs
    """
    if candidate is None:
        return PROTOCOL_SSLv23

    if isinstance(candidate, str):
        res = getattr(ssl, candidate, None)
        if res is None:
            res = getattr(ssl, 'PROTOCOL_' + candidate)
        return res

    return candidate


if SSLContext is not None:  # Python 3.2+
    def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None,
                        ca_certs=None, server_hostname=None,
                        ssl_version=None):
        """
        All arguments except `server_hostname` have the same meaning as for
        :func:`ssl.wrap_socket`

        :param server_hostname:
            Hostname of the expected certificate
        """
        context = SSLContext(ssl_version)
        context.verify_mode = cert_reqs

        # Disable TLS compression to migitate CRIME attack (issue #309)
        OP_NO_COMPRESSION = 0x20000
        context.options |= OP_NO_COMPRESSION

        if ca_certs:
            try:
                context.load_verify_locations(ca_certs)
            # Py32 raises IOError
            # Py33 raises FileNotFoundError
            except Exception as e:  # Reraise as SSLError
                raise SSLError(e)
        if certfile:
            # FIXME: This block needs a test.
            context.load_cert_chain(certfile, keyfile)
        if HAS_SNI:  # Platform-specific: OpenSSL with enabled SNI
            return context.wrap_socket(sock, server_hostname=server_hostname)
        return context.wrap_socket(sock)

else:  # Python 3.1 and earlier
    def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None,
                        ca_certs=None, server_hostname=None,
                        ssl_version=None):
        return wrap_socket(sock, keyfile=keyfile, certfile=certfile,
                           ca_certs=ca_certs, cert_reqs=cert_reqs,
                           ssl_version=ssl_version)
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py000064400000002504151733566760023774 0ustar00from socket import error as SocketError
try:
    from select import poll, POLLIN
except ImportError:  # `poll` doesn't exist on OSX and other platforms
    poll = False
    try:
        from select import select
    except ImportError:  # `select` doesn't exist on AppEngine.
        select = False

def is_connection_dropped(conn):  # Platform-specific
    """
    Returns True if the connection is dropped and should be closed.

    :param conn:
        :class:`httplib.HTTPConnection` object.

    Note: For platforms like AppEngine, this will always return ``False`` to
    let the platform handle connection recycling transparently for us.
    """
    sock = getattr(conn, 'sock', False)
    if sock is False:  # Platform-specific: AppEngine
        return False
    if sock is None:  # Connection already closed (such as by httplib).
        return False

    if not poll:
        if not select:  # Platform-specific: AppEngine
            return False

        try:
            return select([sock], [], [], 0.0)[0]
        except SocketError:
            return True

    # This version is better on platforms that support it.
    p = poll()
    p.register(sock, POLLIN)
    for (fno, ev) in p.poll(0.0):
        if fno == sock.fileno():
            # Either data is buffered (bad), or the connection is dropped.
            return True



python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py000064400000010261151733566760022436 0ustar00from collections import namedtuple

from ..exceptions import LocationParseError


class Url(namedtuple('Url', ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'])):
    """
    Datastructure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`.
    """
    slots = ()

    def __new__(cls, scheme=None, auth=None, host=None, port=None, path=None, query=None, fragment=None):
        return super(Url, cls).__new__(cls, scheme, auth, host, port, path, query, fragment)

    @property
    def hostname(self):
        """For backwards-compatibility with urlparse. We're nice like that."""
        return self.host

    @property
    def request_uri(self):
        """Absolute path including the query string."""
        uri = self.path or '/'

        if self.query is not None:
            uri += '?' + self.query

        return uri

    @property
    def netloc(self):
        """Network location including host and port"""
        if self.port:
            return '%s:%d' % (self.host, self.port)
        return self.host


def split_first(s, delims):
    """
    Given a string and an iterable of delimiters, split on the first found
    delimiter. Return two split parts and the matched delimiter.

    If not found, then the first part is the full input string.

    Example: ::

        >>> split_first('foo/bar?baz', '?/=')
        ('foo', 'bar?baz', '/')
        >>> split_first('foo/bar?baz', '123')
        ('foo/bar?baz', '', None)

    Scales linearly with number of delims. Not ideal for large number of delims.
    """
    min_idx = None
    min_delim = None
    for d in delims:
        idx = s.find(d)
        if idx < 0:
            continue

        if min_idx is None or idx < min_idx:
            min_idx = idx
            min_delim = d

    if min_idx is None or min_idx < 0:
        return s, '', None

    return s[:min_idx], s[min_idx+1:], min_delim


def parse_url(url):
    """
    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.

    Partly backwards-compatible with :mod:`urlparse`.

    Example: ::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/', ...)
        >>> parse_url('google.com:80')
        Url(scheme=None, host='google.com', port=80, path=None, ...)
        >>> parse_url('/foo?bar')
        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    """

    # While this code has overlap with stdlib's urlparse, it is much
    # simplified for our needs and less annoying.
    # Additionally, this implementations does silly things to be optimal
    # on CPython.

    scheme = None
    auth = None
    host = None
    port = None
    path = None
    fragment = None
    query = None

    # Scheme
    if '://' in url:
        scheme, url = url.split('://', 1)

    # Find the earliest Authority Terminator
    # (http://tools.ietf.org/html/rfc3986#section-3.2)
    url, path_, delim = split_first(url, ['/', '?', '#'])

    if delim:
        # Reassemble the path
        path = delim + path_

    # Auth
    if '@' in url:
        # Last '@' denotes end of auth part
        auth, url = url.rsplit('@', 1)

    # IPv6
    if url and url[0] == '[':
        host, url = url.split(']', 1)
        host += ']'

    # Port
    if ':' in url:
        _host, port = url.split(':', 1)

        if not host:
            host = _host

        if port:
            # If given, ports must be integers.
            if not port.isdigit():
                raise LocationParseError(url)
            port = int(port)
        else:
            # Blank ports are cool, too. (rfc3986#section-3.2.3)
            port = None

    elif not host and url:
        host = url

    if not path:
        return Url(scheme, auth, host, port, path, query, fragment)

    # Fragment
    if '#' in path:
        path, fragment = path.split('#', 1)

    # Query
    if '?' in path:
        path, query = path.split('?', 1)

    return Url(scheme, auth, host, port, path, query, fragment)


def get_host(url):
    """
    Deprecated. Use :func:`.parse_url` instead.
    """
    p = parse_url(url)
    return p.scheme or 'http', p.hostname, p.port
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/url.cpython-33.pyc000064400000012070151733566760026717 0ustar00�
7�Re�c@s|ddlmZddlmZGdd�deddddd	d
ddg��Zd
d�Zdd�Zdd�ZdS(i(u
namedtuplei(uLocationParseErrorc
s}|EeZdZdZfZd
d
d
d
d
d
d
�fdd�Zedd��Zedd��Z	edd	��Z
�S(uUrlug
    Datastructure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`.
    c	s+tt|�j||||||||�S(N(usuperuUrlu__new__(uclsuschemeuauthuhostuportupathuqueryufragment(u	__class__(uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyu__new__
suUrl.__new__cCs|jS(u@For backwards-compatibility with urlparse. We're nice like that.(uhost(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyuhostnamesuUrl.hostnamecCs6|jpd}|jdk	r2|d|j7}n|S(u)Absolute path including the query string.u/u?N(upathuqueryuNone(uselfuuri((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyurequest_urisuUrl.request_uricCs$|jrd|j|jfS|jS(u(Network location including host and portu%s:%d(uportuhost(uself((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyunetlocs	u
Url.netlocN(u__name__u
__module__u__qualname__u__doc__uslotsuNoneu__new__upropertyuhostnameurequest_uriunetloc(u
__locals__((u	__class__uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyuUrls'
uUrluschemeuauthuhostuportupathuqueryufragmentcCs�d}d}xV|D]N}|j|�}|dkr:qn|dksR||kr|}|}qqW|dks}|dkr�|ddfS|d|�||dd�|fS(u�
    Given a string and an iterable of delimiters, split on the first found
    delimiter. Return two split parts and the matched delimiter.

    If not found, then the first part is the full input string.

    Example: ::

        >>> split_first('foo/bar?baz', '?/=')
        ('foo', 'bar?baz', '/')
        >>> split_first('foo/bar?baz', '123')
        ('foo/bar?baz', '', None)

    Scales linearly with number of delims. Not ideal for large number of delims.
    iuNi(uNoneufind(usudelimsumin_idxu	min_delimuduidx((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyusplit_first's


usplit_firstc
Cs�d}d}d}d}d}d}d}d|krQ|jdd�\}}nt|dddg�\}}}	|	r�|	|}nd|kr�|jdd�\}}n|r�|ddkr�|jd	d�\}}|d	7}nd
|krS|jd
d�\}
}|s|
}n|rJ|j�s;t|��nt|�}qid}n|ri|ri|}n|s�t|||||||�Sd|kr�|jdd�\}}nd|kr�|jdd�\}}nt|||||||�S(u7
    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.

    Partly backwards-compatible with :mod:`urlparse`.

    Example: ::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/', ...)
        >>> parse_url('google.com:80')
        Url(scheme=None, host='google.com', port=80, path=None, ...)
        >>> parse_url('/foo?bar')
        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    u://iu/u?u#u@iu[u]u:N(uNoneusplitusplit_firstursplituisdigituLocationParseErroruintuUrl(uurluschemeuauthuhostuportupathufragmentuqueryupath_udelimu_host((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyu	parse_urlHsF!

		
	u	parse_urlcCs(t|�}|jpd|j|jfS(u5
    Deprecated. Use :func:`.parse_url` instead.
    uhttp(u	parse_urluschemeuhostnameuport(uurlup((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyuget_host�suget_hostN(ucollectionsu
namedtupleu
exceptionsuLocationParseErroruUrlusplit_firstu	parse_urluget_host(((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/url.pyu<module>s
4!!Usite-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/request.cpython-33.pyc000064400000004077151733566760027536 0ustar00python3.3�
7�Re�c@sEddlmZddlmZdZddddddd�ZdS(i(u	b64encodei(usixugzip,deflatecCs�i}|rRt|t�rn't|t�r?dj|�}nt}||d<n|re||d<n|rxd|d<n|r�dttj|��jd�|d<n|r�dttj|��jd�|d	<n|S(
u�
    Shortcuts for generating request headers.

    :param keep_alive:
        If ``True``, adds 'connection: keep-alive' header.

    :param accept_encoding:
        Can be a boolean, list, or string.
        ``True`` translates to 'gzip,deflate'.
        List will get joined by comma.
        String will be used as provided.

    :param user_agent:
        String representing the user-agent you want, such as
        "python-urllib3/0.6"

    :param basic_auth:
        Colon-separated username:password string for 'authorization: basic ...'
        auth header.

    :param proxy_basic_auth:
        Colon-separated username:password string for 'proxy-authorization: basic ...'
        auth header.

    Example: ::

        >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
        {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
        >>> make_headers(accept_encoding=True)
        {'accept-encoding': 'gzip,deflate'}
    u,uaccept-encodingu
user-agentu
keep-aliveu
connectionuBasic uutf-8u
authorizationuproxy-authorization(	u
isinstanceustrulistujoinuACCEPT_ENCODINGu	b64encodeusixubudecode(u
keep_aliveuaccept_encodingu
user_agentu
basic_authuproxy_basic_authuheaders((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/request.pyumake_headers	s&!


&&umake_headersN(ubase64u	b64encodeupackagesusixuACCEPT_ENCODINGuNoneumake_headers(((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/request.pyu<module>s	site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/connection.cpython-33.pyc000064400000002576151733566760030207 0ustar00python3.3�
7�ReDc@s�ddlmZyddlmZmZWnGek
rsdZyddlmZWnek
rndZYnXYnXdd�ZdS(i(uerror(upolluPOLLIN(uselectcCs�t|dd�}|dkr"dS|dkr2dSts|tsBdSyt|gggd�dSWq|tk
rxdSYq|Xnt�}|j|t�x3|jd�D]"\}}||j	�kr�dSq�WdS(u 
    Returns True if the connection is dropped and should be closed.

    :param conn:
        :class:`httplib.HTTPConnection` object.

    Note: For platforms like AppEngine, this will always return ``False`` to
    let the platform handle connection recycling transparently for us.
    usockgiNFT(
ugetattruFalseuNoneupolluselectuSocketErroruTrueuregisteruPOLLINufileno(uconnusockupufnouev((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/connection.pyuis_connection_droppeds"

	uis_connection_droppedNF(	usocketuerroruSocketErroruselectupolluPOLLINuImportErroruFalseuis_connection_dropped(((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/connection.pyu<module>s

site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/response.cpython-33.pyc000064400000001120151733566760027666 0ustar00python3.3�
7�Rebc@sdd�ZdS(cCs#t|d�r|jdkS|jS(ut
    Checks whether a given file-like object is closed.

    :param obj:
        The file-like object to check.
    ufpN(uhasattrufpuNoneuclosed(uobj((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/response.pyuis_fp_closeds
uis_fp_closedN(uis_fp_closed(((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/response.pyu<module>ssite-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/__init__.cpython-33.pyc000064400000001663151733566760027603 0ustar00python3.3�
7�Renc@s�ddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZddl
mZmZddlmZmZmZmZdS(i(uis_connection_dropped(umake_headers(uis_fp_closed(u
SSLContextuHAS_SNIuassert_fingerprinturesolve_cert_reqsuresolve_ssl_versionussl_wrap_socket(ucurrent_timeuTimeout(uget_hostu	parse_urlusplit_firstuUrlN(u
connectionuis_connection_droppedurequestumake_headersuresponseuis_fp_closedussl_u
SSLContextuHAS_SNIuassert_fingerprinturesolve_cert_reqsuresolve_ssl_versionussl_wrap_socketutimeoutucurrent_timeuTimeoutuurluget_hostu	parse_urlusplit_firstuUrl(((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/__init__.pyu<module>s
.python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/ssl_.cpython-33.pyc000064400000010754151733566760027064 0ustar00�
7�Re�c@sddlmZmZddlmZmZddlmZyXdZ	dZddlZddlm
Z
mZmZddlm	Z	ddlmZWnek
r�YnXd	d
�Zdd�Zd
d�Ze	dk	r�dddddddd�Zndddddddd�ZdS(i(uhexlifyu	unhexlify(umd5usha1i(uSSLErrorN(uwrap_socketu	CERT_NONEuPROTOCOL_SSLv23(u
SSLContext(uHAS_SNIcCs�itd6td6}|jdd�j�}tt|�d�\}}|sY||krhtd��nt|j��}||}||�j	�}||ks�tdj
t|�t|����ndS(	u�
    Checks if given fingerprint matches the supplied certificate.

    :param cert:
        Certificate as bytes object.
    :param fingerprint:
        Fingerprint as string of hexdigits, can be interspersed by colons.
    iiu:uiu!Fingerprint is of invalid length.u6Fingerprints did not match. Expected "{0}", got "{1}".N(umd5usha1ureplaceulowerudivmodulenuSSLErroru	unhexlifyuencodeudigestuformatuhexlify(ucertufingerprintuhashfunc_mapu
digest_lengthurestufingerprint_bytesuhashfuncucert_digest((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/ssl_.pyuassert_fingerprints

		uassert_fingerprintcCs[|dkrtSt|t�rWtt|d�}|dkrSttd|�}n|S|S(u�
    Resolves the argument to a numeric constant, which can be passed to
    the wrap_socket function/method from the ssl module.
    Defaults to :data:`ssl.CERT_NONE`.
    If given a string it is assumed to be the name of the constant in the
    :mod:`ssl` module or its abbrevation.
    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
    If it's neither `None` nor a string we assume it is already the numeric
    constant which can directly be passed to wrap_socket.
    uCERT_N(uNoneu	CERT_NONEu
isinstanceustrugetattrussl(u	candidateures((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/ssl_.pyuresolve_cert_reqs8suresolve_cert_reqscCs[|dkrtSt|t�rWtt|d�}|dkrSttd|�}n|S|S(u 
    like resolve_cert_reqs
    u	PROTOCOL_N(uNoneuPROTOCOL_SSLv23u
isinstanceustrugetattrussl(u	candidateures((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/ssl_.pyuresolve_ssl_versionOsuresolve_ssl_versionc
Cs�t|�}||_d}|j|O_|rxy|j|�Wqxtk
rt}	zt|	��WYdd}	~	XqxXn|r�|j||�ntr�|j|d|�S|j|�S(u�
        All arguments except `server_hostname` have the same meaning as for
        :func:`ssl.wrap_socket`

        :param server_hostname:
            Hostname of the expected certificate
        iNuserver_hostname(	u
SSLContextuverify_modeuoptionsuload_verify_locationsu	ExceptionuSSLErroruload_cert_chainuHAS_SNIuwrap_socket(
usockukeyfileucertfileu	cert_reqsuca_certsuserver_hostnameussl_versionucontextuOP_NO_COMPRESSIONue((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/ssl_.pyussl_wrap_socket`s
	"ussl_wrap_socketcCs(t|d|d|d|d|d|�S(Nukeyfileucertfileuca_certsu	cert_reqsussl_version(uwrap_socket(usockukeyfileucertfileu	cert_reqsuca_certsuserver_hostnameussl_version((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/ssl_.pyussl_wrap_socket�sF(ubinasciiuhexlifyu	unhexlifyuhashlibumd5usha1u
exceptionsuSSLErroruNoneu
SSLContextuFalseuHAS_SNIussluwrap_socketu	CERT_NONEuPROTOCOL_SSLv23uImportErroruassert_fingerprinturesolve_cert_reqsuresolve_ssl_versionussl_wrap_socket(((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/ssl_.pyu<module>s*
%		site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/timeout.cpython-33.pyc000064400000024372151733566760027534 0ustar00python3.3�
7�Re$c@s[ddlmZddlZddlmZdd�Ze�ZGdd�de�ZdS(	i(u_GLOBAL_DEFAULT_TIMEOUTNi(uTimeoutStateErrorcCs
tj�S(uQ
    Retrieve the current time, this function is mocked out in unit testing.
    (utime(((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyucurrent_timesucurrent_timecBs�|EeZdZdZeZdeedd�Zdd�Z	e
dd��Ze
dd	��Zd
d�Z
dd
�Zdd�Zedd��Zedd��ZdS(uTimeoutu
    Utility object for storing timeout values.

    Example usage:

    .. code-block:: python

        timeout = urllib3.util.Timeout(connect=2.0, read=7.0)
        pool = HTTPConnectionPool('www.google.com', 80, timeout=timeout)
        pool.request(...) # Etc, etc

    :param connect:
        The maximum amount of time to wait for a connection attempt to a server
        to succeed. Omitting the parameter will default the connect timeout to
        the system default, probably `the global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout for connection attempts.

    :type connect: integer, float, or None

    :param read:
        The maximum amount of time to wait between consecutive
        read operations for a response from the server. Omitting
        the parameter will default the read timeout to the system
        default, probably `the global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout.

    :type read: integer, float, or None

    :param total:
        This combines the connect and read timeouts into one; the read timeout
        will be set to the time leftover from the connect attempt. In the
        event that both a connect timeout and a total are specified, or a read
        timeout and a total are specified, the shorter timeout will be applied.

        Defaults to None.

    :type total: integer, float, or None

    .. note::

        Many factors can affect the total amount of time for urllib3 to return
        an HTTP response. Specifically, Python's DNS resolver does not obey the
        timeout specified on the socket. Other factors that can affect total
        request time include high CPU load, high swap, the program running at a
        low priority level, or other behaviors. The observed running time for
        urllib3 to return a response may be greater than the value passed to
        `total`.

        In addition, the read and total timeouts only measure the time between
        read operations on the socket connecting the client and the server,
        not the total amount of time for the request to return a complete
        response. For most requests, the timeout is raised because the server
        has not sent the first byte in the specified time. This is not always
        the case; if a server streams one byte every fifteen seconds, a timeout
        of 20 seconds will not ever trigger, even though the request will
        take several minutes to complete.

        If your goal is to cut off any request after a set amount of wall clock
        time, consider having a second "watcher" thread to cut off a slow
        request.
    cCsL|j|d�|_|j|d�|_|j|d�|_d|_dS(Nuconnectureadutotal(u_validate_timeoutu_connectu_readutotaluNoneu_start_connect(uselfutotaluconnecturead((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyu__init__WsuTimeout.__init__cCs&dt|�j|j|j|jfS(Nu!%s(connect=%r, read=%r, total=%r)(utypeu__name__u_connectu_readutotal(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyu__str__]suTimeout.__str__cCs�|tkr|jS|dks.||jkr2|Syt|�Wn.ttfk
rptd||f��YnXy)|dkr�td||f��nWn(tk
r�td||f��YnX|S(ut Check that a timeout attribute is valid

        :param value: The timeout value to validate
        :param name: The name of the timeout attribute to validate. This is used
            for clear error messages
        :return: the value
        :raises ValueError: if the type is not an integer or a float, or if it
            is a numeric value less than zero
        u8Timeout value %s was %s, but it must be an int or float.iuXAttempted to set %s timeout to %s, but the timeout cannot be set to a value less than 0.N(u_DefaultuDEFAULT_TIMEOUTuNoneufloatu	TypeErroru
ValueError(uclsuvalueuname((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyu_validate_timeoutbs"
uTimeout._validate_timeoutcCstd|d|�S(u� Create a new Timeout from a legacy timeout value.

        The timeout value used by httplib.py sets the same timeout on the
        connect(), and recv() socket requests. This creates a :class:`Timeout`
        object that sets the individual timeouts to the ``timeout`` value passed
        to this function.

        :param timeout: The legacy timeout value
        :type timeout: integer, float, sentinel default object, or None
        :return: a Timeout object
        :rtype: :class:`Timeout`
        ureaduconnect(uTimeout(uclsutimeout((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyu
from_float�suTimeout.from_floatcCs"td|jd|jd|j�S(u Create a copy of the timeout object

        Timeout properties are stored per-pool but each request needs a fresh
        Timeout object to ensure each one has its own start/stop configured.

        :return: a copy of the timeout object
        :rtype: :class:`Timeout`
        uconnectureadutotal(uTimeoutu_connectu_readutotal(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyuclone�su
Timeout.clonecCs1|jdk	rtd��nt�|_|jS(u� Start the timeout clock, used during a connect() attempt

        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to start a timer that has been started already.
        u'Timeout timer has already been started.N(u_start_connectuNoneuTimeoutStateErrorucurrent_time(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyu
start_connect�suTimeout.start_connectcCs,|jdkrtd��nt�|jS(u Gets the time elapsed since the call to :meth:`start_connect`.

        :return: the elapsed time
        :rtype: float
        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to get duration for a timer that hasn't been started.
        u:Can't get connect duration for timer that has not started.N(u_start_connectuNoneuTimeoutStateErrorucurrent_time(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyuget_connect_duration�suTimeout.get_connect_durationcCsQ|jdkr|jS|jdks7|j|jkr>|jSt|j|j�S(u% Get the value to use when setting a connection timeout.

        This will be a positive float or integer, the value None
        (never timeout), or the default system timeout.

        :return: the connect timeout
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        N(utotaluNoneu_connectuDEFAULT_TIMEOUTumin(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyuconnect_timeout�s

!uTimeout.connect_timeoutcCs�|jdk	r~|j|jk	r~|jdk	r~|j|jk	r~|jdkrX|jStdt|j|j�|j��S|jdk	r�|j|jk	r�td|j|j��S|jSdS(u� Get the value for the read timeout.

        This assumes some time has elapsed in the connection timeout and
        computes the read timeout appropriately.

        If self.total is set, the read timeout is dependent on the amount of
        time taken by the connect timeout. If the connection time has not been
        established, a :exc:`~urllib3.exceptions.TimeoutStateError` will be
        raised.

        :return: the value to use for the read timeout
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        :raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
            has not yet been called on this object.
        iN(utotaluNoneuDEFAULT_TIMEOUTu_readu_start_connectumaxuminuget_connect_duration(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyuread_timeout�s
!uTimeout.read_timeoutN(u__name__u
__module__u__qualname__u__doc__u_GLOBAL_DEFAULT_TIMEOUTuDEFAULT_TIMEOUTuNoneu_Defaultu__init__u__str__uclassmethodu_validate_timeoutu
from_floatucloneu
start_connectuget_connect_durationupropertyuconnect_timeouturead_timeout(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyuTimeouts?"
uTimeout(	usocketu_GLOBAL_DEFAULT_TIMEOUTutimeu
exceptionsuTimeoutStateErrorucurrent_timeuobjectu_DefaultuTimeout(((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/util/timeout.pyu<module>s
	python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py000064400000000542151733566760023473 0ustar00def is_fp_closed(obj):
    """
    Checks whether a given file-like object is closed.

    :param obj:
        The file-like object to check.
    """
    if hasattr(obj, 'fp'):
        # Object is a container for another file-like object that gets released
        # on exhaustion (e.g. HTTPResponse)
        return obj.fp is None

    return obj.closed
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py000064400000022024151733566760023322 0ustar00from socket import _GLOBAL_DEFAULT_TIMEOUT
import time

from ..exceptions import TimeoutStateError


def current_time():
    """
    Retrieve the current time, this function is mocked out in unit testing.
    """
    return time.time()


_Default = object()
# The default timeout to use for socket connections. This is the attribute used
# by httplib to define the default timeout


class Timeout(object):
    """
    Utility object for storing timeout values.

    Example usage:

    .. code-block:: python

        timeout = urllib3.util.Timeout(connect=2.0, read=7.0)
        pool = HTTPConnectionPool('www.google.com', 80, timeout=timeout)
        pool.request(...) # Etc, etc

    :param connect:
        The maximum amount of time to wait for a connection attempt to a server
        to succeed. Omitting the parameter will default the connect timeout to
        the system default, probably `the global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout for connection attempts.

    :type connect: integer, float, or None

    :param read:
        The maximum amount of time to wait between consecutive
        read operations for a response from the server. Omitting
        the parameter will default the read timeout to the system
        default, probably `the global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout.

    :type read: integer, float, or None

    :param total:
        This combines the connect and read timeouts into one; the read timeout
        will be set to the time leftover from the connect attempt. In the
        event that both a connect timeout and a total are specified, or a read
        timeout and a total are specified, the shorter timeout will be applied.

        Defaults to None.

    :type total: integer, float, or None

    .. note::

        Many factors can affect the total amount of time for urllib3 to return
        an HTTP response. Specifically, Python's DNS resolver does not obey the
        timeout specified on the socket. Other factors that can affect total
        request time include high CPU load, high swap, the program running at a
        low priority level, or other behaviors. The observed running time for
        urllib3 to return a response may be greater than the value passed to
        `total`.

        In addition, the read and total timeouts only measure the time between
        read operations on the socket connecting the client and the server,
        not the total amount of time for the request to return a complete
        response. For most requests, the timeout is raised because the server
        has not sent the first byte in the specified time. This is not always
        the case; if a server streams one byte every fifteen seconds, a timeout
        of 20 seconds will not ever trigger, even though the request will
        take several minutes to complete.

        If your goal is to cut off any request after a set amount of wall clock
        time, consider having a second "watcher" thread to cut off a slow
        request.
    """

    #: A sentinel object representing the default timeout value
    DEFAULT_TIMEOUT = _GLOBAL_DEFAULT_TIMEOUT

    def __init__(self, total=None, connect=_Default, read=_Default):
        self._connect = self._validate_timeout(connect, 'connect')
        self._read = self._validate_timeout(read, 'read')
        self.total = self._validate_timeout(total, 'total')
        self._start_connect = None

    def __str__(self):
        return '%s(connect=%r, read=%r, total=%r)' % (
            type(self).__name__, self._connect, self._read, self.total)


    @classmethod
    def _validate_timeout(cls, value, name):
        """ Check that a timeout attribute is valid

        :param value: The timeout value to validate
        :param name: The name of the timeout attribute to validate. This is used
            for clear error messages
        :return: the value
        :raises ValueError: if the type is not an integer or a float, or if it
            is a numeric value less than zero
        """
        if value is _Default:
            return cls.DEFAULT_TIMEOUT

        if value is None or value is cls.DEFAULT_TIMEOUT:
            return value

        try:
            float(value)
        except (TypeError, ValueError):
            raise ValueError("Timeout value %s was %s, but it must be an "
                             "int or float." % (name, value))

        try:
            if value < 0:
                raise ValueError("Attempted to set %s timeout to %s, but the "
                                 "timeout cannot be set to a value less "
                                 "than 0." % (name, value))
        except TypeError: # Python 3
            raise ValueError("Timeout value %s was %s, but it must be an "
                             "int or float." % (name, value))

        return value

    @classmethod
    def from_float(cls, timeout):
        """ Create a new Timeout from a legacy timeout value.

        The timeout value used by httplib.py sets the same timeout on the
        connect(), and recv() socket requests. This creates a :class:`Timeout`
        object that sets the individual timeouts to the ``timeout`` value passed
        to this function.

        :param timeout: The legacy timeout value
        :type timeout: integer, float, sentinel default object, or None
        :return: a Timeout object
        :rtype: :class:`Timeout`
        """
        return Timeout(read=timeout, connect=timeout)

    def clone(self):
        """ Create a copy of the timeout object

        Timeout properties are stored per-pool but each request needs a fresh
        Timeout object to ensure each one has its own start/stop configured.

        :return: a copy of the timeout object
        :rtype: :class:`Timeout`
        """
        # We can't use copy.deepcopy because that will also create a new object
        # for _GLOBAL_DEFAULT_TIMEOUT, which socket.py uses as a sentinel to
        # detect the user default.
        return Timeout(connect=self._connect, read=self._read,
                       total=self.total)

    def start_connect(self):
        """ Start the timeout clock, used during a connect() attempt

        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to start a timer that has been started already.
        """
        if self._start_connect is not None:
            raise TimeoutStateError("Timeout timer has already been started.")
        self._start_connect = current_time()
        return self._start_connect

    def get_connect_duration(self):
        """ Gets the time elapsed since the call to :meth:`start_connect`.

        :return: the elapsed time
        :rtype: float
        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to get duration for a timer that hasn't been started.
        """
        if self._start_connect is None:
            raise TimeoutStateError("Can't get connect duration for timer "
                                    "that has not started.")
        return current_time() - self._start_connect

    @property
    def connect_timeout(self):
        """ Get the value to use when setting a connection timeout.

        This will be a positive float or integer, the value None
        (never timeout), or the default system timeout.

        :return: the connect timeout
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        """
        if self.total is None:
            return self._connect

        if self._connect is None or self._connect is self.DEFAULT_TIMEOUT:
            return self.total

        return min(self._connect, self.total)

    @property
    def read_timeout(self):
        """ Get the value for the read timeout.

        This assumes some time has elapsed in the connection timeout and
        computes the read timeout appropriately.

        If self.total is set, the read timeout is dependent on the amount of
        time taken by the connect timeout. If the connection time has not been
        established, a :exc:`~urllib3.exceptions.TimeoutStateError` will be
        raised.

        :return: the value to use for the read timeout
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        :raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
            has not yet been called on this object.
        """
        if (self.total is not None and
            self.total is not self.DEFAULT_TIMEOUT and
            self._read is not None and
            self._read is not self.DEFAULT_TIMEOUT):
            # in case the connect timeout has not yet been established.
            if self._start_connect is None:
                return self._read
            return max(0, min(self.total - self.get_connect_duration(),
                              self._read))
        elif self.total is not None and self.total is not self.DEFAULT_TIMEOUT:
            return max(0, self.total - self.get_connect_duration())
        else:
            return self._read
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py000064400000001156151733566760023376 0ustar00# urllib3/util/__init__.py
# Copyright 2008-2014 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

from .connection import is_connection_dropped
from .request import make_headers
from .response import is_fp_closed
from .ssl_ import (
    SSLContext,
    HAS_SNI,
    assert_fingerprint,
    resolve_cert_reqs,
    resolve_ssl_version,
    ssl_wrap_socket,
)
from .timeout import (
    current_time,
    Timeout,
)
from .url import (
    get_host,
    parse_url,
    split_first,
    Url,
)
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py000064400000003604151733566760023327 0ustar00from base64 import b64encode

from ..packages import six


ACCEPT_ENCODING = 'gzip,deflate'


def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
                 basic_auth=None, proxy_basic_auth=None):
    """
    Shortcuts for generating request headers.

    :param keep_alive:
        If ``True``, adds 'connection: keep-alive' header.

    :param accept_encoding:
        Can be a boolean, list, or string.
        ``True`` translates to 'gzip,deflate'.
        List will get joined by comma.
        String will be used as provided.

    :param user_agent:
        String representing the user-agent you want, such as
        "python-urllib3/0.6"

    :param basic_auth:
        Colon-separated username:password string for 'authorization: basic ...'
        auth header.

    :param proxy_basic_auth:
        Colon-separated username:password string for 'proxy-authorization: basic ...'
        auth header.

    Example: ::

        >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
        {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
        >>> make_headers(accept_encoding=True)
        {'accept-encoding': 'gzip,deflate'}
    """
    headers = {}
    if accept_encoding:
        if isinstance(accept_encoding, str):
            pass
        elif isinstance(accept_encoding, list):
            accept_encoding = ','.join(accept_encoding)
        else:
            accept_encoding = ACCEPT_ENCODING
        headers['accept-encoding'] = accept_encoding

    if user_agent:
        headers['user-agent'] = user_agent

    if keep_alive:
        headers['connection'] = 'keep-alive'

    if basic_auth:
        headers['authorization'] = 'Basic ' + \
            b64encode(six.b(basic_auth)).decode('utf-8')

    if proxy_basic_auth:
        headers['proxy-authorization'] = 'Basic ' + \
            b64encode(six.b(proxy_basic_auth)).decode('utf-8')

    return headers


python3.3/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py000064400000006444151733566760023050 0ustar00# urllib3/exceptions.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php


## Base Exceptions

class HTTPError(Exception):
    "Base exception used by this module."
    pass


class PoolError(HTTPError):
    "Base exception for errors caused within a pool."
    def __init__(self, pool, message):
        self.pool = pool
        HTTPError.__init__(self, "%s: %s" % (pool, message))

    def __reduce__(self):
        # For pickling purposes.
        return self.__class__, (None, None)


class RequestError(PoolError):
    "Base exception for PoolErrors that have associated URLs."
    def __init__(self, pool, url, message):
        self.url = url
        PoolError.__init__(self, pool, message)

    def __reduce__(self):
        # For pickling purposes.
        return self.__class__, (None, self.url, None)


class SSLError(HTTPError):
    "Raised when SSL certificate fails in an HTTPS connection."
    pass


class ProxyError(HTTPError):
    "Raised when the connection to a proxy fails."
    pass


class ConnectionError(HTTPError):
    "Raised when a normal connection fails."
    pass


class DecodeError(HTTPError):
    "Raised when automatic decoding based on Content-Type fails."
    pass


## Leaf Exceptions

class MaxRetryError(RequestError):
    "Raised when the maximum number of retries is exceeded."

    def __init__(self, pool, url, reason=None):
        self.reason = reason

        message = "Max retries exceeded with url: %s" % url
        if reason:
            message += " (Caused by %s: %s)" % (type(reason), reason)
        else:
            message += " (Caused by redirect)"

        RequestError.__init__(self, pool, url, message)


class HostChangedError(RequestError):
    "Raised when an existing pool gets a request for a foreign host."

    def __init__(self, pool, url, retries=3):
        message = "Tried to open a foreign host with url: %s" % url
        RequestError.__init__(self, pool, url, message)
        self.retries = retries


class TimeoutStateError(HTTPError):
    """ Raised when passing an invalid state to a timeout """
    pass


class TimeoutError(HTTPError):
    """ Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    """
    pass


class ReadTimeoutError(TimeoutError, RequestError):
    "Raised when a socket timeout occurs while receiving data from a server"
    pass


# This timeout error does not have a URL attached and needs to inherit from the
# base HTTPError
class ConnectTimeoutError(TimeoutError):
    "Raised when a socket timeout occurs while connecting to a server"
    pass


class EmptyPoolError(PoolError):
    "Raised when a pool runs out of connections and no more are allowed."
    pass


class ClosedPoolError(PoolError):
    "Raised when a request enters a pool after the pool has been closed."
    pass


class LocationParseError(ValueError, HTTPError):
    "Raised when get_host or similar fails to parse the URL input."

    def __init__(self, location):
        message = "Failed to parse: %s" % location
        HTTPError.__init__(self, message)

        self.location = location
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py000064400000021421151733566760023163 0ustar00# urllib3/poolmanager.py
# Copyright 2008-2014 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import logging

try:  # Python 3
    from urllib.parse import urljoin
except ImportError:
    from urlparse import urljoin

from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from .connectionpool import port_by_scheme
from .request import RequestMethods
from .util import parse_url


__all__ = ['PoolManager', 'ProxyManager', 'proxy_from_url']


pool_classes_by_scheme = {
    'http': HTTPConnectionPool,
    'https': HTTPSConnectionPool,
}

log = logging.getLogger(__name__)

SSL_KEYWORDS = ('key_file', 'cert_file', 'cert_reqs', 'ca_certs',
                'ssl_version')


class PoolManager(RequestMethods):
    """
    Allows for arbitrary requests while transparently keeping track of
    necessary connection pools for you.

    :param num_pools:
        Number of connection pools to cache before discarding the least
        recently used pool.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param \**connection_pool_kw:
        Additional parameters are used to create fresh
        :class:`urllib3.connectionpool.ConnectionPool` instances.

    Example: ::

        >>> manager = PoolManager(num_pools=2)
        >>> r = manager.request('GET', 'http://google.com/')
        >>> r = manager.request('GET', 'http://google.com/mail')
        >>> r = manager.request('GET', 'http://yahoo.com/')
        >>> len(manager.pools)
        2

    """

    proxy = None

    def __init__(self, num_pools=10, headers=None, **connection_pool_kw):
        RequestMethods.__init__(self, headers)
        self.connection_pool_kw = connection_pool_kw
        self.pools = RecentlyUsedContainer(num_pools,
                                           dispose_func=lambda p: p.close())

    def _new_pool(self, scheme, host, port):
        """
        Create a new :class:`ConnectionPool` based on host, port and scheme.

        This method is used to actually create the connection pools handed out
        by :meth:`connection_from_url` and companion methods. It is intended
        to be overridden for customization.
        """
        pool_cls = pool_classes_by_scheme[scheme]
        kwargs = self.connection_pool_kw
        if scheme == 'http':
            kwargs = self.connection_pool_kw.copy()
            for kw in SSL_KEYWORDS:
                kwargs.pop(kw, None)

        return pool_cls(host, port, **kwargs)

    def clear(self):
        """
        Empty our store of pools and direct them all to close.

        This will not affect in-flight connections, but they will not be
        re-used after completion.
        """
        self.pools.clear()

    def connection_from_host(self, host, port=None, scheme='http'):
        """
        Get a :class:`ConnectionPool` based on the host, port, and scheme.

        If ``port`` isn't given, it will be derived from the ``scheme`` using
        ``urllib3.connectionpool.port_by_scheme``.
        """

        scheme = scheme or 'http'

        port = port or port_by_scheme.get(scheme, 80)

        pool_key = (scheme, host, port)

        with self.pools.lock:
            # If the scheme, host, or port doesn't match existing open
            # connections, open a new ConnectionPool.
            pool = self.pools.get(pool_key)
            if pool:
                return pool

            # Make a fresh ConnectionPool of the desired type
            pool = self._new_pool(scheme, host, port)
            self.pools[pool_key] = pool
        return pool

    def connection_from_url(self, url):
        """
        Similar to :func:`urllib3.connectionpool.connection_from_url` but
        doesn't pass any additional parameters to the
        :class:`urllib3.connectionpool.ConnectionPool` constructor.

        Additional parameters are taken from the :class:`.PoolManager`
        constructor.
        """
        u = parse_url(url)
        return self.connection_from_host(u.host, port=u.port, scheme=u.scheme)

    def urlopen(self, method, url, redirect=True, **kw):
        """
        Same as :meth:`urllib3.connectionpool.HTTPConnectionPool.urlopen`
        with custom cross-host redirect logic and only sends the request-uri
        portion of the ``url``.

        The given ``url`` parameter must be absolute, such that an appropriate
        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
        """
        u = parse_url(url)
        conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)

        kw['assert_same_host'] = False
        kw['redirect'] = False
        if 'headers' not in kw:
            kw['headers'] = self.headers

        if self.proxy is not None and u.scheme == "http":
            response = conn.urlopen(method, url, **kw)
        else:
            response = conn.urlopen(method, u.request_uri, **kw)

        redirect_location = redirect and response.get_redirect_location()
        if not redirect_location:
            return response

        # Support relative URLs for redirecting.
        redirect_location = urljoin(url, redirect_location)

        # RFC 2616, Section 10.3.4
        if response.status == 303:
            method = 'GET'

        log.info("Redirecting %s -> %s" % (url, redirect_location))
        kw['retries'] = kw.get('retries', 3) - 1  # Persist retries countdown
        kw['redirect'] = redirect
        return self.urlopen(method, redirect_location, **kw)


class ProxyManager(PoolManager):
    """
    Behaves just like :class:`PoolManager`, but sends all requests through
    the defined proxy, using the CONNECT method for HTTPS URLs.

    :param proxy_url:
        The URL of the proxy to be used.

    :param proxy_headers:
        A dictionary contaning headers that will be sent to the proxy. In case
        of HTTP they are being sent with each request, while in the
        HTTPS/CONNECT case they are sent only once. Could be used for proxy
        authentication.

    Example:
        >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
        >>> r1 = proxy.request('GET', 'http://google.com/')
        >>> r2 = proxy.request('GET', 'http://httpbin.org/')
        >>> len(proxy.pools)
        1
        >>> r3 = proxy.request('GET', 'https://httpbin.org/')
        >>> r4 = proxy.request('GET', 'https://twitter.com/')
        >>> len(proxy.pools)
        3

    """

    def __init__(self, proxy_url, num_pools=10, headers=None,
                 proxy_headers=None, **connection_pool_kw):

        if isinstance(proxy_url, HTTPConnectionPool):
            proxy_url = '%s://%s:%i' % (proxy_url.scheme, proxy_url.host,
                                        proxy_url.port)
        proxy = parse_url(proxy_url)
        if not proxy.port:
            port = port_by_scheme.get(proxy.scheme, 80)
            proxy = proxy._replace(port=port)
        self.proxy = proxy
        self.proxy_headers = proxy_headers or {}
        assert self.proxy.scheme in ("http", "https"), \
            'Not supported proxy scheme %s' % self.proxy.scheme
        connection_pool_kw['_proxy'] = self.proxy
        connection_pool_kw['_proxy_headers'] = self.proxy_headers
        super(ProxyManager, self).__init__(
            num_pools, headers, **connection_pool_kw)

    def connection_from_host(self, host, port=None, scheme='http'):
        if scheme == "https":
            return super(ProxyManager, self).connection_from_host(
                host, port, scheme)

        return super(ProxyManager, self).connection_from_host(
            self.proxy.host, self.proxy.port, self.proxy.scheme)

    def _set_proxy_headers(self, url, headers=None):
        """
        Sets headers needed by proxies: specifically, the Accept and Host
        headers. Only sets headers not provided by the user.
        """
        headers_ = {'Accept': '*/*'}

        netloc = parse_url(url).netloc
        if netloc:
            headers_['Host'] = netloc

        if headers:
            headers_.update(headers)
        return headers_

    def urlopen(self, method, url, redirect=True, **kw):
        "Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute."
        u = parse_url(url)

        if u.scheme == "http":
            # For proxied HTTPS requests, httplib sets the necessary headers
            # on the CONNECT to the proxy. For HTTP, we'll definitely
            # need to set 'Host' at the very least.
            kw['headers'] = self._set_proxy_headers(url, kw.get('headers',
                                                                self.headers))

        return super(ProxyManager, self).urlopen(method, url, redirect, **kw)


def proxy_from_url(url, **kw):
    return ProxyManager(proxy_url=url, **kw)
site-packages/pip/_vendor/requests/packages/urllib3/packages/__pycache__/__init__.cpython-33.pyc000064400000000517151733566760030401 0ustar00python3.3�
7�ReJc@s$ddlmZddlmZdS(i(uabsolute_importi(ussl_match_hostnameN(u
__future__uabsolute_importuussl_match_hostname(((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/__init__.pyu<module>ssite-packages/pip/_vendor/requests/packages/urllib3/packages/__pycache__/ordered_dict.cpython-33.pyc000064400000031320151733566760031265 0ustar00python3.3�
7�Re�"c@s�yddlmZWn"ek
r8ddlmZYnXy ddlmZmZmZWnek
rmYnXGdd�de	�Z
dS(i(u	get_ident(uKeysViewu
ValuesViewu	ItemsViewcBsv|EeZdZdZdd�Zejdd�Zejdd�Zdd	�Zd
d�Z	dd
�Z
d5dd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�ZeZe�Zedd�Zd4d d!�Zid"d#�Zd$d%�Zd&d'�Zed4d(d)��Zd*d+�Zd,d-�Z d.d/�Z!d0d1�Z"d2d3�Z#d4S(6uOrderedDictu)Dictionary that remembers insertion ordercOs�t|�dkr+tdt|���ny|jWnAtk
ryg|_}||dg|dd�<i|_YnX|j||�dS(u�Initialize an ordered dictionary.  Signature is the same as for
        regular dictionaries, but keyword arguments are not recommended
        because their insertion order is arbitrary.

        iu$expected at most 1 arguments, got %dN(ulenu	TypeErroru_OrderedDict__rootuAttributeErroruNoneu_OrderedDict__mapu_OrderedDict__update(uselfuargsukwdsuroot((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu__init__s

uOrderedDict.__init__cCs\||krH|j}|d}|||g|d<|d<|j|<n||||�dS(u!od.__setitem__(i, y) <==> od[i]=yiiN(u_OrderedDict__rootu_OrderedDict__map(uselfukeyuvalueudict_setitemurootulast((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu__setitem__-s
	
)uOrderedDict.__setitem__cCs@|||�|jj|�\}}}||d<||d<dS(u od.__delitem__(y) <==> del od[y]iiN(u_OrderedDict__mapupop(uselfukeyudict_delitemu	link_prevu	link_next((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu__delitem__7s

uOrderedDict.__delitem__ccs=|j}|d}x#||k	r8|dV|d}qWdS(uod.__iter__() <==> iter(od)iiN(u_OrderedDict__root(uselfurootucurr((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu__iter__@s
	
	uOrderedDict.__iter__ccs=|j}|d}x#||k	r8|dV|d}qWdS(u#od.__reversed__() <==> reversed(od)iiN(u_OrderedDict__root(uselfurootucurr((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu__reversed__Hs
	
	uOrderedDict.__reversed__cCs�yZx$|jj�D]}|dd�=qW|j}||dg|dd�<|jj�Wntk
rnYnXtj|�dS(u.od.clear() -> None.  Remove all items from od.N(u_OrderedDict__mapu
itervaluesu_OrderedDict__rootuNoneuclearuAttributeErrorudict(uselfunodeuroot((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyuclearPs	
uOrderedDict.clearcCs�|std��n|j}|rO|d}|d}||d<||d<n(|d}|d}||d<||d<|d}|j|=tj||�}||fS(u�od.popitem() -> (k, v), return and remove a (key, value) pair.
        Pairs are returned in LIFO order if last is true or FIFO order if false.

        udictionary is emptyiii(uKeyErroru_OrderedDict__rootu_OrderedDict__mapudictupop(uselfulasturootulinku	link_prevu	link_nextukeyuvalue((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyupopitem\s 	









uOrderedDict.popitemcCs
t|�S(uod.keys() -> list of keys in od(ulist(uself((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyukeysusuOrderedDict.keyscs�fdd��D�S(u#od.values() -> list of values in odcsg|]}�|�qS(((u.0ukey(uself(uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu
<listcomp>{s	u&OrderedDict.values.<locals>.<listcomp>((uself((uselfuT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyuvaluesysuOrderedDict.valuescs�fdd��D�S(u.od.items() -> list of (key, value) pairs in odcs g|]}|�|f�qS(((u.0ukey(uself(uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu
<listcomp>s	u%OrderedDict.items.<locals>.<listcomp>((uself((uselfuT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyuitems}suOrderedDict.itemscCs
t|�S(u0od.iterkeys() -> an iterator over the keys in od(uiter(uself((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyuiterkeys�suOrderedDict.iterkeysccsx|D]}||VqWdS(u2od.itervalues -> an iterator over the values in odN((uselfuk((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu
itervalues�s
uOrderedDict.itervaluesccs$x|D]}|||fVqWdS(u=od.iteritems -> an iterator over the (key, value) items in odN((uselfuk((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu	iteritems�s
uOrderedDict.iteritemscOs&t|�dkr.tdt|�f��n|sCtd��n|d}f}t|�dkrr|d}nt|t�r�xw|D]}||||<q�WnXt|d�r�xF|j�D]}||||<q�Wn!x|D]\}}|||<q�Wx$|j�D]\}}|||<qWdS(u�od.update(E, **F) -> None.  Update od from dict/iterable E and F.

        If E is a dict instance, does:           for k in E: od[k] = E[k]
        If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
        Or if E is an iterable of items, does:   for k, v in E: od[k] = v
        In either case, this is followed by:     for k, v in F.items(): od[k] = v

        iu8update() takes at most 2 positional arguments (%d given)u,update() takes at least 1 argument (0 given)iiukeysN(ulenu	TypeErroru
isinstanceudictuhasattrukeysuitems(uargsukwdsuselfuotherukeyuvalue((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyuupdate�s&	


uOrderedDict.updatecCsC||kr!||}||=|S||jkr?t|��n|S(u�od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
        If key is not found, d is returned if given, otherwise KeyError is raised.

        (u_OrderedDict__markeruKeyError(uselfukeyudefaulturesult((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyupop�s
uOrderedDict.popcCs"||kr||S|||<|S(uDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od((uselfukeyudefault((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu
setdefault�s
uOrderedDict.setdefaultcCsst|�t�f}||kr%dSd||<z5|sId|jjfSd|jj|j�fSWd||=XdS(uod.__repr__() <==> repr(od)u...iu%s()u%s(%r)N(uidu
_get_identu	__class__u__name__uitems(uselfu
_repr_runningucall_key((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu__repr__�s
uOrderedDict.__repr__cs~�fdd��D�}t��j�}x'tt��D]}|j|d�q;W|rn�j|f|fS�j|ffS(u%Return state information for picklingcs g|]}|�|g�qS(((u.0uk(uself(uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu
<listcomp>�s	u*OrderedDict.__reduce__.<locals>.<listcomp>N(uvarsucopyuOrderedDictupopuNoneu	__class__(uselfuitemsu	inst_dictuk((uselfuT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu
__reduce__�suOrderedDict.__reduce__cCs
|j|�S(u!od.copy() -> a shallow copy of od(u	__class__(uself((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyucopy�suOrderedDict.copycCs(|�}x|D]}|||<qW|S(u�OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
        and values equal to v (which defaults to None).

        ((uclsuiterableuvalueudukey((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyufromkeys�s	
uOrderedDict.fromkeyscCsMt|t�r=t|�t|�ko<|j�|j�kStj||�S(u�od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
        while comparison to a regular mapping is order-insensitive.

        (u
isinstanceuOrderedDictulenuitemsudictu__eq__(uselfuother((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu__eq__�s.uOrderedDict.__eq__cCs||kS(N((uselfuother((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu__ne__�suOrderedDict.__ne__cCs
t|�S(u@od.viewkeys() -> a set-like object providing a view on od's keys(uKeysView(uself((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyuviewkeys�suOrderedDict.viewkeyscCs
t|�S(u<od.viewvalues() -> an object providing a view on od's values(u
ValuesView(uself((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu
viewvalues�suOrderedDict.viewvaluescCs
t|�S(uBod.viewitems() -> a set-like object providing a view on od's items(u	ItemsView(uself((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu	viewitemssuOrderedDict.viewitemsNT($u__name__u
__module__u__qualname__u__doc__u__init__udictu__setitem__u__delitem__u__iter__u__reversed__uclearuTrueupopitemukeysuvaluesuitemsuiterkeysu
itervaluesu	iteritemsuupdateu_OrderedDict__updateuobjectu_OrderedDict__markerupopuNoneu
setdefaultu__repr__u
__reduce__ucopyuclassmethodufromkeysu__eq__u__ne__uviewkeysu
viewvaluesu	viewitems(u
__locals__((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyuOrderedDicts:
		



	uOrderedDictN(uthreadu	get_identu
_get_identuImportErrorudummy_threadu_abcolluKeysViewu
ValuesViewu	ItemsViewudictuOrderedDict(((uT/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyu<module>s
 
site-packages/pip/_vendor/requests/packages/urllib3/packages/__pycache__/six.cpython-33.pyc000064400000037734151733566760027460 0ustar00python3.3�
7�Rel-c2@s�dZddlZddlZddlZdZdZejddkZer�efZ	e
fZefZ
eZeZejZn�efZ	e
efZeejfZ
eZeZejjd�r�e
d��ZnWGd	d
�d
e�Zyee��Wnek
re
d��ZYnXe
d��Z[dd
�Zdd�ZGdd�de�ZGdd�de�Z Gdd�de�Z!Gdd�dej"�Z#e!dddd�e!ddddd�e!dd dd!d�e!d"ddd#d"�e!d$d d%d&�e!d'd d(�e!ddd�e!d)d dd)d*�e!d+ddd,d+�e dd �e d-d.�e d/d0�e d1d2d3�e d4d5d6�e d7d8d9�e d:d;d<�e d=d>d?�e d@d@dA�e dBdBdA�e dCdCdA�e dDdDdE�e dFdG�e dHdI�e dJdK�e dLdM�e dNdOdP�e dQdRdS�e dTdUdV�e dWdXdY�e dZd[d\�e d]d^d_�e d`dadb�e dcddde�e dfdgdh�e didjdS�e dkdldm�e dndodp�e dqdrdY�e dsdtdu�e dvdw�g(Z$x!e$D]Z%e&e#e%j'e%�qW[%e#dx�Z(ej)e*dy<dzd{�Z+d|d}�Z,er�d~Z-dZ.d�Z/d�Z0d�Z1d�Z2d�Z3n*d�Z-d�Z.d�Z/d�Z0d�Z1d�Z2d�Z3y
e4Z5Wne6k
r�d�d��Z5YnXe5Z4erd�d��Z7eZ8d�d��Z9n(d�d��Z7Gd�d��d�e�Z8e9Z9ee7d��ej:e-�Z;ej:e.�Z<ej:e/�Z=ej:e0�Z>d�d��Z?d�d��Z@d�d��ZAer!d�d��ZBd�d��ZCejddkr�d�d��ZDnejEd�dd��ZDddlFZFeFjGZGeFjHZHn7d�d��ZBd�d��ZCeIZDddlGZGeGjGZGZHeeBd��eeCd��er�ddlJZJeKeJd��ZLdd�d��ZNeKeJd��ZO[Jn(ddd�d��ZLeLd��d�d��ZOeeNd��ed�d��ZPdS(�u6Utilities for writing code that runs on Python 2 and 3iNu'Benjamin Peterson <benjamin@python.org>u1.2.0iujavaiicBs |EeZdZdd�ZdS(uXcCsdS(Niil((uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu__len__6su	X.__len__N(u__name__u
__module__u__qualname__u__len__(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuX5suXi?cCs
||_dS(u Add documentation to a function.N(u__doc__(ufuncudoc((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu_add_docCsu_add_doccCst|�tj|S(u7Import module, returning the module after the last dot.(u
__import__usysumodules(uname((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu_import_moduleHs
u_import_modulecBs,|EeZdZdd�Zdd�ZdS(u
_LazyDescrcCs
||_dS(N(uname(uselfuname((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu__init__Psu_LazyDescr.__init__cCs3|j�}t||j|�t||j�|S(N(u_resolveusetattrunameudelattr(uselfuobjutpuresult((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu__get__Ssu_LazyDescr.__get__N(u__name__u
__module__u__qualname__u__init__u__get__(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu
_LazyDescrNsu
_LazyDescrcs5|EeZdZd�fdd�Zdd�Z�S(uMovedModulecsJtt|�j|�tr=|dkr1|}n||_n	||_dS(N(usuperuMovedModuleu__init__uPY3uNoneumod(uselfunameuoldunew(u	__class__(uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu__init__]s	uMovedModule.__init__cCs
t|j�S(N(u_import_moduleumod(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu_resolvefsuMovedModule._resolveN(u__name__u
__module__u__qualname__uNoneu__init__u_resolve(u
__locals__((u	__class__uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuMovedModule[s	uMovedModulecs8|EeZdZdd�fdd�Zdd�Z�S(uMovedAttributecs�tt|�j|�trp|dkr1|}n||_|dkrd|dkr[|}qd|}n||_n'||_|dkr�|}n||_dS(N(usuperuMovedAttributeu__init__uPY3uNoneumoduattr(uselfunameuold_modunew_moduold_attrunew_attr(u	__class__(uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu__init__ls						uMovedAttribute.__init__cCst|j�}t||j�S(N(u_import_moduleumodugetattruattr(uselfumodule((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu_resolve~suMovedAttribute._resolveN(u__name__u
__module__u__qualname__uNoneu__init__u_resolve(u
__locals__((u	__class__uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuMovedAttributejsuMovedAttributecBs|EeZdZdZdS(u_MovedItemsuLazy loading of moved objectsN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu_MovedItems�su_MovedItemsu	cStringIOuiouStringIOufilteru	itertoolsubuiltinsuifilteruinputu__builtin__u	raw_inputumapuimapu
reload_moduleuimpureloadureduceu	functoolsuxrangeurangeuzipuizipuconfigparseruConfigParserucopyregucopy_reguhttp_cookiejaru	cookielibuhttp.cookiejaruhttp_cookiesuCookieuhttp.cookiesu
html_entitiesuhtmlentitydefsu
html.entitiesuhtml_parseru
HTMLParseruhtml.parseruhttp_clientuhttplibuhttp.clientuBaseHTTPServeruhttp.serveru
CGIHTTPServeruSimpleHTTPServerucPickleupickleuqueueuQueueureprlibureprusocketserveruSocketServerutkinteruTkinterutkinter_dialoguDialogutkinter.dialogutkinter_filedialogu
FileDialogutkinter.filedialogutkinter_scrolledtextuScrolledTextutkinter.scrolledtextutkinter_simpledialoguSimpleDialogutkinter.simpledialogutkinter_tixuTixutkinter.tixutkinter_constantsuTkconstantsutkinter.constantsutkinter_dnduTkdndutkinter.dndutkinter_colorchooserutkColorChooserutkinter.colorchooserutkinter_commondialogutkCommonDialogutkinter.commondialogutkinter_tkfiledialogutkFileDialogutkinter_fontutkFontutkinter.fontutkinter_messageboxutkMessageBoxutkinter.messageboxutkinter_tksimpledialogutkSimpleDialoguurllib_robotparserurobotparseruurllib.robotparseruwinregu_winregumovesu.movescCstt|j|�dS(uAdd an item to six.moves.N(usetattru_MovedItemsuname(umove((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuadd_move�suadd_movecCs`ytt|�WnHtk
r[ytj|=Wn%tk
rVtd|f��YnXYnXdS(uRemove item from six.moves.uno such move, %rN(udelattru_MovedItemsuAttributeErrorumovesu__dict__uKeyError(uname((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuremove_move�s

uremove_moveu__func__u__self__u__code__u__defaults__ukeysuvaluesuitemsuim_funcuim_selfu	func_codeu
func_defaultsuiterkeysu
itervaluesu	iteritemscCs
|j�S(N(unext(uit((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuadvance_iterator�suadvance_iteratorcCs|S(N((uunbound((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuget_unbound_function�suget_unbound_functioncCs tdd�t|�jD��S(Ncss|]}d|jkVqdS(u__call__N(u__dict__(u.0uklass((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu	<genexpr>�sucallable.<locals>.<genexpr>(uanyutypeu__mro__(uobj((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyucallable�sucallablecCs|jS(N(uim_func(uunbound((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuget_unbound_function�scBs |EeZdZdd�ZdS(uIteratorcCst|�j|�S(N(utypeu__next__(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyunext�su
Iterator.nextN(u__name__u
__module__u__qualname__unext(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuIterator�suIteratoru3Get the function out of a possibly unbound functioncCstt|t���S(u1Return an iterator over the keys of a dictionary.(uiterugetattru	_iterkeys(ud((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuiterkeysscCstt|t���S(u3Return an iterator over the values of a dictionary.(uiterugetattru_itervalues(ud((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu
itervaluesscCstt|t���S(u?Return an iterator over the (key, value) pairs of a dictionary.(uiterugetattru
_iteritems(ud((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu	iteritemsscCs
|jd�S(Nulatin-1(uencode(us((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyubsubcCs|S(N((us((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuusuucCs
t|f�S(N(ubytes(ui((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuint2bytesuint2byteuto_bytesubigcCs|S(N((us((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyub#scCs
t|d�S(Nuunicode_escape(uunicode(us((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuu%suByte literaluText literaluexeccCs+|j|k	r!|j|��n|�dS(N(u
__traceback__uwith_traceback(utpuvalueutb((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyureraise3sureraiseuprintcCse|dkrBtjd�}|j}|dkr<|j}n~n|dkrW|}ntd�dS(uExecute code in a namespace.iuexec code in globs, locsN(uNoneusysu	_getframeu	f_globalsuf_localsuexec(ucodeuglobsulocsuframe((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuexec_=s		uexec_u9def reraise(tp, value, tb=None):
    raise tp, value, tb
c
s�|jdtj���dkr%dS�fdd�}d}|jdd�}|dk	r�t|t�rsd
}q�t|t�s�t	d��q�n|jdd�}|dk	r�t|t�r�d
}q�t|t�s�t	d��q�n|rt	d	��n|s3x*|D]}t|t�r
d
}Pq
q
Wn|rTtd
�}td�}nd
}d}|dkru|}n|dkr�|}nx7t
|�D])\}	}|	r�||�n||�q�W||�dS(uThe new-style print function.ufileNcs/t|t�st|�}n�j|�dS(N(u
isinstanceu
basestringustruwrite(udata(ufp(uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuwriteTsuprint_.<locals>.writeusepusep must be None or a stringuenduend must be None or a stringu$invalid keyword arguments to print()u
u FT(upopusysustdoutuNoneuFalseu
isinstanceuunicodeuTrueustru	TypeErroru	enumerate(
uargsukwargsuwriteuwant_unicodeusepuenduargunewlineuspaceui((ufpuK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuprint_OsL		
		
uprint_uReraise an exception.cCs|d|fi�S(u%Create a base class with a metaclass.uNewBase((umetaubase((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyuwith_metaclasssuwith_metaclassli���li���ll����(Qu__doc__uoperatorusysutypesu
__author__u__version__uversion_infouPY3ustrustring_typesuintu
integer_typesutypeuclass_typesu	text_typeubytesubinary_typeumaxsizeuMAXSIZEu
basestringulongu	ClassTypeuunicodeuplatformu
startswithuobjectuXulenu
OverflowErroru_add_docu_import_moduleu
_LazyDescruMovedModuleuMovedAttributeu
ModuleTypeu_MovedItemsu_moved_attributesuattrusetattrunameumovesumodulesu__name__uadd_moveuremove_moveu
_meth_funcu
_meth_selfu
_func_codeu_func_defaultsu	_iterkeysu_itervaluesu
_iteritemsunextuadvance_iteratoru	NameErroruget_unbound_functionuIteratorucallableu
attrgetteruget_method_functionuget_method_selfuget_function_codeuget_function_defaultsuiterkeysu
itervaluesu	iteritemsubuuuint2byteumethodcalleruiouStringIOuBytesIOuchrubuiltinsugetattruexec_uNoneureraiseuprint_uwith_metaclass(((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/six.pyu<module>s$				

			
	

	



-
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py000064400000026554151733566760023254 0ustar00"""Utilities for writing code that runs on Python 2 and 3"""

#Copyright (c) 2010-2011 Benjamin Peterson

#Permission is hereby granted, free of charge, to any person obtaining a copy of
#this software and associated documentation files (the "Software"), to deal in
#the Software without restriction, including without limitation the rights to
#use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
#the Software, and to permit persons to whom the Software is furnished to do so,
#subject to the following conditions:

#The above copyright notice and this permission notice shall be included in all
#copies or substantial portions of the Software.

#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
#FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
#COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
#IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import operator
import sys
import types

__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.2.0"  # Revision 41c74fef2ded


# True if we are running on Python 3.
PY3 = sys.version_info[0] == 3

if PY3:
    string_types = str,
    integer_types = int,
    class_types = type,
    text_type = str
    binary_type = bytes

    MAXSIZE = sys.maxsize
else:
    string_types = basestring,
    integer_types = (int, long)
    class_types = (type, types.ClassType)
    text_type = unicode
    binary_type = str

    if sys.platform.startswith("java"):
        # Jython always uses 32 bits.
        MAXSIZE = int((1 << 31) - 1)
    else:
        # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
        class X(object):
            def __len__(self):
                return 1 << 31
        try:
            len(X())
        except OverflowError:
            # 32-bit
            MAXSIZE = int((1 << 31) - 1)
        else:
            # 64-bit
            MAXSIZE = int((1 << 63) - 1)
            del X


def _add_doc(func, doc):
    """Add documentation to a function."""
    func.__doc__ = doc


def _import_module(name):
    """Import module, returning the module after the last dot."""
    __import__(name)
    return sys.modules[name]


class _LazyDescr(object):

    def __init__(self, name):
        self.name = name

    def __get__(self, obj, tp):
        result = self._resolve()
        setattr(obj, self.name, result)
        # This is a bit ugly, but it avoids running this again.
        delattr(tp, self.name)
        return result


class MovedModule(_LazyDescr):

    def __init__(self, name, old, new=None):
        super(MovedModule, self).__init__(name)
        if PY3:
            if new is None:
                new = name
            self.mod = new
        else:
            self.mod = old

    def _resolve(self):
        return _import_module(self.mod)


class MovedAttribute(_LazyDescr):

    def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
        super(MovedAttribute, self).__init__(name)
        if PY3:
            if new_mod is None:
                new_mod = name
            self.mod = new_mod
            if new_attr is None:
                if old_attr is None:
                    new_attr = name
                else:
                    new_attr = old_attr
            self.attr = new_attr
        else:
            self.mod = old_mod
            if old_attr is None:
                old_attr = name
            self.attr = old_attr

    def _resolve(self):
        module = _import_module(self.mod)
        return getattr(module, self.attr)



class _MovedItems(types.ModuleType):
    """Lazy loading of moved objects"""


_moved_attributes = [
    MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
    MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
    MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
    MovedAttribute("map", "itertools", "builtins", "imap", "map"),
    MovedAttribute("reload_module", "__builtin__", "imp", "reload"),
    MovedAttribute("reduce", "__builtin__", "functools"),
    MovedAttribute("StringIO", "StringIO", "io"),
    MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),

    MovedModule("builtins", "__builtin__"),
    MovedModule("configparser", "ConfigParser"),
    MovedModule("copyreg", "copy_reg"),
    MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
    MovedModule("http_cookies", "Cookie", "http.cookies"),
    MovedModule("html_entities", "htmlentitydefs", "html.entities"),
    MovedModule("html_parser", "HTMLParser", "html.parser"),
    MovedModule("http_client", "httplib", "http.client"),
    MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
    MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
    MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
    MovedModule("cPickle", "cPickle", "pickle"),
    MovedModule("queue", "Queue"),
    MovedModule("reprlib", "repr"),
    MovedModule("socketserver", "SocketServer"),
    MovedModule("tkinter", "Tkinter"),
    MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
    MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
    MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
    MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
    MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
    MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
    MovedModule("tkinter_colorchooser", "tkColorChooser",
                "tkinter.colorchooser"),
    MovedModule("tkinter_commondialog", "tkCommonDialog",
                "tkinter.commondialog"),
    MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_font", "tkFont", "tkinter.font"),
    MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
    MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
                "tkinter.simpledialog"),
    MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
    MovedModule("winreg", "_winreg"),
]
for attr in _moved_attributes:
    setattr(_MovedItems, attr.name, attr)
del attr

moves = sys.modules[__name__ + ".moves"] = _MovedItems("moves")


def add_move(move):
    """Add an item to six.moves."""
    setattr(_MovedItems, move.name, move)


def remove_move(name):
    """Remove item from six.moves."""
    try:
        delattr(_MovedItems, name)
    except AttributeError:
        try:
            del moves.__dict__[name]
        except KeyError:
            raise AttributeError("no such move, %r" % (name,))


if PY3:
    _meth_func = "__func__"
    _meth_self = "__self__"

    _func_code = "__code__"
    _func_defaults = "__defaults__"

    _iterkeys = "keys"
    _itervalues = "values"
    _iteritems = "items"
else:
    _meth_func = "im_func"
    _meth_self = "im_self"

    _func_code = "func_code"
    _func_defaults = "func_defaults"

    _iterkeys = "iterkeys"
    _itervalues = "itervalues"
    _iteritems = "iteritems"


try:
    advance_iterator = next
except NameError:
    def advance_iterator(it):
        return it.next()
next = advance_iterator


if PY3:
    def get_unbound_function(unbound):
        return unbound

    Iterator = object

    def callable(obj):
        return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
else:
    def get_unbound_function(unbound):
        return unbound.im_func

    class Iterator(object):

        def next(self):
            return type(self).__next__(self)

    callable = callable
_add_doc(get_unbound_function,
         """Get the function out of a possibly unbound function""")


get_method_function = operator.attrgetter(_meth_func)
get_method_self = operator.attrgetter(_meth_self)
get_function_code = operator.attrgetter(_func_code)
get_function_defaults = operator.attrgetter(_func_defaults)


def iterkeys(d):
    """Return an iterator over the keys of a dictionary."""
    return iter(getattr(d, _iterkeys)())

def itervalues(d):
    """Return an iterator over the values of a dictionary."""
    return iter(getattr(d, _itervalues)())

def iteritems(d):
    """Return an iterator over the (key, value) pairs of a dictionary."""
    return iter(getattr(d, _iteritems)())


if PY3:
    def b(s):
        return s.encode("latin-1")
    def u(s):
        return s
    if sys.version_info[1] <= 1:
        def int2byte(i):
            return bytes((i,))
    else:
        # This is about 2x faster than the implementation above on 3.2+
        int2byte = operator.methodcaller("to_bytes", 1, "big")
    import io
    StringIO = io.StringIO
    BytesIO = io.BytesIO
else:
    def b(s):
        return s
    def u(s):
        return unicode(s, "unicode_escape")
    int2byte = chr
    import StringIO
    StringIO = BytesIO = StringIO.StringIO
_add_doc(b, """Byte literal""")
_add_doc(u, """Text literal""")


if PY3:
    import builtins
    exec_ = getattr(builtins, "exec")


    def reraise(tp, value, tb=None):
        if value.__traceback__ is not tb:
            raise value.with_traceback(tb)
        raise value


    print_ = getattr(builtins, "print")
    del builtins

else:
    def exec_(code, globs=None, locs=None):
        """Execute code in a namespace."""
        if globs is None:
            frame = sys._getframe(1)
            globs = frame.f_globals
            if locs is None:
                locs = frame.f_locals
            del frame
        elif locs is None:
            locs = globs
        exec("""exec code in globs, locs""")


    exec_("""def reraise(tp, value, tb=None):
    raise tp, value, tb
""")


    def print_(*args, **kwargs):
        """The new-style print function."""
        fp = kwargs.pop("file", sys.stdout)
        if fp is None:
            return
        def write(data):
            if not isinstance(data, basestring):
                data = str(data)
            fp.write(data)
        want_unicode = False
        sep = kwargs.pop("sep", None)
        if sep is not None:
            if isinstance(sep, unicode):
                want_unicode = True
            elif not isinstance(sep, str):
                raise TypeError("sep must be None or a string")
        end = kwargs.pop("end", None)
        if end is not None:
            if isinstance(end, unicode):
                want_unicode = True
            elif not isinstance(end, str):
                raise TypeError("end must be None or a string")
        if kwargs:
            raise TypeError("invalid keyword arguments to print()")
        if not want_unicode:
            for arg in args:
                if isinstance(arg, unicode):
                    want_unicode = True
                    break
        if want_unicode:
            newline = unicode("\n")
            space = unicode(" ")
        else:
            newline = "\n"
            space = " "
        if sep is None:
            sep = space
        if end is None:
            end = newline
        for i, arg in enumerate(args):
            if i:
                write(sep)
            write(arg)
        write(end)

_add_doc(reraise, """Reraise an exception.""")


def with_metaclass(meta, base=object):
    """Create a base class with a metaclass."""
    return meta("NewBase", (base,), {})
_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/__init__.cpython-33.pyc000064400000001127151733566760034252 0ustar00python3.3/site-packages/pip�
7�Re�c@s~yddlmZmZWnWek
rsyddlmZmZWn(ek
rnddlmZmZYnXYnXdZdS(i(uCertificateErrorumatch_hostnameiuCertificateErrorumatch_hostnameN(uCertificateErrorumatch_hostname(ussluCertificateErrorumatch_hostnameuImportErrorubackports.ssl_match_hostnameu_implementationu__all__(((uc/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyu<module>s

 requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/_implementation.cpython-33.pyc000064400000006267151733566760035711 0ustar00python3.3/site-packages/pip/_vendor�
7�Re�c@sMdZddlZdZGdd�de�Zddd�Zd	d
�ZdS(uJThe match_hostname() function from Python 3.3.3, essential when using SSL.iNu3.4.0.2cBs|EeZdZdS(uCertificateErrorN(u__name__u
__module__u__qualname__(u
__locals__((uj/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyuCertificateError
suCertificateErroric
CsXg}|sdS|jd�}|d}|dd�}|jd�}||krmtdt|���n|s�|j�|j�kS|dkr�|jd�nY|jd�s�|jd�r�|jtj	|��n"|jtj	|�j
d	d
��x$|D]}|jtj	|��qWtjddj|�d
tj
�}	|	j|�S(uhMatching according to RFC 6125, section 6.4.3

    http://tools.ietf.org/html/rfc6125#section-6.4.3
    u.iiNu*u,too many wildcards in certificate DNS name: u[^.]+uxn--u\*u[^.]*u\Au\.u\ZF(uFalseusplitucountuCertificateErrorurepruloweruappendu
startswithureuescapeureplaceucompileujoinu
IGNORECASEumatch(
udnuhostnameu
max_wildcardsupatsupartsuleftmostu	remainderu	wildcardsufragupat((uj/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyu_dnsname_matchs*
"
&u_dnsname_matchcCs[|std��ng}|jdf�}xC|D];\}}|dkr4t||�r_dS|j|�q4q4W|s�xc|jdf�D]L}xC|D];\}}|dkr�t||�r�dS|j|�q�q�Wq�Wnt|�dkrtd|d	jtt|��f��n;t|�dkrKtd
||df��ntd��dS(
u)Verify that *cert* (in decoded format as returned by
    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
    rules are followed, but IP addresses are not accepted for *hostname*.

    CertificateError is raised on failure. On success, the function
    returns nothing.
    uempty or no certificateusubjectAltNameuDNSNusubjectu
commonNameiu&hostname %r doesn't match either of %su, uhostname %r doesn't match %riu=no appropriate commonName or subjectAltName fields were found(	u
ValueErrorugetu_dnsname_matchuappendulenuCertificateErrorujoinumapurepr(ucertuhostnameudnsnamesusanukeyuvalueusub((uj/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyumatch_hostnameCs.%umatch_hostname(u__doc__ureu__version__u
ValueErroruCertificateErroru_dnsname_matchumatch_hostname(((uj/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyu<module>s
5site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py000064400000000714151733566760027772 0ustar00python3.3try:
    # Python 3.2+
    from ssl import CertificateError, match_hostname
except ImportError:
    try:
        # Backport of the function from a pypi module
        from backports.ssl_match_hostname import CertificateError, match_hostname
    except ImportError:
        # Our vendored copy
        from ._implementation import CertificateError, match_hostname

# Not needed, but documenting what we provide.
__all__ = ('CertificateError', 'match_hostname')
site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py000064400000007302151733566760031417 0ustar00python3.3"""The match_hostname() function from Python 3.3.3, essential when using SSL."""

# Note: This file is under the PSF license as the code comes from the python
# stdlib.   http://docs.python.org/3/license.html

import re

__version__ = '3.4.0.2'

class CertificateError(ValueError):
    pass


def _dnsname_match(dn, hostname, max_wildcards=1):
    """Matching according to RFC 6125, section 6.4.3

    http://tools.ietf.org/html/rfc6125#section-6.4.3
    """
    pats = []
    if not dn:
        return False

    # Ported from python3-syntax:
    # leftmost, *remainder = dn.split(r'.')
    parts = dn.split(r'.')
    leftmost = parts[0]
    remainder = parts[1:]

    wildcards = leftmost.count('*')
    if wildcards > max_wildcards:
        # Issue #17980: avoid denials of service by refusing more
        # than one wildcard per fragment.  A survey of established
        # policy among SSL implementations showed it to be a
        # reasonable choice.
        raise CertificateError(
            "too many wildcards in certificate DNS name: " + repr(dn))

    # speed up common case w/o wildcards
    if not wildcards:
        return dn.lower() == hostname.lower()

    # RFC 6125, section 6.4.3, subitem 1.
    # The client SHOULD NOT attempt to match a presented identifier in which
    # the wildcard character comprises a label other than the left-most label.
    if leftmost == '*':
        # When '*' is a fragment by itself, it matches a non-empty dotless
        # fragment.
        pats.append('[^.]+')
    elif leftmost.startswith('xn--') or hostname.startswith('xn--'):
        # RFC 6125, section 6.4.3, subitem 3.
        # The client SHOULD NOT attempt to match a presented identifier
        # where the wildcard character is embedded within an A-label or
        # U-label of an internationalized domain name.
        pats.append(re.escape(leftmost))
    else:
        # Otherwise, '*' matches any dotless string, e.g. www*
        pats.append(re.escape(leftmost).replace(r'\*', '[^.]*'))

    # add the remaining fragments, ignore any wildcards
    for frag in remainder:
        pats.append(re.escape(frag))

    pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)
    return pat.match(hostname)


def match_hostname(cert, hostname):
    """Verify that *cert* (in decoded format as returned by
    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
    rules are followed, but IP addresses are not accepted for *hostname*.

    CertificateError is raised on failure. On success, the function
    returns nothing.
    """
    if not cert:
        raise ValueError("empty or no certificate")
    dnsnames = []
    san = cert.get('subjectAltName', ())
    for key, value in san:
        if key == 'DNS':
            if _dnsname_match(value, hostname):
                return
            dnsnames.append(value)
    if not dnsnames:
        # The subject is only checked when there is no dNSName entry
        # in subjectAltName
        for sub in cert.get('subject', ()):
            for key, value in sub:
                # XXX according to RFC 2818, the most specific Common Name
                # must be used.
                if key == 'commonName':
                    if _dnsname_match(value, hostname):
                        return
                    dnsnames.append(value)
    if len(dnsnames) > 1:
        raise CertificateError("hostname %r "
            "doesn't match either of %s"
            % (hostname, ', '.join(map(repr, dnsnames))))
    elif len(dnsnames) == 1:
        raise CertificateError("hostname %r "
            "doesn't match %r"
            % (hostname, dnsnames[0]))
    else:
        raise CertificateError("no appropriate commonName or "
            "subjectAltName fields were found")
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py000064400000000112151733566760024166 0ustar00from __future__ import absolute_import

from . import ssl_match_hostname

python3.3/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py000064400000021350151733566760025065 0ustar00# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
# Copyright 2009 Raymond Hettinger, released under the MIT License.
# http://code.activestate.com/recipes/576693/

try:
    from thread import get_ident as _get_ident
except ImportError:
    from dummy_thread import get_ident as _get_ident

try:
    from _abcoll import KeysView, ValuesView, ItemsView
except ImportError:
    pass


class OrderedDict(dict):
    'Dictionary that remembers insertion order'
    # An inherited dict maps keys to values.
    # The inherited dict provides __getitem__, __len__, __contains__, and get.
    # The remaining methods are order-aware.
    # Big-O running times for all methods are the same as for regular dictionaries.

    # The internal self.__map dictionary maps keys to links in a doubly linked list.
    # The circular doubly linked list starts and ends with a sentinel element.
    # The sentinel element never gets deleted (this simplifies the algorithm).
    # Each link is stored as a list of length three:  [PREV, NEXT, KEY].

    def __init__(self, *args, **kwds):
        '''Initialize an ordered dictionary.  Signature is the same as for
        regular dictionaries, but keyword arguments are not recommended
        because their insertion order is arbitrary.

        '''
        if len(args) > 1:
            raise TypeError('expected at most 1 arguments, got %d' % len(args))
        try:
            self.__root
        except AttributeError:
            self.__root = root = []                     # sentinel node
            root[:] = [root, root, None]
            self.__map = {}
        self.__update(*args, **kwds)

    def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
        'od.__setitem__(i, y) <==> od[i]=y'
        # Setting a new item creates a new link which goes at the end of the linked
        # list, and the inherited dictionary is updated with the new key/value pair.
        if key not in self:
            root = self.__root
            last = root[0]
            last[1] = root[0] = self.__map[key] = [last, root, key]
        dict_setitem(self, key, value)

    def __delitem__(self, key, dict_delitem=dict.__delitem__):
        'od.__delitem__(y) <==> del od[y]'
        # Deleting an existing item uses self.__map to find the link which is
        # then removed by updating the links in the predecessor and successor nodes.
        dict_delitem(self, key)
        link_prev, link_next, key = self.__map.pop(key)
        link_prev[1] = link_next
        link_next[0] = link_prev

    def __iter__(self):
        'od.__iter__() <==> iter(od)'
        root = self.__root
        curr = root[1]
        while curr is not root:
            yield curr[2]
            curr = curr[1]

    def __reversed__(self):
        'od.__reversed__() <==> reversed(od)'
        root = self.__root
        curr = root[0]
        while curr is not root:
            yield curr[2]
            curr = curr[0]

    def clear(self):
        'od.clear() -> None.  Remove all items from od.'
        try:
            for node in self.__map.itervalues():
                del node[:]
            root = self.__root
            root[:] = [root, root, None]
            self.__map.clear()
        except AttributeError:
            pass
        dict.clear(self)

    def popitem(self, last=True):
        '''od.popitem() -> (k, v), return and remove a (key, value) pair.
        Pairs are returned in LIFO order if last is true or FIFO order if false.

        '''
        if not self:
            raise KeyError('dictionary is empty')
        root = self.__root
        if last:
            link = root[0]
            link_prev = link[0]
            link_prev[1] = root
            root[0] = link_prev
        else:
            link = root[1]
            link_next = link[1]
            root[1] = link_next
            link_next[0] = root
        key = link[2]
        del self.__map[key]
        value = dict.pop(self, key)
        return key, value

    # -- the following methods do not depend on the internal structure --

    def keys(self):
        'od.keys() -> list of keys in od'
        return list(self)

    def values(self):
        'od.values() -> list of values in od'
        return [self[key] for key in self]

    def items(self):
        'od.items() -> list of (key, value) pairs in od'
        return [(key, self[key]) for key in self]

    def iterkeys(self):
        'od.iterkeys() -> an iterator over the keys in od'
        return iter(self)

    def itervalues(self):
        'od.itervalues -> an iterator over the values in od'
        for k in self:
            yield self[k]

    def iteritems(self):
        'od.iteritems -> an iterator over the (key, value) items in od'
        for k in self:
            yield (k, self[k])

    def update(*args, **kwds):
        '''od.update(E, **F) -> None.  Update od from dict/iterable E and F.

        If E is a dict instance, does:           for k in E: od[k] = E[k]
        If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
        Or if E is an iterable of items, does:   for k, v in E: od[k] = v
        In either case, this is followed by:     for k, v in F.items(): od[k] = v

        '''
        if len(args) > 2:
            raise TypeError('update() takes at most 2 positional '
                            'arguments (%d given)' % (len(args),))
        elif not args:
            raise TypeError('update() takes at least 1 argument (0 given)')
        self = args[0]
        # Make progressively weaker assumptions about "other"
        other = ()
        if len(args) == 2:
            other = args[1]
        if isinstance(other, dict):
            for key in other:
                self[key] = other[key]
        elif hasattr(other, 'keys'):
            for key in other.keys():
                self[key] = other[key]
        else:
            for key, value in other:
                self[key] = value
        for key, value in kwds.items():
            self[key] = value

    __update = update  # let subclasses override update without breaking __init__

    __marker = object()

    def pop(self, key, default=__marker):
        '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
        If key is not found, d is returned if given, otherwise KeyError is raised.

        '''
        if key in self:
            result = self[key]
            del self[key]
            return result
        if default is self.__marker:
            raise KeyError(key)
        return default

    def setdefault(self, key, default=None):
        'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
        if key in self:
            return self[key]
        self[key] = default
        return default

    def __repr__(self, _repr_running={}):
        'od.__repr__() <==> repr(od)'
        call_key = id(self), _get_ident()
        if call_key in _repr_running:
            return '...'
        _repr_running[call_key] = 1
        try:
            if not self:
                return '%s()' % (self.__class__.__name__,)
            return '%s(%r)' % (self.__class__.__name__, self.items())
        finally:
            del _repr_running[call_key]

    def __reduce__(self):
        'Return state information for pickling'
        items = [[k, self[k]] for k in self]
        inst_dict = vars(self).copy()
        for k in vars(OrderedDict()):
            inst_dict.pop(k, None)
        if inst_dict:
            return (self.__class__, (items,), inst_dict)
        return self.__class__, (items,)

    def copy(self):
        'od.copy() -> a shallow copy of od'
        return self.__class__(self)

    @classmethod
    def fromkeys(cls, iterable, value=None):
        '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
        and values equal to v (which defaults to None).

        '''
        d = cls()
        for key in iterable:
            d[key] = value
        return d

    def __eq__(self, other):
        '''od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
        while comparison to a regular mapping is order-insensitive.

        '''
        if isinstance(other, OrderedDict):
            return len(self)==len(other) and self.items() == other.items()
        return dict.__eq__(self, other)

    def __ne__(self, other):
        return not self == other

    # -- the following methods are only used in Python 2.7 --

    def viewkeys(self):
        "od.viewkeys() -> a set-like object providing a view on od's keys"
        return KeysView(self)

    def viewvalues(self):
        "od.viewvalues() -> an object providing a view on od's values"
        return ValuesView(self)

    def viewitems(self):
        "od.viewitems() -> a set-like object providing a view on od's items"
        return ItemsView(self)
python3.3/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py000064400000004720151733566760022507 0ustar00# urllib3/filepost.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import codecs
import mimetypes

from uuid import uuid4
from io import BytesIO

from .packages import six
from .packages.six import b
from .fields import RequestField

writer = codecs.lookup('utf-8')[3]


def choose_boundary():
    """
    Our embarassingly-simple replacement for mimetools.choose_boundary.
    """
    return uuid4().hex


def iter_field_objects(fields):
    """
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    """
    if isinstance(fields, dict):
        i = six.iteritems(fields)
    else:
        i = iter(fields)

    for field in i:
      if isinstance(field, RequestField):
        yield field
      else:
        yield RequestField.from_tuples(*field)


def iter_fields(fields):
    """
    .. deprecated:: 1.6

    Iterate over fields.

    The addition of :class:`~urllib3.fields.RequestField` makes this function
    obsolete. Instead, use :func:`iter_field_objects`, which returns
    :class:`~urllib3.fields.RequestField` objects.

    Supports list of (k, v) tuples and dicts.
    """
    if isinstance(fields, dict):
        return ((k, v) for k, v in six.iteritems(fields))

    return ((k, v) for k, v in fields)


def encode_multipart_formdata(fields, boundary=None):
    """
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`mimetools.choose_boundary`.
    """
    body = BytesIO()
    if boundary is None:
        boundary = choose_boundary()

    for field in iter_field_objects(fields):
        body.write(b('--%s\r\n' % (boundary)))

        writer(body).write(field.render_headers())
        data = field.data

        if isinstance(data, int):
            data = str(data)  # Backwards compatibility

        if isinstance(data, six.text_type):
            writer(body).write(data)
        else:
            body.write(data)

        body.write(b'\r\n')

    body.write(b('--%s--\r\n' % (boundary)))

    content_type = str('multipart/form-data; boundary=%s' % boundary)

    return body.getvalue(), content_type
python3.3/site-packages/pip/_vendor/requests/packages/__init__.py000064400000000076151733566760021045 0ustar00from __future__ import absolute_import

from . import urllib3
python3.3/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py000064400000003221151733566760023025 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import GB2312DistributionAnalysis
from .mbcssm import GB2312SMModel

class GB2312Prober(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(GB2312SMModel)
        self._mDistributionAnalyzer = GB2312DistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "GB2312"
python3.3/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py000064400000030524151733566760023701 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# Character Mapping Table:
Latin7_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 82,100,104, 94, 98,101,116,102,111,187,117, 92, 88,113, 85,  # 40
 79,118,105, 83, 67,114,119, 95, 99,109,188,253,253,253,253,253,  # 50
253, 72, 70, 80, 81, 60, 96, 93, 89, 68,120, 97, 77, 86, 69, 55,  # 60
 78,115, 65, 66, 58, 76,106,103, 87,107,112,253,253,253,253,253,  # 70
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 80
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 90
253,233, 90,253,253,253,253,253,253,253,253,253,253, 74,253,253,  # a0
253,253,253,253,247,248, 61, 36, 46, 71, 73,253, 54,253,108,123,  # b0
110, 31, 51, 43, 41, 34, 91, 40, 52, 47, 44, 53, 38, 49, 59, 39,  # c0
 35, 48,250, 37, 33, 45, 56, 50, 84, 57,120,121, 17, 18, 22, 15,  # d0
124,  1, 29, 20, 21,  3, 32, 13, 25,  5, 11, 16, 10,  6, 30,  4,  # e0
  9,  8, 14,  7,  2, 12, 28, 23, 42, 24, 64, 75, 19, 26, 27,253,  # f0
)

win1253_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 82,100,104, 94, 98,101,116,102,111,187,117, 92, 88,113, 85,  # 40
 79,118,105, 83, 67,114,119, 95, 99,109,188,253,253,253,253,253,  # 50
253, 72, 70, 80, 81, 60, 96, 93, 89, 68,120, 97, 77, 86, 69, 55,  # 60
 78,115, 65, 66, 58, 76,106,103, 87,107,112,253,253,253,253,253,  # 70
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 80
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 90
253,233, 61,253,253,253,253,253,253,253,253,253,253, 74,253,253,  # a0
253,253,253,253,247,253,253, 36, 46, 71, 73,253, 54,253,108,123,  # b0
110, 31, 51, 43, 41, 34, 91, 40, 52, 47, 44, 53, 38, 49, 59, 39,  # c0
 35, 48,250, 37, 33, 45, 56, 50, 84, 57,120,121, 17, 18, 22, 15,  # d0
124,  1, 29, 20, 21,  3, 32, 13, 25,  5, 11, 16, 10,  6, 30,  4,  # e0
  9,  8, 14,  7,  2, 12, 28, 23, 42, 24, 64, 75, 19, 26, 27,253,  # f0
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 98.2851%
# first 1024 sequences:1.7001%
# rest  sequences:     0.0359%
# negative sequences:  0.0148%
GreekLangModel = (
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,2,2,3,3,3,3,3,3,3,3,1,3,3,3,0,2,2,3,3,0,3,0,3,2,0,3,3,3,0,
3,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,0,3,3,0,3,2,3,3,0,3,2,3,3,3,0,0,3,0,3,0,3,3,2,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
0,2,3,2,2,3,3,3,3,3,3,3,3,0,3,3,3,3,0,2,3,3,0,3,3,3,3,2,3,3,3,0,
2,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,0,2,1,3,3,3,3,2,3,3,2,3,3,2,0,
0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,0,3,3,3,3,3,3,0,3,3,0,3,3,3,3,3,3,3,3,3,3,0,3,2,3,3,0,
2,0,1,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,2,3,0,0,0,0,3,3,0,3,1,3,3,3,0,3,3,0,3,3,3,3,0,0,0,0,
2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,0,3,0,3,3,3,3,3,0,3,2,2,2,3,0,2,3,3,3,3,3,2,3,3,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,3,2,2,2,3,3,3,3,0,3,1,3,3,3,3,2,3,3,3,3,3,3,3,2,2,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,2,0,3,0,0,0,3,3,2,3,3,3,3,3,0,0,3,2,3,0,2,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,3,0,0,3,3,0,2,3,0,3,0,3,3,3,0,0,3,0,3,0,2,2,3,3,0,0,
0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,2,0,3,2,3,3,3,3,0,3,3,3,3,3,0,3,3,2,3,2,3,3,2,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,2,3,2,3,3,3,3,3,3,0,2,3,2,3,2,2,2,3,2,3,3,2,3,0,2,2,2,3,0,
2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,0,0,0,3,3,3,2,3,3,0,0,3,0,3,0,0,0,3,2,0,3,0,3,0,0,2,0,2,0,
0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,0,3,3,3,3,3,3,0,3,3,0,3,0,0,0,3,3,0,3,3,3,0,0,1,2,3,0,
3,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,2,0,0,3,2,2,3,3,0,3,3,3,3,3,2,1,3,0,3,2,3,3,2,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,3,0,2,3,3,3,3,3,3,0,0,3,0,3,0,0,0,3,3,0,3,2,3,0,0,3,3,3,0,
3,0,0,0,2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,0,3,3,3,3,3,3,0,0,3,0,3,0,0,0,3,2,0,3,2,3,0,0,3,2,3,0,
2,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,1,2,2,3,3,3,3,3,3,0,2,3,0,3,0,0,0,3,3,0,3,0,2,0,0,2,3,1,0,
2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,3,0,3,0,3,3,2,3,0,3,3,3,3,3,3,0,3,3,3,0,2,3,0,0,3,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,0,0,3,0,0,0,3,3,0,3,0,2,3,3,0,0,3,0,3,0,3,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,0,0,0,3,3,3,3,3,3,0,0,3,0,2,0,0,0,3,3,0,3,0,3,0,0,2,0,2,0,
0,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,3,0,3,0,2,0,3,2,0,3,2,3,2,3,0,0,3,2,3,2,3,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,0,0,2,3,3,3,3,3,0,0,0,3,0,2,1,0,0,3,2,2,2,0,3,0,0,2,2,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,2,0,3,0,3,0,3,3,0,2,1,2,3,3,0,0,3,0,3,0,3,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,3,3,3,0,3,3,3,3,3,3,0,2,3,0,3,0,0,0,2,1,0,2,2,3,0,0,2,2,2,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,0,0,2,3,3,3,2,3,0,0,1,3,0,2,0,0,0,0,3,0,1,0,2,0,0,1,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,1,0,3,0,0,0,3,2,0,3,2,3,3,3,0,0,3,0,3,2,2,2,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,0,0,3,0,0,0,0,2,0,2,3,3,2,2,2,2,3,0,2,0,2,2,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,2,0,0,0,0,0,0,2,3,0,2,0,2,3,2,0,0,3,0,3,0,3,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,3,2,3,3,2,2,3,0,2,0,3,0,0,0,2,0,0,0,0,1,2,0,2,0,2,0,
0,2,0,2,0,2,2,0,0,1,0,2,2,2,0,2,2,2,0,2,2,2,0,0,2,0,0,1,0,0,0,0,
0,2,0,3,3,2,0,0,0,0,0,0,1,3,0,2,0,2,2,2,0,0,2,0,3,0,0,2,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,2,3,2,0,2,2,0,2,0,2,2,0,2,0,2,2,2,0,0,0,0,0,0,2,3,0,0,0,2,
0,1,2,0,0,0,0,2,2,0,0,0,2,1,0,2,2,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,
0,0,2,1,0,2,3,2,2,3,2,3,2,0,0,3,3,3,0,0,3,2,0,0,0,1,1,0,2,0,2,2,
0,2,0,2,0,2,2,0,0,2,0,2,2,2,0,2,2,2,2,0,0,2,0,0,0,2,0,1,0,0,0,0,
0,3,0,3,3,2,2,0,3,0,0,0,2,2,0,2,2,2,1,2,0,0,1,2,2,0,0,3,0,0,0,2,
0,1,2,0,0,0,1,2,0,0,0,0,0,0,0,2,2,0,1,0,0,2,0,0,0,2,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,3,3,2,2,0,0,0,2,0,2,3,3,0,2,0,0,0,0,0,0,2,2,2,0,2,2,0,2,0,2,
0,2,2,0,0,2,2,2,2,1,0,0,2,2,0,2,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,
0,2,0,3,2,3,0,0,0,3,0,0,2,2,0,2,0,2,2,2,0,0,2,0,0,0,0,0,0,0,0,2,
0,0,2,2,0,0,2,2,2,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,2,0,0,3,2,0,2,2,2,2,2,0,0,0,2,0,0,0,0,2,0,1,0,0,2,0,1,0,0,0,
0,2,2,2,0,2,2,0,1,2,0,2,2,2,0,2,2,2,2,1,2,2,0,0,2,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,2,0,2,0,2,2,0,0,0,0,1,2,1,0,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,3,2,3,0,0,2,0,0,0,2,2,0,2,0,0,0,1,0,0,2,0,2,0,2,2,0,0,0,0,
0,0,2,0,0,0,0,2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,
0,2,2,3,2,2,0,0,0,0,0,0,1,3,0,2,0,2,2,0,0,0,1,0,2,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,0,2,0,3,2,0,2,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,2,0,0,0,0,1,1,0,0,2,1,2,0,2,2,0,1,0,0,1,0,0,0,2,0,0,0,0,0,0,
0,3,0,2,2,2,0,0,2,0,0,0,2,0,0,0,2,3,0,2,0,0,0,0,0,0,2,2,0,0,0,2,
0,1,2,0,0,0,1,2,2,1,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,1,2,0,2,2,0,2,0,0,2,0,0,0,0,1,2,1,0,2,1,0,0,0,0,0,0,0,0,0,0,
0,0,2,0,0,0,3,1,2,2,0,2,0,0,0,0,2,0,0,0,2,0,0,3,0,0,0,0,2,2,2,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,1,0,2,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,2,
0,2,2,0,0,2,2,2,2,2,0,1,2,0,0,0,2,2,0,1,0,2,0,0,2,2,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,3,0,0,2,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,2,
0,1,2,0,0,0,0,2,2,1,0,1,0,1,0,2,2,2,1,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,2,0,1,2,0,0,0,0,0,0,0,0,0,0,2,0,0,2,2,0,0,0,0,1,0,0,0,0,0,0,2,
0,2,2,0,0,0,0,2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,
0,2,2,2,2,0,0,0,3,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,1,
0,0,2,0,0,0,0,1,2,0,0,0,0,0,0,2,2,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,2,0,2,2,2,0,0,2,0,0,0,0,0,0,0,2,2,2,0,0,0,2,0,0,0,0,0,0,0,0,2,
0,0,1,0,0,0,0,2,1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,3,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,2,
0,0,2,0,0,0,0,2,2,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,0,2,2,1,0,0,0,0,0,0,2,0,0,2,0,2,2,2,0,0,0,0,0,0,2,0,0,0,0,2,
0,0,2,0,0,2,0,2,2,0,0,0,0,2,0,2,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,
0,0,3,0,0,0,2,2,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,
0,2,2,2,2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,
0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,2,0,0,0,2,0,0,0,0,0,1,0,0,0,0,2,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,2,0,0,0,
0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,2,0,2,0,0,0,
0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,2,0,0,0,1,2,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
)

Latin7GreekModel = {
  'charToOrderMap': Latin7_CharToOrderMap,
  'precedenceMatrix': GreekLangModel,
  'mTypicalPositiveRatio': 0.982851,
  'keepEnglishLetter': False,
  'charsetName': "ISO-8859-7"
}

Win1253GreekModel = {
  'charToOrderMap': win1253_CharToOrderMap,
  'precedenceMatrix': GreekLangModel,
  'mTypicalPositiveRatio': 0.982851,
  'keepEnglishLetter': False,
  'charsetName': "windows-1253"
}

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/compat.py000064400000002205151733566760022177 0ustar00######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
#   Ian Cordasco - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys


if sys.version_info < (3, 0):
    base_str = (str, unicode)
else:
    base_str = (bytes, str)


def wrap_ord(a):
    if sys.version_info < (3, 0) and isinstance(a, base_str):
        return ord(a)
    else:
        return a
python3.3/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py000064400000030370151733566760024557 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# Character Mapping Table:
Latin2_HungarianCharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 28, 40, 54, 45, 32, 50, 49, 38, 39, 53, 36, 41, 34, 35, 47,
 46, 71, 43, 33, 37, 57, 48, 64, 68, 55, 52,253,253,253,253,253,
253,  2, 18, 26, 17,  1, 27, 12, 20,  9, 22,  7,  6, 13,  4,  8,
 23, 67, 10,  5,  3, 21, 19, 65, 62, 16, 11,253,253,253,253,253,
159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,
175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,
191,192,193,194,195,196,197, 75,198,199,200,201,202,203,204,205,
 79,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,
221, 51, 81,222, 78,223,224,225,226, 44,227,228,229, 61,230,231,
232,233,234, 58,235, 66, 59,236,237,238, 60, 69, 63,239,240,241,
 82, 14, 74,242, 70, 80,243, 72,244, 15, 83, 77, 84, 30, 76, 85,
245,246,247, 25, 73, 42, 24,248,249,250, 31, 56, 29,251,252,253,
)

win1250HungarianCharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 28, 40, 54, 45, 32, 50, 49, 38, 39, 53, 36, 41, 34, 35, 47,
 46, 72, 43, 33, 37, 57, 48, 64, 68, 55, 52,253,253,253,253,253,
253,  2, 18, 26, 17,  1, 27, 12, 20,  9, 22,  7,  6, 13,  4,  8,
 23, 67, 10,  5,  3, 21, 19, 65, 62, 16, 11,253,253,253,253,253,
161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,
177,178,179,180, 78,181, 69,182,183,184,185,186,187,188,189,190,
191,192,193,194,195,196,197, 76,198,199,200,201,202,203,204,205,
 81,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,
221, 51, 83,222, 80,223,224,225,226, 44,227,228,229, 61,230,231,
232,233,234, 58,235, 66, 59,236,237,238, 60, 70, 63,239,240,241,
 84, 14, 75,242, 71, 82,243, 73,244, 15, 85, 79, 86, 30, 77, 87,
245,246,247, 25, 74, 42, 24,248,249,250, 31, 56, 29,251,252,253,
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 94.7368%
# first 1024 sequences:5.2623%
# rest  sequences:     0.8894%
# negative sequences:  0.0009%
HungarianLangModel = (
0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,2,3,3,1,1,2,2,2,2,2,1,2,
3,2,2,3,3,3,3,3,2,3,3,3,3,3,3,1,2,3,3,3,3,2,3,3,1,1,3,3,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
3,2,1,3,3,3,3,3,2,3,3,3,3,3,1,1,2,3,3,3,3,3,3,3,1,1,3,2,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,1,1,2,3,3,3,1,3,3,3,3,3,1,3,3,2,2,0,3,2,3,
0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,3,2,3,3,2,3,3,3,3,3,2,3,3,2,2,3,2,3,2,0,3,2,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,
3,3,3,3,3,3,2,3,3,3,3,3,2,3,3,3,1,2,3,2,2,3,1,2,3,3,2,2,0,3,3,3,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,3,2,3,3,3,3,2,3,3,3,3,0,2,3,2,
0,0,0,1,1,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,1,1,1,3,3,2,1,3,2,2,3,2,1,3,2,2,1,0,3,3,1,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,2,2,3,3,3,3,3,1,2,3,3,3,3,1,2,1,3,3,3,3,2,2,3,1,1,3,2,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,2,1,3,3,3,3,3,2,2,1,3,3,3,0,1,1,2,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,2,3,3,3,2,0,3,2,3,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1,0,
3,3,3,3,3,3,2,3,3,3,2,3,2,3,3,3,1,3,2,2,2,3,1,1,3,3,1,1,0,3,3,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,2,3,3,3,2,3,2,3,3,3,2,3,3,3,3,3,1,2,3,2,2,0,2,2,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,2,2,2,3,1,3,3,2,2,1,3,3,3,1,1,3,1,2,3,2,3,2,2,2,1,0,2,2,2,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,
3,1,1,3,3,3,3,3,1,2,3,3,3,3,1,2,1,3,3,3,2,2,3,2,1,0,3,2,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,3,3,3,3,3,1,2,3,3,3,3,1,1,0,3,3,3,3,0,2,3,0,0,2,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,2,3,3,2,2,2,2,3,3,0,1,2,3,2,3,2,2,3,2,1,2,0,2,2,2,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,
3,3,3,3,3,3,1,2,3,3,3,2,1,2,3,3,2,2,2,3,2,3,3,1,3,3,1,1,0,2,3,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,1,2,2,2,2,3,3,3,1,1,1,3,3,1,1,3,1,1,3,2,1,2,3,1,1,0,2,2,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,2,1,2,1,1,3,3,1,1,1,1,3,3,1,1,2,2,1,2,1,1,2,2,1,1,0,2,2,1,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,1,1,2,1,1,3,3,1,0,1,1,3,3,2,0,1,1,2,3,1,0,2,2,1,0,0,1,3,2,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,2,1,3,3,3,3,3,1,2,3,2,3,3,2,1,1,3,2,3,2,1,2,2,0,1,2,1,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,2,2,2,2,3,1,2,2,1,1,3,3,0,3,2,1,2,3,2,1,3,3,1,1,0,2,1,3,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,2,2,2,3,2,3,3,3,2,1,1,3,3,1,1,1,2,2,3,2,3,2,2,2,1,0,2,2,1,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
1,0,0,3,3,3,3,3,0,0,3,3,2,3,0,0,0,2,3,3,1,0,1,2,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,2,3,3,3,3,3,1,2,3,3,2,2,1,1,0,3,3,2,2,1,2,2,1,0,2,2,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,2,2,1,3,1,2,3,3,2,2,1,1,2,2,1,1,1,1,3,2,1,1,1,1,2,1,0,1,2,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
2,3,3,1,1,1,1,1,3,3,3,0,1,1,3,3,1,1,1,1,1,2,2,0,3,1,1,2,0,2,1,1,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,1,0,1,2,1,2,2,0,1,2,3,1,2,0,0,0,2,1,1,1,1,1,2,0,0,1,1,0,0,0,0,
1,2,1,2,2,2,1,2,1,2,0,2,0,2,2,1,1,2,1,1,2,1,1,1,0,1,0,0,0,1,1,0,
1,1,1,2,3,2,3,3,0,1,2,2,3,1,0,1,0,2,1,2,2,0,1,1,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,3,3,2,2,1,0,0,3,2,3,2,0,0,0,1,1,3,0,0,1,1,0,0,2,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,2,2,3,3,1,0,1,3,2,3,1,1,1,0,1,1,1,1,1,3,1,0,0,2,2,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,1,2,2,2,1,0,1,2,3,3,2,0,0,0,2,1,1,1,2,1,1,1,0,1,1,1,0,0,0,
1,2,2,2,2,2,1,1,1,2,0,2,1,1,1,1,1,2,1,1,1,1,1,1,0,1,1,1,0,0,1,1,
3,2,2,1,0,0,1,1,2,2,0,3,0,1,2,1,1,0,0,1,1,1,0,1,1,1,1,0,2,1,1,1,
2,2,1,1,1,2,1,2,1,1,1,1,1,1,1,2,1,1,1,2,3,1,1,1,1,1,1,1,1,1,0,1,
2,3,3,0,1,0,0,0,3,3,1,0,0,1,2,2,1,0,0,0,0,2,0,0,1,1,1,0,2,1,1,1,
2,1,1,1,1,1,1,2,1,1,0,1,1,0,1,1,1,0,1,2,1,1,0,1,1,1,1,1,1,1,0,1,
2,3,3,0,1,0,0,0,2,2,0,0,0,0,1,2,2,0,0,0,0,1,0,0,1,1,0,0,2,0,1,0,
2,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,0,1,1,1,1,1,0,1,
3,2,2,0,1,0,1,0,2,3,2,0,0,1,2,2,1,0,0,1,1,1,0,0,2,1,0,1,2,2,1,1,
2,1,1,1,1,1,1,2,1,1,1,1,1,1,0,2,1,0,1,1,0,1,1,1,0,1,1,2,1,1,0,1,
2,2,2,0,0,1,0,0,2,2,1,1,0,0,2,1,1,0,0,0,1,2,0,0,2,1,0,0,2,1,1,1,
2,1,1,1,1,2,1,2,1,1,1,2,2,1,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1,0,1,
1,2,3,0,0,0,1,0,3,2,1,0,0,1,2,1,1,0,0,0,0,2,1,0,1,1,0,0,2,1,2,1,
1,1,0,0,0,1,0,1,1,1,1,1,2,0,0,1,0,0,0,2,0,0,1,1,1,1,1,1,1,1,0,1,
3,0,0,2,1,2,2,1,0,0,2,1,2,2,0,0,0,2,1,1,1,0,1,1,0,0,1,1,2,0,0,0,
1,2,1,2,2,1,1,2,1,2,0,1,1,1,1,1,1,1,1,1,2,1,1,0,0,1,1,1,1,0,0,1,
1,3,2,0,0,0,1,0,2,2,2,0,0,0,2,2,1,0,0,0,0,3,1,1,1,1,0,0,2,1,1,1,
2,1,0,1,1,1,0,1,1,1,1,1,1,1,0,2,1,0,0,1,0,1,1,0,1,1,1,1,1,1,0,1,
2,3,2,0,0,0,1,0,2,2,0,0,0,0,2,1,1,0,0,0,0,2,1,0,1,1,0,0,2,1,1,0,
2,1,1,1,1,2,1,2,1,2,0,1,1,1,0,2,1,1,1,2,1,1,1,1,0,1,1,1,1,1,0,1,
3,1,1,2,2,2,3,2,1,1,2,2,1,1,0,1,0,2,2,1,1,1,1,1,0,0,1,1,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,0,0,0,0,0,2,2,0,0,0,0,2,2,1,0,0,0,1,1,0,0,1,2,0,0,2,1,1,1,
2,2,1,1,1,2,1,2,1,1,0,1,1,1,1,2,1,1,1,2,1,1,1,1,0,1,2,1,1,1,0,1,
1,0,0,1,2,3,2,1,0,0,2,0,1,1,0,0,0,1,1,1,1,0,1,1,0,0,1,0,0,0,0,0,
1,2,1,2,1,2,1,1,1,2,0,2,1,1,1,0,1,2,0,0,1,1,1,0,0,0,0,0,0,0,0,0,
2,3,2,0,0,0,0,0,1,1,2,1,0,0,1,1,1,0,0,0,0,2,0,0,1,1,0,0,2,1,1,1,
2,1,1,1,1,1,1,2,1,0,1,1,1,1,0,2,1,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,
1,2,2,0,1,1,1,0,2,2,2,0,0,0,3,2,1,0,0,0,1,1,0,0,1,1,0,1,1,1,0,0,
1,1,0,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,0,0,1,1,1,0,1,0,1,
2,1,0,2,1,1,2,2,1,1,2,1,1,1,0,0,0,1,1,0,1,1,1,1,0,0,1,1,1,0,0,0,
1,2,2,2,2,2,1,1,1,2,0,2,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,1,0,
1,2,3,0,0,0,1,0,2,2,0,0,0,0,2,2,0,0,0,0,0,1,0,0,1,0,0,0,2,0,1,0,
2,1,1,1,1,1,0,2,0,0,0,1,2,1,1,1,1,0,1,2,0,1,0,1,0,1,1,1,0,1,0,1,
2,2,2,0,0,0,1,0,2,1,2,0,0,0,1,1,2,0,0,0,0,1,0,0,1,1,0,0,2,1,0,1,
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,1,1,1,1,1,0,1,
1,2,2,0,0,0,1,0,2,2,2,0,0,0,1,1,0,0,0,0,0,1,1,0,2,0,0,1,1,1,0,1,
1,0,1,1,1,1,1,1,0,1,1,1,1,0,0,1,0,0,1,1,0,1,0,1,1,1,1,1,0,0,0,1,
1,0,0,1,0,1,2,1,0,0,1,1,1,2,0,0,0,1,1,0,1,0,1,1,0,0,1,0,0,0,0,0,
0,2,1,2,1,1,1,1,1,2,0,2,0,1,1,0,1,2,1,0,1,1,1,0,0,0,0,0,0,1,0,0,
2,1,1,0,1,2,0,0,1,1,1,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,2,1,0,1,
2,2,1,1,1,1,1,2,1,1,0,1,1,1,1,2,1,1,1,2,1,1,0,1,0,1,1,1,1,1,0,1,
1,2,2,0,0,0,0,0,1,1,0,0,0,0,2,1,0,0,0,0,0,2,0,0,2,2,0,0,2,0,0,1,
2,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,
1,1,2,0,0,3,1,0,2,1,1,1,0,0,1,1,1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,0,
1,2,1,0,1,1,1,2,1,1,0,1,1,1,1,1,0,0,0,1,1,1,1,1,0,1,0,0,0,1,0,0,
2,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,2,0,0,0,
2,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,2,1,1,0,0,1,1,1,1,1,0,1,
2,1,1,1,2,1,1,1,0,1,1,2,1,0,0,0,0,1,1,1,1,0,1,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,1,1,1,1,1,0,0,1,1,2,1,0,0,0,1,1,0,0,0,1,1,0,0,1,0,1,0,0,0,
1,2,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,
2,0,0,0,1,1,1,1,0,0,1,1,0,0,0,0,0,1,1,1,2,0,0,1,0,0,1,0,1,0,0,0,
0,1,1,1,1,1,1,1,1,2,0,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,
1,0,0,1,1,1,1,1,0,0,2,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,
0,1,1,1,1,1,1,0,1,1,0,1,0,1,1,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,
1,0,0,1,1,1,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,0,0,1,1,0,1,0,1,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,1,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,0,1,0,0,1,1,0,1,0,1,1,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,
2,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,0,1,0,0,1,0,1,0,1,1,1,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,1,0,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
)

Latin2HungarianModel = {
  'charToOrderMap': Latin2_HungarianCharToOrderMap,
  'precedenceMatrix': HungarianLangModel,
  'mTypicalPositiveRatio': 0.947368,
  'keepEnglishLetter': True,
  'charsetName': "ISO-8859-2"
}

Win1250HungarianModel = {
  'charToOrderMap': win1250HungarianCharToOrderMap,
  'precedenceMatrix': HungarianLangModel,
  'mTypicalPositiveRatio': 0.947368,
  'keepEnglishLetter': True,
  'charsetName': "windows-1250"
}

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py000064400000046230151733566760022206 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .constants import eStart, eError, eItsMe

# BIG5

BIG5_cls = (
    1,1,1,1,1,1,1,1,  # 00 - 07    #allow 0x00 as legal value
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    1,1,1,1,1,1,1,1,  # 30 - 37
    1,1,1,1,1,1,1,1,  # 38 - 3f
    2,2,2,2,2,2,2,2,  # 40 - 47
    2,2,2,2,2,2,2,2,  # 48 - 4f
    2,2,2,2,2,2,2,2,  # 50 - 57
    2,2,2,2,2,2,2,2,  # 58 - 5f
    2,2,2,2,2,2,2,2,  # 60 - 67
    2,2,2,2,2,2,2,2,  # 68 - 6f
    2,2,2,2,2,2,2,2,  # 70 - 77
    2,2,2,2,2,2,2,1,  # 78 - 7f
    4,4,4,4,4,4,4,4,  # 80 - 87
    4,4,4,4,4,4,4,4,  # 88 - 8f
    4,4,4,4,4,4,4,4,  # 90 - 97
    4,4,4,4,4,4,4,4,  # 98 - 9f
    4,3,3,3,3,3,3,3,  # a0 - a7
    3,3,3,3,3,3,3,3,  # a8 - af
    3,3,3,3,3,3,3,3,  # b0 - b7
    3,3,3,3,3,3,3,3,  # b8 - bf
    3,3,3,3,3,3,3,3,  # c0 - c7
    3,3,3,3,3,3,3,3,  # c8 - cf
    3,3,3,3,3,3,3,3,  # d0 - d7
    3,3,3,3,3,3,3,3,  # d8 - df
    3,3,3,3,3,3,3,3,  # e0 - e7
    3,3,3,3,3,3,3,3,  # e8 - ef
    3,3,3,3,3,3,3,3,  # f0 - f7
    3,3,3,3,3,3,3,0  # f8 - ff
)

BIG5_st = (
    eError,eStart,eStart,     3,eError,eError,eError,eError,#00-07
    eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,#08-0f
    eError,eStart,eStart,eStart,eStart,eStart,eStart,eStart#10-17
)

Big5CharLenTable = (0, 1, 1, 2, 0)

Big5SMModel = {'classTable': BIG5_cls,
               'classFactor': 5,
               'stateTable': BIG5_st,
               'charLenTable': Big5CharLenTable,
               'name': 'Big5'}

# CP949

CP949_cls  = (
    1,1,1,1,1,1,1,1, 1,1,1,1,1,1,0,0,  # 00 - 0f
    1,1,1,1,1,1,1,1, 1,1,1,0,1,1,1,1,  # 10 - 1f
    1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,  # 20 - 2f
    1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,  # 30 - 3f
    1,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,  # 40 - 4f
    4,4,5,5,5,5,5,5, 5,5,5,1,1,1,1,1,  # 50 - 5f
    1,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,  # 60 - 6f
    5,5,5,5,5,5,5,5, 5,5,5,1,1,1,1,1,  # 70 - 7f
    0,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,  # 80 - 8f
    6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,  # 90 - 9f
    6,7,7,7,7,7,7,7, 7,7,7,7,7,8,8,8,  # a0 - af
    7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,  # b0 - bf
    7,7,7,7,7,7,9,2, 2,3,2,2,2,2,2,2,  # c0 - cf
    2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,  # d0 - df
    2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,  # e0 - ef
    2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,0,  # f0 - ff
)

CP949_st = (
#cls=    0      1      2      3      4      5      6      7      8      9  # previous state =
    eError,eStart,     3,eError,eStart,eStart,     4,     5,eError,     6, # eStart
    eError,eError,eError,eError,eError,eError,eError,eError,eError,eError, # eError
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe, # eItsMe
    eError,eError,eStart,eStart,eError,eError,eError,eStart,eStart,eStart, # 3
    eError,eError,eStart,eStart,eStart,eStart,eStart,eStart,eStart,eStart, # 4
    eError,eStart,eStart,eStart,eStart,eStart,eStart,eStart,eStart,eStart, # 5
    eError,eStart,eStart,eStart,eStart,eError,eError,eStart,eStart,eStart, # 6
)

CP949CharLenTable = (0, 1, 2, 0, 1, 1, 2, 2, 0, 2)

CP949SMModel = {'classTable': CP949_cls,
                'classFactor': 10,
                'stateTable': CP949_st,
                'charLenTable': CP949CharLenTable,
                'name': 'CP949'}

# EUC-JP

EUCJP_cls = (
    4,4,4,4,4,4,4,4,  # 00 - 07
    4,4,4,4,4,4,5,5,  # 08 - 0f
    4,4,4,4,4,4,4,4,  # 10 - 17
    4,4,4,5,4,4,4,4,  # 18 - 1f
    4,4,4,4,4,4,4,4,  # 20 - 27
    4,4,4,4,4,4,4,4,  # 28 - 2f
    4,4,4,4,4,4,4,4,  # 30 - 37
    4,4,4,4,4,4,4,4,  # 38 - 3f
    4,4,4,4,4,4,4,4,  # 40 - 47
    4,4,4,4,4,4,4,4,  # 48 - 4f
    4,4,4,4,4,4,4,4,  # 50 - 57
    4,4,4,4,4,4,4,4,  # 58 - 5f
    4,4,4,4,4,4,4,4,  # 60 - 67
    4,4,4,4,4,4,4,4,  # 68 - 6f
    4,4,4,4,4,4,4,4,  # 70 - 77
    4,4,4,4,4,4,4,4,  # 78 - 7f
    5,5,5,5,5,5,5,5,  # 80 - 87
    5,5,5,5,5,5,1,3,  # 88 - 8f
    5,5,5,5,5,5,5,5,  # 90 - 97
    5,5,5,5,5,5,5,5,  # 98 - 9f
    5,2,2,2,2,2,2,2,  # a0 - a7
    2,2,2,2,2,2,2,2,  # a8 - af
    2,2,2,2,2,2,2,2,  # b0 - b7
    2,2,2,2,2,2,2,2,  # b8 - bf
    2,2,2,2,2,2,2,2,  # c0 - c7
    2,2,2,2,2,2,2,2,  # c8 - cf
    2,2,2,2,2,2,2,2,  # d0 - d7
    2,2,2,2,2,2,2,2,  # d8 - df
    0,0,0,0,0,0,0,0,  # e0 - e7
    0,0,0,0,0,0,0,0,  # e8 - ef
    0,0,0,0,0,0,0,0,  # f0 - f7
    0,0,0,0,0,0,0,5  # f8 - ff
)

EUCJP_st = (
          3,     4,     3,     5,eStart,eError,eError,eError,#00-07
     eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,#08-0f
     eItsMe,eItsMe,eStart,eError,eStart,eError,eError,eError,#10-17
     eError,eError,eStart,eError,eError,eError,     3,eError,#18-1f
          3,eError,eError,eError,eStart,eStart,eStart,eStart#20-27
)

EUCJPCharLenTable = (2, 2, 2, 3, 1, 0)

EUCJPSMModel = {'classTable': EUCJP_cls,
                'classFactor': 6,
                'stateTable': EUCJP_st,
                'charLenTable': EUCJPCharLenTable,
                'name': 'EUC-JP'}

# EUC-KR

EUCKR_cls  = (
    1,1,1,1,1,1,1,1,  # 00 - 07
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    1,1,1,1,1,1,1,1,  # 30 - 37
    1,1,1,1,1,1,1,1,  # 38 - 3f
    1,1,1,1,1,1,1,1,  # 40 - 47
    1,1,1,1,1,1,1,1,  # 48 - 4f
    1,1,1,1,1,1,1,1,  # 50 - 57
    1,1,1,1,1,1,1,1,  # 58 - 5f
    1,1,1,1,1,1,1,1,  # 60 - 67
    1,1,1,1,1,1,1,1,  # 68 - 6f
    1,1,1,1,1,1,1,1,  # 70 - 77
    1,1,1,1,1,1,1,1,  # 78 - 7f
    0,0,0,0,0,0,0,0,  # 80 - 87
    0,0,0,0,0,0,0,0,  # 88 - 8f
    0,0,0,0,0,0,0,0,  # 90 - 97
    0,0,0,0,0,0,0,0,  # 98 - 9f
    0,2,2,2,2,2,2,2,  # a0 - a7
    2,2,2,2,2,3,3,3,  # a8 - af
    2,2,2,2,2,2,2,2,  # b0 - b7
    2,2,2,2,2,2,2,2,  # b8 - bf
    2,2,2,2,2,2,2,2,  # c0 - c7
    2,3,2,2,2,2,2,2,  # c8 - cf
    2,2,2,2,2,2,2,2,  # d0 - d7
    2,2,2,2,2,2,2,2,  # d8 - df
    2,2,2,2,2,2,2,2,  # e0 - e7
    2,2,2,2,2,2,2,2,  # e8 - ef
    2,2,2,2,2,2,2,2,  # f0 - f7
    2,2,2,2,2,2,2,0   # f8 - ff
)

EUCKR_st = (
    eError,eStart,     3,eError,eError,eError,eError,eError,#00-07
    eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,eStart #08-0f
)

EUCKRCharLenTable = (0, 1, 2, 0)

EUCKRSMModel = {'classTable': EUCKR_cls,
                'classFactor': 4,
                'stateTable': EUCKR_st,
                'charLenTable': EUCKRCharLenTable,
                'name': 'EUC-KR'}

# EUC-TW

EUCTW_cls = (
    2,2,2,2,2,2,2,2,  # 00 - 07
    2,2,2,2,2,2,0,0,  # 08 - 0f
    2,2,2,2,2,2,2,2,  # 10 - 17
    2,2,2,0,2,2,2,2,  # 18 - 1f
    2,2,2,2,2,2,2,2,  # 20 - 27
    2,2,2,2,2,2,2,2,  # 28 - 2f
    2,2,2,2,2,2,2,2,  # 30 - 37
    2,2,2,2,2,2,2,2,  # 38 - 3f
    2,2,2,2,2,2,2,2,  # 40 - 47
    2,2,2,2,2,2,2,2,  # 48 - 4f
    2,2,2,2,2,2,2,2,  # 50 - 57
    2,2,2,2,2,2,2,2,  # 58 - 5f
    2,2,2,2,2,2,2,2,  # 60 - 67
    2,2,2,2,2,2,2,2,  # 68 - 6f
    2,2,2,2,2,2,2,2,  # 70 - 77
    2,2,2,2,2,2,2,2,  # 78 - 7f
    0,0,0,0,0,0,0,0,  # 80 - 87
    0,0,0,0,0,0,6,0,  # 88 - 8f
    0,0,0,0,0,0,0,0,  # 90 - 97
    0,0,0,0,0,0,0,0,  # 98 - 9f
    0,3,4,4,4,4,4,4,  # a0 - a7
    5,5,1,1,1,1,1,1,  # a8 - af
    1,1,1,1,1,1,1,1,  # b0 - b7
    1,1,1,1,1,1,1,1,  # b8 - bf
    1,1,3,1,3,3,3,3,  # c0 - c7
    3,3,3,3,3,3,3,3,  # c8 - cf
    3,3,3,3,3,3,3,3,  # d0 - d7
    3,3,3,3,3,3,3,3,  # d8 - df
    3,3,3,3,3,3,3,3,  # e0 - e7
    3,3,3,3,3,3,3,3,  # e8 - ef
    3,3,3,3,3,3,3,3,  # f0 - f7
    3,3,3,3,3,3,3,0   # f8 - ff
)

EUCTW_st = (
    eError,eError,eStart,     3,     3,     3,     4,eError,#00-07
    eError,eError,eError,eError,eError,eError,eItsMe,eItsMe,#08-0f
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eStart,eError,#10-17
    eStart,eStart,eStart,eError,eError,eError,eError,eError,#18-1f
         5,eError,eError,eError,eStart,eError,eStart,eStart,#20-27
    eStart,eError,eStart,eStart,eStart,eStart,eStart,eStart #28-2f
)

EUCTWCharLenTable = (0, 0, 1, 2, 2, 2, 3)

EUCTWSMModel = {'classTable': EUCTW_cls,
                'classFactor': 7,
                'stateTable': EUCTW_st,
                'charLenTable': EUCTWCharLenTable,
                'name': 'x-euc-tw'}

# GB2312

GB2312_cls = (
    1,1,1,1,1,1,1,1,  # 00 - 07
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    3,3,3,3,3,3,3,3,  # 30 - 37
    3,3,1,1,1,1,1,1,  # 38 - 3f
    2,2,2,2,2,2,2,2,  # 40 - 47
    2,2,2,2,2,2,2,2,  # 48 - 4f
    2,2,2,2,2,2,2,2,  # 50 - 57
    2,2,2,2,2,2,2,2,  # 58 - 5f
    2,2,2,2,2,2,2,2,  # 60 - 67
    2,2,2,2,2,2,2,2,  # 68 - 6f
    2,2,2,2,2,2,2,2,  # 70 - 77
    2,2,2,2,2,2,2,4,  # 78 - 7f
    5,6,6,6,6,6,6,6,  # 80 - 87
    6,6,6,6,6,6,6,6,  # 88 - 8f
    6,6,6,6,6,6,6,6,  # 90 - 97
    6,6,6,6,6,6,6,6,  # 98 - 9f
    6,6,6,6,6,6,6,6,  # a0 - a7
    6,6,6,6,6,6,6,6,  # a8 - af
    6,6,6,6,6,6,6,6,  # b0 - b7
    6,6,6,6,6,6,6,6,  # b8 - bf
    6,6,6,6,6,6,6,6,  # c0 - c7
    6,6,6,6,6,6,6,6,  # c8 - cf
    6,6,6,6,6,6,6,6,  # d0 - d7
    6,6,6,6,6,6,6,6,  # d8 - df
    6,6,6,6,6,6,6,6,  # e0 - e7
    6,6,6,6,6,6,6,6,  # e8 - ef
    6,6,6,6,6,6,6,6,  # f0 - f7
    6,6,6,6,6,6,6,0   # f8 - ff
)

GB2312_st = (
    eError,eStart,eStart,eStart,eStart,eStart,     3,eError,#00-07
    eError,eError,eError,eError,eError,eError,eItsMe,eItsMe,#08-0f
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,#10-17
         4,eError,eStart,eStart,eError,eError,eError,eError,#18-1f
    eError,eError,     5,eError,eError,eError,eItsMe,eError,#20-27
    eError,eError,eStart,eStart,eStart,eStart,eStart,eStart #28-2f
)

# To be accurate, the length of class 6 can be either 2 or 4.
# But it is not necessary to discriminate between the two since
# it is used for frequency analysis only, and we are validing
# each code range there as well. So it is safe to set it to be
# 2 here.
GB2312CharLenTable = (0, 1, 1, 1, 1, 1, 2)

GB2312SMModel = {'classTable': GB2312_cls,
                  'classFactor': 7,
                  'stateTable': GB2312_st,
                  'charLenTable': GB2312CharLenTable,
                  'name': 'GB2312'}

# Shift_JIS

SJIS_cls = (
    1,1,1,1,1,1,1,1,  # 00 - 07
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    1,1,1,1,1,1,1,1,  # 30 - 37
    1,1,1,1,1,1,1,1,  # 38 - 3f
    2,2,2,2,2,2,2,2,  # 40 - 47
    2,2,2,2,2,2,2,2,  # 48 - 4f
    2,2,2,2,2,2,2,2,  # 50 - 57
    2,2,2,2,2,2,2,2,  # 58 - 5f
    2,2,2,2,2,2,2,2,  # 60 - 67
    2,2,2,2,2,2,2,2,  # 68 - 6f
    2,2,2,2,2,2,2,2,  # 70 - 77
    2,2,2,2,2,2,2,1,  # 78 - 7f
    3,3,3,3,3,3,3,3,  # 80 - 87
    3,3,3,3,3,3,3,3,  # 88 - 8f
    3,3,3,3,3,3,3,3,  # 90 - 97
    3,3,3,3,3,3,3,3,  # 98 - 9f
    #0xa0 is illegal in sjis encoding, but some pages does
    #contain such byte. We need to be more error forgiven.
    2,2,2,2,2,2,2,2,  # a0 - a7
    2,2,2,2,2,2,2,2,  # a8 - af
    2,2,2,2,2,2,2,2,  # b0 - b7
    2,2,2,2,2,2,2,2,  # b8 - bf
    2,2,2,2,2,2,2,2,  # c0 - c7
    2,2,2,2,2,2,2,2,  # c8 - cf
    2,2,2,2,2,2,2,2,  # d0 - d7
    2,2,2,2,2,2,2,2,  # d8 - df
    3,3,3,3,3,3,3,3,  # e0 - e7
    3,3,3,3,3,4,4,4,  # e8 - ef
    4,4,4,4,4,4,4,4,  # f0 - f7
    4,4,4,4,4,0,0,0   # f8 - ff
)


SJIS_st = (
    eError,eStart,eStart,     3,eError,eError,eError,eError,#00-07
    eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,#08-0f
    eItsMe,eItsMe,eError,eError,eStart,eStart,eStart,eStart #10-17
)

SJISCharLenTable = (0, 1, 1, 2, 0, 0)

SJISSMModel = {'classTable': SJIS_cls,
               'classFactor': 6,
               'stateTable': SJIS_st,
               'charLenTable': SJISCharLenTable,
               'name': 'Shift_JIS'}

# UCS2-BE

UCS2BE_cls = (
    0,0,0,0,0,0,0,0,  # 00 - 07
    0,0,1,0,0,2,0,0,  # 08 - 0f
    0,0,0,0,0,0,0,0,  # 10 - 17
    0,0,0,3,0,0,0,0,  # 18 - 1f
    0,0,0,0,0,0,0,0,  # 20 - 27
    0,3,3,3,3,3,0,0,  # 28 - 2f
    0,0,0,0,0,0,0,0,  # 30 - 37
    0,0,0,0,0,0,0,0,  # 38 - 3f
    0,0,0,0,0,0,0,0,  # 40 - 47
    0,0,0,0,0,0,0,0,  # 48 - 4f
    0,0,0,0,0,0,0,0,  # 50 - 57
    0,0,0,0,0,0,0,0,  # 58 - 5f
    0,0,0,0,0,0,0,0,  # 60 - 67
    0,0,0,0,0,0,0,0,  # 68 - 6f
    0,0,0,0,0,0,0,0,  # 70 - 77
    0,0,0,0,0,0,0,0,  # 78 - 7f
    0,0,0,0,0,0,0,0,  # 80 - 87
    0,0,0,0,0,0,0,0,  # 88 - 8f
    0,0,0,0,0,0,0,0,  # 90 - 97
    0,0,0,0,0,0,0,0,  # 98 - 9f
    0,0,0,0,0,0,0,0,  # a0 - a7
    0,0,0,0,0,0,0,0,  # a8 - af
    0,0,0,0,0,0,0,0,  # b0 - b7
    0,0,0,0,0,0,0,0,  # b8 - bf
    0,0,0,0,0,0,0,0,  # c0 - c7
    0,0,0,0,0,0,0,0,  # c8 - cf
    0,0,0,0,0,0,0,0,  # d0 - d7
    0,0,0,0,0,0,0,0,  # d8 - df
    0,0,0,0,0,0,0,0,  # e0 - e7
    0,0,0,0,0,0,0,0,  # e8 - ef
    0,0,0,0,0,0,0,0,  # f0 - f7
    0,0,0,0,0,0,4,5   # f8 - ff
)

UCS2BE_st  = (
          5,     7,     7,eError,     4,     3,eError,eError,#00-07
     eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,#08-0f
     eItsMe,eItsMe,     6,     6,     6,     6,eError,eError,#10-17
          6,     6,     6,     6,     6,eItsMe,     6,     6,#18-1f
          6,     6,     6,     6,     5,     7,     7,eError,#20-27
          5,     8,     6,     6,eError,     6,     6,     6,#28-2f
          6,     6,     6,     6,eError,eError,eStart,eStart #30-37
)

UCS2BECharLenTable = (2, 2, 2, 0, 2, 2)

UCS2BESMModel = {'classTable': UCS2BE_cls,
                 'classFactor': 6,
                 'stateTable': UCS2BE_st,
                 'charLenTable': UCS2BECharLenTable,
                 'name': 'UTF-16BE'}

# UCS2-LE

UCS2LE_cls = (
    0,0,0,0,0,0,0,0,  # 00 - 07
    0,0,1,0,0,2,0,0,  # 08 - 0f
    0,0,0,0,0,0,0,0,  # 10 - 17
    0,0,0,3,0,0,0,0,  # 18 - 1f
    0,0,0,0,0,0,0,0,  # 20 - 27
    0,3,3,3,3,3,0,0,  # 28 - 2f
    0,0,0,0,0,0,0,0,  # 30 - 37
    0,0,0,0,0,0,0,0,  # 38 - 3f
    0,0,0,0,0,0,0,0,  # 40 - 47
    0,0,0,0,0,0,0,0,  # 48 - 4f
    0,0,0,0,0,0,0,0,  # 50 - 57
    0,0,0,0,0,0,0,0,  # 58 - 5f
    0,0,0,0,0,0,0,0,  # 60 - 67
    0,0,0,0,0,0,0,0,  # 68 - 6f
    0,0,0,0,0,0,0,0,  # 70 - 77
    0,0,0,0,0,0,0,0,  # 78 - 7f
    0,0,0,0,0,0,0,0,  # 80 - 87
    0,0,0,0,0,0,0,0,  # 88 - 8f
    0,0,0,0,0,0,0,0,  # 90 - 97
    0,0,0,0,0,0,0,0,  # 98 - 9f
    0,0,0,0,0,0,0,0,  # a0 - a7
    0,0,0,0,0,0,0,0,  # a8 - af
    0,0,0,0,0,0,0,0,  # b0 - b7
    0,0,0,0,0,0,0,0,  # b8 - bf
    0,0,0,0,0,0,0,0,  # c0 - c7
    0,0,0,0,0,0,0,0,  # c8 - cf
    0,0,0,0,0,0,0,0,  # d0 - d7
    0,0,0,0,0,0,0,0,  # d8 - df
    0,0,0,0,0,0,0,0,  # e0 - e7
    0,0,0,0,0,0,0,0,  # e8 - ef
    0,0,0,0,0,0,0,0,  # f0 - f7
    0,0,0,0,0,0,4,5   # f8 - ff
)

UCS2LE_st = (
          6,     6,     7,     6,     4,     3,eError,eError,#00-07
     eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,#08-0f
     eItsMe,eItsMe,     5,     5,     5,eError,eItsMe,eError,#10-17
          5,     5,     5,eError,     5,eError,     6,     6,#18-1f
          7,     6,     8,     8,     5,     5,     5,eError,#20-27
          5,     5,     5,eError,eError,eError,     5,     5,#28-2f
          5,     5,     5,eError,     5,eError,eStart,eStart #30-37
)

UCS2LECharLenTable = (2, 2, 2, 2, 2, 2)

UCS2LESMModel = {'classTable': UCS2LE_cls,
                 'classFactor': 6,
                 'stateTable': UCS2LE_st,
                 'charLenTable': UCS2LECharLenTable,
                 'name': 'UTF-16LE'}

# UTF-8

UTF8_cls = (
    1,1,1,1,1,1,1,1,  # 00 - 07  #allow 0x00 as a legal value
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    1,1,1,1,1,1,1,1,  # 30 - 37
    1,1,1,1,1,1,1,1,  # 38 - 3f
    1,1,1,1,1,1,1,1,  # 40 - 47
    1,1,1,1,1,1,1,1,  # 48 - 4f
    1,1,1,1,1,1,1,1,  # 50 - 57
    1,1,1,1,1,1,1,1,  # 58 - 5f
    1,1,1,1,1,1,1,1,  # 60 - 67
    1,1,1,1,1,1,1,1,  # 68 - 6f
    1,1,1,1,1,1,1,1,  # 70 - 77
    1,1,1,1,1,1,1,1,  # 78 - 7f
    2,2,2,2,3,3,3,3,  # 80 - 87
    4,4,4,4,4,4,4,4,  # 88 - 8f
    4,4,4,4,4,4,4,4,  # 90 - 97
    4,4,4,4,4,4,4,4,  # 98 - 9f
    5,5,5,5,5,5,5,5,  # a0 - a7
    5,5,5,5,5,5,5,5,  # a8 - af
    5,5,5,5,5,5,5,5,  # b0 - b7
    5,5,5,5,5,5,5,5,  # b8 - bf
    0,0,6,6,6,6,6,6,  # c0 - c7
    6,6,6,6,6,6,6,6,  # c8 - cf
    6,6,6,6,6,6,6,6,  # d0 - d7
    6,6,6,6,6,6,6,6,  # d8 - df
    7,8,8,8,8,8,8,8,  # e0 - e7
    8,8,8,8,8,9,8,8,  # e8 - ef
    10,11,11,11,11,11,11,11,  # f0 - f7
    12,13,13,13,14,15,0,0    # f8 - ff
)

UTF8_st = (
    eError,eStart,eError,eError,eError,eError,     12,   10,#00-07
         9,     11,     8,     7,     6,     5,     4,    3,#08-0f
    eError,eError,eError,eError,eError,eError,eError,eError,#10-17
    eError,eError,eError,eError,eError,eError,eError,eError,#18-1f
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,#20-27
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,#28-2f
    eError,eError,     5,     5,     5,     5,eError,eError,#30-37
    eError,eError,eError,eError,eError,eError,eError,eError,#38-3f
    eError,eError,eError,     5,     5,     5,eError,eError,#40-47
    eError,eError,eError,eError,eError,eError,eError,eError,#48-4f
    eError,eError,     7,     7,     7,     7,eError,eError,#50-57
    eError,eError,eError,eError,eError,eError,eError,eError,#58-5f
    eError,eError,eError,eError,     7,     7,eError,eError,#60-67
    eError,eError,eError,eError,eError,eError,eError,eError,#68-6f
    eError,eError,     9,     9,     9,     9,eError,eError,#70-77
    eError,eError,eError,eError,eError,eError,eError,eError,#78-7f
    eError,eError,eError,eError,eError,     9,eError,eError,#80-87
    eError,eError,eError,eError,eError,eError,eError,eError,#88-8f
    eError,eError,    12,    12,    12,    12,eError,eError,#90-97
    eError,eError,eError,eError,eError,eError,eError,eError,#98-9f
    eError,eError,eError,eError,eError,    12,eError,eError,#a0-a7
    eError,eError,eError,eError,eError,eError,eError,eError,#a8-af
    eError,eError,    12,    12,    12,eError,eError,eError,#b0-b7
    eError,eError,eError,eError,eError,eError,eError,eError,#b8-bf
    eError,eError,eStart,eStart,eStart,eStart,eError,eError,#c0-c7
    eError,eError,eError,eError,eError,eError,eError,eError #c8-cf
)

UTF8CharLenTable = (0, 1, 0, 0, 0, 0, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6)

UTF8SMModel = {'classTable': UTF8_cls,
               'classFactor': 16,
               'stateTable': UTF8_st,
               'charLenTable': UTF8CharLenTable,
               'name': 'UTF-8'}

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py000064400000026013151733566760023527 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# The following result for thai was collected from a limited sample (1M).

# Character Mapping Table:
TIS620CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,182,106,107,100,183,184,185,101, 94,186,187,108,109,110,111,  # 40
188,189,190, 89, 95,112,113,191,192,193,194,253,253,253,253,253,  # 50
253, 64, 72, 73,114, 74,115,116,102, 81,201,117, 90,103, 78, 82,  # 60
 96,202, 91, 79, 84,104,105, 97, 98, 92,203,253,253,253,253,253,  # 70
209,210,211,212,213, 88,214,215,216,217,218,219,220,118,221,222,
223,224, 99, 85, 83,225,226,227,228,229,230,231,232,233,234,235,
236,  5, 30,237, 24,238, 75,  8, 26, 52, 34, 51,119, 47, 58, 57,
 49, 53, 55, 43, 20, 19, 44, 14, 48,  3, 17, 25, 39, 62, 31, 54,
 45,  9, 16,  2, 61, 15,239, 12, 42, 46, 18, 21, 76,  4, 66, 63,
 22, 10,  1, 36, 23, 13, 40, 27, 32, 35, 86,240,241,242,243,244,
 11, 28, 41, 29, 33,245, 50, 37,  6,  7, 67, 77, 38, 93,246,247,
 68, 56, 59, 65, 69, 60, 70, 80, 71, 87,248,249,250,251,252,253,
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 92.6386%
# first 1024 sequences:7.3177%
# rest  sequences:     1.0230%
# negative sequences:  0.0436%
ThaiLangModel = (
0,1,3,3,3,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,0,0,3,3,3,0,3,3,3,3,
0,3,3,0,0,0,1,3,0,3,3,2,3,3,0,1,2,3,3,3,3,0,2,0,2,0,0,3,2,1,2,2,
3,0,3,3,2,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,3,0,3,2,3,0,2,2,2,3,
0,2,3,0,0,0,0,1,0,1,2,3,1,1,3,2,2,0,1,1,0,0,1,0,0,0,0,0,0,0,1,1,
3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,3,3,2,3,2,3,3,2,2,2,
3,1,2,3,0,3,3,2,2,1,2,3,3,1,2,0,1,3,0,1,0,0,1,0,0,0,0,0,0,0,1,1,
3,3,2,2,3,3,3,3,1,2,3,3,3,3,3,2,2,2,2,3,3,2,2,3,3,2,2,3,2,3,2,2,
3,3,1,2,3,1,2,2,3,3,1,0,2,1,0,0,3,1,2,1,0,0,1,0,0,0,0,0,0,1,0,1,
3,3,3,3,3,3,2,2,3,3,3,3,2,3,2,2,3,3,2,2,3,2,2,2,2,1,1,3,1,2,1,1,
3,2,1,0,2,1,0,1,0,1,1,0,1,1,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,
3,3,3,2,3,2,3,3,2,2,3,2,3,3,2,3,1,1,2,3,2,2,2,3,2,2,2,2,2,1,2,1,
2,2,1,1,3,3,2,1,0,1,2,2,0,1,3,0,0,0,1,1,0,0,0,0,0,2,3,0,0,2,1,1,
3,3,2,3,3,2,0,0,3,3,0,3,3,0,2,2,3,1,2,2,1,1,1,0,2,2,2,0,2,2,1,1,
0,2,1,0,2,0,0,2,0,1,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,2,3,3,2,0,0,3,3,0,2,3,0,2,1,2,2,2,2,1,2,0,0,2,2,2,0,2,2,1,1,
0,2,1,0,2,0,0,2,0,1,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,
3,3,2,3,2,3,2,0,2,2,1,3,2,1,3,2,1,2,3,2,2,3,0,2,3,2,2,1,2,2,2,2,
1,2,2,0,0,0,0,2,0,1,2,0,1,1,1,0,1,0,3,1,1,0,0,0,0,0,0,0,0,0,1,0,
3,3,2,3,3,2,3,2,2,2,3,2,2,3,2,2,1,2,3,2,2,3,1,3,2,2,2,3,2,2,2,3,
3,2,1,3,0,1,1,1,0,2,1,1,1,1,1,0,1,0,1,1,0,0,0,0,0,0,0,0,0,2,0,0,
1,0,0,3,0,3,3,3,3,3,0,0,3,0,2,2,3,3,3,3,3,0,0,0,1,1,3,0,0,0,0,2,
0,0,1,0,0,0,0,0,0,0,2,3,0,0,0,3,0,2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,
2,0,3,3,3,3,0,0,2,3,0,0,3,0,3,3,2,3,3,3,3,3,0,0,3,3,3,0,0,0,3,3,
0,0,3,0,0,0,0,2,0,0,2,1,1,3,0,0,1,0,0,2,3,0,1,0,0,0,0,0,0,0,1,0,
3,3,3,3,2,3,3,3,3,3,3,3,1,2,1,3,3,2,2,1,2,2,2,3,1,1,2,0,2,1,2,1,
2,2,1,0,0,0,1,1,0,1,0,1,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,
3,0,2,1,2,3,3,3,0,2,0,2,2,0,2,1,3,2,2,1,2,1,0,0,2,2,1,0,2,1,2,2,
0,1,1,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,2,1,3,3,1,1,3,0,2,3,1,1,3,2,1,1,2,0,2,2,3,2,1,1,1,1,1,2,
3,0,0,1,3,1,2,1,2,0,3,0,0,0,1,0,3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
3,3,1,1,3,2,3,3,3,1,3,2,1,3,2,1,3,2,2,2,2,1,3,3,1,2,1,3,1,2,3,0,
2,1,1,3,2,2,2,1,2,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,
3,3,2,3,2,3,3,2,3,2,3,2,3,3,2,1,0,3,2,2,2,1,2,2,2,1,2,2,1,2,1,1,
2,2,2,3,0,1,3,1,1,1,1,0,1,1,0,2,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,2,3,2,2,1,1,3,2,3,2,3,2,0,3,2,2,1,2,0,2,2,2,1,2,2,2,2,1,
3,2,1,2,2,1,0,2,0,1,0,0,1,1,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,2,3,1,2,3,3,2,2,3,0,1,1,2,0,3,3,2,2,3,0,1,1,3,0,0,0,0,
3,1,0,3,3,0,2,0,2,1,0,0,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,2,3,2,3,3,0,1,3,1,1,2,1,2,1,1,3,1,1,0,2,3,1,1,1,1,1,1,1,1,
3,1,1,2,2,2,2,1,1,1,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,2,2,1,1,2,1,3,3,2,3,2,2,3,2,2,3,1,2,2,1,2,0,3,2,1,2,2,2,2,2,1,
3,2,1,2,2,2,1,1,1,1,0,0,1,1,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,1,3,3,0,2,1,0,3,2,0,0,3,1,0,1,1,0,1,0,0,0,0,0,1,
1,0,0,1,0,3,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,2,2,2,3,0,0,1,3,0,3,2,0,3,2,2,3,3,3,3,3,1,0,2,2,2,0,2,2,1,2,
0,2,3,0,0,0,0,1,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,0,2,3,1,3,3,2,3,3,0,3,3,0,3,2,2,3,2,3,3,3,0,0,2,2,3,0,1,1,1,3,
0,0,3,0,0,0,2,2,0,1,3,0,1,2,2,2,3,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
3,2,3,3,2,0,3,3,2,2,3,1,3,2,1,3,2,0,1,2,2,0,2,3,2,1,0,3,0,0,0,0,
3,0,0,2,3,1,3,0,0,3,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,3,2,2,2,1,2,0,1,3,1,1,3,1,3,0,0,2,1,1,1,1,2,1,1,1,0,2,1,0,1,
1,2,0,0,0,3,1,1,0,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,0,3,1,0,0,0,1,0,
3,3,3,3,2,2,2,2,2,1,3,1,1,1,2,0,1,1,2,1,2,1,3,2,0,0,3,1,1,1,1,1,
3,1,0,2,3,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,2,3,0,3,3,0,2,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,2,3,1,3,0,0,1,2,0,0,2,0,3,3,2,3,3,3,2,3,0,0,2,2,2,0,0,0,2,2,
0,0,1,0,0,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
0,0,0,3,0,2,0,0,0,0,0,0,0,0,0,0,1,2,3,1,3,3,0,0,1,0,3,0,0,0,0,0,
0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,1,2,3,1,2,3,1,0,3,0,2,2,1,0,2,1,1,2,0,1,0,0,1,1,1,1,0,1,0,0,
1,0,0,0,0,1,1,0,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,2,1,0,1,1,1,3,1,2,2,2,2,2,2,1,1,1,1,0,3,1,0,1,3,1,1,1,1,
1,1,0,2,0,1,3,1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,1,
3,0,2,2,1,3,3,2,3,3,0,1,1,0,2,2,1,2,1,3,3,1,0,0,3,2,0,0,0,0,2,1,
0,1,0,0,0,0,1,2,0,1,1,3,1,1,2,2,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,3,0,0,1,0,0,0,3,0,0,3,0,3,1,0,1,1,1,3,2,0,0,0,3,0,0,0,0,2,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,1,3,2,1,3,3,1,2,2,0,1,2,1,0,1,2,0,0,0,0,0,3,0,0,0,3,0,0,0,0,
3,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,1,2,0,3,3,3,2,2,0,1,1,0,1,3,0,0,0,2,2,0,0,0,0,3,1,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,2,3,1,2,0,0,2,1,0,3,1,0,1,2,0,1,1,1,1,3,0,0,3,1,1,0,2,2,1,1,
0,2,0,0,0,0,0,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,3,1,2,0,0,2,2,0,1,2,0,1,0,1,3,1,2,1,0,0,0,2,0,3,0,0,0,1,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,1,1,2,2,0,0,0,2,0,2,1,0,1,1,0,1,1,1,2,1,0,0,1,1,1,0,2,1,1,1,
0,1,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,
0,0,0,2,0,1,3,1,1,1,1,0,0,0,0,3,2,0,1,0,0,0,1,2,0,0,0,1,0,0,0,0,
0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,3,3,3,3,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,2,3,2,2,0,0,0,1,0,0,0,0,2,3,2,1,2,2,3,0,0,0,2,3,1,0,0,0,1,1,
0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,
3,3,2,2,0,1,0,0,0,0,2,0,2,0,1,0,0,0,1,1,0,0,0,2,1,0,1,0,1,1,0,0,
0,1,0,2,0,0,1,0,3,0,1,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,1,0,0,1,0,0,0,0,0,1,1,2,0,0,0,0,1,0,0,1,3,1,0,0,0,0,1,1,0,0,
0,1,0,0,0,0,3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,
3,3,1,1,1,1,2,3,0,0,2,1,1,1,1,1,0,2,1,1,0,0,0,2,1,0,1,2,1,1,0,1,
2,1,0,3,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,3,1,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,
0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,2,0,0,0,0,0,0,1,2,1,0,1,1,0,2,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2,0,0,0,1,3,0,1,0,0,0,2,0,0,0,0,0,0,0,1,2,0,0,0,0,0,
3,3,0,0,1,1,2,0,0,1,2,1,0,1,1,1,0,1,1,0,0,2,1,1,0,1,0,0,1,1,1,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,1,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,0,0,1,1,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,1,2,0,1,2,0,0,1,1,0,2,0,1,0,0,1,0,0,0,0,1,0,0,0,2,0,0,0,0,
1,0,0,1,0,1,1,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,1,1,0,1,1,0,2,1,3,0,0,0,0,1,1,0,0,0,0,0,0,0,3,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,1,0,1,0,0,2,0,0,2,0,0,1,1,2,0,0,1,1,0,0,0,1,0,0,0,1,1,0,0,0,
1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,1,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,3,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,
1,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,0,0,2,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
)

TIS620ThaiModel = {
  'charToOrderMap': TIS620CharToOrderMap,
  'precedenceMatrix': ThaiLangModel,
  'mTypicalPositiveRatio': 0.926386,
  'keepEnglishLetter': False,
  'charsetName': "TIS-620"
}

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py000064400000007136151733566760023244 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys
from . import constants
from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import EUCJPDistributionAnalysis
from .jpcntx import EUCJPContextAnalysis
from .mbcssm import EUCJPSMModel


class EUCJPProber(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(EUCJPSMModel)
        self._mDistributionAnalyzer = EUCJPDistributionAnalysis()
        self._mContextAnalyzer = EUCJPContextAnalysis()
        self.reset()

    def reset(self):
        MultiByteCharSetProber.reset(self)
        self._mContextAnalyzer.reset()

    def get_charset_name(self):
        return "EUC-JP"

    def feed(self, aBuf):
        aLen = len(aBuf)
        for i in range(0, aLen):
            # PY3K: aBuf is a byte array, so aBuf[i] is an int, not a byte
            codingState = self._mCodingSM.next_state(aBuf[i])
            if codingState == constants.eError:
                if constants._debug:
                    sys.stderr.write(self.get_charset_name()
                                     + ' prober hit error at byte ' + str(i)
                                     + '\n')
                self._mState = constants.eNotMe
                break
            elif codingState == constants.eItsMe:
                self._mState = constants.eFoundIt
                break
            elif codingState == constants.eStart:
                charLen = self._mCodingSM.get_current_charlen()
                if i == 0:
                    self._mLastChar[1] = aBuf[0]
                    self._mContextAnalyzer.feed(self._mLastChar, charLen)
                    self._mDistributionAnalyzer.feed(self._mLastChar, charLen)
                else:
                    self._mContextAnalyzer.feed(aBuf[i - 1:i + 1], charLen)
                    self._mDistributionAnalyzer.feed(aBuf[i - 1:i + 1],
                                                     charLen)

        self._mLastChar[0] = aBuf[aLen - 1]

        if self.get_state() == constants.eDetecting:
            if (self._mContextAnalyzer.got_enough_data() and
               (self.get_confidence() > constants.SHORTCUT_THRESHOLD)):
                self._mState = constants.eFoundIt

        return self.get_state()

    def get_confidence(self):
        contxtCf = self._mContextAnalyzer.get_confidence()
        distribCf = self._mDistributionAnalyzer.get_confidence()
        return max(contxtCf, distribCf)
python3.3/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py000064400000241242151733566760022426 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Big5 frequency table
# by Taiwan's Mandarin Promotion Council
# <http://www.edu.tw:81/mandr/>
#
# 128  --> 0.42261
# 256  --> 0.57851
# 512  --> 0.74851
# 1024 --> 0.89384
# 2048 --> 0.97583
#
# Ideal Distribution Ratio = 0.74851/(1-0.74851) =2.98
# Random Distribution Ration = 512/(5401-512)=0.105
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR

BIG5_TYPICAL_DISTRIBUTION_RATIO = 0.75

#Char to FreqOrder table
BIG5_TABLE_SIZE = 5376

Big5CharToFreqOrder = (
   1,1801,1506, 255,1431, 198,   9,  82,   6,5008, 177, 202,3681,1256,2821, 110, #   16
3814,  33,3274, 261,  76,  44,2114,  16,2946,2187,1176, 659,3971,  26,3451,2653, #   32
1198,3972,3350,4202, 410,2215, 302, 590, 361,1964,   8, 204,  58,4510,5009,1932, #   48
  63,5010,5011, 317,1614,  75, 222, 159,4203,2417,1480,5012,3555,3091, 224,2822, #   64
3682,   3,  10,3973,1471,  29,2787,1135,2866,1940, 873, 130,3275,1123, 312,5013, #   80
4511,2052, 507, 252, 682,5014, 142,1915, 124, 206,2947,  34,3556,3204,  64, 604, #   96
5015,2501,1977,1978, 155,1991, 645, 641,1606,5016,3452, 337,  72, 406,5017,  80, #  112
 630, 238,3205,1509, 263, 939,1092,2654, 756,1440,1094,3453, 449,  69,2987, 591, #  128
 179,2096, 471, 115,2035,1844,  60,  50,2988, 134, 806,1869, 734,2036,3454, 180, #  144
 995,1607, 156, 537,2907, 688,5018, 319,1305, 779,2145, 514,2379, 298,4512, 359, #  160
2502,  90,2716,1338, 663,  11, 906,1099,2553,  20,2441, 182, 532,1716,5019, 732, #  176
1376,4204,1311,1420,3206,  25,2317,1056, 113, 399, 382,1950, 242,3455,2474, 529, #  192
3276, 475,1447,3683,5020, 117,  21, 656, 810,1297,2300,2334,3557,5021, 126,4205, #  208
 706, 456, 150, 613,4513,  71,1118,2037,4206, 145,3092,  85, 835, 486,2115,1246, #  224
1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,5022,2128,2359, 347,3815, 221, #  240
3558,3135,5023,1956,1153,4207,  83, 296,1199,3093, 192, 624,  93,5024, 822,1898, #  256
2823,3136, 795,2065, 991,1554,1542,1592,  27,  43,2867, 859, 139,1456, 860,4514, #  272
 437, 712,3974, 164,2397,3137, 695, 211,3037,2097, 195,3975,1608,3559,3560,3684, #  288
3976, 234, 811,2989,2098,3977,2233,1441,3561,1615,2380, 668,2077,1638, 305, 228, #  304
1664,4515, 467, 415,5025, 262,2099,1593, 239, 108, 300, 200,1033, 512,1247,2078, #  320
5026,5027,2176,3207,3685,2682, 593, 845,1062,3277,  88,1723,2038,3978,1951, 212, #  336
 266, 152, 149, 468,1899,4208,4516,  77, 187,5028,3038,  37,   5,2990,5029,3979, #  352
5030,5031,  39,2524,4517,2908,3208,2079,  55, 148,  74,4518, 545, 483,1474,1029, #  368
1665, 217,1870,1531,3138,1104,2655,4209,  24, 172,3562, 900,3980,3563,3564,4519, #  384
  32,1408,2824,1312, 329, 487,2360,2251,2717, 784,2683,   4,3039,3351,1427,1789, #  400
 188, 109, 499,5032,3686,1717,1790, 888,1217,3040,4520,5033,3565,5034,3352,1520, #  416
3687,3981, 196,1034, 775,5035,5036, 929,1816, 249, 439,  38,5037,1063,5038, 794, #  432
3982,1435,2301,  46, 178,3278,2066,5039,2381,5040, 214,1709,4521, 804,  35, 707, #  448
 324,3688,1601,2554, 140, 459,4210,5041,5042,1365, 839, 272, 978,2262,2580,3456, #  464
2129,1363,3689,1423, 697, 100,3094,  48,  70,1231, 495,3139,2196,5043,1294,5044, #  480
2080, 462, 586,1042,3279, 853, 256, 988, 185,2382,3457,1698, 434,1084,5045,3458, #  496
 314,2625,2788,4522,2335,2336, 569,2285, 637,1817,2525, 757,1162,1879,1616,3459, #  512
 287,1577,2116, 768,4523,1671,2868,3566,2526,1321,3816, 909,2418,5046,4211, 933, #  528
3817,4212,2053,2361,1222,4524, 765,2419,1322, 786,4525,5047,1920,1462,1677,2909, #  544
1699,5048,4526,1424,2442,3140,3690,2600,3353,1775,1941,3460,3983,4213, 309,1369, #  560
1130,2825, 364,2234,1653,1299,3984,3567,3985,3986,2656, 525,1085,3041, 902,2001, #  576
1475, 964,4527, 421,1845,1415,1057,2286, 940,1364,3141, 376,4528,4529,1381,   7, #  592
2527, 983,2383, 336,1710,2684,1846, 321,3461, 559,1131,3042,2752,1809,1132,1313, #  608
 265,1481,1858,5049, 352,1203,2826,3280, 167,1089, 420,2827, 776, 792,1724,3568, #  624
4214,2443,3281,5050,4215,5051, 446, 229, 333,2753, 901,3818,1200,1557,4530,2657, #  640
1921, 395,2754,2685,3819,4216,1836, 125, 916,3209,2626,4531,5052,5053,3820,5054, #  656
5055,5056,4532,3142,3691,1133,2555,1757,3462,1510,2318,1409,3569,5057,2146, 438, #  672
2601,2910,2384,3354,1068, 958,3043, 461, 311,2869,2686,4217,1916,3210,4218,1979, #  688
 383, 750,2755,2627,4219, 274, 539, 385,1278,1442,5058,1154,1965, 384, 561, 210, #  704
  98,1295,2556,3570,5059,1711,2420,1482,3463,3987,2911,1257, 129,5060,3821, 642, #  720
 523,2789,2790,2658,5061, 141,2235,1333,  68, 176, 441, 876, 907,4220, 603,2602, #  736
 710, 171,3464, 404, 549,  18,3143,2398,1410,3692,1666,5062,3571,4533,2912,4534, #  752
5063,2991, 368,5064, 146, 366,  99, 871,3693,1543, 748, 807,1586,1185,  22,2263, #  768
 379,3822,3211,5065,3212, 505,1942,2628,1992,1382,2319,5066, 380,2362, 218, 702, #  784
1818,1248,3465,3044,3572,3355,3282,5067,2992,3694, 930,3283,3823,5068,  59,5069, #  800
 585, 601,4221, 497,3466,1112,1314,4535,1802,5070,1223,1472,2177,5071, 749,1837, #  816
 690,1900,3824,1773,3988,1476, 429,1043,1791,2236,2117, 917,4222, 447,1086,1629, #  832
5072, 556,5073,5074,2021,1654, 844,1090, 105, 550, 966,1758,2828,1008,1783, 686, #  848
1095,5075,2287, 793,1602,5076,3573,2603,4536,4223,2948,2302,4537,3825, 980,2503, #  864
 544, 353, 527,4538, 908,2687,2913,5077, 381,2629,1943,1348,5078,1341,1252, 560, #  880
3095,5079,3467,2870,5080,2054, 973, 886,2081, 143,4539,5081,5082, 157,3989, 496, #  896
4224,  57, 840, 540,2039,4540,4541,3468,2118,1445, 970,2264,1748,1966,2082,4225, #  912
3144,1234,1776,3284,2829,3695, 773,1206,2130,1066,2040,1326,3990,1738,1725,4226, #  928
 279,3145,  51,1544,2604, 423,1578,2131,2067, 173,4542,1880,5083,5084,1583, 264, #  944
 610,3696,4543,2444, 280, 154,5085,5086,5087,1739, 338,1282,3096, 693,2871,1411, #  960
1074,3826,2445,5088,4544,5089,5090,1240, 952,2399,5091,2914,1538,2688, 685,1483, #  976
4227,2475,1436, 953,4228,2055,4545, 671,2400,  79,4229,2446,3285, 608, 567,2689, #  992
3469,4230,4231,1691, 393,1261,1792,2401,5092,4546,5093,5094,5095,5096,1383,1672, # 1008
3827,3213,1464, 522,1119, 661,1150, 216, 675,4547,3991,1432,3574, 609,4548,2690, # 1024
2402,5097,5098,5099,4232,3045,   0,5100,2476, 315, 231,2447, 301,3356,4549,2385, # 1040
5101, 233,4233,3697,1819,4550,4551,5102,  96,1777,1315,2083,5103, 257,5104,1810, # 1056
3698,2718,1139,1820,4234,2022,1124,2164,2791,1778,2659,5105,3097, 363,1655,3214, # 1072
5106,2993,5107,5108,5109,3992,1567,3993, 718, 103,3215, 849,1443, 341,3357,2949, # 1088
1484,5110,1712, 127,  67, 339,4235,2403, 679,1412, 821,5111,5112, 834, 738, 351, # 1104
2994,2147, 846, 235,1497,1881, 418,1993,3828,2719, 186,1100,2148,2756,3575,1545, # 1120
1355,2950,2872,1377, 583,3994,4236,2581,2995,5113,1298,3699,1078,2557,3700,2363, # 1136
  78,3829,3830, 267,1289,2100,2002,1594,4237, 348, 369,1274,2197,2178,1838,4552, # 1152
1821,2830,3701,2757,2288,2003,4553,2951,2758, 144,3358, 882,4554,3995,2759,3470, # 1168
4555,2915,5114,4238,1726, 320,5115,3996,3046, 788,2996,5116,2831,1774,1327,2873, # 1184
3997,2832,5117,1306,4556,2004,1700,3831,3576,2364,2660, 787,2023, 506, 824,3702, # 1200
 534, 323,4557,1044,3359,2024,1901, 946,3471,5118,1779,1500,1678,5119,1882,4558, # 1216
 165, 243,4559,3703,2528, 123, 683,4239, 764,4560,  36,3998,1793, 589,2916, 816, # 1232
 626,1667,3047,2237,1639,1555,1622,3832,3999,5120,4000,2874,1370,1228,1933, 891, # 1248
2084,2917, 304,4240,5121, 292,2997,2720,3577, 691,2101,4241,1115,4561, 118, 662, # 1264
5122, 611,1156, 854,2386,1316,2875,   2, 386, 515,2918,5123,5124,3286, 868,2238, # 1280
1486, 855,2661, 785,2216,3048,5125,1040,3216,3578,5126,3146, 448,5127,1525,5128, # 1296
2165,4562,5129,3833,5130,4242,2833,3579,3147, 503, 818,4001,3148,1568, 814, 676, # 1312
1444, 306,1749,5131,3834,1416,1030, 197,1428, 805,2834,1501,4563,5132,5133,5134, # 1328
1994,5135,4564,5136,5137,2198,  13,2792,3704,2998,3149,1229,1917,5138,3835,2132, # 1344
5139,4243,4565,2404,3580,5140,2217,1511,1727,1120,5141,5142, 646,3836,2448, 307, # 1360
5143,5144,1595,3217,5145,5146,5147,3705,1113,1356,4002,1465,2529,2530,5148, 519, # 1376
5149, 128,2133,  92,2289,1980,5150,4003,1512, 342,3150,2199,5151,2793,2218,1981, # 1392
3360,4244, 290,1656,1317, 789, 827,2365,5152,3837,4566, 562, 581,4004,5153, 401, # 1408
4567,2252,  94,4568,5154,1399,2794,5155,1463,2025,4569,3218,1944,5156, 828,1105, # 1424
4245,1262,1394,5157,4246, 605,4570,5158,1784,2876,5159,2835, 819,2102, 578,2200, # 1440
2952,5160,1502, 436,3287,4247,3288,2836,4005,2919,3472,3473,5161,2721,2320,5162, # 1456
5163,2337,2068,  23,4571, 193, 826,3838,2103, 699,1630,4248,3098, 390,1794,1064, # 1472
3581,5164,1579,3099,3100,1400,5165,4249,1839,1640,2877,5166,4572,4573, 137,4250, # 1488
 598,3101,1967, 780, 104, 974,2953,5167, 278, 899, 253, 402, 572, 504, 493,1339, # 1504
5168,4006,1275,4574,2582,2558,5169,3706,3049,3102,2253, 565,1334,2722, 863,  41, # 1520
5170,5171,4575,5172,1657,2338,  19, 463,2760,4251, 606,5173,2999,3289,1087,2085, # 1536
1323,2662,3000,5174,1631,1623,1750,4252,2691,5175,2878, 791,2723,2663,2339, 232, # 1552
2421,5176,3001,1498,5177,2664,2630, 755,1366,3707,3290,3151,2026,1609, 119,1918, # 1568
3474, 862,1026,4253,5178,4007,3839,4576,4008,4577,2265,1952,2477,5179,1125, 817, # 1584
4254,4255,4009,1513,1766,2041,1487,4256,3050,3291,2837,3840,3152,5180,5181,1507, # 1600
5182,2692, 733,  40,1632,1106,2879, 345,4257, 841,2531, 230,4578,3002,1847,3292, # 1616
3475,5183,1263, 986,3476,5184, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562, # 1632
4010,4011,2954, 967,2761,2665,1349, 592,2134,1692,3361,3003,1995,4258,1679,4012, # 1648
1902,2188,5185, 739,3708,2724,1296,1290,5186,4259,2201,2202,1922,1563,2605,2559, # 1664
1871,2762,3004,5187, 435,5188, 343,1108, 596,  17,1751,4579,2239,3477,3709,5189, # 1680
4580, 294,3582,2955,1693, 477, 979, 281,2042,3583, 643,2043,3710,2631,2795,2266, # 1696
1031,2340,2135,2303,3584,4581, 367,1249,2560,5190,3585,5191,4582,1283,3362,2005, # 1712
 240,1762,3363,4583,4584, 836,1069,3153, 474,5192,2149,2532, 268,3586,5193,3219, # 1728
1521,1284,5194,1658,1546,4260,5195,3587,3588,5196,4261,3364,2693,1685,4262, 961, # 1744
1673,2632, 190,2006,2203,3841,4585,4586,5197, 570,2504,3711,1490,5198,4587,2633, # 1760
3293,1957,4588, 584,1514, 396,1045,1945,5199,4589,1968,2449,5200,5201,4590,4013, # 1776
 619,5202,3154,3294, 215,2007,2796,2561,3220,4591,3221,4592, 763,4263,3842,4593, # 1792
5203,5204,1958,1767,2956,3365,3712,1174, 452,1477,4594,3366,3155,5205,2838,1253, # 1808
2387,2189,1091,2290,4264, 492,5206, 638,1169,1825,2136,1752,4014, 648, 926,1021, # 1824
1324,4595, 520,4596, 997, 847,1007, 892,4597,3843,2267,1872,3713,2405,1785,4598, # 1840
1953,2957,3103,3222,1728,4265,2044,3714,4599,2008,1701,3156,1551,  30,2268,4266, # 1856
5207,2027,4600,3589,5208, 501,5209,4267, 594,3478,2166,1822,3590,3479,3591,3223, # 1872
 829,2839,4268,5210,1680,3157,1225,4269,5211,3295,4601,4270,3158,2341,5212,4602, # 1888
4271,5213,4015,4016,5214,1848,2388,2606,3367,5215,4603, 374,4017, 652,4272,4273, # 1904
 375,1140, 798,5216,5217,5218,2366,4604,2269, 546,1659, 138,3051,2450,4605,5219, # 1920
2254, 612,1849, 910, 796,3844,1740,1371, 825,3845,3846,5220,2920,2562,5221, 692, # 1936
 444,3052,2634, 801,4606,4274,5222,1491, 244,1053,3053,4275,4276, 340,5223,4018, # 1952
1041,3005, 293,1168,  87,1357,5224,1539, 959,5225,2240, 721, 694,4277,3847, 219, # 1968
1478, 644,1417,3368,2666,1413,1401,1335,1389,4019,5226,5227,3006,2367,3159,1826, # 1984
 730,1515, 184,2840,  66,4607,5228,1660,2958, 246,3369, 378,1457, 226,3480, 975, # 2000
4020,2959,1264,3592, 674, 696,5229, 163,5230,1141,2422,2167, 713,3593,3370,4608, # 2016
4021,5231,5232,1186,  15,5233,1079,1070,5234,1522,3224,3594, 276,1050,2725, 758, # 2032
1126, 653,2960,3296,5235,2342, 889,3595,4022,3104,3007, 903,1250,4609,4023,3481, # 2048
3596,1342,1681,1718, 766,3297, 286,  89,2961,3715,5236,1713,5237,2607,3371,3008, # 2064
5238,2962,2219,3225,2880,5239,4610,2505,2533, 181, 387,1075,4024, 731,2190,3372, # 2080
5240,3298, 310, 313,3482,2304, 770,4278,  54,3054, 189,4611,3105,3848,4025,5241, # 2096
1230,1617,1850, 355,3597,4279,4612,3373, 111,4280,3716,1350,3160,3483,3055,4281, # 2112
2150,3299,3598,5242,2797,4026,4027,3009, 722,2009,5243,1071, 247,1207,2343,2478, # 2128
1378,4613,2010, 864,1437,1214,4614, 373,3849,1142,2220, 667,4615, 442,2763,2563, # 2144
3850,4028,1969,4282,3300,1840, 837, 170,1107, 934,1336,1883,5244,5245,2119,4283, # 2160
2841, 743,1569,5246,4616,4284, 582,2389,1418,3484,5247,1803,5248, 357,1395,1729, # 2176
3717,3301,2423,1564,2241,5249,3106,3851,1633,4617,1114,2086,4285,1532,5250, 482, # 2192
2451,4618,5251,5252,1492, 833,1466,5253,2726,3599,1641,2842,5254,1526,1272,3718, # 2208
4286,1686,1795, 416,2564,1903,1954,1804,5255,3852,2798,3853,1159,2321,5256,2881, # 2224
4619,1610,1584,3056,2424,2764, 443,3302,1163,3161,5257,5258,4029,5259,4287,2506, # 2240
3057,4620,4030,3162,2104,1647,3600,2011,1873,4288,5260,4289, 431,3485,5261, 250, # 2256
  97,  81,4290,5262,1648,1851,1558, 160, 848,5263, 866, 740,1694,5264,2204,2843, # 2272
3226,4291,4621,3719,1687, 950,2479, 426, 469,3227,3720,3721,4031,5265,5266,1188, # 2288
 424,1996, 861,3601,4292,3854,2205,2694, 168,1235,3602,4293,5267,2087,1674,4622, # 2304
3374,3303, 220,2565,1009,5268,3855, 670,3010, 332,1208, 717,5269,5270,3603,2452, # 2320
4032,3375,5271, 513,5272,1209,2882,3376,3163,4623,1080,5273,5274,5275,5276,2534, # 2336
3722,3604, 815,1587,4033,4034,5277,3605,3486,3856,1254,4624,1328,3058,1390,4035, # 2352
1741,4036,3857,4037,5278, 236,3858,2453,3304,5279,5280,3723,3859,1273,3860,4625, # 2368
5281, 308,5282,4626, 245,4627,1852,2480,1307,2583, 430, 715,2137,2454,5283, 270, # 2384
 199,2883,4038,5284,3606,2727,1753, 761,1754, 725,1661,1841,4628,3487,3724,5285, # 2400
5286, 587,  14,3305, 227,2608, 326, 480,2270, 943,2765,3607, 291, 650,1884,5287, # 2416
1702,1226, 102,1547,  62,3488, 904,4629,3489,1164,4294,5288,5289,1224,1548,2766, # 2432
 391, 498,1493,5290,1386,1419,5291,2056,1177,4630, 813, 880,1081,2368, 566,1145, # 2448
4631,2291,1001,1035,2566,2609,2242, 394,1286,5292,5293,2069,5294,  86,1494,1730, # 2464
4039, 491,1588, 745, 897,2963, 843,3377,4040,2767,2884,3306,1768, 998,2221,2070, # 2480
 397,1827,1195,1970,3725,3011,3378, 284,5295,3861,2507,2138,2120,1904,5296,4041, # 2496
2151,4042,4295,1036,3490,1905, 114,2567,4296, 209,1527,5297,5298,2964,2844,2635, # 2512
2390,2728,3164, 812,2568,5299,3307,5300,1559, 737,1885,3726,1210, 885,  28,2695, # 2528
3608,3862,5301,4297,1004,1780,4632,5302, 346,1982,2222,2696,4633,3863,1742, 797, # 2544
1642,4043,1934,1072,1384,2152, 896,4044,3308,3727,3228,2885,3609,5303,2569,1959, # 2560
4634,2455,1786,5304,5305,5306,4045,4298,1005,1308,3728,4299,2729,4635,4636,1528, # 2576
2610, 161,1178,4300,1983, 987,4637,1101,4301, 631,4046,1157,3229,2425,1343,1241, # 2592
1016,2243,2570, 372, 877,2344,2508,1160, 555,1935, 911,4047,5307, 466,1170, 169, # 2608
1051,2921,2697,3729,2481,3012,1182,2012,2571,1251,2636,5308, 992,2345,3491,1540, # 2624
2730,1201,2071,2406,1997,2482,5309,4638, 528,1923,2191,1503,1874,1570,2369,3379, # 2640
3309,5310, 557,1073,5311,1828,3492,2088,2271,3165,3059,3107, 767,3108,2799,4639, # 2656
1006,4302,4640,2346,1267,2179,3730,3230, 778,4048,3231,2731,1597,2667,5312,4641, # 2672
5313,3493,5314,5315,5316,3310,2698,1433,3311, 131,  95,1504,4049, 723,4303,3166, # 2688
1842,3610,2768,2192,4050,2028,2105,3731,5317,3013,4051,1218,5318,3380,3232,4052, # 2704
4304,2584, 248,1634,3864, 912,5319,2845,3732,3060,3865, 654,  53,5320,3014,5321, # 2720
1688,4642, 777,3494,1032,4053,1425,5322, 191, 820,2121,2846, 971,4643, 931,3233, # 2736
 135, 664, 783,3866,1998, 772,2922,1936,4054,3867,4644,2923,3234, 282,2732, 640, # 2752
1372,3495,1127, 922, 325,3381,5323,5324, 711,2045,5325,5326,4055,2223,2800,1937, # 2768
4056,3382,2224,2255,3868,2305,5327,4645,3869,1258,3312,4057,3235,2139,2965,4058, # 2784
4059,5328,2225, 258,3236,4646, 101,1227,5329,3313,1755,5330,1391,3314,5331,2924, # 2800
2057, 893,5332,5333,5334,1402,4305,2347,5335,5336,3237,3611,5337,5338, 878,1325, # 2816
1781,2801,4647, 259,1385,2585, 744,1183,2272,4648,5339,4060,2509,5340, 684,1024, # 2832
4306,5341, 472,3612,3496,1165,3315,4061,4062, 322,2153, 881, 455,1695,1152,1340, # 2848
 660, 554,2154,4649,1058,4650,4307, 830,1065,3383,4063,4651,1924,5342,1703,1919, # 2864
5343, 932,2273, 122,5344,4652, 947, 677,5345,3870,2637, 297,1906,1925,2274,4653, # 2880
2322,3316,5346,5347,4308,5348,4309,  84,4310, 112, 989,5349, 547,1059,4064, 701, # 2896
3613,1019,5350,4311,5351,3497, 942, 639, 457,2306,2456, 993,2966, 407, 851, 494, # 2912
4654,3384, 927,5352,1237,5353,2426,3385, 573,4312, 680, 921,2925,1279,1875, 285, # 2928
 790,1448,1984, 719,2168,5354,5355,4655,4065,4066,1649,5356,1541, 563,5357,1077, # 2944
5358,3386,3061,3498, 511,3015,4067,4068,3733,4069,1268,2572,3387,3238,4656,4657, # 2960
5359, 535,1048,1276,1189,2926,2029,3167,1438,1373,2847,2967,1134,2013,5360,4313, # 2976
1238,2586,3109,1259,5361, 700,5362,2968,3168,3734,4314,5363,4315,1146,1876,1907, # 2992
4658,2611,4070, 781,2427, 132,1589, 203, 147, 273,2802,2407, 898,1787,2155,4071, # 3008
4072,5364,3871,2803,5365,5366,4659,4660,5367,3239,5368,1635,3872, 965,5369,1805, # 3024
2699,1516,3614,1121,1082,1329,3317,4073,1449,3873,  65,1128,2848,2927,2769,1590, # 3040
3874,5370,5371,  12,2668,  45, 976,2587,3169,4661, 517,2535,1013,1037,3240,5372, # 3056
3875,2849,5373,3876,5374,3499,5375,2612, 614,1999,2323,3877,3110,2733,2638,5376, # 3072
2588,4316, 599,1269,5377,1811,3735,5378,2700,3111, 759,1060, 489,1806,3388,3318, # 3088
1358,5379,5380,2391,1387,1215,2639,2256, 490,5381,5382,4317,1759,2392,2348,5383, # 3104
4662,3878,1908,4074,2640,1807,3241,4663,3500,3319,2770,2349, 874,5384,5385,3501, # 3120
3736,1859,  91,2928,3737,3062,3879,4664,5386,3170,4075,2669,5387,3502,1202,1403, # 3136
3880,2969,2536,1517,2510,4665,3503,2511,5388,4666,5389,2701,1886,1495,1731,4076, # 3152
2370,4667,5390,2030,5391,5392,4077,2702,1216, 237,2589,4318,2324,4078,3881,4668, # 3168
4669,2703,3615,3504, 445,4670,5393,5394,5395,5396,2771,  61,4079,3738,1823,4080, # 3184
5397, 687,2046, 935, 925, 405,2670, 703,1096,1860,2734,4671,4081,1877,1367,2704, # 3200
3389, 918,2106,1782,2483, 334,3320,1611,1093,4672, 564,3171,3505,3739,3390, 945, # 3216
2641,2058,4673,5398,1926, 872,4319,5399,3506,2705,3112, 349,4320,3740,4082,4674, # 3232
3882,4321,3741,2156,4083,4675,4676,4322,4677,2408,2047, 782,4084, 400, 251,4323, # 3248
1624,5400,5401, 277,3742, 299,1265, 476,1191,3883,2122,4324,4325,1109, 205,5402, # 3264
2590,1000,2157,3616,1861,5403,5404,5405,4678,5406,4679,2573, 107,2484,2158,4085, # 3280
3507,3172,5407,1533, 541,1301, 158, 753,4326,2886,3617,5408,1696, 370,1088,4327, # 3296
4680,3618, 579, 327, 440, 162,2244, 269,1938,1374,3508, 968,3063,  56,1396,3113, # 3312
2107,3321,3391,5409,1927,2159,4681,3016,5410,3619,5411,5412,3743,4682,2485,5413, # 3328
2804,5414,1650,4683,5415,2613,5416,5417,4086,2671,3392,1149,3393,4087,3884,4088, # 3344
5418,1076,  49,5419, 951,3242,3322,3323, 450,2850, 920,5420,1812,2805,2371,4328, # 3360
1909,1138,2372,3885,3509,5421,3243,4684,1910,1147,1518,2428,4685,3886,5422,4686, # 3376
2393,2614, 260,1796,3244,5423,5424,3887,3324, 708,5425,3620,1704,5426,3621,1351, # 3392
1618,3394,3017,1887, 944,4329,3395,4330,3064,3396,4331,5427,3744, 422, 413,1714, # 3408
3325, 500,2059,2350,4332,2486,5428,1344,1911, 954,5429,1668,5430,5431,4089,2409, # 3424
4333,3622,3888,4334,5432,2307,1318,2512,3114, 133,3115,2887,4687, 629,  31,2851, # 3440
2706,3889,4688, 850, 949,4689,4090,2970,1732,2089,4335,1496,1853,5433,4091, 620, # 3456
3245, 981,1242,3745,3397,1619,3746,1643,3326,2140,2457,1971,1719,3510,2169,5434, # 3472
3246,5435,5436,3398,1829,5437,1277,4690,1565,2048,5438,1636,3623,3116,5439, 869, # 3488
2852, 655,3890,3891,3117,4092,3018,3892,1310,3624,4691,5440,5441,5442,1733, 558, # 3504
4692,3747, 335,1549,3065,1756,4336,3748,1946,3511,1830,1291,1192, 470,2735,2108, # 3520
2806, 913,1054,4093,5443,1027,5444,3066,4094,4693, 982,2672,3399,3173,3512,3247, # 3536
3248,1947,2807,5445, 571,4694,5446,1831,5447,3625,2591,1523,2429,5448,2090, 984, # 3552
4695,3749,1960,5449,3750, 852, 923,2808,3513,3751, 969,1519, 999,2049,2325,1705, # 3568
5450,3118, 615,1662, 151, 597,4095,2410,2326,1049, 275,4696,3752,4337, 568,3753, # 3584
3626,2487,4338,3754,5451,2430,2275, 409,3249,5452,1566,2888,3514,1002, 769,2853, # 3600
 194,2091,3174,3755,2226,3327,4339, 628,1505,5453,5454,1763,2180,3019,4096, 521, # 3616
1161,2592,1788,2206,2411,4697,4097,1625,4340,4341, 412,  42,3119, 464,5455,2642, # 3632
4698,3400,1760,1571,2889,3515,2537,1219,2207,3893,2643,2141,2373,4699,4700,3328, # 3648
1651,3401,3627,5456,5457,3628,2488,3516,5458,3756,5459,5460,2276,2092, 460,5461, # 3664
4701,5462,3020, 962, 588,3629, 289,3250,2644,1116,  52,5463,3067,1797,5464,5465, # 3680
5466,1467,5467,1598,1143,3757,4342,1985,1734,1067,4702,1280,3402, 465,4703,1572, # 3696
 510,5468,1928,2245,1813,1644,3630,5469,4704,3758,5470,5471,2673,1573,1534,5472, # 3712
5473, 536,1808,1761,3517,3894,3175,2645,5474,5475,5476,4705,3518,2929,1912,2809, # 3728
5477,3329,1122, 377,3251,5478, 360,5479,5480,4343,1529, 551,5481,2060,3759,1769, # 3744
2431,5482,2930,4344,3330,3120,2327,2109,2031,4706,1404, 136,1468,1479, 672,1171, # 3760
3252,2308, 271,3176,5483,2772,5484,2050, 678,2736, 865,1948,4707,5485,2014,4098, # 3776
2971,5486,2737,2227,1397,3068,3760,4708,4709,1735,2931,3403,3631,5487,3895, 509, # 3792
2854,2458,2890,3896,5488,5489,3177,3178,4710,4345,2538,4711,2309,1166,1010, 552, # 3808
 681,1888,5490,5491,2972,2973,4099,1287,1596,1862,3179, 358, 453, 736, 175, 478, # 3824
1117, 905,1167,1097,5492,1854,1530,5493,1706,5494,2181,3519,2292,3761,3520,3632, # 3840
4346,2093,4347,5495,3404,1193,2489,4348,1458,2193,2208,1863,1889,1421,3331,2932, # 3856
3069,2182,3521, 595,2123,5496,4100,5497,5498,4349,1707,2646, 223,3762,1359, 751, # 3872
3121, 183,3522,5499,2810,3021, 419,2374, 633, 704,3897,2394, 241,5500,5501,5502, # 3888
 838,3022,3763,2277,2773,2459,3898,1939,2051,4101,1309,3122,2246,1181,5503,1136, # 3904
2209,3899,2375,1446,4350,2310,4712,5504,5505,4351,1055,2615, 484,3764,5506,4102, # 3920
 625,4352,2278,3405,1499,4353,4103,5507,4104,4354,3253,2279,2280,3523,5508,5509, # 3936
2774, 808,2616,3765,3406,4105,4355,3123,2539, 526,3407,3900,4356, 955,5510,1620, # 3952
4357,2647,2432,5511,1429,3766,1669,1832, 994, 928,5512,3633,1260,5513,5514,5515, # 3968
1949,2293, 741,2933,1626,4358,2738,2460, 867,1184, 362,3408,1392,5516,5517,4106, # 3984
4359,1770,1736,3254,2934,4713,4714,1929,2707,1459,1158,5518,3070,3409,2891,1292, # 4000
1930,2513,2855,3767,1986,1187,2072,2015,2617,4360,5519,2574,2514,2170,3768,2490, # 4016
3332,5520,3769,4715,5521,5522, 666,1003,3023,1022,3634,4361,5523,4716,1814,2257, # 4032
 574,3901,1603, 295,1535, 705,3902,4362, 283, 858, 417,5524,5525,3255,4717,4718, # 4048
3071,1220,1890,1046,2281,2461,4107,1393,1599, 689,2575, 388,4363,5526,2491, 802, # 4064
5527,2811,3903,2061,1405,2258,5528,4719,3904,2110,1052,1345,3256,1585,5529, 809, # 4080
5530,5531,5532, 575,2739,3524, 956,1552,1469,1144,2328,5533,2329,1560,2462,3635, # 4096
3257,4108, 616,2210,4364,3180,2183,2294,5534,1833,5535,3525,4720,5536,1319,3770, # 4112
3771,1211,3636,1023,3258,1293,2812,5537,5538,5539,3905, 607,2311,3906, 762,2892, # 4128
1439,4365,1360,4721,1485,3072,5540,4722,1038,4366,1450,2062,2648,4367,1379,4723, # 4144
2593,5541,5542,4368,1352,1414,2330,2935,1172,5543,5544,3907,3908,4724,1798,1451, # 4160
5545,5546,5547,5548,2936,4109,4110,2492,2351, 411,4111,4112,3637,3333,3124,4725, # 4176
1561,2674,1452,4113,1375,5549,5550,  47,2974, 316,5551,1406,1591,2937,3181,5552, # 4192
1025,2142,3125,3182, 354,2740, 884,2228,4369,2412, 508,3772, 726,3638, 996,2433, # 4208
3639, 729,5553, 392,2194,1453,4114,4726,3773,5554,5555,2463,3640,2618,1675,2813, # 4224
 919,2352,2975,2353,1270,4727,4115,  73,5556,5557, 647,5558,3259,2856,2259,1550, # 4240
1346,3024,5559,1332, 883,3526,5560,5561,5562,5563,3334,2775,5564,1212, 831,1347, # 4256
4370,4728,2331,3909,1864,3073, 720,3910,4729,4730,3911,5565,4371,5566,5567,4731, # 4272
5568,5569,1799,4732,3774,2619,4733,3641,1645,2376,4734,5570,2938, 669,2211,2675, # 4288
2434,5571,2893,5572,5573,1028,3260,5574,4372,2413,5575,2260,1353,5576,5577,4735, # 4304
3183, 518,5578,4116,5579,4373,1961,5580,2143,4374,5581,5582,3025,2354,2355,3912, # 4320
 516,1834,1454,4117,2708,4375,4736,2229,2620,1972,1129,3642,5583,2776,5584,2976, # 4336
1422, 577,1470,3026,1524,3410,5585,5586, 432,4376,3074,3527,5587,2594,1455,2515, # 4352
2230,1973,1175,5588,1020,2741,4118,3528,4737,5589,2742,5590,1743,1361,3075,3529, # 4368
2649,4119,4377,4738,2295, 895, 924,4378,2171, 331,2247,3076, 166,1627,3077,1098, # 4384
5591,1232,2894,2231,3411,4739, 657, 403,1196,2377, 542,3775,3412,1600,4379,3530, # 4400
5592,4740,2777,3261, 576, 530,1362,4741,4742,2540,2676,3776,4120,5593, 842,3913, # 4416
5594,2814,2032,1014,4121, 213,2709,3413, 665, 621,4380,5595,3777,2939,2435,5596, # 4432
2436,3335,3643,3414,4743,4381,2541,4382,4744,3644,1682,4383,3531,1380,5597, 724, # 4448
2282, 600,1670,5598,1337,1233,4745,3126,2248,5599,1621,4746,5600, 651,4384,5601, # 4464
1612,4385,2621,5602,2857,5603,2743,2312,3078,5604, 716,2464,3079, 174,1255,2710, # 4480
4122,3645, 548,1320,1398, 728,4123,1574,5605,1891,1197,3080,4124,5606,3081,3082, # 4496
3778,3646,3779, 747,5607, 635,4386,4747,5608,5609,5610,4387,5611,5612,4748,5613, # 4512
3415,4749,2437, 451,5614,3780,2542,2073,4388,2744,4389,4125,5615,1764,4750,5616, # 4528
4390, 350,4751,2283,2395,2493,5617,4391,4126,2249,1434,4127, 488,4752, 458,4392, # 4544
4128,3781, 771,1330,2396,3914,2576,3184,2160,2414,1553,2677,3185,4393,5618,2494, # 4560
2895,2622,1720,2711,4394,3416,4753,5619,2543,4395,5620,3262,4396,2778,5621,2016, # 4576
2745,5622,1155,1017,3782,3915,5623,3336,2313, 201,1865,4397,1430,5624,4129,5625, # 4592
5626,5627,5628,5629,4398,1604,5630, 414,1866, 371,2595,4754,4755,3532,2017,3127, # 4608
4756,1708, 960,4399, 887, 389,2172,1536,1663,1721,5631,2232,4130,2356,2940,1580, # 4624
5632,5633,1744,4757,2544,4758,4759,5634,4760,5635,2074,5636,4761,3647,3417,2896, # 4640
4400,5637,4401,2650,3418,2815, 673,2712,2465, 709,3533,4131,3648,4402,5638,1148, # 4656
 502, 634,5639,5640,1204,4762,3649,1575,4763,2623,3783,5641,3784,3128, 948,3263, # 4672
 121,1745,3916,1110,5642,4403,3083,2516,3027,4132,3785,1151,1771,3917,1488,4133, # 4688
1987,5643,2438,3534,5644,5645,2094,5646,4404,3918,1213,1407,2816, 531,2746,2545, # 4704
3264,1011,1537,4764,2779,4405,3129,1061,5647,3786,3787,1867,2897,5648,2018, 120, # 4720
4406,4407,2063,3650,3265,2314,3919,2678,3419,1955,4765,4134,5649,3535,1047,2713, # 4736
1266,5650,1368,4766,2858, 649,3420,3920,2546,2747,1102,2859,2679,5651,5652,2000, # 4752
5653,1111,3651,2977,5654,2495,3921,3652,2817,1855,3421,3788,5655,5656,3422,2415, # 4768
2898,3337,3266,3653,5657,2577,5658,3654,2818,4135,1460, 856,5659,3655,5660,2899, # 4784
2978,5661,2900,3922,5662,4408, 632,2517, 875,3923,1697,3924,2296,5663,5664,4767, # 4800
3028,1239, 580,4768,4409,5665, 914, 936,2075,1190,4136,1039,2124,5666,5667,5668, # 4816
5669,3423,1473,5670,1354,4410,3925,4769,2173,3084,4137, 915,3338,4411,4412,3339, # 4832
1605,1835,5671,2748, 398,3656,4413,3926,4138, 328,1913,2860,4139,3927,1331,4414, # 4848
3029, 937,4415,5672,3657,4140,4141,3424,2161,4770,3425, 524, 742, 538,3085,1012, # 4864
5673,5674,3928,2466,5675, 658,1103, 225,3929,5676,5677,4771,5678,4772,5679,3267, # 4880
1243,5680,4142, 963,2250,4773,5681,2714,3658,3186,5682,5683,2596,2332,5684,4774, # 4896
5685,5686,5687,3536, 957,3426,2547,2033,1931,2941,2467, 870,2019,3659,1746,2780, # 4912
2781,2439,2468,5688,3930,5689,3789,3130,3790,3537,3427,3791,5690,1179,3086,5691, # 4928
3187,2378,4416,3792,2548,3188,3131,2749,4143,5692,3428,1556,2549,2297, 977,2901, # 4944
2034,4144,1205,3429,5693,1765,3430,3189,2125,1271, 714,1689,4775,3538,5694,2333, # 4960
3931, 533,4417,3660,2184, 617,5695,2469,3340,3539,2315,5696,5697,3190,5698,5699, # 4976
3932,1988, 618, 427,2651,3540,3431,5700,5701,1244,1690,5702,2819,4418,4776,5703, # 4992
3541,4777,5704,2284,1576, 473,3661,4419,3432, 972,5705,3662,5706,3087,5707,5708, # 5008
4778,4779,5709,3793,4145,4146,5710, 153,4780, 356,5711,1892,2902,4420,2144, 408, # 5024
 803,2357,5712,3933,5713,4421,1646,2578,2518,4781,4782,3934,5714,3935,4422,5715, # 5040
2416,3433, 752,5716,5717,1962,3341,2979,5718, 746,3030,2470,4783,4423,3794, 698, # 5056
4784,1893,4424,3663,2550,4785,3664,3936,5719,3191,3434,5720,1824,1302,4147,2715, # 5072
3937,1974,4425,5721,4426,3192, 823,1303,1288,1236,2861,3542,4148,3435, 774,3938, # 5088
5722,1581,4786,1304,2862,3939,4787,5723,2440,2162,1083,3268,4427,4149,4428, 344, # 5104
1173, 288,2316, 454,1683,5724,5725,1461,4788,4150,2597,5726,5727,4789, 985, 894, # 5120
5728,3436,3193,5729,1914,2942,3795,1989,5730,2111,1975,5731,4151,5732,2579,1194, # 5136
 425,5733,4790,3194,1245,3796,4429,5734,5735,2863,5736, 636,4791,1856,3940, 760, # 5152
1800,5737,4430,2212,1508,4792,4152,1894,1684,2298,5738,5739,4793,4431,4432,2213, # 5168
 479,5740,5741, 832,5742,4153,2496,5743,2980,2497,3797, 990,3132, 627,1815,2652, # 5184
4433,1582,4434,2126,2112,3543,4794,5744, 799,4435,3195,5745,4795,2113,1737,3031, # 5200
1018, 543, 754,4436,3342,1676,4796,4797,4154,4798,1489,5746,3544,5747,2624,2903, # 5216
4155,5748,5749,2981,5750,5751,5752,5753,3196,4799,4800,2185,1722,5754,3269,3270, # 5232
1843,3665,1715, 481, 365,1976,1857,5755,5756,1963,2498,4801,5757,2127,3666,3271, # 5248
 433,1895,2064,2076,5758, 602,2750,5759,5760,5761,5762,5763,3032,1628,3437,5764, # 5264
3197,4802,4156,2904,4803,2519,5765,2551,2782,5766,5767,5768,3343,4804,2905,5769, # 5280
4805,5770,2864,4806,4807,1221,2982,4157,2520,5771,5772,5773,1868,1990,5774,5775, # 5296
5776,1896,5777,5778,4808,1897,4158, 318,5779,2095,4159,4437,5780,5781, 485,5782, # 5312
 938,3941, 553,2680, 116,5783,3942,3667,5784,3545,2681,2783,3438,3344,2820,5785, # 5328
3668,2943,4160,1747,2944,2983,5786,5787, 207,5788,4809,5789,4810,2521,5790,3033, # 5344
 890,3669,3943,5791,1878,3798,3439,5792,2186,2358,3440,1652,5793,5794,5795, 941, # 5360
2299, 208,3546,4161,2020, 330,4438,3944,2906,2499,3799,4439,4811,5796,5797,5798, # 5376  #last 512
#Everything below is of no interest for detection purpose
2522,1613,4812,5799,3345,3945,2523,5800,4162,5801,1637,4163,2471,4813,3946,5802, # 5392
2500,3034,3800,5803,5804,2195,4814,5805,2163,5806,5807,5808,5809,5810,5811,5812, # 5408
5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828, # 5424
5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844, # 5440
5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856,5857,5858,5859,5860, # 5456
5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872,5873,5874,5875,5876, # 5472
5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888,5889,5890,5891,5892, # 5488
5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,5906,5907,5908, # 5504
5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,5921,5922,5923,5924, # 5520
5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936,5937,5938,5939,5940, # 5536
5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952,5953,5954,5955,5956, # 5552
5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968,5969,5970,5971,5972, # 5568
5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984,5985,5986,5987,5988, # 5584
5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000,6001,6002,6003,6004, # 5600
6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020, # 5616
6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036, # 5632
6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052, # 5648
6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068, # 5664
6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084, # 5680
6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100, # 5696
6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116, # 5712
6117,6118,6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,6132, # 5728
6133,6134,6135,6136,6137,6138,6139,6140,6141,6142,6143,6144,6145,6146,6147,6148, # 5744
6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,6164, # 5760
6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179,6180, # 5776
6181,6182,6183,6184,6185,6186,6187,6188,6189,6190,6191,6192,6193,6194,6195,6196, # 5792
6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212, # 5808
6213,6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,3670,6224,6225,6226,6227, # 5824
6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,6242,6243, # 5840
6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,6254,6255,6256,6257,6258,6259, # 5856
6260,6261,6262,6263,6264,6265,6266,6267,6268,6269,6270,6271,6272,6273,6274,6275, # 5872
6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,4815,6286,6287,6288,6289,6290, # 5888
6291,6292,4816,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,6303,6304,6305, # 5904
6306,6307,6308,6309,6310,6311,4817,4818,6312,6313,6314,6315,6316,6317,6318,4819, # 5920
6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,6334, # 5936
6335,6336,6337,4820,6338,6339,6340,6341,6342,6343,6344,6345,6346,6347,6348,6349, # 5952
6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,6364,6365, # 5968
6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,6380,6381, # 5984
6382,6383,6384,6385,6386,6387,6388,6389,6390,6391,6392,6393,6394,6395,6396,6397, # 6000
6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,3441,6411,6412, # 6016
6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,4440,6426,6427, # 6032
6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443, # 6048
6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,4821,6455,6456,6457,6458, # 6064
6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474, # 6080
6475,6476,6477,3947,3948,6478,6479,6480,6481,3272,4441,6482,6483,6484,6485,4442, # 6096
6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,4822,6497,6498,6499,6500, # 6112
6501,6502,6503,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516, # 6128
6517,6518,6519,6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532, # 6144
6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548, # 6160
6549,6550,6551,6552,6553,6554,6555,6556,2784,6557,4823,6558,6559,6560,6561,6562, # 6176
6563,6564,6565,6566,6567,6568,6569,3949,6570,6571,6572,4824,6573,6574,6575,6576, # 6192
6577,6578,6579,6580,6581,6582,6583,4825,6584,6585,6586,3950,2785,6587,6588,6589, # 6208
6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605, # 6224
6606,6607,6608,6609,6610,6611,6612,4826,6613,6614,6615,4827,6616,6617,6618,6619, # 6240
6620,6621,6622,6623,6624,6625,4164,6626,6627,6628,6629,6630,6631,6632,6633,6634, # 6256
3547,6635,4828,6636,6637,6638,6639,6640,6641,6642,3951,2984,6643,6644,6645,6646, # 6272
6647,6648,6649,4165,6650,4829,6651,6652,4830,6653,6654,6655,6656,6657,6658,6659, # 6288
6660,6661,6662,4831,6663,6664,6665,6666,6667,6668,6669,6670,6671,4166,6672,4832, # 6304
3952,6673,6674,6675,6676,4833,6677,6678,6679,4167,6680,6681,6682,3198,6683,6684, # 6320
6685,6686,6687,6688,6689,6690,6691,6692,6693,6694,6695,6696,6697,4834,6698,6699, # 6336
6700,6701,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6712,6713,6714,6715, # 6352
6716,6717,6718,6719,6720,6721,6722,6723,6724,6725,6726,6727,6728,6729,6730,6731, # 6368
6732,6733,6734,4443,6735,6736,6737,6738,6739,6740,6741,6742,6743,6744,6745,4444, # 6384
6746,6747,6748,6749,6750,6751,6752,6753,6754,6755,6756,6757,6758,6759,6760,6761, # 6400
6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777, # 6416
6778,6779,6780,6781,4168,6782,6783,3442,6784,6785,6786,6787,6788,6789,6790,6791, # 6432
4169,6792,6793,6794,6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806, # 6448
6807,6808,6809,6810,6811,4835,6812,6813,6814,4445,6815,6816,4446,6817,6818,6819, # 6464
6820,6821,6822,6823,6824,6825,6826,6827,6828,6829,6830,6831,6832,6833,6834,6835, # 6480
3548,6836,6837,6838,6839,6840,6841,6842,6843,6844,6845,6846,4836,6847,6848,6849, # 6496
6850,6851,6852,6853,6854,3953,6855,6856,6857,6858,6859,6860,6861,6862,6863,6864, # 6512
6865,6866,6867,6868,6869,6870,6871,6872,6873,6874,6875,6876,6877,3199,6878,6879, # 6528
6880,6881,6882,4447,6883,6884,6885,6886,6887,6888,6889,6890,6891,6892,6893,6894, # 6544
6895,6896,6897,6898,6899,6900,6901,6902,6903,6904,4170,6905,6906,6907,6908,6909, # 6560
6910,6911,6912,6913,6914,6915,6916,6917,6918,6919,6920,6921,6922,6923,6924,6925, # 6576
6926,6927,4837,6928,6929,6930,6931,6932,6933,6934,6935,6936,3346,6937,6938,4838, # 6592
6939,6940,6941,4448,6942,6943,6944,6945,6946,4449,6947,6948,6949,6950,6951,6952, # 6608
6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6964,6965,6966,6967,6968, # 6624
6969,6970,6971,6972,6973,6974,6975,6976,6977,6978,6979,6980,6981,6982,6983,6984, # 6640
6985,6986,6987,6988,6989,6990,6991,6992,6993,6994,3671,6995,6996,6997,6998,4839, # 6656
6999,7000,7001,7002,3549,7003,7004,7005,7006,7007,7008,7009,7010,7011,7012,7013, # 6672
7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,7028,7029, # 6688
7030,4840,7031,7032,7033,7034,7035,7036,7037,7038,4841,7039,7040,7041,7042,7043, # 6704
7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,7059, # 6720
7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,2985,7071,7072,7073,7074, # 6736
7075,7076,7077,7078,7079,7080,4842,7081,7082,7083,7084,7085,7086,7087,7088,7089, # 6752
7090,7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105, # 6768
7106,7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,4450,7119,7120, # 6784
7121,7122,7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136, # 6800
7137,7138,7139,7140,7141,7142,7143,4843,7144,7145,7146,7147,7148,7149,7150,7151, # 6816
7152,7153,7154,7155,7156,7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167, # 6832
7168,7169,7170,7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183, # 6848
7184,7185,7186,7187,7188,4171,4172,7189,7190,7191,7192,7193,7194,7195,7196,7197, # 6864
7198,7199,7200,7201,7202,7203,7204,7205,7206,7207,7208,7209,7210,7211,7212,7213, # 6880
7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229, # 6896
7230,7231,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245, # 6912
7246,7247,7248,7249,7250,7251,7252,7253,7254,7255,7256,7257,7258,7259,7260,7261, # 6928
7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277, # 6944
7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293, # 6960
7294,7295,7296,4844,7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308, # 6976
7309,7310,7311,7312,7313,7314,7315,7316,4451,7317,7318,7319,7320,7321,7322,7323, # 6992
7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339, # 7008
7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,4173,7354, # 7024
7355,4845,7356,7357,7358,7359,7360,7361,7362,7363,7364,7365,7366,7367,7368,7369, # 7040
7370,7371,7372,7373,7374,7375,7376,7377,7378,7379,7380,7381,7382,7383,7384,7385, # 7056
7386,7387,7388,4846,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400, # 7072
7401,7402,7403,7404,7405,3672,7406,7407,7408,7409,7410,7411,7412,7413,7414,7415, # 7088
7416,7417,7418,7419,7420,7421,7422,7423,7424,7425,7426,7427,7428,7429,7430,7431, # 7104
7432,7433,7434,7435,7436,7437,7438,7439,7440,7441,7442,7443,7444,7445,7446,7447, # 7120
7448,7449,7450,7451,7452,7453,4452,7454,3200,7455,7456,7457,7458,7459,7460,7461, # 7136
7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,7472,7473,7474,4847,7475,7476, # 7152
7477,3133,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,7488,7489,7490,7491, # 7168
7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,3347,7503,7504,7505,7506, # 7184
7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,4848, # 7200
7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537, # 7216
7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,3801,4849,7550,7551, # 7232
7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567, # 7248
7568,7569,3035,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582, # 7264
7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598, # 7280
7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614, # 7296
7615,7616,4850,7617,7618,3802,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628, # 7312
7629,7630,7631,7632,4851,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643, # 7328
7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659, # 7344
7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,4453,7671,7672,7673,7674, # 7360
7675,7676,7677,7678,7679,7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690, # 7376
7691,7692,7693,7694,7695,7696,7697,3443,7698,7699,7700,7701,7702,4454,7703,7704, # 7392
7705,7706,7707,7708,7709,7710,7711,7712,7713,2472,7714,7715,7716,7717,7718,7719, # 7408
7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731,3954,7732,7733,7734, # 7424
7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7750, # 7440
3134,7751,7752,4852,7753,7754,7755,4853,7756,7757,7758,7759,7760,4174,7761,7762, # 7456
7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,7777,7778, # 7472
7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794, # 7488
7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,4854,7806,7807,7808,7809, # 7504
7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825, # 7520
4855,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840, # 7536
7841,7842,7843,7844,7845,7846,7847,3955,7848,7849,7850,7851,7852,7853,7854,7855, # 7552
7856,7857,7858,7859,7860,3444,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870, # 7568
7871,7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886, # 7584
7887,7888,7889,7890,7891,4175,7892,7893,7894,7895,7896,4856,4857,7897,7898,7899, # 7600
7900,2598,7901,7902,7903,7904,7905,7906,7907,7908,4455,7909,7910,7911,7912,7913, # 7616
7914,3201,7915,7916,7917,7918,7919,7920,7921,4858,7922,7923,7924,7925,7926,7927, # 7632
7928,7929,7930,7931,7932,7933,7934,7935,7936,7937,7938,7939,7940,7941,7942,7943, # 7648
7944,7945,7946,7947,7948,7949,7950,7951,7952,7953,7954,7955,7956,7957,7958,7959, # 7664
7960,7961,7962,7963,7964,7965,7966,7967,7968,7969,7970,7971,7972,7973,7974,7975, # 7680
7976,7977,7978,7979,7980,7981,4859,7982,7983,7984,7985,7986,7987,7988,7989,7990, # 7696
7991,7992,7993,7994,7995,7996,4860,7997,7998,7999,8000,8001,8002,8003,8004,8005, # 7712
8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,8016,4176,8017,8018,8019,8020, # 7728
8021,8022,8023,4861,8024,8025,8026,8027,8028,8029,8030,8031,8032,8033,8034,8035, # 7744
8036,4862,4456,8037,8038,8039,8040,4863,8041,8042,8043,8044,8045,8046,8047,8048, # 7760
8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063,8064, # 7776
8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080, # 7792
8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8096, # 7808
8097,8098,8099,4864,4177,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110, # 7824
8111,8112,8113,8114,8115,8116,8117,8118,8119,8120,4178,8121,8122,8123,8124,8125, # 7840
8126,8127,8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141, # 7856
8142,8143,8144,8145,4865,4866,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155, # 7872
8156,8157,8158,8159,8160,8161,8162,8163,8164,8165,4179,8166,8167,8168,8169,8170, # 7888
8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181,4457,8182,8183,8184,8185, # 7904
8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201, # 7920
8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215,8216,8217, # 7936
8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229,8230,8231,8232,8233, # 7952
8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249, # 7968
8250,8251,8252,8253,8254,8255,8256,3445,8257,8258,8259,8260,8261,8262,4458,8263, # 7984
8264,8265,8266,8267,8268,8269,8270,8271,8272,4459,8273,8274,8275,8276,3550,8277, # 8000
8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,4460,8290,8291,8292, # 8016
8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,4867, # 8032
8308,8309,8310,8311,8312,3551,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322, # 8048
8323,8324,8325,8326,4868,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337, # 8064
8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353, # 8080
8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,4869,4461,8364,8365,8366,8367, # 8096
8368,8369,8370,4870,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382, # 8112
8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398, # 8128
8399,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,4871,8411,8412,8413, # 8144
8414,8415,8416,8417,8418,8419,8420,8421,8422,4462,8423,8424,8425,8426,8427,8428, # 8160
8429,8430,8431,8432,8433,2986,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443, # 8176
8444,8445,8446,8447,8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459, # 8192
8460,8461,8462,8463,8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475, # 8208
8476,8477,8478,4180,8479,8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490, # 8224
8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506, # 8240
8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522, # 8256
8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538, # 8272
8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554, # 8288
8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,4872,8565,8566,8567,8568,8569, # 8304
8570,8571,8572,8573,4873,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584, # 8320
8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597,8598,8599,8600, # 8336
8601,8602,8603,8604,8605,3803,8606,8607,8608,8609,8610,8611,8612,8613,4874,3804, # 8352
8614,8615,8616,8617,8618,8619,8620,8621,3956,8622,8623,8624,8625,8626,8627,8628, # 8368
8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,2865,8639,8640,8641,8642,8643, # 8384
8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,4463,8657,8658, # 8400
8659,4875,4876,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672, # 8416
8673,8674,8675,8676,8677,8678,8679,8680,8681,4464,8682,8683,8684,8685,8686,8687, # 8432
8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703, # 8448
8704,8705,8706,8707,8708,8709,2261,8710,8711,8712,8713,8714,8715,8716,8717,8718, # 8464
8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,4181, # 8480
8734,8735,8736,8737,8738,8739,8740,8741,8742,8743,8744,8745,8746,8747,8748,8749, # 8496
8750,8751,8752,8753,8754,8755,8756,8757,8758,8759,8760,8761,8762,8763,4877,8764, # 8512
8765,8766,8767,8768,8769,8770,8771,8772,8773,8774,8775,8776,8777,8778,8779,8780, # 8528
8781,8782,8783,8784,8785,8786,8787,8788,4878,8789,4879,8790,8791,8792,4880,8793, # 8544
8794,8795,8796,8797,8798,8799,8800,8801,4881,8802,8803,8804,8805,8806,8807,8808, # 8560
8809,8810,8811,8812,8813,8814,8815,3957,8816,8817,8818,8819,8820,8821,8822,8823, # 8576
8824,8825,8826,8827,8828,8829,8830,8831,8832,8833,8834,8835,8836,8837,8838,8839, # 8592
8840,8841,8842,8843,8844,8845,8846,8847,4882,8848,8849,8850,8851,8852,8853,8854, # 8608
8855,8856,8857,8858,8859,8860,8861,8862,8863,8864,8865,8866,8867,8868,8869,8870, # 8624
8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,8884,3202,8885, # 8640
8886,8887,8888,8889,8890,8891,8892,8893,8894,8895,8896,8897,8898,8899,8900,8901, # 8656
8902,8903,8904,8905,8906,8907,8908,8909,8910,8911,8912,8913,8914,8915,8916,8917, # 8672
8918,8919,8920,8921,8922,8923,8924,4465,8925,8926,8927,8928,8929,8930,8931,8932, # 8688
4883,8933,8934,8935,8936,8937,8938,8939,8940,8941,8942,8943,2214,8944,8945,8946, # 8704
8947,8948,8949,8950,8951,8952,8953,8954,8955,8956,8957,8958,8959,8960,8961,8962, # 8720
8963,8964,8965,4884,8966,8967,8968,8969,8970,8971,8972,8973,8974,8975,8976,8977, # 8736
8978,8979,8980,8981,8982,8983,8984,8985,8986,8987,8988,8989,8990,8991,8992,4885, # 8752
8993,8994,8995,8996,8997,8998,8999,9000,9001,9002,9003,9004,9005,9006,9007,9008, # 8768
9009,9010,9011,9012,9013,9014,9015,9016,9017,9018,9019,9020,9021,4182,9022,9023, # 8784
9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9035,9036,9037,9038,9039, # 8800
9040,9041,9042,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055, # 8816
9056,9057,9058,9059,9060,9061,9062,9063,4886,9064,9065,9066,9067,9068,9069,4887, # 8832
9070,9071,9072,9073,9074,9075,9076,9077,9078,9079,9080,9081,9082,9083,9084,9085, # 8848
9086,9087,9088,9089,9090,9091,9092,9093,9094,9095,9096,9097,9098,9099,9100,9101, # 8864
9102,9103,9104,9105,9106,9107,9108,9109,9110,9111,9112,9113,9114,9115,9116,9117, # 8880
9118,9119,9120,9121,9122,9123,9124,9125,9126,9127,9128,9129,9130,9131,9132,9133, # 8896
9134,9135,9136,9137,9138,9139,9140,9141,3958,9142,9143,9144,9145,9146,9147,9148, # 8912
9149,9150,9151,4888,9152,9153,9154,9155,9156,9157,9158,9159,9160,9161,9162,9163, # 8928
9164,9165,9166,9167,9168,9169,9170,9171,9172,9173,9174,9175,4889,9176,9177,9178, # 8944
9179,9180,9181,9182,9183,9184,9185,9186,9187,9188,9189,9190,9191,9192,9193,9194, # 8960
9195,9196,9197,9198,9199,9200,9201,9202,9203,4890,9204,9205,9206,9207,9208,9209, # 8976
9210,9211,9212,9213,9214,9215,9216,9217,9218,9219,9220,9221,9222,4466,9223,9224, # 8992
9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240, # 9008
9241,9242,9243,9244,9245,4891,9246,9247,9248,9249,9250,9251,9252,9253,9254,9255, # 9024
9256,9257,4892,9258,9259,9260,9261,4893,4894,9262,9263,9264,9265,9266,9267,9268, # 9040
9269,9270,9271,9272,9273,4467,9274,9275,9276,9277,9278,9279,9280,9281,9282,9283, # 9056
9284,9285,3673,9286,9287,9288,9289,9290,9291,9292,9293,9294,9295,9296,9297,9298, # 9072
9299,9300,9301,9302,9303,9304,9305,9306,9307,9308,9309,9310,9311,9312,9313,9314, # 9088
9315,9316,9317,9318,9319,9320,9321,9322,4895,9323,9324,9325,9326,9327,9328,9329, # 9104
9330,9331,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345, # 9120
9346,9347,4468,9348,9349,9350,9351,9352,9353,9354,9355,9356,9357,9358,9359,9360, # 9136
9361,9362,9363,9364,9365,9366,9367,9368,9369,9370,9371,9372,9373,4896,9374,4469, # 9152
9375,9376,9377,9378,9379,4897,9380,9381,9382,9383,9384,9385,9386,9387,9388,9389, # 9168
9390,9391,9392,9393,9394,9395,9396,9397,9398,9399,9400,9401,9402,9403,9404,9405, # 9184
9406,4470,9407,2751,9408,9409,3674,3552,9410,9411,9412,9413,9414,9415,9416,9417, # 9200
9418,9419,9420,9421,4898,9422,9423,9424,9425,9426,9427,9428,9429,3959,9430,9431, # 9216
9432,9433,9434,9435,9436,4471,9437,9438,9439,9440,9441,9442,9443,9444,9445,9446, # 9232
9447,9448,9449,9450,3348,9451,9452,9453,9454,9455,9456,9457,9458,9459,9460,9461, # 9248
9462,9463,9464,9465,9466,9467,9468,9469,9470,9471,9472,4899,9473,9474,9475,9476, # 9264
9477,4900,9478,9479,9480,9481,9482,9483,9484,9485,9486,9487,9488,3349,9489,9490, # 9280
9491,9492,9493,9494,9495,9496,9497,9498,9499,9500,9501,9502,9503,9504,9505,9506, # 9296
9507,9508,9509,9510,9511,9512,9513,9514,9515,9516,9517,9518,9519,9520,4901,9521, # 9312
9522,9523,9524,9525,9526,4902,9527,9528,9529,9530,9531,9532,9533,9534,9535,9536, # 9328
9537,9538,9539,9540,9541,9542,9543,9544,9545,9546,9547,9548,9549,9550,9551,9552, # 9344
9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568, # 9360
9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9581,9582,9583,9584, # 9376
3805,9585,9586,9587,9588,9589,9590,9591,9592,9593,9594,9595,9596,9597,9598,9599, # 9392
9600,9601,9602,4903,9603,9604,9605,9606,9607,4904,9608,9609,9610,9611,9612,9613, # 9408
9614,4905,9615,9616,9617,9618,9619,9620,9621,9622,9623,9624,9625,9626,9627,9628, # 9424
9629,9630,9631,9632,4906,9633,9634,9635,9636,9637,9638,9639,9640,9641,9642,9643, # 9440
4907,9644,9645,9646,9647,9648,9649,9650,9651,9652,9653,9654,9655,9656,9657,9658, # 9456
9659,9660,9661,9662,9663,9664,9665,9666,9667,9668,9669,9670,9671,9672,4183,9673, # 9472
9674,9675,9676,9677,4908,9678,9679,9680,9681,4909,9682,9683,9684,9685,9686,9687, # 9488
9688,9689,9690,4910,9691,9692,9693,3675,9694,9695,9696,2945,9697,9698,9699,9700, # 9504
9701,9702,9703,9704,9705,4911,9706,9707,9708,9709,9710,9711,9712,9713,9714,9715, # 9520
9716,9717,9718,9719,9720,9721,9722,9723,9724,9725,9726,9727,9728,9729,9730,9731, # 9536
9732,9733,9734,9735,4912,9736,9737,9738,9739,9740,4913,9741,9742,9743,9744,9745, # 9552
9746,9747,9748,9749,9750,9751,9752,9753,9754,9755,9756,9757,9758,4914,9759,9760, # 9568
9761,9762,9763,9764,9765,9766,9767,9768,9769,9770,9771,9772,9773,9774,9775,9776, # 9584
9777,9778,9779,9780,9781,9782,4915,9783,9784,9785,9786,9787,9788,9789,9790,9791, # 9600
9792,9793,4916,9794,9795,9796,9797,9798,9799,9800,9801,9802,9803,9804,9805,9806, # 9616
9807,9808,9809,9810,9811,9812,9813,9814,9815,9816,9817,9818,9819,9820,9821,9822, # 9632
9823,9824,9825,9826,9827,9828,9829,9830,9831,9832,9833,9834,9835,9836,9837,9838, # 9648
9839,9840,9841,9842,9843,9844,9845,9846,9847,9848,9849,9850,9851,9852,9853,9854, # 9664
9855,9856,9857,9858,9859,9860,9861,9862,9863,9864,9865,9866,9867,9868,4917,9869, # 9680
9870,9871,9872,9873,9874,9875,9876,9877,9878,9879,9880,9881,9882,9883,9884,9885, # 9696
9886,9887,9888,9889,9890,9891,9892,4472,9893,9894,9895,9896,9897,3806,9898,9899, # 9712
9900,9901,9902,9903,9904,9905,9906,9907,9908,9909,9910,9911,9912,9913,9914,4918, # 9728
9915,9916,9917,4919,9918,9919,9920,9921,4184,9922,9923,9924,9925,9926,9927,9928, # 9744
9929,9930,9931,9932,9933,9934,9935,9936,9937,9938,9939,9940,9941,9942,9943,9944, # 9760
9945,9946,4920,9947,9948,9949,9950,9951,9952,9953,9954,9955,4185,9956,9957,9958, # 9776
9959,9960,9961,9962,9963,9964,9965,4921,9966,9967,9968,4473,9969,9970,9971,9972, # 9792
9973,9974,9975,9976,9977,4474,9978,9979,9980,9981,9982,9983,9984,9985,9986,9987, # 9808
9988,9989,9990,9991,9992,9993,9994,9995,9996,9997,9998,9999,10000,10001,10002,10003, # 9824
10004,10005,10006,10007,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019, # 9840
10020,10021,4922,10022,4923,10023,10024,10025,10026,10027,10028,10029,10030,10031,10032,10033, # 9856
10034,10035,10036,10037,10038,10039,10040,10041,10042,10043,10044,10045,10046,10047,10048,4924, # 9872
10049,10050,10051,10052,10053,10054,10055,10056,10057,10058,10059,10060,10061,10062,10063,10064, # 9888
10065,10066,10067,10068,10069,10070,10071,10072,10073,10074,10075,10076,10077,10078,10079,10080, # 9904
10081,10082,10083,10084,10085,10086,10087,4475,10088,10089,10090,10091,10092,10093,10094,10095, # 9920
10096,10097,4476,10098,10099,10100,10101,10102,10103,10104,10105,10106,10107,10108,10109,10110, # 9936
10111,2174,10112,10113,10114,10115,10116,10117,10118,10119,10120,10121,10122,10123,10124,10125, # 9952
10126,10127,10128,10129,10130,10131,10132,10133,10134,10135,10136,10137,10138,10139,10140,3807, # 9968
4186,4925,10141,10142,10143,10144,10145,10146,10147,4477,4187,10148,10149,10150,10151,10152, # 9984
10153,4188,10154,10155,10156,10157,10158,10159,10160,10161,4926,10162,10163,10164,10165,10166, #10000
10167,10168,10169,10170,10171,10172,10173,10174,10175,10176,10177,10178,10179,10180,10181,10182, #10016
10183,10184,10185,10186,10187,10188,10189,10190,10191,10192,3203,10193,10194,10195,10196,10197, #10032
10198,10199,10200,4478,10201,10202,10203,10204,4479,10205,10206,10207,10208,10209,10210,10211, #10048
10212,10213,10214,10215,10216,10217,10218,10219,10220,10221,10222,10223,10224,10225,10226,10227, #10064
10228,10229,10230,10231,10232,10233,10234,4927,10235,10236,10237,10238,10239,10240,10241,10242, #10080
10243,10244,10245,10246,10247,10248,10249,10250,10251,10252,10253,10254,10255,10256,10257,10258, #10096
10259,10260,10261,10262,10263,10264,10265,10266,10267,10268,10269,10270,10271,10272,10273,4480, #10112
4928,4929,10274,10275,10276,10277,10278,10279,10280,10281,10282,10283,10284,10285,10286,10287, #10128
10288,10289,10290,10291,10292,10293,10294,10295,10296,10297,10298,10299,10300,10301,10302,10303, #10144
10304,10305,10306,10307,10308,10309,10310,10311,10312,10313,10314,10315,10316,10317,10318,10319, #10160
10320,10321,10322,10323,10324,10325,10326,10327,10328,10329,10330,10331,10332,10333,10334,4930, #10176
10335,10336,10337,10338,10339,10340,10341,10342,4931,10343,10344,10345,10346,10347,10348,10349, #10192
10350,10351,10352,10353,10354,10355,3088,10356,2786,10357,10358,10359,10360,4189,10361,10362, #10208
10363,10364,10365,10366,10367,10368,10369,10370,10371,10372,10373,10374,10375,4932,10376,10377, #10224
10378,10379,10380,10381,10382,10383,10384,10385,10386,10387,10388,10389,10390,10391,10392,4933, #10240
10393,10394,10395,4934,10396,10397,10398,10399,10400,10401,10402,10403,10404,10405,10406,10407, #10256
10408,10409,10410,10411,10412,3446,10413,10414,10415,10416,10417,10418,10419,10420,10421,10422, #10272
10423,4935,10424,10425,10426,10427,10428,10429,10430,4936,10431,10432,10433,10434,10435,10436, #10288
10437,10438,10439,10440,10441,10442,10443,4937,10444,10445,10446,10447,4481,10448,10449,10450, #10304
10451,10452,10453,10454,10455,10456,10457,10458,10459,10460,10461,10462,10463,10464,10465,10466, #10320
10467,10468,10469,10470,10471,10472,10473,10474,10475,10476,10477,10478,10479,10480,10481,10482, #10336
10483,10484,10485,10486,10487,10488,10489,10490,10491,10492,10493,10494,10495,10496,10497,10498, #10352
10499,10500,10501,10502,10503,10504,10505,4938,10506,10507,10508,10509,10510,2552,10511,10512, #10368
10513,10514,10515,10516,3447,10517,10518,10519,10520,10521,10522,10523,10524,10525,10526,10527, #10384
10528,10529,10530,10531,10532,10533,10534,10535,10536,10537,10538,10539,10540,10541,10542,10543, #10400
4482,10544,4939,10545,10546,10547,10548,10549,10550,10551,10552,10553,10554,10555,10556,10557, #10416
10558,10559,10560,10561,10562,10563,10564,10565,10566,10567,3676,4483,10568,10569,10570,10571, #10432
10572,3448,10573,10574,10575,10576,10577,10578,10579,10580,10581,10582,10583,10584,10585,10586, #10448
10587,10588,10589,10590,10591,10592,10593,10594,10595,10596,10597,10598,10599,10600,10601,10602, #10464
10603,10604,10605,10606,10607,10608,10609,10610,10611,10612,10613,10614,10615,10616,10617,10618, #10480
10619,10620,10621,10622,10623,10624,10625,10626,10627,4484,10628,10629,10630,10631,10632,4940, #10496
10633,10634,10635,10636,10637,10638,10639,10640,10641,10642,10643,10644,10645,10646,10647,10648, #10512
10649,10650,10651,10652,10653,10654,10655,10656,4941,10657,10658,10659,2599,10660,10661,10662, #10528
10663,10664,10665,10666,3089,10667,10668,10669,10670,10671,10672,10673,10674,10675,10676,10677, #10544
10678,10679,10680,4942,10681,10682,10683,10684,10685,10686,10687,10688,10689,10690,10691,10692, #10560
10693,10694,10695,10696,10697,4485,10698,10699,10700,10701,10702,10703,10704,4943,10705,3677, #10576
10706,10707,10708,10709,10710,10711,10712,4944,10713,10714,10715,10716,10717,10718,10719,10720, #10592
10721,10722,10723,10724,10725,10726,10727,10728,4945,10729,10730,10731,10732,10733,10734,10735, #10608
10736,10737,10738,10739,10740,10741,10742,10743,10744,10745,10746,10747,10748,10749,10750,10751, #10624
10752,10753,10754,10755,10756,10757,10758,10759,10760,10761,4946,10762,10763,10764,10765,10766, #10640
10767,4947,4948,10768,10769,10770,10771,10772,10773,10774,10775,10776,10777,10778,10779,10780, #10656
10781,10782,10783,10784,10785,10786,10787,10788,10789,10790,10791,10792,10793,10794,10795,10796, #10672
10797,10798,10799,10800,10801,10802,10803,10804,10805,10806,10807,10808,10809,10810,10811,10812, #10688
10813,10814,10815,10816,10817,10818,10819,10820,10821,10822,10823,10824,10825,10826,10827,10828, #10704
10829,10830,10831,10832,10833,10834,10835,10836,10837,10838,10839,10840,10841,10842,10843,10844, #10720
10845,10846,10847,10848,10849,10850,10851,10852,10853,10854,10855,10856,10857,10858,10859,10860, #10736
10861,10862,10863,10864,10865,10866,10867,10868,10869,10870,10871,10872,10873,10874,10875,10876, #10752
10877,10878,4486,10879,10880,10881,10882,10883,10884,10885,4949,10886,10887,10888,10889,10890, #10768
10891,10892,10893,10894,10895,10896,10897,10898,10899,10900,10901,10902,10903,10904,10905,10906, #10784
10907,10908,10909,10910,10911,10912,10913,10914,10915,10916,10917,10918,10919,4487,10920,10921, #10800
10922,10923,10924,10925,10926,10927,10928,10929,10930,10931,10932,4950,10933,10934,10935,10936, #10816
10937,10938,10939,10940,10941,10942,10943,10944,10945,10946,10947,10948,10949,4488,10950,10951, #10832
10952,10953,10954,10955,10956,10957,10958,10959,4190,10960,10961,10962,10963,10964,10965,10966, #10848
10967,10968,10969,10970,10971,10972,10973,10974,10975,10976,10977,10978,10979,10980,10981,10982, #10864
10983,10984,10985,10986,10987,10988,10989,10990,10991,10992,10993,10994,10995,10996,10997,10998, #10880
10999,11000,11001,11002,11003,11004,11005,11006,3960,11007,11008,11009,11010,11011,11012,11013, #10896
11014,11015,11016,11017,11018,11019,11020,11021,11022,11023,11024,11025,11026,11027,11028,11029, #10912
11030,11031,11032,4951,11033,11034,11035,11036,11037,11038,11039,11040,11041,11042,11043,11044, #10928
11045,11046,11047,4489,11048,11049,11050,11051,4952,11052,11053,11054,11055,11056,11057,11058, #10944
4953,11059,11060,11061,11062,11063,11064,11065,11066,11067,11068,11069,11070,11071,4954,11072, #10960
11073,11074,11075,11076,11077,11078,11079,11080,11081,11082,11083,11084,11085,11086,11087,11088, #10976
11089,11090,11091,11092,11093,11094,11095,11096,11097,11098,11099,11100,11101,11102,11103,11104, #10992
11105,11106,11107,11108,11109,11110,11111,11112,11113,11114,11115,3808,11116,11117,11118,11119, #11008
11120,11121,11122,11123,11124,11125,11126,11127,11128,11129,11130,11131,11132,11133,11134,4955, #11024
11135,11136,11137,11138,11139,11140,11141,11142,11143,11144,11145,11146,11147,11148,11149,11150, #11040
11151,11152,11153,11154,11155,11156,11157,11158,11159,11160,11161,4956,11162,11163,11164,11165, #11056
11166,11167,11168,11169,11170,11171,11172,11173,11174,11175,11176,11177,11178,11179,11180,4957, #11072
11181,11182,11183,11184,11185,11186,4958,11187,11188,11189,11190,11191,11192,11193,11194,11195, #11088
11196,11197,11198,11199,11200,3678,11201,11202,11203,11204,11205,11206,4191,11207,11208,11209, #11104
11210,11211,11212,11213,11214,11215,11216,11217,11218,11219,11220,11221,11222,11223,11224,11225, #11120
11226,11227,11228,11229,11230,11231,11232,11233,11234,11235,11236,11237,11238,11239,11240,11241, #11136
11242,11243,11244,11245,11246,11247,11248,11249,11250,11251,4959,11252,11253,11254,11255,11256, #11152
11257,11258,11259,11260,11261,11262,11263,11264,11265,11266,11267,11268,11269,11270,11271,11272, #11168
11273,11274,11275,11276,11277,11278,11279,11280,11281,11282,11283,11284,11285,11286,11287,11288, #11184
11289,11290,11291,11292,11293,11294,11295,11296,11297,11298,11299,11300,11301,11302,11303,11304, #11200
11305,11306,11307,11308,11309,11310,11311,11312,11313,11314,3679,11315,11316,11317,11318,4490, #11216
11319,11320,11321,11322,11323,11324,11325,11326,11327,11328,11329,11330,11331,11332,11333,11334, #11232
11335,11336,11337,11338,11339,11340,11341,11342,11343,11344,11345,11346,11347,4960,11348,11349, #11248
11350,11351,11352,11353,11354,11355,11356,11357,11358,11359,11360,11361,11362,11363,11364,11365, #11264
11366,11367,11368,11369,11370,11371,11372,11373,11374,11375,11376,11377,3961,4961,11378,11379, #11280
11380,11381,11382,11383,11384,11385,11386,11387,11388,11389,11390,11391,11392,11393,11394,11395, #11296
11396,11397,4192,11398,11399,11400,11401,11402,11403,11404,11405,11406,11407,11408,11409,11410, #11312
11411,4962,11412,11413,11414,11415,11416,11417,11418,11419,11420,11421,11422,11423,11424,11425, #11328
11426,11427,11428,11429,11430,11431,11432,11433,11434,11435,11436,11437,11438,11439,11440,11441, #11344
11442,11443,11444,11445,11446,11447,11448,11449,11450,11451,11452,11453,11454,11455,11456,11457, #11360
11458,11459,11460,11461,11462,11463,11464,11465,11466,11467,11468,11469,4963,11470,11471,4491, #11376
11472,11473,11474,11475,4964,11476,11477,11478,11479,11480,11481,11482,11483,11484,11485,11486, #11392
11487,11488,11489,11490,11491,11492,4965,11493,11494,11495,11496,11497,11498,11499,11500,11501, #11408
11502,11503,11504,11505,11506,11507,11508,11509,11510,11511,11512,11513,11514,11515,11516,11517, #11424
11518,11519,11520,11521,11522,11523,11524,11525,11526,11527,11528,11529,3962,11530,11531,11532, #11440
11533,11534,11535,11536,11537,11538,11539,11540,11541,11542,11543,11544,11545,11546,11547,11548, #11456
11549,11550,11551,11552,11553,11554,11555,11556,11557,11558,11559,11560,11561,11562,11563,11564, #11472
4193,4194,11565,11566,11567,11568,11569,11570,11571,11572,11573,11574,11575,11576,11577,11578, #11488
11579,11580,11581,11582,11583,11584,11585,11586,11587,11588,11589,11590,11591,4966,4195,11592, #11504
11593,11594,11595,11596,11597,11598,11599,11600,11601,11602,11603,11604,3090,11605,11606,11607, #11520
11608,11609,11610,4967,11611,11612,11613,11614,11615,11616,11617,11618,11619,11620,11621,11622, #11536
11623,11624,11625,11626,11627,11628,11629,11630,11631,11632,11633,11634,11635,11636,11637,11638, #11552
11639,11640,11641,11642,11643,11644,11645,11646,11647,11648,11649,11650,11651,11652,11653,11654, #11568
11655,11656,11657,11658,11659,11660,11661,11662,11663,11664,11665,11666,11667,11668,11669,11670, #11584
11671,11672,11673,11674,4968,11675,11676,11677,11678,11679,11680,11681,11682,11683,11684,11685, #11600
11686,11687,11688,11689,11690,11691,11692,11693,3809,11694,11695,11696,11697,11698,11699,11700, #11616
11701,11702,11703,11704,11705,11706,11707,11708,11709,11710,11711,11712,11713,11714,11715,11716, #11632
11717,11718,3553,11719,11720,11721,11722,11723,11724,11725,11726,11727,11728,11729,11730,4969, #11648
11731,11732,11733,11734,11735,11736,11737,11738,11739,11740,4492,11741,11742,11743,11744,11745, #11664
11746,11747,11748,11749,11750,11751,11752,4970,11753,11754,11755,11756,11757,11758,11759,11760, #11680
11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,11776, #11696
11777,11778,11779,11780,11781,11782,11783,11784,11785,11786,11787,11788,11789,11790,4971,11791, #11712
11792,11793,11794,11795,11796,11797,4972,11798,11799,11800,11801,11802,11803,11804,11805,11806, #11728
11807,11808,11809,11810,4973,11811,11812,11813,11814,11815,11816,11817,11818,11819,11820,11821, #11744
11822,11823,11824,11825,11826,11827,11828,11829,11830,11831,11832,11833,11834,3680,3810,11835, #11760
11836,4974,11837,11838,11839,11840,11841,11842,11843,11844,11845,11846,11847,11848,11849,11850, #11776
11851,11852,11853,11854,11855,11856,11857,11858,11859,11860,11861,11862,11863,11864,11865,11866, #11792
11867,11868,11869,11870,11871,11872,11873,11874,11875,11876,11877,11878,11879,11880,11881,11882, #11808
11883,11884,4493,11885,11886,11887,11888,11889,11890,11891,11892,11893,11894,11895,11896,11897, #11824
11898,11899,11900,11901,11902,11903,11904,11905,11906,11907,11908,11909,11910,11911,11912,11913, #11840
11914,11915,4975,11916,11917,11918,11919,11920,11921,11922,11923,11924,11925,11926,11927,11928, #11856
11929,11930,11931,11932,11933,11934,11935,11936,11937,11938,11939,11940,11941,11942,11943,11944, #11872
11945,11946,11947,11948,11949,4976,11950,11951,11952,11953,11954,11955,11956,11957,11958,11959, #11888
11960,11961,11962,11963,11964,11965,11966,11967,11968,11969,11970,11971,11972,11973,11974,11975, #11904
11976,11977,11978,11979,11980,11981,11982,11983,11984,11985,11986,11987,4196,11988,11989,11990, #11920
11991,11992,4977,11993,11994,11995,11996,11997,11998,11999,12000,12001,12002,12003,12004,12005, #11936
12006,12007,12008,12009,12010,12011,12012,12013,12014,12015,12016,12017,12018,12019,12020,12021, #11952
12022,12023,12024,12025,12026,12027,12028,12029,12030,12031,12032,12033,12034,12035,12036,12037, #11968
12038,12039,12040,12041,12042,12043,12044,12045,12046,12047,12048,12049,12050,12051,12052,12053, #11984
12054,12055,12056,12057,12058,12059,12060,12061,4978,12062,12063,12064,12065,12066,12067,12068, #12000
12069,12070,12071,12072,12073,12074,12075,12076,12077,12078,12079,12080,12081,12082,12083,12084, #12016
12085,12086,12087,12088,12089,12090,12091,12092,12093,12094,12095,12096,12097,12098,12099,12100, #12032
12101,12102,12103,12104,12105,12106,12107,12108,12109,12110,12111,12112,12113,12114,12115,12116, #12048
12117,12118,12119,12120,12121,12122,12123,4979,12124,12125,12126,12127,12128,4197,12129,12130, #12064
12131,12132,12133,12134,12135,12136,12137,12138,12139,12140,12141,12142,12143,12144,12145,12146, #12080
12147,12148,12149,12150,12151,12152,12153,12154,4980,12155,12156,12157,12158,12159,12160,4494, #12096
12161,12162,12163,12164,3811,12165,12166,12167,12168,12169,4495,12170,12171,4496,12172,12173, #12112
12174,12175,12176,3812,12177,12178,12179,12180,12181,12182,12183,12184,12185,12186,12187,12188, #12128
12189,12190,12191,12192,12193,12194,12195,12196,12197,12198,12199,12200,12201,12202,12203,12204, #12144
12205,12206,12207,12208,12209,12210,12211,12212,12213,12214,12215,12216,12217,12218,12219,12220, #12160
12221,4981,12222,12223,12224,12225,12226,12227,12228,12229,12230,12231,12232,12233,12234,12235, #12176
4982,12236,12237,12238,12239,12240,12241,12242,12243,12244,12245,4983,12246,12247,12248,12249, #12192
4984,12250,12251,12252,12253,12254,12255,12256,12257,12258,12259,12260,12261,12262,12263,12264, #12208
4985,12265,4497,12266,12267,12268,12269,12270,12271,12272,12273,12274,12275,12276,12277,12278, #12224
12279,12280,12281,12282,12283,12284,12285,12286,12287,4986,12288,12289,12290,12291,12292,12293, #12240
12294,12295,12296,2473,12297,12298,12299,12300,12301,12302,12303,12304,12305,12306,12307,12308, #12256
12309,12310,12311,12312,12313,12314,12315,12316,12317,12318,12319,3963,12320,12321,12322,12323, #12272
12324,12325,12326,12327,12328,12329,12330,12331,12332,4987,12333,12334,12335,12336,12337,12338, #12288
12339,12340,12341,12342,12343,12344,12345,12346,12347,12348,12349,12350,12351,12352,12353,12354, #12304
12355,12356,12357,12358,12359,3964,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369, #12320
12370,3965,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384, #12336
12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400, #12352
12401,12402,12403,12404,12405,12406,12407,12408,4988,12409,12410,12411,12412,12413,12414,12415, #12368
12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431, #12384
12432,12433,12434,12435,12436,12437,12438,3554,12439,12440,12441,12442,12443,12444,12445,12446, #12400
12447,12448,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462, #12416
12463,12464,4989,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477, #12432
12478,12479,12480,4990,12481,12482,12483,12484,12485,12486,12487,12488,12489,4498,12490,12491, #12448
12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507, #12464
12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523, #12480
12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,12535,12536,12537,12538,12539, #12496
12540,12541,12542,12543,12544,12545,12546,12547,12548,12549,12550,12551,4991,12552,12553,12554, #12512
12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570, #12528
12571,12572,12573,12574,12575,12576,12577,12578,3036,12579,12580,12581,12582,12583,3966,12584, #12544
12585,12586,12587,12588,12589,12590,12591,12592,12593,12594,12595,12596,12597,12598,12599,12600, #12560
12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616, #12576
12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632, #12592
12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,4499,12647, #12608
12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663, #12624
12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679, #12640
12680,12681,12682,12683,12684,12685,12686,12687,12688,12689,12690,12691,12692,12693,12694,12695, #12656
12696,12697,12698,4992,12699,12700,12701,12702,12703,12704,12705,12706,12707,12708,12709,12710, #12672
12711,12712,12713,12714,12715,12716,12717,12718,12719,12720,12721,12722,12723,12724,12725,12726, #12688
12727,12728,12729,12730,12731,12732,12733,12734,12735,12736,12737,12738,12739,12740,12741,12742, #12704
12743,12744,12745,12746,12747,12748,12749,12750,12751,12752,12753,12754,12755,12756,12757,12758, #12720
12759,12760,12761,12762,12763,12764,12765,12766,12767,12768,12769,12770,12771,12772,12773,12774, #12736
12775,12776,12777,12778,4993,2175,12779,12780,12781,12782,12783,12784,12785,12786,4500,12787, #12752
12788,12789,12790,12791,12792,12793,12794,12795,12796,12797,12798,12799,12800,12801,12802,12803, #12768
12804,12805,12806,12807,12808,12809,12810,12811,12812,12813,12814,12815,12816,12817,12818,12819, #12784
12820,12821,12822,12823,12824,12825,12826,4198,3967,12827,12828,12829,12830,12831,12832,12833, #12800
12834,12835,12836,12837,12838,12839,12840,12841,12842,12843,12844,12845,12846,12847,12848,12849, #12816
12850,12851,12852,12853,12854,12855,12856,12857,12858,12859,12860,12861,4199,12862,12863,12864, #12832
12865,12866,12867,12868,12869,12870,12871,12872,12873,12874,12875,12876,12877,12878,12879,12880, #12848
12881,12882,12883,12884,12885,12886,12887,4501,12888,12889,12890,12891,12892,12893,12894,12895, #12864
12896,12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911, #12880
12912,4994,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,12923,12924,12925,12926, #12896
12927,12928,12929,12930,12931,12932,12933,12934,12935,12936,12937,12938,12939,12940,12941,12942, #12912
12943,12944,12945,12946,12947,12948,12949,12950,12951,12952,12953,12954,12955,12956,1772,12957, #12928
12958,12959,12960,12961,12962,12963,12964,12965,12966,12967,12968,12969,12970,12971,12972,12973, #12944
12974,12975,12976,12977,12978,12979,12980,12981,12982,12983,12984,12985,12986,12987,12988,12989, #12960
12990,12991,12992,12993,12994,12995,12996,12997,4502,12998,4503,12999,13000,13001,13002,13003, #12976
4504,13004,13005,13006,13007,13008,13009,13010,13011,13012,13013,13014,13015,13016,13017,13018, #12992
13019,13020,13021,13022,13023,13024,13025,13026,13027,13028,13029,3449,13030,13031,13032,13033, #13008
13034,13035,13036,13037,13038,13039,13040,13041,13042,13043,13044,13045,13046,13047,13048,13049, #13024
13050,13051,13052,13053,13054,13055,13056,13057,13058,13059,13060,13061,13062,13063,13064,13065, #13040
13066,13067,13068,13069,13070,13071,13072,13073,13074,13075,13076,13077,13078,13079,13080,13081, #13056
13082,13083,13084,13085,13086,13087,13088,13089,13090,13091,13092,13093,13094,13095,13096,13097, #13072
13098,13099,13100,13101,13102,13103,13104,13105,13106,13107,13108,13109,13110,13111,13112,13113, #13088
13114,13115,13116,13117,13118,3968,13119,4995,13120,13121,13122,13123,13124,13125,13126,13127, #13104
4505,13128,13129,13130,13131,13132,13133,13134,4996,4506,13135,13136,13137,13138,13139,4997, #13120
13140,13141,13142,13143,13144,13145,13146,13147,13148,13149,13150,13151,13152,13153,13154,13155, #13136
13156,13157,13158,13159,4998,13160,13161,13162,13163,13164,13165,13166,13167,13168,13169,13170, #13152
13171,13172,13173,13174,13175,13176,4999,13177,13178,13179,13180,13181,13182,13183,13184,13185, #13168
13186,13187,13188,13189,13190,13191,13192,13193,13194,13195,13196,13197,13198,13199,13200,13201, #13184
13202,13203,13204,13205,13206,5000,13207,13208,13209,13210,13211,13212,13213,13214,13215,13216, #13200
13217,13218,13219,13220,13221,13222,13223,13224,13225,13226,13227,4200,5001,13228,13229,13230, #13216
13231,13232,13233,13234,13235,13236,13237,13238,13239,13240,3969,13241,13242,13243,13244,3970, #13232
13245,13246,13247,13248,13249,13250,13251,13252,13253,13254,13255,13256,13257,13258,13259,13260, #13248
13261,13262,13263,13264,13265,13266,13267,13268,3450,13269,13270,13271,13272,13273,13274,13275, #13264
13276,5002,13277,13278,13279,13280,13281,13282,13283,13284,13285,13286,13287,13288,13289,13290, #13280
13291,13292,13293,13294,13295,13296,13297,13298,13299,13300,13301,13302,3813,13303,13304,13305, #13296
13306,13307,13308,13309,13310,13311,13312,13313,13314,13315,13316,13317,13318,13319,13320,13321, #13312
13322,13323,13324,13325,13326,13327,13328,4507,13329,13330,13331,13332,13333,13334,13335,13336, #13328
13337,13338,13339,13340,13341,5003,13342,13343,13344,13345,13346,13347,13348,13349,13350,13351, #13344
13352,13353,13354,13355,13356,13357,13358,13359,13360,13361,13362,13363,13364,13365,13366,13367, #13360
5004,13368,13369,13370,13371,13372,13373,13374,13375,13376,13377,13378,13379,13380,13381,13382, #13376
13383,13384,13385,13386,13387,13388,13389,13390,13391,13392,13393,13394,13395,13396,13397,13398, #13392
13399,13400,13401,13402,13403,13404,13405,13406,13407,13408,13409,13410,13411,13412,13413,13414, #13408
13415,13416,13417,13418,13419,13420,13421,13422,13423,13424,13425,13426,13427,13428,13429,13430, #13424
13431,13432,4508,13433,13434,13435,4201,13436,13437,13438,13439,13440,13441,13442,13443,13444, #13440
13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,5005,13458,13459, #13456
13460,13461,13462,13463,13464,13465,13466,13467,13468,13469,13470,4509,13471,13472,13473,13474, #13472
13475,13476,13477,13478,13479,13480,13481,13482,13483,13484,13485,13486,13487,13488,13489,13490, #13488
13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13502,13503,13504,13505,13506, #13504
13507,13508,13509,13510,13511,13512,13513,13514,13515,13516,13517,13518,13519,13520,13521,13522, #13520
13523,13524,13525,13526,13527,13528,13529,13530,13531,13532,13533,13534,13535,13536,13537,13538, #13536
13539,13540,13541,13542,13543,13544,13545,13546,13547,13548,13549,13550,13551,13552,13553,13554, #13552
13555,13556,13557,13558,13559,13560,13561,13562,13563,13564,13565,13566,13567,13568,13569,13570, #13568
13571,13572,13573,13574,13575,13576,13577,13578,13579,13580,13581,13582,13583,13584,13585,13586, #13584
13587,13588,13589,13590,13591,13592,13593,13594,13595,13596,13597,13598,13599,13600,13601,13602, #13600
13603,13604,13605,13606,13607,13608,13609,13610,13611,13612,13613,13614,13615,13616,13617,13618, #13616
13619,13620,13621,13622,13623,13624,13625,13626,13627,13628,13629,13630,13631,13632,13633,13634, #13632
13635,13636,13637,13638,13639,13640,13641,13642,5006,13643,13644,13645,13646,13647,13648,13649, #13648
13650,13651,5007,13652,13653,13654,13655,13656,13657,13658,13659,13660,13661,13662,13663,13664, #13664
13665,13666,13667,13668,13669,13670,13671,13672,13673,13674,13675,13676,13677,13678,13679,13680, #13680
13681,13682,13683,13684,13685,13686,13687,13688,13689,13690,13691,13692,13693,13694,13695,13696, #13696
13697,13698,13699,13700,13701,13702,13703,13704,13705,13706,13707,13708,13709,13710,13711,13712, #13712
13713,13714,13715,13716,13717,13718,13719,13720,13721,13722,13723,13724,13725,13726,13727,13728, #13728
13729,13730,13731,13732,13733,13734,13735,13736,13737,13738,13739,13740,13741,13742,13743,13744, #13744
13745,13746,13747,13748,13749,13750,13751,13752,13753,13754,13755,13756,13757,13758,13759,13760, #13760
13761,13762,13763,13764,13765,13766,13767,13768,13769,13770,13771,13772,13773,13774,3273,13775, #13776
13776,13777,13778,13779,13780,13781,13782,13783,13784,13785,13786,13787,13788,13789,13790,13791, #13792
13792,13793,13794,13795,13796,13797,13798,13799,13800,13801,13802,13803,13804,13805,13806,13807, #13808
13808,13809,13810,13811,13812,13813,13814,13815,13816,13817,13818,13819,13820,13821,13822,13823, #13824
13824,13825,13826,13827,13828,13829,13830,13831,13832,13833,13834,13835,13836,13837,13838,13839, #13840
13840,13841,13842,13843,13844,13845,13846,13847,13848,13849,13850,13851,13852,13853,13854,13855, #13856
13856,13857,13858,13859,13860,13861,13862,13863,13864,13865,13866,13867,13868,13869,13870,13871, #13872
13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,13884,13885,13886,13887, #13888
13888,13889,13890,13891,13892,13893,13894,13895,13896,13897,13898,13899,13900,13901,13902,13903, #13904
13904,13905,13906,13907,13908,13909,13910,13911,13912,13913,13914,13915,13916,13917,13918,13919, #13920
13920,13921,13922,13923,13924,13925,13926,13927,13928,13929,13930,13931,13932,13933,13934,13935, #13936
13936,13937,13938,13939,13940,13941,13942,13943,13944,13945,13946,13947,13948,13949,13950,13951, #13952
13952,13953,13954,13955,13956,13957,13958,13959,13960,13961,13962,13963,13964,13965,13966,13967, #13968
13968,13969,13970,13971,13972) #13973

# flake8: noqa
site-packages/pip/_vendor/requests/packages/chardet/__pycache__/langhebrewmodel.cpython-33.pyc000064400000055574151733566760030276 0ustar00python3.3�
7�Re6,c@s9d�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zd�S(�i�i�i�i�iEi[iOiPi\iYiaiZiDioipiRiIi_iUiNiyiViGiCifikiTirigisi2iJi<i=i*iLiFi@i5iii]i8iAi6i1iBini3i+i,i?iQiMibiKili|i�i�i�i�i(i:i�i�i�i�i�i�i�i�i�i�iSi4i/i.iHi i^i�iqi�imi�i�i�i�i"iti�ividi�i�iuiwihi}i�i�iWici�ijizi{i�i7i�i�iei�i�ixi�i0i'i9i�ii;i)iXi!i%i$iii#i�i>ii�i~i�i�i&i-i�i�i�i�i�ii�i�i�i�i�i�i�i	iiiiiiiiiiiiiiiiii
iiiiiii
ii�i�i`iucharToOrderMapuprecedenceMatrixgC��|�?umTypicalPositiveRatioukeepEnglishLetteruwindows-1255ucharsetNameN(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iEi[iOiPi\iYiaiZiDioipiRiIi_iUiNiyiViGiCifikiTirigisi�i�i�i�i�i�i2iJi<i=i*iLiFi@i5iii]i8iAi6i1iBini3i+i,i?iQiMibiKili�i�i�i�i�i|i�i�i�i�i(i:i�i�i�i�i�i�i�i�i�i�iSi4i/i.iHi i^i�iqi�imi�i�i�i�i"iti�ividi�i�iuiwihi}i�i�iWici�ijizi{i�i7i�i�iei�i�ixi�i0i'i9i�ii;i)iXi!i%i$iii#i�i>ii�i~i�i�i&i-i�i�i�i�i�ii�i�i�i�i�i�i�i	iiiiiiiiiiiiiiiiii
iiiiiii
ii�i�i�i`i�(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiF(uwin1255_CharToOrderMapuHebrewLangModeluFalseuWin1255HebrewModel(((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/langhebrewmodel.pyu<module>&s*
site-packages/pip/_vendor/requests/packages/chardet/__pycache__/sbcsgroupprober.cpython-33.pyc000064400000005245151733566760030346 0ustar00python3.3�
7�Re�c@s�ddlmZddlmZddlmZmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZmZddlmZmZddlmZddlmZdd	lmZGd
d�de�ZdS(
i(uCharSetGroupProber(uSingleByteCharSetProber(uWin1251CyrillicModelu
Koi8rModeluLatin5CyrillicModeluMacCyrillicModeluIbm866ModeluIbm855Model(uLatin7GreekModeluWin1253GreekModel(uLatin5BulgarianModeluWin1251BulgarianModel(uLatin2HungarianModeluWin1250HungarianModel(uTIS620ThaiModel(uWin1255HebrewModel(uHebrewProbercBs |EeZdZdd�ZdS(uSBCSGroupProbercCs�tj|�tt�tt�tt�tt�tt�tt�tt	�tt
�tt�tt�tt
�tt�tt�g
|_t�}ttd|�}ttd|�}|j||�|jj|||g�|j�dS(NFT(uCharSetGroupProberu__init__uSingleByteCharSetProberuWin1251CyrillicModelu
Koi8rModeluLatin5CyrillicModeluMacCyrillicModeluIbm866ModeluIbm855ModeluLatin7GreekModeluWin1253GreekModeluLatin5BulgarianModeluWin1251BulgarianModeluLatin2HungarianModeluWin1250HungarianModeluTIS620ThaiModelu	_mProbersuHebrewProberuWin1255HebrewModeluFalseuTrueuset_model_probersuextendureset(uselfuhebrewProberulogicalHebrewProberuvisualHebrewProber((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcsgroupprober.pyu__init__+s.
															
uSBCSGroupProber.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcsgroupprober.pyuSBCSGroupProber*suSBCSGroupProberN(ucharsetgroupproberuCharSetGroupProberusbcharsetproberuSingleByteCharSetProberulangcyrillicmodeluWin1251CyrillicModelu
Koi8rModeluLatin5CyrillicModeluMacCyrillicModeluIbm866ModeluIbm855ModelulanggreekmodeluLatin7GreekModeluWin1253GreekModelulangbulgarianmodeluLatin5BulgarianModeluWin1251BulgarianModelulanghungarianmodeluLatin2HungarianModeluWin1250HungarianModelu
langthaimodeluTIS620ThaiModelulanghebrewmodeluWin1255HebrewModeluhebrewproberuHebrewProberuSBCSGroupProber(((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcsgroupprober.pyu<module>s.python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/euckrfreq.cpython-33.pyc000064400000255336151733566760027203 0ustar00�
7�Re��c&"@sdZdZd("Zd'"S()"g@i0	i
i�ixiti�i�i�iHiai�i�i�i�i+i�iWiui�ihii]i�i�i�i�i�i�i�i�i�i�iviwi�i�i�i�imiFi!ipi�ii�ii�i�i�i�ixi�i/i�i�i�i�ii�i�i�i9ii�i�iti�i-iyi�iKi�i�i�i�i�i�iiOi�ini�i�i�i�i�ii0i�i�i<i4i{i�i�i�i�i�iii�iri�i�i�i�i�i�i�i�i�i�i�iXiXi�i�i�i�iYi�i�i&i�iPi�i�i�i�i�i�i�i^i�i�i�i�i�i�i�i9i�i�i�i�i�i�iQi�i"iiti�i�i�i�ii]i{i7i�ii�i{i�i;i�iui�izi/i�i|i�i�i�i�i7i�i�i.i�i�i�i�ii�ii�iiiiii{iiii#i|i}i�i~i�iti8ii_i	i
iii
i!iiii_ii�i�i�iii*i�iuii`i"i�ii|iii�i�iiiaiiiiiii?iiRi!i i/i�i�i!i"i=i�i�i#i�i$i%i&i'i(i)i,i�i'ibi$i*i�i+i�i-i�i,i�ii�i�i�i&iUi�i�i#ii�i-i.i'ii�ifi/isi�i0i�i�iii�i i�i9iei[i1i�i�iiZi�i�i:i�i�i�i2i3i�iGii�iiyi4i�i�i�i5i6i7i,iwi�i�isi8i�i�i9i:ii�i~i;ii<i;i}i=i>i?ioi)i�i�i@i�iAiBi�i�i2iYiCiDi�i<iEiFiGiHiIi%iJiKiLiMiNiOii`i>iPi�i=iQi�iRi�iSiTi;i�i�i�i�iiUi�iViWiXi4iYiiiZi[i�i\i]iii^i�i�i_i"iPi�i�i`i;i�i~iHiaiivi�izi?ii�i�ibi�i�i<icididieifici0i�idiigiyi�i�ihiiisi0iji=iki�ili�i�i�i<ibi�i�iUii�ii�iIiminioiipiqirisitiuii�i�i�i6iviwi�i*i�i]ixiyi�i�iziZi�i-i:i�ibi
i{i|i�i&i'i�i�i5i�i�ii>i}i~iwiigi�i�i�i6i�i%i�i�i(i�ivi�ii�iwi�i�i�i�iEi�i�i�i�i�i�i�i�i�ifi�iVi�i7i�i�i�i�iBi�iNi�i[i�i'i�i�i�i�i�i�i�iSi�i�i�i�i�iei�iixi�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i?i�i�ii�iqi�ifi�i(i)i�i�i~i�i\i�i�i�i�i�i)ii�i�ii�ii�i�i�i�i�i$ii�i�i�i�i�ili�i�i�ii~i�i�iCi�i�ii�i@i�i�i�i�i�i2i�i�iKiiziVii�i�i�i�iQirifiiii�i�i ihi+i3ii1i�ii�i�i�iigi(i�i�i�izi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iAi�i<ijii�iMigi�i2i�i�i�i�i�i�i�i�i�iVihii�iJi�i�i0i�iibii�i�i�ii�i�i�iiYi�i�ii�ii�iai!i*i�i�i�i�i�iKiDi8iiRiiBi�i@i�i�i�ii�i�i�iyi�i�i�i�iiXi:i�i�i#i�i�i�iii�iGi�i�iki�i�i=i�i�i�i�i!i�i�i�iJi�i�i=i�i�i�i}i�iijii�i�i�i�i�i�i�i�i�i�i�iEi�i�i�i�i�ijiOi4i�i�i�i�i�i�i�i�i�i	ivi]i�iCi�i�i�i�i�i�i�ioi�i�i�i�i
i�i�i�iliciAi�i�i�i�i�i�i�i�iiTi�i�iki�i�i�i�i�i�i3i*i�iqi�i�i>i�ii�i�i�ii+iiiiii;i�ipiixii�i�i�iiii�i�i	i�i
ii�ii
i�i�i�i�iliii�i�iii)i�ii�i�imi8i�iiDii�iiiiii�ii�iii7iLiBi�iiDii�ii�i�itiiii i!i
i"i#i$i%iRi&i'i(i)i*i�i+i,i�i,i-i.imi�i
i^i/ici�iEi�i�i�iaimi0iEi1i2i3ii�i�i4iTi�i�i�i5i�ii�i�i6i7iini�i�ioi8i9iFi�i�i�i:iGi;i<i=i>i?i@iAiBiCiDiEi$iFiGi�i�i%i�i�ipiHiIiJiKiLi�i�ii�i�i�i�iMiNiOiPiQiRii�iSi/iTi�iUi�iiiVi�iIiHi�ii�i�i�iWi�iXi�iqiYiZi[i\i�iri�isi]i^i_i`iiviLiai�i�i.i�ibiFi>i�i�ijiciZi�i�iBi6i�i`idieii�i|iifi�i�i5igi�ihi�iiiHi�iji�i�iki�ili�i1iminioipiqiriCisitiuiviwi�ixiyizi{i�i�i|i}i~ii�i�i�iiii�iOi�i�i�i�i�i�ii�i�i�i�i�iEi�i�iqi�iiIi�i\i�i-i�i�iSi�i�i�i
i�iei�i�i�ili�iMii�iQiiPiii^ii
i-iFi�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i
i.i�iti�i�i�i�iJi�i�i�i�i�i�i�igi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�iui�i�i�i9i	i�i�i�i	i�i$i�i�i�i�ii5i%i�ikiLi�i�ii�i�i�i�ii�i�iAi�i�i�i�i�i�i�i�i�iRi�iui�i�i�ii�i)i�i�i:i�i�i�ii�i�i�i"i$ivi�i�i�iciZi�i�i�i�i�ii*iWiiKi�iLi�i+i�ii�i�i�i�i�ii�i	iBi�i�i?i�i�i�ii�i�i�i�i�iMi[i5i�i�i�ini�i�i�i�i�iCi�i'i�i�i�i�i�i�i�i�i
i�i�i�i	i�ii�i�i�i�i�iFiTi/i�i�i�i�ii8i�iui�i�i�iKi�i(iMi�iiii�i�i�i�i�i�i�ii�i�iTi�i?ii�i�i�ii�iiei i(i�i�i�i�i�i�i%i0iii�iOi�i	i8i	i	i	i	i	i�iii	i	i	ii�i#ii�i		i�i�iVi
iiiPii iMiWi�i
	ii	i�i|i	i
	iSi�i�i�ii�i�i�i	i	i�i�i	i	i	i	i	i	i�i	i	i�i9iDiii�i�i�ii	i3i�i�i	i	i	i{i	ii�i	i	i	i�i 	i�i�i�ii�i!	iki�i�ii�iNi�iYi�i"	i#	i$	i%	i&	i'	i(	i]i)	i*	i+	i,	i-	i.	i�i/	i�i�i>ii�i�i1	i�i�i�i�i\i�i2	i�i3	i�i�i4	i5	i6	iwi7	i�i8	i�i3ii�i�i9	i:	iLii�i�i;	i�i<	i�ii�ii�i�ii�i�i�i=	i�iJi>	i?	i@	i�iA	i�iB	iC	iD	i�iE	i�i�iF	iG	iH	iI	i�i�i�i�i�i�iJ	iK	ii�iL	iM	iN	iiIiO	iP	i�iQ	iR	iS	i�iT	i�iU	iV	iW	iX	i�iY	iZ	i[	i\	i]	i�i�i^	i_	i`	ia	i�iib	ic	id	ie	ii�if	ig	iUi�ixi ih	i�i�ii	ij	i�ii�i4i&i�i�i�i!i�i�i�iSiyii�i�i"i
i�i#ik	i�il	im	in	i�i�i�ipiQi�i.io	iUi�iOi�ip	i�iq	ir	is	ixit	i�iu	iv	iw	iii$ix	i�iy	i�i`iz	i{	i|	i}	i�i~	i	i�	i�	i�	i�	i�	i�	i�iCi�i�i�i�i%iyi�iioi�	i�i�	i�	i�	i�	i�	i�	i�i�	i�	i�	i�	i�i�i�	i�i�i�	i�	ii@i�i�i�	iGi�	i�i�ii2i�i�i�i�i�	i�	i�	i�	iNi�	ii�i�i�i�i�	i�	i�	i�	i�	iri�	i�izini�i�i�iPi�	i#i�	i&iQi�	i�imi�	ici�i�i�	i'i�	iwi�	i�	i�i(ili@i�i�i�i)i�i*i�	i�	i�	i�	i�i�	i�	i�	i�	i�i�i�	i�i�i�	i�	i�	iHi�i�	i�	ii�	ii�i�	i�	i�	i�i�	i�	iri�	ii�iAi�	i�i�i�i�i�	i}i,i�i�i:i�ii�i�i
iiIi�	iNi�i1i�	iWi�i�i�i�i�i�i�i�	i+i�	i�	i1i�ibi�i�	iqi�	i,i�	i�i�iei�i�i_iidi�	i�	i�	i�	i�	i�	i�i�i2i�i�i�i�	i�i�	i�	i�	i�	ii�	i�i�	i�	i�i-i�	i�i�i�	i�	i�	i�	i�	i�	i�i�	i�	i�	i�	i�	i�	i�i�	i�i�	i�	ii�i7i�	i�i�	ii�	i�	i�	i�	i�	i�	i�	i�i�i�i�i�i�i�i�i,iGi�ii�i�	i�i^i�	i�	i.i�	i�igi�i�	i�i�	i�	i�	i�i�i�	ii�ii_i�i�	i�	i�	i�i�ihihii{i�	i|i�i�i�i3i�	i�	i�	i�i�i�	i
i
i\ii�i�ii
i
i
i
i
i
i
i�i	
i

i
i
ii�i�i
iji
iii�i4ii
i
i
i
i
i
i�i�i
i
i
i
i�i6idi�i/i
i
ii�i�ioi
i�iRi�ii�i	i&i
ikinizi�ii�i�i
i�i
i�i�iXi�idiiSi�i}i
i}ii�i~i�i�ii�i 
i!
iNi"
i�i�i�i�i�i�i#
i�i�isi$
i%
i&
ifiDii1i'
i�ii(
i@i)
i^i�i�i�i*
i�i+
i,
i-
i.
i/
iJi+i0
i1
i2
i�iTi�i3
i4
i5
i6
i�i7
iAi.i�i�i�i8
i9
ii"i:
i;
i�i<
i=
i>
ii�i0i?
i�i@
iiA
iB
iiC
iD
iE
iF
iG
i�i�i_i[iH
iI
i�ii`iaiJ
i�ii�i�iK
iL
iM
iN
i�iO
i�iiiiiiP
iQ
iR
iS
iT
iU
iV
iW
iX
iY
iZ
i[
i\
i]
i^
i_
i`
ia
ib
ic
id
ie
if
ig
ih
ii
ij
ik
il
im
in
io
ip
iq
ir
is
it
iu
iv
iw
ix
iy
iz
i{
i|
i}
i~
i
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
iipi�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
ii�
i�
i�
i�
i�
i�
i�
ii�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i	i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i
i�
ii�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
ii�
i�
i�
iUi�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i1i�
i�
i�
iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i
i)i*i+i,ii-i.ii/i0i1i2i3i4i5i6i7i8i9i:iVi2i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqiri3isitiuiviwixiyizi{i|i}i~iii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�ii�i4i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�iii�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�iiiiiiiiiii	i
ii�ii
iiiiiiiiiiiiiiiiiii i!i"i#i$i�i%i&i'i(i)ii*i+i,i-iWi.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihi5iiijikiliminioipiqirisitiuiiviwi6ixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i
i
i
i
i
i
i
i
i
i	
i

i
i
i

i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i 
i!
i"
i#
i$
i7i%
i&
i'
i(
i)
i*
i+
i,
i-
i.
i/
i0
i1
i2
i3
i4
i5
i6
i7
i8
i9
i:
i;
i8i<
i=
i>
i?
i@
iA
iB
iC
iD
iE
iF
iG
iH
iI
iJ
iK
iL
iM
iN
iO
iP
iQ
iR
iS
iT
iU
iV
i9iW
iX
iY
iZ
i[
i:i\
i]
i^
iii_
i`
ia
ib
ic
id
ie
if
ig
i�ih
ii
ij
i;ik
il
im
in
io
iip
iq
ir
is
it
iu
iv
iw
ix
iy
iz
i{
i|
i}
i~
i�i
i�
i�
i�
i�
ii�i�
i i!i�
i�
i�
i"i�
i�
i�
i�
i�
i#i�
i�
i�
i�
i�
i$i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i<i�
i�
i�
i�
i�
i�
i�i�
i�
i�
i�
i�
i�
i%i�
i=i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i>i�
i�
i�
i�
i�
i&i?i�
i�
i�
i'i�
i(i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i)i�
i�
i*i�
iiiiiiiiii	i
iii
iiiiiiii+iiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i,i.i/i-i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHi.iIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisiti�iuiviwixi�iyizi{i|i/i�i}i~ii�i�i�i�i�i0i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i@i�i�i�i�i�i�i�i�i�i�i�i1i�i�i�i�i�i�i�i�i�i�i2i�i�i�i�i�i�i�i�i�i�i�i�iAi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iBi3i�i�i4i�i�i�i�i�i�i�i�i�iCi�i�i�i�i�i5i�i�i�i�i�i�i�i�i�i�i6i�i�i7iDi�i�i�i�i�i�i�i8i�i�i9i�i�i�i�i�i�i�iiiiiiEiiiii	i
iii
iiiiii:iiiiiiiiiiii;iii i!i<i"i#i$i%i&i'i(i)i*i+i,i-i.i=i/i0i1i2i3i4i5i6i7i>i8i9i:i?i@i;iFi<iGi=i>iHi?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTi�iUiViWiXiYiZi[i�i\iAi]i^i_i`iaibicidieifigiBihiiijikiliCiminioipiqirisitiuiviwixiyizi{i|i}iDi~ii�i�i�i�i�i�i�i�i�i�iIi�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iKi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iEi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iFi�i�i�i�iGi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iHi�i�i�i�i�i�i�i�i�iIi�i�i�i�i�i�i�i�iiiiiiiiii	i
iii�i
iiiiiiiiiiiiiiii�iiiiJi i!i"i#i$i%i&i'i(i)iLi*i+i,i-i.i/i0iKi1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{iLi|i}i~ii�i�i�i�iMi�iMi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iNi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iNi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iPi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiiiQi	i
iii
iRiiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iSiAiBiCiDiEiFiGiHiIiXiJiKiLiMiNiTiOiPiQiRiSiTiUiViWiXiYiZi�i�i[i\i]i^i_i`iaibicidieifigiOihiiijikiliminioipiqiUirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iVi�i�i�iWi�i�i�i�i�i�i�i�i�i�i�i�i�i�iPi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iXi�i�i�i�i�iYi�i�i�i�i�i�i�i�iZi�i�i�i�i�i�i�i�i�i�i�i[i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiii\ii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)iQi*i+i,i-i.i/i0i1i2i3i4i5iRi6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJi]iKiLiMiNiOi^iPiQiRiSi�iTiUiViYiWiXiYiZi[i\i]i^i_i`iaibicidieifigi�ihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii_i�i`i�i�i�i�i�i�i�i�iai�i�i�i�i�i�i�i�i�i�i�iSi�i�i�i�i�i�i�i�i�i�i�i�i�i�ibi�i�i�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i�i�i�i�idi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iei�i�i�ifi�i�i�i�i�i�i�i�i�igi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i5i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiihiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/iji0i1i2iTi3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCikiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiliuiviwiximiyizini{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�ioi�ipi�i�i�i�i�i�i6i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iUi�i�i�i�i�i�i�i�i�i�i�iqi�i�i�i�i�i�iVi�i�i�i�i�i�i�i�i�i�iri�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�isi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iti�i�i�i�i�i�i�i�iWi�iiiiiiiiii	iui
iii
iiiiiiiiiiiiiiiiiXiiviiYi i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:iZi;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiwiOiPiQiRixiSiTiUiVi[iWi\iXiYiZi[i]i\i]i^i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~iiyi�i�i�i�izi�i�i�i�i�i�i_i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i{i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i|i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i`i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i}i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiii�iiiiiiiiii i!i"i#i$i~i%i&i'i(ii)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i�i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifi�igihiiijikilimi�inioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iai�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iZi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ibi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiidiiiiiii	i
iii
iiiiiei iiiiiiiiiiii�iiii i!i"i#i$i�i%i�i&i'i(i)i*i+i,i-i.i�i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBi�iCiDiEiFiGiHiIi�iJiKiLiMiNi�iOiPiQiRifiSiTiUiViWiXiYiZi[i\i]i�i^i_i�i�i`iaibicidieifigihi�iiijikiliminioipi�iqirisitiuiviwigixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ihi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i[i\i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiii�iiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i�i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@i�i�iAi�iBiCiDiEiFiGiHiIi�iJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]iii^iji_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i�i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKi�iLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikilimi�inioipiqirisitiuiviwi�ixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iki�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
i�iiiiiiiiii�iiiiiiiiii i!i"i#i$i%i&i�i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigi�ihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ili�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiii�ii	i
iii
iiiiii�iiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEimiFiGiHiIiJiKiLiMiNiOiPini�iQiRiSiTiUiVi�iWiXiYiZioi[i\i]i^i_i`iaibicidieipifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i�i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iqi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i�i?i@iAiBiCiDiEiFiGiHiIiJiKiLiriMiNiOiPiQiRiSiTiUiViWiXi�iYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisiti�iuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'isi(i)i*i+i,i-i�i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i i i i i i i i i i	 i
 i i i
 i i i i i i i i i i i i i i i i i i i  i! i" i# i$ i% i& i' i( i) i* i+ i, i- i. i/ i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i: i; i< i= i> i? i@ iA iB iC iD iE iF iG iH iI iJ iK iL iM iN iO iP iQ iR iS iT iU iV iW iX iY iZ i[ i\ i] i^ i_ i` ia ib ic id ie if ig ih ii ij ik il im in io ip iq ir is it iu iv iw ix iy iz i{ i| i} i~ i i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i!i!i!i!i!i!i!i!i!i	!i
!i!i!i
!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i !i!!i"!i#!i$!i%!i&!i'!i(!i)!i*!i+!i,!i-!i.!i/!i0!i1!i2!i3!i4!i5!i6!i7!i8!i9!i:!i;!i<!i=!i>!i?!i@!iA!iB!iC!iD!iE!iF!iG!iH!iI!iJ!iK!iL!iM!iN!iO!iP!iQ!iR!iS!iT!iU!iV!iW!iX!iY!iZ!i[!i\!i]!i^!i_!i`!ia!ib!ic!id!ie!if!ig!ih!ii!ij!ik!il!im!in!io!ip!iq!ir!is!it!iu!iv!iw!ix!iy!iz!i{!i|!i}!i~!i!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i"i"i"i"i"i"i"i"i"i	"i
"i"i"i
"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i "i!"i""i#"i$"i%"N(&"i
i�ixiti�i�i�iHiai�i�i�i�i+i�iWiui�ihii]i�i�i�i�i�i�i�i�i�i�iviwi�i�i�i�imiFi!ipi�ii�ii�i�i�i�ixi�i/i�i�i�i�ii�i�i�i9ii�i�iti�i-iyi�iKi�i�i�i�i�i�iiOi�ini�i�i�i�i�ii0i�i�i<i4i{i�i�i�i�i�iii�iri�i�i�i�i�i�i�i�i�i�i�iXiXi�i�i�i�iYi�i�i&i�iPi�i�i�i�i�i�i�i^i�i�i�i�i�i�i�i9i�i�i�i�i�i�iQi�i"iiti�i�i�i�ii]i{i7i�ii�i{i�i;i�iui�izi/i�i|i�i�i�i�i7i�i�i.i�i�i�i�ii�ii�iiiiii{iiii#i|i}i�i~i�iti8ii_i	i
iii
i!iiii_ii�i�i�iii*i�iuii`i"i�ii|iii�i�iiiaiiiiiii?iiRi!i i/i�i�i!i"i=i�i�i#i�i$i%i&i'i(i)i,i�i'ibi$i*i�i+i�i-i�i,i�ii�i�i�i&iUi�i�i#ii�i-i.i'ii�ifi/isi�i0i�i�iii�i i�i9iei[i1i�i�iiZi�i�i:i�i�i�i2i3i�iGii�iiyi4i�i�i�i5i6i7i,iwi�i�isi8i�i�i9i:ii�i~i;ii<i;i}i=i>i?ioi)i�i�i@i�iAiBi�i�i2iYiCiDi�i<iEiFiGiHiIi%iJiKiLiMiNiOii`i>iPi�i=iQi�iRi�iSiTi;i�i�i�i�iiUi�iViWiXi4iYiiiZi[i�i\i]iii^i�i�i_i"iPi�i�i`i;i�i~iHiaiivi�izi?ii�i�ibi�i�i<icididieifici0i�idiigiyi�i�ihiiisi0iji=iki�ili�i�i�i<ibi�i�iUii�ii�iIiminioiipiqirisitiuii�i�i�i6iviwi�i*i�i]ixiyi�i�iziZi�i-i:i�ibi
i{i|i�i&i'i�i�i5i�i�ii>i}i~iwiigi�i�i�i6i�i%i�i�i(i�ivi�ii�iwi�i�i�i�iEi�i�i�i�i�i�i�i�i�ifi�iVi�i7i�i�i�i�iBi�iNi�i[i�i'i�i�i�i�i�i�i�iSi�i�i�i�i�iei�iixi�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i?i�i�ii�iqi�ifi�i(i)i�i�i~i�i\i�i�i�i�i�i)ii�i�ii�ii�i�i�i�i�i$ii�i�i�i�i�ili�i�i�ii~i�i�iCi�i�ii�i@i�i�i�i�i�i2i�i�iKiiziVii�i�i�i�iQirifiiii�i�i ihi+i3ii1i�ii�i�i�iigi(i�i�i�izi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iAi�i<ijii�iMigi�i2i�i�i�i�i�i�i�i�i�iVihii�iJi�i�i0i�iibii�i�i�ii�i�i�iiYi�i�ii�ii�iai!i*i�i�i�i�i�iKiDi8iiRiiBi�i@i�i�i�ii�i�i�iyi�i�i�i�iiXi:i�i�i#i�i�i�iii�iGi�i�iki�i�i=i�i�i�i�i!i�i�i�iJi�i�i=i�i�i�i}i�iijii�i�i�i�i�i�i�i�i�i�i�iEi�i�i�i�i�ijiOi4i�i�i�i�i�i�i�i�i�i	ivi]i�iCi�i�i�i�i�i�i�ioi�i�i�i�i
i�i�i�iliciAi�i�i�i�i�i�i�i�iiTi�i�iki�i�i�i�i�i�i3i*i�iqi�i�i>i�ii�i�i�ii+iiiiii;i�ipiixii�i�i�iiii�i�i	i�i
ii�ii
i�i�i�i�iliii�i�iii)i�ii�i�imi8i�iiDii�iiiiii�ii�iii7iLiBi�iiDii�ii�i�itiiii i!i
i"i#i$i%iRi&i'i(i)i*i�i+i,i�i,i-i.imi�i
i^i/ici�iEi�i�i�iaimi0iEi1i2i3ii�i�i4iTi�i�i�i5i�ii�i�i6i7iini�i�ioi8i9iFi�i�i�i:iGi;i<i=i>i?i@iAiBiCiDiEi$iFiGi�i�i%i�i�ipiHiIiJiKiLi�i�ii�i�i�i�iMiNiOiPiQiRii�iSi/iTi�iUi�iiiVi�iIiHi�ii�i�i�iWi�iXi�iqiYiZi[i\i�iri�isi]i^i_i`iiviLiai�i�i.i�ibiFi>i�i�ijiciZi�i�iBi6i�i`idieii�i|iifi�i�i5igi�ihi�iiiHi�iji�i�iki�ili�i1iminioipiqiriCisitiuiviwi�ixiyizi{i�i�i|i}i~ii�i�i�iiii�iOi�i�i�i�i�i�ii�i�i�i�i�iEi�i�iqi�iiIi�i\i�i-i�i�iSi�i�i�i
i�iei�i�i�ili�iMii�iQiiPiii^ii
i-iFi�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i
i.i�iti�i�i�i�iJi�i�i�i�i�i�i�igi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�iui�i�i�i9i	i�i�i�i	i�i$i�i�i�i�ii5i%i�ikiLi�i�ii�i�i�i�ii�i�iAi�i�i�i�i�i�i�i�i�iRi�iui�i�i�ii�i)i�i�i:i�i�i�ii�i�i�i"i$ivi�i�i�iciZi�i�i�i�i�ii*iWiiKi�iLi�i+i�ii�i�i�i�i�ii�i	iBi�i�i?i�i�i�ii�i�i�i�i�iMi[i5i�i�i�ini�i�i�i�i�iCi�i'i�i�i�i�i�i�i�i�i
i�i�i�i	i�ii�i�i�i�i�iFiTi/i�i�i�i�ii8i�iui�i�i�iKi�i(iMi�iiii�i�i�i�i�i�i�ii�i�iTi�i?ii�i�i�ii�iiei i(i�i�i�i�i�i�i%i0iii�iOi�i	i8i	i	i	i	i	i�iii	i	i	ii�i#ii�i		i�i�iVi
iiiPii iMiWi�i
	ii	i�i|i	i
	iSi�i�i�ii�i�i�i	i	i�i�i	i	i	i	i	i	i�i	i	i�i9iDiii�i�i�ii	i3i�i�i	i	i	i{i	ii�i	i	i	i�i 	i�i�i�ii�i!	iki�i�ii�iNi�iYi�i"	i#	i$	i%	i&	i'	i(	i]i)	i*	i+	i,	i-	i.	i�i/	i�i�i>ii�i�i0	i1	i�i�i�i�i\i�i2	i�i3	i�i�i4	i5	i6	iwi7	i�i8	i�i3ii�i�i9	i:	iLii�i�i;	i�i<	i�ii�ii�i�ii�i�i�i=	i�iJi>	i?	i@	i�iA	i�iB	iC	iD	i�iE	i�i�iF	iG	iH	iI	i�i�i�i�i�i�iJ	iK	ii�iL	iM	iN	iiIiO	iP	i�iQ	iR	iS	i�iT	i�iU	iV	iW	iX	i�iY	iZ	i[	i\	i]	i�i�i^	i_	i`	ia	i�iib	ic	id	ie	ii�if	ig	iUi�ixi ih	i�i�ii	ij	i�ii�i4i&i�i�i�i!i�i�i�iSiyii�i�i"i
i�i#ik	i�il	im	in	i�i�i�ipiQi�i.io	iUi�iOi�ip	i�iq	ir	is	ixit	i�iu	iv	iw	iii$ix	i�iy	i�i`iz	i{	i|	i}	i�i~	i	i�	i�	i�	i�	i�	i�	i�iCi�i�i�i�i%iyi�iioi�	i�i�	i�	i�	i�	i�	i�	i�i�	i�	i�	i�	i�i�i�	i�i�i�	i�	ii@i�i�i�	iGi�	i�i�ii2i�i�i�i�i�	i�	i�	i�	iNi�	ii�i�i�i�i�	i�	i�	i�	i�	iri�	i�izini�i�i�iPi�	i#i�	i&iQi�	i�imi�	ici�i�i�	i'i�	iwi�	i�	i�i(ili@i�i�i�i)i�i*i�	i�	i�	i�	i�i�	i�	i�	i�	i�i�i�	i�i�i�	i�	i�	iHi�i�	i�	ii�	ii�i�	i�	i�	i�i�	i�	iri�	ii�iAi�	i�i�i�i�i�	i}i,i�i�i:i�ii�i�i
iiIi�	iNi�i1i�	iWi�i�i�i�i�i�i�i�	i+i�	i�	i1i�ibi�i�	iqi�	i,i�	i�i�iei�i�i_iidi�	i�	i�	i�	i�	i�	i�i�i2i�i�i�i�	i�i�	i�	i�	i�	ii�	i�i�	i�	i�i-i�	i�i�i�	i�	i�	i�	i�	i�	i�i�	i�	i�	i�	i�	i�	i�i�	i�i�	i�	ii�i7i�	i�i�	ii�	i�	i�	i�	i�	i�	i�	i�i�i�i�i�i�i�i�i,iGi�ii�i�	i�i^i�	i�	i.i�	i�igi�i�	i�i�	i�	i�	i�i�i�	ii�ii_i�i�	i�	i�	i�i�ihihii{i�	i|i�i�i�i3i�	i�	i�	i�i�i�	i
i
i\ii�i�ii
i
i
i
i
i
i
i�i	
i

i
i
ii�i�i
iji
iii�i4ii
i
i
i
i
i
i�i�i
i
i
i
i�i6idi�i/i
i
ii�i�ioi
i�iRi�ii�i	i&i
ikinizi�ii�i�i
i�i
i�i�iXi�idiiSi�i}i
i}ii�i~i�i�ii�i 
i!
iNi"
i�i�i�i�i�i�i#
i�i�isi$
i%
i&
ifiDii1i'
i�ii(
i@i)
i^i�i�i�i*
i�i+
i,
i-
i.
i/
iJi+i0
i1
i2
i�iTi�i3
i4
i5
i6
i�i7
iAi.i�i�i�i8
i9
ii"i:
i;
i�i<
i=
i>
ii�i0i?
i�i@
iiA
iB
iiC
iD
iE
iF
iG
i�i�i_i[iH
iI
i�ii`iaiJ
i�ii�i�iK
iL
iM
iN
i�iO
i�iiiiiiP
iQ
iR
iS
iT
iU
iV
iW
iX
iY
iZ
i[
i\
i]
i^
i_
i`
ia
ib
ic
id
ie
if
ig
ih
ii
ij
ik
il
im
in
io
ip
iq
ir
is
it
iu
iv
iw
ix
iy
iz
i{
i|
i}
i~
i
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
iipi�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
ii�
i�
i�
i�
i�
i�
i�
ii�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i	i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i
i�
ii�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
ii�
i�
i�
iUi�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i1i�
i�
i�
iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i
i)i*i+i,ii-i.ii/i0i1i2i3i4i5i6i7i8i9i:iVi2i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqiri3isitiuiviwixiyizi{i|i}i~iii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�ii�i4i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�iii�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�iiiiiiiiiii	i
ii�ii
iiiiiiiiiiiiiiiiiii i!i"i#i$i�i%i&i'i(i)ii*i+i,i-iWi.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihi5iiijikiliminioipiqirisitiuiiviwi6ixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i
i
i
i
i
i
i
i
i
i	
i

i
i
i

i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i 
i!
i"
i#
i$
i7i%
i&
i'
i(
i)
i*
i+
i,
i-
i.
i/
i0
i1
i2
i3
i4
i5
i6
i7
i8
i9
i:
i;
i8i<
i=
i>
i?
i@
iA
iB
iC
iD
iE
iF
iG
iH
iI
iJ
iK
iL
iM
iN
iO
iP
iQ
iR
iS
iT
iU
iV
i9iW
iX
iY
iZ
i[
i:i\
i]
i^
iii_
i`
ia
ib
ic
id
ie
if
ig
i�ih
ii
ij
i;ik
il
im
in
io
iip
iq
ir
is
it
iu
iv
iw
ix
iy
iz
i{
i|
i}
i~
i�i
i�
i�
i�
i�
ii�i�
i i!i�
i�
i�
i"i�
i�
i�
i�
i�
i#i�
i�
i�
i�
i�
i$i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i<i�
i�
i�
i�
i�
i�
i�i�
i�
i�
i�
i�
i�
i%i�
i=i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i>i�
i�
i�
i�
i�
i&i?i�
i�
i�
i'i�
i(i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
i)i�
i�
i*i�
iiiiiiiiii	i
iii
iiiiiiii+iiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i,i.i/i-i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHi.iIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisiti�iuiviwixi�iyizi{i|i/i�i}i~ii�i�i�i�i�i0i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i@i�i�i�i�i�i�i�i�i�i�i�i1i�i�i�i�i�i�i�i�i�i�i2i�i�i�i�i�i�i�i�i�i�i�i�iAi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iBi3i�i�i4i�i�i�i�i�i�i�i�i�iCi�i�i�i�i�i5i�i�i�i�i�i�i�i�i�i�i6i�i�i7iDi�i�i�i�i�i�i�i8i�i�i9i�i�i�i�i�i�i�iiiiiiEiiiii	i
iii
iiiiii:iiiiiiiiiiii;iii i!i<i"i#i$i%i&i'i(i)i*i+i,i-i.i=i/i0i1i2i3i4i5i6i7i>i8i9i:i?i@i;iFi<iGi=i>iHi?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTi�iUiViWiXiYiZi[i�i\iAi]i^i_i`iaibicidieifigiBihiiijikiliCiminioipiqirisitiuiviwixiyizi{i|i}iDi~ii�i�i�i�i�i�i�i�i�i�iIi�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iKi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iEi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iFi�i�i�i�iGi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iHi�i�i�i�i�i�i�i�i�iIi�i�i�i�i�i�i�i�iiiiiiiiii	i
iii�i
iiiiiiiiiiiiiiii�iiiiJi i!i"i#i$i%i&i'i(i)iLi*i+i,i-i.i/i0iKi1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{iLi|i}i~ii�i�i�i�iMi�iMi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iNi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iNi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iPi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiiiQi	i
iii
iRiiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iSiAiBiCiDiEiFiGiHiIiXiJiKiLiMiNiTiOiPiQiRiSiTiUiViWiXiYiZi�i�i[i\i]i^i_i`iaibicidieifigiOihiiijikiliminioipiqiUirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iVi�i�i�iWi�i�i�i�i�i�i�i�i�i�i�i�i�i�iPi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iXi�i�i�i�i�iYi�i�i�i�i�i�i�i�iZi�i�i�i�i�i�i�i�i�i�i�i[i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiii\ii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)iQi*i+i,i-i.i/i0i1i2i3i4i5iRi6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJi]iKiLiMiNiOi^iPiQiRiSi�iTiUiViYiWiXiYiZi[i\i]i^i_i`iaibicidieifigi�ihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii_i�i`i�i�i�i�i�i�i�i�iai�i�i�i�i�i�i�i�i�i�i�iSi�i�i�i�i�i�i�i�i�i�i�i�i�i�ibi�i�i�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i�i�i�i�idi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iei�i�i�ifi�i�i�i�i�i�i�i�i�igi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i5i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiihiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/iji0i1i2iTi3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCikiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiliuiviwiximiyizini{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�ioi�ipi�i�i�i�i�i�i6i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iUi�i�i�i�i�i�i�i�i�i�i�iqi�i�i�i�i�i�iVi�i�i�i�i�i�i�i�i�i�iri�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�isi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iti�i�i�i�i�i�i�i�iWi�iiiiiiiiii	iui
iii
iiiiiiiiiiiiiiiiiXiiviiYi i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:iZi;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiwiOiPiQiRixiSiTiUiVi[iWi\iXiYiZi[i]i\i]i^i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~iiyi�i�i�i�izi�i�i�i�i�i�i_i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i{i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i|i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i`i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i}i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiii�iiiiiiiiii i!i"i#i$i~i%i&i'i(ii)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i�i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifi�igihiiijikilimi�inioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iai�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iZi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ibi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiidiiiiiii	i
iii
iiiiiei iiiiiiiiiiii�iiii i!i"i#i$i�i%i�i&i'i(i)i*i+i,i-i.i�i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBi�iCiDiEiFiGiHiIi�iJiKiLiMiNi�iOiPiQiRifiSiTiUiViWiXiYiZi[i\i]i�i^i_i�i�i`iaibicidieifigihi�iiijikiliminioipi�iqirisitiuiviwigixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ihi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i[i\i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiii�iiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i�i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@i�i�iAi�iBiCiDiEiFiGiHiIi�iJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]iii^iji_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i�i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKi�iLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikilimi�inioipiqirisitiuiviwi�ixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iki�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
i�iiiiiiiiii�iiiiiiiiii i!i"i#i$i%i&i�i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigi�ihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ili�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiii�ii	i
iii
iiiiii�iiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEimiFiGiHiIiJiKiLiMiNiOiPini�iQiRiSiTiUiVi�iWiXiYiZioi[i\i]i^i_i`iaibicidieipifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i�i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iqi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i�i?i@iAiBiCiDiEiFiGiHiIiJiKiLiriMiNiOiPiQiRiSiTiUiViWiXi�iYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisiti�iuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'isi(i)i*i+i,i-i�i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i i i i i i i i i i	 i
 i i i
 i i i i i i i i i i i i i i i i i i i  i! i" i# i$ i% i& i' i( i) i* i+ i, i- i. i/ i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i: i; i< i= i> i? i@ iA iB iC iD iE iF iG iH iI iJ iK iL iM iN iO iP iQ iR iS iT iU iV iW iX iY iZ i[ i\ i] i^ i_ i` ia ib ic id ie if ig ih ii ij ik il im in io ip iq ir is it iu iv iw ix iy iz i{ i| i} i~ i i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i!i!i!i!i!i!i!i!i!i	!i
!i!i!i
!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i !i!!i"!i#!i$!i%!i&!i'!i(!i)!i*!i+!i,!i-!i.!i/!i0!i1!i2!i3!i4!i5!i6!i7!i8!i9!i:!i;!i<!i=!i>!i?!i@!iA!iB!iC!iD!iE!iF!iG!iH!iI!iJ!iK!iL!iM!iN!iO!iP!iQ!iR!iS!iT!iU!iV!iW!iX!iY!iZ!i[!i\!i]!i^!i_!i`!ia!ib!ic!id!ie!if!ig!ih!ii!ij!ik!il!im!in!io!ip!iq!ir!is!it!iu!iv!iw!ix!iy!iz!i{!i|!i}!i~!i!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i"i"i"i"i"i"i"i"i"i	"i
"i"i"i
"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i "i!"i""i#"i$"i%"(u EUCKR_TYPICAL_DISTRIBUTION_RATIOuEUCKR_TABLE_SIZEuEUCKRCharToFreqOrder(((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euckrfreq.pyu<module>)sHpython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/gb2312freq.cpython-33.pyc000064400000206316151733566760026764 0ustar00�
7�Re��cp@sdZdZdrZdqS(sg�������?i�i�i�i�i<	iTi�i	iQi�i�
i�
i�i�i<iwi�i9	i�i�	i�i�i�iZi�i�iqi�i�i�
iW
iyii�ieioi�iv
i�i�i�i�i�iiiLiBiiQ
i�i�i�iQi�i�iEiifi�ii�ii�i�i�idi(iyii�i,i	i�i
iEiei�i�
iWiRi�i�i|	iR
i�i�
i�i
iX
i�
ijiEi�ii+iPii�i�ii�ii;i�imi�ili�i�i�i�i�iieiHi�i�i�i�i^iki6i�i"iFi�i�
i�
i�
i^	i�i�
i�i�i�i?i`iui$i1i�
i�i�i iUi�i1i�i�igili�ii		i�iGi�i2i�iq	i�i iPi�iL	i�i�i�iiy	ii�i�
i�iMi�iki�i4	i�ii�i�i�i
i�	i@	i`i�i5i�i�iN
i�i7i3i�iniiuiGi&ibihi0i�iMiNii�	i
iY	i�
i�i�	i
i�i�i�
i&i�
iQi
i7i^ihi�i�iJi�iPi�i�i�iri�i�i�ii�i�iT	i-iGi,iuii�	i�i$ii�i<iBii$i>ii�ixiLiWii�ini
i�iTi�iZi�i�
i�	i{ii�i�	i�iii�
i?i�
i0ibi;iDi�ii�i�iCiSi�iUi>	i|igi�i�i�	i�
iKi�i

i�i�i�i%
i5
i�i�ii�ili�ihi
ii�i?i�ii iUi�i�i�i�	i�i*i<
i�i�
i�i
i�i
i�i�i�
i�i�
i!	iX
i�i�i�	i�iQigi�i�i�i�	i�iri�
i�i�iqi�i�
i�iz
i�i�	i3ii�i�i�i
i�
i]iciziii7i�i_ii�iCi�i&iaiHi|
ili
i�i=i�i�iIiPi�
i�i~
i8i`i�iw	i�i�
iTi�i�
i�i�i�i�i�
i�ii�i�i�i[iqi�ii�	igi�i|iCi	i�i�iNiIi�i�i5i�
i(i�i/iHiK
i
i�iii�i9i�iIi�i�i|i�i�i�i�
i�iiWii�i�i�i^i~iii�i�	i�i=iXi�i3i�
iIi�ii�
i�i�i�i�i3irii�i�ioii�i�i{iiiiCi�i!iHi�	i�i�i�ifii=
ii1i[i�i|iDii%i�iti�i�i�
i�i i�i.i�iiiyiiTi�i�i9
i�
ii#i�i�iJi�ini�ii�i
i�i>iBi"i�i�iai�i�iMiKi�iiWi�i�	i�	i!
ir	iFi+	i�
i
ii�ix
iHiJi�i�i�i�i2iKi�iR
i$ii9i�
it
i�i�
i�i�i�i�i�ii�i�ii�i�i%i~i�
i`	i�i�i�i�i'iviii�i�i|ii'ii�in
i*i�i�i�iFi�i%i�i)i~i�i
i�i�iJi&i�i
i!iDi�iwii[iii�	i�i	i'	i�	i�ikii�i	i�
i�
i�i�ii�ii�i�ih
iBi_i�i?iigihi�i'i�i�i�i�i�ii�i�i�ii�i�i5i]i�ii�i�ii�i�i�i�i1	i�i)ia	ii�i�i�i;	ii�i_i�i�iQi/iu
i�
i�
iji[i�i}i�i
i�i�i�	ii�i�iQi^
i�iGi�izi�i�i�iViOi�ii�i�i�i�imiui�	i6i�i�i-i$i�i�iRi�i}	i
ipiri]
i�
iDiii�i�i�iiiii�i�ii1ini�i�iitiYiG	i�i�i/i|iti0i�
i�i�ii�i\i�
i�i�ivi�i�i�ici�ii�i�
i~iAi"i�i"	i!i8iCi8	ii�	iji�
i1i�ili>i�
ii]
i�i�
i~i�iLi(i�i�iKidiiviDi�i�i�i%i�	i�i�i�	i,ii2i�i�
i�i�iji-i.i�imiKii�i�ioi	i;i	i�i�idi@iai	iM	i1
iLi@i2i�iwi�itiQi
i/i�i i�i~i�i�i�i�i�
i/i�i�
i_	i#i�iOi�iOiGi�i�iki[iOioi�i�i-
i
i�ii�	i!i�i�iIi�i�i�i{iri�i.ihi�
iiT
iiii'iL
iai�i�
i@i�i�i�i�i�i�
iTi/
i�ii�i�ii�iMi�ii
ili�ii�
i{i8i#i�
i�i�i9i�iSiRi�	iwi�iZi�i0
iEigigi�i�i
i�iLi�i�ipi�i�iSi
i�i�i�i�i�	i@i�iI	iLi;
iOiqi�i�i)	ii:iFi�i5iJidiA
i�i
i)
iEiLiYi�i�i�i�
im	i�i�i�i�i�i�ici�iRi�i!i�i�i�i�
i�i(i�i�i]iIi�i�
i�	i�iei�ii�i�i�i�i�i`i�ii�i�i
i�i[i�iC
i(iPi,i�i}iO	i'iLi\
i�
i�ii�i�iiZi�i�isi'i�	iUi�i�i�i�iN
ii�i�i�
i�i�iMi�i�i�i�i�i�i�i�iii�igi'i�i�i	i�i
i�iPi0is	iii�ip	i�	inii�i�ii\i�
i�i�i�
i!ihi�i�imi(i&i
iCiiBi)i5	i�i�i�ii�i�i
i�i�i>i�i�i�i�ii�	i�i{iNi�iiiEi3iiJi#i�ici�i�
ii$
i�i5i�ixii]i�i�iki�i�i�i�i�iP
i�i
iiiri�iLi�izidi�i�i#i�
ii�i[iSiihiiGi�i�ii�i�
iUi+i�	iyi�iwi"i�iVi2
i&izi�	i�	i�iJ
iP	i�	i�i�i�i�i%	iZi$ioiTiKi1i�
i�i`iVi�ii�idi�i�i�i�i+i�i�iAi�i�i�i�i�i$i�i�	i_i3i\i�i�i�i�i�ibi�ifi�i�i�i�i�
iAinii�ixi�iFi�
iOi[i�i�i(i�ii
i#i7i2	ixiif	i�	i�
i!i6i{
i�i�iYi�ii�i+i�i�i�i�i i�i�i�i�	i	iKiei�i�i�
iTi$i�i�iihii	iRi�i�i"i�i�iZi 
i_i�i@i�iaii�ii3
i�
iki)iji�iiiei�i
iAi^i�i
iW	i�i�ihi:
iz
i)
i�i|i�i�ii�ii8iji�i�
ii�i3i�	i
izi�ipiyi�i�i2ioiD	i=i�i.i�i9iaifi�i*i_i�i	i*i�ii�
i�
i�i�i-ii�
i}i�i�
i�i�i*	i�
iti�iti6
iqi�i�i�i�i�i�i�iSi 	i�i�i!i)iiyi�
i�iiij	i�i�	i�iViIi�i�ig
iiiLi�i�i�ipiDi�i�i�i�i%i�i�iMi�i�i�i$i�i�i�iE	i"iU	i�ie
i	i|i�	iQii�i�i�ii�i�
i1
i�i�i�i�i$i i]i4i&i�i�izi�i�i`i�iwi�
iiii�
i)i%
i&i�i�i�i*i�i�i8i2i>
iSi
i�i�i1i#i�i�i
i�i#i	i�
i�i�ii�iF
iii,	i>i+i
ii�iZi3iqi�i�
i$i�i�
iVi�	i;i�i�iNi�imiKiWi�i�i�i5i�
i�	iRi4i�iIiiDi�i�i�i�
i�i�
i�i�i�ii%iKi|ii�i�
i�i�i�i�i9i�in	i�i�i�
i-i3i2
ipiii?
i�i~i�i�i�i�i�iCi�i[i�i�
i�i�i�i3	i>i�ili
i`ix	i�i�i�i�i#
i�i�i�i0i�i�i�i�	iL
i�i�iQi�iRi�i?i(imi�i`
i�i3ii�ii&
i�
iiisiDi�i0	ib	ifi@i�	i�i�i�
ii=i�i
i<i�i�i�i�
i�i6ii�isi�i�i�iSi�i�i�
i8iZ
i�i�i�i�i�i�i�ii�
i�i�
i�ii�iNi�	i�i
iLi�
iJ	i�i�i�	ibiigii�i[
i�i�ii�ii~i�i�	i�	i�i�ifi�i�iii�
ii`i4i=	i�i�i�ili?	i�ici�ii�iiii�i�i�i�i�i�i�i�iwi�i�i�i%ii�id	i^i+i�i�i�iZi�iFiI
i�iti�i�	i/i�	ii�iyi*
isi&i+ii�i)ii�i�	i�i�ii�
i�ie	i�i�iQi]	ii	i_i7	ii0iciui�i�iLiki
i�i�i�i�i#ii�ii�i�i�i�i?i�i�ii�
ini
i�i�i�i	i�i�i�	iHi�iYi�iu	i�i�
i�	i�iJi�i_i_i&i�i�ii�i�i�iZi%i�i�	isi�iSiiiiVi�i�i�i�i�i1i'i�i�iFi\i
i|i�	iWi�i�i|i�iSiWi�	i*i	iRiliPi#i�ii-iq
i�i�i	i�i�i4i�i�i�i�i�iai�i�ii�i@
i�iXiii%i�i�i8
i3i,i�i}i�i�i�idixi�	i�i#	i�i6i�
i�
i.ii�iAi�
i�ir
i�
i�iRidi�ii+
i�i�i�i�
i{i{iHi�	i
i�i�i�i�i�ici	i
i�i�i�i,i�iI
i�icii�i�i�i�i=i�iJi.i,i>iii�iLiei]i�i�
iCi�i�i�i*i;i
i�i i�ipi�
i�i�iRi�i9i�
i�
ii�
i�i�i?i:i�	i�i�iQi'isi�iwi[i�
i�i-i�
i)i�i�iMi�i�i�i�i]i}i6i@i
iiUi�i�i�i/i�i�is
i�	i�i�ik	i?i�i,
i=
i1iMi�i�i�i/iS
idi�i�io
i6	ikiui�i�i�iWi{iixiWi�i�ii�i�ixi^i�i�i[	i+i7i:i�iUi�i�i!i�i�i�
i.iHiTi�iYi�i�i	ii@i"iCisi	i�	iiG
ibi�i7i~i.
iUiiqi�	i�i�i�i{i�i�i�iYi/i�
i�i�iAi�
i�i*i:i8i'i�i�i�i�iiAi_i0i�i�i�iiii�iKi�
i�i�iti*i�i�i�
i�i�i�i�i�	i�
i�i�iDii�ii>i�i�ivii

i�
i'i�iVi�i�i�
i�i�ikiii\ii�i�i�i!ii�i*iU
i�i�i�i�iizi�i\if
i�i�i�	i
i�i�i�i�i�i�i�i�i�iiB	iii�i�i�i{ii=i�
i�i&i�
i�iVi�	i�i"i!i�
i�	i�i�i�
i(	i=i�i�
i�
i�i9ii�i4iai�i�i-iQ	i�i�
i�i�
imi�i�i�i�iCi�i�i7i}iqiDi4i�iuii�	i�i�ivii�iF	i�iuia
i�iHioi�
i
	iliKiA	i�i�i�	izi4i�	i!
iH
i�i�	i�i5iiji�i`i�i�
iBi:iOiai�i#i�i�i�idii�i(i�
i&
i�i^imig
iE
iio	i�i(iGi$i@i
iIii�iAiii`iXii7i�i/i�i$i�i�i�ihi�i�i�i�	iUi"iTii�i�i�imi�i�i!ii�i�ii�i i�iMi�	i�i�i�i�	i2iqi�i�i9i�i�i�i�i�ii�i/i�i�i�iipi@iX	i�ijiii
i^
ibi�
i�iniivii�i�ioioi�iivi�i�i0i�i9i�i$	i�ifiSizi
iiDi{i�iXi�ii�iVi3iYi
i�i�
iAi�i�i�i�i�iqiUi�
i:	ii2iji�iii{	i�i�	iFi�i�
i�	ii	i�i�i�iciiiR	i;ikihi�ii�
i�iYiOixi�iziZi<iv	ii�
i
i�
i�iIi�i�i4
iMi�i�i�i�ibi�ii�ii�i�i�iCi�i�
i�i�iOi�i8i�i�i�	i.i]iiVic
i�	i�i�i
iH	i�iTi�i�i�	i�i>
i
i�i�i3ii�i�i,i�i�ifi�i�iiliTiWiHi.i'i>ipi�i�i�i"i�i�	iJi�i�
i�
ivi2i�i�i	ixi	i2i�igi i4i�i�i�
i�
i�i�i{
iz	i�i�	i�
i�i�i�	i�i�ii�i�i?ii�i�i�	iJi�i�i�i�
i�	i8i�i�iEij
i\i�i8i8
ii ii�ii`i�i>ibiSii�i�i�i�ii�i0i�i�i�iEi�i�idi�i�i�i1i�i�i�ini@i�i�i�iTii�	i�i�iQi�iCi�i�iKi;iki�i�i�i�i�i_i\	ieiiwi�i�ii�iMi�i.	iriaii�i�
i�i�i�
i�i�i�igi�i�i'i�
i�iii�	iTii�i4ioi�i�	iXiyi�ixii�	i�
i
iU
i^i:i�i�i�i�ii"i#i�i�iii�	i�i�i�iNiUi�i�ipii"
i-i�i�	i�i�i:i�i
ii�	i�i�i�i�	i�i�iWi
iG
iLi�i�
iGiwioi�i�iiMiri�i�ii�iQ
i�iIiNi%i
iXiii�i7
i�
iai�i�ii�i�	i'
iiihi�i}iNiyi?iti�i�iDi�i�i�i�i�ili�i�i�i	ii�ieiJisi2i*iyi�i�i�i�i�ii�iqi�i�i5i}isi$i�i�i�i5
iBi�i�i�i#idisi}i�i~i�iib
i�iO
i/	i]i�i�i�	i]i2i�iifi7i�i�iOi

iRii#
i	i[i�iEi�iif
iS
i�	idiFi�i�i�iC	iV
i>i�i	i�iBi�ii	i1i6imi�ii	i�i�i�i�ip
i�ii�
i�i<izi�
i|
iXi�i�i�isiei]ii�i�i
i�
iiOi�i+i�	iii�i�i�i:i�	iAi�ii�i�i�i(
i�
imii4iPi�i	ini�i�
ioioi�i�imiiyiii8i	i�i<i�i�i<ic	iCi�i�i&iwi
i�	i$i 
i9i&i�i�i)i`i�i�ii�i�iGibiEi�i:iQioiFi�
i�i�i�	i�
iFi|i;i�
i�ii3i4i%i�i:i�	ici�ipi6
i\iCi�i0i9
i�i�i�i�i�i~	i�ii"ihi�i�i�i�	i)ii�	i�
i�i�i*
i�ii
i
i%i�i	i�i�ii�
i.i�i�i9i	i�i�i�
i�i�i	i�i"i!i�i,
i�ig	iJigiF
i�ii�i�
i�i;ii	iZiEi^iA
i�iili5i�i�i�i4i'
i�iiki	i�i�	i2i�i�
i�i	iXi7ii�i�
i{i�iBixi=iei(iii�i�i'i�i�ii�i�ii�iiii�iD
iiikii�i�i�i-i,i�
iei7
i�i�i�i�ii�i�ini}
ipi7iji�i�	i�i9i�i�
i�i�i�i�i0iPi�i�i�i�ii�iO
i�
i�i�	i�iUi
ii�i<
i�i�i�
iJi�itiNi�i)ii.i�i�i*iiAi�ir
i]i)i�ii�i�iGi�i_
ipik
i�i�i
	i%i
i�i�
i�i>ibi_i^i?ii:iYiDi%i�i�i�
i�ii�i�iiYi�i�
i�i�ii�i�il
iAi�i�	i�
i�	iDiBi�	i
i�i	i@
i(iv
i�i�i�igi�
i�	i}ivi�i�i�i�
i�ii�i�ii�i�ii�ii�i�i i-i~i�iyi%i�	i�
i_i�i�ii�i�iijiMi�i�iGi+i�	ii�i�i�	i�i�ii3
i;i
iGi)i�i
i�i�ii�i�ii�i
i
i�i,iIi�	i�i�iiXiAi\i�ii�iPivi�i�	iVii=i�
i�
i6i<i�iXii�
i	ii8i-	iY
i�i�i�i�i�i�i�ici�i�i�i9i�	i-
iui�i	i�i�
iRi�
iii6i�i�	i�ih	i}ii?
iw
ii�i�	iai(i�ii1i�i�
i�i>i�i�i�i�i�i]i�
iXiriPi0i,ii+iji�i`i�i�i�ii.iii
i�i&	iWiB
i�ii|i7iUi�i�	iiWi�iYi�i�
i�iw
i�
ii�ii�ii�i�iui�ibi�iq
i�i�ibi�i�i�i�i=i$
i�iNiJi�i�iUi�ii�i�	ii�iiiKi,i�i�i4iri{i�iiHi�ipi5ii�i=i�	i�iEi9i�i;ii<ii5i�
iiii�i\ii�iipi�ii�i�iri�iNi�ii^i�i�i�i�iKii�i*ii{i+
i�	i�i*i8ii�ii	ii�i�i�ij
ii@il	i6i�i2i8i�i�	i�ii�i'i�i�i�iB
i�iii\i�i�iSiV	ii~i�i�i�i�i�i�
i�iVi�
izi�i^i	i�i�i�i_
i}
iGiqi�iIi�i�i�i8itihiS	i�i}iRi�	i9i�iSin
iPi�iBiii�isi�iXi}ifi�i�ii�i�i�i�i�i�i�iniIi^i�iTi�ixi�iri�i�i_iibi�iOiPiQiRiSi�iTi<iV
i�iYi�i�
i�i�i�i1iUiLiVi4i�i�i�iUiEi�iMi3ifii�i�i�i�iFi�ii�i�iBiGii�i�i�i�ii�i�i�i�i�i�i�
i?i
i�iVi&iHiWiWiXi�ii�i@i�isi:i�iXiYiZi�iti�i.
iKi[i�i�iri�iYi�i�i�i'i�i(i4ii�i�i�i�ii�
i�i�i5i�i�i�i�i�	i�iZiBiIi	
i&i�ii�
i?i�i0ii[i�	i�iai�iY
i�iii�i\i�i�iLi@i�ii�iWii�ii�i}ii�iMi]i�i1i�i�i�iJi^i;iiKiti�i i�i�i�iuii�i�i_i�i`iTi�isi�i
iai�i�i�i�i�
iNi\ibiiAiciti�i�i�i�i�i�i�i�i�i�iaiUi
i�i�
i�iiri�iBiOi�i�i�i�izi�i�i�iDi�i�ii�i�idiCi�i�
i�i�i�ii�i�i�i�ii�iDi4
i�
i]i�i�iiji�i�i�i�ieiLi�i�i�i�ifi�i^igiuiCi~
ihi�i�ibi�i2i�i�i�iii�i�i(i�i�iNii�iMiXi�iZiji�ii�i�i5i_i�i�i�iui�i�i�ii�ii�i�i�i<i=iMii�
ikii�iei:i`iEivi�ili�i�iii`
i�i�i�i)iminiNiFi�i�i
i;i�ioi)i�iViaiici	iGi�i�ioi�i�isi�ipiOi�i�iiqiwi~iri�i�ibi�i*i�iiVi�iPii�i�i�iHici�ifi�i�i�i(i�iIisi�itiui�idiQieiWi�	i�i�i�i�i�i�i
iki�i+i�ii�i�iNiivi�i�i�iJi�
i�
i9i�ii�iRiSi�ifi�i�igi�ipi�iiiwiiiAiKi�ihiZ
i�iii�i�ibixi�i�
i�i�ii�ijiyi�i<i�i�i�i!i�i+is
i�i�i�i�i�ijilii�i�i,i�iRi�izi{i�iTiCiDici�
i�ii�
iki�i�i�imi:
i�	iDi�
i�i+iLi|ii-iEi�i�ii�i�itili�iMiNi�i�	i�i�i�ii�i�iUi�i�iOi�i}i*i~iiBi�iPi�i[iuiQii�i�ii�i�i�i	ii5iOiliRi�i=i�i�iVi5i�i�i�i�i�i�iSiiTi�iXi�iYi�i�i�imi�i�iPi�i�ini�i�i�i�iEi�iUi�i�iqi�iiviWiimioi�i�i�ii�ipigi"
i.i�i�i�iqi�i�ii&i�iPiri�iie
i�i�i�i�i�i�ii'i,isiti�i�idi�i�ii�i�i�iYi�i�i�i�i+i�i�iQi�i�i�i�iuii�
i�ii�iXi�iei�i�i3i�i�i�iFi�i
i�i�i�iri�i�i�i�i�i�
iui iVi�
i(i�iii�iYiwi�i�i�i�i�i�iZio
ini6i�i
ivi�i�i.ii�i�ii�ifi�i�i�i�i�ii�i�i�i�i�i�iJi=i�iwiixi�i�i�ii�ii�icii�i�ifi�i�iGi�i�ii�i�i�ii�iioiZi�i[ipii�i�
i�ii�i�iPi�ii[idi4i�i�i�i�i5i�i�i�i6i�ii�i�i�i7i�i�ii!ii�i�iHi8i�ii-i�i�i�i�i�i�igihi�i�i�i\i�i�i�i�iqi�i�i�i,i�ihi�i�i i]iii	ixi�iyi�ii[i�i�i	i
i�i�i	iWi�i�i�iN	ii6i�i�i)i|iRi�it	i�i�i>ii�i�iZi�ii�iji�ifi^i�i�i�i�i�i�i�i>i/i�i�i*i
ii
ii�i�i�ivi�i
i-i�iyiCi]i
iiEiDi�iXiki
ii�i�i<iZii�i�iFi�ii�i�ii�i
i�ii�
i�i�i�i�i�i�i�ii�
ii�izi�i�i�iYii!i{i�i�i�iiAiZi�i�iSi�ii�i�i%i_i�i�ii�i�i|i[i�i\i}i�i�iXiiIi�i�i�i0i�i�i?iRi�i1ii�i@i�i]i~iziki�iTiC
i2ii6i�i^i�i�i�i�
ii�iei�ii�i�i�iirixi�ii�i�i_i!i�ii�i`i`i	i�i�i�
i�i�iFi�
i�i�i�i�i�i�i�i�i�i�i�i[iii�i�i�i�i^ii�i�i�i�ii
ifi�i�ih
i_ik
i�i�i+i"i�i#ihi�i�i~i�i�ii�i�i�i�iJi$i�i�i�i%i�i�i&i'iQi�ii�i�i'i�i�i�ici�i\i�idi}i\i�i.i�i�iKi�
ii�i�
i�i�i�iii�i�it
i�i�ibi�iisi�i�ii�ini�ii�i�i�i�i�i�i�i�i�i�i"i�i�i�
iGiNiUi
i�i�iJ
i�ivi�i�
i�i#i]iVii�ii�i�
i�i�i�i�i�ii�i�ii/
iviji/i�i�i�i�i+ii�ii�i�ii�i3iiEi�i�
i�i�i�i�i�i�iiiai,i�i.i�i�i
iwii�
i\iAi�i�iBii�i�i(
i�ivi�i�iti/iii$iHii�iSii�i�i�ii�i�i)i�i�i�i�ii�i�i�
i�i�i#i�i�i�i�i�i�i�ibi�iii�i�ii�i�i]iOi�
i�iai�i%ii�i�i�i�i(i�i�
ii�i�i�i�ii�i�i�ii�i^i�i�iD
i�i�i�iu
ii�i�icidi�
i�i�iLii�i4i:ii�i�i�i�i�i�i�iii�i
i�iciW
iRi�i�i�i?i�i�i�ii iHi?ii�i=i�ii�ii�i�i�ii�i�i�
iVi�i�ii�i�i�ii�i�iii�i�ii/i)iiEibi�ixi�ili�i�i�iei�i�iWi�i�i�i*ici�iH
i9i�ii�i�i�ii
i�i�i�i�i�iyidi,imiiei�iii�iji�ii�ii�i`i�i+i�ifii�ii�i�i i�i�i�igi�ii�ini�i�i!i6iIi�ii�
i�
i�i:i"i�i�i�i�ifi�i�i�i�iai�i�iigi�i�iqi�
i�i�iNi�iCii0i�i�i0i�i-i�
i�i�i�
iiiM
i~ii$i�i�iai�i�i�i�i�iT
ihi�ib
i�i�i�i#ic
i
i�i&i�i"i�i�iii�i/i�i�iM
i�i�i:i-i$iFi�i�iui�i�iFiviiKii�i�i�i�i:ii�i%il
i�i�ii�i�i�i�ioi�i�i�iXii�i)i�i�i&i'i�ii{i�i�i�i�iiii�i�ipi�ii�iii,i�i�i�i�i5ii�i�iOiYi�iji�
i�ii�i�iki6i-iMi<ii	ii�i�i�i@i�ihi@i�ix
i�i(i�ii�iyi�i�i i�i�i�i�i�i�i"i.i�i/i0i.i�ii�ii�ili�im
i7i�i�igiNi�i�iOii1i�i�i
i)i�i�i�i�i�i�i�i!i iqi�i�i*iPi�i�i�i
iPi�i\i�iri�i�i�i�i�i�i�i�iQi�i�iwizi�iGi�i"i�i�i�iii�i
i�i�i�i�
iii�i�i�i+isiti�i%iziii�iE
iy
i#i�i�i�ijiiii�iJia
i�i�i�i�i�ikii.i$i`i�i�i%i�i�iDii�i�ii�i�iliiGi�i�iKi�i�iZi�i�i,i1i�ii6i�i�ii�imi�i�i�i&iii'i�isini�i�iEi�i�i�i(i[i�i/ii�i�i�i�ii�i�ilioi�i8ii�ii�i�i�i�i�iti�i>i�ipiiwi�iOiii�i7i�i�i�i)i�i�i-i�i.i i�i�
i
i�i�i�i	i�i�i�iWi�i�i2i�i�i!i/ikim
i�i�i�iqi3i�i*i+i
i0i�i�i�i�iqi�iSi�i&i�i�irixi�i�
i1i�
i�imi,i4iXi�isi�i�i�ii-i�i�ii"i�i;i�i�i�i*i\ii2i8iRiyi�i�i3i�i�ini�ii�i�i�i�i�i�i4i�i	i�i�iui�i�ii;i�i�
i�iei�ii�i�i5i�ini
i�iid
ii�iy
i.i�i�i�ii�i�ioi�i�i�i6i7ii�iiK
i;i�ii�iQi�i(i�
i�i�iiti�iii�i�i;iiFiHi/i�i�i�i�i�iiivii�iSi8iTi9ii�i�i�i�i�i/i]i:ii"iuii�i	i0i9i#i
ii�
i<iii
i�i;ii�ii�i�iiiUi$ii
i�i�ii<i1i�iQi%i[
ii�i=i[i�ii�i7ii�i�i>ii2i�i�iYi�i�i+iipi?ii�i:i�i�
i�i@i^i�i�iqi�iAii�i�iVi5iiii�i�
iLi2i�i3i�i
i�i�i�iri�ii	ii�i3i
i�i�i�i�i�i�i�i4iwi�i�i�i�i�ii4i6iBi�ii�i|iSii�i�iP
i&i�i
i�
ixivii�i�ii�i'ii�i?i0i�i�iiii�i�iCii5i
ii�iwii=i�i6iii7i�i
i>i0i�iiii iii!i8isiip
ii�i�i�i�i�ii�i(i�
iiii"ii#i�i)i�i�i$i�iiDi�i�i*i�i�i%i�i�i+i�i�i�iifiiEiixi�i�i�i�i�i�i_i�iki�i�iiFi�
i�ili7i`iMiGiyi&iiHi'i�i9ii�i:i;iAixi�i;iiIigii<iJi�i�i(i�i�iKi�i^iLiMi�i,i8ii�i�iiyizii5i<i�izi�i}ii_i)iNi?i=i�iai<iOi�i�i�i*i�i�iFiWi<ii�i>iii�i�i�iiPi�i�i�i+i�i{i�ii�
i�i i�i,i�i�i�i�iIi�i!iei"i-i	i�ii�iQi9i#iRi�i�i|i�iSi�i.imi�i$i/i�i�i�i�i�i
i%ii�iTi�ii�i�iUi�iVi�i�i,i?i�imi@i�ii6i-iWi�iXi.i&i`i:i/i0iAiHi1i0i\
i2izi7i�i�i}i�iBi@i�i�
i1i
ii�i�iCi'ibi3i�i(i�
iAi�i)i2i4i;iti~i3ii�iBi�iiNiui�iYi�i�i*iZi�iaii{iXi�i[i+ici�i i�i\i�i;
i,i-iTiUi�i�ivi�ii5i	i6i�iDi
i]i{i�i�i7i�i�
iyi�i�i8i�ibi.i�i�i9i:i|i<i/i~ii;ii�ihi�i0i�i1i2i�
i�i�i3i4i�imi<i^ii{i�i_i�i�i�iEiFi�i`i5i�i�iai�i�iZi|iYi�iiii	
iwi=ibiGi�i�i4i�i�
i�i�iIi�iii�iZi=i>i>i�ici�
ii�idi�i�ii�ixi5i�i�i?i6iHi�iIi@i1i_i
i�iJi�iAi7i�iKii�ieifigi�i=i
i�i0
iihi@iBii8i[i9iCini:iDiii�i�i�i;iji�i�iyi}i<iziEikili�i�i{i�ii=i>i�i�i|iLi�i2i?iJi�i�i�imi�ii|iMini}i}i@iiFi�i�i�i~iBi>i�i�idi-i�i�ioipii�i�i�iciGi�idi�i�iqi�i�i\ieiGiOiAiHiBi6i�i�
i=i�iiNi�iIiOi�i�i7i~iJiKi�iiCi~iriLi�i�i�iMioi8i?i�ii�iiNi�i�isii=i�i�iti�iCi�ii@iui�iK	i�i�i�i9i�i�iOiiPi�i�iQii�i�ii�i�i�i iriYi�ii�ivi�i?i�iRiwiSiTi�i`iUiDiVixi�iEiiPiWi�iXi�i!iYi�i�i�i$i�i\i�i1i�i�i�i�i�i�i"iQiZi�i�i7i�i�i�iAiyi�ii�i�i�id
i�i[i�i�iBizi�i�i\i
i�
ii�i�ii�iVi�i{i�ifi]i|i^i}i�i�iBi�i�ii�i:i_i�i�i;i�i�i�i`i<ipiiFiiPi�iaiibiGi�i-ici]iidi�i�i�igiHi�iIi�i�iei�i�iui�i�i�i�iqiJifi�igijiKi~ihi�i�i^i�ii#i�i�i�i�ii�iiiHiLi�i�iji�iRi�iSi�i�i�iMi�i�
i!iTii�i�i�ikiwi�i�i�ini�i�i�ili#i>i�i�iZ	i�iHi�ii#i�i�i�iNimii�i�i�i�i�ini�ioN(pi�i�i�i<	iTi�i	iQi�i�
i�
i�i�i<iwi�i9	i�i�	i�i�i�iZi�i�iqi�i�i�
iW
iyii�ieioi�iv
i�i�i�i�i�iiiLiBiiQ
i�i�i�iQi�i�iEiifi�ii�ii�i�i�idi(iyii�i,i	i�i
iEiei�i�
iWiRi�i�i|	iR
i�i�
i�i
iX
i�
ijiEi�ii+iPii�i�ii�ii;i�imi�ili�i�i�i�i�iieiHi�i�i�i�i^iki6i�i"iFi�i�
i�
i�
i^	i�i�
i�i�i�i?i`iui$i1i�
i�i�i iUi�i1i�i�igili�ii		i�iGi�i2i�iq	i�i iPi�iL	i�i�i�iiy	ii�i�
i�iMi�iki�i4	i�ii�i�i�i
i�	i@	i`i�i5i�i�iN
i�i7i3i�iniiuiGi&ibihi0i�iMiNii�	i
iY	i�
i�i�	i
i�i�i�
i&i�
iQi
i7i^ihi�i�iJi�iPi�i�i�iri�i�i�ii�i�iT	i-iGi,iuii�	i�i$ii�i<iBii$i>ii�ixiLiWii�ini
i�iTi�iZi�i�
i�	i{ii�i�	i�iii�
i?i�
i0ibi;iDi�ii�i�iCiSi�iUi>	i|igi�i�i�	i�
iKi�i

i�i�i�i%
i5
i�i�ii�ili�ihi
ii�i?i�ii iUi�i�i�i�	i�i*i<
i�i�
i�i
i�i
i�i�i�
i�i�
i!	iX
i�i�i�	i�iQigi�i�i�i�	i�iri�
i�i�iqi�i�
i�iz
i�i�	i3ii�i�i�i
i�
i]iciziii7i�i_ii�iCi�i&iaiHi|
ili
i�i=i�i�iIiPi�
i�i~
i8i`i�iw	i�i�
iTi�i�
i�i�i�i�i�
i�ii�i�i�i[iqi�ii�	igi�i|iCi	i�i�iNiIi�i�i5i�
i(i�i/iHiK
i
i�iii�i9i�iIi�i�i|i�i�i�i�
i�iiWii�i�i�i^i~iii�i�	i�i=iXi�i3i�
iIi�ii�
i�i�i�i�i3irii�i�ioii�i�i{iiiiCi�i!iHi�	i�i�i�ifii=
ii1i[i�i|iDii%i�iti�i�i�
i�i i�i.i�iiiyiiTi�i�i9
i�
ii#i�i�iJi�ini�ii�i
i�i>iBi"i�i�iai�i�iMiKi�iiWi�i�	i�	i!
ir	iFi+	i�
i
ii�ix
iHiJi�i�i�i�i2iKi�iR
i$ii9i�
it
i�i�
i�i�i�i�i�ii�i�ii�i�i%i~i�
i`	i�i�i�i�i'iviii�i�i|ii'ii�in
i*i�i�i�iFi�i%i�i)i~i�i
i�i�iJi&i�i
i!iDi�iwii[iii�	i�i	i'	i�	i�ikii�i	i�
i�
i�i�ii�ii�i�ih
iBi_i�i?iigihi�i'i�i�i�i�i�ii�i�i�ii�i�i5i]i�ii�i�ii�i�i�i�i1	i�i)ia	ii�i�i�i;	ii�i_i�i�iQi/iu
i�
i�
iji[i�i}i�i
i�i�i�	ii�i�iQi^
i�iGi�izi�i�i�iViOi�ii�i�i�i�imiui�	i6i�i�i-i$i�i�iRi�i}	i
ipiri]
i�
iDiii�i�i�iiiii�i�ii1ini�i�iitiYiG	i�i�i/i|iti0i�
i�i�ii�i\i�
i�i�ivi�i�i�ici�ii�i�
i~iAi"i�i"	i!i8iCi8	ii�	iji�
i1i�ili>i�
ii]
i�i�
i~i�iLi(i�i�iKidiiviDi�i�i�i%i�	i�i�i�	i,ii2i�i�
i�i�iji-i.i�imiKii�i�ioi	i;i	i�i�idi@iai	iM	i1
iLi@i2i�iwi�itiQi
i/i�i i�i~i�i�i�i�i�
i/i�i�
i_	i#i�iOi�iOiGi�i�iki[iOioi�i�i-
i
i�ii�	i!i�i�iIi�i�i�i{iri�i.ihi�
iiT
iiii'iL
iai�i�
i@i�i�i�i�i�i�
iTi/
i�ii�i�ii�iMi�ii
ili�ii�
i{i8i#i�
i�i�i9i�iSiRi�	iwi�iZi�i0
iEigigi�i�i
i�iLi�i�ipi�i�iSi
i�i�i�i�i�	i@i�iI	iLi;
iOiqi�i�i)	ii:iFi�i5iJidiA
i�i
i)
iEiLiYi�i�i�i�
im	i�i�i�i�i�i�ici�iRi�i!i�i�i�i�
i�i(i�i�i]iIi�i�
i�	i�iei�ii�i�i�i�i�i`i�ii�i�i
i�i[i�iC
i(iPi,i�i}iO	i'iLi\
i�
i�ii�i�iiZi�i�isi'i�	iUi�i�i�i�iN
ii�i�i�
i�i�iMi�i�i�i�i�i�i�i�iii�igi'i�i�i	i�i
i�iPi0is	iii�ip	i�	inii�i�ii\i�
i�i�i�
i!ihi�i�imi(i&i
iCiiBi)i5	i�i�i�ii�i�i
i�i�i>i�i�i�i�ii�	i�i{iNi�iiiEi3iiJi#i�ici�i�
ii$
i�i5i�ixii]i�i�iki�i�i�i�i�iP
i�i
iiiri�iLi�izidi�i�i#i�
ii�i[iSiihiiGi�i�ii�i�
iUi+i�	iyi�iwi"i�iVi2
i&izi�	i�	i�iJ
iP	i�	i�i�i�i�i%	iZi$ioiTiKi1i�
i�i`iVi�ii�idi�i�i�i�i+i�i�iAi�i�i�i�i�i$i�i�	i_i3i\i�i�i�i�i�ibi�ifi�i�i�i�i�
iAinii�ixi�iFi�
iOi[i�i�i(i�ii
i#i7i2	ixiif	i�	i�
i!i6i{
i�i�iYi�ii�i+i�i�i�i�i i�i�i�i�	i	iKiei�i�i�
iTi$i�i�iihii	iRi�i�i"i�i�iZi 
i_i�i@i�iaii�ii3
i�
iki)iji�iiiei�i
iAi^i�i
iW	i�i�ihi:
iz
i)
i�i|i�i�ii�ii8iji�i�
ii�i3i�	i
izi�ipiyi�i�i2ioiD	i=i�i.i�i9iaifi�i*i_i�i	i*i�ii�
i�
i�i�i-ii�
i}i�i�
i�i�i*	i�
iti�iti6
iqi�i�i�i�i�i�i�iSi 	i�i�i!i)iiyi�
i�iiij	i�i�	i�iViIi�i�ig
iiiLi�i�i�ipiDi�i�i�i�i%i�i�iMi�i�i�i$i�i�i�iE	i"iU	i�ie
i	i|i�	iQii�i�i�ii�i�
i1
i�i�i�i�i$i i]i4i&i�i�izi�i�i`i�iwi�
iiii�
i)i%
i&i�i�i�i*i�i�i8i2i>
iSi
i�i�i1i#i�i�i
i�i#i	i�
i�i�ii�iF
iii,	i>i+i
ii�iZi3iqi�i�
i$i�i�
iVi�	i;i�i�iNi�imiKiWi�i�i�i5i�
i�	iRi4i�iIiiDi�i�i�i�
i�i�
i�i�i�ii%iKi|ii�i�
i�i�i�i�i9i�in	i�i�i�
i-i3i2
ipiii?
i�i~i�i�i�i�i�iCi�i[i�i�
i�i�i�i3	i>i�ili
i`ix	i�i�i�i�i#
i�i�i�i0i�i�i�i�	iL
i�i�iQi�iRi�i?i(imi�i`
i�i3ii�ii&
i�
iiisiDi�i0	ib	ifi@i�	i�i�i�
ii=i�i
i<i�i�i�i�
i�i6ii�isi�i�i�iSi�i�i�
i8iZ
i�i�i�i�i�i�i�ii�
i�i�
i�ii�iNi�	i�i
iLi�
iJ	i�i�i�	ibiigii�i[
i�i�ii�ii~i�i�	i�	i�i�ifi�i�iii�
ii`i4i=	i�i�i�ili?	i�ici�ii�iiii�i�i�i�i�i�i�i�iwi�i�i�i%ii�id	i^i+i�i�i�iZi�iFiI
i�iti�i�	i/i�	ii�iyi*
isi&i+ii�i)ii�i�	i�i�ii�
i�ie	i�i�iQi]	ii	i_i7	ii0iciui�i�iLiki
i�i�i�i�i#ii�ii�i�i�i�i?i�i�ii�
ini
i�i�i�i	i�i�i�	iHi�iYi�iu	i�i�
i�	i�iJi�i_i_i&i�i�ii�i�i�iZi%i�i�	isi�iSiiiiVi�i�i�i�i�i1i'i�i�iFi\i
i|i�	iWi�i�i|i�iSiWi�	i*i	iRiliPi#i�ii-iq
i�i�i	i�i�i4i�i�i�i�i�iai�i�ii�i@
i�iXiii%i�i�i8
i3i,i�i}i�i�i�idixi�	i�i#	i�i6i�
i�
i.ii�iAi�
i�ir
i�
i�iRidi�ii+
i�i�i�i�
i{i{iHi�	i
i�i�i�i�i�ici	i
i�i�i�i,i�iI
i�icii�i�i�i�i=i�iJi.i,i>iii�iLiei]i�i�
iCi�i�i�i*i;i
i�i i�ipi�
i�i�iRi�i9i�
i�
ii�
i�i�i?i:i�	i�i�iQi'isi�iwi[i�
i�i-i�
i)i�i�iMi�i�i�i�i]i}i6i@i
iiUi�i�i�i/i�i�is
i�	i�i�ik	i?i�i,
i=
i1iMi�i�i�i/iS
idi�i�io
i6	ikiui�i�i�iWi{iixiWi�i�ii�i�ixi^i�i�i[	i+i7i:i�iUi�i�i!i�i�i�
i.iHiTi�iYi�i�i	ii@i"iCisi	i�	iiG
ibi�i7i~i.
iUiiqi�	i�i�i�i{i�i�i�iYi/i�
i�i�iAi�
i�i*i:i8i'i�i�i�i�iiAi_i0i�i�i�iiii�iKi�
i�i�iti*i�i�i�
i�i�i�i�i�	i�
i�i�iDii�ii>i�i�ivii

i�
i'i�iVi�i�i�
i�i�ikiii\ii�i�i�i!ii�i*iU
i�i�i�i�iizi�i\if
i�i�i�	i
i�i�i�i�i�i�i�i�i�iiB	iii�i�i�i{ii=i�
i�i&i�
i�iVi�	i�i"i!i�
i�	i�i�i�
i(	i=i�i�
i�
i�i9ii�i4iai�i�i-iQ	i�i�
i�i�
imi�i�i�i�iCi�i�i7i}iqiDi4i�iuii�	i�i�ivii�iF	i�iuia
i�iHioi�
i
	iliKiA	i�i�i�	izi4i�	i!
iH
i�i�	i�i5iiji�i`i�i�
iBi:iOiai�i#i�i�i�idii�i(i�
i&
i�i^imig
iE
iio	i�i(iGi$i@i
iIii�iAiii`iXii7i�i/i�i$i�i�i�ihi�i�i�i�	iUi"iTii�i�i�imi�i�i!ii�i�ii�i i�iMi�	i�i�i�i�	i2iqi�i�i9i�i�i�i�i�ii�i/i�i�i�iipi@iX	i�ijiii
i^
ibi�
i�iniivii�i�ioioi�iivi�i�i0i�i9i�i$	i�ifiSizi
iiDi{i�iXi�ii�iVi3iYi
i�i�
iAi�i�i�i�i�iqiUi�
i:	ii2iji�iii{	i�i�	iFi�i�
i�	ii	i�i�i�iciiiR	i;ikihi�ii�
i�iYiOixi�iziZi<iv	ii�
i
i�
i�iIi�i�i4
iMi�i�i�i�ibi�ii�ii�i�i�iCi�i�
i�i�iOi�i8i�i�i�	i.i]iiVic
i�	i�i�i
iH	i�iTi�i�i�	i�i>
i
i�i�i3ii�i�i,i�i�ifi�i�iiliTiWiHi.i'i>ipi�i�i�i"i�i�	iJi�i�
i�
ivi2i�i�i	ixi	i2i�igi i4i�i�i�
i�
i�i�i{
iz	i�i�	i�
i�i�i�	i�i�ii�i�i?ii�i�i�	iJi�i�i�i�
i�	i8i�i�iEij
i\i�i8i8
ii ii�ii`i�i>ibiSii�i�i�i�ii�i0i�i�i�iEi�i�idi�i�i�i1i�i�i�ini@i�i�i�iTii�	i�i�iQi�iCi�i�iKi;iki�i�i�i�i�i_i\	ieiiwi�i�ii�iMi�i.	iriaii�i�
i�i�i�
i�i�i�igi�i�i'i�
i�iii�	iTii�i4ioi�i�	iXiyi�ixii�	i�
i
iU
i^i:i�i�i�i�ii"i#i�i�iii�	i�i�i�iNiUi�i�ipii"
i-i�i�	i�i�i:i�i
ii�	i�i�i�i�	i�i�iWi
iG
iLi�i�
iGiwioi�i�iiMiri�i�ii�iQ
i�iIiNi%i
iXiii�i7
i�
iai�i�ii�i�	i'
iiihi�i}iNiyi?iti�i�iDi�i�i�i�i�ili�i�i�i	ii�ieiJisi2i*iyi�i�i�i�i�ii�iqi�i�i5i}isi$i�i�i�i5
iBi�i�i�i#idisi}i�i~i�iib
i�iO
i/	i]i�i�i�	i]i2i�iifi7i�i�iOi

iRii#
i	i[i�iEi�iif
iS
i�	idiFi�i�i�iC	iV
i>i�i	i�iBi�ii	i1i6imi�ii	i�i�i�i�ip
i�ii�
i�i<izi�
i|
iXi�i�i�isiei]ii�i�i
i�
iiOi�i+i�	iii�i�i�i:i�	iAi�ii�i�i�i(
i�
imii4iPi�i	ini�i�
ioioi�i�imiiyiii8i	i�i<i�i�i<ic	iCi�i�i&iwi
i�	i$i 
i9i&i�i�i)i`i�i�ii�i�iGibiEi�i:iQioiFi�
i�i�i�	i�
iFi|i;i�
i�ii3i4i%i�i:i�	ici�ipi6
i\iCi�i0i9
i�i�i�i�i�i~	i�ii"ihi�i�i�i�	i)ii�	i�
i�i�i*
i�ii
i
i%i�i	i�i�ii�
i.i�i�i9i	i�i�i�
i�i�i	i�i"i!i�i,
i�ig	iJigiF
i�ii�i�
i�i;ii	iZiEi^iA
i�iili5i�i�i�i4i'
i�iiki	i�i�	i2i�i�
i�i	iXi7ii�i�
i{i�iBixi=iei(iii�i�i'i�i�ii�i�ii�iiii�iD
iiikii�i�i�i-i,i�
iei7
i�i�i�i�ii�i�ini}
ipi7iji�i�	i�i9i�i�
i�i�i�i�i0iPi�i�i�i�ii�iO
i�
i�i�	i�iUi
ii�i<
i�i�i�
iJi�itiNi�i)ii.i�i�i*iiAi�ir
i]i)i�ii�i�iGi�i_
ipik
i�i�i
	i%i
i�i�
i�i>ibi_i^i?ii:iYiDi%i�i�i�
i�ii�i�iiYi�i�
i�i�ii�i�il
iAi�i�	i�
i�	iDiBi�	i
i�i	i@
i(iv
i�i�i�igi�
i�	i}ivi�i�i�i�
i�ii�i�ii�i�ii�ii�i�i i-i~i�iyi%i�	i�
i_i�i�ii�i�iijiMi�i�iGi+i�	ii�i�i�	i�i�ii3
i;i
iGi)i�i
i�i�ii�i�ii�i
i
i�i,iIi�	i�i�iiXiAi\i�ii�iPivi�i�	iVii=i�
i�
i6i<i�iXii�
i	ii8i-	iY
i�i�i�i�i�i�i�ici�i�i�i9i�	i-
iui�i	i�i�
iRi�
iii6i�i�	i�ih	i}ii?
iw
ii�i�	iai(i�ii1i�i�
i�i>i�i�i�i�i�i]i�
iXiriPi0i,ii+iji�i`i�i�i�ii.iii
i�i&	iWiB
i�ii|i7iUi�i�	iiWi�iYi�i�
i�iw
i�
ii�ii�ii�i�iui�ibi�iq
i�i�ibi�i�i�i�i=i$
i�iNiJi�i�iUi�ii�i�	ii�iiiKi,i�i�i4iri{i�iiHi�ipi5ii�i=i�	i�iEi9i�i;ii<ii5i�
iiii�i\ii�iipi�ii�i�iri�iNi�ii^i�i�i�i�iKii�i*ii{i+
i�	i�i*i8ii�ii	ii�i�i�ij
ii@il	i6i�i2i8i�i�	i�ii�i'i�i�i�iB
i�iii\i�i�iSiV	ii~i�i�i�i�i�i�
i�iVi�
izi�i^i	i�i�i�i_
i}
iGiqi�iIi�i�i�i8itihiS	i�i}iRi�	i9i�iSin
iPi�iBiii�isi�iXi}ifi�i�ii�i�i�i�i�i�i�iniIi^i�iTi�ixi�iri�i�i_iibi�iOiPiQiRiSi�iTi<iV
i�iYi�i�
i�i�i�i1iUiLiVi4i�i�i�iUiEi�iMi3ifii�i�i�i�iFi�ii�i�iBiGii�i�i�i�ii�i�i�i�i�i�i�
i?i
i�iVi&iHiWiWiXi�ii�i@i�isi:i�iXiYiZi�iti�i.
iKi[i�i�iri�iYi�i�i�i'i�i(i4ii�i�i�i�ii�
i�i�i5i�i�i�i�i�	i�iZiBiIi	
i&i�ii�
i?i�i0ii[i�	i�iai�iY
i�iii�i\i�i�iLi@i�ii�iWii�ii�i}ii�iMi]i�i1i�i�i�iJi^i;iiKiti�i i�i�i�iuii�i�i_i�i`iTi�isi�i
iai�i�i�i�i�
iNi\ibiiAiciti�i�i�i�i�i�i�i�i�i�iaiUi
i�i�
i�iiri�iBiOi�i�i�i�izi�i�i�iDi�i�ii�i�idiCi�i�
i�i�i�ii�i�i�i�ii�iDi4
i�
i]i�i�iiji�i�i�i�ieiLi�i�i�i�ifi�i^igiuiCi~
ihi�i�ibi�i2i�i�i�iii�i�i(i�i�iNii�iMiXi�iZiji�ii�i�i5i_i�i�i�iui�i�i�ii�ii�i�i�i<i=iMii�
ikii�iei:i`iEivi�ili�i�iii`
i�i�i�i)iminiNiFi�i�i
i;i�ioi)i�iViaiici	iGi�i�ioi�i�isi�ipiOi�i�iiqiwi~iri�i�ibi�i*i�iiVi�iPii�i�i�iHici�ifi�i�i�i(i�iIisi�itiui�idiQieiWi�	i�i�i�i�i�i�i
iki�i+i�ii�i�iNiivi�i�i�iJi�
i�
i9i�ii�iRiSi�ifi�i�igi�ipi�iiiwiiiAiKi�ihiZ
i�iii�i�ibixi�i�
i�i�ii�ijiyi�i<i�i�i�i!i�i+is
i�i�i�i�i�ijilii�i�i,i�iRi�izi{i�iTiCiDici�
i�ii�
iki�i�i�imi:
i�	iDi�
i�i+iLi|ii-iEi�i�ii�i�itili�iMiNi�i�	i�i�i�ii�i�iUi�i�iOi�i}i*i~iiBi�iPi�i[iuiQii�i�ii�i�i�i	ii5iOiliRi�i=i�i�iVi5i�i�i�i�i�i�iSiiTi�iXi�iYi�i�i�imi�i�iPi�i�ini�i�i�i�iEi�iUi�i�iqi�iiviWiimioi�i�i�ii�ipigi"
i.i�i�i�iqi�i�ii&i�iPiri�iie
i�i�i�i�i�i�ii'i,isiti�i�idi�i�ii�i�i�iYi�i�i�i�i+i�i�iQi�i�i�i�iuii�
i�ii�iXi�iei�i�i3i�i�i�iFi�i
i�i�i�iri�i�i�i�i�i�
iui iVi�
i(i�iii�iYiwi�i�i�i�i�i�iZio
ini6i�i
ivi�i�i.ii�i�ii�ifi�i�i�i�i�ii�i�i�i�i�i�iJi=i�iwiixi�i�i�ii�ii�icii�i�ifi�i�iGi�i�ii�i�i�ii�iioiZi�i[ipii�i�
i�ii�i�iPi�ii[idi4i�i�i�i�i5i�i�i�i6i�ii�i�i�i7i�i�ii!ii�i�iHi8i�ii-i�i�i�i�i�i�igihi�i�i�i\i�i�i�i�iqi�i�i�i,i�ihi�i�i i]iii	ixi�iyi�ii[i�i�i	i
i�i�i	iWi�i�i�iN	ii6i�i�i)i|iRi�it	i�i�i>ii�i�iZi�ii�iji�ifi^i�i�i�i�i�i�i�i>i/i�i�i*i
ii
ii�i�i�ivi�i
i-i�iyiCi]i
iiEiDi�iXiki
ii�i�i<iZii�i�iFi�ii�i�ii�i
i�ii�
i�i�i�i�i�i�i�ii�
ii�izi�i�i�iYii!i{i�i�i�iiAiZi�i�iSi�ii�i�i%i_i�i�ii�i�i|i[i�i\i}i�i�iXiiIi�i�i�i0i�i�i?iRi�i1ii�i@i�i]i~iziki�iTiC
i2ii6i�i^i�i�i�i�
ii�iei�ii�i�i�iirixi�ii�i�i_i!i�ii�i`i`i	i�i�i�
i�i�iFi�
i�i�i�i�i�i�i�i�i�i�i�i[iii�i�i�i�i^ii�i�i�i�ii
ifi�i�ih
i_ik
i�i�i+i"i�i#ihi�i�i~i�i�ii�i�i�i�iJi$i�i�i�i%i�i�i&i'iQi�ii�i�i'i�i�i�ici�i\i�idi}i\i�i.i�i�iKi�
ii�i�
i�i�i�iii�i�it
i�i�ibi�iisi�i�ii�ini�ii�i�i�i�i�i�i�i�i�i�i"i�i�i�
iGiNiUi
i�i�iJ
i�ivi�i�
i�i#i]iVii�ii�i�
i�i�i�i�i�ii�i�ii/
iviji/i�i�i�i�i+ii�ii�i�ii�i3iiEi�i�
i�i�i�i�i�i�iiiai,i�i.i�i�i
iwii�
i\iAi�i�iBii�i�i(
i�ivi�i�iti/iii$iHii�iSii�i�i�ii�i�i)i�i�i�i�ii�i�i�
i�i�i#i�i�i�i�i�i�i�ibi�iii�i�ii�i�i]iOi�
i�i�iai�i%ii�i�i�i�i(i�i�
ii�i�i�i�ii�i�i�ii�i^i�i�iD
i�i�i�iu
ii�i�icidi�
i�i�iLii�i4i:ii�i�i�i�i�i�i�iii�i
i�iciW
iRi�i�i�i?i�i�i�ii iHi?ii�i=i�ii�ii�i�i�ii�i�i�
iVi�i�ii�i�i�ii�i�iii�i�ii/i)iiEibi�ixi�ili�i�i�iei�i�iWi�i�i�i*ici�iH
i9i�ii�i�i�ii
i�i�i�i�i�iyidi,imiiei�iii�iji�ii�ii�i`i�i+i�ifii�ii�i�i i�i�i�igi�ii�ini�i�i!i6iIi�ii�
i�
i�i:i"i�i�i�i�ifi�i�i�i�iai�i�iigi�i�iqi�
i�i�iNi�iCii0i�i�i0i�i-i�
i�i�i�
iiiM
i~ii$i�i�iai�i�i�i�i�iT
ihi�ib
i�i�i�i#ic
i
i�i&i�i"i�i�iii�i/i�i�iM
i�i�i:i-i$iFi�i�iui�i�iFiviiKii�i�i�i�i:ii�i%il
i�i�ii�i�i�i�ioi�i�i�iXii�i)i�i�i&i'i�ii{i�i�i�i�iiii�i�ipi�ii�iii,i�i�i�i�i5ii�i�iOiYi�iji�
i�ii�i�iki6i-iMi<ii	ii�i�i�i@i�ihi@i�ix
i�i(i�ii�iyi�i�i i�i�i�i�i�i�i"i.i�i/i0i.i�ii�ii�ili�im
i7i�i�igiNi�i�iOii1i�i�i
i)i�i�i�i�i�i�i�i!i iqi�i�i*iPi�i�i�i
iPi�i\i�iri�i�i�i�i�i�i�i�iQi�i�iwizi�iGi�i"i�i�i�iii�i
i�i�i�i�
iii�i�i�i+isiti�i%iziii�iE
iy
i#i�i�i�ijiiii�iJia
i�i�i�i�i�ikii.i$i`i�i�i%i�i�iDii�i�ii�i�iliiGi�i�iKi�i�iZi�i�i,i1i�ii6i�i�ii�imi�i�i�i&iii'i�isini�i�iEi�i�i�i(i[i�i/ii�i�i�i�ii�i�ilioi�i8ii�ii�i�i�i�i�iti�i>i�ipiiwi�iOiii�i7i�i�i�i)i�i�i-i�i.i i�i�
i
i�i�i�i	i�i�i�iWi�i�i2i�i�i!i/ikim
i�i�i�iqi3i�i*i+i
i0i�i�i�i�iqi�iSi�i&i�i�irixi�i�
i1i�
i�imi,i4iXi�isi�i�i�ii-i�i�ii"i�i;i�i�i�i*i\ii2i8iRiyi�i�i3i�i�ini�ii�i�i�i�i�i�i4i�i	i�i�iui�i�ii;i�i�
i�iei�ii�i�i5i�ini
i�iid
ii�iy
i.i�i�i�ii�i�ioi�i�i�i6i7ii�iiK
i;i�ii�iQi�i(i�
i�i�iiti�iii�i�i;iiFiHi/i�i�i�i�i�iiivii�iSi8iTi9ii�i�i�i�i�i/i]i:ii"iuii�i	i0i9i#i
ii�
i<iii
i�i;ii�ii�i�iiiUi$ii
i�i�ii<i1i�iQi%i[
ii�i=i[i�ii�i7ii�i�i>ii2i�i�iYi�i�i+iipi?ii�i:i�i�
i�i@i^i�i�iqi�iAii�i�iVi5iiii�i�
iLi2i�i3i�i
i�i�i�iri�ii	ii�i3i
i�i�i�i�i�i�i�i4iwi�i�i�i�i�ii4i6iBi�ii�i|iSii�i�iP
i&i�i
i�
ixivii�i�ii�i'ii�i?i0i�i�iiii�i�iCii5i
ii�iwii=i�i6iii7i�i
i>i0i�iiii iii!i8isiip
ii�i�i�i�i�ii�i(i�
iiii"ii#i�i)i�i�i$i�iiDi�i�i*i�i�i%i�i�i+i�i�i�iifiiEiixi�i�i�i�i�i�i_i�iki�i�iiFi�
i�ili7i`iMiGiyi&iiHi'i�i9ii�i:i;iAixi�i;iiIigii<iJi�i�i(i�i�iKi�i^iLiMi�i,i8ii�i�iiyizii5i<i�izi�i}ii_i)iNi?i=i�iai<iOi�i�i�i*i�i�iFiWi<ii�i>iii�i�i�iiPi�i�i�i+i�i{i�ii�
i�i i�i,i�i�i�i�iIi�i!iei"i-i	i�ii�iQi9i#iRi�i�i|i�iSi�i.imi�i$i/i�i�i�i�i�i
i%ii�iTi�ii�i�iUi�iVi�i�i,i?i�imi@i�ii6i-iWi�iXi.i&i`i:i/i0iAiHi1i0i\
i2izi7i�i�i}i�iBi@i�i�
i1i
ii�i�iCi'ibi3i�i(i�
iAi�i)i2i4i;iti~i3ii�iBi�iiNiui�iYi�i�i*iZi�iaii{iXi�i[i+ici�i i�i\i�i;
i,i-iTiUi�i�ivi�ii5i	i6i�iDi
i]i{i�i�i7i�i�
iyi�i�i8i�ibi.i�i�i9i:i|i<i/i~ii;ii�ihi�i0i�i1i2i�
i�i�i3i4i�imi<i^ii{i�i_i�i�i�iEiFi�i`i5i�i�iai�i�iZi|iYi�iiii	
iwi=ibiGi�i�i4i�i�
i�i�iIi�iii�iZi=i>i>i�ici�
ii�idi�i�ii�ixi5i�i�i?i6iHi�iIi@i1i_i
i�iJi�iAi7i�iKii�ieifigi�i=i
i�i0
iihi@iBii8i[i9iCini:iDiii�i�i�i;iji�i�iyi}i<iziEikili�i�i{i�ii=i>i�i�i|iLi�i2i?iJi�i�i�imi�ii|iMini}i}i@iiFi�i�i�i~iBi>i�i�idi-i�i�ioipii�i�i�iciGi�idi�i�iqi�i�i\ieiGiOiAiHiBi6i�i�
i=i�iiNi�iIiOi�i�i7i~iJiKi�iiCi~iriLi�i�i�iMioi8i?i�ii�iiNi�i�isii=i�i�iti�iCi�ii@iui�iK	i�i�i�i9i�i�iOiiPi�i�iQii�i�ii�i�i�i iriYi�ii�ivi�i?i�iRiwiSiTi�i`iUiDiVixi�iEiiPiWi�iXi�i!iYi�i�i�i$i�i\i�i1i�i�i�i�i�i�i"iQiZi�i�i7i�i�i�iAiyi�ii�i�i�id
i�i[i�i�iBizi�i�i\i
i�
ii�i�ii�iVi�i{i�ifi]i|i^i}i�i�iBi�i�ii�i:i_i�i�i;i�i�i�i`i<ipiiFiiPi�iaiibiGi�i-ici]iidi�i�i�igiHi�iIi�i�iei�i�iui�i�i�i�iqiJifi�igijiKi~ihi�i�i^i�ii#i�i�i�i�ii�iiiHiLi�i�iji�iRi�iSi�i�i�iMi�i�
i!iTii�i�i�ikiwi�i�i�ini�i�i�ili#i>i�i�iZ	i�iHi�ii#i�i�i�iNimii�i�i�i�i�ini�io(u!GB2312_TYPICAL_DISTRIBUTION_RATIOuGB2312_TABLE_SIZEuGB2312CharToFreqOrder(((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/gb2312freq.pyu<module>*sPpython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/jpcntx.cpython-33.pyc000064400000062640151733566760026514 0ustar00�
7�Re�Jc�@s,RddlmZdZdZdZdZdZdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddddddd	ddddddd	dddd	ddddddddddddddddddddddddddd	d	d	d	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	dd	ddddd	dddd	dd	dd	dddddddddddd	dddd	d	dd	d	d	dd	d	ddd	d	ddddddddddddddd	dddd	dddddd	ddd	dd	ddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddd	dddddddd	dddd	dddddddddd	dddddd	d	dd	d	ddd	dddddddddddddddd	dddd	dddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	dddd	dddddd	dddddddddddddd	ddddddddddddd	ddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd	dddddddddfSddddddddddd	dddddd	dddddd	dddddddddddd	ddddd	dd	d	ddd	dddddddddddddddddddd	ddddddd	d	dd	dddddd	dfSdd	dd	ddddddddddddddddddddddddddddddd	dddd	ddd	ddddddddddddddddddddddddddddddd	ddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	dddd	d	ddddddddddddddddddd	ddddddddddddd	ddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddd	dddd	dd	dd	dd	dddd	d	dddddddddddddddddddddddddd	ddd	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	d	dddddddddddddddddddddddddddddddddddd	d	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddd	ddddddddddddd	dddddddddddddddddddd	d	ddd	ddd	dddddddddddddddddddddddddddddd	d	dddddd	fSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	ddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddddddddddd	ddd	ddddddd	fSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	ddddddd	dddd	dddddddddddddddd	ddddddd	dddd	dddddddddddddddddddd	ddddddddd	ddddd	dddddddfSddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd	ddddddddddddddddfSddddddddddd	d	dddddddddddddddddddddddddddddddddd	ddddddddddd	dddddddddddddddddd	d	dddddddfSddddddddddddddddddddddddddddddddddddddd	dddd	ddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddd	ddddddddddddddddddddddddddddddddddddd	dddddddd	fSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddd	ddddddddddddd	dddd	ddddddddddddddddddddddd	dddddddddddddddddddddddddddddd	ddddddd	fSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	ddddddd	d	ddd	dddd	dddd	ddddddddd	d	ddddddd	dddddd	d	dddddddddddddddddd	d	dddddd	d	d	d	ddddddddfSddddddddddd	dddddd	dddd	dddddddddddddd	ddddd	ddddddddddddddddddddddddddddddddddddd	ddddddfSddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd	dddd	ddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	dd	dddddddddddddddddddddddddddddddddddddddddddfSdddd	ddddddd	dddddd	ddddddddddddddddddddd	dddddddd	dddddddddddddddd	dddd	dddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdd	dd	dddddd	ddd	dd	dddddddd	ddddddddddddddddddddddd	d	dddddddddddddddd	ddd	ddddddddd	ddddddddfSdd	dd	ddddddddd	dddddddddd	dd	ddddddddddddddddd	dddd	d	ddddddddddddddddddd	dddddddddddddddddfSdddd	dd	ddddd	d	d	dddddd	dddd	dd	dddddddddddddd	ddd	d	ddd	d	ddddddddddddddddddd	dddddddddddddddd	d	fSdddddd	ddddddddddddd	ddddddddddddddddddddddddddd	dddddddddddddddddddd	dddddddddddddddddfSdddd	ddddddd	d	ddd	dd	dd	dd	dd	dddddddd	dddd	dddddd	ddddd	dddddddddddddddddddd	ddddddd	d	d	dddddddd	fSdd	dddddddd	ddddddddddddd	dd	ddddddddddd	dddddd	ddddd	ddddddddddddddddddd	dddddd	dddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdd	dddd	ddddd	d	ddddddd	dddddddddddd	d	ddddddd	d	dd	d	dddd	dddddddddddddddd	ddd	dddddd	dddddddddd	dfSdd	dd	ddddddddddddddd	ddddddd	ddd	dddddddddddd	d	dddddddddddddddddddd	dddddddddddddddddddddfSddddddddddd	ddddddddddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddfSddddddddddddd	ddddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddd	d	ddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	dd	ddddddddddddddddd	dd	d	d	dddd	d	ddd	dddd	ddddddddddddddddddddddd	dddddddddddd	dd	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd	dddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	ddddd	ddd	ddddddddddddddddddddddddddddd	ddddddddfSdd	dddd	ddddddddddddddddd	dddddddddddd	ddddddd	dddd	dddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddddddd	ddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddd	dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	dd	ddddddddd	dddddddddddddddddddd	ddddddddddddddddddddddddddddddddddddddd	dddddddddfSdddd	ddddddd	dddddddddddd	ddd	ddddddddddddd	ddd	d	ddd	d	d	dddddddddddddddddddddddddddd	ddddddd	fSddddddddddddddddddddddd	dddddddddddddddd	d	ddd	ddd	dddddddddddddddd	dddd	dddddddddddddddddfSdddd	ddddddd	d	ddddddd	dddddddddddd	d	ddddddd	d	dd	d	ddd	d	dddddddddd	ddddddddd	dddddd	dddddddddddfSddddddddddd	d	ddddddddddddddddddd	ddddddd	d	dd	d	d	ddd	d	d	dddddddddddddd	ddddddddddd	dd	ddddddd	dfSdddddd	dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddd	dddddddddddddddd	ddddddddddddddd	dddddddddddddddddddddddddddddddddd	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddd	dd	ddddddddddddddddddddddddddddddddddddddddd	dddddddddddddddddfSddddddddddd	d	dddddddddddddddddddd	ddddddd	d	d	d	dddd	d	ddddddddddddddddddddddddddddddddddddfSfSZGd
d�d�ZGdd
�d
e�Z	Gdd�de�Z
dS(i(uwrap_ordiidi�iiiiicBs\|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S(uJapaneseContextAnalysiscCs|j�dS(N(ureset(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyu__init__|su JapaneseContextAnalysis.__init__cCs8d|_dgt|_d|_d|_d|_dS(Niii����F(u
_mTotalReluNUM_OF_CATEGORYu_mRelSampleu_mNeedToSkipCharNumu_mLastCharOrderuFalseu_mDone(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyuresets
			uJapaneseContextAnalysis.resetcCs�|jr
dS|j}x�||kr�|j|||d��\}}||7}||krw|||_d|_q|dkr�|jdkr�|jd7_|jtkr�d|_Pn|jt|j|d7<n||_qWdS(Niii����i����i����T(	u_mDoneu_mNeedToSkipCharNumu	get_orderu_mLastCharOrderu
_mTotalReluMAX_REL_THRESHOLDuTrueu_mRelSampleujp2CharContext(uselfuaBufuaLenuiuorderucharLen((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyufeed�s 			#

	uJapaneseContextAnalysis.feedcCs
|jtkS(N(u
_mTotalReluENOUGH_REL_THRESHOLD(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyugot_enough_data�su'JapaneseContextAnalysis.got_enough_datacCs0|jtkr(|j|jd|jStSdS(Ni(u
_mTotalReluMINIMUM_DATA_THRESHOLDu_mRelSampleu	DONT_KNOW(uself((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyuget_confidence�su&JapaneseContextAnalysis.get_confidencecCsdS(Nii����(i����i((uselfuaBuf((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyu	get_order�su!JapaneseContextAnalysis.get_orderN(	u__name__u
__module__u__qualname__u__init__uresetufeedugot_enough_datauget_confidenceu	get_order(u
__locals__((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyuJapaneseContextAnalysis{suJapaneseContextAnalysiscBs |EeZdZdd�ZdS(uSJISContextAnalysiscCs�|s
dSt|d�}d|ko1dknsRd|koMdknr[d}nd}t|�dkr�t|d�}|dkr�d|ko�d	knr�|d|fSnd|fS(
Niii�i�i�i�ii�i�i����(i����ii����(uwrap_ordulen(uselfuaBufu
first_charucharLenusecond_char((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyu	get_order�s8	(uSJISContextAnalysis.get_orderN(u__name__u
__module__u__qualname__u	get_order(u
__locals__((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyuSJISContextAnalysis�suSJISContextAnalysiscBs |EeZdZdd�ZdS(uEUCJPContextAnalysiscCs�|s
dSt|d�}|dksBd|ko=dknrKd}n|dkr`d}nd}t|�dkr�t|d�}|d	kr�d|ko�d
knr�|d|fSnd
|fS(Niii�i�i�ii�ii�i�i����(i����ii����(uwrap_ordulen(uselfuaBufu
first_charucharLenusecond_char((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyu	get_order�s(		(uEUCJPContextAnalysis.get_orderN(u__name__u
__module__u__qualname__u	get_order(u
__locals__((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyuEUCJPContextAnalysis�suEUCJPContextAnalysisN(ucompatuwrap_orduNUM_OF_CATEGORYu	DONT_KNOWuENOUGH_REL_THRESHOLDuMAX_REL_THRESHOLDuMINIMUM_DATA_THRESHOLDujp2CharContextuJapaneseContextAnalysisuSJISContextAnalysisuEUCJPContextAnalysis(((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jpcntx.pyu<module>s������������������������������������������������������������������������������������8python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/euctwprober.cpython-33.pyc000064400000002776151733566760027553 0ustar00�
7�Re�c@sZddlmZddlmZddlmZddlmZGdd�de�ZdS(i(uMultiByteCharSetProber(uCodingStateMachine(uEUCTWDistributionAnalysis(uEUCTWSMModelcBs,|EeZdZdd�Zdd�ZdS(uEUCTWProbercCs6tj|�tt�|_t�|_|j�dS(N(uMultiByteCharSetProberu__init__uCodingStateMachineuEUCTWSMModelu
_mCodingSMuEUCTWDistributionAnalysisu_mDistributionAnalyzerureset(uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euctwprober.pyu__init__"s
uEUCTWProber.__init__cCsdS(NuEUC-TW((uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euctwprober.pyuget_charset_name(suEUCTWProber.get_charset_nameN(u__name__u
__module__u__qualname__u__init__uget_charset_name(u
__locals__((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euctwprober.pyuEUCTWProber!suEUCTWProberN(	umbcharsetproberuMultiByteCharSetProberucodingstatemachineuCodingStateMachineuchardistributionuEUCTWDistributionAnalysisumbcssmuEUCTWSMModeluEUCTWProber(((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euctwprober.pyu<module>spython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/euctwfreq.cpython-33.pyc000064400000167414151733566760027220 0ustar00�
7�Re8�c�@sdZdZd�Zd�S(�g�?i�iii�i�i�i�i	iRii�i�i�ii�i�
ini�i!i�iiLi,iAiisi�i�i�iiiL
iS
i�ii�i�i�i�i.iNiii�ii�i:i�i�i�i?i�i�i=iNiKi�i�i�il	i�i�i�
i�i�i�
i ii
ii�ii�
ioi$i�iii�i�ici8i�i�ii�i�i�i�i�izi|i�iti"i�
iei@i\i�i�	i�i�i�i�i�i�iFi�iM
iQiHi�i�iPivi�ifi�ii�iDiT
i�i�iFiN
i�iEi�iOi�i/i�isi�i3i<i2i�i�i&iLi�i�iO
i�i�iGi�iiMi�i�i?iii`iiF	i*i�igi�	iZi�
i:i�ii�iKi�	ii�	i�ii�i�i�i`i�ii�igii	i iqi�i~i�i�iP
i�	ii�i�i�i!i�iuii�i*ii�i	i�
i�i~i�i�i�i�iei�iGi^i�i�i�i�iUiCi�iBi�i�i�i�ii�i ijioi/ii�iOi2	i[i�i�i�
i&i�i�i�i�iSi(i�i�i�ipi]i�i6iii�
i'iii�iii8ii+i%i[i�i�i\i�i�i�ii�iX	i(i�i�i�i0i�i iHi�
i�
i"i!i�i+i�i1i"i�i�i�
iOiG	i�iifi1i�i�i�i�i�i�ii2i9i�ili,i�i	ii�ii�i�i}ihi#iq
iQiMi&i�iXi�i�i#i�i�i
i�i�i�iji�i�iMi�i�i�i%ii�i�i$i�i�i'i�	i�iNiiii7i�iJi�i!i�i�ii�i�iMi�i)iPiU
i�ii�i�
i�i%i�
i�
i�i i�i�
i iIi�i3	i�i�
iir
ii�i�i�i�i�imi�i�i$i�i�ixi�i�i�i�i�
i�i�i�i%i&i�i
ii�i�i�ii�i�i&i�i'i�ii'i�i�i.i�i�ii�iH	i�i�i�i�i$i#i�iDi&iAi�	i�i�i�i�i�iUiGii�i�i
iQ
iPiSi'i�i�idi�i0iFi�i�i*i�i�ii�ii�iJii�iUii�i�iI	iR
i�i�i<i�iS
i:i7
i�
i�i	i	i9i�i}ii�	i�i�iViPiT
ii)iCii�i�i&i�
i�	i)i�i�im	i�i�i�i�i�ii4	i�i�i�in	i*ii�i�ii�i�iOi�i�i�i�i�	i+i(i
i�i�i�iU
i(i�i5iYiji�
ili�iuii)i�
i*i+iV
i
i=i�i�i�i�i�i�i�i4i�i!i�i�iTi,ixi�i�ieii�	i�iJ	iPi�is
i5iAiV
i/iki�i�
iili!i	i�iAi�i`i�i�
i�i�iAi�i�
iii�i�
i�i�	i�i�i�i�i�i�iMi�
i�i�i�ii�iW
i�i�i�
it
i�i�i+i}i�iji8
i�i�i�i�i�i�i�i�i-i)imi�	i�iW
i�i		i�i�
i�iai�i
iPiK	i�i,i�i�i�i7i'iu
i�i{iki�i�ii�i�
i9
i�iii�i�i�i�i�i�i�i1i�ibii�	i�
i�i�io	i�iX
i,iQi�i�i�i�i�ii�
i�
iX
i�i�i�i5iDi�i�ili�i�i[i 
i�i�iY
i�i%ii.iY	i�i*i�i�i�
i�iRi�i�i�ipi�i�inicigi+ii�i'i2i�ii�i{i�ili�imi�i�i:
i�ifi
	i�i|i5	i�i�ii�iZ
i�i�
i�i�i�i�i,i�i�i�i�i;i�iIiYi�i�i[
iXi"i�i	i�i�i�i~i�i�i,i�iki�i�i-i�i�ii�i�iDi�i�i�i>i]i�i,i�i�i�iviLiBiii&i�i�i�
i�i�i�iGi�i�iiBi�i�
i!
i�i�iui�i�i�i�i�	i iaii�i�iv
iSi�i}i;
i�iDi�i=i�i0ii�i\
i(i�ii�ivi i�i�i�i�i�i.i�i�i9iHii�i�i�i]
iEi�i�i�i�i�i!i�i/i�i�i�ii-ii�iQi*i�i.i/i�i�i�ii0i3ii"
i�i*iRii�i�iWi�i�i/iibi.i�i�	ii�i�i�i�i�iRiii�i)i�i2i�i�	i�i�i�i�i�i�iZ	i�iTiiw
i�i�i�i�	i�i�i�ii�i�i[	iOi�i�	i�i`i7ix
i^
i�i�i�i�i�i�i\	i�i�i�i�i�i�igi�i�ini�i
i_i�i~i�i�i�i0i�i�
iai�iy
i]	i�i�i�i�i�ii�i�	i;i�i�	i-i�i�iL	i�i�i�i/ii�i�i�i`i�i#i"i�ii�ii0i�
isii�i�idisi�
i�iY
i�iikiwioi�i�i�i�i�i1ii2i�igipiQi�iUi�ivi�i�i�iiCiSi�i^	i�i�i5i�i�iBi�i_i�ibiNi�i�iXi�i�i�i�
i�iLici�
i�
i	iKiwi*iaiGi3i�i
i�i�ii1i6i�	i2i6	iNi�i�ii	i3i�i:i�i\iqi�i�ii-i�iii3i�
i�i�i�ixi�
i�i�iri�i4i�
i_
i�iUi�i�i�i@i�i5i�ii�i�ii�i/i+i6ii�ii�i�i�i�i�
i7	iZ
ii�i�i8i4iiCi�ii�i�ili�i`
i�i�i�i�i�iYi�i�i�i�i5i�	i{i�ii�i�i$i7iiMiVi0iri�i�i�igiiVi�i8i�i9i,iZi�i�i{i#iWi0iii$i�i�
i�
i�i4ii[i�ivi�iici�iViM	i$i-ii�iiXiii�idi�i�iWi[
ii�i�iiiqi�
ii1i�ii�iiti�ii�i	iii�
i2i�i2i:i3i i.i�i�i2i�i
i�i�ii�i�i%ii�i�iii
i�ii�iii�i
i�
i6i�i4i�i|ii�iSiii�i_	i�
ii�i�i�i`iii�i�i�	i3iii;iriiii7iYiLi;i�i�	i�	iiii�iTi\i�i�ii<i�iVi5i�ii�
i�i�i�ii"ixi%ii;i8	i i�ii2iEi=i!i�ii�i^iiwi�
i"i�i�iisi�i#i<iQii�iri$ii]ii%i�i.i&ii3i5iBi�iyi'i�i�i�ii�ii>iYia
ib
i(i�
i	i)i*i	iiii�i:i�i6i�i^iii�ii(i�
i+i+iiixi,i	i.ihi/i-iii�i
iVii�iihi�izi.ii�i�i�i<i�i�i;i/i?i�ii
i�	i0i8i�ii�i5i6i�
i_i)i1i2i	i3iyi	ii�i�
ii^i4i�i�i?i$i+i\
i�i5i_iWi�iiz
i6i0ii�
i]
i	i�ip	i7i�i�i8i^
i<
i�iVi9i�i6i�iIiwi}ic
i^ii
i9i@i�i
iAii�i�i�	i:iei1iiiBi�i�i�i�ii�i�ii�i7i;i<i�i=i{
i�i(i`iRi1iYiiIi�	i�ii�i6i�id
i>i�i�ie
i?i�ioi�iqiYinii�iliiCiDi{i�i�
i_
iEiPiUi�i�i�i�ii�iEimi�i@i�i:i�
ii
iAii�i�i�ii#
i�	iNi�
i�iBi�iCiWiTiTii�i
i�if
i;iDii&i�
i|i�i�i�ii�i�
i�i�i<i=
i�
i�ii	iVi�i�
iioi�i�	iEi�
iFiii�i�i�i�i�iiiDi-i8i�iGidi�	ii�
iHiti�iiIizi
iiJi�
i�
iKii�i|
i�ii�i�i>
i�i�i�i�iiiLi:i�	i=i�iMii?
i�i�iiHi�i�ii�iNii�i�	iOiPiiFikiQi9i�i�i�i�
i�	iuiivii�ii�iiRiSi�i�i}i
i>i�i�i�ii
i:iTi	i�iN	i�iCi�ii�iUi~i�i iWi�iGi�i�i�i,iiii�iOi�i|ii�i�iOi?iVi`	i�i i�i~iiwi�ii�i@i!i�i�i;iii�iiWi�i"i�
iXi�iYiiRig
iuii�
ih
i�
ixi=i
iiZi�i<i�ii[i�i#ii=i 	i\i$ii]iHiIi^i7iO	i$
i
i_i%iviJi�i i!iwitii`iaibi9	i&i�i"i{i�i�i�	i'ici�idi8i�ii�i�i[i9i�i�idiZi�	iei�i�i�i@
i!i(i"ifi�i�ii�i#i$iTigiKii�i%i�iWiMihii�iii�i�i�i%i�i�i�i�i�i
i`
i�iyi7imiLijiki�i:	i>i!i�i�i�iiBi)ili|ii�i
izi�i�ii
i�iMi�i�i�
i�i�imi�iniuiq	ivi�i�
i
i*iNioipi�iiqi7i.iri�iyi�
iii�
i�ifi�i�i�isi!	iyi�
iOi	i�i�i�i+iPij
i�
i>i�i�i�i�iiYi�iAiti�iui%
i
i�ivi�i�izi2iwi,i�	i�	i�i�i3iQi�i�i
ixi�i6i9ik
i�ii&i6i�i�i-i
i�iRiyi�iQi9ici�
i'i.i
ioi(iBiFi?il
i�i)iei�i�
izi�
iSiTi�i�i�i{i/i�i�i"	i�	ibi/i�i`i�i�i0iui�ivi�i�i1i�i�
i�	i�iUi�i*i�i/iEi�iSi�i8iZi|i}iFi+ii�i!i~i2i,iFiP	i�im
ii
i�ieisi�iCi�ir	ii�i�ii�iai3iZi%i-i�i�i�i�	i4i�i�i�iAi�i�i�
i�
iii
i�i�i�iDi.i�ii�i�	ini�ii�i�i�
i�i�i	i�i3i5iJi0i�is	i�
i�i�i�i@i�i�iVi�i/i�	i�i6iWiAi7ioi�
i�iPi0i�i1i�in
i�i�iaiQi2i�ipi:ii�iPi�ibi�i�i�i�ii{i3i7iEi�i�i�	i�i�i|iFiGiXi�i�i�i�i�i]i�
i4i�i�i}
i�i�i�
i5i�i&i�i8i	
i�i�i�	i�i�i�i�i�iLi�i�i�i�i�
i�	iYi

i�ii�i�i4i
iBi9i8i�i�i�i�i�	iHi�
i/i3iZi[i�i�
io
i�i�i:i0i�ini\i�i]i�i^i�i�i�i�	i�i�i�iIi�i�i�i;i�i4i�i<i�i=i;i�	ii
i�i�iXi�	i�ii�i5i_i�i�
i�
i�i�i�i�i}i0i>ip
iJi�i�iKii�i�i&
iFi�i�i�i�
i�
i#i�i[i�i�i�ifii>iq
i�i?ir
i�i6i�i�i�ii�
i�i�i�i�iji�i�ii�i@i-ipi9i;	i6iyiAi�i�ii�	i'
i�i�ii�i�ii�iVi�i�i`i�i4i�i�i�iKi
iai�
i6i�i�i�i�ii�i"i�i�iKi�i

ii�i�i�	iYiGioi�ibifici7iis
ipiri�	i8i�i�i�i�i�iiA
iQ	i�
iCi,i
i�i�i�ii�i\iLi�iuii~
i�
i�i�i9i�i�iBi�iZi�i�i
iCi�i�iijidi�i0ihigi�iei�iMi}i7i�
i�i
i�iDi�	i�i�i�i�ifi:i�iiNi;i�
iEiFi�i(
i�i�i<i�i�iGiMi=iwigi�i~it	i?i�i�i�i
itimi#	i�	i�i+i�i�ihi�i�i�i�ii[i�
iOi�	i�i�i�i
i�iB
i�i�i$	it
ii�
i�iia	i�i�	i�iHii�i�i�iQi"i<	i
i�i�i-i1i�i#iu
i'i�iDi�ii�i
i�
iIi�i>iJi%	i�i�iPii
iii�i�
i=ia
i�iKi�iv
i�i�i�i�i�
i�i�i�i_i�iji�i?iEi1i�
i�
i�iki�i8iQi�i�ili�i�i
i�imi@i
i�ibi�i�i�iiRi�i�i�i5i�i�i�i�iLi	iw
iini�i�i�i4iHii�iMi�i�i�i�ii�i�ii\i�ioi�iNi]i�ii�
i�i\ix
igi�iEi
i�i�i�i�i�i�ipi�i�
i�iqi
i�i�i�i�i�iOi�i�i�iri�iZi�isiti�i�ii�iPiei�i�i�i�i�ioi�i�i^ii}i�i�i�iziAi&	i�i�i�i�
i�i�ini-i�i�
iQiiii
i�i�i�iRi�iui�	i�i�iiBi�i�i�
iy
i�i�iviwiBihiqi�i�i�i<i�i*iiiSi"iTiCi>i)i
ixiUi�i�i�i~i�i�i�izi�iVi�i�i�i�iC
i)iqi�i�iWi
	i�i�i�iDi�iEiTiFipi�i�i#i#iyi�i�
i�i�iGi�iz
i�ii�i�i�	i�i�i�iSi�iXi
i�i�i�i�iu	i
i=iHi�i�i_i�iRiii�i�i�iwi�i�iYizi{iqi�ii3i�i5i�i
i�i{
i�i�i|i}iSi~i�i
i
i�iZi[i�iii�i�i`i�iFi�i]ii�ini�i�iIi�i
ii�i�i�i�i�iGiTiJi�iKiziSiri\i)
ii
iv	i�i5i�i�ii�
ib	i�i�iji�i�i�i�i�
i�i�i]i^i�i�i�ici�i�i�ii�
i�i�
iai:i1i�i�i�i�iAihiiai�
i6i�i�i�iib
i-i�i
iHi_ii�	i�i
i�i�i�ii�i�i�i|
i�i*
ifi�i	i�ii�
iD
ii
iLiWi�iiiUii�
ii�i$i�i
i
i�iNiiiR	iki�iE
i�i�iiiMi�iS	i'	ii`i�isi�iF
ii�iai}
i�i�
i(	ijii	i~
iViBi[ibiWi�i�ibi
iIi�ic
ii
i�i{i�i�i�	i�i�	ici�
i�	iidi
i�
i]i�i�i�i=	ieii�iii�i�
i�i�i
iNi	i�i�ifigi�
i�
i�
i�ihiiiii�
i=i�iXii�ii�i�i�i�i�id
i�iHiCi�
iii�iTiWi�
i
i�i9i�i�	iNi�iKiEiji4iJi�
iYi
i�iG
i	ikii�ihiOii�
i�
ii]iPiZi�ili�iQi[iki�iminiRioic	i�ii�i�i�iSiXiiii\i+i�i�i�i�iIiTiUiUi�ii
i�ili�
iDiiiipiiqi
iki�	imi�i�
iKii�iii�i�iVi8i�
i i�iri@iWiri�
iCiGi�i�i�i
i�i^i�
i�i�i8itii:i�i
i!i�inisi�i"i�
i#i$i]iti�	i%i�
i&iriui'i+
i(i)i�ie
i
i}i
i�i�i�i*i4i1i+i�i�i�i�i�ii�i,ii�
i>	iXitiri?	i�i�
i-i�iviui{i�iw	iwi�i.ixiT	i,
iii�i/i0i�i�i�i1i�
i�i2i�
iGiRi
i�i^i�iYi
iZi�i
i[i3i^i�i�i�i�i�i
i)	i\i�	i4i@ivi�i5i�i6i7i�id	i]i�
i�i^i8i�i&i�	ii�ii9iyiuiii�
i�iziRi�i{i�i�i�i(i_i�i<i9i�ili�i�i�i_i 
iSi`iki�i[i�	i�i�i�
ixi:i�i;i<i!
i$i=i�i|ii�i>idi�
ii?ieii�i�i�ii�i�i�ii�
i}i@iAiBi�i.i~iaiOi
i�i�i`ibi�i�
i%ii�i�i�
i;i�
i�ii�iCiiDi�i�ii�if
i"
iLi�
i�i�i�i�
iEi;i�iFi&iGi�
i
i�ix	iHi)i�i�ici�iIidiTi�i�
i�
iei�i�i�ii	i�iJiigi~i�iUi�ie	i	iii�ifiai8igi�
i�	ibihiKiy	i�i�i�iLii:i�
i�iii�i*iMiii�i�iciti�iMiNi�i�i�i�i	i�i
i�i�if	i�i�iYidiei�i*ii�iOiH
i�i#
i�i#i;i�
i�	i�i�i�iI
i\i@	i�i�i�isi$
i�
iPiQi�
i�	i�
iRijiSiTi�i+i�iUi�iVi�i�iLi�
i!i�iJ
i\i4iWi�iiXiYiZi�i[i>iwikifi�i�i+i�ii%
i�i�i$i�i\i�i�iili�
i]i�ili^i_ig
i%i�i`iaigiii�i�
i�iNiK
ibicidi�i�
iciwi�
iei�ibiyi�ifihigihihi�i'iiiimi�iz	ijidiii�ii	i<i�i�i|i�i�i�i�i�i�i�iiOiki�
ilii�i�
iai�i�imi�i�i�ini�
i�iui�ini�i�i�iei&
i�
ioi�i�ii�	i<i�ipiqiPiQi�iji�	i�i	i�i�i(i�i_irisi�i�i�ii<iEiRifi�i�i�i�i]i�i�iIiti=i�iui�ivi�i�
i�ioi�
i�
iki,iliwi'
i�i�	imi�i�i�iFi`i�i�ifi�i�i�
iSiJixi�iyizini�iL
i�ipiOi�ii�i�
i{i�
i�i�iA	iyi�i�iU	i�i|i}i~iFi�iqi�i�
i�	i�i�ii�iii�i�iipi�i�iB	i�ioi	i�i�i�ipii-
i�iri�i�iqiqi�i(
i�iri�i�i�isi�i�i�i�
i�i�i�
i(i.
isi)
i�itii�	ii*
i�iui�i�iTiviM
i{	i�i�iti�i'i�i�i�i�
i�i�i�i�i�i�i�igiZiwi�
i�	ici�iji+
ipi�i�i�ixi�i�i�ihi�i�i�i�
i�i�i�i�i,
i=ii�i�	iiui�i�ii�i/
iyi�i
i�	iyivi�	i�i�iwi�i�i�i�i�i�i�i�
izi�i�ii�i>i�iCi'i�i�i�i{iiZi�i�i�i�i�i�i�i�iaii�i�	i�iqi?i�i
i�i|i�i�	i"i�i�
i�ii}i�i�i�i�i=iiAi�i1i�i)i�i�i�i?i�
i�
i�ii�ixi	i�i	ii�	i�
i�i�ihi�iSi�i�i�i(i�i�
i�i�i'ixiyi�i�
i�i�i
i�
i�i�i�i�i_i	i�i�i>i�i}iPi�i�i�i�i�ii~i�i
iN
iici�i
i�i�i�iHi�i	iii�i�i�i�i�i�ii�i�i�i�i�iji�i�i�	i*	i�i�i�i�
i�ii�iih
i�i�i_i�i�i/i�i<i�i~i7ikiTi�ii]iiUibi�
iti�i�ig	i�izi�i�
i�i|	ii�i�i�i�i�i�i�i{i�i�i�	ii0
i�i�
i�i+	i�i,	i�i�i�iIi�i�i�i�i�ii�iiBi�i�i4isi�
i�i�i�i�i�i�
i�i�i?iCi�i�i	i�iGi�i�i�i�i�i�i�i�i�i�i�i�i�ii�i|i1
i�iimiC	i�i�ili�i�ii
i}	i�i?i�i�ii�i�i�ih	i�i�iIi�i�i�iVii�i�i�i�i�i�i^i�i�i�i�i-	i.	i�ii)i�i�i�
i�i�i�i2
i�iiii�i�
i�i�i�iAi�i�i�i-
i�i�i�i�i�i�
i�i
i�i�	i�i�i�i�i�i�
i�i�
i�i�i�
i�i�iQi�i�
iO
i�i�i�i�ii�i�iziKi�i�i�i[i�iJi�i�i@i�i.
i�i�i�i�iD	ii}i/
i@i�i�
i�i�i�
i�i@iiRi�i�i�	ij
i~i�i�iJi�i�i�
i�i�i�i�i�
i0
i�imi�i�iimi~	i�i	i�ii1
i�i�i�	i�i�ii�i�i�
idi�i�i�iXi�i�i9i�i�ii�i�iUi�i�i�i�i�iLi�i3
i�ii�i�
i	i�i�i�i�	i�i�i�i�
i�ii$i(ivi�i�i&i�ibi�i�i�i�i�i�i�ii�i�i�i{i�i�i�i�i�i�i�i�i�i�i2
i�i�	i�i�i�i�	ii�i�
i�i�i�i�i�i�i�i^i�i�iV	i�	i�i�i�i�i�i�i�i�i�i�i�i�ii2iW	i�i
iWioii	iik
iXi�i�i�	iAi4
i�i�
i�i3
i�i�i�	i�i�i�i�i�
i�i�i�
i�i�i�i�i�i�i�i	i�iHi�i�i�i�i�iiiii�iDii�iIisi
i�i�i�
i�i i�i�i�i�iwi�i{iii�ii�i�i/	ini,iiii�i	i�	i�i�i
i�iiii
ii4
iBi�ii�iP
i5
i�
i�i�
i�	i�i�
i�i	i�ii|i�iziii�i�i
i'i�i5
i�ii�i!i�i�iyi�i�iVii�i�i�	i�i�i�ii�i�i�i�i�ii�	i�
iii-ii�i�i�ii�
ii�
i�	i�i�iii�
i�i"i%ii�i�iJiCii�ixi�i�iii�i	iil
i6
i�i�iii�
ii�
i�iiXi�ii�i7
ii�	i�
iNiim
iii�i iWii�i!i�	ii
i�
i>i8
i�i"i#i9
ij	iDi�i�ii$i	
i%ii�
i�i�iXi&ii'iEi�i(iFii)i�ixi�	ikii�ii�i*i+i�i�i�iDi�i�i,i�i�ii�i�iiKi-i.i/i:
i�i0iJi�ii1i|i�i�i�i�i�i�i�iEi*i2i�
i�ii�ii�iHixii�ii3i�i�i�i�i3ii�i�i;
ipi�i<
ii�ii�i�i4i5i	i�	i6i�iOi�i
i7i8i�i9i�i:i�i�i;i�i�i�i�i<i�
iiYi=i>i
i	i?i�i@iAiBi�
i�i�i=
i�	i�i�ioi�	ifi�ii�i�
i�
i�	i�	iCiiDi�i#i�i�
i>
i�iEi�i�iFiZiE	i�i�i�	i[i$i�
i�iGi?
ii�	i�i�iGi�i�i�i@
iHi�iA
i\iLi�i�i�i�i�
iIi	iii�ii�iiiJi�	i�i�
i	iKiLi]iMiNi
i�iji�iQ
i�
iB
iOiPi�i�iQi�
i�i�iRi�
iSiTi�i(i�ii�iC
i�iUiiVi�iWiXi�i�iYi�i�i�iZi�i�idi[iciHi�i_i�i#i0	i\ii]i�ini

i�	i�i�ii^ii�i_ik	iD
i�i`iai�i�ibi�i�i�	ici�i�i�i�idi�ii�	i�iiidi^iE
ieiii�i�
ii�i�ifi�i_i7iii�i i�
i�iF
iiigi-i�ii!ii�ihi�	iqi;i�i�i�i�iXi�i i	i�i�iiiji�i�i�i
ikili�i�i~imiG
i`iniyipi�i�ioi>i�ipi�iqi
i�i�iri�iai�i�i�isiti"iui|i�i?ii�iivi�i�i�i�i�iei�i�iwixiyi�i�i�i�izi{i@i|i�i�	i}i�i�	i�i�i%isiiR
i�i.i�iMi?i�
i�i~ii�ibii�i@i�i�i�ii�i�i�i�i�i�i�i�i�i�i�
i�i6
iIi�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i2ii�i�imi�i@i�i�i�i�	i�i�iNii�i�ifiii�iZi�
i�i�i�i�i�i�i\iH
i�idi�i�iJi�i�	i�i�	i�
i�i�i�i�i�iKi�i�i�i#i�i�i�i�i�i�	i�i�i�iKi�i�i�i�igi�i�i�ihi�i>i�i.i�i�i�i�i�i�i�ii)in
itiii�i�
io
i�
iI
i�i�
i�iiqi�i�iri�i�i�i�i�i�ip
i�i�	i�i�iziii�iUi�iJ
i�i�i1	iK
iti�i�i�i�i�i�i�
i�i�iJi�iiLi�	i�i�i�i�i�i�i�	iMi�i�i�ii�	i�i�i�iei�i�	i�ii�i�	i�i�i�i�i�i�i�iri�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i i i i i i i i i i	 i
 i i i
 i i i i i i i i i i i i i i i i i i i  i! i" i# i$ i% i& i' i( i) i* i+ i, i- i. i/ i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i: i; i< i= i> i? i@ iA iB iC iD iE iF iG iH iI iJ iK iL iM iN iO iP iQ iR iS iT iU iV iW iX iY iZ i[ i\ i] i^ i_ i` ia ib ic id ie if ig ih ii ij ik il im in io ip iq ir is it iu iv iw ix iy iz i{ i| i} i~ i i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i!i!i!i!i!i!i!i!i!i	!i
!i!i!i
!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i !i!!i"!i#!i$!i%!i&!i'!i(!i)!i*!i+!i,!i-!i.!i/!i0!i1!i2!i3!i4!i5!i6!i7!i8!i9!i:!i;!i<!i=!i>!i?!i@!iA!iB!iC!iD!iE!iF!iG!iH!iI!iJ!iK!iL!iM!iN!iO!iP!iQ!iR!iS!iT!iU!iV!iW!iX!iY!iZ!i[!i\!i]!i^!i_!i`!ia!ib!ic!id!ie!if!ig!ih!ii!ij!ik!il!im!in!io!ip!iq!ir!is!it!iu!iv!iw!ix!iy!iz!i{!i|!i}!i~!i!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i"i"i"i"i"i"i"i"i"i	"i
"i"i"i
"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i "i!"i""i#"i$"i%"N(�iii�i�i�i�i	iRii�i�i�ii�i�
ini�i!i�iiLi,iAiisi�i�i�iiiL
iS
i�ii�i�i�i�i.iNiii�ii�i:i�i�i�i?i�i�i=iNiKi�i�i�il	i�i�i�
i�i�i�
i ii
ii�ii�
ioi$i�iii�i�ici8i�i�ii�i�i�i�i�izi|i�iti"i�
iei@i\i�i�	i�i�i�i�i�i�iFi�iM
iQiHi�i�iPivi�ifi�ii�iDiT
i�i�iFiN
i�iEi�iOi�i/i�isi�i3i<i2i�i�i&iLi�i�iO
i�i�iGi�iiMi�i�i?iii`iiF	i*i�igi�	iZi�
i:i�ii�iKi�	ii�	i�ii�i�i�i`i�ii�igii	i iqi�i~i�i�iP
i�	ii�i�i�i!i�iuii�i*ii�i	i�
i�i~i�i�i�i�iei�iGi^i�i�i�i�iUiCi�iBi�i�i�i�ii�i ijioi/ii�iOi2	i[i�i�i�
i&i�i�i�i�iSi(i�i�i�ipi]i�i6iii�
i'iii�iii8ii+i%i[i�i�i\i�i�i�ii�iX	i(i�i�i�i0i�i iHi�
i�
i"i!i�i+i�i1i"i�i�i�
iOiG	i�iifi1i�i�i�i�i�i�ii2i9i�ili,i�i	ii�ii�i�i}ihi#iq
iQiMi&i�iXi�i�i#i�i�i
i�i�i�iji�i�iMi�i�i�i%ii�i�i$i�i�i'i�	i�iNiiii7i�iJi�i!i�i�ii�i�iMi�i)iPiU
i�ii�i�
i�i%i�
i�
i�i i�i�
i iIi�i3	i�i�
iir
ii�i�i�i�i�imi�i�i$i�i�ixi�i�i�i�i�
i�i�i�i%i&i�i
ii�i�i�ii�i�i&i�i'i�ii'i�i�i.i�i�ii�iH	i�i�i�i�i$i#i�iDi&iAi�	i�i�i�i�i�iUiGii�i�i
iQ
iPiSi'i�i�idi�i0iFi�i�i*i�i�ii�ii�iJii�iUii�i�iI	iR
i�i�i<i�iS
i:i7
i�
i�i	i	i9i�i}ii�	i�i�iViPiT
ii)iCii�i�i&i�
i�	i)i�i�im	i�i�i�i�i�ii4	i�i�i�in	i*ii�i�ii�i�iOi�i�i�i�i�	i+i(i
i�i�i�iU
i(i�i5iYiji�
ili�iuii)i�
i*i+iV
i
i=i�i�i�i�i�i�i�i4i�i!i�i�iTi,ixi�i�ieii�	i�iJ	iPi�is
i5iAiV
i/iki�i�
iili!i	i�iAi�i`i�i�
i�i�iAi�i�
iii�i�
i�i�	i�i�i�i�i�i�iMi�
i�i�i�ii�iW
i�i�i�
it
i�i�i+i}i�iji8
i�i�i�i�i�i�i�i�i-i)imi�	i�iW
i�i		i�i�
i�iai�i
iPiK	i�i,i�i�i�i7i'iu
i�i{iki�i�ii�i�
i9
i�iii�i�i�i�i�i�i�i1i�ibii�	i�
i�i�io	i�iX
i,iQi�i�i�i�i�ii�
i�
iX
i�i�i�i5iDi�i�ili�i�i[i 
i�i�iY
i�i%ii.iY	i�i*i�i�i�
i�iRi�i�i�ipi�i�inicigi+ii�i'i2i�ii�i{i�ili�imi�i�i:
i�ifi
	i�i|i5	i�i�ii�iZ
i�i�
i�i�i�i�i,i�i�i�i�i;i�iIiYi�i�i[
iXi"i�i	i�i�i�i~i�i�i,i�iki�i�i-i�i�ii�i�iDi�i�i�i>i]i�i,i�i�i�iviLiBiii&i�i�i�
i�i�i�iGi�i�iiBi�i�
i!
i�i�iui�i�i�i�i�	i iaii�i�iv
iSi�i}i;
i�iDi�i=i�i0ii�i\
i(i�ii�ivi i�i�i�i�i�i.i�i�i9iHii�i�i�i]
iEi�i�i�i�i�i!i�i/i�i�i�ii-ii�iQi*i�i.i/i�i�i�ii0i3ii"
i�i*iRii�i�iWi�i�i/iibi.i�i�	ii�i�i�i�i�iRiii�i)i�i2i�i�	i�i�i�i�i�i�iZ	i�iTiiw
i�i�i�i�	i�i�i�ii�i�i[	iOi�i�	i�i`i7ix
i^
i�i�i�i�i�i�i\	i�i�i�i�i�i�igi�i�ini�i
i_i�i~i�i�i�i0i�i�
iai�iy
i]	i�i�i�i�i�ii�i�	i;i�i�	i-i�i�iL	i�i�i�i/ii�i�i�i`i�i#i"i�ii�ii0i�
isii�i�idisi�
i�iY
i�iikiwioi�i�i�i�i�i1ii2i�igipiQi�iUi�ivi�i�i�iiCiSi�i^	i�i�i5i�i�iBi�i_i�ibiNi�i�iXi�i�i�i�
i�iLici�
i�
i	iKiwi*iaiGi3i�i
i�i�ii1i6i�	i2i6	iNi�i�ii	i3i�i:i�i\iqi�i�ii-i�iii3i�
i�i�i�ixi�
i�i�iri�i4i�
i_
i�iUi�i�i�i@i�i5i�ii�i�ii�i/i+i6ii�ii�i�i�i�i�
i7	iZ
ii�i�i8i4iiCi�ii�i�ili�i`
i�i�i�i�i�iYi�i�i�i�i5i�	i{i�ii�i�i$i7iiMiVi0iri�i�i�igiiVi�i8i�i9i,iZi�i�i{i#iWi0iii$i�i�
i�
i�i4ii[i�ivi�iici�iViM	i$i-ii�iiXiii�idi�i�iWi[
ii�i�iiiqi�
ii1i�ii�iiti�ii�i	iii�
i2i�i2i:i3i i.i�i�i2i�i
i�i�ii�i�i%ii�i�iii
i�ii�iii�i
i�
i6i�i4i�i|ii�iSiii�i_	i�
ii�i�i�i`iii�i�i�	i3iii;iriiii7iYiLi;i�i�	i�	iiii�iTi\i�i�ii<i�iVi5i�ii�
i�i�i�ii"ixi%ii;i8	i i�ii2iEi=i!i�ii�i^iiwi�
i"i�i�iisi�i#i<iQii�iri$ii]ii%i�i.i&ii3i5iBi�iyi'i�i�i�ii�ii>iYia
ib
i(i�
i	i)i*i	iiii�i:i�i6i�i^iii�ii(i�
i+i+iiixi,i	i.ihi/i-iii�i
iVii�iihi�izi.ii�i�i�i<i�i�i;i/i?i�ii
i�	i0i8i�ii�i5i6i�
i_i)i1i2i	i3iyi	ii�i�
ii^i4i�i�i?i$i+i\
i�i5i_iWi�iiz
i6i0ii�
i]
i	i�ip	i7i�i�i8i^
i<
i�iVi9i�i6i�iIiwi}ic
i^ii
i9i@i�i
iAii�i�i�	i:iei1iiiBi�i�i�i�ii�i�ii�i7i;i<i�i=i{
i�i(i`iRi1iYiiIi�	i�ii�i6i�id
i>i�i�ie
i?i�ioi�iqiYinii�iliiCiDi{i�i�
i_
iEiPiUi�i�i�i�ii�iEimi�i@i�i:i�
ii
iAii�i�i�ii#
i�	iNi�
i�iBi�iCiWiTiTii�i
i�if
i;iDii&i�
i|i�i�i�ii�i�
i�i�i<i=
i�
i�ii	iVi�i�
iioi�i�	iEi�
iFiii�i�i�i�i�iiiDi-i8i�iGidi�	ii�
iHiti�iiIizi
iiJi�
i�
iKii�i|
i�ii�i�i>
i�i�i�i�iiiLi:i�	i=i�iMii?
i�i�iiHi�i�ii�iNii�i�	iOiPiiFikiQi9i�i�i�i�
i�	iuiivii�ii�iiRiSi�i�i}i
i>i�i�i�ii
i:iTi	i�iN	i�iCi�ii�iUi~i�i iWi�iGi�i�i�i,iiii�iOi�i|ii�i�iOi?iVi`	i�i i�i~iiwi�ii�i@i!i�i�i;iii�iiWi�i"i�
iXi�iYiiRig
iuii�
ih
i�
ixi=i
iiZi�i<i�ii[i�i#ii=i 	i\i$ii]iHiIi^i7iO	i$
i
i_i%iviJi�i i!iwitii`iaibi9	i&i�i"i{i�i�i�	i'ici�idi8i�ii�i�i[i9i�i�idiZi�	iei�i�i�i@
i!i(i"ifi�i�ii�i#i$iTigiKii�i%i�iWiMihii�iii�i�i�i%i�i�i�i�i�i
i`
i�iyi7imiLijiki�i:	i>i!i�i�i�iiBi)ili|ii�i
izi�i�ii
i�iMi�i�i�
i�i�imi�iniuiq	ivi�i�
i
i*iNioipi�iiqi7i.iri�iyi�
iii�
i�ifi�i�i�isi!	iyi�
iOi	i�i�i�i+iPij
i�
i>i�i�i�i�iiYi�iAiti�iui%
i
i�ivi�i�izi2iwi,i�	i�	i�i�i3iQi�i�i
ixi�i6i9ik
i�ii&i6i�i�i-i
i�iRiyi�iQi9ici�
i'i.i
ioi(iBiFi?il
i�i)iei�i�
izi�
iSiTi�i�i�i{i/i�i�i"	i�	ibi/i�i`i�i�i0iui�ivi�i�i1i�i�
i�	i�iUi�i*i�i/iEi�iSi�i8iZi|i}iFi+ii�i!i~i2i,iFiP	i�im
ii
i�ieisi�iCi�ir	ii�i�ii�iai3iZi%i-i�i�i�i�	i4i�i�i�iAi�i�i�
i�
iii
i�i�i�iDi.i�ii�i�	ini�ii�i�i�
i�i�i	i�i3i5iJi0i�is	i�
i�i�i�i@i�i�iVi�i/i�	i�i6iWiAi7ioi�
i�iPi0i�i1i�in
i�i�iaiQi2i�ipi:ii�iPi�ibi�i�i�i�ii{i3i7iEi�i�i�	i�i�i|iFiGiXi�i�i�i�i�i]i�
i4i�i�i}
i�i�i�
i5i�i&i�i8i	
i�i�i�	i�i�i�i�i�iLi�i�i�i�i�
i�	iYi

i�ii�i�i4i
iBi9i8i�i�i�i�i�	iHi�
i/i3iZi[i�i�
io
i�i�i:i0i�ini\i�i]i�i^i�i�i�i�	i�i�i�iIi�i�i�i;i�i4i�i<i�i=i;i�	ii
i�i�iXi�	i�ii�i5i_i�i�
i�
i�i�i�i�i}i0i>ip
iJi�i�iKii�i�i&
iFi�i�i�i�
i�
i#i�i[i�i�i�ifii>iq
i�i?ir
i�i6i�i�i�ii�
i�i�i�i�iji�i�ii�i@i-ipi9i;	i6iyiAi�i�ii�	i'
i�i�ii�i�ii�iVi�i�i`i�i4i�i�i�iKi
iai�
i6i�i�i�i�ii�i"i�i�iKi�i

ii�i�i�	iYiGioi�ibifici7iis
ipiri�	i8i�i�i�i�i�iiA
iQ	i�
iCi,i
i�i�i�ii�i\iLi�iuii~
i�
i�i�i9i�i�iBi�iZi�i�i
iCi�i�iijidi�i0ihigi�iei�iMi}i7i�
i�i
i�iDi�	i�i�i�i�ifi:i�iiNi;i�
iEiFi�i(
i�i�i<i�i�iGiMi=iwigi�i~it	i?i�i�i�i
itimi#	i�	i�i+i�i�ihi�i�i�i�ii[i�
iOi�	i�i�i�i
i�iB
i�i�i$	it
ii�
i�iia	i�i�	i�iHii�i�i�iQi"i<	i
i�i�i-i1i�i#iu
i'i�iDi�ii�i
i�
iIi�i>iJi%	i�i�iPii
iii�i�
i=ia
i�iKi�iv
i�i�i�i�i�
i�i�i�i_i�iji�i?iEi1i�
i�
i�iki�i8iQi�i�ili�i�i
i�imi@i
i�ibi�i�i�iiRi�i�i�i5i�i�i�i�iLi	iw
iini�i�i�i4iHii�iMi�i�i�i�ii�i�ii\i�ioi�iNi]i�ii�
i�i\ix
igi�iEi
i�i�i�i�i�i�ipi�i�
i�iqi
i�i�i�i�i�iOi�i�i�iri�iZi�isiti�i�ii�iPiei�i�i�i�i�ioi�i�i^ii}i�i�i�iziAi&	i�i�i�i�
i�i�ini-i�i�
iQiiii
i�i�i�iRi�iui�	i�i�iiBi�i�i�
iy
i�i�iviwiBihiqi�i�i�i<i�i*iiiSi"iTiCi>i)i
ixiUi�i�i�i~i�i�i�izi�iVi�i�i�i�iC
i)iqi�i�iWi
	i�i�i�iDi�iEiTiFipi�i�i#i#iyi�i�
i�i�iGi�iz
i�ii�i�i�	i�i�i�iSi�iXi
i�i�i�i�iu	i
i=iHi�i�i_i�iRiii�i�i�iwi�i�iYizi{iqi�ii3i�i5i�i
i�i{
i�i�i|i}iSi~i�i
i
i�iZi[i�iii�i�i`i�iFi�i]ii�ini�i�iIi�i
ii�i�i�i�i�iGiTiJi�iKiziSiri\i)
ii
iv	i�i5i�i�ii�
ib	i�i�iji�i�i�i�i�
i�i�i]i^i�i�i�ici�i�i�ii�
i�i�
iai:i1i�i�i�i�iAihiiai�
i6i�i�i�iib
i-i�i
iHi_ii�	i�i
i�i�i�ii�i�i�i|
i�i*
ifi�i	i�ii�
iD
ii
iLiWi�iiiUii�
ii�i$i�i
i
i�iNiiiR	iki�iE
i�i�iiiMi�iS	i'	ii`i�isi�iF
ii�iai}
i�i�
i(	ijii	i~
iViBi[ibiWi�i�ibi
iIi�ic
ii
i�i{i�i�i�	i�i�	ici�
i�	iidi
i�
i]i�i�i�i=	ieii�iii�i�
i�i�i
iNi	i�i�ifigi�
i�
i�
i�ihiiiii�
i=i�iXii�ii�i�i�i�i�id
i�iHiCi�
iii�iTiWi�
i
i�i9i�i�	iNi�iKiEiji4iJi�
iYi
i�iG
i	ikii�ihiOii�
i�
ii]iPiZi�ili�iQi[iki�iminiRioic	i�ii�i�i�iSiXiiii\i+i�i�i�i�iIiTiUiUi�ii
i�ili�
iDiiiipiiqi
iki�	imi�i�
iKii�iii�i�iVi8i�
i i�iri@iWiri�
iCiGi�i�i�i
i�i^i�
i�i�i8itii:i�i
i!i�inisi�i"i�
i#i$i]iti�	i%i�
i&iriui'i+
i(i)i�ie
i
i}i
i�i�i�i*i4i1i+i�i�i�i�i�ii�i,ii�
i>	iXitiri?	i�i�
i-i�iviui{i�iw	iwi�i.ixiT	i,
iii�i/i0i�i�i�i1i�
i�i2i�
iGiRi
i�i^i�iYi
iZi�i
i[i3i^i�i�i�i�i�i
i)	i\i�	i4i@ivi�i5i�i6i7i�id	i]i�
i�i^i8i�i&i�	ii�ii9iyiuiii�
i�iziRi�i{i�i�i�i(i_i�i<i9i�ili�i�i�i_i 
iSi`iki�i[i�	i�i�i�
ixi:i�i;i<i!
i$i=i�i|ii�i>idi�
ii?ieii�i�i�ii�i�i�ii�
i}i@iAiBi�i.i~iaiOi
i�i�i`ibi�i�
i%ii�i�i�
i;i�
i�ii�iCiiDi�i�ii�if
i"
iLi�
i�i�i�i�
iEi;i�iFi&iGi�
i
i�ix	iHi)i�i�ici�iIidiTi�i�
i�
iei�i�i�ii	i�iJiigi~i�iUi�ie	i	iii�ifiai8igi�
i�	ibihiKiy	i�i�i�iLii:i�
i�iii�i*iMiii�i�iciti�iMiNi�i�i�i�i	i�i
i�i�if	i�i�iYidiei�i*ii�iOiH
i�i#
i�i#i;i�
i�	i�i�i�iI
i\i@	i�i�i�isi$
i�
iPiQi�
i�	i�
iRijiSiTi�i+i�iUi�iVi�i�iLi�
i!i�iJ
i\i4iWi�iiXiYiZi�i[i>iwikifi�i�i+i�ii%
i�i�i$i�i\i�i�iili�
i]i�ili^i_ig
i%i�i`iaigiii�i�
i�iNiK
ibicidi�i�
iciwi�
iei�ibiyi�ifihigihihi�i'iiiimi�iz	ijidiii�ii	i<i�i�i|i�i�i�i�i�i�i�iiOiki�
ilii�i�
iai�i�imi�i�i�ini�
i�iui�ini�i�i�iei&
i�
ioi�i�ii�	i<i�ipiqiPiQi�iji�	i�i	i�i�i(i�i_irisi�i�i�ii<iEiRifi�i�i�i�i]i�i�iIiti=i�iui�ivi�i�
i�ioi�
i�
iki,iliwi'
i�i�	imi�i�i�iFi`i�i�ifi�i�i�
iSiJixi�iyizini�iL
i�ipiOi�ii�i�
i{i�
i�i�iA	iyi�i�iU	i�i|i}i~iFi�iqi�i�
i�	i�i�ii�iii�i�iipi�i�iB	i�ioi	i�i�i�ipii-
i�iri�i�iqiqi�i(
i�iri�i�i�isi�i�i�i�
i�i�i�
i(i.
isi)
i�itii�	ii*
i�iui�i�iTiviM
i{	i�i�iti�i'i�i�i�i�
i�i�i�i�i�i�i�igiZiwi�
i�	ici�iji+
ipi�i�i�ixi�i�i�ihi�i�i�i�
i�i�i�i�i,
i=ii�i�	iiui�i�ii�i/
iyi�i
i�	iyivi�	i�i�iwi�i�i�i�i�i�i�i�
izi�i�ii�i>i�iCi'i�i�i�i{iiZi�i�i�i�i�i�i�i�iaii�i�	i�iqi?i�i
i�i|i�i�	i"i�i�
i�ii}i�i�i�i�i=iiAi�i1i�i)i�i�i�i?i�
i�
i�ii�ixi	i�i	ii�	i�
i�i�ihi�iSi�i�i�i(i�i�
i�i�i'ixiyi�i�
i�i�i
i�
i�i�i�i�i_i	i�i�i>i�i}iPi�i�i�i�i�ii~i�i
iN
iici�i
i�i�i�iHi�i	iii�i�i�i�i�i�ii�i�i�i�i�iji�i�i�	i*	i�i�i�i�
i�ii�iih
i�i�i_i�i�i/i�i<i�i~i7ikiTi�ii]iiUibi�
iti�i�ig	i�izi�i�
i�i|	ii�i�i�i�i�i�i�i{i�i�i�	ii0
i�i�
i�i+	i�i,	i�i�i�iIi�i�i�i�i�ii�iiBi�i�i4isi�
i�i�i�i�i�i�
i�i�i?iCi�i�i	i�iGi�i�i�i�i�i�i�i�i�i�i�i�i�ii�i|i1
i�iimiC	i�i�ili�i�ii
i}	i�i?i�i�ii�i�i�ih	i�i�iIi�i�i�iVii�i�i�i�i�i�i^i�i�i�i�i-	i.	i�ii)i�i�i�
i�i�i�i2
i�iiii�i�
i�i�i�iAi�i�i�i-
i�i�i�i�i�i�
i�i
i�i�	i�i�i�i�i�i�
i�i�
i�i�i�
i�i�iQi�i�
iO
i�i�i�i�ii�i�iziKi�i�i�i[i�iJi�i�i@i�i.
i�i�i�i�iD	ii}i/
i@i�i�
i�i�i�
i�i@iiRi�i�i�	ij
i~i�i�iJi�i�i�
i�i�i�i�i�
i0
i�imi�i�iimi~	i�i	i�ii1
i�i�i�	i�i�ii�i�i�
idi�i�i�iXi�i�i9i�i�ii�i�iUi�i�i�i�i�iLi�i3
i�ii�i�
i	i�i�i�i�	i�i�i�i�
i�ii$i(ivi�i�i&i�ibi�i�i�i�i�i�i�ii�i�i�i{i�i�i�i�i�i�i�i�i�i�i2
i�i�	i�i�i�i�	ii�i�
i�i�i�i�i�i�i�i^i�i�iV	i�	i�i�i�i�i�i�i�i�i�i�i�i�ii2iW	i�i
iWioii	iik
iXi�i�i�	iAi4
i�i�
i�i3
i�i�i�	i�i�i�i�i�
i�i�i�
i�i�i�i�i�i�i�i	i�iHi�i�i�i�i�iiiii�iDii�iIisi
i�i�i�
i�i i�i�i�i�iwi�i{iii�ii�i�i/	ini,iiii�i	i�	i�i�i
i�iiii
ii4
iBi�ii�iP
i5
i�
i�i�
i�	i�i�
i�i	i�ii|i�iziii�i�i
i'i�i5
i�ii�i!i�i�iyi�i�iVii�i�i�	i�i�i�ii�i�i�i�i�ii�	i�
iii-ii�i�i�ii�
ii�
i�	i�i�iii�
i�i"i%ii�i�iJiCii�ixi�i�iii�i	iil
i6
i�i�iii�
ii�
i�iiXi�ii�i7
ii�	i�
iNiim
iii�i iWii�i!i�	ii
i�
i>i8
i�i"i#i9
ij	iDi�i�ii$i	
i%ii�
i�i�iXi&ii'iEi�i(iFii)i�ixi�	ikii�ii�i*i+i�i�i�iDi�i�i,i�i�ii�i�iiKi-i.i/i:
i�i0iJi�ii1i|i�i�i�i�i�i�i�iEi*i2i�
i�ii�ii�iHixii�ii3i�i�i�i�i3ii�i�i;
ipi�i<
ii�ii�i�i4i5i	i�	i6i�iOi�i
i7i8i�i9i�i:i�i�i;i�i�i�i�i<i�
iiYi=i>i
i	i?i�i@iAiBi�
i�i�i=
i�	i�i�ioi�	ifi�ii�i�
i�
i�	i�	iCiiDi�i#i�i�
i>
i�iEi�i�iFiZiE	i�i�i�	i[i$i�
i�iGi?
ii�	i�i�iGi�i�i�i@
iHi�iA
i\iLi�i�i�i�i�
iIi	iii�ii�iiiJi�	i�i�
i	iKiLi]iMiNi
i�iji�iQ
i�
iB
iOiPi�i�iQi�
i�i�iRi�
iSiTi�i(i�ii�iC
i�iUiiVi�iWiXi�i�iYi�i�i�iZi�i�idi[iciHi�i_i�i#i0	i\ii]i�ini

i�	i�i�ii^ii�i_ik	iD
i�i`iai�i�ibi�i�i�	ici�i�i�i�idi�ii�	i�iiidi^iE
ieiii�i�
ii�i�ifi�i_i7iii�i i�
i�iF
iiigi-i�ii!ii�ihi�	iqi;i�i�i�i�iXi�i i	i�i�iiiji�i�i�i
ikili�i�i~imiG
i`iniyipi�i�ioi>i�ipi�iqi
i�i�iri�iai�i�i�isiti"iui|i�i?ii�iivi�i�i�i�i�iei�i�iwixiyi�i�i�i�izi{i@i|i�i�	i}i�i�	i�i�i%isiiR
i�i.i�iMi?i�
i�i~ii�ibii�i@i�i�i�ii�i�i�i�i�i�i�i�i�i�i�
i�i6
iIi�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i2ii�i�imi�i@i�i�i�i�	i�i�iNii�i�ifiii�iZi�
i�i�i�i�i�i�i\iH
i�idi�i�iJi�i�	i�i�	i�
i�i�i�i�i�iKi�i�i�i#i�i�i�i�i�i�	i�i�i�iKi�i�i�i�igi�i�i�ihi�i>i�i.i�i�i�i�i�i�i�ii)in
iti�iii�i�
io
i�
iI
i�i�
i�iiqi�i�iri�i�i�i�i�i�ip
i�i�	i�i�iziii�iUi�iJ
i�i�i1	iK
iti�i�i�i�i�i�i�
i�i�iJi�iiLi�	i�i�i�i�i�i�i�	iMi�i�i�ii�	i�i�i�iei�i�	i�ii�i�	i�i�i�i�i�i�i�iri�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i i i i i i i i i i	 i
 i i i
 i i i i i i i i i i i i i i i i i i i  i! i" i# i$ i% i& i' i( i) i* i+ i, i- i. i/ i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i: i; i< i= i> i? i@ iA iB iC iD iE iF iG iH iI iJ iK iL iM iN iO iP iQ iR iS iT iU iV iW iX iY iZ i[ i\ i] i^ i_ i` ia ib ic id ie if ig ih ii ij ik il im in io ip iq ir is it iu iv iw ix iy iz i{ i| i} i~ i i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i!i!i!i!i!i!i!i!i!i	!i
!i!i!i
!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i !i!!i"!i#!i$!i%!i&!i'!i(!i)!i*!i+!i,!i-!i.!i/!i0!i1!i2!i3!i4!i5!i6!i7!i8!i9!i:!i;!i<!i=!i>!i?!i@!iA!iB!iC!iD!iE!iF!iG!iH!iI!iJ!iK!iL!iM!iN!iO!iP!iQ!iR!iS!iT!iU!iV!iW!iX!iY!iZ!i[!i\!i]!i^!i_!i`!ia!ib!ic!id!ie!if!ig!ih!ii!ij!ik!il!im!in!io!ip!iq!ir!is!it!iu!iv!iw!ix!iy!iz!i{!i|!i}!i~!i!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i"i"i"i"i"i"i"i"i"i	"i
"i"i"i
"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i "i!"i""i#"i$"i%"(u EUCTW_TYPICAL_DISTRIBUTION_RATIOuEUCTW_TABLE_SIZEuEUCTWCharToFreqOrder(((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euctwfreq.pyu<module>,s�python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/mbcssm.cpython-33.pyc000064400000042452151733566760026471 0ustar00�
7�Re�Lc@sX	ddlmZmZmZd"ZeeedeeeeeeeeeeeeeeeeeeeefZd#Zied6dd6ed	6ed
6dd6Zd$Zeedeeedded
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefFZ	d%Z
ied6dd6e	d	6e
d
6dd6Zd&Zddddeeeeeeeeeeeeeeeeeeeeeeeeeededeeeeeeef(Z
d'Zied6d
d6e
d	6ed
6dd6Zd(ZeedeeeeeeeeeeeeefZd)Zied6dd6ed	6ed
6dd6Zd*Zeeeddddeeeeeeeeeeeeeeeeeeeeeeeeedeeeeeeeeeeeeeeef0Zd+Zied6dd6ed	6ed
6dd6Zd,Zeeeeeedeeeeeeeeeeeeeeeeedeeeeeeeeedeeeeeeeeeeeeef0Zd-Zied6dd6ed	6ed
6dd6Zd.ZeeedeeeeeeeeeeeeeeeeeeeefZd/Zied6d
d6ed	6ed
6dd6Zd0Z dddeddeeeeeeeeeeeed
d
d
d
eed
d
d
d
d
ed
d
d
d
d
d
dddeddd
d
ed
d
d
d
d
d
d
eeeef8Z!d1Z"ie d6d
d6e!d	6e"d
6dd6Z#d2Z$d
d
dd
ddeeeeeeeeeeeedddeeedddeded
d
dd
dddddedddeeedddddedeeef8Z%d3Z&ie$d6d
d6e%d	6e&d
6dd6Z'd4Z(eeeeeeddddddd
dddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeddddeeeeeeeeeeeeedddeeeeeeeeeeeeddddeeeeeeeeeeeeeeddeeeeeeeeeeeeddddeeeeeeeeeeeeeeedeeeeeeeeeeeeddddeeeeeeeeeeeeeeedeeeeeeeeeeeedddeeeeeeeeeeeeeeeeeeeeeeeeeeef�Z)d5Z*ie(d6dd6e)d	6e*d
6d d6Z+d!S(6i(ueStartueErrorueItsMeiiiiu
classTableiuclassFactoru
stateTableucharLenTableuBig5unameiiii	i
uCP949uEUC-JPuEUC-KRux-euc-twuGB2312u	Shift_JISuUTF-16BEuUTF-16LEiii
iiiuUTF-8N(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii	iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(
iiiiiiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii	iii
iiiiiiiii
i
i
iiii(iiiiiiiiiiiiiiii(,u	constantsueStartueErrorueItsMeuBIG5_clsuBIG5_stuBig5CharLenTableuBig5SMModelu	CP949_clsuCP949_stuCP949CharLenTableuCP949SMModelu	EUCJP_clsuEUCJP_stuEUCJPCharLenTableuEUCJPSMModelu	EUCKR_clsuEUCKR_stuEUCKRCharLenTableuEUCKRSMModelu	EUCTW_clsuEUCTW_stuEUCTWCharLenTableuEUCTWSMModelu
GB2312_clsu	GB2312_stuGB2312CharLenTableu
GB2312SMModeluSJIS_clsuSJIS_stuSJISCharLenTableuSJISSMModelu
UCS2BE_clsu	UCS2BE_stuUCS2BECharLenTableu
UCS2BESMModelu
UCS2LE_clsu	UCS2LE_stuUCS2LECharLenTableu
UCS2LESMModeluUTF8_clsuUTF8_stuUTF8CharLenTableuUTF8SMModel(((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcssm.pyu<module>sh

$
















site-packages/pip/_vendor/requests/packages/chardet/__pycache__/mbcharsetprober.cpython-33.pyc000064400000006164151733566760030310 0ustar00python3.3�
7�Re�c@sFddlZddlmZddlmZGdd�de�ZdS(iNi(u	constants(u
CharSetProbercBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uMultiByteCharSetProbercCs2tj|�d|_d|_ddg|_dS(Ni(u
CharSetProberu__init__uNoneu_mDistributionAnalyzeru
_mCodingSMu
_mLastChar(uself((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyu__init__$s
		uMultiByteCharSetProber.__init__cCsRtj|�|jr&|jj�n|jr?|jj�nddg|_dS(Ni(u
CharSetProberuresetu
_mCodingSMu_mDistributionAnalyzeru
_mLastChar(uself((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyureset*s
		uMultiByteCharSetProber.resetcCsdS(N((uself((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyuget_charset_name2su'MultiByteCharSetProber.get_charset_namecCs�t|�}xtd|�D]
}|jj||�}|tjkr�tjr{tjj	|j
�dt|�d�ntj|_
Pq|tjkr�tj|_
Pq|tjkr|jj�}|dkr�|d|jd<|jj|j|�q&|jj||d|d�|�qqW||d|jd<|j�tjkr�|jj�r�|j�tjkr�tj|_
q�n|j�S(Niu prober hit error at byte u
i(ulenurangeu
_mCodingSMu
next_stateu	constantsueErroru_debugusysustderruwriteuget_charset_nameustrueNotMeu_mStateueItsMeueFoundItueStartuget_current_charlenu
_mLastCharu_mDistributionAnalyzerufeedu	get_stateu
eDetectingugot_enough_datauget_confidenceuSHORTCUT_THRESHOLD(uselfuaBufuaLenuiucodingStateucharLen((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyufeed5s2		"uMultiByteCharSetProber.feedcCs
|jj�S(N(u_mDistributionAnalyzeruget_confidence(uself((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyuget_confidenceUsu%MultiByteCharSetProber.get_confidenceN(u__name__u
__module__u__qualname__u__init__uresetuget_charset_nameufeeduget_confidence(u
__locals__((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyuMultiByteCharSetProber#s
 uMultiByteCharSetProber(usysuu	constantsu
charsetproberu
CharSetProberuMultiByteCharSetProber(((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/langthaimodel.cpython-33.pyc000064400000055556151733566760027747 0ustar00python3.3�
7�Re,c@s9d�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zd�S(�i�i�i�i�i�ijikidi�i�i�iei^i�i�iliminioi�i�i�iYi_ipiqi�i�i�i�i@iHiIiriJisitifiQi�iuiZigiNiRi`i�i[iOiTihiiiaibi\i�i�i�i�i�i�iXi�i�i�i�i�i�i�ivi�i�i�i�iciUiSi�i�i�i�i�i�i�i�i�i�i�i�iii�ii�iKiii4i"i3iwi/i:i9i1i5i7i+iii,ii0iiii'i>ii6i-i	iii=ii�ii*i.iiiLiiBi?ii
ii$ii
i(ii i#iVi�i�i�i�i�iii)ii!i�i2i%iiiCiMi&i]i�i�iDi8i;iAiEi<iFiPiGiWi�i�i�i�iucharToOrderMapuprecedenceMatrixg��@��?umTypicalPositiveRatioukeepEnglishLetteruTIS-620ucharsetNameN(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ijikidi�i�i�iei^i�i�iliminioi�i�i�iYi_ipiqi�i�i�i�i�i�i�i�i�i�i@iHiIiriJisitifiQi�iuiZigiNiRi`i�i[iOiTihiiiaibi\i�i�i�i�i�i�i�i�i�i�i�iXi�i�i�i�i�i�i�ivi�i�i�i�iciUiSi�i�i�i�i�i�i�i�i�i�i�i�iii�ii�iKiii4i"i3iwi/i:i9i1i5i7i+iii,ii0iiii'i>ii6i-i	iii=ii�ii*i.iiiLiiBi?ii
ii$ii
i(ii i#iVi�i�i�i�i�iii)ii!i�i2i%iiiCiMi&i]i�i�iDi8i;iAiEi<iFiPiGiWi�i�i�i�i�i�(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiF(uTIS620CharToOrderMapu
ThaiLangModeluFalseuTIS620ThaiModel(((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/langthaimodel.pyu<module>%s*
python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/jisfreq.cpython-33.pyc000064400000244076151733566760026656 0ustar00�
7�ReӸcP @sdZdZdR ZdQ S(S g@ii(iii�i�i�i'iOii}i�i�i�i�i]i�
i�
ii�
i�i�i�i�ii�i�i�ii�i�iXi}i�i�ikiig
i�
i�iki�i�i�iiiii�i�i%i&i0i1i,i-i�i�iii�ii�i�i�i<ii�ipi�i�i�i�i�i�igi�ii�iWiXi�i�ih
i"i�i�i�i�i
i	ii\i�i�i�
i/
i�i�i�i�ii�i0
i�i�
ihi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii ii!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i�iViji4i�ii�iBii�i8i9i:i;i<i=i>ivi�i�i�iSi�ieiifi�i�id	i+i�i�iaiwi�i�i�iIi�i~i�i�
ii?i@iAiBiCiDi
ii-iiiii�i�
iiEi^i.i�i3iii
iFi/iYi�i�ii�iji�
iiGiHiIiJiqii1
iiYiiki/ii2iii#iii�i*i�ii�ii�ii[ii\i5i�i!i!i	i%i@ilii'iAiiii4i
ii�i�iii<ii�i�i-i�ii7iSi�i�i~iKi=iiEi�i;ii�i7i7i8imi&iii
iiOiKi=i~idiiiLiMiNiOiPiQiRiSiTiUiViYi>iJi"ip	ipi�i�ii�iTi_i�i�i.iXi�i�iLijieii9iPi iliyi�i�iiDi�i�i�i)ihi�iFi?ii+iiigicii�iBi]iNi�i�i8iji:i5iii7ii�iRi4iGidi�i�i�iniihiti6i3i$iWiCi�i�i:
ixi�ii*iV	iiWiXiYiZi[i\i]i^i_i`iiaibicidieifigihiiijikiliminioipiqirisiti�
iuiviwixiyizi{i|i�i�ii�ili}i�i~iii	i�i�
i�ii�i
i�i�ii�iiii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiki�i�
i>i�
i�
i	i�i
	ij
i�i�i�iZi[i\i]iiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii
i�i�i�i�ii�i2
i�i�i{iTi�ia
i�
i^i�i�i|i�i=iimik
i�i�i�i	iViyi�	i�i
iq	ii�ii�
i�	i�i�i�i�i!i�i�	i�ii�i�i�iCiOi3ii�i�i�i�ir	i�i�ini�i+ii�i�i�
ipiqi�i;
iAi�i�i�iCi0i�ini�
i�i�iTiCioi
i�i
i#	ii�i~iiPi�i�i�ii�i�	ii�	i�i$	izi�i�i&i�i�i�i�ii�i�i�i�i_ii�iUi�i�
is	i�	i�i�iIi�i�i�ii�i�i�i3
i�ii$iWi1i5iPi�	i�ii�i�i�i�iXi�i�i�il
i�i�iHi�i�	ii�i�ii�i
i�
iWi�i~ipii$i�iii@iLi�i�	i�i�i�iuiiiJiI	iW	i�i�i_i�i�	i<i�i�ii]iDi�i�i�iihi�i�i�i�ii�ifi-i�i}it	i�i�	ii�i�i�i,i�i
ibi�i�iXi�iiFii{i`i�i�i+i3iqi�imi�i4
i�i�i�i�i�iBiliX	i�
ii%
i�i�i%	i2iui�i�	i�	i�iJii|iri�i@ii�iii�i�i�
i�i�	iL
iiiii�i�ib
iJ	iici�i�i�i�i�i�ii4	iRi�im
iTi�i�ii�i�i�i�i�ie	i�ii?i
i�i�i�ii-i	i�i*iEi�i�i+i�i�i&	i�	i�i�i/i�i�i.isi[i�i+ii�
ii�
iBic
i�i�i�i�i�i	i)ii,i�iu	ii	ii9i&
iii�i�i�iv	i�iYi�i3i�i
i�i�iiDi�i�i�i�idi�i�i|i(iyii�ii�i<i8i�	iiiiiid
i5
iBi�inii�ii�i�i|i�	i!i�i)i@in
imii�	i0iai�i�i�	izi'i�i�i�	iWi�i[ivi�i�i�	i�i�i	io
ii�	i�i
ii�i'
i�ii"i�i�i9ii�ii�iJi�i�ihi�i�ie
ii�i\i�i�iip
i@iiQi9i�i�i�i	i�i�i�iw	iiiEi�iJiIi�	i�i�i�i�iifi�i�i�i
i�i1i�i�i
i�i�i'	iri
i�i�i�i�
i�i�ici�	iqi�ixi�ii
i2i�i�ii�i�	i*i�i�ibiFi�ivi�idi�
i�i�i!iRi�i�iQi�ii�iPi�iii�ii�i�i(	i�i�i_ii`i�i�if
i�i6
i�iAii�iai�i�iuiTii2i�i�iii�ii^iCi�i�
i�i[i�i�
ivi%i�i�i�ini!iFi�iZi^i�ii�idii�i�ix	i�i�i]i�iBiici�
i�i�i�iPiqi	iiHiY	i�i�i(
i�i�
i�igi}iKi�	i�ii4i�iWi�i�i�iCig
i-idi�ikii4i}i�iq
i~i+i�	i�i�ihi@	i�	ii@iA	iDi:i�i�iei�
i�iqiwi�i�i�i�i�i�i�idi�iZi�i*iM
i[i�i�isiZi�
i�i�i>i�i'i-i�i�
iii�i)	ii�i�i�itiFi7
i�iti#i�i�i�i�iiYi�i�ifikibi1i�i�
i�i6ioiciiqi�	i�i�i�i�
iui�i:i�i�iN
i�iUi=i�	ivi�iliNi�i�i�i]i�i;i�i�i�
i�i�iliLi	i}i�i�ii�iB	i�i8
iQi�i#i`iTi�i�	ixiiri�	iii�i�i�i�	i�i3inii�ii�ii�i{i�i�i@i�i�ii�i9
i�i�i�i5ih
idiZ	i�i�iiii�i�i�iisi-ir
i�iii�i[i�i0iii�i�i.iSi	iRiO
i�ii�i�i;i�i4iy	i�
i;i�iz	i�ipi�i�i i�i�i:
i(i|i�
i�i"i�i�i�i�i�i�iOi�iei�i�i�i
iC	iti)
ii6iKi�i�i8i�iP
iihi�i�i�ii�i3i$i�i�i*
i=ibieii�
i4i�i�i�	i.i7i�i\i�i�iiji�ii�i�i�i�i�i�i/ii�i�i�i=i�i^i�i5	i�i�i�	i\i�ii�i�i9i#i+i�
is
i,i�i7ii�iYi�i�i�
iMi�i+
ii
iQi�i�i6	i�i�i�i�iiyi�iisi#i{	i�
iUifi<i�i�ivi�i�i)i�
ii�ii�i�imi<iii�	i�i�igi�i�	ili�i iD	ibiui�
i�iDiBi�i�i�
i[	i�ii8i�i�i>ii�ii�i�i�i�ii]i�iDi�i�i�i6iZi�i�	i5i�i�
i�
i<imi�
i,i�	i�iui^i�	i�i�igi�i�iIi�i�igi�i�i\i:i
iMiti�	i�iEi�ioi�i�i�i�iEiRi�ii�iEij
i�igiWi�i�iKi�	iCi�i=i�i]i$i!i�i�	ii�i�i`iKiviii0iii�i^i�i�i3i�i"ii�i�i�iiaik
ii;
iwi�i�i�i�i�i�i�
iyii�i�i�iPii�i�	iwi�i�i�it
i�i�i�ii�i�iJiaii�i]i�i�i�i�	i�ii�iiLihii�i�i�
iu
iji�ii#iCi�i�i	iai�i!isi|	i�i	iYi�i
i�i�i�ihiOi5i�i�iziii�
iSi�iLi�i.i�i&ii	i<
i7i�isiAi�i�iMi�
i�isi�i*i,
i%i�
i�	i�iki�i&ifi�iOiji"i�i(i-i�i[i�i�i�i�i-i=i�i}	i�i�iMiSi�i�i�ii�iii�i�i�i�
i
ii
i�i~	i�iJitikivieiyii�i�i<
i�ifi�iMiki�
ii�ioi�i�i�iwiv
ili�i]i�ii.i�
i�i�i�i/if	iqi$igi�iGi�i�ini�i>i6i=
i�i�i�i�i�iNi�	ixi�iei*	iihii�i�i$i�i�i�ioibi,ii�i�iiti�i�i	i�ii�
iVi�i�
iiii�i�i�iw
iiipiHi�iVi�iii<iZi�	i8iriwi�i&i�i�i�i/i�i�i�i�i>i�i>
iE	ixi�i&iei�iwi	i�i�i5i�i�i�
ii\i�i�i�iSiiii�i�i�i2i�i�iii+i'i�i%i�i�ix
iOi�i
iQ
i�i�iii�i�i_iHi�i�ii�igii�iy
i�i�
i0i&i+	ii�ii�i�il
i'i�i'izi�i	i	i�i_i�i�ii�i�i�i?
i�
i�i�	i�iz
i�im
i|i
ii	ig	i0i�i�i i�i*i�i�i
i`iwii�i
i#i�ici)i�i�iR
i�i�i�iTi�i�iriiVi�i�i�i_ii�ii�iri�i�i�
i`ixi�i�i
i�i�ifi�iin
i=
i*iAii�	i(i�ixi�iS
i�i{iT
i�i9ii�iMi�iri�ii;ii(ii%i�i[iaibii�iDi�i�ii-
i\	i�iii�io
iEimi)i�i!i�iici�i,	i1ii]	i�i�i�i>iIi�i�i�	iTii�i�i�i�i�iyiikizixi�iNi	i�i�i�i	i5i�i�i"i�iHi<idi�i
i�i�ih	i�	i�i
ip
i�i�i:iLi1i�i�i�
ii�i>
i�iq
i?iZiMiIi�iiBiK	iDi�i#i
i
iYi>i�i�iii`i�i�i�i�ii�i�i�ii�i�i�i i�i�ici�ii�i�i�i�iTi�iaii2iyi/i�i"iU
i�i�ibi�i�i�i/i�i�	i�ii
i{i
i�iji�i�i�i5i*i�i�i�i�iaixi�i�i�	iiFi�i�i�i7i�i�i�	i?i�iwi�iii�i�i+i�i8i�i�
iNi�
i�i�i,i�ini�i
ii�ioisi_i?i�i�	i�i�ii�	i�i�i?i0i�	i�	i�iyi3ifi�i=i�i�ilii�	iivi]i�i	i	i�i�izi�
i�iyijiiui�i�ipi�iji�ii	
iiizii�ir
ii�i�i�i�i�iiiFi�i'i�	i{
iniixiui$ii�i�iMi�i�i�ikiipi�
i^	iqi
i`i|i�i�	ii

i|
i�	i�
ii�i�	i
i�i�i�i�	iGii�i-i�iZi1iYi�i-	i	iei�i�i[iCi�i�i�iei�i.i-ii�i�i	i�i�i�
i�
i7	ibili	i�i�i�i{i�i.i	i�i�izi�i�
i�
i�i?
i�ii9ii�
i�ii�i}i�i�
iai�i�	i
iQi�	idi;iV
i�i/i^iDi�i?imi�
i�
i9iIi�
i�i�i
ii�i�
i{i}i i�ii�i�i�i&i�i~i�iXi�i�i}
i�
i�i9i�i�i:i�i"i\ii�i
i_	i�i8iWi~
i^i%iPisi�iwi�i�ii8	i�iLi�ii.
i�i�i�
i�iiNi�i�iPi�iSi�i�i�i:iRi'i0ibii�i�
i�i�i�i�izii�	iiiiiKi�i�i�i�
iri�iqi
i�i�iniL	ii�ii�i�i�i�i�i�iXi@
i�igiii�i�i4i�i:ii�i�iri�	i�iQi�
ii	i;i'i�i>i�ibimi�iwi�i�i�is
i�ii�iA
i�it
i9	ii�iii�	ioi^i�i�i2i�ici�ii�i�iiri�i�i�i!iitii1i{i�i�i�i�i�i�isii�i�i�i�i�ixiiviaipi�i�i
i�iLiOi�iiUi�i.ii�i)i.	i�iEi�	i"iiyii	i�i�i�i�i(i�
ii�iqiEi6i
i�
i2iui6i�i�i�i�i.i�ii	ii�iVi�iisi�
i�i�iGiGijiti�iWii�	i�i�i`i�i�i�iui�ii�
i�i{iQii�	iOiCi�i�i�
i�iJi�	i	i	i$i�i�i�i/	i�ii_ii�iij	iRi�i7ii�i/
ii3iDiu
i6iXi4i�i�iii�ii>i�iii0
i`i`	i
i�i�i�iUi�i i�
irii�i)i�i5i�iHi�i 
i�ii~iri�i�
i�i�i�i�i�	i�ii]i�i�ii�ii�ii@
i�i�i�
iai�ivi�i�i�i/i!i6i�i�i�i7iwi�i	i3ici8ixii�i�iB
i�i�iM	i�i�iF	i�igii�i�i(i�i
i:	ii�iHi�i�
ifi�i�i"i�
i~i�i�i�i�
iyiii�i�i i!iNi�
i4iA
i�idiei�i�izii�i�i�i�i�i�i0	i�i�ii�i�i�ii�i{i�i�i�i�
i�ifi(ili�iGi�	i�i�i^iB
imiFi|iiUi�i�i2iRi�i�i#i�i�
i�i�iFi�iiUi�i�i�i1i�iciki�iN	iSi�	i�i�i�
i�i�i$iO	i�iiYi�i�i�i
i�iGiii�iW
i	iC
i?i�ii�i~i�i�iUiFi�i�i�ii�i�i�i�
iC
i�	i�i�iiei
i�i�i�ii/iQi_iv
i;i�i�iPi)i�iGimi�	i�i�iGi,iIizi_i�	i�i	i9ini�i�
iAi�	i�
iX
i�i#iVi)i<i%i�i}i�i�iHiw
i5i�ipi.ii�i�imii�i�i�
i#ihi|ibi�i�i�i@i(i^izi�iiAi�
i ii"iigi�i|i�i�i�i�i�i6i�iXi�i�i,i�i�i		ii�i$i#iIik	i�ii�i�i:i	i�iQiioihiVi$i�
i�iti�i�i�iY
i,i�ii
i�iD
i�i�	i~i�
i�
i�i�i%i�ii i�i�i�ii�i�
i i7i/i
	i�i�i�i�	iEiVi�i�
iE
iui�i&i�i�ii�i�	i�ioi�i�iZi�iii�i�i	ii�i�i�i!i�ini8i�i'i�i�i�ii�ii�i�	i�iGi�iRi2i�ii:i�i,i�iiZ
ili�i(iXiP	i?i�ii�	ioi�ii�i�i�i�iWi*ii�i;i8i�i&i)i�i�i
ioi�ii�i�iHi_i�i�i0i�ix
i�i0i�i;	i�i
i�i�iXi�i	i�i�i1i�iZi*i%i�	i�ii|idi`ii�iSiji}i\ii�i�iG	i�ii�	ifiqi%iBi�i1
ipi�i"ii�i�i�i�i|i�i�ii�	i�il	i2
i�i�
i�
ii�i@ihi�i;i�i�ii	i�i	i�i�i&ii�i�i}i�i%i�i�iii?i�i�	i�ia	iy
ii�
i�i�i�	i�i=i1i�i<i�i{i#ii�i�i�i�
iAi�i
i�iti�i�i�	i�i>i
iKi3
i�i�i=i�ii\i�i�i'iAi+igi�ib	iKi�i�i�i�i
i�i
i�i4
i�i*i�im	i�	i�i�
ioiNii0i(iii�i$i4i i{ii�i�iQ	i�i�iUi�i�i�i,i`ii�	i�ii�
iji)i i�i-i6i�i�	iF
i2i)ii
i*i�iYiZiJi�iHi�iii.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]isi^i_i�i`iaibicidi?ieifi@igihi%iiijiikiki�	i5
iAi
i�iliminioiBipiqiri�
i1	iiCiDitii�
isi&iEiFiti�iuii
i�
iviwixi�i�i�i'iGiyizi�	ii{iHii|i}i�i~i�
i(iIii)i�ii�
i�i�i!
i�i�iJi�i�iKi�i�iLi�i�i*i�iMi�i�i�i�i�i�i�i�iNii�i�i�i�
i�i�i+iOi,i�i-i�i.i�i�i
i�i�i�ii�iG
i�i�ii�i�i�i�ii�i�ii�i�iPii�i�i�i�i�i�i�	i/i�iQi�i�i�i�i�i�iRi�i�i�i�i�i
i�i�ii�i�iSi�iH
iTi�iUi�i�i�ii�i�i�i�i�i�
i�iVi
i�iWiXi�i�i�i�ii�i�iYi�i0i�i�iZi�i�i�i�i�i[i\i]i�i�i^i�i�i_i�i�i`i�iaibi?i�ici�idi�ii�iei�i1i�i�	ifiui�i�igi�i�i�
i�i2ii�i[
ii�i@i�i�i�iI
i�ihi"
i+iAi
i�i�iii,ijikiz
i-ili�i.ii/i�i�i�i�i�i�i�i�i3iimi�i�i�ii�iniD
i�i�i�iR	i�i�i�i�ioi�
ipiJ
i�ili
i4i2i�i�
i�ii�
ii�	iBi�
i�i�i�
i�iqiriK
i�i�i�
i�i�i�
ii�i5iE
i	
iIi�i

i6i�	i
ii�ivi�i�i�i7isi8i�	i
iL
iwi�i�i9i�itii�i�ii�i�i:i�iui�i�ii;i�i�i�i�i�i�
i�i i�iiiiii<iiiiiKi	i
i	ixiviii
ii!i=iii>iiiii�iii	iiii?iii@ii�iiiii�iiwi i�i!i"i"i�i#i$i0i%i&ii'i(i)i*i1i+i�i,i-i�
i.i<	i#i
i/i$i�i
i0ii1ixi2i3i�iyi4iyi5i%i&i�
i

izi6iCi7izi8i�iLiiBi'iAi
i�iiBi�i(i�i{i|i)i�iCi*i�i9i�
i�
ii:i;i<i�i�
i}i~i=iDi�i>ii?i@iAiBi�i�i�i�iCiDiDic	iiEiFi�
iiGi�iHiIiJiKiLiMiNi{iOi�i+iPi3iQi�i�
iRi�	iEiSiTiUiVi�i�iWiXiYi2iZi[i\i]i^i_i`i�i�iaibi�icidimiEiFieifi�igihi�iiijikiJiliminioipiqirisitiuiviwi�
iGixiyizi�i,i�i-i�i.i
iMi�i{i�i�i�i�i|i�iHi}i�i~i�i/iniIiii�i0iJi�iKi�i�i#
i�i�i�i�i3i�i�i�i�i�i�i�i�i�i�i�i�i�i�i1i�i�i�i�i2iM
i�i3i�i�i�iLi�i�i�i�i�i4i�i�i�i�
i�i�
iMi�i4i�i�i�i5i�i�
i�
i6i�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i7i�i�iNi�iOi�
iPi|i�i�iQi�i�i�	iKi�
i�i�i�
i�i8i�i�i}i�i
i�	i�ii�iiN
i9i�iLiRi�i:i�i;i�i�iFi�i{
i�iSi�i�i�i<i�i�i=i�i�i�i�i�
i�i�i�
i�i�iTi�i�i�i�i�i>i�iO
i5i�i�i�i~i�i?i�iii�i�
i�i�
i@i@i�i�i
i�i�i�iAi�iioi�iGi�i�i�i�iii�
i�i�i6i�	i�i�ii�i�i�
i�iUi�
i�ii�i�i�i�ii�i�i�i�i�i�
i�iBiCi�i7i
i�i�iVi�iNi�i�i�iDi�i�i�i�i�i�
i�iWi�i�i�iXi�
i�iEiFii�iYi�
i�i�i4i�i�iGi�i�iHin	i�	ipi�iZiS	i�i�i�i[i�iciIi�i�i�i�i�i�i
i�i�i8i�i�
i
i9i�i�iHi�ii�
i\i:i�i�ii�
i�ii�iJi�i�i�i�i
i�i]i�i�i�iiii�
i�i�ii�ii
i�iiii�iii	i
iii
i�i�iii�
iii�
i�i�iiiiIi�i�iiiiiiP
iiiii�i�iii�iKii�i�i�ii i!i^i"i#i�
i$i�
i%iLi&i'i(i)i*i+i�i,i-i�i�
i.iJi/i0iQ
i�i1iMi2i3i4i�	i�i5i6i7i�
i8i9i:i�i;i;iNiOi<i�
i=iPiQi>i?i@iAi�iBi�i�iCiDi<i�iRiEiFi�i�
iGiHiIiJiKi�
ii�
iSiLiMi�i�i�
iNiOiPiQiTi
iRiR
i�iSiTi�iUiVi�iS
i_iWiXiYiZi[ii\i�i]i^i_i`iaibiciidi�iei�i�ifi�
i�igihiiiUijikilimi=inioi�
i`ipi�iqiri~isii�itiuiviai�iVi�
i�iWiwi�ixiyi�izi�i�
i�i{i|i}i�
i~iMii�ibi�i�i�i�iXi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i
i�i�
i�i�ici�i�i�i�idi�i�i�i�ii�i i�i�
i�i�i�iYi�iZiei[i�i�i�iT
i�i+i�i�i�i�ii�i�i�i�i�i�i�i>i�i�i�i�i�i�i�i�
i�i�i�i\i�ifi�i�i]i�i�igi�i�i�i�ii�i�	i�i�iU
i
i�i�ii�i�
i^i�i�i_i�i�i�i�	i`i�iai�i�i�i i�i�i�i�i�i�ihiiiji�i�i�i�ibi�
i!i�i�i�i�i�ici�i[i�i�
i�i�i
i�i�i
i�i�
iV
ikidi�ili�i�i"i#i�i�i�i�i�i�i�iei?i�i�i�i�i�i�i�ifi�i5i�i�i�i�i�i�i�imi�i�i�i@inigi�i�i�i�i$i�i�ioi�iW
i�i�i�ipiqi�iri
i�i
i�
i�i�
i\
i�i�
i�i�i�i�i�ihi�i�i�i�i�i�isi�i�i�i�i�i�iti�i�i�i�
i�
i�i�i�i�i�i�iAiBi�i!i�
i�i�
ii�i�iiiii�ii
i�i�iii�iiCiiuiDi6iijii�	i	i
i�i�
i�ii
i�i�ii�ikiEi�	i
i�i�	iii�i�iKii�
iiiilii%imi�
iFiiiiii�iF
ivi�ini�iwiiLixioi�i�iyiii"i�iipiiii�i izi�iqi!i"i�
i#i�iri$i%iNi&i'i�i(i{i�i7i)i*i+i,isi-i�
i.i/i0i�ii�i1i
i�
i2i�i3i4iti�i�
i5ii�i�i6i�i&i�i�i�i7iqi'i�i�i8i9i�i:i|i;i<i=i>i?i@i�iAiBiCiDiEiFi�iGiHiIi�
i�
iJi�
iX
iKiLiMiNiOiPiQiRiSiTiUi�iViWi�iXiYi�iZi[i}i\i]i�
i�i^i�
i_i6
i�i
i`iai�iGiHi�i�
i�
i(i~i�i)i�i*iIi�
i�
i�ibiMiciui�i�	i�
i�i�idieifi=	i�ivigihi�iiijii}ikilimiwini�
ixioipiqiri�isi�
i�i�i�i�itiui�i+i�iviyi�iwi�	i�i,ixi�iyi�iOi�izi�i�iY
i�
i�i9izi{i�i$
i�i�i�i{i�ii�i7
i�
ii�iJiZ
ii�i�i�
i|i}i~i�
i8i�i|ii�i}i�i�i�i�i�i�i�i�i�i�	i�i�i�i�i�i�i�i~i�i�i�iKi�i�
i�i�i�i�i�i�iLi�i�i�i-i�i�	i�i�i�i�i�i�i�i�i�i�i�ii�ii�i�i�i�ii
i�i]
i�i�ii.i�i�ii�i�i�i�i�i�i�	i�i�i�i�iNi�ii�iPi
i�iri�i�i�i�i�i�i�iMi�i�i�i�i�i�i�i�i�i�	i�i�i�i�iOi�i�i�i�iNi�i�iiOii�i�i�i�i�i�
i�i�i	i�i�i�i�i
i�i�i�ii�i�
i 	ii�i�i[
i�i
ii�i�ii�i�i�i�iii�iPiii�i�i�i�ii�i�
i�i�i�i�ii�i/i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�ii�i�i�i�i�i�i�i�ii�i�i0i�iQi�i�i�i�i�i�i�i�isiii�i�iG
i1i�i�
i�i�ii�i�i�i�ii�ii�i�ii�iiRii�
iii�iii i 
i\
i�i�i|
i�ii�iii	i�i�i
iiiiPi2iQi�i�i
iii�i�i�i�ii�ii�	iii�iiiiii ii!i�i�i"ii�
iii#i�ii!i�
ii$ii i!i�i"i!
i#i$i�i%i&i%i�i&i'i	i'i(i(i)i)i#i*i+i�
i,i�
i*i-i�iSi+i.i�i2	i3iH	i�i�i/i0i1i2i3i�i4i,i�i}
i5i�
i-iH
iRi.i6i!	i7i/i8i9i:i0i1i�i�i�i;ii<i=i>i?i@iAiBi2i�i�iCiDiEi~
iFi3iGiQi�iHi�iIi�	iJi�i"
i�iKiLiMi4iNiOi�i#
iPiQiRiSi�i�iTiUi5iViWi�i�i6i7i�i4i8i"i�
i9iXiYiZi:i[i;i$
i�i�i�i\i�i�
i]i^i<i_i�i5i�i�i`iaibicidiei�i�ifiigi�i=i�i�ihi�i�i�iiiji�
ikilimi�i�i>ini#i6ioipi?iqi�irisiTitiui�i�i�ivi
i�i@iAi�iwi�i�ixi�iyizi{iUi|i}iBiCiDi3	iEi~iI
i�ii�i�i�i�i�i�i�i�iFi�i�i�i�i�i�i�
i�i�iGi�iHi�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�
i�i�i�i�i�iIi�i�i�i�i�i�iJiKi�i�i�i�i�i�i�i�iLi�i�iMi�i�i�i�
i�
i�iNi�i�i�i�i�
i�iT	i�i�i�i�i�i�iOi�i�i�iPi�i�i�i�i�iQi�i�i�i�i7i�i8i�i9i�i�i�i�i�i�i:i�i�i�i�i�i�i�i�i�iRi�i�i�i;i�iSi�i�
i�iTi�i�i�i�iUi�
iVi�iWi�i�i�	iXi�iYiSi�iZi[i�i�	i�i�i�i�
i�i�i�i�iVi\iWi�iU	i�
i�i�i"	i�i�i�i�i�i�i]i�i�i�i�i^i�i�i�i�i�i�i�i_i�i�i�i`i$iai�i�i�ibi]
i�i�ici�idiAi�iei�i�i�iifi�i�i^
i�i<ii�i�i�i$i�i�i�i�i�i^
i_
igi�i�i�ii%i�i�i�i=i�i>i�i�i�i%i	i?i�i�i�i�iti�i�i�i@iXi`
i�i�i�i�i�ihi�i�i�i�i�iiii�iiYi%
i�ii&i�	iZiiiTiii�
i	ia
i�i
i�i9ii�iii�i�iRi�i�ii�ii�iui�i�ijiki�i
ili�ii�iiiiiimiAii:iiiii�ii�iBiiniii�i[ii
ii�iii i�i\i!ioi"ipi�i�i�
iJ
iqi]i�i�i#i$i%i&iCi�iri'i(i)i*isiti+i,i�i�i-i.i/i^iui0i�	i1i�i�i�i2iDio	ivi3i�i4iwi_
i5i6i�
i�i&i;i7i8i�i9i�ixi:i;i�i<i_i&
i`ii�
i�
i'
ii�i�i=i�iSi>i?iUi�	i�i�i�iyizi'i�i
i(
i�i�i�i�i@iEi�
iAi`
i�iVi�i{i�iWiXiBi(i|i}i�i~ii�i'iCiDi�i�iEiFi�iGiHiIiJi�iKib
i�i�iLiai�i�i�iFiMi�i�i�iNiOi�iPi�iQi�i�i�i�ii�iRiSi�
i�iTi�iUi)
i�iVii�	iWiXi�i)i�i8
iYiZi[i\i]i^iiGi�i�
i_i`i�i�iaibicidi�i�iei�ibi�i�i�ifigihiii�ijiki�i�i�ilimini�i�i�iYioipi�iqiZirisi�itiuiviwixiyi�izi�i{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i<i�i�i�i�iTi�i�iHi�i�i�i�i�i�i�i�i�i�i�i�i�i�ivi�i�i�i�i�i�i�i�i�i�i�i�iIi�i�i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i[i�i�i�iJi�i�i�
i�i�i�i�i�i�i�i�i�
i�i�i�i�i�iiUi
ici�i�i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iKi�i�i�i�i�i�i�i�i�i�i�ic
i�i�i�i�i�i�i�i�i�iLi�i�i�i�i�i�i�id
ii�i�i9
i�i�ii�i�iVi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�i�i�idii�
i�i�i�	i�i�ii1i�i�
i*i�iMi�ipi�i�i�i�i�i�i�i�i	i�i�i�i�i�i�i�i�i�i�i�i�i�i�i>	i�i�i�i	iii�i
iNi�i�ii�iOi*
i�i�i(ii�
iii�i�iii�i�
ii	i
ii+
ii
i=i�iiiPi�i�iiii�ii�i�i�i�i�iiii�i�i�ii�ii�i�i�i:i�ii�ii�i;i,
ii�i�i�ii�ii�i�i�i�i�i�i�i-
ii�ii�ii i�i�i�i!i"i#i�i$i%i&i'i�i�i(i)i*i�i+i�ie
i,i-i.i/iQi0i�i�i�i1i2i3i4i5i6i7i�i�i8i9i:i;iRiei<i=i>i?iK
i�i@i�i�iAiBi
iCiDiEiFiSiGiHiIiJiKi�iWiLiMiNiOiPiTiQi�i�iRiSi�i�iTi�iUiVi�iUiWiXiYiZi[i\i]i^i_i`iiai�i�i�ibi�i�icidi�ieifi�igiihiiif
i?	iji\i�i�i�ikili�i�i�imi.
i+inioipiqirisiti
i�iuivifi,i�i�iwixi�iyizi�i�i�i�ii{i|i�i}i~i�i�i�
ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iVi�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i i i i i i i i i i	 i
 i i i
 i i i i i i i i i i i i i i i i i i i  i! i" i# i$ i% i& i' i( i) i* i+ i, i- i. i/ i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i: i; i< i= i> i? i@ iA iB iC iD iE iF iG iH iI iJ iK iL iM iN iO N(P i(iii�i�i�i'iOii}i�i�i�i�i]i�
i�
ii�
i�i�i�i�ii�i�i�ii�i�iXi}i�i�ikiig
i�
i�iki�i�i�iiiii�i�i%i&i0i1i,i-i�i�iii�ii�i�i�i<ii�ipi�i�i�i�i�i�igi�ii�iWiXi�i�ih
i"i�i�i�i�i
i	ii\i�i�i�
i/
i�i�i�i�ii�i0
i�i�
ihi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii ii!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i�iViji4i�ii�iBii�i8i9i:i;i<i=i>ivi�i�i�iSi�ieiifi�i�id	i+i�i�iaiwi�i�i�iIi�i~i�i�
ii?i@iAiBiCiDi
ii-iiiii�i�
iiEi^i.i�i3iii
iFi/iYi�i�ii�iji�
iiGiHiIiJiqii1
iiYiiki/ii2iii#iii�i*i�ii�ii�ii[ii\i5i�i!i!i	i%i@ilii'iAiiii4i
ii�i�iii<ii�i�i-i�ii7iSi�i�i~iKi=iiEi�i;ii�i7i7i8imi&iii
iiOiKi=i~idiiiLiMiNiOiPiQiRiSiTiUiViYi>iJi"ip	ipi�i�ii�iTi_i�i�i.iXi�i�iLijieii9iPi iliyi�i�iiDi�i�i�i)ihi�iFi?ii+iiigicii�iBi]iNi�i�i8iji:i5iii7ii�iRi4iGidi�i�i�iniihiti6i3i$iWiCi�i�i:
ixi�ii*iV	iiWiXiYiZi[i\i]i^i_i`iiaibicidieifigihiiijikiliminioipiqirisiti�
iuiviwixiyizi{i|i�i�ii�ili}i�i~iii	i�i�
i�ii�i
i�i�ii�iiii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiki�i�
i>i�
i�
i	i�i
	ij
i�i�i�iZi[i\i]iiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii
i�i�i�i�ii�i2
i�i�i{iTi�ia
i�
i^i�i�i|i�i=iimik
i�i�i�i	iViyi�	i�i
iq	ii�ii�
i�	i�i�i�i�i!i�i�	i�ii�i�i�iCiOi3ii�i�i�i�ir	i�i�ini�i+ii�i�i�
ipiqi�i;
iAi�i�i�iCi0i�ini�
i�i�iTiCioi
i�i
i#	ii�i~iiPi�i�i�ii�i�	ii�	i�i$	izi�i�i&i�i�i�i�ii�i�i�i�i_ii�iUi�i�
is	i�	i�i�iIi�i�i�ii�i�i�i3
i�ii$iWi1i5iPi�	i�ii�i�i�i�iXi�i�i�il
i�i�iHi�i�	ii�i�ii�i
i�
iWi�i~ipii$i�iii@iLi�i�	i�i�i�iuiiiJiI	iW	i�i�i_i�i�	i<i�i�ii]iDi�i�i�iihi�i�i�i�ii�ifi-i�i}it	i�i�	ii�i�i�i,i�i
ibi�i�iXi�iiFii{i`i�i�i+i3iqi�imi�i4
i�i�i�i�i�iBiliX	i�
ii%
i�i�i%	i2iui�i�	i�	i�iJii|iri�i@ii�iii�i�i�
i�i�	iL
iiiii�i�ib
iJ	iici�i�i�i�i�i�ii4	iRi�im
iTi�i�ii�i�i�i�i�ie	i�ii?i
i�i�i�ii-i	i�i*iEi�i�i+i�i�i&	i�	i�i�i/i�i�i.isi[i�i+ii�
ii�
iBic
i�i�i�i�i�i	i)ii,i�iu	ii	ii9i&
iii�i�i�iv	i�iYi�i3i�i
i�i�iiDi�i�i�i�idi�i�i|i(iyii�ii�i<i8i�	iiiiiid
i5
iBi�inii�ii�i�i|i�	i!i�i)i@in
imii�	i0iai�i�i�	izi'i�i�i�	iWi�i[ivi�i�i�	i�i�i	io
ii�	i�i
ii�i'
i�ii"i�i�i9ii�ii�iJi�i�ihi�i�ie
ii�i\i�i�iip
i@iiQi9i�i�i�i	i�i�i�iw	iiiEi�iJiIi�	i�i�i�i�iifi�i�i�i
i�i1i�i�i
i�i�i'	iri
i�i�i�i�
i�i�ici�	iqi�ixi�ii
i2i�i�ii�i�	i*i�i�ibiFi�ivi�idi�
i�i�i!iRi�i�iQi�ii�iPi�iii�ii�i�i(	i�i�i_ii`i�i�if
i�i6
i�iAii�iai�i�iuiTii2i�i�iii�ii^iCi�i�
i�i[i�i�
ivi%i�i�i�ini!iFi�iZi^i�ii�idii�i�ix	i�i�i]i�iBiici�
i�i�i�iPiqi	iiHiY	i�i�i(
i�i�
i�igi}iKi�	i�ii4i�iWi�i�i�iCig
i-idi�ikii4i}i�iq
i~i+i�	i�i�ihi@	i�	ii@iA	iDi:i�i�iei�
i�iqiwi�i�i�i�i�i�i�idi�iZi�i*iM
i[i�i�isiZi�
i�i�i>i�i'i-i�i�
iii�i)	ii�i�i�itiFi7
i�iti#i�i�i�i�iiYi�i�ifikibi1i�i�
i�i6ioiciiqi�	i�i�i�i�
iui�i:i�i�iN
i�iUi=i�	ivi�iliNi�i�i�i]i�i;i�i�i�
i�i�iliLi	i}i�i�ii�iB	i�i8
iQi�i#i`iTi�i�	ixiiri�	iii�i�i�i�	i�i3inii�ii�ii�i{i�i�i@i�i�ii�i9
i�i�i�i5ih
idiZ	i�i�iiii�i�i�iisi-ir
i�iii�i[i�i0iii�i�i.iSi	iRiO
i�ii�i�i;i�i4iy	i�
i;i�iz	i�ipi�i�i i�i�i:
i(i|i�
i�i"i�i�i�i�i�i�iOi�iei�i�i�i
iC	iti)
ii6iKi�i�i8i�iP
iihi�i�i�ii�i3i$i�i�i*
i=ibieii�
i4i�i�i�	i.i7i�i\i�i�iiji�ii�i�i�i�i�i�i/ii�i�i�i=i�i^i�i5	i�i�i�	i\i�ii�i�i9i#i+i�
is
i,i�i7ii�iYi�i�i�
iMi�i+
ii
iQi�i�i6	i�i�i�i�iiyi�iisi#i{	i�
iUifi<i�i�ivi�i�i)i�
ii�ii�i�imi<iii�	i�i�igi�i�	ili�i iD	ibiui�
i�iDiBi�i�i�
i[	i�ii8i�i�i>ii�ii�i�i�i�ii]i�iDi�i�i�i6iZi�i�	i5i�i�
i�
i<imi�
i,i�	i�iui^i�	i�i�igi�i�iIi�i�igi�i�i\i:i
iMiti�	i�iEi�ioi�i�i�i�iEiRi�ii�iEij
i�igiWi�i�iKi�	iCi�i=i�i]i$i!i�i�	ii�i�i`iKiviii0iii�i^i�i�i3i�i"ii�i�i�iiaik
ii;
iwi�i�i�i�i�i�i�
iyii�i�i�iPii�i�	iwi�i�i�it
i�i�i�ii�i�iJiaii�i]i�i�i�i�	i�ii�iiLihii�i�i�
iu
iji�ii#iCi�i�i	iai�i!isi|	i�i	iYi�i
i�i�i�ihiOi5i�i�iziii�
iSi�iLi�i.i�i&ii	i<
i7i�isiAi�i�iMi�
i�isi�i*i,
i%i�
i�	i�iki�i&ifi�iOiji"i�i(i-i�i[i�i�i�i�i-i=i�i}	i�i�iMiSi�i�i�ii�iii�i�i�i�
i
ii
i�i~	i�iJitikivieiyii�i�i<
i�ifi�iMiki�
ii�ioi�i�i�iwiv
ili�i]i�ii.i�
i�i�i�i/if	iqi$igi�iGi�i�ini�i>i6i=
i�i�i�i�i�iNi�	ixi�iei*	iihii�i�i$i�i�i�ioibi,ii�i�iiti�i�i	i�ii�
iVi�i�
iiii�i�i�iw
iiipiHi�iVi�iii<iZi�	i8iriwi�i&i�i�i�i/i�i�i�i�i>i�i>
iE	ixi�i&iei�iwi	i�i�i5i�i�i�
ii\i�i�i�iSiiii�i�i�i2i�i�iii+i'i�i%i�i�ix
iOi�i
iQ
i�i�iii�i�i_iHi�i�ii�igii�iy
i�i�
i0i&i+	ii�ii�i�il
i'i�i'izi�i	i	i�i_i�i�ii�i�i�i?
i�
i�i�	i�iz
i�im
i|i
ii	ig	i0i�i�i i�i*i�i�i
i`iwii�i
i#i�ici)i�i�iR
i�i�i�iTi�i�iriiVi�i�i�i_ii�ii�iri�i�i�
i`ixi�i�i
i�i�ifi�iin
i=
i*iAii�	i(i�ixi�iS
i�i{iT
i�i9ii�iMi�iri�ii;ii(ii%i�i[iaibii�iDi�i�ii-
i\	i�iii�io
iEimi)i�i!i�iici�i,	i1ii]	i�i�i�i>iIi�i�i�	iTii�i�i�i�i�iyiikizixi�iNi	i�i�i�i	i5i�i�i"i�iHi<idi�i
i�i�ih	i�	i�i
ip
i�i�i:iLi1i�i�i�
ii�i>
i�iq
i?iZiMiIi�iiBiK	iDi�i#i
i
iYi>i�i�iii`i�i�i�i�ii�i�i�ii�i�i�i i�i�ici�ii�i�i�i�iTi�iaii2iyi/i�i"iU
i�i�ibi�i�i�i/i�i�	i�ii
i{i
i�iji�i�i�i5i*i�i�i�i�iaixi�i�i�	iiFi�i�i�i7i�i�i�	i?i�iwi�iii�i�i+i�i8i�i�
iNi�
i�i�i,i�ini�i
ii�ioisi_i?i�i�	i�i�ii�	i�i�i?i0i�	i�	i�iyi3ifi�i=i�i�ilii�	iivi]i�i	i	i�i�izi�
i�iyijiiui�i�ipi�iji�ii	
iiizii�ir
ii�i�i�i�i�iiiFi�i'i�	i{
iniixiui$ii�i�iMi�i�i�ikiipi�
i^	iqi
i`i|i�i�	ii

i|
i�	i�
ii�i�	i
i�i�i�i�	iGii�i-i�iZi1iYi�i-	i	iei�i�i[iCi�i�i�iei�i.i-ii�i�i	i�i�i�
i�
i7	ibili	i�i�i�i{i�i.i	i�i�izi�i�
i�
i�i?
i�ii9ii�
i�ii�i}i�i�
iai�i�	i
iQi�	idi;iV
i�i/i^iDi�i?imi�
i�
i9iIi�
i�i�i
ii�i�
i{i}i i�ii�i�i�i&i�i~i�iXi�i�i}
i�
i�i9i�i�i:i�i"i\ii�i
i_	i�i8iWi~
i^i%iPisi�iwi�i�ii8	i�iLi�ii.
i�i�i�
i�iiNi�i�iPi�iSi�i�i�i:iRi'i0ibii�i�
i�i�i�i�izii�	iiiiiKi�i�i�i�
iri�iqi
i�i�iniL	ii�ii�i�i�i�i�i�iXi@
i�igiii�i�i4i�i:ii�i�iri�	i�iQi�
ii	i;i'i�i>i�ibimi�iwi�i�i�is
i�ii�iA
i�it
i9	ii�iii�	ioi^i�i�i2i�ici�ii�i�iiri�i�i�i!iitii1i{i�i�i�i�i�i�isii�i�i�i�i�ixiiviaipi�i�i
i�iLiOi�iiUi�i.ii�i)i.	i�iEi�	i"iiyii	i�i�i�i�i(i�
ii�iqiEi6i
i�
i2iui6i�i�i�i�i.i�ii	ii�iVi�iisi�
i�i�iGiGijiti�iWii�	i�i�i`i�i�i�iui�ii�
i�i{iQii�	iOiCi�i�i�
i�iJi�	i	i	i$i�i�i�i/	i�ii_ii�iij	iRi�i7ii�i/
ii3iDiu
i6iXi4i�i�iii�ii>i�iii0
i`i`	i
i�i�i�iUi�i i�
irii�i)i�i5i�iHi�i 
i�ii~iri�i�
i�i�i�i�i�	i�ii]i�i�ii�ii�ii@
i�i�i�
iai�ivi�i�i�i/i!i6i�i�i�i7iwi�i	i3ici8ixii�i�iB
i�i�iM	i�i�iF	i�igii�i�i(i�i
i:	ii�iHi�i�
ifi�i�i"i�
i~i�i�i�i�
iyiii�i�i i!iNi�
i4iA
i�idiei�i�izii�i�i�i�i�i�i0	i�i�ii�i�i�ii�i{i�i�i�i�
i�ifi(ili�iGi�	i�i�i^iB
imiFi|iiUi�i�i2iRi�i�i#i�i�
i�i�iFi�iiUi�i�i�i1i�iciki�iN	iSi�	i�i�i�
i�i�i$iO	i�iiYi�i�i�i
i�iGiii�iW
i	iC
i?i�ii�i~i�i�iUiFi�i�i�ii�i�i�i�
iC
i�	i�i�iiei
i�i�i�ii/iQi_iv
i;i�i�iPi)i�iGimi�	i�i�iGi,iIizi_i�	i�i	i9ini�i�
iAi�	i�
iX
i�i#iVi)i<i%i�i}i�i�iHiw
i5i�ipi.ii�i�imii�i�i�
i#ihi|ibi�i�i�i@i(i^izi�iiAi�
i ii"iigi�i|i�i�i�i�i�i6i�iXi�i�i,i�i�i		ii�i$i#iIik	i�ii�i�i:i	i�iQiioihiVi$i�
i�iti�i�i�iY
i,i�ii
i�iD
i�i�	i~i�
i�
i�i�i%i�ii i�i�i�ii�i�
i i7i/i
	i�i�i�i�	iEiVi�i�
iE
iui�i&i�i�ii�i�	i�ioi�i�iZi�iii�i�i	ii�i�i�i!i�ini8i�i'i�i�i�ii�ii�i�	i�iGi�iRi2i�ii:i�i,i�iiZ
ili�i(iXiP	i?i�ii�	ioi�ii�i�i�i�iWi*ii�i;i8i�i&i)i�i�i
ioi�ii�i�iHi_i�i�i0i�ix
i�i0i�i;	i�i
i�i�iXi�i	i�i�i1i�iZi*i%i�	i�ii|idi`ii�iSiji}i\ii�i�iG	i�ii�	ifiqi%iBi�i1
ipi�i"ii�i�i�i�i|i�i�ii�	i�il	i2
i�i�
i�
ii�i@ihi�i;i�i�ii	i�i	i�i�i&ii�i�i}i�i%i�i�iii?i�i�	i�ia	iy
ii�
i�i�i�	i�i=i1i�i<i�i{i#ii�i�i�i�
iAi�i
i�iti�i�i�	i�i>i
iKi3
i�i�i=i�ii\i�i�i'iAi+igi�ib	iKi�i�i�i�i
i�i
i�i4
i�i*i�im	i�	i�i�
ioiNii0i(iii�i$i4i i{ii�i�iQ	i�i�iUi�i�i�i,i`ii�	i�ii�
iji)i i�i-i6i�i�	iF
i2i)ii
i*i�iYiZiJi�iHi�iii.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]isi^i_i�i`iaibicidi?ieifi@igihi%iiijiikiki�	i5
iAi
i�iliminioiBipiqiri�
i1	iiCiDitii�
isi&iEiFiti�iuii
ii�
iviwixi�i�i�i'iGiyizi�	ii{iHii|i}i�i~i�
i(iIii)i�ii�
i�i�i!
i�i�iJi�i�iKi�i�iLi�i�i*i�iMi�i�i�i�i�i�i�i�iNii�i�i�i�
i�i�i+iOi,i�i-i�i.i�i�i
i�i�i�ii�iG
i�i�ii�i�i�i�ii�i�ii�i�iPii�i�i�i�i�i�i�	i/i�iQi�i�i�i�i�i�iRi�i�i�i�i�i
i�i�ii�i�iSi�iH
iTi�iUi�i�i�ii�i�i�i�i�i�
i�iVi
i�iWiXi�i�i�i�ii�i�iYi�i0i�i�iZi�i�i�i�i�i[i\i]i�i�i^i�i�i_i�i�i`i�iaibi?i�ici�idi�ii�iei�i1i�i�	ifiui�i�igi�i�i�
i�i2ii�i[
ii�i@i�i�i�iI
i�ihi"
i+iAi
i�i�iii,ijikiz
i-ili�i.ii/i�i�i�i�i�i�i�i�i3iimi�i�i�ii�iniD
i�i�i�iR	i�i�i�i�ioi�
ipiJ
i�ili
i4i2i�i�
i�ii�
ii�	iBi�
i�i�i�
i�iqiriK
i�i�i�
i�i�i�
ii�i5iE
i	
iIi�i

i6i�	i
ii�ivi�i�i�i7isi8i�	i
iL
iwi�i�i9i�itii�i�ii�i�i:i�iui�i�ii;i�i�i�i�i�i�
i�i i�iiiiii<iiiiiKi	i
i	ixiviii
ii!i=iii>iiiii�iii	iiii?iii@ii�iiiii�iiwi i�i!i"i"i�i#i$i0i%i&ii'i(i)i*i1i+i�i,i-i�
i.i<	i#i
i/i$i�i
i0ii1ixi2i3i�iyi4iyi5i%i&i�
i

izi6iCi7izi8i�iLiiBi'iAi
i�iiBi�i(i�i{i|i)i�iCi*i�i9i�
i�
ii:i;i<i�i�
i}i~i=iDi�i>ii?i@iAiBi�i�i�i�iCiDiDic	iiEiFi�
iiGi�iHiIiJiKiLiMiNi{iOi�i+iPi3iQi�i�
iRi�	iEiSiTiUiVi�i�iWiXiYi2iZi[i\i]i^i_i`i�i�iaibi�icidimiEiFieifi�igihi�iiijikiJiliminioipiqirisitiuiviwi�
iGixiyizi�i,i�i-i�i.i
iMi�i{i�i�i�i�i|i�iHi}i�i~i�i/iniIiii�i0iJi�iKi�i�i#
i�i�i�i�i3i�i�i�i�i�i�i�i�i�i�i�i�i�i�i1i�i�i�i�i2iM
i�i3i�i�i�iLi�i�i�i�i�i4i�i�i�i�
i�i�
iMi�i4i�i�i�i5i�i�
i�
i6i�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i7i�i�iNi�iOi�
iPi|i�i�iQi�i�i�	iKi�
i�i�i�
i�i8i�i�i}i�i
i�	i�ii�iiN
i9i�iLiRi�i:i�i;i�i�iFi�i{
i�iSi�i�i�i<i�i�i=i�i�i�i�i�
i�i�i�
i�i�iTi�i�i�i�i�i>i�iO
i5i�i�i�i~i�i?i�iii�i�
i�i�
i@i@i�i�i
i�i�i�iAi�iioi�iGi�i�i�i�iii�
i�i�i6i�	i�i�ii�i�i�
i�iUi�
i�ii�i�i�i�ii�i�i�i�i�i�
i�iBiCi�i7i
i�i�iVi�iNi�i�i�iDi�i�i�i�i�i�
i�iWi�i�i�iXi�
i�iEiFii�iYi�
i�i�i4i�i�iGi�i�iHin	i�	ipi�iZiS	i�i�i�i[i�iciIi�i�i�i�i�i�i
i�i�i8i�i�
i
i9i�i�iHi�ii�
i\i:i�i�ii�
i�ii�iJi�i�i�i�i
i�i]i�i�i�iiii�
i�i�ii�ii
i�iiii�iii	i
iii
i�i�iii�
iii�
i�i�iiiiIi�i�iiiiiiP
iiiii�i�iii�iKii�i�i�ii i!i^i"i#i�
i$i�
i%iLi&i'i(i)i*i+i�i,i-i�i�
i.iJi/i0iQ
i�i1iMi2i3i4i�	i�i5i6i7i�
i8i9i:i�i;i;iNiOi<i�
i=iPiQi>i?i@iAi�iBi�i�iCiDi<i�iRiEiFi�i�
iGiHiIiJiKi�
ii�
iSiLiMi�i�i�
iNiOiPiQiTi
iRiR
i�iSiTi�iUiVi�iS
i_iWiXiYiZi[ii\i�i]i^i_i`iaibiciidi�iei�i�ifi�
i�igihiiiUijikilimi=inioi�
i`ipi�iqiri~isii�itiuiviai�iVi�
i�iWiwi�ixiyi�izi�i�
i�i{i|i}i�
i~iMii�ibi�i�i�i�iXi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i
i�i�
i�i�ici�i�i�i�idi�i�i�i�ii�i i�i�
i�i�i�iYi�iZiei[i�i�i�iT
i�i+i�i�i�i�ii�i�i�i�i�i�i�i>i�i�i�i�i�i�i�i�
i�i�i�i\i�ifi�i�i]i�i�igi�i�i�i�ii�i�	i�i�iU
i
i�i�ii�i�
i^i�i�i_i�i�i�i�	i`i�iai�i�i�i i�i�i�i�i�i�ihiiiji�i�i�i�ibi�
i!i�i�i�i�i�ici�i[i�i�
i�i�i
i�i�i
i�i�
iV
ikidi�ili�i�i"i#i�i�i�i�i�i�i�iei?i�i�i�i�i�i�i�ifi�i5i�i�i�i�i�i�i�imi�i�i�i@inigi�i�i�i�i$i�i�ioi�iW
i�i�i�ipiqi�iri
i�i
i�
i�i�
i\
i�i�
i�i�i�i�i�ihi�i�i�i�i�i�isi�i�i�i�i�i�iti�i�i�i�
i�
i�i�i�i�i�i�iAiBi�i!i�
i�i�
ii�i�iiiii�ii
i�i�iii�iiCiiuiDi6iijii�	i	i
i�i�
i�ii
i�i�ii�ikiEi�	i
i�i�	iii�i�iKii�
iiiilii%imi�
iFiiiiii�iF
ivi�ini�iwiiLixioi�i�iyiii"i�iipiiii�i izi�iqi!i"i�
i#i�iri$i%iNi&i'i�i(i{i�i7i)i*i+i,isi-i�
i.i/i0i�ii�i1i
i�
i2i�i3i4iti�i�
i5ii�i�i6i�i&i�i�i�i7iqi'i�i�i8i9i�i:i|i;i<i=i>i?i@i�iAiBiCiDiEiFi�iGiHiIi�
i�
iJi�
iX
iKiLiMiNiOiPiQiRiSiTiUi�iViWi�iXiYi�iZi[i}i\i]i�
i�i^i�
i_i6
i�i
i`iai�iGiHi�i�
i�
i(i~i�i)i�i*iIi�
i�
i�ibiMiciui�i�	i�
i�i�idieifi=	i�ivigihi�iiijii}ikilimiwini�
ixioipiqiri�isi�
i�i�i�i�itiui�i+i�iviyi�iwi�	i�i,ixi�iyi�iOi�izi�i�iY
i�
i�i9izi{i�i$
i�i�i�i{i�ii�i7
i�
ii�iJiZ
ii�i�i�
i|i}i~i�
i8i�i|ii�i}i�i�i�i�i�i�i�i�i�i�	i�i�i�i�i�i�i�i~i�i�i�iKi�i�
i�i�i�i�i�i�iLi�i�i�i-i�i�	i�i�i�i�i�i�i�i�i�i�i�ii�ii�i�i�i�ii
i�i]
i�i�ii.i�i�ii�i�i�i�i�i�i�	i�i�i�i�iNi�ii�iPi
i�iri�i�i�i�i�i�i�iMi�i�i�i�i�i�i�i�i�i�	i�i�i�i�iOi�i�i�i�iNi�i�iiOii�i�i�i�i�i�
i�i�i	i�i�i�i�i
i�i�i�ii�i�
i 	ii�i�i[
i�i
ii�i�ii�i�i�i�iii�iPiii�i�i�i�ii�i�
i�i�i�i�ii�i/i�i�i�i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�ii�i�i�i�i�i�i�i�ii�i�i0i�iQi�i�i�i�i�i�i�i�isiii�i�iG
i1i�i�
i�i�ii�i�i�i�ii�ii�i�ii�iiRii�
iii�iii i 
i\
i�i�i|
i�ii�iii	i�i�i
iiiiPi2iQi�i�i
iii�i�i�i�ii�ii�	iii�iiiiii ii!i�i�i"ii�
iii#i�ii!i�
ii$ii i!i�i"i!
i#i$i�i%i&i%i�i&i'i	i'i(i(i)i)i#i*i+i�
i,i�
i*i-i�iSi+i.i�i2	i3iH	i�i�i/i0i1i2i3i�i4i,i�i}
i5i�
i-iH
iRi.i6i!	i7i/i8i9i:i0i1i�i�i�i;ii<i=i>i?i@iAiBi2i�i�iCiDiEi~
iFi3iGiQi�iHi�iIi�	iJi�i"
i�iKiLiMi4iNiOi�i#
iPiQiRiSi�i�iTiUi5iViWi�i�i6i7i�i4i8i"i�
i9iXiYiZi:i[i;i$
i�i�i�i\i�i�
i]i^i<i_i�i5i�i�i`iaibicidiei�i�ifiigi�i=i�i�ihi�i�i�iiiji�
ikilimi�i�i>ini#i6ioipi?iqi�irisiTitiui�i�i�ivi
i�i@iAi�iwi�i�ixi�iyizi{iUi|i}iBiCiDi3	iEi~iI
i�ii�i�i�i�i�i�i�i�iFi�i�i�i�i�i�i�
i�i�iGi�iHi�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�
i�i�i�i�i�iIi�i�i�i�i�i�iJiKi�i�i�i�i�i�i�i�iLi�i�iMi�i�i�i�
i�
i�iNi�i�i�i�i�
i�iT	i�i�i�i�i�i�iOi�i�i�iPi�i�i�i�i�iQi�i�i�i�i7i�i8i�i9i�i�i�i�i�i�i:i�i�i�i�i�i�i�i�i�iRi�i�i�i;i�iSi�i�
i�iTi�i�i�i�iUi�
iVi�iWi�i�i�	iXi�iYiSi�iZi[i�i�	i�i�i�i�
i�i�i�i�iVi\iWi�iU	i�
i�i�i"	i�i�i�i�i�i�i]i�i�i�i�i^i�i�i�i�i�i�i�i_i�i�i�i`i$iai�i�i�ibi]
i�i�ici�idiAi�iei�i�i�iifi�i�i^
i�i<ii�i�i�i$i�i�i�i�i�i^
i_
igi�i�i�ii%i�i�i�i=i�i>i�i�i�i%i	i?i�i�i�i�iti�i�i�i@iXi`
i�i�i�i�i�ihi�i�i�i�i�iiii�iiYi%
i�ii&i�	iZiiiTiii�
i	ia
i�i
i�i9ii�iii�i�iRi�i�ii�ii�iui�i�ijiki�i
ili�ii�iiiiiimiAii:iiiii�ii�iBiiniii�i[ii
ii�iii i�i\i!ioi"ipi�i�i�
iJ
iqi]i�i�i#i$i%i&iCi�iri'i(i)i*isiti+i,i�i�i-i.i/i^iui0i�	i1i�i�i�i2iDio	ivi3i�i4iwi_
i5i6i�
i�i&i;i7i8i�i9i�ixi:i;i�i<i_i&
i`ii�
i�
i'
ii�i�i=i�iSi>i?iUi�	i�i�i�iyizi'i�i
i(
i�i�i�i�i@iEi�
iAi`
i�iVi�i{i�iWiXiBi(i|i}i�i~ii�i'iCiDi�i�iEiFi�iGiHiIiJi�iKib
i�i�iLiai�i�i�iFiMi�i�i�iNiOi�iPi�iQi�i�i�i�ii�iRiSi�
i�iTi�iUi)
i�iVii�	iWiXi�i)i�i8
iYiZi[i\i]i^iiGi�i�
i_i`i�i�iaibicidi�i�iei�ibi�i�i�ifigihiii�ijiki�i�i�ilimini�i�i�iYioipi�iqiZirisi�itiuiviwixiyi�izi�i{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i<i�i�i�i�iTi�i�iHi�i�i�i�i�i�i�i�i�i�i�i�i�i�ivi�i�i�i�i�i�i�i�i�i�i�i�iIi�i�i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i[i�i�i�iJi�i�i�
i�i�i�i�i�i�i�i�i�
i�i�i�i�i�iiUi
ici�i�i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iKi�i�i�i�i�i�i�i�i�i�i�ic
i�i�i�i�i�i�i�i�i�iLi�i�i�i�i�i�i�id
ii�i�i9
i�i�ii�i�iVi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�i�i�idii�
i�i�i�	i�i�ii1i�i�
i*i�iMi�ipi�i�i�i�i�i�i�i�i	i�i�i�i�i�i�i�i�i�i�i�i�i�i�i>	i�i�i�i	iii�i
iNi�i�ii�iOi*
i�i�i(ii�
iii�i�iii�i�
ii	i
ii+
ii
i=i�iiiPi�i�iiii�ii�i�i�i�i�iiii�i�i�ii�ii�i�i�i:i�ii�ii�i;i,
ii�i�i�ii�ii�i�i�i�i�i�i�i-
ii�ii�ii i�i�i�i!i"i#i�i$i%i&i'i�i�i(i)i*i�i+i�ie
i,i-i.i/iQi0i�i�i�i1i2i3i4i5i6i7i�i�i8i9i:i;iRiei<i=i>i?iK
i�i@i�i�iAiBi
iCiDiEiFiSiGiHiIiJiKi�iWiLiMiNiOiPiTiQi�i�iRiSi�i�iTi�iUiVi�iUiWiXiYiZi[i\i]i^i_i`iiai�i�i�ibi�i�icidi�ieifi�igiihiiif
i?	iji\i�i�i�ikili�i�i�imi.
i+inioipiqirisiti
i�iuivifi,i�i�iwixi�iyizi�i�i�i�ii{i|i�i}i~i�i�i�
ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iVi�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i i i i i i i i i i	 i
 i i i
 i i i i i i i i i i i i i i i i i i i  i! i" i# i$ i% i& i' i( i) i* i+ i, i- i. i/ i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i: i; i< i= i> i? i@ iA iB iC iD iE iF iG iH iI iJ iK iL iM iN iO (uJIS_TYPICAL_DISTRIBUTION_RATIOuJIS_TABLE_SIZEuJISCharToFreqOrder(((uF/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/jisfreq.pyu<module>,spython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/compat.cpython-33.pyc000064400000001213151733566760026456 0ustar00�
7�Re�c@sFddlZejdkr*eefZneefZdd�ZdS(iNicCs0tjdkr(t|t�r(t|�S|SdS(Nii(ii(usysuversion_infou
isinstanceubase_struord(ua((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/compat.pyuwrap_ords
uwrap_ord(ii(usysuversion_infoustruunicodeubase_strubytesuwrap_ord(((uE/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/compat.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/gb2312prober.cpython-33.pyc000064400000003016151733566760027231 0ustar00python3.3�
7�Re�c@sZddlmZddlmZddlmZddlmZGdd�de�ZdS(i(uMultiByteCharSetProber(uCodingStateMachine(uGB2312DistributionAnalysis(u
GB2312SMModelcBs,|EeZdZdd�Zdd�ZdS(uGB2312ProbercCs6tj|�tt�|_t�|_|j�dS(N(uMultiByteCharSetProberu__init__uCodingStateMachineu
GB2312SMModelu
_mCodingSMuGB2312DistributionAnalysisu_mDistributionAnalyzerureset(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/gb2312prober.pyu__init__"s
uGB2312Prober.__init__cCsdS(NuGB2312((uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/gb2312prober.pyuget_charset_name(suGB2312Prober.get_charset_nameN(u__name__u
__module__u__qualname__u__init__uget_charset_name(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/gb2312prober.pyuGB2312Prober!suGB2312ProberN(	umbcharsetproberuMultiByteCharSetProberucodingstatemachineuCodingStateMachineuchardistributionuGB2312DistributionAnalysisumbcssmu
GB2312SMModeluGB2312Prober(((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/gb2312prober.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/charsetgroupprober.cpython-33.pyc000064400000006464151733566760031051 0ustar00python3.3�
7�Re�c@sFddlmZddlZddlmZGdd�de�ZdS(i(u	constantsiN(u
CharSetProbercBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uCharSetGroupProbercCs,tj|�d|_g|_d|_dS(Ni(u
CharSetProberu__init__u_mActiveNumu	_mProbersuNoneu_mBestGuessProber(uself((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyu__init__"s
		uCharSetGroupProber.__init__cCsbtj|�d|_x<|jD]1}|r |j�d|_|jd7_q q Wd|_dS(NiiT(u
CharSetProberuresetu_mActiveNumu	_mProbersuTrueuactiveuNoneu_mBestGuessProber(uselfuprober((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyureset(s
	
	uCharSetGroupProber.resetcCs0|js#|j�|js#dSn|jj�S(N(u_mBestGuessProberuget_confidenceuNoneuget_charset_name(uself((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyuget_charset_name2s
	
	u#CharSetGroupProber.get_charset_namecCs�x�|jD]�}|sq
n|js+q
n|j|�}|sFq
n|tjkrh||_|j�S|tjkr
d|_|j	d8_	|j	dkr�tj|_
|j�Sq
q
W|j�S(NiiF(u	_mProbersuactiveufeedu	constantsueFoundItu_mBestGuessProberu	get_stateueNotMeuFalseu_mActiveNumu_mState(uselfuaBufuproberust((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyufeed:s$		
	uCharSetGroupProber.feedcCs�|j�}|tjkrdS|tjkr2dSd}d|_x�|jD]�}|s]qKn|js�tjrKt	j
j|j�d�qKqKn|j
�}tjr�t	j
jd|j�|f�n||krK|}||_qKqKW|js�dS|S(Ng�G�z��?g{�G�z�?gu not active
u%s confidence = %s
(u	get_stateu	constantsueFoundItueNotMeuNoneu_mBestGuessProberu	_mProbersuactiveu_debugusysustderruwriteuget_charset_nameuget_confidence(uselfustubestConfuproberucf((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyuget_confidenceNs2					u!CharSetGroupProber.get_confidenceN(u__name__u
__module__u__qualname__u__init__uresetuget_charset_nameufeeduget_confidence(u
__locals__((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyuCharSetGroupProber!s

uCharSetGroupProber(uu	constantsusysu
charsetproberu
CharSetProberuCharSetGroupProber(((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyu<module>spython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/big5freq.cpython-33.pyc000064400000336217151733566760026716 0ustar00�
7�Re�Bc�6@sգdZdZdddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d	d	d	d	d	d	d	d	d	d		d
	d	d	d
	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d 	d!	d"	d#	d$	d%	d&	d'	d(	d)	d*	d+	d,	d-	d.	d/	d0	d1	d2	d3	d4	d5	d6	d7	d8	d9	d:	d;	d<	d=	d>	d?	d@	dA	dB	dC	dD	dE	dF	dG	dH	dI	dJ	dK	dL	dM	dN	dO	dP	dQ	dR	dS	dT	dU	dV	dW	dX	dY	dZ	d[	d\	d]	d^	d_	d`	da	db	dc	dd	de	df	dg	dh	di	dj	dk	dl	dm	dn	do	dp	dq	dr	ds	dt	du	dv	dw	dx	dy	dz	d{	d|	d}	d~	d	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d
d
d
d
d
d
d
d
d
d	
d

d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d 
d!
d"
d#
d$
d%
d&
d'
d(
d)
d*
d+
d,
d-
d.
d/
d0
d1
d2
d3
d4
d5
d6
d7
d8
d9
d:
d;
d<
d=
d>
d?
d@
dA
dB
dC
dD
dE
dF
dG
dH
dI
dJ
dK
dL
dM
dN
dO
dP
dQ
dR
dS
dT
dU
dV
dW
dX
dY
dZ
d[
d\
d]
d^
d_
d`
da
db
dc
dd
de
df
dg
dh
di
dj
dk
dl
dm
dn
do
dp
dq
dr
ds
dt
du
dv
dw
dx
dy
dz
d{
d|
d}
d~
d
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�ddddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d
d
d
d
d
d
d
d
d
d	
d

d
d
d

d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d 
d!
d"
d#
d$
d%
d&
d'
d(
d)
d*
d+
d,
d-
d.
d/
d0
d1
d2
d3
d4
d5
d6
d7
d8
d9
d:
d;
d<
d=
d>
d?
d@
dA
dB
dC
dD
dE
dF
dG
dH
dI
dJ
dK
dL
dM
dN
dO
dP
dQ
dR
dS
dT
dU
dV
dW
dX
dY
dZ
d[
d\
d]
d^
d_
d`
da
db
dc
dd
de
df
dg
dh
di
dj
dk
dl
dm
dn
do
dp
dq
dr
ds
dt
du
dv
dw
dx
dy
dz
d{
d|
d}
d~
d
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d d d d d d d d d d	 d
 d d d
 d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; d< d= d> d? d@ dA dB dC dD dE dF dG dH dI dJ dK dL dM dN dO dP dQ dR dS dT dU dV dW dX dY dZ d[ d\ d] d^ d_ d` da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz d{ d| d} d~ d d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d!d!d!d!d!d!d!d!d!d	!d
!d!d!d
!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d !d!!d"!d#!d$!d%!d&!d'!d(!d)!d*!d+!d,!d-!d.!d/!d0!d1!d2!d3!d4!d5!d6!d7!d8!d9!d:!d;!d<!d=!d>!d?!d@!dA!dB!dC!dD!dE!dF!dG!dH!dI!dJ!dK!dL!dM!dN!dO!dP!dQ!dR!dS!dT!dU!dV!dW!dX!dY!dZ!d[!d\!d]!d^!d_!d`!da!db!dc!dd!de!df!dg!dh!di!dj!dk!dl!dm!dn!do!dp!dq!dr!ds!dt!du!dv!dw!dx!dy!dz!d{!d|!d}!d~!d!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d"d"d"d"d"d"d"d"d"d	"d
"d"d"d
"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d "d!"d""d#"d$"d%"d&"d'"d("d)"d*"d+"d,"d-"d."d/"d0"d1"d2"d3"d4"d5"d6"d7"d8"d9"d:"d;"d<"d="d>"d?"d@"dA"dB"dC"dD"dE"dF"dG"dH"dI"dJ"dK"dL"dM"dN"dO"dP"dQ"dR"dS"dT"dU"dV"dW"dX"dY"dZ"d["d\"d]"d^"d_"d`"da"db"dc"dd"de"df"dg"dh"di"dj"dk"dl"dm"dn"do"dp"dq"dr"ds"dt"du"dv"dw"dx"dy"dz"d{"d|"d}"d~"d"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d#d#d#d#d#d#d#d#d#d	#d
#d#d#d
#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d #d!#d"#d##d$#d%#d&#d'#d(#d)#d*#d+#d,#d-#d.#d/#d0#d1#d2#d3#d4#d5#d6#d7#d8#d9#d:#d;#d<#d=#d>#d?#d@#dA#dB#dC#dD#dE#dF#dG#dH#dI#dJ#dK#dL#dM#dN#dO#dP#dQ#dR#dS#dT#dU#dV#dW#dX#dY#dZ#d[#d\#d]#d^#d_#d`#da#db#dc#dd#de#df#dg#dh#di#dj#dk#dl#dm#dn#do#dp#dq#dr#ds#dt#du#dv#dw#dx#dy#dz#d{#d|#d}#d~#d#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d$d$d$d$d$d$d$d$d$d	$d
$d$d$d
$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d $d!$d"$d#$d$$d%$d&$d'$d($d)$d*$d+$d,$d-$d.$d/$d0$d1$d2$d3$d4$d5$d6$d7$d8$d9$d:$d;$d<$d=$d>$d?$d@$dA$dB$dC$dD$dE$dF$dG$dH$dI$dJ$dK$dL$dM$dN$dO$dP$dQ$dR$dS$dT$dU$dV$dW$dX$dY$dZ$d[$d\$d]$d^$d_$d`$da$db$dc$dd$de$df$dg$dh$di$dj$dk$dl$dm$dn$do$dp$dq$dr$ds$dt$du$dv$dw$dx$dy$dz$d{$d|$d}$d~$d$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d%d%d%d%d%d%d%d%d%d	%d
%d%d%d
%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d %d!%d"%d#%d$%d%%d&%d'%d(%d)%d*%d+%d,%d-%d.%d/%d0%d1%d2%d3%d4%d5%d6%d7%d8%d9%d:%d;%d<%d=%d>%d?%d@%dA%dB%dC%dD%dE%dF%dG%dH%dI%dJ%dK%dL%dM%dN%dO%dP%dQ%dR%dS%dT%dU%dV%dW%dX%dY%dZ%d[%d\%d]%d^%d_%d`%da%db%dc%dd%de%df%dg%dh%di%dj%dk%dl%dm%dn%do%dp%dq%dr%ds%dt%du%dv%dw%dx%dy%dz%d{%d|%d}%d~%d%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d&d&d&d&d&d&d&d&d&d	&d
&d&d&d
&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d &d!&d"&d#&d$&d%&d&&d'&d(&d)&d*&d+&d,&d-&d.&d/&d0&d1&d2&d3&d4&d5&d6&d7&d8&d9&d:&d;&d<&d=&d>&d?&d@&dA&dB&dC&dD&dE&dF&dG&dH&dI&dJ&dK&dL&dM&dN&dO&dP&dQ&dR&dS&dT&dU&dV&dW&dX&dY&dZ&d[&d\&d]&d^&d_&d`&da&db&dc&dd&de&df&dg&dh&di&dj&dk&dl&dm&dn&do&dp&dq&dr&ds&dt&du&dv&dw&dx&dy&dz&d{&d|&d}&d~&d&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d'd'd'd'd'd'd'd'd'd	'd
'd'd'd
'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd 'd!'d"'d#'d$'d%'d&'d''d('d)'d*'d+'d,'d-'d.'d/'d0'd1'd2'd3'd4'd5'd6'd7'd8'd9'd:'d;'d<'d='d>'d?'d@'dA'dB'dC'dD'dE'dF'dG'dH'dI'dJ'dK'dL'dM'dN'dO'dP'dQ'dR'dS'dT'dU'dV'dW'dX'dY'dZ'd['d\'d]'d^'d_'d`'da'db'dc'dd'de'df'dg'dh'di'dj'dk'dl'dm'dn'do'dp'dq'dr'ds'dt'du'dv'dw'dx'dy'dz'd{'d|'d}'d~'d'd�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d(d(d(d(d(d(d(d(d(d	(d
(d(d(d
(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d (d!(d"(d#(d$(d%(d&(d'(d((d)(d*(d+(d,(d-(d.(d/(d0(d1(d2(d3(d4(d5(d6(d7(d8(d9(d:(d;(d<(d=(d>(d?(d@(dA(dB(dC(dD(dE(dF(dG(dH(dI(dJ(dK(dL(dM(dN(dO(dP(dQ(dR(dS(dT(dU(dV(dW(dX(dY(dZ(d[(d\(d](d^(d_(d`(da(db(dc(dd(de(df(dg(dh(di(dj(dk(dl(dm(dn(do(dp(dq(dr(ds(dt(du(dv(dw(dx(dy(dz(d{(d|(d}(d~(d(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d)d)d)d)d)d)d)d)d)d	)d
)d)d)d
)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d )d!)d")d#)d$)d%)d&)d')d()d))d*)d+)d,)d-)d.)d/)d0)d1)d2)d3)d4)d5)d6)d7)d8)d9)d:)d;)d<)d=)d>)d?)d@)dA)dB)dC)dD)dE)dF)dG)dH)dI)dJ)dK)dL)dM)dN)dO)dP)dQ)dR)dS)dT)dU)dV)dW)dX)dY)dZ)d[)d\)d])d^)d_)d`)da)db)dc)dd)de)df)dg)dh)di)dj)dk)dl)dm)dn)do)dp)dq)dr)ds)dt)du)dv)dw)dx)dy)dz)d{)d|)d})d~)d)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d*d*d*d*d*d*d*d*d*d	*d
*d*d*d
*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d *d!*d"*d#*d$*d%*d&*d'*d(*d)*d**d+*d,*d-*d.*d/*d0*d1*d2*d3*d4*d5*d6*d7*d8*d9*d:*d;*d<*d=*d>*d?*d@*dA*dB*dC*dD*dE*dF*dG*dH*dI*dJ*dK*dL*dM*dN*dO*dP*dQ*dR*dS*dT*dU*dV*dW*dX*dY*dZ*d[*d\*d]*d^*d_*d`*da*db*dc*dd*de*df*dg*dh*di*dj*dk*dl*dm*dn*do*dp*dq*dr*ds*dt*du*dv*dw*dx*dy*dz*d{*d|*d}*d~*d*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d+d+d+d+d+d+d+d+d+d	+d
+d+d+d
+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d +d!+d"+d#+d$+d%+d&+d'+d(+d)+d*+d++d,+d-+d.+d/+d0+d1+d2+d3+d4+d5+d6+d7+d8+d9+d:+d;+d<+d=+d>+d?+d@+dA+dB+dC+dD+dE+dF+dG+dH+dI+dJ+dK+dL+dM+dN+dO+dP+dQ+dR+dS+dT+dU+dV+dW+dX+dY+dZ+d[+d\+d]+d^+d_+d`+da+db+dc+dd+de+df+dg+dh+di+dj+dk+dl+dm+dn+do+dp+dq+dr+ds+dt+du+dv+dw+dx+dy+dz+d{+d|+d}+d~+d+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d,d,d,d,d,d,d,d,d,d	,d
,d,d,d
,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d ,d!,d",d#,d$,d%,d&,d',d(,d),d*,d+,d,,d-,d.,d/,d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,d:,d;,d<,d=,d>,d?,d@,dA,dB,dC,dD,dE,dF,dG,dH,dI,dJ,dK,dL,dM,dN,dO,dP,dQ,dR,dS,dT,dU,dV,dW,dX,dY,dZ,d[,d\,d],d^,d_,d`,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,do,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,d{,d|,d},d~,d,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d-d-d-d-d-d-d-d-d-d	-d
-d-d-d
-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d -d!-d"-d#-d$-d%-d&-d'-d(-d)-d*-d+-d,-d--d.-d/-d0-d1-d2-d3-d4-d5-d6-d7-d8-d9-d:-d;-d<-d=-d>-d?-d@-dA-dB-dC-dD-dE-dF-dG-dH-dI-dJ-dK-dL-dM-dN-dO-dP-dQ-dR-dS-dT-dU-dV-dW-dX-dY-dZ-d[-d\-d]-d^-d_-d`-da-db-dc-dd-de-df-dg-dh-di-dj-dk-dl-dm-dn-do-dp-dq-dr-ds-dt-du-dv-dw-dx-dy-dz-d{-d|-d}-d~-d-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d.d.d.d.d.d.d.d.d.d	.d
.d.d.d
.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d .d!.d".d#.d$.d%.d&.d'.d(.d).d*.d+.d,.d-.d..d/.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.d:.d;.d<.d=.d>.d?.d@.dA.dB.dC.dD.dE.dF.dG.dH.dI.dJ.dK.dL.dM.dN.dO.dP.dQ.dR.dS.dT.dU.dV.dW.dX.dY.dZ.d[.d\.d].d^.d_.d`.da.db.dc.dd.de.df.dg.dh.di.dj.dk.dl.dm.dn.do.dp.dq.dr.ds.dt.du.dv.dw.dx.dy.dz.d{.d|.d}.d~.d.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d/d/d/d/d/d/d/d/d/d	/d
/d/d/d
/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d /d!/d"/d#/d$/d%/d&/d'/d(/d)/d*/d+/d,/d-/d./d//d0/d1/d2/d3/d4/d5/d6/d7/d8/d9/d:/d;/d</d=/d>/d?/d@/dA/dB/dC/dD/dE/dF/dG/dH/dI/dJ/dK/dL/dM/dN/dO/dP/dQ/dR/dS/dT/dU/dV/dW/dX/dY/dZ/d[/d\/d]/d^/d_/d`/da/db/dc/dd/de/df/dg/dh/di/dj/dk/dl/dm/dn/do/dp/dq/dr/ds/dt/du/dv/dw/dx/dy/dz/d{/d|/d}/d~/d/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d0d0d0d0d0d0d0d0d0d	0d
0d0d0d
0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d 0d!0d"0d#0d$0d%0d&0d'0d(0d)0d*0d+0d,0d-0d.0d/0d00d10d20d30d40d50d60d70d80d90d:0d;0d<0d=0d>0d?0d@0dA0dB0dC0dD0dE0dF0dG0dH0dI0dJ0dK0dL0dM0dN0dO0dP0dQ0dR0dS0dT0dU0dV0dW0dX0dY0dZ0d[0d\0d]0d^0d_0d`0da0db0dc0dd0de0df0dg0dh0di0dj0dk0dl0dm0dn0do0dp0dq0dr0ds0dt0du0dv0dw0dx0dy0dz0d{0d|0d}0d~0d0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d1d1d1d1d1d1d1d1d1d	1d
1d1d1d
1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d 1d!1d"1d#1d$1d%1d&1d'1d(1d)1d*1d+1d,1d-1d.1d/1d01d11d21d31d41d51d61d71d81d91d:1d;1d<1d=1d>1d?1d@1dA1dB1dC1dD1dE1dF1dG1dH1dI1dJ1dK1dL1dM1dN1dO1dP1dQ1dR1dS1dT1dU1dV1dW1dX1dY1dZ1d[1d\1d]1d^1d_1d`1da1db1dc1dd1de1df1dg1dh1di1dj1dk1dl1dm1dn1do1dp1dq1dr1ds1dt1du1dv1dw1dx1dy1dz1d{1d|1d}1d~1d1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d2d2d2d2d2d2d2d2d2d	2d
2d2d2d
2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d 2d!2d"2d#2d$2d%2d&2d'2d(2d)2d*2d+2d,2d-2d.2d/2d02d12d22d32d42d52d62d72d82d92d:2d;2d<2d=2d>2d?2d@2dA2dB2dC2dD2dE2dF2dG2dH2dI2dJ2dK2dL2dM2dN2dO2dP2dQ2dR2dS2dT2dU2dV2dW2dX2dY2dZ2d[2d\2d]2d^2d_2d`2da2db2dc2dd2de2df2dg2dh2di2dj2dk2dl2dm2dn2do2dp2dq2dr2ds2dt2du2dv2dw2dx2dy2dz2d{2d|2d}2d~2d2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d3d3d3d3d3d3d3d3d3d	3d
3d3d3d
3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d 3d!3d"3d#3d$3d%3d&3d'3d(3d)3d*3d+3d,3d-3d.3d/3d03d13d23d33d43d53d63d73d83d93d:3d;3d<3d=3d>3d?3d@3dA3dB3dC3dD3dE3dF3dG3dH3dI3dJ3dK3dL3dM3dN3dO3dP3dQ3dR3dS3dT3dU3dV3dW3dX3dY3dZ3d[3d\3d]3d^3d_3d`3da3db3dc3dd3de3df3dg3dh3di3dj3dk3dl3dm3dn3do3dp3dq3dr3ds3dt3du3dv3dw3dx3dy3dz3d{3d|3d}3d~3d3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d4d4d4d4d4d4d4d4d4d	4d
4d4d4d
4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d 4d!4d"4d#4d$4d%4d&4d'4d(4d)4d*4d+4d,4d-4d.4d/4d04d14d24d34d44d54d64d74d84d94d:4d;4d<4d=4d>4d?4d@4dA4dB4dC4dD4dE4dF4dG4dH4dI4dJ4dK4dL4dM4dN4dO4dP4dQ4dR4dS4dT4dU4dV4dW4dX4dY4dZ4d[4d\4d]4d^4d_4d`4da4db4dc4dd4de4df4dg4dh4di4dj4dk4dl4dm4dn4do4dp4dq4dr4ds4dt4du4dv4dw4dx4dy4dz4d{4d|4d}4d~4d4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d5d5d5d5d5d5d5d5d5d	5d
5d5d5d
5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d 5d!5d"5d#5d$5d%5d&5d'5d(5d)5d*5d+5d,5d-5d.5d/5d05d15d25d35d45d55d65d75d85d95d:5d;5d<5d=5d>5d?5d@5dA5dB5dC5dD5dE5dF5dG5dH5dI5dJ5dK5dL5dM5dN5dO5dP5dQ5dR5dS5dT5dU5dV5dW5dX5dY5dZ5d[5d\5d]5d^5d_5d`5da5db5dc5dd5de5df5dg5dh5di5dj5dk5dl5dm5dn5do5dp5dq5dr5ds5dt5du5dv5dw5dx5dy5dz5d{5d|5d}5d~5d5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d6d6d6d6d6d6d6d6d6d	6d
6d6d6d
6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d 6d!6d"6d#6d$6d%6d&6d'6d(6d)6d*6d+6d,6d-6d.6d/6d06d16d26d36d46d56d66d76d86d96d:6d;6d<6d=6d>6d?6d@6dA6dB6dC6dD6dE6dF6dG6dH6dI6dJ6dK6dL6dM6dN6dO6dP6dQ6dR6dS6dT6dU6dV6dW6dX6dY6dZ6d[6d\6d]6d^6d_6d`6da6db6dc6dd6de6df6dg6dh6di6dj6dk6dl6dm6dn6do6dp6dq6dr6ds6dt6du6dv6dw6dx6dy6dz6d{6d|6d}6d~6d6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6f�6Zd�6S(�6g�?iii	i�i�i�i�i	iRii�i�i�iai�iini�i!i�iiLi,iBii�i�i�i�i�ii{
i]
i�i�i
iji�i�i.iNiii�ii�i:i�i�i�i?i�i�i=iNiKi�i�ikiq	i�i�i�
ii�iibii
i�i�ii�
ioi2i�iii�i�ici8i�i�ii�i�i�i�i�i{i|i�i�i"i�
i�i@i\i�i�	i�i�i�i�i�i�iFi�i|
iQiHi�i�iPivi�i�i�ii�iDi^
i�i�iFi}
i�iEi�iOi�i0i�isi�i4i<i2i�i�i&iMi�i�i~
i�i�iGi�ii[i�i�i?iiiaiiK	i*i�igi�	iZi�
i:i�ii�iKi�	ii�	i�ii�i�i�i`ilii�i�ii
	i iqi�i~i�i�i
i�	ii�i�i�ici�iuii�i*ii�i	i�
i�i~imi�i�i�iei�iGi^i�ini�iiUiCi�iCi�i�i�i�ii�i ijioi/ii�iPi7	i[i�i�i�
i?i�i�i�ioiSi(i�ii�ipi]i�i6ijii@iii�iii8ii+i3i[i�i�i\i�i�i�i�i�i]	iAi�i�i�i1i�i�iHi�
i�
idi�i�i+i�i2i�i�i�i�
iOiL	i�iifi1i�i�i�i�i�i�ii3i9i�ili,i�i	ii�ii�i�i�i�ieiz
iQiMi&i�iXi�i�i�i�i�i
i�i�i�ikipi�iMi�i�i�i%ii�i�i�i�i�i'i�	i�i\i�ii7i�iJi�i!i�i�ii�i�iNi�iBiPi_
iqii�i�
i�i�i�
i�
i�i i�ii iIi�i8	i�i�
ii{
ii�i
i�i�i�imi�i�ifi�i�ixi�i�i�i�i�
i�i
i�igi�i�i
ii�i�i�ii�i�i&i�i'i�ii�i�i�i.i�i�ii�iM	i�i�i�i�i$i#i�iDihiAi�	i�i�iri�i�iUiGii�i�i
i�
iQiSiii�i�idii0iFi�i�iCi�i�ii�i i�iJii�iUii�i�iN	i�
i�i�i<i�i�
i:iA
i�
i�i	i 	i9i�i}ii�	i�i�iWiPi�
ii)iDii�i�i4i�
i�	i)i�i�ir	i�isi�i�itii9	i�i�i�is	i*ii�i�i�i�i�i]i�i�i�i�i�	iDiji(
i
i�i�i�
i�iui5iYiji	ili�iuii�i�
i�i�i`
i
i=i�i�i�i�i�i�i�i5i�i!i�i�iTiEixi�i�ieii�	i�iO	iPi�i|
i6iAi�
i/iki�i�
iili!i	i�iBi�i`i�i
i�i�iAi�iiii�i�
ivi�	i�i�iwi�i�i�iMi�
i�i�i�ii�ia
i�i�i�
i}
i�ixi,i}i�i�iB
i�i�i�i�i�i�i�i�iFikimi�	i�i�
i�i	i�i�
i�ibi�i)
i^iP	i
i,i�i�i�i7i5i~
iyi|i�izi�ii�i�
iC
i{iii�i�i�i�i�i�i�i1i�ibii�	i�
i�i�it	i�i�
i�i_i�i�i�i�i�ii�
i�
ib
i�i�i�i5iDi�i�ili�i|i[i*
i�i�i�
i�i%iiGi^	i�ili�i�i�
i�i`i�i�i�ipi�i�inicigimii�i'i2i�ii�i{i�i�i�i�i�i�iD
i�ifi	i�i|i:	i�i�ii�i�
i�i�
i
i�i�i�ini�i�i�i�i;i�iIiYi}i�i�
iXi"i�i
i�i�i�i�i�i�i-i�ili�i�i�i�i�ii�i�iEi�i~i�i>i]i�i,i�i�i�iviLiBiii&i�i�ii�i�i�iGi�i�iiBi�i�
i+
i�ii�i�i�i�i�i�	i iaii�i�i
iai�i}iE
i�iDi�i=i�i0ii�i�
i6i�ii�ivi!i�i�i�i�i�i�i�i�i9iHii�i�i�i�
iFi�i�i�i�i�i"i�iHi�i�i�i
ioii�iRi*i�i.i�i�i�i�iiIi3ii,
i�i*iSii�i�iXi�i�i/iibipi�i�	ii�i�i�i�i�iRiii�i7i�i2i�i�	i�i�i�i�i�i�i_	i�ibii�
i�i�i�i�	i�i�i�ii�i�i`	iOi�i�	i�i`i7i�
i�
i�i�i�i�i�iia	i�i�i�i�i�i�igi�i�i�i�i
i_i�i~i�i�i�i�i�i�
iai�i�
ib	i�i�i�i�i�ii�i�	i;i�i�	i-i
i�iQ	i�i�i�iqii�i�i�i`i�i#i#i�ii�iiri�
isii�i�iditi�
i�ic
i�iikiwi�i�i�i�i�i�i�ii�i�igi�iQi�iUi
i�i�i�i�iiCiSi�ic	i�i�i5i�i�iBi�i_i�iciNi�i�iYi�i�i�i�
i�iLidi�
i�
i	iKi�i8iaiGi�i�i
i�i�iisi6i�	iti;	iNi�i�ii	i4i�i:i�i\iqi�i�i�i.i�iiiui�
i�i�i�i�i�
i�i
iri�i�i�
i�
i�ici�i�i�i@i�i�i�ii�i�ii�i/i9i�ii�ii�i�i�i�i�
i<	id
ii�i�i8iviiCi�ii
i�imi�i�
i�i�i�i�i�iZi�i�i�i�iwi�	i{i�i�i�i�i$i�iiMidi0iri�i�i�igiiVi�i�ii�i:iZi�i�i{i$iei0i�ii$i�i�
i�
i�i5i�i[i�ivi�iici�iViR	i$i;ii�iifiii�idi�i�iWie
ii�i�iii�i�
iiJi�ii�iiui�i	i�i
i�ii�
iKi�i2i�iLi i.i�i�i2i�ii�i�ii�i�i%ii�i�ii
ii�ii�iii�i
i�
ixi�iMi�i}ii�iTii�i�id	i�
ii�i�i�i`iii�i�i�	i3iii;i�iiiiyiYiLi�i�i�	i�	iiii�iUi\i�i�ii�i�iViNi�ii�
i�i�i 
i�i"ixi%ii;i=	i i�i�i2iEi�i!i�i�i�i^i�i"iwi�
i#i�i�i�i�i�i$i<iQi�i�iri%i�i]i�i&i�i<i'ii3i6iBi�i�i(i�i�i�i�i�ii�igi�
i�
i)i�
i	i*i+i!	iii�i�i:i�i7i�i^i�ii�ii(i�
i,i+iiixi-i�i/ihi=i.i�i�i�i�iVii�iihi�i�i/ii�i�i�i<i�i�i;i0i�i�i�i
i�	i1izi�ii�i5i6i�
i_i)i2i3i�i4iyi"	ii�i�
i�i^i5i�i�i?i%i+if
i�i6i_iWi�i�i�
i7i>ii�
ig
i#	i�iu	i8i�i�i9ih
iF
i�iVi{i�iOi�iIiwi~i�
i^ii�i:i�i�i�i�i�i�i�i�	i;iei1i�i�i�i�i�i�i�i�i�i�iiiPi<i=i�i>i�
i�i(i`iRi?iYi�iIi�	i�i�i�i7i�i�
i?i�i�i�
i@i�ioi�iqiYinii�ilii�i�i�i�i�
ii
iEiPiVi�i!
i�i�i�i�i�ini�iAi�i|i�
ii
iBi�i�i�i�ii-
i�	iOi�
i�iCi�iDiWiTiTii�i�i�i�
i}iEi�i&i�
i�i�i�i�ii�i�
i�i�i~iG
i�
i�ii$	iWi�ii�ioi�i
iFiiGi�ii"
i�i�i�i#
i�i�iDi-iQi�iHiei�	iiiIi�i�iiJizi
i�iKiiiLi�i$
i�
i�i�i�i�iH
i�i�i�ii�i�iMi:i�	ii�iNi�iI
i�i�i�iHi�i�ii�iOi�i�i�	iPiQi�i�ikiRiRi�i�i�i�
i
i�i�i�i�i�i�ii�iSiTi�i�i�i%
i�i�i�i�i�i&
iSiUii�iS	i�iCi�i�i�iVi~i�i!iXi�i�i�i�i�i,i�ii�i�iOi�i|i�ii�iPi�ie	i�i�i�i�ii�i�i�i�i�i�i�i�iTiii�i�iWi�i�iiXi�iYi�iRi�
iviii�
ii�i=ii�iZi�iUi�i�i[i�i�i�iVi%	i\i�i�i]i�i�i^i8iT	i.
i'
i_i�ivi�i�i�i�iwitii`iaibi>	i�i�i"i{i�i�i�	i�ici�idi9i�iii�i[i9iiidihi
iei�i�i�iJ
i!i�i�ifi�i�ii�i�i�iTigi�ii�i%i�iWiMihii�iii�i�i�i�ii�i�i�i�i(
ij
i�iyi7imi�ijiki�i?	iWi"i�i�i�iiBi�ili|i�i�i)
izi�i�i�
i�i�i�i�ii�i�imi�iniuiv	iwi�i	i*
ii�ioipi�iiqi7i.iri�i�i
iii�
i�ifi�i�i�isi&	iyii�i i�i�i�ii�i�
ii>i�i�i�i�iiYi�i�iti�iui/
i+
i�ivi�i�i�i@iwii�	i�	i�i�i3i�i�i�i,
ixi�i6i9i�
i	ii�i6i�i�ii!ii�iyi�iQi:ici
i�ii-
ioi�i�iFiXi�
i�i�ifi�iizi�
i�i�i�i�i�i{i/i�i�i'	i�	ibii�i`i�i�iiui	ivi�i�ii�i�
i
i
i�i�i�i�i0iEi�iSi�i8i[i|i}iGi�ii�i!i~ii�iFiU	i�i�
iii�ieisi�i�i�iw	ii�i�i"iiai	iZi&i�i�i�i�i�	i
i�i�i�iAi�i�i�
iiiii�i�i�i�i�i�ii�i
ioi�ii�ii�
i
i�i	i�iAiiJi0i�ix	i�
i�i�i�iYi�i�i�i�i�i�	i�ii�iZi8ioii�iQi�i�i�i�i�
i�i�iaiQi�i�ipi;ii�iPi�ibi�i�i�i�ii�i�i
i�i�i�i�	i�i�i�i�i�i�i�i�i�i�i�i]ii�ii�i�
i�i�ii�i�i'i�ii.
i�i�i
i�i�ii�i�iLi�i�i�i�ii�	i�i/
i�ii�i�iBi0
i[ii8i�i�i�i�i�	i�ii/i3i�i�i�ii�
ii�ii0i�ini�i�i�ii�i�i�ii�	i�i�i�i�ii�iii�i4i�ii�ii<i�	ii
i�i�iYi�	i�ii�iCi�i�ii�
i�i�i�i�i}i1ii�
i�i�i�iKii�i�i0
iFi�i�i�i�
ii#i�i\i�i�i�ifii>i�
i�ii�
i�i�i�i�i�ii�
i�i�i�i�iji�i�ii�ii-ipi9i@	i6iyii�i�ii
i1
i�i�ii�i�ii�iVi�i�i�i�i4i�i�i�iKi1
i�i�
iDi�i�i�i�ii�i#i�i�i�i�i2
ii�ii�	iZiHipi�i�igi�i�ii�
iqiri
i�i�i�i�i�i�iiK
iV	i�
i\i,i
i�i�i�ii�i]i�i�iuii�
iii�i�i�i�ii�iZi�i�i�
iii�iiji�i�i0ihihi�i�i�i�i�iEii�i	
i�ii�	i�i�i�i�i�i�i�ii�i�i�
iii�i2
i�i�i�i�i�iiMi�iwi�i�i�iy	i?i�i�i�i

itimi(	i�	i�i+i�i�i�i�i�i�i�iiii�
i�i�	i�i�i�i
i�iL
i�i�i)	i�
ii�
i�iif	i�i�	i�iii�i�i�iRi"iA	i3
i�i�i-i1i�i$i�
i(i�i]i�i#i�i$i�
ii�i�i i*	i�i�i�i�i
i�i�i�
i=ik
i�i!i�i�
i�i�i�i�i�
i�i�i�i_i�i�i�i�i^i2ii�
i�i�i�i9i�i�i�i�i�i�i4
i�i�i�i
i�ibii�i�ii�i�ii�i5i�i�i�i�i"i	i�
ii�i�i�i�i4iIii�i#i�i�i�i�iii�iiji�i�ii$iki�ii�
i�i\i�
igi�iEi5
i�i�i�i�i�i�i�i�i�
i�i�i6
i�i�ii	i�i%ii�i�i�i�i[i�i�i�i�i�ii�i&iei�i�i�i�i�ioi�i�ili	i}i�i�i�izi�i+	i�i�i�ii�i�ini-i�i�
i'iiii
i�i�i�i(i�i�i�	i�i�ii�i�i�ii�
i�i�i�i�iBiiiqi�i�i�i<i�i*iji)i"i*i�i>i)i7
i�i+i�i�i�ii�i�i�izi�i,i�i�i�iiM
i)iri�i�i-i	i�i�i�i�i�i�iTi�ipi�i�i#i#i�i�ii�i�i�i�i�
i�ii�i	i�	i�i�i�iSi�i.i8
i�i�i�i�iz	i9
i=i�i�i�imi�iSiii�i�i�ixi�i�i/i�i�iqi�ii3i�i5i�i:
i�i�
i�i�i�i�i�i�i�i
i;
i�i0i1i�iii�i�ini�i_i�i]ii�ini�i�i�i�i
i%i�i�i�i�i�i`i�i�i�i�iziTisi2i3
i�i
i{	i�i5i�i�ii�
ig	i�i�iki�i�i�ii�
i�i�i3i4i�i�i�ici i�i�i
i�
i�iiai:i1i�i�i�i!iAihi ioi�
i6i"i�i�iil
i-i�i
iai5ii�	i�i
i�i�i#i!i�i$i�i�
i�i4
ifi�i	i%i&i�
iN
i
i�iWi�iii�ii�
i'i�i$i�ii<
i�iNiiiW	iki�iO
i�i�iii�i�iX	i,	ii6i&iti�iP
ii�i7i�
i�i�
i-	ijii	i�
i�iCi[ipi�i�i'i8i
ibi�im
ii�
i�i{i(i�i�	i�i�	i9i�
i�	ii:i
i�
i^i�i�i�iB	i;ii�iii�i�
i�i�i
i�i	i�i)i<i=i�
ii�
i�i>iiiii�
i=i�i�ii�ii�i�i�i�i�in
i�iHiDi�
i?i�iUiWi�
i=
i�i:i�i�	iNi�iKiEi@i4ici�
i�i>
i�iQ
i
iAii�ihi�ii�
i�
i(i]i�i�i�iBi*i�i�ili�iCiDi�iEih	i�ii�i�i�i�iXiiii�i+i�i�i�i+iJi�i�iUi�ii
i�imi iEiiiiFiiGi
iki�	ini�i�
idii�iii�i�i�iFi!i i�iri@i�iHi"iCiGi�i�i�i
i�i^i�
i�i�i8iti)i;i�i?
i!i�ioiIi�i"i#i#i$i�iJi�	i%i�
i&iriKi'i5
i(i)i�io
i@
i}iA
i�i,i�i*i4i1i+i�i�i�i�i�i"i�i,ii�
iC	i�iuiriD	i-i�
i-i�iLivi{i�i|	iMi.i.iNiY	i6
iii�i/i0i/i�i�i1i$i�i2i%iGiRiB
i�i_i�i�iC
i�i�iD
i�i3i�i�i�i�i�i�ii.	i�i�	i4i@iwi�i5i�i6i7i�ii	i�i&i0i�i8i	i&i�	i*i�i+iGiOiuii#i�
i1iPiRi�iQi�i�i�i)i�i�i=i9i�ili�i�i�i�iE
iSi�iki�i\i�	i�i�i�
iyi:i�i;i<iF
i%i=i�iRiii>idi'i,i?iei$i�i2i3i-i�i�i4ii(iSi@iAiBi�i.iTi�iOi
i�i�i�i�i�i�
i&ii�i�i�
i<i�
i�ii�iCiiDi�i�iUi�ip
iG
iei�
i�i�i�i�
iEi;iViFi'iGi)i
i�i}	iHi*i�iWi�i�iIi�iTi�i�
i�
i�i�i�i�ii	i�iJi.igi~i�iUi�ij	i	iiiXi�i�i8i�i*i�	i�i�iKi~	i�i�i�iLiiHi�
i�ii%i�i+ifi�i�i�i�iti�iMiNi�i�i�ii	i�i 
i�i�ik	iYiiYi�i�i�i*i/i�iOiR
iZiH
i�i#iIi�
i�	i�i�i5iS
i]iE	i[i\i
isiI
i+iPiQi,i�	i�
iRi�iSiTi�i,i�iUi]iVi�i�iLi-i!i�iT
i\i4iWi�iiXiYiZi�i[i>iwi�i�i�i�i+i^iiJ
i�i_i$i�i\i�i�iili.i]i`i�i^i_iq
i%i�i`iaiii�i�
i6igiU
ibicidiai�
iqixi�
iei
ibiyi�ifihigihi�i�i'iiii�i�i	ijiri�i
i0i	i=i�ibi|i�i�i�i�i�i�i	iihiki�
ilii�i�
iai�icimi�ii�ini�
i�iui�i�idiei�isiK
i/ioi7i�i&i�	iJi8ipiqiiijifi�i�	igi	i�i�i(i�i`irisi�i�iii<iFikifi�i�i�i�i]i�i�iIiti>i�iui�ivi�i�
i�i�i�
i0i�i-i�iwiL
i�i�	i�i�i�i�iGiai�i
iti�i�i�
iSiKixiiyizi�i�iV
i�i�iOi�i1i�i�
i{i�
i�i�iF	iyi�i9iZ	i�i|i}i~iFi�i�i�i�
i�	i:i�iiii2i�i�iipi�i;iG	i�i�i	ihi�i�i�ii7
i�i�i�iiqii�iM
i�iii�iii�i�i�i�
i�i�i�
i(i8
i�iN
i	ii3i�	iiO
i<ii�i�iTiiW
i�	i�i�i�i�i(i�i�i�i1i�i�i�i�i�i�i�iuiZii�
i�	ici�ijiP
ipi�i�i
ii�i�i�iviiiji�i�
i�i�i�i�iQ
iKii�i�	i'i�i�i�ii�i9
ii�i
i�	izi�i�	i
i�i�iki�i�i�i�i�i�i2i	i�ilii�i>i=iCi'i�i�i>i
iiZi�i�i�i�imini�i�ibii�i�	iiqi?i�i
i�ii�i�	i"i�i�
i?i
i}i�i�ioi@i>iiAi�i1i�i)i�i�i�i?i�
i�
i�ii�ixi	i�i	ii�	i3i�iihi�iili�i�i�i)i�i�
ipi�i'i�i�i�i4i�i�i
i�
i�i�i�iAi_i	iBi�iLi�i
iPiqi�ii�iriii�iiX
iicisi!
i�i�iiHi�i	iwi�i�i�iCiDitii�i�i�i�i�ixi
ii�	i/	i�iii5i
i4iuiir
i�ii_i�i�i/i�i<i�i~i7iyimi�ii^i5inibi�
iti�iil	i�i�i�i6i�i�	i7i�i�i�i�i�iivi�i�i�i�	i8i:
i�i�
i�i0	i�i1	i�iwiiIi�i�i�i�i�i(i�iiBi�i�i4isi�
i�i�i�i�i
i�
i�i�i?iCiixi	iEiHii�iFiyiziGi�ii�i�i{i�i�ii|i�i;
i}i9imiH	i~i�izi�i�is
i�	i�iMi�i�ii�i�iim	i�i�iIi�i�iioii�ii�ii�i�i_ii�i�i�i2	i3	iHii*i�ii�
ii�i�i<
i�iii:i�i�
i�i�i�iAi�i�i�iR
i�i�i�iii�
i�i"
i�i�	i�i�i�i�i�i�
ii�
i�i�i�
i�i�iQii�
iY
iii�i�ii�ii{iKi�ii�i[iiJi�i�iNi�iS
i�i�i�i�iI	ii�iT
i@ii�
i�i�i�
i�i@iiRi�i�i�	it
i�ii�iJiIi�i�
i�i�ii�i�
iU
i�imii�i�i{i�	i�i�	i
i;iV
i�ii�	ii�i<i�ii�
idi�i�i�iXi�i�i9i�i�i6i�i�iUi�i�i�i i�iLi!i=
i�i)i�i�
i	ii�i�i�	ii�i�i�
ii=i$i(ivi�ii&i�ici�iii�i	i
i�i>i�i�i�i{i"i�i�i�i�i#i�i�i�i�iW
i�i�	i�i�i�i�	ii$i�
i%ii�i�i�i�i&i^i�i�i[	i�	i�i'ii�i�ii�i�i�i(i i�ii2i\	iJi
ipipin	iiu
iqi)i�i�	iOi>
i�i�
i*iX
i�i�i�	i+i�i�i,i�
i�i�i�
i�i�i�i�iKi�i
i		i�iIi-i�i�i!i�i�i�i�i�i.iDi�i�iJisi#
i�i�i�
i�i7i�i�i�i/iwi�i|iii�i�i�i"i4	i|i,iii�i�i�	i�i�ii�iiii�i?iY
iPi0ii1iZ
iZ
i�
i�i�
i�	i�i�
i#i@i2ii|i�iziii�i�iAi'i�i?
i�i	i�i8i�i�iyi�iLiVi
i3ii�	i�i$i�ii�iMi�i%i�ii�	i�
ii
i.ii4iNi�iiii�
i�	i�i�ii�i�
i5i9i%ii�i�iKiQii�ixi6i7iiBi�i
	iOiv
i[
i�i�i&ii�
ii�
i�iiXi�i*i�i\
iPi�	i�
iNi+iw
iii�iiWiCi�ii�	iQiDii?i]
i�iii^
io	iRi	
i�iEii
iiFii'i�iXiiGiiSi�iiTiRii8ixi�	ikiSi�iTi�ii i�i�i�iDi�i9i!i�i�ii�i(iiLi"i#i$i%i_
i�i&iJi:iUi�i}ii)i�i

i;i<i
iEi+i'i�
i�iHi=iVi*iHiyi,i+iWi3i>i�i�i?i(iIi,i-i`
iqi�ia
ii�ii
i�i)i*iXi�	i+i�iOi�iYi,i-i�i.i�i/i�i�i0i.i�i�i�i1i�
iJiri2i3i$
i	i4i�i5i6i7i�
i�ib
i�	i�i�i}i�	ifi�iKi�i�
i�
i�	i�	i8iZi9i�i:i�i�
ic
i�i:i�ii;isiJ	i@i�i�	iti;i�
i/i<id
ii�	i�i�iUi�i0i�ie
i=i�if
iuiMi�i�i�i�i�
i>i	i[iiAiLi�iii?i�	i
i�
i	i@iAiviBiCi\i�iji�i[
i�
ig
iDiEi�i�iFiiBi�iGi�
i�iHi�i(i�iMiCih
i�iIiNiJiiKiLi�i�iMi�i1i2iNi�i�idiOidiViDi`i�i#i5	iPi]iQiEini
i�	i�i�i^iRi_iFiSip	ii
i�iTiUi�i

i�iVi�i�i�	i�iGi�i�i�ieiHiOi�	i�iPi`iWiwij
iXi ii3i�
iai�iIiYiJixi7iii�i-i�
i4ik
iibiZi-i�ii.ici�i[i�	iri;i�iKi5iLiXi�i i	i�i�i\i]i�i�i6i%
i^i_i�i�i~i`il
iyiaizi~i�i�ibi?i�ici7idi
i�i�iei�izi�i�iMifigi/ihi|i�i@idi�iiiiNi�i�i�i8ifi�i�ijiki�iOiPi�i�ilimi@ini9i�	ioi�i�	i�i�i<isii\
iQi.iRiNi@i�
i�ipiiSi{iqi�iAi�i�i�ii�iTi
i�i�i�i:i�i�iri�
isi@
iWi;itiui�iviwixiyi|i�i�i�i�izi�i�i3iQi�i�imi�iAi{i|i�i�	i�i}iOiRi�i�igiii~iZi�
ii�i�i�i�i�i\im
i�i}i�i<iXi�i�	i�i�	i�
i�i�i�i
i�iYi�i�i�i0i�i�i�i�i=i�	i�i�i�iLi�i�i�i�ihi�i�i�iii>i>i�i/i?iUi�i�i�i�i�iei)ix
iti�ifiSi�i�
iy
i�
in
i
ii�iTii@i�i�i�i�i�i�i�i�i�i�i�	i�i�iziUigi�iVi�io
i�i�i6	ip
iti�i�i�i�i�i�i�
iAi�iJiVihiZi�	i�iWi�i�i�i�i�	iMi�i�i
iii�	i�iBi�ieiCi�	i�iji�i�	i�i�i�i�i�i�i�isi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiViPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iq
iii
iiiiiiiiiiiiiXiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i�i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMikiliNiOiPiQi�iYiRiSiTiUiZiViWiXiYiZi[i\i]i^i_i`i�iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�imi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ini�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iDi�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�i�i�i�ioi�i�i�i�i�i�i�i�iEi�i�i�i�i�i�i�i�iiiiiiii�iii	i
iii
iiiFii�ipiiiii�iiiiGiiii~iiiiii i!i"i#i$i%i&i'i(i)i�i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNi[iOiPiQiRiSiTiUiViWiXiYi\iZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}iHi~iir
i�i�i�i�i�i�i�i�iIi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i]i�i�i^i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iqi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i_i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�i�i�i�i�i�i�iiiiiiiiii	i
iii
iii�iiiiiiiiii
iii�iiii`iii i!i"iai#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiWiSiTiUiVi�iWiXiYiZi�
i[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuivi�iwixiyizi{i|i}i~i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ibi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiKiLiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iMi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iXi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiidii�ii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i�i3i4i5i=i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNi
iOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iai�ibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i�i�i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iei�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiis
iiiiiifiiiiiiiiii i!i�	i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3iri4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFi>iGiHi�iIiJiKi�iLiMiNiOiPiNiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i�i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�isi�i�i�i�i�i�i�i�i�i�i�i�i�it
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iOi�i�i�i�i�i�i�i�i�i�i�i&
i�i�i�i�i�i�i�i�igi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i�i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i�i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiPiQiRiSiTiUiViWi�iXiYiZi[i\i]i^i_i`iaibicidi�ihieifigihi�iiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiQi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iRi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iSi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iii�i�i�i�i�i�i�i�i�i�i i i i i i i i i i	 i
 i i i
 i i i i i i i i i i i i i i i i i i i  i! i" i# i$ i% i& i' i( i) i* i+ i, i- i. i/ i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i: i; i< i= i> i? i@ iu
iA iB iC iD iE iF ijiG iH iI iJ iK iL iM iN iO iP ikiQ iR iS iT i�
iU iV iW iX iY iZ i[ i\ i] i^ i_ i` ia ilib ic id ie if ig ih ii ij ik il im in io ip iq ir is iit iu iv iw ix i�
iy iz i{ i| i} i~ i i� i� i� i� i� i� i� ii� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� iimi� i� i� i� i� i� i� ii� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� ii� i� i� i� i� i� i� i� i� i� i� i� ini� i� i� i� i� i� i� i� i� i� i� i�i� i� i� i� i� i� i� i� i� i� i� i� i� i� i!i!i!i!i!i!i!i!i!i	!i
!i!i!i
!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!iTi!i !i!!i"!i#!i$!i%!i&!i'!i(!i)!i*!i+!i,!i-!i.!i/!i0!i1!i2!i3!i4!i5!i6!i7!i8!i9!i:!i;!i<!i=!i>!i?!i@!iA!iB!iC!iD!iE!iF!iG!iH!iI!iJ!iK!iL!iM!iN!iO!iP!iQ!iR!iS!iT!iU!iV!iW!iX!iY!iZ!i[!i\!i]!i^!i_!i`!ia!ib!ic!id!ie!if!ig!ih!ii!ij!ik!il!im!in!io!ip!iq!ir!is!it!iiu!iv!iw!ix!iy!iz!i{!i|!i}!i	i~!i!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�i�!i�!i�!i�!i�!i�!i�!i�!i
i�i�!i�!i�!i�!i�!i�!i�!i�!iti�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i1i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!ioi�!i�!i�!iii�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!ipi�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i"i"i"i"i"i"i�i"i"i"i	"i
"i"i"i
"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"iUi"i"i "i!"i""i#"i$"i%"i&"i'"i("i)"i*"i+"i,"i-"i."i/"i0"i1"i2"i3"i4"i5"i6"i7"i8"i9"i:"i;"i
i<"i="i>"i?"i@"iA"iB"iC"iD"iE"iF"iG"iH"iI"iJ"iK"iL"iM"iN"iO"iP"iQ"iR"iS"iT"iiU"iiV"iW"iX"iiY"iZ"i["i\"i]"i^"i_"i`"ia"iib"ic"id"ie"if"ig"ih"ii"ij"ik"il"im"in"io"iuip"iq"ir"is"it"iu"iv"iw"ix"iy"iz"i{"i|"i}"i~"i"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"ii�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"iqi�"i�"i�"i�"i�"i�"i�"i�"ii�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i#i#i#i#i#i#ii#i#i#i	#i
#i#i#i
#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i #ii!#i"#i##i$#i%#i&#i'#i(#i)#i*#i+#i,#i-#i.#i/#i0#i1#i2#i3#i4#i5#i6#i7#i8#i9#i:#i;#i<#i=#iVi>#i?#i@#iA#iB#iC#iD#iE#iF#iG#iH#iI#iJ#iK#iL#iM#iN#iO#iP#iQ#iR#iS#iT#iU#iV#iW#iX#iY#iZ#i[#i\#i]#i^#i_#i`#ia#ib#ic#id#ie#if#ig#iih#ii#ij#ik#il#im#iin#io#ip#iq#ir#is#it#iu#iv#iw#ix#iy#iz#i{#i|#i}#i~#i#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#ivi�#i�#i�#i�#i�#i�#i�#i�#i�#i�#ii�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#ii�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#ii�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i$i$i$i$i$i$i$iri$i$i	$i
$i$i$i
$i$i$i$i$i$i$i$i$i$i$i$i$i$i$i$i$ii$i$i $i!$i"$i#$i$$i%$i&$i'$i($i)$ii*$i+$i,$i-$iii.$i/$i0$i1$i2$i3$i4$i5$i6$i7$i8$i9$isi:$i;$i<$i=$i>$i?$i@$iA$iB$iC$iD$iE$iYiF$iG$iH$iI$iJ$iK$iL$iM$iN$iO$iP$iQ$iR$iS$iT$iU$iV$iW$iX$iY$iZ$i[$i\$i]$i^$i_$i`$ia$ib$ic$id$ie$if$ig$ih$ii$ij$iik$il$im$in$io$ip$iq$ir$is$it$iu$iv$iw$ix$iy$iz$i{$i|$i}$i~$i$i�$i�$i�$i�$iti�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i i�$iui�$i�$i�$i�$i�$i!i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$ivi�$i�
i�$i�$iZi�
i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i"i�$i�$i�$i�$i�$i�$i�$i�$iwi�$i�$i�$i�$i�$i�$i�$iwi�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i
i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i%i#i%i%i%i%i%i$i%i%i%i	%i
%i%i%i
%i%i%i%i
i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i %i!%i"%i#%i$%i%%i&%i'%i(%i)%i*%i+%i,%i-%i.%i/%i0%i%i1%i2%i3%i4%i5%i6%i&i7%i8%i9%i:%i;%i<%i=%i>%i?%i@%iA%iB%iC%iD%iE%iF%iG%iH%iI%iJ%iK%iL%iM%iN%iO%iP%iQ%iR%iS%iT%iU%iV%iW%iX%iY%iZ%i[%i\%i]%i^%i_%i`%ia%ib%ic%id%ie%if%ig%ih%ii%ij%ik%il%im%in%io%ip%i�iq%ir%is%it%iu%iv%iw%ix%iy%iz%i{%i|%i}%i~%i%i�%i�%i�%i'i�%i�%i�%i�%i�%i(i�%i�%i�%i�%i�%i�%i�%i)i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i*i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i+i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%iWi�%i�%i�%i�%i�%i,i�%i�%i�%i�%i-i�%i�%i�%i�%i�%i�%i�%i�%i�%i.i�%i�%i�%i[i�%i�%i�%i�i�%i�%i�%i�%i�%i�%i�%i�%i�%i/i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i&i&i&i&i&i&i&i&i0i&i	&i
&i&i&i1i
&i&i&i&i&i&i&i&i&i&i&i&i&i&i&i&i&i&i2i&i &i!&i"&i#&i$&i%&i&&i'&i(&i)&i*&i+&i,&i-&i.&i/&i0&i1&i2&i3&i4&i5&i6&i3i7&i8&i9&i:&i;&i<&i=&i>&i?&i@&iA&i4iB&iC&iD&iE&iF&iG&iH&iI&iJ&iK&iL&iM&iN&iO&iP&iQ&iR&iS&iT&iU&iV&iW&iX&iY&iZ&i[&i\&i]&i^&i_&i`&ia&ib&ic&id&ie&if&ig&ih&ii&ij&ik&il&im&in&io&ip&iq&ir&is&it&iu&iv&iw&ix&iy&iz&i{&i|&i}&i~&i&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i5i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&ixi�&i�&i�&i�&i�&i�i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i6i�&i�&i�&i7i�&i�&i�&i�&iXi�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i8i�&i�&i�&i�&i�&i�&i�&i�&i�&iYi�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i9i�&i�&i�&iyi�&i�&i�&i�&i�&i�&i�&i�&i�&izi�&i�&i�&i�&i�&i�&i'i'i'i'i'i'i'i'i'i	'i
'i'i'i
'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i 'i!'i"'i#'i$'i%'i:i&'i;i''i('i)'i*'i+'i,'i-'i.'i/'i0'i1'i2'i3'i4'i5'i6'i7'i8'i9'i:'i;'i<'i='i>'i?'i@'i<iA'iB'iC'iD'iE'iF'iG'iH'iI'iJ'iK'iL'iM'iN'iO'iP'iQ'iR'iS'iT'iU'iV'iW'iX'iY'iZ'i['i\'i]'i^'i_'i`'ia'ib'ic'id'ie'if'ig'i{ih'ii'ij'ik'il'im'in'io'ip'iq'i|ir'is'it'iu'iv'iw'ix'iy'iz'i{'i|'i}'i~'i'i~i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�iZi=i�'i�'i�'i�'i�'i�'i�'i}i[i�'i�'i�'i�'i�'i�'i\i�'i�'i�'i�'i�'i�'i�'i�'i>i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�i�'i�'i�'i�'i�'i�'i�'i�'i~i�'i�'i�'i�'ii�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i?i�'i�'i�'i�'i�'i(i(i(i(i(i(i(i(i(i	(i
(i(i(i
(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i (i!(i�i@iAi"(i#(i$(i%(i&(i'(i((i)(i*(i+(i,(i-(i.(i/(i0(i1(i2(i3(i4(i5(i6(i7(i8(i9(i:(i;(i<(i=(i>(i?(i@(iA(iB(iC(iD(iE(iF(iG(iH(iI(iJ(iK(iL(iM(iN(iO(iP(iQ(iR(iS(iT(iU(iV(iW(iX(iY(iZ(i[(i\(i](i^(iBi_(i`(ia(ib(ic(id(ie(if(iCig(ih(ii(ij(ik(il(im(in(io(ip(iq(ir(is(iit(i�
iu(iv(iw(ix(i]iy(iz(i{(i|(i}(i~(i(i�(i�(i�(i�(i�(i�(i�(i�(iDi�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(iEi�(i�(i�(iFi�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(iv
i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(iGi�(i�(i�(i�(i�(i�(i�(iHi�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(iIi�(i�(i�(i�(i�i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i)i)i)i)i)i)i)i)i)i	)iJi
)i)i)i
)i)i�	i)i)i)i)i)i)iw
i)i)i)i)i)i)i)i)i)i)i)i )i!)i")i#)i$)i%)i&)i')i()i))i*)i+)i,)i-)i.)i/)i�i0)iKi1)i2)i3)i4)i5)i6)i7)i8)i9)i:)i;)i<)i=)i>)i?)i@)iA)iB)iC)iD)iE)iF)iG)i\i�iH)iI)iJ)iK)iL)ix
iM)iN)iO)iP)iQ)iR)iS)iT)iU)iV)iW)iX)iY)iZ)i[)i\)i])i^)i_)i`)ia)ib)ic)id)ie)if)ig)ih)ii)ij)ik)il)im)in)io)ip)iq)ir)is)it)iu)iv)iw)ix)iy)iz)i{)i|)i})i~)i)i�)i�)i�)i�)i�i�)i�)i�)i�)i�)iLi�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)iMi�)i�)i�)i'
i�)i�)i�)i�)i�)i�)i�)ii�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)iNi�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�i�)i�)i�)i�)i�)i�)i�)iOi�)i]i�)i�)i�)i�)i�)i�)i�)iPi�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)iQi�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i*i*i*i*i*i*i*i*i*i	*iRi
*i*i*i
*i*i*iSiTi*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i *i!*i"*i#*i$*i%*i&*i'*i(*i)*i**i+*i,*i-*i.*i/*i0*i1*i2*i3*i4*i5*i6*i7*i8*i9*i:*i;*i<*i=*i>*i?*i@*iA*iB*iC*iD*iE*iF*iG*iH*iI*iJ*iK*iL*iM*iN*iO*iP*iQ*iR*iS*iT*iU*iV*iW*iX*iY*iZ*i[*i\*i]*i^*i_*i`*ia*ib*ic*id*ie*if*ig*ih*ii*ij*ik*il*im*in*io*ip*iq*ir*is*it*iu*iv*iw*ix*iy*iz*i{*i|*i}*i~*i�i*i�*i�*i�*i�*i�*i�*iUi�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*iVi�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i^i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*ixi�*i+i+i+i+i+i+i+i+i+i	+i
+i+i+i
+i+i+i+i+i+i+i+i+i+i+i+iWi+i+i+i+i+i+i+i +i!+i"+i#+i$+i%+i&+i'+i�i(+i)+i*+i++iXi,+i-+i.+i/+i0+i1+i2+iYi3+i4+i5+i6+i7+i8+i9+i:+i;+i<+i=+i>+i?+iZi@+iA+iB+iC+iD+iE+iF+iG+iH+iI+iJ+iK+iL+iM+iN+iO+iP+iQ+iR+iS+iT+iU+iV+iW+iX+iY+iZ+i[+i\+i]+i^+i_+i`+ia+ib+ic+id+ie+if+ig+ih+ii+ij+ik+i�il+im+in+io+ip+iq+ir+is+it+iu+iv+iw+ix+iy+iz+i{+i|+i}+i~+i[i+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i\i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i]i�+i�+i�+i�+i�+i�+i^i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i^i�+i�+i�+i�+i�+i�+i_i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i_i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i,i,i,i,i,i,i,i,i,i	,i
,i,i,i
,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i ,i!,i",i#,i$,i%,i&,i',i(,i),i*,i+,i,,i-,i.,i/,i0,i1,i2,i_i3,i4,i5,i6,i�i7,i8,i9,i:,i;,i<,i=,i>,i?,i@,iA,iB,iC,iD,iE,iF,iG,iH,iI,iJ,iK,iL,iM,iN,iO,iP,iQ,iR,iS,i`iT,iU,iV,iW,iX,iY,iZ,i[,i\,i],i^,i_,i`,ia,ib,ic,id,ie,if,ig,ih,ii,ij,ik,il,im,in,io,ip,iq,iyiair,is,it,iu,iv,iw,ix,iy,iz,i{,i|,i},i~,i,i�,i�,i�,i�,i�,i�,i`i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,ibi�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,ici�,i�,i�i�,i�,i�,i�,idi�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,iei�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i-i-i-i-i-i-i-i-i-i	-izi
-i-i-i
-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i -i!-i"-i#-i$-i%-i&-i'-i(-i)-i*-i+-i,-iaibi--i.-i/-i0-i1-i2-i3-i4-i5-i6-i7-i8-i9-i:-i;-i<-i=-i>-i?-i@-iA-iB-iC-iD-iE-iF-iG-ificiH-iI-iJ-iK-iL-iM-iN-iO-iP-iQ-iR-iS-iT-iiU-iV-iW-iX-iY-iZ-igi[-i\-i]-i^-i_-i`-ia-ib-ic-id-ie-if-ig-ih-ii-ij-ik-il-im-in-io-ip-iq-ir-is-it-iu-iv-iw-ix-iy-iz-i{-i|-i}-i~-i-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-ihi�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�
i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-iii�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-iji�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i.i.i.i.i.i.i.i.i.i	.i
.i.i.i
.i.iki.i.i.i.i.i.i.ili.i.i.i.i.i.i.i.i.i.i .i!.i".imi#.i$.i%.i&.i'.i(.i).i*.i+.i,.i-.i..i/.i0.i1.i2.i3.i4.i5.i6.i7.i8.i9.i:.i`i�i;.i<.ini=.i>.i?.i@.iA.iB.iC.iD.iE.iF.iG.iH.iI.iJ.iK.iL.iM.iN.iO.iP.iQ.iR.iS.iT.iU.iV.iW.iX.iY.iZ.i[.i\.i].i^.i_.i`.ia.ib.ic.id.ie.if.ig.ih.ii.ij.ik.il.i�im.in.io.ip.iq.ir.is.it.iu.iv.iw.ix.iy.iz.i{.i|.i}.i~.i.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.ioi�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.ipi�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.idi�.i�.i�.i�.i�.iqi�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i/i/i/i/i/i/i/i/i/i	/i
/i/i/i
/i/i/i/i/i/i/i/i/i/i/i/i/i/i/i/i/iri/i/i /i!/i"/i#/i$/i%/i&/i'/i(/i)/i*/i+/i,/i-/i./i//i0/i1/i2/i3/i4/i5/i6/i7/i8/i9/i:/i;/i</i=/i>/i?/i@/iA/iB/iC/iD/iE/iF/iG/iH/iI/iJ/iK/iL/iM/iN/iO/iP/iQ/iR/iS/iT/iU/iV/iW/iX/iY/iZ/i[/isi\/i]/i^/i_/i`/ieia/ib/ic/id/ie/if/ig/ih/ii/ij/ik/il/im/in/io/ip/iq/ir/is/it/iu/iv/iw/ix/iy/iz/iti{/i|/i}/i~/i/i�/i�i�/i�/i�/i�/i�i�/i�/i�/i�/i�/i�i�/i�/i�i�/i�/i�/i�/i�/i�i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/iui�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/ivi�/i�/i�/i�/i�/i�/i�/i�/i�/i�/iwi�/i�/i�/i�/ixi�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/iyi�/i�i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/izi0i0i0i0i0i0i0i0i0i�	i	0i
0i0i0i
0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i{i 0i!0i"0i#0i$0i%0i&0i'0i(0i)0i*0i+0i,0i{i-0i.0i/0i00i10i20i30i40i50i60i70i80i90i:0i;0i<0i=0i>0i?0i@0iA0iB0iC0iD0iE0iF0iG0i|iH0iI0iJ0iK0iL0iM0iN0iO0iP0iQ0iR0i}iS0iT0iU0iV0iW0iX0iY0iZ0i[0i\0i]0i^0i_0i`0ia0ib0ic0id0ie0if0ig0ih0ii0ij0ik0il0im0in0io0ip0iq0ir0is0it0iu0iv0iw0ix0i|iy0iz0i{0i|0i}0i~0i0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�
i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i}i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i~i�0i�0i�0i�0i�0i�0i�0i�0i�0i�i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i1i1i1i1i1i1i1i1ii1i	1i
1i1i1i
1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i 1i!1i"1i�i#1i$1i%1i&1i'1i~i(1i)1i*1i+1i,1i-1i.1i/1i01i11i21i31i41i51i61i71i81i91i:1i;1i<1i=1i>1i?1i@1iA1iB1iC1iD1iE1iF1iG1iH1iI1iJ1iK1iL1iM1iN1iO1iP1iQ1iR1iS1iT1iU1iV1iW1iX1iY1iZ1i[1i\1i]1i^1i_1i`1ia1ib1ic1id1ie1if1i�ig1ih1ii1ij1ik1il1im1in1io1ip1iq1ir1is1it1iu1iv1iw1ix1iy1iz1i{1i|1i}1i~1i1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�ii�1i�1i�1i�1i�1i�1i�1i�1i�i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i2i2i2i2i2i2i2i2i2i	2i
2i2i2i
2i2i2i2i2i2i2i2i2i2i2i2i2i2ifii2i2i2i2i2i 2i!2i"2i#2i$2i%2i&2i'2i(2i)2i*2i+2i,2i-2i.2i/2i02i12i22i32i42i52i62i72i82i92i:2i;2i<2i=2igi>2i?2i@2iA2iB2iC2iD2iE2iF2iG2iH2iI2iJ2iK2iL2iM2iN2iO2iP2iQ2iR2iS2iT2iU2iV2iW2i�iX2iY2iZ2i[2i\2i]2i^2i_2i`2ia2ib2ic2id2ie2if2ig2ih2ii2ij2ik2il2im2in2io2ip2i�iq2ir2is2it2iu2iv2iw2ix2iy2iz2i{2i|2i}2i~2i2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�i�2i�i�2i�2i�2i�2i�2i�i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2iy
i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i3i3i3i3i3i3i3i3i3i	3i
3i3i3i
3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i 3i!3i"3i#3i$3i%3i&3i'3i(3i)3i*3i+3i,3i-3i.3i/3i03i13i23i33i43i53i63i73i83i93i:3i;3i<3i=3i>3i�i?3i�i@3iA3iB3iC3iD3iE3iF3iG3i�iH3iI3iJ3iK3iL3iM3iN3i�i�iO3iP3iQ3iR3iS3i�iT3iU3iV3iW3iX3iY3iZ3i[3i\3i]3i^3i_3i`3ia3ib3ic3id3ie3if3ig3i�ih3ii3ij3ik3il3im3in3io3ip3iq3ir3is3it3iu3iv3iw3ix3i�iy3iz3i{3i|3i}3i~3i3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3ihi�i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�i�3i�3i�3i�3i�i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3iz
i�3i�3i�3i�3i�3i�3i�3i�3i�i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�i�3i�3i�3i�3i�3i�3i�3i�3i�3i4i4i4i4i4i4i4i4i4i	4i
4i4i4i
4i4i4i4i�i4i4i4i4i4i4i4i4i4i4i4i4i4i�i4i4i 4i!4i"4i#4i$4i%4i&4i'4i(4i)4i*4i+4i,4i-4i.4i/4i04i14i24i34i44i54i64i74i�i84i94i:4i;4i<4i=4i>4i?4i@4iA4iB4iC4iD4iE4iF4iG4iH4iI4iJ4iK4iL4iM4iN4iO4iP4iQ4iR4iS4iT4iU4iV4iW4iX4iY4iZ4i[4i\4i]4i^4i_4i`4ia4ib4ic4id4ie4if4ig4ih4ii4ij4ik4il4im4in4io4ip4iq4ir4is4it4iu4iv4iw4ix4i�iy4iz4i{4iii|4i}4i~4i4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i5i5i5i5i5i5i5i5i5i	5i
5i5i5i
5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i 5i!5i"5i#5i$5i%5i&5i'5i(5i)5i*5i+5i,5i-5i.5i/5i05i15i25i35i45i55i65i75i85i95i:5i;5i<5i=5i>5i?5i@5iA5iB5iC5iD5iE5iF5iG5iH5iI5iJ5i�iK5iL5iM5iN5iO5iP5iQ5iR5iS5i�iT5iU5iV5iW5iX5iY5iZ5i[5i\5i]5i^5i_5i`5ia5ib5ic5id5ie5if5ig5ih5ii5ij5ik5il5im5in5io5ip5iq5ir5is5it5iu5iv5iw5ix5iy5iz5i{5i|5i}5i~5i5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i6i6i6i6i6i6i6i6i6i	6i
6i6i6i
6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i 6i!6i"6i#6i$6i%6i&6i'6i(6i)6i*6i+6i,6i-6i.6i/6i06i16i26i36i46i56i66i76i86i96i:6i;6i<6i=6i>6i?6i@6iA6iB6iC6iD6iE6iF6iG6iH6iI6iJ6iK6iL6iM6iN6iO6iP6iQ6iR6iS6iT6iU6iV6iW6iX6iY6iZ6i[6i\6i]6i^6i_6i`6ia6ib6ic6id6ie6if6ig6ih6ii6ij6ik6il6im6in6io6ip6iq6ir6is6it6iu6iv6iw6ix6iy6iz6i{6i|6i}6i~6i6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6N(uBIG5_TYPICAL_DISTRIBUTION_RATIOuBIG5_TABLE_SIZEuBig5CharToFreqOrder(((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/big5freq.pyu<module>+s�000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/cp949prober.cpython-33.pyc000064400000002775151733566760027273 0ustar00�
7�Re�c@sZddlmZddlmZddlmZddlmZGdd�de�ZdS(i(uMultiByteCharSetProber(uCodingStateMachine(uEUCKRDistributionAnalysis(uCP949SMModelcBs,|EeZdZdd�Zdd�ZdS(uCP949ProbercCs6tj|�tt�|_t�|_|j�dS(N(uMultiByteCharSetProberu__init__uCodingStateMachineuCP949SMModelu
_mCodingSMuEUCKRDistributionAnalysisu_mDistributionAnalyzerureset(uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/cp949prober.pyu__init__#s
uCP949Prober.__init__cCsdS(NuCP949((uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/cp949prober.pyuget_charset_name+suCP949Prober.get_charset_nameN(u__name__u
__module__u__qualname__u__init__uget_charset_name(u
__locals__((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/cp949prober.pyuCP949Prober"suCP949ProberN(	umbcharsetproberuMultiByteCharSetProberucodingstatemachineuCodingStateMachineuchardistributionuEUCKRDistributionAnalysisumbcssmuCP949SMModeluCP949Prober(((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/cp949prober.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/sbcharsetprober.cpython-33.pyc000064400000010252151733566760030307 0ustar00python3.3�
7�Re�c@s�ddlZddlmZddlmZddlmZdZdZdZ	d	Z
d
ZdZedZ
Gdd
�d
e�ZdS(iNi(u	constants(u
CharSetProber(uwrap_ordi@igffffff�?g�������?i�icBsV|EeZdZdddd�Zdd�Zdd�Zdd�Zd	d
�Z	dS(
uSingleByteCharSetProbercCs6tj|�||_||_||_|j�dS(N(u
CharSetProberu__init__u_mModelu
_mReversedu_mNameProberureset(uselfumodelureversedu
nameProber((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyu__init__-s

			u SingleByteCharSetProber.__init__cCsEtj|�d|_dgt|_d|_d|_d|_dS(Ni�i(u
CharSetProberuresetu_mLastOrderuNUMBER_OF_SEQ_CATu
_mSeqCountersu_mTotalSeqsu_mTotalCharu
_mFreqChar(uself((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyureset6s
			uSingleByteCharSetProber.resetcCs%|jr|jj�S|jdSdS(NucharsetName(u_mNameProberuget_charset_nameu_mModel(uself((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyuget_charset_name@s	
u(SingleByteCharSetProber.get_charset_namecCs�|jds|j|�}nt|�}|s;|j�Sx�|D]�}|jdt|�}|tkr}|jd7_n|tkr|jd7_|j	tkr|j
d7_
|js�|j	t|}|jd|}n"|t|j	}|jd|}|j|d7<qn||_	qBW|j�t
jkr�|j
tkr�|j�}|tkr�t
jr�tjjd|jd|f�nt
j|_q�|tkr�t
jr�tjjd|jd|tf�nt
j|_q�q�n|j�S(NukeepEnglishLetterucharToOrderMapiuprecedenceMatrixu$%s confidence = %s, we have awinner
ucharsetNameu9%s confidence = %s, below negativeshortcut threshhold %s
(u_mModelufilter_without_english_lettersulenu	get_stateuwrap_orduSYMBOL_CAT_ORDERu_mTotalCharuSAMPLE_SIZEu
_mFreqCharu_mLastOrderu_mTotalSeqsu
_mReversedu
_mSeqCountersu	constantsu
eDetectinguSB_ENOUGH_REL_THRESHOLDuget_confidenceuPOSITIVE_SHORTCUT_THRESHOLDu_debugusysustderruwriteueFoundItu_mStateuNEGATIVE_SHORTCUT_THRESHOLDueNotMe(uselfuaBufuaLenucuorderuiumodelucf((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyufeedFsF


	
		
uSingleByteCharSetProber.feedcCshd}|jdkrdd|jt|j|jd}||j|j}|dkrdd}qdn|S(Ng{�G�z�?ig�?umTypicalPositiveRatiog�G�z��?(u_mTotalSeqsu
_mSeqCountersuPOSITIVE_CATu_mModelu
_mFreqCharu_mTotalChar(uselfur((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyuget_confidenceps#u&SingleByteCharSetProber.get_confidenceNF(
u__name__u
__module__u__qualname__uFalseuNoneu__init__uresetuget_charset_nameufeeduget_confidence(u
__locals__((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyuSingleByteCharSetProber,s
	
*uSingleByteCharSetProber(usysuu	constantsu
charsetproberu
CharSetProberucompatuwrap_orduSAMPLE_SIZEuSB_ENOUGH_REL_THRESHOLDuPOSITIVE_SHORTCUT_THRESHOLDuNEGATIVE_SHORTCUT_THRESHOLDuSYMBOL_CAT_ORDERuNUMBER_OF_SEQ_CATuPOSITIVE_CATuSingleByteCharSetProber(((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyu<module>s
python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/__init__.cpython-33.pyc000064400000001635151733566760026742 0ustar00�
7�Rec@s&dZddlmZdd�ZdS(u2.2.1i(uversion_infocCs�tdkrt|t�s7tdkrFt|t�rFtd��nddlm}|j�}|j�|j	|�|j
�|jS(Niiu-Expected a bytes object, not a unicode objecti(uuniversaldetector(ii(ii(uversion_infou
isinstanceuunicodeubytesu
ValueErroruuuniversaldetectoruUniversalDetectoruresetufeeducloseuresult(uaBufuuniversaldetectoruu((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/__init__.pyudetects


udetectN(u__version__usysuversion_infoudetect(((uG/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/__init__.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/mbcsgroupprober.cpython-33.pyc000064400000003206151733566760030333 0ustar00python3.3�
7�Re�c@s�ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZGd
d�de�ZdS(
i(uCharSetGroupProber(u
UTF8Prober(u
SJISProber(uEUCJPProber(uGB2312Prober(uEUCKRProber(uCP949Prober(u
Big5Prober(uEUCTWProbercBs |EeZdZdd�ZdS(uMBCSGroupProbercCsTtj|�t�t�t�t�t�t�t�t	�g|_
|j�dS(N(uCharSetGroupProberu__init__u
UTF8Proberu
SJISProberuEUCJPProberuGB2312ProberuEUCKRProberuCP949Proberu
Big5ProberuEUCTWProberu	_mProbersureset(uself((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcsgroupprober.pyu__init__*s
uMBCSGroupProber.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcsgroupprober.pyuMBCSGroupProber)suMBCSGroupProberN(ucharsetgroupproberuCharSetGroupProberu
utf8proberu
UTF8Proberu
sjisproberu
SJISProberueucjpproberuEUCJPProberugb2312proberuGB2312ProberueuckrproberuEUCKRProberucp949proberuCP949Proberu
big5proberu
Big5ProberueuctwproberuEUCTWProberuMBCSGroupProber(((uN/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/mbcsgroupprober.pyu<module>spython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/eucjpprober.cpython-33.pyc000064400000007102151733566760027516 0ustar00�
7�Re^c@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZGd	d
�d
e�Z
dS(iNi(u	constants(uMultiByteCharSetProber(uCodingStateMachine(uEUCJPDistributionAnalysis(uEUCJPContextAnalysis(uEUCJPSMModelcBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uEUCJPProbercCsBtj|�tt�|_t�|_t�|_|j	�dS(N(
uMultiByteCharSetProberu__init__uCodingStateMachineuEUCJPSMModelu
_mCodingSMuEUCJPDistributionAnalysisu_mDistributionAnalyzeruEUCJPContextAnalysisu_mContextAnalyzerureset(uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/eucjpprober.pyu__init__&s

uEUCJPProber.__init__cCstj|�|jj�dS(N(uMultiByteCharSetProberuresetu_mContextAnalyzer(uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/eucjpprober.pyureset-s
uEUCJPProber.resetcCsdS(NuEUC-JP((uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/eucjpprober.pyuget_charset_name1suEUCJPProber.get_charset_namecCs�t|�}xVtd|�D]E}|jj||�}|tjkr�tjr{tjj	|j
�dt|�d�ntj|_
Pq|tjkr�tj|_
Pq|tjkr|jj�}|dkr|d|jd<|jj|j|�|jj|j|�qa|jj||d|d�|�|jj||d|d�|�qqW||d|jd<|j�tjkr�|jj�r�|j�tjkr�tj|_
q�n|j�S(Niu prober hit error at byte u
i(ulenurangeu
_mCodingSMu
next_stateu	constantsueErroru_debugusysustderruwriteuget_charset_nameustrueNotMeu_mStateueItsMeueFoundItueStartuget_current_charlenu
_mLastCharu_mContextAnalyzerufeedu_mDistributionAnalyzeru	get_stateu
eDetectingugot_enough_datauget_confidenceuSHORTCUT_THRESHOLD(uselfuaBufuaLenuiucodingStateucharLen((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/eucjpprober.pyufeed4s6		"%uEUCJPProber.feedcCs+|jj�}|jj�}t||�S(N(u_mContextAnalyzeruget_confidenceu_mDistributionAnalyzerumax(uselfucontxtCfu	distribCf((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/eucjpprober.pyuget_confidenceWsuEUCJPProber.get_confidenceN(u__name__u
__module__u__qualname__u__init__uresetuget_charset_nameufeeduget_confidence(u
__locals__((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/eucjpprober.pyuEUCJPProber%s
#uEUCJPProber(usysuu	constantsumbcharsetproberuMultiByteCharSetProberucodingstatemachineuCodingStateMachineuchardistributionuEUCJPDistributionAnalysisujpcntxuEUCJPContextAnalysisumbcssmuEUCJPSMModeluEUCJPProber(((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/eucjpprober.pyu<module>spython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/euckrprober.cpython-33.pyc000064400000002776151733566760027535 0ustar00�
7�Re�c@sZddlmZddlmZddlmZddlmZGdd�de�ZdS(i(uMultiByteCharSetProber(uCodingStateMachine(uEUCKRDistributionAnalysis(uEUCKRSMModelcBs,|EeZdZdd�Zdd�ZdS(uEUCKRProbercCs6tj|�tt�|_t�|_|j�dS(N(uMultiByteCharSetProberu__init__uCodingStateMachineuEUCKRSMModelu
_mCodingSMuEUCKRDistributionAnalysisu_mDistributionAnalyzerureset(uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euckrprober.pyu__init__#s
uEUCKRProber.__init__cCsdS(NuEUC-KR((uself((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euckrprober.pyuget_charset_name)suEUCKRProber.get_charset_nameN(u__name__u
__module__u__qualname__u__init__uget_charset_name(u
__locals__((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euckrprober.pyuEUCKRProber"suEUCKRProberN(	umbcharsetproberuMultiByteCharSetProberucodingstatemachineuCodingStateMachineuchardistributionuEUCKRDistributionAnalysisumbcssmuEUCKRSMModeluEUCKRProber(((uJ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/euckrprober.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/langgreekmodel.cpython-33.pyc000064400000060030151733566760030076 0ustar00python3.3�
7�ReT1c@shd�Zd�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zd�S(�i�i�i�i�iRidihi^ibieitifioi�iui\iXiqiUiOiviiiSiCiriwi_icimi�iHiFiPiQi<i`i]iYiDixiaiMiViEi7iNisiAiBi:iLijigiWikipi�iZiJi�i�i=i$i.iGiIi6ili{inii3i+i)i"i[i(i4i/i,i5i&i1i;i'i#i0i�i%i!i-i8i2iTi9iyiiiii|iiiiii i
iiiii
iiii	iiiiiiii*ii@iKiiiiucharToOrderMapuprecedenceMatrixg���s�?umTypicalPositiveRatioukeepEnglishLetteru
ISO-8859-7ucharsetNameuwindows-1253N(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iRidihi^ibieitifioi�iui\iXiqiUiOiviiiSiCiriwi_icimi�i�i�i�i�i�i�iHiFiPiQi<i`i]iYiDixiaiMiViEi7iNisiAiBi:iLijigiWikipi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iZi�i�i�i�i�i�i�i�i�i�iJi�i�i�i�i�i�i�i�i=i$i.iGiIi�i6i�ili{inii3i+i)i"i[i(i4i/i,i5i&i1i;i'i#i0i�i%i!i-i8i2iTi9ixiyiiiii|iiiiii i
iiiii
iiii	iiiiiiii*ii@iKiiii�(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iRidihi^ibieitifioi�iui\iXiqiUiOiviiiSiCiriwi_icimi�i�i�i�i�i�i�iHiFiPiQi<i`i]iYiDixiaiMiViEi7iNisiAiBi:iLijigiWikipi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i=i�i�i�i�i�i�i�i�i�i�iJi�i�i�i�i�i�i�i�i�i$i.iGiIi�i6i�ili{inii3i+i)i"i[i(i4i/i,i5i&i1i;i'i#i0i�i%i!i-i8i2iTi9ixiyiiiii|iiiiii i
iiiii
iiii	iiiiiiii*ii@iKiiii�(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiF(uLatin7_CharToOrderMapuwin1253_CharToOrderMapuGreekLangModeluFalseuLatin7GreekModeluWin1253GreekModel(((uM/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/langgreekmodel.pyu<module>#sV

python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/escsm.cpython-33.pyc000064400000016265151733566760026322 0ustar00�
7�Re�c@s�ddlmZmZmZdZeedeeeeeeeeeeeeeeeeeeededededddededddededeeeeeeef0ZdZied6dd	6ed
6ed6dd
6ZdZedeeeeeeeeeeeeeeeeeeeeeeeeeeeedeeeeeeeeeddeeeeeeeeeeeeeeeeeeeeeef@Z	dZ
ied6dd	6e	d
6e
d6dd
6ZdZedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedeeedeeeeedeeeeeeeeeeeeeeeeeeeeeeeeeeeefHZ
dZied6dd	6e
d
6ed6dd
6ZdZedeeeeeeeeeeeeeeeeeeedeeeeeedeeeeeeeeeeef(ZdZied6dd	6ed
6ed6dd
6ZdS(i(ueStartueErrorueItsMeiiiiiiu
classTableuclassFactoru
stateTableucharLenTableu
HZ-GB-2312unamei	uISO-2022-CNiii
uISO-2022-JPuISO-2022-KRN(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(	iiiiiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii	iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(
iiiiiiiiii(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(iiiiii(u	constantsueStartueErrorueItsMeuHZ_clsuHZ_stuHZCharLenTableu	HZSMModelu
ISO2022CN_clsuISO2022CN_stuISO2022CNCharLenTableuISO2022CNSMModelu
ISO2022JP_clsuISO2022JP_stuISO2022JPCharLenTableuISO2022JPSMModelu
ISO2022KR_clsuISO2022KR_stuISO2022KRCharLenTableuISO2022KRSMModel(((uD/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/escsm.pyu<module>sh






site-packages/pip/_vendor/requests/packages/chardet/__pycache__/latin1prober.cpython-33.pyc000064400000010025151733566760027517 0ustar00python3.3�
7�Reyc@s�ddlmZddlmZddlmZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	eeeeeee
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
e
e
e
e
e
eee
e
e
e
e
e
e
e
eee
e
e
e
e
ee
e
e
e
e
eeefZdZGdd
�d
e�ZdS(i(u
CharSetProber(ueNotMe(uwrap_ordiiiiiiiicBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uLatin1ProbercCstj|�|j�dS(N(u
CharSetProberu__init__ureset(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/latin1prober.pyu__init__bs
uLatin1Prober.__init__cCs*t|_dgt|_tj|�dS(Ni(uOTHu_mLastCharClassuFREQ_CAT_NUMu
_mFreqCounteru
CharSetProberureset(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/latin1prober.pyuresetfs	uLatin1Prober.resetcCsdS(Nuwindows-1252((uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/latin1prober.pyuget_charset_nameksuLatin1Prober.get_charset_namecCs�|j|�}xf|D]^}tt|�}t|jt|}|dkrZt|_Pn|j|d7<||_qW|j	�S(Nii(
ufilter_with_english_lettersuLatin1_CharToClassuwrap_orduLatin1ClassModelu_mLastCharClassu	CLASS_NUMueNotMeu_mStateu
_mFreqCounteru	get_state(uselfuaBufucu	charClassufreq((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/latin1prober.pyufeedns

	
uLatin1Prober.feedcCs�|j�tkrdSt|j�}|dkr:d}n$|jd||jdd|}|dkrsd}n|d}|S(Ng{�G�z�?giig4@g�?(u	get_stateueNotMeusumu
_mFreqCounter(uselfutotalu
confidence((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/latin1prober.pyuget_confidence|s		
uLatin1Prober.get_confidenceN(u__name__u
__module__u__qualname__u__init__uresetuget_charset_nameufeeduget_confidence(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/latin1prober.pyuLatin1Proberas
uLatin1ProberN(@iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii(u
charsetproberu
CharSetProberu	constantsueNotMeucompatuwrap_orduFREQ_CAT_NUMuUDFuOTHuASCuASSuACVuACOuASVuASOu	CLASS_NUMuLatin1_CharToClassuLatin1ClassModeluLatin1Prober(((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/latin1prober.pyu<module>sj	python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/constants.cpython-33.pyc000064400000000547151733566760027220 0ustar00�
7�Re7c@s4dZdZdZdZdZdZdZdZdS(iiigffffff�?N(u_debugu
eDetectingueFoundItueNotMeueStartueErrorueItsMeuSHORTCUT_THRESHOLD(((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/constants.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/hebrewprober.cpython-33.pyc000064400000010753151733566760027613 0ustar00python3.3�
7�Re/4c@s�ddlmZddlmZmZddlmZdZdZdZ	dZ
dZd	Zd
Z
dZdZd
ZdZdZdZdZGdd�de�ZdS(i(u
CharSetProber(ueNotMeu
eDetecting(uwrap_ordi�i�i�i�i�i�i�i�i�i�ig{�G�z�?u
ISO-8859-8uwindows-1255cBst|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS(uHebrewProbercCs-tj|�d|_d|_|j�dS(N(u
CharSetProberu__init__uNoneu_mLogicalProberu_mVisualProberureset(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyu__init__�s
		uHebrewProber.__init__cCs(d|_d|_d|_d|_dS(Niu (u_mFinalCharLogicalScoreu_mFinalCharVisualScoreu_mPrevu_mBeforePrev(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyureset�s			uHebrewProber.resetcCs||_||_dS(N(u_mLogicalProberu_mVisualProber(uselfu
logicalProberuvisualProber((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyuset_model_probers�s	uHebrewProber.set_model_proberscCst|�tttttgkS(N(uwrap_ordu	FINAL_KAFu	FINAL_MEMu	FINAL_NUNuFINAL_PEuFINAL_TSADI(uselfuc((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyuis_final�suHebrewProber.is_finalcCst|�ttttgkS(N(uwrap_ordu
NORMAL_KAFu
NORMAL_MEMu
NORMAL_NUNu	NORMAL_PE(uselfuc((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyuis_non_final�suHebrewProber.is_non_finalcCs�|j�tkrtS|j|�}x�|D]�}|dkr�|jdkr�|j|j�rq|jd7_q�|j|j�r�|jd7_q�q�n?|jdkr�|j|j�r�|dkr�|jd7_n|j|_||_q,Wt	S(Nu i(
u	get_stateueNotMeufilter_high_bit_onlyu_mBeforePrevuis_finalu_mPrevu_mFinalCharLogicalScoreuis_non_finalu_mFinalCharVisualScoreu
eDetecting(uselfuaBufucur((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyufeed�s 

uHebrewProber.feedcCs�|j|j}|tkr tS|tkr1tS|jj�|jj�}|tkr]tS|tkrntS|dkr~tStS(Ng(	u_mFinalCharLogicalScoreu_mFinalCharVisualScoreuMIN_FINAL_CHAR_DISTANCEuLOGICAL_HEBREW_NAMEuVISUAL_HEBREW_NAMEu_mLogicalProberuget_confidenceu_mVisualProberuMIN_MODEL_DISTANCE(uselfufinalsubumodelsub((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyuget_charset_name�s

uHebrewProber.get_charset_namecCs2|jj�tkr.|jj�tkr.tStS(N(u_mLogicalProberu	get_stateueNotMeu_mVisualProberu
eDetecting(uself((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyu	get_statesuHebrewProber.get_stateN(u__name__u
__module__u__qualname__u__init__uresetuset_model_probersuis_finaluis_non_finalufeeduget_charset_nameu	get_state(u
__locals__((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyuHebrewProber�s

;uHebrewProberN(u
charsetproberu
CharSetProberu	constantsueNotMeu
eDetectingucompatuwrap_ordu	FINAL_KAFu
NORMAL_KAFu	FINAL_MEMu
NORMAL_MEMu	FINAL_NUNu
NORMAL_NUNuFINAL_PEu	NORMAL_PEuFINAL_TSADIuNORMAL_TSADIuMIN_FINAL_CHAR_DISTANCEuMIN_MODEL_DISTANCEuVISUAL_HEBREW_NAMEuLOGICAL_HEBREW_NAMEuHebrewProber(((uK/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyu<module>s"dpython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/utf8prober.cpython-33.pyc000064400000005443151733566760027304 0ustar00�
7�Re\
c@s`ddlmZddlmZddlmZddlmZdZGdd�de�Z	dS(	i(u	constants(u
CharSetProber(uCodingStateMachine(uUTF8SMModelg�?cBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(u
UTF8ProbercCs*tj|�tt�|_|j�dS(N(u
CharSetProberu__init__uCodingStateMachineuUTF8SMModelu
_mCodingSMureset(uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/utf8prober.pyu__init__%s
uUTF8Prober.__init__cCs'tj|�|jj�d|_dS(Ni(u
CharSetProberuresetu
_mCodingSMu
_mNumOfMBChar(uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/utf8prober.pyureset*s

uUTF8Prober.resetcCsdS(Nuutf-8((uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/utf8prober.pyuget_charset_name/suUTF8Prober.get_charset_namecCs�x�|D]�}|jj|�}|tjkr>tj|_Pq|tjkr]tj|_Pq|tjkr|jj	�dkr�|j
d7_
q�qqW|j�tjkr�|j
�tjkr�tj|_q�n|j�S(Nii(u
_mCodingSMu
next_stateu	constantsueErrorueNotMeu_mStateueItsMeueFoundItueStartuget_current_charlenu
_mNumOfMBCharu	get_stateu
eDetectinguget_confidenceuSHORTCUT_THRESHOLD(uselfuaBufucucodingState((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/utf8prober.pyufeed2s
uUTF8Prober.feedcCsLd}|jdkrDx$td|j�D]}|t}q(Wd|S|SdS(Ng�G�z��?iig�?(u
_mNumOfMBCharurangeu
ONE_CHAR_PROB(uselfuunlikeui((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/utf8prober.pyuget_confidenceEsuUTF8Prober.get_confidenceN(u__name__u
__module__u__qualname__u__init__uresetuget_charset_nameufeeduget_confidence(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/utf8prober.pyu
UTF8Prober$s
u
UTF8ProberN(
uu	constantsu
charsetproberu
CharSetProberucodingstatemachineuCodingStateMachineumbcssmuUTF8SMModelu
ONE_CHAR_PROBu
UTF8Prober(((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/utf8prober.pyu<module>s
site-packages/pip/_vendor/requests/packages/chardet/__pycache__/codingstatemachine.cpython-33.pyc000064400000004617151733566760030760 0ustar00python3.3�
7�Re	c@s7ddlmZddlmZGdd�d�ZdS(i(ueStart(uwrap_ordcBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uCodingStateMachinecCs)||_d|_d|_|j�dS(Ni(u_mModelu_mCurrentBytePosu_mCurrentCharLenureset(uselfusm((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/codingstatemachine.pyu__init__!s			uCodingStateMachine.__init__cCs
t|_dS(N(ueStartu_mCurrentState(uself((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/codingstatemachine.pyureset'suCodingStateMachine.resetcCs�|jdt|�}|jtkrFd|_|jd||_n|j|jd|}|jd||_|jd7_|jS(Nu
classTableiucharLenTableuclassFactoru
stateTablei(u_mModeluwrap_ordu_mCurrentStateueStartu_mCurrentBytePosu_mCurrentCharLen(uselfucubyteClsu
curr_state((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/codingstatemachine.pyu
next_state*s	uCodingStateMachine.next_statecCs|jS(N(u_mCurrentCharLen(uself((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/codingstatemachine.pyuget_current_charlen9su&CodingStateMachine.get_current_charlencCs|jdS(Nuname(u_mModel(uself((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/codingstatemachine.pyuget_coding_state_machine<su+CodingStateMachine.get_coding_state_machineN(u__name__u
__module__u__qualname__u__init__uresetu
next_stateuget_current_charlenuget_coding_state_machine(u
__locals__((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/codingstatemachine.pyuCodingStateMachine s
uCodingStateMachineN(u	constantsueStartucompatuwrap_orduCodingStateMachine(((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/codingstatemachine.pyu<module>spython3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/chardetect.cpython-33.pyc000064400000003303151733566760027303 0ustar00�
7�Reuc@sqdZddlmZddlmZmZddlmZddd�Zdd	�Z	e
d
krme	�ndS(u
Script which takes one or more file paths and reports on their detected
encodings

Example::

    % chardetect somefile someotherfile
    somefile: windows-1252 with confidence 0.5
    someotherfile: ascii with confidence 1.0

If no paths are provided, it takes its input from stdin.

i(uopen(uargvustdin(uUniversalDetectorustdincCsit�}x|D]}|j|�qW|j�|j}|dr]d||d|dfSd|SdS(u;Return a string describing the probable encoding of a file.uencodingu%s: %s with confidence %su
confidenceu
%s: no resultN(uUniversalDetectorufeeducloseuresult(ufileunameuuulineuresult((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardetect.pyudescription_ofs	

	
udescription_ofcCsott�dkr%ttt��nFxCtdd�D]1}t|d��}tt||��WdQXq6WdS(Niurb(ulenuargvuprintudescription_ofustdinuopen(upathuf((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardetect.pyumain$s
umainu__main__N(u__doc__uiouopenusysuargvustdinuchardet.universaldetectoruUniversalDetectorudescription_ofumainu__name__(((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardetect.pyu<module>s	python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/big5prober.cpython-33.pyc000064400000002754151733566760027246 0ustar00�
7�Re�c@sZddlmZddlmZddlmZddlmZGdd�de�ZdS(i(uMultiByteCharSetProber(uCodingStateMachine(uBig5DistributionAnalysis(uBig5SMModelcBs,|EeZdZdd�Zdd�ZdS(u
Big5ProbercCs6tj|�tt�|_t�|_|j�dS(N(uMultiByteCharSetProberu__init__uCodingStateMachineuBig5SMModelu
_mCodingSMuBig5DistributionAnalysisu_mDistributionAnalyzerureset(uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/big5prober.pyu__init__#s
uBig5Prober.__init__cCsdS(NuBig5((uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/big5prober.pyuget_charset_name)suBig5Prober.get_charset_nameN(u__name__u
__module__u__qualname__u__init__uget_charset_name(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/big5prober.pyu
Big5Prober"su
Big5ProberN(	umbcharsetproberuMultiByteCharSetProberucodingstatemachineuCodingStateMachineuchardistributionuBig5DistributionAnalysisumbcssmuBig5SMModelu
Big5Prober(((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/big5prober.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/universaldetector.cpython-33.pyc000064400000011743151733566760030667 0ustar00python3.3�
7�Re�c@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlZdZ
dZdZd	ZGd
d�d�ZdS(i(u	constantsiN(uLatin1Prober(uMBCSGroupProber(uSBCSGroupProber(uEscCharSetProberg�������?icBsD|EeZdZdd�Zdd�Zdd�Zdd�Zd	S(
uUniversalDetectorcCsDtjd�|_tjd�|_d|_g|_|j�dS(Ns[�-�]s(|~{)(ureucompileu_highBitDetectoru_escDetectoruNoneu_mEscCharSetProberu_mCharSetProbersureset(uself((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/universaldetector.pyu__init__-s
		uUniversalDetector.__init__cCsidd6dd6|_d|_d|_d|_t|_d|_	|j
r]|j
j�nx|jD]}|j�qgWdS(Nuencodinggu
confidencesFT(
uNoneuresultuFalseudoneuTrueu_mStartu	_mGotDatau
ePureAsciiu_mInputStateu
_mLastCharu_mEscCharSetProberuresetu_mCharSetProbers(uselfuprober((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/universaldetector.pyureset4s						uUniversalDetector.resetcCsN|jr
dSt|�}|s#dS|js�|dd�tjkr_idd6dd6|_q�|dd�tjkr�idd6dd6|_q�|dd�tjkr�idd6dd6|_q�|dd�d	kr�id
d6dd6|_q�|dd�dkr%idd6dd6|_q�|dd
�tjkrXidd6dd6|_q�|dd
�tj	kr�idd6dd6|_q�nd|_|jdr�|jddkr�d|_dS|jtkr(|j
j|�r�t|_q(|jtkr(|jj|j|�r(t|_q(n|dd�|_|jtkr�|jsbt�|_n|jj|�tjkrJi|jj�d6|jj�d6|_d|_qJn�|jtkrJ|js�t�t�t�g|_nx\|jD]N}|j|�tjkr�i|j�d6|j�d6|_d|_Pq�q�WndS(NiuUTF-8uencodingg�?u
confidenceiuUTF-32LEuUTF-32BEs��uX-ISO-10646-UCS-4-3412s��uX-ISO-10646-UCS-4-2143iuUTF-16LEuUTF-16BEgiTi����(udoneulenu	_mGotDataucodecsuBOMuresultuBOM_UTF32_LEuBOM_UTF32_BEuBOM_LEuBOM_BEuTrueu_mInputStateu
ePureAsciiu_highBitDetectorusearchu	eHighbyteu_escDetectoru
_mLastCharu	eEscAsciiu_mEscCharSetProberuEscCharSetProberufeedu	constantsueFoundItuget_charset_nameuget_confidenceu_mCharSetProbersuMBCSGroupProberuSBCSGroupProberuLatin1Prober(uselfuaBufuaLenuprober((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/universaldetector.pyufeed@sh			 				uUniversalDetector.feedcCs�|jr
dS|js6tjr2tjjd�ndSd
|_|jt	krlidd6dd6|_
|j
S|jtkrd}d}d}xD|j
D]9}|s�q�n|j�}||kr�|}|}q�q�W|r|tkri|j�d6|j�d6|_
|j
Sntjr|tjjd�xM|j
djD]8}|sOq=ntjjd	|j�|j�f�q=WndS(Nuno data received!
uasciiuencodingg�?u
confidencegu"no probers hit minimum threshhold
iu%s confidence = %s
T(udoneu	_mGotDatau	constantsu_debugusysustderruwriteuTrueu_mInputStateu
ePureAsciiuresultu	eHighbyteuNoneu_mCharSetProbersuget_confidenceuMINIMUM_THRESHOLDuget_charset_nameumProbers(uselfuproberConfidenceumaxProberConfidenceu	maxProberuprober((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/universaldetector.pyuclose�sB				

		uUniversalDetector.closeN(u__name__u
__module__u__qualname__u__init__uresetufeeduclose(u
__locals__((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/universaldetector.pyuUniversalDetector,sFuUniversalDetector(uu	constantsusysucodecsulatin1proberuLatin1ProberumbcsgroupproberuMBCSGroupProberusbcsgroupproberuSBCSGroupProberu	escproberuEscCharSetProberureuMINIMUM_THRESHOLDu
ePureAsciiu	eEscAsciiu	eHighbyteuUniversalDetector(((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/universaldetector.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/langbulgarianmodel.cpython-33.pyc000064400000060521151733566760030752 0ustar00python3.3�
7�Re�1c@shd�Zd�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zd�S(�i�i�i�i�iMiZicidiHimikieiOi�iQifiLi^iRini�ili[iJiwiTi`ioi�isiAiEiFiBi?iDipigi\i�ihi_iViWiGiti�iUi]iaiqi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iii�i�i�i�i�i�i-i�i�ii i#i+i%i,i7i/i(i;i!i.i&i$i)ii'ii"i3i0i1i5i2i6i9i=i�iCi�i<i8iii	iiiiiiiii
iiii
iiiiiiiiiiiiKi4i�i*ii>i�i�i�i:i�ibi�i�i�i�i�i�ixiNi@iSiyiuiXiziYijiIiPiviriucharToOrderMapuprecedenceMatrixg! _B�?umTypicalPositiveRatioukeepEnglishLetteru
ISO-8859-5ucharsetNameuwindows-1251N(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iMiZicidiHimikieiOi�iQifiLi^iRini�ili[iJiwiTi`ioi�isi�i�i�i�i�i�iAiEiFiBi?iDipigi\i�ihi_iViWiGiti�iUi]iaiqi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iQi�i�i�i�i�iii�i�i�i�i�i�i-i�i�ii i#i+i%i,i7i/i(i;i!i.i&i$i)ii'ii"i3i0i1i5i2i6i9i=i�iCi�i<i8iii	iiiiiiiii
iiii
iiiiiiiiiiiiKi4i�i*ii>i�i�i�i:i�ibi�i�i�i�i�i�i[i�i�(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iMiZicidiHimikieiOi�iQifiLi^iRini�ili[iJiwiTi`ioi�isi�i�i�i�i�i�iAiEiFiBi?iDipigi\i�ihi_iViWiGiti�iUi]iaiqi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ixi�i�i�i�i�i�i�i�iNi@iSiyibiuiii�i�i�i�i�i�i�i�iXi�i�i�i�iziYiji�i�i�i�i�i-i�i�iIiPiviri�i�i�i�i�i>i:i�i�i�i�i�ii i#i+i%i,i7i/i(i;i!i.i&i$i)ii'ii"i3i0i1i5i2i6i9i=i�iCi�i<i8iii	iiiiiiiii
iiii
iiiiiiiiiiiiKi4i�i*i(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiF(uLatin5_BulgarianCharToOrderMapuwin1251BulgarianCharToOrderMapuBulgarianLangModeluFalseuLatin5BulgarianModeluWin1251BulgarianModel(((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/langbulgarianmodel.pyu<module>&sV

python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/sjisprober.cpython-33.pyc000064400000007120151733566760027360 0ustar00�
7�Re�c@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZGd	d
�d
e�Z
dS(iNi(uMultiByteCharSetProber(uCodingStateMachine(uSJISDistributionAnalysis(uSJISContextAnalysis(uSJISSMModel(u	constantscBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(u
SJISProbercCsBtj|�tt�|_t�|_t�|_|j	�dS(N(
uMultiByteCharSetProberu__init__uCodingStateMachineuSJISSMModelu
_mCodingSMuSJISDistributionAnalysisu_mDistributionAnalyzeruSJISContextAnalysisu_mContextAnalyzerureset(uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sjisprober.pyu__init__&s

uSJISProber.__init__cCstj|�|jj�dS(N(uMultiByteCharSetProberuresetu_mContextAnalyzer(uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sjisprober.pyureset-s
uSJISProber.resetcCsdS(Nu	SHIFT_JIS((uself((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sjisprober.pyuget_charset_name1suSJISProber.get_charset_namecCs�t|�}xltd|�D][}|jj||�}|tjkr�tjr{tjj	|j
�dt|�d�ntj|_
Pq|tjkr�tj|_
Pq|tjkr|jj�}|dkr"|d|jd<|jj|jd|d�|�|jj|j|�qw|jj||d||d|�|�|jj||d|d�|�qqW||d|jd<|j�tjkr�|jj�r�|j�tjkr�tj|_
q�n|j�S(Niu prober hit error at byte u
iii(ulenurangeu
_mCodingSMu
next_stateu	constantsueErroru_debugusysustderruwriteuget_charset_nameustrueNotMeu_mStateueItsMeueFoundItueStartuget_current_charlenu
_mLastCharu_mContextAnalyzerufeedu_mDistributionAnalyzeru	get_stateu
eDetectingugot_enough_datauget_confidenceuSHORTCUT_THRESHOLD(uselfuaBufuaLenuiucodingStateucharLen((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sjisprober.pyufeed4s:		"uSJISProber.feedcCs+|jj�}|jj�}t||�S(N(u_mContextAnalyzeruget_confidenceu_mDistributionAnalyzerumax(uselfucontxtCfu	distribCf((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sjisprober.pyuget_confidenceXsuSJISProber.get_confidenceN(u__name__u
__module__u__qualname__u__init__uresetuget_charset_nameufeeduget_confidence(u
__locals__((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sjisprober.pyu
SJISProber%s
$u
SJISProber(usysumbcharsetproberuMultiByteCharSetProberucodingstatemachineuCodingStateMachineuchardistributionuSJISDistributionAnalysisujpcntxuSJISContextAnalysisumbcssmuSJISSMModeluu	constantsu
SJISProber(((uI/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/sjisprober.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/charsetprober.cpython-33.pyc000064400000005701151733566760027765 0ustar00python3.3�
7�Renc@s3ddlmZddlZGdd�d�ZdS(i(u	constantsiNcBs�|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS(u
CharSetProbercCsdS(N((uself((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyu__init__"suCharSetProber.__init__cCstj|_dS(N(u	constantsu
eDetectingu_mState(uself((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyureset%suCharSetProber.resetcCsdS(N(uNone(uself((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyuget_charset_name(suCharSetProber.get_charset_namecCsdS(N((uselfuaBuf((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyufeed+suCharSetProber.feedcCs|jS(N(u_mState(uself((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyu	get_state.suCharSetProber.get_statecCsdS(Ng((uself((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyuget_confidence1suCharSetProber.get_confidencecCstjdd|�}|S(Ns([-])+s (ureusub(uselfuaBuf((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyufilter_high_bit_only4su"CharSetProber.filter_high_bit_onlycCstjdd|�}|S(Ns([A-Za-z])+s (ureusub(uselfuaBuf((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyufilter_without_english_letters8su,CharSetProber.filter_without_english_letterscCs|S(N((uselfuaBuf((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyufilter_with_english_letters<su)CharSetProber.filter_with_english_lettersN(u__name__u
__module__u__qualname__u__init__uresetuget_charset_nameufeedu	get_stateuget_confidenceufilter_high_bit_onlyufilter_without_english_lettersufilter_with_english_letters(u
__locals__((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyu
CharSetProber!su
CharSetProber(uu	constantsureu
CharSetProber(((uL/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/charsetprober.pyu<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/chardistribution.cpython-33.pyc000064400000027003151733566760030476 0ustar00python3.3�
7�Re
$c@sOddlmZmZmZddlmZmZmZddlm	Z	m
Z
mZddlm
Z
mZmZddlmZmZmZddlmZdZdZd	Zd
ZGdd�d�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Z dS(i(uEUCTWCharToFreqOrderuEUCTW_TABLE_SIZEu EUCTW_TYPICAL_DISTRIBUTION_RATIO(uEUCKRCharToFreqOrderuEUCKR_TABLE_SIZEu EUCKR_TYPICAL_DISTRIBUTION_RATIO(uGB2312CharToFreqOrderuGB2312_TABLE_SIZEu!GB2312_TYPICAL_DISTRIBUTION_RATIO(uBig5CharToFreqOrderuBIG5_TABLE_SIZEuBIG5_TYPICAL_DISTRIBUTION_RATIO(uJISCharToFreqOrderuJIS_TABLE_SIZEuJIS_TYPICAL_DISTRIBUTION_RATIO(uwrap_ordig�G�z��?g{�G�z�?icBs\|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S(uCharDistributionAnalysiscCs)d|_d|_d|_|j�dS(N(uNoneu_mCharToFreqOrderu_mTableSizeu_mTypicalDistributionRatioureset(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu__init__/s			u!CharDistributionAnalysis.__init__cCsd|_d|_d|_dS(ureset analyser, clear any stateiNF(uFalseu_mDoneu_mTotalCharsu_mFreqChars(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyureset;s		uCharDistributionAnalysis.resetcCs}|dkr|j|�}nd}|dkry|jd7_||jkryd|j|krv|jd7_qvqyndS(u"feed a character with known lengthiiiiNi����(u	get_orderu_mTotalCharsu_mTableSizeu_mCharToFreqOrderu_mFreqChars(uselfuaBufuaCharLenuorder((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyufeedDsuCharDistributionAnalysis.feedcCsi|jdks|jtkr"tS|j|jkre|j|j|j|j}|tkre|SntS(u(return confidence based on existing datai(u_mTotalCharsu_mFreqCharsuMINIMUM_DATA_THRESHOLDuSURE_NOu_mTypicalDistributionRatiouSURE_YES(uselfur((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyuget_confidenceRsu'CharDistributionAnalysis.get_confidencecCs
|jtkS(N(u_mTotalCharsuENOUGH_DATA_THRESHOLD(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyugot_enough_databsu(CharDistributionAnalysis.got_enough_datacCsdS(Nii����((uselfuaBuf((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu	get_ordergsu"CharDistributionAnalysis.get_orderN(	u__name__u
__module__u__qualname__u__init__uresetufeeduget_confidenceugot_enough_datau	get_order(u
__locals__((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyuCharDistributionAnalysis.s	uCharDistributionAnalysiscBs,|EeZdZdd�Zdd�ZdS(uEUCTWDistributionAnalysiscCs,tj|�t|_t|_t|_dS(N(uCharDistributionAnalysisu__init__uEUCTWCharToFreqOrderu_mCharToFreqOrderuEUCTW_TABLE_SIZEu_mTableSizeu EUCTW_TYPICAL_DISTRIBUTION_RATIOu_mTypicalDistributionRatio(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu__init__ps
		u"EUCTWDistributionAnalysis.__init__cCsBt|d�}|dkr:d|dt|d�dSdSdS(Nii�i^ii�i����(uwrap_ord(uselfuaBufu
first_char((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu	get_ordervsu#EUCTWDistributionAnalysis.get_orderN(u__name__u
__module__u__qualname__u__init__u	get_order(u
__locals__((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyuEUCTWDistributionAnalysisosuEUCTWDistributionAnalysiscBs,|EeZdZdd�Zdd�ZdS(uEUCKRDistributionAnalysiscCs,tj|�t|_t|_t|_dS(N(uCharDistributionAnalysisu__init__uEUCKRCharToFreqOrderu_mCharToFreqOrderuEUCKR_TABLE_SIZEu_mTableSizeu EUCKR_TYPICAL_DISTRIBUTION_RATIOu_mTypicalDistributionRatio(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu__init__�s
		u"EUCKRDistributionAnalysis.__init__cCsBt|d�}|dkr:d|dt|d�dSdSdS(Nii�i^ii�i����(uwrap_ord(uselfuaBufu
first_char((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu	get_order�su#EUCKRDistributionAnalysis.get_orderN(u__name__u
__module__u__qualname__u__init__u	get_order(u
__locals__((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyuEUCKRDistributionAnalysis�suEUCKRDistributionAnalysiscBs,|EeZdZdd�Zdd�ZdS(uGB2312DistributionAnalysiscCs,tj|�t|_t|_t|_dS(N(uCharDistributionAnalysisu__init__uGB2312CharToFreqOrderu_mCharToFreqOrderuGB2312_TABLE_SIZEu_mTableSizeu!GB2312_TYPICAL_DISTRIBUTION_RATIOu_mTypicalDistributionRatio(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu__init__�s
		u#GB2312DistributionAnalysis.__init__cCsUt|d�t|d�}}|dkrM|dkrMd|d|dSdSdS(Niii�i�i^i����(uwrap_ord(uselfuaBufu
first_charusecond_char((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu	get_order�s!u$GB2312DistributionAnalysis.get_orderN(u__name__u
__module__u__qualname__u__init__u	get_order(u
__locals__((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyuGB2312DistributionAnalysis�suGB2312DistributionAnalysiscBs,|EeZdZdd�Zdd�ZdS(uBig5DistributionAnalysiscCs,tj|�t|_t|_t|_dS(N(uCharDistributionAnalysisu__init__uBig5CharToFreqOrderu_mCharToFreqOrderuBIG5_TABLE_SIZEu_mTableSizeuBIG5_TYPICAL_DISTRIBUTION_RATIOu_mTypicalDistributionRatio(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu__init__�s
		u!Big5DistributionAnalysis.__init__cCspt|d�t|d�}}|dkrh|dkrQd|d|ddSd|d|dSndSdS(	Niii�i�i�i?i@i����(uwrap_ord(uselfuaBufu
first_charusecond_char((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu	get_order�s!u"Big5DistributionAnalysis.get_orderN(u__name__u
__module__u__qualname__u__init__u	get_order(u
__locals__((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyuBig5DistributionAnalysis�suBig5DistributionAnalysiscBs,|EeZdZdd�Zdd�ZdS(uSJISDistributionAnalysiscCs,tj|�t|_t|_t|_dS(N(uCharDistributionAnalysisu__init__uJISCharToFreqOrderu_mCharToFreqOrderuJIS_TABLE_SIZEu_mTableSizeuJIS_TYPICAL_DISTRIBUTION_RATIOu_mTypicalDistributionRatio(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu__init__�s
		u!SJISDistributionAnalysis.__init__cCs�t|d�t|d�}}|dkrJ|dkrJd|d}n1|dkrw|dkrwd|dd}ndS||d	}|d
kr�d}n|S(
Niii�i�i�i�i�ii@ii����i����(uwrap_ord(uselfuaBufu
first_charusecond_charuorder((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu	get_order�s!	u"SJISDistributionAnalysis.get_orderN(u__name__u
__module__u__qualname__u__init__u	get_order(u
__locals__((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyuSJISDistributionAnalysis�suSJISDistributionAnalysiscBs,|EeZdZdd�Zdd�ZdS(uEUCJPDistributionAnalysiscCs,tj|�t|_t|_t|_dS(N(uCharDistributionAnalysisu__init__uJISCharToFreqOrderu_mCharToFreqOrderuJIS_TABLE_SIZEu_mTableSizeuJIS_TYPICAL_DISTRIBUTION_RATIOu_mTypicalDistributionRatio(uself((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu__init__�s
		u"EUCJPDistributionAnalysis.__init__cCsBt|d�}|dkr:d|dt|d�dSdSdS(Nii�i^i�ii����(uwrap_ord(uselfuaBufuchar((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu	get_order�su#EUCJPDistributionAnalysis.get_orderN(u__name__u
__module__u__qualname__u__init__u	get_order(u
__locals__((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyuEUCJPDistributionAnalysis�suEUCJPDistributionAnalysisN(!u	euctwfrequEUCTWCharToFreqOrderuEUCTW_TABLE_SIZEu EUCTW_TYPICAL_DISTRIBUTION_RATIOu	euckrfrequEUCKRCharToFreqOrderuEUCKR_TABLE_SIZEu EUCKR_TYPICAL_DISTRIBUTION_RATIOu
gb2312frequGB2312CharToFreqOrderuGB2312_TABLE_SIZEu!GB2312_TYPICAL_DISTRIBUTION_RATIOubig5frequBig5CharToFreqOrderuBIG5_TABLE_SIZEuBIG5_TYPICAL_DISTRIBUTION_RATIOujisfrequJISCharToFreqOrderuJIS_TABLE_SIZEuJIS_TYPICAL_DISTRIBUTION_RATIOucompatuwrap_orduENOUGH_DATA_THRESHOLDuSURE_YESuSURE_NOuMINIMUM_DATA_THRESHOLDuCharDistributionAnalysisuEUCTWDistributionAnalysisuEUCKRDistributionAnalysisuGB2312DistributionAnalysisuBig5DistributionAnalysisuSJISDistributionAnalysisuEUCJPDistributionAnalysis(((uO/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/chardistribution.pyu<module>s Asite-packages/pip/_vendor/requests/packages/chardet/__pycache__/langhungarianmodel.cpython-33.pyc000064400000060501151733566760030760 0ustar00python3.3�
7�Re�0c@shd�Zd�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zd�S(�i�i�i�i�ii(i6i-i i2i1i&i'i5i$i)i"i#i/i.iGi+i!i%i9i0i@iDi7i4iiiiiiiii	iiii
iiiiCi
iiiiiAi>iii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iKi�i�i�i�i�i�i�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i3iQi�iNi�i�i�i�i,i�i�i�i=i�i�i�i�i�i:i�iBi;i�i�i�i<iEi?i�i�i�iRiiJi�iFiPi�iHi�iiSiMiTiiLiUi�i�i�iiIi*ii�i�i�ii8ii�iViWiucharToOrderMapuprecedenceMatrixg��(��P�?umTypicalPositiveRatioukeepEnglishLetteru
ISO-8859-2ucharsetNameuwindows-1250N(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii(i6i-i i2i1i&i'i5i$i)i"i#i/i.iGi+i!i%i9i0i@iDi7i4i�i�i�i�i�i�iiiiiiiii	iiii
iiiiCi
iiiiiAi>iii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iKi�i�i�i�i�i�i�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i3iQi�iNi�i�i�i�i,i�i�i�i=i�i�i�i�i�i:i�iBi;i�i�i�i<iEi?i�i�i�iRiiJi�iFiPi�iHi�iiSiMiTiiLiUi�i�i�iiIi*ii�i�i�ii8ii�i�i�(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii(i6i-i i2i1i&i'i5i$i)i"i#i/i.iHi+i!i%i9i0i@iDi7i4i�i�i�i�i�i�iiiiiiiii	iiii
iiiiCi
iiiiiAi>iii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iNi�iEi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iLi�i�i�i�i�i�i�i�iQi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i3iSi�iPi�i�i�i�i,i�i�i�i=i�i�i�i�i�i:i�iBi;i�i�i�i<iFi?i�i�i�iTiiKi�iGiRi�iIi�iiUiOiViiMiWi�i�i�iiJi*ii�i�i�ii8ii�i�i�(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiT(uLatin2_HungarianCharToOrderMapuwin1250HungarianCharToOrderMapuHungarianLangModeluTrueuLatin2HungarianModeluWin1250HungarianModel(((uQ/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/langhungarianmodel.pyu<module>#sV

site-packages/pip/_vendor/requests/packages/chardet/__pycache__/langcyrillicmodel.cpython-33.pyc000064400000073603151733566760030625 0ustar00python3.3�
7�Re=Ec@s$d�Zd�Zd�Zd�Zd�Zd�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Z	ied�6ed�6d�d�6d�d�6d�d�6Z
ied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Z
d�S(�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�iKi�i�i�i�i�i�i�i�i�i�i�i�iGi�iBi�iAi�iLi�i@i�i�iMiHi�iEiCi�iNiIi�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iDi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiii
ii'iiiiiiiiiiii	iiiii
iiiiiiii6i;i%i,i:i)i0i5i.i7i*i<i$i1i&ii"i#i+i-i i(i4i8i!i=i>i3i9i/i?i2iFiucharToOrderMapuprecedenceMatrixgl���P@�?umTypicalPositiveRatioukeepEnglishLetteruKOI8-RucharsetNameuwindows-1251u
ISO-8859-5uMacCyrillicuIBM866uIBM855N(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�iKi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iGi�iBi�iAi�iLi�i@i�i�iMiHi�iEiCi�iNiIi�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iDi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiii
ii'iiiiiiiiiiii	iiiii
iiiiiiii6i;i%i,i:i)i0i5i.i7i*i<i$i1i&ii"i#i+i-i i(i4i8i!i=i>i3i9i/i?i2iF(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�iKi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iGi�iBi�iAi�iLi�i@i�i�iMiHi�iEiCi�iNiIi�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iDi�i�i�i�i�i�i�i%i,i!i.i)i0i8i3i*i<i$i1i&ii"i#i-i i(i4i5i7i:i2i9i?iFi>i=i/i;i+iii
ii
iiiiiiiiiiii	iiii'iiiiii6iiiii(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�iKi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iGi�iBi�iAi�iLi�i@i�i�iMiHi�iEiCi�iNiIi�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i%i,i!i.i)i0i8i3i*i<i$i1i&ii"i#i-i i(i4i5i7i:i2i9i?iFi>i=i/i;i+iii
ii
iiiiiiiiiiii	iiii'iiiiii6iiiiii�iDi�i�i�i�i�i�i�i�i�i�i�i�i�i�(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�iKi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iGi�iBi�iAi�iLi�i@i�i�iMiHi�iEiCi�iNiIi�i�iOi�i�i�i�i�i�i�i�i�i%i,i!i.i)i0i8i3i*i<i$i1i&ii"i#i-i i(i4i5i7i:i2i9i?iFi>i=i/i;i+i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iDiiii
ii
iiiiiiiiiiii	iiii'iiiiii6iiiii�(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�iKi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iGi�iBi�iAi�iLi�i@i�i�iMiHi�iEiCi�iNiIi�i�iOi�i�i�i�i�i�i�i�i�i�i�i�i�iDi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii;i6iFii%ii,ii:i
i)ii0i'i5ii.i�i�i�i�i�i�i�ii7ii*i�i�i�i�ii<i�i�i�i�i�i�i�ii$i�i�i�i�i�i�i�i�ii1ii&iiii"ii�i�i�i�i#ii�i+i	i-ii ii(ii4ii8i
i!ii=i�i�ii>ii3ii9ii/ii?ii2i�i�i�(i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�iKi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iGi�iBi�iAi�iLi�i@i�i�iMiHi�iEiCi�iNiIi�i�iOi�i�i�i�i�i�i�i�i�i%i,i!i.i)i0i8i3i*i<i$i1i&ii"i#i-i i(i4i5i7i:i2i9i?iFi>i=i/i;i+iii
ii
iiiiiiiiiiii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i	iiii'iiiiii6iiiiii�iDi�i�i�i�i�i�i�i�i�i�i�i�i�i�(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiF(uKOI8R_CharToOrderMapuwin1251_CharToOrderMapulatin5_CharToOrderMapumacCyrillic_CharToOrderMapuIBM855_CharToOrderMapuIBM866_CharToOrderMapuRussianLangModeluFalseu
Koi8rModeluWin1251CyrillicModeluLatin5CyrillicModeluMacCyrillicModeluIbm866ModeluIbm855Model(((uP/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/langcyrillicmodel.pyu<module>s





python3.3/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/escprober.cpython-33.pyc000064400000006205151733566760027165 0ustar00�
7�Resc@s|ddlmZddlmZmZmZmZddlmZddl	m
Z
ddlmZGdd�de�Z
dS(	i(u	constants(u	HZSMModeluISO2022CNSMModeluISO2022JPSMModeluISO2022KRSMModel(u
CharSetProber(uCodingStateMachine(uwrap_ordcBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uEscCharSetProbercCsHtj|�tt�tt�tt�tt�g|_|j�dS(N(	u
CharSetProberu__init__uCodingStateMachineu	HZSMModeluISO2022CNSMModeluISO2022JPSMModeluISO2022KRSMModelu
_mCodingSMureset(uself((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/escprober.pyu__init__%s
			uEscCharSetProber.__init__cCs_tj|�x0|jD]%}|s)qnd|_|j�qWt|j�|_d|_dS(NT(	u
CharSetProberuresetu
_mCodingSMuTrueuactiveulenu
_mActiveSMuNoneu_mDetectedCharset(uselfucodingSM((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/escprober.pyureset/s
	uEscCharSetProber.resetcCs|jS(N(u_mDetectedCharset(uself((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/escprober.pyuget_charset_name9su!EscCharSetProber.get_charset_namecCs|jr
dSdSdS(Ng�G�z��?g(u_mDetectedCharset(uself((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/escprober.pyuget_confidence<s	uEscCharSetProber.get_confidencecCs�x�|D]�}x�|jD]�}|s)qn|js8qn|jt|��}|tjkr�d|_|jd8_|jdkr�tj|_	|j
�Sq|tjkrtj|_	|j
�|_|j
�SqWqW|j
�S(NiiF(u
_mCodingSMuactiveu
next_stateuwrap_ordu	constantsueErroruFalseu
_mActiveSMueNotMeu_mStateu	get_stateueItsMeueFoundItuget_coding_state_machineu_mDetectedCharset(uselfuaBufucucodingSMucodingState((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/escprober.pyufeedBs$
		
uEscCharSetProber.feedN(u__name__u
__module__u__qualname__u__init__uresetuget_charset_nameuget_confidenceufeed(u
__locals__((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/escprober.pyuEscCharSetProber$s


uEscCharSetProberN(uu	constantsuescsmu	HZSMModeluISO2022CNSMModeluISO2022JPSMModeluISO2022KRSMModelu
charsetproberu
CharSetProberucodingstatemachineuCodingStateMachineucompatuwrap_orduEscCharSetProber(((uH/tmp/pip-zej_zi-build/pip/_vendor/requests/packages/chardet/escprober.pyu<module>s
"python3.3/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py000064400000012171151733566760023321 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .constants import eNotMe
from .compat import wrap_ord

FREQ_CAT_NUM = 4

UDF = 0  # undefined
OTH = 1  # other
ASC = 2  # ascii capital letter
ASS = 3  # ascii small letter
ACV = 4  # accent capital vowel
ACO = 5  # accent capital other
ASV = 6  # accent small vowel
ASO = 7  # accent small other
CLASS_NUM = 8  # total classes

Latin1_CharToClass = (
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 00 - 07
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 08 - 0F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 10 - 17
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 18 - 1F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 20 - 27
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 28 - 2F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 30 - 37
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 38 - 3F
    OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 40 - 47
    ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 48 - 4F
    ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 50 - 57
    ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH,   # 58 - 5F
    OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 60 - 67
    ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 68 - 6F
    ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 70 - 77
    ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH,   # 78 - 7F
    OTH, UDF, OTH, ASO, OTH, OTH, OTH, OTH,   # 80 - 87
    OTH, OTH, ACO, OTH, ACO, UDF, ACO, UDF,   # 88 - 8F
    UDF, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 90 - 97
    OTH, OTH, ASO, OTH, ASO, UDF, ASO, ACO,   # 98 - 9F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # A0 - A7
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # A8 - AF
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # B0 - B7
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # B8 - BF
    ACV, ACV, ACV, ACV, ACV, ACV, ACO, ACO,   # C0 - C7
    ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV,   # C8 - CF
    ACO, ACO, ACV, ACV, ACV, ACV, ACV, OTH,   # D0 - D7
    ACV, ACV, ACV, ACV, ACV, ACO, ACO, ACO,   # D8 - DF
    ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASO,   # E0 - E7
    ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV,   # E8 - EF
    ASO, ASO, ASV, ASV, ASV, ASV, ASV, OTH,   # F0 - F7
    ASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO,   # F8 - FF
)

# 0 : illegal
# 1 : very unlikely
# 2 : normal
# 3 : very likely
Latin1ClassModel = (
    # UDF OTH ASC ASS ACV ACO ASV ASO
    0,  0,  0,  0,  0,  0,  0,  0,  # UDF
    0,  3,  3,  3,  3,  3,  3,  3,  # OTH
    0,  3,  3,  3,  3,  3,  3,  3,  # ASC
    0,  3,  3,  3,  1,  1,  3,  3,  # ASS
    0,  3,  3,  3,  1,  2,  1,  2,  # ACV
    0,  3,  3,  3,  3,  3,  3,  3,  # ACO
    0,  3,  1,  3,  1,  1,  1,  3,  # ASV
    0,  3,  1,  3,  1,  1,  3,  3,  # ASO
)


class Latin1Prober(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self.reset()

    def reset(self):
        self._mLastCharClass = OTH
        self._mFreqCounter = [0] * FREQ_CAT_NUM
        CharSetProber.reset(self)

    def get_charset_name(self):
        return "windows-1252"

    def feed(self, aBuf):
        aBuf = self.filter_with_english_letters(aBuf)
        for c in aBuf:
            charClass = Latin1_CharToClass[wrap_ord(c)]
            freq = Latin1ClassModel[(self._mLastCharClass * CLASS_NUM)
                                    + charClass]
            if freq == 0:
                self._mState = eNotMe
                break
            self._mFreqCounter[freq] += 1
            self._mLastCharClass = charClass

        return self.get_state()

    def get_confidence(self):
        if self.get_state() == eNotMe:
            return 0.01

        total = sum(self._mFreqCounter)
        if total < 0.01:
            confidence = 0.0
        else:
            confidence = ((self._mFreqCounter[3] / total)
                          - (self._mFreqCounter[1] * 20.0 / total))
        if confidence < 0.0:
            confidence = 0.0
        # lower the confidence of latin1 so that other more accurate
        # detector can take priority.
        confidence = confidence * 0.5
        return confidence
python3.3/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py000064400000022012151733566760024267 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .euctwfreq import (EUCTWCharToFreqOrder, EUCTW_TABLE_SIZE,
                        EUCTW_TYPICAL_DISTRIBUTION_RATIO)
from .euckrfreq import (EUCKRCharToFreqOrder, EUCKR_TABLE_SIZE,
                        EUCKR_TYPICAL_DISTRIBUTION_RATIO)
from .gb2312freq import (GB2312CharToFreqOrder, GB2312_TABLE_SIZE,
                         GB2312_TYPICAL_DISTRIBUTION_RATIO)
from .big5freq import (Big5CharToFreqOrder, BIG5_TABLE_SIZE,
                       BIG5_TYPICAL_DISTRIBUTION_RATIO)
from .jisfreq import (JISCharToFreqOrder, JIS_TABLE_SIZE,
                      JIS_TYPICAL_DISTRIBUTION_RATIO)
from .compat import wrap_ord

ENOUGH_DATA_THRESHOLD = 1024
SURE_YES = 0.99
SURE_NO = 0.01
MINIMUM_DATA_THRESHOLD = 3


class CharDistributionAnalysis:
    def __init__(self):
        # Mapping table to get frequency order from char order (get from
        # GetOrder())
        self._mCharToFreqOrder = None
        self._mTableSize = None  # Size of above table
        # This is a constant value which varies from language to language,
        # used in calculating confidence.  See
        # http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html
        # for further detail.
        self._mTypicalDistributionRatio = None
        self.reset()

    def reset(self):
        """reset analyser, clear any state"""
        # If this flag is set to True, detection is done and conclusion has
        # been made
        self._mDone = False
        self._mTotalChars = 0  # Total characters encountered
        # The number of characters whose frequency order is less than 512
        self._mFreqChars = 0

    def feed(self, aBuf, aCharLen):
        """feed a character with known length"""
        if aCharLen == 2:
            # we only care about 2-bytes character in our distribution analysis
            order = self.get_order(aBuf)
        else:
            order = -1
        if order >= 0:
            self._mTotalChars += 1
            # order is valid
            if order < self._mTableSize:
                if 512 > self._mCharToFreqOrder[order]:
                    self._mFreqChars += 1

    def get_confidence(self):
        """return confidence based on existing data"""
        # if we didn't receive any character in our consideration range,
        # return negative answer
        if self._mTotalChars <= 0 or self._mFreqChars <= MINIMUM_DATA_THRESHOLD:
            return SURE_NO

        if self._mTotalChars != self._mFreqChars:
            r = (self._mFreqChars / ((self._mTotalChars - self._mFreqChars)
                 * self._mTypicalDistributionRatio))
            if r < SURE_YES:
                return r

        # normalize confidence (we don't want to be 100% sure)
        return SURE_YES

    def got_enough_data(self):
        # It is not necessary to receive all data to draw conclusion.
        # For charset detection, certain amount of data is enough
        return self._mTotalChars > ENOUGH_DATA_THRESHOLD

    def get_order(self, aBuf):
        # We do not handle characters based on the original encoding string,
        # but convert this encoding string to a number, here called order.
        # This allows multiple encodings of a language to share one frequency
        # table.
        return -1


class EUCTWDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = EUCTWCharToFreqOrder
        self._mTableSize = EUCTW_TABLE_SIZE
        self._mTypicalDistributionRatio = EUCTW_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for euc-TW encoding, we are interested
        #   first  byte range: 0xc4 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char = wrap_ord(aBuf[0])
        if first_char >= 0xC4:
            return 94 * (first_char - 0xC4) + wrap_ord(aBuf[1]) - 0xA1
        else:
            return -1


class EUCKRDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = EUCKRCharToFreqOrder
        self._mTableSize = EUCKR_TABLE_SIZE
        self._mTypicalDistributionRatio = EUCKR_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for euc-KR encoding, we are interested
        #   first  byte range: 0xb0 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char = wrap_ord(aBuf[0])
        if first_char >= 0xB0:
            return 94 * (first_char - 0xB0) + wrap_ord(aBuf[1]) - 0xA1
        else:
            return -1


class GB2312DistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = GB2312CharToFreqOrder
        self._mTableSize = GB2312_TABLE_SIZE
        self._mTypicalDistributionRatio = GB2312_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for GB2312 encoding, we are interested
        #  first  byte range: 0xb0 -- 0xfe
        #  second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
        if (first_char >= 0xB0) and (second_char >= 0xA1):
            return 94 * (first_char - 0xB0) + second_char - 0xA1
        else:
            return -1


class Big5DistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = Big5CharToFreqOrder
        self._mTableSize = BIG5_TABLE_SIZE
        self._mTypicalDistributionRatio = BIG5_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for big5 encoding, we are interested
        #   first  byte range: 0xa4 -- 0xfe
        #   second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
        if first_char >= 0xA4:
            if second_char >= 0xA1:
                return 157 * (first_char - 0xA4) + second_char - 0xA1 + 63
            else:
                return 157 * (first_char - 0xA4) + second_char - 0x40
        else:
            return -1


class SJISDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = JISCharToFreqOrder
        self._mTableSize = JIS_TABLE_SIZE
        self._mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for sjis encoding, we are interested
        #   first  byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe
        #   second byte range: 0x40 -- 0x7e,  0x81 -- oxfe
        # no validation needed here. State machine has done that
        first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
        if (first_char >= 0x81) and (first_char <= 0x9F):
            order = 188 * (first_char - 0x81)
        elif (first_char >= 0xE0) and (first_char <= 0xEF):
            order = 188 * (first_char - 0xE0 + 31)
        else:
            return -1
        order = order + second_char - 0x40
        if second_char > 0x7F:
            order = -1
        return order


class EUCJPDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = JISCharToFreqOrder
        self._mTableSize = JIS_TABLE_SIZE
        self._mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for euc-JP encoding, we are interested
        #   first  byte range: 0xa0 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        char = wrap_ord(aBuf[0])
        if char >= 0xA0:
            return 94 * (char - 0xA1) + wrap_ord(aBuf[1]) - 0xa1
        else:
            return -1
python3.3/site-packages/pip/_vendor/requests/packages/chardet/constants.py000064400000002467151733566760022742 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

_debug = 0

eDetecting = 0
eFoundIt = 1
eNotMe = 2

eStart = 0
eError = 1
eItsMe = 2

SHORTCUT_THRESHOLD = 0.95
python3.3/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py000064400000002165151733566760023027 0ustar00#!/usr/bin/env python
"""
Script which takes one or more file paths and reports on their detected
encodings

Example::

    % chardetect somefile someotherfile
    somefile: windows-1252 with confidence 0.5
    someotherfile: ascii with confidence 1.0

If no paths are provided, it takes its input from stdin.

"""
from io import open
from sys import argv, stdin

from chardet.universaldetector import UniversalDetector


def description_of(file, name='stdin'):
    """Return a string describing the probable encoding of a file."""
    u = UniversalDetector()
    for line in file:
        u.feed(line)
    u.close()
    result = u.result
    if result['encoding']:
        return '%s: %s with confidence %s' % (name,
                                              result['encoding'],
                                              result['confidence'])
    else:
        return '%s: no result' % name


def main():
    if len(argv) <= 1:
        print(description_of(stdin))
    else:
        for path in argv[1:]:
            with open(path, 'rb') as f:
                print(description_of(f, path))


if __name__ == '__main__':
    main()
python3.3/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py000064400000003657151733566760024143 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#   Proofpoint, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetgroupprober import CharSetGroupProber
from .utf8prober import UTF8Prober
from .sjisprober import SJISProber
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
from .euctwprober import EUCTWProber


class MBCSGroupProber(CharSetGroupProber):
    def __init__(self):
        CharSetGroupProber.__init__(self)
        self._mProbers = [
            UTF8Prober(),
            SJISProber(),
            EUCJPProber(),
            GB2312Prober(),
            EUCKRProber(),
            CP949Prober(),
            Big5Prober(),
            EUCTWProber()
        ]
        self.reset()
python3.3/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py000064400000007317151733566760024645 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
# 
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
# 
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
import sys
from .charsetprober import CharSetProber


class CharSetGroupProber(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mActiveNum = 0
        self._mProbers = []
        self._mBestGuessProber = None

    def reset(self):
        CharSetProber.reset(self)
        self._mActiveNum = 0
        for prober in self._mProbers:
            if prober:
                prober.reset()
                prober.active = True
                self._mActiveNum += 1
        self._mBestGuessProber = None

    def get_charset_name(self):
        if not self._mBestGuessProber:
            self.get_confidence()
            if not self._mBestGuessProber:
                return None
#                self._mBestGuessProber = self._mProbers[0]
        return self._mBestGuessProber.get_charset_name()

    def feed(self, aBuf):
        for prober in self._mProbers:
            if not prober:
                continue
            if not prober.active:
                continue
            st = prober.feed(aBuf)
            if not st:
                continue
            if st == constants.eFoundIt:
                self._mBestGuessProber = prober
                return self.get_state()
            elif st == constants.eNotMe:
                prober.active = False
                self._mActiveNum -= 1
                if self._mActiveNum <= 0:
                    self._mState = constants.eNotMe
                    return self.get_state()
        return self.get_state()

    def get_confidence(self):
        st = self.get_state()
        if st == constants.eFoundIt:
            return 0.99
        elif st == constants.eNotMe:
            return 0.01
        bestConf = 0.0
        self._mBestGuessProber = None
        for prober in self._mProbers:
            if not prober:
                continue
            if not prober.active:
                if constants._debug:
                    sys.stderr.write(prober.get_charset_name()
                                     + ' not active\n')
                continue
            cf = prober.get_confidence()
            if constants._debug:
                sys.stderr.write('%s confidence = %s\n' %
                                 (prober.get_charset_name(), cf))
            if bestConf < cf:
                bestConf = cf
                self._mBestGuessProber = prober
        if not self._mBestGuessProber:
            return 0.0
        return bestConf
#        else:
#            self._mBestGuessProber = self._mProbers[0]
#            return self._mBestGuessProber.get_confidence()
python3.3/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py000064400000104070151733566760022724 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# EUCTW frequency table
# Converted from big5 work
# by Taiwan's Mandarin Promotion Council
# <http:#www.edu.tw:81/mandr/>

# 128  --> 0.42261
# 256  --> 0.57851
# 512  --> 0.74851
# 1024 --> 0.89384
# 2048 --> 0.97583
#
# Idea Distribution Ratio = 0.74851/(1-0.74851) =2.98
# Random Distribution Ration = 512/(5401-512)=0.105
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR

EUCTW_TYPICAL_DISTRIBUTION_RATIO = 0.75

# Char to FreqOrder table ,
EUCTW_TABLE_SIZE = 8102

EUCTWCharToFreqOrder = (
   1,1800,1506, 255,1431, 198,   9,  82,   6,7310, 177, 202,3615,1256,2808, 110, # 2742
3735,  33,3241, 261,  76,  44,2113,  16,2931,2184,1176, 659,3868,  26,3404,2643, # 2758
1198,3869,3313,4060, 410,2211, 302, 590, 361,1963,   8, 204,  58,4296,7311,1931, # 2774
  63,7312,7313, 317,1614,  75, 222, 159,4061,2412,1480,7314,3500,3068, 224,2809, # 2790
3616,   3,  10,3870,1471,  29,2774,1135,2852,1939, 873, 130,3242,1123, 312,7315, # 2806
4297,2051, 507, 252, 682,7316, 142,1914, 124, 206,2932,  34,3501,3173,  64, 604, # 2822
7317,2494,1976,1977, 155,1990, 645, 641,1606,7318,3405, 337,  72, 406,7319,  80, # 2838
 630, 238,3174,1509, 263, 939,1092,2644, 756,1440,1094,3406, 449,  69,2969, 591, # 2854
 179,2095, 471, 115,2034,1843,  60,  50,2970, 134, 806,1868, 734,2035,3407, 180, # 2870
 995,1607, 156, 537,2893, 688,7320, 319,1305, 779,2144, 514,2374, 298,4298, 359, # 2886
2495,  90,2707,1338, 663,  11, 906,1099,2545,  20,2436, 182, 532,1716,7321, 732, # 2902
1376,4062,1311,1420,3175,  25,2312,1056, 113, 399, 382,1949, 242,3408,2467, 529, # 2918
3243, 475,1447,3617,7322, 117,  21, 656, 810,1297,2295,2329,3502,7323, 126,4063, # 2934
 706, 456, 150, 613,4299,  71,1118,2036,4064, 145,3069,  85, 835, 486,2114,1246, # 2950
1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,7324,2127,2354, 347,3736, 221, # 2966
3503,3110,7325,1955,1153,4065,  83, 296,1199,3070, 192, 624,  93,7326, 822,1897, # 2982
2810,3111, 795,2064, 991,1554,1542,1592,  27,  43,2853, 859, 139,1456, 860,4300, # 2998
 437, 712,3871, 164,2392,3112, 695, 211,3017,2096, 195,3872,1608,3504,3505,3618, # 3014
3873, 234, 811,2971,2097,3874,2229,1441,3506,1615,2375, 668,2076,1638, 305, 228, # 3030
1664,4301, 467, 415,7327, 262,2098,1593, 239, 108, 300, 200,1033, 512,1247,2077, # 3046
7328,7329,2173,3176,3619,2673, 593, 845,1062,3244,  88,1723,2037,3875,1950, 212, # 3062
 266, 152, 149, 468,1898,4066,4302,  77, 187,7330,3018,  37,   5,2972,7331,3876, # 3078
7332,7333,  39,2517,4303,2894,3177,2078,  55, 148,  74,4304, 545, 483,1474,1029, # 3094
1665, 217,1869,1531,3113,1104,2645,4067,  24, 172,3507, 900,3877,3508,3509,4305, # 3110
  32,1408,2811,1312, 329, 487,2355,2247,2708, 784,2674,   4,3019,3314,1427,1788, # 3126
 188, 109, 499,7334,3620,1717,1789, 888,1217,3020,4306,7335,3510,7336,3315,1520, # 3142
3621,3878, 196,1034, 775,7337,7338, 929,1815, 249, 439,  38,7339,1063,7340, 794, # 3158
3879,1435,2296,  46, 178,3245,2065,7341,2376,7342, 214,1709,4307, 804,  35, 707, # 3174
 324,3622,1601,2546, 140, 459,4068,7343,7344,1365, 839, 272, 978,2257,2572,3409, # 3190
2128,1363,3623,1423, 697, 100,3071,  48,  70,1231, 495,3114,2193,7345,1294,7346, # 3206
2079, 462, 586,1042,3246, 853, 256, 988, 185,2377,3410,1698, 434,1084,7347,3411, # 3222
 314,2615,2775,4308,2330,2331, 569,2280, 637,1816,2518, 757,1162,1878,1616,3412, # 3238
 287,1577,2115, 768,4309,1671,2854,3511,2519,1321,3737, 909,2413,7348,4069, 933, # 3254
3738,7349,2052,2356,1222,4310, 765,2414,1322, 786,4311,7350,1919,1462,1677,2895, # 3270
1699,7351,4312,1424,2437,3115,3624,2590,3316,1774,1940,3413,3880,4070, 309,1369, # 3286
1130,2812, 364,2230,1653,1299,3881,3512,3882,3883,2646, 525,1085,3021, 902,2000, # 3302
1475, 964,4313, 421,1844,1415,1057,2281, 940,1364,3116, 376,4314,4315,1381,   7, # 3318
2520, 983,2378, 336,1710,2675,1845, 321,3414, 559,1131,3022,2742,1808,1132,1313, # 3334
 265,1481,1857,7352, 352,1203,2813,3247, 167,1089, 420,2814, 776, 792,1724,3513, # 3350
4071,2438,3248,7353,4072,7354, 446, 229, 333,2743, 901,3739,1200,1557,4316,2647, # 3366
1920, 395,2744,2676,3740,4073,1835, 125, 916,3178,2616,4317,7355,7356,3741,7357, # 3382
7358,7359,4318,3117,3625,1133,2547,1757,3415,1510,2313,1409,3514,7360,2145, 438, # 3398
2591,2896,2379,3317,1068, 958,3023, 461, 311,2855,2677,4074,1915,3179,4075,1978, # 3414
 383, 750,2745,2617,4076, 274, 539, 385,1278,1442,7361,1154,1964, 384, 561, 210, # 3430
  98,1295,2548,3515,7362,1711,2415,1482,3416,3884,2897,1257, 129,7363,3742, 642, # 3446
 523,2776,2777,2648,7364, 141,2231,1333,  68, 176, 441, 876, 907,4077, 603,2592, # 3462
 710, 171,3417, 404, 549,  18,3118,2393,1410,3626,1666,7365,3516,4319,2898,4320, # 3478
7366,2973, 368,7367, 146, 366,  99, 871,3627,1543, 748, 807,1586,1185,  22,2258, # 3494
 379,3743,3180,7368,3181, 505,1941,2618,1991,1382,2314,7369, 380,2357, 218, 702, # 3510
1817,1248,3418,3024,3517,3318,3249,7370,2974,3628, 930,3250,3744,7371,  59,7372, # 3526
 585, 601,4078, 497,3419,1112,1314,4321,1801,7373,1223,1472,2174,7374, 749,1836, # 3542
 690,1899,3745,1772,3885,1476, 429,1043,1790,2232,2116, 917,4079, 447,1086,1629, # 3558
7375, 556,7376,7377,2020,1654, 844,1090, 105, 550, 966,1758,2815,1008,1782, 686, # 3574
1095,7378,2282, 793,1602,7379,3518,2593,4322,4080,2933,2297,4323,3746, 980,2496, # 3590
 544, 353, 527,4324, 908,2678,2899,7380, 381,2619,1942,1348,7381,1341,1252, 560, # 3606
3072,7382,3420,2856,7383,2053, 973, 886,2080, 143,4325,7384,7385, 157,3886, 496, # 3622
4081,  57, 840, 540,2038,4326,4327,3421,2117,1445, 970,2259,1748,1965,2081,4082, # 3638
3119,1234,1775,3251,2816,3629, 773,1206,2129,1066,2039,1326,3887,1738,1725,4083, # 3654
 279,3120,  51,1544,2594, 423,1578,2130,2066, 173,4328,1879,7386,7387,1583, 264, # 3670
 610,3630,4329,2439, 280, 154,7388,7389,7390,1739, 338,1282,3073, 693,2857,1411, # 3686
1074,3747,2440,7391,4330,7392,7393,1240, 952,2394,7394,2900,1538,2679, 685,1483, # 3702
4084,2468,1436, 953,4085,2054,4331, 671,2395,  79,4086,2441,3252, 608, 567,2680, # 3718
3422,4087,4088,1691, 393,1261,1791,2396,7395,4332,7396,7397,7398,7399,1383,1672, # 3734
3748,3182,1464, 522,1119, 661,1150, 216, 675,4333,3888,1432,3519, 609,4334,2681, # 3750
2397,7400,7401,7402,4089,3025,   0,7403,2469, 315, 231,2442, 301,3319,4335,2380, # 3766
7404, 233,4090,3631,1818,4336,4337,7405,  96,1776,1315,2082,7406, 257,7407,1809, # 3782
3632,2709,1139,1819,4091,2021,1124,2163,2778,1777,2649,7408,3074, 363,1655,3183, # 3798
7409,2975,7410,7411,7412,3889,1567,3890, 718, 103,3184, 849,1443, 341,3320,2934, # 3814
1484,7413,1712, 127,  67, 339,4092,2398, 679,1412, 821,7414,7415, 834, 738, 351, # 3830
2976,2146, 846, 235,1497,1880, 418,1992,3749,2710, 186,1100,2147,2746,3520,1545, # 3846
1355,2935,2858,1377, 583,3891,4093,2573,2977,7416,1298,3633,1078,2549,3634,2358, # 3862
  78,3750,3751, 267,1289,2099,2001,1594,4094, 348, 369,1274,2194,2175,1837,4338, # 3878
1820,2817,3635,2747,2283,2002,4339,2936,2748, 144,3321, 882,4340,3892,2749,3423, # 3894
4341,2901,7417,4095,1726, 320,7418,3893,3026, 788,2978,7419,2818,1773,1327,2859, # 3910
3894,2819,7420,1306,4342,2003,1700,3752,3521,2359,2650, 787,2022, 506, 824,3636, # 3926
 534, 323,4343,1044,3322,2023,1900, 946,3424,7421,1778,1500,1678,7422,1881,4344, # 3942
 165, 243,4345,3637,2521, 123, 683,4096, 764,4346,  36,3895,1792, 589,2902, 816, # 3958
 626,1667,3027,2233,1639,1555,1622,3753,3896,7423,3897,2860,1370,1228,1932, 891, # 3974
2083,2903, 304,4097,7424, 292,2979,2711,3522, 691,2100,4098,1115,4347, 118, 662, # 3990
7425, 611,1156, 854,2381,1316,2861,   2, 386, 515,2904,7426,7427,3253, 868,2234, # 4006
1486, 855,2651, 785,2212,3028,7428,1040,3185,3523,7429,3121, 448,7430,1525,7431, # 4022
2164,4348,7432,3754,7433,4099,2820,3524,3122, 503, 818,3898,3123,1568, 814, 676, # 4038
1444, 306,1749,7434,3755,1416,1030, 197,1428, 805,2821,1501,4349,7435,7436,7437, # 4054
1993,7438,4350,7439,7440,2195,  13,2779,3638,2980,3124,1229,1916,7441,3756,2131, # 4070
7442,4100,4351,2399,3525,7443,2213,1511,1727,1120,7444,7445, 646,3757,2443, 307, # 4086
7446,7447,1595,3186,7448,7449,7450,3639,1113,1356,3899,1465,2522,2523,7451, 519, # 4102
7452, 128,2132,  92,2284,1979,7453,3900,1512, 342,3125,2196,7454,2780,2214,1980, # 4118
3323,7455, 290,1656,1317, 789, 827,2360,7456,3758,4352, 562, 581,3901,7457, 401, # 4134
4353,2248,  94,4354,1399,2781,7458,1463,2024,4355,3187,1943,7459, 828,1105,4101, # 4150
1262,1394,7460,4102, 605,4356,7461,1783,2862,7462,2822, 819,2101, 578,2197,2937, # 4166
7463,1502, 436,3254,4103,3255,2823,3902,2905,3425,3426,7464,2712,2315,7465,7466, # 4182
2332,2067,  23,4357, 193, 826,3759,2102, 699,1630,4104,3075, 390,1793,1064,3526, # 4198
7467,1579,3076,3077,1400,7468,4105,1838,1640,2863,7469,4358,4359, 137,4106, 598, # 4214
3078,1966, 780, 104, 974,2938,7470, 278, 899, 253, 402, 572, 504, 493,1339,7471, # 4230
3903,1275,4360,2574,2550,7472,3640,3029,3079,2249, 565,1334,2713, 863,  41,7473, # 4246
7474,4361,7475,1657,2333,  19, 463,2750,4107, 606,7476,2981,3256,1087,2084,1323, # 4262
2652,2982,7477,1631,1623,1750,4108,2682,7478,2864, 791,2714,2653,2334, 232,2416, # 4278
7479,2983,1498,7480,2654,2620, 755,1366,3641,3257,3126,2025,1609, 119,1917,3427, # 4294
 862,1026,4109,7481,3904,3760,4362,3905,4363,2260,1951,2470,7482,1125, 817,4110, # 4310
4111,3906,1513,1766,2040,1487,4112,3030,3258,2824,3761,3127,7483,7484,1507,7485, # 4326
2683, 733,  40,1632,1106,2865, 345,4113, 841,2524, 230,4364,2984,1846,3259,3428, # 4342
7486,1263, 986,3429,7487, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562,3907, # 4358
3908,2939, 967,2751,2655,1349, 592,2133,1692,3324,2985,1994,4114,1679,3909,1901, # 4374
2185,7488, 739,3642,2715,1296,1290,7489,4115,2198,2199,1921,1563,2595,2551,1870, # 4390
2752,2986,7490, 435,7491, 343,1108, 596,  17,1751,4365,2235,3430,3643,7492,4366, # 4406
 294,3527,2940,1693, 477, 979, 281,2041,3528, 643,2042,3644,2621,2782,2261,1031, # 4422
2335,2134,2298,3529,4367, 367,1249,2552,7493,3530,7494,4368,1283,3325,2004, 240, # 4438
1762,3326,4369,4370, 836,1069,3128, 474,7495,2148,2525, 268,3531,7496,3188,1521, # 4454
1284,7497,1658,1546,4116,7498,3532,3533,7499,4117,3327,2684,1685,4118, 961,1673, # 4470
2622, 190,2005,2200,3762,4371,4372,7500, 570,2497,3645,1490,7501,4373,2623,3260, # 4486
1956,4374, 584,1514, 396,1045,1944,7502,4375,1967,2444,7503,7504,4376,3910, 619, # 4502
7505,3129,3261, 215,2006,2783,2553,3189,4377,3190,4378, 763,4119,3763,4379,7506, # 4518
7507,1957,1767,2941,3328,3646,1174, 452,1477,4380,3329,3130,7508,2825,1253,2382, # 4534
2186,1091,2285,4120, 492,7509, 638,1169,1824,2135,1752,3911, 648, 926,1021,1324, # 4550
4381, 520,4382, 997, 847,1007, 892,4383,3764,2262,1871,3647,7510,2400,1784,4384, # 4566
1952,2942,3080,3191,1728,4121,2043,3648,4385,2007,1701,3131,1551,  30,2263,4122, # 4582
7511,2026,4386,3534,7512, 501,7513,4123, 594,3431,2165,1821,3535,3432,3536,3192, # 4598
 829,2826,4124,7514,1680,3132,1225,4125,7515,3262,4387,4126,3133,2336,7516,4388, # 4614
4127,7517,3912,3913,7518,1847,2383,2596,3330,7519,4389, 374,3914, 652,4128,4129, # 4630
 375,1140, 798,7520,7521,7522,2361,4390,2264, 546,1659, 138,3031,2445,4391,7523, # 4646
2250, 612,1848, 910, 796,3765,1740,1371, 825,3766,3767,7524,2906,2554,7525, 692, # 4662
 444,3032,2624, 801,4392,4130,7526,1491, 244,1053,3033,4131,4132, 340,7527,3915, # 4678
1041,2987, 293,1168,  87,1357,7528,1539, 959,7529,2236, 721, 694,4133,3768, 219, # 4694
1478, 644,1417,3331,2656,1413,1401,1335,1389,3916,7530,7531,2988,2362,3134,1825, # 4710
 730,1515, 184,2827,  66,4393,7532,1660,2943, 246,3332, 378,1457, 226,3433, 975, # 4726
3917,2944,1264,3537, 674, 696,7533, 163,7534,1141,2417,2166, 713,3538,3333,4394, # 4742
3918,7535,7536,1186,  15,7537,1079,1070,7538,1522,3193,3539, 276,1050,2716, 758, # 4758
1126, 653,2945,3263,7539,2337, 889,3540,3919,3081,2989, 903,1250,4395,3920,3434, # 4774
3541,1342,1681,1718, 766,3264, 286,  89,2946,3649,7540,1713,7541,2597,3334,2990, # 4790
7542,2947,2215,3194,2866,7543,4396,2498,2526, 181, 387,1075,3921, 731,2187,3335, # 4806
7544,3265, 310, 313,3435,2299, 770,4134,  54,3034, 189,4397,3082,3769,3922,7545, # 4822
1230,1617,1849, 355,3542,4135,4398,3336, 111,4136,3650,1350,3135,3436,3035,4137, # 4838
2149,3266,3543,7546,2784,3923,3924,2991, 722,2008,7547,1071, 247,1207,2338,2471, # 4854
1378,4399,2009, 864,1437,1214,4400, 373,3770,1142,2216, 667,4401, 442,2753,2555, # 4870
3771,3925,1968,4138,3267,1839, 837, 170,1107, 934,1336,1882,7548,7549,2118,4139, # 4886
2828, 743,1569,7550,4402,4140, 582,2384,1418,3437,7551,1802,7552, 357,1395,1729, # 4902
3651,3268,2418,1564,2237,7553,3083,3772,1633,4403,1114,2085,4141,1532,7554, 482, # 4918
2446,4404,7555,7556,1492, 833,1466,7557,2717,3544,1641,2829,7558,1526,1272,3652, # 4934
4142,1686,1794, 416,2556,1902,1953,1803,7559,3773,2785,3774,1159,2316,7560,2867, # 4950
4405,1610,1584,3036,2419,2754, 443,3269,1163,3136,7561,7562,3926,7563,4143,2499, # 4966
3037,4406,3927,3137,2103,1647,3545,2010,1872,4144,7564,4145, 431,3438,7565, 250, # 4982
  97,  81,4146,7566,1648,1850,1558, 160, 848,7567, 866, 740,1694,7568,2201,2830, # 4998
3195,4147,4407,3653,1687, 950,2472, 426, 469,3196,3654,3655,3928,7569,7570,1188, # 5014
 424,1995, 861,3546,4148,3775,2202,2685, 168,1235,3547,4149,7571,2086,1674,4408, # 5030
3337,3270, 220,2557,1009,7572,3776, 670,2992, 332,1208, 717,7573,7574,3548,2447, # 5046
3929,3338,7575, 513,7576,1209,2868,3339,3138,4409,1080,7577,7578,7579,7580,2527, # 5062
3656,3549, 815,1587,3930,3931,7581,3550,3439,3777,1254,4410,1328,3038,1390,3932, # 5078
1741,3933,3778,3934,7582, 236,3779,2448,3271,7583,7584,3657,3780,1273,3781,4411, # 5094
7585, 308,7586,4412, 245,4413,1851,2473,1307,2575, 430, 715,2136,2449,7587, 270, # 5110
 199,2869,3935,7588,3551,2718,1753, 761,1754, 725,1661,1840,4414,3440,3658,7589, # 5126
7590, 587,  14,3272, 227,2598, 326, 480,2265, 943,2755,3552, 291, 650,1883,7591, # 5142
1702,1226, 102,1547,  62,3441, 904,4415,3442,1164,4150,7592,7593,1224,1548,2756, # 5158
 391, 498,1493,7594,1386,1419,7595,2055,1177,4416, 813, 880,1081,2363, 566,1145, # 5174
4417,2286,1001,1035,2558,2599,2238, 394,1286,7596,7597,2068,7598,  86,1494,1730, # 5190
3936, 491,1588, 745, 897,2948, 843,3340,3937,2757,2870,3273,1768, 998,2217,2069, # 5206
 397,1826,1195,1969,3659,2993,3341, 284,7599,3782,2500,2137,2119,1903,7600,3938, # 5222
2150,3939,4151,1036,3443,1904, 114,2559,4152, 209,1527,7601,7602,2949,2831,2625, # 5238
2385,2719,3139, 812,2560,7603,3274,7604,1559, 737,1884,3660,1210, 885,  28,2686, # 5254
3553,3783,7605,4153,1004,1779,4418,7606, 346,1981,2218,2687,4419,3784,1742, 797, # 5270
1642,3940,1933,1072,1384,2151, 896,3941,3275,3661,3197,2871,3554,7607,2561,1958, # 5286
4420,2450,1785,7608,7609,7610,3942,4154,1005,1308,3662,4155,2720,4421,4422,1528, # 5302
2600, 161,1178,4156,1982, 987,4423,1101,4157, 631,3943,1157,3198,2420,1343,1241, # 5318
1016,2239,2562, 372, 877,2339,2501,1160, 555,1934, 911,3944,7611, 466,1170, 169, # 5334
1051,2907,2688,3663,2474,2994,1182,2011,2563,1251,2626,7612, 992,2340,3444,1540, # 5350
2721,1201,2070,2401,1996,2475,7613,4424, 528,1922,2188,1503,1873,1570,2364,3342, # 5366
3276,7614, 557,1073,7615,1827,3445,2087,2266,3140,3039,3084, 767,3085,2786,4425, # 5382
1006,4158,4426,2341,1267,2176,3664,3199, 778,3945,3200,2722,1597,2657,7616,4427, # 5398
7617,3446,7618,7619,7620,3277,2689,1433,3278, 131,  95,1504,3946, 723,4159,3141, # 5414
1841,3555,2758,2189,3947,2027,2104,3665,7621,2995,3948,1218,7622,3343,3201,3949, # 5430
4160,2576, 248,1634,3785, 912,7623,2832,3666,3040,3786, 654,  53,7624,2996,7625, # 5446
1688,4428, 777,3447,1032,3950,1425,7626, 191, 820,2120,2833, 971,4429, 931,3202, # 5462
 135, 664, 783,3787,1997, 772,2908,1935,3951,3788,4430,2909,3203, 282,2723, 640, # 5478
1372,3448,1127, 922, 325,3344,7627,7628, 711,2044,7629,7630,3952,2219,2787,1936, # 5494
3953,3345,2220,2251,3789,2300,7631,4431,3790,1258,3279,3954,3204,2138,2950,3955, # 5510
3956,7632,2221, 258,3205,4432, 101,1227,7633,3280,1755,7634,1391,3281,7635,2910, # 5526
2056, 893,7636,7637,7638,1402,4161,2342,7639,7640,3206,3556,7641,7642, 878,1325, # 5542
1780,2788,4433, 259,1385,2577, 744,1183,2267,4434,7643,3957,2502,7644, 684,1024, # 5558
4162,7645, 472,3557,3449,1165,3282,3958,3959, 322,2152, 881, 455,1695,1152,1340, # 5574
 660, 554,2153,4435,1058,4436,4163, 830,1065,3346,3960,4437,1923,7646,1703,1918, # 5590
7647, 932,2268, 122,7648,4438, 947, 677,7649,3791,2627, 297,1905,1924,2269,4439, # 5606
2317,3283,7650,7651,4164,7652,4165,  84,4166, 112, 989,7653, 547,1059,3961, 701, # 5622
3558,1019,7654,4167,7655,3450, 942, 639, 457,2301,2451, 993,2951, 407, 851, 494, # 5638
4440,3347, 927,7656,1237,7657,2421,3348, 573,4168, 680, 921,2911,1279,1874, 285, # 5654
 790,1448,1983, 719,2167,7658,7659,4441,3962,3963,1649,7660,1541, 563,7661,1077, # 5670
7662,3349,3041,3451, 511,2997,3964,3965,3667,3966,1268,2564,3350,3207,4442,4443, # 5686
7663, 535,1048,1276,1189,2912,2028,3142,1438,1373,2834,2952,1134,2012,7664,4169, # 5702
1238,2578,3086,1259,7665, 700,7666,2953,3143,3668,4170,7667,4171,1146,1875,1906, # 5718
4444,2601,3967, 781,2422, 132,1589, 203, 147, 273,2789,2402, 898,1786,2154,3968, # 5734
3969,7668,3792,2790,7669,7670,4445,4446,7671,3208,7672,1635,3793, 965,7673,1804, # 5750
2690,1516,3559,1121,1082,1329,3284,3970,1449,3794,  65,1128,2835,2913,2759,1590, # 5766
3795,7674,7675,  12,2658,  45, 976,2579,3144,4447, 517,2528,1013,1037,3209,7676, # 5782
3796,2836,7677,3797,7678,3452,7679,2602, 614,1998,2318,3798,3087,2724,2628,7680, # 5798
2580,4172, 599,1269,7681,1810,3669,7682,2691,3088, 759,1060, 489,1805,3351,3285, # 5814
1358,7683,7684,2386,1387,1215,2629,2252, 490,7685,7686,4173,1759,2387,2343,7687, # 5830
4448,3799,1907,3971,2630,1806,3210,4449,3453,3286,2760,2344, 874,7688,7689,3454, # 5846
3670,1858,  91,2914,3671,3042,3800,4450,7690,3145,3972,2659,7691,3455,1202,1403, # 5862
3801,2954,2529,1517,2503,4451,3456,2504,7692,4452,7693,2692,1885,1495,1731,3973, # 5878
2365,4453,7694,2029,7695,7696,3974,2693,1216, 237,2581,4174,2319,3975,3802,4454, # 5894
4455,2694,3560,3457, 445,4456,7697,7698,7699,7700,2761,  61,3976,3672,1822,3977, # 5910
7701, 687,2045, 935, 925, 405,2660, 703,1096,1859,2725,4457,3978,1876,1367,2695, # 5926
3352, 918,2105,1781,2476, 334,3287,1611,1093,4458, 564,3146,3458,3673,3353, 945, # 5942
2631,2057,4459,7702,1925, 872,4175,7703,3459,2696,3089, 349,4176,3674,3979,4460, # 5958
3803,4177,3675,2155,3980,4461,4462,4178,4463,2403,2046, 782,3981, 400, 251,4179, # 5974
1624,7704,7705, 277,3676, 299,1265, 476,1191,3804,2121,4180,4181,1109, 205,7706, # 5990
2582,1000,2156,3561,1860,7707,7708,7709,4464,7710,4465,2565, 107,2477,2157,3982, # 6006
3460,3147,7711,1533, 541,1301, 158, 753,4182,2872,3562,7712,1696, 370,1088,4183, # 6022
4466,3563, 579, 327, 440, 162,2240, 269,1937,1374,3461, 968,3043,  56,1396,3090, # 6038
2106,3288,3354,7713,1926,2158,4467,2998,7714,3564,7715,7716,3677,4468,2478,7717, # 6054
2791,7718,1650,4469,7719,2603,7720,7721,3983,2661,3355,1149,3356,3984,3805,3985, # 6070
7722,1076,  49,7723, 951,3211,3289,3290, 450,2837, 920,7724,1811,2792,2366,4184, # 6086
1908,1138,2367,3806,3462,7725,3212,4470,1909,1147,1518,2423,4471,3807,7726,4472, # 6102
2388,2604, 260,1795,3213,7727,7728,3808,3291, 708,7729,3565,1704,7730,3566,1351, # 6118
1618,3357,2999,1886, 944,4185,3358,4186,3044,3359,4187,7731,3678, 422, 413,1714, # 6134
3292, 500,2058,2345,4188,2479,7732,1344,1910, 954,7733,1668,7734,7735,3986,2404, # 6150
4189,3567,3809,4190,7736,2302,1318,2505,3091, 133,3092,2873,4473, 629,  31,2838, # 6166
2697,3810,4474, 850, 949,4475,3987,2955,1732,2088,4191,1496,1852,7737,3988, 620, # 6182
3214, 981,1242,3679,3360,1619,3680,1643,3293,2139,2452,1970,1719,3463,2168,7738, # 6198
3215,7739,7740,3361,1828,7741,1277,4476,1565,2047,7742,1636,3568,3093,7743, 869, # 6214
2839, 655,3811,3812,3094,3989,3000,3813,1310,3569,4477,7744,7745,7746,1733, 558, # 6230
4478,3681, 335,1549,3045,1756,4192,3682,1945,3464,1829,1291,1192, 470,2726,2107, # 6246
2793, 913,1054,3990,7747,1027,7748,3046,3991,4479, 982,2662,3362,3148,3465,3216, # 6262
3217,1946,2794,7749, 571,4480,7750,1830,7751,3570,2583,1523,2424,7752,2089, 984, # 6278
4481,3683,1959,7753,3684, 852, 923,2795,3466,3685, 969,1519, 999,2048,2320,1705, # 6294
7754,3095, 615,1662, 151, 597,3992,2405,2321,1049, 275,4482,3686,4193, 568,3687, # 6310
3571,2480,4194,3688,7755,2425,2270, 409,3218,7756,1566,2874,3467,1002, 769,2840, # 6326
 194,2090,3149,3689,2222,3294,4195, 628,1505,7757,7758,1763,2177,3001,3993, 521, # 6342
1161,2584,1787,2203,2406,4483,3994,1625,4196,4197, 412,  42,3096, 464,7759,2632, # 6358
4484,3363,1760,1571,2875,3468,2530,1219,2204,3814,2633,2140,2368,4485,4486,3295, # 6374
1651,3364,3572,7760,7761,3573,2481,3469,7762,3690,7763,7764,2271,2091, 460,7765, # 6390
4487,7766,3002, 962, 588,3574, 289,3219,2634,1116,  52,7767,3047,1796,7768,7769, # 6406
7770,1467,7771,1598,1143,3691,4198,1984,1734,1067,4488,1280,3365, 465,4489,1572, # 6422
 510,7772,1927,2241,1812,1644,3575,7773,4490,3692,7774,7775,2663,1573,1534,7776, # 6438
7777,4199, 536,1807,1761,3470,3815,3150,2635,7778,7779,7780,4491,3471,2915,1911, # 6454
2796,7781,3296,1122, 377,3220,7782, 360,7783,7784,4200,1529, 551,7785,2059,3693, # 6470
1769,2426,7786,2916,4201,3297,3097,2322,2108,2030,4492,1404, 136,1468,1479, 672, # 6486
1171,3221,2303, 271,3151,7787,2762,7788,2049, 678,2727, 865,1947,4493,7789,2013, # 6502
3995,2956,7790,2728,2223,1397,3048,3694,4494,4495,1735,2917,3366,3576,7791,3816, # 6518
 509,2841,2453,2876,3817,7792,7793,3152,3153,4496,4202,2531,4497,2304,1166,1010, # 6534
 552, 681,1887,7794,7795,2957,2958,3996,1287,1596,1861,3154, 358, 453, 736, 175, # 6550
 478,1117, 905,1167,1097,7796,1853,1530,7797,1706,7798,2178,3472,2287,3695,3473, # 6566
3577,4203,2092,4204,7799,3367,1193,2482,4205,1458,2190,2205,1862,1888,1421,3298, # 6582
2918,3049,2179,3474, 595,2122,7800,3997,7801,7802,4206,1707,2636, 223,3696,1359, # 6598
 751,3098, 183,3475,7803,2797,3003, 419,2369, 633, 704,3818,2389, 241,7804,7805, # 6614
7806, 838,3004,3697,2272,2763,2454,3819,1938,2050,3998,1309,3099,2242,1181,7807, # 6630
1136,2206,3820,2370,1446,4207,2305,4498,7808,7809,4208,1055,2605, 484,3698,7810, # 6646
3999, 625,4209,2273,3368,1499,4210,4000,7811,4001,4211,3222,2274,2275,3476,7812, # 6662
7813,2764, 808,2606,3699,3369,4002,4212,3100,2532, 526,3370,3821,4213, 955,7814, # 6678
1620,4214,2637,2427,7815,1429,3700,1669,1831, 994, 928,7816,3578,1260,7817,7818, # 6694
7819,1948,2288, 741,2919,1626,4215,2729,2455, 867,1184, 362,3371,1392,7820,7821, # 6710
4003,4216,1770,1736,3223,2920,4499,4500,1928,2698,1459,1158,7822,3050,3372,2877, # 6726
1292,1929,2506,2842,3701,1985,1187,2071,2014,2607,4217,7823,2566,2507,2169,3702, # 6742
2483,3299,7824,3703,4501,7825,7826, 666,1003,3005,1022,3579,4218,7827,4502,1813, # 6758
2253, 574,3822,1603, 295,1535, 705,3823,4219, 283, 858, 417,7828,7829,3224,4503, # 6774
4504,3051,1220,1889,1046,2276,2456,4004,1393,1599, 689,2567, 388,4220,7830,2484, # 6790
 802,7831,2798,3824,2060,1405,2254,7832,4505,3825,2109,1052,1345,3225,1585,7833, # 6806
 809,7834,7835,7836, 575,2730,3477, 956,1552,1469,1144,2323,7837,2324,1560,2457, # 6822
3580,3226,4005, 616,2207,3155,2180,2289,7838,1832,7839,3478,4506,7840,1319,3704, # 6838
3705,1211,3581,1023,3227,1293,2799,7841,7842,7843,3826, 607,2306,3827, 762,2878, # 6854
1439,4221,1360,7844,1485,3052,7845,4507,1038,4222,1450,2061,2638,4223,1379,4508, # 6870
2585,7846,7847,4224,1352,1414,2325,2921,1172,7848,7849,3828,3829,7850,1797,1451, # 6886
7851,7852,7853,7854,2922,4006,4007,2485,2346, 411,4008,4009,3582,3300,3101,4509, # 6902
1561,2664,1452,4010,1375,7855,7856,  47,2959, 316,7857,1406,1591,2923,3156,7858, # 6918
1025,2141,3102,3157, 354,2731, 884,2224,4225,2407, 508,3706, 726,3583, 996,2428, # 6934
3584, 729,7859, 392,2191,1453,4011,4510,3707,7860,7861,2458,3585,2608,1675,2800, # 6950
 919,2347,2960,2348,1270,4511,4012,  73,7862,7863, 647,7864,3228,2843,2255,1550, # 6966
1346,3006,7865,1332, 883,3479,7866,7867,7868,7869,3301,2765,7870,1212, 831,1347, # 6982
4226,4512,2326,3830,1863,3053, 720,3831,4513,4514,3832,7871,4227,7872,7873,4515, # 6998
7874,7875,1798,4516,3708,2609,4517,3586,1645,2371,7876,7877,2924, 669,2208,2665, # 7014
2429,7878,2879,7879,7880,1028,3229,7881,4228,2408,7882,2256,1353,7883,7884,4518, # 7030
3158, 518,7885,4013,7886,4229,1960,7887,2142,4230,7888,7889,3007,2349,2350,3833, # 7046
 516,1833,1454,4014,2699,4231,4519,2225,2610,1971,1129,3587,7890,2766,7891,2961, # 7062
1422, 577,1470,3008,1524,3373,7892,7893, 432,4232,3054,3480,7894,2586,1455,2508, # 7078
2226,1972,1175,7895,1020,2732,4015,3481,4520,7896,2733,7897,1743,1361,3055,3482, # 7094
2639,4016,4233,4521,2290, 895, 924,4234,2170, 331,2243,3056, 166,1627,3057,1098, # 7110
7898,1232,2880,2227,3374,4522, 657, 403,1196,2372, 542,3709,3375,1600,4235,3483, # 7126
7899,4523,2767,3230, 576, 530,1362,7900,4524,2533,2666,3710,4017,7901, 842,3834, # 7142
7902,2801,2031,1014,4018, 213,2700,3376, 665, 621,4236,7903,3711,2925,2430,7904, # 7158
2431,3302,3588,3377,7905,4237,2534,4238,4525,3589,1682,4239,3484,1380,7906, 724, # 7174
2277, 600,1670,7907,1337,1233,4526,3103,2244,7908,1621,4527,7909, 651,4240,7910, # 7190
1612,4241,2611,7911,2844,7912,2734,2307,3058,7913, 716,2459,3059, 174,1255,2701, # 7206
4019,3590, 548,1320,1398, 728,4020,1574,7914,1890,1197,3060,4021,7915,3061,3062, # 7222
3712,3591,3713, 747,7916, 635,4242,4528,7917,7918,7919,4243,7920,7921,4529,7922, # 7238
3378,4530,2432, 451,7923,3714,2535,2072,4244,2735,4245,4022,7924,1764,4531,7925, # 7254
4246, 350,7926,2278,2390,2486,7927,4247,4023,2245,1434,4024, 488,4532, 458,4248, # 7270
4025,3715, 771,1330,2391,3835,2568,3159,2159,2409,1553,2667,3160,4249,7928,2487, # 7286
2881,2612,1720,2702,4250,3379,4533,7929,2536,4251,7930,3231,4252,2768,7931,2015, # 7302
2736,7932,1155,1017,3716,3836,7933,3303,2308, 201,1864,4253,1430,7934,4026,7935, # 7318
7936,7937,7938,7939,4254,1604,7940, 414,1865, 371,2587,4534,4535,3485,2016,3104, # 7334
4536,1708, 960,4255, 887, 389,2171,1536,1663,1721,7941,2228,4027,2351,2926,1580, # 7350
7942,7943,7944,1744,7945,2537,4537,4538,7946,4539,7947,2073,7948,7949,3592,3380, # 7366
2882,4256,7950,4257,2640,3381,2802, 673,2703,2460, 709,3486,4028,3593,4258,7951, # 7382
1148, 502, 634,7952,7953,1204,4540,3594,1575,4541,2613,3717,7954,3718,3105, 948, # 7398
3232, 121,1745,3837,1110,7955,4259,3063,2509,3009,4029,3719,1151,1771,3838,1488, # 7414
4030,1986,7956,2433,3487,7957,7958,2093,7959,4260,3839,1213,1407,2803, 531,2737, # 7430
2538,3233,1011,1537,7960,2769,4261,3106,1061,7961,3720,3721,1866,2883,7962,2017, # 7446
 120,4262,4263,2062,3595,3234,2309,3840,2668,3382,1954,4542,7963,7964,3488,1047, # 7462
2704,1266,7965,1368,4543,2845, 649,3383,3841,2539,2738,1102,2846,2669,7966,7967, # 7478
1999,7968,1111,3596,2962,7969,2488,3842,3597,2804,1854,3384,3722,7970,7971,3385, # 7494
2410,2884,3304,3235,3598,7972,2569,7973,3599,2805,4031,1460, 856,7974,3600,7975, # 7510
2885,2963,7976,2886,3843,7977,4264, 632,2510, 875,3844,1697,3845,2291,7978,7979, # 7526
4544,3010,1239, 580,4545,4265,7980, 914, 936,2074,1190,4032,1039,2123,7981,7982, # 7542
7983,3386,1473,7984,1354,4266,3846,7985,2172,3064,4033, 915,3305,4267,4268,3306, # 7558
1605,1834,7986,2739, 398,3601,4269,3847,4034, 328,1912,2847,4035,3848,1331,4270, # 7574
3011, 937,4271,7987,3602,4036,4037,3387,2160,4546,3388, 524, 742, 538,3065,1012, # 7590
7988,7989,3849,2461,7990, 658,1103, 225,3850,7991,7992,4547,7993,4548,7994,3236, # 7606
1243,7995,4038, 963,2246,4549,7996,2705,3603,3161,7997,7998,2588,2327,7999,4550, # 7622
8000,8001,8002,3489,3307, 957,3389,2540,2032,1930,2927,2462, 870,2018,3604,1746, # 7638
2770,2771,2434,2463,8003,3851,8004,3723,3107,3724,3490,3390,3725,8005,1179,3066, # 7654
8006,3162,2373,4272,3726,2541,3163,3108,2740,4039,8007,3391,1556,2542,2292, 977, # 7670
2887,2033,4040,1205,3392,8008,1765,3393,3164,2124,1271,1689, 714,4551,3491,8009, # 7686
2328,3852, 533,4273,3605,2181, 617,8010,2464,3308,3492,2310,8011,8012,3165,8013, # 7702
8014,3853,1987, 618, 427,2641,3493,3394,8015,8016,1244,1690,8017,2806,4274,4552, # 7718
8018,3494,8019,8020,2279,1576, 473,3606,4275,3395, 972,8021,3607,8022,3067,8023, # 7734
8024,4553,4554,8025,3727,4041,4042,8026, 153,4555, 356,8027,1891,2888,4276,2143, # 7750
 408, 803,2352,8028,3854,8029,4277,1646,2570,2511,4556,4557,3855,8030,3856,4278, # 7766
8031,2411,3396, 752,8032,8033,1961,2964,8034, 746,3012,2465,8035,4279,3728, 698, # 7782
4558,1892,4280,3608,2543,4559,3609,3857,8036,3166,3397,8037,1823,1302,4043,2706, # 7798
3858,1973,4281,8038,4282,3167, 823,1303,1288,1236,2848,3495,4044,3398, 774,3859, # 7814
8039,1581,4560,1304,2849,3860,4561,8040,2435,2161,1083,3237,4283,4045,4284, 344, # 7830
1173, 288,2311, 454,1683,8041,8042,1461,4562,4046,2589,8043,8044,4563, 985, 894, # 7846
8045,3399,3168,8046,1913,2928,3729,1988,8047,2110,1974,8048,4047,8049,2571,1194, # 7862
 425,8050,4564,3169,1245,3730,4285,8051,8052,2850,8053, 636,4565,1855,3861, 760, # 7878
1799,8054,4286,2209,1508,4566,4048,1893,1684,2293,8055,8056,8057,4287,4288,2210, # 7894
 479,8058,8059, 832,8060,4049,2489,8061,2965,2490,3731, 990,3109, 627,1814,2642, # 7910
4289,1582,4290,2125,2111,3496,4567,8062, 799,4291,3170,8063,4568,2112,1737,3013, # 7926
1018, 543, 754,4292,3309,1676,4569,4570,4050,8064,1489,8065,3497,8066,2614,2889, # 7942
4051,8067,8068,2966,8069,8070,8071,8072,3171,4571,4572,2182,1722,8073,3238,3239, # 7958
1842,3610,1715, 481, 365,1975,1856,8074,8075,1962,2491,4573,8076,2126,3611,3240, # 7974
 433,1894,2063,2075,8077, 602,2741,8078,8079,8080,8081,8082,3014,1628,3400,8083, # 7990
3172,4574,4052,2890,4575,2512,8084,2544,2772,8085,8086,8087,3310,4576,2891,8088, # 8006
4577,8089,2851,4578,4579,1221,2967,4053,2513,8090,8091,8092,1867,1989,8093,8094, # 8022
8095,1895,8096,8097,4580,1896,4054, 318,8098,2094,4055,4293,8099,8100, 485,8101, # 8038
 938,3862, 553,2670, 116,8102,3863,3612,8103,3498,2671,2773,3401,3311,2807,8104, # 8054
3613,2929,4056,1747,2930,2968,8105,8106, 207,8107,8108,2672,4581,2514,8109,3015, # 8070
 890,3614,3864,8110,1877,3732,3402,8111,2183,2353,3403,1652,8112,8113,8114, 941, # 8086
2294, 208,3499,4057,2019, 330,4294,3865,2892,2492,3733,4295,8115,8116,8117,8118, # 8102
#Everything below is of no interest for detection purpose
2515,1613,4582,8119,3312,3866,2516,8120,4058,8121,1637,4059,2466,4583,3867,8122, # 8118
2493,3016,3734,8123,8124,2192,8125,8126,2162,8127,8128,8129,8130,8131,8132,8133, # 8134
8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,8144,8145,8146,8147,8148,8149, # 8150
8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,8160,8161,8162,8163,8164,8165, # 8166
8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181, # 8182
8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197, # 8198
8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213, # 8214
8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229, # 8230
8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245, # 8246
8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261, # 8262
8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277, # 8278
8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,8290,8291,8292,8293, # 8294
8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309, # 8310
8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322,8323,8324,8325, # 8326
8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337,8338,8339,8340,8341, # 8342
8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353,8354,8355,8356,8357, # 8358
8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370,8371,8372,8373, # 8374
8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8386,8387,8388,8389, # 8390
8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400,8401,8402,8403,8404,8405, # 8406
8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,8416,8417,8418,8419,8420,8421, # 8422
8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,8433,8434,8435,8436,8437, # 8438
8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,8448,8449,8450,8451,8452,8453, # 8454
8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8468,8469, # 8470
8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480,8481,8482,8483,8484,8485, # 8486
8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501, # 8502
8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517, # 8518
8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533, # 8534
8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549, # 8550
8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565, # 8566
8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581, # 8582
8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597, # 8598
8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612,8613, # 8614
8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,8624,8625,8626,8627,8628,8629, # 8630
8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644,8645, # 8646
8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660,8661, # 8662
8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673,8674,8675,8676,8677, # 8678
8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693, # 8694
8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709, # 8710
8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725, # 8726
8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740,8741) # 8742

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py000064400000042475151733566760024426 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# KOI8-R language model
# Character Mapping Table:
KOI8R_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,  # 80
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,  # 90
223,224,225, 68,226,227,228,229,230,231,232,233,234,235,236,237,  # a0
238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,  # b0
 27,  3, 21, 28, 13,  2, 39, 19, 26,  4, 23, 11,  8, 12,  5,  1,  # c0
 15, 16,  9,  7,  6, 14, 24, 10, 17, 18, 20, 25, 30, 29, 22, 54,  # d0
 59, 37, 44, 58, 41, 48, 53, 46, 55, 42, 60, 36, 49, 38, 31, 34,  # e0
 35, 43, 45, 32, 40, 52, 56, 33, 61, 62, 51, 57, 47, 63, 50, 70,  # f0
)

win1251_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
239,240,241,242,243,244,245,246, 68,247,248,249,250,251,252,253,
 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
)

latin5_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
)

macCyrillic_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
239,240,241,242,243,244,245,246,247,248,249,250,251,252, 68, 16,
  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27,255,
)

IBM855_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
191,192,193,194, 68,195,196,197,198,199,200,201,202,203,204,205,
206,207,208,209,210,211,212,213,214,215,216,217, 27, 59, 54, 70,
  3, 37, 21, 44, 28, 58, 13, 41,  2, 48, 39, 53, 19, 46,218,219,
220,221,222,223,224, 26, 55,  4, 42,225,226,227,228, 23, 60,229,
230,231,232,233,234,235, 11, 36,236,237,238,239,240,241,242,243,
  8, 49, 12, 38,  5, 31,  1, 34, 15,244,245,246,247, 35, 16,248,
 43,  9, 45,  7, 32,  6, 40, 14, 52, 24, 56, 10, 33, 17, 61,249,
250, 18, 62, 20, 51, 25, 57, 30, 47, 29, 63, 22, 50,251,252,255,
)

IBM866_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 97.6601%
# first 1024 sequences: 2.3389%
# rest  sequences:      0.1237%
# negative sequences:   0.0009%
RussianLangModel = (
0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,1,3,3,3,2,3,2,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,2,2,2,0,0,2,
3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,2,3,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,2,2,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,2,3,3,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,
0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,
0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,2,2,2,3,1,3,3,1,3,3,3,3,2,2,3,0,2,2,2,3,3,2,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,3,3,3,2,2,3,2,3,3,3,2,1,2,2,0,1,2,2,2,2,2,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,3,0,2,2,3,3,2,1,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,1,2,3,2,2,3,2,3,3,3,3,2,2,3,0,3,2,2,3,1,1,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,2,3,3,3,3,2,2,2,0,3,3,3,2,2,2,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,3,3,3,2,3,2,2,0,1,3,2,1,2,2,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,2,1,1,3,0,1,1,1,1,2,1,1,0,2,2,2,1,2,0,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,2,2,2,2,1,3,2,3,2,3,2,1,2,2,0,1,1,2,1,2,1,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,2,3,3,3,2,2,2,2,0,2,2,2,2,3,1,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
3,2,3,2,2,3,3,3,3,3,3,3,3,3,1,3,2,0,0,3,3,3,3,2,3,3,3,3,2,3,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,3,2,2,3,3,0,2,1,0,3,2,3,2,3,0,0,1,2,0,0,1,0,1,2,1,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,3,0,2,3,3,3,3,2,3,3,3,3,1,2,2,0,0,2,3,2,2,2,3,2,3,2,2,3,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,3,0,2,3,2,3,0,1,2,3,3,2,0,2,3,0,0,2,3,2,2,0,1,3,1,3,2,2,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,3,0,2,3,3,3,3,3,3,3,3,2,1,3,2,0,0,2,2,3,3,3,2,3,3,0,2,2,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,2,3,3,2,2,2,3,3,0,0,1,1,1,1,1,2,0,0,1,1,1,1,0,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,2,3,3,3,3,3,3,3,0,3,2,3,3,2,3,2,0,2,1,0,1,1,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,3,2,2,2,2,3,1,3,2,3,1,1,2,1,0,2,2,2,2,1,3,1,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
2,2,3,3,3,3,3,1,2,2,1,3,1,0,3,0,0,3,0,0,0,1,1,0,1,2,1,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,2,1,1,3,3,3,2,2,1,2,2,3,1,1,2,0,0,2,2,1,3,0,0,2,1,1,2,1,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,3,3,3,3,1,2,2,2,1,2,1,3,3,1,1,2,1,2,1,2,2,0,2,0,0,1,1,0,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,3,2,1,3,2,2,3,2,0,3,2,0,3,0,1,0,1,1,0,0,1,1,1,1,0,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,2,3,3,3,2,2,2,3,3,1,2,1,2,1,0,1,0,1,1,0,1,0,0,2,1,1,1,0,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
3,1,1,2,1,2,3,3,2,2,1,2,2,3,0,2,1,0,0,2,2,3,2,1,2,2,2,2,2,3,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,1,1,0,1,1,2,2,1,1,3,0,0,1,3,1,1,1,0,0,0,1,0,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,3,3,3,2,0,0,0,2,1,0,1,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,1,0,0,2,3,2,2,2,1,2,2,2,1,2,1,0,0,1,1,1,0,2,0,1,1,1,0,0,1,1,
1,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,0,0,0,0,1,0,0,0,0,3,0,1,2,1,0,0,0,0,0,0,0,1,1,0,0,1,1,
1,0,1,0,1,2,0,0,1,1,2,1,0,1,1,1,1,0,1,1,1,1,0,1,0,0,1,0,0,1,1,0,
2,2,3,2,2,2,3,1,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,0,1,0,1,1,1,0,2,1,
1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,0,1,1,0,
3,3,3,2,2,2,2,3,2,2,1,1,2,2,2,2,1,1,3,1,2,1,2,0,0,1,1,0,1,0,2,1,
1,1,1,1,1,2,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,0,1,0,0,1,0,0,0,1,1,0,
2,0,0,1,0,3,2,2,2,2,1,2,1,2,1,2,0,0,0,2,1,2,2,1,1,2,2,0,1,1,0,2,
1,1,1,1,1,0,1,1,1,2,1,1,1,2,1,0,1,2,1,1,1,1,0,1,1,1,0,0,1,0,0,1,
1,3,2,2,2,1,1,1,2,3,0,0,0,0,2,0,2,2,1,0,0,0,0,0,0,1,0,0,0,0,1,1,
1,0,1,1,0,1,0,1,1,0,1,1,0,2,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,
2,3,2,3,2,1,2,2,2,2,1,0,0,0,2,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,2,1,
1,1,2,1,0,2,0,0,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,
3,0,0,1,0,2,2,2,3,2,2,2,2,2,2,2,0,0,0,2,1,2,1,1,1,2,2,0,0,0,1,2,
1,1,1,1,1,0,1,2,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,
2,3,2,3,3,2,0,1,1,1,0,0,1,0,2,0,1,1,3,1,0,0,0,0,0,0,0,1,0,0,2,1,
1,1,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,0,1,0,
2,3,3,3,3,1,2,2,2,2,0,1,1,0,2,1,1,1,2,1,0,1,1,0,0,1,0,1,0,0,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,2,0,0,1,1,2,2,1,0,0,2,0,1,1,3,0,0,1,0,0,0,0,0,1,0,1,2,1,
1,1,2,0,1,1,1,0,1,0,1,1,0,1,0,1,1,1,1,0,1,0,0,0,0,0,0,1,0,1,1,0,
1,3,2,3,2,1,0,0,2,2,2,0,1,0,2,0,1,1,1,0,1,0,0,0,3,0,1,1,0,0,2,1,
1,1,1,0,1,1,0,0,0,0,1,1,0,1,0,0,2,1,1,0,1,0,0,0,1,0,1,0,0,1,1,0,
3,1,2,1,1,2,2,2,2,2,2,1,2,2,1,1,0,0,0,2,2,2,0,0,0,1,2,1,0,1,0,1,
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,2,1,1,1,0,1,0,1,1,0,1,1,1,0,0,1,
3,0,0,0,0,2,0,1,1,1,1,1,1,1,0,1,0,0,0,1,1,1,0,1,0,1,1,0,0,1,0,1,
1,1,0,0,1,0,0,0,1,0,1,1,0,0,1,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,
1,3,3,2,2,0,0,0,2,2,0,0,0,1,2,0,1,1,2,0,0,0,0,0,0,0,0,1,0,0,2,1,
0,1,1,0,0,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,
2,3,2,3,2,0,0,0,0,1,1,0,0,0,2,0,2,0,2,0,0,0,0,0,1,0,0,1,0,0,1,1,
1,1,2,0,1,2,1,0,1,1,2,1,1,1,1,1,2,1,1,0,1,0,0,1,1,1,1,1,0,1,1,0,
1,3,2,2,2,1,0,0,2,2,1,0,1,2,2,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,1,
0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,0,2,3,1,2,2,2,2,2,2,1,1,0,0,0,1,0,1,0,2,1,1,1,0,0,0,0,1,
1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
2,0,2,0,0,1,0,3,2,1,2,1,2,2,0,1,0,0,0,2,1,0,0,2,1,1,1,1,0,2,0,2,
2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,0,1,1,1,1,0,0,0,1,1,1,1,0,1,0,0,1,
1,2,2,2,2,1,0,0,1,0,0,0,0,0,2,0,1,1,1,1,0,0,0,0,1,0,1,2,0,0,2,0,
1,0,1,1,1,2,1,0,1,0,1,1,0,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,1,1,0,
2,1,2,2,2,0,3,0,1,1,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,1,1,1,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,
1,2,2,3,2,2,0,0,1,1,2,0,1,2,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,
0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,
2,2,1,1,2,1,2,2,2,2,2,1,2,2,0,1,0,0,0,1,2,2,2,1,2,1,1,1,1,1,2,1,
1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,1,1,1,0,0,0,0,1,1,1,0,1,1,0,0,1,
1,2,2,2,2,0,1,0,2,2,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
0,0,1,0,0,1,0,0,0,0,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,2,0,0,0,2,2,2,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,2,0,0,0,0,1,0,0,1,1,2,0,0,0,0,1,0,1,0,0,1,0,0,2,0,0,0,1,
0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,1,1,2,0,2,1,1,1,1,0,2,2,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,
0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
1,0,2,1,2,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,
1,0,0,0,0,2,0,1,2,1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,
0,0,0,0,0,1,0,0,1,1,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,
2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,1,0,1,0,1,0,0,1,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,0,1,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0,0,0,
0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
)

Koi8rModel = {
  'charToOrderMap': KOI8R_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "KOI8-R"
}

Win1251CyrillicModel = {
  'charToOrderMap': win1251_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "windows-1251"
}

Latin5CyrillicModel = {
  'charToOrderMap': latin5_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "ISO-8859-5"
}

MacCyrillicModel = {
  'charToOrderMap': macCyrillic_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "MacCyrillic"
};

Ibm866Model = {
  'charToOrderMap': IBM866_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "IBM866"
}

Ibm855Model = {
  'charToOrderMap': IBM855_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "IBM855"
}

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py000064400000006333151733566760024143 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetgroupprober import CharSetGroupProber
from .sbcharsetprober import SingleByteCharSetProber
from .langcyrillicmodel import (Win1251CyrillicModel, Koi8rModel,
                                Latin5CyrillicModel, MacCyrillicModel,
                                Ibm866Model, Ibm855Model)
from .langgreekmodel import Latin7GreekModel, Win1253GreekModel
from .langbulgarianmodel import Latin5BulgarianModel, Win1251BulgarianModel
from .langhungarianmodel import Latin2HungarianModel, Win1250HungarianModel
from .langthaimodel import TIS620ThaiModel
from .langhebrewmodel import Win1255HebrewModel
from .hebrewprober import HebrewProber


class SBCSGroupProber(CharSetGroupProber):
    def __init__(self):
        CharSetGroupProber.__init__(self)
        self._mProbers = [
            SingleByteCharSetProber(Win1251CyrillicModel),
            SingleByteCharSetProber(Koi8rModel),
            SingleByteCharSetProber(Latin5CyrillicModel),
            SingleByteCharSetProber(MacCyrillicModel),
            SingleByteCharSetProber(Ibm866Model),
            SingleByteCharSetProber(Ibm855Model),
            SingleByteCharSetProber(Latin7GreekModel),
            SingleByteCharSetProber(Win1253GreekModel),
            SingleByteCharSetProber(Latin5BulgarianModel),
            SingleByteCharSetProber(Win1251BulgarianModel),
            SingleByteCharSetProber(Latin2HungarianModel),
            SingleByteCharSetProber(Win1250HungarianModel),
            SingleByteCharSetProber(TIS620ThaiModel),
        ]
        hebrewProber = HebrewProber()
        logicalHebrewProber = SingleByteCharSetProber(Win1255HebrewModel,
                                                      False, hebrewProber)
        visualHebrewProber = SingleByteCharSetProber(Win1255HebrewModel, True,
                                                     hebrewProber)
        hebrewProber.set_model_probers(logicalHebrewProber, visualHebrewProber)
        self._mProbers.extend([hebrewProber, logicalHebrewProber,
                               visualHebrewProber])

        self.reset()
python3.3/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py000064400000045240151733566760022230 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .compat import wrap_ord

NUM_OF_CATEGORY = 6
DONT_KNOW = -1
ENOUGH_REL_THRESHOLD = 100
MAX_REL_THRESHOLD = 1000
MINIMUM_DATA_THRESHOLD = 4

# This is hiragana 2-char sequence table, the number in each cell represents its frequency category
jp2CharContext = (
(0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1),
(2,4,0,4,0,3,0,4,0,3,4,4,4,2,4,3,3,4,3,2,3,3,4,2,3,3,3,2,4,1,4,3,3,1,5,4,3,4,3,4,3,5,3,0,3,5,4,2,0,3,1,0,3,3,0,3,3,0,1,1,0,4,3,0,3,3,0,4,0,2,0,3,5,5,5,5,4,0,4,1,0,3,4),
(0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2),
(0,4,0,5,0,5,0,4,0,4,5,4,4,3,5,3,5,1,5,3,4,3,4,4,3,4,3,3,4,3,5,4,4,3,5,5,3,5,5,5,3,5,5,3,4,5,5,3,1,3,2,0,3,4,0,4,2,0,4,2,1,5,3,2,3,5,0,4,0,2,0,5,4,4,5,4,5,0,4,0,0,4,4),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,3,0,4,0,3,0,3,0,4,5,4,3,3,3,3,4,3,5,4,4,3,5,4,4,3,4,3,4,4,4,4,5,3,4,4,3,4,5,5,4,5,5,1,4,5,4,3,0,3,3,1,3,3,0,4,4,0,3,3,1,5,3,3,3,5,0,4,0,3,0,4,4,3,4,3,3,0,4,1,1,3,4),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,4,0,3,0,3,0,4,0,3,4,4,3,2,2,1,2,1,3,1,3,3,3,3,3,4,3,1,3,3,5,3,3,0,4,3,0,5,4,3,3,5,4,4,3,4,4,5,0,1,2,0,1,2,0,2,2,0,1,0,0,5,2,2,1,4,0,3,0,1,0,4,4,3,5,4,3,0,2,1,0,4,3),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,3,0,5,0,4,0,2,1,4,4,2,4,1,4,2,4,2,4,3,3,3,4,3,3,3,3,1,4,2,3,3,3,1,4,4,1,1,1,4,3,3,2,0,2,4,3,2,0,3,3,0,3,1,1,0,0,0,3,3,0,4,2,2,3,4,0,4,0,3,0,4,4,5,3,4,4,0,3,0,0,1,4),
(1,4,0,4,0,4,0,4,0,3,5,4,4,3,4,3,5,4,3,3,4,3,5,4,4,4,4,3,4,2,4,3,3,1,5,4,3,2,4,5,4,5,5,4,4,5,4,4,0,3,2,2,3,3,0,4,3,1,3,2,1,4,3,3,4,5,0,3,0,2,0,4,5,5,4,5,4,0,4,0,0,5,4),
(0,5,0,5,0,4,0,3,0,4,4,3,4,3,3,3,4,0,4,4,4,3,4,3,4,3,3,1,4,2,4,3,4,0,5,4,1,4,5,4,4,5,3,2,4,3,4,3,2,4,1,3,3,3,2,3,2,0,4,3,3,4,3,3,3,4,0,4,0,3,0,4,5,4,4,4,3,0,4,1,0,1,3),
(0,3,1,4,0,3,0,2,0,3,4,4,3,1,4,2,3,3,4,3,4,3,4,3,4,4,3,2,3,1,5,4,4,1,4,4,3,5,4,4,3,5,5,4,3,4,4,3,1,2,3,1,2,2,0,3,2,0,3,1,0,5,3,3,3,4,3,3,3,3,4,4,4,4,5,4,2,0,3,3,2,4,3),
(0,2,0,3,0,1,0,1,0,0,3,2,0,0,2,0,1,0,2,1,3,3,3,1,2,3,1,0,1,0,4,2,1,1,3,3,0,4,3,3,1,4,3,3,0,3,3,2,0,0,0,0,1,0,0,2,0,0,0,0,0,4,1,0,2,3,2,2,2,1,3,3,3,4,4,3,2,0,3,1,0,3,3),
(0,4,0,4,0,3,0,3,0,4,4,4,3,3,3,3,3,3,4,3,4,2,4,3,4,3,3,2,4,3,4,5,4,1,4,5,3,5,4,5,3,5,4,0,3,5,5,3,1,3,3,2,2,3,0,3,4,1,3,3,2,4,3,3,3,4,0,4,0,3,0,4,5,4,4,5,3,0,4,1,0,3,4),
(0,2,0,3,0,3,0,0,0,2,2,2,1,0,1,0,0,0,3,0,3,0,3,0,1,3,1,0,3,1,3,3,3,1,3,3,3,0,1,3,1,3,4,0,0,3,1,1,0,3,2,0,0,0,0,1,3,0,1,0,0,3,3,2,0,3,0,0,0,0,0,3,4,3,4,3,3,0,3,0,0,2,3),
(2,3,0,3,0,2,0,1,0,3,3,4,3,1,3,1,1,1,3,1,4,3,4,3,3,3,0,0,3,1,5,4,3,1,4,3,2,5,5,4,4,4,4,3,3,4,4,4,0,2,1,1,3,2,0,1,2,0,0,1,0,4,1,3,3,3,0,3,0,1,0,4,4,4,5,5,3,0,2,0,0,4,4),
(0,2,0,1,0,3,1,3,0,2,3,3,3,0,3,1,0,0,3,0,3,2,3,1,3,2,1,1,0,0,4,2,1,0,2,3,1,4,3,2,0,4,4,3,1,3,1,3,0,1,0,0,1,0,0,0,1,0,0,0,0,4,1,1,1,2,0,3,0,0,0,3,4,2,4,3,2,0,1,0,0,3,3),
(0,1,0,4,0,5,0,4,0,2,4,4,2,3,3,2,3,3,5,3,3,3,4,3,4,2,3,0,4,3,3,3,4,1,4,3,2,1,5,5,3,4,5,1,3,5,4,2,0,3,3,0,1,3,0,4,2,0,1,3,1,4,3,3,3,3,0,3,0,1,0,3,4,4,4,5,5,0,3,0,1,4,5),
(0,2,0,3,0,3,0,0,0,2,3,1,3,0,4,0,1,1,3,0,3,4,3,2,3,1,0,3,3,2,3,1,3,0,2,3,0,2,1,4,1,2,2,0,0,3,3,0,0,2,0,0,0,1,0,0,0,0,2,2,0,3,2,1,3,3,0,2,0,2,0,0,3,3,1,2,4,0,3,0,2,2,3),
(2,4,0,5,0,4,0,4,0,2,4,4,4,3,4,3,3,3,1,2,4,3,4,3,4,4,5,0,3,3,3,3,2,0,4,3,1,4,3,4,1,4,4,3,3,4,4,3,1,2,3,0,4,2,0,4,1,0,3,3,0,4,3,3,3,4,0,4,0,2,0,3,5,3,4,5,2,0,3,0,0,4,5),
(0,3,0,4,0,1,0,1,0,1,3,2,2,1,3,0,3,0,2,0,2,0,3,0,2,0,0,0,1,0,1,1,0,0,3,1,0,0,0,4,0,3,1,0,2,1,3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,4,2,2,3,1,0,3,0,0,0,1,4,4,4,3,0,0,4,0,0,1,4),
(1,4,1,5,0,3,0,3,0,4,5,4,4,3,5,3,3,4,4,3,4,1,3,3,3,3,2,1,4,1,5,4,3,1,4,4,3,5,4,4,3,5,4,3,3,4,4,4,0,3,3,1,2,3,0,3,1,0,3,3,0,5,4,4,4,4,4,4,3,3,5,4,4,3,3,5,4,0,3,2,0,4,4),
(0,2,0,3,0,1,0,0,0,1,3,3,3,2,4,1,3,0,3,1,3,0,2,2,1,1,0,0,2,0,4,3,1,0,4,3,0,4,4,4,1,4,3,1,1,3,3,1,0,2,0,0,1,3,0,0,0,0,2,0,0,4,3,2,4,3,5,4,3,3,3,4,3,3,4,3,3,0,2,1,0,3,3),
(0,2,0,4,0,3,0,2,0,2,5,5,3,4,4,4,4,1,4,3,3,0,4,3,4,3,1,3,3,2,4,3,0,3,4,3,0,3,4,4,2,4,4,0,4,5,3,3,2,2,1,1,1,2,0,1,5,0,3,3,2,4,3,3,3,4,0,3,0,2,0,4,4,3,5,5,0,0,3,0,2,3,3),
(0,3,0,4,0,3,0,1,0,3,4,3,3,1,3,3,3,0,3,1,3,0,4,3,3,1,1,0,3,0,3,3,0,0,4,4,0,1,5,4,3,3,5,0,3,3,4,3,0,2,0,1,1,1,0,1,3,0,1,2,1,3,3,2,3,3,0,3,0,1,0,1,3,3,4,4,1,0,1,2,2,1,3),
(0,1,0,4,0,4,0,3,0,1,3,3,3,2,3,1,1,0,3,0,3,3,4,3,2,4,2,0,1,0,4,3,2,0,4,3,0,5,3,3,2,4,4,4,3,3,3,4,0,1,3,0,0,1,0,0,1,0,0,0,0,4,2,3,3,3,0,3,0,0,0,4,4,4,5,3,2,0,3,3,0,3,5),
(0,2,0,3,0,0,0,3,0,1,3,0,2,0,0,0,1,0,3,1,1,3,3,0,0,3,0,0,3,0,2,3,1,0,3,1,0,3,3,2,0,4,2,2,0,2,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,1,2,0,1,0,1,0,0,0,1,3,1,2,0,0,0,1,0,0,1,4),
(0,3,0,3,0,5,0,1,0,2,4,3,1,3,3,2,1,1,5,2,1,0,5,1,2,0,0,0,3,3,2,2,3,2,4,3,0,0,3,3,1,3,3,0,2,5,3,4,0,3,3,0,1,2,0,2,2,0,3,2,0,2,2,3,3,3,0,2,0,1,0,3,4,4,2,5,4,0,3,0,0,3,5),
(0,3,0,3,0,3,0,1,0,3,3,3,3,0,3,0,2,0,2,1,1,0,2,0,1,0,0,0,2,1,0,0,1,0,3,2,0,0,3,3,1,2,3,1,0,3,3,0,0,1,0,0,0,0,0,2,0,0,0,0,0,2,3,1,2,3,0,3,0,1,0,3,2,1,0,4,3,0,1,1,0,3,3),
(0,4,0,5,0,3,0,3,0,4,5,5,4,3,5,3,4,3,5,3,3,2,5,3,4,4,4,3,4,3,4,5,5,3,4,4,3,4,4,5,4,4,4,3,4,5,5,4,2,3,4,2,3,4,0,3,3,1,4,3,2,4,3,3,5,5,0,3,0,3,0,5,5,5,5,4,4,0,4,0,1,4,4),
(0,4,0,4,0,3,0,3,0,3,5,4,4,2,3,2,5,1,3,2,5,1,4,2,3,2,3,3,4,3,3,3,3,2,5,4,1,3,3,5,3,4,4,0,4,4,3,1,1,3,1,0,2,3,0,2,3,0,3,0,0,4,3,1,3,4,0,3,0,2,0,4,4,4,3,4,5,0,4,0,0,3,4),
(0,3,0,3,0,3,1,2,0,3,4,4,3,3,3,0,2,2,4,3,3,1,3,3,3,1,1,0,3,1,4,3,2,3,4,4,2,4,4,4,3,4,4,3,2,4,4,3,1,3,3,1,3,3,0,4,1,0,2,2,1,4,3,2,3,3,5,4,3,3,5,4,4,3,3,0,4,0,3,2,2,4,4),
(0,2,0,1,0,0,0,0,0,1,2,1,3,0,0,0,0,0,2,0,1,2,1,0,0,1,0,0,0,0,3,0,0,1,0,1,1,3,1,0,0,0,1,1,0,1,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,1,2,2,0,3,4,0,0,0,1,1,0,0,1,0,0,0,0,0,1,1),
(0,1,0,0,0,1,0,0,0,0,4,0,4,1,4,0,3,0,4,0,3,0,4,0,3,0,3,0,4,1,5,1,4,0,0,3,0,5,0,5,2,0,1,0,0,0,2,1,4,0,1,3,0,0,3,0,0,3,1,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0),
(1,4,0,5,0,3,0,2,0,3,5,4,4,3,4,3,5,3,4,3,3,0,4,3,3,3,3,3,3,2,4,4,3,1,3,4,4,5,4,4,3,4,4,1,3,5,4,3,3,3,1,2,2,3,3,1,3,1,3,3,3,5,3,3,4,5,0,3,0,3,0,3,4,3,4,4,3,0,3,0,2,4,3),
(0,1,0,4,0,0,0,0,0,1,4,0,4,1,4,2,4,0,3,0,1,0,1,0,0,0,0,0,2,0,3,1,1,1,0,3,0,0,0,1,2,1,0,0,1,1,1,1,0,1,0,0,0,1,0,0,3,0,0,0,0,3,2,0,2,2,0,1,0,0,0,2,3,2,3,3,0,0,0,0,2,1,0),
(0,5,1,5,0,3,0,3,0,5,4,4,5,1,5,3,3,0,4,3,4,3,5,3,4,3,3,2,4,3,4,3,3,0,3,3,1,4,4,3,4,4,4,3,4,5,5,3,2,3,1,1,3,3,1,3,1,1,3,3,2,4,5,3,3,5,0,4,0,3,0,4,4,3,5,3,3,0,3,4,0,4,3),
(0,5,0,5,0,3,0,2,0,4,4,3,5,2,4,3,3,3,4,4,4,3,5,3,5,3,3,1,4,0,4,3,3,0,3,3,0,4,4,4,4,5,4,3,3,5,5,3,2,3,1,2,3,2,0,1,0,0,3,2,2,4,4,3,1,5,0,4,0,3,0,4,3,1,3,2,1,0,3,3,0,3,3),
(0,4,0,5,0,5,0,4,0,4,5,5,5,3,4,3,3,2,5,4,4,3,5,3,5,3,4,0,4,3,4,4,3,2,4,4,3,4,5,4,4,5,5,0,3,5,5,4,1,3,3,2,3,3,1,3,1,0,4,3,1,4,4,3,4,5,0,4,0,2,0,4,3,4,4,3,3,0,4,0,0,5,5),
(0,4,0,4,0,5,0,1,1,3,3,4,4,3,4,1,3,0,5,1,3,0,3,1,3,1,1,0,3,0,3,3,4,0,4,3,0,4,4,4,3,4,4,0,3,5,4,1,0,3,0,0,2,3,0,3,1,0,3,1,0,3,2,1,3,5,0,3,0,1,0,3,2,3,3,4,4,0,2,2,0,4,4),
(2,4,0,5,0,4,0,3,0,4,5,5,4,3,5,3,5,3,5,3,5,2,5,3,4,3,3,4,3,4,5,3,2,1,5,4,3,2,3,4,5,3,4,1,2,5,4,3,0,3,3,0,3,2,0,2,3,0,4,1,0,3,4,3,3,5,0,3,0,1,0,4,5,5,5,4,3,0,4,2,0,3,5),
(0,5,0,4,0,4,0,2,0,5,4,3,4,3,4,3,3,3,4,3,4,2,5,3,5,3,4,1,4,3,4,4,4,0,3,5,0,4,4,4,4,5,3,1,3,4,5,3,3,3,3,3,3,3,0,2,2,0,3,3,2,4,3,3,3,5,3,4,1,3,3,5,3,2,0,0,0,0,4,3,1,3,3),
(0,1,0,3,0,3,0,1,0,1,3,3,3,2,3,3,3,0,3,0,0,0,3,1,3,0,0,0,2,2,2,3,0,0,3,2,0,1,2,4,1,3,3,0,0,3,3,3,0,1,0,0,2,1,0,0,3,0,3,1,0,3,0,0,1,3,0,2,0,1,0,3,3,1,3,3,0,0,1,1,0,3,3),
(0,2,0,3,0,2,1,4,0,2,2,3,1,1,3,1,1,0,2,0,3,1,2,3,1,3,0,0,1,0,4,3,2,3,3,3,1,4,2,3,3,3,3,1,0,3,1,4,0,1,1,0,1,2,0,1,1,0,1,1,0,3,1,3,2,2,0,1,0,0,0,2,3,3,3,1,0,0,0,0,0,2,3),
(0,5,0,4,0,5,0,2,0,4,5,5,3,3,4,3,3,1,5,4,4,2,4,4,4,3,4,2,4,3,5,5,4,3,3,4,3,3,5,5,4,5,5,1,3,4,5,3,1,4,3,1,3,3,0,3,3,1,4,3,1,4,5,3,3,5,0,4,0,3,0,5,3,3,1,4,3,0,4,0,1,5,3),
(0,5,0,5,0,4,0,2,0,4,4,3,4,3,3,3,3,3,5,4,4,4,4,4,4,5,3,3,5,2,4,4,4,3,4,4,3,3,4,4,5,5,3,3,4,3,4,3,3,4,3,3,3,3,1,2,2,1,4,3,3,5,4,4,3,4,0,4,0,3,0,4,4,4,4,4,1,0,4,2,0,2,4),
(0,4,0,4,0,3,0,1,0,3,5,2,3,0,3,0,2,1,4,2,3,3,4,1,4,3,3,2,4,1,3,3,3,0,3,3,0,0,3,3,3,5,3,3,3,3,3,2,0,2,0,0,2,0,0,2,0,0,1,0,0,3,1,2,2,3,0,3,0,2,0,4,4,3,3,4,1,0,3,0,0,2,4),
(0,0,0,4,0,0,0,0,0,0,1,0,1,0,2,0,0,0,0,0,1,0,2,0,1,0,0,0,0,0,3,1,3,0,3,2,0,0,0,1,0,3,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,0,2,0,0,0,0,0,0,2),
(0,2,1,3,0,2,0,2,0,3,3,3,3,1,3,1,3,3,3,3,3,3,4,2,2,1,2,1,4,0,4,3,1,3,3,3,2,4,3,5,4,3,3,3,3,3,3,3,0,1,3,0,2,0,0,1,0,0,1,0,0,4,2,0,2,3,0,3,3,0,3,3,4,2,3,1,4,0,1,2,0,2,3),
(0,3,0,3,0,1,0,3,0,2,3,3,3,0,3,1,2,0,3,3,2,3,3,2,3,2,3,1,3,0,4,3,2,0,3,3,1,4,3,3,2,3,4,3,1,3,3,1,1,0,1,1,0,1,0,1,0,1,0,0,0,4,1,1,0,3,0,3,1,0,2,3,3,3,3,3,1,0,0,2,0,3,3),
(0,0,0,0,0,0,0,0,0,0,3,0,2,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,3,0,3,0,3,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,2,0,2,3,0,0,0,0,0,0,0,0,3),
(0,2,0,3,1,3,0,3,0,2,3,3,3,1,3,1,3,1,3,1,3,3,3,1,3,0,2,3,1,1,4,3,3,2,3,3,1,2,2,4,1,3,3,0,1,4,2,3,0,1,3,0,3,0,0,1,3,0,2,0,0,3,3,2,1,3,0,3,0,2,0,3,4,4,4,3,1,0,3,0,0,3,3),
(0,2,0,1,0,2,0,0,0,1,3,2,2,1,3,0,1,1,3,0,3,2,3,1,2,0,2,0,1,1,3,3,3,0,3,3,1,1,2,3,2,3,3,1,2,3,2,0,0,1,0,0,0,0,0,0,3,0,1,0,0,2,1,2,1,3,0,3,0,0,0,3,4,4,4,3,2,0,2,0,0,2,4),
(0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,2,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,3,1,0,0,0,0,0,0,0,3),
(0,3,0,3,0,2,0,3,0,3,3,3,2,3,2,2,2,0,3,1,3,3,3,2,3,3,0,0,3,0,3,2,2,0,2,3,1,4,3,4,3,3,2,3,1,5,4,4,0,3,1,2,1,3,0,3,1,1,2,0,2,3,1,3,1,3,0,3,0,1,0,3,3,4,4,2,1,0,2,1,0,2,4),
(0,1,0,3,0,1,0,2,0,1,4,2,5,1,4,0,2,0,2,1,3,1,4,0,2,1,0,0,2,1,4,1,1,0,3,3,0,5,1,3,2,3,3,1,0,3,2,3,0,1,0,0,0,0,0,0,1,0,0,0,0,4,0,1,0,3,0,2,0,1,0,3,3,3,4,3,3,0,0,0,0,2,3),
(0,0,0,1,0,0,0,0,0,0,2,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,1,0,0,0,0,0,3),
(0,1,0,3,0,4,0,3,0,2,4,3,1,0,3,2,2,1,3,1,2,2,3,1,1,1,2,1,3,0,1,2,0,1,3,2,1,3,0,5,5,1,0,0,1,3,2,1,0,3,0,0,1,0,0,0,0,0,3,4,0,1,1,1,3,2,0,2,0,1,0,2,3,3,1,2,3,0,1,0,1,0,4),
(0,0,0,1,0,3,0,3,0,2,2,1,0,0,4,0,3,0,3,1,3,0,3,0,3,0,1,0,3,0,3,1,3,0,3,3,0,0,1,2,1,1,1,0,1,2,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,2,2,1,2,0,0,2,0,0,0,0,2,3,3,3,3,0,0,0,0,1,4),
(0,0,0,3,0,3,0,0,0,0,3,1,1,0,3,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,3,0,2,0,2,3,0,0,2,2,3,1,2,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,2,0,0,0,0,2,3),
(2,4,0,5,0,5,0,4,0,3,4,3,3,3,4,3,3,3,4,3,4,4,5,4,5,5,5,2,3,0,5,5,4,1,5,4,3,1,5,4,3,4,4,3,3,4,3,3,0,3,2,0,2,3,0,3,0,0,3,3,0,5,3,2,3,3,0,3,0,3,0,3,4,5,4,5,3,0,4,3,0,3,4),
(0,3,0,3,0,3,0,3,0,3,3,4,3,2,3,2,3,0,4,3,3,3,3,3,3,3,3,0,3,2,4,3,3,1,3,4,3,4,4,4,3,4,4,3,2,4,4,1,0,2,0,0,1,1,0,2,0,0,3,1,0,5,3,2,1,3,0,3,0,1,2,4,3,2,4,3,3,0,3,2,0,4,4),
(0,3,0,3,0,1,0,0,0,1,4,3,3,2,3,1,3,1,4,2,3,2,4,2,3,4,3,0,2,2,3,3,3,0,3,3,3,0,3,4,1,3,3,0,3,4,3,3,0,1,1,0,1,0,0,0,4,0,3,0,0,3,1,2,1,3,0,4,0,1,0,4,3,3,4,3,3,0,2,0,0,3,3),
(0,3,0,4,0,1,0,3,0,3,4,3,3,0,3,3,3,1,3,1,3,3,4,3,3,3,0,0,3,1,5,3,3,1,3,3,2,5,4,3,3,4,5,3,2,5,3,4,0,1,0,0,0,0,0,2,0,0,1,1,0,4,2,2,1,3,0,3,0,2,0,4,4,3,5,3,2,0,1,1,0,3,4),
(0,5,0,4,0,5,0,2,0,4,4,3,3,2,3,3,3,1,4,3,4,1,5,3,4,3,4,0,4,2,4,3,4,1,5,4,0,4,4,4,4,5,4,1,3,5,4,2,1,4,1,1,3,2,0,3,1,0,3,2,1,4,3,3,3,4,0,4,0,3,0,4,4,4,3,3,3,0,4,2,0,3,4),
(1,4,0,4,0,3,0,1,0,3,3,3,1,1,3,3,2,2,3,3,1,0,3,2,2,1,2,0,3,1,2,1,2,0,3,2,0,2,2,3,3,4,3,0,3,3,1,2,0,1,1,3,1,2,0,0,3,0,1,1,0,3,2,2,3,3,0,3,0,0,0,2,3,3,4,3,3,0,1,0,0,1,4),
(0,4,0,4,0,4,0,0,0,3,4,4,3,1,4,2,3,2,3,3,3,1,4,3,4,0,3,0,4,2,3,3,2,2,5,4,2,1,3,4,3,4,3,1,3,3,4,2,0,2,1,0,3,3,0,0,2,0,3,1,0,4,4,3,4,3,0,4,0,1,0,2,4,4,4,4,4,0,3,2,0,3,3),
(0,0,0,1,0,4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,3,2,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,2),
(0,2,0,3,0,4,0,4,0,1,3,3,3,0,4,0,2,1,2,1,1,1,2,0,3,1,1,0,1,0,3,1,0,0,3,3,2,0,1,1,0,0,0,0,0,1,0,2,0,2,2,0,3,1,0,0,1,0,1,1,0,1,2,0,3,0,0,0,0,1,0,0,3,3,4,3,1,0,1,0,3,0,2),
(0,0,0,3,0,5,0,0,0,0,1,0,2,0,3,1,0,1,3,0,0,0,2,0,0,0,1,0,0,0,1,1,0,0,4,0,0,0,2,3,0,1,4,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,3,0,0,0,0,0,3),
(0,2,0,5,0,5,0,1,0,2,4,3,3,2,5,1,3,2,3,3,3,0,4,1,2,0,3,0,4,0,2,2,1,1,5,3,0,0,1,4,2,3,2,0,3,3,3,2,0,2,4,1,1,2,0,1,1,0,3,1,0,1,3,1,2,3,0,2,0,0,0,1,3,5,4,4,4,0,3,0,0,1,3),
(0,4,0,5,0,4,0,4,0,4,5,4,3,3,4,3,3,3,4,3,4,4,5,3,4,5,4,2,4,2,3,4,3,1,4,4,1,3,5,4,4,5,5,4,4,5,5,5,2,3,3,1,4,3,1,3,3,0,3,3,1,4,3,4,4,4,0,3,0,4,0,3,3,4,4,5,0,0,4,3,0,4,5),
(0,4,0,4,0,3,0,3,0,3,4,4,4,3,3,2,4,3,4,3,4,3,5,3,4,3,2,1,4,2,4,4,3,1,3,4,2,4,5,5,3,4,5,4,1,5,4,3,0,3,2,2,3,2,1,3,1,0,3,3,3,5,3,3,3,5,4,4,2,3,3,4,3,3,3,2,1,0,3,2,1,4,3),
(0,4,0,5,0,4,0,3,0,3,5,5,3,2,4,3,4,0,5,4,4,1,4,4,4,3,3,3,4,3,5,5,2,3,3,4,1,2,5,5,3,5,5,2,3,5,5,4,0,3,2,0,3,3,1,1,5,1,4,1,0,4,3,2,3,5,0,4,0,3,0,5,4,3,4,3,0,0,4,1,0,4,4),
(1,3,0,4,0,2,0,2,0,2,5,5,3,3,3,3,3,0,4,2,3,4,4,4,3,4,0,0,3,4,5,4,3,3,3,3,2,5,5,4,5,5,5,4,3,5,5,5,1,3,1,0,1,0,0,3,2,0,4,2,0,5,2,3,2,4,1,3,0,3,0,4,5,4,5,4,3,0,4,2,0,5,4),
(0,3,0,4,0,5,0,3,0,3,4,4,3,2,3,2,3,3,3,3,3,2,4,3,3,2,2,0,3,3,3,3,3,1,3,3,3,0,4,4,3,4,4,1,1,4,4,2,0,3,1,0,1,1,0,4,1,0,2,3,1,3,3,1,3,4,0,3,0,1,0,3,1,3,0,0,1,0,2,0,0,4,4),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,3,0,3,0,2,0,3,0,1,5,4,3,3,3,1,4,2,1,2,3,4,4,2,4,4,5,0,3,1,4,3,4,0,4,3,3,3,2,3,2,5,3,4,3,2,2,3,0,0,3,0,2,1,0,1,2,0,0,0,0,2,1,1,3,1,0,2,0,4,0,3,4,4,4,5,2,0,2,0,0,1,3),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,0,0,1,1,0,0,0,4,2,1,1,0,1,0,3,2,0,0,3,1,1,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,1,0,0,0,2,0,0,0,1,4,0,4,2,1,0,0,0,0,0,1),
(0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,3,1,0,0,0,2,0,2,1,0,0,1,2,1,0,1,1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,1,3,1,0,0,0,0,0,1,0,0,2,1,0,0,0,0,0,0,0,0,2),
(0,4,0,4,0,4,0,3,0,4,4,3,4,2,4,3,2,0,4,4,4,3,5,3,5,3,3,2,4,2,4,3,4,3,1,4,0,2,3,4,4,4,3,3,3,4,4,4,3,4,1,3,4,3,2,1,2,1,3,3,3,4,4,3,3,5,0,4,0,3,0,4,3,3,3,2,1,0,3,0,0,3,3),
(0,4,0,3,0,3,0,3,0,3,5,5,3,3,3,3,4,3,4,3,3,3,4,4,4,3,3,3,3,4,3,5,3,3,1,3,2,4,5,5,5,5,4,3,4,5,5,3,2,2,3,3,3,3,2,3,3,1,2,3,2,4,3,3,3,4,0,4,0,2,0,4,3,2,2,1,2,0,3,0,0,4,1),
)

class JapaneseContextAnalysis:
    def __init__(self):
        self.reset()

    def reset(self):
        self._mTotalRel = 0  # total sequence received
        # category counters, each interger counts sequence in its category
        self._mRelSample = [0] * NUM_OF_CATEGORY
        # if last byte in current buffer is not the last byte of a character,
        # we need to know how many bytes to skip in next buffer
        self._mNeedToSkipCharNum = 0
        self._mLastCharOrder = -1  # The order of previous char
        # If this flag is set to True, detection is done and conclusion has
        # been made
        self._mDone = False

    def feed(self, aBuf, aLen):
        if self._mDone:
            return

        # The buffer we got is byte oriented, and a character may span in more than one
        # buffers. In case the last one or two byte in last buffer is not
        # complete, we record how many byte needed to complete that character
        # and skip these bytes here.  We can choose to record those bytes as
        # well and analyse the character once it is complete, but since a
        # character will not make much difference, by simply skipping
        # this character will simply our logic and improve performance.
        i = self._mNeedToSkipCharNum
        while i < aLen:
            order, charLen = self.get_order(aBuf[i:i + 2])
            i += charLen
            if i > aLen:
                self._mNeedToSkipCharNum = i - aLen
                self._mLastCharOrder = -1
            else:
                if (order != -1) and (self._mLastCharOrder != -1):
                    self._mTotalRel += 1
                    if self._mTotalRel > MAX_REL_THRESHOLD:
                        self._mDone = True
                        break
                    self._mRelSample[jp2CharContext[self._mLastCharOrder][order]] += 1
                self._mLastCharOrder = order

    def got_enough_data(self):
        return self._mTotalRel > ENOUGH_REL_THRESHOLD

    def get_confidence(self):
        # This is just one way to calculate confidence. It works well for me.
        if self._mTotalRel > MINIMUM_DATA_THRESHOLD:
            return (self._mTotalRel - self._mRelSample[0]) / self._mTotalRel
        else:
            return DONT_KNOW

    def get_order(self, aBuf):
        return -1, 1

class SJISContextAnalysis(JapaneseContextAnalysis):
    def get_order(self, aBuf):
        if not aBuf:
            return -1, 1
        # find out current char's byte length
        first_char = wrap_ord(aBuf[0])
        if ((0x81 <= first_char <= 0x9F) or (0xE0 <= first_char <= 0xFC)):
            charLen = 2
        else:
            charLen = 1

        # return its order if it is hiragana
        if len(aBuf) > 1:
            second_char = wrap_ord(aBuf[1])
            if (first_char == 202) and (0x9F <= second_char <= 0xF1):
                return second_char - 0x9F, charLen

        return -1, charLen

class EUCJPContextAnalysis(JapaneseContextAnalysis):
    def get_order(self, aBuf):
        if not aBuf:
            return -1, 1
        # find out current char's byte length
        first_char = wrap_ord(aBuf[0])
        if (first_char == 0x8E) or (0xA1 <= first_char <= 0xFE):
            charLen = 2
        elif first_char == 0x8F:
            charLen = 3
        else:
            charLen = 1

        # return its order if it is hiragana
        if len(aBuf) > 1:
            second_char = wrap_ord(aBuf[1])
            if (first_char == 0xA4) and (0xA1 <= second_char <= 0xF3):
                return second_char - 0xA1, charLen

        return -1, charLen

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/__init__.py000064400000002417151733566760022460 0ustar00######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

__version__ = "2.2.1"
from sys import version_info


def detect(aBuf):
    if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or
            (version_info >= (3, 0) and not isinstance(aBuf, bytes))):
        raise ValueError('Expected a bytes object, not a unicode object')

    from . import universaldetector
    u = universaldetector.UniversalDetector()
    u.reset()
    u.feed(aBuf)
    u.close()
    return u.result
python3.3/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py000064400000131632151733566760022712 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Sampling from about 20M text materials include literature and computer technology

# 128  --> 0.79
# 256  --> 0.92
# 512  --> 0.986
# 1024 --> 0.99944
# 2048 --> 0.99999
#
# Idea Distribution Ratio = 0.98653 / (1-0.98653) = 73.24
# Random Distribution Ration = 512 / (2350-512) = 0.279.
# 
# Typical Distribution Ratio  

EUCKR_TYPICAL_DISTRIBUTION_RATIO = 6.0

EUCKR_TABLE_SIZE = 2352

# Char to FreqOrder table , 
EUCKRCharToFreqOrder = ( \
  13, 130, 120,1396, 481,1719,1720, 328, 609, 212,1721, 707, 400, 299,1722,  87,
1397,1723, 104, 536,1117,1203,1724,1267, 685,1268, 508,1725,1726,1727,1728,1398,
1399,1729,1730,1731, 141, 621, 326,1057, 368,1732, 267, 488,  20,1733,1269,1734,
 945,1400,1735,  47, 904,1270,1736,1737, 773, 248,1738, 409, 313, 786, 429,1739,
 116, 987, 813,1401, 683,  75,1204, 145,1740,1741,1742,1743,  16, 847, 667, 622,
 708,1744,1745,1746, 966, 787, 304, 129,1747,  60, 820, 123, 676,1748,1749,1750,
1751, 617,1752, 626,1753,1754,1755,1756, 653,1757,1758,1759,1760,1761,1762, 856,
 344,1763,1764,1765,1766,  89, 401, 418, 806, 905, 848,1767,1768,1769, 946,1205,
 709,1770,1118,1771, 241,1772,1773,1774,1271,1775, 569,1776, 999,1777,1778,1779,
1780, 337, 751,1058,  28, 628, 254,1781, 177, 906, 270, 349, 891,1079,1782,  19,
1783, 379,1784, 315,1785, 629, 754,1402, 559,1786, 636, 203,1206,1787, 710, 567,
1788, 935, 814,1789,1790,1207, 766, 528,1791,1792,1208,1793,1794,1795,1796,1797,
1403,1798,1799, 533,1059,1404,1405,1156,1406, 936, 884,1080,1800, 351,1801,1802,
1803,1804,1805, 801,1806,1807,1808,1119,1809,1157, 714, 474,1407,1810, 298, 899,
 885,1811,1120, 802,1158,1812, 892,1813,1814,1408, 659,1815,1816,1121,1817,1818,
1819,1820,1821,1822, 319,1823, 594, 545,1824, 815, 937,1209,1825,1826, 573,1409,
1022,1827,1210,1828,1829,1830,1831,1832,1833, 556, 722, 807,1122,1060,1834, 697,
1835, 900, 557, 715,1836,1410, 540,1411, 752,1159, 294, 597,1211, 976, 803, 770,
1412,1837,1838,  39, 794,1413, 358,1839, 371, 925,1840, 453, 661, 788, 531, 723,
 544,1023,1081, 869,  91,1841, 392, 430, 790, 602,1414, 677,1082, 457,1415,1416,
1842,1843, 475, 327,1024,1417, 795, 121,1844, 733, 403,1418,1845,1846,1847, 300,
 119, 711,1212, 627,1848,1272, 207,1849,1850, 796,1213, 382,1851, 519,1852,1083,
 893,1853,1854,1855, 367, 809, 487, 671,1856, 663,1857,1858, 956, 471, 306, 857,
1859,1860,1160,1084,1861,1862,1863,1864,1865,1061,1866,1867,1868,1869,1870,1871,
 282,  96, 574,1872, 502,1085,1873,1214,1874, 907,1875,1876, 827, 977,1419,1420,
1421, 268,1877,1422,1878,1879,1880, 308,1881,   2, 537,1882,1883,1215,1884,1885,
 127, 791,1886,1273,1423,1887,  34, 336, 404, 643,1888, 571, 654, 894, 840,1889,
   0, 886,1274, 122, 575, 260, 908, 938,1890,1275, 410, 316,1891,1892, 100,1893,
1894,1123,  48,1161,1124,1025,1895, 633, 901,1276,1896,1897, 115, 816,1898, 317,
1899, 694,1900, 909, 734,1424, 572, 866,1425, 691,  85, 524,1010, 543, 394, 841,
1901,1902,1903,1026,1904,1905,1906,1907,1908,1909,  30, 451, 651, 988, 310,1910,
1911,1426, 810,1216,  93,1912,1913,1277,1217,1914, 858, 759,  45,  58, 181, 610,
 269,1915,1916, 131,1062, 551, 443,1000, 821,1427, 957, 895,1086,1917,1918, 375,
1919, 359,1920, 687,1921, 822,1922, 293,1923,1924,  40, 662, 118, 692,  29, 939,
 887, 640, 482, 174,1925,  69,1162, 728,1428, 910,1926,1278,1218,1279, 386, 870,
 217, 854,1163, 823,1927,1928,1929,1930, 834,1931,  78,1932, 859,1933,1063,1934,
1935,1936,1937, 438,1164, 208, 595,1938,1939,1940,1941,1219,1125,1942, 280, 888,
1429,1430,1220,1431,1943,1944,1945,1946,1947,1280, 150, 510,1432,1948,1949,1950,
1951,1952,1953,1954,1011,1087,1955,1433,1043,1956, 881,1957, 614, 958,1064,1065,
1221,1958, 638,1001, 860, 967, 896,1434, 989, 492, 553,1281,1165,1959,1282,1002,
1283,1222,1960,1961,1962,1963,  36, 383, 228, 753, 247, 454,1964, 876, 678,1965,
1966,1284, 126, 464, 490, 835, 136, 672, 529, 940,1088,1435, 473,1967,1968, 467,
  50, 390, 227, 587, 279, 378, 598, 792, 968, 240, 151, 160, 849, 882,1126,1285,
 639,1044, 133, 140, 288, 360, 811, 563,1027, 561, 142, 523,1969,1970,1971,   7,
 103, 296, 439, 407, 506, 634, 990,1972,1973,1974,1975, 645,1976,1977,1978,1979,
1980,1981, 236,1982,1436,1983,1984,1089, 192, 828, 618, 518,1166, 333,1127,1985,
 818,1223,1986,1987,1988,1989,1990,1991,1992,1993, 342,1128,1286, 746, 842,1994,
1995, 560, 223,1287,  98,   8, 189, 650, 978,1288,1996,1437,1997,  17, 345, 250,
 423, 277, 234, 512, 226,  97, 289,  42, 167,1998, 201,1999,2000, 843, 836, 824,
 532, 338, 783,1090, 182, 576, 436,1438,1439, 527, 500,2001, 947, 889,2002,2003,
2004,2005, 262, 600, 314, 447,2006, 547,2007, 693, 738,1129,2008,  71,1440, 745,
 619, 688,2009, 829,2010,2011, 147,2012,  33, 948,2013,2014,  74, 224,2015,  61,
 191, 918, 399, 637,2016,1028,1130, 257, 902,2017,2018,2019,2020,2021,2022,2023,
2024,2025,2026, 837,2027,2028,2029,2030, 179, 874, 591,  52, 724, 246,2031,2032,
2033,2034,1167, 969,2035,1289, 630, 605, 911,1091,1168,2036,2037,2038,1441, 912,
2039, 623,2040,2041, 253,1169,1290,2042,1442, 146, 620, 611, 577, 433,2043,1224,
 719,1170, 959, 440, 437, 534,  84, 388, 480,1131, 159, 220, 198, 679,2044,1012,
 819,1066,1443, 113,1225, 194, 318,1003,1029,2045,2046,2047,2048,1067,2049,2050,
2051,2052,2053,  59, 913, 112,2054, 632,2055, 455, 144, 739,1291,2056, 273, 681,
 499,2057, 448,2058,2059, 760,2060,2061, 970, 384, 169, 245,1132,2062,2063, 414,
1444,2064,2065,  41, 235,2066, 157, 252, 877, 568, 919, 789, 580,2067, 725,2068,
2069,1292,2070,2071,1445,2072,1446,2073,2074,  55, 588,  66,1447, 271,1092,2075,
1226,2076, 960,1013, 372,2077,2078,2079,2080,2081,1293,2082,2083,2084,2085, 850,
2086,2087,2088,2089,2090, 186,2091,1068, 180,2092,2093,2094, 109,1227, 522, 606,
2095, 867,1448,1093, 991,1171, 926, 353,1133,2096, 581,2097,2098,2099,1294,1449,
1450,2100, 596,1172,1014,1228,2101,1451,1295,1173,1229,2102,2103,1296,1134,1452,
 949,1135,2104,2105,1094,1453,1454,1455,2106,1095,2107,2108,2109,2110,2111,2112,
2113,2114,2115,2116,2117, 804,2118,2119,1230,1231, 805,1456, 405,1136,2120,2121,
2122,2123,2124, 720, 701,1297, 992,1457, 927,1004,2125,2126,2127,2128,2129,2130,
  22, 417,2131, 303,2132, 385,2133, 971, 520, 513,2134,1174,  73,1096, 231, 274,
 962,1458, 673,2135,1459,2136, 152,1137,2137,2138,2139,2140,1005,1138,1460,1139,
2141,2142,2143,2144,  11, 374, 844,2145, 154,1232,  46,1461,2146, 838, 830, 721,
1233, 106,2147,  90, 428, 462, 578, 566,1175, 352,2148,2149, 538,1234, 124,1298,
2150,1462, 761, 565,2151, 686,2152, 649,2153,  72, 173,2154, 460, 415,2155,1463,
2156,1235, 305,2157,2158,2159,2160,2161,2162, 579,2163,2164,2165,2166,2167, 747,
2168,2169,2170,2171,1464, 669,2172,2173,2174,2175,2176,1465,2177,  23, 530, 285,
2178, 335, 729,2179, 397,2180,2181,2182,1030,2183,2184, 698,2185,2186, 325,2187,
2188, 369,2189, 799,1097,1015, 348,2190,1069, 680,2191, 851,1466,2192,2193,  10,
2194, 613, 424,2195, 979, 108, 449, 589,  27, 172,  81,1031,  80, 774, 281, 350,
1032, 525, 301, 582,1176,2196, 674,1045,2197,2198,1467, 730, 762,2199,2200,2201,
2202,1468,2203, 993,2204,2205, 266,1070, 963,1140,2206,2207,2208, 664,1098, 972,
2209,2210,2211,1177,1469,1470, 871,2212,2213,2214,2215,2216,1471,2217,2218,2219,
2220,2221,2222,2223,2224,2225,2226,2227,1472,1236,2228,2229,2230,2231,2232,2233,
2234,2235,1299,2236,2237, 200,2238, 477, 373,2239,2240, 731, 825, 777,2241,2242,
2243, 521, 486, 548,2244,2245,2246,1473,1300,  53, 549, 137, 875,  76, 158,2247,
1301,1474, 469, 396,1016, 278, 712,2248, 321, 442, 503, 767, 744, 941,1237,1178,
1475,2249,  82, 178,1141,1179, 973,2250,1302,2251, 297,2252,2253, 570,2254,2255,
2256,  18, 450, 206,2257, 290, 292,1142,2258, 511, 162,  99, 346, 164, 735,2259,
1476,1477,   4, 554, 343, 798,1099,2260,1100,2261,  43, 171,1303, 139, 215,2262,
2263, 717, 775,2264,1033, 322, 216,2265, 831,2266, 149,2267,1304,2268,2269, 702,
1238, 135, 845, 347, 309,2270, 484,2271, 878, 655, 238,1006,1478,2272,  67,2273,
 295,2274,2275, 461,2276, 478, 942, 412,2277,1034,2278,2279,2280, 265,2281, 541,
2282,2283,2284,2285,2286,  70, 852,1071,2287,2288,2289,2290,  21,  56, 509, 117,
 432,2291,2292, 331, 980, 552,1101, 148, 284, 105, 393,1180,1239, 755,2293, 187,
2294,1046,1479,2295, 340,2296,  63,1047, 230,2297,2298,1305, 763,1306, 101, 800,
 808, 494,2299,2300,2301, 903,2302,  37,1072,  14,   5,2303,  79, 675,2304, 312,
2305,2306,2307,2308,2309,1480,   6,1307,2310,2311,2312,   1, 470,  35,  24, 229,
2313, 695, 210,  86, 778,  15, 784, 592, 779,  32,  77, 855, 964,2314, 259,2315,
 501, 380,2316,2317,  83, 981, 153, 689,1308,1481,1482,1483,2318,2319, 716,1484,
2320,2321,2322,2323,2324,2325,1485,2326,2327, 128,  57,  68, 261,1048, 211, 170,
1240,  31,2328,  51, 435, 742,2329,2330,2331, 635,2332, 264, 456,2333,2334,2335,
 425,2336,1486, 143, 507, 263, 943,2337, 363, 920,1487, 256,1488,1102, 243, 601,
1489,2338,2339,2340,2341,2342,2343,2344, 861,2345,2346,2347,2348,2349,2350, 395,
2351,1490,1491,  62, 535, 166, 225,2352,2353, 668, 419,1241, 138, 604, 928,2354,
1181,2355,1492,1493,2356,2357,2358,1143,2359, 696,2360, 387, 307,1309, 682, 476,
2361,2362, 332,  12, 222, 156,2363, 232,2364, 641, 276, 656, 517,1494,1495,1035,
 416, 736,1496,2365,1017, 586,2366,2367,2368,1497,2369, 242,2370,2371,2372,1498,
2373, 965, 713,2374,2375,2376,2377, 740, 982,1499, 944,1500,1007,2378,2379,1310,
1501,2380,2381,2382, 785, 329,2383,2384,1502,2385,2386,2387, 932,2388,1503,2389,
2390,2391,2392,1242,2393,2394,2395,2396,2397, 994, 950,2398,2399,2400,2401,1504,
1311,2402,2403,2404,2405,1049, 749,2406,2407, 853, 718,1144,1312,2408,1182,1505,
2409,2410, 255, 516, 479, 564, 550, 214,1506,1507,1313, 413, 239, 444, 339,1145,
1036,1508,1509,1314,1037,1510,1315,2411,1511,2412,2413,2414, 176, 703, 497, 624,
 593, 921, 302,2415, 341, 165,1103,1512,2416,1513,2417,2418,2419, 376,2420, 700,
2421,2422,2423, 258, 768,1316,2424,1183,2425, 995, 608,2426,2427,2428,2429, 221,
2430,2431,2432,2433,2434,2435,2436,2437, 195, 323, 726, 188, 897, 983,1317, 377,
 644,1050, 879,2438, 452,2439,2440,2441,2442,2443,2444, 914,2445,2446,2447,2448,
 915, 489,2449,1514,1184,2450,2451, 515,  64, 427, 495,2452, 583,2453, 483, 485,
1038, 562, 213,1515, 748, 666,2454,2455,2456,2457, 334,2458, 780, 996,1008, 705,
1243,2459,2460,2461,2462,2463, 114,2464, 493,1146, 366, 163,1516, 961,1104,2465,
 291,2466,1318,1105,2467,1517, 365,2468, 355, 951,1244,2469,1319,2470, 631,2471,
2472, 218,1320, 364, 320, 756,1518,1519,1321,1520,1322,2473,2474,2475,2476, 997,
2477,2478,2479,2480, 665,1185,2481, 916,1521,2482,2483,2484, 584, 684,2485,2486,
 797,2487,1051,1186,2488,2489,2490,1522,2491,2492, 370,2493,1039,1187,  65,2494,
 434, 205, 463,1188,2495, 125, 812, 391, 402, 826, 699, 286, 398, 155, 781, 771,
 585,2496, 590, 505,1073,2497, 599, 244, 219, 917,1018, 952, 646,1523,2498,1323,
2499,2500,  49, 984, 354, 741,2501, 625,2502,1324,2503,1019, 190, 357, 757, 491,
  95, 782, 868,2504,2505,2506,2507,2508,2509, 134,1524,1074, 422,1525, 898,2510,
 161,2511,2512,2513,2514, 769,2515,1526,2516,2517, 411,1325,2518, 472,1527,2519,
2520,2521,2522,2523,2524, 985,2525,2526,2527,2528,2529,2530, 764,2531,1245,2532,
2533,  25, 204, 311,2534, 496,2535,1052,2536,2537,2538,2539,2540,2541,2542, 199,
 704, 504, 468, 758, 657,1528, 196,  44, 839,1246, 272, 750,2543, 765, 862,2544,
2545,1326,2546, 132, 615, 933,2547, 732,2548,2549,2550,1189,1529,2551, 283,1247,
1053, 607, 929,2552,2553,2554, 930, 183, 872, 616,1040,1147,2555,1148,1020, 441,
 249,1075,2556,2557,2558, 466, 743,2559,2560,2561,  92, 514, 426, 420, 526,2562,
2563,2564,2565,2566,2567,2568, 185,2569,2570,2571,2572, 776,1530, 658,2573, 362,
2574, 361, 922,1076, 793,2575,2576,2577,2578,2579,2580,1531, 251,2581,2582,2583,
2584,1532,  54, 612, 237,1327,2585,2586, 275, 408, 647, 111,2587,1533,1106, 465,
   3, 458,   9,  38,2588, 107, 110, 890, 209,  26, 737, 498,2589,1534,2590, 431,
 202,  88,1535, 356, 287,1107, 660,1149,2591, 381,1536, 986,1150, 445,1248,1151,
 974,2592,2593, 846,2594, 446, 953, 184,1249,1250, 727,2595, 923, 193, 883,2596,
2597,2598, 102, 324, 539, 817,2599, 421,1041,2600, 832,2601,  94, 175, 197, 406,
2602, 459,2603,2604,2605,2606,2607, 330, 555,2608,2609,2610, 706,1108, 389,2611,
2612,2613,2614, 233,2615, 833, 558, 931, 954,1251,2616,2617,1537, 546,2618,2619,
1009,2620,2621,2622,1538, 690,1328,2623, 955,2624,1539,2625,2626, 772,2627,2628,
2629,2630,2631, 924, 648, 863, 603,2632,2633, 934,1540, 864, 865,2634, 642,1042,
 670,1190,2635,2636,2637,2638, 168,2639, 652, 873, 542,1054,1541,2640,2641,2642,  # 512, 256
#Everything below is of no interest for detection purpose
2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,
2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,
2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,
2691,2692,2693,2694,2695,2696,2697,2698,2699,1542, 880,2700,2701,2702,2703,2704,
2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,
2721,2722,2723,2724,2725,1543,2726,2727,2728,2729,2730,2731,2732,1544,2733,2734,
2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,
2751,2752,2753,2754,1545,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,
2766,1546,2767,1547,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,
2780,2781,2782,2783,2784,2785,2786,1548,2787,2788,2789,1109,2790,2791,2792,2793,
2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,
2810,2811,2812,1329,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,
2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,
2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,
1549,2857,2858,2859,2860,1550,2861,2862,1551,2863,2864,2865,2866,2867,2868,2869,
2870,2871,2872,2873,2874,1110,1330,2875,2876,2877,2878,2879,2880,2881,2882,2883,
2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,
2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,
2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,1331,
2931,2932,2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,1552,2944,2945,
2946,2947,2948,2949,2950,2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,
2962,2963,2964,1252,2965,2966,2967,2968,2969,2970,2971,2972,2973,2974,2975,2976,
2977,2978,2979,2980,2981,2982,2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,
2993,2994,2995,2996,2997,2998,2999,3000,3001,3002,3003,3004,3005,3006,3007,3008,
3009,3010,3011,3012,1553,3013,3014,3015,3016,3017,1554,3018,1332,3019,3020,3021,
3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,
3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,1555,3051,3052,
3053,1556,1557,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,
3067,1558,3068,3069,3070,3071,3072,3073,3074,3075,3076,1559,3077,3078,3079,3080,
3081,3082,3083,1253,3084,3085,3086,3087,3088,3089,3090,3091,3092,3093,3094,3095,
3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,1152,3109,3110,
3111,3112,3113,1560,3114,3115,3116,3117,1111,3118,3119,3120,3121,3122,3123,3124,
3125,3126,3127,3128,3129,3130,3131,3132,3133,3134,3135,3136,3137,3138,3139,3140,
3141,3142,3143,3144,3145,3146,3147,3148,3149,3150,3151,3152,3153,3154,3155,3156,
3157,3158,3159,3160,3161,3162,3163,3164,3165,3166,3167,3168,3169,3170,3171,3172,
3173,3174,3175,3176,1333,3177,3178,3179,3180,3181,3182,3183,3184,3185,3186,3187,
3188,3189,1561,3190,3191,1334,3192,3193,3194,3195,3196,3197,3198,3199,3200,3201,
3202,3203,3204,3205,3206,3207,3208,3209,3210,3211,3212,3213,3214,3215,3216,3217,
3218,3219,3220,3221,3222,3223,3224,3225,3226,3227,3228,3229,3230,3231,3232,3233,
3234,1562,3235,3236,3237,3238,3239,3240,3241,3242,3243,3244,3245,3246,3247,3248,
3249,3250,3251,3252,3253,3254,3255,3256,3257,3258,3259,3260,3261,3262,3263,3264,
3265,3266,3267,3268,3269,3270,3271,3272,3273,3274,3275,3276,3277,1563,3278,3279,
3280,3281,3282,3283,3284,3285,3286,3287,3288,3289,3290,3291,3292,3293,3294,3295,
3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,
3312,3313,3314,3315,3316,3317,3318,3319,3320,3321,3322,3323,3324,3325,3326,3327,
3328,3329,3330,3331,3332,3333,3334,3335,3336,3337,3338,3339,3340,3341,3342,3343,
3344,3345,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,
3360,3361,3362,3363,3364,1335,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,
3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3387,1336,3388,3389,
3390,3391,3392,3393,3394,3395,3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,
3406,3407,3408,3409,3410,3411,3412,3413,3414,1337,3415,3416,3417,3418,3419,1338,
3420,3421,3422,1564,1565,3423,3424,3425,3426,3427,3428,3429,3430,3431,1254,3432,
3433,3434,1339,3435,3436,3437,3438,3439,1566,3440,3441,3442,3443,3444,3445,3446,
3447,3448,3449,3450,3451,3452,3453,3454,1255,3455,3456,3457,3458,3459,1567,1191,
3460,1568,1569,3461,3462,3463,1570,3464,3465,3466,3467,3468,1571,3469,3470,3471,
3472,3473,1572,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,
1340,3487,3488,3489,3490,3491,3492,1021,3493,3494,3495,3496,3497,3498,1573,3499,
1341,3500,3501,3502,3503,3504,3505,3506,3507,3508,3509,3510,3511,1342,3512,3513,
3514,3515,3516,1574,1343,3517,3518,3519,1575,3520,1576,3521,3522,3523,3524,3525,
3526,3527,3528,3529,3530,3531,3532,3533,3534,3535,3536,3537,3538,3539,3540,3541,
3542,3543,3544,3545,3546,3547,3548,3549,3550,3551,3552,3553,3554,3555,3556,3557,
3558,3559,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3571,3572,3573,
3574,3575,3576,3577,3578,3579,3580,1577,3581,3582,1578,3583,3584,3585,3586,3587,
3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,
3604,1579,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,
3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,1580,3630,3631,1581,3632,
3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,3643,3644,3645,3646,3647,3648,
3649,3650,3651,3652,3653,3654,3655,3656,1582,3657,3658,3659,3660,3661,3662,3663,
3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,3676,3677,3678,3679,
3680,3681,3682,3683,3684,3685,3686,3687,3688,3689,3690,3691,3692,3693,3694,3695,
3696,3697,3698,3699,3700,1192,3701,3702,3703,3704,1256,3705,3706,3707,3708,1583,
1257,3709,3710,3711,3712,3713,3714,3715,3716,1584,3717,3718,3719,3720,3721,3722,
3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,
3739,3740,3741,3742,3743,3744,3745,1344,3746,3747,3748,3749,3750,3751,3752,3753,
3754,3755,3756,1585,3757,3758,3759,3760,3761,3762,3763,3764,3765,3766,1586,3767,
3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778,1345,3779,3780,3781,3782,
3783,3784,3785,3786,3787,3788,3789,3790,3791,3792,3793,3794,3795,1346,1587,3796,
3797,1588,3798,3799,3800,3801,3802,3803,3804,3805,3806,1347,3807,3808,3809,3810,
3811,1589,3812,3813,3814,3815,3816,3817,3818,3819,3820,3821,1590,3822,3823,1591,
1348,3824,3825,3826,3827,3828,3829,3830,1592,3831,3832,1593,3833,3834,3835,3836,
3837,3838,3839,3840,3841,3842,3843,3844,1349,3845,3846,3847,3848,3849,3850,3851,
3852,3853,3854,3855,3856,3857,3858,1594,3859,3860,3861,3862,3863,3864,3865,3866,
3867,3868,3869,1595,3870,3871,3872,3873,1596,3874,3875,3876,3877,3878,3879,3880,
3881,3882,3883,3884,3885,3886,1597,3887,3888,3889,3890,3891,3892,3893,3894,3895,
1598,3896,3897,3898,1599,1600,3899,1350,3900,1351,3901,3902,1352,3903,3904,3905,
3906,3907,3908,3909,3910,3911,3912,3913,3914,3915,3916,3917,3918,3919,3920,3921,
3922,3923,3924,1258,3925,3926,3927,3928,3929,3930,3931,1193,3932,1601,3933,3934,
3935,3936,3937,3938,3939,3940,3941,3942,3943,1602,3944,3945,3946,3947,3948,1603,
3949,3950,3951,3952,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,
3965,1604,3966,3967,3968,3969,3970,3971,3972,3973,3974,3975,3976,3977,1353,3978,
3979,3980,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,1354,3992,3993,
3994,3995,3996,3997,3998,3999,4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,
4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,1355,4024,
4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,
1605,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,
4056,4057,4058,4059,4060,1606,4061,4062,4063,4064,1607,4065,4066,4067,4068,4069,
4070,4071,4072,4073,4074,4075,4076,1194,4077,4078,1608,4079,4080,4081,4082,4083,
4084,4085,4086,4087,1609,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,
4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,1259,4109,4110,4111,4112,4113,
4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,1195,4125,4126,4127,1610,
4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,1356,4138,4139,4140,4141,4142,
4143,4144,1611,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,
4158,4159,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4170,4171,4172,4173,
4174,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4189,
4190,4191,4192,4193,4194,4195,4196,4197,4198,4199,4200,4201,4202,4203,4204,4205,
4206,4207,4208,4209,4210,4211,4212,4213,4214,4215,4216,4217,4218,4219,1612,4220,
4221,4222,4223,4224,4225,4226,4227,1357,4228,1613,4229,4230,4231,4232,4233,4234,
4235,4236,4237,4238,4239,4240,4241,4242,4243,1614,4244,4245,4246,4247,4248,4249,
4250,4251,4252,4253,4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,
4266,4267,4268,4269,4270,1196,1358,4271,4272,4273,4274,4275,4276,4277,4278,4279,
4280,4281,4282,4283,4284,4285,4286,4287,1615,4288,4289,4290,4291,4292,4293,4294,
4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307,4308,4309,4310,
4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,
4327,4328,4329,4330,4331,4332,4333,4334,1616,4335,4336,4337,4338,4339,4340,4341,
4342,4343,4344,4345,4346,4347,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,
4358,4359,4360,1617,4361,4362,4363,4364,4365,1618,4366,4367,4368,4369,4370,4371,
4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,
4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,
4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,1619,4417,4418,
4419,4420,4421,4422,4423,4424,4425,1112,4426,4427,4428,4429,4430,1620,4431,4432,
4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,1260,1261,4443,4444,4445,4446,
4447,4448,4449,4450,4451,4452,4453,4454,4455,1359,4456,4457,4458,4459,4460,4461,
4462,4463,4464,4465,1621,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,
4477,4478,4479,4480,4481,4482,4483,4484,4485,4486,4487,4488,4489,1055,4490,4491,
4492,4493,4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,
4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,1622,4519,4520,4521,1623,
4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,1360,4536,
4537,4538,4539,4540,4541,4542,4543, 975,4544,4545,4546,4547,4548,4549,4550,4551,
4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,
4568,4569,4570,4571,1624,4572,4573,4574,4575,4576,1625,4577,4578,4579,4580,4581,
4582,4583,4584,1626,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,1627,
4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,
4612,4613,4614,4615,1628,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,
4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,
4643,4644,4645,4646,4647,4648,4649,1361,4650,4651,4652,4653,4654,4655,4656,4657,
4658,4659,4660,4661,1362,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,
4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,1629,4683,4684,4685,4686,4687,
1630,4688,4689,4690,4691,1153,4692,4693,4694,1113,4695,4696,4697,4698,4699,4700,
4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,1197,4712,4713,4714,4715,
4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,
4732,4733,4734,4735,1631,4736,1632,4737,4738,4739,4740,4741,4742,4743,4744,1633,
4745,4746,4747,4748,4749,1262,4750,4751,4752,4753,4754,1363,4755,4756,4757,4758,
4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,1634,4769,4770,4771,4772,4773,
4774,4775,4776,4777,4778,1635,4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,
4789,1636,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4801,4802,4803,
4804,4805,4806,1637,4807,4808,4809,1638,4810,4811,4812,4813,4814,4815,4816,4817,
4818,1639,4819,4820,4821,4822,4823,4824,4825,4826,4827,4828,4829,4830,4831,4832,
4833,1077,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,
4848,4849,4850,4851,4852,4853,4854,4855,4856,4857,4858,4859,4860,4861,4862,4863,
4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874,4875,4876,4877,4878,4879,
4880,4881,4882,4883,1640,4884,4885,1641,4886,4887,4888,4889,4890,4891,4892,4893,
4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,
4910,4911,1642,4912,4913,4914,1364,4915,4916,4917,4918,4919,4920,4921,4922,4923,
4924,4925,4926,4927,4928,4929,4930,4931,1643,4932,4933,4934,4935,4936,4937,4938,
4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953,4954,
4955,4956,4957,4958,4959,4960,4961,4962,4963,4964,4965,4966,4967,4968,4969,4970,
4971,4972,4973,4974,4975,4976,4977,4978,4979,4980,1644,4981,4982,4983,4984,1645,
4985,4986,1646,4987,4988,4989,4990,4991,4992,4993,4994,4995,4996,4997,4998,4999,
5000,5001,5002,5003,5004,5005,1647,5006,1648,5007,5008,5009,5010,5011,5012,1078,
5013,5014,5015,5016,5017,5018,5019,5020,5021,5022,5023,5024,5025,5026,5027,5028,
1365,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039,1649,5040,5041,5042,
5043,5044,5045,1366,5046,5047,5048,5049,5050,5051,5052,5053,5054,5055,1650,5056,
5057,5058,5059,5060,5061,5062,5063,5064,5065,5066,5067,5068,5069,5070,5071,5072,
5073,5074,5075,5076,5077,1651,5078,5079,5080,5081,5082,5083,5084,5085,5086,5087,
5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102,5103,
5104,5105,5106,5107,5108,5109,5110,1652,5111,5112,5113,5114,5115,5116,5117,5118,
1367,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,1653,5130,5131,5132,
5133,5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,
5149,1368,5150,1654,5151,1369,5152,5153,5154,5155,5156,5157,5158,5159,5160,5161,
5162,5163,5164,5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,5176,5177,
5178,1370,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5189,5190,5191,5192,
5193,5194,5195,5196,5197,5198,1655,5199,5200,5201,5202,1656,5203,5204,5205,5206,
1371,5207,1372,5208,5209,5210,5211,1373,5212,5213,1374,5214,5215,5216,5217,5218,
5219,5220,5221,5222,5223,5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,
5235,5236,5237,5238,5239,5240,5241,5242,5243,5244,5245,5246,5247,1657,5248,5249,
5250,5251,1658,1263,5252,5253,5254,5255,5256,1375,5257,5258,5259,5260,5261,5262,
5263,5264,5265,5266,5267,5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,
5279,5280,5281,5282,5283,1659,5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,
5294,5295,5296,5297,5298,5299,5300,1660,5301,5302,5303,5304,5305,5306,5307,5308,
5309,5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,5320,5321,1376,5322,5323,
5324,5325,5326,5327,5328,5329,5330,5331,5332,5333,1198,5334,5335,5336,5337,5338,
5339,5340,5341,5342,5343,1661,5344,5345,5346,5347,5348,5349,5350,5351,5352,5353,
5354,5355,5356,5357,5358,5359,5360,5361,5362,5363,5364,5365,5366,5367,5368,5369,
5370,5371,5372,5373,5374,5375,5376,5377,5378,5379,5380,5381,5382,5383,5384,5385,
5386,5387,5388,5389,5390,5391,5392,5393,5394,5395,5396,5397,5398,1264,5399,5400,
5401,5402,5403,5404,5405,5406,5407,5408,5409,5410,5411,5412,1662,5413,5414,5415,
5416,1663,5417,5418,5419,5420,5421,5422,5423,5424,5425,5426,5427,5428,5429,5430,
5431,5432,5433,5434,5435,5436,5437,5438,1664,5439,5440,5441,5442,5443,5444,5445,
5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456,5457,5458,5459,5460,5461,
5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472,5473,5474,5475,5476,5477,
5478,1154,5479,5480,5481,5482,5483,5484,5485,1665,5486,5487,5488,5489,5490,5491,
5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504,5505,5506,5507,
5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520,5521,5522,5523,
5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537,5538,5539,
5540,5541,5542,5543,5544,5545,5546,5547,5548,1377,5549,5550,5551,5552,5553,5554,
5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568,5569,5570,
1114,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584,5585,
5586,5587,5588,5589,5590,5591,5592,1378,5593,5594,5595,5596,5597,5598,5599,5600,
5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,1379,5615,
5616,5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,
5632,5633,5634,1380,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,
5647,5648,5649,1381,1056,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,
1666,5661,5662,5663,5664,5665,5666,5667,5668,1667,5669,1668,5670,5671,5672,5673,
5674,5675,5676,5677,5678,1155,5679,5680,5681,5682,5683,5684,5685,5686,5687,5688,
5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,1669,5699,5700,5701,5702,5703,
5704,5705,1670,5706,5707,5708,5709,5710,1671,5711,5712,5713,5714,1382,5715,5716,
5717,5718,5719,5720,5721,5722,5723,5724,5725,1672,5726,5727,1673,1674,5728,5729,
5730,5731,5732,5733,5734,5735,5736,1675,5737,5738,5739,5740,5741,5742,5743,5744,
1676,5745,5746,5747,5748,5749,5750,5751,1383,5752,5753,5754,5755,5756,5757,5758,
5759,5760,5761,5762,5763,5764,5765,5766,5767,5768,1677,5769,5770,5771,5772,5773,
1678,5774,5775,5776, 998,5777,5778,5779,5780,5781,5782,5783,5784,5785,1384,5786,
5787,5788,5789,5790,5791,5792,5793,5794,5795,5796,5797,5798,5799,5800,1679,5801,
5802,5803,1115,1116,5804,5805,5806,5807,5808,5809,5810,5811,5812,5813,5814,5815,
5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828,5829,5830,5831,
5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844,5845,5846,5847,
5848,5849,5850,5851,5852,5853,5854,5855,1680,5856,5857,5858,5859,5860,5861,5862,
5863,5864,1681,5865,5866,5867,1682,5868,5869,5870,5871,5872,5873,5874,5875,5876,
5877,5878,5879,1683,5880,1684,5881,5882,5883,5884,1685,5885,5886,5887,5888,5889,
5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,
5906,5907,1686,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,
5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,1687,
5936,5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,
5952,1688,1689,5953,1199,5954,5955,5956,5957,5958,5959,5960,5961,1690,5962,5963,
5964,5965,5966,5967,5968,5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,
5980,5981,1385,5982,1386,5983,5984,5985,5986,5987,5988,5989,5990,5991,5992,5993,
5994,5995,5996,5997,5998,5999,6000,6001,6002,6003,6004,6005,6006,6007,6008,6009,
6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,
6026,6027,1265,6028,6029,1691,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,
6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052,6053,6054,6055,
6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068,6069,6070,6071,
6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084,1692,6085,6086,
6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100,6101,6102,
6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116,6117,6118,
6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,1693,6132,6133,
6134,6135,6136,1694,6137,6138,6139,6140,6141,1695,6142,6143,6144,6145,6146,6147,
6148,6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,
6164,6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179,
6180,6181,6182,6183,6184,6185,1696,6186,6187,6188,6189,6190,6191,6192,6193,6194,
6195,6196,6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,
6211,6212,6213,6214,6215,6216,6217,6218,6219,1697,6220,6221,6222,6223,6224,6225,
6226,6227,6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,
6242,6243,6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,1698,6254,6255,6256,
6257,6258,6259,6260,6261,6262,6263,1200,6264,6265,6266,6267,6268,6269,6270,6271,  #1024
6272,6273,6274,6275,6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,6286,6287,
6288,6289,6290,6291,6292,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,1699,
6303,6304,1700,6305,6306,6307,6308,6309,6310,6311,6312,6313,6314,6315,6316,6317,
6318,6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,
6334,6335,6336,6337,6338,6339,1701,6340,6341,6342,6343,6344,1387,6345,6346,6347,
6348,6349,6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,
6364,6365,6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,
6380,6381,6382,6383,6384,6385,6386,6387,6388,6389,6390,6391,6392,6393,6394,6395,
6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,
6412,6413,1702,6414,6415,6416,6417,6418,6419,6420,6421,6422,1703,6423,6424,6425,
6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,1704,6439,6440,
6441,6442,6443,6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,
6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,
6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488,
6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,1266,
6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516,6517,6518,6519,
6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532,6533,6534,6535,
6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548,6549,6550,6551,
1705,1706,6552,6553,6554,6555,6556,6557,6558,6559,6560,6561,6562,6563,6564,6565,
6566,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,
6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,
6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610,6611,6612,6613,
6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,
6630,6631,6632,6633,6634,6635,6636,6637,1388,6638,6639,6640,6641,6642,6643,6644,
1707,6645,6646,6647,6648,6649,6650,6651,6652,6653,6654,6655,6656,6657,6658,6659,
6660,6661,6662,6663,1708,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,
1201,6675,6676,6677,6678,6679,6680,6681,6682,6683,6684,6685,6686,6687,6688,6689,
6690,6691,6692,6693,6694,6695,6696,6697,6698,6699,6700,6701,6702,6703,6704,6705,
6706,6707,6708,6709,6710,6711,6712,6713,6714,6715,6716,6717,6718,6719,6720,6721,
6722,6723,6724,6725,1389,6726,6727,6728,6729,6730,6731,6732,6733,6734,6735,6736,
1390,1709,6737,6738,6739,6740,6741,6742,1710,6743,6744,6745,6746,1391,6747,6748,
6749,6750,6751,6752,6753,6754,6755,6756,6757,1392,6758,6759,6760,6761,6762,6763,
6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777,6778,6779,
6780,1202,6781,6782,6783,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6794,
6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,1711,
6810,6811,6812,6813,6814,6815,6816,6817,6818,6819,6820,6821,6822,6823,6824,6825,
6826,6827,6828,6829,6830,6831,6832,6833,6834,6835,6836,1393,6837,6838,6839,6840,
6841,6842,6843,6844,6845,6846,6847,6848,6849,6850,6851,6852,6853,6854,6855,6856,
6857,6858,6859,6860,6861,6862,6863,6864,6865,6866,6867,6868,6869,6870,6871,6872,
6873,6874,6875,6876,6877,6878,6879,6880,6881,6882,6883,6884,6885,6886,6887,6888,
6889,6890,6891,6892,6893,6894,6895,6896,6897,6898,6899,6900,6901,6902,1712,6903,
6904,6905,6906,6907,6908,6909,6910,1713,6911,6912,6913,6914,6915,6916,6917,6918,
6919,6920,6921,6922,6923,6924,6925,6926,6927,6928,6929,6930,6931,6932,6933,6934,
6935,6936,6937,6938,6939,6940,6941,6942,6943,6944,6945,6946,6947,6948,6949,6950,
6951,6952,6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6964,6965,6966,
6967,6968,6969,6970,6971,6972,6973,6974,1714,6975,6976,6977,6978,6979,6980,6981,
6982,6983,6984,6985,6986,6987,6988,1394,6989,6990,6991,6992,6993,6994,6995,6996,
6997,6998,6999,7000,1715,7001,7002,7003,7004,7005,7006,7007,7008,7009,7010,7011,
7012,7013,7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,
7028,1716,7029,7030,7031,7032,7033,7034,7035,7036,7037,7038,7039,7040,7041,7042,
7043,7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,
7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7071,7072,7073,7074,
7075,7076,7077,7078,7079,7080,7081,7082,7083,7084,7085,7086,7087,7088,7089,7090,
7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105,7106,
7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,7119,7120,7121,7122,
7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136,7137,7138,
7139,7140,7141,7142,7143,7144,7145,7146,7147,7148,7149,7150,7151,7152,7153,7154,
7155,7156,7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167,7168,7169,7170,
7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183,7184,7185,7186,
7187,7188,7189,7190,7191,7192,7193,7194,7195,7196,7197,7198,7199,7200,7201,7202,
7203,7204,7205,7206,7207,1395,7208,7209,7210,7211,7212,7213,1717,7214,7215,7216,
7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229,7230,7231,7232,
7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245,7246,7247,7248,
7249,7250,7251,7252,7253,7254,7255,7256,7257,7258,7259,7260,7261,7262,7263,7264,
7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277,7278,7279,7280,
7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7294,7295,7296,
7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308,7309,7310,7311,7312,
7313,1718,7314,7315,7316,7317,7318,7319,7320,7321,7322,7323,7324,7325,7326,7327,
7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342,7343,
7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7355,7356,7357,7358,7359,
7360,7361,7362,7363,7364,7365,7366,7367,7368,7369,7370,7371,7372,7373,7374,7375,
7376,7377,7378,7379,7380,7381,7382,7383,7384,7385,7386,7387,7388,7389,7390,7391,
7392,7393,7394,7395,7396,7397,7398,7399,7400,7401,7402,7403,7404,7405,7406,7407,
7408,7409,7410,7411,7412,7413,7414,7415,7416,7417,7418,7419,7420,7421,7422,7423,
7424,7425,7426,7427,7428,7429,7430,7431,7432,7433,7434,7435,7436,7437,7438,7439,
7440,7441,7442,7443,7444,7445,7446,7447,7448,7449,7450,7451,7452,7453,7454,7455,
7456,7457,7458,7459,7460,7461,7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,
7472,7473,7474,7475,7476,7477,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,
7488,7489,7490,7491,7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,7503,
7504,7505,7506,7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,
7520,7521,7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,
7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,
7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567,
7568,7569,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582,7583,
7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,
7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,
7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,
7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,
7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659,7660,7661,7662,7663,
7664,7665,7666,7667,7668,7669,7670,7671,7672,7673,7674,7675,7676,7677,7678,7679,
7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690,7691,7692,7693,7694,7695,
7696,7697,7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,
7712,7713,7714,7715,7716,7717,7718,7719,7720,7721,7722,7723,7724,7725,7726,7727,
7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742,7743,
7744,7745,7746,7747,7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7759,
7760,7761,7762,7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,
7776,7777,7778,7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,
7792,7793,7794,7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,7806,7807,
7808,7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,
7824,7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,
7840,7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,
7856,7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,
7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,
7888,7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,
7904,7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,
7920,7921,7922,7923,7924,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935,
7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951,
7952,7953,7954,7955,7956,7957,7958,7959,7960,7961,7962,7963,7964,7965,7966,7967,
7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983,
7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999,
8000,8001,8002,8003,8004,8005,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,
8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031,
8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,
8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063,
8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,
8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,
8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,
8112,8113,8114,8115,8116,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127,
8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,
8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,
8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,
8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,
8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,
8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,
8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,
8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,
8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,
8272,8273,8274,8275,8276,8277,8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,
8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,
8304,8305,8306,8307,8308,8309,8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,
8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,
8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,
8352,8353,8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,
8368,8369,8370,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,
8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,
8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,
8416,8417,8418,8419,8420,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,
8432,8433,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,
8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,
8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,
8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,
8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,
8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,
8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,
8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,
8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,
8576,8577,8578,8579,8580,8581,8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,
8592,8593,8594,8595,8596,8597,8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,
8608,8609,8610,8611,8612,8613,8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,
8624,8625,8626,8627,8628,8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,
8640,8641,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,
8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,
8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,
8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,
8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,
8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,
8736,8737,8738,8739,8740,8741)

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/escsm.py000064400000017237151733566760022041 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .constants import eStart, eError, eItsMe

HZ_cls = (
1,0,0,0,0,0,0,0,  # 00 - 07
0,0,0,0,0,0,0,0,  # 08 - 0f
0,0,0,0,0,0,0,0,  # 10 - 17
0,0,0,1,0,0,0,0,  # 18 - 1f
0,0,0,0,0,0,0,0,  # 20 - 27
0,0,0,0,0,0,0,0,  # 28 - 2f
0,0,0,0,0,0,0,0,  # 30 - 37
0,0,0,0,0,0,0,0,  # 38 - 3f
0,0,0,0,0,0,0,0,  # 40 - 47
0,0,0,0,0,0,0,0,  # 48 - 4f
0,0,0,0,0,0,0,0,  # 50 - 57
0,0,0,0,0,0,0,0,  # 58 - 5f
0,0,0,0,0,0,0,0,  # 60 - 67
0,0,0,0,0,0,0,0,  # 68 - 6f
0,0,0,0,0,0,0,0,  # 70 - 77
0,0,0,4,0,5,2,0,  # 78 - 7f
1,1,1,1,1,1,1,1,  # 80 - 87
1,1,1,1,1,1,1,1,  # 88 - 8f
1,1,1,1,1,1,1,1,  # 90 - 97
1,1,1,1,1,1,1,1,  # 98 - 9f
1,1,1,1,1,1,1,1,  # a0 - a7
1,1,1,1,1,1,1,1,  # a8 - af
1,1,1,1,1,1,1,1,  # b0 - b7
1,1,1,1,1,1,1,1,  # b8 - bf
1,1,1,1,1,1,1,1,  # c0 - c7
1,1,1,1,1,1,1,1,  # c8 - cf
1,1,1,1,1,1,1,1,  # d0 - d7
1,1,1,1,1,1,1,1,  # d8 - df
1,1,1,1,1,1,1,1,  # e0 - e7
1,1,1,1,1,1,1,1,  # e8 - ef
1,1,1,1,1,1,1,1,  # f0 - f7
1,1,1,1,1,1,1,1,  # f8 - ff
)

HZ_st = (
eStart,eError,     3,eStart,eStart,eStart,eError,eError,# 00-07
eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,# 08-0f
eItsMe,eItsMe,eError,eError,eStart,eStart,     4,eError,# 10-17
     5,eError,     6,eError,     5,     5,     4,eError,# 18-1f
     4,eError,     4,     4,     4,eError,     4,eError,# 20-27
     4,eItsMe,eStart,eStart,eStart,eStart,eStart,eStart,# 28-2f
)

HZCharLenTable = (0, 0, 0, 0, 0, 0)

HZSMModel = {'classTable': HZ_cls,
             'classFactor': 6,
             'stateTable': HZ_st,
             'charLenTable': HZCharLenTable,
             'name': "HZ-GB-2312"}

ISO2022CN_cls = (
2,0,0,0,0,0,0,0,  # 00 - 07
0,0,0,0,0,0,0,0,  # 08 - 0f
0,0,0,0,0,0,0,0,  # 10 - 17
0,0,0,1,0,0,0,0,  # 18 - 1f
0,0,0,0,0,0,0,0,  # 20 - 27
0,3,0,0,0,0,0,0,  # 28 - 2f
0,0,0,0,0,0,0,0,  # 30 - 37
0,0,0,0,0,0,0,0,  # 38 - 3f
0,0,0,4,0,0,0,0,  # 40 - 47
0,0,0,0,0,0,0,0,  # 48 - 4f
0,0,0,0,0,0,0,0,  # 50 - 57
0,0,0,0,0,0,0,0,  # 58 - 5f
0,0,0,0,0,0,0,0,  # 60 - 67
0,0,0,0,0,0,0,0,  # 68 - 6f
0,0,0,0,0,0,0,0,  # 70 - 77
0,0,0,0,0,0,0,0,  # 78 - 7f
2,2,2,2,2,2,2,2,  # 80 - 87
2,2,2,2,2,2,2,2,  # 88 - 8f
2,2,2,2,2,2,2,2,  # 90 - 97
2,2,2,2,2,2,2,2,  # 98 - 9f
2,2,2,2,2,2,2,2,  # a0 - a7
2,2,2,2,2,2,2,2,  # a8 - af
2,2,2,2,2,2,2,2,  # b0 - b7
2,2,2,2,2,2,2,2,  # b8 - bf
2,2,2,2,2,2,2,2,  # c0 - c7
2,2,2,2,2,2,2,2,  # c8 - cf
2,2,2,2,2,2,2,2,  # d0 - d7
2,2,2,2,2,2,2,2,  # d8 - df
2,2,2,2,2,2,2,2,  # e0 - e7
2,2,2,2,2,2,2,2,  # e8 - ef
2,2,2,2,2,2,2,2,  # f0 - f7
2,2,2,2,2,2,2,2,  # f8 - ff
)

ISO2022CN_st = (
eStart,     3,eError,eStart,eStart,eStart,eStart,eStart,# 00-07
eStart,eError,eError,eError,eError,eError,eError,eError,# 08-0f
eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,# 10-17
eItsMe,eItsMe,eItsMe,eError,eError,eError,     4,eError,# 18-1f
eError,eError,eError,eItsMe,eError,eError,eError,eError,# 20-27
     5,     6,eError,eError,eError,eError,eError,eError,# 28-2f
eError,eError,eError,eItsMe,eError,eError,eError,eError,# 30-37
eError,eError,eError,eError,eError,eItsMe,eError,eStart,# 38-3f
)

ISO2022CNCharLenTable = (0, 0, 0, 0, 0, 0, 0, 0, 0)

ISO2022CNSMModel = {'classTable': ISO2022CN_cls,
                    'classFactor': 9,
                    'stateTable': ISO2022CN_st,
                    'charLenTable': ISO2022CNCharLenTable,
                    'name': "ISO-2022-CN"}

ISO2022JP_cls = (
2,0,0,0,0,0,0,0,  # 00 - 07
0,0,0,0,0,0,2,2,  # 08 - 0f
0,0,0,0,0,0,0,0,  # 10 - 17
0,0,0,1,0,0,0,0,  # 18 - 1f
0,0,0,0,7,0,0,0,  # 20 - 27
3,0,0,0,0,0,0,0,  # 28 - 2f
0,0,0,0,0,0,0,0,  # 30 - 37
0,0,0,0,0,0,0,0,  # 38 - 3f
6,0,4,0,8,0,0,0,  # 40 - 47
0,9,5,0,0,0,0,0,  # 48 - 4f
0,0,0,0,0,0,0,0,  # 50 - 57
0,0,0,0,0,0,0,0,  # 58 - 5f
0,0,0,0,0,0,0,0,  # 60 - 67
0,0,0,0,0,0,0,0,  # 68 - 6f
0,0,0,0,0,0,0,0,  # 70 - 77
0,0,0,0,0,0,0,0,  # 78 - 7f
2,2,2,2,2,2,2,2,  # 80 - 87
2,2,2,2,2,2,2,2,  # 88 - 8f
2,2,2,2,2,2,2,2,  # 90 - 97
2,2,2,2,2,2,2,2,  # 98 - 9f
2,2,2,2,2,2,2,2,  # a0 - a7
2,2,2,2,2,2,2,2,  # a8 - af
2,2,2,2,2,2,2,2,  # b0 - b7
2,2,2,2,2,2,2,2,  # b8 - bf
2,2,2,2,2,2,2,2,  # c0 - c7
2,2,2,2,2,2,2,2,  # c8 - cf
2,2,2,2,2,2,2,2,  # d0 - d7
2,2,2,2,2,2,2,2,  # d8 - df
2,2,2,2,2,2,2,2,  # e0 - e7
2,2,2,2,2,2,2,2,  # e8 - ef
2,2,2,2,2,2,2,2,  # f0 - f7
2,2,2,2,2,2,2,2,  # f8 - ff
)

ISO2022JP_st = (
eStart,     3,eError,eStart,eStart,eStart,eStart,eStart,# 00-07
eStart,eStart,eError,eError,eError,eError,eError,eError,# 08-0f
eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,# 10-17
eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,# 18-1f
eError,     5,eError,eError,eError,     4,eError,eError,# 20-27
eError,eError,eError,     6,eItsMe,eError,eItsMe,eError,# 28-2f
eError,eError,eError,eError,eError,eError,eItsMe,eItsMe,# 30-37
eError,eError,eError,eItsMe,eError,eError,eError,eError,# 38-3f
eError,eError,eError,eError,eItsMe,eError,eStart,eStart,# 40-47
)

ISO2022JPCharLenTable = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

ISO2022JPSMModel = {'classTable': ISO2022JP_cls,
                    'classFactor': 10,
                    'stateTable': ISO2022JP_st,
                    'charLenTable': ISO2022JPCharLenTable,
                    'name': "ISO-2022-JP"}

ISO2022KR_cls = (
2,0,0,0,0,0,0,0,  # 00 - 07
0,0,0,0,0,0,0,0,  # 08 - 0f
0,0,0,0,0,0,0,0,  # 10 - 17
0,0,0,1,0,0,0,0,  # 18 - 1f
0,0,0,0,3,0,0,0,  # 20 - 27
0,4,0,0,0,0,0,0,  # 28 - 2f
0,0,0,0,0,0,0,0,  # 30 - 37
0,0,0,0,0,0,0,0,  # 38 - 3f
0,0,0,5,0,0,0,0,  # 40 - 47
0,0,0,0,0,0,0,0,  # 48 - 4f
0,0,0,0,0,0,0,0,  # 50 - 57
0,0,0,0,0,0,0,0,  # 58 - 5f
0,0,0,0,0,0,0,0,  # 60 - 67
0,0,0,0,0,0,0,0,  # 68 - 6f
0,0,0,0,0,0,0,0,  # 70 - 77
0,0,0,0,0,0,0,0,  # 78 - 7f
2,2,2,2,2,2,2,2,  # 80 - 87
2,2,2,2,2,2,2,2,  # 88 - 8f
2,2,2,2,2,2,2,2,  # 90 - 97
2,2,2,2,2,2,2,2,  # 98 - 9f
2,2,2,2,2,2,2,2,  # a0 - a7
2,2,2,2,2,2,2,2,  # a8 - af
2,2,2,2,2,2,2,2,  # b0 - b7
2,2,2,2,2,2,2,2,  # b8 - bf
2,2,2,2,2,2,2,2,  # c0 - c7
2,2,2,2,2,2,2,2,  # c8 - cf
2,2,2,2,2,2,2,2,  # d0 - d7
2,2,2,2,2,2,2,2,  # d8 - df
2,2,2,2,2,2,2,2,  # e0 - e7
2,2,2,2,2,2,2,2,  # e8 - ef
2,2,2,2,2,2,2,2,  # f0 - f7
2,2,2,2,2,2,2,2,  # f8 - ff
)

ISO2022KR_st = (
eStart,     3,eError,eStart,eStart,eStart,eError,eError,# 00-07
eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,# 08-0f
eItsMe,eItsMe,eError,eError,eError,     4,eError,eError,# 10-17
eError,eError,eError,eError,     5,eError,eError,eError,# 18-1f
eError,eError,eError,eItsMe,eStart,eStart,eStart,eStart,# 20-27
)

ISO2022KRCharLenTable = (0, 0, 0, 0, 0, 0)

ISO2022KRSMModel = {'classTable': ISO2022KR_cls,
                    'classFactor': 6,
                    'stateTable': ISO2022KR_st,
                    'charLenTable': ISO2022KRCharLenTable,
                    'name': "ISO-2022-KR"}

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py000064400000030760151733566760024552 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# Character Mapping Table:
# this table is modified base on win1251BulgarianCharToOrderMap, so
# only number <64 is sure valid

Latin5_BulgarianCharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 77, 90, 99,100, 72,109,107,101, 79,185, 81,102, 76, 94, 82,  # 40
110,186,108, 91, 74,119, 84, 96,111,187,115,253,253,253,253,253,  # 50
253, 65, 69, 70, 66, 63, 68,112,103, 92,194,104, 95, 86, 87, 71,  # 60
116,195, 85, 93, 97,113,196,197,198,199,200,253,253,253,253,253,  # 70
194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,  # 80
210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,  # 90
 81,226,227,228,229,230,105,231,232,233,234,235,236, 45,237,238,  # a0
 31, 32, 35, 43, 37, 44, 55, 47, 40, 59, 33, 46, 38, 36, 41, 30,  # b0
 39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,239, 67,240, 60, 56,  # c0
  1, 18,  9, 20, 11,  3, 23, 15,  2, 26, 12, 10, 14,  6,  4, 13,  # d0
  7,  8,  5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,241, 42, 16,  # e0
 62,242,243,244, 58,245, 98,246,247,248,249,250,251, 91,252,253,  # f0
)

win1251BulgarianCharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 77, 90, 99,100, 72,109,107,101, 79,185, 81,102, 76, 94, 82,  # 40
110,186,108, 91, 74,119, 84, 96,111,187,115,253,253,253,253,253,  # 50
253, 65, 69, 70, 66, 63, 68,112,103, 92,194,104, 95, 86, 87, 71,  # 60
116,195, 85, 93, 97,113,196,197,198,199,200,253,253,253,253,253,  # 70
206,207,208,209,210,211,212,213,120,214,215,216,217,218,219,220,  # 80
221, 78, 64, 83,121, 98,117,105,222,223,224,225,226,227,228,229,  # 90
 88,230,231,232,233,122, 89,106,234,235,236,237,238, 45,239,240,  # a0
 73, 80,118,114,241,242,243,244,245, 62, 58,246,247,248,249,250,  # b0
 31, 32, 35, 43, 37, 44, 55, 47, 40, 59, 33, 46, 38, 36, 41, 30,  # c0
 39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,251, 67,252, 60, 56,  # d0
  1, 18,  9, 20, 11,  3, 23, 15,  2, 26, 12, 10, 14,  6,  4, 13,  # e0
  7,  8,  5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,253, 42, 16,  # f0
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 96.9392%
# first 1024 sequences:3.0618%
# rest  sequences:     0.2992%
# negative sequences:  0.0020%
BulgarianLangModel = (
0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,2,2,1,2,2,
3,1,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,3,3,3,0,3,0,1,
0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,3,3,3,3,3,0,3,1,0,
0,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,2,3,3,3,3,3,3,3,3,0,3,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,1,3,2,3,3,3,3,3,3,3,3,0,3,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,1,3,3,3,3,2,2,2,1,1,2,0,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,2,3,2,2,3,3,1,1,2,3,3,2,3,3,3,3,2,1,2,0,2,0,3,0,0,
0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,1,3,3,3,3,3,2,3,2,3,3,3,3,3,2,3,3,1,3,0,3,0,2,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,1,3,3,2,3,3,3,1,3,3,2,3,2,2,2,0,0,2,0,2,0,2,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,3,3,1,2,2,3,2,1,1,2,0,2,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,2,3,3,1,2,3,2,2,2,3,3,3,3,3,2,2,3,1,2,0,2,1,2,0,0,
0,0,0,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,1,3,3,3,3,3,2,3,3,3,2,3,3,2,3,2,2,2,3,1,2,0,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,3,3,3,1,1,1,2,2,1,3,1,3,2,2,3,0,0,1,0,1,0,1,0,0,
0,0,0,1,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,2,2,3,2,2,3,1,2,1,1,1,2,3,1,3,1,2,2,0,1,1,1,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,1,3,2,2,3,3,1,2,3,1,1,3,3,3,3,1,2,2,1,1,1,0,2,0,2,0,1,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,2,2,3,3,3,2,2,1,1,2,0,2,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,0,1,2,1,3,3,2,3,3,3,3,3,2,3,2,1,0,3,1,2,1,2,1,2,3,2,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,2,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,1,3,3,2,3,3,2,2,2,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,0,3,3,3,3,3,2,1,1,2,1,3,3,0,3,1,1,1,1,3,2,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,1,1,3,1,3,3,2,3,2,2,2,3,0,2,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,2,3,3,2,2,3,2,1,1,1,1,1,3,1,3,1,1,0,0,0,1,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,2,3,2,0,3,2,0,3,0,2,0,0,2,1,3,1,0,0,1,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,2,1,1,1,1,2,1,1,2,1,1,1,2,2,1,2,1,1,1,0,1,1,0,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,2,1,3,1,1,2,1,3,2,1,1,0,1,2,3,2,1,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,2,2,1,0,1,0,0,1,0,0,0,2,1,0,3,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,2,3,2,3,3,1,3,2,1,1,1,2,1,1,2,1,3,0,1,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,2,2,3,3,2,3,2,2,2,3,1,2,2,1,1,2,1,1,2,2,0,1,1,0,1,0,2,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,2,1,3,1,0,2,2,1,3,2,1,0,0,2,0,2,0,1,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,1,2,0,2,3,1,2,3,2,0,1,3,1,2,1,1,1,0,0,1,0,0,2,2,2,3,
2,2,2,2,1,2,1,1,2,2,1,1,2,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,1,1,0,1,
3,3,3,3,3,2,1,2,2,1,2,0,2,0,1,0,1,2,1,2,1,1,0,0,0,1,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,2,3,3,1,1,3,1,0,3,2,1,0,0,0,1,2,0,2,0,1,0,0,0,1,0,1,2,1,2,2,
1,1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,1,0,1,2,1,1,1,0,0,0,0,0,1,1,0,0,
3,1,0,1,0,2,3,2,2,2,3,2,2,2,2,2,1,0,2,1,2,1,1,1,0,1,2,1,2,2,2,1,
1,1,2,2,2,2,1,2,1,1,0,1,2,1,2,2,2,1,1,1,0,1,1,1,1,2,0,1,0,0,0,0,
2,3,2,3,3,0,0,2,1,0,2,1,0,0,0,0,2,3,0,2,0,0,0,0,0,1,0,0,2,0,1,2,
2,1,2,1,2,2,1,1,1,2,1,1,1,0,1,2,2,1,1,1,1,1,0,1,1,1,0,0,1,2,0,0,
3,3,2,2,3,0,2,3,1,1,2,0,0,0,1,0,0,2,0,2,0,0,0,1,0,1,0,1,2,0,2,2,
1,1,1,1,2,1,0,1,2,2,2,1,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,1,0,0,
2,3,2,3,3,0,0,3,0,1,1,0,1,0,0,0,2,2,1,2,0,0,0,0,0,0,0,0,2,0,1,2,
2,2,1,1,1,1,1,2,2,2,1,0,2,0,1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,
3,3,3,3,2,2,2,2,2,0,2,1,1,1,1,2,1,2,1,1,0,2,0,1,0,1,0,0,2,0,1,2,
1,1,1,1,1,1,1,2,2,1,1,0,2,0,1,0,2,0,0,1,1,1,0,0,2,0,0,0,1,1,0,0,
2,3,3,3,3,1,0,0,0,0,0,0,0,0,0,0,2,0,0,1,1,0,0,0,0,0,0,1,2,0,1,2,
2,2,2,1,1,2,1,1,2,2,2,1,2,0,1,1,1,1,1,1,0,1,1,1,1,0,0,1,1,1,0,0,
2,3,3,3,3,0,2,2,0,2,1,0,0,0,1,1,1,2,0,2,0,0,0,3,0,0,0,0,2,0,2,2,
1,1,1,2,1,2,1,1,2,2,2,1,2,0,1,1,1,0,1,1,1,1,0,2,1,0,0,0,1,1,0,0,
2,3,3,3,3,0,2,1,0,0,2,0,0,0,0,0,1,2,0,2,0,0,0,0,0,0,0,0,2,0,1,2,
1,1,1,2,1,1,1,1,2,2,2,0,1,0,1,1,1,0,0,1,1,1,0,0,1,0,0,0,0,1,0,0,
3,3,2,2,3,0,1,0,1,0,0,0,0,0,0,0,1,1,0,3,0,0,0,0,0,0,0,0,1,0,2,2,
1,1,1,1,1,2,1,1,2,2,1,2,2,1,0,1,1,1,1,1,0,1,0,0,1,0,0,0,1,1,0,0,
3,1,0,1,0,2,2,2,2,3,2,1,1,1,2,3,0,0,1,0,2,1,1,0,1,1,1,1,2,1,1,1,
1,2,2,1,2,1,2,2,1,1,0,1,2,1,2,2,1,1,1,0,0,1,1,1,2,1,0,1,0,0,0,0,
2,1,0,1,0,3,1,2,2,2,2,1,2,2,1,1,1,0,2,1,2,2,1,1,2,1,1,0,2,1,1,1,
1,2,2,2,2,2,2,2,1,2,0,1,1,0,2,1,1,1,1,1,0,0,1,1,1,1,0,1,0,0,0,0,
2,1,1,1,1,2,2,2,2,1,2,2,2,1,2,2,1,1,2,1,2,3,2,2,1,1,1,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,3,2,0,1,2,0,1,2,1,1,0,1,0,1,2,1,2,0,0,0,1,1,0,0,0,1,0,0,2,
1,1,0,0,1,1,0,1,1,1,1,0,2,0,1,1,1,0,0,1,1,0,0,0,0,1,0,0,0,1,0,0,
2,0,0,0,0,1,2,2,2,2,2,2,2,1,2,1,1,1,1,1,1,1,0,1,1,1,1,1,2,1,1,1,
1,2,2,2,2,1,1,2,1,2,1,1,1,0,2,1,2,1,1,1,0,2,1,1,1,1,0,1,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,
1,1,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,3,2,0,0,0,0,1,0,0,0,0,0,0,1,1,0,2,0,0,0,0,0,0,0,0,1,0,1,2,
1,1,1,1,1,1,0,0,2,2,2,2,2,0,1,1,0,1,1,1,1,1,0,0,1,0,0,0,1,1,0,1,
2,3,1,2,1,0,1,1,0,2,2,2,0,0,1,0,0,1,1,1,1,0,0,0,0,0,0,0,1,0,1,2,
1,1,1,1,2,1,1,1,1,1,1,1,1,0,1,1,0,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,
2,2,2,2,2,0,0,2,0,0,2,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,2,0,2,2,
1,1,1,1,1,0,0,1,2,1,1,0,1,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,2,0,0,2,0,1,1,0,0,0,1,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,0,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,3,2,0,0,1,0,0,1,0,0,0,0,0,0,1,0,2,0,0,0,1,0,0,0,0,0,0,0,2,
1,1,0,0,1,0,0,0,1,1,0,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
2,1,2,2,2,1,2,1,2,2,1,1,2,1,1,1,0,1,1,1,1,2,0,1,0,1,1,1,1,0,1,1,
1,1,2,1,1,1,1,1,1,0,0,1,2,1,1,1,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,
1,0,0,1,3,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,1,0,0,1,0,2,0,0,0,0,0,1,1,1,0,1,0,0,0,0,0,0,0,0,2,0,0,1,
0,2,0,1,0,0,1,1,2,0,1,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,2,0,1,1,0,2,1,0,1,1,1,0,0,1,0,2,0,1,0,0,0,0,0,0,0,0,0,1,
0,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,2,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,
0,1,0,1,1,1,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
2,0,1,0,0,1,2,1,1,1,1,1,1,2,2,1,0,0,1,0,1,0,0,0,0,1,1,1,1,0,0,0,
1,1,2,1,1,1,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,1,2,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,1,1,0,1,1,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,
1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,2,0,0,2,0,1,0,0,1,0,0,1,
1,1,0,0,1,1,0,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,
1,1,1,1,1,1,1,2,0,0,0,0,0,0,2,1,0,1,1,0,0,1,1,1,0,1,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
)

Latin5BulgarianModel = {
  'charToOrderMap': Latin5_BulgarianCharToOrderMap,
  'precedenceMatrix': BulgarianLangModel,
  'mTypicalPositiveRatio': 0.969392,
  'keepEnglishLetter': False,
  'charsetName': "ISO-8859-5"
}

Win1251BulgarianModel = {
  'charToOrderMap': win1251BulgarianCharToOrderMap,
  'precedenceMatrix': BulgarianLangModel,
  'mTypicalPositiveRatio': 0.969392,
  'keepEnglishLetter': False,
  'charsetName': "windows-1251"
}


# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py000064400000004416151733566760024553 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .constants import eStart
from .compat import wrap_ord


class CodingStateMachine:
    def __init__(self, sm):
        self._mModel = sm
        self._mCurrentBytePos = 0
        self._mCurrentCharLen = 0
        self.reset()

    def reset(self):
        self._mCurrentState = eStart

    def next_state(self, c):
        # for each byte we get its class
        # if it is first byte, we also get byte length
        # PY3K: aBuf is a byte stream, so c is an int, not a byte
        byteCls = self._mModel['classTable'][wrap_ord(c)]
        if self._mCurrentState == eStart:
            self._mCurrentBytePos = 0
            self._mCurrentCharLen = self._mModel['charLenTable'][byteCls]
        # from byte's class and stateTable, we get its next state
        curr_state = (self._mCurrentState * self._mModel['classFactor']
                      + byteCls)
        self._mCurrentState = self._mModel['stateTable'][curr_state]
        self._mCurrentBytePos += 1
        return self._mCurrentState

    def get_current_charlen(self):
        return self._mCurrentCharLen

    def get_coding_state_machine(self):
        return self._mModel['name']
python3.3/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py000064400000003213151733566760023237 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import EUCKRDistributionAnalysis
from .mbcssm import EUCKRSMModel


class EUCKRProber(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(EUCKRSMModel)
        self._mDistributionAnalyzer = EUCKRDistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "EUC-KR"
python3.3/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py000064400000006304151733566760024102 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#   Proofpoint, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys
from . import constants
from .charsetprober import CharSetProber


class MultiByteCharSetProber(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mDistributionAnalyzer = None
        self._mCodingSM = None
        self._mLastChar = [0, 0]

    def reset(self):
        CharSetProber.reset(self)
        if self._mCodingSM:
            self._mCodingSM.reset()
        if self._mDistributionAnalyzer:
            self._mDistributionAnalyzer.reset()
        self._mLastChar = [0, 0]

    def get_charset_name(self):
        pass

    def feed(self, aBuf):
        aLen = len(aBuf)
        for i in range(0, aLen):
            codingState = self._mCodingSM.next_state(aBuf[i])
            if codingState == constants.eError:
                if constants._debug:
                    sys.stderr.write(self.get_charset_name()
                                     + ' prober hit error at byte ' + str(i)
                                     + '\n')
                self._mState = constants.eNotMe
                break
            elif codingState == constants.eItsMe:
                self._mState = constants.eFoundIt
                break
            elif codingState == constants.eStart:
                charLen = self._mCodingSM.get_current_charlen()
                if i == 0:
                    self._mLastChar[1] = aBuf[0]
                    self._mDistributionAnalyzer.feed(self._mLastChar, charLen)
                else:
                    self._mDistributionAnalyzer.feed(aBuf[i - 1:i + 1],
                                                     charLen)

        self._mLastChar[0] = aBuf[aLen - 1]

        if self.get_state() == constants.eDetecting:
            if (self._mDistributionAnalyzer.got_enough_data() and
                    (self.get_confidence() > constants.SHORTCUT_THRESHOLD)):
                self._mState = constants.eFoundIt

        return self.get_state()

    def get_confidence(self):
        return self._mDistributionAnalyzer.get_confidence()
python3.3/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py000064400000134323151733566760022366 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Sampling from about 20M text materials include literature and computer technology
#
# Japanese frequency table, applied to both S-JIS and EUC-JP
# They are sorted in order.

# 128  --> 0.77094
# 256  --> 0.85710
# 512  --> 0.92635
# 1024 --> 0.97130
# 2048 --> 0.99431
#
# Ideal Distribution Ratio = 0.92635 / (1-0.92635) = 12.58
# Random Distribution Ration = 512 / (2965+62+83+86-512) = 0.191
#
# Typical Distribution Ratio, 25% of IDR

JIS_TYPICAL_DISTRIBUTION_RATIO = 3.0

# Char to FreqOrder table ,
JIS_TABLE_SIZE = 4368

JISCharToFreqOrder = (
  40,   1,   6, 182, 152, 180, 295,2127, 285, 381,3295,4304,3068,4606,3165,3510, #   16
3511,1822,2785,4607,1193,2226,5070,4608, 171,2996,1247,  18, 179,5071, 856,1661, #   32
1262,5072, 619, 127,3431,3512,3230,1899,1700, 232, 228,1294,1298, 284, 283,2041, #   48
2042,1061,1062,  48,  49,  44,  45, 433, 434,1040,1041, 996, 787,2997,1255,4305, #   64
2108,4609,1684,1648,5073,5074,5075,5076,5077,5078,3687,5079,4610,5080,3927,3928, #   80
5081,3296,3432, 290,2285,1471,2187,5082,2580,2825,1303,2140,1739,1445,2691,3375, #   96
1691,3297,4306,4307,4611, 452,3376,1182,2713,3688,3069,4308,5083,5084,5085,5086, #  112
5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102, #  128
5103,5104,5105,5106,5107,5108,5109,5110,5111,5112,4097,5113,5114,5115,5116,5117, #  144
5118,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,5130,5131,5132,5133, #  160
5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,5149, #  176
5150,5151,5152,4612,5153,5154,5155,5156,5157,5158,5159,5160,5161,5162,5163,5164, #  192
5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,1472, 598, 618, 820,1205, #  208
1309,1412,1858,1307,1692,5176,5177,5178,5179,5180,5181,5182,1142,1452,1234,1172, #  224
1875,2043,2149,1793,1382,2973, 925,2404,1067,1241, 960,1377,2935,1491, 919,1217, #  240
1865,2030,1406,1499,2749,4098,5183,5184,5185,5186,5187,5188,2561,4099,3117,1804, #  256
2049,3689,4309,3513,1663,5189,3166,3118,3298,1587,1561,3433,5190,3119,1625,2998, #  272
3299,4613,1766,3690,2786,4614,5191,5192,5193,5194,2161,  26,3377,   2,3929,  20, #  288
3691,  47,4100,  50,  17,  16,  35, 268,  27, 243,  42, 155,  24, 154,  29, 184, #  304
   4,  91,  14,  92,  53, 396,  33, 289,   9,  37,  64, 620,  21,  39, 321,   5, #  320
  12,  11,  52,  13,   3, 208, 138,   0,   7,  60, 526, 141, 151,1069, 181, 275, #  336
1591,  83, 132,1475, 126, 331, 829,  15,  69, 160,  59,  22, 157,  55,1079, 312, #  352
 109,  38,  23,  25,  10,  19,  79,5195,  61, 382,1124,   8,  30,5196,5197,5198, #  368
5199,5200,5201,5202,5203,5204,5205,5206,  89,  62,  74,  34,2416, 112, 139, 196, #  384
 271, 149,  84, 607, 131, 765,  46,  88, 153, 683,  76, 874, 101, 258,  57,  80, #  400
  32, 364, 121,1508, 169,1547,  68, 235, 145,2999,  41, 360,3027,  70,  63,  31, #  416
  43, 259, 262,1383,  99, 533, 194,  66,  93, 846, 217, 192,  56, 106,  58, 565, #  432
 280, 272, 311, 256, 146,  82, 308,  71, 100, 128, 214, 655, 110, 261, 104,1140, #  448
  54,  51,  36,  87,  67,3070, 185,2618,2936,2020,  28,1066,2390,2059,5207,5208, #  464
5209,5210,5211,5212,5213,5214,5215,5216,4615,5217,5218,5219,5220,5221,5222,5223, #  480
5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,5235,5236,3514,5237,5238, #  496
5239,5240,5241,5242,5243,5244,2297,2031,4616,4310,3692,5245,3071,5246,3598,5247, #  512
4617,3231,3515,5248,4101,4311,4618,3808,4312,4102,5249,4103,4104,3599,5250,5251, #  528
5252,5253,5254,5255,5256,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267, #  544
5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283, #  560
5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299, #  576
5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315, #  592
5316,5317,5318,5319,5320,5321,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331, #  608
5332,5333,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,5344,5345,5346,5347, #  624
5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363, #  640
5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379, #  656
5380,5381, 363, 642,2787,2878,2788,2789,2316,3232,2317,3434,2011, 165,1942,3930, #  672
3931,3932,3933,5382,4619,5383,4620,5384,5385,5386,5387,5388,5389,5390,5391,5392, #  688
5393,5394,5395,5396,5397,5398,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408, #  704
5409,5410,5411,5412,5413,5414,5415,5416,5417,5418,5419,5420,5421,5422,5423,5424, #  720
5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,5439,5440, #  736
5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456, #  752
5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472, #  768
5473,5474,5475,5476,5477,5478,5479,5480,5481,5482,5483,5484,5485,5486,5487,5488, #  784
5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504, #  800
5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520, #  816
5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536, #  832
5537,5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,5549,5550,5551,5552, #  848
5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568, #  864
5569,5570,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584, #  880
5585,5586,5587,5588,5589,5590,5591,5592,5593,5594,5595,5596,5597,5598,5599,5600, #  896
5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,5615,5616, #  912
5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632, #  928
5633,5634,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648, #  944
5649,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,5661,5662,5663,5664, #  960
5665,5666,5667,5668,5669,5670,5671,5672,5673,5674,5675,5676,5677,5678,5679,5680, #  976
5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696, #  992
5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712, # 1008
5713,5714,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724,5725,5726,5727,5728, # 1024
5729,5730,5731,5732,5733,5734,5735,5736,5737,5738,5739,5740,5741,5742,5743,5744, # 1040
5745,5746,5747,5748,5749,5750,5751,5752,5753,5754,5755,5756,5757,5758,5759,5760, # 1056
5761,5762,5763,5764,5765,5766,5767,5768,5769,5770,5771,5772,5773,5774,5775,5776, # 1072
5777,5778,5779,5780,5781,5782,5783,5784,5785,5786,5787,5788,5789,5790,5791,5792, # 1088
5793,5794,5795,5796,5797,5798,5799,5800,5801,5802,5803,5804,5805,5806,5807,5808, # 1104
5809,5810,5811,5812,5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824, # 1120
5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840, # 1136
5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856, # 1152
5857,5858,5859,5860,5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872, # 1168
5873,5874,5875,5876,5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888, # 1184
5889,5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904, # 1200
5905,5906,5907,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920, # 1216
5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936, # 1232
5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952, # 1248
5953,5954,5955,5956,5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968, # 1264
5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984, # 1280
5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000, # 1296
6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016, # 1312
6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032, # 1328
6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048, # 1344
6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064, # 1360
6065,6066,6067,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080, # 1376
6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096, # 1392
6097,6098,6099,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112, # 1408
6113,6114,2044,2060,4621, 997,1235, 473,1186,4622, 920,3378,6115,6116, 379,1108, # 1424
4313,2657,2735,3934,6117,3809, 636,3233, 573,1026,3693,3435,2974,3300,2298,4105, # 1440
 854,2937,2463, 393,2581,2417, 539, 752,1280,2750,2480, 140,1161, 440, 708,1569, # 1456
 665,2497,1746,1291,1523,3000, 164,1603, 847,1331, 537,1997, 486, 508,1693,2418, # 1472
1970,2227, 878,1220, 299,1030, 969, 652,2751, 624,1137,3301,2619,  65,3302,2045, # 1488
1761,1859,3120,1930,3694,3516, 663,1767, 852, 835,3695, 269, 767,2826,2339,1305, # 1504
 896,1150, 770,1616,6118, 506,1502,2075,1012,2519, 775,2520,2975,2340,2938,4314, # 1520
3028,2086,1224,1943,2286,6119,3072,4315,2240,1273,1987,3935,1557, 175, 597, 985, # 1536
3517,2419,2521,1416,3029, 585, 938,1931,1007,1052,1932,1685,6120,3379,4316,4623, # 1552
 804, 599,3121,1333,2128,2539,1159,1554,2032,3810, 687,2033,2904, 952, 675,1467, # 1568
3436,6121,2241,1096,1786,2440,1543,1924, 980,1813,2228, 781,2692,1879, 728,1918, # 1584
3696,4624, 548,1950,4625,1809,1088,1356,3303,2522,1944, 502, 972, 373, 513,2827, # 1600
 586,2377,2391,1003,1976,1631,6122,2464,1084, 648,1776,4626,2141, 324, 962,2012, # 1616
2177,2076,1384, 742,2178,1448,1173,1810, 222, 102, 301, 445, 125,2420, 662,2498, # 1632
 277, 200,1476,1165,1068, 224,2562,1378,1446, 450,1880, 659, 791, 582,4627,2939, # 1648
3936,1516,1274, 555,2099,3697,1020,1389,1526,3380,1762,1723,1787,2229, 412,2114, # 1664
1900,2392,3518, 512,2597, 427,1925,2341,3122,1653,1686,2465,2499, 697, 330, 273, # 1680
 380,2162, 951, 832, 780, 991,1301,3073, 965,2270,3519, 668,2523,2636,1286, 535, # 1696
1407, 518, 671, 957,2658,2378, 267, 611,2197,3030,6123, 248,2299, 967,1799,2356, # 1712
 850,1418,3437,1876,1256,1480,2828,1718,6124,6125,1755,1664,2405,6126,4628,2879, # 1728
2829, 499,2179, 676,4629, 557,2329,2214,2090, 325,3234, 464, 811,3001, 992,2342, # 1744
2481,1232,1469, 303,2242, 466,1070,2163, 603,1777,2091,4630,2752,4631,2714, 322, # 1760
2659,1964,1768, 481,2188,1463,2330,2857,3600,2092,3031,2421,4632,2318,2070,1849, # 1776
2598,4633,1302,2254,1668,1701,2422,3811,2905,3032,3123,2046,4106,1763,1694,4634, # 1792
1604, 943,1724,1454, 917, 868,2215,1169,2940, 552,1145,1800,1228,1823,1955, 316, # 1808
1080,2510, 361,1807,2830,4107,2660,3381,1346,1423,1134,4108,6127, 541,1263,1229, # 1824
1148,2540, 545, 465,1833,2880,3438,1901,3074,2482, 816,3937, 713,1788,2500, 122, # 1840
1575, 195,1451,2501,1111,6128, 859, 374,1225,2243,2483,4317, 390,1033,3439,3075, # 1856
2524,1687, 266, 793,1440,2599, 946, 779, 802, 507, 897,1081, 528,2189,1292, 711, # 1872
1866,1725,1167,1640, 753, 398,2661,1053, 246, 348,4318, 137,1024,3440,1600,2077, # 1888
2129, 825,4319, 698, 238, 521, 187,2300,1157,2423,1641,1605,1464,1610,1097,2541, # 1904
1260,1436, 759,2255,1814,2150, 705,3235, 409,2563,3304, 561,3033,2005,2564, 726, # 1920
1956,2343,3698,4109, 949,3812,3813,3520,1669, 653,1379,2525, 881,2198, 632,2256, # 1936
1027, 778,1074, 733,1957, 514,1481,2466, 554,2180, 702,3938,1606,1017,1398,6129, # 1952
1380,3521, 921, 993,1313, 594, 449,1489,1617,1166, 768,1426,1360, 495,1794,3601, # 1968
1177,3602,1170,4320,2344, 476, 425,3167,4635,3168,1424, 401,2662,1171,3382,1998, # 1984
1089,4110, 477,3169, 474,6130,1909, 596,2831,1842, 494, 693,1051,1028,1207,3076, # 2000
 606,2115, 727,2790,1473,1115, 743,3522, 630, 805,1532,4321,2021, 366,1057, 838, # 2016
 684,1114,2142,4322,2050,1492,1892,1808,2271,3814,2424,1971,1447,1373,3305,1090, # 2032
1536,3939,3523,3306,1455,2199, 336, 369,2331,1035, 584,2393, 902, 718,2600,6131, # 2048
2753, 463,2151,1149,1611,2467, 715,1308,3124,1268, 343,1413,3236,1517,1347,2663, # 2064
2093,3940,2022,1131,1553,2100,2941,1427,3441,2942,1323,2484,6132,1980, 872,2368, # 2080
2441,2943, 320,2369,2116,1082, 679,1933,3941,2791,3815, 625,1143,2023, 422,2200, # 2096
3816,6133, 730,1695, 356,2257,1626,2301,2858,2637,1627,1778, 937, 883,2906,2693, # 2112
3002,1769,1086, 400,1063,1325,3307,2792,4111,3077, 456,2345,1046, 747,6134,1524, # 2128
 884,1094,3383,1474,2164,1059, 974,1688,2181,2258,1047, 345,1665,1187, 358, 875, # 2144
3170, 305, 660,3524,2190,1334,1135,3171,1540,1649,2542,1527, 927, 968,2793, 885, # 2160
1972,1850, 482, 500,2638,1218,1109,1085,2543,1654,2034, 876,  78,2287,1482,1277, # 2176
 861,1675,1083,1779, 724,2754, 454, 397,1132,1612,2332, 893, 672,1237, 257,2259, # 2192
2370, 135,3384, 337,2244, 547, 352, 340, 709,2485,1400, 788,1138,2511, 540, 772, # 2208
1682,2260,2272,2544,2013,1843,1902,4636,1999,1562,2288,4637,2201,1403,1533, 407, # 2224
 576,3308,1254,2071, 978,3385, 170, 136,1201,3125,2664,3172,2394, 213, 912, 873, # 2240
3603,1713,2202, 699,3604,3699, 813,3442, 493, 531,1054, 468,2907,1483, 304, 281, # 2256
4112,1726,1252,2094, 339,2319,2130,2639, 756,1563,2944, 748, 571,2976,1588,2425, # 2272
2715,1851,1460,2426,1528,1392,1973,3237, 288,3309, 685,3386, 296, 892,2716,2216, # 2288
1570,2245, 722,1747,2217, 905,3238,1103,6135,1893,1441,1965, 251,1805,2371,3700, # 2304
2601,1919,1078,  75,2182,1509,1592,1270,2640,4638,2152,6136,3310,3817, 524, 706, # 2320
1075, 292,3818,1756,2602, 317,  98,3173,3605,3525,1844,2218,3819,2502, 814, 567, # 2336
 385,2908,1534,6137, 534,1642,3239, 797,6138,1670,1529, 953,4323, 188,1071, 538, # 2352
 178, 729,3240,2109,1226,1374,2000,2357,2977, 731,2468,1116,2014,2051,6139,1261, # 2368
1593, 803,2859,2736,3443, 556, 682, 823,1541,6140,1369,2289,1706,2794, 845, 462, # 2384
2603,2665,1361, 387, 162,2358,1740, 739,1770,1720,1304,1401,3241,1049, 627,1571, # 2400
2427,3526,1877,3942,1852,1500, 431,1910,1503, 677, 297,2795, 286,1433,1038,1198, # 2416
2290,1133,1596,4113,4639,2469,1510,1484,3943,6141,2442, 108, 712,4640,2372, 866, # 2432
3701,2755,3242,1348, 834,1945,1408,3527,2395,3243,1811, 824, 994,1179,2110,1548, # 2448
1453, 790,3003, 690,4324,4325,2832,2909,3820,1860,3821, 225,1748, 310, 346,1780, # 2464
2470, 821,1993,2717,2796, 828, 877,3528,2860,2471,1702,2165,2910,2486,1789, 453, # 2480
 359,2291,1676,  73,1164,1461,1127,3311, 421, 604, 314,1037, 589, 116,2487, 737, # 2496
 837,1180, 111, 244, 735,6142,2261,1861,1362, 986, 523, 418, 581,2666,3822, 103, # 2512
 855, 503,1414,1867,2488,1091, 657,1597, 979, 605,1316,4641,1021,2443,2078,2001, # 2528
1209,  96, 587,2166,1032, 260,1072,2153, 173,  94, 226,3244, 819,2006,4642,4114, # 2544
2203, 231,1744, 782,  97,2667, 786,3387, 887, 391, 442,2219,4326,1425,6143,2694, # 2560
 633,1544,1202, 483,2015, 592,2052,1958,2472,1655, 419, 129,4327,3444,3312,1714, # 2576
1257,3078,4328,1518,1098, 865,1310,1019,1885,1512,1734, 469,2444, 148, 773, 436, # 2592
1815,1868,1128,1055,4329,1245,2756,3445,2154,1934,1039,4643, 579,1238, 932,2320, # 2608
 353, 205, 801, 115,2428, 944,2321,1881, 399,2565,1211, 678, 766,3944, 335,2101, # 2624
1459,1781,1402,3945,2737,2131,1010, 844, 981,1326,1013, 550,1816,1545,2620,1335, # 2640
1008, 371,2881, 936,1419,1613,3529,1456,1395,2273,1834,2604,1317,2738,2503, 416, # 2656
1643,4330, 806,1126, 229, 591,3946,1314,1981,1576,1837,1666, 347,1790, 977,3313, # 2672
 764,2861,1853, 688,2429,1920,1462,  77, 595, 415,2002,3034, 798,1192,4115,6144, # 2688
2978,4331,3035,2695,2582,2072,2566, 430,2430,1727, 842,1396,3947,3702, 613, 377, # 2704
 278, 236,1417,3388,3314,3174, 757,1869, 107,3530,6145,1194, 623,2262, 207,1253, # 2720
2167,3446,3948, 492,1117,1935, 536,1838,2757,1246,4332, 696,2095,2406,1393,1572, # 2736
3175,1782, 583, 190, 253,1390,2230, 830,3126,3389, 934,3245,1703,1749,2979,1870, # 2752
2545,1656,2204, 869,2346,4116,3176,1817, 496,1764,4644, 942,1504, 404,1903,1122, # 2768
1580,3606,2945,1022, 515, 372,1735, 955,2431,3036,6146,2797,1110,2302,2798, 617, # 2784
6147, 441, 762,1771,3447,3607,3608,1904, 840,3037,  86, 939,1385, 572,1370,2445, # 2800
1336, 114,3703, 898, 294, 203,3315, 703,1583,2274, 429, 961,4333,1854,1951,3390, # 2816
2373,3704,4334,1318,1381, 966,1911,2322,1006,1155, 309, 989, 458,2718,1795,1372, # 2832
1203, 252,1689,1363,3177, 517,1936, 168,1490, 562, 193,3823,1042,4117,1835, 551, # 2848
 470,4645, 395, 489,3448,1871,1465,2583,2641, 417,1493, 279,1295, 511,1236,1119, # 2864
  72,1231,1982,1812,3004, 871,1564, 984,3449,1667,2696,2096,4646,2347,2833,1673, # 2880
3609, 695,3246,2668, 807,1183,4647, 890, 388,2333,1801,1457,2911,1765,1477,1031, # 2896
3316,3317,1278,3391,2799,2292,2526, 163,3450,4335,2669,1404,1802,6148,2323,2407, # 2912
1584,1728,1494,1824,1269, 298, 909,3318,1034,1632, 375, 776,1683,2061, 291, 210, # 2928
1123, 809,1249,1002,2642,3038, 206,1011,2132, 144, 975, 882,1565, 342, 667, 754, # 2944
1442,2143,1299,2303,2062, 447, 626,2205,1221,2739,2912,1144,1214,2206,2584, 760, # 2960
1715, 614, 950,1281,2670,2621, 810, 577,1287,2546,4648, 242,2168, 250,2643, 691, # 2976
 123,2644, 647, 313,1029, 689,1357,2946,1650, 216, 771,1339,1306, 808,2063, 549, # 2992
 913,1371,2913,2914,6149,1466,1092,1174,1196,1311,2605,2396,1783,1796,3079, 406, # 3008
2671,2117,3949,4649, 487,1825,2220,6150,2915, 448,2348,1073,6151,2397,1707, 130, # 3024
 900,1598, 329, 176,1959,2527,1620,6152,2275,4336,3319,1983,2191,3705,3610,2155, # 3040
3706,1912,1513,1614,6153,1988, 646, 392,2304,1589,3320,3039,1826,1239,1352,1340, # 3056
2916, 505,2567,1709,1437,2408,2547, 906,6154,2672, 384,1458,1594,1100,1329, 710, # 3072
 423,3531,2064,2231,2622,1989,2673,1087,1882, 333, 841,3005,1296,2882,2379, 580, # 3088
1937,1827,1293,2585, 601, 574, 249,1772,4118,2079,1120, 645, 901,1176,1690, 795, # 3104
2207, 478,1434, 516,1190,1530, 761,2080, 930,1264, 355, 435,1552, 644,1791, 987, # 3120
 220,1364,1163,1121,1538, 306,2169,1327,1222, 546,2645, 218, 241, 610,1704,3321, # 3136
1984,1839,1966,2528, 451,6155,2586,3707,2568, 907,3178, 254,2947, 186,1845,4650, # 3152
 745, 432,1757, 428,1633, 888,2246,2221,2489,3611,2118,1258,1265, 956,3127,1784, # 3168
4337,2490, 319, 510, 119, 457,3612, 274,2035,2007,4651,1409,3128, 970,2758, 590, # 3184
2800, 661,2247,4652,2008,3950,1420,1549,3080,3322,3951,1651,1375,2111, 485,2491, # 3200
1429,1156,6156,2548,2183,1495, 831,1840,2529,2446, 501,1657, 307,1894,3247,1341, # 3216
 666, 899,2156,1539,2549,1559, 886, 349,2208,3081,2305,1736,3824,2170,2759,1014, # 3232
1913,1386, 542,1397,2948, 490, 368, 716, 362, 159, 282,2569,1129,1658,1288,1750, # 3248
2674, 276, 649,2016, 751,1496, 658,1818,1284,1862,2209,2087,2512,3451, 622,2834, # 3264
 376, 117,1060,2053,1208,1721,1101,1443, 247,1250,3179,1792,3952,2760,2398,3953, # 3280
6157,2144,3708, 446,2432,1151,2570,3452,2447,2761,2835,1210,2448,3082, 424,2222, # 3296
1251,2449,2119,2836, 504,1581,4338, 602, 817, 857,3825,2349,2306, 357,3826,1470, # 3312
1883,2883, 255, 958, 929,2917,3248, 302,4653,1050,1271,1751,2307,1952,1430,2697, # 3328
2719,2359, 354,3180, 777, 158,2036,4339,1659,4340,4654,2308,2949,2248,1146,2232, # 3344
3532,2720,1696,2623,3827,6158,3129,1550,2698,1485,1297,1428, 637, 931,2721,2145, # 3360
 914,2550,2587,  81,2450, 612, 827,2646,1242,4655,1118,2884, 472,1855,3181,3533, # 3376
3534, 569,1353,2699,1244,1758,2588,4119,2009,2762,2171,3709,1312,1531,6159,1152, # 3392
1938, 134,1830, 471,3710,2276,1112,1535,3323,3453,3535, 982,1337,2950, 488, 826, # 3408
 674,1058,1628,4120,2017, 522,2399, 211, 568,1367,3454, 350, 293,1872,1139,3249, # 3424
1399,1946,3006,1300,2360,3324, 588, 736,6160,2606, 744, 669,3536,3828,6161,1358, # 3440
 199, 723, 848, 933, 851,1939,1505,1514,1338,1618,1831,4656,1634,3613, 443,2740, # 3456
3829, 717,1947, 491,1914,6162,2551,1542,4121,1025,6163,1099,1223, 198,3040,2722, # 3472
 370, 410,1905,2589, 998,1248,3182,2380, 519,1449,4122,1710, 947, 928,1153,4341, # 3488
2277, 344,2624,1511, 615, 105, 161,1212,1076,1960,3130,2054,1926,1175,1906,2473, # 3504
 414,1873,2801,6164,2309, 315,1319,3325, 318,2018,2146,2157, 963, 631, 223,4342, # 3520
4343,2675, 479,3711,1197,2625,3712,2676,2361,6165,4344,4123,6166,2451,3183,1886, # 3536
2184,1674,1330,1711,1635,1506, 799, 219,3250,3083,3954,1677,3713,3326,2081,3614, # 3552
1652,2073,4657,1147,3041,1752, 643,1961, 147,1974,3955,6167,1716,2037, 918,3007, # 3568
1994, 120,1537, 118, 609,3184,4345, 740,3455,1219, 332,1615,3830,6168,1621,2980, # 3584
1582, 783, 212, 553,2350,3714,1349,2433,2082,4124, 889,6169,2310,1275,1410, 973, # 3600
 166,1320,3456,1797,1215,3185,2885,1846,2590,2763,4658, 629, 822,3008, 763, 940, # 3616
1990,2862, 439,2409,1566,1240,1622, 926,1282,1907,2764, 654,2210,1607, 327,1130, # 3632
3956,1678,1623,6170,2434,2192, 686, 608,3831,3715, 903,3957,3042,6171,2741,1522, # 3648
1915,1105,1555,2552,1359, 323,3251,4346,3457, 738,1354,2553,2311,2334,1828,2003, # 3664
3832,1753,2351,1227,6172,1887,4125,1478,6173,2410,1874,1712,1847, 520,1204,2607, # 3680
 264,4659, 836,2677,2102, 600,4660,3833,2278,3084,6174,4347,3615,1342, 640, 532, # 3696
 543,2608,1888,2400,2591,1009,4348,1497, 341,1737,3616,2723,1394, 529,3252,1321, # 3712
 983,4661,1515,2120, 971,2592, 924, 287,1662,3186,4349,2700,4350,1519, 908,1948, # 3728
2452, 156, 796,1629,1486,2223,2055, 694,4126,1259,1036,3392,1213,2249,2742,1889, # 3744
1230,3958,1015, 910, 408, 559,3617,4662, 746, 725, 935,4663,3959,3009,1289, 563, # 3760
 867,4664,3960,1567,2981,2038,2626, 988,2263,2381,4351, 143,2374, 704,1895,6175, # 3776
1188,3716,2088, 673,3085,2362,4352, 484,1608,1921,2765,2918, 215, 904,3618,3537, # 3792
 894, 509, 976,3043,2701,3961,4353,2837,2982, 498,6176,6177,1102,3538,1332,3393, # 3808
1487,1636,1637, 233, 245,3962, 383, 650, 995,3044, 460,1520,1206,2352, 749,3327, # 3824
 530, 700, 389,1438,1560,1773,3963,2264, 719,2951,2724,3834, 870,1832,1644,1000, # 3840
 839,2474,3717, 197,1630,3394, 365,2886,3964,1285,2133, 734, 922, 818,1106, 732, # 3856
 480,2083,1774,3458, 923,2279,1350, 221,3086,  85,2233,2234,3835,1585,3010,2147, # 3872
1387,1705,2382,1619,2475, 133, 239,2802,1991,1016,2084,2383, 411,2838,1113, 651, # 3888
1985,1160,3328, 990,1863,3087,1048,1276,2647, 265,2627,1599,3253,2056, 150, 638, # 3904
2019, 656, 853, 326,1479, 680,1439,4354,1001,1759, 413,3459,3395,2492,1431, 459, # 3920
4355,1125,3329,2265,1953,1450,2065,2863, 849, 351,2678,3131,3254,3255,1104,1577, # 3936
 227,1351,1645,2453,2193,1421,2887, 812,2121, 634,  95,2435, 201,2312,4665,1646, # 3952
1671,2743,1601,2554,2702,2648,2280,1315,1366,2089,3132,1573,3718,3965,1729,1189, # 3968
 328,2679,1077,1940,1136, 558,1283, 964,1195, 621,2074,1199,1743,3460,3619,1896, # 3984
1916,1890,3836,2952,1154,2112,1064, 862, 378,3011,2066,2113,2803,1568,2839,6178, # 4000
3088,2919,1941,1660,2004,1992,2194, 142, 707,1590,1708,1624,1922,1023,1836,1233, # 4016
1004,2313, 789, 741,3620,6179,1609,2411,1200,4127,3719,3720,4666,2057,3721, 593, # 4032
2840, 367,2920,1878,6180,3461,1521, 628,1168, 692,2211,2649, 300, 720,2067,2571, # 4048
2953,3396, 959,2504,3966,3539,3462,1977, 701,6181, 954,1043, 800, 681, 183,3722, # 4064
1803,1730,3540,4128,2103, 815,2314, 174, 467, 230,2454,1093,2134, 755,3541,3397, # 4080
1141,1162,6182,1738,2039, 270,3256,2513,1005,1647,2185,3837, 858,1679,1897,1719, # 4096
2954,2324,1806, 402, 670, 167,4129,1498,2158,2104, 750,6183, 915, 189,1680,1551, # 4112
 455,4356,1501,2455, 405,1095,2955, 338,1586,1266,1819, 570, 641,1324, 237,1556, # 4128
2650,1388,3723,6184,1368,2384,1343,1978,3089,2436, 879,3724, 792,1191, 758,3012, # 4144
1411,2135,1322,4357, 240,4667,1848,3725,1574,6185, 420,3045,1546,1391, 714,4358, # 4160
1967, 941,1864, 863, 664, 426, 560,1731,2680,1785,2864,1949,2363, 403,3330,1415, # 4176
1279,2136,1697,2335, 204, 721,2097,3838,  90,6186,2085,2505, 191,3967, 124,2148, # 4192
1376,1798,1178,1107,1898,1405, 860,4359,1243,1272,2375,2983,1558,2456,1638, 113, # 4208
3621, 578,1923,2609, 880, 386,4130, 784,2186,2266,1422,2956,2172,1722, 497, 263, # 4224
2514,1267,2412,2610, 177,2703,3542, 774,1927,1344, 616,1432,1595,1018, 172,4360, # 4240
2325, 911,4361, 438,1468,3622, 794,3968,2024,2173,1681,1829,2957, 945, 895,3090, # 4256
 575,2212,2476, 475,2401,2681, 785,2744,1745,2293,2555,1975,3133,2865, 394,4668, # 4272
3839, 635,4131, 639, 202,1507,2195,2766,1345,1435,2572,3726,1908,1184,1181,2457, # 4288
3727,3134,4362, 843,2611, 437, 916,4669, 234, 769,1884,3046,3047,3623, 833,6187, # 4304
1639,2250,2402,1355,1185,2010,2047, 999, 525,1732,1290,1488,2612, 948,1578,3728, # 4320
2413,2477,1216,2725,2159, 334,3840,1328,3624,2921,1525,4132, 564,1056, 891,4363, # 4336
1444,1698,2385,2251,3729,1365,2281,2235,1717,6188, 864,3841,2515, 444, 527,2767, # 4352
2922,3625, 544, 461,6189, 566, 209,2437,3398,2098,1065,2068,3331,3626,3257,2137, # 4368  #last 512
#Everything below is of no interest for detection purpose
2138,2122,3730,2888,1995,1820,1044,6190,6191,6192,6193,6194,6195,6196,6197,6198, # 4384
6199,6200,6201,6202,6203,6204,6205,4670,6206,6207,6208,6209,6210,6211,6212,6213, # 4400
6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,6224,6225,6226,6227,6228,6229, # 4416
6230,6231,6232,6233,6234,6235,6236,6237,3187,6238,6239,3969,6240,6241,6242,6243, # 4432
6244,4671,6245,6246,4672,6247,6248,4133,6249,6250,4364,6251,2923,2556,2613,4673, # 4448
4365,3970,6252,6253,6254,6255,4674,6256,6257,6258,2768,2353,4366,4675,4676,3188, # 4464
4367,3463,6259,4134,4677,4678,6260,2267,6261,3842,3332,4368,3543,6262,6263,6264, # 4480
3013,1954,1928,4135,4679,6265,6266,2478,3091,6267,4680,4369,6268,6269,1699,6270, # 4496
3544,4136,4681,6271,4137,6272,4370,2804,6273,6274,2593,3971,3972,4682,6275,2236, # 4512
4683,6276,6277,4684,6278,6279,4138,3973,4685,6280,6281,3258,6282,6283,6284,6285, # 4528
3974,4686,2841,3975,6286,6287,3545,6288,6289,4139,4687,4140,6290,4141,6291,4142, # 4544
6292,6293,3333,6294,6295,6296,4371,6297,3399,6298,6299,4372,3976,6300,6301,6302, # 4560
4373,6303,6304,3843,3731,6305,4688,4374,6306,6307,3259,2294,6308,3732,2530,4143, # 4576
6309,4689,6310,6311,6312,3048,6313,6314,4690,3733,2237,6315,6316,2282,3334,6317, # 4592
6318,3844,6319,6320,4691,6321,3400,4692,6322,4693,6323,3049,6324,4375,6325,3977, # 4608
6326,6327,6328,3546,6329,4694,3335,6330,4695,4696,6331,6332,6333,6334,4376,3978, # 4624
6335,4697,3979,4144,6336,3980,4698,6337,6338,6339,6340,6341,4699,4700,4701,6342, # 4640
6343,4702,6344,6345,4703,6346,6347,4704,6348,4705,4706,3135,6349,4707,6350,4708, # 4656
6351,4377,6352,4709,3734,4145,6353,2506,4710,3189,6354,3050,4711,3981,6355,3547, # 4672
3014,4146,4378,3735,2651,3845,3260,3136,2224,1986,6356,3401,6357,4712,2594,3627, # 4688
3137,2573,3736,3982,4713,3628,4714,4715,2682,3629,4716,6358,3630,4379,3631,6359, # 4704
6360,6361,3983,6362,6363,6364,6365,4147,3846,4717,6366,6367,3737,2842,6368,4718, # 4720
2628,6369,3261,6370,2386,6371,6372,3738,3984,4719,3464,4720,3402,6373,2924,3336, # 4736
4148,2866,6374,2805,3262,4380,2704,2069,2531,3138,2806,2984,6375,2769,6376,4721, # 4752
4722,3403,6377,6378,3548,6379,6380,2705,3092,1979,4149,2629,3337,2889,6381,3338, # 4768
4150,2557,3339,4381,6382,3190,3263,3739,6383,4151,4723,4152,2558,2574,3404,3191, # 4784
6384,6385,4153,6386,4724,4382,6387,6388,4383,6389,6390,4154,6391,4725,3985,6392, # 4800
3847,4155,6393,6394,6395,6396,6397,3465,6398,4384,6399,6400,6401,6402,6403,6404, # 4816
4156,6405,6406,6407,6408,2123,6409,6410,2326,3192,4726,6411,6412,6413,6414,4385, # 4832
4157,6415,6416,4158,6417,3093,3848,6418,3986,6419,6420,3849,6421,6422,6423,4159, # 4848
6424,6425,4160,6426,3740,6427,6428,6429,6430,3987,6431,4727,6432,2238,6433,6434, # 4864
4386,3988,6435,6436,3632,6437,6438,2843,6439,6440,6441,6442,3633,6443,2958,6444, # 4880
6445,3466,6446,2364,4387,3850,6447,4388,2959,3340,6448,3851,6449,4728,6450,6451, # 4896
3264,4729,6452,3193,6453,4389,4390,2706,3341,4730,6454,3139,6455,3194,6456,3051, # 4912
2124,3852,1602,4391,4161,3853,1158,3854,4162,3989,4392,3990,4731,4732,4393,2040, # 4928
4163,4394,3265,6457,2807,3467,3855,6458,6459,6460,3991,3468,4733,4734,6461,3140, # 4944
2960,6462,4735,6463,6464,6465,6466,4736,4737,4738,4739,6467,6468,4164,2403,3856, # 4960
6469,6470,2770,2844,6471,4740,6472,6473,6474,6475,6476,6477,6478,3195,6479,4741, # 4976
4395,6480,2867,6481,4742,2808,6482,2493,4165,6483,6484,6485,6486,2295,4743,6487, # 4992
6488,6489,3634,6490,6491,6492,6493,6494,6495,6496,2985,4744,6497,6498,4745,6499, # 5008
6500,2925,3141,4166,6501,6502,4746,6503,6504,4747,6505,6506,6507,2890,6508,6509, # 5024
6510,6511,6512,6513,6514,6515,6516,6517,6518,6519,3469,4167,6520,6521,6522,4748, # 5040
4396,3741,4397,4749,4398,3342,2125,4750,6523,4751,4752,4753,3052,6524,2961,4168, # 5056
6525,4754,6526,4755,4399,2926,4169,6527,3857,6528,4400,4170,6529,4171,6530,6531, # 5072
2595,6532,6533,6534,6535,3635,6536,6537,6538,6539,6540,6541,6542,4756,6543,6544, # 5088
6545,6546,6547,6548,4401,6549,6550,6551,6552,4402,3405,4757,4403,6553,6554,6555, # 5104
4172,3742,6556,6557,6558,3992,3636,6559,6560,3053,2726,6561,3549,4173,3054,4404, # 5120
6562,6563,3993,4405,3266,3550,2809,4406,6564,6565,6566,4758,4759,6567,3743,6568, # 5136
4760,3744,4761,3470,6569,6570,6571,4407,6572,3745,4174,6573,4175,2810,4176,3196, # 5152
4762,6574,4177,6575,6576,2494,2891,3551,6577,6578,3471,6579,4408,6580,3015,3197, # 5168
6581,3343,2532,3994,3858,6582,3094,3406,4409,6583,2892,4178,4763,4410,3016,4411, # 5184
6584,3995,3142,3017,2683,6585,4179,6586,6587,4764,4412,6588,6589,4413,6590,2986, # 5200
6591,2962,3552,6592,2963,3472,6593,6594,4180,4765,6595,6596,2225,3267,4414,6597, # 5216
3407,3637,4766,6598,6599,3198,6600,4415,6601,3859,3199,6602,3473,4767,2811,4416, # 5232
1856,3268,3200,2575,3996,3997,3201,4417,6603,3095,2927,6604,3143,6605,2268,6606, # 5248
3998,3860,3096,2771,6607,6608,3638,2495,4768,6609,3861,6610,3269,2745,4769,4181, # 5264
3553,6611,2845,3270,6612,6613,6614,3862,6615,6616,4770,4771,6617,3474,3999,4418, # 5280
4419,6618,3639,3344,6619,4772,4182,6620,2126,6621,6622,6623,4420,4773,6624,3018, # 5296
6625,4774,3554,6626,4183,2025,3746,6627,4184,2707,6628,4421,4422,3097,1775,4185, # 5312
3555,6629,6630,2868,6631,6632,4423,6633,6634,4424,2414,2533,2928,6635,4186,2387, # 5328
6636,4775,6637,4187,6638,1891,4425,3202,3203,6639,6640,4776,6641,3345,6642,6643, # 5344
3640,6644,3475,3346,3641,4000,6645,3144,6646,3098,2812,4188,3642,3204,6647,3863, # 5360
3476,6648,3864,6649,4426,4001,6650,6651,6652,2576,6653,4189,4777,6654,6655,6656, # 5376
2846,6657,3477,3205,4002,6658,4003,6659,3347,2252,6660,6661,6662,4778,6663,6664, # 5392
6665,6666,6667,6668,6669,4779,4780,2048,6670,3478,3099,6671,3556,3747,4004,6672, # 5408
6673,6674,3145,4005,3748,6675,6676,6677,6678,6679,3408,6680,6681,6682,6683,3206, # 5424
3207,6684,6685,4781,4427,6686,4782,4783,4784,6687,6688,6689,4190,6690,6691,3479, # 5440
6692,2746,6693,4428,6694,6695,6696,6697,6698,6699,4785,6700,6701,3208,2727,6702, # 5456
3146,6703,6704,3409,2196,6705,4429,6706,6707,6708,2534,1996,6709,6710,6711,2747, # 5472
6712,6713,6714,4786,3643,6715,4430,4431,6716,3557,6717,4432,4433,6718,6719,6720, # 5488
6721,3749,6722,4006,4787,6723,6724,3644,4788,4434,6725,6726,4789,2772,6727,6728, # 5504
6729,6730,6731,2708,3865,2813,4435,6732,6733,4790,4791,3480,6734,6735,6736,6737, # 5520
4436,3348,6738,3410,4007,6739,6740,4008,6741,6742,4792,3411,4191,6743,6744,6745, # 5536
6746,6747,3866,6748,3750,6749,6750,6751,6752,6753,6754,6755,3867,6756,4009,6757, # 5552
4793,4794,6758,2814,2987,6759,6760,6761,4437,6762,6763,6764,6765,3645,6766,6767, # 5568
3481,4192,6768,3751,6769,6770,2174,6771,3868,3752,6772,6773,6774,4193,4795,4438, # 5584
3558,4796,4439,6775,4797,6776,6777,4798,6778,4799,3559,4800,6779,6780,6781,3482, # 5600
6782,2893,6783,6784,4194,4801,4010,6785,6786,4440,6787,4011,6788,6789,6790,6791, # 5616
6792,6793,4802,6794,6795,6796,4012,6797,6798,6799,6800,3349,4803,3483,6801,4804, # 5632
4195,6802,4013,6803,6804,4196,6805,4014,4015,6806,2847,3271,2848,6807,3484,6808, # 5648
6809,6810,4441,6811,4442,4197,4443,3272,4805,6812,3412,4016,1579,6813,6814,4017, # 5664
6815,3869,6816,2964,6817,4806,6818,6819,4018,3646,6820,6821,4807,4019,4020,6822, # 5680
6823,3560,6824,6825,4021,4444,6826,4198,6827,6828,4445,6829,6830,4199,4808,6831, # 5696
6832,6833,3870,3019,2458,6834,3753,3413,3350,6835,4809,3871,4810,3561,4446,6836, # 5712
6837,4447,4811,4812,6838,2459,4448,6839,4449,6840,6841,4022,3872,6842,4813,4814, # 5728
6843,6844,4815,4200,4201,4202,6845,4023,6846,6847,4450,3562,3873,6848,6849,4816, # 5744
4817,6850,4451,4818,2139,6851,3563,6852,6853,3351,6854,6855,3352,4024,2709,3414, # 5760
4203,4452,6856,4204,6857,6858,3874,3875,6859,6860,4819,6861,6862,6863,6864,4453, # 5776
3647,6865,6866,4820,6867,6868,6869,6870,4454,6871,2869,6872,6873,4821,6874,3754, # 5792
6875,4822,4205,6876,6877,6878,3648,4206,4455,6879,4823,6880,4824,3876,6881,3055, # 5808
4207,6882,3415,6883,6884,6885,4208,4209,6886,4210,3353,6887,3354,3564,3209,3485, # 5824
2652,6888,2728,6889,3210,3755,6890,4025,4456,6891,4825,6892,6893,6894,6895,4211, # 5840
6896,6897,6898,4826,6899,6900,4212,6901,4827,6902,2773,3565,6903,4828,6904,6905, # 5856
6906,6907,3649,3650,6908,2849,3566,6909,3567,3100,6910,6911,6912,6913,6914,6915, # 5872
4026,6916,3355,4829,3056,4457,3756,6917,3651,6918,4213,3652,2870,6919,4458,6920, # 5888
2438,6921,6922,3757,2774,4830,6923,3356,4831,4832,6924,4833,4459,3653,2507,6925, # 5904
4834,2535,6926,6927,3273,4027,3147,6928,3568,6929,6930,6931,4460,6932,3877,4461, # 5920
2729,3654,6933,6934,6935,6936,2175,4835,2630,4214,4028,4462,4836,4215,6937,3148, # 5936
4216,4463,4837,4838,4217,6938,6939,2850,4839,6940,4464,6941,6942,6943,4840,6944, # 5952
4218,3274,4465,6945,6946,2710,6947,4841,4466,6948,6949,2894,6950,6951,4842,6952, # 5968
4219,3057,2871,6953,6954,6955,6956,4467,6957,2711,6958,6959,6960,3275,3101,4843, # 5984
6961,3357,3569,6962,4844,6963,6964,4468,4845,3570,6965,3102,4846,3758,6966,4847, # 6000
3878,4848,4849,4029,6967,2929,3879,4850,4851,6968,6969,1733,6970,4220,6971,6972, # 6016
6973,6974,6975,6976,4852,6977,6978,6979,6980,6981,6982,3759,6983,6984,6985,3486, # 6032
3487,6986,3488,3416,6987,6988,6989,6990,6991,6992,6993,6994,6995,6996,6997,4853, # 6048
6998,6999,4030,7000,7001,3211,7002,7003,4221,7004,7005,3571,4031,7006,3572,7007, # 6064
2614,4854,2577,7008,7009,2965,3655,3656,4855,2775,3489,3880,4222,4856,3881,4032, # 6080
3882,3657,2730,3490,4857,7010,3149,7011,4469,4858,2496,3491,4859,2283,7012,7013, # 6096
7014,2365,4860,4470,7015,7016,3760,7017,7018,4223,1917,7019,7020,7021,4471,7022, # 6112
2776,4472,7023,7024,7025,7026,4033,7027,3573,4224,4861,4034,4862,7028,7029,1929, # 6128
3883,4035,7030,4473,3058,7031,2536,3761,3884,7032,4036,7033,2966,2895,1968,4474, # 6144
3276,4225,3417,3492,4226,2105,7034,7035,1754,2596,3762,4227,4863,4475,3763,4864, # 6160
3764,2615,2777,3103,3765,3658,3418,4865,2296,3766,2815,7036,7037,7038,3574,2872, # 6176
3277,4476,7039,4037,4477,7040,7041,4038,7042,7043,7044,7045,7046,7047,2537,7048, # 6192
7049,7050,7051,7052,7053,7054,4478,7055,7056,3767,3659,4228,3575,7057,7058,4229, # 6208
7059,7060,7061,3660,7062,3212,7063,3885,4039,2460,7064,7065,7066,7067,7068,7069, # 6224
7070,7071,7072,7073,7074,4866,3768,4867,7075,7076,7077,7078,4868,3358,3278,2653, # 6240
7079,7080,4479,3886,7081,7082,4869,7083,7084,7085,7086,7087,7088,2538,7089,7090, # 6256
7091,4040,3150,3769,4870,4041,2896,3359,4230,2930,7092,3279,7093,2967,4480,3213, # 6272
4481,3661,7094,7095,7096,7097,7098,7099,7100,7101,7102,2461,3770,7103,7104,4231, # 6288
3151,7105,7106,7107,4042,3662,7108,7109,4871,3663,4872,4043,3059,7110,7111,7112, # 6304
3493,2988,7113,4873,7114,7115,7116,3771,4874,7117,7118,4232,4875,7119,3576,2336, # 6320
4876,7120,4233,3419,4044,4877,4878,4482,4483,4879,4484,4234,7121,3772,4880,1045, # 6336
3280,3664,4881,4882,7122,7123,7124,7125,4883,7126,2778,7127,4485,4486,7128,4884, # 6352
3214,3887,7129,7130,3215,7131,4885,4045,7132,7133,4046,7134,7135,7136,7137,7138, # 6368
7139,7140,7141,7142,7143,4235,7144,4886,7145,7146,7147,4887,7148,7149,7150,4487, # 6384
4047,4488,7151,7152,4888,4048,2989,3888,7153,3665,7154,4049,7155,7156,7157,7158, # 6400
7159,7160,2931,4889,4890,4489,7161,2631,3889,4236,2779,7162,7163,4891,7164,3060, # 6416
7165,1672,4892,7166,4893,4237,3281,4894,7167,7168,3666,7169,3494,7170,7171,4050, # 6432
7172,7173,3104,3360,3420,4490,4051,2684,4052,7174,4053,7175,7176,7177,2253,4054, # 6448
7178,7179,4895,7180,3152,3890,3153,4491,3216,7181,7182,7183,2968,4238,4492,4055, # 6464
7184,2990,7185,2479,7186,7187,4493,7188,7189,7190,7191,7192,4896,7193,4897,2969, # 6480
4494,4898,7194,3495,7195,7196,4899,4495,7197,3105,2731,7198,4900,7199,7200,7201, # 6496
4056,7202,3361,7203,7204,4496,4901,4902,7205,4497,7206,7207,2315,4903,7208,4904, # 6512
7209,4905,2851,7210,7211,3577,7212,3578,4906,7213,4057,3667,4907,7214,4058,2354, # 6528
3891,2376,3217,3773,7215,7216,7217,7218,7219,4498,7220,4908,3282,2685,7221,3496, # 6544
4909,2632,3154,4910,7222,2337,7223,4911,7224,7225,7226,4912,4913,3283,4239,4499, # 6560
7227,2816,7228,7229,7230,7231,7232,7233,7234,4914,4500,4501,7235,7236,7237,2686, # 6576
7238,4915,7239,2897,4502,7240,4503,7241,2516,7242,4504,3362,3218,7243,7244,7245, # 6592
4916,7246,7247,4505,3363,7248,7249,7250,7251,3774,4506,7252,7253,4917,7254,7255, # 6608
3284,2991,4918,4919,3219,3892,4920,3106,3497,4921,7256,7257,7258,4922,7259,4923, # 6624
3364,4507,4508,4059,7260,4240,3498,7261,7262,4924,7263,2992,3893,4060,3220,7264, # 6640
7265,7266,7267,7268,7269,4509,3775,7270,2817,7271,4061,4925,4510,3776,7272,4241, # 6656
4511,3285,7273,7274,3499,7275,7276,7277,4062,4512,4926,7278,3107,3894,7279,7280, # 6672
4927,7281,4513,7282,7283,3668,7284,7285,4242,4514,4243,7286,2058,4515,4928,4929, # 6688
4516,7287,3286,4244,7288,4517,7289,7290,7291,3669,7292,7293,4930,4931,4932,2355, # 6704
4933,7294,2633,4518,7295,4245,7296,7297,4519,7298,7299,4520,4521,4934,7300,4246, # 6720
4522,7301,7302,7303,3579,7304,4247,4935,7305,4936,7306,7307,7308,7309,3777,7310, # 6736
4523,7311,7312,7313,4248,3580,7314,4524,3778,4249,7315,3581,7316,3287,7317,3221, # 6752
7318,4937,7319,7320,7321,7322,7323,7324,4938,4939,7325,4525,7326,7327,7328,4063, # 6768
7329,7330,4940,7331,7332,4941,7333,4526,7334,3500,2780,1741,4942,2026,1742,7335, # 6784
7336,3582,4527,2388,7337,7338,7339,4528,7340,4250,4943,7341,7342,7343,4944,7344, # 6800
7345,7346,3020,7347,4945,7348,7349,7350,7351,3895,7352,3896,4064,3897,7353,7354, # 6816
7355,4251,7356,7357,3898,7358,3779,7359,3780,3288,7360,7361,4529,7362,4946,4530, # 6832
2027,7363,3899,4531,4947,3222,3583,7364,4948,7365,7366,7367,7368,4949,3501,4950, # 6848
3781,4951,4532,7369,2517,4952,4252,4953,3155,7370,4954,4955,4253,2518,4533,7371, # 6864
7372,2712,4254,7373,7374,7375,3670,4956,3671,7376,2389,3502,4065,7377,2338,7378, # 6880
7379,7380,7381,3061,7382,4957,7383,7384,7385,7386,4958,4534,7387,7388,2993,7389, # 6896
3062,7390,4959,7391,7392,7393,4960,3108,4961,7394,4535,7395,4962,3421,4536,7396, # 6912
4963,7397,4964,1857,7398,4965,7399,7400,2176,3584,4966,7401,7402,3422,4537,3900, # 6928
3585,7403,3782,7404,2852,7405,7406,7407,4538,3783,2654,3423,4967,4539,7408,3784, # 6944
3586,2853,4540,4541,7409,3901,7410,3902,7411,7412,3785,3109,2327,3903,7413,7414, # 6960
2970,4066,2932,7415,7416,7417,3904,3672,3424,7418,4542,4543,4544,7419,4968,7420, # 6976
7421,4255,7422,7423,7424,7425,7426,4067,7427,3673,3365,4545,7428,3110,2559,3674, # 6992
7429,7430,3156,7431,7432,3503,7433,3425,4546,7434,3063,2873,7435,3223,4969,4547, # 7008
4548,2898,4256,4068,7436,4069,3587,3786,2933,3787,4257,4970,4971,3788,7437,4972, # 7024
3064,7438,4549,7439,7440,7441,7442,7443,4973,3905,7444,2874,7445,7446,7447,7448, # 7040
3021,7449,4550,3906,3588,4974,7450,7451,3789,3675,7452,2578,7453,4070,7454,7455, # 7056
7456,4258,3676,7457,4975,7458,4976,4259,3790,3504,2634,4977,3677,4551,4260,7459, # 7072
7460,7461,7462,3907,4261,4978,7463,7464,7465,7466,4979,4980,7467,7468,2213,4262, # 7088
7469,7470,7471,3678,4981,7472,2439,7473,4263,3224,3289,7474,3908,2415,4982,7475, # 7104
4264,7476,4983,2655,7477,7478,2732,4552,2854,2875,7479,7480,4265,7481,4553,4984, # 7120
7482,7483,4266,7484,3679,3366,3680,2818,2781,2782,3367,3589,4554,3065,7485,4071, # 7136
2899,7486,7487,3157,2462,4072,4555,4073,4985,4986,3111,4267,2687,3368,4556,4074, # 7152
3791,4268,7488,3909,2783,7489,2656,1962,3158,4557,4987,1963,3159,3160,7490,3112, # 7168
4988,4989,3022,4990,4991,3792,2855,7491,7492,2971,4558,7493,7494,4992,7495,7496, # 7184
7497,7498,4993,7499,3426,4559,4994,7500,3681,4560,4269,4270,3910,7501,4075,4995, # 7200
4271,7502,7503,4076,7504,4996,7505,3225,4997,4272,4077,2819,3023,7506,7507,2733, # 7216
4561,7508,4562,7509,3369,3793,7510,3590,2508,7511,7512,4273,3113,2994,2616,7513, # 7232
7514,7515,7516,7517,7518,2820,3911,4078,2748,7519,7520,4563,4998,7521,7522,7523, # 7248
7524,4999,4274,7525,4564,3682,2239,4079,4565,7526,7527,7528,7529,5000,7530,7531, # 7264
5001,4275,3794,7532,7533,7534,3066,5002,4566,3161,7535,7536,4080,7537,3162,7538, # 7280
7539,4567,7540,7541,7542,7543,7544,7545,5003,7546,4568,7547,7548,7549,7550,7551, # 7296
7552,7553,7554,7555,7556,5004,7557,7558,7559,5005,7560,3795,7561,4569,7562,7563, # 7312
7564,2821,3796,4276,4277,4081,7565,2876,7566,5006,7567,7568,2900,7569,3797,3912, # 7328
7570,7571,7572,4278,7573,7574,7575,5007,7576,7577,5008,7578,7579,4279,2934,7580, # 7344
7581,5009,7582,4570,7583,4280,7584,7585,7586,4571,4572,3913,7587,4573,3505,7588, # 7360
5010,7589,7590,7591,7592,3798,4574,7593,7594,5011,7595,4281,7596,7597,7598,4282, # 7376
5012,7599,7600,5013,3163,7601,5014,7602,3914,7603,7604,2734,4575,4576,4577,7605, # 7392
7606,7607,7608,7609,3506,5015,4578,7610,4082,7611,2822,2901,2579,3683,3024,4579, # 7408
3507,7612,4580,7613,3226,3799,5016,7614,7615,7616,7617,7618,7619,7620,2995,3290, # 7424
7621,4083,7622,5017,7623,7624,7625,7626,7627,4581,3915,7628,3291,7629,5018,7630, # 7440
7631,7632,7633,4084,7634,7635,3427,3800,7636,7637,4582,7638,5019,4583,5020,7639, # 7456
3916,7640,3801,5021,4584,4283,7641,7642,3428,3591,2269,7643,2617,7644,4585,3592, # 7472
7645,4586,2902,7646,7647,3227,5022,7648,4587,7649,4284,7650,7651,7652,4588,2284, # 7488
7653,5023,7654,7655,7656,4589,5024,3802,7657,7658,5025,3508,4590,7659,7660,7661, # 7504
1969,5026,7662,7663,3684,1821,2688,7664,2028,2509,4285,7665,2823,1841,7666,2689, # 7520
3114,7667,3917,4085,2160,5027,5028,2972,7668,5029,7669,7670,7671,3593,4086,7672, # 7536
4591,4087,5030,3803,7673,7674,7675,7676,7677,7678,7679,4286,2366,4592,4593,3067, # 7552
2328,7680,7681,4594,3594,3918,2029,4287,7682,5031,3919,3370,4288,4595,2856,7683, # 7568
3509,7684,7685,5032,5033,7686,7687,3804,2784,7688,7689,7690,7691,3371,7692,7693, # 7584
2877,5034,7694,7695,3920,4289,4088,7696,7697,7698,5035,7699,5036,4290,5037,5038, # 7600
5039,7700,7701,7702,5040,5041,3228,7703,1760,7704,5042,3229,4596,2106,4089,7705, # 7616
4597,2824,5043,2107,3372,7706,4291,4090,5044,7707,4091,7708,5045,3025,3805,4598, # 7632
4292,4293,4294,3373,7709,4599,7710,5046,7711,7712,5047,5048,3806,7713,7714,7715, # 7648
5049,7716,7717,7718,7719,4600,5050,7720,7721,7722,5051,7723,4295,3429,7724,7725, # 7664
7726,7727,3921,7728,3292,5052,4092,7729,7730,7731,7732,7733,7734,7735,5053,5054, # 7680
7736,7737,7738,7739,3922,3685,7740,7741,7742,7743,2635,5055,7744,5056,4601,7745, # 7696
7746,2560,7747,7748,7749,7750,3923,7751,7752,7753,7754,7755,4296,2903,7756,7757, # 7712
7758,7759,7760,3924,7761,5057,4297,7762,7763,5058,4298,7764,4093,7765,7766,5059, # 7728
3925,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,3595,7777,4299,5060,4094, # 7744
7778,3293,5061,7779,7780,4300,7781,7782,4602,7783,3596,7784,7785,3430,2367,7786, # 7760
3164,5062,5063,4301,7787,7788,4095,5064,5065,7789,3374,3115,7790,7791,7792,7793, # 7776
7794,7795,7796,3597,4603,7797,7798,3686,3116,3807,5066,7799,7800,5067,7801,7802, # 7792
4604,4302,5068,4303,4096,7803,7804,3294,7805,7806,5069,4605,2690,7807,3026,7808, # 7808
7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824, # 7824
7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840, # 7840
7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856, # 7856
7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872, # 7872
7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,7888, # 7888
7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,7904, # 7904
7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,7920, # 7920
7921,7922,7923,7924,3926,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935, # 7936
7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951, # 7952
7952,7953,7954,7955,7956,7957,7958,7959,7960,7961,7962,7963,7964,7965,7966,7967, # 7968
7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983, # 7984
7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999, # 8000
8000,8001,8002,8003,8004,8005,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015, # 8016
8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031, # 8032
8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047, # 8048
8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063, # 8064
8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079, # 8080
8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095, # 8096
8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111, # 8112
8112,8113,8114,8115,8116,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127, # 8128
8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143, # 8144
8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159, # 8160
8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175, # 8176
8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191, # 8192
8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207, # 8208
8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223, # 8224
8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239, # 8240
8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255, # 8256
8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271) # 8272

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py000064400000026066151733566760024066 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
#          Simon Montagu
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#   Shoshannah Forbes - original C code (?)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# Windows-1255 language model
# Character Mapping Table:
win1255_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 69, 91, 79, 80, 92, 89, 97, 90, 68,111,112, 82, 73, 95, 85,  # 40
 78,121, 86, 71, 67,102,107, 84,114,103,115,253,253,253,253,253,  # 50
253, 50, 74, 60, 61, 42, 76, 70, 64, 53,105, 93, 56, 65, 54, 49,  # 60
 66,110, 51, 43, 44, 63, 81, 77, 98, 75,108,253,253,253,253,253,  # 70
124,202,203,204,205, 40, 58,206,207,208,209,210,211,212,213,214,
215, 83, 52, 47, 46, 72, 32, 94,216,113,217,109,218,219,220,221,
 34,116,222,118,100,223,224,117,119,104,125,225,226, 87, 99,227,
106,122,123,228, 55,229,230,101,231,232,120,233, 48, 39, 57,234,
 30, 59, 41, 88, 33, 37, 36, 31, 29, 35,235, 62, 28,236,126,237,
238, 38, 45,239,240,241,242,243,127,244,245,246,247,248,249,250,
  9,  8, 20, 16,  3,  2, 24, 14, 22,  1, 25, 15,  4, 11,  6, 23,
 12, 19, 13, 26, 18, 27, 21, 17,  7, 10,  5,251,252,128, 96,253,
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 98.4004%
# first 1024 sequences: 1.5981%
# rest  sequences:      0.087%
# negative sequences:   0.0015%
HebrewLangModel = (
0,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,3,2,1,2,0,1,0,0,
3,0,3,1,0,0,1,3,2,0,1,1,2,0,2,2,2,1,1,1,1,2,1,1,1,2,0,0,2,2,0,1,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,
1,2,1,2,1,2,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,
1,2,1,3,1,1,0,0,2,0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,0,1,2,2,1,3,
1,2,1,1,2,2,0,0,2,2,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,1,0,1,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,2,2,2,3,2,
1,2,1,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,3,2,2,3,2,2,2,1,2,2,2,2,
1,2,1,1,2,2,0,1,2,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,2,2,2,2,2,
0,2,0,2,2,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,0,2,2,2,
0,2,1,2,2,2,0,0,2,1,0,0,0,0,1,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,1,2,3,2,2,2,
1,2,1,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,
3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,1,0,2,0,2,
0,2,1,2,2,2,0,0,1,2,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,2,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,2,2,3,2,1,2,1,1,1,
0,1,1,1,1,1,3,0,1,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,0,1,0,0,1,0,0,0,0,
0,0,1,0,0,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,
0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,2,3,3,3,2,1,2,3,3,2,3,3,3,3,2,3,2,1,2,0,2,1,2,
0,2,0,2,2,2,0,0,1,2,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,
3,3,3,3,3,3,3,3,3,2,3,3,3,1,2,2,3,3,2,3,2,3,2,2,3,1,2,2,0,2,2,2,
0,2,1,2,2,2,0,0,1,2,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,2,2,2,3,3,3,3,1,3,2,2,2,
0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,2,3,2,2,2,1,2,2,0,2,2,2,2,
0,2,0,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,1,3,2,3,3,2,3,3,2,2,1,2,2,2,2,2,2,
0,2,1,2,1,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,2,3,2,3,3,2,3,3,3,3,2,3,2,3,3,3,3,3,2,2,2,2,2,2,2,1,
0,2,0,1,2,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,2,1,2,3,3,3,3,3,3,3,2,3,2,3,2,1,2,3,0,2,1,2,2,
0,2,1,1,2,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,
3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,1,3,1,2,2,2,1,2,3,3,1,2,1,2,2,2,2,
0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,0,2,3,3,3,1,3,3,3,1,2,2,2,2,1,1,2,2,2,2,2,2,
0,2,0,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,2,3,3,3,2,2,3,3,3,2,1,2,3,2,3,2,2,2,2,1,2,1,1,1,2,2,
0,2,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,
1,0,1,0,0,0,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,2,3,3,2,3,1,2,2,2,2,3,2,3,1,1,2,2,1,2,2,1,1,0,2,2,2,2,
0,1,0,1,2,2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,0,0,1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,1,0,1,0,1,1,0,1,1,0,0,0,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
3,2,2,1,2,2,2,2,2,2,2,1,2,2,1,2,2,1,1,1,1,1,1,1,1,2,1,1,0,3,3,3,
0,3,0,2,2,2,2,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,1,2,2,2,1,1,1,2,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,0,2,2,0,0,0,0,0,0,
0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,1,0,2,1,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,3,1,1,2,2,2,2,2,1,2,2,2,1,1,2,2,2,2,2,2,2,1,2,2,1,0,1,1,1,1,0,
0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,1,1,1,1,2,1,1,2,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,
0,0,2,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,0,0,
2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,1,2,1,2,1,1,1,1,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,2,1,2,2,2,2,2,2,2,2,2,2,1,2,1,2,1,1,2,1,1,1,2,1,2,1,2,0,1,0,1,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,1,2,2,2,1,2,2,2,2,2,2,2,2,1,2,1,1,1,1,1,1,2,1,2,1,1,0,1,0,1,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,
0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,1,1,1,1,1,1,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,2,0,1,1,1,0,1,0,0,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,
0,1,1,1,2,1,2,2,2,0,2,0,2,0,1,1,2,1,1,1,1,2,1,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,1,0,0,0,0,0,1,0,1,2,2,0,1,0,0,1,1,2,2,1,2,0,2,0,0,0,1,2,0,1,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,2,0,2,1,2,0,2,0,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,1,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,1,0,2,1,1,0,1,0,0,1,1,1,2,2,0,0,1,0,0,0,1,0,0,1,
1,1,2,1,0,1,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,2,2,1,
0,2,0,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,0,0,1,0,1,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,2,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,1,1,0,1,0,0,0,1,1,0,1,
2,0,1,0,1,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,0,0,1,1,2,1,1,2,0,1,0,0,0,1,1,0,1,
1,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,0,0,2,1,1,2,0,2,0,0,0,1,1,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,2,1,1,0,1,0,0,2,2,1,2,1,1,0,1,0,0,0,1,1,0,1,
2,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,2,2,0,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,1,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,2,2,0,0,0,0,2,1,1,1,0,2,1,1,0,0,0,2,1,0,1,
1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,1,1,0,2,1,1,0,1,0,0,0,1,1,0,1,
2,2,1,1,1,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,2,1,1,0,1,0,0,1,1,0,1,2,1,0,2,0,0,0,1,1,0,1,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,
0,1,0,0,2,0,2,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,1,1,1,0,1,0,0,1,0,0,0,1,0,0,1,
1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,1,0,1,1,0,0,1,0,0,2,1,1,1,1,1,0,1,0,0,0,0,1,0,1,
0,1,1,1,2,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0,
)

Win1255HebrewModel = {
  'charToOrderMap': win1255_CharToOrderMap,
  'precedenceMatrix': HebrewLangModel,
  'mTypicalPositiveRatio': 0.984004,
  'keepEnglishLetter': False,
  'charsetName': "windows-1255"
}

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py000064400000106253151733566760022502 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# GB2312 most frequently used character table
#
# Char to FreqOrder table , from hz6763

# 512  --> 0.79  -- 0.79
# 1024 --> 0.92  -- 0.13
# 2048 --> 0.98  -- 0.06
# 6768 --> 1.00  -- 0.02
#
# Ideal Distribution Ratio = 0.79135/(1-0.79135) = 3.79
# Random Distribution Ration = 512 / (3755 - 512) = 0.157
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher that RDR

GB2312_TYPICAL_DISTRIBUTION_RATIO = 0.9

GB2312_TABLE_SIZE = 3760

GB2312CharToFreqOrder = (
1671, 749,1443,2364,3924,3807,2330,3921,1704,3463,2691,1511,1515, 572,3191,2205,
2361, 224,2558, 479,1711, 963,3162, 440,4060,1905,2966,2947,3580,2647,3961,3842,
2204, 869,4207, 970,2678,5626,2944,2956,1479,4048, 514,3595, 588,1346,2820,3409,
 249,4088,1746,1873,2047,1774, 581,1813, 358,1174,3590,1014,1561,4844,2245, 670,
1636,3112, 889,1286, 953, 556,2327,3060,1290,3141, 613, 185,3477,1367, 850,3820,
1715,2428,2642,2303,2732,3041,2562,2648,3566,3946,1349, 388,3098,2091,1360,3585,
 152,1687,1539, 738,1559,  59,1232,2925,2267,1388,1249,1741,1679,2960, 151,1566,
1125,1352,4271, 924,4296, 385,3166,4459, 310,1245,2850,  70,3285,2729,3534,3575,
2398,3298,3466,1960,2265, 217,3647, 864,1909,2084,4401,2773,1010,3269,5152, 853,
3051,3121,1244,4251,1895, 364,1499,1540,2313,1180,3655,2268, 562, 715,2417,3061,
 544, 336,3768,2380,1752,4075, 950, 280,2425,4382, 183,2759,3272, 333,4297,2155,
1688,2356,1444,1039,4540, 736,1177,3349,2443,2368,2144,2225, 565, 196,1482,3406,
 927,1335,4147, 692, 878,1311,1653,3911,3622,1378,4200,1840,2969,3149,2126,1816,
2534,1546,2393,2760, 737,2494,  13, 447, 245,2747,  38,2765,2129,2589,1079, 606,
 360, 471,3755,2890, 404, 848, 699,1785,1236, 370,2221,1023,3746,2074,2026,2023,
2388,1581,2119, 812,1141,3091,2536,1519, 804,2053, 406,1596,1090, 784, 548,4414,
1806,2264,2936,1100, 343,4114,5096, 622,3358, 743,3668,1510,1626,5020,3567,2513,
3195,4115,5627,2489,2991,  24,2065,2697,1087,2719,  48,1634, 315,  68, 985,2052,
 198,2239,1347,1107,1439, 597,2366,2172, 871,3307, 919,2487,2790,1867, 236,2570,
1413,3794, 906,3365,3381,1701,1982,1818,1524,2924,1205, 616,2586,2072,2004, 575,
 253,3099,  32,1365,1182, 197,1714,2454,1201, 554,3388,3224,2748, 756,2587, 250,
2567,1507,1517,3529,1922,2761,2337,3416,1961,1677,2452,2238,3153, 615, 911,1506,
1474,2495,1265,1906,2749,3756,3280,2161, 898,2714,1759,3450,2243,2444, 563,  26,
3286,2266,3769,3344,2707,3677, 611,1402, 531,1028,2871,4548,1375, 261,2948, 835,
1190,4134, 353, 840,2684,1900,3082,1435,2109,1207,1674, 329,1872,2781,4055,2686,
2104, 608,3318,2423,2957,2768,1108,3739,3512,3271,3985,2203,1771,3520,1418,2054,
1681,1153, 225,1627,2929, 162,2050,2511,3687,1954, 124,1859,2431,1684,3032,2894,
 585,4805,3969,2869,2704,2088,2032,2095,3656,2635,4362,2209, 256, 518,2042,2105,
3777,3657, 643,2298,1148,1779, 190, 989,3544, 414,  11,2135,2063,2979,1471, 403,
3678, 126, 770,1563, 671,2499,3216,2877, 600,1179, 307,2805,4937,1268,1297,2694,
 252,4032,1448,1494,1331,1394, 127,2256, 222,1647,1035,1481,3056,1915,1048, 873,
3651, 210,  33,1608,2516, 200,1520, 415, 102,   0,3389,1287, 817,  91,3299,2940,
 836,1814, 549,2197,1396,1669,2987,3582,2297,2848,4528,1070, 687,  20,1819, 121,
1552,1364,1461,1968,2617,3540,2824,2083, 177, 948,4938,2291, 110,4549,2066, 648,
3359,1755,2110,2114,4642,4845,1693,3937,3308,1257,1869,2123, 208,1804,3159,2992,
2531,2549,3361,2418,1350,2347,2800,2568,1291,2036,2680,  72, 842,1990, 212,1233,
1154,1586,  75,2027,3410,4900,1823,1337,2710,2676, 728,2810,1522,3026,4995, 157,
 755,1050,4022, 710, 785,1936,2194,2085,1406,2777,2400, 150,1250,4049,1206, 807,
1910, 534, 529,3309,1721,1660, 274,  39,2827, 661,2670,1578, 925,3248,3815,1094,
4278,4901,4252,  41,1150,3747,2572,2227,4501,3658,4902,3813,3357,3617,2884,2258,
 887, 538,4187,3199,1294,2439,3042,2329,2343,2497,1255, 107, 543,1527, 521,3478,
3568, 194,5062,  15, 961,3870,1241,1192,2664,  66,5215,3260,2111,1295,1127,2152,
3805,4135, 901,1164,1976, 398,1278, 530,1460, 748, 904,1054,1966,1426,  53,2909,
 509, 523,2279,1534, 536,1019, 239,1685, 460,2353, 673,1065,2401,3600,4298,2272,
1272,2363, 284,1753,3679,4064,1695,  81, 815,2677,2757,2731,1386, 859, 500,4221,
2190,2566, 757,1006,2519,2068,1166,1455, 337,2654,3203,1863,1682,1914,3025,1252,
1409,1366, 847, 714,2834,2038,3209, 964,2970,1901, 885,2553,1078,1756,3049, 301,
1572,3326, 688,2130,1996,2429,1805,1648,2930,3421,2750,3652,3088, 262,1158,1254,
 389,1641,1812, 526,1719, 923,2073,1073,1902, 468, 489,4625,1140, 857,2375,3070,
3319,2863, 380, 116,1328,2693,1161,2244, 273,1212,1884,2769,3011,1775,1142, 461,
3066,1200,2147,2212, 790, 702,2695,4222,1601,1058, 434,2338,5153,3640,  67,2360,
4099,2502, 618,3472,1329, 416,1132, 830,2782,1807,2653,3211,3510,1662, 192,2124,
 296,3979,1739,1611,3684,  23, 118, 324, 446,1239,1225, 293,2520,3814,3795,2535,
3116,  17,1074, 467,2692,2201, 387,2922,  45,1326,3055,1645,3659,2817, 958, 243,
1903,2320,1339,2825,1784,3289, 356, 576, 865,2315,2381,3377,3916,1088,3122,1713,
1655, 935, 628,4689,1034,1327, 441, 800, 720, 894,1979,2183,1528,5289,2702,1071,
4046,3572,2399,1571,3281,  79, 761,1103, 327, 134, 758,1899,1371,1615, 879, 442,
 215,2605,2579, 173,2048,2485,1057,2975,3317,1097,2253,3801,4263,1403,1650,2946,
 814,4968,3487,1548,2644,1567,1285,   2, 295,2636,  97, 946,3576, 832, 141,4257,
3273, 760,3821,3521,3156,2607, 949,1024,1733,1516,1803,1920,2125,2283,2665,3180,
1501,2064,3560,2171,1592, 803,3518,1416, 732,3897,4258,1363,1362,2458, 119,1427,
 602,1525,2608,1605,1639,3175, 694,3064,  10, 465,  76,2000,4846,4208, 444,3781,
1619,3353,2206,1273,3796, 740,2483, 320,1723,2377,3660,2619,1359,1137,1762,1724,
2345,2842,1850,1862, 912, 821,1866, 612,2625,1735,2573,3369,1093, 844,  89, 937,
 930,1424,3564,2413,2972,1004,3046,3019,2011, 711,3171,1452,4178, 428, 801,1943,
 432, 445,2811, 206,4136,1472, 730, 349,  73, 397,2802,2547, 998,1637,1167, 789,
 396,3217, 154,1218, 716,1120,1780,2819,4826,1931,3334,3762,2139,1215,2627, 552,
3664,3628,3232,1405,2383,3111,1356,2652,3577,3320,3101,1703, 640,1045,1370,1246,
4996, 371,1575,2436,1621,2210, 984,4033,1734,2638,  16,4529, 663,2755,3255,1451,
3917,2257,1253,1955,2234,1263,2951, 214,1229, 617, 485, 359,1831,1969, 473,2310,
 750,2058, 165,  80,2864,2419, 361,4344,2416,2479,1134, 796,3726,1266,2943, 860,
2715, 938, 390,2734,1313,1384, 248, 202, 877,1064,2854, 522,3907, 279,1602, 297,
2357, 395,3740, 137,2075, 944,4089,2584,1267,3802,  62,1533,2285, 178, 176, 780,
2440, 201,3707, 590, 478,1560,4354,2117,1075,  30,  74,4643,4004,1635,1441,2745,
 776,2596, 238,1077,1692,1912,2844, 605, 499,1742,3947, 241,3053, 980,1749, 936,
2640,4511,2582, 515,1543,2162,5322,2892,2993, 890,2148,1924, 665,1827,3581,1032,
 968,3163, 339,1044,1896, 270, 583,1791,1720,4367,1194,3488,3669,  43,2523,1657,
 163,2167, 290,1209,1622,3378, 550, 634,2508,2510, 695,2634,2384,2512,1476,1414,
 220,1469,2341,2138,2852,3183,2900,4939,2865,3502,1211,3680, 854,3227,1299,2976,
3172, 186,2998,1459, 443,1067,3251,1495, 321,1932,3054, 909, 753,1410,1828, 436,
2441,1119,1587,3164,2186,1258, 227, 231,1425,1890,3200,3942, 247, 959, 725,5254,
2741, 577,2158,2079, 929, 120, 174, 838,2813, 591,1115, 417,2024,  40,3240,1536,
1037, 291,4151,2354, 632,1298,2406,2500,3535,1825,1846,3451, 205,1171, 345,4238,
  18,1163, 811, 685,2208,1217, 425,1312,1508,1175,4308,2552,1033, 587,1381,3059,
2984,3482, 340,1316,4023,3972, 792,3176, 519, 777,4690, 918, 933,4130,2981,3741,
  90,3360,2911,2200,5184,4550, 609,3079,2030, 272,3379,2736, 363,3881,1130,1447,
 286, 779, 357,1169,3350,3137,1630,1220,2687,2391, 747,1277,3688,2618,2682,2601,
1156,3196,5290,4034,3102,1689,3596,3128, 874, 219,2783, 798, 508,1843,2461, 269,
1658,1776,1392,1913,2983,3287,2866,2159,2372, 829,4076,  46,4253,2873,1889,1894,
 915,1834,1631,2181,2318, 298, 664,2818,3555,2735, 954,3228,3117, 527,3511,2173,
 681,2712,3033,2247,2346,3467,1652, 155,2164,3382, 113,1994, 450, 899, 494, 994,
1237,2958,1875,2336,1926,3727, 545,1577,1550, 633,3473, 204,1305,3072,2410,1956,
2471, 707,2134, 841,2195,2196,2663,3843,1026,4940, 990,3252,4997, 368,1092, 437,
3212,3258,1933,1829, 675,2977,2893, 412, 943,3723,4644,3294,3283,2230,2373,5154,
2389,2241,2661,2323,1404,2524, 593, 787, 677,3008,1275,2059, 438,2709,2609,2240,
2269,2246,1446,  36,1568,1373,3892,1574,2301,1456,3962, 693,2276,5216,2035,1143,
2720,1919,1797,1811,2763,4137,2597,1830,1699,1488,1198,2090, 424,1694, 312,3634,
3390,4179,3335,2252,1214, 561,1059,3243,2295,2561, 975,5155,2321,2751,3772, 472,
1537,3282,3398,1047,2077,2348,2878,1323,3340,3076, 690,2906,  51, 369, 170,3541,
1060,2187,2688,3670,2541,1083,1683, 928,3918, 459, 109,4427, 599,3744,4286, 143,
2101,2730,2490,  82,1588,3036,2121, 281,1860, 477,4035,1238,2812,3020,2716,3312,
1530,2188,2055,1317, 843, 636,1808,1173,3495, 649, 181,1002, 147,3641,1159,2414,
3750,2289,2795, 813,3123,2610,1136,4368,   5,3391,4541,2174, 420, 429,1728, 754,
1228,2115,2219, 347,2223,2733, 735,1518,3003,2355,3134,1764,3948,3329,1888,2424,
1001,1234,1972,3321,3363,1672,1021,1450,1584, 226, 765, 655,2526,3404,3244,2302,
3665, 731, 594,2184, 319,1576, 621, 658,2656,4299,2099,3864,1279,2071,2598,2739,
 795,3086,3699,3908,1707,2352,2402,1382,3136,2475,1465,4847,3496,3865,1085,3004,
2591,1084, 213,2287,1963,3565,2250, 822, 793,4574,3187,1772,1789,3050, 595,1484,
1959,2770,1080,2650, 456, 422,2996, 940,3322,4328,4345,3092,2742, 965,2784, 739,
4124, 952,1358,2498,2949,2565, 332,2698,2378, 660,2260,2473,4194,3856,2919, 535,
1260,2651,1208,1428,1300,1949,1303,2942, 433,2455,2450,1251,1946, 614,1269, 641,
1306,1810,2737,3078,2912, 564,2365,1419,1415,1497,4460,2367,2185,1379,3005,1307,
3218,2175,1897,3063, 682,1157,4040,4005,1712,1160,1941,1399, 394, 402,2952,1573,
1151,2986,2404, 862, 299,2033,1489,3006, 346, 171,2886,3401,1726,2932, 168,2533,
  47,2507,1030,3735,1145,3370,1395,1318,1579,3609,4560,2857,4116,1457,2529,1965,
 504,1036,2690,2988,2405, 745,5871, 849,2397,2056,3081, 863,2359,3857,2096,  99,
1397,1769,2300,4428,1643,3455,1978,1757,3718,1440,  35,4879,3742,1296,4228,2280,
 160,5063,1599,2013, 166, 520,3479,1646,3345,3012, 490,1937,1545,1264,2182,2505,
1096,1188,1369,1436,2421,1667,2792,2460,1270,2122, 727,3167,2143, 806,1706,1012,
1800,3037, 960,2218,1882, 805, 139,2456,1139,1521, 851,1052,3093,3089, 342,2039,
 744,5097,1468,1502,1585,2087, 223, 939, 326,2140,2577, 892,2481,1623,4077, 982,
3708, 135,2131,  87,2503,3114,2326,1106, 876,1616, 547,2997,2831,2093,3441,4530,
4314,   9,3256,4229,4148, 659,1462,1986,1710,2046,2913,2231,4090,4880,5255,3392,
3274,1368,3689,4645,1477, 705,3384,3635,1068,1529,2941,1458,3782,1509, 100,1656,
2548, 718,2339, 408,1590,2780,3548,1838,4117,3719,1345,3530, 717,3442,2778,3220,
2898,1892,4590,3614,3371,2043,1998,1224,3483, 891, 635, 584,2559,3355, 733,1766,
1729,1172,3789,1891,2307, 781,2982,2271,1957,1580,5773,2633,2005,4195,3097,1535,
3213,1189,1934,5693,3262, 586,3118,1324,1598, 517,1564,2217,1868,1893,4445,3728,
2703,3139,1526,1787,1992,3882,2875,1549,1199,1056,2224,1904,2711,5098,4287, 338,
1993,3129,3489,2689,1809,2815,1997, 957,1855,3898,2550,3275,3057,1105,1319, 627,
1505,1911,1883,3526, 698,3629,3456,1833,1431, 746,  77,1261,2017,2296,1977,1885,
 125,1334,1600, 525,1798,1109,2222,1470,1945, 559,2236,1186,3443,2476,1929,1411,
2411,3135,1777,3372,2621,1841,1613,3229, 668,1430,1839,2643,2916, 195,1989,2671,
2358,1387, 629,3205,2293,5256,4439, 123,1310, 888,1879,4300,3021,3605,1003,1162,
3192,2910,2010, 140,2395,2859,  55,1082,2012,2901, 662, 419,2081,1438, 680,2774,
4654,3912,1620,1731,1625,5035,4065,2328, 512,1344, 802,5443,2163,2311,2537, 524,
3399,  98,1155,2103,1918,2606,3925,2816,1393,2465,1504,3773,2177,3963,1478,4346,
 180,1113,4655,3461,2028,1698, 833,2696,1235,1322,1594,4408,3623,3013,3225,2040,
3022, 541,2881, 607,3632,2029,1665,1219, 639,1385,1686,1099,2803,3231,1938,3188,
2858, 427, 676,2772,1168,2025, 454,3253,2486,3556, 230,1950, 580, 791,1991,1280,
1086,1974,2034, 630, 257,3338,2788,4903,1017,  86,4790, 966,2789,1995,1696,1131,
 259,3095,4188,1308, 179,1463,5257, 289,4107,1248,  42,3413,1725,2288, 896,1947,
 774,4474,4254, 604,3430,4264, 392,2514,2588, 452, 237,1408,3018, 988,4531,1970,
3034,3310, 540,2370,1562,1288,2990, 502,4765,1147,   4,1853,2708, 207, 294,2814,
4078,2902,2509, 684,  34,3105,3532,2551, 644, 709,2801,2344, 573,1727,3573,3557,
2021,1081,3100,4315,2100,3681, 199,2263,1837,2385, 146,3484,1195,2776,3949, 997,
1939,3973,1008,1091,1202,1962,1847,1149,4209,5444,1076, 493, 117,5400,2521, 972,
1490,2934,1796,4542,2374,1512,2933,2657, 413,2888,1135,2762,2314,2156,1355,2369,
 766,2007,2527,2170,3124,2491,2593,2632,4757,2437, 234,3125,3591,1898,1750,1376,
1942,3468,3138, 570,2127,2145,3276,4131, 962, 132,1445,4196,  19, 941,3624,3480,
3366,1973,1374,4461,3431,2629, 283,2415,2275, 808,2887,3620,2112,2563,1353,3610,
 955,1089,3103,1053,  96,  88,4097, 823,3808,1583, 399, 292,4091,3313, 421,1128,
 642,4006, 903,2539,1877,2082, 596,  29,4066,1790, 722,2157, 130, 995,1569, 769,
1485, 464, 513,2213, 288,1923,1101,2453,4316, 133, 486,2445,  50, 625, 487,2207,
  57, 423, 481,2962, 159,3729,1558, 491, 303, 482, 501, 240,2837, 112,3648,2392,
1783, 362,   8,3433,3422, 610,2793,3277,1390,1284,1654,  21,3823, 734, 367, 623,
 193, 287, 374,1009,1483, 816, 476, 313,2255,2340,1262,2150,2899,1146,2581, 782,
2116,1659,2018,1880, 255,3586,3314,1110,2867,2137,2564, 986,2767,5185,2006, 650,
 158, 926, 762, 881,3157,2717,2362,3587, 306,3690,3245,1542,3077,2427,1691,2478,
2118,2985,3490,2438, 539,2305, 983, 129,1754, 355,4201,2386, 827,2923, 104,1773,
2838,2771, 411,2905,3919, 376, 767, 122,1114, 828,2422,1817,3506, 266,3460,1007,
1609,4998, 945,2612,4429,2274, 726,1247,1964,2914,2199,2070,4002,4108, 657,3323,
1422, 579, 455,2764,4737,1222,2895,1670, 824,1223,1487,2525, 558, 861,3080, 598,
2659,2515,1967, 752,2583,2376,2214,4180, 977, 704,2464,4999,2622,4109,1210,2961,
 819,1541, 142,2284,  44, 418, 457,1126,3730,4347,4626,1644,1876,3671,1864, 302,
1063,5694, 624, 723,1984,3745,1314,1676,2488,1610,1449,3558,3569,2166,2098, 409,
1011,2325,3704,2306, 818,1732,1383,1824,1844,3757, 999,2705,3497,1216,1423,2683,
2426,2954,2501,2726,2229,1475,2554,5064,1971,1794,1666,2014,1343, 783, 724, 191,
2434,1354,2220,5065,1763,2752,2472,4152, 131, 175,2885,3434,  92,1466,4920,2616,
3871,3872,3866, 128,1551,1632, 669,1854,3682,4691,4125,1230, 188,2973,3290,1302,
1213, 560,3266, 917, 763,3909,3249,1760, 868,1958, 764,1782,2097, 145,2277,3774,
4462,  64,1491,3062, 971,2132,3606,2442, 221,1226,1617, 218, 323,1185,3207,3147,
 571, 619,1473,1005,1744,2281, 449,1887,2396,3685, 275, 375,3816,1743,3844,3731,
 845,1983,2350,4210,1377, 773, 967,3499,3052,3743,2725,4007,1697,1022,3943,1464,
3264,2855,2722,1952,1029,2839,2467,  84,4383,2215, 820,1391,2015,2448,3672, 377,
1948,2168, 797,2545,3536,2578,2645,  94,2874,1678, 405,1259,3071, 771, 546,1315,
 470,1243,3083, 895,2468, 981, 969,2037, 846,4181, 653,1276,2928,  14,2594, 557,
3007,2474, 156, 902,1338,1740,2574, 537,2518, 973,2282,2216,2433,1928, 138,2903,
1293,2631,1612, 646,3457, 839,2935, 111, 496,2191,2847, 589,3186, 149,3994,2060,
4031,2641,4067,3145,1870,  37,3597,2136,1025,2051,3009,3383,3549,1121,1016,3261,
1301, 251,2446,2599,2153, 872,3246, 637, 334,3705, 831, 884, 921,3065,3140,4092,
2198,1944, 246,2964, 108,2045,1152,1921,2308,1031, 203,3173,4170,1907,3890, 810,
1401,2003,1690, 506, 647,1242,2828,1761,1649,3208,2249,1589,3709,2931,5156,1708,
 498, 666,2613, 834,3817,1231, 184,2851,1124, 883,3197,2261,3710,1765,1553,2658,
1178,2639,2351,  93,1193, 942,2538,2141,4402, 235,1821, 870,1591,2192,1709,1871,
3341,1618,4126,2595,2334, 603, 651,  69, 701, 268,2662,3411,2555,1380,1606, 503,
 448, 254,2371,2646, 574,1187,2309,1770, 322,2235,1292,1801, 305, 566,1133, 229,
2067,2057, 706, 167, 483,2002,2672,3295,1820,3561,3067, 316, 378,2746,3452,1112,
 136,1981, 507,1651,2917,1117, 285,4591, 182,2580,3522,1304, 335,3303,1835,2504,
1795,1792,2248, 674,1018,2106,2449,1857,2292,2845, 976,3047,1781,2600,2727,1389,
1281,  52,3152, 153, 265,3950, 672,3485,3951,4463, 430,1183, 365, 278,2169,  27,
1407,1336,2304, 209,1340,1730,2202,1852,2403,2883, 979,1737,1062, 631,2829,2542,
3876,2592, 825,2086,2226,3048,3625, 352,1417,3724, 542, 991, 431,1351,3938,1861,
2294, 826,1361,2927,3142,3503,1738, 463,2462,2723, 582,1916,1595,2808, 400,3845,
3891,2868,3621,2254,  58,2492,1123, 910,2160,2614,1372,1603,1196,1072,3385,1700,
3267,1980, 696, 480,2430, 920, 799,1570,2920,1951,2041,4047,2540,1321,4223,2469,
3562,2228,1271,2602, 401,2833,3351,2575,5157, 907,2312,1256, 410, 263,3507,1582,
 996, 678,1849,2316,1480, 908,3545,2237, 703,2322, 667,1826,2849,1531,2604,2999,
2407,3146,2151,2630,1786,3711, 469,3542, 497,3899,2409, 858, 837,4446,3393,1274,
 786, 620,1845,2001,3311, 484, 308,3367,1204,1815,3691,2332,1532,2557,1842,2020,
2724,1927,2333,4440, 567,  22,1673,2728,4475,1987,1858,1144,1597, 101,1832,3601,
  12, 974,3783,4391, 951,1412,   1,3720, 453,4608,4041, 528,1041,1027,3230,2628,
1129, 875,1051,3291,1203,2262,1069,2860,2799,2149,2615,3278, 144,1758,3040,  31,
 475,1680, 366,2685,3184, 311,1642,4008,2466,5036,1593,1493,2809, 216,1420,1668,
 233, 304,2128,3284, 232,1429,1768,1040,2008,3407,2740,2967,2543, 242,2133, 778,
1565,2022,2620, 505,2189,2756,1098,2273, 372,1614, 708, 553,2846,2094,2278, 169,
3626,2835,4161, 228,2674,3165, 809,1454,1309, 466,1705,1095, 900,3423, 880,2667,
3751,5258,2317,3109,2571,4317,2766,1503,1342, 866,4447,1118,  63,2076, 314,1881,
1348,1061, 172, 978,3515,1747, 532, 511,3970,   6, 601, 905,2699,3300,1751, 276,
1467,3725,2668,  65,4239,2544,2779,2556,1604, 578,2451,1802, 992,2331,2624,1320,
3446, 713,1513,1013, 103,2786,2447,1661, 886,1702, 916, 654,3574,2031,1556, 751,
2178,2821,2179,1498,1538,2176, 271, 914,2251,2080,1325, 638,1953,2937,3877,2432,
2754,  95,3265,1716, 260,1227,4083, 775, 106,1357,3254, 426,1607, 555,2480, 772,
1985, 244,2546, 474, 495,1046,2611,1851,2061,  71,2089,1675,2590, 742,3758,2843,
3222,1433, 267,2180,2576,2826,2233,2092,3913,2435, 956,1745,3075, 856,2113,1116,
 451,   3,1988,2896,1398, 993,2463,1878,2049,1341,2718,2721,2870,2108, 712,2904,
4363,2753,2324, 277,2872,2349,2649, 384, 987, 435, 691,3000, 922, 164,3939, 652,
1500,1184,4153,2482,3373,2165,4848,2335,3775,3508,3154,2806,2830,1554,2102,1664,
2530,1434,2408, 893,1547,2623,3447,2832,2242,2532,3169,2856,3223,2078,  49,3770,
3469, 462, 318, 656,2259,3250,3069, 679,1629,2758, 344,1138,1104,3120,1836,1283,
3115,2154,1437,4448, 934, 759,1999, 794,2862,1038, 533,2560,1722,2342, 855,2626,
1197,1663,4476,3127,  85,4240,2528,  25,1111,1181,3673, 407,3470,4561,2679,2713,
 768,1925,2841,3986,1544,1165, 932, 373,1240,2146,1930,2673, 721,4766, 354,4333,
 391,2963, 187,  61,3364,1442,1102, 330,1940,1767, 341,3809,4118, 393,2496,2062,
2211, 105, 331, 300, 439, 913,1332, 626, 379,3304,1557, 328, 689,3952, 309,1555,
 931, 317,2517,3027, 325, 569, 686,2107,3084,  60,1042,1333,2794, 264,3177,4014,
1628, 258,3712,   7,4464,1176,1043,1778, 683, 114,1975,  78,1492, 383,1886, 510,
 386, 645,5291,2891,2069,3305,4138,3867,2939,2603,2493,1935,1066,1848,3588,1015,
1282,1289,4609, 697,1453,3044,2666,3611,1856,2412,  54, 719,1330, 568,3778,2459,
1748, 788, 492, 551,1191,1000, 488,3394,3763, 282,1799, 348,2016,1523,3155,2390,
1049, 382,2019,1788,1170, 729,2968,3523, 897,3926,2785,2938,3292, 350,2319,3238,
1718,1717,2655,3453,3143,4465, 161,2889,2980,2009,1421,  56,1908,1640,2387,2232,
1917,1874,2477,4921, 148,  83,3438, 592,4245,2882,1822,1055, 741, 115,1496,1624,
 381,1638,4592,1020, 516,3214, 458, 947,4575,1432, 211,1514,2926,1865,2142, 189,
 852,1221,1400,1486, 882,2299,4036, 351,  28,1122, 700,6479,6480,6481,6482,6483,  # last 512
#Everything below is of no interest for detection purpose
5508,6484,3900,3414,3974,4441,4024,3537,4037,5628,5099,3633,6485,3148,6486,3636,
5509,3257,5510,5973,5445,5872,4941,4403,3174,4627,5873,6276,2286,4230,5446,5874,
5122,6102,6103,4162,5447,5123,5323,4849,6277,3980,3851,5066,4246,5774,5067,6278,
3001,2807,5695,3346,5775,5974,5158,5448,6487,5975,5976,5776,3598,6279,5696,4806,
4211,4154,6280,6488,6489,6490,6281,4212,5037,3374,4171,6491,4562,4807,4722,4827,
5977,6104,4532,4079,5159,5324,5160,4404,3858,5359,5875,3975,4288,4610,3486,4512,
5325,3893,5360,6282,6283,5560,2522,4231,5978,5186,5449,2569,3878,6284,5401,3578,
4415,6285,4656,5124,5979,2506,4247,4449,3219,3417,4334,4969,4329,6492,4576,4828,
4172,4416,4829,5402,6286,3927,3852,5361,4369,4830,4477,4867,5876,4173,6493,6105,
4657,6287,6106,5877,5450,6494,4155,4868,5451,3700,5629,4384,6288,6289,5878,3189,
4881,6107,6290,6495,4513,6496,4692,4515,4723,5100,3356,6497,6291,3810,4080,5561,
3570,4430,5980,6498,4355,5697,6499,4724,6108,6109,3764,4050,5038,5879,4093,3226,
6292,5068,5217,4693,3342,5630,3504,4831,4377,4466,4309,5698,4431,5777,6293,5778,
4272,3706,6110,5326,3752,4676,5327,4273,5403,4767,5631,6500,5699,5880,3475,5039,
6294,5562,5125,4348,4301,4482,4068,5126,4593,5700,3380,3462,5981,5563,3824,5404,
4970,5511,3825,4738,6295,6501,5452,4516,6111,5881,5564,6502,6296,5982,6503,4213,
4163,3454,6504,6112,4009,4450,6113,4658,6297,6114,3035,6505,6115,3995,4904,4739,
4563,4942,4110,5040,3661,3928,5362,3674,6506,5292,3612,4791,5565,4149,5983,5328,
5259,5021,4725,4577,4564,4517,4364,6298,5405,4578,5260,4594,4156,4157,5453,3592,
3491,6507,5127,5512,4709,4922,5984,5701,4726,4289,6508,4015,6116,5128,4628,3424,
4241,5779,6299,4905,6509,6510,5454,5702,5780,6300,4365,4923,3971,6511,5161,3270,
3158,5985,4100, 867,5129,5703,6117,5363,3695,3301,5513,4467,6118,6512,5455,4232,
4242,4629,6513,3959,4478,6514,5514,5329,5986,4850,5162,5566,3846,4694,6119,5456,
4869,5781,3779,6301,5704,5987,5515,4710,6302,5882,6120,4392,5364,5705,6515,6121,
6516,6517,3736,5988,5457,5989,4695,2457,5883,4551,5782,6303,6304,6305,5130,4971,
6122,5163,6123,4870,3263,5365,3150,4871,6518,6306,5783,5069,5706,3513,3498,4409,
5330,5632,5366,5458,5459,3991,5990,4502,3324,5991,5784,3696,4518,5633,4119,6519,
4630,5634,4417,5707,4832,5992,3418,6124,5993,5567,4768,5218,6520,4595,3458,5367,
6125,5635,6126,4202,6521,4740,4924,6307,3981,4069,4385,6308,3883,2675,4051,3834,
4302,4483,5568,5994,4972,4101,5368,6309,5164,5884,3922,6127,6522,6523,5261,5460,
5187,4164,5219,3538,5516,4111,3524,5995,6310,6311,5369,3181,3386,2484,5188,3464,
5569,3627,5708,6524,5406,5165,4677,4492,6312,4872,4851,5885,4468,5996,6313,5709,
5710,6128,2470,5886,6314,5293,4882,5785,3325,5461,5101,6129,5711,5786,6525,4906,
6526,6527,4418,5887,5712,4808,2907,3701,5713,5888,6528,3765,5636,5331,6529,6530,
3593,5889,3637,4943,3692,5714,5787,4925,6315,6130,5462,4405,6131,6132,6316,5262,
6531,6532,5715,3859,5716,5070,4696,5102,3929,5788,3987,4792,5997,6533,6534,3920,
4809,5000,5998,6535,2974,5370,6317,5189,5263,5717,3826,6536,3953,5001,4883,3190,
5463,5890,4973,5999,4741,6133,6134,3607,5570,6000,4711,3362,3630,4552,5041,6318,
6001,2950,2953,5637,4646,5371,4944,6002,2044,4120,3429,6319,6537,5103,4833,6538,
6539,4884,4647,3884,6003,6004,4758,3835,5220,5789,4565,5407,6540,6135,5294,4697,
4852,6320,6321,3206,4907,6541,6322,4945,6542,6136,6543,6323,6005,4631,3519,6544,
5891,6545,5464,3784,5221,6546,5571,4659,6547,6324,6137,5190,6548,3853,6549,4016,
4834,3954,6138,5332,3827,4017,3210,3546,4469,5408,5718,3505,4648,5790,5131,5638,
5791,5465,4727,4318,6325,6326,5792,4553,4010,4698,3439,4974,3638,4335,3085,6006,
5104,5042,5166,5892,5572,6327,4356,4519,5222,5573,5333,5793,5043,6550,5639,5071,
4503,6328,6139,6551,6140,3914,3901,5372,6007,5640,4728,4793,3976,3836,4885,6552,
4127,6553,4451,4102,5002,6554,3686,5105,6555,5191,5072,5295,4611,5794,5296,6556,
5893,5264,5894,4975,5466,5265,4699,4976,4370,4056,3492,5044,4886,6557,5795,4432,
4769,4357,5467,3940,4660,4290,6141,4484,4770,4661,3992,6329,4025,4662,5022,4632,
4835,4070,5297,4663,4596,5574,5132,5409,5895,6142,4504,5192,4664,5796,5896,3885,
5575,5797,5023,4810,5798,3732,5223,4712,5298,4084,5334,5468,6143,4052,4053,4336,
4977,4794,6558,5335,4908,5576,5224,4233,5024,4128,5469,5225,4873,6008,5045,4729,
4742,4633,3675,4597,6559,5897,5133,5577,5003,5641,5719,6330,6560,3017,2382,3854,
4406,4811,6331,4393,3964,4946,6561,2420,3722,6562,4926,4378,3247,1736,4442,6332,
5134,6333,5226,3996,2918,5470,4319,4003,4598,4743,4744,4485,3785,3902,5167,5004,
5373,4394,5898,6144,4874,1793,3997,6334,4085,4214,5106,5642,4909,5799,6009,4419,
4189,3330,5899,4165,4420,5299,5720,5227,3347,6145,4081,6335,2876,3930,6146,3293,
3786,3910,3998,5900,5300,5578,2840,6563,5901,5579,6147,3531,5374,6564,6565,5580,
4759,5375,6566,6148,3559,5643,6336,6010,5517,6337,6338,5721,5902,3873,6011,6339,
6567,5518,3868,3649,5722,6568,4771,4947,6569,6149,4812,6570,2853,5471,6340,6341,
5644,4795,6342,6012,5723,6343,5724,6013,4349,6344,3160,6150,5193,4599,4514,4493,
5168,4320,6345,4927,3666,4745,5169,5903,5005,4928,6346,5725,6014,4730,4203,5046,
4948,3395,5170,6015,4150,6016,5726,5519,6347,5047,3550,6151,6348,4197,4310,5904,
6571,5581,2965,6152,4978,3960,4291,5135,6572,5301,5727,4129,4026,5905,4853,5728,
5472,6153,6349,4533,2700,4505,5336,4678,3583,5073,2994,4486,3043,4554,5520,6350,
6017,5800,4487,6351,3931,4103,5376,6352,4011,4321,4311,4190,5136,6018,3988,3233,
4350,5906,5645,4198,6573,5107,3432,4191,3435,5582,6574,4139,5410,6353,5411,3944,
5583,5074,3198,6575,6354,4358,6576,5302,4600,5584,5194,5412,6577,6578,5585,5413,
5303,4248,5414,3879,4433,6579,4479,5025,4854,5415,6355,4760,4772,3683,2978,4700,
3797,4452,3965,3932,3721,4910,5801,6580,5195,3551,5907,3221,3471,3029,6019,3999,
5908,5909,5266,5267,3444,3023,3828,3170,4796,5646,4979,4259,6356,5647,5337,3694,
6357,5648,5338,4520,4322,5802,3031,3759,4071,6020,5586,4836,4386,5048,6581,3571,
4679,4174,4949,6154,4813,3787,3402,3822,3958,3215,3552,5268,4387,3933,4950,4359,
6021,5910,5075,3579,6358,4234,4566,5521,6359,3613,5049,6022,5911,3375,3702,3178,
4911,5339,4521,6582,6583,4395,3087,3811,5377,6023,6360,6155,4027,5171,5649,4421,
4249,2804,6584,2270,6585,4000,4235,3045,6156,5137,5729,4140,4312,3886,6361,4330,
6157,4215,6158,3500,3676,4929,4331,3713,4930,5912,4265,3776,3368,5587,4470,4855,
3038,4980,3631,6159,6160,4132,4680,6161,6362,3923,4379,5588,4255,6586,4121,6587,
6363,4649,6364,3288,4773,4774,6162,6024,6365,3543,6588,4274,3107,3737,5050,5803,
4797,4522,5589,5051,5730,3714,4887,5378,4001,4523,6163,5026,5522,4701,4175,2791,
3760,6589,5473,4224,4133,3847,4814,4815,4775,3259,5416,6590,2738,6164,6025,5304,
3733,5076,5650,4816,5590,6591,6165,6592,3934,5269,6593,3396,5340,6594,5804,3445,
3602,4042,4488,5731,5732,3525,5591,4601,5196,6166,6026,5172,3642,4612,3202,4506,
4798,6366,3818,5108,4303,5138,5139,4776,3332,4304,2915,3415,4434,5077,5109,4856,
2879,5305,4817,6595,5913,3104,3144,3903,4634,5341,3133,5110,5651,5805,6167,4057,
5592,2945,4371,5593,6596,3474,4182,6367,6597,6168,4507,4279,6598,2822,6599,4777,
4713,5594,3829,6169,3887,5417,6170,3653,5474,6368,4216,2971,5228,3790,4579,6369,
5733,6600,6601,4951,4746,4555,6602,5418,5475,6027,3400,4665,5806,6171,4799,6028,
5052,6172,3343,4800,4747,5006,6370,4556,4217,5476,4396,5229,5379,5477,3839,5914,
5652,5807,4714,3068,4635,5808,6173,5342,4192,5078,5419,5523,5734,6174,4557,6175,
4602,6371,6176,6603,5809,6372,5735,4260,3869,5111,5230,6029,5112,6177,3126,4681,
5524,5915,2706,3563,4748,3130,6178,4018,5525,6604,6605,5478,4012,4837,6606,4534,
4193,5810,4857,3615,5479,6030,4082,3697,3539,4086,5270,3662,4508,4931,5916,4912,
5811,5027,3888,6607,4397,3527,3302,3798,2775,2921,2637,3966,4122,4388,4028,4054,
1633,4858,5079,3024,5007,3982,3412,5736,6608,3426,3236,5595,3030,6179,3427,3336,
3279,3110,6373,3874,3039,5080,5917,5140,4489,3119,6374,5812,3405,4494,6031,4666,
4141,6180,4166,6032,5813,4981,6609,5081,4422,4982,4112,3915,5653,3296,3983,6375,
4266,4410,5654,6610,6181,3436,5082,6611,5380,6033,3819,5596,4535,5231,5306,5113,
6612,4952,5918,4275,3113,6613,6376,6182,6183,5814,3073,4731,4838,5008,3831,6614,
4888,3090,3848,4280,5526,5232,3014,5655,5009,5737,5420,5527,6615,5815,5343,5173,
5381,4818,6616,3151,4953,6617,5738,2796,3204,4360,2989,4281,5739,5174,5421,5197,
3132,5141,3849,5142,5528,5083,3799,3904,4839,5480,2880,4495,3448,6377,6184,5271,
5919,3771,3193,6034,6035,5920,5010,6036,5597,6037,6378,6038,3106,5422,6618,5423,
5424,4142,6619,4889,5084,4890,4313,5740,6620,3437,5175,5307,5816,4199,5198,5529,
5817,5199,5656,4913,5028,5344,3850,6185,2955,5272,5011,5818,4567,4580,5029,5921,
3616,5233,6621,6622,6186,4176,6039,6379,6380,3352,5200,5273,2908,5598,5234,3837,
5308,6623,6624,5819,4496,4323,5309,5201,6625,6626,4983,3194,3838,4167,5530,5922,
5274,6381,6382,3860,3861,5599,3333,4292,4509,6383,3553,5481,5820,5531,4778,6187,
3955,3956,4324,4389,4218,3945,4325,3397,2681,5923,4779,5085,4019,5482,4891,5382,
5383,6040,4682,3425,5275,4094,6627,5310,3015,5483,5657,4398,5924,3168,4819,6628,
5925,6629,5532,4932,4613,6041,6630,4636,6384,4780,4204,5658,4423,5821,3989,4683,
5822,6385,4954,6631,5345,6188,5425,5012,5384,3894,6386,4490,4104,6632,5741,5053,
6633,5823,5926,5659,5660,5927,6634,5235,5742,5824,4840,4933,4820,6387,4859,5928,
4955,6388,4143,3584,5825,5346,5013,6635,5661,6389,5014,5484,5743,4337,5176,5662,
6390,2836,6391,3268,6392,6636,6042,5236,6637,4158,6638,5744,5663,4471,5347,3663,
4123,5143,4293,3895,6639,6640,5311,5929,5826,3800,6189,6393,6190,5664,5348,3554,
3594,4749,4603,6641,5385,4801,6043,5827,4183,6642,5312,5426,4761,6394,5665,6191,
4715,2669,6643,6644,5533,3185,5427,5086,5930,5931,5386,6192,6044,6645,4781,4013,
5745,4282,4435,5534,4390,4267,6045,5746,4984,6046,2743,6193,3501,4087,5485,5932,
5428,4184,4095,5747,4061,5054,3058,3862,5933,5600,6646,5144,3618,6395,3131,5055,
5313,6396,4650,4956,3855,6194,3896,5202,4985,4029,4225,6195,6647,5828,5486,5829,
3589,3002,6648,6397,4782,5276,6649,6196,6650,4105,3803,4043,5237,5830,6398,4096,
3643,6399,3528,6651,4453,3315,4637,6652,3984,6197,5535,3182,3339,6653,3096,2660,
6400,6654,3449,5934,4250,4236,6047,6401,5831,6655,5487,3753,4062,5832,6198,6199,
6656,3766,6657,3403,4667,6048,6658,4338,2897,5833,3880,2797,3780,4326,6659,5748,
5015,6660,5387,4351,5601,4411,6661,3654,4424,5935,4339,4072,5277,4568,5536,6402,
6662,5238,6663,5349,5203,6200,5204,6201,5145,4536,5016,5056,4762,5834,4399,4957,
6202,6403,5666,5749,6664,4340,6665,5936,5177,5667,6666,6667,3459,4668,6404,6668,
6669,4543,6203,6670,4276,6405,4480,5537,6671,4614,5205,5668,6672,3348,2193,4763,
6406,6204,5937,5602,4177,5669,3419,6673,4020,6205,4443,4569,5388,3715,3639,6407,
6049,4058,6206,6674,5938,4544,6050,4185,4294,4841,4651,4615,5488,6207,6408,6051,
5178,3241,3509,5835,6208,4958,5836,4341,5489,5278,6209,2823,5538,5350,5206,5429,
6675,4638,4875,4073,3516,4684,4914,4860,5939,5603,5389,6052,5057,3237,5490,3791,
6676,6409,6677,4821,4915,4106,5351,5058,4243,5539,4244,5604,4842,4916,5239,3028,
3716,5837,5114,5605,5390,5940,5430,6210,4332,6678,5540,4732,3667,3840,6053,4305,
3408,5670,5541,6410,2744,5240,5750,6679,3234,5606,6680,5607,5671,3608,4283,4159,
4400,5352,4783,6681,6411,6682,4491,4802,6211,6412,5941,6413,6414,5542,5751,6683,
4669,3734,5942,6684,6415,5943,5059,3328,4670,4144,4268,6685,6686,6687,6688,4372,
3603,6689,5944,5491,4373,3440,6416,5543,4784,4822,5608,3792,4616,5838,5672,3514,
5391,6417,4892,6690,4639,6691,6054,5673,5839,6055,6692,6056,5392,6212,4038,5544,
5674,4497,6057,6693,5840,4284,5675,4021,4545,5609,6418,4454,6419,6213,4113,4472,
5314,3738,5087,5279,4074,5610,4959,4063,3179,4750,6058,6420,6214,3476,4498,4716,
5431,4960,4685,6215,5241,6694,6421,6216,6695,5841,5945,6422,3748,5946,5179,3905,
5752,5545,5947,4374,6217,4455,6423,4412,6218,4803,5353,6696,3832,5280,6219,4327,
4702,6220,6221,6059,4652,5432,6424,3749,4751,6425,5753,4986,5393,4917,5948,5030,
5754,4861,4733,6426,4703,6697,6222,4671,5949,4546,4961,5180,6223,5031,3316,5281,
6698,4862,4295,4934,5207,3644,6427,5842,5950,6428,6429,4570,5843,5282,6430,6224,
5088,3239,6060,6699,5844,5755,6061,6431,2701,5546,6432,5115,5676,4039,3993,3327,
4752,4425,5315,6433,3941,6434,5677,4617,4604,3074,4581,6225,5433,6435,6226,6062,
4823,5756,5116,6227,3717,5678,4717,5845,6436,5679,5846,6063,5847,6064,3977,3354,
6437,3863,5117,6228,5547,5394,4499,4524,6229,4605,6230,4306,4500,6700,5951,6065,
3693,5952,5089,4366,4918,6701,6231,5548,6232,6702,6438,4704,5434,6703,6704,5953,
4168,6705,5680,3420,6706,5242,4407,6066,3812,5757,5090,5954,4672,4525,3481,5681,
4618,5395,5354,5316,5955,6439,4962,6707,4526,6440,3465,4673,6067,6441,5682,6708,
5435,5492,5758,5683,4619,4571,4674,4804,4893,4686,5493,4753,6233,6068,4269,6442,
6234,5032,4705,5146,5243,5208,5848,6235,6443,4963,5033,4640,4226,6236,5849,3387,
6444,6445,4436,4437,5850,4843,5494,4785,4894,6709,4361,6710,5091,5956,3331,6237,
4987,5549,6069,6711,4342,3517,4473,5317,6070,6712,6071,4706,6446,5017,5355,6713,
6714,4988,5436,6447,4734,5759,6715,4735,4547,4456,4754,6448,5851,6449,6450,3547,
5852,5318,6451,6452,5092,4205,6716,6238,4620,4219,5611,6239,6072,4481,5760,5957,
5958,4059,6240,6453,4227,4537,6241,5761,4030,4186,5244,5209,3761,4457,4876,3337,
5495,5181,6242,5959,5319,5612,5684,5853,3493,5854,6073,4169,5613,5147,4895,6074,
5210,6717,5182,6718,3830,6243,2798,3841,6075,6244,5855,5614,3604,4606,5496,5685,
5118,5356,6719,6454,5960,5357,5961,6720,4145,3935,4621,5119,5962,4261,6721,6455,
4786,5963,4375,4582,6245,6246,6247,6076,5437,4877,5856,3376,4380,6248,4160,6722,
5148,6456,5211,6457,6723,4718,6458,6724,6249,5358,4044,3297,6459,6250,5857,5615,
5497,5245,6460,5498,6725,6251,6252,5550,3793,5499,2959,5396,6461,6462,4572,5093,
5500,5964,3806,4146,6463,4426,5762,5858,6077,6253,4755,3967,4220,5965,6254,4989,
5501,6464,4352,6726,6078,4764,2290,5246,3906,5438,5283,3767,4964,2861,5763,5094,
6255,6256,4622,5616,5859,5860,4707,6727,4285,4708,4824,5617,6257,5551,4787,5212,
4965,4935,4687,6465,6728,6466,5686,6079,3494,4413,2995,5247,5966,5618,6729,5967,
5764,5765,5687,5502,6730,6731,6080,5397,6467,4990,6258,6732,4538,5060,5619,6733,
4719,5688,5439,5018,5149,5284,5503,6734,6081,4607,6259,5120,3645,5861,4583,6260,
4584,4675,5620,4098,5440,6261,4863,2379,3306,4585,5552,5689,4586,5285,6735,4864,
6736,5286,6082,6737,4623,3010,4788,4381,4558,5621,4587,4896,3698,3161,5248,4353,
4045,6262,3754,5183,4588,6738,6263,6739,6740,5622,3936,6741,6468,6742,6264,5095,
6469,4991,5968,6743,4992,6744,6083,4897,6745,4256,5766,4307,3108,3968,4444,5287,
3889,4343,6084,4510,6085,4559,6086,4898,5969,6746,5623,5061,4919,5249,5250,5504,
5441,6265,5320,4878,3242,5862,5251,3428,6087,6747,4237,5624,5442,6266,5553,4539,
6748,2585,3533,5398,4262,6088,5150,4736,4438,6089,6267,5505,4966,6749,6268,6750,
6269,5288,5554,3650,6090,6091,4624,6092,5690,6751,5863,4270,5691,4277,5555,5864,
6752,5692,4720,4865,6470,5151,4688,4825,6753,3094,6754,6471,3235,4653,6755,5213,
5399,6756,3201,4589,5865,4967,6472,5866,6473,5019,3016,6757,5321,4756,3957,4573,
6093,4993,5767,4721,6474,6758,5625,6759,4458,6475,6270,6760,5556,4994,5214,5252,
6271,3875,5768,6094,5034,5506,4376,5769,6761,2120,6476,5253,5770,6762,5771,5970,
3990,5971,5557,5558,5772,6477,6095,2787,4641,5972,5121,6096,6097,6272,6763,3703,
5867,5507,6273,4206,6274,4789,6098,6764,3619,3646,3833,3804,2394,3788,4936,3978,
4866,4899,6099,6100,5559,6478,6765,3599,5868,6101,5869,5870,6275,6766,4527,6767)

# flake8: noqa
python3.3/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py000064400000003366151733566760023007 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import EUCKRDistributionAnalysis
from .mbcssm import CP949SMModel


class CP949Prober(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(CP949SMModel)
        # NOTE: CP949 is a superset of EUC-KR, so the distribution should be
        #       not different.
        self._mDistributionAnalyzer = EUCKRDistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "CP949"
python3.3/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py000064400000011271151733566760024107 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys
from . import constants
from .charsetprober import CharSetProber
from .compat import wrap_ord

SAMPLE_SIZE = 64
SB_ENOUGH_REL_THRESHOLD = 1024
POSITIVE_SHORTCUT_THRESHOLD = 0.95
NEGATIVE_SHORTCUT_THRESHOLD = 0.05
SYMBOL_CAT_ORDER = 250
NUMBER_OF_SEQ_CAT = 4
POSITIVE_CAT = NUMBER_OF_SEQ_CAT - 1
#NEGATIVE_CAT = 0


class SingleByteCharSetProber(CharSetProber):
    def __init__(self, model, reversed=False, nameProber=None):
        CharSetProber.__init__(self)
        self._mModel = model
        # TRUE if we need to reverse every pair in the model lookup
        self._mReversed = reversed
        # Optional auxiliary prober for name decision
        self._mNameProber = nameProber
        self.reset()

    def reset(self):
        CharSetProber.reset(self)
        # char order of last character
        self._mLastOrder = 255
        self._mSeqCounters = [0] * NUMBER_OF_SEQ_CAT
        self._mTotalSeqs = 0
        self._mTotalChar = 0
        # characters that fall in our sampling range
        self._mFreqChar = 0

    def get_charset_name(self):
        if self._mNameProber:
            return self._mNameProber.get_charset_name()
        else:
            return self._mModel['charsetName']

    def feed(self, aBuf):
        if not self._mModel['keepEnglishLetter']:
            aBuf = self.filter_without_english_letters(aBuf)
        aLen = len(aBuf)
        if not aLen:
            return self.get_state()
        for c in aBuf:
            order = self._mModel['charToOrderMap'][wrap_ord(c)]
            if order < SYMBOL_CAT_ORDER:
                self._mTotalChar += 1
            if order < SAMPLE_SIZE:
                self._mFreqChar += 1
                if self._mLastOrder < SAMPLE_SIZE:
                    self._mTotalSeqs += 1
                    if not self._mReversed:
                        i = (self._mLastOrder * SAMPLE_SIZE) + order
                        model = self._mModel['precedenceMatrix'][i]
                    else:  # reverse the order of the letters in the lookup
                        i = (order * SAMPLE_SIZE) + self._mLastOrder
                        model = self._mModel['precedenceMatrix'][i]
                    self._mSeqCounters[model] += 1
            self._mLastOrder = order

        if self.get_state() == constants.eDetecting:
            if self._mTotalSeqs > SB_ENOUGH_REL_THRESHOLD:
                cf = self.get_confidence()
                if cf > POSITIVE_SHORTCUT_THRESHOLD:
                    if constants._debug:
                        sys.stderr.write('%s confidence = %s, we have a'
                                         'winner\n' %
                                         (self._mModel['charsetName'], cf))
                    self._mState = constants.eFoundIt
                elif cf < NEGATIVE_SHORTCUT_THRESHOLD:
                    if constants._debug:
                        sys.stderr.write('%s confidence = %s, below negative'
                                         'shortcut threshhold %s\n' %
                                         (self._mModel['charsetName'], cf,
                                          NEGATIVE_SHORTCUT_THRESHOLD))
                    self._mState = constants.eNotMe

        return self.get_state()

    def get_confidence(self):
        r = 0.01
        if self._mTotalSeqs > 0:
            r = ((1.0 * self._mSeqCounters[POSITIVE_CAT]) / self._mTotalSeqs
                 / self._mModel['mTypicalPositiveRatio'])
            r = r * self._mFreqChar / self._mTotalChar
            if r >= 1.0:
                r = 0.99
        return r
python3.3/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py000064400000007226151733566760023106 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys
from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import SJISDistributionAnalysis
from .jpcntx import SJISContextAnalysis
from .mbcssm import SJISSMModel
from . import constants


class SJISProber(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(SJISSMModel)
        self._mDistributionAnalyzer = SJISDistributionAnalysis()
        self._mContextAnalyzer = SJISContextAnalysis()
        self.reset()

    def reset(self):
        MultiByteCharSetProber.reset(self)
        self._mContextAnalyzer.reset()

    def get_charset_name(self):
        return "SHIFT_JIS"

    def feed(self, aBuf):
        aLen = len(aBuf)
        for i in range(0, aLen):
            codingState = self._mCodingSM.next_state(aBuf[i])
            if codingState == constants.eError:
                if constants._debug:
                    sys.stderr.write(self.get_charset_name()
                                     + ' prober hit error at byte ' + str(i)
                                     + '\n')
                self._mState = constants.eNotMe
                break
            elif codingState == constants.eItsMe:
                self._mState = constants.eFoundIt
                break
            elif codingState == constants.eStart:
                charLen = self._mCodingSM.get_current_charlen()
                if i == 0:
                    self._mLastChar[1] = aBuf[0]
                    self._mContextAnalyzer.feed(self._mLastChar[2 - charLen:],
                                                charLen)
                    self._mDistributionAnalyzer.feed(self._mLastChar, charLen)
                else:
                    self._mContextAnalyzer.feed(aBuf[i + 1 - charLen:i + 3
                                                     - charLen], charLen)
                    self._mDistributionAnalyzer.feed(aBuf[i - 1:i + 1],
                                                     charLen)

        self._mLastChar[0] = aBuf[aLen - 1]

        if self.get_state() == constants.eDetecting:
            if (self._mContextAnalyzer.got_enough_data() and
               (self.get_confidence() > constants.SHORTCUT_THRESHOLD)):
                self._mState = constants.eFoundIt

        return self.get_state()

    def get_confidence(self):
        contxtCf = self._mContextAnalyzer.get_confidence()
        distribCf = self._mDistributionAnalyzer.get_confidence()
        return max(contxtCf, distribCf)
python3.3/site-packages/pip/_vendor/requests/packages/chardet/escprober.py000064400000006163151733566760022707 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
from .escsm import (HZSMModel, ISO2022CNSMModel, ISO2022JPSMModel,
                    ISO2022KRSMModel)
from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .compat import wrap_ord


class EscCharSetProber(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mCodingSM = [
            CodingStateMachine(HZSMModel),
            CodingStateMachine(ISO2022CNSMModel),
            CodingStateMachine(ISO2022JPSMModel),
            CodingStateMachine(ISO2022KRSMModel)
        ]
        self.reset()

    def reset(self):
        CharSetProber.reset(self)
        for codingSM in self._mCodingSM:
            if not codingSM:
                continue
            codingSM.active = True
            codingSM.reset()
        self._mActiveSM = len(self._mCodingSM)
        self._mDetectedCharset = None

    def get_charset_name(self):
        return self._mDetectedCharset

    def get_confidence(self):
        if self._mDetectedCharset:
            return 0.99
        else:
            return 0.00

    def feed(self, aBuf):
        for c in aBuf:
            # PY3K: aBuf is a byte array, so c is an int, not a byte
            for codingSM in self._mCodingSM:
                if not codingSM:
                    continue
                if not codingSM.active:
                    continue
                codingState = codingSM.next_state(wrap_ord(c))
                if codingState == constants.eError:
                    codingSM.active = False
                    self._mActiveSM -= 1
                    if self._mActiveSM <= 0:
                        self._mState = constants.eNotMe
                        return self.get_state()
                elif codingState == constants.eItsMe:
                    self._mState = constants.eFoundIt
                    self._mDetectedCharset = codingSM.get_coding_state_machine()  # nopep8
                    return self.get_state()

        return self.get_state()
python3.3/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py000064400000032057151733566760023412 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
#          Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .constants import eNotMe, eDetecting
from .compat import wrap_ord

# This prober doesn't actually recognize a language or a charset.
# It is a helper prober for the use of the Hebrew model probers

### General ideas of the Hebrew charset recognition ###
#
# Four main charsets exist in Hebrew:
# "ISO-8859-8" - Visual Hebrew
# "windows-1255" - Logical Hebrew
# "ISO-8859-8-I" - Logical Hebrew
# "x-mac-hebrew" - ?? Logical Hebrew ??
#
# Both "ISO" charsets use a completely identical set of code points, whereas
# "windows-1255" and "x-mac-hebrew" are two different proper supersets of
# these code points. windows-1255 defines additional characters in the range
# 0x80-0x9F as some misc punctuation marks as well as some Hebrew-specific
# diacritics and additional 'Yiddish' ligature letters in the range 0xc0-0xd6.
# x-mac-hebrew defines similar additional code points but with a different
# mapping.
#
# As far as an average Hebrew text with no diacritics is concerned, all four
# charsets are identical with respect to code points. Meaning that for the
# main Hebrew alphabet, all four map the same values to all 27 Hebrew letters
# (including final letters).
#
# The dominant difference between these charsets is their directionality.
# "Visual" directionality means that the text is ordered as if the renderer is
# not aware of a BIDI rendering algorithm. The renderer sees the text and
# draws it from left to right. The text itself when ordered naturally is read
# backwards. A buffer of Visual Hebrew generally looks like so:
# "[last word of first line spelled backwards] [whole line ordered backwards
# and spelled backwards] [first word of first line spelled backwards]
# [end of line] [last word of second line] ... etc' "
# adding punctuation marks, numbers and English text to visual text is
# naturally also "visual" and from left to right.
#
# "Logical" directionality means the text is ordered "naturally" according to
# the order it is read. It is the responsibility of the renderer to display
# the text from right to left. A BIDI algorithm is used to place general
# punctuation marks, numbers and English text in the text.
#
# Texts in x-mac-hebrew are almost impossible to find on the Internet. From
# what little evidence I could find, it seems that its general directionality
# is Logical.
#
# To sum up all of the above, the Hebrew probing mechanism knows about two
# charsets:
# Visual Hebrew - "ISO-8859-8" - backwards text - Words and sentences are
#    backwards while line order is natural. For charset recognition purposes
#    the line order is unimportant (In fact, for this implementation, even
#    word order is unimportant).
# Logical Hebrew - "windows-1255" - normal, naturally ordered text.
#
# "ISO-8859-8-I" is a subset of windows-1255 and doesn't need to be
#    specifically identified.
# "x-mac-hebrew" is also identified as windows-1255. A text in x-mac-hebrew
#    that contain special punctuation marks or diacritics is displayed with
#    some unconverted characters showing as question marks. This problem might
#    be corrected using another model prober for x-mac-hebrew. Due to the fact
#    that x-mac-hebrew texts are so rare, writing another model prober isn't
#    worth the effort and performance hit.
#
#### The Prober ####
#
# The prober is divided between two SBCharSetProbers and a HebrewProber,
# all of which are managed, created, fed data, inquired and deleted by the
# SBCSGroupProber. The two SBCharSetProbers identify that the text is in
# fact some kind of Hebrew, Logical or Visual. The final decision about which
# one is it is made by the HebrewProber by combining final-letter scores
# with the scores of the two SBCharSetProbers to produce a final answer.
#
# The SBCSGroupProber is responsible for stripping the original text of HTML
# tags, English characters, numbers, low-ASCII punctuation characters, spaces
# and new lines. It reduces any sequence of such characters to a single space.
# The buffer fed to each prober in the SBCS group prober is pure text in
# high-ASCII.
# The two SBCharSetProbers (model probers) share the same language model:
# Win1255Model.
# The first SBCharSetProber uses the model normally as any other
# SBCharSetProber does, to recognize windows-1255, upon which this model was
# built. The second SBCharSetProber is told to make the pair-of-letter
# lookup in the language model backwards. This in practice exactly simulates
# a visual Hebrew model using the windows-1255 logical Hebrew model.
#
# The HebrewProber is not using any language model. All it does is look for
# final-letter evidence suggesting the text is either logical Hebrew or visual
# Hebrew. Disjointed from the model probers, the results of the HebrewProber
# alone are meaningless. HebrewProber always returns 0.00 as confidence
# since it never identifies a charset by itself. Instead, the pointer to the
# HebrewProber is passed to the model probers as a helper "Name Prober".
# When the Group prober receives a positive identification from any prober,
# it asks for the name of the charset identified. If the prober queried is a
# Hebrew model prober, the model prober forwards the call to the
# HebrewProber to make the final decision. In the HebrewProber, the
# decision is made according to the final-letters scores maintained and Both
# model probers scores. The answer is returned in the form of the name of the
# charset identified, either "windows-1255" or "ISO-8859-8".

# windows-1255 / ISO-8859-8 code points of interest
FINAL_KAF = 0xea
NORMAL_KAF = 0xeb
FINAL_MEM = 0xed
NORMAL_MEM = 0xee
FINAL_NUN = 0xef
NORMAL_NUN = 0xf0
FINAL_PE = 0xf3
NORMAL_PE = 0xf4
FINAL_TSADI = 0xf5
NORMAL_TSADI = 0xf6

# Minimum Visual vs Logical final letter score difference.
# If the difference is below this, don't rely solely on the final letter score
# distance.
MIN_FINAL_CHAR_DISTANCE = 5

# Minimum Visual vs Logical model score difference.
# If the difference is below this, don't rely at all on the model score
# distance.
MIN_MODEL_DISTANCE = 0.01

VISUAL_HEBREW_NAME = "ISO-8859-8"
LOGICAL_HEBREW_NAME = "windows-1255"


class HebrewProber(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mLogicalProber = None
        self._mVisualProber = None
        self.reset()

    def reset(self):
        self._mFinalCharLogicalScore = 0
        self._mFinalCharVisualScore = 0
        # The two last characters seen in the previous buffer,
        # mPrev and mBeforePrev are initialized to space in order to simulate
        # a word delimiter at the beginning of the data
        self._mPrev = ' '
        self._mBeforePrev = ' '
        # These probers are owned by the group prober.

    def set_model_probers(self, logicalProber, visualProber):
        self._mLogicalProber = logicalProber
        self._mVisualProber = visualProber

    def is_final(self, c):
        return wrap_ord(c) in [FINAL_KAF, FINAL_MEM, FINAL_NUN, FINAL_PE,
                               FINAL_TSADI]

    def is_non_final(self, c):
        # The normal Tsadi is not a good Non-Final letter due to words like
        # 'lechotet' (to chat) containing an apostrophe after the tsadi. This
        # apostrophe is converted to a space in FilterWithoutEnglishLetters
        # causing the Non-Final tsadi to appear at an end of a word even
        # though this is not the case in the original text.
        # The letters Pe and Kaf rarely display a related behavior of not being
        # a good Non-Final letter. Words like 'Pop', 'Winamp' and 'Mubarak'
        # for example legally end with a Non-Final Pe or Kaf. However, the
        # benefit of these letters as Non-Final letters outweighs the damage
        # since these words are quite rare.
        return wrap_ord(c) in [NORMAL_KAF, NORMAL_MEM, NORMAL_NUN, NORMAL_PE]

    def feed(self, aBuf):
        # Final letter analysis for logical-visual decision.
        # Look for evidence that the received buffer is either logical Hebrew
        # or visual Hebrew.
        # The following cases are checked:
        # 1) A word longer than 1 letter, ending with a final letter. This is
        #    an indication that the text is laid out "naturally" since the
        #    final letter really appears at the end. +1 for logical score.
        # 2) A word longer than 1 letter, ending with a Non-Final letter. In
        #    normal Hebrew, words ending with Kaf, Mem, Nun, Pe or Tsadi,
        #    should not end with the Non-Final form of that letter. Exceptions
        #    to this rule are mentioned above in isNonFinal(). This is an
        #    indication that the text is laid out backwards. +1 for visual
        #    score
        # 3) A word longer than 1 letter, starting with a final letter. Final
        #    letters should not appear at the beginning of a word. This is an
        #    indication that the text is laid out backwards. +1 for visual
        #    score.
        #
        # The visual score and logical score are accumulated throughout the
        # text and are finally checked against each other in GetCharSetName().
        # No checking for final letters in the middle of words is done since
        # that case is not an indication for either Logical or Visual text.
        #
        # We automatically filter out all 7-bit characters (replace them with
        # spaces) so the word boundary detection works properly. [MAP]

        if self.get_state() == eNotMe:
            # Both model probers say it's not them. No reason to continue.
            return eNotMe

        aBuf = self.filter_high_bit_only(aBuf)

        for cur in aBuf:
            if cur == ' ':
                # We stand on a space - a word just ended
                if self._mBeforePrev != ' ':
                    # next-to-last char was not a space so self._mPrev is not a
                    # 1 letter word
                    if self.is_final(self._mPrev):
                        # case (1) [-2:not space][-1:final letter][cur:space]
                        self._mFinalCharLogicalScore += 1
                    elif self.is_non_final(self._mPrev):
                        # case (2) [-2:not space][-1:Non-Final letter][
                        #  cur:space]
                        self._mFinalCharVisualScore += 1
            else:
                # Not standing on a space
                if ((self._mBeforePrev == ' ') and
                        (self.is_final(self._mPrev)) and (cur != ' ')):
                    # case (3) [-2:space][-1:final letter][cur:not space]
                    self._mFinalCharVisualScore += 1
            self._mBeforePrev = self._mPrev
            self._mPrev = cur

        # Forever detecting, till the end or until both model probers return
        # eNotMe (handled above)
        return eDetecting

    def get_charset_name(self):
        # Make the decision: is it Logical or Visual?
        # If the final letter score distance is dominant enough, rely on it.
        finalsub = self._mFinalCharLogicalScore - self._mFinalCharVisualScore
        if finalsub >= MIN_FINAL_CHAR_DISTANCE:
            return LOGICAL_HEBREW_NAME
        if finalsub <= -MIN_FINAL_CHAR_DISTANCE:
            return VISUAL_HEBREW_NAME

        # It's not dominant enough, try to rely on the model scores instead.
        modelsub = (self._mLogicalProber.get_confidence()
                    - self._mVisualProber.get_confidence())
        if modelsub > MIN_MODEL_DISTANCE:
            return LOGICAL_HEBREW_NAME
        if modelsub < -MIN_MODEL_DISTANCE:
            return VISUAL_HEBREW_NAME

        # Still no good, back to final letter distance, maybe it'll save the
        # day.
        if finalsub < 0.0:
            return VISUAL_HEBREW_NAME

        # (finalsub > 0 - Logical) or (don't know what to do) default to
        # Logical.
        return LOGICAL_HEBREW_NAME

    def get_state(self):
        # Remain active as long as any of the model probers are active.
        if (self._mLogicalProber.get_state() == eNotMe) and \
           (self._mVisualProber.get_state() == eNotMe):
            return eNotMe
        return eDetecting
python3.3/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py000064400000005134151733566760023020 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8SMModel

ONE_CHAR_PROB = 0.5


class UTF8Prober(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(UTF8SMModel)
        self.reset()

    def reset(self):
        CharSetProber.reset(self)
        self._mCodingSM.reset()
        self._mNumOfMBChar = 0

    def get_charset_name(self):
        return "utf-8"

    def feed(self, aBuf):
        for c in aBuf:
            codingState = self._mCodingSM.next_state(c)
            if codingState == constants.eError:
                self._mState = constants.eNotMe
                break
            elif codingState == constants.eItsMe:
                self._mState = constants.eFoundIt
                break
            elif codingState == constants.eStart:
                if self._mCodingSM.get_current_charlen() >= 2:
                    self._mNumOfMBChar += 1

        if self.get_state() == constants.eDetecting:
            if self.get_confidence() > constants.SHORTCUT_THRESHOLD:
                self._mState = constants.eFoundIt

        return self.get_state()

    def get_confidence(self):
        unlike = 0.99
        if self._mNumOfMBChar < 6:
            for i in range(0, self._mNumOfMBChar):
                unlike = unlike * ONE_CHAR_PROB
            return 1.0 - unlike
        else:
            return unlike
python3.3/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py000064400000003214151733566760023256 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import EUCTWDistributionAnalysis
from .mbcssm import EUCTWSMModel

class EUCTWProber(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(EUCTWSMModel)
        self._mDistributionAnalyzer = EUCTWDistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "EUC-TW"
python3.3/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py000064400000015257151733566760024471 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
import sys
import codecs
from .latin1prober import Latin1Prober  # windows-1252
from .mbcsgroupprober import MBCSGroupProber  # multi-byte character sets
from .sbcsgroupprober import SBCSGroupProber  # single-byte character sets
from .escprober import EscCharSetProber  # ISO-2122, etc.
import re

MINIMUM_THRESHOLD = 0.20
ePureAscii = 0
eEscAscii = 1
eHighbyte = 2


class UniversalDetector:
    def __init__(self):
        self._highBitDetector = re.compile(b'[\x80-\xFF]')
        self._escDetector = re.compile(b'(\033|~{)')
        self._mEscCharSetProber = None
        self._mCharSetProbers = []
        self.reset()

    def reset(self):
        self.result = {'encoding': None, 'confidence': 0.0}
        self.done = False
        self._mStart = True
        self._mGotData = False
        self._mInputState = ePureAscii
        self._mLastChar = b''
        if self._mEscCharSetProber:
            self._mEscCharSetProber.reset()
        for prober in self._mCharSetProbers:
            prober.reset()

    def feed(self, aBuf):
        if self.done:
            return

        aLen = len(aBuf)
        if not aLen:
            return

        if not self._mGotData:
            # If the data starts with BOM, we know it is UTF
            if aBuf[:3] == codecs.BOM:
                # EF BB BF  UTF-8 with BOM
                self.result = {'encoding': "UTF-8", 'confidence': 1.0}
            elif aBuf[:4] == codecs.BOM_UTF32_LE:
                # FF FE 00 00  UTF-32, little-endian BOM
                self.result = {'encoding': "UTF-32LE", 'confidence': 1.0}
            elif aBuf[:4] == codecs.BOM_UTF32_BE:
                # 00 00 FE FF  UTF-32, big-endian BOM
                self.result = {'encoding': "UTF-32BE", 'confidence': 1.0}
            elif aBuf[:4] == b'\xFE\xFF\x00\x00':
                # FE FF 00 00  UCS-4, unusual octet order BOM (3412)
                self.result = {
                    'encoding': "X-ISO-10646-UCS-4-3412",
                    'confidence': 1.0
                }
            elif aBuf[:4] == b'\x00\x00\xFF\xFE':
                # 00 00 FF FE  UCS-4, unusual octet order BOM (2143)
                self.result = {
                    'encoding': "X-ISO-10646-UCS-4-2143",
                    'confidence': 1.0
                }
            elif aBuf[:2] == codecs.BOM_LE:
                # FF FE  UTF-16, little endian BOM
                self.result = {'encoding': "UTF-16LE", 'confidence': 1.0}
            elif aBuf[:2] == codecs.BOM_BE:
                # FE FF  UTF-16, big endian BOM
                self.result = {'encoding': "UTF-16BE", 'confidence': 1.0}

        self._mGotData = True
        if self.result['encoding'] and (self.result['confidence'] > 0.0):
            self.done = True
            return

        if self._mInputState == ePureAscii:
            if self._highBitDetector.search(aBuf):
                self._mInputState = eHighbyte
            elif ((self._mInputState == ePureAscii) and
                    self._escDetector.search(self._mLastChar + aBuf)):
                self._mInputState = eEscAscii

        self._mLastChar = aBuf[-1:]

        if self._mInputState == eEscAscii:
            if not self._mEscCharSetProber:
                self._mEscCharSetProber = EscCharSetProber()
            if self._mEscCharSetProber.feed(aBuf) == constants.eFoundIt:
                self.result = {'encoding': self._mEscCharSetProber.get_charset_name(),
                               'confidence': self._mEscCharSetProber.get_confidence()}
                self.done = True
        elif self._mInputState == eHighbyte:
            if not self._mCharSetProbers:
                self._mCharSetProbers = [MBCSGroupProber(), SBCSGroupProber(),
                                         Latin1Prober()]
            for prober in self._mCharSetProbers:
                if prober.feed(aBuf) == constants.eFoundIt:
                    self.result = {'encoding': prober.get_charset_name(),
                                   'confidence': prober.get_confidence()}
                    self.done = True
                    break

    def close(self):
        if self.done:
            return
        if not self._mGotData:
            if constants._debug:
                sys.stderr.write('no data received!\n')
            return
        self.done = True

        if self._mInputState == ePureAscii:
            self.result = {'encoding': 'ascii', 'confidence': 1.0}
            return self.result

        if self._mInputState == eHighbyte:
            proberConfidence = None
            maxProberConfidence = 0.0
            maxProber = None
            for prober in self._mCharSetProbers:
                if not prober:
                    continue
                proberConfidence = prober.get_confidence()
                if proberConfidence > maxProberConfidence:
                    maxProberConfidence = proberConfidence
                    maxProber = prober
            if maxProber and (maxProberConfidence > MINIMUM_THRESHOLD):
                self.result = {'encoding': maxProber.get_charset_name(),
                               'confidence': maxProber.get_confidence()}
                return self.result

        if constants._debug:
            sys.stderr.write('no probers hit minimum threshhold\n')
            for prober in self._mCharSetProbers[0].mProbers:
                if not prober:
                    continue
                sys.stderr.write('%s confidence = %s\n' %
                                 (prober.get_charset_name(),
                                  prober.get_confidence()))
python3.3/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py000064400000003556151733566760023571 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
import re


class CharSetProber:
    def __init__(self):
        pass

    def reset(self):
        self._mState = constants.eDetecting

    def get_charset_name(self):
        return None

    def feed(self, aBuf):
        pass

    def get_state(self):
        return self._mState

    def get_confidence(self):
        return 0.0

    def filter_high_bit_only(self, aBuf):
        aBuf = re.sub(b'([\x00-\x7F])+', b' ', aBuf)
        return aBuf

    def filter_without_english_letters(self, aBuf):
        aBuf = re.sub(b'([A-Za-z])+', b' ', aBuf)
        return aBuf

    def filter_with_english_letters(self, aBuf):
        # TODO
        return aBuf
python3.3/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py000064400000003224151733566760022756 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import Big5DistributionAnalysis
from .mbcssm import Big5SMModel


class Big5Prober(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(Big5SMModel)
        self._mDistributionAnalyzer = Big5DistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "Big5"
python3.3/site-packages/pip/_vendor/requests/utils.py000064400000047005151733566760016673 0ustar00# -*- coding: utf-8 -*-

"""
requests.utils
~~~~~~~~~~~~~~

This module provides utility functions that are used within Requests
that are also useful for external consumption.

"""

import cgi
import codecs
import collections
import io
import os
import platform
import re
import sys
import socket
import struct

from . import __version__
from . import certs
from .compat import parse_http_list as _parse_list_header
from .compat import (quote, urlparse, bytes, str, OrderedDict, unquote, is_py2,
                     builtin_str, getproxies, proxy_bypass, urlunparse)
from .cookies import RequestsCookieJar, cookiejar_from_dict
from .structures import CaseInsensitiveDict
from .exceptions import InvalidURL

_hush_pyflakes = (RequestsCookieJar,)

NETRC_FILES = ('.netrc', '_netrc')

DEFAULT_CA_BUNDLE_PATH = certs.where()


def dict_to_sequence(d):
    """Returns an internal sequence dictionary update."""

    if hasattr(d, 'items'):
        d = d.items()

    return d


def super_len(o):
    if hasattr(o, '__len__'):
        return len(o)

    if hasattr(o, 'len'):
        return o.len

    if hasattr(o, 'fileno'):
        try:
            fileno = o.fileno()
        except io.UnsupportedOperation:
            pass
        else:
            return os.fstat(fileno).st_size

    if hasattr(o, 'getvalue'):
        # e.g. BytesIO, cStringIO.StringIO
        return len(o.getvalue())


def get_netrc_auth(url):
    """Returns the Requests tuple auth for a given url from netrc."""

    try:
        from netrc import netrc, NetrcParseError

        netrc_path = None

        for f in NETRC_FILES:
            try:
                loc = os.path.expanduser('~/{0}'.format(f))
            except KeyError:
                # os.path.expanduser can fail when $HOME is undefined and
                # getpwuid fails. See http://bugs.python.org/issue20164 &
                # https://github.com/kennethreitz/requests/issues/1846
                return

            if os.path.exists(loc):
                netrc_path = loc
                break

        # Abort early if there isn't one.
        if netrc_path is None:
            return

        ri = urlparse(url)

        # Strip port numbers from netloc
        host = ri.netloc.split(':')[0]

        try:
            _netrc = netrc(netrc_path).authenticators(host)
            if _netrc:
                # Return with login / password
                login_i = (0 if _netrc[0] else 1)
                return (_netrc[login_i], _netrc[2])
        except (NetrcParseError, IOError):
            # If there was a parsing error or a permissions issue reading the file,
            # we'll just skip netrc auth
            pass

    # AppEngine hackiness.
    except (ImportError, AttributeError):
        pass


def guess_filename(obj):
    """Tries to guess the filename of the given object."""
    name = getattr(obj, 'name', None)
    if name and name[0] != '<' and name[-1] != '>':
        return os.path.basename(name)


def from_key_val_list(value):
    """Take an object and test to see if it can be represented as a
    dictionary. Unless it can not be represented as such, return an
    OrderedDict, e.g.,

    ::

        >>> from_key_val_list([('key', 'val')])
        OrderedDict([('key', 'val')])
        >>> from_key_val_list('string')
        ValueError: need more than 1 value to unpack
        >>> from_key_val_list({'key': 'val'})
        OrderedDict([('key', 'val')])
    """
    if value is None:
        return None

    if isinstance(value, (str, bytes, bool, int)):
        raise ValueError('cannot encode objects that are not 2-tuples')

    return OrderedDict(value)


def to_key_val_list(value):
    """Take an object and test to see if it can be represented as a
    dictionary. If it can be, return a list of tuples, e.g.,

    ::

        >>> to_key_val_list([('key', 'val')])
        [('key', 'val')]
        >>> to_key_val_list({'key': 'val'})
        [('key', 'val')]
        >>> to_key_val_list('string')
        ValueError: cannot encode objects that are not 2-tuples.
    """
    if value is None:
        return None

    if isinstance(value, (str, bytes, bool, int)):
        raise ValueError('cannot encode objects that are not 2-tuples')

    if isinstance(value, collections.Mapping):
        value = value.items()

    return list(value)


# From mitsuhiko/werkzeug (used with permission).
def parse_list_header(value):
    """Parse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Quotes are removed automatically after parsing.

    It basically works like :func:`parse_set_header` just that items
    may appear multiple times and case sensitivity is preserved.

    The return value is a standard :class:`list`:

    >>> parse_list_header('token, "quoted value"')
    ['token', 'quoted value']

    To create a header from the :class:`list` again, use the
    :func:`dump_header` function.

    :param value: a string with a list header.
    :return: :class:`list`
    """
    result = []
    for item in _parse_list_header(value):
        if item[:1] == item[-1:] == '"':
            item = unquote_header_value(item[1:-1])
        result.append(item)
    return result


# From mitsuhiko/werkzeug (used with permission).
def parse_dict_header(value):
    """Parse lists of key, value pairs as described by RFC 2068 Section 2 and
    convert them into a python dict:

    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
    >>> type(d) is dict
    True
    >>> sorted(d.items())
    [('bar', 'as well'), ('foo', 'is a fish')]

    If there is no value for a key it will be `None`:

    >>> parse_dict_header('key_without_value')
    {'key_without_value': None}

    To create a header from the :class:`dict` again, use the
    :func:`dump_header` function.

    :param value: a string with a dict header.
    :return: :class:`dict`
    """
    result = {}
    for item in _parse_list_header(value):
        if '=' not in item:
            result[item] = None
            continue
        name, value = item.split('=', 1)
        if value[:1] == value[-1:] == '"':
            value = unquote_header_value(value[1:-1])
        result[name] = value
    return result


# From mitsuhiko/werkzeug (used with permission).
def unquote_header_value(value, is_filename=False):
    r"""Unquotes a header value.  (Reversal of :func:`quote_header_value`).
    This does not use the real unquoting but what browsers are actually
    using for quoting.

    :param value: the header value to unquote.
    """
    if value and value[0] == value[-1] == '"':
        # this is not the real unquoting, but fixing this so that the
        # RFC is met will result in bugs with internet explorer and
        # probably some other browsers as well.  IE for example is
        # uploading files with "C:\foo\bar.txt" as filename
        value = value[1:-1]

        # if this is a filename and the starting characters look like
        # a UNC path, then just return the value without quotes.  Using the
        # replace sequence below on a UNC path has the effect of turning
        # the leading double slash into a single slash and then
        # _fix_ie_filename() doesn't work correctly.  See #458.
        if not is_filename or value[:2] != '\\\\':
            return value.replace('\\\\', '\\').replace('\\"', '"')
    return value


def dict_from_cookiejar(cj):
    """Returns a key/value dictionary from a CookieJar.

    :param cj: CookieJar object to extract cookies from.
    """

    cookie_dict = {}

    for cookie in cj:
        cookie_dict[cookie.name] = cookie.value

    return cookie_dict


def add_dict_to_cookiejar(cj, cookie_dict):
    """Returns a CookieJar from a key/value dictionary.

    :param cj: CookieJar to insert cookies into.
    :param cookie_dict: Dict of key/values to insert into CookieJar.
    """

    cj2 = cookiejar_from_dict(cookie_dict)
    cj.update(cj2)
    return cj


def get_encodings_from_content(content):
    """Returns encodings from given content string.

    :param content: bytestring to extract encodings from.
    """

    charset_re = re.compile(r'<meta.*?charset=["\']*(.+?)["\'>]', flags=re.I)
    pragma_re = re.compile(r'<meta.*?content=["\']*;?charset=(.+?)["\'>]', flags=re.I)
    xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]')

    return (charset_re.findall(content) +
            pragma_re.findall(content) +
            xml_re.findall(content))


def get_encoding_from_headers(headers):
    """Returns encodings from given HTTP Header Dict.

    :param headers: dictionary to extract encoding from.
    """

    content_type = headers.get('content-type')

    if not content_type:
        return None

    content_type, params = cgi.parse_header(content_type)

    if 'charset' in params:
        return params['charset'].strip("'\"")

    if 'text' in content_type:
        return 'ISO-8859-1'


def stream_decode_response_unicode(iterator, r):
    """Stream decodes a iterator."""

    if r.encoding is None:
        for item in iterator:
            yield item
        return

    decoder = codecs.getincrementaldecoder(r.encoding)(errors='replace')
    for chunk in iterator:
        rv = decoder.decode(chunk)
        if rv:
            yield rv
    rv = decoder.decode(b'', final=True)
    if rv:
        yield rv


def iter_slices(string, slice_length):
    """Iterate over slices of a string."""
    pos = 0
    while pos < len(string):
        yield string[pos:pos + slice_length]
        pos += slice_length


def get_unicode_from_response(r):
    """Returns the requested content back in unicode.

    :param r: Response object to get unicode content from.

    Tried:

    1. charset from content-type

    2. every encodings from ``<meta ... charset=XXX>``

    3. fall back and replace all unicode characters

    """

    tried_encodings = []

    # Try charset from content-type
    encoding = get_encoding_from_headers(r.headers)

    if encoding:
        try:
            return str(r.content, encoding)
        except UnicodeError:
            tried_encodings.append(encoding)

    # Fall back:
    try:
        return str(r.content, encoding, errors='replace')
    except TypeError:
        return r.content


# The unreserved URI characters (RFC 3986)
UNRESERVED_SET = frozenset(
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
    + "0123456789-._~")


def unquote_unreserved(uri):
    """Un-escape any percent-escape sequences in a URI that are unreserved
    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
    """
    parts = uri.split('%')
    for i in range(1, len(parts)):
        h = parts[i][0:2]
        if len(h) == 2 and h.isalnum():
            try:
                c = chr(int(h, 16))
            except ValueError:
                raise InvalidURL("Invalid percent-escape sequence: '%s'" % h)

            if c in UNRESERVED_SET:
                parts[i] = c + parts[i][2:]
            else:
                parts[i] = '%' + parts[i]
        else:
            parts[i] = '%' + parts[i]
    return ''.join(parts)


def requote_uri(uri):
    """Re-quote the given URI.

    This function passes the given URI through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.
    """
    # Unquote only the unreserved characters
    # Then quote only illegal characters (do not quote reserved, unreserved,
    # or '%')
    return quote(unquote_unreserved(uri), safe="!#$%&'()*+,/:;=?@[]~")


def address_in_network(ip, net):
    """
    This function allows you to check if on IP belongs to a network subnet
    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
    """
    ipaddr = struct.unpack('=L', socket.inet_aton(ip))[0]
    netaddr, bits = net.split('/')
    netmask = struct.unpack('=L', socket.inet_aton(dotted_netmask(int(bits))))[0]
    network = struct.unpack('=L', socket.inet_aton(netaddr))[0] & netmask
    return (ipaddr & netmask) == (network & netmask)


def dotted_netmask(mask):
    """
    Converts mask from /xx format to xxx.xxx.xxx.xxx
    Example: if mask is 24 function returns 255.255.255.0
    """
    bits = 0xffffffff ^ (1 << 32 - mask) - 1
    return socket.inet_ntoa(struct.pack('>I', bits))


def is_ipv4_address(string_ip):
    try:
        socket.inet_aton(string_ip)
    except socket.error:
        return False
    return True


def is_valid_cidr(string_network):
    """Very simple check of the cidr format in no_proxy variable"""
    if string_network.count('/') == 1:
        try:
            mask = int(string_network.split('/')[1])
        except ValueError:
            return False

        if mask < 1 or mask > 32:
            return False

        try:
            socket.inet_aton(string_network.split('/')[0])
        except socket.error:
            return False
    else:
        return False
    return True


def should_bypass_proxies(url):
    """
    Returns whether we should bypass proxies or not.
    """
    get_proxy = lambda k: os.environ.get(k) or os.environ.get(k.upper())

    # First check whether no_proxy is defined. If it is, check that the URL
    # we're getting isn't in the no_proxy list.
    no_proxy = get_proxy('no_proxy')
    netloc = urlparse(url).netloc

    if no_proxy:
        # We need to check whether we match here. We need to see if we match
        # the end of the netloc, both with and without the port.
        no_proxy = no_proxy.replace(' ', '').split(',')

        ip = netloc.split(':')[0]
        if is_ipv4_address(ip):
            for proxy_ip in no_proxy:
                if is_valid_cidr(proxy_ip):
                    if address_in_network(ip, proxy_ip):
                        return True
        else:
            for host in no_proxy:
                if netloc.endswith(host) or netloc.split(':')[0].endswith(host):
                    # The URL does match something in no_proxy, so we don't want
                    # to apply the proxies on this URL.
                    return True

    # If the system proxy settings indicate that this URL should be bypassed,
    # don't proxy.
    # The proxy_bypass function is incredibly buggy on OS X in early versions
    # of Python 2.6, so allow this call to fail. Only catch the specific
    # exceptions we've seen, though: this call failing in other ways can reveal
    # legitimate problems.
    try:
        bypass = proxy_bypass(netloc)
    except (TypeError, socket.gaierror):
        bypass = False

    if bypass:
        return True

    return False

def get_environ_proxies(url):
    """Return a dict of environment proxies."""
    if should_bypass_proxies(url):
        return {}
    else:
        return getproxies()


def default_user_agent(name="python-requests"):
    """Return a string representing the default user agent."""
    _implementation = platform.python_implementation()

    if _implementation == 'CPython':
        _implementation_version = platform.python_version()
    elif _implementation == 'PyPy':
        _implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                                sys.pypy_version_info.minor,
                                                sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            _implementation_version = ''.join([_implementation_version, sys.pypy_version_info.releaselevel])
    elif _implementation == 'Jython':
        _implementation_version = platform.python_version()  # Complete Guess
    elif _implementation == 'IronPython':
        _implementation_version = platform.python_version()  # Complete Guess
    else:
        _implementation_version = 'Unknown'

    try:
        p_system = platform.system()
        p_release = platform.release()
    except IOError:
        p_system = 'Unknown'
        p_release = 'Unknown'

    return " ".join(['%s/%s' % (name, __version__),
                     '%s/%s' % (_implementation, _implementation_version),
                     '%s/%s' % (p_system, p_release)])


def default_headers():
    return CaseInsensitiveDict({
        'User-Agent': default_user_agent(),
        'Accept-Encoding': ', '.join(('gzip', 'deflate')),
        'Accept': '*/*'
    })


def parse_header_links(value):
    """Return a dict of parsed link headers proxies.

    i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

    """

    links = []

    replace_chars = " '\""

    for val in value.split(","):
        try:
            url, params = val.split(";", 1)
        except ValueError:
            url, params = val, ''

        link = {}

        link["url"] = url.strip("<> '\"")

        for param in params.split(";"):
            try:
                key, value = param.split("=")
            except ValueError:
                break

            link[key.strip(replace_chars)] = value.strip(replace_chars)

        links.append(link)

    return links


# Null bytes; no need to recreate these on each call to guess_json_utf
_null = '\x00'.encode('ascii')  # encoding to ASCII for Python 3
_null2 = _null * 2
_null3 = _null * 3


def guess_json_utf(data):
    # JSON always starts with two ASCII characters, so detection is as
    # easy as counting the nulls and from their location and count
    # determine the encoding. Also detect a BOM, if present.
    sample = data[:4]
    if sample in (codecs.BOM_UTF32_LE, codecs.BOM32_BE):
        return 'utf-32'     # BOM included
    if sample[:3] == codecs.BOM_UTF8:
        return 'utf-8-sig'  # BOM included, MS style (discouraged)
    if sample[:2] in (codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE):
        return 'utf-16'     # BOM included
    nullcount = sample.count(_null)
    if nullcount == 0:
        return 'utf-8'
    if nullcount == 2:
        if sample[::2] == _null2:   # 1st and 3rd are null
            return 'utf-16-be'
        if sample[1::2] == _null2:  # 2nd and 4th are null
            return 'utf-16-le'
        # Did not detect 2 valid UTF-16 ascii-range characters
    if nullcount == 3:
        if sample[:3] == _null3:
            return 'utf-32-be'
        if sample[1:] == _null3:
            return 'utf-32-le'
        # Did not detect a valid UTF-32 ascii-range character
    return None


def prepend_scheme_if_needed(url, new_scheme):
    '''Given a URL that may or may not have a scheme, prepend the given scheme.
    Does not replace a present scheme with the one provided as an argument.'''
    scheme, netloc, path, params, query, fragment = urlparse(url, new_scheme)

    # urlparse is a finicky beast, and sometimes decides that there isn't a
    # netloc present. Assume that it's being over-cautious, and switch netloc
    # and path if urlparse decided there was no netloc.
    if not netloc:
        netloc, path = path, netloc

    return urlunparse((scheme, netloc, path, params, query, fragment))


def get_auth_from_url(url):
    """Given a url with authentication components, extract them into a tuple of
    username,password."""
    parsed = urlparse(url)

    try:
        auth = (unquote(parsed.username), unquote(parsed.password))
    except (AttributeError, TypeError):
        auth = ('', '')

    return auth


def to_native_string(string, encoding='ascii'):
    """
    Given a string object, regardless of type, returns a representation of that
    string in the native string type, encoding and decoding where necessary.
    This assumes ASCII unless told otherwise.
    """
    out = None

    if isinstance(string, builtin_str):
        out = string
    else:
        if is_py2:
            out = string.encode(encoding)
        else:
            out = string.decode(encoding)

    return out
python3.3/site-packages/pip/_vendor/__init__.py000064400000000412151733566760015406 0ustar00"""
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.

Files inside of pip._vendor should be considered immutable and should only be
updated to versions from upstream.
"""
from __future__ import absolute_import
python3.3/site-packages/pip/_vendor/re-vendor.py000064400000001405151733566760015553 0ustar00import os
import sys
import pip
import glob
import shutil

here = os.path.abspath(os.path.dirname(__file__))

def usage():
    print("Usage: re-vendor.py [clean|vendor]")
    sys.exit(1)

def clean():
    for fn in os.listdir(here):
        dirname = os.path.join(here, fn)
        if os.path.isdir(dirname):
            shutil.rmtree(dirname)
    # six is a single file, not a package
    os.unlink(os.path.join(here, 'six.py'))

def vendor():
    pip.main(['install', '-t', here, '-r', 'vendor.txt'])
    for dirname in glob.glob('*.egg-info'):
        shutil.rmtree(dirname)

if __name__ == '__main__':
    if len(sys.argv) != 2:
        usage()
    if sys.argv[1] == 'clean':
        clean()
    elif sys.argv[1] == 'vendor':
        vendor()
    else:
        usage()
python3.3/site-packages/pip/_vendor/colorama/ansitowin32.py000064400000015010151733566760017624 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys

from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll


winterm = None
if windll is not None:
    winterm = WinTerm()


def is_a_tty(stream):
    return hasattr(stream, 'isatty') and stream.isatty()


class StreamWrapper(object):
    '''
    Wraps a stream (such as stdout), acting as a transparent proxy for all
    attribute access apart from method 'write()', which is delegated to our
    Converter instance.
    '''
    def __init__(self, wrapped, converter):
        # double-underscore everything to prevent clashes with names of
        # attributes on the wrapped stream object.
        self.__wrapped = wrapped
        self.__convertor = converter

    def __getattr__(self, name):
        return getattr(self.__wrapped, name)

    def write(self, text):
        self.__convertor.write(text)


class AnsiToWin32(object):
    '''
    Implements a 'write()' method which, on Windows, will strip ANSI character
    sequences from the text, and if outputting to a tty, will convert them into
    win32 function calls.
    '''
    ANSI_RE = re.compile('\033\[((?:\d|;)*)([a-zA-Z])')

    def __init__(self, wrapped, convert=None, strip=None, autoreset=False):
        # The wrapped stream (normally sys.stdout or sys.stderr)
        self.wrapped = wrapped

        # should we reset colors to defaults after every .write()
        self.autoreset = autoreset

        # create the proxy wrapping our output stream
        self.stream = StreamWrapper(wrapped, self)

        on_windows = sys.platform.startswith('win')

        # should we strip ANSI sequences from our output?
        if strip is None:
            strip = on_windows
        self.strip = strip

        # should we should convert ANSI sequences into win32 calls?
        if convert is None:
            convert = on_windows and is_a_tty(wrapped)
        self.convert = convert

        # dict of ansi codes to win32 functions and parameters
        self.win32_calls = self.get_win32_calls()

        # are we wrapping stderr?
        self.on_stderr = self.wrapped is sys.stderr


    def should_wrap(self):
        '''
        True if this class is actually needed. If false, then the output
        stream will not be affected, nor will win32 calls be issued, so
        wrapping stdout is not actually required. This will generally be
        False on non-Windows platforms, unless optional functionality like
        autoreset has been requested using kwargs to init()
        '''
        return self.convert or self.strip or self.autoreset


    def get_win32_calls(self):
        if self.convert and winterm:
            return {
                AnsiStyle.RESET_ALL: (winterm.reset_all, ),
                AnsiStyle.BRIGHT: (winterm.style, WinStyle.BRIGHT),
                AnsiStyle.DIM: (winterm.style, WinStyle.NORMAL),
                AnsiStyle.NORMAL: (winterm.style, WinStyle.NORMAL),
                AnsiFore.BLACK: (winterm.fore, WinColor.BLACK),
                AnsiFore.RED: (winterm.fore, WinColor.RED),
                AnsiFore.GREEN: (winterm.fore, WinColor.GREEN),
                AnsiFore.YELLOW: (winterm.fore, WinColor.YELLOW),
                AnsiFore.BLUE: (winterm.fore, WinColor.BLUE),
                AnsiFore.MAGENTA: (winterm.fore, WinColor.MAGENTA),
                AnsiFore.CYAN: (winterm.fore, WinColor.CYAN),
                AnsiFore.WHITE: (winterm.fore, WinColor.GREY),
                AnsiFore.RESET: (winterm.fore, ),
                AnsiBack.BLACK: (winterm.back, WinColor.BLACK),
                AnsiBack.RED: (winterm.back, WinColor.RED),
                AnsiBack.GREEN: (winterm.back, WinColor.GREEN),
                AnsiBack.YELLOW: (winterm.back, WinColor.YELLOW),
                AnsiBack.BLUE: (winterm.back, WinColor.BLUE),
                AnsiBack.MAGENTA: (winterm.back, WinColor.MAGENTA),
                AnsiBack.CYAN: (winterm.back, WinColor.CYAN),
                AnsiBack.WHITE: (winterm.back, WinColor.GREY),
                AnsiBack.RESET: (winterm.back, ),
            }


    def write(self, text):
        if self.strip or self.convert:
            self.write_and_convert(text)
        else:
            self.wrapped.write(text)
            self.wrapped.flush()
        if self.autoreset:
            self.reset_all()


    def reset_all(self):
        if self.convert:
            self.call_win32('m', (0,))
        elif not self.wrapped.closed and is_a_tty(self.wrapped):
            self.wrapped.write(Style.RESET_ALL)


    def write_and_convert(self, text):
        '''
        Write the given text to our wrapped stream, stripping any ANSI
        sequences from the text, and optionally converting them into win32
        calls.
        '''
        cursor = 0
        for match in self.ANSI_RE.finditer(text):
            start, end = match.span()
            self.write_plain_text(text, cursor, start)
            self.convert_ansi(*match.groups())
            cursor = end
        self.write_plain_text(text, cursor, len(text))


    def write_plain_text(self, text, start, end):
        if start < end:
            self.wrapped.write(text[start:end])
            self.wrapped.flush()


    def convert_ansi(self, paramstring, command):
        if self.convert:
            params = self.extract_params(paramstring)
            self.call_win32(command, params)


    def extract_params(self, paramstring):
        def split(paramstring):
            for p in paramstring.split(';'):
                if p != '':
                    yield int(p)
        return tuple(split(paramstring))


    def call_win32(self, command, params):
        if params == []:
            params = [0]
        if command == 'm':
            for param in params:
                if param in self.win32_calls:
                    func_args = self.win32_calls[param]
                    func = func_args[0]
                    args = func_args[1:]
                    kwargs = dict(on_stderr=self.on_stderr)
                    func(*args, **kwargs)
        elif command in ('H', 'f'): # set cursor position
            func = winterm.set_cursor_position
            func(params, on_stderr=self.on_stderr)
        elif command in ('J'):
            func = winterm.erase_data
            func(params, on_stderr=self.on_stderr)
        elif command == 'A':
            if params == () or params == None:
                num_rows = 1
            else:
                num_rows = params[0]
            func = winterm.cursor_up
            func(num_rows, on_stderr=self.on_stderr)

python3.3/site-packages/pip/_vendor/colorama/__pycache__/ansi.cpython-33.pyc000064400000005060151733566760022663 0ustar00�
7�Rec@s�dZdZdd�ZGdd�de�ZGdd�d�ZGdd	�d	�ZGd
d�d�Zee�Zee�Z	ee�Z
dS(
u�
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
uCstt|�dS(Num(uCSIustr(ucode((u2/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansi.pyu
code_to_chars	su
code_to_charscBs |EeZdZdd�ZdS(u	AnsiCodescCsRxKt|�D]=}|jd�s
t||�}t||t|��q
q
WdS(Nu_(udiru
startswithugetattrusetattru
code_to_chars(uselfucodesunameuvalue((u2/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansi.pyu__init__
suAnsiCodes.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansi.pyu	AnsiCodessu	AnsiCodescBsJ|EeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
S(uAnsiForeiii i!i"i#i$i%i'N(u__name__u
__module__u__qualname__uBLACKuREDuGREENuYELLOWuBLUEuMAGENTAuCYANuWHITEuRESET(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansi.pyuAnsiForesuAnsiForecBsJ|EeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
S(uAnsiBacki(i)i*i+i,i-i.i/i1N(u__name__u
__module__u__qualname__uBLACKuREDuGREENuYELLOWuBLUEuMAGENTAuCYANuWHITEuRESET(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansi.pyuAnsiBacksuAnsiBackcBs,|EeZdZdZdZdZdZdS(u	AnsiStyleiiiiN(u__name__u
__module__u__qualname__uBRIGHTuDIMuNORMALu	RESET_ALL(u
__locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansi.pyu	AnsiStyle)su	AnsiStyleN(u__doc__uCSIu
code_to_charsuobjectu	AnsiCodesuAnsiForeuAnsiBacku	AnsiStyleuForeuBackuStyle(((u2/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansi.pyu<module>spython3.3/site-packages/pip/_vendor/colorama/__pycache__/initialise.cpython-33.pyc000064400000004307151733566760024066 0ustar00�
7�Rec@s�ddlZddlZddlmZejZejZejaeja	dadd�Zdddddd�Zdd	�Zd
d�Zdd
�ZdS(iNi(uAnsiToWin32cCstt�j�dS(N(uAnsiToWin32uorig_stdoutu	reset_all(((u8/tmp/pip-zej_zi-build/pip/_vendor/colorama/initialise.pyu	reset_allsu	reset_allcCs�|r+t|||g�r+td��ntt||||�t_att||||�t_a	t
s�tjt
�da
ndS(Nu,wrap=False conflicts with any other arg=TrueT(uanyu
ValueErroruwrap_streamuorig_stdoutusysustdoutuwrapped_stdoutuorig_stderrustderruwrapped_stderruatexit_doneuatexituregisteru	reset_alluTrue(u	autoresetuconvertustripuwrap((u8/tmp/pip-zej_zi-build/pip/_vendor/colorama/initialise.pyuinits
uinitcCstt_tt_dS(N(uorig_stdoutusysustdoutuorig_stderrustderr(((u8/tmp/pip-zej_zi-build/pip/_vendor/colorama/initialise.pyudeinit&s	udeinitcCstt_tt_dS(N(uwrapped_stdoutusysustdoutustderr(((u8/tmp/pip-zej_zi-build/pip/_vendor/colorama/initialise.pyureinit+s	ureinitcCsC|r?t|d|d|d|�}|j�r?|j}q?n|S(Nuconvertustripu	autoreset(uAnsiToWin32ushould_wrapustream(ustreamuconvertustripu	autoresetuwrapuwrapper((u8/tmp/pip-zej_zi-build/pip/_vendor/colorama/initialise.pyuwrap_stream0s	uwrap_streamFT(uatexitusysuansitowin32uAnsiToWin32ustdoutuorig_stdoutustderruorig_stderruwrapped_stdoutuwrapped_stderruFalseuatexit_doneu	reset_alluNoneuTrueuinitudeinitureinituwrap_stream(((u8/tmp/pip-zej_zi-build/pip/_vendor/colorama/initialise.pyu<module>s				python3.3/site-packages/pip/_vendor/colorama/__pycache__/winterm.cpython-33.pyc000064400000013567151733566760023431 0ustar00�
7�Renc@sVddlmZGdd�de�ZGdd�de�ZGdd�de�ZdS(	i(uwin32cBsD|EeZdZdZdZdZdZdZdZdZ	dZ
d	S(
uWinColoriiiiiiiiN(u__name__u
__module__u__qualname__uBLACKuBLUEuGREENuCYANuREDuMAGENTAuYELLOWuGREY(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyuWinColorsuWinColorcBs |EeZdZdZdZdS(uWinStyleiiN(u__name__u
__module__u__qualname__uNORMALuBRIGHT(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyuWinStylesuWinStylecBs�|EeZdZdd�Zdd�Zdd�Zddd�Zddd	d
�Z	dddd�Z
ddd
d�Zdddd�Zdd�Z
dddd�Zdddd�Zdddd�ZdS(uWinTermcCsPtjtj�j|_|j|j�|j|_|j|_	|j
|_dS(N(uwin32uGetConsoleScreenBufferInfouSTDOUTuwAttributesu_defaultu	set_attrsu_foreu
_default_foreu_backu
_default_backu_styleu_default_style(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyu__init__s
uWinTerm.__init__cCs|j|jd|jS(Ni(u_foreu_backu_style(uself((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyu	get_attrssuWinTerm.get_attrscCs2|d@|_|d?d@|_|tj@|_dS(Nii(u_foreu_backuWinStyleuBRIGHTu_style(uselfuvalue((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyu	set_attrs"s
uWinTerm.set_attrscCs'|j|j�|jd|j�dS(Nuattrs(u	set_attrsu_defaultuset_console(uselfu	on_stderr((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyu	reset_all'suWinTerm.reset_allcCs5|dkr|j}n||_|jd|�dS(Nu	on_stderr(uNoneu
_default_foreu_foreuset_console(uselfuforeu	on_stderr((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyufore+s	uWinTerm.forecCs5|dkr|j}n||_|jd|�dS(Nu	on_stderr(uNoneu
_default_backu_backuset_console(uselfubacku	on_stderr((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyuback1s	uWinTerm.backcCs5|dkr|j}n||_|jd|�dS(Nu	on_stderr(uNoneu_default_styleu_styleuset_console(uselfustyleu	on_stderr((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyustyle7s	u
WinTerm.stylecCsJ|dkr|j�}ntj}|r6tj}ntj||�dS(N(uNoneu	get_attrsuwin32uSTDOUTuSTDERRuSetConsoleTextAttribute(uselfuattrsu	on_stderruhandle((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyuset_console=s	uWinTerm.set_consolecCs4tj|�j}|jd7_|jd7_|S(Ni(uwin32uGetConsoleScreenBufferInfoudwCursorPositionuXuY(uselfuhandleuposition((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyuget_positionEsuWinTerm.get_positioncCs?|dkrdStj}|r+tj}ntj||�dS(N(uNoneuwin32uSTDOUTuSTDERRuSetConsoleCursorPosition(uselfupositionu	on_stderruhandle((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyuset_cursor_positionMs	uWinTerm.set_cursor_positionicCsd|dkrdStj}|r+tj}n|j|�}|j||jf}|j||�dS(Ni(uwin32uSTDOUTuSTDERRuget_positionuYuXuset_cursor_position(uselfunum_rowsu	on_stderruhandleupositionuadjusted_position((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyu	cursor_upWs	uWinTerm.cursor_upcCs�|ddkrdStj}|r/tj}ntjdd�}tj|�}|jj|jj}tj|d||�tj	||j
�||�tj||j|jf�dS(Niiu (i(uwin32uSTDOUTuSTDERRuCOORDuGetConsoleScreenBufferInfoudwSizeuXuYuFillConsoleOutputCharacteruFillConsoleOutputAttributeu	get_attrsuSetConsoleCursorPosition(uselfumodeu	on_stderruhandleucoord_screenucsbiudw_con_size((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyu
erase_dataas	uWinTerm.erase_dataNF(u__name__u
__module__u__qualname__u__init__u	get_attrsu	set_attrsuNoneu	reset_alluFalseuforeubackustyleuset_consoleuget_positionuset_cursor_positionu	cursor_upu
erase_data(u
__locals__((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyuWinTerms

uWinTermN(uuwin32uobjectuWinColoruWinStyleuWinTerm(((u5/tmp/pip-zej_zi-build/pip/_vendor/colorama/winterm.pyu<module>spython3.3/site-packages/pip/_vendor/colorama/__pycache__/__init__.cpython-33.pyc000064400000000725151733566760023473 0ustar00�
7�Re�c@sRddlmZmZmZddlmZmZmZddlm	Z	dZ
dS(i(uinitudeinitureinit(uForeuBackuStyle(uAnsiToWin32u0.3.1N(u
initialiseuinitudeinitureinituansiuForeuBackuStyleuansitowin32uAnsiToWin32u__version__(((u6/tmp/pip-zej_zi-build/pip/_vendor/colorama/__init__.pyu<module>spython3.3/site-packages/pip/_vendor/colorama/__pycache__/ansitowin32.cpython-33.pyc000064400000021011151733566760024103 0ustar00�
7�Rec@s�ddlZddlZddlmZmZmZmZddlmZm	Z	m
Z
ddlmZdZedk	r�e�Zndd�ZGdd	�d	e�ZGd
d�de�ZdS(iNi(uAnsiForeuAnsiBacku	AnsiStyleuStyle(uWinTermuWinColoruWinStyle(uwindllcCst|d�o|j�S(Nuisatty(uhasattruisatty(ustream((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuis_a_ttysuis_a_ttycBs>|EeZdZdZdd�Zdd�Zdd�ZdS(	u
StreamWrapperu�
    Wraps a stream (such as stdout), acting as a transparent proxy for all
    attribute access apart from method 'write()', which is delegated to our
    Converter instance.
    cCs||_||_dS(N(u_StreamWrapper__wrappedu_StreamWrapper__convertor(uselfuwrappedu	converter((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyu__init__s	uStreamWrapper.__init__cCst|j|�S(N(ugetattru_StreamWrapper__wrapped(uselfuname((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyu__getattr__suStreamWrapper.__getattr__cCs|jj|�dS(N(u_StreamWrapper__convertoruwrite(uselfutext((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuwrite"suStreamWrapper.writeN(u__name__u
__module__u__qualname__u__doc__u__init__u__getattr__uwrite(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyu
StreamWrappersu
StreamWrappercBs�|EeZdZdZejd�Zddddd�Z	dd�Z
dd�Zd	d
�Zdd�Z
d
d�Zdd�Zdd�Zdd�Zdd�ZdS(uAnsiToWin32u�
    Implements a 'write()' method which, on Windows, will strip ANSI character
    sequences from the text, and if outputting to a tty, will convert them into
    win32 function calls.
    u\[((?:\d|;)*)([a-zA-Z])cCs�||_||_t||�|_tjjd�}|dkrK|}n||_|dkru|oot	|�}n||_
|j�|_|jtj
k|_dS(Nuwin(uwrappedu	autoresetu
StreamWrapperustreamusysuplatformu
startswithuNoneustripuis_a_ttyuconvertuget_win32_callsuwin32_callsustderru	on_stderr(uselfuwrappeduconvertustripu	autoresetu
on_windows((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyu__init__.s					uAnsiToWin32.__init__cCs|jp|jp|jS(uj
        True if this class is actually needed. If false, then the output
        stream will not be affected, nor will win32 calls be issued, so
        wrapping stdout is not actually required. This will generally be
        False on non-Windows platforms, unless optional functionality like
        autoreset has been requested using kwargs to init()
        (uconvertustripu	autoreset(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyushould_wrapKsuAnsiToWin32.should_wrapcCs�|jr�tr�itjftj6tjtjftj6tjtjftj	6tjtjftj6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
ft
j6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjftj6SdS(N(uconvertuwintermu	reset_allu	AnsiStyleu	RESET_ALLustyleuWinStyleuBRIGHTuNORMALuDIMuforeuWinColoruBLACKuAnsiForeuREDuGREENuYELLOWuBLUEuMAGENTAuCYANuGREYuWHITEuRESETubackuAnsiBack(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuget_win32_callsVs0uAnsiToWin32.get_win32_callscCsY|js|jr"|j|�n|jj|�|jj�|jrU|j�ndS(N(ustripuconvertuwrite_and_convertuwrappeduwriteuflushu	autoresetu	reset_all(uselfutext((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuwriters
	uAnsiToWin32.writecCsR|jr|jdd�n2|jjrNt|j�rN|jjtj�ndS(Numi(i(uconvertu
call_win32uwrappeducloseduis_a_ttyuwriteuStyleu	RESET_ALL(uself((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyu	reset_all|s	uAnsiToWin32.reset_allcCs~d}xX|jj|�D]D}|j�\}}|j|||�|j|j��|}qW|j||t|��dS(u�
        Write the given text to our wrapped stream, stripping any ANSI
        sequences from the text, and optionally converting them into win32
        calls.
        iN(uANSI_REufinditeruspanuwrite_plain_textuconvert_ansiugroupsulen(uselfutextucursorumatchustartuend((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuwrite_and_convert�s
uAnsiToWin32.write_and_convertcCs:||kr6|jj|||��|jj�ndS(N(uwrappeduwriteuflush(uselfutextustartuend((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuwrite_plain_text�suAnsiToWin32.write_plain_textcCs/|jr+|j|�}|j||�ndS(N(uconvertuextract_paramsu
call_win32(uselfuparamstringucommanduparams((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuconvert_ansi�s	uAnsiToWin32.convert_ansicCsdd�}t||��S(Ncss8x1|jd�D] }|dkrt|�VqqWdS(Nu;u(usplituint(uparamstringup((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyusplit�su)AnsiToWin32.extract_params.<locals>.split(utuple(uselfuparamstringusplit((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuextract_params�suAnsiToWin32.extract_paramsc	Cs@|gkrdg}n|dkr�x|D]^}||jkr+|j|}|d}|dd�}td|j�}|||�q+q+Wn�|d	kr�tj}||d|j�n�|dkr�tj}||d|j�nV|dkr<|fks
|dkrd}n
|d}tj}||d|j�ndS(
Niumiu	on_stderruHufuJuA(uHuf(uwin32_callsudictu	on_stderruwintermuset_cursor_positionu
erase_datauNoneu	cursor_up(	uselfucommanduparamsuparamu	func_argsufuncuargsukwargsunum_rows((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyu
call_win32�s,


			
	uAnsiToWin32.call_win32NF(u__name__u
__module__u__qualname__u__doc__ureucompileuANSI_REuNoneuFalseu__init__ushould_wrapuget_win32_callsuwriteu	reset_alluwrite_and_convertuwrite_plain_textuconvert_ansiuextract_paramsu
call_win32(u
__locals__((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyuAnsiToWin32&s
uAnsiToWin32(ureusysuansiuAnsiForeuAnsiBacku	AnsiStyleuStyleuwintermuWinTermuWinColoruWinStyleuwin32uwindlluNoneuis_a_ttyuobjectu
StreamWrapperuAnsiToWin32(((u9/tmp/pip-zej_zi-build/pip/_vendor/colorama/ansitowin32.pyu<module>s"python3.3/site-packages/pip/_vendor/colorama/__pycache__/win32.cpython-33.pyc000064400000012054151733566760022674 0ustar00�
7�Re/c@s]dZdZddlZddlmZy#eej�ZddlmZWn*eefk
rwdZdd�Z
Yn�XddlmZmZm
Z
mZmZmZmZGd	d
�d
e�ZejjZejge_eje_ejjZejee�ge_eje_ejj
Zejejge_eje_ejjZ ejej!ge _eje _ejj"Z#eje
ejej!eej�ge#_eje#_ejj$Z%ejejejej!eej�ge%_eje%_iee�e6ee�e6Z&edd�Zd
d�Z
dd�Zdd�Z'dd�Z$dS(iiiN(u
LibraryLoader(uwintypescGsdS(N(uNone(u_((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyu<lambda>su<lambda>(ubyrefu	Structureuc_charuc_shortuc_uint32uc_ushortuPOINTERcBsh|EeZdZdZdejfdejfdejfdejfdejfgZdd�Z	d	S(
uCONSOLE_SCREEN_BUFFER_INFOustruct in wincon.h.udwSizeudwCursorPositionuwAttributesusrWindowudwMaximumWindowSizecCshd|jj|jj|jj|jj|j|jj|jj|jj|jj	|j
j|j
jfS(Nu"(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)(udwSizeuYuXudwCursorPositionuwAttributesusrWindowuTopuLeftuBottomuRightudwMaximumWindowSize(uself((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyu__str__s$u"CONSOLE_SCREEN_BUFFER_INFO.__str__N(
u__name__u
__module__u__qualname__u__doc__uwintypesu_COORDuWORDu
SMALL_RECTu_fields_u__str__(u
__locals__((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyuCONSOLE_SCREEN_BUFFER_INFOsuCONSOLE_SCREEN_BUFFER_INFOcCs,t|}t�}t|t|��}|S(N(uhandlesuCONSOLE_SCREEN_BUFFER_INFOu_GetConsoleScreenBufferInfoubyref(u	stream_iduhandleucsbiusuccess((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyuGetConsoleScreenBufferInfo[s

	uGetConsoleScreenBufferInfocCst|}t||�S(N(uhandlesu_SetConsoleTextAttribute(u	stream_iduattrsuhandle((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyuSetConsoleTextAttributebs
uSetConsoleTextAttributecCs�tj|�}|jdks-|jdkr1dStj|jd|jd�}tt�j}|j|j7_|j|j7_t	|}t
||�S(Nii(uwintypesu_COORDuYuXuGetConsoleScreenBufferInfouSTDOUTusrWindowuTopuLeftuhandlesu_SetConsoleCursorPosition(u	stream_idupositionuadjusted_positionusruhandle((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyuSetConsoleCursorPositionfs 
uSetConsoleCursorPositioncCsYt|}t|�}tj|�}tjd�}t||||t|��}|jS(Ni(uhandlesuc_charuwintypesuDWORDu_FillConsoleOutputCharacterAubyrefuvalue(u	stream_iducharulengthustartuhandleunum_writtenusuccess((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyuFillConsoleOutputCharacterws
uFillConsoleOutputCharactercCsSt|}tj|�}tj|�}tjd�}t||||t|��S(ua FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )i(uhandlesuwintypesuWORDuDWORDu_FillConsoleOutputAttributeubyref(u	stream_iduattrulengthustartuhandleu	attributeunum_written((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyuFillConsoleOutputAttribute�s
uFillConsoleOutputAttributei����i�((uSTDOUTuSTDERRuctypesu
LibraryLoaderuWinDLLuwindlluwintypesuAttributeErroruImportErroruNoneuSetConsoleTextAttributeubyrefu	Structureuc_charuc_shortuc_uint32uc_ushortuPOINTERuCONSOLE_SCREEN_BUFFER_INFOukernel32uGetStdHandleu
_GetStdHandleuDWORDuargtypesuHANDLEurestypeuGetConsoleScreenBufferInfou_GetConsoleScreenBufferInfouBOOLu_SetConsoleTextAttributeuWORDuSetConsoleCursorPositionu_SetConsoleCursorPositionu_COORDuFillConsoleOutputCharacterAu_FillConsoleOutputCharacterAuFillConsoleOutputAttributeu_FillConsoleOutputAttributeuhandlesuFillConsoleOutputCharacter(((u3/tmp/pip-zej_zi-build/pip/_vendor/colorama/win32.pyu<module>s`4

python3.3/site-packages/pip/_vendor/colorama/win32.py000064400000011457151733566760016421 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.

# from winbase.h
STDOUT = -11
STDERR = -12

import ctypes
from ctypes import LibraryLoader

try:
    windll = LibraryLoader(ctypes.WinDLL)
    from ctypes import wintypes
except (AttributeError, ImportError):
    windll = None
    SetConsoleTextAttribute = lambda *_: None
else:
    from ctypes import (
        byref, Structure, c_char, c_short, c_uint32, c_ushort, POINTER
    )

    class CONSOLE_SCREEN_BUFFER_INFO(Structure):
        """struct in wincon.h."""
        _fields_ = [
            ("dwSize", wintypes._COORD),
            ("dwCursorPosition", wintypes._COORD),
            ("wAttributes", wintypes.WORD),
            ("srWindow", wintypes.SMALL_RECT),
            ("dwMaximumWindowSize", wintypes._COORD),
        ]
        def __str__(self):
            return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % (
                self.dwSize.Y, self.dwSize.X
                , self.dwCursorPosition.Y, self.dwCursorPosition.X
                , self.wAttributes
                , self.srWindow.Top, self.srWindow.Left, self.srWindow.Bottom, self.srWindow.Right
                , self.dwMaximumWindowSize.Y, self.dwMaximumWindowSize.X
            )

    _GetStdHandle = windll.kernel32.GetStdHandle
    _GetStdHandle.argtypes = [
        wintypes.DWORD,
    ]
    _GetStdHandle.restype = wintypes.HANDLE

    _GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo
    _GetConsoleScreenBufferInfo.argtypes = [
        wintypes.HANDLE,
        POINTER(CONSOLE_SCREEN_BUFFER_INFO),
    ]
    _GetConsoleScreenBufferInfo.restype = wintypes.BOOL

    _SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute
    _SetConsoleTextAttribute.argtypes = [
        wintypes.HANDLE,
        wintypes.WORD,
    ]
    _SetConsoleTextAttribute.restype = wintypes.BOOL

    _SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition
    _SetConsoleCursorPosition.argtypes = [
        wintypes.HANDLE,
        wintypes._COORD,
    ]
    _SetConsoleCursorPosition.restype = wintypes.BOOL

    _FillConsoleOutputCharacterA = windll.kernel32.FillConsoleOutputCharacterA
    _FillConsoleOutputCharacterA.argtypes = [
        wintypes.HANDLE,
        c_char,
        wintypes.DWORD,
        wintypes._COORD,
        POINTER(wintypes.DWORD),
    ]
    _FillConsoleOutputCharacterA.restype = wintypes.BOOL

    _FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute
    _FillConsoleOutputAttribute.argtypes = [
        wintypes.HANDLE,
        wintypes.WORD,
        wintypes.DWORD,
        wintypes._COORD,
        POINTER(wintypes.DWORD),
    ]
    _FillConsoleOutputAttribute.restype = wintypes.BOOL

    handles = {
        STDOUT: _GetStdHandle(STDOUT),
        STDERR: _GetStdHandle(STDERR),
    }

    def GetConsoleScreenBufferInfo(stream_id=STDOUT):
        handle = handles[stream_id]
        csbi = CONSOLE_SCREEN_BUFFER_INFO()
        success = _GetConsoleScreenBufferInfo(
            handle, byref(csbi))
        return csbi

    def SetConsoleTextAttribute(stream_id, attrs):
        handle = handles[stream_id]
        return _SetConsoleTextAttribute(handle, attrs)

    def SetConsoleCursorPosition(stream_id, position):
        position = wintypes._COORD(*position)
        # If the position is out of range, do nothing.
        if position.Y <= 0 or position.X <= 0:
            return
        # Adjust for Windows' SetConsoleCursorPosition:
        #    1. being 0-based, while ANSI is 1-based.
        #    2. expecting (x,y), while ANSI uses (y,x).
        adjusted_position = wintypes._COORD(position.Y - 1, position.X - 1)
        # Adjust for viewport's scroll position
        sr = GetConsoleScreenBufferInfo(STDOUT).srWindow
        adjusted_position.Y += sr.Top
        adjusted_position.X += sr.Left
        # Resume normal processing
        handle = handles[stream_id]
        return _SetConsoleCursorPosition(handle, adjusted_position)

    def FillConsoleOutputCharacter(stream_id, char, length, start):
        handle = handles[stream_id]
        char = c_char(char)
        length = wintypes.DWORD(length)
        num_written = wintypes.DWORD(0)
        # Note that this is hard-coded for ANSI (vs wide) bytes.
        success = _FillConsoleOutputCharacterA(
            handle, char, length, start, byref(num_written))
        return num_written.value

    def FillConsoleOutputAttribute(stream_id, attr, length, start):
        ''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )'''
        handle = handles[stream_id]
        attribute = wintypes.WORD(attr)
        length = wintypes.DWORD(length)
        num_written = wintypes.DWORD(0)
        # Note that this is hard-coded for ANSI (vs wide) bytes.
        return _FillConsoleOutputAttribute(
            handle, attribute, length, start, byref(num_written))
python3.3/site-packages/pip/_vendor/colorama/initialise.py000064400000002421151733566760017600 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import atexit
import sys

from .ansitowin32 import AnsiToWin32


orig_stdout = sys.stdout
orig_stderr = sys.stderr

wrapped_stdout = sys.stdout
wrapped_stderr = sys.stderr

atexit_done = False


def reset_all():
    AnsiToWin32(orig_stdout).reset_all()


def init(autoreset=False, convert=None, strip=None, wrap=True):

    if not wrap and any([autoreset, convert, strip]):
        raise ValueError('wrap=False conflicts with any other arg=True')

    global wrapped_stdout, wrapped_stderr
    sys.stdout = wrapped_stdout = \
        wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
    sys.stderr = wrapped_stderr = \
        wrap_stream(orig_stderr, convert, strip, autoreset, wrap)

    global atexit_done
    if not atexit_done:
        atexit.register(reset_all)
        atexit_done = True


def deinit():
    sys.stdout = orig_stdout
    sys.stderr = orig_stderr


def reinit():
    sys.stdout = wrapped_stdout
    sys.stderr = wrapped_stdout


def wrap_stream(stream, convert, strip, autoreset, wrap):
    if wrap:
        wrapper = AnsiToWin32(stream,
            convert=convert, strip=strip, autoreset=autoreset)
        if wrapper.should_wrap():
            stream = wrapper.stream
    return stream


python3.3/site-packages/pip/_vendor/colorama/__init__.py000064400000000331151733566760017203 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from .initialise import init, deinit, reinit
from .ansi import Fore, Back, Style
from .ansitowin32 import AnsiToWin32

__version__ = '0.3.1'

python3.3/site-packages/pip/_vendor/colorama/winterm.py000064400000010156151733566760017137 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32


# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4
    MAGENTA = 5
    YELLOW  = 6
    GREY    = 7

# from wincon.h
class WinStyle(object):
    NORMAL = 0x00 # dim text, dim background
    BRIGHT = 0x08 # bright text, dim background


class WinTerm(object):

    def __init__(self):
        self._default = win32.GetConsoleScreenBufferInfo(win32.STDOUT).wAttributes
        self.set_attrs(self._default)
        self._default_fore = self._fore
        self._default_back = self._back
        self._default_style = self._style

    def get_attrs(self):
        return self._fore + self._back * 16 + self._style

    def set_attrs(self, value):
        self._fore = value & 7
        self._back = (value >> 4) & 7
        self._style = value & WinStyle.BRIGHT

    def reset_all(self, on_stderr=None):
        self.set_attrs(self._default)
        self.set_console(attrs=self._default)

    def fore(self, fore=None, on_stderr=False):
        if fore is None:
            fore = self._default_fore
        self._fore = fore
        self.set_console(on_stderr=on_stderr)

    def back(self, back=None, on_stderr=False):
        if back is None:
            back = self._default_back
        self._back = back
        self.set_console(on_stderr=on_stderr)

    def style(self, style=None, on_stderr=False):
        if style is None:
            style = self._default_style
        self._style = style
        self.set_console(on_stderr=on_stderr)

    def set_console(self, attrs=None, on_stderr=False):
        if attrs is None:
            attrs = self.get_attrs()
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        win32.SetConsoleTextAttribute(handle, attrs)

    def get_position(self, handle):
        position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition
        # Because Windows coordinates are 0-based,
        # and win32.SetConsoleCursorPosition expects 1-based.
        position.X += 1
        position.Y += 1
        return position
    
    def set_cursor_position(self, position=None, on_stderr=False):
        if position is None:
            #I'm not currently tracking the position, so there is no default.
            #position = self.get_position()
            return
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        win32.SetConsoleCursorPosition(handle, position)

    def cursor_up(self, num_rows=0, on_stderr=False):
        if num_rows == 0:
            return
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        position = self.get_position(handle)
        adjusted_position = (position.Y - num_rows, position.X)
        self.set_cursor_position(adjusted_position, on_stderr)

    def erase_data(self, mode=0, on_stderr=False):
        # 0 (or None) should clear from the cursor to the end of the screen.
        # 1 should clear from the cursor to the beginning of the screen.
        # 2 should clear the entire screen. (And maybe move cursor to (1,1)?)
        #
        # At the moment, I only support mode 2. From looking at the API, it
        #    should be possible to calculate a different number of bytes to clear,
        #    and to do so relative to the cursor position.
        if mode[0] not in (2,):
            return
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        # here's where we'll home the cursor
        coord_screen = win32.COORD(0,0)
        csbi = win32.GetConsoleScreenBufferInfo(handle)
        # get the number of character cells in the current buffer
        dw_con_size = csbi.dwSize.X * csbi.dwSize.Y
        # fill the entire screen with blanks
        win32.FillConsoleOutputCharacter(handle, ' ', dw_con_size, coord_screen)
        # now set the buffer's attributes accordingly
        win32.FillConsoleOutputAttribute(handle, self.get_attrs(), dw_con_size, coord_screen );
        # put the cursor at (0, 0)
        win32.SetConsoleCursorPosition(handle, (coord_screen.X, coord_screen.Y))
python3.3/site-packages/pip/_vendor/colorama/ansi.py000064400000002017151733566760016401 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
'''
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
'''

CSI = '\033['

def code_to_chars(code):
    return CSI + str(code) + 'm'

class AnsiCodes(object):
    def __init__(self, codes):
        for name in dir(codes):
            if not name.startswith('_'):
                value = getattr(codes, name)
                setattr(self, name, code_to_chars(value))

class AnsiFore:
    BLACK   = 30
    RED     = 31
    GREEN   = 32
    YELLOW  = 33
    BLUE    = 34
    MAGENTA = 35
    CYAN    = 36
    WHITE   = 37
    RESET   = 39

class AnsiBack:
    BLACK   = 40
    RED     = 41
    GREEN   = 42
    YELLOW  = 43
    BLUE    = 44
    MAGENTA = 45
    CYAN    = 46
    WHITE   = 47
    RESET   = 49

class AnsiStyle:
    BRIGHT    = 1
    DIM       = 2
    NORMAL    = 22
    RESET_ALL = 0

Fore = AnsiCodes( AnsiFore )
Back = AnsiCodes( AnsiBack )
Style = AnsiCodes( AnsiStyle )

python3.3/site-packages/pip/_vendor/pkg_resources.py000064400000303271151733566760016533 0ustar00"""
Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
"""

import sys
import os
import time
import re
import imp
import zipfile
import zipimport
import warnings
import stat
import functools
import pkgutil
import token
import symbol
import operator
import platform
from pkgutil import get_importer

try:
    from urlparse import urlparse, urlunparse
except ImportError:
    from urllib.parse import urlparse, urlunparse

try:
    frozenset
except NameError:
    from sets import ImmutableSet as frozenset
try:
    basestring
    next = lambda o: o.next()
    from cStringIO import StringIO as BytesIO
except NameError:
    basestring = str
    from io import BytesIO
    def execfile(fn, globs=None, locs=None):
        if globs is None:
            globs = globals()
        if locs is None:
            locs = globs
        exec(compile(open(fn).read(), fn, 'exec'), globs, locs)

# capture these to bypass sandboxing
from os import utime
try:
    from os import mkdir, rename, unlink
    WRITE_SUPPORT = True
except ImportError:
    # no write support, probably under GAE
    WRITE_SUPPORT = False

from os import open as os_open
from os.path import isdir, split

# Avoid try/except due to potential problems with delayed import mechanisms.
if sys.version_info >= (3, 3) and sys.implementation.name == "cpython":
    import importlib._bootstrap as importlib_bootstrap
else:
    importlib_bootstrap = None

try:
    import parser
except ImportError:
    pass

def _bypass_ensure_directory(name, mode=0x1FF):  # 0777
    # Sandbox-bypassing version of ensure_directory()
    if not WRITE_SUPPORT:
        raise IOError('"os.mkdir" not supported on this platform.')
    dirname, filename = split(name)
    if dirname and filename and not isdir(dirname):
        _bypass_ensure_directory(dirname)
        mkdir(dirname, mode)


_state_vars = {}

def _declare_state(vartype, **kw):
    globals().update(kw)
    _state_vars.update(dict.fromkeys(kw, vartype))

def __getstate__():
    state = {}
    g = globals()
    for k, v in _state_vars.items():
        state[k] = g['_sget_'+v](g[k])
    return state

def __setstate__(state):
    g = globals()
    for k, v in state.items():
        g['_sset_'+_state_vars[k]](k, g[k], v)
    return state

def _sget_dict(val):
    return val.copy()

def _sset_dict(key, ob, state):
    ob.clear()
    ob.update(state)

def _sget_object(val):
    return val.__getstate__()

def _sset_object(key, ob, state):
    ob.__setstate__(state)

_sget_none = _sset_none = lambda *args: None


def get_supported_platform():
    """Return this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    """
    plat = get_build_platform()
    m = macosVersionString.match(plat)
    if m is not None and sys.platform == "darwin":
        try:
            plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3))
        except ValueError:
            pass    # not Mac OS X
    return plat

__all__ = [
    # Basic resource access and distribution/entry point discovery
    'require', 'run_script', 'get_provider',  'get_distribution',
    'load_entry_point', 'get_entry_map', 'get_entry_info', 'iter_entry_points',
    'resource_string', 'resource_stream', 'resource_filename',
    'resource_listdir', 'resource_exists', 'resource_isdir',

    # Environmental control
    'declare_namespace', 'working_set', 'add_activation_listener',
    'find_distributions', 'set_extraction_path', 'cleanup_resources',
    'get_default_cache',

    # Primary implementation classes
    'Environment', 'WorkingSet', 'ResourceManager',
    'Distribution', 'Requirement', 'EntryPoint',

    # Exceptions
    'ResolutionError','VersionConflict','DistributionNotFound','UnknownExtra',
    'ExtractionError',

    # Parsing functions and string utilities
    'parse_requirements', 'parse_version', 'safe_name', 'safe_version',
    'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections',
    'safe_extra', 'to_filename', 'invalid_marker', 'evaluate_marker',

    # filesystem utilities
    'ensure_directory', 'normalize_path',

    # Distribution "precedence" constants
    'EGG_DIST', 'BINARY_DIST', 'SOURCE_DIST', 'CHECKOUT_DIST', 'DEVELOP_DIST',

    # "Provider" interfaces, implementations, and registration/lookup APIs
    'IMetadataProvider', 'IResourceProvider', 'FileMetadata',
    'PathMetadata', 'EggMetadata', 'EmptyProvider', 'empty_provider',
    'NullProvider', 'EggProvider', 'DefaultProvider', 'ZipProvider',
    'register_finder', 'register_namespace_handler', 'register_loader_type',
    'fixup_namespace_packages', 'get_importer',

    # Deprecated/backward compatibility only
    'run_main', 'AvailableDistributions',
]

class ResolutionError(Exception):
    """Abstract base for dependency resolution errors"""
    def __repr__(self):
        return self.__class__.__name__+repr(self.args)

class VersionConflict(ResolutionError):
    """An already-installed version conflicts with the requested version"""

class DistributionNotFound(ResolutionError):
    """A requested distribution was not found"""

class UnknownExtra(ResolutionError):
    """Distribution doesn't have an "extra feature" of the given name"""
_provider_factories = {}

PY_MAJOR = sys.version[:3]
EGG_DIST = 3
BINARY_DIST = 2
SOURCE_DIST = 1
CHECKOUT_DIST = 0
DEVELOP_DIST = -1

def register_loader_type(loader_type, provider_factory):
    """Register `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    """
    _provider_factories[loader_type] = provider_factory

def get_provider(moduleOrReq):
    """Return an IResourceProvider for the named module or requirement"""
    if isinstance(moduleOrReq,Requirement):
        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
    try:
        module = sys.modules[moduleOrReq]
    except KeyError:
        __import__(moduleOrReq)
        module = sys.modules[moduleOrReq]
    loader = getattr(module, '__loader__', None)
    return _find_adapter(_provider_factories, loader)(module)

def _macosx_vers(_cache=[]):
    if not _cache:
        import platform
        version = platform.mac_ver()[0]
        # fallback for MacPorts
        if version == '':
            import plistlib
            plist = '/System/Library/CoreServices/SystemVersion.plist'
            if os.path.exists(plist):
                if hasattr(plistlib, 'readPlist'):
                    plist_content = plistlib.readPlist(plist)
                    if 'ProductVersion' in plist_content:
                        version = plist_content['ProductVersion']

        _cache.append(version.split('.'))
    return _cache[0]

def _macosx_arch(machine):
    return {'PowerPC':'ppc', 'Power_Macintosh':'ppc'}.get(machine,machine)

def get_build_platform():
    """Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    """
    try:
        # Python 2.7 or >=3.2
        from sysconfig import get_platform
    except ImportError:
        from distutils.util import get_platform

    plat = get_platform()
    if sys.platform == "darwin" and not plat.startswith('macosx-'):
        try:
            version = _macosx_vers()
            machine = os.uname()[4].replace(" ", "_")
            return "macosx-%d.%d-%s" % (int(version[0]), int(version[1]),
                _macosx_arch(machine))
        except ValueError:
            # if someone is running a non-Mac darwin system, this will fall
            # through to the default implementation
            pass
    return plat

macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
get_platform = get_build_platform   # XXX backward compat


def compatible_platforms(provided,required):
    """Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    """
    if provided is None or required is None or provided==required:
        return True     # easy case

    # Mac OS X special cases
    reqMac = macosVersionString.match(required)
    if reqMac:
        provMac = macosVersionString.match(provided)

        # is this a Mac package?
        if not provMac:
            # this is backwards compatibility for packages built before
            # setuptools 0.6. All packages built after this point will
            # use the new macosx designation.
            provDarwin = darwinVersionString.match(provided)
            if provDarwin:
                dversion = int(provDarwin.group(1))
                macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2))
                if dversion == 7 and macosversion >= "10.3" or \
                        dversion == 8 and macosversion >= "10.4":

                    #import warnings
                    #warnings.warn("Mac eggs should be rebuilt to "
                    #    "use the macosx designation instead of darwin.",
                    #    category=DeprecationWarning)
                    return True
            return False    # egg isn't macosx or legacy darwin

        # are they the same major version and machine type?
        if provMac.group(1) != reqMac.group(1) or \
                provMac.group(3) != reqMac.group(3):
            return False

        # is the required OS major update >= the provided one?
        if int(provMac.group(2)) > int(reqMac.group(2)):
            return False

        return True

    # XXX Linux and other platforms' special cases should go here
    return False


def run_script(dist_spec, script_name):
    """Locate distribution `dist_spec` and run its `script_name` script"""
    ns = sys._getframe(1).f_globals
    name = ns['__name__']
    ns.clear()
    ns['__name__'] = name
    require(dist_spec)[0].run_script(script_name, ns)

run_main = run_script   # backward compatibility

def get_distribution(dist):
    """Return a current distribution object for a Requirement or string"""
    if isinstance(dist,basestring): dist = Requirement.parse(dist)
    if isinstance(dist,Requirement): dist = get_provider(dist)
    if not isinstance(dist,Distribution):
        raise TypeError("Expected string, Requirement, or Distribution", dist)
    return dist

def load_entry_point(dist, group, name):
    """Return `name` entry point of `group` for `dist` or raise ImportError"""
    return get_distribution(dist).load_entry_point(group, name)

def get_entry_map(dist, group=None):
    """Return the entry point map for `group`, or the full entry map"""
    return get_distribution(dist).get_entry_map(group)

def get_entry_info(dist, group, name):
    """Return the EntryPoint object for `group`+`name`, or ``None``"""
    return get_distribution(dist).get_entry_info(group, name)


class IMetadataProvider:

    def has_metadata(name):
        """Does the package's distribution contain the named metadata?"""

    def get_metadata(name):
        """The named metadata resource as a string"""

    def get_metadata_lines(name):
        """Yield named metadata resource as list of non-blank non-comment lines

       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted."""

    def metadata_isdir(name):
        """Is the named metadata a directory?  (like ``os.path.isdir()``)"""

    def metadata_listdir(name):
        """List of metadata names in the directory (like ``os.listdir()``)"""

    def run_script(script_name, namespace):
        """Execute the named script in the supplied namespace dictionary"""


class IResourceProvider(IMetadataProvider):
    """An object that provides access to package resources"""

    def get_resource_filename(manager, resource_name):
        """Return a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_stream(manager, resource_name):
        """Return a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_string(manager, resource_name):
        """Return a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``"""

    def has_resource(resource_name):
        """Does the package contain the named resource?"""

    def resource_isdir(resource_name):
        """Is the named resource a directory?  (like ``os.path.isdir()``)"""

    def resource_listdir(resource_name):
        """List of resource names in the directory (like ``os.listdir()``)"""


class WorkingSet(object):
    """A collection of active distributions on sys.path (or a similar list)"""

    def __init__(self, entries=None):
        """Create working set from list of path entries (default=sys.path)"""
        self.entries = []
        self.entry_keys = {}
        self.by_key = {}
        self.callbacks = []

        if entries is None:
            entries = sys.path

        for entry in entries:
            self.add_entry(entry)

    @classmethod
    def _build_master(cls):
        """
        Prepare the master working set.
        """
        ws = cls()
        try:
            from __main__ import __requires__
        except ImportError:
            # The main program does not list any requirements
            return ws

        # ensure the requirements are met
        try:
            ws.require(__requires__)
        except VersionConflict:
            return cls._build_from_requirements(__requires__)

        return ws

    @classmethod
    def _build_from_requirements(cls, req_spec):
        """
        Build a working set from a requirement spec. Rewrites sys.path.
        """
        # try it without defaults already on sys.path
        # by starting with an empty path
        ws = cls([])
        reqs = parse_requirements(req_spec)
        dists = ws.resolve(reqs, Environment())
        for dist in dists:
            ws.add(dist)

        # add any missing entries from sys.path
        for entry in sys.path:
            if entry not in ws.entries:
                ws.add_entry(entry)

        # then copy back to sys.path
        sys.path[:] = ws.entries
        return ws

    def add_entry(self, entry):
        """Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        """
        self.entry_keys.setdefault(entry, [])
        self.entries.append(entry)
        for dist in find_distributions(entry, True):
            self.add(dist, entry, False)

    def __contains__(self,dist):
        """True if `dist` is the active distribution for its project"""
        return self.by_key.get(dist.key) == dist

    def find(self, req):
        """Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        """
        dist = self.by_key.get(req.key)
        if dist is not None and dist not in req:
            raise VersionConflict(dist,req)     # XXX add more info
        else:
            return dist

    def iter_entry_points(self, group, name=None):
        """Yield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        """
        for dist in self:
            entries = dist.get_entry_map(group)
            if name is None:
                for ep in entries.values():
                    yield ep
            elif name in entries:
                yield entries[name]

    def run_script(self, requires, script_name):
        """Locate distribution for `requires` and run `script_name` script"""
        ns = sys._getframe(1).f_globals
        name = ns['__name__']
        ns.clear()
        ns['__name__'] = name
        self.require(requires)[0].run_script(script_name, ns)

    def __iter__(self):
        """Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        """
        seen = {}
        for item in self.entries:
            if item not in self.entry_keys:
                # workaround a cache issue
                continue

            for key in self.entry_keys[item]:
                if key not in seen:
                    seen[key]=1
                    yield self.by_key[key]

    def add(self, dist, entry=None, insert=True, replace=False):
        """Add `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        """
        if insert:
            dist.insert_on(self.entries, entry)

        if entry is None:
            entry = dist.location
        keys = self.entry_keys.setdefault(entry,[])
        keys2 = self.entry_keys.setdefault(dist.location,[])
        if not replace and dist.key in self.by_key:
            return      # ignore hidden distros

        self.by_key[dist.key] = dist
        if dist.key not in keys:
            keys.append(dist.key)
        if dist.key not in keys2:
            keys2.append(dist.key)
        self._added_new(dist)

    def resolve(self, requirements, env=None, installer=None,
            replace_conflicting=False):
        """List all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.

        Unless `replace_conflicting=True`, raises a VersionConflict exception if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
        """

        requirements = list(requirements)[::-1]  # set up the stack
        processed = {}  # set of processed requirements
        best = {}  # key -> dist
        to_activate = []

        while requirements:
            req = requirements.pop(0)   # process dependencies breadth-first
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(req, ws, installer)
                    if dist is None:
                        #msg = ("The '%s' distribution was not found on this "
                        #       "system, and is required by this application.")
                        #raise DistributionNotFound(msg % req)

                        # unfortunately, zc.buildout uses a str(err)
                        # to get the name of the distribution here..
                        raise DistributionNotFound(req)
                to_activate.append(dist)
            if dist not in req:
                # Oops, the "best" so far conflicts with a dependency
                raise VersionConflict(dist,req) # XXX put more info here
            requirements.extend(dist.requires(req.extras)[::-1])
            processed[req] = True

        return to_activate    # return list of distros to activate

    def find_plugins(self, plugin_env, full_env=None, installer=None,
            fallback=True):
        """Find all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            map(working_set.add, distributions)  # add plugins+libs to sys.path
            print 'Could not load', errors        # display errors

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        """

        plugin_projects = list(plugin_env)
        plugin_projects.sort()  # scan project names in alphabetic order

        error_info = {}
        distributions = {}

        if full_env is None:
            env = Environment(self.entries)
            env += plugin_env
        else:
            env = full_env + plugin_env

        shadow_set = self.__class__([])
        list(map(shadow_set.add, self))   # put all our entries in shadow_set

        for project_name in plugin_projects:

            for dist in plugin_env[project_name]:

                req = [dist.as_requirement()]

                try:
                    resolvees = shadow_set.resolve(req, env, installer)

                except ResolutionError:
                    v = sys.exc_info()[1]
                    error_info[dist] = v    # save error info
                    if fallback:
                        continue    # try the next older version of project
                    else:
                        break       # give up on this project, keep going

                else:
                    list(map(shadow_set.add, resolvees))
                    distributions.update(dict.fromkeys(resolvees))

                    # success, no need to try any more versions of this project
                    break

        distributions = list(distributions)
        distributions.sort()

        return distributions, error_info

    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
        needed = self.resolve(parse_requirements(requirements))

        for dist in needed:
            self.add(dist)

        return needed

    def subscribe(self, callback):
        """Invoke `callback` for all distributions (including existing ones)"""
        if callback in self.callbacks:
            return
        self.callbacks.append(callback)
        for dist in self:
            callback(dist)

    def _added_new(self, dist):
        for callback in self.callbacks:
            callback(dist)

    def __getstate__(self):
        return (
            self.entries[:], self.entry_keys.copy(), self.by_key.copy(),
            self.callbacks[:]
        )

    def __setstate__(self, e_k_b_c):
        entries, keys, by_key, callbacks = e_k_b_c
        self.entries = entries[:]
        self.entry_keys = keys.copy()
        self.by_key = by_key.copy()
        self.callbacks = callbacks[:]


class Environment(object):
    """Searchable snapshot of distributions on a search path"""

    def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
        """Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.3'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        """
        self._distmap = {}
        self._cache = {}
        self.platform = platform
        self.python = python
        self.scan(search_path)

    def can_add(self, dist):
        """Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        """
        return (self.python is None or dist.py_version is None
            or dist.py_version==self.python) \
            and compatible_platforms(dist.platform,self.platform)

    def remove(self, dist):
        """Remove `dist` from the environment"""
        self._distmap[dist.key].remove(dist)

    def scan(self, search_path=None):
        """Scan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        """
        if search_path is None:
            search_path = sys.path

        for item in search_path:
            for dist in find_distributions(item):
                self.add(dist)

    def __getitem__(self,project_name):
        """Return a newest-to-oldest list of distributions for `project_name`
        """
        try:
            return self._cache[project_name]
        except KeyError:
            project_name = project_name.lower()
            if project_name not in self._distmap:
                return []

        if project_name not in self._cache:
            dists = self._cache[project_name] = self._distmap[project_name]
            _sort_dists(dists)

        return self._cache[project_name]

    def add(self,dist):
        """Add `dist` if we ``can_add()`` it and it isn't already added"""
        if self.can_add(dist) and dist.has_version():
            dists = self._distmap.setdefault(dist.key,[])
            if dist not in dists:
                dists.append(dist)
                if dist.key in self._cache:
                    _sort_dists(self._cache[dist.key])

    def best_match(self, req, working_set, installer=None):
        """Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        """
        dist = working_set.find(req)
        if dist is not None:
            return dist
        for dist in self[req.key]:
            if dist in req:
                return dist
        return self.obtain(req, installer) # try and download/install

    def obtain(self, requirement, installer=None):
        """Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument."""
        if installer is not None:
            return installer(requirement)

    def __iter__(self):
        """Yield the unique project names of the available distributions"""
        for key in self._distmap.keys():
            if self[key]: yield key

    def __iadd__(self, other):
        """In-place addition of a distribution or environment"""
        if isinstance(other,Distribution):
            self.add(other)
        elif isinstance(other,Environment):
            for project in other:
                for dist in other[project]:
                    self.add(dist)
        else:
            raise TypeError("Can't add %r to environment" % (other,))
        return self

    def __add__(self, other):
        """Add an environment or distribution to an environment"""
        new = self.__class__([], platform=None, python=None)
        for env in self, other:
            new += env
        return new


AvailableDistributions = Environment    # XXX backward compatibility


class ExtractionError(RuntimeError):
    """An error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    """


class ResourceManager:
    """Manage resource extraction and packages"""
    extraction_path = None

    def __init__(self):
        self.cached_files = {}

    def resource_exists(self, package_or_requirement, resource_name):
        """Does the named resource exist?"""
        return get_provider(package_or_requirement).has_resource(resource_name)

    def resource_isdir(self, package_or_requirement, resource_name):
        """Is the named resource an existing directory?"""
        return get_provider(package_or_requirement).resource_isdir(
            resource_name
        )

    def resource_filename(self, package_or_requirement, resource_name):
        """Return a true filesystem path for specified resource"""
        return get_provider(package_or_requirement).get_resource_filename(
            self, resource_name
        )

    def resource_stream(self, package_or_requirement, resource_name):
        """Return a readable file-like object for specified resource"""
        return get_provider(package_or_requirement).get_resource_stream(
            self, resource_name
        )

    def resource_string(self, package_or_requirement, resource_name):
        """Return specified resource as a string"""
        return get_provider(package_or_requirement).get_resource_string(
            self, resource_name
        )

    def resource_listdir(self, package_or_requirement, resource_name):
        """List the contents of the named resource directory"""
        return get_provider(package_or_requirement).resource_listdir(
            resource_name
        )

    def extraction_error(self):
        """Give an error message for problems extracting file(s)"""

        old_exc = sys.exc_info()[1]
        cache_path = self.extraction_path or get_default_cache()

        err = ExtractionError("""Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  %s

The Python egg cache directory is currently set to:

  %s

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
""" % (old_exc, cache_path)
        )
        err.manager = self
        err.cache_path = cache_path
        err.original_error = old_exc
        raise err

    def get_cache_path(self, archive_name, names=()):
        """Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        """
        extract_path = self.extraction_path or get_default_cache()
        target_path = os.path.join(extract_path, archive_name+'-tmp', *names)
        try:
            _bypass_ensure_directory(target_path)
        except:
            self.extraction_error()

        self._warn_unsafe_extraction_path(extract_path)

        self.cached_files[target_path] = 1
        return target_path

    @staticmethod
    def _warn_unsafe_extraction_path(path):
        """
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        """
        if os.name == 'nt' and not path.startswith(os.environ['windir']):
            # On Windows, permissions are generally restrictive by default
            #  and temp directories are not writable by other users, so
            #  bypass the warning.
            return
        mode = os.stat(path).st_mode
        if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
            msg = ("%s is writable by group/others and vulnerable to attack "
                "when "
                "used with get_resource_filename. Consider a more secure "
                "location (set with .set_extraction_path or the "
                "PYTHON_EGG_CACHE environment variable)." % path)
            warnings.warn(msg, UserWarning)

    def postprocess(self, tempname, filename):
        """Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        """

        if os.name == 'posix':
            # Make the resource executable
            mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777
            os.chmod(tempname, mode)

    def set_extraction_path(self, path):
        """Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        """
        if self.cached_files:
            raise ValueError(
                "Can't change extraction path, files already extracted"
            )

        self.extraction_path = path

    def cleanup_resources(self, force=False):
        """
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        """
        # XXX

def get_default_cache():
    """Determine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    """
    try:
        return os.environ['PYTHON_EGG_CACHE']
    except KeyError:
        pass

    if os.name!='nt':
        return os.path.expanduser('~/.python-eggs')

    app_data = 'Application Data'   # XXX this may be locale-specific!
    app_homes = [
        (('APPDATA',), None),       # best option, should be locale-safe
        (('USERPROFILE',), app_data),
        (('HOMEDRIVE','HOMEPATH'), app_data),
        (('HOMEPATH',), app_data),
        (('HOME',), None),
        (('WINDIR',), app_data),    # 95/98/ME
    ]

    for keys, subdir in app_homes:
        dirname = ''
        for key in keys:
            if key in os.environ:
                dirname = os.path.join(dirname, os.environ[key])
            else:
                break
        else:
            if subdir:
                dirname = os.path.join(dirname,subdir)
            return os.path.join(dirname, 'Python-Eggs')
    else:
        raise RuntimeError(
            "Please set the PYTHON_EGG_CACHE enviroment variable"
        )

def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    """
    version = version.replace(' ','.')
    return re.sub('[^A-Za-z0-9.]+', '-', version)


def safe_extra(extra):
    """Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    """
    return re.sub('[^A-Za-z0-9.]+', '_', extra).lower()


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-','_')


class MarkerEvaluation(object):
    values = {
        'os_name': lambda: os.name,
        'sys_platform': lambda: sys.platform,
        'python_full_version': lambda: sys.version.split()[0],
        'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]),
        'platform_version': platform.version,
        'platform_machine': platform.machine,
        'python_implementation': platform.python_implementation,
    }

    @classmethod
    def is_invalid_marker(cls, text):
        """
        Validate text as a PEP 426 environment marker; return an exception
        if invalid or False otherwise.
        """
        try:
            cls.evaluate_marker(text)
        except SyntaxError:
            return cls.normalize_exception(sys.exc_info()[1])
        return False

    @staticmethod
    def normalize_exception(exc):
        """
        Given a SyntaxError from a marker evaluation, normalize the error message:
         - Remove indications of filename and line number.
         - Replace platform-specific error messages with standard error messages.
        """
        subs = {
            'unexpected EOF while parsing': 'invalid syntax',
            'parenthesis is never closed': 'invalid syntax',
        }
        exc.filename = None
        exc.lineno = None
        exc.msg = subs.get(exc.msg, exc.msg)
        return exc

    @classmethod
    def and_test(cls, nodelist):
        # MUST NOT short-circuit evaluation, or invalid syntax can be skipped!
        return functools.reduce(operator.and_, [cls.interpret(nodelist[i]) for i in range(1,len(nodelist),2)])

    @classmethod
    def test(cls, nodelist):
        # MUST NOT short-circuit evaluation, or invalid syntax can be skipped!
        return functools.reduce(operator.or_, [cls.interpret(nodelist[i]) for i in range(1,len(nodelist),2)])

    @classmethod
    def atom(cls, nodelist):
        t = nodelist[1][0]
        if t == token.LPAR:
            if nodelist[2][0] == token.RPAR:
                raise SyntaxError("Empty parentheses")
            return cls.interpret(nodelist[2])
        raise SyntaxError("Language feature not supported in environment markers")

    @classmethod
    def comparison(cls, nodelist):
        if len(nodelist)>4:
            raise SyntaxError("Chained comparison not allowed in environment markers")
        comp = nodelist[2][1]
        cop = comp[1]
        if comp[0] == token.NAME:
            if len(nodelist[2]) == 3:
                if cop == 'not':
                    cop = 'not in'
                else:
                    cop = 'is not'
        try:
            cop = cls.get_op(cop)
        except KeyError:
            raise SyntaxError(repr(cop)+" operator not allowed in environment markers")
        return cop(cls.evaluate(nodelist[1]), cls.evaluate(nodelist[3]))

    @classmethod
    def get_op(cls, op):
        ops = {
            symbol.test: cls.test,
            symbol.and_test: cls.and_test,
            symbol.atom: cls.atom,
            symbol.comparison: cls.comparison,
            'not in': lambda x, y: x not in y,
            'in': lambda x, y: x in y,
            '==': operator.eq,
            '!=': operator.ne,
        }
        if hasattr(symbol, 'or_test'):
            ops[symbol.or_test] = cls.test
        return ops[op]

    @classmethod
    def evaluate_marker(cls, text, extra=None):
        """
        Evaluate a PEP 426 environment marker on CPython 2.4+.
        Return a boolean indicating the marker result in this environment.
        Raise SyntaxError if marker is invalid.

        This implementation uses the 'parser' module, which is not implemented on
        Jython and has been superseded by the 'ast' module in Python 2.6 and
        later.
        """
        return cls.interpret(parser.expr(text).totuple(1)[1])

    @classmethod
    def _markerlib_evaluate(cls, text):
        """
        Evaluate a PEP 426 environment marker using markerlib.
        Return a boolean indicating the marker result in this environment.
        Raise SyntaxError if marker is invalid.
        """
        from pip._vendor import _markerlib
        # markerlib implements Metadata 1.2 (PEP 345) environment markers.
        # Translate the variables to Metadata 2.0 (PEP 426).
        env = _markerlib.default_environment()
        for key in env.keys():
            new_key = key.replace('.', '_')
            env[new_key] = env.pop(key)
        try:
            result = _markerlib.interpret(text, env)
        except NameError:
            e = sys.exc_info()[1]
            raise SyntaxError(e.args[0])
        return result

    if 'parser' not in globals():
        # Fall back to less-complete _markerlib implementation if 'parser' module
        # is not available.
        evaluate_marker = _markerlib_evaluate

    @classmethod
    def interpret(cls, nodelist):
        while len(nodelist)==2: nodelist = nodelist[1]
        try:
            op = cls.get_op(nodelist[0])
        except KeyError:
            raise SyntaxError("Comparison or logical expression expected")
        return op(nodelist)

    @classmethod
    def evaluate(cls, nodelist):
        while len(nodelist)==2: nodelist = nodelist[1]
        kind = nodelist[0]
        name = nodelist[1]
        if kind==token.NAME:
            try:
                op = cls.values[name]
            except KeyError:
                raise SyntaxError("Unknown name %r" % name)
            return op()
        if kind==token.STRING:
            s = nodelist[1]
            if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \
                    or '\\' in s:
                raise SyntaxError(
                    "Only plain strings allowed in environment markers")
            return s[1:-1]
        raise SyntaxError("Language feature not supported in environment markers")

invalid_marker = MarkerEvaluation.is_invalid_marker
evaluate_marker = MarkerEvaluation.evaluate_marker

class NullProvider:
    """Try to implement resources and metadata for arbitrary PEP 302 loaders"""

    egg_name = None
    egg_info = None
    loader = None

    def __init__(self, module):
        self.loader = getattr(module, '__loader__', None)
        self.module_path = os.path.dirname(getattr(module, '__file__', ''))

    def get_resource_filename(self, manager, resource_name):
        return self._fn(self.module_path, resource_name)

    def get_resource_stream(self, manager, resource_name):
        return BytesIO(self.get_resource_string(manager, resource_name))

    def get_resource_string(self, manager, resource_name):
        return self._get(self._fn(self.module_path, resource_name))

    def has_resource(self, resource_name):
        return self._has(self._fn(self.module_path, resource_name))

    def has_metadata(self, name):
        return self.egg_info and self._has(self._fn(self.egg_info,name))

    if sys.version_info <= (3,):
        def get_metadata(self, name):
            if not self.egg_info:
                return ""
            return self._get(self._fn(self.egg_info,name))
    else:
        def get_metadata(self, name):
            if not self.egg_info:
                return ""
            return self._get(self._fn(self.egg_info,name)).decode("utf-8")

    def get_metadata_lines(self, name):
        return yield_lines(self.get_metadata(name))

    def resource_isdir(self,resource_name):
        return self._isdir(self._fn(self.module_path, resource_name))

    def metadata_isdir(self,name):
        return self.egg_info and self._isdir(self._fn(self.egg_info,name))

    def resource_listdir(self,resource_name):
        return self._listdir(self._fn(self.module_path,resource_name))

    def metadata_listdir(self,name):
        if self.egg_info:
            return self._listdir(self._fn(self.egg_info,name))
        return []

    def run_script(self,script_name,namespace):
        script = 'scripts/'+script_name
        if not self.has_metadata(script):
            raise ResolutionError("No script named %r" % script_name)
        script_text = self.get_metadata(script).replace('\r\n','\n')
        script_text = script_text.replace('\r','\n')
        script_filename = self._fn(self.egg_info,script)
        namespace['__file__'] = script_filename
        if os.path.exists(script_filename):
            execfile(script_filename, namespace, namespace)
        else:
            from linecache import cache
            cache[script_filename] = (
                len(script_text), 0, script_text.split('\n'), script_filename
            )
            script_code = compile(script_text,script_filename,'exec')
            exec(script_code, namespace, namespace)

    def _has(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _isdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _listdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _fn(self, base, resource_name):
        if resource_name:
            return os.path.join(base, *resource_name.split('/'))
        return base

    def _get(self, path):
        if hasattr(self.loader, 'get_data'):
            return self.loader.get_data(path)
        raise NotImplementedError(
            "Can't perform this operation for loaders without 'get_data()'"
        )

register_loader_type(object, NullProvider)


class EggProvider(NullProvider):
    """Provider based on a virtual filesystem"""

    def __init__(self,module):
        NullProvider.__init__(self,module)
        self._setup_prefix()

    def _setup_prefix(self):
        # we assume here that our metadata may be nested inside a "basket"
        # of multiple eggs; that's why we use module_path instead of .archive
        path = self.module_path
        old = None
        while path!=old:
            if path.lower().endswith('.egg'):
                self.egg_name = os.path.basename(path)
                self.egg_info = os.path.join(path, 'EGG-INFO')
                self.egg_root = path
                break
            old = path
            path, base = os.path.split(path)

class DefaultProvider(EggProvider):
    """Provides access to package resources in the filesystem"""

    def _has(self, path):
        return os.path.exists(path)

    def _isdir(self,path):
        return os.path.isdir(path)

    def _listdir(self,path):
        return os.listdir(path)

    def get_resource_stream(self, manager, resource_name):
        return open(self._fn(self.module_path, resource_name), 'rb')

    def _get(self, path):
        stream = open(path, 'rb')
        try:
            return stream.read()
        finally:
            stream.close()

register_loader_type(type(None), DefaultProvider)

if importlib_bootstrap is not None:
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)


class EmptyProvider(NullProvider):
    """Provider that returns nothing for all requests"""

    _isdir = _has = lambda self,path: False
    _get = lambda self,path: ''
    _listdir = lambda self,path: []
    module_path = None

    def __init__(self):
        pass

empty_provider = EmptyProvider()


def build_zipmanifest(path):
    """
    This builds a similar dictionary to the zipimport directory
    caches.  However instead of tuples, ZipInfo objects are stored.

    The translation of the tuple is as follows:
      * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep
              on pypy it is the same (one reason why distribute did work
              in some cases on pypy and win32).
      * [1] - zipinfo.compress_type
      * [2] - zipinfo.compress_size
      * [3] - zipinfo.file_size
      * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
              len(ascii encoding of filename) otherwise
      * [5] - (zipinfo.date_time[0] - 1980) << 9 |
               zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
      * [6] - (zipinfo.date_time[3] - 1980) << 11 |
               zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
      * [7] - zipinfo.CRC
    """
    zipinfo = dict()
    zfile = zipfile.ZipFile(path)
    #Got ZipFile has not __exit__ on python 3.1
    try:
        for zitem in zfile.namelist():
            zpath = zitem.replace('/', os.sep)
            zipinfo[zpath] = zfile.getinfo(zitem)
            assert zipinfo[zpath] is not None
    finally:
        zfile.close()
    return zipinfo


class ZipProvider(EggProvider):
    """Resource support for zips and eggs"""

    eagers = None

    def __init__(self, module):
        EggProvider.__init__(self,module)
        self.zipinfo = build_zipmanifest(self.loader.archive)
        self.zip_pre = self.loader.archive+os.sep

    def _zipinfo_name(self, fspath):
        # Convert a virtual filename (full path to file) into a zipfile subpath
        # usable with the zipimport directory cache for our target archive
        if fspath.startswith(self.zip_pre):
            return fspath[len(self.zip_pre):]
        raise AssertionError(
            "%s is not a subpath of %s" % (fspath,self.zip_pre)
        )

    def _parts(self,zip_path):
        # Convert a zipfile subpath into an egg-relative path part list
        fspath = self.zip_pre+zip_path  # pseudo-fs path
        if fspath.startswith(self.egg_root+os.sep):
            return fspath[len(self.egg_root)+1:].split(os.sep)
        raise AssertionError(
            "%s is not a subpath of %s" % (fspath,self.egg_root)
        )

    def get_resource_filename(self, manager, resource_name):
        if not self.egg_name:
            raise NotImplementedError(
                "resource_filename() only supported for .egg, not .zip"
            )
        # no need to lock for extraction, since we use temp names
        zip_path = self._resource_to_zip(resource_name)
        eagers = self._get_eager_resources()
        if '/'.join(self._parts(zip_path)) in eagers:
            for name in eagers:
                self._extract_resource(manager, self._eager_to_zip(name))
        return self._extract_resource(manager, zip_path)

    @staticmethod
    def _get_date_and_size(zip_stat):
        size = zip_stat.file_size
        date_time = zip_stat.date_time + (0, 0, -1)  # ymdhms+wday, yday, dst
        #1980 offset already done
        timestamp = time.mktime(date_time)
        return timestamp, size

    def _extract_resource(self, manager, zip_path):

        if zip_path in self._index():
            for name in self._index()[zip_path]:
                last = self._extract_resource(
                    manager, os.path.join(zip_path, name)
                )
            return os.path.dirname(last)  # return the extracted directory name

        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])

        if not WRITE_SUPPORT:
            raise IOError('"os.rename" and "os.unlink" are not supported '
                          'on this platform')
        try:

            real_path = manager.get_cache_path(
                self.egg_name, self._parts(zip_path)
            )

            if self._is_current(real_path, zip_path):
                return real_path

            outf, tmpnam = _mkstemp(".$extract", dir=os.path.dirname(real_path))
            os.write(outf, self.loader.get_data(zip_path))
            os.close(outf)
            utime(tmpnam, (timestamp,timestamp))
            manager.postprocess(tmpnam, real_path)

            try:
                rename(tmpnam, real_path)

            except os.error:
                if os.path.isfile(real_path):
                    if self._is_current(real_path, zip_path):
                        # the file became current since it was checked above,
                        #  so proceed.
                        return real_path
                    elif os.name=='nt':     # Windows, del old file and retry
                        unlink(real_path)
                        rename(tmpnam, real_path)
                        return real_path
                raise

        except os.error:
            manager.extraction_error()  # report a user-friendly error

        return real_path

    def _is_current(self, file_path, zip_path):
        """
        Return True if the file_path is current for this zip_path
        """
        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
        if not os.path.isfile(file_path):
            return False
        stat = os.stat(file_path)
        if stat.st_size!=size or stat.st_mtime!=timestamp:
            return False
        # check that the contents match
        zip_contents = self.loader.get_data(zip_path)
        f = open(file_path, 'rb')
        file_contents = f.read()
        f.close()
        return zip_contents == file_contents

    def _get_eager_resources(self):
        if self.eagers is None:
            eagers = []
            for name in ('native_libs.txt', 'eager_resources.txt'):
                if self.has_metadata(name):
                    eagers.extend(self.get_metadata_lines(name))
            self.eagers = eagers
        return self.eagers

    def _index(self):
        try:
            return self._dirindex
        except AttributeError:
            ind = {}
            for path in self.zipinfo:
                parts = path.split(os.sep)
                while parts:
                    parent = os.sep.join(parts[:-1])
                    if parent in ind:
                        ind[parent].append(parts[-1])
                        break
                    else:
                        ind[parent] = [parts.pop()]
            self._dirindex = ind
            return ind

    def _has(self, fspath):
        zip_path = self._zipinfo_name(fspath)
        return zip_path in self.zipinfo or zip_path in self._index()

    def _isdir(self,fspath):
        return self._zipinfo_name(fspath) in self._index()

    def _listdir(self,fspath):
        return list(self._index().get(self._zipinfo_name(fspath), ()))

    def _eager_to_zip(self,resource_name):
        return self._zipinfo_name(self._fn(self.egg_root,resource_name))

    def _resource_to_zip(self,resource_name):
        return self._zipinfo_name(self._fn(self.module_path,resource_name))

register_loader_type(zipimport.zipimporter, ZipProvider)


class FileMetadata(EmptyProvider):
    """Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    """

    def __init__(self,path):
        self.path = path

    def has_metadata(self,name):
        return name=='PKG-INFO'

    def get_metadata(self,name):
        if name=='PKG-INFO':
            f = open(self.path,'rU')
            metadata = f.read()
            f.close()
            return metadata
        raise KeyError("No metadata except PKG-INFO is available")

    def get_metadata_lines(self,name):
        return yield_lines(self.get_metadata(name))


class PathMetadata(DefaultProvider):
    """Metadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir,project_name=dist_name,metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    """

    def __init__(self, path, egg_info):
        self.module_path = path
        self.egg_info = egg_info


class EggMetadata(ZipProvider):
    """Metadata provider for .egg files"""

    def __init__(self, importer):
        """Create a metadata provider from a zipimporter"""

        self.zipinfo = build_zipmanifest(importer.archive)
        self.zip_pre = importer.archive+os.sep
        self.loader = importer
        if importer.prefix:
            self.module_path = os.path.join(importer.archive, importer.prefix)
        else:
            self.module_path = importer.archive
        self._setup_prefix()

_declare_state('dict', _distribution_finders = {})

def register_finder(importer_type, distribution_finder):
    """Register `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example."""
    _distribution_finders[importer_type] = distribution_finder


def find_distributions(path_item, only=False):
    """Yield distributions accessible via `path_item`"""
    importer = get_importer(path_item)
    finder = _find_adapter(_distribution_finders, importer)
    return finder(importer, path_item, only)

def find_eggs_in_zip(importer, path_item, only=False):
    """
    Find eggs in zip files; possibly multiple nested eggs.
    """
    if importer.archive.endswith('.whl'):
        # wheels are not supported with this finder
        # they don't have PKG-INFO metadata, and won't ever contain eggs
        return
    metadata = EggMetadata(importer)
    if metadata.has_metadata('PKG-INFO'):
        yield Distribution.from_filename(path_item, metadata=metadata)
    if only:
        return  # don't yield nested distros
    for subitem in metadata.resource_listdir('/'):
        if subitem.endswith('.egg'):
            subpath = os.path.join(path_item, subitem)
            for dist in find_eggs_in_zip(zipimport.zipimporter(subpath), subpath):
                yield dist

register_finder(zipimport.zipimporter, find_eggs_in_zip)

def find_nothing(importer, path_item, only=False):
    return ()
register_finder(object,find_nothing)

def find_on_path(importer, path_item, only=False):
    """Yield distributions accessible on a sys.path directory"""
    path_item = _normalize_cached(path_item)

    if os.path.isdir(path_item) and os.access(path_item, os.R_OK):
        if path_item.lower().endswith('.egg'):
            # unpacked egg
            yield Distribution.from_filename(
                path_item, metadata=PathMetadata(
                    path_item, os.path.join(path_item,'EGG-INFO')
                )
            )
        else:
            # scan for .egg and .egg-info in directory
            for entry in os.listdir(path_item):
                lower = entry.lower()
                if lower.endswith('.egg-info') or lower.endswith('.dist-info'):
                    fullpath = os.path.join(path_item, entry)
                    if os.path.isdir(fullpath):
                        # egg-info directory, allow getting metadata
                        metadata = PathMetadata(path_item, fullpath)
                    else:
                        metadata = FileMetadata(fullpath)
                    yield Distribution.from_location(
                        path_item,entry,metadata,precedence=DEVELOP_DIST
                    )
                elif not only and lower.endswith('.egg'):
                    for dist in find_distributions(os.path.join(path_item, entry)):
                        yield dist
                elif not only and lower.endswith('.egg-link'):
                    entry_file = open(os.path.join(path_item, entry))
                    try:
                        entry_lines = entry_file.readlines()
                    finally:
                        entry_file.close()
                    for line in entry_lines:
                        if not line.strip(): continue
                        for item in find_distributions(os.path.join(path_item,line.rstrip())):
                            yield item
                        break
register_finder(pkgutil.ImpImporter,find_on_path)

if importlib_bootstrap is not None:
    register_finder(importlib_bootstrap.FileFinder, find_on_path)

_declare_state('dict', _namespace_handlers={})
_declare_state('dict', _namespace_packages={})


def register_namespace_handler(importer_type, namespace_handler):
    """Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer,path_entry,moduleName,module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    """
    _namespace_handlers[importer_type] = namespace_handler

def _handle_ns(packageName, path_item):
    """Ensure that named package includes a subpath of path_item (if needed)"""

    importer = get_importer(path_item)
    if importer is None:
        return None
    loader = importer.find_module(packageName)
    if loader is None:
        return None
    module = sys.modules.get(packageName)
    if module is None:
        module = sys.modules[packageName] = imp.new_module(packageName)
        module.__path__ = []
        _set_parent_ns(packageName)
    elif not hasattr(module,'__path__'):
        raise TypeError("Not a package:", packageName)
    handler = _find_adapter(_namespace_handlers, importer)
    subpath = handler(importer, path_item, packageName, module)
    if subpath is not None:
        path = module.__path__
        path.append(subpath)
        loader.load_module(packageName)
        for path_item in path:
            if path_item not in module.__path__:
                module.__path__.append(path_item)
    return subpath

def declare_namespace(packageName):
    """Declare that package 'packageName' is a namespace package"""

    imp.acquire_lock()
    try:
        if packageName in _namespace_packages:
            return

        path, parent = sys.path, None
        if '.' in packageName:
            parent = '.'.join(packageName.split('.')[:-1])
            declare_namespace(parent)
            if parent not in _namespace_packages:
                __import__(parent)
            try:
                path = sys.modules[parent].__path__
            except AttributeError:
                raise TypeError("Not a package:", parent)

        # Track what packages are namespaces, so when new path items are added,
        # they can be updated
        _namespace_packages.setdefault(parent,[]).append(packageName)
        _namespace_packages.setdefault(packageName,[])

        for path_item in path:
            # Ensure all the parent's path items are reflected in the child,
            # if they apply
            _handle_ns(packageName, path_item)

    finally:
        imp.release_lock()

def fixup_namespace_packages(path_item, parent=None):
    """Ensure that previously-declared namespace packages include path_item"""
    imp.acquire_lock()
    try:
        for package in _namespace_packages.get(parent,()):
            subpath = _handle_ns(package, path_item)
            if subpath: fixup_namespace_packages(subpath,package)
    finally:
        imp.release_lock()

def file_ns_handler(importer, path_item, packageName, module):
    """Compute an ns-package subpath for a filesystem or zipfile importer"""

    subpath = os.path.join(path_item, packageName.split('.')[-1])
    normalized = _normalize_cached(subpath)
    for item in module.__path__:
        if _normalize_cached(item)==normalized:
            break
    else:
        # Only return the path if it's not already there
        return subpath

register_namespace_handler(pkgutil.ImpImporter,file_ns_handler)
register_namespace_handler(zipimport.zipimporter,file_ns_handler)

if importlib_bootstrap is not None:
    register_namespace_handler(importlib_bootstrap.FileFinder, file_ns_handler)


def null_ns_handler(importer, path_item, packageName, module):
    return None

register_namespace_handler(object,null_ns_handler)


def normalize_path(filename):
    """Normalize a file/dir name for comparison purposes"""
    return os.path.normcase(os.path.realpath(filename))

def _normalize_cached(filename,_cache={}):
    try:
        return _cache[filename]
    except KeyError:
        _cache[filename] = result = normalize_path(filename)
        return result

def _set_parent_ns(packageName):
    parts = packageName.split('.')
    name = parts.pop()
    if parts:
        parent = '.'.join(parts)
        setattr(sys.modules[parent], name, sys.modules[packageName])


def yield_lines(strs):
    """Yield non-empty/non-comment lines of a ``basestring`` or sequence"""
    if isinstance(strs,basestring):
        for s in strs.splitlines():
            s = s.strip()
            if s and not s.startswith('#'):     # skip blank lines/comments
                yield s
    else:
        for ss in strs:
            for s in yield_lines(ss):
                yield s

LINE_END = re.compile(r"\s*(#.*)?$").match         # whitespace and comment
CONTINUE = re.compile(r"\s*\\\s*(#.*)?$").match    # line continuation
DISTRO = re.compile(r"\s*((\w|[-.])+)").match    # Distribution or extra
VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match  # ver. info
COMMA = re.compile(r"\s*,").match               # comma between items
OBRACKET = re.compile(r"\s*\[").match
CBRACKET = re.compile(r"\s*\]").match
MODULE = re.compile(r"\w+(\.\w+)*$").match
EGG_NAME = re.compile(
    r"(?P<name>[^-]+)"
    r"( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?",
    re.VERBOSE | re.IGNORECASE
).match

component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE)
replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'}.get

def _parse_version_parts(s):
    for part in component_re.split(s):
        part = replace(part,part)
        if not part or part=='.':
            continue
        if part[:1] in '0123456789':
            yield part.zfill(8)    # pad for numeric comparison
        else:
            yield '*'+part

    yield '*final'  # ensure that alpha/beta/candidate are before final

def parse_version(s):
    """Convert a version string to a chronologically-sortable key

    This is a rough cross between distutils' StrictVersion and LooseVersion;
    if you give it versions that would work with StrictVersion, then it behaves
    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    *possible* to create pathological version coding schemes that will fool
    this parser, but they should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    than any other pre-release tag.
    """
    parts = []
    for part in _parse_version_parts(s.lower()):
        if part.startswith('*'):
            if part<'*final':   # remove '-' before a prerelease tag
                while parts and parts[-1]=='*final-': parts.pop()
            # remove trailing zeros from each series of numeric parts
            while parts and parts[-1]=='00000000':
                parts.pop()
        parts.append(part)
    return tuple(parts)
class EntryPoint(object):
    """Object representing an advertised importable object"""

    def __init__(self, name, module_name, attrs=(), extras=(), dist=None):
        if not MODULE(module_name):
            raise ValueError("Invalid module name", module_name)
        self.name = name
        self.module_name = module_name
        self.attrs = tuple(attrs)
        self.extras = Requirement.parse(("x[%s]" % ','.join(extras))).extras
        self.dist = dist

    def __str__(self):
        s = "%s = %s" % (self.name, self.module_name)
        if self.attrs:
            s += ':' + '.'.join(self.attrs)
        if self.extras:
            s += ' [%s]' % ','.join(self.extras)
        return s

    def __repr__(self):
        return "EntryPoint.parse(%r)" % str(self)

    def load(self, require=True, env=None, installer=None):
        if require: self.require(env, installer)
        entry = __import__(self.module_name, globals(),globals(), ['__name__'])
        for attr in self.attrs:
            try:
                entry = getattr(entry,attr)
            except AttributeError:
                raise ImportError("%r has no %r attribute" % (entry,attr))
        return entry

    def require(self, env=None, installer=None):
        if self.extras and not self.dist:
            raise UnknownExtra("Can't require() without a distribution", self)
        list(map(working_set.add,
            working_set.resolve(self.dist.requires(self.extras),env,installer)))

    @classmethod
    def parse(cls, src, dist=None):
        """Parse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        """
        try:
            attrs = extras = ()
            name,value = src.split('=',1)
            if '[' in value:
                value,extras = value.split('[',1)
                req = Requirement.parse("x["+extras)
                if req.specs: raise ValueError
                extras = req.extras
            if ':' in value:
                value,attrs = value.split(':',1)
                if not MODULE(attrs.rstrip()):
                    raise ValueError
                attrs = attrs.rstrip().split('.')
        except ValueError:
            raise ValueError(
                "EntryPoint must be in 'name=module:attrs [extras]' format",
                src
            )
        else:
            return cls(name.strip(), value.strip(), attrs, extras, dist)

    @classmethod
    def parse_group(cls, group, lines, dist=None):
        """Parse an entry point group"""
        if not MODULE(group):
            raise ValueError("Invalid group name", group)
        this = {}
        for line in yield_lines(lines):
            ep = cls.parse(line, dist)
            if ep.name in this:
                raise ValueError("Duplicate entry point", group, ep.name)
            this[ep.name]=ep
        return this

    @classmethod
    def parse_map(cls, data, dist=None):
        """Parse a map of entry point groups"""
        if isinstance(data,dict):
            data = data.items()
        else:
            data = split_sections(data)
        maps = {}
        for group, lines in data:
            if group is None:
                if not lines:
                    continue
                raise ValueError("Entry points must be listed in groups")
            group = group.strip()
            if group in maps:
                raise ValueError("Duplicate group name", group)
            maps[group] = cls.parse_group(group, lines, dist)
        return maps


def _remove_md5_fragment(location):
    if not location:
        return ''
    parsed = urlparse(location)
    if parsed[-1].startswith('md5='):
        return urlunparse(parsed[:-1] + ('',))
    return location


class Distribution(object):
    """Wrap an actual or potential sys.path entry w/metadata"""
    PKG_INFO = 'PKG-INFO'

    def __init__(self, location=None, metadata=None, project_name=None,
            version=None, py_version=PY_MAJOR, platform=None,
            precedence=EGG_DIST):
        self.project_name = safe_name(project_name or 'Unknown')
        if version is not None:
            self._version = safe_version(version)
        self.py_version = py_version
        self.platform = platform
        self.location = location
        self.precedence = precedence
        self._provider = metadata or empty_provider

    @classmethod
    def from_location(cls,location,basename,metadata=None,**kw):
        project_name, version, py_version, platform = [None]*4
        basename, ext = os.path.splitext(basename)
        if ext.lower() in _distributionImpl:
            # .dist-info gets much metadata differently
            match = EGG_NAME(basename)
            if match:
                project_name, version, py_version, platform = match.group(
                    'name','ver','pyver','plat'
                )
            cls = _distributionImpl[ext.lower()]
        return cls(
            location, metadata, project_name=project_name, version=version,
            py_version=py_version, platform=platform, **kw
        )

    hashcmp = property(
        lambda self: (
            getattr(self,'parsed_version',()),
            self.precedence,
            self.key,
            _remove_md5_fragment(self.location),
            self.py_version,
            self.platform
        )
    )
    def __hash__(self): return hash(self.hashcmp)
    def __lt__(self, other):
        return self.hashcmp < other.hashcmp
    def __le__(self, other):
        return self.hashcmp <= other.hashcmp
    def __gt__(self, other):
        return self.hashcmp > other.hashcmp
    def __ge__(self, other):
        return self.hashcmp >= other.hashcmp
    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            # It's not a Distribution, so they are not equal
            return False
        return self.hashcmp == other.hashcmp
    def __ne__(self, other):
        return not self == other

    # These properties have to be lazy so that we don't have to load any
    # metadata until/unless it's actually needed.  (i.e., some distributions
    # may not know their name or version without loading PKG-INFO)

    @property
    def key(self):
        try:
            return self._key
        except AttributeError:
            self._key = key = self.project_name.lower()
            return key

    @property
    def parsed_version(self):
        try:
            return self._parsed_version
        except AttributeError:
            self._parsed_version = pv = parse_version(self.version)
            return pv

    @property
    def version(self):
        try:
            return self._version
        except AttributeError:
            for line in self._get_metadata(self.PKG_INFO):
                if line.lower().startswith('version:'):
                    self._version = safe_version(line.split(':',1)[1].strip())
                    return self._version
            else:
                raise ValueError(
                    "Missing 'Version:' header and/or %s file" % self.PKG_INFO, self
                )

    @property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            dm = self.__dep_map = {None: []}
            for name in 'requires.txt', 'depends.txt':
                for extra,reqs in split_sections(self._get_metadata(name)):
                    if extra:
                        if ':' in extra:
                            extra, marker = extra.split(':',1)
                            if invalid_marker(marker):
                                reqs=[] # XXX warn
                            elif not evaluate_marker(marker):
                                reqs=[]
                        extra = safe_extra(extra) or None
                    dm.setdefault(extra,[]).extend(parse_requirements(reqs))
            return dm

    def requires(self,extras=()):
        """List of Requirements needed for this distro if `extras` are used"""
        dm = self._dep_map
        deps = []
        deps.extend(dm.get(None,()))
        for ext in extras:
            try:
                deps.extend(dm[safe_extra(ext)])
            except KeyError:
                raise UnknownExtra(
                    "%s has no such extra feature %r" % (self, ext)
                )
        return deps

    def _get_metadata(self,name):
        if self.has_metadata(name):
            for line in self.get_metadata_lines(name):
                yield line

    def activate(self,path=None):
        """Ensure distribution is importable on `path` (default=sys.path)"""
        if path is None: path = sys.path
        self.insert_on(path)
        if path is sys.path:
            fixup_namespace_packages(self.location)
            for pkg in self._get_metadata('namespace_packages.txt'):
                if pkg in sys.modules:
                    declare_namespace(pkg)

    def egg_name(self):
        """Return what this distribution's standard .egg filename should be"""
        filename = "%s-%s-py%s" % (
            to_filename(self.project_name), to_filename(self.version),
            self.py_version or PY_MAJOR
        )

        if self.platform:
            filename += '-'+self.platform
        return filename

    def __repr__(self):
        if self.location:
            return "%s (%s)" % (self,self.location)
        else:
            return str(self)

    def __str__(self):
        try: version = getattr(self,'version',None)
        except ValueError: version = None
        version = version or "[unknown version]"
        return "%s %s" % (self.project_name,version)

    def __getattr__(self,attr):
        """Delegate all unrecognized public attributes to .metadata provider"""
        if attr.startswith('_'):
            raise AttributeError(attr)
        return getattr(self._provider, attr)

    @classmethod
    def from_filename(cls,filename,metadata=None, **kw):
        return cls.from_location(
            _normalize_cached(filename), os.path.basename(filename), metadata,
            **kw
        )

    def as_requirement(self):
        """Return a ``Requirement`` that matches this distribution exactly"""
        return Requirement.parse('%s==%s' % (self.project_name, self.version))

    def load_entry_point(self, group, name):
        """Return the `name` entry point of `group` or raise ImportError"""
        ep = self.get_entry_info(group,name)
        if ep is None:
            raise ImportError("Entry point %r not found" % ((group,name),))
        return ep.load()

    def get_entry_map(self, group=None):
        """Return the entry point map for `group`, or the full entry map"""
        try:
            ep_map = self._ep_map
        except AttributeError:
            ep_map = self._ep_map = EntryPoint.parse_map(
                self._get_metadata('entry_points.txt'), self
            )
        if group is not None:
            return ep_map.get(group,{})
        return ep_map

    def get_entry_info(self, group, name):
        """Return the EntryPoint object for `group`+`name`, or ``None``"""
        return self.get_entry_map(group).get(name)

    def insert_on(self, path, loc = None):
        """Insert self.location in path before its nearest parent directory"""

        loc = loc or self.location
        if not loc:
            return

        nloc = _normalize_cached(loc)
        bdir = os.path.dirname(nloc)
        npath= [(p and _normalize_cached(p) or p) for p in path]

        for p, item in enumerate(npath):
            if item==nloc:
                break
            elif item==bdir and self.precedence==EGG_DIST:
                # if it's an .egg, give it precedence over its directory
                if path is sys.path:
                    self.check_version_conflict()
                path.insert(p, loc)
                npath.insert(p, nloc)
                break
        else:
            if path is sys.path:
                self.check_version_conflict()
            path.append(loc)
            return

        # p is the spot where we found or inserted loc; now remove duplicates
        while 1:
            try:
                np = npath.index(nloc, p+1)
            except ValueError:
                break
            else:
                del npath[np], path[np]
                p = np  # ha!

        return

    def check_version_conflict(self):
        if self.key=='setuptools':
            return      # ignore the inevitable setuptools self-conflicts  :(

        nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
        loc = normalize_path(self.location)
        for modname in self._get_metadata('top_level.txt'):
            if (modname not in sys.modules or modname in nsp
                    or modname in _namespace_packages):
                continue
            if modname in ('pkg_resources', 'setuptools', 'site'):
                continue
            fn = getattr(sys.modules[modname], '__file__', None)
            if fn and (normalize_path(fn).startswith(loc) or
                       fn.startswith(self.location)):
                continue
            issue_warning(
                "Module %s was already imported from %s, but %s is being added"
                " to sys.path" % (modname, fn, self.location),
            )

    def has_version(self):
        try:
            self.version
        except ValueError:
            issue_warning("Unbuilt egg for "+repr(self))
            return False
        return True

    def clone(self,**kw):
        """Copy this distribution, substituting in any changed keyword args"""
        for attr in (
            'project_name', 'version', 'py_version', 'platform', 'location',
            'precedence'
        ):
            kw.setdefault(attr, getattr(self,attr,None))
        kw.setdefault('metadata', self._provider)
        return self.__class__(**kw)

    @property
    def extras(self):
        return [dep for dep in self._dep_map if dep]


class DistInfoDistribution(Distribution):
    """Wrap an actual or potential sys.path entry w/metadata, .dist-info style"""
    PKG_INFO = 'METADATA'
    EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])")

    @property
    def _parsed_pkg_info(self):
        """Parse and cache metadata"""
        try:
            return self._pkg_info
        except AttributeError:
            from email.parser import Parser
            self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO))
            return self._pkg_info

    @property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._compute_dependencies()
            return self.__dep_map

    def _preparse_requirement(self, requires_dist):
        """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz')
        Split environment marker, add == prefix to version specifiers as
        necessary, and remove parenthesis.
        """
        parts = requires_dist.split(';', 1) + ['']
        distvers = parts[0].strip()
        mark = parts[1].strip()
        distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers)
        distvers = distvers.replace('(', '').replace(')', '')
        return (distvers, mark)

    def _compute_dependencies(self):
        """Recompute this distribution's dependencies."""
        from pip._vendor._markerlib import compile as compile_marker
        dm = self.__dep_map = {None: []}

        reqs = []
        # Including any condition expressions
        for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
            distvers, mark = self._preparse_requirement(req)
            parsed = next(parse_requirements(distvers))
            parsed.marker_fn = compile_marker(mark)
            reqs.append(parsed)

        def reqs_for_extra(extra):
            for req in reqs:
                if req.marker_fn(override={'extra':extra}):
                    yield req

        common = frozenset(reqs_for_extra(None))
        dm[None].extend(common)

        for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
            extra = safe_extra(extra.strip())
            dm[extra] = list(frozenset(reqs_for_extra(extra)) - common)

        return dm


_distributionImpl = {
    '.egg': Distribution,
    '.egg-info': Distribution,
    '.dist-info': DistInfoDistribution,
    }


def issue_warning(*args,**kw):
    level = 1
    g = globals()
    try:
        # find the first stack frame that is *not* code in
        # the pkg_resources module, to use for the warning
        while sys._getframe(level).f_globals is g:
            level += 1
    except ValueError:
        pass
    from warnings import warn
    warn(stacklevel = level+1, *args, **kw)


def parse_requirements(strs):
    """Yield ``Requirement`` objects for each specification in `strs`

    `strs` must be an instance of ``basestring``, or a (possibly-nested)
    iterable thereof.
    """
    # create a steppable iterator, so we can handle \-continuations
    lines = iter(yield_lines(strs))

    def scan_list(ITEM,TERMINATOR,line,p,groups,item_name):

        items = []

        while not TERMINATOR(line,p):
            if CONTINUE(line,p):
                try:
                    line = next(lines)
                    p = 0
                except StopIteration:
                    raise ValueError(
                        "\\ must not appear on the last nonblank line"
                    )

            match = ITEM(line,p)
            if not match:
                raise ValueError("Expected "+item_name+" in",line,"at",line[p:])

            items.append(match.group(*groups))
            p = match.end()

            match = COMMA(line,p)
            if match:
                p = match.end() # skip the comma
            elif not TERMINATOR(line,p):
                raise ValueError(
                    "Expected ',' or end-of-list in",line,"at",line[p:]
                )

        match = TERMINATOR(line,p)
        if match: p = match.end()   # skip the terminator, if any
        return line, p, items

    for line in lines:
        match = DISTRO(line)
        if not match:
            raise ValueError("Missing distribution spec", line)
        project_name = match.group(1)
        p = match.end()
        extras = []

        match = OBRACKET(line,p)
        if match:
            p = match.end()
            line, p, extras = scan_list(
                DISTRO, CBRACKET, line, p, (1,), "'extra' name"
            )

        line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
        specs = [(op,safe_version(val)) for op,val in specs]
        yield Requirement(project_name, specs, extras)


def _sort_dists(dists):
    tmp = [(dist.hashcmp,dist) for dist in dists]
    tmp.sort()
    dists[::-1] = [d for hc,d in tmp]


class Requirement:
    def __init__(self, project_name, specs, extras):
        """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
        self.unsafe_name, project_name = project_name, safe_name(project_name)
        self.project_name, self.key = project_name, project_name.lower()
        index = [(parse_version(v),state_machine[op],op,v) for op,v in specs]
        index.sort()
        self.specs = [(op,ver) for parsed,trans,op,ver in index]
        self.index, self.extras = index, tuple(map(safe_extra,extras))
        self.hashCmp = (
            self.key, tuple([(op,parsed) for parsed,trans,op,ver in index]),
            frozenset(self.extras)
        )
        self.__hash = hash(self.hashCmp)

    def __str__(self):
        specs = ','.join([''.join(s) for s in self.specs])
        extras = ','.join(self.extras)
        if extras: extras = '[%s]' % extras
        return '%s%s%s' % (self.project_name, extras, specs)

    def __eq__(self,other):
        return isinstance(other,Requirement) and self.hashCmp==other.hashCmp

    def __contains__(self,item):
        if isinstance(item,Distribution):
            if item.key != self.key: return False
            if self.index: item = item.parsed_version  # only get if we need it
        elif isinstance(item,basestring):
            item = parse_version(item)
        last = None
        compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1
        for parsed,trans,op,ver in self.index:
            action = trans[compare(item,parsed)] # Indexing: 0, 1, -1
            if action=='F':
                return False
            elif action=='T':
                return True
            elif action=='+':
                last = True
            elif action=='-' or last is None:   last = False
        if last is None: last = True    # no rules encountered
        return last

    def __hash__(self):
        return self.__hash

    def __repr__(self): return "Requirement.parse(%r)" % str(self)

    @staticmethod
    def parse(s):
        reqs = list(parse_requirements(s))
        if reqs:
            if len(reqs)==1:
                return reqs[0]
            raise ValueError("Expected only one requirement", s)
        raise ValueError("No requirements found", s)

state_machine = {
    #       =><
    '<': '--T',
    '<=': 'T-T',
    '>': 'F+F',
    '>=': 'T+F',
    '==': 'T..',
    '!=': 'F++',
}


def _get_mro(cls):
    """Get an mro for a type or classic class"""
    if not isinstance(cls,type):
        class cls(cls,object): pass
        return cls.__mro__[1:]
    return cls.__mro__

def _find_adapter(registry, ob):
    """Return an adapter factory for `ob` from `registry`"""
    for t in _get_mro(getattr(ob, '__class__', type(ob))):
        if t in registry:
            return registry[t]


def ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    if not os.path.isdir(dirname):
        os.makedirs(dirname)

def split_sections(s):
    """Split a string or iterable thereof into (section,content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    """
    section = None
    content = []
    for line in yield_lines(s):
        if line.startswith("["):
            if line.endswith("]"):
                if section or content:
                    yield section, content
                section = line[1:-1].strip()
                content = []
            else:
                raise ValueError("Invalid section heading", line)
        else:
            content.append(line)

    # wrap up last segment
    yield section, content

def _mkstemp(*args,**kw):
    from tempfile import mkstemp
    old_open = os.open
    try:
        os.open = os_open   # temporarily bypass sandboxing
        return mkstemp(*args,**kw)
    finally:
        os.open = old_open  # and then put it back


# Set up global resource manager (deliberately not state-saved)
_manager = ResourceManager()
def _initialize(g):
    for name in dir(_manager):
        if not name.startswith('_'):
            g[name] = getattr(_manager, name)
_initialize(globals())

# Prepare the master working set and make the ``require()`` API available
working_set = WorkingSet._build_master()
_declare_state('object', working_set=working_set)

require = working_set.require
iter_entry_points = working_set.iter_entry_points
add_activation_listener = working_set.subscribe
run_script = working_set.run_script
run_main = run_script   # backward compatibility
# Activate all distributions already on sys.path, and ensure that
# all distributions added to the working set in the future (e.g. by
# calling ``require()``) will get activated as well.
add_activation_listener(lambda dist: dist.activate())
working_set.entries=[]
list(map(working_set.add_entry,sys.path)) # match order
python3.3/site-packages/pip/commands/list.py000064400000015236151733566760015001 0ustar00from pip.basecommand import Command
from pip.exceptions import DistributionNotFound, BestVersionAlreadyInstalled
from pip.index import PackageFinder
from pip.log import logger
from pip.req import InstallRequirement
from pip.util import get_installed_distributions, dist_is_editable
from pip.cmdoptions import make_option_group, index_group


class ListCommand(Command):
    """List installed packages, including editables."""
    name = 'list'
    usage = """
      %prog [options]"""
    summary = 'List installed packages.'

    # distributions to skip (python itself is reported by pkg_resources.working_set)
    skip = ['python']

    def __init__(self, *args, **kw):
        super(ListCommand, self).__init__(*args, **kw)

        cmd_opts = self.cmd_opts

        cmd_opts.add_option(
            '-o', '--outdated',
            action='store_true',
            default=False,
            help='List outdated packages (excluding editables)')
        cmd_opts.add_option(
            '-u', '--uptodate',
            action='store_true',
            default=False,
            help='List uptodate packages (excluding editables)')
        cmd_opts.add_option(
            '-e', '--editable',
            action='store_true',
            default=False,
            help='List editable projects.')
        cmd_opts.add_option(
            '-l', '--local',
            action='store_true',
            default=False,
            help='If in a virtualenv that has global access, do not list globally-installed packages.')

        cmd_opts.add_option(
            '--pre',
            action='store_true',
            default=False,
            help="Include pre-release and development versions. By default, pip only finds stable versions.")

        index_opts = make_option_group(index_group, self.parser)

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, cmd_opts)

    def _build_package_finder(self, options, index_urls, session):
        """
        Create a package finder appropriate to this list command.
        """
        return PackageFinder(find_links=options.find_links,
                             index_urls=index_urls,
                             allow_external=options.allow_external,
                             allow_unverified=options.allow_unverified,
                             allow_all_external=options.allow_all_external,
                             allow_all_prereleases=options.pre,
                             process_dependency_links=
                                options.process_dependency_links,
                             session=session,
                        )

    def run(self, options, args):
        if options.outdated:
            self.run_outdated(options)
        elif options.uptodate:
            self.run_uptodate(options)
        elif options.editable:
            self.run_editables(options)
        else:
            self.run_listing(options)

    def run_outdated(self, options):
        for dist, remote_version_raw, remote_version_parsed in self.find_packages_latests_versions(options):
            if remote_version_parsed > dist.parsed_version:
                logger.notify('%s (Current: %s Latest: %s)' % (dist.project_name,
                    dist.version, remote_version_raw))

    def find_packages_latests_versions(self, options):
        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index:
            logger.notify('Ignoring indexes: %s' % ','.join(index_urls))
            index_urls = []

        if options.use_mirrors:
            logger.deprecated("1.7",
                        "--use-mirrors has been deprecated and will be removed"
                        " in the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")

        if options.mirrors:
            logger.deprecated("1.7",
                        "--mirrors has been deprecated and will be removed in "
                        " the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")
            index_urls += options.mirrors

        dependency_links = []
        for dist in get_installed_distributions(local_only=options.local, skip=self.skip):
            if dist.has_metadata('dependency_links.txt'):
                dependency_links.extend(
                    dist.get_metadata_lines('dependency_links.txt'),
                )

        session = self._build_session(options)

        finder = self._build_package_finder(options, index_urls, session)
        finder.add_dependency_links(dependency_links)

        installed_packages = get_installed_distributions(local_only=options.local, include_editables=False, skip=self.skip)
        for dist in installed_packages:
            req = InstallRequirement.from_line(dist.key, None)
            try:
                link = finder.find_requirement(req, True)

                # If link is None, means installed version is most up-to-date
                if link is None:
                    continue
            except DistributionNotFound:
                continue
            except BestVersionAlreadyInstalled:
                remote_version = req.installed_version
            else:
                # It might be a good idea that link or finder had a public method
                # that returned version
                remote_version = finder._link_package_versions(link, req.name)[0]
                remote_version_raw = remote_version[2]
                remote_version_parsed = remote_version[0]
            yield dist, remote_version_raw, remote_version_parsed

    def run_listing(self, options):
        installed_packages = get_installed_distributions(local_only=options.local, skip=self.skip)
        self.output_package_listing(installed_packages)

    def run_editables(self, options):
        installed_packages = get_installed_distributions(local_only=options.local, editables_only=True)
        self.output_package_listing(installed_packages)

    def output_package_listing(self, installed_packages):
        installed_packages = sorted(installed_packages, key=lambda dist: dist.project_name.lower())
        for dist in installed_packages:
            if dist_is_editable(dist):
                line = '%s (%s, %s)' % (dist.project_name, dist.version, dist.location)
            else:
                line = '%s (%s)' % (dist.project_name, dist.version)
            logger.notify(line)

    def run_uptodate(self, options):
        uptodate = []
        for dist, remote_version_raw, remote_version_parsed in self.find_packages_latests_versions(options):
            if dist.parsed_version == remote_version_parsed:
                uptodate.append(dist)
        self.output_package_listing(uptodate)
python3.3/site-packages/pip/commands/__pycache__/list.cpython-33.pyc000064400000017555151733566760021270 0ustar00�
7�Re�c@s�ddlmZddlmZmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZGdd	�d	e�Zd
S(i(uCommand(uDistributionNotFounduBestVersionAlreadyInstalled(u
PackageFinder(ulogger(uInstallRequirement(uget_installed_distributionsudist_is_editable(umake_option_groupuindex_groupcs�|EeZdZdZdZdZdZdgZ�fdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�Zdd�Z�S(uListCommandu-List installed packages, including editables.ulistu
      %prog [options]uList installed packages.upythonc	stt|�j||�|j}|jdddddddd�|jdd	dddddd
�|jdddddddd
�|jdddddddd�|jddddddd�tt|j�}|jj	d|�|jj	d|�dS(Nu-ou
--outdateduactionu
store_trueudefaultuhelpu,List outdated packages (excluding editables)u-uu
--uptodateu,List uptodate packages (excluding editables)u-eu
--editableuList editable projects.u-lu--localuSIf in a virtualenv that has global access, do not list globally-installed packages.u--preuYInclude pre-release and development versions. By default, pip only finds stable versions.iF(
usuperuListCommandu__init__ucmd_optsu
add_optionuFalseumake_option_groupuindex_groupuparseruinsert_option_group(uselfuargsukwucmd_optsu
index_opts(u	__class__(u*/tmp/pip-zej_zi-build/pip/commands/list.pyu__init__s<					uListCommand.__init__cCsItd|jd|d|jd|jd|jd|jd|jd|�S(	uK
        Create a package finder appropriate to this list command.
        u
find_linksu
index_urlsuallow_externaluallow_unverifieduallow_all_externaluallow_all_prereleasesuprocess_dependency_linksusession(u
PackageFinderu
find_linksuallow_externaluallow_unverifieduallow_all_externalupreuprocess_dependency_links(uselfuoptionsu
index_urlsusession((u*/tmp/pip-zej_zi-build/pip/commands/list.pyu_build_package_finder9s					u!ListCommand._build_package_findercCs\|jr|j|�n?|jr2|j|�n&|jrK|j|�n
|j|�dS(N(uoutdatedurun_outdateduuptodateurun_uptodateueditableu
run_editablesurun_listing(uselfuoptionsuargs((u*/tmp/pip-zej_zi-build/pip/commands/list.pyurunHs			uListCommand.runcCsYxR|j|�D]A\}}}||jkrtjd|j|j|f�qqWdS(Nu%s (Current: %s Latest: %s)(ufind_packages_latests_versionsuparsed_versionuloggerunotifyuproject_nameuversion(uselfuoptionsudisturemote_version_rawuremote_version_parsed((u*/tmp/pip-zej_zi-build/pip/commands/list.pyurun_outdatedRsuListCommand.run_outdatedc
cs�|jg|j}|jr?tjddj|��g}n|jr[tjdd�n|jr�tjdd�||j7}ng}xKt	d|j
d|j�D].}|jd�r�|j
|jd��q�q�W|j|�}|j|||�}|j|�t	d|j
d	dd|j�}x�|D]�}tj|jd�}y(|j|d
�}	|	dkrsw1nWn/tk
r�w1YnHtk
r�|j}
Yn.X|j|	|j�d
}
|
d}|
d
}|||fVq1WdS(NuIgnoring indexes: %su,u1.7u�--use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.u�--mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.u
local_onlyuskipudependency_links.txtuinclude_editablesiiFT(u	index_urluextra_index_urlsuno_indexuloggerunotifyujoinuuse_mirrorsu
deprecatedumirrorsuget_installed_distributionsulocaluskipuhas_metadatauextenduget_metadata_linesu_build_sessionu_build_package_finderuadd_dependency_linksuFalseuInstallRequirementu	from_lineukeyuNoneufind_requirementuTrueuDistributionNotFounduBestVersionAlreadyInstalleduinstalled_versionu_link_package_versionsuname(
uselfuoptionsu
index_urlsudependency_linksudistusessionufinderuinstalled_packagesurequlinkuremote_versionuremote_version_rawuremote_version_parsed((u*/tmp/pip-zej_zi-build/pip/commands/list.pyufind_packages_latests_versionsXsD				
		"
!





u*ListCommand.find_packages_latests_versionscCs,td|jd|j�}|j|�dS(Nu
local_onlyuskip(uget_installed_distributionsulocaluskipuoutput_package_listing(uselfuoptionsuinstalled_packages((u*/tmp/pip-zej_zi-build/pip/commands/list.pyurun_listing�suListCommand.run_listingcCs)td|jdd�}|j|�dS(Nu
local_onlyueditables_onlyT(uget_installed_distributionsulocaluTrueuoutput_package_listing(uselfuoptionsuinstalled_packages((u*/tmp/pip-zej_zi-build/pip/commands/list.pyu
run_editables�suListCommand.run_editablescCs{t|ddd��}x\|D]T}t|�rPd|j|j|jf}nd|j|jf}tj|�qWdS(NukeycSs
|jj�S(N(uproject_nameulower(udist((u*/tmp/pip-zej_zi-build/pip/commands/list.pyu<lambda>�su4ListCommand.output_package_listing.<locals>.<lambda>u%s (%s, %s)u%s (%s)(usortedudist_is_editableuproject_nameuversionulocationuloggerunotify(uselfuinstalled_packagesudistuline((u*/tmp/pip-zej_zi-build/pip/commands/list.pyuoutput_package_listing�s
u"ListCommand.output_package_listingcCsYg}x?|j|�D].\}}}|j|kr|j|�qqW|j|�dS(N(ufind_packages_latests_versionsuparsed_versionuappenduoutput_package_listing(uselfuoptionsuuptodateudisturemote_version_rawuremote_version_parsed((u*/tmp/pip-zej_zi-build/pip/commands/list.pyurun_uptodate�s
uListCommand.run_uptodate(u__name__u
__module__u__qualname__u__doc__unameuusageusummaryuskipu__init__u_build_package_finderurunurun_outdatedufind_packages_latests_versionsurun_listingu
run_editablesuoutput_package_listingurun_uptodate(u
__locals__((u	__class__u*/tmp/pip-zej_zi-build/pip/commands/list.pyuListCommand
s	%
4	uListCommandN(upip.basecommanduCommandupip.exceptionsuDistributionNotFounduBestVersionAlreadyInstalledu	pip.indexu
PackageFinderupip.loguloggerupip.requInstallRequirementupip.utiluget_installed_distributionsudist_is_editableupip.cmdoptionsumake_option_groupuindex_groupuListCommand(((u*/tmp/pip-zej_zi-build/pip/commands/list.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/zip.cpython-33.pyc000064400000033620151733566760021106 0ustar00�
7�Re�9c@s�ddlZddlZddlZddlZddlZddlZddlmZmZm	Z	ddl
mZddlm
Z
ddlmZGdd�de�ZdS(iN(udisplay_pathu
backup_dirurmtree(ulogger(uInstallationError(uCommandcs�|EeZdZdZdZdZdZ�fdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Z�S(u
ZipCommanduZip individual packages.uzipu#
     %prog [options] <package> ...u$DEPRECATED. Zip individual packages.c
s9tt|�j||�|jdkrM|jjddddddd�n(|jjd	dd
dddddd�|jjd
dddddd�|jjdddddddd�|jjddddddd�|jjddddddd�|jjdddddd�|jjd|j�dS( Nuzipu--unzipuactionu
store_trueudestuunzipuhelpu"Unzip (rather than zip) a package.u--zipustore_falseudefaultu"Zip (rather than unzip) a package.u--no-pycuno_pycuEDo not include .pyc files in zip files (useful on Google App Engine).u-lu--listulistu2List the packages available, and their zip status.u--sort-filesu
sort_filesuDWith --list, sort packages according to how many files they contain.u--pathuappendupathsu?Restrict operations to the given paths (may include wildcards).u-nu
--simulateu0Do not actually perform the zip/unzip operation.iT(	usuperu
ZipCommandu__init__unameucmd_optsu
add_optionuTrueuparseruinsert_option_group(uselfuargsukw(u	__class__(u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu__init__sL	
								uZipCommand.__init__cCsp|jstjSg}t�}x�tjD]�}tjjtjj|��}x�|jD]�}tjjtjj|��}d|kr�tjt	j
|d�|�r�|j|�|j|�Pq�qW|j
|�rW|j|�|j|�PqWqWWtjd|dj|j�f�q)WxJ|jD]?}||kr)d|kr)|j|�tjd|�q)q)W|S(u:All the entries of sys.path, possibly restricted by --pathu*u,Skipping path %s because it doesn't match %su, uDAdding path %s because it doesn't match anything already on sys.path(uselect_pathsusysupathusetuosunormcaseuabspathureusearchufnmatchu	translateuappenduaddu
startswithuloggerudebugujoin(uselfuresultu	match_anyupathumatch((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyupaths>s2		



	
	uZipCommand.pathscCsVtjdd�|j|_|j|_|jrA|j||�S|sVtd��ng}x�|D]�}|j|�\}}|jr�t	j
j|�r�td||f��n6|jr�t	j
j|�r�td||f��n|j||f�qcWd}xJ|D]B\}}|jr6|j||�}q|j|||j�}qW|S(Nu1.7u_DEPRECATION: 'pip zip' and 'pip unzip` are deprecated, and will be removed in a future release.u2You must give at least one package to zip or unzipu;The module %s (in %s) is not a zip file; cannot be unzippedu:The module %s (in %s) is not a directory; cannot be zipped(uloggeru
deprecatedupathsuselect_pathsusimulateulistuInstallationErrorufind_packageuunzipuosupathuisdiruappenduNoneu
unzip_packageuzip_packageuno_pyc(uselfuoptionsuargsupackagesuargumodule_nameufilenameulast_status((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyurun\s4	
	uZipCommand.runc
Cs�tjj|�}tjj|�rPtj|�rPtd|||f��ntjj|�}||j�kr�tj	dt
|�t
|�t
|�f�ntjd|t
|�f�|jr�tjd�dStj
d7_
z�tj|�}g}x|j�D]}|j}|j|tjj�r�|j|�}	tjj||�}
tjjtjj|
��s�tjtjj|
��n|	r�|
jtjj�r�tjj|
�s�tj|
�q�qt|
d�}|j|	�|j�q|j||j|�f�qW|j�|sbtjdt
|��tj|�|j|�n`tjd|t
|�f�tj|d	�}x$|D]\}}	|j||	�q�W|j�Wdtj
d8_
XdS(
Nu3Module %s (in %s) isn't located in a zip file in %su/Unpacking %s into %s, but %s is not on sys.pathuUnzipping %s (in %s)u3Skipping remaining operations because of --simulateiuwbuRemoving now-empty zip file %su(Removing entries in %s/ from zip file %suw( uosupathudirnameuisfileuzipfileu
is_zipfileuInstallationErrorupathsuloggeruwarnudisplay_pathunotifyusimulateuindentuZipFileuinfolistufilenameu
startswithusepureadujoinuexistsumakedirsuendswithuopenuwriteucloseuappenduinfouunlinkuremove_filename_from_pthuwritestr(uselfumodule_nameufilenameuzip_filenameupackage_pathuziputo_saveuinfounameucontentudestuf((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu
unzip_package{sX"	
	

 

uZipCommand.unzip_packagecCsN|}tjd|t|�f�tjd7_|jd�rJ|}n
|d}z�||kr�t|�}tjd||f�|js�tj||�q�nyvtj	dt|��|js�t
j|d�}|j|dd	�x�t
j|�D]�\}}}	|r)d
d�|	D�}	nx�|d
f|	dfgD]�\}
}x�|
D]}t
jj||�}
t
jj||t|�d�jt
jj�|�}|r�|j|dd	�qU|j|
|�qUWqBWq�W|j�ntj	dt|��|jst|�nWn�YnX|j|�Wdtjd8_XdS(NuZip %s (in %s)iu.eggu.zipuMoving %s aside to %suCreating zip file in %suwu/ucSs+g|]!}|j�jd�s|�qS(u.pyc(uloweruendswith(u.0uf((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu
<listcomp>�s	u*ZipCommand.zip_package.<locals>.<listcomp>uRemoving old directory %sTF(uloggerunotifyudisplay_pathuindentuendswithu
backup_dirusimulateushutilumoveuinfouzipfileuZipFileuwritestruosuwalkuTrueuFalseupathujoinulenulstripusepuwriteucloseurmtreeuadd_filename_to_pth(uselfumodule_nameufilenameuno_pycu
orig_filenameu
dest_filenameuzipudirpathudirnamesu	filenamesufnsuis_dirufnufulludest((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyuzip_package�sF	
		%
7
	uZipCommand.zip_packagecsx�|j�D]�}t|d�}|j�}|j��fdd�|D�}||kr
tjdt��t|�f�dd�|D�s�tjdt|��|js�tj	|�q�n2|js�t|d�}|j
|�|j�ndSq
Wtjdt���dS(	Nurcs(g|]}|j��kr|�qS((ustrip(u.0ul(ufilename(u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu
<listcomp>�s	u7ZipCommand.remove_filename_from_pth.<locals>.<listcomp>u*Removing reference to %s from .pth file %scSsg|]}|r|�qS(((u.0uline((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu
<listcomp>�s	u %s file would be empty: deletinguwbu.Cannot find a reference to %s in any .pth file(u	pth_filesuopenu	readlinesucloseuloggeruinfoudisplay_pathusimulateuosuunlinku
writelinesuwarn(uselfufilenameupthufulinesu	new_lines((ufilenameu)/tmp/pip-zej_zi-build/pip/commands/zip.pyuremove_filename_from_pth�s$
			

u#ZipCommand.remove_filename_from_pthcCs�tjj|�}|d}||j�krHtjdt|��n|js�tjj|�r�t	|�}|j
�}|j�|r�|djd�r�|dd7<n|j
|d�n
|dg}t	|d�}|j|�|j�ndS(Nu.pthu.Adding .pth file %s, but it is not on sys.pathiu
uwbi����i����(uosupathudirnameupathsuloggeruwarnudisplay_pathusimulateuexistsuopenu	readlinesucloseuendswithuappendu
writelines(uselfufilenameupathudestufulines((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyuadd_filename_to_pth�s 
	


uZipCommand.add_filename_to_pthccs�x�|j�D]r}tjj|�s
tjj|�r?q
nx=tj|�D],}|jd�rOtjj||�VqOqOWq
WdS(Nu.pth(upathsuosupathuexistsuisdirulistdiruendswithujoin(uselfupathufilename((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu	pth_filess&uZipCommand.pth_filesc
Cs�x�|j�D]�}tjj||�}tjj|�rD||fStjj|�r
tj|�r
tj|d�}y |j	tjj|d��Wnt
k
r�YnX|j�||fS|j�q
q
Wtd|��dS(Nuru__init__.pyu!No package with the name %s found(
upathsuosupathujoinuexistsuisdiruzipfileu
is_zipfileuZipFileureaduKeyErrorucloseuInstallationError(uselfupackageupathufulluzip((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyufind_packages
" 


uZipCommand.find_packagecCsD|rtd��nx(t|j��D]}tjj|�sFq(ntjj|jtjj��}tjj	|�r�t
j|�r�tjj|�|j�kr(t
jdt|��q(q(n|dkr|dkr|jdd�jd�rq(nt
jdt|��t
jd	7_g}g}z�x�ttj|��D]�}tjj|�d
j�}|dkrqKn|dkr�t
jdt|��qKntjj||�}	tjj|	�r�|j||j|	�f�qKt
j|	�r
|j|�qKt
jdt|��qKW|r�t
jd�t
jd	7_z"x|D]}t
j|�qTWWdt
jd	8_Xn
t
jd�|r|jr�|jddd��nt
jd�t
jd	7_z2x+|D]#\}}
t
jd||
f�q�WWdt
jd	8_Xn
t
jd�Wdt
jd	8_Xq(WdS(Nu'You cannot give an argument with --listuZipped egg: %su
site-packagesu
dist-packagesu\u/u
lib/pythonuIn %s:iiu.pthu	.egg-infou	.egg-linku.pyu Not displaying %s: not a packageuUnknown file: %suZipped packages:uNo zipped packages.ukeycSs	|dS(Ni((ux((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu<lambda>Lsu!ZipCommand.list.<locals>.<lambda>uUnzipped packages:u%s  (%i files)uNo unzipped packages.(u.pthu	.egg-infou	.egg-link(uInstallationErrorusortedupathsuosupathuexistsubasenameurstripusepuisfileuzipfileu
is_zipfileudirnameuloggerunotifyudisplay_pathureplaceuendswithuindentulistdirusplitextuloweruinfoujoinuisdiruappendu
count_packageu
sort_filesusort(uselfuoptionsuargsupathubasenameuzippeduunzippedufilenameuextufullucount((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyulistsf!!


	
uZipCommand.listcCsPd}xCtj|�D]2\}}}dd�|D�}|t|�7}qW|S(NicSs+g|]!}|j�jd�s|�qS(u.pyc(uloweruendswith(u.0uf((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu
<listcomp>\s	u,ZipCommand.count_package.<locals>.<listcomp>(uosuwalkulen(uselfupathutotaludirpathudirnamesu	filenames((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu
count_packageYs
uZipCommand.count_package(u__name__u
__module__u__qualname__u__doc__unameuusageusummaryu__init__upathsurunu
unzip_packageuzip_packageuremove_filename_from_pthuadd_filename_to_pthu	pth_filesufind_packageulistu
count_package(u
__locals__((u	__class__u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu
ZipCommand
s*3,;u
ZipCommand(usysureufnmatchuosushutiluzipfileupip.utiludisplay_pathu
backup_dirurmtreeupip.loguloggerupip.exceptionsuInstallationErrorupip.basecommanduCommandu
ZipCommand(((u)/tmp/pip-zej_zi-build/pip/commands/zip.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/wheel.cpython-33.pyc000064400000015607151733566760021415 0ustar00�
7�Re"c@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZddl
mZmZmZddlmZmZdd	lmZdd
lmZejjeej�d�ZGdd
�d
e�ZdS(i(uabsolute_importN(uCommand(u
PackageFinder(ulogger(uCommandErroruPreviousBuildDirError(uInstallRequirementuRequirementSetuparse_requirements(uBuildDirectoryunormalize_path(uWheelBuilder(u
cmdoptionsu
wheelhousecsJ|EeZdZdZdZdZdZ�fdd�Zdd�Z�S(	uWheelCommandu�
    Build Wheel archives for your requirements and dependencies.

    Wheel is a built-package format, and offers the advantage of not recompiling your software during every install.
    For more details, see the wheel docs: http://wheel.readthedocs.org/en/latest.

    Requirements: setuptools>=0.8, and wheel.

    'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels.

    uwheelu�
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] <vcs project url> ...
      %prog [options] <local project path> ...
      %prog [options] <archive url/path> ...u$Build wheels from your requirements.cs�tt|�j||�|j}|jdddddddtdd	�|jtjj��|jtj	j��|jd
ddddd
ddd�|jtj
j��|jtjj��|jtjj��|jtj
j��|jdddd
ddddd�|jdd
ddddd�|jtjj��tjtj|j�}|jjd|�|jjd|�dS(Nu-wu--wheel-dirudestu	wheel_dirumetavarudirudefaultuhelpuABuild wheels into <dir>, where the default is '<cwd>/wheelhouse'.u--build-optionu
build_optionsuoptionsuactionuappendu9Extra arguments to be supplied to 'setup.py bdist_wheel'.u--global-optionuglobal_optionsuZExtra global options to be supplied to the setup.py call before the 'bdist_wheel' command.u--preu
store_trueuYInclude pre-release and development versions. By default, pip only finds stable versions.iF(usuperuWheelCommandu__init__ucmd_optsu
add_optionuDEFAULT_WHEEL_DIRu
cmdoptionsu	use_wheelumakeuno_use_wheelurequirementsudownload_cacheuno_depsu	build_diruFalseuno_cleanumake_option_groupuindex_groupuparseruinsert_option_group(uselfuargsukwucmd_optsu
index_opts(u	__class__(u+/tmp/pip-zej_zi-build/pip/commands/wheel.pyu__init__(sF		uWheelCommand.__init__c.Csuyddl}Wntk
r0td��YnXyddl}Wntk
ratd��YnXt|d�s�td��n|jg|j}|jr�tj	ddj
|��g}n|jr�tjdd�n|j
rtjdd	�||j
7}n|jr(tjj|j�|_n|j|�}td
|jd|d|jd
|jd|jd|jd|jd|jd|�	}|jp�|j}t|jd|���}	td|	ddddd|jd|j dd"d|d|j"�}
tjj#|j"�s tj$|j"�nx'|D]}|
j%t&j'|d��q'Wxj|j(D]_}xVt)|d|d|d|�D]6}
|
j*r�tj	d|
j+�qyn|
j%|
�qyWqTW|
j,s�i|j-d6}d|}tj.|�dSzfyAt/|
||j"d |j0pgd!|j1pg�}|j2�Wnt3k
rOd"|_�YnXWd|jsj|
j4�nXWdQXdS(#NiuN'pip wheel' requires the 'wheel' package. To fix this, run:  pip install wheelup'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptoolsuDistInfoDistributionuIgnoring indexes: %su,u1.7u�--use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.u�--mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.u
find_linksu
index_urlsu	use_wheeluallow_externaluallow_unverifieduallow_all_externaluallow_all_prereleasesuprocess_dependency_linksusessionudeleteu	build_dirusrc_dirudownload_dirudownload_cacheuignore_dependenciesuignore_installeduwheel_download_dirufinderuoptionsuignoring %sunameuLYou must give at least one requirement to %(name)s (see "pip help %(name)s")u
build_optionsuglobal_optionsT(5uwheel.bdist_wheeluImportErroruCommandErroru
pkg_resourcesuhasattru	index_urluextra_index_urlsuno_indexuloggerunotifyujoinuuse_mirrorsu
deprecatedumirrorsu	build_diruosupathuabspathu_build_sessionu
PackageFinderu
find_linksu	use_wheeluallow_externaluallow_unverifieduallow_all_externalupreuprocess_dependency_linksuno_cleanuBuildDirectoryuRequirementSetuNoneudownload_cacheuignore_dependenciesuTrueu	wheel_diruexistsumakedirsuadd_requirementuInstallRequirementu	from_lineurequirementsuparse_requirementsueditableuurluhas_requirementsunameuerroruWheelBuilderu
build_optionsuglobal_optionsubuilduPreviousBuildDirErroru
cleanup_files(uselfuoptionsuargsuwheelu
pkg_resourcesu
index_urlsusessionufinderubuild_deleteu	build_dirurequirement_setunameufilenameurequoptsumsguwb((u+/tmp/pip-zej_zi-build/pip/commands/wheel.pyurunUs�

				
												

		
	
		uWheelCommand.run(	u__name__u
__module__u__qualname__u__doc__unameuusageusummaryu__init__urun(u
__locals__((u	__class__u+/tmp/pip-zej_zi-build/pip/commands/wheel.pyuWheelCommands-uWheelCommand(u
__future__uabsolute_importuosusysupip.basecommanduCommandu	pip.indexu
PackageFinderupip.loguloggerupip.exceptionsuCommandErroruPreviousBuildDirErrorupip.requInstallRequirementuRequirementSetuparse_requirementsupip.utiluBuildDirectoryunormalize_pathu	pip.wheeluWheelBuilderupipu
cmdoptionsupathujoinucurdiruDEFAULT_WHEEL_DIRuWheelCommand(((u+/tmp/pip-zej_zi-build/pip/commands/wheel.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/completion.cpython-33.pyc000064400000005504151733566760022455 0ustar00�
7�Re.c@sPddlZddlmZdZidd6dd6ZGdd	�d	e�ZdS(
iN(uCommanduJ
# pip %(shell)s completion start%(script)s# pip %(shell)s completion end
u�
_pip_completion()
{
    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
                   COMP_CWORD=$COMP_CWORD \
                   PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
ubashu�
function _pip_completion {
  local words cword
  read -Ac words
  read -cn cword
  reply=( $( COMP_WORDS="$words[*]" \
             COMP_CWORD=$(( cword-1 )) \
             PIP_AUTO_COMPLETE=1 $words[1] ) )
}
compctl -K _pip_completion pip
uzshcsJ|EeZdZdZdZdZdZ�fdd�Zdd�Z	�S(	uCompletionCommandu3A helper command to be used for command completion.u
completionu2A helper command to be used for command completioncsstt|�j||�|jjddddddddd	d
�|jjdddddd
ddd	d�dS(Nu--bashu-buactionustore_constuconstubashudestushelluhelpuEmit completion code for bashu--zshu-zuzshuEmit completion code for zsh(usuperuCompletionCommandu__init__uparseru
add_option(uselfuargsukw(u	__class__(u0/tmp/pip-zej_zi-build/pip/commands/completion.pyu__init__$s				uCompletionCommand.__init__cCs�tj�}dd�t|�D�}|j|krktj|jd�}tti|d6|jd6�ntjj	ddj
|��dS(	u-Prints the completion code of the given shellcSsg|]}d|�qS(u--((u.0ushell((u0/tmp/pip-zej_zi-build/pip/commands/completion.pyu
<listcomp>6s	u)CompletionCommand.run.<locals>.<listcomp>uuscriptushelluERROR: You must pass %s
u or N(uCOMPLETION_SCRIPTSukeysusortedushellugetuprintuBASE_COMPLETIONusysustderruwriteujoin(uselfuoptionsuargsushellsu
shell_optionsuscript((u0/tmp/pip-zej_zi-build/pip/commands/completion.pyurun3s"uCompletionCommand.runT(
u__name__u
__module__u__qualname__u__doc__unameusummaryuTrueuhiddenu__init__urun(u
__locals__((u	__class__u0/tmp/pip-zej_zi-build/pip/commands/completion.pyuCompletionCommandsuCompletionCommand(usysupip.basecommanduCommanduBASE_COMPLETIONuCOMPLETION_SCRIPTSuCompletionCommand(((u0/tmp/pip-zej_zi-build/pip/commands/completion.pyu<module>s	

python3.3/site-packages/pip/commands/__pycache__/show.cpython-33.pyc000064400000010064151733566760021261 0ustar00�
7�Re�
c@snddlZddlmZddlmZddlmZGdd�de�Zdd�Zd	d
�Z	dS(iN(uCommand(ulogger(u
pkg_resourcescsJ|EeZdZdZdZdZdZ�fdd�Zdd�Z�S(	uShowCommandu6Show information about one or more installed packages.ushowu$
      %prog [options] <package> ...u*Show information about installed packages.cs^tt|�j||�|jjdddddddddd	�|jjd
|j�dS(Nu-fu--filesudestufilesuactionu
store_trueudefaultuhelpu7Show the full list of installed files for each package.iF(usuperuShowCommandu__init__ucmd_optsu
add_optionuFalseuparseruinsert_option_group(uselfuargsukw(u	__class__(u*/tmp/pip-zej_zi-build/pip/commands/show.pyu__init__s		uShowCommand.__init__cCs=|stjd�dS|}t|�}t||j�dS(Nu.ERROR: Please provide a package name or names.(uloggeruwarnusearch_packages_infou
print_resultsufiles(uselfuoptionsuargsuqueryuresults((u*/tmp/pip-zej_zi-build/pip/commands/show.pyuruns
uShowCommand.run(	u__name__u
__module__u__qualname__u__doc__unameuusageusummaryu__init__urun(u
__locals__((u	__class__u*/tmp/pip-zej_zi-build/pip/commands/show.pyuShowCommandsuShowCommandccs�tdd�tjD��}x�|D]�}|j�}||kr#||}i|jd6|jd6|jd6dd�|j�D�d6}tj	j
|j|j�dd	�}tj	j|�r�||d
<n|Vq#q#WdS(u�
    Gather details from installed distributions. Print distribution name,
    version, location, and installed files. Installed files requires a
    pip generated 'installed-files.txt' in the distributions '.egg-info'
    directory.
    cSs%g|]}|jj�|f�qS((uproject_nameulower(u.0up((u*/tmp/pip-zej_zi-build/pip/commands/show.pyu
<listcomp>,s	u(search_packages_info.<locals>.<listcomp>unameuversionulocationcSsg|]}|j�qS((uproject_name(u.0udep((u*/tmp/pip-zej_zi-build/pip/commands/show.pyu
<listcomp>5s	urequiresu	.egg-infouinstalled-files.txtufilesN(
udictu
pkg_resourcesuworking_setuloweruproject_nameuversionulocationurequiresuosupathujoinuegg_nameuisfile(uqueryuinstalled_packagesunameunormalized_nameudistupackageufilelist((u*/tmp/pip-zej_zi-build/pip/commands/show.pyusearch_packages_info$s$




	
	
usearch_packages_infocCs�x�|D]�}tjd�tjd|d�tjd|d�tjd|d�tjdd	j|d
��|rtjd�d|kr�x?t|d�D]}tjd
|j��q�Wq�tjd�qqWdS(uD
    Print the informations from installed distributions found.
    u---uName: %sunameuVersion: %suversionuLocation: %sulocationuRequires: %su, urequiresuFiles:ufilesu  %su!Cannot locate installed-files.txtN(uloggerunotifyujoinuopenustrip(u
distributionsulist_all_filesudistuline((u*/tmp/pip-zej_zi-build/pip/commands/show.pyu
print_results@s


u
print_results(
uosupip.basecommanduCommandupip.loguloggerupip._vendoru
pkg_resourcesuShowCommandusearch_packages_infou
print_results(((u*/tmp/pip-zej_zi-build/pip/commands/show.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/unzip.cpython-33.pyc000064400000001175151733566760021451 0ustar00�
7�Re�c@s*ddlmZGdd�de�ZdS(i(u
ZipCommandcBs&|EeZdZdZdZdZdS(uUnzipCommanduUnzip individual packages.uunzipu&DEPRECATED. Unzip individual packages.N(u__name__u
__module__u__qualname__u__doc__unameusummary(u
__locals__((u+/tmp/pip-zej_zi-build/pip/commands/unzip.pyuUnzipCommandsuUnzipCommandN(upip.commands.zipu
ZipCommanduUnzipCommand(((u+/tmp/pip-zej_zi-build/pip/commands/unzip.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/__init__.cpython-33.pyc000064400000005670151733566760022047 0ustar00�
7�Re�c@s�dZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZdd
lmZddlmZddlmZdd
lmZieej6eej6eej6eej6eej6eej6eej6eej6eej6eej6e
e
j6eej6Zeeee
eeeeeeegZdddd�Zdd�Zdd�ZdS(u%
Package containing all pip commands
i(u
BundleCommand(uCompletionCommand(u
FreezeCommand(uHelpCommand(uListCommand(u
SearchCommand(uShowCommand(uInstallCommand(uUninstallCommand(uUnzipCommand(u
ZipCommand(uWheelCommandccsb|rttt�}ntj�}x7|D]/\}}|rL|jrLq+n||jfVq+WdS(u5Yields sorted (command name, command summary) tuples.N(u_sort_commandsucommandsucommands_orderuitemsuhiddenusummary(u
ignore_hiddenuordereducmditemsunameu
command_class((u./tmp/pip-zej_zi-build/pip/commands/__init__.pyu
get_summaries3su
get_summariescCsBddlm}||tj��}|r8|d}nd}|S(uCommand name auto-correct.i(uget_close_matchesF(udifflibuget_close_matchesucommandsukeysuFalse(unameuget_close_matchesuclose_commandsuguess((u./tmp/pip-zej_zi-build/pip/commands/__init__.pyuget_similar_commandsBs
uget_similar_commandscs(�fdd�}t|j�d|�S(Ncs2y�j|d�SWntk
r-dSYnXdS(Nii�(uindexu
ValueError(ukey(uorder(u./tmp/pip-zej_zi-build/pip/commands/__init__.pyukeyfnQs
u_sort_commands.<locals>.keyfnukey(usorteduitems(ucmddictuorderukeyfn((uorderu./tmp/pip-zej_zi-build/pip/commands/__init__.pyu_sort_commandsPsu_sort_commandsNT( u__doc__upip.commands.bundleu
BundleCommandupip.commands.completionuCompletionCommandupip.commands.freezeu
FreezeCommandupip.commands.helpuHelpCommandupip.commands.listuListCommandupip.commands.searchu
SearchCommandupip.commands.showuShowCommandupip.commands.installuInstallCommandupip.commands.uninstalluUninstallCommandupip.commands.unzipuUnzipCommandupip.commands.zipu
ZipCommandupip.commands.wheeluWheelCommandunameucommandsucommands_orderuTrueu
get_summariesuget_similar_commandsu_sort_commands(((u./tmp/pip-zej_zi-build/pip/commands/__init__.pyu<module>sN











	python3.3/site-packages/pip/commands/__pycache__/uninstall.cpython-33.pyc000064400000005762151733566760022323 0ustar00�
7�Re�c@sVddlmZmZmZddlmZddlmZGdd�de�ZdS(i(uInstallRequirementuRequirementSetuparse_requirements(uCommand(uInstallationErrorcsJ|EeZdZdZdZdZdZ�fdd�Zdd�Z�S(	uUninstallCommanduB
    Uninstall packages.

    pip is able to uninstall most installed packages. Known exceptions are:

    - Pure distutils packages installed with ``python setup.py install``, which
      leave behind no metadata to determine what files were installed.
    - Script wrappers installed by ``python setup.py develop``.
    u	uninstalluU
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ...uUninstall packages.c
s�tt|�j||�|jjdddddddgdd	d
d�|jjdd
ddddd
d�|jjd|j�dS(Nu-ru
--requirementudesturequirementsuactionuappendudefaultumetavarufileuhelpujUninstall all the packages listed in the given requirements file.  This option can be used multiple times.u-yu--yesuyesu
store_trueu2Don't ask for confirmation of uninstall deletions.i(usuperuUninstallCommandu__init__ucmd_optsu
add_optionuparseruinsert_option_group(uselfuargsukw(u	__class__(u//tmp/pip-zej_zi-build/pip/commands/uninstall.pyu__init__s				uUninstallCommand.__init__c	Cs�|j|�}tddddddd|�}x$|D]}|jtj|��q7WxA|jD]6}x-t|d|d|�D]}|j|�q�WqaW|js�t	dt
d|j���n|jd|j
�dS(	Nu	build_dirusrc_dirudownload_dirusessionuoptionsuLYou must give at least one requirement to %(name)s (see "pip help %(name)s")unameuauto_confirm(u_build_sessionuRequirementSetuNoneuadd_requirementuInstallRequirementu	from_lineurequirementsuparse_requirementsuhas_requirementsuInstallationErrorudictunameu	uninstalluyes(uselfuoptionsuargsusessionurequirement_setunameufilenameureq((u//tmp/pip-zej_zi-build/pip/commands/uninstall.pyurun(s"	
	uUninstallCommand.run(	u__name__u
__module__u__qualname__u__doc__unameuusageusummaryu__init__urun(u
__locals__((u	__class__u//tmp/pip-zej_zi-build/pip/commands/uninstall.pyuUninstallCommands	uUninstallCommandN(	upip.requInstallRequirementuRequirementSetuparse_requirementsupip.basecommanduCommandupip.exceptionsuInstallationErroruUninstallCommand(((u//tmp/pip-zej_zi-build/pip/commands/uninstall.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/bundle.cpython-33.pyc000064400000005074151733566760021557 0ustar00�
7�Re�c@s�ddlZddlmZmZddlmZmZddlmZddl	m
Z
ddlmZGdd�de�Z
dS(	iN(ubuild_prefixu
src_prefix(udisplay_pathu
backup_dir(ulogger(uInstallationError(uInstallCommandcsV|EeZdZdZdZdZdZd	Z�fdd�Z	�fdd�Z
�S(
u
BundleCommandu9Create pybundles (archives containing multiple packages).ubundleu:
      %prog [options] <bundle name>.pybundle <package>...uDEPRECATED. Create pybundles.cs�tt|�j||�|jjd�}ttd�|_|jjd�}ttd�|_|jj	i|j|j
6|j|j
6�dS(Nu--buildu-bundleu--src(usuperu
BundleCommandu__init__uparseru
get_optionu
backup_dirubuild_prefixudefaultu
src_prefixuset_defaultsudest(uselfuargsukwu	build_optusrc_opt(u	__class__(u,/tmp/pip-zej_zi-build/pip/commands/bundle.pyu__init__s
uBundleCommand.__init__cs�tjdd�|s%td��nd|_tjdt|j�t|j�f�|j	d�|_
tt|�j
||�}|S(Nu1.6u�DEPRECATION: 'pip bundle' and support for installing from *.pybundle files is deprecated. See https://github.com/pypa/pip/pull/1046uYou must give a bundle filenameuBPutting temporary build files in %s and source/develop files in %siT(uloggeru
deprecateduInstallationErroruTrueuignore_installedunotifyudisplay_pathu	build_dirusrc_dirupopubundle_filenameusuperu
BundleCommandurun(uselfuoptionsuargsurequirement_set(u	__class__(u,/tmp/pip-zej_zi-build/pip/commands/bundle.pyuruns		 uBundleCommand.runT(u__name__u
__module__u__qualname__u__doc__unameuusageusummaryuTrueubundleu__init__urun(u
__locals__((u	__class__u,/tmp/pip-zej_zi-build/pip/commands/bundle.pyu
BundleCommand	su
BundleCommand(utextwrapu
pip.locationsubuild_prefixu
src_prefixupip.utiludisplay_pathu
backup_dirupip.loguloggerupip.exceptionsuInstallationErrorupip.commands.installuInstallCommandu
BundleCommand(((u,/tmp/pip-zej_zi-build/pip/commands/bundle.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/freeze.cpython-33.pyc000064400000011656151733566760021571 0ustar00�
7�Re8c@s�ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZGdd�de�Z
dS(	iN(uInstallRequirement(ulogger(uCommand(uget_installed_distributions(u
pkg_resourcescsV|EeZdZdZdZdZdZ�fdd�Zdd�Zdd	�Z	�S(
u
FreezeCommandu1Output installed packages in requirements format.ufreezeu
      %prog [options]c
s�tt|�j||�|jjdddddddddd	d
d�|jjdd
dddddgddd
d�|jjddddddddd
d�|jjd|j�dS(Nu-ru
--requirementudesturequirementuactionustoreudefaultumetavarufileuhelpuVUse the order in the given requirements file and it's comments when generating output.u-fu--find-linksu
find_linksuappenduURLu<URL for finding packages, which will be added to the output.u-lu--localulocalu
store_trueuUIf in a virtualenv that has global access, do not output globally-installed packages.iF(	usuperu
FreezeCommandu__init__ucmd_optsu
add_optionuNoneuFalseuparseruinsert_option_group(uselfuargsukw(u	__class__(u,/tmp/pip-zej_zi-build/pip/commands/freeze.pyu__init__s,						uFreezeCommand.__init__cCstj�dS(N(uloggerumove_stdout_to_stderr(uself((u,/tmp/pip-zej_zi-build/pip/commands/freeze.pyu
setup_logging-suFreezeCommand.setup_loggingcCs�|j}|jpg}|j}d}d}|j}|rNtj|�}ng}	tj	}
x9t
jD].}|jd�rg|	j
|jd��qgqgWx*|D]"}d|kr�|	j|�q�q�Wx|D]}|
jd|�q�Wi}
x?td|�D].}tjj||	d|�}||
|j<q�W|rrt|�}x|D]}|j�sq|j�jd�r�|
j|�qIn|r�|j|�r�|
j|�qIn/|jd�s�|jd�r2|jd�r�|d	d�j�}n%|td�d�j�jd
�}tj|d|j�}n�|jd�s�|jd
�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�r�|
j|�qIntj|�}|jst j!d|j��t j!d�qIn|j|
kr:t j"d|j��qIn|
jt#|
|j��|
|j=qIW|
jd�nx9t$|
j%�ddd��D]}|
jt#|��q�WdS(Nudependency_links.txtu#egg=u-f %s
u
local_onlyu	find_tagsu#u-eu
--editableiu=udefault_vcsu-ru
--requirementu-Zu--always-unzipu-fu-iu--extra-index-urlu--find-linksu--index-urlu>Skipping line because it's not clear what it would install: %su9  (add #egg=PackageName to the URL to avoid this warning)u?Requirement file contains %s, but that package is not installedu:## The following requirements were added by pip --freeze:
ukeycSs|jS(N(uname(ux((u,/tmp/pip-zej_zi-build/pip/commands/freeze.pyu<lambda>qsu#FreezeCommand.run.<locals>.<lambda>F(&urequirementu
find_linksulocaluFalseuNoneuskip_requirements_regexureucompileusysustdoutu
pkg_resourcesuworking_setuhas_metadatauextenduget_metadata_linesuappenduwriteuget_installed_distributionsupipuFrozenRequirementu	from_distunameuopenustripu
startswithusearchulenulstripuInstallRequirementu
from_editableudefault_vcsu	from_lineuloggerunotifyuwarnustrusorteduvalues(uselfuoptionsuargsurequirementu
find_linksu
local_onlyu	find_tagsu
skip_matchu
skip_regexudependency_linksufudistulinku
installationsurequreq_fulineuline_requinstallation((u,/tmp/pip-zej_zi-build/pip/commands/freeze.pyurun0sv				


"

%
		
	%uFreezeCommand.run(
u__name__u
__module__u__qualname__u__doc__unameuusageusummaryu__init__u
setup_loggingurun(u
__locals__((u	__class__u,/tmp/pip-zej_zi-build/pip/commands/freeze.pyu
FreezeCommandsu
FreezeCommand(ureusysupipupip.requInstallRequirementupip.loguloggerupip.basecommanduCommandupip.utiluget_installed_distributionsupip._vendoru
pkg_resourcesu
FreezeCommand(((u,/tmp/pip-zej_zi-build/pip/commands/freeze.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/help.cpython-33.pyc000064400000002711151733566760021231 0ustar00�
7�Re�c@s@ddlmZmZddlmZGdd�de�ZdS(i(uCommanduSUCCESS(uCommandErrorcBs8|EeZdZdZdZdZdZdd�ZdS(uHelpCommanduShow help for commandsuhelpu
      %prog <command>uShow help for commands.c	Cs�ddlm}m}y|d}Wntk
r<tSYnX||kr�||�}d|g}|r||jd|�ntdj|���n||�}|jj	�tS(Ni(ucommandsuget_similar_commandsuunknown command "%s"umaybe you meant "%s"u - (
upip.commandsucommandsuget_similar_commandsu
IndexErroruSUCCESSuappenduCommandErrorujoinuparseru
print_help(	uselfuoptionsuargsucommandsuget_similar_commandsucmd_nameuguessumsgucommand((u*/tmp/pip-zej_zi-build/pip/commands/help.pyuruns
	


uHelpCommand.runN(u__name__u
__module__u__qualname__u__doc__unameuusageusummaryurun(u
__locals__((u*/tmp/pip-zej_zi-build/pip/commands/help.pyuHelpCommands
uHelpCommandN(upip.basecommanduCommanduSUCCESSupip.exceptionsuCommandErroruHelpCommand(((u*/tmp/pip-zej_zi-build/pip/commands/help.pyu<module>spython3.3/site-packages/pip/commands/__pycache__/install.cpython-33.pyc000064400000027265151733566760021762 0ustar00�
7�Re�5c@s�ddlZddlZddlZddlZddlmZmZmZddlm	Z	ddl
mZmZm
Z
mZddlmZddlmZddlmZmZmZddlmZdd	lmZGd
d�de�ZdS(iN(uInstallRequirementuRequirementSetuparse_requirements(ulogger(u
src_prefixuvirtualenv_no_globaludistutils_schemeubuild_prefix(uCommand(u
PackageFinder(uInstallationErroruCommandErroruPreviousBuildDirError(u
cmdoptions(uBuildDirectorycs\|EeZdZdZdZdZdZdZ�fdd�Z	dd�Z
d	d
�Z�S(uInstallCommanduI
    Install packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    uinstallu�
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...uInstall packages.c
shtt|�j||�|j}|jdddddddgdd	d
d�|jtjj��|jtjj��|jdd
ddddddd
d�|jddddddddddd
d�|jtj
j��|jdddddddddtd
d�|jdddddd d
d!�|jd"dd#dd d
d$�|jd%d&dd'dd d
d(�|jtjj��|jd)dd*dd d
d+�|jd,dd-dd d
d.�|jtj
j��|jtjj��|jd/dd0dd d
d1�|jd2dd3dd d
d4�|jd5dd6ddddd
d7�|jd8dd9dd:ddd
d;�|jd<dd dd=ddEd
d>�|jd?dd@dd=d
dA�|jtjj��|jtjj��|jdBdd ddFd
dC�|jtjj��tjtj|j�}|jjdD|�|jjdD|�dS(GNu-eu
--editableudestu	editablesuactionuappendudefaultumetavarupath/urluhelpukInstall a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.u-tu--targetu
target_dirudiruInstall packages into <dir>.u-du
--downloadu--download-diru--download-directoryudownload_diru`Download packages into <dir> instead of installing them, regardless of what's already installed.u--srcu--sourceu--source-diru--source-directoryusrc_diru�Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".u-Uu	--upgradeuupgradeu
store_trueu�Upgrade all packages to the newest available version. This process is recursive regardless of whether a dependency is already satisfied.u--force-reinstalluforce_reinstalluKWhen upgrading, reinstall all packages even if they are already up-to-date.u-Iu--ignore-installeduignore_installedu5Ignore the installed packages (reinstalling instead).u--no-installu
no_installuNDEPRECATED. Download and unpack all packages, but don't actually install them.u
--no-downloaduno_downloaduDEPRECATED. Don't download any packages, just install the ones already downloaded (completes an install run with --no-install).u--useru
use_user_siteuInstall using the user scheme.u--egguas_eggu�Install packages as eggs, not 'flat', like pip normally does. This option is not about installing *from* eggs. (WARNING: Because this option overrides pip's normal install logic, requirements files may not behave as expected.)u--rootu	root_pathu=Install everything relative to this alternate root directory.u--strip-file-prefixustrip_file_prefixuprefixu5Strip given prefix from script paths in wheel RECORD.u	--compileucompileuCompile py files to pycu--no-compileustore_falseuDo not compile py files to pycu--preuYInclude pre-release and development versions. By default, pip only finds stable versions.iTF(usuperuInstallCommandu__init__ucmd_optsu
add_optionu
cmdoptionsurequirementsumakeu	build_diruNoneudownload_cacheu
src_prefixuno_depsuinstall_optionsuglobal_optionsuTrueu	use_wheeluno_use_wheeluFalseuno_cleanumake_option_groupuindex_groupuparseruinsert_option_group(uselfuargsukwucmd_optsu
index_opts(u	__class__(u-/tmp/pip-zej_zi-build/pip/commands/install.pyu__init__(s�					uInstallCommand.__init__cCsRtd|jd|d|jd|jd|jd|jd|jd|jd	|�	S(
u�
        Create a package finder appropriate to this install command.
        This method is meant to be overridden by subclasses, not
        called directly.
        u
find_linksu
index_urlsu	use_wheeluallow_externaluallow_unverifieduallow_all_externaluallow_all_prereleasesuprocess_dependency_linksusession(u
PackageFinderu
find_linksu	use_wheeluallow_externaluallow_unverifieduallow_all_externalupreuprocess_dependency_links(uselfuoptionsu
index_urlsusession((u-/tmp/pip-zej_zi-build/pip/commands/install.pyu_build_package_finder�s						u$InstallCommand._build_package_finderc+Cs|js$|js$|js$|jr7tjdd�n|jrUd.|_d.|_n|jdkr�|jsv|jr�t
|_n|jr�tjj
|j�|_ntjj
|j�|_|jp�g}|jr�t�r�td��n|jd�nd}|jr�d.|_tj�}tjj
|j�|_tjj|j�rttjj|j�rttd��n|jd|�n|jp�g}|jg|j}|jr�tjddj|��g}n|j r�tjdd	�n|j!rtjdd
�||j!7}n|j"|�}|j#|||�}|jpN|j}	t$|jd|	��}
t%d|
d
|jd|jd|j&d|j'd|j(d|jd|j)d|j*d|jd|d|d|j+�
}x'|D]}|j,t-j.|d��q�Wx0|j/D]%}|j,t-j0|d|j1��qWxG|j2D]<}
x3t3|
d|d|d|�D]}|j,|�qkWqFW|j4s�i|j5d6}|j6r�dt7|ddj|j6��}n
d |}tj8|�dSzEy |js|j9|d!|j:d"|j:�n
|j;�|jr�|j:r�|j<||d#|j=d$|j>�djd%d&�|j?D��}|r
tjd'|�q
nu|j:s�djd(d&�|j@D��}|r
tjd)|�q
n0|j:r
|jA|jB�tjd*|jB�nWntCk
r+d.|_�YnXWd|jrc|jsM|jrc|jDd"|j:�nXWdQX|jrtjj|j�s�tjE|j�ntFd+d,|�d-}xHtjG|�D]7}tHjItjj||�tjj|j|��q�WtHjJ|�n|S(/Nu1.7u~DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated.  See https://github.com/pypa/pip/issues/906.uZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.u--useru=Target path exists but is not a directory, will not continue.u--home=uIgnoring indexes: %su,u�--use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.u�--mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.udeleteu	build_dirusrc_dirudownload_dirudownload_cacheuupgradeuas_egguignore_installeduignore_dependenciesuforce_reinstallu
use_user_siteu
target_dirusessionu	pycompileudefault_vcsufinderuoptionsunameu^You must give at least one requirement to %(name)s (maybe you meant "pip %(name)s %(links)s"?)ulinksu uLYou must give at least one requirement to %(name)s (see "pip help %(name)s")uforce_root_egg_infoubundleurootustrip_file_prefixcSsg|]}|j�qS((uname(u.0ureq((u-/tmp/pip-zej_zi-build/pip/commands/install.pyu
<listcomp>4s	u&InstallCommand.run.<locals>.<listcomp>uSuccessfully installed %scSsg|]}|j�qS((uname(u.0ureq((u-/tmp/pip-zej_zi-build/pip/commands/install.pyu
<listcomp>9s	uSuccessfully downloaded %suCreated bundle in %suuhomeupurelibT(Ku
no_installuno_downloadu	build_diruno_cleanuloggeru
deprecatedudownload_diruTrueuignore_installeduNoneubuild_prefixuosupathuabspathusrc_diruinstall_optionsu
use_user_siteuvirtualenv_no_globaluInstallationErroruappendu
target_dirutempfileumkdtempuexistsuisdiruCommandErroruglobal_optionsu	index_urluextra_index_urlsuno_indexunotifyujoinuuse_mirrorsumirrorsu_build_sessionu_build_package_finderuBuildDirectoryuRequirementSetudownload_cacheuupgradeuas_egguignore_dependenciesuforce_reinstallucompileuadd_requirementuInstallRequirementu	from_lineu	editablesu
from_editableudefault_vcsurequirementsuparse_requirementsuhas_requirementsunameu
find_linksudictuwarnu
prepare_filesubundleulocate_filesuinstallu	root_pathustrip_file_prefixusuccessfully_installedusuccessfully_downloadedu
create_bundleubundle_filenameuPreviousBuildDirErroru
cleanup_filesumakedirsudistutils_schemeulistdirushutilumoveurmtree(uselfuoptionsuargsuinstall_optionsutemp_target_diruglobal_optionsu
index_urlsusessionufinderubuild_deleteu	build_dirurequirement_setunameufilenameurequoptsumsgu	installedu
downloadedulib_diruitem((u-/tmp/pip-zej_zi-build/pip/commands/install.pyurun�s�											+				
											
%		"
	"
	
		
		uInstallCommand.runF(u__name__u
__module__u__qualname__u__doc__unameuusageusummaryuFalseubundleu__init__u_build_package_finderurun(u
__locals__((u	__class__u-/tmp/pip-zej_zi-build/pip/commands/install.pyuInstallCommands�uInstallCommand(uosusysutempfileushutilupip.requInstallRequirementuRequirementSetuparse_requirementsupip.loguloggeru
pip.locationsu
src_prefixuvirtualenv_no_globaludistutils_schemeubuild_prefixupip.basecommanduCommandu	pip.indexu
PackageFinderupip.exceptionsuInstallationErroruCommandErroruPreviousBuildDirErrorupipu
cmdoptionsupip.utiluBuildDirectoryuInstallCommand(((u-/tmp/pip-zej_zi-build/pip/commands/install.pyu<module>s"python3.3/site-packages/pip/commands/__pycache__/search.cpython-33.pyc000064400000015226151733566760021553 0ustar00�
7�Re�c@sddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZm
Z
mZddlmZddlmZddlmZdd	lmZmZGd
d�de�Zdd
�Zdddd�Zdd�Zdd�ZdS(iN(uCommanduSUCCESS(uget_terminal_size(ulogger(u	xmlrpclibureduceucmp(uCommandError(uNO_MATCHES_FOUND(u
pkg_resources(u
StrictVersionuLooseVersioncsV|EeZdZdZdZdZdZ�fdd�Zdd�Zd	d
�Z	�S(u
SearchCommandu@Search for PyPI packages whose name or summary contains <query>.usearchu
      %prog [options] <query>uSearch PyPI for packages.c
s[tt|�j||�|jjddddddddd	�|jjd
|j�dS(Nu--indexudestuindexumetavaruURLudefaultuhttps://pypi.python.org/pypiuhelpu3Base URL of Python Package Index (default %default)i(usuperu
SearchCommandu__init__ucmd_optsu
add_optionuparseruinsert_option_group(uselfuargsukw(u	__class__(u,/tmp/pip-zej_zi-build/pip/commands/search.pyu__init__s	uSearchCommand.__init__cCs�|std��n|}|j}|j||�}t|�}d}tjj�rgt�d}nt	|d|�|r�t
StS(Nu)Missing required argument (search query).iuterminal_width(uCommandErroruindexusearchutransform_hitsuNoneusysustdoutuisattyuget_terminal_sizeu
print_resultsuSUCCESSuNO_MATCHES_FOUND(uselfuoptionsuargsuqueryu	index_urlu	pypi_hitsuhitsuterminal_width((u,/tmp/pip-zej_zi-build/pip/commands/search.pyurun"s	uSearchCommand.runcCs3tj|�}|ji|d6|d6d�}|S(Nunameusummaryuor(u	xmlrpclibuServerProxyusearch(uselfuqueryu	index_urlupypiuhits((u,/tmp/pip-zej_zi-build/pip/commands/search.pyusearch4s uSearchCommand.search(
u__name__u
__module__u__qualname__u__doc__unameuusageusummaryu__init__urunusearch(u
__locals__((u	__class__u,/tmp/pip-zej_zi-build/pip/commands/search.pyu
SearchCommandsu
SearchCommandcCsi}x�|D]�}|d}|d}|d}|d}|dkrPd}n||j�kr�i|d6|d6|gd6|d6||<q
||dj|�|t||d�kr
|||d<|||d<q
q
Wt|j�dd	d
�dd
�}|S(u�
    The list from pypi is really a list of versions. We want a list of
    packages with the list of versions stored inline. This converts the
    list from pypi into one we can use.
    unameusummaryuversionu_pypi_orderingiuversionsuscoreukeycSs|dS(Nuscore((ux((u,/tmp/pip-zej_zi-build/pip/commands/search.pyu<lambda>Tsu transform_hits.<locals>.<lambda>ureverseNT(uNoneukeysuappenduhighest_versionusorteduvaluesuTrue(uhitsupackagesuhitunameusummaryuversionuscoreupackage_list((u,/tmp/pip-zej_zi-build/pip/commands/search.pyutransform_hits:s 




	,$utransform_hitsic
Csgdd�tjD�}xJ|D]B}|d}|dp:d}|dk	r�tj|||d�}dd|d	j|�}nd
|j|�|f}y�tj|�||krItj	|�}tj
d7_
z_t|d�}	|j|	kr
tjd
|j�n%tjd|j�tjd|	�Wdtj
d8_
XnWqt
k
r^YqXqWdS(NcSsg|]}|j�qS((uproject_name(u.0up((u,/tmp/pip-zej_zi-build/pip/commands/search.pyu
<listcomp>Ys	u!print_results.<locals>.<listcomp>unameusummaryuiu
u iu%s - %siuversionsuINSTALLED: %s (latest)u
INSTALLED: %su
LATEST:    %s(u
pkg_resourcesuworking_setuNoneutextwrapuwrapujoinuljustuloggerunotifyuget_distributionuindentuhighest_versionuversionuUnicodeEncodeError(
uhitsuname_column_widthuterminal_widthuinstalled_packagesuhitunameusummaryulineudistulatest((u,/tmp/pip-zej_zi-build/pip/commands/search.pyu
print_resultsXs,



u
print_resultscCs�ytt|�t|��SWntk
r1YnXytt|�t|��SWnKtk
r�tdd�t|�jD�dd�t|�jD��SYnXdS(NcSsg|]}t|��qS((ustr(u.0uv((u,/tmp/pip-zej_zi-build/pip/commands/search.pyu
<listcomp>s	u$compare_versions.<locals>.<listcomp>cSsg|]}t|��qS((ustr(u.0uv((u,/tmp/pip-zej_zi-build/pip/commands/search.pyu
<listcomp>�s	(ucmpu
StrictVersionu
ValueErroruLooseVersionu	TypeErroruversion(uversion1uversion2((u,/tmp/pip-zej_zi-build/pip/commands/search.pyucompare_versionsts

ucompare_versionscCstdd�|�S(NcSst||�dkr|p|S(Ni(ucompare_versions(uv1uv2((u,/tmp/pip-zej_zi-build/pip/commands/search.pyu<lambda>�su!highest_version.<locals>.<lambda>(ureduce(uversions((u,/tmp/pip-zej_zi-build/pip/commands/search.pyuhighest_version�suhighest_version(usysutextwrapupip.downloadupipupip.basecommanduCommanduSUCCESSupip.utiluget_terminal_sizeupip.loguloggerupip.backwardcompatu	xmlrpclibureduceucmpupip.exceptionsuCommandErrorupip.status_codesuNO_MATCHES_FOUNDupip._vendoru
pkg_resourcesudistutils.versionu
StrictVersionuLooseVersionu
SearchCommandutransform_hitsuNoneu
print_resultsucompare_versionsuhighest_version(((u,/tmp/pip-zej_zi-build/pip/commands/search.pyu<module>s*python3.3/site-packages/pip/commands/completion.py000064400000003456151733566760016200 0ustar00import sys
from pip.basecommand import Command

BASE_COMPLETION = """
# pip %(shell)s completion start%(script)s# pip %(shell)s completion end
"""

COMPLETION_SCRIPTS = {
    'bash': """
_pip_completion()
{
    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\
                   COMP_CWORD=$COMP_CWORD \\
                   PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
""", 'zsh': """
function _pip_completion {
  local words cword
  read -Ac words
  read -cn cword
  reply=( $( COMP_WORDS="$words[*]" \\
             COMP_CWORD=$(( cword-1 )) \\
             PIP_AUTO_COMPLETE=1 $words[1] ) )
}
compctl -K _pip_completion pip
"""}


class CompletionCommand(Command):
    """A helper command to be used for command completion."""
    name = 'completion'
    summary = 'A helper command to be used for command completion'
    hidden = True

    def __init__(self, *args, **kw):
        super(CompletionCommand, self).__init__(*args, **kw)
        self.parser.add_option(
            '--bash', '-b',
            action='store_const',
            const='bash',
            dest='shell',
            help='Emit completion code for bash')
        self.parser.add_option(
            '--zsh', '-z',
            action='store_const',
            const='zsh',
            dest='shell',
            help='Emit completion code for zsh')

    def run(self, options, args):
        """Prints the completion code of the given shell"""
        shells = COMPLETION_SCRIPTS.keys()
        shell_options = ['--' + shell for shell in sorted(shells)]
        if options.shell in shells:
            script = COMPLETION_SCRIPTS.get(options.shell, '')
            print(BASE_COMPLETION % {'script': script, 'shell': options.shell})
        else:
            sys.stderr.write('ERROR: You must pass %s\n' % ' or '.join(shell_options))
python3.3/site-packages/pip/commands/zip.py000064400000034745151733566760014636 0ustar00import sys
import re
import fnmatch
import os
import shutil
import zipfile
from pip.util import display_path, backup_dir, rmtree
from pip.log import logger
from pip.exceptions import InstallationError
from pip.basecommand import Command


class ZipCommand(Command):
    """Zip individual packages."""
    name = 'zip'
    usage = """
     %prog [options] <package> ..."""
    summary = 'DEPRECATED. Zip individual packages.'

    def __init__(self, *args, **kw):
        super(ZipCommand, self).__init__(*args, **kw)
        if self.name == 'zip':
            self.cmd_opts.add_option(
                '--unzip',
                action='store_true',
                dest='unzip',
                help='Unzip (rather than zip) a package.')
        else:
            self.cmd_opts.add_option(
                '--zip',
                action='store_false',
                dest='unzip',
                default=True,
                help='Zip (rather than unzip) a package.')
        self.cmd_opts.add_option(
            '--no-pyc',
            action='store_true',
            dest='no_pyc',
            help='Do not include .pyc files in zip files (useful on Google App Engine).')
        self.cmd_opts.add_option(
            '-l', '--list',
            action='store_true',
            dest='list',
            help='List the packages available, and their zip status.')
        self.cmd_opts.add_option(
            '--sort-files',
            action='store_true',
            dest='sort_files',
            help='With --list, sort packages according to how many files they contain.')
        self.cmd_opts.add_option(
            '--path',
            action='append',
            dest='paths',
            help='Restrict operations to the given paths (may include wildcards).')
        self.cmd_opts.add_option(
            '-n', '--simulate',
            action='store_true',
            help='Do not actually perform the zip/unzip operation.')

        self.parser.insert_option_group(0, self.cmd_opts)

    def paths(self):
        """All the entries of sys.path, possibly restricted by --path"""
        if not self.select_paths:
            return sys.path
        result = []
        match_any = set()
        for path in sys.path:
            path = os.path.normcase(os.path.abspath(path))
            for match in self.select_paths:
                match = os.path.normcase(os.path.abspath(match))
                if '*' in match:
                    if re.search(fnmatch.translate(match + '*'), path):
                        result.append(path)
                        match_any.add(match)
                        break
                else:
                    if path.startswith(match):
                        result.append(path)
                        match_any.add(match)
                        break
            else:
                logger.debug("Skipping path %s because it doesn't match %s"
                             % (path, ', '.join(self.select_paths)))
        for match in self.select_paths:
            if match not in match_any and '*' not in match:
                result.append(match)
                logger.debug("Adding path %s because it doesn't match "
                             "anything already on sys.path" % match)
        return result

    def run(self, options, args):

        logger.deprecated('1.7', "DEPRECATION: 'pip zip' and 'pip unzip` are deprecated, and will be removed in a future release.")

        self.select_paths = options.paths
        self.simulate = options.simulate
        if options.list:
            return self.list(options, args)
        if not args:
            raise InstallationError(
                'You must give at least one package to zip or unzip')
        packages = []
        for arg in args:
            module_name, filename = self.find_package(arg)
            if options.unzip and os.path.isdir(filename):
                raise InstallationError(
                    'The module %s (in %s) is not a zip file; cannot be unzipped'
                    % (module_name, filename))
            elif not options.unzip and not os.path.isdir(filename):
                raise InstallationError(
                    'The module %s (in %s) is not a directory; cannot be zipped'
                    % (module_name, filename))
            packages.append((module_name, filename))
        last_status = None
        for module_name, filename in packages:
            if options.unzip:
                last_status = self.unzip_package(module_name, filename)
            else:
                last_status = self.zip_package(module_name, filename, options.no_pyc)
        return last_status

    def unzip_package(self, module_name, filename):
        zip_filename = os.path.dirname(filename)
        if not os.path.isfile(zip_filename) and zipfile.is_zipfile(zip_filename):
            raise InstallationError(
                'Module %s (in %s) isn\'t located in a zip file in %s'
                % (module_name, filename, zip_filename))
        package_path = os.path.dirname(zip_filename)
        if not package_path in self.paths():
            logger.warn(
                'Unpacking %s into %s, but %s is not on sys.path'
                % (display_path(zip_filename), display_path(package_path),
                   display_path(package_path)))
        logger.notify('Unzipping %s (in %s)' % (module_name, display_path(zip_filename)))
        if self.simulate:
            logger.notify('Skipping remaining operations because of --simulate')
            return
        logger.indent += 2
        try:
            ## FIXME: this should be undoable:
            zip = zipfile.ZipFile(zip_filename)
            to_save = []
            for info in zip.infolist():
                name = info.filename
                if name.startswith(module_name + os.path.sep):
                    content = zip.read(name)
                    dest = os.path.join(package_path, name)
                    if not os.path.exists(os.path.dirname(dest)):
                        os.makedirs(os.path.dirname(dest))
                    if not content and dest.endswith(os.path.sep):
                        if not os.path.exists(dest):
                            os.makedirs(dest)
                    else:
                        f = open(dest, 'wb')
                        f.write(content)
                        f.close()
                else:
                    to_save.append((name, zip.read(name)))
            zip.close()
            if not to_save:
                logger.info('Removing now-empty zip file %s' % display_path(zip_filename))
                os.unlink(zip_filename)
                self.remove_filename_from_pth(zip_filename)
            else:
                logger.info('Removing entries in %s/ from zip file %s' % (module_name, display_path(zip_filename)))
                zip = zipfile.ZipFile(zip_filename, 'w')
                for name, content in to_save:
                    zip.writestr(name, content)
                zip.close()
        finally:
            logger.indent -= 2

    def zip_package(self, module_name, filename, no_pyc):
        orig_filename = filename
        logger.notify('Zip %s (in %s)' % (module_name, display_path(filename)))
        logger.indent += 2
        if filename.endswith('.egg'):
            dest_filename = filename
        else:
            dest_filename = filename + '.zip'
        try:
            ## FIXME: I think this needs to be undoable:
            if filename == dest_filename:
                filename = backup_dir(orig_filename)
                logger.notify('Moving %s aside to %s' % (orig_filename, filename))
                if not self.simulate:
                    shutil.move(orig_filename, filename)
            try:
                logger.info('Creating zip file in %s' % display_path(dest_filename))
                if not self.simulate:
                    zip = zipfile.ZipFile(dest_filename, 'w')
                    zip.writestr(module_name + '/', '')
                    for dirpath, dirnames, filenames in os.walk(filename):
                        if no_pyc:
                            filenames = [f for f in filenames
                                         if not f.lower().endswith('.pyc')]
                        for fns, is_dir in [(dirnames, True), (filenames, False)]:
                            for fn in fns:
                                full = os.path.join(dirpath, fn)
                                dest = os.path.join(module_name, dirpath[len(filename):].lstrip(os.path.sep), fn)
                                if is_dir:
                                    zip.writestr(dest + '/', '')
                                else:
                                    zip.write(full, dest)
                    zip.close()
                logger.info('Removing old directory %s' % display_path(filename))
                if not self.simulate:
                    rmtree(filename)
            except:
                ## FIXME: need to do an undo here
                raise
            ## FIXME: should also be undone:
            self.add_filename_to_pth(dest_filename)
        finally:
            logger.indent -= 2

    def remove_filename_from_pth(self, filename):
        for pth in self.pth_files():
            f = open(pth, 'r')
            lines = f.readlines()
            f.close()
            new_lines = [
                l for l in lines if l.strip() != filename]
            if lines != new_lines:
                logger.info('Removing reference to %s from .pth file %s'
                            % (display_path(filename), display_path(pth)))
                if not [line for line in new_lines if line]:
                    logger.info('%s file would be empty: deleting' % display_path(pth))
                    if not self.simulate:
                        os.unlink(pth)
                else:
                    if not self.simulate:
                        f = open(pth, 'wb')
                        f.writelines(new_lines)
                        f.close()
                return
        logger.warn('Cannot find a reference to %s in any .pth file' % display_path(filename))

    def add_filename_to_pth(self, filename):
        path = os.path.dirname(filename)
        dest = filename + '.pth'
        if path not in self.paths():
            logger.warn('Adding .pth file %s, but it is not on sys.path' % display_path(dest))
        if not self.simulate:
            if os.path.exists(dest):
                f = open(dest)
                lines = f.readlines()
                f.close()
                if lines and not lines[-1].endswith('\n'):
                    lines[-1] += '\n'
                lines.append(filename + '\n')
            else:
                lines = [filename + '\n']
            f = open(dest, 'wb')
            f.writelines(lines)
            f.close()

    def pth_files(self):
        for path in self.paths():
            if not os.path.exists(path) or not os.path.isdir(path):
                continue
            for filename in os.listdir(path):
                if filename.endswith('.pth'):
                    yield os.path.join(path, filename)

    def find_package(self, package):
        for path in self.paths():
            full = os.path.join(path, package)
            if os.path.exists(full):
                return package, full
            if not os.path.isdir(path) and zipfile.is_zipfile(path):
                zip = zipfile.ZipFile(path, 'r')
                try:
                    zip.read(os.path.join(package, '__init__.py'))
                except KeyError:
                    pass
                else:
                    zip.close()
                    return package, full
                zip.close()
        ## FIXME: need special error for package.py case:
        raise InstallationError(
            'No package with the name %s found' % package)

    def list(self, options, args):
        if args:
            raise InstallationError(
                'You cannot give an argument with --list')
        for path in sorted(self.paths()):
            if not os.path.exists(path):
                continue
            basename = os.path.basename(path.rstrip(os.path.sep))
            if os.path.isfile(path) and zipfile.is_zipfile(path):
                if os.path.dirname(path) not in self.paths():
                    logger.notify('Zipped egg: %s' % display_path(path))
                continue
            if (basename != 'site-packages' and basename != 'dist-packages'
                and not path.replace('\\', '/').endswith('lib/python')):
                continue
            logger.notify('In %s:' % display_path(path))
            logger.indent += 2
            zipped = []
            unzipped = []
            try:
                for filename in sorted(os.listdir(path)):
                    ext = os.path.splitext(filename)[1].lower()
                    if ext in ('.pth', '.egg-info', '.egg-link'):
                        continue
                    if ext == '.py':
                        logger.info('Not displaying %s: not a package' % display_path(filename))
                        continue
                    full = os.path.join(path, filename)
                    if os.path.isdir(full):
                        unzipped.append((filename, self.count_package(full)))
                    elif zipfile.is_zipfile(full):
                        zipped.append(filename)
                    else:
                        logger.info('Unknown file: %s' % display_path(filename))
                if zipped:
                    logger.notify('Zipped packages:')
                    logger.indent += 2
                    try:
                        for filename in zipped:
                            logger.notify(filename)
                    finally:
                        logger.indent -= 2
                else:
                    logger.notify('No zipped packages.')
                if unzipped:
                    if options.sort_files:
                        unzipped.sort(key=lambda x: -x[1])
                    logger.notify('Unzipped packages:')
                    logger.indent += 2
                    try:
                        for filename, count in unzipped:
                            logger.notify('%s  (%i files)' % (filename, count))
                    finally:
                        logger.indent -= 2
                else:
                    logger.notify('No unzipped packages.')
            finally:
                logger.indent -= 2

    def count_package(self, path):
        total = 0
        for dirpath, dirnames, filenames in os.walk(path):
            filenames = [f for f in filenames
                         if not f.lower().endswith('.pyc')]
            total += len(filenames)
        return total
python3.3/site-packages/pip/commands/freeze.py000064400000011070151733566760015276 0ustar00import re
import sys
import pip

from pip.req import InstallRequirement
from pip.log import logger
from pip.basecommand import Command
from pip.util import get_installed_distributions
from pip._vendor import pkg_resources


class FreezeCommand(Command):
    """Output installed packages in requirements format."""
    name = 'freeze'
    usage = """
      %prog [options]"""
    summary = 'Output installed packages in requirements format.'

    def __init__(self, *args, **kw):
        super(FreezeCommand, self).__init__(*args, **kw)

        self.cmd_opts.add_option(
            '-r', '--requirement',
            dest='requirement',
            action='store',
            default=None,
            metavar='file',
            help="Use the order in the given requirements file and it's comments when generating output.")
        self.cmd_opts.add_option(
            '-f', '--find-links',
            dest='find_links',
            action='append',
            default=[],
            metavar='URL',
            help='URL for finding packages, which will be added to the output.')
        self.cmd_opts.add_option(
            '-l', '--local',
            dest='local',
            action='store_true',
            default=False,
            help='If in a virtualenv that has global access, do not output globally-installed packages.')

        self.parser.insert_option_group(0, self.cmd_opts)

    def setup_logging(self):
        logger.move_stdout_to_stderr()

    def run(self, options, args):
        requirement = options.requirement
        find_links = options.find_links or []
        local_only = options.local
        ## FIXME: Obviously this should be settable:
        find_tags = False
        skip_match = None

        skip_regex = options.skip_requirements_regex
        if skip_regex:
            skip_match = re.compile(skip_regex)

        dependency_links = []

        f = sys.stdout

        for dist in pkg_resources.working_set:
            if dist.has_metadata('dependency_links.txt'):
                dependency_links.extend(dist.get_metadata_lines('dependency_links.txt'))
        for link in find_links:
            if '#egg=' in link:
                dependency_links.append(link)
        for link in find_links:
            f.write('-f %s\n' % link)
        installations = {}
        for dist in get_installed_distributions(local_only=local_only):
            req = pip.FrozenRequirement.from_dist(dist, dependency_links, find_tags=find_tags)
            installations[req.name] = req
        if requirement:
            req_f = open(requirement)
            for line in req_f:
                if not line.strip() or line.strip().startswith('#'):
                    f.write(line)
                    continue
                if skip_match and skip_match.search(line):
                    f.write(line)
                    continue
                elif line.startswith('-e') or line.startswith('--editable'):
                    if line.startswith('-e'):
                        line = line[2:].strip()
                    else:
                        line = line[len('--editable'):].strip().lstrip('=')
                    line_req = InstallRequirement.from_editable(line, default_vcs=options.default_vcs)
                elif (line.startswith('-r') or line.startswith('--requirement')
                      or line.startswith('-Z') or line.startswith('--always-unzip')
                      or line.startswith('-f') or line.startswith('-i')
                      or line.startswith('--extra-index-url')
                      or line.startswith('--find-links')
                      or line.startswith('--index-url')):
                    f.write(line)
                    continue
                else:
                    line_req = InstallRequirement.from_line(line)
                if not line_req.name:
                    logger.notify("Skipping line because it's not clear what it would install: %s"
                                  % line.strip())
                    logger.notify("  (add #egg=PackageName to the URL to avoid this warning)")
                    continue
                if line_req.name not in installations:
                    logger.warn("Requirement file contains %s, but that package is not installed"
                                % line.strip())
                    continue
                f.write(str(installations[line_req.name]))
                del installations[line_req.name]
            f.write('## The following requirements were added by pip --freeze:\n')
        for installation in sorted(installations.values(), key=lambda x: x.name):
            f.write(str(installation))
python3.3/site-packages/pip/commands/wheel.py000064400000017042151733566760015127 0ustar00# -*- coding: utf-8 -*-
from __future__ import absolute_import

import os
import sys
from pip.basecommand import Command
from pip.index import PackageFinder
from pip.log import logger
from pip.exceptions import CommandError, PreviousBuildDirError
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.util import BuildDirectory, normalize_path
from pip.wheel import WheelBuilder
from pip import cmdoptions

DEFAULT_WHEEL_DIR = os.path.join(normalize_path(os.curdir), 'wheelhouse')

class WheelCommand(Command):
    """
    Build Wheel archives for your requirements and dependencies.

    Wheel is a built-package format, and offers the advantage of not recompiling your software during every install.
    For more details, see the wheel docs: http://wheel.readthedocs.org/en/latest.

    Requirements: setuptools>=0.8, and wheel.

    'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels.

    """

    name = 'wheel'
    usage = """
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] <vcs project url> ...
      %prog [options] <local project path> ...
      %prog [options] <archive url/path> ..."""

    summary = 'Build wheels from your requirements.'

    def __init__(self, *args, **kw):
        super(WheelCommand, self).__init__(*args, **kw)

        cmd_opts = self.cmd_opts

        cmd_opts.add_option(
            '-w', '--wheel-dir',
            dest='wheel_dir',
            metavar='dir',
            default=DEFAULT_WHEEL_DIR,
            help="Build wheels into <dir>, where the default is '<cwd>/wheelhouse'.")
        cmd_opts.add_option(cmdoptions.use_wheel.make())
        cmd_opts.add_option(cmdoptions.no_use_wheel.make())
        cmd_opts.add_option(
            '--build-option',
            dest='build_options',
            metavar='options',
            action='append',
            help="Extra arguments to be supplied to 'setup.py bdist_wheel'.")
        cmd_opts.add_option(cmdoptions.requirements.make())
        cmd_opts.add_option(cmdoptions.download_cache.make())
        cmd_opts.add_option(cmdoptions.no_deps.make())
        cmd_opts.add_option(cmdoptions.build_dir.make())

        cmd_opts.add_option(
            '--global-option',
            dest='global_options',
            action='append',
            metavar='options',
            help="Extra global options to be supplied to the setup.py "
            "call before the 'bdist_wheel' command.")

        cmd_opts.add_option(
            '--pre',
            action='store_true',
            default=False,
            help="Include pre-release and development versions. By default, pip only finds stable versions.")

        cmd_opts.add_option(cmdoptions.no_clean.make())

        index_opts = cmdoptions.make_option_group(cmdoptions.index_group, self.parser)

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, cmd_opts)

    def run(self, options, args):

        # confirm requirements
        try:
            import wheel.bdist_wheel
        except ImportError:
            raise CommandError("'pip wheel' requires the 'wheel' package. To fix this, run:  pip install wheel")

        try:
            import pkg_resources
        except ImportError:
            raise CommandError(
                "'pip wheel' requires setuptools >= 0.8 for dist-info support."
                " To fix this, run: pip install --upgrade setuptools"
            )
        else:
            if not hasattr(pkg_resources, 'DistInfoDistribution'):
                raise CommandError(
                    "'pip wheel' requires setuptools >= 0.8 for dist-info "
                    "support. To fix this, run: pip install --upgrade "
                    "setuptools"
                )

        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index:
            logger.notify('Ignoring indexes: %s' % ','.join(index_urls))
            index_urls = []

        if options.use_mirrors:
            logger.deprecated("1.7",
                        "--use-mirrors has been deprecated and will be removed"
                        " in the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")

        if options.mirrors:
            logger.deprecated("1.7",
                        "--mirrors has been deprecated and will be removed in "
                        " the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")
            index_urls += options.mirrors

        if options.build_dir:
            options.build_dir = os.path.abspath(options.build_dir)

        session = self._build_session(options)

        finder = PackageFinder(find_links=options.find_links,
                               index_urls=index_urls,
                               use_wheel=options.use_wheel,
                               allow_external=options.allow_external,
                               allow_unverified=options.allow_unverified,
                               allow_all_external=options.allow_all_external,
                               allow_all_prereleases=options.pre,
                               process_dependency_links=
                                options.process_dependency_links,
                               session=session,
                            )

        build_delete = (not (options.no_clean or options.build_dir))
        with BuildDirectory(options.build_dir, delete=build_delete) as build_dir:
            requirement_set = RequirementSet(
                build_dir=build_dir,
                src_dir=None,
                download_dir=None,
                download_cache=options.download_cache,
                ignore_dependencies=options.ignore_dependencies,
                ignore_installed=True,
                session=session,
                wheel_download_dir=options.wheel_dir
            )

            # make the wheelhouse
            if not os.path.exists(options.wheel_dir):
                os.makedirs(options.wheel_dir)

            #parse args and/or requirements files
            for name in args:
                requirement_set.add_requirement(
                    InstallRequirement.from_line(name, None))

            for filename in options.requirements:
                for req in parse_requirements(
                    filename,
                    finder=finder,
                    options=options,
                    session=session):
                    if req.editable:
                        logger.notify("ignoring %s" % req.url)
                        continue
                    requirement_set.add_requirement(req)

            #fail if no requirements
            if not requirement_set.has_requirements:
                opts = {'name': self.name}
                msg = ('You must give at least one requirement '
                       'to %(name)s (see "pip help %(name)s")' % opts)
                logger.error(msg)
                return

            try:
                #build wheels
                wb = WheelBuilder(
                    requirement_set,
                    finder,
                    options.wheel_dir,
                    build_options = options.build_options or [],
                    global_options = options.global_options or []
                    )
                wb.build()
            except PreviousBuildDirError:
                options.no_clean = True
                raise
            finally:
                if not options.no_clean:
                    requirement_set.cleanup_files()
python3.3/site-packages/pip/commands/__init__.py000064400000004274151733566760015565 0ustar00"""
Package containing all pip commands
"""


from pip.commands.bundle import BundleCommand
from pip.commands.completion import CompletionCommand
from pip.commands.freeze import FreezeCommand
from pip.commands.help import HelpCommand
from pip.commands.list import ListCommand
from pip.commands.search import SearchCommand
from pip.commands.show import ShowCommand
from pip.commands.install import InstallCommand
from pip.commands.uninstall import UninstallCommand
from pip.commands.unzip import UnzipCommand
from pip.commands.zip import ZipCommand
from pip.commands.wheel import WheelCommand


commands = {
    BundleCommand.name: BundleCommand,
    CompletionCommand.name: CompletionCommand,
    FreezeCommand.name: FreezeCommand,
    HelpCommand.name: HelpCommand,
    SearchCommand.name: SearchCommand,
    ShowCommand.name: ShowCommand,
    InstallCommand.name: InstallCommand,
    UninstallCommand.name: UninstallCommand,
    UnzipCommand.name: UnzipCommand,
    ZipCommand.name: ZipCommand,
    ListCommand.name: ListCommand,
    WheelCommand.name: WheelCommand,
}


commands_order = [
    InstallCommand,
    UninstallCommand,
    FreezeCommand,
    ListCommand,
    ShowCommand,
    SearchCommand,
    WheelCommand,
    ZipCommand,
    UnzipCommand,
    BundleCommand,
    HelpCommand,
]


def get_summaries(ignore_hidden=True, ordered=True):
    """Yields sorted (command name, command summary) tuples."""

    if ordered:
        cmditems = _sort_commands(commands, commands_order)
    else:
        cmditems = commands.items()

    for name, command_class in cmditems:
        if ignore_hidden and command_class.hidden:
            continue

        yield (name, command_class.summary)


def get_similar_commands(name):
    """Command name auto-correct."""
    from difflib import get_close_matches

    close_commands = get_close_matches(name, commands.keys())

    if close_commands:
        guess = close_commands[0]
    else:
        guess = False

    return guess


def _sort_commands(cmddict, order):
    def keyfn(key):
        try:
            return order.index(key[1])
        except ValueError:
            # unordered items should come last
            return 0xff

    return sorted(cmddict.items(), key=keyfn)
python3.3/site-packages/pip/commands/show.py000064400000005317151733566760015005 0ustar00import os

from pip.basecommand import Command
from pip.log import logger
from pip._vendor import pkg_resources


class ShowCommand(Command):
    """Show information about one or more installed packages."""
    name = 'show'
    usage = """
      %prog [options] <package> ..."""
    summary = 'Show information about installed packages.'

    def __init__(self, *args, **kw):
        super(ShowCommand, self).__init__(*args, **kw)
        self.cmd_opts.add_option(
            '-f', '--files',
            dest='files',
            action='store_true',
            default=False,
            help='Show the full list of installed files for each package.')

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options, args):
        if not args:
            logger.warn('ERROR: Please provide a package name or names.')
            return
        query = args

        results = search_packages_info(query)
        print_results(results, options.files)


def search_packages_info(query):
    """
    Gather details from installed distributions. Print distribution name,
    version, location, and installed files. Installed files requires a
    pip generated 'installed-files.txt' in the distributions '.egg-info'
    directory.
    """
    installed_packages = dict(
        [(p.project_name.lower(), p) for p in pkg_resources.working_set])
    for name in query:
        normalized_name = name.lower()
        if normalized_name in installed_packages:
            dist = installed_packages[normalized_name]
            package = {
                'name': dist.project_name,
                'version': dist.version,
                'location': dist.location,
                'requires': [dep.project_name for dep in dist.requires()],
            }
            filelist = os.path.join(
                       dist.location,
                       dist.egg_name() + '.egg-info',
                       'installed-files.txt')
            if os.path.isfile(filelist):
                package['files'] = filelist
            yield package


def print_results(distributions, list_all_files):
    """
    Print the informations from installed distributions found.
    """
    for dist in distributions:
        logger.notify("---")
        logger.notify("Name: %s" % dist['name'])
        logger.notify("Version: %s" % dist['version'])
        logger.notify("Location: %s" % dist['location'])
        logger.notify("Requires: %s" % ', '.join(dist['requires']))
        if list_all_files:
            logger.notify("Files:")
            if 'files' in dist:
                for line in open(dist['files']):
                    logger.notify("  %s" % line.strip())
            else:
                logger.notify("Cannot locate installed-files.txt")
python3.3/site-packages/pip/commands/uninstall.py000064400000004233151733566760016032 0ustar00from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.basecommand import Command
from pip.exceptions import InstallationError


class UninstallCommand(Command):
    """
    Uninstall packages.

    pip is able to uninstall most installed packages. Known exceptions are:

    - Pure distutils packages installed with ``python setup.py install``, which
      leave behind no metadata to determine what files were installed.
    - Script wrappers installed by ``python setup.py develop``.
    """
    name = 'uninstall'
    usage = """
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ..."""
    summary = 'Uninstall packages.'

    def __init__(self, *args, **kw):
        super(UninstallCommand, self).__init__(*args, **kw)
        self.cmd_opts.add_option(
            '-r', '--requirement',
            dest='requirements',
            action='append',
            default=[],
            metavar='file',
            help='Uninstall all the packages listed in the given requirements file.  '
            'This option can be used multiple times.')
        self.cmd_opts.add_option(
            '-y', '--yes',
            dest='yes',
            action='store_true',
            help="Don't ask for confirmation of uninstall deletions.")

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options, args):
        session = self._build_session(options)

        requirement_set = RequirementSet(
            build_dir=None,
            src_dir=None,
            download_dir=None,
            session=session,
        )
        for name in args:
            requirement_set.add_requirement(
                InstallRequirement.from_line(name))
        for filename in options.requirements:
            for req in parse_requirements(filename,
                    options=options, session=session):
                requirement_set.add_requirement(req)
        if not requirement_set.has_requirements:
            raise InstallationError('You must give at least one requirement '
                'to %(name)s (see "pip help %(name)s")' % dict(name=self.name))
        requirement_set.uninstall(auto_confirm=options.yes)
python3.3/site-packages/pip/commands/help.py000064400000001637151733566760014756 0ustar00from pip.basecommand import Command, SUCCESS
from pip.exceptions import CommandError


class HelpCommand(Command):
    """Show help for commands"""
    name = 'help'
    usage = """
      %prog <command>"""
    summary = 'Show help for commands.'

    def run(self, options, args):
        from pip.commands import commands, get_similar_commands

        try:
            # 'pip help' with no args is handled by pip.__init__.parseopt()
            cmd_name = args[0]  # the command we need help for
        except IndexError:
            return SUCCESS

        if cmd_name not in commands:
            guess = get_similar_commands(cmd_name)

            msg = ['unknown command "%s"' % cmd_name]
            if guess:
                msg.append('maybe you meant "%s"' % guess)

            raise CommandError(' - '.join(msg))

        command = commands[cmd_name]()
        command.parser.print_help()

        return SUCCESS
python3.3/site-packages/pip/commands/bundle.py000064400000003373151733566760015276 0ustar00import textwrap
from pip.locations import build_prefix, src_prefix
from pip.util import display_path, backup_dir
from pip.log import logger
from pip.exceptions import InstallationError
from pip.commands.install import InstallCommand


class BundleCommand(InstallCommand):
    """Create pybundles (archives containing multiple packages)."""
    name = 'bundle'
    usage = """
      %prog [options] <bundle name>.pybundle <package>..."""
    summary = 'DEPRECATED. Create pybundles.'
    bundle = True

    def __init__(self, *args, **kw):
        super(BundleCommand, self).__init__(*args, **kw)
        # bundle uses different default source and build dirs
        build_opt = self.parser.get_option("--build")
        build_opt.default = backup_dir(build_prefix, '-bundle')
        src_opt = self.parser.get_option("--src")
        src_opt.default = backup_dir(src_prefix, '-bundle')
        self.parser.set_defaults(**{
                src_opt.dest: src_opt.default,
                build_opt.dest: build_opt.default,
                })

    def run(self, options, args):

        logger.deprecated('1.6', "DEPRECATION: 'pip bundle' and support for installing from *.pybundle files is deprecated. "
                    "See https://github.com/pypa/pip/pull/1046")

        if not args:
            raise InstallationError('You must give a bundle filename')
        # We have to get everything when creating a bundle:
        options.ignore_installed = True
        logger.notify('Putting temporary build files in %s and source/develop files in %s'
                      % (display_path(options.build_dir), display_path(options.src_dir)))
        self.bundle_filename = args.pop(0)
        requirement_set = super(BundleCommand, self).run(options, args)
        return requirement_set
python3.3/site-packages/pip/commands/search.py000064400000011200151733566760015256 0ustar00import sys
import textwrap

import pip.download

from pip.basecommand import Command, SUCCESS
from pip.util import get_terminal_size
from pip.log import logger
from pip.backwardcompat import xmlrpclib, reduce, cmp
from pip.exceptions import CommandError
from pip.status_codes import NO_MATCHES_FOUND
from pip._vendor import pkg_resources
from distutils.version import StrictVersion, LooseVersion


class SearchCommand(Command):
    """Search for PyPI packages whose name or summary contains <query>."""
    name = 'search'
    usage = """
      %prog [options] <query>"""
    summary = 'Search PyPI for packages.'

    def __init__(self, *args, **kw):
        super(SearchCommand, self).__init__(*args, **kw)
        self.cmd_opts.add_option(
            '--index',
            dest='index',
            metavar='URL',
            default='https://pypi.python.org/pypi',
            help='Base URL of Python Package Index (default %default)')

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options, args):
        if not args:
            raise CommandError('Missing required argument (search query).')
        query = args
        index_url = options.index

        pypi_hits = self.search(query, index_url)
        hits = transform_hits(pypi_hits)

        terminal_width = None
        if sys.stdout.isatty():
            terminal_width = get_terminal_size()[0]

        print_results(hits, terminal_width=terminal_width)
        if pypi_hits:
            return SUCCESS
        return NO_MATCHES_FOUND

    def search(self, query, index_url):
        pypi = xmlrpclib.ServerProxy(index_url)
        hits = pypi.search({'name': query, 'summary': query}, 'or')
        return hits


def transform_hits(hits):
    """
    The list from pypi is really a list of versions. We want a list of
    packages with the list of versions stored inline. This converts the
    list from pypi into one we can use.
    """
    packages = {}
    for hit in hits:
        name = hit['name']
        summary = hit['summary']
        version = hit['version']
        score = hit['_pypi_ordering']
        if score is None:
            score = 0

        if name not in packages.keys():
            packages[name] = {'name': name, 'summary': summary, 'versions': [version], 'score': score}
        else:
            packages[name]['versions'].append(version)

            # if this is the highest version, replace summary and score
            if version == highest_version(packages[name]['versions']):
                packages[name]['summary'] = summary
                packages[name]['score'] = score

    # each record has a unique name now, so we will convert the dict into a list sorted by score
    package_list = sorted(packages.values(), key=lambda x: x['score'], reverse=True)
    return package_list


def print_results(hits, name_column_width=25, terminal_width=None):
    installed_packages = [p.project_name for p in pkg_resources.working_set]
    for hit in hits:
        name = hit['name']
        summary = hit['summary'] or ''
        if terminal_width is not None:
            # wrap and indent summary to fit terminal
            summary = textwrap.wrap(summary, terminal_width - name_column_width - 5)
            summary = ('\n' + ' ' * (name_column_width + 3)).join(summary)
        line = '%s - %s' % (name.ljust(name_column_width), summary)
        try:
            logger.notify(line)
            if name in installed_packages:
                dist = pkg_resources.get_distribution(name)
                logger.indent += 2
                try:
                    latest = highest_version(hit['versions'])
                    if dist.version == latest:
                        logger.notify('INSTALLED: %s (latest)' % dist.version)
                    else:
                        logger.notify('INSTALLED: %s' % dist.version)
                        logger.notify('LATEST:    %s' % latest)
                finally:
                    logger.indent -= 2
        except UnicodeEncodeError:
            pass


def compare_versions(version1, version2):
    try:
        return cmp(StrictVersion(version1), StrictVersion(version2))
    # in case of abnormal version number, fall back to LooseVersion
    except ValueError:
        pass
    try:
        return cmp(LooseVersion(version1), LooseVersion(version2))
    except TypeError:
    # certain LooseVersion comparions raise due to unorderable types,
    # fallback to string comparison
        return cmp([str(v) for v in LooseVersion(version1).version],
                   [str(v) for v in LooseVersion(version2).version])


def highest_version(versions):
    return reduce((lambda v1, v2: compare_versions(v1, v2) == 1 and v1 or v2), versions)
python3.3/site-packages/pip/commands/unzip.py000064400000000271151733566760015164 0ustar00from pip.commands.zip import ZipCommand


class UnzipCommand(ZipCommand):
    """Unzip individual packages."""
    name = 'unzip'
    summary = 'DEPRECATED. Unzip individual packages.'
python3.3/site-packages/pip/commands/install.py000064400000032724151733566760015475 0ustar00import os
import sys
import tempfile
import shutil
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.log import logger
from pip.locations import (src_prefix, virtualenv_no_global, distutils_scheme,
                           build_prefix)
from pip.basecommand import Command
from pip.index import PackageFinder
from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError
from pip import cmdoptions
from pip.util import BuildDirectory


class InstallCommand(Command):
    """
    Install packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    """
    name = 'install'

    usage = """
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ..."""

    summary = 'Install packages.'
    bundle = False

    def __init__(self, *args, **kw):
        super(InstallCommand, self).__init__(*args, **kw)

        cmd_opts = self.cmd_opts

        cmd_opts.add_option(
            '-e', '--editable',
            dest='editables',
            action='append',
            default=[],
            metavar='path/url',
            help='Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.')

        cmd_opts.add_option(cmdoptions.requirements.make())
        cmd_opts.add_option(cmdoptions.build_dir.make())

        cmd_opts.add_option(
            '-t', '--target',
            dest='target_dir',
            metavar='dir',
            default=None,
            help='Install packages into <dir>.')

        cmd_opts.add_option(
            '-d', '--download', '--download-dir', '--download-directory',
            dest='download_dir',
            metavar='dir',
            default=None,
            help="Download packages into <dir> instead of installing them, regardless of what's already installed.")

        cmd_opts.add_option(cmdoptions.download_cache.make())

        cmd_opts.add_option(
            '--src', '--source', '--source-dir', '--source-directory',
            dest='src_dir',
            metavar='dir',
            default=src_prefix,
            help='Directory to check out editable projects into. '
            'The default in a virtualenv is "<venv path>/src". '
            'The default for global installs is "<current dir>/src".')

        cmd_opts.add_option(
            '-U', '--upgrade',
            dest='upgrade',
            action='store_true',
            help='Upgrade all packages to the newest available version. '
            'This process is recursive regardless of whether a dependency is already satisfied.')

        cmd_opts.add_option(
            '--force-reinstall',
            dest='force_reinstall',
            action='store_true',
            help='When upgrading, reinstall all packages even if they are '
                 'already up-to-date.')

        cmd_opts.add_option(
            '-I', '--ignore-installed',
            dest='ignore_installed',
            action='store_true',
            help='Ignore the installed packages (reinstalling instead).')

        cmd_opts.add_option(cmdoptions.no_deps.make())

        cmd_opts.add_option(
            '--no-install',
            dest='no_install',
            action='store_true',
            help="DEPRECATED. Download and unpack all packages, but don't actually install them.")

        cmd_opts.add_option(
            '--no-download',
            dest='no_download',
            action="store_true",
            help="DEPRECATED. Don't download any packages, just install the ones already downloaded "
            "(completes an install run with --no-install).")

        cmd_opts.add_option(cmdoptions.install_options.make())
        cmd_opts.add_option(cmdoptions.global_options.make())

        cmd_opts.add_option(
            '--user',
            dest='use_user_site',
            action='store_true',
            help='Install using the user scheme.')

        cmd_opts.add_option(
            '--egg',
            dest='as_egg',
            action='store_true',
            help="Install packages as eggs, not 'flat', like pip normally does. This option is not about installing *from* eggs. (WARNING: Because this option overrides pip's normal install logic, requirements files may not behave as expected.)")

        cmd_opts.add_option(
            '--root',
            dest='root_path',
            metavar='dir',
            default=None,
            help="Install everything relative to this alternate root directory.")

        cmd_opts.add_option(
            '--strip-file-prefix',
            dest='strip_file_prefix',
            metavar='prefix',
            default=None,
            help="Strip given prefix from script paths in wheel RECORD."
        )

        cmd_opts.add_option(
            "--compile",
            action="store_true",
            dest="compile",
            default=True,
            help="Compile py files to pyc",
        )

        cmd_opts.add_option(
            "--no-compile",
            action="store_false",
            dest="compile",
            help="Do not compile py files to pyc",
        )

        cmd_opts.add_option(cmdoptions.use_wheel.make())
        cmd_opts.add_option(cmdoptions.no_use_wheel.make())

        cmd_opts.add_option(
            '--pre',
            action='store_true',
            default=False,
            help="Include pre-release and development versions. By default, pip only finds stable versions.")

        cmd_opts.add_option(cmdoptions.no_clean.make())

        index_opts = cmdoptions.make_option_group(cmdoptions.index_group, self.parser)

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, cmd_opts)

    def _build_package_finder(self, options, index_urls, session):
        """
        Create a package finder appropriate to this install command.
        This method is meant to be overridden by subclasses, not
        called directly.
        """
        return PackageFinder(find_links=options.find_links,
                             index_urls=index_urls,
                             use_wheel=options.use_wheel,
                             allow_external=options.allow_external,
                             allow_unverified=options.allow_unverified,
                             allow_all_external=options.allow_all_external,
                             allow_all_prereleases=options.pre,
                             process_dependency_links=
                                options.process_dependency_links,
                             session=session,
                            )

    def run(self, options, args):

        if (
            options.no_install or
            options.no_download or
            options.build_dir or
            options.no_clean
        ):
            logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, '
                              'and --no-clean are deprecated.  See https://github.com/pypa/pip/issues/906.')

        if options.download_dir:
            options.no_install = True
            options.ignore_installed = True

        # If we have --no-install or --no-download and no --build we use the
        # legacy static build dir
        if (options.build_dir is None
                and (options.no_install or options.no_download)):
            options.build_dir = build_prefix

        if options.build_dir:
            options.build_dir = os.path.abspath(options.build_dir)

        options.src_dir = os.path.abspath(options.src_dir)
        install_options = options.install_options or []
        if options.use_user_site:
            if virtualenv_no_global():
                raise InstallationError("Can not perform a '--user' install. User site-packages are not visible in this virtualenv.")
            install_options.append('--user')

        temp_target_dir = None
        if options.target_dir:
            options.ignore_installed = True
            temp_target_dir = tempfile.mkdtemp()
            options.target_dir = os.path.abspath(options.target_dir)
            if os.path.exists(options.target_dir) and not os.path.isdir(options.target_dir):
                raise CommandError("Target path exists but is not a directory, will not continue.")
            install_options.append('--home=' + temp_target_dir)

        global_options = options.global_options or []
        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index:
            logger.notify('Ignoring indexes: %s' % ','.join(index_urls))
            index_urls = []

        if options.use_mirrors:
            logger.deprecated("1.7",
                        "--use-mirrors has been deprecated and will be removed"
                        " in the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")

        if options.mirrors:
            logger.deprecated("1.7",
                        "--mirrors has been deprecated and will be removed in "
                        " the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")
            index_urls += options.mirrors

        session = self._build_session(options)

        finder = self._build_package_finder(options, index_urls, session)

        build_delete = (not (options.no_clean or options.build_dir))
        with BuildDirectory(options.build_dir, delete=build_delete) as build_dir:
            requirement_set = RequirementSet(
                build_dir=build_dir,
                src_dir=options.src_dir,
                download_dir=options.download_dir,
                download_cache=options.download_cache,
                upgrade=options.upgrade,
                as_egg=options.as_egg,
                ignore_installed=options.ignore_installed,
                ignore_dependencies=options.ignore_dependencies,
                force_reinstall=options.force_reinstall,
                use_user_site=options.use_user_site,
                target_dir=temp_target_dir,
                session=session,
                pycompile=options.compile,
            )
            for name in args:
                requirement_set.add_requirement(
                    InstallRequirement.from_line(name, None))
            for name in options.editables:
                requirement_set.add_requirement(
                    InstallRequirement.from_editable(name, default_vcs=options.default_vcs))
            for filename in options.requirements:
                for req in parse_requirements(filename, finder=finder, options=options, session=session):
                    requirement_set.add_requirement(req)
            if not requirement_set.has_requirements:
                opts = {'name': self.name}
                if options.find_links:
                    msg = ('You must give at least one requirement to %(name)s '
                           '(maybe you meant "pip %(name)s %(links)s"?)' %
                           dict(opts, links=' '.join(options.find_links)))
                else:
                    msg = ('You must give at least one requirement '
                           'to %(name)s (see "pip help %(name)s")' % opts)
                logger.warn(msg)
                return

            try:
                if not options.no_download:
                    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
                else:
                    requirement_set.locate_files()

                if not options.no_install and not self.bundle:
                    requirement_set.install(
                        install_options,
                        global_options,
                        root=options.root_path,
                        strip_file_prefix=options.strip_file_prefix)
                    installed = ' '.join([req.name for req in
                                          requirement_set.successfully_installed])
                    if installed:
                        logger.notify('Successfully installed %s' % installed)
                elif not self.bundle:
                    downloaded = ' '.join([req.name for req in
                                           requirement_set.successfully_downloaded])
                    if downloaded:
                        logger.notify('Successfully downloaded %s' % downloaded)
                elif self.bundle:
                    requirement_set.create_bundle(self.bundle_filename)
                    logger.notify('Created bundle in %s' % self.bundle_filename)
            except PreviousBuildDirError:
                options.no_clean = True
                raise
            finally:
                # Clean up
                if (not options.no_clean) and ((not options.no_install) or options.download_dir):
                    requirement_set.cleanup_files(bundle=self.bundle)

        if options.target_dir:
            if not os.path.exists(options.target_dir):
                os.makedirs(options.target_dir)
            lib_dir = distutils_scheme('', home=temp_target_dir)['purelib']
            for item in os.listdir(lib_dir):
                shutil.move(
                    os.path.join(lib_dir, item),
                    os.path.join(options.target_dir, item)
                    )
            shutil.rmtree(temp_target_dir)
        return requirement_set
python3.3/site-packages/pip/log.py000064400000022357151733566760013010 0ustar00"""Logging
"""

import sys
import os
import logging

from pip import backwardcompat
from pip._vendor import colorama, pkg_resources


def _color_wrap(*colors):
    def wrapped(inp):
        return "".join(list(colors) + [inp, colorama.Style.RESET_ALL])
    return wrapped


def should_color(consumer, environ, std=(sys.stdout, sys.stderr)):
    real_consumer = (consumer if not isinstance(consumer, colorama.AnsiToWin32)
                        else consumer.wrapped)

    # If consumer isn't stdout or stderr we shouldn't colorize it
    if real_consumer not in std:
        return False

    # If consumer is a tty we should color it
    if hasattr(real_consumer, "isatty") and real_consumer.isatty():
        return True

    # If we have an ASNI term we should color it
    if environ.get("TERM") == "ANSI":
        return True

    # If anything else we should not color it
    return False


def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))


class Logger(object):
    """
    Logging object for use in command-line script.  Allows ranges of
    levels, to avoid some redundancy of displayed information.
    """
    VERBOSE_DEBUG = logging.DEBUG - 1
    DEBUG = logging.DEBUG
    INFO = logging.INFO
    NOTIFY = (logging.INFO + logging.WARN) / 2
    WARN = WARNING = logging.WARN
    ERROR = logging.ERROR
    FATAL = logging.FATAL

    LEVELS = [VERBOSE_DEBUG, DEBUG, INFO, NOTIFY, WARN, ERROR, FATAL]

    COLORS = {
        WARN: _color_wrap(colorama.Fore.YELLOW),
        ERROR: _color_wrap(colorama.Fore.RED),
        FATAL: _color_wrap(colorama.Fore.RED),
    }

    def __init__(self):
        self.consumers = []
        self.indent = 0
        self.explicit_levels = False
        self.in_progress = None
        self.in_progress_hanging = False

    def add_consumers(self, *consumers):
        if sys.platform.startswith("win"):
            for level, consumer in consumers:
                if hasattr(consumer, "write"):
                    self.consumers.append(
                        (level, colorama.AnsiToWin32(consumer)),
                    )
                else:
                    self.consumers.append((level, consumer))
        else:
            self.consumers.extend(consumers)

    def debug(self, msg, *args, **kw):
        self.log(self.DEBUG, msg, *args, **kw)

    def info(self, msg, *args, **kw):
        self.log(self.INFO, msg, *args, **kw)

    def notify(self, msg, *args, **kw):
        self.log(self.NOTIFY, msg, *args, **kw)

    def warn(self, msg, *args, **kw):
        self.log(self.WARN, msg, *args, **kw)

    def error(self, msg, *args, **kw):
        self.log(self.ERROR, msg, *args, **kw)

    def fatal(self, msg, *args, **kw):
        self.log(self.FATAL, msg, *args, **kw)

    def deprecated(self, removal_version, msg, *args, **kwargs):
        """
        Logs deprecation message which is log level WARN if the
        ``removal_version`` is > 1 minor release away and log level ERROR
        otherwise.

        removal_version should be the version that the deprecated feature is
        expected to be removed in, so something that will not exist in
        version 1.7, but will in 1.6 would have a removal_version of 1.7.
        """
        from pip import __version__

        if should_warn(__version__, removal_version):
            self.warn(msg, *args, **kwargs)
        else:
            self.error(msg, *args, **kwargs)

    def log(self, level, msg, *args, **kw):
        if args:
            if kw:
                raise TypeError(
                    "You may give positional or keyword arguments, not both")
        args = args or kw

        # render
        if args:
            rendered = msg % args
        else:
            rendered = msg
        rendered = ' ' * self.indent + rendered
        if self.explicit_levels:
            ## FIXME: should this be a name, not a level number?
            rendered = '%02i %s' % (level, rendered)

        for consumer_level, consumer in self.consumers:
            if self.level_matches(level, consumer_level):
                if (self.in_progress_hanging
                    and consumer in (sys.stdout, sys.stderr)):
                    self.in_progress_hanging = False
                    sys.stdout.write('\n')
                    sys.stdout.flush()
                if hasattr(consumer, 'write'):
                    write_content = rendered + '\n'
                    if should_color(consumer, os.environ):
                        # We are printing to stdout or stderr and it supports
                        #   colors so render our text colored
                        colorizer = self.COLORS.get(level, lambda x: x)
                        write_content = colorizer(write_content)

                    consumer.write(write_content)
                    if hasattr(consumer, 'flush'):
                        consumer.flush()
                else:
                    consumer(rendered)

    def _show_progress(self):
        """Should we display download progress?"""
        return (self.stdout_level_matches(self.NOTIFY) and sys.stdout.isatty())

    def start_progress(self, msg):
        assert not self.in_progress, (
            "Tried to start_progress(%r) while in_progress %r"
            % (msg, self.in_progress))
        if self._show_progress():
            sys.stdout.write(' ' * self.indent + msg)
            sys.stdout.flush()
            self.in_progress_hanging = True
        else:
            self.in_progress_hanging = False
        self.in_progress = msg
        self.last_message = None

    def end_progress(self, msg='done.'):
        assert self.in_progress, (
            "Tried to end_progress without start_progress")
        if self._show_progress():
            if not self.in_progress_hanging:
                # Some message has been printed out since start_progress
                sys.stdout.write('...' + self.in_progress + msg + '\n')
                sys.stdout.flush()
            else:
                # These erase any messages shown with show_progress (besides .'s)
                logger.show_progress('')
                logger.show_progress('')
                sys.stdout.write(msg + '\n')
                sys.stdout.flush()
        self.in_progress = None
        self.in_progress_hanging = False

    def show_progress(self, message=None):
        """If we are in a progress scope, and no log messages have been
        shown, write out another '.'"""
        if self.in_progress_hanging:
            if message is None:
                sys.stdout.write('.')
                sys.stdout.flush()
            else:
                if self.last_message:
                    padding = ' ' * max(0, len(self.last_message) - len(message))
                else:
                    padding = ''
                sys.stdout.write('\r%s%s%s%s' %
                                (' ' * self.indent, self.in_progress, message, padding))
                sys.stdout.flush()
                self.last_message = message

    def stdout_level_matches(self, level):
        """Returns true if a message at this level will go to stdout"""
        return self.level_matches(level, self._stdout_level())

    def _stdout_level(self):
        """Returns the level that stdout runs at"""
        for level, consumer in self.consumers:
            if consumer is sys.stdout:
                return level
        return self.FATAL

    def level_matches(self, level, consumer_level):
        """
        >>> l = Logger()
        >>> l.level_matches(3, 4)
        False
        >>> l.level_matches(3, 2)
        True
        >>> l.level_matches(slice(None, 3), 3)
        False
        >>> l.level_matches(slice(None, 3), 2)
        True
        >>> l.level_matches(slice(1, 3), 1)
        True
        >>> l.level_matches(slice(2, 3), 1)
        False
        """
        if isinstance(level, slice):
            start, stop = level.start, level.stop
            if start is not None and start > consumer_level:
                return False
            if stop is not None or stop <= consumer_level:
                return False
            return True
        else:
            return level >= consumer_level

    @classmethod
    def level_for_integer(cls, level):
        levels = cls.LEVELS
        if level < 0:
            return levels[0]
        if level >= len(levels):
            return levels[-1]
        return levels[level]

    def move_stdout_to_stderr(self):
        to_remove = []
        to_add = []
        for consumer_level, consumer in self.consumers:
            if consumer == sys.stdout:
                to_remove.append((consumer_level, consumer))
                to_add.append((consumer_level, sys.stderr))
        for item in to_remove:
            self.consumers.remove(item)
        self.consumers.extend(to_add)

logger = Logger()
python3.3/site-packages/pip/cmdoptions.py000064400000022162151733566760014400 0ustar00"""
shared options and groups

The principle here is to define options once, but *not* instantiate them globally.
One reason being that options with action='append' can carry state between parses.
pip parse's general options twice internally, and shouldn't pass on state.
To be consistent, all options will follow this design.

"""
import copy
from optparse import OptionGroup, SUPPRESS_HELP, Option
from pip.locations import default_log_file


def make_option_group(group, parser):
    """
    Return an OptionGroup object
    group  -- assumed to be dict with 'name' and 'options' keys
    parser -- an optparse Parser
    """
    option_group = OptionGroup(parser, group['name'])
    for option in group['options']:
        option_group.add_option(option.make())
    return option_group

class OptionMaker(object):
    """Class that stores the args/kwargs that would be used to make an Option,
    for making them later, and uses deepcopy's to reset state."""
    def __init__(self, *args, **kwargs):
        self.args = args
        self.kwargs = kwargs
    def make(self):
        args_copy = copy.deepcopy(self.args)
        kwargs_copy = copy.deepcopy(self.kwargs)
        return Option(*args_copy, **kwargs_copy)

###########
# options #
###########

help_ = OptionMaker(
    '-h', '--help',
    dest='help',
    action='help',
    help='Show help.')

require_virtualenv = OptionMaker(
    # Run only if inside a virtualenv, bail if not.
    '--require-virtualenv', '--require-venv',
    dest='require_venv',
    action='store_true',
    default=False,
    help=SUPPRESS_HELP)

verbose = OptionMaker(
    '-v', '--verbose',
    dest='verbose',
    action='count',
    default=0,
    help='Give more output. Option is additive, and can be used up to 3 times.')

version = OptionMaker(
    '-V', '--version',
    dest='version',
    action='store_true',
    help='Show version and exit.')

quiet = OptionMaker(
    '-q', '--quiet',
    dest='quiet',
    action='count',
    default=0,
    help='Give less output.')

log = OptionMaker(
    '--log',
    dest='log',
    metavar='path',
    help='Path to a verbose appending log. This log is inactive by default.')

log_explicit_levels = OptionMaker(
    # Writes the log levels explicitely to the log'
    '--log-explicit-levels',
    dest='log_explicit_levels',
    action='store_true',
    default=False,
    help=SUPPRESS_HELP)

log_file = OptionMaker(
    # The default log file
    '--log-file', '--local-log',
    dest='log_file',
    metavar='path',
    default=default_log_file,
    help='Path to a verbose non-appending log, that only logs failures. This log is active by default at %default.')

no_input = OptionMaker(
    # Don't ask for input
    '--no-input',
    dest='no_input',
    action='store_true',
    default=False,
    help=SUPPRESS_HELP)

proxy = OptionMaker(
    '--proxy',
    dest='proxy',
    type='str',
    default='',
    help="Specify a proxy in the form [user:passwd@]proxy.server:port.")

timeout = OptionMaker(
    '--timeout', '--default-timeout',
    metavar='sec',
    dest='timeout',
    type='float',
    default=15,
    help='Set the socket timeout (default %default seconds).')

default_vcs = OptionMaker(
    # The default version control system for editables, e.g. 'svn'
    '--default-vcs',
    dest='default_vcs',
    type='str',
    default='',
    help=SUPPRESS_HELP)

skip_requirements_regex = OptionMaker(
    # A regex to be used to skip requirements
    '--skip-requirements-regex',
    dest='skip_requirements_regex',
    type='str',
    default='',
    help=SUPPRESS_HELP)

exists_action = OptionMaker(
    # Option when path already exist
    '--exists-action',
    dest='exists_action',
    type='choice',
    choices=['s', 'i', 'w', 'b'],
    default=[],
    action='append',
    metavar='action',
    help="Default action when a path already exists: "
    "(s)witch, (i)gnore, (w)ipe, (b)ackup.")

cert = OptionMaker(
    '--cert',
    dest='cert',
    type='str',
    default='',
    metavar='path',
    help = "Path to alternate CA bundle.")

index_url = OptionMaker(
    '-i', '--index-url', '--pypi-url',
    dest='index_url',
    metavar='URL',
    default='https://pypi.python.org/simple/',
    help='Base URL of Python Package Index (default %default).')

extra_index_url = OptionMaker(
    '--extra-index-url',
    dest='extra_index_urls',
    metavar='URL',
    action='append',
    default=[],
    help='Extra URLs of package indexes to use in addition to --index-url.')

no_index = OptionMaker(
    '--no-index',
    dest='no_index',
    action='store_true',
    default=False,
    help='Ignore package index (only looking at --find-links URLs instead).')

find_links =  OptionMaker(
    '-f', '--find-links',
    dest='find_links',
    action='append',
    default=[],
    metavar='url',
    help="If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.")

# TODO: Remove after 1.6
use_mirrors = OptionMaker(
    '-M', '--use-mirrors',
    dest='use_mirrors',
    action='store_true',
    default=False,
    help=SUPPRESS_HELP)

# TODO: Remove after 1.6
mirrors = OptionMaker(
    '--mirrors',
    dest='mirrors',
    metavar='URL',
    action='append',
    default=[],
    help=SUPPRESS_HELP)

allow_external = OptionMaker(
    "--allow-external",
    dest="allow_external",
    action="append",
    default=[],
    metavar="PACKAGE",
    help="Allow the installation of externally hosted files",
)

allow_all_external = OptionMaker(
    "--allow-all-external",
    dest="allow_all_external",
    action="store_true",
    default=False,
    help="Allow the installation of all externally hosted files",
)

# Remove after 1.7
no_allow_external = OptionMaker(
    "--no-allow-external",
    dest="allow_all_external",
    action="store_false",
    default=False,
    help=SUPPRESS_HELP,
)

# Remove --allow-insecure after 1.7
allow_unsafe = OptionMaker(
    "--allow-unverified", "--allow-insecure",
    dest="allow_unverified",
    action="append",
    default=[],
    metavar="PACKAGE",
    help="Allow the installation of insecure and unverifiable files",
)

# Remove after 1.7
no_allow_unsafe = OptionMaker(
    "--no-allow-insecure",
    dest="allow_all_insecure",
    action="store_false",
    default=False,
    help=SUPPRESS_HELP
)

# Remove after 1.5
process_dependency_links = OptionMaker(
    "--process-dependency-links",
    dest="process_dependency_links",
    action="store_true",
    default=False,
    help="Enable the processing of dependency links.",
)

requirements = OptionMaker(
    '-r', '--requirement',
    dest='requirements',
    action='append',
    default=[],
    metavar='file',
    help='Install from the given requirements file. '
    'This option can be used multiple times.')

use_wheel = OptionMaker(
    '--use-wheel',
    dest='use_wheel',
    action='store_true',
    help=SUPPRESS_HELP,
)

no_use_wheel = OptionMaker(
    '--no-use-wheel',
    dest='use_wheel',
    action='store_false',
    default=True,
    help=('Do not Find and prefer wheel archives when searching indexes and '
          'find-links locations.'),
)

download_cache = OptionMaker(
    '--download-cache',
    dest='download_cache',
    metavar='dir',
    default=None,
    help='Cache downloaded packages in <dir>.')

no_deps = OptionMaker(
    '--no-deps', '--no-dependencies',
    dest='ignore_dependencies',
    action='store_true',
    default=False,
    help="Don't install package dependencies.")

build_dir = OptionMaker(
    '-b', '--build', '--build-dir', '--build-directory',
    dest='build_dir',
    metavar='dir',
    help='Directory to unpack packages into and build in.',
)

install_options = OptionMaker(
    '--install-option',
    dest='install_options',
    action='append',
    metavar='options',
    help="Extra arguments to be supplied to the setup.py install "
    "command (use like --install-option=\"--install-scripts=/usr/local/bin\"). "
    "Use multiple --install-option options to pass multiple options to setup.py install. "
    "If you are using an option with a directory path, be sure to use absolute path.")

global_options = OptionMaker(
    '--global-option',
    dest='global_options',
    action='append',
    metavar='options',
    help="Extra global options to be supplied to the setup.py "
    "call before the install command.")

no_clean = OptionMaker(
    '--no-clean',
    action='store_true',
    default=False,
    help="Don't clean up build directories.")


##########
# groups #
##########

general_group = {
    'name': 'General Options',
    'options': [
        help_,
        require_virtualenv,
        verbose,
        version,
        quiet,
        log_file,
        log,
        log_explicit_levels,
        no_input,
        proxy,
        timeout,
        default_vcs,
        skip_requirements_regex,
        exists_action,
        cert,
        ]
    }

index_group = {
    'name': 'Package Index Options',
    'options': [
        index_url,
        extra_index_url,
        no_index,
        find_links,
        use_mirrors,
        mirrors,
        allow_external,
        allow_all_external,
        no_allow_external,
        allow_unsafe,
        no_allow_unsafe,
        process_dependency_links,
        ]
    }
python3.3/site-packages/pip/wheel.py000064400000050500151733566760013322 0ustar00"""
Support for installing and building the "wheel" binary package format.
"""
from __future__ import with_statement

import compileall
import csv
import functools
import hashlib
import os
import re
import shutil
import sys

from base64 import urlsafe_b64encode
from email.parser import Parser

from pip.backwardcompat import ConfigParser, StringIO
from pip.exceptions import InvalidWheelFilename, UnsupportedWheel
from pip.locations import distutils_scheme
from pip.log import logger
from pip import pep425tags
from pip.util import call_subprocess, normalize_path, make_path_relative
from pip._vendor import pkg_resources
from pip._vendor.distlib.scripts import ScriptMaker
from pip._vendor import pkg_resources


wheel_ext = '.whl'

VERSION_COMPATIBLE = (1, 0)


def rehash(path, algo='sha256', blocksize=1<<20):
    """Return (hash, length) for path using hashlib.new(algo)"""
    h = hashlib.new(algo)
    length = 0
    with open(path, 'rb') as f:
        block = f.read(blocksize)
        while block:
            length += len(block)
            h.update(block)
            block = f.read(blocksize)
    digest = 'sha256='+urlsafe_b64encode(h.digest()).decode('latin1').rstrip('=')
    return (digest, length)

try:
    unicode
    def binary(s):
        if isinstance(s, unicode):
            return s.encode('ascii')
        return s
except NameError:
    def binary(s):
        if isinstance(s, str):
            return s.encode('ascii')

def open_for_csv(name, mode):
    if sys.version_info[0] < 3:
        nl = {}
        bin = 'b'
    else:
        nl = { 'newline': '' }
        bin = ''
    return open(name, mode + bin, **nl)

def fix_script(path):
    """Replace #!python with #!/path/to/python
    Return True if file was changed."""
    # XXX RECORD hashes will need to be updated
    if os.path.isfile(path):
        script = open(path, 'rb')
        try:
            firstline = script.readline()
            if not firstline.startswith(binary('#!python')):
                return False
            exename = sys.executable.encode(sys.getfilesystemencoding())
            firstline = binary('#!') + exename + binary(os.linesep)
            rest = script.read()
        finally:
            script.close()
        script = open(path, 'wb')
        try:
            script.write(firstline)
            script.write(rest)
        finally:
            script.close()
        return True

dist_info_re = re.compile(r"""^(?P<namever>(?P<name>.+?)(-(?P<ver>\d.+?))?)
                                \.dist-info$""", re.VERBOSE)

def root_is_purelib(name, wheeldir):
    """
    Return True if the extracted wheel in wheeldir should go into purelib.
    """
    name_folded = name.replace("-", "_")
    for item in os.listdir(wheeldir):
        match = dist_info_re.match(item)
        if match and match.group('name') == name_folded:
            with open(os.path.join(wheeldir, item, 'WHEEL')) as wheel:
                for line in wheel:
                    line = line.lower().rstrip()
                    if line == "root-is-purelib: true":
                        return True
    return False


def get_entrypoints(filename):
    if not os.path.exists(filename):
        return {}, {}

    # This is done because you can pass a string to entry_points wrappers which
    # means that they may or may not be valid INI files. The attempt here is to
    # strip leading and trailing whitespace in order to make them valid INI
    # files.
    with open(filename) as fp:
        data = StringIO()
        for line in fp:
            data.write(line.strip())
            data.write("\n")
        data.seek(0)

    cp = ConfigParser.RawConfigParser()
    cp.readfp(data)

    console = {}
    gui = {}
    if cp.has_section('console_scripts'):
        console = dict(cp.items('console_scripts'))
    if cp.has_section('gui_scripts'):
        gui = dict(cp.items('gui_scripts'))
    return console, gui


def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
                     pycompile=True, scheme=None, strip_file_prefix=None):
    """Install a wheel"""

    if not scheme:
        scheme = distutils_scheme(name, user=user, home=home, root=root)

    if root_is_purelib(name, wheeldir):
        lib_dir = scheme['purelib']
    else:
        lib_dir = scheme['platlib']

    info_dir = []
    data_dirs = []
    source = wheeldir.rstrip(os.path.sep) + os.path.sep

    # Record details of the files moved
    #   installed = files copied from the wheel to the destination
    #   changed = files changed while installing (scripts #! line typically)
    #   generated = files newly generated during the install (script wrappers)
    installed = {}
    changed = set()
    generated = []

    # Compile all of the pyc files that we're going to be installing
    if pycompile:
        compileall.compile_dir(source, force=True, quiet=True)

    def normpath(src, p):
        return make_path_relative(src, p).replace(os.path.sep, '/')

    def record_installed(srcfile, destfile, modified=False):
        """Map archive RECORD paths to installation RECORD paths."""
        oldpath = normpath(srcfile, wheeldir)
        newpath = normpath(destfile, lib_dir)
        installed[oldpath] = newpath
        if modified:
            changed.add(destfile)

    def clobber(source, dest, is_base, fixer=None, filter=None):
        if not os.path.exists(dest): # common for the 'include' path
            os.makedirs(dest)

        for dir, subdirs, files in os.walk(source):
            basedir = dir[len(source):].lstrip(os.path.sep)
            destdir = os.path.join(dest, basedir)
            if is_base and basedir.split(os.path.sep, 1)[0].endswith('.data'):
                continue
            for s in subdirs:
                destsubdir = os.path.join(dest, basedir, s)
                if is_base and basedir == '' and destsubdir.endswith('.data'):
                    data_dirs.append(s)
                    continue
                elif (is_base
                    and s.endswith('.dist-info')
                    # is self.req.project_name case preserving?
                    and s.lower().startswith(req.project_name.replace('-', '_').lower())):
                    assert not info_dir, 'Multiple .dist-info directories'
                    info_dir.append(destsubdir)
            for f in files:
                # Skip unwanted files
                if filter and filter(f):
                    continue
                srcfile = os.path.join(dir, f)
                destfile = os.path.join(dest, basedir, f)
                # directory creation is lazy and after the file filtering above
                # to ensure we don't install empty dirs; empty dirs can't be
                # uninstalled.
                if not os.path.exists(destdir):
                    os.makedirs(destdir)
                # use copy2 (not move) to be extra sure we're not moving
                # directories over; copy2 fails for directories.  this would
                # fail tests (not during released/user execution)
                shutil.copy2(srcfile, destfile)
                changed = False
                if fixer:
                    changed = fixer(destfile)
                record_installed(srcfile, destfile, changed)

    clobber(source, lib_dir, True)

    assert info_dir, "%s .dist-info directory not found" % req

    # Get the defined entry points
    ep_file = os.path.join(info_dir[0], 'entry_points.txt')
    console, gui = get_entrypoints(ep_file)

    def is_entrypoint_wrapper(name):
        # EP, EP.exe and EP-script.py are scripts generated for
        # entry point EP by setuptools
        if name.lower().endswith('.exe'):
            matchname = name[:-4]
        elif name.lower().endswith('-script.py'):
            matchname = name[:-10]
        elif name.lower().endswith(".pya"):
            matchname = name[:-4]
        else:
            matchname = name
        # Ignore setuptools-generated scripts
        return (matchname in console or matchname in gui)

    for datadir in data_dirs:
        fixer = None
        filter = None
        for subdir in os.listdir(os.path.join(wheeldir, datadir)):
            fixer = None
            if subdir == 'scripts':
                fixer = fix_script
                filter = is_entrypoint_wrapper
            source = os.path.join(wheeldir, datadir, subdir)
            dest = scheme[subdir]
            clobber(source, dest, False, fixer=fixer, filter=filter)

    maker = ScriptMaker(None, scheme['scripts'])

    # Ensure we don't generate any variants for scripts because this is almost
    # never what somebody wants.
    # See https://bitbucket.org/pypa/distlib/issue/35/
    maker.variants = set(('', ))

    # This is required because otherwise distlib creates scripts that are not
    # executable.
    # See https://bitbucket.org/pypa/distlib/issue/32/
    maker.set_mode = True

    # Simplify the script and fix the fact that the default script swallows
    # every single stack trace.
    # See https://bitbucket.org/pypa/distlib/issue/34/
    # See https://bitbucket.org/pypa/distlib/issue/33/
    def _get_script_text(entry):
        return maker.script_template % {
            "module": entry.prefix,
            "import_name": entry.suffix.split(".")[0],
            "func": entry.suffix,
        }

    maker._get_script_text = _get_script_text
    maker.script_template = """# -*- coding: utf-8 -*-
import re
import sys

from %(module)s import %(import_name)s

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
"""

    # Special case pip and setuptools to generate versioned wrappers
    #
    # The issue is that some projects (specifically, pip and setuptools) use
    # code in setup.py to create "versioned" entry points - pip2.7 on Python
    # 2.7, pip3.3 on Python 3.3, etc. But these entry points are baked into
    # the wheel metadata at build time, and so if the wheel is installed with
    # a *different* version of Python the entry points will be wrong. The
    # correct fix for this is to enhance the metadata to be able to describe
    # such versioned entry points, but that won't happen till Metadata 2.0 is
    # available.
    # In the meantime, projects using versioned entry points will either have
    # incorrect versioned entry points, or they will not be able to distribute
    # "universal" wheels (i.e., they will need a wheel per Python version).
    #
    # Because setuptools and pip are bundled with _ensurepip and virtualenv,
    # we need to use universal wheels. So, as a stopgap until Metadata 2.0, we
    # override the versioned entry points in the wheel and generate the
    # correct ones. This code is purely a short-term measure until Metadat 2.0
    # is available.
    #
    # To add the level of hack in this section of code, in order to support
    # ensurepip this code will look for an ``ENSUREPIP_OPTIONS`` environment
    # variable which will control which version scripts get installed.
    #
    # ENSUREPIP_OPTIONS=altinstall
    #   - Only pipX.Y and easy_install-X.Y will be generated and installed
    # ENSUREPIP_OPTIONS=install
    #   - pipX.Y, pipX, easy_install-X.Y will be generated and installed. Note
    #     that this option is technically if ENSUREPIP_OPTIONS is set and is
    #     not altinstall
    # DEFAULT
    #   - The default behavior is to install pip, pipX, pipX.Y, easy_install
    #     and easy_install-X.Y.
    pip_script = console.pop('pip', None)
    if pip_script:
        if "ENSUREPIP_OPTIONS" not in os.environ:
            spec = 'pip = ' + pip_script
            generated.extend(maker.make(spec))

        if os.environ.get("ENSUREPIP_OPTIONS", "") != "altinstall":
            spec = 'pip%s = %s' % (sys.version[:1], pip_script)
            generated.extend(maker.make(spec))

        spec = 'pip%s = %s' % (sys.version[:3], pip_script)
        generated.extend(maker.make(spec))
        # Delete any other versioned pip entry points
        pip_ep = [k for k in console if re.match(r'pip(\d(\.\d)?)?$', k)]
        for k in pip_ep:
            del console[k]
    easy_install_script = console.pop('easy_install', None)
    if easy_install_script:
        if "ENSUREPIP_OPTIONS" not in os.environ:
            spec = 'easy_install = ' + easy_install_script
            generated.extend(maker.make(spec))

        spec = 'easy_install-%s = %s' % (sys.version[:3], easy_install_script)
        generated.extend(maker.make(spec))
        # Delete any other versioned easy_install entry points
        easy_install_ep = [k for k in console
                if re.match(r'easy_install(-\d\.\d)?$', k)]
        for k in easy_install_ep:
            del console[k]

    # Generate the console and GUI entry points specified in the wheel
    if len(console) > 0:
        generated.extend(maker.make_multiple(['%s = %s' % kv for kv in console.items()]))
    if len(gui) > 0:
        generated.extend(maker.make_multiple(['%s = %s' % kv for kv in gui.items()], {'gui': True}))

    record = os.path.join(info_dir[0], 'RECORD')
    temp_record = os.path.join(info_dir[0], 'RECORD.pip')
    with open_for_csv(record, 'r') as record_in:
        with open_for_csv(temp_record, 'w+') as record_out:
            reader = csv.reader(record_in)
            writer = csv.writer(record_out)
            for row in reader:
                row[0] = installed.pop(row[0], row[0])
                if row[0] in changed:
                    row[1], row[2] = rehash(row[0])
                writer.writerow(row)
            for f in generated:
                h, l = rehash(f)
                if strip_file_prefix and f.startswith(strip_file_prefix):
                    f = os.path.join(os.sep, os.path.relpath(f, strip_file_prefix))
                writer.writerow((f, h, l))
            for f in installed:
                writer.writerow((installed[f], '', ''))
    shutil.move(temp_record, record)

def _unique(fn):
    @functools.wraps(fn)
    def unique(*args, **kw):
        seen = set()
        for item in fn(*args, **kw):
            if item not in seen:
                seen.add(item)
                yield item
    return unique

# TODO: this goes somewhere besides the wheel module
@_unique
def uninstallation_paths(dist):
    """
    Yield all the uninstallation paths for dist based on RECORD-without-.pyc

    Yield paths to all the files in RECORD. For each .py file in RECORD, add
    the .pyc in the same directory.

    UninstallPathSet.add() takes care of the __pycache__ .pyc.
    """
    from pip.req import FakeFile # circular import
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
    for row in r:
        path = os.path.join(dist.location, row[0])
        yield path
        if path.endswith('.py'):
            dn, fn = os.path.split(path)
            base = fn[:-3]
            path = os.path.join(dn, base+'.pyc')
            yield path


def wheel_version(source_dir):
    """
    Return the Wheel-Version of an extracted wheel, if possible.

    Otherwise, return False if we couldn't parse / extract it.
    """
    try:
        dist = [d for d in pkg_resources.find_on_path(None, source_dir)][0]

        wheel_data = dist.get_metadata('WHEEL')
        wheel_data = Parser().parsestr(wheel_data)

        version = wheel_data['Wheel-Version'].strip()
        version = tuple(map(int, version.split('.')))
        return version
    except:
        return False


def check_compatibility(version, name):
    """
    Raises errors or warns if called with an incompatible Wheel-Version.

    Pip should refuse to install a Wheel-Version that's a major series
    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
    installing a version only minor version ahead (e.g 1.2 > 1.1).

    version: a 2-tuple representing a Wheel-Version (Major, Minor)
    name: name of wheel or package to raise exception about

    :raises UnsupportedWheel: when an incompatible Wheel-Version is given
    """
    if not version:
        raise UnsupportedWheel(
            "%s is in an unsupported or invalid wheel" % name
        )
    if version[0] > VERSION_COMPATIBLE[0]:
        raise UnsupportedWheel(
            "%s's Wheel-Version (%s) is not compatible with this version "
            "of pip" % (name, '.'.join(map(str, version)))
        )
    elif version > VERSION_COMPATIBLE:
        logger.warn('Installing from a newer Wheel-Version (%s)'
                    % '.'.join(map(str, version)))


class Wheel(object):
    """A wheel file"""

    # TODO: maybe move the install code into this class

    wheel_file_re = re.compile(
                r"""^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))
                ((-(?P<build>\d.*?))?-(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)
                \.whl|\.dist-info)$""",
                re.VERBOSE)

    def __init__(self, filename):
        """
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        """
        wheel_info = self.wheel_file_re.match(filename)
        if not wheel_info:
            raise InvalidWheelFilename("%s is not a valid wheel filename." % filename)
        self.filename = filename
        self.name = wheel_info.group('name').replace('_', '-')
        # we'll assume "_" means "-" due to wheel naming scheme
        # (https://github.com/pypa/pip/issues/1150)
        self.version = wheel_info.group('ver').replace('_', '-')
        self.pyversions = wheel_info.group('pyver').split('.')
        self.abis = wheel_info.group('abi').split('.')
        self.plats = wheel_info.group('plat').split('.')

        # All the tag combinations from this file
        self.file_tags = set((x, y, z) for x in self.pyversions for y
                            in self.abis for z in self.plats)

    def support_index_min(self, tags=None):
        """
        Return the lowest index that one of the wheel's file_tag combinations
        achieves in the supported_tags list e.g. if there are 8 supported tags,
        and one of the file tags is first in the list, then return 0.  Returns
        None is the wheel is not supported.
        """
        if tags is None: # for mock
            tags = pep425tags.supported_tags
        indexes = [tags.index(c) for c in self.file_tags if c in tags]
        return min(indexes) if indexes else None

    def supported(self, tags=None):
        """Is this wheel supported on this system?"""
        if tags is None: # for mock
            tags = pep425tags.supported_tags
        return bool(set(tags).intersection(self.file_tags))


class WheelBuilder(object):
    """Build wheels from a RequirementSet."""

    def __init__(self, requirement_set, finder, wheel_dir, build_options=[], global_options=[]):
        self.requirement_set = requirement_set
        self.finder = finder
        self.wheel_dir = normalize_path(wheel_dir)
        self.build_options = build_options
        self.global_options = global_options

    def _build_one(self, req):
        """Build one wheel."""

        base_args = [
            sys.executable, '-c',
            "import setuptools;__file__=%r;"\
            "exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))" % req.setup_py] + \
            list(self.global_options)

        logger.notify('Running setup.py bdist_wheel for %s' % req.name)
        logger.notify('Destination directory: %s' % self.wheel_dir)
        wheel_args = base_args + ['bdist_wheel', '-d', self.wheel_dir] + self.build_options
        try:
            call_subprocess(wheel_args, cwd=req.source_dir, show_stdout=False)
            return True
        except:
            logger.error('Failed building wheel for %s' % req.name)
            return False

    def build(self):
        """Build wheels."""

        #unpack and constructs req set
        self.requirement_set.prepare_files(self.finder)

        reqset = self.requirement_set.requirements.values()

        buildset = [req for req in reqset if not req.is_wheel]

        if not buildset:
            return

        #build the wheels
        logger.notify(
            'Building wheels for collected packages: %s' %
            ','.join([req.name for req in buildset])
        )
        logger.indent += 2
        build_success, build_failure = [], []
        for req in buildset:
            if self._build_one(req):
                build_success.append(req)
            else:
                build_failure.append(req)
        logger.indent -= 2

        #notify sucess/failure
        if build_success:
            logger.notify('Successfully built %s' % ' '.join([req.name for req in build_success]))
        if build_failure:
            logger.notify('Failed to build %s' % ' '.join([req.name for req in build_failure]))
python3.3/site-packages/pip/baseparser.py000064400000017742151733566760014360 0ustar00"""Base option parser setup"""

import sys
import optparse
import os
import textwrap
from distutils.util import strtobool

from pip.backwardcompat import ConfigParser, string_types
from pip.locations import default_config_file
from pip.util import get_terminal_size, get_prog
from pip._vendor import pkg_resources


class PrettyHelpFormatter(optparse.IndentedHelpFormatter):
    """A prettier/less verbose help formatter for optparse."""

    def __init__(self, *args, **kwargs):
        # help position must be aligned with __init__.parseopts.description
        kwargs['max_help_position'] = 30
        kwargs['indent_increment'] = 1
        kwargs['width'] = get_terminal_size()[0] - 2
        optparse.IndentedHelpFormatter.__init__(self, *args, **kwargs)

    def format_option_strings(self, option):
        return self._format_option_strings(option, ' <%s>', ', ')

    def _format_option_strings(self, option, mvarfmt=' <%s>', optsep=', '):
        """
        Return a comma-separated list of option strings and metavars.

        :param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
        :param mvarfmt: metavar format string - evaluated as mvarfmt % metavar
        :param optsep:  separator
        """
        opts = []

        if option._short_opts:
            opts.append(option._short_opts[0])
        if option._long_opts:
            opts.append(option._long_opts[0])
        if len(opts) > 1:
            opts.insert(1, optsep)

        if option.takes_value():
            metavar = option.metavar or option.dest.lower()
            opts.append(mvarfmt % metavar.lower())

        return ''.join(opts)

    def format_heading(self, heading):
        if heading == 'Options':
            return ''
        return heading + ':\n'

    def format_usage(self, usage):
        """
        Ensure there is only one newline between usage and the first heading
        if there is no description.
        """
        msg = '\nUsage: %s\n' % self.indent_lines(textwrap.dedent(usage), "  ")
        return msg

    def format_description(self, description):
        # leave full control over description to us
        if description:
            if hasattr(self.parser, 'main'):
                label = 'Commands'
            else:
                label = 'Description'
            #some doc strings have inital newlines, some don't
            description = description.lstrip('\n')
            #some doc strings have final newlines and spaces, some don't
            description = description.rstrip()
            #dedent, then reindent
            description = self.indent_lines(textwrap.dedent(description), "  ")
            description = '%s:\n%s\n' % (label, description)
            return description
        else:
            return ''

    def format_epilog(self, epilog):
        # leave full control over epilog to us
        if epilog:
            return epilog
        else:
            return ''

    def indent_lines(self, text, indent):
        new_lines = [indent + line for line in text.split('\n')]
        return "\n".join(new_lines)


class UpdatingDefaultsHelpFormatter(PrettyHelpFormatter):
    """Custom help formatter for use in ConfigOptionParser that updates
    the defaults before expanding them, allowing them to show up correctly
    in the help listing"""

    def expand_default(self, option):
        if self.parser is not None:
            self.parser.update_defaults(self.parser.defaults)
        return optparse.IndentedHelpFormatter.expand_default(self, option)


class CustomOptionParser(optparse.OptionParser):
    def insert_option_group(self, idx, *args, **kwargs):
        """Insert an OptionGroup at a given position."""
        group = self.add_option_group(*args, **kwargs)

        self.option_groups.pop()
        self.option_groups.insert(idx, group)

        return group

    @property
    def option_list_all(self):
        """Get a list of all options, including those in option groups."""
        res = self.option_list[:]
        for i in self.option_groups:
            res.extend(i.option_list)

        return res


class ConfigOptionParser(CustomOptionParser):
    """Custom option parser which updates its defaults by checking the
    configuration files and environmental variables"""

    def __init__(self, *args, **kwargs):
        self.config = ConfigParser.RawConfigParser()
        self.name = kwargs.pop('name')
        self.files = self.get_config_files()
        if self.files:
            self.config.read(self.files)
        assert self.name
        optparse.OptionParser.__init__(self, *args, **kwargs)

    def get_config_files(self):
        config_file = os.environ.get('PIP_CONFIG_FILE', False)
        if config_file == os.devnull:
            return []
        if config_file and os.path.exists(config_file):
            return [config_file]
        return [default_config_file]

    def check_default(self, option, key, val):
        try:
            return option.check_value(key, val)
        except optparse.OptionValueError:
            e = sys.exc_info()[1]
            print("An error occurred during configuration: %s" % e)
            sys.exit(3)

    def update_defaults(self, defaults):
        """Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists)."""
        # Then go and look for the other sources of configuration:
        config = {}
        # 1. config files
        for section in ('global', self.name):
            config.update(self.normalize_keys(self.get_config_section(section)))
        # 2. environmental variables
        config.update(self.normalize_keys(self.get_environ_vars()))
        # Then set the options with those values
        for key, val in config.items():
            option = self.get_option(key)
            if option is not None:
                # ignore empty values
                if not val:
                    continue
                if option.action in ('store_true', 'store_false', 'count'):
                    val = strtobool(val)
                if option.action == 'append':
                    val = val.split()
                    val = [self.check_default(option, key, v) for v in val]
                else:
                    val = self.check_default(option, key, val)

                defaults[option.dest] = val
        return defaults

    def normalize_keys(self, items):
        """Return a config dictionary with normalized keys regardless of
        whether the keys were specified in environment variables or in config
        files"""
        normalized = {}
        for key, val in items:
            key = key.replace('_', '-')
            if not key.startswith('--'):
                key = '--%s' % key  # only prefer long opts
            normalized[key] = val
        return normalized

    def get_config_section(self, name):
        """Get a section of a configuration"""
        if self.config.has_section(name):
            return self.config.items(name)
        return []

    def get_environ_vars(self, prefix='PIP_'):
        """Returns a generator with all environmental vars with prefix PIP_"""
        for key, val in os.environ.items():
            if key.startswith(prefix):
                yield (key.replace(prefix, '').lower(), val)

    def get_default_values(self):
        """Overridding to make updating the defaults after instantiation of
        the option parser possible, update_defaults() does the dirty work."""
        if not self.process_default_values:
            # Old, pre-Optik 1.5 behaviour.
            return optparse.Values(self.defaults)

        defaults = self.update_defaults(self.defaults.copy())  # ours
        for option in self._get_all_options():
            default = defaults.get(option.dest)
            if isinstance(default, string_types):
                opt_str = option.get_opt_string()
                defaults[option.dest] = option.check_value(opt_str, default)
        return optparse.Values(defaults)

    def error(self, msg):
        self.print_usage(sys.stderr)
        self.exit(2, "%s\n" % msg)
python3.3/site-packages/pip/__init__.py000064400000022324151733566760013760 0ustar00import os
import optparse

import sys
import re

from pip.exceptions import InstallationError, CommandError, PipError
from pip.log import logger
from pip.util import get_installed_distributions, get_prog
from pip.vcs import git, mercurial, subversion, bazaar  # noqa
from pip.baseparser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.commands import commands, get_summaries, get_similar_commands

# This fixes a peculiarity when importing via __import__ - as we are
# initialising the pip module, "from pip import cmdoptions" is recursive
# and appears not to work properly in that situation.
import pip.cmdoptions
cmdoptions = pip.cmdoptions

# The version as used in the setup.py and the docs conf.py
__version__ = "1.5.6"


def autocomplete():
    """Command and option completion for the main option parser (and options)
    and its subcommands (and options).

    Enable by sourcing one of the completion shell scripts (bash or zsh).
    """
    # Don't complete if user hasn't sourced bash_completion file.
    if 'PIP_AUTO_COMPLETE' not in os.environ:
        return
    cwords = os.environ['COMP_WORDS'].split()[1:]
    cword = int(os.environ['COMP_CWORD'])
    try:
        current = cwords[cword - 1]
    except IndexError:
        current = ''

    subcommands = [cmd for cmd, summary in get_summaries()]
    options = []
    # subcommand
    try:
        subcommand_name = [w for w in cwords if w in subcommands][0]
    except IndexError:
        subcommand_name = None

    parser = create_main_parser()
    # subcommand options
    if subcommand_name:
        # special case: 'help' subcommand has no options
        if subcommand_name == 'help':
            sys.exit(1)
        # special case: list locally installed dists for uninstall command
        if subcommand_name == 'uninstall' and not current.startswith('-'):
            installed = []
            lc = current.lower()
            for dist in get_installed_distributions(local_only=True):
                if dist.key.startswith(lc) and dist.key not in cwords[1:]:
                    installed.append(dist.key)
            # if there are no dists installed, fall back to option completion
            if installed:
                for dist in installed:
                    print(dist)
                sys.exit(1)

        subcommand = commands[subcommand_name]()
        options += [(opt.get_opt_string(), opt.nargs)
                    for opt in subcommand.parser.option_list_all
                    if opt.help != optparse.SUPPRESS_HELP]

        # filter out previously specified options from available options
        prev_opts = [x.split('=')[0] for x in cwords[1:cword - 1]]
        options = [(x, v) for (x, v) in options if x not in prev_opts]
        # filter options by current input
        options = [(k, v) for k, v in options if k.startswith(current)]
        for option in options:
            opt_label = option[0]
            # append '=' to options which require args
            if option[1]:
                opt_label += '='
            print(opt_label)
    else:
        # show main parser options only when necessary
        if current.startswith('-') or current.startswith('--'):
            opts = [i.option_list for i in parser.option_groups]
            opts.append(parser.option_list)
            opts = (o for it in opts for o in it)

            subcommands += [i.get_opt_string() for i in opts
                            if i.help != optparse.SUPPRESS_HELP]

        print(' '.join([x for x in subcommands if x.startswith(current)]))
    sys.exit(1)


def create_main_parser():
    parser_kw = {
        'usage': '\n%prog <command> [options]',
        'add_help_option': False,
        'formatter': UpdatingDefaultsHelpFormatter(),
        'name': 'global',
        'prog': get_prog(),
    }

    parser = ConfigOptionParser(**parser_kw)
    parser.disable_interspersed_args()

    pip_pkg_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    parser.version = 'pip %s from %s (python %s)' % (
        __version__,  pip_pkg_dir, sys.version[:3])

    # add the general options
    gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, parser)
    parser.add_option_group(gen_opts)

    parser.main = True # so the help formatter knows

    # create command listing for description
    command_summaries = get_summaries()
    description = [''] + ['%-27s %s' % (i, j) for i, j in command_summaries]
    parser.description = '\n'.join(description)

    return parser


def parseopts(args):
    parser = create_main_parser()

    # Note: parser calls disable_interspersed_args(), so the result of this call
    # is to split the initial args into the general options before the
    # subcommand and everything else.
    # For example:
    #  args: ['--timeout=5', 'install', '--user', 'INITools']
    #  general_options: ['--timeout==5']
    #  args_else: ['install', '--user', 'INITools']
    general_options, args_else = parser.parse_args(args)

    # --version
    if general_options.version:
        sys.stdout.write(parser.version)
        sys.stdout.write(os.linesep)
        sys.exit()

    # pip || pip help -> print_help()
    if not args_else or (args_else[0] == 'help' and len(args_else) == 1):
        parser.print_help()
        sys.exit()

    # the subcommand name
    cmd_name = args_else[0].lower()

    #all the args without the subcommand
    cmd_args = args[:]
    cmd_args.remove(args_else[0].lower())

    if cmd_name not in commands:
        guess = get_similar_commands(cmd_name)

        msg = ['unknown command "%s"' % cmd_name]
        if guess:
            msg.append('maybe you meant "%s"' % guess)

        raise CommandError(' - '.join(msg))

    return cmd_name, cmd_args


def main(initial_args=None):
    if initial_args is None:
        initial_args = sys.argv[1:]

    autocomplete()

    try:
        cmd_name, cmd_args = parseopts(initial_args)
    except PipError:
        e = sys.exc_info()[1]
        sys.stderr.write("ERROR: %s" % e)
        sys.stderr.write(os.linesep)
        sys.exit(1)

    command = commands[cmd_name]()
    return command.main(cmd_args)


def bootstrap():
    """
    Bootstrapping function to be called from install-pip.py script.
    """
    pkgs = ['pip']
    try:
        import setuptools
    except ImportError:
        pkgs.append('setuptools')
    return main(['install', '--upgrade'] + pkgs + sys.argv[1:])

############################################################
## Writing freeze files


class FrozenRequirement(object):

    def __init__(self, name, req, editable, comments=()):
        self.name = name
        self.req = req
        self.editable = editable
        self.comments = comments

    _rev_re = re.compile(r'-r(\d+)$')
    _date_re = re.compile(r'-(20\d\d\d\d\d\d)$')

    @classmethod
    def from_dist(cls, dist, dependency_links, find_tags=False):
        location = os.path.normcase(os.path.abspath(dist.location))
        comments = []
        from pip.vcs import vcs, get_src_requirement
        if vcs.get_backend_name(location):
            editable = True
            try:
                req = get_src_requirement(dist, location, find_tags)
            except InstallationError:
                ex = sys.exc_info()[1]
                logger.warn("Error when trying to get requirement for VCS system %s, falling back to uneditable format" % ex)
                req = None
            if req is None:
                logger.warn('Could not determine repository location of %s' % location)
                comments.append('## !! Could not determine repository location')
                req = dist.as_requirement()
                editable = False
        else:
            editable = False
            req = dist.as_requirement()
            specs = req.specs
            assert len(specs) == 1 and specs[0][0] == '=='
            version = specs[0][1]
            ver_match = cls._rev_re.search(version)
            date_match = cls._date_re.search(version)
            if ver_match or date_match:
                svn_backend = vcs.get_backend('svn')
                if svn_backend:
                    svn_location = svn_backend(
                        ).get_location(dist, dependency_links)
                if not svn_location:
                    logger.warn(
                        'Warning: cannot find svn location for %s' % req)
                    comments.append('## FIXME: could not find svn URL in dependency_links for this package:')
                else:
                    comments.append('# Installing as editable to satisfy requirement %s:' % req)
                    if ver_match:
                        rev = ver_match.group(1)
                    else:
                        rev = '{%s}' % date_match.group(1)
                    editable = True
                    req = '%s@%s#egg=%s' % (svn_location, rev, cls.egg_name(dist))
        return cls(dist.project_name, req, editable, comments)

    @staticmethod
    def egg_name(dist):
        name = dist.egg_name()
        match = re.search(r'-py\d\.\d$', name)
        if match:
            name = name[:match.start()]
        return name

    def __str__(self):
        req = self.req
        if self.editable:
            req = '-e %s' % req
        return '\n'.join(list(self.comments) + [str(req)]) + '\n'


if __name__ == '__main__':
    exit = main()
    if exit:
        sys.exit(exit)
python3.3/site-packages/pip/locations.py000064400000014072151733566760014215 0ustar00"""Locations where we look for configs, install stuff, etc"""

import sys
import site
import os
import tempfile
from distutils.command.install import install, SCHEME_KEYS
import getpass
from pip.backwardcompat import get_python_lib, get_path_uid, user_site
import pip.exceptions


DELETE_MARKER_MESSAGE = '''\
This file is placed here by pip to indicate the source was put
here by pip.

Once this package is successfully installed this source code will be
deleted (unless you remove this file).
'''
PIP_DELETE_MARKER_FILENAME = 'pip-delete-this-directory.txt'

def write_delete_marker_file(directory):
    """
    Write the pip delete marker file into this directory.
    """
    filepath = os.path.join(directory, PIP_DELETE_MARKER_FILENAME)
    marker_fp = open(filepath, 'w')
    marker_fp.write(DELETE_MARKER_MESSAGE)
    marker_fp.close()


def running_under_virtualenv():
    """
    Return True if we're running inside a virtualenv, False otherwise.

    """
    if hasattr(sys, 'real_prefix'):
        return True
    elif sys.prefix != getattr(sys, "base_prefix", sys.prefix):
        return True

    return False


def virtualenv_no_global():
    """
    Return True if in a venv and no system site packages.
    """
    #this mirrors the logic in virtualenv.py for locating the no-global-site-packages.txt file
    site_mod_dir = os.path.dirname(os.path.abspath(site.__file__))
    no_global_file = os.path.join(site_mod_dir, 'no-global-site-packages.txt')
    if running_under_virtualenv() and os.path.isfile(no_global_file):
        return True

def __get_username():
    """ Returns the effective username of the current process. """
    if sys.platform == 'win32':
        return getpass.getuser()
    import pwd
    return pwd.getpwuid(os.geteuid()).pw_name

def _get_build_prefix():
    """ Returns a safe build_prefix """
    path = os.path.join(tempfile.gettempdir(), 'pip_build_%s' %
        __get_username())
    if sys.platform == 'win32':
        """ on windows(tested on 7) temp dirs are isolated """
        return path
    try:
        os.mkdir(path)
        write_delete_marker_file(path)
    except OSError:
        file_uid = None
        try:
            # raises OSError for symlinks
            # https://github.com/pypa/pip/pull/935#discussion_r5307003
            file_uid = get_path_uid(path)
        except OSError:
            file_uid = None

        if file_uid != os.geteuid():
            msg = "The temporary folder for building (%s) is either not owned by you, or is a symlink." \
                % path
            print (msg)
            print("pip will not work until the temporary folder is " + \
                 "either deleted or is a real directory owned by your user account.")
            raise pip.exceptions.InstallationError(msg)
    return path

if running_under_virtualenv():
    build_prefix = os.path.join(sys.prefix, 'build')
    src_prefix = os.path.join(sys.prefix, 'src')
else:
    # Note: intentionally NOT using mkdtemp
    # See https://github.com/pypa/pip/issues/906 for plan to move to mkdtemp
    build_prefix = _get_build_prefix()

    ## FIXME: keep src in cwd for now (it is not a temporary folder)
    try:
        src_prefix = os.path.join(os.getcwd(), 'src')
    except OSError:
        # In case the current working directory has been renamed or deleted
        sys.exit("The folder you are executing pip from can no longer be found.")

# under Mac OS X + virtualenv sys.prefix is not properly resolved
# it is something like /path/to/python/bin/..
# Note: using realpath due to tmp dirs on OSX being symlinks
build_prefix = os.path.abspath(os.path.realpath(build_prefix))
src_prefix = os.path.abspath(src_prefix)

# FIXME doesn't account for venv linked to global site-packages

site_packages = get_python_lib()
user_dir = os.path.expanduser('~')
if sys.platform == 'win32':
    bin_py = os.path.join(sys.prefix, 'Scripts')
    bin_user = os.path.join(user_site, 'Scripts') if user_site else None
    # buildout uses 'bin' on Windows too?
    if not os.path.exists(bin_py):
        bin_py = os.path.join(sys.prefix, 'bin')
        bin_user = os.path.join(user_site, 'bin') if user_site else None
    default_storage_dir = os.path.join(user_dir, 'pip')
    default_config_file = os.path.join(default_storage_dir, 'pip.ini')
    default_log_file = os.path.join(default_storage_dir, 'pip.log')
else:
    bin_py = os.path.join(sys.prefix, 'bin')
    bin_user = os.path.join(user_site, 'bin') if user_site else None
    default_storage_dir = os.path.join(user_dir, '.pip')
    default_config_file = os.path.join(default_storage_dir, 'pip.conf')
    default_log_file = os.path.join(default_storage_dir, 'pip.log')

    # Forcing to use /usr/local/bin for standard Mac OS X framework installs
    # Also log to ~/Library/Logs/ for use with the Console.app log viewer
    if sys.platform[:6] == 'darwin' and sys.prefix[:16] == '/System/Library/':
        bin_py = '/usr/local/bin'
        default_log_file = os.path.join(user_dir, 'Library/Logs/pip.log')


def distutils_scheme(dist_name, user=False, home=None, root=None):
    """
    Return a distutils install scheme
    """
    from distutils.dist import Distribution

    scheme = {}
    d = Distribution({'name': dist_name})
    d.parse_config_files()
    i = d.get_command_obj('install', create=True)
    # NOTE: setting user or home has the side-effect of creating the home dir or
    # user base for installations during finalize_options()
    # ideally, we'd prefer a scheme class that has no side-effects.
    i.user = user or i.user
    i.home = home or i.home
    i.root = root or i.root
    i.finalize_options()
    for key in SCHEME_KEYS:
        scheme[key] = getattr(i, 'install_'+key)

    if running_under_virtualenv():
        scheme['headers'] = os.path.join(sys.prefix,
                                    'include',
                                    'site',
                                    'python' + sys.version[:3],
                                    dist_name)

        if root is not None:
            scheme["headers"] = os.path.join(
                root,
                os.path.abspath(scheme["headers"])[1:],
            )

    return scheme
python3.3/site-packages/pip/exceptions.py000064400000002076151733566760014404 0ustar00"""Exceptions used throughout package"""


class PipError(Exception):
    """Base pip exception"""


class InstallationError(PipError):
    """General exception during installation"""


class UninstallationError(PipError):
    """General exception during uninstallation"""


class DistributionNotFound(InstallationError):
    """Raised when a distribution cannot be found to satisfy a requirement"""


class BestVersionAlreadyInstalled(PipError):
    """Raised when the most up-to-date version of a package is already
    installed.  """


class BadCommand(PipError):
    """Raised when virtualenv or a command is not found"""


class CommandError(PipError):
    """Raised when there is an error in command-line arguments"""


class PreviousBuildDirError(PipError):
    """Raised when there's a previous conflicting build directory"""


class HashMismatch(InstallationError):
    """Distribution file hash values don't match."""


class InvalidWheelFilename(InstallationError):
    """Invalid wheel filename."""


class UnsupportedWheel(InstallationError):
    """Unsupported wheel."""
python3.3/site-packages/pip/util.py000064400000061044151733566760013200 0ustar00import sys
import shutil
import os
import stat
import re
import posixpath
import zipfile
import tarfile
import subprocess
import textwrap
import tempfile

from pip.exceptions import InstallationError, BadCommand, PipError
from pip.backwardcompat import(WindowsError, string_types, raw_input,
                                console_to_str, user_site, PermissionError)
from pip.locations import site_packages, running_under_virtualenv, virtualenv_no_global
from pip.log import logger
from pip._vendor import pkg_resources
from pip._vendor.distlib import version

__all__ = ['rmtree', 'display_path', 'backup_dir',
           'find_command', 'ask', 'Inf',
           'normalize_name', 'splitext',
           'format_size', 'is_installable_dir',
           'is_svn_page', 'file_contents',
           'split_leading_dir', 'has_leading_dir',
           'make_path_relative', 'normalize_path',
           'renames', 'get_terminal_size', 'get_prog',
           'unzip_file', 'untar_file', 'create_download_cache_folder',
           'cache_download', 'unpack_file', 'call_subprocess']


def get_prog():
    try:
        if os.path.basename(sys.argv[0]) in ('__main__.py', '-c'):
            return "%s -m pip" % sys.executable
    except (AttributeError, TypeError, IndexError):
        pass
    return 'pip'


def rmtree(dir, ignore_errors=False):
    shutil.rmtree(dir, ignore_errors=ignore_errors,
                  onerror=rmtree_errorhandler)


def rmtree_errorhandler(func, path, exc_info):
    """On Windows, the files in .svn are read-only, so when rmtree() tries to
    remove them, an exception is thrown.  We catch that here, remove the
    read-only attribute, and hopefully continue without problems."""
    exctype, value = exc_info[:2]
    if not ((exctype is WindowsError and value.args[0] == 5) or #others
            (exctype is OSError and value.args[0] == 13) or #python2.4
            (exctype is PermissionError and value.args[3] == 5) #python3.3
            ):
        raise
    # file type should currently be read only
    if ((os.stat(path).st_mode & stat.S_IREAD) != stat.S_IREAD):
        raise
    # convert to read/write
    os.chmod(path, stat.S_IWRITE)
    # use the original function to repeat the operation
    func(path)


def display_path(path):
    """Gives the display value for a given path, making it relative to cwd
    if possible."""
    path = os.path.normcase(os.path.abspath(path))
    if path.startswith(os.getcwd() + os.path.sep):
        path = '.' + path[len(os.getcwd()):]
    return path


def backup_dir(dir, ext='.bak'):
    """Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)"""
    n = 1
    extension = ext
    while os.path.exists(dir + extension):
        n += 1
        extension = ext + str(n)
    return dir + extension


def find_command(cmd, paths=None, pathext=None):
    """Searches the PATH for the given command and returns its path"""
    if paths is None:
        paths = os.environ.get('PATH', '').split(os.pathsep)
    if isinstance(paths, string_types):
        paths = [paths]
    # check if there are funny path extensions for executables, e.g. Windows
    if pathext is None:
        pathext = get_pathext()
    pathext = [ext for ext in pathext.lower().split(os.pathsep) if len(ext)]
    # don't use extensions if the command ends with one of them
    if os.path.splitext(cmd)[1].lower() in pathext:
        pathext = ['']
    # check if we find the command on PATH
    for path in paths:
        # try without extension first
        cmd_path = os.path.join(path, cmd)
        for ext in pathext:
            # then including the extension
            cmd_path_ext = cmd_path + ext
            if os.path.isfile(cmd_path_ext):
                return cmd_path_ext
        if os.path.isfile(cmd_path):
            return cmd_path
    raise BadCommand('Cannot find command %r' % cmd)


def get_pathext(default_pathext=None):
    """Returns the path extensions from environment or a default"""
    if default_pathext is None:
        default_pathext = os.pathsep.join(['.COM', '.EXE', '.BAT', '.CMD'])
    pathext = os.environ.get('PATHEXT', default_pathext)
    return pathext


def ask_path_exists(message, options):
    for action in os.environ.get('PIP_EXISTS_ACTION', '').split():
        if action in options:
            return action
    return ask(message, options)


def ask(message, options):
    """Ask the message interactively, with the given possible responses"""
    while 1:
        if os.environ.get('PIP_NO_INPUT'):
            raise Exception('No input was expected ($PIP_NO_INPUT set); question: %s' % message)
        response = raw_input(message)
        response = response.strip().lower()
        if response not in options:
            print('Your response (%r) was not one of the expected responses: %s' % (
                response, ', '.join(options)))
        else:
            return response


class _Inf(object):
    """I am bigger than everything!"""

    def __eq__(self, other):
        if self is other:
            return True
        else:
            return False

    def __ne__(self, other):
        return not self.__eq__(other)

    def __lt__(self, other):
        return False

    def __le__(self, other):
        return False

    def __gt__(self, other):
        return True

    def __ge__(self, other):
        return True

    def __repr__(self):
        return 'Inf'


Inf = _Inf() #this object is not currently used as a sortable in our code
del _Inf


_normalize_re = re.compile(r'[^a-z]', re.I)


def normalize_name(name):
    return _normalize_re.sub('-', name.lower())


def format_size(bytes):
    if bytes > 1000*1000:
        return '%.1fMB' % (bytes/1000.0/1000)
    elif bytes > 10*1000:
        return '%ikB' % (bytes/1000)
    elif bytes > 1000:
        return '%.1fkB' % (bytes/1000.0)
    else:
        return '%ibytes' % bytes


def is_installable_dir(path):
    """Return True if `path` is a directory containing a setup.py file."""
    if not os.path.isdir(path):
        return False
    setup_py = os.path.join(path, 'setup.py')
    if os.path.isfile(setup_py):
        return True
    return False


def is_svn_page(html):
    """Returns true if the page appears to be the index page of an svn repository"""
    return (re.search(r'<title>[^<]*Revision \d+:', html)
            and re.search(r'Powered by (?:<a[^>]*?>)?Subversion', html, re.I))


def file_contents(filename):
    fp = open(filename, 'rb')
    try:
        return fp.read().decode('utf-8')
    finally:
        fp.close()


def split_leading_dir(path):
    path = str(path)
    path = path.lstrip('/').lstrip('\\')
    if '/' in path and (('\\' in path and path.find('/') < path.find('\\'))
                        or '\\' not in path):
        return path.split('/', 1)
    elif '\\' in path:
        return path.split('\\', 1)
    else:
        return path, ''


def has_leading_dir(paths):
    """Returns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)"""
    common_prefix = None
    for path in paths:
        prefix, rest = split_leading_dir(path)
        if not prefix:
            return False
        elif common_prefix is None:
            common_prefix = prefix
        elif prefix != common_prefix:
            return False
    return True


def make_path_relative(path, rel_to):
    """
    Make a filename relative, where the filename path, and it is
    relative to rel_to

        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/usr/share/another-place/src/Directory')
        '../../../something/a-file.pth'
        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/home/user/src/Directory')
        '../../../usr/share/something/a-file.pth'
        >>> make_relative_path('/usr/share/a-file.pth', '/usr/share/')
        'a-file.pth'
    """
    path_filename = os.path.basename(path)
    path = os.path.dirname(path)
    path = os.path.normpath(os.path.abspath(path))
    rel_to = os.path.normpath(os.path.abspath(rel_to))
    path_parts = path.strip(os.path.sep).split(os.path.sep)
    rel_to_parts = rel_to.strip(os.path.sep).split(os.path.sep)
    while path_parts and rel_to_parts and path_parts[0] == rel_to_parts[0]:
        path_parts.pop(0)
        rel_to_parts.pop(0)
    full_parts = ['..']*len(rel_to_parts) + path_parts + [path_filename]
    if full_parts == ['']:
        return '.' + os.path.sep
    return os.path.sep.join(full_parts)


def normalize_path(path):
    """
    Convert a path to its canonical, case-normalized, absolute version.

    """
    return os.path.normcase(os.path.realpath(os.path.expanduser(path)))


def splitext(path):
    """Like os.path.splitext, but take off .tar too"""
    base, ext = posixpath.splitext(path)
    if base.lower().endswith('.tar'):
        ext = base[-4:] + ext
        base = base[:-4]
    return base, ext


def renames(old, new):
    """Like os.renames(), but handles renaming across devices."""
    # Implementation borrowed from os.renames().
    head, tail = os.path.split(new)
    if head and tail and not os.path.exists(head):
        os.makedirs(head)

    shutil.move(old, new)

    head, tail = os.path.split(old)
    if head and tail:
        try:
            os.removedirs(head)
        except OSError:
            pass


def is_local(path):
    """
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    """
    if not running_under_virtualenv():
        return True
    return normalize_path(path).startswith(normalize_path(sys.prefix))


def dist_is_local(dist):
    """
    Return True if given Distribution object is installed locally
    (i.e. within current virtualenv).

    Always True if we're not in a virtualenv.

    """
    return is_local(dist_location(dist))


def dist_in_usersite(dist):
    """
    Return True if given Distribution is installed in user site.
    """
    if user_site:
        return normalize_path(dist_location(dist)).startswith(normalize_path(user_site))
    else:
        return False

def dist_in_site_packages(dist):
    """
    Return True if given Distribution is installed in distutils.sysconfig.get_python_lib().
    """
    return normalize_path(dist_location(dist)).startswith(normalize_path(site_packages))


def dist_is_editable(dist):
    """Is distribution an editable install?"""
    #TODO: factor out determining editableness out of FrozenRequirement
    from pip import FrozenRequirement
    req = FrozenRequirement.from_dist(dist, [])
    return req.editable

def get_installed_distributions(local_only=True,
                                skip=('setuptools', 'pip', 'python', 'distribute'),
                                include_editables=True,
                                editables_only=False):
    """
    Return a list of installed Distribution objects.

    If ``local_only`` is True (default), only return installations
    local to the current virtualenv, if in a virtualenv.

    ``skip`` argument is an iterable of lower-case project names to
    ignore; defaults to ('setuptools', 'pip', 'python'). [FIXME also
    skip virtualenv?]

    If ``editables`` is False, don't report editables.

    If ``editables_only`` is True , only report editables.

    """
    if local_only:
        local_test = dist_is_local
    else:
        local_test = lambda d: True

    if include_editables:
        editable_test = lambda d: True
    else:
        editable_test = lambda d: not dist_is_editable(d)

    if editables_only:
        editables_only_test = lambda d: dist_is_editable(d)
    else:
        editables_only_test = lambda d: True

    return [d for d in pkg_resources.working_set
            if local_test(d)
            and d.key not in skip
            and editable_test(d)
            and editables_only_test(d)
            ]


def egg_link_path(dist):
    """
    Return the path for the .egg-link file if it exists, otherwise, None.

    There's 3 scenarios:
    1) not in a virtualenv
       try to find in site.USER_SITE, then site_packages
    2) in a no-global virtualenv
       try to find in site_packages
    3) in a yes-global virtualenv
       try to find in site_packages, then site.USER_SITE  (don't look in global location)

    For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations.
    This method will just return the first one found.
    """
    sites = []
    if running_under_virtualenv():
        if virtualenv_no_global():
            sites.append(site_packages)
        else:
            sites.append(site_packages)
            if user_site:
                sites.append(user_site)
    else:
        if user_site:
            sites.append(user_site)
        sites.append(site_packages)

    for site in sites:
        egglink = os.path.join(site, dist.project_name) + '.egg-link'
        if os.path.isfile(egglink):
            return egglink


def dist_location(dist):
    """
    Get the site-packages location of this distribution. Generally
    this is dist.location, except in the case of develop-installed
    packages, where dist.location is the source code location, and we
    want to know where the egg-link file is.

    """
    egg_link = egg_link_path(dist)
    if egg_link:
        return egg_link
    return dist.location


def get_terminal_size():
    """Returns a tuple (x, y) representing the width(x) and the height(x)
    in characters of the terminal window."""
    def ioctl_GWINSZ(fd):
        try:
            import fcntl
            import termios
            import struct
            cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ,
        '1234'))
        except:
            return None
        if cr == (0, 0):
            return None
        if cr == (0, 0):
            return None
        return cr
    cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2)
    if not cr:
        try:
            fd = os.open(os.ctermid(), os.O_RDONLY)
            cr = ioctl_GWINSZ(fd)
            os.close(fd)
        except:
            pass
    if not cr:
        cr = (os.environ.get('LINES', 25), os.environ.get('COLUMNS', 80))
    return int(cr[1]), int(cr[0])


def current_umask():
    """Get the current umask which involves having to set it temporarily."""
    mask = os.umask(0)
    os.umask(mask)
    return mask


def unzip_file(filename, location, flatten=True):
    """
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    """
    if not os.path.exists(location):
        os.makedirs(location)
    zipfp = open(filename, 'rb')
    try:
        zip = zipfile.ZipFile(zipfp)
        leading = has_leading_dir(zip.namelist()) and flatten
        for info in zip.infolist():
            name = info.filename
            data = zip.read(name)
            fn = name
            if leading:
                fn = split_leading_dir(name)[1]
            fn = os.path.join(location, fn)
            dir = os.path.dirname(fn)
            if not os.path.exists(dir):
                os.makedirs(dir)
            if fn.endswith('/') or fn.endswith('\\'):
                # A directory
                if not os.path.exists(fn):
                    os.makedirs(fn)
            else:
                fp = open(fn, 'wb')
                try:
                    fp.write(data)
                finally:
                    fp.close()
                    mode = info.external_attr >> 16
                    # if mode and regular file and any execute permissions for user/group/world?
                    if mode and stat.S_ISREG(mode) and  mode & 0o111:
                        # make dest file have execute for user/group/world (chmod +x)
                        # no-op on windows per python docs
                        os.chmod(fn, (0o777-current_umask() | 0o111))
    finally:
        zipfp.close()


def untar_file(filename, location):
    """
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    """
    if not os.path.exists(location):
        os.makedirs(location)
    if filename.lower().endswith('.gz') or filename.lower().endswith('.tgz'):
        mode = 'r:gz'
    elif filename.lower().endswith('.bz2') or filename.lower().endswith('.tbz'):
        mode = 'r:bz2'
    elif filename.lower().endswith('.tar'):
        mode = 'r'
    else:
        logger.warn('Cannot determine compression type for file %s' % filename)
        mode = 'r:*'
    tar = tarfile.open(filename, mode)
    try:
        # note: python<=2.5 doesnt seem to know about pax headers, filter them
        leading = has_leading_dir([
            member.name for member in tar.getmembers()
            if member.name != 'pax_global_header'
        ])
        for member in tar.getmembers():
            fn = member.name
            if fn == 'pax_global_header':
                continue
            if leading:
                fn = split_leading_dir(fn)[1]
            path = os.path.join(location, fn)
            if member.isdir():
                if not os.path.exists(path):
                    os.makedirs(path)
            elif member.issym():
                try:
                    tar._extract_member(member, path)
                except:
                    e = sys.exc_info()[1]
                    # Some corrupt tar files seem to produce this
                    # (specifically bad symlinks)
                    logger.warn(
                        'In the tar file %s the member %s is invalid: %s'
                        % (filename, member.name, e))
                    continue
            else:
                try:
                    fp = tar.extractfile(member)
                except (KeyError, AttributeError):
                    e = sys.exc_info()[1]
                    # Some corrupt tar files seem to produce this
                    # (specifically bad symlinks)
                    logger.warn(
                        'In the tar file %s the member %s is invalid: %s'
                        % (filename, member.name, e))
                    continue
                if not os.path.exists(os.path.dirname(path)):
                    os.makedirs(os.path.dirname(path))
                destfp = open(path, 'wb')
                try:
                    shutil.copyfileobj(fp, destfp)
                finally:
                    destfp.close()
                fp.close()
                # member have any execute permissions for user/group/world?
                if member.mode & 0o111:
                    # make dest file have execute for user/group/world
                    # no-op on windows per python docs
                    os.chmod(path, (0o777-current_umask() | 0o111))
    finally:
        tar.close()


def create_download_cache_folder(folder):
    logger.indent -= 2
    logger.notify('Creating supposed download cache at %s' % folder)
    logger.indent += 2
    os.makedirs(folder)


def cache_download(target_file, temp_location, content_type):
    logger.notify('Storing download in cache at %s' % display_path(target_file))
    shutil.copyfile(temp_location, target_file)
    fp = open(target_file+'.content-type', 'w')
    fp.write(content_type)
    fp.close()


def unpack_file(filename, location, content_type, link):
    filename = os.path.realpath(filename)
    if (content_type == 'application/zip'
        or filename.endswith('.zip')
        or filename.endswith('.pybundle')
        or filename.endswith('.whl')
        or zipfile.is_zipfile(filename)):
        unzip_file(filename, location, flatten=not filename.endswith(('.pybundle', '.whl')))
    elif (content_type == 'application/x-gzip'
          or tarfile.is_tarfile(filename)
          or splitext(filename)[1].lower() in ('.tar', '.tar.gz', '.tar.bz2', '.tgz', '.tbz')):
        untar_file(filename, location)
    elif (content_type and content_type.startswith('text/html')
          and is_svn_page(file_contents(filename))):
        # We don't really care about this
        from pip.vcs.subversion import Subversion
        Subversion('svn+' + link.url).unpack(location)
    else:
        ## FIXME: handle?
        ## FIXME: magic signatures?
        logger.fatal('Cannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive format'
                     % (filename, location, content_type))
        raise InstallationError('Cannot determine archive format of %s' % location)


def call_subprocess(cmd, show_stdout=True,
                    filter_stdout=None, cwd=None,
                    raise_on_returncode=True,
                    command_level=logger.DEBUG, command_desc=None,
                    extra_environ=None):
    if command_desc is None:
        cmd_parts = []
        for part in cmd:
            if ' ' in part or '\n' in part or '"' in part or "'" in part:
                part = '"%s"' % part.replace('"', '\\"')
            cmd_parts.append(part)
        command_desc = ' '.join(cmd_parts)
    if show_stdout:
        stdout = None
    else:
        stdout = subprocess.PIPE
    logger.log(command_level, "Running command %s" % command_desc)
    env = os.environ.copy()
    if extra_environ:
        env.update(extra_environ)
    try:
        proc = subprocess.Popen(
            cmd, stderr=subprocess.STDOUT, stdin=None, stdout=stdout,
            cwd=cwd, env=env)
    except Exception:
        e = sys.exc_info()[1]
        logger.fatal(
            "Error %s while executing command %s" % (e, command_desc))
        raise
    all_output = []
    if stdout is not None:
        stdout = proc.stdout
        while 1:
            line = console_to_str(stdout.readline())
            if not line:
                break
            line = line.rstrip()
            all_output.append(line + '\n')
            if filter_stdout:
                level = filter_stdout(line)
                if isinstance(level, tuple):
                    level, line = level
                logger.log(level, line)
                if not logger.stdout_level_matches(level):
                    logger.show_progress()
            else:
                logger.info(line)
    else:
        returned_stdout, returned_stderr = proc.communicate()
        all_output = [returned_stdout or '']
    proc.wait()
    if proc.returncode:
        if raise_on_returncode:
            if all_output:
                logger.notify('Complete output from command %s:' % command_desc)
                logger.notify('\n'.join(all_output) + '\n----------------------------------------')
            raise InstallationError(
                "Command %s failed with error code %s in %s"
                % (command_desc, proc.returncode, cwd))
        else:
            logger.warn(
                "Command %s had error code %s in %s"
                % (command_desc, proc.returncode, cwd))
    if stdout is not None:
        return ''.join(all_output)


def is_prerelease(vers):
    """
    Attempt to determine if this is a pre-release using PEP386/PEP426 rules.

    Will return True if it is a pre-release and False if not. Versions are
    assumed to be a pre-release if they cannot be parsed.
    """
    normalized = version._suggest_normalized_version(vers)

    if normalized is None:
        # Cannot normalize, assume it is a pre-release
        return True

    parsed = version._normalized_key(normalized)
    return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])


class BuildDirectory(object):

    def __init__(self, name=None, delete=None):
        # If we were not given an explicit directory, and we were not given an
        # explicit delete option, then we'll default to deleting.
        if name is None and delete is None:
            delete = True

        if name is None:
            name = tempfile.mkdtemp(prefix="pip-build-")
            # If we were not given an explicit directory, and we were not given
            # an explicit delete option, then we'll default to deleting.
            if delete is None:
                delete = True

        self.name = name
        self.delete = delete

    def __repr__(self):
        return "<{} {!r}>".format(self.__class__.__name__, self.name)

    def __enter__(self):
        return self.name

    def __exit__(self, exc, value, tb):
        self.cleanup()

    def cleanup(self):
        if self.delete:
            rmtree(self.name)
python3.3/site-packages/pip/vcs/bazaar.py000064400000011517151733566760014256 0ustar00import os
import tempfile
import re
from pip.backwardcompat import urlparse
from pip.log import logger
from pip.util import rmtree, display_path, call_subprocess
from pip.vcs import vcs, VersionControl
from pip.download import path_to_url


class Bazaar(VersionControl):
    name = 'bzr'
    dirname = '.bzr'
    repo_name = 'branch'
    bundle_file = 'bzr-branch.txt'
    schemes = ('bzr', 'bzr+http', 'bzr+https', 'bzr+ssh', 'bzr+sftp', 'bzr+ftp', 'bzr+lp')
    guide = ('# This was a Bazaar branch; to make it a branch again run:\n'
             'bzr branch -r %(rev)s %(url)s .\n')

    def __init__(self, url=None, *args, **kwargs):
        super(Bazaar, self).__init__(url, *args, **kwargs)
        # Python >= 2.7.4, 3.3 doesn't have uses_fragment or non_hierarchical
        # Register lp but do not expose as a scheme to support bzr+lp.
        if getattr(urlparse, 'uses_fragment', None):
            urlparse.uses_fragment.extend(['lp'])
            urlparse.non_hierarchical.extend(['lp'])

    def parse_vcs_bundle_file(self, content):
        url = rev = None
        for line in content.splitlines():
            if not line.strip() or line.strip().startswith('#'):
                continue
            match = re.search(r'^bzr\s*branch\s*-r\s*(\d*)', line)
            if match:
                rev = match.group(1).strip()
            url = line[match.end():].strip().split(None, 1)[0]
            if url and rev:
                return url, rev
        return None, None

    def export(self, location):
        """Export the Bazaar repository at the url to the destination location"""
        temp_dir = tempfile.mkdtemp('-export', 'pip-')
        self.unpack(temp_dir)
        if os.path.exists(location):
            # Remove the location to make sure Bazaar can export it correctly
            rmtree(location)
        try:
            call_subprocess([self.cmd, 'export', location], cwd=temp_dir,
                            filter_stdout=self._filter, show_stdout=False)
        finally:
            rmtree(temp_dir)

    def switch(self, dest, url, rev_options):
        call_subprocess([self.cmd, 'switch', url], cwd=dest)

    def update(self, dest, rev_options):
        call_subprocess(
            [self.cmd, 'pull', '-q'] + rev_options, cwd=dest)

    def obtain(self, dest):
        url, rev = self.get_url_rev()
        if rev:
            rev_options = ['-r', rev]
            rev_display = ' (to revision %s)' % rev
        else:
            rev_options = []
            rev_display = ''
        if self.check_destination(dest, url, rev_options, rev_display):
            logger.notify('Checking out %s%s to %s'
                          % (url, rev_display, display_path(dest)))
            call_subprocess(
                [self.cmd, 'branch', '-q'] + rev_options + [url, dest])

    def get_url_rev(self):
        # hotfix the URL scheme after removing bzr+ from bzr+ssh:// readd it
        url, rev = super(Bazaar, self).get_url_rev()
        if url.startswith('ssh://'):
            url = 'bzr+' + url
        return url, rev

    def get_url(self, location):
        urls = call_subprocess(
            [self.cmd, 'info'], show_stdout=False, cwd=location)
        for line in urls.splitlines():
            line = line.strip()
            for x in ('checkout of branch: ',
                      'parent branch: '):
                if line.startswith(x):
                    repo = line.split(x)[1]
                    if self._is_local_repository(repo):
                        return path_to_url(repo)
                    return repo
        return None

    def get_revision(self, location):
        revision = call_subprocess(
            [self.cmd, 'revno'], show_stdout=False, cwd=location)
        return revision.splitlines()[-1]

    def get_tag_revs(self, location):
        tags = call_subprocess(
            [self.cmd, 'tags'], show_stdout=False, cwd=location)
        tag_revs = []
        for line in tags.splitlines():
            tags_match = re.search(r'([.\w-]+)\s*(.*)$', line)
            if tags_match:
                tag = tags_match.group(1)
                rev = tags_match.group(2)
                tag_revs.append((rev.strip(), tag.strip()))
        return dict(tag_revs)

    def get_src_requirement(self, dist, location, find_tags):
        repo = self.get_url(location)
        if not repo.lower().startswith('bzr:'):
            repo = 'bzr+' + repo
        egg_project_name = dist.egg_name().split('-', 1)[0]
        if not repo:
            return None
        current_rev = self.get_revision(location)
        tag_revs = self.get_tag_revs(location)

        if current_rev in tag_revs:
            # It's a tag
            full_egg_name = '%s-%s' % (egg_project_name, tag_revs[current_rev])
        else:
            full_egg_name = '%s-dev_r%s' % (dist.egg_name(), current_rev)
        return '%s@%s#egg=%s' % (repo, current_rev, full_egg_name)


vcs.register(Bazaar)
python3.3/site-packages/pip/vcs/__pycache__/subversion.cpython-33.pyc000064400000030211151733566760021466 0ustar00�
7�Re�)c@sddlZddlZddlmZddlmZddlmZmZm	Z	ddl
mZddlm
Z
mZejd�Zejd�Zejd	�Zejd
�Zejd�Zejd�ZGd
d�de�Zdd�Ze
je�dS(iN(uurlparse(uLink(urmtreeudisplay_pathucall_subprocess(ulogger(uvcsuVersionControlu
url="([^"]+)"ucommitted-rev="(\d+)"u	URL: (.+)uRevision: (.+)u\s*revision="(\d+)"u<url>(.*)</url>cs�|EeZdZdZdZdZd&ZdZd	Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Z�fdd�Zdd�Zdd�Zd d!�Zd"d#�Zd'd$d%�Z�S((u
Subversionusvnu.svnucheckoutusvn+sshusvn+httpu	svn+httpsusvn+svnusvn-checkout.txtug# This was an svn checkout; to make it a checkout again run:
svn checkout --force -r %(rev)s %(url)s .
cCs|jd�j|j�s,td|��t|jd|gdddidd6�}tj|�}|s�t	j
dt|��t	jd	|�dS|jd
�j�}tj|�}|s�t	j
dt|��t	jd	|�|d
fS||jd
�fS(u/Returns (url, revision), where both are stringsu/uBad directory: %suinfoushow_stdoutu
extra_environuCuLANGu'Cannot determine URL of svn checkout %su!Output that cannot be parsed: 
%siu,Cannot determine revision of svn checkout %sFN(NN(urstripuendswithudirnameuAssertionErrorucall_subprocessucmduFalseu_svn_url_reusearchuloggeruwarnudisplay_pathuinfouNoneugroupustripu_svn_revision_re(uselfulocationuoutputumatchuurl((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuget_infos,(
uSubversion.get_infocCs�x�|j�D]�}|j�s
|j�jd�r;q
ntjd|�}|sWdS|jd�}||j�d�j�jdd�d}||fSWdS(Nu#u
^-r\s*([^ ])?ii(NN(NN(	u
splitlinesustripu
startswithureusearchuNoneugroupuendusplit(uselfucontentulineumatchurevurest((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuparse_vcs_bundle_file,s",u Subversion.parse_vcs_bundle_filecCs�|j�\}}t||�}tjd||f�tjd7_zStjj|�rit|�nt	|j
dg|||gd|jdd�Wdtjd8_XdS(u@Export the svn repository at the url to the destination locationu!Exporting svn repository %s to %siuexportu
filter_stdoutushow_stdoutNF(
uget_url_revuget_rev_optionsuloggerunotifyuindentuosupathuexistsurmtreeucall_subprocessucmdu_filteruFalse(uselfulocationuurlurevurev_options((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuexport8s
uSubversion.exportcCs%t|jdg|||g�dS(Nuswitch(ucall_subprocessucmd(uselfudestuurlurev_options((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuswitchIsuSubversion.switchcCs"t|jdg||g�dS(Nuupdate(ucall_subprocessucmd(uselfudesturev_options((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuupdateMsuSubversion.updatecCs�|j�\}}t||�}|r4d|}nd}|j||||�r�tjd||t|�f�t|jddg|||g�ndS(Nu (to revision %s)uuChecking out %s%s to %sucheckoutu-q(uget_url_revuget_rev_optionsucheck_destinationuloggerunotifyudisplay_pathucall_subprocessucmd(uselfudestuurlurevurev_optionsurev_display((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuobtainQs
	uSubversion.obtaincCs�x�|D]�}t|�j}|s(qnd|kr_dj|jd�dd��j�}n|}||jkr|jdd�dSqWdS(Nu-iu#ii����(uLinkuegg_fragmentujoinusplitulowerukeyuNone(uselfudistudependency_linksuurluegg_fragmentukey((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuget_location^s
+uSubversion.get_locationc
Cs�d}x�tj|�D]�\}}}|j|krJg|dd�<qn|j|j�tjj||jd�}tjj|�s�qn|j|�\}}||kr�|d}	n-|s�|j|	�r�g|dd�<qnt	||�}qW|S(uR
        Return the maximum revision for all files under a given location
        iNuentriesu/(
uosuwalkudirnameuremoveupathujoinuexistsu_get_svn_url_revu
startswithumax(
uselfulocationurevisionubaseudirsufilesu
entries_fnudirurlulocalrevubase_url((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuget_revisionls"
uSubversion.get_revisioncsAtt|�j�\}}|jd�r7d|}n||fS(Nussh://usvn+(usuperu
Subversionuget_url_revu
startswith(uselfuurlurev(u	__class__(u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuget_url_rev�s
uSubversion.get_url_revcCsx|}x^tjjtjj|d��sf|}tjj|�}||kr	tjd|�dSq	W|j|�dS(Nusetup.pyuGCould not find setup.py for directory %s (tried all parent directories)i(	uosupathuexistsujoinudirnameuloggeruwarnuNoneu_get_svn_url_rev(uselfulocationu
orig_locationu
last_location((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuget_url�s$	uSubversion.get_urlc

Cs�ddlm}ttjj||jd��}|j�}|j�|j	d�st|j	d�st|j	d�r�t
ttj
|jd���}|dd=|dd}d	d
�|D�dg}n�|j	d�r7tj|�}|std|��n|jd
�}dd
�tj|�D�dg}n{yYt|jdd|gdd�}tj|�jd
�}dd
�tj|�D�}Wn|k
r�dg}}YnX|r�t|�}	nd}	||	fS(Ni(uInstallationErroruentriesu8u9u10u

icSs<g|]2}t|�dkr|drt|d��qS(i	(ulenuint(u.0ud((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyu
<listcomp>�s	u/Subversion._get_svn_url_rev.<locals>.<listcomp>u<?xmluBadly formatted data: %ricSs%g|]}t|jd���qS(i(uintugroup(u.0um((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyu
<listcomp>�s	uinfou--xmlushow_stdoutcSs%g|]}t|jd���qS(i(uintugroup(u.0um((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyu
<listcomp>�s	F(upip.exceptionsuInstallationErroruopenuosupathujoinudirnameureaducloseu
startswithulistumapustru
splitlinesusplitu_svn_xml_url_reusearchu
ValueErrorugroupu_svn_rev_reufinditerucall_subprocessucmduFalseu_svn_info_xml_url_reu_svn_info_xml_rev_reuNoneumax(
uselfulocationuInstallationErrorufudatauurlurevsumatchuxmlurev((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyu_get_svn_url_rev�s2!
-!&! 
uSubversion._get_svn_url_revcCs�t|jdd|gdd�}g}xV|j�D]H}|j�}t|d�}|djd�}|j||f�q4W|S(	Nulsu-vushow_stdoutiiu/Fi����(ucall_subprocessucmduFalseu
splitlinesusplituintustripuappend(uselfusvn_tag_urlustdouturesultsulineupartsurevutag((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuget_tag_revs�suSubversion.get_tag_revscCsZd}d}xG|D]?\}}||kr|dksC||kr|}|}qqW|S(N(uNone(uselfurevutag_revsubest_match_revubest_tagutagutag_rev((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyufind_tag_match�s
uSubversion.find_tag_matchcCs�|j|�}|dkrdS|jd�}|j�jdd�d}|j|�}|ddkr�d||df}n�|ddkr�d|j�|d|f}n�|ddkrZd
|j�|f}|r{dj|dd��d}	|j|	�}
|j||
�}|rWtj	d|�d|	|f}d||f}qWq{n!tj
d|�d
||f}d|||fS(Nu/u-iiiutagsutagu%s-%subranchesubranchu	%s-%s-r%sutrunku
%s-dev_r%su/tagsu2trunk checkout %s seems to be equivalent to tag %su%s/%su?svn URL does not fit normal structure (tags/branches/trunk): %susvn+%s@%s#egg=%si����(utagsutagi����i����(ubranchesubranchi����i����i����(uget_urluNoneusplituegg_nameuget_revisionujoinuget_tag_revsufind_tag_matchuloggerunotifyuwarn(uselfudistulocationu	find_tagsurepoupartsuegg_project_nameurevu
full_egg_nameutag_urlutag_revsumatch((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuget_src_requirement�s. uSubversion.get_src_requirement(usvnusvn+sshusvn+httpu	svn+httpsusvn+svnF(u__name__u
__module__u__qualname__unameudirnameu	repo_nameuschemesubundle_fileuguideuget_infouparse_vcs_bundle_fileuexportuswitchuupdateuobtainuget_locationuget_revisionuget_url_revuget_urlu_get_svn_url_revuget_tag_revsufind_tag_matchuFalseuget_src_requirement(u
__locals__((u	__class__u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyu
Subversions(
!u
SubversioncCs�|rd|g}ng}tj|�}t|d�rO|j|j}}nl|d}d|kr�|jd�d}d|kr�|jdd�\}}q�|d}}nd	\}}|r�|d|g7}n|r�|d|g7}n|S(
Nu-ruusernameiu@iu:u
--usernameu
--password(NN(uurlparseuurlsplituhasattruusernameupasswordusplituNone(uurlurevurev_optionsuruusernameupasswordunetlocuauth((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyuget_rev_options�s$
uget_rev_options(uosureupip.backwardcompatuurlparseu	pip.indexuLinkupip.utilurmtreeudisplay_pathucall_subprocessupip.loguloggerupip.vcsuvcsuVersionControlucompileu_svn_xml_url_reu_svn_rev_reu_svn_url_reu_svn_revision_reu_svn_info_xml_rev_reu_svn_info_xml_url_reu
Subversionuget_rev_optionsuregister(((u+/tmp/pip-zej_zi-build/pip/vcs/subversion.pyu<module>s�python3.3/site-packages/pip/vcs/__pycache__/__init__.cpython-33.pyc000064400000031612151733566760021034 0ustar00�
7�Re,"c@s�dZddlZddlZddlmZmZddlmZddlm	Z	m
Z
mZmZm
Z
ddgZGdd	�d	e�Ze�ZGd
d�de�Zdd�ZdS(
u)Handles all VCS (version control) supportiN(uurlparseuurllib(ulogger(udisplay_pathu
backup_dirufind_commandurmtreeuask_path_existsuvcsuget_src_requirementcs�|EeZdZiZddddddgZ�fdd�Zd	d
�Zedd��Zed
d��Z	edd��Z
dd�Zdddd�Z
dd�Zdd�Zdd�Z�S(u
VcsSupportusshugituhgubzrusftpusvncsRtjj|j�ttdd�r;tjj|j�ntt|�j	�dS(Nu
uses_fragment(
uurlparseuuses_netlocuextenduschemesugetattruNoneu
uses_fragmentusuperu
VcsSupportu__init__(uself(u	__class__(u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu__init__suVcsSupport.__init__cCs
|jj�S(N(u	_registryu__iter__(uself((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu__iter__suVcsSupport.__iter__cCst|jj��S(N(ulistu	_registryuvalues(uself((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyubackendssuVcsSupport.backendscCsdd�|jD�S(NcSsg|]}|j�qS((udirname(u.0ubackend((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu
<listcomp>$s	u'VcsSupport.dirnames.<locals>.<listcomp>(ubackends(uself((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyudirnames"suVcsSupport.dirnamescCs.g}x!|jD]}|j|j�qW|S(N(ubackendsuextenduschemes(uselfuschemesubackend((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuall_schemes&suVcsSupport.all_schemescCsPt|d�s'tjd|j�dS|j|jkrL||j|j<ndS(NunameuCannot register VCS %s(uhasattruloggeruwarnu__name__unameu	_registry(uselfucls((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuregister-s
uVcsSupport.registercCsR||jkr|j|=n2||jj�krA|j|j=n
tjd�dS(Nu0Cannot unregister because no class or name given(u	_registryuvaluesunameuloggeruwarn(uselfuclsuname((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu
unregister4s

uVcsSupport.unregistercCsOxH|jj�D]7}tjj||j�}tjj|�r|jSqWdS(u�
        Return the name of the version control backend if found at given
        location, e.g. vcs.get_backend_name('/path/to/vcs/checkout')
        N(	u	_registryuvaluesuosupathujoinudirnameuexistsunameuNone(uselfulocationuvc_typeupath((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuget_backend_name<s
uVcsSupport.get_backend_namecCs*|j�}||jkr&|j|SdS(N(uloweru	_registry(uselfuname((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuget_backendGsuVcsSupport.get_backendcCs&|j|�}|r"|j|�SdS(N(uget_backend_nameuget_backenduNone(uselfulocationuvc_type((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuget_backend_from_locationLs
u$VcsSupport.get_backend_from_locationN(u__name__u
__module__u__qualname__u	_registryuschemesu__init__u__iter__upropertyubackendsudirnamesuall_schemesuregisteruNoneu
unregisteruget_backend_nameuget_backenduget_backend_from_location(u
__locals__((u	__class__u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu
VcsSupportsu
VcsSupportcs�|EeZdZdZdZd �fdd�Zdd�Zdd�Ze	dd	��Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd!dd�Z�S("uVersionControlucs/||_d|_tt|�j||�dS(N(uurluNoneu_cmdusuperuVersionControlu__init__(uselfuurluargsukwargs(u	__class__(u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu__init__Zs		uVersionControl.__init__cCs
tj|fS(N(uloggeruINFO(uselfuline((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu_filter_suVersionControl._filtercCs1tjj|�\}}|jtjj�p0|S(u~
           posix absolute paths start with os.path.sep,
           win32 ones ones start with drive (like c:\folder)
        (uosupathu
splitdriveu
startswithusep(uselfurepoudriveutail((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu_is_local_repositorybsu#VersionControl._is_local_repositorycCsL|jdk	r|jSt|j�}tjd|j|f�||_|S(NuFound command %r at %r(u_cmduNoneufind_commandunameuloggeruinfo(uselfucommand((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyucmdjs	uVersionControl.cmdc	Cs�d}d|jks(t||j��|jjdd�d}tj|�\}}}}}d}d|kr�|jdd�\}}ntj||||df�}||fS(um
        Returns the correct repository URL and revision by parsing the given
        repository URL
        uvSorry, '%s' is a malformed VCS url. The format is <vcs>+<protocol>://<url>, e.g. svn+http://myrepo/svn/MyApp#egg=MyAppu+iu@uN(uurluAssertionErrorusplituurlparseuurlsplituNoneursplitu
urlunsplit(	uselfu
error_messageuurluschemeunetlocupathuqueryufragurev((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuget_url_revss"uVersionControl.get_url_revcCsH|jd�j|j�s,td|��|j|�|j|�fS(uA
        Returns (url, revision), where both are strings
        u/uBad directory: %s(urstripuendswithudirnameuAssertionErroruget_urluget_revision(uselfulocation((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuget_info�s,uVersionControl.get_infocCstj|�jd�S(ua
        Normalize a URL for comparison by unquoting it and removing any trailing slash.
        u/(uurllibuunquoteurstrip(uselfuurl((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu
normalize_url�suVersionControl.normalize_urlcCs|j|�|j|�kS(uV
        Compare two repo URLs for identity, ignoring incidental differences.
        (u
normalize_url(uselfuurl1uurl2((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyucompare_urls�suVersionControl.compare_urlscCs
t�dS(u�
        Takes the contents of the bundled text file that explains how to revert
        the stripped off version control data of the given package and returns
        the URL and revision of it.
        N(uNotImplementedError(uselfucontent((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuparse_vcs_bundle_file�su$VersionControl.parse_vcs_bundle_filecCs
t�dS(ux
        Called when installing or updating an editable package, takes the
        source path of the checkout.
        N(uNotImplementedError(uselfudest((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuobtain�suVersionControl.obtaincCs
t�dS(uB
        Switch the repo at ``dest`` to point to ``URL``.
        N(uNotImplemented(uselfudestuurlurev_options((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuswitch�suVersionControl.switchcCs
t�dS(uO
        Update an already-existing repo to the given ``rev_options``.
        N(uNotImplementedError(uselfudesturev_options((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuupdate�suVersionControl.updatec
Cs@d}d}tjj|�r#d}tjjtjj||j��r�|j|�}|j||�r�t	j
d|jj�t
|�|f�t	jdt
|�|j|f�|j||�q t	jd|j|jt
|�|f�d}q#t	jd	||j|jf�d}n|r<t	jd|j|f�td|d
|d�}|dkr�t	jd|jt
|�||f�|j|||�q<|dkr�q<|dkr�t	jdt
|��t|�d}q<|dkr<t|�}	t	jdt
|�|	f�tj||	�d}q<n|S(u�
        Prepare a location to receive a checkout/clone.

        Return True if the location is ready for (and requires) a
        checkout/clone, False otherwise.
        u)%s in %s exists, and has correct URL (%s)uUpdating %s %s%su%s %s in %s exists with URL %su%(s)witch, (i)gnore, (w)ipe, (b)ackup usuiuwubu0Directory %s already exists, and is not a %s %s.u(i)gnore, (w)ipe, (b)ackup u+The plan is to install the %s repository %suWhat to do?  %siiuSwitching %s %s to %s%suDeleting %suBacking up %s to %sTF(usuiuwub(u%(s)witch, (i)gnore, (w)ipe, (b)ackup (usuiuwub(uiuwub(u(i)gnore, (w)ipe, (b)ackup (uiuwub(uTrueuFalseuosupathuexistsujoinudirnameuget_urlucompare_urlsuloggeruinfou	repo_nameutitleudisplay_pathunotifyuupdateuwarnunameuask_path_existsuswitchurmtreeu
backup_dirushutilumove(
uselfudestuurlurev_optionsurev_displayucheckoutupromptuexisting_urluresponseudest_dir((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyucheck_destination�sZ$							
	
		u VersionControl.check_destinationcCs0tjj|�rt|�n|j|�dS(N(uosupathuexistsurmtreeuobtain(uselfulocation((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuunpack�s
uVersionControl.unpackcCs
t�dS(N(uNotImplementedError(uselfudistulocationu	find_tags((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuget_src_requirement�su"VersionControl.get_src_requirementNF(u__name__u
__module__u__qualname__unameudirnameuNoneu__init__u_filteru_is_local_repositoryupropertyucmduget_url_revuget_infou
normalize_urlucompare_urlsuparse_vcs_bundle_fileuobtainuswitchuupdateucheck_destinationuunpackuFalseuget_src_requirement(u
__locals__((u	__class__u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuVersionControlVs"	:uVersionControlcCsFtj|�}|r+|�j|||�Stjd|�|j�S(Nutcannot determine version of editable source in %s (is not SVN checkout, Git clone, Mercurial clone or Bazaar branch)(uvcsuget_backend_from_locationuget_src_requirementuloggeruwarnuas_requirement(udistulocationu	find_tagsuversion_control((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyuget_src_requirement�s
(u__doc__uosushutilupip.backwardcompatuurlparseuurllibupip.loguloggerupip.utiludisplay_pathu
backup_dirufind_commandurmtreeuask_path_existsu__all__uobjectu
VcsSupportuvcsuVersionControluget_src_requirement(((u)/tmp/pip-zej_zi-build/pip/vcs/__init__.pyu<module>s(D	�python3.3/site-packages/pip/vcs/__pycache__/mercurial.cpython-33.pyc000064400000017241151733566760021262 0ustar00�
7�Re�c@s�ddlZddlZddlZddlZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZGdd	�d	e�Zeje�dS(
iN(ucall_subprocess(udisplay_pathurmtree(ulogger(uvcsuVersionControl(upath_to_url(uConfigParsercBs�|EeZdZdZdZdZd!ZdZd	Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd S("u	Mercurialuhgu.hgucloneuhg+httpuhg+httpsuhg+sshuhg+static-httpuhg-clone.txtug# This was a Mercurial repo; to make it a repo again run:
hg init
hg pull %(url)s
hg update -r %(rev)s
cCs�d}}x�|j�D]�}|j�s|j�jd�rEqntjd|�}|ru|jd�j�}ntjd|�}|r�|jd�j�}n|r|r||fSqWdS(Nu#uhg\s*pull\s*(.*)\s*iu^hg\s*update\s*-r\s*(.*)\s*(NN(uNoneu
splitlinesustripu
startswithureusearchugroup(uselfucontentuurlurevulineu	url_matchu	rev_match((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuparse_vcs_bundle_files
"uMercurial.parse_vcs_bundle_filecCs`tjdd�}|j|�z/t|jd|gd|jddd|�Wdt|�XdS(	u?Export the Hg repository at the url to the destination locationu-exportupip-uarchiveu
filter_stdoutushow_stdoutucwdNF(utempfileumkdtempuunpackucall_subprocessucmdu_filteruFalseurmtree(uselfulocationutemp_dir((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuexport%s
uMercurial.exportcCs�tjj||jd�}tj�}yJ|j|�|jdd|�t|d�}|j	|�|j
�WnBttjfk
r�t
j�d}tjd||f�Yn!Xt|jddg|d	|�dS(
Nuhgrcupathsudefaultuwiu/Could not switch Mercurial repository to %s: %suupdateu-qucwd(uosupathujoinudirnameuConfigParseruSafeConfigParserureadusetuopenuwriteucloseuOSErroruNoSectionErrorusysuexc_infouloggeruwarnucall_subprocessucmd(uselfudestuurlurev_optionsurepo_configuconfiguconfig_fileue((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuswitch0s

uMercurial.switchcCs@t|jddgd|�t|jddg|d|�dS(Nupullu-qucwduupdate(ucall_subprocessucmd(uselfudesturev_options((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuupdateAsuMercurial.updatecCs�|j�\}}|r.|g}d|}ng}d}|j||||�r�tjd||t|�f�t|jddd||g�t|jddg|d|�ndS(	Nu (to revision %s)uuCloning hg %s%s to %sucloneu
--noupdateu-quupdateucwd(uget_url_revucheck_destinationuloggerunotifyudisplay_pathucall_subprocessucmd(uselfudestuurlurevurev_optionsurev_display((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuobtainFs	
	uMercurial.obtaincCsRt|jddgddd|�j�}|j|�rHt|�}n|j�S(Nu
showconfigu
paths.defaultushow_stdoutucwdF(ucall_subprocessucmduFalseustripu_is_local_repositoryupath_to_url(uselfulocationuurl((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_urlTsuMercurial.get_urlcCs�t|jdgddd|�}g}x{|j�D]m}tjd|�}|r4|jd�}|jd�}d|kr�|j|j�|j�f�q�q4q4Wt	|�S(	Nutagsushow_stdoutucwdu([\w\d\.-]+)\s*([\d]+):.*$iiutipF(
ucall_subprocessucmduFalseu
splitlinesureusearchugroupuappendustripudict(uselfulocationutagsutag_revsulineu
tags_matchutagurev((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_tag_revs\s)uMercurial.get_tag_revscCs�t|jdgddd|�}g}x{|j�D]m}tjd|�}|r4|jd�}|jd�}d|kr�|j|j�|j�f�q�q4q4Wt	|�S(	Nubranchesushow_stdoutucwdu([\w\d\.-]+)\s*([\d]+):.*$iiudefaultF(
ucall_subprocessucmduFalseu
splitlinesureusearchugroupuappendustripudict(uselfulocationubranchesubranch_revsulineubranches_matchubranchurev((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_branch_revsis)uMercurial.get_branch_revscCs.t|jddgddd|�j�}|S(Nuparentsu--template={rev}ushow_stdoutucwdF(ucall_subprocessucmduFalseustrip(uselfulocationucurrent_revision((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_revisionvsuMercurial.get_revisioncCs.t|jddgddd|�j�}|S(Nuparentsu--template={node}ushow_stdoutucwdF(ucall_subprocessucmduFalseustrip(uselfulocationucurrent_rev_hash((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_revision_hash|suMercurial.get_revision_hashcCs�|j|�}|j�jd�s1d|}n|j�jdd�d}|sWdS|j|�}|j|�}|j|�}|j	|�}	||kr�d|||f}
n-||	kr�d||	|f}
n
d|}
d|||
fS(	Nuhg:uhg+u-iiu%s-%su%s-devu%s@%s#egg=%s(
uget_urluloweru
startswithuegg_nameusplituNoneuget_revisionuget_revision_hashuget_tag_revsuget_branch_revs(uselfudistulocationu	find_tagsurepouegg_project_nameucurrent_revucurrent_rev_hashutag_revsubranch_revsu
full_egg_name((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyuget_src_requirement�s 

uMercurial.get_src_requirementN(uhguhg+httpuhg+httpsuhg+sshuhg+static-http(u__name__u
__module__u__qualname__unameudirnameu	repo_nameuschemesubundle_fileuguideuparse_vcs_bundle_fileuexportuswitchuupdateuobtainuget_urluget_tag_revsuget_branch_revsuget_revisionuget_revision_hashuget_src_requirement(u
__locals__((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu	Mercurial
s"

u	Mercurial(uosutempfileureusysupip.utilucall_subprocessudisplay_pathurmtreeupip.loguloggerupip.vcsuvcsuVersionControlupip.downloadupath_to_urlupip.backwardcompatuConfigParseru	Mercurialuregister(((u*/tmp/pip-zej_zi-build/pip/vcs/mercurial.pyu<module>s�python3.3/site-packages/pip/vcs/__pycache__/bazaar.cpython-33.pyc000064400000015455151733566760020544 0ustar00�
7�ReOc@s�ddlZddlZddlZddlmZddlmZddlmZm	Z	m
Z
ddlmZm
Z
ddlmZGdd�de
�Zeje�dS(	iN(uurlparse(ulogger(urmtreeudisplay_pathucall_subprocess(uvcsuVersionControl(upath_to_urlcs�|EeZdZdZdZdZdZd"ZdZd#�fdd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Z�fdd�Zdd�Zdd�Zdd�Zd d!�Z�S($uBazaarubzru.bzrubranchubzr-branch.txtubzr+httpu	bzr+httpsubzr+sshubzr+sftpubzr+ftpubzr+lpu[# This was a Bazaar branch; to make it a branch again run:
bzr branch -r %(rev)s %(url)s .
cs[tt|�j|||�ttdd�rWtjjdg�tjjdg�ndS(Nu
uses_fragmentulp(	usuperuBazaaru__init__ugetattruurlparseuNoneu
uses_fragmentuextendunon_hierarchical(uselfuurluargsukwargs(u	__class__(u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyu__init__suBazaar.__init__cCs�d}}x�|j�D]�}|j�s|j�jd�rEqntjd|�}|ru|jd�j�}n||j�d�j�jdd�d}|r|r||fSqWdS(Nu#u^bzr\s*branch\s*-r\s*(\d*)ii(NN(	uNoneu
splitlinesustripu
startswithureusearchugroupuendusplit(uselfucontentuurlurevulineumatch((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuparse_vcs_bundle_files
",uBazaar.parse_vcs_bundle_filecCstjdd�}|j|�tjj|�r>t|�nz/t|jd|gd|d|j	dd�Wdt|�XdS(	uCExport the Bazaar repository at the url to the destination locationu-exportupip-uexportucwdu
filter_stdoutushow_stdoutNF(utempfileumkdtempuunpackuosupathuexistsurmtreeucall_subprocessucmdu_filteruFalse(uselfulocationutemp_dir((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuexport)s

u
Bazaar.exportcCs t|jd|gd|�dS(Nuswitchucwd(ucall_subprocessucmd(uselfudestuurlurev_options((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuswitch6su
Bazaar.switchcCs$t|jddg|d|�dS(Nupullu-qucwd(ucall_subprocessucmd(uselfudesturev_options((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuupdate9su
Bazaar.updatecCs�|j�\}}|r1d|g}d|}ng}d}|j||||�r�tjd||t|�f�t|jddg|||g�ndS(Nu-ru (to revision %s)uuChecking out %s%s to %subranchu-q(uget_url_revucheck_destinationuloggerunotifyudisplay_pathucall_subprocessucmd(uselfudestuurlurevurev_optionsurev_display((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuobtain=s
	u
Bazaar.obtaincsAtt|�j�\}}|jd�r7d|}n||fS(Nussh://ubzr+(usuperuBazaaruget_url_revu
startswith(uselfuurlurev(u	__class__(u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuget_url_revKs
uBazaar.get_url_revcCs�t|jdgddd|�}xp|j�D]b}|j�}xMdD]E}|j|�rG|j|�d}|j|�r�t|�S|SqGWq.WdS(	Nuinfoushow_stdoutucwducheckout of branch: uparent branch: iF(ucheckout of branch: uparent branch: (
ucall_subprocessucmduFalseu
splitlinesustripu
startswithusplitu_is_local_repositoryupath_to_urluNone(uselfulocationuurlsulineuxurepo((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuget_urlRs

uBazaar.get_urlcCs/t|jdgddd|�}|j�dS(Nurevnoushow_stdoutucwdiFi����(ucall_subprocessucmduFalseu
splitlines(uselfulocationurevision((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuget_revision`suBazaar.get_revisioncCs�t|jdgddd|�}g}xl|j�D]^}tjd|�}|r4|jd�}|jd�}|j|j�|j�f�q4q4Wt	|�S(Nutagsushow_stdoutucwdu([.\w-]+)\s*(.*)$iiF(
ucall_subprocessucmduFalseu
splitlinesureusearchugroupuappendustripudict(uselfulocationutagsutag_revsulineu
tags_matchutagurev((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuget_tag_revses&uBazaar.get_tag_revsc	Cs�|j|�}|j�jd�s1d|}n|j�jdd�d}|sWdS|j|�}|j|�}||kr�d|||f}nd|j�|f}d|||fS(	Nubzr:ubzr+u-iiu%s-%su
%s-dev_r%su%s@%s#egg=%s(uget_urluloweru
startswithuegg_nameusplituNoneuget_revisionuget_tag_revs(	uselfudistulocationu	find_tagsurepouegg_project_nameucurrent_revutag_revsu
full_egg_name((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuget_src_requirementqs
uBazaar.get_src_requirement(ubzrubzr+httpu	bzr+httpsubzr+sshubzr+sftpubzr+ftpubzr+lpN(u__name__u
__module__u__qualname__unameudirnameu	repo_nameubundle_fileuschemesuguideuNoneu__init__uparse_vcs_bundle_fileuexportuswitchuupdateuobtainuget_url_revuget_urluget_revisionuget_tag_revsuget_src_requirement(u
__locals__((u	__class__u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyuBazaars"

uBazaar(uosutempfileureupip.backwardcompatuurlparseupip.loguloggerupip.utilurmtreeudisplay_pathucall_subprocessupip.vcsuvcsuVersionControlupip.downloadupath_to_urluBazaaruregister(((u'/tmp/pip-zej_zi-build/pip/vcs/bazaar.pyu<module>sxpython3.3/site-packages/pip/vcs/__pycache__/git.cpython-33.pyc000064400000022416151733566760020062 0ustar00�
7�Re�c@s�ddlZddlZddlZddlmZddlmZmZddlm	Z	m
Z
ddlmZddl
mZmZejZejZGdd�de
�Ze	je�dS(	iN(ucall_subprocess(udisplay_pathurmtree(uvcsuVersionControl(ulogger(uurl2pathnameuurlparsecs�|EeZdZdZdZdZd%Zd	Zd
Zd&�fdd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Z�fd!d"�Zd#d$�Z�S('uGitugitu.gitucloneugit+httpu	git+httpsugit+sshugit+gitugit+fileu
git-clone.txtus# This was a Git repo; to make it a repo again run:
git init
git remote add origin %(url)s -f
git checkout %(rev)s
cs�|r�t|�\}}}}}|jd�r�|dt|jd���}	|	t|�jdd�jd�}
t|||
||f�}|jd�d}|d|�t||d�||
||f�}q�ntt	|�j
|||�dS(Nufileu/u\u+i(uurlsplituendswithulenulstripuurl2pathnameureplaceu
urlunsplitufindusuperuGitu__init__(uselfuurluargsukwargsuschemeunetlocupathuqueryufragmentuinitial_slashesunewpathu
after_plus(u	__class__(u$/tmp/pip-zej_zi-build/pip/vcs/git.pyu__init__s %9uGit.__init__cCs�d}}x�|j�D]�}|j�s|j�jd�rEqntjd|�}|ru|jd�j�}ntjd|�}|r�|jd�j�}n|r|r||fSqWdS(Nu#u$git\s*remote\s*add\s*origin(.*)\s*-fiu^git\s*checkout\s*-q\s*(.*)\s*(NN(uNoneu
splitlinesustripu
startswithureusearchugroup(uselfucontentuurlurevulineu	url_matchu	rev_match((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuparse_vcs_bundle_file%s
"uGit.parse_vcs_bundle_filecCs�tjdd�}|j|�zT|jd�s>|d}nt|jdddd|gd|jd	dd
|�Wdt|�XdS(
u@Export the Git repository at the url to the destination locationu-exportupip-u/ucheckout-indexu-au-fu--prefixu
filter_stdoutushow_stdoutucwdNF(	utempfileumkdtempuunpackuendswithucall_subprocessucmdu_filteruFalseurmtree(uselfulocationutemp_dir((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuexport4s

u
Git.exportcCs`|j|�}d|}||kr0||gS||krG||gStjd|�|SdS(u�Check the revision options before checkout to compensate that tags
        and branches may need origin/ as a prefix.
        Returns the SHA1 of the branch or tag if found.
        u	origin/%su5Could not find a tag or branch '%s', assuming commit.N(uget_refsuloggeruwarn(uselfurevudesturev_optionsu	revisionsu
origin_rev((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyucheck_rev_optionsAs
uGit.check_rev_optionscCsPt|jdd|gd|�t|jddg|d|�|j|�dS(Nuconfiguremote.origin.urlucwducheckoutu-q(ucall_subprocessucmduupdate_submodules(uselfudestuurlurev_options((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuswitchSs
u
Git.switchcCsrt|jddgd|�|r>|j|d||�}nt|jdddg|d|�|j|�dS(Nufetchu-qucwdiuresetu--hard(ucall_subprocessucmducheck_rev_optionsuupdate_submodules(uselfudesturev_options((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuupdate[s
#u
Git.updatecCs|j�\}}|r.|g}d|}ndg}d}|j||||�r�tjd||t|�f�t|jdd||g�|j|�|r�|j|||�}|j	|�j
|d�s�t|jddg|d	|�q�q�ndS(
Nu (to %s)u
origin/masteruuCloning %s%s to %sucloneu-qiucheckoutucwd(uget_url_revucheck_destinationuloggerunotifyudisplay_pathucall_subprocessucmduupdate_submodulesucheck_rev_optionsuget_revisionu
startswith(uselfudestuurlurevurev_optionsurev_display((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuobtaines	
	 
u
Git.obtaincCs.t|jddgddd|�}|j�S(Nuconfiguremote.origin.urlushow_stdoutucwdF(ucall_subprocessucmduFalseustrip(uselfulocationuurl((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_urlxsuGit.get_urlcCs.t|jddgddd|�}|j�S(Nu	rev-parseuHEADushow_stdoutucwdF(ucall_subprocessucmduFalseustrip(uselfulocationucurrent_rev((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_revision~s!uGit.get_revisioncCs	t|jdgdd
d|�}i}x�|j�j�D]�}|jdd�\}}|j�}d}|jd�r�|td�d�}nP|jd�r�|td�d�}n(|jd	�r�|td	�d�}n|dk	r:|j�||<q:q:W|S(u=Return map of named refs (branches or tags) to commit hashes.ushow-refushow_stdoutucwdu iu
refs/remotes/Nurefs/heads/u
refs/tags/F(	ucall_subprocessucmduFalseustripu
splitlinesusplituNoneu
startswithulen(uselfulocationuoutputurvulineucommiturefuref_name((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_refs�s uGit.get_refsc
Cs�|j|�}|j�jd�s1d|}n|j�jdd�d}|sWdS|j|�}|j|�}tdd�|j	�D��}||kr�d|||f}	n
d	|}	d
|||	fS(Nugit:ugit+u-iicss!|]\}}||fVqdS(N((u.0urefucommit((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyu	<genexpr>�su*Git.get_src_requirement.<locals>.<genexpr>u%s-%su%s-devu%s@%s#egg=%s(
uget_urluloweru
startswithuegg_nameusplituNoneuget_revisionuget_refsudictuitems(
uselfudistulocationu	find_tagsurepouegg_project_nameucurrent_revurefsunames_by_commitu
full_egg_name((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_src_requirement�s

uGit.get_src_requirementcs�d|jkrld|jks$t�|jjdd�|_tt|�j�\}}|jdd�}ntt|�j�\}}||fS(u;
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes doesn't
        work with a ssh:// scheme (e.g. Github). But we need a scheme for
        parsing. Hence we remove it again afterwards and return it as a stub.
        u://ufile:ugit+u
git+ssh://ussh://u(uurluAssertionErrorureplaceusuperuGituget_url_rev(uselfuurlurev(u	__class__(u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuget_url_rev�suGit.get_url_revcCsNtjjtjj|d��s%dSt|jdddddgd|�dS(Nu.gitmodulesu	submoduleuupdateu--initu--recursiveu-qucwd(uosupathuexistsujoinucall_subprocessucmd(uselfulocation((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuupdate_submodules�s!uGit.update_submodules(ugitugit+httpu	git+httpsugit+sshugit+gitugit+fileN(u__name__u
__module__u__qualname__unameudirnameu	repo_nameuschemesubundle_fileuguideuNoneu__init__uparse_vcs_bundle_fileuexportucheck_rev_optionsuswitchuupdateuobtainuget_urluget_revisionuget_refsuget_src_requirementuget_url_revuupdate_submodules(u
__locals__((u	__class__u$/tmp/pip-zej_zi-build/pip/vcs/git.pyuGit
s&

uGit(utempfileureuos.pathuosupip.utilucall_subprocessudisplay_pathurmtreeupip.vcsuvcsuVersionControlupip.loguloggerupip.backwardcompatuurl2pathnameuurlparseuurlsplitu
urlunsplituGituregister(((u$/tmp/pip-zej_zi-build/pip/vcs/git.pyu<module>s		�python3.3/site-packages/pip/vcs/__init__.py000064400000021054151733566760014552 0ustar00"""Handles all VCS (version control) support"""

import os
import shutil

from pip.backwardcompat import urlparse, urllib
from pip.log import logger
from pip.util import (display_path, backup_dir, find_command,
                      rmtree, ask_path_exists)


__all__ = ['vcs', 'get_src_requirement']


class VcsSupport(object):
    _registry = {}
    schemes = ['ssh', 'git', 'hg', 'bzr', 'sftp', 'svn']

    def __init__(self):
        # Register more schemes with urlparse for various version control systems
        urlparse.uses_netloc.extend(self.schemes)
        # Python >= 2.7.4, 3.3 doesn't have uses_fragment
        if getattr(urlparse, 'uses_fragment', None):
            urlparse.uses_fragment.extend(self.schemes)
        super(VcsSupport, self).__init__()

    def __iter__(self):
        return self._registry.__iter__()

    @property
    def backends(self):
        return list(self._registry.values())

    @property
    def dirnames(self):
        return [backend.dirname for backend in self.backends]

    @property
    def all_schemes(self):
        schemes = []
        for backend in self.backends:
            schemes.extend(backend.schemes)
        return schemes

    def register(self, cls):
        if not hasattr(cls, 'name'):
            logger.warn('Cannot register VCS %s' % cls.__name__)
            return
        if cls.name not in self._registry:
            self._registry[cls.name] = cls

    def unregister(self, cls=None, name=None):
        if name in self._registry:
            del self._registry[name]
        elif cls in self._registry.values():
            del self._registry[cls.name]
        else:
            logger.warn('Cannot unregister because no class or name given')

    def get_backend_name(self, location):
        """
        Return the name of the version control backend if found at given
        location, e.g. vcs.get_backend_name('/path/to/vcs/checkout')
        """
        for vc_type in self._registry.values():
            path = os.path.join(location, vc_type.dirname)
            if os.path.exists(path):
                return vc_type.name
        return None

    def get_backend(self, name):
        name = name.lower()
        if name in self._registry:
            return self._registry[name]

    def get_backend_from_location(self, location):
        vc_type = self.get_backend_name(location)
        if vc_type:
            return self.get_backend(vc_type)
        return None


vcs = VcsSupport()


class VersionControl(object):
    name = ''
    dirname = ''

    def __init__(self, url=None, *args, **kwargs):
        self.url = url
        self._cmd = None
        super(VersionControl, self).__init__(*args, **kwargs)

    def _filter(self, line):
        return (logger.INFO, line)

    def _is_local_repository(self, repo):
        """
           posix absolute paths start with os.path.sep,
           win32 ones ones start with drive (like c:\\folder)
        """
        drive, tail = os.path.splitdrive(repo)
        return repo.startswith(os.path.sep) or drive

    @property
    def cmd(self):
        if self._cmd is not None:
            return self._cmd
        command = find_command(self.name)
        logger.info('Found command %r at %r' % (self.name, command))
        self._cmd = command
        return command

    def get_url_rev(self):
        """
        Returns the correct repository URL and revision by parsing the given
        repository URL
        """
        error_message = (
           "Sorry, '%s' is a malformed VCS url. "
           "The format is <vcs>+<protocol>://<url>, "
           "e.g. svn+http://myrepo/svn/MyApp#egg=MyApp")
        assert '+' in self.url, error_message % self.url
        url = self.url.split('+', 1)[1]
        scheme, netloc, path, query, frag = urlparse.urlsplit(url)
        rev = None
        if '@' in path:
            path, rev = path.rsplit('@', 1)
        url = urlparse.urlunsplit((scheme, netloc, path, query, ''))
        return url, rev

    def get_info(self, location):
        """
        Returns (url, revision), where both are strings
        """
        assert not location.rstrip('/').endswith(self.dirname), 'Bad directory: %s' % location
        return self.get_url(location), self.get_revision(location)

    def normalize_url(self, url):
        """
        Normalize a URL for comparison by unquoting it and removing any trailing slash.
        """
        return urllib.unquote(url).rstrip('/')

    def compare_urls(self, url1, url2):
        """
        Compare two repo URLs for identity, ignoring incidental differences.
        """
        return (self.normalize_url(url1) == self.normalize_url(url2))

    def parse_vcs_bundle_file(self, content):
        """
        Takes the contents of the bundled text file that explains how to revert
        the stripped off version control data of the given package and returns
        the URL and revision of it.
        """
        raise NotImplementedError

    def obtain(self, dest):
        """
        Called when installing or updating an editable package, takes the
        source path of the checkout.
        """
        raise NotImplementedError

    def switch(self, dest, url, rev_options):
        """
        Switch the repo at ``dest`` to point to ``URL``.
        """
        raise NotImplemented

    def update(self, dest, rev_options):
        """
        Update an already-existing repo to the given ``rev_options``.
        """
        raise NotImplementedError

    def check_destination(self, dest, url, rev_options, rev_display):
        """
        Prepare a location to receive a checkout/clone.

        Return True if the location is ready for (and requires) a
        checkout/clone, False otherwise.
        """
        checkout = True
        prompt = False
        if os.path.exists(dest):
            checkout = False
            if os.path.exists(os.path.join(dest, self.dirname)):
                existing_url = self.get_url(dest)
                if self.compare_urls(existing_url, url):
                    logger.info('%s in %s exists, and has correct URL (%s)' %
                                (self.repo_name.title(), display_path(dest),
                                 url))
                    logger.notify('Updating %s %s%s' %
                                  (display_path(dest), self.repo_name,
                                   rev_display))
                    self.update(dest, rev_options)
                else:
                    logger.warn('%s %s in %s exists with URL %s' %
                                (self.name, self.repo_name,
                                 display_path(dest), existing_url))
                    prompt = ('(s)witch, (i)gnore, (w)ipe, (b)ackup ',
                              ('s', 'i', 'w', 'b'))
            else:
                logger.warn('Directory %s already exists, '
                            'and is not a %s %s.' %
                            (dest, self.name, self.repo_name))
                prompt = ('(i)gnore, (w)ipe, (b)ackup ', ('i', 'w', 'b'))
        if prompt:
            logger.warn('The plan is to install the %s repository %s' %
                        (self.name, url))
            response = ask_path_exists('What to do?  %s' % prompt[0],
                                       prompt[1])

            if response == 's':
                logger.notify('Switching %s %s to %s%s' %
                              (self.repo_name, display_path(dest), url,
                               rev_display))
                self.switch(dest, url, rev_options)
            elif response == 'i':
                # do nothing
                pass
            elif response == 'w':
                logger.warn('Deleting %s' % display_path(dest))
                rmtree(dest)
                checkout = True
            elif response == 'b':
                dest_dir = backup_dir(dest)
                logger.warn('Backing up %s to %s'
                            % (display_path(dest), dest_dir))
                shutil.move(dest, dest_dir)
                checkout = True
        return checkout

    def unpack(self, location):
        if os.path.exists(location):
            rmtree(location)
        self.obtain(location)

    def get_src_requirement(self, dist, location, find_tags=False):
        raise NotImplementedError


def get_src_requirement(dist, location, find_tags):
    version_control = vcs.get_backend_from_location(location)
    if version_control:
        return version_control().get_src_requirement(dist, location, find_tags)
    logger.warn('cannot determine version of editable source in %s (is not SVN checkout, Git clone, Mercurial clone or Bazaar branch)' % location)
    return dist.as_requirement()
python3.3/site-packages/pip/vcs/mercurial.py000064400000013274151733566760015003 0ustar00import os
import tempfile
import re
import sys
from pip.util import call_subprocess
from pip.util import display_path, rmtree
from pip.log import logger
from pip.vcs import vcs, VersionControl
from pip.download import path_to_url
from pip.backwardcompat import ConfigParser


class Mercurial(VersionControl):
    name = 'hg'
    dirname = '.hg'
    repo_name = 'clone'
    schemes = ('hg', 'hg+http', 'hg+https', 'hg+ssh', 'hg+static-http')
    bundle_file = 'hg-clone.txt'
    guide = ('# This was a Mercurial repo; to make it a repo again run:\n'
            'hg init\nhg pull %(url)s\nhg update -r %(rev)s\n')

    def parse_vcs_bundle_file(self, content):
        url = rev = None
        for line in content.splitlines():
            if not line.strip() or line.strip().startswith('#'):
                continue
            url_match = re.search(r'hg\s*pull\s*(.*)\s*', line)
            if url_match:
                url = url_match.group(1).strip()
            rev_match = re.search(r'^hg\s*update\s*-r\s*(.*)\s*', line)
            if rev_match:
                rev = rev_match.group(1).strip()
            if url and rev:
                return url, rev
        return None, None

    def export(self, location):
        """Export the Hg repository at the url to the destination location"""
        temp_dir = tempfile.mkdtemp('-export', 'pip-')
        self.unpack(temp_dir)
        try:
            call_subprocess(
                [self.cmd, 'archive', location],
                filter_stdout=self._filter, show_stdout=False, cwd=temp_dir)
        finally:
            rmtree(temp_dir)

    def switch(self, dest, url, rev_options):
        repo_config = os.path.join(dest, self.dirname, 'hgrc')
        config = ConfigParser.SafeConfigParser()
        try:
            config.read(repo_config)
            config.set('paths', 'default', url)
            config_file = open(repo_config, 'w')
            config.write(config_file)
            config_file.close()
        except (OSError, ConfigParser.NoSectionError):
            e = sys.exc_info()[1]
            logger.warn(
                'Could not switch Mercurial repository to %s: %s'
                % (url, e))
        else:
            call_subprocess([self.cmd, 'update', '-q'] + rev_options, cwd=dest)

    def update(self, dest, rev_options):
        call_subprocess([self.cmd, 'pull', '-q'], cwd=dest)
        call_subprocess(
            [self.cmd, 'update', '-q'] + rev_options, cwd=dest)

    def obtain(self, dest):
        url, rev = self.get_url_rev()
        if rev:
            rev_options = [rev]
            rev_display = ' (to revision %s)' % rev
        else:
            rev_options = []
            rev_display = ''
        if self.check_destination(dest, url, rev_options, rev_display):
            logger.notify('Cloning hg %s%s to %s'
                          % (url, rev_display, display_path(dest)))
            call_subprocess([self.cmd, 'clone', '--noupdate', '-q', url, dest])
            call_subprocess([self.cmd, 'update', '-q'] + rev_options, cwd=dest)

    def get_url(self, location):
        url = call_subprocess(
            [self.cmd, 'showconfig', 'paths.default'],
            show_stdout=False, cwd=location).strip()
        if self._is_local_repository(url):
            url = path_to_url(url)
        return url.strip()

    def get_tag_revs(self, location):
        tags = call_subprocess(
            [self.cmd, 'tags'], show_stdout=False, cwd=location)
        tag_revs = []
        for line in tags.splitlines():
            tags_match = re.search(r'([\w\d\.-]+)\s*([\d]+):.*$', line)
            if tags_match:
                tag = tags_match.group(1)
                rev = tags_match.group(2)
                if "tip" != tag:
                    tag_revs.append((rev.strip(), tag.strip()))
        return dict(tag_revs)

    def get_branch_revs(self, location):
        branches = call_subprocess(
            [self.cmd, 'branches'], show_stdout=False, cwd=location)
        branch_revs = []
        for line in branches.splitlines():
            branches_match = re.search(r'([\w\d\.-]+)\s*([\d]+):.*$', line)
            if branches_match:
                branch = branches_match.group(1)
                rev = branches_match.group(2)
                if "default" != branch:
                    branch_revs.append((rev.strip(), branch.strip()))
        return dict(branch_revs)

    def get_revision(self, location):
        current_revision = call_subprocess(
            [self.cmd, 'parents', '--template={rev}'],
            show_stdout=False, cwd=location).strip()
        return current_revision

    def get_revision_hash(self, location):
        current_rev_hash = call_subprocess(
            [self.cmd, 'parents', '--template={node}'],
            show_stdout=False, cwd=location).strip()
        return current_rev_hash

    def get_src_requirement(self, dist, location, find_tags):
        repo = self.get_url(location)
        if not repo.lower().startswith('hg:'):
            repo = 'hg+' + repo
        egg_project_name = dist.egg_name().split('-', 1)[0]
        if not repo:
            return None
        current_rev = self.get_revision(location)
        current_rev_hash = self.get_revision_hash(location)
        tag_revs = self.get_tag_revs(location)
        branch_revs = self.get_branch_revs(location)
        if current_rev in tag_revs:
            # It's a tag
            full_egg_name = '%s-%s' % (egg_project_name, tag_revs[current_rev])
        elif current_rev in branch_revs:
            # It's the tip of a branch
            full_egg_name = '%s-%s' % (egg_project_name, branch_revs[current_rev])
        else:
            full_egg_name = '%s-dev' % egg_project_name
        return '%s@%s#egg=%s' % (repo, current_rev_hash, full_egg_name)

vcs.register(Mercurial)
python3.3/site-packages/pip/vcs/git.py000064400000017332151733566760013602 0ustar00import tempfile
import re
import os.path
from pip.util import call_subprocess
from pip.util import display_path, rmtree
from pip.vcs import vcs, VersionControl
from pip.log import logger
from pip.backwardcompat import url2pathname, urlparse
urlsplit = urlparse.urlsplit
urlunsplit = urlparse.urlunsplit


class Git(VersionControl):
    name = 'git'
    dirname = '.git'
    repo_name = 'clone'
    schemes = ('git', 'git+http', 'git+https', 'git+ssh', 'git+git', 'git+file')
    bundle_file = 'git-clone.txt'
    guide = ('# This was a Git repo; to make it a repo again run:\n'
        'git init\ngit remote add origin %(url)s -f\ngit checkout %(rev)s\n')

    def __init__(self, url=None, *args, **kwargs):

        # Works around an apparent Git bug
        # (see http://article.gmane.org/gmane.comp.version-control.git/146500)
        if url:
            scheme, netloc, path, query, fragment = urlsplit(url)
            if scheme.endswith('file'):
                initial_slashes = path[:-len(path.lstrip('/'))]
                newpath = initial_slashes + url2pathname(path).replace('\\', '/').lstrip('/')
                url = urlunsplit((scheme, netloc, newpath, query, fragment))
                after_plus = scheme.find('+') + 1
                url = scheme[:after_plus] + urlunsplit((scheme[after_plus:], netloc, newpath, query, fragment))

        super(Git, self).__init__(url, *args, **kwargs)

    def parse_vcs_bundle_file(self, content):
        url = rev = None
        for line in content.splitlines():
            if not line.strip() or line.strip().startswith('#'):
                continue
            url_match = re.search(r'git\s*remote\s*add\s*origin(.*)\s*-f', line)
            if url_match:
                url = url_match.group(1).strip()
            rev_match = re.search(r'^git\s*checkout\s*-q\s*(.*)\s*', line)
            if rev_match:
                rev = rev_match.group(1).strip()
            if url and rev:
                return url, rev
        return None, None

    def export(self, location):
        """Export the Git repository at the url to the destination location"""
        temp_dir = tempfile.mkdtemp('-export', 'pip-')
        self.unpack(temp_dir)
        try:
            if not location.endswith('/'):
                location = location + '/'
            call_subprocess(
                [self.cmd, 'checkout-index', '-a', '-f', '--prefix', location],
                filter_stdout=self._filter, show_stdout=False, cwd=temp_dir)
        finally:
            rmtree(temp_dir)

    def check_rev_options(self, rev, dest, rev_options):
        """Check the revision options before checkout to compensate that tags
        and branches may need origin/ as a prefix.
        Returns the SHA1 of the branch or tag if found.
        """
        revisions = self.get_refs(dest)

        origin_rev = 'origin/%s' % rev
        if origin_rev in revisions:
            # remote branch
            return [revisions[origin_rev]]
        elif rev in revisions:
            # a local tag or branch name
            return [revisions[rev]]
        else:
            logger.warn("Could not find a tag or branch '%s', assuming commit." % rev)
            return rev_options

    def switch(self, dest, url, rev_options):
        call_subprocess(
            [self.cmd, 'config', 'remote.origin.url', url], cwd=dest)
        call_subprocess(
            [self.cmd, 'checkout', '-q'] + rev_options, cwd=dest)

        self.update_submodules(dest)

    def update(self, dest, rev_options):
        # First fetch changes from the default remote
        call_subprocess([self.cmd, 'fetch', '-q'], cwd=dest)
        # Then reset to wanted revision (maby even origin/master)
        if rev_options:
            rev_options = self.check_rev_options(rev_options[0], dest, rev_options)
        call_subprocess([self.cmd, 'reset', '--hard', '-q'] + rev_options, cwd=dest)
        #: update submodules
        self.update_submodules(dest)

    def obtain(self, dest):
        url, rev = self.get_url_rev()
        if rev:
            rev_options = [rev]
            rev_display = ' (to %s)' % rev
        else:
            rev_options = ['origin/master']
            rev_display = ''
        if self.check_destination(dest, url, rev_options, rev_display):
            logger.notify('Cloning %s%s to %s' % (url, rev_display, display_path(dest)))
            call_subprocess([self.cmd, 'clone', '-q', url, dest])
            #: repo may contain submodules
            self.update_submodules(dest)
            if rev:
                rev_options = self.check_rev_options(rev, dest, rev_options)
                # Only do a checkout if rev_options differs from HEAD
                if not self.get_revision(dest).startswith(rev_options[0]):
                    call_subprocess([self.cmd, 'checkout', '-q'] + rev_options, cwd=dest)

    def get_url(self, location):
        url = call_subprocess(
            [self.cmd, 'config', 'remote.origin.url'],
            show_stdout=False, cwd=location)
        return url.strip()

    def get_revision(self, location):
        current_rev = call_subprocess(
            [self.cmd, 'rev-parse', 'HEAD'], show_stdout=False, cwd=location)
        return current_rev.strip()

    def get_refs(self, location):
        """Return map of named refs (branches or tags) to commit hashes."""
        output = call_subprocess([self.cmd, 'show-ref'],
                                 show_stdout=False, cwd=location)
        rv = {}
        for line in output.strip().splitlines():
            commit, ref = line.split(' ', 1)
            ref = ref.strip()
            ref_name = None
            if ref.startswith('refs/remotes/'):
                ref_name = ref[len('refs/remotes/'):]
            elif ref.startswith('refs/heads/'):
                ref_name = ref[len('refs/heads/'):]
            elif ref.startswith('refs/tags/'):
                ref_name = ref[len('refs/tags/'):]
            if ref_name is not None:
                rv[ref_name] = commit.strip()
        return rv

    def get_src_requirement(self, dist, location, find_tags):
        repo = self.get_url(location)
        if not repo.lower().startswith('git:'):
            repo = 'git+' + repo
        egg_project_name = dist.egg_name().split('-', 1)[0]
        if not repo:
            return None
        current_rev = self.get_revision(location)
        refs = self.get_refs(location)
        # refs maps names to commit hashes; we need the inverse
        # if multiple names map to a single commit, this arbitrarily picks one
        names_by_commit = dict((commit, ref) for ref, commit in refs.items())

        if current_rev in names_by_commit:
            # It's a tag
            full_egg_name = '%s-%s' % (egg_project_name, names_by_commit[current_rev])
        else:
            full_egg_name = '%s-dev' % egg_project_name

        return '%s@%s#egg=%s' % (repo, current_rev, full_egg_name)

    def get_url_rev(self):
        """
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes doesn't
        work with a ssh:// scheme (e.g. Github). But we need a scheme for
        parsing. Hence we remove it again afterwards and return it as a stub.
        """
        if not '://' in self.url:
            assert not 'file:' in self.url
            self.url = self.url.replace('git+', 'git+ssh://')
            url, rev = super(Git, self).get_url_rev()
            url = url.replace('ssh://', '')
        else:
            url, rev = super(Git, self).get_url_rev()

        return url, rev

    def update_submodules(self, location):
        if not os.path.exists(os.path.join(location, '.gitmodules')):
            return
        call_subprocess([self.cmd, 'submodule', 'update', '--init', '--recursive', '-q'],
                        cwd=location)

vcs.register(Git)
python3.3/site-packages/pip/vcs/subversion.py000064400000024620151733566760015214 0ustar00import os
import re
from pip.backwardcompat import urlparse
from pip.index import Link
from pip.util import rmtree, display_path, call_subprocess
from pip.log import logger
from pip.vcs import vcs, VersionControl

_svn_xml_url_re = re.compile('url="([^"]+)"')
_svn_rev_re = re.compile('committed-rev="(\d+)"')
_svn_url_re = re.compile(r'URL: (.+)')
_svn_revision_re = re.compile(r'Revision: (.+)')
_svn_info_xml_rev_re = re.compile(r'\s*revision="(\d+)"')
_svn_info_xml_url_re = re.compile(r'<url>(.*)</url>')


class Subversion(VersionControl):
    name = 'svn'
    dirname = '.svn'
    repo_name = 'checkout'
    schemes = ('svn', 'svn+ssh', 'svn+http', 'svn+https', 'svn+svn')
    bundle_file = 'svn-checkout.txt'
    guide = ('# This was an svn checkout; to make it a checkout again run:\n'
            'svn checkout --force -r %(rev)s %(url)s .\n')

    def get_info(self, location):
        """Returns (url, revision), where both are strings"""
        assert not location.rstrip('/').endswith(self.dirname), 'Bad directory: %s' % location
        output = call_subprocess(
            [self.cmd, 'info', location], show_stdout=False, extra_environ={'LANG': 'C'})
        match = _svn_url_re.search(output)
        if not match:
            logger.warn('Cannot determine URL of svn checkout %s' % display_path(location))
            logger.info('Output that cannot be parsed: \n%s' % output)
            return None, None
        url = match.group(1).strip()
        match = _svn_revision_re.search(output)
        if not match:
            logger.warn('Cannot determine revision of svn checkout %s' % display_path(location))
            logger.info('Output that cannot be parsed: \n%s' % output)
            return url, None
        return url, match.group(1)

    def parse_vcs_bundle_file(self, content):
        for line in content.splitlines():
            if not line.strip() or line.strip().startswith('#'):
                continue
            match = re.search(r'^-r\s*([^ ])?', line)
            if not match:
                return None, None
            rev = match.group(1)
            rest = line[match.end():].strip().split(None, 1)[0]
            return rest, rev
        return None, None

    def export(self, location):
        """Export the svn repository at the url to the destination location"""
        url, rev = self.get_url_rev()
        rev_options = get_rev_options(url, rev)
        logger.notify('Exporting svn repository %s to %s' % (url, location))
        logger.indent += 2
        try:
            if os.path.exists(location):
                # Subversion doesn't like to check out over an existing directory
                # --force fixes this, but was only added in svn 1.5
                rmtree(location)
            call_subprocess(
                [self.cmd, 'export'] + rev_options + [url, location],
                filter_stdout=self._filter, show_stdout=False)
        finally:
            logger.indent -= 2

    def switch(self, dest, url, rev_options):
        call_subprocess(
            [self.cmd, 'switch'] + rev_options + [url, dest])

    def update(self, dest, rev_options):
        call_subprocess(
            [self.cmd, 'update'] + rev_options + [dest])

    def obtain(self, dest):
        url, rev = self.get_url_rev()
        rev_options = get_rev_options(url, rev)
        if rev:
            rev_display = ' (to revision %s)' % rev
        else:
            rev_display = ''
        if self.check_destination(dest, url, rev_options, rev_display):
            logger.notify('Checking out %s%s to %s'
                          % (url, rev_display, display_path(dest)))
            call_subprocess(
                [self.cmd, 'checkout', '-q'] + rev_options + [url, dest])

    def get_location(self, dist, dependency_links):
        for url in dependency_links:
            egg_fragment = Link(url).egg_fragment
            if not egg_fragment:
                continue
            if '-' in egg_fragment:
                ## FIXME: will this work when a package has - in the name?
                key = '-'.join(egg_fragment.split('-')[:-1]).lower()
            else:
                key = egg_fragment
            if key == dist.key:
                return url.split('#', 1)[0]
        return None

    def get_revision(self, location):
        """
        Return the maximum revision for all files under a given location
        """
        # Note: taken from setuptools.command.egg_info
        revision = 0

        for base, dirs, files in os.walk(location):
            if self.dirname not in dirs:
                dirs[:] = []
                continue    # no sense walking uncontrolled subdirs
            dirs.remove(self.dirname)
            entries_fn = os.path.join(base, self.dirname, 'entries')
            if not os.path.exists(entries_fn):
                ## FIXME: should we warn?
                continue

            dirurl, localrev = self._get_svn_url_rev(base)

            if base == location:
                base_url = dirurl + '/'   # save the root url
            elif not dirurl or not dirurl.startswith(base_url):
                dirs[:] = []
                continue    # not part of the same svn tree, skip it
            revision = max(revision, localrev)
        return revision

    def get_url_rev(self):
        # hotfix the URL scheme after removing svn+ from svn+ssh:// readd it
        url, rev = super(Subversion, self).get_url_rev()
        if url.startswith('ssh://'):
            url = 'svn+' + url
        return url, rev

    def get_url(self, location):
        # In cases where the source is in a subdirectory, not alongside setup.py
        # we have to look up in the location until we find a real setup.py
        orig_location = location
        while not os.path.exists(os.path.join(location, 'setup.py')):
            last_location = location
            location = os.path.dirname(location)
            if location == last_location:
                # We've traversed up to the root of the filesystem without finding setup.py
                logger.warn("Could not find setup.py for directory %s (tried all parent directories)"
                            % orig_location)
                return None

        return self._get_svn_url_rev(location)[0]

    def _get_svn_url_rev(self, location):
        from pip.exceptions import InstallationError

        f = open(os.path.join(location, self.dirname, 'entries'))
        data = f.read()
        f.close()
        if data.startswith('8') or data.startswith('9') or data.startswith('10'):
            data = list(map(str.splitlines, data.split('\n\x0c\n')))
            del data[0][0]  # get rid of the '8'
            url = data[0][3]
            revs = [int(d[9]) for d in data if len(d) > 9 and d[9]] + [0]
        elif data.startswith('<?xml'):
            match = _svn_xml_url_re.search(data)
            if not match:
                raise ValueError('Badly formatted data: %r' % data)
            url = match.group(1)    # get repository URL
            revs = [int(m.group(1)) for m in _svn_rev_re.finditer(data)] + [0]
        else:
            try:
                # subversion >= 1.7
                xml = call_subprocess([self.cmd, 'info', '--xml', location], show_stdout=False)
                url = _svn_info_xml_url_re.search(xml).group(1)
                revs = [int(m.group(1)) for m in _svn_info_xml_rev_re.finditer(xml)]
            except InstallationError:
                url, revs = None, []

        if revs:
            rev = max(revs)
        else:
            rev = 0

        return url, rev

    def get_tag_revs(self, svn_tag_url):
        stdout = call_subprocess(
            [self.cmd, 'ls', '-v', svn_tag_url], show_stdout=False)
        results = []
        for line in stdout.splitlines():
            parts = line.split()
            rev = int(parts[0])
            tag = parts[-1].strip('/')
            results.append((tag, rev))
        return results

    def find_tag_match(self, rev, tag_revs):
        best_match_rev = None
        best_tag = None
        for tag, tag_rev in tag_revs:
            if (tag_rev > rev and
                (best_match_rev is None or best_match_rev > tag_rev)):
                # FIXME: Is best_match > tag_rev really possible?
                # or is it a sign something is wacky?
                best_match_rev = tag_rev
                best_tag = tag
        return best_tag

    def get_src_requirement(self, dist, location, find_tags=False):
        repo = self.get_url(location)
        if repo is None:
            return None
        parts = repo.split('/')
        ## FIXME: why not project name?
        egg_project_name = dist.egg_name().split('-', 1)[0]
        rev = self.get_revision(location)
        if parts[-2] in ('tags', 'tag'):
            # It's a tag, perfect!
            full_egg_name = '%s-%s' % (egg_project_name, parts[-1])
        elif parts[-2] in ('branches', 'branch'):
            # It's a branch :(
            full_egg_name = '%s-%s-r%s' % (dist.egg_name(), parts[-1], rev)
        elif parts[-1] == 'trunk':
            # Trunk :-/
            full_egg_name = '%s-dev_r%s' % (dist.egg_name(), rev)
            if find_tags:
                tag_url = '/'.join(parts[:-1]) + '/tags'
                tag_revs = self.get_tag_revs(tag_url)
                match = self.find_tag_match(rev, tag_revs)
                if match:
                    logger.notify('trunk checkout %s seems to be equivalent to tag %s' % match)
                    repo = '%s/%s' % (tag_url, match)
                    full_egg_name = '%s-%s' % (egg_project_name, match)
        else:
            # Don't know what it is
            logger.warn('svn URL does not fit normal structure (tags/branches/trunk): %s' % repo)
            full_egg_name = '%s-dev_r%s' % (egg_project_name, rev)
        return 'svn+%s@%s#egg=%s' % (repo, rev, full_egg_name)


def get_rev_options(url, rev):
    if rev:
        rev_options = ['-r', rev]
    else:
        rev_options = []

    r = urlparse.urlsplit(url)
    if hasattr(r, 'username'):
        # >= Python-2.5
        username, password = r.username, r.password
    else:
        netloc = r[1]
        if '@' in netloc:
            auth = netloc.split('@')[0]
            if ':' in auth:
                username, password = auth.split(':', 1)
            else:
                username, password = auth, None
        else:
            username, password = None, None

    if username:
        rev_options += ['--username', username]
    if password:
        rev_options += ['--password', password]
    return rev_options


vcs.register(Subversion)
python3.3/site-packages/pip/pep425tags.py000064400000005631151733566760014121 0ustar00"""Generate and work with PEP 425 Compatibility Tags."""

import sys
import warnings

try:
    import sysconfig
except ImportError:  # pragma nocover
    # Python < 2.7
    import distutils.sysconfig as sysconfig
import distutils.util


def get_abbr_impl():
    """Return abbreviated implementation name."""
    if hasattr(sys, 'pypy_version_info'):
        pyimpl = 'pp'
    elif sys.platform.startswith('java'):
        pyimpl = 'jy'
    elif sys.platform == 'cli':
        pyimpl = 'ip'
    else:
        pyimpl = 'cp'
    return pyimpl


def get_impl_ver():
    """Return implementation version."""
    return ''.join(map(str, sys.version_info[:2]))


def get_platform():
    """Return our platform name 'win32', 'linux_x86_64'"""
    # XXX remove distutils dependency
    return distutils.util.get_platform().replace('.', '_').replace('-', '_')


def get_supported(versions=None, noarch=False):
    """Return a list of supported tags for each version specified in
    `versions`.

    :param versions: a list of string versions, of the form ["33", "32"],
        or None. The first version will be assumed to support our ABI.
    """
    supported = []

    # Versions must be given with respect to the preference
    if versions is None:
        versions = []
        major = sys.version_info[0]
        # Support all previous minor Python versions.
        for minor in range(sys.version_info[1], -1, -1):
            versions.append(''.join(map(str, (major, minor))))

    impl = get_abbr_impl()

    abis = []

    try:
        soabi = sysconfig.get_config_var('SOABI')
    except IOError as e: # Issue #1074
        warnings.warn("{0}".format(e), RuntimeWarning)
        soabi = None

    if soabi and soabi.startswith('cpython-'):
        abis[0:0] = ['cp' + soabi.split('-', 1)[-1]]

    abi3s = set()
    import imp
    for suffix in imp.get_suffixes():
        if suffix[0].startswith('.abi'):
            abi3s.add(suffix[0].split('.', 2)[1])

    abis.extend(sorted(list(abi3s)))

    abis.append('none')

    if not noarch:
        arch = get_platform()

        # Current version, current API (built specifically for our Python):
        for abi in abis:
            supported.append(('%s%s' % (impl, versions[0]), abi, arch))

    # No abi / arch, but requires our implementation:
    for i, version in enumerate(versions):
        supported.append(('%s%s' % (impl, version), 'none', 'any'))
        if i == 0:
            # Tagged specifically as being cross-version compatible
            # (with just the major version specified)
            supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any'))

    # No abi / arch, generic Python
    for i, version in enumerate(versions):
        supported.append(('py%s' % (version,), 'none', 'any'))
        if i == 0:
            supported.append(('py%s' % (version[0]), 'none', 'any'))

    return supported

supported_tags = get_supported()
supported_tags_noarch = get_supported(noarch=True)
python3.3/site-packages/setuptools/compat.py000064400000004774151733566760015146 0ustar00import sys
import itertools

if sys.version_info[0] < 3:
    PY3 = False

    basestring = basestring
    import __builtin__ as builtins
    import ConfigParser
    from StringIO import StringIO
    BytesIO = StringIO
    execfile = execfile
    func_code = lambda o: o.func_code
    func_globals = lambda o: o.func_globals
    im_func = lambda o: o.im_func
    from htmlentitydefs import name2codepoint
    import httplib
    from BaseHTTPServer import HTTPServer
    from SimpleHTTPServer import SimpleHTTPRequestHandler
    from BaseHTTPServer import BaseHTTPRequestHandler
    iteritems = lambda o: o.iteritems()
    long_type = long
    maxsize = sys.maxint
    next = lambda o: o.next()
    numeric_types = (int, long, float)
    unichr = unichr
    unicode = unicode
    bytes = str
    from urllib import url2pathname, splittag, pathname2url
    import urllib2
    from urllib2 import urlopen, HTTPError, URLError, unquote, splituser
    from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
    filterfalse = itertools.ifilterfalse

    exec("""def reraise(tp, value, tb=None):
    raise tp, value, tb""")
else:
    PY3 = True

    basestring = str
    import builtins
    import configparser as ConfigParser
    from io import StringIO, BytesIO
    func_code = lambda o: o.__code__
    func_globals = lambda o: o.__globals__
    im_func = lambda o: o.__func__
    from html.entities import name2codepoint
    import http.client as httplib
    from http.server import HTTPServer, SimpleHTTPRequestHandler
    from http.server import BaseHTTPRequestHandler
    iteritems = lambda o: o.items()
    long_type = int
    maxsize = sys.maxsize
    next = next
    numeric_types = (int, float)
    unichr = chr
    unicode = str
    bytes = bytes
    from urllib.error import HTTPError, URLError
    import urllib.request as urllib2
    from urllib.request import urlopen, url2pathname, pathname2url
    from urllib.parse import (
        urlparse, urlunparse, unquote, splituser, urljoin, urlsplit,
        urlunsplit, splittag,
    )
    filterfalse = itertools.filterfalse

    def execfile(fn, globs=None, locs=None):
        if globs is None:
            globs = globals()
        if locs is None:
            locs = globs
        f = open(fn, 'rb')
        try:
            source = f.read()
        finally:
            f.close()
        exec(compile(source, fn, 'exec'), globs, locs)

    def reraise(tp, value, tb=None):
        if value.__traceback__ is not tb:
            raise value.with_traceback(tb)
        raise value
python3.3/site-packages/setuptools/version.py000064400000000024151733566760015330 0ustar00__version__ = '2.0'
python3.3/site-packages/setuptools/command/build_py.py000064400000020370151733566760017076 0ustar00import os
import sys
import fnmatch
import textwrap
from distutils.command.build_py import build_py as _build_py
from distutils.util import convert_path
from glob import glob

try:
    from setuptools.lib2to3_ex import Mixin2to3
except ImportError:
    class Mixin2to3:
        def run_2to3(self, files, doctests=True):
            "do nothing"

class build_py(_build_py, Mixin2to3):
    """Enhanced 'build_py' command that includes data files with packages

    The data files are specified via a 'package_data' argument to 'setup()'.
    See 'setuptools.dist.Distribution' for more details.

    Also, this version of the 'build_py' command allows you to specify both
    'py_modules' and 'packages' in the same setup operation.
    """
    def finalize_options(self):
        _build_py.finalize_options(self)
        self.package_data = self.distribution.package_data
        self.exclude_package_data = self.distribution.exclude_package_data or {}
        if 'data_files' in self.__dict__: del self.__dict__['data_files']
        self.__updated_files = []
        self.__doctests_2to3 = []

    def run(self):
        """Build modules, packages, and copy data files to build directory"""
        if not self.py_modules and not self.packages:
            return

        if self.py_modules:
            self.build_modules()

        if self.packages:
            self.build_packages()
            self.build_package_data()

        self.run_2to3(self.__updated_files, False)
        self.run_2to3(self.__updated_files, True)
        self.run_2to3(self.__doctests_2to3, True)

        # Only compile actual .py files, using our base class' idea of what our
        # output files are.
        self.byte_compile(_build_py.get_outputs(self, include_bytecode=0))

    def __getattr__(self, attr):
        if attr=='data_files':  # lazily compute data files
            self.data_files = files = self._get_data_files()
            return files
        return _build_py.__getattr__(self,attr)

    def build_module(self, module, module_file, package):
        outfile, copied = _build_py.build_module(self, module, module_file, package)
        if copied:
            self.__updated_files.append(outfile)
        return outfile, copied

    def _get_data_files(self):
        """Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
        self.analyze_manifest()
        data = []
        for package in self.packages or ():
            # Locate package source directory
            src_dir = self.get_package_dir(package)

            # Compute package build directory
            build_dir = os.path.join(*([self.build_lib] + package.split('.')))

            # Length of path to strip from found files
            plen = len(src_dir)+1

            # Strip directory from globbed filenames
            filenames = [
                file[plen:] for file in self.find_data_files(package, src_dir)
                ]
            data.append((package, src_dir, build_dir, filenames))
        return data

    def find_data_files(self, package, src_dir):
        """Return filenames for package's data files in 'src_dir'"""
        globs = (self.package_data.get('', [])
                 + self.package_data.get(package, []))
        files = self.manifest_files.get(package, [])[:]
        for pattern in globs:
            # Each pattern has to be converted to a platform-specific path
            files.extend(glob(os.path.join(src_dir, convert_path(pattern))))
        return self.exclude_data_files(package, src_dir, files)

    def build_package_data(self):
        """Copy data files into build directory"""
        for package, src_dir, build_dir, filenames in self.data_files:
            for filename in filenames:
                target = os.path.join(build_dir, filename)
                self.mkpath(os.path.dirname(target))
                srcfile = os.path.join(src_dir, filename)
                outf, copied = self.copy_file(srcfile, target)
                srcfile = os.path.abspath(srcfile)
                if copied and srcfile in self.distribution.convert_2to3_doctests:
                    self.__doctests_2to3.append(outf)

    def analyze_manifest(self):
        self.manifest_files = mf = {}
        if not self.distribution.include_package_data:
            return
        src_dirs = {}
        for package in self.packages or ():
            # Locate package source directory
            src_dirs[assert_relative(self.get_package_dir(package))] = package

        self.run_command('egg_info')
        ei_cmd = self.get_finalized_command('egg_info')
        for path in ei_cmd.filelist.files:
            d,f = os.path.split(assert_relative(path))
            prev = None
            oldf = f
            while d and d!=prev and d not in src_dirs:
                prev = d
                d, df = os.path.split(d)
                f = os.path.join(df, f)
            if d in src_dirs:
                if path.endswith('.py') and f==oldf:
                    continue    # it's a module, not data
                mf.setdefault(src_dirs[d],[]).append(path)

    def get_data_files(self): pass  # kludge 2.4 for lazy computation

    if sys.version<"2.4":    # Python 2.4 already has this code
        def get_outputs(self, include_bytecode=1):
            """Return complete list of files copied to the build directory

            This includes both '.py' files and data files, as well as '.pyc'
            and '.pyo' files if 'include_bytecode' is true.  (This method is
            needed for the 'install_lib' command to do its job properly, and to
            generate a correct installation manifest.)
            """
            return _build_py.get_outputs(self, include_bytecode) + [
                os.path.join(build_dir, filename)
                for package, src_dir, build_dir,filenames in self.data_files
                for filename in filenames
                ]

    def check_package(self, package, package_dir):
        """Check namespace packages' __init__ for declare_namespace"""
        try:
            return self.packages_checked[package]
        except KeyError:
            pass

        init_py = _build_py.check_package(self, package, package_dir)
        self.packages_checked[package] = init_py

        if not init_py or not self.distribution.namespace_packages:
            return init_py

        for pkg in self.distribution.namespace_packages:
            if pkg==package or pkg.startswith(package+'.'):
                break
        else:
            return init_py

        f = open(init_py,'rbU')
        if 'declare_namespace'.encode() not in f.read():
            from distutils import log
            log.warn(
                "WARNING: %s is a namespace package, but its __init__.py does\n"
                "not declare_namespace(); setuptools 0.7 will REQUIRE this!\n"
                '(See the setuptools manual under "Namespace Packages" for '
                "details.)\n", package
            )
        f.close()
        return init_py

    def initialize_options(self):
        self.packages_checked={}
        _build_py.initialize_options(self)

    def get_package_dir(self, package):
        res = _build_py.get_package_dir(self, package)
        if self.distribution.src_root is not None:
            return os.path.join(self.distribution.src_root, res)
        return res

    def exclude_data_files(self, package, src_dir, files):
        """Filter filenames for package's data files in 'src_dir'"""
        globs = (self.exclude_package_data.get('', [])
                 + self.exclude_package_data.get(package, []))
        bad = []
        for pattern in globs:
            bad.extend(
                fnmatch.filter(
                    files, os.path.join(src_dir, convert_path(pattern))
                )
            )
        bad = dict.fromkeys(bad)
        seen = {}
        return [
            f for f in files if f not in bad
                and f not in seen and seen.setdefault(f,1)  # ditch dupes
        ]


def assert_relative(path):
    if not os.path.isabs(path):
        return path
    from distutils.errors import DistutilsSetupError
    msg = textwrap.dedent("""
        Error: setup script specifies an absolute path:

            %s

        setup() arguments must *always* be /-separated paths relative to the
        setup.py directory, *never* absolute paths.
        """).lstrip() % path
    raise DistutilsSetupError(msg)
python3.3/site-packages/setuptools/command/build_ext.py000064400000027116151733566760017253 0ustar00from distutils.command.build_ext import build_ext as _du_build_ext
try:
    # Attempt to use Pyrex for building extensions, if available
    from Pyrex.Distutils.build_ext import build_ext as _build_ext
except ImportError:
    _build_ext = _du_build_ext

import os, sys
from distutils.file_util import copy_file
from setuptools.extension import Library
from distutils.ccompiler import new_compiler
from distutils.sysconfig import customize_compiler
try:
    # Python 2.7 or >=3.2
    from sysconfig import _CONFIG_VARS
except ImportError:
    from distutils.sysconfig import get_config_var
    get_config_var("LDSHARED")  # make sure _config_vars is initialized
    del get_config_var
    from distutils.sysconfig import _config_vars as _CONFIG_VARS
from distutils import log
from distutils.errors import *

have_rtld = False
use_stubs = False
libtype = 'shared'

if sys.platform == "darwin":
    use_stubs = True
elif os.name != 'nt':
    try:
        from dl import RTLD_NOW
        have_rtld = True
        use_stubs = True
    except ImportError:
        pass

def if_dl(s):
    if have_rtld:
        return s
    return ''






class build_ext(_build_ext):
    def run(self):
        """Build extensions in build directory, then copy if --inplace"""
        old_inplace, self.inplace = self.inplace, 0
        _build_ext.run(self)
        self.inplace = old_inplace
        if old_inplace:
            self.copy_extensions_to_source()

    def copy_extensions_to_source(self):
        build_py = self.get_finalized_command('build_py')
        for ext in self.extensions:
            fullname = self.get_ext_fullname(ext.name)
            filename = self.get_ext_filename(fullname)
            modpath = fullname.split('.')
            package = '.'.join(modpath[:-1])
            package_dir = build_py.get_package_dir(package)
            dest_filename = os.path.join(package_dir,os.path.basename(filename))
            src_filename = os.path.join(self.build_lib,filename)

            # Always copy, even if source is older than destination, to ensure
            # that the right extensions for the current Python/platform are
            # used.
            copy_file(
                src_filename, dest_filename, verbose=self.verbose,
                dry_run=self.dry_run
            )
            if ext._needs_stub:
                self.write_stub(package_dir or os.curdir, ext, True)


    if _build_ext is not _du_build_ext and not hasattr(_build_ext,'pyrex_sources'):
        # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4
        def swig_sources(self, sources, *otherargs):
            # first do any Pyrex processing
            sources = _build_ext.swig_sources(self, sources) or sources
            # Then do any actual SWIG stuff on the remainder
            return _du_build_ext.swig_sources(self, sources, *otherargs)



    def get_ext_filename(self, fullname):
        filename = _build_ext.get_ext_filename(self,fullname)
        if fullname in self.ext_map:
            ext = self.ext_map[fullname]
            if isinstance(ext,Library):
                fn, ext = os.path.splitext(filename)
                return self.shlib_compiler.library_filename(fn,libtype)
            elif use_stubs and ext._links_to_dynamic:
                d,fn = os.path.split(filename)
                return os.path.join(d,'dl-'+fn)
        return filename

    def initialize_options(self):
        _build_ext.initialize_options(self)
        self.shlib_compiler = None
        self.shlibs = []
        self.ext_map = {}

    def finalize_options(self):
        _build_ext.finalize_options(self)
        self.extensions = self.extensions or []
        self.check_extensions_list(self.extensions)
        self.shlibs = [ext for ext in self.extensions
                        if isinstance(ext,Library)]
        if self.shlibs:
            self.setup_shlib_compiler()
        for ext in self.extensions:
            ext._full_name = self.get_ext_fullname(ext.name)
        for ext in self.extensions:
            fullname = ext._full_name
            self.ext_map[fullname] = ext

            # distutils 3.1 will also ask for module names
            # XXX what to do with conflicts?
            self.ext_map[fullname.split('.')[-1]] = ext

            ltd = ext._links_to_dynamic = \
                self.shlibs and self.links_to_dynamic(ext) or False
            ext._needs_stub = ltd and use_stubs and not isinstance(ext,Library)
            filename = ext._file_name = self.get_ext_filename(fullname)
            libdir = os.path.dirname(os.path.join(self.build_lib,filename))
            if ltd and libdir not in ext.library_dirs:
                ext.library_dirs.append(libdir)
            if ltd and use_stubs and os.curdir not in ext.runtime_library_dirs:
                ext.runtime_library_dirs.append(os.curdir)

    def setup_shlib_compiler(self):
        compiler = self.shlib_compiler = new_compiler(
            compiler=self.compiler, dry_run=self.dry_run, force=self.force
        )
        if sys.platform == "darwin":
            tmp = _CONFIG_VARS.copy()
            try:
                # XXX Help!  I don't have any idea whether these are right...
                _CONFIG_VARS['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup"
                _CONFIG_VARS['CCSHARED'] = " -dynamiclib"
                _CONFIG_VARS['SO'] = ".dylib"
                customize_compiler(compiler)
            finally:
                _CONFIG_VARS.clear()
                _CONFIG_VARS.update(tmp)
        else:
            customize_compiler(compiler)

        if self.include_dirs is not None:
            compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for (name,value) in self.define:
                compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                compiler.undefine_macro(macro)
        if self.libraries is not None:
            compiler.set_libraries(self.libraries)
        if self.library_dirs is not None:
            compiler.set_library_dirs(self.library_dirs)
        if self.rpath is not None:
            compiler.set_runtime_library_dirs(self.rpath)
        if self.link_objects is not None:
            compiler.set_link_objects(self.link_objects)

        # hack so distutils' build_extension() builds a library instead
        compiler.link_shared_object = link_shared_object.__get__(compiler)



    def get_export_symbols(self, ext):
        if isinstance(ext,Library):
            return ext.export_symbols
        return _build_ext.get_export_symbols(self,ext)

    def build_extension(self, ext):
        _compiler = self.compiler
        try:
            if isinstance(ext,Library):
                self.compiler = self.shlib_compiler
            _build_ext.build_extension(self,ext)
            if ext._needs_stub:
                self.write_stub(
                    self.get_finalized_command('build_py').build_lib, ext
                )
        finally:
            self.compiler = _compiler

    def links_to_dynamic(self, ext):
        """Return true if 'ext' links to a dynamic lib in the same package"""
        # XXX this should check to ensure the lib is actually being built
        # XXX as dynamic, and not just using a locally-found version or a
        # XXX static-compiled version
        libnames = dict.fromkeys([lib._full_name for lib in self.shlibs])
        pkg = '.'.join(ext._full_name.split('.')[:-1]+[''])
        for libname in ext.libraries:
            if pkg+libname in libnames: return True
        return False

    def get_outputs(self):
        outputs = _build_ext.get_outputs(self)
        optimize = self.get_finalized_command('build_py').optimize
        for ext in self.extensions:
            if ext._needs_stub:
                base = os.path.join(self.build_lib, *ext._full_name.split('.'))
                outputs.append(base+'.py')
                outputs.append(base+'.pyc')
                if optimize:
                    outputs.append(base+'.pyo')
        return outputs

    def write_stub(self, output_dir, ext, compile=False):
        log.info("writing stub loader for %s to %s",ext._full_name, output_dir)
        stub_file = os.path.join(output_dir, *ext._full_name.split('.'))+'.py'
        if compile and os.path.exists(stub_file):
            raise DistutilsError(stub_file+" already exists! Please delete.")
        if not self.dry_run:
            f = open(stub_file,'w')
            f.write('\n'.join([
                "def __bootstrap__():",
                "   global __bootstrap__, __file__, __loader__",
                "   import sys, os, pkg_resources, imp"+if_dl(", dl"),
                "   __file__ = pkg_resources.resource_filename(__name__,%r)"
                   % os.path.basename(ext._file_name),
                "   del __bootstrap__",
                "   if '__loader__' in globals():",
                "       del __loader__",
                if_dl("   old_flags = sys.getdlopenflags()"),
                "   old_dir = os.getcwd()",
                "   try:",
                "     os.chdir(os.path.dirname(__file__))",
                if_dl("     sys.setdlopenflags(dl.RTLD_NOW)"),
                "     imp.load_dynamic(__name__,__file__)",
                "   finally:",
                if_dl("     sys.setdlopenflags(old_flags)"),
                "     os.chdir(old_dir)",
                "__bootstrap__()",
                "" # terminal \n
            ]))
            f.close()
        if compile:
            from distutils.util import byte_compile
            byte_compile([stub_file], optimize=0,
                         force=True, dry_run=self.dry_run)
            optimize = self.get_finalized_command('install_lib').optimize
            if optimize > 0:
                byte_compile([stub_file], optimize=optimize,
                             force=True, dry_run=self.dry_run)
            if os.path.exists(stub_file) and not self.dry_run:
                os.unlink(stub_file)


if use_stubs or os.name=='nt':
    # Build shared libraries
    #
    def link_shared_object(self, objects, output_libname, output_dir=None,
        libraries=None, library_dirs=None, runtime_library_dirs=None,
        export_symbols=None, debug=0, extra_preargs=None,
        extra_postargs=None, build_temp=None, target_lang=None
    ):  self.link(
            self.SHARED_LIBRARY, objects, output_libname,
            output_dir, libraries, library_dirs, runtime_library_dirs,
            export_symbols, debug, extra_preargs, extra_postargs,
            build_temp, target_lang
        )
else:
    # Build static libraries everywhere else
    libtype = 'static'

    def link_shared_object(self, objects, output_libname, output_dir=None,
        libraries=None, library_dirs=None, runtime_library_dirs=None,
        export_symbols=None, debug=0, extra_preargs=None,
        extra_postargs=None, build_temp=None, target_lang=None
    ):
        # XXX we need to either disallow these attrs on Library instances,
        #     or warn/abort here if set, or something...
        #libraries=None, library_dirs=None, runtime_library_dirs=None,
        #export_symbols=None, extra_preargs=None, extra_postargs=None,
        #build_temp=None

        assert output_dir is None   # distutils build_ext doesn't pass this
        output_dir,filename = os.path.split(output_libname)
        basename, ext = os.path.splitext(filename)
        if self.library_filename("x").startswith('lib'):
            # strip 'lib' prefix; this is kludgy if some platform uses
            # a different prefix
            basename = basename[3:]

        self.create_static_lib(
            objects, basename, output_dir, debug, target_lang
        )


python3.3/site-packages/setuptools/command/register.py000064400000000425151733566760017112 0ustar00from distutils.command.register import register as _register

class register(_register):
    __doc__ = _register.__doc__

    def run(self):
        # Make sure that we are using valid current name/version info
        self.run_command('egg_info')
        _register.run(self)

python3.3/site-packages/setuptools/command/bdist_egg.py000064400000044436151733566760017227 0ustar00"""setuptools.command.bdist_egg

Build .egg distributions"""

# This module should be kept compatible with Python 2.3
import sys, os, marshal
from setuptools import Command
from distutils.dir_util import remove_tree, mkpath
try:
    # Python 2.7 or >=3.2
    from sysconfig import get_path, get_python_version
    def _get_purelib():
        return get_path("purelib")
except ImportError:
    from distutils.sysconfig import get_python_lib, get_python_version
    def _get_purelib():
        return get_python_lib(False)

from distutils import log
from distutils.errors import DistutilsSetupError
from pkg_resources import get_build_platform, Distribution, ensure_directory
from pkg_resources import EntryPoint
from types import CodeType
from setuptools.compat import basestring, next
from setuptools.extension import Library

def strip_module(filename):
    if '.' in filename:
        filename = os.path.splitext(filename)[0]
    if filename.endswith('module'):
        filename = filename[:-6]
    return filename

def write_stub(resource, pyfile):
    f = open(pyfile,'w')
    f.write('\n'.join([
        "def __bootstrap__():",
        "   global __bootstrap__, __loader__, __file__",
        "   import sys, pkg_resources, imp",
        "   __file__ = pkg_resources.resource_filename(__name__,%r)"
            % resource,
        "   __loader__ = None; del __bootstrap__, __loader__",
        "   imp.load_dynamic(__name__,__file__)",
        "__bootstrap__()",
        "" # terminal \n
    ]))
    f.close()

# stub __init__.py for packages distributed without one
NS_PKG_STUB = '__import__("pkg_resources").declare_namespace(__name__)'

class bdist_egg(Command):

    description = "create an \"egg\" distribution"

    user_options = [
        ('bdist-dir=', 'b',
            "temporary directory for creating the distribution"),
        ('plat-name=', 'p',
                     "platform name to embed in generated filenames "
                     "(default: %s)" % get_build_platform()),
        ('exclude-source-files', None,
                     "remove all .py files from the generated egg"),
        ('keep-temp', 'k',
                     "keep the pseudo-installation tree around after " +
                     "creating the distribution archive"),
        ('dist-dir=', 'd',
                     "directory to put final built distributions in"),
        ('skip-build', None,
                     "skip rebuilding everything (for testing/debugging)"),
    ]

    boolean_options = [
        'keep-temp', 'skip-build', 'exclude-source-files'
    ]

















    def initialize_options (self):
        self.bdist_dir = None
        self.plat_name = None
        self.keep_temp = 0
        self.dist_dir = None
        self.skip_build = 0
        self.egg_output = None
        self.exclude_source_files = None


    def finalize_options(self):
        ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info")
        self.egg_info = ei_cmd.egg_info

        if self.bdist_dir is None:
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'egg')

        if self.plat_name is None:
            self.plat_name = get_build_platform()

        self.set_undefined_options('bdist',('dist_dir', 'dist_dir'))

        if self.egg_output is None:

            # Compute filename of the output egg
            basename = Distribution(
                None, None, ei_cmd.egg_name, ei_cmd.egg_version,
                get_python_version(),
                self.distribution.has_ext_modules() and self.plat_name
            ).egg_name()

            self.egg_output = os.path.join(self.dist_dir, basename+'.egg')








    def do_install_data(self):
        # Hack for packages that install data to install's --install-lib
        self.get_finalized_command('install').install_lib = self.bdist_dir

        site_packages = os.path.normcase(os.path.realpath(_get_purelib()))
        old, self.distribution.data_files = self.distribution.data_files,[]

        for item in old:
            if isinstance(item,tuple) and len(item)==2:
                if os.path.isabs(item[0]):
                    realpath = os.path.realpath(item[0])
                    normalized = os.path.normcase(realpath)
                    if normalized==site_packages or normalized.startswith(
                        site_packages+os.sep
                    ):
                        item = realpath[len(site_packages)+1:], item[1]
                    # XXX else: raise ???
            self.distribution.data_files.append(item)

        try:
            log.info("installing package data to %s" % self.bdist_dir)
            self.call_command('install_data', force=0, root=None)
        finally:
            self.distribution.data_files = old


    def get_outputs(self):
        return [self.egg_output]


    def call_command(self,cmdname,**kw):
        """Invoke reinitialized command `cmdname` with keyword args"""
        for dirname in INSTALL_DIRECTORY_ATTRS:
            kw.setdefault(dirname,self.bdist_dir)
        kw.setdefault('skip_build',self.skip_build)
        kw.setdefault('dry_run', self.dry_run)
        cmd = self.reinitialize_command(cmdname, **kw)
        self.run_command(cmdname)
        return cmd


    def run(self):
        # Generate metadata first
        self.run_command("egg_info")
        # We run install_lib before install_data, because some data hacks
        # pull their data path from the install_lib command.
        log.info("installing library code to %s" % self.bdist_dir)
        instcmd = self.get_finalized_command('install')
        old_root = instcmd.root; instcmd.root = None
        if self.distribution.has_c_libraries() and not self.skip_build:
            self.run_command('build_clib')
        cmd = self.call_command('install_lib', warn_dir=0)
        instcmd.root = old_root

        all_outputs, ext_outputs = self.get_ext_outputs()
        self.stubs = []
        to_compile = []
        for (p,ext_name) in enumerate(ext_outputs):
            filename,ext = os.path.splitext(ext_name)
            pyfile = os.path.join(self.bdist_dir, strip_module(filename)+'.py')
            self.stubs.append(pyfile)
            log.info("creating stub loader for %s" % ext_name)
            if not self.dry_run:
                write_stub(os.path.basename(ext_name), pyfile)
            to_compile.append(pyfile)
            ext_outputs[p] = ext_name.replace(os.sep,'/')

        to_compile.extend(self.make_init_files())
        if to_compile:
            cmd.byte_compile(to_compile)
        if self.distribution.data_files:
            self.do_install_data()

        # Make the EGG-INFO directory
        archive_root = self.bdist_dir
        egg_info = os.path.join(archive_root,'EGG-INFO')
        self.mkpath(egg_info)
        if self.distribution.scripts:
            script_dir = os.path.join(egg_info, 'scripts')
            log.info("installing scripts to %s" % script_dir)
            self.call_command('install_scripts',install_dir=script_dir,no_ep=1)

        self.copy_metadata_to(egg_info)
        native_libs = os.path.join(egg_info, "native_libs.txt")
        if all_outputs:
            log.info("writing %s" % native_libs)
            if not self.dry_run:
                ensure_directory(native_libs)
                libs_file = open(native_libs, 'wt')
                libs_file.write('\n'.join(all_outputs))
                libs_file.write('\n')
                libs_file.close()
        elif os.path.isfile(native_libs):
            log.info("removing %s" % native_libs)
            if not self.dry_run:
                os.unlink(native_libs)

        write_safety_flag(
            os.path.join(archive_root,'EGG-INFO'), self.zip_safe()
        )

        if os.path.exists(os.path.join(self.egg_info,'depends.txt')):
            log.warn(
                "WARNING: 'depends.txt' will not be used by setuptools 0.6!\n"
                "Use the install_requires/extras_require setup() args instead."
            )

        if self.exclude_source_files:
            self.zap_pyfiles()

        # Make the archive
        make_zipfile(self.egg_output, archive_root, verbose=self.verbose,
                          dry_run=self.dry_run, mode=self.gen_header())
        if not self.keep_temp:
            remove_tree(self.bdist_dir, dry_run=self.dry_run)

        # Add to 'Distribution.dist_files' so that the "upload" command works
        getattr(self.distribution,'dist_files',[]).append(
            ('bdist_egg',get_python_version(),self.egg_output))




    def zap_pyfiles(self):
        log.info("Removing .py files from temporary directory")
        for base,dirs,files in walk_egg(self.bdist_dir):
            for name in files:
                if name.endswith('.py'):
                    path = os.path.join(base,name)
                    log.debug("Deleting %s", path)
                    os.unlink(path)

    def zip_safe(self):
        safe = getattr(self.distribution,'zip_safe',None)
        if safe is not None:
            return safe
        log.warn("zip_safe flag not set; analyzing archive contents...")
        return analyze_egg(self.bdist_dir, self.stubs)

    def make_init_files(self):
        """Create missing package __init__ files"""
        init_files = []
        for base,dirs,files in walk_egg(self.bdist_dir):
            if base==self.bdist_dir:
                # don't put an __init__ in the root
                continue
            for name in files:
                if name.endswith('.py'):
                    if '__init__.py' not in files:
                        pkg = base[len(self.bdist_dir)+1:].replace(os.sep,'.')
                        if self.distribution.has_contents_for(pkg):
                            log.warn("Creating missing __init__.py for %s",pkg)
                            filename = os.path.join(base,'__init__.py')
                            if not self.dry_run:
                                f = open(filename,'w'); f.write(NS_PKG_STUB)
                                f.close()
                            init_files.append(filename)
                    break
            else:
                # not a package, don't traverse to subdirectories
                dirs[:] = []

        return init_files

    def gen_header(self):
        epm = EntryPoint.parse_map(self.distribution.entry_points or '')
        ep = epm.get('setuptools.installation',{}).get('eggsecutable')
        if ep is None:
            return 'w'  # not an eggsecutable, do it the usual way.

        if not ep.attrs or ep.extras:
            raise DistutilsSetupError(
                "eggsecutable entry point (%r) cannot have 'extras' "
                "or refer to a module" % (ep,)
            )

        pyver = sys.version[:3]
        pkg = ep.module_name
        full = '.'.join(ep.attrs)
        base = ep.attrs[0]
        basename = os.path.basename(self.egg_output)

        header = (
            "#!/bin/sh\n"
            'if [ `basename $0` = "%(basename)s" ]\n'
            'then exec python%(pyver)s -c "'
            "import sys, os; sys.path.insert(0, os.path.abspath('$0')); "
            "from %(pkg)s import %(base)s; sys.exit(%(full)s())"
            '" "$@"\n'
            'else\n'
            '  echo $0 is not the correct name for this egg file.\n'
            '  echo Please rename it back to %(basename)s and try again.\n'
            '  exec false\n'
            'fi\n'

        ) % locals()

        if not self.dry_run:
            mkpath(os.path.dirname(self.egg_output), dry_run=self.dry_run)
            f = open(self.egg_output, 'w')
            f.write(header)
            f.close()
        return 'a'


    def copy_metadata_to(self, target_dir):
        "Copy metadata (egg info) to the target_dir"
        # normalize the path (so that a forward-slash in egg_info will
        # match using startswith below)
        norm_egg_info = os.path.normpath(self.egg_info)
        prefix = os.path.join(norm_egg_info,'')
        for path in self.ei_cmd.filelist.files:
            if path.startswith(prefix):
                target = os.path.join(target_dir, path[len(prefix):])
                ensure_directory(target)
                self.copy_file(path, target)

    def get_ext_outputs(self):
        """Get a list of relative paths to C extensions in the output distro"""

        all_outputs = []
        ext_outputs = []

        paths = {self.bdist_dir:''}
        for base, dirs, files in os.walk(self.bdist_dir):
            for filename in files:
                if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS:
                    all_outputs.append(paths[base]+filename)
            for filename in dirs:
                paths[os.path.join(base,filename)] = paths[base]+filename+'/'

        if self.distribution.has_ext_modules():
            build_cmd = self.get_finalized_command('build_ext')
            for ext in build_cmd.extensions:
                if isinstance(ext,Library):
                    continue
                fullname = build_cmd.get_ext_fullname(ext.name)
                filename = build_cmd.get_ext_filename(fullname)
                if not os.path.basename(filename).startswith('dl-'):
                    if os.path.exists(os.path.join(self.bdist_dir,filename)):
                        ext_outputs.append(filename)

        return all_outputs, ext_outputs


NATIVE_EXTENSIONS = dict.fromkeys('.dll .so .dylib .pyd'.split())




def walk_egg(egg_dir):
    """Walk an unpacked egg's contents, skipping the metadata directory"""
    walker = os.walk(egg_dir)
    base,dirs,files = next(walker)
    if 'EGG-INFO' in dirs:
        dirs.remove('EGG-INFO')
    yield base,dirs,files
    for bdf in walker:
        yield bdf

def analyze_egg(egg_dir, stubs):
    # check for existing flag in EGG-INFO
    for flag,fn in safety_flags.items():
        if os.path.exists(os.path.join(egg_dir,'EGG-INFO',fn)):
            return flag
    if not can_scan(): return False
    safe = True
    for base, dirs, files in walk_egg(egg_dir):
        for name in files:
            if name.endswith('.py') or name.endswith('.pyw'):
                continue
            elif name.endswith('.pyc') or name.endswith('.pyo'):
                # always scan, even if we already know we're not safe
                safe = scan_module(egg_dir, base, name, stubs) and safe
    return safe

def write_safety_flag(egg_dir, safe):
    # Write or remove zip safety flag file(s)
    for flag,fn in safety_flags.items():
        fn = os.path.join(egg_dir, fn)
        if os.path.exists(fn):
            if safe is None or bool(safe) != flag:
                os.unlink(fn)
        elif safe is not None and bool(safe)==flag:
            f=open(fn,'wt'); f.write('\n'); f.close()

safety_flags = {
    True: 'zip-safe',
    False: 'not-zip-safe',
}

def scan_module(egg_dir, base, name, stubs):
    """Check whether module possibly uses unsafe-for-zipfile stuff"""

    filename = os.path.join(base,name)
    if filename[:-1] in stubs:
        return True     # Extension module
    pkg = base[len(egg_dir)+1:].replace(os.sep,'.')
    module = pkg+(pkg and '.' or '')+os.path.splitext(name)[0]
    if sys.version_info < (3, 3):
        skip = 8   # skip magic & date
    else:
        skip = 12  # skip magic & date & file size
    f = open(filename,'rb'); f.read(skip)
    code = marshal.load(f); f.close()
    safe = True
    symbols = dict.fromkeys(iter_symbols(code))
    for bad in ['__file__', '__path__']:
        if bad in symbols:
            log.warn("%s: module references %s", module, bad)
            safe = False
    if 'inspect' in symbols:
        for bad in [
            'getsource', 'getabsfile', 'getsourcefile', 'getfile'
            'getsourcelines', 'findsource', 'getcomments', 'getframeinfo',
            'getinnerframes', 'getouterframes', 'stack', 'trace'
        ]:
            if bad in symbols:
                log.warn("%s: module MAY be using inspect.%s", module, bad)
                safe = False
    if '__name__' in symbols and '__main__' in symbols and '.' not in module:
        if sys.version[:3]=="2.4":  # -m works w/zipfiles in 2.5
            log.warn("%s: top-level module may be 'python -m' script", module)
            safe = False
    return safe

def iter_symbols(code):
    """Yield names and strings used by `code` and its nested code objects"""
    for name in code.co_names: yield name
    for const in code.co_consts:
        if isinstance(const,basestring):
            yield const
        elif isinstance(const,CodeType):
            for name in iter_symbols(const):
                yield name

def can_scan():
    if not sys.platform.startswith('java') and sys.platform != 'cli':
        # CPython, PyPy, etc.
        return True
    log.warn("Unable to analyze compiled code on this platform.")
    log.warn("Please ask the author to include a 'zip_safe'"
             " setting (either True or False) in the package's setup.py")


































# Attribute names of options for commands that might need to be convinced to
# install to the egg build directory

INSTALL_DIRECTORY_ATTRS = [
    'install_lib', 'install_dir', 'install_data', 'install_base'
]

def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None,
    mode='w'
):
    """Create a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    """
    import zipfile
    mkpath(os.path.dirname(zip_filename), dry_run=dry_run)
    log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir)

    def visit(z, dirname, names):
        for name in names:
            path = os.path.normpath(os.path.join(dirname, name))
            if os.path.isfile(path):
                p = path[len(base_dir)+1:]
                if not dry_run:
                    z.write(path, p)
                log.debug("adding '%s'" % p)

    if compress is None:
        compress = (sys.version>="2.4") # avoid 2.3 zipimport bug when 64 bits

    compression = [zipfile.ZIP_STORED, zipfile.ZIP_DEFLATED][bool(compress)]
    if not dry_run:
        z = zipfile.ZipFile(zip_filename, mode, compression=compression)
        for dirname, dirs, files in os.walk(base_dir):
            visit(z, dirname, files)
        z.close()
    else:
        for dirname, dirs, files in os.walk(base_dir):
            visit(None, dirname, files)
    return zip_filename
#
python3.3/site-packages/setuptools/command/__pycache__/easy_install.cpython-33.pyc000064400000241517151733566760024247 0ustar00�
�Rec@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZddlmZmZddlZddlmZmZddlmZddlmZmZddlmZdd	lmZmZdd
l m!Z!m"Z"m#Z#m$Z$ddl%m&Z&m'Z'ddl(m)Z)dd
l*m+Z+ddl,m-Z-ddl,m.Z.ddl(m/Z/m0Z0ddl1m2Z2m3Z3m4Z4m5Z5m6Z6ddlm7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEejFjGdejHjIejJ��ZKddddddgZLdd�ZMdd�ZNejOdfkr�dd�ZPd d!�ZQnd"d�ZPd#d!�ZQGd$d�de�ZRd%d&�ZSd'd(�ZTd)d�ZUd*d�ZVd+d,�ZWGd-d�de=�ZXeKeYd.d/�ZZd0d1�Z[d2d3�Z\d4d5�Z]d6d7d8�Z^d9d:�Z_d;d<�Z`d=d>�Zaydd?lmbZcWnedk
r�d@dA�ZcYnXdBdC�ZbdDdE�ZeGdFdG�dGef�ZgGdHdI�dIeg�ZhGdJdK�dKeh�ZiegjjZjdLdM�ZkdNdO�ZleYe[dPdQ�ZmdRdS�ZndTdU�ZoepdVd�ZqdS(Wu
Easy Install
------------

A tool for doing automatic download/extract/build of distutils-based Python
packages.  For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.

__ https://pythonhosted.org/setuptools/easy_install.html

iN(uglob(ulogudir_util(uCommandu_dont_write_bytecode(u	run_setup(uget_pathuget_config_vars(uget_platform(uconvert_pathu
subst_vars(uDistutilsArgErroruDistutilsOptionErroruDistutilsErroruDistutilsPlatformError(uINSTALL_SCHEMESuSCHEME_KEYS(usetopt(uunpack_archive(uPackageIndex(u
URL_SCHEME(u	bdist_egguegg_info(u	iteritemsumaxsizeu
basestringuunicodeureraise(uyield_linesunormalize_pathuresource_stringuensure_directoryuget_distributionufind_distributionsuEnvironmentuRequirementuDistributionuPathMetadatauEggMetadatau
WorkingSetuDistributionNotFounduVersionConflictuDEVELOP_DISTu__VENV_LAUNCHER__usamefileueasy_installuPthDistributionsuextract_wininst_cfgumainuget_exe_prefixescCstjd�dkS(NuPi(ustructucalcsize(((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuis_64bit@suis_64bitcCs�tjj|�o!tjj|�}ttjd�o9|}|rUtjj||�Stjjtjj|��}tjjtjj|��}||kS(Nusamefile(uosupathuexistsuhasattrusamefileunormpathunormcase(up1up2u
both_existuuse_samefileunorm_p1unorm_p2((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyusamefileCs$icCs|S(N((us((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	_to_asciiMsu	_to_asciicCs2yt|d�dSWntk
r-dSYnXdS(NuasciiTF(uunicodeuTrueuUnicodeErroruFalse(us((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuisasciiOs


uisasciicCs
|jd�S(Nuascii(uencode(us((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	_to_asciiVscCs2y|jd�dSWntk
r-dSYnXdS(NuasciiTF(uencodeuTrueuUnicodeErroruFalse(us((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuisasciiXs


cBs'|EeZdZdZdZd�Zd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZdddddd.d1d7d:g	Z	e
jr�d>e
jZ
ejd?d�e
f�e	jd?�nidd(6ZeZd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZdNdO�ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXdY�ZdZd[�Zd\d]�Z d^d_�Z!d�d`da�Z#d�dbdc�Z$ddde�Z%d�dfdg�Z&dhdi�Z'djdk�Z(dldm�Z)d�dndo�Z*dpfdqdr�Z+dsdt�Z,dudv�Z-dwdx�Z.dydz�Z/d{d|�Z0d}d~d�Z1d�d��Z2d�d��Z3d�d��Z4d�d��Z5d�d��Z6d�d��Z7d�d��Z8d�d��Z9d�d��Z:d�d��Z;d�d��Z<e=d�e=d�d�d�d���Z>e=d�d�d�d��Z?d�d��Z@d�S(�ueasy_installu'Manage a download/build/install processu Find/get/install Python packagesuprefix=uinstallation prefixuzip-okuzuinstall package as a zipfileu
multi-versionumu%make apps have to require() a versionuupgradeuUu1force upgrade (searches PyPI for latest versions)uinstall-dir=uduinstall package to DIRuscript-dir=usuinstall scripts to DIRuexclude-scriptsuxuDon't install scriptsualways-copyuau'Copy all needed packages to install diru
index-url=uiu base URL of Python Package Indexufind-links=ufu(additional URL(s) to search for packagesubuild-directory=ubu/download/extract/build in DIR; keep the resultsu	optimize=uOulalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]urecord=u3filename in which to record list of installed filesualways-unzipuZu*don't install as a zipfile, no matter whatu
site-dirs=uSu)list of directories where .pth files workueditableueu+Install specified packages in editable formuno-depsuNudon't install dependenciesuallow-hosts=uHu$pattern(s) that hostnames must matchulocal-snapshots-okulu(allow building eggs from local checkoutsuversionu"print version information and exitu
no-find-linksu9Don't load find-links defined in packages being installedu!install in user site-package '%s'uusercCs�tjr3tjjt�}|jtj�|_n	d|_d|_
|_d|_|_
|_d|_d|_d|_d|_d|_|_d|_|_|_d|_|_|_d|_|_|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&tjrQtj'|_(tj|_)nd|_(d|_)d|_*d|_+d|_,|_-d|_.i|_/d|_1d|_2|j3j4|_4|j3j5||j3j6d��dS(Niueasy_installF(7usiteuENABLE_USER_SITEuosupathuabspathu__file__u
startswithu	USER_SITEuuseruNoneuzip_okulocal_snapshots_okuinstall_diru
script_diruexclude_scriptsu	index_urlu
find_linksubuild_directoryuargsuoptimizeurecorduupgradeualways_copyu
multi_versionueditableuno_depsuallow_hostsurootuprefixu	no_reportuversionuinstall_purelibuinstall_platlibuinstall_headersuinstall_libuinstall_scriptsuinstall_datauinstall_baseuinstall_platbaseu	USER_BASEuinstall_userbaseuinstall_usersiteu
no_find_linksu
package_indexupth_fileualways_copy_fromu	site_dirsuinstalled_projectsuFalseusitepy_installedu_dry_runudistributionuverboseu_set_command_optionsuget_option_dict(uselfuwhereami((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinitialize_options�sL																									ueasy_install.initialize_optionscCs�x�|D]�}tjj|�s1tjj|�rtjd|�|js�tjj|�r|tjj|�r|t|�q�tj	|�q�qqWdS(NuDeleting %s(
uosupathuexistsuislinkuloguinfoudry_runuisdirurmtreeuunlink(uselfublockersufilename((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyudelete_blockers�s
$	%
ueasy_install.delete_blockersc	Csx|jr-tdtd�j�tj�ntjj�d}tdd�\}}i|jj�d6|jj	�d6|jj
�d6|d	6|dd
�d6|d|dd
6|d6|d6|d6|d6ttdd�d6|_t
jr|j|jd<|j|jd<n|jr�t
jr�|j�|jdkrNtd��n|j|_|_tjdkr�|jd�q�|jtjd�n|j�|j�|jdddd�|jdkr�|j|_n|jdkr�d.|_n|j!dd/�|j!dd0�|jrG|j"rG|j"|_|j#|_n|j!dd1�t$t%tj&�}t'�|_(|j)dk	rd d!�|j)jd"�D�}xq|D]f}tj&j*|�s�t+j,d#|�q�t%|�|kr�t-|d$��q�|j(j.t%|��q�Wn|j/s-|j0�n|j1p9d%|_1|j(dd�|_2xE|jt%|j�fD]+}||j2krn|j2j3d|�qnqnW|j4dk	r�d&d!�|j4jd"�D�}n	d'g}|j5dkr
|j6|j1d(|j2d)|�|_5nt7|j2tj&�|_8|j9dk	r_t:|j9t;�rh|j9j�|_9qhn	g|_9|j<r�|j5j=|j2tj&�n|js�|j5j>|j9�n|j!dd2�t:|j?t@�s1y>t@|j?�|_?d|j?ko�dknstA�nWq1tAk
r-t-d+��Yq1Xn|j/rS|jBrStCd,��n|jDsktCd-��ng|_EdS(3Nu
setuptools %su
setuptoolsiuprefixuexec_prefixu	dist_nameudist_versionu
dist_fullnameu
py_versioniupy_version_shortiupy_version_nodotu
sys_prefixusys_exec_prefixuabiflagsuuuserbaseuusersiteu$User base directory is not specifieduposixu	unix_useru_useruinstall_diru
script_dirubuild_directoryu	site_dirsuinstall_libuinstall_scriptsuinstallurecordcSs(g|]}tjj|j���qS((uosupathu
expanduserustrip(u.0us((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>s	u1easy_install.finalize_options.<locals>.<listcomp>u,u"%s (in --site-dirs) does not existu$ (in --site-dirs) is not on sys.pathuhttps://pypi.python.org/simplecSsg|]}|j��qS((ustrip(u.0us((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>)s	u*usearch_pathuhostsuoptimizeu--optimize must be 0, 1, or 2u9Must specify a build directory (-b) when using --editableu:No urls, filenames, or requirements specified (see --help)F(uinstall_diruinstall_dir(uinstall_diru
script_dir(urecordurecord(uoptimizeuoptimize(Fuversionuprintuget_distributionusysuexitusplituget_config_varsudistributionuget_nameuget_versionuget_fullnameugetattruconfig_varsusiteuENABLE_USER_SITEuinstall_userbaseuinstall_usersiteuuserucreate_home_pathuNoneuDistutilsPlatformErroruinstall_baseuinstall_platbaseuosunameu
select_schemeuexpand_basedirsuexpand_dirsu_expandu
script_diruinstall_diru
no_find_linksuFalseuset_undefined_optionsuinstall_purelibuinstall_scriptsumapunormalize_pathupathu
get_site_dirsu
all_site_dirsu	site_dirsuisdiruloguwarnuDistutilsOptionErroruappendueditableucheck_site_diru	index_urlushadow_pathuinsertuallow_hostsu
package_indexucreate_indexuEnvironmentulocal_indexu
find_linksu
isinstanceu
basestringulocal_snapshots_okuscan_egg_linksuadd_find_linksuoptimizeuintu
ValueErrorubuild_directoryuDistutilsArgErroruargsuoutputs(	uselfu
py_versionuprefixuexec_prefixunormpathu	site_dirsudu	path_itemuhosts((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyufinalize_options�s�	
	


		
	
"	!			

	ueasy_install.finalize_optionscCs�x�|D]y}t||�}|dk	rtjdksFtjdkr[tjj|�}nt||j�}t|||�qqWdS(Nuposixunt(	ugetattruNoneuosunameupathu
expanduseru
subst_varsuconfig_varsusetattr(uselfuattrsuattruval((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
_expand_attrsMs
ueasy_install._expand_attrscCs|jdddg�dS(uNCalls `os.path.expanduser` on install_base, install_platbase and
        root.uinstall_baseuinstall_platbaseurootN(u
_expand_attrs(uself((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuexpand_basedirsVsueasy_install.expand_basedirscCs#|jddddddg�dS(u+Calls `os.path.expanduser` on install dirs.uinstall_purelibuinstall_platlibuinstall_libuinstall_headersuinstall_scriptsuinstall_dataN(u
_expand_attrs(uself((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuexpand_dirs[sueasy_install.expand_dirscCs|j|jjkr(tj|j�nz�x%|jD]}|j||j�q5W|jr�|j}|j	r�t
|j	�}x5tt
|��D]}|||d�||<q�Wnddlm
}|j|j|j|fd|j�n|j�Wdtj|jj�XdS(Ni(u	file_utilu'writing list of installed files to '%s'(uverboseudistributionulogu
set_verbosityuargsueasy_installuno_depsurecorduoutputsurootulenurangeu	distutilsu	file_utiluexecuteu
write_fileuwarn_deprecated_options(uselfuspecuoutputsuroot_lenucounteru	file_util((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyurunas$			ueasy_install.runc
CsGytj�}Wntjdt�}YnXtjj|jd|�S(u�Return a pseudo-tempname base in the install directory.
        This code is intentionally naive; if a malicious party can write to
        the target directory you're already in deep doodoo.
        iutest-easy-install-%s(uosugetpidurandomurandintumaxsizeupathujoinuinstall_dir(uselfupid((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyupseudo_tempnamews
ueasy_install.pseudo_tempnamecCsdS(N((uself((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuwarn_deprecated_options�su$easy_install.warn_deprecated_optionscCs�t|j�}tjj|d�}||jk}|rS|jrS|j�}n�|j�d}tjj	|�}y:|r�tj
|�nt|d�j�tj
|�Wn"t
tfk
r�|j�YnX|r�|jr�t|j���n|r*|jdkr3t||j�|_q3n	d|_tjjdd�jtj�}|ttdd�|D��kr�d	|_n1|jr�tjj	|�r�d	|_d|_n||_dS(
u;Verify that self.install_dir is .pth-capable dir, if neededueasy-install.pthu.write-testuwu
PYTHONPATHucSsg|]}|r|�qS(((u.0u_f((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>�s	u/easy_install.check_site_dir.<locals>.<listcomp>NT(unormalize_pathuinstall_diruosupathujoinu
all_site_dirsu
multi_versionucheck_pth_processingupseudo_tempnameuexistsuunlinkuopenucloseuOSErroruIOErrorucant_write_to_targetuDistutilsErroruno_default_version_msgupth_fileuNoneuPthDistributionsuenvironugetusplitupathsepumapuTrueusitepy_installed(uselfuinstdirupth_fileuis_site_dirutestfileutest_existsu
PYTHONPATH((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyucheck_site_dir�s6	!"	ueasy_install.check_site_dircCs_d}|tj�d|jf}tjj|j�sE|d7}n
|d7}t|��dS(Nucan't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    %s

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s
iu�
This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
uK
Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.
(usysuexc_infouinstall_diruosupathuexistsuDistutilsError(uselfutemplateumsg((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyucant_write_to_target�s
u!easy_install.cant_write_to_targetcCs.|j}tjd|�|j�d}|d}tjj|�}y]|r^tj|�ntjj|�}tjj|�s�tj	|�nt
|d�}Wn"ttfk
r�|j
�YnHXz�|jd|f�|j�d}tj}tjdkrctjj|�\}}tjj|d�}	|j�dkrctjj|	�rc|	}qcnd	d
lm}
|
|ddd
gd	�tjj|�r�tjd|�dSWd|r�|j�ntjj|�r�tj|�ntjj|�r
tj|�nX|js*tjd|�ndS(u@Empirically verify whether .pth files are supported in inst. diru Checking .pth file support in %su.pthu.okuwu7import os; f = open(%r, 'w'); f.write('OK'); f.close()
untupythonw.exeu
python.exei(uspawnu-Eu-cupassu-TEST PASSED: %s appears to support .pth filesNu+TEST FAILED: %s does NOT support .pth filesTF(uinstall_diruloguinfoupseudo_tempnameuosupathuexistsuunlinkudirnameumakedirsuopenuOSErroruIOErrorucant_write_to_targetuwriteucloseuNoneusysu
executableunameusplitujoinulowerudistutils.spawnuspawnuTrueu
multi_versionuwarnuFalse(uselfuinstdirupth_fileuok_fileu	ok_existsudirnameufu
executableubasenameualtuspawn((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyucheck_pth_processing�sP	

	$
	u!easy_install.check_pth_processingcCs�|jro|jd�roxS|jd�D]?}|jd|�rHq)n|j|||jd|��q)Wn|j|�dS(u=Write all the scripts for `dist`, unless scripts are excludeduscriptsuscripts/N(uexclude_scriptsumetadata_isdirumetadata_listdiruinstall_scriptuget_metadatauinstall_wrapper_scripts(uselfudistuscript_name((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstall_egg_scriptssu easy_install.install_egg_scriptscCs|tjj|�rhxctj|�D]?\}}}x-|D]%}|jjtjj||��q8Wq"Wn|jj|�dS(N(uosupathuisdiruwalkuoutputsuappendujoin(uselfupathubaseudirsufilesufilename((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
add_outputs

*ueasy_install.add_outputcCs#|jrtd|f��ndS(NujInvalid argument %r: you can't use filenames or URLs with --editable (except via the --find-links option).(ueditableuDistutilsArgError(uselfuspec((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyunot_editables	ueasy_install.not_editablecCsW|js
dStjjtjj|j|j��rStd|j|jf��ndS(Nu2%r already exists in %s; can't do a checkout there(ueditableuosupathuexistsujoinubuild_directoryukeyuDistutilsArgError(uselfuspec((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyucheck_editable$s	'ueasy_install.check_editablec
Cs�tjdd�}d}|js.|j�nzYt|t�s�t|�r�|j|�|j	j
||�}|jd|||d�St
jj|�r�|j|�|jd|||d�St|�}n|j|�|j	j|||j|j|j|j�}|dkrDd|}|jr5|d7}nt|��nB|jtkrm|j|||d�|S|j||j||�SWdt
jj|�r�t|�nXdS(Nuprefixu
easy_install-u+Could not find suitable distribution for %ru2 (--always-copy skips system and development eggs)uUsingT(utempfileumkdtempuNoneueditableuinstall_site_pyu
isinstanceuRequirementu
URL_SCHEMEunot_editableu
package_indexudownloaduinstall_itemuTrueuosupathuexistsuparse_requirement_argucheck_editableufetch_distributionuupgradeualways_copyulocal_indexuDistutilsErroru
precedenceuDEVELOP_DISTuprocess_distributionulocationurmtree(uselfuspecudepsutmpdirudownloadudistumsg((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyueasy_install.s:	



	
	
ueasy_install.easy_installcCs�|p|j}|p*tjj|�|k}|p@|jd�}|p||jdk	o|tjjt|��t|j�k}|r�|r�x4|j|j	D]}|j
|kr�Pq�q�Wd}ntj
dtjj|��|r!|j|||�}xP|D]}|j|||�qWn,|j|�g}|j||d|d�|dk	r}x!|D]}||kr`|Sq`WndS(Nu.eggu
Processing %siuUsingT(ualways_copyuosupathudirnameuendswithualways_copy_fromuNoneunormalize_pathulocal_indexuproject_nameulocationuTrueuloguinfoubasenameuinstall_eggsuprocess_distributionuegg_distribution(uselfuspecudownloadutmpdirudepsuinstall_neededudistudists((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstall_itemWs.
	

ueasy_install.install_itemcCsUt|}xDtD]<}d|}t||�dkrt||||�qqWdS(u=Sets the install directories by applying the install schemes.uinstall_N(uINSTALL_SCHEMESuSCHEME_KEYSugetattruNoneusetattr(uselfunameuschemeukeyuattrname((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
select_scheme{s



ueasy_install.select_schemecGs6|j|�|jj|�|jj|�|j|�||j|j<tj|j	|||��|j
d�r�|jr�|jj|j
d��n|r�|jr�dS|dk	r�|j|jkr�tjd|�dS|dks�||kr0|j�}|p|}t|j|j|j�}ntjd|�y(tg�j|g|j|j�}Wnitk
r�tj�d}td|j��Yn5tk
r�tj�d}td|j��YnX|js�|jr"x9|D].}|j|jkr�|j|j��q�q�Wntjd|�dS(Nudependency_links.txtuSkipping dependencies for %suProcessing dependencies for %siu'Could not find required distribution %su7Installed distribution %s conflicts with requirement %su'Finished processing dependencies for %s( u
update_pthu
package_indexuaddulocal_indexuinstall_egg_scriptsuinstalled_projectsukeyuloguinfouinstallation_reportuhas_metadatau
no_find_linksuadd_find_linksuget_metadata_linesualways_copyuNoneuwarnuas_requirementuRequirementuproject_nameuspecsuextrasu
WorkingSeturesolveueasy_installuDistributionNotFoundusysuexc_infouDistutilsErroruargsuVersionConflictualways_copy_from(uselfurequirementudistudepsuinfoudistrequdistrosue((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuprocess_distribution�sL


	


u!easy_install.process_distributioncCsA|jdk	r|jS|jd�r*dS|jd�s=dSdS(Nunot-zip-safeuzip-safeTF(uzip_okuNoneuhas_metadatauTrueuFalse(uselfudist((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyushould_unzip�sueasy_install.should_unzipcCstjj|j|j�}tjj|�rSd}tj||j|j|�|Stjj|�rn|}n�tjj	|�|kr�tj
|�ntj|�}t|�dkr�tjj||d�}tjj|�r�|}q�nt
|�tj||�|S(Nu<%r already exists in %s; build directory %s will not be keptii(uosupathujoinubuild_directoryukeyuexistsuloguwarnuisdirudirnameuunlinkulistdirulenuensure_directoryushutilumove(uselfuspecu
dist_filenameu
setup_baseudstumsgucontents((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
maybe_move�s"	
ueasy_install.maybe_movecCs4|js0x$t|�D]}|j|�qWndS(N(uexclude_scriptsuget_script_argsuwrite_script(uselfudistuargs((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstall_wrapper_scripts�s	u$easy_install.install_wrapper_scriptscs�t|j��}t||�}�fdd�}|rzd�|rZ�jdd��nt|�|��t�}n|j|t|�d�dS(u/Generate a legacy script wrapper and install itcs4td��}|jd�}|jdd�}|S(um
            There are a couple of template scripts in the package. This
            function loads one of them and prepares it for use.

            These templates use triple-quotes to escape variable
            substitutions so the scripts get the 2to3 treatment when build
            on Python 3. The templates cannot use triple-quotes naturally.
            u
setuptoolsuutf-8u"""u(uresource_stringudecodeureplace(ufilenameu	raw_bytesutemplate_struclean_template(u
template_name(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuget_template�s	u1easy_install.install_script.<locals>.get_templateuscript template.pyu.pyu	 (dev).pyubN(ustruas_requirementuis_python_scriptureplaceuget_script_headerulocalsuwrite_scriptu	_to_ascii(uselfudistuscript_nameuscript_textudev_pathuspecu	is_scriptuget_template((u
template_nameu8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstall_script�s	ueasy_install.install_scriptutcs��j�fdd�|D��tjd|�j�tjj�j|�}�j|�t�}�j	s�t
|�tjj|�r�tj|�nt
|d|�}|j|�|j�t|d|�ndS(u1Write an executable file to the scripts directorycs(g|]}tjj�j|��qS((uosupathujoinu
script_dir(u.0ux(uself(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>�s	u-easy_install.write_script.<locals>.<listcomp>uInstalling %s script to %suwi�N(udelete_blockersuloguinfou
script_diruosupathujoinu
add_outputu
current_umaskudry_runuensure_directoryuexistsuunlinkuopenuwriteucloseuchmod(uselfuscript_nameucontentsumodeublockersutargetumaskuf((uselfu8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuwrite_script�s
		


ueasy_install.write_scriptcCs�|j�jd�r(|j||�gS|j�jd�rP|j||�gS|}tjj|�r�|jd�r�t|||j�n'tjj	|�r�tjj
|�}n|j|�r�|jr�|dk	r�|j|||�}ntjj|d�}tjj|�s�ttjj|dd��}|s[tdtjj
|���nt|�dkr�tdtjj
|���n|d	}n|jr�tj|j||��gS|j||�SdS(
Nu.eggu.exeu.pyusetup.pyu*u"Couldn't find a setup script in %siuMultiple setup scripts in %si(uloweruendswithuinstall_egguinstall_exeuosupathuisfileuunpack_archiveuunpack_progressuisdiruabspathu
startswithubuild_directoryuNoneu
maybe_moveujoinuexistsuglobuDistutilsErrorulenueditableuloguinfoureport_editableubuild_and_install(uselfuspecu
dist_filenameutmpdiru
setup_baseusetup_scriptusetups((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstall_eggss4"
	ueasy_install.install_eggscCs[tjj|�r3t|tjj|d��}nttj|��}tj	|d|�S(NuEGG-INFOumetadata(
uosupathuisdiruPathMetadataujoinuEggMetadatau	zipimportuzipimporteruDistributionu
from_filename(uselfuegg_pathumetadata((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuegg_distribution+s!ueasy_install.egg_distributioncCs�tjj|jtjj|��}tjj|�}|jsLt|�n|j|�}t	||�s�tjj
|�r�tjj|�r�tj
|d|j�n2tjj|�r�|jtj|fd|�nt|�tjj
|�r+|j|�rtjd}}q�tjd}}na|j|�rZ|j|�|jd}}n2|j|�r|tjd}}ntjd}}|j|||f|dtjj|�tjj|�f�n|j|�|j|�S(Nudry_runu	Removing uMovinguCopyingu
Extractingu	 %s to %s(uosupathujoinuinstall_dirubasenameuabspathudry_runuensure_directoryuegg_distributionusamefileuisdiruislinkudir_utiluremove_treeuexistsuexecuteuunlinkuuncache_zipdiru
startswithushutilumoveucopytreeushould_unzipumkpathuunpack_and_compileucopy2udirnameu
add_output(uselfuegg_pathutmpdirudestinationudistufum((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstall_egg2s4$	
% 

)
ueasy_install.install_eggcs�t|�}|dkr+td|��ntdd|jdd�d|jdd�dt��}tjj||j	�d�}|_
|d}tjj|d	�}tjj|d
�}t|�t||�|_
|j||�tjj|�s}t|d�}	|	jd�xU|jd�D]D\}
}|
d
kr(|	jd|
jdd�j�|f�q(q(W|	j�ntjj|d��|j�fdd�t|�D��tj||d|jd|j�|j||�S(Nu(%s is not a valid distutils Windows .exeuproject_nameumetadataunameuversionuplatformu.eggu.tmpuEGG-INFOuPKG-INFOuwuMetadata-Version: 1.0
utarget_versionu%s: %s
u_u-uscriptscs)g|]}tjj�|d��qS(i(uosupathujoin(u.0uargs(u
script_dir(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>ts	u,easy_install.install_exe.<locals>.<listcomp>uverboseudry_run(uextract_wininst_cfguNoneuDistutilsErroruDistributionugetuget_platformuosupathujoinuegg_nameulocationuensure_directoryuPathMetadatau	_provideru
exe_to_egguexistsuopenuwriteuitemsureplaceutitleucloseudelete_blockersuget_script_argsu	bdist_eggumake_zipfileuverboseudry_runuinstall_egg(uselfu
dist_filenameutmpdirucfgudistuegg_pathuegg_tmpu	_egg_infoupkg_infufukuv((u
script_diru8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstall_exeSs8&


0
 ueasy_install.install_execs�t|��g�g�i������fdd�}t|�|�g}x��D]�}|j�jd�rY|jd�}|d}tj|d�d|d<tjj	�|�}�j
|�|j
|�tj||�qYqYW|j��tj
tjj	�d�tj�|��x�dD]�}	t�|	r-tjj	�d|	d
�}
tjj|
�s�t|
d�}|jdj	t�|	�d�|j�q�q-q-Wd
S(u;Extract a bdist_wininst to the directories an egg would usecsR|j�}x�D]\}}|j|�r||t|�d�}|jd�}tjj�|�}|j�}|jd�s�|jd�r�tj	|d
�|d<d�tjj
|d�d<�j|�nI|jd�r$|dkr$d�tjj
|d�d<�j|�n|SqW|jd�sNtj
d	|�ndS(Nu/u.pydu.dlliiu.pyuSCRIPTS/u.pthuWARNING: can't process %si����i����(uloweru
startswithulenusplituosupathujoinuendswithu	bdist_eggustrip_moduleusplitextuappenduloguwarnuNone(usrcudstusuoldunewupartsudl(uegg_tmpunative_libsuprefixesu
to_compileu	top_level(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuprocess�s$u(easy_install.exe_to_egg.<locals>.processu.pydu/iu.pyuEGG-INFOu	top_levelunative_libsu.txtuwu
Ni����i����i����(u	top_levelunative_libs(uget_exe_prefixesuunpack_archiveuloweruendswithusplitu	bdist_eggustrip_moduleuosupathujoinuappendu
write_stububyte_compileuwrite_safety_flaguanalyze_eggulocalsuexistsuopenuwriteuclose(uselfu
dist_filenameuegg_tmpuprocessustubsuresupartsuresourceupyfileunameutxtuf((uegg_tmpunative_libsuprefixesu
to_compileu	top_levelu8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
exe_to_egg}s4






!ueasy_install.exe_to_eggu	Installedc	Cszd}|jrN|jrN|d7}|jtttj�krN|d7}qNn|j}|j}|j	}d}|t
�S(u9Helpful installation message for display to package usersu
%(what)s %(eggloc)s%(extras)su�

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("%(name)s")  # latest installed version
    pkg_resources.require("%(name)s==%(version)s")  # this exact version
    pkg_resources.require("%(name)s>=%(version)s")  # this version or higher
u�

Note also that the installation directory must be on sys.path at runtime for
this to work.  (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)
u(u
multi_versionu	no_reportuinstall_dirumapunormalize_pathusysupathulocationuproject_nameuversionulocals(	uselfurequdistuwhatumsguegglocunameuversionuextras((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstallation_report�s

			u easy_install.installation_reportcCs&tjj|�}tj}dt�S(Nu"
Extracted editable version of %(spec)s to %(dirname)s

If it uses setuptools in its setup script, you can activate it in
"development" mode by going to that directory and running::

    %(python)s setup.py develop

See the setuptools documentation for the "develop" command for more info.
(uosupathudirnameusysu
executableulocals(uselfuspecusetup_scriptudirnameupython((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyureport_editable�s		ueasy_install.report_editablecCs+tjjdt�tjjdt�t|�}|jdkrid|jd}|jdd|�n"|jdkr�|jdd�n|jr�|jdd	�nt	j
d
|t|�dd�dj|��yt
||�Wn<tk
r&tj�d}td|jdf��YnXdS(
Nudistutils.command.bdist_eggudistutils.command.egg_infoiuviiu-u-qu-nu
Running %s %su uSetup script exited with %s(usysumodulesu
setdefaultu	bdist_egguegg_infoulistuverboseuinsertudry_runuloguinfoulenujoinu	run_setupu
SystemExituexc_infouDistutilsErroruargs(uselfusetup_scriptu
setup_baseuargsuv((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	run_setup�s"	*
ueasy_install.run_setupc	Csddg}tjdddtjj|��}z�|jtjj|��|j|�|j|||�t|g�}g}x?|D]7}x.||D]"}|j|j	|j
|��q�Wq�W|r�|jr�tj
d|�n|SWdt|�tj|j�XdS(Nu	bdist_eggu
--dist-diruprefixu
egg-dist-tmp-udiru+No eggs found in %s (setup script problem?)(utempfileumkdtempuosupathudirnameu_set_fetcher_optionsuappendu	run_setupuEnvironmentuinstall_eggulocationudry_runuloguwarnurmtreeu
set_verbosityuverbose(	uselfusetup_scriptu
setup_baseuargsudist_diruall_eggsueggsukeyudist((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyubuild_and_install�s$	

$	

ueasy_install.build_and_installc	Cs�|jjd�j�}d}i}xF|j�D]8\}}||krOq1n|d||jdd	�<q1Wtd|�}tjj|d
�}t	j
||�dS(
u
        When easy_install is about to run bdist_egg on a source dist, that
        source dist might have 'setup_requires' directives, requiring
        additional fetching. Ensure the fetcher options given to easy_install
        are available to that command as well.
        ueasy_installu
find_linksu	site_dirsu	index_urluoptimizeuallow_hostsiu_u-u	setup.cfgN(u
find_linksu	site_dirsu	index_urluoptimizeu	site_dirsuallow_hosts(udistributionuget_option_dictucopyuitemsureplaceudictuosupathujoinusetoptuedit_config(	uselfubaseuei_optsufetch_directivesu
fetch_optionsukeyuvalusettingsucfg_filename((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_set_fetcher_optionss	u!easy_install._set_fetcher_optionscCs�|jdkrdSx~|j|jD]l}|jsE|j|jkr$tjd|�|jj|�|j|jkr�|jj|j�q�q$q$W|js|j|jj	kr�tjd|�qtjd|�|jj
|�|j|jkr|jj|j�qn|js�|jj
�|jdkr�tjj|jd�}tjj|�rotj|�nt|d�}|j|jj|j�d�|j�q�ndS(Nu&Removing %s from easy-install.pth fileu4%s is already the active version in easy-install.pthu"Adding %s to easy-install.pth fileu
setuptoolsusetuptools.pthuwtu
(upth_fileuNoneukeyu
multi_versionulocationuloguinfouremoveushadow_pathupathsuadduappendudry_runusaveuosupathujoinuinstall_diruislinkuunlinkuopenuwriteu
make_relativeuclose(uselfudistudufilenameuf((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
update_pths4	
	
 ueasy_install.update_pthcCstjd||�|S(NuUnpacking %s to %s(ulogudebug(uselfusrcudst((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuunpack_progress@sueasy_install.unpack_progresscs�g�g����fdd�}t|||��j���js�x<�D]1}tj|�tjdBd@}t||�qQWndS(Ncs�|jd�r/|jd�r/�j|�n.|jd�sM|jd�r]�j|�n�j||��jr}|p�dS(Nu.pyu	EGG-INFO/u.dllu.so(uendswithu
startswithuappenduunpack_progressudry_runuNone(usrcudst(uselfuto_chmodu
to_compile(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyupfIsu+easy_install.unpack_and_compile.<locals>.pfimi�(uunpack_archiveubyte_compileudry_runuosustatuST_MODEuchmod(uselfuegg_pathudestinationupfufumode((uselfuto_chmodu
to_compileu8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuunpack_and_compileEs
	
ueasy_install.unpack_and_compilecCs�tr|jd�dSddlm}zetj|jd�||ddddd|j�|jr�||d|jddd|j�nWdtj|j�XdS(Nu%byte-compiling is disabled, skipping.i(ubyte_compileiuoptimizeuforceudry_run(	u_dont_write_bytecodeuwarnudistutils.utilubyte_compileulogu
set_verbosityuverboseudry_runuoptimize(uselfu
to_compileubyte_compile((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyubyte_compileXs
	ueasy_install.byte_compilecCs&d}||jtjjdd�fS(Nu�bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s

and your PYTHONPATH environment variable currently contains:

    %r

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.u
PYTHONPATHu(uinstall_diruosuenvironuget(uselfutemplate((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuno_default_version_msgksu#easy_install.no_default_version_msgcCs?|jr
dStjj|jd�}tdd�}d}tjj|�r�tjd|j�t	|d�}|j
�}tjd
kr�|j
�}n|j�|jd	�s�td
|��q�n||kr2tjd|�|jst|�t	|d�}|j|�|j�n|j|g�nd|_dS(u8Make sure there's a site.py in the target dir, if neededNusite.pyu
setuptoolsu
site-patch.pyuuChecking existing site.py in %surbiu
def __boot():u;%s is not a setuptools-generated site.py; please remove it.uCreating %suwb(iT(usitepy_installeduosupathujoinuinstall_diruresource_stringuexistsulogudebuguopenureadusysuversion_infoudecodeucloseu
startswithuDistutilsErroruinfoudry_runuensure_directoryuwriteubyte_compileuTrue(uselfusitepyusourceucurrentuf((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuinstall_site_py�s2	
	


ueasy_install.install_site_pycCs�|js
dSttjjd��}xct|j�D]R\}}|j|�r5tjj|�r5|j	d|�tj
|d�q5q5WdS(uCreate directories under ~.Nu~uos.makedirs('%s', 0700)i�(uuseruconvert_pathuosupathu
expanduseru	iteritemsuconfig_varsu
startswithuisdirudebug_printumakedirs(uselfuhomeunameupath((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyucreate_home_path�s	"ueasy_install.create_home_pathuposixuinstall_diru/$base/lib/python$py_version_short/site-packagesu
script_diru	$base/binu$base/Lib/site-packagesu
$base/ScriptscGs |jd�j}|jr�|j�}|j|d<|jjtj|j�}xH|j	�D]7\}}t
||d�dkr\t|||�q\q\Wnddl
m}xo|D]g}t
||�}|dk	r�|||�}tjdkrtjj|�}nt|||�q�q�WdS(Nuinstallubasei(u
subst_varsuposix(uget_finalized_commanduconfig_varsuprefixucopyuINSTALL_SCHEMESugetuosunameuDEFAULT_SCHEMEuitemsugetattruNoneusetattrudistutils.utilu
subst_varsupathu
expanduser(uselfuattrsuconfig_varsuschemeuattruvalu
subst_vars((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_expand�s 	

ueasy_install._expandNT(uprefix=Nuinstallation prefix(uzip-okuzuinstall package as a zipfile(u
multi-versionumu%make apps have to require() a version(uupgradeuUu1force upgrade (searches PyPI for latest versions)(uinstall-dir=uduinstall package to DIR(uscript-dir=usuinstall scripts to DIR(uexclude-scriptsuxuDon't install scripts(ualways-copyuau'Copy all needed packages to install dir(u
index-url=uiu base URL of Python Package Index(ufind-links=ufu(additional URL(s) to search for packages(ubuild-directory=ubu/download/extract/build in DIR; keep the results(u	optimize=uOulalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](urecord=Nu3filename in which to record list of installed files(ualways-unzipuZu*don't install as a zipfile, no matter what(u
site-dirs=uSu)list of directories where .pth files work(ueditableueu+Install specified packages in editable form(uno-depsuNudon't install dependencies(uallow-hosts=uHu$pattern(s) that hostnames must match(ulocal-snapshots-okulu(allow building eggs from local checkouts(uversionNu"print version information and exit(u
no-find-linksNu9Don't load find-links defined in packages being installedF(Au__name__u
__module__u__qualname__u__doc__udescriptionuTrueucommand_consumes_argumentsuNoneuuser_optionsuboolean_optionsusiteuENABLE_USER_SITEu	USER_SITEuhelp_msguappendunegative_optuPackageIndexucreate_indexuinitialize_optionsudelete_blockersufinalize_optionsu
_expand_attrsuexpand_basedirsuexpand_dirsurunupseudo_tempnameuwarn_deprecated_optionsucheck_site_dirucant_write_to_targetucheck_pth_processinguinstall_egg_scriptsu
add_outputunot_editableucheck_editableuFalseueasy_installuinstall_itemu
select_schemeuprocess_distributionushould_unzipu
maybe_moveuinstall_wrapper_scriptsuinstall_scriptuwrite_scriptuinstall_eggsuegg_distributionuinstall_egguinstall_exeu
exe_to_egguinstallation_reportureport_editableu	run_setupubuild_and_installu_set_fetcher_optionsu
update_pthuunpack_progressuunpack_and_compileubyte_compileuno_default_version_msguinstall_site_pyucreate_home_pathudictuINSTALL_SCHEMESuDEFAULT_SCHEMEu_expand(u
__locals__((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyueasy_install_s�		

3
�	*'0
)$	/	(!*2
$$
	c	Csdd�tjjdd�jtj�D�}tjg}tjtjkr_|jtj�nx8|D]0}|rftj	dkr�|jtj
j|dd��n�tjd	kr|j
tj
j|d
dtjdd�d�tj
j|d
d
�g�n%|j
|tj
j|d
d�g�tj	dkr�d|kr�tjjd�}|r�|jtj
j|ddtjdd�d��q�q�q�qfqfWtd�td�f}x*|D]"}||kr�|j|�q�q�Wtjr�|jtj�nttt|��}|S(NcSsg|]}|r|�qS(((u.0u_f((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>�s	u!get_site_dirs.<locals>.<listcomp>u
PYTHONPATHuuos2emxuriscosuLibu
site-packagesu/ulibupythoniusite-pythonudarwinuPython.frameworkuHOMEuLibraryuPythonupurelibuplatlib(uos2emxuriscos(uosuenvironugetusplitupathsepusysuprefixuexec_prefixuappenduplatformupathujoinusepuextenduversionuget_pathusiteuENABLE_USER_SITEu	USER_SITEulistumapunormalize_path(usitedirsuprefixesuprefixuhomeu	lib_pathsusite_lib((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
get_site_dirs�sF
"
	u
get_site_dirsccs^i}xQ|D]I}t|�}||kr1q
nd||<tjj|�sSq
ntj|�}||fVx�|D]�}|jd�s�qtn|dkr�qtnttjj||��}tt	|��}|j
�xw|D]o}|jd�s�t|j��}||krNd||<tjj|�s4q�n|tj|�fVqNq�q�WqtWq
WdS(uBYield sys.path directories that might contain "old-style" packagesiu.pthueasy-install.pthusetuptools.pthuimportN(ueasy-install.pthusetuptools.pth(
unormalize_pathuosupathuisdirulistdiruendswithuopenujoinulistuyield_linesucloseu
startswithurstrip(uinputsuseenudirnameufilesunameufulinesuline((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuexpand_pathss4





uexpand_pathscCs�t|d�}z�tj|�}|dkr1dS|d|d|d}|dkr[dS|j|d�ddlm}m}ddl}|j	d	|j
d��\}}}	|dkr�dS|j|d|�|jidd
6dd6�}
y~|j
|�}tj
dkr'tdg�}ntd�}|j|d�d}
|
jtj��}
|
j||
��Wn|jk
r�dSYnX|
jd�s�|
jd�r�dS|
SWd|j�XdS(unExtract configuration data from a bdist_wininst .exe

    Returns a ConfigParser.RawConfigParser, or None
    urbi	iiii(uStringIOuConfigParserNu<iiiizV4i{V4uuversionutarget_versioniiumetadatauSetup(izV4i{V4(ii(uopenuzipfileu_EndRecDatauNoneuseekusetuptools.compatuStringIOuConfigParserustructuunpackureaduRawConfigParserusysuversion_infoubytesuchrusplitudecodeugetfilesystemencodingureadfpuErroruhas_sectionuclose(u
dist_filenameufuendrecu	prependeduStringIOuConfigParserustructutagucfglenubmlenucfgupartu	null_byteuconfig((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuextract_wininst_cfg0s<$	 cCs�dddddg}tj|�}z}xv|j�D]h}|j}|jd�}t|�d	kr�|d
dkr�|djd
�r�|jddj|dd
��df�Pq�nt|�d
ks4|jd�r�q4n|jd�r�q4n|dj	�dkr4|j
|�}tjd kr7|j
�}nxbt|�D]Q}|j�jdd�}|jd�sD|jd|d|fdf�qDqDWq4q4WWd|j�Xdd�|D�}|j�|j�|S(!u4Get exe->egg path translations for a given .exe fileuPURELIB/uuPLATLIB/pywin32_system32uPLATLIB/uSCRIPTS/uEGG-INFO/scripts/uDATA/lib/site-packagesu/iiuPKG-INFOiu	.egg-infoiNu	EGG-INFO/u.pthu
-nspkg.pthuPURELIBuPLATLIBu\uimportu%s/%s/cSs(g|]\}}|j�|f�qS((ulower(u.0uxuy((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>s	u$get_exe_prefixes.<locals>.<listcomp>(uPURELIB/u(uPLATLIB/pywin32_system32u(uPLATLIB/u(uSCRIPTS/uEGG-INFO/scripts/(uDATA/lib/site-packagesu(uPURELIBuPLATLIB(i(uzipfileuZipFileuinfolistufilenameusplitulenuendswithuinsertujoinuupperureadusysuversion_infoudecodeuyield_linesustripureplaceu
startswithuappenducloseusortureverse(uexe_filenameuprefixesuzuinfounameupartsucontentsupth((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuget_exe_prefixes_s<		")"3

cCs=ytj|�SWn%tk
r8td|f��YnXdS(Nu1Not a URL, existing file, or requirement spec: %r(uRequirementuparseu
ValueErroruDistutilsError(uspec((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuparse_requirement_arg�s

uparse_requirement_argcBsk|EeZdZdZdZfdd�Zdd�Zdd�Zdd	�Z	d
d�Z
dd
�ZdS(uPthDistributionsu)A .pth file with Distribution paths in itcCs�||_ttt|��|_ttjj|j��|_|j	�t
j|gdd�x6t
|j�D]%}tt|jt|d���qoWdS(NT(ufilenameulistumapunormalize_pathusitedirsuosupathudirnameubasediru_loaduEnvironmentu__init__uNoneuyield_linesupathsuaddufind_distributionsuTrue(uselfufilenameusitedirsupath((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu__init__�s	
uPthDistributions.__init__cCs�g|_d}tj|j�}tjj|j�r3t	|jd�}x�|D]�}|j
d�rpd}qOn|j�}|jj
|�|j�sO|j�j
d�r�qOnttjj|j|��}|jd<tjj|�s�||kr|jj�d|_qOnd||<qOW|j�n|jrO|rOd|_nx.|jr|jdj�r|jj�qRWdS(	Nurtuimportu#iFTi����i����(upathsuFalseudictufromkeysusitedirsuosupathuisfileufilenameuopenu
startswithuTrueurstripuappendustripunormalize_pathujoinubasediruexistsupopudirtyuclose(uselfu
saw_importuseenufulineupath((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_load�s2	
"&
	
 uPthDistributions._loadcCs�|js
dSdjt|j|j��}|r�tjd|j�d|}tj	j
|j�rvtj|j�nt|jd�}|j
|�|j�n;tj	j|j�r�tjd|j�tj|j�nd|_dS(u$Write changed .pth file back to diskNu
u	Saving %su�import sys; sys.__plen = len(sys.path)
%s
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
uwtuDeleting empty %sF(udirtyujoinumapu
make_relativeupathsulogudebugufilenameuosupathuislinkuunlinkuopenuwriteucloseuexistsuFalse(uselfudatauf((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyusave�s 	

uPthDistributions.savecCsl|j|jkrX|j|jks9|jtj�krX|jj|j�d|_ntj	||�dS(u"Add `dist` to the distribution mapNT(
ulocationupathsusitedirsuosugetcwduappenduTrueudirtyuEnvironmentuadd(uselfudist((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuadd�suPthDistributions.addcCsIx2|j|jkr4|jj|j�d|_qWtj||�dS(u'Remove `dist` from the distribution mapNT(ulocationupathsuremoveuTrueudirtyuEnvironment(uselfudist((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuremove�s
uPthDistributions.removecCs�tjjt|��\}}t|j�}|g}tjdkrKdpQtj}xut|�|kr�||jkr�|jtj	�|j
�|j|�Stjj|�\}}|j|�qWW|SdS(Nu/(uosupathusplitunormalize_pathulenubasedirualtsepusepuappenducurdirureverseujoin(uselfupathunpathulastubaselenupartsusep((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
make_relative�s	

uPthDistributions.make_relativeNF(u__name__u
__module__u__qualname__u__doc__uFalseudirtyu__init__u_loadusaveuadduremoveu
make_relative(u
__locals__((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuPthDistributions�s	
cCs/ddlm}t|jt�s=tj|jj��}n|dj�d}|j	|�}d}|r�|j
d�p~d}|r�d|}q�n|r�d}nt|�}dt�}t
|�s|r|j�jd	�rd
|j�dd�}qqd
}nt||�}dt�}|S(u;Create a #! line, getting options (if any) from script_texti(u
first_line_reu
uiu u
python.exeu#!%(executable)s%(options)s
u-u -xN(udistutils.command.build_scriptsu
first_line_reu
isinstanceupatternustrureucompileudecodeu
splitlinesumatchugroupunt_quote_argulocalsuisasciiustripu
startswithufix_jython_executable(uscript_textu
executableuwininstu
first_line_reufirstumatchuoptionsuhdr((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuget_script_header�s,	
 	
uget_script_headercCsz|tjkr8tjdkr8t|tj�||�Stj�\}}}t||d|dd||ff�dS(Nuntiiu %s %s(	uosuremoveunameuchmodustatuS_IWRITEusysuexc_infoureraise(ufuncuarguexcuetuevu_((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
auto_chmods

u
auto_chmodcCs1ddlm}t||�t|tj�dS(u?Ensure that the importer caches dont have stale info for `path`i(u_zip_directory_cacheN(u	zipimportu_zip_directory_cacheu_uncacheusysupath_importer_cache(upathuzdc((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuuncache_zipdirs
uuncache_zipdircCsT||kr||=n:t|�}x+|D]#}t|�|kr)||=dSq)WdS(N(unormalize_path(upathucacheup((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_uncache#s

u_uncacheu<string>cCs;yt||d�Wnttfk
r2dSYnXdSdS(u%Is this string a valid Python script?uexecNFT(ucompileuSyntaxErroru	TypeErroruFalseuTrue(utextufilename((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	is_python-s
	u	is_pythoncCsRy)t|�}|jd�}|j�Wnttfk
rG|SYnX|dkS(uCDetermine if the specified executable is a .sh (contains a #! line)iu#!(uopenureaducloseuOSErroruIOError(u
executableufpumagic((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuis_sh6s	uis_shcCsg}d
}d}d|kp'd|k}|r@|jd�nx�|D]z}|dkrf|d7}qG|dkr�|jd|dd�d}qG|r�|jd|�d}n|j|�qGW|r�|jd|�n|r|jd|�|jd�nd	j|�S(u@Quote a command line argument according to Windows parsing rulesiu u	u"u\iiu\"uF(uFalseuappendujoin(uarguresultu	needquoteunbuc((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyunt_quote_arg?s,

		unt_quote_argcCsb|jd�s|jd�r"dSt||�r5dS|jd�r^d|j�dj�kSdS(uMIs this text, as a whole, a Python script? (as opposed to shell/bat/etc.
    u.pyu.pywu#!upythoniTF(uendswithuTrueu	is_pythonu
startswithu
splitlinesuloweruFalse(uscript_textufilename((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuis_python_script`suis_python_script(uchmodcGsdS(N((uargs((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_chmodqsu_chmodcCs`tjd||�yt||�Wn5tjk
r[tj�d}tjd|�YnXdS(Nuchanging mode of %s to %oiuchmod failed: %s(ulogudebugu_chmoduosuerrorusysuexc_info(upathumodeue((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuchmodssuchmodcCsntjjd�rjt|�rjddl}|jjjd�dkrI|S|r_tj	d�qjd|Sn|S(Nujavaiuos.nameuLinuxu�WARNING: Unable to adapt shebang line for Jython, the following script is NOT executable
         see http://bugs.jython.org/issue1112 for more information.u/usr/bin/env %s(
usysuplatformu
startswithuis_shujavaulanguSystemugetPropertyuloguwarn(u
executableuoptionsujava((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyufix_jython_executable{s
ufix_jython_executablecBsk|EeZdZdZejd�j�Zee	d
dd��Zedd��Zedd��Z
d	S(uScriptWriteru`
    Encapsulates behavior around writing entry point scripts for console and
    gui apps.
    u6
        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
        __requires__ = %(spec)r
        import sys
        from pkg_resources import load_entry_point

        if __name__ == '__main__':
            sys.exit(
                load_entry_point(%(spec)r, %(group)r, %(name)r)()
            )
    c
cs�|j|�}t|j��}td||�}xvdD]n}|d}x[|j|�j�D]D\}	}
|jt�}x%|j||	||�D]}|Vq�Wq`Wq:WdS(uW
        Yield write_script() argument tuples for a distribution's entrypoints
        uuconsoleuguiu_scriptsN(uconsoleugui(	u
get_writerustruas_requirementuget_script_headeru
get_entry_mapuitemsutemplateulocalsu_get_script_args(
uclsudistu
executableuwininstu	gen_classuspecuheaderutype_ugroupunameuepuscript_textures((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuget_script_args�s

"
uScriptWriter.get_script_argscCs#|stjdkrtj�S|S(Nuwin32(usysuplatformuWindowsScriptWriteru
get_writer(uclsu
force_windows((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
get_writer�s
uScriptWriter.get_writerccs|||fVdS(N((uclsutype_unameuheaderuscript_text((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_get_script_args�suScriptWriter._get_script_argsNF(u__name__u
__module__u__qualname__u__doc__utextwrapudedentulstriputemplateuclassmethodusys_executableuFalseuget_script_argsu
get_writeru_get_script_args(u
__locals__((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuScriptWriter�s
uScriptWritercBsJ|EeZdZedd��Zedd��Zedd��ZdS(uWindowsScriptWritercCs2tdtd|�}tjjdd�}||S(u:
        Get a script writer suitable for Windows
        u
executableunaturaluSETUPTOOLS_LAUNCHER(udictuWindowsExecutableLauncherWriteruosuenvironuget(uclsu
writer_lookupulauncher((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
get_writer�s
	uWindowsScriptWriter.get_writerc#s�tdddd�|}|tjdj�jd�krRtjd|t�nddd	d
dddg}|j|�|j	||�}�fd
d�|D�}�|||d|fVdS(u For Windows, add a .py extensionuconsoleu.pyauguiu.pywuPATHEXTu;uH%s not listed in PATHEXT; scripts will not be recognized as executables.u.pyu
-script.pyu.pycu.pyou.execsg|]}�|�qS(((u.0ux(uname(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>�s	u8WindowsScriptWriter._get_script_args.<locals>.<listcomp>utN(
udictuosuenvironulowerusplituwarningsuwarnuUserWarninguremoveu_adjust_header(uclsutype_unameuheaderuscript_textuextuoldublockers((unameu8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_get_script_args�s"	
u$WindowsScriptWriter._get_script_argscCs�d}d}|dkr(||}}ntjtj|�tj�}|jd|d|�}|dd
�jd�}tjd	kr�tj	j
|�r�|S|S(u�
        Make sure 'pythonw' is used for gui and and 'python' is used for
        console (regardless of what sys.executable is).
        upythonw.exeu
python.exeuguiustringurepliiu"uwin32i����(ureucompileuescapeu
IGNORECASEusubustripusysuplatformuosupathuexists(utype_uorig_headerupatternureplu
pattern_obu
new_headeruclean_header((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_adjust_header�s"u"WindowsScriptWriter._adjust_headerN(u__name__u
__module__u__qualname__uclassmethodu
get_writeru_get_script_argsustaticmethodu_adjust_header(u
__locals__((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuWindowsScriptWriter�s

uWindowsScriptWritercBs&|EeZdZedd��ZdS(uWindowsExecutableLauncherWriterc#s�|dkr$d}d}dg}nd}d}dddg}|j||�}�fd	d
�|D�}	�|||d|	fV�dt|�d
fVt�s��d}
|
t��dfVndS(uG
        For Windows, add a .py extension and an .exe launcher
        uguiu-script.pywu.pywucliu
-script.pyu.pyu.pycu.pyocsg|]}�|�qS(((u.0ux(uname(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
<listcomp>�s	uDWindowsExecutableLauncherWriter._get_script_args.<locals>.<listcomp>utu.exeubu
.exe.manifestN(u_adjust_headeruget_win_launcheruis_64bituload_launcher_manifest(uclsutype_unameuheaderuscript_textu
launcher_typeuextuolduhdrublockersum_name((unameu8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu_get_script_args�s	
u0WindowsExecutableLauncherWriter._get_script_argsN(u__name__u
__module__u__qualname__uclassmethodu_get_script_args(u
__locals__((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuWindowsExecutableLauncherWriter�suWindowsExecutableLauncherWritercCstd|}tj�j�dkr7|jdd�}nt�rU|jdd�}n|jdd�}td|�S(u�
    Load the Windows launcher (executable) suitable for launching a script.

    `type` should be either 'cli' or 'gui'

    Returns the executable as a byte string.
    u%s.exeuarmu.u-arm.u-64.u-32.u
setuptools(uplatformumachineulowerureplaceuis_64bituresource_string(utypeulauncher_fn((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuget_win_launcher
s
	uget_win_launchercCsHtjtd�}tjddkr0|t�S|jd�t�SdS(Nulauncher manifest.xmliiuutf-8(u
pkg_resourcesuresource_stringu__name__usysuversion_infouvarsudecode(unameumanifest((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuload_launcher_manifestsuload_launcher_manifestcCs~|rdd�}n|dkr0dd�}ng}ytj|�}Wn.tjk
ry|tj|tj��YnXx�|D]�}tjj||�}ytj|�j	}Wntjk
r�d}YnXt
j|�r�t|||�q�ytj
|�Wq�tjk
r3|tj
|tj��Yq�Xq�Wytj|�Wn.tjk
ry|tj|tj��YnXdS(u�Recursively delete a directory tree.

    This code is taken from the Python 2.4 version of 'shutil', because
    the 2.3 version doesn't really work right.
    cWsdS(N((uargs((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuonerror,surmtree.<locals>.onerrorcWs�dS(N((uargs((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuonerror/siN(uNoneuosulistdiruerrorusysuexc_infoupathujoinulstatust_modeustatuS_ISDIRurmtreeuremoveurmdir(upathu
ignore_errorsuonerrorunamesunameufullnameumode((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyurmtree%s2
"urmtreecCs tjd�}tj|�|S(Ni(uosuumask(utmp((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
current_umaskHs
u
current_umaskcCsMddl}tjj|jd�}|tjd<tjj|�t�dS(Ni(	u
setuptoolsuosupathudirnameu__path__usysuargvuappendumain(u
setuptoolsuargv0((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	bootstrapMs

u	bootstrapcs�ddlm�ddlm�ddl�d��fdd����fdd��G��fd	d
�d
����dkr�tjdd��n�����fdd
��dS(Ni(usetup(uDistributionuLusage: %(script)s [options] requirement_or_url ...
   or: %(script)s --help
cs�tdtjj|��S(Nuscript(udictuosupathubasename(uscript_name(uUSAGE(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	gen_usage_s	umain.<locals>.gen_usagecs7�jj}z��j_|�SWd|�j_XdS(N(ucoreu	gen_usage(ufu
old_gen_usage(u	distutilsu	gen_usage(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
with_ei_usageds
umain.<locals>.with_ei_usagecs/|EeZdZdZ��fdd�ZdS(u-main.<locals>.DistributionWithoutHelpCommandsucs#�����fdd��dS(Ncs�j����S(N(u
_show_help((uDistributionuargsukwuself(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu<lambda>psuJmain.<locals>.DistributionWithoutHelpCommands._show_help.<locals>.<lambda>((uselfuargsukw(uDistributionu
with_ei_usage(uargsukwuselfu8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
_show_helposu8main.<locals>.DistributionWithoutHelpCommands._show_helpN(u__name__u
__module__u__qualname__ucommon_usageu
_show_help(u
__locals__(uDistributionu
with_ei_usage(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyuDistributionWithoutHelpCommandslsuDistributionWithoutHelpCommandsic	s6�ddddg�dtjdp)dd���S(Nuscript_argsu-queasy_installu-vuscript_nameiu	distclass(usysuargv((uDistributionWithoutHelpCommandsuargvukwusetup(u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu<lambda>usumain.<locals>.<lambda>(u
setuptoolsusetupusetuptools.distuDistributionudistutils.coreuNoneusysuargv(uargvukw((	uDistributionuDistributionWithoutHelpCommandsuUSAGEuargvu	distutilsu	gen_usageukwusetupu
with_ei_usageu8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyumainUs(ru__doc__usysuosu	zipimportushutilutempfileuzipfileureustaturandomuplatformutextwrapuwarningsusiteustructuglobu	distutilsulogudir_utilu
pkg_resourcesu
setuptoolsuCommandu_dont_write_bytecodeusetuptools.sandboxu	run_setupusetuptools.py31compatuget_pathuget_config_varsudistutils.utiluget_platformuconvert_pathu
subst_varsudistutils.errorsuDistutilsArgErroruDistutilsOptionErroruDistutilsErroruDistutilsPlatformErrorudistutils.command.installuINSTALL_SCHEMESuSCHEME_KEYSusetuptools.commandusetoptusetuptools.archive_utiluunpack_archiveusetuptools.package_indexuPackageIndexu
URL_SCHEMEu	bdist_egguegg_infousetuptools.compatu	iteritemsumaxsizeu
basestringuunicodeureraiseuyield_linesunormalize_pathuresource_stringuensure_directoryuget_distributionufind_distributionsuEnvironmentuRequirementuDistributionuPathMetadatauEggMetadatau
WorkingSetuDistributionNotFounduVersionConflictuDEVELOP_DISTuenvironugetupathunormpathu
executableusys_executableu__all__uis_64bitusamefileuversion_infou	_to_asciiuisasciiueasy_installu
get_site_dirsuexpand_pathsuextract_wininst_cfguget_exe_prefixesuparse_requirement_arguPthDistributionsuFalseuget_script_headeru
auto_chmoduuncache_zipdiru_uncacheu	is_pythonuis_shunt_quote_arguis_python_scriptuchmodu_chmoduImportErrorufix_jython_executableuobjectuScriptWriteruWindowsScriptWriteruWindowsExecutableLauncherWriteruget_script_argsuget_win_launcheruload_launcher_manifesturmtreeu
current_umasku	bootstrapuNoneumain(((u8/tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu<module>
s�"(d	����~.)/&j
		!

..	#python3.3/site-packages/setuptools/command/__pycache__/install_lib.cpython-33.pyc000064400000007534151733566760024053 0ustar00�
�Re�	c@s6ddlmZddlZGdd�de�ZdS(i(uinstall_libNcBsb|EeZdZdZdd�Zdd�Zdd�Zddd	dd
d�Zdd
�ZdS(uinstall_libu9Don't add compiled flags to filenames of non-Python filescCspg}xc|D][}|jd�s(q
n|jrE|j|d�n|jdkr
|j|d�q
q
W|S(Nu.pyuciuo(uendswithucompileuappenduoptimize(uselfupy_filenamesubytecode_filesupy_file((u7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyu_bytecode_filenamess
	uinstall_lib._bytecode_filenamescCs6|j�|j�}|dk	r2|j|�ndS(N(ubuilduinstalluNoneubyte_compile(uselfuoutfiles((u7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyuruns
uinstall_lib.runcCs�i}|jj}|r�|jd�jr�xy|D]n}|jd�}xV|r�tjj|j|�}x'dD]}d|tjj||�<qnW|j	�qIWq1Wn|S(Nuinstallu.u__init__.pyu__init__.pycu__init__.pyoi(u__init__.pyu__init__.pycu__init__.pyo(
udistributionunamespace_packagesuget_finalized_commandu!single_version_externally_managedusplituosupathujoinuinstall_dirupop(uselfuexcludeunspupkgupartsupkgdiruf((u7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyuget_exclusionss
	
uinstall_lib.get_exclusionsiic	s�|r|r|st�|j���s>tj|||�Sddlm}ddlm�g����fdd�}||||��S(Ni(uunpack_directory(ulogcsP|�kr �jd|�dS�jd|tjj|���j|�|S(Nu/Skipping installation of %s (namespace package)ucopying %s -> %sF(uwarnuFalseuinfouosupathudirnameuappend(usrcudst(uexcludeuloguoutfiles(u7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyupf;s
u!install_lib.copy_tree.<locals>.pf(uAssertionErroruget_exclusionsu_install_libu	copy_treeusetuptools.archive_utiluunpack_directoryu	distutilsulog(	uselfuinfileuoutfileu
preserve_modeupreserve_timesupreserve_symlinksuleveluunpack_directoryupf((uexcludeuloguoutfilesu7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyu	copy_tree*s	uinstall_lib.copy_treecs<tj|�}|j���r8�fdd�|D�S|S(Ncs"g|]}|�kr|�qS(((u.0uf(uexclude(u7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyu
<listcomp>Ks	u+install_lib.get_outputs.<locals>.<listcomp>(u_install_libuget_outputsuget_exclusions(uselfuoutputs((uexcludeu7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyuget_outputsGs
uinstall_lib.get_outputsN(	u__name__u
__module__u__qualname__u__doc__u_bytecode_filenamesurunuget_exclusionsu	copy_treeuget_outputs(u
__locals__((u7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyuinstall_libsuinstall_lib(udistutils.command.install_libuinstall_libu_install_libuos(((u7/tmp/pip-k8wh6o-build/setuptools/command/install_lib.pyu<module>spython3.3/site-packages/setuptools/command/__pycache__/alias.cpython-33.pyc000064400000007154151733566760022646 0ustar00�
�Re�	c@s�ddlZddlZddlmZddlmZddlmZddlTddlm	Z	m
Z
mZdd�ZGd	d
�d
e
�Z
dd�ZdS(
iN(uCommand(uconvert_path(ulog(u*(uedit_configuoption_baseuconfig_filecCsJx$dD]}||krt|�SqW|j�|gkrFt|�S|S(u4Quote an argument for later parsing by shlex.split()u"u'u\u#(u"u'u\u#(ureprusplit(uarguc((u1/tmp/pip-k8wh6o-build/setuptools/command/alias.pyushquotes

ushquotecBsj|EeZdZdZdZd
ZdgejZej	dgZ	dd�Z
dd	�Zd
d�ZdS(ualiasu3Define a shortcut that invokes one or more commandsu0define a shortcut to invoke one or more commandsuremoveururemove (unset) the aliascCs#tj|�d|_d|_dS(N(uoption_baseuinitialize_optionsuNoneuargsuremove(uself((u1/tmp/pip-k8wh6o-build/setuptools/command/alias.pyuinitialize_optionss
	ualias.initialize_optionscCs>tj|�|jr:t|j�dkr:td��ndS(NiuFMust specify exactly one argument (the alias name) when using --remove(uoption_baseufinalize_optionsuremoveulenuargsuDistutilsOptionError(uself((u1/tmp/pip-k8wh6o-build/setuptools/command/alias.pyufinalize_options"s
ualias.finalize_optionscCs"|jjd�}|jsZtd�td�x$|D]}tdt||��q6WdSt|j�dkr�|j\}|jr�d}q�||kr�tdt||��dStd|�dSn2|jd}djt	t
|jdd���}t|jii||6d6|j
�dS(	NualiasesuCommand Aliasesu---------------usetup.py aliasiu No alias definition found for %riu (udistributionuget_option_dictuargsuprintuformat_aliasulenuremoveuNoneujoinumapushquoteuedit_configufilenameudry_run(uselfualiasesualiasucommand((u1/tmp/pip-k8wh6o-build/setuptools/command/alias.pyurun*s&	


		
%u	alias.runNT(uremoveururemove (unset) the alias(
u__name__u
__module__u__qualname__u__doc__udescriptionuTrueucommand_consumes_argumentsuoption_baseuuser_optionsuboolean_optionsuinitialize_optionsufinalize_optionsurun(u
__locals__((u1/tmp/pip-k8wh6o-build/setuptools/command/alias.pyualiass
ualiascCs{||\}}|td�kr+d}n@|td�krFd}n%|td�krad}n
d|}||d|S(	Nuglobalu--global-config uuseru--user-config ulocaluu
--filename=%ru (uconfig_file(unameualiasesusourceucommand((u1/tmp/pip-k8wh6o-build/setuptools/command/alias.pyuformat_aliasEs			
uformat_alias(u	distutilsuosu
setuptoolsuCommandudistutils.utiluconvert_pathulogudistutils.errorsusetuptools.command.setoptuedit_configuoption_baseuconfig_fileushquoteualiasuformat_alias(((u1/tmp/pip-k8wh6o-build/setuptools/command/alias.pyu<module>s
	4python3.3/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-33.pyc000064400000052465151733566760023511 0ustar00�
�ReIc@sdZddlZddlZddlZddlmZddlmZmZy&ddl	m
Z
mZdd�ZWn4e
k
r�ddlmZmZd	d�ZYnXdd
lmZddlmZddlmZmZmZdd
lmZddlmZddlmZmZddlmZdd�Z dd�Z!dZ"Gdd�de�Z#e$j%dj&��Z'dd�Z(dd�Z)dd�Z*ide+6d e,6Z-d!d"�Z.d#d$�Z/d%d&�Z0d'd(d)d*gZ1dde2d+d,d-�Z3dS(.u6setuptools.command.bdist_egg

Build .egg distributionsiN(uCommand(uremove_treeumkpath(uget_pathuget_python_versioncCs
td�S(Nupurelib(uget_path(((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyu_get_purelibsu_get_purelib(uget_python_libuget_python_versioncCs
td�S(NF(uget_python_libuFalse(((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyu_get_purelibs(ulog(uDistutilsSetupError(uget_build_platformuDistributionuensure_directory(u
EntryPoint(uCodeType(u
basestringunext(uLibrarycCsKd|kr%tjj|�d}n|jd�rG|dd�}n|S(Nu.iumoduleii����(uosupathusplitextuendswith(ufilename((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyustrip_modules
ustrip_modulec
CsOt|d�}|jdjdddd|ddd	d
g��|j�dS(Nuwu
udef __bootstrap__():u-   global __bootstrap__, __loader__, __file__u!   import sys, pkg_resources, impu:   __file__ = pkg_resources.resource_filename(__name__,%r)u3   __loader__ = None; del __bootstrap__, __loader__u&   imp.load_dynamic(__name__,__file__)u__bootstrap__()u(uopenuwriteujoinuclose(uresourceupyfileuf((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyu
write_stub"s
u
write_stubu7__import__("pkg_resources").declare_namespace(__name__)cBs�|EeZdZdZd,ddde�fd-d
ddd
fd.d/gZd
ddgZdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+S(0u	bdist_eggucreate an "egg" distributionu
bdist-dir=ubu1temporary directory for creating the distributionu
plat-name=upu;platform name to embed in generated filenames (default: %s)uexclude-source-filesu+remove all .py files from the generated eggu	keep-tempuku/keep the pseudo-installation tree around after u!creating the distribution archiveu	dist-dir=udu-directory to put final built distributions inu
skip-buildu2skip rebuilding everything (for testing/debugging)cCsCd|_d|_d|_d|_d|_d|_d|_dS(Ni(uNoneu	bdist_diru	plat_nameu	keep_tempudist_diru
skip_buildu
egg_outputuexclude_source_files(uself((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuinitialize_options]s						ubdist_egg.initialize_optionscCs�|jd�}|_|j|_|jdkr^|jd�j}tjj|d�|_n|j	dkr|t
�|_	n|jdd�|jdkr�t
dd|j|jt�|jj�o�|j	�j�}tjj|j|d�|_ndS(Nuegg_infoubdistueggudist_diru.egg(udist_dirudist_dir(uget_finalized_commanduei_cmduegg_infou	bdist_diruNoneu
bdist_baseuosupathujoinu	plat_nameuget_build_platformuset_undefined_optionsu
egg_outputuDistributionuegg_nameuegg_versionuget_python_versionudistributionuhas_ext_modulesudist_dir(uselfuei_cmdu
bdist_baseubasename((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyufinalize_optionsgs!ubdist_egg.finalize_optionscCsf|j|jd�_tjjtjjt���}|jj	g}|j_	x�|D]�}t
|t�r
t|�dkr
tjj
|d�r
tjj|d�}tjj|�}||ks�|j|tj�r|t|�dd�|df}qq
n|jj	j|�qVWz1tjd|j�|jddddd�Wd||j_	XdS(	Nuinstalliiiuinstalling package data to %suinstall_datauforceuroot(u	bdist_diruget_finalized_commanduinstall_libuosupathunormcaseurealpathu_get_purelibudistributionu
data_filesu
isinstanceutupleulenuisabsu
startswithusepuappenduloguinfoucall_commanduNone(uselfu
site_packagesuolduitemurealpathu
normalized((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyudo_install_data�s !
!-ubdist_egg.do_install_datacCs
|jgS(N(u
egg_output(uself((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuget_outputs�subdist_egg.get_outputscKsmx!tD]}|j||j�qW|jd|j�|jd|j�|j||�}|j|�|S(u8Invoke reinitialized command `cmdname` with keyword argsu
skip_buildudry_run(uINSTALL_DIRECTORY_ATTRSu
setdefaultu	bdist_diru
skip_buildudry_runureinitialize_commandurun_command(uselfucmdnameukwudirnameucmd((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyucall_command�s

ubdist_egg.call_commandc
Cs�|jd�tjd|j�|jd�}|j}d|_|jj�rk|j	rk|jd�n|j
ddd�}||_|j�\}}g|_g}x�t
|�D]�\}}tjj|�\}	}
tjj|jt|	�d�}|jj|�tjd	|�|jsCttjj|�|�n|j|�|jtjd
�||<q�W|j|j��|r�|j|�n|jjr�|j�n|j}tjj|d�}
|j|
�|jjr(tjj|
d�}tjd
|�|j
dd|dd�n|j |
�tjj|
d�}|r�tjd|�|js�t!|�t"|d�}|j#dj|��|j#d�|j$�q�n?tjj%|�r�tjd|�|js�tj&|�q�nt'tjj|d�|j(��tjj)tjj|j*d��rKtj+d�n|j,ra|j-�nt.|j/|d|j0d|jd|j1��|j2s�t3|jd|j�nt4|jdg�jdt5�|j/f�dS(Nuegg_infouinstalling library code to %suinstallu
build_clibuinstall_libuwarn_diriu.pyucreating stub loader for %su/uEGG-INFOuscriptsuinstalling scripts to %suinstall_scriptsuinstall_diruno_epiunative_libs.txtu
writing %suwtu
uremoving %sudepends.txtuxWARNING: 'depends.txt' will not be used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.uverboseudry_runumodeu
dist_filesu	bdist_egg(6urun_commanduloguinfou	bdist_diruget_finalized_commandurootuNoneudistributionuhas_c_librariesu
skip_builducall_commanduget_ext_outputsustubsu	enumerateuosupathusplitextujoinustrip_moduleuappendudry_runu
write_stububasenameureplaceusepuextendumake_init_filesubyte_compileu
data_filesudo_install_dataumkpathuscriptsucopy_metadata_touensure_directoryuopenuwriteucloseuisfileuunlinkuwrite_safety_flaguzip_safeuexistsuegg_infouwarnuexclude_source_filesuzap_pyfilesumake_zipfileu
egg_outputuverboseu
gen_headeru	keep_tempuremove_treeugetattruget_python_version(uselfuinstcmduold_rootucmduall_outputsuext_outputsu
to_compileupuext_nameufilenameuextupyfileuarchive_rootuegg_infou
script_dirunative_libsu	libs_file((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyurun�sx
				"	

	

	

	$
	
	u
bdist_egg.runcCs�tjd�xut|j�D]d\}}}xR|D]J}|jd�r3tjj||�}tjd|�tj	|�q3q3WqWdS(Nu+Removing .py files from temporary directoryu.pyuDeleting %s(
uloguinfouwalk_eggu	bdist_diruendswithuosupathujoinudebuguunlink(uselfubaseudirsufilesunameupath((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuzap_pyfiless

ubdist_egg.zap_pyfilescCsEt|jdd�}|dk	r%|Stjd�t|j|j�S(Nuzip_safeu4zip_safe flag not set; analyzing archive contents...(ugetattrudistributionuNoneuloguwarnuanalyze_eggu	bdist_dirustubs(uselfusafe((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuzip_safe
s

ubdist_egg.zip_safec	Cs*g}xt|j�D]\}}}||jkr:qnx�|D]�}|jd�rAd|kr
|t|j�dd�jtjd�}|jj|�r
t	j
d|�tjj|d�}|j
s�t|d�}|jt�|j�n|j|�q
nPqAqAWg|dd�<qW|S(u%Create missing package __init__ filesu.pyu__init__.pyiNu.u#Creating missing __init__.py for %suw(uwalk_eggu	bdist_diruendswithulenureplaceuosusepudistributionuhas_contents_foruloguwarnupathujoinudry_runuopenuwriteuNS_PKG_STUBucloseuappend(	uselfu
init_filesubaseudirsufilesunameupkgufilenameuf((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyumake_init_filess&
,	

ubdist_egg.make_init_filesc
Cs'tj|jjpd�}|jdi�jd�}|dkrFdS|jsY|jrotd|f��nt	j
dd�}|j}dj|j�}|jd}t
jj|j�}d	t�}|js#tt
jj|j�d
|j�t|jd�}	|	j|�|	j�ndS(Nuusetuptools.installationueggsecutableuwuGeggsecutable entry point (%r) cannot have 'extras' or refer to a moduleiu.iuH#!/bin/sh
if [ `basename $0` = "%(basename)s" ]
then exec python%(pyver)s -c "import sys, os; sys.path.insert(0, os.path.abspath('$0')); from %(pkg)s import %(base)s; sys.exit(%(full)s())" "$@"
else
  echo $0 is not the correct name for this egg file.
  echo Please rename it back to %(basename)s and try again.
  exec false
fi
udry_runua(u
EntryPointu	parse_mapudistributionuentry_pointsugetuNoneuattrsuextrasuDistutilsSetupErrorusysuversionumodule_nameujoinuosupathubasenameu
egg_outputulocalsudry_runumkpathudirnameuopenuwriteuclose(
uselfuepmuepupyverupkgufullubaseubasenameuheaderuf((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyu
gen_header*s*	

	"

ubdist_egg.gen_headercCs�tjj|j�}tjj|d�}xh|jjjD]W}|j|�r:tjj||t	|�d��}t
|�|j||�q:q:WdS(u*Copy metadata (egg info) to the target_diruN(uosupathunormpathuegg_infoujoinuei_cmdufilelistufilesu
startswithulenuensure_directoryu	copy_file(uselfu
target_diru
norm_egg_infouprefixupathutarget((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyucopy_metadata_toSs%
ubdist_egg.copy_metadata_tocCs�g}g}id|j6}x�tj|j�D]�\}}}xH|D]@}tjj|�dj�tkrE|j|||�qEqEWx3|D]+}|||d|tjj||�<q�Wq/W|j	j
�r�|jd�}x�|jD]�}	t
|	t�rq�n|j|	j�}
|j|
�}tjj|�jd�s�tjjtjj|j|��ry|j|�qyq�q�Wn||fS(uAGet a list of relative paths to C extensions in the output distrouiu/u	build_extudl-(u	bdist_diruosuwalkupathusplitextuloweruNATIVE_EXTENSIONSuappendujoinudistributionuhas_ext_modulesuget_finalized_commandu
extensionsu
isinstanceuLibraryuget_ext_fullnameunameuget_ext_filenameubasenameu
startswithuexists(uselfuall_outputsuext_outputsupathsubaseudirsufilesufilenameu	build_cmduextufullname((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuget_ext_outputs_s("
"
-$ubdist_egg.get_ext_outputsN(u
bdist-dir=ubu1temporary directory for creating the distribution(uexclude-source-filesNu+remove all .py files from the generated egg(u	dist-dir=udu-directory to put final built distributions in(u
skip-buildNu2skip rebuilding everything (for testing/debugging)(u__name__u
__module__u__qualname__udescriptionuget_build_platformuNoneuuser_optionsuboolean_optionsuinitialize_optionsufinalize_optionsudo_install_datauget_outputsucall_commandurunuzap_pyfilesuzip_safeumake_init_filesu
gen_headerucopy_metadata_touget_ext_outputs(u
__locals__((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyu	bdist_egg4s8
	
R	)u	bdist_eggu.dll .so .dylib .pydccshtj|�}t|�\}}}d|kr@|jd�n|||fVx|D]}|VqUWdS(u@Walk an unpacked egg's contents, skipping the metadata directoryuEGG-INFON(uosuwalkunexturemove(uegg_diruwalkerubaseudirsufilesubdf((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuwalk_egg�s
uwalk_eggc		Cs�xBtj�D]4\}}tjjtjj|d|��r
|Sq
Wt�sRdSd}x�t	|�D]�\}}}xn|D]f}|j
d�s{|j
d�r�q{q{|j
d�s�|j
d�r{t||||�o�|}q{q{WqeW|S(NuEGG-INFOu.pyu.pywu.pycu.pyoFT(usafety_flagsuitemsuosupathuexistsujoinucan_scanuFalseuTrueuwalk_egguendswithuscan_module(	uegg_dirustubsuflagufnusafeubaseudirsufilesuname((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuanalyze_egg�s$	
&uanalyze_eggcCs�x�tj�D]�\}}tjj||�}tjj|�rq|dks^t|�|kr�tj|�q�q
|dk	r
t|�|kr
t	|d�}|j
d�|j�q
q
WdS(Nuwtu
(usafety_flagsuitemsuosupathujoinuexistsuNoneubooluunlinkuopenuwriteuclose(uegg_dirusafeuflagufnuf((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuwrite_safety_flag�s
uwrite_safety_flaguzip-safeunot-zip-safec

Cs�tjj||�}|dd�|kr/dS|t|�dd�jtjd�}||rgdpjdtjj|�d}tj	d kr�d}nd}t
|d	�}|j|�tj
|�}	|j�d}
tjt|	��}x<d
dgD].}||kr�tjd||�d!}
q�q�Wd
|kr�xZdddddddddddgD].}||krctjd||�d!}
qcqcWnd|kr�d|kr�d|kr�tjdd�dkr�tjd|�d!}
q�n|
S("u;Check whether module possibly uses unsafe-for-zipfile stuffNiu.uiiiiurbu__file__u__path__u%s: module references %suinspectu	getsourceu
getabsfileu
getsourcefileugetfilegetsourcelinesu
findsourceugetcommentsugetframeinfougetinnerframesugetouterframesustackutraceu"%s: module MAY be using inspect.%su__name__u__main__u2.4u.%s: top-level module may be 'python -m' scripti����T(iiF(uosupathujoinuTrueulenureplaceusepusplitextusysuversion_infouopenureadumarshaluloaducloseudictufromkeysuiter_symbolsuloguwarnuFalseuversion(
uegg_dirubaseunameustubsufilenameupkgumoduleuskipufucodeusafeusymbolsubad((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuscan_module�s>)*	


	$uscan_moduleccsvx|jD]}|Vq
WxV|jD]K}t|t�r@|Vq#t|t�r#xt|�D]}|Vq\Wq#q#WdS(uBYield names and strings used by `code` and its nested code objectsN(uco_namesu	co_constsu
isinstanceu
basestringuCodeTypeuiter_symbols(ucodeunameuconst((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuiter_symbols�s	uiter_symbolscCsDtjjd�r&tjdkr&dStjd�tjd�dS(Nujavaucliu1Unable to analyze compiled code on this platform.ufPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.pyT(usysuplatformu
startswithuTrueuloguwarn(((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyucan_scan�s"
ucan_scanuinstall_libuinstall_diruinstall_datauinstall_baseuwc
sddl}ttjj|�d��tjd|����fdd�}|dkrntj	dk}n|j
|jgt|�}�s�|j
||d|�}	x0tj��D]\}
}}||	|
|�q�W|	j�n3x0tj��D]\}
}}|d|
|�q�W|S(	uqCreate a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    iNudry_runu#creating '%s' and adding '%s' to itcs�x�|D]�}tjjtjj||��}tjj|�r|t��dd�}�ss|j||�ntjd|�qqWdS(Niuadding '%s'(	uosupathunormpathujoinuisfileulenuwriteulogudebug(uzudirnameunamesunameupathup(ubase_dirudry_run(u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyuvisits
!umake_zipfile.<locals>.visitu2.4ucompression(uzipfileumkpathuosupathudirnameuloguinfouNoneusysuversionu
ZIP_STOREDuZIP_DEFLATEDubooluZipFileuwalkuclose(
uzip_filenameubase_diruverboseudry_runucompressumodeuzipfileuvisitucompressionuzudirnameudirsufiles((ubase_dirudry_runu5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyumake_zipfiles		
umake_zipfile(4u__doc__usysuosumarshalu
setuptoolsuCommandudistutils.dir_utiluremove_treeumkpathu	sysconfiguget_pathuget_python_versionu_get_purelibuImportErrorudistutils.sysconfiguget_python_libu	distutilsulogudistutils.errorsuDistutilsSetupErroru
pkg_resourcesuget_build_platformuDistributionuensure_directoryu
EntryPointutypesuCodeTypeusetuptools.compatu
basestringunextusetuptools.extensionuLibraryustrip_moduleu
write_stubuNS_PKG_STUBu	bdist_eggudictufromkeysusplituNATIVE_EXTENSIONSuwalk_egguanalyze_egguwrite_safety_flaguTrueuFalseusafety_flagsuscan_moduleuiter_symbolsucan_scanuINSTALL_DIRECTORY_ATTRSuNoneumake_zipfile(((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_egg.pyu<module>sD$
�H


#
-	python3.3/site-packages/setuptools/command/__pycache__/egg_info.cpython-33.pyc000064400000047706151733566760023341 0ustar00�
�Re�7c@s�dZddlZddlZddlZddlmZddlZddlmZddl	m
Z
ddlmZddlm
Z
ddlmZdd	lmZdd
lmZmZmZmZmZmZmZmZddl	mZGdd
�d
e�ZGdd�de�ZGdd�de
�Zdd�Zdd�Z dd�Z!dd�Z"dd�Z#dd�Z$d$dd�Z&d d!�Z'd"d#�Z(dS(%uUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contentsiN(uCommand(ulog(usdist(u
basestring(u	svn_utils(uconvert_path(uFileList(uparse_requirementsu	safe_nameu
parse_versionusafe_versionuyield_linesu
EntryPointuiter_entry_pointsuto_filename(uwalk_revctrlcBs�|EeZdZdZd-d.d/d0d1d2gZddgZidd6dd6Zdd�Zdd�Zdd�Z	d3dd�Zdd�Zdd�Z
d d!�Zd"d#�Zd$d%�Zed&d'��Zd(d)�Zd*d+�Zd,S(4uegg_infou+create a distribution's .egg-info directoryu	egg-base=ueuLdirectory containing .egg-info directories (default: top of the source tree)utag-svn-revisionuru,Add subversion revision ID to version numberutag-dateudu0Add date stamp (e.g. 20050528) to version numberu
tag-build=ubu-Specify explicit tag to add to version numberuno-svn-revisionuRu*Don't add subversion revision ID [default]uno-dateuDu"Don't include date stamp [default]cCsUd|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS(NiF(uNoneuegg_nameuegg_versionuegg_baseuegg_infou	tag_buildutag_svn_revisionutag_dateuFalseubroken_egg_infouvtags(uself((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuinitialize_options)s								uegg_info.initialize_optionsc	CsKddlm}tdtddddd|j���}|||�dS(Ni(uedit_configuegg_infoutag_svn_revisionutag_dateu	tag_build(usetuptools.command.setoptuedit_configudictutags(uselfufilenameuedit_configuvalues((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyusave_version_info4suegg_info.save_version_infocCs�t|jj��|_|j�|_|j�|_y$tt	d|j|jf��Wn4t
k
r�tjj
d|j|jf��YnX|jdkr�|jj}|p�ijdtj�|_n|jd�t|j�d|_|jtjkr#tjj|j|j�|_nd|jkr?|j�n|j|jj_|jj}|dk	r�|j|jj�kr�|j|_t |j�|_!d|j_ndS(Nu%s==%su2Invalid distribution name or version syntax: %s-%suuegg_baseu	.egg-infou-("u	safe_nameudistributionuget_nameuegg_nameutagsuvtagsutagged_versionuegg_versionulistuparse_requirementsu
ValueErroru	distutilsuerrorsuDistutilsOptionErroruegg_baseuNoneupackage_dirugetuosucurdiruensure_dirnameuto_filenameuegg_infoupathujoinucheck_broken_egg_infoumetadatauversionu
_patched_distukeyuloweru_versionu
parse_versionu_parsed_version(uselfudirsupd((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyufinalize_options?s2!
	!
!
$uegg_info.finalize_optionscCsl|r|j|||�nLtjj|�rh|dkrX|rXtjd||�dS|j|�ndS(u�Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        u$%s not set in setup(), but %s existsN(u
write_fileuosupathuexistsuNoneuloguwarnudelete_file(uselfuwhatufilenameudatauforce((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuwrite_or_delete_filegs	
uegg_info.write_or_delete_filecCsjtjd||�tjdkr4|jd�}n|jsft|d�}|j|�|j�ndS(u�Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        uwriting %s to %siuutf-8uwbN(i(	uloguinfousysuversion_infouencodeudry_runuopenuwriteuclose(uselfuwhatufilenameudatauf((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyu
write_file{s	
uegg_info.write_filecCs-tjd|�|js)tj|�ndS(u8Delete `filename` (if not a dry run) after announcing itudeleting %sN(uloguinfoudry_runuosuunlink(uselfufilename((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyudelete_file�s	uegg_info.delete_filecCsE|jj�}|jr4|j|j�r4t|�St||j�S(N(udistributionuget_versionuvtagsuendswithusafe_version(uselfuversion((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyutagged_version�s
uegg_info.tagged_versioncCs�|j|j�|jj}xNtd�D]@}|jd|�}|||jtjj	|j|j��q)Wtjj	|jd�}tjj
|�r�|j|�n|j�dS(Nuegg_info.writersu	installerunative_libs.txt(
umkpathuegg_infoudistributionufetch_build_egguiter_entry_pointsuloadunameuosupathujoinuexistsudelete_fileufind_sources(uselfu	installeruepuwriterunl((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyurun�s,uegg_info.runcCs�d}|jr||j7}n|jrctjjd�sLtjjd�rc|d|j�7}n|jr�ddl}||jd�7}n|S(Nuu.svnuPKG-INFOu-r%siu-%Y%m%d(	u	tag_buildutag_svn_revisionuosupathuexistsuget_svn_revisionutag_dateutimeustrftime(uselfuversionutime((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyutags�s		$	u
egg_info.tagscCsttjjtj�j��S(N(ustru	svn_utilsuSvnInfouloaduosucurdiruget_revision(((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuget_svn_revision�suegg_info.get_svn_revisioncCsJtjj|jd�}t|j�}||_|j�|j|_dS(u"Generate SOURCES.txt manifest fileuSOURCES.txtN(	uosupathujoinuegg_infoumanifest_makerudistributionumanifesturunufilelist(uselfumanifest_filenameumm((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyufind_sources�s
	
uegg_info.find_sourcescCs�|jd}|jtjkr:tjj|j|�}ntjj|�r�tjddddd||j	�|j	|_
||_	ndS(Nu	.egg-infou-iNu�
Note: Your current .egg-info directory has a '-' in its name;
this will not work correctly with "setup.py develop".

Please rename %s to %s to correct this problem.
(uegg_nameuegg_baseuosucurdirupathujoinuexistsuloguwarnuegg_infoubroken_egg_info(uselfubei((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyucheck_broken_egg_info�s

uegg_info.check_broken_egg_infoN(u	egg-base=ueuLdirectory containing .egg-info directories (default: top of the source tree)(utag-svn-revisionuru,Add subversion revision ID to version number(utag-dateudu0Add date stamp (e.g. 20050528) to version number(u
tag-build=ubu-Specify explicit tag to add to version number(uno-svn-revisionuRu*Don't add subversion revision ID [default](uno-dateuDu"Don't include date stamp [default]F(u__name__u
__module__u__qualname__udescriptionuuser_optionsuboolean_optionsunegative_optuinitialize_optionsusave_version_infoufinalize_optionsuFalseuwrite_or_delete_fileu
write_fileudelete_fileutagged_versionurunutagsustaticmethoduget_svn_revisionufind_sourcesucheck_broken_egg_info(u
__locals__((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuegg_infos0	

(uegg_infocBs&|EeZdZdZdd�ZdS(uFileListu@File list that accepts only existing, platform-independent pathscCs	|jd�r"|dd�}nt|�}tjdkr�yDtjj|�smtjj|jd��r�|jj	|�nWqt
k
r�tjj|jd��r�|jj	|�ntjd|tj
��YqXn%tjj|�r|jj	|�ndS(Nu
iiuutf-8u!'%s' not %s encodable -- skippingi����(i(uendswithuconvert_pathusysuversion_infouosupathuexistsuencodeufilesuappenduUnicodeEncodeErroruloguwarnugetfilesystemencoding(uselfuitemupath((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuappend�s-
uFileList.appendN(u__name__u
__module__u__qualname__u__doc__uappend(u
__locals__((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuFileList�suFileListcBsn|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS(umanifest_makeruMANIFEST.incCs(d|_d|_d|_d|_dS(Ni(uuse_defaultsupruneu
manifest_onlyuforce_manifest(uself((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuinitialize_options�s			u!manifest_maker.initialize_optionscCsdS(N((uself((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyufinalize_options�sumanifest_maker.finalize_optionscCs�t�|_tjj|j�s.|j�n|jj�|j�tjj|j	�rg|j
�n|j�|jj�|jj
�|j�dS(N(uFileListufilelistuosupathuexistsumanifestuwrite_manifestufindalluadd_defaultsutemplateu
read_templateuprune_file_listusorturemove_duplicates(uself((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyurun�s






umanifest_maker.runcCs�tjd	krg}xX|jjD]J}y|jd�Wn#tk
r^tjd|�Yq"X|j|�q"W||j_n|jj}t	j
dkr�dd�|D�}n|jt|j
|fd|j
�dS(
u�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        iuutf-8u$'%s' not UTF-8 encodable -- skippingu/cSs%g|]}|jtjd��qS(u/(ureplaceuosusep(u.0uf((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyu
<listcomp>s	u1manifest_maker.write_manifest.<locals>.<listcomp>uwriting manifest file '%s'N(i(usysuversion_infoufilelistufilesuencodeuUnicodeEncodeErroruloguwarnuappenduosusepuexecuteu
write_fileumanifest(uselfufilesufile((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuwrite_manifest�s
umanifest_maker.write_manifestcCs&|jd�s"tj||�ndS(Nustandard file not found:(u
startswithusdistuwarn(uselfumsg((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuwarnsumanifest_maker.warncCs�tj|�|jj|j�|jj|j�tt��}|r[|jj|�n"t	j
j|j�r}|j�n|j
d�}|jjdd|j�dS(Nuegg_infou*uprefix(usdistuadd_defaultsufilelistuappendutemplateumanifestulistuwalk_revctrluextenduosupathuexistsu
read_manifestuget_finalized_commanduinclude_patternuegg_info(uselfurcfilesuei_cmd((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuadd_defaultss

umanifest_maker.add_defaultscCs�|jd�}|jj�}|jjdd|j�|jjdd|�tjt	j
�}|jj|d|dd�dS(Nubuilduprefixu(RCS|CVS|\.svn)uis_regexi(uget_finalized_commandudistributionuget_fullnameufilelistuexclude_patternuNoneu
build_baseureuescapeuosusep(uselfubuildubase_dirusep((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuprune_file_list%sumanifest_maker.prune_file_listN(u__name__u
__module__u__qualname__utemplateuinitialize_optionsufinalize_optionsurunuwrite_manifestuwarnuadd_defaultsuprune_file_list(u
__locals__((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyumanifest_maker�s
umanifest_makercCsZdj|�}tjdkr0|jd�}nt|d�}|j|�|j�dS(u{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    u
iuutf-8uwbN(i(ujoinusysuversion_infouencodeuopenuwriteuclose(ufilenameucontentsuf((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyu
write_file.s
u
write_filecCs�tjd|�|js�|jj}|j|j|_}|j|j|_}z|j	|j
�Wd|||_|_Xt|jdd�}ddl
m}|j|j
|�ndS(Nu
writing %suzip_safei(u	bdist_egg(uloguinfoudry_runudistributionumetadatauegg_versionuversionuegg_nameunameuwrite_pkg_infouegg_infougetattruNoneusetuptools.commandu	bdist_egguwrite_safety_flag(ucmdubasenameufilenameumetadatauoldveruoldnameusafeu	bdist_egg((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuwrite_pkg_info9s	uwrite_pkg_infocCs&tjj|�r"tjd�ndS(NusWARNING: 'depends.txt' is not used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.(uosupathuexistsuloguwarn(ucmdubasenameufilename((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuwarn_depends_obsoleteJsuwarn_depends_obsoletec	Cs�|j}djt|jpf��g}xI|jp9ij�D]2\}}|jd|djt|��f�q@W|jd|dj|��dS(Nu
u	

[%s]
%surequirementsu(udistributionujoinuyield_linesuinstall_requiresuextras_requireuitemsuappenduwrite_or_delete_file(ucmdubasenameufilenameudistudatauextraureqs((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuwrite_requirementsRs
	!"*uwrite_requirementscCsItjdd�|jj�D��}|jd|dj|�d�dS(NcSs&g|]}|jdd�d�qS(u.ii(usplit(u.0uk((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyu
<listcomp>\s	u(write_toplevel_names.<locals>.<listcomp>utop-level namesu
(udictufromkeysudistributionuiter_distribution_namesu
write_fileujoin(ucmdubasenameufilenameupkgs((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuwrite_toplevel_namesYs	uwrite_toplevel_namescCst|||d�dS(NT(u	write_arguTrue(ucmdubasenameufilename((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyu
overwrite_argcsu
overwrite_argcCsgtjj|�d}t|j|d�}|dk	rMdj|�d}n|j||||�dS(Niu
(uosupathusplitextugetattrudistributionuNoneujoinuwrite_or_delete_file(ucmdubasenameufilenameuforceuargnameuvalue((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyu	write_argfs
u	write_argcCs�|jj}t|t�s'|dkr0|}n�|dk	r�g}xs|j�D]e\}}t|t�s�tj||�}djt	t
|j���}n|jd||f�qOWdj|�}n|j
d||d�dS(Nu
u	[%s]
%s

uuentry pointsT(udistributionuentry_pointsu
isinstanceu
basestringuNoneuitemsu
EntryPointuparse_groupujoinumapustruvaluesuappenduwrite_or_delete_fileuTrue(ucmdubasenameufilenameuepudatausectionucontents((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyu
write_entriesms	!u
write_entriescCsntjjd�rjtdd�}x9|D]1}tjd|�}|r(t|jd��Sq(W|j�ndS(NuPKG-INFOurUuVersion:.*-r(\d+)\s*$ii(	uosupathuexistsuopenureumatchuintugroupuclose(ufulineumatch((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyuget_pkg_info_revision}s

uget_pkg_info_revisionF()u__doc__uosureusysu
setuptoolsuCommandudistutils.errorsu	distutilsulogusetuptools.command.sdistusdistusetuptools.compatu
basestringu	svn_utilsudistutils.utiluconvert_pathudistutils.filelistuFileListu	_FileListu
pkg_resourcesuparse_requirementsu	safe_nameu
parse_versionusafe_versionuyield_linesu
EntryPointuiter_entry_pointsuto_filenameuwalk_revctrluegg_infoumanifest_makeru
write_fileuwrite_pkg_infouwarn_depends_obsoleteuwrite_requirementsuwrite_toplevel_namesu
overwrite_arguFalseu	write_argu
write_entriesuget_pkg_info_revision(((u4/tmp/pip-k8wh6o-build/setuptools/command/egg_info.pyu<module>s2:�J
python3.3/site-packages/setuptools/command/__pycache__/bdist_wininst.cpython-33.pyc000064400000005664151733566760024441 0ustar00�
�Re�c@sBddlmZddlZddlZGdd�de�ZdS(i(u
bdist_wininstNcBsr|EeZdZd
ZZd
dd�Zdd�Zddd�Zdd	�Z	e
ed
�sndd�Znd
S(u
bdist_wininstcCshtj||||�|j|�}|jrL|j}dd|f|_nd}d||f|_dS(Nu
bdist_wininstuany(u_bdist_wininstu
create_exeuget_installer_filenameutarget_versionu_bad_uploadu_good_upload(uselfuarcnameufullnameubitmapuinstaller_nameu	pyversion((u9/tmp/pip-k8wh6o-build/setuptools/command/bdist_wininst.pyu
create_exes		ubdist_wininst.create_execCsd|j|j}}t|jdg�}||krD|j|�n||kr`|j|�ndS(Nu
dist_files(u_good_uploadu_bad_uploadugetattrudistributionuremoveuappend(uselfugoodubadu
dist_files((u9/tmp/pip-k8wh6o-build/setuptools/command/bdist_wininst.pyu_fix_upload_namessubdist_wininst._fix_upload_namesicCs1|jj||�}|dkr-d|_n|S(Nuinstalluinstall_lib(uinstalluinstall_lib(udistributionureinitialize_commanduNoneuinstall_lib(uselfucommandureinit_subcommandsucmd((u9/tmp/pip-k8wh6o-build/setuptools/command/bdist_wininst.pyureinitialize_commands
	u"bdist_wininst.reinitialize_commandcCs5d|_ztj|�|j�Wdd|_XdS(NTF(uTrueu_is_runningu_bdist_wininsturunu_fix_upload_namesuFalse(uself((u9/tmp/pip-k8wh6o-build/setuptools/command/bdist_wininst.pyurun!s
	
ubdist_wininst.runuget_installer_filenamecCsQ|jr1tjj|jd||jf�}ntjj|jd|�}|S(Nu%s.win32-py%s.exeu%s.win32.exe(utarget_versionuosupathujoinudist_dir(uselfufullnameuinstaller_name((u9/tmp/pip-k8wh6o-build/setuptools/command/bdist_wininst.pyuget_installer_filename+s	
u$bdist_wininst.get_installer_filenameN(
u__name__u
__module__u__qualname__uNoneu_good_uploadu_bad_uploadu
create_exeu_fix_upload_namesureinitialize_commandurunuhasattru_bdist_wininstuget_installer_filename(u
__locals__((u9/tmp/pip-k8wh6o-build/setuptools/command/bdist_wininst.pyu
bdist_wininsts
	u
bdist_wininst(udistutils.command.bdist_wininstu
bdist_wininstu_bdist_wininstuosusys(((u9/tmp/pip-k8wh6o-build/setuptools/command/bdist_wininst.pyu<module>spython3.3/site-packages/setuptools/command/__pycache__/sdist.cpython-33.pyc000064400000023120151733566760022672 0ustar00�
�Re� c@s�ddlZddlZddlZddlmZddlZddlmZddlm	Z	ddl
mZddlm
Z
dZd
dd�ZGd
d�de�Zd
dd�Zedejdej��e
jgZGdd�de�ZdS(iN(uglob(usdist(uconvert_path(ulog(u	svn_utilsuREADMEu
README.rstu
README.txtuccs@x9tjd�D](}x|j�|�D]}|Vq)WqWdS(u%Find all files under revision controlusetuptools.file_findersN(u
pkg_resourcesuiter_entry_pointsuload(udirnameuepuitem((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyuwalk_revctrlsuwalk_revctrlcBs>|EeZdZddd�Zdd�Zddd�ZdS(	u	re_findercCs%||_||_t|�|_dS(N(upatternupostprocuconvert_pathupath(uselfupathupatternupostproc((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu__init__s		ure_finder.__init__ccs�t|d�}z|j�}Wd|j�XxU|jj|�D]A}|jd�}|jrp|j|�}ntj||�Vq@WdS(NurUi(	uopenureaducloseupatternufinditerugroupupostprocu	svn_utilsujoinpath(uselfudirnameufilenameufudataumatchupath((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu_finders	ure_finder._finderuccs�tj||j�}tjj|�r�xh|j||�D]Q}tjj|�rZ|Vq:tjj|�r:x||�D]}|VqyWq:q:WndS(N(u	svn_utilsujoinpathupathuosuisfileu_finderuisdir(uselfudirnameupathuitem((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu__call__+sure_finder.__call__N(u__name__u
__module__u__qualname__uNoneu__init__u_finderu__call__(u
__locals__((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu	re_finders
u	re_finderccs1x*tD]"}x||�D]}|VqWqWdS(uPrimary svn_cvs entry pointN(ufinders(udirnameufinderuitem((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu_default_revctrl7s
u_default_revctrluCVS/Entriesu
^\w?/([^/]+)/cBs�|EeZdZdZd ddddfd!gZiZdd�Zd
d�Ze	j
d"kp�d#e	j
koyd$knp�d%e	j
ko�d&knZer�eZndd�Z
dd�Zdd�Zdd�Zdd�ZdS('usdistu=Smart sdist that finds anything supported by revision controluformats=u6formats for source distribution (comma-separated list)u	keep-tempuku1keep the distribution tree around after creating uarchive file(s)u	dist-dir=uduFdirectory to put the source distribution archive(s) in [default: dist]cCs|jd�|jd�}|j|_|jjtjj|jd��|j�x!|j	�D]}|j|�qaWddl
}d|jjkr�|j
�n|j�t|jdg�}x<|jD]1}dd|f}||kr�|j|�q�q�WdS(Nuegg_infouSOURCES.txtiuchecku
dist_filesusdistu(urun_commanduget_finalized_commandufilelistuappenduosupathujoinuegg_infoucheck_readmeuget_sub_commandsudistutils.commanducommandu__all__ucheck_metadataumake_distributionugetattrudistributionu
archive_files(uselfuei_cmducmd_nameu	distutilsu
dist_filesufileudata((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyurunUs 
"


u	sdist.runc	CsDytj|�Wn,tj�djjjdj��YnXdS(Niutemplate(u_sdistu
read_templateusysuexc_infoutb_nextutb_frameuf_localsuclose(uself((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu__read_template_hackns
!usdist.__read_template_hackiiiiiics`t|jjg}x�|D]�}t|t�r�|}d}x:|D]2}tjj|�rAd}|jj	|�PqAqAW|s�|j
ddj|��q�qtjj|�r�|jj	|�q|j
d|�qWddg}xH|D]@}tt
tjjt|���}|r�|jj|�q�q�W|jj�r�|jd�}|jj|j��|jjs�xC|jD]5\}	�}	}
|jj�fd	d
�|
D��qxWq�n|jj�r�|jd�}|jj|j��n|jj�r%|jd�}|jj|j��n|jj�r\|jd
�}
|jj|
j��ndS(Niiu,standard file not found: should have one of u, ustandard file '%s' not foundu
test/test*.pyu	setup.cfgubuild_pycs%g|]}tjj�|��qS((uosupathujoin(u.0ufilename(usrc_dir(u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu
<listcomp>�s	u&sdist.add_defaults.<locals>.<listcomp>u	build_extu
build_clibu
build_scripts(uREADMESudistributionuscript_nameu
isinstanceutupleuosupathuexistsufilelistuappenduwarnujoinulistufilteruisfileuglobuextenduhas_pure_modulesuget_finalized_commanduget_source_filesuinclude_package_datau
data_filesuhas_ext_modulesuhas_c_librariesuhas_scripts(uselfu	standardsufnualtsugot_ituoptionalupatternufilesubuild_pyu_u	filenamesu	build_extu
build_clibu
build_scripts((usrc_diru1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyuadd_defaults�sL

	
!usdist.add_defaultscCsEx>tD]}tjj|�rdSqW|jddjt��dS(Nu,standard file not found: should have one of u, (uREADMESuosupathuexistsuwarnujoin(uselfuf((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyucheck_readme�s

usdist.check_readmecCs�tj|||�tjj|d�}ttd�ritjj|�ritj|�|jd|�n|j	d�j
|�dS(Nu	setup.cfgulinkuegg_info(u_sdistumake_release_treeuosupathujoinuhasattruexistsuunlinku	copy_fileuget_finalized_commandusave_version_info(uselfubase_dirufilesudest((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyumake_release_tree�s!
usdist.make_release_treec
CsYtjj|j�sdSt|jd�}z|j�}Wd|j�X|dj�kS(NurbUu+# file GENERATED by distutils, do NOT edit
F(	uosupathuisfileumanifestuFalseuopenureadlineucloseuencode(uselfufpu
first_line((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu_manifest_is_not_generated�su sdist._manifest_is_not_generatedcCs�tjd|j�t|jd�}x�|D]�}tjdkr�y|jd�}Wq�tk
r|tjd|�w,Yq�Xn|j	�}|j
d�s,|r�q,n|jj|�q,W|j
�dS(	u�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        ureading manifest file '%s'urbUiuUTF-8u"%r not UTF-8 decodable -- skippingu#N(i(uloguinfoumanifestuopenusysuversion_infoudecodeuUnicodeDecodeErroruwarnustripu
startswithufilelistuappenduclose(uselfumanifestuline((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu
read_manifest�s

usdist.read_manifestN(uformats=Nu6formats for source distribution (comma-separated list)(u	dist-dir=uduFdirectory to put the source distribution archive(s) in [default: dist](iii(ii(iii(ii(iii(u__name__u
__module__u__qualname__u__doc__uNoneuuser_optionsunegative_opturunu_sdist__read_template_hackusysuversion_infouhas_leaky_handleu
read_templateuadd_defaultsucheck_readmeumake_release_treeu_manifest_is_not_generatedu
read_manifest(u
__locals__((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyusdistEs*		5	
usdist(uREADMEu
README.rstu
README.txt(uosureusysuglobu
pkg_resourcesudistutils.command.sdistusdistu_sdistudistutils.utiluconvert_pathu	distutilsulogu
setuptoolsu	svn_utilsuREADMESuwalk_revctrluobjectu	re_finderu_default_revctrlucompileuMu
svn_finderufinders(((u1/tmp/pip-k8wh6o-build/setuptools/command/sdist.pyu<module>s python3.3/site-packages/setuptools/command/__pycache__/saveopts.cpython-33.pyc000064400000002517151733566760023417 0ustar00�
�Re�c@sXddlZddlZddlmZddlmZmZGdd�de�ZdS(iN(uCommand(uedit_configuoption_basecBs,|EeZdZdZdZdd�ZdS(usaveoptsu#Save command-line options to a fileu7save supplied options to setup.cfg or other config filecCs�|j}i}xt|jD]i}|dkr1qnxN|j|�j�D]7\}\}}|dkrG||j|i�|<qGqGWqWt|j||j�dS(Nusaveoptsucommand line(udistributionucommand_optionsuget_option_dictuitemsu
setdefaultuedit_configufilenameudry_run(uselfudistusettingsucmduoptusrcuval((u4/tmp/pip-k8wh6o-build/setuptools/command/saveopts.pyurun
s	(!usaveopts.runN(u__name__u
__module__u__qualname__u__doc__udescriptionurun(u
__locals__((u4/tmp/pip-k8wh6o-build/setuptools/command/saveopts.pyusaveoptssusaveopts(u	distutilsuosu
setuptoolsuCommandusetuptools.command.setoptuedit_configuoption_baseusaveopts(((u4/tmp/pip-k8wh6o-build/setuptools/command/saveopts.pyu<module>spython3.3/site-packages/setuptools/command/__pycache__/test.cpython-33.pyc000064400000015221151733566760022526 0ustar00�
�Re,c@s�ddlmZddlmZddlZddlTddlmZddlmZm	Z	Gdd�de�Z
Gd	d
�d
e�ZdS(i(uCommand(uDistutilsOptionErrorN(u*(u_namespace_packages(u
TestLoaderumaincBs |EeZdZdd�ZdS(uScanningLoadercCs,g}|jdkr1|jtj||��nt|d�rV|j|j��nt|d�rx�t|jd�D]�}|jd�r�|dkr�|jd|dd
�}n-t|j|d
�rx|jd|}nqx|j|j	|��qxWnt
|�dkr |j|�S|dSdS(uReturn a suite of all tests cases contained in the given module

        If the module is a package, load tests from all the modules in it.
        If the module has an ``additional_tests`` function, call it and add
        the return value to the tests.
        usetuptools.tests.doctestuadditional_testsu__path__uu.pyu__init__.pyu.Niu/__init__.pyiii����(u__name__uappendu
TestLoaderuloadTestsFromModuleuhasattruadditional_testsuresource_listdiruendswithuresource_existsuloadTestsFromNameulenu
suiteClass(uselfumoduleutestsufileu	submodule((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyuloadTestsFromModule
s"
u"ScanningLoader.loadTestsFromModuleN(u__name__u
__module__u__qualname__uloadTestsFromModule(u
__locals__((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyuScanningLoadersuScanningLoadercBsh|EeZdZdZdZddgZd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dS(utestu.Command to run unit tests after in-place buildu#run unit tests after in-place buildutest-module=umu$Run 'test_suite' in specified moduleutest-suite=usu1Test suite to run (e.g. 'some_module.test_suite')cCsd|_d|_d|_dS(N(uNoneu
test_suiteutest_moduleutest_loader(uself((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyuinitialize_options7s		utest.initialize_optionscCs�|jdkrC|jdkr0|jj|_q[|jd|_n|jr[td��n|jg|_|jr�|jjdd�n|jdkr�t	|jdd�|_n|jdkr�d|_ndS(Nu.test_suiteu1You may specify a module or a suite, but not bothiu	--verboseutest_loaderu&setuptools.command.test:ScanningLoader(
u
test_suiteuNoneutest_moduleudistributionuDistutilsOptionErroru	test_argsuverboseuinsertutest_loaderugetattr(uself((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyufinalize_options=s		utest.finalize_optionscCs�tjd
kr�t|jdd�r�|jddd�|jd�|jd�}t|j	�}|jdd|�|jd�|jddd�|jd�n-|jd�|jddd	�|jd�|jd�}tj
dd�}tjj�}z[tj
j
dt|j��tj�td
d��td|j|jf�|�Wd|tj
dd�<tjj�tjj|�tj�XdS(Niuuse_2to3ubuild_pyuinplaceiuegg_infouegg_baseu	build_exticSs
|j�S(N(uactivate(udist((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyu<lambda>tsu/test.with_project_on_sys_path.<locals>.<lambda>u%s==%s(iF(usysuversion_infougetattrudistributionuFalseureinitialize_commandurun_commanduget_finalized_commandunormalize_pathu	build_libupathumodulesucopyuinsertuegg_baseuworking_setu__init__uadd_activation_listenerurequireuegg_nameuegg_versionuclearuupdate(uselfufuncubpy_cmdu
build_pathuei_cmduold_pathuold_modules((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyuwith_project_on_sys_pathTs2$





utest.with_project_on_sys_pathcCs�|jjr%|jj|jj�n|jjrJ|jj|jj�n|jr�dj|j�}|jr�|jd|�q�|jd|�|j	|j
�ndS(Nu u skipping "unittest %s" (dry run)urunning "unittest %s"(udistributionuinstall_requiresufetch_build_eggsu
tests_requireu
test_suiteujoinu	test_argsudry_runuannounceuwith_project_on_sys_pathu	run_tests(uselfucmd((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyurun~s		utest.runcCs2ddl}tjd	kr�t|jdd
�r�|jdjd�d}|tkr�g}|tj	kr{|j
|�n|d7}x0tj	D]%}|j|�r�|j
|�q�q�Wtt
tj	j|��q�ntjd|j�}|jdd
�}|�}|jdd|jg|jd|�dS(Niiuuse_2to3iu.ux=urequireu
testLoader(iFi����(uunittestusysuversion_infougetattrudistributionuFalseu	test_argsusplitu_namespace_packagesumodulesuappendu
startswithulistumapu__delitem__u
EntryPointuparseutest_loaderuloadumainuNoneu__file__(uselfuunittestumoduleudel_modulesunameu	loader_epuloader_classucks((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyu	run_tests�s$$
	utest.run_testsN(utest-module=umu$Run 'test_suite' in specified module(utest-suite=usu1Test suite to run (e.g. 'some_module.test_suite')(u__name__u
__module__u__qualname__u__doc__udescriptionuuser_optionsuinitialize_optionsufinalize_optionsuwith_project_on_sys_pathurunu	run_tests(u
__locals__((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyutest+s	*utest(u
setuptoolsuCommandudistutils.errorsuDistutilsOptionErrorusysu
pkg_resourcesu_namespace_packagesuunittestu
TestLoaderumainuScanningLoaderutest(((u0/tmp/pip-k8wh6o-build/setuptools/command/test.pyu<module>s
#python3.3/site-packages/setuptools/command/__pycache__/install_scripts.cpython-33.pyc000064400000006106151733566760024766 0ustar00�
�Rec@sbddlmZddlmZmZmZddlZddlm	Z	Gdd�de�ZdS(i(uinstall_scripts(uDistributionuPathMetadatauensure_directoryN(ulogcBsA|EeZdZdZdd�Zdd�Zddd�Zd	S(
uinstall_scriptsu;Do normal script install, plus any egg_info wrapper scriptscCstj|�d|_dS(NF(u_install_scriptsuinitialize_optionsuFalseuno_ep(uself((u;/tmp/pip-k8wh6o-build/setuptools/command/install_scripts.pyuinitialize_options
s
u"install_scripts.initialize_optionsc	Csddlm}ddlm}|jd�|jjrItj|�n	g|_|j	r_dS|j
d�}t|jt
|j|j�|j|j�}|j
d�}t|d|�}t|j
d�dd	�}x'||||�D]}|j|�q�WdS(
Ni(uget_script_args(usys_executableuegg_infou
build_scriptsu
executableu
bdist_wininstu_is_runningF(usetuptools.command.easy_installuget_script_argsusys_executableurun_commandudistributionuscriptsu_install_scriptsurunuoutfilesuno_epuget_finalized_commanduDistributionuegg_baseuPathMetadatauegg_infouegg_nameuegg_versionugetattruFalseuwrite_script(	uselfuget_script_argsusys_executableuei_cmdudistubs_cmdu
executableu
is_wininstuargs((u;/tmp/pip-k8wh6o-build/setuptools/command/install_scripts.pyuruns$
		uinstall_scripts.runutc
Gs�ddlm}m}tjd||j�tjj|j|�}|j	j
|�|�}|js�t|�t
|d|�}	|	j|�|	j�||d|�ndS(u1Write an executable file to the scripts directoryi(uchmodu
current_umaskuInstalling %s script to %suwi�N(usetuptools.command.easy_installuchmodu
current_umaskuloguinfouinstall_diruosupathujoinuoutfilesuappendudry_runuensure_directoryuopenuwriteuclose(
uselfuscript_nameucontentsumodeuignoreduchmodu
current_umaskutargetumaskuf((u;/tmp/pip-k8wh6o-build/setuptools/command/install_scripts.pyuwrite_script(s		


uinstall_scripts.write_scriptN(u__name__u
__module__u__qualname__u__doc__uinitialize_optionsurunuwrite_script(u
__locals__((u;/tmp/pip-k8wh6o-build/setuptools/command/install_scripts.pyuinstall_scriptssuinstall_scripts(
u!distutils.command.install_scriptsuinstall_scriptsu_install_scriptsu
pkg_resourcesuDistributionuPathMetadatauensure_directoryuosu	distutilsulog(((u;/tmp/pip-k8wh6o-build/setuptools/command/install_scripts.pyu<module>spython3.3/site-packages/setuptools/command/__pycache__/__init__.cpython-33.pyc000064400000001550151733566760023306 0ustar00�
�Re)c@s�dddddddddd	d
ddd
ddddddgZddlmZddlZddlmZdejkr�dejd<ejjd�n[[dS(ualiasu	bdist_eggu	bdist_rpmu	build_extubuild_pyudevelopueasy_installuegg_infouinstalluinstall_liburotateusaveoptsusdistusetoptutestuinstall_egg_infouinstall_scriptsuregisteru
bdist_wininstuupload_docsi(uinstall_scriptsN(ubdistuegguPython .egg file(u	bdist_egguPython .egg file(	u__all__usetuptools.commanduinstall_scriptsusysudistutils.command.bdistubdistuformat_commandsuformat_commanduappend(((u4/tmp/pip-k8wh6o-build/setuptools/command/__init__.pyu<module>s
python3.3/site-packages/setuptools/command/__pycache__/upload_docs.cpython-33.pyc000064400000017334151733566760024052 0ustar00�
�Re�c@sdZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZmZmZmZmZer�d	nd
Zddd
�ZGdd�de�ZdS(upupload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
PyPI's pythonhosted.org).
iN(ustandard_b64encode(uiter_entry_points(ulog(uDistutilsOptionError(uupload(uhttplibuurlparseuunicodeu	iteritemsuPY3usurrogateescapeustrictuutf-8cCs#t|t�r|j|t�S|S(N(u
isinstanceuunicodeuencodeuerrors(usuencoding((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyubsubcBs�|EeZdZdZdddejfddgZejZd	d
�Z	de	fgZ
dd
�Zdd�Zdd�Z
dd�Zdd�ZdS(uupload_docsuUpload documentation to PyPIurepository=uruurl of repository [default: %s]u
show-responseu&display full response text from serveruupload-dir=udirectory to uploadcCs1|jdkr-xtdd�D]}dSWndS(Nudistutils.commandsubuild_sphinxT(u
upload_diruNoneuiter_entry_pointsuTrue(uselfuep((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyu
has_sphinx0suupload_docs.has_sphinxubuild_sphinxcCs#tj|�d|_d|_dS(N(uuploaduinitialize_optionsuNoneu
upload_diru
target_dir(uself((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyuinitialize_options7s
	uupload_docs.initialize_optionscCs�tj|�|jdkrs|j�rF|jd�}|j|_q�|jd�}tj	j
|jd�|_n|jd�|j|_|j
d|j�dS(Nubuild_sphinxubuildudocsu
upload_diruUsing upload directory %s(uuploadufinalize_optionsu
upload_diruNoneu
has_sphinxuget_finalized_commandubuilder_target_diru
target_diruosupathujoinu
build_baseuensure_dirnameuannounce(uselfubuild_sphinxubuild((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyufinalize_options<s

uupload_docs.finalize_optionsc
Cs�tj|d�}z�|j|j�x�tj|j�D]�\}}}||jkrs|rstd|j��nxp|D]h}tjj||�}|t	|j�d�j
tjj�}tjj||�}	|j||	�qzWq8WWd|j
�XdS(Nuwu'no files found in upload directory '%s'(uzipfileuZipFileumkpathu
target_diruosuwalkuDistutilsOptionErrorupathujoinulenulstripusepuwriteuclose(
uselfufilenameuzip_fileurootudirsufilesunameufullurelativeudest((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyucreate_zipfileJs"
(uupload_docs.create_zipfilecCs�x!|j�D]}|j|�q
Wtj�}|jjj�}tjj	|d|�}z|j
|�|j|�Wdtj
|�XdS(Nu%s.zip(uget_sub_commandsurun_commandutempfileumkdtempudistributionumetadatauget_nameuosupathujoinucreate_zipfileuupload_fileushutilurmtree(uselfucmd_nameutmp_dirunameuzip_file((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyurun[s
uupload_docs.runcCslt|d�}|j�}|j�|jj}idd6|j�d6tjj|�|fd6}t	|j
d|j�}t|�}t
r�|jd�}nd|}d	}t	d
�t	|�}	|	t	d�}
g}xt|�D]�\}}
d|}t|
t�r|
g}
nx�|
D]�}t|�tkrZ|d
|d7}|d}nt	|�}|j|	�|jt	|��|jt	d��|j|�|r#|d&d�t	d�kr#|jt	d��q#q#Wq�W|j|
�|jt	d��t	d�j|�}|jd|jtj�t|j�\}}}}}}|rk|rk|sqt�|dkr�tj|�}n.|dkr�tj|�}ntd|��d}y{|j�|j d|�d|}|j!d|�|j!dt"t#|���|j!d|�|j$�|j%|�WnBt&j'k
r�t(j)�d}|jt"|�tj*�dSYnX|j+�}|j,dkr�|jd|j,|j-ftj�nz|j,dkr|j.d �}|dkrd!|j�}n|jd"|tj�n#|jd#|j,|j-ftj*�|j0rht1d$d%|j�d$d%�ndS('Nurbu
doc_uploadu:actionunameucontentu:uasciiuBasic u3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254u
--u--u*
Content-Disposition: form-data; name="%s"u; filename="%s"iiu

u
u
uuSubmitting documentation to %suhttpuhttpsuunsupported schema uPOSTu multipart/form-data; boundary=%suContent-typeuContent-lengthu
Authorizationi�uServer response (%s): %si-uLocationuhttps://pythonhosted.org/%s/uUpload successful. Visit %suUpload failed (%s): %su-iKi����(2uopenureaducloseudistributionumetadatauget_nameuosupathubasenameubuusernameupasswordustandard_b64encodeuPY3udecodeu	iteritemsu
isinstanceulistutypeutupleuappendujoinuannounceu
repositoryuloguINFOuurlparseuAssertionErroruhttplibuHTTPConnectionuHTTPSConnectionuconnectu
putrequestu	putheaderustrulenu
endheadersusendusocketuerrorusysuexc_infouERRORugetresponseustatusureasonu	getheaderuNoneu
show_responseuprint(uselfufilenameufucontentumetaudataucredentialsuauthuboundaryusep_boundaryuend_boundaryubodyukeyuvaluesutitleuvalueuschemaunetlocuurluparamsuqueryu	fragmentsuconnucontent_typeueurulocation((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyuupload_fileis�







"

!


	



	uupload_docs.upload_fileN(u
show-responseNu&display full response text from server(uupload-dir=Nudirectory to upload(u__name__u
__module__u__qualname__udescriptionuuploaduDEFAULT_REPOSITORYuNoneuuser_optionsuboolean_optionsu
has_sphinxusub_commandsuinitialize_optionsufinalize_optionsucreate_zipfileurunuupload_file(u
__locals__((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyuupload_docs#s
		uupload_docs(u__doc__uosusocketuzipfileutempfileusysushutilubase64ustandard_b64encodeu
pkg_resourcesuiter_entry_pointsu	distutilsulogudistutils.errorsuDistutilsOptionErrorudistutils.command.uploaduuploadusetuptools.compatuhttplibuurlparseuunicodeu	iteritemsuPY3uerrorsubuupload_docs(((u7/tmp/pip-k8wh6o-build/setuptools/command/upload_docs.pyu<module>s(python3.3/site-packages/setuptools/command/__pycache__/bdist_rpm.cpython-33.pyc000064400000005524151733566760023537 0ustar00�
�Re�c@sBddlmZddlZddlZGdd�de�ZdS(i(u	bdist_rpmNcBsY|EeZdZdd�Zejdkr=ddd�Zndd�Zd	d
�ZdS(u	bdist_rpmcCstj|�d|_dS(N(u
_bdist_rpmuinitialize_optionsuNoneuno_egg(uself((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_rpm.pyuinitialize_optionss
ubdist_rpm.initialize_optionsu2.5ic
Cs�tj||||�||jkr�|jd�r�t|jdg�jd|jd�radpqtjdd�t	j
j|t	j
j|��f�ndS(Nu.rpmu
dist_filesu	bdist_rpmu.src.rpmuanyi(
u
_bdist_rpmu	move_fileudist_diruendswithugetattrudistributionuappendusysuversionuosupathujoinubasename(uselfusrcudstulevel((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_rpm.pyu	move_files%ubdist_rpm.move_filecCs|jd�tj|�dS(Nuegg_info(urun_commandu
_bdist_rpmurun(uself((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_rpm.pyuruns
u
bdist_rpm.runcs�|jj�}|jdd�}tj|�}d|�d|���fdd�|D�}|j|j��dd|�|S(Nu-u_u%define version csFg|]<}|jdd�jdd�jdd�j����qS(uSource0: %{name}-%{version}.taru)Source0: %{name}-%{unmangled_version}.tarusetup.py install u5setup.py install --single-version-externally-managed u%setupu&%setup -n %{name}-%{unmangled_version}(ureplace(u.0uline(uline23uline24(u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_rpm.pyu
<listcomp>1s	
u-bdist_rpm._make_spec_file.<locals>.<listcomp>iu%define unmangled_version (udistributionuget_versionureplaceu
_bdist_rpmu_make_spec_fileuinsertuindex(uselfuversionu
rpmversionuspec((uline23uline24u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_rpm.pyu_make_spec_file*s



!ubdist_rpm._make_spec_fileN(	u__name__u
__module__u__qualname__uinitialize_optionsusysuversionu	move_fileurunu_make_spec_file(u
__locals__((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_rpm.pyu	bdist_rpm	s
	u	bdist_rpm(udistutils.command.bdist_rpmu	bdist_rpmu
_bdist_rpmusysuos(((u5/tmp/pip-k8wh6o-build/setuptools/command/bdist_rpm.pyu<module>spython3.3/site-packages/setuptools/command/__pycache__/develop.cpython-33.pyc000064400000015542151733566760023213 0ustar00�
�Re/c@s�ddlmZddlmZmZddlmZmZmZddl	m
Z
ddlmZm
Z
ddlZddlZddlZddlZGdd�de�ZdS(	i(ueasy_install(uconvert_pathu
subst_vars(uDistributionuPathMetadataunormalize_path(ulog(uDistutilsErroruDistutilsOptionErrorNcBs�|EeZdZdZdZejddgZejdgZdZ
dd	�Zd
d�Zdd
�Z
dd�Zdd�Zdd�ZdS(udevelopuSet up package for developmentu%install package in 'development mode'u	uninstalluuuUninstall this source packageu	egg-path=u-Set the path to be used in the .egg-link filecCs7|jrd|_|j�n
|j�|j�dS(NT(u	uninstalluTrueu
multi_versionuuninstall_linkuinstall_for_developmentuwarn_deprecated_options(uself((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyuruns
		

udevelop.runcCs5d|_d|_tj|�d|_d|_dS(Nu.(uNoneu	uninstalluegg_pathueasy_installuinitialize_optionsu
setup_pathualways_copy_from(uself((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyuinitialize_optionss
		
	udevelop.initialize_optionscCs�|jd�}|jr7td|j|jf��n|jg|_tj|�|j�|j	�|j
jtjd��t
jj|j|jd�|_|j|_|jdkr�t
jj|j�|_nt|j�}tt
jj|j|j��|kr!td|��nt|t|t
jj|j��d|j�|_|jjt
jd�}|t
jkr�d|jd�d	}n||_tt
jj|j|j|��}|tt
j�kr�td
|tt
j���ndS(Nuegg_infou-Please rename %r to %r before using 'develop'u*.eggu	.egg-linkuA--egg-path must be a relative path from the install directory to uproject_nameu/u../iuGCan't get a consistent path to setup script from installation directory( uget_finalized_commandubroken_egg_infouDistutilsErroruegg_infouegg_nameuargsueasy_installufinalize_optionsuexpand_basedirsuexpand_dirsu
package_indexuscanuglobuosupathujoinuinstall_diruegg_linkuegg_baseuegg_pathuNoneuabspathunormalize_pathuDistutilsOptionErroruDistributionuPathMetadataudistureplaceusepucurdirucountu
setup_path(uselfueiutargetup((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyufinalize_options's@	


"'
	$udevelop.finalize_optionscCs�tjd
kr�t|jdd�r�|jddd�|jd�|jd�}t|j	�}|jdd|�|jd�|jddd�|jd�|jd�}||_
||j_t
||j�|j_n-|jd�|jddd	�|jd�|j�tjr=|jtj�dt_ntjd
|j|j�|js�t|jd�}|j|j
d|j�|j�n|jd|j|j�dS(Niuuse_2to3ubuild_pyuinplaceiuegg_infouegg_baseu	build_extiuCreating %s (link to %s)uwu
(iF( usysuversion_infougetattrudistributionuFalseureinitialize_commandurun_commanduget_finalized_commandunormalize_pathu	build_libuegg_pathudistulocationuPathMetadatauegg_infou	_provideruinstall_site_pyu
setuptoolsubootstrap_install_fromueasy_installuNoneuloguinfouegg_linkuegg_baseudry_runuopenuwriteu
setup_pathucloseuprocess_distributionuno_deps(uselfubpy_cmdu
build_pathuei_cmduf((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyuinstall_for_developmentVs4$


	


		
udevelop.install_for_developmentcCs�tjj|j�r�tjd|j|j�t|j�}dd�|D�}|j�||j	g|j	|j
gfkr�tjd|�dS|js�tj
|j�q�n|js�|j|j�n|jjr�tjd�ndS(NuRemoving %s (link to %s)cSsg|]}|j��qS((urstrip(u.0uline((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyu
<listcomp>�s	u*develop.uninstall_link.<locals>.<listcomp>u$Link points to %s: uninstall abortedu5Note: you must uninstall or replace scripts manually!(uosupathuexistsuegg_linkuloguinfouegg_baseuopenucloseuegg_pathu
setup_pathuwarnudry_runuunlinku
update_pthudistudistributionuscripts(uselfu
egg_link_fileucontents((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyuuninstall_link�s
$		udevelop.uninstall_linkcCs�||jk	rtj||�S|j|�x|jjp>gD]k}tjjt	|��}tjj
|�}t|d�}|j�}|j
�|j||||�q?WdS(NurU(udistueasy_installuinstall_egg_scriptsuinstall_wrapper_scriptsudistributionuscriptsuosupathuabspathuconvert_pathubasenameuopenureaducloseuinstall_script(uselfudistuscript_nameuscript_pathufuscript_text((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyuinstall_egg_scripts�s

udevelop.install_egg_scriptsN(u	uninstalluuuUninstall this source package(u	egg-path=Nu-Set the path to be used in the .egg-link fileF(u__name__u
__module__u__qualname__u__doc__udescriptionueasy_installuuser_optionsuNoneuboolean_optionsuFalseucommand_consumes_argumentsurunuinitialize_optionsufinalize_optionsuinstall_for_developmentuuninstall_linkuinstall_egg_scripts(u
__locals__((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyudevelops
	/.udevelop(usetuptools.command.easy_installueasy_installudistutils.utiluconvert_pathu
subst_varsu
pkg_resourcesuDistributionuPathMetadataunormalize_pathu	distutilsulogudistutils.errorsuDistutilsErroruDistutilsOptionErroruosusysu
setuptoolsuglobudevelop(((u3/tmp/pip-k8wh6o-build/setuptools/command/develop.pyu<module>s0python3.3/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-33.pyc000064400000012514151733566760025054 0ustar00�
�Re�c@stddlmZddlmZddlmZmZddlZddlZddl	Z	Gdd�de�Z
dS(i(uCommand(uunpack_archive(ulogudir_utilNcBs}|EeZdZdZdZdgZdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�ZdS(uinstall_egg_infou.Install an .egg-info directory for the packageuinstall-dir=ududirectory to install tocCs
d|_dS(N(uNoneuinstall_dir(uself((u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyuinitialize_optionssu#install_egg_info.initialize_optionscCs�|jdd�|jd�}tjdd|j|j�j�d}|j|_t	j
j|j|�|_
|j
g|_dS(Nuinstall_libuinstall_diruegg_infou	.egg-info(uinstall_diruinstall_dir(uset_undefined_optionsuget_finalized_commandu
pkg_resourcesuDistributionuNoneuegg_nameuegg_versionuegg_infousourceuosupathujoinuinstall_dirutargetuoutputs(uselfuei_cmdubasename((u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyufinalize_optionssu!install_egg_info.finalize_optionscCs�|jd�|j}tjj|j�r]tjj|j�r]tj|jd|j�n;tjj	|j�r�|j
tj|jfd|j�n|js�tj
|j�n|j
|jfd|j|jf�|j�dS(Nuegg_infoudry_runu	Removing uCopying %s to %s(urun_commandutargetuosupathuisdiruislinkudir_utiluremove_treeudry_runuexistsuexecuteuunlinku
pkg_resourcesuensure_directoryucopytreeusourceuinstall_namespaces(uselfutarget((u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyuruns
	+&	uinstall_egg_info.runcCs|jS(N(uoutputs(uself((u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyuget_outputs*suinstall_egg_info.get_outputscs,�fdd�}t�j�j|�dS(Ncs[x1dD])}|j|�s,d||krdSqW�jj|�tjd||�|S(Nu.svn/uCVS/u/uCopying %s to %s(u.svn/uCVS/(u
startswithuNoneuoutputsuappendulogudebug(usrcudstuskip(uself(u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyuskimmer/s
u*install_egg_info.copytree.<locals>.skimmer(uunpack_archiveusourceutarget(uselfuskimmer((uselfu</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyucopytree-s
uinstall_egg_info.copytreecCs|j�}|sdStjj|j�\}}|d7}|jj|�tjd|�|j	st
|d�}x|D]w}t|�}t|j
d��}d}d|kr�ddj|dd	��|d
f}n|jdt��qzW|j�ndS(Nu
-nspkg.pthu
Installing %suwtu.u
u(; m and setattr(sys.modules[%r], %r, m)
iu7import sys,types,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault(%(pkg)r,types.ModuleType(%(pkg)r)); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)%(trailer)si����i����(u_get_all_ns_packagesuosupathusplitextutargetuoutputsuappenduloguinfoudry_runuopenustrutupleusplitujoinuwriteulocalsuclose(uselfunspufilenameuextufupkgupthutrailer((u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyuinstall_namespacesSs(
	
'u#install_egg_info.install_namespacescCsvi}xS|jjpgD]?}|jd�}x'|rWd|dj|�<|j�q1WqWt|�}|j�|S(Nu.i(udistributionunamespace_packagesusplitujoinupopulistusort(uselfunspupkg((u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyu_get_all_ns_packagesrs	
u%install_egg_info._get_all_ns_packagesN(uinstall-dir=ududirectory to install to(
u__name__u
__module__u__qualname__u__doc__udescriptionuuser_optionsuinitialize_optionsufinalize_optionsurunuget_outputsucopytreeuinstall_namespacesu_get_all_ns_packages(u
__locals__((u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyuinstall_egg_infos	
&uinstall_egg_info(u
setuptoolsuCommandusetuptools.archive_utiluunpack_archiveu	distutilsulogudir_utiluosushutilu
pkg_resourcesuinstall_egg_info(((u</tmp/pip-k8wh6o-build/setuptools/command/install_egg_info.pyu<module>s$python3.3/site-packages/setuptools/command/__pycache__/register.cpython-33.pyc000064400000001441151733566760023372 0ustar00�
�Rec@s*ddlmZGdd�de�ZdS(i(uregistercBs)|EeZdZejZdd�ZdS(uregistercCs|jd�tj|�dS(Nuegg_info(urun_commandu	_registerurun(uself((u4/tmp/pip-k8wh6o-build/setuptools/command/register.pyuruns
uregister.runN(u__name__u
__module__u__qualname__u	_registeru__doc__urun(u
__locals__((u4/tmp/pip-k8wh6o-build/setuptools/command/register.pyuregisters	uregisterN(udistutils.command.registeruregisteru	_register(((u4/tmp/pip-k8wh6o-build/setuptools/command/register.pyu<module>spython3.3/site-packages/setuptools/command/__pycache__/build_py.cpython-33.pyc000064400000026567151733566760023375 0ustar00�
�Re� c
@s�ddlZddlZddlZddlZddlmZddlmZddl	m	Z	yddl
mZWn%ek
r�Gdd�d�ZYnXGdd	�d	ee�Zd
d�Z
dS(iN(ubuild_py(uconvert_path(uglob(u	Mixin2to3cBs#|EeZdZddd�ZdS(u	Mixin2to3cCsdS(u
do nothingN((uselfufilesudoctests((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyurun_2to3
suMixin2to3.run_2to3NT(u__name__u
__module__u__qualname__uTrueurun_2to3(u
__locals__((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu	Mixin2to3su	Mixin2to3cBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Ze
jdkr�ddd�Zndd�Zdd�Zdd�Zdd�Zd S(!ubuild_pyuXEnhanced 'build_py' command that includes data files with packages

    The data files are specified via a 'package_data' argument to 'setup()'.
    See 'setuptools.dist.Distribution' for more details.

    Also, this version of the 'build_py' command allows you to specify both
    'py_modules' and 'packages' in the same setup operation.
    cCsctj|�|jj|_|jjp+i|_d|jkrM|jd=ng|_g|_dS(Nu
data_files(u	_build_pyufinalize_optionsudistributionupackage_datauexclude_package_datau__dict__u_build_py__updated_filesu_build_py__doctests_2to3(uself((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyufinalize_optionss

	ubuild_py.finalize_optionscCs�|jr|jrdS|jr.|j�n|jrN|j�|j�n|j|jd�|j|jd�|j|j	d�|j
tj|dd��dS(u?Build modules, packages, and copy data files to build directoryNuinclude_bytecodeiFT(
u
py_modulesupackagesu
build_modulesubuild_packagesubuild_package_dataurun_2to3u_build_py__updated_filesuFalseuTrueu_build_py__doctests_2to3ubyte_compileu	_build_pyuget_outputs(uself((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyurun!s	
	

ubuild_py.runcCs3|dkr#|j�|_}|Stj||�S(Nu
data_files(u_get_data_filesu
data_filesu	_build_pyu__getattr__(uselfuattrufiles((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu__getattr__5subuild_py.__getattr__cCsAtj||||�\}}|r7|jj|�n||fS(N(u	_build_pyubuild_moduleu_build_py__updated_filesuappend(uselfumoduleumodule_fileupackageuoutfileucopied((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyubuild_module;subuild_py.build_modulecs�|j�g}x�|jpfD]�}|j|�}tjj|jg|jd��}t|�d��fdd�|j	||�D�}|j
||||f�q W|S(u?Generate list of '(package,src_dir,build_dir,filenames)' tuplesu.ics g|]}|�d��qS(N((u.0ufile(uplen(u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu
<listcomp>Qs	u,build_py._get_data_files.<locals>.<listcomp>(uanalyze_manifestupackagesuget_package_diruosupathujoinu	build_libusplitulenufind_data_filesuappend(uselfudataupackageusrc_diru	build_diru	filenames((uplenu4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu_get_data_filesAs
%%ubuild_py._get_data_filescCs�|jjdg�|jj|g�}|jj|g�dd�}x6|D].}|jttjj|t|����qNW|j	|||�S(u6Return filenames for package's data files in 'src_dir'uN(
upackage_dataugetumanifest_filesuextenduglobuosupathujoinuconvert_pathuexclude_data_files(uselfupackageusrc_diruglobsufilesupattern((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyufind_data_filesVs
,ubuild_py.find_data_filesc
Cs�x�|jD]�\}}}}x�|D]�}tjj||�}|jtjj|��tjj||�}|j||�\}}	tjj|�}|	r#||jj	kr#|j
j|�q#q#Wq
WdS(u$Copy data files into build directoryN(u
data_filesuosupathujoinumkpathudirnameu	copy_fileuabspathudistributionuconvert_2to3_doctestsu_build_py__doctests_2to3uappend(
uselfupackageusrc_diru	build_diru	filenamesufilenameutargetusrcfileuoutfucopied((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyubuild_package_data`s
ubuild_py.build_package_datacCs\i|_}|jjsdSi}x0|jp2fD]}||t|j|��<q3W|jd�|jd�}x�|jj	D]�}t
jjt|��\}}d}|}	xU|r||kr||kr|}t
jj|�\}}
t
jj|
|�}q�W||kr|jd�r4||	kr4qn|j||g�j|�qqWdS(Nuegg_infou.py(umanifest_filesudistributionuinclude_package_dataupackagesuassert_relativeuget_package_dirurun_commanduget_finalized_commandufilelistufilesuosupathusplituNoneujoinuendswithu
setdefaultuappend(uselfumfusrc_dirsupackageuei_cmdupathudufuprevuoldfudf((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyuanalyze_manifestls(

!ubuild_py.analyze_manifestcCsdS(N((uself((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyuget_data_files�subuild_py.get_data_filesu2.4icCs$tj||�dd�|jD�S(ujReturn complete list of files copied to the build directory

            This includes both '.py' files and data files, as well as '.pyc'
            and '.pyo' files if 'include_bytecode' is true.  (This method is
            needed for the 'install_lib' command to do its job properly, and to
            generate a correct installation manifest.)
            cSs>g|]4\}}}}|D]}tjj||��qqS((uosupathujoin(u.0upackageusrc_diru	build_diru	filenamesufilename((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu
<listcomp>�s	u(build_py.get_outputs.<locals>.<listcomp>(u	_build_pyuget_outputsu
data_files(uselfuinclude_bytecode((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyuget_outputs�s	ubuild_py.get_outputscCs�y|j|SWntk
r#YnXtj|||�}||j|<|sZ|jjr^|Sx;|jjD])}||ks�|j|d�rkPqkqkW|St|d�}dj�|j	�kr�ddl
m}|jd|�n|j
�|S(u8Check namespace packages' __init__ for declare_namespaceu.urbUudeclare_namespacei(ulogu�WARNING: %s is a namespace package, but its __init__.py does
not declare_namespace(); setuptools 0.7 will REQUIRE this!
(See the setuptools manual under "Namespace Packages" for details.)
(upackages_checkeduKeyErroru	_build_pyu
check_packageudistributionunamespace_packagesu
startswithuopenuencodeureadu	distutilsuloguwarnuclose(uselfupackageupackage_diruinit_pyupkgufulog((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu
check_package�s(



ubuild_py.check_packagecCsi|_tj|�dS(N(upackages_checkedu	_build_pyuinitialize_options(uself((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyuinitialize_options�s	ubuild_py.initialize_optionscCsAtj||�}|jjdk	r=tjj|jj|�S|S(N(u	_build_pyuget_package_dirudistributionusrc_rootuNoneuosupathujoin(uselfupackageures((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyuget_package_dir�subuild_py.get_package_dircs�|jjdg�|jj|g�}g�x<|D]4}�jtj|tjj|t|����q5Wt	j
���i���fdd�|D�S(u6Filter filenames for package's data files in 'src_dir'ucs@g|]6}|�kr|�kr�j|d�r|�qS(i(u
setdefault(u.0uf(ubaduseen(u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu
<listcomp>�s	u/build_py.exclude_data_files.<locals>.<listcomp>(uexclude_package_dataugetuextendufnmatchufilteruosupathujoinuconvert_pathudictufromkeys(uselfupackageusrc_dirufilesuglobsupattern((ubaduseenu4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyuexclude_data_files�s
&ubuild_py.exclude_data_filesN(u__name__u
__module__u__qualname__u__doc__ufinalize_optionsurunu__getattr__ubuild_moduleu_get_data_filesufind_data_filesubuild_package_datauanalyze_manifestuget_data_filesusysuversionuget_outputsu
check_packageuinitialize_optionsuget_package_diruexclude_data_files(u
__locals__((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyubuild_pys 
ubuild_pycCsOtjj|�s|Sddlm}tjd�j�|}||��dS(Ni(uDistutilsSetupErroru�
        Error: setup script specifies an absolute path:

            %s

        setup() arguments must *always* be /-separated paths relative to the
        setup.py directory, *never* absolute paths.
        (uosupathuisabsudistutils.errorsuDistutilsSetupErrorutextwrapudedentulstrip(upathuDistutilsSetupErrorumsg((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyuassert_relative�suassert_relative(uosusysufnmatchutextwrapudistutils.command.build_pyubuild_pyu	_build_pyudistutils.utiluconvert_pathuglobusetuptools.lib2to3_exu	Mixin2to3uImportErroruassert_relative(((u4/tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu<module>s
�python3.3/site-packages/setuptools/command/__pycache__/install.cpython-33.pyc000064400000011005151733566760023211 0ustar00�
�Re�c@s~ddlZddlZddlZddlmZddlmZGdd�de�Zdd�ejD�ej	e_dS(iN(uinstall(uDistutilsArgErrorcBs�|EeZdZdZejddgZejddgZddd�fd	d
d�fgZe	e�Z
dd�Zd
d�Zdd�Z
dd�Zdd�ZdS(uinstallu7Use easy_install to install the package, w/dependenciesuold-and-unmanageableuTry not to use this!u!single-version-externally-managedu5used by system package builders to create 'flat' eggsuinstall_egg_infocCsdS(NT(uTrue(uself((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyu<lambda>suinstall.<lambda>uinstall_scriptscCsdS(NT(uTrue(uself((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyu<lambda>scCs,tj|�d|_d|_d|_dS(N(u_installuinitialize_optionsuNoneuold_and_unmanageableu!single_version_externally_managedu
no_compile(uself((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyuinitialize_optionss
		uinstall.initialize_optionscCsUtj|�|jr"d|_n/|jrQ|jrQ|jrQtd��qQndS(NuAYou must specify --record or --root when building system packagesT(u_installufinalize_optionsurootuTrueu!single_version_externally_managedurecorduDistutilsArgError(uself((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyufinalize_optionss
		uinstall.finalize_optionscCs5|js|jrtj|�Sd|_d|_dS(Nu(urootu!single_version_externally_managedu_installuhandle_extra_pathuNoneu	path_fileu
extra_dirs(uself((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyuhandle_extra_path's
	uinstall.handle_extra_pathcCs�|js|jrtj|�Stjd�}|jjdd�}|jj	}|dksg|dkrwtj|�n
|j
�dS(Niu__name__uudistutils.disturun_commands(uold_and_unmanageableu!single_version_externally_managedu_installurunusysu	_getframeu	f_globalsugetuf_codeuco_nameudo_egg_install(uselfucalleru
caller_moduleucaller_name((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyurun2s
uinstall.runcCs�|jjd�}||jddd|jd|j�}|j�d|_|jjtjd��|j	d�|jj
d�jg}tj
r�|jd	tj
�n||_|j�dt_
dS(
Nueasy_installuargsuxurooturecordu.u*.eggu	bdist_eggi(udistributionuget_command_classurooturecorduensure_finalizedualways_copy_fromu
package_indexuscanugloburun_commanduget_command_obju
egg_outputu
setuptoolsubootstrap_install_fromuinsertuargsurunuNone(uselfueasy_installucmduargs((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyudo_egg_installPs$
	
		
uinstall.do_egg_installN(uold-and-unmanageableNuTry not to use this!(u!single-version-externally-managedNu5used by system package builders to create 'flat' eggs(u__name__u
__module__u__qualname__u__doc__u_installuuser_optionsuNoneuboolean_optionsunew_commandsudictu_ncuinitialize_optionsufinalize_optionsuhandle_extra_pathurunudo_egg_install(u
__locals__((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyuinstalls

uinstallcCs)g|]}|dtjkr|�qS(i(uinstallu_nc(u.0ucmd((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyu
<listcomp>js	u
<listcomp>(
u
setuptoolsusysuglobudistutils.command.installuinstallu_installudistutils.errorsuDistutilsArgErrorusub_commandsunew_commands(((u3/tmp/pip-k8wh6o-build/setuptools/command/install.pyu<module>s
$epython3.3/site-packages/setuptools/command/__pycache__/setopt.cpython-33.pyc000064400000015320151733566760023065 0ustar00�
�Re�c@s�ddlZddlZddlmZddlmZddlmZddlTdddd	gZd
dd�Z	ddd�ZGd
d�de�ZGdd	�d	e�Z
dS(iN(uCommand(uconvert_path(ulog(u*uconfig_fileuedit_configuoption_baseusetoptulocalcCs�|dkrdS|dkr>tjjtjjtj�d�S|dkrtjdkr_dpbd}tjjtd	|��St	d
|��dS(u�Get the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    ulocalu	setup.cfguglobalu
distutils.cfguuseruposixu.uu~/%spydistutils.cfgu7config_file() type must be 'local', 'global', or 'user'N(
uosupathujoinudirnameu	distutilsu__file__unameu
expanduseruconvert_pathu
ValueError(ukindudot((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyuconfig_file
s	c
Cs�ddlm}tjd|�|j�}|j|g�x+|j�D]\}}|dkr�tjd||�|j	|�qI|j
|�s�tjd||�|j|�nx�|j�D]�\}}|dkr6tjd|||�|j||�|j
|�sbtjd||�|j	|�qbq�tjd||||�|j|||�q�WqIWtjd	|�|s�t|d
�}	|j|	�|	j�ndS(uYEdit a configuration file to include `settings`

    `settings` is a dictionary of dictionaries or ``None`` values, keyed by
    command/section name.  A ``None`` value means to delete the entire section,
    while a dictionary lists settings to be changed or deleted in that section.
    A setting of ``None`` means to delete that setting.
    i(uConfigParseruReading configuration from %suDeleting section [%s] from %suAdding new section [%s] to %suDeleting %s.%s from %su#Deleting empty [%s] section from %suSetting %s.%s to %r in %su
Writing %suwN(usetuptools.compatuConfigParserulogudebuguRawConfigParserureaduitemsuNoneuinfouremove_sectionuhas_sectionuadd_sectionu
remove_optionuoptionsusetuopenuwriteuclose(
ufilenameusettingsudry_runuConfigParseruoptsusectionuoptionsuoptionuvalueuf((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyuedit_config*s:	
	

cBsM|EeZdZdZdddgZddgZdd�Zd
d�ZdS(uoption_baseu<Abstract base class for commands that mess with config filesu
global-configugu0save options to the site-wide distutils.cfg fileuuser-configuuu7save options to the current user's pydistutils.cfg fileu	filename=ufu-configuration file to use (default=setup.cfg)cCsd|_d|_d|_dS(N(uNoneu
global_configuuser_configufilename(uself((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyuinitialize_optionscs		uoption_base.initialize_optionscCs�g}|jr%|jtd��n|jrD|jtd��n|jdk	rf|j|j�n|s�|jtd��nt|�dkr�td|��n|\|_dS(Nuglobaluuserulocaliu/Must specify only one configuration file option(u
global_configuappenduconfig_fileuuser_configufilenameuNoneulenuDistutilsOptionError(uselfu	filenames((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyufinalize_optionshs		uoption_base.finalize_optionsN(u
global-configugu0save options to the site-wide distutils.cfg file(uuser-configuuu7save options to the current user's pydistutils.cfg file(u	filename=ufu-configuration file to use (default=setup.cfg)(u__name__u
__module__u__qualname__u__doc__uuser_optionsuboolean_optionsuinitialize_optionsufinalize_options(u
__locals__((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyuoption_baseSs	cBsm|EeZdZdZdZddddgejZejdgZdd�Zdd�Z	dd�Z
dS(usetoptu#Save command-line options to a fileu1set an option in setup.cfg or another config fileucommand=ucucommand to set an option foruoption=uou
option to setu
set-value=usuvalue of the optionuremoveururemove (unset) the valuecCs5tj|�d|_d|_d|_d|_dS(N(uoption_baseuinitialize_optionsuNoneucommanduoptionu	set_valueuremove(uself((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyuinitialize_options�s

			usetopt.initialize_optionscCsftj|�|jdks+|jdkr:td��n|jdkrb|jrbtd��ndS(Nu%Must specify --command *and* --optionu$Must specify --set-value or --remove(uoption_baseufinalize_optionsucommanduNoneuoptionuDistutilsOptionErroru	set_valueuremove(uself((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyufinalize_options�s

usetopt.finalize_optionscCs=t|jii|j|jjdd�6|j6|j�dS(Nu-u_(uedit_configufilenameu	set_valueuoptionureplaceucommandudry_run(uself((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyurun�s	#u
setopt.runN(ucommand=ucucommand to set an option for(uoption=uou
option to set(u
set-value=usuvalue of the option(uremoveururemove (unset) the value(u__name__u
__module__u__qualname__u__doc__udescriptionuoption_baseuuser_optionsuboolean_optionsuinitialize_optionsufinalize_optionsurun(u
__locals__((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyusetopt|s
F(u	distutilsuosu
setuptoolsuCommandudistutils.utiluconvert_pathulogudistutils.errorsu__all__uconfig_fileuFalseuedit_configuoption_baseusetopt(((u2/tmp/pip-k8wh6o-build/setuptools/command/setopt.pyu<module>s
 ))python3.3/site-packages/setuptools/command/__pycache__/build_ext.cpython-33.pyc000064400000031404151733566760023527 0ustar00�
�ReN.c%@sddlmZyddlmZWnek
r>eZYnXddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZyddlmZWn?ek
r�ddlmZed	�[dd
lmZYnXddlmZddlTdZdZd
Zejdkr1dZnGejdkrxy ddlmZdZdZWqxek
rtYqxXndd�Z Gdd�de�Zes�ejdkr�dddddddddddd�
Z"n0dZdddddddddddd�
Z"dS(i(u	build_extN(u	copy_file(uLibrary(unew_compiler(ucustomize_compiler(u_CONFIG_VARS(uget_config_varuLDSHARED(u_config_vars(ulog(u*usharedudarwinunt(uRTLD_NOWcCstr
|SdS(Nu(u	have_rtld(us((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyuif_dl&suif_dlcBs�|EeZdZdd�Zdd�Zeek	rSeed�rSdd�Zndd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�Zdd�Zddd�ZdS(u	build_extcCs@|jd}|_tj|�||_|r<|j�ndS(u;Build extensions in build directory, then copy if --inplaceiN(uinplaceu
_build_exturunucopy_extensions_to_source(uselfuold_inplace((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyurun1s

	u
build_ext.runc
Cs�|jd�}x�|jD]�}|j|j�}|j|�}|jd�}dj|dd��}|j|�}tj	j|tj	j
|��}tj	j|j|�}	t|	|d|j
d|j�|jr|j|p�tj|d�qqWdS(Nubuild_pyu.iuverboseudry_runi����T(uget_finalized_commandu
extensionsuget_ext_fullnameunameuget_ext_filenameusplitujoinuget_package_diruosupathubasenameu	build_libu	copy_fileuverboseudry_runu_needs_stubu
write_stubucurdiruTrue(
uselfubuild_pyuextufullnameufilenameumodpathupackageupackage_diru
dest_filenameusrc_filename((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyucopy_extensions_to_source9s!
	u#build_ext.copy_extensions_to_sourceu
pyrex_sourcescGs+tj||�p|}tj|||�S(N(u
_build_extuswig_sourcesu
_du_build_ext(uselfusourcesu	otherargs((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyuswig_sourcesQsubuild_ext.swig_sourcescCs�tj||�}||jkr�|j|}t|t�rhtjj|�\}}|jj	|t
�Str�|jr�tjj
|�\}}tjj|d|�Sn|S(Nudl-(u
_build_extuget_ext_filenameuext_mapu
isinstanceuLibraryuosupathusplitextushlib_compilerulibrary_filenameulibtypeu	use_stubsu_links_to_dynamicusplitujoin(uselfufullnameufilenameuextufnud((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyuget_ext_filenameYs
ubuild_ext.get_ext_filenamecCs,tj|�d|_g|_i|_dS(N(u
_build_extuinitialize_optionsuNoneushlib_compilerushlibsuext_map(uself((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyuinitialize_optionses
		ubuild_ext.initialize_optionscCs�tj|�|jpg|_|j|j�dd�|jD�|_|jr^|j�nx&|jD]}|j|j�|_qhWx|jD]}|j}||j	|<||j	|j
d�d<|jr�|j|�p�d}|_
|otot|t�|_|j|�}|_tjjtjj|j|��}|rm||jkrm|jj|�n|r�tr�tj|jkr�|jjtj�q�q�WdS(NcSs%g|]}t|t�r|�qS((u
isinstanceuLibrary(u.0uext((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyu
<listcomp>os	u.build_ext.finalize_options.<locals>.<listcomp>u.ii����F(u
_build_extufinalize_optionsu
extensionsucheck_extensions_listushlibsusetup_shlib_compileruget_ext_fullnameunameu
_full_nameuext_mapusplitulinks_to_dynamicuFalseu_links_to_dynamicu	use_stubsu
isinstanceuLibraryu_needs_stubuget_ext_filenameu
_file_nameuosupathudirnameujoinu	build_libulibrary_dirsuappenducurdiruruntime_library_dirs(uselfuextufullnameultdufilenameulibdir((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyufinalize_optionsks(
	
	
%$ubuild_ext.finalize_optionscCs�td|jd|jd|j�}|_tjdkr�tj�}z,dtd<dtd<d	td
<t	|�Wdtj
�tj|�Xn
t	|�|jdk	r�|j|j�n|jdk	r�x*|jD]\}}|j||�q�Wn|jdk	r+x!|jD]}|j|�qWn|jdk	rM|j|j�n|jdk	ro|j|j�n|jdk	r�|j|j�n|jdk	r�|j|j�ntj|�|_dS(Nucompilerudry_runuforceudarwinu0gcc -Wl,-x -dynamiclib -undefined dynamic_lookupuLDSHAREDu -dynamiclibuCCSHAREDu.dylibuSO(unew_compilerucompilerudry_runuforceushlib_compilerusysuplatformu_CONFIG_VARSucopyucustomize_compileruclearuupdateuinclude_dirsuNoneuset_include_dirsudefineudefine_macrouundefuundefine_macrou	librariesu
set_librariesulibrary_dirsuset_library_dirsurpathuset_runtime_library_dirsulink_objectsuset_link_objectsulink_shared_objectu__get__(uselfucompilerutmpunameuvalueumacro((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyusetup_shlib_compiler�s:%




ubuild_ext.setup_shlib_compilercCs&t|t�r|jStj||�S(N(u
isinstanceuLibraryuexport_symbolsu
_build_extuget_export_symbols(uselfuext((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyuget_export_symbols�subuild_ext.get_export_symbolscCst|j}zZt|t�r*|j|_ntj||�|jrb|j|jd�j	|�nWd||_XdS(Nubuild_py(
ucompileru
isinstanceuLibraryushlib_compileru
_build_extubuild_extensionu_needs_stubu
write_stubuget_finalized_commandu	build_lib(uselfuextu	_compiler((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyubuild_extension�s		ubuild_ext.build_extensioncCswtjdd�|jD��}dj|jjd�dd�dg�}x%|jD]}|||krUdSqUWd	S(
u?Return true if 'ext' links to a dynamic lib in the same packagecSsg|]}|j�qS((u
_full_name(u.0ulib((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyu
<listcomp>�s	u.build_ext.links_to_dynamic.<locals>.<listcomp>u.Niui����TF(	udictufromkeysushlibsujoinu
_full_nameusplitu	librariesuTrueuFalse(uselfuextulibnamesupkgulibname((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyulinks_to_dynamic�s,ubuild_ext.links_to_dynamiccCs�tj|�}|jd�j}x}|jD]r}|jr+tjj|j	|j
jd��}|j|d�|j|d�|r�|j|d�q�q+q+W|S(Nubuild_pyu.u.pyu.pycu.pyo(
u
_build_extuget_outputsuget_finalized_commanduoptimizeu
extensionsu_needs_stubuosupathujoinu	build_libu
_full_nameusplituappend(uselfuoutputsuoptimizeuextubase((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyuget_outputs�s	$ubuild_ext.get_outputscCs�tjd|j|�tjj||jjd��d}|rftjj|�rft|d��n|j	st
|d�}|jdjddd	td
�dtjj
|j�dd
dtd�dddtd�ddtd�dddg��|j�n|r�ddlm}||gdddd d|j	�|jd�j}|dkr�||gd|dd d|j	�ntjj|�r�|j	r�tj|�q�ndS(!Nu writing stub loader for %s to %su.u.pyu already exists! Please delete.uwu
udef __bootstrap__():u-   global __bootstrap__, __file__, __loader__u%   import sys, os, pkg_resources, impu, dlu:   __file__ = pkg_resources.resource_filename(__name__,%r)u   del __bootstrap__u    if '__loader__' in globals():u       del __loader__u#   old_flags = sys.getdlopenflags()u   old_dir = os.getcwd()u   try:u(     os.chdir(os.path.dirname(__file__))u$     sys.setdlopenflags(dl.RTLD_NOW)u(     imp.load_dynamic(__name__,__file__)u   finally:u"     sys.setdlopenflags(old_flags)u     os.chdir(old_dir)u__bootstrap__()ui(ubyte_compileuoptimizeuforceudry_runuinstall_libT(uloguinfou
_full_nameuosupathujoinusplituexistsuDistutilsErrorudry_runuopenuwriteuif_dlubasenameu
_file_nameucloseudistutils.utilubyte_compileuTrueuget_finalized_commanduoptimizeuunlink(uselfu
output_diruextucompileu	stub_fileufubyte_compileuoptimize((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyu
write_stub�sJ%	
			

ubuild_ext.write_stubNF(u__name__u
__module__u__qualname__urunucopy_extensions_to_sourceu
_build_extu
_du_build_extuhasattruswig_sourcesuget_ext_filenameuinitialize_optionsufinalize_optionsusetup_shlib_compileruget_export_symbolsubuild_extensionulinks_to_dynamicuget_outputsuFalseu
write_stub(u
__locals__((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyu	build_ext0s)
u	build_extc

Cs8|j|j|||||||||	|
||�
dS(N(ulinkuSHARED_LIBRARY(
uselfuobjectsuoutput_libnameu
output_diru	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsudebugu
extra_preargsuextra_postargsu
build_temputarget_lang((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyulink_shared_objects
ulink_shared_objectustaticc
Cs�|dkst�tjj|�\}}
tjj|
�\}}|jd�jd�rm|dd�}n|j|||||�dS(Nuxulibi(	uNoneuAssertionErroruosupathusplitusplitextulibrary_filenameu
startswithucreate_static_lib(uselfuobjectsuoutput_libnameu
output_diru	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsudebugu
extra_preargsuextra_postargsu
build_temputarget_langufilenameubasenameuext((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyulink_shared_objectsFT(#udistutils.command.build_extu	build_extu
_du_build_extuPyrex.Distutils.build_extu
_build_extuImportErroruosusysudistutils.file_utilu	copy_fileusetuptools.extensionuLibraryudistutils.ccompilerunew_compilerudistutils.sysconfigucustomize_compileru	sysconfigu_CONFIG_VARSuget_config_varu_config_varsu	distutilsulogudistutils.errorsuFalseu	have_rtldu	use_stubsulibtypeuplatformuTrueunameudluRTLD_NOWuif_dluNoneulink_shared_object(((u5/tmp/pip-k8wh6o-build/setuptools/command/build_ext.pyu<module>sT



	


�					python3.3/site-packages/setuptools/command/__pycache__/rotate.cpython-33.pyc000064400000007076151733566760023056 0ustar00�
�Rec@s|ddlZddlZddlmZddlmZddlmZddlmZddl	TGdd�de�Z
dS(	iN(uCommand(u
basestring(uconvert_path(ulog(u*cBsY|EeZdZdZdZdddgZgZdd
�Zdd�Zdd�Z	dS(urotateuDelete older distributionsu2delete older distributions, keeping N newest filesumatch=umupatterns to match (required)u	dist-dir=udu%directory where the distributions areukeep=uku(number of matching distributions to keepcCsd|_d|_d|_dS(N(uNoneumatchudist_dirukeep(uself((u2/tmp/pip-k8wh6o-build/setuptools/command/rotate.pyuinitialize_optionss		urotate.initialize_optionscCs�|jdkrtd��n|jdkr<td��nyt|j�|_Wntk
rrtd��YnXt|jt�r�dd�|jjd�D�|_n|j	dd	�dS(
NuQMust specify one or more (comma-separated) match patterns (e.g. '.zip' or '.egg')u$Must specify number of files to keepu--keep must be an integercSs"g|]}t|j���qS((uconvert_pathustrip(u.0up((u2/tmp/pip-k8wh6o-build/setuptools/command/rotate.pyu
<listcomp>'s	u+rotate.finalize_options.<locals>.<listcomp>u,ubdistudist_dir(udist_dirudist_dir(
umatchuNoneuDistutilsOptionErrorukeepuintu
ValueErroru
isinstanceu
basestringusplituset_undefined_options(uself((u2/tmp/pip-k8wh6o-build/setuptools/command/rotate.pyufinalize_optionss
%urotate.finalize_optionscCs�|jd�ddlm}x�|jD]�}|jj�d|}|tjj|j|��}dd�|D�}|j	�|j
�tjdt
|�|�||jd�}x=|D]5\}}tjd|�|js�tj|�q�q�Wq'WdS(	Nuegg_infoi(uglobu*cSs(g|]}tjj|�|f�qS((uosupathugetmtime(u.0uf((u2/tmp/pip-k8wh6o-build/setuptools/command/rotate.pyu
<listcomp>1s	urotate.run.<locals>.<listcomp>u%d file(s) matching %suDeleting %s(urun_commanduglobumatchudistributionuget_nameuosupathujoinudist_dirusortureverseuloguinfoulenukeepudry_runuunlink(uselfuglobupatternufilesutuf((u2/tmp/pip-k8wh6o-build/setuptools/command/rotate.pyurun+s


	u
rotate.runN(umatch=umupatterns to match (required)(u	dist-dir=udu%directory where the distributions are(ukeep=uku(number of matching distributions to keep(
u__name__u
__module__u__qualname__u__doc__udescriptionuuser_optionsuboolean_optionsuinitialize_optionsufinalize_optionsurun(u
__locals__((u2/tmp/pip-k8wh6o-build/setuptools/command/rotate.pyurotates	urotate(u	distutilsuosu
setuptoolsuCommandusetuptools.compatu
basestringudistutils.utiluconvert_pathulogudistutils.errorsurotate(((u2/tmp/pip-k8wh6o-build/setuptools/command/rotate.pyu<module>s
python3.3/site-packages/setuptools/command/bdist_rpm.py000064400000003751151733566760017256 0ustar00# This is just a kludge so that bdist_rpm doesn't guess wrong about the
# distribution name and version, if the egg_info command is going to alter
# them, another kludge to allow you to build old-style non-egg RPMs, and
# finally, a kludge to track .rpm files for uploading when run on Python <2.5.

from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm
import sys, os

class bdist_rpm(_bdist_rpm):

    def initialize_options(self):
        _bdist_rpm.initialize_options(self)
        self.no_egg = None

    if sys.version<"2.5":
        # Track for uploading any .rpm file(s) moved to self.dist_dir
        def move_file(self, src, dst, level=1):
            _bdist_rpm.move_file(self, src, dst, level)
            if dst==self.dist_dir and src.endswith('.rpm'):
                getattr(self.distribution,'dist_files',[]).append(
                    ('bdist_rpm',
                    src.endswith('.src.rpm') and 'any' or sys.version[:3],
                     os.path.join(dst, os.path.basename(src)))
                )

    def run(self):
        self.run_command('egg_info')    # ensure distro name is up-to-date
        _bdist_rpm.run(self)













    def _make_spec_file(self):
        version = self.distribution.get_version()
        rpmversion = version.replace('-','_')
        spec = _bdist_rpm._make_spec_file(self)
        line23 = '%define version '+version
        line24 = '%define version '+rpmversion
        spec  = [
            line.replace(
                "Source0: %{name}-%{version}.tar",
                "Source0: %{name}-%{unmangled_version}.tar"
            ).replace(
                "setup.py install ",
                "setup.py install --single-version-externally-managed "
            ).replace(
                "%setup",
                "%setup -n %{name}-%{unmangled_version}"
            ).replace(line23,line24)
            for line in spec
        ]
        spec.insert(spec.index(line24)+1, "%define unmangled_version "+version)
        return spec




















python3.3/site-packages/setuptools/command/test.py000064400000013454151733566760016253 0ustar00from setuptools import Command
from distutils.errors import DistutilsOptionError
import sys
from pkg_resources import *
from pkg_resources import _namespace_packages
from unittest import TestLoader, main

class ScanningLoader(TestLoader):

    def loadTestsFromModule(self, module):
        """Return a suite of all tests cases contained in the given module

        If the module is a package, load tests from all the modules in it.
        If the module has an ``additional_tests`` function, call it and add
        the return value to the tests.
        """
        tests = []
        if module.__name__!='setuptools.tests.doctest':  # ugh
            tests.append(TestLoader.loadTestsFromModule(self,module))

        if hasattr(module, "additional_tests"):
            tests.append(module.additional_tests())

        if hasattr(module, '__path__'):
            for file in resource_listdir(module.__name__, ''):
                if file.endswith('.py') and file!='__init__.py':
                    submodule = module.__name__+'.'+file[:-3]
                else:
                    if resource_exists(
                        module.__name__, file+'/__init__.py'
                    ):
                        submodule = module.__name__+'.'+file
                    else:
                        continue
                tests.append(self.loadTestsFromName(submodule))

        if len(tests)!=1:
            return self.suiteClass(tests)
        else:
            return tests[0] # don't create a nested suite for only one return


class test(Command):

    """Command to run unit tests after in-place build"""

    description = "run unit tests after in-place build"

    user_options = [
        ('test-module=','m', "Run 'test_suite' in specified module"),
        ('test-suite=','s',
            "Test suite to run (e.g. 'some_module.test_suite')"),
    ]

    def initialize_options(self):
        self.test_suite = None
        self.test_module = None
        self.test_loader = None


    def finalize_options(self):

        if self.test_suite is None:
            if self.test_module is None:
                self.test_suite = self.distribution.test_suite
            else:
                self.test_suite = self.test_module+".test_suite"
        elif self.test_module:
            raise DistutilsOptionError(
                "You may specify a module or a suite, but not both"
            )

        self.test_args = [self.test_suite]

        if self.verbose:
            self.test_args.insert(0,'--verbose')
        if self.test_loader is None:
            self.test_loader = getattr(self.distribution,'test_loader',None)
        if self.test_loader is None:
            self.test_loader = "setuptools.command.test:ScanningLoader"



    def with_project_on_sys_path(self, func):
        if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False):
            # If we run 2to3 we can not do this inplace:

            # Ensure metadata is up-to-date
            self.reinitialize_command('build_py', inplace=0)
            self.run_command('build_py')
            bpy_cmd = self.get_finalized_command("build_py")
            build_path = normalize_path(bpy_cmd.build_lib)

            # Build extensions
            self.reinitialize_command('egg_info', egg_base=build_path)
            self.run_command('egg_info')

            self.reinitialize_command('build_ext', inplace=0)
            self.run_command('build_ext')
        else:
            # Without 2to3 inplace works fine:
            self.run_command('egg_info')

            # Build extensions in-place
            self.reinitialize_command('build_ext', inplace=1)
            self.run_command('build_ext')

        ei_cmd = self.get_finalized_command("egg_info")

        old_path = sys.path[:]
        old_modules = sys.modules.copy()

        try:
            sys.path.insert(0, normalize_path(ei_cmd.egg_base))
            working_set.__init__()
            add_activation_listener(lambda dist: dist.activate())
            require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version))
            func()
        finally:
            sys.path[:] = old_path
            sys.modules.clear()
            sys.modules.update(old_modules)
            working_set.__init__()


    def run(self):
        if self.distribution.install_requires:
            self.distribution.fetch_build_eggs(self.distribution.install_requires)
        if self.distribution.tests_require:
            self.distribution.fetch_build_eggs(self.distribution.tests_require)

        if self.test_suite:
            cmd = ' '.join(self.test_args)
            if self.dry_run:
                self.announce('skipping "unittest %s" (dry run)' % cmd)
            else:
                self.announce('running "unittest %s"' % cmd)
                self.with_project_on_sys_path(self.run_tests)


    def run_tests(self):
        import unittest

        # Purge modules under test from sys.modules. The test loader will
        # re-import them from the build location. Required when 2to3 is used
        # with namespace packages.
        if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False):
            module = self.test_args[-1].split('.')[0]
            if module in _namespace_packages:
                del_modules = []
                if module in sys.modules:
                    del_modules.append(module)
                module += '.'
                for name in sys.modules:
                    if name.startswith(module):
                        del_modules.append(name)
                list(map(sys.modules.__delitem__, del_modules))

        loader_ep = EntryPoint.parse("x="+self.test_loader)
        loader_class = loader_ep.load(require=False)
        cks = loader_class()
        unittest.main(
            None, None, [unittest.__file__]+self.test_args,
            testLoader = cks
        )

































python3.3/site-packages/setuptools/command/easy_install.py000075500000216014151733566760017763 0ustar00#!/opt/alt/python33/bin/python3

"""
Easy Install
------------

A tool for doing automatic download/extract/build of distutils-based Python
packages.  For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.

__ https://pythonhosted.org/setuptools/easy_install.html

"""

import sys
import os
import zipimport
import shutil
import tempfile
import zipfile
import re
import stat
import random
import platform
import textwrap
import warnings
import site
import struct
from glob import glob
from distutils import log, dir_util

import pkg_resources
from setuptools import Command, _dont_write_bytecode
from setuptools.sandbox import run_setup
from setuptools.py31compat import get_path, get_config_vars

from distutils.util import get_platform
from distutils.util import convert_path, subst_vars
from distutils.errors import DistutilsArgError, DistutilsOptionError, \
    DistutilsError, DistutilsPlatformError
from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS
from setuptools.command import setopt
from setuptools.archive_util import unpack_archive
from setuptools.package_index import PackageIndex
from setuptools.package_index import URL_SCHEME
from setuptools.command import bdist_egg, egg_info
from setuptools.compat import (iteritems, maxsize, basestring, unicode,
                               reraise)
from pkg_resources import (
    yield_lines, normalize_path, resource_string, ensure_directory,
    get_distribution, find_distributions, Environment, Requirement,
    Distribution, PathMetadata, EggMetadata, WorkingSet, DistributionNotFound,
    VersionConflict, DEVELOP_DIST,
)

sys_executable = os.environ.get('__VENV_LAUNCHER__',
    os.path.normpath(sys.executable))

__all__ = [
    'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg',
    'main', 'get_exe_prefixes',
]

def is_64bit():
    return struct.calcsize("P") == 8

def samefile(p1, p2):
    both_exist = os.path.exists(p1) and os.path.exists(p2)
    use_samefile = hasattr(os.path, 'samefile') and both_exist
    if use_samefile:
        return os.path.samefile(p1, p2)
    norm_p1 = os.path.normpath(os.path.normcase(p1))
    norm_p2 = os.path.normpath(os.path.normcase(p2))
    return norm_p1 == norm_p2

if sys.version_info <= (3,):
    def _to_ascii(s):
        return s
    def isascii(s):
        try:
            unicode(s, 'ascii')
            return True
        except UnicodeError:
            return False
else:
    def _to_ascii(s):
        return s.encode('ascii')
    def isascii(s):
        try:
            s.encode('ascii')
            return True
        except UnicodeError:
            return False

class easy_install(Command):
    """Manage a download/build/install process"""
    description = "Find/get/install Python packages"
    command_consumes_arguments = True

    user_options = [
        ('prefix=', None, "installation prefix"),
        ("zip-ok", "z", "install package as a zipfile"),
        ("multi-version", "m", "make apps have to require() a version"),
        ("upgrade", "U", "force upgrade (searches PyPI for latest versions)"),
        ("install-dir=", "d", "install package to DIR"),
        ("script-dir=", "s", "install scripts to DIR"),
        ("exclude-scripts", "x", "Don't install scripts"),
        ("always-copy", "a", "Copy all needed packages to install dir"),
        ("index-url=", "i", "base URL of Python Package Index"),
        ("find-links=", "f", "additional URL(s) to search for packages"),
        ("build-directory=", "b",
            "download/extract/build in DIR; keep the results"),
        ('optimize=', 'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
        ('record=', None,
            "filename in which to record list of installed files"),
        ('always-unzip', 'Z', "don't install as a zipfile, no matter what"),
        ('site-dirs=','S',"list of directories where .pth files work"),
        ('editable', 'e', "Install specified packages in editable form"),
        ('no-deps', 'N', "don't install dependencies"),
        ('allow-hosts=', 'H', "pattern(s) that hostnames must match"),
        ('local-snapshots-ok', 'l',
            "allow building eggs from local checkouts"),
        ('version', None, "print version information and exit"),
        ('no-find-links', None,
            "Don't load find-links defined in packages being installed")
    ]
    boolean_options = [
        'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy',
        'editable',
        'no-deps', 'local-snapshots-ok', 'version'
    ]

    if site.ENABLE_USER_SITE:
        help_msg = "install in user site-package '%s'" % site.USER_SITE
        user_options.append(('user', None, help_msg))
        boolean_options.append('user')

    negative_opt = {'always-unzip': 'zip-ok'}
    create_index = PackageIndex

    def initialize_options(self):
        if site.ENABLE_USER_SITE:
            whereami = os.path.abspath(__file__)
            self.user = whereami.startswith(site.USER_SITE)
        else:
            self.user = 0

        self.zip_ok = self.local_snapshots_ok = None
        self.install_dir = self.script_dir = self.exclude_scripts = None
        self.index_url = None
        self.find_links = None
        self.build_directory = None
        self.args = None
        self.optimize = self.record = None
        self.upgrade = self.always_copy = self.multi_version = None
        self.editable = self.no_deps = self.allow_hosts = None
        self.root = self.prefix = self.no_report = None
        self.version = None
        self.install_purelib = None     # for pure module distributions
        self.install_platlib = None     # non-pure (dists w/ extensions)
        self.install_headers = None     # for C/C++ headers
        self.install_lib = None         # set to either purelib or platlib
        self.install_scripts = None
        self.install_data = None
        self.install_base = None
        self.install_platbase = None
        if site.ENABLE_USER_SITE:
            self.install_userbase = site.USER_BASE
            self.install_usersite = site.USER_SITE
        else:
            self.install_userbase = None
            self.install_usersite = None
        self.no_find_links = None

        # Options not specifiable via command line
        self.package_index = None
        self.pth_file = self.always_copy_from = None
        self.site_dirs = None
        self.installed_projects = {}
        self.sitepy_installed = False
        # Always read easy_install options, even if we are subclassed, or have
        # an independent instance created.  This ensures that defaults will
        # always come from the standard configuration file(s)' "easy_install"
        # section, even if this is a "develop" or "install" command, or some
        # other embedding.
        self._dry_run = None
        self.verbose = self.distribution.verbose
        self.distribution._set_command_options(
            self, self.distribution.get_option_dict('easy_install')
        )

    def delete_blockers(self, blockers):
        for filename in blockers:
            if os.path.exists(filename) or os.path.islink(filename):
                log.info("Deleting %s", filename)
                if not self.dry_run:
                    if os.path.isdir(filename) and not os.path.islink(filename):
                        rmtree(filename)
                    else:
                        os.unlink(filename)

    def finalize_options(self):
        if self.version:
            print('setuptools %s' % get_distribution('setuptools').version)
            sys.exit()

        py_version = sys.version.split()[0]
        prefix, exec_prefix = get_config_vars('prefix', 'exec_prefix')

        self.config_vars = {
            'dist_name': self.distribution.get_name(),
            'dist_version': self.distribution.get_version(),
            'dist_fullname': self.distribution.get_fullname(),
            'py_version': py_version,
            'py_version_short': py_version[0:3],
            'py_version_nodot': py_version[0] + py_version[2],
            'sys_prefix': prefix,
            'prefix': prefix,
            'sys_exec_prefix': exec_prefix,
            'exec_prefix': exec_prefix,
            # Only python 3.2+ has abiflags
            'abiflags': getattr(sys, 'abiflags', ''),
        }

        if site.ENABLE_USER_SITE:
            self.config_vars['userbase'] = self.install_userbase
            self.config_vars['usersite'] = self.install_usersite

        # fix the install_dir if "--user" was used
        #XXX: duplicate of the code in the setup command
        if self.user and site.ENABLE_USER_SITE:
            self.create_home_path()
            if self.install_userbase is None:
                raise DistutilsPlatformError(
                    "User base directory is not specified")
            self.install_base = self.install_platbase = self.install_userbase
            if os.name == 'posix':
                self.select_scheme("unix_user")
            else:
                self.select_scheme(os.name + "_user")

        self.expand_basedirs()
        self.expand_dirs()

        self._expand('install_dir','script_dir','build_directory','site_dirs')
        # If a non-default installation directory was specified, default the
        # script directory to match it.
        if self.script_dir is None:
            self.script_dir = self.install_dir

        if self.no_find_links is None:
            self.no_find_links = False

        # Let install_dir get set by install_lib command, which in turn
        # gets its info from the install command, and takes into account
        # --prefix and --home and all that other crud.
        self.set_undefined_options('install_lib',
            ('install_dir','install_dir')
        )
        # Likewise, set default script_dir from 'install_scripts.install_dir'
        self.set_undefined_options('install_scripts',
            ('install_dir', 'script_dir')
        )

        if self.user and self.install_purelib:
            self.install_dir = self.install_purelib
            self.script_dir = self.install_scripts
        # default --record from the install command
        self.set_undefined_options('install', ('record', 'record'))
        # Should this be moved to the if statement below? It's not used
        # elsewhere
        normpath = map(normalize_path, sys.path)
        self.all_site_dirs = get_site_dirs()
        if self.site_dirs is not None:
            site_dirs = [
                os.path.expanduser(s.strip()) for s in self.site_dirs.split(',')
            ]
            for d in site_dirs:
                if not os.path.isdir(d):
                    log.warn("%s (in --site-dirs) does not exist", d)
                elif normalize_path(d) not in normpath:
                    raise DistutilsOptionError(
                        d+" (in --site-dirs) is not on sys.path"
                    )
                else:
                    self.all_site_dirs.append(normalize_path(d))
        if not self.editable: self.check_site_dir()
        self.index_url = self.index_url or "https://pypi.python.org/simple"
        self.shadow_path = self.all_site_dirs[:]
        for path_item in self.install_dir, normalize_path(self.script_dir):
            if path_item not in self.shadow_path:
                self.shadow_path.insert(0, path_item)

        if self.allow_hosts is not None:
            hosts = [s.strip() for s in self.allow_hosts.split(',')]
        else:
            hosts = ['*']
        if self.package_index is None:
            self.package_index = self.create_index(
                self.index_url, search_path = self.shadow_path, hosts=hosts,
            )
        self.local_index = Environment(self.shadow_path+sys.path)

        if self.find_links is not None:
            if isinstance(self.find_links, basestring):
                self.find_links = self.find_links.split()
        else:
            self.find_links = []
        if self.local_snapshots_ok:
            self.package_index.scan_egg_links(self.shadow_path+sys.path)
        if not self.no_find_links:
            self.package_index.add_find_links(self.find_links)
        self.set_undefined_options('install_lib', ('optimize','optimize'))
        if not isinstance(self.optimize,int):
            try:
                self.optimize = int(self.optimize)
                if not (0 <= self.optimize <= 2): raise ValueError
            except ValueError:
                raise DistutilsOptionError("--optimize must be 0, 1, or 2")

        if self.editable and not self.build_directory:
            raise DistutilsArgError(
                "Must specify a build directory (-b) when using --editable"
            )
        if not self.args:
            raise DistutilsArgError(
                "No urls, filenames, or requirements specified (see --help)")

        self.outputs = []

    def _expand_attrs(self, attrs):
        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                if os.name == 'posix' or os.name == 'nt':
                    val = os.path.expanduser(val)
                val = subst_vars(val, self.config_vars)
                setattr(self, attr, val)

    def expand_basedirs(self):
        """Calls `os.path.expanduser` on install_base, install_platbase and
        root."""
        self._expand_attrs(['install_base', 'install_platbase', 'root'])

    def expand_dirs(self):
        """Calls `os.path.expanduser` on install dirs."""
        self._expand_attrs(['install_purelib', 'install_platlib',
                            'install_lib', 'install_headers',
                            'install_scripts', 'install_data',])

    def run(self):
        if self.verbose != self.distribution.verbose:
            log.set_verbosity(self.verbose)
        try:
            for spec in self.args:
                self.easy_install(spec, not self.no_deps)
            if self.record:
                outputs = self.outputs
                if self.root:               # strip any package prefix
                    root_len = len(self.root)
                    for counter in range(len(outputs)):
                        outputs[counter] = outputs[counter][root_len:]
                from distutils import file_util
                self.execute(
                    file_util.write_file, (self.record, outputs),
                    "writing list of installed files to '%s'" %
                    self.record
                )
            self.warn_deprecated_options()
        finally:
            log.set_verbosity(self.distribution.verbose)

    def pseudo_tempname(self):
        """Return a pseudo-tempname base in the install directory.
        This code is intentionally naive; if a malicious party can write to
        the target directory you're already in deep doodoo.
        """
        try:
            pid = os.getpid()
        except:
            pid = random.randint(0, maxsize)
        return os.path.join(self.install_dir, "test-easy-install-%s" % pid)

    def warn_deprecated_options(self):
        pass

    def check_site_dir(self):
        """Verify that self.install_dir is .pth-capable dir, if needed"""

        instdir = normalize_path(self.install_dir)
        pth_file = os.path.join(instdir,'easy-install.pth')

        # Is it a configured, PYTHONPATH, implicit, or explicit site dir?
        is_site_dir = instdir in self.all_site_dirs

        if not is_site_dir and not self.multi_version:
            # No?  Then directly test whether it does .pth file processing
            is_site_dir = self.check_pth_processing()
        else:
            # make sure we can write to target dir
            testfile = self.pseudo_tempname()+'.write-test'
            test_exists = os.path.exists(testfile)
            try:
                if test_exists: os.unlink(testfile)
                open(testfile,'w').close()
                os.unlink(testfile)
            except (OSError,IOError):
                self.cant_write_to_target()

        if not is_site_dir and not self.multi_version:
            # Can't install non-multi to non-site dir
            raise DistutilsError(self.no_default_version_msg())

        if is_site_dir:
            if self.pth_file is None:
                self.pth_file = PthDistributions(pth_file, self.all_site_dirs)
        else:
            self.pth_file = None

        PYTHONPATH = os.environ.get('PYTHONPATH','').split(os.pathsep)
        if instdir not in map(normalize_path, [_f for _f in PYTHONPATH if _f]):
            # only PYTHONPATH dirs need a site.py, so pretend it's there
            self.sitepy_installed = True
        elif self.multi_version and not os.path.exists(pth_file):
            self.sitepy_installed = True    # don't need site.py in this case
            self.pth_file = None            # and don't create a .pth file
        self.install_dir = instdir

    def cant_write_to_target(self):
        template = """can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    %s

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s
"""
        msg = template % (sys.exc_info()[1], self.install_dir,)

        if not os.path.exists(self.install_dir):
            msg += """
This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
"""
        else:
            msg += """
Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.
"""
        raise DistutilsError(msg)

    def check_pth_processing(self):
        """Empirically verify whether .pth files are supported in inst. dir"""
        instdir = self.install_dir
        log.info("Checking .pth file support in %s", instdir)
        pth_file = self.pseudo_tempname()+".pth"
        ok_file = pth_file+'.ok'
        ok_exists = os.path.exists(ok_file)
        try:
            if ok_exists: os.unlink(ok_file)
            dirname = os.path.dirname(ok_file)
            if not os.path.exists(dirname):
                os.makedirs(dirname)
            f = open(pth_file,'w')
        except (OSError,IOError):
            self.cant_write_to_target()
        else:
            try:
                f.write("import os; f = open(%r, 'w'); f.write('OK'); f.close()\n" % (ok_file,))
                f.close()
                f=None
                executable = sys.executable
                if os.name=='nt':
                    dirname,basename = os.path.split(executable)
                    alt = os.path.join(dirname,'pythonw.exe')
                    if basename.lower()=='python.exe' and os.path.exists(alt):
                        # use pythonw.exe to avoid opening a console window
                        executable = alt

                from distutils.spawn import spawn
                spawn([executable,'-E','-c','pass'],0)

                if os.path.exists(ok_file):
                    log.info(
                        "TEST PASSED: %s appears to support .pth files",
                        instdir
                    )
                    return True
            finally:
                if f:
                    f.close()
                if os.path.exists(ok_file):
                    os.unlink(ok_file)
                if os.path.exists(pth_file):
                    os.unlink(pth_file)
        if not self.multi_version:
            log.warn("TEST FAILED: %s does NOT support .pth files", instdir)
        return False

    def install_egg_scripts(self, dist):
        """Write all the scripts for `dist`, unless scripts are excluded"""
        if not self.exclude_scripts and dist.metadata_isdir('scripts'):
            for script_name in dist.metadata_listdir('scripts'):
                if dist.metadata_isdir('scripts/' + script_name):
                    # The "script" is a directory, likely a Python 3
                    # __pycache__ directory, so skip it.
                    continue
                self.install_script(
                    dist, script_name,
                    dist.get_metadata('scripts/'+script_name)
                )
        self.install_wrapper_scripts(dist)

    def add_output(self, path):
        if os.path.isdir(path):
            for base, dirs, files in os.walk(path):
                for filename in files:
                    self.outputs.append(os.path.join(base,filename))
        else:
            self.outputs.append(path)

    def not_editable(self, spec):
        if self.editable:
            raise DistutilsArgError(
                "Invalid argument %r: you can't use filenames or URLs "
                "with --editable (except via the --find-links option)."
                % (spec,)
            )

    def check_editable(self,spec):
        if not self.editable:
            return

        if os.path.exists(os.path.join(self.build_directory, spec.key)):
            raise DistutilsArgError(
                "%r already exists in %s; can't do a checkout there" %
                (spec.key, self.build_directory)
            )

    def easy_install(self, spec, deps=False):
        tmpdir = tempfile.mkdtemp(prefix="easy_install-")
        download = None
        if not self.editable: self.install_site_py()

        try:
            if not isinstance(spec,Requirement):
                if URL_SCHEME(spec):
                    # It's a url, download it to tmpdir and process
                    self.not_editable(spec)
                    download = self.package_index.download(spec, tmpdir)
                    return self.install_item(None, download, tmpdir, deps, True)

                elif os.path.exists(spec):
                    # Existing file or directory, just process it directly
                    self.not_editable(spec)
                    return self.install_item(None, spec, tmpdir, deps, True)
                else:
                    spec = parse_requirement_arg(spec)

            self.check_editable(spec)
            dist = self.package_index.fetch_distribution(
                spec, tmpdir, self.upgrade, self.editable, not self.always_copy,
                self.local_index
            )
            if dist is None:
                msg = "Could not find suitable distribution for %r" % spec
                if self.always_copy:
                    msg+=" (--always-copy skips system and development eggs)"
                raise DistutilsError(msg)
            elif dist.precedence==DEVELOP_DIST:
                # .egg-info dists don't need installing, just process deps
                self.process_distribution(spec, dist, deps, "Using")
                return dist
            else:
                return self.install_item(spec, dist.location, tmpdir, deps)

        finally:
            if os.path.exists(tmpdir):
                rmtree(tmpdir)

    def install_item(self, spec, download, tmpdir, deps, install_needed=False):

        # Installation is also needed if file in tmpdir or is not an egg
        install_needed = install_needed or self.always_copy
        install_needed = install_needed or os.path.dirname(download) == tmpdir
        install_needed = install_needed or not download.endswith('.egg')
        install_needed = install_needed or (
            self.always_copy_from is not None and
            os.path.dirname(normalize_path(download)) ==
            normalize_path(self.always_copy_from)
        )

        if spec and not install_needed:
            # at this point, we know it's a local .egg, we just don't know if
            # it's already installed.
            for dist in self.local_index[spec.project_name]:
                if dist.location==download:
                    break
            else:
                install_needed = True   # it's not in the local index

        log.info("Processing %s", os.path.basename(download))

        if install_needed:
            dists = self.install_eggs(spec, download, tmpdir)
            for dist in dists:
                self.process_distribution(spec, dist, deps)
        else:
            dists = [self.egg_distribution(download)]
            self.process_distribution(spec, dists[0], deps, "Using")

        if spec is not None:
            for dist in dists:
                if dist in spec:
                    return dist

    def select_scheme(self, name):
        """Sets the install directories by applying the install schemes."""
        # it's the caller's problem if they supply a bad name!
        scheme = INSTALL_SCHEMES[name]
        for key in SCHEME_KEYS:
            attrname = 'install_' + key
            if getattr(self, attrname) is None:
                setattr(self, attrname, scheme[key])

    def process_distribution(self, requirement, dist, deps=True, *info):
        self.update_pth(dist)
        self.package_index.add(dist)
        self.local_index.add(dist)
        self.install_egg_scripts(dist)
        self.installed_projects[dist.key] = dist
        log.info(self.installation_report(requirement, dist, *info))
        if (dist.has_metadata('dependency_links.txt') and
                not self.no_find_links):
            self.package_index.add_find_links(
                dist.get_metadata_lines('dependency_links.txt')
            )
        if not deps and not self.always_copy:
            return
        elif requirement is not None and dist.key != requirement.key:
            log.warn("Skipping dependencies for %s", dist)
            return  # XXX this is not the distribution we were looking for
        elif requirement is None or dist not in requirement:
            # if we wound up with a different version, resolve what we've got
            distreq = dist.as_requirement()
            requirement = requirement or distreq
            requirement = Requirement(
                distreq.project_name, distreq.specs, requirement.extras
            )
        log.info("Processing dependencies for %s", requirement)
        try:
            distros = WorkingSet([]).resolve(
                [requirement], self.local_index, self.easy_install
            )
        except DistributionNotFound:
            e = sys.exc_info()[1]
            raise DistutilsError(
                "Could not find required distribution %s" % e.args
            )
        except VersionConflict:
            e = sys.exc_info()[1]
            raise DistutilsError(
                "Installed distribution %s conflicts with requirement %s"
                % e.args
            )
        if self.always_copy or self.always_copy_from:
            # Force all the relevant distros to be copied or activated
            for dist in distros:
                if dist.key not in self.installed_projects:
                    self.easy_install(dist.as_requirement())
        log.info("Finished processing dependencies for %s", requirement)

    def should_unzip(self, dist):
        if self.zip_ok is not None:
            return not self.zip_ok
        if dist.has_metadata('not-zip-safe'):
            return True
        if not dist.has_metadata('zip-safe'):
            return True
        return False

    def maybe_move(self, spec, dist_filename, setup_base):
        dst = os.path.join(self.build_directory, spec.key)
        if os.path.exists(dst):
            msg = "%r already exists in %s; build directory %s will not be kept"
            log.warn(msg, spec.key, self.build_directory, setup_base)
            return setup_base
        if os.path.isdir(dist_filename):
            setup_base = dist_filename
        else:
            if os.path.dirname(dist_filename)==setup_base:
                os.unlink(dist_filename)   # get it out of the tmp dir
            contents = os.listdir(setup_base)
            if len(contents)==1:
                dist_filename = os.path.join(setup_base,contents[0])
                if os.path.isdir(dist_filename):
                    # if the only thing there is a directory, move it instead
                    setup_base = dist_filename
        ensure_directory(dst)
        shutil.move(setup_base, dst)
        return dst

    def install_wrapper_scripts(self, dist):
        if not self.exclude_scripts:
            for args in get_script_args(dist):
                self.write_script(*args)

    def install_script(self, dist, script_name, script_text, dev_path=None):
        """Generate a legacy script wrapper and install it"""
        spec = str(dist.as_requirement())
        is_script = is_python_script(script_text, script_name)

        def get_template(filename):
            """
            There are a couple of template scripts in the package. This
            function loads one of them and prepares it for use.

            These templates use triple-quotes to escape variable
            substitutions so the scripts get the 2to3 treatment when build
            on Python 3. The templates cannot use triple-quotes naturally.
            """
            raw_bytes = resource_string('setuptools', template_name)
            template_str = raw_bytes.decode('utf-8')
            clean_template = template_str.replace('"""', '')
            return clean_template

        if is_script:
            template_name = 'script template.py'
            if dev_path:
                template_name = template_name.replace('.py', ' (dev).py')
            script_text = (get_script_header(script_text) +
                get_template(template_name) % locals())
        self.write_script(script_name, _to_ascii(script_text), 'b')

    def write_script(self, script_name, contents, mode="t", blockers=()):
        """Write an executable file to the scripts directory"""
        self.delete_blockers(   # clean up old .py/.pyw w/o a script
            [os.path.join(self.script_dir,x) for x in blockers])
        log.info("Installing %s script to %s", script_name, self.script_dir)
        target = os.path.join(self.script_dir, script_name)
        self.add_output(target)

        mask = current_umask()
        if not self.dry_run:
            ensure_directory(target)
            if os.path.exists(target):
                os.unlink(target)
            f = open(target,"w"+mode)
            f.write(contents)
            f.close()
            chmod(target, 0x1FF-mask) # 0777

    def install_eggs(self, spec, dist_filename, tmpdir):
        # .egg dirs or files are already built, so just return them
        if dist_filename.lower().endswith('.egg'):
            return [self.install_egg(dist_filename, tmpdir)]
        elif dist_filename.lower().endswith('.exe'):
            return [self.install_exe(dist_filename, tmpdir)]

        # Anything else, try to extract and build
        setup_base = tmpdir
        if os.path.isfile(dist_filename) and not dist_filename.endswith('.py'):
            unpack_archive(dist_filename, tmpdir, self.unpack_progress)
        elif os.path.isdir(dist_filename):
            setup_base = os.path.abspath(dist_filename)

        if (setup_base.startswith(tmpdir)   # something we downloaded
                and self.build_directory and spec is not None):
            setup_base = self.maybe_move(spec, dist_filename, setup_base)

        # Find the setup.py file
        setup_script = os.path.join(setup_base, 'setup.py')

        if not os.path.exists(setup_script):
            setups = glob(os.path.join(setup_base, '*', 'setup.py'))
            if not setups:
                raise DistutilsError(
                    "Couldn't find a setup script in %s" % os.path.abspath(dist_filename)
                )
            if len(setups)>1:
                raise DistutilsError(
                    "Multiple setup scripts in %s" % os.path.abspath(dist_filename)
                )
            setup_script = setups[0]

        # Now run it, and return the result
        if self.editable:
            log.info(self.report_editable(spec, setup_script))
            return []
        else:
            return self.build_and_install(setup_script, setup_base)

    def egg_distribution(self, egg_path):
        if os.path.isdir(egg_path):
            metadata = PathMetadata(egg_path,os.path.join(egg_path,'EGG-INFO'))
        else:
            metadata = EggMetadata(zipimport.zipimporter(egg_path))
        return Distribution.from_filename(egg_path,metadata=metadata)

    def install_egg(self, egg_path, tmpdir):
        destination = os.path.join(self.install_dir,os.path.basename(egg_path))
        destination = os.path.abspath(destination)
        if not self.dry_run:
            ensure_directory(destination)

        dist = self.egg_distribution(egg_path)
        if not samefile(egg_path, destination):
            if os.path.isdir(destination) and not os.path.islink(destination):
                dir_util.remove_tree(destination, dry_run=self.dry_run)
            elif os.path.exists(destination):
                self.execute(os.unlink,(destination,),"Removing "+destination)
            uncache_zipdir(destination)
            if os.path.isdir(egg_path):
                if egg_path.startswith(tmpdir):
                    f,m = shutil.move, "Moving"
                else:
                    f,m = shutil.copytree, "Copying"
            elif self.should_unzip(dist):
                self.mkpath(destination)
                f,m = self.unpack_and_compile, "Extracting"
            elif egg_path.startswith(tmpdir):
                f,m = shutil.move, "Moving"
            else:
                f,m = shutil.copy2, "Copying"

            self.execute(f, (egg_path, destination),
                (m+" %s to %s") %
                (os.path.basename(egg_path),os.path.dirname(destination)))

        self.add_output(destination)
        return self.egg_distribution(destination)

    def install_exe(self, dist_filename, tmpdir):
        # See if it's valid, get data
        cfg = extract_wininst_cfg(dist_filename)
        if cfg is None:
            raise DistutilsError(
                "%s is not a valid distutils Windows .exe" % dist_filename
            )
        # Create a dummy distribution object until we build the real distro
        dist = Distribution(
            None,
            project_name=cfg.get('metadata','name'),
            version=cfg.get('metadata','version'), platform=get_platform(),
        )

        # Convert the .exe to an unpacked egg
        egg_path = dist.location = os.path.join(tmpdir, dist.egg_name()+'.egg')
        egg_tmp = egg_path + '.tmp'
        _egg_info = os.path.join(egg_tmp, 'EGG-INFO')
        pkg_inf = os.path.join(_egg_info, 'PKG-INFO')
        ensure_directory(pkg_inf)   # make sure EGG-INFO dir exists
        dist._provider = PathMetadata(egg_tmp, _egg_info)    # XXX
        self.exe_to_egg(dist_filename, egg_tmp)

        # Write EGG-INFO/PKG-INFO
        if not os.path.exists(pkg_inf):
            f = open(pkg_inf,'w')
            f.write('Metadata-Version: 1.0\n')
            for k,v in cfg.items('metadata'):
                if k != 'target_version':
                    f.write('%s: %s\n' % (k.replace('_','-').title(), v))
            f.close()
        script_dir = os.path.join(_egg_info,'scripts')
        self.delete_blockers(   # delete entry-point scripts to avoid duping
            [os.path.join(script_dir,args[0]) for args in get_script_args(dist)]
        )
        # Build .egg file from tmpdir
        bdist_egg.make_zipfile(
            egg_path, egg_tmp, verbose=self.verbose, dry_run=self.dry_run
        )
        # install the .egg
        return self.install_egg(egg_path, tmpdir)

    def exe_to_egg(self, dist_filename, egg_tmp):
        """Extract a bdist_wininst to the directories an egg would use"""
        # Check for .pth file and set up prefix translations
        prefixes = get_exe_prefixes(dist_filename)
        to_compile = []
        native_libs = []
        top_level = {}
        def process(src,dst):
            s = src.lower()
            for old,new in prefixes:
                if s.startswith(old):
                    src = new+src[len(old):]
                    parts = src.split('/')
                    dst = os.path.join(egg_tmp, *parts)
                    dl = dst.lower()
                    if dl.endswith('.pyd') or dl.endswith('.dll'):
                        parts[-1] = bdist_egg.strip_module(parts[-1])
                        top_level[os.path.splitext(parts[0])[0]] = 1
                        native_libs.append(src)
                    elif dl.endswith('.py') and old!='SCRIPTS/':
                        top_level[os.path.splitext(parts[0])[0]] = 1
                        to_compile.append(dst)
                    return dst
            if not src.endswith('.pth'):
                log.warn("WARNING: can't process %s", src)
            return None
        # extract, tracking .pyd/.dll->native_libs and .py -> to_compile
        unpack_archive(dist_filename, egg_tmp, process)
        stubs = []
        for res in native_libs:
            if res.lower().endswith('.pyd'):    # create stubs for .pyd's
                parts = res.split('/')
                resource = parts[-1]
                parts[-1] = bdist_egg.strip_module(parts[-1])+'.py'
                pyfile = os.path.join(egg_tmp, *parts)
                to_compile.append(pyfile)
                stubs.append(pyfile)
                bdist_egg.write_stub(resource, pyfile)
        self.byte_compile(to_compile)   # compile .py's
        bdist_egg.write_safety_flag(os.path.join(egg_tmp,'EGG-INFO'),
            bdist_egg.analyze_egg(egg_tmp, stubs))  # write zip-safety flag

        for name in 'top_level','native_libs':
            if locals()[name]:
                txt = os.path.join(egg_tmp, 'EGG-INFO', name+'.txt')
                if not os.path.exists(txt):
                    f = open(txt,'w')
                    f.write('\n'.join(locals()[name])+'\n')
                    f.close()

    def installation_report(self, req, dist, what="Installed"):
        """Helpful installation message for display to package users"""
        msg = "\n%(what)s %(eggloc)s%(extras)s"
        if self.multi_version and not self.no_report:
            msg += """

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("%(name)s")  # latest installed version
    pkg_resources.require("%(name)s==%(version)s")  # this exact version
    pkg_resources.require("%(name)s>=%(version)s")  # this version or higher
"""
            if self.install_dir not in map(normalize_path,sys.path):
                msg += """

Note also that the installation directory must be on sys.path at runtime for
this to work.  (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)
"""
        eggloc = dist.location
        name = dist.project_name
        version = dist.version
        extras = '' # TODO: self.report_extras(req, dist)
        return msg % locals()

    def report_editable(self, spec, setup_script):
        dirname = os.path.dirname(setup_script)
        python = sys.executable
        return """\nExtracted editable version of %(spec)s to %(dirname)s

If it uses setuptools in its setup script, you can activate it in
"development" mode by going to that directory and running::

    %(python)s setup.py develop

See the setuptools documentation for the "develop" command for more info.
""" % locals()

    def run_setup(self, setup_script, setup_base, args):
        sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg)
        sys.modules.setdefault('distutils.command.egg_info', egg_info)

        args = list(args)
        if self.verbose>2:
            v = 'v' * (self.verbose - 1)
            args.insert(0,'-'+v)
        elif self.verbose<2:
            args.insert(0,'-q')
        if self.dry_run:
            args.insert(0,'-n')
        log.info(
            "Running %s %s", setup_script[len(setup_base)+1:], ' '.join(args)
        )
        try:
            run_setup(setup_script, args)
        except SystemExit:
            v = sys.exc_info()[1]
            raise DistutilsError("Setup script exited with %s" % (v.args[0],))

    def build_and_install(self, setup_script, setup_base):
        args = ['bdist_egg', '--dist-dir']

        dist_dir = tempfile.mkdtemp(
            prefix='egg-dist-tmp-', dir=os.path.dirname(setup_script)
        )
        try:
            self._set_fetcher_options(os.path.dirname(setup_script))
            args.append(dist_dir)

            self.run_setup(setup_script, setup_base, args)
            all_eggs = Environment([dist_dir])
            eggs = []
            for key in all_eggs:
                for dist in all_eggs[key]:
                    eggs.append(self.install_egg(dist.location, setup_base))
            if not eggs and not self.dry_run:
                log.warn("No eggs found in %s (setup script problem?)",
                    dist_dir)
            return eggs
        finally:
            rmtree(dist_dir)
            log.set_verbosity(self.verbose) # restore our log verbosity

    def _set_fetcher_options(self, base):
        """
        When easy_install is about to run bdist_egg on a source dist, that
        source dist might have 'setup_requires' directives, requiring
        additional fetching. Ensure the fetcher options given to easy_install
        are available to that command as well.
        """
        # find the fetch options from easy_install and write them out
        #  to the setup.cfg file.
        ei_opts = self.distribution.get_option_dict('easy_install').copy()
        fetch_directives = (
            'find_links', 'site_dirs', 'index_url', 'optimize',
            'site_dirs', 'allow_hosts',
        )
        fetch_options = {}
        for key, val in ei_opts.items():
            if key not in fetch_directives: continue
            fetch_options[key.replace('_', '-')] = val[1]
        # create a settings dictionary suitable for `edit_config`
        settings = dict(easy_install=fetch_options)
        cfg_filename = os.path.join(base, 'setup.cfg')
        setopt.edit_config(cfg_filename, settings)

    def update_pth(self, dist):
        if self.pth_file is None:
            return

        for d in self.pth_file[dist.key]:    # drop old entries
            if self.multi_version or d.location != dist.location:
                log.info("Removing %s from easy-install.pth file", d)
                self.pth_file.remove(d)
                if d.location in self.shadow_path:
                    self.shadow_path.remove(d.location)

        if not self.multi_version:
            if dist.location in self.pth_file.paths:
                log.info(
                    "%s is already the active version in easy-install.pth",
                    dist
                )
            else:
                log.info("Adding %s to easy-install.pth file", dist)
                self.pth_file.add(dist) # add new entry
                if dist.location not in self.shadow_path:
                    self.shadow_path.append(dist.location)

        if not self.dry_run:

            self.pth_file.save()

            if dist.key=='setuptools':
                # Ensure that setuptools itself never becomes unavailable!
                # XXX should this check for latest version?
                filename = os.path.join(self.install_dir,'setuptools.pth')
                if os.path.islink(filename): os.unlink(filename)
                f = open(filename, 'wt')
                f.write(self.pth_file.make_relative(dist.location)+'\n')
                f.close()

    def unpack_progress(self, src, dst):
        # Progress filter for unpacking
        log.debug("Unpacking %s to %s", src, dst)
        return dst     # only unpack-and-compile skips files for dry run

    def unpack_and_compile(self, egg_path, destination):
        to_compile = []
        to_chmod = []

        def pf(src, dst):
            if dst.endswith('.py') and not src.startswith('EGG-INFO/'):
                to_compile.append(dst)
            elif dst.endswith('.dll') or dst.endswith('.so'):
                to_chmod.append(dst)
            self.unpack_progress(src,dst)
            return not self.dry_run and dst or None

        unpack_archive(egg_path, destination, pf)
        self.byte_compile(to_compile)
        if not self.dry_run:
            for f in to_chmod:
                mode = ((os.stat(f)[stat.ST_MODE]) | 0x16D) & 0xFED  # 0555, 07755
                chmod(f, mode)

    def byte_compile(self, to_compile):
        if _dont_write_bytecode:
            self.warn('byte-compiling is disabled, skipping.')
            return

        from distutils.util import byte_compile
        try:
            # try to make the byte compile messages quieter
            log.set_verbosity(self.verbose - 1)

            byte_compile(to_compile, optimize=0, force=1, dry_run=self.dry_run)
            if self.optimize:
                byte_compile(
                    to_compile, optimize=self.optimize, force=1,
                    dry_run=self.dry_run
                )
        finally:
            log.set_verbosity(self.verbose)     # restore original verbosity

    def no_default_version_msg(self):
        template = """bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s

and your PYTHONPATH environment variable currently contains:

    %r

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again."""
        return template % (self.install_dir, os.environ.get('PYTHONPATH',''))

    def install_site_py(self):
        """Make sure there's a site.py in the target dir, if needed"""

        if self.sitepy_installed:
            return  # already did it, or don't need to

        sitepy = os.path.join(self.install_dir, "site.py")
        source = resource_string("setuptools", "site-patch.py")
        current = ""

        if os.path.exists(sitepy):
            log.debug("Checking existing site.py in %s", self.install_dir)
            f = open(sitepy,'rb')
            current = f.read()
            # we want str, not bytes
            if sys.version_info >= (3,):
                current = current.decode()

            f.close()
            if not current.startswith('def __boot():'):
                raise DistutilsError(
                    "%s is not a setuptools-generated site.py; please"
                    " remove it." % sitepy
                )

        if current != source:
            log.info("Creating %s", sitepy)
            if not self.dry_run:
                ensure_directory(sitepy)
                f = open(sitepy,'wb')
                f.write(source)
                f.close()
            self.byte_compile([sitepy])

        self.sitepy_installed = True

    def create_home_path(self):
        """Create directories under ~."""
        if not self.user:
            return
        home = convert_path(os.path.expanduser("~"))
        for name, path in iteritems(self.config_vars):
            if path.startswith(home) and not os.path.isdir(path):
                self.debug_print("os.makedirs('%s', 0700)" % path)
                os.makedirs(path, 0x1C0)    # 0700

    INSTALL_SCHEMES = dict(
        posix = dict(
            install_dir = '$base/lib/python$py_version_short/site-packages',
            script_dir = '$base/bin',
        ),
    )

    DEFAULT_SCHEME = dict(
        install_dir = '$base/Lib/site-packages',
        script_dir = '$base/Scripts',
    )

    def _expand(self, *attrs):
        config_vars = self.get_finalized_command('install').config_vars

        if self.prefix:
            # Set default install_dir/scripts from --prefix
            config_vars = config_vars.copy()
            config_vars['base'] = self.prefix
            scheme = self.INSTALL_SCHEMES.get(os.name,self.DEFAULT_SCHEME)
            for attr,val in scheme.items():
                if getattr(self,attr,None) is None:
                    setattr(self,attr,val)

        from distutils.util import subst_vars
        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                val = subst_vars(val, config_vars)
                if os.name == 'posix':
                    val = os.path.expanduser(val)
                setattr(self, attr, val)

def get_site_dirs():
    # return a list of 'site' dirs
    sitedirs = [_f for _f in os.environ.get('PYTHONPATH',
                                            '').split(os.pathsep) if _f]
    prefixes = [sys.prefix]
    if sys.exec_prefix != sys.prefix:
        prefixes.append(sys.exec_prefix)
    for prefix in prefixes:
        if prefix:
            if sys.platform in ('os2emx', 'riscos'):
                sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
            elif os.sep == '/':
                sitedirs.extend([os.path.join(prefix,
                                         "lib",
                                         "python" + sys.version[:3],
                                         "site-packages"),
                            os.path.join(prefix, "lib", "site-python")])
            else:
                sitedirs.extend(
                    [prefix, os.path.join(prefix, "lib", "site-packages")]
                )
            if sys.platform == 'darwin':
                # for framework builds *only* we add the standard Apple
                # locations. Currently only per-user, but /Library and
                # /Network/Library could be added too
                if 'Python.framework' in prefix:
                    home = os.environ.get('HOME')
                    if home:
                        sitedirs.append(
                            os.path.join(home,
                                         'Library',
                                         'Python',
                                         sys.version[:3],
                                         'site-packages'))
    lib_paths = get_path('purelib'), get_path('platlib')
    for site_lib in lib_paths:
        if site_lib not in sitedirs: sitedirs.append(site_lib)

    if site.ENABLE_USER_SITE:
        sitedirs.append(site.USER_SITE)

    sitedirs = list(map(normalize_path, sitedirs))

    return sitedirs


def expand_paths(inputs):
    """Yield sys.path directories that might contain "old-style" packages"""

    seen = {}

    for dirname in inputs:
        dirname = normalize_path(dirname)
        if dirname in seen:
            continue

        seen[dirname] = 1
        if not os.path.isdir(dirname):
            continue

        files = os.listdir(dirname)
        yield dirname, files

        for name in files:
            if not name.endswith('.pth'):
                # We only care about the .pth files
                continue
            if name in ('easy-install.pth','setuptools.pth'):
                # Ignore .pth files that we control
                continue

            # Read the .pth file
            f = open(os.path.join(dirname,name))
            lines = list(yield_lines(f))
            f.close()

            # Yield existing non-dupe, non-import directory lines from it
            for line in lines:
                if not line.startswith("import"):
                    line = normalize_path(line.rstrip())
                    if line not in seen:
                        seen[line] = 1
                        if not os.path.isdir(line):
                            continue
                        yield line, os.listdir(line)


def extract_wininst_cfg(dist_filename):
    """Extract configuration data from a bdist_wininst .exe

    Returns a ConfigParser.RawConfigParser, or None
    """
    f = open(dist_filename,'rb')
    try:
        endrec = zipfile._EndRecData(f)
        if endrec is None:
            return None

        prepended = (endrec[9] - endrec[5]) - endrec[6]
        if prepended < 12:  # no wininst data here
            return None
        f.seek(prepended-12)

        from setuptools.compat import StringIO, ConfigParser
        import struct
        tag, cfglen, bmlen = struct.unpack("<iii",f.read(12))
        if tag not in (0x1234567A, 0x1234567B):
            return None     # not a valid tag

        f.seek(prepended-(12+cfglen))
        cfg = ConfigParser.RawConfigParser({'version':'','target_version':''})
        try:
            part = f.read(cfglen)
            # part is in bytes, but we need to read up to the first null
            #  byte.
            if sys.version_info >= (2,6):
                null_byte = bytes([0])
            else:
                null_byte = chr(0)
            config = part.split(null_byte, 1)[0]
            # Now the config is in bytes, but for RawConfigParser, it should
            #  be text, so decode it.
            config = config.decode(sys.getfilesystemencoding())
            cfg.readfp(StringIO(config))
        except ConfigParser.Error:
            return None
        if not cfg.has_section('metadata') or not cfg.has_section('Setup'):
            return None
        return cfg

    finally:
        f.close()


def get_exe_prefixes(exe_filename):
    """Get exe->egg path translations for a given .exe file"""

    prefixes = [
        ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''),
        ('PLATLIB/', ''),
        ('SCRIPTS/', 'EGG-INFO/scripts/'),
        ('DATA/lib/site-packages', ''),
    ]
    z = zipfile.ZipFile(exe_filename)
    try:
        for info in z.infolist():
            name = info.filename
            parts = name.split('/')
            if len(parts)==3 and parts[2]=='PKG-INFO':
                if parts[1].endswith('.egg-info'):
                    prefixes.insert(0,('/'.join(parts[:2]), 'EGG-INFO/'))
                    break
            if len(parts) != 2 or not name.endswith('.pth'):
                continue
            if name.endswith('-nspkg.pth'):
                continue
            if parts[0].upper() in ('PURELIB','PLATLIB'):
                contents = z.read(name)
                if sys.version_info >= (3,):
                    contents = contents.decode()
                for pth in yield_lines(contents):
                    pth = pth.strip().replace('\\','/')
                    if not pth.startswith('import'):
                        prefixes.append((('%s/%s/' % (parts[0],pth)), ''))
    finally:
        z.close()
    prefixes = [(x.lower(),y) for x, y in prefixes]
    prefixes.sort()
    prefixes.reverse()
    return prefixes


def parse_requirement_arg(spec):
    try:
        return Requirement.parse(spec)
    except ValueError:
        raise DistutilsError(
            "Not a URL, existing file, or requirement spec: %r" % (spec,)
        )

class PthDistributions(Environment):
    """A .pth file with Distribution paths in it"""

    dirty = False

    def __init__(self, filename, sitedirs=()):
        self.filename = filename
        self.sitedirs = list(map(normalize_path, sitedirs))
        self.basedir = normalize_path(os.path.dirname(self.filename))
        self._load()
        Environment.__init__(self, [], None, None)
        for path in yield_lines(self.paths):
            list(map(self.add, find_distributions(path, True)))

    def _load(self):
        self.paths = []
        saw_import = False
        seen = dict.fromkeys(self.sitedirs)
        if os.path.isfile(self.filename):
            f = open(self.filename,'rt')
            for line in f:
                if line.startswith('import'):
                    saw_import = True
                    continue
                path = line.rstrip()
                self.paths.append(path)
                if not path.strip() or path.strip().startswith('#'):
                    continue
                # skip non-existent paths, in case somebody deleted a package
                # manually, and duplicate paths as well
                path = self.paths[-1] = normalize_path(
                    os.path.join(self.basedir,path)
                )
                if not os.path.exists(path) or path in seen:
                    self.paths.pop()    # skip it
                    self.dirty = True   # we cleaned up, so we're dirty now :)
                    continue
                seen[path] = 1
            f.close()

        if self.paths and not saw_import:
            self.dirty = True   # ensure anything we touch has import wrappers
        while self.paths and not self.paths[-1].strip():
            self.paths.pop()

    def save(self):
        """Write changed .pth file back to disk"""
        if not self.dirty:
            return

        data = '\n'.join(map(self.make_relative,self.paths))
        if data:
            log.debug("Saving %s", self.filename)
            data = (
                "import sys; sys.__plen = len(sys.path)\n"
                "%s\n"
                "import sys; new=sys.path[sys.__plen:];"
                " del sys.path[sys.__plen:];"
                " p=getattr(sys,'__egginsert',0); sys.path[p:p]=new;"
                " sys.__egginsert = p+len(new)\n"
            ) % data

            if os.path.islink(self.filename):
                os.unlink(self.filename)
            f = open(self.filename,'wt')
            f.write(data)
            f.close()

        elif os.path.exists(self.filename):
            log.debug("Deleting empty %s", self.filename)
            os.unlink(self.filename)

        self.dirty = False

    def add(self, dist):
        """Add `dist` to the distribution map"""
        if (dist.location not in self.paths and (
                dist.location not in self.sitedirs or
                dist.location == os.getcwd() # account for '.' being in PYTHONPATH
                )):
            self.paths.append(dist.location)
            self.dirty = True
        Environment.add(self, dist)

    def remove(self, dist):
        """Remove `dist` from the distribution map"""
        while dist.location in self.paths:
            self.paths.remove(dist.location)
            self.dirty = True
        Environment.remove(self, dist)

    def make_relative(self,path):
        npath, last = os.path.split(normalize_path(path))
        baselen = len(self.basedir)
        parts = [last]
        sep = os.altsep=='/' and '/' or os.sep
        while len(npath)>=baselen:
            if npath==self.basedir:
                parts.append(os.curdir)
                parts.reverse()
                return sep.join(parts)
            npath, last = os.path.split(npath)
            parts.append(last)
        else:
            return path

def get_script_header(script_text, executable=sys_executable, wininst=False):
    """Create a #! line, getting options (if any) from script_text"""
    from distutils.command.build_scripts import first_line_re

    # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern.
    if not isinstance(first_line_re.pattern, str):
        first_line_re = re.compile(first_line_re.pattern.decode())

    first = (script_text+'\n').splitlines()[0]
    match = first_line_re.match(first)
    options = ''
    if match:
        options = match.group(1) or ''
        if options: options = ' '+options
    if wininst:
        executable = "python.exe"
    else:
        executable = nt_quote_arg(executable)
    hdr = "#!%(executable)s%(options)s\n" % locals()
    if not isascii(hdr):
        # Non-ascii path to sys.executable, use -x to prevent warnings
        if options:
            if options.strip().startswith('-'):
                options = ' -x'+options.strip()[1:]
            # else: punt, we can't do it, let the warning happen anyway
        else:
            options = ' -x'
    executable = fix_jython_executable(executable, options)
    hdr = "#!%(executable)s%(options)s\n" % locals()
    return hdr

def auto_chmod(func, arg, exc):
    if func is os.remove and os.name=='nt':
        chmod(arg, stat.S_IWRITE)
        return func(arg)
    et, ev, _ = sys.exc_info()
    reraise(et, (ev[0], ev[1] + (" %s %s" % (func,arg))))

def uncache_zipdir(path):
    """Ensure that the importer caches dont have stale info for `path`"""
    from zipimport import _zip_directory_cache as zdc
    _uncache(path, zdc)
    _uncache(path, sys.path_importer_cache)

def _uncache(path, cache):
    if path in cache:
        del cache[path]
    else:
        path = normalize_path(path)
        for p in cache:
            if normalize_path(p)==path:
                del cache[p]
                return

def is_python(text, filename='<string>'):
    "Is this string a valid Python script?"
    try:
        compile(text, filename, 'exec')
    except (SyntaxError, TypeError):
        return False
    else:
        return True

def is_sh(executable):
    """Determine if the specified executable is a .sh (contains a #! line)"""
    try:
        fp = open(executable)
        magic = fp.read(2)
        fp.close()
    except (OSError,IOError): return executable
    return magic == '#!'

def nt_quote_arg(arg):
    """Quote a command line argument according to Windows parsing rules"""

    result = []
    needquote = False
    nb = 0

    needquote = (" " in arg) or ("\t" in arg)
    if needquote:
        result.append('"')

    for c in arg:
        if c == '\\':
            nb += 1
        elif c == '"':
            # double preceding backslashes, then add a \"
            result.append('\\' * (nb*2) + '\\"')
            nb = 0
        else:
            if nb:
                result.append('\\' * nb)
                nb = 0
            result.append(c)

    if nb:
        result.append('\\' * nb)

    if needquote:
        result.append('\\' * nb)    # double the trailing backslashes
        result.append('"')

    return ''.join(result)

def is_python_script(script_text, filename):
    """Is this text, as a whole, a Python script? (as opposed to shell/bat/etc.
    """
    if filename.endswith('.py') or filename.endswith('.pyw'):
        return True     # extension says it's Python
    if is_python(script_text, filename):
        return True     # it's syntactically valid Python
    if script_text.startswith('#!'):
        # It begins with a '#!' line, so check if 'python' is in it somewhere
        return 'python' in script_text.splitlines()[0].lower()

    return False    # Not any Python I can recognize

try:
    from os import chmod as _chmod
except ImportError:
    # Jython compatibility
    def _chmod(*args): pass

def chmod(path, mode):
    log.debug("changing mode of %s to %o", path, mode)
    try:
        _chmod(path, mode)
    except os.error:
        e = sys.exc_info()[1]
        log.debug("chmod failed: %s", e)

def fix_jython_executable(executable, options):
    if sys.platform.startswith('java') and is_sh(executable):
        # Workaround for Jython is not needed on Linux systems.
        import java
        if java.lang.System.getProperty("os.name") == "Linux":
            return executable

        # Workaround Jython's sys.executable being a .sh (an invalid
        # shebang line interpreter)
        if options:
            # Can't apply the workaround, leave it broken
            log.warn(
                "WARNING: Unable to adapt shebang line for Jython,"
                " the following script is NOT executable\n"
                "         see http://bugs.jython.org/issue1112 for"
                " more information.")
        else:
            return '/usr/bin/env %s' % executable
    return executable


class ScriptWriter(object):
    """
    Encapsulates behavior around writing entry point scripts for console and
    gui apps.
    """

    template = textwrap.dedent("""
        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
        __requires__ = %(spec)r
        import sys
        from pkg_resources import load_entry_point

        if __name__ == '__main__':
            sys.exit(
                load_entry_point(%(spec)r, %(group)r, %(name)r)()
            )
    """).lstrip()

    @classmethod
    def get_script_args(cls, dist, executable=sys_executable, wininst=False):
        """
        Yield write_script() argument tuples for a distribution's entrypoints
        """
        gen_class = cls.get_writer(wininst)
        spec = str(dist.as_requirement())
        header = get_script_header("", executable, wininst)
        for type_ in 'console', 'gui':
            group = type_ + '_scripts'
            for name, ep in dist.get_entry_map(group).items():
                script_text = gen_class.template % locals()
                for res in gen_class._get_script_args(type_, name, header,
                        script_text):
                    yield res

    @classmethod
    def get_writer(cls, force_windows):
        if force_windows or sys.platform=='win32':
            return WindowsScriptWriter.get_writer()
        return cls

    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        # Simply write the stub with no extension.
        yield (name, header+script_text)


class WindowsScriptWriter(ScriptWriter):
    @classmethod
    def get_writer(cls):
        """
        Get a script writer suitable for Windows
        """
        writer_lookup = dict(
            executable=WindowsExecutableLauncherWriter,
            natural=cls,
        )
        # for compatibility, use the executable launcher by default
        launcher = os.environ.get('SETUPTOOLS_LAUNCHER', 'executable')
        return writer_lookup[launcher]

    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        "For Windows, add a .py extension"
        ext = dict(console='.pya', gui='.pyw')[type_]
        if ext not in os.environ['PATHEXT'].lower().split(';'):
            warnings.warn("%s not listed in PATHEXT; scripts will not be "
                "recognized as executables." % ext, UserWarning)
        old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe']
        old.remove(ext)
        header = cls._adjust_header(type_, header)
        blockers = [name+x for x in old]
        yield name+ext, header+script_text, 't', blockers

    @staticmethod
    def _adjust_header(type_, orig_header):
        """
        Make sure 'pythonw' is used for gui and and 'python' is used for
        console (regardless of what sys.executable is).
        """
        pattern = 'pythonw.exe'
        repl = 'python.exe'
        if type_ == 'gui':
            pattern, repl = repl, pattern
        pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE)
        new_header = pattern_ob.sub(string=orig_header, repl=repl)
        clean_header = new_header[2:-1].strip('"')
        if sys.platform == 'win32' and not os.path.exists(clean_header):
            # the adjusted version doesn't exist, so return the original
            return orig_header
        return new_header


class WindowsExecutableLauncherWriter(WindowsScriptWriter):
    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        """
        For Windows, add a .py extension and an .exe launcher
        """
        if type_=='gui':
            launcher_type = 'gui'
            ext = '-script.pyw'
            old = ['.pyw']
        else:
            launcher_type = 'cli'
            ext = '-script.py'
            old = ['.py','.pyc','.pyo']
        hdr = cls._adjust_header(type_, header)
        blockers = [name+x for x in old]
        yield (name+ext, hdr+script_text, 't', blockers)
        yield (
            name+'.exe', get_win_launcher(launcher_type),
            'b' # write in binary mode
        )
        if not is_64bit():
            # install a manifest for the launcher to prevent Windows
            #  from detecting it as an installer (which it will for
            #  launchers like easy_install.exe). Consider only
            #  adding a manifest for launchers detected as installers.
            #  See Distribute #143 for details.
            m_name = name + '.exe.manifest'
            yield (m_name, load_launcher_manifest(name), 't')

# for backward-compatibility
get_script_args = ScriptWriter.get_script_args

def get_win_launcher(type):
    """
    Load the Windows launcher (executable) suitable for launching a script.

    `type` should be either 'cli' or 'gui'

    Returns the executable as a byte string.
    """
    launcher_fn = '%s.exe' % type
    if platform.machine().lower()=='arm':
        launcher_fn = launcher_fn.replace(".", "-arm.")
    if is_64bit():
        launcher_fn = launcher_fn.replace(".", "-64.")
    else:
        launcher_fn = launcher_fn.replace(".", "-32.")
    return resource_string('setuptools', launcher_fn)

def load_launcher_manifest(name):
    manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml')
    if sys.version_info[0] < 3:
        return manifest % vars()
    else:
        return manifest.decode('utf-8') % vars()

def rmtree(path, ignore_errors=False, onerror=auto_chmod):
    """Recursively delete a directory tree.

    This code is taken from the Python 2.4 version of 'shutil', because
    the 2.3 version doesn't really work right.
    """
    if ignore_errors:
        def onerror(*args):
            pass
    elif onerror is None:
        def onerror(*args):
            raise
    names = []
    try:
        names = os.listdir(path)
    except os.error:
        onerror(os.listdir, path, sys.exc_info())
    for name in names:
        fullname = os.path.join(path, name)
        try:
            mode = os.lstat(fullname).st_mode
        except os.error:
            mode = 0
        if stat.S_ISDIR(mode):
            rmtree(fullname, ignore_errors, onerror)
        else:
            try:
                os.remove(fullname)
            except os.error:
                onerror(os.remove, fullname, sys.exc_info())
    try:
        os.rmdir(path)
    except os.error:
        onerror(os.rmdir, path, sys.exc_info())

def current_umask():
    tmp = os.umask(0x12)    # 022
    os.umask(tmp)
    return tmp

def bootstrap():
    # This function is called when setuptools*.egg is run using /bin/sh
    import setuptools
    argv0 = os.path.dirname(setuptools.__path__[0])
    sys.argv[0] = argv0
    sys.argv.append(argv0)
    main()

def main(argv=None, **kw):
    from setuptools import setup
    from setuptools.dist import Distribution
    import distutils.core

    USAGE = """\
usage: %(script)s [options] requirement_or_url ...
   or: %(script)s --help
"""

    def gen_usage(script_name):
        return USAGE % dict(
            script=os.path.basename(script_name),
        )

    def with_ei_usage(f):
        old_gen_usage = distutils.core.gen_usage
        try:
            distutils.core.gen_usage = gen_usage
            return f()
        finally:
            distutils.core.gen_usage = old_gen_usage

    class DistributionWithoutHelpCommands(Distribution):
        common_usage = ""

        def _show_help(self,*args,**kw):
            with_ei_usage(lambda: Distribution._show_help(self,*args,**kw))

    if argv is None:
        argv = sys.argv[1:]

    with_ei_usage(lambda:
        setup(
            script_args = ['-q','easy_install', '-v']+argv,
            script_name = sys.argv[0] or 'easy_install',
            distclass=DistributionWithoutHelpCommands, **kw
        )
    )
python3.3/site-packages/setuptools/command/rotate.py000064400000004016151733566760016564 0ustar00import distutils, os
from setuptools import Command
from setuptools.compat import basestring
from distutils.util import convert_path
from distutils import log
from distutils.errors import *

class rotate(Command):
    """Delete older distributions"""

    description = "delete older distributions, keeping N newest files"
    user_options = [
        ('match=',    'm', "patterns to match (required)"),
        ('dist-dir=', 'd', "directory where the distributions are"),
        ('keep=',     'k', "number of matching distributions to keep"),
    ]

    boolean_options = []

    def initialize_options(self):
        self.match = None
        self.dist_dir = None
        self.keep = None

    def finalize_options(self):
        if self.match is None:
            raise DistutilsOptionError(
                "Must specify one or more (comma-separated) match patterns "
                "(e.g. '.zip' or '.egg')"
            )
        if self.keep is None:
            raise DistutilsOptionError("Must specify number of files to keep")           
        try:
            self.keep = int(self.keep)
        except ValueError:
            raise DistutilsOptionError("--keep must be an integer")
        if isinstance(self.match, basestring):
            self.match = [
                convert_path(p.strip()) for p in self.match.split(',')
            ]
        self.set_undefined_options('bdist',('dist_dir', 'dist_dir'))

    def run(self):
        self.run_command("egg_info")
        from glob import glob
        for pattern in self.match:
            pattern = self.distribution.get_name()+'*'+pattern
            files = glob(os.path.join(self.dist_dir,pattern))
            files = [(os.path.getmtime(f),f) for f in files]
            files.sort()
            files.reverse()

            log.info("%d file(s) matching %s", len(files), pattern)
            files = files[self.keep:]
            for (t,f) in files:
                log.info("Deleting %s", f)
                if not self.dry_run:
                    os.unlink(f)

























python3.3/site-packages/setuptools/command/install_lib.py000064400000004666151733566760017575 0ustar00from distutils.command.install_lib import install_lib as _install_lib
import os

class install_lib(_install_lib):
    """Don't add compiled flags to filenames of non-Python files"""

    def _bytecode_filenames (self, py_filenames):
        bytecode_files = []
        for py_file in py_filenames:
            if not py_file.endswith('.py'):
                continue
            if self.compile:
                bytecode_files.append(py_file + "c")
            if self.optimize > 0:
                bytecode_files.append(py_file + "o")

        return bytecode_files

    def run(self):
        self.build()
        outfiles = self.install()
        if outfiles is not None:
            # always compile, in case we have any extension stubs to deal with
            self.byte_compile(outfiles)

    def get_exclusions(self):
        exclude = {}
        nsp = self.distribution.namespace_packages

        if (nsp and self.get_finalized_command('install')
               .single_version_externally_managed
        ):
            for pkg in nsp:
                parts = pkg.split('.')
                while parts:
                    pkgdir = os.path.join(self.install_dir, *parts)
                    for f in '__init__.py', '__init__.pyc', '__init__.pyo':
                        exclude[os.path.join(pkgdir,f)] = 1
                    parts.pop()
        return exclude

    def copy_tree(
        self, infile, outfile,
        preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1
    ):
        assert preserve_mode and preserve_times and not preserve_symlinks
        exclude = self.get_exclusions()

        if not exclude:
            return _install_lib.copy_tree(self, infile, outfile)

        # Exclude namespace package __init__.py* files from the output

        from setuptools.archive_util import unpack_directory
        from distutils import log

        outfiles = []

        def pf(src, dst):
            if dst in exclude:
                log.warn("Skipping installation of %s (namespace package)",dst)
                return False

            log.info("copying %s -> %s", src, os.path.dirname(dst))
            outfiles.append(dst)
            return dst

        unpack_directory(infile, outfile, pf)
        return outfiles

    def get_outputs(self):
        outputs = _install_lib.get_outputs(self)
        exclude = self.get_exclusions()
        if exclude:
            return [f for f in outputs if f not in exclude]
        return outputs






python3.3/site-packages/setuptools/command/upload_docs.py000064400000015227151733566760017570 0ustar00# -*- coding: utf-8 -*-
"""upload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
PyPI's pythonhosted.org).
"""

import os
import socket
import zipfile
import tempfile
import sys
import shutil

from base64 import standard_b64encode
from pkg_resources import iter_entry_points

from distutils import log
from distutils.errors import DistutilsOptionError
from distutils.command.upload import upload

from setuptools.compat import httplib, urlparse, unicode, iteritems, PY3

errors = 'surrogateescape' if PY3 else 'strict'


# This is not just a replacement for byte literals
# but works as a general purpose encoder
def b(s, encoding='utf-8'):
    if isinstance(s, unicode):
        return s.encode(encoding, errors)
    return s


class upload_docs(upload):

    description = 'Upload documentation to PyPI'

    user_options = [
        ('repository=', 'r',
         "url of repository [default: %s]" % upload.DEFAULT_REPOSITORY),
        ('show-response', None,
         'display full response text from server'),
        ('upload-dir=', None, 'directory to upload'),
        ]
    boolean_options = upload.boolean_options

    def has_sphinx(self):
        if self.upload_dir is None:
            for ep in iter_entry_points('distutils.commands', 'build_sphinx'):
                return True

    sub_commands = [('build_sphinx', has_sphinx)]

    def initialize_options(self):
        upload.initialize_options(self)
        self.upload_dir = None
        self.target_dir = None

    def finalize_options(self):
        upload.finalize_options(self)
        if self.upload_dir is None:
            if self.has_sphinx():
                build_sphinx = self.get_finalized_command('build_sphinx')
                self.target_dir = build_sphinx.builder_target_dir
            else:
                build = self.get_finalized_command('build')
                self.target_dir = os.path.join(build.build_base, 'docs')
        else:
            self.ensure_dirname('upload_dir')
            self.target_dir = self.upload_dir
        self.announce('Using upload directory %s' % self.target_dir)

    def create_zipfile(self, filename):
        zip_file = zipfile.ZipFile(filename, "w")
        try:
            self.mkpath(self.target_dir)  # just in case
            for root, dirs, files in os.walk(self.target_dir):
                if root == self.target_dir and not files:
                    raise DistutilsOptionError(
                        "no files found in upload directory '%s'"
                        % self.target_dir)
                for name in files:
                    full = os.path.join(root, name)
                    relative = root[len(self.target_dir):].lstrip(os.path.sep)
                    dest = os.path.join(relative, name)
                    zip_file.write(full, dest)
        finally:
            zip_file.close()

    def run(self):
        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        tmp_dir = tempfile.mkdtemp()
        name = self.distribution.metadata.get_name()
        zip_file = os.path.join(tmp_dir, "%s.zip" % name)
        try:
            self.create_zipfile(zip_file)
            self.upload_file(zip_file)
        finally:
            shutil.rmtree(tmp_dir)

    def upload_file(self, filename):
        f = open(filename, 'rb')
        content = f.read()
        f.close()
        meta = self.distribution.metadata
        data = {
            ':action': 'doc_upload',
            'name': meta.get_name(),
            'content': (os.path.basename(filename), content),
        }
        # set up the authentication
        credentials = b(self.username + ':' + self.password)
        credentials = standard_b64encode(credentials)
        if PY3:
            credentials = credentials.decode('ascii')
        auth = "Basic " + credentials

        # Build up the MIME payload for the POST data
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = b('\n--') + b(boundary)
        end_boundary = sep_boundary + b('--')
        body = []
        for key, values in iteritems(data):
            title = '\nContent-Disposition: form-data; name="%s"' % key
            # handle multiple entries for the same name
            if isinstance(values, list):
                values = [values]
            for value in values:
                if type(value) is tuple:
                    title += '; filename="%s"' % value[0]
                    value = value[1]
                else:
                    value = b(value)
                body.append(sep_boundary)
                body.append(b(title))
                body.append(b("\n\n"))
                body.append(value)
                if value and value[-1:] == b('\r'):
                    body.append(b('\n'))  # write an extra newline (lurve Macs)
        body.append(end_boundary)
        body.append(b("\n"))
        body = b('').join(body)

        self.announce("Submitting documentation to %s" % (self.repository),
                      log.INFO)

        # build the Request
        # We can't use urllib2 since we need to send the Basic
        # auth right with the first request
        schema, netloc, url, params, query, fragments = \
            urlparse(self.repository)
        assert not params and not query and not fragments
        if schema == 'http':
            conn = httplib.HTTPConnection(netloc)
        elif schema == 'https':
            conn = httplib.HTTPSConnection(netloc)
        else:
            raise AssertionError("unsupported schema "+schema)

        data = ''
        try:
            conn.connect()
            conn.putrequest("POST", url)
            content_type = 'multipart/form-data; boundary=%s' % boundary
            conn.putheader('Content-type', content_type)
            conn.putheader('Content-length', str(len(body)))
            conn.putheader('Authorization', auth)
            conn.endheaders()
            conn.send(body)
        except socket.error:
            e = sys.exc_info()[1]
            self.announce(str(e), log.ERROR)
            return

        r = conn.getresponse()
        if r.status == 200:
            self.announce('Server response (%s): %s' % (r.status, r.reason),
                          log.INFO)
        elif r.status == 301:
            location = r.getheader('Location')
            if location is None:
                location = 'https://pythonhosted.org/%s/' % meta.get_name()
            self.announce('Upload successful. Visit %s' % location,
                          log.INFO)
        else:
            self.announce('Upload failed (%s): %s' % (r.status, r.reason),
                          log.ERROR)
        if self.show_response:
            print('-'*75, r.read(), '-'*75)
python3.3/site-packages/setuptools/command/install_scripts.py000064400000004024151733566760020502 0ustar00from distutils.command.install_scripts import install_scripts \
     as _install_scripts
from pkg_resources import Distribution, PathMetadata, ensure_directory
import os
from distutils import log

class install_scripts(_install_scripts):
    """Do normal script install, plus any egg_info wrapper scripts"""

    def initialize_options(self):
        _install_scripts.initialize_options(self)
        self.no_ep = False

    def run(self):
        from setuptools.command.easy_install import get_script_args
        from setuptools.command.easy_install import sys_executable

        self.run_command("egg_info")
        if self.distribution.scripts:
            _install_scripts.run(self)  # run first to set up self.outfiles
        else:
            self.outfiles = []
        if self.no_ep:
            # don't install entry point scripts into .egg file!
            return

        ei_cmd = self.get_finalized_command("egg_info")
        dist = Distribution(
            ei_cmd.egg_base, PathMetadata(ei_cmd.egg_base, ei_cmd.egg_info),
            ei_cmd.egg_name, ei_cmd.egg_version,
        )
        bs_cmd = self.get_finalized_command('build_scripts')
        executable = getattr(bs_cmd,'executable',sys_executable)
        is_wininst = getattr(
            self.get_finalized_command("bdist_wininst"), '_is_running', False
        )
        for args in get_script_args(dist, executable, is_wininst):
            self.write_script(*args)

    def write_script(self, script_name, contents, mode="t", *ignored):
        """Write an executable file to the scripts directory"""
        from setuptools.command.easy_install import chmod, current_umask
        log.info("Installing %s script to %s", script_name, self.install_dir)
        target = os.path.join(self.install_dir, script_name)
        self.outfiles.append(target)

        mask = current_umask()
        if not self.dry_run:
            ensure_directory(target)
            f = open(target,"w"+mode)
            f.write(contents)
            f.close()
            chmod(target, 0x1FF-mask)  # 0777

python3.3/site-packages/setuptools/command/alias.py000064400000004666151733566760016372 0ustar00import distutils, os
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import *
from setuptools.command.setopt import edit_config, option_base, config_file

def shquote(arg):
    """Quote an argument for later parsing by shlex.split()"""
    for c in '"', "'", "\\", "#":
        if c in arg: return repr(arg)
    if arg.split() != [arg]:
        return repr(arg)
    return arg        


class alias(option_base):
    """Define a shortcut that invokes one or more commands"""
    
    description = "define a shortcut to invoke one or more commands"
    command_consumes_arguments = True

    user_options = [
        ('remove',   'r', 'remove (unset) the alias'), 
    ] + option_base.user_options

    boolean_options = option_base.boolean_options + ['remove']

    def initialize_options(self):
        option_base.initialize_options(self)
        self.args = None
        self.remove = None

    def finalize_options(self):
        option_base.finalize_options(self)
        if self.remove and len(self.args) != 1:
            raise DistutilsOptionError(
                "Must specify exactly one argument (the alias name) when "
                "using --remove"
            )

    def run(self):
        aliases = self.distribution.get_option_dict('aliases')

        if not self.args:
            print("Command Aliases")
            print("---------------")
            for alias in aliases:
                print("setup.py alias", format_alias(alias, aliases))
            return

        elif len(self.args)==1:
            alias, = self.args
            if self.remove:
                command = None
            elif alias in aliases:
                print("setup.py alias", format_alias(alias, aliases))
                return
            else:
                print("No alias definition found for %r" % alias)
                return
        else:
            alias = self.args[0]
            command = ' '.join(map(shquote,self.args[1:]))

        edit_config(self.filename, {'aliases': {alias:command}}, self.dry_run)


def format_alias(name, aliases):
    source, command = aliases[name]
    if source == config_file('global'):
        source = '--global-config '
    elif source == config_file('user'):
        source = '--user-config '
    elif source == config_file('local'):
        source = ''
    else:
        source = '--filename=%r' % source
    return source+name+' '+command
            


python3.3/site-packages/setuptools/command/install_egg_info.py000064400000007371151733566760020600 0ustar00from setuptools import Command
from setuptools.archive_util import unpack_archive
from distutils import log, dir_util
import os, shutil, pkg_resources

class install_egg_info(Command):
    """Install an .egg-info directory for the package"""

    description = "Install an .egg-info directory for the package"

    user_options = [
        ('install-dir=', 'd', "directory to install to"),
    ]

    def initialize_options(self):
        self.install_dir = None

    def finalize_options(self):
        self.set_undefined_options('install_lib',('install_dir','install_dir'))
        ei_cmd = self.get_finalized_command("egg_info")
        basename = pkg_resources.Distribution(
            None, None, ei_cmd.egg_name, ei_cmd.egg_version
        ).egg_name()+'.egg-info'
        self.source = ei_cmd.egg_info
        self.target = os.path.join(self.install_dir, basename)
        self.outputs = [self.target]

    def run(self):
        self.run_command('egg_info')
        target = self.target
        if os.path.isdir(self.target) and not os.path.islink(self.target):
            dir_util.remove_tree(self.target, dry_run=self.dry_run)
        elif os.path.exists(self.target):
            self.execute(os.unlink,(self.target,),"Removing "+self.target)
        if not self.dry_run:
            pkg_resources.ensure_directory(self.target)
        self.execute(self.copytree, (),
            "Copying %s to %s" % (self.source, self.target)
        )
        self.install_namespaces()

    def get_outputs(self):
        return self.outputs

    def copytree(self):
        # Copy the .egg-info tree to site-packages
        def skimmer(src,dst):
            # filter out source-control directories; note that 'src' is always
            # a '/'-separated path, regardless of platform.  'dst' is a
            # platform-specific path.
            for skip in '.svn/','CVS/':
                if src.startswith(skip) or '/'+skip in src:
                    return None
            self.outputs.append(dst)
            log.debug("Copying %s to %s", src, dst)
            return dst
        unpack_archive(self.source, self.target, skimmer)

























    def install_namespaces(self):
        nsp = self._get_all_ns_packages()
        if not nsp: return
        filename,ext = os.path.splitext(self.target)
        filename += '-nspkg.pth'; self.outputs.append(filename)
        log.info("Installing %s",filename)
        if not self.dry_run:
            f = open(filename,'wt')
            for pkg in nsp:
                # ensure pkg is not a unicode string under Python 2.7
                pkg = str(pkg)
                pth = tuple(pkg.split('.'))
                trailer = '\n'
                if '.' in pkg:
                    trailer = (
                        "; m and setattr(sys.modules[%r], %r, m)\n"
                        % ('.'.join(pth[:-1]), pth[-1])
                    )
                f.write(
                    "import sys,types,os; "
                    "p = os.path.join(sys._getframe(1).f_locals['sitedir'], "
                        "*%(pth)r); "
                    "ie = os.path.exists(os.path.join(p,'__init__.py')); "
                    "m = not ie and "
                        "sys.modules.setdefault(%(pkg)r,types.ModuleType(%(pkg)r)); "
                    "mp = (m or []) and m.__dict__.setdefault('__path__',[]); "
                    "(p not in mp) and mp.append(p)%(trailer)s"
                    % locals()
                )
            f.close()

    def _get_all_ns_packages(self):
        nsp = {}
        for pkg in self.distribution.namespace_packages or []:
            pkg = pkg.split('.')
            while pkg:
                nsp['.'.join(pkg)] = 1
                pkg.pop()
        nsp=list(nsp)
        nsp.sort()  # set up shorter names first
        return nsp


python3.3/site-packages/setuptools/command/__init__.py000064400000001051151733566760017021 0ustar00__all__ = [
    'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop',
    'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
    'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts',
    'register', 'bdist_wininst', 'upload_docs',
]

from setuptools.command import install_scripts
import sys

from distutils.command.bdist import bdist

if 'egg' not in bdist.format_commands:
    bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
    bdist.format_commands.append('egg')

del bdist, sys
python3.3/site-packages/setuptools/command/saveopts.py000064400000001301151733566760017124 0ustar00import distutils, os
from setuptools import Command
from setuptools.command.setopt import edit_config, option_base

class saveopts(option_base):
    """Save command-line options to a file"""

    description = "save supplied options to setup.cfg or other config file"

    def run(self):
        dist = self.distribution
        settings = {}

        for cmd in dist.command_options:

            if cmd=='saveopts':
                continue    # don't save our own options!

            for opt,(src,val) in dist.get_option_dict(cmd).items():
                if src=="command line":
                    settings.setdefault(cmd,{})[opt] = val

        edit_config(self.filename, settings, self.dry_run)

python3.3/site-packages/setuptools/command/sdist.py000064400000020225151733566760016414 0ustar00import os
import re
import sys
from glob import glob

import pkg_resources
from distutils.command.sdist import sdist as _sdist
from distutils.util import convert_path
from distutils import log
from setuptools import svn_utils

READMES = ('README', 'README.rst', 'README.txt')


def walk_revctrl(dirname=''):
    """Find all files under revision control"""
    for ep in pkg_resources.iter_entry_points('setuptools.file_finders'):
        for item in ep.load()(dirname):
            yield item


#TODO will need test case
class re_finder(object):

    def __init__(self, path, pattern, postproc=None):
        self.pattern = pattern
        self.postproc = postproc
        self.path = convert_path(path)

    def _finder(self, dirname, filename):
        f = open(filename,'rU')
        try:
            data = f.read()
        finally:
            f.close()
        for match in self.pattern.finditer(data):
            path = match.group(1)
            if self.postproc:
                #postproc used to be used when the svn finder
                #was an re_finder for calling unescape
                path = self.postproc(path)
            yield svn_utils.joinpath(dirname,path)
    def __call__(self, dirname=''):
        path = svn_utils.joinpath(dirname, self.path)

        if os.path.isfile(path):
            for path in self._finder(dirname,path):
                if os.path.isfile(path):
                    yield path
                elif os.path.isdir(path):
                    for item in self(path):
                        yield item


def _default_revctrl(dirname=''):
    'Primary svn_cvs entry point'
    for finder in finders:
        for item in finder(dirname):
            yield item


finders = [
    re_finder('CVS/Entries', re.compile(r"^\w?/([^/]+)/", re.M)),
    svn_utils.svn_finder,
]



class sdist(_sdist):
    """Smart sdist that finds anything supported by revision control"""

    user_options = [
        ('formats=', None,
         "formats for source distribution (comma-separated list)"),
        ('keep-temp', 'k',
         "keep the distribution tree around after creating " +
         "archive file(s)"),
        ('dist-dir=', 'd',
         "directory to put the source distribution archive(s) in "
         "[default: dist]"),
        ]

    negative_opt = {}

    def run(self):
        self.run_command('egg_info')
        ei_cmd = self.get_finalized_command('egg_info')
        self.filelist = ei_cmd.filelist
        self.filelist.append(os.path.join(ei_cmd.egg_info,'SOURCES.txt'))
        self.check_readme()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        # Call check_metadata only if no 'check' command
        # (distutils <= 2.6)
        import distutils.command
        if 'check' not in distutils.command.__all__:
            self.check_metadata()

        self.make_distribution()

        dist_files = getattr(self.distribution,'dist_files',[])
        for file in self.archive_files:
            data = ('sdist', '', file)
            if data not in dist_files:
                dist_files.append(data)

    def __read_template_hack(self):
        # This grody hack closes the template file (MANIFEST.in) if an
        #  exception occurs during read_template.
        # Doing so prevents an error when easy_install attempts to delete the
        #  file.
        try:
            _sdist.read_template(self)
        except:
            sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
            raise
    # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle
    #  has been fixed, so only override the method if we're using an earlier
    #  Python.
    has_leaky_handle = (
        sys.version_info < (2,7,2)
        or (3,0) <= sys.version_info < (3,1,4)
        or (3,2) <= sys.version_info < (3,2,1)
    )
    if has_leaky_handle:
        read_template = __read_template_hack

    def add_defaults(self):
        standards = [READMES,
                     self.distribution.script_name]
        for fn in standards:
            if isinstance(fn, tuple):
                alts = fn
                got_it = 0
                for fn in alts:
                    if os.path.exists(fn):
                        got_it = 1
                        self.filelist.append(fn)
                        break

                if not got_it:
                    self.warn("standard file not found: should have one of " +
                              ', '.join(alts))
            else:
                if os.path.exists(fn):
                    self.filelist.append(fn)
                else:
                    self.warn("standard file '%s' not found" % fn)

        optional = ['test/test*.py', 'setup.cfg']
        for pattern in optional:
            files = list(filter(os.path.isfile, glob(pattern)))
            if files:
                self.filelist.extend(files)

        # getting python files
        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            self.filelist.extend(build_py.get_source_files())
            # This functionality is incompatible with include_package_data, and
            # will in fact create an infinite recursion if include_package_data
            # is True.  Use of include_package_data will imply that
            # distutils-style automatic handling of package_data is disabled
            if not self.distribution.include_package_data:
                for _, src_dir, _, filenames in build_py.data_files:
                    self.filelist.extend([os.path.join(src_dir, filename)
                                          for filename in filenames])

        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            self.filelist.extend(build_ext.get_source_files())

        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.filelist.extend(build_clib.get_source_files())

        if self.distribution.has_scripts():
            build_scripts = self.get_finalized_command('build_scripts')
            self.filelist.extend(build_scripts.get_source_files())

    def check_readme(self):
        for f in READMES:
            if os.path.exists(f):
                return
        else:
            self.warn(
                "standard file not found: should have one of " +', '.join(READMES)
            )

    def make_release_tree(self, base_dir, files):
        _sdist.make_release_tree(self, base_dir, files)

        # Save any egg_info command line options used to create this sdist
        dest = os.path.join(base_dir, 'setup.cfg')
        if hasattr(os,'link') and os.path.exists(dest):
            # unlink and re-copy, since it might be hard-linked, and
            # we don't want to change the source version
            os.unlink(dest)
            self.copy_file('setup.cfg', dest)

        self.get_finalized_command('egg_info').save_version_info(dest)

    def _manifest_is_not_generated(self):
        # check for special comment used in 2.7.1 and higher
        if not os.path.isfile(self.manifest):
            return False

        fp = open(self.manifest, 'rbU')
        try:
            first_line = fp.readline()
        finally:
            fp.close()
        return first_line != '# file GENERATED by distutils, do NOT edit\n'.encode()

    def read_manifest(self):
        """Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        """
        log.info("reading manifest file '%s'", self.manifest)
        manifest = open(self.manifest, 'rbU')
        for line in manifest:
            # The manifest must contain UTF-8. See #303.
            if sys.version_info >= (3,):
                try:
                    line = line.decode('UTF-8')
                except UnicodeDecodeError:
                    log.warn("%r not UTF-8 decodable -- skipping" % line)
                    continue
            # ignore comments and blank lines
            line = line.strip()
            if line.startswith('#') or not line:
                continue
            self.filelist.append(line)
        manifest.close()
python3.3/site-packages/setuptools/command/develop.py000064400000014457151733566760016736 0ustar00from setuptools.command.easy_install import easy_install
from distutils.util import convert_path, subst_vars
from pkg_resources import Distribution, PathMetadata, normalize_path
from distutils import log
from distutils.errors import DistutilsError, DistutilsOptionError
import os, sys, setuptools, glob

class develop(easy_install):
    """Set up package for development"""

    description = "install package in 'development mode'"

    user_options = easy_install.user_options + [
        ("uninstall", "u", "Uninstall this source package"),
        ("egg-path=", None, "Set the path to be used in the .egg-link file"),
    ]

    boolean_options = easy_install.boolean_options + ['uninstall']

    command_consumes_arguments = False  # override base

    def run(self):
        if self.uninstall:
            self.multi_version = True
            self.uninstall_link()
        else:
            self.install_for_development()
        self.warn_deprecated_options()

    def initialize_options(self):
        self.uninstall = None
        self.egg_path = None
        easy_install.initialize_options(self)
        self.setup_path = None
        self.always_copy_from = '.'   # always copy eggs installed in curdir



    def finalize_options(self):
        ei = self.get_finalized_command("egg_info")
        if ei.broken_egg_info:
            raise DistutilsError(
            "Please rename %r to %r before using 'develop'"
            % (ei.egg_info, ei.broken_egg_info)
            )
        self.args = [ei.egg_name]




        easy_install.finalize_options(self)
        self.expand_basedirs()
        self.expand_dirs()
        # pick up setup-dir .egg files only: no .egg-info
        self.package_index.scan(glob.glob('*.egg'))

        self.egg_link = os.path.join(self.install_dir, ei.egg_name+'.egg-link')
        self.egg_base = ei.egg_base
        if self.egg_path is None:
            self.egg_path = os.path.abspath(ei.egg_base)

        target = normalize_path(self.egg_base)
        if normalize_path(os.path.join(self.install_dir, self.egg_path)) != target:
            raise DistutilsOptionError(
                "--egg-path must be a relative path from the install"
                " directory to "+target
        )

        # Make a distribution for the package's source
        self.dist = Distribution(
            target,
            PathMetadata(target, os.path.abspath(ei.egg_info)),
            project_name = ei.egg_name
        )

        p = self.egg_base.replace(os.sep,'/')
        if p!= os.curdir:
            p = '../' * (p.count('/')+1)
        self.setup_path = p
        p = normalize_path(os.path.join(self.install_dir, self.egg_path, p))
        if  p != normalize_path(os.curdir):
            raise DistutilsOptionError(
                "Can't get a consistent path to setup script from"
                " installation directory", p, normalize_path(os.curdir))

    def install_for_development(self):
        if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False):
            # If we run 2to3 we can not do this inplace:

            # Ensure metadata is up-to-date
            self.reinitialize_command('build_py', inplace=0)
            self.run_command('build_py')
            bpy_cmd = self.get_finalized_command("build_py")
            build_path = normalize_path(bpy_cmd.build_lib)

            # Build extensions
            self.reinitialize_command('egg_info', egg_base=build_path)
            self.run_command('egg_info')

            self.reinitialize_command('build_ext', inplace=0)
            self.run_command('build_ext')
            
            # Fixup egg-link and easy-install.pth
            ei_cmd = self.get_finalized_command("egg_info")
            self.egg_path = build_path
            self.dist.location = build_path
            self.dist._provider = PathMetadata(build_path, ei_cmd.egg_info)    # XXX
        else:
            # Without 2to3 inplace works fine:
            self.run_command('egg_info')

            # Build extensions in-place
            self.reinitialize_command('build_ext', inplace=1)
            self.run_command('build_ext')
        
        self.install_site_py()  # ensure that target dir is site-safe
        if setuptools.bootstrap_install_from:
            self.easy_install(setuptools.bootstrap_install_from)
            setuptools.bootstrap_install_from = None

        # create an .egg-link in the installation dir, pointing to our egg
        log.info("Creating %s (link to %s)", self.egg_link, self.egg_base)
        if not self.dry_run:
            f = open(self.egg_link,"w")
            f.write(self.egg_path + "\n" + self.setup_path)
            f.close()
        # postprocess the installed distro, fixing up .pth, installing scripts,
        # and handling requirements
        self.process_distribution(None, self.dist, not self.no_deps)


    def uninstall_link(self):
        if os.path.exists(self.egg_link):
            log.info("Removing %s (link to %s)", self.egg_link, self.egg_base)
            egg_link_file = open(self.egg_link)
            contents = [line.rstrip() for line in egg_link_file]
            egg_link_file.close()
            if contents not in ([self.egg_path], [self.egg_path, self.setup_path]):
                log.warn("Link points to %s: uninstall aborted", contents)
                return
            if not self.dry_run:
                os.unlink(self.egg_link)
        if not self.dry_run:
            self.update_pth(self.dist)  # remove any .pth link to us
        if self.distribution.scripts:
            # XXX should also check for entry point scripts!
            log.warn("Note: you must uninstall or replace scripts manually!")

    def install_egg_scripts(self, dist):
        if dist is not self.dist:
            # Installing a dependency, so fall back to normal behavior
            return easy_install.install_egg_scripts(self,dist)

        # create wrapper scripts in the script dir, pointing to dist.scripts

        # new-style...
        self.install_wrapper_scripts(dist)

        # ...and old-style
        for script_name in self.distribution.scripts or []:
            script_path = os.path.abspath(convert_path(script_name))
            script_name = os.path.basename(script_path)
            f = open(script_path,'rU')
            script_text = f.read()
            f.close()
            self.install_script(dist, script_name, script_text, script_path)

python3.3/site-packages/setuptools/command/bdist_wininst.py000064400000004353151733566760020152 0ustar00from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst
import os, sys

class bdist_wininst(_bdist_wininst):
    _good_upload = _bad_upload = None

    def create_exe(self, arcname, fullname, bitmap=None):
        _bdist_wininst.create_exe(self, arcname, fullname, bitmap)
        installer_name = self.get_installer_filename(fullname) 
        if self.target_version:
            pyversion = self.target_version
            # fix 2.5+ bdist_wininst ignoring --target-version spec
            self._bad_upload = ('bdist_wininst', 'any', installer_name)
        else:
            pyversion = 'any'
        self._good_upload = ('bdist_wininst', pyversion, installer_name)
        
    def _fix_upload_names(self):
        good, bad = self._good_upload, self._bad_upload
        dist_files = getattr(self.distribution, 'dist_files', [])
        if bad in dist_files:
            dist_files.remove(bad)
        if good not in dist_files:
            dist_files.append(good)

    def reinitialize_command (self, command, reinit_subcommands=0):
        cmd = self.distribution.reinitialize_command(
            command, reinit_subcommands)
        if command in ('install', 'install_lib'):
            cmd.install_lib = None  # work around distutils bug
        return cmd

    def run(self):
        self._is_running = True
        try:
            _bdist_wininst.run(self)
            self._fix_upload_names()
        finally:
            self._is_running = False


    if not hasattr(_bdist_wininst, 'get_installer_filename'):
        def get_installer_filename(self, fullname):
            # Factored out to allow overriding in subclasses
            if self.target_version:
                # if we create an installer for a specific python version,
                # it's better to include this in the name
                installer_name = os.path.join(self.dist_dir,
                                              "%s.win32-py%s.exe" %
                                               (fullname, self.target_version))
            else:
                installer_name = os.path.join(self.dist_dir,
                                              "%s.win32.exe" % fullname)
            return installer_name
    # get_installer_filename()
    


























python3.3/site-packages/setuptools/command/setopt.py000064400000011714151733566760016607 0ustar00import distutils, os
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import *

__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']


def config_file(kind="local"):
    """Get the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    """
    if kind=='local':
        return 'setup.cfg'
    if kind=='global':
        return os.path.join(
            os.path.dirname(distutils.__file__),'distutils.cfg'
        )
    if kind=='user':
        dot = os.name=='posix' and '.' or ''
        return os.path.expanduser(convert_path("~/%spydistutils.cfg" % dot))
    raise ValueError(
        "config_file() type must be 'local', 'global', or 'user'", kind
    )















def edit_config(filename, settings, dry_run=False):
    """Edit a configuration file to include `settings`

    `settings` is a dictionary of dictionaries or ``None`` values, keyed by
    command/section name.  A ``None`` value means to delete the entire section,
    while a dictionary lists settings to be changed or deleted in that section.
    A setting of ``None`` means to delete that setting.
    """
    from setuptools.compat import ConfigParser
    log.debug("Reading configuration from %s", filename)
    opts = ConfigParser.RawConfigParser()
    opts.read([filename])
    for section, options in settings.items():
        if options is None:
            log.info("Deleting section [%s] from %s", section, filename)
            opts.remove_section(section)
        else:
            if not opts.has_section(section):
                log.debug("Adding new section [%s] to %s", section, filename)
                opts.add_section(section)
            for option,value in options.items():
                if value is None:
                    log.debug("Deleting %s.%s from %s",
                        section, option, filename
                    )
                    opts.remove_option(section,option)
                    if not opts.options(section):
                        log.info("Deleting empty [%s] section from %s",
                                  section, filename)
                        opts.remove_section(section)
                else:
                    log.debug(
                        "Setting %s.%s to %r in %s",
                        section, option, value, filename
                    )
                    opts.set(section,option,value)

    log.info("Writing %s", filename)
    if not dry_run:
        f = open(filename,'w'); opts.write(f); f.close()

class option_base(Command):
    """Abstract base class for commands that mess with config files"""
    
    user_options = [
        ('global-config', 'g',
                 "save options to the site-wide distutils.cfg file"),
        ('user-config', 'u',
                 "save options to the current user's pydistutils.cfg file"),
        ('filename=', 'f',
                 "configuration file to use (default=setup.cfg)"),
    ]

    boolean_options = [
        'global-config', 'user-config',
    ]    

    def initialize_options(self):
        self.global_config = None
        self.user_config   = None
        self.filename = None

    def finalize_options(self):
        filenames = []
        if self.global_config:
            filenames.append(config_file('global'))
        if self.user_config:
            filenames.append(config_file('user'))
        if self.filename is not None:
            filenames.append(self.filename)
        if not filenames:
            filenames.append(config_file('local'))
        if len(filenames)>1:
            raise DistutilsOptionError(
                "Must specify only one configuration file option",
                filenames
            )
        self.filename, = filenames    




class setopt(option_base):
    """Save command-line options to a file"""

    description = "set an option in setup.cfg or another config file"

    user_options = [
        ('command=', 'c', 'command to set an option for'),
        ('option=',  'o',  'option to set'),
        ('set-value=',   's', 'value of the option'),
        ('remove',   'r', 'remove (unset) the value'), 
    ] + option_base.user_options

    boolean_options = option_base.boolean_options + ['remove']

    def initialize_options(self):
        option_base.initialize_options(self)
        self.command = None
        self.option = None
        self.set_value = None
        self.remove = None

    def finalize_options(self):
        option_base.finalize_options(self)
        if self.command is None or self.option is None:
            raise DistutilsOptionError("Must specify --command *and* --option")
        if self.set_value is None and not self.remove:
            raise DistutilsOptionError("Must specify --set-value or --remove")

    def run(self):
        edit_config(
            self.filename, {
                self.command: {self.option.replace('-','_'):self.set_value}
            },
            self.dry_run
        )






python3.3/site-packages/setuptools/command/egg_info.py000064400000033760151733566760017053 0ustar00"""setuptools.command.egg_info

Create a distribution's .egg-info directory and contents"""

import os
import re
import sys

from setuptools import Command
import distutils.errors
from distutils import log
from setuptools.command.sdist import sdist
from setuptools.compat import basestring
from setuptools import svn_utils
from distutils.util import convert_path
from distutils.filelist import FileList as _FileList
from pkg_resources import (parse_requirements, safe_name, parse_version,
    safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
from setuptools.command.sdist import walk_revctrl


class egg_info(Command):
    description = "create a distribution's .egg-info directory"

    user_options = [
        ('egg-base=', 'e', "directory containing .egg-info directories"
                           " (default: top of the source tree)"),
        ('tag-svn-revision', 'r',
            "Add subversion revision ID to version number"),
        ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"),
        ('tag-build=', 'b', "Specify explicit tag to add to version number"),
        ('no-svn-revision', 'R',
            "Don't add subversion revision ID [default]"),
        ('no-date', 'D', "Don't include date stamp [default]"),
    ]

    boolean_options = ['tag-date', 'tag-svn-revision']
    negative_opt = {'no-svn-revision': 'tag-svn-revision',
                    'no-date': 'tag-date'}

    def initialize_options(self):
        self.egg_name = None
        self.egg_version = None
        self.egg_base = None
        self.egg_info = None
        self.tag_build = None
        self.tag_svn_revision = 0
        self.tag_date = 0
        self.broken_egg_info = False
        self.vtags = None

    def save_version_info(self, filename):
        from setuptools.command.setopt import edit_config
        values = dict(
            egg_info=dict(
                tag_svn_revision=0,
                tag_date=0,
                tag_build=self.tags(),
            )
        )
        edit_config(filename, values)

    def finalize_options(self):
        self.egg_name = safe_name(self.distribution.get_name())
        self.vtags = self.tags()
        self.egg_version = self.tagged_version()

        try:
            list(
                parse_requirements('%s==%s' % (self.egg_name,self.egg_version))
            )
        except ValueError:
            raise distutils.errors.DistutilsOptionError(
                "Invalid distribution name or version syntax: %s-%s" %
                (self.egg_name,self.egg_version)
            )

        if self.egg_base is None:
            dirs = self.distribution.package_dir
            self.egg_base = (dirs or {}).get('',os.curdir)

        self.ensure_dirname('egg_base')
        self.egg_info = to_filename(self.egg_name)+'.egg-info'
        if self.egg_base != os.curdir:
            self.egg_info = os.path.join(self.egg_base, self.egg_info)
        if '-' in self.egg_name: self.check_broken_egg_info()

        # Set package version for the benefit of dumber commands
        # (e.g. sdist, bdist_wininst, etc.)
        #
        self.distribution.metadata.version = self.egg_version

        # If we bootstrapped around the lack of a PKG-INFO, as might be the
        # case in a fresh checkout, make sure that any special tags get added
        # to the version info
        #
        pd = self.distribution._patched_dist
        if pd is not None and pd.key==self.egg_name.lower():
            pd._version = self.egg_version
            pd._parsed_version = parse_version(self.egg_version)
            self.distribution._patched_dist = None

    def write_or_delete_file(self, what, filename, data, force=False):
        """Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        """
        if data:
            self.write_file(what, filename, data)
        elif os.path.exists(filename):
            if data is None and not force:
                log.warn(
                    "%s not set in setup(), but %s exists", what, filename
                )
                return
            else:
                self.delete_file(filename)

    def write_file(self, what, filename, data):
        """Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        """
        log.info("writing %s to %s", what, filename)
        if sys.version_info >= (3,):
            data = data.encode("utf-8")
        if not self.dry_run:
            f = open(filename, 'wb')
            f.write(data)
            f.close()

    def delete_file(self, filename):
        """Delete `filename` (if not a dry run) after announcing it"""
        log.info("deleting %s", filename)
        if not self.dry_run:
            os.unlink(filename)

    def tagged_version(self):
        version = self.distribution.get_version()
        # egg_info may be called more than once for a distribution,
        # in which case the version string already contains all tags.
        if self.vtags and version.endswith(self.vtags):
            return safe_version(version)
        return safe_version(version + self.vtags)

    def run(self):
        self.mkpath(self.egg_info)
        installer = self.distribution.fetch_build_egg
        for ep in iter_entry_points('egg_info.writers'):
            writer = ep.load(installer=installer)
            writer(self, ep.name, os.path.join(self.egg_info,ep.name))

        # Get rid of native_libs.txt if it was put there by older bdist_egg
        nl = os.path.join(self.egg_info, "native_libs.txt")
        if os.path.exists(nl):
            self.delete_file(nl)

        self.find_sources()

    def tags(self):
        version = ''
        if self.tag_build:
            version+=self.tag_build
        if self.tag_svn_revision and (
            os.path.exists('.svn') or os.path.exists('PKG-INFO')
        ):  version += '-r%s' % self.get_svn_revision()
        if self.tag_date:
            import time
            version += time.strftime("-%Y%m%d")
        return version

    @staticmethod
    def get_svn_revision():
        return str(svn_utils.SvnInfo.load(os.curdir).get_revision())

    def find_sources(self):
        """Generate SOURCES.txt manifest file"""
        manifest_filename = os.path.join(self.egg_info,"SOURCES.txt")
        mm = manifest_maker(self.distribution)
        mm.manifest = manifest_filename
        mm.run()
        self.filelist = mm.filelist

    def check_broken_egg_info(self):
        bei = self.egg_name+'.egg-info'
        if self.egg_base != os.curdir:
            bei = os.path.join(self.egg_base, bei)
        if os.path.exists(bei):
            log.warn(
                "-"*78+'\n'
                "Note: Your current .egg-info directory has a '-' in its name;"
                '\nthis will not work correctly with "setup.py develop".\n\n'
                'Please rename %s to %s to correct this problem.\n'+'-'*78,
                bei, self.egg_info
            )
            self.broken_egg_info = self.egg_info
            self.egg_info = bei     # make it work for now

class FileList(_FileList):
    """File list that accepts only existing, platform-independent paths"""

    def append(self, item):
        if item.endswith('\r'):     # Fix older sdists built on Windows
            item = item[:-1]
        path = convert_path(item)

        if sys.version_info >= (3,):
            try:
                if os.path.exists(path) or os.path.exists(path.encode('utf-8')):
                    self.files.append(path)
            except UnicodeEncodeError:
                # Accept UTF-8 filenames even if LANG=C
                if os.path.exists(path.encode('utf-8')):
                    self.files.append(path)
                else:
                    log.warn("'%s' not %s encodable -- skipping", path,
                        sys.getfilesystemencoding())
        else:
            if os.path.exists(path):
                self.files.append(path)


class manifest_maker(sdist):

    template = "MANIFEST.in"

    def initialize_options(self):
        self.use_defaults = 1
        self.prune = 1
        self.manifest_only = 1
        self.force_manifest = 1

    def finalize_options(self):
        pass

    def run(self):
        self.filelist = FileList()
        if not os.path.exists(self.manifest):
            self.write_manifest()   # it must exist so it'll get in the list
        self.filelist.findall()
        self.add_defaults()
        if os.path.exists(self.template):
            self.read_template()
        self.prune_file_list()
        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest()

    def write_manifest(self):
        """Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        """
        # The manifest must be UTF-8 encodable. See #303.
        if sys.version_info >= (3,):
            files = []
            for file in self.filelist.files:
                try:
                    file.encode("utf-8")
                except UnicodeEncodeError:
                    log.warn("'%s' not UTF-8 encodable -- skipping" % file)
                else:
                    files.append(file)
            self.filelist.files = files

        files = self.filelist.files
        if os.sep!='/':
            files = [f.replace(os.sep,'/') for f in files]
        self.execute(write_file, (self.manifest, files),
                     "writing manifest file '%s'" % self.manifest)

    def warn(self, msg):    # suppress missing-file warnings from sdist
        if not msg.startswith("standard file not found:"):
            sdist.warn(self, msg)

    def add_defaults(self):
        sdist.add_defaults(self)
        self.filelist.append(self.template)
        self.filelist.append(self.manifest)
        rcfiles = list(walk_revctrl())
        if rcfiles:
            self.filelist.extend(rcfiles)
        elif os.path.exists(self.manifest):
            self.read_manifest()
        ei_cmd = self.get_finalized_command('egg_info')
        self.filelist.include_pattern("*", prefix=ei_cmd.egg_info)

    def prune_file_list(self):
        build = self.get_finalized_command('build')
        base_dir = self.distribution.get_fullname()
        self.filelist.exclude_pattern(None, prefix=build.build_base)
        self.filelist.exclude_pattern(None, prefix=base_dir)
        sep = re.escape(os.sep)
        self.filelist.exclude_pattern(sep+r'(RCS|CVS|\.svn)'+sep, is_regex=1)


def write_file(filename, contents):
    """Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    """
    contents = "\n".join(contents)
    if sys.version_info >= (3,):
        contents = contents.encode("utf-8")
    f = open(filename, "wb")        # always write POSIX-style manifest
    f.write(contents)
    f.close()

def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name
        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution,'zip_safe',None)
        from setuptools.command import bdist_egg
        bdist_egg.write_safety_flag(cmd.egg_info, safe)

def warn_depends_obsolete(cmd, basename, filename):
    if os.path.exists(filename):
        log.warn(
            "WARNING: 'depends.txt' is not used by setuptools 0.6!\n"
            "Use the install_requires/extras_require setup() args instead."
        )


def write_requirements(cmd, basename, filename):
    dist = cmd.distribution
    data = ['\n'.join(yield_lines(dist.install_requires or ()))]
    for extra,reqs in (dist.extras_require or {}).items():
        data.append('\n\n[%s]\n%s' % (extra, '\n'.join(yield_lines(reqs))))
    cmd.write_or_delete_file("requirements", filename, ''.join(data))

def write_toplevel_names(cmd, basename, filename):
    pkgs = dict.fromkeys(
        [
            k.split('.',1)[0]
            for k in cmd.distribution.iter_distribution_names()
        ]
    )
    cmd.write_file("top-level names", filename, '\n'.join(pkgs)+'\n')


def overwrite_arg(cmd, basename, filename):
    write_arg(cmd, basename, filename, True)

def write_arg(cmd, basename, filename, force=False):
    argname = os.path.splitext(basename)[0]
    value = getattr(cmd.distribution, argname, None)
    if value is not None:
        value = '\n'.join(value)+'\n'
    cmd.write_or_delete_file(argname, filename, value, force)

def write_entries(cmd, basename, filename):
    ep = cmd.distribution.entry_points

    if isinstance(ep,basestring) or ep is None:
        data = ep
    elif ep is not None:
        data = []
        for section, contents in ep.items():
            if not isinstance(contents,basestring):
                contents = EntryPoint.parse_group(section, contents)
                contents = '\n'.join(map(str,contents.values()))
            data.append('[%s]\n%s\n\n' % (section,contents))
        data = ''.join(data)

    cmd.write_or_delete_file('entry points', filename, data, True)

def get_pkg_info_revision():
    # See if we can get a -r### off of PKG-INFO, in case this is an sdist of
    # a subversion revision
    #
    if os.path.exists('PKG-INFO'):
        f = open('PKG-INFO','rU')
        for line in f:
            match = re.match(r"Version:.*-r(\d+)\s*$", line)
            if match:
                return int(match.group(1))
        f.close()
    return 0
python3.3/site-packages/setuptools/command/install.py000064400000007741151733566760016744 0ustar00import setuptools, sys, glob
from distutils.command.install import install as _install
from distutils.errors import DistutilsArgError

class install(_install):
    """Use easy_install to install the package, w/dependencies"""

    user_options = _install.user_options + [
        ('old-and-unmanageable', None, "Try not to use this!"),
        ('single-version-externally-managed', None,
            "used by system package builders to create 'flat' eggs"),
    ]
    boolean_options = _install.boolean_options + [
        'old-and-unmanageable', 'single-version-externally-managed',
    ]
    new_commands = [
        ('install_egg_info', lambda self: True),
        ('install_scripts',  lambda self: True),
    ]
    _nc = dict(new_commands)

    def initialize_options(self):
        _install.initialize_options(self)
        self.old_and_unmanageable = None
        self.single_version_externally_managed = None
        self.no_compile = None  # make DISTUTILS_DEBUG work right!

    def finalize_options(self):
        _install.finalize_options(self)
        if self.root:
            self.single_version_externally_managed = True
        elif self.single_version_externally_managed:
            if not self.root and not self.record:
                raise DistutilsArgError(
                    "You must specify --record or --root when building system"
                    " packages"
                )

    def handle_extra_path(self):
        if self.root or self.single_version_externally_managed:
            # explicit backward-compatibility mode, allow extra_path to work
            return _install.handle_extra_path(self)

        # Ignore extra_path when installing an egg (or being run by another
        # command without --root or --single-version-externally-managed
        self.path_file = None
        self.extra_dirs = ''


    def run(self):
        # Explicit request for old-style install?  Just do it
        if self.old_and_unmanageable or self.single_version_externally_managed:
            return _install.run(self)

        # Attempt to detect whether we were called from setup() or by another
        # command.  If we were called by setup(), our caller will be the
        # 'run_command' method in 'distutils.dist', and *its* caller will be
        # the 'run_commands' method.  If we were called any other way, our
        # immediate caller *might* be 'run_command', but it won't have been
        # called by 'run_commands'.  This is slightly kludgy, but seems to
        # work.
        #
        caller = sys._getframe(2)
        caller_module = caller.f_globals.get('__name__','')
        caller_name = caller.f_code.co_name

        if caller_module != 'distutils.dist' or caller_name!='run_commands':
            # We weren't called from the command line or setup(), so we
            # should run in backward-compatibility mode to support bdist_*
            # commands.
            _install.run(self)
        else:
            self.do_egg_install()






    def do_egg_install(self):

        easy_install = self.distribution.get_command_class('easy_install')

        cmd = easy_install(
            self.distribution, args="x", root=self.root, record=self.record,
        )
        cmd.ensure_finalized()  # finalize before bdist_egg munges install cmd
        cmd.always_copy_from = '.'  # make sure local-dir eggs get installed

        # pick up setup-dir .egg files only: no .egg-info
        cmd.package_index.scan(glob.glob('*.egg'))

        self.run_command('bdist_egg')
        args = [self.distribution.get_command_obj('bdist_egg').egg_output]

        if setuptools.bootstrap_install_from:
            # Bootstrap self-installation of setuptools
            args.insert(0, setuptools.bootstrap_install_from)

        cmd.args = args
        cmd.run()
        setuptools.bootstrap_install_from = None

# XXX Python 3.1 doesn't see _nc if this is inside the class
install.sub_commands = [
        cmd for cmd in _install.sub_commands if cmd[0] not in install._nc
    ] + install.new_commands
















#
python3.3/site-packages/setuptools/__pycache__/svn_utils.cpython-33.pyc000064400000064210151733566760022161 0ustar00�
�Re�Ec@siddlZddlZddlZddlmZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZyddlZWn!ek
r�ddljZYnXddlmZmZeedddd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Ze�Z ddd�Z!dd�Z"ddd�Z#dd�Z$dd�Z%Gdd�de&�Z'Gdd �d e'�Z(Gd!d"�d"e(�Z)Gd#d$�d$e'�Z*dd%d&�Z+Gd'd(�d(e&�Z,Gd)d*�d*e,�Z-Gd+d,�d,e,�Z.e/d-krex(e+ej0d.�D]Z1e2e1�qNWndS(/iN(ulog(uunicode(uunescape(uPopenuPIPEcCspy;t|d|d|dtjdk�}|j�|}Wntk
rSdSYnXt||�}|j|fS(Nustdoutustderrushelluwin32iu(iu(u_PopenusysuplatformucommunicateuOSErrorudecode_as_stringu
returncode(uargsustdoutustderruencodingustreamuprocudata((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu_run_commands
	u_run_commandcCs0|jd�d}djdd�|jD��S(NuscheduleiucSs+g|]!}|j|jkr|j�qS((unodeTypeu	TEXT_NODEu	nodeValue(u.0ut((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
<listcomp>2s	u'_get_entry_schedule.<locals>.<listcomp>(ugetElementsByTagNameujoinu
childNodes(uentryuschedule((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu_get_entry_schedule0su_get_entry_schedulecCs0|jd�d}djdd�|jD��S(NupropertyiucSs+g|]!}|j|jkr|j�qS((unodeTypeu	TEXT_NODEu	nodeValue(u.0ut((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
<listcomp>9s	u(_get_target_property.<locals>.<listcomp>(ugetElementsByTagNameujoinu
childNodes(utargetu
property_text((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu_get_target_property7su_get_target_propertycCs+tjdkr!|jd�}n|}|S(Niiuutf-8(ii(usysuversion_infouencode(udecoded_strudata((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
_get_xml_data>su
_get_xml_datacGs6|s|dkr#tjj|�Stjj||�S(Nu.(uosupathujoin(uprefixusuffix((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyujoinpathGsujoinpathcCs�yLtj�}|s"|dkr5tj�d}n|rKtj|�nWn!tjtfk
rod}YnXtj	dk}|s�ddg|S|j
d�r�|r�dS|SdS(NuUS-ASCIIiudarwinuutf-8umac-(ulocaleugetpreferredencodingugetdefaultlocaleucodecsulookupuErroruLookupErroruNoneusysuplatformu
startswith(uencodinguis_osx((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyudetermine_console_encodingLsudetermine_console_encodingcCsL|dkrt}nt|t�s6|j|�}ntjd|�}|S(u�
    Decode the console or file output explicitly using getpreferredencoding.
    The text paraemeter should be a encoded string, if not no decode occurs
    If no encoding is given, getpreferredencoding is used.  If encoding is
    specified, that is used instead.  This would be needed for SVN --xml
    output.  Unicode is explicitly put in composed NFC form.

    --xml should be UTF-8 (SVN Issue 2938) the discussion on the Subversion
    DEV List from 2007 seems to indicate the same.
    uNFCN(uNoneu_console_encodingu
isinstanceuunicodeudecodeuunicodedatau	normalize(utextuencoding((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyudecode_as_stringis
	udecode_as_stringcCs�tjjjt|��}t�}x||D]t\}}|dkr+|jdkr+|j|�t|�j	d�s�|j
|jd�|jd�f�q�q+q+W|dd�S(u+Parse the entries from a recursive info xmlu
START_ELEMENTuentryudeleteupathukindiN(uxmludomupulldomuparseStringu
_get_xml_dataulistunodeNameu
expandNodeu_get_entry_scheduleu
startswithuappendugetAttribute(udecoded_strudocuentriesueventunode((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuparse_dir_entries�s	
uparse_dir_entriesuc	Cstjj|�}tjj|�}tjjjt|��}t	�}x�|D]�\}}|dkrO|j
dkrO|j|�tjj|jd��}tjj|�j
|�r�|t|�dd�}nt|�}x-t|�D]}|jt||��q�WqOqOW|S(u!Parse a propget svn:externals xmlu
START_ELEMENTutargetupathiN(uosupathunormpathunormcaseuxmludomupulldomuparseStringu
_get_xml_dataulistunodeNameu
expandNodeugetAttributeu
startswithulenu_get_target_propertyuparse_external_propuappendujoinpath(	udecoded_struprefixudocu	externalsueventunodeupathudatauexternal((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuparse_externals_xml�s	
!uparse_externals_xmlcCs�g}x�|j�D]�}|j�}|s1qntjdkrR|jd�}ntj|�}tjd	kr�dd�|D�}ntj|d
�dr�|d}n
|d}t	|dd�}|j
tjj
|��qW|S(u�
    Parse the value of a retrieved svn:externals entry.

    possible token setups (with quotng and backscaping in laters versions)
        URL[@#] EXT_FOLDERNAME
        [-r#] URL EXT_FOLDERNAME
        EXT_FOLDERNAME [-r#] URL
    iiuutf-8cSsg|]}|jd��qS(uutf-8(udecode(u.0ux((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
<listcomp>�s	u'parse_external_prop.<locals>.<listcomp>iuencoding(ii(iii����i����(u
splitlinesulstripusysuversion_infouencodeushlexusplituurlparseuurlsplitudecode_as_stringuappenduosupathunormpath(ulinesu	externalsulineuexternal((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuparse_external_prop�s 	

uparse_external_propc	
Cs�d}t|d�}d}z�x�t|jd�D]}|j�}t|�dkr1|\}}|jt|��}|dkr�||kr�d}q�|dkr�|r�Pq�q1q1WWd|j	�X|S(NurtuiuKuVFT(
uFalseuopenuiterureadlineusplitulenureaduintuTrueuclose(	ufilenameukeyufoundufudataulineupartsukindulength((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuparse_prop_file�s	uparse_prop_filecBs�|EeZdZdZedd��Zejdej�Z	e
ddd��Zddd	�Zd
d�Z
edd
��Zedd��Zdd�Zdd�Zddd�Zdd�Zdd�ZdS(uSvnInfou�
    Generic svn_info object.  No has little knowledge of how to extract
    information.  Use cls.load to instatiate according svn version.

    Paths are not filesystem encoded.
    cCs?tdddg�\}}|dkr7|r7|j�SdSdS(Nusvnu	--versionu--quietiu(u_run_commandustrip(ucodeudata((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_svn_version�s
uSvnInfo.get_svn_versionu!(?:([\-0-9]+):)?(\d+)([a-z]*)\s*$uc	Cshtjj|�}tdd|g�\}}tjj|d�}tjjtjj|d��p�tjjtjj|d��p�tjjtjj|d��}t|j�jd��}y'tdd	�|dd
�D��}Wnt	k
rt�}YnX|st
|�S|s.|s.|dkrHtjd
t
�t|�S|dkr^t|�St|�S(Nusvnuinfou.svnuentriesu	dir-propsu
dir-prop-baseu.css|]}t|�VqdS(N(uint(u.0ux((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu	<genexpr>suSvnInfo.load.<locals>.<genexpr>iiiu?No SVN 1.3+ command found: falling back on pre 1.7 .svn parsingi(ii(ii(uosupathunormpathu_run_commandujoinuisfileutupleuget_svn_versionusplitu
ValueErroruSvnInfouwarningsuwarnuDeprecationWarninguSvnFileInfou	Svn13Infou	Svn15Info(	uclsudirnameunormdirucodeudatausvn_diruhas_svnusvn_versionubase_svn_version((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuload�s(!!!'

	

uSvnInfo.loadcCs||_d|_d|_dS(N(upathuNoneu_entriesu
_externals(uselfupath((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu__init__s		uSvnInfo.__init__cCshtdd|jg�\}}|r5tjd�dS|jj|�}|r`t|jd��SdSdS(u<Retrieve the directory revision informatino using svnversionu
svnversionu-cusvnversion failediiN(u_run_commandupathuloguwarnurevision_reumatchuintugroup(uselfucodeudatauparsed((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_revisions
uSvnInfo.get_revisioncCs(|jdkr!|j�|_n|jS(N(u_entriesuNoneuget_entries(uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuentries(suSvnInfo.entriescCs(|jdkr!|j�|_n|jS(N(u
_externalsuNoneu
get_externals(uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu	externals.suSvnInfo.externalsccsx|jD]}|Vq
WdS(uR
        Iterate over the svn:external references in the repository path.
        N(u	externals(uselfuitem((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuiter_externals4suSvnInfo.iter_externalsccs8x1|jD]&\}}|j�dkr
|Vq
q
WdS(uR
        Iterate over the non-deleted file entries in the repository path
        ufileN(uentriesulower(uselfuitemukind((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
iter_files;suSvnInfo.iter_filesccsI|r|jVnx1|jD]&\}}|j�dkr|VqqWdS(uR
        Iterate over the non-deleted file entries in the repository path
        udirN(upathuentriesulower(uselfuinclude_rootuitemukind((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu	iter_dirsCs
uSvnInfo.iter_dirscCsgS(N((uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_entriesMsuSvnInfo.get_entriescCsgS(N((uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
get_externalsPsuSvnInfo.get_externalsNT(u__name__u
__module__u__qualname__u__doc__ustaticmethoduget_svn_versionureucompileuIurevision_reuclassmethoduloadu__init__uget_revisionupropertyuentriesu	externalsuiter_externalsu
iter_filesuTrueu	iter_dirsuget_entriesu
get_externals(u
__locals__((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuSvnInfo�s


uSvnInfocBs,|EeZdZdd�Zdd�ZdS(u	Svn13InfocCsKtdddd|jgdd�\}}|rAtjd�gSt|�S(Nusvnuinfou-Ru--xmluencodinguutf-8usvn info failed(u_run_commandupathulogudebuguparse_dir_entries(uselfucodeudata((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_entriesUs
uSvn13Info.get_entriescCs�dddg}g}x�|j�D]�}t||gdd�\}}|dkrdtjd�gSxKt|�D]=}|r�tjj||�}n|jtjj	|��qqWq"W|S(Nusvnupropgetu
svn:externalsuencodinguutf-8iusvn propget failed(
u	iter_dirsu_run_commanduloguwarnuparse_external_propuosupathujoinuappendunormpath(uselfucmduresultufolderucodeulinesuexternal((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
get_externals_s
!uSvn13Info.get_externalsN(u__name__u
__module__u__qualname__uget_entriesu
get_externals(u
__locals__((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu	Svn13InfoTs
u	Svn13InfocBs |EeZdZdd�ZdS(u	Svn15InfocCsiddd|jddg}t|dd�\}}|rJtjd�gSt|d	tjj|j��S(
Nusvnupropgetu
svn:externalsu-Ru--xmluencodinguutf-8usvn propget faileduprefix(upathu_run_commandulogudebuguparse_externals_xmluosuabspath(uselfucmducodeulines((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
get_externalsss
uSvn15Info.get_externalsN(u__name__u
__module__u__qualname__u
get_externals(u
__locals__((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu	Svn15Inforsu	Svn15Infocse|EeZdZd�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z�S(uSvnFileInfoucs,tt|�j|�d|_d|_dS(N(usuperuSvnFileInfou__init__uNoneu_directoriesu	_revision(uselfupath(u	__class__(u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu__init__~s	uSvnFileInfo.__init__ccs�t|dd�}tjj|�r�tj|�}|d|j�fVx�|j�D]x}t	|�}t||�}tjj|�r�|ddfVqTtjj|�rTx|j
|�D]}|Vq�WqTqTWndS(Nu.svnuentriesFT(ujoinpathuosupathuisfileuSVNEntriesFileuloaduFalseuparse_revisionuget_undeleted_recordsudecode_as_stringuTrueuNoneuisdiru	_walk_svn(uselfubaseu
entry_fileuentriesupathuitem((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu	_walk_svn�suSvnFileInfo._walk_svncCs�t�}d}xa|j|j�D]M\}}}|rM|j|df�q"|j|df�t||�}q"W||_||_dS(Niufileudir(ulistu	_walk_svnupathuappendumaxu_entriesu	_revision(uselfuentriesurevupathuisfileudir_rev((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu_build_entries�s	"	uSvnFileInfo._build_entriescCs#|jdkr|j�n|jS(N(u_entriesuNoneu_build_entries(uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_entries�s
uSvnFileInfo.get_entriescCs#|jdkr|j�n|jS(N(u	_revisionuNoneu_build_entries(uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_revision�s
uSvnFileInfo.get_revisioncCs�ddgddgg}g}x�|j�D]�}d}x8|D]0}t||�}tjj|�r>|}q>q>W|dk	r+t|d�}t|dd�}|jt	|��q+q+W|S(Nu.svnu
dir-prop-baseu	dir-propsu
svn:externalsuencodinguutf-8(
u	iter_dirsuNoneujoinpathuosupathuisfileuparse_prop_fileudecode_as_stringuextenduparse_external_prop(uselfu
prop_filesu	externalsudirnameu	prop_fileu	rel_partsufilenameuext_prop((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
get_externals�s	

uSvnFileInfo.get_externals(	u__name__u
__module__u__qualname__u__init__u	_walk_svnu_build_entriesuget_entriesuget_revisionu
get_externals(u
__locals__((u	__class__u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuSvnFileInfo|suSvnFileInfoccsqtj|�}x|j�D]}|VqWx?|j�D]1}tj|�}x|j�D]}|VqZWq8WdS(N(uSvnInfouloadu
iter_filesuiter_externals(udirnameuinfoupathusub_infousub_path((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
svn_finder�s	u
svn_findercBsP|EeZdZdd�Zedd��Zedd��Zdd�Zd	S(
uSVNEntriesFilecCs
||_dS(N(udata(uselfudata((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu__init__�suSVNEntriesFile.__init__c
CsItjj|dd�}t|�}ztj|�}Wd|j�X|S(Nu.svnuentries(uosupathujoinuopenuSVNEntriesFileureaduclose(uclass_ubaseufilenameufuresult((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuload�suSVNEntriesFile.loadcCs5|j�}|jd�}ttg|}||�S(Nu<?xml(ureadu
startswithuSVNEntriesFileTextuSVNEntriesFileXML(uclass_ufileobjudatauis_xml((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuread�suSVNEntriesFile.readcCs|j�dg}t|�S(Ni(uparse_revision_numbersumax(uselfuall_revs((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuparse_revision�suSVNEntriesFile.parse_revisionN(u__name__u
__module__u__qualname__u__init__uclassmethoduloadureaduparse_revision(u
__locals__((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuSVNEntriesFile�s
uSVNEntriesFilecBsw|EeZdZidd6dd6dd6Zdd�Zd	d
�Zdd�Zd
d�Zdd�Zdd�Z	dS(uSVNEntriesFileTextiu1.4.xi	u1.5.xi
u1.6.xcCs|jS(N(usections(uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu__get_cached_sections�su(SVNEntriesFileText.__get_cached_sectionscCs�d}|jj|�}dd�ttj|�D�}yEt|djd��}||jj�kr{t	j
d|�nWntk
r�dSYnX||_|j
|_|jS(Nu
cSsg|]}|�qS(((u.0ux((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
<listcomp>�s	u3SVNEntriesFileText.get_sections.<locals>.<listcomp>iuUnknown subversion verson %d(udatausplitumapustru
splitlinesuintupopuknown_svn_versionsuvaluesuloguwarnu
ValueErrorusectionsu(_SVNEntriesFileText__get_cached_sectionsuget_sections(uselfuSECTION_DIVIDERusectionsusvn_version((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_sections�s
		uSVNEntriesFileText.get_sectionscCst|j��S(N(ubooluget_sections(uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuis_valid�suSVNEntriesFileText.is_validcCs|j�ddS(Nii(uget_sections(uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_urlsuSVNEntriesFileText.get_urlcs)d��fdd�|j�D�}|S(Ni	cs<g|]2}t|��kr|�rt|���qS((ulenuint(u.0usection(urevision_line_number(u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
<listcomp>s	u=SVNEntriesFileText.parse_revision_numbers.<locals>.<listcomp>(uget_sections(uselfurev_numbers((urevision_line_numberu-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuparse_revision_numberssu)SVNEntriesFileText.parse_revision_numberscs/dd���fdd�|j�D�}|S(NcSs0|o/|do/t|�dkp/|ddkS(Niiiudelete(ulen(us((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu<lambda>su:SVNEntriesFileText.get_undeleted_records.<locals>.<lambda>cs&g|]}�|�r|d�qS(i((u.0usection(u	undeleted(u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
<listcomp>s	u<SVNEntriesFileText.get_undeleted_records.<locals>.<listcomp>(uget_sections(uselfuresult((u	undeletedu-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_undeleted_recordssu(SVNEntriesFileText.get_undeleted_recordsN(
u__name__u
__module__u__qualname__uknown_svn_versionsu(_SVNEntriesFileText__get_cached_sectionsuget_sectionsuis_validuget_urluparse_revision_numbersuget_undeleted_records(u
__locals__((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuSVNEntriesFileText�s

uSVNEntriesFileTextcBsD|EeZdZdd�Zdd�Zdd�Zdd�Zd	S(
uSVNEntriesFileXMLcCsdS(NT(uTrue(uself((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuis_validsuSVNEntriesFileXML.is_validcCs(tjd�}|j|j�jd�S(uGet repository URLu
url="([^"]+)"i(ureucompileusearchudataugroup(uselfuurlre((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_urlsuSVNEntriesFileXML.get_urlcCs,tjd�}dd�|j|j�D�S(Nucommitted-rev="(\d+)"cSs%g|]}t|jd���qS(i(uintugroup(u.0um((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
<listcomp>$s	u<SVNEntriesFileXML.parse_revision_numbers.<locals>.<listcomp>(ureucompileufinditerudata(uselfurevre((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuparse_revision_numbers!s	u(SVNEntriesFileXML.parse_revision_numberscCs8tjdtj�}dd�|j|j�D�}|S(Nu%name="([^"]+)"(?![^>]+deleted="true")cSs%g|]}t|jd���qS(i(uunescapeugroup(u.0umatch((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu
<listcomp>,s	u;SVNEntriesFileXML.get_undeleted_records.<locals>.<listcomp>(ureucompileuIufinditerudata(uselfuentries_patternuresults((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuget_undeleted_records(s	u'SVNEntriesFileXML.get_undeleted_recordsN(u__name__u
__module__u__qualname__uis_validuget_urluparse_revision_numbersuget_undeleted_records(u
__locals__((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyuSVNEntriesFileXMLsuSVNEntriesFileXMLu__main__i(3uosureusysu	distutilsuloguxml.dom.pulldomuxmlushlexulocaleucodecsuunicodedatauwarningsusetuptools.compatuunicodeuxml.sax.saxutilsuunescapeuurlparseuImportErroruurllib.parseuparseu
subprocessuPopenu_PopenuPIPEu_PIPEuNoneu_run_commandu_get_entry_scheduleu_get_target_propertyu
_get_xml_dataujoinpathudetermine_console_encodingu_console_encodingudecode_as_stringuparse_dir_entriesuparse_externals_xmluparse_external_propuparse_prop_fileuobjectuSvnInfou	Svn13Infou	Svn15InfouSvnFileInfou
svn_finderuSVNEntriesFileuSVNEntriesFileTextuSVNEntriesFileXMLu__name__uargvunameuprint(((u-/tmp/pip-k8wh6o-build/setuptools/svn_utils.pyu<module>sN
		$t
B
3python3.3/site-packages/setuptools/__pycache__/archive_util.cpython-33.pyc000064400000015235151733566760022614 0ustar00�
�Re�c@s�dZdddddddgZdd	lZdd	lZdd	lZdd	lZdd	lZdd
lmZddl	m
Z
Gdd�de
�Zd
d�Zed	dd�Zedd�Zedd�Zedd�ZeeefZd	S(u/Utilities for extracting common archive formatsuunpack_archiveuunpack_zipfileuunpack_tarfileudefault_filteruUnrecognizedFormatuextraction_driversuunpack_directoryiN(uensure_directory(uDistutilsErrorcBs|EeZdZdZdS(uUnrecognizedFormatu#Couldn't recognize the archive typeN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u0/tmp/pip-k8wh6o-build/setuptools/archive_util.pyuUnrecognizedFormat
scCs|S(u@The default progress/filter callback; returns True for all files((usrcudst((u0/tmp/pip-k8wh6o-build/setuptools/archive_util.pyudefault_filtersc
Cs[xT|ptD]6}y||||�Wntk
r>w
Yq
XdSq
Wtd|��dS(u�Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

    `progress_filter` is a function taking two arguments: a source path
    internal to the archive ('/'-separated), and a filesystem path where it
    will be extracted.  The callback must return the desired extract path
    (which may be the same as the one passed in), or else ``None`` to skip
    that file or directory.  The callback can thus be used to report on the
    progress of the extraction, as well as to filter the items extracted or
    alter their extraction paths.

    `drivers`, if supplied, must be a non-empty sequence of functions with the
    same signature as this function (minus the `drivers` argument), that raise
    ``UnrecognizedFormat`` if they do not support extracting the designated
    archive type.  The `drivers` are tried in sequence until one is found that
    does not raise an error, or until all are exhausted (in which case
    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
    drivers, the module's ``extraction_drivers`` constant will be used, which
    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
    order.
    Nu!Not a recognized archive type: %s(uextraction_driversuUnrecognizedFormat(ufilenameuextract_diruprogress_filterudriversudriver((u0/tmp/pip-k8wh6o-build/setuptools/archive_util.pyuunpack_archive*s
c
CsGtjj|�s(td|f��nid|f|6}xtj|�D]�\}}}||\}}xD|D]<}	||	dtjj||	�f|tjj||	�<qqWx�|D]�}
||
}tjj||
�}|||
|�}|s�q�nt|�tjj||
�}
tj|
|�tj	|
|�q�WqKWdS(u�"Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    u%s is not a directoryuu/N(
uosupathuisdiruUnrecognizedFormatuwalkujoinuensure_directoryushutilucopyfileucopystat(
ufilenameuextract_diruprogress_filterupathsubaseudirsufilesusrcudstudufunameutarget((u0/tmp/pip-k8wh6o-build/setuptools/archive_util.pyuunpack_directorySs"
:


c
Cs\tj|�s%td|f��ntj|�}zx|j�D]}|j}|jd�sDd|jd�kr}qDntj	j
||jd��}|||�}|s�qDn|jd�r�t|�nMt|�|j
|j�}t|d�}z|j|�Wd|j�~X|jd?}	|	rDtj||	�qDqDWWd|j�XdS(u�Unpack zip `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    u%s is not a zip fileu/u..uwbNi(uzipfileu
is_zipfileuUnrecognizedFormatuZipFileuinfolistufilenameu
startswithusplituosupathujoinuendswithuensure_directoryureaduopenuwriteucloseu
external_attruchmod(
ufilenameuextract_diruprogress_filteruzuinfounameutargetudataufuunix_attributes((u0/tmp/pip-k8wh6o-build/setuptools/archive_util.pyuunpack_zipfile|s2	$



c	Cs�ytj|�}Wn(tjk
r=td|f��YnXz�dd�|_xl|D]d}|j}|jd�rWd|jd�krWtj	j
||jd��}x||dk	r'|j�s�|j
�r'|j}|j
�rtj
tj|j�|�}tj|�}n|j|�}q�W|dk	r�|j�sL|j�r�|||�}|r�|jtj�r�|dd�}ny|j||�Wq�tjk
r�Yq�Xq�q�qWqWWd	SWd|j�XdS(
u�Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    u/%s is not a compressed or uncompressed tar filecWsdS(N(uNone(uargs((u0/tmp/pip-k8wh6o-build/setuptools/archive_util.pyu<lambda>�su unpack_tarfile.<locals>.<lambda>u/u..Nii����T(utarfileuopenuTarErroruUnrecognizedFormatuchownunameu
startswithusplituosupathujoinuNoneuislnkuissymulinknameu	posixpathudirnameunormpathu
_getmemberuisfileuisdiruendswithusepu_extract_memberuExtractErroruTrueuclose(	ufilenameuextract_diruprogress_filterutarobjumemberunameu
prelim_dstulinkpathu	final_dst((u0/tmp/pip-k8wh6o-build/setuptools/archive_util.pyuunpack_tarfile�s8
	%'	$(u__doc__u__all__uzipfileutarfileuosushutilu	posixpathu
pkg_resourcesuensure_directoryudistutils.errorsuDistutilsErroruUnrecognizedFormatudefault_filteruNoneuunpack_archiveuunpack_directoryuunpack_zipfileuunpack_tarfileuextraction_drivers(((u0/tmp/pip-k8wh6o-build/setuptools/archive_util.pyu<module>s<(),*python3.3/site-packages/setuptools/__pycache__/dist.cpython-33.pyc000064400000113630151733566760021077 0ustar00�
�Re$c@s�dgZddlZddlZddlZddlZddlZddlZddlZddlm	Z
ddlmZm
Z
mZddlmZddlmZmZddlZdd�Zee
�Z
eefZd	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�Z dd�Z!dd�Z"Gdd�de
�Z	x)ej#ej$ej%fD]Z&e	e&_	q�WGdd�d�Z'dS( uDistributioniN(uDistribution(uDistutilsOptionErroruDistutilsPlatformErroruDistutilsSetupError(uRequire(u
numeric_typesu
basestringcCsNx"|jjd�r$|j\}qW|jjd�sJtd|��n|S(u�Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
    u
setuptoolsu	distutilsu(distutils has already been patched by %r(u
__module__u
startswithu	__bases__uAssertionError(ucls((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu_get_unpatchedsu_get_unpatchedcCsey*tjjd|�}|js)t�Wn4ttttfk
r`td||f��YnXdS(Nux=u4%r must be importable 'module:attrs' string (got %r)(	u
pkg_resourcesu
EntryPointuparseuextrasuAssertionErroru	TypeErroru
ValueErroruAttributeErroruDistutilsSetupError(udistuattruvalueuep((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyucheck_importable$sucheck_importablecCsZydj|�|kst�Wn4ttttfk
rUtd||f��YnXdS(u*Verify that value is a string list or Noneuu%%r must be a list of strings (got %r)N(ujoinuAssertionErroru	TypeErroru
ValueErroruAttributeErroruDistutilsSetupError(udistuattruvalue((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuassert_string_list/s
uassert_string_listcCs�t|||�x�|D]�}|j|�sCtdd|��nd|krdj|jd�dd��}||kr�tjjd||�q�qqWdS(u(Verify that namespace packages are validu1Distribution contains no modules or packages for unamespace package %ru.Niu^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyi����(uassert_string_listuhas_contents_foruDistutilsSetupErrorujoinusplitu	distutilsuloguwarn(udistuattruvalueunspuparent((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu	check_nsp7s
"	u	check_nspc
Cs�y}xv|j�D]h\}}d|kre|jdd�\}}tj|�retd|��qenttj|��qWWn'ttt	fk
r�td��YnXdS(u+Verify that extras_require mapping is validu:iuInvalid environment marker: u�'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.N(
uitemsusplitu
pkg_resourcesuinvalid_markeruDistutilsSetupErrorulistuparse_requirementsu	TypeErroru
ValueErroruAttributeError(udistuattruvalueukuvum((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyucheck_extrasHsucheck_extrascCs/t|�|kr+td||f��ndS(u)Verify that value is True, False, 0, or 1u#%r must be a boolean value (got %r)N(ubooluDistutilsSetupError(udistuattruvalue((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuassert_boolXsuassert_boolcCsIyttj|��Wn+ttfk
rDtd|f��YnXdS(u9Verify that install_requires is a valid requirements listu^%r must be a string or list of strings containing valid project/version requirement specifiersN(ulistu
pkg_resourcesuparse_requirementsu	TypeErroru
ValueErroruDistutilsSetupError(udistuattruvalue((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyucheck_requirements^sucheck_requirementscCsIytjj|�Wn.tk
rDtj�d}t|��YnXdS(u)Verify that entry_points map is parseableiN(u
pkg_resourcesu
EntryPointu	parse_mapu
ValueErrorusysuexc_infouDistutilsSetupError(udistuattruvalueue((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyucheck_entry_pointsgs

ucheck_entry_pointscCs"t|t�std��ndS(Nutest_suite must be a string(u
isinstanceu
basestringuDistutilsSetupError(udistuattruvalue((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyucheck_test_suiteosucheck_test_suitecCs~t|t�rjxX|j�D]C\}}t|t�s;Pnyt|�Wqtk
r^PYqXqWdSnt|d��dS(u@Verify that value is a dictionary of package names to glob listsNuI must be a dictionary mapping package names to lists of wildcard patterns(u
isinstanceudictuitemsustruiteru	TypeErroruDistutilsSetupError(udistuattruvalueukuv((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyucheck_package_datass

ucheck_package_datacCs=x6|D].}tjd|�stjjd|�qqWdS(Nu\w+(\.\w+)*uZWARNING: %r not a valid package name; please use only.-separated package names in setup.py(ureumatchu	distutilsuloguwarn(udistuattruvalueupkgname((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyucheck_packages�s

	ucheck_packagescBsO|EeZdZdZd4Zdd�Zd4dd�Zdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4S(5uDistributionu�Distribution with support for features, tests, and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'features' **deprecated** -- a dictionary mapping option names to
        'setuptools.Feature'
        objects.  Features are a portion of the distribution that can be
        included or excluded based on user options, inter-feature dependencies,
        and availability on the current system.  Excluded features are omitted
        from all setup commands, including source and binary distributions, so
        you can create multiple distributions from the same source tree.
        Feature names should be valid Python identifiers, except that they may
        contain the '-' (minus) sign.  Features can be included or excluded
        via the command line options '--with-X' and '--without-X', where 'X' is
        the name of the feature.  Whether a feature is included by default, and
        whether you are allowed to control this from the command line, is
        determined by the Feature object.  See the 'Feature' class for more
        information.

     'test_suite' -- the name of a test suite to run for the 'test' command.
        If the user runs 'python setup.py test', the package will be installed,
        and the named test suite will be run.  The format is the same as
        would be used on a 'unittest.py' command line.  That is, it is the
        dotted name of an object to import and call to generate a test suite.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.  They are used by the feature subsystem to configure the
    distribution for the included and excluded features.
    cCs�|sd|ksd|kr#dStjt|d��j�}tjjj|�}|dk	r�|jd�r�tj	t|d��|_
||_ndS(NunameuversionuPKG-INFO(u
pkg_resourcesu	safe_nameustruloweruworking_setuby_keyugetuNoneuhas_metadatausafe_versionu_versionu
_patched_dist(uselfuattrsukeyudist((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyupatch_missing_pkg_info�su#Distribution.patch_missing_pkg_infoc	Cs}t|d�}|s!i|_n|p*i}d|ksEd|krRtj�ng|_i|_g|_|o�|jdd�|_	|j
|�|dk	r�|jdg�|_t|d|j�n|r�d|kr�|j
|jd��nx?tjd�D].}t||j�st||jd�qqWtj||�t|jjt�ryt|jj�|j_ndS(Nupackage_dataufeaturesurequire_featuresusrc_rootudependency_linksusetup_requiresudistutils.setup_keywords(uhasattrupackage_datauFeatureuwarn_deprecatedurequire_featuresufeaturesu
dist_filesupopuNoneusrc_rootupatch_missing_pkg_infoudependency_linksuassert_string_listufetch_build_eggsu
pkg_resourcesuiter_entry_pointsunameusetattru
_Distributionu__init__u
isinstanceumetadatauversionu
numeric_typesustr(uselfuattrsuhave_package_datau_attrs_dictuep((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu__init__�s,
			
uDistribution.__init__cCs)tj|�}|jr%|j�n|S(u3Process features after parsing command line options(u
_Distributionuparse_command_lineufeaturesu_finalize_features(uselfuresult((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuparse_command_line�s	
uDistribution.parse_command_linecCsd|jdd�S(u;Convert feature name to corresponding option attribute nameuwith_u-u_(ureplace(uselfuname((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu_feature_attrname�suDistribution._feature_attrnamecCsPddlm}m}x3|j||�d|j�D]}|j|�q5WdS(uResolve pre-setup requirementsi(uworking_setuparse_requirementsu	installerN(u
pkg_resourcesuworking_setuparse_requirementsuresolveufetch_build_egguadd(uselfurequiresuworking_setuparse_requirementsudist((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyufetch_build_eggss	uDistribution.fetch_build_eggscCs�tj|�|jr#|j�nxgtjd�D]V}t||jd�}|dk	r3|j	d|j
�|j�||j|�q3q3Wt|dd�r�dd�|jD�|_n	g|_dS(Nudistutils.setup_keywordsu	installeruconvert_2to3_doctestscSs"g|]}tjj|��qS((uosupathuabspath(u.0up((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
<listcomp>s	u1Distribution.finalize_options.<locals>.<listcomp>(
u
_Distributionufinalize_optionsufeaturesu_set_global_opts_from_featuresu
pkg_resourcesuiter_entry_pointsugetattrunameuNoneurequireufetch_build_egguloaduconvert_2to3_doctests(uselfuepuvalue((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyufinalize_optionss
	
 uDistribution.finalize_optionsc	Csgy|j}g|j_Wn>tk
rYddlm}|jidgd6�}|j�|jd�}d}x*|j	�D]}||kr~||=q~q~W|j
r�|j
d
d
�}d|kr�|ddj�|}nd|f|d<n||d
dgdtj
dddddd
dddddddddd�
}|j�||_YnX|j|�S(u Fetch an egg needed for buildingi(ueasy_installueasy_installuscript_argsu
find_linksu	site_dirsu	index_urluoptimizeuallow_hostsNiusetupuargsuxuinstall_diruexclude_scriptsualways_copyubuild_directoryueditableuupgradeu
multi_versionu	no_reportuuser(u
find_linksu	site_dirsu	index_urluoptimizeu	site_dirsuallow_hostsTF(u_egg_fetcheru
package_indexuto_scanuAttributeErrorusetuptools.command.easy_installueasy_installu	__class__uparse_config_filesuget_option_dictukeysudependency_linksusplituosucurdiruTrueuFalseuNoneuensure_finalized(	uselfurequcmdueasy_installudistuoptsukeepukeyulinks((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyufetch_build_eggs2	

	
uDistribution.fetch_build_eggcCsg}|jj�}x�|jj�D]�\}}|j|d�|j|�|jr%|j}d}d}|j	�s�||}}n|j
d|dd||f�|j
d|dd||f�d||d|<q%q%W||j|_|_||_|_
dS(u;Add --with-X/--without-X options based on optional featuresu
 (default)uuwith-uinclude uwithout-uexclude N(unegative_optucopyufeaturesuitemsu_set_featureuNoneuvalidateuoptionaludescriptionuinclude_by_defaultuappenduglobal_optionsufeature_optionsufeature_negopt(uselfugounounameufeatureudescruincdefuexcdef((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu_set_global_opts_from_features;s 
		""u+Distribution._set_global_opts_from_featurescCs�xj|jj�D]Y\}}|j|�}|sI|dkr|j�r|j|�|j|d�qqWxL|jj�D];\}}|j|�s}|j|�|j|d�q}q}WdS(u9Add/remove features and resolve dependencies between themiiN(ufeaturesuitemsufeature_is_includeduNoneuinclude_by_defaultu
include_inu_set_featureuexclude_from(uselfunameufeatureuenabled((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu_finalize_featuresSs

uDistribution._finalize_featurescCsv||jkr|j|SxUtjd|�D]1}|jd|j�|j�|j|<}|SWtj||�SdS(u(Pluggable version of get_command_class()udistutils.commandsu	installerN(ucmdclassu
pkg_resourcesuiter_entry_pointsurequireufetch_build_egguloadu
_Distributionuget_command_class(uselfucommanduepucmdclass((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuget_command_classdsuDistribution.get_command_classcCs[xKtjd�D]:}|j|jkr|jd�}||j|j<qqWtj|�S(Nudistutils.commandsF(u
pkg_resourcesuiter_entry_pointsunameucmdclassuloaduFalseu
_Distributionuprint_commands(uselfuepucmdclass((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuprint_commandsps
uDistribution.print_commandscCst||j|�|�dS(uSet feature's inclusion statusN(usetattru_feature_attrname(uselfunameustatus((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu_set_featurewsuDistribution._set_featurecCst||j|��S(uAReturn 1 if feature is included, 0 if excluded, 'None' if unknown(ugetattru_feature_attrname(uselfuname((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyufeature_is_included{su Distribution.feature_is_includedcCs`|j|�dkr8|j|j}t|d��n|j|j|�|j|d�dS(u)Request inclusion of feature named 'name'iu2 is required, but was excluded or is not availableiN(ufeature_is_includedufeaturesudescriptionuDistutilsOptionErroru
include_inu_set_feature(uselfunameudescr((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuinclude_featuresuDistribution.include_featurecKsZxS|j�D]E\}}t|d|d�}|rB||�q
|j||�q
WdS(u�Add items to distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        u	_include_N(uitemsugetattruNoneu
_include_misc(uselfuattrsukuvuinclude((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuinclude�s

uDistribution.includecs��d�|jr8��fdd�|jD�|_n|jrf��fdd�|jD�|_n|jr���fdd�|jD�|_ndS(u9Remove packages, modules, and extensions in named packageu.cs2g|](}|�kr|j��r|�qS((u
startswith(u.0up(upackageupfx(u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
<listcomp>�s	u0Distribution.exclude_package.<locals>.<listcomp>cs2g|](}|�kr|j��r|�qS((u
startswith(u.0up(upackageupfx(u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
<listcomp>�s	cs8g|].}|j�kr|jj��r|�qS((unameu
startswith(u.0up(upackageupfx(u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
<listcomp>�s	N(upackagesu
py_modulesuext_modules(uselfupackage((upackageupfxu(/tmp/pip-k8wh6o-build/setuptools/dist.pyuexclude_package�s
	%	%	uDistribution.exclude_packagecCsD|d}x3|j�D]%}||ks8|j|�rdSqWdS(u<Return true if 'exclude_package(package)' would do somethingu.NT(uiter_distribution_namesu
startswithuTrue(uselfupackageupfxup((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuhas_contents_for�s
uDistribution.has_contents_forcs�t�t�s(td|�f��nyt||�}Wn"tk
r_td|��YnX|dk	r�t|t�r�t|d��n,|r�t||�fdd�|D��ndS(uAHandle 'exclude()' for list/tuple attrs without a special handleru(%s: setting must be a list or tuple (%r)u %s: No such distribution settingu4: this setting cannot be changed via include/excludecs"g|]}|�kr|�qS(((u.0uitem(uvalue(u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
<listcomp>�s	u.Distribution._exclude_misc.<locals>.<listcomp>N(u
isinstanceusequenceuDistutilsSetupErrorugetattruAttributeErroruNoneusetattr(uselfunameuvalueuold((uvalueu(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
_exclude_misc�s
uDistribution._exclude_misccs�t|t�s(td||f��nyt||��Wn"tk
r_td|��YnX�dkrt|||�nIt�t�s�t|d��n't||��fdd�|D��dS(uAHandle 'include()' for list/tuple attrs without a special handleru%s: setting must be a list (%r)u %s: No such distribution settingu4: this setting cannot be changed via include/excludecs"g|]}|�kr|�qS(((u.0uitem(uold(u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
<listcomp>�s	u.Distribution._include_misc.<locals>.<listcomp>N(u
isinstanceusequenceuDistutilsSetupErrorugetattruAttributeErroruNoneusetattr(uselfunameuvalue((uoldu(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
_include_misc�s
uDistribution._include_misccKsZxS|j�D]E\}}t|d|d�}|rB||�q
|j||�q
WdS(uRemove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        u	_exclude_N(uitemsugetattruNoneu
_exclude_misc(uselfuattrsukuvuexclude((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuexclude�s

uDistribution.excludecCs?t|t�s%td|f��ntt|j|��dS(Nu.packages: setting must be a list or tuple (%r)(u
isinstanceusequenceuDistutilsSetupErrorulistumapuexclude_package(uselfupackages((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu_exclude_packages�suDistribution._exclude_packagesc
Cs�|jj|_|jj|_|d}|jd�}xY||kr�||\}}||=ddl}|j|d�|dd�<|d}q:Wtj|||�}|j	|�}	t
|	dd�r�d|f|j|�d<|dk	r�gSn|S(Niualiasesiucommand_consumes_argumentsucommand lineuargsT(u	__class__uglobal_optionsunegative_optuget_option_dictushlexusplituTrueu
_Distributionu_parse_command_optsuget_command_classugetattruNone(
uselfuparseruargsucommandualiasesusrcualiasushlexunargsu	cmd_class((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu_parse_command_optss"
u Distribution._parse_command_optscCs'i}x|jj�D]	\}}x�|j�D]�\}\}}|dkrSq/n|jdd�}|dkr�|j|�}|jj�}|jt|di��xZ|j�D](\}	}
|
|kr�|	}d}Pq�q�Wt	d��n|dkrd}n||j
|i�|<q/WqW|S(	uhReturn a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        ucommand lineu_u-iunegative_optuShouldn't be able to get hereiN(ucommand_optionsuitemsureplaceuget_command_objunegative_optucopyuupdateugetattruNoneuAssertionErroru
setdefault(uselfuducmduoptsuoptusrcuvalucmdobjuneg_optunegupos((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuget_cmdline_options s(
	u Distribution.get_cmdline_optionsccs�x|jpfD]}|VqWx|jp.fD]}|Vq/Wxe|jpMfD]T}t|t�rr|\}}n	|j}|jd�r�|dd�}n|VqNWdS(u@Yield all packages, modules, and extension names in distributionumoduleNii����(upackagesu
py_modulesuext_modulesu
isinstanceutupleunameuendswith(uselfupkgumoduleuextunameu	buildinfo((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuiter_distribution_namesHs			u$Distribution.iter_distribution_namescCs6ddl}|jdks$|jr4tj||�Sddl}t|j|j�setj||�S|jj	j
�d	kr�tj||�S|jj	}|jj}|jdkr�dp�d}|jj}|j|jj�d|||�|_ztj||�SWd|j|jj�||||�|_XdS(
u�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        iNiuutf-8uutf8uwin32u
(i(uutf-8uutf8(usysuversion_infou
help_commandsu
_Distributionuhandle_display_optionsuiou
isinstanceustdoutu
TextIOWrapperuencodinguloweruerrorsuplatformuNoneuline_bufferingudetach(uselfuoption_orderusysuiouencodinguerrorsunewlineuline_buffering((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuhandle_display_optionsZs$!u#Distribution.handle_display_optionsN(u__name__u
__module__u__qualname__u__doc__uNoneu
_patched_distupatch_missing_pkg_infou__init__uparse_command_lineu_feature_attrnameufetch_build_eggsufinalize_optionsufetch_build_eggu_set_global_opts_from_featuresu_finalize_featuresuget_command_classuprint_commandsu_set_featureufeature_is_includeduinclude_featureuincludeuexclude_packageuhas_contents_foru
_exclude_miscu
_include_miscuexcludeu_exclude_packagesu_parse_command_optsuget_cmdline_optionsuiter_distribution_namesuhandle_display_options(u
__locals__((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuDistribution�s6B
 	(cBsw|EeZdZdZedd��Zdddffdd�Zdd�Z	dd	�Z
d
d�Zdd
�ZdS(uFeatureu�
    **deprecated** -- The `Feature` facility was never completely implemented
    or supported, `has reported issues
    <https://bitbucket.org/pypa/setuptools/issue/58>`_ and will be removed in
    a future version.

    A subset of the distribution that can be excluded if unneeded/wanted

    Features are created using these keyword arguments:

      'description' -- a short, human readable description of the feature, to
         be used in error messages, and option help messages.

      'standard' -- if true, the feature is included by default if it is
         available on the current system.  Otherwise, the feature is only
         included if requested via a command line '--with-X' option, or if
         another included feature requires it.  The default setting is 'False'.

      'available' -- if true, the feature is available for installation on the
         current system.  The default setting is 'True'.

      'optional' -- if true, the feature's inclusion can be controlled from the
         command line, using the '--with-X' or '--without-X' options.  If
         false, the feature's inclusion status is determined automatically,
         based on 'availabile', 'standard', and whether any other feature
         requires it.  The default setting is 'True'.

      'require_features' -- a string or sequence of strings naming features
         that should also be included if this feature is included.  Defaults to
         empty list.  May also contain 'Require' objects that should be
         added/removed from the distribution.

      'remove' -- a string or list of strings naming packages to be removed
         from the distribution if this feature is *not* included.  If the
         feature *is* included, this argument is ignored.  This argument exists
         to support removing features that "crosscut" a distribution, such as
         defining a 'tests' feature that removes all the 'tests' subpackages
         provided by other features.  The default for this argument is an empty
         list.  (Note: the named package(s) or modules must exist in the base
         distribution when the 'setup()' function is initially called.)

      other keywords -- any other keyword arguments are saved, and passed to
         the distribution's 'include()' and 'exclude()' methods when the
         feature is included or excluded, respectively.  So, for example, you
         could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be
         added or removed from the distribution as appropriate.

    A feature must include at least one 'requires', 'remove', or other
    keyword argument.  Otherwise, it can't affect the distribution in any way.
    Note also that you can subclass 'Feature' to create your own specialized
    feature types that modify the distribution in other ways when included or
    excluded.  See the docstrings for the various methods here for more detail.
    Aside from the methods, the only feature attributes that distributions look
    at are 'description' and 'optional'.
    cCstjdtdd�dS(NumFeatures are deprecated and will be removed in a future version. See http://bitbucket.org/pypa/setuptools/65.u
stackleveli(uwarningsuwarnuDeprecationWarning(((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuwarn_deprecated�suFeature.warn_deprecatedc	Ks�|j�||_||_||_||_t|ttf�rO|f}ndd�|D�|_dd�|D�}|r�||d<nt|t�r�|f}n||_	||_
|r�|r�|r�td��ndS(NcSs%g|]}t|t�r|�qS((u
isinstanceustr(u.0ur((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
<listcomp>�s	u$Feature.__init__.<locals>.<listcomp>cSs%g|]}t|t�s|�qS((u
isinstanceustr(u.0ur((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
<listcomp>�s	urequire_featuresugFeature %s: must define 'require_features', 'remove', or at least one of 'packages', 'py_modules', etc.(uwarn_deprecatedudescriptionustandardu	availableuoptionalu
isinstanceustruRequireurequire_featuresuremoveuextrasuDistutilsSetupError(	uselfudescriptionustandardu	availableuoptionalurequire_featuresuremoveuextrasuer((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu__init__�s$
				
		uFeature.__init__cCs|jo|jS(u+Should this feature be included by default?(u	availableustandard(uself((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuinclude_by_default�suFeature.include_by_defaultcCsT|jst|jd��n|j|j�x|jD]}|j|�q9WdS(uEnsure feature and its requirements are included in distribution

        You may override this in a subclass to perform additional operations on
        the distribution.  Note that this method may be called more than once
        per feature, and so should be idempotent.

        u2 is required,but is not available on this platformN(u	availableuDistutilsPlatformErrorudescriptionuincludeuextrasurequire_featuresuinclude_feature(uselfudistuf((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu
include_in�s
	uFeature.include_incCsA|j|j�|jr=x!|jD]}|j|�q#WndS(u2Ensure feature is excluded from distribution

        You may override this in a subclass to perform additional operations on
        the distribution.  This method will be called at most once per
        feature, and only after all included features have been asked to
        include themselves.
        N(uexcludeuextrasuremoveuexclude_package(uselfudistuitem((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuexclude_from�s
	uFeature.exclude_fromcCsFx?|jD]4}|j|�s
td|j||f��q
q
WdS(u�Verify that feature makes sense in context of distribution

        This method is called by the distribution just before it parses its
        command line.  It checks to ensure that the 'remove' attribute, if any,
        contains only valid package/module names that are present in the base
        distribution when 'setup()' is called.  You may override it in a
        subclass to perform any other required validation of the feature
        against a target distribution.
        ug%s wants to be able to remove %s, but the distribution doesn't contain any packages or modules under %sN(uremoveuhas_contents_foruDistutilsSetupErrorudescription(uselfudistuitem((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuvalidate
s
uFeature.validateNFT(
u__name__u
__module__u__qualname__u__doc__ustaticmethoduwarn_deprecateduFalseuTrueu__init__uinclude_by_defaultu
include_inuexclude_fromuvalidate(u
__locals__((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyuFeature�s7	uFeature((u__all__ureuosusysuwarningsu
distutils.logu	distutilsudistutils.coreu
distutils.cmduDistributionu
_Distributionudistutils.errorsuDistutilsOptionErroruDistutilsPlatformErroruDistutilsSetupErrorusetuptools.dependsuRequireusetuptools.compatu
numeric_typesu
basestringu
pkg_resourcesu_get_unpatchedutupleulistusequenceucheck_importableuassert_string_listu	check_nspucheck_extrasuassert_boolucheck_requirementsucheck_entry_pointsucheck_test_suiteucheck_package_dataucheck_packagesudistucoreucmdumoduleuFeature(((u(/tmp/pip-k8wh6o-build/setuptools/dist.pyu<module>s<			��
python3.3/site-packages/setuptools/__pycache__/py31compat.cpython-33.pyc000064400000001424151733566760022131 0ustar00�
�Re�c@saddgZyddlmZmZWn4ek
r\ddlmZmZdd�ZYnXdS(uget_config_varsuget_pathi(uget_config_varsuget_path(uget_config_varsuget_python_libcCs+|dkrtd��nt|dk�S(NuplatlibupurelibuName must be purelib or platlib(uplatlibupurelib(u
ValueErroruget_python_lib(uname((u./tmp/pip-k8wh6o-build/setuptools/py31compat.pyuget_pathsN(u__all__u	sysconfiguget_config_varsuget_pathuImportErrorudistutils.sysconfiguget_python_lib(((u./tmp/pip-k8wh6o-build/setuptools/py31compat.pyu<module>s

python3.3/site-packages/setuptools/__pycache__/py27compat.cpython-33.pyc000064400000001430151733566760022133 0ustar00�
�Re2c@s@dZddlZdd�Zejdkr<dd�ZndS(u2
Compatibility Support for Python 2.7 and earlier
iNcCs
|j|�S(uB
	Given an HTTPMessage, return all headers matching a given key.
	(uget_all(umessageukey((u./tmp/pip-k8wh6o-build/setuptools/py27compat.pyuget_all_headerssuget_all_headersicCs
|j|�S(N(u
getheaders(umessageukey((u./tmp/pip-k8wh6o-build/setuptools/py27compat.pyuget_all_headerss(i(u__doc__usysuget_all_headersuversion_info(((u./tmp/pip-k8wh6o-build/setuptools/py27compat.pyu<module>spython3.3/site-packages/setuptools/__pycache__/compat.cpython-33.pyc000064400000011107151733566760021413 0ustar00�
�Re�	c@s<ddlZddlZejddkr�dZeZddlZddlZddl	m	Z	e	Z
eZdd�Zdd�Z
dd�ZddlmZddlZdd	lmZdd
lmZddlmZdd�ZeZejZd
d�ZeeefZe Z e!Z!e"Z#ddl$m%Z%m&Z&m'Z'ddl(Z(ddl(m)Z)m*Z*m+Z+m,Z,m-Z-ddl.m.Z.m/Z/m0Z0m1Z1m2Z2ej3Z4e5d�n�d Ze"ZddlZddl7Zddl8m	Z	m
Z
dd�Zdd�Z
dd�Zddl9mZddl:j;Zddl<mZmZddl<mZdd�ZeZejZeZeefZe=Z e"Z!e#Z#ddl>m*Z*m+Z+ddl?j@Z(ddl?m)Z)m%Z%m'Z'ddlAm.Z.m/Z/m,Z,m-Z-m0Z0m1Z1m2Z2m&Z&ej4Z4dddd�Zddd�ZCdS(!iNi(uStringIOcCs|jS(N(u	func_code(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>
su<lambda>cCs|jS(N(ufunc_globals(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>scCs|jS(N(uim_func(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>s(uname2codepoint(u
HTTPServer(uSimpleHTTPRequestHandler(uBaseHTTPRequestHandlercCs
|j�S(N(u	iteritems(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>scCs
|j�S(N(unext(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>s(uurl2pathnameusplittagupathname2url(uurlopenu	HTTPErroruURLErroruunquoteu	splituser(uurlparseu
urlunparseuurljoinuurlsplitu
urlunsplitu8def reraise(tp, value, tb=None):
    raise tp, value, tb(uStringIOuBytesIOcCs|jS(N(u__code__(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>,scCs|jS(N(u__globals__(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>-scCs|jS(N(u__func__(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>.s(u
HTTPServeruSimpleHTTPRequestHandlercCs
|j�S(N(uitems(uo((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<lambda>3s(u	HTTPErroruURLError(uurlopenuurl2pathnameupathname2url(uurlparseu
urlunparseuunquoteu	splituseruurljoinuurlsplitu
urlunsplitusplittagc
Csz|dkrt�}n|dkr-|}nt|d�}z|j�}Wd|j�Xtt||d�||�dS(Nurbuexec(uNoneuglobalsuopenureaducloseuexecucompile(ufnuglobsulocsufusource((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyuexecfileDs	uexecfilecCs+|j|k	r!|j|��n|�dS(N(u
__traceback__uwith_traceback(utpuvalueutb((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyureraisePsureraiseFT(Dusysu	itertoolsuversion_infouFalseuPY3u
basestringu__builtin__ubuiltinsuConfigParseruStringIOuBytesIOuexecfileu	func_codeufunc_globalsuim_funcuhtmlentitydefsuname2codepointuhttplibuBaseHTTPServeru
HTTPServeruSimpleHTTPServeruSimpleHTTPRequestHandleruBaseHTTPRequestHandleru	iteritemsulongu	long_typeumaxintumaxsizeunextuintufloatu
numeric_typesuunichruunicodeustrubytesuurllibuurl2pathnameusplittagupathname2urluurllib2uurlopenu	HTTPErroruURLErroruunquoteu	splituseruurlparseu
urlunparseuurljoinuurlsplitu
urlunsplituifilterfalseufilterfalseuexecuTrueuconfigparseruiou
html.entitiesuhttp.clientuclientuhttp.serveruchruurllib.erroruurllib.requesturequestuurllib.parseuNoneureraise(((u*/tmp/pip-k8wh6o-build/setuptools/compat.pyu<module>sv	((	
	:	python3.3/site-packages/setuptools/__pycache__/__init__.cpython-33.pyc000064400000011273151733566760021673 0ustar00�
�Re�c@sldZddlZddlZddlZddlZddlmZddlm	Z	ddl
Zddlm
Z
ddlmZmZmZddlmZdd	d
ddd
dgZejjZdZdZdgZdfdd�ZejjZee�ZGdd�de�Zeej_ejdd�Z e ej!_ e"ede#ej$j%d���Z&dS(u@Extensions to the 'distutils' for large or complex distributionsiN(uCommand(uconvert_path(u	Extension(uDistributionuFeatureu_get_unpatched(uRequireusetupuDistributionuFeatureuCommandu	ExtensionuRequireu
find_packagesu
lib2to3.fixesu.cs.g}t|�dfg}x�|r�|jd�\}}x�tj|�D]�}tjj||�}d|ko�tjj|�o�tjjtjj|d��}|rI|j||�|j|||df�qIqIWqWxGt	|�dgD]2�ddl
m���fdd�|D�}q�W|S(	u�Return a list all Python packages found within directory 'where'

    'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it
    will be converted to the appropriate local path syntax.  'exclude' is a
    sequence of package names to exclude; '*' can be used as a wildcard in the
    names, such that 'foo.*' will exclude all subpackages of 'foo' (but not
    'foo' itself).
    uiu.u__init__.pyuez_setup(ufnmatchcasecs%g|]}�|��s|�qS(((u.0uitem(ufnmatchcaseupat(u,/tmp/pip-k8wh6o-build/setuptools/__init__.pyu
<listcomp>7s	u!find_packages.<locals>.<listcomp>(uconvert_pathupopuosulistdirupathujoinuisdiruisfileuappendulistufnmatchufnmatchcase(uwhereuexcludeuoutustackuprefixunameufnulooks_like_package((ufnmatchcaseupatu,/tmp/pip-k8wh6o-build/setuptools/__init__.pyu
find_packagess 		!& cBs>|EeZdZejZdZdd�Zddd�ZdS(uCommandcKsAtj||�x*|j�D]\}}t|||�qWdS(N(u_Commandu__init__uitemsusetattr(uselfudistukwukuv((u,/tmp/pip-k8wh6o-build/setuptools/__init__.pyu__init__CsuCommand.__init__icKsFtj|||�}x*|j�D]\}}t|||�q"W|S(N(u_Commandureinitialize_commanduitemsusetattr(uselfucommandureinit_subcommandsukwucmdukuv((u,/tmp/pip-k8wh6o-build/setuptools/__init__.pyureinitialize_commandIsuCommand.reinitialize_commandNF(	u__name__u
__module__u__qualname__u_Commandu__doc__uFalseucommand_consumes_argumentsu__init__ureinitialize_command(u
__locals__((u,/tmp/pip-k8wh6o-build/setuptools/__init__.pyuCommand>s	cs�g}x�tj|�D]�\�}}�tjksM�jtjtj�r`�dd��n�r��fdd�|D�}n|jttjj|��qW|S(u^Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    iNcs%g|]}tjj�|��qS((uosupathujoin(u.0uf(ubase(u,/tmp/pip-k8wh6o-build/setuptools/__init__.pyu
<listcomp>Zs	ufindall.<locals>.<listcomp>(	uosuwalkucurdiru
startswithusepuextendufilterupathuisfile(udiru	all_filesudirsufiles((ubaseu,/tmp/pip-k8wh6o-build/setuptools/__init__.pyufindallQs( ufindalludont_write_bytecodeuPYTHONDONTWRITEBYTECODET('u__doc__uosusysudistutils.coreu	distutilsudistutils.filelistuCommandu_Commandudistutils.utiluconvert_pathusetuptools.versionu
setuptoolsusetuptools.extensionu	Extensionusetuptools.distuDistributionuFeatureu_get_unpatchedusetuptools.dependsuRequireu__all__uversionu__version__uNoneubootstrap_install_fromuTrueurun_2to3_on_doctestsulib2to3_fixer_packagesu
find_packagesucoreusetupucurdirufindallufilelistugetattrubooluenvironugetu_dont_write_bytecode(((u,/tmp/pip-k8wh6o-build/setuptools/__init__.pyu<module>s2		
	python3.3/site-packages/setuptools/__pycache__/ssl_support.cpython-33.pyc000064400000021711151733566760022527 0ustar00�
�Re�c@scddlZddlZddlZddlZddlZddlmZmZddlmZyddl	Z	Wne
k
r�dZ	YnXdddddgZd	j
�j�ZeZZxpd
ddgfd
ddgffD]J\ZZx;eD]3Zyedeef�Wq�e
k
r(Yq�Xq�Wq�We	dk	oLeeefkZyddl	mZmZWnWe
k
r�y$ddlmZddlmZWne
k
r�dZdZYnXYnXes�Gdd�de�Znesddd�Zdd�ZnGdd�de�ZGdd�de�Zddd�Zda dd �Z!d!d�Z"dS("iN(uResolutionErroruExtractionError(uurllib2uVerifyingHTTPSHandlerufind_ca_bundleuis_availableu
cert_pathsu
opener_foru�
/etc/pki/tls/certs/ca-bundle.crt
/etc/ssl/certs/ca-certificates.crt
/usr/share/ssl/certs/ca-bundle.crt
/usr/local/share/certs/ca-root.crt
/etc/ssl/cert.pem
/System/Library/OpenSSL/certs/cert.pem
uHTTPSHandleruurllib2uurllib.requestuHTTPSConnectionuhttplibuhttp.clientufrom %s import %s(uCertificateErrorumatch_hostname(uCertificateError(umatch_hostnamecBs|EeZdZdS(uCertificateErrorN(u__name__u
__module__u__qualname__(u
__locals__((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyuCertificateError8suCertificateErroric
CsXg}|sdS|jd�}|d}|dd�}|jd�}||krmtdt|���n|s�|j�|j�kS|dkr�|jd�nY|jd�s�|jd�r�|jtj	|��n"|jtj	|�j
d	d
��x$|D]}|jtj	|��qWtjddj|�d
tj
�}	|	j|�S(upMatching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        u.iiNu*u,too many wildcards in certificate DNS name: u[^.]+uxn--u\*u[^.]*u\Au\.u\ZF(uFalseusplitucountuCertificateErrorurepruloweruappendu
startswithureuescapeureplaceucompileujoinu
IGNORECASEumatch(
udnuhostnameu
max_wildcardsupatsupartsuleftmostu	remainderu	wildcardsufragupat((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu_dnsname_match<s*
"
&u_dnsname_matchcCs[|std��ng}|jdf�}xC|D];\}}|dkr4t||�r_dS|j|�q4q4W|s�xc|jdf�D]L}xC|D];\}}|dkr�t||�r�dS|j|�q�q�Wq�Wnt|�dkrtd|d	jtt|��f��n;t|�dkrKtd
||df��ntd��dS(
u=Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
        rules are followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        uempty or no certificateusubjectAltNameuDNSNusubjectu
commonNameiu&hostname %r doesn't match either of %su, uhostname %r doesn't match %riu=no appropriate commonName or subjectAltName fields were found(	u
ValueErrorugetu_dnsname_matchuappendulenuCertificateErrorujoinumapurepr(ucertuhostnameudnsnamesusanukeyuvalueusub((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyumatch_hostnameps.%umatch_hostnamecBs2|EeZdZdZdd�Zdd�ZdS(uVerifyingHTTPSHandleru=Simple verifying handler: no auth, subclasses, timeouts, etc.cCs||_tj|�dS(N(u	ca_bundleuHTTPSHandleru__init__(uselfu	ca_bundle((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu__init__�s	uVerifyingHTTPSHandler.__init__cs�j�fdd�|�S(Ncst|�j|�S(N(uVerifyingHTTPSConnu	ca_bundle(uhostukw(uself(u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu<lambda>�su2VerifyingHTTPSHandler.https_open.<locals>.<lambda>(udo_open(uselfureq((uselfu//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu
https_open�su VerifyingHTTPSHandler.https_openN(u__name__u
__module__u__qualname__u__doc__u__init__u
https_open(u
__locals__((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyuVerifyingHTTPSHandler�scBs2|EeZdZdZdd�Zdd�ZdS(uVerifyingHTTPSConnu@Simple verifying connection: no auth, subclasses, timeouts, etc.cKs tj|||�||_dS(N(uHTTPSConnectionu__init__u	ca_bundle(uselfuhostu	ca_bundleukw((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu__init__�suVerifyingHTTPSConn.__init__cCs�tj|j|jft|dd��}t|d�rat|dd�ra||_|j�nt	j
|dt	jd|j�|_yt
|jj�|j�Wn5tk
r�|jjtj�|jj��YnXdS(Nusource_addressu_tunnelu_tunnel_hostu	cert_reqsuca_certs(usocketucreate_connectionuhostuportugetattruNoneuhasattrusocku_tunnelussluwrap_socketu
CERT_REQUIREDu	ca_bundleumatch_hostnameugetpeercertuCertificateErrorushutdownu	SHUT_RDWRuclose(uselfusock((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyuconnect�s$!	


uVerifyingHTTPSConn.connectN(u__name__u
__module__u__qualname__u__doc__u__init__uconnect(u
__locals__((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyuVerifyingHTTPSConn�suVerifyingHTTPSConncCstjt|pt���jS(u@Get a urlopen() replacement that uses ca_bundle for verification(uurllib2ubuild_openeruVerifyingHTTPSHandlerufind_ca_bundleuopen(u	ca_bundle((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu
opener_for�scsxtdk	rtjSyddlm�Wntk
r?dSYnXG�fdd�d��}|dddg�atjS(Ni(uCertFilecs,|EeZdZff�fdd�ZdS(u$get_win_certfile.<locals>.MyCertFilecsL�j|�x|D]}|j|�qW|j|�tj|j�dS(N(u__init__uaddstoreuaddcertsuatexituregisteruclose(uselfustoresucertsustore(uCertFile(u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu__init__�s



u-get_win_certfile.<locals>.MyCertFile.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__(uCertFile(u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu
MyCertFile�su
MyCertFileustoresuCAuROOT(u	_wincertsuNoneunameuwincertstoreuCertFileuImportError(u
MyCertFile((uCertFileu//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyuget_win_certfile�s
	uget_win_certfilec
Cswtjdkrt�Sx$tD]}tjj|�r|SqWytjdd�SWntt	t
fk
rrdSYnXdS(u*Return an existing CA bundle path, or Noneuntucertifiu
cacert.pemN(uosunameuget_win_certfileu
cert_pathsupathuisfileu
pkg_resourcesuresource_filenameuImportErroruResolutionErroruExtractionErroruNone(u	cert_path((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyufind_ca_bundle�s
(#uosusocketuatexitureu
pkg_resourcesuResolutionErroruExtractionErrorusetuptools.compatuurllib2ussluImportErroruNoneu__all__ustripusplitu
cert_pathsuobjectuHTTPSHandleruHTTPSConnectionuwhatuwhereumoduleuexecuis_availableuCertificateErrorumatch_hostnameubackports.ssl_match_hostnameu
ValueErroru_dnsname_matchuVerifyingHTTPSHandleruVerifyingHTTPSConnu
opener_foru	_wincertsuget_win_certfileufind_ca_bundle(((u//tmp/pip-k8wh6o-build/setuptools/ssl_support.pyu<module>sV
	






4)
python3.3/site-packages/setuptools/__pycache__/site-patch.cpython-33.pyc000064400000003754151733566760022202 0ustar00�
�Rer	c@s)dd�Zedkr%e�[ndS(cCs�ddl}ddl}ddl}|jjd�}|dksX|jdkra|rag}n|j|j�}t	|di�}|j
t|�d�}|j
jt
�}x�|D]�}||ks�|r�q�n|j|�}|dk	r |jd�}|dk	r�|jd�Pq�q�y.ddl}	|	jd|g�\}
}}Wntk
rew�YnX|
dkrxq�nz|	jd|
||�Wd|
j�XPq�Wtd��tdd�|j
D��}
t	|d	d�}d|_x|D]}t|�q�W|j|7_t|d�\}}d}g}x�|j
D]�}t|�\}}||kr}|dkr}t|�}n||
ks�|dkr�|j|�q>|j||�|d
7}q>W||j
dd�<dS(Niu
PYTHONPATHuwin32upath_importer_cacheusiteu$Couldn't find the real 'site' modulecSs&g|]}t|�ddf�qS(i(umakepath(u.0uitem((u./tmp/pip-k8wh6o-build/setuptools/site-patch.pyu
<listcomp>+s	u__boot.<locals>.<listcomp>u__egginserti(usysuosuos.pathuenvironugetuNoneuplatformusplitupathsepugetattrupathulenudirnameu__file__ufind_moduleuload_moduleuimpuImportErrorucloseudictu__egginsertu
addsitedirumakepathuappenduinsert(usysuosu
PYTHONPATHupicustdpathumydiruitemuimporteruloaderuimpustreamupathudescruknown_pathsuoldposudundu	insert_atunew_pathupunp((u./tmp/pip-k8wh6o-build/setuptools/site-patch.pyu__boots^$"	

"
	
u__bootusiteN(u__bootu__name__(((u./tmp/pip-k8wh6o-build/setuptools/site-patch.pyu<module>sHpython3.3/site-packages/setuptools/__pycache__/lib2to3_ex.cpython-33.pyc000064400000007212151733566760022104 0ustar00�
�Re�c@sxdZddlmZddlmZddlmZmZddl	Z	Gdd�de�Z
Gdd	�d	e�ZdS(
uy
Customized Mixin2to3 support:

 - adds support for converting doctests


This module raises an ImportError on Python 2.
i(u	Mixin2to3(ulog(uRefactoringTooluget_fixers_from_packageNcBs8|EeZdZdd�Zdd�Zdd�ZdS(uDistutilsRefactoringToolcOstj||�dS(N(uloguerror(uselfumsguargsukw((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyu	log_errorsu"DistutilsRefactoringTool.log_errorcGstj||�dS(N(uloguinfo(uselfumsguargs((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyulog_messagesu$DistutilsRefactoringTool.log_messagecGstj||�dS(N(ulogudebug(uselfumsguargs((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyu	log_debugsu"DistutilsRefactoringTool.log_debugN(u__name__u
__module__u__qualname__u	log_errorulog_messageu	log_debug(u
__locals__((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyuDistutilsRefactoringToolsuDistutilsRefactoringToolcBs;|EeZdZddd�Zdd�Zdd�ZdS(	u	Mixin2to3cCs�|jjdk	rdS|s dStjddj|��|j�|j�|r�tj	r�t
|j�}|j|dddd�q�nt
j||�dS(NuFixing u uwriteu
doctests_onlyT(udistributionuuse_2to3uTrueuloguinfoujoinu_Mixin2to3__build_fixer_namesu_Mixin2to3__exclude_fixersu
setuptoolsurun_2to3_on_doctestsuDistutilsRefactoringToolufixer_namesurefactoru
_Mixin2to3urun_2to3(uselfufilesudoctestsur((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyurun_2to3s

	uMixin2to3.run_2to3cCs�|jr
dSg|_x'tjD]}|jjt|��q W|jjdk	r�x-|jjD]}|jjt|��q_WndS(N(ufixer_namesu
setuptoolsulib2to3_fixer_packagesuextenduget_fixers_from_packageudistributionuuse_2to3_fixersuNone(uselfup((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyu__build_fixer_names+s		uMixin2to3.__build_fixer_namescCsqt|dg�}|jjdk	r:|j|jj�nx0|D](}||jkrA|jj|�qAqAWdS(Nuexclude_fixers(ugetattrudistributionuuse_2to3_exclude_fixersuNoneuextendufixer_namesuremove(uselfuexcluded_fixersu
fixer_name((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyu__exclude_fixers4s
uMixin2to3.__exclude_fixersNF(u__name__u
__module__u__qualname__uFalseurun_2to3u_Mixin2to3__build_fixer_namesu_Mixin2to3__exclude_fixers(u
__locals__((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyu	Mixin2to3s	u	Mixin2to3(u__doc__udistutils.utilu	Mixin2to3u
_Mixin2to3u	distutilsulogulib2to3.refactoruRefactoringTooluget_fixers_from_packageu
setuptoolsuDistutilsRefactoringTool(((u./tmp/pip-k8wh6o-build/setuptools/lib2to3_ex.pyu<module>s
python3.3/site-packages/setuptools/__pycache__/package_index.cpython-33.pyc000064400000134625151733566760022725 0ustar00�
�Re
�c@s�dZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZddlmZddlmZddlmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-dd	lm.Z.dd
l/m0Z0ddl1m2Z2ddl3m4Z4ej5d
�Z6ej5dej7�Z8ej5d�Z9ej5dej7�j:Z;dj<�Z=ddddgZ>dZ?dd�Z@dd�ZAeBdd�ZCeBdd�ZDeBdd�ZEeBeeBdd�ZFeBd d!�ZGd"d#�ZHej5d$ej7�ZIeHd%d&��ZJd'ejKdd(�ed)�djKfZLGd*d+�d+eM�ZNGd,d-�d-eN�ZOGd.d�de�ZPej5d/�jQZRd0d1�ZSd2d3�ZTd4d5�ZUdd6d7�ZVd8d9�ZWGd:d;�d;eM�ZXGd<d=�d=e-j-�ZYejZd>d?�Z[eVe?�e[�Z[d@dA�Z\dBdC�Z]dS(Du#PyPI and direct package downloadingiN(uwraps(
u
CHECKOUT_DISTuDistributionuBINARY_DISTunormalize_pathuSOURCE_DISTurequireuEnvironmentufind_distributionsu	safe_nameusafe_versionuto_filenameuRequirementuDEVELOP_DIST(ussl_support(ulog(uDistutilsError(uurllib2uhttplibuStringIOu	HTTPErroruurlparseu
urlunparseuunquoteu	splituseruurl2pathnameuname2codepointuunichruurljoinuurlsplitu
urlunsplituConfigParser(ufilterfalse(u	translate(ustrip_fragment(uget_all_headersu^egg=([-A-Za-z0-9_.]+)$uhref\s*=\s*['"]?([^'"> ]+)u�<a href="([^"#]+)">([^<]+)</a>
\s+\(<a (?:title="MD5 hash"
\s+)href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\)u([-+.a-z0-9]{2,}):u.tar.gz .tar.bz2 .tar .zip .tgzuPackageIndexudistros_for_urluparse_bdist_wininstuinterpret_distro_nameicCs|j�}d\}}}|jd�r�|jd�rR|dd�}d}q�|jdd�r�|dd�}|dd�}d}q�|jd
�r�|dd�}d}q�|jd
d�r�|dd�}|dd�}d}q�n|||fS(u=Return (base,pyversion) or (None,None) for possible .exe nameu.exeu
.win32.exeNi
uwin32u	.win32-pyiiiu.win-amd64.exeiu	win-amd64u
.win-amd64-pyi(NNNi����i�i����i����i�i�i��i����i����i��(uloweruNoneuendswithu
startswith(unameulowerubaseupy_veruplat((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuparse_bdist_wininst.s$			cCs�t|�\}}}}}}t|jd�d�}|dkrk|dkrkt|jd�d�}nd|kr�|jdd�\}}n||fS(	Nu/iusourceforge.netudownloadiu#i����i����(uurlparseuunquoteusplit(uurluschemeuserverupathu
parametersuqueryufragmentubase((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuegg_info_for_urlFsuegg_info_for_urlccs�t|�\}}xt|||�D]}|Vq%W|r�tj|�}|r�x1t||jd�|dt�D]}|VqqWq�ndS(uEYield egg or source distribution objects that might be found at a URLiu
precedenceN(uegg_info_for_urludistros_for_locationuEGG_FRAGMENTumatchuinterpret_distro_nameugroupu
CHECKOUT_DIST(uurlumetadataubaseufragmentudistumatch((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyudistros_for_urlNs	"cCs�|jd�r"|dd�}n|jd�rSd|krStj|||�gS|jd�r�t|�\}}}|dk	r�t||||t|�SnxDtD]<}|j|�r�|dt|��}t|||�Sq�WgS(u:Yield egg or source distribution objects based on basenameu.egg.zipNiu.eggu-u.exei����(	uendswithuDistributionu
from_locationuparse_bdist_wininstuNoneuinterpret_distro_nameuBINARY_DISTu
EXTENSIONSulen(ulocationubasenameumetadatauwin_baseupy_veruplatformuext((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyudistros_for_locationZs
udistros_for_locationcCs"tt|�tjj|�|�S(uEYield possible egg or source distribution objects based on a filename(udistros_for_locationunormalize_pathuosupathubasename(ufilenameumetadata((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyudistros_for_filenameosudistros_for_filenamec	cs�|jd�}|sdxLt|dd��D]1\}}t|�dkr,|jd�r,dSq,Wnxmtdt|�d�D]R}t||dj|d|��dj||d��d|d|d	|�Vq~WdS(
u�Generate alternative interpretations of a source distro name

    Note: if `location` is a filesystem filename, you should call
    ``pkg_resources.normalize_path()`` on it before passing it to this
    routine!
    u-iNiupy2.iu
py_versionu
precedenceuplatform(usplitu	enumerateulenu
startswithurangeuDistributionujoin(	ulocationubasenameumetadatau
py_versionu
precedenceuplatformupartsuiup((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuinterpret_distro_namevs#! 5ccs�t�}|j}|dkrMxgt|j|�D]}||�|Vq1Wn;x8|D]0}||�}||krT||�|VqTqTWdS(uHList unique elements, preserving order. Remember all elements ever seen.N(usetuadduNoneufilterfalseu__contains__(uiterableukeyuseenuseen_adduelementuk((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuunique_everseen�s		


uunique_everseencs"t���fdd��}|S(us
    Wrap a function returning an iterable such that the resulting iterable
    only ever yields unique items.
    cst�||��S(N(uunique_everseen(uargsukwargs(ufunc(u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuwrapper�suunique_values.<locals>.wrapper(uwraps(ufuncuwrapper((ufuncu1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
unique_values�su
unique_valuesu(<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>ccsx�tj|�D]�}|j�\}}tttj|j�jd���}d|ksgd|krx7t	j|�D]#}t
|t|jd���VqwWqqWxddD]\}|j
|�}|d	kr�t	j||�}|rt
|t|jd���Vqq�q�WdS(
uEFind rel="homepage" and rel="download" links in `page`, yielding URLsu,uhomepageudownloadiu
<th>Home Pageu<th>Download URLN(u
<th>Home Pageu<th>Download URLi����(uRELufinditerugroupsusetumapustrustripulowerusplituHREFuurljoinu
htmldecodeugroupufindusearch(uurlupageumatchutagurelurelsupos((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyufind_external_links�s'(
ufind_external_linksuPython-urllib/%s setuptools/%siu
setuptoolscBs>|EeZdZdZdd�Zdd�Zdd�ZdS(	uContentCheckeruP
    A null content checker that defines the interface for checking content
    cCsdS(u3
        Feed a block of data to the hash.
        N((uselfublock((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyufeed�suContentChecker.feedcCsdS(uC
        Check the hash. Return False if validation fails.
        T(uTrue(uself((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuis_valid�suContentChecker.is_validcCsdS(uu
        Call reporter with information about the checker (hash name)
        substituted into the template.
        N((uselfureporterutemplate((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyureport�suContentChecker.reportN(u__name__u
__module__u__qualname__u__doc__ufeeduis_validureport(u
__locals__((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuContentChecker�suContentCheckercBse|EeZdZejd�Zdd�Zedd��Zdd�Z	dd	�Z
d
d�ZdS(
uHashCheckeruK(?P<hash_name>sha1|sha224|sha384|sha256|sha512|md5)=(?P<expected>[a-f0-9]+)cCs(||_tj|�|_||_dS(N(u	hash_nameuhashlibunewuhashuexpected(uselfu	hash_nameuexpected((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu__init__�s	uHashChecker.__init__cCsLt|�d}|st�S|jj|�}|s<t�S||j��S(u5Construct a (possibly null) ContentChecker from a URLii����(uurlparseuContentCheckerupatternusearchu	groupdict(uclsuurlufragmentumatch((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyufrom_url�suHashChecker.from_urlcCs|jj|�dS(N(uhashuupdate(uselfublock((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyufeed�suHashChecker.feedcCs|jj�|jkS(N(uhashu	hexdigestuexpected(uself((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuis_valid�suHashChecker.is_validcCs||j}||�S(N(u	hash_name(uselfureporterutemplateumsg((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyureports
uHashChecker.reportN(u__name__u
__module__u__qualname__ureucompileupatternu__init__uclassmethodufrom_urlufeeduis_validureport(u
__locals__((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuHashChecker�s	uHashCheckercs�|EeZdZdZddGdHdIdd�ZdJdd�ZdJdd	�Z	dJd
d�Z
dd
�Zdd�Zdd�Z
dd�ZdHdd�Zdd�ZdH�fdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�ZdJdJdJdHd$d%�ZdJdJd&d'�Zd(d)�Zd*Zd+d,�Zd-d.�ZdHd/d0�Zd1d2�Zd3d4�Zd5d6�Z d7d8�Z!d9d:�Z"e#dJd;d<��Z$d=d>�Z%d?d@�Z&dAdB�Z'dCdD�Z(dEdF�Z)�S(KuPackageIndexu;A distribution index that scans web pages for download URLsuhttps://pypi.python.org/simpleu*cOs�tj|||�|dd|jd��|_i|_i|_i|_tjdj	t
t|���j|_
g|_|r�tjr�|s�tj�r�tj|�|_ntj|_dS(Nu/u|(uEnvironmentu__init__uendswithu	index_urluscanned_urlsufetched_urlsu
package_pagesureucompileujoinumapu	translateumatchuallowsuto_scanussl_supportuis_availableufind_ca_bundleu
opener_foruopeneruurllib2uurlopen(uselfu	index_urluhostsu	ca_bundleu
verify_ssluargsukw((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu__init__	s!			'	!uPackageIndex.__init__c

CsU||jkr|rdSd|j|<t|�sD|j|�dStt|��}|r�|j|�sodS|jd|�n|s�|s�||jkr�tt	|j
|��dS|j|�s�d|j|<dS|jd|�d|j|<|j|d|�}|dkrdSd|j|j<d|jjdd�j�krZ|j�dS|j}|j�}t|t�s�t|t�r�d}n|jjd	�p�d}|j|d
�}n|j�xBtj|�D]1}t|t|jd���}	|j|	�q�W|j|j �rQt!|dd�d
krQ|j"||�}ndS(u<Evaluate a URL as a possible download, and maybe retrieve itNuFound link: %su
Reading %su<Download error on %s: %%s -- Some packages may not be found!uhtmlucontent-typeuulatin-1ucharsetuignoreiucodei�T(#uscanned_urlsuTrueu
URL_SCHEMEuprocess_filenameulistudistros_for_urluurl_okudebugufetched_urlsumapuadduinfouopen_urluNoneuurluheadersugetulowerucloseureadu
isinstanceustru	HTTPErroru	get_paramudecodeuHREFufinditeruurljoinu
htmldecodeugroupuprocess_urlu
startswithu	index_urlugetattru
process_index(
uselfuurluretrieveudistsufubaseupageucharsetumatchulink((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuprocess_urlsN



!
		
*uPackageIndex.process_urlcCs�tjj|�s&|jd|�dStjj|�r�|r�tjj|�}x9tj|�D]%}|jtjj||�d�qaWnt
|�}|r�|jd|�tt
|j|��ndS(Nu
Not found: %su	Found: %sT(uosupathuexistsuwarnuisdirurealpathulistdiruprocess_filenameujoinuTrueudistros_for_filenameudebugulistumapuadd(uselfufnunestedupathuitemudists((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuprocess_filenameHs&uPackageIndex.process_filenamecCs}t|�}|r-|jd�j�dksF|jt|�d�rJdSd}|rit||��n|j||�dS(NiufileuN
Note: Bypassing %s (disallowed host; see http://bit.ly/1dg9ijs for details).
T(u
URL_SCHEMEugroupuloweruallowsuurlparseuTrueuDistutilsErroruwarn(uselfuurlufatalusumsg((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuurl_okXs:uPackageIndex.url_okcCsfx_|D]W}tjj|�rx<tj|�D](}|jd�r/|j||�q/q/WqqWdS(Nu	.egg-link(uosupathuisdirulistdiruendswithu
scan_egg_link(uselfusearch_pathuitemuentry((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuscan_egg_linkscs

uPackageIndex.scan_egg_linkscCs�dd�ttjttjj||���D�}t|�dkr�xXttjj||d��D]4}tjj||�|_	t
|_|j|�qfWndS(NcSsg|]}|r|�qS(((u.0u_f((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
<listcomp>ks	u.PackageIndex.scan_egg_link.<locals>.<listcomp>ii(
umapustrustripuopenuosupathujoinulenufind_distributionsulocationuSOURCE_DISTu
precedenceuadd(uselfupathuentryulinesudist((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
scan_egg_linkjs"&	uPackageIndex.scan_egg_linkc

s�fdd�}xRtj|�D]A}y&|t|t|jd����Wq"tk
rbYq"Xq"W||�\}}|rxyt||�D]h}t|�\}}	|jd�r�|	r�|r�|d||f7}q��j	|�n�j
|�q�Wtjdd�|�SdSd	S(
u#Process the contents of a PyPI pagecs�|j�j�r�ttt|t�j�d�jd���}t|�dkr�d|dkr�t|d�}t|d�}d�j
j|j�i�|<t
|�t
|�fSndS(Nu/iu#iiT(NN(u
startswithu	index_urlulistumapuunquoteulenusplitu	safe_nameusafe_versionuTrueu
package_pagesu
setdefaultuloweruto_filenameuNone(ulinkupartsupkguver(uself(u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuscanus+"u(PackageIndex.process_index.<locals>.scaniu.pyu
#egg=%s-%scSsd|jddd�S(Nu<a href="%s#md5=%s">%s</a>iii(ugroup(um((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu<lambda>�su,PackageIndex.process_index.<locals>.<lambda>uN(
uHREFufinditeruurljoinu
htmldecodeugroupu
ValueErrorufind_external_linksuegg_info_for_urluendswithuneed_version_infouscan_urluPYPI_MD5usub(
uselfuurlupageuscanumatchupkguverunew_urlubaseufrag((uselfu1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
process_indexss$&
	uPackageIndex.process_indexcCs|jd|�dS(NuPPage at %s links to .py file(s) without version info; an index scan is required.(uscan_all(uselfuurl((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuneed_version_info�suPackageIndex.need_version_infocGsO|j|jkr;|r+|j||�n|jd�n|j|j�dS(Nu6Scanning index of all packages (this may take a while)(u	index_urlufetched_urlsuwarnuinfouscan_url(uselfumsguargs((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuscan_all�s
uPackageIndex.scan_allcCs�|j|j|jd�|jj|j�sN|j|j|jd�n|jj|j�ss|j|�nx3t|jj|jf��D]}|j|�q�WdS(Nu/(	uscan_urlu	index_urluunsafe_nameu
package_pagesugetukeyuproject_nameunot_found_in_indexulist(uselfurequirementuurl((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
find_packages�s%uPackageIndex.find_packagescsk|j�|j|�x8||jD])}||kr;|S|jd||�q%Wtt|�j||�S(Nu%s does not match %s(uprescanu
find_packagesukeyudebugusuperuPackageIndexuobtain(uselfurequirementu	installerudist(u	__class__(u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuobtain�s

uPackageIndex.obtaincCsi|j|jd|�|j�se|j�tj|�td|jjtj	j
|�f��ndS(u-
        checker is a ContentChecker
        uValidating %%s checksum for %su7%s validation failed for %s; possible download problem?N(ureportudebuguis_validucloseuosuunlinkuDistutilsErroruhashunameupathubasename(uselfucheckerufilenameutfp((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
check_hash�s

uPackageIndex.check_hashcCsrxk|D]c}|jdksJt|�sJ|jd�sJtt|��rZ|j|�q|jj|�qWdS(u;Add `urls` to the list that will be prescanned for searchesufile:N(uto_scanuNoneu
URL_SCHEMEu
startswithulistudistros_for_urluscan_urluappend(uselfuurlsuurl((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuadd_find_links�s

uPackageIndex.add_find_linkscCs2|jr%tt|j|j��nd|_dS(u7Scan urls scheduled for prescanning (e.g. --find-links)N(uto_scanulistumapuscan_urluNone(uself((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuprescan�s	uPackageIndex.prescancCsN||jr |jd}}n|jd}}|||j�|j�dS(Nu#Couldn't retrieve index page for %ru3Couldn't find index page for %r (maybe misspelled?)(ukeyuinfouwarnuunsafe_nameuscan_all(uselfurequirementumethumsg((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyunot_found_in_index�s

uPackageIndex.not_found_in_indexcCs�t|t�s�t|�}|r||j|jd�||�}t|�\}}|jd�rx|j|||�}n|Stj	j
|�r�|Sytj|�}Wq�tk
r�t
d|f��Yq�Xnt|j||�dd�S(uLocate and/or download `spec` to `tmpdir`, returning a local path

        `spec` may be a ``Requirement`` object, or a string containing a URL,
        an existing local filename, or a project/version requirement spec
        (i.e. the string form of a ``Requirement`` object).  If it is the URL
        of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
        that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
        automatically created alongside the downloaded file.

        If `spec` is a ``Requirement`` object or a string containing a
        project/version requirement spec, this method returns the location of
        a matching distribution (possibly after downloading it to `tmpdir`).
        If `spec` is a locally existing file or directory name, it is simply
        returned unchanged.  If `spec` is a URL, it is downloaded to a subpath
        of `tmpdir`, and the local filename is returned.  Various errors may be
        raised if a problem occurs during downloading.
        iu.pyu1Not a URL, existing file, or requirement spec: %rulocationN(u
isinstanceuRequirementu
URL_SCHEMEu
_download_urlugroupuegg_info_for_urluendswithu	gen_setupuosupathuexistsuparseu
ValueErroruDistutilsErrorugetattrufetch_distributionuNone(uselfuspecutmpdiruschemeufoundubaseufragment((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyudownload�s"
uPackageIndex.downloadc		sN�jd|�i�d	}d	����fdd�}|rf�j��j|�||�}n|d	k	r�|p�|||�}n|d	kr��jd	k	r��j�||�}n|d	kr�|r��j|�||�}n|d	kr�jd�rdpd|�n/�jd|�|jd�j|j|��Sd	S(
u|Obtain a distribution suitable for fulfilling `requirement`

        `requirement` must be a ``pkg_resources.Requirement`` instance.
        If necessary, or if the `force_scan` flag is set, the requirement is
        searched for in the (online) package index as well as the locally
        installed packages.  If a distribution matching `requirement` is found,
        the returned distribution's ``location`` is the value you would have
        gotten from calling the ``download()`` method with the matching
        distribution's URL or filename.  If no matching distribution is found,
        ``None`` is returned.

        If the `source` flag is set, only source distributions and source
        checkout links will be considered.  Unless the `develop_ok` flag is
        set, development and system eggs (i.e., those using the ``.egg-info``
        format) will be ignored.
        uSearching for %scs�|dkr�}nx�||jD]q}|jtkrn�rn|�kr#�jd|�d�|<q#q#n||kr#|jtks��r#|Sq#WdS(Nu&Skipping development or system egg: %si(uNoneukeyu
precedenceuDEVELOP_DISTuwarnuSOURCE_DIST(urequenvudist(u
develop_okuselfuskippedusource(u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyufind1s	
"u-PackageIndex.fetch_distribution.<locals>.findu2No local packages or download links found for %s%sua source distribution of uuBest match: %sulocationN(	uinfouNoneuprescanu
find_packagesuto_scanuwarnucloneudownloadulocation(	uselfurequirementutmpdiru
force_scanusourceu
develop_okulocal_indexudistufind((u
develop_okuselfuskippedusourceu1/tmp/pip-k8wh6o-build/setuptools/package_index.pyufetch_distributions.




uPackageIndex.fetch_distributioncCs/|j||||�}|dk	r+|jSdS(u3Obtain a file suitable for fulfilling `requirement`

        DEPRECATED; use the ``fetch_distribution()`` method now instead.  For
        backward compatibility, this routine is identical but returns the
        ``location`` of the downloaded distribution instead of a distribution
        object.
        N(ufetch_distributionuNoneulocation(uselfurequirementutmpdiru
force_scanusourceudist((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyufetch[suPackageIndex.fetchc
Csbtj|�}|r=dd�t||jd�d�D�p@g}t|�dkr3tjj|�}tjj	|�|kr�tjj
||�}ddlm}|||�s�t
j||�|}q�nttjj
|d�d�}	|	jd|dj|djtjj|�df�|	j�|S|rRtd	||f��ntd
��dS(NcSsg|]}|jr|�qS((uversion(u.0ud((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
<listcomp>ks	u*PackageIndex.gen_setup.<locals>.<listcomp>ii(usamefileusetup.pyuwuIfrom setuptools import setup
setup(name=%r, version=%r, py_modules=[%r])
u�Can't unambiguously interpret project/version identifier %r; any dashes in the name or version should be escaped using underscores. %rupCan't process plain .py files without an '#egg=name-version' suffix to enable automatic setup script generation.(uEGG_FRAGMENTumatchuinterpret_distro_nameugroupuNoneulenuosupathubasenameudirnameujoinusetuptools.command.easy_installusamefileushutilucopy2uopenuwriteuproject_nameuversionusplitextucloseuDistutilsError(
uselfufilenameufragmentutmpdirumatchudistsubasenameudstusamefileufile((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu	gen_setuphs4	
uPackageIndex.gen_setupi c
Cs�|jd|�d\}}}zHtj|�}|jt|��}t|t�rwtd||j	|j
f��n|j�}d}|j}	d	}
d|kr�t|d�}t
tt|��}
|j||||	|
�nt|d�}xY|j|	�}|rK|j|�|j|�|d7}|j||||	|
�q�Pq�|j|||�|SWd|r}|j�n|r�|j�nXdS(
NuDownloading %suCan't download %s: %s %siiucontent-lengthuContent-Lengthuwb(NNNi����(uinfouNoneuHashCheckerufrom_urluopen_urlustrip_fragmentu
isinstanceu	HTTPErroruDistutilsErrorucodeumsgudl_blocksizeuget_all_headersumaxumapuintu
reporthookuopenureadufeeduwriteu
check_hashuclose(
uselfuurlufilenameufputfpuinfoucheckeruheadersublocknumubsusizeusizesublock((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_download_to�s>	



uPackageIndex._download_tocCsdS(N((uselfuurlufilenameublocknumublksizeusize((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
reporthook�suPackageIndex.reporthookcCs�|jd�rt|�Syt||j�SWn�ttjfk
r�tj�d}dj	dd�|j
D��}|r�|j||�ntd||f��Yn.t
jk
r�tj�d}|SYnt
jk
r)tj�d}|r|j||j�ntd||jf��Yn�tjk
r�tj�d}|re|j||j�ntd||jf��YnTtjk
r�tj�d}|r�|j||�ntd||f��YnXdS(	Nufile:iu cSsg|]}t|��qS((ustr(u.0uarg((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
<listcomp>�s	u)PackageIndex.open_url.<locals>.<listcomp>u%s %suDownload error for %s: %su;%s returned a bad status line. The server might be down, %s(u
startswithu
local_openuopen_with_authuopeneru
ValueErroruhttplibu
InvalidURLusysuexc_infoujoinuargsuwarnuDistutilsErroruurllib2u	HTTPErroruURLErrorureasonu
BadStatusLineulineu
HTTPException(uselfuurluwarninguvumsg((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuopen_url�s@
uPackageIndex.open_urlcCsBt|�\}}|rLx7d|krH|jdd�jdd�}qWnd}|jd�rt|dd�}ntjj||�}|dks�|jd	�r�|j||�S|d
ks�|jd�r�|j||�S|jd�r�|j	||�S|d
krt
t|�d�S|j|d�|j||�SdS(Nu..u.u\u_u__downloaded__u.egg.zipiusvnusvn+ugitugit+uhg+ufileii����T(uegg_info_for_urlureplaceuendswithuosupathujoinu
startswithu
_download_svnu
_download_gitu_download_hguurl2pathnameuurlparseuurl_okuTrueu_attempt_download(uselfuschemeuurlutmpdirunameufragmentufilename((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
_download_url�s$%uPackageIndex._download_urlcCs|j|d�dS(NT(uprocess_urluTrue(uselfuurl((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuscan_url�suPackageIndex.scan_urlcCsK|j||�}d|jdd�j�krC|j|||�S|SdS(Nuhtmlucontent-typeu(u_download_tougetuloweru_download_html(uselfuurlufilenameuheaders((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_attempt_downloadsuPackageIndex._attempt_downloadcCs�t|�}xW|D]O}|j�rtjd|�r^|j�tj|�|j||�SPqqW|j�tj|�td|��dS(Nu <title>([^- ]+ - )?Revision \d+:uUnexpected HTML page found at (	uopenustripureusearchucloseuosuunlinku
_download_svnuDistutilsError(uselfuurluheadersufilenameufileuline((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_download_html	s




uPackageIndex._download_htmlc
Cs`|jdd�d}d}|j�jd�r/d|kr/t|�\}}}}}}	|r/|jd�r/d|d	d�kr/|d	d�jdd�\}}t|�\}
}|
r,d
|
kr�|
jd
d�\}}
d||
f}n
d|
}|}t||||||	f�}q,q/n|jd
||�tjd|||f�|S(Nu#iiuusvn:u@u//u/iu:u --username=%s --password=%su --username=u'Doing subversion checkout from %s to %susvn checkout%s -q %s %s(	usplituloweru
startswithuurlparseu	splituseru
urlunparseuinfouosusystem(uselfuurlufilenameucredsuschemeunetlocupathupuqufuauthuhostuuserupw((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
_download_svns"!,"
'uPackageIndex._download_svncCs�t|�\}}}}}|jdd�d}|jdd�d}d}d|krt|jdd�\}}nt||||df�}||fS(Nu+iu#iu@ui����(uurlsplitusplituNoneursplitu
urlunsplit(uurlu
pop_prefixuschemeunetlocupathuqueryufragurev((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_vcs_split_rev_from_url,su$PackageIndex._vcs_split_rev_from_urlcCs�|jdd�d}|j|dd	�\}}|jd||�tjd||f�|dk	r�|jd|�tjd||f�n|S(
Nu#iiu
pop_prefixuDoing git clone from %s to %sugit clone --quiet %s %suChecking out %su"(cd %s && git checkout --quiet %s)T(usplitu_vcs_split_rev_from_urluTrueuinfouosusystemuNone(uselfuurlufilenameurev((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
_download_git>s	uPackageIndex._download_gitcCs�|jdd�d}|j|dd	�\}}|jd||�tjd||f�|dk	r�|jd|�tjd||f�n|S(
Nu#iiu
pop_prefixuDoing hg clone from %s to %suhg clone --quiet %s %suUpdating to %su(cd %s && hg up -C -r %s >&-)T(usplitu_vcs_split_rev_from_urluTrueuinfouosusystemuNone(uselfuurlufilenameurev((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_download_hgNs	uPackageIndex._download_hgcGstj||�dS(N(ulogudebug(uselfumsguargs((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyudebug^suPackageIndex.debugcGstj||�dS(N(uloguinfo(uselfumsguargs((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuinfoasuPackageIndex.infocGstj||�dS(N(uloguwarn(uselfumsguargs((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuwarndsuPackageIndex.warn(u*NTF(*u__name__u
__module__u__qualname__u__doc__uNoneuTrueu__init__uFalseuprocess_urluprocess_filenameuurl_okuscan_egg_linksu
scan_egg_linku
process_indexuneed_version_infouscan_allu
find_packagesuobtainu
check_hashuadd_find_linksuprescanunot_found_in_indexudownloadufetch_distributionufetchu	gen_setupudl_blocksizeu_download_tou
reporthookuopen_urlu
_download_urluscan_urlu_attempt_downloadu_download_htmlu
_download_svnustaticmethodu_vcs_split_rev_from_urlu
_download_gitu_download_hgudebuguinfouwarn(u
__locals__((u	__class__u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuPackageIndexsL
0	*		)A
*$(u!&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?cCs3t|t�s|S|dkr)t|�St|�S(Ni�(u
isinstanceuintuunichruchr(uc((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuuchrks

uuchrcCs�|jd�}|jd�r:t|dd�d�}nC|jd�rbt|dd��}ntj||jd��}t|�S(Niu#xiiu#i(ugroupu
startswithuintuname2codepointugetuuchr(umatchuwhat((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
decode_entityqsu
decode_entitycCs
tt|�S(u'Decode HTML entities in the given text.(u
entity_subu
decode_entity(utext((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
htmldecode{su
htmldecodecs�fdd�}|S(Ncs��fdd�}|S(Ncs?tj�}tj��z�||�SWdtj|�XdS(N(usocketugetdefaulttimeoutusetdefaulttimeout(uargsukwargsuold_timeout(ufuncutimeout(u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_socket_timeout�s

u@socket_timeout.<locals>._socket_timeout.<locals>._socket_timeout((ufuncu_socket_timeout(utimeout(ufuncu1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_socket_timeout�su'socket_timeout.<locals>._socket_timeout((utimeoutu_socket_timeout((utimeoutu1/tmp/pip-k8wh6o-build/setuptools/package_index.pyusocket_timeouts	usocket_timeoutcCsCt|�}|j�}tj|�}|j�}|jdd�S(uq
    A function compatible with Python 2.3-3.3 that will encode
    auth from a URL suitable for an HTTP header.
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
    u
u(uunquoteuencodeubase64uencodestringudecodeureplace(uauthuauth_su
auth_bytesu
encoded_bytesuencoded((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_encode_auth�s
u_encode_authcBs>|EeZdZdZdd�Zdd�Zdd�ZdS(	u
Credentialu:
    A username/password pair. Use like a namedtuple.
    cCs||_||_dS(N(uusernameupassword(uselfuusernameupassword((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu__init__�s	uCredential.__init__ccs|jV|jVdS(N(uusernameupassword(uself((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu__iter__�suCredential.__iter__cCsdt|�S(Nu%(username)s:%(password)s(uvars(uself((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu__str__�suCredential.__str__N(u__name__u
__module__u__qualname__u__doc__u__init__u__iter__u__str__(u
__locals__((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
Credential�su
CredentialcBsJ|EeZdZdd�Zedd��Zdd�Zdd�Zd	S(
u
PyPIConfigcCsutjdddgd�}tjj||�tjjtjjd�d�}tjj|�rq|j	|�ndS(u%
        Load from ~/.pypirc
        uusernameupasswordu
repositoryuu~u.pypircN(
udictufromkeysuConfigParseru__init__uosupathujoinu
expanduseruexistsuread(uselfudefaultsurc((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu__init__�s
!uPyPIConfig.__init__cs5�fdd��j�D�}tt�j|��S(Ncs.g|]$}�j|d�j�r|�qS(u
repository(ugetustrip(u.0usection(uself(u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
<listcomp>�s	u2PyPIConfig.creds_by_repository.<locals>.<listcomp>(usectionsudictumapu_get_repo_cred(uselfusections_with_repositories((uselfu1/tmp/pip-k8wh6o-build/setuptools/package_index.pyucreds_by_repository�suPyPIConfig.creds_by_repositorycCsO|j|d�j�}|t|j|d�j�|j|d�j��fS(Nu
repositoryuusernameupassword(ugetustripu
Credential(uselfusectionurepo((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu_get_repo_cred�suPyPIConfig._get_repo_credcCs7x0|jj�D]\}}|j|�r|SqWdS(u�
        If the URL indicated appears to be a repository defined in this
        config, return the credential for that repository.
        N(ucreds_by_repositoryuitemsu
startswith(uselfuurlu
repositoryucred((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyufind_credential�suPyPIConfig.find_credentialN(u__name__u
__module__u__qualname__u__init__upropertyucreds_by_repositoryu_get_repo_credufind_credential(u
__locals__((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
PyPIConfig�s	u
PyPIConfigcCs�t|�\}}}}}}|jd�r?tjd��n|d	kr`t|�\}}	nd
}|s�t�j|�}
|
r�t|
�}|
j	|f}t
jd|�q�n|rdt|�}t
||	||||f�}tj|�}
|
jd|�ntj|�}
|
jdt�||
�}|r�t|j�\}}}}}}||kr�||	kr�t
||||||f�|_q�n|S(u4Open a urllib2 request, handling HTTP authenticationu:unonnumeric port: ''uhttpuhttpsu*Authenticating as %s for %s (from .pypirc)uBasic u
Authorizationu
User-Agent(uhttpuhttpsN(uurlparseuendswithuhttplibu
InvalidURLu	splituseruNoneu
PyPIConfigufind_credentialustruusernameuloguinfou_encode_authu
urlunparseuurllib2uRequestu
add_headeru
user_agentuurl(uurluopeneruschemeunetlocupathuparamsuqueryufraguauthuhostucreduinfounew_urlurequestufpus2uh2upath2uparam2uquery2ufrag2((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyuopen_with_auth�s2!'uopen_with_authcCs|S(N((uurl((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
fix_sf_urlsu
fix_sf_urlcCsut|�\}}}}}}t|�}tjj|�rItj|�S|jd�r=tjj|�r=g}x�tj	|�D]�}	|	dkr�t
tjj||	�d�}
|
j�}|
j
�Pn.tjjtjj||	��r�|	d7}	n|jd|	|	f�q�Wd|ddj|�}d\}}
nd\}}
}id
d6}t|||
|t|��S(u7Read a local path, with special support for directoriesu/u
index.htmluru<a href=%r>%s</a>u<html><head><title>%s</title>u</head><body>%s</body></html>u
i�uOKi�uPath not foundu	Not foundu	text/htmlucontent-type(i�uOK(i�uPath not foundu	Not found(uurlparseuurl2pathnameuosupathuisfileuurllib2uurlopenuendswithuisdirulistdiruopenujoinureaducloseuappendu	HTTPErroruStringIO(uurluschemeuserverupathuparamuqueryufragufilenameufilesufufpubodyustatusumessageuheaders((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu
local_opens*
!
!

u
local_open(^u__doc__usysuosureushutilusocketubase64uhashlibu	functoolsuwrapsu
pkg_resourcesu
CHECKOUT_DISTuDistributionuBINARY_DISTunormalize_pathuSOURCE_DISTurequireuEnvironmentufind_distributionsu	safe_nameusafe_versionuto_filenameuRequirementuDEVELOP_DISTu
setuptoolsussl_supportu	distutilsulogudistutils.errorsuDistutilsErrorusetuptools.compatuurllib2uhttplibuStringIOu	HTTPErroruurlparseu
urlunparseuunquoteu	splituseruurl2pathnameuname2codepointuunichruurljoinuurlsplitu
urlunsplituConfigParserufilterfalseufnmatchu	translateusetuptools.py26compatustrip_fragmentusetuptools.py27compatuget_all_headersucompileuEGG_FRAGMENTuIuHREFuPYPI_MD5umatchu
URL_SCHEMEusplitu
EXTENSIONSu__all__u_SOCKET_TIMEOUTuparse_bdist_wininstuegg_info_for_urluNoneudistros_for_urludistros_for_locationudistros_for_filenameuinterpret_distro_nameuunique_everseenu
unique_valuesuRELufind_external_linksuversionu
user_agentuobjectuContentCheckeruHashCheckeruPackageIndexusubu
entity_subuuchru
decode_entityu
htmldecodeusocket_timeoutu_encode_authu
Credentialu
PyPIConfiguurlopenuopen_with_authu
fix_sf_urlu
local_open(((u1/tmp/pip-k8wh6o-build/setuptools/package_index.pyu<module>spXd			"
'!��e
'+python3.3/site-packages/setuptools/__pycache__/script template.cpython-33.pyc000064400000000420151733566760023224 0ustar00�
�Re�c@s&dZddlZejdd�dS(u%(spec)riNu%(script_name)r(u__requires__u
pkg_resourcesu
run_script(((u3/tmp/pip-k8wh6o-build/setuptools/script template.pyu<module>spython3.3/site-packages/setuptools/__pycache__/sandbox.cpython-33.pyc000064400000037742151733566760021603 0ustar00�
�Re
'c@s�ddlZddlZddlZddlZddlZddlZddlZddlZejdkr�ddl	j
jjj
ZnejejZy
eZWnek
r�dZYnXeZddlmZddlmZddlmZmZdddd	gZd
d	�ZGdd�d�Zeed�rJejgZ ngZ y'dd
l!m"Z"e j#e"��["Wne$k
r�YnXGdd�de�Z%ej&ej'dd�dj(�D��Z)Gdd�de�Z*dS(iNujava(uDistutilsError(uworking_set(ubuiltinsuexecfileuAbstractSandboxuDirectorySandboxuSandboxViolationu	run_setupcstj�}tjdd�}tjdd�}tjjtjj���}tjj|d�}tjj|�s�tj	|�nt
j}tjj
��tj�}z�|t
_tj|�yv�gt|�tjdd�<tjjd|�tj�tjjdd��t|�j�fdd��Wn>tk
rztj�d}	|	jrv|	jdrv�nYnXWdtj|�tjj���fdd	�tjD�}
tttjj|
��tj|�|tjdd�<|tjdd�<|t
_XdS(
u8Run a distutils setup script, sandboxed in its directoryNutempicSs
|j�S(N(uactivate(udist((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu<lambda>0surun_setup.<locals>.<lambda>cstdi�d6dd6�S(Nusetup.pyu__file__u__main__u__name__(uexecfile((usetup_script(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu<lambda>2sics2g|](}|�kr|jd�r|�qS(u
encodings.(u
startswith(u.0umod_name(usave_modules(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu
<listcomp>As	urun_setup.<locals>.<listcomp>( uosugetcwdusysuargvupathuabspathudirnameujoinuisdirumakedirsutempfileutempdirumodulesucopyu
pkg_resourcesu__getstate__uchdirulistuinsertuworking_setu__init__u	callbacksuappenduDirectorySandboxurunu
SystemExituexc_infouargsu__setstate__uupdateumapu__delitem__(usetup_scriptuargsuold_diru	save_argvu	save_pathu	setup_dirutemp_dirusave_tmpupr_stateuvudel_modules((usave_modulesusetup_scriptu+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu	run_setups@		
 



cBs�|EeZdZdZd4Zdd�Zdd�Zdd�Zdd	�Z	x<d
ddgD]+Z
eee
�r\e	e
�e
�e
<q\q\Wd3d
d�Zer�ede�Znede�Zxlddddddddddddddddd d!d"gD]+Z
eee
�ree
�e
�e
<qqWd#d$�Zx9d%d&gD]+Z
eee
�rIee
�e
�e
<qIqIWd'd(�Zx9d)d*gD]+Z
eee
�r�ee
�e
�e
<q�q�Wd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3S(5uAbstractSandboxuDWrap 'os' module and 'open()' builtin for virtualizing setup scriptscs&�fdd�tt�D��_dS(Ncs5g|]+}|jd�rt�|�r|�qS(u_(u
startswithuhasattr(u.0uname(uself(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu
<listcomp>Ts	u,AbstractSandbox.__init__.<locals>.<listcomp>(udiru_osu_attrs(uself((uselfu+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu__init__RsuAbstractSandbox.__init__cCs1x*|jD]}tt|t||��q
WdS(N(u_attrsusetattruosugetattr(uselfusourceuname((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_copyXsuAbstractSandbox._copycCs{zB|j|�tr%|jt_n|jt_d|_|�SWdd|_tr`tt_ntt_|jt	�XdS(uRun 'func' under os sandboxingNTF(
u_copyu_fileubuiltinsufileu_openuopenuTrueu_activeuFalseu_os(uselfufunc((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyurun\s
			uAbstractSandbox.runcs(tt�����fdd�}|S(Ncs@|jr-|j�||||�\}}n�||||�S(N(u_activeu_remap_pair(uselfusrcudstuargsukw(unameuoriginal(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyuwrapns	$u3AbstractSandbox._mk_dual_path_wrapper.<locals>.wrap(ugetattru_os(unameuwrap((unameuoriginalu+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_mk_dual_path_wrapperlsu%AbstractSandbox._mk_dual_path_wrapperurenameulinkusymlinkcs.�ptt�����fdd�}|S(Ncs4|jr$|j�|||�}n�|||�S(N(u_activeu_remap_input(uselfupathuargsukw(unameuoriginal(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyuwrapys	u5AbstractSandbox._mk_single_path_wrapper.<locals>.wrap(ugetattru_os(unameuoriginaluwrap((unameuoriginalu+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_mk_single_path_wrapperwsu'AbstractSandbox._mk_single_path_wrapperufileuopenustatulistdiruchdiruchmoduchownumkdiruremoveuunlinkurmdiruutimeulchownuchrootulstatu	startfileumkfifoumknodupathconfuaccesscs(tt�����fdd�}|S(NcsM|jr=|j�|||�}|j��|||��S�|||�S(N(u_activeu_remap_inputu
_remap_output(uselfupathuargsukw(unameuoriginal(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyuwrap�s	u4AbstractSandbox._mk_single_with_return.<locals>.wrap(ugetattru_os(unameuwrap((unameuoriginalu+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_mk_single_with_return�su&AbstractSandbox._mk_single_with_returnureadlinkutempnamcs(tt�����fdd�}|S(Ncs,�||�}|jr(|j�|�S|S(N(u_activeu
_remap_output(uselfuargsukwuretval(unameuoriginal(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyuwrap�s	u'AbstractSandbox._mk_query.<locals>.wrap(ugetattru_os(unameuwrap((unameuoriginalu+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu	_mk_query�suAbstractSandbox._mk_queryugetcwdutmpnamcCs|S(u=Called to remap or validate any path, whether input or output((uselfupath((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_validate_path�suAbstractSandbox._validate_pathcOs
|j|�S(uCalled for path inputs(u_validate_path(uselfu	operationupathuargsukw((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_remap_input�suAbstractSandbox._remap_inputcCs
|j|�S(uCalled for path outputs(u_validate_path(uselfu	operationupath((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu
_remap_output�suAbstractSandbox._remap_outputcOs6|j|d|||�|j|d|||�fS(u?Called for path pairs like rename, link, and symlink operationsu-fromu-to(u_remap_input(uselfu	operationusrcudstuargsukw((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_remap_pair�suAbstractSandbox._remap_pairNF(u__name__u
__module__u__qualname__u__doc__uFalseu_activeu__init__u_copyurunu_mk_dual_path_wrapperunameuhasattru_osulocalsuNoneu_mk_single_path_wrapperu_fileu_openu_mk_single_with_returnu	_mk_queryu_validate_pathu_remap_inputu
_remap_outputu_remap_pair(u
__locals__((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyuAbstractSandboxMs>		udevnull(uGetGeneratePathcBs�|EeZdZdZejdddddddd	d
ddd
dg
�ZdgZedd�Z	dd�Z
er�ddd�Znddd�Zdd�Z
dd�Zdd�Zdd �Zd!d"�Zd#d$d%�Zd&S('uDirectorySandboxu<Restrict operations to a single subdirectory - pseudo-chrootuopenuchmoduchownumkdiruremoveuunlinkurmdiruutimeulchownuchrootumkfifoumknodutempnamu.*lib2to3.*\.pickle$cCsctjjtjj|��|_tjj|jd�|_dd�|D�|_tj	|�dS(NucSs.g|]$}tjjtjj|���qS((uosupathunormcaseurealpath(u.0upath((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu
<listcomp>�s	u-DirectorySandbox.__init__.<locals>.<listcomp>(
uosupathunormcaseurealpathu_sandboxujoinu_prefixu_exceptionsuAbstractSandboxu__init__(uselfusandboxu
exceptions((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu__init__�s
!	
uDirectorySandbox.__init__cOst|||��dS(N(uSandboxViolation(uselfu	operationuargsukw((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu
_violation�suDirectorySandbox._violationurcOsK|dkr8|j|�r8|jd||||�nt||||�S(NururturburUuUufile(ururturburUuU(u_oku
_violationu_file(uselfupathumodeuargsukw((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_file�suDirectorySandbox._filecOsK|dkr8|j|�r8|jd||||�nt||||�S(NururturburUuUuopen(ururturburUuU(u_oku
_violationu_open(uselfupathumodeuargsukw((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_open�suDirectorySandbox._opencCs|jd�dS(Nutmpnam(u
_violation(uself((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyutmpnam�suDirectorySandbox.tmpnamcCss|j}zYd|_tjjtjj|��}|j|�p`||jkp`|j|j	�SWd||_XdS(NF(
u_activeuFalseuosupathunormcaseurealpathu	_exemptedu_sandboxu
startswithu_prefix(uselfupathuactiveurealpath((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_ok�s		uDirectorySandbox._okcsT�fdd�|jD�}�fdd�|jD�}tj||�}t|�S(Nc3s|]}�j|�VqdS(N(u
startswith(u.0u	exception(ufilepath(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu	<genexpr>�su-DirectorySandbox._exempted.<locals>.<genexpr>c3s!|]}tj|��VqdS(N(ureumatch(u.0upattern(ufilepath(u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu	<genexpr>�s(u_exceptionsu_exception_patternsu	itertoolsuchainuany(uselfufilepathu
start_matchesupattern_matchesu
candidates((ufilepathu+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu	_exempted�s

uDirectorySandbox._exemptedcOsH||jkrD|j|�rD|j|tjj|�||�n|S(uCalled for path inputs(u	write_opsu_oku
_violationuosupathurealpath(uselfu	operationupathuargsukw((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_remap_inputs%uDirectorySandbox._remap_inputcOsF|j|�s |j|�r<|j|||||�n||fS(u?Called for path pairs like rename, link, and symlink operations(u_oku
_violation(uselfu	operationusrcudstuargsukw((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu_remap_pair	s uDirectorySandbox._remap_pairi�cOsR|t@r9|j|�r9|jd|||||�ntj|||||�S(uCalled for low-level os.open()uos.open(uWRITE_FLAGSu_oku
_violationu_osuopen(uselfufileuflagsumodeuargsukw((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyuopensuDirectorySandbox.openN(u__name__u
__module__u__qualname__u__doc__udictufromkeysu	write_opsu_exception_patternsu_EXCEPTIONSu__init__u
_violationu_fileu_openutmpnamu_oku	_exemptedu_remap_inputu_remap_pairuopen(u
__locals__((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyuDirectorySandbox�s 		
cCs"g|]}tt|d��qS(i(ugetattru_os(u.0ua((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu
<listcomp>s	u
<listcomp>u4O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARYcBs&|EeZdZdZdd�ZdS(uSandboxViolationuEA setup script attempted to modify the filesystem outside the sandboxcCsd|jS(Nu�SandboxViolation: %s%r %s

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.(uargs(uself((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu__str__s	uSandboxViolation.__str__N(u__name__u
__module__u__qualname__u__doc__u__str__(u
__locals__((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyuSandboxViolations(+uosusysutempfileuoperatoru	functoolsu	itertoolsureu
pkg_resourcesunameu$org.python.modules.posix.PosixModuleupythonumodulesuposixuPosixModuleu_osufileu_fileu	NameErroruNoneuopenu_openudistutils.errorsuDistutilsErroruworking_setusetuptools.compatubuiltinsuexecfileu__all__u	run_setupuAbstractSandboxuhasattrudevnullu_EXCEPTIONSuwin32com.client.gencacheuGetGeneratePathuappenduImportErroruDirectorySandboxureduceuor_usplituWRITE_FLAGSuSandboxViolation(((u+/tmp/pip-k8wh6o-build/setuptools/sandbox.pyu<module>sF

0h
Spython3.3/site-packages/setuptools/__pycache__/depends.cpython-33.pyc000064400000017024151733566760021556 0ustar00�
�ReMc@sddlmZddlZddlZddlZddlmZmZmZmZddl	m
Z
mZddddgZGd	d�d�Z
d
d�Zddd�Zdddd�Zddd�Zejjd�s�ejdkr[[ejd�ejd�ndS(i(u
generatorsN(u
PKG_DIRECTORYuPY_COMPILEDu	PY_SOURCEu	PY_FROZEN(u
StrictVersionuLooseVersionuRequireufind_moduleuget_module_constantuextract_constantcBsw|EeZdZdZddddd�Zdd�Zdd�Zdd	d
d�Zddd
�Z	ddd�Z
dS(uRequireu7A prerequisite to building or installing a distributionucCsn|dkr!|dk	r!t}n|dk	rQ||�}|dkrQd}qQn|jjt��|`dS(Nu__version__(uNoneu
StrictVersionu__dict__uupdateulocalsuself(uselfunameurequested_versionumoduleuhomepageu	attributeuformat((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyu__init__
s	uRequire.__init__cCs*|jdk	r#d|j|jfS|jS(u0Return full package/distribution name, w/versionu%s-%sN(urequested_versionuNoneuname(uself((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyu	full_namesuRequire.full_namecCs=|jdkp<|jdkp<t|�dko<||jkS(u%Is 'version' sufficiently up-to-date?uunknownN(u	attributeuNoneuformatustrurequested_version(uselfuversion((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyu
version_ok$suRequire.version_okuunknownc
Cs�|jdkray6t|j|�\}}}|r@|j�n|SWqatk
r]dSYqaXnt|j|j||�}|dk	r�||k	r�|jdk	r�|j|�S|S(u�Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        N(u	attributeuNoneufind_moduleumoduleucloseuImportErroruget_module_constantuformat(uselfupathsudefaultufupuiuv((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyuget_version*s

'
uRequire.get_versioncCs|j|�dk	S(u/Return true if dependency is present on 'paths'N(uget_versionuNone(uselfupaths((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyu
is_presentFsuRequire.is_presentcCs,|j|�}|dkrdS|j|�S(u>Return true if dependency is present and up-to-date on 'paths'NF(uget_versionuNoneuFalseu
version_ok(uselfupathsuversion((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyu
is_currentKsuRequire.is_currentN(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u	full_nameu
version_okuget_versionu
is_presentu
is_current(u
__locals__((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyuRequire
sc
cs�ddlm}ddlm}m}|d|j�}t|j�}d}d}x�||kr�||}||kr�||d||dd|}	|d7}||kr�|	td	�}qVq�nd
}	|d7}||	fVqVWd
S(u>Yield '(op,arg)' pair for each operation in code object 'code'i(uarray(u
HAVE_ARGUMENTuEXTENDED_ARGubiiiiiN(uarrayudisu
HAVE_ARGUMENTuEXTENDED_ARGuco_codeulenu	long_typeuNone(
ucodeuarrayu
HAVE_ARGUMENTuEXTENDED_ARGubytesueofuptruextended_arguopuarg((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyu
_iter_codeSs"
"
	
u
_iter_codec
Cs�|jd�}x�|r�|jd�}tj||�\}}\}}}}	|tkrv|pgdg}|g}q|rtd||f��qqW|	S(u7Just like 'imp.find_module()', but with package supportu.iu__init__uCan't find %r in %s(usplitupopuimpufind_moduleu
PKG_DIRECTORYuImportError(
umoduleupathsupartsupartufupathusuffixumodeukinduinfo((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyufind_module|s	(ic
Cs!y%t||�\}}\}}}Wntk
r=dSYnXz�|tkrl|jd�tj|�}	n�|tkr�tj	|�}	no|t
kr�t|j�|d�}	nH|tj
kr�tj||||||f�nttj
||d�SWd|r|j�nXt|	||�S(u�Find 'module' by searching 'paths', and extract 'symbol'

    Return 'None' if 'module' does not exist on 'paths', or it does not define
    'symbol'.  If the module defines 'symbol' as a constant, return the
    constant.  Otherwise, return 'default'.iuexecN(ufind_moduleuImportErroruNoneuPY_COMPILEDureadumarshaluloadu	PY_FROZENuimpuget_frozen_objectu	PY_SOURCEucompileusysumodulesuload_moduleugetattrucloseuextract_constant(
umoduleusymboludefaultupathsufupathusuffixumodeukinducode((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyuget_module_constant�s$%
	
"c
Cs�||jkrdSt|j�j|�}d}d}d}|}xdt|�D]V\}}	||krx|j|	}qP|	|kr�||ks�||kr�|S|}qPWdS(uExtract the constant value of 'symbol' from 'code'

    If the name 'symbol' is bound to a constant value by the Python code
    object 'code', return that value.  If 'symbol' is bound to an expression,
    return 'default'.  Otherwise, return 'None'.

    Return value is based on the first assignment to 'symbol'.  'symbol' must
    be a global, or at least a non-"fast" local in the code block.  That is,
    only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
    must be present in 'code.co_names'.
    iZiaidN(uco_namesuNoneulistuindexu
_iter_codeu	co_consts(
ucodeusymboludefaultuname_idxu
STORE_NAMEuSTORE_GLOBALu
LOAD_CONSTuconstuopuarg((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyuextract_constant�s
$ujavauclii����i����(u
__future__u
generatorsusysuimpumarshalu
PKG_DIRECTORYuPY_COMPILEDu	PY_SOURCEu	PY_FROZENudistutils.versionu
StrictVersionuLooseVersionu__all__uRequireu
_iter_codeuNoneufind_moduleuget_module_constantuextract_constantuplatformu
startswithuremove(((u+/tmp/pip-k8wh6o-build/setuptools/depends.pyu<module>s$"I)))"!
python3.3/site-packages/setuptools/__pycache__/extension.cpython-33.pyc000064400000005255151733566760022153 0ustar00�
�Re|c@s�ddlZddlZddlZddlmZeejj�Zdd�Z	Gdd�de�ZGdd�de�Z
eej_eej_d	ejkr�eejd	_ndS(
iN(u_get_unpatchedcCsNd}xA|D]9}yt|ddg�jdSWq
tk
rEYq
Xq
WdS(u9
    Return True if Cython or Pyrex can be imported.
    uCython.Distutils.build_extuPyrex.Distutils.build_extufromlistu	build_ext(uCython.Distutils.build_extuPyrex.Distutils.build_extTF(u
__import__u	build_extuTrueu	ExceptionuFalse(upyrex_implsu
pyrex_impl((u-/tmp/pip-k8wh6o-build/setuptools/extension.pyu
have_pyrex	s

	u
have_pyrexcBs2|EeZdZdZdd�Zdd�ZdS(u	Extensionu7Extension that uses '.c' files in place of '.pyx' filescOs-tj|||�t�s)|j�ndS(N(u
_Extensionu__init__u
have_pyrexu_convert_pyx_sources_to_c(uselfuargsukw((u-/tmp/pip-k8wh6o-build/setuptools/extension.pyu__init__s	uExtension.__init__cCs+dd�}tt||j��|_dS(uconvert .pyx extensions to .ccSs*|jd�r&|dd�d}n|S(Nu.pyxiu.ci����(uendswith(usource((u-/tmp/pip-k8wh6o-build/setuptools/extension.pyupyx_to_c"su5Extension._convert_pyx_sources_to_c.<locals>.pyx_to_cN(ulistumapusources(uselfupyx_to_c((u-/tmp/pip-k8wh6o-build/setuptools/extension.pyu_convert_pyx_sources_to_c su#Extension._convert_pyx_sources_to_cN(u__name__u
__module__u__qualname__u__doc__u__init__u_convert_pyx_sources_to_c(u
__locals__((u-/tmp/pip-k8wh6o-build/setuptools/extension.pyu	Extensionsu	ExtensioncBs|EeZdZdZdS(uLibraryu=Just like a regular Extension, but built as a library insteadN(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u-/tmp/pip-k8wh6o-build/setuptools/extension.pyuLibrary(suLibraryudistutils.command.build_ext(
usysudistutils.coreu	distutilsudistutils.extensionusetuptools.distu_get_unpatcheducoreu	Extensionu
_Extensionu
have_pyrexuLibraryu	extensionumodules(((u-/tmp/pip-k8wh6o-build/setuptools/extension.pyu<module>spython3.3/site-packages/setuptools/__pycache__/py26compat.cpython-33.pyc000064400000001707151733566760022141 0ustar00�
�Re�c@sPdZddlZddlmZdd�Zejd
krLdd	�ZndS(u2
Compatibility Support for Python 2.6 and earlier
iN(usplittagcCst|�\}}|S(u�
	In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
	later was patched to disregard the fragment when making URL requests.
	Do the same for Python 2.6 and earlier.
	(usplittag(uurlufragment((u./tmp/pip-k8wh6o-build/setuptools/py26compat.pyustrip_fragment	sustrip_fragmentiicCs|S(N((ux((u./tmp/pip-k8wh6o-build/setuptools/py26compat.pyu<lambda>su<lambda>(ii(u__doc__usysusetuptools.compatusplittagustrip_fragmentuversion_info(((u./tmp/pip-k8wh6o-build/setuptools/py26compat.pyu<module>s
	python3.3/site-packages/setuptools/__pycache__/script template (dev).cpython-33.pyc000064400000000765151733566760024120 0ustar00�
�Re7c@swdZddlZddlmZed�[dZejdkrQee�n"eee	e�j
�ed��dS(u%(spec)riN(urequireu%(dev_path)riuexec(ii(u__requires__usysu
pkg_resourcesurequireu__file__uversion_infouexecfileuexecucompileuopenuread(((u9/tmp/pip-k8wh6o-build/setuptools/script template (dev).pyu<module>s

python3.3/site-packages/setuptools/__pycache__/version.cpython-33.pyc000064400000000250151733566760021612 0ustar00�
�Rec@s
dZdS(u2.0N(u__version__(((u+/tmp/pip-k8wh6o-build/setuptools/version.pyu<module>spython3.3/site-packages/setuptools/ssl_support.py000064400000016757151733566760016264 0ustar00import os
import socket
import atexit
import re

import pkg_resources
from pkg_resources import ResolutionError, ExtractionError
from setuptools.compat import urllib2

try:
    import ssl
except ImportError:
    ssl = None

__all__ = [
    'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_available', 'cert_paths',
    'opener_for'
]

cert_paths = """
/etc/pki/tls/certs/ca-bundle.crt
/etc/ssl/certs/ca-certificates.crt
/usr/share/ssl/certs/ca-bundle.crt
/usr/local/share/certs/ca-root.crt
/etc/ssl/cert.pem
/System/Library/OpenSSL/certs/cert.pem
""".strip().split()


HTTPSHandler = HTTPSConnection = object

for what, where in (
    ('HTTPSHandler', ['urllib2','urllib.request']),
    ('HTTPSConnection', ['httplib', 'http.client']),
):
    for module in where:
        try:
            exec("from %s import %s" % (module, what))
        except ImportError:
            pass

is_available = ssl is not None and object not in (HTTPSHandler, HTTPSConnection)


try:
    from ssl import CertificateError, match_hostname
except ImportError:
    try:
        from backports.ssl_match_hostname import CertificateError
        from backports.ssl_match_hostname import match_hostname
    except ImportError:
        CertificateError = None
        match_hostname = None

if not CertificateError:
    class CertificateError(ValueError):
        pass

if not match_hostname:
    def _dnsname_match(dn, hostname, max_wildcards=1):
        """Matching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        """
        pats = []
        if not dn:
            return False

        # Ported from python3-syntax:
        # leftmost, *remainder = dn.split(r'.')
        parts = dn.split(r'.')
        leftmost = parts[0]
        remainder = parts[1:]

        wildcards = leftmost.count('*')
        if wildcards > max_wildcards:
            # Issue #17980: avoid denials of service by refusing more
            # than one wildcard per fragment.  A survey of established
            # policy among SSL implementations showed it to be a
            # reasonable choice.
            raise CertificateError(
                "too many wildcards in certificate DNS name: " + repr(dn))

        # speed up common case w/o wildcards
        if not wildcards:
            return dn.lower() == hostname.lower()

        # RFC 6125, section 6.4.3, subitem 1.
        # The client SHOULD NOT attempt to match a presented identifier in which
        # the wildcard character comprises a label other than the left-most label.
        if leftmost == '*':
            # When '*' is a fragment by itself, it matches a non-empty dotless
            # fragment.
            pats.append('[^.]+')
        elif leftmost.startswith('xn--') or hostname.startswith('xn--'):
            # RFC 6125, section 6.4.3, subitem 3.
            # The client SHOULD NOT attempt to match a presented identifier
            # where the wildcard character is embedded within an A-label or
            # U-label of an internationalized domain name.
            pats.append(re.escape(leftmost))
        else:
            # Otherwise, '*' matches any dotless string, e.g. www*
            pats.append(re.escape(leftmost).replace(r'\*', '[^.]*'))

        # add the remaining fragments, ignore any wildcards
        for frag in remainder:
            pats.append(re.escape(frag))

        pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)
        return pat.match(hostname)

    def match_hostname(cert, hostname):
        """Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
        rules are followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        """
        if not cert:
            raise ValueError("empty or no certificate")
        dnsnames = []
        san = cert.get('subjectAltName', ())
        for key, value in san:
            if key == 'DNS':
                if _dnsname_match(value, hostname):
                    return
                dnsnames.append(value)
        if not dnsnames:
            # The subject is only checked when there is no dNSName entry
            # in subjectAltName
            for sub in cert.get('subject', ()):
                for key, value in sub:
                    # XXX according to RFC 2818, the most specific Common Name
                    # must be used.
                    if key == 'commonName':
                        if _dnsname_match(value, hostname):
                            return
                        dnsnames.append(value)
        if len(dnsnames) > 1:
            raise CertificateError("hostname %r "
                "doesn't match either of %s"
                % (hostname, ', '.join(map(repr, dnsnames))))
        elif len(dnsnames) == 1:
            raise CertificateError("hostname %r "
                "doesn't match %r"
                % (hostname, dnsnames[0]))
        else:
            raise CertificateError("no appropriate commonName or "
                "subjectAltName fields were found")


class VerifyingHTTPSHandler(HTTPSHandler):
    """Simple verifying handler: no auth, subclasses, timeouts, etc."""

    def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)

    def https_open(self, req):
        return self.do_open(
            lambda host, **kw: VerifyingHTTPSConn(host, self.ca_bundle, **kw), req
        )


class VerifyingHTTPSConn(HTTPSConnection):
    """Simple verifying connection: no auth, subclasses, timeouts, etc."""
    def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle

    def connect(self):
        sock = socket.create_connection(
            (self.host, self.port), getattr(self, 'source_address', None)
        )

        # Handle the socket if a (proxy) tunnel is present
        if hasattr(self, '_tunnel') and getattr(self, '_tunnel_host', None):
            self.sock = sock
            self._tunnel()

        self.sock = ssl.wrap_socket(
            sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle
        )
        try:
            match_hostname(self.sock.getpeercert(), self.host)
        except CertificateError:
            self.sock.shutdown(socket.SHUT_RDWR)
            self.sock.close()
            raise

def opener_for(ca_bundle=None):
    """Get a urlopen() replacement that uses ca_bundle for verification"""
    return urllib2.build_opener(
        VerifyingHTTPSHandler(ca_bundle or find_ca_bundle())
    ).open


_wincerts = None

def get_win_certfile():
    global _wincerts
    if _wincerts is not None:
        return _wincerts.name

    try:
        from wincertstore import CertFile
    except ImportError:
        return None

    class MyCertFile(CertFile):
        def __init__(self, stores=(), certs=()):
            CertFile.__init__(self)
            for store in stores:
                self.addstore(store)
            self.addcerts(certs)
            atexit.register(self.close)

    _wincerts = MyCertFile(stores=['CA', 'ROOT'])
    return _wincerts.name


def find_ca_bundle():
    """Return an existing CA bundle path, or None"""
    if os.name=='nt':
        return get_win_certfile()
    else:
        for cert_path in cert_paths:
            if os.path.isfile(cert_path):
                return cert_path
    try:
        return pkg_resources.resource_filename('certifi', 'cacert.pem')
    except (ImportError, ResolutionError, ExtractionError):
        return None
python3.3/site-packages/setuptools/svn_utils.py000064400000042670151733566760015706 0ustar00import os
import re
import sys
from distutils import log
import xml.dom.pulldom
import shlex
import locale
import codecs
import unicodedata
import warnings
from setuptools.compat import unicode
from xml.sax.saxutils import unescape

try:
    import urlparse
except ImportError:
    import urllib.parse as urlparse

from subprocess import Popen as _Popen, PIPE as _PIPE

#NOTE: Use of the command line options require SVN 1.3 or newer (December 2005)
#      and SVN 1.3 hasn't been supported by the developers since mid 2008.

#subprocess is called several times with shell=(sys.platform=='win32')
#see the follow for more information:
#       http://bugs.python.org/issue8557
#       http://stackoverflow.com/questions/5658622/
#              python-subprocess-popen-environment-path


def _run_command(args, stdout=_PIPE, stderr=_PIPE, encoding=None, stream=0):
    #regarding the shell argument, see: http://bugs.python.org/issue8557
    try:
        proc = _Popen(args, stdout=stdout, stderr=stderr,
                      shell=(sys.platform == 'win32'))

        data = proc.communicate()[stream]
    except OSError:
        return 1, ''

    #doubled checked and
    data = decode_as_string(data, encoding)

    #communciate calls wait()
    return proc.returncode, data


def _get_entry_schedule(entry):
    schedule = entry.getElementsByTagName('schedule')[0]
    return "".join([t.nodeValue
                    for t in schedule.childNodes
                    if t.nodeType == t.TEXT_NODE])


def _get_target_property(target):
    property_text = target.getElementsByTagName('property')[0]
    return "".join([t.nodeValue
                    for t in property_text.childNodes
                    if t.nodeType == t.TEXT_NODE])


def _get_xml_data(decoded_str):
    if sys.version_info < (3, 0):
        #old versions want an encoded string
        data = decoded_str.encode('utf-8')
    else:
        data = decoded_str
    return data


def joinpath(prefix, *suffix):
    if not prefix or prefix == '.':
        return os.path.join(*suffix)
    return os.path.join(prefix, *suffix)

def determine_console_encoding():
    try:
        #try for the preferred encoding
        encoding = locale.getpreferredencoding()

        #see if the locale.getdefaultlocale returns null
        #some versions of python\platforms return US-ASCII
        #when it cannot determine an encoding
        if not encoding or encoding == "US-ASCII":
            encoding = locale.getdefaultlocale()[1]

        if encoding:
            codecs.lookup(encoding)  # make sure a lookup error is not made

    except (locale.Error, LookupError):
        encoding = None

    is_osx = sys.platform == "darwin"
    if not encoding:
        return ["US-ASCII", "utf-8"][is_osx]
    elif encoding.startswith("mac-") and is_osx:
        #certain versions of python would return mac-roman as default
        #OSX as a left over of earlier mac versions.
        return "utf-8"
    else:
        return encoding

_console_encoding = determine_console_encoding()

def decode_as_string(text, encoding=None):
    """
    Decode the console or file output explicitly using getpreferredencoding.
    The text paraemeter should be a encoded string, if not no decode occurs
    If no encoding is given, getpreferredencoding is used.  If encoding is
    specified, that is used instead.  This would be needed for SVN --xml
    output.  Unicode is explicitly put in composed NFC form.

    --xml should be UTF-8 (SVN Issue 2938) the discussion on the Subversion
    DEV List from 2007 seems to indicate the same.
    """
    #text should be a byte string

    if encoding is None:
        encoding = _console_encoding

    if not isinstance(text, unicode):
        text = text.decode(encoding)

    text = unicodedata.normalize('NFC', text)

    return text


def parse_dir_entries(decoded_str):
    '''Parse the entries from a recursive info xml'''
    doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str))
    entries = list()

    for event, node in doc:
        if event == 'START_ELEMENT' and node.nodeName == 'entry':
            doc.expandNode(node)
            if not _get_entry_schedule(node).startswith('delete'):
                entries.append((node.getAttribute('path'),
                                node.getAttribute('kind')))

    return entries[1:]  # do not want the root directory


def parse_externals_xml(decoded_str, prefix=''):
    '''Parse a propget svn:externals xml'''
    prefix = os.path.normpath(prefix)
    prefix = os.path.normcase(prefix)

    doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str))
    externals = list()

    for event, node in doc:
        if event == 'START_ELEMENT' and node.nodeName == 'target':
            doc.expandNode(node)
            path = os.path.normpath(node.getAttribute('path'))

            if os.path.normcase(path).startswith(prefix):
                path = path[len(prefix)+1:]

            data = _get_target_property(node)
            #data should be decoded already
            for external in parse_external_prop(data):
                externals.append(joinpath(path, external))

    return externals  # do not want the root directory


def parse_external_prop(lines):
    """
    Parse the value of a retrieved svn:externals entry.

    possible token setups (with quotng and backscaping in laters versions)
        URL[@#] EXT_FOLDERNAME
        [-r#] URL EXT_FOLDERNAME
        EXT_FOLDERNAME [-r#] URL
    """
    externals = []
    for line in lines.splitlines():
        line = line.lstrip()  # there might be a "\ "
        if not line:
            continue

        if sys.version_info < (3, 0):
            #shlex handles NULLs just fine and shlex in 2.7 tries to encode
            #as ascii automatiically
            line = line.encode('utf-8')
        line = shlex.split(line)
        if sys.version_info < (3, 0):
            line = [x.decode('utf-8') for x in line]

        #EXT_FOLDERNAME is either the first or last depending on where
        #the URL falls
        if urlparse.urlsplit(line[-1])[0]:
            external = line[0]
        else:
            external = line[-1]

        external = decode_as_string(external, encoding="utf-8")
        externals.append(os.path.normpath(external))

    return externals


def parse_prop_file(filename, key):
    found = False
    f = open(filename, 'rt')
    data = ''
    try:
        for line in iter(f.readline, ''):    # can't use direct iter!
            parts = line.split()
            if len(parts) == 2:
                kind, length = parts
                data = f.read(int(length))
                if kind == 'K' and data == key:
                    found = True
                elif kind == 'V' and found:
                    break
    finally:
        f.close()

    return data


class SvnInfo(object):
    '''
    Generic svn_info object.  No has little knowledge of how to extract
    information.  Use cls.load to instatiate according svn version.

    Paths are not filesystem encoded.
    '''

    @staticmethod
    def get_svn_version():
        code, data = _run_command(['svn', '--version', '--quiet'])
        if code == 0 and data:
            return data.strip()
        else:
            return ''

    #svnversion return values (previous implementations return max revision)
    #   4123:4168     mixed revision working copy
    #   4168M         modified working copy
    #   4123S         switched working copy
    #   4123:4168MS   mixed revision, modified, switched working copy
    revision_re = re.compile(r'(?:([\-0-9]+):)?(\d+)([a-z]*)\s*$', re.I)

    @classmethod
    def load(cls, dirname=''):
        normdir = os.path.normpath(dirname)
        code, data = _run_command(['svn', 'info', normdir])
        # Must check for some contents, as some use empty directories
        # in testcases
        svn_dir = os.path.join(normdir, '.svn')
        has_svn = (os.path.isfile(os.path.join(svn_dir, 'entries')) or
                   os.path.isfile(os.path.join(svn_dir, 'dir-props')) or
                   os.path.isfile(os.path.join(svn_dir, 'dir-prop-base')))

        svn_version = tuple(cls.get_svn_version().split('.'))

        try:
            base_svn_version = tuple(int(x) for x in svn_version[:2])
        except ValueError:
            base_svn_version = tuple()

        if not has_svn:
            return SvnInfo(dirname)

        if code or not base_svn_version or base_svn_version < (1, 3):
            warnings.warn(("No SVN 1.3+ command found: falling back "
                           "on pre 1.7 .svn parsing"), DeprecationWarning)
            return SvnFileInfo(dirname)

        if base_svn_version < (1, 5):
            return Svn13Info(dirname)

        return Svn15Info(dirname)

    def __init__(self, path=''):
        self.path = path
        self._entries = None
        self._externals = None

    def get_revision(self):
        'Retrieve the directory revision informatino using svnversion'
        code, data = _run_command(['svnversion', '-c', self.path])
        if code:
            log.warn("svnversion failed")
            return 0

        parsed = self.revision_re.match(data)
        if parsed:
            return int(parsed.group(2))
        else:
            return 0

    @property
    def entries(self):
        if self._entries is None:
            self._entries = self.get_entries()
        return self._entries

    @property
    def externals(self):
        if self._externals is None:
            self._externals = self.get_externals()
        return self._externals

    def iter_externals(self):
        '''
        Iterate over the svn:external references in the repository path.
        '''
        for item in self.externals:
            yield item

    def iter_files(self):
        '''
        Iterate over the non-deleted file entries in the repository path
        '''
        for item, kind in self.entries:
            if kind.lower() == 'file':
                yield item

    def iter_dirs(self, include_root=True):
        '''
        Iterate over the non-deleted file entries in the repository path
        '''
        if include_root:
            yield self.path
        for item, kind in self.entries:
            if kind.lower() == 'dir':
                yield item

    def get_entries(self):
        return []

    def get_externals(self):
        return []


class Svn13Info(SvnInfo):
    def get_entries(self):
        code, data = _run_command(['svn', 'info', '-R', '--xml', self.path],
                                  encoding="utf-8")

        if code:
            log.debug("svn info failed")
            return []

        return parse_dir_entries(data)

    def get_externals(self):
        #Previous to 1.5 --xml was not supported for svn propget and the -R
        #output format breaks the shlex compatible semantics.
        cmd = ['svn', 'propget', 'svn:externals']
        result = []
        for folder in self.iter_dirs():
            code, lines = _run_command(cmd + [folder], encoding="utf-8")
            if code != 0:
                log.warn("svn propget failed")
                return []
            #lines should a str
            for external in parse_external_prop(lines):
                if folder:
                    external = os.path.join(folder, external)
                result.append(os.path.normpath(external))

        return result


class Svn15Info(Svn13Info):
    def get_externals(self):
        cmd = ['svn', 'propget', 'svn:externals', self.path, '-R', '--xml']
        code, lines = _run_command(cmd, encoding="utf-8")
        if code:
            log.debug("svn propget failed")
            return []
        return parse_externals_xml(lines, prefix=os.path.abspath(self.path))


class SvnFileInfo(SvnInfo):

    def __init__(self, path=''):
        super(SvnFileInfo, self).__init__(path)
        self._directories = None
        self._revision = None

    def _walk_svn(self, base):
        entry_file = joinpath(base, '.svn', 'entries')
        if os.path.isfile(entry_file):
            entries = SVNEntriesFile.load(base)
            yield (base, False, entries.parse_revision())
            for path in entries.get_undeleted_records():
                path = decode_as_string(path)
                path = joinpath(base, path)
                if os.path.isfile(path):
                    yield (path, True, None)
                elif os.path.isdir(path):
                    for item in self._walk_svn(path):
                        yield item

    def _build_entries(self):
        entries = list()

        rev = 0
        for path, isfile, dir_rev in self._walk_svn(self.path):
            if isfile:
                entries.append((path, 'file'))
            else:
                entries.append((path, 'dir'))
                rev = max(rev, dir_rev)

        self._entries = entries
        self._revision = rev

    def get_entries(self):
        if self._entries is None:
            self._build_entries()
        return self._entries

    def get_revision(self):
        if self._revision is None:
            self._build_entries()
        return self._revision

    def get_externals(self):
        prop_files = [['.svn', 'dir-prop-base'],
                      ['.svn', 'dir-props']]
        externals = []

        for dirname in self.iter_dirs():
            prop_file = None
            for rel_parts in prop_files:
                filename = joinpath(dirname, *rel_parts)
                if os.path.isfile(filename):
                    prop_file = filename

            if prop_file is not None:
                ext_prop = parse_prop_file(prop_file, 'svn:externals')
                #ext_prop should be utf-8 coming from svn:externals
                ext_prop = decode_as_string(ext_prop, encoding="utf-8")
                externals.extend(parse_external_prop(ext_prop))

        return externals


def svn_finder(dirname=''):
    #combined externals due to common interface
    #combined externals and entries due to lack of dir_props in 1.7
    info = SvnInfo.load(dirname)
    for path in info.iter_files():
        yield path

    for path in info.iter_externals():
        sub_info = SvnInfo.load(path)
        for sub_path in sub_info.iter_files():
            yield sub_path


class SVNEntriesFile(object):
    def __init__(self, data):
        self.data = data

    @classmethod
    def load(class_, base):
        filename = os.path.join(base, '.svn', 'entries')
        f = open(filename)
        try:
            result = SVNEntriesFile.read(f)
        finally:
            f.close()
        return result

    @classmethod
    def read(class_, fileobj):
        data = fileobj.read()
        is_xml = data.startswith('<?xml')
        class_ = [SVNEntriesFileText, SVNEntriesFileXML][is_xml]
        return class_(data)

    def parse_revision(self):
        all_revs = self.parse_revision_numbers() + [0]
        return max(all_revs)


class SVNEntriesFileText(SVNEntriesFile):
    known_svn_versions = {
        '1.4.x': 8,
        '1.5.x': 9,
        '1.6.x': 10,
    }

    def __get_cached_sections(self):
        return self.sections

    def get_sections(self):
        SECTION_DIVIDER = '\f\n'
        sections = self.data.split(SECTION_DIVIDER)
        sections = [x for x in map(str.splitlines, sections)]
        try:
            # remove the SVN version number from the first line
            svn_version = int(sections[0].pop(0))
            if not svn_version in self.known_svn_versions.values():
                log.warn("Unknown subversion verson %d", svn_version)
        except ValueError:
            return
        self.sections = sections
        self.get_sections = self.__get_cached_sections
        return self.sections

    def is_valid(self):
        return bool(self.get_sections())

    def get_url(self):
        return self.get_sections()[0][4]

    def parse_revision_numbers(self):
        revision_line_number = 9
        rev_numbers = [
            int(section[revision_line_number])
            for section in self.get_sections()
            if (len(section) > revision_line_number
                and section[revision_line_number])
        ]
        return rev_numbers

    def get_undeleted_records(self):
        undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete')
        result = [
            section[0]
            for section in self.get_sections()
            if undeleted(section)
        ]
        return result


class SVNEntriesFileXML(SVNEntriesFile):
    def is_valid(self):
        return True

    def get_url(self):
        "Get repository URL"
        urlre = re.compile('url="([^"]+)"')
        return urlre.search(self.data).group(1)

    def parse_revision_numbers(self):
        revre = re.compile(r'committed-rev="(\d+)"')
        return [
            int(m.group(1))
            for m in revre.finditer(self.data)
        ]

    def get_undeleted_records(self):
        entries_pattern = \
            re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', re.I)
        results = [
            unescape(match.group(1))
            for match in entries_pattern.finditer(self.data)
        ]
        return results


if __name__ == '__main__':
    for name in svn_finder(sys.argv[1]):
        print(name)
python3.3/site-packages/setuptools/archive_util.py000064400000014711151733566760016331 0ustar00"""Utilities for extracting common archive formats"""


__all__ = [
    "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter",
    "UnrecognizedFormat", "extraction_drivers", "unpack_directory",
]

import zipfile, tarfile, os, shutil, posixpath
from pkg_resources import ensure_directory
from distutils.errors import DistutilsError

class UnrecognizedFormat(DistutilsError):
    """Couldn't recognize the archive type"""

def default_filter(src,dst):
    """The default progress/filter callback; returns True for all files"""   
    return dst























def unpack_archive(filename, extract_dir, progress_filter=default_filter,
    drivers=None
):
    """Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

    `progress_filter` is a function taking two arguments: a source path
    internal to the archive ('/'-separated), and a filesystem path where it
    will be extracted.  The callback must return the desired extract path
    (which may be the same as the one passed in), or else ``None`` to skip
    that file or directory.  The callback can thus be used to report on the
    progress of the extraction, as well as to filter the items extracted or
    alter their extraction paths.

    `drivers`, if supplied, must be a non-empty sequence of functions with the
    same signature as this function (minus the `drivers` argument), that raise
    ``UnrecognizedFormat`` if they do not support extracting the designated
    archive type.  The `drivers` are tried in sequence until one is found that
    does not raise an error, or until all are exhausted (in which case
    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
    drivers, the module's ``extraction_drivers`` constant will be used, which
    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
    order.
    """
    for driver in drivers or extraction_drivers:
        try:
            driver(filename, extract_dir, progress_filter)
        except UnrecognizedFormat:
            continue
        else:
            return
    else:
        raise UnrecognizedFormat(
            "Not a recognized archive type: %s" % filename
        )







def unpack_directory(filename, extract_dir, progress_filter=default_filter):
    """"Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    """
    if not os.path.isdir(filename):
        raise UnrecognizedFormat("%s is not a directory" % (filename,))

    paths = {filename:('',extract_dir)}
    for base, dirs, files in os.walk(filename):
        src,dst = paths[base]
        for d in dirs:
            paths[os.path.join(base,d)] = src+d+'/', os.path.join(dst,d)
        for f in files:
            name = src+f
            target = os.path.join(dst,f)
            target = progress_filter(src+f, target)
            if not target:
                continue    # skip non-files
            ensure_directory(target)
            f = os.path.join(base,f)
            shutil.copyfile(f, target)
            shutil.copystat(f, target)


















def unpack_zipfile(filename, extract_dir, progress_filter=default_filter):
    """Unpack zip `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    """

    if not zipfile.is_zipfile(filename):
        raise UnrecognizedFormat("%s is not a zip file" % (filename,))

    z = zipfile.ZipFile(filename)
    try:
        for info in z.infolist():
            name = info.filename

            # don't extract absolute paths or ones with .. in them
            if name.startswith('/') or '..' in name.split('/'):
                continue

            target = os.path.join(extract_dir, *name.split('/'))
            target = progress_filter(name, target)
            if not target:
                continue
            if name.endswith('/'):
                # directory
                ensure_directory(target)
            else:
                # file
                ensure_directory(target)
                data = z.read(info.filename)
                f = open(target,'wb')
                try:
                    f.write(data)
                finally:
                    f.close()
                    del data
            unix_attributes = info.external_attr >> 16
            if unix_attributes:
                os.chmod(target, unix_attributes)
    finally:
        z.close()


def unpack_tarfile(filename, extract_dir, progress_filter=default_filter):
    """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    """
    try:
        tarobj = tarfile.open(filename)
    except tarfile.TarError:
        raise UnrecognizedFormat(
            "%s is not a compressed or uncompressed tar file" % (filename,)
        )
    try:
        tarobj.chown = lambda *args: None   # don't do any chowning!
        for member in tarobj:
            name = member.name
            # don't extract absolute paths or ones with .. in them
            if not name.startswith('/') and '..' not in name.split('/'):
                prelim_dst = os.path.join(extract_dir, *name.split('/'))

                # resolve any links and to extract the link targets as normal files
                while member is not None and (member.islnk() or member.issym()):
                    linkpath = member.linkname
                    if member.issym():
                        linkpath = posixpath.join(posixpath.dirname(member.name), linkpath)
                        linkpath = posixpath.normpath(linkpath)
                    member = tarobj._getmember(linkpath)

                if member is not None and (member.isfile() or member.isdir()):
                    final_dst = progress_filter(name, prelim_dst)
                    if final_dst:
                        if final_dst.endswith(os.sep):
                            final_dst = final_dst[:-1]
                        try:
                            tarobj._extract_member(member, final_dst)  # XXX Ugh
                        except tarfile.ExtractError:
                            pass    # chown/chmod/mkfifo/mknode/makedev failed
        return True
    finally:
        tarobj.close()

extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile
python3.3/site-packages/setuptools/sandbox.py000064400000023412151733566760015307 0ustar00import os
import sys
import tempfile
import operator
import functools
import itertools
import re

import pkg_resources

if os.name == "java":
    import org.python.modules.posix.PosixModule as _os
else:
    _os = sys.modules[os.name]
try:
    _file = file
except NameError:
    _file = None
_open = open
from distutils.errors import DistutilsError
from pkg_resources import working_set

from setuptools.compat import builtins, execfile

__all__ = [
    "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup",
]

def run_setup(setup_script, args):
    """Run a distutils setup script, sandboxed in its directory"""
    old_dir = os.getcwd()
    save_argv = sys.argv[:]
    save_path = sys.path[:]
    setup_dir = os.path.abspath(os.path.dirname(setup_script))
    temp_dir = os.path.join(setup_dir,'temp')
    if not os.path.isdir(temp_dir): os.makedirs(temp_dir)
    save_tmp = tempfile.tempdir
    save_modules = sys.modules.copy()
    pr_state = pkg_resources.__getstate__()
    try:
        tempfile.tempdir = temp_dir
        os.chdir(setup_dir)
        try:
            sys.argv[:] = [setup_script]+list(args)
            sys.path.insert(0, setup_dir)
            # reset to include setup dir, w/clean callback list
            working_set.__init__()
            working_set.callbacks.append(lambda dist:dist.activate())
            DirectorySandbox(setup_dir).run(
                lambda: execfile(
                    "setup.py",
                    {'__file__':setup_script, '__name__':'__main__'}
                )
            )
        except SystemExit:
            v = sys.exc_info()[1]
            if v.args and v.args[0]:
                raise
            # Normal exit, just return
    finally:
        pkg_resources.__setstate__(pr_state)
        sys.modules.update(save_modules)
        # remove any modules imported within the sandbox
        del_modules = [
            mod_name for mod_name in sys.modules
            if mod_name not in save_modules
            # exclude any encodings modules. See #285
            and not mod_name.startswith('encodings.')
        ]
        list(map(sys.modules.__delitem__, del_modules))
        os.chdir(old_dir)
        sys.path[:] = save_path
        sys.argv[:] = save_argv
        tempfile.tempdir = save_tmp


class AbstractSandbox:
    """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts"""

    _active = False

    def __init__(self):
        self._attrs = [
            name for name in dir(_os)
                if not name.startswith('_') and hasattr(self,name)
        ]

    def _copy(self, source):
        for name in self._attrs:
            setattr(os, name, getattr(source,name))

    def run(self, func):
        """Run 'func' under os sandboxing"""
        try:
            self._copy(self)
            if _file:
                builtins.file = self._file
            builtins.open = self._open
            self._active = True
            return func()
        finally:
            self._active = False
            if _file:
                builtins.file = _file
            builtins.open = _open
            self._copy(_os)

    def _mk_dual_path_wrapper(name):
        original = getattr(_os,name)
        def wrap(self,src,dst,*args,**kw):
            if self._active:
                src,dst = self._remap_pair(name,src,dst,*args,**kw)
            return original(src,dst,*args,**kw)
        return wrap

    for name in ["rename", "link", "symlink"]:
        if hasattr(_os,name): locals()[name] = _mk_dual_path_wrapper(name)

    def _mk_single_path_wrapper(name, original=None):
        original = original or getattr(_os,name)
        def wrap(self,path,*args,**kw):
            if self._active:
                path = self._remap_input(name,path,*args,**kw)
            return original(path,*args,**kw)
        return wrap

    if _file:
        _file = _mk_single_path_wrapper('file', _file)
    _open = _mk_single_path_wrapper('open', _open)
    for name in [
        "stat", "listdir", "chdir", "open", "chmod", "chown", "mkdir",
        "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "lstat",
        "startfile", "mkfifo", "mknod", "pathconf", "access"
    ]:
        if hasattr(_os,name): locals()[name] = _mk_single_path_wrapper(name)

    def _mk_single_with_return(name):
        original = getattr(_os,name)
        def wrap(self,path,*args,**kw):
            if self._active:
                path = self._remap_input(name,path,*args,**kw)
                return self._remap_output(name, original(path,*args,**kw))
            return original(path,*args,**kw)
        return wrap

    for name in ['readlink', 'tempnam']:
        if hasattr(_os,name): locals()[name] = _mk_single_with_return(name)

    def _mk_query(name):
        original = getattr(_os,name)
        def wrap(self,*args,**kw):
            retval = original(*args,**kw)
            if self._active:
                return self._remap_output(name, retval)
            return retval
        return wrap

    for name in ['getcwd', 'tmpnam']:
        if hasattr(_os,name): locals()[name] = _mk_query(name)

    def _validate_path(self,path):
        """Called to remap or validate any path, whether input or output"""
        return path

    def _remap_input(self,operation,path,*args,**kw):
        """Called for path inputs"""
        return self._validate_path(path)

    def _remap_output(self,operation,path):
        """Called for path outputs"""
        return self._validate_path(path)

    def _remap_pair(self,operation,src,dst,*args,**kw):
        """Called for path pairs like rename, link, and symlink operations"""
        return (
            self._remap_input(operation+'-from',src,*args,**kw),
            self._remap_input(operation+'-to',dst,*args,**kw)
        )


if hasattr(os, 'devnull'):
    _EXCEPTIONS = [os.devnull,]
else:
    _EXCEPTIONS = []

try:
    from win32com.client.gencache import GetGeneratePath
    _EXCEPTIONS.append(GetGeneratePath())
    del GetGeneratePath
except ImportError:
    # it appears pywin32 is not installed, so no need to exclude.
    pass

class DirectorySandbox(AbstractSandbox):
    """Restrict operations to a single subdirectory - pseudo-chroot"""

    write_ops = dict.fromkeys([
        "open", "chmod", "chown", "mkdir", "remove", "unlink", "rmdir",
        "utime", "lchown", "chroot", "mkfifo", "mknod", "tempnam",
    ])

    _exception_patterns = [
        # Allow lib2to3 to attempt to save a pickled grammar object (#121)
        '.*lib2to3.*\.pickle$',
    ]
    "exempt writing to paths that match the pattern"

    def __init__(self, sandbox, exceptions=_EXCEPTIONS):
        self._sandbox = os.path.normcase(os.path.realpath(sandbox))
        self._prefix = os.path.join(self._sandbox,'')
        self._exceptions = [
            os.path.normcase(os.path.realpath(path))
            for path in exceptions
        ]
        AbstractSandbox.__init__(self)

    def _violation(self, operation, *args, **kw):
        raise SandboxViolation(operation, args, kw)

    if _file:
        def _file(self, path, mode='r', *args, **kw):
            if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
                self._violation("file", path, mode, *args, **kw)
            return _file(path,mode,*args,**kw)

    def _open(self, path, mode='r', *args, **kw):
        if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
            self._violation("open", path, mode, *args, **kw)
        return _open(path,mode,*args,**kw)

    def tmpnam(self):
        self._violation("tmpnam")

    def _ok(self, path):
        active = self._active
        try:
            self._active = False
            realpath = os.path.normcase(os.path.realpath(path))
            return (
                self._exempted(realpath)
                or realpath == self._sandbox
                or realpath.startswith(self._prefix)
            )
        finally:
            self._active = active

    def _exempted(self, filepath):
        start_matches = (
            filepath.startswith(exception)
            for exception in self._exceptions
        )
        pattern_matches = (
            re.match(pattern, filepath)
            for pattern in self._exception_patterns
        )
        candidates = itertools.chain(start_matches, pattern_matches)
        return any(candidates)

    def _remap_input(self, operation, path, *args, **kw):
        """Called for path inputs"""
        if operation in self.write_ops and not self._ok(path):
            self._violation(operation, os.path.realpath(path), *args, **kw)
        return path

    def _remap_pair(self, operation, src, dst, *args, **kw):
        """Called for path pairs like rename, link, and symlink operations"""
        if not self._ok(src) or not self._ok(dst):
            self._violation(operation, src, dst, *args, **kw)
        return (src,dst)

    def open(self, file, flags, mode=0x1FF, *args, **kw):    # 0777
        """Called for low-level os.open()"""
        if flags & WRITE_FLAGS and not self._ok(file):
            self._violation("os.open", file, flags, mode, *args, **kw)
        return _os.open(file,flags,mode, *args, **kw)

WRITE_FLAGS = functools.reduce(
    operator.or_, [getattr(_os, a, 0) for a in
        "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()]
)

class SandboxViolation(DistutilsError):
    """A setup script attempted to modify the filesystem outside the sandbox"""

    def __str__(self):
        return """SandboxViolation: %s%r %s

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.""" % self.args



























#
python3.3/site-packages/setuptools/script template.py000064400000000243151733566760016746 0ustar00# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r
__requires__ = """%(spec)r"""
import pkg_resources
pkg_resources.run_script("""%(spec)r""", """%(script_name)r""")
python3.3/site-packages/setuptools/__init__.py000064400000006365151733566760015420 0ustar00"""Extensions to the 'distutils' for large or complex distributions"""

import os
import sys
import distutils.core
import distutils.filelist
from distutils.core import Command as _Command
from distutils.util import convert_path

import setuptools.version
from setuptools.extension import Extension
from setuptools.dist import Distribution, Feature, _get_unpatched
from setuptools.depends import Require

__all__ = [
    'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require',
    'find_packages'
]

__version__ = setuptools.version.__version__

bootstrap_install_from = None

# If we run 2to3 on .py files, should we also convert docstrings?
# Default: yes; assume that we can detect doctests reliably
run_2to3_on_doctests = True
# Standard package names for fixer packages
lib2to3_fixer_packages = ['lib2to3.fixes']

def find_packages(where='.', exclude=()):
    """Return a list all Python packages found within directory 'where'

    'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it
    will be converted to the appropriate local path syntax.  'exclude' is a
    sequence of package names to exclude; '*' can be used as a wildcard in the
    names, such that 'foo.*' will exclude all subpackages of 'foo' (but not
    'foo' itself).
    """
    out = []
    stack=[(convert_path(where), '')]
    while stack:
        where,prefix = stack.pop(0)
        for name in os.listdir(where):
            fn = os.path.join(where,name)
            looks_like_package = (
                '.' not in name
                and os.path.isdir(fn)
                and os.path.isfile(os.path.join(fn, '__init__.py'))
            )
            if looks_like_package:
                out.append(prefix+name)
                stack.append((fn, prefix+name+'.'))
    for pat in list(exclude)+['ez_setup']:
        from fnmatch import fnmatchcase
        out = [item for item in out if not fnmatchcase(item,pat)]
    return out

setup = distutils.core.setup

_Command = _get_unpatched(_Command)

class Command(_Command):
    __doc__ = _Command.__doc__

    command_consumes_arguments = False

    def __init__(self, dist, **kw):
        # Add support for keyword arguments
        _Command.__init__(self,dist)
        for k,v in kw.items():
            setattr(self,k,v)

    def reinitialize_command(self, command, reinit_subcommands=0, **kw):
        cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
        for k,v in kw.items():
            setattr(cmd,k,v)    # update command with keywords
        return cmd

distutils.core.Command = Command    # we can't patch distutils.cmd, alas

def findall(dir = os.curdir):
    """Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    """
    all_files = []
    for base, dirs, files in os.walk(dir):
        if base==os.curdir or base.startswith(os.curdir+os.sep):
            base = base[2:]
        if base:
            files = [os.path.join(base, f) for f in files]
        all_files.extend(filter(os.path.isfile, files))
    return all_files

distutils.filelist.findall = findall    # fix findall bug in distutils.

# sys.dont_write_bytecode was introduced in Python 2.6.
_dont_write_bytecode = getattr(sys, 'dont_write_bytecode',
    bool(os.environ.get("PYTHONDONTWRITEBYTECODE")))
python3.3/site-packages/setuptools/site-patch.py000064400000004562151733566760015717 0ustar00def __boot():
    import sys, os, os.path
    PYTHONPATH = os.environ.get('PYTHONPATH')
    if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
        PYTHONPATH = []
    else:
        PYTHONPATH = PYTHONPATH.split(os.pathsep)

    pic = getattr(sys,'path_importer_cache',{})
    stdpath = sys.path[len(PYTHONPATH):]
    mydir = os.path.dirname(__file__)
    #print "searching",stdpath,sys.path

    for item in stdpath:
        if item==mydir or not item:
            continue    # skip if current dir. on Windows, or my own directory
        importer = pic.get(item)
        if importer is not None:
            loader = importer.find_module('site')
            if loader is not None:
                # This should actually reload the current module
                loader.load_module('site')
                break
        else:
            try:
                import imp # Avoid import loop in Python >= 3.3
                stream, path, descr = imp.find_module('site',[item])
            except ImportError:
                continue
            if stream is None:
                continue
            try:
                # This should actually reload the current module
                imp.load_module('site',stream,path,descr)
            finally:
                stream.close()
            break
    else:
        raise ImportError("Couldn't find the real 'site' module")

    #print "loaded", __file__

    known_paths = dict([(makepath(item)[1],1) for item in sys.path]) # 2.2 comp

    oldpos = getattr(sys,'__egginsert',0)   # save old insertion position
    sys.__egginsert = 0                     # and reset the current one

    for item in PYTHONPATH:
        addsitedir(item)

    sys.__egginsert += oldpos           # restore effective old position
    
    d,nd = makepath(stdpath[0])
    insert_at = None
    new_path = []

    for item in sys.path:
        p,np = makepath(item)

        if np==nd and insert_at is None:
            # We've hit the first 'system' path entry, so added entries go here
            insert_at = len(new_path)

        if np in known_paths or insert_at is None:
            new_path.append(item)
        else:
            # new path after the insert point, back-insert it
            new_path.insert(insert_at, item)
            insert_at += 1
            
    sys.path[:] = new_path

if __name__=='site':    
    __boot()
    del __boot
    







python3.3/site-packages/setuptools/depends.py000064400000014115151733566760015273 0ustar00from __future__ import generators
import sys, imp, marshal
from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN
from distutils.version import StrictVersion, LooseVersion

__all__ = [
    'Require', 'find_module', 'get_module_constant', 'extract_constant'
]

class Require:
    """A prerequisite to building or installing a distribution"""

    def __init__(self,name,requested_version,module,homepage='',
        attribute=None,format=None
    ):

        if format is None and requested_version is not None:
            format = StrictVersion

        if format is not None:
            requested_version = format(requested_version)
            if attribute is None:
                attribute = '__version__'

        self.__dict__.update(locals())
        del self.self


    def full_name(self):
        """Return full package/distribution name, w/version"""
        if self.requested_version is not None:
            return '%s-%s' % (self.name,self.requested_version)
        return self.name


    def version_ok(self,version):
        """Is 'version' sufficiently up-to-date?"""
        return self.attribute is None or self.format is None or \
            str(version) != "unknown" and version >= self.requested_version


    def get_version(self, paths=None, default="unknown"):

        """Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        """

        if self.attribute is None:
            try:
                f,p,i = find_module(self.module,paths)
                if f: f.close()
                return default
            except ImportError:
                return None

        v = get_module_constant(self.module,self.attribute,default,paths)

        if v is not None and v is not default and self.format is not None:
            return self.format(v)

        return v


    def is_present(self,paths=None):
        """Return true if dependency is present on 'paths'"""
        return self.get_version(paths) is not None


    def is_current(self,paths=None):
        """Return true if dependency is present and up-to-date on 'paths'"""
        version = self.get_version(paths)
        if version is None:
            return False
        return self.version_ok(version)


def _iter_code(code):

    """Yield '(op,arg)' pair for each operation in code object 'code'"""

    from array import array
    from dis import HAVE_ARGUMENT, EXTENDED_ARG

    bytes = array('b',code.co_code)
    eof = len(code.co_code)

    ptr = 0
    extended_arg = 0

    while ptr<eof:

        op = bytes[ptr]

        if op>=HAVE_ARGUMENT:

            arg = bytes[ptr+1] + bytes[ptr+2]*256 + extended_arg
            ptr += 3

            if op==EXTENDED_ARG:
                extended_arg = arg * long_type(65536)
                continue

        else:
            arg = None
            ptr += 1

        yield op,arg










def find_module(module, paths=None):
    """Just like 'imp.find_module()', but with package support"""

    parts = module.split('.')

    while parts:
        part = parts.pop(0)
        f, path, (suffix,mode,kind) = info = imp.find_module(part, paths)

        if kind==PKG_DIRECTORY:
            parts = parts or ['__init__']
            paths = [path]

        elif parts:
            raise ImportError("Can't find %r in %s" % (parts,module))

    return info
























def get_module_constant(module, symbol, default=-1, paths=None):

    """Find 'module' by searching 'paths', and extract 'symbol'

    Return 'None' if 'module' does not exist on 'paths', or it does not define
    'symbol'.  If the module defines 'symbol' as a constant, return the
    constant.  Otherwise, return 'default'."""

    try:
        f, path, (suffix,mode,kind) = find_module(module,paths)
    except ImportError:
        # Module doesn't exist
        return None

    try:
        if kind==PY_COMPILED:
            f.read(8)   # skip magic & date
            code = marshal.load(f)
        elif kind==PY_FROZEN:
            code = imp.get_frozen_object(module)
        elif kind==PY_SOURCE:
            code = compile(f.read(), path, 'exec')
        else:
            # Not something we can parse; we'll have to import it.  :(
            if module not in sys.modules:
                imp.load_module(module,f,path,(suffix,mode,kind))
            return getattr(sys.modules[module],symbol,None)

    finally:
        if f:
            f.close()

    return extract_constant(code,symbol,default)








def extract_constant(code,symbol,default=-1):
    """Extract the constant value of 'symbol' from 'code'

    If the name 'symbol' is bound to a constant value by the Python code
    object 'code', return that value.  If 'symbol' is bound to an expression,
    return 'default'.  Otherwise, return 'None'.

    Return value is based on the first assignment to 'symbol'.  'symbol' must
    be a global, or at least a non-"fast" local in the code block.  That is,
    only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
    must be present in 'code.co_names'.
    """

    if symbol not in code.co_names:
        # name's not there, can't possibly be an assigment
        return None

    name_idx = list(code.co_names).index(symbol)

    STORE_NAME = 90
    STORE_GLOBAL = 97
    LOAD_CONST = 100

    const = default

    for op, arg in _iter_code(code):

        if op==LOAD_CONST:
            const = code.co_consts[arg]
        elif arg==name_idx and (op==STORE_NAME or op==STORE_GLOBAL):
            return const
        else:
            const = default
            
if sys.platform.startswith('java') or sys.platform == 'cli':
    # XXX it'd be better to test assertions about bytecode instead...
    del extract_constant, get_module_constant
    __all__.remove('extract_constant')
    __all__.remove('get_module_constant')


python3.3/site-packages/setuptools/dist.py000064400000077444151733566760014632 0ustar00__all__ = ['Distribution']

import re
import os
import sys
import warnings
import distutils.log
import distutils.core
import distutils.cmd
from distutils.core import Distribution as _Distribution
from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
    DistutilsSetupError)

from setuptools.depends import Require
from setuptools.compat import numeric_types, basestring
import pkg_resources

def _get_unpatched(cls):
    """Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
    """
    while cls.__module__.startswith('setuptools'):
        cls, = cls.__bases__
    if not cls.__module__.startswith('distutils'):
        raise AssertionError(
            "distutils has already been patched by %r" % cls
        )
    return cls

_Distribution = _get_unpatched(_Distribution)

sequence = tuple, list

def check_importable(dist, attr, value):
    try:
        ep = pkg_resources.EntryPoint.parse('x='+value)
        assert not ep.extras
    except (TypeError,ValueError,AttributeError,AssertionError):
        raise DistutilsSetupError(
            "%r must be importable 'module:attrs' string (got %r)"
            % (attr,value)
        )


def assert_string_list(dist, attr, value):
    """Verify that value is a string list or None"""
    try:
        assert ''.join(value)!=value
    except (TypeError,ValueError,AttributeError,AssertionError):
        raise DistutilsSetupError(
            "%r must be a list of strings (got %r)" % (attr,value)
        )
def check_nsp(dist, attr, value):
    """Verify that namespace packages are valid"""
    assert_string_list(dist,attr,value)
    for nsp in value:
        if not dist.has_contents_for(nsp):
            raise DistutilsSetupError(
                "Distribution contains no modules or packages for " +
                "namespace package %r" % nsp
            )
        if '.' in nsp:
            parent = '.'.join(nsp.split('.')[:-1])
            if parent not in value:
                distutils.log.warn(
                    "WARNING: %r is declared as a package namespace, but %r"
                    " is not: please correct this in setup.py", nsp, parent
                )

def check_extras(dist, attr, value):
    """Verify that extras_require mapping is valid"""
    try:
        for k,v in value.items():
            if ':' in k:
                k,m = k.split(':',1)
                if pkg_resources.invalid_marker(m):
                    raise DistutilsSetupError("Invalid environment marker: "+m)
            list(pkg_resources.parse_requirements(v))
    except (TypeError,ValueError,AttributeError):
        raise DistutilsSetupError(
            "'extras_require' must be a dictionary whose values are "
            "strings or lists of strings containing valid project/version "
            "requirement specifiers."
        )

def assert_bool(dist, attr, value):
    """Verify that value is True, False, 0, or 1"""
    if bool(value) != value:
        raise DistutilsSetupError(
            "%r must be a boolean value (got %r)" % (attr,value)
        )
def check_requirements(dist, attr, value):
    """Verify that install_requires is a valid requirements list"""
    try:
        list(pkg_resources.parse_requirements(value))
    except (TypeError,ValueError):
        raise DistutilsSetupError(
            "%r must be a string or list of strings "
            "containing valid project/version requirement specifiers" % (attr,)
        )
def check_entry_points(dist, attr, value):
    """Verify that entry_points map is parseable"""
    try:
        pkg_resources.EntryPoint.parse_map(value)
    except ValueError:
        e = sys.exc_info()[1]
        raise DistutilsSetupError(e)

def check_test_suite(dist, attr, value):
    if not isinstance(value,basestring):
        raise DistutilsSetupError("test_suite must be a string")

def check_package_data(dist, attr, value):
    """Verify that value is a dictionary of package names to glob lists"""
    if isinstance(value,dict):
        for k,v in value.items():
            if not isinstance(k,str): break
            try: iter(v)
            except TypeError:
                break
        else:
            return
    raise DistutilsSetupError(
        attr+" must be a dictionary mapping package names to lists of "
        "wildcard patterns"
    )

def check_packages(dist, attr, value):
    for pkgname in value:
        if not re.match(r'\w+(\.\w+)*', pkgname):
            distutils.log.warn(
                "WARNING: %r not a valid package name; please use only"
                ".-separated package names in setup.py", pkgname
            )


class Distribution(_Distribution):
    """Distribution with support for features, tests, and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'features' **deprecated** -- a dictionary mapping option names to
        'setuptools.Feature'
        objects.  Features are a portion of the distribution that can be
        included or excluded based on user options, inter-feature dependencies,
        and availability on the current system.  Excluded features are omitted
        from all setup commands, including source and binary distributions, so
        you can create multiple distributions from the same source tree.
        Feature names should be valid Python identifiers, except that they may
        contain the '-' (minus) sign.  Features can be included or excluded
        via the command line options '--with-X' and '--without-X', where 'X' is
        the name of the feature.  Whether a feature is included by default, and
        whether you are allowed to control this from the command line, is
        determined by the Feature object.  See the 'Feature' class for more
        information.

     'test_suite' -- the name of a test suite to run for the 'test' command.
        If the user runs 'python setup.py test', the package will be installed,
        and the named test suite will be run.  The format is the same as
        would be used on a 'unittest.py' command line.  That is, it is the
        dotted name of an object to import and call to generate a test suite.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.  They are used by the feature subsystem to configure the
    distribution for the included and excluded features.
    """

    _patched_dist = None

    def patch_missing_pkg_info(self, attrs):
        # Fake up a replacement for the data that would normally come from
        # PKG-INFO, but which might not yet be built if this is a fresh
        # checkout.
        #
        if not attrs or 'name' not in attrs or 'version' not in attrs:
            return
        key = pkg_resources.safe_name(str(attrs['name'])).lower()
        dist = pkg_resources.working_set.by_key.get(key)
        if dist is not None and not dist.has_metadata('PKG-INFO'):
            dist._version = pkg_resources.safe_version(str(attrs['version']))
            self._patched_dist = dist

    def __init__(self, attrs=None):
        have_package_data = hasattr(self, "package_data")
        if not have_package_data:
            self.package_data = {}
        _attrs_dict = attrs or {}
        if 'features' in _attrs_dict or 'require_features' in _attrs_dict:
            Feature.warn_deprecated()
        self.require_features = []
        self.features = {}
        self.dist_files = []
        self.src_root = attrs and attrs.pop("src_root", None)
        self.patch_missing_pkg_info(attrs)
        # Make sure we have any eggs needed to interpret 'attrs'
        if attrs is not None:
            self.dependency_links = attrs.pop('dependency_links', [])
            assert_string_list(self,'dependency_links',self.dependency_links)
        if attrs and 'setup_requires' in attrs:
            self.fetch_build_eggs(attrs.pop('setup_requires'))
        for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
            if not hasattr(self,ep.name):
                setattr(self,ep.name,None)
        _Distribution.__init__(self,attrs)
        if isinstance(self.metadata.version, numeric_types):
            # Some people apparently take "version number" too literally :)
            self.metadata.version = str(self.metadata.version)

    def parse_command_line(self):
        """Process features after parsing command line options"""
        result = _Distribution.parse_command_line(self)
        if self.features:
            self._finalize_features()
        return result

    def _feature_attrname(self,name):
        """Convert feature name to corresponding option attribute name"""
        return 'with_'+name.replace('-','_')

    def fetch_build_eggs(self, requires):
        """Resolve pre-setup requirements"""
        from pkg_resources import working_set, parse_requirements
        for dist in working_set.resolve(
            parse_requirements(requires), installer=self.fetch_build_egg
        ):
            working_set.add(dist)

    def finalize_options(self):
        _Distribution.finalize_options(self)
        if self.features:
            self._set_global_opts_from_features()

        for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
            value = getattr(self,ep.name,None)
            if value is not None:
                ep.require(installer=self.fetch_build_egg)
                ep.load()(self, ep.name, value)
        if getattr(self, 'convert_2to3_doctests', None):
            # XXX may convert to set here when we can rely on set being builtin
            self.convert_2to3_doctests = [os.path.abspath(p) for p in self.convert_2to3_doctests]
        else:
            self.convert_2to3_doctests = []

    def fetch_build_egg(self, req):
        """Fetch an egg needed for building"""

        try:
            cmd = self._egg_fetcher
            cmd.package_index.to_scan = []
        except AttributeError:
            from setuptools.command.easy_install import easy_install
            dist = self.__class__({'script_args':['easy_install']})
            dist.parse_config_files()
            opts = dist.get_option_dict('easy_install')
            keep = (
                'find_links', 'site_dirs', 'index_url', 'optimize',
                'site_dirs', 'allow_hosts'
            )
            for key in opts.keys():
                if key not in keep:
                    del opts[key]   # don't use any other settings
            if self.dependency_links:
                links = self.dependency_links[:]
                if 'find_links' in opts:
                    links = opts['find_links'][1].split() + links
                opts['find_links'] = ('setup', links)
            cmd = easy_install(
                dist, args=["x"], install_dir=os.curdir, exclude_scripts=True,
                always_copy=False, build_directory=None, editable=False,
                upgrade=False, multi_version=True, no_report=True, user=False
            )
            cmd.ensure_finalized()
            self._egg_fetcher = cmd
        return cmd.easy_install(req)

    def _set_global_opts_from_features(self):
        """Add --with-X/--without-X options based on optional features"""

        go = []
        no = self.negative_opt.copy()

        for name,feature in self.features.items():
            self._set_feature(name,None)
            feature.validate(self)

            if feature.optional:
                descr = feature.description
                incdef = ' (default)'
                excdef=''
                if not feature.include_by_default():
                    excdef, incdef = incdef, excdef

                go.append(('with-'+name, None, 'include '+descr+incdef))
                go.append(('without-'+name, None, 'exclude '+descr+excdef))
                no['without-'+name] = 'with-'+name

        self.global_options = self.feature_options = go + self.global_options
        self.negative_opt = self.feature_negopt = no

    def _finalize_features(self):
        """Add/remove features and resolve dependencies between them"""

        # First, flag all the enabled items (and thus their dependencies)
        for name,feature in self.features.items():
            enabled = self.feature_is_included(name)
            if enabled or (enabled is None and feature.include_by_default()):
                feature.include_in(self)
                self._set_feature(name,1)

        # Then disable the rest, so that off-by-default features don't
        # get flagged as errors when they're required by an enabled feature
        for name,feature in self.features.items():
            if not self.feature_is_included(name):
                feature.exclude_from(self)
                self._set_feature(name,0)

    def get_command_class(self, command):
        """Pluggable version of get_command_class()"""
        if command in self.cmdclass:
            return self.cmdclass[command]

        for ep in pkg_resources.iter_entry_points('distutils.commands',command):
            ep.require(installer=self.fetch_build_egg)
            self.cmdclass[command] = cmdclass = ep.load()
            return cmdclass
        else:
            return _Distribution.get_command_class(self, command)

    def print_commands(self):
        for ep in pkg_resources.iter_entry_points('distutils.commands'):
            if ep.name not in self.cmdclass:
                cmdclass = ep.load(False) # don't require extras, we're not running
                self.cmdclass[ep.name] = cmdclass
        return _Distribution.print_commands(self)

    def _set_feature(self,name,status):
        """Set feature's inclusion status"""
        setattr(self,self._feature_attrname(name),status)

    def feature_is_included(self,name):
        """Return 1 if feature is included, 0 if excluded, 'None' if unknown"""
        return getattr(self,self._feature_attrname(name))

    def include_feature(self,name):
        """Request inclusion of feature named 'name'"""

        if self.feature_is_included(name)==0:
            descr = self.features[name].description
            raise DistutilsOptionError(
                descr + " is required, but was excluded or is not available"
            )
        self.features[name].include_in(self)
        self._set_feature(name,1)

    def include(self,**attrs):
        """Add items to distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        """
        for k,v in attrs.items():
            include = getattr(self, '_include_'+k, None)
            if include:
                include(v)
            else:
                self._include_misc(k,v)

    def exclude_package(self,package):
        """Remove packages, modules, and extensions in named package"""

        pfx = package+'.'
        if self.packages:
            self.packages = [
                p for p in self.packages
                    if p != package and not p.startswith(pfx)
            ]

        if self.py_modules:
            self.py_modules = [
                p for p in self.py_modules
                    if p != package and not p.startswith(pfx)
            ]

        if self.ext_modules:
            self.ext_modules = [
                p for p in self.ext_modules
                    if p.name != package and not p.name.startswith(pfx)
            ]

    def has_contents_for(self,package):
        """Return true if 'exclude_package(package)' would do something"""

        pfx = package+'.'

        for p in self.iter_distribution_names():
            if p==package or p.startswith(pfx):
                return True

    def _exclude_misc(self,name,value):
        """Handle 'exclude()' for list/tuple attrs without a special handler"""
        if not isinstance(value,sequence):
            raise DistutilsSetupError(
                "%s: setting must be a list or tuple (%r)" % (name, value)
            )
        try:
            old = getattr(self,name)
        except AttributeError:
            raise DistutilsSetupError(
                "%s: No such distribution setting" % name
            )
        if old is not None and not isinstance(old,sequence):
            raise DistutilsSetupError(
                name+": this setting cannot be changed via include/exclude"
            )
        elif old:
            setattr(self,name,[item for item in old if item not in value])

    def _include_misc(self,name,value):
        """Handle 'include()' for list/tuple attrs without a special handler"""

        if not isinstance(value,sequence):
            raise DistutilsSetupError(
                "%s: setting must be a list (%r)" % (name, value)
            )
        try:
            old = getattr(self,name)
        except AttributeError:
            raise DistutilsSetupError(
                "%s: No such distribution setting" % name
            )
        if old is None:
            setattr(self,name,value)
        elif not isinstance(old,sequence):
            raise DistutilsSetupError(
                name+": this setting cannot be changed via include/exclude"
            )
        else:
            setattr(self,name,old+[item for item in value if item not in old])

    def exclude(self,**attrs):
        """Remove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        """
        for k,v in attrs.items():
            exclude = getattr(self, '_exclude_'+k, None)
            if exclude:
                exclude(v)
            else:
                self._exclude_misc(k,v)

    def _exclude_packages(self,packages):
        if not isinstance(packages,sequence):
            raise DistutilsSetupError(
                "packages: setting must be a list or tuple (%r)" % (packages,)
            )
        list(map(self.exclude_package, packages))

    def _parse_command_opts(self, parser, args):
        # Remove --with-X/--without-X options when processing command args
        self.global_options = self.__class__.global_options
        self.negative_opt = self.__class__.negative_opt

        # First, expand any aliases
        command = args[0]
        aliases = self.get_option_dict('aliases')
        while command in aliases:
            src,alias = aliases[command]
            del aliases[command]    # ensure each alias can expand only once!
            import shlex
            args[:1] = shlex.split(alias,True)
            command = args[0]

        nargs = _Distribution._parse_command_opts(self, parser, args)

        # Handle commands that want to consume all remaining arguments
        cmd_class = self.get_command_class(command)
        if getattr(cmd_class,'command_consumes_arguments',None):
            self.get_option_dict(command)['args'] = ("command line", nargs)
            if nargs is not None:
                return []

        return nargs

    def get_cmdline_options(self):
        """Return a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        """

        d = {}

        for cmd,opts in self.command_options.items():

            for opt,(src,val) in opts.items():

                if src != "command line":
                    continue

                opt = opt.replace('_','-')

                if val==0:
                    cmdobj = self.get_command_obj(cmd)
                    neg_opt = self.negative_opt.copy()
                    neg_opt.update(getattr(cmdobj,'negative_opt',{}))
                    for neg,pos in neg_opt.items():
                        if pos==opt:
                            opt=neg
                            val=None
                            break
                    else:
                        raise AssertionError("Shouldn't be able to get here")

                elif val==1:
                    val = None

                d.setdefault(cmd,{})[opt] = val

        return d

    def iter_distribution_names(self):
        """Yield all packages, modules, and extension names in distribution"""

        for pkg in self.packages or ():
            yield pkg

        for module in self.py_modules or ():
            yield module

        for ext in self.ext_modules or ():
            if isinstance(ext,tuple):
                name, buildinfo = ext
            else:
                name = ext.name
            if name.endswith('module'):
                name = name[:-6]
            yield name

    def handle_display_options(self, option_order):
        """If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        """
        import sys

        if sys.version_info < (3,) or self.help_commands:
            return _Distribution.handle_display_options(self, option_order)

        # Stdout may be StringIO (e.g. in tests)
        import io
        if not isinstance(sys.stdout, io.TextIOWrapper):
            return _Distribution.handle_display_options(self, option_order)

        # Don't wrap stdout if utf-8 is already the encoding. Provides
        #  workaround for #334.
        if sys.stdout.encoding.lower() in ('utf-8', 'utf8'):
            return _Distribution.handle_display_options(self, option_order)

        # Print metadata in UTF-8 no matter the platform
        encoding = sys.stdout.encoding
        errors = sys.stdout.errors
        newline = sys.platform != 'win32' and '\n' or None
        line_buffering = sys.stdout.line_buffering

        sys.stdout = io.TextIOWrapper(
            sys.stdout.detach(), 'utf-8', errors, newline, line_buffering)
        try:
            return _Distribution.handle_display_options(self, option_order)
        finally:
            sys.stdout = io.TextIOWrapper(
                sys.stdout.detach(), encoding, errors, newline, line_buffering)


# Install it throughout the distutils
for module in distutils.dist, distutils.core, distutils.cmd:
    module.Distribution = Distribution


class Feature:
    """
    **deprecated** -- The `Feature` facility was never completely implemented
    or supported, `has reported issues
    <https://bitbucket.org/pypa/setuptools/issue/58>`_ and will be removed in
    a future version.

    A subset of the distribution that can be excluded if unneeded/wanted

    Features are created using these keyword arguments:

      'description' -- a short, human readable description of the feature, to
         be used in error messages, and option help messages.

      'standard' -- if true, the feature is included by default if it is
         available on the current system.  Otherwise, the feature is only
         included if requested via a command line '--with-X' option, or if
         another included feature requires it.  The default setting is 'False'.

      'available' -- if true, the feature is available for installation on the
         current system.  The default setting is 'True'.

      'optional' -- if true, the feature's inclusion can be controlled from the
         command line, using the '--with-X' or '--without-X' options.  If
         false, the feature's inclusion status is determined automatically,
         based on 'availabile', 'standard', and whether any other feature
         requires it.  The default setting is 'True'.

      'require_features' -- a string or sequence of strings naming features
         that should also be included if this feature is included.  Defaults to
         empty list.  May also contain 'Require' objects that should be
         added/removed from the distribution.

      'remove' -- a string or list of strings naming packages to be removed
         from the distribution if this feature is *not* included.  If the
         feature *is* included, this argument is ignored.  This argument exists
         to support removing features that "crosscut" a distribution, such as
         defining a 'tests' feature that removes all the 'tests' subpackages
         provided by other features.  The default for this argument is an empty
         list.  (Note: the named package(s) or modules must exist in the base
         distribution when the 'setup()' function is initially called.)

      other keywords -- any other keyword arguments are saved, and passed to
         the distribution's 'include()' and 'exclude()' methods when the
         feature is included or excluded, respectively.  So, for example, you
         could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be
         added or removed from the distribution as appropriate.

    A feature must include at least one 'requires', 'remove', or other
    keyword argument.  Otherwise, it can't affect the distribution in any way.
    Note also that you can subclass 'Feature' to create your own specialized
    feature types that modify the distribution in other ways when included or
    excluded.  See the docstrings for the various methods here for more detail.
    Aside from the methods, the only feature attributes that distributions look
    at are 'description' and 'optional'.
    """

    @staticmethod
    def warn_deprecated():
        warnings.warn(
            "Features are deprecated and will be removed in a future "
                "version. See http://bitbucket.org/pypa/setuptools/65.",
            DeprecationWarning,
            stacklevel=3,
        )

    def __init__(self, description, standard=False, available=True,
            optional=True, require_features=(), remove=(), **extras):
        self.warn_deprecated()

        self.description = description
        self.standard = standard
        self.available = available
        self.optional = optional
        if isinstance(require_features,(str,Require)):
            require_features = require_features,

        self.require_features = [
            r for r in require_features if isinstance(r,str)
        ]
        er = [r for r in require_features if not isinstance(r,str)]
        if er: extras['require_features'] = er

        if isinstance(remove,str):
            remove = remove,
        self.remove = remove
        self.extras = extras

        if not remove and not require_features and not extras:
            raise DistutilsSetupError(
                "Feature %s: must define 'require_features', 'remove', or at least one"
                " of 'packages', 'py_modules', etc."
            )

    def include_by_default(self):
        """Should this feature be included by default?"""
        return self.available and self.standard

    def include_in(self,dist):

        """Ensure feature and its requirements are included in distribution

        You may override this in a subclass to perform additional operations on
        the distribution.  Note that this method may be called more than once
        per feature, and so should be idempotent.

        """

        if not self.available:
            raise DistutilsPlatformError(
                self.description+" is required,"
                "but is not available on this platform"
            )

        dist.include(**self.extras)

        for f in self.require_features:
            dist.include_feature(f)

    def exclude_from(self,dist):

        """Ensure feature is excluded from distribution

        You may override this in a subclass to perform additional operations on
        the distribution.  This method will be called at most once per
        feature, and only after all included features have been asked to
        include themselves.
        """

        dist.exclude(**self.extras)

        if self.remove:
            for item in self.remove:
                dist.exclude_package(item)

    def validate(self,dist):

        """Verify that feature makes sense in context of distribution

        This method is called by the distribution just before it parses its
        command line.  It checks to ensure that the 'remove' attribute, if any,
        contains only valid package/module names that are present in the base
        distribution when 'setup()' is called.  You may override it in a
        subclass to perform any other required validation of the feature
        against a target distribution.
        """

        for item in self.remove:
            if not dist.has_contents_for(item):
                raise DistutilsSetupError(
                    "%s wants to be able to remove %s, but the distribution"
                    " doesn't contain any packages or modules under %s"
                    % (self.description, item, item)
                )
python3.3/site-packages/setuptools/extension.py000064400000002574151733566760015673 0ustar00import sys
import distutils.core
import distutils.extension

from setuptools.dist import _get_unpatched

_Extension = _get_unpatched(distutils.core.Extension)

def have_pyrex():
    """
    Return True if Cython or Pyrex can be imported.
    """
    pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext'
    for pyrex_impl in pyrex_impls:
        try:
            # from (pyrex_impl) import build_ext
            __import__(pyrex_impl, fromlist=['build_ext']).build_ext
            return True
        except Exception:
            pass
    return False


class Extension(_Extension):
    """Extension that uses '.c' files in place of '.pyx' files"""

    def __init__(self, *args, **kw):
        _Extension.__init__(self, *args, **kw)
        if not have_pyrex():
            self._convert_pyx_sources_to_c()

    def _convert_pyx_sources_to_c(self):
        "convert .pyx extensions to .c"
        def pyx_to_c(source):
            if source.endswith('.pyx'):
                source = source[:-4] + '.c'
            return source
        self.sources = list(map(pyx_to_c, self.sources))

class Library(Extension):
    """Just like a regular Extension, but built as a library instead"""

distutils.core.Extension = Extension
distutils.extension.Extension = Extension
if 'distutils.command.build_ext' in sys.modules:
    sys.modules['distutils.command.build_ext'].Extension = Extension
python3.3/site-packages/setuptools/py31compat.py000064400000000614151733566760015650 0ustar00__all__ = ['get_config_vars', 'get_path']

try:
    # Python 2.7 or >=3.2
    from sysconfig import get_config_vars, get_path
except ImportError:
    from distutils.sysconfig import get_config_vars, get_python_lib
    def get_path(name):
        if name not in ('platlib', 'purelib'):
            raise ValueError("Name must be purelib or platlib")
        return get_python_lib(name=='platlib')
python3.3/site-packages/setuptools/package_index.py000064400000114015151733566760016433 0ustar00"""PyPI and direct package downloading"""
import sys
import os
import re
import shutil
import socket
import base64
import hashlib
from functools import wraps

from pkg_resources import (
    CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST,
    require, Environment, find_distributions, safe_name, safe_version,
    to_filename, Requirement, DEVELOP_DIST,
)
from setuptools import ssl_support
from distutils import log
from distutils.errors import DistutilsError
from setuptools.compat import (urllib2, httplib, StringIO, HTTPError,
                               urlparse, urlunparse, unquote, splituser,
                               url2pathname, name2codepoint,
                               unichr, urljoin, urlsplit, urlunsplit,
                               ConfigParser)
from setuptools.compat import filterfalse
from fnmatch import translate
from setuptools.py26compat import strip_fragment
from setuptools.py27compat import get_all_headers

EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$')
HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I)
# this is here to fix emacs' cruddy broken syntax highlighting
PYPI_MD5 = re.compile(
    '<a href="([^"#]+)">([^<]+)</a>\n\s+\\(<a (?:title="MD5 hash"\n\s+)'
    'href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\\)'
)
URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):',re.I).match
EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split()

__all__ = [
    'PackageIndex', 'distros_for_url', 'parse_bdist_wininst',
    'interpret_distro_name',
]

_SOCKET_TIMEOUT = 15

def parse_bdist_wininst(name):
    """Return (base,pyversion) or (None,None) for possible .exe name"""

    lower = name.lower()
    base, py_ver, plat = None, None, None

    if lower.endswith('.exe'):
        if lower.endswith('.win32.exe'):
            base = name[:-10]
            plat = 'win32'
        elif lower.startswith('.win32-py',-16):
            py_ver = name[-7:-4]
            base = name[:-16]
            plat = 'win32'
        elif lower.endswith('.win-amd64.exe'):
            base = name[:-14]
            plat = 'win-amd64'
        elif lower.startswith('.win-amd64-py',-20):
            py_ver = name[-7:-4]
            base = name[:-20]
            plat = 'win-amd64'
    return base,py_ver,plat


def egg_info_for_url(url):
    scheme, server, path, parameters, query, fragment = urlparse(url)
    base = unquote(path.split('/')[-1])
    if server=='sourceforge.net' and base=='download':    # XXX Yuck
        base = unquote(path.split('/')[-2])
    if '#' in base: base, fragment = base.split('#',1)
    return base,fragment

def distros_for_url(url, metadata=None):
    """Yield egg or source distribution objects that might be found at a URL"""
    base, fragment = egg_info_for_url(url)
    for dist in distros_for_location(url, base, metadata): yield dist
    if fragment:
        match = EGG_FRAGMENT.match(fragment)
        if match:
            for dist in interpret_distro_name(
                url, match.group(1), metadata, precedence = CHECKOUT_DIST
            ):
                yield dist

def distros_for_location(location, basename, metadata=None):
    """Yield egg or source distribution objects based on basename"""
    if basename.endswith('.egg.zip'):
        basename = basename[:-4]    # strip the .zip
    if basename.endswith('.egg') and '-' in basename:
        # only one, unambiguous interpretation
        return [Distribution.from_location(location, basename, metadata)]
    if basename.endswith('.exe'):
        win_base, py_ver, platform = parse_bdist_wininst(basename)
        if win_base is not None:
            return interpret_distro_name(
                location, win_base, metadata, py_ver, BINARY_DIST, platform
            )
    # Try source distro extensions (.zip, .tgz, etc.)
    #
    for ext in EXTENSIONS:
        if basename.endswith(ext):
            basename = basename[:-len(ext)]
            return interpret_distro_name(location, basename, metadata)
    return []  # no extension matched

def distros_for_filename(filename, metadata=None):
    """Yield possible egg or source distribution objects based on a filename"""
    return distros_for_location(
        normalize_path(filename), os.path.basename(filename), metadata
    )


def interpret_distro_name(
        location, basename, metadata, py_version=None, precedence=SOURCE_DIST,
        platform=None
        ):
    """Generate alternative interpretations of a source distro name

    Note: if `location` is a filesystem filename, you should call
    ``pkg_resources.normalize_path()`` on it before passing it to this
    routine!
    """
    # Generate alternative interpretations of a source distro name
    # Because some packages are ambiguous as to name/versions split
    # e.g. "adns-python-1.1.0", "egenix-mx-commercial", etc.
    # So, we generate each possible interepretation (e.g. "adns, python-1.1.0"
    # "adns-python, 1.1.0", and "adns-python-1.1.0, no version").  In practice,
    # the spurious interpretations should be ignored, because in the event
    # there's also an "adns" package, the spurious "python-1.1.0" version will
    # compare lower than any numeric version number, and is therefore unlikely
    # to match a request for it.  It's still a potential problem, though, and
    # in the long run PyPI and the distutils should go for "safe" names and
    # versions in distribution archive names (sdist and bdist).

    parts = basename.split('-')
    if not py_version:
        for i,p in enumerate(parts[2:]):
            if len(p)==5 and p.startswith('py2.'):
                return # It's a bdist_dumb, not an sdist -- bail out

    for p in range(1,len(parts)+1):
        yield Distribution(
            location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]),
            py_version=py_version, precedence = precedence,
            platform = platform
        )

# From Python 2.7 docs
def unique_everseen(iterable, key=None):
    "List unique elements, preserving order. Remember all elements ever seen."
    # unique_everseen('AAAABBBCCDAABBB') --> A B C D
    # unique_everseen('ABBCcAD', str.lower) --> A B C D
    seen = set()
    seen_add = seen.add
    if key is None:
        for element in filterfalse(seen.__contains__, iterable):
            seen_add(element)
            yield element
    else:
        for element in iterable:
            k = key(element)
            if k not in seen:
                seen_add(k)
                yield element

def unique_values(func):
    """
    Wrap a function returning an iterable such that the resulting iterable
    only ever yields unique items.
    """
    @wraps(func)
    def wrapper(*args, **kwargs):
        return unique_everseen(func(*args, **kwargs))
    return wrapper

REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
# this line is here to fix emacs' cruddy broken syntax highlighting

@unique_values
def find_external_links(url, page):
    """Find rel="homepage" and rel="download" links in `page`, yielding URLs"""

    for match in REL.finditer(page):
        tag, rel = match.groups()
        rels = set(map(str.strip, rel.lower().split(',')))
        if 'homepage' in rels or 'download' in rels:
            for match in HREF.finditer(tag):
                yield urljoin(url, htmldecode(match.group(1)))

    for tag in ("<th>Home Page", "<th>Download URL"):
        pos = page.find(tag)
        if pos!=-1:
            match = HREF.search(page,pos)
            if match:
                yield urljoin(url, htmldecode(match.group(1)))

user_agent = "Python-urllib/%s setuptools/%s" % (
    sys.version[:3], require('setuptools')[0].version
)

class ContentChecker(object):
    """
    A null content checker that defines the interface for checking content
    """
    def feed(self, block):
        """
        Feed a block of data to the hash.
        """
        return

    def is_valid(self):
        """
        Check the hash. Return False if validation fails.
        """
        return True

    def report(self, reporter, template):
        """
        Call reporter with information about the checker (hash name)
        substituted into the template.
        """
        return

class HashChecker(ContentChecker):
    pattern = re.compile(
        r'(?P<hash_name>sha1|sha224|sha384|sha256|sha512|md5)='
        r'(?P<expected>[a-f0-9]+)'
    )

    def __init__(self, hash_name, expected):
        self.hash_name = hash_name
        self.hash = hashlib.new(hash_name)
        self.expected = expected

    @classmethod
    def from_url(cls, url):
        "Construct a (possibly null) ContentChecker from a URL"
        fragment = urlparse(url)[-1]
        if not fragment:
            return ContentChecker()
        match = cls.pattern.search(fragment)
        if not match:
            return ContentChecker()
        return cls(**match.groupdict())

    def feed(self, block):
        self.hash.update(block)

    def is_valid(self):
        return self.hash.hexdigest() == self.expected

    def report(self, reporter, template):
        msg = template % self.hash_name
        return reporter(msg)


class PackageIndex(Environment):
    """A distribution index that scans web pages for download URLs"""

    def __init__(
            self, index_url="https://pypi.python.org/simple", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
            ):
        Environment.__init__(self,*args,**kw)
        self.index_url = index_url + "/"[:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate,hosts))).match
        self.to_scan = []
        if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()):
            self.opener = ssl_support.opener_for(ca_bundle)
        else: self.opener = urllib2.urlopen

    def process_url(self, url, retrieve=False):
        """Evaluate a URL as a possible download, and maybe retrieve it"""
        if url in self.scanned_urls and not retrieve:
            return
        self.scanned_urls[url] = True
        if not URL_SCHEME(url):
            self.process_filename(url)
            return
        else:
            dists = list(distros_for_url(url))
            if dists:
                if not self.url_ok(url):
                    return
                self.debug("Found link: %s", url)

        if dists or not retrieve or url in self.fetched_urls:
            list(map(self.add, dists))
            return  # don't need the actual page

        if not self.url_ok(url):
            self.fetched_urls[url] = True
            return

        self.info("Reading %s", url)
        self.fetched_urls[url] = True   # prevent multiple fetch attempts
        f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url)
        if f is None: return
        self.fetched_urls[f.url] = True
        if 'html' not in f.headers.get('content-type', '').lower():
            f.close()   # not html, we can't process it
            return

        base = f.url     # handle redirects
        page = f.read()
        if not isinstance(page, str): # We are in Python 3 and got bytes. We want str.
            if isinstance(f, HTTPError):
                # Errors have no charset, assume latin1:
                charset = 'latin-1'
            else:
                charset = f.headers.get_param('charset') or 'latin-1'
            page = page.decode(charset, "ignore")
        f.close()
        for match in HREF.finditer(page):
            link = urljoin(base, htmldecode(match.group(1)))
            self.process_url(link)
        if url.startswith(self.index_url) and getattr(f,'code',None)!=404:
            page = self.process_index(url, page)

    def process_filename(self, fn, nested=False):
        # process filenames or directories
        if not os.path.exists(fn):
            self.warn("Not found: %s", fn)
            return

        if os.path.isdir(fn) and not nested:
            path = os.path.realpath(fn)
            for item in os.listdir(path):
                self.process_filename(os.path.join(path,item), True)

        dists = distros_for_filename(fn)
        if dists:
            self.debug("Found: %s", fn)
            list(map(self.add, dists))

    def url_ok(self, url, fatal=False):
        s = URL_SCHEME(url)
        if (s and s.group(1).lower()=='file') or self.allows(urlparse(url)[1]):
            return True
        msg = ("\nNote: Bypassing %s (disallowed host; see "
            "http://bit.ly/1dg9ijs for details).\n")
        if fatal:
            raise DistutilsError(msg % url)
        else:
            self.warn(msg, url)

    def scan_egg_links(self, search_path):
        for item in search_path:
            if os.path.isdir(item):
                for entry in os.listdir(item):
                    if entry.endswith('.egg-link'):
                        self.scan_egg_link(item, entry)

    def scan_egg_link(self, path, entry):
        lines = [_f for _f in map(str.strip,
                                  open(os.path.join(path, entry))) if _f]
        if len(lines)==2:
            for dist in find_distributions(os.path.join(path, lines[0])):
                dist.location = os.path.join(path, *lines)
                dist.precedence = SOURCE_DIST
                self.add(dist)

    def process_index(self,url,page):
        """Process the contents of a PyPI page"""
        def scan(link):
            # Process a URL to see if it's for a package page
            if link.startswith(self.index_url):
                parts = list(map(
                    unquote, link[len(self.index_url):].split('/')
                ))
                if len(parts)==2 and '#' not in parts[1]:
                    # it's a package page, sanitize and index it
                    pkg = safe_name(parts[0])
                    ver = safe_version(parts[1])
                    self.package_pages.setdefault(pkg.lower(),{})[link] = True
                    return to_filename(pkg), to_filename(ver)
            return None, None

        # process an index page into the package-page index
        for match in HREF.finditer(page):
            try:
                scan(urljoin(url, htmldecode(match.group(1))))
            except ValueError:
                pass

        pkg, ver = scan(url)   # ensure this page is in the page index
        if pkg:
            # process individual package page
            for new_url in find_external_links(url, page):
                # Process the found URL
                base, frag = egg_info_for_url(new_url)
                if base.endswith('.py') and not frag:
                    if ver:
                        new_url+='#egg=%s-%s' % (pkg,ver)
                    else:
                        self.need_version_info(url)
                self.scan_url(new_url)

            return PYPI_MD5.sub(
                lambda m: '<a href="%s#md5=%s">%s</a>' % m.group(1,3,2), page
            )
        else:
            return ""   # no sense double-scanning non-package pages

    def need_version_info(self, url):
        self.scan_all(
            "Page at %s links to .py file(s) without version info; an index "
            "scan is required.", url
        )

    def scan_all(self, msg=None, *args):
        if self.index_url not in self.fetched_urls:
            if msg: self.warn(msg,*args)
            self.info(
                "Scanning index of all packages (this may take a while)"
            )
        self.scan_url(self.index_url)

    def find_packages(self, requirement):
        self.scan_url(self.index_url + requirement.unsafe_name+'/')

        if not self.package_pages.get(requirement.key):
            # Fall back to safe version of the name
            self.scan_url(self.index_url + requirement.project_name+'/')

        if not self.package_pages.get(requirement.key):
            # We couldn't find the target package, so search the index page too
            self.not_found_in_index(requirement)

        for url in list(self.package_pages.get(requirement.key,())):
            # scan each page that might be related to the desired package
            self.scan_url(url)

    def obtain(self, requirement, installer=None):
        self.prescan()
        self.find_packages(requirement)
        for dist in self[requirement.key]:
            if dist in requirement:
                return dist
            self.debug("%s does not match %s", requirement, dist)
        return super(PackageIndex, self).obtain(requirement,installer)

    def check_hash(self, checker, filename, tfp):
        """
        checker is a ContentChecker
        """
        checker.report(self.debug,
            "Validating %%s checksum for %s" % filename)
        if not checker.is_valid():
            tfp.close()
            os.unlink(filename)
            raise DistutilsError(
                "%s validation failed for %s; "
                "possible download problem?" % (
                                checker.hash.name, os.path.basename(filename))
            )

    def add_find_links(self, urls):
        """Add `urls` to the list that will be prescanned for searches"""
        for url in urls:
            if (
                self.to_scan is None        # if we have already "gone online"
                or not URL_SCHEME(url)      # or it's a local file/directory
                or url.startswith('file:')
                or list(distros_for_url(url))   # or a direct package link
            ):
                # then go ahead and process it now
                self.scan_url(url)
            else:
                # otherwise, defer retrieval till later
                self.to_scan.append(url)

    def prescan(self):
        """Scan urls scheduled for prescanning (e.g. --find-links)"""
        if self.to_scan:
            list(map(self.scan_url, self.to_scan))
        self.to_scan = None     # from now on, go ahead and process immediately

    def not_found_in_index(self, requirement):
        if self[requirement.key]:   # we've seen at least one distro
            meth, msg = self.info, "Couldn't retrieve index page for %r"
        else:   # no distros seen for this name, might be misspelled
            meth, msg = (self.warn,
                "Couldn't find index page for %r (maybe misspelled?)")
        meth(msg, requirement.unsafe_name)
        self.scan_all()

    def download(self, spec, tmpdir):
        """Locate and/or download `spec` to `tmpdir`, returning a local path

        `spec` may be a ``Requirement`` object, or a string containing a URL,
        an existing local filename, or a project/version requirement spec
        (i.e. the string form of a ``Requirement`` object).  If it is the URL
        of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
        that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
        automatically created alongside the downloaded file.

        If `spec` is a ``Requirement`` object or a string containing a
        project/version requirement spec, this method returns the location of
        a matching distribution (possibly after downloading it to `tmpdir`).
        If `spec` is a locally existing file or directory name, it is simply
        returned unchanged.  If `spec` is a URL, it is downloaded to a subpath
        of `tmpdir`, and the local filename is returned.  Various errors may be
        raised if a problem occurs during downloading.
        """
        if not isinstance(spec,Requirement):
            scheme = URL_SCHEME(spec)
            if scheme:
                # It's a url, download it to tmpdir
                found = self._download_url(scheme.group(1), spec, tmpdir)
                base, fragment = egg_info_for_url(spec)
                if base.endswith('.py'):
                    found = self.gen_setup(found,fragment,tmpdir)
                return found
            elif os.path.exists(spec):
                # Existing file or directory, just return it
                return spec
            else:
                try:
                    spec = Requirement.parse(spec)
                except ValueError:
                    raise DistutilsError(
                        "Not a URL, existing file, or requirement spec: %r" %
                        (spec,)
                    )
        return getattr(self.fetch_distribution(spec, tmpdir),'location',None)

    def fetch_distribution(
            self, requirement, tmpdir, force_scan=False, source=False,
            develop_ok=False, local_index=None
            ):
        """Obtain a distribution suitable for fulfilling `requirement`

        `requirement` must be a ``pkg_resources.Requirement`` instance.
        If necessary, or if the `force_scan` flag is set, the requirement is
        searched for in the (online) package index as well as the locally
        installed packages.  If a distribution matching `requirement` is found,
        the returned distribution's ``location`` is the value you would have
        gotten from calling the ``download()`` method with the matching
        distribution's URL or filename.  If no matching distribution is found,
        ``None`` is returned.

        If the `source` flag is set, only source distributions and source
        checkout links will be considered.  Unless the `develop_ok` flag is
        set, development and system eggs (i.e., those using the ``.egg-info``
        format) will be ignored.
        """
        # process a Requirement
        self.info("Searching for %s", requirement)
        skipped = {}
        dist = None

        def find(req, env=None):
            if env is None:
                env = self
            # Find a matching distribution; may be called more than once

            for dist in env[req.key]:

                if dist.precedence==DEVELOP_DIST and not develop_ok:
                    if dist not in skipped:
                        self.warn("Skipping development or system egg: %s",dist)
                        skipped[dist] = 1
                    continue

                if dist in req and (dist.precedence<=SOURCE_DIST or not source):
                    return dist

        if force_scan:
            self.prescan()
            self.find_packages(requirement)
            dist = find(requirement)

        if local_index is not None:
            dist = dist or find(requirement, local_index)

        if dist is None and self.to_scan is not None:
            self.prescan()
            dist = find(requirement)

        if dist is None and not force_scan:
            self.find_packages(requirement)
            dist = find(requirement)

        if dist is None:
            self.warn(
                "No local packages or download links found for %s%s",
                (source and "a source distribution of " or ""),
                requirement,
            )
        else:
            self.info("Best match: %s", dist)
            return dist.clone(location=self.download(dist.location, tmpdir))

    def fetch(self, requirement, tmpdir, force_scan=False, source=False):
        """Obtain a file suitable for fulfilling `requirement`

        DEPRECATED; use the ``fetch_distribution()`` method now instead.  For
        backward compatibility, this routine is identical but returns the
        ``location`` of the downloaded distribution instead of a distribution
        object.
        """
        dist = self.fetch_distribution(requirement,tmpdir,force_scan,source)
        if dist is not None:
            return dist.location
        return None

    def gen_setup(self, filename, fragment, tmpdir):
        match = EGG_FRAGMENT.match(fragment)
        dists = match and [
            d for d in
            interpret_distro_name(filename, match.group(1), None) if d.version
        ] or []

        if len(dists)==1:   # unambiguous ``#egg`` fragment
            basename = os.path.basename(filename)

            # Make sure the file has been downloaded to the temp dir.
            if os.path.dirname(filename) != tmpdir:
                dst = os.path.join(tmpdir, basename)
                from setuptools.command.easy_install import samefile
                if not samefile(filename, dst):
                    shutil.copy2(filename, dst)
                    filename=dst

            file = open(os.path.join(tmpdir, 'setup.py'), 'w')
            file.write(
                "from setuptools import setup\n"
                "setup(name=%r, version=%r, py_modules=[%r])\n"
                % (
                    dists[0].project_name, dists[0].version,
                    os.path.splitext(basename)[0]
                )
            )
            file.close()
            return filename

        elif match:
            raise DistutilsError(
                "Can't unambiguously interpret project/version identifier %r; "
                "any dashes in the name or version should be escaped using "
                "underscores. %r" % (fragment,dists)
            )
        else:
            raise DistutilsError(
                "Can't process plain .py files without an '#egg=name-version'"
                " suffix to enable automatic setup script generation."
            )

    dl_blocksize = 8192
    def _download_to(self, url, filename):
        self.info("Downloading %s", url)
        # Download the file
        fp, tfp, info = None, None, None
        try:
            checker = HashChecker.from_url(url)
            fp = self.open_url(strip_fragment(url))
            if isinstance(fp, HTTPError):
                raise DistutilsError(
                    "Can't download %s: %s %s" % (url, fp.code,fp.msg)
                )
            headers = fp.info()
            blocknum = 0
            bs = self.dl_blocksize
            size = -1
            if "content-length" in headers:
                # Some servers return multiple Content-Length headers :(
                sizes = get_all_headers(headers, 'Content-Length')
                size = max(map(int, sizes))
                self.reporthook(url, filename, blocknum, bs, size)
            tfp = open(filename,'wb')
            while True:
                block = fp.read(bs)
                if block:
                    checker.feed(block)
                    tfp.write(block)
                    blocknum += 1
                    self.reporthook(url, filename, blocknum, bs, size)
                else:
                    break
            self.check_hash(checker, filename, tfp)
            return headers
        finally:
            if fp: fp.close()
            if tfp: tfp.close()

    def reporthook(self, url, filename, blocknum, blksize, size):
        pass    # no-op

    def open_url(self, url, warning=None):
        if url.startswith('file:'):
            return local_open(url)
        try:
            return open_with_auth(url, self.opener)
        except (ValueError, httplib.InvalidURL):
            v = sys.exc_info()[1]
            msg = ' '.join([str(arg) for arg in v.args])
            if warning:
                self.warn(warning, msg)
            else:
                raise DistutilsError('%s %s' % (url, msg))
        except urllib2.HTTPError:
            v = sys.exc_info()[1]
            return v
        except urllib2.URLError:
            v = sys.exc_info()[1]
            if warning:
                self.warn(warning, v.reason)
            else:
                raise DistutilsError("Download error for %s: %s"
                                     % (url, v.reason))
        except httplib.BadStatusLine:
            v = sys.exc_info()[1]
            if warning:
                self.warn(warning, v.line)
            else:
                raise DistutilsError(
                    '%s returned a bad status line. The server might be '
                    'down, %s' %
                    (url, v.line)
                )
        except httplib.HTTPException:
            v = sys.exc_info()[1]
            if warning:
                self.warn(warning, v)
            else:
                raise DistutilsError("Download error for %s: %s"
                                     % (url, v))

    def _download_url(self, scheme, url, tmpdir):
        # Determine download filename
        #
        name, fragment = egg_info_for_url(url)
        if name:
            while '..' in name:
                name = name.replace('..','.').replace('\\','_')
        else:
            name = "__downloaded__"    # default if URL has no path contents

        if name.endswith('.egg.zip'):
            name = name[:-4]    # strip the extra .zip before download

        filename = os.path.join(tmpdir,name)

        # Download the file
        #
        if scheme=='svn' or scheme.startswith('svn+'):
            return self._download_svn(url, filename)
        elif scheme=='git' or scheme.startswith('git+'):
            return self._download_git(url, filename)
        elif scheme.startswith('hg+'):
            return self._download_hg(url, filename)
        elif scheme=='file':
            return url2pathname(urlparse(url)[2])
        else:
            self.url_ok(url, True)   # raises error if not allowed
            return self._attempt_download(url, filename)

    def scan_url(self, url):
        self.process_url(url, True)

    def _attempt_download(self, url, filename):
        headers = self._download_to(url, filename)
        if 'html' in headers.get('content-type','').lower():
            return self._download_html(url, headers, filename)
        else:
            return filename

    def _download_html(self, url, headers, filename):
        file = open(filename)
        for line in file:
            if line.strip():
                # Check for a subversion index page
                if re.search(r'<title>([^- ]+ - )?Revision \d+:', line):
                    # it's a subversion index page:
                    file.close()
                    os.unlink(filename)
                    return self._download_svn(url, filename)
                break   # not an index page
        file.close()
        os.unlink(filename)
        raise DistutilsError("Unexpected HTML page found at "+url)

    def _download_svn(self, url, filename):
        url = url.split('#',1)[0]   # remove any fragment for svn's sake
        creds = ''
        if url.lower().startswith('svn:') and '@' in url:
            scheme, netloc, path, p, q, f = urlparse(url)
            if not netloc and path.startswith('//') and '/' in path[2:]:
                netloc, path = path[2:].split('/',1)
                auth, host = splituser(netloc)
                if auth:
                    if ':' in auth:
                        user, pw = auth.split(':',1)
                        creds = " --username=%s --password=%s" % (user, pw)
                    else:
                        creds = " --username="+auth
                    netloc = host
                    url = urlunparse((scheme, netloc, url, p, q, f))
        self.info("Doing subversion checkout from %s to %s", url, filename)
        os.system("svn checkout%s -q %s %s" % (creds, url, filename))
        return filename

    @staticmethod
    def _vcs_split_rev_from_url(url, pop_prefix=False):
        scheme, netloc, path, query, frag = urlsplit(url)

        scheme = scheme.split('+', 1)[-1]

        # Some fragment identification fails
        path = path.split('#',1)[0]

        rev = None
        if '@' in path:
            path, rev = path.rsplit('@', 1)

        # Also, discard fragment
        url = urlunsplit((scheme, netloc, path, query, ''))

        return url, rev

    def _download_git(self, url, filename):
        filename = filename.split('#',1)[0]
        url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)

        self.info("Doing git clone from %s to %s", url, filename)
        os.system("git clone --quiet %s %s" % (url, filename))

        if rev is not None:
            self.info("Checking out %s", rev)
            os.system("(cd %s && git checkout --quiet %s)" % (
                filename,
                rev,
            ))

        return filename

    def _download_hg(self, url, filename):
        filename = filename.split('#',1)[0]
        url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)

        self.info("Doing hg clone from %s to %s", url, filename)
        os.system("hg clone --quiet %s %s" % (url, filename))

        if rev is not None:
            self.info("Updating to %s", rev)
            os.system("(cd %s && hg up -C -r %s >&-)" % (
                filename,
                rev,
            ))

        return filename

    def debug(self, msg, *args):
        log.debug(msg, *args)

    def info(self, msg, *args):
        log.info(msg, *args)

    def warn(self, msg, *args):
        log.warn(msg, *args)

# This pattern matches a character entity reference (a decimal numeric
# references, a hexadecimal numeric reference, or a named reference).
entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub

def uchr(c):
    if not isinstance(c, int):
        return c
    if c>255: return unichr(c)
    return chr(c)

def decode_entity(match):
    what = match.group(1)
    if what.startswith('#x'):
        what = int(what[2:], 16)
    elif what.startswith('#'):
        what = int(what[1:])
    else:
        what = name2codepoint.get(what, match.group(0))
    return uchr(what)

def htmldecode(text):
    """Decode HTML entities in the given text."""
    return entity_sub(decode_entity, text)

def socket_timeout(timeout=15):
    def _socket_timeout(func):
        def _socket_timeout(*args, **kwargs):
            old_timeout = socket.getdefaulttimeout()
            socket.setdefaulttimeout(timeout)
            try:
                return func(*args, **kwargs)
            finally:
                socket.setdefaulttimeout(old_timeout)
        return _socket_timeout
    return _socket_timeout

def _encode_auth(auth):
    """
    A function compatible with Python 2.3-3.3 that will encode
    auth from a URL suitable for an HTTP header.
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
    """
    auth_s = unquote(auth)
    # convert to bytes
    auth_bytes = auth_s.encode()
    # use the legacy interface for Python 2.3 support
    encoded_bytes = base64.encodestring(auth_bytes)
    # convert back to a string
    encoded = encoded_bytes.decode()
    # strip the trailing carriage return
    return encoded.replace('\n','')

class Credential(object):
    """
    A username/password pair. Use like a namedtuple.
    """
    def __init__(self, username, password):
        self.username = username
        self.password = password

    def __iter__(self):
        yield self.username
        yield self.password

    def __str__(self):
        return '%(username)s:%(password)s' % vars(self)

class PyPIConfig(ConfigParser.ConfigParser):

    def __init__(self):
        """
        Load from ~/.pypirc
        """
        defaults = dict.fromkeys(['username', 'password', 'repository'], '')
        ConfigParser.ConfigParser.__init__(self, defaults)

        rc = os.path.join(os.path.expanduser('~'), '.pypirc')
        if os.path.exists(rc):
            self.read(rc)

    @property
    def creds_by_repository(self):
        sections_with_repositories = [
            section for section in self.sections()
            if self.get(section, 'repository').strip()
        ]

        return dict(map(self._get_repo_cred, sections_with_repositories))

    def _get_repo_cred(self, section):
        repo = self.get(section, 'repository').strip()
        return repo, Credential(
            self.get(section, 'username').strip(),
            self.get(section, 'password').strip(),
        )

    def find_credential(self, url):
        """
        If the URL indicated appears to be a repository defined in this
        config, return the credential for that repository.
        """
        for repository, cred in self.creds_by_repository.items():
            if url.startswith(repository):
                return cred


def open_with_auth(url, opener=urllib2.urlopen):
    """Open a urllib2 request, handling HTTP authentication"""

    scheme, netloc, path, params, query, frag = urlparse(url)

    # Double scheme does not raise on Mac OS X as revealed by a
    # failing test. We would expect "nonnumeric port". Refs #20.
    if netloc.endswith(':'):
        raise httplib.InvalidURL("nonnumeric port: ''")

    if scheme in ('http', 'https'):
        auth, host = splituser(netloc)
    else:
        auth = None

    if not auth:
        cred = PyPIConfig().find_credential(url)
        if cred:
            auth = str(cred)
            info = cred.username, url
            log.info('Authenticating as %s for %s (from .pypirc)' % info)

    if auth:
        auth = "Basic " + _encode_auth(auth)
        new_url = urlunparse((scheme,host,path,params,query,frag))
        request = urllib2.Request(new_url)
        request.add_header("Authorization", auth)
    else:
        request = urllib2.Request(url)

    request.add_header('User-Agent', user_agent)
    fp = opener(request)

    if auth:
        # Put authentication info back into request URL if same host,
        # so that links found on the page will work
        s2, h2, path2, param2, query2, frag2 = urlparse(fp.url)
        if s2==scheme and h2==host:
            fp.url = urlunparse((s2,netloc,path2,param2,query2,frag2))

    return fp

# adding a timeout to avoid freezing package_index
open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth)


def fix_sf_url(url):
    return url      # backward compatibility

def local_open(url):
    """Read a local path, with special support for directories"""
    scheme, server, path, param, query, frag = urlparse(url)
    filename = url2pathname(path)
    if os.path.isfile(filename):
        return urllib2.urlopen(url)
    elif path.endswith('/') and os.path.isdir(filename):
        files = []
        for f in os.listdir(filename):
            if f=='index.html':
                fp = open(os.path.join(filename,f),'r')
                body = fp.read()
                fp.close()
                break
            elif os.path.isdir(os.path.join(filename,f)):
                f+='/'
            files.append("<a href=%r>%s</a>" % (f,f))
        else:
            body = ("<html><head><title>%s</title>" % url) + \
                "</head><body>%s</body></html>" % '\n'.join(files)
        status, message = 200, "OK"
    else:
        status, message, body = 404, "Path not found", "Not found"

    headers = {'content-type': 'text/html'}
    return HTTPError(url, status, message, headers, StringIO(body))
python3.3/site-packages/setuptools/lib2to3_ex.py000064400000003716151733566760015630 0ustar00"""
Customized Mixin2to3 support:

 - adds support for converting doctests


This module raises an ImportError on Python 2.
"""

from distutils.util import Mixin2to3 as _Mixin2to3
from distutils import log
from lib2to3.refactor import RefactoringTool, get_fixers_from_package
import setuptools

class DistutilsRefactoringTool(RefactoringTool):
    def log_error(self, msg, *args, **kw):
        log.error(msg, *args)

    def log_message(self, msg, *args):
        log.info(msg, *args)

    def log_debug(self, msg, *args):
        log.debug(msg, *args)

class Mixin2to3(_Mixin2to3):
    def run_2to3(self, files, doctests = False):
        # See of the distribution option has been set, otherwise check the
        # setuptools default.
        if self.distribution.use_2to3 is not True:
            return
        if not files:
            return
        log.info("Fixing "+" ".join(files))
        self.__build_fixer_names()
        self.__exclude_fixers()
        if doctests:
            if setuptools.run_2to3_on_doctests:
                r = DistutilsRefactoringTool(self.fixer_names)
                r.refactor(files, write=True, doctests_only=True)
        else:
            _Mixin2to3.run_2to3(self, files)

    def __build_fixer_names(self):
        if self.fixer_names: return
        self.fixer_names = []
        for p in setuptools.lib2to3_fixer_packages:
            self.fixer_names.extend(get_fixers_from_package(p))
        if self.distribution.use_2to3_fixers is not None:
            for p in self.distribution.use_2to3_fixers:
                self.fixer_names.extend(get_fixers_from_package(p))

    def __exclude_fixers(self):
        excluded_fixers = getattr(self, 'exclude_fixers', [])
        if self.distribution.use_2to3_exclude_fixers is not None:
            excluded_fixers.extend(self.distribution.use_2to3_exclude_fixers)
        for fixer_name in excluded_fixers:
            if fixer_name in self.fixer_names:
                self.fixer_names.remove(fixer_name)
python3.3/site-packages/setuptools/py27compat.py000064400000000462151733566760015656 0ustar00"""
Compatibility Support for Python 2.7 and earlier
"""

import sys

def get_all_headers(message, key):
	"""
	Given an HTTPMessage, return all headers matching a given key.
	"""
	return message.get_all(key)

if sys.version_info < (3,):
	def get_all_headers(message, key):
		return message.getheaders(key)
python3.3/site-packages/setuptools/py26compat.py000064400000000657151733566760015663 0ustar00"""
Compatibility Support for Python 2.6 and earlier
"""

import sys

from setuptools.compat import splittag

def strip_fragment(url):
	"""
	In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
	later was patched to disregard the fragment when making URL requests.
	Do the same for Python 2.6 and earlier.
	"""
	url, fragment = splittag(url)
	return url

if sys.version_info >= (2,7):
	strip_fragment = lambda x: x
python3.3/site-packages/setuptools/script template (dev).py000064400000000467151733566760017636 0ustar00# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
__requires__ = """%(spec)r"""
import sys
from pkg_resources import require
require("""%(spec)r""")
del require
__file__ = """%(dev_path)r"""
if sys.version_info < (3, 0):
    execfile(__file__)
else:
    exec(compile(open(__file__).read(), __file__, 'exec'))
python3.3/site-packages/pip-1.5.6.dist-info/entry_points.txt000064400000000104151733566760017475 0ustar00[console_scripts]
pip3 = pip:main
pip3.3 = pip:main
pip = pip:main

python3.3/site-packages/pip-1.5.6.dist-info/METADATA000064400000004703151733566760015313 0ustar00Metadata-Version: 2.0
Name: pip
Version: 1.5.6
Summary: A tool for installing and managing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: python-virtualenv@groups.google.com
License: MIT
Keywords: easy_install distutils setuptools egg virtualenv
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Build Tools
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Provides-Extra: testing
Requires-Dist: pytest; extra == 'testing'
Requires-Dist: virtualenv (>=1.10); extra == 'testing'
Requires-Dist: scripttest (>=1.3); extra == 'testing'
Requires-Dist: mock; extra == 'testing'


Project Info
============

* Project Page: https://github.com/pypa/pip
* Install howto: https://pip.pypa.io/en/latest/installing.html
* Changelog: https://pip.pypa.io/en/latest/news.html
* Bug Tracking: https://github.com/pypa/pip/issues
* Mailing list: http://groups.google.com/group/python-virtualenv
* Docs: https://pip.pypa.io/
* User IRC: #pypa on Freenode.
* Dev IRC: #pypa-dev on Freenode.

Quickstart
==========

First, :doc:`Install pip <installing>`.

Install a package from `PyPI`_:

::

  $ pip install SomePackage
    [...]
    Successfully installed SomePackage

Show what files were installed:

::

  $ pip show --files SomePackage
    Name: SomePackage
    Version: 1.0
    Location: /my/env/lib/pythonx.x/site-packages
    Files:
     ../somepackage/__init__.py
     [...]

List what packages are outdated:

::

  $ pip list --outdated
    SomePackage (Current: 1.0 Latest: 2.0)

Upgrade a package:

::

  $ pip install --upgrade SomePackage
    [...]
    Found existing installation: SomePackage 1.0
    Uninstalling SomePackage:
      Successfully uninstalled SomePackage
    Running setup.py install for SomePackage
    Successfully installed SomePackage

Uninstall a package:

::

  $ pip uninstall SomePackage
    Uninstalling SomePackage:
      /my/env/lib/pythonx.x/site-packages/somepackage
    Proceed (y/n)? y
    Successfully uninstalled SomePackage


.. _PyPI: http://pypi.python.org/pypi/


python3.3/site-packages/pip-1.5.6.dist-info/pydist.json000064400000002521151733566760016413 0ustar00{"exports": {"console_scripts": {"pip3": "pip:main", "pip3.3": "pip:main", "pip": "pip:main"}}, "contacts": [{"name": "The pip developers", "email": "python-virtualenv@groups.google.com", "role": "author"}], "run_requires": [{"requires": ["pytest", "virtualenv (>=1.10)", "scripttest (>=1.3)", "mock"], "extra": "testing"}], "summary": "A tool for installing and managing Python packages.", "project_urls": {"Home": "https://pip.pypa.io/"}, "extras": ["testing"], "test_requires": [{"requires": ["pytest", "virtualenv (>=1.10)", "scripttest (>=1.3)", "mock"]}], "generator": "bdist_wheel (0.22.0)", "license": "MIT", "name": "pip", "document_names": {"description": "DESCRIPTION.rst"}, "metadata_version": "2.0", "version": "1.5.6", "commands": {"wrap_console": {"pip3": "pip:main", "pip3.3": "pip:main", "pip": "pip:main"}}, "keywords": "easy_install distutils setuptools egg virtualenv", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Build Tools", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3"]}python3.3/site-packages/pip-1.5.6.dist-info/RECORD000064400000074055151733566760015120 0ustar00pip-1.5.6.data/scripts/pip3,sha256=nAVJqitsjrwZv6KSY8NlXstCc8XTvg-jrC2oBIV_1k8,274
pip-1.5.6.data/scripts/pip3.3,sha256=LyM_G2ymMdtOhRI_-JHYo36IIyzBGN8Qi69q_x5Cgkk,278
pip-1.5.6.data/scripts/pip,sha256=De0W2oww_P4dM50MGVfNpWeKo69Hnr6COf8DQL5QqsI,272
pip/index.py,sha256=CLPb0crVhOQ3aZpl4feUKpf1pVR6qLhBiJTa71PoIkM,40403
pip/pep425tags.py,sha256=jb5Rq395Gz_Uv8kn3L9Im1HX7EhEj8nqyYX0nXulzWo,2969
pip/locations.py,sha256=YyFyCLYADKgT5x-Ctj_LeZl5bEzkbBXuR2Iv8IbVqDA,6202
pip/cmdoptions.py,sha256=2E4AK_UNbyvJE6bmvlvsWhkrttE3jrwM_hNYpIecLfE,9330
pip/req.py,sha256=iuQoYf21dUNtwrBG4rkpzGdrsobLBmwAxy9yvsN4_xg,83753
pip/exceptions.py,sha256=wAoboA4PdhGN7xH-ayf_dcDFPYZe9XAivAlZJbOgCN4,1086
pip/__init__.py,sha256=WzANeRzRVWoA1cpCc_d_41hpcWFR90Auv8IpKToWzMw,9428
pip/util.py,sha256=rmGahY7tRBWTKqT42eA9k1tKyVTlOHq4w_NfBk4yt10,25124
pip/baseparser.py,sha256=DZKWTOA1OeD5mLyBUx183Jx-M16cqWOXPZZuJN4-4j8,8162
pip/basecommand.py,sha256=N_nE7BCcoMA7t2nRNTiJB8T__1XqI74SJI2G72VaM2E,6578
pip/runner.py,sha256=VkcZKNikprpDOSl2Y3m0FaQbdGuYsoHkxdhjtL0N3oA,431
pip/status_codes.py,sha256=sEFHUaUJbqv8iArL3HAtcztWZmGOFX01hTesSytDEh0,116
pip/__main__.py,sha256=9JBJhprGRLUy1fEvAdufs0tsjKFAvFAY_nTde6GDkHk,116
pip/download.py,sha256=jnZvTGYutxPtgJvF0URMnsBGkTABNrfgFevu5QmscfE,22580
pip/wheel.py,sha256=BbXwXLwU5IqWU5sPieWErTbuI3sDHxGUUm24rzXebLI,20800
pip/log.py,sha256=1fW7cVRIRBhfqWz4JH2HhJRHzVQ4PJTRbolRj3S33f8,9455
pip/backwardcompat/__init__.py,sha256=AcP5dr3nL-4AGxSwsFIEUcf9ki0ROUFwfc0IrIeHaJI,3756
pip/vcs/git.py,sha256=ib3TqDwJyfjBnSRFKVe_HhNdwkmfcOZfJHbqt2RUOVg,7898
pip/vcs/mercurial.py,sha256=71ESfgxotPPPZjiH6sMTBWcj5TS8kjgJxVnWrRb3bwo,5820
pip/vcs/__init__.py,sha256=kS31hLmJ6BgKnBu8kvXKQlJEwoj1MxYE7wfRuFL-daM,8748
pip/vcs/bazaar.py,sha256=qUIuIqDJqwZ_nP6WR52YwvYVy1lvIUmvaT-IdxDYUHo,4943
pip/vcs/subversion.py,sha256=P31K7o83JdcipIyuEVlnpSp5KZqakb4OJ1PKT-FB7C8,10640
pip/commands/list.py,sha256=FHf7H35AajbCuymiG2z8xAGNSx8W5CNZKj6Hh2QGo38,6814
pip/commands/__init__.py,sha256=N_4io-oGcWF9-raDN5TYXbGlJFsx5po36HZmwgLso6I,2236
pip/commands/zip.py,sha256=KECCb3oCHxJqDT3kUEnlf0udp31Ckoe8oyEKdS7EKNQ,14821
pip/commands/show.py,sha256=ipjEcTrk-hgvFysSKJ5E9PSPXZGTuE3NIXLYvXnsdNk,2767
pip/commands/unzip.py,sha256=_PeTWKOd_iRxPt_7njQ8jGFpjX006vobn593tcIyeUc,185
pip/commands/uninstall.py,sha256=MF4zSLfMxnH3E8T673ORNWz0Bsc4C6LEI5KImpAQrck,2203
pip/commands/install.py,sha256=nKCSLKvUpYHWVZXP96XcyWVGQBoOnG635Tt1JxLx7Ts,13780
pip/commands/help.py,sha256=ETLg8xfv8uFwS3KvxmsCE-I56S15jUTvfkwaPAA18pE,927
pip/commands/completion.py,sha256=LnJgUrpGGO4x2Y8VdwhKda4kGZWMFO28P4jYzYT5Q8k,1838
pip/commands/bundle.py,sha256=tK8LU3Khjkrz65y3brNP71QOBkQCb9mlv9x8s1W02T4,1787
pip/commands/search.py,sha256=_4Mza0qEb6P1aDA2OROYd-KuOJg0NrITOtQoiCDJF5Q,4736
pip/commands/wheel.py,sha256=BLf-jQxO7BhiHho302fNGPsz9fA5NGjfGUSv33XmP9s,7714
pip/commands/freeze.py,sha256=Hyx1gzMaTFwTMcP98fwNCRVvvrWenX9j1RBziLCIo0A,4664
pip/_vendor/pkg_resources.py,sha256=0y2CkvxQcHCBVOmTCNvdMN8hTPPUogThjhkCxegggII,100025
pip/_vendor/__init__.py,sha256=f-xO4dF7jRP89yrL4h26_nULYgYTzgnTgUFlkDasJrc,266
pip/_vendor/re-vendor.py,sha256=PcdZ40d0ohMsdJmA4t0AeAWbPXi1tFsvAwA5KE5FGeY,773
pip/_vendor/six.py,sha256=whAS1kvmixxh-pKqb5qQ05-fHMnGjuKyU6m7_wa09O4,23462
pip/_vendor/distlib/index.py,sha256=D-Zz8pQ6Gtr4t7HlFebU36P9inMPSfExmit061S8DUk,19476
pip/_vendor/distlib/manifest.py,sha256=I-JG2bVBN3Zmf4gpt9MFjgsukcIt0rMrz95jQ1kwbgE,13497
pip/_vendor/distlib/scripts.py,sha256=0bIHpJFwyvymJ4CEnm1-x3AcJZbYTEkhBAKuas295Ic,12307
pip/_vendor/distlib/markers.py,sha256=iRrVWwpyVwjkKJSX8NEQ92_MRMwpROcfNGKCD-Ch1QM,6282
pip/_vendor/distlib/resources.py,sha256=H9QmD7R_8t-iLxZne9EnjAHAdSEbJ22PYotEppOGxts,9432
pip/_vendor/distlib/t64.exe,sha256=71TYxgPfviERRKhyYaXPx2pl4o4ugs5zNWuIMLlm7ss,94720
pip/_vendor/distlib/w64.exe,sha256=haGpLW73-UaPHkjhKaQVPTBJCZ9Lg1rMBZdhpi7f_V8,91648
pip/_vendor/distlib/__init__.py,sha256=kTBiZ-2Ndb1k7wb8yCvl7iRBCDTnvaOR15qf32RgvsY,581
pip/_vendor/distlib/version.py,sha256=FgTBNWH7dDY12fqTFy6nATw21wV8kKJw5G19aFouwDE,22996
pip/_vendor/distlib/util.py,sha256=UBy5ki-nyb0nJyM_-TlXSfni_cEOI4r6LzglMMB_1zc,51230
pip/_vendor/distlib/compat.py,sha256=pVILHBDu1P72lO1lEgPFpwRWGs4Cj2-eo_xOPLKjprk,38875
pip/_vendor/distlib/locators.py,sha256=Vi88LbYqF981rmCc8dbD9qnmt5MeJzv7qiAlvgrK3vs,46946
pip/_vendor/distlib/database.py,sha256=reYrKl6tqHs3eOrMrdXX4W0OGlBqathuqSzCy-696MI,49138
pip/_vendor/distlib/t32.exe,sha256=snr0x6iR5Yd7ZndiuvGMuuQGg8VklUc5538uQcOeVYQ,91136
pip/_vendor/distlib/wheel.py,sha256=TUMl4Pzri_jglkvr2jZ4GJfWAumG3VNzT2CaW7oBXQQ,38259
pip/_vendor/distlib/w32.exe,sha256=QoyveFPxLH-db4j2YDzb-VmP7DmGT1vHwPOLGpzc3uw,87040
pip/_vendor/distlib/metadata.py,sha256=IS0Q8hNbQWEhaLtItUlLxYC3j9zVtFD76DgXbHxcRZE,36815
pip/_vendor/distlib/_backport/tarfile.py,sha256=bjyTNONZb-YEXrHFLExOSuagtSOoPaONP2UUoxwkAqE,92627
pip/_vendor/distlib/_backport/__init__.py,sha256=bqS_dTOH6uW9iGgd0uzfpPjo6vZ4xpPZ7kyfZJ2vNaw,274
pip/_vendor/distlib/_backport/misc.py,sha256=KWecINdbFNOxSOP1fGF680CJnaC6S4fBRgEtaYTw0ig,971
pip/_vendor/distlib/_backport/sysconfig.cfg,sha256=swZKxq9RY5e9r3PXCrlvQPMsvOdiWZBTHLEbqS8LJLU,2617
pip/_vendor/distlib/_backport/shutil.py,sha256=AUi8718iRoJ9K26mRi-rywtt8Gx7ykvrvbUbZszjfYE,25650
pip/_vendor/distlib/_backport/sysconfig.py,sha256=7WdYP0wbw8izH1eAEGNA-HXUyJrhzIAGK_LniUs4UNI,26958
pip/_vendor/html5lib/ihatexml.py,sha256=MT12cVXAKaW-ALUkUeN175HpUP73xK8wAIpPzQ8cgfI,16581
pip/_vendor/html5lib/inputstream.py,sha256=qa-xwqbm-w250UR-uVzooXPSHFI4Ho6drLhPl7VWvHI,30636
pip/_vendor/html5lib/__init__.py,sha256=6fwIe3NEcpx7aLb1bBXUpsDgJFE9PnbpRADB7i2QhBw,714
pip/_vendor/html5lib/constants.py,sha256=w_Lrxu8h6qE4KATYy0SL5hiJ5ebuB28SlCcdXUHf6to,87346
pip/_vendor/html5lib/html5parser.py,sha256=qMHEOEahKSZzLHHkqLRVbuIJYgAteVR-nmkjMp59Tvw,117029
pip/_vendor/html5lib/utils.py,sha256=T-BFeUVGJDjVCRbNoqar2qxn8jEoCOOJXE1nH0nDHEQ,2545
pip/_vendor/html5lib/tokenizer.py,sha256=6Uf8sDUkvNn661bcBSBYUCTfXzSs9EyCTiPcj5PAjYI,76929
pip/_vendor/html5lib/sanitizer.py,sha256=sg7g5CXF9tfvykIoSVAvA8647MgScy3ncZC7IYH-8SA,16428
pip/_vendor/html5lib/treewalkers/lxmletree.py,sha256=vWfXWK3GOSrq2trQm2aPmIRWPhVuYDZ3g9Fu8hUeBQg,6215
pip/_vendor/html5lib/treewalkers/pulldom.py,sha256=9W6i8yWtUzayV6EwX-okVacttHaqpQZwdBCc2S3XeQ4,2302
pip/_vendor/html5lib/treewalkers/__init__.py,sha256=44g-xYZEoYxzkMu6CepBTLm4m-g9iy7Vm_IG8PWAbhY,2323
pip/_vendor/html5lib/treewalkers/genshistream.py,sha256=IbBFrlgi-59-K7P1zm0d7ZFIknBN4c5E57PHJDkx39s,2278
pip/_vendor/html5lib/treewalkers/etree.py,sha256=waFU6dxcV5y4SEMyxZpQ9M4I5pKpMmCtUSN1GbuCVcE,4625
pip/_vendor/html5lib/treewalkers/_base.py,sha256=hnL6zMgGJoGqEJYKVKveDmfpz1d2xriyuuau6479xq4,6919
pip/_vendor/html5lib/treewalkers/dom.py,sha256=mAg05wBWN2k-CGPoo0KNxa55QAlHciNccp8AezCa8j8,1457
pip/_vendor/html5lib/treebuilders/__init__.py,sha256=Xz4X6B5DA1R-5GyRa44j0sJwfl6dUNyb0NBu9-7sK3U,3405
pip/_vendor/html5lib/treebuilders/etree.py,sha256=etbO6yQlyV46rWlj9mSyVqQOWrgoHgyJ01Tut4lWZkk,12621
pip/_vendor/html5lib/treebuilders/_base.py,sha256=Xf0FZVcVwIQS6tEseJdj5wKbYucbNCnbAsnsG4lONis,13711
pip/_vendor/html5lib/treebuilders/dom.py,sha256=ylkIlwEV2NsIWBpwEtfqF0LVoCGg4oXazEWs4-486jk,8469
pip/_vendor/html5lib/treebuilders/etree_lxml.py,sha256=z3Bnfm2MstEEb_lbaAeicl5l-ab6MSQa5Q1ZZreK7Pc,14031
pip/_vendor/html5lib/trie/datrie.py,sha256=EQpqSfkZRuTbE-DuhW7xMdVDxdZNZ0CfmnYfHA_3zxM,1178
pip/_vendor/html5lib/trie/__init__.py,sha256=mec5zyJ5wIKRM8819gIcIsYQwncg91rEmPwGH1dG3Ho,212
pip/_vendor/html5lib/trie/_base.py,sha256=WGY8SGptFmx4O0aKLJ54zrIQOoyuvhS0ngA36vAcIcc,927
pip/_vendor/html5lib/trie/py.py,sha256=wXmQLrZRf4MyWNyg0m3h81m9InhLR7GJ002mIIZh-8o,1775
pip/_vendor/html5lib/serializer/__init__.py,sha256=xFXFP-inaTNlbnau5c5DGrH_O8yPm-C6HWbJxpiSqFE,490
pip/_vendor/html5lib/serializer/htmlserializer.py,sha256=bSXUuFJB6s-ODOl0nzFN0UA6xlQRU-BwYamPeJvsNSE,12909
pip/_vendor/html5lib/filters/inject_meta_charset.py,sha256=xllv1I7unxhcyZTf3LTsv30wh2mAkT7wmTZx7zIhpuY,2746
pip/_vendor/html5lib/filters/optionaltags.py,sha256=4ozLwBgMRaxe7iqxefLQpDhp3irK7YHo9LgSGsvZYMw,10500
pip/_vendor/html5lib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/html5lib/filters/whitespace.py,sha256=LbOUcC0zQ9z703KNZrArOr0kVBO7OMXjKjucDW32LU4,1142
pip/_vendor/html5lib/filters/_base.py,sha256=z-IU9ZAYjpsVsqmVt7kuWC63jR11hDMr6CVrvuao8W0,286
pip/_vendor/html5lib/filters/alphabeticalattributes.py,sha256=fpRLbz6TCe5yXEkGmyMlJ80FekWsTR-sHk3Ano0U9LQ,624
pip/_vendor/html5lib/filters/lint.py,sha256=6rlGRUTxD5KWwEVoXVHI_PeyUHN6Vw2v_ovg0YiHsDA,4306
pip/_vendor/html5lib/filters/sanitizer.py,sha256=MvGUs_v2taWPgGhjxswRSUiHfxrqMUhsNPz-eSeUYUQ,352
pip/_vendor/html5lib/treeadapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/html5lib/treeadapters/sax.py,sha256=3of4vvaUYIAic7pngebwJV24hpOS7Zg9ggJa_WQegy4,1661
pip/_vendor/requests/models.py,sha256=OYZOkemxZPpeTp5cvhdx-gAnl9bW82wdnGIr4uoVH20,26436
pip/_vendor/requests/cacert.pem,sha256=ak7q_q8ozHdQ9ff27U-E1vCNrLisFRQSMy9zJkdpQlM,308434
pip/_vendor/requests/hooks.py,sha256=9vNiuiRHRd5Qy6BX_0p1H3NsUzDo1M_HaFR2AFL41Tg,820
pip/_vendor/requests/exceptions.py,sha256=z-3QpicafKtIh85bMEaClL2OpNPdsc6TP_83KcsVh8Y,1877
pip/_vendor/requests/__init__.py,sha256=Rl423kV-MBTFDiTtEOJiP9CuaubFSi8rHaqzq1KBN0w,1856
pip/_vendor/requests/cookies.py,sha256=BjMKtrI8TXQD5oQVeToYtkRBF149eI85UhWsBGwsJac,16686
pip/_vendor/requests/adapters.py,sha256=fp4t_woMNJPv8vikcrLbkkDxhJHJMZ3h8MlgtKvpuE8,14608
pip/_vendor/requests/compat.py,sha256=JGrJPV2YGatzwrexl9kSt8Z8QtmFboRZH9ywsLK_MMA,2556
pip/_vendor/requests/sessions.py,sha256=kwPPNj1M3D6yfHPcygUERvfqWaSx8odBijhqKTqRX_Q,22290
pip/_vendor/requests/status_codes.py,sha256=LYpqLv4AEKuTPby-QSvgl_gI7fcVlUDqSBcndIwX-Qg,3136
pip/_vendor/requests/certs.py,sha256=wSaqhSNoB0igp6Da-hWw0jtXICKXBbL8aS9swthlt50,544
pip/_vendor/requests/structures.py,sha256=d7f7ZXZZzgZtvrBQBZA1boJYX_QlP1YqL-_xtpzImGw,3541
pip/_vendor/requests/auth.py,sha256=x2bFqHK3Lkbm7qPUyh_dAqYLTDTotBi-1za9EpCdA0U,6123
pip/_vendor/requests/utils.py,sha256=MxSUha_2szwhfLKmGg5bolxt6lA6OghSvVZ4xMZwQhM,19973
pip/_vendor/requests/api.py,sha256=4xrabBN80yaqHxsomHVQD09v2VndgCz1cSsEnRvGGL0,4344
pip/_vendor/requests/packages/__init__.py,sha256=aXkbNCjM_WhryRBocE4AaA_p7-CTxL5LOutY7XzKm4s,62
pip/_vendor/requests/packages/chardet/big5prober.py,sha256=XX96C--6WKYW36mL-z7pJSAtc169Z8ZImByCP4pEN9A,1684
pip/_vendor/requests/packages/chardet/euckrfreq.py,sha256=T5saK5mImySG5ygQPtsp6o2uKulouCwYm2ElOyFkJqU,45978
pip/_vendor/requests/packages/chardet/langthaimodel.py,sha256=-k7djh3dGKngAGnt3WfuoJN7acDcWcmHAPojhaUd7q4,11275
pip/_vendor/requests/packages/chardet/euctwfreq.py,sha256=G_I0BW9i1w0ONeeUwIYqV7_U09buIHdqh-wNHVaql7I,34872
pip/_vendor/requests/packages/chardet/sbcharsetprober.py,sha256=Xq0lODqJnDgxglBiQI4BqTFiPbn63-0a5XNA5-hVu7U,4793
pip/_vendor/requests/packages/chardet/euckrprober.py,sha256=Wo7dnZ5Erw_nB4H-m5alMiOxOuJUmGHlwCSaGqExDZA,1675
pip/_vendor/requests/packages/chardet/escprober.py,sha256=q5TcQKeVq31WxrW7Sv8yjpZkjEoaHO8S92EJZ9hodys,3187
pip/_vendor/requests/packages/chardet/gb2312freq.py,sha256=M2gFdo_qQ_BslStEchrPW5CrPEZEacC0uyDLw4ok-kY,36011
pip/_vendor/requests/packages/chardet/sjisprober.py,sha256=1RjpQ2LU2gvoEB_4O839xDQVchWx2fG_C7_vXh52P5I,3734
pip/_vendor/requests/packages/chardet/__init__.py,sha256=8-39Dg2qEuod5DNN7RMdn2ZYOO9zFU3fFfaE80iDWGc,1295
pip/_vendor/requests/packages/chardet/latin1prober.py,sha256=g67gqZ2z89LUOlR7BZEAh4-p5a1yGWss9nWy8FCNm8Q,5241
pip/_vendor/requests/packages/chardet/langcyrillicmodel.py,sha256=fkcd5OvogUp-GrNDWAZPgkYsSRCD2omotAEvqjlmLKE,17725
pip/_vendor/requests/packages/chardet/charsetgroupprober.py,sha256=0lKk7VE516fgMw119tNefFqLOxKfIE9WfdkpIT69OKU,3791
pip/_vendor/requests/packages/chardet/chardistribution.py,sha256=cUARQFr1oTLXeJCDQrDRkUP778AvSMzhSCnG8VLCV58,9226
pip/_vendor/requests/packages/chardet/eucjpprober.py,sha256=5IpfSEjAb7h3hcGMd6dkU80O900C2N6xku28rdYFKuc,3678
pip/_vendor/requests/packages/chardet/mbcharsetprober.py,sha256=9rOCjDVsmSMp6e7q2syqak22j7lrbUZhJhMee2gbVL0,3268
pip/_vendor/requests/packages/chardet/langhungarianmodel.py,sha256=SXwuUzh49_cBeMXhshRHdrhlkz0T8_pZWV_pdqBKNFk,12536
pip/_vendor/requests/packages/chardet/langhebrewmodel.py,sha256=4ASl5vzKJPng4H278VHKtRYC03TpQpenlHTcsmZH1rE,11318
pip/_vendor/requests/packages/chardet/escsm.py,sha256=7iljEKN8lXTh8JFXPUSwlibMno6R6ksq4evLxbkzfro,7839
pip/_vendor/requests/packages/chardet/jisfreq.py,sha256=ZcL4R5ekHHbP2KCYGakVMBsiKqZZZAABzhwi-uRkOps,47315
pip/_vendor/requests/packages/chardet/big5freq.py,sha256=D8oTdz-GM7Jg8TsaWJDm65vM_OLHC3xub6qUJ3rOgsQ,82594
pip/_vendor/requests/packages/chardet/compat.py,sha256=5mm6yrHwef1JEG5OxkPJlSq5lkjLVpEGh3iPgFBkpkM,1157
pip/_vendor/requests/packages/chardet/gb2312prober.py,sha256=VWnjoRa83Y6V6oczMaxyUr0uy48iCnC2nzk9zfEIRHc,1681
pip/_vendor/requests/packages/chardet/utf8prober.py,sha256=7tdNZGrJY7jZUBD483GGMkiP0Tx8Fp-cGvWHoAsilHg,2652
pip/_vendor/requests/packages/chardet/universaldetector.py,sha256=GkZdwNyNfbFWC8I1uqnzyhOUF7favWCqCOKqdQlx6gQ,6831
pip/_vendor/requests/packages/chardet/sbcsgroupprober.py,sha256=8hLyH8RAG-aohBo7o_KciWVgRo42ZE_zEtuNG1JMRYI,3291
pip/_vendor/requests/packages/chardet/constants.py,sha256=-UnY8U7EP7z9fTyd09yq35BEkSFEAUAiv9ohd1DW1s4,1335
pip/_vendor/requests/packages/chardet/langbulgarianmodel.py,sha256=ZyPsA796MSVhYdfWhMCgKWckupAKAnKqWcE3Cl3ej6o,12784
pip/_vendor/requests/packages/chardet/euctwprober.py,sha256=upS2P6GuT5ujOxXYw-RJLcT7A4PTuo27KGUKU4UZpIQ,1676
pip/_vendor/requests/packages/chardet/langgreekmodel.py,sha256=QHMy31CH_ot67UCtmurCEKqKx2WwoaKrw2YCYYBK2Lw,12628
pip/_vendor/requests/packages/chardet/hebrewprober.py,sha256=8pdoUfsVXf_L4BnJde_BewS6H2yInV5688eu0nFhLHY,13359
pip/_vendor/requests/packages/chardet/chardetect.py,sha256=8g-dRSA97bSE6M25Tqe1roKKtl3XHSMnqi6vTzpHNV0,1141
pip/_vendor/requests/packages/chardet/charsetprober.py,sha256=Z48o2KiOj23FNqYH8FqzhH5m1qdm3rI8DcTm2Yqtklg,1902
pip/_vendor/requests/packages/chardet/mbcssm.py,sha256=UuiA4Ic8vEc0XpTKDneqZyiH2TwGuFVZxOxWJep3X_4,19608
pip/_vendor/requests/packages/chardet/mbcsgroupprober.py,sha256=SHRzNPLpDXfMJLA8phCHVU0WgqbgDCNxDQMolGX_7yk,1967
pip/_vendor/requests/packages/chardet/jpcntx.py,sha256=9fJ9oS0BUarcdZNySwmzVRuT03sYdClSmFwXDj3yVNg,19104
pip/_vendor/requests/packages/chardet/codingstatemachine.py,sha256=E85rYhHVMw9xDEJVgiQhp0OnLGr6i2r8_7QOWMKTH08,2318
pip/_vendor/requests/packages/chardet/cp949prober.py,sha256=FMvdLyB7fejPXRsTbca7LK1P3RUvvssmjUNyaEfz8zY,1782
pip/_vendor/requests/packages/urllib3/request.py,sha256=cXTcrr9d50Rt213ZXLgCf53KNWxe4LQ8lxSV1HBYa9E,5808
pip/_vendor/requests/packages/urllib3/exceptions.py,sha256=T-ILeqVPpEvrOYAq8XEyTF0X8XRWcFVGT2gMrF00km0,3364
pip/_vendor/requests/packages/urllib3/filepost.py,sha256=tWPY33HnFM_RPpEU9PHv9D34n67w8ZRt80ZSsWIv0Kk,2512
pip/_vendor/requests/packages/urllib3/__init__.py,sha256=sLIKv9dGJjDloiVXUBBjXDWWq8bM66kcvTH2SU_WZKg,1701
pip/_vendor/requests/packages/urllib3/response.py,sha256=ff9-9sZkghNWCyeoECvImHspITTum7KOM20J2ia4SAw,10347
pip/_vendor/requests/packages/urllib3/fields.py,sha256=UuTJzGxUc9H1LPYZnD3f8GW308Vx_znb5pt4yimORsI,5976
pip/_vendor/requests/packages/urllib3/_collections.py,sha256=Oh1gxPZRqtOSy3pTV0pWQ949t9sjRAFMautsHiHP_pY,6557
pip/_vendor/requests/packages/urllib3/connection.py,sha256=eug-y4_dOa-x9bxDlURwpqlZuQDhl9Tjre5D1S5bijE,6533
pip/_vendor/requests/packages/urllib3/connectionpool.py,sha256=8eDsWYJzKYOyXMiP4CJqtLeychOw3iD_P20Ov-dbGUs,26904
pip/_vendor/requests/packages/urllib3/poolmanager.py,sha256=bMYHdNaVI5O4YrJHr1T6tE2RYHEMzM2_K0cTy7uzX2M,8977
pip/_vendor/requests/packages/urllib3/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py,sha256=VJ-GjxpYITxSj4UDKX0iqvHwaatyg2RA3PaTym5Wp6w,4741
pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py,sha256=D1cbFXSoWj4ahM0azQdvIDFkvNnzMLxOvo1wnMrPo8M,15086
pip/_vendor/requests/packages/urllib3/packages/__init__.py,sha256=EKCTAOjZtPR_HC50e7X8hS5j4bkFkN87XZOT-Wdpfus,74
pip/_vendor/requests/packages/urllib3/packages/six.py,sha256=U-rO-WBrFS8PxHeamSl6okKCjqPF18NhiZb0qPZ67XM,11628
pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py,sha256=HtHphtStJlorzQqoIat8zUH0lqLns416gfSO9y_aSAQ,8936
pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py,sha256=cOWMIn1orgJoA35p6pSzO_-Dc6iOX9Dhl6D2sL9b_2o,460
pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py,sha256=fK28k37hL7-D79v9iM2fHgNK9Q1Pw0M7qVRL4rkfFjQ,3778
pip/_vendor/requests/packages/urllib3/util/request.py,sha256=-mIHA_M2aZwEmW5PpNfxEi9B47YDmFcoTW5FvQ7prf4,1924
pip/_vendor/requests/packages/urllib3/util/timeout.py,sha256=WGx3s4593QcpwyHLY1FpFZgGPiTdL26A2nJhsZa9Rj8,9236
pip/_vendor/requests/packages/urllib3/util/__init__.py,sha256=nI42Lb9ShOOOl_uRDyJfZP_nxHCR4wTFJXmDa_GEe7c,622
pip/_vendor/requests/packages/urllib3/util/url.py,sha256=ftfW-i1XtyFZEOEKfXLkKNmM7APmgNHbtcGWYr-6xdI,4273
pip/_vendor/requests/packages/urllib3/util/response.py,sha256=EVO-5Q1Wc9K61i3RIhPB83CXfnvZpphL_NNp0SLznzI,354
pip/_vendor/requests/packages/urllib3/util/ssl_.py,sha256=0SJbyE9KURi8IjmOwo8sqmmit4sRkXf9eg_ODWOhSD0,4235
pip/_vendor/requests/packages/urllib3/util/connection.py,sha256=Df5MeJaIpPigbIxEa87ojZ7qxXm1-V9dhnc2m7S6lNA,1348
pip/_vendor/_markerlib/markers.py,sha256=YuFp0-osufFIoqnzG3L0Z2fDCx4Vln3VUDeXJ2DA_1I,3979
pip/_vendor/_markerlib/__init__.py,sha256=2hgtRuYDOrimZF9-ENCkrP8gnJ59HZEtlk-zoTEvn1Y,564
pip/_vendor/colorama/ansi.py,sha256=spKO9jqXAB9POAj6M3bZLrdCf-W9wUVeDCqF664WSGs,1039
pip/_vendor/colorama/initialise.py,sha256=sL44vQFKG5BAoFgoIxfhH0wG2NnLBw9mtnWFVtXkHGs,1297
pip/_vendor/colorama/winterm.py,sha256=RhWJPcGA_T1knfS-84AXpQ0C7cn8XWE6iQkqy1GPsmk,4206
pip/_vendor/colorama/__init__.py,sha256=eABG0aR8L-8JfIiftmvixrDZvqHawB7KIIxiRdKsi1k,217
pip/_vendor/colorama/ansitowin32.py,sha256=C0mA80tFRvkdHVTHzvyrCzsI0CNQ1gY9ng6deCxkbGY,6664
pip/_vendor/colorama/win32.py,sha256=tMAHgaTSySAt5BI5hBoID6oshHIYnJBlUqDsOoHbV0w,4911
pip-1.5.6.dist-info/DESCRIPTION.rst,sha256=n5sT7bxCOnG9ej7TtEjjARQZ_n2ECqWFDiJK88BM0u0,1422
pip-1.5.6.dist-info/RECORD,,
pip-1.5.6.dist-info/METADATA,sha256=lUBJx4V5mJY0jPlxYlu1x4YUNML-AN4dn4Dv-EFX8-Y,2499
pip-1.5.6.dist-info/WHEEL,sha256=SXYYsi-y-rEGIva8sB8iKF6bAFD6YDhmqHX5hI3fc0o,110
pip-1.5.6.dist-info/pydist.json,sha256=dWd43njFFdIOoXBWKB94FC8b_27-Fmu8cIcoyeGEe6I,1361
pip-1.5.6.dist-info/entry_points.txt,sha256=qqYf5oRjyrrYv-a-0MnFqbCif4F6oY_kyR-jQTzaels,68
pip-1.5.6.dist-info/top_level.txt,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
/opt/alt/python33/bin/pip,sha256=drKvwXvW5Oaq3nxOcd1FzZkrrW8RATX_LtVFxY9rbpU,218
/opt/alt/python33/bin/pip3,sha256=drKvwXvW5Oaq3nxOcd1FzZkrrW8RATX_LtVFxY9rbpU,218
/opt/alt/python33/bin/pip3.3,sha256=drKvwXvW5Oaq3nxOcd1FzZkrrW8RATX_LtVFxY9rbpU,218
pip/vcs/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/escprober.cpython-33.pyc,,
pip/_vendor/html5lib/filters/__pycache__/_base.cpython-33.pyc,,
pip/_vendor/distlib/_backport/__pycache__/sysconfig.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/contrib/__pycache__/ntlmpool.cpython-33.pyc,,
pip/_vendor/colorama/__pycache__/win32.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/version.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/sbcharsetprober.cpython-33.pyc,,
pip/commands/__pycache__/uninstall.cpython-33.pyc,,
pip/_vendor/html5lib/filters/__pycache__/whitespace.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/compat.cpython-33.pyc,,
pip/_vendor/html5lib/__pycache__/html5parser.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langthaimodel.cpython-33.pyc,,
pip/__pycache__/__main__.cpython-33.pyc,,
pip/commands/__pycache__/install.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/contrib/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/html5lib/trie/__pycache__/datrie.cpython-33.pyc,,
pip/_vendor/html5lib/treeadapters/__pycache__/sax.cpython-33.pyc,,
pip/__pycache__/pep425tags.cpython-33.pyc,,
pip/_vendor/html5lib/__pycache__/tokenizer.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/mbcharsetprober.cpython-33.pyc,,
pip/_vendor/html5lib/filters/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/hebrewprober.cpython-33.pyc,,
pip/__pycache__/index.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langbulgarianmodel.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/connectionpool.cpython-33.pyc,,
pip/_vendor/html5lib/filters/__pycache__/alphabeticalattributes.cpython-33.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/etree_lxml.cpython-33.pyc,,
pip/vcs/__pycache__/git.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/exceptions.cpython-33.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/dom.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/metadata.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/gb2312freq.cpython-33.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/pulldom.cpython-33.pyc,,
pip/_vendor/distlib/_backport/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/__pycache__/six.cpython-33.pyc,,
pip/commands/__pycache__/list.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/big5freq.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/compat.cpython-33.pyc,,
pip/_vendor/html5lib/__pycache__/sanitizer.cpython-33.pyc,,
pip/_vendor/_markerlib/__pycache__/markers.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/mbcssm.cpython-33.pyc,,
pip/_vendor/colorama/__pycache__/initialise.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/utils.cpython-33.pyc,,
pip/_vendor/__pycache__/pkg_resources.cpython-33.pyc,,
pip/__pycache__/wheel.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/url.cpython-33.pyc,,
pip/__pycache__/basecommand.cpython-33.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/etree.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/structures.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/charsetgroupprober.cpython-33.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/__init__.cpython-33.pyc,,
pip/commands/__pycache__/search.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/locators.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/exceptions.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/gb2312prober.cpython-33.pyc,,
pip/_vendor/distlib/_backport/__pycache__/tarfile.cpython-33.pyc,,
pip/_vendor/colorama/__pycache__/winterm.cpython-33.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/html5lib/__pycache__/constants.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/cookies.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/models.cpython-33.pyc,,
pip/_vendor/__pycache__/re-vendor.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/compat.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/sjisprober.cpython-33.pyc,,
pip/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/fields.cpython-33.pyc,,
pip/_vendor/_markerlib/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/escsm.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/jisfreq.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/connection.cpython-33.pyc,,
pip/commands/__pycache__/completion.cpython-33.pyc,,
pip/_vendor/distlib/_backport/__pycache__/shutil.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/wheel.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/index.cpython-33.pyc,,
pip/_vendor/html5lib/filters/__pycache__/inject_meta_charset.cpython-33.pyc,,
pip/__pycache__/runner.cpython-33.pyc,,
pip/commands/__pycache__/show.cpython-33.pyc,,
pip/__pycache__/req.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/_collections.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/adapters.cpython-33.pyc,,
pip/vcs/__pycache__/subversion.cpython-33.pyc,,
pip/_vendor/distlib/_backport/__pycache__/misc.cpython-33.pyc,,
pip/_vendor/html5lib/serializer/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/euctwfreq.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/filepost.cpython-33.pyc,,
pip/commands/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/api.cpython-33.pyc,,
pip/commands/__pycache__/bundle.cpython-33.pyc,,
pip/_vendor/html5lib/__pycache__/inputstream.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/charsetprober.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/scripts.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/_implementation.cpython-33.pyc,,
pip/__pycache__/log.cpython-33.pyc,,
pip/_vendor/html5lib/trie/__pycache__/_base.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/poolmanager.cpython-33.pyc,,
pip/_vendor/requests/packages/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/etree.cpython-33.pyc,,
pip/vcs/__pycache__/bazaar.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/big5prober.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/request.cpython-33.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/_base.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/contrib/__pycache__/pyopenssl.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/util.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/packages/__pycache__/six.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langcyrillicmodel.cpython-33.pyc,,
pip/_vendor/colorama/__pycache__/ansitowin32.cpython-33.pyc,,
pip/__pycache__/util.cpython-33.pyc,,
pip/commands/__pycache__/help.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/euckrfreq.cpython-33.pyc,,
pip/_vendor/html5lib/treeadapters/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/colorama/__pycache__/ansi.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/genshistream.cpython-33.pyc,,
pip/commands/__pycache__/unzip.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/sbcsgroupprober.cpython-33.pyc,,
pip/_vendor/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/mbcsgroupprober.cpython-33.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/_base.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/chardistribution.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/markers.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/request.cpython-33.pyc,,
pip/commands/__pycache__/freeze.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/constants.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/status_codes.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/universaldetector.cpython-33.pyc,,
pip/commands/__pycache__/wheel.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/euckrprober.cpython-33.pyc,,
pip/_vendor/html5lib/filters/__pycache__/lint.cpython-33.pyc,,
pip/__pycache__/exceptions.cpython-33.pyc,,
pip/commands/__pycache__/zip.cpython-33.pyc,,
pip/_vendor/html5lib/filters/__pycache__/sanitizer.cpython-33.pyc,,
pip/backwardcompat/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/dom.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langgreekmodel.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/packages/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/sessions.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/packages/__pycache__/ordered_dict.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/latin1prober.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/resources.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/certs.cpython-33.pyc,,
pip/_vendor/html5lib/__pycache__/ihatexml.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langhungarianmodel.cpython-33.pyc,,
pip/__pycache__/cmdoptions.cpython-33.pyc,,
pip/_vendor/html5lib/__pycache__/__init__.cpython-33.pyc,,
pip/__pycache__/baseparser.cpython-33.pyc,,
pip/_vendor/html5lib/serializer/__pycache__/htmlserializer.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/database.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/timeout.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/jpcntx.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/codingstatemachine.cpython-33.pyc,,
pip/_vendor/distlib/__pycache__/manifest.cpython-33.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/lxmletree.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/response.cpython-33.pyc,,
pip/_vendor/html5lib/trie/__pycache__/py.cpython-33.pyc,,
pip/_vendor/html5lib/trie/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/eucjpprober.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/euctwprober.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/utf8prober.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/auth.cpython-33.pyc,,
pip/__pycache__/locations.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langhebrewmodel.cpython-33.pyc,,
pip/vcs/__pycache__/mercurial.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/connection.cpython-33.pyc,,
pip/_vendor/html5lib/filters/__pycache__/optionaltags.cpython-33.pyc,,
pip/_vendor/html5lib/__pycache__/utils.cpython-33.pyc,,
pip/__pycache__/status_codes.cpython-33.pyc,,
pip/_vendor/colorama/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/chardetect.cpython-33.pyc,,
pip/_vendor/requests/__pycache__/hooks.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/ssl_.cpython-33.pyc,,
pip/__pycache__/download.cpython-33.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/response.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/__init__.cpython-33.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/cp949prober.cpython-33.pyc,,
python3.3/site-packages/pip-1.5.6.dist-info/top_level.txt000064400000000004151733566760016730 0ustar00pip
python3.3/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst000064400000002616151733566760016526 0ustar00
Project Info
============

* Project Page: https://github.com/pypa/pip
* Install howto: https://pip.pypa.io/en/latest/installing.html
* Changelog: https://pip.pypa.io/en/latest/news.html
* Bug Tracking: https://github.com/pypa/pip/issues
* Mailing list: http://groups.google.com/group/python-virtualenv
* Docs: https://pip.pypa.io/
* User IRC: #pypa on Freenode.
* Dev IRC: #pypa-dev on Freenode.

Quickstart
==========

First, :doc:`Install pip <installing>`.

Install a package from `PyPI`_:

::

  $ pip install SomePackage
    [...]
    Successfully installed SomePackage

Show what files were installed:

::

  $ pip show --files SomePackage
    Name: SomePackage
    Version: 1.0
    Location: /my/env/lib/pythonx.x/site-packages
    Files:
     ../somepackage/__init__.py
     [...]

List what packages are outdated:

::

  $ pip list --outdated
    SomePackage (Current: 1.0 Latest: 2.0)

Upgrade a package:

::

  $ pip install --upgrade SomePackage
    [...]
    Found existing installation: SomePackage 1.0
    Uninstalling SomePackage:
      Successfully uninstalled SomePackage
    Running setup.py install for SomePackage
    Successfully installed SomePackage

Uninstall a package:

::

  $ pip uninstall SomePackage
    Uninstalling SomePackage:
      /my/env/lib/pythonx.x/site-packages/somepackage
    Proceed (y/n)? y
    Successfully uninstalled SomePackage


.. _PyPI: http://pypi.python.org/pypi/


python3.3/site-packages/pip-1.5.6.dist-info/WHEEL000064400000000156151733566760014775 0ustar00Wheel-Version: 1.0
Generator: bdist_wheel (0.22.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

python3.3/site-packages/setuptools-2.0.dist-info/zip-safe000064400000000002151733566760017116 0ustar00
python3.3/site-packages/setuptools-2.0.dist-info/entry_points.txt000064400000005325151733566760020770 0ustar00[egg_info.writers]
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
depends.txt = setuptools.command.egg_info:warn_depends_obsolete
top_level.txt = setuptools.command.egg_info:write_toplevel_names
entry_points.txt = setuptools.command.egg_info:write_entries
requires.txt = setuptools.command.egg_info:write_requirements
PKG-INFO = setuptools.command.egg_info:write_pkg_info
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg

[setuptools.installation]
eggsecutable = setuptools.command.easy_install:bootstrap

[setuptools.file_finders]
svn_cvs = setuptools.command.sdist:_default_revctrl

[distutils.commands]
install_scripts = setuptools.command.install_scripts:install_scripts
build_ext = setuptools.command.build_ext:build_ext
egg_info = setuptools.command.egg_info:egg_info
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
build_py = setuptools.command.build_py:build_py
install_egg_info = setuptools.command.install_egg_info:install_egg_info
install_lib = setuptools.command.install_lib:install_lib
register = setuptools.command.register:register
develop = setuptools.command.develop:develop
sdist = setuptools.command.sdist:sdist
rotate = setuptools.command.rotate:rotate
alias = setuptools.command.alias:alias
test = setuptools.command.test:test
bdist_egg = setuptools.command.bdist_egg:bdist_egg
install = setuptools.command.install:install
saveopts = setuptools.command.saveopts:saveopts
upload_docs = setuptools.command.upload_docs:upload_docs
setopt = setuptools.command.setopt:setopt
easy_install = setuptools.command.easy_install:easy_install
bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst

[distutils.setup_keywords]
exclude_package_data = setuptools.dist:check_package_data
zip_safe = setuptools.dist:assert_bool
install_requires = setuptools.dist:check_requirements
eager_resources = setuptools.dist:assert_string_list
extras_require = setuptools.dist:check_extras
use_2to3_fixers = setuptools.dist:assert_string_list
tests_require = setuptools.dist:check_requirements
convert_2to3_doctests = setuptools.dist:assert_string_list
test_loader = setuptools.dist:check_importable
include_package_data = setuptools.dist:assert_bool
test_suite = setuptools.dist:check_test_suite
packages = setuptools.dist:check_packages
entry_points = setuptools.dist:check_entry_points
dependency_links = setuptools.dist:assert_string_list
use_2to3 = setuptools.dist:assert_bool
use_2to3_exclude_fixers = setuptools.dist:assert_string_list
package_data = setuptools.dist:check_package_data
namespace_packages = setuptools.dist:check_nsp

[console_scripts]
easy_install = setuptools.command.easy_install:main
easy_install-3.3 = setuptools.command.easy_install:main

python3.3/site-packages/setuptools-2.0.dist-info/METADATA000064400000213042151733566760016572 0ustar00Metadata-Version: 2.0
Name: setuptools
Version: 2.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://pypi.python.org/pypi/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: PSF or ZPL
Keywords: CPAN PyPI distutils eggs package management
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Provides-Extra: ssl:sys_platform=='win32'
Requires-Dist: wincertstore (==0.1); extra == "ssl:sys_platform=='win32'"
Provides-Extra: certs
Requires-Dist: certifi (==0.0.8); extra == 'certs'

===============================
Installing and Using Setuptools
===============================

.. contents:: **Table of Contents**


-------------------------
Installation Instructions
-------------------------

Upgrading from Distribute
=========================

Currently, Distribute disallows installing Setuptools 0.7+ over Distribute.
You must first uninstall any active version of Distribute first (see
`Uninstalling`_).

Upgrading from Setuptools 0.6
=============================

Upgrading from prior versions of Setuptools is supported. Initial reports
good success in this regard.

Windows
=======

The recommended way to install setuptools on Windows is to download
`ez_setup.py`_ and run it. The script will download the appropriate .egg
file and install it for you.

.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

For best results, uninstall previous versions FIRST (see `Uninstalling`_).

Once installation is complete, you will find an ``easy_install`` program in
your Python ``Scripts`` subdirectory.  For simple invocation and best results,
add this directory to your ``PATH`` environment variable, if it is not already
present.


Unix-based Systems including Mac OS X
=====================================

Download `ez_setup.py`_ and run it using the target Python version. The script
will download the appropriate version and install it for you::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

Note that you will may need to invoke the command with superuser privileges to
install to the system Python::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

Alternatively, on Python 2.6 and later, Setuptools may be installed to a
user-local path::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
    > python ez_setup.py --user


Python 2.4 and Python 2.5 support
=================================

Setuptools 2.0 and later requires Python 2.6 or later. To install setuptools
on Python 2.4 or Python 2.5, use the bootstrap script for Setuptools 1.x:
https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py.


Advanced Installation
=====================

For more advanced installation options, such as installing to custom
locations or prefixes, download and extract the source
tarball from `Setuptools on PyPI <https://pypi.python.org/pypi/setuptools>`_
and run setup.py with any supported distutils and Setuptools options.
For example::

    setuptools-x.x$ python setup.py --prefix=/opt/setuptools

Use ``--help`` to get a full options list, but we recommend consulting
the `EasyInstall manual`_ for detailed instructions, especially `the section
on custom installation locations`_.

.. _EasyInstall manual: https://pythonhosted.org/setuptools/EasyInstall
.. _the section on custom installation locations: https://pythonhosted.org/setuptools/EasyInstall#custom-installation-locations


Downloads
=========

All setuptools downloads can be found at `the project's home page in the Python
Package Index`_.  Scroll to the very bottom of the page to find the links.

.. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools

In addition to the PyPI downloads, the development version of ``setuptools``
is available from the `Bitbucket repo`_, and in-development versions of the
`0.6 branch`_ are available as well.

.. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev
.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06

Uninstalling
============

On Windows, if Setuptools was installed using an ``.exe`` or ``.msi``
installer, simply use the uninstall feature of "Add/Remove Programs" in the
Control Panel.

Otherwise, to uninstall Setuptools or Distribute, regardless of the Python
version, delete all ``setuptools*`` and ``distribute*`` files and
directories from your system's ``site-packages`` directory
(and any other ``sys.path`` directories) FIRST.

If you are upgrading or otherwise plan to re-install Setuptools or Distribute,
nothing further needs to be done. If you want to completely remove Setuptools,
you may also want to remove the 'easy_install' and 'easy_install-x.x' scripts
and associated executables installed to the Python scripts directory.

--------------------------------
Using Setuptools and EasyInstall
--------------------------------

Here are some of the available manuals, tutorials, and other resources for
learning about Setuptools, Python Eggs, and EasyInstall:

* `The EasyInstall user's guide and reference manual`_
* `The setuptools Developer's Guide`_
* `The pkg_resources API reference`_
* `Package Compatibility Notes`_ (user-maintained)
* `The Internal Structure of Python Eggs`_

Questions, comments, and bug reports should be directed to the `distutils-sig
mailing list`_.  If you have written (or know of) any tutorials, documentation,
plug-ins, or other resources for setuptools users, please let us know about
them there, so this reference list can be updated.  If you have working,
*tested* patches to correct problems or add features, you may submit them to
the `setuptools bug tracker`_.

.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/issues
.. _Package Compatibility Notes: https://pythonhosted.org/setuptools/PackageNotes
.. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html
.. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html
.. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html
.. _The EasyInstall user's guide and reference manual: https://pythonhosted.org/setuptools/easy_install.html
.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/


-------
Credits
-------

* The original design for the ``.egg`` format and the ``pkg_resources`` API was
  co-created by Phillip Eby and Bob Ippolito.  Bob also implemented the first
  version of ``pkg_resources``, and supplied the OS X operating system version
  compatibility algorithm.

* Ian Bicking implemented many early "creature comfort" features of
  easy_install, including support for downloading via Sourceforge and
  Subversion repositories.  Ian's comments on the Web-SIG about WSGI
  application deployment also inspired the concept of "entry points" in eggs,
  and he has given talks at PyCon and elsewhere to inform and educate the
  community about eggs and setuptools.

* Jim Fulton contributed time and effort to build automated tests of various
  aspects of ``easy_install``, and supplied the doctests for the command-line
  ``.exe`` wrappers on Windows.

* Phillip J. Eby is the seminal author of setuptools, and
  first proposed the idea of an importable binary distribution format for
  Python application plug-ins.

* Significant parts of the implementation of setuptools were funded by the Open
  Source Applications Foundation, to provide a plug-in infrastructure for the
  Chandler PIM application.  In addition, many OSAF staffers (such as Mike
  "Code Bear" Taylor) contributed their time and stress as guinea pigs for the
  use of eggs and setuptools, even before eggs were "cool".  (Thanks, guys!)

* Since the merge with Distribute, Jason R. Coombs is the
  maintainer of setuptools.  The project is maintained in coordination with
  the Python Packaging Authority (PyPA) and the larger Python community.

.. _files:

=======
CHANGES
=======

---
2.0
---

* `Issue #121 <https://bitbucket.org/pypa/setuptools/issue/121>`_: Exempt lib2to3 pickled grammars from DirectorySandbox.
* `Issue #41 <https://bitbucket.org/pypa/setuptools/issue/41>`_: Dropped support for Python 2.4 and Python 2.5. Clients requiring
  setuptools for those versions of Python should use setuptools 1.x.
* Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients
  expecting this boolean variable should use ``site.ENABLE_USER_SITE``
  instead.
* Removed ``pkg_resources.ImpWrapper``. Clients that expected this class
  should use ``pkgutil.ImpImporter`` instead.

-----
1.4.2
-----

* `Issue #116 <https://bitbucket.org/pypa/setuptools/issue/116>`_: Correct TypeError when reading a local package index on Python
  3.

-----
1.4.1
-----

* `Issue #114 <https://bitbucket.org/pypa/setuptools/issue/114>`_: Use ``sys.getfilesystemencoding`` for decoding config in
  ``bdist_wininst`` distributions.

* `Issue #105 <https://bitbucket.org/pypa/setuptools/issue/105>`_ and `Issue #113 <https://bitbucket.org/pypa/setuptools/issue/113>`_: Establish a more robust technique for
  determining the terminal encoding::

    1. Try ``getpreferredencoding``
    2. If that returns US_ASCII or None, try the encoding from
       ``getdefaultlocale``. If that encoding was a "fallback" because Python
       could not figure it out from the environment or OS, encoding remains
       unresolved.
    3. If the encoding is resolved, then make sure Python actually implements
       the encoding.
    4. On the event of an error or unknown codec, revert to fallbacks
       (UTF-8 on Darwin, ASCII on everything else).
    5. On the encoding is 'mac-roman' on Darwin, use UTF-8 as 'mac-roman' was
       a bug on older Python releases.

    On a side note, it would seem that the encoding only matters for when SVN
    does not yet support ``--xml`` and when getting repository and svn version
    numbers. The ``--xml`` technique should yield UTF-8 according to some
    messages on the SVN mailing lists. So if the version numbers are always
    7-bit ASCII clean, it may be best to only support the file parsing methods
    for legacy SVN releases and support for SVN without the subprocess command
    would simple go away as support for the older SVNs does.

---
1.4
---

* `Issue #27 <https://bitbucket.org/pypa/setuptools/issue/27>`_: ``easy_install`` will now use credentials from .pypirc if
  present for connecting to the package index.
* `Pull Request #21 <https://bitbucket.org/pypa/setuptools/pull-request/21>`_: Omit unwanted newlines in ``package_index._encode_auth``
  when the username/password pair length indicates wrapping.

-----
1.3.2
-----

* `Issue #99 <https://bitbucket.org/pypa/setuptools/issue/99>`_: Fix filename encoding issues in SVN support.

-----
1.3.1
-----

* Remove exuberant warning in SVN support when SVN is not used.

---
1.3
---

* Address security vulnerability in SSL match_hostname check as reported in
  `Python #17997 <http://bugs.python.org/issue17997>`_.
* Prefer `backports.ssl_match_hostname
  <https://pypi.python.org/pypi/backports.ssl_match_hostname>`_ for backport
  implementation if present.
* Correct NameError in ``ssl_support`` module (``socket.error``).

---
1.2
---

* `Issue #26 <https://bitbucket.org/pypa/setuptools/issue/26>`_: Add support for SVN 1.7. Special thanks to Philip Thiem for the
  contribution.
* `Issue #93 <https://bitbucket.org/pypa/setuptools/issue/93>`_: Wheels are now distributed with every release. Note that as
  reported in `Issue #108 <https://bitbucket.org/pypa/setuptools/issue/108>`_, as of Pip 1.4, scripts aren't installed properly
  from wheels. Therefore, if using Pip to install setuptools from a wheel,
  the ``easy_install`` command will not be available.
* Setuptools "natural" launcher support, introduced in 1.0, is now officially
  supported.

-----
1.1.7
-----

* Fixed behavior of NameError handling in 'script template (dev).py' (script
  launcher for 'develop' installs).
* ``ez_setup.py`` now ensures partial downloads are cleaned up following
  a failed download.
* `Distribute #363 <https://bitbucket.org/tarek/distribute/issue/363>`_ and `Issue #55 <https://bitbucket.org/pypa/setuptools/issue/55>`_: Skip an sdist test that fails on locales
  other than UTF-8.

-----
1.1.6
-----

* `Distribute #349 <https://bitbucket.org/tarek/distribute/issue/349>`_: ``sandbox.execfile`` now opens the target file in binary
  mode, thus honoring a BOM in the file when compiled.

-----
1.1.5
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Second attempt at fix (logic was reversed).

-----
1.1.4
-----

* `Issue #77 <https://bitbucket.org/pypa/setuptools/issue/77>`_: Fix error in upload command (Python 2.4).

-----
1.1.3
-----

* Fix NameError in previous patch.

-----
1.1.2
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Correct issue where 404 errors are returned for URLs with
  fragments in them (such as #egg=).

-----
1.1.1
-----

* `Issue #75 <https://bitbucket.org/pypa/setuptools/issue/75>`_: Add ``--insecure`` option to ez_setup.py to accommodate
  environments where a trusted SSL connection cannot be validated.
* `Issue #76 <https://bitbucket.org/pypa/setuptools/issue/76>`_: Fix AttributeError in upload command with Python 2.4.

---
1.1
---

* `Issue #71 <https://bitbucket.org/pypa/setuptools/issue/71>`_ (`Distribute #333 <https://bitbucket.org/tarek/distribute/issue/333>`_): EasyInstall now puts less emphasis on the
  condition when a host is blocked via ``--allow-hosts``.
* `Issue #72 <https://bitbucket.org/pypa/setuptools/issue/72>`_: Restored Python 2.4 compatibility in ``ez_setup.py``.

---
1.0
---

* `Issue #60 <https://bitbucket.org/pypa/setuptools/issue/60>`_: On Windows, Setuptools supports deferring to another launcher,
  such as Vinay Sajip's `pylauncher <https://bitbucket.org/pypa/pylauncher>`_
  (included with Python 3.3) to launch console and GUI scripts and not install
  its own launcher executables. This experimental functionality is currently
  only enabled if  the ``SETUPTOOLS_LAUNCHER`` environment variable is set to
  "natural". In the future, this behavior may become default, but only after
  it has matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER``
  also accepts "executable" to force the default behavior of creating launcher
  executables.
* `Issue #63 <https://bitbucket.org/pypa/setuptools/issue/63>`_: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or
  wget for retrieving the Setuptools tarball for improved security of the
  install. The script will still fall back to a simple ``urlopen`` on
  platforms that do not have these tools.
* `Issue #65 <https://bitbucket.org/pypa/setuptools/issue/65>`_: Deprecated the ``Features`` functionality.
* `Issue #52 <https://bitbucket.org/pypa/setuptools/issue/52>`_: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied)
  connection.

Backward-Incompatible Changes
=============================

This release includes a couple of backward-incompatible changes, but most if
not all users will find 1.0 a drop-in replacement for 0.9.

* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: Normalized API of environment marker support. Specifically,
  removed line number and filename from SyntaxErrors when returned from
  `pkg_resources.invalid_marker`. Any clients depending on the specific
  string representation of exceptions returned by that function may need to
  be updated to account for this change.
* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: SyntaxErrors generated by `pkg_resources.invalid_marker` are
  normalized for cross-implementation consistency.
* Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting``
  options to easy_install. These options have been deprecated since 0.6a11.

-----
0.9.8
-----

* `Issue #53 <https://bitbucket.org/pypa/setuptools/issue/53>`_: Fix NameErrors in `_vcs_split_rev_from_url`.

-----
0.9.7
-----

* `Issue #49 <https://bitbucket.org/pypa/setuptools/issue/49>`_: Correct AttributeError on PyPy where a hashlib.HASH object does
  not have a `.name` attribute.
* `Issue #34 <https://bitbucket.org/pypa/setuptools/issue/34>`_: Documentation now refers to bootstrap script in code repository
  referenced by bookmark.
* Add underscore-separated keys to environment markers (markerlib).

-----
0.9.6
-----

* `Issue #44 <https://bitbucket.org/pypa/setuptools/issue/44>`_: Test failure on Python 2.4 when MD5 hash doesn't have a `.name`
  attribute.

-----
0.9.5
-----

* `Python #17980 <http://bugs.python.org/issue17980>`_: Fix security vulnerability in SSL certificate validation.

-----
0.9.4
-----

* `Issue #43 <https://bitbucket.org/pypa/setuptools/issue/43>`_: Fix issue (introduced in 0.9.1) with version resolution when
  upgrading over other releases of Setuptools.

-----
0.9.3
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix new ``AttributeError`` introduced in last fix.

-----
0.9.2
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix regression where blank checksums would trigger an
  ``AttributeError``.

-----
0.9.1
-----

* `Distribute #386 <https://bitbucket.org/tarek/distribute/issue/386>`_: Allow other positional and keyword arguments to os.open.
* Corrected dependency on certifi mis-referenced in 0.9.

---
0.9
---

* `package_index` now validates hashes other than MD5 in download links.

---
0.8
---

* Code base now runs on Python 2.4 - Python 3.3 without Python 2to3
  conversion.

-----
0.7.8
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Yet another fix for yet another regression.

-----
0.7.7
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release (redo).
* `Issue #30 <https://bitbucket.org/pypa/setuptools/issue/30>`_: Added test for get_cache_path.

-----
0.7.6
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release.

-----
0.7.5
-----

* `Issue #21 <https://bitbucket.org/pypa/setuptools/issue/21>`_: Restore Python 2.4 compatibility in ``test_easy_install``.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Merged additional warning from Distribute 0.6.46.
* Now honor the environment variable
  ``SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT`` in addition to the now
  deprecated ``DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT``.

-----
0.7.4
-----

* `Issue #20 <https://bitbucket.org/pypa/setuptools/issue/20>`_: Fix comparison of parsed SVN version on Python 3.

-----
0.7.3
-----

* `Issue #1 <https://bitbucket.org/pypa/setuptools/issue/1>`_: Disable installation of Windows-specific files on non-Windows systems.
* Use new sysconfig module with Python 2.7 or >=3.2.

-----
0.7.2
-----

* `Issue #14 <https://bitbucket.org/pypa/setuptools/issue/14>`_: Use markerlib when the `parser` module is not available.
* `Issue #10 <https://bitbucket.org/pypa/setuptools/issue/10>`_: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI.

-----
0.7.1
-----

* Fix NameError (`Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_) again - broken in bad merge.

---
0.7
---

* Merged Setuptools and Distribute. See docs/merge.txt for details.

Added several features that were slated for setuptools 0.6c12:

* Index URL now defaults to HTTPS.
* Added experimental environment marker support. Now clients may designate a
  PEP-426 environment marker for "extra" dependencies. Setuptools uses this
  feature in ``setup.py`` for optional SSL and certificate validation support
  on older platforms. Based on Distutils-SIG discussions, the syntax is
  somewhat tentative. There should probably be a PEP with a firmer spec before
  the feature should be considered suitable for use.
* Added support for SSL certificate validation when installing packages from
  an HTTPS service.

-----
0.7b4
-----

* `Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_: Fixed NameError in SSL support.

------
0.6.49
------

* Move warning check in ``get_cache_path`` to follow the directory creation
  to avoid errors when the cache path does not yet exist. Fixes the error
  reported in `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_.

------
0.6.48
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46 (redo).

------
0.6.47
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46.

------
0.6.46
------

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Issue a warning if the PYTHON_EGG_CACHE or otherwise
  customized egg cache location specifies a directory that's group- or
  world-writable.

------
0.6.45
------

* `Distribute #379 <https://bitbucket.org/tarek/distribute/issue/379>`_: ``distribute_setup.py`` now traps VersionConflict as well,
  restoring ability to upgrade from an older setuptools version.

------
0.6.44
------

* ``distribute_setup.py`` has been updated to allow Setuptools 0.7 to
  satisfy use_setuptools.

------
0.6.43
------

* `Distribute #378 <https://bitbucket.org/tarek/distribute/issue/378>`_: Restore support for Python 2.4 Syntax (regression in 0.6.42).

------
0.6.42
------

* External links finder no longer yields duplicate links.
* `Distribute #337 <https://bitbucket.org/tarek/distribute/issue/337>`_: Moved site.py to setuptools/site-patch.py (graft of very old
  patch from setuptools trunk which inspired PR `#31 <https://bitbucket.org/pypa/setuptools/issue/31>`_).

------
0.6.41
------

* `Distribute #27 <https://bitbucket.org/tarek/distribute/issue/27>`_: Use public api for loading resources from zip files rather than
  the private method `_zip_directory_cache`.
* Added a new function ``easy_install.get_win_launcher`` which may be used by
  third-party libraries such as buildout to get a suitable script launcher.

------
0.6.40
------

* `Distribute #376 <https://bitbucket.org/tarek/distribute/issue/376>`_: brought back cli.exe and gui.exe that were deleted in the
  previous release.

------
0.6.39
------

* Add support for console launchers on ARM platforms.
* Fix possible issue in GUI launchers where the subsystem was not supplied to
  the linker.
* Launcher build script now refactored for robustness.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Resources extracted from a zip egg to the file system now also
  check the contents of the file against the zip contents during each
  invocation of get_resource_filename.

------
0.6.38
------

* `Distribute #371 <https://bitbucket.org/tarek/distribute/issue/371>`_: The launcher manifest file is now installed properly.

------
0.6.37
------

* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Launcher scripts, including easy_install itself, are now
  accompanied by a manifest on 32-bit Windows environments to avoid the
  Installer Detection Technology and thus undesirable UAC elevation described
  in `this Microsoft article
  <http://technet.microsoft.com/en-us/library/cc709628%28WS.10%29.aspx>`_.

------
0.6.36
------

* `Pull Request #35 <https://bitbucket.org/pypa/setuptools/pull-request/35>`_: In `Buildout #64 <https://github.com/buildout/buildout/issues/64>`_, it was reported that
  under Python 3, installation of distutils scripts could attempt to copy
  the ``__pycache__`` directory as a file, causing an error, apparently only
  under Windows. Easy_install now skips all directories when processing
  metadata scripts.

------
0.6.35
------


Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in
how it parses version numbers.

* `Distribute #278 <https://bitbucket.org/tarek/distribute/issue/278>`_: Restored compatibility with distribute 0.6.22 and setuptools
  0.6. Updated the documentation to match more closely with the version
  parsing as intended in setuptools 0.6.

------
0.6.34
------

* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: 0.6.33 fails to build under Python 2.4.

------
0.6.33
------

* Fix 2 errors with Jython 2.5.
* Fix 1 failure with Jython 2.5 and 2.7.
* Disable workaround for Jython scripts on Linux systems.
* `Distribute #336 <https://bitbucket.org/tarek/distribute/issue/336>`_: `setup.py` no longer masks failure exit code when tests fail.
* Fix issue in pkg_resources where try/except around a platform-dependent
  import would trigger hook load failures on Mercurial. See pull request 32
  for details.
* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: Fix a ResourceWarning.

------
0.6.32
------

* Fix test suite with Python 2.6.
* Fix some DeprecationWarnings and ResourceWarnings.
* `Distribute #335 <https://bitbucket.org/tarek/distribute/issue/335>`_: Backed out `setup_requires` superceding installed requirements
  until regression can be addressed.

------
0.6.31
------

* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Make sure the manifest only ever contains UTF-8 in Python 3.
* `Distribute #329 <https://bitbucket.org/tarek/distribute/issue/329>`_: Properly close files created by tests for compatibility with
  Jython.
* Work around `Jython #1980 <http://bugs.jython.org/issue1980>`_ and `Jython #1981 <http://bugs.jython.org/issue1981>`_.
* `Distribute #334 <https://bitbucket.org/tarek/distribute/issue/334>`_: Provide workaround for packages that reference `sys.__stdout__`
  such as numpy does. This change should address
  `virtualenv `#359 <https://bitbucket.org/pypa/setuptools/issue/359>`_ <https://github.com/pypa/virtualenv/issues/359>`_ as long
  as the system encoding is UTF-8 or the IO encoding is specified in the
  environment, i.e.::

     PYTHONIOENCODING=utf8 pip install numpy

* Fix for encoding issue when installing from Windows executable on Python 3.
* `Distribute #323 <https://bitbucket.org/tarek/distribute/issue/323>`_: Allow `setup_requires` requirements to supercede installed
  requirements. Added some new keyword arguments to existing pkg_resources
  methods. Also had to updated how __path__ is handled for namespace packages
  to ensure that when a new egg distribution containing a namespace package is
  placed on sys.path, the entries in __path__ are found in the same order they
  would have been in had that egg been on the path when pkg_resources was
  first imported.

------
0.6.30
------

* `Distribute #328 <https://bitbucket.org/tarek/distribute/issue/328>`_: Clean up temporary directories in distribute_setup.py.
* Fix fatal bug in distribute_setup.py.

------
0.6.29
------

* `Pull Request #14 <https://bitbucket.org/pypa/setuptools/pull-request/14>`_: Honor file permissions in zip files.
* `Distribute #327 <https://bitbucket.org/tarek/distribute/issue/327>`_: Merged pull request `#24 <https://bitbucket.org/pypa/setuptools/issue/24>`_ to fix a dependency problem with pip.
* Merged pull request `#23 <https://bitbucket.org/pypa/setuptools/issue/23>`_ to fix https://github.com/pypa/virtualenv/issues/301.
* If Sphinx is installed, the `upload_docs` command now runs `build_sphinx`
  to produce uploadable documentation.
* `Distribute #326 <https://bitbucket.org/tarek/distribute/issue/326>`_: `upload_docs` provided mangled auth credentials under Python 3.
* `Distribute #320 <https://bitbucket.org/tarek/distribute/issue/320>`_: Fix check for "createable" in distribute_setup.py.
* `Distribute #305 <https://bitbucket.org/tarek/distribute/issue/305>`_: Remove a warning that was triggered during normal operations.
* `Distribute #311 <https://bitbucket.org/tarek/distribute/issue/311>`_: Print metadata in UTF-8 independent of platform.
* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Read manifest file with UTF-8 encoding under Python 3.
* `Distribute #301 <https://bitbucket.org/tarek/distribute/issue/301>`_: Allow to run tests of namespace packages when using 2to3.
* `Distribute #304 <https://bitbucket.org/tarek/distribute/issue/304>`_: Prevent import loop in site.py under Python 3.3.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3.
* `Distribute #299 <https://bitbucket.org/tarek/distribute/issue/299>`_: The develop command didn't work on Python 3, when using 2to3,
  as the egg link would go to the Python 2 source. Linking to the 2to3'd code
  in build/lib makes it work, although you will have to rebuild the module
  before testing it.
* `Distribute #306 <https://bitbucket.org/tarek/distribute/issue/306>`_: Even if 2to3 is used, we build in-place under Python 2.
* `Distribute #307 <https://bitbucket.org/tarek/distribute/issue/307>`_: Prints the full path when .svn/entries is broken.
* `Distribute #313 <https://bitbucket.org/tarek/distribute/issue/313>`_: Support for sdist subcommands (Python 2.7)
* `Distribute #314 <https://bitbucket.org/tarek/distribute/issue/314>`_: test_local_index() would fail an OS X.
* `Distribute #310 <https://bitbucket.org/tarek/distribute/issue/310>`_: Non-ascii characters in a namespace __init__.py causes errors.
* `Distribute #218 <https://bitbucket.org/tarek/distribute/issue/218>`_: Improved documentation on behavior of `package_data` and
  `include_package_data`. Files indicated by `package_data` are now included
  in the manifest.
* `distribute_setup.py` now allows a `--download-base` argument for retrieving
  distribute from a specified location.

------
0.6.28
------

* `Distribute #294 <https://bitbucket.org/tarek/distribute/issue/294>`_: setup.py can now be invoked from any directory.
* Scripts are now installed honoring the umask.
* Added support for .dist-info directories.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Fix and disable scanning of `*.pyc` / `*.pyo` files on
  Python 3.3.

------
0.6.27
------

* Support current snapshots of CPython 3.3.
* Distribute now recognizes README.rst as a standard, default readme file.
* Exclude 'encodings' modules when removing modules from sys.modules.
  Workaround for `#285 <https://bitbucket.org/pypa/setuptools/issue/285>`_.
* `Distribute #231 <https://bitbucket.org/tarek/distribute/issue/231>`_: Don't fiddle with system python when used with buildout
  (bootstrap.py)

------
0.6.26
------

* `Distribute #183 <https://bitbucket.org/tarek/distribute/issue/183>`_: Symlinked files are now extracted from source distributions.
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: Easy_install fetch parameters are now passed during the
  installation of a source distribution; now fulfillment of setup_requires
  dependencies will honor the parameters passed to easy_install.

------
0.6.25
------

* `Distribute #258 <https://bitbucket.org/tarek/distribute/issue/258>`_: Workaround a cache issue
* `Distribute #260 <https://bitbucket.org/tarek/distribute/issue/260>`_: distribute_setup.py now accepts the --user parameter for
  Python 2.6 and later.
* `Distribute #262 <https://bitbucket.org/tarek/distribute/issue/262>`_: package_index.open_with_auth no longer throws LookupError
  on Python 3.
* `Distribute #269 <https://bitbucket.org/tarek/distribute/issue/269>`_: AttributeError when an exception occurs reading Manifest.in
  on late releases of Python.
* `Distribute #272 <https://bitbucket.org/tarek/distribute/issue/272>`_: Prevent TypeError when namespace package names are unicode
  and single-install-externally-managed is used. Also fixes PIP issue
  449.
* `Distribute #273 <https://bitbucket.org/tarek/distribute/issue/273>`_: Legacy script launchers now install with Python2/3 support.

------
0.6.24
------

* `Distribute #249 <https://bitbucket.org/tarek/distribute/issue/249>`_: Added options to exclude 2to3 fixers

------
0.6.23
------

* `Distribute #244 <https://bitbucket.org/tarek/distribute/issue/244>`_: Fixed a test
* `Distribute #243 <https://bitbucket.org/tarek/distribute/issue/243>`_: Fixed a test
* `Distribute #239 <https://bitbucket.org/tarek/distribute/issue/239>`_: Fixed a test
* `Distribute #240 <https://bitbucket.org/tarek/distribute/issue/240>`_: Fixed a test
* `Distribute #241 <https://bitbucket.org/tarek/distribute/issue/241>`_: Fixed a test
* `Distribute #237 <https://bitbucket.org/tarek/distribute/issue/237>`_: Fixed a test
* `Distribute #238 <https://bitbucket.org/tarek/distribute/issue/238>`_: easy_install now uses 64bit executable wrappers on 64bit Python
* `Distribute #208 <https://bitbucket.org/tarek/distribute/issue/208>`_: Fixed parsed_versions, it now honors post-releases as noted in the documentation
* `Distribute #207 <https://bitbucket.org/tarek/distribute/issue/207>`_: Windows cli and gui wrappers pass CTRL-C to child python process
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: easy_install now passes its arguments to setup.py bdist_egg
* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: Fixed a NameError on Python 2.5, 2.4

------
0.6.21
------

* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: FIxed a regression on py2.4

------
0.6.20
------

* `Distribute #135 <https://bitbucket.org/tarek/distribute/issue/135>`_: Include url in warning when processing URLs in package_index.
* `Distribute #212 <https://bitbucket.org/tarek/distribute/issue/212>`_: Fix issue where easy_instal fails on Python 3 on windows installer.
* `Distribute #213 <https://bitbucket.org/tarek/distribute/issue/213>`_: Fix typo in documentation.

------
0.6.19
------

* `Distribute #206 <https://bitbucket.org/tarek/distribute/issue/206>`_: AttributeError: 'HTTPMessage' object has no attribute 'getheaders'

------
0.6.18
------

* `Distribute #210 <https://bitbucket.org/tarek/distribute/issue/210>`_: Fixed a regression introduced by `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_ fix.

------
0.6.17
------

* Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment
  variable to allow to disable installation of easy_install-${version} script.
* Support Python >=3.1.4 and >=3.2.1.
* `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_: Don't try to import the parent of a namespace package in
  declare_namespace
* `Distribute #196 <https://bitbucket.org/tarek/distribute/issue/196>`_: Tolerate responses with multiple Content-Length headers
* `Distribute #205 <https://bitbucket.org/tarek/distribute/issue/205>`_: Sandboxing doesn't preserve working_set. Leads to setup_requires
  problems.

------
0.6.16
------

* Builds sdist gztar even on Windows (avoiding `Distribute #193 <https://bitbucket.org/tarek/distribute/issue/193>`_).
* `Distribute #192 <https://bitbucket.org/tarek/distribute/issue/192>`_: Fixed metadata omitted on Windows when package_dir
  specified with forward-slash.
* `Distribute #195 <https://bitbucket.org/tarek/distribute/issue/195>`_: Cython build support.
* `Distribute #200 <https://bitbucket.org/tarek/distribute/issue/200>`_: Issues with recognizing 64-bit packages on Windows.

------
0.6.15
------

* Fixed typo in bdist_egg
* Several issues under Python 3 has been solved.
* `Distribute #146 <https://bitbucket.org/tarek/distribute/issue/146>`_: Fixed missing DLL files after easy_install of windows exe package.

------
0.6.14
------

* `Distribute #170 <https://bitbucket.org/tarek/distribute/issue/170>`_: Fixed unittest failure. Thanks to Toshio.
* `Distribute #171 <https://bitbucket.org/tarek/distribute/issue/171>`_: Fixed race condition in unittests cause deadlocks in test suite.
* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Fixed a lookup issue with easy_install.
  Thanks to David and Zooko.
* `Distribute #174 <https://bitbucket.org/tarek/distribute/issue/174>`_: Fixed the edit mode when its used with setuptools itself

------
0.6.13
------

* `Distribute #160 <https://bitbucket.org/tarek/distribute/issue/160>`_: 2.7 gives ValueError("Invalid IPv6 URL")
* `Distribute #150 <https://bitbucket.org/tarek/distribute/issue/150>`_: Fixed using ~/.local even in a --no-site-packages virtualenv
* `Distribute #163 <https://bitbucket.org/tarek/distribute/issue/163>`_: scan index links before external links, and don't use the md5 when
  comparing two distributions

------
0.6.12
------

* `Distribute #149 <https://bitbucket.org/tarek/distribute/issue/149>`_: Fixed various failures on 2.3/2.4

------
0.6.11
------

* Found another case of SandboxViolation - fixed
* `Distribute #15 <https://bitbucket.org/tarek/distribute/issue/15>`_ and `Distribute #48 <https://bitbucket.org/tarek/distribute/issue/48>`_: Introduced a socket timeout of 15 seconds on url openings
* Added indexsidebar.html into MANIFEST.in
* `Distribute #108 <https://bitbucket.org/tarek/distribute/issue/108>`_: Fixed TypeError with Python3.1
* `Distribute #121 <https://bitbucket.org/tarek/distribute/issue/121>`_: Fixed --help install command trying to actually install.
* `Distribute #112 <https://bitbucket.org/tarek/distribute/issue/112>`_: Added an os.makedirs so that Tarek's solution will work.
* `Distribute #133 <https://bitbucket.org/tarek/distribute/issue/133>`_: Added --no-find-links to easy_install
* Added easy_install --user
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: Fixed develop --user not taking '.' in PYTHONPATH into account
* `Distribute #134 <https://bitbucket.org/tarek/distribute/issue/134>`_: removed spurious UserWarnings. Patch by VanLindberg
* `Distribute #138 <https://bitbucket.org/tarek/distribute/issue/138>`_: cant_write_to_target error when setup_requires is used.
* `Distribute #147 <https://bitbucket.org/tarek/distribute/issue/147>`_: respect the sys.dont_write_bytecode flag

------
0.6.10
------

* Reverted change made for the DistributionNotFound exception because
  zc.buildout uses the exception message to get the name of the
  distribution.

-----
0.6.9
-----

* `Distribute #90 <https://bitbucket.org/tarek/distribute/issue/90>`_: unknown setuptools version can be added in the working set
* `Distribute #87 <https://bitbucket.org/tarek/distribute/issue/87>`_: setupt.py doesn't try to convert distribute_setup.py anymore
  Initial Patch by arfrever.
* `Distribute #89 <https://bitbucket.org/tarek/distribute/issue/89>`_: added a side bar with a download link to the doc.
* `Distribute #86 <https://bitbucket.org/tarek/distribute/issue/86>`_: fixed missing sentence in pkg_resources doc.
* Added a nicer error message when a DistributionNotFound is raised.
* `Distribute #80 <https://bitbucket.org/tarek/distribute/issue/80>`_: test_develop now works with Python 3.1
* `Distribute #93 <https://bitbucket.org/tarek/distribute/issue/93>`_: upload_docs now works if there is an empty sub-directory.
* `Distribute #70 <https://bitbucket.org/tarek/distribute/issue/70>`_: exec bit on non-exec files
* `Distribute #99 <https://bitbucket.org/tarek/distribute/issue/99>`_: now the standalone easy_install command doesn't uses a
  "setup.cfg" if any exists in the working directory. It will use it
  only if triggered by ``install_requires`` from a setup.py call
  (install, develop, etc).
* `Distribute #101 <https://bitbucket.org/tarek/distribute/issue/101>`_: Allowing ``os.devnull`` in Sandbox
* `Distribute #92 <https://bitbucket.org/tarek/distribute/issue/92>`_: Fixed the "no eggs" found error with MacPort
  (platform.mac_ver() fails)
* `Distribute #103 <https://bitbucket.org/tarek/distribute/issue/103>`_: test_get_script_header_jython_workaround not run
  anymore under py3 with C or POSIX local. Contributed by Arfrever.
* `Distribute #104 <https://bitbucket.org/tarek/distribute/issue/104>`_: remvoved the assertion when the installation fails,
  with a nicer message for the end user.
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: making sure there's no SandboxViolation when
  the setup script patches setuptools.

-----
0.6.8
-----

* Added "check_packages" in dist. (added in Setuptools 0.6c11)
* Fixed the DONT_PATCH_SETUPTOOLS state.

-----
0.6.7
-----

* `Distribute #58 <https://bitbucket.org/tarek/distribute/issue/58>`_: Added --user support to the develop command
* `Distribute #11 <https://bitbucket.org/tarek/distribute/issue/11>`_: Generated scripts now wrap their call to the script entry point
  in the standard "if name == 'main'"
* Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv
  can drive an installation that doesn't patch a global setuptools.
* Reviewed unladen-swallow specific change from
  http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719
  and determined that it no longer applies. Distribute should work fine with
  Unladen Swallow 2009Q3.
* `Distribute #21 <https://bitbucket.org/tarek/distribute/issue/21>`_: Allow PackageIndex.open_url to gracefully handle all cases of a
  httplib.HTTPException instead of just InvalidURL and BadStatusLine.
* Removed virtual-python.py from this distribution and updated documentation
  to point to the actively maintained virtualenv instead.
* `Distribute #64 <https://bitbucket.org/tarek/distribute/issue/64>`_: use_setuptools no longer rebuilds the distribute egg every
  time it is run
* use_setuptools now properly respects the requested version
* use_setuptools will no longer try to import a distribute egg for the
  wrong Python version
* `Distribute #74 <https://bitbucket.org/tarek/distribute/issue/74>`_: no_fake should be True by default.
* `Distribute #72 <https://bitbucket.org/tarek/distribute/issue/72>`_: avoid a bootstrapping issue with easy_install -U

-----
0.6.6
-----

* Unified the bootstrap file so it works on both py2.x and py3k without 2to3
  (patch by Holger Krekel)

-----
0.6.5
-----

* `Distribute #65 <https://bitbucket.org/tarek/distribute/issue/65>`_: cli.exe and gui.exe are now generated at build time,
  depending on the platform in use.

* `Distribute #67 <https://bitbucket.org/tarek/distribute/issue/67>`_: Fixed doc typo (PEP 381/382)

* Distribute no longer shadows setuptools if we require a 0.7-series
  setuptools.  And an error is raised when installing a 0.7 setuptools with
  distribute.

* When run from within buildout, no attempt is made to modify an existing
  setuptools egg, whether in a shared egg directory or a system setuptools.

* Fixed a hole in sandboxing allowing builtin file to write outside of
  the sandbox.

-----
0.6.4
-----

* Added the generation of `distribute_setup_3k.py` during the release.
  This closes `Distribute #52 <https://bitbucket.org/tarek/distribute/issue/52>`_.

* Added an upload_docs command to easily upload project documentation to
  PyPI's https://pythonhosted.org. This close issue `Distribute #56 <https://bitbucket.org/tarek/distribute/issue/56>`_.

* Fixed a bootstrap bug on the use_setuptools() API.

-----
0.6.3
-----

setuptools
==========

* Fixed a bunch of calls to file() that caused crashes on Python 3.

bootstrapping
=============

* Fixed a bug in sorting that caused bootstrap to fail on Python 3.

-----
0.6.2
-----

setuptools
==========

* Added Python 3 support; see docs/python3.txt.
  This closes `Old Setuptools #39 <http://bugs.python.org/setuptools/issue39>`_.

* Added option to run 2to3 automatically when installing on Python 3.
  This closes issue `Distribute #31 <https://bitbucket.org/tarek/distribute/issue/31>`_.

* Fixed invalid usage of requirement.parse, that broke develop -d.
  This closes `Old Setuptools #44 <http://bugs.python.org/setuptools/issue44>`_.

* Fixed script launcher for 64-bit Windows.
  This closes `Old Setuptools #2 <http://bugs.python.org/setuptools/issue2>`_.

* KeyError when compiling extensions.
  This closes `Old Setuptools #41 <http://bugs.python.org/setuptools/issue41>`_.

bootstrapping
=============

* Fixed bootstrap not working on Windows. This closes issue `Distribute #49 <https://bitbucket.org/tarek/distribute/issue/49>`_.

* Fixed 2.6 dependencies. This closes issue `Distribute #50 <https://bitbucket.org/tarek/distribute/issue/50>`_.

* Make sure setuptools is patched when running through easy_install
  This closes `Old Setuptools #40 <http://bugs.python.org/setuptools/issue40>`_.

-----
0.6.1
-----

setuptools
==========

* package_index.urlopen now catches BadStatusLine and malformed url errors.
  This closes `Distribute #16 <https://bitbucket.org/tarek/distribute/issue/16>`_ and `Distribute #18 <https://bitbucket.org/tarek/distribute/issue/18>`_.

* zip_ok is now False by default. This closes `Old Setuptools #33 <http://bugs.python.org/setuptools/issue33>`_.

* Fixed invalid URL error catching. `Old Setuptools #20 <http://bugs.python.org/setuptools/issue20>`_.

* Fixed invalid bootstraping with easy_install installation (`Distribute #40 <https://bitbucket.org/tarek/distribute/issue/40>`_).
  Thanks to Florian Schulze for the help.

* Removed buildout/bootstrap.py. A new repository will create a specific
  bootstrap.py script.


bootstrapping
=============

* The boostrap process leave setuptools alone if detected in the system
  and --root or --prefix is provided, but is not in the same location.
  This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

---
0.6
---

setuptools
==========

* Packages required at build time where not fully present at install time.
  This closes `Distribute #12 <https://bitbucket.org/tarek/distribute/issue/12>`_.

* Protected against failures in tarfile extraction. This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

* Made Jython api_tests.txt doctest compatible. This closes `Distribute #7 <https://bitbucket.org/tarek/distribute/issue/7>`_.

* sandbox.py replaced builtin type file with builtin function open. This
  closes `Distribute #6 <https://bitbucket.org/tarek/distribute/issue/6>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

* Added compatibility with Subversion 1.6. This references `Distribute #1 <https://bitbucket.org/tarek/distribute/issue/1>`_.

pkg_resources
=============

* Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API
  instead. Based on a patch from ronaldoussoren. This closes issue `#5 <https://bitbucket.org/pypa/setuptools/issue/5>`_.

* Fixed a SandboxViolation for mkdir that could occur in certain cases.
  This closes `Distribute #13 <https://bitbucket.org/tarek/distribute/issue/13>`_.

* Allow to find_on_path on systems with tight permissions to fail gracefully.
  This closes `Distribute #9 <https://bitbucket.org/tarek/distribute/issue/9>`_.

* Corrected inconsistency between documentation and code of add_entry.
  This closes `Distribute #8 <https://bitbucket.org/tarek/distribute/issue/8>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

easy_install
============

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

-----
0.6c9
-----

 * Fixed a missing files problem when using Windows source distributions on
   non-Windows platforms, due to distutils not handling manifest file line
   endings correctly.

 * Updated Pyrex support to work with Pyrex 0.9.6 and higher.

 * Minor changes for Jython compatibility, including skipping tests that can't
   work on Jython.

 * Fixed not installing eggs in ``install_requires`` if they were also used for
   ``setup_requires`` or ``tests_require``.

 * Fixed not fetching eggs in ``install_requires`` when running tests.

 * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools
   installations when called from a standalone ``setup.py``.

 * Added a warning if a namespace package is declared, but its parent package
   is not also declared as a namespace.

 * Support Subversion 1.5

 * Removed use of deprecated ``md5`` module if ``hashlib`` is available

 * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice

 * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's
   ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``.

 * Ensure that _full_name is set on all shared libs before extensions are
   checked for shared lib usage.  (Fixes a bug in the experimental shared
   library build support.)

 * Fix to allow unpacked eggs containing native libraries to fail more
   gracefully under Google App Engine (with an ``ImportError`` loading the
   C-based module, instead of getting a ``NameError``).

-----
0.6c7
-----

 * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and
   ``egg_info`` command failing on new, uncommitted SVN directories.

 * Fix import problems with nested namespace packages installed via
   ``--root`` or ``--single-version-externally-managed``, due to the
   parent package not having the child package as an attribute.

-----
0.6c6
-----

 * Added ``--egg-path`` option to ``develop`` command, allowing you to force
   ``.egg-link`` files to use relative paths (allowing them to be shared across
   platforms on a networked drive).

 * Fix not building binary RPMs correctly.

 * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with
   bash-compatible shells.

 * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there
   was whitespace inside a quoted argument or at the end of the ``#!`` line
   (a regression introduced in 0.6c4).

 * Fix ``test`` command possibly failing if an older version of the project
   being tested was installed on ``sys.path`` ahead of the test source
   directory.

 * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in
   their names as packages.

-----
0.6c5
-----

 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg``
   packages under Python versions less than 2.5.

 * Fix uploaded ``bdist_wininst`` packages being described as suitable for
   "any" version by Python 2.5, even if a ``--target-version`` was specified.

-----
0.6c4
-----

 * Overhauled Windows script wrapping to support ``bdist_wininst`` better.
   Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or
   ``#!pythonw.exe`` as the executable name (even when built on non-Windows
   platforms!), and the wrappers will look for the executable in the script's
   parent directory (which should find the right version of Python).

 * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or
   ``bdist_wininst`` under Python 2.3 and 2.4.

 * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is
   prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish
   platforms.  (This is mainly so that setuptools itself can have a single-file
   installer on Unix, without doing multiple downloads, dealing with firewalls,
   etc.)

 * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files

 * Use cross-platform relative paths in ``easy-install.pth`` when doing
   ``develop`` and the source directory is a subdirectory of the installation
   target directory.

 * Fix a problem installing eggs with a system packaging tool if the project
   contained an implicit namespace package; for example if the ``setup()``
   listed a namespace package ``foo.bar`` without explicitly listing ``foo``
   as a namespace package.

-----
0.6c3
-----

 * Fixed breakages caused by Subversion 1.4's new "working copy" format

-----
0.6c2
-----

 * The ``ez_setup`` module displays the conflicting version of setuptools (and
   its installation location) when a script requests a version that's not
   available.

 * Running ``setup.py develop`` on a setuptools-using project will now install
   setuptools if needed, instead of only downloading the egg.

-----
0.6c1
-----

 * Fixed ``AttributeError`` when trying to download a ``setup_requires``
   dependency when a distribution lacks a ``dependency_links`` setting.

 * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so
   as to play better with packaging tools that complain about zero-length
   files.

 * Made ``setup.py develop`` respect the ``--no-deps`` option, which it
   previously was ignoring.

 * Support ``extra_path`` option to ``setup()`` when ``install`` is run in
   backward-compatibility mode.

 * Source distributions now always include a ``setup.cfg`` file that explicitly
   sets ``egg_info`` options such that they produce an identical version number
   to the source distribution's version number.  (Previously, the default
   version number could be different due to the use of ``--tag-date``, or if
   the version was overridden on the command line that built the source
   distribution.)

-----
0.6b4
-----

 * Fix ``register`` not obeying name/version set by ``egg_info`` command, if
   ``egg_info`` wasn't explicitly run first on the same command line.

 * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info``
   command, to allow suppressing tags configured in ``setup.cfg``.

 * Fixed redundant warnings about missing ``README`` file(s); it should now
   appear only if you are actually a source distribution.

-----
0.6b3
-----

 * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``.

 * Allow ``.py`` files found by the ``include_package_data`` option to be
   automatically included.  Remove duplicate data file matches if both
   ``include_package_data`` and ``package_data`` are used to refer to the same
   files.

-----
0.6b1
-----

 * Strip ``module`` from the end of compiled extension modules when computing
   the name of a ``.py`` loader/wrapper.  (Python's import machinery ignores
   this suffix when searching for an extension module.)

------
0.6a11
------

 * Added ``test_loader`` keyword to support custom test loaders

 * Added ``setuptools.file_finders`` entry point group to allow implementing
   revision control plugins.

 * Added ``--identity`` option to ``upload`` command.

 * Added ``dependency_links`` to allow specifying URLs for ``--find-links``.

 * Enhanced test loader to scan packages as well as modules, and call
   ``additional_tests()`` if present to get non-unittest tests.

 * Support namespace packages in conjunction with system packagers, by omitting
   the installation of any ``__init__.py`` files for namespace packages, and
   adding a special ``.pth`` file to create a working package in
   ``sys.modules``.

 * Made ``--single-version-externally-managed`` automatic when ``--root`` is
   used, so that most system packagers won't require special support for
   setuptools.

 * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or
   other configuration files for their option defaults when installing, and
   also made the install use ``--multi-version`` mode so that the project
   directory doesn't need to support .pth files.

 * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading
   it.  Previously, the file could be left open and the actual error would be
   masked by problems trying to remove the open file on Windows systems.

------
0.6a10
------

 * Fixed the ``develop`` command ignoring ``--find-links``.

-----
0.6a9
-----

 * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to
   create source distributions.  ``MANIFEST.in`` is still read and processed,
   as are the standard defaults and pruning.  But the manifest is built inside
   the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt
   every time the ``egg_info`` command is run.

 * Added the ``include_package_data`` keyword to ``setup()``, allowing you to
   automatically include any package data listed in revision control or
   ``MANIFEST.in``

 * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to
   trim back files included via the ``package_data`` and
   ``include_package_data`` options.

 * Fixed ``--tag-svn-revision`` not working when run from a source
   distribution.

 * Added warning for namespace packages with missing ``declare_namespace()``

 * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages
   requiring ``nose`` to run unit tests can make this dependency optional
   unless the ``test`` command is run.

 * Made all commands that use ``easy_install`` respect its configuration
   options, as this was causing some problems with ``setup.py install``.

 * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so
   that you can process a directory tree through a processing filter as if it
   were a zipfile or tarfile.

 * Added an internal ``install_egg_info`` command to use as part of old-style
   ``install`` operations, that installs an ``.egg-info`` directory with the
   package.

 * Added a ``--single-version-externally-managed`` option to the ``install``
   command so that you can more easily wrap a "flat" egg in a system package.

 * Enhanced ``bdist_rpm`` so that it installs single-version eggs that
   don't rely on a ``.pth`` file.  The ``--no-egg`` option has been removed,
   since all RPMs are now built in a more backwards-compatible format.

 * Support full roundtrip translation of eggs to and from ``bdist_wininst``
   format.  Running ``bdist_wininst`` on a setuptools-based package wraps the
   egg in an .exe that will safely install it as an egg (i.e., with metadata
   and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
   back into an ``.egg`` file or directory and install it as such.


-----
0.6a8
-----

 * Fixed some problems building extensions when Pyrex was installed, especially
   with Python 2.4 and/or packages using SWIG.

 * Made ``develop`` command accept all the same options as ``easy_install``,
   and use the ``easy_install`` command's configuration settings as defaults.

 * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision
   number from ``PKG-INFO`` in case it is being run on a source distribution of
   a snapshot taken from a Subversion-based project.

 * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being
   installed as data, adding them to ``native_libs.txt`` automatically.

 * Fixed some problems with fresh checkouts of projects that don't include
   ``.egg-info/PKG-INFO`` under revision control and put the project's source
   code directly in the project directory.  If such a package had any
   requirements that get processed before the ``egg_info`` command can be run,
   the setup scripts would fail with a "Missing 'Version:' header and/or
   PKG-INFO file" error, because the egg runtime interpreted the unbuilt
   metadata in a directory on ``sys.path`` (i.e. the current directory) as
   being a corrupted egg.  Setuptools now monkeypatches the distribution
   metadata cache to pretend that the egg has valid version information, until
   it has a chance to make it actually be so (via the ``egg_info`` command).

-----
0.6a5
-----

 * Fixed missing gui/cli .exe files in distribution.  Fixed bugs in tests.

-----
0.6a3
-----

 * Added ``gui_scripts`` entry point group to allow installing GUI scripts
   on Windows and other platforms.  (The special handling is only for Windows;
   other platforms are treated the same as for ``console_scripts``.)

-----
0.6a2
-----

 * Added ``console_scripts`` entry point group to allow installing scripts
   without the need to create separate script files.  On Windows, console
   scripts get an ``.exe`` wrapper so you can just type their name.  On other
   platforms, the scripts are written without a file extension.

-----
0.6a1
-----

 * Added support for building "old-style" RPMs that don't install an egg for
   the target package, using a ``--no-egg`` option.

 * The ``build_ext`` command now works better when using the ``--inplace``
   option and multiple Python versions.  It now makes sure that all extensions
   match the current Python version, even if newer copies were built for a
   different Python version.

 * The ``upload`` command no longer attaches an extra ``.zip`` when uploading
   eggs, as PyPI now supports egg uploads without trickery.

 * The ``ez_setup`` script/module now displays a warning before downloading
   the setuptools egg, and attempts to check the downloaded egg against an
   internal MD5 checksum table.

 * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the
   latest revision number; it was using the revision number of the directory
   containing ``setup.py``, not the highest revision number in the project.

 * Added ``eager_resources`` setup argument

 * The ``sdist`` command now recognizes Subversion "deleted file" entries and
   does not include them in source distributions.

 * ``setuptools`` now embeds itself more thoroughly into the distutils, so that
   other distutils extensions (e.g. py2exe, py2app) will subclass setuptools'
   versions of things, rather than the native distutils ones.

 * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``;
   ``setup_requires`` allows you to automatically find and download packages
   that are needed in order to *build* your project (as opposed to running it).

 * ``setuptools`` now finds its commands, ``setup()`` argument validators, and
   metadata writers using entry points, so that they can be extended by
   third-party packages.  See `Creating distutils Extensions
   <http://pythonhosted.org/setuptools/setuptools.html#creating-distutils-extensions>`_
   for more details.

 * The vestigial ``depends`` command has been removed.  It was never finished
   or documented, and never would have worked without EasyInstall - which it
   pre-dated and was never compatible with.

------
0.5a12
------

 * The zip-safety scanner now checks for modules that might be used with
   ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't
   handle ``-m`` on zipped modules.

------
0.5a11
------

 * Fix breakage of the "develop" command that was caused by the addition of
   ``--always-unzip`` to the ``easy_install`` command.

-----
0.5a9
-----

 * Include ``svn:externals`` directories in source distributions as well as
   normal subversion-controlled files and directories.

 * Added ``exclude=patternlist`` option to ``setuptools.find_packages()``

 * Changed --tag-svn-revision to include an "r" in front of the revision number
   for better readability.

 * Added ability to build eggs without including source files (except for any
   scripts, of course), using the ``--exclude-source-files`` option to
   ``bdist_egg``.

 * ``setup.py install`` now automatically detects when an "unmanaged" package
   or module is going to be on ``sys.path`` ahead of a package being installed,
   thereby preventing the newer version from being imported.  If this occurs,
   a warning message is output to ``sys.stderr``, but installation proceeds
   anyway.  The warning message informs the user what files or directories
   need deleting, and advises them they can also use EasyInstall (with the
   ``--delete-conflicting`` option) to do it automatically.

 * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata
   directory that lists all top-level modules and packages in the distribution.
   This is used by the ``easy_install`` command to find possibly-conflicting
   "unmanaged" packages when installing the distribution.

 * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``.
   Added package analysis to determine zip-safety if the ``zip_safe`` flag
   is not given, and advise the author regarding what code might need changing.

 * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``.

-----
0.5a8
-----

 * The "egg_info" command now always sets the distribution metadata to "safe"
   forms of the distribution name and version, so that distribution files will
   be generated with parseable names (i.e., ones that don't include '-' in the
   name or version).  Also, this means that if you use the various ``--tag``
   options of "egg_info", any distributions generated will use the tags in the
   version, not just egg distributions.

 * Added support for defining command aliases in distutils configuration files,
   under the "[aliases]" section.  To prevent recursion and to allow aliases to
   call the command of the same name, a given alias can be expanded only once
   per command-line invocation.  You can define new aliases with the "alias"
   command, either for the local, global, or per-user configuration.

 * Added "rotate" command to delete old distribution files, given a set of
   patterns to match and the number of files to keep.  (Keeps the most
   recently-modified distribution files matching each pattern.)

 * Added "saveopts" command that saves all command-line options for the current
   invocation to the local, global, or per-user configuration file.  Useful for
   setting defaults without having to hand-edit a configuration file.

 * Added a "setopt" command that sets a single option in a specified distutils
   configuration file.

-----
0.5a7
-----

 * Added "upload" support for egg and source distributions, including a bug
   fix for "upload" and a temporary workaround for lack of .egg support in
   PyPI.

-----
0.5a6
-----

 * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it
   will include all files under revision control (CVS or Subversion) in the
   current directory, and it will regenerate the list every time you create a
   source distribution, not just when you tell it to.  This should make the
   default "do what you mean" more often than the distutils' default behavior
   did, while still retaining the old behavior in the presence of MANIFEST.in.

 * Fixed the "develop" command always updating .pth files, even if you
   specified ``-n`` or ``--dry-run``.

 * Slightly changed the format of the generated version when you use
   ``--tag-build`` on the "egg_info" command, so that you can make tagged
   revisions compare *lower* than the version specified in setup.py (e.g. by
   using ``--tag-build=dev``).

-----
0.5a5
-----

 * Added ``develop`` command to ``setuptools``-based packages.  This command
   installs an ``.egg-link`` pointing to the package's source directory, and
   script wrappers that ``execfile()`` the source versions of the package's
   scripts.  This lets you put your development checkout(s) on sys.path without
   having to actually install them.  (To uninstall the link, use
   use ``setup.py develop --uninstall``.)

 * Added ``egg_info`` command to ``setuptools``-based packages.  This command
   just creates or updates the "projectname.egg-info" directory, without
   building an egg.  (It's used by the ``bdist_egg``, ``test``, and ``develop``
   commands.)

 * Enhanced the ``test`` command so that it doesn't install the package, but
   instead builds any C extensions in-place, updates the ``.egg-info``
   metadata, adds the source directory to ``sys.path``, and runs the tests
   directly on the source.  This avoids an "unmanaged" installation of the
   package to ``site-packages`` or elsewhere.

 * Made ``easy_install`` a standard ``setuptools`` command, moving it from
   the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
   that if you were importing or extending it, you must now change your imports
   accordingly.  ``easy_install.py`` is still installed as a script, but not as
   a module.

-----
0.5a4
-----

 * Setup scripts using setuptools can now list their dependencies directly in
   the setup.py file, without having to manually create a ``depends.txt`` file.
   The ``install_requires`` and ``extras_require`` arguments to ``setup()``
   are used to create a dependencies file automatically.  If you are manually
   creating ``depends.txt`` right now, please switch to using these setup
   arguments as soon as practical, because ``depends.txt`` support will be
   removed in the 0.6 release cycle.  For documentation on the new arguments,
   see the ``setuptools.dist.Distribution`` class.

 * Setup scripts using setuptools now always install using ``easy_install``
   internally, for ease of uninstallation and upgrading.

-----
0.5a1
-----

 * Added support for "self-installation" bootstrapping.  Packages can now
   include ``ez_setup.py`` in their source distribution, and add the following
   to their ``setup.py``, in order to automatically bootstrap installation of
   setuptools as part of their setup process::

    from ez_setup import use_setuptools
    use_setuptools()

    from setuptools import setup
    # etc...

-----
0.4a2
-----

 * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools
   installation easier, and to allow distributions using setuptools to avoid
   having to include setuptools in their source distribution.

 * All downloads are now managed by the ``PackageIndex`` class (which is now
   subclassable and replaceable), so that embedders can more easily override
   download logic, give download progress reports, etc.  The class has also
   been moved to the new ``setuptools.package_index`` module.

 * The ``Installer`` class no longer handles downloading, manages a temporary
   directory, or tracks the ``zip_ok`` option.  Downloading is now handled
   by ``PackageIndex``, and ``Installer`` has become an ``easy_install``
   command class based on ``setuptools.Command``.

 * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup
   script in a directory sandbox, and a new ``setuptools.archive_util`` module
   with an ``unpack_archive()`` API.  These were split out of EasyInstall to
   allow reuse by other tools and applications.

 * ``setuptools.Command`` now supports reinitializing commands using keyword
   arguments to set/reset options.  Also, ``Command`` subclasses can now set
   their ``command_consumes_arguments`` attribute to ``True`` in order to
   receive an ``args`` option containing the rest of the command line.

-----
0.3a2
-----

 * Added new options to ``bdist_egg`` to allow tagging the egg's version number
   with a subversion revision number, the current date, or an explicit tag
   value.  Run ``setup.py bdist_egg --help`` to get more information.

 * Misc. bug fixes

-----
0.3a1
-----

 * Initial release.


python3.3/site-packages/setuptools-2.0.dist-info/pydist.json000064400000010700151733566760017672 0ustar00{"generator": "bdist_wheel (0.22.0)", "summary": "Easily download, build, install, upgrade, and uninstall Python packages", "name": "setuptools", "license": "PSF or ZPL", "project_urls": {"Home": "https://pypi.python.org/pypi/setuptools"}, "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving :: Packaging", "Topic :: System :: Systems Administration", "Topic :: Utilities"], "metadata_version": "2.0", "contacts": [{"email": "distutils-sig@python.org", "role": "author", "name": "Python Packaging Authority"}], "keywords": "CPAN PyPI distutils eggs package management", "exports": {"egg_info.writers": {"dependency_links.txt": "setuptools.command.egg_info:overwrite_arg", "depends.txt": "setuptools.command.egg_info:warn_depends_obsolete", "top_level.txt": "setuptools.command.egg_info:write_toplevel_names", "entry_points.txt": "setuptools.command.egg_info:write_entries", "eager_resources.txt": "setuptools.command.egg_info:overwrite_arg", "requires.txt": "setuptools.command.egg_info:write_requirements", "namespace_packages.txt": "setuptools.command.egg_info:overwrite_arg", "PKG-INFO": "setuptools.command.egg_info:write_pkg_info"}, "setuptools.installation": {"eggsecutable": "setuptools.command.easy_install:bootstrap"}, "setuptools.file_finders": {"svn_cvs": "setuptools.command.sdist:_default_revctrl"}, "distutils.commands": {"build_ext": "setuptools.command.build_ext:build_ext", "egg_info": "setuptools.command.egg_info:egg_info", "easy_install": "setuptools.command.easy_install:easy_install", "bdist_rpm": "setuptools.command.bdist_rpm:bdist_rpm", "build_py": "setuptools.command.build_py:build_py", "install_scripts": "setuptools.command.install_scripts:install_scripts", "install_lib": "setuptools.command.install_lib:install_lib", "register": "setuptools.command.register:register", "develop": "setuptools.command.develop:develop", "sdist": "setuptools.command.sdist:sdist", "rotate": "setuptools.command.rotate:rotate", "alias": "setuptools.command.alias:alias", "test": "setuptools.command.test:test", "bdist_egg": "setuptools.command.bdist_egg:bdist_egg", "install": "setuptools.command.install:install", "saveopts": "setuptools.command.saveopts:saveopts", "upload_docs": "setuptools.command.upload_docs:upload_docs", "setopt": "setuptools.command.setopt:setopt", "install_egg_info": "setuptools.command.install_egg_info:install_egg_info", "bdist_wininst": "setuptools.command.bdist_wininst:bdist_wininst"}, "distutils.setup_keywords": {"exclude_package_data": "setuptools.dist:check_package_data", "zip_safe": "setuptools.dist:assert_bool", "install_requires": "setuptools.dist:check_requirements", "eager_resources": "setuptools.dist:assert_string_list", "extras_require": "setuptools.dist:check_extras", "tests_require": "setuptools.dist:check_requirements", "convert_2to3_doctests": "setuptools.dist:assert_string_list", "test_loader": "setuptools.dist:check_importable", "packages": "setuptools.dist:check_packages", "use_2to3_fixers": "setuptools.dist:assert_string_list", "entry_points": "setuptools.dist:check_entry_points", "include_package_data": "setuptools.dist:assert_bool", "dependency_links": "setuptools.dist:assert_string_list", "test_suite": "setuptools.dist:check_test_suite", "use_2to3": "setuptools.dist:assert_bool", "use_2to3_exclude_fixers": "setuptools.dist:assert_string_list", "package_data": "setuptools.dist:check_package_data", "namespace_packages": "setuptools.dist:check_nsp"}, "console_scripts": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.3": "setuptools.command.easy_install:main"}}, "extras": ["certs", "ssl:sys_platform=='win32'"], "run_requires": [{"extra": "certs", "requires": ["certifi (==0.0.8)"]}, {"requires": ["wincertstore (==0.1)"], "environment": "extra == \"ssl:sys_platform=='win32'\""}], "version": "2.0", "document_names": {"description": "DESCRIPTION.rst"}, "commands": {"wrap_console": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.3": "setuptools.command.easy_install:main"}}}python3.3/site-packages/setuptools-2.0.dist-info/dependency_links.txt000064400000000335151733566760021545 0ustar00https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec
https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c
python3.3/site-packages/setuptools-2.0.dist-info/RECORD000064400000016004151733566760016367 0ustar00pkg_resources.py,sha256=PTsVwvKZOvKRb0fpUA4EMxtWeAqimPdbQo4VcL_oVfY,98911
easy_install.py,sha256=MDC9vt5AxDsXX5qcKlBz2TnW6Tpuv_AobnfhCJ9X3PM,126
setuptools-2.0.data/scripts/easy_install,sha256=CCoKwnAC2FcNUE_BiA2Sn5rrWuy2yAqjEl-Zyp-rSoY,305
setuptools-2.0.data/scripts/easy_install-3.3,sha256=p5bT6BJgkt-Sp1fvihRe_23DCKjCycFDiLHHPl1PmOI,313
setuptools-2.0.dist-info/DESCRIPTION.rst,sha256=HvlYC-3n9_8lxg3FLymgsd4SbA4aQwI6tEh98kDZTDE,69872
setuptools-2.0.dist-info/RECORD,,
setuptools-2.0.dist-info/METADATA,sha256=zCZIX5URU19O4g_YhIIpgT2k3uZyCriLmWgkTrM_by4,71202
setuptools-2.0.dist-info/WHEEL,sha256=SXYYsi-y-rEGIva8sB8iKF6bAFD6YDhmqHX5hI3fc0o,110
setuptools-2.0.dist-info/pydist.json,sha256=7H8MWi-USVUvFXtOR8SWM_rvk6svEwsO90b2BkIlE60,4544
setuptools-2.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
setuptools-2.0.dist-info/entry_points.txt,sha256=8UfG56I_B3Dj-gOC482iTtjEFl2zWCf8UYWzB1dV_Hc,2773
setuptools-2.0.dist-info/top_level.txt,sha256=oqE8UYllpusLpVeDajAOvzsNJOdUG0bQelgPBUV_QZk,49
setuptools-2.0.dist-info/dependency_links.txt,sha256=H84NpZJcSa-8h9mn-ZONhSwqx6F9qdpEAzLiHqI7NX8,221
_markerlib/markers.py,sha256=YuFp0-osufFIoqnzG3L0Z2fDCx4Vln3VUDeXJ2DA_1I,3979
_markerlib/__init__.py,sha256=GSmhZqvAitLJHhSgtqqusfq2nJ_ClP3oy3Lm0uZLIsU,552
setuptools/py31compat.py,sha256=95J21c4_2pcNOrScsHvAMDA-HUO-93qDWn9W_71Sv8o,396
setuptools/script template (dev).py,sha256=fZZQIwfK2-F1tF0ld6Sh141zltAD6ubIa525WH6cMz8,311
setuptools/__init__.py,sha256=Sn0OUGFc_YlwGw2A3glq08IkDCcqssSoJTNwZK3cnJA,3317
setuptools/ssl_support.py,sha256=wnK1ffiiA7TrLYseT5A1qwNJuKelxMu9o3L4E270mD4,7663
setuptools/version.py,sha256=A3Ub7Z2q2OEONprXnC5jlQ8x525YffgG93hA9M4DAIk,20
setuptools/lib2to3_ex.py,sha256=6jPF9sJuHiz0cyg4cwIBLl2VMAxcl3GYSZwWAOuJplU,1998
setuptools/compat.py,sha256=DhySZMeNA-fmaMiESpefR2T0G1lV1k47xgHpXsB1NGU,2556
setuptools/depends.py,sha256=MZYC62GbkiR-H-w56YonoPCVttPfYxhTK6kZ07FpGXc,6221
setuptools/extension.py,sha256=Lxj67VzDEYORY-oEW9U-SP9JL3s-O9Sgk9BOwtvVLdQ,1404
setuptools/py26compat.py,sha256=ggKS8_aZWWHHS792vF3uXp5vmUkGNk3vjLreLTHr_-Q,431
setuptools/py27compat.py,sha256=CGj-jZcFgHUkrEdLvArkxHj96tAaMbG2-yJtUVU7QVI,306
setuptools/archive_util.py,sha256=4knsPzl_EjgtRu5-3G4tN5m0GIRcsiZOGJ1vjqaV3jg,6601
setuptools/script template.py,sha256=VpRgZSPN7tulpU94pWiFkKPzhHXonxnBZh2hjPIGAxY,163
setuptools/svn_utils.py,sha256=GMqvFLBQyD3dx06qQuA8H-fTUhAYK5ma4USzoR1iKfk,17848
setuptools/dist.py,sha256=PbBXveYctz6VclEdkt9Ysjon-OyAMxiWXaa3hvjw4rg,32548
setuptools/package_index.py,sha256=VKTKT2NijHEWrxmrqa57QfDHMaaI44KeSKhJeFZCfcw,38925
setuptools/site-patch.py,sha256=SeMejq4jWSvvCdCPktirf2278IwLWET5FQ8c0R9F2zo,2418
setuptools/sandbox.py,sha256=wXVdRCIL4pVWiGVgYjQKKoP0UmIduT5nZDO2rKH8Y2k,9994
setuptools/command/develop.py,sha256=svjNIfZbyne63KcNMjxwr8L_rw8XZW8j0T09stYLOGE,6447
setuptools/command/build_ext.py,sha256=k65J3ZUZzQw62U-5Xt7NuQ0UuWMUhU0-sIUpuxcqA7M,11854
setuptools/command/install_scripts.py,sha256=va2sHUlpGZNxOB3V5Z4ZuqnD-1mrccE9M2n6014xSXM,2068
setuptools/command/upload_docs.py,sha256=3vxqDQS1yh47cTaNEcu16ltHz5Gr764z4NB3OM7HFzc,6807
setuptools/command/install_egg_info.py,sha256=_QGULrbm0ueuGxldzPoGB7QdSd2g4bhU8qhzL8fR17w,3833
setuptools/command/__init__.py,sha256=XeM2FtxUGjx9ipxX4xnHsfMOSplYVQpgXvXDEe2cEz0,553
setuptools/command/setopt.py,sha256=akZNG_5z74x6NmhgNm0Opxc-cPO-6jV7SRC5i98TAVE,5068
setuptools/command/sdist.py,sha256=0inyxsLJMwSIB-nnea6qM-JF7J3ZzTbpPl5YgSiL6FQ,8341
setuptools/command/bdist_rpm.py,sha256=knEihWuGchIAzJlxp3iuJomX2kiTlgWnbw7dM38bXQk,2025
setuptools/command/easy_install.py,sha256=f8UMeiYpalnpZdtLwa-Vo5vz3pVf26kif2iQ1w66V30,72716
setuptools/command/install_lib.py,sha256=y7jrhIP0DG7_hO-MiYHCoBwf4ctdUhQcST9RtyvAkG4,2486
setuptools/command/install.py,sha256=8b2aDpZyH6E9u4dyPfEKmu_FrG5q5hUfchagFW-3Ysk,4065
setuptools/command/egg_info.py,sha256=tv-uFbNLnypUOUkwM4HZ_MjBAQiYcz654Pj5vgRouZw,14320
setuptools/command/rotate.py,sha256=zBjgakDOmqXL2abaxS9qpZu-jNBWVH0L3oaAUvZFwHE,2062
setuptools/command/register.py,sha256=a3b1P-yqZJGAh6ONEtmgzeSyCZ6hdItlCL9eFKnCYbo,277
setuptools/command/bdist_egg.py,sha256=U0cNWkqDHAppQFBwl8cB2tWxEYz7dTGDMlPpagmU0jc,18718
setuptools/command/bdist_wininst.py,sha256=mU8EplmcWQ71cyE6S-fXCF4p3wh7UaOHu3q8qgKR8UI,2283
setuptools/command/saveopts.py,sha256=r9oreFEGkaEn3a6FuWKvaIpigz6oQFayKcD7Jhn-RgI,705
setuptools/command/build_py.py,sha256=DrLl-zFXlM0BX2vAS4LS_arxKbCYVlDPczTFecrGJpo,8440
setuptools/command/alias.py,sha256=tO3iC_Kem0gj2QQEFVi3E5HXGewhaD5WoCeBrK7VuWY,2486
setuptools/command/test.py,sha256=rIOoFLV990UvprR50fLT5mUZvRu7O3q9reHc1IV76z0,5932
/opt/alt/python33/bin/easy_install,sha256=L-aGK8KsrFPPLFjacpRzftvKF8k5iBrVGaRkmn6aD0Y,246
/opt/alt/python33/bin/easy_install-3.3,sha256=L-aGK8KsrFPPLFjacpRzftvKF8k5iBrVGaRkmn6aD0Y,246
setuptools/__pycache__/dist.cpython-33.pyc,,
setuptools/__pycache__/py31compat.cpython-33.pyc,,
setuptools/__pycache__/depends.cpython-33.pyc,,
__pycache__/pkg_resources.cpython-33.pyc,,
setuptools/command/__pycache__/build_py.cpython-33.pyc,,
setuptools/command/__pycache__/upload_docs.cpython-33.pyc,,
setuptools/command/__pycache__/build_ext.cpython-33.pyc,,
setuptools/command/__pycache__/sdist.cpython-33.pyc,,
setuptools/__pycache__/py26compat.cpython-33.pyc,,
setuptools/__pycache__/py27compat.cpython-33.pyc,,
setuptools/command/__pycache__/saveopts.cpython-33.pyc,,
setuptools/command/__pycache__/egg_info.cpython-33.pyc,,
setuptools/command/__pycache__/rotate.cpython-33.pyc,,
setuptools/command/__pycache__/install_egg_info.cpython-33.pyc,,
setuptools/command/__pycache__/bdist_wininst.cpython-33.pyc,,
setuptools/command/__pycache__/develop.cpython-33.pyc,,
setuptools/command/__pycache__/bdist_egg.cpython-33.pyc,,
setuptools/__pycache__/extension.cpython-33.pyc,,
setuptools/__pycache__/version.cpython-33.pyc,,
setuptools/command/__pycache__/register.cpython-33.pyc,,
setuptools/__pycache__/sandbox.cpython-33.pyc,,
setuptools/command/__pycache__/test.cpython-33.pyc,,
setuptools/command/__pycache__/install.cpython-33.pyc,,
_markerlib/__pycache__/__init__.cpython-33.pyc,,
setuptools/command/__pycache__/easy_install.cpython-33.pyc,,
_markerlib/__pycache__/markers.cpython-33.pyc,,
setuptools/command/__pycache__/bdist_rpm.cpython-33.pyc,,
setuptools/__pycache__/ssl_support.cpython-33.pyc,,
setuptools/__pycache__/lib2to3_ex.cpython-33.pyc,,
setuptools/__pycache__/svn_utils.cpython-33.pyc,,
setuptools/command/__pycache__/alias.cpython-33.pyc,,
setuptools/__pycache__/__init__.cpython-33.pyc,,
setuptools/__pycache__/compat.cpython-33.pyc,,
setuptools/__pycache__/script template (dev).cpython-33.pyc,,
setuptools/command/__pycache__/install_lib.cpython-33.pyc,,
setuptools/__pycache__/site-patch.cpython-33.pyc,,
setuptools/__pycache__/package_index.cpython-33.pyc,,
setuptools/__pycache__/archive_util.cpython-33.pyc,,
setuptools/__pycache__/script template.cpython-33.pyc,,
setuptools/command/__pycache__/setopt.cpython-33.pyc,,
__pycache__/easy_install.cpython-33.pyc,,
setuptools/command/__pycache__/install_scripts.cpython-33.pyc,,
setuptools/command/__pycache__/__init__.cpython-33.pyc,,
python3.3/site-packages/setuptools-2.0.dist-info/top_level.txt000064400000000061151733566760020214 0ustar00easy_install
_markerlib
setuptools
pkg_resources
python3.3/site-packages/setuptools-2.0.dist-info/DESCRIPTION.rst000064400000210360151733566760020004 0ustar00===============================
Installing and Using Setuptools
===============================

.. contents:: **Table of Contents**


-------------------------
Installation Instructions
-------------------------

Upgrading from Distribute
=========================

Currently, Distribute disallows installing Setuptools 0.7+ over Distribute.
You must first uninstall any active version of Distribute first (see
`Uninstalling`_).

Upgrading from Setuptools 0.6
=============================

Upgrading from prior versions of Setuptools is supported. Initial reports
good success in this regard.

Windows
=======

The recommended way to install setuptools on Windows is to download
`ez_setup.py`_ and run it. The script will download the appropriate .egg
file and install it for you.

.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

For best results, uninstall previous versions FIRST (see `Uninstalling`_).

Once installation is complete, you will find an ``easy_install`` program in
your Python ``Scripts`` subdirectory.  For simple invocation and best results,
add this directory to your ``PATH`` environment variable, if it is not already
present.


Unix-based Systems including Mac OS X
=====================================

Download `ez_setup.py`_ and run it using the target Python version. The script
will download the appropriate version and install it for you::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

Note that you will may need to invoke the command with superuser privileges to
install to the system Python::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

Alternatively, on Python 2.6 and later, Setuptools may be installed to a
user-local path::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
    > python ez_setup.py --user


Python 2.4 and Python 2.5 support
=================================

Setuptools 2.0 and later requires Python 2.6 or later. To install setuptools
on Python 2.4 or Python 2.5, use the bootstrap script for Setuptools 1.x:
https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py.


Advanced Installation
=====================

For more advanced installation options, such as installing to custom
locations or prefixes, download and extract the source
tarball from `Setuptools on PyPI <https://pypi.python.org/pypi/setuptools>`_
and run setup.py with any supported distutils and Setuptools options.
For example::

    setuptools-x.x$ python setup.py --prefix=/opt/setuptools

Use ``--help`` to get a full options list, but we recommend consulting
the `EasyInstall manual`_ for detailed instructions, especially `the section
on custom installation locations`_.

.. _EasyInstall manual: https://pythonhosted.org/setuptools/EasyInstall
.. _the section on custom installation locations: https://pythonhosted.org/setuptools/EasyInstall#custom-installation-locations


Downloads
=========

All setuptools downloads can be found at `the project's home page in the Python
Package Index`_.  Scroll to the very bottom of the page to find the links.

.. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools

In addition to the PyPI downloads, the development version of ``setuptools``
is available from the `Bitbucket repo`_, and in-development versions of the
`0.6 branch`_ are available as well.

.. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev
.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06

Uninstalling
============

On Windows, if Setuptools was installed using an ``.exe`` or ``.msi``
installer, simply use the uninstall feature of "Add/Remove Programs" in the
Control Panel.

Otherwise, to uninstall Setuptools or Distribute, regardless of the Python
version, delete all ``setuptools*`` and ``distribute*`` files and
directories from your system's ``site-packages`` directory
(and any other ``sys.path`` directories) FIRST.

If you are upgrading or otherwise plan to re-install Setuptools or Distribute,
nothing further needs to be done. If you want to completely remove Setuptools,
you may also want to remove the 'easy_install' and 'easy_install-x.x' scripts
and associated executables installed to the Python scripts directory.

--------------------------------
Using Setuptools and EasyInstall
--------------------------------

Here are some of the available manuals, tutorials, and other resources for
learning about Setuptools, Python Eggs, and EasyInstall:

* `The EasyInstall user's guide and reference manual`_
* `The setuptools Developer's Guide`_
* `The pkg_resources API reference`_
* `Package Compatibility Notes`_ (user-maintained)
* `The Internal Structure of Python Eggs`_

Questions, comments, and bug reports should be directed to the `distutils-sig
mailing list`_.  If you have written (or know of) any tutorials, documentation,
plug-ins, or other resources for setuptools users, please let us know about
them there, so this reference list can be updated.  If you have working,
*tested* patches to correct problems or add features, you may submit them to
the `setuptools bug tracker`_.

.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/issues
.. _Package Compatibility Notes: https://pythonhosted.org/setuptools/PackageNotes
.. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html
.. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html
.. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html
.. _The EasyInstall user's guide and reference manual: https://pythonhosted.org/setuptools/easy_install.html
.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/


-------
Credits
-------

* The original design for the ``.egg`` format and the ``pkg_resources`` API was
  co-created by Phillip Eby and Bob Ippolito.  Bob also implemented the first
  version of ``pkg_resources``, and supplied the OS X operating system version
  compatibility algorithm.

* Ian Bicking implemented many early "creature comfort" features of
  easy_install, including support for downloading via Sourceforge and
  Subversion repositories.  Ian's comments on the Web-SIG about WSGI
  application deployment also inspired the concept of "entry points" in eggs,
  and he has given talks at PyCon and elsewhere to inform and educate the
  community about eggs and setuptools.

* Jim Fulton contributed time and effort to build automated tests of various
  aspects of ``easy_install``, and supplied the doctests for the command-line
  ``.exe`` wrappers on Windows.

* Phillip J. Eby is the seminal author of setuptools, and
  first proposed the idea of an importable binary distribution format for
  Python application plug-ins.

* Significant parts of the implementation of setuptools were funded by the Open
  Source Applications Foundation, to provide a plug-in infrastructure for the
  Chandler PIM application.  In addition, many OSAF staffers (such as Mike
  "Code Bear" Taylor) contributed their time and stress as guinea pigs for the
  use of eggs and setuptools, even before eggs were "cool".  (Thanks, guys!)

* Since the merge with Distribute, Jason R. Coombs is the
  maintainer of setuptools.  The project is maintained in coordination with
  the Python Packaging Authority (PyPA) and the larger Python community.

.. _files:

=======
CHANGES
=======

---
2.0
---

* `Issue #121 <https://bitbucket.org/pypa/setuptools/issue/121>`_: Exempt lib2to3 pickled grammars from DirectorySandbox.
* `Issue #41 <https://bitbucket.org/pypa/setuptools/issue/41>`_: Dropped support for Python 2.4 and Python 2.5. Clients requiring
  setuptools for those versions of Python should use setuptools 1.x.
* Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients
  expecting this boolean variable should use ``site.ENABLE_USER_SITE``
  instead.
* Removed ``pkg_resources.ImpWrapper``. Clients that expected this class
  should use ``pkgutil.ImpImporter`` instead.

-----
1.4.2
-----

* `Issue #116 <https://bitbucket.org/pypa/setuptools/issue/116>`_: Correct TypeError when reading a local package index on Python
  3.

-----
1.4.1
-----

* `Issue #114 <https://bitbucket.org/pypa/setuptools/issue/114>`_: Use ``sys.getfilesystemencoding`` for decoding config in
  ``bdist_wininst`` distributions.

* `Issue #105 <https://bitbucket.org/pypa/setuptools/issue/105>`_ and `Issue #113 <https://bitbucket.org/pypa/setuptools/issue/113>`_: Establish a more robust technique for
  determining the terminal encoding::

    1. Try ``getpreferredencoding``
    2. If that returns US_ASCII or None, try the encoding from
       ``getdefaultlocale``. If that encoding was a "fallback" because Python
       could not figure it out from the environment or OS, encoding remains
       unresolved.
    3. If the encoding is resolved, then make sure Python actually implements
       the encoding.
    4. On the event of an error or unknown codec, revert to fallbacks
       (UTF-8 on Darwin, ASCII on everything else).
    5. On the encoding is 'mac-roman' on Darwin, use UTF-8 as 'mac-roman' was
       a bug on older Python releases.

    On a side note, it would seem that the encoding only matters for when SVN
    does not yet support ``--xml`` and when getting repository and svn version
    numbers. The ``--xml`` technique should yield UTF-8 according to some
    messages on the SVN mailing lists. So if the version numbers are always
    7-bit ASCII clean, it may be best to only support the file parsing methods
    for legacy SVN releases and support for SVN without the subprocess command
    would simple go away as support for the older SVNs does.

---
1.4
---

* `Issue #27 <https://bitbucket.org/pypa/setuptools/issue/27>`_: ``easy_install`` will now use credentials from .pypirc if
  present for connecting to the package index.
* `Pull Request #21 <https://bitbucket.org/pypa/setuptools/pull-request/21>`_: Omit unwanted newlines in ``package_index._encode_auth``
  when the username/password pair length indicates wrapping.

-----
1.3.2
-----

* `Issue #99 <https://bitbucket.org/pypa/setuptools/issue/99>`_: Fix filename encoding issues in SVN support.

-----
1.3.1
-----

* Remove exuberant warning in SVN support when SVN is not used.

---
1.3
---

* Address security vulnerability in SSL match_hostname check as reported in
  `Python #17997 <http://bugs.python.org/issue17997>`_.
* Prefer `backports.ssl_match_hostname
  <https://pypi.python.org/pypi/backports.ssl_match_hostname>`_ for backport
  implementation if present.
* Correct NameError in ``ssl_support`` module (``socket.error``).

---
1.2
---

* `Issue #26 <https://bitbucket.org/pypa/setuptools/issue/26>`_: Add support for SVN 1.7. Special thanks to Philip Thiem for the
  contribution.
* `Issue #93 <https://bitbucket.org/pypa/setuptools/issue/93>`_: Wheels are now distributed with every release. Note that as
  reported in `Issue #108 <https://bitbucket.org/pypa/setuptools/issue/108>`_, as of Pip 1.4, scripts aren't installed properly
  from wheels. Therefore, if using Pip to install setuptools from a wheel,
  the ``easy_install`` command will not be available.
* Setuptools "natural" launcher support, introduced in 1.0, is now officially
  supported.

-----
1.1.7
-----

* Fixed behavior of NameError handling in 'script template (dev).py' (script
  launcher for 'develop' installs).
* ``ez_setup.py`` now ensures partial downloads are cleaned up following
  a failed download.
* `Distribute #363 <https://bitbucket.org/tarek/distribute/issue/363>`_ and `Issue #55 <https://bitbucket.org/pypa/setuptools/issue/55>`_: Skip an sdist test that fails on locales
  other than UTF-8.

-----
1.1.6
-----

* `Distribute #349 <https://bitbucket.org/tarek/distribute/issue/349>`_: ``sandbox.execfile`` now opens the target file in binary
  mode, thus honoring a BOM in the file when compiled.

-----
1.1.5
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Second attempt at fix (logic was reversed).

-----
1.1.4
-----

* `Issue #77 <https://bitbucket.org/pypa/setuptools/issue/77>`_: Fix error in upload command (Python 2.4).

-----
1.1.3
-----

* Fix NameError in previous patch.

-----
1.1.2
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Correct issue where 404 errors are returned for URLs with
  fragments in them (such as #egg=).

-----
1.1.1
-----

* `Issue #75 <https://bitbucket.org/pypa/setuptools/issue/75>`_: Add ``--insecure`` option to ez_setup.py to accommodate
  environments where a trusted SSL connection cannot be validated.
* `Issue #76 <https://bitbucket.org/pypa/setuptools/issue/76>`_: Fix AttributeError in upload command with Python 2.4.

---
1.1
---

* `Issue #71 <https://bitbucket.org/pypa/setuptools/issue/71>`_ (`Distribute #333 <https://bitbucket.org/tarek/distribute/issue/333>`_): EasyInstall now puts less emphasis on the
  condition when a host is blocked via ``--allow-hosts``.
* `Issue #72 <https://bitbucket.org/pypa/setuptools/issue/72>`_: Restored Python 2.4 compatibility in ``ez_setup.py``.

---
1.0
---

* `Issue #60 <https://bitbucket.org/pypa/setuptools/issue/60>`_: On Windows, Setuptools supports deferring to another launcher,
  such as Vinay Sajip's `pylauncher <https://bitbucket.org/pypa/pylauncher>`_
  (included with Python 3.3) to launch console and GUI scripts and not install
  its own launcher executables. This experimental functionality is currently
  only enabled if  the ``SETUPTOOLS_LAUNCHER`` environment variable is set to
  "natural". In the future, this behavior may become default, but only after
  it has matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER``
  also accepts "executable" to force the default behavior of creating launcher
  executables.
* `Issue #63 <https://bitbucket.org/pypa/setuptools/issue/63>`_: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or
  wget for retrieving the Setuptools tarball for improved security of the
  install. The script will still fall back to a simple ``urlopen`` on
  platforms that do not have these tools.
* `Issue #65 <https://bitbucket.org/pypa/setuptools/issue/65>`_: Deprecated the ``Features`` functionality.
* `Issue #52 <https://bitbucket.org/pypa/setuptools/issue/52>`_: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied)
  connection.

Backward-Incompatible Changes
=============================

This release includes a couple of backward-incompatible changes, but most if
not all users will find 1.0 a drop-in replacement for 0.9.

* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: Normalized API of environment marker support. Specifically,
  removed line number and filename from SyntaxErrors when returned from
  `pkg_resources.invalid_marker`. Any clients depending on the specific
  string representation of exceptions returned by that function may need to
  be updated to account for this change.
* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: SyntaxErrors generated by `pkg_resources.invalid_marker` are
  normalized for cross-implementation consistency.
* Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting``
  options to easy_install. These options have been deprecated since 0.6a11.

-----
0.9.8
-----

* `Issue #53 <https://bitbucket.org/pypa/setuptools/issue/53>`_: Fix NameErrors in `_vcs_split_rev_from_url`.

-----
0.9.7
-----

* `Issue #49 <https://bitbucket.org/pypa/setuptools/issue/49>`_: Correct AttributeError on PyPy where a hashlib.HASH object does
  not have a `.name` attribute.
* `Issue #34 <https://bitbucket.org/pypa/setuptools/issue/34>`_: Documentation now refers to bootstrap script in code repository
  referenced by bookmark.
* Add underscore-separated keys to environment markers (markerlib).

-----
0.9.6
-----

* `Issue #44 <https://bitbucket.org/pypa/setuptools/issue/44>`_: Test failure on Python 2.4 when MD5 hash doesn't have a `.name`
  attribute.

-----
0.9.5
-----

* `Python #17980 <http://bugs.python.org/issue17980>`_: Fix security vulnerability in SSL certificate validation.

-----
0.9.4
-----

* `Issue #43 <https://bitbucket.org/pypa/setuptools/issue/43>`_: Fix issue (introduced in 0.9.1) with version resolution when
  upgrading over other releases of Setuptools.

-----
0.9.3
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix new ``AttributeError`` introduced in last fix.

-----
0.9.2
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix regression where blank checksums would trigger an
  ``AttributeError``.

-----
0.9.1
-----

* `Distribute #386 <https://bitbucket.org/tarek/distribute/issue/386>`_: Allow other positional and keyword arguments to os.open.
* Corrected dependency on certifi mis-referenced in 0.9.

---
0.9
---

* `package_index` now validates hashes other than MD5 in download links.

---
0.8
---

* Code base now runs on Python 2.4 - Python 3.3 without Python 2to3
  conversion.

-----
0.7.8
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Yet another fix for yet another regression.

-----
0.7.7
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release (redo).
* `Issue #30 <https://bitbucket.org/pypa/setuptools/issue/30>`_: Added test for get_cache_path.

-----
0.7.6
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release.

-----
0.7.5
-----

* `Issue #21 <https://bitbucket.org/pypa/setuptools/issue/21>`_: Restore Python 2.4 compatibility in ``test_easy_install``.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Merged additional warning from Distribute 0.6.46.
* Now honor the environment variable
  ``SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT`` in addition to the now
  deprecated ``DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT``.

-----
0.7.4
-----

* `Issue #20 <https://bitbucket.org/pypa/setuptools/issue/20>`_: Fix comparison of parsed SVN version on Python 3.

-----
0.7.3
-----

* `Issue #1 <https://bitbucket.org/pypa/setuptools/issue/1>`_: Disable installation of Windows-specific files on non-Windows systems.
* Use new sysconfig module with Python 2.7 or >=3.2.

-----
0.7.2
-----

* `Issue #14 <https://bitbucket.org/pypa/setuptools/issue/14>`_: Use markerlib when the `parser` module is not available.
* `Issue #10 <https://bitbucket.org/pypa/setuptools/issue/10>`_: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI.

-----
0.7.1
-----

* Fix NameError (`Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_) again - broken in bad merge.

---
0.7
---

* Merged Setuptools and Distribute. See docs/merge.txt for details.

Added several features that were slated for setuptools 0.6c12:

* Index URL now defaults to HTTPS.
* Added experimental environment marker support. Now clients may designate a
  PEP-426 environment marker for "extra" dependencies. Setuptools uses this
  feature in ``setup.py`` for optional SSL and certificate validation support
  on older platforms. Based on Distutils-SIG discussions, the syntax is
  somewhat tentative. There should probably be a PEP with a firmer spec before
  the feature should be considered suitable for use.
* Added support for SSL certificate validation when installing packages from
  an HTTPS service.

-----
0.7b4
-----

* `Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_: Fixed NameError in SSL support.

------
0.6.49
------

* Move warning check in ``get_cache_path`` to follow the directory creation
  to avoid errors when the cache path does not yet exist. Fixes the error
  reported in `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_.

------
0.6.48
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46 (redo).

------
0.6.47
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46.

------
0.6.46
------

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Issue a warning if the PYTHON_EGG_CACHE or otherwise
  customized egg cache location specifies a directory that's group- or
  world-writable.

------
0.6.45
------

* `Distribute #379 <https://bitbucket.org/tarek/distribute/issue/379>`_: ``distribute_setup.py`` now traps VersionConflict as well,
  restoring ability to upgrade from an older setuptools version.

------
0.6.44
------

* ``distribute_setup.py`` has been updated to allow Setuptools 0.7 to
  satisfy use_setuptools.

------
0.6.43
------

* `Distribute #378 <https://bitbucket.org/tarek/distribute/issue/378>`_: Restore support for Python 2.4 Syntax (regression in 0.6.42).

------
0.6.42
------

* External links finder no longer yields duplicate links.
* `Distribute #337 <https://bitbucket.org/tarek/distribute/issue/337>`_: Moved site.py to setuptools/site-patch.py (graft of very old
  patch from setuptools trunk which inspired PR `#31 <https://bitbucket.org/pypa/setuptools/issue/31>`_).

------
0.6.41
------

* `Distribute #27 <https://bitbucket.org/tarek/distribute/issue/27>`_: Use public api for loading resources from zip files rather than
  the private method `_zip_directory_cache`.
* Added a new function ``easy_install.get_win_launcher`` which may be used by
  third-party libraries such as buildout to get a suitable script launcher.

------
0.6.40
------

* `Distribute #376 <https://bitbucket.org/tarek/distribute/issue/376>`_: brought back cli.exe and gui.exe that were deleted in the
  previous release.

------
0.6.39
------

* Add support for console launchers on ARM platforms.
* Fix possible issue in GUI launchers where the subsystem was not supplied to
  the linker.
* Launcher build script now refactored for robustness.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Resources extracted from a zip egg to the file system now also
  check the contents of the file against the zip contents during each
  invocation of get_resource_filename.

------
0.6.38
------

* `Distribute #371 <https://bitbucket.org/tarek/distribute/issue/371>`_: The launcher manifest file is now installed properly.

------
0.6.37
------

* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Launcher scripts, including easy_install itself, are now
  accompanied by a manifest on 32-bit Windows environments to avoid the
  Installer Detection Technology and thus undesirable UAC elevation described
  in `this Microsoft article
  <http://technet.microsoft.com/en-us/library/cc709628%28WS.10%29.aspx>`_.

------
0.6.36
------

* `Pull Request #35 <https://bitbucket.org/pypa/setuptools/pull-request/35>`_: In `Buildout #64 <https://github.com/buildout/buildout/issues/64>`_, it was reported that
  under Python 3, installation of distutils scripts could attempt to copy
  the ``__pycache__`` directory as a file, causing an error, apparently only
  under Windows. Easy_install now skips all directories when processing
  metadata scripts.

------
0.6.35
------


Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in
how it parses version numbers.

* `Distribute #278 <https://bitbucket.org/tarek/distribute/issue/278>`_: Restored compatibility with distribute 0.6.22 and setuptools
  0.6. Updated the documentation to match more closely with the version
  parsing as intended in setuptools 0.6.

------
0.6.34
------

* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: 0.6.33 fails to build under Python 2.4.

------
0.6.33
------

* Fix 2 errors with Jython 2.5.
* Fix 1 failure with Jython 2.5 and 2.7.
* Disable workaround for Jython scripts on Linux systems.
* `Distribute #336 <https://bitbucket.org/tarek/distribute/issue/336>`_: `setup.py` no longer masks failure exit code when tests fail.
* Fix issue in pkg_resources where try/except around a platform-dependent
  import would trigger hook load failures on Mercurial. See pull request 32
  for details.
* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: Fix a ResourceWarning.

------
0.6.32
------

* Fix test suite with Python 2.6.
* Fix some DeprecationWarnings and ResourceWarnings.
* `Distribute #335 <https://bitbucket.org/tarek/distribute/issue/335>`_: Backed out `setup_requires` superceding installed requirements
  until regression can be addressed.

------
0.6.31
------

* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Make sure the manifest only ever contains UTF-8 in Python 3.
* `Distribute #329 <https://bitbucket.org/tarek/distribute/issue/329>`_: Properly close files created by tests for compatibility with
  Jython.
* Work around `Jython #1980 <http://bugs.jython.org/issue1980>`_ and `Jython #1981 <http://bugs.jython.org/issue1981>`_.
* `Distribute #334 <https://bitbucket.org/tarek/distribute/issue/334>`_: Provide workaround for packages that reference `sys.__stdout__`
  such as numpy does. This change should address
  `virtualenv `#359 <https://bitbucket.org/pypa/setuptools/issue/359>`_ <https://github.com/pypa/virtualenv/issues/359>`_ as long
  as the system encoding is UTF-8 or the IO encoding is specified in the
  environment, i.e.::

     PYTHONIOENCODING=utf8 pip install numpy

* Fix for encoding issue when installing from Windows executable on Python 3.
* `Distribute #323 <https://bitbucket.org/tarek/distribute/issue/323>`_: Allow `setup_requires` requirements to supercede installed
  requirements. Added some new keyword arguments to existing pkg_resources
  methods. Also had to updated how __path__ is handled for namespace packages
  to ensure that when a new egg distribution containing a namespace package is
  placed on sys.path, the entries in __path__ are found in the same order they
  would have been in had that egg been on the path when pkg_resources was
  first imported.

------
0.6.30
------

* `Distribute #328 <https://bitbucket.org/tarek/distribute/issue/328>`_: Clean up temporary directories in distribute_setup.py.
* Fix fatal bug in distribute_setup.py.

------
0.6.29
------

* `Pull Request #14 <https://bitbucket.org/pypa/setuptools/pull-request/14>`_: Honor file permissions in zip files.
* `Distribute #327 <https://bitbucket.org/tarek/distribute/issue/327>`_: Merged pull request `#24 <https://bitbucket.org/pypa/setuptools/issue/24>`_ to fix a dependency problem with pip.
* Merged pull request `#23 <https://bitbucket.org/pypa/setuptools/issue/23>`_ to fix https://github.com/pypa/virtualenv/issues/301.
* If Sphinx is installed, the `upload_docs` command now runs `build_sphinx`
  to produce uploadable documentation.
* `Distribute #326 <https://bitbucket.org/tarek/distribute/issue/326>`_: `upload_docs` provided mangled auth credentials under Python 3.
* `Distribute #320 <https://bitbucket.org/tarek/distribute/issue/320>`_: Fix check for "createable" in distribute_setup.py.
* `Distribute #305 <https://bitbucket.org/tarek/distribute/issue/305>`_: Remove a warning that was triggered during normal operations.
* `Distribute #311 <https://bitbucket.org/tarek/distribute/issue/311>`_: Print metadata in UTF-8 independent of platform.
* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Read manifest file with UTF-8 encoding under Python 3.
* `Distribute #301 <https://bitbucket.org/tarek/distribute/issue/301>`_: Allow to run tests of namespace packages when using 2to3.
* `Distribute #304 <https://bitbucket.org/tarek/distribute/issue/304>`_: Prevent import loop in site.py under Python 3.3.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3.
* `Distribute #299 <https://bitbucket.org/tarek/distribute/issue/299>`_: The develop command didn't work on Python 3, when using 2to3,
  as the egg link would go to the Python 2 source. Linking to the 2to3'd code
  in build/lib makes it work, although you will have to rebuild the module
  before testing it.
* `Distribute #306 <https://bitbucket.org/tarek/distribute/issue/306>`_: Even if 2to3 is used, we build in-place under Python 2.
* `Distribute #307 <https://bitbucket.org/tarek/distribute/issue/307>`_: Prints the full path when .svn/entries is broken.
* `Distribute #313 <https://bitbucket.org/tarek/distribute/issue/313>`_: Support for sdist subcommands (Python 2.7)
* `Distribute #314 <https://bitbucket.org/tarek/distribute/issue/314>`_: test_local_index() would fail an OS X.
* `Distribute #310 <https://bitbucket.org/tarek/distribute/issue/310>`_: Non-ascii characters in a namespace __init__.py causes errors.
* `Distribute #218 <https://bitbucket.org/tarek/distribute/issue/218>`_: Improved documentation on behavior of `package_data` and
  `include_package_data`. Files indicated by `package_data` are now included
  in the manifest.
* `distribute_setup.py` now allows a `--download-base` argument for retrieving
  distribute from a specified location.

------
0.6.28
------

* `Distribute #294 <https://bitbucket.org/tarek/distribute/issue/294>`_: setup.py can now be invoked from any directory.
* Scripts are now installed honoring the umask.
* Added support for .dist-info directories.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Fix and disable scanning of `*.pyc` / `*.pyo` files on
  Python 3.3.

------
0.6.27
------

* Support current snapshots of CPython 3.3.
* Distribute now recognizes README.rst as a standard, default readme file.
* Exclude 'encodings' modules when removing modules from sys.modules.
  Workaround for `#285 <https://bitbucket.org/pypa/setuptools/issue/285>`_.
* `Distribute #231 <https://bitbucket.org/tarek/distribute/issue/231>`_: Don't fiddle with system python when used with buildout
  (bootstrap.py)

------
0.6.26
------

* `Distribute #183 <https://bitbucket.org/tarek/distribute/issue/183>`_: Symlinked files are now extracted from source distributions.
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: Easy_install fetch parameters are now passed during the
  installation of a source distribution; now fulfillment of setup_requires
  dependencies will honor the parameters passed to easy_install.

------
0.6.25
------

* `Distribute #258 <https://bitbucket.org/tarek/distribute/issue/258>`_: Workaround a cache issue
* `Distribute #260 <https://bitbucket.org/tarek/distribute/issue/260>`_: distribute_setup.py now accepts the --user parameter for
  Python 2.6 and later.
* `Distribute #262 <https://bitbucket.org/tarek/distribute/issue/262>`_: package_index.open_with_auth no longer throws LookupError
  on Python 3.
* `Distribute #269 <https://bitbucket.org/tarek/distribute/issue/269>`_: AttributeError when an exception occurs reading Manifest.in
  on late releases of Python.
* `Distribute #272 <https://bitbucket.org/tarek/distribute/issue/272>`_: Prevent TypeError when namespace package names are unicode
  and single-install-externally-managed is used. Also fixes PIP issue
  449.
* `Distribute #273 <https://bitbucket.org/tarek/distribute/issue/273>`_: Legacy script launchers now install with Python2/3 support.

------
0.6.24
------

* `Distribute #249 <https://bitbucket.org/tarek/distribute/issue/249>`_: Added options to exclude 2to3 fixers

------
0.6.23
------

* `Distribute #244 <https://bitbucket.org/tarek/distribute/issue/244>`_: Fixed a test
* `Distribute #243 <https://bitbucket.org/tarek/distribute/issue/243>`_: Fixed a test
* `Distribute #239 <https://bitbucket.org/tarek/distribute/issue/239>`_: Fixed a test
* `Distribute #240 <https://bitbucket.org/tarek/distribute/issue/240>`_: Fixed a test
* `Distribute #241 <https://bitbucket.org/tarek/distribute/issue/241>`_: Fixed a test
* `Distribute #237 <https://bitbucket.org/tarek/distribute/issue/237>`_: Fixed a test
* `Distribute #238 <https://bitbucket.org/tarek/distribute/issue/238>`_: easy_install now uses 64bit executable wrappers on 64bit Python
* `Distribute #208 <https://bitbucket.org/tarek/distribute/issue/208>`_: Fixed parsed_versions, it now honors post-releases as noted in the documentation
* `Distribute #207 <https://bitbucket.org/tarek/distribute/issue/207>`_: Windows cli and gui wrappers pass CTRL-C to child python process
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: easy_install now passes its arguments to setup.py bdist_egg
* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: Fixed a NameError on Python 2.5, 2.4

------
0.6.21
------

* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: FIxed a regression on py2.4

------
0.6.20
------

* `Distribute #135 <https://bitbucket.org/tarek/distribute/issue/135>`_: Include url in warning when processing URLs in package_index.
* `Distribute #212 <https://bitbucket.org/tarek/distribute/issue/212>`_: Fix issue where easy_instal fails on Python 3 on windows installer.
* `Distribute #213 <https://bitbucket.org/tarek/distribute/issue/213>`_: Fix typo in documentation.

------
0.6.19
------

* `Distribute #206 <https://bitbucket.org/tarek/distribute/issue/206>`_: AttributeError: 'HTTPMessage' object has no attribute 'getheaders'

------
0.6.18
------

* `Distribute #210 <https://bitbucket.org/tarek/distribute/issue/210>`_: Fixed a regression introduced by `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_ fix.

------
0.6.17
------

* Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment
  variable to allow to disable installation of easy_install-${version} script.
* Support Python >=3.1.4 and >=3.2.1.
* `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_: Don't try to import the parent of a namespace package in
  declare_namespace
* `Distribute #196 <https://bitbucket.org/tarek/distribute/issue/196>`_: Tolerate responses with multiple Content-Length headers
* `Distribute #205 <https://bitbucket.org/tarek/distribute/issue/205>`_: Sandboxing doesn't preserve working_set. Leads to setup_requires
  problems.

------
0.6.16
------

* Builds sdist gztar even on Windows (avoiding `Distribute #193 <https://bitbucket.org/tarek/distribute/issue/193>`_).
* `Distribute #192 <https://bitbucket.org/tarek/distribute/issue/192>`_: Fixed metadata omitted on Windows when package_dir
  specified with forward-slash.
* `Distribute #195 <https://bitbucket.org/tarek/distribute/issue/195>`_: Cython build support.
* `Distribute #200 <https://bitbucket.org/tarek/distribute/issue/200>`_: Issues with recognizing 64-bit packages on Windows.

------
0.6.15
------

* Fixed typo in bdist_egg
* Several issues under Python 3 has been solved.
* `Distribute #146 <https://bitbucket.org/tarek/distribute/issue/146>`_: Fixed missing DLL files after easy_install of windows exe package.

------
0.6.14
------

* `Distribute #170 <https://bitbucket.org/tarek/distribute/issue/170>`_: Fixed unittest failure. Thanks to Toshio.
* `Distribute #171 <https://bitbucket.org/tarek/distribute/issue/171>`_: Fixed race condition in unittests cause deadlocks in test suite.
* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Fixed a lookup issue with easy_install.
  Thanks to David and Zooko.
* `Distribute #174 <https://bitbucket.org/tarek/distribute/issue/174>`_: Fixed the edit mode when its used with setuptools itself

------
0.6.13
------

* `Distribute #160 <https://bitbucket.org/tarek/distribute/issue/160>`_: 2.7 gives ValueError("Invalid IPv6 URL")
* `Distribute #150 <https://bitbucket.org/tarek/distribute/issue/150>`_: Fixed using ~/.local even in a --no-site-packages virtualenv
* `Distribute #163 <https://bitbucket.org/tarek/distribute/issue/163>`_: scan index links before external links, and don't use the md5 when
  comparing two distributions

------
0.6.12
------

* `Distribute #149 <https://bitbucket.org/tarek/distribute/issue/149>`_: Fixed various failures on 2.3/2.4

------
0.6.11
------

* Found another case of SandboxViolation - fixed
* `Distribute #15 <https://bitbucket.org/tarek/distribute/issue/15>`_ and `Distribute #48 <https://bitbucket.org/tarek/distribute/issue/48>`_: Introduced a socket timeout of 15 seconds on url openings
* Added indexsidebar.html into MANIFEST.in
* `Distribute #108 <https://bitbucket.org/tarek/distribute/issue/108>`_: Fixed TypeError with Python3.1
* `Distribute #121 <https://bitbucket.org/tarek/distribute/issue/121>`_: Fixed --help install command trying to actually install.
* `Distribute #112 <https://bitbucket.org/tarek/distribute/issue/112>`_: Added an os.makedirs so that Tarek's solution will work.
* `Distribute #133 <https://bitbucket.org/tarek/distribute/issue/133>`_: Added --no-find-links to easy_install
* Added easy_install --user
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: Fixed develop --user not taking '.' in PYTHONPATH into account
* `Distribute #134 <https://bitbucket.org/tarek/distribute/issue/134>`_: removed spurious UserWarnings. Patch by VanLindberg
* `Distribute #138 <https://bitbucket.org/tarek/distribute/issue/138>`_: cant_write_to_target error when setup_requires is used.
* `Distribute #147 <https://bitbucket.org/tarek/distribute/issue/147>`_: respect the sys.dont_write_bytecode flag

------
0.6.10
------

* Reverted change made for the DistributionNotFound exception because
  zc.buildout uses the exception message to get the name of the
  distribution.

-----
0.6.9
-----

* `Distribute #90 <https://bitbucket.org/tarek/distribute/issue/90>`_: unknown setuptools version can be added in the working set
* `Distribute #87 <https://bitbucket.org/tarek/distribute/issue/87>`_: setupt.py doesn't try to convert distribute_setup.py anymore
  Initial Patch by arfrever.
* `Distribute #89 <https://bitbucket.org/tarek/distribute/issue/89>`_: added a side bar with a download link to the doc.
* `Distribute #86 <https://bitbucket.org/tarek/distribute/issue/86>`_: fixed missing sentence in pkg_resources doc.
* Added a nicer error message when a DistributionNotFound is raised.
* `Distribute #80 <https://bitbucket.org/tarek/distribute/issue/80>`_: test_develop now works with Python 3.1
* `Distribute #93 <https://bitbucket.org/tarek/distribute/issue/93>`_: upload_docs now works if there is an empty sub-directory.
* `Distribute #70 <https://bitbucket.org/tarek/distribute/issue/70>`_: exec bit on non-exec files
* `Distribute #99 <https://bitbucket.org/tarek/distribute/issue/99>`_: now the standalone easy_install command doesn't uses a
  "setup.cfg" if any exists in the working directory. It will use it
  only if triggered by ``install_requires`` from a setup.py call
  (install, develop, etc).
* `Distribute #101 <https://bitbucket.org/tarek/distribute/issue/101>`_: Allowing ``os.devnull`` in Sandbox
* `Distribute #92 <https://bitbucket.org/tarek/distribute/issue/92>`_: Fixed the "no eggs" found error with MacPort
  (platform.mac_ver() fails)
* `Distribute #103 <https://bitbucket.org/tarek/distribute/issue/103>`_: test_get_script_header_jython_workaround not run
  anymore under py3 with C or POSIX local. Contributed by Arfrever.
* `Distribute #104 <https://bitbucket.org/tarek/distribute/issue/104>`_: remvoved the assertion when the installation fails,
  with a nicer message for the end user.
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: making sure there's no SandboxViolation when
  the setup script patches setuptools.

-----
0.6.8
-----

* Added "check_packages" in dist. (added in Setuptools 0.6c11)
* Fixed the DONT_PATCH_SETUPTOOLS state.

-----
0.6.7
-----

* `Distribute #58 <https://bitbucket.org/tarek/distribute/issue/58>`_: Added --user support to the develop command
* `Distribute #11 <https://bitbucket.org/tarek/distribute/issue/11>`_: Generated scripts now wrap their call to the script entry point
  in the standard "if name == 'main'"
* Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv
  can drive an installation that doesn't patch a global setuptools.
* Reviewed unladen-swallow specific change from
  http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719
  and determined that it no longer applies. Distribute should work fine with
  Unladen Swallow 2009Q3.
* `Distribute #21 <https://bitbucket.org/tarek/distribute/issue/21>`_: Allow PackageIndex.open_url to gracefully handle all cases of a
  httplib.HTTPException instead of just InvalidURL and BadStatusLine.
* Removed virtual-python.py from this distribution and updated documentation
  to point to the actively maintained virtualenv instead.
* `Distribute #64 <https://bitbucket.org/tarek/distribute/issue/64>`_: use_setuptools no longer rebuilds the distribute egg every
  time it is run
* use_setuptools now properly respects the requested version
* use_setuptools will no longer try to import a distribute egg for the
  wrong Python version
* `Distribute #74 <https://bitbucket.org/tarek/distribute/issue/74>`_: no_fake should be True by default.
* `Distribute #72 <https://bitbucket.org/tarek/distribute/issue/72>`_: avoid a bootstrapping issue with easy_install -U

-----
0.6.6
-----

* Unified the bootstrap file so it works on both py2.x and py3k without 2to3
  (patch by Holger Krekel)

-----
0.6.5
-----

* `Distribute #65 <https://bitbucket.org/tarek/distribute/issue/65>`_: cli.exe and gui.exe are now generated at build time,
  depending on the platform in use.

* `Distribute #67 <https://bitbucket.org/tarek/distribute/issue/67>`_: Fixed doc typo (PEP 381/382)

* Distribute no longer shadows setuptools if we require a 0.7-series
  setuptools.  And an error is raised when installing a 0.7 setuptools with
  distribute.

* When run from within buildout, no attempt is made to modify an existing
  setuptools egg, whether in a shared egg directory or a system setuptools.

* Fixed a hole in sandboxing allowing builtin file to write outside of
  the sandbox.

-----
0.6.4
-----

* Added the generation of `distribute_setup_3k.py` during the release.
  This closes `Distribute #52 <https://bitbucket.org/tarek/distribute/issue/52>`_.

* Added an upload_docs command to easily upload project documentation to
  PyPI's https://pythonhosted.org. This close issue `Distribute #56 <https://bitbucket.org/tarek/distribute/issue/56>`_.

* Fixed a bootstrap bug on the use_setuptools() API.

-----
0.6.3
-----

setuptools
==========

* Fixed a bunch of calls to file() that caused crashes on Python 3.

bootstrapping
=============

* Fixed a bug in sorting that caused bootstrap to fail on Python 3.

-----
0.6.2
-----

setuptools
==========

* Added Python 3 support; see docs/python3.txt.
  This closes `Old Setuptools #39 <http://bugs.python.org/setuptools/issue39>`_.

* Added option to run 2to3 automatically when installing on Python 3.
  This closes issue `Distribute #31 <https://bitbucket.org/tarek/distribute/issue/31>`_.

* Fixed invalid usage of requirement.parse, that broke develop -d.
  This closes `Old Setuptools #44 <http://bugs.python.org/setuptools/issue44>`_.

* Fixed script launcher for 64-bit Windows.
  This closes `Old Setuptools #2 <http://bugs.python.org/setuptools/issue2>`_.

* KeyError when compiling extensions.
  This closes `Old Setuptools #41 <http://bugs.python.org/setuptools/issue41>`_.

bootstrapping
=============

* Fixed bootstrap not working on Windows. This closes issue `Distribute #49 <https://bitbucket.org/tarek/distribute/issue/49>`_.

* Fixed 2.6 dependencies. This closes issue `Distribute #50 <https://bitbucket.org/tarek/distribute/issue/50>`_.

* Make sure setuptools is patched when running through easy_install
  This closes `Old Setuptools #40 <http://bugs.python.org/setuptools/issue40>`_.

-----
0.6.1
-----

setuptools
==========

* package_index.urlopen now catches BadStatusLine and malformed url errors.
  This closes `Distribute #16 <https://bitbucket.org/tarek/distribute/issue/16>`_ and `Distribute #18 <https://bitbucket.org/tarek/distribute/issue/18>`_.

* zip_ok is now False by default. This closes `Old Setuptools #33 <http://bugs.python.org/setuptools/issue33>`_.

* Fixed invalid URL error catching. `Old Setuptools #20 <http://bugs.python.org/setuptools/issue20>`_.

* Fixed invalid bootstraping with easy_install installation (`Distribute #40 <https://bitbucket.org/tarek/distribute/issue/40>`_).
  Thanks to Florian Schulze for the help.

* Removed buildout/bootstrap.py. A new repository will create a specific
  bootstrap.py script.


bootstrapping
=============

* The boostrap process leave setuptools alone if detected in the system
  and --root or --prefix is provided, but is not in the same location.
  This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

---
0.6
---

setuptools
==========

* Packages required at build time where not fully present at install time.
  This closes `Distribute #12 <https://bitbucket.org/tarek/distribute/issue/12>`_.

* Protected against failures in tarfile extraction. This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

* Made Jython api_tests.txt doctest compatible. This closes `Distribute #7 <https://bitbucket.org/tarek/distribute/issue/7>`_.

* sandbox.py replaced builtin type file with builtin function open. This
  closes `Distribute #6 <https://bitbucket.org/tarek/distribute/issue/6>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

* Added compatibility with Subversion 1.6. This references `Distribute #1 <https://bitbucket.org/tarek/distribute/issue/1>`_.

pkg_resources
=============

* Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API
  instead. Based on a patch from ronaldoussoren. This closes issue `#5 <https://bitbucket.org/pypa/setuptools/issue/5>`_.

* Fixed a SandboxViolation for mkdir that could occur in certain cases.
  This closes `Distribute #13 <https://bitbucket.org/tarek/distribute/issue/13>`_.

* Allow to find_on_path on systems with tight permissions to fail gracefully.
  This closes `Distribute #9 <https://bitbucket.org/tarek/distribute/issue/9>`_.

* Corrected inconsistency between documentation and code of add_entry.
  This closes `Distribute #8 <https://bitbucket.org/tarek/distribute/issue/8>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

easy_install
============

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

-----
0.6c9
-----

 * Fixed a missing files problem when using Windows source distributions on
   non-Windows platforms, due to distutils not handling manifest file line
   endings correctly.

 * Updated Pyrex support to work with Pyrex 0.9.6 and higher.

 * Minor changes for Jython compatibility, including skipping tests that can't
   work on Jython.

 * Fixed not installing eggs in ``install_requires`` if they were also used for
   ``setup_requires`` or ``tests_require``.

 * Fixed not fetching eggs in ``install_requires`` when running tests.

 * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools
   installations when called from a standalone ``setup.py``.

 * Added a warning if a namespace package is declared, but its parent package
   is not also declared as a namespace.

 * Support Subversion 1.5

 * Removed use of deprecated ``md5`` module if ``hashlib`` is available

 * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice

 * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's
   ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``.

 * Ensure that _full_name is set on all shared libs before extensions are
   checked for shared lib usage.  (Fixes a bug in the experimental shared
   library build support.)

 * Fix to allow unpacked eggs containing native libraries to fail more
   gracefully under Google App Engine (with an ``ImportError`` loading the
   C-based module, instead of getting a ``NameError``).

-----
0.6c7
-----

 * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and
   ``egg_info`` command failing on new, uncommitted SVN directories.

 * Fix import problems with nested namespace packages installed via
   ``--root`` or ``--single-version-externally-managed``, due to the
   parent package not having the child package as an attribute.

-----
0.6c6
-----

 * Added ``--egg-path`` option to ``develop`` command, allowing you to force
   ``.egg-link`` files to use relative paths (allowing them to be shared across
   platforms on a networked drive).

 * Fix not building binary RPMs correctly.

 * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with
   bash-compatible shells.

 * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there
   was whitespace inside a quoted argument or at the end of the ``#!`` line
   (a regression introduced in 0.6c4).

 * Fix ``test`` command possibly failing if an older version of the project
   being tested was installed on ``sys.path`` ahead of the test source
   directory.

 * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in
   their names as packages.

-----
0.6c5
-----

 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg``
   packages under Python versions less than 2.5.

 * Fix uploaded ``bdist_wininst`` packages being described as suitable for
   "any" version by Python 2.5, even if a ``--target-version`` was specified.

-----
0.6c4
-----

 * Overhauled Windows script wrapping to support ``bdist_wininst`` better.
   Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or
   ``#!pythonw.exe`` as the executable name (even when built on non-Windows
   platforms!), and the wrappers will look for the executable in the script's
   parent directory (which should find the right version of Python).

 * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or
   ``bdist_wininst`` under Python 2.3 and 2.4.

 * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is
   prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish
   platforms.  (This is mainly so that setuptools itself can have a single-file
   installer on Unix, without doing multiple downloads, dealing with firewalls,
   etc.)

 * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files

 * Use cross-platform relative paths in ``easy-install.pth`` when doing
   ``develop`` and the source directory is a subdirectory of the installation
   target directory.

 * Fix a problem installing eggs with a system packaging tool if the project
   contained an implicit namespace package; for example if the ``setup()``
   listed a namespace package ``foo.bar`` without explicitly listing ``foo``
   as a namespace package.

-----
0.6c3
-----

 * Fixed breakages caused by Subversion 1.4's new "working copy" format

-----
0.6c2
-----

 * The ``ez_setup`` module displays the conflicting version of setuptools (and
   its installation location) when a script requests a version that's not
   available.

 * Running ``setup.py develop`` on a setuptools-using project will now install
   setuptools if needed, instead of only downloading the egg.

-----
0.6c1
-----

 * Fixed ``AttributeError`` when trying to download a ``setup_requires``
   dependency when a distribution lacks a ``dependency_links`` setting.

 * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so
   as to play better with packaging tools that complain about zero-length
   files.

 * Made ``setup.py develop`` respect the ``--no-deps`` option, which it
   previously was ignoring.

 * Support ``extra_path`` option to ``setup()`` when ``install`` is run in
   backward-compatibility mode.

 * Source distributions now always include a ``setup.cfg`` file that explicitly
   sets ``egg_info`` options such that they produce an identical version number
   to the source distribution's version number.  (Previously, the default
   version number could be different due to the use of ``--tag-date``, or if
   the version was overridden on the command line that built the source
   distribution.)

-----
0.6b4
-----

 * Fix ``register`` not obeying name/version set by ``egg_info`` command, if
   ``egg_info`` wasn't explicitly run first on the same command line.

 * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info``
   command, to allow suppressing tags configured in ``setup.cfg``.

 * Fixed redundant warnings about missing ``README`` file(s); it should now
   appear only if you are actually a source distribution.

-----
0.6b3
-----

 * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``.

 * Allow ``.py`` files found by the ``include_package_data`` option to be
   automatically included.  Remove duplicate data file matches if both
   ``include_package_data`` and ``package_data`` are used to refer to the same
   files.

-----
0.6b1
-----

 * Strip ``module`` from the end of compiled extension modules when computing
   the name of a ``.py`` loader/wrapper.  (Python's import machinery ignores
   this suffix when searching for an extension module.)

------
0.6a11
------

 * Added ``test_loader`` keyword to support custom test loaders

 * Added ``setuptools.file_finders`` entry point group to allow implementing
   revision control plugins.

 * Added ``--identity`` option to ``upload`` command.

 * Added ``dependency_links`` to allow specifying URLs for ``--find-links``.

 * Enhanced test loader to scan packages as well as modules, and call
   ``additional_tests()`` if present to get non-unittest tests.

 * Support namespace packages in conjunction with system packagers, by omitting
   the installation of any ``__init__.py`` files for namespace packages, and
   adding a special ``.pth`` file to create a working package in
   ``sys.modules``.

 * Made ``--single-version-externally-managed`` automatic when ``--root`` is
   used, so that most system packagers won't require special support for
   setuptools.

 * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or
   other configuration files for their option defaults when installing, and
   also made the install use ``--multi-version`` mode so that the project
   directory doesn't need to support .pth files.

 * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading
   it.  Previously, the file could be left open and the actual error would be
   masked by problems trying to remove the open file on Windows systems.

------
0.6a10
------

 * Fixed the ``develop`` command ignoring ``--find-links``.

-----
0.6a9
-----

 * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to
   create source distributions.  ``MANIFEST.in`` is still read and processed,
   as are the standard defaults and pruning.  But the manifest is built inside
   the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt
   every time the ``egg_info`` command is run.

 * Added the ``include_package_data`` keyword to ``setup()``, allowing you to
   automatically include any package data listed in revision control or
   ``MANIFEST.in``

 * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to
   trim back files included via the ``package_data`` and
   ``include_package_data`` options.

 * Fixed ``--tag-svn-revision`` not working when run from a source
   distribution.

 * Added warning for namespace packages with missing ``declare_namespace()``

 * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages
   requiring ``nose`` to run unit tests can make this dependency optional
   unless the ``test`` command is run.

 * Made all commands that use ``easy_install`` respect its configuration
   options, as this was causing some problems with ``setup.py install``.

 * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so
   that you can process a directory tree through a processing filter as if it
   were a zipfile or tarfile.

 * Added an internal ``install_egg_info`` command to use as part of old-style
   ``install`` operations, that installs an ``.egg-info`` directory with the
   package.

 * Added a ``--single-version-externally-managed`` option to the ``install``
   command so that you can more easily wrap a "flat" egg in a system package.

 * Enhanced ``bdist_rpm`` so that it installs single-version eggs that
   don't rely on a ``.pth`` file.  The ``--no-egg`` option has been removed,
   since all RPMs are now built in a more backwards-compatible format.

 * Support full roundtrip translation of eggs to and from ``bdist_wininst``
   format.  Running ``bdist_wininst`` on a setuptools-based package wraps the
   egg in an .exe that will safely install it as an egg (i.e., with metadata
   and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
   back into an ``.egg`` file or directory and install it as such.


-----
0.6a8
-----

 * Fixed some problems building extensions when Pyrex was installed, especially
   with Python 2.4 and/or packages using SWIG.

 * Made ``develop`` command accept all the same options as ``easy_install``,
   and use the ``easy_install`` command's configuration settings as defaults.

 * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision
   number from ``PKG-INFO`` in case it is being run on a source distribution of
   a snapshot taken from a Subversion-based project.

 * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being
   installed as data, adding them to ``native_libs.txt`` automatically.

 * Fixed some problems with fresh checkouts of projects that don't include
   ``.egg-info/PKG-INFO`` under revision control and put the project's source
   code directly in the project directory.  If such a package had any
   requirements that get processed before the ``egg_info`` command can be run,
   the setup scripts would fail with a "Missing 'Version:' header and/or
   PKG-INFO file" error, because the egg runtime interpreted the unbuilt
   metadata in a directory on ``sys.path`` (i.e. the current directory) as
   being a corrupted egg.  Setuptools now monkeypatches the distribution
   metadata cache to pretend that the egg has valid version information, until
   it has a chance to make it actually be so (via the ``egg_info`` command).

-----
0.6a5
-----

 * Fixed missing gui/cli .exe files in distribution.  Fixed bugs in tests.

-----
0.6a3
-----

 * Added ``gui_scripts`` entry point group to allow installing GUI scripts
   on Windows and other platforms.  (The special handling is only for Windows;
   other platforms are treated the same as for ``console_scripts``.)

-----
0.6a2
-----

 * Added ``console_scripts`` entry point group to allow installing scripts
   without the need to create separate script files.  On Windows, console
   scripts get an ``.exe`` wrapper so you can just type their name.  On other
   platforms, the scripts are written without a file extension.

-----
0.6a1
-----

 * Added support for building "old-style" RPMs that don't install an egg for
   the target package, using a ``--no-egg`` option.

 * The ``build_ext`` command now works better when using the ``--inplace``
   option and multiple Python versions.  It now makes sure that all extensions
   match the current Python version, even if newer copies were built for a
   different Python version.

 * The ``upload`` command no longer attaches an extra ``.zip`` when uploading
   eggs, as PyPI now supports egg uploads without trickery.

 * The ``ez_setup`` script/module now displays a warning before downloading
   the setuptools egg, and attempts to check the downloaded egg against an
   internal MD5 checksum table.

 * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the
   latest revision number; it was using the revision number of the directory
   containing ``setup.py``, not the highest revision number in the project.

 * Added ``eager_resources`` setup argument

 * The ``sdist`` command now recognizes Subversion "deleted file" entries and
   does not include them in source distributions.

 * ``setuptools`` now embeds itself more thoroughly into the distutils, so that
   other distutils extensions (e.g. py2exe, py2app) will subclass setuptools'
   versions of things, rather than the native distutils ones.

 * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``;
   ``setup_requires`` allows you to automatically find and download packages
   that are needed in order to *build* your project (as opposed to running it).

 * ``setuptools`` now finds its commands, ``setup()`` argument validators, and
   metadata writers using entry points, so that they can be extended by
   third-party packages.  See `Creating distutils Extensions
   <http://pythonhosted.org/setuptools/setuptools.html#creating-distutils-extensions>`_
   for more details.

 * The vestigial ``depends`` command has been removed.  It was never finished
   or documented, and never would have worked without EasyInstall - which it
   pre-dated and was never compatible with.

------
0.5a12
------

 * The zip-safety scanner now checks for modules that might be used with
   ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't
   handle ``-m`` on zipped modules.

------
0.5a11
------

 * Fix breakage of the "develop" command that was caused by the addition of
   ``--always-unzip`` to the ``easy_install`` command.

-----
0.5a9
-----

 * Include ``svn:externals`` directories in source distributions as well as
   normal subversion-controlled files and directories.

 * Added ``exclude=patternlist`` option to ``setuptools.find_packages()``

 * Changed --tag-svn-revision to include an "r" in front of the revision number
   for better readability.

 * Added ability to build eggs without including source files (except for any
   scripts, of course), using the ``--exclude-source-files`` option to
   ``bdist_egg``.

 * ``setup.py install`` now automatically detects when an "unmanaged" package
   or module is going to be on ``sys.path`` ahead of a package being installed,
   thereby preventing the newer version from being imported.  If this occurs,
   a warning message is output to ``sys.stderr``, but installation proceeds
   anyway.  The warning message informs the user what files or directories
   need deleting, and advises them they can also use EasyInstall (with the
   ``--delete-conflicting`` option) to do it automatically.

 * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata
   directory that lists all top-level modules and packages in the distribution.
   This is used by the ``easy_install`` command to find possibly-conflicting
   "unmanaged" packages when installing the distribution.

 * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``.
   Added package analysis to determine zip-safety if the ``zip_safe`` flag
   is not given, and advise the author regarding what code might need changing.

 * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``.

-----
0.5a8
-----

 * The "egg_info" command now always sets the distribution metadata to "safe"
   forms of the distribution name and version, so that distribution files will
   be generated with parseable names (i.e., ones that don't include '-' in the
   name or version).  Also, this means that if you use the various ``--tag``
   options of "egg_info", any distributions generated will use the tags in the
   version, not just egg distributions.

 * Added support for defining command aliases in distutils configuration files,
   under the "[aliases]" section.  To prevent recursion and to allow aliases to
   call the command of the same name, a given alias can be expanded only once
   per command-line invocation.  You can define new aliases with the "alias"
   command, either for the local, global, or per-user configuration.

 * Added "rotate" command to delete old distribution files, given a set of
   patterns to match and the number of files to keep.  (Keeps the most
   recently-modified distribution files matching each pattern.)

 * Added "saveopts" command that saves all command-line options for the current
   invocation to the local, global, or per-user configuration file.  Useful for
   setting defaults without having to hand-edit a configuration file.

 * Added a "setopt" command that sets a single option in a specified distutils
   configuration file.

-----
0.5a7
-----

 * Added "upload" support for egg and source distributions, including a bug
   fix for "upload" and a temporary workaround for lack of .egg support in
   PyPI.

-----
0.5a6
-----

 * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it
   will include all files under revision control (CVS or Subversion) in the
   current directory, and it will regenerate the list every time you create a
   source distribution, not just when you tell it to.  This should make the
   default "do what you mean" more often than the distutils' default behavior
   did, while still retaining the old behavior in the presence of MANIFEST.in.

 * Fixed the "develop" command always updating .pth files, even if you
   specified ``-n`` or ``--dry-run``.

 * Slightly changed the format of the generated version when you use
   ``--tag-build`` on the "egg_info" command, so that you can make tagged
   revisions compare *lower* than the version specified in setup.py (e.g. by
   using ``--tag-build=dev``).

-----
0.5a5
-----

 * Added ``develop`` command to ``setuptools``-based packages.  This command
   installs an ``.egg-link`` pointing to the package's source directory, and
   script wrappers that ``execfile()`` the source versions of the package's
   scripts.  This lets you put your development checkout(s) on sys.path without
   having to actually install them.  (To uninstall the link, use
   use ``setup.py develop --uninstall``.)

 * Added ``egg_info`` command to ``setuptools``-based packages.  This command
   just creates or updates the "projectname.egg-info" directory, without
   building an egg.  (It's used by the ``bdist_egg``, ``test``, and ``develop``
   commands.)

 * Enhanced the ``test`` command so that it doesn't install the package, but
   instead builds any C extensions in-place, updates the ``.egg-info``
   metadata, adds the source directory to ``sys.path``, and runs the tests
   directly on the source.  This avoids an "unmanaged" installation of the
   package to ``site-packages`` or elsewhere.

 * Made ``easy_install`` a standard ``setuptools`` command, moving it from
   the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
   that if you were importing or extending it, you must now change your imports
   accordingly.  ``easy_install.py`` is still installed as a script, but not as
   a module.

-----
0.5a4
-----

 * Setup scripts using setuptools can now list their dependencies directly in
   the setup.py file, without having to manually create a ``depends.txt`` file.
   The ``install_requires`` and ``extras_require`` arguments to ``setup()``
   are used to create a dependencies file automatically.  If you are manually
   creating ``depends.txt`` right now, please switch to using these setup
   arguments as soon as practical, because ``depends.txt`` support will be
   removed in the 0.6 release cycle.  For documentation on the new arguments,
   see the ``setuptools.dist.Distribution`` class.

 * Setup scripts using setuptools now always install using ``easy_install``
   internally, for ease of uninstallation and upgrading.

-----
0.5a1
-----

 * Added support for "self-installation" bootstrapping.  Packages can now
   include ``ez_setup.py`` in their source distribution, and add the following
   to their ``setup.py``, in order to automatically bootstrap installation of
   setuptools as part of their setup process::

    from ez_setup import use_setuptools
    use_setuptools()

    from setuptools import setup
    # etc...

-----
0.4a2
-----

 * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools
   installation easier, and to allow distributions using setuptools to avoid
   having to include setuptools in their source distribution.

 * All downloads are now managed by the ``PackageIndex`` class (which is now
   subclassable and replaceable), so that embedders can more easily override
   download logic, give download progress reports, etc.  The class has also
   been moved to the new ``setuptools.package_index`` module.

 * The ``Installer`` class no longer handles downloading, manages a temporary
   directory, or tracks the ``zip_ok`` option.  Downloading is now handled
   by ``PackageIndex``, and ``Installer`` has become an ``easy_install``
   command class based on ``setuptools.Command``.

 * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup
   script in a directory sandbox, and a new ``setuptools.archive_util`` module
   with an ``unpack_archive()`` API.  These were split out of EasyInstall to
   allow reuse by other tools and applications.

 * ``setuptools.Command`` now supports reinitializing commands using keyword
   arguments to set/reset options.  Also, ``Command`` subclasses can now set
   their ``command_consumes_arguments`` attribute to ``True`` in order to
   receive an ``args`` option containing the rest of the command line.

-----
0.3a2
-----

 * Added new options to ``bdist_egg`` to allow tagging the egg's version number
   with a subversion revision number, the current date, or an explicit tag
   value.  Run ``setup.py bdist_egg --help`` to get more information.

 * Misc. bug fixes

-----
0.3a1
-----

 * Initial release.


python3.3/site-packages/setuptools-2.0.dist-info/WHEEL000064400000000156151733566760016256 0ustar00Wheel-Version: 1.0
Generator: bdist_wheel (0.22.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

python3.3/site-packages/pkg_resources.py000064400000301137151733566760014306 0ustar00"""Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
"""

import sys
import os
import time
import re
import imp
import zipfile
import zipimport
import warnings
import stat
import functools
import pkgutil
from pkgutil import get_importer

try:
    from urlparse import urlparse, urlunparse
except ImportError:
    from urllib.parse import urlparse, urlunparse

try:
    frozenset
except NameError:
    from sets import ImmutableSet as frozenset
try:
    basestring
    next = lambda o: o.next()
    from cStringIO import StringIO as BytesIO
except NameError:
    basestring = str
    from io import BytesIO
    def execfile(fn, globs=None, locs=None):
        if globs is None:
            globs = globals()
        if locs is None:
            locs = globs
        exec(compile(open(fn).read(), fn, 'exec'), globs, locs)

# capture these to bypass sandboxing
from os import utime
try:
    from os import mkdir, rename, unlink
    WRITE_SUPPORT = True
except ImportError:
    # no write support, probably under GAE
    WRITE_SUPPORT = False

from os import open as os_open
from os.path import isdir, split

# Avoid try/except due to potential problems with delayed import mechanisms.
if sys.version_info >= (3, 3) and sys.implementation.name == "cpython":
    import importlib._bootstrap as importlib_bootstrap
else:
    importlib_bootstrap = None

try:
    import parser
except ImportError:
    pass

def _bypass_ensure_directory(name, mode=0x1FF):  # 0777
    # Sandbox-bypassing version of ensure_directory()
    if not WRITE_SUPPORT:
        raise IOError('"os.mkdir" not supported on this platform.')
    dirname, filename = split(name)
    if dirname and filename and not isdir(dirname):
        _bypass_ensure_directory(dirname)
        mkdir(dirname, mode)


_state_vars = {}

def _declare_state(vartype, **kw):
    g = globals()
    for name, val in kw.items():
        g[name] = val
        _state_vars[name] = vartype

def __getstate__():
    state = {}
    g = globals()
    for k, v in _state_vars.items():
        state[k] = g['_sget_'+v](g[k])
    return state

def __setstate__(state):
    g = globals()
    for k, v in state.items():
        g['_sset_'+_state_vars[k]](k, g[k], v)
    return state

def _sget_dict(val):
    return val.copy()

def _sset_dict(key, ob, state):
    ob.clear()
    ob.update(state)

def _sget_object(val):
    return val.__getstate__()

def _sset_object(key, ob, state):
    ob.__setstate__(state)

_sget_none = _sset_none = lambda *args: None


def get_supported_platform():
    """Return this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    """
    plat = get_build_platform()
    m = macosVersionString.match(plat)
    if m is not None and sys.platform == "darwin":
        try:
            plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3))
        except ValueError:
            pass    # not Mac OS X
    return plat

__all__ = [
    # Basic resource access and distribution/entry point discovery
    'require', 'run_script', 'get_provider',  'get_distribution',
    'load_entry_point', 'get_entry_map', 'get_entry_info', 'iter_entry_points',
    'resource_string', 'resource_stream', 'resource_filename',
    'resource_listdir', 'resource_exists', 'resource_isdir',

    # Environmental control
    'declare_namespace', 'working_set', 'add_activation_listener',
    'find_distributions', 'set_extraction_path', 'cleanup_resources',
    'get_default_cache',

    # Primary implementation classes
    'Environment', 'WorkingSet', 'ResourceManager',
    'Distribution', 'Requirement', 'EntryPoint',

    # Exceptions
    'ResolutionError','VersionConflict','DistributionNotFound','UnknownExtra',
    'ExtractionError',

    # Parsing functions and string utilities
    'parse_requirements', 'parse_version', 'safe_name', 'safe_version',
    'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections',
    'safe_extra', 'to_filename', 'invalid_marker', 'evaluate_marker',

    # filesystem utilities
    'ensure_directory', 'normalize_path',

    # Distribution "precedence" constants
    'EGG_DIST', 'BINARY_DIST', 'SOURCE_DIST', 'CHECKOUT_DIST', 'DEVELOP_DIST',

    # "Provider" interfaces, implementations, and registration/lookup APIs
    'IMetadataProvider', 'IResourceProvider', 'FileMetadata',
    'PathMetadata', 'EggMetadata', 'EmptyProvider', 'empty_provider',
    'NullProvider', 'EggProvider', 'DefaultProvider', 'ZipProvider',
    'register_finder', 'register_namespace_handler', 'register_loader_type',
    'fixup_namespace_packages', 'get_importer',

    # Deprecated/backward compatibility only
    'run_main', 'AvailableDistributions',
]

class ResolutionError(Exception):
    """Abstract base for dependency resolution errors"""
    def __repr__(self):
        return self.__class__.__name__+repr(self.args)

class VersionConflict(ResolutionError):
    """An already-installed version conflicts with the requested version"""

class DistributionNotFound(ResolutionError):
    """A requested distribution was not found"""

class UnknownExtra(ResolutionError):
    """Distribution doesn't have an "extra feature" of the given name"""
_provider_factories = {}

PY_MAJOR = sys.version[:3]
EGG_DIST = 3
BINARY_DIST = 2
SOURCE_DIST = 1
CHECKOUT_DIST = 0
DEVELOP_DIST = -1

def register_loader_type(loader_type, provider_factory):
    """Register `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    """
    _provider_factories[loader_type] = provider_factory

def get_provider(moduleOrReq):
    """Return an IResourceProvider for the named module or requirement"""
    if isinstance(moduleOrReq,Requirement):
        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
    try:
        module = sys.modules[moduleOrReq]
    except KeyError:
        __import__(moduleOrReq)
        module = sys.modules[moduleOrReq]
    loader = getattr(module, '__loader__', None)
    return _find_adapter(_provider_factories, loader)(module)

def _macosx_vers(_cache=[]):
    if not _cache:
        import platform
        version = platform.mac_ver()[0]
        # fallback for MacPorts
        if version == '':
            import plistlib
            plist = '/System/Library/CoreServices/SystemVersion.plist'
            if os.path.exists(plist):
                if hasattr(plistlib, 'readPlist'):
                    plist_content = plistlib.readPlist(plist)
                    if 'ProductVersion' in plist_content:
                        version = plist_content['ProductVersion']

        _cache.append(version.split('.'))
    return _cache[0]

def _macosx_arch(machine):
    return {'PowerPC':'ppc', 'Power_Macintosh':'ppc'}.get(machine,machine)

def get_build_platform():
    """Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    """
    try:
        # Python 2.7 or >=3.2
        from sysconfig import get_platform
    except ImportError:
        from distutils.util import get_platform

    plat = get_platform()
    if sys.platform == "darwin" and not plat.startswith('macosx-'):
        try:
            version = _macosx_vers()
            machine = os.uname()[4].replace(" ", "_")
            return "macosx-%d.%d-%s" % (int(version[0]), int(version[1]),
                _macosx_arch(machine))
        except ValueError:
            # if someone is running a non-Mac darwin system, this will fall
            # through to the default implementation
            pass
    return plat

macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
get_platform = get_build_platform   # XXX backward compat


def compatible_platforms(provided,required):
    """Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    """
    if provided is None or required is None or provided==required:
        return True     # easy case

    # Mac OS X special cases
    reqMac = macosVersionString.match(required)
    if reqMac:
        provMac = macosVersionString.match(provided)

        # is this a Mac package?
        if not provMac:
            # this is backwards compatibility for packages built before
            # setuptools 0.6. All packages built after this point will
            # use the new macosx designation.
            provDarwin = darwinVersionString.match(provided)
            if provDarwin:
                dversion = int(provDarwin.group(1))
                macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2))
                if dversion == 7 and macosversion >= "10.3" or \
                        dversion == 8 and macosversion >= "10.4":

                    #import warnings
                    #warnings.warn("Mac eggs should be rebuilt to "
                    #    "use the macosx designation instead of darwin.",
                    #    category=DeprecationWarning)
                    return True
            return False    # egg isn't macosx or legacy darwin

        # are they the same major version and machine type?
        if provMac.group(1) != reqMac.group(1) or \
                provMac.group(3) != reqMac.group(3):
            return False

        # is the required OS major update >= the provided one?
        if int(provMac.group(2)) > int(reqMac.group(2)):
            return False

        return True

    # XXX Linux and other platforms' special cases should go here
    return False


def run_script(dist_spec, script_name):
    """Locate distribution `dist_spec` and run its `script_name` script"""
    ns = sys._getframe(1).f_globals
    name = ns['__name__']
    ns.clear()
    ns['__name__'] = name
    require(dist_spec)[0].run_script(script_name, ns)

run_main = run_script   # backward compatibility

def get_distribution(dist):
    """Return a current distribution object for a Requirement or string"""
    if isinstance(dist,basestring): dist = Requirement.parse(dist)
    if isinstance(dist,Requirement): dist = get_provider(dist)
    if not isinstance(dist,Distribution):
        raise TypeError("Expected string, Requirement, or Distribution", dist)
    return dist

def load_entry_point(dist, group, name):
    """Return `name` entry point of `group` for `dist` or raise ImportError"""
    return get_distribution(dist).load_entry_point(group, name)

def get_entry_map(dist, group=None):
    """Return the entry point map for `group`, or the full entry map"""
    return get_distribution(dist).get_entry_map(group)

def get_entry_info(dist, group, name):
    """Return the EntryPoint object for `group`+`name`, or ``None``"""
    return get_distribution(dist).get_entry_info(group, name)


class IMetadataProvider:

    def has_metadata(name):
        """Does the package's distribution contain the named metadata?"""

    def get_metadata(name):
        """The named metadata resource as a string"""

    def get_metadata_lines(name):
        """Yield named metadata resource as list of non-blank non-comment lines

       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted."""

    def metadata_isdir(name):
        """Is the named metadata a directory?  (like ``os.path.isdir()``)"""

    def metadata_listdir(name):
        """List of metadata names in the directory (like ``os.listdir()``)"""

    def run_script(script_name, namespace):
        """Execute the named script in the supplied namespace dictionary"""


class IResourceProvider(IMetadataProvider):
    """An object that provides access to package resources"""

    def get_resource_filename(manager, resource_name):
        """Return a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_stream(manager, resource_name):
        """Return a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_string(manager, resource_name):
        """Return a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``"""

    def has_resource(resource_name):
        """Does the package contain the named resource?"""

    def resource_isdir(resource_name):
        """Is the named resource a directory?  (like ``os.path.isdir()``)"""

    def resource_listdir(resource_name):
        """List of resource names in the directory (like ``os.listdir()``)"""


class WorkingSet(object):
    """A collection of active distributions on sys.path (or a similar list)"""

    def __init__(self, entries=None):
        """Create working set from list of path entries (default=sys.path)"""
        self.entries = []
        self.entry_keys = {}
        self.by_key = {}
        self.callbacks = []

        if entries is None:
            entries = sys.path

        for entry in entries:
            self.add_entry(entry)

    def add_entry(self, entry):
        """Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        """
        self.entry_keys.setdefault(entry, [])
        self.entries.append(entry)
        for dist in find_distributions(entry, True):
            self.add(dist, entry, False)

    def __contains__(self,dist):
        """True if `dist` is the active distribution for its project"""
        return self.by_key.get(dist.key) == dist

    def find(self, req):
        """Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        """
        dist = self.by_key.get(req.key)
        if dist is not None and dist not in req:
            raise VersionConflict(dist,req)     # XXX add more info
        else:
            return dist

    def iter_entry_points(self, group, name=None):
        """Yield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        """
        for dist in self:
            entries = dist.get_entry_map(group)
            if name is None:
                for ep in entries.values():
                    yield ep
            elif name in entries:
                yield entries[name]

    def run_script(self, requires, script_name):
        """Locate distribution for `requires` and run `script_name` script"""
        ns = sys._getframe(1).f_globals
        name = ns['__name__']
        ns.clear()
        ns['__name__'] = name
        self.require(requires)[0].run_script(script_name, ns)

    def __iter__(self):
        """Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        """
        seen = {}
        for item in self.entries:
            if item not in self.entry_keys:
                # workaround a cache issue
                continue

            for key in self.entry_keys[item]:
                if key not in seen:
                    seen[key]=1
                    yield self.by_key[key]

    def add(self, dist, entry=None, insert=True):
        """Add `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set.  If it's added, any
        callbacks registered with the ``subscribe()`` method will be called.
        """
        if insert:
            dist.insert_on(self.entries, entry)

        if entry is None:
            entry = dist.location
        keys = self.entry_keys.setdefault(entry,[])
        keys2 = self.entry_keys.setdefault(dist.location,[])
        if dist.key in self.by_key:
            return      # ignore hidden distros

        self.by_key[dist.key] = dist
        if dist.key not in keys:
            keys.append(dist.key)
        if dist.key not in keys2:
            keys2.append(dist.key)
        self._added_new(dist)

    def resolve(self, requirements, env=None, installer=None):
        """List all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
        """

        requirements = list(requirements)[::-1]  # set up the stack
        processed = {}  # set of processed requirements
        best = {}  # key -> dist
        to_activate = []

        while requirements:
            req = requirements.pop(0)   # process dependencies breadth-first
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None:
                    if env is None:
                        env = Environment(self.entries)
                    dist = best[req.key] = env.best_match(req, self, installer)
                    if dist is None:
                        #msg = ("The '%s' distribution was not found on this "
                        #       "system, and is required by this application.")
                        #raise DistributionNotFound(msg % req)

                        # unfortunately, zc.buildout uses a str(err)
                        # to get the name of the distribution here..
                        raise DistributionNotFound(req)
                to_activate.append(dist)
            if dist not in req:
                # Oops, the "best" so far conflicts with a dependency
                raise VersionConflict(dist,req) # XXX put more info here
            requirements.extend(dist.requires(req.extras)[::-1])
            processed[req] = True

        return to_activate    # return list of distros to activate

    def find_plugins(self, plugin_env, full_env=None, installer=None,
            fallback=True):
        """Find all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            map(working_set.add, distributions)  # add plugins+libs to sys.path
            print 'Could not load', errors        # display errors

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        """

        plugin_projects = list(plugin_env)
        plugin_projects.sort()  # scan project names in alphabetic order

        error_info = {}
        distributions = {}

        if full_env is None:
            env = Environment(self.entries)
            env += plugin_env
        else:
            env = full_env + plugin_env

        shadow_set = self.__class__([])
        list(map(shadow_set.add, self))   # put all our entries in shadow_set

        for project_name in plugin_projects:

            for dist in plugin_env[project_name]:

                req = [dist.as_requirement()]

                try:
                    resolvees = shadow_set.resolve(req, env, installer)

                except ResolutionError:
                    v = sys.exc_info()[1]
                    error_info[dist] = v    # save error info
                    if fallback:
                        continue    # try the next older version of project
                    else:
                        break       # give up on this project, keep going

                else:
                    list(map(shadow_set.add, resolvees))
                    distributions.update(dict.fromkeys(resolvees))

                    # success, no need to try any more versions of this project
                    break

        distributions = list(distributions)
        distributions.sort()

        return distributions, error_info

    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
        needed = self.resolve(parse_requirements(requirements))

        for dist in needed:
            self.add(dist)

        return needed

    def subscribe(self, callback):
        """Invoke `callback` for all distributions (including existing ones)"""
        if callback in self.callbacks:
            return
        self.callbacks.append(callback)
        for dist in self:
            callback(dist)

    def _added_new(self, dist):
        for callback in self.callbacks:
            callback(dist)

    def __getstate__(self):
        return (
            self.entries[:], self.entry_keys.copy(), self.by_key.copy(),
            self.callbacks[:]
        )

    def __setstate__(self, e_k_b_c):
        entries, keys, by_key, callbacks = e_k_b_c
        self.entries = entries[:]
        self.entry_keys = keys.copy()
        self.by_key = by_key.copy()
        self.callbacks = callbacks[:]


class Environment(object):
    """Searchable snapshot of distributions on a search path"""

    def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
        """Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.3'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        """
        self._distmap = {}
        self._cache = {}
        self.platform = platform
        self.python = python
        self.scan(search_path)

    def can_add(self, dist):
        """Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        """
        return (self.python is None or dist.py_version is None
            or dist.py_version==self.python) \
            and compatible_platforms(dist.platform,self.platform)

    def remove(self, dist):
        """Remove `dist` from the environment"""
        self._distmap[dist.key].remove(dist)

    def scan(self, search_path=None):
        """Scan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        """
        if search_path is None:
            search_path = sys.path

        for item in search_path:
            for dist in find_distributions(item):
                self.add(dist)

    def __getitem__(self,project_name):
        """Return a newest-to-oldest list of distributions for `project_name`
        """
        try:
            return self._cache[project_name]
        except KeyError:
            project_name = project_name.lower()
            if project_name not in self._distmap:
                return []

        if project_name not in self._cache:
            dists = self._cache[project_name] = self._distmap[project_name]
            _sort_dists(dists)

        return self._cache[project_name]

    def add(self,dist):
        """Add `dist` if we ``can_add()`` it and it isn't already added"""
        if self.can_add(dist) and dist.has_version():
            dists = self._distmap.setdefault(dist.key,[])
            if dist not in dists:
                dists.append(dist)
                if dist.key in self._cache:
                    _sort_dists(self._cache[dist.key])

    def best_match(self, req, working_set, installer=None):
        """Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        """
        dist = working_set.find(req)
        if dist is not None:
            return dist
        for dist in self[req.key]:
            if dist in req:
                return dist
        return self.obtain(req, installer) # try and download/install

    def obtain(self, requirement, installer=None):
        """Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument."""
        if installer is not None:
            return installer(requirement)

    def __iter__(self):
        """Yield the unique project names of the available distributions"""
        for key in self._distmap.keys():
            if self[key]: yield key

    def __iadd__(self, other):
        """In-place addition of a distribution or environment"""
        if isinstance(other,Distribution):
            self.add(other)
        elif isinstance(other,Environment):
            for project in other:
                for dist in other[project]:
                    self.add(dist)
        else:
            raise TypeError("Can't add %r to environment" % (other,))
        return self

    def __add__(self, other):
        """Add an environment or distribution to an environment"""
        new = self.__class__([], platform=None, python=None)
        for env in self, other:
            new += env
        return new


AvailableDistributions = Environment    # XXX backward compatibility


class ExtractionError(RuntimeError):
    """An error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    """


class ResourceManager:
    """Manage resource extraction and packages"""
    extraction_path = None

    def __init__(self):
        self.cached_files = {}

    def resource_exists(self, package_or_requirement, resource_name):
        """Does the named resource exist?"""
        return get_provider(package_or_requirement).has_resource(resource_name)

    def resource_isdir(self, package_or_requirement, resource_name):
        """Is the named resource an existing directory?"""
        return get_provider(package_or_requirement).resource_isdir(
            resource_name
        )

    def resource_filename(self, package_or_requirement, resource_name):
        """Return a true filesystem path for specified resource"""
        return get_provider(package_or_requirement).get_resource_filename(
            self, resource_name
        )

    def resource_stream(self, package_or_requirement, resource_name):
        """Return a readable file-like object for specified resource"""
        return get_provider(package_or_requirement).get_resource_stream(
            self, resource_name
        )

    def resource_string(self, package_or_requirement, resource_name):
        """Return specified resource as a string"""
        return get_provider(package_or_requirement).get_resource_string(
            self, resource_name
        )

    def resource_listdir(self, package_or_requirement, resource_name):
        """List the contents of the named resource directory"""
        return get_provider(package_or_requirement).resource_listdir(
            resource_name
        )

    def extraction_error(self):
        """Give an error message for problems extracting file(s)"""

        old_exc = sys.exc_info()[1]
        cache_path = self.extraction_path or get_default_cache()

        err = ExtractionError("""Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  %s

The Python egg cache directory is currently set to:

  %s

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
""" % (old_exc, cache_path)
        )
        err.manager = self
        err.cache_path = cache_path
        err.original_error = old_exc
        raise err

    def get_cache_path(self, archive_name, names=()):
        """Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        """
        extract_path = self.extraction_path or get_default_cache()
        target_path = os.path.join(extract_path, archive_name+'-tmp', *names)
        try:
            _bypass_ensure_directory(target_path)
        except:
            self.extraction_error()

        self._warn_unsafe_extraction_path(extract_path)

        self.cached_files[target_path] = 1
        return target_path

    @staticmethod
    def _warn_unsafe_extraction_path(path):
        """
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        """
        if os.name == 'nt' and not path.startswith(os.environ['windir']):
            # On Windows, permissions are generally restrictive by default
            #  and temp directories are not writable by other users, so
            #  bypass the warning.
            return
        mode = os.stat(path).st_mode
        if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
            msg = ("%s is writable by group/others and vulnerable to attack "
                "when "
                "used with get_resource_filename. Consider a more secure "
                "location (set with .set_extraction_path or the "
                "PYTHON_EGG_CACHE environment variable)." % path)
            warnings.warn(msg, UserWarning)

    def postprocess(self, tempname, filename):
        """Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        """

        if os.name == 'posix':
            # Make the resource executable
            mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777
            os.chmod(tempname, mode)

    def set_extraction_path(self, path):
        """Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        """
        if self.cached_files:
            raise ValueError(
                "Can't change extraction path, files already extracted"
            )

        self.extraction_path = path

    def cleanup_resources(self, force=False):
        """
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        """
        # XXX

def get_default_cache():
    """Determine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    """
    try:
        return os.environ['PYTHON_EGG_CACHE']
    except KeyError:
        pass

    if os.name!='nt':
        return os.path.expanduser('~/.python-eggs')

    app_data = 'Application Data'   # XXX this may be locale-specific!
    app_homes = [
        (('APPDATA',), None),       # best option, should be locale-safe
        (('USERPROFILE',), app_data),
        (('HOMEDRIVE','HOMEPATH'), app_data),
        (('HOMEPATH',), app_data),
        (('HOME',), None),
        (('WINDIR',), app_data),    # 95/98/ME
    ]

    for keys, subdir in app_homes:
        dirname = ''
        for key in keys:
            if key in os.environ:
                dirname = os.path.join(dirname, os.environ[key])
            else:
                break
        else:
            if subdir:
                dirname = os.path.join(dirname,subdir)
            return os.path.join(dirname, 'Python-Eggs')
    else:
        raise RuntimeError(
            "Please set the PYTHON_EGG_CACHE enviroment variable"
        )

def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    """
    version = version.replace(' ','.')
    return re.sub('[^A-Za-z0-9.]+', '-', version)


def safe_extra(extra):
    """Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    """
    return re.sub('[^A-Za-z0-9.]+', '_', extra).lower()


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-','_')

_marker_names = {
    'os': ['name'], 'sys': ['platform'],
    'platform': ['version','machine','python_implementation'],
    'python_version': [], 'python_full_version': [], 'extra':[],
}

_marker_values = {
    'os_name': lambda: os.name,
    'sys_platform': lambda: sys.platform,
    'python_full_version': lambda: sys.version.split()[0],
    'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]),
    'platform_version': lambda: _platinfo('version'),
    'platform_machine': lambda: _platinfo('machine'),
    'python_implementation': lambda: _platinfo('python_implementation') or _pyimp(),
}

def _platinfo(attr):
    try:
        import platform
    except ImportError:
        return ''
    return getattr(platform, attr, lambda:'')()

def _pyimp():
    if sys.platform=='cli':
        return 'IronPython'
    elif sys.platform.startswith('java'):
        return 'Jython'
    elif '__pypy__' in sys.builtin_module_names:
        return 'PyPy'
    else:
        return 'CPython'

def normalize_exception(exc):
    """
    Given a SyntaxError from a marker evaluation, normalize the error message:
     - Remove indications of filename and line number.
     - Replace platform-specific error messages with standard error messages.
    """
    subs = {
        'unexpected EOF while parsing': 'invalid syntax',
        'parenthesis is never closed': 'invalid syntax',
    }
    exc.filename = None
    exc.lineno = None
    exc.msg = subs.get(exc.msg, exc.msg)
    return exc


def invalid_marker(text):
    """Validate text as a PEP 426 environment marker; return exception or False"""
    try:
        evaluate_marker(text)
    except SyntaxError:
        return normalize_exception(sys.exc_info()[1])
    return False

def evaluate_marker(text, extra=None, _ops={}):
    """
    Evaluate a PEP 426 environment marker on CPython 2.4+.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.

    This implementation uses the 'parser' module, which is not implemented on
    Jython and has been superseded by the 'ast' module in Python 2.6 and
    later.
    """

    if not _ops:

        from token import NAME, STRING
        import token
        import symbol
        import operator

        def and_test(nodelist):
            # MUST NOT short-circuit evaluation, or invalid syntax can be skipped!
            return functools.reduce(operator.and_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)])

        def test(nodelist):
            # MUST NOT short-circuit evaluation, or invalid syntax can be skipped!
            return functools.reduce(operator.or_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)])

        def atom(nodelist):
            t = nodelist[1][0]
            if t == token.LPAR:
                if nodelist[2][0] == token.RPAR:
                    raise SyntaxError("Empty parentheses")
                return interpret(nodelist[2])
            raise SyntaxError("Language feature not supported in environment markers")

        def comparison(nodelist):
            if len(nodelist)>4:
                raise SyntaxError("Chained comparison not allowed in environment markers")
            comp = nodelist[2][1]
            cop = comp[1]
            if comp[0] == NAME:
                if len(nodelist[2]) == 3:
                    if cop == 'not':
                        cop = 'not in'
                    else:
                        cop = 'is not'
            try:
                cop = _ops[cop]
            except KeyError:
                raise SyntaxError(repr(cop)+" operator not allowed in environment markers")
            return cop(evaluate(nodelist[1]), evaluate(nodelist[3]))

        _ops.update({
            symbol.test: test, symbol.and_test: and_test, symbol.atom: atom,
            symbol.comparison: comparison, 'not in': lambda x,y: x not in y,
            'in': lambda x,y: x in y, '==': operator.eq, '!=': operator.ne,
        })
        if hasattr(symbol,'or_test'):
            _ops[symbol.or_test] = test

    def interpret(nodelist):
        while len(nodelist)==2: nodelist = nodelist[1]
        try:
            op = _ops[nodelist[0]]
        except KeyError:
            raise SyntaxError("Comparison or logical expression expected")
            raise SyntaxError("Language feature not supported in environment markers: "+symbol.sym_name[nodelist[0]])
        return op(nodelist)

    def evaluate(nodelist):
        while len(nodelist)==2: nodelist = nodelist[1]
        kind = nodelist[0]
        name = nodelist[1]
        #while len(name)==2: name = name[1]
        if kind==NAME:
            try:
                op = _marker_values[name]
            except KeyError:
                raise SyntaxError("Unknown name %r" % name)
            return op()
        if kind==STRING:
            s = nodelist[1]
            if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \
                    or '\\' in s:
                raise SyntaxError(
                    "Only plain strings allowed in environment markers")
            return s[1:-1]
        raise SyntaxError("Language feature not supported in environment markers")

    return interpret(parser.expr(text).totuple(1)[1])

def _markerlib_evaluate(text):
    """
    Evaluate a PEP 426 environment marker using markerlib.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.
    """
    import _markerlib
    # markerlib implements Metadata 1.2 (PEP 345) environment markers.
    # Translate the variables to Metadata 2.0 (PEP 426).
    env = _markerlib.default_environment()
    for key in env.keys():
        new_key = key.replace('.', '_')
        env[new_key] = env.pop(key)
    try:
        result = _markerlib.interpret(text, env)
    except NameError:
        e = sys.exc_info()[1]
        raise SyntaxError(e.args[0])
    return result

if 'parser' not in globals():
    # fallback to less-complete _markerlib implementation if 'parser' module
    #  is not available.
    evaluate_marker = _markerlib_evaluate

class NullProvider:
    """Try to implement resources and metadata for arbitrary PEP 302 loaders"""

    egg_name = None
    egg_info = None
    loader = None

    def __init__(self, module):
        self.loader = getattr(module, '__loader__', None)
        self.module_path = os.path.dirname(getattr(module, '__file__', ''))

    def get_resource_filename(self, manager, resource_name):
        return self._fn(self.module_path, resource_name)

    def get_resource_stream(self, manager, resource_name):
        return BytesIO(self.get_resource_string(manager, resource_name))

    def get_resource_string(self, manager, resource_name):
        return self._get(self._fn(self.module_path, resource_name))

    def has_resource(self, resource_name):
        return self._has(self._fn(self.module_path, resource_name))

    def has_metadata(self, name):
        return self.egg_info and self._has(self._fn(self.egg_info,name))

    if sys.version_info <= (3,):
        def get_metadata(self, name):
            if not self.egg_info:
                return ""
            return self._get(self._fn(self.egg_info,name))
    else:
        def get_metadata(self, name):
            if not self.egg_info:
                return ""
            return self._get(self._fn(self.egg_info,name)).decode("utf-8")

    def get_metadata_lines(self, name):
        return yield_lines(self.get_metadata(name))

    def resource_isdir(self,resource_name):
        return self._isdir(self._fn(self.module_path, resource_name))

    def metadata_isdir(self,name):
        return self.egg_info and self._isdir(self._fn(self.egg_info,name))

    def resource_listdir(self,resource_name):
        return self._listdir(self._fn(self.module_path,resource_name))

    def metadata_listdir(self,name):
        if self.egg_info:
            return self._listdir(self._fn(self.egg_info,name))
        return []

    def run_script(self,script_name,namespace):
        script = 'scripts/'+script_name
        if not self.has_metadata(script):
            raise ResolutionError("No script named %r" % script_name)
        script_text = self.get_metadata(script).replace('\r\n','\n')
        script_text = script_text.replace('\r','\n')
        script_filename = self._fn(self.egg_info,script)
        namespace['__file__'] = script_filename
        if os.path.exists(script_filename):
            execfile(script_filename, namespace, namespace)
        else:
            from linecache import cache
            cache[script_filename] = (
                len(script_text), 0, script_text.split('\n'), script_filename
            )
            script_code = compile(script_text,script_filename,'exec')
            exec(script_code, namespace, namespace)

    def _has(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _isdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _listdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _fn(self, base, resource_name):
        if resource_name:
            return os.path.join(base, *resource_name.split('/'))
        return base

    def _get(self, path):
        if hasattr(self.loader, 'get_data'):
            return self.loader.get_data(path)
        raise NotImplementedError(
            "Can't perform this operation for loaders without 'get_data()'"
        )

register_loader_type(object, NullProvider)


class EggProvider(NullProvider):
    """Provider based on a virtual filesystem"""

    def __init__(self,module):
        NullProvider.__init__(self,module)
        self._setup_prefix()

    def _setup_prefix(self):
        # we assume here that our metadata may be nested inside a "basket"
        # of multiple eggs; that's why we use module_path instead of .archive
        path = self.module_path
        old = None
        while path!=old:
            if path.lower().endswith('.egg'):
                self.egg_name = os.path.basename(path)
                self.egg_info = os.path.join(path, 'EGG-INFO')
                self.egg_root = path
                break
            old = path
            path, base = os.path.split(path)

class DefaultProvider(EggProvider):
    """Provides access to package resources in the filesystem"""

    def _has(self, path):
        return os.path.exists(path)

    def _isdir(self,path):
        return os.path.isdir(path)

    def _listdir(self,path):
        return os.listdir(path)

    def get_resource_stream(self, manager, resource_name):
        return open(self._fn(self.module_path, resource_name), 'rb')

    def _get(self, path):
        stream = open(path, 'rb')
        try:
            return stream.read()
        finally:
            stream.close()

register_loader_type(type(None), DefaultProvider)

if importlib_bootstrap is not None:
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)


class EmptyProvider(NullProvider):
    """Provider that returns nothing for all requests"""

    _isdir = _has = lambda self,path: False
    _get = lambda self,path: ''
    _listdir = lambda self,path: []
    module_path = None

    def __init__(self):
        pass

empty_provider = EmptyProvider()


def build_zipmanifest(path):
    """
    This builds a similar dictionary to the zipimport directory
    caches.  However instead of tuples, ZipInfo objects are stored.

    The translation of the tuple is as follows:
      * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep
              on pypy it is the same (one reason why distribute did work
              in some cases on pypy and win32).
      * [1] - zipinfo.compress_type
      * [2] - zipinfo.compress_size
      * [3] - zipinfo.file_size
      * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
              len(ascii encoding of filename) otherwise
      * [5] - (zipinfo.date_time[0] - 1980) << 9 |
               zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
      * [6] - (zipinfo.date_time[3] - 1980) << 11 |
               zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
      * [7] - zipinfo.CRC
    """
    zipinfo = dict()
    zfile = zipfile.ZipFile(path)
    #Got ZipFile has not __exit__ on python 3.1
    try:
        for zitem in zfile.namelist():
            zpath = zitem.replace('/', os.sep)
            zipinfo[zpath] = zfile.getinfo(zitem)
            assert zipinfo[zpath] is not None
    finally:
        zfile.close()
    return zipinfo


class ZipProvider(EggProvider):
    """Resource support for zips and eggs"""

    eagers = None

    def __init__(self, module):
        EggProvider.__init__(self,module)
        self.zipinfo = build_zipmanifest(self.loader.archive)
        self.zip_pre = self.loader.archive+os.sep

    def _zipinfo_name(self, fspath):
        # Convert a virtual filename (full path to file) into a zipfile subpath
        # usable with the zipimport directory cache for our target archive
        if fspath.startswith(self.zip_pre):
            return fspath[len(self.zip_pre):]
        raise AssertionError(
            "%s is not a subpath of %s" % (fspath,self.zip_pre)
        )

    def _parts(self,zip_path):
        # Convert a zipfile subpath into an egg-relative path part list
        fspath = self.zip_pre+zip_path  # pseudo-fs path
        if fspath.startswith(self.egg_root+os.sep):
            return fspath[len(self.egg_root)+1:].split(os.sep)
        raise AssertionError(
            "%s is not a subpath of %s" % (fspath,self.egg_root)
        )

    def get_resource_filename(self, manager, resource_name):
        if not self.egg_name:
            raise NotImplementedError(
                "resource_filename() only supported for .egg, not .zip"
            )
        # no need to lock for extraction, since we use temp names
        zip_path = self._resource_to_zip(resource_name)
        eagers = self._get_eager_resources()
        if '/'.join(self._parts(zip_path)) in eagers:
            for name in eagers:
                self._extract_resource(manager, self._eager_to_zip(name))
        return self._extract_resource(manager, zip_path)

    @staticmethod
    def _get_date_and_size(zip_stat):
        size = zip_stat.file_size
        date_time = zip_stat.date_time + (0, 0, -1)  # ymdhms+wday, yday, dst
        #1980 offset already done
        timestamp = time.mktime(date_time)
        return timestamp, size

    def _extract_resource(self, manager, zip_path):

        if zip_path in self._index():
            for name in self._index()[zip_path]:
                last = self._extract_resource(
                    manager, os.path.join(zip_path, name)
                )
            return os.path.dirname(last)  # return the extracted directory name

        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])

        if not WRITE_SUPPORT:
            raise IOError('"os.rename" and "os.unlink" are not supported '
                          'on this platform')
        try:

            real_path = manager.get_cache_path(
                self.egg_name, self._parts(zip_path)
            )

            if self._is_current(real_path, zip_path):
                return real_path

            outf, tmpnam = _mkstemp(".$extract", dir=os.path.dirname(real_path))
            os.write(outf, self.loader.get_data(zip_path))
            os.close(outf)
            utime(tmpnam, (timestamp,timestamp))
            manager.postprocess(tmpnam, real_path)

            try:
                rename(tmpnam, real_path)

            except os.error:
                if os.path.isfile(real_path):
                    if self._is_current(real_path, zip_path):
                        # the file became current since it was checked above,
                        #  so proceed.
                        return real_path
                    elif os.name=='nt':     # Windows, del old file and retry
                        unlink(real_path)
                        rename(tmpnam, real_path)
                        return real_path
                raise

        except os.error:
            manager.extraction_error()  # report a user-friendly error

        return real_path

    def _is_current(self, file_path, zip_path):
        """
        Return True if the file_path is current for this zip_path
        """
        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
        if not os.path.isfile(file_path):
            return False
        stat = os.stat(file_path)
        if stat.st_size!=size or stat.st_mtime!=timestamp:
            return False
        # check that the contents match
        zip_contents = self.loader.get_data(zip_path)
        f = open(file_path, 'rb')
        file_contents = f.read()
        f.close()
        return zip_contents == file_contents

    def _get_eager_resources(self):
        if self.eagers is None:
            eagers = []
            for name in ('native_libs.txt', 'eager_resources.txt'):
                if self.has_metadata(name):
                    eagers.extend(self.get_metadata_lines(name))
            self.eagers = eagers
        return self.eagers

    def _index(self):
        try:
            return self._dirindex
        except AttributeError:
            ind = {}
            for path in self.zipinfo:
                parts = path.split(os.sep)
                while parts:
                    parent = os.sep.join(parts[:-1])
                    if parent in ind:
                        ind[parent].append(parts[-1])
                        break
                    else:
                        ind[parent] = [parts.pop()]
            self._dirindex = ind
            return ind

    def _has(self, fspath):
        zip_path = self._zipinfo_name(fspath)
        return zip_path in self.zipinfo or zip_path in self._index()

    def _isdir(self,fspath):
        return self._zipinfo_name(fspath) in self._index()

    def _listdir(self,fspath):
        return list(self._index().get(self._zipinfo_name(fspath), ()))

    def _eager_to_zip(self,resource_name):
        return self._zipinfo_name(self._fn(self.egg_root,resource_name))

    def _resource_to_zip(self,resource_name):
        return self._zipinfo_name(self._fn(self.module_path,resource_name))

register_loader_type(zipimport.zipimporter, ZipProvider)


class FileMetadata(EmptyProvider):
    """Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    """

    def __init__(self,path):
        self.path = path

    def has_metadata(self,name):
        return name=='PKG-INFO'

    def get_metadata(self,name):
        if name=='PKG-INFO':
            f = open(self.path,'rU')
            metadata = f.read()
            f.close()
            return metadata
        raise KeyError("No metadata except PKG-INFO is available")

    def get_metadata_lines(self,name):
        return yield_lines(self.get_metadata(name))


class PathMetadata(DefaultProvider):
    """Metadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir,project_name=dist_name,metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    """

    def __init__(self, path, egg_info):
        self.module_path = path
        self.egg_info = egg_info


class EggMetadata(ZipProvider):
    """Metadata provider for .egg files"""

    def __init__(self, importer):
        """Create a metadata provider from a zipimporter"""

        self.zipinfo = build_zipmanifest(importer.archive)
        self.zip_pre = importer.archive+os.sep
        self.loader = importer
        if importer.prefix:
            self.module_path = os.path.join(importer.archive, importer.prefix)
        else:
            self.module_path = importer.archive
        self._setup_prefix()

_declare_state('dict', _distribution_finders = {})

def register_finder(importer_type, distribution_finder):
    """Register `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example."""
    _distribution_finders[importer_type] = distribution_finder


def find_distributions(path_item, only=False):
    """Yield distributions accessible via `path_item`"""
    importer = get_importer(path_item)
    finder = _find_adapter(_distribution_finders, importer)
    return finder(importer, path_item, only)

def find_in_zip(importer, path_item, only=False):
    metadata = EggMetadata(importer)
    if metadata.has_metadata('PKG-INFO'):
        yield Distribution.from_filename(path_item, metadata=metadata)
    if only:
        return  # don't yield nested distros
    for subitem in metadata.resource_listdir('/'):
        if subitem.endswith('.egg'):
            subpath = os.path.join(path_item, subitem)
            for dist in find_in_zip(zipimport.zipimporter(subpath), subpath):
                yield dist

register_finder(zipimport.zipimporter, find_in_zip)

def find_nothing(importer, path_item, only=False):
    return ()
register_finder(object,find_nothing)

def find_on_path(importer, path_item, only=False):
    """Yield distributions accessible on a sys.path directory"""
    path_item = _normalize_cached(path_item)

    if os.path.isdir(path_item) and os.access(path_item, os.R_OK):
        if path_item.lower().endswith('.egg'):
            # unpacked egg
            yield Distribution.from_filename(
                path_item, metadata=PathMetadata(
                    path_item, os.path.join(path_item,'EGG-INFO')
                )
            )
        else:
            # scan for .egg and .egg-info in directory
            for entry in os.listdir(path_item):
                lower = entry.lower()
                if lower.endswith('.egg-info') or lower.endswith('.dist-info'):
                    fullpath = os.path.join(path_item, entry)
                    if os.path.isdir(fullpath):
                        # egg-info directory, allow getting metadata
                        metadata = PathMetadata(path_item, fullpath)
                    else:
                        metadata = FileMetadata(fullpath)
                    yield Distribution.from_location(
                        path_item,entry,metadata,precedence=DEVELOP_DIST
                    )
                elif not only and lower.endswith('.egg'):
                    for dist in find_distributions(os.path.join(path_item, entry)):
                        yield dist
                elif not only and lower.endswith('.egg-link'):
                    entry_file = open(os.path.join(path_item, entry))
                    try:
                        entry_lines = entry_file.readlines()
                    finally:
                        entry_file.close()
                    for line in entry_lines:
                        if not line.strip(): continue
                        for item in find_distributions(os.path.join(path_item,line.rstrip())):
                            yield item
                        break
register_finder(pkgutil.ImpImporter,find_on_path)

if importlib_bootstrap is not None:
    register_finder(importlib_bootstrap.FileFinder, find_on_path)

_declare_state('dict', _namespace_handlers={})
_declare_state('dict', _namespace_packages={})


def register_namespace_handler(importer_type, namespace_handler):
    """Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer,path_entry,moduleName,module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    """
    _namespace_handlers[importer_type] = namespace_handler

def _handle_ns(packageName, path_item):
    """Ensure that named package includes a subpath of path_item (if needed)"""
    importer = get_importer(path_item)
    if importer is None:
        return None
    loader = importer.find_module(packageName)
    if loader is None:
        return None
    module = sys.modules.get(packageName)
    if module is None:
        module = sys.modules[packageName] = imp.new_module(packageName)
        module.__path__ = []
        _set_parent_ns(packageName)
    elif not hasattr(module,'__path__'):
        raise TypeError("Not a package:", packageName)
    handler = _find_adapter(_namespace_handlers, importer)
    subpath = handler(importer,path_item,packageName,module)
    if subpath is not None:
        path = module.__path__
        path.append(subpath)
        loader.load_module(packageName)
        module.__path__ = path
    return subpath

def declare_namespace(packageName):
    """Declare that package 'packageName' is a namespace package"""

    imp.acquire_lock()
    try:
        if packageName in _namespace_packages:
            return

        path, parent = sys.path, None
        if '.' in packageName:
            parent = '.'.join(packageName.split('.')[:-1])
            declare_namespace(parent)
            if parent not in _namespace_packages:
                __import__(parent)
            try:
                path = sys.modules[parent].__path__
            except AttributeError:
                raise TypeError("Not a package:", parent)

        # Track what packages are namespaces, so when new path items are added,
        # they can be updated
        _namespace_packages.setdefault(parent,[]).append(packageName)
        _namespace_packages.setdefault(packageName,[])

        for path_item in path:
            # Ensure all the parent's path items are reflected in the child,
            # if they apply
            _handle_ns(packageName, path_item)

    finally:
        imp.release_lock()

def fixup_namespace_packages(path_item, parent=None):
    """Ensure that previously-declared namespace packages include path_item"""
    imp.acquire_lock()
    try:
        for package in _namespace_packages.get(parent,()):
            subpath = _handle_ns(package, path_item)
            if subpath: fixup_namespace_packages(subpath,package)
    finally:
        imp.release_lock()

def file_ns_handler(importer, path_item, packageName, module):
    """Compute an ns-package subpath for a filesystem or zipfile importer"""

    subpath = os.path.join(path_item, packageName.split('.')[-1])
    normalized = _normalize_cached(subpath)
    for item in module.__path__:
        if _normalize_cached(item)==normalized:
            break
    else:
        # Only return the path if it's not already there
        return subpath

register_namespace_handler(pkgutil.ImpImporter,file_ns_handler)
register_namespace_handler(zipimport.zipimporter,file_ns_handler)

if importlib_bootstrap is not None:
    register_namespace_handler(importlib_bootstrap.FileFinder, file_ns_handler)


def null_ns_handler(importer, path_item, packageName, module):
    return None

register_namespace_handler(object,null_ns_handler)


def normalize_path(filename):
    """Normalize a file/dir name for comparison purposes"""
    return os.path.normcase(os.path.realpath(filename))

def _normalize_cached(filename,_cache={}):
    try:
        return _cache[filename]
    except KeyError:
        _cache[filename] = result = normalize_path(filename)
        return result

def _set_parent_ns(packageName):
    parts = packageName.split('.')
    name = parts.pop()
    if parts:
        parent = '.'.join(parts)
        setattr(sys.modules[parent], name, sys.modules[packageName])


def yield_lines(strs):
    """Yield non-empty/non-comment lines of a ``basestring`` or sequence"""
    if isinstance(strs,basestring):
        for s in strs.splitlines():
            s = s.strip()
            if s and not s.startswith('#'):     # skip blank lines/comments
                yield s
    else:
        for ss in strs:
            for s in yield_lines(ss):
                yield s

LINE_END = re.compile(r"\s*(#.*)?$").match         # whitespace and comment
CONTINUE = re.compile(r"\s*\\\s*(#.*)?$").match    # line continuation
DISTRO = re.compile(r"\s*((\w|[-.])+)").match    # Distribution or extra
VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match  # ver. info
COMMA = re.compile(r"\s*,").match               # comma between items
OBRACKET = re.compile(r"\s*\[").match
CBRACKET = re.compile(r"\s*\]").match
MODULE = re.compile(r"\w+(\.\w+)*$").match
EGG_NAME = re.compile(
    r"(?P<name>[^-]+)"
    r"( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?",
    re.VERBOSE | re.IGNORECASE
).match

component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE)
replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'}.get

def _parse_version_parts(s):
    for part in component_re.split(s):
        part = replace(part,part)
        if not part or part=='.':
            continue
        if part[:1] in '0123456789':
            yield part.zfill(8)    # pad for numeric comparison
        else:
            yield '*'+part

    yield '*final'  # ensure that alpha/beta/candidate are before final

def parse_version(s):
    """Convert a version string to a chronologically-sortable key

    This is a rough cross between distutils' StrictVersion and LooseVersion;
    if you give it versions that would work with StrictVersion, then it behaves
    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    *possible* to create pathological version coding schemes that will fool
    this parser, but they should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    than any other pre-release tag.
    """
    parts = []
    for part in _parse_version_parts(s.lower()):
        if part.startswith('*'):
            if part<'*final':   # remove '-' before a prerelease tag
                while parts and parts[-1]=='*final-': parts.pop()
            # remove trailing zeros from each series of numeric parts
            while parts and parts[-1]=='00000000':
                parts.pop()
        parts.append(part)
    return tuple(parts)
class EntryPoint(object):
    """Object representing an advertised importable object"""

    def __init__(self, name, module_name, attrs=(), extras=(), dist=None):
        if not MODULE(module_name):
            raise ValueError("Invalid module name", module_name)
        self.name = name
        self.module_name = module_name
        self.attrs = tuple(attrs)
        self.extras = Requirement.parse(("x[%s]" % ','.join(extras))).extras
        self.dist = dist

    def __str__(self):
        s = "%s = %s" % (self.name, self.module_name)
        if self.attrs:
            s += ':' + '.'.join(self.attrs)
        if self.extras:
            s += ' [%s]' % ','.join(self.extras)
        return s

    def __repr__(self):
        return "EntryPoint.parse(%r)" % str(self)

    def load(self, require=True, env=None, installer=None):
        if require: self.require(env, installer)
        entry = __import__(self.module_name, globals(),globals(), ['__name__'])
        for attr in self.attrs:
            try:
                entry = getattr(entry,attr)
            except AttributeError:
                raise ImportError("%r has no %r attribute" % (entry,attr))
        return entry

    def require(self, env=None, installer=None):
        if self.extras and not self.dist:
            raise UnknownExtra("Can't require() without a distribution", self)
        list(map(working_set.add,
            working_set.resolve(self.dist.requires(self.extras),env,installer)))

    #@classmethod
    def parse(cls, src, dist=None):
        """Parse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        """
        try:
            attrs = extras = ()
            name,value = src.split('=',1)
            if '[' in value:
                value,extras = value.split('[',1)
                req = Requirement.parse("x["+extras)
                if req.specs: raise ValueError
                extras = req.extras
            if ':' in value:
                value,attrs = value.split(':',1)
                if not MODULE(attrs.rstrip()):
                    raise ValueError
                attrs = attrs.rstrip().split('.')
        except ValueError:
            raise ValueError(
                "EntryPoint must be in 'name=module:attrs [extras]' format",
                src
            )
        else:
            return cls(name.strip(), value.strip(), attrs, extras, dist)

    parse = classmethod(parse)

    #@classmethod
    def parse_group(cls, group, lines, dist=None):
        """Parse an entry point group"""
        if not MODULE(group):
            raise ValueError("Invalid group name", group)
        this = {}
        for line in yield_lines(lines):
            ep = cls.parse(line, dist)
            if ep.name in this:
                raise ValueError("Duplicate entry point", group, ep.name)
            this[ep.name]=ep
        return this

    parse_group = classmethod(parse_group)

    #@classmethod
    def parse_map(cls, data, dist=None):
        """Parse a map of entry point groups"""
        if isinstance(data,dict):
            data = data.items()
        else:
            data = split_sections(data)
        maps = {}
        for group, lines in data:
            if group is None:
                if not lines:
                    continue
                raise ValueError("Entry points must be listed in groups")
            group = group.strip()
            if group in maps:
                raise ValueError("Duplicate group name", group)
            maps[group] = cls.parse_group(group, lines, dist)
        return maps

    parse_map = classmethod(parse_map)


def _remove_md5_fragment(location):
    if not location:
        return ''
    parsed = urlparse(location)
    if parsed[-1].startswith('md5='):
        return urlunparse(parsed[:-1] + ('',))
    return location


class Distribution(object):
    """Wrap an actual or potential sys.path entry w/metadata"""
    PKG_INFO = 'PKG-INFO'

    def __init__(self, location=None, metadata=None, project_name=None,
            version=None, py_version=PY_MAJOR, platform=None,
            precedence=EGG_DIST):
        self.project_name = safe_name(project_name or 'Unknown')
        if version is not None:
            self._version = safe_version(version)
        self.py_version = py_version
        self.platform = platform
        self.location = location
        self.precedence = precedence
        self._provider = metadata or empty_provider

    #@classmethod
    def from_location(cls,location,basename,metadata=None,**kw):
        project_name, version, py_version, platform = [None]*4
        basename, ext = os.path.splitext(basename)
        if ext.lower() in _distributionImpl:
            # .dist-info gets much metadata differently
            match = EGG_NAME(basename)
            if match:
                project_name, version, py_version, platform = match.group(
                    'name','ver','pyver','plat'
                )
            cls = _distributionImpl[ext.lower()]
        return cls(
            location, metadata, project_name=project_name, version=version,
            py_version=py_version, platform=platform, **kw
        )
    from_location = classmethod(from_location)

    hashcmp = property(
        lambda self: (
            getattr(self,'parsed_version',()),
            self.precedence,
            self.key,
            _remove_md5_fragment(self.location),
            self.py_version,
            self.platform
        )
    )
    def __hash__(self): return hash(self.hashcmp)
    def __lt__(self, other):
        return self.hashcmp < other.hashcmp
    def __le__(self, other):
        return self.hashcmp <= other.hashcmp
    def __gt__(self, other):
        return self.hashcmp > other.hashcmp
    def __ge__(self, other):
        return self.hashcmp >= other.hashcmp
    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            # It's not a Distribution, so they are not equal
            return False
        return self.hashcmp == other.hashcmp
    def __ne__(self, other):
        return not self == other

    # These properties have to be lazy so that we don't have to load any
    # metadata until/unless it's actually needed.  (i.e., some distributions
    # may not know their name or version without loading PKG-INFO)

    #@property
    def key(self):
        try:
            return self._key
        except AttributeError:
            self._key = key = self.project_name.lower()
            return key
    key = property(key)

    #@property
    def parsed_version(self):
        try:
            return self._parsed_version
        except AttributeError:
            self._parsed_version = pv = parse_version(self.version)
            return pv

    parsed_version = property(parsed_version)

    #@property
    def version(self):
        try:
            return self._version
        except AttributeError:
            for line in self._get_metadata(self.PKG_INFO):
                if line.lower().startswith('version:'):
                    self._version = safe_version(line.split(':',1)[1].strip())
                    return self._version
            else:
                raise ValueError(
                    "Missing 'Version:' header and/or %s file" % self.PKG_INFO, self
                )
    version = property(version)

    #@property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            dm = self.__dep_map = {None: []}
            for name in 'requires.txt', 'depends.txt':
                for extra,reqs in split_sections(self._get_metadata(name)):
                    if extra:
                        if ':' in extra:
                            extra, marker = extra.split(':',1)
                            if invalid_marker(marker):
                                reqs=[] # XXX warn
                            elif not evaluate_marker(marker):
                                reqs=[]
                        extra = safe_extra(extra) or None
                    dm.setdefault(extra,[]).extend(parse_requirements(reqs))
            return dm
    _dep_map = property(_dep_map)

    def requires(self,extras=()):
        """List of Requirements needed for this distro if `extras` are used"""
        dm = self._dep_map
        deps = []
        deps.extend(dm.get(None,()))
        for ext in extras:
            try:
                deps.extend(dm[safe_extra(ext)])
            except KeyError:
                raise UnknownExtra(
                    "%s has no such extra feature %r" % (self, ext)
                )
        return deps

    def _get_metadata(self,name):
        if self.has_metadata(name):
            for line in self.get_metadata_lines(name):
                yield line

    def activate(self,path=None):
        """Ensure distribution is importable on `path` (default=sys.path)"""
        if path is None: path = sys.path
        self.insert_on(path)
        if path is sys.path:
            fixup_namespace_packages(self.location)
            list(map(declare_namespace, self._get_metadata('namespace_packages.txt')))

    def egg_name(self):
        """Return what this distribution's standard .egg filename should be"""
        filename = "%s-%s-py%s" % (
            to_filename(self.project_name), to_filename(self.version),
            self.py_version or PY_MAJOR
        )

        if self.platform:
            filename += '-'+self.platform
        return filename

    def __repr__(self):
        if self.location:
            return "%s (%s)" % (self,self.location)
        else:
            return str(self)

    def __str__(self):
        try: version = getattr(self,'version',None)
        except ValueError: version = None
        version = version or "[unknown version]"
        return "%s %s" % (self.project_name,version)

    def __getattr__(self,attr):
        """Delegate all unrecognized public attributes to .metadata provider"""
        if attr.startswith('_'):
            raise AttributeError(attr)
        return getattr(self._provider, attr)

    #@classmethod
    def from_filename(cls,filename,metadata=None, **kw):
        return cls.from_location(
            _normalize_cached(filename), os.path.basename(filename), metadata,
            **kw
        )
    from_filename = classmethod(from_filename)

    def as_requirement(self):
        """Return a ``Requirement`` that matches this distribution exactly"""
        return Requirement.parse('%s==%s' % (self.project_name, self.version))

    def load_entry_point(self, group, name):
        """Return the `name` entry point of `group` or raise ImportError"""
        ep = self.get_entry_info(group,name)
        if ep is None:
            raise ImportError("Entry point %r not found" % ((group,name),))
        return ep.load()

    def get_entry_map(self, group=None):
        """Return the entry point map for `group`, or the full entry map"""
        try:
            ep_map = self._ep_map
        except AttributeError:
            ep_map = self._ep_map = EntryPoint.parse_map(
                self._get_metadata('entry_points.txt'), self
            )
        if group is not None:
            return ep_map.get(group,{})
        return ep_map

    def get_entry_info(self, group, name):
        """Return the EntryPoint object for `group`+`name`, or ``None``"""
        return self.get_entry_map(group).get(name)

    def insert_on(self, path, loc = None):
        """Insert self.location in path before its nearest parent directory"""

        loc = loc or self.location
        if not loc:
            return

        nloc = _normalize_cached(loc)
        bdir = os.path.dirname(nloc)
        npath= [(p and _normalize_cached(p) or p) for p in path]

        for p, item in enumerate(npath):
            if item==nloc:
                break
            elif item==bdir and self.precedence==EGG_DIST:
                # if it's an .egg, give it precedence over its directory
                if path is sys.path:
                    self.check_version_conflict()
                path.insert(p, loc)
                npath.insert(p, nloc)
                break
        else:
            if path is sys.path:
                self.check_version_conflict()
            path.append(loc)
            return

        # p is the spot where we found or inserted loc; now remove duplicates
        while 1:
            try:
                np = npath.index(nloc, p+1)
            except ValueError:
                break
            else:
                del npath[np], path[np]
                p = np  # ha!

        return

    def check_version_conflict(self):
        if self.key=='setuptools':
            return      # ignore the inevitable setuptools self-conflicts  :(

        nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
        loc = normalize_path(self.location)
        for modname in self._get_metadata('top_level.txt'):
            if (modname not in sys.modules or modname in nsp
                    or modname in _namespace_packages):
                continue
            if modname in ('pkg_resources', 'setuptools', 'site'):
                continue
            fn = getattr(sys.modules[modname], '__file__', None)
            if fn and (normalize_path(fn).startswith(loc) or
                       fn.startswith(self.location)):
                continue
            issue_warning(
                "Module %s was already imported from %s, but %s is being added"
                " to sys.path" % (modname, fn, self.location),
            )

    def has_version(self):
        try:
            self.version
        except ValueError:
            issue_warning("Unbuilt egg for "+repr(self))
            return False
        return True

    def clone(self,**kw):
        """Copy this distribution, substituting in any changed keyword args"""
        for attr in (
            'project_name', 'version', 'py_version', 'platform', 'location',
            'precedence'
        ):
            kw.setdefault(attr, getattr(self,attr,None))
        kw.setdefault('metadata', self._provider)
        return self.__class__(**kw)

    #@property
    def extras(self):
        return [dep for dep in self._dep_map if dep]
    extras = property(extras)


class DistInfoDistribution(Distribution):
    """Wrap an actual or potential sys.path entry w/metadata, .dist-info style"""
    PKG_INFO = 'METADATA'
    EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])")

    @property
    def _parsed_pkg_info(self):
        """Parse and cache metadata"""
        try:
            return self._pkg_info
        except AttributeError:
            from email.parser import Parser
            self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO))
            return self._pkg_info

    @property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._compute_dependencies()
            return self.__dep_map

    def _preparse_requirement(self, requires_dist):
        """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz')
        Split environment marker, add == prefix to version specifiers as
        necessary, and remove parenthesis.
        """
        parts = requires_dist.split(';', 1) + ['']
        distvers = parts[0].strip()
        mark = parts[1].strip()
        distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers)
        distvers = distvers.replace('(', '').replace(')', '')
        return (distvers, mark)

    def _compute_dependencies(self):
        """Recompute this distribution's dependencies."""
        from _markerlib import compile as compile_marker
        dm = self.__dep_map = {None: []}

        reqs = []
        # Including any condition expressions
        for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
            distvers, mark = self._preparse_requirement(req)
            parsed = next(parse_requirements(distvers))
            parsed.marker_fn = compile_marker(mark)
            reqs.append(parsed)

        def reqs_for_extra(extra):
            for req in reqs:
                if req.marker_fn(override={'extra':extra}):
                    yield req

        common = frozenset(reqs_for_extra(None))
        dm[None].extend(common)

        for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
            extra = safe_extra(extra.strip())
            dm[extra] = list(frozenset(reqs_for_extra(extra)) - common)

        return dm


_distributionImpl = {
    '.egg': Distribution,
    '.egg-info': Distribution,
    '.dist-info': DistInfoDistribution,
    }


def issue_warning(*args,**kw):
    level = 1
    g = globals()
    try:
        # find the first stack frame that is *not* code in
        # the pkg_resources module, to use for the warning
        while sys._getframe(level).f_globals is g:
            level += 1
    except ValueError:
        pass
    from warnings import warn
    warn(stacklevel = level+1, *args, **kw)


def parse_requirements(strs):
    """Yield ``Requirement`` objects for each specification in `strs`

    `strs` must be an instance of ``basestring``, or a (possibly-nested)
    iterable thereof.
    """
    # create a steppable iterator, so we can handle \-continuations
    lines = iter(yield_lines(strs))

    def scan_list(ITEM,TERMINATOR,line,p,groups,item_name):

        items = []

        while not TERMINATOR(line,p):
            if CONTINUE(line,p):
                try:
                    line = next(lines)
                    p = 0
                except StopIteration:
                    raise ValueError(
                        "\\ must not appear on the last nonblank line"
                    )

            match = ITEM(line,p)
            if not match:
                raise ValueError("Expected "+item_name+" in",line,"at",line[p:])

            items.append(match.group(*groups))
            p = match.end()

            match = COMMA(line,p)
            if match:
                p = match.end() # skip the comma
            elif not TERMINATOR(line,p):
                raise ValueError(
                    "Expected ',' or end-of-list in",line,"at",line[p:]
                )

        match = TERMINATOR(line,p)
        if match: p = match.end()   # skip the terminator, if any
        return line, p, items

    for line in lines:
        match = DISTRO(line)
        if not match:
            raise ValueError("Missing distribution spec", line)
        project_name = match.group(1)
        p = match.end()
        extras = []

        match = OBRACKET(line,p)
        if match:
            p = match.end()
            line, p, extras = scan_list(
                DISTRO, CBRACKET, line, p, (1,), "'extra' name"
            )

        line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
        specs = [(op,safe_version(val)) for op,val in specs]
        yield Requirement(project_name, specs, extras)


def _sort_dists(dists):
    tmp = [(dist.hashcmp,dist) for dist in dists]
    tmp.sort()
    dists[::-1] = [d for hc,d in tmp]


class Requirement:
    def __init__(self, project_name, specs, extras):
        """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
        self.unsafe_name, project_name = project_name, safe_name(project_name)
        self.project_name, self.key = project_name, project_name.lower()
        index = [(parse_version(v),state_machine[op],op,v) for op,v in specs]
        index.sort()
        self.specs = [(op,ver) for parsed,trans,op,ver in index]
        self.index, self.extras = index, tuple(map(safe_extra,extras))
        self.hashCmp = (
            self.key, tuple([(op,parsed) for parsed,trans,op,ver in index]),
            frozenset(self.extras)
        )
        self.__hash = hash(self.hashCmp)

    def __str__(self):
        specs = ','.join([''.join(s) for s in self.specs])
        extras = ','.join(self.extras)
        if extras: extras = '[%s]' % extras
        return '%s%s%s' % (self.project_name, extras, specs)

    def __eq__(self,other):
        return isinstance(other,Requirement) and self.hashCmp==other.hashCmp

    def __contains__(self,item):
        if isinstance(item,Distribution):
            if item.key != self.key: return False
            if self.index: item = item.parsed_version  # only get if we need it
        elif isinstance(item,basestring):
            item = parse_version(item)
        last = None
        compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1
        for parsed,trans,op,ver in self.index:
            action = trans[compare(item,parsed)] # Indexing: 0, 1, -1
            if action=='F':
                return False
            elif action=='T':
                return True
            elif action=='+':
                last = True
            elif action=='-' or last is None:   last = False
        if last is None: last = True    # no rules encountered
        return last

    def __hash__(self):
        return self.__hash

    def __repr__(self): return "Requirement.parse(%r)" % str(self)

    #@staticmethod
    def parse(s):
        reqs = list(parse_requirements(s))
        if reqs:
            if len(reqs)==1:
                return reqs[0]
            raise ValueError("Expected only one requirement", s)
        raise ValueError("No requirements found", s)

    parse = staticmethod(parse)

state_machine = {
    #       =><
    '<': '--T',
    '<=': 'T-T',
    '>': 'F+F',
    '>=': 'T+F',
    '==': 'T..',
    '!=': 'F++',
}


def _get_mro(cls):
    """Get an mro for a type or classic class"""
    if not isinstance(cls,type):
        class cls(cls,object): pass
        return cls.__mro__[1:]
    return cls.__mro__

def _find_adapter(registry, ob):
    """Return an adapter factory for `ob` from `registry`"""
    for t in _get_mro(getattr(ob, '__class__', type(ob))):
        if t in registry:
            return registry[t]


def ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    if not os.path.isdir(dirname):
        os.makedirs(dirname)

def split_sections(s):
    """Split a string or iterable thereof into (section,content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    """
    section = None
    content = []
    for line in yield_lines(s):
        if line.startswith("["):
            if line.endswith("]"):
                if section or content:
                    yield section, content
                section = line[1:-1].strip()
                content = []
            else:
                raise ValueError("Invalid section heading", line)
        else:
            content.append(line)

    # wrap up last segment
    yield section, content

def _mkstemp(*args,**kw):
    from tempfile import mkstemp
    old_open = os.open
    try:
        os.open = os_open   # temporarily bypass sandboxing
        return mkstemp(*args,**kw)
    finally:
        os.open = old_open  # and then put it back


# Set up global resource manager (deliberately not state-saved)
_manager = ResourceManager()
def _initialize(g):
    for name in dir(_manager):
        if not name.startswith('_'):
            g[name] = getattr(_manager, name)
_initialize(globals())

# Prepare the master working set and make the ``require()`` API available
_declare_state('object', working_set = WorkingSet())
try:
    # Does the main program list any requirements?
    from __main__ import __requires__
except ImportError:
    pass # No: just use the default working set based on sys.path
else:
    # Yes: ensure the requirements are met, by prefixing sys.path if necessary
    try:
        working_set.require(__requires__)
    except VersionConflict:     # try it without defaults already on sys.path
        working_set = WorkingSet([])    # by starting with an empty path
        for dist in working_set.resolve(
            parse_requirements(__requires__), Environment()
        ):
            working_set.add(dist)
        for entry in sys.path:  # add any missing entries from sys.path
            if entry not in working_set.entries:
                working_set.add_entry(entry)
        sys.path[:] = working_set.entries   # then copy back to sys.path

require = working_set.require
iter_entry_points = working_set.iter_entry_points
add_activation_listener = working_set.subscribe
run_script = working_set.run_script
run_main = run_script   # backward compatibility
# Activate all distributions already on sys.path, and ensure that
# all distributions added to the working set in the future (e.g. by
# calling ``require()``) will get activated as well.
add_activation_listener(lambda dist: dist.activate())
working_set.entries=[]
list(map(working_set.add_entry,sys.path)) # match order
python3.4/site-packages/_markerlib/markers.py000064400000007613151735047210015173 0ustar00# -*- coding: utf-8 -*-
"""Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
"""

__all__ = ['default_environment', 'compile', 'interpret']

import ast
import os
import platform
import sys
import weakref

_builtin_compile = compile

try:
    from platform import python_implementation
except ImportError:
    if os.name == "java":
        # Jython 2.5 has ast module, but not platform.python_implementation() function.
        def python_implementation():
            return "Jython"
    else:
        raise


# restricted set of variables
_VARS = {'sys.platform': sys.platform,
         'python_version': '%s.%s' % sys.version_info[:2],
         # FIXME parsing sys.platform is not reliable, but there is no other
         # way to get e.g. 2.7.2+, and the PEP is defined with sys.version
         'python_full_version': sys.version.split(' ', 1)[0],
         'os.name': os.name,
         'platform.version': platform.version(),
         'platform.machine': platform.machine(),
         'platform.python_implementation': python_implementation(),
         'extra': None # wheel extension
        }

for var in list(_VARS.keys()):
    if '.' in var:
        _VARS[var.replace('.', '_')] = _VARS[var]

def default_environment():
    """Return copy of default PEP 385 globals dictionary."""
    return dict(_VARS)

class ASTWhitelist(ast.NodeTransformer):
    def __init__(self, statement):
        self.statement = statement # for error messages

    ALLOWED = (ast.Compare, ast.BoolOp, ast.Attribute, ast.Name, ast.Load, ast.Str)
    # Bool operations
    ALLOWED += (ast.And, ast.Or)
    # Comparison operations
    ALLOWED += (ast.Eq, ast.Gt, ast.GtE, ast.In, ast.Is, ast.IsNot, ast.Lt, ast.LtE, ast.NotEq, ast.NotIn)

    def visit(self, node):
        """Ensure statement only contains allowed nodes."""
        if not isinstance(node, self.ALLOWED):
            raise SyntaxError('Not allowed in environment markers.\n%s\n%s' %
                               (self.statement,
                               (' ' * node.col_offset) + '^'))
        return ast.NodeTransformer.visit(self, node)

    def visit_Attribute(self, node):
        """Flatten one level of attribute access."""
        new_node = ast.Name("%s.%s" % (node.value.id, node.attr), node.ctx)
        return ast.copy_location(new_node, node)

def parse_marker(marker):
    tree = ast.parse(marker, mode='eval')
    new_tree = ASTWhitelist(marker).generic_visit(tree)
    return new_tree

def compile_marker(parsed_marker):
    return _builtin_compile(parsed_marker, '<environment marker>', 'eval',
                   dont_inherit=True)

_cache = weakref.WeakValueDictionary()

def compile(marker):
    """Return compiled marker as a function accepting an environment dict."""
    try:
        return _cache[marker]
    except KeyError:
        pass
    if not marker.strip():
        def marker_fn(environment=None, override=None):
            """"""
            return True
    else:
        compiled_marker = compile_marker(parse_marker(marker))
        def marker_fn(environment=None, override=None):
            """override updates environment"""
            if override is None:
                override = {}
            if environment is None:
                environment = default_environment()
            environment.update(override)
            return eval(compiled_marker, environment)
    marker_fn.__doc__ = marker
    _cache[marker] = marker_fn
    return _cache[marker]

def interpret(marker, environment=None):
    return compile(marker)(environment)
python3.4/site-packages/_markerlib/__pycache__/__init__.cpython-34.pyc000064400000001511151735047210021537 0ustar00�
M�Re(�@s�y,ddlZddlmZmZmZWnQek
rde�krQ�ndd�Zdd�Zdddd	�ZYnXdS)
�N)�default_environment�compile�	interpret�astcCsiS)N�rrr�./tmp/pip-l4uy7dan-build/_markerlib/__init__.pyrsrcs%dd�fdd�}�|_|S)Ncs�j�S)N)�strip)�environment�override)�markerrr�	marker_fn
szcompile.<locals>.marker_fn)�__doc__)rrr)rrr	s	rcCs
t|��S)N)r)rr	r
rrrrsr)rZ_markerlib.markersrrr�ImportError�globalsrrrr�<module>s 
python3.4/site-packages/_markerlib/__pycache__/markers.cpython-34.pyc000064400000010120151735047210021440 0ustar00�
M�Re��@s�dZdddgZddlZddlZddlZddlZddlZeZyddlm	Z	Wn3e
k
r�ejdkr�dd	�Z	n�YnXiejd
6dejdd�d
6ej
jdd�dd6ejd6ej
�d6ej�d6e	�d6dd6ZxCeej��D]/Zdekr+eeeejdd�<q+q+Wdd�ZGdd�dej�Zdd�Zdd�Zej�Zdd�Zdd d�ZdS)!a�Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
�default_environment�compile�	interpret�N)�python_implementation�javacCsdS)N�Jython�rrr�-/tmp/pip-l4uy7dan-build/_markerlib/markers.pyr!srzsys.platformz%s.%s��python_version� ��python_full_versionzos.namezplatform.versionzplatform.machinezplatform.python_implementation�extra�.�_cCs
tt�S)z2Return copy of default PEP 385 globals dictionary.)�dict�_VARSrrrr	r8sc@s�eZdZdd�Zejejejejej	ej
fZeejej
f7Zeejejejejejejejejejejf
7Zdd�Zdd�ZdS)�ASTWhitelistcCs
||_dS)N)�	statement)�selfrrrr	�__init__=szASTWhitelist.__init__cCsLt||j�s9td|jd|jdf��ntjj||�S)z-Ensure statement only contains allowed nodes.z)Not allowed in environment markers.
%s
%sr�^)�
isinstance�ALLOWED�SyntaxErrorr�
col_offset�ast�NodeTransformer�visit)r�noderrr	rFs
zASTWhitelist.visitcCs8tjd|jj|jf|j�}tj||�S)z&Flatten one level of attribute access.z%s.%s)r�Name�value�id�attr�ctx�
copy_location)rr �new_noderrr	�visit_AttributeNs(zASTWhitelist.visit_AttributeN)�__name__�
__module__�__qualname__rr�Compare�BoolOp�	Attributer!�Load�Strr�And�Or�Eq�Gt�GtE�In�Is�IsNot�Lt�LtE�NotEq�NotInrr(rrrr	r<s*FrcCs.tj|dd�}t|�j|�}|S)N�mode�eval)r�parser�
generic_visit)�marker�tree�new_treerrr	�parse_markerSsrDcCst|dddd�S)Nz<environment marker>r>�dont_inheritT)�_builtin_compile)�
parsed_markerrrr	�compile_markerXsrHc
s�yt|SWntk
r YnX|j�sBdddd�}n*tt|���dd�fdd�}||_|t|<t|S)zCReturn compiled marker as a function accepting an environment dict.NcSsdS)�Tr)�environment�overriderrr	�	marker_fneszcompile.<locals>.marker_fncsG|dkri}n|dkr-t�}n|j|�t�|�S)zoverride updates environmentN)r�updater>)rJrK)�compiled_markerrr	rLjs	
)�_cache�KeyError�striprHrD�__doc__)rArLr)rNr	r^s
	
cCst|�|�S)N)r)rArJrrr	rvs)rR�__all__r�os�platform�sys�weakrefrrFr�ImportError�name�version_info�version�split�machiner�list�keys�var�replacerrrrDrH�WeakValueDictionaryrOrrrrr	�<module>s>






!python3.4/site-packages/_markerlib/__init__.py000064400000001050151735047210015253 0ustar00try:
    import ast
    from _markerlib.markers import default_environment, compile, interpret
except ImportError:
    if 'ast' in globals():
        raise
    def default_environment():
        return {}
    def compile(marker):
        def marker_fn(environment=None, override=None):
            # 'empty markers are True' heuristic won't install extra deps.
            return not marker.strip()
        marker_fn.__doc__ = marker
        return marker_fn
    def interpret(marker, environment=None, override=None):
        return compile(marker)()
python3.4/site-packages/__pycache__/easy_install.cpython-34.pyc000064400000000426151735047210020364 0ustar00�
M�Re~�@s0dZedkr,ddlmZe�ndS)zRun the EasyInstall command�__main__�)�mainN)�__doc__�__name__Zsetuptools.command.easy_installr�rr�'/tmp/pip-l4uy7dan-build/easy_install.py�<module>spython3.4/site-packages/__pycache__/pkg_resources.cpython-34.pyc000064400000273502151735047210020557 0ustar00�
M�Re_��m@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlmZyddl
m
Z
mZWn(ek
r�ddlm
Z
mZYnXyeWn"ek
rddlmZYnXy$edd�ZddlmZWn:ek
rleZdd	lmZddd
d�ZYnXddlmZy&dd
lmZmZm Z dZ!Wnek
r�dZ!YnXddlm"Z#ddl$m%Z%m&Z&ej'ddfkoej(j)dkrddl*j+Z,ndZ,yddl-Z-Wnek
rGYnXddd�Z.iZ/dd�Z0dd�Z1dd�Z2dd�Z3dd �Z4d!d"�Z5d#d$�Z6d%d�Z7Z8d&d'�Z9d(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdlgEZ:GdmdC�dCe;�Z<GdndD�dDe<�Z=GdodE�dEe<�Z>GdpdF�dFe<�Z?iZ@ejAdd�ZBdZCdqZDdrZEdZFdrZGdsdh�ZHdtd*�ZIgdudv�ZJdwdx�ZKdydz�ZLejMd{�ZNejMd|�ZOeLZPd}dM�ZQd~d)�ZReRZSdd+�ZTd�d,�ZUdd�d-�ZVd�d.�ZWGd�d[�d[�ZXGd�d\�d\eX�ZYGd�d>�d>eZ�Z[Gd�d=�d=eZ�Z\e\Z]Gd�dG�dGe^�Z_Gd�d?�d?�Z`d�d<�Zad�dJ�Zbd�dK�Zcd�dP�Zdd�dQ�Zeid�gd�6d�gd�6d�d�d�gd�6gd�6gd�6gd�6Zfid�d�d�6d�d�d�6d�d�d�6d�d�d�6d�d�d�6d�d�d�6d�d�d�6Zgd�d��Zhd�d��Zid�d��Zjd�dR�Zkdid�dS�Zld�d��Zmd�en�kr�emZlnGd�db�db�ZoeHeZeo�Gd�dc�dceo�ZpGd�dd�ddep�ZqeHerd�eq�e,dk	r*eHe,jseq�nGd�d`�d`eo�Ztet�Zud�d��ZvGd�de�deep�ZweHejxew�Gd�d]�d]et�ZyGd�d^�d^eq�ZzGd�d_�d_ew�Z{e0d�d�i�d�df�Z|dd�d9�Z}dd�d��Z~e|ejxe~�dd�d��Ze|eZe�dd�d��Z�e|ej�e��e,dk	rae|e,j�e��ne0d�d�i�e0d�d�i�d�dg�Z�d�d��Z�d�d6�Z�dd�di�Z�d�d��Z�e�ej�e��e�ejxe��e,dk	r�e�e,j�e��nd�d��Z�e�eZe��d�dU�Z�id�d��Z�d�d��Z�d�dN�Z�ejMd��j�Z�ejMd��j�Z�ejMd��j�Z�ejMd��j�Z�ejMd��j�Z�ejMd��j�Z�ejMd��j�Z�ejMd��j�Z�ejMd�ej�ej�B�j�Z�ejMd�ej��Z�id�d�6d�d�6d�d�6d�d�6d�d�6j�Z�d�d��Z�d�dI�Z�Gd�dB�dBeZ�Z�d�d��Z�Gd�d@�d@eZ�Z�Gd�d��d�e��Z�ie�d�6e�d�6e�d�6Z�d�d��Z�d�dH�Z�d�d��Z�Gd�dA�dA�Z�id�d�6d�d�6d�d�6d�d�6d�d6dd6Z�dd�Z�dd�Z�ddT�Z�ddO�Z�d	d
�Z�e`�Z�dd�Z�e�en��e0d
d7e[��yddl�m�Z�Wnek
r�Yn�Xye�j�e��Wn�e=k
rje[g�Z�x0e�j�e�e��e\��D]Z�e�j�e��qWx0ej�D]%Z�e�e�j�krLe�j�e��nq'We�j�ej�dd�<YnXe�j�Z�e�j�Z�e�j�Z�e�jRZReRZSe�dd��ge�_�e�e�e�j�ej���dS(aYPackage resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
�N)�get_importer)�urlparse�
urlunparse)�ImmutableSetcCs
|j�S)N)�next)�o�r�(/tmp/pip-l4uy7dan-build/pkg_resources.py�<lambda>(sr
)�StringIO)�BytesIOcCsY|dkrt�}n|dkr-|}nttt|�j�|d�||�dS)N�exec)�globalsr
�compile�open�read)�fn�globs�locsrrr	�execfile-s
	r)�utime)�mkdir�rename�unlinkTF)r)�isdir�split�Zcpythoni�cCs^tstd��nt|�\}}|rZ|rZt|�rZt|�t||�ndS)Nz*"os.mkdir" not supported on this platform.)�
WRITE_SUPPORT�IOErrorrr�_bypass_ensure_directoryr)�name�mode�dirname�filenamerrr	rKs
rcKs>t�}x.|j�D] \}}|||<|t|<qWdS)N)r�items�_state_vars)�vartype�kw�gr �valrrr	�_declare_stateWs	
r*cCsLi}t�}x6tj�D](\}}|d|||�||<qW|S)N�_sget_)rr%r$)�stater(�k�vrrr	�__getstate__]s
	 r/cCsJt�}x:|j�D],\}}|dt|||||�qW|S)N�_sset_)rr$r%)r,r(r-r.rrr	�__setstate__ds	$r1cCs
|j�S)N)�copy)r)rrr	�
_sget_dictjsr3cCs|j�|j|�dS)N)�clear�update)�key�obr,rrr	�
_sset_dictms
r8cCs
|j�S)N)r/)r)rrr	�_sget_objectqsr9cCs|j|�dS)N)r1)r6r7r,rrr	�_sset_objecttsr:cGsdS)Nr)�argsrrr	r
wscCs�t�}tj|�}|dk	r~tjdkr~y3ddjt�dd��|jd�f}Wq~tk
rzYq~Xn|S)aZReturn this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    N�darwinzmacosx-%s-%s�.�r)	�get_build_platform�macosVersionString�match�sys�platform�join�_macosx_vers�group�
ValueError)�plat�mrrr	�get_supported_platformzs
	3
rJ�require�
run_script�get_provider�get_distribution�load_entry_point�
get_entry_map�get_entry_info�iter_entry_points�resource_string�resource_stream�resource_filename�resource_listdir�resource_exists�resource_isdir�declare_namespace�working_set�add_activation_listener�find_distributions�set_extraction_path�cleanup_resources�get_default_cache�Environment�
WorkingSet�ResourceManager�Distribution�Requirement�
EntryPoint�ResolutionError�VersionConflict�DistributionNotFound�UnknownExtra�ExtractionError�parse_requirements�
parse_version�	safe_name�safe_version�get_platform�compatible_platforms�yield_lines�split_sections�
safe_extra�to_filename�invalid_marker�evaluate_marker�ensure_directory�normalize_path�EGG_DIST�BINARY_DIST�SOURCE_DIST�
CHECKOUT_DIST�DEVELOP_DIST�IMetadataProvider�IResourceProvider�FileMetadata�PathMetadata�EggMetadata�
EmptyProvider�empty_provider�NullProvider�EggProvider�DefaultProvider�ZipProvider�register_finder�register_namespace_handler�register_loader_type�fixup_namespace_packagesr�run_main�AvailableDistributionsc@s"eZdZdZdd�ZdS)rfz.Abstract base for dependency resolution errorscCs|jjt|j�S)N)�	__class__�__name__�reprr;)�selfrrr	�__repr__�szResolutionError.__repr__N)r��
__module__�__qualname__�__doc__r�rrrr	rf�sc@seZdZdZdS)rgzAAn already-installed version conflicts with the requested versionN)r�r�r�r�rrrr	rg�sc@seZdZdZdS)rhz&A requested distribution was not foundN)r�r�r�r�rrrr	rh�sc@seZdZdZdS)riz>Distribution doesn't have an "extra feature" of the given nameN)r�r�r�r�rrrr	ri�sr>�cCs|t|<dS)aRegister `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    N)�_provider_factories)�loader_type�provider_factoryrrr	r��scCs�t|t�r2tj|�p1tt|��dSytj|}Wn)tk
rnt	|�tj|}YnXt
|dd�}tt|�|�S)z?Return an IResourceProvider for the named module or requirementr�
__loader__N)
�
isinstancerdrZ�findrK�strrB�modules�KeyError�
__import__�getattr�
_find_adapterr�)�moduleOrReq�module�loaderrrr	rM�s#

cCs�|s�ddl}|j�d}|dkr�ddl}d}tjj|�r�t|d�r�|j|�}d|kr�|d}q�q�q�n|j|j	d��n|dS)Nr�z0/System/Library/CoreServices/SystemVersion.plist�	readPlist�ProductVersionr=)
rC�mac_ver�plistlib�os�path�exists�hasattrr��appendr)�_cacherC�versionr��plist�
plist_contentrrr	rE�srEcCsidd6dd6j||�S)N�ppc�PowerPC�Power_Macintosh)�get)�machinerrr	�_macosx_arch�sr�cCs�yddlm}Wn"tk
r8ddlm}YnX|�}tjdkr�|jd�r�yTt�}tj	�dj
dd�}dt|d�t|d	�t|�fSWq�t
k
r�Yq�Xn|S)
z�Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    r)ror<zmacosx-�� �_zmacosx-%d.%d-%sr�)�	sysconfigro�ImportError�distutils.utilrBrC�
startswithrEr��uname�replace�intr�rG)rorHr�r�rrr	r?�s
		
r?zmacosx-(\d+)\.(\d+)-(.*)zdarwin-(\d+)\.(\d+)\.(\d+)-(.*)cCsO|dks$|dks$||kr(dStj|�}|rKtj|�}|s�tj|�}|r�t|jd��}d|jd�|jd�f}|dkr�|dks�|dkr�|d	kr�dSnd
S|jd�|jd�ks|jd�|jd�krd
St|jd��t|jd��krGd
SdSd
S)z�Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    NTr�z%s.%sr>�z10.3�z10.4Fr)r@rA�darwinVersionStringr�rF)�provided�required�reqMac�provMac�
provDarwin�dversion�macosversionrrr	rps*$"*cCsNtjd�j}|d}|j�||d<t|�dj||�dS)z@Locate distribution `dist_spec` and run its `script_name` scriptr�r�rN)rB�	_getframe�	f_globalsr4rKrL)Z	dist_spec�script_name�nsr rrr	rLHs



cCsdt|t�r!tj|�}nt|t�r?t|�}nt|t�s`td|��n|S)z@Return a current distribution object for a Requirement or stringz-Expected string, Requirement, or Distribution)r��
basestringrd�parserMrc�	TypeError)�distrrr	rNRscCst|�j||�S)zDReturn `name` entry point of `group` for `dist` or raise ImportError)rNrO)r�rFr rrr	rOZscCst|�j|�S)z=Return the entry point map for `group`, or the full entry map)rNrP)r�rFrrr	rP^scCst|�j||�S)z<Return the EntryPoint object for `group`+`name`, or ``None``)rNrQ)r�rFr rrr	rQbsc@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)r~cCsdS)z;Does the package's distribution contain the named metadata?Nr)r rrr	�has_metadataiszIMetadataProvider.has_metadatacCsdS)z'The named metadata resource as a stringNr)r rrr	�get_metadatalszIMetadataProvider.get_metadatacCsdS)z�Yield named metadata resource as list of non-blank non-comment lines

       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted.Nr)r rrr	�get_metadata_linesosz$IMetadataProvider.get_metadata_linescCsdS)z>Is the named metadata a directory?  (like ``os.path.isdir()``)Nr)r rrr	�metadata_isdirusz IMetadataProvider.metadata_isdircCsdS)z?List of metadata names in the directory (like ``os.listdir()``)Nr)r rrr	�metadata_listdirxsz"IMetadataProvider.metadata_listdircCsdS)z=Execute the named script in the supplied namespace dictionaryNr)r��	namespacerrr	rL{szIMetadataProvider.run_scriptN)	r�r�r�r�r�r�r�r�rLrrrr	r~gsc@s^eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)rz3An object that provides access to package resourcescCsdS)zdReturn a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``Nr)�manager�
resource_namerrr	�get_resource_filename�sz'IResourceProvider.get_resource_filenamecCsdS)ziReturn a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``Nr)r�r�rrr	�get_resource_stream�sz%IResourceProvider.get_resource_streamcCsdS)zmReturn a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``Nr)r�r�rrr	�get_resource_string�sz%IResourceProvider.get_resource_stringcCsdS)z,Does the package contain the named resource?Nr)r�rrr	�has_resource�szIResourceProvider.has_resourcecCsdS)z>Is the named resource a directory?  (like ``os.path.isdir()``)Nr)r�rrr	rX�sz IResourceProvider.resource_isdircCsdS)z?List of resource names in the directory (like ``os.listdir()``)Nr)r�rrr	rV�sz"IResourceProvider.resource_listdirN)
r�r�r�r�r�r�r�r�rXrVrrrr	rsc@s�eZdZdZddd�Zdd�Zdd�Zd	d
�Zddd�Zd
d�Z	dd�Z
dddd�Zdddd�Zddddd�Z
dd�Zdd�Zdd�Zdd�Zd d!�ZdS)"razDA collection of active distributions on sys.path (or a similar list)NcCs^g|_i|_i|_g|_|dkr<tj}nx|D]}|j|�qCWdS)z?Create working set from list of path entries (default=sys.path)N)�entries�
entry_keys�by_key�	callbacksrBr��	add_entry)r�r��entryrrr	�__init__�s				
zWorkingSet.__init__cCsT|jj|g�|jj|�x*t|d�D]}|j||d�q3WdS)a�Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        TFN)r��
setdefaultr�r�r\�add)r�r�r�rrr	r��s
zWorkingSet.add_entrycCs|jj|j�|kS)z9True if `dist` is the active distribution for its project)r�r�r6)r�r�rrr	�__contains__�szWorkingSet.__contains__cCsG|jj|j�}|dk	r?||kr?t||��n|SdS)a�Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        N)r�r�r6rg)r��reqr�rrr	r��s
zWorkingSet.findccsgx`|D]X}|j|�}|dkrGx4|j�D]}|Vq5Wq||kr||VqqWdS)aYield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        N)rP�values)r�rFr r�r��eprrr	rR�s
zWorkingSet.iter_entry_pointscCsQtjd�j}|d}|j�||d<|j|�dj||�dS)z?Locate distribution for `requires` and run `script_name` scriptr�r�rN)rBr�r�r4rKrL)r��requiresr�r�r rrr	rL�s



zWorkingSet.run_scriptccspi}xc|jD]X}||jkr+qnx:|j|D]+}||kr9d||<|j|Vq9q9WqWdS)z�Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        r�N)r�r�r�)r��seen�itemr6rrr	�__iter__�s
zWorkingSet.__iter__TcCs�|r|j|j|�n|dkr4|j}n|jj|g�}|jj|jg�}|j|jkrwdS||j|j<|j|kr�|j|j�n|j|kr�|j|j�n|j|�dS)a�Add `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set.  If it's added, any
        callbacks registered with the ``subscribe()`` method will be called.
        N)	�	insert_onr��locationr�r�r6r�r��
_added_new)r�r�r��insert�keys�keys2rrr	r��szWorkingSet.addc	CsVt|�ddd�}i}i}g}x$|rQ|jd�}||krUq.n|j|j�}|dkr|jj|j�}|dkr�|dkr�t|j�}n|j|||�}||j<|dkr�t|��q�n|j	|�n||krt
||��n|j|j|j
�ddd��d||<q.W|S)aList all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
        Nr�rT���r�)�list�popr�r6r�r`r��
best_matchrhr�rg�extendr��extras)	r��requirements�env�	installer�	processed�best�to_activater�r�rrr	�resolves.	 &zWorkingSet.resolvecCsPt|�}|j�i}i}|dkrJt|j�}||7}n
||}|jg�}	tt|	j|��x�|D]�}
x�||
D]�}|j�g}y|	j|||�}
Wn9t	k
r�t
j�d}|||<|r�w�nPYq�Xtt|	j|
��|jt
j|
��Pq�Wq�Wt|�}|j�||fS)abFind all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            map(working_set.add, distributions)  # add plugins+libs to sys.path
            print 'Could not load', errors        # display errors

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        Nr�)r��sortr`r�r��mapr��as_requirementrrfrB�exc_infor5�dict�fromkeys)r��
plugin_env�full_envr�fallback�plugin_projects�
error_info�
distributionsr�
shadow_set�project_namer�r��	resolveesr.rrr	�find_pluginsAs6"





	
zWorkingSet.find_pluginscGs7|jt|��}x|D]}|j|�qW|S)a�Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        )rrkr�)r�r�neededr�rrr	rK�s	
zWorkingSet.requirecCsB||jkrdS|jj|�x|D]}||�q*WdS)zAInvoke `callback` for all distributions (including existing ones)N)r�r�)r��callbackr�rrr	�	subscribe�s

zWorkingSet.subscribecCs"x|jD]}||�q
WdS)N)r�)r�r�rrrr	r��szWorkingSet._added_newcCs<|jdd�|jj�|jj�|jdd�fS)N)r�r�r2r�r�)r�rrr	r/�s(zWorkingSet.__getstate__cCsZ|\}}}}|dd�|_|j�|_|j�|_|dd�|_dS)N)r�r2r�r�r�)r��e_k_b_cr�r�r�r�rrr	r1�s
zWorkingSet.__setstate__)r�r�r�r�r�r�r�r�rRrLr�r�rrrKrr�r/r1rrrr	ra�s"
/Mc@s�eZdZdZde�edd�Zdd�Zdd�Zdd	d
�Z	dd�Z
d
d�Zddd�Zddd�Z
dd�Zdd�Zdd�ZdS)r`z5Searchable snapshot of distributions on a search pathNcCs5i|_i|_||_||_|j|�dS)a!Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.3'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        N)�_distmapr�rC�python�scan)r��search_pathrCrrrr	r��s
				zEnvironment.__init__cCsC|jdks0|jdks0|j|jkoBt|j|j�S)z�Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        N)r�
py_versionrprC)r�r�rrr	�can_add�szEnvironment.can_addcCs|j|jj|�dS)z"Remove `dist` from the environmentN)rr6�remove)r�r�rrr	r!�szEnvironment.removecCsQ|dkrtj}nx2|D]*}x!t|�D]}|j|�q2WqWdS)adScan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        N)rBr�r\r�)r�rr�r�rrr	r�s

zEnvironment.scancCs�y|j|SWn1tk
rB|j�}||jkr>gSYnX||jkrw|j|}|j|<t|�n|j|S)zKReturn a newest-to-oldest list of distributions for `project_name`
        )r�r��lowerr�_sort_dists)r�r�distsrrr	�__getitem__�s
	
zEnvironment.__getitem__cCs|j|�r{|j�r{|jj|jg�}||kr{|j|�|j|jkrxt|j|j�qxq{ndS)z<Add `dist` if we ``can_add()`` it and it isn't already addedN)r �has_versionrr�r6r�r�r#)r�r�r$rrr	r�s
zEnvironment.addcCsW|j|�}|dk	r|Sx%||jD]}||kr-|Sq-W|j||�S)a�Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        N)r�r6�obtain)r�r�rZrr�rrr	r�
s
zEnvironment.best_matchcCs|dk	r||�SdS)a�Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument.Nr)r��requirementrrrr	r's	zEnvironment.obtainccs0x)|jj�D]}||r|VqqWdS)z=Yield the unique project names of the available distributionsN)rr�)r�r6rrr	r�+s
zEnvironment.__iter__cCs{t|t�r|j|�nXt|t�rdxF|D](}x||D]}|j|�qFWq5Wntd|f��|S)z2In-place addition of a distribution or environmentzCan't add %r to environment)r�rcr�r`r�)r��other�projectr�rrr	�__iadd__0s
zEnvironment.__iadd__cCs@|jgdddd�}x||fD]}||7}q(W|S)z4Add an environment or distribution to an environmentrCNr)r�)r�r)�newrrrr	�__add__<szEnvironment.__add__)r�r�r�r�rJ�PY_MAJORr�r r!rr%r�r�r'r�r+r-rrrr	r`�s	c@seZdZdZdS)rjaTAn error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    N)r�r�r�r�rrrr	rjGs
c@s�eZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zfdd�Z
edd��Zdd�Zdd�Zddd�ZdS)rbz'Manage resource extraction and packagesNcCs
i|_dS)N)�cached_files)r�rrr	r�[szResourceManager.__init__cCst|�j|�S)zDoes the named resource exist?)rMr�)r��package_or_requirementr�rrr	rW^szResourceManager.resource_existscCst|�j|�S)z,Is the named resource an existing directory?)rMrX)r�r0r�rrr	rXbszResourceManager.resource_isdircCst|�j||�S)z4Return a true filesystem path for specified resource)rMr�)r�r0r�rrr	rUhsz!ResourceManager.resource_filenamecCst|�j||�S)z9Return a readable file-like object for specified resource)rMr�)r�r0r�rrr	rTnszResourceManager.resource_streamcCst|�j||�S)z%Return specified resource as a string)rMr�)r�r0r�rrr	rStszResourceManager.resource_stringcCst|�j|�S)z1List the contents of the named resource directory)rMrV)r�r0r�rrr	rVzsz ResourceManager.resource_listdircCs]tj�d}|jpt�}td||f�}||_||_||_|�dS)z5Give an error message for problems extracting file(s)r�a}Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  %s

The Python egg cache directory is currently set to:

  %s

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
N)rBr
�extraction_pathr_rjr��
cache_path�original_error)r��old_excr2�errrrr	�extraction_error�s			z ResourceManager.extraction_errorc	Cso|jpt�}tjj||d|�}yt|�Wn|j�YnX|j|�d|j|<|S)a�Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        z-tmpr�)	r1r_r�r�rDrr6�_warn_unsafe_extraction_pathr/)r��archive_name�names�extract_path�target_pathrrr	�get_cache_path�s


zResourceManager.get_cache_pathcCswtjdkr*|jtjd�r*dStj|�j}|tj@sV|tj@rsd|}tj	|t
�ndS)aN
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        �nt�windirNz�%s is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).)r�r r��environ�stat�st_mode�S_IWOTH�S_IWGRP�warnings�warn�UserWarning)r�r!�msgrrr	r7�s
&z,ResourceManager._warn_unsafe_extraction_pathcCs@tjdkr<tj|�jdBd@}tj||�ndS)a4Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        �posiximi�N)r�r r@rA�chmod)r��tempnamer#r!rrr	�postprocess�szResourceManager.postprocesscCs%|jrtd��n||_dS)a�Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        z5Can't change extraction path, files already extractedN)r/rGr1)r�r�rrr	r]�s	z#ResourceManager.set_extraction_pathFcCsdS)aB
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        Nr)r��forcerrr	r^�sz!ResourceManager.cleanup_resources)r�r�r�r�r1r�rWrXrUrTrSrVr6r<�staticmethodr7rKr]r^rrrr	rbWscCsytjdSWntk
r#YnXtjdkrCtjjd�Sd}dd|fd|fd|fdd|fg}x�|D]�\}}d}xn|D]5}|tjkr�tjj|tj|�}q�Pq�W|r�tjj||�}ntjj|d
�Sq�Wtd��dS)aDetermine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    �PYTHON_EGG_CACHEr=z~/.python-eggszApplication Data�APPDATAN�USERPROFILE�	HOMEDRIVE�HOMEPATH�HOME�WINDIRr�zPython-Eggsz3Please set the PYTHON_EGG_CACHE enviroment variable�zAPPDATA)rUN)zUSERPROFILE)z	HOMEDRIVE�HOMEPATH)rV�zHOME)rWN)zWINDIR)r�r?r�r r��
expanduserrD�RuntimeError)�app_data�	app_homesr��subdirr"r6rrr	r_s0
			
cCstjdd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    z[^A-Za-z0-9.]+�-)�re�sub)r rrr	rm0scCs%|jdd�}tjdd|�S)z�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    r�r=z[^A-Za-z0-9.]+r])r�r^r_)r�rrr	rn8scCstjdd|�j�S)z�Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    z[^A-Za-z0-9.]+r�)r^r_r")�extrarrr	rsBscCs|jdd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    r]r�)r�)r rrr	rtKsr r�rCrBr�r��python_implementation�python_version�python_full_versionr`cCstjS)N)r�r rrrr	r
Ys�os_namecCstjS)N)rBrCrrrr	r
Zs�sys_platformcCstjj�dS)Nr)rBr�rrrrr	r
[scCsdtjdtjdfS)Nz%s.%srr�)rB�version_inforrrr	r
\scCs
td�S)Nr�)�	_platinforrrr	r
]s�platform_versioncCs
td�S)Nr�)rgrrrr	r
^s�platform_machinecCstd�pt�S)Nra)rg�_pyimprrrr	r
_sc
CsByddl}Wntk
r(dSYnXt||dd���S)Nrr�cSsdS)Nr�rrrrr	r
gsz_platinfo.<locals>.<lambda>)rCr�r�)�attrrCrrr	rgbs

	rgcCsDtjdkrdStjjd�r)dSdtjkr<dSdSdS)N�cli�
IronPython�java�JythonZ__pypy__�PyPy�CPython)rBrCr��builtin_module_namesrrrr	rjisrjcCsEidd6dd6}d|_d|_|j|j|j�|_|S)z�
    Given a SyntaxError from a marker evaluation, normalize the error message:
     - Remove indications of filename and line number.
     - Replace platform-specific error messages with standard error messages.
    zinvalid syntaxzunexpected EOF while parsingzparenthesis is never closedN)r#�linenor�rG)�exc�subsrrr	�normalize_exceptionss
		rvcCs;yt|�Wn&tk
r6ttj�d�SYnXdS)zHValidate text as a PEP 426 environment marker; return exception or Falser�F)rv�SyntaxErrorrvrBr
)�textrrr	ru�s

csf�sddlm�m�ddl�ddl�ddl���fdd�}��fdd�}��fdd	�}���fd
d�}�ji|�j6|�j6|�j6|�j	6dd
�d6dd
�d6�j
d6�jd6�t�d�r|��j
<qn��fdd����fdd���tj|�jd�d�S)aV
    Evaluate a PEP 426 environment marker on CPython 2.4+.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.

    This implementation uses the 'parser' module, which is not implemented on
    Jython and has been superseded by the 'ast' module in Python 2.6 and
    later.
    r)�NAME�STRINGNcs;tj�j��fdd�tdt��d�D��S)Ncs g|]}��|��qSrr)�.0�i)�	interpret�nodelistrr	�
<listcomp>�s	z5evaluate_marker.<locals>.and_test.<locals>.<listcomp>r�r>)�	functools�reduce�and_�range�len)r~)r}�operator)r~r	�and_test�sz!evaluate_marker.<locals>.and_testcs;tj�j��fdd�tdt��d�D��S)Ncs g|]}��|��qSrr)r{r|)r}r~rr	r�s	z1evaluate_marker.<locals>.test.<locals>.<listcomp>r�r>)r�r��or_r�r�)r~)r}r�)r~r	�test�szevaluate_marker.<locals>.testcsa|dd}|�jkrQ|dd�jkrCtd��n�|d�Std��dS)Nr�rr>zEmpty parenthesesz5Language feature not supported in environment markers)�LPAR�RPARrw)r~�t)r}�tokenrr	�atom�szevaluate_marker.<locals>.atomc
s�t|�dkr!td��n|dd}|d}|d�kr�t|d�dkr�|dkrtd}q}d	}q�ny�|}Wn(tk
r�tt|�d
��YnX|�|d��|d��S)Nr�z5Chained comparison not allowed in environment markersr>r�rr�notznot inzis notz, operator not allowed in environment markers)r�rwr�r�)r~�comp�cop)ry�_ops�evaluaterr	�
comparison�s
	
z#evaluate_marker.<locals>.comparisoncSs
||kS)Nr)�x�yrrr	r
�sz!evaluate_marker.<locals>.<lambda>znot incSs
||kS)Nr)r�r�rrr	r
�s�inz==z!=�or_testcs{x t|�dkr"|d}qWy�|d}Wn9tk
rptd��td�j|d��YnX||�S)Nr>r�rz)Comparison or logical expression expectedz7Language feature not supported in environment markers: )r�r�rw�sym_name)r~�op)r��symbolrr	r}�s
 z"evaluate_marker.<locals>.interpretcsx t|�dkr"|d}qW|d}|d}|�kr}yt|}Wn"tk
rutd|��YnX|�S|�kr�|d}|dd�dks�|jd�s�|jd�s�d|kr�td	��n|dd�Std
��dS)Nr>r�rzUnknown name %rz'"z"""z'''�\z1Only plain strings allowed in environment markersz5Language feature not supported in environment markersr�)r��_marker_valuesr�rwr�)r~�kindr r��s)ryrzrr	r��s$



4z!evaluate_marker.<locals>.evaluater�)r�ryrzr�r�r5r�r�r�r��eq�ner�r��parser�expr�totuple)rxr`r�r�r�r�r�r)ryrzr�r�r}r�r�r�r	rv�s$	%	cCs�ddl}|j�}x9|j�D]+}|jdd�}|j|�||<q%Wy|j||�}Wn5tk
r�tj�d}t	|j
d��YnX|S)z�
    Evaluate a PEP 426 environment marker using markerlib.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.
    rNr=r�r�)�
_markerlib�default_environmentr�r�r�r}�	NameErrorrBr
rwr;)rxr�rr6�new_key�result�errr	�_markerlib_evaluate�s
r�r�c@seZdZdZdZdZdZdd�Zdd�Zdd�Z	d	d
�Z
dd�Zd
d�Ze
jd)kr�dd�Zndd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�ZdS)*r�zETry to implement resources and metadata for arbitrary PEP 302 loadersNcCs:t|dd�|_tjjt|dd��|_dS)Nr��__file__r�)r�r�r�r�r"�module_path)r�r�rrr	r�szNullProvider.__init__cCs|j|j|�S)N)�_fnr�)r�r�r�rrr	r�	sz"NullProvider.get_resource_filenamecCst|j||��S)N)rr�)r�r�r�rrr	r�sz NullProvider.get_resource_streamcCs|j|j|j|��S)N)�_getr�r�)r�r�r�rrr	r�sz NullProvider.get_resource_stringcCs|j|j|j|��S)N)�_hasr�r�)r�r�rrr	r�szNullProvider.has_resourcecCs%|jo$|j|j|j|��S)N)�egg_infor�r�)r�r rrr	r�szNullProvider.has_metadatarcCs)|js
dS|j|j|j|��S)Nr�)r�r�r�)r�r rrr	r�s	zNullProvider.get_metadatacCs2|js
dS|j|j|j|��jd�S)Nr�zutf-8)r�r�r��decode)r�r rrr	r�s	cCst|j|��S)N)rqr�)r�r rrr	r�#szNullProvider.get_metadata_linescCs|j|j|j|��S)N)�_isdirr�r�)r�r�rrr	rX&szNullProvider.resource_isdircCs%|jo$|j|j|j|��S)N)r�r�r�)r�r rrr	r�)szNullProvider.metadata_isdircCs|j|j|j|��S)N)�_listdirr�r�)r�r�rrr	rV,szNullProvider.resource_listdircCs)|jr%|j|j|j|��SgS)N)r�r�r�)r�r rrr	r�/s	zNullProvider.metadata_listdircCs�d|}|j|�s,td|��n|j|�jdd�}|jdd�}|j|j|�}||d<tjj|�r�t	|||�nWddl
m}t|�d|j
d�|f||<t||d	�}t|||�dS)
Nzscripts/zNo script named %rz
�
�
r�r)�cacher
)r�rfr�r�r�r�r�r�r�r�	linecacher�r�rrr
)r�r�r��script�script_text�script_filenamer��script_coderrr	rL4s

%zNullProvider.run_scriptcCstd��dS)Nz9Can't perform this operation for unregistered loader type)�NotImplementedError)r�r�rrr	r�FszNullProvider._hascCstd��dS)Nz9Can't perform this operation for unregistered loader type)r�)r�r�rrr	r�KszNullProvider._isdircCstd��dS)Nz9Can't perform this operation for unregistered loader type)r�)r�r�rrr	r�PszNullProvider._listdircCs&|r"tjj||jd��S|S)N�/)r�r�rDr)r��baser�rrr	r�UszNullProvider._fncCs2t|jd�r"|jj|�Std��dS)N�get_dataz=Can't perform this operation for loaders without 'get_data()')r�r�r�r�)r�r�rrr	r�ZszNullProvider._get)r)r�r�r�r��egg_namer�r�r�r�r�r�r�r�rBrfr�r�rXr�rVr�rLr�r�r�r�r�rrrr	r��s0c@s.eZdZdZdd�Zdd�ZdS)r�z&Provider based on a virtual filesystemcCstj||�|j�dS)N)r�r��
_setup_prefix)r�r�rrr	r�gszEggProvider.__init__cCs�|j}d}x}||kr�|j�jd�rmtjj|�|_tjj|d�|_||_	Pn|}tjj
|�\}}qWdS)Nz.eggzEGG-INFO)r�r"�endswithr�r��basenamer�rDr��egg_rootr)r�r��oldr�rrr	r�ks		zEggProvider._setup_prefixN)r�r�r�r�r�r�rrrr	r�dsc@sReZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
r�z6Provides access to package resources in the filesystemcCstjj|�S)N)r�r�r�)r�r�rrr	r�|szDefaultProvider._hascCstjj|�S)N)r�r�r)r�r�rrr	r�szDefaultProvider._isdircCs
tj|�S)N)r��listdir)r�r�rrr	r��szDefaultProvider._listdircCst|j|j|�d�S)N�rb)rr�r�)r�r�r�rrr	r��sz#DefaultProvider.get_resource_streamc
Cs/t|d�}z|j�SWd|j�XdS)Nr�)rr�close)r�r��streamrrr	r��szDefaultProvider._getN)	r�r�r�r�r�r�r�r�r�rrrr	r�ysc@sPeZdZdZdd�ZZdd�Zdd�ZdZdd�Z	dS)	r�z.Provider that returns nothing for all requestscCsdS)NFr)r�r�rrr	r
�szEmptyProvider.<lambda>cCsdS)Nr�r)r�r�rrr	r
�scCsgS)Nr)r�r�rrr	r
�sNcCsdS)Nr)r�rrr	r��szEmptyProvider.__init__)
r�r�r�r�r�r�r�r�r�r�rrrr	r��sc
Cs�t�}tj|�}zYxR|j�D]D}|jdtj�}|j|�||<||dk	s(t�q(WWd|j	�X|S)af
    This builds a similar dictionary to the zipimport directory
    caches.  However instead of tuples, ZipInfo objects are stored.

    The translation of the tuple is as follows:
      * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep
              on pypy it is the same (one reason why distribute did work
              in some cases on pypy and win32).
      * [1] - zipinfo.compress_type
      * [2] - zipinfo.compress_size
      * [3] - zipinfo.file_size
      * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
              len(ascii encoding of filename) otherwise
      * [5] - (zipinfo.date_time[0] - 1980) << 9 |
               zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
      * [6] - (zipinfo.date_time[3] - 1980) << 11 |
               zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
      * [7] - zipinfo.CRC
    r�N)
r�zipfile�ZipFile�namelistr�r��sep�getinfo�AssertionErrorr�)r��zipinfo�zfile�zitem�zpathrrr	�build_zipmanifest�s	r�c@s�eZdZdZdZdd�Zdd�Zdd�Zd	d
�Ze	dd��Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS)r�z"Resource support for zips and eggsNcCs?tj||�t|jj�|_|jjtj|_dS)N)	r�r�r�r��archiver�r�r��zip_pre)r�r�rrr	r��szZipProvider.__init__cCsF|j|j�r)|t|j�d�Std||jf��dS)Nz%s is not a subpath of %s)r�r�r�r�)r��fspathrrr	�
_zipinfo_name�szZipProvider._zipinfo_namecCsj|j|}|j|jtj�rM|t|j�dd�jtj�Std||jf��dS)Nr�z%s is not a subpath of %s)r�r�r�r�r�r�rr�)r��zip_pathr�rrr	�_parts�s

'zZipProvider._partscCs�|jstd��n|j|�}|j�}dj|j|��|kr~x*|D]}|j||j|��qXWn|j||�S)Nz5resource_filename() only supported for .egg, not .zipr�)r�r��_resource_to_zip�_get_eager_resourcesrDr��_extract_resource�
_eager_to_zip)r�r�r�r��eagersr rrr	r��s	
 z!ZipProvider.get_resource_filenamecCs/|j}|jd}tj|�}||fS)Nrr�r�)rrr�)�	file_size�	date_time�time�mktime)�zip_stat�sizer��	timestamprrr	�_get_date_and_size�s	
zZipProvider._get_date_and_sizec
Cs�||j�kr^x9|j�|D]'}|j|tjj||��}q#Wtjj|�S|j|j|�\}}ts�t	d��ny)|j
|j|j|��}|j
||�r�|Stddtjj|��\}}	tj||jj|��tj|�t|	||f�|j|	|�yt|	|�Wnmtjk
r�tjj|�r�|j
||�r�|Stjdkr�t|�t|	|�|Sn�YnXWntjk
r�|j�YnX|S)Nz>"os.rename" and "os.unlink" are not supported on this platformz	.$extract�dirr=)�_indexr�r�r�rDr"r�r�rrr<r�r��_is_current�_mkstemp�writer�r�r�rrKr�error�isfiler rr6)
r�r�r�r �lastr�r��	real_path�outf�tmpnamrrr	r��s@$


zZipProvider._extract_resourcec	Cs�|j|j|�\}}tjj|�s2dStj|�}|j|ks_|j|krcdS|jj	|�}t
|d�}|j�}|j�||kS)zK
        Return True if the file_path is current for this zip_path
        Fr�)
r�r�r�r�r�r@�st_size�st_mtimer�r�rrr�)	r��	file_pathr�r�r�r@�zip_contents�f�
file_contentsrrr	r�&s
zZipProvider._is_currentcCsa|jdkrZg}x6dD].}|j|�r|j|j|��qqW||_n|jS)N�native_libs.txt�eager_resources.txt)r�r�)r�r�r�r�)r�r�r rrr	r�7s
z ZipProvider._get_eager_resourcescCs�y|jSWn�tk
r�i}x�|jD]y}|jtj�}x^|r�tjj|dd��}||kr�||j|d�PqF|j�g||<qFWq+W||_|SYnXdS)Nr�r�r�)	�	_dirindex�AttributeErrorr�rr�r�rDr�r�)r��indr��parts�parentrrr	r�@s
		zZipProvider._indexcCs.|j|�}||jkp-||j�kS)N)r�r�r�)r�r�r�rrr	r�QszZipProvider._hascCs|j|�|j�kS)N)r�r�)r�r�rrr	r�UszZipProvider._isdircCs%t|j�j|j|�f��S)N)r�r�r�r�)r�r�rrr	r�XszZipProvider._listdircCs|j|j|j|��S)N)r�r�r�)r�r�rrr	r�[szZipProvider._eager_to_zipcCs|j|j|j|��S)N)r�r�r�)r�r�rrr	r�^szZipProvider._resource_to_zip)r�r�r�r�r�r�r�r�r�rMr�r�r�r�r�r�r�r�r�r�rrrr	r��s 		
1	c@sFeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)r�a*Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    cCs
||_dS)N)r�)r�r�rrr	r�pszFileMetadata.__init__cCs
|dkS)NzPKG-INFOr)r�r rrr	r�sszFileMetadata.has_metadatacCsH|dkr8t|jd�}|j�}|j�|Std��dS)NzPKG-INFO�rUz(No metadata except PKG-INFO is available)rr�rr�r�)r�r r��metadatarrr	r�vs
zFileMetadata.get_metadatacCst|j|��S)N)rqr�)r�r rrr	r�~szFileMetadata.get_metadata_linesN)r�r�r�r�r�r�r�r�rrrr	r�ds

c@s"eZdZdZdd�ZdS)r�aqMetadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir,project_name=dist_name,metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    cCs||_||_dS)N)r�r�)r�r�r�rrr	r��s	zPathMetadata.__init__N)r�r�r�r�r�rrrr	r��sc@s"eZdZdZdd�ZdS)r�z Metadata provider for .egg filescCsrt|j�|_|jtj|_||_|jrXtjj	|j|j�|_
n|j|_
|j�dS)z-Create a metadata provider from a zipimporterN)r�r�r�r�r�r�r��prefixr�rDr�r�)r��importerrrr	r��s		!zEggMetadata.__init__N)r�r�r�r�r�rrrr	r��sr�_distribution_finderscCs|t|<dS)axRegister `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example.N)r)�
importer_type�distribution_finderrrr	r��scCs+t|�}tt|�}||||�S)z.Yield distributions accessible via `path_item`)rr�r)�	path_item�onlyr�finderrrr	r\�sccs�t|�}|jd�r2tj|d|�Vn|r<dSxf|jd�D]U}|jd�rLtjj||�}x(t	t
j|�|�D]}|Vq�WqLqLWdS)NzPKG-INFOrr�z.egg)r�r�rc�
from_filenamerVr�r�r�rD�find_in_zip�	zipimport�zipimporter)rrrr�subitem�subpathr�rrr	r�srcCsfS)Nr)rrrrrr	�find_nothing�srccst|�}tjj|�rtj|tj�r|j�jd�rwtj	|dt
|tjj|d���Vqx�tj|�D]}}|j�}|jd�s�|jd�rtjj||�}tjj|�r�t
||�}nt
|�}tj|||dt�Vq�|r]|jd�r]x�ttjj||��D]}|VqKWq�|r�|jd�r�ttjj||��}z|j�}	Wd|j�XxU|	D]J}
|
j�s�q�nx.ttjj||
j���D]}|Vq�WPq�Wq�q�WndS)	z6Yield distributions accessible on a sys.path directoryz.eggrzEGG-INFOz	.egg-infoz
.dist-info�
precedencez	.egg-linkN)�_normalize_cachedr�r�r�access�R_OKr"r�rcr
r�rDr�r��
from_locationr}r\r�	readlinesr��strip�rstrip)rrrr�r"�fullpathrr��
entry_file�entry_lines�liner�rrr	�find_on_path�s:'	 "
(	r�_namespace_handlers�_namespace_packagescCs|t|<dS)a�Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer,path_entry,moduleName,module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    N)r)r�namespace_handlerrrr	r��scCs
t|�}|dkrdS|j|�}|dkr;dStjj|�}|dkr�tj|�}tj|<g|_t|�n!t	|d�s�t
d|��ntt|�}|||||�}|dk	r	|j}|j
|�|j|�||_n|S)zEEnsure that named package includes a subpath of path_item (if needed)N�__path__zNot a package:)r�find_modulerBr�r��imp�
new_moduler!�_set_parent_nsr�r�r�rr��load_module)�packageNamerrr�r��handlerrr�rrr	�
_handle_nss*	
	

r)cCstj�z�|tkrdStjd}}d|kr�dj|jd�dd��}t|�|tkr~t|�nytj	|j
}Wq�tk
r�td|��Yq�Xntj
|g�j|�tj
|g�x|D]}t||�q�WWdtj�XdS)z9Declare that package 'packageName' is a namespace packageNr=r�zNot a package:r�)r#�acquire_lockrrBr�rDrrYr�r�r!r�r�r�r�r)�release_lock)r'r�r�rrrr	rY(s&
"



c
Csbtj�zFx?tj|f�D]+}t||�}|r t||�q q WWdtj�XdS)zDEnsure that previously-declared namespace packages include path_itemN)r#r*rr�r)r�r+)rr��packagerrrr	r�Hs
cCs`tjj||jd�d�}t|�}x+|jD]}t|�|kr8Pq8q8W|SdS)zBCompute an ns-package subpath for a filesystem or zipfile importerr=r�Nr�)r�r�rDrrr!)rrr'r�r�
normalizedr�rrr	�file_ns_handlerRs"r.cCsdS)Nr)rrr'r�rrr	�null_ns_handleresr/cCstjjtjj|��S)z1Normalize a file/dir name for comparison purposes)r�r��normcase�realpath)r#rrr	rxkscCs=y||SWn*tk
r8t|�||<}|SYnXdS)N)r�rx)r#r�r�rrr	ros

rcCsU|jd�}|j�}|rQdj|�}ttj||tj|�ndS)Nr=)rr�rD�setattrrBr�)r'r�r r�rrr	r%vs
r%ccs�t|t�rSxn|j�D]0}|j�}|r|jd�r|VqqWn-x*|D]"}xt|�D]}|VqmWqZWdS)zAYield non-empty/non-comment lines of a ``basestring`` or sequence�#N)r�r��
splitlinesrr�rq)�strsr��ssrrr	rq~s
z
\s*(#.*)?$z\s*\\\s*(#.*)?$z\s*((\w|[-.])+)z!\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)z\s*,z\s*\[z\s*\]z\w+(\.\w+)*$zL(?P<name>[^-]+)( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?z(\d+ | [a-z]+ | \.| -)�c�pre�previewzfinal-r]�rc�@�devccs{xotj|�D]^}t||�}|s|dkr>qn|dd�dkre|jd�Vqd|VqWdVdS)Nr=r��
0123456789r��*z*final)�component_rerr��zfill)r��partrrr	�_parse_version_parts�s
rBcCs�g}x�t|j��D]�}|jd�r�|dkrdx'|r`|ddkr`|j�q=Wnx'|r�|ddkr�|j�qgWn|j|�qWt|�S)a�Convert a version string to a chronologically-sortable key

    This is a rough cross between distutils' StrictVersion and LooseVersion;
    if you give it versions that would work with StrictVersion, then it behaves
    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    *possible* to create pathological version coding schemes that will fool
    this parser, but they should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    than any other pre-release tag.
    r>z*finalr�z*final-�00000000r�r�)rBr"r�r�r��tuple)r�r�rArrr	rl�sc@s�eZdZdZffddd�Zdd�Zdd�Zd	ddd
d�Zdddd
�Zddd�Z	e
e	�Z	ddd�Ze
e�Zddd�Ze
e�ZdS)rez3Object representing an advertised importable objectNcCsnt|�std|��n||_||_t|�|_tjddj|��j	|_	||_
dS)NzInvalid module namezx[%s]�,)�MODULErGr �module_namerD�attrsrdr�rDr�r�)r�r rGrHr�r�rrr	r��s		"zEntryPoint.__init__cCsfd|j|jf}|jr<|ddj|j�7}n|jrb|ddj|j�7}n|S)Nz%s = %s�:r=z [%s]rE)r rGrHrDr�)r�r�rrr	�__str__�s		zEntryPoint.__str__cCsdt|�S)NzEntryPoint.parse(%r))r�)r�rrr	r��szEntryPoint.__repr__TcCs�|r|j||�nt|jt�t�dg�}xO|jD]D}yt||�}WqDtk
r�td||f��YqDXqDW|S)Nr�z%r has no %r attribute)rKr�rGrrHr�r�r�)r�rKrrr�rkrrr	�load�s!
zEntryPoint.loadcCs]|jr%|jr%td|��ntttjtj|jj|j�||���dS)Nz&Can't require() without a distribution)	r�r�rir�rrZr�rr�)r�rrrrr	rK�szEntryPoint.requirecCsy�f}}|jdd�\}}d|krz|jdd�\}}tjd|�}|jrnt�n|j}nd|kr�|jdd�\}}t|j��s�t�n|j�jd�}nWn!tk
r�td|��Yn#X||j�|j�|||�SdS)	aParse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        �=r��[zx[rIr=z9EntryPoint must be in 'name=module:attrs [extras]' formatN)	rrdr��specsrGr�rFrr)�cls�srcr�rHr�r �valuer�rrr	r��s&

			
zEntryPoint.parsecCs�t|�std|��ni}xZt|�D]L}|j||�}|j|krptd||j��n|||j<q1W|S)zParse an entry point groupzInvalid group namezDuplicate entry point)rFrGrqr�r )rOrF�linesr��thisrr�rrr	�parse_groupszEntryPoint.parse_groupcCs�t|t�r|j�}nt|�}i}x~|D]v\}}|dkrj|s[q7ntd��n|j�}||kr�td|��n|j|||�||<q7W|S)z!Parse a map of entry point groupsNz%Entry points must be listed in groupszDuplicate group name)r�rr$rrrGrrT)rO�datar��mapsrFrRrrr	�	parse_map)szEntryPoint.parse_map)
r�r�r�r�r�rJr�rKrKr��classmethodrTrWrrrr	re�s	
cCsE|s
dSt|�}|djd�rAt|dd�d�S|S)Nr�r�zmd5=r�r�)r�)rr�r)r��parsedrrr	�_remove_md5_fragment>srZc	@seZdZdZdZddddededd�Zddd�Ze	e�Ze
dd	��Zd
d�Zdd
�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Ze
e�Zdd�Ze
e�Zdd�Ze
e�Zdd�Ze
e�Zfd d!�Zd"d#�Zdd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zdd.d/�Ze	e�Zd0d1�Zd2d3�Z dd4d5�Z!d6d7�Z"dd8d9�Z#d:d;�Z$d<d=�Z%d>d?�Z&d@dA�Z'e
e'�Z'dS)Brcz5Wrap an actual or potential sys.path entry w/metadatazPKG-INFONcCsjt|pd�|_|dk	r3t|�|_n||_||_||_||_|p`t|_	dS)N�Unknown)
rmrrn�_versionrrCr�rr��	_provider)r�r�rrr�rrCrrrr	r�Ks				zDistribution.__init__cKs�dgd\}}}}tjj|�\}}	|	j�tkr�t|�}
|
r||
jdddd�\}}}}nt|	j�}n|||d|d|d|d	||�S)
Nr�r �ver�pyverrHrr�rrC)r�r��splitextr"�_distributionImpl�EGG_NAMErF)rOr�r�rr'rr�rrC�extrArrr	rXs!zDistribution.from_locationcCs7t|df�|j|jt|j�|j|jfS)N�parsed_version)r�rr6rZr�rrC)r�rrr	r
jszDistribution.<lambda>cCs
t|j�S)N)�hash�hashcmp)r�rrr	�__hash__sszDistribution.__hash__cCs|j|jkS)N)rf)r�r)rrr	�__lt__tszDistribution.__lt__cCs|j|jkS)N)rf)r�r)rrr	�__le__vszDistribution.__le__cCs|j|jkS)N)rf)r�r)rrr	�__gt__xszDistribution.__gt__cCs|j|jkS)N)rf)r�r)rrr	�__ge__zszDistribution.__ge__cCs&t||j�sdS|j|jkS)NF)r�r�rf)r�r)rrr	�__eq__|szDistribution.__eq__cCs||kS)Nr)r�r)rrr	�__ne__�szDistribution.__ne__cCs>y|jSWn,tk
r9|jj�|_}|SYnXdS)N)�_keyr�rr")r�r6rrr	r6�s

zDistribution.keycCs>y|jSWn,tk
r9t|j�|_}|SYnXdS)N)�_parsed_versionr�rlr�)r��pvrrr	rd�s

zDistribution.parsed_versioncCs�y|jSWn�tk
r�xq|j|j�D]G}|j�jd�r.t|jdd�dj��|_|jSq.Wt	d|j|��YnXdS)Nzversion:rIr�z(Missing 'Version:' header and/or %s file)
r\r��
_get_metadata�PKG_INFOr"r�rnrrrG)r�rrrr	r��s
%zDistribution.versioncCs�y|jSWn�tk
r�igd6}|_x�dD]�}x�t|j|��D]�\}}|r�d|kr�|jdd�\}}t|�r�g}q�t|�s�g}q�nt|�p�d}n|j|g�j	t
|��qRWq6W|SYnXdS)N�requires.txt�depends.txtrIr�)rsrt)�_Distribution__dep_mapr�rrrqrrurvrsr�r�rk)r��dmr r`�reqs�markerrrr	�_dep_map�s 

"	'zDistribution._dep_mapcCs�|j}g}|j|jdf��xT|D]L}y|j|t|��Wq/tk
rztd||f��Yq/Xq/W|S)z@List of Requirements needed for this distro if `extras` are usedNz%s has no such extra feature %r)ryr�r�rsr�ri)r�r�rv�depsrcrrr	r��s	

zDistribution.requiresccs5|j|�r1x|j|�D]}|VqWndS)N)r�r�)r�r rrrr	rq�szDistribution._get_metadatacCsd|dkrtj}n|j|�|tjkr`t|j�ttt|jd���ndS)z>Ensure distribution is importable on `path` (default=sys.path)Nznamespace_packages.txt)	rBr�r�r�r�r�rrYrq)r�r�rrr	�activate�s

zDistribution.activatecCsOdt|j�t|j�|jp'tf}|jrK|d|j7}n|S)z@Return what this distribution's standard .egg filename should bez
%s-%s-py%sr])rtrr�rr.rC)r�r#rrr	r��s	zDistribution.egg_namecCs(|jrd||jfSt|�SdS)Nz%s (%s))r�r�)r�rrr	r��s	zDistribution.__repr__cCsNyt|dd�}Wntk
r0d}YnX|p:d}d|j|fS)Nr�z[unknown version]z%s %s)r�rGr)r�r�rrr	rJ�s
zDistribution.__str__cCs.|jd�rt|��nt|j|�S)zADelegate all unrecognized public attributes to .metadata providerr�)r�r�r�r])r�rkrrr	�__getattr__�szDistribution.__getattr__cKs(|jt|�tjj|�||�S)N)rrr�r�r�)rOr#rr'rrr	r
�szDistribution.from_filenamecCstjd|j|jf�S)z?Return a ``Requirement`` that matches this distribution exactlyz%s==%s)rdr�rr�)r�rrr	r	�szDistribution.as_requirementcCsD|j||�}|dkr:td||ff��n|j�S)z=Return the `name` entry point of `group` or raise ImportErrorNzEntry point %r not found)rQr�rK)r�rFr r�rrr	rO	szDistribution.load_entry_pointcCsdy
|j}Wn4tk
rCtj|jd�|�}|_YnX|dk	r`|j|i�S|S)z=Return the entry point map for `group`, or the full entry mapzentry_points.txtN)�_ep_mapr�rerWrqr�)r�rF�ep_maprrr	rP		s

!zDistribution.get_entry_mapcCs|j|�j|�S)z<Return the EntryPoint object for `group`+`name`, or ``None``)rPr�)r�rFr rrr	rQ	szDistribution.get_entry_infoc	CsN|p|j}|sdSt|�}tjj|�}dd�|D�}x�t|�D]w\}}||krsPqW||krW|jtkrW|tjkr�|j	�n|j
||�|j
||�PqWqWW|tjkr�|j	�n|j|�dSxHy|j||d�}Wnt
k
r1PYqX||=||=|}qWdS)z@Insert self.location in path before its nearest parent directoryNcSs(g|]}|rt|�p!|�qSr)r)r{�prrr	r"	s	z*Distribution.insert_on.<locals>.<listcomp>r�)r�rr�r�r"�	enumeraterryrB�check_version_conflictr�r��indexrG)	r�r��loc�nloc�bdir�npathrr��nprrr	r�	s6




zDistribution.insert_oncCs�|jdkrdStj|jd��}t|j�}x�|jd�D]�}|tjksJ||ksJ|tkr}qJn|dkr�qJnt	tj|dd�}|r�t|�j
|�sJ|j
|j�r�qJntd|||jf�qJWdS)	N�
setuptoolsznamespace_packages.txtz
top_level.txt�
pkg_resources�siter�zIModule %s was already imported from %s, but %s is being added to sys.path)z
pkg_resourcesz
setuptoolszsite)r6rrrqrxr�rBr�rr�r��
issue_warning)r��nspr��modnamerrrr	r�@	s"z#Distribution.check_version_conflictcCs<y|jWn*tk
r7tdt|��dSYnXdS)NzUnbuilt egg for FT)r�rGr�r�)r�rrr	r&U	s
	zDistribution.has_versioncKsMx*d	D]"}|j|t||d��qW|jd|j�|j|�S)
z@Copy this distribution, substituting in any changed keyword argsrr�rrCr�rNr)zproject_namezversionz
py_versionzplatformzlocationz
precedence)r�r�r]r�)r�r'rkrrr	�clone]	s
 zDistribution.clonecCsdd�|jD�S)NcSsg|]}|r|�qSrr)r{�deprrr	ri	s	z'Distribution.extras.<locals>.<listcomp>)ry)r�rrr	r�h	szDistribution.extras)(r�r�r�r�rrr.ryr�rrX�propertyrfrgrhrirjrkrlrmr6rdr�ryr�rqr{r�r�rJr|r
r	rOrPrQr�r�r&r�r�rrrr	rcGsV			'c@sgeZdZdZdZejd�Zedd��Z	edd��Z
dd	�Zd
d�ZdS)
�DistInfoDistributionzGWrap an actual or potential sys.path entry w/metadata, .dist-info style�METADATAz([\(,])\s*(\d.*?)\s*([,\)])cCs\y|jSWnJtk
rWddlm}|�j|j|j��|_|jSYnXdS)zParse and cache metadatar)�ParserN)�	_pkg_infor��email.parserr��parsestrr�rr)r�r�rrr	�_parsed_pkg_infor	s
!z%DistInfoDistribution._parsed_pkg_infocCs:y|jSWn(tk
r5|j�|_|jSYnXdS)N)�_DistInfoDistribution__dep_mapr��_compute_dependencies)r�rrr	ry|	s

zDistInfoDistribution._dep_mapcCsy|jdd�dg}|dj�}|dj�}tj|jd|�}|jdd�jdd�}||fS)z�Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz')
        Split environment marker, add == prefix to version specifiers as
        necessary, and remove parenthesis.
        �;r�r�rz\1==\2\3�(�))rrr^r_�EQEQr�)r��
requires_distr��distvers�markrrr	�_preparse_requirement�	sz*DistInfoDistribution._preparse_requirementc
sddlm}igd6}|_g�xc|jjd�pBgD]I}|j|�\}}tt|��}||�|_�j	|�qCW�fdd�}t
|d��}|dj|�xR|jjd�p�gD]8}	t|	j
��}	tt
||	��|�||	<q�W|S)z+Recompute this distribution's dependencies.r)rNz
Requires-Distc3s6x/�D]'}|jdi|d6�r|VqqWdS)N�overrider`)�	marker_fn)r`r�)rwrr	�reqs_for_extra�	s
zBDistInfoDistribution._compute_dependencies.<locals>.reqs_for_extrazProvides-Extra)r�rr�r��get_allr�rrkr�r��	frozensetr�rsrr�)
r��compile_markerrvr�r�r�rYr��commonr`r)rwr	r��	s$z*DistInfoDistribution._compute_dependenciesN)
r�r�r�r�rrr^rr�r�r�ryr�r�rrrr	r�m	s
r�z.eggz	.egg-infoz
.dist-infoc
Os|d}t�}y-x&tj|�j|kr:|d7}qWWntk
rPYnXddlm}|d|d||�dS)Nr�r)rE�
stacklevel)rrBr�r�rGrDrE)r;r'�levelr(rErrr	r��	s	
r�c#stt|����fdd�}x��D]�}t|�}|sUtd|��n|jd�}|j�}g}t||�}|r�|j�}|tt||dd�\}}}n|tt	||dd�\}}}dd	�|D�}t
|||�Vq+Wd
S)
z�Yield ``Requirement`` objects for each specification in `strs`

    `strs` must be an instance of ``basestring``, or a (possibly-nested)
    iterable thereof.
    csLg}x|||�st||�rayt��}d}Wqatk
r]td��YqaXn|||�}|s�td|d|d||d���n|j|j|��|j�}t||�}|r�|j�}q	|||�s	td|d||d���q	q	W|||�}|r?|j�}n|||fS)Nrz+\ must not appear on the last nonblank linez	Expected z in�atzExpected ',' or end-of-list in)�CONTINUEr�
StopIterationrGr�rF�end�COMMA)�ITEM�
TERMINATORrr�groups�	item_namer$rA)rRrr	�	scan_list�	s0

*#z%parse_requirements.<locals>.scan_listzMissing distribution specr�z'extra' namer>zversion speccSs(g|]\}}|t|�f�qSr)rn)r{r�r)rrr	r�	s	z&parse_requirements.<locals>.<listcomp>N)r�)r�r>)�iterrq�DISTROrGrFr��OBRACKET�CBRACKET�VERSION�LINE_ENDrd)r5r�rrArrr�rNr)rRr	rk�	s"!
$$cCsAdd�|D�}|j�dd�|D�|ddd�<dS)NcSsg|]}|j|f�qSr)rf)r{r�rrr	r
s	z_sort_dists.<locals>.<listcomp>cSsg|]\}}|�qSrr)r{�hc�drrr	r
s	r�r�)r)r$�tmprrr	r#�	s
r#c@speZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	e
e	�Z	dS)rdcCs�|t|�|_}||j�|_|_dd�|D�}|j�dd�|D�|_|ttt	|��|_
|_|jtdd�|D��t|j�f|_
t|j
�|_dS)z>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!cSs2g|](\}}t|�t|||f�qSr)rl�
state_machine)r{r�r.rrr	r

s	z(Requirement.__init__.<locals>.<listcomp>cSs(g|]\}}}}||f�qSrr)r{rY�transr�r^rrr	r
s	cSs(g|]\}}}}||f�qSrr)r{rYr�r�r^rrr	r
s	N)rm�unsafe_namer"rr6rrNrDrrsr�r�r��hashCmpre�_Requirement__hash)r�rrNr�r�rrr	r�
s
"zRequirement.__init__cCsXdjdd�|jD��}dj|j�}|rDd|}nd|j||fS)NrEcSsg|]}dj|��qS)r�)rD)r{r�rrr	r
s	z'Requirement.__str__.<locals>.<listcomp>z[%s]z%s%s%s)rDrNr�r)r�rNr�rrr	rJ
s

zRequirement.__str__cCst|t�o|j|jkS)N)r�rdr�)r�r)rrr	rl
szRequirement.__eq__c	Cst|t�r=|j|jkr%dS|jr[|j}q[nt|t�r[t|�}nd}dd�}x�|jD]{\}}}}||||�}|dkr�dS|dkr�dS|dkr�d}qw|dks�|dkrwd}qwqwW|dkrd}n|S)	NFcSs||k||kS)Nr)�a�brrr	r
$
sz*Requirement.__contains__.<locals>.<lambda>�F�TT�+r])r�rcr6r�rdr�rl)	r�r�r��comparerYr�r�r^�actionrrr	r�
s,		
	zRequirement.__contains__cCs|jS)N)r�)r�rrr	rg1
szRequirement.__hash__cCsdt|�S)NzRequirement.parse(%r))r�)r�rrr	r�4
szRequirement.__repr__cCsWtt|��}|rDt|�dkr2|dStd|��ntd|��dS)Nr�rzExpected only one requirementzNo requirements found)r�rkr�rG)r�rwrrr	r�7
szRequirement.parseN)r�r�r�r�rJrlr�rgr�r�rMrrrr	rd
sz--T�<zT-Tz<=zF+F�>zT+Fz>=zT..z==zF++z!=cCs@t|t�s9Gdd�d|t�}|jdd�S|jS)z&Get an mro for a type or classic classc@seZdZdS)z_get_mro.<locals>.clsN)r�r�r�rrrr	rOO
srOr�N)r��type�object�__mro__)rOrrr	�_get_mroL
sr�cCsAx:tt|dt|���D]}||kr||SqWdS)z2Return an adapter factory for `ob` from `registry`r�N)r�r�r�)�registryr7r�rrr	r�S
s%r�cCs8tjj|�}tjj|�s4tj|�ndS)z1Ensure that the parent directory of `path` existsN)r�r�r"r�makedirs)r�r"rrr	rwZ
sccs�d}g}x�t|�D]|}|jd�r�|jd�rv|sI|rW||fVn|dd�j�}g}q�td|��q|j|�qW||fVdS)arSplit a string or iterable thereof into (section,content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    NrM�]r�zInvalid section headingr�)rqr�r�rrGr�)r��section�contentrrrr	rr`
s	cOsDddlm}tj}ztt_|||�SWd|t_XdS)Nr)�mkstemp)�tempfiler�r�r�os_open)r;r'r��old_openrrr	r�y
s		r�cCs@x9tt�D]+}|jd�s
tt|�||<q
q
WdS)Nr�)r��_managerr�r�)r(r rrr	�_initialize�
sr�r�)�__requires__cCs
|j�S)N)r{)r�rrr	r
�
s)�r�rBr�r�r^r#r�rrDr@r��pkgutilrrrr��urllib.parser�r�Zsetsrr�r�	cStringIOrrr��iorrrrrrrr��os.pathrrrf�implementationr Zimportlib._bootstrap�
_bootstrap�importlib_bootstrapr�rr%r*r/r1r3r8r9r:�
_sget_none�
_sset_nonerJ�__all__�	Exceptionrfrgrhrir�r�r.ryrzr{r|r}r�rMrEr�r?rr@r�rorprLr�rNrOrPrQr~rr�rar`r�rYrjrbr_rmrnrsrtZ
_marker_namesr�rgrjrvrurvr�rr�r�r�r��SourceFileLoaderr�r�r�r�r
r�r�r�r�r\rrr�ImpImporter�
FileFinderr�r)rYr�r.r/rxrr%rqrAr�r�r�r�r�r�r�rF�VERBOSE�
IGNORECASErbr?r�r�rBrlrerZrcr�rar�rkr#rdr�r�r�rwrrr�r�r��__main__r�rZrKrr�r�r�r�r�r�rRrr[r�rrrrr	�<module>s�




'

									1���)
	






Z	c
	!�

( 

,)n	�'?
><
	


						python3.4/site-packages/easy_install.py000064400000000176151735047210014104 0ustar00"""Run the EasyInstall command"""

if __name__ == '__main__':
    from setuptools.command.easy_install import main
    main()
python3.4/site-packages/pip/download.py000064400000054064151735047210014021 0ustar00import cgi
import email.utils
import hashlib
import getpass
import mimetypes
import os
import platform
import re
import shutil
import sys
import tempfile

import pip

from pip.backwardcompat import urllib, urlparse, raw_input
from pip.exceptions import InstallationError, HashMismatch
from pip.util import (splitext, rmtree, format_size, display_path,
                      backup_dir, ask_path_exists, unpack_file,
                      create_download_cache_folder, cache_download)
from pip.vcs import vcs
from pip.log import logger
from pip._vendor import requests, six
from pip._vendor.requests.adapters import BaseAdapter
from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
from pip._vendor.requests.compat import IncompleteRead
from pip._vendor.requests.exceptions import InvalidURL, ChunkedEncodingError
from pip._vendor.requests.models import Response
from pip._vendor.requests.structures import CaseInsensitiveDict

__all__ = ['get_file_content',
           'is_url', 'url_to_path', 'path_to_url',
           'is_archive_file', 'unpack_vcs_link',
           'unpack_file_url', 'is_vcs_url', 'is_file_url', 'unpack_http_url']


def user_agent():
    """Return a string representing the user agent."""
    _implementation = platform.python_implementation()

    if _implementation == 'CPython':
        _implementation_version = platform.python_version()
    elif _implementation == 'PyPy':
        _implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                                sys.pypy_version_info.minor,
                                                sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            _implementation_version = ''.join([
                _implementation_version,
                sys.pypy_version_info.releaselevel,
            ])
    elif _implementation == 'Jython':
        _implementation_version = platform.python_version()  # Complete Guess
    elif _implementation == 'IronPython':
        _implementation_version = platform.python_version()  # Complete Guess
    else:
        _implementation_version = 'Unknown'

    try:
        p_system = platform.system()
        p_release = platform.release()
    except IOError:
        p_system = 'Unknown'
        p_release = 'Unknown'

    return " ".join(['pip/%s' % pip.__version__,
                     '%s/%s' % (_implementation, _implementation_version),
                     '%s/%s' % (p_system, p_release)])


class MultiDomainBasicAuth(AuthBase):

    def __init__(self, prompting=True):
        self.prompting = prompting
        self.passwords = {}

    def __call__(self, req):
        parsed = urlparse.urlparse(req.url)

        # Get the netloc without any embedded credentials
        netloc = parsed.netloc.split("@", 1)[-1]

        # Set the url of the request to the url without any credentials
        req.url = urlparse.urlunparse(parsed[:1] + (netloc,) + parsed[2:])

        # Use any stored credentials that we have for this netloc
        username, password = self.passwords.get(netloc, (None, None))

        # Extract credentials embedded in the url if we have none stored
        if username is None:
            username, password = self.parse_credentials(parsed.netloc)

        if username or password:
            # Store the username and password
            self.passwords[netloc] = (username, password)

            # Send the basic auth with this request
            req = HTTPBasicAuth(username or "", password or "")(req)

        # Attach a hook to handle 401 responses
        req.register_hook("response", self.handle_401)

        return req

    def handle_401(self, resp, **kwargs):
        # We only care about 401 responses, anything else we want to just
        #   pass through the actual response
        if resp.status_code != 401:
            return resp

        # We are not able to prompt the user so simple return the response
        if not self.prompting:
            return resp

        parsed = urlparse.urlparse(resp.url)

        # Prompt the user for a new username and password
        username = raw_input("User for %s: " % parsed.netloc)
        password = getpass.getpass("Password: ")

        # Store the new username and password to use for future requests
        if username or password:
            self.passwords[parsed.netloc] = (username, password)

        # Consume content and release the original connection to allow our new
        #   request to reuse the same one.
        resp.content
        resp.raw.release_conn()

        # Add our new username and password to the request
        req = HTTPBasicAuth(username or "", password or "")(resp.request)

        # Send our new request
        new_resp = resp.connection.send(req, **kwargs)
        new_resp.history.append(resp)

        return new_resp

    def parse_credentials(self, netloc):
        if "@" in netloc:
            userinfo = netloc.rsplit("@", 1)[0]
            if ":" in userinfo:
                return userinfo.split(":", 1)
            return userinfo, None
        return None, None


class LocalFSResponse(object):

    def __init__(self, fileobj):
        self.fileobj = fileobj

    def __getattr__(self, name):
        return getattr(self.fileobj, name)

    def read(self, amt=None, decode_content=None, cache_content=False):
        return self.fileobj.read(amt)

    # Insert Hacks to Make Cookie Jar work w/ Requests
    @property
    def _original_response(self):
        class FakeMessage(object):
            def getheaders(self, header):
                return []

            def get_all(self, header, default):
                return []

        class FakeResponse(object):
            @property
            def msg(self):
                return FakeMessage()

        return FakeResponse()


class LocalFSAdapter(BaseAdapter):

    def send(self, request, stream=None, timeout=None, verify=None, cert=None,
             proxies=None):
        parsed_url = urlparse.urlparse(request.url)

        # We only work for requests with a host of localhost
        if parsed_url.netloc.lower() != "localhost":
            raise InvalidURL("Invalid URL %r: Only localhost is allowed" %
                request.url)

        real_url = urlparse.urlunparse(parsed_url[:1] + ("",) + parsed_url[2:])
        pathname = url_to_path(real_url)

        resp = Response()
        resp.status_code = 200
        resp.url = real_url

        stats = os.stat(pathname)
        modified = email.utils.formatdate(stats.st_mtime, usegmt=True)
        resp.headers = CaseInsensitiveDict({
            "Content-Type": mimetypes.guess_type(pathname)[0] or "text/plain",
            "Content-Length": stats.st_size,
            "Last-Modified": modified,
        })

        resp.raw = LocalFSResponse(open(pathname, "rb"))
        resp.close = resp.raw.close

        return resp

    def close(self):
        pass


class PipSession(requests.Session):

    timeout = None

    def __init__(self, *args, **kwargs):
        super(PipSession, self).__init__(*args, **kwargs)

        # Attach our User Agent to the request
        self.headers["User-Agent"] = user_agent()

        # Attach our Authentication handler to the session
        self.auth = MultiDomainBasicAuth()

        # Enable file:// urls
        self.mount("file://", LocalFSAdapter())

    def request(self, method, url, *args, **kwargs):
        # Make file:// urls not fail due to lack of a hostname
        parsed = urlparse.urlparse(url)
        if parsed.scheme == "file":
            url = urlparse.urlunparse(parsed[:1] + ("localhost",) + parsed[2:])

        # Allow setting a default timeout on a session
        kwargs.setdefault("timeout", self.timeout)

        # Dispatch the actual request
        return super(PipSession, self).request(method, url, *args, **kwargs)


def get_file_content(url, comes_from=None, session=None):
    """Gets the content of a file; it may be a filename, file: URL, or
    http: URL.  Returns (location, content).  Content is unicode."""
    if session is None:
        session = PipSession()

    match = _scheme_re.search(url)
    if match:
        scheme = match.group(1).lower()
        if (scheme == 'file' and comes_from
            and comes_from.startswith('http')):
            raise InstallationError(
                'Requirements file %s references URL %s, which is local'
                % (comes_from, url))
        if scheme == 'file':
            path = url.split(':', 1)[1]
            path = path.replace('\\', '/')
            match = _url_slash_drive_re.match(path)
            if match:
                path = match.group(1) + ':' + path.split('|', 1)[1]
            path = urllib.unquote(path)
            if path.startswith('/'):
                path = '/' + path.lstrip('/')
            url = path
        else:
            ## FIXME: catch some errors
            resp = session.get(url)
            resp.raise_for_status()

            if six.PY3:
                return resp.url, resp.text
            else:
                return resp.url, resp.content
    try:
        f = open(url)
        content = f.read()
    except IOError:
        e = sys.exc_info()[1]
        raise InstallationError('Could not open requirements file: %s' % str(e))
    else:
        f.close()
    return url, content


_scheme_re = re.compile(r'^(http|https|file):', re.I)
_url_slash_drive_re = re.compile(r'/*([a-z])\|', re.I)


def is_url(name):
    """Returns true if the name looks like a URL"""
    if ':' not in name:
        return False
    scheme = name.split(':', 1)[0].lower()
    return scheme in ['http', 'https', 'file', 'ftp'] + vcs.all_schemes


def url_to_path(url):
    """
    Convert a file: URL to a path.
    """
    assert url.startswith('file:'), (
        "You can only turn file: urls into filenames (not %r)" % url)
    path = url[len('file:'):].lstrip('/')
    path = urllib.unquote(path)
    if _url_drive_re.match(path):
        path = path[0] + ':' + path[2:]
    else:
        path = '/' + path
    return path


_drive_re = re.compile('^([a-z]):', re.I)
_url_drive_re = re.compile('^([a-z])[:|]', re.I)


def path_to_url(path):
    """
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    """
    path = os.path.normpath(os.path.abspath(path))
    drive, path = os.path.splitdrive(path)
    filepath = path.split(os.path.sep)
    url = '/'.join([urllib.quote(part) for part in filepath])
    if not drive:
        url = url.lstrip('/')
    return 'file:///' + drive + url


def is_archive_file(name):
    """Return True if `name` is a considered as an archive file."""
    archives = ('.zip', '.tar.gz', '.tar.bz2', '.tgz', '.tar', '.pybundle',
               '.whl')
    ext = splitext(name)[1].lower()
    if ext in archives:
        return True
    return False


def unpack_vcs_link(link, location, only_download=False):
    vcs_backend = _get_used_vcs_backend(link)
    if only_download:
        vcs_backend.export(location)
    else:
        vcs_backend.unpack(location)


def _get_used_vcs_backend(link):
    for backend in vcs.backends:
        if link.scheme in backend.schemes:
            vcs_backend = backend(link.url)
            return vcs_backend


def is_vcs_url(link):
    return bool(_get_used_vcs_backend(link))


def is_file_url(link):
    return link.url.lower().startswith('file:')


def _check_hash(download_hash, link):
    if download_hash.digest_size != hashlib.new(link.hash_name).digest_size:
        logger.fatal("Hash digest size of the package %d (%s) doesn't match the expected hash name %s!"
                    % (download_hash.digest_size, link, link.hash_name))
        raise HashMismatch('Hash name mismatch for package %s' % link)
    if download_hash.hexdigest() != link.hash:
        logger.fatal("Hash of the package %s (%s) doesn't match the expected hash %s!"
                     % (link, download_hash.hexdigest(), link.hash))
        raise HashMismatch('Bad %s hash for package %s' % (link.hash_name, link))


def _get_hash_from_file(target_file, link):
    try:
        download_hash = hashlib.new(link.hash_name)
    except (ValueError, TypeError):
        logger.warn("Unsupported hash name %s for package %s" % (link.hash_name, link))
        return None

    fp = open(target_file, 'rb')
    while True:
        chunk = fp.read(4096)
        if not chunk:
            break
        download_hash.update(chunk)
    fp.close()
    return download_hash


def _download_url(resp, link, temp_location):
    fp = open(temp_location, 'wb')
    download_hash = None
    if link.hash and link.hash_name:
        try:
            download_hash = hashlib.new(link.hash_name)
        except ValueError:
            logger.warn("Unsupported hash name %s for package %s" % (link.hash_name, link))
    try:
        total_length = int(resp.headers['content-length'])
    except (ValueError, KeyError, TypeError):
        total_length = 0
    downloaded = 0
    show_progress = total_length > 40 * 1000 or not total_length
    show_url = link.show_url
    try:
        if show_progress:
            ## FIXME: the URL can get really long in this message:
            if total_length:
                logger.start_progress('Downloading %s (%s): ' % (show_url, format_size(total_length)))
            else:
                logger.start_progress('Downloading %s (unknown size): ' % show_url)
        else:
            logger.notify('Downloading %s' % show_url)
        logger.info('Downloading from URL %s' % link)

        def resp_read(chunk_size):
            try:
                # Special case for urllib3.
                try:
                    for chunk in resp.raw.stream(
                            chunk_size, decode_content=False):
                        yield chunk
                except IncompleteRead as e:
                    raise ChunkedEncodingError(e)
            except AttributeError:
                # Standard file-like object.
                while True:
                    chunk = resp.raw.read(chunk_size)
                    if not chunk:
                        break
                    yield chunk

        for chunk in resp_read(4096):
            downloaded += len(chunk)
            if show_progress:
                if not total_length:
                    logger.show_progress('%s' % format_size(downloaded))
                else:
                    logger.show_progress('%3i%%  %s' % (100 * downloaded / total_length, format_size(downloaded)))
            if download_hash is not None:
                download_hash.update(chunk)
            fp.write(chunk)
        fp.close()
    finally:
        if show_progress:
            logger.end_progress('%s downloaded' % format_size(downloaded))
    return download_hash


def _copy_file(filename, location, content_type, link):
    copy = True
    download_location = os.path.join(location, link.filename)
    if os.path.exists(download_location):
        response = ask_path_exists(
            'The file %s exists. (i)gnore, (w)ipe, (b)ackup ' %
            display_path(download_location), ('i', 'w', 'b'))
        if response == 'i':
            copy = False
        elif response == 'w':
            logger.warn('Deleting %s' % display_path(download_location))
            os.remove(download_location)
        elif response == 'b':
            dest_file = backup_dir(download_location)
            logger.warn('Backing up %s to %s'
                        % (display_path(download_location), display_path(dest_file)))
            shutil.move(download_location, dest_file)
    if copy:
        shutil.copy(filename, download_location)
        logger.notify('Saved %s' % display_path(download_location))


def unpack_http_url(link, location, download_cache, download_dir=None,
                    session=None):
    if session is None:
        session = PipSession()

    temp_dir = tempfile.mkdtemp('-unpack', 'pip-')
    temp_location = None
    target_url = link.url.split('#', 1)[0]
    already_cached = False
    cache_file = None
    cache_content_type_file = None
    download_hash = None

    # If a download cache is specified, is the file cached there?
    if download_cache:
        cache_file = os.path.join(download_cache,
                                   urllib.quote(target_url, ''))
        cache_content_type_file = cache_file + '.content-type'
        already_cached = (
            os.path.exists(cache_file) and
            os.path.exists(cache_content_type_file)
            )
        if not os.path.isdir(download_cache):
            create_download_cache_folder(download_cache)

    # If a download dir is specified, is the file already downloaded there?
    already_downloaded = None
    if download_dir:
        already_downloaded = os.path.join(download_dir, link.filename)
        if not os.path.exists(already_downloaded):
            already_downloaded = None

    # If already downloaded, does it's hash match?
    if already_downloaded:
        temp_location = already_downloaded
        content_type = mimetypes.guess_type(already_downloaded)[0]
        logger.notify('File was already downloaded %s' % already_downloaded)
        if link.hash:
            download_hash = _get_hash_from_file(temp_location, link)
            try:
                _check_hash(download_hash, link)
            except HashMismatch:
                logger.warn(
                    'Previously-downloaded file %s has bad hash, '
                    're-downloading.' % temp_location
                    )
                temp_location = None
                os.unlink(already_downloaded)
                already_downloaded = None

    # If not a valid download, let's confirm the cached file is valid
    if already_cached and not temp_location:
        with open(cache_content_type_file) as fp:
            content_type = fp.read().strip()
        temp_location = cache_file
        logger.notify('Using download cache from %s' % cache_file)
        if link.hash and link.hash_name:
            download_hash = _get_hash_from_file(cache_file, link)
            try:
                _check_hash(download_hash, link)
            except HashMismatch:
                logger.warn(
                    'Cached file %s has bad hash, '
                    're-downloading.' % temp_location
                    )
                temp_location = None
                os.unlink(cache_file)
                os.unlink(cache_content_type_file)
                already_cached = False

    # We don't have either a cached or a downloaded copy
    # let's download to a tmp dir
    if not temp_location:
        try:
            resp = session.get(target_url, stream=True)
            resp.raise_for_status()
        except requests.HTTPError as exc:
            logger.fatal("HTTP error %s while getting %s" %
                         (exc.response.status_code, link))
            raise

        content_type = resp.headers.get('content-type', '')
        filename = link.filename  # fallback
        # Have a look at the Content-Disposition header for a better guess
        content_disposition = resp.headers.get('content-disposition')
        if content_disposition:
            type, params = cgi.parse_header(content_disposition)
            # We use ``or`` here because we don't want to use an "empty" value
            # from the filename param.
            filename = params.get('filename') or filename
        ext = splitext(filename)[1]
        if not ext:
            ext = mimetypes.guess_extension(content_type)
            if ext:
                filename += ext
        if not ext and link.url != resp.url:
            ext = os.path.splitext(resp.url)[1]
            if ext:
                filename += ext
        temp_location = os.path.join(temp_dir, filename)
        download_hash = _download_url(resp, link, temp_location)
        if link.hash and link.hash_name:
            _check_hash(download_hash, link)

    # a download dir is specified; let's copy the archive there
    if download_dir and not already_downloaded:
        _copy_file(temp_location, download_dir, content_type, link)

    # unpack the archive to the build dir location. even when only downloading
    # archives, they have to be unpacked to parse dependencies
    unpack_file(temp_location, location, content_type, link)

    # if using a download cache, cache it, if needed
    if cache_file and not already_cached:
        cache_download(cache_file, temp_location, content_type)

    if not (already_cached or already_downloaded):
        os.unlink(temp_location)

    os.rmdir(temp_dir)


def unpack_file_url(link, location, download_dir=None):

    link_path = url_to_path(link.url_without_fragment)
    already_downloaded = False

    # If it's a url to a local directory
    if os.path.isdir(link_path):
        if os.path.isdir(location):
            rmtree(location)
        shutil.copytree(link_path, location, symlinks=True)
        return

    # if link has a hash, let's confirm it matches
    if link.hash:
        link_path_hash = _get_hash_from_file(link_path, link)
        _check_hash(link_path_hash, link)

    # If a download dir is specified, is the file already there and valid?
    if download_dir:
        download_path = os.path.join(download_dir, link.filename)
        if os.path.exists(download_path):
            content_type = mimetypes.guess_type(download_path)[0]
            logger.notify('File was already downloaded %s' % download_path)
            if link.hash:
                download_hash = _get_hash_from_file(download_path, link)
                try:
                    _check_hash(download_hash, link)
                    already_downloaded = True
                except HashMismatch:
                    logger.warn(
                        'Previously-downloaded file %s has bad hash, '
                        're-downloading.' % link_path
                        )
                    os.unlink(download_path)
            else:
                already_downloaded = True

    if already_downloaded:
        from_path = download_path
    else:
        from_path = link_path

    content_type = mimetypes.guess_type(from_path)[0]

    # unpack the archive to the build dir location. even when only downloading
    # archives, they have to be unpacked to parse dependencies
    unpack_file(from_path, location, content_type, link)

    # a download dir is specified and not already downloaded
    if download_dir and not already_downloaded:
        _copy_file(from_path, download_dir, content_type, link)
python3.4/site-packages/pip/index.py000064400000116723151735047210013322 0ustar00"""Routines related to PyPI, indexes"""

import sys
import os
import re
import mimetypes
import posixpath

from pip.log import logger
from pip.util import Inf, normalize_name, splitext, is_prerelease
from pip.exceptions import (DistributionNotFound, BestVersionAlreadyInstalled,
                            InstallationError, InvalidWheelFilename, UnsupportedWheel)
from pip.backwardcompat import urlparse, url2pathname
from pip.download import PipSession, url_to_path, path_to_url
from pip.wheel import Wheel, wheel_ext
from pip.pep425tags import supported_tags, supported_tags_noarch, get_platform
from pip._vendor import html5lib, requests, pkg_resources
from pip._vendor.requests.exceptions import SSLError


__all__ = ['PackageFinder']


DEFAULT_MIRROR_HOSTNAME = "last.pypi.python.org"

INSECURE_SCHEMES = {
    "http": ["https"],
}


class PackageFinder(object):
    """This finds packages.

    This is meant to match easy_install's technique for looking for
    packages, by reading pages and looking for appropriate links
    """

    def __init__(self, find_links, index_urls,
            use_wheel=True, allow_external=[], allow_unverified=[],
            allow_all_external=False, allow_all_prereleases=False,
            process_dependency_links=False, session=None):
        self.find_links = find_links
        self.index_urls = index_urls
        self.dependency_links = []
        self.cache = PageCache()
        # These are boring links that have already been logged somehow:
        self.logged_links = set()

        self.use_wheel = use_wheel

        # Do we allow (safe and verifiable) externally hosted files?
        self.allow_external = set(normalize_name(n) for n in allow_external)

        # Which names are allowed to install insecure and unverifiable files?
        self.allow_unverified = set(
            normalize_name(n) for n in allow_unverified
        )

        # Anything that is allowed unverified is also allowed external
        self.allow_external |= self.allow_unverified

        # Do we allow all (safe and verifiable) externally hosted files?
        self.allow_all_external = allow_all_external

        # Stores if we ignored any external links so that we can instruct
        #   end users how to install them if no distributions are available
        self.need_warn_external = False

        # Stores if we ignored any unsafe links so that we can instruct
        #   end users how to install them if no distributions are available
        self.need_warn_unverified = False

        # Do we want to allow _all_ pre-releases?
        self.allow_all_prereleases = allow_all_prereleases

        # Do we process dependency links?
        self.process_dependency_links = process_dependency_links
        self._have_warned_dependency_links = False

        # The Session we'll use to make requests
        self.session = session or PipSession()

    def add_dependency_links(self, links):
        ## FIXME: this shouldn't be global list this, it should only
        ## apply to requirements of the package that specifies the
        ## dependency_links value
        ## FIXME: also, we should track comes_from (i.e., use Link)
        if self.process_dependency_links:
            if not self._have_warned_dependency_links:
                logger.deprecated(
                    "1.6",
                    "Dependency Links processing has been deprecated with an "
                    "accelerated time schedule and will be removed in pip 1.6",
                )
                self._have_warned_dependency_links = True
            self.dependency_links.extend(links)

    def _sort_locations(self, locations):
        """
        Sort locations into "files" (archives) and "urls", and return
        a pair of lists (files,urls)
        """
        files = []
        urls = []

        # puts the url for the given file path into the appropriate list
        def sort_path(path):
            url = path_to_url(path)
            if mimetypes.guess_type(url, strict=False)[0] == 'text/html':
                urls.append(url)
            else:
                files.append(url)

        for url in locations:

            is_local_path = os.path.exists(url)
            is_file_url = url.startswith('file:')
            is_find_link = url in self.find_links

            if is_local_path or is_file_url:
                if is_local_path:
                    path = url
                else:
                    path = url_to_path(url)
                if is_find_link and os.path.isdir(path):
                    path = os.path.realpath(path)
                    for item in os.listdir(path):
                        sort_path(os.path.join(path, item))
                elif is_file_url and os.path.isdir(path):
                    urls.append(url)
                elif os.path.isfile(path):
                    sort_path(path)
            else:
                urls.append(url)

        return files, urls

    def _link_sort_key(self, link_tuple):
        """
        Function used to generate link sort key for link tuples.
        The greater the return value, the more preferred it is.
        If not finding wheels, then sorted by version only.
        If finding wheels, then the sort order is by version, then:
          1. existing installs
          2. wheels ordered via Wheel.support_index_min()
          3. source archives
        Note: it was considered to embed this logic into the Link
              comparison operators, but then different sdist links
              with the same version, would have to be considered equal
        """
        parsed_version, link, _ = link_tuple
        if self.use_wheel:
            support_num = len(supported_tags)
            if link == INSTALLED_VERSION:
                pri = 1
            elif link.ext == wheel_ext:
                wheel = Wheel(link.filename) # can raise InvalidWheelFilename
                if not wheel.supported():
                    raise UnsupportedWheel("%s is not a supported wheel for this platform. It can't be sorted." % wheel.filename)
                pri = -(wheel.support_index_min())
            else: # sdist
                pri = -(support_num)
            return (parsed_version, pri)
        else:
            return parsed_version

    def _sort_versions(self, applicable_versions):
        """
        Bring the latest version (and wheels) to the front, but maintain the existing ordering as secondary.
        See the docstring for `_link_sort_key` for details.
        This function is isolated for easier unit testing.
        """
        return sorted(applicable_versions, key=self._link_sort_key, reverse=True)

    def find_requirement(self, req, upgrade):

        def mkurl_pypi_url(url):
            loc = posixpath.join(url, url_name)
            # For maximum compatibility with easy_install, ensure the path
            # ends in a trailing slash.  Although this isn't in the spec
            # (and PyPI can handle it without the slash) some other index
            # implementations might break if they relied on easy_install's behavior.
            if not loc.endswith('/'):
                loc = loc + '/'
            return loc

        url_name = req.url_name
        # Only check main index if index URL is given:
        main_index_url = None
        if self.index_urls:
            # Check that we have the url_name correctly spelled:
            main_index_url = Link(mkurl_pypi_url(self.index_urls[0]), trusted=True)
            # This will also cache the page, so it's okay that we get it again later:
            page = self._get_page(main_index_url, req)
            if page is None:
                url_name = self._find_url_name(Link(self.index_urls[0], trusted=True), url_name, req) or req.url_name

        if url_name is not None:
            locations = [
                mkurl_pypi_url(url)
                for url in self.index_urls] + self.find_links
        else:
            locations = list(self.find_links)
        for version in req.absolute_versions:
            if url_name is not None and main_index_url is not None:
                locations = [
                    posixpath.join(main_index_url.url, version)] + locations

        file_locations, url_locations = self._sort_locations(locations)
        _flocations, _ulocations = self._sort_locations(self.dependency_links)
        file_locations.extend(_flocations)

        # We trust every url that the user has given us whether it was given
        #   via --index-url or --find-links
        locations = [Link(url, trusted=True) for url in url_locations]

        # We explicitly do not trust links that came from dependency_links
        locations.extend([Link(url) for url in _ulocations])

        logger.debug('URLs to search for versions for %s:' % req)
        for location in locations:
            logger.debug('* %s' % location)

            # Determine if this url used a secure transport mechanism
            parsed = urlparse.urlparse(str(location))
            if parsed.scheme in INSECURE_SCHEMES:
                secure_schemes = INSECURE_SCHEMES[parsed.scheme]

                if len(secure_schemes) == 1:
                    ctx = (location, parsed.scheme, secure_schemes[0],
                           parsed.netloc)
                    logger.warn("%s uses an insecure transport scheme (%s). "
                                "Consider using %s if %s has it available" %
                                ctx)
                elif len(secure_schemes) > 1:
                    ctx = (location, parsed.scheme, ", ".join(secure_schemes),
                                                                parsed.netloc)
                    logger.warn("%s uses an insecure transport scheme (%s). "
                                "Consider using one of %s if %s has any of "
                                "them available" % ctx)
                else:
                    ctx = (location, parsed.scheme)
                    logger.warn("%s uses an insecure transport scheme (%s)." %
                                ctx)

        found_versions = []
        found_versions.extend(
            self._package_versions(
                # We trust every directly linked archive in find_links
                [Link(url, '-f', trusted=True) for url in self.find_links], req.name.lower()))
        page_versions = []
        for page in self._get_pages(locations, req):
            logger.debug('Analyzing links from page %s' % page.url)
            logger.indent += 2
            try:
                page_versions.extend(self._package_versions(page.links, req.name.lower()))
            finally:
                logger.indent -= 2
        dependency_versions = list(self._package_versions(
            [Link(url) for url in self.dependency_links], req.name.lower()))
        if dependency_versions:
            logger.info('dependency_links found: %s' % ', '.join([link.url for parsed, link, version in dependency_versions]))
        file_versions = list(self._package_versions(
                [Link(url) for url in file_locations], req.name.lower()))
        if not found_versions and not page_versions and not dependency_versions and not file_versions:
            logger.fatal('Could not find any downloads that satisfy the requirement %s' % req)

            if self.need_warn_external:
                logger.warn("Some externally hosted files were ignored (use "
                            "--allow-external %s to allow)." % req.name)

            if self.need_warn_unverified:
                logger.warn("Some insecure and unverifiable files were ignored"
                            " (use --allow-unverified %s to allow)." %
                            req.name)

            raise DistributionNotFound('No distributions at all found for %s' % req)
        installed_version = []
        if req.satisfied_by is not None:
            installed_version = [(req.satisfied_by.parsed_version, INSTALLED_VERSION, req.satisfied_by.version)]
        if file_versions:
            file_versions.sort(reverse=True)
            logger.info('Local files found: %s' % ', '.join([url_to_path(link.url) for parsed, link, version in file_versions]))
        #this is an intentional priority ordering
        all_versions = installed_version + file_versions + found_versions + page_versions + dependency_versions
        applicable_versions = []
        for (parsed_version, link, version) in all_versions:
            if version not in req.req:
                logger.info("Ignoring link %s, version %s doesn't match %s"
                            % (link, version, ','.join([''.join(s) for s in req.req.specs])))
                continue
            elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
                # If this version isn't the already installed one, then
                #   ignore it if it's a pre-release.
                if link is not INSTALLED_VERSION:
                    logger.info("Ignoring link %s, version %s is a pre-release (use --pre to allow)." % (link, version))
                    continue
            applicable_versions.append((parsed_version, link, version))
        applicable_versions = self._sort_versions(applicable_versions)
        existing_applicable = bool([link for parsed_version, link, version in applicable_versions if link is INSTALLED_VERSION])
        if not upgrade and existing_applicable:
            if applicable_versions[0][1] is INSTALLED_VERSION:
                logger.info('Existing installed version (%s) is most up-to-date and satisfies requirement'
                            % req.satisfied_by.version)
            else:
                logger.info('Existing installed version (%s) satisfies requirement (most up-to-date version is %s)'
                            % (req.satisfied_by.version, applicable_versions[0][2]))
            return None
        if not applicable_versions:
            logger.fatal('Could not find a version that satisfies the requirement %s (from versions: %s)'
                         % (req, ', '.join([version for parsed_version, link, version in all_versions])))

            if self.need_warn_external:
                logger.warn("Some externally hosted files were ignored (use "
                            "--allow-external to allow).")

            if self.need_warn_unverified:
                logger.warn("Some insecure and unverifiable files were ignored"
                            " (use --allow-unverified %s to allow)." %
                            req.name)

            raise DistributionNotFound('No distributions matching the version for %s' % req)
        if applicable_versions[0][1] is INSTALLED_VERSION:
            # We have an existing version, and its the best version
            logger.info('Installed version (%s) is most up-to-date (past versions: %s)'
                        % (req.satisfied_by.version, ', '.join([version for parsed_version, link, version in applicable_versions[1:]]) or 'none'))
            raise BestVersionAlreadyInstalled
        if len(applicable_versions) > 1:
            logger.info('Using version %s (newest of versions: %s)' %
                        (applicable_versions[0][2], ', '.join([version for parsed_version, link, version in applicable_versions])))

        selected_version = applicable_versions[0][1]

        if (selected_version.internal is not None
                and not selected_version.internal):
            logger.warn("%s an externally hosted file and may be "
                        "unreliable" % req.name)

        if (selected_version.verifiable is not None
                and not selected_version.verifiable):
            logger.warn("%s is potentially insecure and "
                        "unverifiable." % req.name)

        if selected_version._deprecated_regex:
            logger.deprecated(
                "1.7",
                "%s discovered using a deprecated method of parsing, "
                "in the future it will no longer be discovered" % req.name
            )

        return selected_version


    def _find_url_name(self, index_url, url_name, req):
        """Finds the true URL name of a package, when the given name isn't quite correct.
        This is usually used to implement case-insensitivity."""
        if not index_url.url.endswith('/'):
            # Vaguely part of the PyPI API... weird but true.
            ## FIXME: bad to modify this?
            index_url.url += '/'
        page = self._get_page(index_url, req)
        if page is None:
            logger.fatal('Cannot fetch index base URL %s' % index_url)
            return
        norm_name = normalize_name(req.url_name)
        for link in page.links:
            base = posixpath.basename(link.path.rstrip('/'))
            if norm_name == normalize_name(base):
                logger.notify('Real name of requirement %s is %s' % (url_name, base))
                return base
        return None

    def _get_pages(self, locations, req):
        """
        Yields (page, page_url) from the given locations, skipping
        locations that have errors, and adding download/homepage links
        """
        all_locations = list(locations)
        seen = set()

        while all_locations:
            location = all_locations.pop(0)
            if location in seen:
                continue
            seen.add(location)

            page = self._get_page(location, req)
            if page is None:
                continue

            yield page

            for link in page.rel_links():
                normalized = normalize_name(req.name).lower()

                if (not normalized in self.allow_external
                        and not self.allow_all_external):
                    self.need_warn_external = True
                    logger.debug("Not searching %s for files because external "
                                 "urls are disallowed." % link)
                    continue

                if (link.trusted is not None
                        and not link.trusted
                        and not normalized in self.allow_unverified):
                    logger.debug("Not searching %s for urls, it is an "
                                "untrusted link and cannot produce safe or "
                                "verifiable files." % link)
                    self.need_warn_unverified = True
                    continue

                all_locations.append(link)

    _egg_fragment_re = re.compile(r'#egg=([^&]*)')
    _egg_info_re = re.compile(r'([a-z0-9_.]+)-([a-z0-9_.-]+)', re.I)
    _py_version_re = re.compile(r'-py([123]\.?[0-9]?)$')

    def _sort_links(self, links):
        "Returns elements of links in order, non-egg links first, egg links second, while eliminating duplicates"
        eggs, no_eggs = [], []
        seen = set()
        for link in links:
            if link not in seen:
                seen.add(link)
                if link.egg_fragment:
                    eggs.append(link)
                else:
                    no_eggs.append(link)
        return no_eggs + eggs

    def _package_versions(self, links, search_name):
        for link in self._sort_links(links):
            for v in self._link_package_versions(link, search_name):
                yield v

    def _known_extensions(self):
        extensions = ('.tar.gz', '.tar.bz2', '.tar', '.tgz', '.zip')
        if self.use_wheel:
            return extensions + (wheel_ext,)
        return extensions

    def _link_package_versions(self, link, search_name):
        """
        Return an iterable of triples (pkg_resources_version_key,
        link, python_version) that can be extracted from the given
        link.

        Meant to be overridden by subclasses, not called by clients.
        """
        platform = get_platform()

        version = None
        if link.egg_fragment:
            egg_info = link.egg_fragment
        else:
            egg_info, ext = link.splitext()
            if not ext:
                if link not in self.logged_links:
                    logger.debug('Skipping link %s; not a file' % link)
                    self.logged_links.add(link)
                return []
            if egg_info.endswith('.tar'):
                # Special double-extension case:
                egg_info = egg_info[:-4]
                ext = '.tar' + ext
            if ext not in self._known_extensions():
                if link not in self.logged_links:
                    logger.debug('Skipping link %s; unknown archive format: %s' % (link, ext))
                    self.logged_links.add(link)
                return []
            if "macosx10" in link.path and ext == '.zip':
                if link not in self.logged_links:
                    logger.debug('Skipping link %s; macosx10 one' % (link))
                    self.logged_links.add(link)
                return []
            if ext == wheel_ext:
                try:
                    wheel = Wheel(link.filename)
                except InvalidWheelFilename:
                    logger.debug('Skipping %s because the wheel filename is invalid' % link)
                    return []
                if wheel.name.lower() != search_name.lower():
                    logger.debug('Skipping link %s; wrong project name (not %s)' % (link, search_name))
                    return []
                if not wheel.supported():
                    logger.debug('Skipping %s because it is not compatible with this Python' % link)
                    return []
                # This is a dirty hack to prevent installing Binary Wheels from
                # PyPI unless it is a Windows or Mac Binary Wheel. This is
                # paired with a change to PyPI disabling uploads for the
                # same. Once we have a mechanism for enabling support for binary
                # wheels on linux that deals with the inherent problems of
                # binary distribution this can be removed.
                comes_from = getattr(link, "comes_from", None)
                if ((
                        not platform.startswith('win')
                        and not platform.startswith('macosx')
                        )
                    and comes_from is not None
                    and urlparse.urlparse(comes_from.url).netloc.endswith(
                                                        "pypi.python.org")):
                    if not wheel.supported(tags=supported_tags_noarch):
                        logger.debug(
                            "Skipping %s because it is a pypi-hosted binary "
                            "Wheel on an unsupported platform" % link
                        )
                        return []
                version = wheel.version

        if not version:
            version = self._egg_info_matches(egg_info, search_name, link)
        if version is None:
            logger.debug('Skipping link %s; wrong project name (not %s)' % (link, search_name))
            return []

        if (link.internal is not None
                and not link.internal
                and not normalize_name(search_name).lower() in self.allow_external
                and not self.allow_all_external):
            # We have a link that we are sure is external, so we should skip
            #   it unless we are allowing externals
            logger.debug("Skipping %s because it is externally hosted." % link)
            self.need_warn_external = True
            return []

        if (link.verifiable is not None
                and not link.verifiable
                and not (normalize_name(search_name).lower()
                    in self.allow_unverified)):
            # We have a link that we are sure we cannot verify it's integrity,
            #   so we should skip it unless we are allowing unsafe installs
            #   for this requirement.
            logger.debug("Skipping %s because it is an insecure and "
                         "unverifiable file." % link)
            self.need_warn_unverified = True
            return []

        match = self._py_version_re.search(version)
        if match:
            version = version[:match.start()]
            py_version = match.group(1)
            if py_version != sys.version[:3]:
                logger.debug('Skipping %s because Python version is incorrect' % link)
                return []
        logger.debug('Found link %s, version: %s' % (link, version))
        return [(pkg_resources.parse_version(version),
               link,
               version)]

    def _egg_info_matches(self, egg_info, search_name, link):
        match = self._egg_info_re.search(egg_info)
        if not match:
            logger.debug('Could not parse version from link: %s' % link)
            return None
        name = match.group(0).lower()
        # To match the "safe" name that pkg_resources creates:
        name = name.replace('_', '-')
        # project name and version must be separated by a dash
        look_for = search_name.lower() + "-"
        if name.startswith(look_for):
            return match.group(0)[len(look_for):]
        else:
            return None

    def _get_page(self, link, req):
        return HTMLPage.get_page(link, req,
            cache=self.cache,
            session=self.session,
        )


class PageCache(object):
    """Cache of HTML pages"""

    failure_limit = 3

    def __init__(self):
        self._failures = {}
        self._pages = {}
        self._archives = {}

    def too_many_failures(self, url):
        return self._failures.get(url, 0) >= self.failure_limit

    def get_page(self, url):
        return self._pages.get(url)

    def is_archive(self, url):
        return self._archives.get(url, False)

    def set_is_archive(self, url, value=True):
        self._archives[url] = value

    def add_page_failure(self, url, level):
        self._failures[url] = self._failures.get(url, 0)+level

    def add_page(self, urls, page):
        for url in urls:
            self._pages[url] = page


class HTMLPage(object):
    """Represents one page, along with its URL"""

    ## FIXME: these regexes are horrible hacks:
    _homepage_re = re.compile(r'<th>\s*home\s*page', re.I)
    _download_re = re.compile(r'<th>\s*download\s+url', re.I)
    _href_re = re.compile('href=(?:"([^"]*)"|\'([^\']*)\'|([^>\\s\\n]*))', re.I|re.S)

    def __init__(self, content, url, headers=None, trusted=None):
        self.content = content
        self.parsed = html5lib.parse(self.content, namespaceHTMLElements=False)
        self.url = url
        self.headers = headers
        self.trusted = trusted

    def __str__(self):
        return self.url

    @classmethod
    def get_page(cls, link, req, cache=None, skip_archives=True, session=None):
        if session is None:
            session = PipSession()

        url = link.url
        url = url.split('#', 1)[0]
        if cache.too_many_failures(url):
            return None

        # Check for VCS schemes that do not support lookup as web pages.
        from pip.vcs import VcsSupport
        for scheme in VcsSupport.schemes:
            if url.lower().startswith(scheme) and url[len(scheme)] in '+:':
                logger.debug('Cannot look at %(scheme)s URL %(link)s' % locals())
                return None

        if cache is not None:
            inst = cache.get_page(url)
            if inst is not None:
                return inst
        try:
            if skip_archives:
                if cache is not None:
                    if cache.is_archive(url):
                        return None
                filename = link.filename
                for bad_ext in ['.tar', '.tar.gz', '.tar.bz2', '.tgz', '.zip']:
                    if filename.endswith(bad_ext):
                        content_type = cls._get_content_type(url,
                            session=session,
                        )
                        if content_type.lower().startswith('text/html'):
                            break
                        else:
                            logger.debug('Skipping page %s because of Content-Type: %s' % (link, content_type))
                            if cache is not None:
                                cache.set_is_archive(url)
                            return None
            logger.debug('Getting page %s' % url)

            # Tack index.html onto file:// URLs that point to directories
            (scheme, netloc, path, params, query, fragment) = urlparse.urlparse(url)
            if scheme == 'file' and os.path.isdir(url2pathname(path)):
                # add trailing slash if not present so urljoin doesn't trim final segment
                if not url.endswith('/'):
                    url += '/'
                url = urlparse.urljoin(url, 'index.html')
                logger.debug(' file: URL is directory, getting %s' % url)

            resp = session.get(url, headers={"Accept": "text/html"})
            resp.raise_for_status()

            # The check for archives above only works if the url ends with
            #   something that looks like an archive. However that is not a
            #   requirement. For instance http://sourceforge.net/projects/docutils/files/docutils/0.8.1/docutils-0.8.1.tar.gz/download
            #   redirects to http://superb-dca3.dl.sourceforge.net/project/docutils/docutils/0.8.1/docutils-0.8.1.tar.gz
            #   Unless we issue a HEAD request on every url we cannot know
            #   ahead of time for sure if something is HTML or not. However we
            #   can check after we've downloaded it.
            content_type = resp.headers.get('Content-Type', 'unknown')
            if not content_type.lower().startswith("text/html"):
                logger.debug('Skipping page %s because of Content-Type: %s' %
                                            (link, content_type))
                if cache is not None:
                    cache.set_is_archive(url)
                return None

            inst = cls(resp.text, resp.url, resp.headers, trusted=link.trusted)
        except requests.HTTPError as exc:
            level = 2 if exc.response.status_code == 404 else 1
            cls._handle_fail(req, link, exc, url, cache=cache, level=level)
        except requests.ConnectionError as exc:
            cls._handle_fail(
                req, link, "connection error: %s" % exc, url,
                cache=cache,
            )
        except requests.Timeout:
            cls._handle_fail(req, link, "timed out", url, cache=cache)
        except SSLError as exc:
            reason = ("There was a problem confirming the ssl certificate: "
                      "%s" % exc)
            cls._handle_fail(req, link, reason, url,
                cache=cache,
                level=2,
                meth=logger.notify,
            )
        else:
            if cache is not None:
                cache.add_page([url, resp.url], inst)
            return inst

    @staticmethod
    def _handle_fail(req, link, reason, url, cache=None, level=1, meth=None):
        if meth is None:
            meth = logger.info

        meth("Could not fetch URL %s: %s", link, reason)
        meth("Will skip URL %s when looking for download links for %s" %
             (link.url, req))

        if cache is not None:
            cache.add_page_failure(url, level)

    @staticmethod
    def _get_content_type(url, session=None):
        """Get the Content-Type of the given url, using a HEAD request"""
        if session is None:
            session = PipSession()

        scheme, netloc, path, query, fragment = urlparse.urlsplit(url)
        if not scheme in ('http', 'https', 'ftp', 'ftps'):
            ## FIXME: some warning or something?
            ## assertion error?
            return ''

        resp = session.head(url, allow_redirects=True)
        resp.raise_for_status()

        return resp.headers.get("Content-Type", "")

    @property
    def api_version(self):
        if not hasattr(self, "_api_version"):
            _api_version = None

            metas = [x for x in self.parsed.findall(".//meta")
                        if x.get("name", "").lower() == "api-version"]
            if metas:
                try:
                    _api_version = int(metas[0].get("value", None))
                except (TypeError, ValueError):
                    _api_version = None
            self._api_version = _api_version
        return self._api_version

    @property
    def base_url(self):
        if not hasattr(self, "_base_url"):
            base = self.parsed.find(".//base")
            if base is not None and base.get("href"):
                self._base_url = base.get("href")
            else:
                self._base_url = self.url
        return self._base_url

    @property
    def links(self):
        """Yields all links in the page"""
        for anchor in self.parsed.findall(".//a"):
            if anchor.get("href"):
                href = anchor.get("href")
                url = self.clean_link(urlparse.urljoin(self.base_url, href))

                # Determine if this link is internal. If that distinction
                #   doesn't make sense in this context, then we don't make
                #   any distinction.
                internal = None
                if self.api_version and self.api_version >= 2:
                    # Only api_versions >= 2 have a distinction between
                    #   external and internal links
                    internal = bool(anchor.get("rel")
                                and "internal" in anchor.get("rel").split())

                yield Link(url, self, internal=internal)

    def rel_links(self):
        for url in self.explicit_rel_links():
            yield url
        for url in self.scraped_rel_links():
            yield url

    def explicit_rel_links(self, rels=('homepage', 'download')):
        """Yields all links with the given relations"""
        rels = set(rels)

        for anchor in self.parsed.findall(".//a"):
            if anchor.get("rel") and anchor.get("href"):
                found_rels = set(anchor.get("rel").split())
                # Determine the intersection between what rels were found and
                #   what rels were being looked for
                if found_rels & rels:
                    href = anchor.get("href")
                    url = self.clean_link(urlparse.urljoin(self.base_url, href))
                    yield Link(url, self, trusted=False)

    def scraped_rel_links(self):
        # Can we get rid of this horrible horrible method?
        for regex in (self._homepage_re, self._download_re):
            match = regex.search(self.content)
            if not match:
                continue
            href_match = self._href_re.search(self.content, pos=match.end())
            if not href_match:
                continue
            url = href_match.group(1) or href_match.group(2) or href_match.group(3)
            if not url:
                continue
            url = self.clean_link(urlparse.urljoin(self.base_url, url))
            yield Link(url, self, trusted=False, _deprecated_regex=True)

    _clean_re = re.compile(r'[^a-z0-9$&+,/:;=?@.#%_\\|-]', re.I)

    def clean_link(self, url):
        """Makes sure a link is fully encoded.  That is, if a ' ' shows up in
        the link, it will be rewritten to %20 (while not over-quoting
        % or other characters)."""
        return self._clean_re.sub(
            lambda match: '%%%2x' % ord(match.group(0)), url)


class Link(object):

    def __init__(self, url, comes_from=None, internal=None, trusted=None,
            _deprecated_regex=False):
        self.url = url
        self.comes_from = comes_from
        self.internal = internal
        self.trusted = trusted
        self._deprecated_regex = _deprecated_regex

    def __str__(self):
        if self.comes_from:
            return '%s (from %s)' % (self.url, self.comes_from)
        else:
            return str(self.url)

    def __repr__(self):
        return '<Link %s>' % self

    def __eq__(self, other):
        return self.url == other.url

    def __ne__(self, other):
        return self.url != other.url

    def __lt__(self, other):
        return self.url < other.url

    def __le__(self, other):
        return self.url <= other.url

    def __gt__(self, other):
        return self.url > other.url

    def __ge__(self, other):
        return self.url >= other.url

    def __hash__(self):
        return hash(self.url)

    @property
    def filename(self):
        _, netloc, path, _, _ = urlparse.urlsplit(self.url)
        name = posixpath.basename(path.rstrip('/')) or netloc
        assert name, ('URL %r produced no filename' % self.url)
        return name

    @property
    def scheme(self):
        return urlparse.urlsplit(self.url)[0]

    @property
    def path(self):
        return urlparse.urlsplit(self.url)[2]

    def splitext(self):
        return splitext(posixpath.basename(self.path.rstrip('/')))

    @property
    def ext(self):
        return self.splitext()[1]

    @property
    def url_without_fragment(self):
        scheme, netloc, path, query, fragment = urlparse.urlsplit(self.url)
        return urlparse.urlunsplit((scheme, netloc, path, query, None))

    _egg_fragment_re = re.compile(r'#egg=([^&]*)')

    @property
    def egg_fragment(self):
        match = self._egg_fragment_re.search(self.url)
        if not match:
            return None
        return match.group(1)

    _hash_re = re.compile(r'(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)')

    @property
    def hash(self):
        match = self._hash_re.search(self.url)
        if match:
            return match.group(2)
        return None

    @property
    def hash_name(self):
        match = self._hash_re.search(self.url)
        if match:
            return match.group(1)
        return None

    @property
    def show_url(self):
        return posixpath.basename(self.url.split('#', 1)[0].split('?', 1)[0])

    @property
    def verifiable(self):
        """
        Returns True if this link can be verified after download, False if it
        cannot, and None if we cannot determine.
        """
        trusted = self.trusted or getattr(self.comes_from, "trusted", None)
        if trusted is not None and trusted:
            # This link came from a trusted source. It *may* be verifiable but
            #   first we need to see if this page is operating under the new
            #   API version.
            try:
                api_version = getattr(self.comes_from, "api_version", None)
                api_version = int(api_version)
            except (ValueError, TypeError):
                api_version = None

            if api_version is None or api_version <= 1:
                # This link is either trusted, or it came from a trusted,
                #   however it is not operating under the API version 2 so
                #   we can't make any claims about if it's safe or not
                return

            if self.hash:
                # This link came from a trusted source and it has a hash, so we
                #   can consider it safe.
                return True
            else:
                # This link came from a trusted source, using the new API
                #   version, and it does not have a hash. It is NOT verifiable
                return False
        elif trusted is not None:
            # This link came from an untrusted source and we cannot trust it
            return False


# An object to represent the "link" for the installed version of a requirement.
# Using Inf as the url makes it sort higher.
INSTALLED_VERSION = Link(Inf)


def get_requirement_from_url(url):
    """Get a requirement from the URL, if possible.  This looks for #egg
    in the URL"""
    link = Link(url)
    egg_info = link.egg_fragment
    if not egg_info:
        egg_info = splitext(link.filename)[0]
    return package_to_requirement(egg_info)


def package_to_requirement(package_name):
    """Translate a name like Foo-1.2 to Foo==1.3"""
    match = re.search(r'^(.*?)-(dev|\d.*)', package_name)
    if match:
        name = match.group(1)
        version = match.group(2)
    else:
        name = package_name
        version = ''
    if version:
        return '%s==%s' % (name, version)
    else:
        return name
python3.4/site-packages/pip/__pycache__/__init__.cpython-34.pyc000064400000021117151735047220020225 0ustar00�
�Re�$�@shddlZddlZddlZddlZddlmZmZmZddlm	Z	ddl
mZmZddl
mZmZmZmZddlmZmZddlmZmZmZddlZejZdZd	d
�Zdd�Zd
d�Zddd�Z dd�Z!Gdd�de"�Z#e$dkrde �Z%e%rdej%e%�qdndS)�N)�InstallationError�CommandError�PipError)�logger)�get_installed_distributions�get_prog)�git�	mercurial�
subversion�bazaar)�ConfigOptionParser�UpdatingDefaultsHelpFormatter)�commands�
get_summaries�get_similar_commandsz1.5.6csdtjkrdStjdj�dd�}ttjd�}y||d�Wntk
rod�YnXdd�t�D��g}y!�fd	d�|D�d
}Wntk
r�d}YnXt�}|ri|dkr�tjd�n|dkr��j	d
�r�g}�j
�}xUtdd�D]D}|jj	|�r1|j|dd�kr1|j
|j�q1q1W|r�x|D]}t|�q�Wtjd�q�nt|�}|dd�|jjD�7}dd�|d|d�D���fdd�|D�}�fdd�|D�}x�|D]1}	|	d
}
|	drX|
d7}
nt|
�q1Wn��j	d
�s��j	d�r�dd�|jD�}|j
|j�dd�|D�}�dd�|D�7�ntdj�fdd��D���tjd�dS)z�Command and option completion for the main option parser (and options)
    and its subcommands (and options).

    Enable by sourcing one of the completion shell scripts (bash or zsh).
    �PIP_AUTO_COMPLETEN�
COMP_WORDS��
COMP_CWORD�cSsg|]\}}|�qS�r)�.0�cmd�summaryrr�'/tmp/pip-ztkk0jow-build/pip/__init__.py�
<listcomp>(s	z autocomplete.<locals>.<listcomp>cs"g|]}|�kr|�qSrr)r�w)�subcommandsrrr,s	r�help�	uninstall�-�
local_onlyTcSs7g|]-}|jtjkr|j�|jf�qSr)r�optparse�
SUPPRESS_HELP�get_opt_string�nargs)r�optrrrrDs	cSs#g|]}|jd�d�qS)�=r)�split)r�xrrrrIs	cs.g|]$\}}|�kr||f�qSrr)rr)�v)�	prev_optsrrrJs	cs1g|]'\}}|j��r||f�qSr)�
startswith)r�kr*)�currentrrrLs	r'z--cSsg|]}|j�qSr)�option_list)r�irrrrVs	css"|]}|D]}|Vq
qdS)Nr)r�it�orrr�	<genexpr>Xszautocomplete.<locals>.<genexpr>cSs.g|]$}|jtjkr|j��qSr)rr"r#r$)rr0rrrrZs	� cs%g|]}|j��r|�qSr)r,)rr))r.rrr]s	)�os�environr(�int�
IndexErrorr�create_main_parser�sys�exitr,�lowerr�key�append�printr�parser�option_list_all�
option_groupsr/�join)�cwords�cword�options�subcommand_namer@�	installed�lc�dist�
subcommand�option�	opt_label�optsr)r.r+rr�autocompletes\
!
	+

!



&rOcCs�idd6dd6t�d6dd6t�d6}t|�}|j�tjjtjjtjjt���}d	t	|t
jdd
�f|_tj
tj|�}|j|�d|_t�}dgd
d�|D�}dj|�|_|S)Nz
%prog <command> [options]�usageF�add_help_option�	formatter�global�name�progzpip %s from %s (python %s)�TrcSs&g|]\}}d||f�qS)z%-27s %sr)rr0�jrrrrys	z&create_main_parser.<locals>.<listcomp>�
)r
rr�disable_interspersed_argsr5�path�dirname�abspath�__file__�__version__r:�version�
cmdoptions�make_option_group�
general_group�add_option_group�mainrrC�description)�	parser_kwr@�pip_pkg_dir�gen_opts�command_summariesrerrrr9as$


* 
		r9cCs2t�}|j|�\}}|jrZtjj|j�tjjtj�tj�n|s�|ddkr�t	|�dkr�|j
�tj�n|dj�}|dd�}|j|dj��|t
kr(t|�}d|g}|r|jd|�ntdj|���n||fS)Nrrrzunknown command "%s"zmaybe you meant "%s"z - )r9�
parse_argsr_r:�stdout�writer5�linesepr;�len�
print_helpr<�removerrr>rrC)�argsr@�general_options�	args_else�cmd_name�cmd_args�guess�msgrrr�	parseoptss&			
)


rxcCs�|dkr"tjdd�}nt�yt|�\}}WnVtk
r�tj�d}tjjd|�tjjtj	�tj
d�YnXt|�}|j|�S)Nrz	ERROR: %s)
r:�argvrOrxr�exc_info�stderrrlr5rmr;rrd)�initial_argsrtru�e�commandrrrrd�s

rdc
Cs`dg}yddl}Wntk
r:|jd�YnXtddg|tjdd��S)zI
    Bootstrapping function to be called from install-pip.py script.
    �piprN�
setuptools�installz	--upgrader)r��ImportErrorr>rdr:ry)�pkgsr�rrr�	bootstrap�s	
r�c@speZdZfdd�Zejd�Zejd�Zeddd��Z	e
dd	��Zd
d�ZdS)
�FrozenRequirementcCs(||_||_||_||_dS)N)rT�req�editable�comments)�selfrTr�r�r�rrr�__init__�s			zFrozenRequirement.__init__z-r(\d+)$z-(20\d\d\d\d\d\d)$Fc
Cs6tjjtjj|j��}g}ddlm}m}|j|�r�d}y||||�}	Wn9t	k
r�t
j�d}
tj
d|
�d}	YnX|	dkr tj
d|�|jd�|j�}	d}q n:d}|j�}	|	j}t|�dkr'|ddd	ks-t�|dd}|jj|�}
|jj|�}|
sk|r |jd
�}|r�|�j||�}n|s�tj
d|	�|jd�q |jd
|	�|
r�|
jd�}nd|jd�}d}d|||j|�f}	n||j|	||�S)Nr)�vcs�get_src_requirementTrzYError when trying to get requirement for VCS system %s, falling back to uneditable formatz-Could not determine repository location of %sz-## !! Could not determine repository locationFz==�svnz(Warning: cannot find svn location for %szF## FIXME: could not find svn URL in dependency_links for this package:z3# Installing as editable to satisfy requirement %s:z{%s}z%s@%s#egg=%s)r5rZ�normcaser\�location�pip.vcsr�r��get_backend_namerr:rzr�warnr>�as_requirement�specsrn�AssertionError�_rev_re�search�_date_re�get_backend�get_location�group�egg_name�project_name)�clsrJ�dependency_links�	find_tagsr�r�r�r�r�r��exr�r_�	ver_match�
date_match�svn_backend�svn_location�revrrr�	from_dist�sN!

	,	zFrozenRequirement.from_distcCsA|j�}tjd|�}|r=|d|j��}n|S)Nz
-py\d\.\d$)r��rer��start)rJrT�matchrrrr�s
zFrozenRequirement.egg_namecCsF|j}|jrd|}ndjt|j�t|�g�dS)Nz-e %srX)r�r�rC�listr��str)r�r�rrr�__str__
s		
zFrozenRequirement.__str__N)
�__name__�
__module__�__qualname__r�r��compiler�r��classmethodr��staticmethodr�r�rrrrr��s,r��__main__)&r5r"r:r��pip.exceptionsrrr�pip.logr�pip.utilrrr�rr	r
r�pip.baseparserrr
�pip.commandsrrrZpip.cmdoptionsrr`r^rOr9rxrdr��objectr�r�r;rrrr�<module>s,"	I*G	python3.4/site-packages/pip/__pycache__/baseparser.cpython-34.pyc000064400000021667151735047220020627 0ustar00�
�Re��@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
mZddlmZGdd	�d	ej�ZGd
d�de�ZGdd
�d
ej�ZGdd�de�ZdS)zBase option parser setup�N)�	strtobool)�ConfigParser�string_types)�default_config_file)�get_terminal_size�get_prog)�
pkg_resourcesc@s|eZdZdZdd�Zdd�Zdddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)�PrettyHelpFormatterz4A prettier/less verbose help formatter for optparse.cOsCd|d<d|d<t�dd|d<tjj|||�dS)N��max_help_position��indent_incrementr��width)r�optparse�IndentedHelpFormatter�__init__)�self�args�kwargs�r�)/tmp/pip-ztkk0jow-build/pip/baseparser.pyrs

zPrettyHelpFormatter.__init__cCs|j|dd�S)Nz <%s>z, )�_format_option_strings)r�optionrrr�format_option_stringssz)PrettyHelpFormatter.format_option_stringsz <%s>z, cCs�g}|jr&|j|jd�n|jrF|j|jd�nt|�dkrk|jd|�n|j�r�|jp�|jj�}|j||j��ndj	|�S)a
        Return a comma-separated list of option strings and metavars.

        :param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
        :param mvarfmt: metavar format string - evaluated as mvarfmt % metavar
        :param optsep:  separator
        rr�)
�_short_opts�append�
_long_opts�len�insert�takes_value�metavar�dest�lower�join)rr�mvarfmt�optsep�optsr"rrrrs		z*PrettyHelpFormatter._format_option_stringscCs|dkrdS|dS)N�Optionsrz:
r)r�headingrrr�format_heading3sz"PrettyHelpFormatter.format_headingcCs#d|jtj|�d�}|S)zz
        Ensure there is only one newline between usage and the first heading
        if there is no description.
        z
Usage: %s
z  )�indent_lines�textwrap�dedent)r�usage�msgrrr�format_usage8sz PrettyHelpFormatter.format_usagecCsy|rqt|jd�r!d}nd}|jd�}|j�}|jtj|�d�}d||f}|SdSdS)N�main�Commands�Description�
z  z%s:
%s
r)�hasattr�parser�lstrip�rstripr,r-r.)r�description�labelrrr�format_description@s	z&PrettyHelpFormatter.format_descriptioncCs|r
|SdSdS)Nrr)r�epilogrrr�
format_epilogRsz!PrettyHelpFormatter.format_epilogcs/�fdd�|jd�D�}dj|�S)Ncsg|]}�|�qSrr)�.0�line)�indentrr�
<listcomp>Zs	z4PrettyHelpFormatter.indent_lines.<locals>.<listcomp>r5)�splitr%)r�textrA�	new_linesr)rArr,Ys"z PrettyHelpFormatter.indent_linesN)�__name__�
__module__�__qualname__�__doc__rrrr+r1r<r>r,rrrrr	sr	c@s"eZdZdZdd�ZdS)�UpdatingDefaultsHelpFormatterz�Custom help formatter for use in ConfigOptionParser that updates
    the defaults before expanding them, allowing them to show up correctly
    in the help listingcCs;|jdk	r(|jj|jj�ntjj||�S)N)r7�update_defaults�defaultsrr�expand_default)rrrrrrMcsz,UpdatingDefaultsHelpFormatter.expand_defaultN)rFrGrHrIrMrrrrrJ^srJc@s.eZdZdd�Zedd��ZdS)�CustomOptionParsercOs6|j||�}|jj�|jj||�|S)z*Insert an OptionGroup at a given position.)�add_option_group�
option_groups�popr )r�idxrr�grouprrr�insert_option_groupjs
z&CustomOptionParser.insert_option_groupcCs;|jdd�}x!|jD]}|j|j�qW|S)z<Get a list of all options, including those in option groups.N)�option_listrP�extend)r�res�irrr�option_list_allssz"CustomOptionParser.option_list_allN)rFrGrHrT�propertyrYrrrrrNis	rNc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	ddd�Z
dd�Zdd�ZdS)�ConfigOptionParserzsCustom option parser which updates its defaults by checking the
    configuration files and environmental variablescOsxtj�|_|jd�|_|j�|_|jrO|jj|j�n|js^t�t	j
j|||�dS)N�name)r�RawConfigParser�configrQr\�get_config_files�files�read�AssertionErrorr�OptionParserr)rrrrrrr�s	zConfigOptionParser.__init__cCsNtjjdd�}|tjkr(gS|rGtjj|�rG|gStgS)N�PIP_CONFIG_FILEF)�os�environ�get�devnull�path�existsr)r�config_filerrrr_�sz#ConfigOptionParser.get_config_filescCs[y|j||�SWn@tjk
rVtj�d}td|�tjd�YnXdS)Nrz*An error occurred during configuration: %s�)�check_valuer�OptionValueError�sys�exc_info�print�exit)rr�key�val�errr�
check_default�sz ConfigOptionParser.check_defaultcs#i}x6d�jfD]%}|j�j�j|���qW|j�j�j���x�|j�D]�\�}�j����dk	rh|s�qhn�jd	kr�t|�}n�jdkr�|j	�}���fdd�|D�}n�j
��|�}||�j<qhqhW|S)
z�Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists).�globalN�
store_true�store_false�countrcs%g|]}�j��|��qSr)rv)r?�v)rsrrrrrB�s	z6ConfigOptionParser.update_defaults.<locals>.<listcomp>)z
store_truezstore_falsezcount)r\�update�normalize_keys�get_config_section�get_environ_vars�items�
get_option�actionrrCrvr#)rrLr^�sectionrtr)rsrrrrK�s"#"z"ConfigOptionParser.update_defaultscCsYi}xL|D]D\}}|jdd�}|jd�sGd|}n|||<q
W|S)z�Return a config dictionary with normalized keys regardless of
        whether the keys were specified in environment variables or in config
        files�_�-z--z--%s)�replace�
startswith)rr��
normalizedrsrtrrrr}�s
z!ConfigOptionParser.normalize_keyscCs&|jj|�r"|jj|�SgS)z Get a section of a configuration)r^�has_sectionr�)rr\rrrr~�sz%ConfigOptionParser.get_config_section�PIP_ccsSxLtjj�D];\}}|j|�r|j|d�j�|fVqqWdS)z@Returns a generator with all environmental vars with prefix PIP_rN)rerfr�r�r�r$)r�prefixrsrtrrrr�sz#ConfigOptionParser.get_environ_varscCs�|jstj|j�S|j|jj��}x]|j�D]O}|j|j�}t	|t
�r>|j�}|j||�||j<q>q>Wtj|�S)z�Overridding to make updating the defaults after instantiation of
        the option parser possible, update_defaults() does the dirty work.)
�process_default_valuesr�ValuesrLrK�copy�_get_all_optionsrgr#�
isinstancer�get_opt_stringrm)rrLr�default�opt_strrrr�get_default_values�s	 z%ConfigOptionParser.get_default_valuescCs(|jtj�|jdd|�dS)Nrz%s
)�print_usagero�stderrrr)rr0rrr�error�szConfigOptionParser.errorN)
rFrGrHrIrr_rvrKr}r~rr�r�rrrrr[}s	r[)rIrorrer-�distutils.utilrZpip.backwardcompatrr�
pip.locationsr�pip.utilrr�pip._vendorrrr	rJrcrNr[rrrr�<module>sOpython3.4/site-packages/pip/__pycache__/locations.cpython-34.pyc000064400000011303151735047220020455 0ustar00�
�Re:�
@sRdZddlZddlZddlZddlZddlmZmZddlZddl	m
Z
mZmZddl
ZdZdZdd�Zd	d
�Zdd�Zd
d�Zdd�Ze�rejjejd�Zejjejd�ZnJe�Zyejjej�d�ZWnek
rMejd�YnXejjejje��Zejje�Ze
�Z ejj!d�Z"ej#dkrqejjejd�Z$er�ejjed�ndZ%ejj&e$�s/ejjejd�Z$er&ejjed�ndZ%nejje"d�Z'ejje'd�Z(ejje'd�Z)n�ejjejd�Z$er�ejjed�ndZ%ejje"d�Z'ejje'd�Z(ejje'd�Z)ej#dd�dkr9ejdd�d kr9d!Z$ejje"d"�Z)nd#ddd$d%�Z*dS)&z7Locations where we look for configs, install stuff, etc�N)�install�SCHEME_KEYS)�get_python_lib�get_path_uid�	user_sitez�This file is placed here by pip to indicate the source was put
here by pip.

Once this package is successfully installed this source code will be
deleted (unless you remove this file).
zpip-delete-this-directory.txtcCs?tjj|t�}t|d�}|jt�|j�dS)z?
    Write the pip delete marker file into this directory.
    �wN)�os�path�join�PIP_DELETE_MARKER_FILENAME�open�write�DELETE_MARKER_MESSAGE�close)�	directory�filepath�	marker_fp�r�(/tmp/pip-ztkk0jow-build/pip/locations.py�write_delete_marker_files
rcCs9ttd�rdStjttdtj�kr5dSdS)zM
    Return True if we're running inside a virtualenv, False otherwise.

    �real_prefixT�base_prefixF)�hasattr�sys�prefix�getattrrrrr�running_under_virtualenv s
rcCsYtjjtjjtj��}tjj|d�}t�rUtjj|�rUdSdS)z?
    Return True if in a venv and no system site packages.
    zno-global-site-packages.txtTN)	rr	�dirname�abspath�site�__file__r
r�isfile)�site_mod_dir�no_global_filerrr�virtualenv_no_global-s!r$cCs;tjdkrtj�Sddl}|jtj��jS)z8 Returns the effective username of the current process. �win32rN)	r�platform�getpass�getuser�pwd�getpwuidr�geteuid�pw_name)r)rrr�__get_username7s
r-cCs�tjjtj�dt��}tjdkr5|Sytj|�t	|�Wn�t
k
r�d}yt|�}Wnt
k
r�d}YnX|tj�kr�d|}t
|�t
dd�tjj|��nYnX|S)z Returns a safe build_prefix zpip_build_%sr%NzSThe temporary folder for building (%s) is either not owned by you, or is a symlink.z0pip will not work until the temporary folder is zAeither deleted or is a real directory owned by your user account.)rr	r
�tempfile�
gettempdirr-rr&�mkdirr�OSErrorrr+�print�pip�
exceptions�InstallationError)r	�file_uid�msgrrr�_get_build_prefix>s*




r8�build�srcz=The folder you are executing pip from can no longer be found.�~r%�Scripts�binr3zpip.inizpip.logz.pipzpip.conf��darwin�z/System/Library/z/usr/local/binzLibrary/Logs/pip.logFc	Cs8ddlm}i}|i|d6�}|j�|jddd�}|pT|j|_|pf|j|_|px|j|_|j�x%tD]}t	|d|�||<q�Wt
�r4tjj
tjdd	d
tjdd�|�|d
<|dk	r4tjj
|tjj|d
�dd��|d
<q4n|S)z+
    Return a distutils install scheme
    r)�Distribution�namer�createT�install_�includer�pythonN��headers�)�distutils.distrA�parse_config_files�get_command_obj�user�home�root�finalize_optionsrrrrr	r
rr�versionr)	�	dist_namerMrNrOrA�scheme�d�i�keyrrr�distutils_scheme�s,


	
	-rW)+�__doc__rrrr.�distutils.command.installrrr'Zpip.backwardcompatrrr�pip.exceptionsr3rrrrr$r-r8r	r
r�build_prefix�
src_prefix�getcwdr1�exitr�realpath�
site_packages�
expanduser�user_dirr&�bin_py�bin_user�exists�default_storage_dir�default_config_file�default_log_filerWrrrr�<module>sZ	


		
	!$!2python3.4/site-packages/pip/__pycache__/log.cpython-34.pyc000064400000020457151735047220017255 0ustar00�
�Re�$�@s�dZddlZddlZddlZddlmZddlmZmZdd�Z	ej
ejfdd�Zd	d
�Z
Gdd�de�Ze�ZdS)
zLogging
�N)�backwardcompat)�colorama�
pkg_resourcescs�fdd�}|S)Ncs#djt��|tjjg�S)N�)�join�listr�Style�	RESET_ALL)�inp)�colors��"/tmp/pip-ztkk0jow-build/pip/log.py�wrapped
sz_color_wrap.<locals>.wrappedr)rrr)rr
�_color_wrapsrcCsmt|tj�s|n|j}||kr1dSt|d�rP|j�rPdS|jd�dkridSdS)NF�isattyT�TERM�ANSI)�
isinstancer�AnsiToWin32r�hasattrr�get)�consumer�environ�std�
real_consumerrrr
�should_colors	rcCs�dj|jd�dd��}dj|jd�dd��}|jd�\}}tt|�d�}dj||g�}tj|�tj|�kS)N�.��)r�split�str�intr�
parse_version)�current_version�removal_version�major�minor�warn_versionrrr
�should_warn&s""r(c@s�eZdZdZejdZejZejZejejdZ	ejZZ
ejZejZeeee	eeegZ
ieejj�e6eejj�e6eejj�e6Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zddd�Z dd d!�Z!d"d#�Z"d$d%�Z#d&d'�Z$e%d(d)��Z&d*d+�Z'dS),�Loggerz�
    Logging object for use in command-line script.  Allows ranges of
    levels, to avoid some redundancy of displayed information.
    rrcCs1g|_d|_d|_d|_d|_dS)NrF)�	consumers�indent�explicit_levels�in_progress�in_progress_hanging)�selfrrr
�__init__Ls
				zLogger.__init__cGs�tjjd�rsxn|D]S\}}t|d�rV|jj|tj|�f�q|jj||f�qWn|jj|�dS)N�win�write)	�sys�platform�
startswithrr*�appendrr�extend)r/r*�levelrrrr
�
add_consumersSs	zLogger.add_consumerscOs|j|j|||�dS)N)�log�DEBUG)r/�msg�args�kwrrr
�debug_szLogger.debugcOs|j|j|||�dS)N)r:�INFO)r/r<r=r>rrr
�infobszLogger.infocOs|j|j|||�dS)N)r:�NOTIFY)r/r<r=r>rrr
�notifyesz
Logger.notifycOs|j|j|||�dS)N)r:�WARN)r/r<r=r>rrr
�warnhszLogger.warncOs|j|j|||�dS)N)r:�ERROR)r/r<r=r>rrr
�errorkszLogger.errorcOs|j|j|||�dS)N)r:�FATAL)r/r<r=r>rrr
�fatalnszLogger.fatalcOsLddlm}t||�r5|j|||�n|j|||�dS)a�
        Logs deprecation message which is log level WARN if the
        ``removal_version`` is > 1 minor release away and log level ERROR
        otherwise.

        removal_version should be the version that the deprecated feature is
        expected to be removed in, so something that will not exist in
        version 1.7, but will in 1.6 would have a removal_version of 1.7.
        r)�__version__N)�piprJr(rErG)r/r$r<r=�kwargsrJrrr
�
deprecatedqs
zLogger.deprecatedc
Osx|r|rtd��qn|p'|}|r=||}n|}d|j|}|jrpd||f}nx|jD]�\}}|j||�rz|jr�|tjtjfkr�d|_tjj	d�tjj
�nt|d�rc|d}t|t
j�r7|jj|dd��}	|	|�}n|j	|�t|d	�rm|j
�qmqp||�qzqzWdS)
Nz6You may give positional or keyword arguments, not both� z%02i %sF�
r2cSs|S)Nr)�xrrr
�<lambda>�szLogger.log.<locals>.<lambda>�flush)�	TypeErrorr+r,r*�
level_matchesr.r3�stdout�stderrr2rRrr�osr�COLORSr)
r/r8r<r=r>�rendered�consumer_levelr�
write_content�	colorizerrrr
r:�s6
			

z
Logger.logcCs|j|j�otjj�S)z$Should we display download progress?)�stdout_level_matchesrBr3rUr)r/rrr
�_show_progress�szLogger._show_progresscCs�|js#td||jf��|j�rctjjd|j|�tjj�d|_n	d|_||_d|_	dS)Nz0Tried to start_progress(%r) while in_progress %rrNTF)
r-�AssertionErrorr^r3rUr2r+rRr.�last_message)r/r<rrr
�start_progress�s

		zLogger.start_progresszdone.cCs�|jstd��|j�r�|jsYtjjd|j|d�tjj�q�tj	d�tj	d�tjj|d�tjj�nd|_d|_dS)Nz,Tried to end_progress without start_progressz...rOrF)
r-r_r^r.r3rUr2rR�logger�
show_progress)r/r<rrr
�end_progress�s		

	zLogger.end_progressNcCs�|jr�|dkr5tjjd�tjj�q�|jrgdtdt|j�t|��}nd}tjjdd|j|j	||f�tjj�||_ndS)zaIf we are in a progress scope, and no log messages have been
        shown, write out another '.'NrrNrrz	
%s%s%s%s)
r.r3rUr2rRr`�max�lenr+r-)r/�message�paddingrrr
rc�s		)
zLogger.show_progresscCs|j||j��S)z9Returns true if a message at this level will go to stdout)rT�
_stdout_level)r/r8rrr
r]�szLogger.stdout_level_matchescCs4x*|jD]\}}|tjkr
|Sq
W|jS)z%Returns the level that stdout runs at)r*r3rUrH)r/r8rrrr
ri�szLogger._stdout_levelcCslt|t�r^|j|j}}|dk	r>||kr>dS|dk	sV||krZdSdS||kSdS)am
        >>> l = Logger()
        >>> l.level_matches(3, 4)
        False
        >>> l.level_matches(3, 2)
        True
        >>> l.level_matches(slice(None, 3), 3)
        False
        >>> l.level_matches(slice(None, 3), 2)
        True
        >>> l.level_matches(slice(1, 3), 1)
        True
        >>> l.level_matches(slice(2, 3), 1)
        False
        NFT)r�slice�start�stop)r/r8rZrkrlrrr
rT�szLogger.level_matchescCs?|j}|dkr|dS|t|�kr7|dS||S)Nrr���)�LEVELSrf)�clsr8�levelsrrr
�level_for_integers	zLogger.level_for_integercCs�g}g}xR|jD]G\}}|tjkr|j||f�|j|tjf�qqWx|D]}|jj|�qhW|jj|�dS)N)r*r3rUr6rV�remover7)r/�	to_remove�to_addrZr�itemrrr
�move_stdout_to_stderr	s
zLogger.move_stdout_to_stderr)(�__name__�
__module__�__qualname__�__doc__�loggingr;�
VERBOSE_DEBUGr@rDrB�WARNINGrFrHrnrr�Fore�YELLOW�REDrXr0r9r?rArCrErGrIrMr:r^rardrcr]rirT�classmethodrqrvrrrr
r)7s@
		
		&
	r))rzr3rWr{rKr�pip._vendorrrrrUrVrr(�objectr)rbrrrr
�<module>s�python3.4/site-packages/pip/__pycache__/status_codes.cpython-34.pyc000064400000000450151735047220021163 0ustar00�
�Ret�@s(dZdZdZdZdZdZdS)������N)�SUCCESS�ERROR�
UNKNOWN_ERROR�VIRTUALENV_NOT_FOUND�PREVIOUS_BUILD_DIR_ERROR�NO_MATCHES_FOUND�r
r
�+/tmp/pip-ztkk0jow-build/pip/status_codes.py�<module>s
python3.4/site-packages/pip/__pycache__/basecommand.cpython-34.pyc000064400000012407151735047220020741 0ustar00�
�Re��@sUdZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZmZmZmZmZddlmZdd	lmZmZdd
lmZmZmZmZmZddl m!Z!dgZ"Gd
d�de#�Z$ddd�Z%ddd�Z&dS)z(Base Command class, and related routines�N)�
cmdoptions)�running_under_virtualenv)�logger)�
PipSession)�
BadCommand�InstallationError�UninstallationError�CommandError�PreviousBuildDirError)�StringIO)�ConfigOptionParser�UpdatingDefaultsHelpFormatter)�SUCCESS�ERROR�
UNKNOWN_ERROR�VIRTUALENV_NOT_FOUND�PREVIOUS_BUILD_DIR_ERROR)�get_prog�Commandc@s^eZdZdZdZdZdd�Zdd�Zdd�Zd	d
�Z	dd�Z
dS)
rNFcCs�i|jd6dt�|jfd6t�d6dd6|jd6|jd6}t|�|_d	|jj�}tj	|j|�|_
tjtj
|j�}|jj|�dS)
N�usagez%s %s�prog�	formatterF�add_help_option�name�descriptionz
%s Options)rrrr
�__doc__r�parser�
capitalize�optparse�OptionGroup�cmd_optsr�make_option_group�
general_group�add_option_group)�self�	parser_kw�
optgroup_name�gen_opts�r(�*/tmp/pip-ztkk0jow-build/pip/basecommand.py�__init__s



zCommand.__init__cCsvt�}|jr!|j|_n|jr9|j|_n|jrbi|jd6|jd6|_n|j|j_|S)N�http�https)	r�cert�verify�timeout�proxy�proxies�no_input�auth�	prompting)r$�options�sessionr(r(r)�_build_session3s				
zCommand._build_sessioncCsdS)Nr()r$r(r(r)�
setup_loggingJszCommand.setup_loggingcCs|jj|�S)N)r�
parse_args)r$�argsr(r(r)r9MszCommand.parse_argscCs�|j|�\}}d}||j7}||j8}tjd|�}g}tj|tjftj|j	f�|j
r�dt_n|j�|j
r�dtjd<n|jr�dj|j�tjd<n|jrt�stjd�tjt�qn|jr6t|jd	�}tjtj|f�nd}t}d
}y.|j||�}t|t�ru|}nWn�tk
r�tj�d}	tjt|	��tj dt!��d}t"}Yn`t#t$fk
r'tj�d}	tjt|	��tj dt!��d}t%}Ynt&k
r{tj�d}	tjt|	��tj dt!��d}t%}Yn�t'k
r�tj�d}	tjd|	�tj dt!��t%}Ynft(k
rtjd
�tj dt!��d}t%}Yn(tjdt!��d}t)}YnX|r�|j*}
dj|�}yt|
d�}Wn<t+k
r�t,j-dd
�}
|
j.}
t|
d�}YnXtjd|
�|j/|�|j0�n|dk	r�|j0�n|S)N��T�1�PIP_NO_INPUT� �PIP_EXISTS_ACTIONz2Could not find an activated virtualenv (required).�aFzException information:
%sz	ERROR: %szOperation cancelled by userz
Exception:
%s�
�w�deletez#Storing debug log for failure in %s)1r9�verbose�quietr�level_for_integer�
add_consumers�sys�stdout�DEBUG�append�log_explicit_levels�explicit_levelsr8r2�os�environ�
exists_action�join�require_venvr�fatal�exitr�log�open_logfiler�run�
isinstance�intr
�exc_info�str�info�
format_excrrrrrr	�KeyboardInterruptr�log_file�IOError�tempfile�NamedTemporaryFiler�write�close)r$r:r5�level�complete_log�log_fprU�	store_log�status�e�log_file_fn�text�log_file_fp�tempr(r(r)�mainQs�

	
				
	










	
	


zCommand.main)�__name__�
__module__�__qualname__rr�hiddenr*r7r8r9rpr(r(r(r)rscCsG|dkrtj�}nt�}tj|td|��|j�S)N�file)rIr[r�	traceback�print_exception�dict�getvalue)r[�outr(r(r)r^�s
	r^rAcCs�tjj|�}tjj|�}tjj|�}tjj|�sXtj|�ntjj|�}t||�}|r�|jddd�|jdt	j
dtjd�f�n|S)z�Open the named log file in append mode.

    If the file already exists, a separator will also be printed to
    the file to separate past activity from current activity.
    z%s
�-�<z
%s run on %s
rz%c)
rO�path�
expanduser�abspath�dirname�exists�makedirs�openrdrI�argv�time�strftime)�filename�moder�r�rhr(r(r)rW�s*rW)'rrOrIrbrvr�r�pipr�
pip.locationsr�pip.logr�pip.downloadr�pip.exceptionsrrrr	r
Zpip.backwardcompatr�pip.baseparserrr
�pip.status_codesrrrrr�pip.utilr�__all__�objectrr^rWr(r(r(r)�<module>s&((	�python3.4/site-packages/pip/__pycache__/runner.cpython-34.pyc000064400000000755151735047220020004 0ustar00�
�Re��@sVddlZddlZdd�ZedkrRe�ZerReje�qRndS)�NcCsStjjtjjtjjt���}tjjd|�ddl}|j�S)Nr)	�os�path�dirname�abspath�__file__�sys�insert�pip�main)�baser	�r�%/tmp/pip-ztkk0jow-build/pip/runner.py�runs*r�__main__)rrr�__name__�exitrrrr
�<module>s
	python3.4/site-packages/pip/__pycache__/util.cpython-34.pyc000064400000056430151735047220017451 0ustar00�
�Re$b�@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZm
Z
mZddlmZmZmZmZmZmZddlmZmZmZddlmZddlmZddlmZdd	d
ddd
ddddddddddddddddddd gZ d!d�Z!d"d#d�Z"d$d%�Z#d&d	�Z$d'd(d
�Z%ddd)d�Z&dd*d+�Z'd,d-�Z(d.d�Z)Gd/d0�d0e*�Z+e+�Z,[+ej-d1ej.�Z/d2d�Z0d3d�Z1d4d�Z2d5d�Z3d6d�Z4d7d�Z5d8d�Z6d9d�Z7d:d�Z8d;d�Z9d<d�Z:d=d>�Z;d?d@�Z<dAdB�Z=dCdD�Z>dEdF�Z?dGd_dGd"dLdM�Z@dNdO�ZAdPdQ�ZBdRd�ZCdSdT�ZDdGdUd�ZEdVd�ZFdWd�ZGdXd�ZHdYd�ZIdGdddGejJdddZd �ZKd[d\�ZLGd]d^�d^e*�ZMdS)`�N)�InstallationError�
BadCommand�PipError)�WindowsError�string_types�	raw_input�console_to_str�	user_site�PermissionError)�
site_packages�running_under_virtualenv�virtualenv_no_global)�logger)�
pkg_resources)�version�rmtree�display_path�
backup_dir�find_command�ask�Inf�normalize_name�splitext�format_size�is_installable_dir�is_svn_page�
file_contents�split_leading_dir�has_leading_dir�make_path_relative�normalize_path�renames�get_terminal_size�get_prog�
unzip_file�
untar_file�create_download_cache_folder�cache_download�unpack_file�call_subprocessc
CsPy.tjjtjd�dkr-dtjSWntttfk
rKYnXdS)Nr�__main__.py�-cz	%s -m pip�pip)r*r+)	�os�path�basename�sys�argv�
executable�AttributeError�	TypeError�
IndexError�r6r6�#/tmp/pip-ztkk0jow-build/pip/util.pyr#!sFcCstj|d|dt�dS)N�
ignore_errors�onerror)�shutilr�rmtree_errorhandler)�dirr8r6r6r7r*scCs�|dd�\}}|tkr5|jddkpp|tkrT|jddkpp|tkop|jddksy�ntj|�jtj@tjkr��ntj|tj	�||�dS)z�On Windows, the files in .svn are read-only, so when rmtree() tries to
    remove them, an exception is thrown.  We catch that here, remove the
    read-only attribute, and hopefully continue without problems.N�r��
�)
r�args�OSErrorr
r-�stat�st_mode�S_IREAD�chmod�S_IWRITE)�funcr.�exc_info�exctype�valuer6r6r7r;/s"r;cCsdtjjtjj|��}|jtj�tjj�r`d|ttj��d�}n|S)zTGives the display value for a given path, making it relative to cwd
    if possible.�.N)r-r.�normcase�abspath�
startswith�getcwd�sep�len)r.r6r6r7rBs#z.bakcCsKd}|}x4tjj||�rB|d7}|t|�}qW||S)z\Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)�)r-r.�exists�str)r<�ext�n�	extensionr6r6r7rKs
cCs7|dkr0tjjdd�jtj�}nt|t�rK|g}n|dkrct�}ndd�|j�jtj�D�}tj	j
|�dj�|kr�dg}nxj|D]b}tj	j||�}x.|D]&}||}tj	j|�r�|Sq�Wtj	j|�r�|Sq�Wt
d|��dS)z<Searches the PATH for the given command and returns its pathN�PATH�cSs"g|]}t|�r|�qSr6)rR)�.0rVr6r6r7�
<listcomp>_s	z find_command.<locals>.<listcomp>rSzCannot find command %r)r-�environ�get�split�pathsep�
isinstancer�get_pathext�lowerr.r�join�isfiler)�cmd�paths�pathextr.�cmd_pathrV�cmd_path_extr6r6r7rVs$$%"


cCsF|dkr-tjjddddg�}ntjjd|�}|S)z9Returns the path extensions from environment or a defaultNz.COMz.EXEz.BATz.CMD�PATHEXT)r-r`rdr]r^)�default_pathextrhr6r6r7rbqs!rbcCsCx3tjjdd�j�D]}||kr|SqWt||�S)N�PIP_EXISTS_ACTIONrZ)r-r]r^r_r)�message�options�actionr6r6r7�ask_path_existsys"rqcCs~xwtjjd�r(td|��nt|�}|j�j�}||krrtd|dj|�f�q|SqWdS)z@Ask the message interactively, with the given possible responses�PIP_NO_INPUTz7No input was expected ($PIP_NO_INPUT set); question: %sz<Your response (%r) was not one of the expected responses: %sz, N)	r-r]r^�	Exceptionr�striprc�printrd)rnro�responser6r6r7r�sc@sjeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�_InfzI am bigger than everything!cCs||krdSdSdS)NTFr6)�self�otherr6r6r7�__eq__�sz_Inf.__eq__cCs|j|�S)N)rz)rxryr6r6r7�__ne__�sz_Inf.__ne__cCsdS)NFr6)rxryr6r6r7�__lt__�sz_Inf.__lt__cCsdS)NFr6)rxryr6r6r7�__le__�sz_Inf.__le__cCsdS)NTr6)rxryr6r6r7�__gt__�sz_Inf.__gt__cCsdS)NTr6)rxryr6r6r7�__ge__�sz_Inf.__ge__cCsdS)Nrr6)rxr6r6r7�__repr__�sz
_Inf.__repr__N)�__name__�
__module__�__qualname__�__doc__rzr{r|r}r~rr�r6r6r6r7rw�srwz[^a-z]cCstjd|j��S)N�-)�
_normalize_re�subrc)�namer6r6r7r�scCsX|dkrd|ddS|d	kr4d|dS|dkrLd|dSd|SdS)
Ni�z%.1fMBg@�@�
z%ikBz%.1fkBz%ibytesi@Bi'r6)�bytesr6r6r7r�scCsEtjj|�sdStjj|d�}tjj|�rAdSdS)z@Return True if `path` is a directory containing a setup.py file.Fzsetup.pyT)r-r.�isdirrdre)r.�setup_pyr6r6r7r�scCs(tjd|�o'tjd|tj�S)zJReturns true if the page appears to be the index page of an svn repositoryz<title>[^<]*Revision \d+:z#Powered by (?:<a[^>]*?>)?Subversion)�re�search�I)�htmlr6r6r7r�sc
Cs8t|d�}z|j�jd�SWd|j�XdS)N�rbzutf-8)�open�read�decode�close)�filename�fpr6r6r7r�scCs�t|�}|jd�jd�}d|krvd|krZ|jd�|jd�ksfd|krv|jdd�Sd|kr�|jdd�S|dfSdS)N�/�\rSrZ)rU�lstrip�findr_)r.r6r6r7r�s6cCs\d}xO|D]G}t|�\}}|s/dS|dkrD|}q
||kr
dSq
WdS)zyReturns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)NFT)r)rg�
common_prefixr.�prefix�restr6r6r7r�s
	cCs7tjj|�}tjj|�}tjjtjj|��}tjjtjj|��}|jtjj�jtjj�}|jtjj�jtjj�}x>|r�|r�|d|dkr�|j	d�|j	d�q�Wdgt
|�||g}|dgkr$dtjjStjjj|�S)a
    Make a filename relative, where the filename path, and it is
    relative to rel_to

        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/usr/share/another-place/src/Directory')
        '../../../something/a-file.pth'
        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/home/user/src/Directory')
        '../../../usr/share/something/a-file.pth'
        >>> make_relative_path('/usr/share/a-file.pth', '/usr/share/')
        'a-file.pth'
    rz..rZrL)r-r.r/�dirname�normpathrNrtrQr_�poprRrd)r.�rel_to�
path_filename�
path_parts�rel_to_parts�
full_partsr6r6r7r�s$$#
cCs(tjjtjjtjj|���S)zN
    Convert a path to its canonical, case-normalized, absolute version.

    )r-r.rM�realpath�
expanduser)r.r6r6r7r scCs[tj|�\}}|j�jd�rQ|dd�|}|dd�}n||fS)z,Like os.path.splitext, but take off .tar tooz.tar�N���r�)�	posixpathrrc�endswith)r.�baserVr6r6r7rs
cCs�tjj|�\}}|rG|rGtjj|�rGtj|�ntj||�tjj|�\}}|r�|r�ytj|�Wq�tk
r�Yq�XndS)z7Like os.renames(), but handles renaming across devices.N)	r-r.r_rT�makedirsr:�move�
removedirsrB)�old�new�head�tailr6r6r7r!!s
cCs)t�s
dSt|�jttj��S)z�
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    T)rr rOr0r�)r.r6r6r7�is_local2s	r�cCstt|��S)z�
    Return True if given Distribution object is installed locally
    (i.e. within current virtualenv).

    Always True if we're not in a virtualenv.

    )r��
dist_location)�distr6r6r7�
dist_is_local>sr�cCs-tr%tt|��jtt��SdSdS)zF
    Return True if given Distribution is installed in user site.
    FN)r	r r�rO)r�r6r6r7�dist_in_usersiteIsr�cCstt|��jtt��S)za
    Return True if given Distribution is installed in distutils.sysconfig.get_python_lib().
    )r r�rOr)r�r6r6r7�dist_in_site_packagesRsr�cCs)ddlm}|j|g�}|jS)z$Is distribution an editable install?r)�FrozenRequirement)r,r��	from_dist�editable)r�r��reqr6r6r7�dist_is_editableYsr�T�
setuptoolsr,�python�
distributecs�|rt�ndd��|r0dd��ndd��|rQdd��ndd������fdd�tjD�S)	a�
    Return a list of installed Distribution objects.

    If ``local_only`` is True (default), only return installations
    local to the current virtualenv, if in a virtualenv.

    ``skip`` argument is an iterable of lower-case project names to
    ignore; defaults to ('setuptools', 'pip', 'python'). [FIXME also
    skip virtualenv?]

    If ``editables`` is False, don't report editables.

    If ``editables_only`` is True , only report editables.

    cSsdS)NTr6)�dr6r6r7�<lambda>vsz-get_installed_distributions.<locals>.<lambda>cSsdS)NTr6)r�r6r6r7r�yscSst|�S)N)r�)r�r6r6r7r�{scSs
t|�S)N)r�)r�r6r6r7r�~scSsdS)NTr6)r�r6r6r7r��scsIg|]?}�|�r|j�kr�|�r�|�r|�qSr6)�key)r[r�)�
editable_test�editables_only_test�
local_test�skipr6r7r\�s
	z/get_installed_distributions.<locals>.<listcomp>)r�r�working_set)�
local_onlyr��include_editables�editables_onlyr6)r�r�r�r�r7�get_installed_distributions`s	r�cCs�g}t�rNt�r(|jt�qq|jt�trq|jt�qqn#trd|jt�n|jt�x@|D]8}tjj||j�d}tjj	|�rx|SqxWdS)a
    Return the path for the .egg-link file if it exists, otherwise, None.

    There's 3 scenarios:
    1) not in a virtualenv
       try to find in site.USER_SITE, then site_packages
    2) in a no-global virtualenv
       try to find in site_packages
    3) in a yes-global virtualenv
       try to find in site_packages, then site.USER_SITE  (don't look in global location)

    For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations.
    This method will just return the first one found.
    z	.egg-linkN)
rr
�appendrr	r-r.rd�project_namere)r��sites�site�egglinkr6r6r7�
egg_link_path�s		


r�cCst|�}|r|S|jS)z�
    Get the site-packages location of this distribution. Generally
    this is dist.location, except in the case of develop-installed
    packages, where dist.location is the source code location, and we
    want to know where the egg-link file is.

    )r��location)r��egg_linkr6r6r7r��sr�c
Cs�dd�}|d�p-|d�p-|d�}|s|y8tjtj�tj�}||�}tj|�Wq|Yq|Xn|s�tjjdd�tjjdd	�f}nt|d�t|d�fS)
zlReturns a tuple (x, y) representing the width(x) and the height(x)
    in characters of the terminal window.cSsyLddl}ddl}ddl}|jd|j||jd��}WndSYnX|dkrkdS|dkr{dS|S)Nr�hh�1234)rr)rr)�fcntl�termios�struct�unpack�ioctl�
TIOCGWINSZ)�fdr�r�r��crr6r6r7�ioctl_GWINSZ�s	z'get_terminal_size.<locals>.ioctl_GWINSZrrSr=�LINES��COLUMNS�P)r-r��ctermid�O_RDONLYr�r]r^�int)r�r�r�r6r6r7r"�s$-cCs tjd�}tj|�|S)zBGet the current umask which involves having to set it temporarily.r)r-�umask)�maskr6r6r7�
current_umask�s
r�c
Cs�tjj|�s"tj|�nt|d�}z}tj|�}t|j��oX|}xO|j	�D]A}|j
}|j|�}|}	|r�t|�d}	ntjj
||	�}	tjj|	�}
tjj|
�s�tj|
�n|	jd�s|	jd�r1tjj|	�s�tj|	�q�qht|	d�}z|j|�Wd|j�|jd?}|r�tj|�r�|d@r�tj|	d	t�dB�nXqhWWd|j�XdS)
a�
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    r�rSr�r��wbN��Ii�)r-r.rTr�r��zipfile�ZipFiler�namelist�infolistr�r�rrdr�r��writer��
external_attrrC�S_ISREGrFr�)
r�r��flatten�zipfp�zip�leading�infor��data�fnr<r��moder6r6r7r$�s6		

'cCs�tjj|�s"tj|�n|j�jd�sL|j�jd�rUd}nh|j�jd�s|j�jd�r�d}n5|j�jd�r�d}ntjd	|�d
}tj	||�}zt
dd�|j�D��}x�|j�D]�}|j}|d
krq�n|r8t
|�d}ntjj||�}|j�r~tjj|�s�tj|�q�q�|j�r�y|j||�Wq�tj�d}tjd||j|f�w�Yq�Xq�y|j|�}	WnHttfk
r9tj�d}tjd||j|f�w�YnXtjjtjj|��sttjtjj|��nt	|d�}
ztj|	|
�Wd|
j�X|	j�|jd@r�tj|dt�dB�q�q�WWd|j�XdS)a�
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    z.gzz.tgzzr:gzz.bz2z.tbzzr:bz2z.tar�rz-Cannot determine compression type for file %szr:*cSs(g|]}|jdkr|j�qS)�pax_global_header)r�)r[�memberr6r6r7r\$s	zuntar_file.<locals>.<listcomp>r�rSz/In the tar file %s the member %s is invalid: %sr�Nr�i�)r-r.rTr�rcr�r�warn�tarfiler�r�
getmembersr�rrdr��issym�_extract_memberr0rI�extractfile�KeyErrorr3r�r:�copyfileobjr�r�rFr�)r�r�r��tarr�rr�r.�er��destfpr6r6r7r%sf	*	*			

&cCs@tjd8_tjd|�tjd7_tj|�dS)Nr=z&Creating supposed download cache at %s)r�indent�notifyr-r�)�folderr6r6r7r&XscCsUtjdt|��tj||�t|dd�}|j|�|j�dS)NzStoring download in cache at %sz
.content-type�w)rr
rr:�copyfiler�r�r�)�target_file�
temp_location�content_typer�r6r6r7r'_s

cCsCtjj|�}|dksZ|jd�sZ|jd�sZ|jd�sZtj|�rzt||d|jd��n�|dks�tj|�s�t	|�dj
�dkr�t||�n~|r|jd
�rt
t|��rddlm}|d|j�j|�n*tjd|||f�td|��dS)Nzapplication/zipz.zip�	.pybundle�.whlr�zapplication/x-gziprS�.tar�.tar.gz�.tar.bz2�.tgz�.tbzz	text/htmlr)�
Subversionzsvn+zZCannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formatz%Cannot determine archive format of %s)rr)rrrrr)r-r.r�r�r��
is_zipfiler$r�
is_tarfilerrcr%rOrr�pip.vcs.subversionr�urlr�r�fatalr)r�r�r�linkrr6r6r7r(gs$ 	cCs�|dkr�g}xd|D]\}	d|	ksOd|	ksOd|	ksOd|	krhd|	jdd�}	n|j|	�qWdj|�}n|r�d}
n	tj}
tj|d|�tjj	�}|r�|j
|�ny4tj|dtjd	dd
|
d|d|�}Wn<t
k
rNtj�d
}
tjd|
|f��YnXg}|
dk	r|j}
x�t|
j��}|s�Pn|j�}|j|d�|r||�}t|t�r�|\}}ntj||�tj|�stj�qqmtj|�qmWn!|j�\}}|p4dg}|j�|jr�|r�|r�tjd|�tjdj|�d�ntd||j|f��q�tjd||j|f�n|
dk	r�dj|�SdS)N� �
�"�'z"%s"z\"zRunning command %s�stderr�stdin�stdout�cwd�envrSz#Error %s while executing command %srZz Complete output from command %s:z)
----------------------------------------z*Command %s failed with error code %s in %sz"Command %s had error code %s in %s) �replacer�rd�
subprocess�PIPEr�logr-r]�copy�update�Popen�STDOUTrsr0rIr r(r�readline�rstripra�tuple�stdout_level_matches�
show_progressr��communicate�wait�
returncoder
rr)rf�show_stdout�
filter_stdoutr)�raise_on_returncode�
command_level�command_desc�
extra_environ�	cmd_parts�partr(r*�procr
�
all_output�line�level�returned_stdout�returned_stderrr6r6r7r)�sp
0		
	
	cCsEtj|�}|dkrdStj|�}tdd�|D��S)z�
    Attempt to determine if this is a pre-release using PEP386/PEP426 rules.

    Will return True if it is a pre-release and False if not. Versions are
    assumed to be a pre-release if they cannot be parsed.
    NTcSs)g|]}tdd�|D���qS)c	Ss1g|]'}|tdddddg�k�qS)�a�b�c�rc�dev)�set)r[�yr6r6r7r\�s	z,is_prerelease.<locals>.<listcomp>.<listcomp>)�any)r[�xr6r6r7r\�s	z!is_prerelease.<locals>.<listcomp>)r�_suggest_normalized_version�_normalized_keyrP)�vers�
normalized�parsedr6r6r7�
is_prerelease�s
rWc@sReZdZdddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)�BuildDirectoryNcCsm|dkr!|dkr!d}n|dkrWtjdd�}|dkrWd}qWn||_||_dS)NTr�z
pip-build-)�tempfile�mkdtempr��delete)rxr�r[r6r6r7�__init__�s		zBuildDirectory.__init__cCsdj|jj|j�S)Nz	<{} {!r}>)�format�	__class__r�r�)rxr6r6r7r��szBuildDirectory.__repr__cCs|jS)N)r�)rxr6r6r7�	__enter__�szBuildDirectory.__enter__cCs|j�dS)N)�cleanup)rx�excrK�tbr6r6r7�__exit__�szBuildDirectory.__exit__cCs|jrt|j�ndS)N)r[rr�)rxr6r6r7r`�s	zBuildDirectory.cleanup)r�r�r�r\r�r_rcr`r6r6r6r7rX�s
rX)z
setuptoolszpipzpythonz
distribute)Nr0r:r-rCr�r�r�rr,�textwraprY�pip.exceptionsrrrZpip.backwardcompatrrrrr	r
�
pip.locationsrrr
�pip.logr�pip._vendorr�pip._vendor.distlibr�__all__r#rr;rrrrbrqr�objectrwr�compiler�r�rrrrrrrrr rr!r�r�r�r�r�r�r�r�r"r�r$r%r&r'r(�DEBUGr)rWrXr6r6r6r7�<module>s�.							
		'"-L	?python3.4/site-packages/pip/__pycache__/cmdoptions.cpython-34.pyc000064400000016100151735047220020641 0ustar00�
�Rer$�@sJdZddlZddlmZmZmZddlmZdd�ZGdd�de	�Z
e
d	d
ddd
ddd�Ze
ddddd
dddde�Ze
ddddd
ddddd�Z
e
ddddd
ddd�Ze
dddd d
ddddd!�Ze
d"dd#d$d%dd&�Ze
d'dd(d
dddde�Ze
d)d*dd+d$d%dedd,�Ze
d-dd.d
dddde�Ze
d/dd0d1d2dd3dd4�Ze
d5d6d$d7dd8d1d9dd:dd;�Ze
d<dd=d1d2dd3de�Ze
d>dd?d1d2dd3de�Ze
d@ddAd1dBdCdDdEdFdGgdgd
dHd$d
ddI�Ze
dJddKd1d2dd3d$d%ddL�Ze
dMdNdOddPd$dQddRddS�Ze
dTddUd$dQd
dHdgddV�Ze
dWddXd
dddddY�Ze
dZd[dd\d
dHdgd$d]dd^�Ze
d_d`ddad
dddde�Ze
dbddcd$dQd
dHdgde�Ze
dddded
dHdgd$dfddg�Z e
dhddid
dddddj�Z!e
dkddid
dlddde�Z"e
dmdnddod
dHdgd$dfddp�Z#e
dqddrd
dlddde�Z$e
dsddtd
dddddu�Z%e
dvdwddxd
dHdgd$dyddz�Z&e
d{dd|d
dde�Z'e
d}dd|d
dldd~dd�Z(e
d�dd�d$d�dddd��Z)e
d�d�dd�d
ddddd��Z*e
d�d�d�d�dd�d$d�dd��Z+e
d�dd�d
dHd$d�dd��Z,e
d�dd�d
dHd$d�dd��Z-e
d�d
ddddd��Z.id�d�6eee
eeeeeeeeeeeegd�6Z/id�d�6eeeeeee e!e"e#e$e%gd�6Z0dS)�aE
shared options and groups

The principle here is to define options once, but *not* instantiate them globally.
One reason being that options with action='append' can carry state between parses.
pip parse's general options twice internally, and shouldn't pass on state.
To be consistent, all options will follow this design.

�N)�OptionGroup�
SUPPRESS_HELP�Option)�default_log_filecCs?t||d�}x%|dD]}|j|j��qW|S)z�
    Return an OptionGroup object
    group  -- assumed to be dict with 'name' and 'options' keys
    parser -- an optparse Parser
    �name�options)r�
add_option�make)�group�parser�option_group�option�r�)/tmp/pip-ztkk0jow-build/pip/cmdoptions.py�make_option_groupsrc@s.eZdZdZdd�Zdd�ZdS)�OptionMakerz�Class that stores the args/kwargs that would be used to make an Option,
    for making them later, and uses deepcopy's to reset state.cOs||_||_dS)N)�args�kwargs)�selfrrrrr�__init__s	zOptionMaker.__init__cCs1tj|j�}tj|j�}t||�S)N)�copy�deepcopyrrr)r�	args_copy�kwargs_copyrrrr	 szOptionMaker.makeN)�__name__�
__module__�__qualname__�__doc__rr	rrrrrsrz-hz--help�dest�help�actionz
Show help.z--require-virtualenvz--require-venv�require_venv�
store_true�defaultFz-vz	--verbose�verbose�countzDGive more output. Option is additive, and can be used up to 3 times.z-Vz	--version�versionzShow version and exit.z-qz--quiet�quietzGive less output.z--log�log�metavar�pathzAPath to a verbose appending log. This log is inactive by default.z--log-explicit-levels�log_explicit_levelsz
--log-filez--local-log�log_filezhPath to a verbose non-appending log, that only logs failures. This log is active by default at %default.z
--no-input�no_inputz--proxy�proxy�type�str�z<Specify a proxy in the form [user:passwd@]proxy.server:port.z	--timeoutz--default-timeout�sec�timeout�float�z2Set the socket timeout (default %default seconds).z
--default-vcs�default_vcsz--skip-requirements-regex�skip_requirements_regexz--exists-action�
exists_action�choice�choices�s�i�w�b�appendzPDefault action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.z--cert�certzPath to alternate CA bundle.z-iz--index-urlz
--pypi-url�	index_url�URLzhttps://pypi.python.org/simple/z4Base URL of Python Package Index (default %default).z--extra-index-url�extra_index_urlsz@Extra URLs of package indexes to use in addition to --index-url.z
--no-index�no_indexzAIgnore package index (only looking at --find-links URLs instead).z-fz--find-links�
find_links�urlz�If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.z-Mz
--use-mirrors�use_mirrorsz	--mirrors�mirrorsz--allow-external�allow_external�PACKAGEz1Allow the installation of externally hosted filesz--allow-all-external�allow_all_externalz5Allow the installation of all externally hosted filesz--no-allow-external�store_falsez--allow-unverifiedz--allow-insecure�allow_unverifiedz9Allow the installation of insecure and unverifiable filesz--no-allow-insecure�allow_all_insecurez--process-dependency-links�process_dependency_linksz*Enable the processing of dependency links.z-rz
--requirement�requirements�filezQInstall from the given requirements file. This option can be used multiple times.z--use-wheel�	use_wheelz--no-use-wheelTzVDo not Find and prefer wheel archives when searching indexes and find-links locations.z--download-cache�download_cache�dirz#Cache downloaded packages in <dir>.z	--no-depsz--no-dependencies�ignore_dependenciesz#Don't install package dependencies.z-bz--buildz--build-dirz--build-directory�	build_dirz/Directory to unpack packages into and build in.z--install-option�install_optionsra"Extra arguments to be supplied to the setup.py install command (use like --install-option="--install-scripts=/usr/local/bin"). Use multiple --install-option options to pass multiple options to setup.py install. If you are using an option with a directory path, be sure to use absolute path.z--global-option�global_optionszTExtra global options to be supplied to the setup.py call before the install command.z
--no-cleanz!Don't clean up build directories.zGeneral OptionsrzPackage Index Options)1rr�optparserrr�
pip.locationsrr�objectr�help_�require_virtualenvr$r&r'r(r+r,r-r.r3r6r7r8r@rA�extra_index_urlrDrErGrHrIrK�no_allow_external�allow_unsafe�no_allow_unsaferOrPrR�no_use_wheelrS�no_depsrVrWrX�no_clean�
general_group�index_grouprrrr�<module>	s																																																
python3.4/site-packages/pip/__pycache__/pep425tags.cpython-34.pyc000064400000005244151735047220020367 0ustar00�
�Re��@s�dZddlZddlZyddlZWn!ek
rQddljZYnXddlZdd�Zdd�Z	dd�Z
dd	d
d�Ze�Zedd
�Z
dS)z2Generate and work with PEP 425 Compatibility Tags.�NcCsUttd�rd}n9tjjd�r3d}ntjdkrKd}nd}|S)z'Return abbreviated implementation name.�pypy_version_info�pp�java�jy�cli�ip�cp)�hasattr�sys�platform�
startswith)�pyimpl�r�)/tmp/pip-ztkk0jow-build/pip/pep425tags.py�
get_abbr_impls			rcCs#djtttjdd���S)zReturn implementation version.�N�)�join�map�strr
�version_inforrrr�get_impl_versrcCs%tjj�jdd�jdd�S)z0Return our platform name 'win32', 'linux_x86_64'�.�_�-)�	distutils�util�get_platform�replacerrrrr srFcCs�g}|dkrqg}tjd}xIttjddd�D]+}|jdjtt||f���q?Wnt�}g}ytj	d�}WnDt
k
r�}z$tjdj
|�t�d}WYdd}~XnX|r|jd�rd|jd	d�dg|dd�<nt�}	ddl}
xK|
j�D]=}|djd
�r;|	j|djdd�d�q;q;W|jtt|	���|jd
�|s�t�}x5|D]*}
|jd||df|
|f�q�Wnxqt|�D]c\}}|jd||fd
df�|dkr�|jd||ddfd
df�q�q�Wxdt|�D]V\}}|jd|fd
df�|dkrj|jd|dd
df�qjqjW|S)z�Return a list of supported tags for each version specified in
    `versions`.

    :param versions: a list of string versions, of the form ["33", "32"],
        or None. The first version will be assumed to support our ABI.
    Nr�r�SOABIz{0}zcpython-rrz.abirr�nonez%s%s�anyzpy%s���r#r#)r
r�range�appendrrrr�	sysconfig�get_config_var�IOError�warnings�warn�format�RuntimeWarningr�split�set�imp�get_suffixes�add�extend�sorted�listr�	enumerate)�versions�noarch�	supported�major�minor�impl�abis�soabi�e�abi3sr/�suffix�arch�abi�i�versionrrr�
get_supported&sF
 ,	*	(
	
+ /%rEr7T)�__doc__r
r)r&�ImportError�distutils.sysconfig�distutils.utilrrrrrE�supported_tags�supported_tags_noarchrrrr�<module>s

?	python3.4/site-packages/pip/__pycache__/req.cpython-34.pyc000064400000160600151735047220017256 0ustar00�
�Re)G�@s\ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZmZmZmZmZddlmZmZmZmZmZmZmZddlmZddlmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0dd	l1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9dd
l:m;Z;ddl
m<Z<ddl=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHddlIZJdd
lImKZKmLZLmMZMddlNmOZOmPZPdd�ZQGdd�deR�ZSGdd�deR�ZTGdd�deR�ZUdd�ZVejWdejX�ZYdddddd�ZZdd�Z[dd�Z\d d!�Z]dd"d#�Z^Gd$d%�d%eR�Z_Gd&d'�d'eR�Z`Gd(d)�d)eR�ZadS)*�)�
FeedParserN)�change_root)�bin_py�running_under_virtualenv�PIP_DELETE_MARKER_FILENAME�write_delete_marker_file�bin_user)�InstallationError�UninstallationError�UnsupportedWheel�BestVersionAlreadyInstalled�InvalidWheelFilename�DistributionNotFound�PreviousBuildDirError)�vcs)�logger)�display_path�rmtree�ask�ask_path_exists�
backup_dir�is_installable_dir�is_local�
dist_is_local�dist_in_usersite�dist_in_site_packages�renames�normalize_path�
egg_link_path�make_path_relative�call_subprocess�
is_prerelease�normalize_name)�urlparse�urllib�uses_pycache�ConfigParser�string_types�	HTTPError�get_python_version�b)�Link)�build_prefix)�
PipSession�get_file_content�is_url�url_to_path�path_to_url�is_archive_file�unpack_vcs_link�
is_vcs_url�is_file_url�unpack_file_url�unpack_http_url)�move_wheel_files�Wheel�	wheel_ext)�
pkg_resources�sixcCs�t|d��}|j�}WdQXdtjd�dg}x:|D]2}y|j|�}Wntk
rswCYnXPqCWt|�tks�t�|S)aQReturn the contents of *filename*.

    Try to decode the file contents with utf-8, the preffered system encoding
    (e.g., cp1252 on some Windows machines) and latin1, in that order. Decoding
    a byte string with latin1 will never raise an error. In the worst case, the
    returned string will contain some garbage characters.

    �rbNzutf-8F�latin1)	�open�read�locale�getpreferredencoding�decode�UnicodeDecodeError�type�bytes�AssertionError)�filename�fp�data�	encodings�enc�rM�"/tmp/pip-ztkk0jow-build/pip/req.py�read_text_file's	

rOc@skeZdZddddddddddd�	Zedddd��Zedddd	��Zd
d�Zdd
�Zddd�Z	dd�Z
edd��Zedd��Z
edd��Zddd�ZdZdd�Zdd�Zdd �Zd!d"�Zed#d$��Zejd%�Zfd&d'�Zed(d)��Zed*d+��Zd,d-�Zdd.d/�Zdd0d1�Zd2d3�Zd4d5�Z d6d7�Z!d8d9�Z"fddd:d;�Z#d<d=�Z$fd>d?�Z%d@dA�Z&dBdC�Z'edDdE��Z(edFdG��Z)dHdI�Z*dJdK�Z+dddLdM�Z,edNdO��Z-dS)P�InstallRequirementNFTcCsLf|_t|t�r9tjj|�}|j|_n||_||_||_||_	|	dkrri}	n|	|_
||_||_d|_
d|_d|_d|_d|_||_d|_d|_d|_d|_|
|_||_|rd|_n=|jdk	r?tdd�|jjD��|_n	d|_dS)NFTcSs0g|]&}t|d�o)|ddk�qS)�rz!=)r!)�.0�xrMrMrN�
<listcomp>ls	z/InstallRequirement.__init__.<locals>.<listcomp>)�extras�
isinstancer'r;�Requirement�parse�req�
comes_from�
source_dir�editable�editable_options�url�as_egg�_egg_info_path�satisfied_by�conflicts_with�_temp_build_dir�
_is_bundle�update�install_succeeded�uninstalled�
use_user_site�
target_dir�from_bundle�	pycompile�prereleases�any�specs)�selfrYrZr[r\r^r_rerlr]rjrkrMrMrN�__init__As<																					%zInstallRequirement.__init__c	
Cs�t||�\}}}|jd�r6t|�}nd}|||d|ddd|d|dd�}|dk	r�||_n|S)Nzfile:r[r\Tr^r]rl)�parse_editable�
startswithr0rU)	�cls�editable_reqrZ�default_vcs�namer^�extras_overrider[�resrMrMrN�
from_editableps	z InstallRequirement.from_editablec	Cs�d}|j�}d}tjjtjj|��}d}t|�rWt|�}n�tjj|�r�tjj|ks�|j	d�r�t
|�s�td|��ntt|��}nFt
|�rtjj|�s�tjd|�ntt|��}n|r�|dkr�|j}|j}|jdkrstjd|�rsttjjtjj|j���}n|jtkr�t|j�}|j�s�td|j��q�q�n|}|||d|d	|�S)
z�Creates an InstallRequirement from a name, which might be a
        requirement, directory containing 'setup.py', filename, or URL.
        N�.z;Directory %r is not installable. File 'setup.py' not found.zARequirement %r looks like a filename, but the file does not exist�filez\.\./z-%s is not a supported wheel on this platform.r^rl)�strip�os�path�normpath�abspathr/r+�isdir�seprrrr	r1r2�isfiler�warn�url_without_fragment�egg_fragment�scheme�re�search�extr:r9rH�	supportedr)	rsrvrZrlr^rYr~�link�wheelrMrMrN�	from_line�s43		!*zInstallRequirement.from_linecCs�|jr8t|j�}|jrA|d|j7}qAn	|j}|jdk	rm|dt|jj�7}n|jr�t|jt�r�|j}n|jj	�}|r�|d|7}q�n|S)Nz from %sz in %sz
 (from %s))
rY�strr^rar�locationrZrVr'�	from_path)ro�srZrMrMrN�__str__�s				zInstallRequirement.__str__cCsv|jdkrdSt|j�}|jrrt|jt�rI|j}n|jj�}|rr|d|7}qrn|S)Nz->)rYr�rZrVr'r�)ror�rZrMrMrNr��s	zInstallRequirement.from_pathcCs�|jdk	r|jS|jdkrJtjdd�|_||_|jS|jre|jj�}n	|j}tj	j
|�s�t|�ntj	j||�S)Nz-buildzpip-)
rcrY�tempfile�mkdtemp�_ideal_build_dirr\rv�lowerr}r~�exists�_make_build_dir�join)ro�	build_dir�unpackrvrMrMrN�build_location�s			
z!InstallRequirement.build_locationcCs8|jdk	rdS|jdk	s(t�|js7t�|j}|j}|`|jrj|jj�}n	|j}tj	j
||�}tj	j|�s�tj
d|�t|�ntj	j|�r�tdt|���ntj
d|t|�t|�f�tj||�||_||_d|_dS)zkIf the build location was a temporary directory, this will move it
        to a new more permanent locationNzCreating directory %sz<A package already exists in %s; please remove it to continuez,Moving package %s from %s to new location %s)r[rYrGrcr�r\rvr�r}r~r�r�r�debugr�r	r�shutil�mover`)ro�old_location�
new_build_dirrv�new_locationrMrMrN�correct_build_location�s0				
			z)InstallRequirement.correct_build_locationcCs|jdkrdS|jjS)N)rY�project_name)rorMrMrNrv�szInstallRequirement.namecCs&|jdkrdStj|jj�S)N)rYr$�quote�unsafe_name)rorMrMrN�url_nameszInstallRequirement.url_namecCs�yddl}Wntk
r0td��YnXd}|jrtd|jkrttjj|j|jd|�}ntjj|j|�}tj	r�t
|tj�r�|jt
j��}n|S)NrzBsetuptools must be installed to install from a source distributionzsetup.py�subdirectory)�
setuptools�ImportErrorr	r]r}r~r�r[r<�PY2rV�	text_type�encode�sys�getfilesystemencoding)ror��
setup_file�setup_pyrMrMrNr�s

zInstallRequirement.setup_pycCs�|jst�|jr8tjd|j|jf�ntjd|j|jf�tjd7_z>|jdkr�tj	j
tj	j|jd��r�ttj	j|jd��n|j
}|jdt|j��}|jdt|j��}tjd	|d
g}|js|r&g}nFtj	j|jd�}tj	j|�s`tj|�nddg}t||d
|jd|jdddtjdd�Wdtjd8_X|js�tjjd|j��|_|j�ndS)Nz2Running setup.py (path:%s) egg_info for package %sz7Running setup.py (path:%s) egg_info for package from %s��
distributer�zdistribute.egg-info�__SETUP_PY__�__PKG_NAME__z-c�egg_infozpip-egg-infoz
--egg-base�cwd�
filter_stdout�show_stdoutF�
command_level�command_desczpython setup.py egg_infoz%(Name)s==%(Version)s)r[rGrvr�notifyr�r^�indentr}r~r�r�r�
_run_setup_py�replace�reprr��
executabler\r��makedirsr �_filter_install�
VERBOSE_DEBUGrYr;rWrX�pkg_infor�)ro�force_root_egg_info�script�egg_info_cmd�egg_base_option�egg_info_dirrMrMrN�run_egg_info!s8	 	4		
			zInstallRequirement.run_egg_infoa}
__file__ = __SETUP_PY__
from setuptools.command import egg_info
import pkg_resources
import os
import tokenize
def replacement_run(self):
    self.mkpath(self.egg_info)
    installer = self.distribution.fetch_build_egg
    for ep in pkg_resources.iter_entry_points('egg_info.writers'):
        # require=False is the change we're making:
        writer = ep.load(require=False)
        if writer:
            writer(self, ep.name, os.path.join(self.egg_info,ep.name))
    self.find_sources()
egg_info.egg_info.run = replacement_run
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))
cCsy|jdk	r5|jj|�s%dS|jj|�S|jsDt�|j|�}tjj|�sidSt	|�}|S)N)
ra�has_metadata�get_metadatar[rG�
egg_info_pathr}r~r�rO)rorHrJrMrMrN�
egg_info_databsz InstallRequirement.egg_info_datacs|jdkr|jr$|j}ntjj|jd�}tj|�}|jr�g}x
tj|�D]�\�}}x-tj	D]"}||kr�|j
|�q�q�Wx�t|�D]�}tjjtjj�|dd��s
tjjtjj�|dd��r|j
|�n|dks2|dkr�|j
|�q�q�W|j
�fdd	�|D��qjWd
d	�|D�}n|s�td||f��n|s�td||f��t|�dkr�|jd
dd��ntjj||d�|_ntjj|j|�S)Nzpip-egg-info�bin�python�Scriptsz
Python.exe�test�testscs%g|]}tjj�|��qSrM)r}r~r�)rR�dir)�rootrMrNrT�s	z4InstallRequirement.egg_info_path.<locals>.<listcomp>cSs%g|]}|jd�r|�qS)z	.egg-info)�endswith)rR�frMrMrNrT�s	z$No files/directories in %s (from %s)rQ�keycSs8|jtjj�tjjr3|jtjj�p6dS)Nr)�countr}r~r��altsep)rSrMrMrN�<lambda>�sz2InstallRequirement.egg_info_path.<locals>.<lambda>r)r`r\r[r}r~r��listdir�walkr�dirnames�remove�listr��extendr	rG�len�sort)rorH�base�	filenames�dirs�filesr�rM)r�rNr�ns6		''z InstallRequirement.egg_info_pathcCso|j|�}|sgSg}xI|j�D];}|j�}|s,|jd�rZq,n|j|�q,W|S)N�#)r��
splitlinesr|rr�append)rorHrJ�result�linerMrMrN�egg_info_lines�sz!InstallRequirement.egg_info_linescCs^t�}|jd�}|sAtjdt|jd���n|j|pPd�|j�S)NzPKG-INFOzNo PKG-INFO file found in %s�)rr�rr�rr��feed�close)ro�prJrMrMrNr��s	#zInstallRequirement.pkg_infocCs
|jd�S)Nzdependency_links.txt)r�)rorMrMrN�dependency_links�sz#InstallRequirement.dependency_linksz	\[(.*?)\]ccs�d}xx|jd�D]g}|jj|j��}|rO|jd�}qn|rx||krxtjd|�qn|VqWdS)Nzrequires.txtrQzskipping extra %s)r��_requirements_section_re�matchr��grouprr�)rorU�in_extrar�r�rMrMrN�requirements�szInstallRequirement.requirementsccs5x.|jjD] \}}|dkr
|Vq
q
WdS)Nz==)rYrn)ro�	qualifier�versionrMrMrN�absolute_versions�sz$InstallRequirement.absolute_versionscCs|j�dS)Nr�)r�)rorMrMrN�installed_version�sz$InstallRequirement.installed_versioncCsk|jst�|j}||jkrDtjd||jf�n#tjdt|j�||f�dS)Nz'Requested %s, but installing version %sz;Source in %s has version %s, which satisfies requirement %s)r[rGr�rYrr�r�r)ror�rMrMrN�assert_source_matches_version�s		z0InstallRequirement.assert_source_matches_versioncCs|js!tjd|j�dS|js0t�|js?t�|jjd�rUdSd|jkswtd|j��|js�dS|jjdd�\}}t	j
|�}|r�||j�}|r�|j|j�q|j|j�ndstd|j|f��dS)Nz>Cannot update repository at %s; repository location is unknownzfile:�+zbad url: %rrQrz+Unexpected version control type (in %s): %s)
r^r�infor[r\rGrrre�splitr�get_backend�obtain�export)ror�vc_typer^�backend�vcs_backendrMrMrN�update_editable�s(	"		z"InstallRequirement.update_editablecsd|j�s%td|jf��n|jp4|j}t|�}tjj|j	|j
��d}tjj|j	dj|j
�jd�dd���d}|jdt
jd�}|j
�d	}t|�}tjj|�}	tjj|�}
tjj|�}|	s|
rR|	r)|}n|}|j|�|jd
�r�x|jd
�j�D]4}
tjjtjj||
��}|j|�qaWq�|jd�r�|jd�r�|jd��ng�xz�fd
d�|jd�j�D�D]M}tjj|j	|�}|j|�|j|d�|j|d�q�Wq�n?|j	j|�r�|j|j	�tjjtjj|j	�d�}|j|d|�n�|r^t|d�}tjj|j�j��}|j�||j	kstd||j|j	f��|j|�tjjtjj|�d�}|j||j	�n3|r�x*tj j!|�D]}|j|�qwWn|jd�r5|j"d�r5x�|j#d�D]o}t$|�r�t%}nt&}|jtjj||��t'j(dkr�|jtjj||�d�q�q�Wn|jd�rJt)j*�}|j+t,|j-d���|j.d�rJx�|j/d�D]�\}}t$|�r�t%}nt&}|jtjj||��t'j(dkr�|jtjj||�d�|jtjj||�d�|jtjj||�d�q�q�WqJn|j0|�||_1dS)a�
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        z.Cannot uninstall requirement %s, not installedz	.egg-info�-Nr�z
.dist-infoz-py%sr�z.eggzinstalled-files.txtz
top_level.txtznamespace_packages.txtcs(g|]}|r|�kr|�qSrMrM)rRr�)�
namespacesrMrNrTs	z0InstallRequirement.uninstall.<locals>.<listcomp>z.pyz.pyczeasy-install.pthz./�rz;Egg-link %s does not match installed location of %s (at %s)�scripts�win32z.batzentry_points.txt�console_scriptsz.exez
.exe.manifestz
-script.py)2�check_if_existsr
rvrarb�UninstallPathSetr}r~r�r��egg_namerr�r;�PY_MAJORrr��addr�r�r�rr��dirname�add_pthr?�normcase�readliner|r�rG�pipr��uninstallation_paths�metadata_isdir�metadata_listdirrrrr��platformr&�SafeConfigParser�readfp�FakeFile�get_metadata_lines�has_section�itemsr�rg)ro�auto_confirm�dist�paths_to_remove�pip_egg_info_path�dist_info_path�debian_egg_info_path�easy_install_egg�develop_egg_link�pip_egg_info_exists�debian_egg_info_exists�dist_info_existsr��installed_filer~�
top_level_pkg�easy_install_pth�fh�link_pointerr��bin_dir�configrv�valuerM)r
rN�	uninstall�s�
(	
!
	
.
		*	  -
zInstallRequirement.uninstallcCs4|jr|jj�ntjd|jf�dS)Nz'Can't rollback %s, nothing uninstalled.)rg�rollbackr�errorr�)rorMrMrN�rollback_uninstallYs		z%InstallRequirement.rollback_uninstallcCs4|jr|jj�ntjd|jf�dS)Nz%Can't commit %s, nothing uninstalled.)rg�commitrr8r�)rorMrMrN�commit_uninstall`s		z#InstallRequirement.commit_uninstallcCs�|jst�d}d|j|jf}tjj||�}tjj|�rtdt	|�d�}|dkr�d}q|dkr�t
jdt	|��tj|�q|dkrt
|�}t
jd	t	|�t	|�f�tj||�qn|r�tj|dtj�}tjjtjj|j��}xtj|�D]�\}	}
}d
|
kr~|
jd
�nxl|
D]d}tjj|	|�}|j||�}
tj|jd|
d�}d|_|j|d�q�Wxb|D]Z}|tkrq�ntjj|	|�}|j||�}
|j||jd|
�q�WqSW|j�t
jd8_t
jdt	|��ndS)NTz	%s-%s.zipz/The file %s exists. (i)gnore, (w)ipe, (b)ackup �i�wr*FzDeleting %szBacking up %s to %szpip-egg-info�/i��r�r�zSaved %s)r<r=r*i�)r[rGrvr�r}r~r�r�rrrr�r�rr�r��zipfile�ZipFile�ZIP_DEFLATEDrr�r��_clean_zip_name�ZipInfo�
external_attr�writestrr�writer�r�r�)ror��create_archive�archive_name�archive_path�response�	dest_file�zipr��dirpathr�r�rrv�zipdirrHrMrMrN�archivegsN		!
	
#
zInstallRequirement.archivecCse|j|tjj�s/td||f��|t|�dd�}|jtjjd�}|S)Nz$name %r doesn't start with prefix %rrQr>)rrr}r~r�rGr�r�)rorv�prefixrMrMrNrC�s
z"InstallRequirement._clean_zip_namecs�|jr|j||�dS|jrztjj|j�}tjj||j�|j	|jd�d|�d|_
dStjdd�}t
jj|d�}z�tjg}|jd�|jd|j�|t|�d	d
|g7}|js|dg7}n�dk	r&|d�g7}n|jr?|d
g7}n
|dg7}t�r�|dt
jjtjdddt��g7}ntjd|j�tjd7_z*t||d|jd|jdd�Wdtjd8_Xt
jj|�stjd|�dSd|_
|jr$dS�fdd�}	t |�}
xN|
D]1}|j!�}|j"d�rI|	|�}PqIqIWtj#d|�dS|
j$�g}
t |�}
x[|
D]S}|j!�}t
jj%|�r�|t
jj&7}n|
jt'|	|�|��q�W|
j$�t t
jj|d�d�}
|
j(d j|
�d �|
j$�Wdt
jj|�rt
j)|�nt
j*|�XdS)!Nr��strip_file_prefixTz-recordzpip-zinstall-record.txtz-cz�import setuptools, tokenize;__file__=%r;exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))�installz--recordz#--single-version-externally-managedz--rootz	--compilez--no-compilez--install-headers�include�siter�zRunning setup.py install for %sr�r�r�r�FzRecord file %s not foundcs4�dkstjj|�r#|St�|�SdS)N)r}r~�isabsr)r~)r�rMrN�prepend_root�sz0InstallRequirement.install.<locals>.prepend_rootz	.egg-infoz;Could not find .egg-info directory in install record for %szinstalled-files.txtr=�
)+r\�install_editable�is_wheelrr��
wheel_versionr[�check_compatibilityrvr8rfr�r�r}r~r�r�r�r�r�r�r_rkrrQr)rr�r�r r�r�r?r|r�r�r�r�r�rrGr��rmdir)ro�install_options�global_optionsr�rRr��
temp_location�record_filename�install_argsrWr�r�r��	new_linesrHrM)r�rNrS�s�				
		
	
		


 
zInstallRequirement.installcCs�|jstjj|j�rWtjd|j�|jrKt|j�nd|_n|j	r�tjj|j	�r�t|j	�nd|_	dS)zVRemove the source files from this requirement, if they are marked
        for deletionzRemoving source in %sN)
�	is_bundler}r~r��delete_marker_filenamerrr[rrc)rorMrMrN�remove_temporary_source�s	z*InstallRequirement.remove_temporary_sourcecCs�tjd|j�tjd7_zWttjdd|jgt|�ddgt|�d|j	d|j
d	d
�Wdtjd8_Xd|_dS)NzRunning setup.py develop for %sr�z-cz�import setuptools, tokenize; __file__=%r; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))�developz	--no-depsr�r�r�FT)rr�rvr�r r�r�r�r�r[r�rf)ror^r_rMrMrNrYs7z#InstallRequirement.install_editablecCsatj}xKddddddddgD]+}tj||j��r(tj}Pq(q(W||fS)	Nz^running .*z^writing .*z^creating .*z^[Cc]opying .*z^reading .*z4^removing .*\.egg-info' \(and everything under it\)$z^byte-compiling z7^warning: manifest_maker: standard file '-c' not found$)r�NOTIFYr�r�r|�INFO)ror��level�regexrMrMrNr�s	
	z"InstallRequirement._filter_installcCs|jdkrdSyJ|jjdkrG|jrG|jjdkrGdStj|j�|_Wn�tjk
rxdSYn�tjk
rtj|jj�}|jr�t	|�r�||_q�t
�r�t|�r�td|j|j
f��q�n	||_YnXdS)z�Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.conflicts_with appropriately.NFr�r�TzVWill not install to the user site because it will lack sys.path precedence to %s in %s)rYr�rbr;�get_distributionrar�VersionConflictrhrrrr	r�)ro�
existing_distrMrMrNrs(		z"InstallRequirement.check_if_existscCs|jod|jkS)Nz.whl)r^)rorMrMrNrZ=szInstallRequirement.is_wheelcCsu|jdk	r|jS|j}|s)dStjjtjj|d��phtjjtjj|d��|_|jS)NFzpip-manifest.txtzpyinstall-manifest.txt)rdrcr}r~r�r�)ror�rMrMrNrdAs	!$zInstallRequirement.is_bundlec
csGx|jD]�}tjj|�}x�tjD]�}d}}tjj||j�}tjj|�r,|j	}t
|�}|j�}	|j�|�j
|	�\}}Pq,q,W|r�d|||f}nd}t||ddd|ddd|dd�Vq
Wx=|jD]2}tjj|�}t||d|dd�Vq
WdS)	Nz%s+%s@%sr\Tr^reFr[rj)�_bundle_editable_dirsr}r~�basenamer�backendsr��bundle_filer�rvr?r@r��parse_vcs_bundle_filerP�_bundle_build_dirs)
ro�dest_dir�packagerr^�rev�vcs_bundle_filerrI�contentrMrMrN�bundle_requirementsMs,
		
z&InstallRequirement.bundle_requirementsc
Cs�|j}|st�tjj|d�}tjj|d�}g}g}x#|||f|||fgD]\}}	}
tjj|�rjx�tj|�D]�}tjj|	|�}|
j|�tjj|�r�tj	d|||f�q�ntjj|	�s(tj
d|	�tj|	�ntj
tjj||�|�q�Wtj|�smtj|�qmqjqjWd|_||_||_dS)N�src�buildzZThe directory %s (containing package %s) already exists; cannot move source from bundle %szCreating directory %s)rcrGr}r~r�r�r�r�rr�rr�r�r�r]rtro)
ro�dest_build_dir�dest_src_dirr��src_dirr��bundle_build_dirs�bundle_editable_dirsr[ru�dir_collectionr�destrMrMrN�move_bundle_filesgs4	
	#		z$InstallRequirement.move_bundle_filescCsAt|j|j|d|jd|jd|d|jd|�dS)N�user�homer�rkrR)r8rvrYrhrirk)ro�wheeldirr�rRrMrMrNr8�s			z#InstallRequirement.move_wheel_filescCs%|jst�tjj|jt�S)N)r[rGr}r~r�r)rorMrMrNre�sz)InstallRequirement.delete_marker_filename).�__name__�
__module__�__qualname__rp�classmethodryr�r�r�r�r��propertyrvr�r�r�r�r�r�r�r�r�r��compiler�r�r�r�r�rr6r9r;rPrCrSrfrYr�rrZrdrzr�r8rerMrMrMrNrP?sV-*
?*
	n)]!
rPc@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�RequirementscCsg|_i|_dS)N)�_keys�_dict)rorMrMrNrp�s	zRequirements.__init__cCs|jS)N)r�)rorMrMrN�keys�szRequirements.keyscs�fdd��jD�S)Ncsg|]}�j|�qSrM)r�)rRr�)rorMrNrT�s	z'Requirements.values.<locals>.<listcomp>)r�)rorM)rorN�values�szRequirements.valuescCs
||jkS)N)r�)ro�itemrMrMrN�__contains__�szRequirements.__contains__cCs3||jkr"|jj|�n||j|<dS)N)r�r�r�)ror�r5rMrMrN�__setitem__�szRequirements.__setitem__cCs|j|S)N)r�)ror�rMrMrN�__getitem__�szRequirements.__getitem__cs0�fdd��j�D�}ddj|�S)Ncs0g|]&}dt|�t�|�f�qS)z%s: %s)r�)rR�k)rorMrNrT�s	z)Requirements.__repr__.<locals>.<listcomp>zRequirements({%s})z, )r�r�)ror�rM)rorN�__repr__�szRequirements.__repr__N)
r�r�r�rpr�r�r�r�r�r�rMrMrMrNr��sr�c
@sBeZdZddddddddddddd�Zdd�Zdd	�Zd
d�Zedd
��Zedd��Z	edd��Z
dd�Zddd�Zdd�Z
dddd�Zddd�Zdd�Zdd�Zddd d!�Zfd"d#�Zd$d%�Zd&Zd'd(�Zd)d*�ZdS)+�RequirementSetNFTcCs�||_||_||_|r6tjj|�}n||_||_||_|
|_	t
�|_i|_g|_
|	|_g|_g|_g|_||_||_||_|p�t�|_|
|_||_dS)N)r�r�download_dirr}r~�
expanduser�download_cache�upgrade�ignore_installed�force_reinstallr�r��requirement_aliases�unnamed_requirements�ignore_dependencies�successfully_downloaded�successfully_installed�reqs_to_cleanupr_rhrir-�sessionrk�wheel_download_dir)ror�rr�r�r�r�r_rir�r�rhr�rkr�rMrMrNrp�s,																	zRequirementSet.__init__cCsLdd�|jj�D�}|jddd��djdd�|D��S)NcSsg|]}|js|�qSrM)rZ)rRrYrMrMrNrT�s	z*RequirementSet.__str__.<locals>.<listcomp>r�cSs
|jj�S)N)rvr�)rYrMrMrNr��sz(RequirementSet.__str__.<locals>.<lambda>� cSsg|]}t|j��qSrM)r�rY)rRrYrMrMrNrT�s	)r�r�r�r�)ro�reqsrMrMrNr��szRequirementSet.__str__cCs�|j}|j|_|j|_|j|_|j|_|sR|jj|�ni|j|�r�td||j	|�|f��n||j
|<|j�|kr�||j|j�<ndS)Nz5Double requirement given: %s (already in %s, name=%r))
rvr_rhrirkr�r��has_requirementr	�get_requirementr�r�r�)ro�install_reqrvrMrMrN�add_requirement�s	
zRequirementSet.add_requirementcCsCx<||j�fD](}||jks7||jkrdSqWdS)NTF)r�r�r�)ror�rvrMrMrNr��szRequirementSet.has_requirementcCst|jj��p|jS)N)r�r�r�r�)rorMrMrN�has_requirements�szRequirementSet.has_requirementscCsJtdd�|jj�D��r&dStdd�|jD��rFdSdS)Ncss|]}|jVqdS)N)r\)rRrYrMrMrN�	<genexpr>�sz/RequirementSet.has_editables.<locals>.<genexpr>Tcss|]}|jVqdS)N)r\)rRrYrMrMrNr��sF)rmr�r�r�)rorMrMrN�
has_editables�s
"zRequirementSet.has_editablescCsg|jrctjj|j�|_tjj|j�r:dStjd�tdt|j���ndS)NTz!Could not find download directoryz0Could not find or access download directory '%s'F)	r�r}r~r�r�r�fatalr	r)rorMrMrN�is_download�s	
zRequirementSet.is_downloadcCslxU||j�fD]A}||jkr3|j|S||jkr|j|j|SqWtd|��dS)NzNo project with the name %r)r�r�r��KeyError)ror�rvrMrMrNr�szRequirementSet.get_requirementcCs8x1|jj�D] }|jd|�|j�qWdS)Nr#)r�r�r6r;)ror#rYrMrMrNr6szRequirementSet.uninstallcCs�t|j�}t|jj��}xc|s3|r�|rK|jd�}n|jd�}d}|jr�|jr�|j�|jr�|j	r�|j
o�t|j�s�|j|_nd|_q�d}n|jr�t
jd|�q�n|jr |jdkrE|j|j�|_qEn%|rE|j|j|j�|_n|jdk	r'tjj|j�r'td||jf��q'q'WdS)NrTFz<Requirement already satisfied (use --upgrade to upgrade): %sz�Could not install requirement %s because source folder %s does not exist (perhaps --no-download was used without first running an equivalent install with --no-install?))r�r�r�r��popr�r\rrar�rhrrbrr�r[r�rr�r�r}r~r�r	)ro�unnamedr��req_to_install�install_neededrMrMrN�locate_filess4
						%zRequirementSet.locate_filesc(Cs�t|j�}t|jj��}x�|s3|r�|rK|jd�}n|jd�}d}d}d}	|jr�|jr�|j�|jr`|j	rW|j
r|jry|j||j	�}
Wn?t
k
r�d}d}Yqtk
r
tj�d}	YqX|
j|_n|s]|jo6t|j�sH|j|_nd|_q]q`d}n|jr�|r�tjd|�q�tjd|�q�n|jr�tjd|�n^|r|jr|jj�jd	�rtjd
tt|j���qtjd|�ntjd7_zld}d}|jr�|jdkri|j|j�}
|
|_n	|j}
tjj |j!�s�t"|j!�n|j#|j$�|j$r�|j%�|j&|j'�q1|j%�nV|r1|j|j!|j$�}
d}d}
|j(rnWtjj tjj)|
d
��rUt*t+j,d||
f���n|jdkr�|	rs|	�n|j|d|j	�}
nt-|j�}
|
s�t.�|
rcyY|
j/j0t1�r�|j2r�|j2}d}n|j'}|j$}|j3|
|
||�Wqit4k
r_}z5tj5d||f�t6d|||
f��WYdd}~XqiXnd}|r1|j7}|
o�|
j/j0t1�}|r�|j8|j!|j�x�|j9�D] }|j:|�|j;|�q�Wn�|j$r3|
|_|s|j%�n|
r�|
j<t=j>kr�|j&|j'�q�ny|rQ|
|_|
j|_n[|
|_|j%�|r}|j%dd�n|j?�|r�|jr�|j@|�d}n|js�|j�n|jr.|j	s�|jr|jo�t|j�s|j|_nd|_q+tjd|�d}q.q1n|r�ttAjB|
��d}|jCsx|jD�|_C|j;|�n|jEsxd|jF|jG�D]M}|jH|jI�r�q�ntJtK|�|�}|j:|�|j;|�q�Wqn&|s|jL|jM�|jGr*tjddj)|jG��n|jEs�x�|j|jG�D]�}ytAjNjO|�jI}Wn?tPk
r�tj�d}tjQd|||f�wFYnX|jH|�r�qFntJ||�}|j:|�|j;|�qFWn|jH|jR�s|j;|�qn|sE|j$s/|jSdk	rE|jTj:|�qEn|r�|jUj:|�|r�|jr�|jjd�r�|j@|�q�nWdtjd8_Xq'WdS)zGPrepare process. Create temp directories, download and/or unpack files.rTFNrQz"Requirement already up-to-date: %sz<Requirement already satisfied (use --upgrade to upgrade): %szObtaining %szfile:zUnpacking %szDownloading/unpacking %sr�zsetup.pya�
                          pip can't proceed with requirement '%s' due to a pre-existing build directory.
                           location: %s
                          This is likely due to a previous installation that failed.
                          pip is being responsible and not assuming it can delete this.
                          Please delete it and try again.
                        r�z4Could not install requirement %s because of error %szDCould not install requirement %s because of HTTP error %s for URL %sr�z!Installing extra requirements: %r�,z.Invalid requirement: %r (%s) in requirement %szfile:///)Vr�r�r�r�r�r�r\rrar�r�r^�find_requirementrrr��exc_inforhrrbrr�r�rrrr0r�r[r�rr}r~r�r�r�rr�r�rPr�rjr�r�textwrap�dedentr+rGrHr�r:r��
unpack_urlr(r�r	rdr�rzr�r�r�r�all_schemesr��copy_to_build_dirr;�find_distributionsrY�as_requirementr��requiresrUr�r�rPr��add_dependency_linksr�rWrX�
ValueErrorr8rvrcr�r�)ro�finderr��bundler�r�r�rS�best_installed�	not_foundr^rdrZr�r�r��do_download�exc�e�subreqr$rYrvrMrMrN�
prepare_files:sV
		


					!#			

	!								)	
		
		


		
					
	 	

	!zRequirementSet.prepare_filescCs�tjd�tjd7_x|jD]}|j�q&Wg}|j�r_|j|j�n|rx|j|j�nx>|D]6}t	j
j|�rtjd|�t
|�qqWtjd8_dS)zClean up files, remove builds.zCleaning up...r�zRemoving temporary dir %s...N)rr�r�r�rf�_pip_has_created_build_dirr�r�rr}r~r�rr)ror�rY�
remove_dirr�rMrMrN�
cleanup_files's

zRequirementSet.cleanup_filescCs1|jtko0tjjtjj|jt��S)N)r�r,r}r~r�r�r)rorMrMrNr�>sz)RequirementSet._pip_has_created_build_dircCs�|jr|jp|j}tjd|j|f�tjj||j�}t	j
|j|�tdd|dgd|dd�dS)NzCopying %s to %sr�z%s/setup.py�cleanr�r�zpython setup.py clean)
r\rr�rrrvr}r~r�r��copytreer[r )ror�rir�rMrMrNr�Bsz RequirementSet.copy_to_build_dircCs�|dkr|j}nt|�rL|r3|}n|}t|||�nat|�r~t|||�|r�t|�q�n/t|||j||j�|r�t|�ndS)N)	r�r4r3r5r6rr7r�r�)ror�r�r��
only_download�locrMrMrNr�Js&	
zRequirementSet.unpack_urlc"Osdd�|jj�D�}tjjd�}xI|D]A}|jdkr5|j|kr5|j|�|j|�q5q5W|r�t	j
ddjdd�|D���nt	jd7_zCx<|D]4}|jd	kr0y=tjjd
�}	tj
d�}
|
|	kr|
|_nWq0tjk
r,Yq0Xn|jr�t	j
d|j�t	jd7_z|jdd
�Wdt	jd8_Xny|j||||�Wn+|jr�|jr�|j�n�Yn X|jr�|jr�|j�n|j�q�WWdt	jd8_X||_dS)zRInstall everything in this set (after having downloaded and unpacked the packages)cSsg|]}|js|�qSrM)ra)rRrrMrMrNrTks	z*RequirementSet.install.<locals>.<listcomp>zdistribute>=0.7r�z!Installing collected packages: %sz, cSsg|]}|j�qSrM)rv)rRrYrMrMrNrT{s	r�r�zdistribute<0.7zFound existing installation: %sr#TN)r�r�r;rWrXrvr�r�r�rr�r�r�rlrbrr6rSrfr9r;rfr�)ror^r_�args�kwargs�
to_install�distribute_reqrY�requirement�distribute_requirement�existing_distributerMrMrNrSisJ	

*
		

zRequirementSet.installcCs�tj|dtj�}g}xJ|jdf|jdffD]*\}}tjjtjj|��}x�tj	|�D]�\}}}x�t
jD]�}	|	�}
d}}|
j|kr�xR|D]}
|j
|
�r�Pq�q�W|
jtjj||��\}}|j|�|
j}|
ji|d6|d6}|j|
j�Pq�q�Wd|kre|jd�nxQ|D]I}tjj||�}|j||�}|j|d|dd�qlWx_|D]W}|tkr�q�ntjj||�}|j||�}|j||d|�q�W|rwtjj||�}|j||�}|j|d||�qwqwWq=W|jd	|j��|j�dS)
Nr=r|r{r^rwzpip-egg-infor>r�zpip-manifest.txt)r@rArBr�rr}r~rr�r�rrqrrr�get_infor�r�rr�guider�rCrFrrGrzr�)ro�bundle_filenamerM�vcs_dirsr�rprNr�r�rr�vcs_url�vcs_rev�vcs_dirrx�	vcs_guiderrvrHrMrMrN�
create_bundle�sL+	


	
 
#zRequirementSet.create_bundlez�# This is a pip bundle file, that contains many source packages
# that can be installed as a group.  You can install this like:
#     pip this_file.zip
# The rest of the file contains a list of all the packages included:
cCs�|jg}xAdd�|jj�D�D]#}|jd|j|jf�q)W|jd�xAdd�|jj�D�D]#}|jd|j|jf�qzWdj|�S)NcSsg|]}|js|�qSrM)rZ)rRrYrMrMrNrT�s	z6RequirementSet.bundle_requirements.<locals>.<listcomp>z%s==%s
zC# These packages were installed to satisfy the above requirements:
cSsg|]}|jr|�qSrM)rZ)rRrYrMrMrNrT�s	r�)�
BUNDLE_HEADERr�r�r�rvr�r�)ro�partsrYrMrMrNrz�s#!
#!z"RequirementSet.bundle_requirementscCse|j|tjj�s/td||f��|t|�dd�}|jtjjd�}|S)Nz$name %r doesn't start with prefix %rrQr>)rrr}r~r�rGr�r�)rorvrQrMrMrNrC�s
zRequirementSet._clean_zip_name)r�r�r�rpr�r�r�r�r�r�r�r�r6r�r�r�r�r�r�rSr�r�rzrCrMrMrMrNr��s2		
'�E7r�cCstj|�t|�dS)N)r}r�r)r�rMrMrNr��s
r�z^(http|https|file):c
cs|dkrt�}nd}|r-|jnd}|rKtj|�}ntjjtjj|��}t|d|d|�\}}xzt	|j
��D]f\}	}
|	d7}	|
j�}
tjdd|
�}
|
s�|
j
d�r�q�n|r|j|
�rq�n|
j
d�s&|
j
d�r�|
j
d�rN|
d	d�j�}n%|
td�d�j�jd
�}tj|�r�tj||�}n3tj|�s�tjjtjj|�|�}nx3t||d|d|d|�D]}|Vq�Wq�|
j
d�s|
j
d
�rq�|
j
d�s=|
j
d�r�|
j
d�re|
d	d�j�}
n%|
td�d�j�jd
�}
tjj||
�}
tjj|
�r�|
}
n|r|jj|
�qq�|
j
d�s�|
j
d�rY|
j
d�r|
d	d�j�}
n%|
td�d�j�jd
�}
|r|
g|_qq�|
j
d�r�|
td�d�j�jd
�}
|r|jj|
�qq�|
j
d�r�d|_q�|
j
d�r�g|_q�|
j
d�r:|
td�d�j�jd
�}
|jtt|
�j�g�O_q�|
j
d�rUd|_q�|
j
d�rgq�|
j
d�ryq�|
j
d�r�|
td�d�j�jd
�}
|j tt|
�j�g�O_ q�|
j
d�r/|
td�d�j�jd
�}
|j tt|
�j�g�O_ q�d||	f}|
j
d�s]|
j
d�r�|
j
d�r�|
d	d�j�}
n%|
td�d�j�jd
�}
t!j"|
d|d|r�|j#nd�}n$t!j$|
|d t%|d!d��}|Vq�WdS)"NrZr�rQz
(^|\s)#.*$r�r�z-rz
--requirementr��=�optionsz-Zz--always-unzipz-fz--find-linksz-iz--index-urlz--extra-index-urlz--use-wheelTz
--no-indexz--allow-externalz--allow-all-externalz--no-allow-externalz--no-allow-insecurez--allow-insecurez--allow-unverifiedz-r %s (line %s)z-ez
--editablerurl�pre)&r-�skip_requirements_regexr�r�r}r~rr�r.�	enumerater�r|�subrrr�r��
_scheme_rer#�urljoinr��parse_requirements�lstripr��
find_linksr��
index_urls�	use_wheel�allow_external�setr"r��allow_all_external�allow_unverifiedrPryrur��getattr)rHr�rZr�r��
skip_match�
skip_regex�
reqs_file_dirry�line_numberr��req_urlr��relative_to_reqs_filerYrMrMrNr�s�	
%$(%	%%%'%'%'%'$r�cCs.tjd|�}|r*|jd�}n|S)z2
        Strip req postfix ( -dev, 0.2, etc )
    z^(.*?)(?:-dev|-\d.*)$rQ)r�r�r�)rYr�rMrMrN�_strip_postfixgsrcCspdd�|jdd�djd�D�}d}|ddkrO|d}n|dd
krl|d}n|S)NcSsg|]}|r|�qSrMrM)rRr�rMrMrNrTts	z'_build_req_from_url.<locals>.<listcomp>r�rQrr>r��tags�branches�tag�branch��trunk���)ztagszbranchesztagzbranch������r)r)r^r�rYrMrMrN�_build_req_from_urlrs,

r
cCs{tjd�}|j|�}|rwt�}xC|D];}|\}}||kretd|��n|||<q4W|SdS)zz
        This method generates a dictionary of the query string
        parameters contained in a given editable URL.
    z([\?#&](?P<name>[^&=]+)=(?P<value>[^&=]+)z%s option already definedN)r�r��findall�dict�	Exception)rY�regexp�matched�ret�optionrvr5rMrMrN�_build_editable_options}s	
rc
Csm|}d}tjd|�}|rE|jd�}|jd�}n|}tjj|�r�tjjtjj|d��s�td|��nt	|�}n|j
�jd�r�|r�d|tj
jd|�jfSd|dfSnx;tD]3}|j
�jd	|�r�d
||f}Pq�q�Wd|kr_|rL|d|}q_td|��n|jdd�d
j
�}tj|�s�d|djdd�tjD��d}t|��nyt|�}	Wn8tk
rtj�d}
td||
f��YnX|	s"d|	krJt|�}|sTtd|��qTn
|	d}t|�}|||	fS)zSParses svn+http://blahblah@rev#egg=Foobar into a requirement
    (Foobar) and a URLNz^(.+)(\[[^\]]+\])$rQr�zsetup.pyz;Directory %r is not installable. File 'setup.py' not found.zfile:�__placeholder__z%s:z%s+%sr�zb%s should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+rzFor --editable=%s only z, cSsg|]}|jd�qS)z+URL)rv)rRrrMrMrNrT�s	z"parse_editable.<locals>.<listcomp>z is currently supportedz*--editable=%s error in editable options:%s�eggz@--editable=%s is not the right format; it must have #egg=Package)r�r�r�r}r~r�r�r�r	r1r�rrr;rWrXrUrrrrqrr
r�r�r
r)
rtrur^rU�m�
url_no_extras�version_controlr�
error_messager��messagerYrvrMrMrNrq�sT! 
$

rqc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
ddd�Zdd�Zdd�Z
dS)rzMA set of file paths to be removed in the uninstallation of a
    requirement.cCs@t�|_t�|_i|_||_d|_g|_dS)N)r��paths�_refuse�pthr$�save_dir�_moved_paths)ror$rMrMrNrp�s			zUninstallPathSet.__init__cCs
t|�S)zs
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        )r)ror~rMrMrN�
_permitted�szUninstallPathSet._permittedcCsFt|j�sBtjd|jjt|jj�tjf�dSdS)Nz1Not uninstalling %s at %s, outside environment %sFT)	rr$rr�r�rr�r�rQ)rorMrMrN�_can_uninstall�s
	&zUninstallPathSet._can_uninstallcCs�t|�}tjj|�s"dS|j|�rD|jj|�n|jj|�tjj|�ddkr�t	r�|jt
j|��ndS)NrQz.py)rr}r~r�rrrr�splitextr%�imp�cache_from_source)ror~rMrMrNr�s"zUninstallPathSet.addcCskt|�}|j|�rW||jkr@t|�|j|<n|j|j|�n|jj|�dS)N)rrr�UninstallPthEntriesrr)ro�pth_file�entryrMrMrNr�szUninstallPathSet.add_pthcsYt�}xIt|dt�D]5�t�fdd�|D��s|j��qqW|S)z�Compact a path set to contain the minimal number of paths
        necessary to contain all paths in the set. If /a/path/ and
        /a/path/to/a/file.txt are both in the set, leave only the
        shorter path.r�csJg|]@}�j|�oC�t|jtjj��tjjk�qSrM)rrr��rstripr}r~r�)rR�	shortpath)r~rMrNrT
s	z,UninstallPathSet.compact.<locals>.<listcomp>)r��sortedr�rmr)ror�short_pathsrM)r~rN�compacts	
zUninstallPathSet.compactcCs5tjj|jtjj|�djtjj��S)NrQ)r}r~r�r�
splitdriver�r�)ror~rMrMrN�_stashs	zUninstallPathSet._stashFcCs�|j�sdS|js4tjd|jj�dStjd|jj�tjd7_t|j|j��}z6|r�d}n-x|D]}tj|�q�Wt	dd�}|j
r�tjd�x*|j|j
�D]}tj|�q�Wn|dkr�tjd	d
dd�|_
xK|D]C}|j|�}tjd
|�|jj|�t||�q"Wx!|jj�D]}|j�qyWtjd|jj�nWdtjd8_XdS)z[Remove paths in ``self.paths`` with confirmation (unless
        ``auto_confirm`` is True).Nz7Can't uninstall '%s'. No files were found to uninstall.zUninstalling %s:r��yzProceed (y/n)? �nz.Not removing or modifying (outside of prefix):�suffixz
-uninstallrQzpip-zRemoving file or directory %szSuccessfully uninstalled %s)r.r/)r rrr�r$r�r�r)r+rrr�r�rr-rrr�rrr�r�)ror#rrKr~�new_pathrrMrMrNr�s<		
	

zUninstallPathSet.removecCs�|jdkr*tjd|jj�dStjd|jj�x>|jD]3}|j|�}tjd|�t	||�qKWx|j
D]}|j�q�WdS)z1Rollback the changes previously made by remove().Nz'Can't roll back %s; was not uninstalledFzRolling back uninstall of %szReplacing %s)rrr8r$r�r�rr-rrrr7)ror~�tmp_pathrrMrMrNr79szUninstallPathSet.rollbackcCs5|jdk	r1t|j�d|_g|_ndS)z?Remove temporary save dir: rollback will no longer be possible.N)rrr)rorMrMrNr:Fs
	zUninstallPathSet.commitN)r�r�r��__doc__rprr rrr+r-r�r7r:rMrMrMrNr�s	
%
rc@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
r$cCsGtjj|�s%td|��n||_t�|_d|_dS)Nz.Cannot remove entries from nonexistent file %s)r}r~r�r
r{r��entries�_saved_lines)ror%rMrMrNrpOs
	zUninstallPthEntries.__init__cCsatjj|�}tjdkrMtjj|�drM|jdd�}n|jj|�dS)Nr
r�\r>)	r}r~rr�rr,r�r4r)ror&rMrMrNrVs&zUninstallPthEntries.addcCs�tjd|j�t|jd�}|j�}||_|j�tdd�|D��rgd}nd}xR|jD]G}y,tjd|�|j	t
||��Wqwtk
r�YqwXqwWt|jd�}|j|�|j�dS)	NzRemoving pth entries from %s:r=css!|]}td�|kVqdS)z
N)r*)rRr�rMrMrNr�gsz-UninstallPthEntries.remove.<locals>.<genexpr>z
rXzRemoving entry: %s�wb)
rrr{r?�	readlinesr5r�rmr4r�r*r��
writelines)ror1�lines�endliner&rMrMrNr�`s"	
	
	
zUninstallPthEntries.removecCsk|jdkr'tjd|j�dStjd|j�t|jd�}|j|j�|j�dS)Nz.Cannot roll back changes to %s, none were madeFz!Rolling %s back to previous stater7T)r5rr8r{rr?r9r�)ror1rMrMrNr7us
zUninstallPthEntries.rollbackN)r�r�r�rprr�r7rMrMrMrNr$Ns
r$c@s:eZdZdZdd�Zdd�Zdd�ZdS)	rzQWrap a list of lines in an object with readline() to make
    ConfigParser happy.cCsdd�|D�|_dS)Ncss|]}|VqdS)NrM)rR�lrMrMrNr��sz$FakeFile.__init__.<locals>.<genexpr>)�_gen)ror:rMrMrNrp�szFakeFile.__init__cCsTy7yt|j�SWntk
r5|jj�SYnXWntk
rOdSYnXdS)Nr�)�nextr=�	NameError�
StopIteration)rorMrMrNr�s

zFakeFile.readlinecCs|jS)N)r=)rorMrMrN�__iter__�szFakeFile.__iter__N)r�r�r�r3rprrArMrMrMrNr�s	r)b�email.parserrr}r"rAr�r�r�r�r�r@�distutils.utilr�
pip.locationsrrrrr�pip.exceptionsr	r
rrr
rr�pip.vcsr�pip.logr�pip.utilrrrrrrrrrrrrrrr r!r"Zpip.backwardcompatr#r$r%r&r'r(r)r*�	pip.indexr+r,�pip.downloadr-r.r/r0r1r2r3r4r5r6r7�	pip.wheelrr8r9r:�pip._vendorr;r<rO�objectrPr�r�r�r��Ir�r�rr
rrqrr$rrMrMrMrN�<module>sT(4p:L���W��N	cA|2python3.4/site-packages/pip/__pycache__/download.cpython-34.pyc000064400000042765151735047220020311 0ustar00�
�Re4X�
@sMddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZmZmZddlmZmZddlmZmZmZmZmZmZmZmZmZddlmZddl m!Z!ddl"m#Z#m$Z$ddl%m&Z&dd	l'm(Z(m)Z)dd
l*m+Z+ddl,m-Z-m.Z.ddl/m0Z0dd
l1m2Z2ddddddddddg
Z3dd�Z4Gdd�de(�Z5Gdd�de6�Z7Gdd�de&�Z8Gd d!�d!e#j9�Z:ddd"d�Z;ej<d#ej=�Z>ej<d$ej=�Z?d%d�Z@d&d�ZAej<d'ej=�ZBej<d(ej=�ZCd)d�ZDd*d�ZEd+d,d�ZFd-d.�ZGd/d�ZHd0d�ZId1d2�ZJd3d4�ZKd5d6�ZLd7d8�ZMddd9d�ZNdd:d�ZOdS);�N)�urllib�urlparse�	raw_input)�InstallationError�HashMismatch)	�splitext�rmtree�format_size�display_path�
backup_dir�ask_path_exists�unpack_file�create_download_cache_folder�cache_download)�vcs)�logger)�requests�six)�BaseAdapter)�AuthBase�
HTTPBasicAuth)�IncompleteRead)�
InvalidURL�ChunkedEncodingError)�Response)�CaseInsensitiveDict�get_file_content�is_url�url_to_path�path_to_url�is_archive_file�unpack_vcs_link�unpack_file_url�
is_vcs_url�is_file_url�unpack_http_urlcCs5tj�}|dkr'tj�}n�|dkr�dtjjtjjtjjf}tjjdkr�dj	|tjjg�}q�n<|dkr�tj�}n!|dkr�tj�}nd}ytj
�}tj�}Wntk
rd}d}YnXd	j	d
t
jd||fd||fg�S)z,Return a string representing the user agent.�CPython�PyPyz%s.%s.%s�final��Jython�
IronPython�Unknown� zpip/%sz%s/%s)�platform�python_implementation�python_version�sys�pypy_version_info�major�minor�micro�releaselevel�join�system�release�IOError�pip�__version__)�_implementation�_implementation_version�p_system�	p_release�rA�'/tmp/pip-ztkk0jow-build/pip/download.py�
user_agent$s2	

rCc@sCeZdZddd�Zdd�Zdd�Zdd	�Zd
S)�MultiDomainBasicAuthTcCs||_i|_dS)N)�	prompting�	passwords)�selfrErArArB�__init__Hs	zMultiDomainBasicAuth.__init__cCs�tj|j�}|jjdd�d}tj|dd�|f|dd��|_|jj|d�\}}|dkr�|j|j�\}}n|s�|r�||f|j|<t|p�d|p�d�|�}n|j	d|j
�|S)N�@��r)�response���)NN)r�url�netloc�split�
urlunparserF�get�parse_credentialsr�
register_hook�
handle_401)rG�req�parsedrO�username�passwordrArArB�__call__Ls1$zMultiDomainBasicAuth.__call__cKs�|jdkr|S|js |Stj|j�}td|j�}tjd�}|s`|ry||f|j|j<n|j|j	j
�t|p�d|p�d�|j�}|j
j||�}|jj|�|S)Ni�z
User for %s: z
Password: r))�status_coderErrNrrO�getpassrF�content�raw�release_connr�request�
connection�send�history�append)rG�resp�kwargsrWrXrYrV�new_resprArArBrUhs	
$zMultiDomainBasicAuth.handle_401cCsLd|krH|jdd�d}d|kr>|jdd�S|dfSdS)NrIrJr�:)NN)�rsplitrP)rGrO�userinforArArBrS�s
z&MultiDomainBasicAuth.parse_credentialsN)�__name__�
__module__�__qualname__rHrZrUrSrArArArBrDFs"rDc@sOeZdZdd�Zdd�Zddddd�Zed	d
��ZdS)�LocalFSResponsecCs
||_dS)N)�fileobj)rGrorArArBrH�szLocalFSResponse.__init__cCst|j|�S)N)�getattrro)rG�namerArArB�__getattr__�szLocalFSResponse.__getattr__NFcCs|jj|�S)N)ro�read)rG�amt�decode_content�
cache_contentrArArBrs�szLocalFSResponse.readcs9Gdd�dt��G�fdd�dt�}|�S)Nc@s(eZdZdd�Zdd�ZdS)z7LocalFSResponse._original_response.<locals>.FakeMessagecSsgS)NrA)rG�headerrArArB�
getheaders�szBLocalFSResponse._original_response.<locals>.FakeMessage.getheaderscSsgS)NrA)rGrw�defaultrArArB�get_all�sz?LocalFSResponse._original_response.<locals>.FakeMessage.get_allN)rkrlrmrxrzrArArArB�FakeMessage�sr{cs(eZdZe�fdd��ZdS)z8LocalFSResponse._original_response.<locals>.FakeResponsecs��S)NrA)rG)r{rArB�msg�sz<LocalFSResponse._original_response.<locals>.FakeResponse.msgN)rkrlrm�propertyr|rA)r{rArB�FakeResponse�sr~)�object)rGr~rA)r{rB�_original_response�sz"LocalFSResponse._original_response)rkrlrmrHrrrsr}r�rArArArBrn�srnc@s7eZdZddddddd�Zdd�ZdS)�LocalFSAdapterNc
Cstj|j�}|jj�dkr=td|j��ntj|dd�d|dd��}t|�}	t�}
d|
_||
_t	j
|	�}tjj
|jdd�}titj|	�d	p�d
d6|jd6|d
6�|
_tt|	d��|
_|
jj|
_|
S)N�	localhostz)Invalid URL %r: Only localhost is allowedrJr)rK���usegmtTrz
text/plainzContent-TypezContent-Lengthz
Last-Modified�rb)r))rrNrO�lowerrrQrrr[�os�stat�email�utils�
formatdate�st_mtimer�	mimetypes�
guess_type�st_size�headersrn�openr^�close)
rGr`�stream�timeout�verify�cert�proxies�
parsed_url�real_url�pathnamere�stats�modifiedrArArBrb�s$+			
zLocalFSAdapter.sendcCsdS)NrA)rGrArArBr��szLocalFSAdapter.close)rkrlrmrbr�rArArArBr��sr�cs:eZdZdZ�fdd�Z�fdd�Z�S)�
PipSessionNcsLtt|�j||�t�|jd<t�|_|jdt��dS)Nz
User-Agentzfile://)	�superr�rHrCr�rD�auth�mountr�)rG�argsrf)�	__class__rArBrH�szPipSession.__init__cs~tj|�}|jdkrLtj|dd�d|dd��}n|jd|j�tt|�j||||�S)N�filerJr�rKr�)z	localhost)r�schemerQ�
setdefaultr�r�r�r`)rG�methodrNr�rfrW)r�rArBr`�s
.zPipSession.request)rkrlrmr�rHr`rArA)r�rBr��sr�c
Cs�|dkrt�}ntj|�}|rq|jd�j�}|dkr||r||jd�r|td||f��n|dkr,|jdd�d}|jdd�}t	j
|�}|r�|jd�d|jd	d�d}ntj|�}|jd�r#d|j
d�}n|}qq|j|�}|j�tjr^|j|jfS|j|jfSnyt|�}|j�}Wn8tk
r�tj�d}	td
t|	���YnX|j�||fS)z�Gets the content of a file; it may be a filename, file: URL, or
    http: URL.  Returns (location, content).  Content is unicode.NrJr��httpz6Requirements file %s references URL %s, which is localrh�\�/�|z$Could not open requirements file: %s)r��
_scheme_re�search�groupr��
startswithrrP�replace�_url_slash_drive_re�matchr�unquote�lstriprR�raise_for_statusr�PY3rN�textr]r�rsr:r1�exc_info�strr�)
rN�
comes_from�sessionr�r��pathre�fr]�erArArBr�sB*	
	

z^(http|https|file):z/*([a-z])\|cCsId|krdS|jdd�dj�}|ddddgtjkS)	z)Returns true if the name looks like a URLrhFrJrr��httpsr��ftp)rPr�r�all_schemes)rqr�rArArBr scCs�|jd�std|��|td�d�jd�}tj|�}tj|�r{|dd|dd�}n
d|}|S)z(
    Convert a file: URL to a path.
    zfile:z4You can only turn file: urls into filenames (not %r)Nr�rrhrK)r��AssertionError�lenr�rr��
_url_drive_rer�)rNr�rArArBr(s

z	^([a-z]):z^([a-z])[:|]cCs�tjjtjj|��}tjj|�\}}|jtjj�}djdd�|D��}|s|jd�}nd||S)zh
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    r�cSsg|]}tj|��qSrA)r�quote)�.0�partrArArB�
<listcomp>Cs	zpath_to_url.<locals>.<listcomp>zfile:///)	r�r��normpath�abspath�
splitdriverP�sepr7r�)r��drive�filepathrNrArArBr;scCs0d}t|�dj�}||kr,d	Sd
S)z9Return True if `name` is a considered as an archive file.�.zip�.tar.gz�.tar.bz2�.tgz�.tar�	.pybundle�.whlrJTF)r�r�r�r�r�r�r�)rr�)rq�archives�extrArArBr IsFcCs3t|�}|r"|j|�n
|j|�dS)N)�_get_used_vcs_backend�export�unpack)�link�location�
only_download�vcs_backendrArArBr!SscCs=x6tjD]+}|j|jkr
||j�}|Sq
WdS)N)r�backendsr��schemesrN)r��backendr�rArArBr�[sr�cCstt|��S)N)�boolr�)r�rArArBr#bscCs|jj�jd�S)Nzfile:)rNr�r�)r�rArArBr$fscCs�|jtj|j�jkrQtjd|j||jf�td|��n|j�|jkr�tjd||j�|jf�td|j|f��ndS)NzPHash digest size of the package %d (%s) doesn't match the expected hash name %s!z!Hash name mismatch for package %sz?Hash of the package %s (%s) doesn't match the expected hash %s!zBad %s hash for package %s)	�digest_size�hashlib�new�	hash_namer�fatalr�	hexdigest�hash)�
download_hashr�rArArB�_check_hashjs		r�cCs�ytj|j�}Wn6ttfk
rNtjd|j|f�dSYnXt|d�}x*|jd�}|szPn|j	|�qaW|j
�|S)Nz'Unsupported hash name %s for package %sr�i)r�r�r��
ValueError�	TypeErrorr�warnr�rs�updater�)�target_filer�r��fp�chunkrArArB�_get_hash_from_fileus	
r�cst|d�}d}|jro|jroytj|j�}Wqotk
rktjd|j|f�YqoXnyt�j	d�}Wn!tt
tfk
r�d}YnXd}|dkp�|}|j}z |r|r�tj
d|t|�f�q tj
d|�ntjd	|�tjd
|��fdd�}	x�|	d
�D]�}
|t|
�7}|r�|s�tjdt|��q�tjdd||t|�f�n|dk	r�|j|
�n|j|
�qPW|j�Wd|rtjdt|��nX|S)N�wbz'Unsupported hash name %s for package %szcontent-lengthr�(i�zDownloading %s (%s): zDownloading %s (unknown size): zDownloading %szDownloading from URL %sc3s�ydy,x%�jj|dd�D]}|VqWWn1tk
rb}zt|��WYdd}~XnXWn:tk
r�x%�jj|�}|s�Pn|VqwWYnXdS)NruF)r^r�rr�AttributeErrorrs)�
chunk_sizer�r�)rerArB�	resp_read�s
#
z _download_url.<locals>.resp_readiz%sz	%3i%%  %s�dz
%s downloadedi@�)r�r�r�r�r�r�rr��intr��KeyErrorr��show_url�start_progressr	�notify�infor��
show_progressr��writer��end_progress)rer��
temp_locationr�r��total_length�
downloadedr�r�r�r�rA)rerB�
_download_url�sF
"	 (rcCsd}tjj||j�}tjj|�r�tdt|�d
�}|dkr^d}q�|dkr�tjdt|��tj	|�q�|dkr�t
|�}tjdt|�t|�f�tj||�q�n|rtj
||�tjd	t|��ndS)NTz/The file %s exists. (i)gnore, (w)ipe, (b)ackup �i�w�bFzDeleting %szBacking up %s to %szSaved %s)rrr)r�r�r7�filename�existsrr
rr��remover�shutil�move�copyr�)r	r��content_typer�r�download_locationrL�	dest_filerArArB�
_copy_file�s&		rc)Cs�|dkrt�}ntjdd�}d}|jjdd�d}d}d}	d}
d}|r�tjj|tj	|d��}	|	d}
tjj
|	�o�tjj
|
�}tjj|�s�t|�q�nd}|rtjj||j
�}tjj
|�sd}qn|r�|}tj|�d}
tjd	|�|jr�t||�}yt||�Wq�tk
r�tjd
|�d}tj|�d}Yq�Xq�n|r�|r�t|
��}|j�j�}
WdQX|	}tjd|	�|jr�|jr�t|	|�}yt||�Wq�tk
r�tjd|�d}tj|	�tj|
�d}Yq�Xq�n|s-y#|j|d
d�}|j�WnHtjk
r�}z%tj d|j!j"|f��WYdd}~XnX|j#jdd�}
|j
}|j#jd�}|r^t$j%|�\}}|jd�pX|}nt&|�d}|s�tj'|
�}|r�||7}q�n|r�|j|jkr�tjj&|j�d}|r�||7}q�ntjj||�}t(|||�}|jr-|jr-t||�q-n|rP|rPt)|||
|�nt*|||
|�|	r�|r�t+|	||
�n|p�|s�tj|�ntj,|�dS)Nz-unpackzpip-�#rJrFr)z
.content-typezFile was already downloaded %sz;Previously-downloaded file %s has bad hash, re-downloading.zUsing download cache from %sz,Cached file %s has bad hash, re-downloading.r�TzHTTP error %s while getting %szcontent-typezcontent-dispositionr	)-r��tempfile�mkdtemprNrPr�r�r7rr�r
�isdirrr	r�r�rr�r�r�r�rr��unlinkr�rs�stripr�rRr�r�	HTTPErrorr�rLr[r��cgi�parse_headerr�guess_extensionrrr
r�rmdir)r�r��download_cache�download_dirr��temp_dirr�
target_url�already_cached�
cache_file�cache_content_type_filer��already_downloadedrr�re�excr	�content_disposition�type�paramsr�rArArBr%�s�
	





		

c

Cs�t|j�}d}tjj|�r`tjj|�rFt|�ntj||dd�dS|jr�t	||�}t
||�n|rMtjj||j�}tjj
|�rMtj|�d}tjd|�|jrAt	||�}yt
||�d}WqGtk
r=tjd|�tj|�YqGXqJd}qMn|r\|}	n|}	tj|	�d}t|	|||�|r�|r�t|	|||�ndS)NF�symlinksTrzFile was already downloaded %sz;Previously-downloaded file %s has bad hash, re-downloading.)r�url_without_fragmentr�r�rrr�copytreer�r�r�r7r	r
r�r�rr�rr�rr
r)
r�r�r�	link_pathr%�link_path_hash�
download_pathrr��	from_pathrArArBr"RsB
		


	
)Pr�email.utilsr�r�r\r�r�r.�rerr1rr;Zpip.backwardcompatrrr�pip.exceptionsrr�pip.utilrrr	r
rrr
rr�pip.vcsr�pip.logr�pip._vendorrrZpip._vendor.requests.adaptersrZpip._vendor.requests.authrrZpip._vendor.requests.compatrZpip._vendor.requests.exceptionsrrZpip._vendor.requests.modelsrZpip._vendor.requests.structuresr�__all__rCrDrrnr��Sessionr�r�compile�Ir�r�rr�	_drive_rer�rr r!r�r#r$r�r�rrr%r"rArArArB�<module>sh@	"M#,
<ypython3.4/site-packages/pip/__pycache__/wheel.cpython-34.pyc000064400000041422151735047220017573 0ustar00�
�Re@Q�@sZdZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZddlmZmZddlmZmZddlmZdd	lmZdd
lmZddlmZmZmZddlm Z dd
l!m"Z"ddlm Z dZ#d0Z$dd1dd�Z%ye&dd�Z'Wne(k
r�dd�Z'YnXdd�Z)dd�Z*ej+dej,�Z-dd�Z.dd�Z/d ddd!ddd"d#�Z0d$d%�Z1e1d&d'��Z2d(d)�Z3d*d+�Z4Gd,d-�d-e5�Z6Gd.d/�d/e5�Z7dS)2zH
Support for installing and building the "wheel" binary package format.
�)�with_statementN)�urlsafe_b64encode)�Parser)�ConfigParser�StringIO)�InvalidWheelFilename�UnsupportedWheel)�distutils_scheme)�logger)�
pep425tags)�call_subprocess�normalize_path�make_path_relative)�
pkg_resources)�ScriptMakerz.whl��sha256�c
Cs�tj|�}d}t|d��O}|j|�}x6|rn|t|�7}|j|�|j|�}q9WWdQXdt|j��jd�j	d�}||fS)z6Return (hash, length) for path using hashlib.new(algo)r�rbNzsha256=�latin1�=)
�hashlib�new�open�read�len�updater�digest�decode�rstrip)�path�algo�	blocksize�h�length�f�blockr�r'�$/tmp/pip-ztkk0jow-build/pip/wheel.py�rehash"s	
(r)cCs t|t�r|jd�S|S)N�ascii)�
isinstance�unicode�encode)�sr'r'r(�binary1s
r/cCs t|t�r|jd�SdS)Nr*)r+�strr-)r.r'r'r(r/6scCsItjddkr"i}d}nidd6}d}t||||�S)Nr��b��newline)�sys�version_infor)�name�mode�nl�binr'r'r(�open_for_csv:s	
r;cCs�tjj|�r�t|d�}zj|j�}|jtd��sIdStjj	tj
��}td�|ttj�}|j�}Wd|j
�Xt|d�}z|j|�|j|�Wd|j
�XdSdS)zLReplace #!python with #!/path/to/python
    Return True if file was changed.rz#!pythonFz#!N�wbT)�osr �isfiler�readline�
startswithr/r5�
executabler-�getfilesystemencoding�linesepr�close�write)r �script�	firstline�exename�restr'r'r(�
fix_scriptCs 
rJzZ^(?P<namever>(?P<name>.+?)(-(?P<ver>\d.+?))?)
                                \.dist-info$cCs�|jdd�}x�tj|�D]�}tj|�}|r"|jd�|kr"ttjj||d���:}x0|D](}|j	�j
�}|dkrzdSqzWWdQXq"q"WdS)	zP
    Return True if the extracted wheel in wheeldir should go into purelib.
    �-�_r7�WHEELzroot-is-purelib: trueTNF)�replacer=�listdir�dist_info_re�match�grouprr �join�lowerr)r7�wheeldir�name_folded�itemrQ�wheel�liner'r'r(�root_is_purelib]s!
rZc
Cs�tjj|�siifSt|��N}t�}x.|D]&}|j|j��|jd�q;W|jd�WdQXtj	�}|j
|�i}i}|jd�r�t|j
d��}n|jd�r�t|j
d��}n||fS)N�
r�console_scripts�gui_scripts)r=r �existsrrrE�strip�seekr�RawConfigParser�readfp�has_section�dict�items)�filename�fp�datarY�cp�console�guir'r'r(�get_entrypointsms"
	

rlFTc	$s(|s't|d|d|d|�}nt|��rC|d�n
|d�g�g��jtjj�tjj}	i�t��g}
|r�tj|	dddd�nd	d
��d�����fdd
��	dd���	�
fdd�}||	�d��s#t	d�
��tjj
�dd�}t|�\����fdd�}
x��D]�}d}d}x�tjtjj
�|��D]e}d}|dkr�t
}|
}ntjj
�||�}	||}||	|dd|d|�q�WqjWtd|d��td2��_d�_�fdd�}|�_d�_�jdd�}|rSdtjkr�d|}|
j�j|��ntjjdd�d kr�d!tjdd"�|f}|
j�j|��nd!tjdd#�|f}|
j�j|��d$d%��D�}x|D]
}�|=q?Wn�jd&d�}|r�dtjkr�d'|}|
j�j|��nd(tjdd#�|f}|
j�j|��d)d%��D�}x|D]
}�|=q�Wnt��dkr<|
j�jd*d%��j�D���nt��dkr�|
j�jd+d%��j�D�idd,6��ntjj
�dd-�}tjj
�dd.�}t|d/��M}t|d0��5}tj|�}tj |�}xj|D]b} �j| d| d�| d<| d�krTt!| d�\| d"<| d1<n|j"| �q�Wxu|
D]m}!t!|!�\}"}#|r�|!j#|�r�tjj
tjtjj$|!|��}!n|j"|!|"|#f�qlWx(�D] }!|j"�|!ddf�q�WWdQXWdQXt%j&||�dS)3zInstall a wheel�user�home�root�purelib�platlib�forceT�quietcSst||�jtjjd�S)N�/)rrNr=r �sep)�src�pr'r'r(�normpath�sz"move_wheel_files.<locals>.normpathFcsB�|��}�|��}|�|<|r>�j|�ndS)z6Map archive RECORD paths to installation RECORD paths.N)�add)�srcfile�destfile�modified�oldpath�newpath)�changed�	installed�lib_dirrxrUr'r(�record_installed�s

z*move_wheel_files.<locals>.record_installedNcs&tjj|�s"tj|�nx�tj|�D]�\}}}|t|�d�jtjj�}tjj||�}	|r�|j	tjjd�dj
d�r�q2nx�|D]�}
tjj|||
�}|r|dkr|j
d�r�j|
�q�q�|r�|
j
d�r�|
j�j
�jjdd�j��r��sWtd���j|�q�q�Wx�|D]�}|r�||�r�qrntjj||�}
tjj|||�}tjj|	�s�tj|	�ntj|
|�d	}|r
||�}n�|
||�qrWq2WdS)
Nrrz.datar3z
.dist-inforKrLzMultiple .dist-info directoriesF)r=r r^�makedirs�walkr�lstriprurS�split�endswith�appendrTr@�project_namerN�AssertionError�shutil�copy2)�source�dest�is_base�fixer�filter�dir�subdirs�files�basedir�destdirr.�
destsubdirr%rzr{r)�	data_dirs�info_dirr��reqr'r(�clobber�s:%+
!
*
z!move_wheel_files.<locals>.clobberz!%s .dist-info directory not foundrzentry_points.txtcs�|j�jd�r(|dd�}nV|j�jd�rP|dd�}n.|j�jd�rx|dd�}n|}|�kp�|�kS)	Nz.exe�z
-script.py�
z.pya���i����r�)rTr�)r7�	matchname)rjrkr'r(�is_entrypoint_wrapper�sz/move_wheel_files.<locals>.is_entrypoint_wrapper�scriptsr�r�r3cs6�ji|jd6|jjd�dd6|jd6S)N�module�.r�import_name�func)�script_template�prefix�suffixr�)�entry)�makerr'r(�_get_script_text	s	
z*move_wheel_files.<locals>._get_script_textz�# -*- coding: utf-8 -*-
import re
import sys

from %(module)s import %(import_name)s

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
�pip�ENSUREPIP_OPTIONSzpip = �
altinstallz
pip%s = %srr1cSs(g|]}tjd|�r|�qS)zpip(\d(\.\d)?)?$)�rerQ)�.0�kr'r'r(�
<listcomp>Js	z$move_wheel_files.<locals>.<listcomp>�easy_installzeasy_install = zeasy_install-%s = %scSs(g|]}tjd|�r|�qS)zeasy_install(-\d\.\d)?$)r�rQ)r�r�r'r'r(r�Vs	cSsg|]}d|�qS)z%s = %sr')r��kvr'r'r(r�]s	cSsg|]}d|�qS)z%s = %sr')r�r�r'r'r(r�_s	rk�RECORDz
RECORD.pip�rzw+�)r3)'r	rZrr=r ru�set�
compileall�compile_dirr�rSrlrOrJr�variants�set_moder�r��pop�environ�extend�make�getr5�versionr�
make_multiplerer;�csv�reader�writerr)�writerowr@�relpathr��move)$r7r�rUrmrnro�	pycompile�scheme�strip_file_prefixr��	generatedr��ep_filer��datadirr�r��subdirr�r��
pip_script�spec�pip_epr��easy_install_script�easy_install_ep�record�temp_record�	record_in�
record_outr�r��rowr%r#�lr')rrjr�rkr�r�r�r�rxr�r�rUr(�move_wheel_files�s�!

	!!(
%	
$		
	#



,6
!
*
*r�cs%tj���fdd��}|S)Nc?sHt�}x8�||�D]'}||kr|j|�|VqqWdS)N)r�ry)�args�kw�seenrW)�fnr'r(�uniquevs
	
z_unique.<locals>.unique)�	functools�wraps)r�r�r')r�r(�_uniqueus!r�ccs�ddlm}tj||jd���}x�|D]}tjj|j|d�}|V|j	d�r5tjj
|�\}}|dd�}tjj||d�}|Vq5q5WdS)	a
    Yield all the uninstallation paths for dist based on RECORD-without-.pyc

    Yield paths to all the files in RECORD. For each .py file in RECORD, add
    the .pyc in the same directory.

    UninstallPathSet.add() takes care of the __pycache__ .pyc.
    r)�FakeFiler�z.pyNr1z.pyc���)�pip.reqr�r�r��get_metadata_linesr=r rS�locationr�r�)�distr�r�r�r �dnr��baser'r'r(�uninstallation_paths�s

r�cCs�yzdd�tjd|�D�d}|jd�}t�j|�}|dj�}ttt|j	d���}|SWndSYnXdS)	z�
    Return the Wheel-Version of an extracted wheel, if possible.

    Otherwise, return False if we couldn't parse / extract it.
    cSsg|]}|�qSr'r')r��dr'r'r(r��s	z!wheel_version.<locals>.<listcomp>NrrMz
Wheel-Versionr�F)
r�find_on_path�get_metadatar�parsestrr_�tuple�map�intr�)�
source_dirr��
wheel_datar�r'r'r(�
wheel_version�s#r�cCs�|std|��n|dtdkrXtd|djtt|��f��n2|tkr�tjddjtt|���ndS)a�
    Raises errors or warns if called with an incompatible Wheel-Version.

    Pip should refuse to install a Wheel-Version that's a major series
    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
    installing a version only minor version ahead (e.g 1.2 > 1.1).

    version: a 2-tuple representing a Wheel-Version (Major, Minor)
    name: name of wheel or package to raise exception about

    :raises UnsupportedWheel: when an incompatible Wheel-Version is given
    z(%s is in an unsupported or invalid wheelrzB%s's Wheel-Version (%s) is not compatible with this version of pipr�z*Installing from a newer Wheel-Version (%s)N)r�VERSION_COMPATIBLErSr�r0r
�warn)r�r7r'r'r(�check_compatibility�s
%	r�c@sUeZdZdZejdej�Zdd�Zddd�Z	ddd	�Z
dS)
�WheelzA wheel filez�^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))
                ((-(?P<build>\d.*?))?-(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)
                \.whl|\.dist-info)$cs��jj|�}|s+td|��n|�_|jd�jdd��_|jd�jdd��_|jd�jd��_	|jd�jd��_
|jd	�jd��_t�fd
d��j	D���_
dS)
zX
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        z!%s is not a valid wheel filename.r7rLrK�ver�pyverr��abi�platc3s>|]4}�jD]$}�jD]}|||fVqqqdS)N)�abis�plats)r��x�y�z)�selfr'r(�	<genexpr>�sz!Wheel.__init__.<locals>.<genexpr>N)�
wheel_file_rerQrrfrRrNr7r�r��
pyversionsrrr��	file_tags)rrf�
wheel_infor')rr(�__init__�s	zWheel.__init__NcsH�dkrtj�n�fdd�|jD�}|rDt|�SdS)a"
        Return the lowest index that one of the wheel's file_tag combinations
        achieves in the supported_tags list e.g. if there are 8 supported tags,
        and one of the file tags is first in the list, then return 0.  Returns
        None is the wheel is not supported.
        Ncs+g|]!}|�kr�j|��qSr')�index)r��c)�tagsr'r(r��s	z+Wheel.support_index_min.<locals>.<listcomp>)r�supported_tagsr	�min)rr�indexesr')rr(�support_index_min�szWheel.support_index_mincCs4|dkrtj}ntt|�j|j��S)z'Is this wheel supported on this system?N)rr�boolr��intersectionr	)rrr'r'r(�	supported�szWheel.supported)�__name__�
__module__�__qualname__�__doc__r��compile�VERBOSErrrrr'r'r'r(r��sr�c@s@eZdZdZggdd�Zdd�Zdd�ZdS)	�WheelBuilderz#Build wheels from a RequirementSet.cCs7||_||_t|�|_||_||_dS)N)�requirement_set�finderr
�	wheel_dir�
build_options�global_options)rrrrr r!r'r'r(r�s
			zWheelBuilder.__init__cCs�tjdd|jgt|j�}tjd|j�tjd|j�|dd|jg|j	}y!t
|d|jdd	�d
SWn tjd|j�d	SYnXdS)
zBuild one wheel.z-czjimport setuptools;__file__=%r;exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))z#Running setup.py bdist_wheel for %szDestination directory: %s�bdist_wheelz-d�cwd�show_stdoutFTzFailed building wheel for %sN)
r5rA�setup_py�listr!r
�notifyr7rr rr��error)rr��	base_args�
wheel_argsr'r'r(�
_build_ones	
zWheelBuilder._build_onecCs5|jj|j�|jjj�}dd�|D�}|sBdStjddjdd�|D���tjd7_gg}}x:|D]2}|j	|�r�|j
|�q�|j
|�q�Wtjd8_|rtjdd	jd
d�|D���n|r1tjdd	jdd�|D���ndS)
z
Build wheels.cSsg|]}|js|�qSr')�is_wheel)r�r�r'r'r(r�s	z&WheelBuilder.build.<locals>.<listcomp>Nz*Building wheels for collected packages: %s�,cSsg|]}|j�qSr')r7)r�r�r'r'r(r�#s	r�zSuccessfully built %s� cSsg|]}|j�qSr')r7)r�r�r'r'r(r�0s	zFailed to build %scSsg|]}|j�qSr')r7)r�r�r'r'r(r�2s	)r�
prepare_filesr�requirements�valuesr
r'rS�indentr+r�)r�reqset�buildset�
build_success�
build_failurer�r'r'r(�builds&

*zWheelBuilder.buildN)rrrrrr+r7r'r'r'r(r�sr)rri)8r�
__future__rr�r�r�rr=r�r�r5�base64r�email.parserrZpip.backwardcompatrr�pip.exceptionsrr�
pip.locationsr	�pip.logr
r�r�pip.utilrr
r�pip._vendorr�pip._vendor.distlib.scriptsr�	wheel_extr�r)r,r/�	NameErrorr;rJrrrPrZrlr�r�r�r�r��objectr�rr'r'r'r(�<module>sT

		�2python3.4/site-packages/pip/__pycache__/index.cpython-34.pyc000064400000074526151735047230017612 0ustar00�
�Reӝ�@s�dZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZddl
mZmZmZmZmZddlmZmZddlmZmZmZddlmZmZdd	lmZmZm Z dd
l!m"Z"m#Z#m$Z$ddl%m&Z&dgZ'd
Z(idgd6Z)Gdd�de*�Z+Gdd�de*�Z,Gdd�de*�Z-Gdd�de*�Z.e.e	�Z/dd�Z0dd�Z1dS)z!Routines related to PyPI, indexes�N)�logger)�Inf�normalize_name�splitext�
is_prerelease)�DistributionNotFound�BestVersionAlreadyInstalled�InstallationError�InvalidWheelFilename�UnsupportedWheel)�urlparse�url2pathname)�
PipSession�url_to_path�path_to_url)�Wheel�	wheel_ext)�supported_tags�supported_tags_noarch�get_platform)�html5lib�requests�
pkg_resources)�SSLError�
PackageFinderzlast.pypi.python.org�https�httpc	@seZdZdZdggdddddd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zej
d�Zej
dej�Zej
d�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�ZdS)$rz�This finds packages.

    This is meant to match easy_install's technique for looking for
    packages, by reading pages and looking for appropriate links
    TFNc

Cs�||_||_g|_t�|_t�|_||_tdd�|D��|_tdd�|D��|_	|j|j	O_||_
d|_d|_||_
||_d|_|	p�t�|_dS)Ncss|]}t|�VqdS)N)r)�.0�n�r�$/tmp/pip-ztkk0jow-build/pip/index.py�	<genexpr>4sz)PackageFinder.__init__.<locals>.<genexpr>css|]}t|�VqdS)N)r)rrrrr r!8sF)�
find_links�
index_urls�dependency_links�	PageCache�cache�set�logged_links�	use_wheel�allow_external�allow_unverified�allow_all_external�need_warn_external�need_warn_unverified�allow_all_prereleases�process_dependency_links�_have_warned_dependency_linksr�session)
�selfr"r#r)r*r+r,r/r0r2rrr �__init__&s"										zPackageFinder.__init__cCsE|jrA|js.tjdd�d|_n|jj|�ndS)Nz1.6zpDependency Links processing has been deprecated with an accelerated time schedule and will be removed in pip 1.6T)r0r1r�
deprecatedr$�extend)r3�linksrrr �add_dependency_linksSs		z"PackageFinder.add_dependency_linksc	sJg�g���fdd�}x|D]}tjj|�}|jd�}||jk}|sj|r/|ry|}nt|�}|r�tjj|�r�tjj|�}xztj|�D]}|tjj	||��q�Wq<|r
tjj|�r
�j
|�q<tjj|�r<||�q<q(�j
|�q(W��fS)zt
        Sort locations into "files" (archives) and "urls", and return
        a pair of lists (files,urls)
        csLt|�}tj|dd�ddkr;�j|�n
�j|�dS)N�strictFrz	text/html)r�	mimetypes�
guess_type�append)�path�url)�files�urlsrr �	sort_pathksz0PackageFinder._sort_locations.<locals>.sort_pathzfile:)�osr=�exists�
startswithr"r�isdir�realpath�listdir�joinr<�isfile)	r3�	locationsrAr>�
is_local_path�is_file_url�is_find_linkr=�itemr)r?r@r �_sort_locationsbs*
	 zPackageFinder._sort_locationscCs�|\}}}|jr�tt�}|tkr9d}nW|jtkr�t|j�}|j�syt	d|j��n|j
�}n|}||fS|SdS)aL
        Function used to generate link sort key for link tuples.
        The greater the return value, the more preferred it is.
        If not finding wheels, then sorted by version only.
        If finding wheels, then the sort order is by version, then:
          1. existing installs
          2. wheels ordered via Wheel.support_index_min()
          3. source archives
        Note: it was considered to embed this logic into the Link
              comparison operators, but then different sdist links
              with the same version, would have to be considered equal
        �zB%s is not a supported wheel for this platform. It can't be sorted.N)r)�lenr�INSTALLED_VERSION�extrr�filename�	supportedr�support_index_min)r3�
link_tuple�parsed_version�link�_�support_num�pri�wheelrrr �_link_sort_key�s
		
zPackageFinder._link_sort_keycCst|d|jdd�S)z�
        Bring the latest version (and wheels) to the front, but maintain the existing ordering as secondary.
        See the docstring for `_link_sort_key` for details.
        This function is isolated for easier unit testing.
        �key�reverseT)�sortedr^)r3�applicable_versionsrrr �_sort_versions�szPackageFinder._sort_versionsc
s�fdd��|j�d}|jr�t�|jd�dd�}|j||�}|dkr�|jt|jddd��|�p�|j�q�n�dk	r��fdd�|jD�|j}nt|j�}xH|jD]=}�dk	r�|dk	r�tj	|j
|�g|}q�q�W|j|�\}}|j|j�\}	}
|j
|	�dd�|D�}|j
d	d�|
D��tjd
|�x�|D]�}tjd|�tjt|��}|jtkr�t|j}
t|
�dkr3||j|
d|jf}tjd
|�q�t|
�dkrz||jdj	|
�|jf}tjd|�q�||jf}tjd|�q�q�Wg}|j
|jdd�|jD�|jj���g}xy|j||�D]e}tjd|j
�tjd7_z)|j
|j|j|jj���Wdtjd8_Xq�Wt|jdd�|jD�|jj���}|r�tjddj	dd�|D���nt|jdd�|D�|jj���}|rj|rj|rj|rjtjd|�|jr7tjd|j�n|j rWtjd|j�nt!d|��ng}|j"dk	r�|j"j#t$|j"j%fg}n|r�|j&dd�tjddj	dd�|D���n|||||}g}x�|D]�\}}}||j'kr]tjd||d j	d!d�|j'j(D��f�qnKt)|�r�|j*px|j+r�|t$k	r�tjd"||f�qq�n|j,|||f�qW|j-|�}t.d#d�|D��}|rN|rN|ddt$kr%tjd$|j"j%�n%tjd%|j"j%|ddf�dS|s�tjd&|dj	d'd�|D��f�|jr�tjd(�n|j r�tjd|j�nt!d)|��n|ddt$kr-tjd*|j"j%dj	d+d�|dd�D��pd,f�t/�nt|�dkrwtjd-|dddj	d.d�|D��f�n|dd}|j0dk	r�|j0r�tjd/|j�n|j1dk	r�|j1r�tjd0|j�n|j2rtj3d1d2|j�n|S)3Ncs2tj|��}|jd�s.|d}n|S)N�/)�	posixpathrH�endswith)r>�loc)�url_namerr �mkurl_pypi_url�s
z6PackageFinder.find_requirement.<locals>.mkurl_pypi_urlr�trustedTcsg|]}�|��qSrr)rr>)rirr �
<listcomp>�s	z2PackageFinder.find_requirement.<locals>.<listcomp>cSs"g|]}t|dd��qS)rjT)�Link)rr>rrr rk�s	cSsg|]}t|��qSr)rl)rr>rrr rk�s	z#URLs to search for versions for %s:z* %srPzS%s uses an insecure transport scheme (%s). Consider using %s if %s has it availablez, zc%s uses an insecure transport scheme (%s). Consider using one of %s if %s has any of them availablez*%s uses an insecure transport scheme (%s).cSs%g|]}t|ddd��qS)z-frjT)rl)rr>rrr rk�s	zAnalyzing links from page %s�cSsg|]}t|��qSr)rl)rr>rrr rks	zdependency_links found: %scSs"g|]\}}}|j�qSr)r>)r�parsedrY�versionrrr rks	cSsg|]}t|��qSr)rl)rr>rrr rks	z<Could not find any downloads that satisfy the requirement %szMSome externally hosted files were ignored (use --allow-external %s to allow).zWSome insecure and unverifiable files were ignored (use --allow-unverified %s to allow).z$No distributions at all found for %sr`zLocal files found: %scSs(g|]\}}}t|j��qSr)rr>)rrnrYrorrr rks	z-Ignoring link %s, version %s doesn't match %s�,cSsg|]}dj|��qS)�)rH)r�srrr rk"s	zCIgnoring link %s, version %s is a pre-release (use --pre to allow).cSs+g|]!\}}}|tkr|�qSr)rR)rrXrYrorrr rk,s	zLExisting installed version (%s) is most up-to-date and satisfies requirementzUExisting installed version (%s) satisfies requirement (most up-to-date version is %s)zNCould not find a version that satisfies the requirement %s (from versions: %s)cSsg|]\}}}|�qSrr)rrXrYrorrr rk7s	zJSome externally hosted files were ignored (use --allow-external to allow).z,No distributions matching the version for %sz=Installed version (%s) is most up-to-date (past versions: %s)cSsg|]\}}}|�qSrr)rrXrYrorrr rkFs	�nonez)Using version %s (newest of versions: %s)cSsg|]\}}}|�qSrr)rrXrYrorrr rkJs	z2%s an externally hosted file and may be unreliablez,%s is potentially insecure and unverifiable.z1.7za%s discovered using a deprecated method of parsing, in the future it will no longer be discovered)4rhr#rl�	_get_page�_find_url_namer"�list�absolute_versionsrerHr>rOr$r6r�debugr�str�scheme�INSECURE_SCHEMESrQ�netloc�warn�_package_versions�name�lower�
_get_pages�indentr7�info�fatalr-r.r�satisfied_byrXrRro�sort�req�specsrr/�prereleasesr<rc�boolr�internal�
verifiable�_deprecated_regexr5)r3r��upgrade�main_index_url�pagerJro�file_locations�
url_locations�_flocations�_ulocations�locationrn�secure_schemes�ctx�found_versions�
page_versions�dependency_versions�
file_versions�installed_version�all_versionsrbrXrY�existing_applicable�selected_versionr)rirhr �find_requirement�s�
		7#


			&)	(*	%				!*	-	
			$				:		/
	
		zPackageFinder.find_requirementcCs�|jjd�s$|jd7_n|j||�}|dkrWtjd|�dSt|j�}xY|jD]N}tj	|j
jd��}|t|�krptjd||f�|SqpWdS)z�Finds the true URL name of a package, when the given name isn't quite correct.
        This is usually used to implement case-insensitivity.rdNzCannot fetch index base URL %sz!Real name of requirement %s is %s)
r>rfrtrr�rrhr7re�basenamer=�rstrip�notify)r3�	index_urlrhr�r��	norm_namerY�baserrr rubszPackageFinder._find_url_namec	cs7t|�}t�}x|r2|jd�}||kr?qn|j|�|j||�}|dkrpqn|Vx�|j�D]�}t|j�j�}||j	kr�|j
r�d|_tj
d|�q�n|jdk	r|jr||jkrtj
d|�d|_q�n|j|�q�WqWdS)z�
        Yields (page, page_url) from the given locations, skipping
        locations that have errors, and adding download/homepage links
        rNTz@Not searching %s for files because external urls are disallowed.z_Not searching %s for urls, it is an untrusted link and cannot produce safe or verifiable files.)rvr'�pop�addrt�	rel_linksrrr�r*r,r-rrxrjr+r.r<)	r3rJr��
all_locations�seenr�r�rY�
normalizedrrr r�us6		

		
		zPackageFinder._get_pagesz#egg=([^&]*)z([a-z0-9_.]+)-([a-z0-9_.-]+)z-py([123]\.?[0-9]?)$cCsqgg}}t�}xP|D]H}||kr|j|�|jrU|j|�qe|j|�qqW||S)zgReturns elements of links in order, non-egg links first, egg links second, while eliminating duplicates)r'r��egg_fragmentr<)r3r7�eggs�no_eggsr�rYrrr �_sort_links�s
	

	zPackageFinder._sort_linksccs@x9|j|�D](}x|j||�D]}|Vq)WqWdS)N)r��_link_package_versions)r3r7�search_namerY�vrrr r~�szPackageFinder._package_versionscCsd}|jr|tfS|S)N�.tar.gz�.tar.bz2�.tar�.tgz�.zip)r�r�r�r�r�)r)r)r3�
extensionsrrr �_known_extensions�s	zPackageFinder._known_extensionscCst�}d}|jr$|j}nN|j�\}}|ss||jkrotjd|�|jj|�ngS|jd�r�|dd�}d|}n||j�kr�||jkr�tjd||f�|jj|�ngSd|j	kr@|dkr@||jkr<tjd|�|jj|�ngS|t
krryt|j�}Wn't
k
r�tjd	|�gSYnX|jj�|j�kr�tjd
||f�gS|j�s�tjd|�gSt|dd�}|jd
�rf|jd�rf|dk	rftj|j�jjd�rf|jdt�sftjd|�gSn|j}n|s�|j|||�}n|dkr�tjd
||f�gS|jdk	r|jrt|�j�|jkr|jrtjd|�d|_gS|jdk	re|jret|�j�|jkretjd|�d|_ gS|j!j"|�}	|	r�|d|	j#��}|	j$d�}
|
t%jdd�kr�tjd|�gSntjd||f�t&j'|�||fgS)z�
        Return an iterable of triples (pkg_resources_version_key,
        link, python_version) that can be extracted from the given
        link.

        Meant to be overridden by subclasses, not called by clients.
        NzSkipping link %s; not a filez.tar�z,Skipping link %s; unknown archive format: %s�macosx10z.zipzSkipping link %s; macosx10 onez1Skipping %s because the wheel filename is invalidz-Skipping link %s; wrong project name (not %s)z9Skipping %s because it is not compatible with this Python�
comes_from�win�macosxzpypi.python.org�tagszOSkipping %s because it is a pypi-hosted binary Wheel on an unsupported platformz,Skipping %s because it is externally hosted.Tz<Skipping %s because it is an insecure and unverifiable file.rP�z/Skipping %s because Python version is incorrectzFound link %s, version: %s���)(rr�rr(rrxr�rfr�r=rrrTr
rr�rU�getattrrDrr>r|rro�_egg_info_matchesr�rr*r,r-r�r+r.�_py_version_re�search�start�group�sysr�
parse_version)r3rYr��platformro�egg_inforSr]r��match�
py_versionrrr r��s�		

		

	
		z$PackageFinder._link_package_versionscCs�|jj|�}|s-tjd|�dS|jd�j�}|jdd�}|j�d}|j|�r�|jd�t|�d�SdSdS)Nz%Could not parse version from link: %srrZ�-)	�_egg_info_rer�rrxr�r��replacerDrQ)r3r�r�rYr�r�look_forrrr r�&szPackageFinder._egg_info_matchescCs"tj||d|jd|j�S)Nr&r2)�HTMLPage�get_pager&r2)r3rYr�rrr rt5s	zPackageFinder._get_page)�__name__�
__module__�__qualname__�__doc__r4r8rOr^rcr�rur��re�compile�_egg_fragment_re�Ir�r�r�r~r�r�r�rtrrrr rs(	*(�)
lc@sseZdZdZdZdd�Zdd�Zdd�Zd	d
�Zddd
�Z	dd�Z
dd�ZdS)r%zCache of HTML pagesr�cCsi|_i|_i|_dS)N)�	_failures�_pages�	_archives)r3rrr r4As		zPageCache.__init__cCs|jj|d�|jkS)Nr)r��get�
failure_limit)r3r>rrr �too_many_failuresFszPageCache.too_many_failurescCs|jj|�S)N)r�r�)r3r>rrr r�IszPageCache.get_pagecCs|jj|d�S)NF)r�r�)r3r>rrr �
is_archiveLszPageCache.is_archiveTcCs||j|<dS)N)r�)r3r>�valuerrr �set_is_archiveOszPageCache.set_is_archivecCs$|jj|d�||j|<dS)Nr)r�r�)r3r>�levelrrr �add_page_failureRszPageCache.add_page_failurecCs"x|D]}||j|<qWdS)N)r�)r3r@r�r>rrr �add_pageUs
zPageCache.add_pageN)r�r�r�r�r�r4r�r�r�r�r�r�rrrr r%<sr%c@sCeZdZdZejdej�Zejdej�Zejdejej	B�Z
dddd�Zdd	�Ze
dd
ddd��Zedd
ddd��Zeddd��Zedd��Zedd��Zedd��Zdd�Zd#dd�Zdd�Zejd ej�Zd!d"�ZdS)$r�z'Represents one page, along with its URLz<th>\s*home\s*pagez<th>\s*download\s+urlz(href=(?:"([^"]*)"|'([^']*)'|([^>\s\n]*))NcCsC||_tj|jdd�|_||_||_||_dS)N�namespaceHTMLElementsF)�contentr�parsernr>�headersrj)r3r�r>r�rjrrr r4bs
			zHTMLPage.__init__cCs|jS)N)r>)r3rrr �__str__iszHTMLPage.__str__TcCs\|dkrt�}n|j}|jdd�d}|j|�rJdSddlm}xT|jD]I}|j�j|�rd|t	|�dkrdt
jdt��dSqdW|dk	r�|j
|�}	|	dk	r�|	Sny|r�|dk	r
|j|�r
dSn|j}
x�ddd	d
dgD]}}|
j|�r)|j|d|�}|j�jd
�rlPq�t
jd||f�|dk	r�|j|�ndSq)q)Wnt
jd|�tj|�\}}
}}}}|dkrEtjjt|��rE|jd�s|d7}ntj|d�}t
jd|�n|j|did
d6�}|j�|jjdd�}|j�jd
�s�t
jd||f�|dk	r�|j|�ndS||j|j|jd|j�}	Wn8tjk
r[}zE|j j!dkr!dnd}|j"||||d|d|�WYdd}~Xn�tj#k
r�}z%|j"||d||d|�WYdd}~Xn�tj$k
r�|j"||d|d|�Yn�t%k
r+}z:d|}|j"||||d|ddd t
j&�WYdd}~Xn-X|dk	rT|j'||jg|	�n|	SdS)!N�#rPr)�
VcsSupportz+:z&Cannot look at %(scheme)s URL %(link)sz.tarz.tar.gzz.tar.bz2z.tgzz.zipr2z	text/htmlz,Skipping page %s because of Content-Type: %szGetting page %s�filerdz
index.htmlz# file: URL is directory, getting %sr��AcceptzContent-Type�unknownrji�rmr&r�zconnection error: %sz	timed outz6There was a problem confirming the ssl certificate: %s�meth)(rr>�splitr��pip.vcsr��schemesr�rDrQrrx�localsr�r�rTrf�_get_content_typer�rrBr=rEr
�urljoinr��raise_for_statusr��textrjr�	HTTPError�response�status_code�_handle_fail�ConnectionError�Timeoutrr�r�)�clsrYr�r&�
skip_archivesr2r>r�rz�instrT�bad_ext�content_typer|r=�params�query�fragment�resp�excr��reasonrrr r�ls�	+		!$

		(4 zHTMLPage.get_pagerPcCsb|dkrtj}n|d||�|d|j|f�|dk	r^|j||�ndS)NzCould not fetch URL %s: %sz7Will skip URL %s when looking for download links for %s)rr�r>r�)r�rYrr>r&r�r�rrr r��szHTMLPage._handle_failcCsx|dkrt�}ntj|�\}}}}}|d
krFdS|j|dd�}|j�|jjd	d�S)z;Get the Content-Type of the given url, using a HEAD requestNrr�ftp�ftpsrq�allow_redirectsTzContent-Type)zhttpzhttpszftpzftps)rr�urlsplit�headr�r�r�)r>r2rzr|r=rr	r
rrr r��s
zHTMLPage._get_content_typecCs�t|d�s�d}dd�|jjd�D�}|r~y t|djdd��}Wq~ttfk
rzd}Yq~Xn||_n|jS)N�_api_versioncSs4g|]*}|jdd�j�dkr|�qS)rrqzapi-version)r�r�)r�xrrr rk�s	z(HTMLPage.api_version.<locals>.<listcomp>z.//metarr�)�hasattrrn�findall�intr��	TypeError�
ValueErrorr)r3r�metasrrr �api_version�s zHTMLPage.api_versioncCsgt|d�s`|jjd�}|dk	rQ|jd�rQ|jd�|_q`|j|_n|jS)N�	_base_urlz.//base�href)rrn�findr�rr>)r3r�rrr �base_url�szHTMLPage.base_urlccs�x�|jjd�D]�}|jd�r|jd�}|jtj|j|��}d}|jr�|jdkr�t|jd�o�d|jd�j	�k�}nt
||d|�VqqWdS)zYields all links in the pagez.//arNrm�relr�)rnrr��
clean_linkrr�rrr�r�rl)r3�anchorrr>r�rrr r7�s!zHTMLPage.linksccs<x|j�D]}|Vq
Wx|j�D]}|Vq)WdS)N)�explicit_rel_links�scraped_rel_links)r3r>rrr r�s	zHTMLPage.rel_links�homepage�downloadccs�t|�}x�|jjd�D]�}|jd�r|jd�rt|jd�j��}||@r�|jd�}|jtj|j|��}t	||dd�Vq�qqWdS)z)Yields all links with the given relationsz.//arrrjFN)
r'rnrr�r�r rr�rrl)r3�relsr!�
found_relsrr>rrr r"s
zHTMLPage.explicit_rel_linksccs�x�|j|jfD]�}|j|j�}|s7qn|jj|jd|j��}|sdqn|jd�p�|jd�p�|jd�}|s�qn|jtj	|j
|��}t||dddd�VqWdS)	N�posrPrmr�rjFr�T)�_homepage_re�_download_rer�r��_href_re�endr�r rr�rrl)r3�regexr��
href_matchr>rrr r#&s!-zHTMLPage.scraped_rel_linksz[^a-z0-9$&+,/:;=?@.#%_\\|-]cCs|jjdd�|�S)z�Makes sure a link is fully encoded.  That is, if a ' ' shows up in
        the link, it will be rewritten to %20 (while not over-quoting
        % or other characters).cSsdt|jd��S)Nz%%%2xr)�ordr�)r�rrr �<lambda><sz%HTMLPage.clean_link.<locals>.<lambda>)�	_clean_re�sub)r3r>rrr r 7s	zHTMLPage.clean_link)zhomepagezdownload)r�r�r�r�r�r�r�r)r*�Sr+r4r��classmethodr��staticmethodr�r��propertyrrr7r�r"r#r1r rrrr r�Zs([
r�c@sreZdZdddddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Ze
dd��Ze
dd��Ze
dd��Zdd�Ze
dd ��Ze
d!d"��Zejd#�Ze
d$d%��Zejd&�Ze
d'd(��Ze
d)d*��Ze
d+d,��Ze
d-d.��ZdS)/rlNFcCs1||_||_||_||_||_dS)N)r>r�r�rjr�)r3r>r�r�rjr�rrr r4As
				z
Link.__init__cCs.|jrd|j|jfSt|j�SdS)Nz%s (from %s))r�r>ry)r3rrr r�Is	zLink.__str__cCsd|S)Nz	<Link %s>r)r3rrr �__repr__Osz
Link.__repr__cCs|j|jkS)N)r>)r3�otherrrr �__eq__RszLink.__eq__cCs|j|jkS)N)r>)r3r8rrr �__ne__UszLink.__ne__cCs|j|jkS)N)r>)r3r8rrr �__lt__XszLink.__lt__cCs|j|jkS)N)r>)r3r8rrr �__le__[szLink.__le__cCs|j|jkS)N)r>)r3r8rrr �__gt__^szLink.__gt__cCs|j|jkS)N)r>)r3r8rrr �__ge__aszLink.__ge__cCs
t|j�S)N)�hashr>)r3rrr �__hash__dsz
Link.__hash__cCs\tj|j�\}}}}}tj|jd��p<|}|sXtd|j��|S)NrdzURL %r produced no filename)rrr>rer�r��AssertionError)r3rZr|r=rrrr rTgs!z
Link.filenamecCstj|j�dS)Nr)rrr>)r3rrr rznszLink.schemecCstj|j�dS)Nrm)rrr>)r3rrr r=rsz	Link.pathcCsttj|jjd���S)Nrd)rrer�r=r�)r3rrr rvsz
Link.splitextcCs|j�dS)NrP)r)r3rrr rSyszLink.extcCs=tj|j�\}}}}}tj||||df�S)N)rrr>�
urlunsplit)r3rzr|r=rr	rrr �url_without_fragment}s!zLink.url_without_fragmentz#egg=([^&]*)cCs,|jj|j�}|sdS|jd�S)NrP)r�r�r>r�)r3r�rrr r��szLink.egg_fragmentz2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)cCs,|jj|j�}|r(|jd�SdS)Nrm)�_hash_rer�r>r�)r3r�rrr r?�s
z	Link.hashcCs,|jj|j�}|r(|jd�SdS)NrP)rDr�r>r�)r3r�rrr �	hash_name�s
zLink.hash_namecCs0tj|jjdd�djdd�d�S)Nr�rPr�?)rer�r>r�)r3rrr �show_url�sz
Link.show_urlcCs�|jpt|jdd�}|dk	r�|r�y%t|jdd�}t|�}Wnttfk
rud}YnX|dks�|dkr�dS|jr�dSdSn|dk	r�dSdS)z�
        Returns True if this link can be verified after download, False if it
        cannot, and None if we cannot determine.
        rjNrrPTF)rjr�r�rrrr?)r3rjrrrr r��s	zLink.verifiable)r�r�r�r4r�r7r9r:r;r<r=r>r@r6rTrzr=rrSrCr�r�r�r�rDr?rErGr�rrrr rl?s0	rlcCs;t|�}|j}|s1t|j�d}nt|�S)zPGet a requirement from the URL, if possible.  This looks for #egg
    in the URLr)rlr�rrT�package_to_requirement)r>rYr�rrr �get_requirement_from_url�s
	rIcCsatjd|�}|r9|jd�}|jd�}n|}d}|rYd||fS|SdS)z)Translate a name like Foo-1.2 to Foo==1.3z^(.*?)-(dev|\d.*)rPrmrqz%s==%sN)r�r�r�)�package_namer�rrorrr rH�srH)2r�r�rBr�r:re�pip.logr�pip.utilrrrr�pip.exceptionsrrr	r
rZpip.backwardcompatrr
�pip.downloadrrr�	pip.wheelrrZpip.pep425tagsrrr�pip._vendorrrrZpip._vendor.requests.exceptionsr�__all__�DEFAULT_MIRROR_HOSTNAMEr{�objectrr%r�rlrRrIrHrrrr �<module>s6"(	
����
python3.4/site-packages/pip/__pycache__/exceptions.cpython-34.pyc000064400000004670151735047230020655 0ustar00�
�Re>�@s�dZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZdS)z"Exceptions used throughout packagec@seZdZdZdS)�PipErrorzBase pip exceptionN)�__name__�
__module__�__qualname__�__doc__�rr�)/tmp/pip-ztkk0jow-build/pip/exceptions.pyrsrc@seZdZdZdS)�InstallationErrorz%General exception during installationN)rrrrrrrrrsrc@seZdZdZdS)�UninstallationErrorz'General exception during uninstallationN)rrrrrrrrr	sr	c@seZdZdZdS)�DistributionNotFoundzCRaised when a distribution cannot be found to satisfy a requirementN)rrrrrrrrr
sr
c@seZdZdZdS)�BestVersionAlreadyInstalledzPRaised when the most up-to-date version of a package is already
    installed.  N)rrrrrrrrrsrc@seZdZdZdS)�
BadCommandz0Raised when virtualenv or a command is not foundN)rrrrrrrrrsrc@seZdZdZdS)�CommandErrorz7Raised when there is an error in command-line argumentsN)rrrrrrrrr
sr
c@seZdZdZdS)�PreviousBuildDirErrorz:Raised when there's a previous conflicting build directoryN)rrrrrrrrr!src@seZdZdZdS)�HashMismatchz*Distribution file hash values don't match.N)rrrrrrrrr%src@seZdZdZdS)�InvalidWheelFilenamezInvalid wheel filename.N)rrrrrrrrr)src@seZdZdZdS)�UnsupportedWheelzUnsupported wheel.N)rrrrrrrrr-srN)
r�	Exceptionrrr	r
rrr
rrrrrrrr�<module>spython3.4/site-packages/pip/__pycache__/__main__.cpython-34.pyc000064400000000410151735047230020200 0ustar00�
�Ret�@sNddlZddlmZedkrJe�ZerJeje�qJndS)�N�)�run�__main__)�sysZrunnerr�__name__�exit�rr�'/tmp/pip-ztkk0jow-build/pip/__main__.py�<module>s
	python3.4/site-packages/pip/__main__.py000064400000000164151735047240013725 0ustar00import sys
from .runner import run

if __name__ == '__main__':
    exit = run()
    if exit:
        sys.exit(exit)
python3.4/site-packages/pip/backwardcompat/__pycache__/__init__.cpython-34.pyc000064400000010306151735047240023207 0ustar00�
�Re��@s=dZddlZddlZddlZddlZdgZeed�ZGdd�de�Z	y
e
Z
Wnek
r�e	Z
YnXy
eZWnek
r�e	ZYnXej
jZejd$kr�ddlmZmZdd	lmZdd
lmZmZddlmZmZddlmZmZmZdd
l m!Z"ddl#j$Z%ddlj&Z'ddl(Z)ddl*j+Z,ddl#j$Z-ddl.j+Z/dd�Z0dd�Z1dd�Z2dd�Z3dd�Z4e5Z5e6fZ7e8Z9nddl:mZdd
l'mZmZddlmZmZddl%mZmZmZddl m;Z"ddl%Z%ddl'Z'ddl-Z-ddl)Z)ddl,Z,ddl/Z/dd�Z1dd�Z2dd�Z3dd�Z4e6Z5e<fZ7eZe0Z0e9Z9eZddl=m>Z>m?Z?e@edd�ZAd d!�ZBd"d#�ZCdS)%zKStuff that differs in different Python versions and platform
distributions.�N�WindowsError�cache_from_sourcec@seZdZdZdS)�NeverUsedExceptionz%this exception should never be raisedN)�__name__�
__module__�__qualname__�__doc__�r	r	�6/tmp/pip-ztkk0jow-build/pip/backwardcompat/__init__.pyr
sr�)�StringIO�BytesIO)�reduce)�URLError�	HTTPError)�Queue�Empty)�url2pathname�urlretrieve�pathname2url)�messagecCs||k||kS)Nr	)�a�br	r	r
�cmp+srcCs
|jd�S)Nzutf-8)�encode)�sr	r	r
r.srcCs
|jd�S)Nzutf-8)�decode)rr	r	r
�u1srcCs7y|jt�SWntk
r2|jd�SYnXdS)N�utf_8)r�console_encoding�UnicodeDecodeError)rr	r	r
�console_to_str4s
r!cCs|j||�S)N)�	get_param)�http_message�param�
default_valuer	r	r
�get_http_message_param:sr&)r)�MessagecCs|S)Nr	)rr	r	r
rMscCs|S)Nr	)rr	r	r
rPscCs|S)Nr	)rr	r	r
r!SscCs|j|�}|p|S)N)Zgetparam)r#r$r%�resultr	r	r
r&Vs)�get_python_lib�get_python_version�	USER_SITEc/sxttt|��|jdd�}gg}x'|D]��fdd�|D�}q5Wx|D]}t|�Vq_WdS)N�repeat�cs*g|] }�D]}||g�qqSr	r	)�.0�x�y)�poolr	r
�
<listcomp>ns	zproduct.<locals>.<listcomp>)�list�map�tuple�get)�args�kwds�poolsr(�prodr	)r1r
�producths%	

r;cCs�ttd�rMtj|tjtjB�}tj|�j}tj|�n7tjj	|�sttj
|�j}ntd|��|S)a)
    Return path's uid.

    Does not follow symlinks: https://github.com/pypa/pip/pull/935#discussion_r5307003

    Placed this function in backwardcompat due to differences on AIX and Jython,
    that should eventually go away.

    :raises OSError: When path is a symlink or can't be read.
    �
O_NOFOLLOWz1%s is a symlink; Will not return uid for symlinks)�hasattr�os�open�O_RDONLYr<�fstat�st_uid�close�path�islink�stat�OSError)rD�fd�file_uidr	r	r
�get_path_uidssrJ)r)Drr>�imp�sys�site�__all__r=�uses_pycache�	Exceptionrr�	NameError�PermissionError�
__stdout__�encodingr�version_info�iorr
�	functoolsr�urllib.errorrr�queuerr�urllib.requestrrr�emailr�emailmessage�urllib.parse�parse�urllib�request�urllib2�configparser�ConfigParser�
xmlrpc.client�client�	xmlrpclib�urlparse�http.client�httplibrrrr!r&�bytes�str�string_types�input�	raw_input�	cStringIOr'�
basestring�distutils.sysconfigr)r*�getattr�	user_siter;rJr	r	r	r
�<module>s|	



			python3.4/site-packages/pip/backwardcompat/__init__.py000064400000007254151735047250016736 0ustar00"""Stuff that differs in different Python versions and platform
distributions."""

import os
import imp
import sys
import site

__all__ = ['WindowsError']

uses_pycache = hasattr(imp, 'cache_from_source')

class NeverUsedException(Exception):
    """this exception should never be raised"""

try:
    WindowsError = WindowsError
except NameError:
    WindowsError = NeverUsedException

try:
    #new in Python 3.3
    PermissionError = PermissionError
except NameError:
    PermissionError = NeverUsedException

console_encoding = sys.__stdout__.encoding

if sys.version_info >= (3,):
    from io import StringIO, BytesIO
    from functools import reduce
    from urllib.error import URLError, HTTPError
    from queue import Queue, Empty
    from urllib.request import url2pathname, urlretrieve, pathname2url
    from email import message as emailmessage
    import urllib.parse as urllib
    import urllib.request as urllib2
    import configparser as ConfigParser
    import xmlrpc.client as xmlrpclib
    import urllib.parse as urlparse
    import http.client as httplib

    def cmp(a, b):
        return (a > b) - (a < b)

    def b(s):
        return s.encode('utf-8')

    def u(s):
        return s.decode('utf-8')

    def console_to_str(s):
        try:
            return s.decode(console_encoding)
        except UnicodeDecodeError:
            return s.decode('utf_8')

    def get_http_message_param(http_message, param, default_value):
        return http_message.get_param(param, default_value)

    bytes = bytes
    string_types = (str,)
    raw_input = input
else:
    from cStringIO import StringIO
    from urllib2 import URLError, HTTPError
    from Queue import Queue, Empty
    from urllib import url2pathname, urlretrieve, pathname2url
    from email import Message as emailmessage
    import urllib
    import urllib2
    import urlparse
    import ConfigParser
    import xmlrpclib
    import httplib

    def b(s):
        return s

    def u(s):
        return s

    def console_to_str(s):
        return s

    def get_http_message_param(http_message, param, default_value):
        result = http_message.getparam(param)
        return result or default_value

    bytes = str
    string_types = (basestring,)
    reduce = reduce
    cmp = cmp
    raw_input = raw_input
    BytesIO = StringIO


from distutils.sysconfig import get_python_lib, get_python_version

#site.USER_SITE was created in py2.6
user_site = getattr(site, 'USER_SITE', None)


def product(*args, **kwds):
    # product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy
    # product(range(2), repeat=3) --> 000 001 010 011 100 101 110 111
    pools = list(map(tuple, args)) * kwds.get('repeat', 1)
    result = [[]]
    for pool in pools:
        result = [x + [y] for x in result for y in pool]
    for prod in result:
        yield tuple(prod)


def get_path_uid(path):
    """
    Return path's uid.

    Does not follow symlinks: https://github.com/pypa/pip/pull/935#discussion_r5307003

    Placed this function in backwardcompat due to differences on AIX and Jython,
    that should eventually go away.

    :raises OSError: When path is a symlink or can't be read.
    """
    if hasattr(os, 'O_NOFOLLOW'):
        fd = os.open(path, os.O_RDONLY | os.O_NOFOLLOW)
        file_uid = os.fstat(fd).st_uid
        os.close(fd)
    else:  # AIX and Jython
        # WARNING: time of check vulnerabity, but best we can do w/o NOFOLLOW
        if not os.path.islink(path):
            # older versions of Jython don't have `os.fstat`
            file_uid = os.stat(path).st_uid
        else:
            # raise OSError for parity with os.O_NOFOLLOW above
            raise OSError("%s is a symlink; Will not return uid for symlinks" % path)
    return file_uid
python3.4/site-packages/pip/runner.py000064400000000657151735047250013526 0ustar00import sys
import os


def run():
    base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    ## FIXME: this is kind of crude; if we could create a fake pip
    ## module, then exec into it and update pip.__path__ properly, we
    ## wouldn't have to update sys.path:
    sys.path.insert(0, base)
    import pip
    return pip.main()


if __name__ == '__main__':
    exit = run()
    if exit:
        sys.exit(exit)
python3.4/site-packages/pip/status_codes.py000064400000000164151735047260014707 0ustar00SUCCESS = 0
ERROR = 1
UNKNOWN_ERROR = 2
VIRTUALENV_NOT_FOUND = 3
PREVIOUS_BUILD_DIR_ERROR = 4
NO_MATCHES_FOUND = 23
python3.4/site-packages/pip/req.py000064400000243451151735047260013006 0ustar00from email.parser import FeedParser
import os
import imp
import locale
import re
import sys
import shutil
import tempfile
import textwrap
import zipfile

from distutils.util import change_root
from pip.locations import (bin_py, running_under_virtualenv,PIP_DELETE_MARKER_FILENAME,
                           write_delete_marker_file, bin_user)
from pip.exceptions import (InstallationError, UninstallationError, UnsupportedWheel,
                            BestVersionAlreadyInstalled, InvalidWheelFilename,
                            DistributionNotFound, PreviousBuildDirError)
from pip.vcs import vcs
from pip.log import logger
from pip.util import (display_path, rmtree, ask, ask_path_exists, backup_dir,
                      is_installable_dir, is_local, dist_is_local,
                      dist_in_usersite, dist_in_site_packages, renames,
                      normalize_path, egg_link_path, make_path_relative,
                      call_subprocess, is_prerelease, normalize_name)
from pip.backwardcompat import (urlparse, urllib, uses_pycache,
                                ConfigParser, string_types, HTTPError,
                                get_python_version, b)
from pip.index import Link
from pip.locations import build_prefix
from pip.download import (PipSession, get_file_content, is_url, url_to_path,
                          path_to_url, is_archive_file,
                          unpack_vcs_link, is_vcs_url, is_file_url,
                          unpack_file_url, unpack_http_url)
import pip.wheel
from pip.wheel import move_wheel_files, Wheel, wheel_ext
from pip._vendor import pkg_resources, six


def read_text_file(filename):
    """Return the contents of *filename*.

    Try to decode the file contents with utf-8, the preffered system encoding
    (e.g., cp1252 on some Windows machines) and latin1, in that order. Decoding
    a byte string with latin1 will never raise an error. In the worst case, the
    returned string will contain some garbage characters.

    """
    with open(filename, 'rb') as fp:
        data = fp.read()

    encodings = ['utf-8', locale.getpreferredencoding(False), 'latin1']
    for enc in encodings:
        try:
            data = data.decode(enc)
        except UnicodeDecodeError:
            continue
        break

    assert type(data) != bytes  # Latin1 should have worked.
    return data


class InstallRequirement(object):

    def __init__(self, req, comes_from, source_dir=None, editable=False,
                 url=None, as_egg=False, update=True, prereleases=None,
                 editable_options=None, from_bundle=False, pycompile=True):
        self.extras = ()
        if isinstance(req, string_types):
            req = pkg_resources.Requirement.parse(req)
            self.extras = req.extras
        self.req = req
        self.comes_from = comes_from
        self.source_dir = source_dir
        self.editable = editable

        if editable_options is None:
            editable_options = {}

        self.editable_options = editable_options
        self.url = url
        self.as_egg = as_egg
        self._egg_info_path = None
        # This holds the pkg_resources.Distribution object if this requirement
        # is already available:
        self.satisfied_by = None
        # This hold the pkg_resources.Distribution object if this requirement
        # conflicts with another installed distribution:
        self.conflicts_with = None
        self._temp_build_dir = None
        self._is_bundle = None
        # True if the editable should be updated:
        self.update = update
        # Set to True after successful installation
        self.install_succeeded = None
        # UninstallPathSet of uninstalled distribution (for possible rollback)
        self.uninstalled = None
        self.use_user_site = False
        self.target_dir = None
        self.from_bundle = from_bundle

        self.pycompile = pycompile

        # True if pre-releases are acceptable
        if prereleases:
            self.prereleases = True
        elif self.req is not None:
            self.prereleases = any([is_prerelease(x[1]) and x[0] != "!=" for x in self.req.specs])
        else:
            self.prereleases = False

    @classmethod
    def from_editable(cls, editable_req, comes_from=None, default_vcs=None):
        name, url, extras_override = parse_editable(editable_req, default_vcs)
        if url.startswith('file:'):
            source_dir = url_to_path(url)
        else:
            source_dir = None

        res = cls(name, comes_from, source_dir=source_dir,
                  editable=True,
                  url=url,
                  editable_options=extras_override,
                  prereleases=True)

        if extras_override is not None:
            res.extras = extras_override

        return res

    @classmethod
    def from_line(cls, name, comes_from=None, prereleases=None):
        """Creates an InstallRequirement from a name, which might be a
        requirement, directory containing 'setup.py', filename, or URL.
        """
        url = None
        name = name.strip()
        req = None
        path = os.path.normpath(os.path.abspath(name))
        link = None

        if is_url(name):
            link = Link(name)
        elif os.path.isdir(path) and (os.path.sep in name or name.startswith('.')):
            if not is_installable_dir(path):
                raise InstallationError("Directory %r is not installable. File 'setup.py' not found." % name)
            link = Link(path_to_url(name))
        elif is_archive_file(path):
            if not os.path.isfile(path):
                logger.warn('Requirement %r looks like a filename, but the file does not exist', name)
            link = Link(path_to_url(name))

        # If the line has an egg= definition, but isn't editable, pull the requirement out.
        # Otherwise, assume the name is the req for the non URL/path/archive case.
        if link and req is None:
            url = link.url_without_fragment
            req = link.egg_fragment  #when fragment is None, this will become an 'unnamed' requirement

            # Handle relative file URLs
            if link.scheme == 'file' and re.search(r'\.\./', url):
                url = path_to_url(os.path.normpath(os.path.abspath(link.path)))

            # fail early for invalid or unsupported wheels
            if link.ext == wheel_ext:
                wheel = Wheel(link.filename) # can raise InvalidWheelFilename
                if not wheel.supported():
                    raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)

        else:
            req = name

        return cls(req, comes_from, url=url, prereleases=prereleases)

    def __str__(self):
        if self.req:
            s = str(self.req)
            if self.url:
                s += ' from %s' % self.url
        else:
            s = self.url
        if self.satisfied_by is not None:
            s += ' in %s' % display_path(self.satisfied_by.location)
        if self.comes_from:
            if isinstance(self.comes_from, string_types):
                comes_from = self.comes_from
            else:
                comes_from = self.comes_from.from_path()
            if comes_from:
                s += ' (from %s)' % comes_from
        return s

    def from_path(self):
        if self.req is None:
            return None
        s = str(self.req)
        if self.comes_from:
            if isinstance(self.comes_from, string_types):
                comes_from = self.comes_from
            else:
                comes_from = self.comes_from.from_path()
            if comes_from:
                s += '->' + comes_from
        return s

    def build_location(self, build_dir, unpack=True):
        if self._temp_build_dir is not None:
            return self._temp_build_dir
        if self.req is None:
            self._temp_build_dir = tempfile.mkdtemp('-build', 'pip-')
            self._ideal_build_dir = build_dir
            return self._temp_build_dir
        if self.editable:
            name = self.name.lower()
        else:
            name = self.name
        # FIXME: Is there a better place to create the build_dir? (hg and bzr need this)
        if not os.path.exists(build_dir):
            _make_build_dir(build_dir)
        return os.path.join(build_dir, name)

    def correct_build_location(self):
        """If the build location was a temporary directory, this will move it
        to a new more permanent location"""
        if self.source_dir is not None:
            return
        assert self.req is not None
        assert self._temp_build_dir
        old_location = self._temp_build_dir
        new_build_dir = self._ideal_build_dir
        del self._ideal_build_dir
        if self.editable:
            name = self.name.lower()
        else:
            name = self.name
        new_location = os.path.join(new_build_dir, name)
        if not os.path.exists(new_build_dir):
            logger.debug('Creating directory %s' % new_build_dir)
            _make_build_dir(new_build_dir)
        if os.path.exists(new_location):
            raise InstallationError(
                'A package already exists in %s; please remove it to continue'
                % display_path(new_location))
        logger.debug('Moving package %s from %s to new location %s'
                     % (self, display_path(old_location), display_path(new_location)))
        shutil.move(old_location, new_location)
        self._temp_build_dir = new_location
        self.source_dir = new_location
        self._egg_info_path = None

    @property
    def name(self):
        if self.req is None:
            return None
        return self.req.project_name

    @property
    def url_name(self):
        if self.req is None:
            return None
        return urllib.quote(self.req.unsafe_name)

    @property
    def setup_py(self):
        try:
            import setuptools
        except ImportError:
            # Setuptools is not available
            raise InstallationError(
                "setuptools must be installed to install from a source "
                "distribution"
            )

        setup_file = 'setup.py'

        if self.editable_options and 'subdirectory' in self.editable_options:
            setup_py = os.path.join(self.source_dir,
                                    self.editable_options['subdirectory'],
                                    setup_file)

        else:
            setup_py = os.path.join(self.source_dir, setup_file)

        # Python2 __file__ should not be unicode
        if six.PY2 and isinstance(setup_py, six.text_type):
            setup_py = setup_py.encode(sys.getfilesystemencoding())

        return setup_py

    def run_egg_info(self, force_root_egg_info=False):
        assert self.source_dir
        if self.name:
            logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.setup_py, self.name))
        else:
            logger.notify('Running setup.py (path:%s) egg_info for package from %s' % (self.setup_py, self.url))
        logger.indent += 2
        try:

            # if it's distribute>=0.7, it won't contain an importable
            # setuptools, and having an egg-info dir blocks the ability of
            # setup.py to find setuptools plugins, so delete the egg-info dir if
            # no setuptools. it will get recreated by the run of egg_info
            # NOTE: this self.name check only works when installing from a specifier
            #       (not archive path/urls)
            # TODO: take this out later
            if self.name == 'distribute' and not os.path.isdir(os.path.join(self.source_dir, 'setuptools')):
                rmtree(os.path.join(self.source_dir, 'distribute.egg-info'))

            script = self._run_setup_py
            script = script.replace('__SETUP_PY__', repr(self.setup_py))
            script = script.replace('__PKG_NAME__', repr(self.name))
            egg_info_cmd = [sys.executable, '-c', script, 'egg_info']
            # We can't put the .egg-info files at the root, because then the source code will be mistaken
            # for an installed egg, causing problems
            if self.editable or force_root_egg_info:
                egg_base_option = []
            else:
                egg_info_dir = os.path.join(self.source_dir, 'pip-egg-info')
                if not os.path.exists(egg_info_dir):
                    os.makedirs(egg_info_dir)
                egg_base_option = ['--egg-base', 'pip-egg-info']
            call_subprocess(
                egg_info_cmd + egg_base_option,
                cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False,
                command_level=logger.VERBOSE_DEBUG,
                command_desc='python setup.py egg_info')
        finally:
            logger.indent -= 2
        if not self.req:
            self.req = pkg_resources.Requirement.parse(
                "%(Name)s==%(Version)s" % self.pkg_info())
            self.correct_build_location()

    ## FIXME: This is a lame hack, entirely for PasteScript which has
    ## a self-provided entry point that causes this awkwardness
    _run_setup_py = """
__file__ = __SETUP_PY__
from setuptools.command import egg_info
import pkg_resources
import os
import tokenize
def replacement_run(self):
    self.mkpath(self.egg_info)
    installer = self.distribution.fetch_build_egg
    for ep in pkg_resources.iter_entry_points('egg_info.writers'):
        # require=False is the change we're making:
        writer = ep.load(require=False)
        if writer:
            writer(self, ep.name, os.path.join(self.egg_info,ep.name))
    self.find_sources()
egg_info.egg_info.run = replacement_run
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
"""

    def egg_info_data(self, filename):
        if self.satisfied_by is not None:
            if not self.satisfied_by.has_metadata(filename):
                return None
            return self.satisfied_by.get_metadata(filename)
        assert self.source_dir
        filename = self.egg_info_path(filename)
        if not os.path.exists(filename):
            return None
        data = read_text_file(filename)
        return data

    def egg_info_path(self, filename):
        if self._egg_info_path is None:
            if self.editable:
                base = self.source_dir
            else:
                base = os.path.join(self.source_dir, 'pip-egg-info')
            filenames = os.listdir(base)
            if self.editable:
                filenames = []
                for root, dirs, files in os.walk(base):
                    for dir in vcs.dirnames:
                        if dir in dirs:
                            dirs.remove(dir)
                    # Iterate over a copy of ``dirs``, since mutating
                    # a list while iterating over it can cause trouble.
                    # (See https://github.com/pypa/pip/pull/462.)
                    for dir in list(dirs):
                        # Don't search in anything that looks like a virtualenv environment
                        if (os.path.exists(os.path.join(root, dir, 'bin', 'python'))
                            or os.path.exists(os.path.join(root, dir, 'Scripts', 'Python.exe'))):
                            dirs.remove(dir)
                        # Also don't search through tests
                        if dir == 'test' or dir == 'tests':
                            dirs.remove(dir)
                    filenames.extend([os.path.join(root, dir)
                                     for dir in dirs])
                filenames = [f for f in filenames if f.endswith('.egg-info')]

            if not filenames:
                raise InstallationError('No files/directories in %s (from %s)' % (base, filename))
            assert filenames, "No files/directories in %s (from %s)" % (base, filename)

            # if we have more than one match, we pick the toplevel one.  This can
            # easily be the case if there is a dist folder which contains an
            # extracted tarball for testing purposes.
            if len(filenames) > 1:
                filenames.sort(key=lambda x: x.count(os.path.sep) +
                                             (os.path.altsep and
                                              x.count(os.path.altsep) or 0))
            self._egg_info_path = os.path.join(base, filenames[0])
        return os.path.join(self._egg_info_path, filename)

    def egg_info_lines(self, filename):
        data = self.egg_info_data(filename)
        if not data:
            return []
        result = []
        for line in data.splitlines():
            line = line.strip()
            if not line or line.startswith('#'):
                continue
            result.append(line)
        return result

    def pkg_info(self):
        p = FeedParser()
        data = self.egg_info_data('PKG-INFO')
        if not data:
            logger.warn('No PKG-INFO file found in %s' % display_path(self.egg_info_path('PKG-INFO')))
        p.feed(data or '')
        return p.close()

    @property
    def dependency_links(self):
        return self.egg_info_lines('dependency_links.txt')

    _requirements_section_re = re.compile(r'\[(.*?)\]')

    def requirements(self, extras=()):
        in_extra = None
        for line in self.egg_info_lines('requires.txt'):
            match = self._requirements_section_re.match(line.lower())
            if match:
                in_extra = match.group(1)
                continue
            if in_extra and in_extra not in extras:
                logger.debug('skipping extra %s' % in_extra)
                # Skip requirement for an extra we aren't requiring
                continue
            yield line

    @property
    def absolute_versions(self):
        for qualifier, version in self.req.specs:
            if qualifier == '==':
                yield version

    @property
    def installed_version(self):
        return self.pkg_info()['version']

    def assert_source_matches_version(self):
        assert self.source_dir
        version = self.installed_version
        if version not in self.req:
            logger.warn('Requested %s, but installing version %s' % (self, self.installed_version))
        else:
            logger.debug('Source in %s has version %s, which satisfies requirement %s'
                         % (display_path(self.source_dir), version, self))

    def update_editable(self, obtain=True):
        if not self.url:
            logger.info("Cannot update repository at %s; repository location is unknown" % self.source_dir)
            return
        assert self.editable
        assert self.source_dir
        if self.url.startswith('file:'):
            # Static paths don't get updated
            return
        assert '+' in self.url, "bad url: %r" % self.url
        if not self.update:
            return
        vc_type, url = self.url.split('+', 1)
        backend = vcs.get_backend(vc_type)
        if backend:
            vcs_backend = backend(self.url)
            if obtain:
                vcs_backend.obtain(self.source_dir)
            else:
                vcs_backend.export(self.source_dir)
        else:
            assert 0, (
                'Unexpected version control type (in %s): %s'
                % (self.url, vc_type))

    def uninstall(self, auto_confirm=False):
        """
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        """
        if not self.check_if_exists():
            raise UninstallationError("Cannot uninstall requirement %s, not installed" % (self.name,))
        dist = self.satisfied_by or self.conflicts_with

        paths_to_remove = UninstallPathSet(dist)

        pip_egg_info_path = os.path.join(dist.location,
                                         dist.egg_name()) + '.egg-info'
        dist_info_path = os.path.join(dist.location,
                                      '-'.join(dist.egg_name().split('-')[:2])
                                      ) + '.dist-info'
        # workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618367
        debian_egg_info_path = pip_egg_info_path.replace(
            '-py%s' % pkg_resources.PY_MAJOR, '')
        easy_install_egg = dist.egg_name() + '.egg'
        develop_egg_link = egg_link_path(dist)

        pip_egg_info_exists = os.path.exists(pip_egg_info_path)
        debian_egg_info_exists = os.path.exists(debian_egg_info_path)
        dist_info_exists = os.path.exists(dist_info_path)
        if pip_egg_info_exists or debian_egg_info_exists:
            # package installed by pip
            if pip_egg_info_exists:
                egg_info_path = pip_egg_info_path
            else:
                egg_info_path = debian_egg_info_path
            paths_to_remove.add(egg_info_path)
            if dist.has_metadata('installed-files.txt'):
                for installed_file in dist.get_metadata('installed-files.txt').splitlines():
                    path = os.path.normpath(os.path.join(egg_info_path, installed_file))
                    paths_to_remove.add(path)
            #FIXME: need a test for this elif block
            #occurs with --single-version-externally-managed/--record outside of pip
            elif dist.has_metadata('top_level.txt'):
                if dist.has_metadata('namespace_packages.txt'):
                    namespaces = dist.get_metadata('namespace_packages.txt')
                else:
                    namespaces = []
                for top_level_pkg in [p for p
                                      in dist.get_metadata('top_level.txt').splitlines()
                                      if p and p not in namespaces]:
                    path = os.path.join(dist.location, top_level_pkg)
                    paths_to_remove.add(path)
                    paths_to_remove.add(path + '.py')
                    paths_to_remove.add(path + '.pyc')

        elif dist.location.endswith(easy_install_egg):
            # package installed by easy_install
            paths_to_remove.add(dist.location)
            easy_install_pth = os.path.join(os.path.dirname(dist.location),
                                            'easy-install.pth')
            paths_to_remove.add_pth(easy_install_pth, './' + easy_install_egg)

        elif develop_egg_link:
            # develop egg
            fh = open(develop_egg_link, 'r')
            link_pointer = os.path.normcase(fh.readline().strip())
            fh.close()
            assert (link_pointer == dist.location), 'Egg-link %s does not match installed location of %s (at %s)' % (link_pointer, self.name, dist.location)
            paths_to_remove.add(develop_egg_link)
            easy_install_pth = os.path.join(os.path.dirname(develop_egg_link),
                                            'easy-install.pth')
            paths_to_remove.add_pth(easy_install_pth, dist.location)
        elif dist_info_exists:
            for path in pip.wheel.uninstallation_paths(dist):
                paths_to_remove.add(path)

        # find distutils scripts= scripts
        if dist.has_metadata('scripts') and dist.metadata_isdir('scripts'):
            for script in dist.metadata_listdir('scripts'):
                if dist_in_usersite(dist):
                    bin_dir = bin_user
                else:
                    bin_dir = bin_py
                paths_to_remove.add(os.path.join(bin_dir, script))
                if sys.platform == 'win32':
                    paths_to_remove.add(os.path.join(bin_dir, script) + '.bat')

        # find console_scripts
        if dist.has_metadata('entry_points.txt'):
            config = ConfigParser.SafeConfigParser()
            config.readfp(FakeFile(dist.get_metadata_lines('entry_points.txt')))
            if config.has_section('console_scripts'):
                for name, value in config.items('console_scripts'):
                    if dist_in_usersite(dist):
                        bin_dir = bin_user
                    else:
                        bin_dir = bin_py
                    paths_to_remove.add(os.path.join(bin_dir, name))
                    if sys.platform == 'win32':
                        paths_to_remove.add(os.path.join(bin_dir, name) + '.exe')
                        paths_to_remove.add(os.path.join(bin_dir, name) + '.exe.manifest')
                        paths_to_remove.add(os.path.join(bin_dir, name) + '-script.py')

        paths_to_remove.remove(auto_confirm)
        self.uninstalled = paths_to_remove

    def rollback_uninstall(self):
        if self.uninstalled:
            self.uninstalled.rollback()
        else:
            logger.error("Can't rollback %s, nothing uninstalled."
                         % (self.project_name,))

    def commit_uninstall(self):
        if self.uninstalled:
            self.uninstalled.commit()
        else:
            logger.error("Can't commit %s, nothing uninstalled."
                         % (self.project_name,))

    def archive(self, build_dir):
        assert self.source_dir
        create_archive = True
        archive_name = '%s-%s.zip' % (self.name, self.installed_version)
        archive_path = os.path.join(build_dir, archive_name)
        if os.path.exists(archive_path):
            response = ask_path_exists(
                'The file %s exists. (i)gnore, (w)ipe, (b)ackup ' %
                display_path(archive_path), ('i', 'w', 'b'))
            if response == 'i':
                create_archive = False
            elif response == 'w':
                logger.warn('Deleting %s' % display_path(archive_path))
                os.remove(archive_path)
            elif response == 'b':
                dest_file = backup_dir(archive_path)
                logger.warn('Backing up %s to %s'
                            % (display_path(archive_path), display_path(dest_file)))
                shutil.move(archive_path, dest_file)
        if create_archive:
            zip = zipfile.ZipFile(archive_path, 'w', zipfile.ZIP_DEFLATED)
            dir = os.path.normcase(os.path.abspath(self.source_dir))
            for dirpath, dirnames, filenames in os.walk(dir):
                if 'pip-egg-info' in dirnames:
                    dirnames.remove('pip-egg-info')
                for dirname in dirnames:
                    dirname = os.path.join(dirpath, dirname)
                    name = self._clean_zip_name(dirname, dir)
                    zipdir = zipfile.ZipInfo(self.name + '/' + name + '/')
                    zipdir.external_attr = 0x1ED << 16 # 0o755
                    zip.writestr(zipdir, '')
                for filename in filenames:
                    if filename == PIP_DELETE_MARKER_FILENAME:
                        continue
                    filename = os.path.join(dirpath, filename)
                    name = self._clean_zip_name(filename, dir)
                    zip.write(filename, self.name + '/' + name)
            zip.close()
            logger.indent -= 2
            logger.notify('Saved %s' % display_path(archive_path))

    def _clean_zip_name(self, name, prefix):
        assert name.startswith(prefix+os.path.sep), (
            "name %r doesn't start with prefix %r" % (name, prefix))
        name = name[len(prefix)+1:]
        name = name.replace(os.path.sep, '/')
        return name

    def install(self, install_options, global_options=(), root=None, strip_file_prefix=None):
        if self.editable:
            self.install_editable(install_options, global_options)
            return
        if self.is_wheel:
            version = pip.wheel.wheel_version(self.source_dir)
            pip.wheel.check_compatibility(version, self.name)

            self.move_wheel_files(
                self.source_dir,
                root=root,
                strip_file_prefix=strip_file_prefix
            )
            self.install_succeeded = True
            return

        temp_location = tempfile.mkdtemp('-record', 'pip-')
        record_filename = os.path.join(temp_location, 'install-record.txt')
        try:
            install_args = [sys.executable]
            install_args.append('-c')
            install_args.append(
            "import setuptools, tokenize;__file__=%r;"\
            "exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))" % self.setup_py)
            install_args += list(global_options) + ['install','--record', record_filename]

            if not self.as_egg:
                install_args += ['--single-version-externally-managed']

            if root is not None:
                install_args += ['--root', root]

            if self.pycompile:
                install_args += ["--compile"]
            else:
                install_args += ["--no-compile"]

            if running_under_virtualenv():
                ## FIXME: I'm not sure if this is a reasonable location; probably not
                ## but we can't put it in the default location, as that is a virtualenv symlink that isn't writable
                install_args += ['--install-headers',
                                 os.path.join(sys.prefix, 'include', 'site',
                                              'python' + get_python_version())]
            logger.notify('Running setup.py install for %s' % self.name)
            logger.indent += 2
            try:
                call_subprocess(install_args + install_options,
                    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
            finally:
                logger.indent -= 2
            if not os.path.exists(record_filename):
                logger.notify('Record file %s not found' % record_filename)
                return
            self.install_succeeded = True
            if self.as_egg:
                # there's no --always-unzip option we can pass to install command
                # so we unable to save the installed-files.txt
                return

            def prepend_root(path):
                if root is None or not os.path.isabs(path):
                    return path
                else:
                    return change_root(root, path)

            f = open(record_filename)
            for line in f:
                line = line.strip()
                if line.endswith('.egg-info'):
                    egg_info_dir = prepend_root(line)
                    break
            else:
                logger.warn('Could not find .egg-info directory in install record for %s' % self)
                ## FIXME: put the record somewhere
                ## FIXME: should this be an error?
                return
            f.close()
            new_lines = []
            f = open(record_filename)
            for line in f:
                filename = line.strip()
                if os.path.isdir(filename):
                    filename += os.path.sep
                new_lines.append(make_path_relative(prepend_root(filename), egg_info_dir))
            f.close()
            f = open(os.path.join(egg_info_dir, 'installed-files.txt'), 'w')
            f.write('\n'.join(new_lines)+'\n')
            f.close()
        finally:
            if os.path.exists(record_filename):
                os.remove(record_filename)
            os.rmdir(temp_location)

    def remove_temporary_source(self):
        """Remove the source files from this requirement, if they are marked
        for deletion"""
        if self.is_bundle or os.path.exists(self.delete_marker_filename):
            logger.info('Removing source in %s' % self.source_dir)
            if self.source_dir:
                rmtree(self.source_dir)
            self.source_dir = None
        if self._temp_build_dir and os.path.exists(self._temp_build_dir):
            rmtree(self._temp_build_dir)
        self._temp_build_dir = None

    def install_editable(self, install_options, global_options=()):
        logger.notify('Running setup.py develop for %s' % self.name)
        logger.indent += 2
        try:
            ## FIXME: should we do --install-headers here too?
            call_subprocess(
                [sys.executable, '-c',
                 "import setuptools, tokenize; __file__=%r; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))" % self.setup_py]
                + list(global_options) + ['develop', '--no-deps'] + list(install_options),

                cwd=self.source_dir, filter_stdout=self._filter_install,
                show_stdout=False)
        finally:
            logger.indent -= 2
        self.install_succeeded = True

    def _filter_install(self, line):
        level = logger.NOTIFY
        for regex in [r'^running .*', r'^writing .*', '^creating .*', '^[Cc]opying .*',
                      r'^reading .*', r"^removing .*\.egg-info' \(and everything under it\)$",
                      r'^byte-compiling ',
                      # Not sure what this warning is, but it seems harmless:
                      r"^warning: manifest_maker: standard file '-c' not found$"]:
            if re.search(regex, line.strip()):
                level = logger.INFO
                break
        return (level, line)

    def check_if_exists(self):
        """Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.conflicts_with appropriately."""

        if self.req is None:
            return False
        try:
            # DISTRIBUTE TO SETUPTOOLS UPGRADE HACK (1 of 3 parts)
            # if we've already set distribute as a conflict to setuptools
            # then this check has already run before.  we don't want it to
            # run again, and return False, since it would block the uninstall
            # TODO: remove this later
            if (self.req.project_name == 'setuptools'
                and self.conflicts_with
                and self.conflicts_with.project_name == 'distribute'):
                return True
            else:
                self.satisfied_by = pkg_resources.get_distribution(self.req)
        except pkg_resources.DistributionNotFound:
            return False
        except pkg_resources.VersionConflict:
            existing_dist = pkg_resources.get_distribution(self.req.project_name)
            if self.use_user_site:
                if dist_in_usersite(existing_dist):
                    self.conflicts_with = existing_dist
                elif running_under_virtualenv() and dist_in_site_packages(existing_dist):
                    raise InstallationError("Will not install to the user site because it will lack sys.path precedence to %s in %s"
                                            %(existing_dist.project_name, existing_dist.location))
            else:
                self.conflicts_with = existing_dist
        return True

    @property
    def is_wheel(self):
        return self.url and '.whl' in self.url

    @property
    def is_bundle(self):
        if self._is_bundle is not None:
            return self._is_bundle
        base = self._temp_build_dir
        if not base:
            ## FIXME: this doesn't seem right:
            return False
        self._is_bundle = (os.path.exists(os.path.join(base, 'pip-manifest.txt'))
                           or os.path.exists(os.path.join(base, 'pyinstall-manifest.txt')))
        return self._is_bundle

    def bundle_requirements(self):
        for dest_dir in self._bundle_editable_dirs:
            package = os.path.basename(dest_dir)
            ## FIXME: svnism:
            for vcs_backend in vcs.backends:
                url = rev = None
                vcs_bundle_file = os.path.join(
                    dest_dir, vcs_backend.bundle_file)
                if os.path.exists(vcs_bundle_file):
                    vc_type = vcs_backend.name
                    fp = open(vcs_bundle_file)
                    content = fp.read()
                    fp.close()
                    url, rev = vcs_backend().parse_vcs_bundle_file(content)
                    break
            if url:
                url = '%s+%s@%s' % (vc_type, url, rev)
            else:
                url = None
            yield InstallRequirement(
                package, self, editable=True, url=url,
                update=False, source_dir=dest_dir, from_bundle=True)
        for dest_dir in self._bundle_build_dirs:
            package = os.path.basename(dest_dir)
            yield InstallRequirement(package, self,source_dir=dest_dir, from_bundle=True)

    def move_bundle_files(self, dest_build_dir, dest_src_dir):
        base = self._temp_build_dir
        assert base
        src_dir = os.path.join(base, 'src')
        build_dir = os.path.join(base, 'build')
        bundle_build_dirs = []
        bundle_editable_dirs = []
        for source_dir, dest_dir, dir_collection in [
            (src_dir, dest_src_dir, bundle_editable_dirs),
            (build_dir, dest_build_dir, bundle_build_dirs)]:
            if os.path.exists(source_dir):
                for dirname in os.listdir(source_dir):
                    dest = os.path.join(dest_dir, dirname)
                    dir_collection.append(dest)
                    if os.path.exists(dest):
                        logger.warn('The directory %s (containing package %s) already exists; cannot move source from bundle %s'
                                    % (dest, dirname, self))
                        continue
                    if not os.path.exists(dest_dir):
                        logger.info('Creating directory %s' % dest_dir)
                        os.makedirs(dest_dir)
                    shutil.move(os.path.join(source_dir, dirname), dest)
                if not os.listdir(source_dir):
                    os.rmdir(source_dir)
        self._temp_build_dir = None
        self._bundle_build_dirs = bundle_build_dirs
        self._bundle_editable_dirs = bundle_editable_dirs

    def move_wheel_files(self, wheeldir, root=None, strip_file_prefix=None):
        move_wheel_files(
            self.name, self.req, wheeldir,
            user=self.use_user_site,
            home=self.target_dir,
            root=root,
            pycompile=self.pycompile,
            strip_file_prefix=strip_file_prefix,
        )

    @property
    def delete_marker_filename(self):
        assert self.source_dir
        return os.path.join(self.source_dir, PIP_DELETE_MARKER_FILENAME)


class Requirements(object):

    def __init__(self):
        self._keys = []
        self._dict = {}

    def keys(self):
        return self._keys

    def values(self):
        return [self._dict[key] for key in self._keys]

    def __contains__(self, item):
        return item in self._keys

    def __setitem__(self, key, value):
        if key not in self._keys:
            self._keys.append(key)
        self._dict[key] = value

    def __getitem__(self, key):
        return self._dict[key]

    def __repr__(self):
        values = ['%s: %s' % (repr(k), repr(self[k])) for k in self.keys()]
        return 'Requirements({%s})' % ', '.join(values)


class RequirementSet(object):

    def __init__(self, build_dir, src_dir, download_dir, download_cache=None,
                 upgrade=False, ignore_installed=False, as_egg=False,
                 target_dir=None, ignore_dependencies=False,
                 force_reinstall=False, use_user_site=False, session=None,
                 pycompile=True, wheel_download_dir=None):
        self.build_dir = build_dir
        self.src_dir = src_dir
        self.download_dir = download_dir
        if download_cache:
            download_cache = os.path.expanduser(download_cache)
        self.download_cache = download_cache
        self.upgrade = upgrade
        self.ignore_installed = ignore_installed
        self.force_reinstall = force_reinstall
        self.requirements = Requirements()
        # Mapping of alias: real_name
        self.requirement_aliases = {}
        self.unnamed_requirements = []
        self.ignore_dependencies = ignore_dependencies
        self.successfully_downloaded = []
        self.successfully_installed = []
        self.reqs_to_cleanup = []
        self.as_egg = as_egg
        self.use_user_site = use_user_site
        self.target_dir = target_dir #set from --target option
        self.session = session or PipSession()
        self.pycompile = pycompile
        self.wheel_download_dir = wheel_download_dir

    def __str__(self):
        reqs = [req for req in self.requirements.values()
                if not req.comes_from]
        reqs.sort(key=lambda req: req.name.lower())
        return ' '.join([str(req.req) for req in reqs])

    def add_requirement(self, install_req):
        name = install_req.name
        install_req.as_egg = self.as_egg
        install_req.use_user_site = self.use_user_site
        install_req.target_dir = self.target_dir
        install_req.pycompile = self.pycompile
        if not name:
            #url or path requirement w/o an egg fragment
            self.unnamed_requirements.append(install_req)
        else:
            if self.has_requirement(name):
                raise InstallationError(
                    'Double requirement given: %s (already in %s, name=%r)'
                    % (install_req, self.get_requirement(name), name))
            self.requirements[name] = install_req
            ## FIXME: what about other normalizations?  E.g., _ vs. -?
            if name.lower() != name:
                self.requirement_aliases[name.lower()] = name

    def has_requirement(self, project_name):
        for name in project_name, project_name.lower():
            if name in self.requirements or name in self.requirement_aliases:
                return True
        return False

    @property
    def has_requirements(self):
        return list(self.requirements.values()) or self.unnamed_requirements

    @property
    def has_editables(self):
        if any(req.editable for req in self.requirements.values()):
            return True
        if any(req.editable for req in self.unnamed_requirements):
            return True
        return False

    @property
    def is_download(self):
        if self.download_dir:
            self.download_dir = os.path.expanduser(self.download_dir)
            if os.path.exists(self.download_dir):
                return True
            else:
                logger.fatal('Could not find download directory')
                raise InstallationError(
                    "Could not find or access download directory '%s'"
                    % display_path(self.download_dir))
        return False

    def get_requirement(self, project_name):
        for name in project_name, project_name.lower():
            if name in self.requirements:
                return self.requirements[name]
            if name in self.requirement_aliases:
                return self.requirements[self.requirement_aliases[name]]
        raise KeyError("No project with the name %r" % project_name)

    def uninstall(self, auto_confirm=False):
        for req in self.requirements.values():
            req.uninstall(auto_confirm=auto_confirm)
            req.commit_uninstall()

    def locate_files(self):
        ## FIXME: duplicates code from prepare_files; relevant code should
        ##        probably be factored out into a separate method
        unnamed = list(self.unnamed_requirements)
        reqs = list(self.requirements.values())
        while reqs or unnamed:
            if unnamed:
                req_to_install = unnamed.pop(0)
            else:
                req_to_install = reqs.pop(0)
            install_needed = True
            if not self.ignore_installed and not req_to_install.editable:
                req_to_install.check_if_exists()
                if req_to_install.satisfied_by:
                    if self.upgrade:
                        #don't uninstall conflict if user install and and conflict is not user install
                        if not (self.use_user_site and not dist_in_usersite(req_to_install.satisfied_by)):
                            req_to_install.conflicts_with = req_to_install.satisfied_by
                        req_to_install.satisfied_by = None
                    else:
                        install_needed = False
                if req_to_install.satisfied_by:
                    logger.notify('Requirement already satisfied '
                                  '(use --upgrade to upgrade): %s'
                                  % req_to_install)

            if req_to_install.editable:
                if req_to_install.source_dir is None:
                    req_to_install.source_dir = req_to_install.build_location(self.src_dir)
            elif install_needed:
                req_to_install.source_dir = req_to_install.build_location(self.build_dir, not self.is_download)

            if req_to_install.source_dir is not None and not os.path.isdir(req_to_install.source_dir):
                raise InstallationError('Could not install requirement %s '
                                       'because source folder %s does not exist '
                                       '(perhaps --no-download was used without first running '
                                       'an equivalent install with --no-install?)'
                                       % (req_to_install, req_to_install.source_dir))

    def prepare_files(self, finder, force_root_egg_info=False, bundle=False):
        """Prepare process. Create temp directories, download and/or unpack files."""
        unnamed = list(self.unnamed_requirements)
        reqs = list(self.requirements.values())
        while reqs or unnamed:
            if unnamed:
                req_to_install = unnamed.pop(0)
            else:
                req_to_install = reqs.pop(0)
            install = True
            best_installed = False
            not_found = None
            if not self.ignore_installed and not req_to_install.editable:
                req_to_install.check_if_exists()
                if req_to_install.satisfied_by:
                    if self.upgrade:
                        if not self.force_reinstall and not req_to_install.url:
                            try:
                                url = finder.find_requirement(
                                    req_to_install, self.upgrade)
                            except BestVersionAlreadyInstalled:
                                best_installed = True
                                install = False
                            except DistributionNotFound:
                                not_found = sys.exc_info()[1]
                            else:
                                # Avoid the need to call find_requirement again
                                req_to_install.url = url.url

                        if not best_installed:
                            #don't uninstall conflict if user install and conflict is not user install
                            if not (self.use_user_site and not dist_in_usersite(req_to_install.satisfied_by)):
                                req_to_install.conflicts_with = req_to_install.satisfied_by
                            req_to_install.satisfied_by = None
                    else:
                        install = False
                if req_to_install.satisfied_by:
                    if best_installed:
                        logger.notify('Requirement already up-to-date: %s'
                                      % req_to_install)
                    else:
                        logger.notify('Requirement already satisfied '
                                      '(use --upgrade to upgrade): %s'
                                      % req_to_install)
            if req_to_install.editable:
                logger.notify('Obtaining %s' % req_to_install)
            elif install:
                if req_to_install.url and req_to_install.url.lower().startswith('file:'):
                    logger.notify('Unpacking %s' % display_path(url_to_path(req_to_install.url)))
                else:
                    logger.notify('Downloading/unpacking %s' % req_to_install)
            logger.indent += 2
            try:
                is_bundle = False
                is_wheel = False
                if req_to_install.editable:
                    if req_to_install.source_dir is None:
                        location = req_to_install.build_location(self.src_dir)
                        req_to_install.source_dir = location
                    else:
                        location = req_to_install.source_dir
                    if not os.path.exists(self.build_dir):
                        _make_build_dir(self.build_dir)
                    req_to_install.update_editable(not self.is_download)
                    if self.is_download:
                        req_to_install.run_egg_info()
                        req_to_install.archive(self.download_dir)
                    else:
                        req_to_install.run_egg_info()
                elif install:
                    ##@@ if filesystem packages are not marked
                    ##editable in a req, a non deterministic error
                    ##occurs when the script attempts to unpack the
                    ##build directory

                    # NB: This call can result in the creation of a temporary build directory
                    location = req_to_install.build_location(self.build_dir, not self.is_download)
                    unpack = True
                    url = None

                    # In the case where the req comes from a bundle, we should
                    # assume a build dir exists and move on
                    if req_to_install.from_bundle:
                        pass
                    # If a checkout exists, it's unwise to keep going.  version
                    # inconsistencies are logged later, but do not fail the
                    # installation.
                    elif os.path.exists(os.path.join(location, 'setup.py')):
                        raise PreviousBuildDirError(textwrap.dedent("""
                          pip can't proceed with requirement '%s' due to a pre-existing build directory.
                           location: %s
                          This is likely due to a previous installation that failed.
                          pip is being responsible and not assuming it can delete this.
                          Please delete it and try again.
                        """ % (req_to_install, location)))
                    else:
                        ## FIXME: this won't upgrade when there's an existing package unpacked in `location`
                        if req_to_install.url is None:
                            if not_found:
                                raise not_found
                            url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
                        else:
                            ## FIXME: should req_to_install.url already be a link?
                            url = Link(req_to_install.url)
                            assert url
                        if url:
                            try:

                                if (
                                    url.filename.endswith(wheel_ext)
                                    and self.wheel_download_dir
                                ):
                                    # when doing 'pip wheel`
                                    download_dir = self.wheel_download_dir
                                    do_download = True
                                else:
                                    download_dir = self.download_dir
                                    do_download = self.is_download
                                self.unpack_url(
                                    url, location, download_dir,
                                    do_download,
                                    )
                            except HTTPError as exc:
                                logger.fatal(
                                    'Could not install requirement %s because '
                                    'of error %s' % (req_to_install, exc)
                                )
                                raise InstallationError(
                                    'Could not install requirement %s because of HTTP error %s for URL %s'
                                    % (req_to_install, e, url))
                        else:
                            unpack = False
                    if unpack:
                        is_bundle = req_to_install.is_bundle
                        is_wheel = url and url.filename.endswith(wheel_ext)
                        if is_bundle:
                            req_to_install.move_bundle_files(self.build_dir, self.src_dir)
                            for subreq in req_to_install.bundle_requirements():
                                reqs.append(subreq)
                                self.add_requirement(subreq)
                        elif self.is_download:
                            req_to_install.source_dir = location
                            if not is_wheel:
                                # FIXME: see https://github.com/pypa/pip/issues/1112
                                req_to_install.run_egg_info()
                            if url and url.scheme in vcs.all_schemes:
                                req_to_install.archive(self.download_dir)
                        elif is_wheel:
                            req_to_install.source_dir = location
                            req_to_install.url = url.url
                        else:
                            req_to_install.source_dir = location
                            req_to_install.run_egg_info()
                            if force_root_egg_info:
                                # We need to run this to make sure that the .egg-info/
                                # directory is created for packing in the bundle
                                req_to_install.run_egg_info(force_root_egg_info=True)
                            req_to_install.assert_source_matches_version()
                            #@@ sketchy way of identifying packages not grabbed from an index
                            if bundle and req_to_install.url:
                                self.copy_to_build_dir(req_to_install)
                                install = False
                        # req_to_install.req is only avail after unpack for URL pkgs
                        # repeat check_if_exists to uninstall-on-upgrade (#14)
                        if not self.ignore_installed:
                            req_to_install.check_if_exists()
                        if req_to_install.satisfied_by:
                            if self.upgrade or self.ignore_installed:
                                #don't uninstall conflict if user install and and conflict is not user install
                                if not (self.use_user_site and not dist_in_usersite(req_to_install.satisfied_by)):
                                    req_to_install.conflicts_with = req_to_install.satisfied_by
                                req_to_install.satisfied_by = None
                            else:
                                logger.notify(
                                    'Requirement already satisfied (use '
                                    '--upgrade to upgrade): %s' %
                                    req_to_install
                                )
                                install = False
                if is_wheel:
                    dist = list(
                        pkg_resources.find_distributions(location)
                    )[0]
                    if not req_to_install.req:
                        req_to_install.req = dist.as_requirement()
                        self.add_requirement(req_to_install)
                    if not self.ignore_dependencies:
                        for subreq in dist.requires(
                                req_to_install.extras):
                            if self.has_requirement(
                                    subreq.project_name):
                                continue
                            subreq = InstallRequirement(str(subreq),
                                                        req_to_install)
                            reqs.append(subreq)
                            self.add_requirement(subreq)

                # sdists
                elif not is_bundle:
                    ## FIXME: shouldn't be globally added:
                    finder.add_dependency_links(req_to_install.dependency_links)
                    if (req_to_install.extras):
                        logger.notify("Installing extra requirements: %r" % ','.join(req_to_install.extras))
                    if not self.ignore_dependencies:
                        for req in req_to_install.requirements(req_to_install.extras):
                            try:
                                name = pkg_resources.Requirement.parse(req).project_name
                            except ValueError:
                                e = sys.exc_info()[1]
                                ## FIXME: proper warning
                                logger.error('Invalid requirement: %r (%s) in requirement %s' % (req, e, req_to_install))
                                continue
                            if self.has_requirement(name):
                                ## FIXME: check for conflict
                                continue
                            subreq = InstallRequirement(req, req_to_install)
                            reqs.append(subreq)
                            self.add_requirement(subreq)
                    if not self.has_requirement(req_to_install.name):
                        #'unnamed' requirements will get added here
                        self.add_requirement(req_to_install)

                # cleanup tmp src
                if not is_bundle:
                    if (
                        self.is_download or
                        req_to_install._temp_build_dir is not None
                    ):
                        self.reqs_to_cleanup.append(req_to_install)

                if install:
                    self.successfully_downloaded.append(req_to_install)
                    if bundle and (req_to_install.url and req_to_install.url.startswith('file:///')):
                        self.copy_to_build_dir(req_to_install)
            finally:
                logger.indent -= 2

    def cleanup_files(self, bundle=False):
        """Clean up files, remove builds."""
        logger.notify('Cleaning up...')
        logger.indent += 2
        for req in self.reqs_to_cleanup:
            req.remove_temporary_source()

        remove_dir = []
        if self._pip_has_created_build_dir():
            remove_dir.append(self.build_dir)

        # The source dir of a bundle can always be removed.
        # FIXME: not if it pre-existed the bundle!
        if bundle:
            remove_dir.append(self.src_dir)

        for dir in remove_dir:
            if os.path.exists(dir):
                logger.info('Removing temporary dir %s...' % dir)
                rmtree(dir)

        logger.indent -= 2

    def _pip_has_created_build_dir(self):
        return (self.build_dir == build_prefix and
                os.path.exists(os.path.join(self.build_dir, PIP_DELETE_MARKER_FILENAME)))

    def copy_to_build_dir(self, req_to_install):
        target_dir = req_to_install.editable and self.src_dir or self.build_dir
        logger.info("Copying %s to %s" % (req_to_install.name, target_dir))
        dest = os.path.join(target_dir, req_to_install.name)
        shutil.copytree(req_to_install.source_dir, dest)
        call_subprocess(["python", "%s/setup.py" % dest, "clean"], cwd=dest,
                        command_desc='python setup.py clean')

    def unpack_url(self, link, location, download_dir=None,
                   only_download=False):
        if download_dir is None:
            download_dir = self.download_dir

        # non-editable vcs urls
        if is_vcs_url(link):
            if only_download:
                loc = download_dir
            else:
                loc = location
            unpack_vcs_link(link, loc, only_download)

        # file urls
        elif is_file_url(link):
            unpack_file_url(link, location, download_dir)
            if only_download:
                write_delete_marker_file(location)

        # http urls
        else:
            unpack_http_url(
                link,
                location,
                self.download_cache,
                download_dir,
                self.session,
            )
            if only_download:
                write_delete_marker_file(location)

    def install(self, install_options, global_options=(), *args, **kwargs):
        """Install everything in this set (after having downloaded and unpacked the packages)"""
        to_install = [r for r in self.requirements.values()
                      if not r.satisfied_by]

        # DISTRIBUTE TO SETUPTOOLS UPGRADE HACK (1 of 3 parts)
        # move the distribute-0.7.X wrapper to the end because it does not
        # install a setuptools package. by moving it to the end, we ensure it's
        # setuptools dependency is handled first, which will provide the
        # setuptools package
        # TODO: take this out later
        distribute_req = pkg_resources.Requirement.parse("distribute>=0.7")
        for req in to_install:
            if req.name == 'distribute' and req.installed_version in distribute_req:
                to_install.remove(req)
                to_install.append(req)

        if to_install:
            logger.notify('Installing collected packages: %s' % ', '.join([req.name for req in to_install]))
        logger.indent += 2
        try:
            for requirement in to_install:

                # DISTRIBUTE TO SETUPTOOLS UPGRADE HACK (1 of 3 parts)
                # when upgrading from distribute-0.6.X to the new merged
                # setuptools in py2, we need to force setuptools to uninstall
                # distribute. In py3, which is always using distribute, this
                # conversion is already happening in distribute's pkg_resources.
                # It's ok *not* to check if setuptools>=0.7 because if someone
                # were actually trying to ugrade from distribute to setuptools
                # 0.6.X, then all this could do is actually help, although that
                # upgade path was certainly never "supported"
                # TODO: remove this later
                if requirement.name == 'setuptools':
                    try:
                        # only uninstall distribute<0.7. For >=0.7, setuptools
                        # will also be present, and that's what we need to
                        # uninstall
                        distribute_requirement = pkg_resources.Requirement.parse("distribute<0.7")
                        existing_distribute = pkg_resources.get_distribution("distribute")
                        if existing_distribute in distribute_requirement:
                            requirement.conflicts_with = existing_distribute
                    except pkg_resources.DistributionNotFound:
                        # distribute wasn't installed, so nothing to do
                        pass

                if requirement.conflicts_with:
                    logger.notify('Found existing installation: %s'
                                  % requirement.conflicts_with)
                    logger.indent += 2
                    try:
                        requirement.uninstall(auto_confirm=True)
                    finally:
                        logger.indent -= 2
                try:
                    requirement.install(install_options, global_options, *args, **kwargs)
                except:
                    # if install did not succeed, rollback previous uninstall
                    if requirement.conflicts_with and not requirement.install_succeeded:
                        requirement.rollback_uninstall()
                    raise
                else:
                    if requirement.conflicts_with and requirement.install_succeeded:
                        requirement.commit_uninstall()
                requirement.remove_temporary_source()
        finally:
            logger.indent -= 2
        self.successfully_installed = to_install

    def create_bundle(self, bundle_filename):
        ## FIXME: can't decide which is better; zip is easier to read
        ## random files from, but tar.bz2 is smaller and not as lame a
        ## format.

        ## FIXME: this file should really include a manifest of the
        ## packages, maybe some other metadata files.  It would make
        ## it easier to detect as well.
        zip = zipfile.ZipFile(bundle_filename, 'w', zipfile.ZIP_DEFLATED)
        vcs_dirs = []
        for dir, basename in (self.build_dir, 'build'), (self.src_dir, 'src'):
            dir = os.path.normcase(os.path.abspath(dir))
            for dirpath, dirnames, filenames in os.walk(dir):
                for backend in vcs.backends:
                    vcs_backend = backend()
                    vcs_url = vcs_rev = None
                    if vcs_backend.dirname in dirnames:
                        for vcs_dir in vcs_dirs:
                            if dirpath.startswith(vcs_dir):
                                # vcs bundle file already in parent directory
                                break
                        else:
                            vcs_url, vcs_rev = vcs_backend.get_info(
                                os.path.join(dir, dirpath))
                            vcs_dirs.append(dirpath)
                        vcs_bundle_file = vcs_backend.bundle_file
                        vcs_guide = vcs_backend.guide % {'url': vcs_url,
                                                         'rev': vcs_rev}
                        dirnames.remove(vcs_backend.dirname)
                        break
                if 'pip-egg-info' in dirnames:
                    dirnames.remove('pip-egg-info')
                for dirname in dirnames:
                    dirname = os.path.join(dirpath, dirname)
                    name = self._clean_zip_name(dirname, dir)
                    zip.writestr(basename + '/' + name + '/', '')
                for filename in filenames:
                    if filename == PIP_DELETE_MARKER_FILENAME:
                        continue
                    filename = os.path.join(dirpath, filename)
                    name = self._clean_zip_name(filename, dir)
                    zip.write(filename, basename + '/' + name)
                if vcs_url:
                    name = os.path.join(dirpath, vcs_bundle_file)
                    name = self._clean_zip_name(name, dir)
                    zip.writestr(basename + '/' + name, vcs_guide)

        zip.writestr('pip-manifest.txt', self.bundle_requirements())
        zip.close()

    BUNDLE_HEADER = '''\
# This is a pip bundle file, that contains many source packages
# that can be installed as a group.  You can install this like:
#     pip this_file.zip
# The rest of the file contains a list of all the packages included:
'''

    def bundle_requirements(self):
        parts = [self.BUNDLE_HEADER]
        for req in [req for req in self.requirements.values()
                    if not req.comes_from]:
            parts.append('%s==%s\n' % (req.name, req.installed_version))
        parts.append('# These packages were installed to satisfy the above requirements:\n')
        for req in [req for req in self.requirements.values()
                    if req.comes_from]:
            parts.append('%s==%s\n' % (req.name, req.installed_version))
        ## FIXME: should we do something with self.unnamed_requirements?
        return ''.join(parts)

    def _clean_zip_name(self, name, prefix):
        assert name.startswith(prefix+os.path.sep), (
            "name %r doesn't start with prefix %r" % (name, prefix))
        name = name[len(prefix)+1:]
        name = name.replace(os.path.sep, '/')
        return name


def _make_build_dir(build_dir):
    os.makedirs(build_dir)
    write_delete_marker_file(build_dir)


_scheme_re = re.compile(r'^(http|https|file):', re.I)


def parse_requirements(filename, finder=None, comes_from=None, options=None,
                       session=None):
    if session is None:
        session = PipSession()

    skip_match = None
    skip_regex = options.skip_requirements_regex if options else None
    if skip_regex:
        skip_match = re.compile(skip_regex)
    reqs_file_dir = os.path.dirname(os.path.abspath(filename))
    filename, content = get_file_content(filename,
        comes_from=comes_from,
        session=session,
    )
    for line_number, line in enumerate(content.splitlines()):
        line_number += 1
        line = line.strip()

        # Remove comments from file
        line = re.sub(r"(^|\s)#.*$", "", line)

        if not line or line.startswith('#'):
            continue
        if skip_match and skip_match.search(line):
            continue
        if line.startswith('-r') or line.startswith('--requirement'):
            if line.startswith('-r'):
                req_url = line[2:].strip()
            else:
                req_url = line[len('--requirement'):].strip().strip('=')
            if _scheme_re.search(filename):
                # Relative to a URL
                req_url = urlparse.urljoin(filename, req_url)
            elif not _scheme_re.search(req_url):
                req_url = os.path.join(os.path.dirname(filename), req_url)
            for item in parse_requirements(req_url, finder, comes_from=filename, options=options, session=session):
                yield item
        elif line.startswith('-Z') or line.startswith('--always-unzip'):
            # No longer used, but previously these were used in
            # requirement files, so we'll ignore.
            pass
        elif line.startswith('-f') or line.startswith('--find-links'):
            if line.startswith('-f'):
                line = line[2:].strip()
            else:
                line = line[len('--find-links'):].strip().lstrip('=')
            ## FIXME: it would be nice to keep track of the source of
            ## the find_links:
            # support a find-links local path relative to a requirements file
            relative_to_reqs_file = os.path.join(reqs_file_dir, line)
            if os.path.exists(relative_to_reqs_file):
                line = relative_to_reqs_file
            if finder:
                finder.find_links.append(line)
        elif line.startswith('-i') or line.startswith('--index-url'):
            if line.startswith('-i'):
                line = line[2:].strip()
            else:
                line = line[len('--index-url'):].strip().lstrip('=')
            if finder:
                finder.index_urls = [line]
        elif line.startswith('--extra-index-url'):
            line = line[len('--extra-index-url'):].strip().lstrip('=')
            if finder:
                finder.index_urls.append(line)
        elif line.startswith('--use-wheel'):
            finder.use_wheel = True
        elif line.startswith('--no-index'):
            finder.index_urls = []
        elif line.startswith("--allow-external"):
            line = line[len("--allow-external"):].strip().lstrip("=")
            finder.allow_external |= set([normalize_name(line).lower()])
        elif line.startswith("--allow-all-external"):
            finder.allow_all_external = True
        # Remove in 1.7
        elif line.startswith("--no-allow-external"):
            pass
        # Remove in 1.7
        elif line.startswith("--no-allow-insecure"):
            pass
        # Remove after 1.7
        elif line.startswith("--allow-insecure"):
            line = line[len("--allow-insecure"):].strip().lstrip("=")
            finder.allow_unverified |= set([normalize_name(line).lower()])
        elif line.startswith("--allow-unverified"):
            line = line[len("--allow-unverified"):].strip().lstrip("=")
            finder.allow_unverified |= set([normalize_name(line).lower()])
        else:
            comes_from = '-r %s (line %s)' % (filename, line_number)
            if line.startswith('-e') or line.startswith('--editable'):
                if line.startswith('-e'):
                    line = line[2:].strip()
                else:
                    line = line[len('--editable'):].strip().lstrip('=')
                req = InstallRequirement.from_editable(
                    line, comes_from=comes_from, default_vcs=options.default_vcs if options else None)
            else:
                req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
            yield req

def _strip_postfix(req):
    """
        Strip req postfix ( -dev, 0.2, etc )
    """
    ## FIXME: use package_to_requirement?
    match = re.search(r'^(.*?)(?:-dev|-\d.*)$', req)
    if match:
        # Strip off -dev, -0.2, etc.
        req = match.group(1)
    return req

def _build_req_from_url(url):

    parts = [p for p in url.split('#', 1)[0].split('/') if p]

    req = None
    if parts[-2] in ('tags', 'branches', 'tag', 'branch'):
        req = parts[-3]
    elif parts[-1] == 'trunk':
        req = parts[-2]
    return req

def _build_editable_options(req):

    """
        This method generates a dictionary of the query string
        parameters contained in a given editable URL.
    """
    regexp = re.compile(r"[\?#&](?P<name>[^&=]+)=(?P<value>[^&=]+)")
    matched = regexp.findall(req)

    if matched:
        ret = dict()
        for option in matched:
            (name, value) = option
            if name in ret:
                raise Exception("%s option already defined" % name)
            ret[name] = value
        return ret
    return None


def parse_editable(editable_req, default_vcs=None):
    """Parses svn+http://blahblah@rev#egg=Foobar into a requirement
    (Foobar) and a URL"""

    url = editable_req
    extras = None

    # If a file path is specified with extras, strip off the extras.
    m = re.match(r'^(.+)(\[[^\]]+\])$', url)
    if m:
        url_no_extras = m.group(1)
        extras = m.group(2)
    else:
        url_no_extras = url

    if os.path.isdir(url_no_extras):
        if not os.path.exists(os.path.join(url_no_extras, 'setup.py')):
            raise InstallationError("Directory %r is not installable. File 'setup.py' not found." % url_no_extras)
        # Treating it as code that has already been checked out
        url_no_extras = path_to_url(url_no_extras)

    if url_no_extras.lower().startswith('file:'):
        if extras:
            return None, url_no_extras, pkg_resources.Requirement.parse('__placeholder__' + extras).extras
        else:
            return None, url_no_extras, None

    for version_control in vcs:
        if url.lower().startswith('%s:' % version_control):
            url = '%s+%s' % (version_control, url)
            break

    if '+' not in url:
        if default_vcs:
            url = default_vcs + '+' + url
        else:
            raise InstallationError(
                '%s should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+' % editable_req)

    vc_type = url.split('+', 1)[0].lower()

    if not vcs.get_backend(vc_type):
        error_message = 'For --editable=%s only ' % editable_req + \
            ', '.join([backend.name + '+URL' for backend in vcs.backends]) + \
            ' is currently supported'
        raise InstallationError(error_message)

    try:
        options = _build_editable_options(editable_req)
    except Exception:
        message = sys.exc_info()[1]
        raise InstallationError(
            '--editable=%s error in editable options:%s' % (editable_req, message))

    if not options or 'egg' not in options:
        req = _build_req_from_url(editable_req)
        if not req:
            raise InstallationError('--editable=%s is not the right format; it must have #egg=Package' % editable_req)
    else:
        req = options['egg']

    package = _strip_postfix(req)
    return package, url, options


class UninstallPathSet(object):
    """A set of file paths to be removed in the uninstallation of a
    requirement."""
    def __init__(self, dist):
        self.paths = set()
        self._refuse = set()
        self.pth = {}
        self.dist = dist
        self.save_dir = None
        self._moved_paths = []

    def _permitted(self, path):
        """
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        """
        return is_local(path)

    def _can_uninstall(self):
        if not dist_is_local(self.dist):
            logger.notify("Not uninstalling %s at %s, outside environment %s"
                          % (self.dist.project_name, normalize_path(self.dist.location), sys.prefix))
            return False
        return True

    def add(self, path):
        path = normalize_path(path)
        if not os.path.exists(path):
            return
        if self._permitted(path):
            self.paths.add(path)
        else:
            self._refuse.add(path)

        # __pycache__ files can show up after 'installed-files.txt' is created, due to imports
        if os.path.splitext(path)[1] == '.py' and uses_pycache:
            self.add(imp.cache_from_source(path))


    def add_pth(self, pth_file, entry):
        pth_file = normalize_path(pth_file)
        if self._permitted(pth_file):
            if pth_file not in self.pth:
                self.pth[pth_file] = UninstallPthEntries(pth_file)
            self.pth[pth_file].add(entry)
        else:
            self._refuse.add(pth_file)

    def compact(self, paths):
        """Compact a path set to contain the minimal number of paths
        necessary to contain all paths in the set. If /a/path/ and
        /a/path/to/a/file.txt are both in the set, leave only the
        shorter path."""
        short_paths = set()
        for path in sorted(paths, key=len):
            if not any([(path.startswith(shortpath) and
                         path[len(shortpath.rstrip(os.path.sep))] == os.path.sep)
                        for shortpath in short_paths]):
                short_paths.add(path)
        return short_paths

    def _stash(self, path):
        return os.path.join(
            self.save_dir, os.path.splitdrive(path)[1].lstrip(os.path.sep))

    def remove(self, auto_confirm=False):
        """Remove paths in ``self.paths`` with confirmation (unless
        ``auto_confirm`` is True)."""
        if not self._can_uninstall():
            return
        if not self.paths:
            logger.notify("Can't uninstall '%s'. No files were found to uninstall." % self.dist.project_name)
            return
        logger.notify('Uninstalling %s:' % self.dist.project_name)
        logger.indent += 2
        paths = sorted(self.compact(self.paths))
        try:
            if auto_confirm:
                response = 'y'
            else:
                for path in paths:
                    logger.notify(path)
                response = ask('Proceed (y/n)? ', ('y', 'n'))
            if self._refuse:
                logger.notify('Not removing or modifying (outside of prefix):')
                for path in self.compact(self._refuse):
                    logger.notify(path)
            if response == 'y':
                self.save_dir = tempfile.mkdtemp(suffix='-uninstall',
                                                 prefix='pip-')
                for path in paths:
                    new_path = self._stash(path)
                    logger.info('Removing file or directory %s' % path)
                    self._moved_paths.append(path)
                    renames(path, new_path)
                for pth in self.pth.values():
                    pth.remove()
                logger.notify('Successfully uninstalled %s' % self.dist.project_name)

        finally:
            logger.indent -= 2

    def rollback(self):
        """Rollback the changes previously made by remove()."""
        if self.save_dir is None:
            logger.error("Can't roll back %s; was not uninstalled" % self.dist.project_name)
            return False
        logger.notify('Rolling back uninstall of %s' % self.dist.project_name)
        for path in self._moved_paths:
            tmp_path = self._stash(path)
            logger.info('Replacing %s' % path)
            renames(tmp_path, path)
        for pth in self.pth:
            pth.rollback()

    def commit(self):
        """Remove temporary save dir: rollback will no longer be possible."""
        if self.save_dir is not None:
            rmtree(self.save_dir)
            self.save_dir = None
            self._moved_paths = []


class UninstallPthEntries(object):
    def __init__(self, pth_file):
        if not os.path.isfile(pth_file):
            raise UninstallationError("Cannot remove entries from nonexistent file %s" % pth_file)
        self.file = pth_file
        self.entries = set()
        self._saved_lines = None

    def add(self, entry):
        entry = os.path.normcase(entry)
        # On Windows, os.path.normcase converts the entry to use
        # backslashes.  This is correct for entries that describe absolute
        # paths outside of site-packages, but all the others use forward
        # slashes.
        if sys.platform == 'win32' and not os.path.splitdrive(entry)[0]:
            entry = entry.replace('\\', '/')
        self.entries.add(entry)

    def remove(self):
        logger.info('Removing pth entries from %s:' % self.file)
        fh = open(self.file, 'rb')
        # windows uses '\r\n' with py3k, but uses '\n' with py2.x
        lines = fh.readlines()
        self._saved_lines = lines
        fh.close()
        if any(b('\r\n') in line for line in lines):
            endline = '\r\n'
        else:
            endline = '\n'
        for entry in self.entries:
            try:
                logger.info('Removing entry: %s' % entry)
                lines.remove(b(entry + endline))
            except ValueError:
                pass
        fh = open(self.file, 'wb')
        fh.writelines(lines)
        fh.close()

    def rollback(self):
        if self._saved_lines is None:
            logger.error('Cannot roll back changes to %s, none were made' % self.file)
            return False
        logger.info('Rolling %s back to previous state' % self.file)
        fh = open(self.file, 'wb')
        fh.writelines(self._saved_lines)
        fh.close()
        return True


class FakeFile(object):
    """Wrap a list of lines in an object with readline() to make
    ConfigParser happy."""
    def __init__(self, lines):
        self._gen = (l for l in lines)

    def readline(self):
        try:
            try:
                return next(self._gen)
            except NameError:
                return self._gen.next()
        except StopIteration:
            return ''

    def __iter__(self):
        return self._gen
python3.4/site-packages/pip/basecommand.py000064400000014662151735047260014470 0ustar00"""Base Command class, and related routines"""

import os
import sys
import tempfile
import traceback
import time
import optparse

from pip import cmdoptions
from pip.locations import running_under_virtualenv
from pip.log import logger
from pip.download import PipSession
from pip.exceptions import (BadCommand, InstallationError, UninstallationError,
                            CommandError, PreviousBuildDirError)
from pip.backwardcompat import StringIO
from pip.baseparser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.status_codes import (SUCCESS, ERROR, UNKNOWN_ERROR, VIRTUALENV_NOT_FOUND,
                              PREVIOUS_BUILD_DIR_ERROR)
from pip.util import get_prog


__all__ = ['Command']


class Command(object):
    name = None
    usage = None
    hidden = False

    def __init__(self):
        parser_kw = {
            'usage': self.usage,
            'prog': '%s %s' % (get_prog(), self.name),
            'formatter': UpdatingDefaultsHelpFormatter(),
            'add_help_option': False,
            'name': self.name,
            'description': self.__doc__,
        }

        self.parser = ConfigOptionParser(**parser_kw)

        # Commands should add options to this option group
        optgroup_name = '%s Options' % self.name.capitalize()
        self.cmd_opts = optparse.OptionGroup(self.parser, optgroup_name)

        # Add the general options
        gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, self.parser)
        self.parser.add_option_group(gen_opts)

    def _build_session(self, options):
        session = PipSession()

        # Handle custom ca-bundles from the user
        if options.cert:
            session.verify = options.cert

        # Handle timeouts
        if options.timeout:
            session.timeout = options.timeout

        # Handle configured proxies
        if options.proxy:
            session.proxies = {
                "http": options.proxy,
                "https": options.proxy,
            }

        # Determine if we can prompt the user for authentication or not
        session.auth.prompting = not options.no_input

        return session

    def setup_logging(self):
        pass

    def parse_args(self, args):
        # factored out for testability
        return self.parser.parse_args(args)

    def main(self, args):
        options, args = self.parse_args(args)

        level = 1  # Notify
        level += options.verbose
        level -= options.quiet
        level = logger.level_for_integer(4 - level)
        complete_log = []
        logger.add_consumers(
            (level, sys.stdout),
            (logger.DEBUG, complete_log.append),
        )
        if options.log_explicit_levels:
            logger.explicit_levels = True

        self.setup_logging()

        #TODO: try to get these passing down from the command?
        #      without resorting to os.environ to hold these.

        if options.no_input:
            os.environ['PIP_NO_INPUT'] = '1'

        if options.exists_action:
            os.environ['PIP_EXISTS_ACTION'] = ' '.join(options.exists_action)

        if options.require_venv:
            # If a venv is required check if it can really be found
            if not running_under_virtualenv():
                logger.fatal('Could not find an activated virtualenv (required).')
                sys.exit(VIRTUALENV_NOT_FOUND)

        if options.log:
            log_fp = open_logfile(options.log, 'a')
            logger.add_consumers((logger.DEBUG, log_fp))
        else:
            log_fp = None

        exit = SUCCESS
        store_log = False
        try:
            status = self.run(options, args)
            # FIXME: all commands should return an exit status
            # and when it is done, isinstance is not needed anymore
            if isinstance(status, int):
                exit = status
        except PreviousBuildDirError:
            e = sys.exc_info()[1]
            logger.fatal(str(e))
            logger.info('Exception information:\n%s' % format_exc())
            store_log = True
            exit = PREVIOUS_BUILD_DIR_ERROR
        except (InstallationError, UninstallationError):
            e = sys.exc_info()[1]
            logger.fatal(str(e))
            logger.info('Exception information:\n%s' % format_exc())
            store_log = True
            exit = ERROR
        except BadCommand:
            e = sys.exc_info()[1]
            logger.fatal(str(e))
            logger.info('Exception information:\n%s' % format_exc())
            store_log = True
            exit = ERROR
        except CommandError:
            e = sys.exc_info()[1]
            logger.fatal('ERROR: %s' % e)
            logger.info('Exception information:\n%s' % format_exc())
            exit = ERROR
        except KeyboardInterrupt:
            logger.fatal('Operation cancelled by user')
            logger.info('Exception information:\n%s' % format_exc())
            store_log = True
            exit = ERROR
        except:
            logger.fatal('Exception:\n%s' % format_exc())
            store_log = True
            exit = UNKNOWN_ERROR
        if store_log:
            log_file_fn = options.log_file
            text = '\n'.join(complete_log)
            try:
                log_file_fp = open_logfile(log_file_fn, 'w')
            except IOError:
                temp = tempfile.NamedTemporaryFile(delete=False)
                log_file_fn = temp.name
                log_file_fp = open_logfile(log_file_fn, 'w')
            logger.fatal('Storing debug log for failure in %s' % log_file_fn)
            log_file_fp.write(text)
            log_file_fp.close()
        if log_fp is not None:
            log_fp.close()
        return exit


def format_exc(exc_info=None):
    if exc_info is None:
        exc_info = sys.exc_info()
    out = StringIO()
    traceback.print_exception(*exc_info, **dict(file=out))
    return out.getvalue()


def open_logfile(filename, mode='a'):
    """Open the named log file in append mode.

    If the file already exists, a separator will also be printed to
    the file to separate past activity from current activity.
    """
    filename = os.path.expanduser(filename)
    filename = os.path.abspath(filename)
    dirname = os.path.dirname(filename)
    if not os.path.exists(dirname):
        os.makedirs(dirname)
    exists = os.path.exists(filename)

    log_fp = open(filename, mode)
    if exists:
        log_fp.write('%s\n' % ('-' * 60))
        log_fp.write('%s run on %s\n' % (sys.argv[0], time.strftime('%c')))
    return log_fp
python3.4/site-packages/pip/_vendor/_markerlib/markers.py000064400000007613151735047270017425 0ustar00# -*- coding: utf-8 -*-
"""Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
"""

__all__ = ['default_environment', 'compile', 'interpret']

import ast
import os
import platform
import sys
import weakref

_builtin_compile = compile

try:
    from platform import python_implementation
except ImportError:
    if os.name == "java":
        # Jython 2.5 has ast module, but not platform.python_implementation() function.
        def python_implementation():
            return "Jython"
    else:
        raise


# restricted set of variables
_VARS = {'sys.platform': sys.platform,
         'python_version': '%s.%s' % sys.version_info[:2],
         # FIXME parsing sys.platform is not reliable, but there is no other
         # way to get e.g. 2.7.2+, and the PEP is defined with sys.version
         'python_full_version': sys.version.split(' ', 1)[0],
         'os.name': os.name,
         'platform.version': platform.version(),
         'platform.machine': platform.machine(),
         'platform.python_implementation': python_implementation(),
         'extra': None # wheel extension
        }

for var in list(_VARS.keys()):
    if '.' in var:
        _VARS[var.replace('.', '_')] = _VARS[var]

def default_environment():
    """Return copy of default PEP 385 globals dictionary."""
    return dict(_VARS)

class ASTWhitelist(ast.NodeTransformer):
    def __init__(self, statement):
        self.statement = statement # for error messages

    ALLOWED = (ast.Compare, ast.BoolOp, ast.Attribute, ast.Name, ast.Load, ast.Str)
    # Bool operations
    ALLOWED += (ast.And, ast.Or)
    # Comparison operations
    ALLOWED += (ast.Eq, ast.Gt, ast.GtE, ast.In, ast.Is, ast.IsNot, ast.Lt, ast.LtE, ast.NotEq, ast.NotIn)

    def visit(self, node):
        """Ensure statement only contains allowed nodes."""
        if not isinstance(node, self.ALLOWED):
            raise SyntaxError('Not allowed in environment markers.\n%s\n%s' %
                               (self.statement,
                               (' ' * node.col_offset) + '^'))
        return ast.NodeTransformer.visit(self, node)

    def visit_Attribute(self, node):
        """Flatten one level of attribute access."""
        new_node = ast.Name("%s.%s" % (node.value.id, node.attr), node.ctx)
        return ast.copy_location(new_node, node)

def parse_marker(marker):
    tree = ast.parse(marker, mode='eval')
    new_tree = ASTWhitelist(marker).generic_visit(tree)
    return new_tree

def compile_marker(parsed_marker):
    return _builtin_compile(parsed_marker, '<environment marker>', 'eval',
                   dont_inherit=True)

_cache = weakref.WeakValueDictionary()

def compile(marker):
    """Return compiled marker as a function accepting an environment dict."""
    try:
        return _cache[marker]
    except KeyError:
        pass
    if not marker.strip():
        def marker_fn(environment=None, override=None):
            """"""
            return True
    else:
        compiled_marker = compile_marker(parse_marker(marker))
        def marker_fn(environment=None, override=None):
            """override updates environment"""
            if override is None:
                override = {}
            if environment is None:
                environment = default_environment()
            environment.update(override)
            return eval(compiled_marker, environment)
    marker_fn.__doc__ = marker
    _cache[marker] = marker_fn
    return _cache[marker]

def interpret(marker, environment=None):
    return compile(marker)(environment)
python3.4/site-packages/pip/_vendor/_markerlib/__pycache__/__init__.cpython-34.pyc000064400000001541151735047270023774 0ustar00�
�Re4�@s�y,ddlZddlmZmZmZWnQek
rde�krQ�ndd�Zdd�Zdddd	�ZYnXdS)
�N)�default_environment�compile�	interpret�astcCsiS)N�rrr�:/tmp/pip-ztkk0jow-build/pip/_vendor/_markerlib/__init__.pyrsrcs%dd�fdd�}�|_|S)Ncs�j�S)N)�strip)�environment�override)�markerrr�	marker_fn
szcompile.<locals>.marker_fn)�__doc__)rrr)rrr	s	rcCs
t|��S)N)r)rr	r
rrrrsr)r�pip._vendor._markerlib.markersrrr�ImportError�globalsrrrr�<module>s 
python3.4/site-packages/pip/_vendor/_markerlib/__pycache__/markers.cpython-34.pyc000064400000010134151735047270023677 0ustar00�
�Re��@s�dZdddgZddlZddlZddlZddlZddlZeZyddlm	Z	Wn3e
k
r�ejdkr�dd	�Z	n�YnXiejd
6dejdd�d
6ej
jdd�dd6ejd6ej
�d6ej�d6e	�d6dd6ZxCeej��D]/Zdekr+eeeejdd�<q+q+Wdd�ZGdd�dej�Zdd�Zdd�Zej�Zdd�Zdd d�ZdS)!a�Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
�default_environment�compile�	interpret�N)�python_implementation�javacCsdS)N�Jython�rrr�9/tmp/pip-ztkk0jow-build/pip/_vendor/_markerlib/markers.pyr!srzsys.platformz%s.%s��python_version� ��python_full_versionzos.namezplatform.versionzplatform.machinezplatform.python_implementation�extra�.�_cCs
tt�S)z2Return copy of default PEP 385 globals dictionary.)�dict�_VARSrrrr	r8sc@s�eZdZdd�Zejejejejej	ej
fZeejej
f7Zeejejejejejejejejejejf
7Zdd�Zdd�ZdS)�ASTWhitelistcCs
||_dS)N)�	statement)�selfrrrr	�__init__=szASTWhitelist.__init__cCsLt||j�s9td|jd|jdf��ntjj||�S)z-Ensure statement only contains allowed nodes.z)Not allowed in environment markers.
%s
%sr�^)�
isinstance�ALLOWED�SyntaxErrorr�
col_offset�ast�NodeTransformer�visit)r�noderrr	rFs
zASTWhitelist.visitcCs8tjd|jj|jf|j�}tj||�S)z&Flatten one level of attribute access.z%s.%s)r�Name�value�id�attr�ctx�
copy_location)rr �new_noderrr	�visit_AttributeNs(zASTWhitelist.visit_AttributeN)�__name__�
__module__�__qualname__rr�Compare�BoolOp�	Attributer!�Load�Strr�And�Or�Eq�Gt�GtE�In�Is�IsNot�Lt�LtE�NotEq�NotInrr(rrrr	r<s*FrcCs.tj|dd�}t|�j|�}|S)N�mode�eval)r�parser�
generic_visit)�marker�tree�new_treerrr	�parse_markerSsrDcCst|dddd�S)Nz<environment marker>r>�dont_inheritT)�_builtin_compile)�
parsed_markerrrr	�compile_markerXsrHc
s�yt|SWntk
r YnX|j�sBdddd�}n*tt|���dd�fdd�}||_|t|<t|S)zCReturn compiled marker as a function accepting an environment dict.NcSsdS)�Tr)�environment�overriderrr	�	marker_fneszcompile.<locals>.marker_fncsG|dkri}n|dkr-t�}n|j|�t�|�S)zoverride updates environmentN)r�updater>)rJrK)�compiled_markerrr	rLjs	
)�_cache�KeyError�striprHrD�__doc__)rArLr)rNr	r^s
	
cCst|�|�S)N)r)rArJrrr	rvs)rR�__all__r�os�platform�sys�weakrefrrFr�ImportError�name�version_info�version�split�machiner�list�keys�var�replacerrrrDrH�WeakValueDictionaryrOrrrrr	�<module>s>






!python3.4/site-packages/pip/_vendor/_markerlib/__init__.py000064400000001064151735047300017504 0ustar00try:
    import ast
    from pip._vendor._markerlib.markers import default_environment, compile, interpret
except ImportError:
    if 'ast' in globals():
        raise
    def default_environment():
        return {}
    def compile(marker):
        def marker_fn(environment=None, override=None):
            # 'empty markers are True' heuristic won't install extra deps.
            return not marker.strip()
        marker_fn.__doc__ = marker
        return marker_fn
    def interpret(marker, environment=None, override=None):
        return compile(marker)()
python3.4/site-packages/pip/_vendor/distlib/compat.py000064400000113733151735047300016562 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import absolute_import

import os
import re
import sys

if sys.version_info[0] < 3:
    from StringIO import StringIO
    string_types = basestring,
    text_type = unicode
    from types import FileType as file_type
    import __builtin__ as builtins
    import ConfigParser as configparser
    from ._backport import shutil
    from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
    from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
                        pathname2url, ContentTooShortError, splittype)

    def quote(s):
        if isinstance(s, unicode):
            s = s.encode('utf-8')
        return _quote(s)

    import urllib2
    from urllib2 import (Request, urlopen, URLError, HTTPError,
                         HTTPBasicAuthHandler, HTTPPasswordMgr,
                         HTTPSHandler, HTTPHandler, HTTPRedirectHandler,
                         build_opener)
    import httplib
    import xmlrpclib
    import Queue as queue
    from HTMLParser import HTMLParser
    import htmlentitydefs
    raw_input = raw_input
    from itertools import ifilter as filter
    from itertools import ifilterfalse as filterfalse

    _userprog = None
    def splituser(host):
        """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'."""
        global _userprog
        if _userprog is None:
            import re
            _userprog = re.compile('^(.*)@(.*)$')

        match = _userprog.match(host)
        if match: return match.group(1, 2)
        return None, host

else:
    from io import StringIO
    string_types = str,
    text_type = str
    from io import TextIOWrapper as file_type
    import builtins
    import configparser
    import shutil
    from urllib.parse import (urlparse, urlunparse, urljoin, splituser, quote,
                              unquote, urlsplit, urlunsplit, splittype)
    from urllib.request import (urlopen, urlretrieve, Request, url2pathname,
                                pathname2url,
                                HTTPBasicAuthHandler, HTTPPasswordMgr,
                                HTTPSHandler, HTTPHandler, HTTPRedirectHandler,
                                build_opener)
    from urllib.error import HTTPError, URLError, ContentTooShortError
    import http.client as httplib
    import urllib.request as urllib2
    import xmlrpc.client as xmlrpclib
    import queue
    from html.parser import HTMLParser
    import html.entities as htmlentitydefs
    raw_input = input
    from itertools import filterfalse
    filter = filter

try:
    from ssl import match_hostname, CertificateError
except ImportError:
    class CertificateError(ValueError):
        pass


    def _dnsname_to_pat(dn):
        pats = []
        for frag in dn.split(r'.'):
            if frag == '*':
                # When '*' is a fragment by itself, it matches a non-empty
                # dotless fragment.
                pats.append('[^.]+')
            else:
                # Otherwise, '*' matches any dotless fragment.
                frag = re.escape(frag)
                pats.append(frag.replace(r'\*', '[^.]*'))
        return re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)


    def match_hostname(cert, hostname):
        """Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 rules
        are mostly followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        """
        if not cert:
            raise ValueError("empty or no certificate")
        dnsnames = []
        san = cert.get('subjectAltName', ())
        for key, value in san:
            if key == 'DNS':
                if _dnsname_to_pat(value).match(hostname):
                    return
                dnsnames.append(value)
        if not dnsnames:
            # The subject is only checked when there is no dNSName entry
            # in subjectAltName
            for sub in cert.get('subject', ()):
                for key, value in sub:
                    # XXX according to RFC 2818, the most specific Common Name
                    # must be used.
                    if key == 'commonName':
                        if _dnsname_to_pat(value).match(hostname):
                            return
                        dnsnames.append(value)
        if len(dnsnames) > 1:
            raise CertificateError("hostname %r "
                "doesn't match either of %s"
                % (hostname, ', '.join(map(repr, dnsnames))))
        elif len(dnsnames) == 1:
            raise CertificateError("hostname %r "
                "doesn't match %r"
                % (hostname, dnsnames[0]))
        else:
            raise CertificateError("no appropriate commonName or "
                "subjectAltName fields were found")


try:
    from types import SimpleNamespace as Container
except ImportError:
    class Container(object):
        """
        A generic container for when multiple values need to be returned
        """
        def __init__(self, **kwargs):
            self.__dict__.update(kwargs)


try:
    from shutil import which
except ImportError:
    # Implementation from Python 3.3
    def which(cmd, mode=os.F_OK | os.X_OK, path=None):
        """Given a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.

        """
        # Check that a given file can be accessed with the correct mode.
        # Additionally check that `file` is not a directory, as on Windows
        # directories pass the os.access check.
        def _access_check(fn, mode):
            return (os.path.exists(fn) and os.access(fn, mode)
                    and not os.path.isdir(fn))

        # If we're given a path with a directory part, look it up directly rather
        # than referring to PATH directories. This includes checking relative to the
        # current directory, e.g. ./script
        if os.path.dirname(cmd):
            if _access_check(cmd, mode):
                return cmd
            return None

        if path is None:
            path = os.environ.get("PATH", os.defpath)
        if not path:
            return None
        path = path.split(os.pathsep)

        if sys.platform == "win32":
            # The current directory takes precedence on Windows.
            if not os.curdir in path:
                path.insert(0, os.curdir)

            # PATHEXT is necessary to check on Windows.
            pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
            # See if the given file matches any of the expected path extensions.
            # This will allow us to short circuit when given "python.exe".
            # If it does match, only test that one, otherwise we have to try
            # others.
            if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
                files = [cmd]
            else:
                files = [cmd + ext for ext in pathext]
        else:
            # On other platforms you don't have things like PATHEXT to tell you
            # what file suffixes are executable, so just pass on cmd as-is.
            files = [cmd]

        seen = set()
        for dir in path:
            normdir = os.path.normcase(dir)
            if not normdir in seen:
                seen.add(normdir)
                for thefile in files:
                    name = os.path.join(dir, thefile)
                    if _access_check(name, mode):
                        return name
        return None


# ZipFile is a context manager in 2.7, but not in 2.6

from zipfile import ZipFile as BaseZipFile

if hasattr(BaseZipFile, '__enter__'):
    ZipFile = BaseZipFile
else:
    from zipfile import ZipExtFile as BaseZipExtFile

    class ZipExtFile(BaseZipExtFile):
        def __init__(self, base):
            self.__dict__.update(base.__dict__)

        def __enter__(self):
            return self

        def __exit__(self, *exc_info):
            self.close()
            # return None, so if an exception occurred, it will propagate

    class ZipFile(BaseZipFile):
        def __enter__(self):
            return self

        def __exit__(self, *exc_info):
            self.close()
            # return None, so if an exception occurred, it will propagate

        def open(self, *args, **kwargs):
            base = BaseZipFile.open(self, *args, **kwargs)
            return ZipExtFile(base)

try:
    from platform import python_implementation
except ImportError: # pragma: no cover
    def python_implementation():
        """Return a string identifying the Python implementation."""
        if 'PyPy' in sys.version:
            return 'PyPy'
        if os.name == 'java':
            return 'Jython'
        if sys.version.startswith('IronPython'):
            return 'IronPython'
        return 'CPython'

try:
    import sysconfig
except ImportError: # pragma: no cover
    from ._backport import sysconfig

try:
    callable = callable
except NameError:   # pragma: no cover
    from collections import Callable

    def callable(obj):
        return isinstance(obj, Callable)


try:
    fsencode = os.fsencode
    fsdecode = os.fsdecode
except AttributeError:  # pragma: no cover
    _fsencoding = sys.getfilesystemencoding()
    if _fsencoding == 'mbcs':
        _fserrors = 'strict'
    else:
        _fserrors = 'surrogateescape'

    def fsencode(filename):
        if isinstance(filename, bytes):
            return filename
        elif isinstance(filename, text_type):
            return filename.encode(_fsencoding, _fserrors)
        else:
            raise TypeError("expect bytes or str, not %s" %
                            type(filename).__name__)

    def fsdecode(filename):
        if isinstance(filename, text_type):
            return filename
        elif isinstance(filename, bytes):
            return filename.decode(_fsencoding, _fserrors)
        else:
            raise TypeError("expect bytes or str, not %s" %
                            type(filename).__name__)

try:
    from tokenize import detect_encoding
except ImportError: # pragma: no cover
    from codecs import BOM_UTF8, lookup
    import re

    cookie_re = re.compile("coding[:=]\s*([-\w.]+)")

    def _get_normal_name(orig_enc):
        """Imitates get_normal_name in tokenizer.c."""
        # Only care about the first 12 characters.
        enc = orig_enc[:12].lower().replace("_", "-")
        if enc == "utf-8" or enc.startswith("utf-8-"):
            return "utf-8"
        if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \
           enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")):
            return "iso-8859-1"
        return orig_enc

    def detect_encoding(readline):
        """
        The detect_encoding() function is used to detect the encoding that should
        be used to decode a Python source file.  It requires one argment, readline,
        in the same way as the tokenize() generator.

        It will call readline a maximum of twice, and return the encoding used
        (as a string) and a list of any lines (left as bytes) it has read in.

        It detects the encoding from the presence of a utf-8 bom or an encoding
        cookie as specified in pep-0263.  If both a bom and a cookie are present,
        but disagree, a SyntaxError will be raised.  If the encoding cookie is an
        invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
        'utf-8-sig' is returned.

        If no encoding is specified, then the default of 'utf-8' will be returned.
        """
        try:
            filename = readline.__self__.name
        except AttributeError:
            filename = None
        bom_found = False
        encoding = None
        default = 'utf-8'
        def read_or_stop():
            try:
                return readline()
            except StopIteration:
                return b''

        def find_cookie(line):
            try:
                # Decode as UTF-8. Either the line is an encoding declaration,
                # in which case it should be pure ASCII, or it must be UTF-8
                # per default encoding.
                line_string = line.decode('utf-8')
            except UnicodeDecodeError:
                msg = "invalid or missing encoding declaration"
                if filename is not None:
                    msg = '{} for {!r}'.format(msg, filename)
                raise SyntaxError(msg)

            matches = cookie_re.findall(line_string)
            if not matches:
                return None
            encoding = _get_normal_name(matches[0])
            try:
                codec = lookup(encoding)
            except LookupError:
                # This behaviour mimics the Python interpreter
                if filename is None:
                    msg = "unknown encoding: " + encoding
                else:
                    msg = "unknown encoding for {!r}: {}".format(filename,
                            encoding)
                raise SyntaxError(msg)

            if bom_found:
                if codec.name != 'utf-8':
                    # This behaviour mimics the Python interpreter
                    if filename is None:
                        msg = 'encoding problem: utf-8'
                    else:
                        msg = 'encoding problem for {!r}: utf-8'.format(filename)
                    raise SyntaxError(msg)
                encoding += '-sig'
            return encoding

        first = read_or_stop()
        if first.startswith(BOM_UTF8):
            bom_found = True
            first = first[3:]
            default = 'utf-8-sig'
        if not first:
            return default, []

        encoding = find_cookie(first)
        if encoding:
            return encoding, [first]

        second = read_or_stop()
        if not second:
            return default, [first]

        encoding = find_cookie(second)
        if encoding:
            return encoding, [first, second]

        return default, [first, second]

# For converting & <-> &amp; etc.
try:
    from html import escape
except ImportError:
    from cgi import escape
if sys.version_info[:2] < (3, 4):
    unescape = HTMLParser().unescape
else:
    from html import unescape

try:
    from collections import ChainMap
except ImportError: # pragma: no cover
    from collections import MutableMapping

    try:
        from reprlib import recursive_repr as _recursive_repr
    except ImportError:
        def _recursive_repr(fillvalue='...'):
            '''
            Decorator to make a repr function return fillvalue for a recursive
            call
            '''

            def decorating_function(user_function):
                repr_running = set()

                def wrapper(self):
                    key = id(self), get_ident()
                    if key in repr_running:
                        return fillvalue
                    repr_running.add(key)
                    try:
                        result = user_function(self)
                    finally:
                        repr_running.discard(key)
                    return result

                # Can't use functools.wraps() here because of bootstrap issues
                wrapper.__module__ = getattr(user_function, '__module__')
                wrapper.__doc__ = getattr(user_function, '__doc__')
                wrapper.__name__ = getattr(user_function, '__name__')
                wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
                return wrapper

            return decorating_function

    class ChainMap(MutableMapping):
        ''' A ChainMap groups multiple dicts (or other mappings) together
        to create a single, updateable view.

        The underlying mappings are stored in a list.  That list is public and can
        accessed or updated using the *maps* attribute.  There is no other state.

        Lookups search the underlying mappings successively until a key is found.
        In contrast, writes, updates, and deletions only operate on the first
        mapping.

        '''

        def __init__(self, *maps):
            '''Initialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            '''
            self.maps = list(maps) or [{}]          # always at least one map

        def __missing__(self, key):
            raise KeyError(key)

        def __getitem__(self, key):
            for mapping in self.maps:
                try:
                    return mapping[key]             # can't use 'key in mapping' with defaultdict
                except KeyError:
                    pass
            return self.__missing__(key)            # support subclasses that define __missing__

        def get(self, key, default=None):
            return self[key] if key in self else default

        def __len__(self):
            return len(set().union(*self.maps))     # reuses stored hash values if possible

        def __iter__(self):
            return iter(set().union(*self.maps))

        def __contains__(self, key):
            return any(key in m for m in self.maps)

        def __bool__(self):
            return any(self.maps)

        @_recursive_repr()
        def __repr__(self):
            return '{0.__class__.__name__}({1})'.format(
                self, ', '.join(map(repr, self.maps)))

        @classmethod
        def fromkeys(cls, iterable, *args):
            'Create a ChainMap with a single dict created from the iterable.'
            return cls(dict.fromkeys(iterable, *args))

        def copy(self):
            'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]'
            return self.__class__(self.maps[0].copy(), *self.maps[1:])

        __copy__ = copy

        def new_child(self):                        # like Django's Context.push()
            'New ChainMap with a new dict followed by all previous maps.'
            return self.__class__({}, *self.maps)

        @property
        def parents(self):                          # like Django's Context.pop()
            'New ChainMap from maps[1:].'
            return self.__class__(*self.maps[1:])

        def __setitem__(self, key, value):
            self.maps[0][key] = value

        def __delitem__(self, key):
            try:
                del self.maps[0][key]
            except KeyError:
                raise KeyError('Key not found in the first mapping: {!r}'.format(key))

        def popitem(self):
            'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.'
            try:
                return self.maps[0].popitem()
            except KeyError:
                raise KeyError('No keys found in the first mapping.')

        def pop(self, key, *args):
            'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].'
            try:
                return self.maps[0].pop(key, *args)
            except KeyError:
                raise KeyError('Key not found in the first mapping: {!r}'.format(key))

        def clear(self):
            'Clear maps[0], leaving maps[1:] intact.'
            self.maps[0].clear()

try:
    from imp import cache_from_source
except ImportError: # pragma: no cover
    def cache_from_source(path, debug_override=None):
        assert path.endswith('.py')
        if debug_override is None:
            debug_override = __debug__
        if debug_override:
            suffix = 'c'
        else:
            suffix = 'o'
        return path + suffix

try:
    from collections import OrderedDict
except ImportError: # pragma: no cover
## {{{ http://code.activestate.com/recipes/576693/ (r9)
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
    try:
        from thread import get_ident as _get_ident
    except ImportError:
        from dummy_thread import get_ident as _get_ident

    try:
        from _abcoll import KeysView, ValuesView, ItemsView
    except ImportError:
        pass


    class OrderedDict(dict):
        'Dictionary that remembers insertion order'
        # An inherited dict maps keys to values.
        # The inherited dict provides __getitem__, __len__, __contains__, and get.
        # The remaining methods are order-aware.
        # Big-O running times for all methods are the same as for regular dictionaries.

        # The internal self.__map dictionary maps keys to links in a doubly linked list.
        # The circular doubly linked list starts and ends with a sentinel element.
        # The sentinel element never gets deleted (this simplifies the algorithm).
        # Each link is stored as a list of length three:  [PREV, NEXT, KEY].

        def __init__(self, *args, **kwds):
            '''Initialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            '''
            if len(args) > 1:
                raise TypeError('expected at most 1 arguments, got %d' % len(args))
            try:
                self.__root
            except AttributeError:
                self.__root = root = []                     # sentinel node
                root[:] = [root, root, None]
                self.__map = {}
            self.__update(*args, **kwds)

        def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
            'od.__setitem__(i, y) <==> od[i]=y'
            # Setting a new item creates a new link which goes at the end of the linked
            # list, and the inherited dictionary is updated with the new key/value pair.
            if key not in self:
                root = self.__root
                last = root[0]
                last[1] = root[0] = self.__map[key] = [last, root, key]
            dict_setitem(self, key, value)

        def __delitem__(self, key, dict_delitem=dict.__delitem__):
            'od.__delitem__(y) <==> del od[y]'
            # Deleting an existing item uses self.__map to find the link which is
            # then removed by updating the links in the predecessor and successor nodes.
            dict_delitem(self, key)
            link_prev, link_next, key = self.__map.pop(key)
            link_prev[1] = link_next
            link_next[0] = link_prev

        def __iter__(self):
            'od.__iter__() <==> iter(od)'
            root = self.__root
            curr = root[1]
            while curr is not root:
                yield curr[2]
                curr = curr[1]

        def __reversed__(self):
            'od.__reversed__() <==> reversed(od)'
            root = self.__root
            curr = root[0]
            while curr is not root:
                yield curr[2]
                curr = curr[0]

        def clear(self):
            'od.clear() -> None.  Remove all items from od.'
            try:
                for node in self.__map.itervalues():
                    del node[:]
                root = self.__root
                root[:] = [root, root, None]
                self.__map.clear()
            except AttributeError:
                pass
            dict.clear(self)

        def popitem(self, last=True):
            '''od.popitem() -> (k, v), return and remove a (key, value) pair.
            Pairs are returned in LIFO order if last is true or FIFO order if false.

            '''
            if not self:
                raise KeyError('dictionary is empty')
            root = self.__root
            if last:
                link = root[0]
                link_prev = link[0]
                link_prev[1] = root
                root[0] = link_prev
            else:
                link = root[1]
                link_next = link[1]
                root[1] = link_next
                link_next[0] = root
            key = link[2]
            del self.__map[key]
            value = dict.pop(self, key)
            return key, value

        # -- the following methods do not depend on the internal structure --

        def keys(self):
            'od.keys() -> list of keys in od'
            return list(self)

        def values(self):
            'od.values() -> list of values in od'
            return [self[key] for key in self]

        def items(self):
            'od.items() -> list of (key, value) pairs in od'
            return [(key, self[key]) for key in self]

        def iterkeys(self):
            'od.iterkeys() -> an iterator over the keys in od'
            return iter(self)

        def itervalues(self):
            'od.itervalues -> an iterator over the values in od'
            for k in self:
                yield self[k]

        def iteritems(self):
            'od.iteritems -> an iterator over the (key, value) items in od'
            for k in self:
                yield (k, self[k])

        def update(*args, **kwds):
            '''od.update(E, **F) -> None.  Update od from dict/iterable E and F.

            If E is a dict instance, does:           for k in E: od[k] = E[k]
            If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
            Or if E is an iterable of items, does:   for k, v in E: od[k] = v
            In either case, this is followed by:     for k, v in F.items(): od[k] = v

            '''
            if len(args) > 2:
                raise TypeError('update() takes at most 2 positional '
                                'arguments (%d given)' % (len(args),))
            elif not args:
                raise TypeError('update() takes at least 1 argument (0 given)')
            self = args[0]
            # Make progressively weaker assumptions about "other"
            other = ()
            if len(args) == 2:
                other = args[1]
            if isinstance(other, dict):
                for key in other:
                    self[key] = other[key]
            elif hasattr(other, 'keys'):
                for key in other.keys():
                    self[key] = other[key]
            else:
                for key, value in other:
                    self[key] = value
            for key, value in kwds.items():
                self[key] = value

        __update = update  # let subclasses override update without breaking __init__

        __marker = object()

        def pop(self, key, default=__marker):
            '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
            If key is not found, d is returned if given, otherwise KeyError is raised.

            '''
            if key in self:
                result = self[key]
                del self[key]
                return result
            if default is self.__marker:
                raise KeyError(key)
            return default

        def setdefault(self, key, default=None):
            'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
            if key in self:
                return self[key]
            self[key] = default
            return default

        def __repr__(self, _repr_running=None):
            'od.__repr__() <==> repr(od)'
            if not _repr_running: _repr_running = {}
            call_key = id(self), _get_ident()
            if call_key in _repr_running:
                return '...'
            _repr_running[call_key] = 1
            try:
                if not self:
                    return '%s()' % (self.__class__.__name__,)
                return '%s(%r)' % (self.__class__.__name__, self.items())
            finally:
                del _repr_running[call_key]

        def __reduce__(self):
            'Return state information for pickling'
            items = [[k, self[k]] for k in self]
            inst_dict = vars(self).copy()
            for k in vars(OrderedDict()):
                inst_dict.pop(k, None)
            if inst_dict:
                return (self.__class__, (items,), inst_dict)
            return self.__class__, (items,)

        def copy(self):
            'od.copy() -> a shallow copy of od'
            return self.__class__(self)

        @classmethod
        def fromkeys(cls, iterable, value=None):
            '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            '''
            d = cls()
            for key in iterable:
                d[key] = value
            return d

        def __eq__(self, other):
            '''od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            '''
            if isinstance(other, OrderedDict):
                return len(self)==len(other) and self.items() == other.items()
            return dict.__eq__(self, other)

        def __ne__(self, other):
            return not self == other

        # -- the following methods are only used in Python 2.7 --

        def viewkeys(self):
            "od.viewkeys() -> a set-like object providing a view on od's keys"
            return KeysView(self)

        def viewvalues(self):
            "od.viewvalues() -> an object providing a view on od's values"
            return ValuesView(self)

        def viewitems(self):
            "od.viewitems() -> a set-like object providing a view on od's items"
            return ItemsView(self)

try:
    from logging.config import BaseConfigurator, valid_ident
except ImportError: # pragma: no cover
    IDENTIFIER = re.compile('^[a-z_][a-z0-9_]*$', re.I)


    def valid_ident(s):
        m = IDENTIFIER.match(s)
        if not m:
            raise ValueError('Not a valid Python identifier: %r' % s)
        return True


    # The ConvertingXXX classes are wrappers around standard Python containers,
    # and they serve to convert any suitable values in the container. The
    # conversion converts base dicts, lists and tuples to their wrapped
    # equivalents, whereas strings which match a conversion format are converted
    # appropriately.
    #
    # Each wrapper should have a configurator attribute holding the actual
    # configurator to use for conversion.

    class ConvertingDict(dict):
        """A converting dictionary wrapper."""

        def __getitem__(self, key):
            value = dict.__getitem__(self, key)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

        def get(self, key, default=None):
            value = dict.get(self, key, default)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

    def pop(self, key, default=None):
        value = dict.pop(self, key, default)
        result = self.configurator.convert(value)
        if value is not result:
            if type(result) in (ConvertingDict, ConvertingList,
                                ConvertingTuple):
                result.parent = self
                result.key = key
        return result

    class ConvertingList(list):
        """A converting list wrapper."""
        def __getitem__(self, key):
            value = list.__getitem__(self, key)
            result = self.configurator.convert(value)
            #If the converted value is different, save for next time
            if value is not result:
                self[key] = result
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

        def pop(self, idx=-1):
            value = list.pop(self, idx)
            result = self.configurator.convert(value)
            if value is not result:
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
            return result

    class ConvertingTuple(tuple):
        """A converting tuple wrapper."""
        def __getitem__(self, key):
            value = tuple.__getitem__(self, key)
            result = self.configurator.convert(value)
            if value is not result:
                if type(result) in (ConvertingDict, ConvertingList,
                                    ConvertingTuple):
                    result.parent = self
                    result.key = key
            return result

    class BaseConfigurator(object):
        """
        The configurator base class which defines some useful defaults.
        """

        CONVERT_PATTERN = re.compile(r'^(?P<prefix>[a-z]+)://(?P<suffix>.*)$')

        WORD_PATTERN = re.compile(r'^\s*(\w+)\s*')
        DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*')
        INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*')
        DIGIT_PATTERN = re.compile(r'^\d+$')

        value_converters = {
            'ext' : 'ext_convert',
            'cfg' : 'cfg_convert',
        }

        # We might want to use a different one, e.g. importlib
        importer = staticmethod(__import__)

        def __init__(self, config):
            self.config = ConvertingDict(config)
            self.config.configurator = self

        def resolve(self, s):
            """
            Resolve strings to objects using standard import and attribute
            syntax.
            """
            name = s.split('.')
            used = name.pop(0)
            try:
                found = self.importer(used)
                for frag in name:
                    used += '.' + frag
                    try:
                        found = getattr(found, frag)
                    except AttributeError:
                        self.importer(used)
                        found = getattr(found, frag)
                return found
            except ImportError:
                e, tb = sys.exc_info()[1:]
                v = ValueError('Cannot resolve %r: %s' % (s, e))
                v.__cause__, v.__traceback__ = e, tb
                raise v

        def ext_convert(self, value):
            """Default converter for the ext:// protocol."""
            return self.resolve(value)

        def cfg_convert(self, value):
            """Default converter for the cfg:// protocol."""
            rest = value
            m = self.WORD_PATTERN.match(rest)
            if m is None:
                raise ValueError("Unable to convert %r" % value)
            else:
                rest = rest[m.end():]
                d = self.config[m.groups()[0]]
                #print d, rest
                while rest:
                    m = self.DOT_PATTERN.match(rest)
                    if m:
                        d = d[m.groups()[0]]
                    else:
                        m = self.INDEX_PATTERN.match(rest)
                        if m:
                            idx = m.groups()[0]
                            if not self.DIGIT_PATTERN.match(idx):
                                d = d[idx]
                            else:
                                try:
                                    n = int(idx) # try as number first (most likely)
                                    d = d[n]
                                except TypeError:
                                    d = d[idx]
                    if m:
                        rest = rest[m.end():]
                    else:
                        raise ValueError('Unable to convert '
                                         '%r at %r' % (value, rest))
            #rest should be empty
            return d

        def convert(self, value):
            """
            Convert values to an appropriate type. dicts, lists and tuples are
            replaced by their converting alternatives. Strings are checked to
            see if they have a conversion format and are converted if they do.
            """
            if not isinstance(value, ConvertingDict) and isinstance(value, dict):
                value = ConvertingDict(value)
                value.configurator = self
            elif not isinstance(value, ConvertingList) and isinstance(value, list):
                value = ConvertingList(value)
                value.configurator = self
            elif not isinstance(value, ConvertingTuple) and\
                     isinstance(value, tuple):
                value = ConvertingTuple(value)
                value.configurator = self
            elif isinstance(value, string_types):
                m = self.CONVERT_PATTERN.match(value)
                if m:
                    d = m.groupdict()
                    prefix = d['prefix']
                    converter = self.value_converters.get(prefix, None)
                    if converter:
                        suffix = d['suffix']
                        converter = getattr(self, converter)
                        value = converter(suffix)
            return value

        def configure_custom(self, config):
            """Configure an object with a user-supplied factory."""
            c = config.pop('()')
            if not callable(c):
                c = self.resolve(c)
            props = config.pop('.', None)
            # Check for valid identifiers
            kwargs = dict([(k, config[k]) for k in config if valid_ident(k)])
            result = c(**kwargs)
            if props:
                for name, value in props.items():
                    setattr(result, name, value)
            return result

        def as_tuple(self, value):
            """Utility function which converts lists to tuples."""
            if isinstance(value, list):
                value = tuple(value)
            return value
python3.4/site-packages/pip/_vendor/distlib/version.py000064400000054724151735047300016770 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-386,
distribute-compatible and semantic versioning.
"""

import logging
import re

from .compat import string_types

__all__ = ['NormalizedVersion', 'NormalizedMatcher',
           'LegacyVersion', 'LegacyMatcher',
           'SemanticVersion', 'SemanticMatcher',
           'UnsupportedVersionError', 'get_scheme']

logger = logging.getLogger(__name__)


class UnsupportedVersionError(ValueError):
    """This is an unsupported version."""
    pass


class Version(object):
    def __init__(self, s):
        self._string = s = s.strip()
        self._parts = parts = self.parse(s)
        assert isinstance(parts, tuple)
        assert len(parts) > 0

    def parse(self, s):
        raise NotImplementedError('please implement in a subclass')

    def _check_compatible(self, other):
        if type(self) != type(other):
            raise TypeError('cannot compare %r and %r' % (self, other))

    def __eq__(self, other):
        self._check_compatible(other)
        return self._parts == other._parts

    def __ne__(self, other):
        return not self.__eq__(other)

    def __lt__(self, other):
        self._check_compatible(other)
        return self._parts < other._parts

    def __gt__(self, other):
        return not (self.__lt__(other) or self.__eq__(other))

    def __le__(self, other):
        return self.__lt__(other) or self.__eq__(other)

    def __ge__(self, other):
        return self.__gt__(other) or self.__eq__(other)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    def __hash__(self):
        return hash(self._parts)

    def __repr__(self):
        return "%s('%s')" % (self.__class__.__name__, self._string)

    def __str__(self):
        return self._string

    @property
    def is_prerelease(self):
        raise NotImplementedError('Please implement in subclasses.')


class Matcher(object):
    version_class = None

    dist_re = re.compile(r"^(\w[\s\w'.-]*)(\((.*)\))?")
    comp_re = re.compile(r'^(<=|>=|<|>|!=|==|~=)?\s*([^\s,]+)$')
    num_re = re.compile(r'^\d+(\.\d+)*$')

    # value is either a callable or the name of a method
    _operators = {
        '<': lambda v, c, p: v < c,
        '>': lambda v, c, p: v > c,
        '<=': lambda v, c, p: v == c or v < c,
        '>=': lambda v, c, p: v == c or v > c,
        '==': lambda v, c, p: v == c,
        # by default, compatible => >=.
        '~=': lambda v, c, p: v == c or v > c,
        '!=': lambda v, c, p: v != c,
    }

    def __init__(self, s):
        if self.version_class is None:
            raise ValueError('Please specify a version class')
        self._string = s = s.strip()
        m = self.dist_re.match(s)
        if not m:
            raise ValueError('Not valid: %r' % s)
        groups = m.groups('')
        self.name = groups[0].strip()
        self.key = self.name.lower()    # for case-insensitive comparisons
        clist = []
        if groups[2]:
            constraints = [c.strip() for c in groups[2].split(',')]
            for c in constraints:
                m = self.comp_re.match(c)
                if not m:
                    raise ValueError('Invalid %r in %r' % (c, s))
                groups = m.groups()
                op = groups[0] or '~='
                s = groups[1]
                if s.endswith('.*'):
                    if op not in ('==', '!='):
                        raise ValueError('\'.*\' not allowed for '
                                         '%r constraints' % op)
                    # Could be a partial version (e.g. for '2.*') which
                    # won't parse as a version, so keep it as a string
                    vn, prefix = s[:-2], True
                    if not self.num_re.match(vn):
                        # Just to check that vn is a valid version
                        self.version_class(vn)
                else:
                    # Should parse as a version, so we can create an
                    # instance for the comparison
                    vn, prefix = self.version_class(s), False
                clist.append((op, vn, prefix))
        self._parts = tuple(clist)

    def match(self, version):
        """
        Check if the provided version matches the constraints.

        :param version: The version to match against this instance.
        :type version: Strring or :class:`Version` instance.
        """
        if isinstance(version, string_types):
            version = self.version_class(version)
        for operator, constraint, prefix in self._parts:
            f = self._operators.get(operator)
            if isinstance(f, string_types):
                f = getattr(self, f)
            if not f:
                msg = ('%r not implemented '
                       'for %s' % (operator, self.__class__.__name__))
                raise NotImplementedError(msg)
            if not f(version, constraint, prefix):
                return False
        return True

    @property
    def exact_version(self):
        result = None
        if len(self._parts) == 1 and self._parts[0][0] == '==':
            result = self._parts[0][1]
        return result

    def _check_compatible(self, other):
        if type(self) != type(other) or self.name != other.name:
            raise TypeError('cannot compare %s and %s' % (self, other))

    def __eq__(self, other):
        self._check_compatible(other)
        return self.key == other.key and self._parts == other._parts

    def __ne__(self, other):
        return not self.__eq__(other)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    def __hash__(self):
        return hash(self.key) + hash(self._parts)

    def __repr__(self):
        return "%s(%r)" % (self.__class__.__name__, self._string)

    def __str__(self):
        return self._string


PEP426_VERSION_RE = re.compile(r'^(\d+(\.\d+)*)((a|b|c|rc)(\d+))?'
                               r'(\.(post)(\d+))?(\.(dev)(\d+))?'
                               r'(-(\d+(\.\d+)?))?$')


def _pep426_key(s):
    s = s.strip()
    m = PEP426_VERSION_RE.match(s)
    if not m:
        raise UnsupportedVersionError('Not a valid version: %s' % s)
    groups = m.groups()
    nums = tuple(int(v) for v in groups[0].split('.'))
    while len(nums) > 1 and nums[-1] == 0:
        nums = nums[:-1]

    pre = groups[3:5]
    post = groups[6:8]
    dev = groups[9:11]
    local = groups[12]
    if pre == (None, None):
        pre = ()
    else:
        pre = pre[0], int(pre[1])
    if post == (None, None):
        post = ()
    else:
        post = post[0], int(post[1])
    if dev == (None, None):
        dev = ()
    else:
        dev = dev[0], int(dev[1])
    if local is None:
        local = ()
    else:
        local = tuple([int(s) for s in local.split('.')])
    if not pre:
        # either before pre-release, or final release and after
        if not post and dev:
            # before pre-release
            pre = ('a', -1)     # to sort before a0
        else:
            pre = ('z',)        # to sort after all pre-releases
    # now look at the state of post and dev.
    if not post:
        post = ('_',)   # sort before 'a'
    if not dev:
        dev = ('final',)

    #print('%s -> %s' % (s, m.groups()))
    return nums, pre, post, dev, local


_normalized_key = _pep426_key


class NormalizedVersion(Version):
    """A rational version.

    Good:
        1.2         # equivalent to "1.2.0"
        1.2.0
        1.2a1
        1.2.3a2
        1.2.3b1
        1.2.3c1
        1.2.3.4
        TODO: fill this out

    Bad:
        1           # mininum two numbers
        1.2a        # release level must have a release serial
        1.2.3b
    """
    def parse(self, s):
        result = _normalized_key(s)
        # _normalized_key loses trailing zeroes in the release
        # clause, since that's needed to ensure that X.Y == X.Y.0 == X.Y.0.0
        # However, PEP 440 prefix matching needs it: for example,
        # (~= 1.4.5.0) matches differently to (~= 1.4.5.0.0).
        m = PEP426_VERSION_RE.match(s)      # must succeed
        groups = m.groups()
        self._release_clause = tuple(int(v) for v in groups[0].split('.'))
        return result

    PREREL_TAGS = set(['a', 'b', 'c', 'rc', 'dev'])

    @property
    def is_prerelease(self):
        return any(t[0] in self.PREREL_TAGS for t in self._parts if t)


def _match_prefix(x, y):
    x = str(x)
    y = str(y)
    if x == y:
        return True
    if not x.startswith(y):
        return False
    n = len(y)
    return x[n] == '.'


class NormalizedMatcher(Matcher):
    version_class = NormalizedVersion

    # value is either a callable or the name of a method
    _operators = {
        '~=': '_match_compatible',
        '<': '_match_lt',
        '>': '_match_gt',
        '<=': '_match_le',
        '>=': '_match_ge',
        '==': '_match_eq',
        '!=': '_match_ne',
    }

    def _adjust_local(self, version, constraint, prefix):
        if prefix:
            strip_local = '-' not in constraint and version._parts[-1]
        else:
            # both constraint and version are
            # NormalizedVersion instances.
            # If constraint does not have a local component,
            # ensure the version doesn't, either.
            strip_local = not constraint._parts[-1] and version._parts[-1]
        if strip_local:
            s = version._string.split('-', 1)[0]
            version = self.version_class(s)
        return version, constraint

    def _match_lt(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version >= constraint:
            return False
        release_clause = constraint._release_clause
        pfx = '.'.join([str(i) for i in release_clause])
        return not _match_prefix(version, pfx)

    def _match_gt(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version <= constraint:
            return False
        release_clause = constraint._release_clause
        pfx = '.'.join([str(i) for i in release_clause])
        return not _match_prefix(version, pfx)

    def _match_le(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        return version <= constraint

    def _match_ge(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        return version >= constraint

    def _match_eq(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if not prefix:
            result = (version == constraint)
        else:
            result = _match_prefix(version, constraint)
        return result

    def _match_ne(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if not prefix:
            result = (version != constraint)
        else:
            result = not _match_prefix(version, constraint)
        return result

    def _match_compatible(self, version, constraint, prefix):
        version, constraint = self._adjust_local(version, constraint, prefix)
        if version == constraint:
            return True
        if version < constraint:
            return False
        release_clause = constraint._release_clause
        if len(release_clause) > 1:
            release_clause = release_clause[:-1]
        pfx = '.'.join([str(i) for i in release_clause])
        return _match_prefix(version, pfx)

_REPLACEMENTS = (
    (re.compile('[.+-]$'), ''),                     # remove trailing puncts
    (re.compile(r'^[.](\d)'), r'0.\1'),             # .N -> 0.N at start
    (re.compile('^[.-]'), ''),                      # remove leading puncts
    (re.compile(r'^\((.*)\)$'), r'\1'),             # remove parentheses
    (re.compile(r'^v(ersion)?\s*(\d+)'), r'\2'),    # remove leading v(ersion)
    (re.compile(r'^r(ev)?\s*(\d+)'), r'\2'),        # remove leading v(ersion)
    (re.compile('[.]{2,}'), '.'),                   # multiple runs of '.'
    (re.compile(r'\b(alfa|apha)\b'), 'alpha'),      # misspelt alpha
    (re.compile(r'\b(pre-alpha|prealpha)\b'),
                'pre.alpha'),                       # standardise
    (re.compile(r'\(beta\)$'), 'beta'),             # remove parentheses
)

_SUFFIX_REPLACEMENTS = (
    (re.compile('^[:~._+-]+'), ''),                   # remove leading puncts
    (re.compile('[,*")([\]]'), ''),                   # remove unwanted chars
    (re.compile('[~:+_ -]'), '.'),                    # replace illegal chars
    (re.compile('[.]{2,}'), '.'),                   # multiple runs of '.'
    (re.compile(r'\.$'), ''),                       # trailing '.'
)

_NUMERIC_PREFIX = re.compile(r'(\d+(\.\d+)*)')


def _suggest_semantic_version(s):
    """
    Try to suggest a semantic form for a version for which
    _suggest_normalized_version couldn't come up with anything.
    """
    result = s.strip().lower()
    for pat, repl in _REPLACEMENTS:
        result = pat.sub(repl, result)
    if not result:
        result = '0.0.0'

    # Now look for numeric prefix, and separate it out from
    # the rest.
    #import pdb; pdb.set_trace()
    m = _NUMERIC_PREFIX.match(result)
    if not m:
        prefix = '0.0.0'
        suffix = result
    else:
        prefix = m.groups()[0].split('.')
        prefix = [int(i) for i in prefix]
        while len(prefix) < 3:
            prefix.append(0)
        if len(prefix) == 3:
            suffix = result[m.end():]
        else:
            suffix = '.'.join([str(i) for i in prefix[3:]]) + result[m.end():]
            prefix = prefix[:3]
        prefix = '.'.join([str(i) for i in prefix])
        suffix = suffix.strip()
    if suffix:
        #import pdb; pdb.set_trace()
        # massage the suffix.
        for pat, repl in _SUFFIX_REPLACEMENTS:
            suffix = pat.sub(repl, suffix)

    if not suffix:
        result = prefix
    else:
        sep = '-' if 'dev' in suffix else '+'
        result = prefix + sep + suffix
    if not is_semver(result):
        result = None
    return result


def _suggest_normalized_version(s):
    """Suggest a normalized version close to the given version string.

    If you have a version string that isn't rational (i.e. NormalizedVersion
    doesn't like it) then you might be able to get an equivalent (or close)
    rational version from this function.

    This does a number of simple normalizations to the given string, based
    on observation of versions currently in use on PyPI. Given a dump of
    those version during PyCon 2009, 4287 of them:
    - 2312 (53.93%) match NormalizedVersion without change
      with the automatic suggestion
    - 3474 (81.04%) match when using this suggestion method

    @param s {str} An irrational version string.
    @returns A rational version string, or None, if couldn't determine one.
    """
    try:
        _normalized_key(s)
        return s   # already rational
    except UnsupportedVersionError:
        pass

    rs = s.lower()

    # part of this could use maketrans
    for orig, repl in (('-alpha', 'a'), ('-beta', 'b'), ('alpha', 'a'),
                       ('beta', 'b'), ('rc', 'c'), ('-final', ''),
                       ('-pre', 'c'),
                       ('-release', ''), ('.release', ''), ('-stable', ''),
                       ('+', '.'), ('_', '.'), (' ', ''), ('.final', ''),
                       ('final', '')):
        rs = rs.replace(orig, repl)

    # if something ends with dev or pre, we add a 0
    rs = re.sub(r"pre$", r"pre0", rs)
    rs = re.sub(r"dev$", r"dev0", rs)

    # if we have something like "b-2" or "a.2" at the end of the
    # version, that is pobably beta, alpha, etc
    # let's remove the dash or dot
    rs = re.sub(r"([abc]|rc)[\-\.](\d+)$", r"\1\2", rs)

    # 1.0-dev-r371 -> 1.0.dev371
    # 0.1-dev-r79 -> 0.1.dev79
    rs = re.sub(r"[\-\.](dev)[\-\.]?r?(\d+)$", r".\1\2", rs)

    # Clean: 2.0.a.3, 2.0.b1, 0.9.0~c1
    rs = re.sub(r"[.~]?([abc])\.?", r"\1", rs)

    # Clean: v0.3, v1.0
    if rs.startswith('v'):
        rs = rs[1:]

    # Clean leading '0's on numbers.
    #TODO: unintended side-effect on, e.g., "2003.05.09"
    # PyPI stats: 77 (~2%) better
    rs = re.sub(r"\b0+(\d+)(?!\d)", r"\1", rs)

    # Clean a/b/c with no version. E.g. "1.0a" -> "1.0a0". Setuptools infers
    # zero.
    # PyPI stats: 245 (7.56%) better
    rs = re.sub(r"(\d+[abc])$", r"\g<1>0", rs)

    # the 'dev-rNNN' tag is a dev tag
    rs = re.sub(r"\.?(dev-r|dev\.r)\.?(\d+)$", r".dev\2", rs)

    # clean the - when used as a pre delimiter
    rs = re.sub(r"-(a|b|c)(\d+)$", r"\1\2", rs)

    # a terminal "dev" or "devel" can be changed into ".dev0"
    rs = re.sub(r"[\.\-](dev|devel)$", r".dev0", rs)

    # a terminal "dev" can be changed into ".dev0"
    rs = re.sub(r"(?![\.\-])dev$", r".dev0", rs)

    # a terminal "final" or "stable" can be removed
    rs = re.sub(r"(final|stable)$", "", rs)

    # The 'r' and the '-' tags are post release tags
    #   0.4a1.r10       ->  0.4a1.post10
    #   0.9.33-17222    ->  0.9.33.post17222
    #   0.9.33-r17222   ->  0.9.33.post17222
    rs = re.sub(r"\.?(r|-|-r)\.?(\d+)$", r".post\2", rs)

    # Clean 'r' instead of 'dev' usage:
    #   0.9.33+r17222   ->  0.9.33.dev17222
    #   1.0dev123       ->  1.0.dev123
    #   1.0.git123      ->  1.0.dev123
    #   1.0.bzr123      ->  1.0.dev123
    #   0.1a0dev.123    ->  0.1a0.dev123
    # PyPI stats:  ~150 (~4%) better
    rs = re.sub(r"\.?(dev|git|bzr)\.?(\d+)$", r".dev\2", rs)

    # Clean '.pre' (normalized from '-pre' above) instead of 'c' usage:
    #   0.2.pre1        ->  0.2c1
    #   0.2-c1         ->  0.2c1
    #   1.0preview123   ->  1.0c123
    # PyPI stats: ~21 (0.62%) better
    rs = re.sub(r"\.?(pre|preview|-c)(\d+)$", r"c\g<2>", rs)

    # Tcl/Tk uses "px" for their post release markers
    rs = re.sub(r"p(\d+)$", r".post\1", rs)

    try:
        _normalized_key(rs)
    except UnsupportedVersionError:
        rs = None
    return rs

#
#   Legacy version processing (distribute-compatible)
#

_VERSION_PART = re.compile(r'([a-z]+|\d+|[\.-])', re.I)
_VERSION_REPLACE = {
    'pre': 'c',
    'preview': 'c',
    '-': 'final-',
    'rc': 'c',
    'dev': '@',
    '': None,
    '.': None,
}


def _legacy_key(s):
    def get_parts(s):
        result = []
        for p in _VERSION_PART.split(s.lower()):
            p = _VERSION_REPLACE.get(p, p)
            if p:
                if '0' <= p[:1] <= '9':
                    p = p.zfill(8)
                else:
                    p = '*' + p
                result.append(p)
        result.append('*final')
        return result

    result = []
    for p in get_parts(s):
        if p.startswith('*'):
            if p < '*final':
                while result and result[-1] == '*final-':
                    result.pop()
            while result and result[-1] == '00000000':
                result.pop()
        result.append(p)
    return tuple(result)


class LegacyVersion(Version):
    def parse(self, s):
        return _legacy_key(s)

    @property
    def is_prerelease(self):
        result = False
        for x in self._parts:
            if (isinstance(x, string_types) and x.startswith('*') and
                x < '*final'):
                result = True
                break
        return result


class LegacyMatcher(Matcher):
    version_class = LegacyVersion

    _operators = dict(Matcher._operators)
    _operators['~='] = '_match_compatible'

    numeric_re = re.compile('^(\d+(\.\d+)*)')

    def _match_compatible(self, version, constraint, prefix):
        if version < constraint:
            return False
        m = self.numeric_re.match(str(constraint))
        if not m:
            logger.warning('Cannot compute compatible match for version %s '
                           ' and constraint %s', version, constraint)
            return True
        s = m.groups()[0]
        if '.' in s:
            s = s.rsplit('.', 1)[0]
        return _match_prefix(version, s)

#
#   Semantic versioning
#

_SEMVER_RE = re.compile(r'^(\d+)\.(\d+)\.(\d+)'
                        r'(-[a-z0-9]+(\.[a-z0-9-]+)*)?'
                        r'(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$', re.I)


def is_semver(s):
    return _SEMVER_RE.match(s)


def _semantic_key(s):
    def make_tuple(s, absent):
        if s is None:
            result = (absent,)
        else:
            parts = s[1:].split('.')
            # We can't compare ints and strings on Python 3, so fudge it
            # by zero-filling numeric values so simulate a numeric comparison
            result = tuple([p.zfill(8) if p.isdigit() else p for p in parts])
        return result

    m = is_semver(s)
    if not m:
        raise UnsupportedVersionError(s)
    groups = m.groups()
    major, minor, patch = [int(i) for i in groups[:3]]
    # choose the '|' and '*' so that versions sort correctly
    pre, build = make_tuple(groups[3], '|'), make_tuple(groups[5], '*')
    return (major, minor, patch), pre, build


class SemanticVersion(Version):
    def parse(self, s):
        return _semantic_key(s)

    @property
    def is_prerelease(self):
        return self._parts[1][0] != '|'


class SemanticMatcher(Matcher):
    version_class = SemanticVersion


class VersionScheme(object):
    def __init__(self, key, matcher, suggester=None):
        self.key = key
        self.matcher = matcher
        self.suggester = suggester

    def is_valid_version(self, s):
        try:
            self.matcher.version_class(s)
            result = True
        except UnsupportedVersionError:
            result = False
        return result

    def is_valid_matcher(self, s):
        try:
            self.matcher(s)
            result = True
        except UnsupportedVersionError:
            result = False
        return result

    def is_valid_constraint_list(self, s):
        """
        Used for processing some metadata fields
        """
        return self.is_valid_matcher('dummy_name (%s)' % s)

    def suggest(self, s):
        if self.suggester is None:
            result = None
        else:
            result = self.suggester(s)
        return result

_SCHEMES = {
    'normalized': VersionScheme(_normalized_key, NormalizedMatcher,
                                _suggest_normalized_version),
    'legacy': VersionScheme(_legacy_key, LegacyMatcher, lambda self, s: s),
    'semantic': VersionScheme(_semantic_key, SemanticMatcher,
                              _suggest_semantic_version),
}

_SCHEMES['default'] = _SCHEMES['normalized']


def get_scheme(name):
    if name not in _SCHEMES:
        raise ValueError('unknown scheme name: %r' % name)
    return _SCHEMES[name]
python3.4/site-packages/pip/_vendor/distlib/scripts.py000064400000030023151735047300016754 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from io import BytesIO
import logging
import os
import re
import struct
import sys

from .compat import sysconfig, fsencode, detect_encoding, ZipFile
from .resources import finder
from .util import (FileOperator, get_export_entry, convert_path,
                   get_executable, in_venv)

logger = logging.getLogger(__name__)

_DEFAULT_MANIFEST = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
 processorArchitecture="X86"
 name="%s"
 type="win32"/>

 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
 <requestedPrivileges>
 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
 </requestedPrivileges>
 </security>
 </trustInfo>
</assembly>'''.strip()

# check if Python is called on the first line with this expression
FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$')
SCRIPT_TEMPLATE = '''# -*- coding: utf-8 -*-
if __name__ == '__main__':
    import sys, re

    def _resolve(module, func):
        __import__(module)
        mod = sys.modules[module]
        parts = func.split('.')
        result = getattr(mod, parts.pop(0))
        for p in parts:
            result = getattr(result, p)
        return result

    try:
        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])

        func = _resolve('%(module)s', '%(func)s')
        rc = func() # None interpreted as 0
    except Exception as e:  # only supporting Python >= 2.6
        sys.stderr.write('%%s\\n' %% e)
        rc = 1
    sys.exit(rc)
'''


class ScriptMaker(object):
    """
    A class to copy or create scripts from source scripts or callable
    specifications.
    """
    script_template = SCRIPT_TEMPLATE

    executable = None  # for shebangs

    def __init__(self, source_dir, target_dir, add_launchers=True,
                 dry_run=False, fileop=None):
        self.source_dir = source_dir
        self.target_dir = target_dir
        self.add_launchers = add_launchers
        self.force = False
        self.clobber = False
        # It only makes sense to set mode bits on POSIX.
        self.set_mode = (os.name == 'posix')
        self.variants = set(('', 'X.Y'))
        self._fileop = fileop or FileOperator(dry_run)

    def _get_alternate_executable(self, executable, options):
        if options.get('gui', False) and os.name == 'nt':
            dn, fn = os.path.split(executable)
            fn = fn.replace('python', 'pythonw')
            executable = os.path.join(dn, fn)
        return executable

    def _get_shebang(self, encoding, post_interp=b'', options=None):
        enquote = True
        if self.executable:
            executable = self.executable
            enquote = False     # assume this will be taken care of
        elif not sysconfig.is_python_build():
            executable = get_executable()
        elif in_venv():
            executable = os.path.join(sysconfig.get_path('scripts'),
                            'python%s' % sysconfig.get_config_var('EXE'))
        else:
            executable = os.path.join(
                sysconfig.get_config_var('BINDIR'),
               'python%s%s' % (sysconfig.get_config_var('VERSION'),
                               sysconfig.get_config_var('EXE')))
        if options:
            executable = self._get_alternate_executable(executable, options)

        # If the user didn't specify an executable, it may be necessary to
        # cater for executable paths with spaces (not uncommon on Windows)
        if enquote and ' ' in executable:
            executable = '"%s"' % executable
        executable = fsencode(executable)
        shebang = b'#!' + executable + post_interp + b'\n'
        # Python parser starts to read a script using UTF-8 until
        # it gets a #coding:xxx cookie. The shebang has to be the
        # first line of a file, the #coding:xxx cookie cannot be
        # written before. So the shebang has to be decodable from
        # UTF-8.
        try:
            shebang.decode('utf-8')
        except UnicodeDecodeError:
            raise ValueError(
                'The shebang (%r) is not decodable from utf-8' % shebang)
        # If the script is encoded to a custom encoding (use a
        # #coding:xxx cookie), the shebang has to be decodable from
        # the script encoding too.
        if encoding != 'utf-8':
            try:
                shebang.decode(encoding)
            except UnicodeDecodeError:
                raise ValueError(
                    'The shebang (%r) is not decodable '
                    'from the script encoding (%r)' % (shebang, encoding))
        return shebang

    def _get_script_text(self, entry):
        return self.script_template % dict(module=entry.prefix,
                                           func=entry.suffix)

    manifest = _DEFAULT_MANIFEST

    def get_manifest(self, exename):
        base = os.path.basename(exename)
        return self.manifest % base

    def _write_script(self, names, shebang, script_bytes, filenames, ext):
        use_launcher = self.add_launchers and os.name == 'nt'
        linesep = os.linesep.encode('utf-8')
        if not use_launcher:
            script_bytes = shebang + linesep + script_bytes
        else:
            if ext == 'py':
                launcher = self._get_launcher('t')
            else:
                launcher = self._get_launcher('w')
            stream = BytesIO()
            with ZipFile(stream, 'w') as zf:
                zf.writestr('__main__.py', script_bytes)
            zip_data = stream.getvalue()
            script_bytes = launcher + shebang + linesep + zip_data
        for name in names:
            outname = os.path.join(self.target_dir, name)
            if use_launcher:
                n, e = os.path.splitext(outname)
                if e.startswith('.py'):
                    outname = n
                outname = '%s.exe' % outname
                try:
                    self._fileop.write_binary_file(outname, script_bytes)
                except Exception:
                    # Failed writing an executable - it might be in use.
                    logger.warning('Failed to write executable - trying to '
                                   'use .deleteme logic')
                    dfname = '%s.deleteme' % outname
                    if os.path.exists(dfname):
                        os.remove(dfname)       # Not allowed to fail here
                    os.rename(outname, dfname)  # nor here
                    self._fileop.write_binary_file(outname, script_bytes)
                    logger.debug('Able to replace executable using '
                                 '.deleteme logic')
                    try:
                        os.remove(dfname)
                    except Exception:
                        pass    # still in use - ignore error
            else:
                if os.name == 'nt' and not outname.endswith('.' + ext):
                    outname = '%s.%s' % (outname, ext)
                if os.path.exists(outname) and not self.clobber:
                    logger.warning('Skipping existing file %s', outname)
                    continue
                self._fileop.write_binary_file(outname, script_bytes)
                if self.set_mode:
                    self._fileop.set_executable_mode([outname])
            filenames.append(outname)

    def _make_script(self, entry, filenames, options=None):
        shebang = self._get_shebang('utf-8', options=options)
        script = self._get_script_text(entry).encode('utf-8')
        name = entry.name
        scriptnames = set()
        if '' in self.variants:
            scriptnames.add(name)
        if 'X' in self.variants:
            scriptnames.add('%s%s' % (name, sys.version[0]))
        if 'X.Y' in self.variants:
            scriptnames.add('%s-%s' % (name, sys.version[:3]))
        if options and options.get('gui', False):
            ext = 'pyw'
        else:
            ext = 'py'
        self._write_script(scriptnames, shebang, script, filenames, ext)

    def _copy_script(self, script, filenames):
        adjust = False
        script = os.path.join(self.source_dir, convert_path(script))
        outname = os.path.join(self.target_dir, os.path.basename(script))
        if not self.force and not self._fileop.newer(script, outname):
            logger.debug('not copying %s (up-to-date)', script)
            return

        # Always open the file, but ignore failures in dry-run mode --
        # that way, we'll get accurate feedback if we can read the
        # script.
        try:
            f = open(script, 'rb')
        except IOError:
            if not self.dry_run:
                raise
            f = None
        else:
            encoding, lines = detect_encoding(f.readline)
            f.seek(0)
            first_line = f.readline()
            if not first_line:
                logger.warning('%s: %s is an empty file (skipping)',
                               self.get_command_name(),  script)
                return

            match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n'))
            if match:
                adjust = True
                post_interp = match.group(1) or b''

        if not adjust:
            if f:
                f.close()
            self._fileop.copy_file(script, outname)
            if self.set_mode:
                self._fileop.set_executable_mode([outname])
            filenames.append(outname)
        else:
            logger.info('copying and adjusting %s -> %s', script,
                        self.target_dir)
            if not self._fileop.dry_run:
                shebang = self._get_shebang(encoding, post_interp)
                if b'pythonw' in first_line:
                    ext = 'pyw'
                else:
                    ext = 'py'
                n = os.path.basename(outname)
                self._write_script([n], shebang, f.read(), filenames, ext)
            if f:
                f.close()

    @property
    def dry_run(self):
        return self._fileop.dry_run

    @dry_run.setter
    def dry_run(self, value):
        self._fileop.dry_run = value

    if os.name == 'nt':
        # Executable launcher support.
        # Launchers are from https://bitbucket.org/vinay.sajip/simple_launcher/

        def _get_launcher(self, kind):
            if struct.calcsize('P') == 8:   # 64-bit
                bits = '64'
            else:
                bits = '32'
            name = '%s%s.exe' % (kind, bits)
            # Issue 31: don't hardcode an absolute package name, but
            # determine it relative to the current package
            distlib_package = __name__.rsplit('.', 1)[0]
            result = finder(distlib_package).find(name).bytes
            return result

    # Public API follows

    def make(self, specification, options=None):
        """
        Make a script.

        :param specification: The specification, which is either a valid export
                              entry specification (to make a script from a
                              callable) or a filename (to make a script by
                              copying from a source location).
        :param options: A dictionary of options controlling script generation.
        :return: A list of all absolute pathnames written to.
        """
        filenames = []
        entry = get_export_entry(specification)
        if entry is None:
            self._copy_script(specification, filenames)
        else:
            self._make_script(entry, filenames, options=options)
        return filenames

    def make_multiple(self, specifications, options=None):
        """
        Take a list of specifications and make scripts from them,
        :param specifications: A list of specifications.
        :return: A list of all absolute pathnames written to,
        """
        filenames = []
        for specification in specifications:
            filenames.extend(self.make(specification, options))
        return filenames
python3.4/site-packages/pip/_vendor/distlib/resources.py000064400000022330151735047310017302 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals

import bisect
import io
import logging
import os
import pkgutil
import shutil
import sys
import types
import zipimport

from . import DistlibException
from .util import cached_property, get_cache_base, path_to_cache_dir, Cache

logger = logging.getLogger(__name__)


cache = None    # created when needed


class ResourceCache(Cache):
    def __init__(self, base=None):
        if base is None:
            # Use native string to avoid issues on 2.x: see Python #20140.
            base = os.path.join(get_cache_base(), str('resource-cache'))
        super(ResourceCache, self).__init__(base)

    def is_stale(self, resource, path):
        """
        Is the cache stale for the given resource?

        :param resource: The :class:`Resource` being cached.
        :param path: The path of the resource in the cache.
        :return: True if the cache is stale.
        """
        # Cache invalidation is a hard problem :-)
        return True

    def get(self, resource):
        """
        Get a resource into the cache,

        :param resource: A :class:`Resource` instance.
        :return: The pathname of the resource in the cache.
        """
        prefix, path = resource.finder.get_cache_info(resource)
        if prefix is None:
            result = path
        else:
            result = os.path.join(self.base, self.prefix_to_dir(prefix), path)
            dirname = os.path.dirname(result)
            if not os.path.isdir(dirname):
                os.makedirs(dirname)
            if not os.path.exists(result):
                stale = True
            else:
                stale = self.is_stale(resource, path)
            if stale:
                # write the bytes of the resource to the cache location
                with open(result, 'wb') as f:
                    f.write(resource.bytes)
        return result


class ResourceBase(object):
    def __init__(self, finder, name):
        self.finder = finder
        self.name = name


class Resource(ResourceBase):
    """
    A class representing an in-package resource, such as a data file. This is
    not normally instantiated by user code, but rather by a
    :class:`ResourceFinder` which manages the resource.
    """
    is_container = False        # Backwards compatibility

    def as_stream(self):
        """
        Get the resource as a stream.

        This is not a property to make it obvious that it returns a new stream
        each time.
        """
        return self.finder.get_stream(self)

    @cached_property
    def file_path(self):
        global cache
        if cache is None:
            cache = ResourceCache()
        return cache.get(self)

    @cached_property
    def bytes(self):
        return self.finder.get_bytes(self)

    @cached_property
    def size(self):
        return self.finder.get_size(self)


class ResourceContainer(ResourceBase):
    is_container = True     # Backwards compatibility

    @cached_property
    def resources(self):
        return self.finder.get_resources(self)


class ResourceFinder(object):
    """
    Resource finder for file system resources.
    """
    def __init__(self, module):
        self.module = module
        self.loader = getattr(module, '__loader__', None)
        self.base = os.path.dirname(getattr(module, '__file__', ''))

    def _adjust_path(self, path):
        return os.path.realpath(path)

    def _make_path(self, resource_name):
        parts = resource_name.split('/')
        parts.insert(0, self.base)
        result = os.path.join(*parts)
        return self._adjust_path(result)

    def _find(self, path):
        return os.path.exists(path)

    def get_cache_info(self, resource):
        return None, resource.path

    def find(self, resource_name):
        path = self._make_path(resource_name)
        if not self._find(path):
            result = None
        else:
            if self._is_directory(path):
                result = ResourceContainer(self, resource_name)
            else:
                result = Resource(self, resource_name)
            result.path = path
        return result

    def get_stream(self, resource):
        return open(resource.path, 'rb')

    def get_bytes(self, resource):
        with open(resource.path, 'rb') as f:
            return f.read()

    def get_size(self, resource):
        return os.path.getsize(resource.path)

    def get_resources(self, resource):
        def allowed(f):
            return f != '__pycache__' and not f.endswith(('.pyc', '.pyo'))
        return set([f for f in os.listdir(resource.path) if allowed(f)])

    def is_container(self, resource):
        return self._is_directory(resource.path)

    _is_directory = staticmethod(os.path.isdir)


class ZipResourceFinder(ResourceFinder):
    """
    Resource finder for resources in .zip files.
    """
    def __init__(self, module):
        super(ZipResourceFinder, self).__init__(module)
        archive = self.loader.archive
        self.prefix_len = 1 + len(archive)
        # PyPy doesn't have a _files attr on zipimporter, and you can't set one
        if hasattr(self.loader, '_files'):
            self._files = self.loader._files
        else:
            self._files = zipimport._zip_directory_cache[archive]
        self.index = sorted(self._files)

    def _adjust_path(self, path):
        return path

    def _find(self, path):
        path = path[self.prefix_len:]
        if path in self._files:
            result = True
        else:
            if path and path[-1] != os.sep:
                path = path + os.sep
            i = bisect.bisect(self.index, path)
            try:
                result = self.index[i].startswith(path)
            except IndexError:
                result = False
        if not result:
            logger.debug('_find failed: %r %r', path, self.loader.prefix)
        else:
            logger.debug('_find worked: %r %r', path, self.loader.prefix)
        return result

    def get_cache_info(self, resource):
        prefix = self.loader.archive
        path = resource.path[1 + len(prefix):]
        return prefix, path

    def get_bytes(self, resource):
        return self.loader.get_data(resource.path)

    def get_stream(self, resource):
        return io.BytesIO(self.get_bytes(resource))

    def get_size(self, resource):
        path = resource.path[self.prefix_len:]
        return self._files[path][3]

    def get_resources(self, resource):
        path = resource.path[self.prefix_len:]
        if path and path[-1] != os.sep:
            path += os.sep
        plen = len(path)
        result = set()
        i = bisect.bisect(self.index, path)
        while i < len(self.index):
            if not self.index[i].startswith(path):
                break
            s = self.index[i][plen:]
            result.add(s.split(os.sep, 1)[0])   # only immediate children
            i += 1
        return result

    def _is_directory(self, path):
        path = path[self.prefix_len:]
        if path and path[-1] != os.sep:
            path += os.sep
        i = bisect.bisect(self.index, path)
        try:
            result = self.index[i].startswith(path)
        except IndexError:
            result = False
        return result

_finder_registry = {
    type(None): ResourceFinder,
    zipimport.zipimporter: ZipResourceFinder
}

try:
    import _frozen_importlib
    _finder_registry[_frozen_importlib.SourceFileLoader] = ResourceFinder
    _finder_registry[_frozen_importlib.FileFinder] = ResourceFinder
except (ImportError, AttributeError):
    pass


def register_finder(loader, finder_maker):
    _finder_registry[type(loader)] = finder_maker

_finder_cache = {}


def finder(package):
    """
    Return a resource finder for a package.
    :param package: The name of the package.
    :return: A :class:`ResourceFinder` instance for the package.
    """
    if package in _finder_cache:
        result = _finder_cache[package]
    else:
        if package not in sys.modules:
            __import__(package)
        module = sys.modules[package]
        path = getattr(module, '__path__', None)
        if path is None:
            raise DistlibException('You cannot get a finder for a module, '
                                   'only for a package')
        loader = getattr(module, '__loader__', None)
        finder_maker = _finder_registry.get(type(loader))
        if finder_maker is None:
            raise DistlibException('Unable to locate finder for %r' % package)
        result = finder_maker(module)
        _finder_cache[package] = result
    return result


_dummy_module = types.ModuleType(str('__dummy__'))


def finder_for_path(path):
    """
    Return a resource finder for a path, which should represent a container.

    :param path: The path.
    :return: A :class:`ResourceFinder` instance for the path.
    """
    result = None
    # calls any path hooks, gets importer into cache
    pkgutil.get_importer(path)
    loader = sys.path_importer_cache.get(path)
    finder = _finder_registry.get(type(loader))
    if finder:
        module = _dummy_module
        module.__file__ = os.path.join(path, '')
        module.__loader__ = loader
        result = finder(module)
    return result
python3.4/site-packages/pip/_vendor/distlib/index.py000064400000046024151735047310016405 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import hashlib
import logging
import os
import shutil
import subprocess
import tempfile
try:
    from threading import Thread
except ImportError:
    from dummy_threading import Thread

from . import DistlibException
from .compat import (HTTPBasicAuthHandler, Request, HTTPPasswordMgr,
                     urlparse, build_opener, string_types)
from .util import cached_property, zip_dir, ServerProxy

logger = logging.getLogger(__name__)

DEFAULT_INDEX = 'https://pypi.python.org/pypi'
DEFAULT_REALM = 'pypi'

class PackageIndex(object):
    """
    This class represents a package index compatible with PyPI, the Python
    Package Index.
    """

    boundary = b'----------ThIs_Is_tHe_distlib_index_bouNdaRY_$'

    def __init__(self, url=None):
        """
        Initialise an instance.

        :param url: The URL of the index. If not specified, the URL for PyPI is
                    used.
        """
        self.url = url or DEFAULT_INDEX
        self.read_configuration()
        scheme, netloc, path, params, query, frag = urlparse(self.url)
        if params or query or frag or scheme not in ('http', 'https'):
            raise DistlibException('invalid repository: %s' % self.url)
        self.password_handler = None
        self.ssl_verifier = None
        self.gpg = None
        self.gpg_home = None
        self.rpc_proxy = None
        with open(os.devnull, 'w') as sink:
            for s in ('gpg2', 'gpg'):
                try:
                    rc = subprocess.check_call([s, '--version'], stdout=sink,
                                               stderr=sink)
                    if rc == 0:
                        self.gpg = s
                        break
                except OSError:
                    pass

    def _get_pypirc_command(self):
        """
        Get the distutils command for interacting with PyPI configurations.
        :return: the command.
        """
        from distutils.core import Distribution
        from distutils.config import PyPIRCCommand
        d = Distribution()
        return PyPIRCCommand(d)

    def read_configuration(self):
        """
        Read the PyPI access configuration as supported by distutils, getting
        PyPI to do the acutal work. This populates ``username``, ``password``,
        ``realm`` and ``url`` attributes from the configuration.
        """
        # get distutils to do the work
        c = self._get_pypirc_command()
        c.repository = self.url
        cfg = c._read_pypirc()
        self.username = cfg.get('username')
        self.password = cfg.get('password')
        self.realm = cfg.get('realm', 'pypi')
        self.url = cfg.get('repository', self.url)

    def save_configuration(self):
        """
        Save the PyPI access configuration. You must have set ``username`` and
        ``password`` attributes before calling this method.

        Again, distutils is used to do the actual work.
        """
        self.check_credentials()
        # get distutils to do the work
        c = self._get_pypirc_command()
        c._store_pypirc(self.username, self.password)

    def check_credentials(self):
        """
        Check that ``username`` and ``password`` have been set, and raise an
        exception if not.
        """
        if self.username is None or self.password is None:
            raise DistlibException('username and password must be set')
        pm = HTTPPasswordMgr()
        _, netloc, _, _, _, _ = urlparse(self.url)
        pm.add_password(self.realm, netloc, self.username, self.password)
        self.password_handler = HTTPBasicAuthHandler(pm)

    def register(self, metadata):
        """
        Register a distribution on PyPI, using the provided metadata.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the distribution to be
                         registered.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        metadata.validate()
        d = metadata.todict()
        d[':action'] = 'verify'
        request = self.encode_request(d.items(), [])
        response = self.send_request(request)
        d[':action'] = 'submit'
        request = self.encode_request(d.items(), [])
        return self.send_request(request)

    def _reader(self, name, stream, outbuf):
        """
        Thread runner for reading lines of from a subprocess into a buffer.

        :param name: The logical name of the stream (used for logging only).
        :param stream: The stream to read from. This will typically a pipe
                       connected to the output stream of a subprocess.
        :param outbuf: The list to append the read lines to.
        """
        while True:
            s = stream.readline()
            if not s:
                break
            s = s.decode('utf-8').rstrip()
            outbuf.append(s)
            logger.debug('%s: %s' % (name, s))
        stream.close()

    def get_sign_command(self, filename, signer, sign_password):
        """
        Return a suitable command for signing a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The signing command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        """
        cmd = [self.gpg, '--status-fd', '2', '--no-tty']
        if self.gpg_home:
            cmd.extend(['--homedir', self.gpg_home])
        if sign_password is not None:
            cmd.extend(['--batch', '--passphrase-fd', '0'])
        td = tempfile.mkdtemp()
        sf = os.path.join(td, os.path.basename(filename) + '.asc')
        cmd.extend(['--detach-sign', '--armor', '--local-user',
                    signer, '--output', sf, filename])
        logger.debug('invoking: %s', ' '.join(cmd))
        return cmd, sf

    def run_command(self, cmd, input_data=None):
        """
        Run a command in a child process , passing it any input data specified.

        :param cmd: The command to run.
        :param input_data: If specified, this must be a byte string containing
                           data to be sent to the child process.
        :return: A tuple consisting of the subprocess' exit code, a list of
                 lines read from the subprocess' ``stdout``, and a list of
                 lines read from the subprocess' ``stderr``.
        """
        kwargs = {
            'stdout': subprocess.PIPE,
            'stderr': subprocess.PIPE,
        }
        if input_data is not None:
            kwargs['stdin'] = subprocess.PIPE
        stdout = []
        stderr = []
        p = subprocess.Popen(cmd, **kwargs)
        # We don't use communicate() here because we may need to
        # get clever with interacting with the command
        t1 = Thread(target=self._reader, args=('stdout', p.stdout, stdout))
        t1.start()
        t2 = Thread(target=self._reader, args=('stderr', p.stderr, stderr))
        t2.start()
        if input_data is not None:
            p.stdin.write(input_data)
            p.stdin.close()

        p.wait()
        t1.join()
        t2.join()
        return p.returncode, stdout, stderr

    def sign_file(self, filename, signer, sign_password):
        """
        Sign a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The absolute pathname of the file where the signature is
                 stored.
        """
        cmd, sig_file = self.get_sign_command(filename, signer, sign_password)
        rc, stdout, stderr = self.run_command(cmd,
                                              sign_password.encode('utf-8'))
        if rc != 0:
            raise DistlibException('sign command failed with error '
                                   'code %s' % rc)
        return sig_file

    def upload_file(self, metadata, filename, signer=None, sign_password=None,
                    filetype='sdist', pyversion='source'):
        """
        Upload a release file to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the file to be uploaded.
        :param filename: The pathname of the file to be uploaded.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param filetype: The type of the file being uploaded. This is the
                        distutils command which produced that file, e.g.
                        ``sdist`` or ``bdist_wheel``.
        :param pyversion: The version of Python which the release relates
                          to. For code compatible with any Python, this would
                          be ``source``, otherwise it would be e.g. ``3.2``.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        if not os.path.exists(filename):
            raise DistlibException('not found: %s' % filename)
        metadata.validate()
        d = metadata.todict()
        sig_file = None
        if signer:
            if not self.gpg:
                logger.warning('no signing program available - not signed')
            else:
                sig_file = self.sign_file(filename, signer, sign_password)
        with open(filename, 'rb') as f:
            file_data = f.read()
        md5_digest = hashlib.md5(file_data).hexdigest()
        sha256_digest = hashlib.sha256(file_data).hexdigest()
        d.update({
            ':action': 'file_upload',
            'protcol_version': '1',
            'filetype': filetype,
            'pyversion': pyversion,
            'md5_digest': md5_digest,
            'sha256_digest': sha256_digest,
        })
        files = [('content', os.path.basename(filename), file_data)]
        if sig_file:
            with open(sig_file, 'rb') as f:
                sig_data = f.read()
            files.append(('gpg_signature', os.path.basename(sig_file),
                         sig_data))
            shutil.rmtree(os.path.dirname(sig_file))
        request = self.encode_request(d.items(), files)
        return self.send_request(request)

    def upload_documentation(self, metadata, doc_dir):
        """
        Upload documentation to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the documentation to be
                         uploaded.
        :param doc_dir: The pathname of the directory which contains the
                        documentation. This should be the directory that
                        contains the ``index.html`` for the documentation.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        """
        self.check_credentials()
        if not os.path.isdir(doc_dir):
            raise DistlibException('not a directory: %r' % doc_dir)
        fn = os.path.join(doc_dir, 'index.html')
        if not os.path.exists(fn):
            raise DistlibException('not found: %r' % fn)
        metadata.validate()
        name, version = metadata.name, metadata.version
        zip_data = zip_dir(doc_dir).getvalue()
        fields = [(':action', 'doc_upload'),
                  ('name', name), ('version', version)]
        files = [('content', name, zip_data)]
        request = self.encode_request(fields, files)
        return self.send_request(request)

    def get_verify_command(self, signature_filename, data_filename):
        """
        Return a suitable command for verifying a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: The verifying command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        """
        cmd = [self.gpg, '--status-fd', '2', '--no-tty']
        if self.gpg_home:
            cmd.extend(['--homedir', self.gpg_home])
        cmd.extend(['--verify', signature_filename, data_filename])
        logger.debug('invoking: %s', ' '.join(cmd))
        return cmd

    def verify_signature(self, signature_filename, data_filename):
        """
        Verify a signature for a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: True if the signature was verified, else False.
        """
        if not self.gpg:
            raise DistlibException('verification unavailable because gpg '
                                   'unavailable')
        cmd = self.get_verify_command(signature_filename, data_filename)
        rc, stdout, stderr = self.run_command(cmd)
        if rc not in (0, 1):
            raise DistlibException('verify command failed with error '
                             'code %s' % rc)
        return rc == 0

    def download_file(self, url, destfile, digest=None, reporthook=None):
        """
        This is a convenience method for downloading a file from an URL.
        Normally, this will be a file from the index, though currently
        no check is made for this (i.e. a file can be downloaded from
        anywhere).

        The method is just like the :func:`urlretrieve` function in the
        standard library, except that it allows digest computation to be
        done during download and checking that the downloaded data
        matched any expected value.

        :param url: The URL of the file to be downloaded (assumed to be
                    available via an HTTP GET request).
        :param destfile: The pathname where the downloaded file is to be
                         saved.
        :param digest: If specified, this must be a (hasher, value)
                       tuple, where hasher is the algorithm used (e.g.
                       ``'md5'``) and ``value`` is the expected value.
        :param reporthook: The same as for :func:`urlretrieve` in the
                           standard library.
        """
        if digest is None:
            digester = None
            logger.debug('No digest specified')
        else:
            if isinstance(digest, (list, tuple)):
                hasher, digest = digest
            else:
                hasher = 'md5'
            digester = getattr(hashlib, hasher)()
            logger.debug('Digest specified: %s' % digest)
        # The following code is equivalent to urlretrieve.
        # We need to do it this way so that we can compute the
        # digest of the file as we go.
        with open(destfile, 'wb') as dfp:
            # addinfourl is not a context manager on 2.x
            # so we have to use try/finally
            sfp = self.send_request(Request(url))
            try:
                headers = sfp.info()
                blocksize = 8192
                size = -1
                read = 0
                blocknum = 0
                if "content-length" in headers:
                    size = int(headers["Content-Length"])
                if reporthook:
                    reporthook(blocknum, blocksize, size)
                while True:
                    block = sfp.read(blocksize)
                    if not block:
                        break
                    read += len(block)
                    dfp.write(block)
                    if digester:
                        digester.update(block)
                    blocknum += 1
                    if reporthook:
                        reporthook(blocknum, blocksize, size)
            finally:
                sfp.close()

        # check that we got the whole file, if we can
        if size >= 0 and read < size:
            raise DistlibException(
                'retrieval incomplete: got only %d out of %d bytes'
                % (read, size))
        # if we have a digest, it must match.
        if digester:
            actual = digester.hexdigest()
            if digest != actual:
                raise DistlibException('%s digest mismatch for %s: expected '
                                       '%s, got %s' % (hasher, destfile,
                                                       digest, actual))
            logger.debug('Digest verified: %s', digest)

    def send_request(self, req):
        """
        Send a standard library :class:`Request` to PyPI and return its
        response.

        :param req: The request to send.
        :return: The HTTP response from PyPI (a standard library HTTPResponse).
        """
        handlers = []
        if self.password_handler:
            handlers.append(self.password_handler)
        if self.ssl_verifier:
            handlers.append(self.ssl_verifier)
        opener = build_opener(*handlers)
        return opener.open(req)

    def encode_request(self, fields, files):
        """
        Encode fields and files for posting to an HTTP server.

        :param fields: The fields to send as a list of (fieldname, value)
                       tuples.
        :param files: The files to send as a list of (fieldname, filename,
                      file_bytes) tuple.
        """
        # Adapted from packaging, which in turn was adapted from
        # http://code.activestate.com/recipes/146306

        parts = []
        boundary = self.boundary
        for k, values in fields:
            if not isinstance(values, (list, tuple)):
                values = [values]

            for v in values:
                parts.extend((
                    b'--' + boundary,
                    ('Content-Disposition: form-data; name="%s"' %
                     k).encode('utf-8'),
                    b'',
                    v.encode('utf-8')))
        for key, filename, value in files:
            parts.extend((
                b'--' + boundary,
                ('Content-Disposition: form-data; name="%s"; filename="%s"' %
                 (key, filename)).encode('utf-8'),
                b'',
                value))

        parts.extend((b'--' + boundary + b'--', b''))

        body = b'\r\n'.join(parts)
        ct = b'multipart/form-data; boundary=' + boundary
        headers = {
            'Content-type': ct,
            'Content-length': str(len(body))
        }
        return Request(self.url, body, headers)

    def search(self, terms, operator=None):
        if isinstance(terms, string_types):
            terms = {'name': terms}
        if self.rpc_proxy is None:
            self.rpc_proxy = ServerProxy(self.url, timeout=3.0)
        return self.rpc_proxy.search(terms, operator or 'and')
python3.4/site-packages/pip/_vendor/distlib/database.py000064400000137762151735047320017055 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""PEP 376 implementation."""

from __future__ import unicode_literals

import base64
import codecs
import contextlib
import hashlib
import logging
import os
import posixpath
import sys
import zipimport

from . import DistlibException, resources
from .compat import StringIO
from .version import get_scheme, UnsupportedVersionError
from .metadata import Metadata, METADATA_FILENAME
from .util import (parse_requirement, cached_property, parse_name_and_version,
                   read_exports, write_exports, CSVReader, CSVWriter)


__all__ = ['Distribution', 'BaseInstalledDistribution',
           'InstalledDistribution', 'EggInfoDistribution',
           'DistributionPath']


logger = logging.getLogger(__name__)

EXPORTS_FILENAME = 'pydist-exports.json'
COMMANDS_FILENAME = 'pydist-commands.json'

DIST_FILES = ('INSTALLER', METADATA_FILENAME, 'RECORD', 'REQUESTED',
              'RESOURCES', EXPORTS_FILENAME, 'SHARED')

DISTINFO_EXT = '.dist-info'


class _Cache(object):
    """
    A simple cache mapping names and .dist-info paths to distributions
    """
    def __init__(self):
        """
        Initialise an instance. There is normally one for each DistributionPath.
        """
        self.name = {}
        self.path = {}
        self.generated = False

    def clear(self):
        """
        Clear the cache, setting it to its initial state.
        """
        self.name.clear()
        self.path.clear()
        self.generated = False

    def add(self, dist):
        """
        Add a distribution to the cache.
        :param dist: The distribution to add.
        """
        if dist.path not in self.path:
            self.path[dist.path] = dist
            self.name.setdefault(dist.key, []).append(dist)


class DistributionPath(object):
    """
    Represents a set of distributions installed on a path (typically sys.path).
    """
    def __init__(self, path=None, include_egg=False):
        """
        Create an instance from a path, optionally including legacy (distutils/
        setuptools/distribute) distributions.
        :param path: The path to use, as a list of directories. If not specified,
                     sys.path is used.
        :param include_egg: If True, this instance will look for and return legacy
                            distributions as well as those based on PEP 376.
        """
        if path is None:
            path = sys.path
        self.path = path
        self._include_dist = True
        self._include_egg = include_egg

        self._cache = _Cache()
        self._cache_egg = _Cache()
        self._cache_enabled = True
        self._scheme = get_scheme('default')

    def _get_cache_enabled(self):
        return self._cache_enabled

    def _set_cache_enabled(self, value):
        self._cache_enabled = value

    cache_enabled = property(_get_cache_enabled, _set_cache_enabled)

    def clear_cache(self):
        """
        Clears the internal cache.
        """
        self._cache.clear()
        self._cache_egg.clear()


    def _yield_distributions(self):
        """
        Yield .dist-info and/or .egg(-info) distributions.
        """
        # We need to check if we've seen some resources already, because on
        # some Linux systems (e.g. some Debian/Ubuntu variants) there are
        # symlinks which alias other files in the environment.
        seen = set()
        for path in self.path:
            finder = resources.finder_for_path(path)
            if finder is None:
                continue
            r = finder.find('')
            if not r or not r.is_container:
                continue
            rset = sorted(r.resources)
            for entry in rset:
                r = finder.find(entry)
                if not r or r.path in seen:
                    continue
                if self._include_dist and entry.endswith(DISTINFO_EXT):
                    metadata_path = posixpath.join(entry, METADATA_FILENAME)
                    pydist = finder.find(metadata_path)
                    if not pydist:
                        continue

                    metadata = Metadata(fileobj=pydist.as_stream(),
                                        scheme='legacy')
                    logger.debug('Found %s', r.path)
                    seen.add(r.path)
                    yield new_dist_class(r.path, metadata=metadata,
                                         env=self)
                elif self._include_egg and entry.endswith(('.egg-info',
                                                          '.egg')):
                    logger.debug('Found %s', r.path)
                    seen.add(r.path)
                    yield old_dist_class(r.path, self)

    def _generate_cache(self):
        """
        Scan the path for distributions and populate the cache with
        those that are found.
        """
        gen_dist = not self._cache.generated
        gen_egg = self._include_egg and not self._cache_egg.generated
        if gen_dist or gen_egg:
            for dist in self._yield_distributions():
                if isinstance(dist, InstalledDistribution):
                    self._cache.add(dist)
                else:
                    self._cache_egg.add(dist)

            if gen_dist:
                self._cache.generated = True
            if gen_egg:
                self._cache_egg.generated = True

    @classmethod
    def distinfo_dirname(cls, name, version):
        """
        The *name* and *version* parameters are converted into their
        filename-escaped form, i.e. any ``'-'`` characters are replaced
        with ``'_'`` other than the one in ``'dist-info'`` and the one
        separating the name from the version number.

        :parameter name: is converted to a standard distribution name by replacing
                         any runs of non- alphanumeric characters with a single
                         ``'-'``.
        :type name: string
        :parameter version: is converted to a standard version string. Spaces
                            become dots, and all other non-alphanumeric characters
                            (except dots) become dashes, with runs of multiple
                            dashes condensed to a single dash.
        :type version: string
        :returns: directory name
        :rtype: string"""
        name = name.replace('-', '_')
        return '-'.join([name, version]) + DISTINFO_EXT

    def get_distributions(self):
        """
        Provides an iterator that looks for distributions and returns
        :class:`InstalledDistribution` or
        :class:`EggInfoDistribution` instances for each one of them.

        :rtype: iterator of :class:`InstalledDistribution` and
                :class:`EggInfoDistribution` instances
        """
        if not self._cache_enabled:
            for dist in self._yield_distributions():
                yield dist
        else:
            self._generate_cache()

            for dist in self._cache.path.values():
                yield dist

            if self._include_egg:
                for dist in self._cache_egg.path.values():
                    yield dist

    def get_distribution(self, name):
        """
        Looks for a named distribution on the path.

        This function only returns the first result found, as no more than one
        value is expected. If nothing is found, ``None`` is returned.

        :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
                or ``None``
        """
        result = None
        name = name.lower()
        if not self._cache_enabled:
            for dist in self._yield_distributions():
                if dist.key == name:
                    result = dist
                    break
        else:
            self._generate_cache()

            if name in self._cache.name:
                result = self._cache.name[name][0]
            elif self._include_egg and name in self._cache_egg.name:
                result = self._cache_egg.name[name][0]
        return result

    def provides_distribution(self, name, version=None):
        """
        Iterates over all distributions to find which distributions provide *name*.
        If a *version* is provided, it will be used to filter the results.

        This function only returns the first result found, since no more than
        one values are expected. If the directory is not found, returns ``None``.

        :parameter version: a version specifier that indicates the version
                            required, conforming to the format in ``PEP-345``

        :type name: string
        :type version: string
        """
        matcher = None
        if not version is None:
            try:
                matcher = self._scheme.matcher('%s (%s)' % (name, version))
            except ValueError:
                raise DistlibException('invalid name or version: %r, %r' %
                                      (name, version))

        for dist in self.get_distributions():
            provided = dist.provides

            for p in provided:
                p_name, p_ver = parse_name_and_version(p)
                if matcher is None:
                    if p_name == name:
                        yield dist
                        break
                else:
                    if p_name == name and matcher.match(p_ver):
                        yield dist
                        break

    def get_file_path(self, name, relative_path):
        """
        Return the path to a resource file.
        """
        dist = self.get_distribution(name)
        if dist is None:
            raise LookupError('no distribution named %r found' % name)
        return dist.get_resource_path(relative_path)

    def get_exported_entries(self, category, name=None):
        """
        Return all of the exported entries in a particular category.

        :param category: The category to search for entries.
        :param name: If specified, only entries with that name are returned.
        """
        for dist in self.get_distributions():
            r = dist.exports
            if category in r:
                d = r[category]
                if name is not None:
                    if name in d:
                        yield d[name]
                else:
                    for v in d.values():
                        yield v


class Distribution(object):
    """
    A base class for distributions, whether installed or from indexes.
    Either way, it must have some metadata, so that's all that's needed
    for construction.
    """

    build_time_dependency = False
    """
    Set to True if it's known to be only a build-time dependency (i.e.
    not needed after installation).
    """

    requested = False
    """A boolean that indicates whether the ``REQUESTED`` metadata file is
    present (in other words, whether the package was installed by user
    request or it was installed as a dependency)."""

    def __init__(self, metadata):
        """
        Initialise an instance.
        :param metadata: The instance of :class:`Metadata` describing this
        distribution.
        """
        self.metadata = metadata
        self.name = metadata.name
        self.key = self.name.lower()    # for case-insensitive comparisons
        self.version = metadata.version
        self.locator = None
        self.digest = None
        self.extras = None      # additional features requested
        self.context = None     # environment marker overrides

    @property
    def source_url(self):
        """
        The source archive download URL for this distribution.
        """
        return self.metadata.source_url

    download_url = source_url   # Backward compatibility

    @property
    def name_and_version(self):
        """
        A utility property which displays the name and version in parentheses.
        """
        return '%s (%s)' % (self.name, self.version)

    @property
    def provides(self):
        """
        A set of distribution names and versions provided by this distribution.
        :return: A set of "name (version)" strings.
        """
        plist = self.metadata.provides
        s = '%s (%s)' % (self.name, self.version)
        if s not in plist:
            plist.append(s)
        return plist

    def _get_requirements(self, req_attr):
        reqts = getattr(self.metadata, req_attr)
        return set(self.metadata.get_requirements(reqts, extras=self.extras,
                                                  env=self.context))

    @property
    def run_requires(self):
        return self._get_requirements('run_requires')

    @property
    def meta_requires(self):
        return self._get_requirements('meta_requires')

    @property
    def build_requires(self):
        return self._get_requirements('build_requires')

    @property
    def test_requires(self):
        return self._get_requirements('test_requires')

    @property
    def dev_requires(self):
        return self._get_requirements('dev_requires')

    def matches_requirement(self, req):
        """
        Say if this instance matches (fulfills) a requirement.
        :param req: The requirement to match.
        :rtype req: str
        :return: True if it matches, else False.
        """
        # Requirement may contain extras - parse to lose those
        # from what's passed to the matcher
        r = parse_requirement(req)
        scheme = get_scheme(self.metadata.scheme)
        try:
            matcher = scheme.matcher(r.requirement)
        except UnsupportedVersionError:
            # XXX compat-mode if cannot read the version
            logger.warning('could not read version %r - using name only',
                           req)
            name = req.split()[0]
            matcher = scheme.matcher(name)

        name = matcher.key   # case-insensitive

        result = False
        for p in self.provides:
            p_name, p_ver = parse_name_and_version(p)
            if p_name != name:
                continue
            try:
                result = matcher.match(p_ver)
                break
            except UnsupportedVersionError:
                pass
        return result

    def __repr__(self):
        """
        Return a textual representation of this instance,
        """
        if self.source_url:
            suffix = ' [%s]' % self.source_url
        else:
            suffix = ''
        return '<Distribution %s (%s)%s>' % (self.name, self.version, suffix)

    def __eq__(self, other):
        """
        See if this distribution is the same as another.
        :param other: The distribution to compare with. To be equal to one
                      another. distributions must have the same type, name,
                      version and source_url.
        :return: True if it is the same, else False.
        """
        if type(other) is not type(self):
            result = False
        else:
            result = (self.name == other.name and
                      self.version == other.version and
                      self.source_url == other.source_url)
        return result

    def __hash__(self):
        """
        Compute hash in a way which matches the equality test.
        """
        return hash(self.name) + hash(self.version) + hash(self.source_url)


class BaseInstalledDistribution(Distribution):
    """
    This is the base class for installed distributions (whether PEP 376 or
    legacy).
    """

    hasher = None

    def __init__(self, metadata, path, env=None):
        """
        Initialise an instance.
        :param metadata: An instance of :class:`Metadata` which describes the
                         distribution. This will normally have been initialised
                         from a metadata file in the ``path``.
        :param path:     The path of the ``.dist-info`` or ``.egg-info``
                         directory for the distribution.
        :param env:      This is normally the :class:`DistributionPath`
                         instance where this distribution was found.
        """
        super(BaseInstalledDistribution, self).__init__(metadata)
        self.path = path
        self.dist_path = env

    def get_hash(self, data, hasher=None):
        """
        Get the hash of some data, using a particular hash algorithm, if
        specified.

        :param data: The data to be hashed.
        :type data: bytes
        :param hasher: The name of a hash implementation, supported by hashlib,
                       or ``None``. Examples of valid values are ``'sha1'``,
                       ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
                       ``'sha512'``. If no hasher is specified, the ``hasher``
                       attribute of the :class:`InstalledDistribution` instance
                       is used. If the hasher is determined to be ``None``, MD5
                       is used as the hashing algorithm.
        :returns: The hash of the data. If a hasher was explicitly specified,
                  the returned hash will be prefixed with the specified hasher
                  followed by '='.
        :rtype: str
        """
        if hasher is None:
            hasher = self.hasher
        if hasher is None:
            hasher = hashlib.md5
            prefix = ''
        else:
            hasher = getattr(hashlib, hasher)
            prefix = '%s=' % self.hasher
        digest = hasher(data).digest()
        digest = base64.urlsafe_b64encode(digest).rstrip(b'=').decode('ascii')
        return '%s%s' % (prefix, digest)


class InstalledDistribution(BaseInstalledDistribution):
    """
    Created with the *path* of the ``.dist-info`` directory provided to the
    constructor. It reads the metadata contained in ``pydist.json`` when it is
    instantiated., or uses a passed in Metadata instance (useful for when
    dry-run mode is being used).
    """

    hasher = 'sha256'

    def __init__(self, path, metadata=None, env=None):
        self.finder = finder = resources.finder_for_path(path)
        if finder is None:
            import pdb; pdb.set_trace ()
        if env and env._cache_enabled and path in env._cache.path:
            metadata = env._cache.path[path].metadata
        elif metadata is None:
            r = finder.find(METADATA_FILENAME)
            # Temporary - for legacy support
            if r is None:
                r = finder.find('METADATA')
            if r is None:
                raise ValueError('no %s found in %s' % (METADATA_FILENAME,
                                                        path))
            with contextlib.closing(r.as_stream()) as stream:
                metadata = Metadata(fileobj=stream, scheme='legacy')

        super(InstalledDistribution, self).__init__(metadata, path, env)

        if env and env._cache_enabled:
            env._cache.add(self)

        try:
            r = finder.find('REQUESTED')
        except AttributeError:
            import pdb; pdb.set_trace ()
        self.requested = r is not None

    def __repr__(self):
        return '<InstalledDistribution %r %s at %r>' % (
            self.name, self.version, self.path)

    def __str__(self):
        return "%s %s" % (self.name, self.version)

    def _get_records(self):
        """
        Get the list of installed files for the distribution
        :return: A list of tuples of path, hash and size. Note that hash and
                 size might be ``None`` for some entries. The path is exactly
                 as stored in the file (which is as in PEP 376).
        """
        results = []
        r = self.get_distinfo_resource('RECORD')
        with contextlib.closing(r.as_stream()) as stream:
            with CSVReader(stream=stream) as record_reader:
                # Base location is parent dir of .dist-info dir
                #base_location = os.path.dirname(self.path)
                #base_location = os.path.abspath(base_location)
                for row in record_reader:
                    missing = [None for i in range(len(row), 3)]
                    path, checksum, size = row + missing
                    #if not os.path.isabs(path):
                    #    path = path.replace('/', os.sep)
                    #    path = os.path.join(base_location, path)
                    results.append((path, checksum, size))
        return results

    @cached_property
    def exports(self):
        """
        Return the information exported by this distribution.
        :return: A dictionary of exports, mapping an export category to a dict
                 of :class:`ExportEntry` instances describing the individual
                 export entries, and keyed by name.
        """
        result = {}
        r = self.get_distinfo_resource(EXPORTS_FILENAME)
        if r:
            result = self.read_exports()
        return result

    def read_exports(self):
        """
        Read exports data from a file in .ini format.

        :return: A dictionary of exports, mapping an export category to a list
                 of :class:`ExportEntry` instances describing the individual
                 export entries.
        """
        result = {}
        r = self.get_distinfo_resource(EXPORTS_FILENAME)
        if r:
            with contextlib.closing(r.as_stream()) as stream:
                result = read_exports(stream)
        return result

    def write_exports(self, exports):
        """
        Write a dictionary of exports to a file in .ini format.
        :param exports: A dictionary of exports, mapping an export category to
                        a list of :class:`ExportEntry` instances describing the
                        individual export entries.
        """
        rf = self.get_distinfo_file(EXPORTS_FILENAME)
        with open(rf, 'w') as f:
            write_exports(exports, f)

    def get_resource_path(self, relative_path):
        """
        NOTE: This API may change in the future.

        Return the absolute path to a resource file with the given relative
        path.

        :param relative_path: The path, relative to .dist-info, of the resource
                              of interest.
        :return: The absolute path where the resource is to be found.
        """
        r = self.get_distinfo_resource('RESOURCES')
        with contextlib.closing(r.as_stream()) as stream:
            with CSVReader(stream=stream) as resources_reader:
                for relative, destination in resources_reader:
                    if relative == relative_path:
                        return destination
        raise KeyError('no resource file with relative path %r '
                       'is installed' % relative_path)

    def list_installed_files(self):
        """
        Iterates over the ``RECORD`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: iterator of (path, hash, size)
        """
        for result in self._get_records():
            yield result

    def write_installed_files(self, paths, prefix, dry_run=False):
        """
        Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
        existing ``RECORD`` file is silently overwritten.

        prefix is used to determine when to write absolute paths.
        """
        prefix = os.path.join(prefix, '')
        base = os.path.dirname(self.path)
        base_under_prefix = base.startswith(prefix)
        base = os.path.join(base, '')
        record_path = self.get_distinfo_file('RECORD')
        logger.info('creating %s', record_path)
        if dry_run:
            return None
        with CSVWriter(record_path) as writer:
            for path in paths:
                if os.path.isdir(path) or path.endswith(('.pyc', '.pyo')):
                    # do not put size and hash, as in PEP-376
                    hash_value = size = ''
                else:
                    size = '%d' % os.path.getsize(path)
                    with open(path, 'rb') as fp:
                        hash_value = self.get_hash(fp.read())
                if path.startswith(base) or (base_under_prefix and
                                             path.startswith(prefix)):
                    path = os.path.relpath(path, base)
                writer.writerow((path, hash_value, size))

            # add the RECORD file itself
            if record_path.startswith(base):
                record_path = os.path.relpath(record_path, base)
            writer.writerow((record_path, '', ''))
        return record_path

    def check_installed_files(self):
        """
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        """
        mismatches = []
        base = os.path.dirname(self.path)
        record_path = self.get_distinfo_file('RECORD')
        for path, hash_value, size in self.list_installed_files():
            if not os.path.isabs(path):
                path = os.path.join(base, path)
            if path == record_path:
                continue
            if not os.path.exists(path):
                mismatches.append((path, 'exists', True, False))
            elif os.path.isfile(path):
                actual_size = str(os.path.getsize(path))
                if size and actual_size != size:
                    mismatches.append((path, 'size', size, actual_size))
                elif hash_value:
                    if '=' in hash_value:
                        hasher = hash_value.split('=', 1)[0]
                    else:
                        hasher = None

                    with open(path, 'rb') as f:
                        actual_hash = self.get_hash(f.read(), hasher)
                        if actual_hash != hash_value:
                            mismatches.append((path, 'hash', hash_value, actual_hash))
        return mismatches

    @cached_property
    def shared_locations(self):
        """
        A dictionary of shared locations whose keys are in the set 'prefix',
        'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
        The corresponding value is the absolute path of that category for
        this distribution, and takes into account any paths selected by the
        user at installation time (e.g. via command-line arguments). In the
        case of the 'namespace' key, this would be a list of absolute paths
        for the roots of namespace packages in this distribution.

        The first time this property is accessed, the relevant information is
        read from the SHARED file in the .dist-info directory.
        """
        result = {}
        shared_path = os.path.join(self.path, 'SHARED')
        if os.path.isfile(shared_path):
            with codecs.open(shared_path, 'r', encoding='utf-8') as f:
                lines = f.read().splitlines()
            for line in lines:
                key, value = line.split('=', 1)
                if key == 'namespace':
                    result.setdefault(key, []).append(value)
                else:
                    result[key] = value
        return result

    def write_shared_locations(self, paths, dry_run=False):
        """
        Write shared location information to the SHARED file in .dist-info.
        :param paths: A dictionary as described in the documentation for
        :meth:`shared_locations`.
        :param dry_run: If True, the action is logged but no file is actually
                        written.
        :return: The path of the file written to.
        """
        shared_path = os.path.join(self.path, 'SHARED')
        logger.info('creating %s', shared_path)
        if dry_run:
            return None
        lines = []
        for key in ('prefix', 'lib', 'headers', 'scripts', 'data'):
            path = paths[key]
            if os.path.isdir(paths[key]):
                lines.append('%s=%s' % (key,  path))
        for ns in paths.get('namespace', ()):
            lines.append('namespace=%s' % ns)

        with codecs.open(shared_path, 'w', encoding='utf-8') as f:
            f.write('\n'.join(lines))
        return shared_path

    def get_distinfo_resource(self, path):
        if path not in DIST_FILES:
            raise DistlibException('invalid path for a dist-info file: '
                                   '%r at %r' % (path, self.path))
        finder = resources.finder_for_path(self.path)
        if finder is None:
            raise DistlibException('Unable to get a finder for %s' % self.path)
        return finder.find(path)

    def get_distinfo_file(self, path):
        """
        Returns a path located under the ``.dist-info`` directory. Returns a
        string representing the path.

        :parameter path: a ``'/'``-separated path relative to the
                         ``.dist-info`` directory or an absolute path;
                         If *path* is an absolute path and doesn't start
                         with the ``.dist-info`` directory path,
                         a :class:`DistlibException` is raised
        :type path: str
        :rtype: str
        """
        # Check if it is an absolute path  # XXX use relpath, add tests
        if path.find(os.sep) >= 0:
            # it's an absolute path?
            distinfo_dirname, path = path.split(os.sep)[-2:]
            if distinfo_dirname != self.path.split(os.sep)[-1]:
                raise DistlibException(
                    'dist-info file %r does not belong to the %r %s '
                    'distribution' % (path, self.name, self.version))

        # The file must be relative
        if path not in DIST_FILES:
            raise DistlibException('invalid path for a dist-info file: '
                                   '%r at %r' % (path, self.path))

        return os.path.join(self.path, path)

    def list_distinfo_files(self):
        """
        Iterates over the ``RECORD`` entries and returns paths for each line if
        the path is pointing to a file located in the ``.dist-info`` directory
        or one of its subdirectories.

        :returns: iterator of paths
        """
        base = os.path.dirname(self.path)
        for path, checksum, size in self._get_records():
            # XXX add separator or use real relpath algo
            if not os.path.isabs(path):
                path = os.path.join(base, path)
            if path.startswith(self.path):
                yield path

    def __eq__(self, other):
        return (isinstance(other, InstalledDistribution) and
                self.path == other.path)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    __hash__ = object.__hash__


class EggInfoDistribution(BaseInstalledDistribution):
    """Created with the *path* of the ``.egg-info`` directory or file provided
    to the constructor. It reads the metadata contained in the file itself, or
    if the given path happens to be a directory, the metadata is read from the
    file ``PKG-INFO`` under that directory."""

    requested = True    # as we have no way of knowing, assume it was
    shared_locations = {}

    def __init__(self, path, env=None):
        def set_name_and_version(s, n, v):
            s.name = n
            s.key = n.lower()   # for case-insensitive comparisons
            s.version = v

        self.path = path
        self.dist_path = env
        if env and env._cache_enabled and path in env._cache_egg.path:
            metadata = env._cache_egg.path[path].metadata
            set_name_and_version(self, metadata.name, metadata.version)
        else:
            metadata = self._get_metadata(path)

            # Need to be set before caching
            set_name_and_version(self, metadata.name, metadata.version)

            if env and env._cache_enabled:
                env._cache_egg.add(self)
        super(EggInfoDistribution, self).__init__(metadata, path, env)

    def _get_metadata(self, path):
        requires = None

        def parse_requires_data(data):
            """Create a list of dependencies from a requires.txt file.

            *data*: the contents of a setuptools-produced requires.txt file.
            """
            reqs = []
            lines = data.splitlines()
            for line in lines:
                line = line.strip()
                if line.startswith('['):
                    logger.warning('Unexpected line: quitting requirement scan: %r',
                                   line)
                    break
                r = parse_requirement(line)
                if not r:
                    logger.warning('Not recognised as a requirement: %r', line)
                    continue
                if r.extras:
                    logger.warning('extra requirements in requires.txt are '
                                   'not supported')
                if not r.constraints:
                    reqs.append(r.name)
                else:
                    cons = ', '.join('%s%s' % c for c in r.constraints)
                    reqs.append('%s (%s)' % (r.name, cons))
            return reqs

        def parse_requires_path(req_path):
            """Create a list of dependencies from a requires.txt file.

            *req_path*: the path to a setuptools-produced requires.txt file.
            """

            reqs = []
            try:
                with codecs.open(req_path, 'r', 'utf-8') as fp:
                    reqs = parse_requires_data(fp.read())
            except IOError:
                pass
            return reqs

        if path.endswith('.egg'):
            if os.path.isdir(path):
                meta_path = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
                metadata = Metadata(path=meta_path, scheme='legacy')
                req_path = os.path.join(path, 'EGG-INFO', 'requires.txt')
                requires = parse_requires_path(req_path)
            else:
                # FIXME handle the case where zipfile is not available
                zipf = zipimport.zipimporter(path)
                fileobj = StringIO(
                    zipf.get_data('EGG-INFO/PKG-INFO').decode('utf8'))
                metadata = Metadata(fileobj=fileobj, scheme='legacy')
                try:
                    data = zipf.get_data('EGG-INFO/requires.txt')
                    requires = parse_requires_data(data.decode('utf-8'))
                except IOError:
                    requires = None
        elif path.endswith('.egg-info'):
            if os.path.isdir(path):
                path = os.path.join(path, 'PKG-INFO')
                req_path = os.path.join(path, 'requires.txt')
                requires = parse_requires_path(req_path)
            metadata = Metadata(path=path, scheme='legacy')
        else:
            raise DistlibException('path must end with .egg-info or .egg, '
                                   'got %r' % path)

        if requires:
            metadata.add_requirements(requires)
        return metadata

    def __repr__(self):
        return '<EggInfoDistribution %r %s at %r>' % (
            self.name, self.version, self.path)

    def __str__(self):
        return "%s %s" % (self.name, self.version)

    def check_installed_files(self):
        """
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        """
        mismatches = []
        record_path = os.path.join(self.path, 'installed-files.txt')
        if os.path.exists(record_path):
            for path, _, _ in self.list_installed_files():
                if path == record_path:
                    continue
                if not os.path.exists(path):
                    mismatches.append((path, 'exists', True, False))
        return mismatches

    def list_installed_files(self):
        """
        Iterates over the ``installed-files.txt`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: a list of (path, hash, size)
        """

        def _md5(path):
            f = open(path, 'rb')
            try:
                content = f.read()
            finally:
                f.close()
            return hashlib.md5(content).hexdigest()

        def _size(path):
            return os.stat(path).st_size

        record_path = os.path.join(self.path, 'installed-files.txt')
        result = []
        if os.path.exists(record_path):
            with codecs.open(record_path, 'r', encoding='utf-8') as f:
                for line in f:
                    line = line.strip()
                    p = os.path.normpath(os.path.join(self.path, line))
                    # "./" is present as a marker between installed files
                    # and installation metadata files
                    if not os.path.exists(p):
                        logger.warning('Non-existent file: %s', p)
                        if p.endswith(('.pyc', '.pyo')):
                            continue
                        #otherwise fall through and fail
                    if not os.path.isdir(p):
                        result.append((p, _md5(p), _size(p)))
            result.append((record_path, None, None))
        return result

    def list_distinfo_files(self, absolute=False):
        """
        Iterates over the ``installed-files.txt`` entries and returns paths for
        each line if the path is pointing to a file located in the
        ``.egg-info`` directory or one of its subdirectories.

        :parameter absolute: If *absolute* is ``True``, each returned path is
                          transformed into a local absolute path. Otherwise the
                          raw value from ``installed-files.txt`` is returned.
        :type absolute: boolean
        :returns: iterator of paths
        """
        record_path = os.path.join(self.path, 'installed-files.txt')
        skip = True
        with codecs.open(record_path, 'r', encoding='utf-8') as f:
            for line in f:
                line = line.strip()
                if line == './':
                    skip = False
                    continue
                if not skip:
                    p = os.path.normpath(os.path.join(self.path, line))
                    if p.startswith(self.path):
                        if absolute:
                            yield p
                        else:
                            yield line

    def __eq__(self, other):
        return (isinstance(other, EggInfoDistribution) and
                self.path == other.path)

    # See http://docs.python.org/reference/datamodel#object.__hash__
    __hash__ = object.__hash__

new_dist_class = InstalledDistribution
old_dist_class = EggInfoDistribution


class DependencyGraph(object):
    """
    Represents a dependency graph between distributions.

    The dependency relationships are stored in an ``adjacency_list`` that maps
    distributions to a list of ``(other, label)`` tuples where  ``other``
    is a distribution and the edge is labeled with ``label`` (i.e. the version
    specifier, if such was provided). Also, for more efficient traversal, for
    every distribution ``x``, a list of predecessors is kept in
    ``reverse_list[x]``. An edge from distribution ``a`` to
    distribution ``b`` means that ``a`` depends on ``b``. If any missing
    dependencies are found, they are stored in ``missing``, which is a
    dictionary that maps distributions to a list of requirements that were not
    provided by any other distributions.
    """

    def __init__(self):
        self.adjacency_list = {}
        self.reverse_list = {}
        self.missing = {}

    def add_distribution(self, distribution):
        """Add the *distribution* to the graph.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        """
        self.adjacency_list[distribution] = []
        self.reverse_list[distribution] = []
        #self.missing[distribution] = []

    def add_edge(self, x, y, label=None):
        """Add an edge from distribution *x* to distribution *y* with the given
        *label*.

        :type x: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type y: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type label: ``str`` or ``None``
        """
        self.adjacency_list[x].append((y, label))
        # multiple edges are allowed, so be careful
        if x not in self.reverse_list[y]:
            self.reverse_list[y].append(x)

    def add_missing(self, distribution, requirement):
        """
        Add a missing *requirement* for the given *distribution*.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        :type requirement: ``str``
        """
        logger.debug('%s missing %r', distribution, requirement)
        self.missing.setdefault(distribution, []).append(requirement)

    def _repr_dist(self, dist):
        return '%s %s' % (dist.name, dist.version)

    def repr_node(self, dist, level=1):
        """Prints only a subgraph"""
        output = [self._repr_dist(dist)]
        for other, label in self.adjacency_list[dist]:
            dist = self._repr_dist(other)
            if label is not None:
                dist = '%s [%s]' % (dist, label)
            output.append('    ' * level + str(dist))
            suboutput = self.repr_node(other, level + 1)
            subs = suboutput.split('\n')
            output.extend(subs[1:])
        return '\n'.join(output)

    def to_dot(self, f, skip_disconnected=True):
        """Writes a DOT output for the graph to the provided file *f*.

        If *skip_disconnected* is set to ``True``, then all distributions
        that are not dependent on any other distribution are skipped.

        :type f: has to support ``file``-like operations
        :type skip_disconnected: ``bool``
        """
        disconnected = []

        f.write("digraph dependencies {\n")
        for dist, adjs in self.adjacency_list.items():
            if len(adjs) == 0 and not skip_disconnected:
                disconnected.append(dist)
            for other, label in adjs:
                if not label is None:
                    f.write('"%s" -> "%s" [label="%s"]\n' %
                            (dist.name, other.name, label))
                else:
                    f.write('"%s" -> "%s"\n' % (dist.name, other.name))
        if not skip_disconnected and len(disconnected) > 0:
            f.write('subgraph disconnected {\n')
            f.write('label = "Disconnected"\n')
            f.write('bgcolor = red\n')

            for dist in disconnected:
                f.write('"%s"' % dist.name)
                f.write('\n')
            f.write('}\n')
        f.write('}\n')

    def topological_sort(self):
        """
        Perform a topological sort of the graph.
        :return: A tuple, the first element of which is a topologically sorted
                 list of distributions, and the second element of which is a
                 list of distributions that cannot be sorted because they have
                 circular dependencies and so form a cycle.
        """
        result = []
        # Make a shallow copy of the adjacency list
        alist = {}
        for k, v in self.adjacency_list.items():
            alist[k] = v[:]
        while True:
            # See what we can remove in this run
            to_remove = []
            for k, v in list(alist.items())[:]:
                if not v:
                    to_remove.append(k)
                    del alist[k]
            if not to_remove:
                # What's left in alist (if anything) is a cycle.
                break
            # Remove from the adjacency list of others
            for k, v in alist.items():
                alist[k] = [(d, r) for d, r in v if d not in to_remove]
            logger.debug('Moving to result: %s',
                         ['%s (%s)' % (d.name, d.version) for d in to_remove])
            result.extend(to_remove)
        return result, list(alist.keys())

    def __repr__(self):
        """Representation of the graph"""
        output = []
        for dist, adjs in self.adjacency_list.items():
            output.append(self.repr_node(dist))
        return '\n'.join(output)


def make_graph(dists, scheme='default'):
    """Makes a dependency graph from the given distributions.

    :parameter dists: a list of distributions
    :type dists: list of :class:`distutils2.database.InstalledDistribution` and
                 :class:`distutils2.database.EggInfoDistribution` instances
    :rtype: a :class:`DependencyGraph` instance
    """
    scheme = get_scheme(scheme)
    graph = DependencyGraph()
    provided = {}  # maps names to lists of (version, dist) tuples

    # first, build the graph and find out what's provided
    for dist in dists:
        graph.add_distribution(dist)

        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Add to provided: %s, %s, %s', name, version, dist)
            provided.setdefault(name, []).append((version, dist))

    # now make the edges
    for dist in dists:
        requires = (dist.run_requires | dist.meta_requires |
                    dist.build_requires | dist.dev_requires)
        for req in requires:
            try:
                matcher = scheme.matcher(req)
            except UnsupportedVersionError:
                # XXX compat-mode if cannot read the version
                logger.warning('could not read version %r - using name only',
                               req)
                name = req.split()[0]
                matcher = scheme.matcher(name)

            name = matcher.key   # case-insensitive

            matched = False
            if name in provided:
                for version, provider in provided[name]:
                    try:
                        match = matcher.match(version)
                    except UnsupportedVersionError:
                        match = False

                    if match:
                        graph.add_edge(dist, provider, req)
                        matched = True
                        break
            if not matched:
                graph.add_missing(dist, req)
    return graph


def get_dependent_dists(dists, dist):
    """Recursively generate a list of distributions from *dists* that are
    dependent on *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    """
    if dist not in dists:
        raise DistlibException('given distribution %r is not a member '
                               'of the list' % dist.name)
    graph = make_graph(dists)

    dep = [dist]  # dependent distributions
    todo = graph.reverse_list[dist]  # list of nodes we should inspect

    while todo:
        d = todo.pop()
        dep.append(d)
        for succ in graph.reverse_list[d]:
            if succ not in dep:
                todo.append(succ)

    dep.pop(0)  # remove dist from dep, was there to prevent infinite loops
    return dep


def get_required_dists(dists, dist):
    """Recursively generate a list of distributions from *dists* that are
    required by *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    """
    if dist not in dists:
        raise DistlibException('given distribution %r is not a member '
                               'of the list' % dist.name)
    graph = make_graph(dists)

    req = []  # required distributions
    todo = graph.adjacency_list[dist]  # list of nodes we should inspect

    while todo:
        d = todo.pop()[0]
        req.append(d)
        for pred in graph.adjacency_list[d]:
            if pred not in req:
                todo.append(pred)

    return req


def make_dist(name, version, **kwargs):
    """
    A convenience method for making a dist given just a name and version.
    """
    summary = kwargs.pop('summary', 'Placeholder for summary')
    md = Metadata(**kwargs)
    md.name = name
    md.version = version
    md.summary = summary or 'Plaeholder for summary'
    return Distribution(md)
python3.4/site-packages/pip/_vendor/distlib/metadata.py000064400000107717151735047320017066 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Implementation of the Metadata for Python packages PEPs.

Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
"""
from __future__ import unicode_literals

import codecs
from email import message_from_file
import json
import logging
import re


from . import DistlibException, __version__
from .compat import StringIO, string_types, text_type
from .markers import interpret
from .util import extract_by_key, get_extras
from .version import get_scheme, PEP426_VERSION_RE

logger = logging.getLogger(__name__)


class MetadataMissingError(DistlibException):
    """A required metadata is missing"""


class MetadataConflictError(DistlibException):
    """Attempt to read or write metadata fields that are conflictual."""


class MetadataUnrecognizedVersionError(DistlibException):
    """Unknown metadata version number."""


class MetadataInvalidError(DistlibException):
    """A metadata value is invalid"""

# public API of this module
__all__ = ['Metadata', 'PKG_INFO_ENCODING', 'PKG_INFO_PREFERRED_VERSION']

# Encoding used for the PKG-INFO files
PKG_INFO_ENCODING = 'utf-8'

# preferred version. Hopefully will be changed
# to 1.2 once PEP 345 is supported everywhere
PKG_INFO_PREFERRED_VERSION = '1.1'

_LINE_PREFIX = re.compile('\n       \|')
_241_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'License')

_314_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'License', 'Classifier', 'Download-URL', 'Obsoletes',
               'Provides', 'Requires')

_314_MARKERS = ('Obsoletes', 'Provides', 'Requires', 'Classifier',
                'Download-URL')

_345_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'Maintainer', 'Maintainer-email', 'License',
               'Classifier', 'Download-URL', 'Obsoletes-Dist',
               'Project-URL', 'Provides-Dist', 'Requires-Dist',
               'Requires-Python', 'Requires-External')

_345_MARKERS = ('Provides-Dist', 'Requires-Dist', 'Requires-Python',
                'Obsoletes-Dist', 'Requires-External', 'Maintainer',
                'Maintainer-email', 'Project-URL')

_426_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform',
               'Supported-Platform', 'Summary', 'Description',
               'Keywords', 'Home-page', 'Author', 'Author-email',
               'Maintainer', 'Maintainer-email', 'License',
               'Classifier', 'Download-URL', 'Obsoletes-Dist',
               'Project-URL', 'Provides-Dist', 'Requires-Dist',
               'Requires-Python', 'Requires-External', 'Private-Version',
               'Obsoleted-By', 'Setup-Requires-Dist', 'Extension',
               'Provides-Extra')

_426_MARKERS = ('Private-Version', 'Provides-Extra', 'Obsoleted-By',
                'Setup-Requires-Dist', 'Extension')

_ALL_FIELDS = set()
_ALL_FIELDS.update(_241_FIELDS)
_ALL_FIELDS.update(_314_FIELDS)
_ALL_FIELDS.update(_345_FIELDS)
_ALL_FIELDS.update(_426_FIELDS)

EXTRA_RE = re.compile(r'''extra\s*==\s*("([^"]+)"|'([^']+)')''')


def _version2fieldlist(version):
    if version == '1.0':
        return _241_FIELDS
    elif version == '1.1':
        return _314_FIELDS
    elif version == '1.2':
        return _345_FIELDS
    elif version == '2.0':
        return _426_FIELDS
    raise MetadataUnrecognizedVersionError(version)


def _best_version(fields):
    """Detect the best version depending on the fields used."""
    def _has_marker(keys, markers):
        for marker in markers:
            if marker in keys:
                return True
        return False

    keys = []
    for key, value in fields.items():
        if value in ([], 'UNKNOWN', None):
            continue
        keys.append(key)

    possible_versions = ['1.0', '1.1', '1.2', '2.0']

    # first let's try to see if a field is not part of one of the version
    for key in keys:
        if key not in _241_FIELDS and '1.0' in possible_versions:
            possible_versions.remove('1.0')
        if key not in _314_FIELDS and '1.1' in possible_versions:
            possible_versions.remove('1.1')
        if key not in _345_FIELDS and '1.2' in possible_versions:
            possible_versions.remove('1.2')
        if key not in _426_FIELDS and '2.0' in possible_versions:
            possible_versions.remove('2.0')

    # possible_version contains qualified versions
    if len(possible_versions) == 1:
        return possible_versions[0]   # found !
    elif len(possible_versions) == 0:
        raise MetadataConflictError('Unknown metadata set')

    # let's see if one unique marker is found
    is_1_1 = '1.1' in possible_versions and _has_marker(keys, _314_MARKERS)
    is_1_2 = '1.2' in possible_versions and _has_marker(keys, _345_MARKERS)
    is_2_0 = '2.0' in possible_versions and _has_marker(keys, _426_MARKERS)
    if int(is_1_1) + int(is_1_2) + int(is_2_0) > 1:
        raise MetadataConflictError('You used incompatible 1.1/1.2/2.0 fields')

    # we have the choice, 1.0, or 1.2, or 2.0
    #   - 1.0 has a broken Summary field but works with all tools
    #   - 1.1 is to avoid
    #   - 1.2 fixes Summary but has little adoption
    #   - 2.0 adds more features and is very new
    if not is_1_1 and not is_1_2 and not is_2_0:
        # we couldn't find any specific marker
        if PKG_INFO_PREFERRED_VERSION in possible_versions:
            return PKG_INFO_PREFERRED_VERSION
    if is_1_1:
        return '1.1'
    if is_1_2:
        return '1.2'

    return '2.0'

_ATTR2FIELD = {
    'metadata_version': 'Metadata-Version',
    'name': 'Name',
    'version': 'Version',
    'platform': 'Platform',
    'supported_platform': 'Supported-Platform',
    'summary': 'Summary',
    'description': 'Description',
    'keywords': 'Keywords',
    'home_page': 'Home-page',
    'author': 'Author',
    'author_email': 'Author-email',
    'maintainer': 'Maintainer',
    'maintainer_email': 'Maintainer-email',
    'license': 'License',
    'classifier': 'Classifier',
    'download_url': 'Download-URL',
    'obsoletes_dist': 'Obsoletes-Dist',
    'provides_dist': 'Provides-Dist',
    'requires_dist': 'Requires-Dist',
    'setup_requires_dist': 'Setup-Requires-Dist',
    'requires_python': 'Requires-Python',
    'requires_external': 'Requires-External',
    'requires': 'Requires',
    'provides': 'Provides',
    'obsoletes': 'Obsoletes',
    'project_url': 'Project-URL',
    'private_version': 'Private-Version',
    'obsoleted_by': 'Obsoleted-By',
    'extension': 'Extension',
    'provides_extra': 'Provides-Extra',
}

_PREDICATE_FIELDS = ('Requires-Dist', 'Obsoletes-Dist', 'Provides-Dist')
_VERSIONS_FIELDS = ('Requires-Python',)
_VERSION_FIELDS = ('Version',)
_LISTFIELDS = ('Platform', 'Classifier', 'Obsoletes',
               'Requires', 'Provides', 'Obsoletes-Dist',
               'Provides-Dist', 'Requires-Dist', 'Requires-External',
               'Project-URL', 'Supported-Platform', 'Setup-Requires-Dist',
               'Provides-Extra', 'Extension')
_LISTTUPLEFIELDS = ('Project-URL',)

_ELEMENTSFIELD = ('Keywords',)

_UNICODEFIELDS = ('Author', 'Maintainer', 'Summary', 'Description')

_MISSING = object()

_FILESAFE = re.compile('[^A-Za-z0-9.]+')


def _get_name_and_version(name, version, for_filename=False):
    """Return the distribution name with version.

    If for_filename is true, return a filename-escaped form."""
    if for_filename:
        # For both name and version any runs of non-alphanumeric or '.'
        # characters are replaced with a single '-'.  Additionally any
        # spaces in the version string become '.'
        name = _FILESAFE.sub('-', name)
        version = _FILESAFE.sub('-', version.replace(' ', '.'))
    return '%s-%s' % (name, version)


class LegacyMetadata(object):
    """The legacy metadata of a release.

    Supports versions 1.0, 1.1 and 1.2 (auto-detected). You can
    instantiate the class with one of these arguments (or none):
    - *path*, the path to a metadata file
    - *fileobj* give a file-like object with metadata as content
    - *mapping* is a dict-like object
    - *scheme* is a version scheme name
    """
    # TODO document the mapping API and UNKNOWN default key

    def __init__(self, path=None, fileobj=None, mapping=None,
                 scheme='default'):
        if [path, fileobj, mapping].count(None) < 2:
            raise TypeError('path, fileobj and mapping are exclusive')
        self._fields = {}
        self.requires_files = []
        self._dependencies = None
        self.scheme = scheme
        if path is not None:
            self.read(path)
        elif fileobj is not None:
            self.read_file(fileobj)
        elif mapping is not None:
            self.update(mapping)
            self.set_metadata_version()

    def set_metadata_version(self):
        self._fields['Metadata-Version'] = _best_version(self._fields)

    def _write_field(self, fileobj, name, value):
        fileobj.write('%s: %s\n' % (name, value))

    def __getitem__(self, name):
        return self.get(name)

    def __setitem__(self, name, value):
        return self.set(name, value)

    def __delitem__(self, name):
        field_name = self._convert_name(name)
        try:
            del self._fields[field_name]
        except KeyError:
            raise KeyError(name)

    def __contains__(self, name):
        return (name in self._fields or
                self._convert_name(name) in self._fields)

    def _convert_name(self, name):
        if name in _ALL_FIELDS:
            return name
        name = name.replace('-', '_').lower()
        return _ATTR2FIELD.get(name, name)

    def _default_value(self, name):
        if name in _LISTFIELDS or name in _ELEMENTSFIELD:
            return []
        return 'UNKNOWN'

    def _remove_line_prefix(self, value):
        return _LINE_PREFIX.sub('\n', value)

    def __getattr__(self, name):
        if name in _ATTR2FIELD:
            return self[name]
        raise AttributeError(name)

    #
    # Public API
    #

#    dependencies = property(_get_dependencies, _set_dependencies)

    def get_fullname(self, filesafe=False):
        """Return the distribution name with version.

        If filesafe is true, return a filename-escaped form."""
        return _get_name_and_version(self['Name'], self['Version'], filesafe)

    def is_field(self, name):
        """return True if name is a valid metadata key"""
        name = self._convert_name(name)
        return name in _ALL_FIELDS

    def is_multi_field(self, name):
        name = self._convert_name(name)
        return name in _LISTFIELDS

    def read(self, filepath):
        """Read the metadata values from a file path."""
        fp = codecs.open(filepath, 'r', encoding='utf-8')
        try:
            self.read_file(fp)
        finally:
            fp.close()

    def read_file(self, fileob):
        """Read the metadata values from a file object."""
        msg = message_from_file(fileob)
        self._fields['Metadata-Version'] = msg['metadata-version']

        # When reading, get all the fields we can
        for field in _ALL_FIELDS:
            if field not in msg:
                continue
            if field in _LISTFIELDS:
                # we can have multiple lines
                values = msg.get_all(field)
                if field in _LISTTUPLEFIELDS and values is not None:
                    values = [tuple(value.split(',')) for value in values]
                self.set(field, values)
            else:
                # single line
                value = msg[field]
                if value is not None and value != 'UNKNOWN':
                    self.set(field, value)
        self.set_metadata_version()

    def write(self, filepath, skip_unknown=False):
        """Write the metadata fields to filepath."""
        fp = codecs.open(filepath, 'w', encoding='utf-8')
        try:
            self.write_file(fp, skip_unknown)
        finally:
            fp.close()

    def write_file(self, fileobject, skip_unknown=False):
        """Write the PKG-INFO format data to a file object."""
        self.set_metadata_version()

        for field in _version2fieldlist(self['Metadata-Version']):
            values = self.get(field)
            if skip_unknown and values in ('UNKNOWN', [], ['UNKNOWN']):
                continue
            if field in _ELEMENTSFIELD:
                self._write_field(fileobject, field, ','.join(values))
                continue
            if field not in _LISTFIELDS:
                if field == 'Description':
                    values = values.replace('\n', '\n       |')
                values = [values]

            if field in _LISTTUPLEFIELDS:
                values = [','.join(value) for value in values]

            for value in values:
                self._write_field(fileobject, field, value)

    def update(self, other=None, **kwargs):
        """Set metadata values from the given iterable `other` and kwargs.

        Behavior is like `dict.update`: If `other` has a ``keys`` method,
        they are looped over and ``self[key]`` is assigned ``other[key]``.
        Else, ``other`` is an iterable of ``(key, value)`` iterables.

        Keys that don't match a metadata field or that have an empty value are
        dropped.
        """
        def _set(key, value):
            if key in _ATTR2FIELD and value:
                self.set(self._convert_name(key), value)

        if not other:
            # other is None or empty container
            pass
        elif hasattr(other, 'keys'):
            for k in other.keys():
                _set(k, other[k])
        else:
            for k, v in other:
                _set(k, v)

        if kwargs:
            for k, v in kwargs.items():
                _set(k, v)

    def set(self, name, value):
        """Control then set a metadata field."""
        name = self._convert_name(name)

        if ((name in _ELEMENTSFIELD or name == 'Platform') and
            not isinstance(value, (list, tuple))):
            if isinstance(value, string_types):
                value = [v.strip() for v in value.split(',')]
            else:
                value = []
        elif (name in _LISTFIELDS and
              not isinstance(value, (list, tuple))):
            if isinstance(value, string_types):
                value = [value]
            else:
                value = []

        if logger.isEnabledFor(logging.WARNING):
            project_name = self['Name']

            scheme = get_scheme(self.scheme)
            if name in _PREDICATE_FIELDS and value is not None:
                for v in value:
                    # check that the values are valid
                    if not scheme.is_valid_matcher(v.split(';')[0]):
                        logger.warning(
                            '%r: %r is not valid (field %r)',
                            project_name, v, name)
            # FIXME this rejects UNKNOWN, is that right?
            elif name in _VERSIONS_FIELDS and value is not None:
                if not scheme.is_valid_constraint_list(value):
                    logger.warning('%r: %r is not a valid version (field %r)',
                                   project_name, value, name)
            elif name in _VERSION_FIELDS and value is not None:
                if not scheme.is_valid_version(value):
                    logger.warning('%r: %r is not a valid version (field %r)',
                                   project_name, value, name)

        if name in _UNICODEFIELDS:
            if name == 'Description':
                value = self._remove_line_prefix(value)

        self._fields[name] = value

    def get(self, name, default=_MISSING):
        """Get a metadata field."""
        name = self._convert_name(name)
        if name not in self._fields:
            if default is _MISSING:
                default = self._default_value(name)
            return default
        if name in _UNICODEFIELDS:
            value = self._fields[name]
            return value
        elif name in _LISTFIELDS:
            value = self._fields[name]
            if value is None:
                return []
            res = []
            for val in value:
                if name not in _LISTTUPLEFIELDS:
                    res.append(val)
                else:
                    # That's for Project-URL
                    res.append((val[0], val[1]))
            return res

        elif name in _ELEMENTSFIELD:
            value = self._fields[name]
            if isinstance(value, string_types):
                return value.split(',')
        return self._fields[name]

    def check(self, strict=False):
        """Check if the metadata is compliant. If strict is True then raise if
        no Name or Version are provided"""
        self.set_metadata_version()

        # XXX should check the versions (if the file was loaded)
        missing, warnings = [], []

        for attr in ('Name', 'Version'):  # required by PEP 345
            if attr not in self:
                missing.append(attr)

        if strict and missing != []:
            msg = 'missing required metadata: %s' % ', '.join(missing)
            raise MetadataMissingError(msg)

        for attr in ('Home-page', 'Author'):
            if attr not in self:
                missing.append(attr)

        # checking metadata 1.2 (XXX needs to check 1.1, 1.0)
        if self['Metadata-Version'] != '1.2':
            return missing, warnings

        scheme = get_scheme(self.scheme)

        def are_valid_constraints(value):
            for v in value:
                if not scheme.is_valid_matcher(v.split(';')[0]):
                    return False
            return True

        for fields, controller in ((_PREDICATE_FIELDS, are_valid_constraints),
                                   (_VERSIONS_FIELDS,
                                    scheme.is_valid_constraint_list),
                                   (_VERSION_FIELDS,
                                    scheme.is_valid_version)):
            for field in fields:
                value = self.get(field, None)
                if value is not None and not controller(value):
                    warnings.append('Wrong value for %r: %s' % (field, value))

        return missing, warnings

    def todict(self, skip_missing=False):
        """Return fields as a dict.

        Field names will be converted to use the underscore-lowercase style
        instead of hyphen-mixed case (i.e. home_page instead of Home-page).
        """
        self.set_metadata_version()

        mapping_1_0 = (
            ('metadata_version', 'Metadata-Version'),
            ('name', 'Name'),
            ('version', 'Version'),
            ('summary', 'Summary'),
            ('home_page', 'Home-page'),
            ('author', 'Author'),
            ('author_email', 'Author-email'),
            ('license', 'License'),
            ('description', 'Description'),
            ('keywords', 'Keywords'),
            ('platform', 'Platform'),
            ('classifier', 'Classifier'),
            ('download_url', 'Download-URL'),
        )

        data = {}
        for key, field_name in mapping_1_0:
            if not skip_missing or field_name in self._fields:
                data[key] = self[field_name]

        if self['Metadata-Version'] == '1.2':
            mapping_1_2 = (
                ('requires_dist', 'Requires-Dist'),
                ('requires_python', 'Requires-Python'),
                ('requires_external', 'Requires-External'),
                ('provides_dist', 'Provides-Dist'),
                ('obsoletes_dist', 'Obsoletes-Dist'),
                ('project_url', 'Project-URL'),
                ('maintainer', 'Maintainer'),
                ('maintainer_email', 'Maintainer-email'),
            )
            for key, field_name in mapping_1_2:
                if not skip_missing or field_name in self._fields:
                    if key != 'project_url':
                        data[key] = self[field_name]
                    else:
                        data[key] = [','.join(u) for u in self[field_name]]

        elif self['Metadata-Version'] == '1.1':
            mapping_1_1 = (
                ('provides', 'Provides'),
                ('requires', 'Requires'),
                ('obsoletes', 'Obsoletes'),
            )
            for key, field_name in mapping_1_1:
                if not skip_missing or field_name in self._fields:
                    data[key] = self[field_name]

        return data

    def add_requirements(self, requirements):
        if self['Metadata-Version'] == '1.1':
            # we can't have 1.1 metadata *and* Setuptools requires
            for field in ('Obsoletes', 'Requires', 'Provides'):
                if field in self:
                    del self[field]
        self['Requires-Dist'] += requirements

    # Mapping API
    # TODO could add iter* variants

    def keys(self):
        return list(_version2fieldlist(self['Metadata-Version']))

    def __iter__(self):
        for key in self.keys():
            yield key

    def values(self):
        return [self[key] for key in self.keys()]

    def items(self):
        return [(key, self[key]) for key in self.keys()]

    def __repr__(self):
        return '<%s %s %s>' % (self.__class__.__name__, self.name,
                               self.version)


METADATA_FILENAME = 'pydist.json'


class Metadata(object):
    """
    The metadata of a release. This implementation uses 2.0 (JSON)
    metadata where possible. If not possible, it wraps a LegacyMetadata
    instance which handles the key-value metadata format.
    """

    METADATA_VERSION_MATCHER = re.compile('^\d+(\.\d+)*$')

    NAME_MATCHER = re.compile('^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$', re.I)

    VERSION_MATCHER = PEP426_VERSION_RE

    SUMMARY_MATCHER = re.compile('.{1,2047}')

    METADATA_VERSION = '2.0'

    GENERATOR = 'distlib (%s)' % __version__

    MANDATORY_KEYS = {
        'name': (),
        'version': (),
        'summary': ('legacy',),
    }

    INDEX_KEYS = ('name version license summary description author '
                  'author_email keywords platform home_page classifiers '
                  'download_url')

    DEPENDENCY_KEYS = ('extras run_requires test_requires build_requires '
                       'dev_requires provides meta_requires obsoleted_by '
                       'supports_environments')

    SYNTAX_VALIDATORS = {
        'metadata_version': (METADATA_VERSION_MATCHER, ()),
        'name': (NAME_MATCHER, ('legacy',)),
        'version': (VERSION_MATCHER, ('legacy',)),
        'summary': (SUMMARY_MATCHER, ('legacy',)),
    }

    __slots__ = ('_legacy', '_data', 'scheme')

    def __init__(self, path=None, fileobj=None, mapping=None,
                 scheme='default'):
        if [path, fileobj, mapping].count(None) < 2:
            raise TypeError('path, fileobj and mapping are exclusive')
        self._legacy = None
        self._data = None
        self.scheme = scheme
        #import pdb; pdb.set_trace()
        if mapping is not None:
            try:
                self._validate_mapping(mapping, scheme)
                self._data = mapping
            except MetadataUnrecognizedVersionError:
                self._legacy = LegacyMetadata(mapping=mapping, scheme=scheme)
                self.validate()
        else:
            data = None
            if path:
                with open(path, 'rb') as f:
                    data = f.read()
            elif fileobj:
                data = fileobj.read()
            if data is None:
                # Initialised with no args - to be added
                self._data = {
                    'metadata_version': self.METADATA_VERSION,
                    'generator': self.GENERATOR,
                }
            else:
                if not isinstance(data, text_type):
                    data = data.decode('utf-8')
                try:
                    self._data = json.loads(data)
                    self._validate_mapping(self._data, scheme)
                except ValueError:
                    # Note: MetadataUnrecognizedVersionError does not
                    # inherit from ValueError (it's a DistlibException,
                    # which should not inherit from ValueError).
                    # The ValueError comes from the json.load - if that
                    # succeeds and we get a validation error, we want
                    # that to propagate
                    self._legacy = LegacyMetadata(fileobj=StringIO(data),
                                                  scheme=scheme)
                    self.validate()

    common_keys = set(('name', 'version', 'license', 'keywords', 'summary'))

    none_list = (None, list)
    none_dict = (None, dict)

    mapped_keys = {
        'run_requires': ('Requires-Dist', list),
        'build_requires': ('Setup-Requires-Dist', list),
        'dev_requires': none_list,
        'test_requires': none_list,
        'meta_requires': none_list,
        'extras': ('Provides-Extra', list),
        'modules': none_list,
        'namespaces': none_list,
        'exports': none_dict,
        'commands': none_dict,
        'classifiers': ('Classifier', list),
        'source_url': ('Download-URL', None),
        'metadata_version': ('Metadata-Version', None),
    }

    del none_list, none_dict

    def __getattribute__(self, key):
        common = object.__getattribute__(self, 'common_keys')
        mapped = object.__getattribute__(self, 'mapped_keys')
        if key in mapped:
            lk, maker = mapped[key]
            if self._legacy:
                if lk is None:
                    result = None if maker is None else maker()
                else:
                    result = self._legacy.get(lk)
            else:
                value = None if maker is None else maker()
                result = self._data.get(key, value)
        elif key not in common:
            result = object.__getattribute__(self, key)
        elif self._legacy:
            result = self._legacy.get(key)
        else:
            result = self._data.get(key)
        return result

    def _validate_value(self, key, value, scheme=None):
        if key in self.SYNTAX_VALIDATORS:
            pattern, exclusions = self.SYNTAX_VALIDATORS[key]
            if (scheme or self.scheme) not in exclusions:
                m = pattern.match(value)
                if not m:
                    raise MetadataInvalidError('%r is an invalid value for '
                                               'the %r property' % (value,
                                                                    key))

    def __setattr__(self, key, value):
        self._validate_value(key, value)
        common = object.__getattribute__(self, 'common_keys')
        mapped = object.__getattribute__(self, 'mapped_keys')
        if key in mapped:
            lk, _ = mapped[key]
            if self._legacy:
                if lk is None:
                    raise NotImplementedError
                self._legacy[lk] = value
            else:
                self._data[key] = value
        elif key not in common:
            object.__setattr__(self, key, value)
        else:
            if key == 'keywords':
                if isinstance(value, string_types):
                    value = value.strip()
                    if value:
                        value = value.split()
                    else:
                        value = []
            if self._legacy:
                self._legacy[key] = value
            else:
                self._data[key] = value

    @property
    def name_and_version(self):
        return _get_name_and_version(self.name, self.version, True)

    @property
    def provides(self):
        if self._legacy:
            result = self._legacy['Provides-Dist']
        else:
            result = self._data.setdefault('provides', [])
        s = '%s (%s)' % (self.name, self.version)
        if s not in result:
            result.append(s)
        return result

    @provides.setter
    def provides(self, value):
        if self._legacy:
            self._legacy['Provides-Dist'] = value
        else:
            self._data['provides'] = value

    def get_requirements(self, reqts, extras=None, env=None):
        """
        Base method to get dependencies, given a set of extras
        to satisfy and an optional environment context.
        :param reqts: A list of sometimes-wanted dependencies,
                      perhaps dependent on extras and environment.
        :param extras: A list of optional components being requested.
        :param env: An optional environment for marker evaluation.
        """
        if self._legacy:
            result = reqts
        else:
            result = []
            extras = get_extras(extras or [], self.extras)
            for d in reqts:
                if 'extra' not in d and 'environment' not in d:
                    # unconditional
                    include = True
                else:
                    if 'extra' not in d:
                        # Not extra-dependent - only environment-dependent
                        include = True
                    else:
                        include = d.get('extra') in extras
                    if include:
                        # Not excluded because of extras, check environment
                        marker = d.get('environment')
                        if marker:
                            include = interpret(marker, env)
                if include:
                    result.extend(d['requires'])
            for key in ('build', 'dev', 'test'):
                e = ':%s:' % key
                if e in extras:
                    extras.remove(e)
                    # A recursive call, but it should terminate since 'test'
                    # has been removed from the extras
                    reqts = self._data.get('%s_requires' % key, [])
                    result.extend(self.get_requirements(reqts, extras=extras,
                                                        env=env))
        return result

    @property
    def dictionary(self):
        if self._legacy:
            return self._from_legacy()
        return self._data

    @property
    def dependencies(self):
        if self._legacy:
            raise NotImplementedError
        else:
            return extract_by_key(self._data, self.DEPENDENCY_KEYS)

    @dependencies.setter
    def dependencies(self, value):
        if self._legacy:
            raise NotImplementedError
        else:
            self._data.update(value)

    def _validate_mapping(self, mapping, scheme):
        if mapping.get('metadata_version') != self.METADATA_VERSION:
            raise MetadataUnrecognizedVersionError()
        missing = []
        for key, exclusions in self.MANDATORY_KEYS.items():
            if key not in mapping:
                if scheme not in exclusions:
                    missing.append(key)
        if missing:
            msg = 'Missing metadata items: %s' % ', '.join(missing)
            raise MetadataMissingError(msg)
        for k, v in mapping.items():
            self._validate_value(k, v, scheme)

    def validate(self):
        if self._legacy:
            missing, warnings = self._legacy.check(True)
            if missing or warnings:
                logger.warning('Metadata: missing: %s, warnings: %s',
                               missing, warnings)
        else:
            self._validate_mapping(self._data, self.scheme)

    def todict(self):
        if self._legacy:
            return self._legacy.todict(True)
        else:
            result = extract_by_key(self._data, self.INDEX_KEYS)
            return result

    def _from_legacy(self):
        assert self._legacy and not self._data
        result = {
            'metadata_version': self.METADATA_VERSION,
            'generator': self.GENERATOR,
        }
        lmd = self._legacy.todict(True)     # skip missing ones
        for k in ('name', 'version', 'license', 'summary', 'description',
                  'classifier'):
            if k in lmd:
                if k == 'classifier':
                    nk = 'classifiers'
                else:
                    nk = k
                result[nk] = lmd[k]
        kw = lmd.get('Keywords', [])
        if kw == ['']:
            kw = []
        result['keywords'] = kw
        keys = (('requires_dist', 'run_requires'),
                ('setup_requires_dist', 'build_requires'))
        for ok, nk in keys:
            if ok in lmd and lmd[ok]:
                result[nk] = [{'requires': lmd[ok]}]
        result['provides'] = self.provides
        author = {}
        maintainer = {}
        return result

    LEGACY_MAPPING = {
        'name': 'Name',
        'version': 'Version',
        'license': 'License',
        'summary': 'Summary',
        'description': 'Description',
        'classifiers': 'Classifier',
    }

    def _to_legacy(self):
        def process_entries(entries):
            reqts = set()
            for e in entries:
                extra = e.get('extra')
                env = e.get('environment')
                rlist = e['requires']
                for r in rlist:
                    if not env and not extra:
                        reqts.add(r)
                    else:
                        marker = ''
                        if extra:
                            marker = 'extra == "%s"' % extra
                        if env:
                            if marker:
                                marker = '(%s) and %s' % (env, marker)
                            else:
                                marker = env
                        reqts.add(';'.join((r, marker)))
            return reqts

        assert self._data and not self._legacy
        result = LegacyMetadata()
        nmd = self._data
        for nk, ok in self.LEGACY_MAPPING.items():
            if nk in nmd:
                result[ok] = nmd[nk]
        r1 = process_entries(self.run_requires + self.meta_requires)
        r2 = process_entries(self.build_requires + self.dev_requires)
        if self.extras:
            result['Provides-Extra'] = sorted(self.extras)
        result['Requires-Dist'] = sorted(r1)
        result['Setup-Requires-Dist'] = sorted(r2)
        # TODO: other fields such as contacts
        return result

    def write(self, path=None, fileobj=None, legacy=False, skip_unknown=True):
        if [path, fileobj].count(None) != 1:
            raise ValueError('Exactly one of path and fileobj is needed')
        self.validate()
        if legacy:
            if self._legacy:
                legacy_md = self._legacy
            else:
                legacy_md = self._to_legacy()
            if path:
                legacy_md.write(path, skip_unknown=skip_unknown)
            else:
                legacy_md.write_file(fileobj, skip_unknown=skip_unknown)
        else:
            if self._legacy:
                d = self._from_legacy()
            else:
                d = self._data
            if fileobj:
                json.dump(d, fileobj, ensure_ascii=True, indent=2,
                          sort_keys=True)
            else:
                with codecs.open(path, 'w', 'utf-8') as f:
                    json.dump(d, f, ensure_ascii=True, indent=2,
                              sort_keys=True)

    def add_requirements(self, requirements):
        if self._legacy:
            self._legacy.add_requirements(requirements)
        else:
            run_requires = self._data.setdefault('run_requires', [])
            always = None
            for entry in run_requires:
                if 'environment' not in entry and 'extra' not in entry:
                    always = entry
                    break
            if always is None:
                always = { 'requires': requirements }
                run_requires.insert(0, always)
            else:
                rset = set(always['requires']) | set(requirements)
                always['requires'] = sorted(rset)

    def __repr__(self):
        name = self.name or '(no name)'
        version = self.version or 'no version'
        return '<%s %s %s (%s)>' % (self.__class__.__name__,
                                    self.metadata_version, name, version)
python3.4/site-packages/pip/_vendor/distlib/markers.py000064400000014212151735047320016735 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Parser for the environment markers micro-language defined in PEP 345."""

import ast
import os
import sys
import platform

from .compat import python_implementation, string_types
from .util import in_venv

__all__ = ['interpret']


class Evaluator(object):
    """
    A limited evaluator for Python expressions.
    """

    operators = {
        'eq': lambda x, y: x == y,
        'gt': lambda x, y: x > y,
        'gte': lambda x, y: x >= y,
        'in': lambda x, y: x in y,
        'lt': lambda x, y: x < y,
        'lte': lambda x, y: x <= y,
        'not': lambda x: not x,
        'noteq': lambda x, y: x != y,
        'notin': lambda x, y: x not in y,
    }

    allowed_values = {
        'sys_platform': sys.platform,
        'python_version': '%s.%s' % sys.version_info[:2],
        # parsing sys.platform is not reliable, but there is no other
        # way to get e.g. 2.7.2+, and the PEP is defined with sys.version
        'python_full_version': sys.version.split(' ', 1)[0],
        'os_name': os.name,
        'platform_in_venv': str(in_venv()),
        'platform_release': platform.release(),
        'platform_version': platform.version(),
        'platform_machine': platform.machine(),
        'platform_python_implementation': python_implementation(),
    }

    def __init__(self, context=None):
        """
        Initialise an instance.

        :param context: If specified, names are looked up in this mapping.
        """
        self.context = context or {}
        self.source = None

    def get_fragment(self, offset):
        """
        Get the part of the source which is causing a problem.
        """
        fragment_len = 10
        s = '%r' % (self.source[offset:offset + fragment_len])
        if offset + fragment_len < len(self.source):
            s += '...'
        return s

    def get_handler(self, node_type):
        """
        Get a handler for the specified AST node type.
        """
        return getattr(self, 'do_%s' % node_type, None)

    def evaluate(self, node, filename=None):
        """
        Evaluate a source string or node, using ``filename`` when
        displaying errors.
        """
        if isinstance(node, string_types):
            self.source = node
            kwargs = {'mode': 'eval'}
            if filename:
                kwargs['filename'] = filename
            try:
                node = ast.parse(node, **kwargs)
            except SyntaxError as e:
                s = self.get_fragment(e.offset)
                raise SyntaxError('syntax error %s' % s)
        node_type = node.__class__.__name__.lower()
        handler = self.get_handler(node_type)
        if handler is None:
            if self.source is None:
                s = '(source not available)'
            else:
                s = self.get_fragment(node.col_offset)
            raise SyntaxError("don't know how to evaluate %r %s" % (
                node_type, s))
        return handler(node)

    def get_attr_key(self, node):
        assert isinstance(node, ast.Attribute), 'attribute node expected'
        return '%s.%s' % (node.value.id, node.attr)

    def do_attribute(self, node):
        if not isinstance(node.value, ast.Name):
            valid = False
        else:
            key = self.get_attr_key(node)
            valid = key in self.context or key in self.allowed_values
        if not valid:
            raise SyntaxError('invalid expression: %s' % key)
        if key in self.context:
            result = self.context[key]
        else:
            result = self.allowed_values[key]
        return result

    def do_boolop(self, node):
        result = self.evaluate(node.values[0])
        is_or = node.op.__class__ is ast.Or
        is_and = node.op.__class__ is ast.And
        assert is_or or is_and
        if (is_and and result) or (is_or and not result):
            for n in node.values[1:]:
                result = self.evaluate(n)
                if (is_or and result) or (is_and and not result):
                    break
        return result

    def do_compare(self, node):
        def sanity_check(lhsnode, rhsnode):
            valid = True
            if isinstance(lhsnode, ast.Str) and isinstance(rhsnode, ast.Str):
                valid = False
            #elif (isinstance(lhsnode, ast.Attribute)
            #      and isinstance(rhsnode, ast.Attribute)):
            #    klhs = self.get_attr_key(lhsnode)
            #    krhs = self.get_attr_key(rhsnode)
            #    valid = klhs != krhs
            if not valid:
                s = self.get_fragment(node.col_offset)
                raise SyntaxError('Invalid comparison: %s' % s)

        lhsnode = node.left
        lhs = self.evaluate(lhsnode)
        result = True
        for op, rhsnode in zip(node.ops, node.comparators):
            sanity_check(lhsnode, rhsnode)
            op = op.__class__.__name__.lower()
            if op not in self.operators:
                raise SyntaxError('unsupported operation: %r' % op)
            rhs = self.evaluate(rhsnode)
            result = self.operators[op](lhs, rhs)
            if not result:
                break
            lhs = rhs
            lhsnode = rhsnode
        return result

    def do_expression(self, node):
        return self.evaluate(node.body)

    def do_name(self, node):
        valid = False
        if node.id in self.context:
            valid = True
            result = self.context[node.id]
        elif node.id in self.allowed_values:
            valid = True
            result = self.allowed_values[node.id]
        if not valid:
            raise SyntaxError('invalid expression: %s' % node.id)
        return result

    def do_str(self, node):
        return node.s


def interpret(marker, execution_context=None):
    """
    Interpret a marker and return a result depending on environment.

    :param marker: The marker to interpret.
    :type marker: str
    :param execution_context: The context used for name lookup.
    :type execution_context: mapping
    """
    return Evaluator(execution_context).evaluate(marker.strip())
python3.4/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-34.pyc000064400000022346151735047330023252 0ustar00�
�Re0�@s�ddlmZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZddlm
Z
ddlmZmZmZmZmZeje�Zdj�Zejd�Zd	ZGd
d�de�ZdS)�)�BytesION�)�	sysconfig�fsencode�detect_encoding�ZipFile)�finder)�FileOperator�get_export_entry�convert_path�get_executable�in_venva�
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
 processorArchitecture="X86"
 name="%s"
 type="win32"/>

 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
 <requestedPrivileges>
 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
 </requestedPrivileges>
 </security>
 </trustInfo>
</assembly>s^#!.*pythonw?[0-9.]*([ 	].*)?$a{# -*- coding: utf-8 -*-
if __name__ == '__main__':
    import sys, re

    def _resolve(module, func):
        __import__(module)
        mod = sys.modules[module]
        parts = func.split('.')
        result = getattr(mod, parts.pop(0))
        for p in parts:
            result = getattr(result, p)
        return result

    try:
        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])

        func = _resolve('%(module)s', '%(func)s')
        rc = func() # None interpreted as 0
    except Exception as e:  # only supporting Python >= 2.6
        sys.stderr.write('%%s\n' %% e)
        rc = 1
    sys.exit(rc)
c@s�eZdZdZeZdZddddd�Zdd�Zd	dd
d�Z	dd
�Z
eZdd�Z
dd�Zddd�Zdd�Zedd��Zejdd��Zejdkr�dd�Znddd�Zddd�ZdS) �ScriptMakerz_
    A class to copy or create scripts from source scripts or callable
    specifications.
    NTFcCsg||_||_||_d|_d|_tjdk|_td�|_	|p]t
|�|_dS)NF�posix��X.Y)rr)�
source_dir�
target_dir�
add_launchers�force�clobber�os�name�set_mode�set�variantsr	�_fileop)�selfrrr�dry_run�fileop�r �6/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/scripts.py�__init__Ks					zScriptMaker.__init__cCsg|jdd�rctjdkrctjj|�\}}|jdd�}tjj||�}n|S)N�guiF�nt�python�pythonw)�getrr�path�split�replace�join)r�
executable�options�dn�fnr r r!�_get_alternate_executableWs
!z%ScriptMaker._get_alternate_executable�cCs�d}|jr!|j}d}n�tj�s9t�}nqt�rptjjtjd�dtj	d��}n:tjjtj	d�dtj	d�tj	d�f�}|r�|j
||�}n|r�d	|kr�d
|}nt|�}d||d}y|jd
�Wn"t
k
r7td|��YnX|d
kr�y|j|�Wq�t
k
rtd||f��Yq�Xn|S)NTF�scriptszpython%s�EXE�BINDIRz
python%s%s�VERSION� z"%s"s#!s
zutf-8z,The shebang (%r) is not decodable from utf-8z?The shebang (%r) is not decodable from the script encoding (%r))r,r�is_python_buildrr
rr(r+�get_path�get_config_varr0r�decode�UnicodeDecodeError�
ValueError)r�encoding�post_interpr-�enquoter,�shebangr r r!�_get_shebang^s@					


zScriptMaker._get_shebangcCs |jtd|jd|j�S)N�module�func)�script_template�dict�prefix�suffix)r�entryr r r!�_get_script_text�szScriptMaker._get_script_textcCstjj|�}|j|S)N)rr(�basename�manifest)r�exename�baser r r!�get_manifest�szScriptMaker.get_manifestcCs�|jotjdk}tjjd�}|sA|||}n||dkr_|jd�}n|jd�}t�}	t|	d��}
|
jd|�WdQX|	j	�}||||}x�|D]�}tj
j|j|�}
|r�tj
j
|
�\}}|jd�r|}
nd|
}
y|jj|
|�Wqztk
r�tjd	�d
|
}tj
j|�r�tj|�ntj|
|�|jj|
|�tjd�ytj|�Wntk
r�YnXYqzXn�tjdkr|
jd|�rd
|
|f}
ntj
j|
�rH|jrHtjd|
�q�n|jj|
|�|jrz|jj|
g�n|j|
�q�WdS)Nr$zutf-8�py�t�wz__main__.pyz.pyz%s.exez:Failed to write executable - trying to use .deleteme logicz%s.deletemez0Able to replace executable using .deleteme logic�.z%s.%szSkipping existing file %s)rrr�linesep�encode�
_get_launcherrr�writestr�getvaluer(r+r�splitext�
startswithr�write_binary_file�	Exception�logger�warning�exists�remove�rename�debug�endswithrr�set_executable_mode�append)r�namesr@�script_bytes�	filenames�ext�use_launcherrS�launcher�stream�zf�zip_datar�outname�n�e�dfnamer r r!�
_write_script�sT	
	






#	zScriptMaker._write_scriptc	Cs|jdd|�}|j|�jd�}|j}t�}d|jkr^|j|�nd|jkr�|jd|tjdf�nd|jkr�|jd|tjdd	�f�n|r�|j	d
d�r�d}nd
}|j
|||||�dS)Nzutf-8r-r�Xz%s%srzX.Yz%s-%s�r#F�pywrO)rArIrTrrr�add�sys�versionr'rr)	rrHrgr-r@�scriptr�scriptnamesrhr r r!�_make_script�s		!'	zScriptMaker._make_scriptcCsAd}tjj|jt|��}tjj|jtjj|��}|jr||jj	||�r|t
jd|�dSyt|d�}Wn't
k
r�|js��nd}Yn�Xt|j�\}}|jd�|j�}|s
t
jd|j�|�dStj|jdd��}	|	rId}|	jd	�pCd
}
n|s�|rb|j�n|jj||�|jr�|jj|g�n|j|�n�t
jd||j�|jjs*|j||
�}d|kr�d
}nd}tjj|�}
|j|
g||j �||�n|r=|j�ndS)NFznot copying %s (up-to-date)�rbrz"%s: %s is an empty file (skipping)s
s
Trr1zcopying and adjusting %s -> %sspythonwrurO)!rr(r+rrrrJrr�newerr\ra�open�IOErrorrr�readline�seekr]�get_command_name�
FIRST_LINE_RE�matchr*�group�close�	copy_filerrcrd�inforArr�read)rryrg�adjustrn�fr=�lines�
first_liner�r>r@rhror r r!�_copy_script�sR$ 
	
	
	
	%zScriptMaker._copy_scriptcCs
|jjS)N)rr)rr r r!r
szScriptMaker.dry_runcCs||j_dS)N)rr)r�valuer r r!rsr$cCsftjd�dkrd}nd}d||f}tjdd�d}t|�j|�j}|S)	N�P�Z64Z32z%s%s.exerRrr)�struct�calcsize�__name__�rsplitr�find�bytes)r�kind�bitsrZdistlib_package�resultr r r!rUs	zScriptMaker._get_launchercCsKg}t|�}|dkr1|j||�n|j||d|�|S)a�
        Make a script.

        :param specification: The specification, which is either a valid export
                              entry specification (to make a script from a
                              callable) or a filename (to make a script by
                              copying from a source location).
        :param options: A dictionary of options controlling script generation.
        :return: A list of all absolute pathnames written to.
        Nr-)r
r�r{)r�
specificationr-rgrHr r r!�make'szScriptMaker.makecCs4g}x'|D]}|j|j||��q
W|S)z�
        Take a list of specifications and make scripts from them,
        :param specifications: A list of specifications.
        :return: A list of all absolute pathnames written to,
        )�extendr�)r�specificationsr-rgr�r r r!�
make_multiple:s
zScriptMaker.make_multiple)r��
__module__�__qualname__�__doc__�SCRIPT_TEMPLATErDr,r"r0rArI�_DEFAULT_MANIFESTrKrNrrr{r��propertyr�setterrrrUr�r�r r r r!rBs&.24r)�ior�loggingr�rer�rw�compatrrrr�	resourcesr�utilr	r
rrr
�	getLoggerr�r\�stripr��compiler�r��objectrr r r r!�<module>s"(python3.4/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-34.pyc000064400000002022151735047330023307 0ustar00�
�ReE�@s�ddlZdZGdd�de�ZyddlmZWn+ek
riGdd�dej�ZYnXeje�Z	e	j
e��dS)�Nz0.1.8c@seZdZdS)�DistlibExceptionN)�__name__�
__module__�__qualname__�rr�7/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/__init__.pyrsr)�NullHandlerc@s4eZdZdd�Zdd�Zdd�ZdS)rcCsdS)Nr)�self�recordrrr�handleszNullHandler.handlecCsdS)Nr)r	r
rrr�emitszNullHandler.emitcCs
d|_dS)N)�lock)r	rrr�
createLockszNullHandler.createLockN)rrrrrrrrrrrsr)�logging�__version__�	Exceptionrr�ImportError�Handler�	getLoggerr�logger�
addHandlerrrrr�<module>s
python3.4/site-packages/pip/_vendor/distlib/__pycache__/resources.cpython-34.pyc000064400000025535151735047330023600 0ustar00�
�Re�$�@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZmZmZmZeje�ZdaGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Zieed�6ee
j6Zy*ddl Z eee j!<eee j"<Wne#e$fk
r�YnXdd�Z%iZ&dd�Z'e	j(e)d��Z*dd�Z+dS)�)�unicode_literalsN�)�DistlibException)�cached_property�get_cache_base�path_to_cache_dir�Cachecs=eZdZd�fdd�Zdd�Zdd�Z�S)�
ResourceCacheNcsG|dkr-tjjt�td��}ntt|�j|�dS)Nzresource-cache)�os�path�joinr�str�superr	�__init__)�self�base)�	__class__��8/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/resources.pyrs!zResourceCache.__init__cCsdS)z�
        Is the cache stale for the given resource?

        :param resource: The :class:`Resource` being cached.
        :param path: The path of the resource in the cache.
        :return: True if the cache is stale.
        Tr)r�resourcerrrr�is_stale#s	zResourceCache.is_stalec	Cs�|jj|�\}}|dkr-|}n�tjj|j|j|�|�}tjj|�}tjj|�s�tj	|�ntjj
|�s�d}n|j||�}|r�t|d��}|j
|j�WdQXn|S)z�
        Get a resource into the cache,

        :param resource: A :class:`Resource` instance.
        :return: The pathname of the resource in the cache.
        NT�wb)�finder�get_cache_infor
rrr�
prefix_to_dir�dirname�isdir�makedirs�existsr�open�write�bytes)rr�prefixr�resultr�stale�frrr�get.s	$	zResourceCache.get)�__name__�
__module__�__qualname__rrr&rr)rrr	sr	c@seZdZdd�ZdS)�ResourceBasecCs||_||_dS)N)r�name)rrr+rrrrIs	zResourceBase.__init__N)r'r(r)rrrrrr*Hsr*c@s^eZdZdZdZdd�Zedd��Zedd��Zed	d
��Z	dS)�Resourcez�
    A class representing an in-package resource, such as a data file. This is
    not normally instantiated by user code, but rather by a
    :class:`ResourceFinder` which manages the resource.
    FcCs|jj|�S)z�
        Get the resource as a stream.

        This is not a property to make it obvious that it returns a new stream
        each time.
        )r�
get_stream)rrrr�	as_streamVszResource.as_streamcCs%tdkrt�antj|�S)N)�cacher	r&)rrrr�	file_path_szResource.file_pathcCs|jj|�S)N)r�	get_bytes)rrrrr!fszResource.bytescCs|jj|�S)N)r�get_size)rrrr�sizejsz
Resource.sizeN)
r'r(r)�__doc__�is_containerr.rr0r!r3rrrrr,Ns	r,c@s(eZdZdZedd��ZdS)�ResourceContainerTcCs|jj|�S)N)r�
get_resources)rrrr�	resourcesrszResourceContainer.resourcesN)r'r(r)r5rr8rrrrr6osr6c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zeejj�ZdS)�ResourceFinderz4
    Resource finder for file system resources.
    cCsC||_t|dd�|_tjjt|dd��|_dS)N�
__loader__�__file__�)�module�getattr�loaderr
rrr)rr=rrrr{s	zResourceFinder.__init__cCstjj|�S)N)r
r�realpath)rrrrr�_adjust_path�szResourceFinder._adjust_pathcCsA|jd�}|jd|j�tjj|�}|j|�S)N�/r)�split�insertrr
rrrA)r�
resource_name�partsr#rrr�
_make_path�szResourceFinder._make_pathcCstjj|�S)N)r
rr)rrrrr�_find�szResourceFinder._findcCs
d|jfS)N)r)rrrrrr�szResourceFinder.get_cache_infocCsd|j|�}|j|�s'd}n9|j|�rHt||�}nt||�}||_|S)N)rGrH�
_is_directoryr6r,r)rrErr#rrr�find�s		zResourceFinder.findcCst|jd�S)N�rb)rr)rrrrrr-�szResourceFinder.get_streamcCs)t|jd��}|j�SWdQXdS)NrK)rr�read)rrr%rrrr1�szResourceFinder.get_bytescCstjj|j�S)N)r
r�getsize)rrrrrr2�szResourceFinder.get_sizecs5dd��t�fdd�tj|j�D��S)NcSs|dko|jd�S)N�__pycache__�.pyc�.pyo)rOrP)�endswith)r%rrr�allowed�sz-ResourceFinder.get_resources.<locals>.allowedcs"g|]}�|�r|�qSrr)�.0r%)rRrr�
<listcomp>�s	z0ResourceFinder.get_resources.<locals>.<listcomp>)�setr
�listdirr)rrr)rRrr7�szResourceFinder.get_resourcescCs|j|j�S)N)rIr)rrrrrr5�szResourceFinder.is_containerN)r'r(r)r4rrArGrHrrJr-r1r2r7r5�staticmethodr
rrrIrrrrr9wsr9cs�eZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Z�S)�ZipResourceFinderz6
    Resource finder for resources in .zip files.
    cstt|�j|�|jj}dt|�|_t|jd�rY|jj|_nt	j
||_t|j�|_dS)Nr�_files)
rrXrr?�archive�len�
prefix_len�hasattrrY�	zipimport�_zip_directory_cache�sorted�index)rr=rZ)rrrr�szZipResourceFinder.__init__cCs|S)Nr)rrrrrrA�szZipResourceFinder._adjust_pathcCs�||jd�}||jkr+d}ns|rT|dtjkrT|tj}ntj|j|�}y|j|j|�}Wntk
r�d}YnX|s�tj	d||j
j�ntj	d||j
j�|S)NTrFz_find failed: %r %rz_find worked: %r %r���)r\rYr
�sep�bisectra�
startswith�
IndexError�logger�debugr?r")rrr#�irrrrH�s	
zZipResourceFinder._findcCs3|jj}|jdt|�d�}||fS)Nr)r?rZrr[)rrr"rrrrr�sz ZipResourceFinder.get_cache_infocCs|jj|j�S)N)r?�get_datar)rrrrrr1�szZipResourceFinder.get_bytescCstj|j|��S)N)�io�BytesIOr1)rrrrrr-�szZipResourceFinder.get_streamcCs%|j|jd�}|j|dS)N�)rr\rY)rrrrrrr2�szZipResourceFinder.get_sizecCs�|j|jd�}|r?|dtjkr?|tj7}nt|�}t�}tj|j|�}xt|t|j�kr�|j|j|�s�Pn|j||d�}|j	|j
tjd�d�|d7}qlW|S)Nrrrb)rr\r
rcr[rUrdrare�addrC)rrr�plenr#ri�srrrr7�s	 zZipResourceFinder.get_resourcescCs�||jd�}|r<|dtjkr<|tj7}ntj|j|�}y|j|j|�}Wntk
r�d}YnX|S)NrFrb)r\r
rcrdrarerf)rrrir#rrrrI�s
zZipResourceFinder._is_directory)
r'r(r)r4rrArHrr1r-r2r7rIrr)rrrX�srXcCs|tt|�<dS)N)�_finder_registry�type)r?�finder_makerrrr�register_finder
srtcCs�|tkrt|}n�|tjkr5t|�ntj|}t|dd�}|dkrotd��nt|dd�}tjt|��}|dkr�td|��n||�}|t|<|S)z�
    Return a resource finder for a package.
    :param package: The name of the package.
    :return: A :class:`ResourceFinder` instance for the package.
    �__path__Nz8You cannot get a finder for a module, only for a packager:zUnable to locate finder for %r)	�
_finder_cache�sys�modules�
__import__r>rrqr&rr)�packager#r=rr?rsrrrrs



r�	__dummy__cCszd}tj|�tjj|�}tjt|��}|rvt}tj	j
|d�|_||_||�}n|S)z�
    Return a resource finder for a path, which should represent a container.

    :param path: The path.
    :return: A :class:`ResourceFinder` instance for the path.
    Nr<)
�pkgutil�get_importerrw�path_importer_cacher&rqrr�
_dummy_moduler
rrr;r:)rr#r?rr=rrr�finder_for_path,s
	r�),�
__future__rrdrk�loggingr
r|�shutilrw�typesr^r<r�utilrrrr�	getLoggerr'rgr/r	�objectr*r,r6r9rXrr�zipimporterrq�_frozen_importlib�SourceFileLoader�
FileFinder�ImportError�AttributeErrorrtrvr�
ModuleTyper
rr�rrrr�<module>sB",!9M


python3.4/site-packages/pip/_vendor/distlib/__pycache__/database.cpython-34.pyc000064400000127347151735047340023337 0ustar00�
�Re��@s6dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
mZddlmZddlmZmZddlmZmZdd	lmZmZmZmZmZmZmZd
ddd
dgZej e!�Z"dZ#dZ$deddde#dfZ%dZ&Gdd�de'�Z(Gdd�de'�Z)Gdd
�d
e'�Z*Gdd�de*�Z+Gdd�de+�Z,Gdd
�d
e+�Z-e,Z.e-Z/Gdd�de'�Z0d d!d"�Z1d#d$�Z2d%d&�Z3d'd(�Z4dS))zPEP 376 implementation.�)�unicode_literalsN�)�DistlibException�	resources)�StringIO)�
get_scheme�UnsupportedVersionError)�Metadata�METADATA_FILENAME)�parse_requirement�cached_property�parse_name_and_version�read_exports�
write_exports�	CSVReader�	CSVWriter�Distribution�BaseInstalledDistribution�InstalledDistribution�EggInfoDistribution�DistributionPathzpydist-exports.jsonzpydist-commands.jsonZ	INSTALLER�RECORD�	REQUESTED�	RESOURCES�SHAREDz
.dist-infoc@s:eZdZdZdd�Zdd�Zdd�ZdS)	�_CachezL
    A simple cache mapping names and .dist-info paths to distributions
    cCsi|_i|_d|_dS)zZ
        Initialise an instance. There is normally one for each DistributionPath.
        FN)�name�path�	generated)�self�r �7/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/database.py�__init__0s		z_Cache.__init__cCs'|jj�|jj�d|_dS)zC
        Clear the cache, setting it to its initial state.
        FN)r�clearrr)rr r r!r#8s

z_Cache.clearcCsH|j|jkrD||j|j<|jj|jg�j|�ndS)z`
        Add a distribution to the cache.
        :param dist: The distribution to add.
        N)rr�
setdefault�key�append)r�distr r r!�add@sz
_Cache.addN)�__name__�
__module__�__qualname__�__doc__r"r#r(r r r r!r,src@s�eZdZdZdddd�Zdd�Zdd	�Zeee�Zd
d�Z	dd
�Z
dd�Zedd��Z
dd�Zdd�Zddd�Zdd�Zddd�ZdS)rzU
    Represents a set of distributions installed on a path (typically sys.path).
    NFcCsg|dkrtj}n||_d|_||_t�|_t�|_d|_td�|_	dS)a�
        Create an instance from a path, optionally including legacy (distutils/
        setuptools/distribute) distributions.
        :param path: The path to use, as a list of directories. If not specified,
                     sys.path is used.
        :param include_egg: If True, this instance will look for and return legacy
                            distributions as well as those based on PEP 376.
        NT�default)
�sysr�
_include_dist�_include_eggr�_cache�
_cache_egg�_cache_enabledr�_scheme)rrZinclude_eggr r r!r"Ns					zDistributionPath.__init__cCs|jS)N)r3)rr r r!�_get_cache_enabledbsz#DistributionPath._get_cache_enabledcCs
||_dS)N)r3)r�valuer r r!�_set_cache_enabledesz#DistributionPath._set_cache_enabledcCs|jj�|jj�dS)z,
        Clears the internal cache.
        N)r1r#r2)rr r r!�clear_cachejs
zDistributionPath.clear_cachec
cs�t�}x�|jD]�}tj|�}|dkr:qn|jd�}|s|jr`qnt|j�}x(|D] }|j|�}|sv|j|kr�qvn|jrG|jt	�rGt
j|t�}|j|�}|s�qvnt
d|j�dd�}	tjd|j�|j|j�t|jd|	d|�Vqv|jrv|jd�rvtjd|j�|j|j�t|j|�VqvqvWqWdS)zD
        Yield .dist-info and/or .egg(-info) distributions.
        N��fileobj�scheme�legacyzFound %s�metadata�env�	.egg-info�.egg)r?r@)�setrr�finder_for_path�find�is_container�sortedr/�endswith�DISTINFO_EXT�	posixpath�joinr
r	�	as_stream�logger�debugr(�new_dist_classr0�old_dist_class)
r�seenr�finder�rZrset�entryZ
metadata_pathZpydistr=r r r!�_yield_distributionsrs:	
		z%DistributionPath._yield_distributionscCs�|jj}|jo |jj}|s/|r�xF|j�D]8}t|t�rd|jj|�q<|jj|�q<W|r�d|j_n|r�d|j_q�ndS)zk
        Scan the path for distributions and populate the cache with
        those that are found.
        TN)r1rr0r2rS�
isinstancerr()rZgen_distZgen_eggr'r r r!�_generate_cache�s
z DistributionPath._generate_cachecCs)|jdd�}dj||g�tS)ao
        The *name* and *version* parameters are converted into their
        filename-escaped form, i.e. any ``'-'`` characters are replaced
        with ``'_'`` other than the one in ``'dist-info'`` and the one
        separating the name from the version number.

        :parameter name: is converted to a standard distribution name by replacing
                         any runs of non- alphanumeric characters with a single
                         ``'-'``.
        :type name: string
        :parameter version: is converted to a standard version string. Spaces
                            become dots, and all other non-alphanumeric characters
                            (except dots) become dashes, with runs of multiple
                            dashes condensed to a single dash.
        :type version: string
        :returns: directory name
        :rtype: string�-�_)�replacerIrG)�clsr�versionr r r!�distinfo_dirname�sz!DistributionPath.distinfo_dirnameccs�|js(xv|j�D]}|VqWnZ|j�x|jjj�D]}|VqEW|jr�x"|jjj�D]}|VqpWndS)a5
        Provides an iterator that looks for distributions and returns
        :class:`InstalledDistribution` or
        :class:`EggInfoDistribution` instances for each one of them.

        :rtype: iterator of :class:`InstalledDistribution` and
                :class:`EggInfoDistribution` instances
        N)r3rSrUr1r�valuesr0r2)rr'r r r!�get_distributions�s		
		z"DistributionPath.get_distributionscCs�d}|j�}|jsNx�|j�D]}|j|kr(|}Pq(q(Wne|j�||jjkr�|jj|d}n2|jr�||jjkr�|jj|d}n|S)a=
        Looks for a named distribution on the path.

        This function only returns the first result found, as no more than one
        value is expected. If nothing is found, ``None`` is returned.

        :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
                or ``None``
        Nr)	�lowerr3rSr%rUr1rr0r2)rr�resultr'r r r!�get_distribution�s
	
z!DistributionPath.get_distributionc	cs�d}|dk	r`y |jjd||f�}Wq`tk
r\td||f��Yq`Xnx�|j�D]z}|j}xh|D]`}t|�\}}|dkr�||kr�|VPq�q�||kr�|j|�r�|VPq�q�WqmWdS)a
        Iterates over all distributions to find which distributions provide *name*.
        If a *version* is provided, it will be used to filter the results.

        This function only returns the first result found, since no more than
        one values are expected. If the directory is not found, returns ``None``.

        :parameter version: a version specifier that indicates the version
                            required, conforming to the format in ``PEP-345``

        :type name: string
        :type version: string
        Nz%s (%s)zinvalid name or version: %r, %r)r4�matcher�
ValueErrorrr]�providesr
�match)	rrrZrar'�provided�p�p_name�p_verr r r!�provides_distribution�s$ 
	
z&DistributionPath.provides_distributioncCs;|j|�}|dkr.td|��n|j|�S)z5
        Return the path to a resource file.
        Nzno distribution named %r found)r`�LookupError�get_resource_path)rr�
relative_pathr'r r r!�
get_file_pathszDistributionPath.get_file_pathccs�xy|j�D]k}|j}||kr
||}|dk	rY||kru||Vquqxx|j�D]}|VqfWq
q
WdS)z�
        Return all of the exported entries in a particular category.

        :param category: The category to search for entries.
        :param name: If specified, only entries with that name are returned.
        N)r]�exportsr\)r�categoryrr'rQ�d�vr r r!�get_exported_entriess	
z%DistributionPath.get_exported_entries)r)r*r+r,r"r5r7�propertyZ
cache_enabledr8rSrU�classmethodr[r]r`rirmrrr r r r!rJs&$	c@seZdZdZdZdZdd�Zedd��ZeZ	edd��Z
ed	d
��Zdd�Zed
d��Z
edd��Zedd��Zedd��Zedd��Zdd�Zdd�Zdd�Zdd�ZdS) rz�
    A base class for distributions, whether installed or from indexes.
    Either way, it must have some metadata, so that's all that's needed
    for construction.
    FcCs[||_|j|_|jj�|_|j|_d|_d|_d|_d|_dS)z�
        Initialise an instance.
        :param metadata: The instance of :class:`Metadata` describing this
        distribution.
        N)	r=rr^r%rZ�locator�digest�extras�context)rr=r r r!r"Cs				zDistribution.__init__cCs
|jjS)zH
        The source archive download URL for this distribution.
        )r=�
source_url)rr r r!ryRszDistribution.source_urlcCsd|j|jfS)zX
        A utility property which displays the name and version in parentheses.
        z%s (%s))rrZ)rr r r!�name_and_version[szDistribution.name_and_versioncCsB|jj}d|j|jf}||kr>|j|�n|S)z�
        A set of distribution names and versions provided by this distribution.
        :return: A set of "name (version)" strings.
        z%s (%s))r=rcrrZr&)r�plist�sr r r!rcbs
zDistribution.providescCs:t|j|�}t|jj|d|jd|j��S)Nrwr>)�getattrr=rAZget_requirementsrwrx)rZreq_attrZreqtsr r r!�_get_requirementsnszDistribution._get_requirementscCs
|jd�S)N�run_requires)r~)rr r r!rsszDistribution.run_requirescCs
|jd�S)N�
meta_requires)r~)rr r r!r�wszDistribution.meta_requirescCs
|jd�S)N�build_requires)r~)rr r r!r�{szDistribution.build_requirescCs
|jd�S)N�
test_requires)r~)rr r r!r�szDistribution.test_requirescCs
|jd�S)N�dev_requires)r~)rr r r!r��szDistribution.dev_requiresc
Cs�t|�}t|jj�}y|j|j�}WnAtk
rwtjd|�|j	�d}|j|�}YnX|j
}d}x^|jD]S}t|�\}}	||kr�q�ny|j
|	�}PWq�tk
r�Yq�Xq�W|S)z�
        Say if this instance matches (fulfills) a requirement.
        :param req: The requirement to match.
        :rtype req: str
        :return: True if it matches, else False.
        z+could not read version %r - using name onlyrF)rrr=r;ra�requirementrrK�warning�splitr%rcr
rd)
r�reqrQr;rarr_rfrgrhr r r!�matches_requirement�s*	
		
	z Distribution.matches_requirementcCs6|jrd|j}nd}d|j|j|fS)zC
        Return a textual representation of this instance,
        z [%s]r9z<Distribution %s (%s)%s>)ryrrZ)r�suffixr r r!�__repr__�s	zDistribution.__repr__cCs[t|�t|�k	r!d}n6|j|jkoT|j|jkoT|j|jk}|S)a<
        See if this distribution is the same as another.
        :param other: The distribution to compare with. To be equal to one
                      another. distributions must have the same type, name,
                      version and source_url.
        :return: True if it is the same, else False.
        F)�typerrZry)r�otherr_r r r!�__eq__�s	zDistribution.__eq__cCs't|j�t|j�t|j�S)zH
        Compute hash in a way which matches the equality test.
        )�hashrrZry)rr r r!�__hash__�szDistribution.__hash__N)r)r*r+r,Zbuild_time_dependency�	requestedr"rsry�download_urlrzrcr~rr�r�r�r�r�r�r�r�r r r r!r1s$"
cs@eZdZdZdZd�fdd�Zddd�Z�S)rz]
    This is the base class for installed distributions (whether PEP 376 or
    legacy).
    Ncs,tt|�j|�||_||_dS)a
        Initialise an instance.
        :param metadata: An instance of :class:`Metadata` which describes the
                         distribution. This will normally have been initialised
                         from a metadata file in the ``path``.
        :param path:     The path of the ``.dist-info`` or ``.egg-info``
                         directory for the distribution.
        :param env:      This is normally the :class:`DistributionPath`
                         instance where this distribution was found.
        N)�superrr"r�	dist_path)rr=rr>)�	__class__r r!r"�s	z"BaseInstalledDistribution.__init__cCs�|dkr|j}n|dkr6tj}d}ntt|�}d|j}||�j�}tj|�jd�jd�}d||fS)a�
        Get the hash of some data, using a particular hash algorithm, if
        specified.

        :param data: The data to be hashed.
        :type data: bytes
        :param hasher: The name of a hash implementation, supported by hashlib,
                       or ``None``. Examples of valid values are ``'sha1'``,
                       ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
                       ``'sha512'``. If no hasher is specified, the ``hasher``
                       attribute of the :class:`InstalledDistribution` instance
                       is used. If the hasher is determined to be ``None``, MD5
                       is used as the hashing algorithm.
        :returns: The hash of the data. If a hasher was explicitly specified,
                  the returned hash will be prefixed with the specified hasher
                  followed by '='.
        :rtype: str
        Nr9z%s=�=�asciiz%s%s)	�hasher�hashlib�md5r}rv�base64�urlsafe_b64encode�rstrip�decode)r�datar��prefixrvr r r!�get_hash�s		
!z"BaseInstalledDistribution.get_hash)r)r*r+r,r�r"r�r r )r�r!r�scseZdZdZdZdd�fdd�Zdd�Zdd	�Zd
d�Ze	dd
��Z
dd�Zdd�Zdd�Z
dd�Zddd�Zdd�Ze	dd��Zddd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZejZ�S)'ra
    Created with the *path* of the ``.dist-info`` directory provided to the
    constructor. It reads the metadata contained in ``pydist.json`` when it is
    instantiated., or uses a passed in Metadata instance (useful for when
    dry-run mode is being used).
    �sha256Ncs�tj|�|_}|dkr;ddl}|j�n|rr|jrr||jjkrr|jj|j}n�|dkr|j	t
�}|dkr�|j	d�}n|dkr�tdt
|f��ntj
|j���}td|dd�}WdQXntt|�j|||�|rD|jrD|jj|�ny|j	d�}Wn(tk
r�ddl}|j�YnX|dk	|_dS)Nr�METADATAzno %s found in %sr:r;r<r)rrBrP�pdbZ	set_tracer3r1rr=rCr
rb�
contextlib�closingrJr	r�rr"r(�AttributeErrorr�)rrr=r>rPr�rQ�stream)r�r r!r"s0
!	
zInstalledDistribution.__init__cCsd|j|j|jfS)Nz#<InstalledDistribution %r %s at %r>)rrZr)rr r r!r�'szInstalledDistribution.__repr__cCsd|j|jfS)Nz%s %s)rrZ)rr r r!�__str__+szInstalledDistribution.__str__c
Cs�g}|jd�}tj|j���{}td|��c}xY|D]Q}dd�tt|�d�D�}||\}}}	|j|||	f�qFWWdQXWdQX|S)a"
        Get the list of installed files for the distribution
        :return: A list of tuples of path, hash and size. Note that hash and
                 size might be ``None`` for some entries. The path is exactly
                 as stored in the file (which is as in PEP 376).
        rr�cSsg|]}d�qS)Nr )�.0�ir r r!�
<listcomp>=s	z6InstalledDistribution._get_records.<locals>.<listcomp>�N)�get_distinfo_resourcer�r�rJr�range�lenr&)
r�resultsrQr�Z
record_reader�row�missingr�checksum�sizer r r!�_get_records.s
"&z"InstalledDistribution._get_recordscCs.i}|jt�}|r*|j�}n|S)a
        Return the information exported by this distribution.
        :return: A dictionary of exports, mapping an export category to a dict
                 of :class:`ExportEntry` instances describing the individual
                 export entries, and keyed by name.
        )r��EXPORTS_FILENAMEr)rr_rQr r r!rnEs
zInstalledDistribution.exportsc	CsLi}|jt�}|rHtj|j���}t|�}WdQXn|S)z�
        Read exports data from a file in .ini format.

        :return: A dictionary of exports, mapping an export category to a list
                 of :class:`ExportEntry` instances describing the individual
                 export entries.
        N)r�r�r�r�rJr)rr_rQr�r r r!rSsz"InstalledDistribution.read_exportsc
Cs8|jt�}t|d��}t||�WdQXdS)a
        Write a dictionary of exports to a file in .ini format.
        :param exports: A dictionary of exports, mapping an export category to
                        a list of :class:`ExportEntry` instances describing the
                        individual export entries.
        �wN)�get_distinfo_filer��openr)rrn�rf�fr r r!rbsz#InstalledDistribution.write_exportscCs�|jd�}tj|j���F}td|��.}x$|D]\}}||kr@|Sq@WWdQXWdQXtd|��dS)aW
        NOTE: This API may change in the future.

        Return the absolute path to a resource file with the given relative
        path.

        :param relative_path: The path, relative to .dist-info, of the resource
                              of interest.
        :return: The absolute path where the resource is to be found.
        rr�Nz3no resource file with relative path %r is installed)r�r�r�rJr�KeyError)rrlrQr�Zresources_readerZrelativeZdestinationr r r!rkmsz'InstalledDistribution.get_resource_pathccs x|j�D]}|Vq
WdS)z�
        Iterates over the ``RECORD`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: iterator of (path, hash, size)
        N)r�)rr_r r r!�list_installed_files�sz*InstalledDistribution.list_installed_filesFcCs�tjj|d�}tjj|j�}|j|�}tjj|d�}|jd�}tjd|�|rwdSt|��}x�|D]�}tjj	|�s�|j
d	�r�d}	}
nCdtjj|�}
t|d��}|j
|j��}	WdQX|j|�s(|r@|j|�r@tjj||�}n|j||	|
f�q�W|j|�r�tjj||�}n|j|ddf�WdQX|S)
z�
        Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
        existing ``RECORD`` file is silently overwritten.

        prefix is used to determine when to write absolute paths.
        r9rzcreating %sN�.pyc�.pyoz%d�rb)r�r�)�osrrI�dirname�
startswithr�rK�infor�isdirrF�getsizer�r��read�relpath�writerow)r�pathsr��dry_run�baseZbase_under_prefix�record_path�writerr�
hash_valuer��fpr r r!�write_installed_files�s.
!
z+InstalledDistribution.write_installed_filesc
Cs�g}tjj|j�}|jd�}xn|j�D]`\}}}tjj|�sptjj||�}n||kr�q7ntjj|�s�|j|dddf�q7tjj	|�r7t
tjj|��}|r||kr|j|d||f�q�|r�d|kr3|jdd�d}nd	}t
|d
��G}	|j|	j�|�}
|
|kr�|j|d||
f�nWd	QXq�q7q7W|S)a�
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        r�existsTFr��=rrNr�r�)r�rr�r�r��isabsrIr�r&�isfile�strr�r�r�r�r�)r�
mismatchesr�r�rr�r�Zactual_sizer�r�Zactual_hashr r r!�check_installed_files�s.	,z+InstalledDistribution.check_installed_filesc
Cs�i}tjj|jd�}tjj|�r�tj|ddd��}|j�j�}WdQXx[|D]P}|jdd�\}}|dkr�|j	|g�j
|�qj|||<qjWn|S)	a�
        A dictionary of shared locations whose keys are in the set 'prefix',
        'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
        The corresponding value is the absolute path of that category for
        this distribution, and takes into account any paths selected by the
        user at installation time (e.g. via command-line arguments). In the
        case of the 'namespace' key, this would be a list of absolute paths
        for the roots of namespace packages in this distribution.

        The first time this property is accessed, the relevant information is
        read from the SHARED file in the .dist-info directory.
        rrQ�encodingzutf-8Nr�r�	namespace)r�rrIr��codecsr�r��
splitlinesr�r$r&)rr_�shared_pathr��lines�liner%r6r r r!�shared_locations�s
z&InstalledDistribution.shared_locationsc	
Cs�tjj|jd�}tjd|�|r2dSg}xHdD]@}||}tjj||�r?|jd	||f�q?q?Wx+|jd
f�D]}|jd|�q�Wtj	|dd
d��}|j
dj|��WdQX|S)aa
        Write shared location information to the SHARED file in .dist-info.
        :param paths: A dictionary as described in the documentation for
        :meth:`shared_locations`.
        :param dry_run: If True, the action is logged but no file is actually
                        written.
        :return: The path of the file written to.
        rzcreating %sNr��lib�headers�scriptsr�z%s=%sr�znamespace=%sr�r�zutf-8�
)zprefixzlibzheaderszscriptszdata)r�rrIrKr�r�r&�getr�r��write)	rr�r�r�r�r%r�nsr�r r r!�write_shared_locations�s	

z,InstalledDistribution.write_shared_locationscCsi|tkr(td||jf��ntj|j�}|dkr\td|j��n|j|�S)Nz+invalid path for a dist-info file: %r at %rzUnable to get a finder for %s)�
DIST_FILESrrrrBrC)rrrPr r r!r�sz+InstalledDistribution.get_distinfo_resourcecCs�|jtj�dkr~|jtj�dd�\}}||jjtj�dkr~td||j|jf��q~n|tkr�td||jf��ntjj	|j|�S)	a�
        Returns a path located under the ``.dist-info`` directory. Returns a
        string representing the path.

        :parameter path: a ``'/'``-separated path relative to the
                         ``.dist-info`` directory or an absolute path;
                         If *path* is an absolute path and doesn't start
                         with the ``.dist-info`` directory path,
                         a :class:`DistlibException` is raised
        :type path: str
        :rtype: str
        r�Nrz;dist-info file %r does not belong to the %r %s distributionz+invalid path for a dist-info file: %r at %r������)
rCr��sepr�rrrrZr�rI)rrr[r r r!r�s"z'InstalledDistribution.get_distinfo_fileccs}tjj|j�}xa|j�D]S\}}}tjj|�s[tjj||�}n|j|j�r"|Vq"q"WdS)z�
        Iterates over the ``RECORD`` entries and returns paths for each line if
        the path is pointing to a file located in the ``.dist-info`` directory
        or one of its subdirectories.

        :returns: iterator of paths
        N)r�rr�r�r�rIr�)rr�rr�r�r r r!�list_distinfo_files+sz)InstalledDistribution.list_distinfo_filescCst|t�o|j|jkS)N)rTrr)rr�r r r!r�;szInstalledDistribution.__eq__)r)r*r+r,r�r"r�r�r�rrnrrrkr�r�r�r�r�r�r�r�r��objectr�r r )r�r!rs(
##	cs�eZdZdZdZiZd�fdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zddd�Zdd�Z
ejZ�S)raCreated with the *path* of the ``.egg-info`` directory or file provided
    to the constructor. It reads the metadata contained in the file itself, or
    if the given path happens to be a directory, the metadata is read from the
    file ``PKG-INFO`` under that directory.TNcs�dd�}||_||_|rk|jrk||jjkrk|jj|j}|||j|j�nG|j|�}|||j|j�|r�|jr�|jj|�nt	t
|�j|||�dS)NcSs%||_|j�|_||_dS)N)rr^r%rZ)r|�nrqr r r!�set_name_and_versionMs	z:EggInfoDistribution.__init__.<locals>.set_name_and_version)rr�r3r2r=rrZ�
_get_metadatar(r�rr")rrr>r�r=)r�r r!r"Ls		!zEggInfoDistribution.__init__c
s�d}dd���fdd�}|jd�r!tjj|�r�tjj|dd�}td|d	d
�}tjj|dd�}||�}q�tj|�}t|j	d�j
d
��}td|d	d
�}y(|j	d�}	�|	j
d��}Wq�tk
rd}Yq�Xn�|jd�r�tjj|�r{tjj|d�}tjj|d�}||�}ntd|d	d
�}ntd|��|r�|j
|�n|S)NcSs�g}|j�}x�|D]�}|j�}|jd�rNtjd|�Pnt|�}|svtjd|�qn|jr�tjd�n|js�|j|j	�qdj
dd�|jD��}|jd|j	|f�qW|S)	z�Create a list of dependencies from a requires.txt file.

            *data*: the contents of a setuptools-produced requires.txt file.
            �[z.Unexpected line: quitting requirement scan: %rz#Not recognised as a requirement: %rz4extra requirements in requires.txt are not supportedz, css|]}d|VqdS)z%s%sNr )r��cr r r!�	<genexpr>{szQEggInfoDistribution._get_metadata.<locals>.parse_requires_data.<locals>.<genexpr>z%s (%s))r��stripr�rKr�rrw�constraintsr&rrI)r��reqsr�r�rQ�consr r r!�parse_requires_datads&
			z>EggInfoDistribution._get_metadata.<locals>.parse_requires_datacsSg}y4tj|dd��}�|j��}WdQXWntk
rNYnX|S)z�Create a list of dependencies from a requires.txt file.

            *req_path*: the path to a setuptools-produced requires.txt file.
            rQzutf-8N)r�r�r��IOError)�req_pathr�r�)r�r r!�parse_requires_paths
z>EggInfoDistribution._get_metadata.<locals>.parse_requires_pathz.eggzEGG-INFOzPKG-INFOrr;r<zrequires.txtzEGG-INFO/PKG-INFO�utf8r:zEGG-INFO/requires.txtzutf-8z	.egg-infoz,path must end with .egg-info or .egg, got %r)rFr�rr�rIr	�	zipimport�zipimporterr�get_datar�r�rZadd_requirements)
rr�requiresr��	meta_pathr=r�Zzipfr:r�r )r�r!r�as:

z!EggInfoDistribution._get_metadatacCsd|j|j|jfS)Nz!<EggInfoDistribution %r %s at %r>)rrZr)rr r r!r��szEggInfoDistribution.__repr__cCsd|j|jfS)Nz%s %s)rrZ)rr r r!r��szEggInfoDistribution.__str__cCs�g}tjj|jd�}tjj|�r�x`|j�D]O\}}}||kr^q=ntjj|�s=|j|dddf�q=q=Wn|S)a�
        Checks that the hashes and sizes of the files in ``RECORD`` are
        matched by the files themselves. Returns a (possibly empty) list of
        mismatches. Each entry in the mismatch list will be a tuple consisting
        of the path, 'exists', 'size' or 'hash' according to what didn't match
        (existence is checked first, then size, then hash), the expected
        value and the actual value.
        zinstalled-files.txtr�TF)r�rrIr�r�r&)rr�r�rrWr r r!r��s	#z)EggInfoDistribution.check_installed_filesc
Cs8dd�}dd�}tjj|jd�}g}tjj|�r4tj|ddd���}x�|D]�}|j�}tjjtjj|j|��}tjj|�s�tj	d	|�|j
d
�r�qjq�ntjj|�sj|j|||�||�f�qjqjWWdQX|j|ddf�n|S)z�
        Iterates over the ``installed-files.txt`` entries and returns a tuple
        ``(path, hash, size)`` for each line.

        :returns: a list of (path, hash, size)
        c
Ss@t|d�}z|j�}Wd|j�Xtj|�j�S)Nr�)r�r��closer�r��	hexdigest)rr��contentr r r!�_md5�s
z6EggInfoDistribution.list_installed_files.<locals>._md5cSstj|�jS)N)r��stat�st_size)rr r r!�_size�sz7EggInfoDistribution.list_installed_files.<locals>._sizezinstalled-files.txtrQr�zutf-8zNon-existent file: %s�.pyc�.pyoN)rr)
r�rrIr�r�r�r��normpathrKr�rFr�r&)rrr
r�r_r�r�rfr r r!r��s"
$	/z(EggInfoDistribution.list_installed_filesFccs�tjj|jd�}d}tj|ddd���}x�|D]}|j�}|dkrjd}q@n|s@tjjtjj|j|��}|j|j�r�|r�|Vq�|Vq�q@q@WWdQXdS)	a
        Iterates over the ``installed-files.txt`` entries and returns paths for
        each line if the path is pointing to a file located in the
        ``.egg-info`` directory or one of its subdirectories.

        :parameter absolute: If *absolute* is ``True``, each returned path is
                          transformed into a local absolute path. Otherwise the
                          raw value from ``installed-files.txt`` is returned.
        :type absolute: boolean
        :returns: iterator of paths
        zinstalled-files.txtTrQr�zutf-8z./FN)r�rrIr�r�r�r
r�)rZabsoluter��skipr�r�rfr r r!r��s
$z'EggInfoDistribution.list_distinfo_filescCst|t�o|j|jkS)N)rTrr)rr�r r r!r�szEggInfoDistribution.__eq__)r)r*r+r,r�r�r"r�r�r�r�r�r�r�r�r�r r )r�r!rCsK&c@s�eZdZdZdd�Zdd�Zddd�Zd	d
�Zdd�Zd
dd�Z	ddd�Z
dd�Zdd�ZdS)�DependencyGrapha�
    Represents a dependency graph between distributions.

    The dependency relationships are stored in an ``adjacency_list`` that maps
    distributions to a list of ``(other, label)`` tuples where  ``other``
    is a distribution and the edge is labeled with ``label`` (i.e. the version
    specifier, if such was provided). Also, for more efficient traversal, for
    every distribution ``x``, a list of predecessors is kept in
    ``reverse_list[x]``. An edge from distribution ``a`` to
    distribution ``b`` means that ``a`` depends on ``b``. If any missing
    dependencies are found, they are stored in ``missing``, which is a
    dictionary that maps distributions to a list of requirements that were not
    provided by any other distributions.
    cCsi|_i|_i|_dS)N)�adjacency_list�reverse_listr�)rr r r!r"#s		zDependencyGraph.__init__cCsg|j|<g|j|<dS)z�Add the *distribution* to the graph.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        N)rr)r�distributionr r r!�add_distribution(s
z DependencyGraph.add_distributionNcCsH|j|j||f�||j|krD|j|j|�ndS)a�Add an edge from distribution *x* to distribution *y* with the given
        *label*.

        :type x: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type y: :class:`distutils2.database.InstalledDistribution` or
                 :class:`distutils2.database.EggInfoDistribution`
        :type label: ``str`` or ``None``
        N)rr&r)r�x�y�labelr r r!�add_edge2s
zDependencyGraph.add_edgecCs3tjd||�|jj|g�j|�dS)a
        Add a missing *requirement* for the given *distribution*.

        :type distribution: :class:`distutils2.database.InstalledDistribution`
                            or :class:`distutils2.database.EggInfoDistribution`
        :type requirement: ``str``
        z
%s missing %rN)rKrLr�r$r&)rrr�r r r!�add_missingAszDependencyGraph.add_missingcCsd|j|jfS)Nz%s %s)rrZ)rr'r r r!�
_repr_distLszDependencyGraph._repr_distrcCs�|j|�g}x�|j|D]�\}}|j|�}|dk	rZd||f}n|jd|t|��|j||d�}|jd�}|j|dd��q Wdj|�S)zPrints only a subgraphNz%s [%s]z    rr�)rrr&r��	repr_noder��extendrI)rr'�level�outputr�rZ	suboutput�subsr r r!rOszDependencyGraph.repr_nodeTcCsRg}|jd�x�|jj�D]�\}}t|�dkrX|rX|j|�nx`|D]X\}}|dk	r�|jd|j|j|f�q_|jd|j|jf�q_Wq#W|rAt|�dkrA|jd�|jd�|jd�x/|D]'}|jd	|j�|jd
�qW|jd�n|jd�dS)a9Writes a DOT output for the graph to the provided file *f*.

        If *skip_disconnected* is set to ``True``, then all distributions
        that are not dependent on any other distribution are skipped.

        :type f: has to support ``file``-like operations
        :type skip_disconnected: ``bool``
        zdigraph dependencies {
rNz"%s" -> "%s" [label="%s"]
z
"%s" -> "%s"
zsubgraph disconnected {
zlabel = "Disconnected"
zbgcolor = red
z"%s"r�z}
)r�r�itemsr�r&r)rr�Zskip_disconnectedZdisconnectedr'�adjsr�rr r r!�to_dot\s&	
	%



zDependencyGraph.to_dotcsg}i}x1|jj�D] \}}|dd�||<qWx�g�xGt|j��dd�D])\}}|sf�j|�||=qfqfW�s�Pnx7|j�D])\}}�fdd�|D�||<q�Wtjddd��D��|j��qCW|t|j��fS)aa
        Perform a topological sort of the graph.
        :return: A tuple, the first element of which is a topologically sorted
                 list of distributions, and the second element of which is a
                 list of distributions that cannot be sorted because they have
                 circular dependencies and so form a cycle.
        Ncs.g|]$\}}|�kr||f�qSr r )r�rprQ)�	to_remover r!r��s	z4DependencyGraph.topological_sort.<locals>.<listcomp>zMoving to result: %scSs&g|]}d|j|jf�qS)z%s (%s))rrZ)r�rpr r r!r��s	)rr�listr&rKrLr�keys)rr_�alist�krqr )r"r!�topological_sort|s$)
!	z DependencyGraph.topological_sortcCsIg}x3|jj�D]"\}}|j|j|��qWdj|�S)zRepresentation of the graphr�)rrr&rrI)rrr'r r r r!r��szDependencyGraph.__repr__)
r)r*r+r,r"rrrrrr!r'r�r r r r!rs

 rr-cCs�t|�}t�}i}xv|D]n}|j|�xX|jD]M}t|�\}}tjd|||�|j|g�j||f�q?Wq"Wx7|D]/}|j	|j
B|jB|jB}x|D]}	y|j
|	�}
WnAtk
r"tjd|	�|	j�d}|j
|�}
YnX|
j}d}||kr�xl||D]]\}}y|
j|�}
Wntk
r�d}
YnX|
rI|j|||	�d}PqIqIWn|s�|j||	�q�q�Wq�W|S)a6Makes a dependency graph from the given distributions.

    :parameter dists: a list of distributions
    :type dists: list of :class:`distutils2.database.InstalledDistribution` and
                 :class:`distutils2.database.EggInfoDistribution` instances
    :rtype: a :class:`DependencyGraph` instance
    zAdd to provided: %s, %s, %sz+could not read version %r - using name onlyrFT)rrrrcr
rKrLr$r&rr�r�r�rarr�r�r%rdrr)�distsr;�graphrer'rfrrZrr�ra�matchedZproviderrdr r r!�
make_graph�sD	

'


		
r+cCs�||kr"td|j��nt|�}|g}|j|}xW|r�|j�}|j|�x1|j|D]"}||krt|j|�qtqtWqGW|jd�|S)z�Recursively generate a list of distributions from *dists* that are
    dependent on *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    z1given distribution %r is not a member of the listr)rrr+r�popr&)r(r'r)�dep�todorp�succr r r!�get_dependent_dists�s	
	

r0cCs�||kr"td|j��nt|�}g}|j|}x[|r�|j�d}|j|�x1|j|D]"}||kru|j|�ququWqDW|S)z�Recursively generate a list of distributions from *dists* that are
    required by *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    z1given distribution %r is not a member of the listr)rrr+rr,r&)r(r'r)r�r.rp�predr r r!�get_required_dists�s
	
r2cKsI|jdd�}t|�}||_||_|p9d|_t|�S)zO
    A convenience method for making a dist given just a name and version.
    �summaryzPlaceholder for summaryzPlaeholder for summary)r,r	rrZr3r)rrZ�kwargsr3Zmdr r r!�	make_dists		r5)5r,�
__future__rr�r�r�r��loggingr�rHr.r�r9rr�compatrrZrrr=r	r
�utilrrr
rrrr�__all__�	getLoggerr)rKr�ZCOMMANDS_FILENAMEr�rGr�rrrrrrrMrNrr+r0r2r5r r r r!�<module>sL4	��7�C��6python3.4/site-packages/pip/_vendor/distlib/__pycache__/manifest.cpython-34.pyc000064400000025171151735047340023371 0ustar00�
�Re�4�@s�dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
dgZeje
�Zejdej�Zejd	ejejB�ZGd
d�de�ZdS)zu
Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.
�N�)�DistlibException)�fsdecode)�convert_path�Manifestz\\w*
z#.*?(?=
)|
(?=$)c@s�eZdZdZddd�Zdd�Zdd�Zd	d
�Zddd
�Zdd�Z	dd�Z
dd�Zddddd�Zddddd�Z
ddddd�Zdd�ZdS)rz~A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    NcCsYtjjtjj|p!tj���|_|jtj|_d|_t	�|_
dS)zd
        Initialise an instance.

        :param base: The base directory to explore under.
        N)�os�path�abspath�normpath�getcwd�base�sep�prefix�allfiles�set�files)�selfr�r�7/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/manifest.py�__init__#s-	zManifest.__init__cCs�ddlm}m}m}g|_}|j}|g}|j}|j}x�|r�|�}tj	|�}	x�|	D]{}
tj
j||
�}tj|�}|j}
||
�r�|jt
|��qu||
�ru||
�ru||�ququWqPWdS)zmFind all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        r)�S_ISREG�S_ISDIR�S_ISLNKN)�statrrrrr�pop�appendr�listdirr�join�st_moder)rrrrr�root�stackr�push�names�name�fullnamer�moderrr�findall2s"
						
	zManifest.findallcCsM|j|j�s-tjj|j|�}n|jjtjj|��dS)zz
        Add a file to the manifest.

        :param item: The pathname to add. This can be relative to the base.
        N)	�
startswithrrrrrr�addr
)r�itemrrrr(MszManifest.addcCs"x|D]}|j|�qWdS)z�
        Add a list of files to the manifest.

        :param items: The pathnames to add. These can be relative to the base.
        N)r()r�itemsr)rrr�add_manyWs
zManifest.add_manyFcs���fdd��t�j�}|rjt�}x'|D]}�|tjj|��q:W||O}ndd�tdd�|D��D�S)z8
        Return sorted files in directory order
        csj|j|�tjd|�|�jkrftjj|�\}}|dksVt��||�ndS)Nzadd_dir added %s��/)r,r-)r(�logger�debugrrr�split�AssertionError)�dirs�d�parent�_)�add_dirrrrr6es
z Manifest.sorted.<locals>.add_dircSs"g|]}tjj|��qSr)rrr)�.0Z
path_tuplerrr�
<listcomp>ss	z#Manifest.sorted.<locals>.<listcomp>css!|]}tjj|�VqdS)N)rrr0)r7rrrr�	<genexpr>tsz"Manifest.sorted.<locals>.<genexpr>)rrrr�dirname�sorted)rZwantdirs�resultr2�fr)r6rrr;`s	

	zManifest.sortedcCst�|_g|_dS)zClear all collected files.N)rrr)rrrr�clearvszManifest.clearcCsS|j|�\}}}}|dkrcx%|D].}|j|dd�s.tjd|�q.q.Wn�|dkr�x�|D].}|j|dd�svtjd|�qvqvWn�|dkr�x�|D].}|j|dd�s�tjd	|�q�q�Wn\|d
kr;xM|D].}|j|dd�stjd|�qqWn|dkr�x|D]1}|j|d
|�sNtjd||�qNqNWn�|dkr�x�|D]1}|j|d
|�s�tjd||�q�q�Wn~|dkr|jdd
|�sOtjd|�qOnG|dkr?|jdd
|�sOtjd|�qOntd|��dS)av
        Process a directive which either adds some files from ``allfiles`` to
        ``files``, or removes some files from ``files``.

        :param directive: The directive to process. This should be in a format
                     compatible with distutils ``MANIFEST.in`` files:

                     http://docs.python.org/distutils/sourcedist.html#commands
        �include�anchorTzno files found matching %r�excludez.no previously-included files found matching %rzglobal-includeFz3no files found matching %r anywhere in distributionzglobal-excludezGno previously-included files matching %r found anywhere in distributionzrecursive-includerz-no files found matching %r under directory %rzrecursive-excludezAno previously-included files matching %r found under directory %r�graftNz no directories found matching %r�prunez4no previously-included directories found matching %rzinvalid action %r)�_parse_directive�_include_patternr.�warning�_exclude_patternr)r�	directive�action�patterns�thedirZ
dirpattern�patternrrr�process_directive{sP

	
	
	
	
		
	
zManifest.process_directivec	Cso|j�}t|�dkrA|ddkrA|jdd�n|d}d}}}|dkr�t|�dkr�td
|��ndd�|dd�D�}n�|dkrt|�dkr�td|��nt|d�}dd�|dd�D�}nT|dkrOt|�dkr<td|��nt|d�}ntd|��||||fS)z�
        Validate a directive.
        :param directive: The directive to validate.
        :return: A tuple of action, patterns, thedir, dir_patterns
        rrr?rA�global-include�global-exclude�recursive-include�recursive-excluderBrCN�z$%r expects <pattern1> <pattern2> ...cSsg|]}t|��qSr)r)r7�wordrrrr8�s	z-Manifest._parse_directive.<locals>.<listcomp>�z*%r expects <dir> <pattern1> <pattern2> ...cSsg|]}t|��qSr)r)r7rSrrrr8�s	z!%r expects a single <dir_pattern>zunknown action %r)�include�excluderNrOrPrQ�graft�prune)rUrVrNrO)rPrQ)rWrX)r0�len�insertrr)rrH�wordsrIrJrKZdir_patternrrrrD�s:	
	  zManifest._parse_directiveTcCszd}|j||||�}|jdkr:|j�nx9|jD].}|j|�rD|jj|�d}qDqDW|S)a�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found.
        FNT)�_translate_patternrr&�searchrr()rrLr@r�is_regex�found�
pattern_rer#rrrrE�s

zManifest._include_patterncCsdd}|j||||�}x?t|j�D].}|j|�r.|jj|�d}q.q.W|S)atRemove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return True if files are
        found.

        This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
        packaging source distributions
        FT)r\�listrr]�remove)rrLr@rr^r_r`r=rrrrGs
zManifest._exclude_patternc
Cs|r)t|t�r"tj|�S|Sn|rA|j|�}nd}tjtjj|j	d��}|dk	r�|jd�}|j|�dt
|��}tj}	tjdkr�d}	nd||	j|d|f�}n|r�d||}ntj|�S)aTranslate a shell-like wildcard pattern to a compiled regular
        expression.

        Return the compiled regex.  If 'is_regex' true,
        then 'pattern' is directly compiled to a regex (if it's a string)
        or just returned as-is (assumes it's a regex object).
        r,N�\z\\�^z.*)�
isinstance�str�re�compile�_glob_to_re�escaperrrrrYr
)
rrLr@rr^r`rZ
empty_patternZ	prefix_rer
rrrr\3s&	
! 		zManifest._translate_patterncCsStj|�}tj}tjdkr0d}nd|}tjd||�}|S)z�Translate a shell-like glob pattern to a regular expression.

        Return a string containing the regex.  Differs from
        'fnmatch.translate()' in that '*' does not match "special characters"
        (which are platform-specific).
        rcz\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translaterr
rg�sub)rrLr`r
�escapedrrrriWs		
zManifest._glob_to_re)�__name__�
__module__�__qualname__�__doc__rr&r(r+r;r>rMrDrErGr\rirrrrrs 
	L/(#)rrrk�loggingrrgr,r�compatr�utilr�__all__�	getLoggerror.rh�MZ_COLLAPSE_PATTERN�SZ_COMMENTED_LINE�objectrrrrr�<module>
s	python3.4/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-34.pyc000064400000136251151735047340022542 0ustar00�
�Re��@s�ddlZddlmZddlZddlZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZyddlZWnek
rddlZYnXddlZddlmZddlmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/e
j0e1�Z2dZ3e
j4e3�Z5dZ6d	e6d
Z7e6dZ8dZ9d
e9de8de3d
e9de8dZ:dZ;de:de;de:dZ<e7d
e3e7dZ=de=dZ>de6de>de<dZ?e
j4e?�Z@de9de8d
ZAe
j4eA�ZBdd �ZCd!d"�ZDd#d$�ZEd%d&�ZFddd'd(�ZGd)d*�ZHd+d,�ZId-d.�ZJejKd/d0��ZLejKd1d2��ZMejKd3d4d5��ZNGd6d7�d7eO�ZPd8d9�ZQGd:d;�d;eO�ZRd<d=�ZSGd>d?�d?eO�ZTe
j4d@e
jU�ZVdAdB�ZWddCdD�ZXdEdF�ZYdGdH�ZZdIdJ�Z[dKdL�Z\dMdN�Z]e
j4dOe
j^�Z_e
j4dP�Z`ddQdR�Zae
j4dS�ZbdTdU�ZcdVdW�ZddXdY�ZedZd[�Zfd\d]�ZgGd^d_�d_eO�ZhGd`da�daeO�ZiGdbdc�dceO�Zjd�Zkddkdldm�Zldndo�Zmd�ZnGdvdw�dweO�Zoe
j4dx�Zpe
j4dy�Zqe
j4dz�Zrd{d|�Zd}d~�ZsGdd��d�e"jt�ZtGd�d��d�e'�Z&Gd�d��d�e&e%�Zuejvdd��Zwewd�krGd�d��d�e"jx�ZxGd�d��d�e"jy�ZynGd�d��d�e#jz�ZzGd�d��d�e#j{�Z{Gd�d��d�e#j|�Z|d�d��Z}Gd�d��d�eO�Z~Gd�d��d�e~�ZGd�d��d�e~�Z�Gd�d��d�e(�Z�Gd�d��d�eO�Z�dS)��N)�deque)�iglob�)�DistlibException)�string_types�	text_type�shutil�	raw_input�StringIO�cache_from_source�urlopen�httplib�	xmlrpclib�	splittype�HTTPHandler�HTTPSHandler�BaseConfigurator�valid_ident�	Container�configparser�URLError�match_hostname�CertificateError�ZipFilez\s*,\s*z
(\w|[.-])+z(\*|:(\*|\w+):|�)z\*?z([<>=!~]=)|[<>]�(z)?\s*(z)(z)\s*(z))*z(from\s+(?P<diref>.*))z\(\s*(?P<c1>�|z)\s*\)|(?P<c2>z\s*)z)*z\[\s*(?P<ex>z)?\s*\]z(?P<dn>z	\s*)?(\s*z)?$z(?P<op>z)\s*(?P<vn>c
s^dd��d}tj|�}|rZ|j�}|d}|dpN|d}|dsdd}nd}|dj�}|s�d}d}|d}nk|dd	kr�d
|}ntj|�}	�fdd�|	D�}d
|djdd�|D��f}|dsd}
ntj|d�}
t	d|d|d|
d|d|d|�}n|S)NcSs|j�}|d|dfS)N�op�vn)�	groupdict)�m�d�r"�3/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/util.py�get_constraintTsz)parse_requirement.<locals>.get_constraint�dn�c1�c2�diref�rz<>!=z~=csg|]}�|��qSr"r")�.0r )r$r"r#�
<listcomp>ls	z%parse_requirement.<locals>.<listcomp>z%s (%s)z, cSsg|]}d|�qS)z%s %sr")r*�conr"r"r#r+ms	�ex�name�constraints�extras�requirement�source�url)
�REQUIREMENT_RE�matchr�strip�RELOP_IDENT_RE�finditer�join�COMMA_RE�splitr)�s�resultr r!r.�consr3�constr�rs�iteratorr0r")r$r#�parse_requirementRs4

	

&
	rBcCs�dd�}i}x�|D]�\}}}tjj||�}x�t|�D]�}tjj||�}	x�t|	�D]v}
|||
�}|dkr�|j|d�qr|||
�}|jtjjd�jd�}
|
d|||<qrWqJWqW|S)z%Find destinations for resources filescSsb|jtjjd�}|jtjjd�}|j|�sEt�|t|�d�jd�S)N�/)�replace�os�path�sep�
startswith�AssertionError�len�lstrip)�baserFr"r"r#�get_rel_pathzsz)get_resources_dests.<locals>.get_rel_pathNrC)rErFr9r�poprDrG�rstrip)�resources_root�rulesrM�destinationsrL�suffix�dest�prefix�abs_base�abs_glob�abs_path�
resource_file�rel_path�rel_destr"r"r#�get_resources_destsws!r\cCs:ttd�rd}ntjttdtj�k}|S)N�real_prefixT�base_prefix)�hasattr�sysrU�getattr)r=r"r"r#�in_venv�s	rbcCs;tjdkr.dtjkr.tjd}n	tj}|S)N�darwin�__PYVENV_LAUNCHER__)r`�platformrE�environ�
executable)r=r"r"r#�get_executable�s
	rhcCs~|}xqt|�}|}|r1|r1|}n|r	|dj�}||krWPn|rvd|||f}qvq	q	W|S)Nrz	%c: %s
%s)r	�lower)�prompt�
allowed_chars�error_prompt�default�pr<�cr"r"r#�proceed�s
	rpcCsVt|t�r|j�}ni}x+|D]#}||kr+||||<q+q+W|S)N)�
isinstancerr;)r!�keysr=�keyr"r"r#�extract_by_key�s
rtc

Cs�tjddkr+tjd�|�}n|j�}t|�}y�tj|�}|d}xo|j�D]a\}}xR|j�D]D\}}d||f}t	|�}|dk	s�t
�|||<q�WqlW|SWn"tk
r�|jdd�YnXt
j�}	t|	d�r&|	j|�n
|	j|�i}xz|	j�D]l}
i||
<}xU|	j|
�D]D\}}d||f}t	|�}|dk	s�t
�|||<qjWqFW|S)Nr�zutf-8�exportsz%s = %s�	read_file)r`�version_info�codecs�	getreader�readr
�json�load�items�get_export_entryrI�	Exception�seekr�ConfigParserr_rw�readfp�sections)
�stream�datar=�group�entries�k�vr<�entry�cprsr.�valuer"r"r#�read_exports�s:


r�cCs�tjddkr+tjd�|�}ntj�}x�|j�D]�\}}|j|�x�|j�D]u}|j	dkr�|j
}nd|j
|j	f}|jr�d|dj|j�f}n|j
||j|�qjWqDW|j|�dS)Nrruzutf-8z%s:%sz%s [%s]z, )r`rxry�	getwriterrr�r~�add_section�valuesrSrU�flagsr9�setr.�write)rvr�r�r�r�r�r<r"r"r#�
write_exports�s
	r�ccs*tj�}z	|VWdtj|�XdS)N)�tempfile�mkdtempr�rmtree)�tdr"r"r#�tempdir�s	r�ccs7tj�}ztj|�dVWdtj|�XdS)N)rE�getcwd�chdir)r!�cwdr"r"r#r��s

	r��ccs7tj�}ztj|�dVWdtj|�XdS)N)�socket�getdefaulttimeout�setdefaulttimeout)�seconds�ctor"r"r#�socket_timeouts

	r�c@s+eZdZdd�Zddd�ZdS)�cached_propertycCs
||_dS)N)�func)�selfr�r"r"r#�__init__szcached_property.__init__NcCs<|dkr|S|j|�}tj||jj|�|S)N)r��object�__setattr__�__name__)r��obj�clsr�r"r"r#�__get__s
zcached_property.__get__)r��
__module__�__qualname__r�r�r"r"r"r#r�sr�cCs�tjdkr|S|s|S|ddkr@td|��n|ddkrctd|��n|jd�}x#tj|kr�|jtj�quW|s�tjStjj|�S)a�Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rCrzpath '%s' cannot be absoluterzpath '%s' cannot end with '/'���)rErG�
ValueErrorr;�curdir�removerFr9)�pathname�pathsr"r"r#�convert_paths
r�c@s�eZdZddd�Zdd�Zdd�Zdd	�Zd
dd�Zd
dd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
ddd
dd�Zdd�Zdd�Zd d!�Zd"d#�Zd
S)$�FileOperatorFcCs#||_t�|_|j�dS)N)�dry_runr��ensured�_init_record)r�r�r"r"r#r�;s	zFileOperator.__init__cCs%d|_t�|_t�|_dS)NF)�recordr��
files_written�dirs_created)r�r"r"r#r�@s	zFileOperator._init_recordcCs |jr|jj|�ndS)N)r�r��add)r�rFr"r"r#�record_as_writtenEs	zFileOperator.record_as_writtencCsitjj|�s1tdtjj|���ntjj|�sGdStj|�jtj|�jkS)a�Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        zfile '%r' does not existT)rErF�existsr�abspath�stat�st_mtime)r�r2�targetr"r"r#�newerIszFileOperator.newerTcCs�|jtjj|��tjd||�|js�d}|r�tjj|�r`d|}q�tjj|�r�tjj	|�r�d|}q�n|r�t
|d��ntj||�n|j
|�dS)z8Copy a file respecting dry-run and force flags.
        zCopying %s to %sNz%s is a symlinkz%s is a non-regular filez which would be overwritten)�
ensure_dirrErF�dirname�logger�infor��islinkr��isfiler�r�copyfiler�)r��infile�outfile�check�msgr"r"r#�	copy_file]s	
%zFileOperator.copy_fileNc
Cs�tjj|�st�|jtjj|��tjd||�|js�|dkrlt	|d�}nt
j	|dd|�}ztj||�Wd|j
�Xn|j|�dS)NzCopying stream %s to %s�wb�w�encoding)rErF�isdirrIr�r�r�r�r��openryr�copyfileobj�closer�)r��instreamr�r��	outstreamr"r"r#�copy_streamns	zFileOperator.copy_streamc	Cs[|jtjj|��|jsJt|d��}|j|�WdQXn|j|�dS)Nr�)r�rErFr�r�r�r�r�)r�rFr��fr"r"r#�write_binary_file}s
	zFileOperator.write_binary_filec
Csd|jtjj|��|jsSt|d��}|j|j|��WdQXn|j|�dS)Nr�)	r�rErFr�r�r�r��encoder�)r�rFr�r�r�r"r"r#�write_text_file�s
	zFileOperator.write_text_filecCs�tjdkr|xj|D]_}|jr8tjd|�qtj|�j|B|@}tjd||�tj||�qWndS)N�posixzchanging mode of %szchanging mode of %s to %o)rEr.r�r�r�r��st_mode�chmod)r��bits�mask�filesr��moder"r"r#�set_mode�s
	zFileOperator.set_modecCs|jdd|�S)Nimi�)r�)r<r�r"r"r#�<lambda>�szFileOperator.<lambda>cCs�tjj|�}||jkr�tjj|�r�|jj|�tjj|�\}}|j|�tj	d|�|j
s�tj|�n|jr�|j
j|�q�ndS)NzCreating %s)rErFr�r�r�r�r;r�r�r�r��mkdirr�r�)r�rFr!r�r"r"r#r��s"
		zFileOperator.ensure_dircCs�t||�}tjd||�|js�|sD|j||�r�|sSd}q�|j|�sht�|t|�d�}ntj	|||d�n|j
|�|S)NzByte-compiling %s to %sT)rr�r�r�r�rHrIrJ�
py_compile�compiler�)r�rF�optimize�forcerU�dpath�diagpathr"r"r#�byte_compile�s		
zFileOperator.byte_compilecCstjj|�rtjj|�r�tjj|�r�tjd|�|js`tj	|�n|j
r||jkr�|jj|�q�qqtjj|�r�d}nd}tjd||�|js�tj|�n|j
r||j
kr|j
j|�qqndS)NzRemoving directory tree at %s�link�filezRemoving %s %s)rErFr�r�r�r��debugr�rr�r�r�r�r�)r�rFr<r"r"r#�ensure_removed�s"%					zFileOperator.ensure_removedcCsjd}x]|setjj|�r:tj|tj�}Pntjj|�}||kr\Pn|}q	W|S)NF)rErFr��access�W_OKr�)r�rFr=�parentr"r"r#�is_writable�s	
zFileOperator.is_writablecCs/|jst�|j|jf}|j�|S)zV
        Commit recorded changes, turn off recording, return
        changes.
        )r�rIr�r�r�)r�r=r"r"r#�commit�s
zFileOperator.commitcCs�|js�x9t|j�D](}tjj|�rtj|�qqWt|jdd�}xq|D]f}tj	|�}|r�|dgks�t
�tjj||d�}tj|�ntj|�qaWn|j
�dS)N�reverseT�__pycache__r)r��listr�rErFr�r��sortedr��listdirrIr9�rmdirr�)r�r��dirsr!�flist�sdr"r"r#�rollback�s	
zFileOperator.rollback)r�r�r�r�r�r�r�r�r�r�r�r��set_executable_moder�r�r�r�r�rr"r"r"r#r�:s 
r�cCs�|tjkrtj|}nt|�}|dkr@|}nG|jd�}t||jd��}x|D]}t||�}qnW|S)N�.r)r`�modules�
__import__r;rarN)�module_name�dotted_path�modr=�partsrnr"r"r#�resolve�s	
r
c@sOeZdZdd�Zedd��Zdd�Zdd�Zej	Z	d	S)
�ExportEntrycCs(||_||_||_||_dS)N)r.rUrSr�)r�r.rUrSr�r"r"r#r�s			zExportEntry.__init__cCst|j|j�S)N)r
rUrS)r�r"r"r#r�szExportEntry.valuecCs d|j|j|j|jfS)Nz<ExportEntry %s = %s:%s %s>)r.rUrSr�)r�r"r"r#�__repr__
szExportEntry.__repr__cCsdt|t�sd}nH|j|jko]|j|jko]|j|jko]|j|jk}|S)NF)rqrr.rUrSr�)r��otherr=r"r"r#�__eq__s	zExportEntry.__eq__N)
r�r�r�r�r�r�rrr��__hash__r"r"r"r#r�s

rz�(?P<name>(\w|[-.])+)
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>\w+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      c
CsGtj|�}|sId}d|ks3d|krCtd|��qCn�|j�}|d}|d}|jd�}|dkr�|d}}n4|dkr�td|��n|jd�\}}|d	}	|	dkrd|ks�d|kr	td|��ng}	nd
d�|	jd�D�}	t||||	�}|S)
N�[�]zInvalid specification %rr.�callable�:rrr�cSsg|]}|j��qSr")r6)r*r�r"r"r#r+;s	z$get_export_entry.<locals>.<listcomp>�,)�ENTRY_RE�searchrr�countr;r)
�
specificationr r=r!r.rF�colonsrUrSr�r"r"r#r!s2




	rcCs|dkrd}ntjdkrHdtjkrHtjjd�}ntjjd�}tjj|�r�tj|tj�}|s�t	j
d|�q�nHytj|�d}Wn.tk
r�t	j
d	|d
d�d}YnX|s
t
j�}t	j
d|�ntjj||�S)
a�
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    Nz.distlib�nt�LOCALAPPDATAz
$localappdata�~z(Directory exists but is not writable: %sTzUnable to create %s�exc_infoFz#Default location unusable, using %s)rEr.rfrF�
expandvars�
expanduserr�r�r�r��warning�makedirs�OSErrorr�r�r9)rSr=�usabler"r"r#�get_cache_base@s&	


r'cCs`tjjtjj|��\}}|r?|jdd�}n|jtjd�}||dS)a
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    rz---z--z.cache)rErF�
splitdriver�rDrG)rFr!rnr"r"r#�path_to_cache_diris

$r)cCs|jd�s|dS|S)NrC)�endswith)r<r"r"r#�ensure_slashzsr+cCskd}}d|kr^|jdd�\}}d|krC|}q^|jdd�\}}n|||fS)N�@rr)r;)�netloc�username�passwordrUr"r"r#�parse_credentials�s
	r0cCs tjd�}tj|�|S)N�)rE�umask)r=r"r"r#�get_process_umask�s
r3cCsXd}d}x3t|�D]%\}}t|t�sd}PqqW|dk	sTt�|S)NTF)�	enumeraterqrrI)�seqr=�ir<r"r"r#�is_string_sequence�sr7z3([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-([a-z0-9_.+-]+)z
-py(\d\.?\d?)cCsd}d}tj|�}|rI|jd�}|d|j��}n|r�t|�t|�dkr�tjtj|�d|�}|r�|j�}|d|�||dd�|f}q�n|dkrt	j|�}|r|jd�|jd�|f}qn|S)zw
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    Nrz\bru)
�PYTHON_VERSIONrr��startrJ�rer5�escape�end�PROJECT_NAME_AND_VERSION)�filename�project_namer=�pyverr �nr"r"r#�split_filename�s "-'rBz-(?P<name>[\w .-]+)\s*\(\s*(?P<ver>[^\s)]+)\)$cCsRtj|�}|s(td|��n|j�}|dj�j�|dfS)z�
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    z$Ill-formed name/version string: '%s'r.�ver)�NAME_VERSION_REr5rrr6ri)rnr r!r"r"r#�parse_name_and_version�s
	rEcCst�}t|pg�}t|p'g�}d|krS|jd�||O}nx�|D]�}|dkr||j|�qZ|jd�r�|dd�}||kr�tjd|�n||kr|j|�qqZ||kr�tjd|�n|j|�qZW|S)N�*�-rzundeclared extra: %s)r�r�r�rHr�r#)�	requested�	availabler=�r�unwantedr"r"r#�
get_extras�s&	


rLcCs�i}yet|�}|j�}|jd�dkrFtjd�n$tjd�|�}tj|�}Wn8t	k
r�}ztj
d||�WYdd}~XnX|S)NzContent-Typezapplication/jsonz$Unexpected response for JSON requestzutf-8z&Failed to get external data for %s: %s)rr��getr�r�ryrzr|r}r��	exception)r3r=�resp�headers�reader�er"r"r#�_get_external_data�s&rScCs*d|dj�|f}t|�}|S)Nz9https://www.red-dove.com/pypi/projects/%s/%s/project.jsonr)�upperrS)r.r3r=r"r"r#�get_project_data�srUcCs'd|dj�||f}t|�S)Nz<https://www.red-dove.com/pypi/projects/%s/%s/package-%s.jsonr)rTrS)r.�versionr3r"r"r#�get_package_data�srWc@s:eZdZdZdd�Zdd�Zdd�ZdS)	�Cachez�
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    cCsvtjj|�s"tj|�ntj|�jd@dkrQtjd|�ntjjtjj	|��|_
dS)zu
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        �?rzDirectory '%s' is not privateN)rErFr�r$r�r�r�r#r��normpathrL)r�rLr"r"r#r�	s
zCache.__init__cCs
t|�S)zN
        Converts a resource prefix to a directory name in the cache.
        )r))r�rUr"r"r#�
prefix_to_dirszCache.prefix_to_dircCs�g}x�tj|j�D]�}tjj|j|�}yZtjj|�s^tjj|�rntj|�n"tjj|�r�t	j
|�nWqtk
r�|j|�YqXqW|S)z"
        Clear the cache.
        )
rEr�rLrFr9r�r�r�r�rr�r��append)r��not_removed�fnr"r"r#�clears$
zCache.clearN)r�r�r��__doc__r�r[r_r"r"r"r#rXsrXc@sUeZdZdZdd�Zddd�Zdd�Zd	d
�Zdd�Zd
S)�
EventMixinz1
    A very simple publish/subscribe system.
    cCs
i|_dS)N)�_subscribers)r�r"r"r#r�2szEventMixin.__init__TcCs\|j}||kr+t|g�||<n-||}|rK|j|�n
|j|�dS)a`
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        N)rbrr\�
appendleft)r��event�
subscriberr\�subs�sqr"r"r#r�5s
	
zEventMixin.addcCs=|j}||kr(td|��n||j|�dS)z�
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        zNo subscribers: %rN)rbr�r�)r�rdrerfr"r"r#r�Is	zEventMixin.removecCst|jj|f��S)z�
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        )�iterrbrM)r�rdr"r"r#�get_subscribersUszEventMixin.get_subscriberscOs�g}xb|j|�D]Q}y||||�}Wn%tk
rYtjd�d}YnX|j|�qWtjd||||�|S)a^
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        z"Exception during event publicationNz/publish %s: args = %s, kwargs = %s, result = %s)rir�r�rNr\r�)r�rd�args�kwargsr=rer�r"r"r#�publish\s

	zEventMixin.publishN)	r�r�r�r`r�r�r�rirlr"r"r"r#ra.srac@s�eZdZdd�Zdd�Zddd�Zdd	�Zd
d�Zdd
�Zdd�Z	e
dd��Ze
dd��ZdS)�	SequencercCs"i|_i|_t�|_dS)N)�_preds�_succsr��_nodes)r�r"r"r#r�ws		zSequencer.__init__cCs|jj|�dS)N)rpr�)r��noder"r"r#�add_node|szSequencer.add_nodeFcCs
||jkr"|jj|�n|r	x3t|jj|f��D]}|j||�qDWx3t|jj|f��D]}|j||�qzWx6t|jj��D]\}}|s�|j|=q�q�Wx9t|jj��D]\}}|s�|j|=q�q�WndS)N)rpr�r�rnrMror�r~)r�rq�edgesrnr<r�r�r"r"r#�remove_nodes""""zSequencer.remove_nodecCsT||kst�|jj|t��j|�|jj|t��j|�dS)N)rIrn�
setdefaultr�r�ro)r��pred�succr"r"r#r��sz
Sequencer.addcCs�||kst�y|j|}|j|}Wn"tk
rTtd|��YnXy|j|�|j|�Wn(tk
r�td||f��YnXdS)Nz%r not a successor of anythingz%r not a successor of %r)rIrnro�KeyErrorr�r�)r�rvrw�preds�succsr"r"r#r��s



zSequencer.removecCs+||jkp*||jkp*||jkS)N)rnrorp)r��stepr"r"r#�is_step�szSequencer.is_stepcCs�|j|�s"td|��ng}g}t�}|j|�x�|r�|jd�}||kr�||kr�|j|�|j|�q�qG|j|�|j|�|jj|f�}|j	|�qGWt
|�S)NzUnknown: %rr)r|r�r�r\rNr�r�rnrM�extend�reversed)r��finalr=�todo�seenr{ryr"r"r#�	get_steps�s"	
	


zSequencer.get_stepscs|dg�g�i�i�g�|j��������fdd��x'�D]}|�krU�|�qUqUW�S)Nrc
s9�d�|<�d�|<�dd7<�j|�y�|}Wntk
r_g}YnXxl|D]d}|�kr��|�t�|�|��|<qg|�krgt�|�|��|<qgqgW�|�|kr5g}x-�j�}|j|�||kr�Pq�q�Wt|�}�j|�ndS)Nrr)r\r��minrN�tuple)rq�
successors�	successor�connected_component�	component)�graph�index�
index_counter�lowlinksr=�stack�
strongconnectr"r#r��s.



"
z3Sequencer.strong_connections.<locals>.strongconnect)ro)r�rqr")r�r�r�r�r=r�r�r#�strong_connections�s		$"
zSequencer.strong_connectionscCs�dg}xF|jD];}|j|}x%|D]}|jd||f�q-WqWx"|jD]}|jd|�q\W|jd�dj|�S)Nzdigraph G {z  %s -> %s;z  %s;�}�
)rnr\rpr9)r�r=rwryrvrqr"r"r#�dot�s	


z
Sequencer.dotN)
r�r�r�r�rrrtr�r�r|r��propertyr�r�r"r"r"r#rmvs
3rm�.tar.gz�.tar.bz2�.tar�.zip�.tgz�.tbz�.whlTc

s���fdd�}tjj���t���d}|dkr�|jd�r]d}q�|jd�r{d}d	}q�|jd�r�d}d
}q�|jd�r�d}d}q�td|��nz|dkrt|d�}|r]|j�}x|D]}||�qWq]nBtj	||�}|r]|j
�}x|D]}||�qFWn|dkr�tjddkr�xA|j
�D]0}	t|	jt�s�|	jjd�|	_q�q�Wn|j��Wd|r�|j�nXdS)Ncs|t|t�s!|jd�}ntjjtjj�|��}|j��se|�tjkrxt	d|��ndS)Nzutf-8zpath outside destination: %r)
rqr�decoderErFr�r9rHrGr�)rFrn)�dest_dir�plenr"r#�
check_paths
!#zunarchive.<locals>.check_path�.zip�.whl�zip�.tar.gz�.tgz�tgzzr:gz�.tar.bz2�.tbz�tbzzr:bz2z.tar�tarrJzUnknown format for %rrruzutf-8)r�r�)r�r�)r�r�)rErFr�rJr*r�r�namelist�tarfiler��getnamesr`rx�
getmembersrqr.rr��
extractallr�)
�archive_filenamer��formatr�r��archiver��namesr.�tarinfor")r�r�r#�	unarchivesH				

r�cCs�tj�}t|�}t|d���}x{tj|�D]j\}}}xX|D]P}tjj||�}||d�}	tjj|	|�}
|j||
�qPWq:WWdQX|S)z*zip a directory tree into a BytesIO objectr�N)	�io�BytesIOrJrrE�walkrFr9r�)�	directoryr=�dlen�zf�rootrr�r.�full�relrTr"r"r#�zip_dir:s
r�r)�K�M�G�T�Pc@s�eZdZdZdddd�Zdd�Zdd	�Zd
d�Zdd
�Ze	dd��Z
e	dd��Zdd�Ze	dd��Z
e	dd��ZdS)�Progress�UNKNOWNr�dcCsV|dks||kst�||_|_||_d|_d|_d|_dS)NrF)rIr��cur�max�started�elapsed�done)r��minval�maxvalr"r"r#r�Qs			zProgress.__init__cCs}|j|kst�|jdks9||jks9t�||_tj�}|jdkri||_n||j|_dS)N)r�rIr�r��timer�r�)r��curval�nowr"r"r#�updateYs$	zProgress.updatecCs*|dkst�|j|j|�dS)Nr)rIr�r�)r��incrr"r"r#�	incrementcszProgress.incrementcCs|j|j�|S)N)r�r�)r�r"r"r#r9gszProgress.startcCs/|jdk	r"|j|j�nd|_dS)NT)r�r�r�)r�r"r"r#�stopksz
Progress.stopcCs|jdkr|jS|jS)N)r��unknown)r�r"r"r#�maximumpszProgress.maximumcCsZ|jrd}nD|jdkr*d}n,d|j|j|j|j}d|}|S)Nz100 %z ?? %gY@z%3d %%)r�r�r�r�)r�r=r�r"r"r#�
percentagets			"
zProgress.percentagecCsU|dkr|jdks-|j|jkr6d}ntjdtj|��}|S)Nrz??:??:??z%H:%M:%S)r�r�r�r��strftime�gmtime)r��durationr=r"r"r#�format_durations-	zProgress.format_durationcCs�|jrd}|j}n�d}|jdkr9d}ne|jdksZ|j|jkrcd}n;t|j|j�}||j|j}|d|j}d||j|�fS)N�DonezETA rrz%s: %sr�)r�r�r�r�r��floatr�)r�rU�tr"r"r#�ETA�s		!	zProgress.ETAcCsh|jdkrd}n|j|j|j}x(tD] }|dkrLPn|d}q6Wd||fS)Nrgi�g@�@z%d %sB/s)r�r�r��UNITS)r�r=�unitr"r"r#�speed�s	
zProgress.speedN)r�r�r�r�r�r�r�r9r�r�r�r�r�r�r�r"r"r"r#r�Ns
	r�z\{([^}]*)\}z[^/\\,{]\*\*|\*\*[^/\\,}]z^[^{]*\}|\{[^}]*$cCsZtj|�r(d}t||��ntj|�rPd}t||��nt|�S)zAExtended globbing function that supports ** and {opt1,opt2,opt3}.z7invalid glob %r: recursive glob "**" must be used alonez2invalid glob %r: mismatching set marker '{' or '}')�_CHECK_RECURSIVE_GLOBrr��_CHECK_MISMATCH_SET�_iglob)�	path_globr�r"r"r#r�srccs�tj|d�}t|�dkr�t|�dksBt|��|\}}}x3|jd�D]4}x+tdj|||f��D]}|Vq�WqaWn�d|kr�x�t|�D]}|Vq�Wn�|jdd�\}}|dkr�d}n|dkr	d}n|jd�}|jd	�}x]tj	|�D]L\}}}	tj
j|�}x(ttj
j||��D]}
|
VqtWq7WdS)
Nrrurr)z**rrFrC�\)�	RICH_GLOBr;rJrIr�r9�	std_iglobrKrEr�rFrZ)r��rich_path_globrUr�rS�itemrF�radical�dirr�r^r"r"r#r��s*%		"r�c@s(eZdZdZdZdd�ZdS)�HTTPSConnectionNTcCs�tj|j|jf|j�}t|dd�rI||_|j�ntt	d�s�|j
rmt	j}n	t	j}t	j
||j|jd|dt	jd|j
�|_n�t	jt	j�}|jt	jO_|jr�|j|j|j�ni}|j
rHt	j|_|jd|j
�tt	dd�rH|j|d	<qHn|j
||�|_|j
r�|jr�y0t|jj�|j�tjd
|j�Wq�tk
r�|jjtj�|jj��Yq�XndS)N�_tunnel_hostF�
SSLContext�	cert_reqs�ssl_version�ca_certs�cafile�HAS_SNI�server_hostnamezHost verified: %s) r��create_connection�host�port�timeoutra�sock�_tunnelr_�sslr��
CERT_REQUIRED�	CERT_NONE�wrap_socket�key_file�	cert_file�PROTOCOL_SSLv23r��options�OP_NO_SSLv2�load_cert_chain�verify_mode�load_verify_locations�check_domainr�getpeercertr�r�r�shutdown�	SHUT_RDWRr�)r�r�r��contextrkr"r"r#�connect�s>!	
					

zHTTPSConnection.connect)r�r�r�r�rr
r"r"r"r#r��sr�c@s7eZdZddd�Zdd�Zdd�ZdS)	rTcCs#tj|�||_||_dS)N)�BaseHTTPSHandlerr�r�r)r�r�rr"r"r#r�s
	zHTTPSHandler.__init__cOs7t||�}|jr3|j|_|j|_n|S)a�
        This is called to create a connection instance. Normally you'd
        pass a connection class to do_open, but it doesn't actually check for
        a class, and just expects a callable. As long as we behave just as a
        constructor would have, we should be OK. If it ever changes so that
        we *must* pass a class, we'll create an UnsafeHTTPSConnection class
        which just sets check_domain to False in the class definition, and
        choose which one to pass to do_open.
        )r�r�r)r�rjrkr=r"r"r#�_conn_makers

	zHTTPSHandler._conn_makercCsqy|j|j|�SWnStk
rl}z3dt|j�krWtd|j��n�WYdd}~XnXdS)Nzcertificate verify failedz*Unable to verify server certificate for %s)�do_openrr�str�reasonrr�)r��reqrRr"r"r#�
https_openszHTTPSHandler.https_openN)r�r�r�r�rrr"r"r"r#rsrc@seZdZdd�ZdS)�HTTPSOnlyHandlercCstd|��dS)NzAUnexpected HTTP request on what should be a secure connection: %s)r)r�rr"r"r#�	http_open0szHTTPSOnlyHandler.http_openN)r�r�r�rr"r"r"r#r/sr��c@s"eZdZdddd�ZdS)�HTTPr)NcKs5|dkrd}n|j|j|||��dS)Nr)�_setup�_connection_class)r�r�r�rkr"r"r#r�<s	z
HTTP.__init__)r�r�r�r�r"r"r"r#r;src@s"eZdZdddd�ZdS)�HTTPSr)NcKs5|dkrd}n|j|j|||��dS)Nr)rr)r�r�r�rkr"r"r#r�Cs	zHTTPS.__init__)r�r�r�r�r"r"r"r#rBsrc@s+eZdZddd�Zdd�ZdS)�	TransportrcCs ||_tjj||�dS)N)r�rrr�)r�r��use_datetimer"r"r#r�Js	zTransport.__init__cCs�|j|�\}}}tdkr<t|d|j�}nN|jsY||jdkr}||_|tj|�f|_n|jd}|S)Nrrr�rr)rr)�
get_host_info�	_ver_inforr��_connection�_extra_headersr
�HTTPConnection)r�r��h�eh�x509r=r"r"r#�make_connectionNs	
zTransport.make_connectionN)r�r�r�r�r'r"r"r"r#rIsrc@s+eZdZddd�Zdd�ZdS)�
SafeTransportrcCs ||_tjj||�dS)N)r�rr(r�)r�r�rr"r"r#r�Zs	zSafeTransport.__init__cCs�|j|�\}}}|s'i}n|j|d<tdkrUt|d|�}nT|jsr||jdkr�||_|tj|d|�f|_n|jd}|S)Nr�rrrr)rr)rr�r rr!r"r
r�)r�r�r$r%rkr=r"r"r#r'^s	
	
zSafeTransport.make_connectionN)r�r�r�r�r'r"r"r"r#r(Ysr(c@seZdZdd�ZdS)�ServerProxyc	Ks�|jdd�|_}|dk	r�t|�\}}|jdd�}|dkr^t}nt}||d|�|d<}||_ntjj	|||�dS)Nr�rr�https�	transport)
rNr�rrMr(rr+rr)r�)	r��urirkr��scheme�_r�tclsr�r"r"r#r�os	zServerProxy.__init__N)r�r�r�r�r"r"r"r#r)nsr)cKs:tjddkr |d7}n
d|d<t|||�S)Nrru�br)�newline)r`rxr�)r^r�rkr"r"r#�	_csv_open�s

r2c@sUeZdZied�d6ed�d6ed�d6Zdd�Zd	d
�ZdS)�CSVBaser�	delimiter�"�	quotecharr��lineterminatorcCs|S)Nr")r�r"r"r#�	__enter__�szCSVBase.__enter__cGs|jj�dS)N)r�r�)r�r r"r"r#�__exit__�szCSVBase.__exit__N)r�r�r�r�defaultsr8r9r"r"r"r#r3�s

r3c@s:eZdZdd�Zdd�Zdd�ZeZdS)�	CSVReadercKs�d|krM|d}tjddkrAtjd�|�}n||_nt|dd�|_tj|j|j�|_dS)Nr�rruzutf-8rFrJ)	r`rxryrzr�r2�csvrQr:)r�rkr�r"r"r#r��s
zCSVReader.__init__cCs|S)Nr")r�r"r"r#�__iter__�szCSVReader.__iter__cCskt|j�}tjddkrgxBt|�D]1\}}t|t�s/|jd�||<q/q/Wn|S)Nrruzutf-8)�nextrQr`rxr4rqrr�)r�r=r6r�r"r"r#r>�szCSVReader.nextN)r�r�r�r�r=r>�__next__r"r"r"r#r;�sr;c@s(eZdZdd�Zdd�ZdS)�	CSVWritercKs1t|d�|_tj|j|j�|_dS)Nr�)r2r�r<�writerr:)r�r^rkr"r"r#r��szCSVWriter.__init__cCsutjddkrag}x<|D]4}t|t�rG|jd�}n|j|�q W|}n|jj|�dS)Nrruzutf-8)r`rxrqrr�r\rA�writerow)r��rowrJr�r"r"r#rB�s
	zCSVWriter.writerowN)r�r�r�r�rBr"r"r"r#r@�sr@csbeZdZeej�Zded<d�fdd�Zdd�Zdd	�Zd
d�Z	�S)�Configurator�inc_convert�incNcs/tt|�j|�|p%tj�|_dS)N)�superrDr�rEr�rL)r��configrL)�	__class__r"r#r��szConfigurator.__init__c
s��fdd���jd�}t|�sB�j|�}n�jdd�}�jdf�}|r�t�fdd�|D��}n��fdd��D�}t|�}|||�}|rx3|j�D]"\}}	t||�|	��q�Wn|S)	Ncs�t|ttf�r=t|��fdd�|D��}njt|t�r�d|krj�j|�}q�i}x4|D]}�||�||<qwWn�j|�}|S)Ncsg|]}�|��qSr"r")r*r6)�convertr"r#r+�s	zBConfigurator.configure_custom.<locals>.convert.<locals>.<listcomp>z())rqr�r��type�dict�configure_customrJ)�or=r�)rJr�r"r#rJ�s(
z.Configurator.configure_custom.<locals>.convertz()rz[]csg|]}�|��qSr"r")r*rN)rJr"r#r+�s	z1Configurator.configure_custom.<locals>.<listcomp>cs2g|](}t|�r|��|�f�qSr")r)r*r�)rHrJr"r#r+�s	)rNrr
r�rLr~�setattr)
r�rHro�propsrjr~rkr=rAr�r")rHrJr�r#rM�s"zConfigurator.configure_customcCsI|j|}t|t�rEd|krE|j|�|j|<}n|S)Nz())rHrqrLrM)r�rsr=r"r"r#�__getitem__�s
zConfigurator.__getitem__c	Csatjj|�s-tjj|j|�}ntj|ddd��}tj|�}WdQX|S)z*Default converter for the inc:// protocol.rJr�zutf-8N)	rErF�isabsr9rLryr�r|r})r�r�r�r=r"r"r#rE�s
zConfigurator.inc_convert)
r�r�r�rLr�value_convertersr�rMrQrEr"r")rIr#rD�s
rDc@s:eZdZdddd�Zdd�Zdd�ZdS)	�SubprocessMixinFNcCs||_||_dS)N)�verbose�progress)r�rUrVr"r"r#r�s	zSubprocessMixin.__init__cCs�|j}|j}xu|j�}|s+Pn|dk	rG|||�q|s`tjjd�ntjj|jd��tjj�qW|j�dS)z�
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        Nrzutf-8)	rVrU�readliner`�stderrr�r��flushr�)r�r�rrVrUr<r"r"r#rQs		zSubprocessMixin.readercKs�tj|dtjdtj|�}tjd|jd|jdf�}|j�tjd|jd|jdf�}|j�|j	�|j
�|j
�|jdk	r�|jdd�n|jr�t
jjd�n|S)N�stdoutrXr�rjzdone.�mainzdone.
)�
subprocess�Popen�PIPE�	threading�ThreadrQrZr9rX�waitr9rVrUr`r�)r��cmdrkrn�t1�t2r"r"r#�run_commands$
$



	zSubprocessMixin.run_command)r�r�r�r�rQrer"r"r"r#rT�srT)r�r�r�r�r�r�r�)r)r�r�r�r�r�)rr)�ry�collectionsr�
contextlibr<�globrr�r�r|�loggingrEr�r:rr�r�r\r`r�r�r_�ImportError�dummy_threadingr�r)r�compatrrr	r
rrr
rrrrrrrrrrrrr�	getLoggerr�r��COMMAr�r:�IDENT�EXTRA_IDENT�VERSPEC�RELOP�BARE_CONSTRAINTS�
DIRECT_REF�CONSTRAINTS�
EXTRA_LIST�EXTRAS�REQUIREMENTr4�RELOP_IDENTr7rBr\rbrhrprtr�r��contextmanagerr�r�r�r�r�r�r�r
r�VERBOSErrr'r)r+r0r3r7�Ir=r8rBrDrErLrSrUrWrXrarm�ARCHIVE_EXTENSIONSr�r�r�r�r�r�r�r�r�rrxr rrrr(r)r2r3r;r@rDrTr"r"r"r#�<module>s�
�
.%
		$
	�)
	,H�6]!*)	:python3.4/site-packages/pip/_vendor/distlib/__pycache__/version.cpython-34.pyc000064400000054302151735047350023247 0ustar00�
�Re�Y�@s�dZddlZddlZddlmZddddd	d
ddgZeje�ZGd
d�de	�Z
Gdd�de�ZGdd�de�Z
ejd�Zdd�ZeZGdd�de�Zdd�ZGdd�de
�Zejd�dfejd�dfejd�dfejd�dfejd �d!fejd"�d!fejd#�d$fejd%�d&fejd'�d(fejd)�d*ff
Zejd+�dfejd,�dfejd-�d$fejd#�d$fejd.�dffZejd/�Zd0d1�Zd2d3�Zejd4ej�Zid5d66d5d76d8d96d5d:6d;d<6dd6dd$6Zd=d>�ZGd?d�de�ZGd@d�de
�ZejdAej�Z dBdC�Z!dDdE�Z"GdFd	�d	e�Z#GdGd
�d
e
�Z$GdHdI�dIe�Z%ie%eee�dJ6e%eedKdL��dM6e%e"e$e�dN6Z&e&dJe&dO<dPd�Z'dS)Qz~
Implementation of a flexible versioning scheme providing support for PEP-386,
distribute-compatible and semantic versioning.
�N�)�string_types�NormalizedVersion�NormalizedMatcher�
LegacyVersion�
LegacyMatcher�SemanticVersion�SemanticMatcher�UnsupportedVersionError�
get_schemec@seZdZdZdS)r
zThis is an unsupported version.N)�__name__�
__module__�__qualname__�__doc__�rr�6/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/version.pyr
sc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zedd��ZdS)�VersioncCsZ|j�|_}|j|�|_}t|t�s>t�t|�dksVt�dS)Nr)�strip�_string�parse�_parts�
isinstance�tuple�AssertionError�len)�self�s�partsrrr�__init__szVersion.__init__cCstd��dS)Nzplease implement in a subclass)�NotImplementedError)rrrrrr$sz
Version.parsecCs5t|�t|�kr1td||f��ndS)Nzcannot compare %r and %r)�type�	TypeError)r�otherrrr�_check_compatible'szVersion._check_compatiblecCs|j|�|j|jkS)N)r#r)rr"rrr�__eq__+s
zVersion.__eq__cCs|j|�S)N)r$)rr"rrr�__ne__/szVersion.__ne__cCs|j|�|j|jkS)N)r#r)rr"rrr�__lt__2s
zVersion.__lt__cCs|j|�p|j|�S)N)r&r$)rr"rrr�__gt__6szVersion.__gt__cCs|j|�p|j|�S)N)r&r$)rr"rrr�__le__9szVersion.__le__cCs|j|�p|j|�S)N)r'r$)rr"rrr�__ge__<szVersion.__ge__cCs
t|j�S)N)�hashr)rrrr�__hash__@szVersion.__hash__cCsd|jj|jfS)Nz%s('%s'))�	__class__rr)rrrr�__repr__CszVersion.__repr__cCs|jS)N)r)rrrr�__str__FszVersion.__str__cCstd��dS)NzPlease implement in subclasses.)r)rrrr�
is_prereleaseIszVersion.is_prereleaseN)rr
rrrr#r$r%r&r'r(r)r+r-r.�propertyr/rrrrrsrc@seZdZdZejd�Zejd�Zejd�Zidd�d6dd�d	6d
d�d6dd�d
6dd�d6dd�d6dd�d6Z	dd�Z
dd�Zedd��Z
dd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�ZdS)&�MatcherNz^(\w[\s\w'.-]*)(\((.*)\))?z#^(<=|>=|<|>|!=|==|~=)?\s*([^\s,]+)$z
^\d+(\.\d+)*$cCs
||kS)Nr)�v�c�prrr�<lambda>WszMatcher.<lambda>�<cCs
||kS)Nr)r2r3r4rrrr5Xs�>cCs||kp||kS)Nr)r2r3r4rrrr5Ysz<=cCs||kp||kS)Nr)r2r3r4rrrr5Zsz>=cCs
||kS)Nr)r2r3r4rrrr5[sz==cCs||kp||kS)Nr)r2r3r4rrrr5]sz~=cCs
||kS)Nr)r2r3r4rrrr5^sz!=c
Cs�|jdkrtd��n|j�|_}|jj|�}|s\td|��n|jd�}|dj�|_|jj�|_	g}|dr�dd�|dj
d�D�}x�|D]�}|jj|�}|s�td	||f��n|j�}|dpd
}|d}|jd�r�|dkrRtd|��n|dd�d}}	|j
j|�s�|j|�q�n|j|�d}}	|j|||	f�q�Wnt|�|_dS)NzPlease specify a version classz
Not valid: %r�r�cSsg|]}|j��qSr)r)�.0r3rrr�
<listcomp>ms	z$Matcher.__init__.<locals>.<listcomp>�,zInvalid %r in %rz~=rz.*�==�!=z#'.*' not allowed for %r constraintsTF)r=r>���)�
version_class�
ValueErrorrr�dist_re�match�groups�name�lower�key�split�comp_re�endswith�num_re�appendrr)
rr�mrD�clist�constraintsr3�op�vn�prefixrrrras:
 


zMatcher.__init__cCs�t|t�r!|j|�}nx�|jD]�\}}}|jj|�}t|t�rmt||�}n|s�d||jjf}t	|��n||||�s+dSq+WdS)z�
        Check if the provided version matches the constraints.

        :param version: The version to match against this instance.
        :type version: Strring or :class:`Version` instance.
        z%r not implemented for %sFT)
rrr@r�
_operators�get�getattrr,rr)r�version�operator�
constraintrR�f�msgrrrrC�sz
Matcher.matchcCsJd}t|j�dkrF|jdddkrF|jdd}n|S)Nrrz==)rr)r�resultrrr�
exact_version�s,zMatcher.exact_versioncCsGt|�t|�ks*|j|jkrCtd||f��ndS)Nzcannot compare %s and %s)r rEr!)rr"rrrr#�s*zMatcher._check_compatiblecCs/|j|�|j|jko.|j|jkS)N)r#rGr)rr"rrrr$�s
zMatcher.__eq__cCs|j|�S)N)r$)rr"rrrr%�szMatcher.__ne__cCst|j�t|j�S)N)r*rGr)rrrrr+�szMatcher.__hash__cCsd|jj|jfS)Nz%s(%r))r,rr)rrrrr-�szMatcher.__repr__cCs|jS)N)r)rrrrr.�szMatcher.__str__)rr
rr@�re�compilerBrIrKrSrrCr0r\r#r$r%r+r-r.rrrrr1Ns*





%r1zQ^(\d+(\.\d+)*)((a|b|c|rc)(\d+))?(\.(post)(\d+))?(\.(dev)(\d+))?(-(\d+(\.\d+)?))?$cCs�|j�}tj|�}|s4td|��n|j�}tdd�|djd�D��}x6t|�dkr�|ddkr�|dd�}qiW|dd�}|d	d
�}|dd�}|d
}|dkr�f}n|dt|d�f}|dkrf}n|dt|d�f}|dkrLf}n|dt|d�f}|dkr{f}n"tdd�|jd�D��}|s�|r�|r�d}q�d}n|s�d}n|s�d}n|||||fS)NzNot a valid version: %scss|]}t|�VqdS)N)�int)r:r2rrr�	<genexpr>�sz_pep426_key.<locals>.<genexpr>r�.r�����	��cSsg|]}t|��qSr)r_)r:rrrrr;�s	z_pep426_key.<locals>.<listcomp>�a�z�_�final���rm)NN)NN)NNrm)rirm)rj)rk)zfinal)	r�PEP426_VERSION_RErCr
rDrrHrr_)rrMrD�nums�pre�post�dev�localrrr�_pep426_key�sB&%
				"
				rtc@sOeZdZdZdd�Zedddddg�Zed	d
��ZdS)raIA rational version.

    Good:
        1.2         # equivalent to "1.2.0"
        1.2.0
        1.2a1
        1.2.3a2
        1.2.3b1
        1.2.3c1
        1.2.3.4
        TODO: fill this out

    Bad:
        1           # mininum two numbers
        1.2a        # release level must have a release serial
        1.2.3b
    cCsTt|�}tj|�}|j�}tdd�|djd�D��|_|S)Ncss|]}t|�VqdS)N)r_)r:r2rrrr`	sz*NormalizedVersion.parse.<locals>.<genexpr>rra)�_normalized_keyrnrCrDrrH�_release_clause)rrr[rMrDrrrrs
)zNormalizedVersion.parseri�br3�rcrrcs t�fdd��jD��S)Nc3s(|]}|r|d�jkVqdS)rN)�PREREL_TAGS)r:�t)rrrr`sz2NormalizedVersion.is_prerelease.<locals>.<genexpr>)�anyr)rr)rrr/szNormalizedVersion.is_prereleaseN)	rr
rrr�setryr0r/rrrrr�scCsUt|�}t|�}||kr(dS|j|�s;dSt|�}||dkS)NTFra)�str�
startswithr)�x�y�nrrr�
_match_prefixsr�c@s�eZdZeZidd6dd6dd6dd6d	d
6dd6d
d6Zdd�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS) r�_match_compatiblez~=�	_match_ltr6�	_match_gtr7�	_match_lez<=�	_match_gez>=�	_match_eqz==�	_match_nez!=cCsx|r"d|ko|jd}n|jdo:|jd}|rn|jjdd�d}|j|�}n||fS)N�-rrrmrmrm)rrrHr@)rrVrXrR�strip_localrrrr�
_adjust_local,szNormalizedMatcher._adjust_localcCs^|j|||�\}}||kr+dS|j}djdd�|D��}t||�S)NFracSsg|]}t|��qSr)r})r:�irrrr;?s	z/NormalizedMatcher._match_lt.<locals>.<listcomp>)r�rv�joinr�)rrVrXrR�release_clause�pfxrrrr�:s	zNormalizedMatcher._match_ltcCs^|j|||�\}}||kr+dS|j}djdd�|D��}t||�S)NFracSsg|]}t|��qSr)r})r:r�rrrr;Gs	z/NormalizedMatcher._match_gt.<locals>.<listcomp>)r�rvr�r�)rrVrXrRr�r�rrrr�Bs	zNormalizedMatcher._match_gtcCs%|j|||�\}}||kS)N)r�)rrVrXrRrrrr�JszNormalizedMatcher._match_lecCs%|j|||�\}}||kS)N)r�)rrVrXrRrrrr�NszNormalizedMatcher._match_gecCsC|j|||�\}}|s0||k}nt||�}|S)N)r�r�)rrVrXrRr[rrrr�Rs
zNormalizedMatcher._match_eqcCsD|j|||�\}}|s0||k}nt||�}|S)N)r�r�)rrVrXrRr[rrrr�Zs
zNormalizedMatcher._match_necCs�|j|||�\}}||kr+dS||kr;dS|j}t|�dkri|dd�}ndjdd�|D��}t||�S)NTFrracSsg|]}t|��qSr)r})r:r�rrrr;ks	z7NormalizedMatcher._match_compatible.<locals>.<listcomp>rm)r�rvrr�r�)rrVrXrRr�r�rrrr�bs	z#NormalizedMatcher._match_compatibleN)rr
rrr@rSr�r�r�r�r�r�r�r�rrrrrs"
z[.+-]$r8z^[.](\d)z0.\1z^[.-]z
^\((.*)\)$z\1z^v(ersion)?\s*(\d+)z\2z^r(ev)?\s*(\d+)z[.]{2,}raz\b(alfa|apha)\b�alphaz\b(pre-alpha|prealpha)\bz	pre.alphaz	\(beta\)$�betaz
^[:~._+-]+z
[,*")([\]]z[~:+_ -]z\.$z
(\d+(\.\d+)*)cCs�|j�j�}x&tD]\}}|j||�}qW|sJd}ntj|�}|snd}|}n�|j�djd�}dd�|D�}x#t|�dkr�|j	d�q�Wt|�dkr�||j
�d�}nJdjdd�|dd�D��||j
�d�}|dd�}djd	d�|D��}|j�}|r�x)tD]\}}|j||�}qjWn|s�|}n&d
|kr�dnd}|||}t
|�s�d}n|S)
z�
    Try to suggest a semantic form for a version for which
    _suggest_normalized_version couldn't come up with anything.
    z0.0.0rracSsg|]}t|��qSr)r_)r:r�rrrr;�s	z-_suggest_semantic_version.<locals>.<listcomp>rbNcSsg|]}t|��qSr)r})r:r�rrrr;�s	cSsg|]}t|��qSr)r})r:r�rrrr;�s	rrr��+)rrF�
_REPLACEMENTS�sub�_NUMERIC_PREFIXrCrDrHrrL�endr��_SUFFIX_REPLACEMENTS�	is_semver)rr[�pat�replrMrR�suffix�seprrr�_suggest_semantic_version�s:		:		r�cCs�yt|�|SWntk
r&YnX|j�}x&dBD]\}}|j||�}q:Wtjdd|�}tjdd|�}tjdd|�}tjdd|�}tjdd|�}|jd�r�|d d!�}ntjd"d|�}tjd#d$|�}tjd%d&|�}tjd'd|�}tjd(d)|�}tjd*d)|�}tjd+d
|�}tjd,d-|�}tjd.d&|�}tjd/d0|�}tjd1d2|�}yt|�Wntk
r�d!}YnX|S)Ca�Suggest a normalized version close to the given version string.

    If you have a version string that isn't rational (i.e. NormalizedVersion
    doesn't like it) then you might be able to get an equivalent (or close)
    rational version from this function.

    This does a number of simple normalizations to the given string, based
    on observation of versions currently in use on PyPI. Given a dump of
    those version during PyCon 2009, 4287 of them:
    - 2312 (53.93%) match NormalizedVersion without change
      with the automatic suggestion
    - 3474 (81.04%) match when using this suggestion method

    @param s {str} An irrational version string.
    @returns A rational version string, or None, if couldn't determine one.
    �-alphari�-betarwr�r�rxr3�-finalr8�-pre�-release�.release�-stabler�rark� �.finalrlzpre$�pre0zdev$�dev0z([abc]|rc)[\-\.](\d+)$z\1\2z[\-\.](dev)[\-\.]?r?(\d+)$z.\1\2z[.~]?([abc])\.?z\1r2rNz\b0+(\d+)(?!\d)z(\d+[abc])$z\g<1>0z\.?(dev-r|dev\.r)\.?(\d+)$z.dev\2z-(a|b|c)(\d+)$z[\.\-](dev|devel)$z.dev0z(?![\.\-])dev$z(final|stable)$z\.?(r|-|-r)\.?(\d+)$z.post\2z\.?(dev|git|bzr)\.?(\d+)$z\.?(pre|preview|-c)(\d+)$zc\g<2>zp(\d+)$z.post\1�r�ri�r�rw�zalphari�zbetarw�zrcr3�r�r8�r�r3�r�r8�r�r8�r�r8�r�ra�rkra�r�r8�r�r8�zfinalr8)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)rur
rF�replacer]r�r~)r�rs�origr�rrr�_suggest_normalized_version�sH

	
r�z([a-z]+|\d+|[\.-])r3rp�previewzfinal-r�rx�@rrcCs�dd�}g}x�||�D]�}|jd�r�|dkrjx'|rf|ddkrf|j�qCWnx'|r�|d	dkr�|j�qmWn|j|�qWt|�S)
NcSs�g}x�tj|j��D]p}tj||�}|rd|dd�ko[dknrr|jd�}n
d|}|j|�qqW|jd�|S)N�0r�9re�*z*final)�
_VERSION_PARTrHrF�_VERSION_REPLACErT�zfillrL)rr[r4rrr�	get_parts4s&

z_legacy_key.<locals>.get_partsr�z*finalrz*final-�00000000rmrm)r~�poprLr)rr�r[r4rrr�_legacy_key3s
r�c@s.eZdZdd�Zedd��ZdS)rcCs
t|�S)N)r�)rrrrrrNszLegacyVersion.parsecCsRd}xE|jD]:}t|t�r|jd�r|dkrd}PqqW|S)NFr�z*finalT)rrrr~)rr[rrrrr/QszLegacyVersion.is_prereleaseN)rr
rrr0r/rrrrrMsc@sJeZdZeZeej�Zded<ej	d�Z
dd�ZdS)rr�z~=z^(\d+(\.\d+)*)cCs�||krdS|jjt|��}|sEtjd||�dS|j�d}d|krz|jdd�d}nt||�S)NFzACannot compute compatible match for version %s  and constraint %sTrrar)�
numeric_rerCr}�logger�warningrD�rsplitr�)rrVrXrRrMrrrrr�ds	
zLegacyMatcher._match_compatibleN)rr
rrr@�dictr1rSr]r^r�r�rrrrr\s

zN^(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+(\.[a-z0-9-]+)*)?(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$cCs
tj|�S)N)�
_SEMVER_RErC)rrrrr�zsr�c	Cs�dd�}t|�}|s-t|��n|j�}dd�|dd�D�\}}}||dd�||dd�}}|||f||fS)	NcSsN|dkr|f}n2|dd�jd�}tdd�|D��}|S)NrracSs1g|]'}|j�r'|jd�n|�qS)re)�isdigitr�)r:r4rrrr;�s	z5_semantic_key.<locals>.make_tuple.<locals>.<listcomp>)rHr)r�absentr[rrrr�
make_tuples
z!_semantic_key.<locals>.make_tuplecSsg|]}t|��qSr)r_)r:r�rrrr;�s	z!_semantic_key.<locals>.<listcomp>rb�|rcr�)r�r
rD)	rr�rMrD�major�minor�patchrp�buildrrr�
_semantic_key~s
&'r�c@s.eZdZdd�Zedd��ZdS)rcCs
t|�S)N)r�)rrrrrr�szSemanticVersion.parsecCs|jdddkS)Nrrr�)r)rrrrr/�szSemanticVersion.is_prereleaseN)rr
rrr0r/rrrrr�sc@seZdZeZdS)r	N)rr
rrr@rrrrr	�sc@sOeZdZddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)�
VersionSchemeNcCs||_||_||_dS)N)rG�matcher�	suggester)rrGr�r�rrrr�s		zVersionScheme.__init__cCs9y|jj|�d}Wntk
r4d}YnX|S)NTF)r�r@r
)rrr[rrr�is_valid_version�s

zVersionScheme.is_valid_versioncCs6y|j|�d}Wntk
r1d}YnX|S)NTF)r�r
)rrr[rrr�is_valid_matcher�s


zVersionScheme.is_valid_matchercCs|jd|�S)z:
        Used for processing some metadata fields
        zdummy_name (%s))r�)rrrrr�is_valid_constraint_list�sz&VersionScheme.is_valid_constraint_listcCs+|jdkrd}n|j|�}|S)N)r�)rrr[rrr�suggest�s	zVersionScheme.suggest)rr
rrr�r�r�r�rrrrr��s
r��
normalizedcCs|S)Nr)rrrrrr5�sr5�legacy�semantic�defaultcCs'|tkrtd|��nt|S)Nzunknown scheme name: %r)�_SCHEMESrA)rErrrr�s)(r�loggingr]�compatr�__all__�	getLoggerrr�rAr
�objectrr1r^rnrtrurr�rr�r�r�r�r��Ir�r�r�rrr�r�r�rr	r�r�rrrrr�<module>	s~1j/$Q.r
		#	
	
python3.4/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-34.pyc000064400000102223151735047350023041 0ustar00�
�Reۗ�@s�ddlmZddlZddlZddlZejddkr�ddlmZefZe	Z
ddlmZ
ddlZddlZddlmZddlmZmZmZmZmZdd	lmZmZmZmZmZm Z m!Z!d
d�Zddl"Z"ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,ddl-Z-ddl.Z.ddl/Z0dd
l1m1Z1ddl2Z2e3Z3ddl4m5Z6ddl4m7Z8da9dd�Z:noddl;mZe<fZe<Z
ddl;m=Z
ddlZddlZddlZddl>mZmZmZm:Z:mZmZmZmZm!Z!ddl?m$Z$mZm#Z#mZmZm'Z'm(Z(m)Z)m*Z*m+Z+m,Z,ddl@m&Z&m%Z%m Z ddlAjBZ-ddl?jCZ"ddlDjBZ.ddl0Z0dd
lEm1Z1ddlFjGZ2eHZ3ddl4m8Z8e6Z6yddlImJZJmKZKWn@eLk
r�Gdd�deM�ZKdd�ZNdd�ZJYnXyddlmOZPWn(eLk
r�Gdd �d eQ�ZPYnXydd!lmRZRWn.eLk
r"ejSejTBdd"d#�ZRYnXdd$lUmVZWeXeWd%�rKeWZVn<dd&lUmYZZGd'd(�d(eZ�ZYGd)d*�d*eW�ZVydd+l[m\Z\WneLk
r�d,d-�Z\YnXyddl]Z]Wn"eLk
r�dd.lm]Z]YnXy
e^Z^Wn.e_k
r+dd/l`maZad0d1�Z^YnXyejbZbejcZcWnQedk
r�eje�Zfefd2krsd3Zgnd4Zgd5d6�Zbd7d8�ZcYnXydd9lhmiZiWn[eLk
rdd:ljmkZkmlZlddlZejmd;�Znd<d=�Zod>d?�ZiYnXydd@lpmqZqWn"eLk
r@dd@lrmqZqYnXejddA�dbkrie1�jsZsnddClpmsZsyddDl`mtZtWnpeLk
r�ddEl`muZuyddFlvmwZxWn!eLk
r�dGdHdI�ZxYnXGdJdK�dKeu�ZtYnXyddLlymzZzWn!eLk
r7ddMdN�ZzYnXyddOl`m{Z{Wn�eLk
r�yddPl|m}Z~Wn"eLk
r�ddPlm}Z~YnXy ddQl�m�Z�m�Z�m�Z�WneLk
r�YnXGdRdS�dSe��Z{YnXyddTl�m�Z�m�Z�Wn�eLk
r�ejmdUej��Z�dVdW�Z�GdXdY�dYe��Z�ddZd[�Z�Gd\d]�d]e��Z�Gd^d_�d_e��Z�Gd`da�daeQ�Z�YnXdS)c�)�absolute_importN�)�StringIO)�FileType�)�shutil)�urlparse�
urlunparse�urljoin�urlsplit�
urlunsplit)�urlretrieve�quote�unquote�url2pathname�pathname2url�ContentTooShortError�	splittypecCs+t|t�r!|jd�}nt|�S)Nzutf-8)�
isinstance�unicode�encode�_quote)�s�r�5/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/compat.pyrsr)
�Request�urlopen�URLError�	HTTPError�HTTPBasicAuthHandler�HTTPPasswordMgr�HTTPSHandler�HTTPHandler�HTTPRedirectHandler�build_opener)�
HTMLParser)�ifilter)�ifilterfalsecCsYtdkr*ddl}|jd�antj|�}|rO|jdd�Sd|fS)zJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.Nrz^(.*)@(.*)$r�)�	_userprog�re�compile�match�group)�hostr*r,rrr�	splituser-sr/)�
TextIOWrapper)	rr	r
r/rrrrr)rr
rrrrr r!r"r#r$)rrr)�filterfalse)�match_hostname�CertificateErrorc@seZdZdS)r3N)�__name__�
__module__�__qualname__rrrrr3Usr3cCs�g}x[|jd�D]J}|dkr8|jd�qtj|�}|j|jdd��qWtjddj|�dtj�S)	N�.�*z[^.]+z\*z[^.]*z\Az\.z\Z)�split�appendr*�escape�replacer+�join�
IGNORECASE)�dn�pats�fragrrr�_dnsname_to_patYsrBcCsg|std��ng}|jdf�}xI|D]A\}}|dkr4t|�j|�redS|j|�q4q4W|s�xi|jdf�D]R}xI|D]A\}}|dkr�t|�j|�r�dS|j|�q�q�Wq�Wnt|�dkr(td|d	jtt	|��f��n;t|�dkrWtd
||df��ntd��dS)
a7Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 rules
        are mostly followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        zempty or no certificate�subjectAltName�DNSN�subject�
commonNamerz&hostname %r doesn't match either of %sz, zhostname %r doesn't match %rrz=no appropriate commonName or subjectAltName fields were found)
�
ValueError�getrBr,r:�lenr3r=�map�repr)�cert�hostname�dnsnames�san�key�value�subrrrr2gs.%r2)�SimpleNamespacec@s"eZdZdZdd�ZdS)�	ContainerzR
        A generic container for when multiple values need to be returned
        cKs|jj|�dS)N)�__dict__�update)�self�kwargsrrr�__init__�szContainer.__init__N)r4r5r6�__doc__rYrrrrrT�srT)�whichcs�dd�}tjj��r5|�|�r1�SdS|dkr\tjjdtj�}n|sfdS|jtj�}tj	dkrtj
|kr�|jdtj
�ntjjdd�jtj�}t�fd	d
�|D��r��g}q�fdd�|D�}n	�g}t
�}xu|D]m}tjj|�}||kr-|j|�x9|D].}	tjj||	�}
||
|�re|
SqeWq-q-WdS)
aKGiven a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.

        cSs5tjj|�o4tj||�o4tjj|�S)N)�os�path�exists�access�isdir)�fn�moderrr�
_access_check�s$zwhich.<locals>._access_checkN�PATH�win32r�PATHEXT�c3s*|] }�j�j|j��VqdS)N)�lower�endswith)�.0�ext)�cmdrr�	<genexpr>�szwhich.<locals>.<genexpr>csg|]}�|�qSrr)rjrk)rlrr�
<listcomp>�s	zwhich.<locals>.<listcomp>)r\r]�dirname�environrH�defpathr9�pathsep�sys�platform�curdir�insert�any�set�normcase�addr=)rlrbr]rc�pathext�files�seen�dir�normdir�thefile�namer)rlrr[�s8
!		


r[)�ZipFile�	__enter__)�
ZipExtFilec@s4eZdZdd�Zdd�Zdd�ZdS)r�cCs|jj|j�dS)N)rUrV)rW�baserrrrY�szZipExtFile.__init__cCs|S)Nr)rWrrrr��szZipExtFile.__enter__cGs|j�dS)N)�close)rW�exc_inforrr�__exit__�szZipExtFile.__exit__N)r4r5r6rYr�r�rrrrr��sr�c@s4eZdZdd�Zdd�Zdd�ZdS)r�cCs|S)Nr)rWrrrr��szZipFile.__enter__cGs|j�dS)N)r�)rWr�rrrr��szZipFile.__exit__cOstj|||�}t|�S)N)�BaseZipFile�openr�)rW�argsrXr�rrrr��szZipFile.openN)r4r5r6r�r�r�rrrrr��sr�)�python_implementationcCs@dtjkrdStjdkr&dStjjd�r<dSdS)z6Return a string identifying the Python implementation.�PyPy�java�Jython�
IronPython�CPython)rs�versionr\r��
startswithrrrrr�sr�)�	sysconfig)�CallablecCs
t|t�S)N)rr�)�objrrr�callablesr��mbcs�strict�surrogateescapecCsOt|t�r|St|t�r2|jtt�Stdt|�j��dS)Nzexpect bytes or str, not %s)	r�bytes�	text_typer�_fsencoding�	_fserrors�	TypeError�typer4)�filenamerrr�fsencode#sr�cCsOt|t�r|St|t�r2|jtt�Stdt|�j��dS)Nzexpect bytes or str, not %s)	rr�r��decoder�r�r�r�r4)r�rrr�fsdecode,sr�)�detect_encoding)�BOM_UTF8�lookupzcoding[:=]\s*([-\w.]+)cCsd|dd�j�jdd�}|dks=|jd�rAdS|d
ks\|jd�r`dS|S)z(Imitates get_normal_name in tokenizer.c.N��_�-zutf-8zutf-8-�latin-1�
iso-8859-1�iso-latin-1�latin-1-�iso-8859-1-�iso-latin-1-)r�r�r�)r�r�r�)rhr<r�)�orig_enc�encrrr�_get_normal_name=s"r�csy�jj�Wntk
r*d�YnXd�d}d}�fdd�}��fdd�}|�}|jt�r�d�|d	d�}d
}n|s�|gfS||�}|r�||gfS|�}|s�||gfS||�}|r|||gfS|||gfS)a>
        The detect_encoding() function is used to detect the encoding that should
        be used to decode a Python source file.  It requires one argment, readline,
        in the same way as the tokenize() generator.

        It will call readline a maximum of twice, and return the encoding used
        (as a string) and a list of any lines (left as bytes) it has read in.

        It detects the encoding from the presence of a utf-8 bom or an encoding
        cookie as specified in pep-0263.  If both a bom and a cookie are present,
        but disagree, a SyntaxError will be raised.  If the encoding cookie is an
        invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
        'utf-8-sig' is returned.

        If no encoding is specified, then the default of 'utf-8' will be returned.
        NFzutf-8cs(y��SWntk
r#dSYnXdS)N�)�
StopIterationr)�readlinerr�read_or_stop`s
z%detect_encoding.<locals>.read_or_stopcs9y|jd�}WnEtk
rZd}�dk	rJdj|��}nt|��YnXtj|�}|stdSt|d�}yt|�}WnItk
r��dkr�d|}ndj�|�}t|��YnX�r5|j	dkr(�dkr
d}ndj��}t|��n|d	7}n|S)
Nzutf-8z'invalid or missing encoding declarationz{} for {!r}rzunknown encoding: zunknown encoding for {!r}: {}zencoding problem: utf-8z encoding problem for {!r}: utf-8z-sig)
r��UnicodeDecodeError�format�SyntaxError�	cookie_re�findallr�r��LookupErrorr�)�line�line_string�msg�matches�encoding�codec)�	bom_foundr�rr�find_cookiefs6


			
z$detect_encoding.<locals>.find_cookieTrz	utf-8-sig)�__self__r��AttributeErrorr�r�)r�r��defaultr�r��first�secondr)r�r�r�rr�Hs4
&		

	
r�)r;r(�)�unescape)�ChainMap)�MutableMapping)�recursive_reprz...cs�fdd�}|S)zm
            Decorator to make a repr function return fillvalue for a recursive
            call
            cspt�����fdd�}t�d�|_t�d�|_t�d�|_t�di�|_|S)NcsWt|�t�f}|�kr%�S�j|�z�|�}Wd�j|�X|S)N)�id�	get_identrz�discard)rWrP�result)�	fillvalue�repr_running�
user_functionrr�wrapper�s
z=_recursive_repr.<locals>.decorating_function.<locals>.wrapperr5rZr4�__annotations__)rx�getattrr5rZr4r�)r�r�)r�)r�r�r�decorating_function�s	z,_recursive_repr.<locals>.decorating_functionr)r�r�r)r�r�_recursive_repr�sr�c@seZdZdZdd�Zdd�Zdd�Zdd	d
�Zdd�Zd
d�Z	dd�Z
dd�Ze�dd��Z
edd��Zdd�ZeZdd�Zedd��Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZdS)'r�a� A ChainMap groups multiple dicts (or other mappings) together
        to create a single, updateable view.

        The underlying mappings are stored in a list.  That list is public and can
        accessed or updated using the *maps* attribute.  There is no other state.

        Lookups search the underlying mappings successively until a key is found.
        In contrast, writes, updates, and deletions only operate on the first
        mapping.

        cGst|�pig|_dS)z�Initialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            N)�list�maps)rWr�rrrrY�szChainMap.__init__cCst|��dS)N)�KeyError)rWrPrrr�__missing__�szChainMap.__missing__cCsBx2|jD]'}y||SWq
tk
r0Yq
Xq
W|j|�S)N)r�r�r�)rWrP�mappingrrr�__getitem__�s
	zChainMap.__getitem__NcCs||kr||S|S)Nr)rWrPr�rrrrH�szChainMap.getcCstt�j|j��S)N)rIrx�unionr�)rWrrr�__len__�szChainMap.__len__cCstt�j|j��S)N)�iterrxr�r�)rWrrr�__iter__�szChainMap.__iter__cs t�fdd�|jD��S)Nc3s|]}�|kVqdS)Nr)rj�m)rPrrrm�sz(ChainMap.__contains__.<locals>.<genexpr>)rwr�)rWrPr)rPr�__contains__�szChainMap.__contains__cCs
t|j�S)N)rwr�)rWrrr�__bool__�szChainMap.__bool__cCs%dj|djtt|j���S)Nz{0.__class__.__name__}({1})z, )r�r=rJrKr�)rWrrr�__repr__�szChainMap.__repr__cGs|tj||��S)z?Create a ChainMap with a single dict created from the iterable.)�dict�fromkeys)�cls�iterabler�rrrr�szChainMap.fromkeyscCs*|j|jdj�|jdd��S)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]rrN)�	__class__r��copy)rWrrrr�	sz
ChainMap.copycCs|ji|j�S)z;New ChainMap with a new dict followed by all previous maps.)r�r�)rWrrr�	new_childszChainMap.new_childcCs|j|jdd��S)zNew ChainMap from maps[1:].rN)r�r�)rWrrr�parentsszChainMap.parentscCs||jd|<dS)Nr)r�)rWrPrQrrr�__setitem__szChainMap.__setitem__cCs@y|jd|=Wn'tk
r;tdj|���YnXdS)Nrz(Key not found in the first mapping: {!r})r�r�r�)rWrPrrr�__delitem__s
zChainMap.__delitem__cCs:y|jdj�SWntk
r5td��YnXdS)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.rz#No keys found in the first mapping.N)r��popitemr�)rWrrrr�!s
zChainMap.popitemcGsIy|jdj||�SWn'tk
rDtdj|���YnXdS)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].rz(Key not found in the first mapping: {!r}N)r��popr�r�)rWrPr�rrrr�(s
zChainMap.popcCs|jdj�dS)z'Clear maps[0], leaving maps[1:] intact.rN)r��clear)rWrrrr�/szChainMap.clear)r4r5r6rZrYr�r�rHr�r�r�r�r�r��classmethodr�r��__copy__r��propertyr�r�r�r�r�r�rrrrr��s(r�)�cache_from_sourcecCsG|jd�st�|dkr*t}n|r9d}nd}||S)Nz.py�c�o)ri�AssertionError�	__debug__)r]�debug_override�suffixrrrr�6s		r�)�OrderedDict)r�)�KeysView�
ValuesView�	ItemsViewc@sreZdZdZdd�Zejdd�Zejdd�Zdd	�Zd
d�Z	dd
�Z
ddd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�ZeZe�Zedd �Zd!d"d#�Zd!d$d%�Zd&d'�Zd(d)�Zed!d*d+��Zd,d-�Zd.d/�Zd0d1�Zd2d3�Z d4d5�Z!d!S)6rz)Dictionary that remembers insertion ordercOs�t|�dkr+tdt|���ny|jWnAtk
ryg|_}||dg|dd�<i|_YnX|j||�dS)z�Initialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            rz$expected at most 1 arguments, got %dN)rIr��_OrderedDict__rootr��_OrderedDict__map�_OrderedDict__update)rWr��kwds�rootrrrrY]s

zOrderedDict.__init__cCs\||krH|j}|d}|||g|d<|d<|j|<n||||�dS)z!od.__setitem__(i, y) <==> od[i]=yrrN)rr)rWrPrQ�dict_setitemr	�lastrrrr�ms
	
)zOrderedDict.__setitem__cCs@|||�|jj|�\}}}||d<||d<dS)z od.__delitem__(y) <==> del od[y]rrN)rr�)rWrP�dict_delitem�	link_prev�	link_nextrrrr�ws

zOrderedDict.__delitem__ccs=|j}|d}x#||k	r8|dV|d}qWdS)zod.__iter__() <==> iter(od)rr(N)r)rWr	�currrrrr��s
	
	zOrderedDict.__iter__ccs=|j}|d}x#||k	r8|dV|d}qWdS)z#od.__reversed__() <==> reversed(od)rr(N)r)rWr	rrrr�__reversed__�s
	
	zOrderedDict.__reversed__cCs�yZx$|jj�D]}|dd�=qW|j}||dg|dd�<|jj�Wntk
rnYnXtj|�dS)z.od.clear() -> None.  Remove all items from od.N)r�
itervaluesrr�r�r�)rW�noder	rrrr��s	
zOrderedDict.clearTcCs�|std��n|j}|rO|d}|d}||d<||d<n(|d}|d}||d<||d<|d}|j|=tj||�}||fS)z�od.popitem() -> (k, v), return and remove a (key, value) pair.
            Pairs are returned in LIFO order if last is true or FIFO order if false.

            zdictionary is emptyrrr()r�rrr�r�)rWrr	�linkr
rrPrQrrrr��s 	









zOrderedDict.popitemcCs
t|�S)zod.keys() -> list of keys in od)r�)rWrrr�keys�szOrderedDict.keyscs�fdd��D�S)z#od.values() -> list of values in odcsg|]}�|�qSrr)rjrP)rWrrrn�s	z&OrderedDict.values.<locals>.<listcomp>r)rWr)rWr�values�szOrderedDict.valuescs�fdd��D�S)z.od.items() -> list of (key, value) pairs in odcs g|]}|�|f�qSrr)rjrP)rWrrrn�s	z%OrderedDict.items.<locals>.<listcomp>r)rWr)rWr�items�szOrderedDict.itemscCs
t|�S)z0od.iterkeys() -> an iterator over the keys in od)r�)rWrrr�iterkeys�szOrderedDict.iterkeysccsx|D]}||VqWdS)z2od.itervalues -> an iterator over the values in odNr)rW�krrrr�s
zOrderedDict.itervaluesccs$x|D]}|||fVqWdS)z=od.iteritems -> an iterator over the (key, value) items in odNr)rWrrrr�	iteritems�s
zOrderedDict.iteritemscOs&t|�dkr.tdt|�f��n|sCtd��n|d}f}t|�dkrr|d}nt|t�r�xw|D]}||||<q�WnXt|d�r�xF|j�D]}||||<q�Wn!x|D]\}}|||<q�Wx$|j�D]\}}|||<qWdS)a�od.update(E, **F) -> None.  Update od from dict/iterable E and F.

            If E is a dict instance, does:           for k in E: od[k] = E[k]
            If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
            Or if E is an iterable of items, does:   for k, v in E: od[k] = v
            In either case, this is followed by:     for k, v in F.items(): od[k] = v

            r(z8update() takes at most 2 positional arguments (%d given)z,update() takes at least 1 argument (0 given)rrrN)rIr�rr��hasattrrr)r�rrW�otherrPrQrrrrV�s&	


zOrderedDict.updatecCsC||kr!||}||=|S||jkr?t|��n|S)z�od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
            If key is not found, d is returned if given, otherwise KeyError is raised.

            )�_OrderedDict__markerr�)rWrPr�r�rrrr��s
zOrderedDict.popNcCs"||kr||S|||<|S)zDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in odr)rWrPr�rrr�
setdefault�s
zOrderedDict.setdefaultcCs�|si}nt|�t�f}||kr4dSd||<z5|sXd|jjfSd|jj|j�fSWd||=XdS)zod.__repr__() <==> repr(od)z...rz%s()z%s(%r)N)r��
_get_identr�r4r)rWZ
_repr_runningZcall_keyrrrr�s	
zOrderedDict.__repr__cs~�fdd��D�}t��j�}x'tt��D]}|j|d�q;W|rn�j|f|fS�j|ffS)z%Return state information for picklingcs g|]}|�|g�qSrr)rjr)rWrrrns	z*OrderedDict.__reduce__.<locals>.<listcomp>N)�varsr�rr�r�)rWr�	inst_dictrr)rWr�
__reduce__szOrderedDict.__reduce__cCs
|j|�S)z!od.copy() -> a shallow copy of od)r�)rWrrrr�szOrderedDict.copycCs(|�}x|D]}|||<qW|S)z�OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            r)r�r�rQ�drPrrrr�"s	
zOrderedDict.fromkeyscCsMt|t�r=t|�t|�ko<|j�|j�kStj||�S)z�od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            )rrrIrr��__eq__)rWrrrrr#-s.zOrderedDict.__eq__cCs||kS)Nr)rWrrrr�__ne__6szOrderedDict.__ne__cCs
t|�S)z@od.viewkeys() -> a set-like object providing a view on od's keys)r)rWrrr�viewkeys;szOrderedDict.viewkeyscCs
t|�S)z<od.viewvalues() -> an object providing a view on od's values)r)rWrrr�
viewvalues?szOrderedDict.viewvaluescCs
t|�S)zBod.viewitems() -> a set-like object providing a view on od's items)r)rWrrr�	viewitemsCszOrderedDict.viewitems)"r4r5r6rZrYr�r�r�r�rr�r�rrrrrrrVr�objectrr�rr�r!r�r�r�r#r$r%r&r'rrrrrQs:
		


	r)�BaseConfigurator�valid_identz^[a-z_][a-z0-9_]*$cCs,tj|�}|s(td|��ndS)Nz!Not a valid Python identifier: %rT)�
IDENTIFIERr,rG)rr�rrrr*Msr*c@s1eZdZdZdd�Zddd�ZdS)�ConvertingDictz A converting dictionary wrapper.cCsqtj||�}|jj|�}||k	rm|||<t|�tttfkrm||_||_	qmn|S)N)
r�r��configurator�convertr�r,�ConvertingList�ConvertingTuple�parentrP)rWrPrQr�rrrr�`s
	zConvertingDict.__getitem__NcCsttj|||�}|jj|�}||k	rp|||<t|�tttfkrp||_||_	qpn|S)N)
r�rHr-r.r�r,r/r0r1rP)rWrPr�rQr�rrrrHls
	zConvertingDict.get)r4r5r6rZr�rHrrrrr,]sr,cCsjtj|||�}|jj|�}||k	rft|�tttfkrf||_||_	qfn|S)N)
r�r�r-r.r�r,r/r0r1rP)rWrPr�rQr�rrrr�xs	r�c@s1eZdZdZdd�Zddd�ZdS)	r/zA converting list wrapper.cCsqtj||�}|jj|�}||k	rm|||<t|�tttfkrm||_||_	qmn|S)N)
r�r�r-r.r�r,r/r0r1rP)rWrPrQr�rrrr��s
	zConvertingList.__getitem__rcCs^tj||�}|jj|�}||k	rZt|�tttfkrZ||_qZn|S)N)	r�r�r-r.r�r,r/r0r1)rW�idxrQr�rrrr��szConvertingList.popN���)r4r5r6rZr�r�rrrrr/�sr/c@s"eZdZdZdd�ZdS)r0zA converting tuple wrapper.cCsgtj||�}|jj|�}||k	rct|�tttfkrc||_||_	qcn|S)N)
�tupler�r-r.r�r,r/r0r1rP)rWrPrQr�rrrr��s	zConvertingTuple.__getitem__N)r4r5r6rZr�rrrrr0�sr0c@s�eZdZdZejd�Zejd�Zejd�Zejd�Z	ejd�Z
idd6d	d
6Zee
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS)r)zQ
        The configurator base class which defines some useful defaults.
        z%^(?P<prefix>[a-z]+)://(?P<suffix>.*)$z^\s*(\w+)\s*z^\.\s*(\w+)\s*z^\[\s*(\w+)\s*\]\s*z^\d+$�ext_convertrk�cfg_convert�cfgcCst|�|_||j_dS)N)r,�configr-)rWr8rrrrY�szBaseConfigurator.__init__c	Cs�|jd�}|jd�}yz|j|�}x`|D]X}|d|7}yt||�}Wq7tk
r�|j|�t||�}Yq7Xq7W|SWn]tk
r�tj�dd�\}}td||f�}|||_	|_
|�YnXdS)zl
            Resolve strings to objects using standard import and attribute
            syntax.
            r7rrNzCannot resolve %r: %s)r9r��importerr�r��ImportErrorrsr�rG�	__cause__�
__traceback__)	rWrr��used�foundrA�e�tb�vrrr�resolve�s"



zBaseConfigurator.resolvecCs
|j|�S)z*Default converter for the ext:// protocol.)rB)rWrQrrrr5�szBaseConfigurator.ext_convertcCs\|}|jj|�}|dkr7td|��n!||j�d�}|j|j�d}x�|rW|jj|�}|r�||j�d}n�|jj|�}|r|j�d}|jj|�s�||}qyt	|�}||}Wqt
k
r||}YqXn|r>||j�d�}qgtd||f��qgW|S)z*Default converter for the cfg:// protocol.NzUnable to convert %rrzUnable to convert %r at %r)�WORD_PATTERNr,rG�endr8�groups�DOT_PATTERN�
INDEX_PATTERN�
DIGIT_PATTERN�intr�)rWrQ�restr�r"r2�nrrrr6�s2	

zBaseConfigurator.cfg_convertcCs/t|t�r7t|t�r7t|�}||_n�t|t�rnt|t�rnt|�}||_n�t|t�r�t|t�r�t|�}||_n�t|t�r+|j	j
|�}|r+|j�}|d}|jj
|d�}|r(|d}t||�}||�}q(q+n|S)z�
            Convert values to an appropriate type. dicts, lists and tuples are
            replaced by their converting alternatives. Strings are checked to
            see if they have a conversion format and are converted if they do.
            �prefixNr)rr,r�r-r/r�r0r4�string_types�CONVERT_PATTERNr,�	groupdict�value_convertersrHr�)rWrQr�r"rL�	converterrrrrr.�s*

zBaseConfigurator.convertcs��jd�}t|�s-|j|�}n�jdd�}t�fdd��D��}||�}|r�x-|j�D]\}}t|||�q}Wn|S)z1Configure an object with a user-supplied factory.z()r7Ncs,g|]"}t|�r|�|f�qSr)r*)rjr)r8rrrns	z5BaseConfigurator.configure_custom.<locals>.<listcomp>)r�r�rBr�r�setattr)rWr8r��propsrXr�r�rQr)r8r�configure_customsz!BaseConfigurator.configure_customcCs"t|t�rt|�}n|S)z0Utility function which converts lists to tuples.)rr�r4)rWrQrrr�as_tuple$szBaseConfigurator.as_tupleN)r4r5r6rZr*r+rNrCrFrGrHrP�staticmethod�
__import__r9rYrBr5r6r.rTrUrrrrr)�s"
"r))rr�)��
__future__rr\r*rs�version_infor�
basestringrMrr��typesr�	file_type�__builtin__�builtins�ConfigParser�configparserZ	_backportrrr	r
rr�urllibr
rrrrrrr�urllib2rrrrrr r!r"r#r$�httplib�	xmlrpclib�Queue�queuer%�htmlentitydefs�	raw_input�	itertoolsr&�filterr'r1r)r/�io�strr0�urllib.parse�urllib.request�urllib.error�http.client�client�request�
xmlrpc.client�html.parser�
html.entities�entities�input�sslr2r3r:rGrBrSrTr(r[�F_OK�X_OK�zipfiler�r�rr�ZBaseZipExtFilertr�r�r��	NameError�collectionsr�r�r�r��getfilesystemencodingr�r��tokenizer��codecsr�r�r+r�r��htmlr;�cgir�r�r��reprlibr�r��impr�r�threadr�r�dummy_thread�_abcollrrrr��logging.configr)r*�Ir+r,r�r�r/r4r0rrrr�<module>s	(4F	@L
)

!A	




	

			
[


b



 
�

python3.4/site-packages/pip/_vendor/distlib/__pycache__/wheel.cpython-34.pyc000064400000065650151735047360022677 0ustar00�
�Res��@s�ddlmZddlZddlZddlZddlZddlmZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlmZmZddlmZmZmZmZmZddlmZddlm Z m!Z!dd	l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+dd
l,m-Z-m.Z.ej/e0�Z1da2e3ed�r�dZ4n9ej5j6d
�r�dZ4nej5dkr�dZ4ndZ4ej7d�Z8e8r$dej9dd�Z8nde8Z:e4e8Z;ej"j<�j=dd�j=dd�Z>ej7d�Z?e?o�e?j6d�r�e?j=dd�Z?ndd�Z@e@�Z?[@ejAdejBejCB�ZDejAdejBejCB�ZEejAd�ZFe
jGd krd!d"�ZHnd#d"�ZHGd$d%�d%eI�ZJeJ�ZKGd&d'�d'eI�ZLd(d)�ZMeM�ZN[Mdd*d+�ZOdS),�)�unicode_literalsN)�message_from_file�)�__version__�DistlibException)�	sysconfig�ZipFile�fsdecode�	text_type�filter)�InstalledDistribution)�Metadata�METADATA_FILENAME)	�FileOperator�convert_path�	CSVReader�	CSVWriter�Cache�cached_property�get_cache_base�read_exports�tempdir)�NormalizedVersion�UnsupportedVersionError�pypy_version_info�pp�java�jy�cli�ip�cp�py_version_nodotz%s%s��py�-�_�.�SOABIzcpython-cCs|dtg}tjd�r+|jd�ntjd�rJ|jd�ntjd�dkro|jd�nd	j|�S)
Nr �Py_DEBUG�d�
WITH_PYMALLOC�mZPy_UNICODE_SIZE��u�)�
VER_SUFFIXr�get_config_var�append�join)�parts�r4�4/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/wheel.py�_derive_abi;sr6zr
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?
-(?P<py>\w+\d+(\.\w+\d+)*)
-(?P<bi>\w+)
-(?P<ar>\w+)
\.whl$
z7
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?$
s
\s*#![^\r\n]*�/cCs|S)Nr4)�or4r4r5�<lambda>Zsr9cCs|jtjd�S)Nr7)�replace�os�sep)r8r4r4r5r9\sc@sOeZdZdd�Zdd�Zdd�Zddd	�Zd
d�ZdS)�MountercCsi|_i|_dS)N)�
impure_wheels�libs)�selfr4r4r5�__init__`s	zMounter.__init__cCs!||j|<|jj|�dS)N)r>r?�update)r@�pathname�
extensionsr4r4r5�addds
zMounter.addcCsI|jj|�}x0|D](\}}||jkr|j|=qqWdS)N)r>�popr?)r@rCrD�k�vr4r4r5�removehszMounter.removeNcCs"||jkr|}nd}|S)N)r?)r@�fullname�path�resultr4r4r5�find_modulens	zMounter.find_modulecCs�|tjkrtj|}nx||jkrAtd|��ntj||j|�}||_|jdd�}t|�dkr�|d|_	n|S)Nzunable to find extension for %sr&rr)
�sys�modulesr?�ImportError�imp�load_dynamic�
__loader__�rsplit�len�__package__)r@rJrLr3r4r4r5�load_moduleus	zMounter.load_module)�__name__�
__module__�__qualname__rArErIrMrWr4r4r4r5r=_s
r=c@s`eZdZdZd2ZdZddddd�Zedd	��Zed
d��Z	edd
��Z
edd��Zdd�Z
edd��Zdd�Zddd�Zdd�Zdd�Zdd�Zdddd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zdd*d+�Zd,d-�Zd.d/�Zdd0d1�ZdS)3�Wheelz@
    Class to build and install from Wheel files (PEP 427).
    r�sha256NFcCs�||_||_d|_tg|_dg|_dg|_tj�|_	|dkr{d|_
d|_|j|_
nEtj|�}|r�|jd�}|d|_
|djd	d
�|_|d|_|j|_
n�tjj|�\}}tj|�}|s!td|��n|r?tjj|�|_	n||_
|jd�}|d|_
|d|_|d|_|d
jd�|_|djd�|_|djd�|_dS)zB
        Initialise an instance using a (valid) filename.
        r.�none�anyN�dummyz0.1�nm�vnr%r$ZbnzInvalid name or filename: %rr#r&Zbi�ar)�signZ
should_verify�buildver�PYVER�pyver�abi�archr;�getcwd�dirname�name�version�filename�	_filename�NAME_VERSION_RE�match�	groupdictr:rK�split�FILENAME_REr�abspath)r@rmrc�verifyr+�inforjr4r4r5rA�sB					


	


zWheel.__init__cCs�|jrd|j}nd}dj|j�}dj|j�}dj|j�}|jjdd�}d|j|||||fS)zJ
        Build and return a filename from the various components.
        r$r.r&r%z%s-%s%s-%s-%s-%s.whl)rdr2rfrgrhrlr:rk)r@rdrfrgrhrlr4r4r5rm�s	zWheel.filenamecCs+tjj|j|j�}tjj|�S)N)r;rKr2rjrm�isfile)r@rKr4r4r5�exists�szWheel.existsccsNxG|jD]<}x3|jD](}x|jD]}|||fVq*WqWq
WdS)N)rfrgrh)r@rfrgrhr4r4r5�tags�sz
Wheel.tagscCs-tjj|j|j�}d|j|jf}d|}tjd�}t	|d���}|j
|�}|djdd�}tdd	�|D��}|d
kr�d
}	nt
}	yItj||	�}
|j|
��"}||�}td|�}
WdQXWn"tk
r"td|	��YnXWdQX|
S)Nz%s-%sz%s.dist-infozutf-8�rz
Wheel-Versionr&rcSsg|]}t|��qSr4)�int)�.0�ir4r4r5�
<listcomp>�s	z"Wheel.metadata.<locals>.<listcomp>�METADATA�fileobjz$Invalid wheel, because %s is missing)rr)r;rKr2rjrmrkrl�codecs�	getreaderr�get_wheel_metadatarr�tupler�	posixpath�openr
�KeyError�
ValueError)r@rC�name_ver�info_dir�wrapper�zf�wheel_metadata�wv�file_version�fn�metadata_filename�bf�wfrLr4r4r5�metadata�s(
	
zWheel.metadatac	Csud|j|jf}d|}tj|d�}|j|��(}tjd�|�}t|�}WdQXt|�S)Nz%s-%sz%s.dist-info�WHEELzutf-8)	rkrlr�r2r�r�r�r�dict)r@r�r�r�r�r�r��messager4r4r5r��s
zWheel.get_wheel_metadatac	CsFtjj|j|j�}t|d��}|j|�}WdQX|S)Nrz)r;rKr2rjrmrr�)r@rCr�rLr4r4r5rv�sz
Wheel.infocCs�tj|�}|r2d||j�d�}nv|jd�}|jd�}|dksh||krqd}n)|||d�dkr�d}nd}d||}|S)Ns#!pythons
s
rr"s
)�
SHEBANG_RErp�end�find)r@�datar+�cr�lf�termr4r4r5�process_shebang�s		zWheel.process_shebangcCs�|dkr|j}nytt|�}Wn"tk
rOtd|��YnX||�j�}tj|�jd�j	d�}||fS)NzUnsupported hash algorithm: %r�=�ascii)
�	hash_kind�getattr�hashlib�AttributeErrorr�digest�base64�urlsafe_b64encode�rstrip�decode)r@r�r��hasherrLr4r4r5�get_hashs
!zWheel.get_hashcCsht|��V}x|D]}|j|�qWttjj||��}|j|ddf�WdQXdS)Nr.)r�writerow�to_posixr;rK�relpath)r@�recordsZrecord_path�base�writer�row�pr4r4r5�write_records

zWheel.write_recordcCs�g}|\}}tt|j�}xs|D]k\}}	t|	d��}
|
j�}WdQXd|j|�}tjj|	�}
|j	|||
f�q+Wtjj
|d�}	|j||	|�ttjj
|d��}|j	||	f�dS)N�rbz%s=%s�RECORD)
r�r�r�r��readr�r;rK�getsizer1r2r�r�)r@rv�libdir�
archive_pathsr��distinfor�r��apr��fr�r��sizer4r4r5�
write_recordsszWheel.write_recordscCs\t|dtj��A}x7|D]/\}}tjd||�|j||�qWWdQXdS)N�wzWrote %s to %s in wheel)r�zipfile�ZIP_DEFLATED�logger�debug�write)r@rCr�r�r�r�r4r4r5�	build_zip.szWheel.build_zipc!s�|dkri}ntt�fdd�d%��d}|dkrjd}tg}tg}tg}n!d}tg}d	g}d
g}|jd|�|_|jd|�|_|jd
|�|_	�|}	d|j
|jf}
d|
}d|
}g}
xKd&D]C}|�kr#qn�|}tj
j|�rxtj|�D]�\}}}x�|D]�}ttj
j||��}tj
j||�}ttj
j|||��}|
j||f�|dkre|jd�ret|d��}|j�}WdQX|j|�}t|d��}|j|�WdQXqeqeWqOWqqW|	}d}xtj|�D]�\}}}||kr�xUt|�D]G\}}t|�}|jd�r�tj
j||�}||=Pq�q�W|s�td��nxl|D]d}t|�jd'�rq�ntj
j||�}ttj
j||��}|
j||f�q�WqnWtj|�}xf|D]^}|d(krttj
j||��}ttj
j||��}|
j||f�qqWd|p�|jdtd |g}x4|jD])\}}}|jd!|||f�qWtj
j|d"�}t|d#��}|jd$j|��WdQXttj
j|d"��}|
j||f�|j ||f|	|
�tj
j|j!|j"�} |j#| |
�| S))z�
        Build a wheel from files in specified paths, and use any specified tags
        when determining the name of the wheel.
        Ncs
|�kS)Nr4)r8)�pathsr4r5r9<szWheel.build.<locals>.<lambda>�purelib�platlibr�false�truer]r^rfrgrhz%s-%sz%s.dataz%s.dist-infor��headers�scriptsz.exer��wbz
.dist-infoz(.dist-info directory expected, not found�.pyc�.pyor��	INSTALLER�SHAREDzWheel-Version: %d.%dzGenerator: distlib %szRoot-Is-Purelib: %sz
Tag: %s-%s-%sr�r��
)zpurelibzplatlib)zdatazheaderszscripts)r�r�)zRECORDr�r�)$�listr�IMPVER�ABI�ARCHre�getrfrgrhrkrlr;rK�isdir�walkr	r2r�r�r1�endswithr�r�r�r��	enumerate�AssertionError�listdir�
wheel_versionrryr�rjrmr�)!r@r�ryr�Zlibkey�is_pureZ
default_pyverZdefault_abiZdefault_archr�r��data_dirr�r��keyrK�root�dirs�filesr�r��rpr�r�r�r�r}�dnr�rfrgrhrCr4)r�r5�build4s�	%					





%


zWheel.buildcBCKs	|j}|jd�}|jdd�}tjj|j|j�}d|j|jf}d|}	d|}
t	j|
t
�}t	j|
d�}t	j|
d�}
tjd	�}t
|d
���}|j|��}||�}t|�}WdQX|djd
d�}tdd�|D��}||jkrM|rM||j|�n|ddkrj|d}n
|d}i}|j|
��D}td|��,}x"|D]}|d}|||<q�WWdQXWdQXt	j|	d�}t	j|
d�}t	j|	dd�}td|�}d|_tj}g} tj�}!|!|_d|_zy�x�|j�D]�}"|"j}#t|#t�r�|#}$n|#jd	�}$|$j d�r�qan||$}|dr�t!|"j"�|dkr�t#d|$��n|drp|djdd�\}%}&|j|#��}|j$�}'WdQX|j%|'|%�\}(})|)|&krpt#d|#��qpn|r�|$j&||f�r�t'j(d |$�qan|$j&|�o�|$j d!�}*|$j&|�r|$jd"d�\}(}+},tjj||+t)|,��}-n3|$||
fkr$qantjj|t)|$��}-|*sL|j|#��}|j*||-�WdQX| j+|-�|r�|dr�t|-d#��J}|j$�}'|j%|'|%�\}(}.|.|)kr�t#d$|-��nWdQXn|r�|-j d%�r�y |j,|-�}/| j+|/�WqIt-k
rEt'j.d&d'd�YqIXq�qatjj/t)|#��}0tjj|!|0�}1|j|#��}|j*||1�WdQXtjj|-�\}2}0|2|_|j0|0�}3|j1|3�| j2|3�qaW|rt'j(d(�d}4n$d}5|j3d}|d)kr&t	j|
d*�}6y�|j|6��}t4|�}7WdQXi}5x�d;D]�}8d-|8}9|9|7krpi|5d.|8<}:x[|7|9j5�D]F};d/|;j6|;j7f}<|;j8r�|<d0|;j87}<n|<|:|;j<q�WqpqpWWq�t-k
r"t'j.d1�Yq�Xnby@|j|��+}||�}t9j:|�jd2�}5WdQXWnt-k
r�t'j.d3�YnX|5r�|5jd4i�}=|5jd5i�}>|=s�|>r�|jdd�}?tjj;|?�s�t<d6��n|?|_xF|=j=�D]8\}9};d7|9|;f}@|j0|@�}3|j1|3�qW|>r�idd,6}AxL|>j=�D];\}9};d7|9|;f}@|j0|@|A�}3|j1|3�qcWq�q�ntjj||
�}t>|�}4t?|�}|d=|d=||d8<|4j@||�}|r	| j+|�n|4jA| |d9|�|4SWn,t-k
rb	t'jBd:�|jC��YnXWdtDjE|!�XWdQXdS)<a�
        Install a wheel to the specified paths. If kwarg ``warner`` is
        specified, it should be a callable, which will be called with two
        tuples indicating the wheel version of this software and the wheel
        version in the file, if there is a discrepancy in the versions.
        This can be used to issue any warnings to raise any exceptions.
        If kwarg ``lib_only`` is True, only the purelib/platlib files are
        installed, and the headers, scripts, data and dist-info metadata are
        not written.

        The return value is a :class:`InstalledDistribution` instance unless
        ``options.lib_only`` is True, in which case the return value is ``None``.
        �warner�lib_onlyFz%s-%sz%s.dataz%s.dist-infor�r�zutf-8rzNz
Wheel-Versionr&rcSsg|]}t|��qSr4)r{)r|r}r4r4r5r~�s	z!Wheel.install.<locals>.<listcomp>zRoot-Is-Purelibr�r�r��streamrr.r��dry_runTz/RECORD.jwsr"zsize mismatch for %s�=zdigest mismatch for %szlib_only: skipping %sz.exer7r�zdigest mismatch on write for %sz.pyzByte-compilation failed�exc_infozlib_only: returning Nonez1.0zentry_points.txt�console�guiz
%s_scriptszwrap_%sz%s:%sz %szAUnable to read legacy script metadata, so cannot generate scripts�commandsz8Unable to read JSON metadata, so cannot generate scriptsZwrap_consoleZwrap_guizValid script path not specifiedz%s = %s�lib�prefixzinstallation failed.)zconsolezgui)Fr�r�r;rKr2rjrmrkrlr�rr�r�rr�rrrr�r�rr�recordrN�dont_write_bytecode�tempfile�mkdtemp�
source_dir�
target_dir�infolist�
isinstancer
r�r��str�	file_sizerr�r��
startswithr�r�r�copy_streamr1�byte_compile�	Exception�warning�basename�make�set_executable_mode�extendrvr�valuesr��suffix�flags�json�loadr�r��itemsrr�Zwrite_shared_locationsZwrite_installed_files�	exception�rollback�shutil�rmtree)Br@r��maker�kwargsr�r�r�rCr�r�r��
metadata_name�wheel_metadata_name�record_namer�r��bwfr�r�r�r�r�r�r��readerr�r�Zdata_pfxZinfo_pfxZ
script_pfx�fileopZbc�outfiles�workdir�zinfo�arcname�	u_arcname�kind�valuer�r%r�Z	is_script�wherer��outfileZ	newdigestZpycr�Zworknamer��	filenames�distr��epZepdatar�rGr)rH�s�console_scripts�gui_scriptsZ
script_dir�script�optionsr4r4r5�install�s>	





	
				
#

"

	

	


	
"
	




z
Wheel.installcCsMtdkrItjjt�td�tjdd��}t|�antS)Nzdylib-cache�)	�cacher;rKr2rr�rNrlr)r@r�r4r4r5�_get_dylib_cache~s
zWheel._get_dylib_cachecCs�tjj|j|j�}d|j|jf}d|}tj|d�}tj	d�}g}t
|d��x}y\|j|��G}||�}	tj
|	�}
|j�}|j|�}tjj|j|�}
tjj|
�s�tj|
�nx�|
j�D]�\}}tjj|
t|��}tjj|�sHd}nQtj|�j}tjj|�}|j|�}tj|j�}||k}|r�|j||
�n|j||f�qWWdQXWntk
r�YnXWdQX|S)Nz%s-%sz%s.dist-infoZ
EXTENSIONSzutf-8rzT)r;rKr2rjrmrkrlr�r�r�rr�rrr.�
prefix_to_dirr�r��makedirsr
rrx�stat�st_mtime�datetime�
fromtimestamp�getinfo�	date_time�extractr1r�)r@rCr�r�rr�rLr�r�r�rDr-r�Z
cache_baserkr��destr7Z	file_timervZ
wheel_timer4r4r5�_get_extensions�s>
	!
zWheel._get_extensionscCs
t|�S)zM
        Determine if a wheel is compatible with the running system.
        )�
is_compatible)r@r4r4r5r:�szWheel.is_compatiblecCsdS)zP
        Determine if a wheel is asserted as mountable by its metadata.
        Tr4)r@r4r4r5�is_mountable�szWheel.is_mountablecCs
tjjtjj|j|j��}|j�sLd|}t|��n|j�sqd|}t|��n|t	jkr�t
jd|�ns|r�t	jj|�nt	jj
d|�|j�}|rtt	jkr�t	jjt�ntj||�ndS)Nz)Wheel %s not compatible with this Python.z$Wheel %s is marked as not mountable.z%s already in pathr)r;rKrtr2rjrmr:rr;rNr�r�r1�insertr9�_hook�	meta_pathrE)r@r1rC�msgrDr4r4r5�mount�s"'

zWheel.mountcCs�tjjtjj|j|j��}|tjkrItjd|�n]tjj	|�|t
jkrxt
j	|�nt
js�t
tjkr�tjj	t
�q�ndS)Nz%s not in path)
r;rKrtr2rjrmrNr�r�rIr=r>r>)r@rCr4r4r5�unmount�s'	z
Wheel.unmountc#Cs�tjj|j|j�}d|j|jf}d|}d|}tj|t�}tj|d�}tj|d�}t	j
d�}t|d��}	|	j|��}
||
�}t
|�}WdQX|djd	d
�}
tdd�|
D��}i}|	j|��D}td
|��,}x"|D]}|d}|||<q,WWdQXWdQXx<|	j�D].}|j}t|t�r�|}n|jd�}d|kr�td|��n|jd�r�qcn||}|dr
t|j�|dkr
td|��n|d
rc|d
jdd
�\}}|	j|��}|j�}WdQX|j||�\}}||kr�td|��q�qcqcWWdQXdS)Nz%s-%sz%s.dataz%s.dist-infor�r�zutf-8rzz
Wheel-Versionr&rcSsg|]}t|��qSr4)r{)r|r}r4r4r5r~�s	z Wheel.verify.<locals>.<listcomp>r�rz..zinvalid entry in wheel: %rz/RECORD.jwsr"zsize mismatch for %sr�zdigest mismatch for %s)r;rKr2rjrmrkrlr�rr�r�rr�rrrr�rr�r�r
r�rr�r�r�r�r�)r@rCr�r�r�rrrr�r�rr�r�r�r�r�r�rr�r�rrrrr r�r%r�r4r4r5ru�sT



		

#

zWheel.verifycKs�dd�}dd�}tjj|j|j�}d|j|jf}d|}tj|d�}	t��(}
t	|d���}i}x�|j
�D]�}
|
j}t|t�r�|}n|j
d	�}||	kr�q�nd
|kr�td|��n|j|
|
�tjj|
t|��}|||<q�WWdQX|||�\}}|||�}|r�|||�\}}|r�||kr�|||�n|dkr�tjd
dddd|
�\}}tj|�n=tjj|�std|��ntjj||j�}t|j��}tjj|
|�}||f}|j||
|�|j||�|dkr�tj||�q�nWdQX|S)a�
        Update the contents of a wheel in a generic way. The modifier should
        be a callable which expects a dictionary argument: its keys are
        archive-entry paths, and its values are absolute filesystem paths
        where the contents the corresponding archive entries can be found. The
        modifier is free to change the contents of the files pointed to, add
        new entries and remove entries, before returning. This method will
        extract the entire contents of the wheel to a temporary location, call
        the modifier, and then use the passed (and possibly updated)
        dictionary to write a new wheel. If ``dest_dir`` is specified, the new
        wheel is written there -- otherwise, the original wheel is overwritten.

        The modifier should return True if it updated the wheel, else False.
        This method returns the same value the modifier returns.
        cSshd}}d|tf}||kr3d|}n||kr^||}td|�j}n||fS)Nz%s/%sz%s/PKG-INFOrK)rr
rl)�path_mapr�rlrKr�r4r4r5�get_versions


z!Wheel.update.<locals>.get_versionc
Ss)d}y�t|�}|jd�}|dkr=d|}nhdd�||dd�jd�D�}|dd7<d|d|�djd	d
�|D��f}Wn"tk
r�tjd|�YnX|r%td|�}||_|j	t
�}|jd|d
|�tjd||�ndS)Nr$rz%s-1cSsg|]}t|��qSr4)r{)r|r&r4r4r5r~/s	z8Wheel.update.<locals>.update_version.<locals>.<listcomp>rr&z%s-%scss|]}t|�VqdS)N)r�)r|r}r4r4r5�	<genexpr>2sz7Wheel.update.<locals>.update_version.<locals>.<genexpr>z0Cannot update non-compliant (PEP-440) version %rrK�legacyzVersion updated from %r to %r���)rr�rrr2rr�r�r
rlr�rr�)rlrK�updatedrHr}r3ZmdrEr4r4r5�update_version's(
*$
		z$Wheel.update.<locals>.update_versionz%s-%sz%s.dist-infor�rzzutf-8z..zinvalid entry in wheel: %rNr	z.whlr�z
wheel-update-�dirzNot a directory: %r)r;rKr2rjrmrkrlr�rrr�r�r
r�rr7rr��mkstemp�closer�r�r
r�r�r�copyfile)r@�modifier�dest_dirrrCrHrCr�r�rrr�rBrrrrKZoriginal_versionr%�modified�current_version�fd�newpathr�r�rvr4r4r5rBsX

		
zWheel.update)rr)rXrYrZ�__doc__r�r�rA�propertyrmrxryrr�r�rvr�r�r�r�r�r�r+r.r9r:r;r@rArurBr4r4r4r5r[�s2)	h�	"6r[cCs�tg}td}xGttjdddd�D](}|jdj|t|�g��q1Wg}xLtj�D]>\}}}|j	d�rp|j|j
dd�d�qpqpW|j�tdkr�|j
dt�n|jd�g}tg}tjdkr=tjd	t�}|r=|j�\}	}}}
t|�}|
g}|
dkrg|jd�n|
dkr�|jd�n|
dkr�|jd�n|
dkr�|jd�n|
dkr�|jd�nx`|dkr6x@|D]8}d|	|||f}
|
tkr�|j|
�q�q�W|d8}q�Wq=nxH|D]@}x7|D]/}
|jdjt|df�||
f�qQWqDWxwt|�D]i\}}|jdjt|f�ddf�|dkr�|jdjt|df�ddf�q�q�Wxwt|�D]i\}}|jdjd|f�ddf�|dkr|jdjd|df�ddf�qqWt|�S)zG
    Return (pyver, abi, arch) tuples compatible with this Python.
    rrr.z.abir&r"r]�darwinz(\w+)_(\d+)_(\d+)_(\w+)$�i386�ppcZfat�x86_64Zfat3�ppc64Zfat64�intel�	universalz%s_%s_%s_%sr^r#rFrF)rV�ppc)rVr\rX)rYrX)rVrX)rVrXrZr\rY)r/�rangerN�version_infor1r2r�rQ�get_suffixesr�rr�sortr�r<r��platform�rerp�groupsr{�
IMP_PREFIXr��set)�versions�major�minor�abisr	r%rLZarchesr+rkrh�matchesrpr&rgr}rlr4r4r5�compatible_tagsqs`	
$&$

		


1%0%0rkcCs�t|t�st|�}nd}|dkr9t}nxN|D]F\}}}||jkr@||jkr@||jkr@d}Pq@q@W|S)NFT)r�r[�COMPATIBLE_TAGSrfrgrh)�wheelryrL�verrgrhr4r4r5r:�s	-r:)P�
__future__rr�r�r3�distutils.util�	distutils�emailrr�rQr�loggingr;r�rbrrNr�r�r.rr�compatrrr	r
rZdatabaserr�r
r�utilrrrrrrrrrrlrr�	getLoggerrXr�r-�hasattrrdrar�r0r/r^rer��get_platformr:r�r�r6�compile�
IGNORECASE�VERBOSErsror�r<r��objectr=r=r[rkrlr:r4r4r4r5�<module>sx(@			

'		#	���>	python3.4/site-packages/pip/_vendor/distlib/__pycache__/locators.cpython-34.pyc000064400000115026151735047360023412 0ustar00�
�Reb��@sddlZddlmZddlZddlZddlZddlZddlZyddlZWne	k
r�ddl
ZYnXddlZddlm
Z
ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZm Z m!Z!ddl"m#Z#ddl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,dd	l-m.Z.m/Z/dd
l0m1Z1m2Z2ej3e4�Z5ej6d�Z7ej6dej8�Z9ej6d
�Z:dZ;ddd�Z<Gdd�de�Z=Gdd�de>�Z?Gdd�de?�Z@Gdd�de?�ZAGdd�de>�ZBGdd�de?�ZCGdd�de?�ZDGdd �d e?�ZEGd!d"�d"e?�ZFGd#d$�d$e?�ZGeGeE�eCd%d&d'�d(d)�ZHeHjIZIej6d*�ZJGd+d,�d,e>�ZKdS)-�N)�BytesIO�)�DistlibException)�urljoin�urlparse�
urlunparse�url2pathname�pathname2url�queue�quote�unescape�string_types�build_opener�HTTPRedirectHandler�Request�	HTTPError�URLError)�Distribution�DistributionPath�	make_dist)�Metadata)�cached_property�parse_credentials�ensure_slash�split_filename�get_project_data�parse_requirement�parse_name_and_version�ServerProxy)�
get_scheme�UnsupportedVersionError)�Wheel�
is_compatiblez^(\w+)=([a-f0-9]+)z;\s*charset\s*=\s*(.*)\s*$ztext/html|application/x(ht)?mlzhttp://python.org/pypicCs1|dkrt}nt|dd�}|j�S)z�
    Return all distribution names known by an index.
    :param url: The URL of the index.
    :return: A list of all known distribution names.
    N�timeoutg@)�
DEFAULT_INDEXr�
list_packages)�url�client�r(�7/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/locators.py�get_all_distribution_names)s	r*c@s0eZdZdZdd�ZeZZZdS)�RedirectHandlerzE
    A class to work around a bug in some Python 3.2.x releases.
    c	Cs�d}x(dD] }||kr
||}Pq
q
W|dkrAdSt|�}|jdkr�t|j�|�}t|d�r�|j||�q�|||<ntj||||||�S)N�location�uri��replace_header)zlocationzuri)r�schemer�get_full_url�hasattrr/�BaseRedirectHandler�http_error_302)	�self�req�fp�code�msg�headers�newurl�key�urlpartsr(r(r)r4=s


zRedirectHandler.http_error_302N)�__name__�
__module__�__qualname__�__doc__r4�http_error_301�http_error_303�http_error_307r(r(r(r)r+4sr+c@s�eZdZdZd+Zd,Zd-ZdZed.Zd
dd�Z	dd�Z
dd�Zdd�Ze
ee�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)d*�ZdS)/�LocatorzG
    A base class for locators - things that locate distributions.
    �.tar.gz�.tar.bz2�.tar�.zip�.tgz�.tbz�.egg�.exe�.whl�.pdfN�defaultcCs1i|_||_tt��|_d|_dS)a^
        Initialise an instance.
        :param scheme: Because locators look for most recent versions, they
                       need to know the version scheme to use. This specifies
                       the current PEP-recommended scheme - use ``'legacy'``
                       if you need to support existing distributions on PyPI.
        N)�_cacher0rr+�opener�matcher)r5r0r(r(r)�__init__cs		zLocator.__init__cCs|jj�dS)N)rQ�clear)r5r(r(r)�clear_cacheuszLocator.clear_cachecCs|jS)N)�_scheme)r5r(r(r)�_get_schemexszLocator._get_schemecCs
||_dS)N)rW)r5�valuer(r(r)�_set_scheme{szLocator._set_schemecCstd��dS)a=
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This should be implemented in subclasses.

        If called from a locate() request, self.matcher will be set to a
        matcher for the requirement to satisfy, otherwise it will be None.
        z Please implement in the subclassN)�NotImplementedError)r5�namer(r(r)�_get_project�s
zLocator._get_projectcCstd��dS)zJ
        Return all the distribution names known to this locator.
        z Please implement in the subclassN)r[)r5r(r(r)�get_distribution_names�szLocator.get_distribution_namescCs`|jdkr!|j|�}n;||jkr@|j|}n|j|�}||j|<|S)z�
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This calls _get_project to do all the work, and just implements a caching layer on top.
        N)rQr])r5r\�resultr(r(r)�get_project�s
zLocator.get_projectcCs7t|�}|jdkd|jktj|j�fS)zu
        Give an url a score which can be used to choose preferred URLs
        for a given project release.
        �httpszpypi.python.org)rr0�netloc�	posixpath�basename�path)r5r&�tr(r(r)�	score_url�szLocator.score_urlcCs{|}|rw|j|�}|j|�}||kr?|}n||kratjd||�qwtjd||�n|S)aL
        Choose one of two URLs where both are candidates for distribution
        archives for the same version of a distribution (for example,
        .tar.gz vs. zip).

        The current implement favours http:// URLs over https://, archives
        from PyPI over those from other locations and then the archive name.
        zNot replacing %r with %rzReplacing %r with %r)rg�logger�debug)r5�url1�url2r_�s1�s2r(r(r)�
prefer_url�s		zLocator.prefer_urlcCs
t||�S)zZ
        Attempt to split a filename in project name, version and Python version.
        )r)r5�filename�project_namer(r(r)r�szLocator.split_filenamecCs�dd�}d}t|�\}}}}}	}
|
j�jd�r[tjd||
�ntj|
�}|r�|j�\}}
nd\}}
|}|r�|ddkr�|dd�}n|jd�r�y�t	|�}t
||j�r�|dkrd	}n||j|�}|r�i|jd
6|j
d6|jd6t|||||	d
f�d6djdd�|jD��d6}q�nWq�tk
r�}ztjd|�WYdd}~Xq�Xn|j|j�r�tj|�}}x�|jD]�}|j|�r�|dt|��}|j||�}|sHtjd|�nu|\}}}|sm|||�r�i|d
6|d6|d6t|||||	d
f�d6}|r�||d<q�nPq�q�Wn|r�|r�|
|d|<n|S)a
        See if a URL is a candidate for a download URL for a project (the URL
        has typically been scraped from an HTML page).

        If it is, a dictionary is returned with keys "name", "version",
        "filename" and "url"; otherwise, None is returned.
        cSsV|j�|j�}}||kr.d}n$|jdd�|jdd�k}|S)NT�_�-)�lower�replace)Zname1Zname2r_r(r(r)�same_project�s
	$z:Locator.convert_url_to_download_info.<locals>.same_projectNzegg=z %s: version hint in fragment: %rr�/z.whlTr\�versionror.r&z, cSs/g|]%}djt|dd����qS)�.�N)�join�list)�.0�vr(r(r)�
<listcomp>�s	z8Locator.convert_url_to_download_info.<locals>.<listcomp>zpython-versionzinvalid path for wheel: %sz No match for project/version: %sz	%s_digest)NN���r)rrs�
startswithrhri�HASHER_HASH�match�groups�endswithr!r"�
wheel_tagsr\rwrorrz�pyver�	Exception�warning�downloadable_extensionsrcrd�lenr)r5r&rprur_r0rbre�params�query�frag�m�algo�digestZorigpath�wheel�include�ero�extrfr\rwr�r(r(r)�convert_url_to_download_info�sj
	
	


'&z$Locator.convert_url_to_download_infocCsEd}x8dD]0}d|}||kr
|||f}Pq
q
W|S)z�
        Get a digest from a dictionary by looking at keys of the form
        'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
        N�sha256�md5z	%s_digest)zsha256zmd5r()r5�infor_r�r<r(r(r)�_get_digests

zLocator._get_digestcCs�|jd�}|jd�}||kr@||}|j}n!t||d|j�}|j}|j|�|_|j|dkr�|j|j|d�|_n||_|||<dS)z�
        Update a result dictionary (the final result from _get_project) with a dictionary for a
        specific version, whih typically holds information gleaned from a filename or URL for an
        archive for the distribution.
        r\rwr0r&N)	�pop�metadatarr0r�r��
source_urlrn�locator)r5r_r�r\rw�dist�mdr(r(r)�_update_version_data#s
		zLocator._update_version_dataFcCs�d}t|�}|dkr1td|��nt|j�}|j|j�|_}tjd|t|�j	�|j
|j�}|r�g}|j}	x�|D]�}
ye|j
|
�s�tjd||
�n<|s�|	|
�jr�|j|
�ntjd|
|j�Wq�tk
r5tjd||
�Yq�Xq�Wt|�dkrdt|d|j�}n|r�tjd	|�||d
}q�n|r�|jr�|j|_nd|_|S)a
        Find the most recent distribution which matches the given
        requirement.

        :param requirement: A requirement of the form 'foo (1.0)' or perhaps
                            'foo (>= 1.0, < 2.0, != 1.3)'
        :param prereleases: If ``True``, allow pre-release versions
                            to be located. Otherwise, pre-release versions
                            are not returned.
        :return: A :class:`Distribution` instance, or ``None`` if no such
                 distribution could be located.
        NzNot a valid requirement: %rzmatcher: %s (%s)z%s did not match %rz%skipping pre-release version %s of %szerror matching %s with %rrr<zsorted list: %sr)rrrr0rS�requirementrhri�typer>r`r\�
version_classr��
is_prerelease�appendr�r�r��sortedr<�extras)r5r��prereleasesr_�rr0rS�versions�slistZvcls�kr(r(r)�locate7s>
	
	
		zLocator.locate)rFrGrHrIrJrK)rLrMrN)rO)rN)r>r?r@rA�source_extensions�binary_extensions�excluded_extensionsr�r�rTrVrXrZ�propertyr0r]r^r`rgrnrr�r�r�r�r(r(r(r)rESs*
	MrEcs@eZdZdZ�fdd�Zdd�Zdd�Z�S)�PyPIRPCLocatorz�
    This locator uses XML-RPC to locate distributions. It therefore
    cannot be used with simple mirrors (that only mirror file content).
    cs8tt|�j|�||_t|dd�|_dS)z�
        Initialise an instance.

        :param url: The URL to use for XML-RPC.
        :param kwargs: Passed to the superclass constructor.
        r#g@N)�superr�rT�base_urlrr')r5r&�kwargs)�	__class__r(r)rTms	zPyPIRPCLocator.__init__cCst|jj��S)zJ
        Return all the distribution names known to this locator.
        )�setr'r%)r5r(r(r)r^xsz%PyPIRPCLocator.get_distribution_namesc
Csi}|jj|d�}x�|D]�}|jj||�}|jj||�}td|j�}|d|_|d|_|jd�|_	|jdg�|_
|jd�|_t|�}|r"|d}	|	d	|_
|j|	�|_||_|||<q"q"W|S)
NTr0r\rw�license�keywords�summaryrr&)r'Zpackage_releasesZrelease_urlsZrelease_datarr0r\rw�getr�r�r�rr�r�r�r�)
r5r\r_r�r}�urls�datar�r�r�r(r(r)r]~s&




	zPyPIRPCLocator._get_project)r>r?r@rArTr^r]r(r()r�r)r�hsr�cs@eZdZdZ�fdd�Zdd�Zdd�Z�S)�PyPIJSONLocatorzw
    This locator uses PyPI's JSON interface. It's very limited in functionality
    nad probably not worth using.
    cs)tt|�j|�t|�|_dS)N)r�r�rTrr�)r5r&r�)r�r(r)rT�szPyPIJSONLocator.__init__cCstd��dS)zJ
        Return all the distribution names known to this locator.
        zNot available from this locatorN)r[)r5r(r(r)r^�sz&PyPIJSONLocator.get_distribution_namescCsbi}t|jdt|��}y|jj|�}|j�j�}tj|�}t	d|j
�}|d}|d|_|d|_|j
d�|_|j
dg�|_|j
d�|_t|�}|d	}	|	r%|	d
}
|
d|_|j|
�|_||_|||j<nWn5tk
r]}ztjd|�WYdd}~XnX|S)
Nz%s/jsonr0r�r\rwr�r�r�r�rr&zJSON fetch failed: %s)rr�rrR�open�read�decode�json�loadsrr0r\rwr�r�r�r�rr�r�r�r�r�rh�	exception)r5r\r_r&�respr��dr�r�r�r�r�r(r(r)r]�s0





	#zPyPIJSONLocator._get_project)r>r?r@rArTr^r]r(r()r�r)r��sr�c@s�eZdZdZejdejejBejB�Z	ejdejejB�Z
dd�Zejdej�Ze
dd��Zd	S)
�Pagez4
    This class represents a scraped HTML page.
    z�
(rel\s*=\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\s
]*))\s+)?
href\s*=\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\s
]*))
(\s+rel\s*=\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\s
]*)))?
z!<base\s+href\s*=\s*['"]?([^'">]+)cCsM||_||_|_|jj|j�}|rI|jd�|_ndS)zk
        Initialise an instance with the Unicode page contents and the URL they
        came from.
        rN)r�r�r&�_base�search�group)r5r�r&r�r(r(r)rT�s
	z
Page.__init__z[^a-z0-9$&+,/:;=?@.#%_\\|-]cCsdd�}t�}x�|jj|j�D]�}|jd�}|dpy|dpy|dpy|dpy|dpy|d	}|d
p�|dp�|d}t|j|�}t|�}|jj	d
d�|�}|j
||f�q+Wt|ddd�dd�}|S)z�
        Return the URLs of all the links on a page together with information
        about their "rel" attribute, for determining which ones to treat as
        downloads and which ones to queue for further scraping.
        cSs@t|�\}}}}}}t||t|�|||f�S)zTidy up an URL.)rrr)r&r0rbrer�r�r�r(r(r)�clean�szPage.links.<locals>.cleanr.Zrel1Zrel2Zrel3Zrel4Zrel5Zrel6rjrkZurl3cSsdt|jd��S)Nz%%%2xr)�ordr�)r�r(r(r)�<lambda>�szPage.links.<locals>.<lambda>r<cSs|dS)Nrr()rfr(r(r)r��s�reverseT)r��_href�finditerr��	groupdictrr�r�	_clean_re�sub�addr�)r5r�r_r�r��relr&r(r(r)�links�s	z
Page.linksN)r>r?r@rA�re�compile�I�S�Xr�r�rTr�rr�r(r(r(r)r��sr�cs�eZdZdZiejd6dd�d6dd�d6Zdd	�fd
d�Zdd
�Zdd�Z	dd�Z
ejdej
�Zdd�Zdd�Zdd�Zdd�Zdd�Zejd�Zdd�Z�S) �SimpleScrapingLocatorz�
    A locator which scrapes HTML pages to locate downloads for a distribution.
    This runs multiple threads to do the I/O; performance is at least as good
    as pip's PackageFinder, which works in an analogous fashion.
    �deflatecCstjdtt��j�S)N�fileobj)�gzip�GzipFilerr�r�)�br(r(r)r�szSimpleScrapingLocator.<lambda>r�cCs|S)Nr()r�r(r(r)r�s�noneN�
cs�tt|�j|�t|�|_||_i|_t�|_t	j
�|_t�|_d|_
||_tj�|_tj�|_dS)a�
        Initialise an instance.
        :param url: The root URL to use for scraping.
        :param timeout: The timeout, in seconds, to be applied to requests.
                        This defaults to ``None`` (no timeout specified).
        :param num_workers: The number of worker threads you want to do I/O,
                            This defaults to 10.
        :param kwargs: Passed to the superclass.
        FN)r�r�rTrr�r#�_page_cacher��_seenr
�Queue�	_to_fetch�
_bad_hosts�skip_externals�num_workers�	threading�RLock�_lock�_gplock)r5r&r#r�r�)r�r(r)rTs
				zSimpleScrapingLocator.__init__cCscg|_xSt|j�D]B}tjd|j�}|jd�|j�|jj|�qWdS)z�
        Threads are created only when get_project is called, and terminate
        before it returns. They are there primarily to parallelise I/O (i.e.
        fetching web pages).
        �targetTN)	�_threads�ranger�r��Thread�_fetch�	setDaemon�startr�)r5�irfr(r(r)�_prepare_threadss	

z&SimpleScrapingLocator._prepare_threadscCsOx!|jD]}|jjd�q
Wx|jD]}|j�q.Wg|_dS)zu
        Tell all the threads to terminate (by sending a sentinel value) and
        wait for them to do so.
        N)r�r��putrz)r5rfr(r(r)�
_wait_threads,s
z#SimpleScrapingLocator._wait_threadscCs�i}|j��||_||_t|jdt|��}|jj�|jj�|j	�z1t
jd|�|jj
|�|jj�Wd|j�X|`WdQX|S)Nz%s/zQueueing %s)r�r_rprr�rr�rUr�r�rhrir�r�rzr�)r5r\r_r&r(r(r)r]9s
		


z"SimpleScrapingLocator._get_projectz<\b(linux-(i\d86|x86_64|arm\w+)|win(32|-amd64)|macosx-?\d+)\bcCs|jj|�S)zD
        Does an URL refer to a platform-specific download?
        )�platform_dependentr�)r5r&r(r(r)�_is_platform_dependentNsz,SimpleScrapingLocator._is_platform_dependentc
Csp|j|�rd}n|j||j�}tjd||�|rl|j�|j|j|�WdQXn|S)a%
        See if an URL is a suitable download for a project.

        If it is, register information in the result dictionary (for
        _get_project) about the specific version it's for.

        Note that the return value isn't actually used other than as a boolean
        value.
        Nzprocess_download: %s -> %s)r�r�rprhrir�r�r_)r5r&r�r(r(r)�_process_downloadTs
	
z'SimpleScrapingLocator._process_downloadc
Cst|�\}}}}}}|j|j|j|j�rGd}n�|jrl|j|j�rld}n�|j|j�s�d}ny|d
kr�d}nd|dkr�d}nO|j|�r�d}n7|j	dd�d	}	|	j
�d
kr�d}nd}tjd||||�|S)z�
        Determine whether a link URL from a referring page and with a
        particular "rel" attribute should be queued for scraping.
        F�homepage�download�httpra�ftp�:rr�	localhostTz#should_queue: %s (%s) from %s -> %s)zhomepagezdownload)zhttpzhttpszftp)
rr�r�r�r�r�r�r�r��splitrsrhri)
r5�linkZreferrerr�r0rbrerqr_�hostr(r(r)�
_should_queuehs*
							
z#SimpleScrapingLocator._should_queuecCs�x�|jj�}z�|r�|j|�}|dkr<wnx�|jD]y\}}||jkrF|jj|�|j|�r�|j|||�r�tj	d||�|jj
|�q�qFqFWnWd|jj�X|sPqqWdS)z�
        Get a URL to fetch from the work queue, get the HTML page, examine its
        links for download candidates and candidates for further scraping.

        This is a handy method to run in a thread.
        NzQueueing %s from %s)r�r��get_pager�r�r�r�rrhrir��	task_done)r5r&�pagerr�r(r(r)r��s"!zSimpleScrapingLocator._fetchcCst|�\}}}}}}|dkrZtjjt|��rZtt|�d�}n||jkr�|j|}tj	d||�n�|j
dd�d}d}||jkr�tj	d||�nAt|d	id
d6�}zy8tj	d|�|j
j|d
|j�}	tj	d|�|	j�}
|
jdd�}tj|�r |	j�}|	j�}
|
jd�}|r�|j|}||
�}
nd}tj|�}|r�|jd�}ny|
j|�}
Wn!tk
r|
jd�}
YnXt|
|�}||j|<nWn�tk
rm}z*|jdkr[tjd||�nWYdd}~Xn�t k
r�}z8tjd||�|j!�|jj"|�WdQXWYdd}~Xn8t#k
r�}ztjd||�WYdd}~XnXWd||j|<X|S)a
        Get the HTML for an URL, possibly from an in-memory cache.

        XXX TODO Note: this cache is never actually cleared. It's assumed that
        the data won't get stale over the lifetime of a locator instance (not
        necessarily true for the default_locator).
        �filez
index.htmlzReturning %s from cache: %srrrNzSkipping %s due to bad host %sr:�identityzAccept-encodingzFetching %sr#z
Fetched %szContent-Typer.zContent-Encodingzutf-8zlatin-1i�zFetch failed: %s: %s)$r�osre�isdirrrrr�rhrirr�rrRr�r#r�r��HTML_CONTENT_TYPEr��geturlr��decoders�CHARSETr�r�r��UnicodeErrorr�rr8r�rr�r�r�)r5r&r0rbrerqr_rr6r�r:�content_typeZ	final_urlr��encoding�decoderr�r�r(r(r)r�sZ	$


(
(*zSimpleScrapingLocator.get_pagez<a href=[^>]*>([^<]+)<cCsqt�}|j|j�}|s7td|j��nx3|jj|j�D]}|j|jd��qMW|S)zJ
        Return all the distribution names known to this locator.
        zUnable to get %sr)	r�rr�r�_distname_rer�r�r�r�)r5r_r	r�r(r(r)r^�s	z,SimpleScrapingLocator.get_distribution_names)r>r?r@rA�zlib�
decompressrrTr�r�r]r�r�r�r�r�r�rr�rrr^r(r()r�r)r��s$



	;r�csLeZdZdZ�fdd�Zdd�Zdd�Zdd	�Z�S)
�DirectoryLocatorz?
    This class locates distributions in a directory tree.
    cso|jdd�|_tt|�j|�tjj|�}tjj|�sbt	d|��n||_
dS)a�
        Initialise an instance.
        :param path: The root of the directory tree to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * recursive - if True (the default), subdirectories are
                         recursed into. If False, only the top-level directory
                         is searched,
        �	recursiveTzNot a directory: %rN)r�rr�rrTrre�abspathr
r�base_dir)r5rer�)r�r(r)rT�s
zDirectoryLocator.__init__cCs|j|j�S)z�
        Should a filename be considered as a candidate for a distribution
        archive? As well as the filename, the directory which contains it
        is provided, though not used by the current implementation.
        )r�r�)r5ro�parentr(r(r)�should_includeszDirectoryLocator.should_includec		Cs�i}x�tj|j�D]�\}}}x�|D]�}|j||�r/tjj||�}tddttjj|��dddf�}|j	||�}|r�|j
||�q�q/q/W|jsPqqW|S)Nr
r.)r�walkrrrerzrr	rr�r�r)	r5r\r_�root�dirs�files�fnr&r�r(r(r)r]s"
		zDirectoryLocator._get_projectc	Cs�t�}x�tj|j�D]�\}}}x�|D]�}|j||�r2tjj||�}tddttjj	|��dddf�}|j
|d�}|r�|j|d�q�q2q2W|jsPqqW|S)zJ
        Return all the distribution names known to this locator.
        r
r.Nr\)
r�rrrrrerzrr	rr�r�r)r5r_r r!r"r#r&r�r(r(r)r^s	"
		z'DirectoryLocator.get_distribution_names)r>r?r@rArTrr]r^r(r()r�r)r�s
rc@s.eZdZdZdd�Zdd�ZdS)�JSONLocatora
    This locator uses special extended metadata (not available on PyPI) and is
    the basis of performant dependency resolution in distlib. Other locators
    require archive downloads before dependencies can be determined! As you
    might imagine, that can be slow.
    cCstd��dS)zJ
        Return all the distribution names known to this locator.
        zNot available from this locatorN)r[)r5r(r(r)r^2sz"JSONLocator.get_distribution_namescCs
i}t|�}|r	x�|jdg�D]�}|ddks+|ddkrWq+nt|d|dd|jdd	�d
|j�}|j}|d|_d|kr�|dr�d
|df|_n|jdi�|_|jdi�|_|||j	<q+Wn|S)Nr"�ptype�sdistZ	pyversion�sourcer\rwr�zPlaceholder for summaryr0r&r�r��requirements�exports)
rr�rr0r�r�r�Zdependenciesr)rw)r5r\r_r�r�r�r�r(r(r)r]8s$ 			
zJSONLocator._get_projectN)r>r?r@rAr^r]r(r(r(r)r$+sr$cs4eZdZdZ�fdd�Zdd�Z�S)�DistPathLocatorz�
    This locator finds installed distributions in a path. It can be useful for
    adding to an :class:`AggregatingLocator`.
    cs8tt|�j|�t|t�s+t�||_dS)zs
        Initialise an instance.

        :param distpath: A :class:`DistributionPath` instance to search.
        N)r�r*rT�
isinstancer�AssertionError�distpath)r5r-r�)r�r(r)rTUszDistPathLocator.__init__cCs;|jj|�}|dkr'i}ni||j6}|S)N)r-�get_distributionrw)r5r\r�r_r(r(r)r]_s
	zDistPathLocator._get_project)r>r?r@rArTr]r(r()r�r)r*Ps
r*csseZdZdZ�fdd�Z�fdd�Zdd�Zeej	j
e�Z	dd	�Zd
d�Z�S)�AggregatingLocatorzI
    This class allows you to chain and/or merge a list of locators.
    cs8|jdd�|_||_tt|�j|�dS)a�
        Initialise an instance.

        :param locators: The list of locators to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * merge - if False (the default), the first successful
                         search from any of the locators is returned. If True,
                         the results from all locators are merged (this can be
                         slow).
        �mergeFN)r�r0�locatorsr�r/rT)r5r1r�)r�r(r)rTls	zAggregatingLocator.__init__cs5tt|�j�x|jD]}|j�qWdS)N)r�r/rVr1)r5r�)r�r(r)rV|szAggregatingLocator.clear_cachecCs*||_x|jD]}||_qWdS)N)rWr1r0)r5rYr�r(r(r)rZ�s	zAggregatingLocator._set_schemecCs�i}x�|jD]�}|j|�}|r|jrD|j|�q�|jdkr\d}n3d}x*|D]"}|jj|�rid}PqiqiW|r�|}Pq�qqW|S)NTF)r1r`r0�updaterSr�)r5r\r_r�r��foundr�r(r(r)r]�s"		
zAggregatingLocator._get_projectcCsJt�}x:|jD]/}y||j�O}Wqtk
rAYqXqW|S)zJ
        Return all the distribution names known to this locator.
        )r�r1r^r[)r5r_r�r(r(r)r^�s	
	z)AggregatingLocator.get_distribution_names)
r>r?r@rArTrVrZr�rEr0�fgetr]r^r(r()r�r)r/hsr/zhttps://pypi.python.org/simple/r#g@r0�legacyz1(?P<name>[\w-]+)\s*\(\s*(==\s*)?(?P<ver>[^)]+)\)$c@sseZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dddd�Z
dS)�DependencyFinderz0
    Locate dependencies for distributions.
    NcCs(|p	t|_t|jj�|_dS)zf
        Initialise an instance, using the specified locator
        to locate distributions.
        N)�default_locatorr�rr0)r5r�r(r(r)rT�szDependencyFinder.__init__cCs�tjd|�|j}||j|<||j||jf<x^|jD]S}t|�\}}tjd|||�|jj	|t
��j||f�qFWdS)z�
        Add a distribution to the finder. This will update internal information
        about who provides what.
        :param dist: The distribution to add.
        zadding distribution %szAdd to provided: %s, %s, %sN)rhrir<�
dists_by_name�distsrw�providesr�provided�
setdefaultr�r�)r5r�r\�prwr(r(r)�add_distribution�s	
z!DependencyFinder.add_distributioncCs�tjd|�|j}|j|=|j||jf=xl|jD]a}t|�\}}tjd|||�|j|}|j	||f�|s@|j|=q@q@WdS)z�
        Remove a distribution from the finder. This will update internal
        information about who provides what.
        :param dist: The distribution to remove.
        zremoving distribution %sz Remove from provided: %s, %s, %sN)
rhrir<r8r9rwr:rr;�remove)r5r�r\r=rw�sr(r(r)�remove_distribution�s	

z$DependencyFinder.remove_distributioncCsQy|jj|�}Wn4tk
rL|j�d}|jj|�}YnX|S)z�
        Get a version matcher for a requirement.
        :param reqt: The requirement
        :type reqt: str
        :return: A version matcher (an instance of
                 :class:`distlib.version.Matcher`).
        r)r0rSr r)r5�reqtrSr\r(r(r)�get_matcher�s
zDependencyFinder.get_matcherc	Cs�|j|�}|j}t�}|j}||kr�x`||D]Q\}}y|j|�}Wntk
rzd}YnX|rA|j|�PqAqAWn|S)z�
        Find the distributions which can fulfill a requirement.

        :param reqt: The requirement.
         :type reqt: str
        :return: A set of distribution which can fulfill the requirement.
        F)rCr<r�r;r�r r�)	r5rBrSr\r_r;rw�providerr�r(r(r)�find_providers�s			

zDependencyFinder.find_providersc	Cs�|j|}t�}x?|D]7}|j|�}|j|j�s|j|�qqW|r�|jd|||f�d}nZ|j|�|j|=x-|D]%}|jj|t��j|�q�W|j|�d}|S)a�
        Attempt to replace one provider with another. This is typically used
        when resolving dependencies from multiple sources, e.g. A requires
        (B >= 1.0) while C requires (B >= 1.1).

        For successful replacement, ``provider`` must meet all the requirements
        which ``other`` fulfills.

        :param provider: The provider we are trying to replace with.
        :param other: The provider we're trying to replace.
        :param problems: If False is returned, this will contain what
                         problems prevented replacement. This is currently
                         a tuple of the literal string 'cantreplace',
                         ``provider``, ``other``  and the set of requirements
                         that ``provider`` couldn't fulfill.
        :return: True if we can replace ``other`` with ``provider``, else
                 False.
        ZcantreplaceFT)	�reqtsr�rCr�rwr�rAr<r>)	r5rD�other�problemsZrlist�	unmatchedr@rSr_r(r(r)�try_to_replaces 
	
	


#
zDependencyFinder.try_to_replaceFcCsi|_i|_i|_i|_t|p0g�}d|krk|jd�|tdddg�O}nt|t�r�|}}tj	d|�nK|j
j|d|�}}|dkr�td|��ntj	d	|�d
|_
t�}t|g�}t|g�}x�|r�|j�}|j}	|	|jkrO|j|�n/|j|	}
|
|kr~|j||
|�n|j|jB}|j}t�}
||kr�xAdD]6}d|}||kr�|
t|d|�O}
q�q�Wn||B|
B}x�|D]�}|j|�}|s+tj	d|�|j
j|d|�}|dkrv|rv|j
j|dd
�}n|dkr�tj	d|�|jd|f�q+|j|j}}||f|jkr�|j|�n|j|�||kr+||kr+|j|�tj	d|j�q+nxw|D]o}|j}	|	|jkrr|jj|t��j|�q2|j|	}
|
|kr2|j||
|�q2q2WqWqWt|jj��}x<|D]4}||k|_|jr�tj	d|j�q�q�Wtj	d|�||fS)a�
        Find a distribution and all distributions it depends on.

        :param requirement: The requirement specifying the distribution to
                            find, or a Distribution instance.
        :param meta_extras: A list of meta extras such as :test:, :build: and
                            so on.
        :param prereleases: If ``True``, allow pre-release versions to be
                            returned - otherwise, don't return prereleases
                            unless they're all that's available.

        Return a set of :class:`Distribution` instances and a set of
        problems.

        The distributions returned should be such that they have the
        :attr:`required` attribute set to ``True`` if they were
        from the ``requirement`` passed to ``find()``, and they have the
        :attr:`build_time_dependency` attribute set to ``True`` unless they
        are post-installation dependencies of the ``requirement``.

        The problems should be a tuple consisting of the string
        ``'unsatisfied'`` and the requirement which couldn't be satisfied
        by any distribution known to the locator.
        z:*:z:test:z:build:z:dev:zpassed %s as requirementr�NzUnable to locate %rz
located %sT�test�build�devz:%s:z%s_requireszNo providers found for %rzCannot satisfy %rZunsatisfiedzAdding %s to install_distsz#%s is a build-time dependency only.zfind done for %s)ztestzbuildzdev)r;r9r8rFr�r?r+rrhrir�r�r�	requestedr�r<r>rJZrun_requiresZ
meta_requiresZbuild_requires�getattrrEr�rwZname_and_versionr<�valuesZbuild_time_dependency)r5r�Zmeta_extrasr�r�ZodistrH�todoZ
install_distsr\rGZireqtsZsreqtsZereqtsr<r�Z	all_reqtsr�Z	providersrD�nr}r=r9r(r(r)�find>s�				


				
		

!


	
	"
"
		zDependencyFinder.find)r>r?r@rArTr>rArCrErJrSr(r(r(r)r6�s'r6)Lr��iorr��loggingrrcr�r��ImportError�dummy_threadingrr.r�compatrrrrr	r
rrr
rrr3rrrZdatabaserrrr�r�utilrrrrrrrrrwrr r�r!r"�	getLoggerr>rhr�r�r�rrr$r*r+�objectrEr�r�r�r�rr$r*r/r7r��NAME_VERSION_REr6r(r(r(r)�<module>sV
^:�+*:�A%N				python3.4/site-packages/pip/_vendor/distlib/__pycache__/markers.cpython-34.pyc000064400000014677151735047360023242 0ustar00�
�Re��@s�dZddlZddlZddlZddlZddlmZmZddlm	Z	dgZ
Gdd�de�Zdd	d�Z
dS)
zEParser for the environment markers micro-language defined in PEP 345.�N�)�python_implementation�string_types)�in_venv�	interpretc@s�eZdZdZi	dd�d6dd�d6dd�d6d	d�d
6dd�d6d
d�d6dd�d6dd�d6dd�d6Zi	ejd6dejdd�d6ejj	dd�dd6e
jd6ee
��d6ej�d 6ej�d!6ej�d"6e�d#6Zdd$d%�Zd&d'�Zd(d)�Zdd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�ZdS):�	Evaluatorz5
    A limited evaluator for Python expressions.
    cCs
||kS)N�)�x�yrr�6/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/markers.py�<lambda>szEvaluator.<lambda>�eqcCs
||kS)Nr)r	r
rrrrs�gtcCs
||kS)Nr)r	r
rrrrsZgtecCs
||kS)Nr)r	r
rrrrs�incCs
||kS)Nr)r	r
rrrrs�ltcCs
||kS)Nr)r	r
rrrrsZltecCs|S)Nr)r	rrrr s�notcCs
||kS)Nr)r	r
rrrr!sZnoteqcCs
||kS)Nr)r	r
rrrr"s�notin�sys_platformz%s.%sN��python_version� rr�python_full_version�os_nameZplatform_in_venvZplatform_release�platform_version�platform_machineZplatform_python_implementationcCs|p	i|_d|_dS)zu
        Initialise an instance.

        :param context: If specified, names are looked up in this mapping.
        N)�context�source)�selfrrrr�__init__3szEvaluator.__init__cCsKd}d|j|||�}||t|j�krG|d7}n|S)zH
        Get the part of the source which is causing a problem.
        �
z%rz...)r�len)r�offsetZfragment_len�srrr�get_fragment<s

zEvaluator.get_fragmentcCst|d|d�S)z@
        Get a handler for the specified AST node type.
        zdo_%sN)�getattr)r�	node_typerrr�get_handlerFszEvaluator.get_handlercCst|t�r�||_idd6}|r8||d<nytj||�}Wq�tk
r�}z'|j|j�}td|��WYdd}~Xq�Xn|jj	j
�}|j|�}|dkr|jdkr�d}n|j|j�}td||f��n||�S)zf
        Evaluate a source string or node, using ``filename`` when
        displaying errors.
        �eval�mode�filenamezsyntax error %sNz(source not available)z don't know how to evaluate %r %s)
�
isinstancerr�ast�parse�SyntaxErrorr#r!�	__class__�__name__�lowerr&�
col_offset)r�noder)�kwargs�er"r%�handlerrrr�evaluateLs&	

&	zEvaluator.evaluatecCs5t|tj�std��d|jj|jfS)Nzattribute node expectedz%s.%s)r*r+�	Attribute�AssertionError�value�id�attr)rr2rrr�get_attr_keyfszEvaluator.get_attr_keycCs�t|jtj�sd}n-|j|�}||jkpH||jk}|sdtd|��n||jkr�|j|}n
|j|}|S)NFzinvalid expression: %s)r*r9r+�Namer<r�allowed_valuesr-)rr2�valid�key�resultrrr�do_attributejs	
zEvaluator.do_attributecCs�|j|jd�}|jjtjk}|jjtjk}|sR|sRt�|r^|sk|r�|r�xJ|jdd�D]2}|j|�}|r�|s�|r|rPqqWn|S)Nrr)r6�values�opr.r+�Or�Andr8)rr2rAZis_orZis_and�nrrr�	do_boolopxszEvaluator.do_boolopc	s���fdd�}�j}�j|�}d}x�t�j�j�D]�\}}|||�|jjj�}|�jkr�t	d|��n�j|�}�j|||�}|s�Pn|}|}qIW|S)Ncsbd}t|tj�r3t|tj�r3d}n|s^�j�j�}td|��ndS)NTFzInvalid comparison: %s)r*r+�Strr#r1r-)�lhsnode�rhsnoder?r")r2rrr�sanity_check�s$	z*Evaluator.do_compare.<locals>.sanity_checkTzunsupported operation: %r)
�leftr6�zip�ops�comparatorsr.r/r0�	operatorsr-)	rr2rLrJZlhsrArDrKZrhsr)r2rr�
do_compare�s 
	"

zEvaluator.do_comparecCs|j|j�S)N)r6�body)rr2rrr�
do_expression�szEvaluator.do_expressioncCs|d}|j|jkr1d}|j|j}n+|j|jkr\d}|j|j}n|sxtd|j��n|S)NFTzinvalid expression: %s)r:rr>r-)rr2r?rArrr�do_name�szEvaluator.do_namecCs|jS)N)r")rr2rrr�do_str�szEvaluator.do_str)r/�
__module__�__qualname__�__doc__rQ�sys�platform�version_info�version�split�os�name�strr�release�machinerr>rr#r&r6r<rBrHrRrTrUrVrrrrrs@













	
rcCst|�j|j��S)z�
    Interpret a marker and return a result depending on environment.

    :param marker: The marker to interpret.
    :type marker: str
    :param execution_context: The context used for name lookup.
    :type execution_context: mapping
    )rr6�strip)�markerZexecution_contextrrrr�s	)rYr+r_rZr[�compatrr�utilr�__all__�objectrrrrrr�<module>s	�python3.4/site-packages/pip/_vendor/distlib/__pycache__/metadata.cpython-34.pyc000064400000070527151735047370023353 0ustar00�
�ReϏ�@s�dZddlmZddlZddlmZddlZddlZddlZddl	m
Z
mZddlm
Z
mZmZddlmZdd	lmZmZdd
lmZmZeje�ZGdd�de
�ZGd
d�de
�ZGdd�de
�ZGdd�de
�ZdddgZdZ dZ!ej"d�Z#dddddddd d!d"d#fZ$ddddd$dddd d!d"d#d%d&d'd(d)fZ%d'd(d)d%d&fZ&ddddd$dddd d!d"d*d+d#d%d&d,d-d.d/d0d1fZ'd.d/d0d,d1d*d+d-fZ(ddddd$dddd d!d"d*d+d#d%d&d,d-d.d/d0d1d2d3d4d5d6fZ)d2d6d3d4d5fZ*e+�Z,e,j-e$�e,j-e%�e,j-e'�e,j-e)�ej"d7�Z.d8d9�Z/d:d;�Z0idd<6dd=6dd>6dd?6d$d@6ddA6ddB6ddC6d dD6d!dE6d"dF6d*dG6d+dH6d#dI6d%dJ6d&dK6d,dL6d.dM6d/dN6d4dO6d0dP6d1dQ6d)dR6d(dS6d'dT6d-dU6d2dV6d3dW6d5dX6d6dY6Z1d/d,d.fZ2d0fZ3dfZ4dd%d'd)d(d,d.d/d1d-d$d4d6d5fZ5d-fZ6dfZ7d!d*ddfZ8e9�Z:ej"dZ�Z;d[d\d]�Z<Gd^d_�d_e9�Z=d`Z>Gdad�de9�Z?dS)bzImplementation of the Metadata for Python packages PEPs.

Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
�)�unicode_literalsN)�message_from_file�)�DistlibException�__version__)�StringIO�string_types�	text_type)�	interpret)�extract_by_key�
get_extras)�
get_scheme�PEP426_VERSION_REc@seZdZdZdS)�MetadataMissingErrorzA required metadata is missingN)�__name__�
__module__�__qualname__�__doc__�rr�7/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/metadata.pyrsrc@seZdZdZdS)�MetadataConflictErrorz>Attempt to read or write metadata fields that are conflictual.N)rrrrrrrrr src@seZdZdZdS)� MetadataUnrecognizedVersionErrorz Unknown metadata version number.N)rrrrrrrrr$src@seZdZdZdS)�MetadataInvalidErrorzA metadata value is invalidN)rrrrrrrrr(sr�Metadata�PKG_INFO_ENCODING�PKG_INFO_PREFERRED_VERSIONzutf-8z1.1z

       \|zMetadata-Version�Name�Version�Platform�Summary�Description�Keywordsz	Home-page�AuthorzAuthor-email�LicensezSupported-Platform�
ClassifierzDownload-URL�	Obsoletes�Provides�Requires�
MaintainerzMaintainer-emailzObsoletes-DistzProject-URLz
Provides-Distz
Requires-DistzRequires-PythonzRequires-ExternalzPrivate-VersionzObsoleted-ByzSetup-Requires-Dist�	ExtensionzProvides-Extraz"extra\s*==\s*("([^"]+)"|'([^']+)')cCsP|dkrtS|dkr tS|dkr0tS|dkr@tSt|��dS)Nz1.0z1.1z1.2z2.0)�_241_FIELDS�_314_FIELDS�_345_FIELDS�_426_FIELDSr)�versionrrr�_version2fieldlistfsr/c	Csdd�}g}xB|j�D]4\}}|gddfkrFqn|j|�qWddddg}x�|D]�}|tkr�d|kr�|jd�n|tkr�d|kr�|jd�n|tkr�d|kr�|jd�n|tkrpd|krp|jd�qpqpWt|�d	kr4|d
St|�d
krUtd��nd|kom||t	�}d|ko�||t
�}d|ko�||t�}t|�t|�t|�d	kr�td��n|r|r|rt
|krt
Sn|r
dS|rdSdS)
z5Detect the best version depending on the fields used.cSs%x|D]}||krdSqWdS)NTFr)�keys�markers�markerrrr�_has_markerts
z"_best_version.<locals>._has_marker�UNKNOWNNz1.0z1.1z1.2z2.0rrzUnknown metadata setz(You used incompatible 1.1/1.2/2.0 fields)�items�appendr*�remover+r,r-�lenr�_314_MARKERS�_345_MARKERS�_426_MARKERS�intr)	�fieldsr3r0�key�valueZpossible_versionsZis_1_1Zis_1_2Zis_2_0rrr�
_best_versionrsB
&r@�metadata_version�namer.�platformZsupported_platform�summary�description�keywords�	home_page�author�author_email�
maintainer�maintainer_email�license�
classifier�download_url�obsoletes_dist�
provides_dist�
requires_dist�setup_requires_dist�requires_python�requires_external�requires�provides�	obsoletes�project_urlZprivate_versionZobsoleted_by�	extensionZprovides_extraz[^A-Za-z0-9.]+FcCsG|r9tjd|�}tjd|jdd��}nd||fS)zhReturn the distribution name with version.

    If for_filename is true, return a filename-escaped form.�-� �.z%s-%s)�	_FILESAFE�sub�replace)rBr.Zfor_filenamerrr�_get_name_and_version�s!r`c@s�eZdZdZdddddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zddd�Zdd�Zdd �Zd!d"�Zd#d$�Zdd%d&�Zdd'd(�Zdd)d*�Zd+d,�Zed-d.�Zdd/d0�Zdd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!dS)?�LegacyMetadataaaThe legacy metadata of a release.

    Supports versions 1.0, 1.1 and 1.2 (auto-detected). You can
    instantiate the class with one of these arguments (or none):
    - *path*, the path to a metadata file
    - *fileobj* give a file-like object with metadata as content
    - *mapping* is a dict-like object
    - *scheme* is a version scheme name
    N�defaultcCs�|||gjd�dkr-td��ni|_g|_d|_||_|dk	rm|j|�nB|dk	r�|j|�n&|dk	r�|j|�|j	�ndS)N�z'path, fileobj and mapping are exclusive)
�count�	TypeError�_fieldsZrequires_filesZ
_dependencies�scheme�read�	read_file�update�set_metadata_version)�self�path�fileobj�mappingrgrrr�__init__�s				
zLegacyMetadata.__init__cCst|j�|jd<dS)NzMetadata-Version)r@rf)rlrrrrksz#LegacyMetadata.set_metadata_versioncCs|jd||f�dS)Nz%s: %s
)�write)rlrnrBr?rrr�_write_field
szLegacyMetadata._write_fieldcCs
|j|�S)N)�get)rlrBrrr�__getitem__
szLegacyMetadata.__getitem__cCs|j||�S)N)�set)rlrBr?rrr�__setitem__szLegacyMetadata.__setitem__cCsB|j|�}y|j|=Wntk
r=t|��YnXdS)N)�
_convert_namerf�KeyError)rlrB�
field_namerrr�__delitem__s

zLegacyMetadata.__delitem__cCs%||jkp$|j|�|jkS)N)rfrw)rlrBrrr�__contains__szLegacyMetadata.__contains__cCs8|tkr|S|jdd�j�}tj||�S)NrZ�_)�_ALL_FIELDSr_�lower�_ATTR2FIELDrs)rlrBrrrrwszLegacyMetadata._convert_namecCs |tks|tkrgSdS)Nr4)�_LISTFIELDS�_ELEMENTSFIELD)rlrBrrr�_default_value$szLegacyMetadata._default_valuecCstjd|�S)N�
)�_LINE_PREFIXr^)rlr?rrr�_remove_line_prefix)sz"LegacyMetadata._remove_line_prefixcCs$|tkr||St|��dS)N)r�AttributeError)rlrBrrr�__getattr__,szLegacyMetadata.__getattr__FcCst|d|d|�S)zhReturn the distribution name with version.

        If filesafe is true, return a filename-escaped form.rr)r`)rlZfilesaferrr�get_fullname7szLegacyMetadata.get_fullnamecCs|j|�}|tkS)z+return True if name is a valid metadata key)rwr})rlrBrrr�is_field=szLegacyMetadata.is_fieldcCs|j|�}|tkS)N)rwr�)rlrBrrr�is_multi_fieldBszLegacyMetadata.is_multi_fieldc
Cs;tj|ddd�}z|j|�Wd|j�XdS)z*Read the metadata values from a file path.�r�encodingzutf-8N)�codecs�openri�close)rl�filepath�fprrrrhFszLegacyMetadata.readcCs�t|�}|d|jd<x�tD]�}||kr<q$n|tkr�|j|�}|tkr�|dk	r�dd�|D�}n|j||�q$||}|dk	r$|dkr$|j||�q$q$W|j�dS)z,Read the metadata values from a file object.zmetadata-versionzMetadata-VersionNcSs%g|]}t|jd���qS)�,)�tuple�split)�.0r?rrr�
<listcomp>[s	z,LegacyMetadata.read_file.<locals>.<listcomp>r4)rrfr}r��get_all�_LISTTUPLEFIELDSrurk)rlZfileob�msg�field�valuesr?rrrriNs

zLegacyMetadata.read_filec
Cs>tj|ddd�}z|j||�Wd|j�XdS)z&Write the metadata fields to filepath.�wr�zutf-8N)r�r��
write_filer�)rlr��skip_unknownr�rrrrqdszLegacyMetadata.writecCs	|j�x�t|d�D]�}|j|�}|rT|dgdgfkrTqn|tkr�|j||dj|��qn|tkr�|dkr�|jdd�}n|g}n|tkr�dd�|D�}nx!|D]}|j|||�q�WqWd	S)
z0Write the PKG-INFO format data to a file object.zMetadata-Versionr4r�r r�z	
       |cSsg|]}dj|��qS)r�)�join)r�r?rrrr�}s	z-LegacyMetadata.write_file.<locals>.<listcomp>N)	rkr/rsr�rrr�r�r_r�)rl�
fileobjectr�r�r�r?rrrr�ls 

zLegacyMetadata.write_filecs��fdd�}|sn^t|d�rUxL|j�D]}||||�q7Wn$x!|D]\}}|||�q\W|r�x*|j�D]\}}|||�q�WndS)a�Set metadata values from the given iterable `other` and kwargs.

        Behavior is like `dict.update`: If `other` has a ``keys`` method,
        they are looped over and ``self[key]`` is assigned ``other[key]``.
        Else, ``other`` is an iterable of ``(key, value)`` iterables.

        Keys that don't match a metadata field or that have an empty value are
        dropped.
        cs2|tkr.|r.�j�j|�|�ndS)N)rrurw)r>r?)rlrr�_set�sz#LegacyMetadata.update.<locals>._setr0N)�hasattrr0r5)rl�other�kwargsr��k�vr)rlrrj�s
zLegacyMetadata.updatecCs
|j|�}|tks'|dkrtt|ttf�rtt|t�rkdd�|jd�D�}q�g}nF|tkr�t|ttf�r�t|t�r�|g}q�g}ntj	t
j�r�|d}t|j
�}|tkrF|dk	rFx�|D];}|j|jd�d�stjd	|||�qqWq�|tkr�|dk	r�|j|�s�tjd
|||�q�q�|tkr�|dk	r�|j|�s�tjd
|||�q�q�n|tkr�|dkr�|j|�}q�n||j|<dS)z"Control then set a metadata field.rcSsg|]}|j��qSr)�strip)r�r�rrrr��s	z&LegacyMetadata.set.<locals>.<listcomp>r�rN�;rz%r: %r is not valid (field %r)z(%r: %r is not a valid version (field %r)r )rwr��
isinstance�listr�rr�r��logger�isEnabledFor�logging�WARNINGr
rg�_PREDICATE_FIELDS�is_valid_matcher�warning�_VERSIONS_FIELDS�is_valid_constraint_list�_VERSION_FIELDS�is_valid_version�_UNICODEFIELDSr�rf)rlrBr?�project_namergr�rrrru�s@		

		zLegacyMetadata.setcCs|j|�}||jkr@|tkr<|j|�}n|S|tkr]|j|}|S|tkr�|j|}|dkr�gSg}xE|D]=}|tkr�|j|�q�|j|d|df�q�W|S|tkr|j|}t	|t
�r|jd�Sn|j|S)zGet a metadata field.Nrrr�)rwrf�_MISSINGr�r�r�r�r6r�r�rr�)rlrBrbr?�res�valrrrrs�s.



zLegacyMetadata.getcsx|j�gg}}x*d
D]"}||kr|j|�qqW|rx|gkrxddj|�}t|��nx*dD]"}||kr|j|�qqW|ddkr�||fSt|j���fd	d
�}x�t|ft�jft	�j
ffD]b\}}xS|D]K}	|j|	d�}
|
dk	r||
�r|jd|	|
f�qqWqW||fS)zkCheck if the metadata is compliant. If strict is True then raise if
        no Name or Version are providedrrzmissing required metadata: %sz, �	Home-pager"zMetadata-Versionz1.2cs5x.|D]&}�j|jd�d�sdSqWdS)Nr�rFT)r�r�)r?r�)rgrr�are_valid_constraintss
z3LegacyMetadata.check.<locals>.are_valid_constraintsNzWrong value for %r: %s)zNamezVersion)r�r")rkr6r�rr
rgr�r�r�r�r�rs)rl�strict�missing�warnings�attrr�r�r=Z
controllerr�r?r)rgr�check�s2




	
"zLegacyMetadata.checkcCs0|j�dB}i}x;|D]3\}}|s?||jkr||||<qqW|ddkr�dK}x�|D]]\}}|s�||jkrq|d&kr�||||<q�d,d-�||D�||<qqqqWnW|dd.kr,dO}x>|D]3\}}|s||jkr�||||<q�q�Wn|S)Pz�Return fields as a dict.

        Field names will be converted to use the underscore-lowercase style
        instead of hyphen-mixed case (i.e. home_page instead of Home-page).
        rA�Metadata-VersionrBrr.rrDrrG�	Home-pagerHr"rI�Author-emailrLr#rEr rFr!rCrrMr$rN�Download-URLz1.2rQ�
Requires-DistrS�Requires-PythonrT�Requires-ExternalrP�
Provides-DistrO�Obsoletes-DistrX�Project-URLrJr(rK�Maintainer-emailcSsg|]}dj|��qS)r�)r�)r��urrrr�@s	z)LegacyMetadata.todict.<locals>.<listcomp>z1.1rVr&rUr'rWr%�zmetadata_versionr��znamezName�zversionzVersion�zsummaryr�rGr��zauthorzAuthor�zauthor_emailr��zlicenser#�zdescriptionzDescription�zkeywordsr!�zplatformzPlatform�z
classifierz
Classifier�zdownload_urlr�)
r�r�r�r�r�r�r�r�r�r�r�r�r��z
requires_distr��rSr��rTr��rPr��rOr��rXr��z
maintainerr(�zmaintainer_emailr�)r�r�r�r�r�r�r�r��zprovideszProvides�zrequireszRequires�z	obsoletesz	Obsoletes)r�r�r�)rkrf)rlZskip_missingZmapping_1_0�datar>ryZmapping_1_2Zmapping_1_1rrr�todictsP
%zLegacyMetadata.todictcCsL|ddkr:x'dD]}||kr||=qqWn|d|7<dS)NzMetadata-Versionz1.1r%r'r&z
Requires-Dist)z	ObsoleteszRequireszProvidesr)rl�requirementsr�rrr�add_requirementsNs

zLegacyMetadata.add_requirementscCstt|d��S)NzMetadata-Version)r�r/)rlrrrr0YszLegacyMetadata.keysccs x|j�D]}|Vq
WdS)N)r0)rlr>rrr�__iter__\szLegacyMetadata.__iter__cs�fdd��j�D�S)Ncsg|]}�|�qSrr)r�r>)rlrrr�as	z)LegacyMetadata.values.<locals>.<listcomp>)r0)rlr)rlrr�`szLegacyMetadata.valuescs�fdd��j�D�S)Ncs g|]}|�|f�qSrr)r�r>)rlrrr�ds	z(LegacyMetadata.items.<locals>.<listcomp>)r0)rlr)rlrr5cszLegacyMetadata.itemscCsd|jj|j|jfS)Nz
<%s %s %s>)�	__class__rrBr.)rlrrr�__repr__fszLegacyMetadata.__repr__)"rrrrrprkrrrtrvrzr{rwr�r�r�r�r�r�rhrirqr�rjrur�rsr�r�r�r0r�r�r5r�rrrrra�s>		,,;razpydist.jsonc@s�eZdZdZejd�Zejdej�Ze	Z
ejd�ZdZde
Zifd6fd6dSd
6ZdZdZieffd
6edTfd6e
dUfd6edVfd
6ZdWZdddddd�ZedX�ZdefZdefZi
defd6defd6ed6ed6ed6defd6ed 6ed!6ed"6ed#6d$efd%6dYd'6dZd
6Z[[d)d*�Zdd+d,�Zd-d.�Zed/d0��Z ed1d2��Z!e!j"d3d2��Z!ddd4d5�Z#ed6d7��Z$ed8d9��Z%e%j"d:d9��Z%d;d<�Z&d=d>�Z'd?d@�Z(dAdB�Z)idCd6dDd6dEd6dFd
6dGdH6d$d%6Z*dIdJ�Z+dddKdLdMdN�Z,dOdP�Z-dQdR�Z.dS)[rz�
    The metadata of a release. This implementation uses 2.0 (JSON)
    metadata where possible. If not possible, it wraps a LegacyMetadata
    instance which handles the key-value metadata format.
    z
^\d+(\.\d+)*$z!^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$z	.{1,2047}z2.0zdistlib (%s)rBr.�legacyrDzqname version license summary description author author_email keywords platform home_page classifiers download_urlzwextras run_requires test_requires build_requires dev_requires provides meta_requires obsoleted_by supports_environmentsrA�_legacy�_datargNrbcCs�|||gjd�dkr-td��nd|_d|_||_|dk	r�y|j||�||_Wq�tk
r�td|d|�|_|j�Yq�Xn�d}|r�t	|d��}|j
�}WdQXn|r�|j
�}n|dkri|jd6|jd6|_n�t
|t�s@|jd�}ny)tj|�|_|j|j|�Wn:tk
r�td	t|�d|�|_|j�YnXdS)
Nrcz'path, fileobj and mapping are exclusiverorg�rbrA�	generatorzutf-8rn)rdrer�r�rg�_validate_mappingrra�validater�rh�METADATA_VERSION�	GENERATORr�r	�decode�json�loads�
ValueErrorr)rlrmrnrorgr��frrrrp�s>			



zMetadata.__init__rLrFz
Requires-Dist�run_requireszSetup-Requires-Dist�build_requires�dev_requiresZ
test_requires�
meta_requireszProvides-Extra�extras�modules�
namespaces�exports�commandsr$�classifiers�Download-URLZ
source_url�Metadata-VersioncCstj|d�}tj|d�}||kr�||\}}|jr�|dkrs|dkrgdn|�}q�|jj|�}q|dkr�dn|�}|jj||�}nQ||kr�tj||�}n0|jr�|jj|�}n|jj|�}|S)N�common_keys�mapped_keys)�object�__getattribute__r�rsr�)rlr>�common�mapped�lk�maker�resultr?rrrr
�s 		zMetadata.__getattribute__cCso||jkrk|j|\}}|p.|j|krk|j|�}|shtd||f��qhqkndS)Nz*%r is an invalid value for the %r property)�SYNTAX_VALIDATORSrg�matchr)rlr>r?rg�pattern�
exclusions�mrrr�_validate_value�szMetadata._validate_valuecCs"|j||�tj|d�}tj|d�}||kr�||\}}|jr~|dkrnt�n||j|<q||j|<n�||kr�tj|||�nn|dkr�t|t�r�|j	�}|r�|j
�}q�g}q�n|jr||j|<n
||j|<dS)NrrrF)rr	r
r��NotImplementedErrorr��__setattr__r�rr�r�)rlr>r?rrr
r|rrrr�s*			zMetadata.__setattr__cCst|j|jd�S)NT)r`rBr.)rlrrr�name_and_versionszMetadata.name_and_versioncCsd|jr|jd}n|jjdg�}d|j|jf}||kr`|j|�n|S)Nz
Provides-DistrVz%s (%s))r�r��
setdefaultrBr.r6)rlr�srrrrVs	zMetadata.providescCs*|jr||jd<n
||jd<dS)Nz
Provides-DistrV)r�r�)rlr?rrrrV%s	c
CsL|jr|}n6g}t|p$g|j�}x�|D]�}d|kr^d|kr^d}nZd|krsd}n|jd�|k}|r�|jd�}|r�t||�}q�n|r7|j|d�q7q7WxodD]g}d|}	|	|kr�|j|	�|jjd	|g�}|j|j|d
|d|��q�q�W|S)
a�
        Base method to get dependencies, given a set of extras
        to satisfy and an optional environment context.
        :param reqts: A list of sometimes-wanted dependencies,
                      perhaps dependent on extras and environment.
        :param extras: A list of optional components being requested.
        :param env: An optional environment for marker evaluation.
        �extra�environmentTrU�build�dev�testz:%s:z%s_requiresr��env)zbuildzdevztest)	r�rr�rsr
�extendr7r��get_requirements)
rl�reqtsr�r r�d�includer2r>�errrr",s0			
		


zMetadata.get_requirementscCs|jr|j�S|jS)N)r��_from_legacyr�)rlrrr�
dictionaryVs	
zMetadata.dictionarycCs)|jrt�nt|j|j�SdS)N)r�rrr��DEPENDENCY_KEYS)rlrrr�dependencies\s		zMetadata.dependenciescCs&|jrt�n|jj|�dS)N)r�rr�rj)rlr?rrrr*cs		c	Cs�|jd�|jkr$t��ng}xH|jj�D]7\}}||kr:||krq|j|�qqq:q:W|r�ddj|�}t|��nx-|j�D]\}}|j|||�q�WdS)NrAzMissing metadata items: %sz, )	rsr�r�MANDATORY_KEYSr5r6r�rr)	rlrorgr�r>rr�r�r�rrrr�jszMetadata._validate_mappingcCs`|jrF|jjd�\}}|s-|r\tjd||�q\n|j|j|j�dS)NTz#Metadata: missing: %s, warnings: %s)r�r�r�r�r�r�rg)rlr�r�rrrr�xs		zMetadata.validatecCs6|jr|jjd�St|j|j�}|SdS)NT)r�r�rr��
INDEX_KEYS)rlrrrrr��s	zMetadata.todictc
Cs-|jr|jst�i|jd6|jd6}|jjd�}xFdD]>}||krL|d	krsd
}n|}||||<qLqLW|jdg�}|dgkr�g}n||d
<d}xE|D]=\}}||kr�||r�i||d6g||<q�q�W|j|d<i}i}	|S)NrAr�TrBr.rLrDrErMrr!�rFrQr�rRr�rUrV)znamezversionzlicensezsummaryzdescriptionz
classifier�z
requires_distzrun_requires�rRzbuild_requires)r.r/)r�r��AssertionErrorr�r�r�rsrV)
rlrZlmdr��nk�kwr0�okrHrJrrrr'�s2


		

zMetadata._from_legacyrrr#rr rEcCs�dd�}|jr|js%t�t�}|j}x:|jj�D])\}}||krG||||<qGqGW||j|j�}||j|j	�}|j
r�t|j
�|d<nt|�|d<t|�|d<|S)NcSs�t�}x�|D]�}|jd�}|jd�}|d}x�|D]�}|ri|ri|j|�qEd}|r�d|}n|r�|r�d||f}q�|}n|jdj||f��qEWqW|S)NrrrUr-z
extra == "%s"z(%s) and %sr�)rurs�addr�)�entriesr#r&rr Zrlistr�r2rrr�process_entries�s"	



	$z,Metadata._to_legacy.<locals>.process_entrieszProvides-Extraz
Requires-DistzSetup-Requires-Dist)r�r�r0ra�LEGACY_MAPPINGr5r�r�r�r�r��sorted)rlr6rZnmdr1r3Zr1Zr2rrr�
_to_legacy�s			zMetadata._to_legacyFTcCs||gjd�dkr*td��n|j�|r�|jrO|j}n|j�}|rw|j|d|�q|j|d|�n�|jr�|j�}n	|j}|r�t	j
||dddddd�n@tj|d	d
��)}t	j
||dddddd�WdQXdS)Nrz)Exactly one of path and fileobj is neededr��ensure_asciiT�indentrc�	sort_keysr�zutf-8)
rdr�r�r�r9rqr�r'r�r��dumpr�r�)rlrmrnr�r�Z	legacy_mdr$r�rrrrq�s&
			
zMetadata.writecCs�|jr|jj|�n�|jjdg�}d}x0|D](}d|kr>d|kr>|}Pq>q>W|dkr�i|d6}|jd|�n*t|d�t|�B}t|�|d<dS)Nr�rrrUr)r�r�r�r�insertrur8)rlr�r��always�entryZrsetrrrr��s	

zMetadata.add_requirementscCs;|jpd}|jpd}d|jj|j||fS)Nz	(no name)z
no versionz<%s %s %s (%s)>)rBr.r�rrA)rlrBr.rrrr��szMetadata.__repr__)�legacy)rA)rA)rA)z_legacyz_datazscheme)znamezversionzlicensezkeywordszsummary)rN)rN)/rrrr�re�compileZMETADATA_VERSION_MATCHER�IZNAME_MATCHERrZVERSION_MATCHERZSUMMARY_MATCHERr�rr�r+r,r)r�	__slots__rprurr�Z	none_list�dictZ	none_dictrr
rr�propertyrrV�setterr"r(r*r�r�r�r'r7r9rqr�r�rrrrrns�




	,





*	
%)@r�
__future__rr��emailrr�r�rBr-rr�compatrrr	r1r
�utilrrr.r
r�	getLoggerrr�rrrr�__all__rrrCr�r*r+r9r,r:r-r;rur}rjZEXTRA_REr/r@rr�r�r�r�r�r�r�r	r�r]r`raZMETADATA_FILENAMErrrrr�<module>	s�																		



8
									
��python3.4/site-packages/pip/_vendor/distlib/__pycache__/index.cpython-34.pyc000064400000041613151735047370022674 0ustar00�
�ReL�@sddlZddlZddlZddlZddlZddlZyddlmZWn"ek
r�ddl	mZYnXddl
mZddlm
Z
mZmZmZmZmZddlmZmZmZeje�ZdZdZGd	d
�d
e�ZdS)�N)�Thread�)�DistlibException)�HTTPBasicAuthHandler�Request�HTTPPasswordMgr�urlparse�build_opener�string_types)�cached_property�zip_dir�ServerProxyzhttps://pypi.python.org/pypi�pypic@seZdZdZdZddd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zddd�Z
dd�Zdddddd�Zdd�Zdd�Zd d!�Zddd"d#�Zd$d%�Zd&d'�Zdd(d)�ZdS)*�PackageIndexzc
    This class represents a package index compatible with PyPI, the Python
    Package Index.
    s.----------ThIs_Is_tHe_distlib_index_bouNdaRY_$NcCs|p	t|_|j�t|j�\}}}}}}|sX|sX|sX|dkrntd|j��nd|_d|_d|_d|_d|_	t
tjd��k}xad
D]Y}	y>t
j|	dgd	|d
|�}
|
dkr�|	|_PnWq�tk
rYq�Xq�WWdQXdS)z�
        Initialise an instance.

        :param url: The URL of the index. If not specified, the URL for PyPI is
                    used.
        �http�httpszinvalid repository: %sN�w�gpg2�gpgz	--version�stdout�stderrr)zhttpzhttps)rzgpg)�
DEFAULT_INDEX�url�read_configurationrr�password_handler�ssl_verifierr�gpg_home�	rpc_proxy�open�os�devnull�
subprocess�
check_call�OSError)�selfr�scheme�netloc�path�params�query�fragZsink�s�rc�r-�4/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/index.py�__init__$s(
!					
		
zPackageIndex.__init__cCs3ddlm}ddlm}|�}||�S)zs
        Get the distutils command for interacting with PyPI configurations.
        :return: the command.
        r)�Distribution)�
PyPIRCCommand)�distutils.corer0�distutils.configr1)r$r0r1�dr-r-r.�_get_pypirc_command@s	z PackageIndex._get_pypirc_commandcCsy|j�}|j|_|j�}|jd�|_|jd�|_|jdd�|_|jd|j�|_dS)z�
        Read the PyPI access configuration as supported by distutils, getting
        PyPI to do the acutal work. This populates ``username``, ``password``,
        ``realm`` and ``url`` attributes from the configuration.
        �username�password�realmr�
repositoryN)r5rr9�_read_pypirc�getr6r7r8)r$�c�cfgr-r-r.rJszPackageIndex.read_configurationcCs0|j�|j�}|j|j|j�dS)z�
        Save the PyPI access configuration. You must have set ``username`` and
        ``password`` attributes before calling this method.

        Again, distutils is used to do the actual work.
        N)�check_credentialsr5�
_store_pypircr6r7)r$r<r-r-r.�save_configurationYs
zPackageIndex.save_configurationcCs�|jdks|jdkr-td��nt�}t|j�\}}}}}}|j|j||j|j�t|�|_	dS)zp
        Check that ``username`` and ``password`` have been set, and raise an
        exception if not.
        Nz!username and password must be set)
r6r7rrrr�add_passwordr8rr)r$Zpm�_r&r-r-r.r>es	!zPackageIndex.check_credentialscCs�|j�|j�|j�}d|d<|j|j�g�}|j|�}d|d<|j|j�g�}|j|�S)aq
        Register a distribution on PyPI, using the provided metadata.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the distribution to be
                         registered.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        �verifyz:actionZsubmit)r>�validate�todict�encode_request�items�send_request)r$�metadatar4�request�responser-r-r.�registerqs




zPackageIndex.registercCsdxS|j�}|sPn|jd�j�}|j|�tjd||f�qW|j�dS)ar
        Thread runner for reading lines of from a subprocess into a buffer.

        :param name: The logical name of the stream (used for logging only).
        :param stream: The stream to read from. This will typically a pipe
                       connected to the output stream of a subprocess.
        :param outbuf: The list to append the read lines to.
        zutf-8z%s: %sN)�readline�decode�rstrip�append�logger�debug�close)r$�name�streamZoutbufr+r-r-r.�_reader�s	
zPackageIndex._readercCs�|jdddg}|jr7|jd|jg�n|dk	r\|jdddg�ntj�}tjj|tjj|�d	�}|jd
dd|d
||g�t	j
ddj|��||fS)a�
        Return a suitable command for signing a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The signing command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        z--status-fd�2z--no-ttyz	--homedirNz--batchz--passphrase-fd�0z.ascz
--detach-signz--armorz--local-userz--outputzinvoking: %s� )rr�extend�tempfile�mkdtemprr'�join�basenamerQrR)r$�filename�signer�
sign_password�cmd�tdZsfr-r-r.�get_sign_command�s	%zPackageIndex.get_sign_commandc	Cs
itjd6tjd6}|dk	r6tj|d<ng}g}tj||�}td|jdd|j|f�}|j�td|jdd|j|f�}|j�|dk	r�|jj	|�|jj
�n|j�|j�|j�|j
||fS)a�
        Run a command in a child process , passing it any input data specified.

        :param cmd: The command to run.
        :param input_data: If specified, this must be a byte string containing
                           data to be sent to the child process.
        :return: A tuple consisting of the subprocess' exit code, a list of
                 lines read from the subprocess' ``stdout``, and a list of
                 lines read from the subprocess' ``stderr``.
        rrN�stdin�target�args)r!�PIPE�PopenrrVr�startrre�writerS�waitr]�
returncode)	r$rbZ
input_data�kwargsrr�p�t1�t2r-r-r.�run_command�s&

$
$



zPackageIndex.run_commandc	Csb|j|||�\}}|j||jd��\}}}|dkr^td|��n|S)a}
        Sign a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The absolute pathname of the file where the signature is
                 stored.
        zutf-8rz&sign command failed with error code %s)rdrr�encoder)	r$r_r`rarb�sig_filer,rrr-r-r.�	sign_file�s	
zPackageIndex.sign_file�sdist�sourcecCs�|j�tjj|�s/td|��n|j�|j�}d}|r�|jsjtj	d�q�|j
|||�}nt|d��}	|	j�}
WdQXt
j|
�j�}t
j|
�j�}|jidd6dd6|d	6|d
6|d6|d6�d
tjj|�|
fg}
|r�t|d��}	|	j�}WdQX|
jdtjj|�|f�tjtjj|��n|j|j�|
�}|j|�S)a�
        Upload a release file to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the file to be uploaded.
        :param filename: The pathname of the file to be uploaded.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param filetype: The type of the file being uploaded. This is the
                        distutils command which produced that file, e.g.
                        ``sdist`` or ``bdist_wheel``.
        :param pyversion: The version of Python which the release relates
                          to. For code compatible with any Python, this would
                          be ``source``, otherwise it would be e.g. ``3.2``.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        z
not found: %sNz)no signing program available - not signed�rbZfile_uploadz:action�1Zprotcol_version�filetype�	pyversion�
md5_digest�
sha256_digest�contentZ
gpg_signature)r>rr'�existsrrDrErrQ�warningrur�read�hashlib�md5�	hexdigest�sha256�updater^rP�shutil�rmtree�dirnamerFrGrH)r$rIr_r`rarzr{r4rt�fZ	file_datar|r}�filesZsig_datarJr-r-r.�upload_file�s<

		
zPackageIndex.upload_filec
Cs�|j�tjj|�s/td|��ntjj|d�}tjj|�sitd|��n|j�|j|j	}}t
|�j�}d	d|fd|fg}d||fg}|j||�}	|j
|	�S)
a2
        Upload documentation to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the documentation to be
                         uploaded.
        :param doc_dir: The pathname of the directory which contains the
                        documentation. This should be the directory that
                        contains the ``index.html`` for the documentation.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        znot a directory: %rz
index.htmlz
not found: %r�:action�
doc_uploadrT�versionr~)r�r�)r>rr'�isdirrr]rrDrTr�r�getvaluerFrH)
r$rIZdoc_dir�fnrTr��zip_data�fieldsr�rJr-r-r.�upload_documentations

z!PackageIndex.upload_documentationcCsj|jdddg}|jr7|jd|jg�n|jd||g�tjddj|��|S)a�
        Return a suitable command for verifying a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: The verifying command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        z--status-fdrWz--no-ttyz	--homedirz--verifyzinvoking: %srY)rrrZrQrRr])r$�signature_filename�
data_filenamerbr-r-r.�get_verify_command5s	zPackageIndex.get_verify_commandcCsk|jstd��n|j||�}|j|�\}}}|dkratd|��n|dkS)a\
        Verify a signature for a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: True if the signature was verified, else False.
        z0verification unavailable because gpg unavailablerrz(verify command failed with error code %s)rr)rrr�rr)r$r�r�rbr,rrr-r-r.�verify_signatureGs
	
zPackageIndex.verify_signaturecCs|dkr"d}tjd�nMt|ttf�rF|\}}nd}tt|��}tjd|�t|d��}|jt	|��}z�|j
�}	d}
d}d}d}
d	|	kr�t|	d
�}n|r�||
|
|�nxs|j|
�}|sPn|t
|�7}|j|�|rD|j|�n|
d7}
|r�||
|
|�q�q�WWd|j�XWdQX|dkr�||kr�td||f��n|r|j�}||kr�td||||f��ntjd
|�ndS)a
        This is a convenience method for downloading a file from an URL.
        Normally, this will be a file from the index, though currently
        no check is made for this (i.e. a file can be downloaded from
        anywhere).

        The method is just like the :func:`urlretrieve` function in the
        standard library, except that it allows digest computation to be
        done during download and checking that the downloaded data
        matched any expected value.

        :param url: The URL of the file to be downloaded (assumed to be
                    available via an HTTP GET request).
        :param destfile: The pathname where the downloaded file is to be
                         saved.
        :param digest: If specified, this must be a (hasher, value)
                       tuple, where hasher is the algorithm used (e.g.
                       ``'md5'``) and ``value`` is the expected value.
        :param reporthook: The same as for :func:`urlretrieve` in the
                           standard library.
        NzNo digest specifiedr�zDigest specified: %s�wbi rrzcontent-lengthzContent-Lengthz1retrieval incomplete: got only %d out of %d bytesz.%s digest mismatch for %s: expected %s, got %szDigest verified: %s���)rQrR�
isinstance�list�tuple�getattrr�rrHr�info�intr��lenrkr�rSrr�)r$r�destfile�digest�
reporthookZdigesterZhasherZdfpZsfp�headers�	blocksize�sizer��blocknum�block�actualr-r-r.�
download_file[sV

zPackageIndex.download_filecCsWg}|jr"|j|j�n|jr>|j|j�nt|�}|j|�S)z�
        Send a standard library :class:`Request` to PyPI and return its
        response.

        :param req: The request to send.
        :return: The HTTP response from PyPI (a standard library HTTPResponse).
        )rrPrr	r)r$�req�handlers�openerr-r-r.rH�s		zPackageIndex.send_requestcCs<g}|j}xy|D]q\}}t|ttf�sC|g}nxA|D]9}|jd|d|jd�d|jd�f�qJWqWxG|D]?\}}	}
|jd|d||	fjd�d|
f�q�W|jd|ddf�dj|�}d|}i|d6tt|��d	6}
t	|j
||
�S)
a&
        Encode fields and files for posting to an HTTP server.

        :param fields: The fields to send as a list of (fieldname, value)
                       tuples.
        :param files: The files to send as a list of (fieldname, filename,
                      file_bytes) tuple.
        s--z)Content-Disposition: form-data; name="%s"zutf-8�z8Content-Disposition: form-data; name="%s"; filename="%s"s
smultipart/form-data; boundary=zContent-typezContent-length)�boundaryr�r�r�rZrsr]�strr�rr)r$r�r��partsr��k�values�v�keyr_�value�body�ctr�r-r-r.rF�s4	


zPackageIndex.encode_requestcCsbt|t�ri|d6}n|jdkrIt|jdd�|_n|jj||p^d�S)NrT�timeoutg@�and)r�r
rr
r�search)r$Zterms�operatorr-r-r.r��s
zPackageIndex.search)�__name__�
__module__�__qualname__�__doc__r�r/r5rr@r>rLrVrdrrrur�r�r�r�r�rHrFr�r-r-r-r.rs*
#4M+r)r��loggingrr�r!r[�	threadingr�ImportError�dummy_threading�r�compatrrrrr	r
�utilrrr
�	getLoggerr�rQr�
DEFAULT_REALM�objectrr-r-r-r.�<module>s 
.python3.4/site-packages/pip/_vendor/distlib/w32.exe000064400000252000151735047400016033 0ustar00MZ����@���	�!�L�!This program cannot be run in DOS mode.

$�4�m�U�>�U�>�U�>+>�U�>�->�U�>�->�U�>�->�U�>�->�U�>�U�>�U�>�->�U�>�->�U�>�->�U�>Rich�U�>PEL1�R�	���'�@�2�@���(0�P�D	��H�@�H.textڹ� `.rdata2#�$�@@.data�,�@�.rsrc�P0R�@@.reloc�D@BVh��@�<�@��pA��u��t7h��@V�8�@�pA��th�jhh�@�t$j��^�V��@3�^�U����A3ʼnE��}u4�EP�u������h�hP��/������P�h�����j��@�M�3��y�ËL$W3��F��0P��APQ�����t��A�	;u���H�D$+��D0���}̋�_�U���(Wh�@�E�3�hhAP�}��}��
3�;���h �@Q�/���jW�u��4�u��4�E�������$;ljE�}�}�SVW�u��u��	�u��Sj�u�D�u���5����� ;�tj��Y�}��}+�E����~�V�
�E�E��;�Y�E�}�}�W�u��u���u�Vj�u����u��������3�����h<�@P�f�����+]�j]�Y�u�}�����}��,�+u�+u�+�y3�jV�u��:�u�SjW�|��3�;����h`�@P�	�����$�D>�^[�f��|�@f;tH;�s���E�u����E�Y_��V���@�&jjjVP�t$P�H�@��u�4�@��uF��^Ã|$u�lA��t	jP��@3�@�U�����SVW3�WW�,�@�؍D$Pjp�D$pPj	S�(�@��t�|$pu3�@�3�h��@P�9�����$�0YYjp�D$lPj	S��@h��@P����jD^V�D$,WP�S���t$ �50�@j���P�D$\�����$��@P����YYj���P�D$`���$��@P���YYj��P�D$d�����$��@P���YYjh�@�D$T�@�@�D$P�D$$PWWWjWW�uW�$�@�uh�@P�`����D$$���t$�lAS��@�t$�L�@j��t$��@�D$P�t$� �@h8�@P����YY�t$��@�U��$p������A3ʼn��SVW��@�8"t� �@�"@��QP�3�YY;�u	�E��@��p���P��Y��tF���u�u�h�hAVW�D�@�=hA"t�u��	H�E�iAH�]���E�P��AP������3�;����$\�@P�M���Y��Y��;�s���
t��
tA;�r����3�����ht�@P����YY���P�Y��tF�>u�3��>#h��@��P���YY���P��Y��tF���u�3��>!h��@��P���YY���P�Y��tF���u�ƍP�@��u�+‹��ÍH�@��u�+��ȋE��P�@��u�+���|8jW�4��3�����h�@P�T����u��u�Vh8�@WWS�W��,S�����%����;
Au���Z��U��W��W�T�@�u�P�@�����`�w��t�_]Ë�U���n�u��5A�h��Ѓ�]Ë�U��h��@�P�@��th��@P�8�@��t�u��]Ë�U��u����Y�u��@�j�Y�j��YË�U��V������t�Ѓ�;ur�^]Ë�U��V�u3����u���t�у�;ur�^]Ë�U��=�,Ath�,A�Y��t
�u��,AY��hh�@hP�@���YY��uBh5@�e�H�@�$L�@�c����=�,AYth�,A�\Y��tjjj��,A3�]�jh�@�j��Y�e�3�C90A���,A�E�(A�}���5�,A�Y���}؅�tx�5�,A�Y��u܉}�u���u�;�rW��9t�;�rJ�6���������5�,A�����5�,A���9}�u9E�t�}�}؉E��u܋}��hx�@�l�@�_���Yh��@�|�@�O���Y�E�������}u(�0Aj�Y�u���3�C�}tj��Y��!Ë�U��jj�u������]Ë�U��jj�u�����]�jjj������jjj�����Ë�V����V�#V�B#V�V�'#V�#V� V�V�|h�@�2��$�A^Ë�U��EPj�u�u�u�u��%��]Ë�U��EV���F��uc��F�Hl��Hh�N�;
�	At�
�A�Hpu�80��F;�At�F�
�A�Hpu�(�F�F�@pu�Hp�F�
���@�F��^]���U����u�M��f����E�~�E�Pj�u�:0�������M�H���}�t�M��ap���U��=0Au�E�
�	A�A��]�j�u���YY]�jh �@��u��tu�=�,AuCj��Y�e�V�0Y�E�t	VP��0YY�E�������}�u7�u�
j��Y�Vj�5TA�X�@��u�Y��4�@P�	�Y���U��Q�e�V�E�P�u�u��:�����u9E�t���t
��M����^��jh@�@�B�e��u;5�,Aw"j�Y�e�V�7Y�E��E������	�E��N�j�	YË�U��V�u�����SW�=\�@�=TAu�j�Rh�����YY��,A��u��t���3�@P���uV�S���Y��u��uF�����Vj�5TA�׋؅�u.j^9\At�u� Y��t�u�{�����0��0_��[�V� Y���3�^]�����̍B�[Í�$�d$3��D$S����T$��t�
��:�tτ�tQ��u��W���V؋
����~����3������3�3ƃ����u%�t�%u���u�^_[3�ËB�:�t6��t�:�t'��t��:�t��t�:�t��t��^_�B�[ÍB�^_[ÍB�^_[ÍB�^_[��̋D$S��tR�T$3ۊ\$��t�
��2�tr��t2��u��rW����ߋ�����_��t�
��2�t@��u�[�r�
3˿���~���3σ����t�J�2�t#2�t��2�t2�t��_�B�[ÍB�_[ÍB�_[ÍB�_[�jh`�@�3ۉ]�3��};���;�u�C�SSSSS����3��y3��u;���;�t�3�8��;�t��n=�E;�u
���ʉ]�8u ���j��E�PhA�p>���P�uVW�_:���E��E������	�E��?�u��9YË�U��VW�}3�;�u�j_VVVVV�8������$h��u�u�������;�t3���V�_^]Ë�U����MS�]VW3��M��]�9}t!9}t;�u�$WWWW�W���3�_^[�Ëu;�t
��3�u9Ev!���tSWQ�uG��;�t���3�u9Ew��}�}�F�}��t�F�E���E������FtD�F��t=�5��;�r��;}���W�6�u��u��{F)~>}�+߃�)}��}��;]�rh�}�t����3�;�v	���u����u��+������;�w��;E���P�u�V��EYP��D�����������E�+�)E��(V��=Y������}�tN�M��E���FK�M��E�������E���3��}�t�uV�u�/F���VVVV�"V�r����}�t�uj�u�F���p�"3�PPPPP�E����N ��+�3�u�=����N��jh��@�3��u�9ut79ut29uu5�}�t�uV�u�E����VVVVV���3���u�6Y�u��u�u�u�u�u������E��E�������E���u��6YË�U��u�u�uj��u�R�����]Ë�U���SW�}3�;�u �{SSSSS�������fW�/D9_Y�E�}�_jSP�H��;ÉE�|ӋW��u+G�.��OV��+�u��tA�U��u������A�����D2�t��;�s��:
u�E�3�B;�r�9]�u�E�����x������G���W;�u�]���]��u�+��������A�E����D0�tyjj�u��EG��;E�u �G�M��	�8
u�E@;�r�G �@j�u��u��G����}���:�9Ew�O��t��t�G�E��D0t�E�E)E��E�M��^_[��jh��@�63�3�9u��;�u���VVVVV�_�����'�u�p4Y�u��u����Y�E��E������	�E��$�u�4YË�U��V�u�F��u�s����g���}�FuV����E�eYV��F�FY��y��F��t�t�u�F�u�uV��AYP��E3Ƀ������I��^]�jh��@�>3�3�9u��;�u���VVVVV�g�����>�};�t
��t��u�u�g3Y�u�W�u�u�������E��E������	�E���u�3Y�U��SV�uW3���;�u�`WWWWW���
����B�F�t7V��EV����HV�AP�H����}����F;�t
P�@���Y�~�~��_^[]�jh��@�B�M�3��u3�;���;�u��
�WWWWW�e
������F@t�~�E��E�V�f2Y�}�V�*���Y�E��E�������ՋuV�2YË�U��=<Au��	�u�9h���YY]�jXh�@�3��u��E�P�`�@j�_�}��MZf9@u8�<@��@PEu'�f9�@u��t@v3�9��@���M���u�3�CS�$Y��uj�X���Y���uj�G���Y�N�]���@��}j��Y��@��,A�]K�4A�J��}j��Y�H��}j	�~�YS�6�Y;�tP�l�Y�G�]�t�M��j
YQPVh@���E�9u�uP�����}��5�E��	�M�PQ�YYËe�E܉E�}�uP�����E������E��3�@Ëe��E��������q���K�x�����U���(�HA�
DA�@A�<A�58A�=4Af�`Af�
TAf�0Af�,Af�%(Af�-$A��XA�E�LA�E�PA�E�\A������A�PA�LA�@A	��DA�A������A������p�@��Aj�KYj�l�@h��@�h�@�=�Auj�kKYh	���@P�d�@�Ë�U��V�5 A�5t�@�օ�t!�A���tP�5 A��Ѕ�t����'���@V�P�@��uV�Q�Y��th��@P�8�@��t�u�ЉE�E^]�j���YË�U��V�5 A�5t�@�օ�t!�A���tP�5 A��Ѕ�t����'���@V�P�@��uV���Y��th�@P�8�@��t�u�ЉE�E^]�x�@���V�5 A�t�@��u�5hA�e���Y��V�5 A�|�@��^áA���tP�5pA�;���Y�Ѓ
A�� A���tP���@�
 A��ejh(�@����@V�P�@��uV��Y�E�u�F\�@3�G�~��t$h��@P�8�@�Ӊ��h�@�u�Ӊ���~pƆ�CƆKC�Fh�Aj
�Y�e��vh���@�E������>j�Y�}��E�Fl��u��	A�Fl�vl��Y�E�������+�3�G�uj
��Y�j��YË�VW�4�@�5A������Ћ�uNhj�*I��YY��t:V�5A�5lA���Y�Ѕ�tjV����YY���@�N���	V�G�Y3�W���@_��^Ë�V������uj���Y��^�jhP�@�.�u�����F$��tP��Y�F,��tP���Y�F4��tP���Y�F<��tP���Y�F@��tP���Y�FD��tP��Y�FH��tP��Y�F\=�@tP��Yj
�Y�e��~h��tW���@��u���AtW�h�Y�E������Wj�RY�E��~l��t#W��Y;=�	At���At�?uW��Y�E������V��Y�k
��uj
�!YËuj�YË�VW���@V�P�@��uV�v�Y�����^�58�@h8�@W��h,�@W�dA��h �@W�hA��h�@W�lA�փ=dA�5|�@�pAt�=hAt
�=lAt��u$�t�@�hA���@�dA�)@�5lA�pA�x�@� A������5hAP�օ������5dA�����5hA�dA�����5lA�hA���5pA�lA������pA�W��tehv+@�5dA�=���Y�УA���tHhj�LF��YY��t4V�5A�5lA�
���Y�Ѕ�tjV���YY���@�N��3�@����3�_^Ë�U��QQS�]VW3�3��}�;�(At	G�}���r��wj�IY���4j��IY��u
�=A�����Ah��@�S�xAW�NI����t
VVVVV���h��AVj��A�D�@��u&h��@h�V�I����t3�PPPPP����V�eH@Y��<v8V�XH��;�j��Ah��@+�QP�}G����t3�VVVVV����3�h��@SW��F����t
VVVVV�k���E��4�,ASW�F����t
VVVVV�F��h h��@W�1E���2j�0�@��;�t$���tj�E�P�4�,A�6�GYP�6S���@_^[��j�HY��tj�rHY��u�=Auh��)���h�����YYË�VW3���A�<��Au���A�8h��0���CYY��tF��$|�3�@_^Ã$��A3���S���@V��AW�>��t�~t
W��W���&Y����A|ܾ�A_���t	�~uP�Ӄ���A|�^[Ë�U��E�4��A���@]�jhx�@��3�G�}�3�9TAu���j�;���h���YY�u�4��A9t���nj��BY��;�u�<�3��Qj
�YY�]�9u,h�W�:YY��uW�<�Y���]���>�W�!�Y�E������	�E��m�j
�(���YË�U��EV�4��A�>uP�"���Y��uj��Y�6���@^]Ë�U��E��A]Ë�U���(�A3ʼnE������SjL�����jP��4�������(�����0�������,��������������������������������f������f����f�����f�����f������f�����������E�MDž0�����������I�����Dž����Dž��������p�@j��l�@��(���P�h�@��u��uj�AYh���@P�d�@�M�3�[�,��Ë�U��5�A����Y��t]��j��@Y]�����U��E3�;�AtA��-r�H�wj
X]Ë�A]�D���jY;��#���]��z�����u�hAÃ���g�����u�lAÃ�Ë�U��V����MQ����Y������0^]Ë�U��QSVW�5�,A�O����5�,A���}��?�����YY;�����+ߍC��rwW�D���CY;�sH�;�s���;�rP�u��q@YY��u�G;�r@P�u��[@YY��t1��P�4��Z�Y��,A�u�L���V�A�Y��,A�EY�3�_^[�Ë�Vjj ��?��V�����,A��,A��ujX^Ã&3�^�jh��@��(��e��u���Y�E��E������	�E��(���Ë�U��u��������YH]Ë�V���@���@W��;�s���t�Ѓ�;�r�_^Ë�V���@���@W��;�s���t�Ѓ�;�r�_^Ë�VW3���pA�6�K��Y���(r�_^��������̋�U��M�MZf9t3�]ËA<��8PEu�3ҹf9H�‹�]�����������̋�U��E�H<��ASV�q3�W�D��v�}�H;�r	�X�;�r
B��(;�r�3�_^[]������������̋�U��j�h��@h7@d�P��SVW�A1E�3�P�E�d��e��E�h@�*�������tU�E-@Ph@�P�������t;�@$���Ѓ��E������M�d�
Y_^[��]ËE��3�=��‹�Ëe��E�����3��M�d�
Y_^[��]����h7@d�5�D$�l$�l$+�SVW�A1E�3�P�e�u��E��E������E��E�d�ËM�d�
Y__^[��]Q�������̋�U���S�]V�s35AW��E��E��{���t
�N�38�����N�F�38�����E�@f��M�U�S��[�E�M��t_�I�[�L��D��E��E���t���P&�E���|@G�E��؃��u΀}�t$����t
�N�38�Z���N�V�3:�J���E�_^[��]��E��ɋM�9csm�u)�=�,At h�,A�������t�UjR��,A���M��%�E9XthAW�Ӌ��%�E�M��H����t
�N�38�����N�V�3:����E�H���%�����9S�R���hAW���%����jh��@������@x��t�e����3�@Ëe��E������@�!����h�8@��Y��A�Ë�U��QQV�����F�V\��AW�}��S99t��k����;�r�k��;�s99u���3���t
�X�]���u3����u�`3�@�������N`�M��M�N`�H�����
�A�=�A���;�}$k��~\�d9�=�A��AB߃�;�|�]���~d=��u	�Fd��^=��u	�Fd��N=��u	�Fd��>=��u	�Fd��.=��u	�Fd��=��u	�Fd��=��u�Fd��vdj��Y�~d��`Q�ӋE�Y�F`��[_^�Ë�U��E��A��A��A��A]Ë�U��E�
�AV9Pt��k�u��;�r�k�M^;�s9Pt3�]�5�A�i�Y�j h��@���3��}�}؋]��Lt��jY+�t"+�t+�td+�uD����}؅�u���a��A��A�`�w\���]��������Z�Ã�t<��t+Ht�?����3�PPPPP������뮾�A��A���A��A�
��A��A�E�P���E�Y3��}���9E�uj�d��9E�tP����Y3��E���t
��t��u�O`�MԉG`��u@�Od�M��Gd���u.�
�A�M܋
�A��A�9M�}�M�k��W\�D�E����
���E��������u�wdS�U�Y��]�}؃}�tj��Y�S�U�Y��t
��t��u�EԉG`��u�EЉGd3����Ë�U��E��A]Ë�U��E�A]Ë�U��E�A]�jh�@�����e��u�u���@�E��/�E���E�3�=�����Ëe�}��uj���@�e��E������E�����Ë�U��E�A]Ë�U��5A��Y��t�u��Y��t3�@]�3�]Ë�U��QV�uV�)�E�FY��u�'����	�N ���/�@t
�����"��S3ۨt�^����N���F�F�����F�^�]��u,��� ;�t���@;�u
�u�EJY��uV��IY�FW���F�>�H��N+�I;��N~WP�u��H���E��M�� �F���y�M���t���t�����������A��P
A�@ tjSSQ�N@#ƒ����t%�F�M��3�GW�EP�u�vH���E�9}�t	�N ����E%�_[^�Ë�U��� S3�9]u ���SSSSS��V�����V�uW�};�t!;�u��SSSSS��&�����j�����E�;�w�}�u�E�u�E�B�u�u�P�u�U���E;�t4;�|"�M�x�E���E�PS���YY���t�E�3�9]�\>���HH_^[�Ë�U��QS3�9]u ��SSSSS��������V�uW9]u;�u9]u3��;�t�};�w������u�u�u;}v-�8�E@PVh��@��������uL��8"ue�x�8�\�WVh��@�E�������\>����u�}�u�L�8"u/�B�M���#;�}"����u�+��"SSSSS�����_^[�Ë�U��uj�u�u�u�u������]�-�t"��t��
tHt3�øøøøË�VW��h3��FWP�6&3��ȋ��~�~�~����~�����A���F+ο��@Ou������@Nu�_^Ë�U����A3ʼnE�SW����P�v���@�����3�������@;�r���ƅ���� ��t.�������;�w+�@P��
����j R�s%��C�C��u�j�v�������vPW������Pjj�W[3�S�v������WPW������PW�vS�8Y��DS�v������WPW������Ph�vS�Y��$3���E������t�L���������t�L ���������Ƅ@;�r��V��Dž������3�)���������ЍZ ��w�L�р� ���w�L �р� ���A;�r‹M�_3�[�����jh8�@�
�������A�Gpt�lt�wh��uj ���Y���"��j
��Y�e��wh�u�;5�At6��tV���@��u���AtV���Y��A�Gh�5�A�u�V���@�E������뎋u�j
�|�YË�U���S3�S�M��<���A���u�A���@8]�tE�M��ap��<���u�A���@�ۃ��u�E�@�A��8]�t�E��`p���[�Ë�U��� �A3ʼnE�S�]V�uW�d�����3��};�u�����3���u�3�9��A���E�0=�r���p����d��P���@���R�E�PW���@���3h�CVP�"3�B���{�s9U����}����u������F����h�CVP�L"�M��k�0�u��A�u��*�F��t(�>����E��AD;�FG;�v�}FF�>uыu�E���}��u�r�lj{�C�g���j�C�C���AZf�1Af�0A@@Ju����������L@;�v�FF�~��4����C���@Iu��C�����C�S��s3��ȋ�����{����95A�X������M�_^3�[�����jhX�@��M������}������_h�u�u����E;C�Wh �.Y�؅��F���wh���#S�u���YY�E����u�vh���@��u�Fh=�AtP�e��Y�^hS�=��@��Fp����A��j
�8�Y�e��C�$A�C�(A�C�,A3��E�}f�LCf�EA@��3��E�=}
�L���A@��3��E�=}�����A@��5�A���@��u��A=�AtP���Y��AS���E�������0j
��Y��%���u ���AtS�v��Y�@����e��E���Ã=�,Auj��V���Y��,A3�Ë�U��SV�u���3�W;�to=hAth���;�t^9uZ���;�t9uP�������yWYY���;�t9uP��������WYY�������������YY���;�tD9u@���-�P��������+�P������+�P�w������l��������=�
At9��uP�T�7�E��YY�~P�E���At�;�t9uP� ��Y9_�t�G;�t9uP�	��Y���Mu�V���Y_^[]Ë�U��SV�5��@W�}W�֋����tP�֋����tP�֋����tP�֋����tP�֍_P�E�{��At	���tP�փ{�t
�C��tP�փ��Mu֋���P��_^[]Ë�U��W�}����SV�5��@W�֋����tP�֋����tP�֋����tP�֋����tP�֍_P�E�{��At	���tP�փ{�t
�C��tP�փ��Mu֋���P��^[��_]Å�t7��t3V�0;�t(W�8���Y��tV�E����>Yu���AtV�Y���Y��^�3��jhx�@���E����A�Fpt"�~lt�.��pl��uj �)��Y�����j�F�Y�e��Fl�=�	A�i����E��E�������j�A�Y�u�Ë�U���S�u�M�����]�C=w�E苀��X�u�]�}�E�P�E%�P�9?YY��t�Ej�E��]��E�Y�
3Ɉ]��E�A�E�j�p�p�E�PQ�E�P�E�jP�Q�� ��u8E�t�E�`p�3���E�#E�}�t�M�ap�[�Ë�U��3�9Ej��hP���@�TA��u]�3�@��,A]Ë�U��
�,A��,Ak����U+P��r	��;�r�3�]Ë�U����M�AV�uW��+y������i���D�M�I�M�����S�1��U�V��U��U�]��ut��J��?vj?Z�K;KuB���� s����L��!\�D�	u#�M!��J���L��!����	u�M!Y�]�S�[�M�M�Z�U�Z�R�S�M����J��?vj?Z�]����]���+u��]���j?�uK^;�v��M����J�M�;�v��;�t^�M�q;qu;���� s�����!t�D�Lu!�M!1��K����!����Lu�M!q�M�q�I�N�M�q�I�N�u��]�}�u;����M�ыY�N�^�q�N�q�N;Nu`�L�M���L�� s%�}u�ʻ���M	������D�D	�)�}u�J����M	Y�J���ꍄ��	�E���D0��E����XA�����
�,A�5��@h@��H��SQ�֋
�,A�XA����	P�XA�@�
�,A�����XA�@�HC�XA�H�yCu	�`��XA�x�ueSj�p�֡XA�pj�5TA�X�@�
�,A�XAk���,A+ȍL�Q�HQP�S�E���
�,A;XAv�m��,A��,A�E�XA�=�,A[_^�á�,AV�5�,AW3�;�u4��k�P�5�,AW�5TA���@;�u3��x��,A�5�,A��,Ak�5�,Ah�Aj�5TA�\�@�F;�t�jh hW���@�F;�u�vW�5TA�X�@뛃N��>�~��,A�F����_^Ë�U��QQ�M�ASV�qW3���C��}���i���0Dj?�E�Z�@�@��Ju�j��h��yh�W���@��u�����p�U�;�wC��+���GA�H���������������@���Pǀ��IuˋU��E���O�H�A�J�H�A�d�D3�G�����FC������E�NCu	x�������!P��_^[�Ë�U����M�ASV�uW�}��+Q������i���D�M�O����I;�|9���M�]��U���E�;��;�M���I�M���?vj?Y�M��_;_uC���� s��M��L��!\�D�	u&�M!������M��L��!����	u�M!Y�O�_�Y�O��y�M+�M��}����}��M��O�L1���?vj?_�]���]�[�Y�]�Y�K�Y�K�Y;YuW�L�M���L�� s�}u�ϻ���M	�D�D��� �}u�O����M	Y�����O����	�U�M��D2���L���U�F�B��D2��<3��8�/�])u�N�K��\3��u��N�]�K���?vj?^�E����u���N��?vj?^�O;OuB���� s����t��!\�D�u#�M!��N���L��!����	u�M!Y�]�O�w�q�w�O�q�uu��u��N��?vj?^�M��y�K�{�Y�K�Y�K;KuW�L�M���L�� s�}u�ο���M	9�D�D��� �}u�N����M	y�����N����	�E��D�3�@_^[�Ë�U�����,A�Mk��,A�����M�SI�� VW}����M���
����3���U��
�,A����S�;#U�#��u
���];�r�;�u��,A��S�;#U�#��u
���];�r�;�u[��{u
���];�r�;�u1��,A�	�{u
���];�r�;�u����؉]��u3��	S�:���Y�K��C�8�t��,A�C��U����t�����|�D#M�#��u)�e�����HD�9#U�#��u�E��������U���i���D�M�L�D3�#�u����#M�j _��G��}��M�T��
+M��N��?�M�~j?^;���J;Ju\�� ��}&����M��|8�Ӊ]�#\�D�\�D�u3�M�]!�,�O���M������|8��!��]�u�]�M�!K��]�}��J�z�y�J�z�y���M��y�J�z�Q�J�Q�J;Ju^�L�M���� �L}#�}u������	;�ο���M�	|�D�)�}u
�N����	{�M������N����	7�M���t�
�L���M��u�эN�
�L2��u��y�>��u;XAu�M�;
�,Au�%XA�M���B_^[��jh��@�|��M3�;�v.j�X3��;E�@u����WWWWW�����3����M��u;�u3�F3ۉ]��wi�=�,AuK�����u�E;�,Aw7j����Y�}��u���Y�E��E������_�]�;�t�uWS���;�uaVj�5TA�\�@��;�uL9=\At3V��Y���r����E;��P�����E���3��uj���Y�;�u
�E;�t������ø�	Aá�,AVj^��u��;�}�ƣ�,AjP��YY��A��ujV�5�,A�YY��A��ujX^�3ҹ�	A���A��� ����PA|�j�^3ҹ�	AW������A����������t;�t��u�1�� B��@
A|�_3�^���=(At��L�5�A�y��Y�U��V�u��	A;�r"��0Aw��+����Q�K���N�Y�
�� V���@^]Ë�U��E��}��P����E�H�Y]ËE�� P���@]Ë�U��E��	A;�r=0Aw�`���+�����P���Y]Ã� P���@]Ë�U��M���E}�`�����Q����Y]Ã� P���@]Ë�U�����AS3�V�u�E��]�]��]��F�> t��<at9<rt,<wt�.��SSSSS������3��p�E��M��]��E	�M�3�AF�W:����Q�@;��.����S������ ���tVHtG��t/��
t"����9]����M�E���	U���E@���M@��E���E���E����E�E���‰E��9]�uw�M �E��u��Tt\��tEHt1��t����E�uF	}�L9]�u<�e������E��79]�u'	}��E��&�E�u�M���Et3���MF�:�����9]����F�> t�jVhx�@�vV���������F�> t��>=upF�> t�jh|�@V��T����u���M�Ajh��@V�T����u���M�!jh��@V�T����u���M�F�> t�8t���SSSSS�������h��u�E�u�uP��Q����t3�� �E�`A�M��H�M�X��X�X�H_^[��jh��@����3�3��}�j���Y�]�3��u�;5�,A����A��9t[��@��uH��uA�F���w�FP���Y������A�4�V�'���YY��A���@�tPV�~���YYF둋��}��h��j8�Y�
�A���A�9tIh���� P���YY����Au�4���Y��A����� P���@��A�<�}�_;�t�g��_�_��_�O��E�����������Ë}�j���Y�SVW�T$�D$�L$URPQQh�]@d�5�A3ĉD$d�%�D$0�X�L$,3�p���t;�T$4���t;�v.�4v�\���H�{u�h�C�U��C� U�d���_^[ËL$�A�t3�D$�H3��z���U�h�p�p�p�>�����]�D$�T$���U�L$�)�q�q�q(������]�UVWS��3�3�3�3�3���[_^]Ë��j�kT3�3�3�3�3���U��SVWjjh3^@Q�k_^[]�U�l$RQ�t$�����]���U��V�uW3�;�u���WWWWW��������F�����@���t�� �F�����F�u	V�)Y��F��v�vV�tYP�p���F;���������F�uOV�JY���t.V�>Y���t"V�2��V�<��A�"��Y��Y��P
A�@$�<�u�N �~u�F�t�u�F��N�A���������	F�~��_^]Ë�U����UV�uj�X�E�U�;�u����� ����	���S3�;�|;5|Ar'�������SSSSS�	� �������Q���W�<��A�����ƊH��u�l����R���	�j�����wP�]�;������9]t7�@$���E���HjYtHu��Шt��U�E�E����Шu!���������SSSSS�n�����4����M;�r�E�u�JY�E�;�u�����������hjSS�u�*��D(�E���T,��AHtt�I��
tl9]tg��@�M�E��D
8]�tN��L%��
tC9]t>��@�M�}��E��D%
u$��L&��
t9]t��@�M�E��D&
S�M�Q�uP��4���@���{�M�;��p;M�g�M�D�����}��;�t
�M�9
u��� ��]�E�É]�E�;����M�<��<
t�CA�M��E�H;�s�A�8
u
AA�M�
�u�E�m�Ej�E�Pj�E�P��4���@��u
�4�@��uE�}�t?��DHt�}�
t��
��M��L�%;]�u�}�
t�jj�j��u����}�
t�
C�E�9E�G������D�@u����C��+E�}��E�������K���xC�3�@�����;]�rK�@��PAt�����PA��u
�Y���*�zA;�u��@��AHt$C���Q|	���T%C��u	���T&C+���ؙjRP�u����E�+]���P�uS�u�jh����@�E�u4�4�@P���Y�M�E�;EtP���Y�E�����E���E�3�;�����E�L0��;�t�M�f�9
u��� ��]�E�É]�E�;����E�f����f��
tf�CC@@�E��M�;�s�Hf�9
u
���Ej
��M��Ej�E�Pj�E�P��4���@��u
�4�@��u[�}�tU��DHt(f�}�
t�j
Xf���M��L��M��L%��D&
�*;]�uf�}�
t�jj�j��u�H��f�}�
tj
Xf�CC�E�9E�������t�@u��f�f�CC+]�]�����4�@j^;�u�R���	�Z���0�i�����m�Y����]��\���3�_[^��jh��@�h���E���u�"��� ����	���3�;�|;|Ar!����0�����	VVVVV�g�����ɋ�����A��������L9��t�����;M�Au����0�����P�<NY�u���D8t�u�u�u�~������E���[���	�c���0�M��E������	�E������u�NYË�U��EV3�;�u���VVVVV����������@^]Ë�U��V�uW3�;�u3��e9}u����j^�0WWWWW�d�������E9}t9urV�u�u�����uW�u�*��9}t�9us���j"Y����jX_^]��������̋T$�L$��ti3��D$��u��r�=tAt�OW����r1�ك�t+ш����u����������ʃ���t��t
�����u��D$_ËD$�jTh��@�:��3��}��E�P�`�@�E�����j@j ^V�YY;����A�5|A���0�@���@
�x�@$�@%
�@&
�x8�@4��@�
�A��;�r�f9}��
�E�;����8�X�;�E�;�|���E��[j@j �YY��tV�M���A��|A ���*�@���@
�`�`$��@%
�@&
�`8�@4��@��;�r�E�9=|A|���=|A�e���~m�E����tV���tQ��tK�uQ���@��t<�u�������4��A�E����Fh��FP���YY�����F�E�C�E�9}�|�3ۋ��5�A����t���t�N��r�F���uj�X�
��H������P�0�@�����tC��t?W���@��t4�>%���u�N@�	��u�Nh��FP���YY��t7�F�
�N@�����C���g����5|A���@3��3�@Ëe��E��������8��Ë�U��V�uV��IY���u����	���MW�uj�uP���@�����u�4�@�3���tP�|��Y���������A�����D0� ���_^]�jh�@�q���E���u�+��� ����	���3�;�|;|Ar!����8�����	WWWWW�p�����ɋ�����A�������L1��t�P�fIY�}���D0t�u�u�u������E������	����8�M��E������	�E������u�IYË�U��SV�u�F�Ȁ�3ۀ�u@�t9�FW�>+���~,WPV���YP���;�u�F��y��F��N ��_�F�f�^��[]Ë�U��V�u��u	V�5Y�/V�|���Y��t����F@tV���P�qLY��Y��3�^]�jh8�@����3��}�}�j���Y�}�3��u�;5�,A����A��98t^��@�tVPV�T�YY3�B�U���A���H���t/9UuP�J���Y���t�E��9}u��tP�/���Y���u	E܉}��F�3��uࡀA�4�V�]�YY��E�������}�E�t�E��f���j�!��Y�j����YË�U��V�uWV��FY���tP��A��u	���u��u�@Dtj��Fj���FYY;�tV�FYP�L�@��u
�4�@���3�V�F������A����Y�D0��tW�X��Y���3�_^]�jh`�@�f���E���u� ��� ����	���3�;�|;|Ar!����8�����	WWWWW�e�����ɋ�����A�������L1��t�P�[FY�}���D0t�u����Y�E������	�M��E������	�E�����u�FYË�U��V�u�F��t�t�v�m����f����3�Y��F�F^]Ë�U��E��8csm�u*�xu$�@= �t=!�t="�t=@�u�$��3�]�h<n@�l�@3�Ë�VW3�9=�,Au����5�,A��u��@�< w��t.��t$<"u	3Ʌ�������P�JY��tFF��< wF���u�_��^Ã=�,Au�@��V�54AW3���u���<=tGV�VY�t���u�jGW�
��YY�=A��tˋ54AS�BV�%��C�>=Yt1jS��YY���tNVSP�����t3�PPPPP�U�������>u��54A����%4A�'��,A3�Y[_^�5A�ת���%A����U��Q�MS3�V���U�9Et	�]�E��E��>"u3�9E��"��F�E��<���t��B�U���PF�4IY��t��}t
�M��E�F�U�M��t2�}�u��� t��	u���t�B��e��>���< t<	uF��N��>���}t	�E�E��3�C3��FA�>\t��>"u&��u�}�t�F�8"u���
3�3�9E����E����tI��t�\B���u�U���tU�}�u< tK<	tG��t=��P��t#�OHY��t
��M�E�F��M��E��
�,HY��tF���UF�V�����t�B�U��M�����E^[��t� ���U���S3�VW9�,Au���h�hAVS�lA�D�@��,A�5 A;�t�E�8u�u��U��E�PSS�}��
����E���=���?sJ�M�sB�����;�r6P�
��Y;�t)�U��E�P�WV�}������E���H�A�5A3����_^[�Ë�U��pA��SV�5��@W3�3�;�u.�֋�;�t�pA�#�4�@��xu
jX�pA��pA����;�u�֋�;�u3�����f9t@@f9u�@@f9u�5��@SSS+�S�@PWSS�E�։E�;�t/P�3Y�E�;�t!SS�u�P�u�WSS�օ�u�u�貧��Y�]��]�W���@���\��t;�u����@��;��r���8t
@8u�@8u�+�@P�E�����Y;�uV���@�E����u�VW�<��V���@��_^[��U����A�e��e�SW�N�@����;�t
��t	�УA�`V�E�P��@�u�3u����@3���@3���@3�E�P���@�E�3E�3�;�u�O�@����u����5A�։5A^_[�Ã%xAË�U��VW3��u譧����Y��u'9tAvV�T�@���;tAv����uʋ�_^]Ë�U��VW3�j�u�u���������u'9tAvV�T�@���;tAv����uË�_^]Ë�U��VW3��u�u��D��YY��u,9Et'9tAvV�T�@���;tAv����u���_^]Ë�U���SVW�%����e��=xA����h��@�<�@�����*�58�@h��@W�օ��P�o����$��@W�xA��P�Z����$��@W�|A��P�E����$��@W��A��P�0���Y��A��th��@W��P����Y��A��A;�tO9�AtGP�v����5�A���i���YY����t,��t(�օ�t�M�Qj�M�QjP�ׅ�t�E�u	�M �9�|A;�t0P�&���Y��t%�ЉE���t��A;�tP�	���Y��t�u��ЉE��5xA��Y��t�u�u�u�u����3�_^[�Ë�U��ES3�VW;�t�};�w����j^�0SSSSS蕼�������<�u;�u��ڋ�8tBOu�;�t��
BF:�tOu�;�u��ż��j"Y����3�_^[]Ë�U��SV�u3�W9]u;�u9]u3�_^[]�;�t�};�w胼��j^�0SSSSS����������9]u��ʋU;�u��у}���u�
�@B:�tOu���
�@B:�tOt�Mu�9]u�;�u��}�u�EjP�\�X�x�����	���j"Y���������������̋L$��t$�����tN��u���$��$�����~Ѓ�3ƒ���t�A���t2��t$��t��t�͍A��L$+�ÍA��L$+�ÍA��L$+�ÍA��L$+�Ë�U��MS3�VW;�t�};�w�L���j^�0SSSSS�պ�������0�u;�u��ڋъ�BF:�tOu�;�u�����j"Y����3�_^[]Ë�U��MV3�;�|��~��u�<A�(�<A�
<A��Ϻ��VVVVV��W�������^]�jh��@���3��]3�;���;�u蕺���WWWWW���������S�=�,Au8j蛸��Y�}�S�c��Y�E�;�t�s���	�u���u��E������%9}�uSW�5TA��@���趽���3��]�u�j�i���Y�j�
���YË�U���(�A3ʼnE���
AVtj
貴��Y������tj����Y��
A�������������������������������f������f����f�����f�����f������f�����������u�E���Dž0��������@�jP���������jP������������(�����0���jDž���@������,����l�@��(���P�h�@j�{�������������������U��WV�u�M�}�����;�v;�����r�=tAtWV����;�^_u^_]�JA��u������r*�$��{@��Ǻ��r���$�{@�$�|@��$��{@�{@D{@h{@#ъ��F�G�F���G������r��$��{@�I#ъ��F���G������r��$��{@�#ъ���������r��$��{@�I�{@�{@�{@�{@�{@�{@�{@�{@�D��D��D��D��D��D��D��D��D��D��D���D���D���D�������$��{@��|@|@|@,|@�E^_�Ð���E^_�Ð���F�G�E^_�ÍI���F�G�F�G�E^_�Ð�t1��|9���u$������r
��$��}@����$�@}@�I�Ǻ��r��+�$��|@�$��}@��|@�|@�|@�F#шG��������r���$��}@�I�F#шG�F���G������r���$��}@��F#шG�F�G�F���G�������V�����$��}@�ID}@L}@T}@\}@d}@l}@t}@�}@�D��D��D��D��D��D��D��D��D��D��D��D��D��D������$��}@���}@�}@�}@�}@�E^_�Ð�F�G�E^_�ÍI�F�G�F�G�E^_�Ð�F�G�F�G�F�G�E^_�Ë�U��E��t���8��uP蒜��Y]Ë�U��QQ�EV�u�E��EWV�E��5��Y;�u�4����	�Nj��J�u�M�Q�u�P���@�E�;�u�4�@��t	P�&���Y�ϋ�����A�����D0� ��E��U�_^��jh��@�������u܉u�E���u�˴��� 谴���	�Ƌ���3�;�|;|Ar!衴���8致���	WWWWW�������ȋ�����A�������L1��u&�`����8�F����	WWWWW�γ���������[P��4Y�}���D0t�u�u�u�u������E܉U������	�����8�M��M��E�������E܋U��]����u�5YË�U����~?�A3ʼnE��EV3���4���8���0�9uu3���;�u'莳���0�t���VVVVV���������SW�}����4��A�����NJX$����(���'���t��u0�M���u&�%���3��0�	���VVVVV�葲�����C�@ tjjj�u�~������u�iY������D���诪���@l3�9H�����P��4�� ���@���`3�9� �t���P��@��4����3���<�9E�B��D���'����g���(�3���
���� ��ǃx8t�P4�U�M��`8j�E�P�K��P��Y��t:��4�+�M3�@;���j��@�SP�=�������C��D��jS��@�P�[=�������3�PPj�M�Qj��@�QP���C��D����@���\j��<�PV�E�P��(���4���@���)��D���0��9�<���8���� ���j��<�Pj�E�P��(���E�
�4���@������<�����0���8��<t<u!�33�f��
��CC��D���@��� �<t<uR��@��h:Yf;�@��h��8��� �t)j
XP��@��;:Yf;�@��;��8���0��E9�D�������'����8��T4��D8�3ɋ�@�����4���@�������<�9M� ���(���<���D�+�4���H�;Ms9��<���<��A��
u��0��
@��D��@��D���D��r‹؍�H�+�j��,�PS��H�P��4���@���B��,��8�;��:��<�+�4�;E�L���� ��D�����9M�M���(���D���<�+�4���H�;MsF��D���D��AAf��
u��0�j
[f�@@��<���<�f�@@��<��r��؍�H�+�j��,�PS��H�P��4���@���b��,��8�;��Z��D�+�4�;E�?����@9M�|��D���<�+�4�j��H���^;Ms<��D���D��f��
uj
[f���<��<�f�Ɓ�<��r�3�VVhU
����Q��H���+��+��P��PVh����@��;���j��,�P��+�P��5��P��(���4���@��t�,�;����4�@��@�;�\��D�+�4���8�;E�
����?j��,�Q�u��4��0���@��t��,���@���8���4�@��@���8�ul��@�t-j^9�@�u����	�����0�?��@�����Y�1��(���D@t��4��8u3��$輬����Ĭ��� �����8�+�0�_[�M�3�^�R�����jh��@�ί���E���u般��� �m����	���3�;�|;|Ar!�_����8�E����	WWWWW�ͫ�����ɋ�����A�������L1��t�P��,Y�}���D0t�u�u�u�.������E������	����8�M��E������	�E��N����u�
-Y�U��`Ah�,�Y�M�A��t
�I�A��I�A�A�A�A�a�]Ë�U��E���u�W����	3�]�V3�;�|;|Ar�9���VVVVV�	�����3���ȃ������A���D��@^]áA��3�9�A����Ë�U���SV�u3�W�};�u;�v�E;�t�3���E;�t�������v譪��j^SSSSS�0�6��������V�u�M�趐���E�9X��f�E��f;�v6;�t;�vWSV�������Z����*�O����8]�t�M��ap�_^[��;�t2;�w,�/���j"^SSSSS�0踩����8]��y����E��`p��m�����E;�t�8]��%����E��`p������MQSWVj�MQS�]�p���@;�t9]�^����M;�t���4�@��z�D���;��g���;��_���WSV������O�����U��j�u�u�u�u�|�����]Ë�U����u�M��}����E�M���A%��}�t�M��ap��Ë�U��j�u���YY]��������V�D$�u(�L$�D$3��؋D$����d$�ȋ�d$��G�ȋ\$�T$�D$���������u���d$�ȋD$���r;T$wr;D$v	N+D$T$3�+D$T$��؃��ʋӋًȋ�^��A@t�yt$�Ix��������QP����YY���u	�Ë�U��V����M�E�M����>�t�}�^]Ë�U��G@SV���t2�u,�E�+��M���}���C�>�u���8*u�ϰ?�d����}�^[]Ë�U���x�A3ʼnE�S�]V�u3�W�}�u���������������������������������������������������蜍����u5�i����3�PPPPP�����������t
�������`p����
�F@u^V���Y�P
A���t���t�ȃ�������A���A$u����t���t�ȃ�������A���@$��g���3�;��]��������������������������������P
C3�9����������
�ʀ� ��Xw
������@��������k�	���@j��^������;����jY;���	�$�;�@3�������������������������������������t	�ƒ� tH��t4+�t$HHt���V		���K	����?	����3	�����$	����	��*u,���������������������������������k�
�ʍDЉ�������������*u&���������������������������k�
�ʍDЉ����z��ItU��htD��lt��w�b����S�;luC���������8����,��� � �<6u�{4uCC����������<3u�{2uCC�������������<d��<i��<o��<u��<x��<X�������������������P��P����Y������Yt"���������������C������������������������j����J�ƒ�d���w��S������AtHHtYHHtHH���� Dž�����������@�������������������EDž������0���������0u
����������u������������������������u��A��������Dž����{��X��HHty+��&���HH������������t0�G�Ph���P����P��������tDž������G����Dž����������1����������t<�H��t5��������t�+��Dž��������������A����P��Y����p������e����g�2�����itm��nt$��o����������ta����U�7������������������� tf�����f��������Dž��������@Dž��
����������G��W���u��gufDž���Z9���~���������~@������]V�{�����Y������j��t�������������
Dž���^��G��������G�������������P����������������P������������SP�5�A� ���Y�Ћ������t!����u������PS�5�A��Y��YY����gu��u������PS�5�A�˕��Y��YY�;-u���C����S���������������$��s�����HH���������Dž����'����Dž���k���������Qƅ���0�����Dž����G������M������� t�������@t�G���G����G���@t��3҉������@t��|��s�؃��ځ�������ڋ�u3ۃ���}Dž��������9���~�������u!�����u������������t-�����RPSW�����0��9����������~������N뽍E�+�F�����������tb��t�΀90tW���������0@�?If�8t@@��u�+�����(��u��A���������I�8t@��u�+��������������\����@t2�t	ƅ���-��t	ƅ���+��tƅ��� Dž��������+���+�������u�����������Sj �[���������������������������a������Yt���uWSj0��������������������tf��~b�����������������Pj�E�P������FPF�����u(9�����t ������������M���������Yu�������������P�������Y�����|���tWSj ������m��������t�������҃��������Y������������t
�����������3�9�����t������t�c���VVVV�V�������t
�������`p�������M�_^3�[��~����%�@$�@V�@��@��@
�@P�@��@��U����A3ʼnE�SV3�W��9�Au8SS3�GWhd�@hS��@��t�=�A��4�@��xu
��A9]~"�M�EI8t@;�u����E+�H;E}@�E��A����;��������]�9] u��@�E �5��@3�9]$SS�u���u��P�u �֋�;���~Cj�3�X����r7�D?=w�$��;�t����P�H���Y;�t	������E���]�9]��>W�u�u�uj�u �օ����5�@SSW�u�u�u�֋ȉM�;����Et)9]��;M���u�uW�u�u�u���;�~Ej�3�X��r9�D	=w��#��;�tj������P膂��Y;�t	��������3�;�tA�u�VW�u�u�u��@��t"SS9]uSS��u�u�u�VS�u ���@�E�V�b�Y�u��Y��E�Y�Y�]�]�9]u��@�E9] u��@�E �u�'Y�E��u3��!;E ��SS�MQ�uP�u �(���E�;�tԋ5�@SS�uP�u�u�։E�;�u3��~=���w8��=w��"��;�t�������P�p���Y;�t	��������3�;�t��u�SW������u�W�u�u�u�u�։E�;�u3��%�u�E��uPW�u �u��e'��u�����#u�W�7�Y��u�u�u�u�u�u��@��9]�t	�u����Y�E�;�t9EtP���Y�ƍe�_^[�M�3��({���Ë�U����u�M��{~���u(�M�u$�u �u�u�u�u�u�(����� �}�t�M��ap��Ë�U��QQ�A3ʼnE���ASV3�W��;�u:�E�P3�FVhd�@V� �@��t�5�A�4�4�@��xu
jX��A���A����;��������]�9]u��@�E�5��@3�9] SS�u���u��P�u�֋�;���~<���w4�D?=w�� ��;�t����P���Y;�t	������؅�ti�?PjS�����WS�u�uj�u�օ�t�uPS�u� �@�E�S�s��E�Y�u3�9]u��@�E9]u��@�E�u�%Y���u3��G;EtSS�MQ�uP�u�A%���;�t܉u�u�u�u�u�u��@��;�tV�}��Y�Ǎe�_^[�M�3��)y���Ë�U����u�M��||���u$�M�u �u�u�u�u�u�������}�t�M��ap��Ë�U��V�u�����v�:}���v�2}���v�*}���v�"}���v�}���v�}���6�}���v �}���v$�|���v(��|���v,��|���v0��|���v4��|���v��|���v8��|���v<��|����@�v@�|���vD�|���vH�|���vL�|���vP�|���vT�|���vX�|���v\�|���v`�x|���vd�p|���vh�h|���vl�`|���vp�X|���vt�P|���vx�H|���v|�@|����@����2|������'|������|������|������|������{�������{�������{�������{�������{�������{����,^]Ë�U��V�u��t5�;hAtP�{��Y�F;lAtP�{��Y�v;5pAtV�}{��Y^]Ë�U��V�u��t~�F;tAtP�[{��Y�F;xAtP�I{��Y�F;|AtP�7{��Y�F;�AtP�%{��Y�F;�AtP�{��Y�F ;�AtP�{��Y�v$;5�AtV��z��Y^]��������U��V3�PPPPPPPP�U�I�
�t	���$��u���I���
�t	���$s��� ^�����������̋T$�L$��u<�:u.
�t&:au%
�t��:Au
�t:au����
�uҋ�3�Ð�����t���:u�
�t��t�f���:u�
�t�:au�
�t���눋�U��Q�e�S�]��u3��W��ru�{���vn�M�E�������tR:Q�uM�P���t<:Q�u7�P���t&:Q�u!�P���t:Q�u�E�9}�r��?�@��I��F�@��I��<�@��I��2�@��I��(�M�E����t:u@A�E�9]�r�3�_[����	+�����������U��V3�PPPPPPPP�U�I�
�t	���$��u���
�t���$s�F��� ^��U��WV�u�M�}�����;�v;�����r�=tAtWV����;�^_u^_]�:��u������r*�$��@��Ǻ��r���$��@�$��@��$���@�(�@T�@x�@#ъ��F�G�F���G������r��$��@�I#ъ��F���G������r��$��@�#ъ���������r��$��@�I��@�@�@آ@Т@Ȣ@��@��@�D��D��D��D��D��D��D��D��D��D��D���D���D���D�������$��@���@�@(�@<�@�E^_�Ð���E^_�Ð���F�G�E^_�ÍI���F�G�F�G�E^_�Ð�t1��|9���u$������r
��$���@����$�P�@�I�Ǻ��r��+�$���@�$���@���@أ@�@�F#шG��������r���$���@�I�F#шG�F���G������r���$���@��F#шG�F�G�F���G�������V�����$���@�IT�@\�@d�@l�@t�@|�@��@��@�D��D��D��D��D��D��D��D��D��D��D��D��D��D������$���@����@��@Ȥ@ܤ@�E^_�Ð�F�G�E^_�ÍI�F�G�F�G�E^_�Ð�F�G�F�G�F�G�E^_��jh��@译��3ۉ]�j腌��Y�]�j_�}�;=�,A}W������A�9tD��@�tP�%���Y���t�E�|(��A��� P���@��A�4�*u��Y��A�G��E������	�E��k����j�&���YË�U���0S3�E�VW��]�]��E��]�t	�]��E��
�E��]��E�P�!Y��t
SSSSS�����M����u��@u9E�t�M������+ú���tGHt.Ht&�U�������8���j^SSSSS�0�������U����t��u��E�@��}��EjY+�t7+�t*+�t+�t��@u�9}����E���E���E���E���]�E�#¹;��;t0;�t,;�t=��=�@����E��/�E��&�E��=t=t`;������E��E�E���t�
A��#M��x�E��@t�M��M��M��t	}� t�M���E�릨t�M��e
����u�������ϋ�����E�=$�@S�u���u�E�P�u�u��u�׉E��um�M���#�;�u+�Et%�e����S�u�E�u�P�u�u��u�׉E��u4�6������A�����D0� ��4�@P�]���Y�1�����t�u���@;�uD�6������A�����D0� ��4�@��V����Y�u�L�@;�u�����
룃�u�M�@�	��u�M��u�6�	��Ѓ������AY��Y�M����L��Ѓ������A���D$� ��M��e�H�M���������Etqj��W�6������E�;�u�X����8�tM�6�t�����j�E�P�6�]��7�������u�}�u�E�RP�6���;�t�SS�6�Q�����;�t��E���0�@�@�}u�E�#�u	M�	E�E#�;�tD=t)=@t"=t)=@t"=t=@u�E���M�#�;�u	�E���]��E���E�@�]����E���#�=@��=�tw;����E�;��y��v��v0���f�E�3�H�&H�R�E��E��jSS�6������t�SSS�6�z��#ƒ���������j�E�P�6�Դ��������u�����tk�����}�uY�E����E�;������b������P���jSS�6�������C���SSS�6�����#ƒ���������E�%��=��u�6�j���Y�&���j^�0���d=��uSj�6�c��������������E��ASS�6�H�������E��E��E�+�P�D=�P�6�;�������������9}�ۋ������A�����D$�2M���0�������A�����D$�M�������
ʈ8]�u!�Et��ȃ������A���D� �}�����#�;�u|�Etv�u�L�@S�u�E�jP�u���W�u�$�@���u4�4�@P������ȃ������A���D� ��6�Y����6������A�������_^[��jh�@��3��u�3��};���;�u荆��j_�8VVVVV���������Y��3�9u��;�t�9ut�E%������@t‰u��u�u�u�u�E�P���j������E��E�������E�;�t��誉���3��}9u�t(9u�t�����������A�D� ��7�@YË�U��j�u�u�u�u�u������]Ë�U���S�u�M���k��3�9]u8]�t�E�`p�3����E�9Xu&�u�u�u����8]����M�ap��9]u.�_���SSSSS������8]�t�E�`p������W�};�u.�)���SSSSS�豄����8]�t�E�`p������NV�Mf�	�M�E����D�M�ti9]u��D�]����f�����U�:�u�]��Z��f��f�E��f��M�f;prf;pwfp�6f;pr0f;pw*fp�$�U���At
f������ʉM�f�u�f�����G�D�M�tH9]u�]��^��M:�t��f��f���G�M�f;Hrf;HwfH�6f;Hr0f;Hw*fH�$�U���At
f������ʉM�f�M�f;�u!f;�t	9]����8]�t�E�`p�3�^_[�����H8]�t�M�ap���U��j�u�u�u�����]Ë�U���S3�9]u3���W�u�M��i���}�9_u&�u�u�u�k��8]����M��ap��9]u+�%���SSSSS�譂����8]�t�E��`p������mV�u;�u+��SSSSS��z�����8]�t�E��`p������9�Ef��M�E�����D8tA9]u�3�D8t_8]�t�E��`p�3�^_[�ËE�:�u3����f��f�E��f�����F�D:t 9]u3����M:�t�f���f�F��f;�uf;�t�9]�`�������H8]�t��M��ap�냋�U��j�u�u�u�����]�U��SVWUjjh��@�u�T]_^[��]ËL$�A�t2�D$�H�3��~d��U�h�P(R�P$R���]�D$�T$���SVW�D$UPj�h��@d�5�A3�P�D$d��D$(�X�p���t:�|$,�t;t$,v-�4v���L$�H�|�uh�D��I�D��_뷋L$d�
��_^[�3�d�
�y��@u�Q�R9Qu��SQ��A�SQ��A�L$�K�C�kUQPXY]Y[����U��EVW��|Y;|AsQ�������<��A����<�u5�=AS�]u��tHtHuSj��Sj��Sj��(�@��3�[��Y����	�a���� ��_^]�U��MS3�;�VW|[;
|AsS������<��A������@t5�8�t0�=Au+�tItIuSj��Sj��Sj��(�@���3�������	�������_^[]Ë�U��E���u���� ����	��]�V3�;�|";|As�ȃ������A����@u$�~���0�d��VVVVV�	��~��������^]�jh �@臂���}���������4��A�E�3�9^u6j
�=}��Y�]�9^uh��FP����YY��u�]�F�E������09]�t����������A�D8P���@�E��G����3ۋ}j
�{��YË�U��E�ȃ������A���DP���@]�jh@�@����M�3��}�j��{��Y��u���bj�~|��Y�}��}؃�@�<�4��A�����u���A;����Fu\�~u9j
�5|��Y3�C�]��~uh��FP����YY��u�]���F�e��(�}�u�^S���@�FtS���@��@낋}؋u�j
�z��YÃ}�u��F��+4��A������u�}�uyG�+���j@j �B���YY�E�ta���A��|A ���;�s�@���@
�`��@�E�����}����σ������A�DW����Y��u�M��E������	�E�聀���j�<z��Y�U����}��}�M��f����$�ffGfG fG0fG@fGPfG`fGp���IuЋ}���]�U����}��E���3�+���3�+���u<�M�у��U�;�t+�QP�s������E�U��tEE+‰E�3��}��M��E�.�߃��}�3��}�M��E�M�U�+�RjQ�~������E�}���]�jhh�@�@���e�f(��E��#�E��=�t
=�t3��3�@Ëe�e��E������E��B��Ë�U���3�S�E��E�E�S�X��5 P��Z+�tQ�3���E�]�U�M���U��E�[�E�t�\�����t3�@�3�[������tA3��jh��@�~���E���u�({���	���3�;�|;|Ar�{���	SSSSS�z�����Ћ���<��A�������L��t�P���Y�]���Dt1�u���YP�,�@��u�4�@�E���]�9]�t�z���M��z���	�M��E������	�E��}���u���YË�U����u�M��w`���E�M�U�Tu�}t�M���A#E�3���t3�@�}�t�M��ap��Ë�U��jj�uj�����]�jh��@�5}���]��u�u�'b��Y���u��uS�`��Y��=�,A��3��}����j��w��Y�}�S蕑��Y�E�;���;5�,AwIVSP�w�������t�]��5V�F���Y�E�;�t'�C�H;�r��PS�u��g���S�E����E�SP�k�����9}�uH;�u3�F�u�����uVW�5TA�\�@�E�;�t �C�H;�r��PS�u�����S�u��������E������.�}�u1��uF�����uVSj�5TA���@����u�]j�u��YË}���9=\At,V� ���Y�������x��9}�ul��4�@P�,x��Y��_�����\x��9}�th��q��uFVSj�5TA���@����uV9\At4V跁��Y��t���v�V见��Y�x���3��{����w���|�����u��w����4�@P�w���Y����U����}��u��u�}�M�����fofoNfoV fo^0ffOfW f_0fof@fonPfov`fo~pfg@foPfw`fp������Iu��u��}���]�U����}�u��]��]�Ù�ȋE3�+ʃ�3�+ʙ��3�+���3�+����uJ�u�΃��M�;�t+�VSP�'������E�M��tw�]�U�+щU��+ى]�u�}�M��E�S;�u5�ك��M�u�}�M��MM�UU�E+E�PRQ�L������E��u�}�M����ʃ��E�]��u��}��]�������������Q�L$+ȃ����Y�Q�L$+ȃ����Y���U����A3ʼnE�V3�95�AtO�=�A�u�l
��A���u����pV�M�Qj�MQP�8�@��ug�=�Au�4�@��xuω5�AVVj�E�Pj�EPV�4�@P���@�
�A���t�V�U�RP�E�PQ�0�@��t�f�E�M�3�^�CX������A��U���SV�u3�;�t9]t8u�E;�t3�f�3�^[��u�M��d[���E�9Xu�E;�tf�f�8]�t�E��`p�3�@�ʍE�P�P���YY��t}�E���~%9M| 3�9]��R�uQVj	�p���@���E�u�M;��r 8^t���8]��e����M��ap��Y����t���*8]�t�E��`p����:���3�9]��P�u�E�jVj	�p���@���:���뺋�U��j�u�u�u������]���������������Q�L$+����#ȋ�%�;�r
��Y���$�-���U���VW�u�M��Z���E�u3�;�t�0;�u,��s��WWWWW��es�����}�t�E�`p�3���9}t�}|Ƀ}$ËM�S��}��~���~�E�P��jP虊���M���������B����t�G�ǀ�-u�M���+u�G�E���K���B��$�9��u*��0t	�E
�4�<xt
<Xt	�E�!�E�
��u��0u�<xt<XuG�G��������3�u���N��t�˃�0���t1�ˀ�a����w�� ���;Ms�M9E�r'u;�v!�M�}u#�EO�u �}t�}�e��[�]��]ى]��G닾����u�u=��t	�}��w	��u+9u�v&�<r���E�"t�M����EjX��ƉE��E��t�8�Et�]��}�t�E�`p��E���E��t�0�}�t�E�`p�3�[_^�Ë�U��3�P�u�u�u90Auh�	A�P�����]Ë�U����A3ʼnE�j�E�Ph�u�E���@��u���
�E�P�Y�M�3��*T���Ë�U���4�A3ʼnE��E�M�E؋ES�EЋV�E܋EW3��M̉}�}�;E�_�5��@�M�QP�֋��@��t^�}�uX�E�P�u�օ�tK�}�uE�u��E����u�u������YF;�~[���wS�D6=w/�[�����;�t8����-WW�u�u�j�u�Ӌ�;�u�3���P��X��Y;�t	������E���}�9}�t؍6PW�u�����V�u�u�u�j�u�Ӆ�t�]�;�tWW�uSV�u�W�u���@��t`�]��[���@9}�uWWWWV�u�W�u�Ӌ�;�t<Vj�ذ��YY�E�;�t+WWVPV�u�W�u��;�u�u��W��Y�}���}�t�MЉ�u��I���Y�E�e�_^[�M�3��vR���Ë�U��j
j�u������]Ë�U���S3�VW9]���u�M��U��9]u.�qo��SSSSS��n����8]�t�E��`p�������};�t˾���9uv(�2o��SSSSS��n����8]�t�E��`p����`�E�9Xu�uW�u����8]�tD�M��ap��;�E��M�QP��E����M�QP�s��G�Mt;�t;�t�+���3�_^[�Ë�U��V3�950Au99uu�n��VVVVV��n���������'9ut܁}���w�^]�-V�u�u�u�����^]Ë�U���SVW3�jSS�u�]�]��θ���E�#ƒ��U��tYjSS�u貸����#ʃ����tA�u�}+����;����Sj�@�@P�\�@�E���u��m����m���_^[��h��u�YY�E���|
;�r�����P�u��u�ɹ�������t6�+��xӅ�wϋu�u��u��YY�u�j�@�@P�X�@3���Zm���8u�=m���
���u��;�q|;�skS�u�u�u跷��#ƒ�����D����u�B�YP�<�@�����H��E�#‰U�u)��l���
��l����4�@��u�#u������S�u�u�u�L���#ƒ��������3�������U��S�]V�u������A������0�A$�W�y�������@tP���tB��t&��t��u=�I��
�L1$��⁀���'�I��
�L1$��₀���a�
�I��
�L1$�!���_^[u��]���%�@]�U��EV3�;�u��k��VVVVV��Nk����jX�
�
`A�3�^]�3�PPjPjh@h��@�$�@��Aá�AV�5L�@���t���tP�֡�A���t���tP��^Ë�U���SV�u�M��jQ���]�;�sT�M胹�~�E�PjS�4����M���
����X����t������}�t�E�`p�����E胸�~1�]�}�E�P�E%�P�U���YY��t�Ej�E��]��E�Y��j���*3Ɉ]��E�A�E�j�p�U�jRQ�M�QV�p�E�P�
����$���o������E�t	�M�����}�t�M�ap�^[��������������U��WVS�M�tM�u�}�A�Z� �I�&
�t'
�t#����:�r:�w�:�r:�w�:�u��u�3�:�t	�����r�ً�[^_����������������̋D$�L$ȋL$u	�D$���S��؋D$�d$؋D$���[��%��@4�B�\�j�~������������"�6�F�V�h�x�����������������.�J�h�|�����������������(�@�X�����������������������.�<�N�h�������������
�$�0�B�R�d�t����������������� �g4@9G@LW@�@~n@��@�W@1�RL����CorExitProcessmscoree.dll@A�AEncodePointerKERNEL32.DLLDecodePointerFlsFreeFlsSetValueFlsGetValueFlsAllocruntime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...<program name unknown>Runtime Error!

Program: ������������������(null)(null)EEE50P( 8PX700WP  `h````xpxxxx	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ccsUTF-8UTF-16LEUNICODEGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLL�����������EEE���00�P��('8PW�700PP� (����`h`hhhxppwpp         (((((                  H����������������������          h((((                  H����������������������                                 H�����������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~�����������������������������������������������������������������������������������������������������������������������������HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$user32.dllMessageBoxTimeoutAFatal Error in LauncherrbFailed to open executableUnable to find an appended archive.Unable to read from file#!Job information querying failedJob information setting failedstdin duplication failedstdout duplication failedstderr duplication failedUnable to create process using '%s'Failed to get exit code of processFailed to find shebangExpected to find terminator in shebang lineExpected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to be able to allocate command line memory"%s" "%s" %sHA��@RSDS�j�!���N���~Dx1c:\Users\Vinay\Projects\SimpleLauncher\dist\w32.pdb7�]��������������@������������@������������@������������@������������!@������������#@������������$@������������%@������������l'@p'@����2'@F'@������������*@�����*@������������,@�����,@������������1@������������4@�����������{6@�6@������������8@�8@������������<@������������<@�<@�����������2C@�����������G@�����������pJ@�����������W@������������\@�����������/f@�������������i@�i@�����������k@������������l@\l@�����������n@�����������@y@������������@�������������@�������������@�����������L�@�������������@�����������u�@��@�������������@��@�������������@�������������@�����4�B�\�j�~������������"�6�F�V�h�x�����������������.�J�h�|�����������������(�@�X�����������������������.�<�N�h�������������
�$�0�B�R�d�t����������������� �ExitProcessqSetInformationJobObjectbFreeLibrary�GetCurrentProcess�WaitForSingleObjectgGenerateConsoleCtrlEvent�GetCommandLineAAssignProcessToJobObject�GetExitCodeProcess�CreateProcessA�QueryInformationJobObject�CreateJobObjectAdGetStdHandleGetLastErrorEGetProcAddress<LoadLibraryA-SetConsoleCtrlHandlerGetModuleFileNameA�DuplicateHandleRCloseHandleKERNEL32.dllGetModuleHandleW�Sleep�HeapFree�HeapAllocbGetStartupInfoA�TerminateProcess�UnhandledExceptionFilter�SetUnhandledExceptionFilterIsDebuggerPresent�TlsGetValue�TlsAlloc�TlsSetValue�TlsFree�InterlockedIncrementsSetLastError�GetCurrentThreadId�InterlockedDecrement%WriteFile�DeleteCriticalSection9LeaveCriticalSection�EnterCriticalSection�InitializeCriticalSectionAndSpinCountrGetCPInfohGetACP7GetOEMCP
IsValidCodePage�HeapCreate�VirtualFree�VirtualAlloc�HeapReAllocRtlUnwindgMultiByteToWideChar�ReadFileoSetHandleCount�GetFileTypefSetFilePointer`FreeEnvironmentStringsA�GetEnvironmentStringsaFreeEnvironmentStringsWWideCharToMultiByte�GetEnvironmentStringsW�QueryPerformanceCounter�GetTickCount�GetCurrentProcessIdyGetSystemTimeAsFileTime�HeapSizeGetLocaleInfoA�GetConsoleCP�GetConsoleMode+LCMapStringA-LCMapStringWfGetStringTypeAiGetStringTypeW�CreateFileA�SetStdHandleWFlushFileBuffersWriteConsoleA�GetConsoleOutputCP$WriteConsoleWSSetEndOfFileJGetProcessHeap�@N�@���D��������p�@D�@	�@
��@T�@$�@�@��@��@t�@<�@�@��@��@X�@  �@!(�@"��@xx�@yh�@zX�@�T�@�D�@
		


!
5A
CPR
S
WYl
m pr	�
�
�	��
�)�
���
���Qy@Qy@Qy@Qy@Qy@Qy@Qy@Qy@Qy@Qy@x
��@��@                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ�A�`�y�!�������@~�����ڣ ��@����ڣ ��A��Ϣ���[��@~��QQ�^� _�j�2�����1~��l�@����C�A�A�A�A�AhAh�@��@p�@�
A�A�A�A�A�A�����
h�@j�@��@��@��@��@��@��@��@x�@p�@h�@\�@P�@H�@<�@8�@4�@0�@,�@(�@$�@ �@�@�@�@�@�@�@��@��@��@(�@��@��@��@��@��@��@��@��@��@��@|�@p�@	�
A.dA�A�A�A�A�A�A�A�A�AhA. ��p��PSTPDT�A A��������������������;Zx����0Nm����:Yw����/MlK(�p�������������0�eH�`�x�������	�2���4(�6���>h�(D�%��i��xzh��~h�HZ�( @...GGGWWWiiiuuu����������������������������������̀�ww����ww||�����ww��������wwww��������ww��������f�wwwww|�����f�wwwwww����ff�wwwwww�����ff��wwwww���ffl����ww����ffffff��w����ffffffl�w������ffffff�w�����ffffff�|����������ff��������ffff�������ff��R\I���lffl���)����ff�ح���������2L���������18�������Ϥ"������A<��������ΣT��π�����U���������������������������؀����������������������?������������������?�?�?�?�?�?�������������( 444MMMSSSzzz������������������������������p�p�����{p{��f���fko�f�����_fffk�_�fff��[���f}��UUU�fL4�UUU_kJqO���_�~�'�[U_����U�����������wwwww{~����������������( @%%%+++000===AAAIIIMMMQQQVVVYYY]]]~dFgggjjjmmmrrruuu}}}�u?�z=�~;�gE�kC�oA�r@��:��I��b��pƏKУk(��,�1�?�5�<�\�C�K�Q�s�U�[�c�b�����������������������������������������ð����������������������������������������������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$"  _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_L'%$"_I_MMMMMMJJ__('%%_I_CEMIJJMEM_(''*_I_?BMDJEMDMF_)(-LI_MMMCMMMMM_________<____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/
N______MMMMJIDAI_9/	HJJMMJMMMJ??BAI_A7503	IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O;
@__C_C?J?AJI_?A_DJJI@O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ�����?������������������?������������������?�( 444MMMRRRYYY~eGuuu}}}�x>�iE�rC��E��~7�?�H�V�b�x����������������������������������������������������������������������������������/!P7pL�c�yϏ���1��Q��q�������������/Pp"�,�6�@�J�[1�qQ��q�������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������!%///* !*/"(%%'%/)
/!#''////+/+"*(/
/

!%(/
(

  (*/(///)
*/
	)*

	/"/////	/+///#
		+ !%//
+"*+'#+//+'!%*++$++!+!    !!!<(0` !!$&			&"

 ���W���������������������������������ܱ��Nj+<<</	&&&#&[[[?6666��׏��������������������������������������������Ҟ���BBB3"


mmm3����,����!!!4777&�����������������������������������������������������ʟ���}���}___E���OpppD���P,)+3���Z2226DDD(���,�����###5��������������������������������������������������������������������������������չ�������������5�������,�������������������������������������������������������������������������������������������������������������,������Ì222"��Є�����������������������������������������������������������������������������������������������������&&&2����   4888&�������������������������������������������������������������������������e��?��4��/��+���.���R�������ӎ����������$$$5��Ď���������������������������������������������������������������������D��@��;��7��3��/��*���&���"�����������������������������������������������������������������������������������������W��G��C��?��;��6��2��n������f��0�������������nj333"��ӄ��������������������������������������������������������������������O��K��G��B��>��:��5��p������i��$�����������!!!4888&���������������������������������������������������������������������S�N��J��F��B��=��9��5��0��,��(���������������%%%5��ǎ���������������������������������������������������������������������V�R�N��I��E���������������������������������������������������������������������������������������������������������ѹ���|J��q?��o@�����Z�U�Q�M��I��D��@��<��7��3��/��+���&���"���-����������������Ɍ444"��ք�������������������������������������������������̴��w<��u=��s>��q?�����]�Y�U�P��L��H��C��?��;��7��2��.��*���%���!����������������"""4888&���������������������������������������������������d��y<��w=��u=��s>�����a�\�X�T�P��K��G��C��>��:��6��1��-��)���%��� ���O������������Ñ%%%5��ʎ���������������������������������������������������A��{;��y<��w=��t>�����s�`�\�W�S�O��J��F��B��>��9��5��1��,��(���$���(����������������������������������������������������������������������9��|:��z;��x<��v=�������s�_�[�W�R�N��J��E��A��=��8��4��0��,��'���#�������������̌555"��ل���������������������������������������������������9��~9��|:��z;��x<���o�����������������������������������������m��8��3��/��+���'�����������"""4:::&������������������������������������������������������8���9��~:��|;��z;��w<��u=��s>��q?��o@��mA��kB��iC��gC�dD��uZ������;��7��3��.��*�������������Ǒ%%%5��̎���������������������������������������������������È>���8���9��}:��{;��y<��w<��u=��s>��q?��o@��mA��jB��hC��fD�~dE��uZ�����?��:��6��2��5�����������������������������������������������������������������������������Оa���7���8��9��}:��{;��y<��w=��u>��r>��p?��n@��lA��jB��hC��fD�}dE�����B��>��:��5��^������������ό555"��܄����������������������������������������������������������ѳ�„7���7���8��9��}:��{;��x<��v=��t>��r?��p@��n@��lA��jB��gC��eD�����F��A��=��9������������"""4;;;&�����������������������������������������������������������������ŌC���8���9��~9��|:��z;��x<��v=��t>��r?��p@��mA��kA��iB��gC�����I��E��L��������������ɑQQQJnnn����������~~~�������������������������������������������������������������������������������������������Į��q?��o@��mA��kB��iC�������������������������HHH�"""���������������vvv������������������������������������������������������������������9��~:��{;��y<��w<��u=��s>��q?��o@��mA��kB�������������:::�'''�___���������sss�ttt��������������������������������������������������������������8�Ϧu�����ǣv��y<��w=��u=��s>��p?��n@��lA��������888T����---6fffnddd�%%%�"""�����OOO�SSS������������������������������������������������������������ċD�ҧu�����ʤv��{;��y<��v=��t>��r?��p?��xM�����<<<�MMM�������̑&&&5����;;;�<<<�xxx�QQQ�;;;�KKK����������������������������������������������������������8���8��~9��|:��z;��x<��v=��t>��r?�̷������999�����������������������VVV�###�)))�444��������������������������������������������������������������������ѳ�͝b���@��~9��|:��z;��}C���g��˶����Ӎ���������󑑑�����ZZZ�lll�;;;�!!!�"""�)))�___���������������������������������������������������������������������������������������&&&2����:::�ppp�{{{�___�WWW�WWW�:::�!!!�"""�***�www�������������������������������������������������������������������"""4888&���,������̑999����Ԗ���JJJ�|||�lll�:::�"""�BBB�XXX�|||��������������������������������������������������������������������$$$6�������,��������������������������������uuu�KKK�CCC�@@@�...�www����������������������������������������������������������������������������������*������Ҍ666"������������������������KKK�aaa�LLL�WWW��������������������������������������������������������������@��������$����"""4;;;&���������������������nnn�fff�!!!�$$$�999������������������������������������������������������������444]ttt|������ȇ������ɑ&&&5��Ў������������������������vvv�mmm�VVV�{{{�OOO����������������������������������������������������������������ڥ�����������������������������������������������aaa�CCC�����ppp�������������������������������������������������������������������������ό555"��ބ����������������������������������|||�MMM�����fff���������������������������������������������������������������"""4;;;&�������������������������������������������\\\�����������������������������������������������������������������Ǒ%%%5��Ύ�����������������������������������������������������������������������������������������������ݧ�����������������������������������������������������������������������������������������������������������������ܦ������͌555"��ۄ�����������������������������������������������������������������������������������ۥ����"""4:::&������������������������������������������������������������������������������������ڤ������Ñ%%%5��ˎ�����������������������������������������������������������������������ܤ��������������������������������������������������������������������������������������������������ׇ
������ww���?ww�?�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww��ww��ww��ww��ww��ww��ww�?�ww��ww���ww���ww( @ ����������������������������������!!!0\\\JeeeQ666D555A0$
�������v�H��<��6��0��2��\�������7���q��������������������ڴ���vvvj&&&D1"����g�L��F��@��;��5������?��������������������������������������������������к����V�Q�K��E��?��9������(�����������a���V�������������������������������������[�U�P��J��D��>��8��2��-���������uuun{{{j���������������������������������������`�Z�T�O������������������������������������������������������������������������V��o@��lA�����b�_�Y�S�M��G��B��<��6��0��+���%���<���������������a���V�����������������������m��t>��q?��n@�����b�b�^�X�R�L��F��A��;��5��/��)���$���Y����������wwwn}}}j����������������������~C��v=��s>��p?�����b�b�a�]�W�Q�K��E��@��:��4��.��(���+���������������������������������������{;��x<��v=��s>�����b�b�a�[�V�P��J��D��?��9��3��-��'��������������a���V����������������������~:��{;��x<��u=���p���������������������������������r��=��7��2��,����������yyynj�����������������������9��}:��z;��w<��u>��r?��o@��lA��iB��fD�}dE�|cE�|cE���i���B��<��6��1��������������������������������������?��9��}:��z;��w=��t>��q?��n@��kA��iC��fD�}cE�|cE�}dF�����G��A��;��=�������������a���V���������������������ңi���8��9��|:��y<��v=��s>��q?��n@��kB��hC��eD�|cE�|cE�����L��F��@��m����������zzzn���j�������������������������ʓP���8��~9��{;��y<��v=��s>��p?��mA��jB��gC�eD�|cE�����P��J��\��������������������������������������������������������������������������������¯��mA��jB��gC�~dE��������������������������a���V��������������������������������������}:��z;��x<��u=��r?��o@��lA��iB��fD���������|||n���m���������������������������������������9��������w=��t>��q?��n@��lA��iC�������������JJJ��������������������������������������������őP��������y<��v=��t>��q?��n@��~Y������������VVV�???�www�����iii�����������������������������������Ρk���A��|;��y<��v=��yF���p��������>>>3@@@y����~~~obbb�000�kkk�@@@������������������������������������������������������������������---U��������������<<<�&&&�[[[�������������������������������������������������������6���uuu�sss�WWW�III�$$$�&&&�qqq�����������������������������������lllg|||s���4����bbb�hhhƑ�������UUU�000�QQQ�}}}��������������������������������---{bbb�����(����������������������iii�LLL�BBB������������������������������������������������������a���V����������������ggg�+++�NNN�������������������������������������������|||n���j����������������]]]�ttt�kkk�������������������������������������������������������������������rrr�www���������������������������Ӧ�������a���V���������������������������������������������������Ӧ����zzzn���j�������������������������������������������Ӧ�����������������������������������������������������������ˉ��?������������������?�?�?���������������?�(  ������C�������������������﫫�o���������I�����������������������������������������ਨ������������S��=��?���������������������������������_�Q�F����4���������������������������������a�Z��������������������������������������м���oE�����c�a�X�M��B��7��0��������������������~I��q?�����c�`�V�K��@��5��8��������������������z;��u=���q�����������������v�>��3����������������������E��y<��t>��n@��iB�~dE�}dF�������G��H������YYY�uuu����������ġ���=��x<��s>��mA��hC�}dE�}eG�����S���������444�|||����������������������������gC�}cE�������������������������MMM������������������~>�����q?��kA��iG������������������RRR��������������¢���G��u=��xK�ʺ��������������������������������������������������������������������������������������������������������������������������������������������~�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A  �(  �h00 �%   � h<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD�0000#0(0=0N0`0�0�0�0�011�1C2\2�2�2�2�2�2�2�2363;3]3r3�3�3�3�3�3�34	444.434E4Y4j4�4�4�4�4�4�4�445_5�5�5
6(6C6L6y6�6�6�6�6�6+737F7Q7V7f7p7w7�7�7�7�7�7�7�7�7�7?8L8v8{8�8�8�8Z9g9�9�9�9�9m:y:�:�:�:�:;e;w;�;�;�;$<5<>�> @!1Z2�2q3i4e5�5
660676=6O6W6b6�6�6�67�7�7�7�7�7�7�7�7�7�7�7�7�7�7�78888"8,858@8L8Q8a8f8l8r8�8�8�8�8�8�8�8�8�8�899)959J9Q9e9l9�9�9�9�9�9�9�9�9�9�9�9�9�9	::(:7:>:K:n:�:�:�:�:;;;;S;y;�;< <X<`<�<�<�<�<�<�<�<�<�<�<==
===*=/=4=:=>=D=I=O=T=c=y=�=�=�=�=�=�=�=�=�=�=�=�=>I>�>�>�>�>�>�>�> ?%?M?r?�?�?�?�?�?0�0$0.0X0f0l0�0�0�0�0�0�0�0	1�1�1�1�1�2�2�2�2�23/3K3n3�3�3�3=4V44�4�4�4�455?5�5�56-6A6G6�6�6"7�78848�8�8�8�89{9�9�9�9P:U:Z:_:o:�:�:�:�:=;B;I;N;U;Z;�;�;�;b<q<�<�<�<�<�<�<!>(>�?�?@��01*1�2�2�2�2�2
33 3T3_3i3�3�3�3�3�3/4B4�4�45�5�56#666H6c6k6s6�6�6�6�6�6�6�6�67;7L7o748^8�8�8D9�9�9	::V:K;P;^;k;p;�=�=�=�=�=�=�=>>(>;>F>L>R>W>`>}>�>�>�>�>�>�>�>�>�>�>�>�>�>�>?	?#?4?:?K?�?P�L3X3�3�3�304666+6�6�6�6�6�6G7M7g7v7�7�7�7�7�7�7�7�788'818W8�8�8�8�8�89�:�:;<;�;�;�;�;*<:<g<o<�<�<�<�<==)>?$?�?�?`�y112;2�2�2u3�3Z4d45?5s5�57m7�7�7�7�71898y8�8�8�8959G9�9�9�9�9:6:j:�:�;�;�;<b<�<�<==A=u=�=>�>�>�>�>�>�>4?>?�?�?�?�?�?pr1�1�1�1�1�122$2/2F2R2_2f2�2�2�213J3^3�3�3�3�3�3�3�3�3�3
44"4Y4b4n4�4�4�4�4�4�455)5/5>5D5S5Y5g5p55�5�5�5�5�56}8�8�8�8�8,929f9q9�9X:e:�:�:�:�:;;;;=;c;�;�;�;�;�;�;�;�;�;�;�;�;�;<f<q<�<�<�<�<�<�<�<=$=(=,=0=4=8=<=@=�=�=�=�=�=I>V>o>�>�>�>�?�D0�0�0�12^2�3�4�5�5�56<6�6
7<7�7 8M8`8k8�9�9�;9<W<}<�<�< =�lo0`1�23<35;7?7C7G7K7O7S7W7d7v7�7�7�7�7�7�78�8S9v9�9�:M;W;o;v;�;�;�;�;�;e<�<�>�>?-???Q?c?u?�?�?���1�12222 2$2M2s2�2�2�2�2�2�2�2�2�2�23333v3�3�3�3�3�3�3�3�3-44484<4@4D4H4L4P4�4�4�4�4�4�45%5L5Y5^5l5%7�78#8?8Q8d8v8�8�8�;�;<;<X<c<z<�<�<k=��t1�1�1]2w2�2�2�2�2�233C3^3~3�3�3 4<4�4�4�4�4�4'595�5�5�56
6H6g78&8R8z8�8�8r9�9�9H:N:�:�:�:�: ;&;2;y;5=C=K=X=v=�=�=�=�=�=�=�=�=�>�>�<�1�1�1�12@2M2,3;3�4�5�56
6h6�6�6�7�7�7�7�7�7�7�9�T1X1\1`1d1p1t1�1�1�p�6�6787X7x7�7�7�7�788 8$8@8L8h8t8�8�8�8�8�8�89,909P9p9�9�9�9�9::0:P:\:x:�:�:�:�:;8;X;d;|;�;�;�;�0,040<0D0L0T0\0d0l0t0|0�0�0�0�0�0�0�0�0�0�0�0�0p3t3x3|3�3�3�3�3�3�3�3�3�7�889H9X9h9x9�9�9�9�9�9�9�9�9�9�9�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=>>>>>>>> >$>(>,>0>4>8><>@>D>H>L>P>`>h>l>p>t>x>|>�>�>�>�>�>`?d?python3.4/site-packages/pip/_vendor/distlib/t32.exe000064400000262000151735047400016031 0ustar00MZ����@���	�!�L�!This program cannot be run in DOS mode.

$����՚��՚��՚�e���՚�ѭ��՚�ѭ��՚�ѭ��՚�ѭ	��՚��՛��՚�ѭ��՚�ѭ��՚�ѭ��՚�Rich�՚�PEL1�R�	���&�@� @���(@�P�x	��(�@�D.textz�� `.rdata#�$�@@.data�,�@�.rsrc�P@R@@.reloc�R@BU�����A3ʼnE��}uE�EP�u������h�hP�(��������Ph��@���@P���j��@�M�3��x�ËL$W3��F��0P��APQ�����t��A�	;u���H�D$+��D0���}̋�_�U���(Wh��@�E�3�h`*AP�}��}��13�;���h�@Q����jW�u����u����E�������$;ljE�}�}�SVW�u��u���u��Sj�u���u���5����� ;�tj��Y�}��}+�E����~�V���E�E��;�Y�E�}�}�W�u��u��C�u�Vj�u��g�u��������3�����h�@P�U�����+]�j]�Y�u�}����Q�}��,�+u�+u�+�y3�jV�u����u�SjW���3�;����h@�@P�����$�D>�^[�f��\�@f;tH;�s���E�u���E�Y_��V���@�&jjjVP�t$P�<�@��u�0�@��uF��^Ã|$u�d+A��t	jP��@3�@�U�����SVW3�WW�(�@�؍D$Pjp�D$pPj	S�$�@��t�|$pu3�@�3�h`�@P�(�����$�0YYjp�D$lPj	S��@h��@P����jD^V�D$,WP�^���t$ �5,�@j���P�D$\�����$��@P����YYj���P�D$`���$��@P���YYj��P�D$d�����$��@P���YYjhn@�D$T�4�@�D$P�D$$PWWWjWW�uW� �@�uh��@P�O����D$$���t$�d+AS��@�t$�@�@j��t$��@�D$P�t$��@h�@P����YY�t$��@�U��$p�������A3ʼn��SVW��@�8"t� �@�"@��QP�3�YY;�u	�E�_�@��p���P�Y��tF���u�u�h�`*AVW�8�@�=`*A"t�u��	H�E�a*AH�]���E�P��AP������3�;����$<�@P�<���Y��Y��;�s���
t��
tA;�r����3�����hT�@P����YY���P��Y��tF�>u�3��>#h��@��P����YY���P�Y��tF���u�3��>!h��@��P���YY���P�Y��tF���u�ƍP�@��u�+‹��ÍH�@��u�+��ȋE��P�@��u�+���|8jW���3�����h�@P�C����u��u�Vh�@WWS���,S�����%���;
�Au������U��EPj�u�u�u�u�!��]�U��EV���F��uc�/�F�Hl��Hh�N�;
At�
,A�Hpu�+,��F;0At�F�
,A�Hpu�$�F�F�@pu�Hp�F�
���@�F��^]���U����u�M��f����E�~�E�Pj�u��1�������M�H���}�t�M��ap���U��=T#Au�E�
A�A��]�j�u���YY]�jh�@��>�u��tu�=�,AuCj�3Y�e�V��3Y�E�t	VP�4YY�E�������}�u7�u�
j�2Y�Vj�5�#A�D�@��u� ��0�@P���Y�>�U��Q�e�V�E�P�u�u�@�����u9E�t����t
���M����^��jh�@�=�e��u;5�,Aw"j��2Y�e�V��:Y�E��E������	�E��>�j��1YË�U��V�u�����SW�=H�@�=�#Au�Ej��Ch��AYY��,A��u��t���3�@P���uV�S���Y��u��uF�����Vj�5�#A�׋؅�u.j^90(At�u�`EY��t�u�{������0���0_��[�V�9EY��3�^]øAá�<AVj^��u��;�}�ƣ�<AjP�GYY��,A��ujV�5�<A�GYY��,A��ujX^�3ҹA���,A��� �����A|�j�^3ҹAW������+A����������t;�t��u�1�� B��pA|�_3�^���I�=%At�G�5�,A�D���YË�U��V�u�A;�r"��`Aw��+����Q��0�N�Y�
�� V�L�@^]Ë�U��E��}��P��0�E�H�Y]ËE�� P�L�@]Ë�U��E�A;�r=`Aw�`���+�����P�/Y]Ã� P�P�@]Ë�U��M���E}�`�����Q�u/Y]Ã� P�P�@]��������������̍B�[Í�$�d$3��D$S����T$��t�
��:�tτ�tQ��u��W���V؋
����~����3������3�3ƃ����u%�t�%u���u�^_[3�ËB�:�t6��t�:�t'��t��:�t��t�:�t��t��^_�B�[ÍB�^_[ÍB�^_[ÍB�^_[��̋D$S��tR�T$3ۊ\$��t�
��2�tr��t2��u��rW����ߋ�����_��t�
��2�t@��u�[�r�
3˿���~���3σ����t�J�2�t#2�t��2�t2�t��_�B�[ÍB�_[ÍB�_[ÍB�_[�jh �@�93ۉ]�3��};���;�u�L�SSSSS����3��y3��u;���;�t�3�8��;�t���I�E;�u
���ʉ]�8u ��j��E�Ph�A��J���P�uVW��F���E��E������	�E��;9�u�H���YË�U��VW�}3�;�u�j_VVVVV�8� �����$h��u�u�������;�t3���_�_^]Ë�U����MS�]VW3��M��]�9}t!9}t;�u�-WWWW�W���3�_^[�Ëu;�t
��3�u9Ev!���tSWQ��S��;�t���3�u9Ew��}�}�F�}��t�F�E���E������FtD�F��t=�5��;�r��;}���W�6�u��u���R)~>}�+߃�)}��}��;]�rh�}�t����3�;�v	���u����u��+������;�w��;E���P�u�V�aRYP�]Q�����������E�+�)E��(V�LJY������}�tN�M��E���FK�M��E�������E���3��}�t�uV�u�R���VVVV�"V�r����}�t�uj�u�tR���y�"3�PPPPP�E����N ��+�3�u�=����N��jh@�@�63��u�9ut79ut29uu5�}�t�uV�u�R����VVVVV���3��6�u����Y�u��u�u�u�u�u������E��E�������E���u�U���YË�U��u�u�uj��u�R�����]�jh`�@��53��u�3��];���;�u �x�VVVVV�������3�9u��;�tԉ]S�o���Y�u��C@uwS�|PY���t���t����ȃ�����+A��A�A$u)���t���t���������+A��A�@$�t���VVVVV�f���M�9u�u#S�)Q���EPV�uS�u�E�SW�Q���E������	�E��5�u����YË�U���SW�}3�;�u �hSSSSS��������fW�O9_Y�E�}�_jSP��Q��;ÉE�|ӋW��u+G�.��OV��+�u��tA�U��u������+A�����D2�t��;�s��:
u�E�3�B;�r�9]�u�E�����x�����G���W;�u�]���]��u�+��������+A�E����D0�tyjj�u��Q��;E�u �G�M��	�8
u�E@;�r�G �@j�u��u���P����}���:�9Ew�O��t��t�G�E��D0t�E�E)E��E�M��^_[��jh��@�33�3�9u��;�u���VVVVV�L�����'�u����Y�u��u����Y�E��E������	�E��3�u����YË�U��V�u�F��u�`����g���}�FuV����E�eYV�>�FY��y��F��t�t�u�F�u�uV�GMYP�O3Ƀ������I��^]�jh��@�23�3�9u��;�u���VVVVV�T�����>�};�t
��t��u�u����Y�u�W�u�u�������E��E������	�E��1�u����Y�U��SV�uW3���;�u�MWWWWW�������B�F�t7V�=V���QV�`LP�@P����}����F;�t
P�f�Y�~�~��_^[]�jh��@�"1�M�3��u3�;���;�u���WWWWW�R������F@t�~�E��%1�V��Y�}�V�*���Y�E��E�������ՋuV����YË�U��= At�8�u��6h��4YY]�jh�@�}0�MZf9@u8�<@��@PEu'�f9�@u��t@v3�9��@���M���e�j�#Y��uj�n���Y�/!��uj�]���Y�
V�e��a8��}j�33Y��@��,A�T� A��S��}j�
3Y�cQ��}j	�2Yj�3Y��tP��2Y��$A��$AP�5�$A�5�$A�}����E�}�uP�*5�Q5�.�E��	�M�PQ�OYYËe�E܉E�}�uP�5�05�E������E��}/��U�����U���(�!A�
!A�!A�!A�5!A�=!Af�0!Af�
$!Af�!Af�� Af�%� Af�-� A��(!A�E�!A�E� !A�E�,!A�����h A� !A� A� A	�� A��A�������A������`�@�` Aj�FUYj�\�@h��@�X�@�=` Auj�"UYh	���@P�T�@��U��QV�uV�I�E�FY��u���	�N ���/�@t
��"��S3ۨt�^����N���F�F�����F�^�]��u,��� ;�t���@;�u
�u�r^Y��uV�^Y�FW���F�>�H��N+�I;��N~WP�u�]���E��M�� �F���y�M���t���t�����������+A��A�@ tjSSQ�{T#ƒ����t%�F�M��3�GW�EP�u�\���E�9}�t	�N ����E%�_[^�Ë�U��G@SV���t2�u,�E�+��M���aC�>�u�O
�8*u�ϰ?�`�}�^[]Ë�U���x��A3ʼnE�S�]V�u3�W�}�u����������������������������������������������������3���u5���3�PPPPP�M��������t
�������`p�����
�F@u^V��FY�A���t���t�ȃ�������+A���A$u����t���t�ȃ�������+A���@$��g���3�;��]��������������������������
C�����������
��, <Xw������@��3��3�3������@j��Y������;���	�$��4@������������������������������������v	�ƒ� tJ��t6��t%HHt���W	����K	����?	����3	�����$	����	��*u,���������;�����������������������k�
�ʍDЉ�������������*u&���������;�����������������k�
�ʍDЉ����{��ItU��htD��lt��w�c����T�;luC���������9����-��� �!�<6u�{4uCC����������<3u�{2uCC�������������<d��<i��<o��<u��<x��<X��������������P��P������u\Y������Yt"������������9]�C������������������������]�M�ƒ�d���y��S������AtHHtXHHtHH���� Dž�����������@9������������������HDž������0���������0u
����������u����������������������;�u��A��������Dž������X��HHty+��'���HH������������t0�G�Ph���P����P�Z����tDž������G����Dž����������5��������;�t;�H;�t4��������t�+��Dž��������������A����P�/XY����p������e����g�4�����itq��nt(��o������Dž��ta����U�7��������W���/������ tf�����f��������Dž��������@Dž��
����������W����u��gueDž���Y9���~���������~?������]V�T0����Y��������t�������������
Dž���3�����������G�������������P����������������P������������SP�5xA�Y�Ћ������t 9���u������PS�5�A�yY��YY����gu;�u������PS�5�A�TY��YY�;-u���C����S����Dž���������$��s�����HH���������Dž����'����Dž���i���������Qƅ���0�����Dž����E������K������� t�������@t�G���G����G���@t��3҉������@t;�|;�s�؃��ځ�������ڋ�u3ۃ���}Dž��������9���~�������u!�����u������������t-�����RPSW�QW��0��9����������~������N뽍E�+�F�����������ta��t�΀90tV���������0@�>If90t@@;�u�+�����(;�u��A���������I�8t@;�u�+��������������\����@t2�t	ƅ���-��t	ƅ���+��tƅ��� Dž��������+���+�������u�����������Sj �W������������������������v������Yt���uWSj0�������V�����������tf��~b�����������������Pj�E�P������FPF�RU����u(9�����t ������������M���������Yu�������������P��������Y�����|���tWSj ������V��������t�������~�������Y������������t����������������������t
�������`p�������M�_^3�[���Ð�,@�*@*+@�+@�+@�+@%,@S-@��U��E�4#A]Ë�U���(��A3ʼnE������SjL�����jP�V<�������(�����0�������,��������������������������������f������f����f�����f�����f������f�����������E�MDž0�����������I�����Dž����Dž��������`�@j��\�@��(���P�X�@��u��uj�FYh���@P�T�@�M�3�[����Ë�U��54#A�
Y��t]��j�nFY]�����U��E3�;͘AtA��-r�H�wj
X]Ë͜A]�D���jY;��#���]����u�AÃ���z��u�AÃ�Ë�U��V����MQ����Y������0^]Ë�U��� S3�9]u ���SSSSS��*��������V�uW�};�t!;�u�r���SSSSS���������j�����E�;�w�}�u�E�u�E�B�u�u�P�u�U���E;�t4;�|"�M�x�E���E�PS�"�YY���t�E�3�9]�\>���HH_^[�Ë�U��QS3�9]u ����SSSSS��`���������V�uW9]u;�u9]u3��;�t�};�w���������u�u�u;}v-�8�E@PVh��@��������uL�V����8"ue�L����8�\�WVh��@�E�������\>����u�}�u� ����8"u/�����M���#;�}"����u����"SSSSS�������_^[�Ë�U��uj�u�u�u�u������]�-�t"��t��
tHt3�øøøøË�VW��h3��FWP�q83��ȋ��~�~�~����~����A���F+ο��@Ou������@Nu�_^Ë�U�����A3ʼnE�SW����P�v�d�@�����3�������@;�r���ƅ���� ��t.�������;�w+�@P��
����j R�7��C�C��u�j�v�������vPW������Pjj�5b3�S�v������WPW������PW�vS�`��DS�v������WPW������Ph�vS��_��$3���E������t�L���������t�L ���������Ƅ@;�r��V��Dž������3�)���������ЍZ ��w�L�р� ���w�L �р� ���A;�r‹M�_3�[������jh�@���
���,A�Gpt�lt�wh��uj ��Y�����j
�Y�e��wh�u�;50At6��tV�l�@��u��AtV���Y�0A�Gh�50A�u�V�h�@�E������뎋u�j
�gYË�U���S3�S�M��I���8#A���u�8#A�t�@8]�tE�M��ap��<���u�8#A�p�@�ۃ��u�E�@�8#A��8]�t�E��`p���[�Ë�U��� ��A3ʼnE�S�]V�uW�d�����3��};�u�����3���u�3�9�8A���E�0=�r���p����d��P�x�@���R�E�PW�d�@���3h�CVP��43�B���{�s9U����}����u������F����h�CVP�4�M��k�0�u�HA�u��*�F��t(�>����E�4AD;�FG;�v�}FF�>uыu�E���}��u�r�lj{�C�g���j�C�C��<AZf�1Af�0A@@Ju����������L@;�v�FF�~��4����C���@Iu��C�����C�S��s3��ȋ�����{����958#A�X������M�_^3�[������jh �@���M�����}������_h�u�u����E;C�Wh �M"Y�؅��F���wh���#S�u���YY�E����u�vh�l�@��u�Fh=AtP�r��Y�^hS�=h�@��Fp���,A��j
�#Y�e��C�H#A�C�L#A�C�P#A3��E�}f�LCf�E<#A@��3��E�=}
�L��(A@��3��E�=}����0A@��50A�l�@��u�0A=AtP���Y�0AS���E�������0j
�
Y��%���u ��AtS���Y�������e��E��Ã=�,Auj��V���Y��,A3�Ë�U��SV�u���3�W;�to=XAth���;�t^9uZ���;�t9uP�
������W^YY���;�t9uP���������]YY��������������YY���;�tD9u@���-�P��������+�P������+�P�������y��������=�At9��uP��[�7�R��YY�~P�E��0At�;�t9uP�-��Y9_�t�G;�t9uP���Y���Mu�V���Y_^[]Ë�U��SV�5h�@W�}W�֋����tP�֋����tP�֋����tP�֋����tP�֍_P�E�{�0At	���tP�փ{�t
�C��tP�փ��Mu֋���P��_^[]Ë�U��W�}����SV�5l�@W�֋����tP�֋����tP�֋����tP�֋����tP�֍_P�E�{�0At	���tP�փ{�t
�C��tP�փ��Mu֋���P��^[��_]Å�t7��t3V�0;�t(W�8���Y��tV�E����>Yu��8AtV�Y���Y��^�3��jh@�@�e�,��,A�Fpt"�~lt��pl��uj �yY���x�j�1Y�e��Fl�=A�i����E��E�������j�,Y�u�Ë�U��V�5$A�5��@�օ�t!� A���tP�5$A��Ѕ�t����'���@V�|�@��uV�Y��th��@P���@��t�u�ЉE�E^]�j���YË�U��V�5$A�5��@�օ�t!� A���tP�5$A��Ѕ�t����'���@V�|�@��uV�?Y��th��@P���@��t�u�ЉE�E^]���@���V�5$A���@��u�5|#A�e���Y��V�5$A���@��^á A���tP�5�#A�;���Y�Ѓ
 A��$A���tP���@�
$A��ijh`�@����@V�|�@��uV�Y�E�u�F\�@3�G�~��t$h��@P���@�Ӊ��h��@�u�Ӊ���~pƆ�CƆKC�FhAj
�Y�e��vh�h�@�E������>j�Y�}��E�Fl��u�A�Fl�vl����Y�E��������3�G�uj
��Y�j��YË�VW�0�@�5 A������Ћ�uNhj�|��YY��t:V�5 A�5�#A���Y�Ѕ�tjV����YY���@�N���	V�m��Y3�W���@_��^Ë�V������uj�]Y��^�jh��@��u�����F$��tP� ��Y�F,��tP���Y�F4��tP���Y�F<��tP���Y�F@��tP����Y�FD��tP����Y�FH��tP����Y�F\=�@tP���Yj
�Y�e��~h��tW�l�@��u��AtW���Y�E������Wj�VY�E��~l��t#W��Y;=At��8At�?uW���Y�E������V�6��Y�K��uj
�%YËuj�YË�VW���@V�|�@��uV��Y�����^�5��@h��@W��h��@W�x#A��h��@W�|#A��h��@W��#A�փ=x#A�5��@��#At�=|#At
�=�#At��u$���@�|#A���@�x#A�C@�5�#A��#A���@�$A������5|#AP�օ�����5x#A�����5|#A�x#A�����5�#A�|#A���5�#A��#A�������#A�[��teh�E@�5x#A�=���Y�У A���tHhj���YY��t4V�5 A�5�#A�
���Y�Ѕ�tjV���YY���@�N��3�@����3�_^Ë�U���S�u�M��n���]�C=w�E苀��X�u�]�}�E�P�E%�P�@YY��t�Ej�E��]��E�Y�
3Ɉ]��E�A�E�j�p�p�E�PQ�E�P�E�jP�:S�� ��u8E�t�E�`p�3���E�#E�}�t�M�ap�[�Ë�U��3�9Ej��hP���@��#A��u]�3�@��,A]Ë�VW3���#A�<�4Au��0A�8h��0���L\YY��tF��$|�3�@_^Ã$�0A3���S���@V�0AW�>��t�~t
W��W�0���&Y����PA|ܾ0A_���t	�~uP�Ӄ���PA|�^[Ë�U��E�4�0A�P�@]�jh��@�3�G�}�3�9�#Au�j��h��YY�u�4�0A9t���nj�%Y��;�u�%��3��Qj
�YY�]�9u,h�W�C[YY��uW�^��Y�����]���>�W�C��Y�E������	�E��I�j
�(���Y�U��EV�4�0A�>uP�"���Y��uj�Y�6�L�@^]�U��
�,A��,Ak����U+P��r	��;�r�3�]Ë�U����M�AV�uW��+y������i���D�M�I�M�����S�1��U�V��U��U�]��ut��J��?vj?Z�K;KuB���� s����L��!\�D�	u#�M!��J���L��!����	u�M!Y�]�S�[�M�M�Z�U�Z�R�S�M����J��?vj?Z�]����]���+u��]���j?�uK^;�v��M����J�M�;�v��;�t^�M�q;qu;���� s�����!t�D�Lu!�M!1��K����!����Lu�M!q�M�q�I�N�M�q�I�N�u��]�}�u;����M�ыY�N�^�q�N�q�N;Nu`�L�M���L�� s%�}u�ʻ���M	������D�D	�)�}u�J����M	Y�J���ꍄ��	�E���D0��E�����$A�����
�,A�5��@h@��H��SQ�֋
�,A��$A����	P��$A�@�
�,A������$A�@�HC��$A�H�yCu	�`���$A�x�ueSj�p�֡�$A�pj�5�#A�D�@�
�,A��$Ak���,A+ȍL�Q�HQP�X�E���
�,A;�$Av�m��,A��,A�E��$A�=�,A[_^�á�,AV�5�,AW3�;�u4��k�P�5�,AW�5�#A���@;�u3��x��,A�5�,A��,Ak�5�,Ah�Aj�5�#A�H�@�F;�t�jh hW���@�F;�u�vW�5�#A�D�@뛃N��>�~��,A�F����_^Ë�U��QQ�M�ASV�qW3���C��}���i���0Dj?�E�Z�@�@��Ju�j��h��yh�W���@��u�����p�U�;�wC��+���GA�H���������������@���Pǀ��IuˋU��E���O�H�A�J�H�A�d�D3�G�����FC������E�NCu	x�������!P��_^[�Ë�U����M�ASV�uW�}��+Q������i���D�M�O����I;�|9���M�]��U���E�;��;�M���I�M���?vj?Y�M��_;_uC���� s��M��L��!\�D�	u&�M!������M��L��!����	u�M!Y�O�_�Y�O��y�M+�M��}����}��M��O�L1���?vj?_�]���]�[�Y�]�Y�K�Y�K�Y;YuW�L�M���L�� s�}u�ϻ���M	�D�D��� �}u�O����M	Y�����O����	�U�M��D2���L���U�F�B��D2��<3��8�/�])u�N�K��\3��u��N�]�K���?vj?^�E����u���N��?vj?^�O;OuB���� s����t��!\�D�u#�M!��N���L��!����	u�M!Y�]�O�w�q�w�O�q�uu��u��N��?vj?^�M��y�K�{�Y�K�Y�K;KuW�L�M���L�� s�}u�ο���M	9�D�D��� �}u�N����M	y�����N����	�E��D�3�@_^[�Ë�U�����,A�Mk��,A�����M�SI�� VW}����M���
����3���U��
�,A����S�;#U�#��u
���];�r�;�u��,A��S�;#U�#��u
���];�r�;�u[��{u
���];�r�;�u1��,A�	�{u
���];�r�;�u����؉]��u3��	S�:���Y�K��C�8�t��,A�C��U����t�����|�D#M�#��u)�e�����HD�9#U�#��u�E��������U���i���D�M�L�D3�#�u����#M�j _��G��}��M�T��
+M��N��?�M�~j?^;���J;Ju\�� ��}&����M��|8�Ӊ]�#\�D�\�D�u3�M�]!�,�O���M������|8��!��]�u�]�M�!K��]�}��J�z�y�J�z�y���M��y�J�z�Q�J�Q�J;Ju^�L�M���� �L}#�}u������	;�ο���M�	|�D�)�}u
�N����	{�M������N����	7�M���t�
�L���M��u�эN�
�L2��u��y�>��u;�$Au�M�;
�,Au�%�$A�M���B_^[�����hPV@d�5�D$�l$�l$+�SVW��A1E�3�P�e�u��E��E������E��E�d�ËM�d�
Y__^[��]Q�����������̋�U���S�]V�s35�AW��E��E��{���t
�N�38�W����N�F�38�G����E�@f��M�U�S��[�E�M��t_�I�[�L��D��E��E���t�����E���|@G�E��؃��u΀}�t$����t
�N�38�Ծ���N�V�3:�ľ���E�_^[��]��E��ɋM�9csm�u)�=�,At h�,A�S����t�UjR��,A���M�k�E9Xth�AW�Ӌ��n�E�M��H����t
�N�38�A����N�V�3:�1����E�H��������9S�R���h�AW�������jh�@�����M3�;�v.j�X3��;E�@u����WWWWW�0����3����M��u;�u3�F3ۉ]��wi�=�,AuK�����u�E;�,Aw7j��Y�}��u���Y�E��E������_�]�;�t�uWS���;�uaVj�5�#A�H�@��;�uL9=0(At3V�qY���r����E;��P�����E���3��uj�9�Y�;�u
�E;�t����8���Ë�U��W��W���@�u�|�@�����`�w��t�_]Ë�U����u��5PA�%�h��Ѓ�]Ë�U��h�@�|�@��th�@P���@��t�u��]Ë�U��u����Y�u��@�j�U�Y�j�r�YË�U��V������t�Ѓ�;ur�^]Ë�U��V�u3����u���t�у�;ur�^]Ë�U��=�,Ath�,A�OPY��t
�u��,AY�-hd�@hL�@���YY��uBh|@�R�D�@�$H�@�c����=�,AYth�,A�OY��tjjj��,A3�]�jh�@�r���j�q�Y�e�3�C9%A���%A�E�%A�}���5�,A��Y���}؅�tx�5�,A��Y��u܉}�u���u�;�rW�{�9t�;�rJ�6�u����e����5�,A�_����5�,A�R���9}�u9E�t�}�}؉E��u܋}��ht�@�h�@�_���Yh|�@�x�@�O���Y�E�������}u(�%Aj��Y�u���3�C�}tj��Y����Ë�U��jj�u������]Ë�U��jj�u�����]�jjj������jjj�����Ë�V�w���V�"V��IV���V�RV�RV�PV�
V�fPh�[@�����$�PA^�U��QQS�]VW3�3��}�;�XAt	G�}���r��wj��SY���4j�SY��u
�=�A�����Ah��@�S�%AW�C����t
VVVVV�_����h�1%AVj�5&A�8�@��u&h��@h�V�|C����t3�PPPPP�����V�e*@Y��<v8V�X*��;�j�,(Ah��@+�QP�B����t3�VVVVV�������3�h��@SW�A����t
VVVVV������E��4�\ASW�A����t
VVVVV�����h h��@W�$Q���2j�,�@��;�t$���tj�E�P�4�\A�6�)YP�6S���@_^[��j�JRY��tj�=RY��u�=�Auh��)���h�����YY�U��E�,(A]�U��5,(A�7�Y��t�u��Y��t3�@]�3�]�jTh�@���3��}��E�P���@�E�����j@j ^V�lYY;����+A�5p+A���0�@���@
�x�@$�@%
�@&
�x8�@4��@�
�+A��;�r�f9}��
�E�;����8�X�;�E�;�|���E��[j@j ��YY��tV�M���+A��p+A ���*�@���@
�`�`$��@%
�@&
�`8�@4��@��;�r�E�9=p+A|���=p+A�e���~m�E����tV���tQ��tK�uQ���@��t<�u�������4��+A�E����Fh��FP�*FYY�����F�E�C�E�9}�|�3ۋ��5�+A����t���t�N��r�F���uj�X�
��H������P�,�@�����tC��t?W���@��t4�>%���u�N@�	��u�Nh��FP�EYY��t7�F�
�N@�����C���g����5p+A���@3��3�@Ëe��E����������Ë�U��VW3��u職����Y��u'94(AvV���@���;4(Av����uʋ�_^]Ë�U��VW3�j�u�u���������u'94(AvV���@���;4(Av����uË�_^]Ë�U��VW3��u�u�3O��YY��u,9Et'94(AvV���@���;4(Av����u���_^]�jh0�@�`�3ۉ]�j�Z�Y�]�j_�}�;=�<A}W������,A�9tD��@�tP���Y���t�E�|(��,A��� P���@��,A�4�!���Y��,A�G��E������	�E����j��YË�U��SV�u�F�Ȁ�3ۀ�u@�t9�FW�>+���~,WPV�YP�Q#��;�u�F��y��F��N ��_�F�f�^��[]Ë�U��V�u��u	V�5Y�/V�|���Y��t����F@tV�5P��OY��Y��3�^]�jhP�@��3��}�}�j��Y�}�3��u�;5�<A����,A��98t^��@�tVPV���YY3�B�U���,A���H���t/9UuP�J���Y���t�E��9}u��tP�/���Y���u	E܉}��F�3��uࡼ,A�4�V����YY��E�������}�E�t�E����j�q�Y�j����YË�U�����)AS3�V�u�E��]�]��]��F�> t��<at9<rt,<wt���SSSSS��H����3��p�E��M��]��E	�M�3�AF�W:����Q�@;��.����S������ ���tVHtG��t/��
t"����9]����M�E���	U���E@���M@��E���E���E����E�E���‰E��9]�uw�M �E��u��Tt\��tEHt1��t����E�uF	}�L9]�u<�e������E��79]�u'	}��E��&�E�u�M���Et3���MF�:�����9]����F�> t�jVh��@�Y���������F�> t��>=upF�> t�jh��@V��W����u���M�Ajh�@V��W����u���M�!jh�@V�W����u���M�F�> t�8t���SSSSS�������h��u�E�u�uP�U����t3�� �E� A�M��H�M�X��X�X�H_^[��jhx�@�e�3�3��}�j�]�Y�]�3��u�;5�<A����,A��9t[��@��uH��uA�F���w�FP�X�Y������,A�4�V�'���YY��,A���@�tPV�~���YYF둋��}��h��j8���Y�
�,A���,A�9tIh���� P�>YY����,Au�4�ï��Y��,A����� P�L�@��,A�<�}�_;�t�g��_�_��_�O��E����������Ë}�j�g�Y��SVW�T$�D$�L$URPQQhDh@d�5��A3ĉD$d�%�D$0�X�L$,3�p���t;�T$4���t;�v.�4v�\���H�{u�h�C�:X��C�LX�d���_^[ËL$�A�t3�D$�H3��|���U�h�p�p�p�>�����]�D$�T$���U�L$�)�q�q�q(������]�UVWS��3�3�3�3�3���[_^]Ë��j�W3�3�3�3�3���U��SVWjjh�h@Q�m_^[]�U�l$RQ�t$�����]���U��V�uW3�;�u���WWWWW��������F�����@���t�� �F�����F�u	V�Y��F��v�vV�tYP�p���F;���������F�uOV�JY���t.V�>Y���t"V�2��V�<��+A�"��Y��Y��A�@$�<�u�N �~u�F�t�u�F��N�A���������	F�~��_^]Ë�U����UV�uj�X�E�U�;�u�m��� �R���	���S3�;�|;5p+Ar'�C����)��SSSSS�	��������Q���W�<��+A�����ƊH��u���������	�j�����wP�]�;������9]t7�@$���E���HjYtHu��Шt��U�E�E����Шu!�����w���SSSSS������4����M;�r�E�u�@���Y�E�;�u�?����G������hjSS�u�G��D(�E���T,��AHtt�I��
tl9]tg��@�M�E��D
8]�tN��L%��
tC9]t>��@�M�}��E��D%
u$��L&��
t9]t��@�M�E��D&
S�M�Q�uP��4���@���{�M�;��p;M�g�M�D�����}��;�t
�M�9
u��� ��]�E�É]�E�;����M�<��<
t�CA�M��E�H;�s�A�8
u
AA�M�
�u�E�m�Ej�E�Pj�E�P��4���@��u
�0�@��uE�}�t?��DHt�}�
t��
��M��L�%;]�u�}�
t�jj�j��u����}�
t�
C�E�9E�G������D�@u����C��+E�}��E�������K���xC�3�@�����;]�rK�@��PAt�����PA��u
�����*�zA;�u��@��AHt$C���Q|	���T%C��u	���T&C+���ؙjRP�u�����E�+]���P�uS�u�jh����@�E�u4�0�@P���Y�M�E�;EtP迨��Y�E�����E���E�3�;�����E�L0��;�t�M�f�9
u��� ��]�E�É]�E�;����E�f����f��
tf�CC@@�E��M�;�s�Hf�9
u
���Ej
��M��Ej�E�Pj�E�P��4���@��u
�0�@��u[�}�tU��DHt(f�}�
t�j
Xf���M��L��M��L%��D&
�*;]�uf�}�
t�jj�j��u�e
��f�}�
tj
Xf�CC�E�9E�������t�@u��f�f�CC+]�]�����0�@j^;�u�����	�����0�i�����m�Y����]��\���3�_[^��jh��@����E���u���� ����	���3�;�|;p+Ar!����0�p���	VVVVV������ɋ�����+A��������L9��t�����;M�Au�<���0�"����P�hQY�u���D8t�u�u�u�~������E�������	�����0�M��E������	�E��K��u�QYË�U��EV3�;�u���VVVVV��0��������@^]Ë�U��V�uW3�;�u3��e9}u�l��j^�0WWWWW��������E9}t9urV�u�u�0���uW�u�"��9}t�9us���j"Y����jX_^]ËT$�L$��ti3��D$��u��r�=h+At��RW����r1�ك�t+ш����u����������ʃ���t��t
�����u��D$_ËD$Ë�U��V�uV����P�YY��t|�æ���� ;�u3��賦����@;�u`3�@� A�FuNSW�<�8(A�?�u S�%�Y���u�Fj�F�X�F�F�
�?�~�>�^�^�N3�_@[�3�^]Ë�U��}t'V�u�FtV�K��f���f�&�fY^]Ë�U��V�uV�NY���u����	���MW�uj�uP���@�����u�0�@�3���tP���Y���������+A�����D0� ���_^]�jh��@���E���u�H��� �-���	���3�;�|;p+Ar!����8����	WWWWW������ɋ�����+A�������L1��t�P�NY�}���D0t�u�u�u������E������	����8�M��E������	�E����u�hNYË�U��V�uWV�?MY���tP��+A��u	���u��u�@Dtj�Mj���MYY;�tV�LYP�@�@��u
�0�@���3�V�[L������+A����Y�D0��tW���Y���3�_^]�jh�@�	��E���u����� ����	���3�;�|;p+Ar!����8����	WWWWW�������ɋ�����+A�������L1��t�P�LY�}���D0t�u����Y�E���2����	�M��E������	�E����u�LYË�U��V�u�F��t�t�v�V����f����3�Y��F�F^]Ë�U��E��8csm�u*�xu$�@= �t=!�t="�t=@�u�:63�]�h�u@�\�@3��Ë�U��QQV������F�V\�\AW�}��S99t��k����;�r�k��;�s99u���3���t
�X�]���u3����u�`3�@�������N`�M��M�N`�H�����
PA�=TA���;�}$k��~\�d9�=PA�TAB߃�;�|�]���~d=��u	�Fd��^=��u	�Fd��N=��u	�Fd��>=��u	�Fd��.=��u	�Fd��=��u	�Fd��=��u�Fd��vdj��Y�~d��`Q�ӋE�Y�F`��[_^�Ã=�,Au���V�5 AW3���u���<=tGV�Y�t���u�jGW����YY�=�$A��tˋ5 AS�BV���C�>=Yt1jS���YY���tNVSP�d(����t3�PPPPP���������>u��5 A����% A�'��,A3�Y[_^�5�$A辞���%�$A����U��Q�MS3�V���U�9Et	�]�E��E��>"u3�9E��"��F�E��<���t��B�U���PF�MY��t��}t
�M��E�F�U�M��t2�}�u��� t��	u���t�B��e��>���< t<	uF��N��>���}t	�E�E��3�C3��FA�>\t��>"u&��u�}�t�F�8"u���
3�3�9E����E����tI��t�\B���u�U���tU�}�u< tK<	tG��t=��P��t#�LY��t
��M�E�F��M��E��
�LY��tF���UF�V�����t�B�U��M�����E^[��t� ���U���S3�VW9�,Au���h�@(AVS�D)A�8�@��,A�5%A;�t�E�8u�u��U��E�PSS�}��
����E���=���?sJ�M�sB�����;�r6P� ���Y;�t)�U��E�P�WV�}������E���H��$A�5�$A3����_^[�Ë�U��H)A��SV�5��@W3�3�;�u.�֋�;�t�H)A�#�0�@��xu
jX�H)A��H)A����;�u�֋�;�u3�����f9t@@f9u�@@f9u�5��@SSS+�S�@PWSS�E�։E�;�t/P�F�Y�E�;�t!SS�u�P�u�WSS�օ�u�u�虛��Y�]��]�W���@���\��t;�u����@��;��r���8t
@8u�@8u�+�@P�E������Y;�uV���@�E����u�VW�%��V���@��_^[�Ë�V��@��@W��;�s���t�Ѓ�;�r�_^Ë�V��@��@W��;�s���t�Ѓ�;�r�_^Ë�U�����A�e��e�SW�N�@����;�t
��t	�У�A�`V�E�P���@�u�3u����@3���@3���@3�E�P���@�E�3E�3�;�u�O�@����u����5�A�։5�A^_[�Ã%l+AË�U��QQ�EV�u�E��EWV�E��D��Y;�u訹���	�Nj��J�u�M�Q�u�P���@�E�;�u�0�@��t	P蚹��Y�ϋ�����+A�����D0� ��E��U�_^��jh��@������u܉u�E���u�?���� �$����	�Ƌ���3�;�|;p+Ar!�����8����	WWWWW胸�����ȋ�����+A�������L1��u&�Ը���8躸���	WWWWW�B����������[P��CY�}���D0t�u�u�u�u������E܉U���l����	�t����8�M��M��E�������E܋U������u�+DYË�U�����I��A3ʼnE��EV3���4���8���0�9uu3���;�u'�����0���VVVVV��p��������SW�}����4��+A�����NJX$����(���'���t��u0�M���u&虷��3��0�}���VVVVV��������C�@ tjjj�u�~������u�iY������D����6���@l3�9H�����P��4�� ����@���`3�9� �t���P���@��4����3���<�9E�B��D���'����g���(�3���
���� ��ǃx8t�P4�U�M��`8j�E�P�K��P�	Y��t:��4�+�M3�@;���j��@�SP��G�������C��D��jS��@�P��G�������3�PPj�M�Qj��@�QP���C��D����@���\j��<�PV�E�P��(���4���@���)��D���0��9�<���8���� ���j��<�Pj�E�P��(���E�
�4���@������<�����0���8��<t<u!�33�f��
��CC��D���@��� �<t<uR��@���DYf;�@��h��8��� �t)j
XP��@��DYf;�@��;��8���0��E9�D�������'����8��T4��D8�3ɋ�@�����4���@�������<�9M� ���(���<���D�+�4���H�;Ms9��<���<��A��
u��0��
@��D��@��D���D��r‹؍�H�+�j��,�PS��H�P��4���@���B��,��8�;��:��<�+�4�;E�L���� ��D�����9M�M���(���D���<�+�4���H�;MsF��D���D��AAf��
u��0�j
[f�@@��<���<�f�@@��<��r��؍�H�+�j��,�PS��H�P��4���@���b��,��8�;��Z��D�+�4�;E�?����@9M�|��D���<�+�4�j��H���^;Ms<��D���D��f��
uj
[f���<��<�f�Ɓ�<��r�3�VVhU
����Q��H���+��+��P��PVh����@��;���j��,�P��+�P��5��P��(���4���@��t�,�;����0�@��@�;�\��D�+�4���8�;E�
����?j��,�Q�u��4��0���@��t��,���@���8���0�@��@���8�ul��@�t-j^9�@�u�p����	�x����0�?��@��|���Y�1��(���D@t��4��8u3��$�0�����8���� �����8�+�0�_[�M�3�^�7�����jh�@�5���E���u���� ����	���3�;�|;p+Ar!�Ӱ���8蹰���	WWWWW�A������ɋ�����+A�������L1��t�P��;Y�}���D0t�u�u�u�.������E���V����	�^����8�M��E������	�E�����u�<YË�U�� Ah���Y�M�A��t
�I�A��I�A�A�A�A�a�]Ë�U��E���u�˯���	3�]�V3�;�|;p+Ar譯��VVVVV�	�5�����3���ȃ������+A���D��@^]Ë�VW3���`A�6誻����Y���(r�_^á�A��3�9L)A���������̋L$��t$�����tN��u���$��$�����~Ѓ�3ƒ���t�A���t2��t$��t��t�͍A��L$+�ÍA��L$+�ÍA��L$+�ÍA��L$+�Ë�U���SV�u3�W�};�u;�v�E;�t�3���E;�t�������v�p���j^SSSSS�0��������V�u�M�貍���E�9X��f�E��f;�v6;�t;�vWSV���������*�����8]�t�M��ap�_^[��;�t2;�w,��j"^SSSSS�0�{�����8]��y����E��`p��m�����E;�t�8]��%����E��`p������MQSWVj�MQS�]�p���@;�t9]�^����M;�t���0�@��z�D���;��g���;��_���WSV�A����O�����U��j�u�u�u�u�|�����]Ë�U����u�M��y����E�M���A%��}�t�M��ap��Ë�U��j�u���YY]��V�D$�u(�L$�D$3��؋D$����d$�ȋ�d$��G�ȋ\$�T$�D$���������u���d$�ȋD$���r;T$wr;D$v	N+D$T$3�+D$T$��؃��ʋӋًȋ�^��A@t�yt$�Ix��������QP�:���YY���u	�Ë�U��V����M�E�M����>�t�}�^]Ë�U���x��A3ʼnE�S�]V�u3�W�}�u��������������������������������������������������������u5�����3�PPPPP������������t
�������`p����
�F@u^V��Y�A���t���t�ȃ�������+A���A$u����t���t�ȃ�������+A���@$��g���3�;��]��������������������������������P
C3�9����������
�ʀ� ��Xw
����p�@��������k�	����@j��^������;����jY;���	�$�n�@3�������������������������������������t	�ƒ� tH��t4+�t$HHt���V		���K	����?	����3	�����$	����	��*u,���������������������������������k�
�ʍDЉ�������������*u&���������������������������k�
�ʍDЉ����z��ItU��htD��lt��w�b����S�;luC���������8����,��� � �<6u�{4uCC����������<3u�{2uCC�������������<d��<i��<o��<u��<x��<X�������������������P��P����Y������Yt"����������������C���������������������������J�ƒ�d���w��S������AtHHtYHHtHH���� Dž�����������@�������������������EDž������0���������0u
����������u������������������������u��A��������Dž����{��X��HHty+��&���HH������������t0�G�Ph���P����P�W�������tDž������G����Dž����������1����������t<�H��t5��������t�+��Dž��������������A����P����Y����p������e����g�2�����itm��nt$��o����������ta����U�7��������M������������ tf�����f��������Dž��������@Dž��
����������G��W���u��gufDž���Z9���~���������~@������]V�������Y������j��t�������������
Dž���^��G��������G�������������P����������������P������������SP�5xA�I���Y�Ћ������t!����u������PS�5�A����Y��YY����gu��u������PS�5�A��Y��YY�;-u���C����S���������������$��s�����HH���������Dž����'����Dž���k���������Qƅ���0�����Dž����G������M������� t�������@t�G���G����G���@t��3҉������@t��|��s�؃��ځ�������ڋ�u3ۃ���}Dž��������9���~�������u!�����u������������t-�����RPSW�����0��9����������~������N뽍E�+�F�����������tb��t�΀90tW���������0@�?If�8t@@��u�+�����(��u��A���������I�8t@��u�+��������������\����@t2�t	ƅ���-��t	ƅ���+��tƅ��� Dž��������+���+�������u�����������Sj ���������������������������������Yt���uWSj0������f��������������tf��~b�����������������Pj�E�P������FPF�����u(9�����t ������������M�蔓��������Yu�������������P������m���Y�����|���tWSj ��������������t�������!���������Y������������t
�����������3�9�����t������t�y���VVVV�V�������t
�������`p�������M�_^3�[�v���Ë�X�@W�@��@�@1�@=�@��@��@��U��E��t���8��uP�k���Y]Ë�U�����A3ʼnE�SV3�W��9P)Au8SS3�GWh��@hS��@��t�=P)A��0�@��xu
�P)A9]~"�M�EI8t@;�u����E+�H;E}@�E�P)A����;��������]�9] u��@�E �5��@3�9]$SS�u���u��P�u �֋�;���~Cj�3�X����r7�D?=w�X5��;�t����P�w���Y;�t	������E���]�9]��>W�u�u�uj�u �օ����5�@SSW�u�u�u�֋ȉM�;����Et)9]��;M���u�uW�u�u�u���;�~Ej�3�X��r9�D	=w�4��;�tj������P���Y;�t	��������3�;�tA�u�VW�u�u�u��@��t"SS9]uSS��u�u�u�VS�u ���@�E�V���Y�u�����E�Y�Y�]�]�9]u��@�E9] u��@�E �u��1Y�E��u3��!;E ��SS�MQ�uP�u �2���E�;�tԋ5�@SS�uP�u�u�։E�;�u3��~=���w8��=w�3��;�t�������P�~��Y;�t	��������3�;�t��u�SW�������u�W�u�u�u�u�։E�;�u3��%�u�E��uPW�u �u��[1��u�����#u�W���Y��u�u�u�u�u�u��@��9]�t	�u���|��Y�E�;�t9EtP��|��Y�ƍe�_^[�M�3��{���Ë�U����u�M��{���u(�M�u$�u �u�u�u�u�u�(����� �}�t�M��ap��Ë�U��QQ��A3ʼnE��T)ASV3�W��;�u:�E�P3�FVh��@V��@��t�5T)A�4�0�@��xu
jX�T)A��T)A����;��������]�9]u��@�E�5��@3�9] SS�u���u��P�u�֋�;���~<���w4�D?=w�1��;�t����P�|��Y;�t	������؅�ti�?PjS�����WS�u�uj�u�օ�t�uPS�u��@�E�S�����E�Y�u3�9]u��@�E9]u��@�E�u�/Y���u3��G;EtSS�MQ�uP�u�7/���;�t܉u�u�u�u�u�u��@��;�tV��z��Y�Ǎe�_^[�M�3��y���Ë�U����u�M��y���u$�M�u �u�u�u�u�u�������}�t�M��ap��Ë�U��V�u�����v�iz���v�az���v�Yz���v�Qz���v�Iz���v�Az���6�:z���v �2z���v$�*z���v(�"z���v,�z���v0�z���v4�
z���v�z���v8�y���v<��y����@�v@��y���vD��y���vH��y���vL��y���vP��y���vT�y���vX�y���v\�y���v`�y���vd�y���vh�y���vl�y���vp�y���vt�y���vx�wy���v|�oy����@����ay������Vy������Ky������@y������5y������*y������y������y������	y������x�������x����,^]Ë�U��V�u��t5�;XAtP��x��Y�F;\AtP�x��Y�v;5`AtV�x��Y^]Ë�U��V�u��t~�F;dAtP�x��Y�F;hAtP�xx��Y�F;lAtP�fx��Y�F;pAtP�Tx��Y�F;tAtP�Bx��Y�F ;xAtP�0x��Y�v$;5|AtV�x��Y^]Ë�U��ES3�VW;�t�};�w蔗��j^�0SSSSS���������<�u;�u��ڋ�8tBOu�;�t��
BF:�tOu�;�u��M���j"Y����3�_^[]�U��V3�PPPPPPPP�U�I�
�t	���$��u���I���
�t	���$s��� ^�Ë�U��SV�u3�W9]u;�u9]u3�_^[]�;�t�};�w�Ŗ��j^�0SSSSS�N���������9]u��ʋU;�u��у}���u�
�@B:�tOu���
�@B:�tOt�Mu�9]u�;�u��}�u�EjP�\�X�x�����K���j"Y���낋�U��MS3�VW;�t�};�w�%���j^�0SSSSS讕�������0�u;�u��ڋъ�BF:�tOu�;�u����j"Y����3�_^[]�������������̋T$�L$��u<�:u.
�t&:au%
�t��:Au
�t:au����
�uҋ�3�Ð�����t���:u�
�t��t�f���:u�
�t�:au�
�t������������U��WV�u�M�}�����;�v;�����r�=h+AtWV����;�^_u^_]�+��u������r*�$��@��Ǻ��r���$���@�$��@��$�x�@��@4�@X�@#ъ��F�G�F���G������r��$��@�I#ъ��F���G������r��$��@�#ъ���������r��$��@�Iۢ@Ȣ@��@��@��@��@��@��@�D��D��D��D��D��D��D��D��D��D��D���D���D���D�������$��@���@��@�@�@�E^_�Ð���E^_�Ð���F�G�E^_�ÍI���F�G�F�G�E^_�Ð�t1��|9���u$������r
��$���@����$�0�@�I�Ǻ��r��+�$���@�$���@���@��@�@�F#шG��������r���$���@�I�F#шG�F���G������r���$���@��F#шG�F�G�F���G�������V�����$���@�I4�@<�@D�@L�@T�@\�@d�@w�@�D��D��D��D��D��D��D��D��D��D��D��D��D��D������$���@����@��@��@��@�E^_�Ð�F�G�E^_�ÍI�F�G�F�G�E^_�Ð�F�G�F�G�F�G�E^_�Ë�U��Q�e�S�]��u3��W��ru�{���vn�M�E�������tR:Q�uM�P���t<:Q�u7�P���t&:Q�u!�P���t:Q�u�E�9}�r��?�@��I��F�@��I��<�@��I��2�@��I��(�M�E����t:u@A�E�9]�r�3�_[����	+��������������U��V3�PPPPPPPP�U�I�
�t	���$��u���
�t���$s�F��� ^�Ë�U��E�\)A]�jh8�@���e��u�u��@�E��/�E���E�3�=�����Ëe�}��uj���@�e��E������E������U��WV�u�M�}�����;�v;�����r�=h+AtWV����;�^_u^_]�'��u������r*�$�ħ@��Ǻ��r���$�ئ@�$�ԧ@��$�X�@��@�@8�@#ъ��F�G�F���G������r��$�ħ@�I#ъ��F���G������r��$�ħ@�#ъ���������r��$�ħ@�I��@��@��@��@��@��@��@x�@�D��D��D��D��D��D��D��D��D��D��D���D���D���D�������$�ħ@��ԧ@ܧ@�@��@�E^_�Ð���E^_�Ð���F�G�E^_�ÍI���F�G�F�G�E^_�Ð�t1��|9���u$������r
��$�`�@����$��@�I�Ǻ��r��+�$�d�@�$�`�@�t�@��@��@�F#шG��������r���$�`�@�I�F#шG�F���G������r���$�`�@��F#шG�F�G�F���G�������V�����$�`�@�I�@�@$�@,�@4�@<�@D�@W�@�D��D��D��D��D��D��D��D��D��D��D��D��D��D������$�`�@��p�@x�@��@��@�E^_�Ð�F�G�E^_�ÍI�F�G�F�G�E^_�Ð�F�G�F�G�F�G�E^_������������̋�U��M�MZf9t3�]ËA<��8PEu�3ҹf9H�‹�]�����������̋�U��E�H<��ASV�q3�W�D��v�}�H;�r	�X�;�r
B��(;�r�3�_^[]������������̋�U��j�hX�@hPV@d�P��SVW��A1E�3�P�E�d��e��E�h@�*�������tU�E-@Ph@�P�������t;�@$���Ѓ��E������M�d�
Y_^[��]ËE��3�=��‹�Ëe��E�����3��M�d�
Y_^[��]Ë�U��QSVW�5�,A�K����5�,A���}��;�����YY;�����+ߍC��rwW�$���CY;�sH�;�s���;�rP�u�迵��YY��u�G;�r@P�u�詵��YY��t1��P�4��V���Y��,A�u�H������V�=���Y��,A�EY�3�_^[�Ë�Vjj ������V��������,A��,A��ujX^Ã&3�^�jhx�@���荭���e��u���Y�E��E������	�E�������l���Ë�U��u��������YH]�jh��@蕩���\����@x��t�e����3�@Ëe��E������"$让���hK�@�c���Y�`)AË�U��E�d)A�h)A�l)A�p)A]Ë�U��E�
\AV9Pt��k�u��;�r�k�M^;�s9Pt3�]�5l)A�w���Y�j h��@���3��}�}؋]��Lt��jY+�t"+�t+�td+�uD�������}؅�u���a�d)A�d)A�`�w\���]��������Z�Ã�t<��t+Ht�:����3�PPPPP�����뮾l)A�l)A��h)A�h)A�
�p)A�p)A�E�P賕���E�Y3��}���9E�uj�ۭ��9E�tP����Y3��E���t
��t��u�O`�MԉG`��u@�Od�M��Gd���u.�
PA�M܋
TA�PA�9M�}�M�k��W\�D�E���������E��������u�wdS�U�Y��]�}؃}�tj蠛��Y�S�U�Y��t
��t��u�EԉG`��u�EЉGd3�苧��Ë�U��E�x)A]Ë�U��E��)A]Ë�U���SVW莔���e��=�)A����h��@��@�����*�5��@h|�@W�օ��P�ؓ���$l�@W��)A��P�Ó���$X�@W��)A��P讓���$<�@W��)A��P虓��Y��)A��th$�@W��P聓��Y��)A��)A;�tO9�)AtGP�ߓ���5�)A���ғ��YY����t,��t(�օ�t�M�Qj�M�QjP�ׅ�t�E�u	�M �9��)A;�t0P菓��Y��t%�ЉE���t��)A;�tP�r���Y��t�u��ЉE��5�)A�Z���Y��t�u�u�u�u����3�_^[�Ë�U��MV3�;�|��~��u� A�(� A�
 A��M���VVVVV��Յ������^]�jh�@�g����]��u�u�g��Y���u��uS�of��Y��=�,A��3��}����j�#���Y�}�S�L���Y�E�;���;5�,AwIVSP�.�������t�]��5V���Y�E�;�t'�C�H;�r��PS�u��M�S����E�SP�"�����9}�uH;�u3�F�u�����uVW�5�#A�H�@�E�;�t �C�H;�r��PS�u���S�u��ՙ�����E������.�}�u1��uF�����uVSj�5�#A���@����u�]j�T���YË}���9=0(At,V�F���Y���������9}�ul��0�@P�k���Y��_����蛄��9}�th��q��uFVSj�5�#A���@����uV90(At4V�ݫ��Y��t���v�V�ͫ��Y�O����3��ƣ����<����|�����u�.�����0�@P�ރ���Y����jh��@�L����E���u�����	���3�;�|;p+Ar�߃���	SSSSS�g������Ћ���<��+A�������L��t�P�Y�]���Dt1�u�lYP��@��u�0�@�E���]�9]�t�~����M��a����	�M��E������	�E��Ǣ���u�.YË�U���0S3�E�VW��]�]��E��]�t	�]��E��
�E��]��E�P�s Y��t
SSSSS�X������M����u��@u9E�t�M������+ú���tGHt.Ht&轂�����蠂��j^SSSSS�0�)�������U����t��u��E�@��}��EjY+�t7+�t*+�t+�t��@u�9}����E���E���E���E���]�E�#¹;��;t0;�t,;�t=��=�@����E��/�E��&�E��=t=t`;������E��E�E���t�
�$A��#M��x�E��@t�M��M��M��t	}� t�M���E�릨t�M��h
����u�T�������7������E�= �@S�u���u�E�P�u�u��u�׉E��um�M���#�;�u+�Et%�e����S�u�E�u�P�u�u��u�׉E��u4�6������+A�����D0� ��0�@P�ŀ��Y虀����t�u���@;�uD�6������+A�����D0� ��0�@��V肀��Y�u�@�@;�u��I����
룃�u�M�@�	��u�M��u�6�	��Ѓ������+AY��Y�M����L��Ѓ������+A���D$� ��M��e�H�M���������Etqj��W�6������E�;�u����8�tM�6�,������j�E�P�6�]���������u�}�u�E�RP�6�y��;�t�SS�6蜻����;�t��E���0�@�@�}u�E�#�u	M�	E�E#�;�tD=t)=@t"=t)=@t"=t=@u�E���M�#�;�u	�E���]��E���E�@�]����E���#�=@��=�tw;����E�;��y��v��v0���f�E�3�H�&H�R�E��E��jSS�6������t�SSS�6�n��#ƒ���������j�E�P�6諱��������u�����tk�����}�uY�E����E�;������b������P���jSS�6�������C���SSS�6������#ƒ���������E�%��=��u�6�"���Y�}��j^�0���d=��uSj�6讹�������������E��ASS�6蓹������E��E��E�+�P�D=�P�6�/�������������9}�ۋ������+A�����D$�2M���0�������+A�����D$�M�������
ʈ8]�u!�Et��ȃ������+A���D� �}�����#�;�u|�Etv�u�@�@S�u�E�jP�u���W�u� �@���u4�0�@P�|����ȃ������+A���D� ��6�Y����6������+A�������_^[��jh�@�L���3��u�3��};���;�u�{��j_�8VVVVV�~{�������Y��3�9u��;�t�9ut�E%������@t‰u��u�u�u�u�E�P���j������E��E�������E�;�t�������3��}9u�t(9u�t�����������+A�D� ��7�CYË�U��j�u�u�u�u�u������]Ë�U���S�u�M��|Z��3�9]u8]�t�E�`p�3����E�9Xu&�u�u�u����8]����M�ap��9]u.��z��SSSSS��Oz����8]�t�E�`p������W�};�u.�z��SSSSS��z����8]�t�E�`p������NV�Mf�	�M�E����D�M�ti9]u��D�]����f�����U�:�u�]��Z��f��f�E��f��M�f;prf;pwfp�6f;pr0f;pw*fp�$�U���At
f������ʉM�f�u�f�����G�D�M�tH9]u�]��^��M:�t��f��f���G�M�f;Hrf;HwfH�6f;Hr0f;Hw*fH�$�U���At
f������ʉM�f�M�f;�u!f;�t	9]����8]�t�E�`p�3�^_[�����H8]�t�M�ap���U��j�u�u�u�����]Ë�U���S3�9]u3���W�u�M��(X���}�9_u&�u�u�u�����8]����M��ap��9]u+�x��SSSSS��x����8]�t�E��`p������mV�u;�u+�Zx��SSSSS���w����8]�t�E��`p������9�Ef��M�E�����D8tA9]u�3�D8t_8]�t�E��`p�3�^_[�ËE�:�u3����f��f�E��f�����F�D:t 9]u3����M:�t�f���f�F��f;�uf;�t�9]�`�������H8]�t��M��ap�냋�U��j�u�u�u�����]����U��SVWUjjhd�@�u�]_^[��]ËL$�A�t2�D$�H�3��TV��U�h�P(R�P$R���]�D$�T$���SVW�D$UPj�hl�@d�5��A3�P�D$d��D$(�X�p���t:�|$,�t;t$,v-�4v���L$�H�|�uh�D��I�D��_뷋L$d�
��_^[�3�d�
�yl�@u�Q�R9Qu��SQ��A�SQ��A�L$�K�C�kUQPXY]Y[����U��EVW��|Y;p+AsQ�������<��+A����<�u5�=�AS�]u��tHtHuSj��Sj��Sj��$�@��3�[��u���	��u��� ��_^]�U��MS3�;�VW|[;
p+AsS������<��+A������@t5�8�t0�=�Au+�tItIuSj��Sj��Sj��$�@���3���8u���	�@u�����_^[]Ë�U��E���u�$u��� �	u���	��]�V3�;�|";p+As�ȃ������+A����@u$��t���0��t��VVVVV�	�Qt��������^]�jh8�@�ߓ���}���������4��+A�E�3�9^u6j
蹈��Y�]�9^uh��FP��YY��u�]�F�E������09]�t����������+A�D8P�L�@�E�蟓���3ۋ}j
�y���YË�U��E�ȃ������+A���DP�P�@]�jhX�@�����M�3��}�j�K���Y��u���bj���Y�}��}؃�@�<�4��+A�����u���+A;����Fu\�~u9j
豇��Y3�C�]��~uh��FP��YY��u�]���F�e��(�}�u�^S�L�@�FtS�P�@��@낋}؋u�j
�v���YÃ}�u��F��+4��+A������u�}�uyG�+���j@j ����YY�E�ta���+A��p+A ���;�s�@���@
�`��@�E�����}����σ������+A�DW����Y��u�M��E������	�E��ّ���j踅��Y�U����}��}�M��f����$�ffGfG fG0fG@fGPfG`fGp���IuЋ}���]�U����}��E���3�+���3�+���u<�M�у��U�;�t+�QP�s������E�U��tEE+‰E�3��}��M��E�.�߃��}�3��}�M��E�M�U�+�RjQ�~������E�}���]�jh��@蘐���e�f(��E��#�E��=�t
=�t3��3�@Ëe�e��E������E�蚐��Ë�U���3�S�E��E�E�S�X��5 P��Z+�tQ�3���E�]�U�M���U��E�[�E�t�\�����t3�@�3�[������h+A3�Ë�U����u�M��O���E�M�U�Tu�}t�M���A#E�3���t3�@�}�t�M��ap��Ë�U��jj�uj�����]Ë�U�����A3ʼnE�V3�95�AtO�=xA�u��
�xA���u����pV�M�Qj�MQP�0�@��ug�=�Au�0�@��xuω5�AVVj�E�Pj�EPV�,�@P���@�
xA���t�V�U�RP�E�PQ�(�@��t�f�E�M�3�^�N������A��U���SV�u3�;�t9]t8u�E;�t3�f�3�^[��u�M��N���E�9Xu�E;�tf�f�8]�t�E��`p�3�@�ʍE�P�P���YY��t}�E���~%9M| 3�9]��R�uQVj	�p���@���E�u�M;��r 8^t���8]��e����M��ap��Y����n���*8]�t�E��`p����:���3�9]��P�u�E�jVj	�p���@���:���뺋�U��j�u�u�u������]���������Q�L$+����#ȋ�%�;�r
��Y���$�-���j舐��YË�U���VW�u�M��WM���E�u3�;�t�0;�u,��m��WWWWW��em�����}�t�E�`p�3���9}t�}|Ƀ}$ËM�S��}��~���~�E�P��jP�b���M���������B����t�G�ǀ�-u�M���+u�G�E���K���B��$�9��u*��0t	�E
�4�<xt
<Xt	�E�!�E�
��u��0u�<xt<XuG�G��������3�u���N��t�˃�0���t1�ˀ�a����w�� ���;Ms�M9E�r'u;�v!�M�}u#�EO�u �}t�}�e��[�]��]ى]��G닾����u�u=��t	�}��w	��u+9u�v&�<l���E�"t�M����EjX��ƉE��E��t�8�Et�]��}�t�E�`p��E���E��t�0�}�t�E�`p�3�[_^�Ë�U��3�P�u�u�u9T#AuhA�P�����]Ë�U�����A3ʼnE�j�E�Ph�u�E���@��u���
�E�P�\Y�M�3��J���Ë�U���4��A3ʼnE��E�M�E؋ES�EЋV�E܋EW3��M̉}�}�;E�_�5d�@�M�QP�֋��@��t^�}�uX�E�P�u�օ�tK�}�uE�u��E����u�u�袻����YF;�~[���wS�D6=w/���;�t8����-WW�u�u�j�u�Ӌ�;�u�3���P�L��Y;�t	������E���}�9}�t؍6PW�u��Z�����V�u�u�u�j�u�Ӆ�t�]�;�tWW�uSV�u�W�u���@��t`�]��[���@9}�uWWWWV�u�W�u�Ӌ�;�t<Vj�=���YY�E�;�t+WWVPV�u�W�u��;�u�u��JJ��Y�}���}�t�MЉ�u����Y�E�e�_^[�M�3���H���������Q�L$+ȃ����Y�Z���Q�L$+ȃ����Y�D���U����}��u��u�}�M�����fofoNfoV fo^0ffOfW f_0fof@fonPfov`fo~pfg@foPfw`fp������Iu��u��}���]�U����}�u��]��]�Ù�ȋE3�+ʃ�3�+ʙ��3�+���3�+����uJ�u�΃��M�;�t+�VSP�'������E�M��tw�]�U�+щU��+ى]�u�}�M��E�S;�u5�ك��M�u�}�M��MM�UU�E+E�PRQ�L������E��u�}�M����ʃ��E�]��u��}��]Ë�U��j
j�u�,�����]Ë�U���S3�VW9]���u�M��CG��9]u.��g��SSSSS��^g����8]�t�E��`p�������};�t˾���9uv(�g��SSSSS��g����8]�t�E��`p����`�E�9Xu�uW�u���8]�tD�M��ap��;�E��M�QP�@�E����M�QP�.��G�Mt;�t;�t�+���3�_^[�Ë�U��V3�95T#Au99uu�f��VVVVV��}f���������'9ut܁}���w�^]��V�u�u�u�����^]��jh��@���3��]3�;���;�u�f���WWWWW�f�������S�=�,Au8j�z��Y�}�S��z��Y�E�;�t�s���	�u���u��E������%9}�uSW�5�#A�4�@���装���3��]�u�j�zy��YË�U���(��A3ʼnE��pAVtj
�l���Y�����tj� ��Y�pA�������������������������������f������f����f�����f�����f������f�����������u�E���Dž0��������@�jP���������jP�1������������(�����0���jDž���@������,����\�@��(���P�X�@j���̋�U���SVW3�jSS�u�]�]������E�#ƒ��U��tYjSS�u�����#ʃ����tA�u�}+����;����Sj�<�@P�H�@�E���u�td����id���_^[��h��u�YY�E���|
;�r�����P�u��u��������t6�+��xӅ�wϋu�u��u��YY�u�j�<�@P�D�@3���d���8u��c���
���u��;�q|;�skS�u�u�u���#ƒ�����D����u��YP�8�@�����H��E�#‰U�u)�c���
�c����0�@��u�#u������S�u�u�u肩��#ƒ��������3�������U��S�]V�u������+A������0�A$�W�y�������@tP���tB��t&��t��u=�I��
�L1$��⁀���'�I��
�L1$��₀���a�
�I��
�L1$�!���_^[u��]���%�@]�U��EV3�;�u�pb��VVVVV��a����jX�
�
X*A�3�^]�3�PPjPjh@h��@� �@�xAáxAV�5@�@���t���tP�֡tA���t���tP��^Ë�U���SV�u�M��MA���]�;�sT�M胹�~�E�PjS�s���M���
����X����t������}�t�E�`p�����E胸�~1�]�}�E�P�E%�P�<���YY��t�Ej�E��]��E�Y��Ha���*3Ɉ]��E�A�E�j�p�U�jRQ�M�QV�p�E�P�����$���o������E�t	�M�����}�t�M�ap�^[���������������U��WVS�M�tM�u�}�A�Z� �I�&
�t'
�t#����:�r:�w�:�r:�w�:�u��u�3�:�t	�����r�ً�[^_����������������̋D$�L$ȋL$u	�D$���S��؋D$�d$؋D$���[��%��@(�6�P�d�z����������,�<�T�j�|�����������.�B�N�f�~���������������$2@Xhv~��������.H^x������&8Jr��������@�?@ǫ@��@v@��@�@1�RLp�p� Ah A(null)(null)EEE50P( 8PX700WP  `h````xpxxxx	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~EncodePointerKERNEL32.DLLDecodePointerFlsFreeFlsSetValueFlsGetValueFlsAllocCorExitProcessmscoree.dllruntime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...<program name unknown>Runtime Error!

Program: ccsUTF-8UTF-16LEUNICODE�����������������������������EEE���00�P��('8PW�700PP� (����`h`hhhxppwpp         (((((                  H����������������������          h((((                  H����������������������                                 H�����������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~�����������������������������������������������������������������������������������������������������������������������������HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$Fatal error in launcher: %s
rbFailed to open executableUnable to find an appended archive.Unable to read from file#!Job information querying failedJob information setting failedstdin duplication failedstdout duplication failedstderr duplication failedUnable to create process using '%s'Failed to get exit code of processFailed to find shebangExpected to find terminator in shebang lineExpected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to be able to allocate command line memory"%s" "%s" %sH�A��@RSDS���z~-�C��"Iu�G�c:\Users\Vinay\Projects\SimpleLauncher\dist\t32.pdbPVDhl������������l@�����������*@������������@������������@�����������#!@�����������.#@�����������=$@�����������/%@�����������w&@�&@������������;@�����������u?@������������B@�����������'E@����6E@������������F@�����F@������������J@������������X@������������[@�������������`@�`@�����������b@������������c@lc@������������g@������������p@�����������1t@������������u@�����������n~@�����������}�@������������@'�@�����������۪@�@�����������.�@�����������k�@o�@������������e�@�������������@�����������k�@�����������-�@�������������@�����������Y�@��@�����������e�@��@�������������@����(�6�P�d�z����������,�<�T�j�|�����������.�B�N�f�~���������������$2@Xhv~��������.H^x������&8Jr��������ExitProcessqSetInformationJobObject�GetCurrentProcess�WaitForSingleObjectgGenerateConsoleCtrlEvent�GetCommandLineAAssignProcessToJobObject�GetExitCodeProcess�CreateProcessA�QueryInformationJobObject�CreateJobObjectAdGetStdHandleGetLastError-SetConsoleCtrlHandlerGetModuleFileNameA�DuplicateHandleRCloseHandleKERNEL32.dll�HeapFree�HeapAlloc�EnterCriticalSection9LeaveCriticalSection�TerminateProcess�UnhandledExceptionFilter�SetUnhandledExceptionFilterIsDebuggerPresentrGetCPInfo�InterlockedIncrement�InterlockedDecrementhGetACP7GetOEMCP
IsValidCodePageGetModuleHandleWEGetProcAddress�TlsGetValue�TlsAlloc�TlsSetValue�TlsFreesSetLastError�GetCurrentThreadId�HeapCreate�VirtualFree�DeleteCriticalSection�VirtualAlloc�HeapReAlloc�Sleep%WriteFileoSetHandleCount�GetFileTypebGetStartupInfoARtlUnwindgMultiByteToWideChar�ReadFilefSetFilePointer`FreeEnvironmentStringsA�GetEnvironmentStringsaFreeEnvironmentStringsWWideCharToMultiByte�GetEnvironmentStringsW�QueryPerformanceCounter�GetTickCount�GetCurrentProcessIdyGetSystemTimeAsFileTime�GetConsoleCP�GetConsoleMode+LCMapStringA-LCMapStringWfGetStringTypeAiGetStringTypeWGetLocaleInfoA�InitializeCriticalSectionAndSpinCount<LoadLibraryAWFlushFileBuffers�CreateFileA�SetStdHandleWriteConsoleA�GetConsoleOutputCP$WriteConsoleW�HeapSizeSSetEndOfFileJGetProcessHeap�,A�,AN�@���D��@��@
		


!
5A
CPR
S
WYl
m pr	�
�
�	��
�)�
���
���                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZA�`�y�!�������@~�����ڣ ��@����ڣ ��A��Ϣ���[��@~��QQ�^� _�j�2�����1~����@����C0A0A0A0A0AXA��@x�@��@�A8A8AA���������[@`�@4�@	�@
p�@D�@�@��@��@��@d�@,�@��@��@��@H�@ �@!�@"x�@xd�@yT�@zD�@�@�@�0�@�����
x
��@��@��@��@��@��@��@��@��@��@��@��@ �@�@�@�@�@�@�@�@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@x�@p�@��@h�@`�@X�@L�@D�@8�@,�@(�@$�@�@�@��@	�A.TAX)AX)AX)AX)AX)AX)AX)AX)AX)AXA. ��p��PSTPDT�AA��������������������;Zx����0Nm����:Yw����/MlK(�p�������������0�eH�`�x�������	�B���D(�F���Nh�(T�%��y��x�h��h�H�Z�( @...GGGWWWiiiuuu����������������������������������̀�ww����ww||�����ww��������wwww��������ww��������f�wwwww|�����f�wwwwww����ff�wwwwww�����ff��wwwww���ffl����ww����ffffff��w����ffffffl�w������ffffff�w�����ffffff�|����������ff��������ffff�������ff��R\I���lffl���)����ff�ح���������2L���������18�������Ϥ"������A<��������ΣT��π�����U���������������������������؀����������������������?������������������?�?�?�?�?�?�������������( 444MMMSSSzzz������������������������������p�p�����{p{��f���fko�f�����_fffk�_�fff��[���f}��UUU�fL4�UUU_kJqO���_�~�'�[U_����U�����������wwwww{~����������������( @%%%+++000===AAAIIIMMMQQQVVVYYY]]]~dFgggjjjmmmrrruuu}}}�u?�z=�~;�gE�kC�oA�r@��:��I��b��pƏKУk(��,�1�?�5�<�\�C�K�Q�s�U�[�c�b�����������������������������������������ð����������������������������������������������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$"  _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_L'%$"_I_MMMMMMJJ__('%%_I_CEMIJJMEM_(''*_I_?BMDJEMDMF_)(-LI_MMMCMMMMM_________<____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/
N______MMMMJIDAI_9/	HJJMMJMMMJ??BAI_A7503	IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O;
@__C_C?J?AJI_?A_DJJI@O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ�����?������������������?������������������?�( 444MMMRRRYYY~eGuuu}}}�x>�iE�rC��E��~7�?�H�V�b�x����������������������������������������������������������������������������������/!P7pL�c�yϏ���1��Q��q�������������/Pp"�,�6�@�J�[1�qQ��q�������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������!%///* !*/"(%%'%/)
/!#''////+/+"*(/
/

!%(/
(

  (*/(///)
*/
	)*

	/"/////	/+///#
		+ !%//
+"*+'#+//+'!%*++$++!+!    !!!<(0` !!$&			&"

 ���W���������������������������������ܱ��Nj+<<</	&&&#&[[[?6666��׏��������������������������������������������Ҟ���BBB3"


mmm3����,����!!!4777&�����������������������������������������������������ʟ���}���}___E���OpppD���P,)+3���Z2226DDD(���,�����###5��������������������������������������������������������������������������������չ�������������5�������,�������������������������������������������������������������������������������������������������������������,������Ì222"��Є�����������������������������������������������������������������������������������������������������&&&2����   4888&�������������������������������������������������������������������������e��?��4��/��+���.���R�������ӎ����������$$$5��Ď���������������������������������������������������������������������D��@��;��7��3��/��*���&���"�����������������������������������������������������������������������������������������W��G��C��?��;��6��2��n������f��0�������������nj333"��ӄ��������������������������������������������������������������������O��K��G��B��>��:��5��p������i��$�����������!!!4888&���������������������������������������������������������������������S�N��J��F��B��=��9��5��0��,��(���������������%%%5��ǎ���������������������������������������������������������������������V�R�N��I��E���������������������������������������������������������������������������������������������������������ѹ���|J��q?��o@�����Z�U�Q�M��I��D��@��<��7��3��/��+���&���"���-����������������Ɍ444"��ք�������������������������������������������������̴��w<��u=��s>��q?�����]�Y�U�P��L��H��C��?��;��7��2��.��*���%���!����������������"""4888&���������������������������������������������������d��y<��w=��u=��s>�����a�\�X�T�P��K��G��C��>��:��6��1��-��)���%��� ���O������������Ñ%%%5��ʎ���������������������������������������������������A��{;��y<��w=��t>�����s�`�\�W�S�O��J��F��B��>��9��5��1��,��(���$���(����������������������������������������������������������������������9��|:��z;��x<��v=�������s�_�[�W�R�N��J��E��A��=��8��4��0��,��'���#�������������̌555"��ل���������������������������������������������������9��~9��|:��z;��x<���o�����������������������������������������m��8��3��/��+���'�����������"""4:::&������������������������������������������������������8���9��~:��|;��z;��w<��u=��s>��q?��o@��mA��kB��iC��gC�dD��uZ������;��7��3��.��*�������������Ǒ%%%5��̎���������������������������������������������������È>���8���9��}:��{;��y<��w<��u=��s>��q?��o@��mA��jB��hC��fD�~dE��uZ�����?��:��6��2��5�����������������������������������������������������������������������������Оa���7���8��9��}:��{;��y<��w=��u>��r>��p?��n@��lA��jB��hC��fD�}dE�����B��>��:��5��^������������ό555"��܄����������������������������������������������������������ѳ�„7���7���8��9��}:��{;��x<��v=��t>��r?��p@��n@��lA��jB��gC��eD�����F��A��=��9������������"""4;;;&�����������������������������������������������������������������ŌC���8���9��~9��|:��z;��x<��v=��t>��r?��p@��mA��kA��iB��gC�����I��E��L��������������ɑQQQJnnn����������~~~�������������������������������������������������������������������������������������������Į��q?��o@��mA��kB��iC�������������������������HHH�"""���������������vvv������������������������������������������������������������������9��~:��{;��y<��w<��u=��s>��q?��o@��mA��kB�������������:::�'''�___���������sss�ttt��������������������������������������������������������������8�Ϧu�����ǣv��y<��w=��u=��s>��p?��n@��lA��������888T����---6fffnddd�%%%�"""�����OOO�SSS������������������������������������������������������������ċD�ҧu�����ʤv��{;��y<��v=��t>��r?��p?��xM�����<<<�MMM�������̑&&&5����;;;�<<<�xxx�QQQ�;;;�KKK����������������������������������������������������������8���8��~9��|:��z;��x<��v=��t>��r?�̷������999�����������������������VVV�###�)))�444��������������������������������������������������������������������ѳ�͝b���@��~9��|:��z;��}C���g��˶����Ӎ���������󑑑�����ZZZ�lll�;;;�!!!�"""�)))�___���������������������������������������������������������������������������������������&&&2����:::�ppp�{{{�___�WWW�WWW�:::�!!!�"""�***�www�������������������������������������������������������������������"""4888&���,������̑999����Ԗ���JJJ�|||�lll�:::�"""�BBB�XXX�|||��������������������������������������������������������������������$$$6�������,��������������������������������uuu�KKK�CCC�@@@�...�www����������������������������������������������������������������������������������*������Ҍ666"������������������������KKK�aaa�LLL�WWW��������������������������������������������������������������@��������$����"""4;;;&���������������������nnn�fff�!!!�$$$�999������������������������������������������������������������444]ttt|������ȇ������ɑ&&&5��Ў������������������������vvv�mmm�VVV�{{{�OOO����������������������������������������������������������������ڥ�����������������������������������������������aaa�CCC�����ppp�������������������������������������������������������������������������ό555"��ބ����������������������������������|||�MMM�����fff���������������������������������������������������������������"""4;;;&�������������������������������������������\\\�����������������������������������������������������������������Ǒ%%%5��Ύ�����������������������������������������������������������������������������������������������ݧ�����������������������������������������������������������������������������������������������������������������ܦ������͌555"��ۄ�����������������������������������������������������������������������������������ۥ����"""4:::&������������������������������������������������������������������������������������ڤ������Ñ%%%5��ˎ�����������������������������������������������������������������������ܤ��������������������������������������������������������������������������������������������������ׇ
������ww���?ww�?�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww��ww��ww��ww��ww��ww��ww�?�ww��ww���ww���ww( @ ����������������������������������!!!0\\\JeeeQ666D555A0$
�������v�H��<��6��0��2��\�������7���q��������������������ڴ���vvvj&&&D1"����g�L��F��@��;��5������?��������������������������������������������������к����V�Q�K��E��?��9������(�����������a���V�������������������������������������[�U�P��J��D��>��8��2��-���������uuun{{{j���������������������������������������`�Z�T�O������������������������������������������������������������������������V��o@��lA�����b�_�Y�S�M��G��B��<��6��0��+���%���<���������������a���V�����������������������m��t>��q?��n@�����b�b�^�X�R�L��F��A��;��5��/��)���$���Y����������wwwn}}}j����������������������~C��v=��s>��p?�����b�b�a�]�W�Q�K��E��@��:��4��.��(���+���������������������������������������{;��x<��v=��s>�����b�b�a�[�V�P��J��D��?��9��3��-��'��������������a���V����������������������~:��{;��x<��u=���p���������������������������������r��=��7��2��,����������yyynj�����������������������9��}:��z;��w<��u>��r?��o@��lA��iB��fD�}dE�|cE�|cE���i���B��<��6��1��������������������������������������?��9��}:��z;��w=��t>��q?��n@��kA��iC��fD�}cE�|cE�}dF�����G��A��;��=�������������a���V���������������������ңi���8��9��|:��y<��v=��s>��q?��n@��kB��hC��eD�|cE�|cE�����L��F��@��m����������zzzn���j�������������������������ʓP���8��~9��{;��y<��v=��s>��p?��mA��jB��gC�eD�|cE�����P��J��\��������������������������������������������������������������������������������¯��mA��jB��gC�~dE��������������������������a���V��������������������������������������}:��z;��x<��u=��r?��o@��lA��iB��fD���������|||n���m���������������������������������������9��������w=��t>��q?��n@��lA��iC�������������JJJ��������������������������������������������őP��������y<��v=��t>��q?��n@��~Y������������VVV�???�www�����iii�����������������������������������Ρk���A��|;��y<��v=��yF���p��������>>>3@@@y����~~~obbb�000�kkk�@@@������������������������������������������������������������������---U��������������<<<�&&&�[[[�������������������������������������������������������6���uuu�sss�WWW�III�$$$�&&&�qqq�����������������������������������lllg|||s���4����bbb�hhhƑ�������UUU�000�QQQ�}}}��������������������������������---{bbb�����(����������������������iii�LLL�BBB������������������������������������������������������a���V����������������ggg�+++�NNN�������������������������������������������|||n���j����������������]]]�ttt�kkk�������������������������������������������������������������������rrr�www���������������������������Ӧ�������a���V���������������������������������������������������Ӧ����zzzn���j�������������������������������������������Ӧ�����������������������������������������������������������ˉ��?������������������?�?�?���������������?�(  ������C�������������������﫫�o���������I�����������������������������������������ਨ������������S��=��?���������������������������������_�Q�F����4���������������������������������a�Z��������������������������������������м���oE�����c�a�X�M��B��7��0��������������������~I��q?�����c�`�V�K��@��5��8��������������������z;��u=���q�����������������v�>��3����������������������E��y<��t>��n@��iB�~dE�}dF�������G��H������YYY�uuu����������ġ���=��x<��s>��mA��hC�}dE�}eG�����S���������444�|||����������������������������gC�}cE�������������������������MMM������������������~>�����q?��kA��iG������������������RRR��������������¢���G��u=��xK�ʺ��������������������������������������������������������������������������������������������������������������������������������������������~�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A  �(  �h00 �%   � h<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD�
0A0Z0z0�0�0�0�0�1�12>2T2`2v2�2�2�2�2�2�23-3J3g3v3�3�3�3�3�3�3�3�3�344%4K4t4|4�4�4�4�4�45F5�5�5�5:6B6W6b6�6�67+7z7�7�7�7�7I8O8o8�8�8�899-9:9F9V9]9l9x9�9�9�9�9�9�9:A:P:Y:}:�:@<�<a? �0�0�0�0�0�1+2�2�3�4A5f5w5~5�5�5�5�5�5�5	6C6H6O6U6�6�6�6�6�6�6�6�6�67777"7*727>7G7L7R7\7e7p7|7�7�7�7�7�7�7�7�8�8�9$:B:h:�:�:�:A>1?0��0�01�2�4�4�4�4�455
55)5�566-646L6x6�6�6�6A8j8K9�9�9;#;];j;t;�;�;�;�;�;�;�;<<8<o<�<�<'=D=�=�=>�>�>�>�>�>�>�>�>?4?=?C?L?Q?`?�?�?�?�?@D�0�01j1�12g2~2�2�2�2�2
33+323F3M3t3z3�3�3�3�3�3�3�3�3�3�3
444(464<4H4N4[4e4l4�4�4�4�4�4�45E5K5u5{5�5�5�5O6r6|6�6�67
7(7-757;7B7H7O7U7]7d7i7q7z7�7�7�7�7�7�7�7�7�7�7�7�7�7�7�7888 8&838S8Y8u8]9b9p9}9�9�9�9�9�9�9�9:#:):2:E:i:�:;,;1;t=�=�=�=�=�=�=�=�=�=�=>
>>>!>>>D>O>T>\>b>l>s>�>�>�>�>�>�>�>�>�>�>�>�>?q?P�
33L3r3�3�3�5�5�5�5
6b6<7D7\7t7�7�7;8P8�8�8�899>9Y9_9h9o9�9�9�9:::+:5:<:G:P:f:q:�:�:�:�:�:;;;;@;K;P;n;<,<I<�<�<�<�<�<�<�< =%=M=r=�=�=�=�=�=>,>P>d>�>�>�>??\?f?�?�?�?`�0*0|0�0�0�0�0111U1^1j1�1�1�1�1�1�1�1�2�23#3r3�3�5�5�5�5[6~6�6�6�6�67&7E7U7g7l7�7�7�8�9�9r:�:1<�<�<�=�=->:>??�?�?p�+0Z0�1V2h23(3H3b3�3�3R4�4�4�4�45=566A6�6�6�6�6�7�7�7�7)848>8O8Z8
::&:,:1:7:�:�:�:�:�:�:�:;8;�;�;�;�;�;�;<<E<h<u<�<�<�<�<�<�<�<=+=D=b=�=�=�>�>�?�?�D�0�031�2�3j4�4�4�45�5�56�6�6"7<7V7a79:9�:l;�;�;<-<S<�?�h�02J2o2O4n6r6v6z6~6�6�6�6�6�6�6�6�6�6�6/7_7�7�8�8G9:�:�:�:�:�:�:�:�:;�;-<:>L>^>�>�>�>�>�>�>�>�<�1�1�1�1�1�122-2S2q2x2|2�2�2�2�2�2�2�2�2�2�2�2V3a3|3�3�3�3�3�3�3
4444 4$4(4,404z4�4�4�4�4�5�5676z6�6�6�6�6�6�6�6
737Q7X7\7`7d7h7l7p7t7�7�7�7�7�768A8\8c8h8l8p8�8�8�8�8�8�899999Z9`9d9h9l9X:]:o:�:�:�:;#;�;�;�;�;�;N<�<�<�<�<�<�<�<�<�<A=F=�=�=�=�=�=�=> >&>�>�>�>�>�>�>??"?1?7?F?L?Z?c?r?w?�?�?�?�?�d	0H0O0U0|0�0�0R1X1�1�1�1�1*202<2�2�2�2�2"3,35�5�56 626E6W6�6�6�9�9�9:9:D:[:�:�:L;X?�?�?�xA0[0d0�0�0�0�01'1B1b1�1�12 2{2�2�2�2�2333�3�3�3�3,4K56{6�6�6�6�6�6�6�6�6�6�67-7�7@8�:�:;$;P;�;�;u<�<�?�8080{0�0�0�0�0�1�1"2)2�2�2343�3W4q4w4|4�4�4�4v6�P1T1X1\1`1l1p1�1�1�ld6h6�6787X7x7�7�7�7�7�7888X8x8�8�8�8�8�89$9(9H9h9t9�9�9�9�9:0:L:P:l:p:�:�:�:�:�:;0;P;p;|;�;�;�;�00�2�208(9�9�9�9�9�9�9:::::::P;\;d;l;t;|;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;<<`=d=h=l=p=t=x=|=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=�=>>>>>>>> >$>(>,>0>4>8><>@>P>X>\>`>d>h>l>p>t>x>|>�>P?T?python3.4/site-packages/pip/_vendor/distlib/t64.exe000064400000271000151735047410016037 0ustar00MZ����@���	�!�L�!This program cannot be run in DOS mode.

$x�<�r,<�r,<�r,���,=�r,5��,�r,5��,Q�r,5��,5�r,5��,?�r,<�s,]�r,5��,=�r,5��,=�r,5��,=�r,Rich<�r,PEd�1�R�"	��$)@�*w@�(`�PP�	����.textk�� `.rdata�+�,�@@.data�6�@�.pdata�	P
@@.rsrc�P`R@@.reloc��n@B��umL��I�SM�CM�K H��HH��H3�H��$0L�ʺI�CD�B�H�L$0H�D$ ��+�	L�D$0H�H`H�P����������H�\$H�t$WH�� �r�3�H��L�ًօ�x5�bLc�I������L��H��t�F��A;ID�I��A+��y�H�t$8H��H�\$0H�� _�H��H�XH�hH�PVWATAUAVH��@L��L���H�"H�H3�H�h����;�H���������H�L$xD�E3��H�L$x�xH�L$x������D��;�L�E3����wL�L$xD�uI��A�I����D�ML�vH��I�����H��H;�tH�L$ D�EH���&�A+����H����H�L$xA���;�H��L�E3����L�L$xL��I��H���nL�A�H��H���j�����H���H;�H��������H�L$ H��A�蜏+�H�����+\$0H�L$x+\$,��H�E3����xL�L$xA�I��I������H���H;�H�����s���N�\#�M;�r���fA9t
M+�M;�s��I��H�L$x�YL�\$@H��I�[0I�k@I��A^A]A\_^��H�\$H�t$WH��@H��H����H�#�D$0�L��H��L��H�׉t$(�d$ �Y��؅�u�5���D�H�t$X��H�\$PH��@_��H��(��u�
� ��t3����H��(�H�\$WH��pH��3�3���L��$�A��H��H��$��	H��H�D$ �����t��$��u��3�H�q��,�����$�0L��$�A���	H��
�H�^������3�H�L$pD�Bh�Z������D$ph�,�H��$�H�����H�=�������������H��$�H���s���H�4�����������H��$�H���J���H�+����d���H�
�����DŽ$����L�\$PL�\$HH�D$pE3�H�D$@H�d$8H�d$0�d$(E3�H��3��D$ �I�H���L�Nj����D�\$`H�T$PH��D���H�L$X�S�H�L$P�����H�L$PH��$����H����������$�������H�\$H�l$H�t$WATAUH��`H�:�H3�H��$P����8"t� ��"H����H���3�H;�u	L�%x��L�`����;�tI��A�$@:�u�L�-2�3�I��D��o��="��uL�-H��A�lH�L$@H����P�����H;�H���H�������H��H��H��H;�s�8
t�8
t
H��H;�r��H��H;���H������|���@�/���;�tH��@8.u�>#��H������O��������;�t
H�Ɗ@:�u�>!��H������#�������;�t
H�Ɗ@:�u�3�I��I��I�ɍP�H��H��L�A�I���I��H��H��L�I���H��I�\H���H���H;�H��@�ŋ����L�d$0L�
��L��H��H��L�l$(H�t$ �NH�������H��(��������������������ff�H;
!�uH��f����u��H���y�L��M�K H��8I�C(I�C�I�c���"H��8���@SH�� H���AH�����1H�CH���H�H���H�KH�
�H;�t����hu�y/H�H�OH9CtH�C����
Au	�Z&H�CH�C���u����C��o�H��H�� [����@SH��@�=Hc�uH�G�X���VH�L$ 3��&���H�D$ ��~L�D$ ����2D���H��@D�XA���|$8tH�D$0����A��H��@[���H��t7SH�� L��H�
�3�\���u� H��"������H�� [����@SH�� �d$@L�D$@�w3H��H��u9D$@t��H��t���L$@�H��H�� [����H�\$H�t$WH�� H��H���w|�H��HE�H�
!H��u ��9��7���4H�
�L��3���H��H��u,9ctH����9��t
��>��3�H����9��3�H�\$0H�t$8H�� _���H����@SH�� � ,���u��;�L�HcȺ��+��<H��H��u$�PH�ˉ�+��<H��H��u��x3�H�?�H�H��0H��H��t	H����E3�H�6�E�HI��L�LI��H����I��Hk�XL�I���tI���tM��u�����I��H��0I��u�3�H�� [���H��(�?�=�t�5=H�
"H��(����@SH�� H��H�
��H;�r:H��H;�w.H��H��������*H+�H��H��H��H��?�L�`A�k�
H�K0���H�� [��@SH�� ��H��}���2A�k�
H�J0���H�� [����H��(H��H;�r7H���H;�w+�qH+�H��������*H��H��H��H��?�L��?�
H��0�_�H��(���H��(��}�r���?�
H�J0�6�H��(���:�t
H�����u�:�uH���3����M��t
8t	H��I��u�I��H�H#��H�\$H�t$H�|$ ATH��@H�d$0E��H��H��3�H������u'�t�H�d$ E3�E3�3�3��3���3�H������u'�A�H�d$ E3�E3�3�3��V3��3�8����u$��H�d$ E3�E3�3�3��$3��g�SDH��H�D$PH��u���3��F�>u"���H�H�L$0�E��3��L��E��H��H���7AH��H���,���H��H�\$XH�t$`H�|$hH��@A\����@SH��0I��L��H��H��u%�WH�d$ �E3�E3�3�3ɉ�k���$A��H��I���~���H�H��t3����H��0[��H�\$ UVWATAUAVAWH��03�L��L��H�L$xM��M��H��H��$�H��L;�t)L;�t$L;�u9��H�\$ �E3�E3�3�3���3�H��$�H��0A_A^A]A\_^]�H��$�H;�t3�H��I��L;�v)H���tL��3�I����OH��H;�t�3�H��I��L;�w�I��I��GH��tD�O$�A�D�L$pH���g�GA����taLcwE��tS�/I;�DB�E��L;���L�H��H�L$x�ND)wA��L�t$xH+�HH��$�D�L$pL�H+��L�t$xE��I;�rhE��t 3�I;�vA��E��A���	H��D��I��D+��
D��I;�EG�A��H;�wuH���ME��L�t$xI�֋��uL�������tw��H+��s���H���zC���tdH��$�H��t*A�D�O$H��I��H��D�L$pL�t$xH��$�H������H���t
L��3�I���gN��H�d$ �"�����O H+�3�H��I�������O��I���������H��H�XH�pH�xL�` AUH��0I��M��H��L��M��trM��tmH�\$`H��u4H���t
L��3���M�^�H�d$ E3�E3�3�3��s3��1H���G����H�\$ L��M��H��I������H��H�����H���3�H�\$@H�t$HH�|$PL�d$XH��0A]����H��8L�L$ M��L��H���,���H��8����H��H�PH�HL�@L�H SVWATH��8H��3ۋ��H;���;�u'��H�\$ E3�E3�3�3�������H;���;�u'�i�H�\$ E3�E3�3�3������L�d$p�M�����G@��H���K���t*���t%Hc�H��H��L����Hk�XI�H�
]��H�
T�H��L���B8u%���t���tHc�H��H����Hk�XI��A8�t"��H�\$ E3�E3�3�3�����;�u*H���L��M��E3�H�T$hH���	��H�׋��M�H��������H��8A\_^[����H��H�XH�hH�pH�x ATAUAVH��0H��H��u'�.H!\$ E3�E3�3�3���D���X�J�{Lc�}�c3�A��D�B�M��xҋS��u
+s����;L����+k��t<I��I��H����I��Hk�X�D�tH�C�
�8
u��H��H;r�u������x��y��Z��������{u3��+{M��M��{I��A��K��Mk�XA�D�tz3�A��D�B�6M;�u#H�C��H��
�8
u��H��H;�r��c
sG�CE3���A���M�������;�w�Ct	�c
��s�{$H��J��A�Dt��+��D5H�\$PH�l$XH�t$`H�|$hH��0A^A]A\��H�\$H�L$WH��0H��3�H������u%�q�H�d$ E3�E3�3�3������\����H�������H��������H�\$HH��0_�H�\$H�l$H�t$WH�� �AA����H�٨�u�����j���3�AA��u	������H���3D�[E��y
A��D�[�A��tA��tA��
r�C$H���9HD�Nj֋��K���@�ōE�H�\$0H�l$8H�t$@H�� _���H�\$H�t$H�L$WH��0A�؋�H��3�H������u%�K�H�d$ E3�E3�3�3��`���R��t/��t*��t%��H�d$ E3�E3�3�3��-��������D�Ë�H�������H���{�����H�\$HH�t$PH��0_��H�\$WH��0��H��H��u#�H!\$ E3�E3�3�3������F�A�t:�i2H�ˋ��MH���G���lL��y���H�K(H��t
��H�c(�c��H�\$@H��0_����H�\$H�L$WH��0H�ك�3�H������u$��H�d$ E3�E3�3�3��+���&�A@t�a���H��������H���s��H�\$HH��0_���H�\$WH��0�MZf9^��uVHc���H�
N��H��8PEt3ۉ\$@�;�f9Ht3ۉ\$@�(���w3ۉ\$@�3�9���É\$@�3ۉ\$@����$��u"�=�t�~+��L)����%��"��u"�=�t�S+��!)���%�T��+��y
��%���H��
�@RH�y��<Q��y
���$�)N��y
�	��$����%��t����$L�2L�3H��
�����D$ ��u����'��'����|$@u����'���'���H�\$HH��0_��H��(�SH��(�V�����H�L$H��H�
u����L�`�L�\$XE3�H�T$`H�L$X�ӭH�D$PH�|$PtAH�D$8H�D$HH�D$0H�D$@H�D$(H� �H�D$ L�L$PL�D$XH�T$`3�聭�"H��$�H��H��$�H��H�y�H��H�C�H��$�H�D���	���H���H�D$hH���H�D$p��������bS3�r�H�
��]��=^�u
��:S����	�H��.�H�Ĉ���H��H�XH�hH�p �HWH�� H��H���>C�KHc�u��	�K ���4��@t
�~�"��3���t�{����H�C��H��K�C�{�����C�u/�7�H��0H;�t�)�H��`H;�u���-];�uH����\�C���+H�S+kH�BH��C$��;�C~D�ŋ��f[���W�� �K�?������t#���tH��H��H����H��Hk�XH��H�
��A t3ҋ�D�B�}RH������H�K�D$0���H�T$0��D����Z��;������D$0H�\$8H�l$@H�t$HH�� _���̅�~LH�\$H�l$H�t$WH�� I��I���@��L��H��@�����`�?�t���H�\$0H�l$8H�t$@H�� _����H�\$UVWATAUAVAWH���H�B�H3�H��$�3�H��H�L$hH��H�L$xI��M��D$`D��D$TD��D$H�D$X�D$P��E3�I;�uA�{3�E3�E3�3�3��H�\$ �8�$�tH��$��������A���C@L�
�����H���@H�{�A;�t(���t#Lc�L�
���I��A��H��Mk�XM��@4�
L��L�
���A�@8u)A;�t���tHc�H�ƒ�H��Hk�XI��@4�B8�tA�3�E3�E3�3�3��H�\$ ��
8�$�tH��$�����A���1E3�I;�t�@�/A��D�T$@D�T$DA��L��$�A:���H��$�A�H��A;�H��$����E�<XwH��B��@����A��Hc�Hc�H��B��
`����T$\��A;��y�������/�������������������<@�Ń�d�~����A�@��C����E�.��G�%��Stm��X����Zt��a���c���HI�EI��I;�t/H�XI;�t&A���s��D$P+���D�T$P�H�����A��0uA��I�]E;�A�ƹ���D�I��A���I;��D$PHDH�H����A��0uA��I��A��t,E�M�H��$�H�L$DM���3]E3�A;�t�D$X�A�E��D$D��$�H��$��M�D$p@�� A��@E;�H��$�A���-A��k��e���g~σ�i����n����o����pte��s�������u����x���'�S��fD9t	H��A;�u�H+�H��!I;�HD.�H���
��D8tH��A;�u�+ˉL$D�A�A����D$`A�E��y`Q�D$L0A�Q�D$M�SA�E��yDA��	�=I�}I����YE3�A;��x���A�� tf�7��7�D$X�lA��@A�
�T$HA��rA��s
M�EI���.I��A�� tA��@tM�E��E�E��A��@tMcE��E�E�A��@t
M;�}I��A��A��r
A��rE��E;�}A��A��E;�EO�D�|$`I��H��$�H���#ʉL$HA��A��A;�M;�t 3�I��Ic�H��L���B0��9~ALjH����H��$�A�����+�H��A��	�D$D�A;�t	�;0�H��D$D�0�u@��guAA��9E;�EO�A���~)A��]Hc��$H��$�H��tH�؋��A��I�EH�
��I��@��Hc�H��$��xH�L$xD��H�L$0�L$pL�ƉL$(H��$�H��D�t$ ��A��3���tD;�uH�
���0H�T$xH���3�@��gu;�uH�
w��H�T$xH��Ѐ;-uA��H��H���VE3҉D$DD9T$X�KA��@t1A��s�D$L-�A��t�D$L+��|$H�A��t�D$L ��|$H�t$TH�l$h+t$D+�A��uL�L$@L�ŋֱ �T���L�L$@H�L$LL�ŋ��YA��tA��uL�L$@L�ŋֱ0�#����|$D3�9D$Ptu;�~qH��D�MH��$�H��$�A���H����XE3�A;�u2��$�A;�t&L�D$hL�L$@H��$��YE3�A;�u�H�l$h�#H�l$hA�ljD$@�L�L$@L�ŋ�H����XE3ҋD$@A;�|A��tL�L$@L�ŋֱ �m���E3�H��$�I;�tH���Q�E3�L��$�H��$��t$@�T$\L�
��A�@�/A:��$���D8�$�tH��$�������H��$�H3���H��$ H���A_A^A]A\_^]�@��It:@��ht+@��lt
@��wu�A��돀?lu
H��A���A���w���A�� �n����A��<6u�4uH��A���O���<3u�2uH��A���7���<d�/���<i�'���<o����<u����<x����<X����D�T$\H�T$x@��D�T$P�\S3�;�t!H�T$hL�D$@@���W@�/H��@:��H�T$hL�D$@@����VE3����@��*uE�uI��E;������E�����C��@��D�tH��}���E���u���@��*uA�EI��A;‰D$T�Z���A������D$T��@�ōDHЉD$T�:���@�� tA@��#t1@��+t"@��-t@��0����A������A������A�����A����A�����D�T$pD�T$XD�T$TD�T$HE��E��D�T$P�����*E3�E3�3�3�H�t$ ��@@8�$��w������H�
9��@SH����d$pH�L$t3�A���X7L�\$pH��$H��$L�\$HH�D$P�;�H��$H�T$@H��E3�荟H��t;H�d$8H�T$@H�L$`H�L$0H�L$XL��H�L$(H��$L��H�L$ 3��I�� H��$�H��$H��$�H��$�H��$��D$p��D$tH��$����3ɋ�s�H�L$H�`���u��u�H�@E�����H��4�H���[����H�\$H�l$H�t$WH��0H��H�
��A��I��H���H��tL�T$`D��L��H��H��L�T$ ���%���DL�\$`D��L��H��H��L�\$ �h���H�\$@H�l$HH�t$PH��0_����L�
��3�I��D�@;
t+��IЃ�-r�A�w�
Á�D������AF��H�A�D���H��(��H��u	H����H��H��(�H��(�H��u	H����H��H��(�@SH�� ���H��u	H����H����jL���H��tL�P���;���A�H�� [���H�\$H�l$H�t$WH��`3�M��I��H��L��L;�u'�L���E3�E3�3�3�H�\$ ��b������L;�tH;�t�L��$�����A��L;�L��$�H�T$@G�H�T$0H�L$0I���D$HB�D$8A�Ӌ�H;�t7;�|%�l$8x	H�D$0��H�T$03�������t���9\$8�\.��ÍC�L�\$`I�[I�kI�s I��_��H��H�XH�hH�pH�x ATH��0I��I��H��H��M����M��uH��uH����3��H����H����I;�vP�(���L�FH�
�R�H�D$hL��H�D$(H�D$`H��H�D$ ������uo���8"�����������H�
eRL��D� H�D$hL��H�D$(H�D$`H��H�D$ �4����D����uH���u����8"uC���D� �9��y8����u-�w����"��j����H�d$ E3�E3�3�3�������H�\$@H�l$HH�t$PH�|$XH��0A\��H��8H�D$`H�D$(H�d$ ���H��8���H�\$H�l$H�t$WH�� H�YH��H��L��3��c2E3�H�}A�KA��D�]D�]D�]f�H�=��H+���H��H��u�H����9�H��H��u�H�\$0H�l$8H�t$@H�� _���H�\$H�t$WH��H���H3�H��$pH��IH�T$P�ף����=3�H�T$p���H��;�r��D$V�D$p H�|$V�)�WD��D;�wA+�I��J�LpD�B� �u1H�����uӋF�d$8L�D$p�D$0�FD�ˉD$(H��$p�3�H�D$ �c�d$@�F�V�D$8H��$p�\$0H�D$(L�L$pD��3ɉ\$ �\`�d$@�F�V�D$8H��$p�\$0H�D$(L�L$pA�3ɉ\$ �&`L��$pH�N3�A�t�	��p�A�t�	 ��p���ƁH��H��I��H��u��?3�H�ND�B�A�@ ��w�	�B �A��w�	 �B��Ɓ��H��;�r�H��$pH3����L��$�I�[I�s I��_��H�\$WH�� ��
H������
��tH���t	H����n�
��H���H�\$0H;��tDH��t��uH�C�H�L$0H;�t����H�]�H���H�O�H�D$0�H�\$0�
�H��u�K �&H��H�\$8H�� _�@SH��@��H�L$ 3��\���%	����u%����L��|$8tSH�L$0�����E���u������ԃ��uH�D$ ����@뻀|$8tH�D$0������H��@[�H�\$UVWATAUH��@H���H3�H�D$8H���I���3ۋ�;�u
H�������L�-Y���H��I��A�98�'A�I�H��0��r����������k�;���H�T$ ��>�;���H�N3�A��.�~�^D9d$ ��H�D$&8\$&t-8Xt(�8�H;�w+�H�T7I�I+�u�H��8u�H�F���I�I+�u��N��t(��t��
tA;�t�����������FD�f��^H�~�ùf���9"����������H�N3�A��;-H�lmL���H�A�M�D�I��A8t18Yt,��A;�wL�L2A�A�A�AM�;�v�H��8u�I��M�M+�u��~��D�ft$��t��
tA;�u��������^H�VI�|���H��f�H��I+�u�H���|���3�H�L$8H3��9��H��$�H��@A]A\_^]��H��H�XH�pH�xL�` AUH��0��A���H������H��������D��;C��� �@H��3�H;��|H���H��A� ��^�;H��A������D��;��$H�����uH���L�%>�I;�t�����L�%+�H��������	�D����
���C�>��C�9��C�4��׉T$ L�s�����}Hc��DKfA��H�*�‰T$ ��׉T$ ��}HcʊDB����‰T$ ��|$ ��}Hcϊ�B����lj|$ ��H�����uH�
��I;�t���H�u���
���+���u&L�%)�I;�tH������������3�D��A��H�\$@H�t$HH�|$PL�d$XH��0A]�H��(�=��u����������3�H��(�H�\$H�t$WH�� H��(H��H��tyH�
�H;�tmH��H��ta�8u\H�� H��t�9u�#��H��(�?bH��H��t�9u���H��(��aH������H��(����H��0H��tG�8uBH��8H�����H��H��H+����H��PH+����H��0���H��XH�,�H;�t��`u�]_H��X�]��H�{X�H���H9G�tH�H��t
�9u�5��H��tH�OH��t
�9u���H�� H��u�H��H�\$0H�t$8H�� _������H��H��t�H�� H��t�H��H��t�H��0H��t�H�AXA�H�3�H9P�tH�H��t�H�x�t
H�PH��t�H�� I��u�H��X�`����H����A���D	H��H��t�DH�� H��t�DH��H��t�DH��0H��t�DH�AXA�H���H9P�tH�H��t�D
H�x�t
H�PH��t�D
H�� I��u�H��X�D�`H������@SH�� H��H��tAH��t<L�L;�t/H�H�����M��tI���%���A�:uH��L;�t���H���3�H�� [��@SH�� ��H�؋���
��tH���t��H����+���H���H���V���H�ع�H��u�K �pH��H�� [����H�%ј�3�H�%ǘ���H�%Ř�H��(�
�����t
�ǘ�
���H��(����H�\$WH�� H��H��H���H����Aǁ�ƁtCƁ�CH���H����
�G�H�����
�1��'�H���H��uH��H���H����������H�\$0H�� _���H�\$WH�� �0��
�����җH��H��uH�H���%H��H��t3�
��H����H�˅�t3������H�K������3ۋ���H��H�\$0H�� _�@SH�� �q���H��H��u�H��H��H�� [�H���+H�\$WH�� H��H�I8H��t�$��H�KHH��t���H�KXH��t���H�KhH��t���H�KpH��t����H�KxH��t����H���H��t����H���H�/�H;�t����
��H���H�L$0H��t��uH���H�L$0H;�t�}����
�j��`�H���H��t+H����H;=L�tH���H;�t�?u	H��������H�����H�\$8H�� _����@SH�� �����t`H�
�������	����tH����=H��H��t1�
��H��ƕ��t3�H�������ʕH�K��������3�H�� [����H�l$H�t$WH��`Hc���H�L$@I���?��D�_A��wH�D$@H��@�y���H�T$@��@���z=���t@��$�@��$�Ƅ$�D�J�@��$�Ƅ$�D��H�L$@�T$8L��$��A�D$0�AH�L$@�D$(H�D$pH�D$ ��T��u8D$XtH�D$P����3���D$p#ŀ|$XtH�L$P����L�\$`I�kI�s I��_���̉L$H��(E3��3���H�1�H��t#L�D$0A�3�H���D$0�n��H��(�H�\$WH��0I��H��H��t23�H�B�H��H;�s$�L�H�d$ E3�E3�3�3���a�3��]H���H��HD�3�H���wH�
���PL��B�H��u-�=�tH�����u�H��t���H��t�H�\$@H��0_��@SH�� �������H�
�������H�� [H�����@SH�� ��H�
����H��tH�c�H��z�H��t���H�� [����@SH�� ����������̹���̹��
��H;�s-H�\$WH�� H��H��H�H��t��H��H;�r�H�\$0H�� _��H�\$WH�� 3�H��H��H;�s��uH�H��t��H��H;�r�H�\$0H�� _����H�\$WH�� H�=����tH�
���F_��t������;H���H�
ϓ�~�����uZH�
�-�v^H���H�=���H�H��t��H��H;�r�H�=O�tH�
F���^��tE3�3�A�P�.�3�H�\$0H�� _��H�\$H�t$D�D$WATAUAVAWH��@E���D����
��=�������D�%������H�
�����H��H�D$0H����H�
���v���H��H�D$ L��H�t$(L��H�D$8H��H�|$ H;�r�?���H9u��H;�r\H��7���H���#���H���H�
7�����H��H�
 �����L;�uL;�t L��H�\$(H��H�\$0L��H�D$8H��H�D$ �H���H�
q����H���H�
~�����E��t
��yE��u&���A�L$�`A������A��G��H�\$pH�t$xH��@A_A^A]A\_���E3�3��j�����E3�A�P�\���3�3�D�B�O�����̺3�D���=����@SH�� ����H��H���H���
`H����H����_H����_H���:]H���#H���]H�
�������H���H�� [��H�\$H�|$L�l$ AVH��0L�5����3�I��;t��H����r�����a���|��a��u
�=��a�����H�=P�A�L�3�H��I���,W��tH�d$ E3�E3�3�3��7�H�1�A�3��&��3���u1L�ЗH�
�����V��tH�d$ E3�E3�3�3����H�
���7H��H��<vFH�
���m7H���L�s�H�L8�A�H+��U��tH�d$ E3�E3�3�3���L�<�I��H����T��tH�d$ E3�E3�3�3��`�Lc�I��H��M�O�D���T��tH�d$ E3�E3�3�3��1�H���A� H���8^�E����H��H��t2H���t,Hc�H�I�L��6I�T�H�d$ L�L$HL��H���H�\$@H�|$PL�l$XH��0A^����H��(��_��t��_��u�=��u����������H��(��H�
q��@SH�� H��H�
`��?�H��tH��Ѕ�t��3�H�� [���H��H�XH�pH�xL�` AUAVAWH��H�L$ �9���XD�b�I���L��E3�I;�u���{H���A�̉
��HL;�sCE�{I��A�C	
E�{E�{8A�C9
A�C:
E�{PE�{LI��XH���HL;�rË
n�fD9|$b�IH�D$hI;��;L�hHc0I��9L�;���L�54��XI���_L��I;�tiI���
�Aĉ�I��L;�sAE�{I��A�C	
E�{A�c8�A�C9
A�C:
E�{PE�{LI��XI��HL;�rŋ��H��;�|������L�5��A��A;�~~H�>�tkH�>�teA�Et^A�EuH����A;�tILc�I��H��A��Mk�XM$�H�I�$A�EA�D$I�L$���>[A;�tA�D$�������I��H��;�|�E��I��H��Hk�XH
�H�;�tH�;�t�K���C�A�D$���Ƀ�������E;�D��H��H���tJI;�tEH����A;�t7H�3����u�K@�	��u�KH�K���ZA;�t�C����.�K@H�����A��H��H���Q����
^����3����L��$�I�[ I�s(I�{0M�c8I��A_A^A]����H�\$H�l$H�t$WH�� 3�H���H���d��H��H��u(9&�v ���D���D;�A��G�;�u�H�l$8H�t$@H��H�\$0H�� _�H��H�XH�hH�pH�x ATH�� 3�H��H��A��E3�H��H���1���H��H��u*9��v"����D���D;��A��AG�A;�u�H�l$8H�t$@H�|$HH��H�\$0H�� A\��H��H�XH�hH�pH�x ATH�� 3�H��H��A��H��H���[H��H��u/H��t*9%�v"���D���D;
�A��AG�A;�u�H�l$8H�t$@H�|$HH��H�\$0H�� A\����H�\$H�t$ATH��03��N�j��^�\$ ;��}iLc�H���J�<�tPJ��A�t�F�����t�Ɖt$$��|1H���J��H��0���H�
~�J���
���L�n�K�$��É\$ 돹����H�\$@H�t$HH��0A\�H�\$H�t$WH�� �A3�H��$<u?�At6�9+y��~-�|H�SD�Nj��b-;�u�C��y��C��K ��H�K�c��H�t$8H�H�\$0H�� _����@SH�� H��H��u�5�,�j�����t����csH������Z����3�H�� [��H�t$H�|$L�d$AUAVAWH��0D��E3�3��N���3��|$ A��;=N���Lc�H�6�J�<�tjJ��B�t`���f����H��J��A�t5A��u�9���A;�t%A��D�d$$�E��u�At����A;�AD��t$(H���J�������lj|$ �n�����@A��AD��H�t$PH�|$XL�d$`H��0A_A^A]ù������H�\$H�t$H�|$ATH�� L�%��3�3�I�܃{u%Hcƺ���H��H�:�H��H��U��t-H��H����H;�|øH�\$0H�t$8H�|$@H�� A\�Hc�H�I�$�3�����H�\$H�l$H�t$WH�� H�q�H�-��H��H�7H��t�tH��ȅH���H���H�'H��H;�|�H�H��t�{u���H��H;�|�H�\$0H�l$8H�t$@H�� _��Hc�H���H�H��H�%��H�\$H�t$H�|$AUH�� HcپH�=��u�P����N� �������H��H�L�-��I�|�t���{�(���H��H��u�����3��Z�
�f�I�|�u/��H���T��uH���L�������3��I�\��	H���.����H�
������H�\$0H�t$8H�|$@H�� A]�H�\$WH�� Hc�H�=�H�H�<�u�����u�H�U�H��H�\$0H�� _H�%L�H��H�XH�hH�p H�PWATAUAVAWH��@M�yM�!I�q8M+�AfM��H��L����3�H�H�L�@�9>�+H�^�C�L;����C�L;����{���;t�H�L$0H��I�Ѕ���~sA�}csm�u(H�=;�tH�
2��O��t�I����KA�H��I��7I�F@�SMcMH�D$(I�F(I�M��H��H�D$ �?��:��H��;>sj�>���3��fI�y 3�I+�9.vTH�^�K�L;�r>�C�L;�s6H;�rH;�sA�E u/�;t	�H;�t#�H�T$xIDZI�D�C�M�A���H��;.r��L�\$@I�[0I�k@I�sHI��A_A^A]A\_����H�\$H�l$VWATAUAWH��0�-D�I��E3�E3�E3ۀ: E�yE��H��L��uI߀; t��;at?�;rt3�;wt'�
��H�d$ E3�E3�3�3�����3��9��3�A���	��I�A�׊����A�������ȃ�S~to�� ����tLA+�tB��t+��
t���u���E����E�׃�����@��@����@�E���w@��uq�������jE��u]E�׃� �]��TtJ��t:A+�t'��t������A��u3���5E��u(E�����'E��uE�����A��u�����s3����Iߊ������E�����I߀; t�H�
��A�H���a�������H���I߀; t��;=�n���I߀; t�H�r�A�H���`��u
H�����MH�[�A�H����_��u
H�����*H�H�A�H����_������H�����I߀; t��;���H�L$hE��D��I���D$ ��d]�����D=}�!F�D$hH�&H�fH�f(�F�nH��H�\$`H�l$pH��0A_A]A\_^�H�\$H�t$WH��03ۍK�7����3��|$ ;=����Hc�H���H�<�tkH��@�uV�`rO�G���w�O�
�������H�S�H���萹��L�A�I��@�tH�Ћ�����H����lj|$ �x���Hc��X��H�
�H��H�
��H�<�tXH��H��0���N��uH�
��H���d���L���I�$��$H���H��H��0��}L���I���cH��t�c��cH�cH�#H�c(�K�����H��H�\$@H�t$HH��0_����������ff�H���M3�M3�H�d$ L�D$(�sH����������fDH�L$H�T$D�D$I� ��������f��������f�����H�\$H�t$WH��0H��H��u$���H!|$ E3�E3�3�3�������A����@���t�� �A�����A�u�	$�H�AH�H����	D�G$H�W���M�G����������G�u_H���	���t<H���	���t/H���	H��H�5��Hc�H���o	D��A��Mk�XL��L�#�A�C$�<�u�o
�$u�Gt�g
r�G$H��O�H��H���������	G�g��H�\$@H�t$HH��0_���H�T$�L$SUVWATAUAVAWH��XA�����Hc�A��D�d$4�\$8A;�u�H��3��8����	�3�;���;����H��L��L�
����I����K���@4Hk�X�D1��������v�����8�������;������H;�t�D�|18A�E�A�A�σ�t��u��Шt���L���d��Шt���A;�AB؋���L��H;�u�H����]����=��$�3�D�B�xL�
ə��L��K���@4L�\0@K���@4I��A�
�D0H���L0	A:���;���A�MK���@4A��A�I�UA�h�D�D0	D:�tbK���@4�L09A:�tQ;�tM�
K���@4A�H��A�h�D�D09A��u.K���@4�L0:A:�t;�t�
K���@4H��A�h�A�D�D0:K���@4L�L$0D��H�1H�|$ ��z;���HcT$0;�����H;���L������K���@4�D0��yA����;�tA�}
u�L0��d0�Hc�I��M��I�H�D$@L;��:�
A�$<�
@:�t
�H��I����H�D$@H��L;�sI�D$�8
u	I���L���K���@4L�L$0H��$�H�1A�I��H�|$ ��y;�u
�Ix;�u{9|$0tuL�ؗ��K���@4�D0Ht"��$�
t'@�+K���@4��$��D1	�GI;�u��$�
u�
�3��$�A�H���%��$�
L�n���t�L�c���@�+H��L;d$@����K���@4�D0@u�L0�	A�$�H�Ë�A+�A����;���A�I+��uI��A�����I;�rI+�A��B8�P t��B��P ;�u����*A�����;�uHc�H��^K���@4�D0Ht;I߃��L0	|�K���@4I߈D19��u�K���@4I߈D1:Hc�H+����$���E��Hc���D$8L��$�A+���D��M�ʼnD$(3ҹ�L�|$ ��w��;�u�yv�����A����D�d$4;�H�����J���@4@���|0H�;׺
tfA9Uu�L0��d0�Hc�I��M��N�<(M;��{�
A�$f���Ef;�tf�H��I���%I�G�L;�sI�D$f9u	I����L���K���@4L�L$0H��$�H�1A�I��H�|$ ��v;�u��u;���9|$0��L����K���@4�D0HtF�
f9�$�tKf�+��$�K���@4�D1	��$�K���@4�D19K���@4�T0:�WI;�u�
f9�$�uf��>��$�H�����D�B�7�
L�����f9�$�t��
L�k���f�+H��M;�������"K���@4�D0@u�L0�A�$f�H����A+�D�d$4L��$�M;�tI���(���A���DD�A���i�et��u�K���	�`���������muD��뮋��d������3��)�6���8����	E3�E3�3�3�H�|$ �%����H��XA_A^A]A\_^][��H�\$H�t$�L$WATAUAVAWH��0A��L��Hc����u����3ۉ����	���3�;���;=s���L��L��I��L�=d�A��Mk�XK��B�L ��u.�x����Q���	H�\$ E3�E3�3�3��g�������A�������;�u+�:�������H�\$ E3�E3�3�3��)�����n����V�K��B�D tD��I�Ջ��s�����������	����������[W���)���������	H�\$ E3�E3�3�3������H�\$hH�t$pH��0A_A^A]A\_���H��8H��u%�^��H�d$ E3�E3�3�3���s������AH��8���H�\$H�t$WH��0I��I��H��M��u3��fH��u%�	���H�d$ E3�E3�3�3ɉ������<M��tH;�r
L��H���T3�L��3��HH��t�H;�s����"뮸H�\$@H�t$HH��0_��������������������ff�H��I��rS��I�I��I��@rH�ك�tL+�H�H�M��I��?I��u9M��I��I��tfff��H�H��I��u�M��t
�H��I��u��@fff�ff�I��s0H�H�QH�QH��@H�Q�H�Q�I��H�Q�H�Q�H�Q�u��fDH�H�QH�QH��@H�Q�H�Q�I��H�Q�H�Q�H�Q�u��$�T�����H�\$H�|$ATH�� H��������������d���H��0H;�u3���R���H��`H;�uw����CucL�%��Hc�I�<�u+����I��H��uH�C H�CH���C$�C�I���C$�CH�KH��K��3�H�\$0H�|$8H�� A\���̅�t0SH�� �bH��sH�����c���c$H�#H�cH�� [����H�\$H�t$WH�� Hc�A�������RH���u�_���	���RD��E3���H���p�����u�Fo�3���t	���g����H��H��H��H����H��Hk�X�d���H�\$0H�t$8H�� _���H�\$H�t$�L$WATAUAVAWH��0E��D��Hcك��u����3��8����	����3�;���;����H��L��I��L�=t���Hk�XK���L0��u+����8�c���	H�|$ E3�E3�3�3��y�����m���=R�K���D0tE��A�Ջ�����������	�0���8�����R���)����8�����	H�|$ E3�E3�3�3��
����H�\$hH�t$pH��0A_A^A]A\_����H�\$WH�� Hc����$QH���tYH������u	@���u
;�u�@`t�P�H����PH;�t����PH���m��u
�]m���3ۋ��PL��H��H��A��H��H��Mk�XB�D��t���R�����3�H�\$0H�� _�H�\$H�t$ �L$WATAUH��0Hcك��u���3��8�����	����3�;���;����H��L��I��L�-����Hk�XK�D��L0��u+����8�|���	H�|$ E3�E3�3�3�������a���VP�K�D��D0t���������9���	������P���)�@���8����	H�|$ E3�E3�3�3��/����H�\$`H�t$hH��0A]A\_�@SH�� �A�H��t"�AtH�I芤���c����3�H�H�C�CH�� [��H��(H��8csm�u+�xu%�@ = �t=!�t="�t=@�u�k9�3�H��(����H��(H�
������k3�H��(���H�\$H�l$H�t$WH�� H�����E3�H��I;���H���Lc!�H��9:tI��H��H��H�H;�r�I��H��H�H;�s9:tI��I;��CL�BM;��6I��u
L�ZA�@��%I��u���H���H����J����Lc���
��A�M��D;�}*I��H���A��I��M�\��
_��]��D;�|ځ:�����uǃ���v�:��uǃ���b�:��uǃ���N�:��uǃ���:�:��uǃ���&�:��uǃ����:��u
ǃ������A�Љ���L�ZA��H������3�H�\$0H�l$8H�t$@H�� _���H�\$H�l$H�t$WH��0�=m�u���H��3�H��u����<=t��H����H�\���u�G�Hc��G�H��H�ųH��t�H����;teH����;=�ptCHc�H����H�H��trL��H��H���1��tH�d$ E3�E3�3�3�轿��H��Hc�H؀;u�H�W�H���W���H�%G�H�'�q�3�H�\$@H�l$HH�t$PH��0_�H�
�����H�%������H��H�XH�hH�pH�x ATAUAVH�� L�l$`M��I��A�eL��H��A�H��tL�I��3�;"u3���@�"��H�Ë��9A�EH��t��H���3H�Ë��=O��tA�EH��t��H��H��@��t��u�@�� t@��	u�H��t	�G��H��3��;���; t�;	uH����;��M��tI�<$I��A��3��H����;\t��;"u6��u��tH�C�8"uH���3�3҅����������H��t�\H��A�E��u���tO��u< tG<	tC��t7���`NH��t��t�H�ÈH��A�E��H�����tH��A�EA�EH���Y���H��t�H��A�E����M��tI�$$A�H�\$@H�l$HH�t$PH�|$XH�� A^A]A\��H�\$H�t$ WH��0�=r�u���H�=��A�3�H������dfH�]�H�=�H��t�;uH��H�D$HL�L$@E3�3�H��H�D$ ���Hct$@H��������H;�s\HcL$HH���sQH��H;�rHH�����H��H��t8L��H�D$HL�L$@H��H��H�D$ �g���D�\$@H�=K�A��3�D�;����H�\$PH�t$XH��0_���H��H�XH�hH�pH�x ATH��@�
ѶE3�I��A�t$A;�u2��fH��I;�t����!�Ie�
����xDΉ
������I;�u��fH��I;�u3��H��fD9#tH�fD9'u�H�fD9'u�L�d$8L�d$0H+�H�L��3�D�O3�D�d$(L�d$ �6fHc�A;�tAH���j��H��I;�t1L�d$8L�d$0D�OL��3�3ɉl$(H�D$ ��eA;�uH���5���I��H���eH���s;�t	A;��L�����eH��I;��:���D8 tH��D8 u�H��D8 u�+��Hc�H������H��I;�uH��pe����L��H��H���}%H��TeH��H�\$PH�l$XH�t$`H�|$hH��@A\���H�\$WH�� H��{H�=�{�H�H��t��H��H;�r�H�\$0H�� _�H�\$WH�� H��{H�=�{�H�H��t��H��H;�r�H�\$0H�� _�H�\$WH�� H�˖H�d$0H�2��-�+H;�tH��H����vH�L$0��dH�\$0��dD��I3��cD��I3��dH�L$8D��I3�{dL�\$8L3�H�������L#�H�3��-�+L;�LD�L�>�I��L�<�H�\$@H�� _�̃%���H�\$WH�� Hc�A��H�T$8���FH���u聻���	H���W�T$8L�D$<D��H���c�D$8���u�ab��t	��膻����H��H��H�'�H����H��Hk�X�d�H�D$8H�\$0H�� _����H�\$H�t$�L$WATAUAVAWH��0E��L��Hcك��u����3��8�ٺ���	H����3�;���;����H��L��I��L�=����Hk�XK���L0��u,詺���8肺���	H�|$ E3�E3�3�3�蘹��H���q���[E�K���D0tE��I�Ջ����H����8����	�M����8H������EH���*�6����8�����	H�|$ E3�E3�3�3��%���H��H�\$hH�t$pH��0A_A^A]A\_��H�\$ UVWATAUAVAW�0��WH+�H�,�H3�H��$ 3�3�E��L��Hcىl$@E��u3���H��u.袹��!8�{���H!|$ E3�E3�3�3��葸�����L��L��H�<�I��A��J��L�t$PMk�XA�t8@�@�@��t@��u	A��Шt�A�D t
3ҋ�D�B�Z����������H�ܳJ��A�D����+��3�H�T$XH���H���9YJ��I���^a������t	@�����;a!|$LI�܉D$XE���wD�t$X�
@����H�T$P�E3���
H�-H�H�T�A��A�|Pt A�DL�L$]A��D$\A�dPH�T$\�I���k��t4I��H+�I�H����H�L$DA�H���H����vH���A�H��H�L$D��H����UH�d$8H�d$0�L$XH�D$\L�D$DA�3��D$(H��H�D$ �`���H�D$PH�d$ H�
g�H��L�L$LH�T$\I�D��t_���B��A+�|$@9l$L���
E����H�D$PH�d$ @�l$\H�
�L�L$LD�E�H��H�T$\I��_�����|$L|{�D$@���e@��t@��u�E3�f��
f�D$DA��H��@��t@��u6�L$D�,Ef;D$D����E��t��f�l$D�
Ef;D$Dux��D$@��A+�A;������\$LL�t$P�l$@�������z���e�K����	�`���������L�t$P��J�L�A�DLJ�D�A�DP�\$L�]��떋\$L�H��J��A�D���3�I��@����E�����S
D�t$@H��$ 3ɋ�A+�A;�s&�EH��<
u�A��H��H��H���H��H���r�H!\$ H��$ D��D+�H�h�D�t$@L�t$PL�L$HH��$ J��I��k]��t5|$HH��$ H+�HcD$HH;������ź
A+�A;��N�������$\�����@����E���"�
D�t$@H��$ 3ɋ�A+�A;�s1�EH��f��
uf�A��H��H��H��f�H��H���r�H!\$ H��$ D��D+�H���D�t$@L�t$PL�L$HH��$ J��I���\���J���|$HH��$ H+�HcD$HH;������ź
A+�A;��?�������E���NA�
H�L$p3ҋ�A+�A;�s.�EH��f��
ufD�H��H��H��f�H��H���r�H�d$8H�d$0H�D$p+�L�D$p�D$(U
�����+�3��D��H��$ H�D$ �\D�������3�H�D$PH�d$ Hc�H�� E��H�
`�H��L�L$HD+�I��r[��tt$HD;����UZ��D;�������A�
A+�A;��������I�H!|$ L�L$HE��I��[��t�|$H3�����Z��������$����~���H�ȭJ��A�D@tA�<$�.���輲����Ѳ��� �H���+���H��$ H3����H��$�H��0A_A^A]A\_^]���H�\$H�t$�L$WATAUAVAWH��0E��L��Hcك��u�j���3��8�A����	����3�;���;���H��L��I��L�=����Hk�XK���L0��u+�����8����	H�|$ E3�E3�3�3��������m����<�K���D0tE��I�Ջ��������裱���	踱���8�����4=���)裱���8�|����	H�|$ E3�E3�3�3�蒰����H�\$hH�t$pH��0A_A^A]A\_����@SH�� ��H�ٹ����H�CH��t
�K�C$��KH�C �C$H�CH�C�cH�H�� [��H��8���u
����	�R��x.;
��s&Hc�H���H����H��Hk�XH���D��@�"裰��H�d$ E3�E3�3�3��	踯��3�H��8��@SH�� E�H��L��A��A�L��tA�@McP��L�Hc�L#�Ic�J�H�C�HHK�At�A���H�L�L3�I��H�� [�m����H��(M�A8H��I������H��(����@SH��@��H�L$ �~���H�D$ D��H��@B�Y%��|$8tH�L$0����H��@[����@SH��@��H�L$ 3��4���H�D$ D��H��@B�Y%��|$8tH�L$0����H��@[��������������������ff�H��H��H�tf��H����t_�u�I��������~I��H�M��H��L�H��I3�I#�t�H�P���tQ��tGH����t9��t/H����t!��t����t
��u�H�D��H�D��H�D��H�D��H�D��H�D��H�D��H�D��H�\$WH�� H����
H��b���H�H��H��u�H�\$0H�� _���H�
�3�H��H9
̦���H�\$fD�L$ UVWH��`3�I��H��H��H;�uL;�vH;�t�)3��H;�t�	�I�����v$�
����E3�E3�3�3ɉH�l$ �"������oH��$�H�L$@�p���L�\$@A9k����$���f;�vLH;�tH;�v
L��3�H���$�蟭���*蔭���@8l$XtH�L$P����H��$�H��`_^]�H;�tCH;�w<�`����"E3�E3�3�3ɉH�l$ �u���@8l$X�H���H�L$P�����7����H;�t�@8l$X���H�D$P��������H��$���$�A�KH�D$8H�l$0L��$�A�3҉|$(H�t$ �<U;�t9�$�����H;�t����S��z�����H;�tH;�v
L��3�H���������"E3�E3�3�3ɉH�l$ 蔫��@8l$X�g���H�D$P�����V���H��8H�d$ ���H��8�@SH�� �B@I��tH�zuA��&�B�x
H��H�������2������u	��H�� [��H�\$H�l$H�t$WH�� A�@@I��I���H��tI�xuA�7��~3�ML��H����r���H�Ń?�u虫���8*uL��H�ֱ?�S������H�\$0H�l$8H�t$@H�� _���H�\$UVWATAUAVAWH���H�ƅH3�H��$�3�H��H�L$hH��H�L$xI��M��D$`D��D$TD���D$H�D$X�D$P蠉��E3�I;�uA���3�E3�E3�3�3��H�\$ ����8�$�tH��$��������A���C@L�
dq����H���:��H���A;�t(���t#Lc�L�
;q��I��A��H��Mk�XM��@4�
L��L�
q��A�@8u)A;�t���tHc�H�ƒ�H��Hk�XI��@4�B8�tA�3���3�E3�E3�3�3��H�\$ �G���8�$�tH��$�����A���KE3�I;�t�@�/A��D�T$@D�T$DA��L��$�A:��H��$�A�H��A;�H��$����E�<XwH��B������A��Hc�H��Hc�H�B��	 ����T$\���/�����A;����������@�������������������<@�Ń�d�~����A�@��C����E�.��G�%��Stm��X����Zt��a���c���HI�EI��I;�t/H�XI;�t&A���s��D$P+���D�T$P�H����A��0uA��I�]E;�A�ǹ���D�I��A���I;��D$PHD��H����A��0uA��I��A��t,E�M�H��$�H�L$DM�����E3�A;�t�D$X�A�E��D$D��$�H��$��M�D$p@�� A��@E;�H��$�A���-A��k��e���g~σ�i����n����o����pte��s�������u����x���'�S��fD9t	H��A;�u�H+�H��!I;�HD��H���
��D8tH��A;�u�+ˉL$D�A�A����D$`A�E��y`Q�D$L0A�Q�D$M�SA�E��yDA��	�=I�}I���@���E3�A;��l���A�� tf�7��7�D$X�lA��@A�
�T$HA��rA��s
M�EI���.I��A�� tA��@tM�E��E�E��A��@tMcE��E�E�A��@t
M;�}I��A��A��r
A��rE��E;�}A��A��E;�EO�D�t$`I��H��$�H���#ʉL$HA��A��A;�M;�t 3�I��Ic�H��L���B0��9~AƈH����H��$�A�����+�H��A��	�D$D�A;�t	�;0�H��D$D�0�u@��guAA��9E;�EO�A���~)A��]Hc����H��$�H��tH�؋��A��I�EH�
\�I��@��Hc�H��$���H�L$xD��H�L$0�L$pL�ƉL$(H��$�H��D�|$ ��A��3���tD;�uH�
�訳��H�T$xH���3�@��gu;�uH�
�膳��H�T$xH��Ѐ;-uA��H��H���+���E3҉D$DD9T$X�KA��@t1A��s�D$L-�A��t�D$L+��|$H�A��t�D$L ��|$H�t$TH�l$h+t$D+�A��uL�L$@L�ŋֱ �̖��L�L$@H�L$LL�ŋ�����A��tA��uL�L$@L�ŋֱ0蛖���|$D3�9D$Ptu;�~qH��D�MH��$�H��$�A���H���V���E3�A;�u2��$�A;�t&L�D$hL�L$@H��$����E3�A;�u�H�l$h�#H�l$hA�ƉD$@�L�L$@L�ŋ�H���X���E3ҋD$@A;�|A��tL�L$@L�ŋֱ ���E3�H��$�I;�tH���ɂ��E3�L��$�H��$��t$@�T$\L�
�i��A�@�/A:�����A;�t	�������D8�$�tH��$�������H��$�H3����H��$ H���A_A^A]A\_^]�@��It=@��ht.@��lt
@��wu�A��끀?lu
H��A���o���A���f���A�� �]����A��<6u�4uH��A���>���<3u�2uH��A���&���<d����<i����<o����<u����<x�����<X�����D�T$\H�T$x@��D�T$P���3�;�t!H�T$hL�D$@@���s���@�/H��@:��H�T$hL�D$@@���R���E3����@��*uE�}I��E;������E���~���C��@��D�|H��l���E���d���@��*uA�EI��A;‰D$T�I���A������D$T��@�ōDHЉD$T�)���@�� tA@��#t1@��+t"@��-t@��0����A�����A�����A�����A�����A������D�T$pD�T$XD�T$TD�T$HE��E��D�T$P���葠��E3�E3�3�3�H�t$ �觟��@8�$��Z�����@UATAUAVAWH��`H�l$@H�]PH�uXH�}`H��zH3�H�ED����3�M��L�MD�ED��UH��D�n�D;�uOL�5RE�ͺ3ɉ|$(H�|$ ��H;�tE��D�-Z����FD�K���xDD�D�=�L�]D�MpD;�~5A��I��A+�@88t
I�;�u��A��+�A+�A;�}
D�HD�Mp�D�ȉEpD;��\D;��SE;���D�����D;�uH�D�`���M��A��҉|$(H�|$ ��A�xGLc�D;��<H�����A���A�~[3�H�B�I��H��rLK�L?I;�w.H�AH;�wH��H�����<H+�H�|$@H�����������H��H��tD�0H��H����D�MpL�E�A��D�|$(H�|$ ��F3�;��K�U�L$(H�L$ �ME��L��#GE3�Hc�A;��!D�UA��
s;���A;��;����M�D$(H�ExE��L��A��H�D$ ��F��A;�~`3�H�B�H��H��rQH�L6I;�w*H�AH;�wH��H�����;H+�H�\$@I;�t�����~��E3�H��I;�tD�0H��D�U�I��I;�tn�ME��L��A�҉t$(H�\$ �FF3�;�t?���3�H�L$8D��L��H�L$0;�u�L$(H�L$ �
�D$(H�ExH�D$ A���E��H�K�D91u��|��H�O�D91u��|������H��L��D;�uH�D�pD�u�����uH��xA���0D���u3��L�}xL�E;��<3�L�Mp�Ћω\$(H�\$ ��0H��H;�t�D�Mp�UL��A�Ή\$(H�\$ �MELc�D�MD;�u���D;�A���~bI��I���wYH��H��w4H�YH;�w
H�����H���H���R:H+�H�\$@H��t%�����l|��H��H��tD�0H��D�MH��u3��Mc�3�H�����D�]D�Mp�U�MD�\$(L��H�\$ ��D�E��u3��.���L�ML�ÉD$(��A��L�|$ ��/�}L��3�L;�D�H�K�D91u(�W{���!���D�Mp�U�D$(A��L�|$ �.D��3�H;�tH���%{��L;�t
M;�tI���{����H�MH3��y��H�]PH�uXH�}`H�e A_A^A]A\]����H�\$H�t$WH��p��H��H�L$PI��A���y����$�D��$�H�L$PD�\$@�D$8��$��D$0H��$�L��H�D$(��$�D�Nj։D$ �O����|$htH�L$`����L�\$pI�[I�sI��_���D�L$ UATAUAVAWH��@H�l$0H�]@H�uHH�}PH��tH3�H�ED�
Ԓ�3�M��D��L��wD;�u=L�MH�aLD�Nj��B;�t�=���6�(AD�
����xDD�D�
�D;��&D;��D;��C�uh;�uI�E�p�]xD�MXM��ҋΉ\$(��H�\$ �BLc�D;��A���~hH�����L;�wYK�L$H��w5H�AH;�w
H�����H����{7H+�H�|$0H;��������y��H��H;�tD�(H���H��H;���M��3�H��M����D�MXM�ƺ��D�d$(H�|$ �JA;�tL�M`D��H��A���A��H�O�D9)u�x�����D�epH��D;�uI�ED�`�uh;�uI�E�pA���z,���u3��U;�t$L�MXM�ƋЋΉ\$(H�\$ �,H��H;�t�L��H�E`D�MXM��A��A��H�D$ �%A��H;�tH���x����H�MH3��v��H�]@H�uHH�}PH�eA_A^A]A\]���H�\$H�t$WH��`��H��H�L$@A��I���v����$�D��$�H�L$@D�\$8�D$0��$��D$(H��$�D��L�Nj�H�D$ �.����|$XtH�L$P����H�\$pH�t$xH��`_������������������ff�L��H+���I��ra��t6��t�
I�ȈH����tf�
I��f�H����t
�
I���H��M��I��uQM��I��tH�
H�H��I��u�I��M��uI���@�
�H��I��u�I���fffffff�fff�ff�I�� sBH�
L�T
H�� H�A�L�Q�H�D
�L�T
�I��H�A�L�Q�u�I���q���fff�f�H��r�� 
D
@H�����u�H���@L�
L�T
L�	L�QL�L
L�T
L�IL�QL�L
 L�T
(H��@L�I�L�Q�L�L
�L�T
���L�I�L�Q�u�I��I���q����$���ffff�fff�fff�f�I�I��ra��t6��tH�Ɋ
I�Ȉ��tH��f�
I��f���t
H���
I���M��I��uPM��I��tH��H�
I��H�u�I��M��uI���H�Ɋ
I�Ȉu�I���fffffff�fff�ff�I�� sBH�D
�L�T
�H�� H�AL�QH�D
L�
I��H�AL�u�I���s���ffff�f�H���w�� H��
D
@��u�H���@L�L
�L�T
�L�I�L�Q�L�L
�L�T
�L�I�L�Q�L�L
�L�T
�H��@L�IL�QL�L
L�
��L�IL�u�I��I���q����$���H����SH�� H��H�I��s��H�K��s��H�K��s��H�K ��s��H�K(��s��H�K0��s��H��s��H�K@�s��H�KH�s��H�KP�s��H�KX�s��H�K`�s��H�Kh�s��H�K8�~s��H�Kp�us��H�Kx�ls��H����`s��H����Ts��H����Hs��H����<s��H����0s��H����$s��H����s��H����s��H����s��H�����r��H�����r��H�����r��H�����r��H�����r��H����r��H����r��H���r��H���r��H���r��H���|r��H�� �pr��H��(�dr��H��0�Xr��H��8�Lr��H��@�@r��H��H�4r��H��P�(r��H�� [���H��tBSH�� H��H�	H;
9|t�r��H�KH;
/|t��q��H�KH;
%|t��q��H�� [�H����SH�� H��H�IH;
|t�q��H�K H;
�{t�q��H�K(H;
�{t�q��H�K0H;
�{t�q��H�K8H;
�{t�mq��H�K@H;
�{t�[q��H�KHH;
�{t�Iq��H�� [����@SH��0L��H��t
H��tM��u,D��`����H�d$ E3�E3�3�3ɉ�t�����H��0[À9t	H��H��u�H��uA��A�I���H����tH��u�H��uA������"�3�����@SH��0M��M��uH��uH��u 3��?H��tH��tM��uD�	��M��u,D�跐���H�d$ E3�E3�3�3ɉ�ˏ����H��0[�L��L��I���uA�I��A�I�„�t,I��u��$A�I��A�I�„�tI��tI��u�M��uE�
M���f���I���uD�D�A�@P���)����"�m������@SH��0H��t
H��tM��u,D�����H�d$ E3�E3�3�3ɉ������H��0[�L��A�I��A�I����tH��u�H��u�趏���"�3��������������������ff�H+�L���t�B�	:�uVH����tWH��u�I��J�	f��f���w�H�J�	H;�u�I��������~L�H��H��I3�I��t��H�H���3��fff���t'��t#H����t��tH����t��t����t��u�3��H�H���������ff�H+�I��r"��tf��:
u,H��I���u�M��I��uM��t�:
uH��I��u�H3�����ÐI��t7H�H;
u[H�AH;D
uLH�AH;D
u=H�AH;D
u.H�� I��u�I��M��I��t�H�H;
uH��I��u�I���H��H��H��H�H�H�H;��������������������ff�M��tuH+�L��I����t�B�	H��:�uWI��tN��tJH��u�J�	f��f���w�H�J�	H;�u�H��I��I��������~vH��L�I3�I��t��H3��H�H��Ä�t'��t#H����t��tH����t��t����t��u�H3�����@SH�� ��J�M���H��H����H��H��H��u�C�H�#3�H�� [���H�\$H�t$H�|$ATAUAVH�� L��蓡���H�
ˉ貛��L��H�
��裛��H��I;���H��I+�L�oI����I���$H��I;�sT�H;�HB�H�H;�rI������3�H;�u�3�H�V H;�rFI�����H;�t9H��H��H������H�3�I������H�H�K���H��I���3��ؠ��H��H�\$@H�t$HH�|$PH�� A^A]A\����H��(���H������H��(������H���MZf9t3��HcH<H�3��9PEu�f9Q�����LcA<E3�L��L�A�@E�XJ�LE��t�QL;�r
�A�L;�rA��H��(E;�r�3��H�������������H��(L��L�
�Q��I���j�����t"M+�I��I�����H��t�@$���Ѓ��3�H��(����H��(�W���H���H��t����#H��(��H��(H�
���谙��H�Y�H��(�H�
U�H�
V�H�
W�H�
X�����H�
E�錙��H�\$H�t$WATAUAVAWH��@��3��|$p3��у��	������������������tM��t,��t_�<����H!t$ E3�E3�3�3��R�������L�%��H�
����|$p�L�%��H�
����|$p�L�%{�H�
t���|$p�u蔙��H��H��u���kH���H��Lc�q9YtH��I��H��H�H;�r�I��H��H�H;�s9Yt3�L�aM�,$�L�%�H�
���|$p�;���L��I��u3��M��u
A�M���̅�t3��ݬ�����t��t��tL�|$8D�t$p�1L���L�|$8H�����uD���dž���D�t$p��u9�
�p�щL$0��p�;�}*Hc�H�H���H�d��‰T$0�
�p���u���I�$��t3��>����;�u
�����A�����A��;�t
��t��uL���;�uD���3�L�\$@I�[8I�s@I��A_A^A]A\_����H�
݀�H�
��H�
��H��8��0D�؉D$ �=�u���/E3�D�\$ A��H��8����H�\$H�l$VWATAUAVH��@A��L��L��蘖��3�H��H9����H�
�C�y0H��H����H�~CH���/H���sH���D���H�MCH��H�3��e/H���%���H�CH��H���F/H������H��BH��H���'/H�����L��H��H��t!H��BH��/H�����H���H���H��L��H;�tcL;�t^H��袕��H�
�H��蓕��L��H��t?H��t:��H��t-H��$�A�L�D$0H�L$ A�Q�H��A�ԅ�t�D$8u���>H�
9H;�t2�;���H��t(��H��H��tH�
!H;�t����H��tH���H��H�
�~����H��tD��M��I��H����3�H�\$pH�l$xH��@A^A]A\_^�H��8��x ��~
��u��q�1��q�
�q�#軅��H�d$ E3�E3�3�3���Є����H��8�H�\$H�t$WH�� H��H��H��u
H���e���jH��u�*e���\H���wCH�
�v�H��HD�L��3�L��1.H��H��uo9CztPH�������t+H���v�H��诟�������3�H�\$0H�t$8H�� _����H���+��蝄������܄��H���+��脄���H����H�\$�L$VWATH��0Hc����u覄���	��������;=r��H��H��H��L�%c��Hk�XI���L��u%�Y����	H�d$ E3�E3�3�3��n������z���2�I��Dt+���H��-��u
�+���3ۅ�t���������	��������#�݃���	H�d$ E3�E3�3�3�����H�\$`H��0A\_^��H��H�XL�@H�HUVWATAUAVAWH��3�A��A��H���@��o�x�@��$�H�x�E��t�x�A���l$pD��H�L$T�;�tE3�E3�3�3�H�|$ �=�����r��@u
�|$T�tE
��A���A#Ⱥ�;�tT+�t:;�t1�����8������E3�E3�3�3�H�|$ �������D���@��t��u�A�@�D����$�A���t,��t#��t��t��@u�D;������A���A�������ϋƺ�L$H#�tF=t8=t*=t=t*=t&=t;�t�/���A�����
��A����A��D�l$Ps��s��"�$���A�E�DD�D�l$P@��@tA��A����D�l$P�L$H��s
A��D�l$P@�� tA���@��t
A��D�l$P�e
����u!詁���8��������t�����H��$�D�D$HH��$�H�|$0L�L$`A��D�l$(��l$ �6*H�D$XH�������A��#�;�uC�@��t9D�D$HH��$�H�|$0A��L�L$`D�l$(A�׉l$ ��)H�D$XH���u;HcL�-�{H����H��Hk�XI�D��d���'�����袀���8��H���(;�uMHcL�-t{H����H��Hk�XI�D��d��v'�ȋ�蝀��H�L$X��';�u��I����
�A;�uA��@�	��uA��H�T$X��A	HcL�-{H�����H��D
�I�D�Hk�XD�tHcH����H��Hk�XI�D��d8�A��$H�D$L��E����A��tx�E�ă��*����D$D���u�����8�tP��ٸ������H�T$@A�@�|$@����;�u�|$@uHcT$D�����t��E3�3��ɶ�����t��E���<�@��u�D$T#�u�����#�=@tJ=t,=@t%=t+=@t$=t=@u(��$�����#�;�uD��$��@��$������|$DA��@��A��%�=@�$=�t|=���;��A;�v��v8���l��$�A���A+�� A;��P�D$D����E��3����H;�t��E3�3��z��H����|����H�T$DA�覩������a���A;�t ��uk�|$DuD�@�D��$����D$D=��u��	����}��������=��u#�E3�A��������������D��$���E3�3�������;;�vqA;������������E��3����H;������E3�3����H���u8����D$DA��Hc�E��H�TDD+��������m����D;��A�Hc@��$�H����@��H��Hk�XI�D��d8�@l8HcH�ƒ�H��Hk�XI�L��ƀd8����D8@8|$Lu!@��tHcH����H��Hk�XI�D��L A��%�=���A����H�L$X��#�D$PD�D$HH��$�H�|$0�D$(A��L�L$`�D$ A��%%H���u6�)#���R|��LcI��A��H��Mk�XI�D�B�d����B���HcH�ʃ�H��Hk�XI�L�H�
��H��$�H�ĀA_A^A]A\_^]���H�t$WH��PE��L���d$@3�H��$�H������u(�{����8H�d$ E3�E3�3�3��z��������3�H������u(�K{����8H�d$ E3�E3�3�3��_z�������$���t8A����������u%�{����8H�d$ E3�E3�3�3��z�����`�L$0D�L$(D�T$ D��H��H�L$@�������D$D�|$@t,��t!HcH��H��L��u��Hk�XI���d���6��t����H�t$`H��P_���H��8A��D�L$`E��L���D$(H�L$ D��A��I�����H��8���H��H�XH�hH�pWH��PH��H��H�H�I��I���X��3�H;�u@8l$HtH�D$@����3��H�L$89iuL��H��H����[H;�u<��y��E3�E3�3�3�H�l$ ���x��@8l$HtH�D$@���������-H;�t�A��H��H��D�L
tUH;�u�f��D�L�Z�����@8/u���C�f��H��f�f;Qrf;QwfQ�$f;Qrf;QwfQ���Dt��D�H��I��E�LtNH;�u���^H��@8.uf���Q�fA��H��fD�fA��fD;Arf;AwfA�+f;Ar%f;AwfA�A���Dt
���fA��f;�uf;������H;�������u��������@8l$HtH�L$@����H�\$`H�l$hH�t$pH��P_���E3�����H�\$H�l$H�t$WH��P3�I��H��H��L;�u3��&H�L$0I���V��L�\$8A9kuL��H��H������H;�u<��w��E3�E3�3�3�H�l$ ��w��@8l$HtH�D$@���������H;�t�A��H��H��F�Dt-H;�u���F�Du[f���G@8/uf���
�f��f�H���H��F�Dt#H;�u���H��@8.uf���
�f��f�H��f;�u&f;�tH;�u�@8l$H�����H�D$@������������@8l$HtH�L$@����H�\$`H�l$hH�t$pH��P_���E3����H�\$H�l$H�t$WH�� H�څ�xi;
�qsaHc�H�-�qH����H��Hk�XH�D�H�<�u=�=Qu'��t��t��u���������������qH�D�H�3���Wv���	�lv��� ��H�\$0H�l$8H�t$@H�� _��H�\$H�l$WH�� ��xs;
�pskHc�H�-�pH����H��Hk�XH�D��DtGH�<�t@�=SPu)��t��t��u��������������3��H�D�H��3���u���	�u��� ��H�\$0H�l$8H�� _�H��8���u�u��� �nu���	�]��x1;
Dps)Hc�H�
@pH�ƒ�H��Hk�XH���DtH��,�Lu��� �$u��H�d$ E3�E3�3�3��	�9t��H��H��8�H��H�XH�pH�xL�` AUH�� Hc�L��I��L�-�o��Hk�XK�t���|3u3�O	�n�����|3uH�L3�������#��D3�
�C�����tK�L�H�L����H�\$0H�t$8H�|$@L�d$HH�� A]���Hc�H�
>oH�ƒ�H��Hk�XH��H�LH�%�H�\$H�|$L�d$AUAVAWH��@I��E��E3�A�L$�Ӗ����uA�����襗���3��|$$H��n��@��Lc�J��H���H�\$0J��HH;����C���{u;�
�L�����{u H�K���k���uD�pD�t$(��C�
����E��u H�K���CtH�K���HI��E��u?�CL�#L�nK+�H���.�袋.H��L��I��I��H��?L���D�D�l$ �H��XH�\$0I��H��m� ���E;����lj|$$H��m����X�J����H�D$0H��ttHc�L��mI�Ѓ�m I��H��H;�s�@L� �@	
�`H��XH�D$0����|$ Hc�H��H����Hk�XI���D���H�����AD�D��|$ ����A��H�\$`H�|$hL�d$pH��@A_A^A]�H�\$H�t$WH��@��H��H�L$ A��A���P��H�D$(D��A�|u��tH�D$ H��@B�Y#��3���t��|$8tH�L$0����H�\$PH�t$XH��@_�̋�A�E3�3��r�����H��hH��KH3�H�D$P�=�[f�L$@tfH�
�\H���u�U
H�
�\H�����H�d$ L�L$DH�T$@A��D�����=u[�����xu}�%][�H�d$8H�d$0��H�D$HL�D$@A�3��D$(H�D$ �<H�
�[H���t0H�d$ L�L$DH�T$HD������tf�D$@���Z���H�L$PH3���N��H��h�H�\$H�l$H�t$WH��P3�I��H��H��H;�tL;�t
@8*uH;�tf�)3�H�\$`H�l$hH�t$pH��P_�H�L$0I���N��L�\$0A9ku%H;�t�f�@8l$HtH�D$@�������H�T$0�ݿ��;���H�L$0D��A��~0A;�|+�I��H;���L�Ǻ	�D$(H�\$ ��H�L$0;�uHc�H;�r(@8ot"��@8l$H�4���H�L$@�����#����Vo���*@8l$HtH�D$@�����������A�H;���A�QL�ljD$(H�D$0H�\$ �H�Q;���������E3�������̹�"�����H��H�XH�hH�pH�x ATAUAVH��PL��H��H�H�E��M���FM��M��tM�uM��u*�n��H�d$ E3�E3�3�3���m���|$H��E��tA��|�A��$�A�.L�D$03�I�^A��~L�D$0@�ͺ�r���L�D$0�I��@@���H����t@�+H��뾋�$�@��-u���@��+u@�+H��E���SA���IA��$�?E��u(@��0tA�
�8�;xt
�;XtA��&A��A��u@��0u�;xt�;Xu@�kH��M��@3҃�A��D��@��E�JA��t	@�̓�0�A��t,�E�@��<w�� ���A;�s��A;�r"u;�v��M��uH��@��uM��IE�3��YA���@�+H��둽���@��u@��u:�ƃ�t���w��u';�v#��l���"@��t���
@��$������M��tI�]@��t�߀|$HtH�L$@�������M��tM�u@8|$HtH�D$@����3�L�\$PI�[ I�k(I�s0I�{8I��A^A]A\���H��83�E��L�‰D$ H��9�]u	H�
O�3��Q���H��8�H��8H��FH3�H�D$(L�D$ A���D$&����u���
H�L$ �H�L$(H3��2J��H��8��@USVWATAUAVAWH��H�l$@H�4FH3�H�E0L���E�!3�I��H���}L�MD��D��H�];��H�U�;����}��H�UA���;����}uz�EA���t`A������Hc�H�����H;���H�L	H��wlH�AH;�w
H�����H����	H+�H�\$@H��t<����NH��莻���x�E��L�úA�ω|$(H�|$ ������o���3��7��J��H��H��t���H���3�H��t�Lc�3�H��M����L�EE�̺A�ω|$(H�\$ ��E3�A;���M;�t;���L�|$8L�|$0�D$(D��L��3�A��L�t$ ��A;���I���D9}u,L�|$8L�|$0D��L��3�A��D�|$(L�|$ �^��A;�tWHc׹���H��I;�tBL�|$8L�|$0D��L��3�A�͉|$(H�D$ �A;�u
H���YI��I���A���tH�M�H�K�9��u�7I��H��H�M0H3��G��H�eHA_A^A]A\_^[]����3�D�B
����L��M��t<E�
I��A�A���wA�� �
H�A���w�� I��t
E��tD;�t�D+�A���3���H��H�XH�hH�pWH��PI��H��H��M����H�H�I���bG��H��u=��h��H�d$ E3�E3�3�3����g���|$HtH�D$@���������H��t�H�����w�H�D$0�xu#L��H��H�������|$HtZH�L$@�����L�MH�T$0��H�T$0��H���H��H��t��t;�t�+؀|$HtH�L$@�������3�H�\$`H�l$hH�t$pH��P_����H��8�=IYuAH��u'��g��H�d$ E3�E3�3�3����f�������H��t�I�����w��X����E3����H��8��H��8H��u&�g��H�d$ E3�E3�3�3���f��H���L��H�
�X3�wH��8���H���fRt
�
�R���}��H��t
��z���?Rt_H��$���H�L$03�A���q���H��$�3�H�D$@H�D$0�D$0@H�D$ H��$�H�D$(�%H�L$ ���8~������H��H�XH�hH�pH�x ATAUAWH�� H��3�3�D�G���ͪ��L��H���tPD�G3ҋ�跪��H���t=H��H+�H;����|A��WH��M��o
H��H;�u1�"f����f���H�\$@H�l$HH�t$PH�|$XH�� A_A]A\ú�����D��D��I;�H��EMNj�������tH�H+�H;�~����e���8u�e���
H��A�ԋ����L��H��3���U}]E3�H�Ջ��ҩ��H����T��������H�����H�H��H��H���u%�Je���
�_e��H��F�H�������E3�I�Ջ��u���H��������3����H�\$Lc�H��_M��A��I��Mk�XJ��B�D8F�\�A��D��A���@tX���tH��t(��t ��uHB�L�J��B�d8�B�L8�0B�L�J��B�d8�B�L8�B�d�B�L�J��B�d8�E��u���A���%�@H�\$���H��8H��u'�.d��H�d$ E3�E3�3�3���Cc����
��]�3�H��8��H��HH�d$0�d$(A�H�
8 E3ɺ@D�D$ ��H��NH��H��H��(H�
�NH���tH���t��
H�
�NH���tH���t��
H��(��H�l$WH��pHc�H�L$P�B����sbH�T$P��~L�D$P����zu��H�T$P�H��@�x����tH��H�8���|$htH�D$`��������H�D$P��~6��H�T$P��@�������t@��$�@��$�Ƅ$��� �b����*@��$�Ƅ$�H�L$P�D$@L��$��AA��D$8H��$��D$0H�D$(�T$ �QH�L$P�/�����2�������$�t
��$�����|$htH�L$`����H��$�H��p_�%�	�%�	�%B
��������ff�H��L�$L�\$M3�L�T$L+�MB�eL�%M;�sfA���M���A�M;�u�L�$L�\$H�����@UH��0H��H�MP�.D��H��0]�@UH��0H��H�M`�D��H��0]�@UH��0H��H�M@�C��H��0]�@UH�� H��H�H�ы��H�� ]�@UH�� H��
���H�� ]�@UH�� H���ȃ��H�� ]�@UH�� H��
诃��H�� ]��������@UH�� H��菃��H�� ]�@UH�� H�ꃽ�t
��m���H�� ]�@UH�� H��HcM H��H��]H���C��H�� ]�����������@UH�� H���$���H�� ]�@UH�� H��H�
�E��H�� ]�@UH�� H�����H�� ]�@UH��0H��M`���H��0]�@UH�� H����t��H�� ]�������@UH�� H��H�3Ɂ8�������H�� ]�@UH��0H��}pt3�聂��H��0]�@UH�� H��H�E3ہ8�A��A��H�� ]�@UH��0H��MP�8�H��0]�@UH��@H��}@t>�}Dt*H���Hc
H��H��L�MZ��Hk�XI���d��H����
���H��@]�@UH�� H��
�܁��H�� ]�@UH�� H��
�Á��H�� ]��������@UH�� H��裁��H�� ]����6Hdz������
8DPh������$0:FXhx��������		"	.	@	N	`	x	�	�	�	�	�	�	

6
P
`
v
�
�
�
�
�
�
�
@Nbp������T@tD@�@�t@��@8@1�RL(�(� %@�%@(null)(null)EEE50P( 8PX700WP  `h````xpxxxx	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~CorExitProcessmscoree.dllruntime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...<program name unknown>Runtime Error!

Program: ccsUTF-8UTF-16LEUNICODE�����������������������������EEE���00�P��('8PW�700PP� (����`h`hhhxppwpp         (((((                  H����������������������          h((((                  H����������������������                                 H�����������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~�����������������������������������������������������������������������������������������������������������������������������HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$Fatal error in launcher: %s
rbFailed to open executableUnable to find an appended archive.Unable to read from file#!Job information querying failedJob information setting failedstdin duplication failedstdout duplication failedstderr duplication failedUnable to create process using '%s'Failed to get exit code of processFailed to find shebangExpected to find terminator in shebang lineExpected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to be able to allocate command line memory"%s" "%s" %sRSDSu�|NbmC��E/�uKc:\Users\Vinay\Projects\SimpleLauncher\dist\t64.pdbb

2020t
d4r�L]��������
4R���
�p`P
�t
d	4R�L]!3!��b�p`0L]"�"��t
dT4
R���4	RpL]%%��d
4	RpL]^&m&��4	RpL]k'u'��	

4	
RpL]c(�(���(d	T42pdT42p)4dZ���
�p`P4��		�0d
T	4RpdT4�p
td
T	4R�$d�4��p4�p

4
2pL]�>O?�4r�
�p`P4�8
�t
d	4R�L]eCD�20L]�GH-�

4
2pL]�H�HF��H	If�42pL]fJ�JF��J�Jf�dT�pB

4
Rp42p
d4r����pL]wO�P��t
4R�	 
 � t d 4 ���L]<THT�V
t	dT42�d	4R�L]�XY�
�td
R���L][Z�Z��"Z�Z��td42�td42�L]�\�\��  d T 4 r����p
T4R���p`d	4RpL]�ac��d	4Rp	�����
p`P
0
d4
R����pL]dm�m�t42�		20RP
d4
R����pL]rEr�d
4R��pL]�s t��td
T	42���d4
Rp
t
dT4
r�

4
2p
d4
R����pL]�~)�/4qf���
�p`P4� 
d4
R����pL]�����r0

4
2p4�p
`P-
Etd4C�
����P4�Xd4�p1
5#td43r��
��P4�8d4�p2
0R02P
t
d	42���L]~�?�6�	BL]�:�P�:�	BL]Y�]�]�
d4r���
�pL],���q�	bL]@�O���O�
T4r���p`b4R
�p
`L]�c���!
!4!�����p`PrP

d
�pL]k�����dT42pT42p
�	td42�L]�����
�t
4r���L]����2�d��R��4�PdT
4�ptdT4����b4�('EC
��	��p`0P4�p�td
T	42���4�

T
�pd4
rpd42p,�4�0

40
.p
T4r���p`-d2T140,��p4�PB0*����6Hdz������
8DPh������$0:FXhx��������		"	.	@	N	`	x	�	�	�	�	�	�	

6
P
`
v
�
�
�
�
�
�
�
@Nbp������ExitProcess~SetInformationJobObject�GetCurrentProcessWaitForSingleObjectmGenerateConsoleCtrlEvent�GetCommandLineAAssignProcessToJobObject�GetExitCodeProcess�CreateProcessA�QueryInformationJobObject�CreateJobObjectAkGetStdHandleGetLastError;SetConsoleCtrlHandlerGetModuleFileNameA�DuplicateHandleRCloseHandleKERNEL32.dll�HeapFree�HeapAlloc�EnterCriticalSection;LeaveCriticalSection�TerminateProcess�UnhandledExceptionFilter�SetUnhandledExceptionFilterIsDebuggerPresent&RtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContextxGetCPInfonGetACP>GetOEMCPIsValidCodePage�EncodePointer�DecodePointerZFlsGetValue[FlsSetValueYFlsFree�SetLastError�GetCurrentThreadIdXFlsAlloc�HeapSetInformation�HeapCreateGetModuleHandleW�SleepLGetProcAddress4WriteFile|SetHandleCount�GetFileTypeiGetStartupInfoA�DeleteCriticalSection%RtlUnwindExiMultiByteToWideChar�ReadFiletSetFilePointerfFreeEnvironmentStringsA�GetEnvironmentStringsgFreeEnvironmentStringsW WideCharToMultiByte�GetEnvironmentStringsW�QueryPerformanceCounter�GetTickCount�GetCurrentProcessId�GetSystemTimeAsFileTime�GetConsoleCP�GetConsoleMode-LCMapStringA/LCMapStringWmGetStringTypeApGetStringTypeW
GetLocaleInfoA>LoadLibraryA�InitializeCriticalSectionAndSpinCount�HeapReAlloc]FlushFileBuffers�CreateFileA�SetStdHandle)WriteConsoleA�GetConsoleOutputCP3WriteConsoleW�HeapSizeaSetEndOfFileQGetProcessHeap�6@�6@2��-�+�] �f��P�@@�@
		


!
5A
CPR
S
WYl
m pr	�
�
�	��
�)�
���
���                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`@�`�y�!�������@~�����ڣ ��@����ڣ ��A��Ϣ���[��@~��QQ�^� _�j�2�����1~����@����C�@�@�@�@�@@#@��@�@��@�!@�@�@`@�����P@��@��@	X�@
��@��@X�@0�@�@��@��@h�@0�@�@��@��@ H�@!P�@"��@x��@y��@z��@�x�@�h�@���������
�
`�@`�@`�@`�@`�@`�@`�@`�@`�@`�@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@x�@t�@p�@l�@h�@d�@`�@\�@X�@T�@P�@L�@H�@@�@0�@$�@�@d�@�@�@�@��@��@��@��@��@��@��@��@��@	�!@.0#@�1@�1@�1@�1@�1@�1@�1@�1@�1@@#@.�p��PSTPDT�#@$@����������������������������;Zx����0Nm����:Yw����/MlKr�t������C�Dh�hj�l{�|�����������8�M��P����J�T6��8_�`��������F�Ho������C�D� �� ]!�`!}!��!�"4��"�$\��$$%x�$%�%0�%�&���&'�'�'��'#)�$)6)�8)�*��*,�,e,(�h,M7<�X7}8`��89l�P9p9�p9�9��9�9���9�:���:<�� <><�@<�<0�<�>���>t?�t?@8�@{B�|BtD�tD�D��DF�XG�G���G%H8�DHiH�lHIX� I�I@��I�I���I�J��K�K���K�L���L�L��L�M��M�M���M�M���MN��(N[N�\N�N@��NGO@�HO�P�QsQ��tQ�S ��S�S��ST��T	W4�WxW0xW�Wl��W�Xl��X4Y��4Y�Y��Y�Y���Y�Z���Z�[��[\0 \]�]L]@�L]�^,��^�aH��ac`�0cTc���c�d���dol��pl�m���mn�n�n���o�p��p�p���p^q�`q�r��rPs@�Psht8�ht�t���t�t��t�t�u�v0�v�wl�x�yd��y�z���zz|��||�|@��|�|@��|�}���}=~@�@~w��xֆ�؆	���_���`�ψ�Ј3���4�Q��T���8����8���ފ@����L�����c���d��0��<��%�\�(�������*���,���������8���8�ͧ�ЧY��\�1��4�����Z���\�a��d�{���A�D�g�4h������!�T<�q��t�h��h���������������������־ؾ
�������f��p��0 ���D��P��P���T �<��<�����������Q��l������ �� �s�t���P�a��d�����������@��D�HD��d�S��T���l�������<�t`������������������������-��-�F��F�_��f�������������������������6��6�J��P�q��q������������������2��2�K��R�k��(�p�������������0�eH�`�x�������	�b���d(�f���nh�(t�%�Й��x�h��h�H�Z�( @...GGGWWWiiiuuu����������������������������������̀�ww����ww||�����ww��������wwww��������ww��������f�wwwww|�����f�wwwwww����ff�wwwwww�����ff��wwwww���ffl����ww����ffffff��w����ffffffl�w������ffffff�w�����ffffff�|����������ff��������ffff�������ff��R\I���lffl���)����ff�ح���������2L���������18�������Ϥ"������A<��������ΣT��π�����U���������������������������؀����������������������?������������������?�?�?�?�?�?�������������( 444MMMSSSzzz������������������������������p�p�����{p{��f���fko�f�����_fffk�_�fff��[���f}��UUU�fL4�UUU_kJqO���_�~�'�[U_����U�����������wwwww{~����������������( @%%%+++000===AAAIIIMMMQQQVVVYYY]]]~dFgggjjjmmmrrruuu}}}�u?�z=�~;�gE�kC�oA�r@��:��I��b��pƏKУk(��,�1�?�5�<�\�C�K�Q�s�U�[�c�b�����������������������������������������ð����������������������������������������������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$"  _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_L'%$"_I_MMMMMMJJ__('%%_I_CEMIJJMEM_(''*_I_?BMDJEMDMF_)(-LI_MMMCMMMMM_________<____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/
N______MMMMJIDAI_9/	HJJMMJMMMJ??BAI_A7503	IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O;
@__C_C?J?AJI_?A_DJJI@O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ�����?������������������?������������������?�( 444MMMRRRYYY~eGuuu}}}�x>�iE�rC��E��~7�?�H�V�b�x����������������������������������������������������������������������������������/!P7pL�c�yϏ���1��Q��q�������������/Pp"�,�6�@�J�[1�qQ��q�������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������!%///* !*/"(%%'%/)
/!#''////+/+"*(/
/

!%(/
(

  (*/(///)
*/
	)*

	/"/////	/+///#
		+ !%//
+"*+'#+//+'!%*++$++!+!    !!!<(0` !!$&			&"

 ���W���������������������������������ܱ��Nj+<<</	&&&#&[[[?6666��׏��������������������������������������������Ҟ���BBB3"


mmm3����,����!!!4777&�����������������������������������������������������ʟ���}���}___E���OpppD���P,)+3���Z2226DDD(���,�����###5��������������������������������������������������������������������������������չ�������������5�������,�������������������������������������������������������������������������������������������������������������,������Ì222"��Є�����������������������������������������������������������������������������������������������������&&&2����   4888&�������������������������������������������������������������������������e��?��4��/��+���.���R�������ӎ����������$$$5��Ď���������������������������������������������������������������������D��@��;��7��3��/��*���&���"�����������������������������������������������������������������������������������������W��G��C��?��;��6��2��n������f��0�������������nj333"��ӄ��������������������������������������������������������������������O��K��G��B��>��:��5��p������i��$�����������!!!4888&���������������������������������������������������������������������S�N��J��F��B��=��9��5��0��,��(���������������%%%5��ǎ���������������������������������������������������������������������V�R�N��I��E���������������������������������������������������������������������������������������������������������ѹ���|J��q?��o@�����Z�U�Q�M��I��D��@��<��7��3��/��+���&���"���-����������������Ɍ444"��ք�������������������������������������������������̴��w<��u=��s>��q?�����]�Y�U�P��L��H��C��?��;��7��2��.��*���%���!����������������"""4888&���������������������������������������������������d��y<��w=��u=��s>�����a�\�X�T�P��K��G��C��>��:��6��1��-��)���%��� ���O������������Ñ%%%5��ʎ���������������������������������������������������A��{;��y<��w=��t>�����s�`�\�W�S�O��J��F��B��>��9��5��1��,��(���$���(����������������������������������������������������������������������9��|:��z;��x<��v=�������s�_�[�W�R�N��J��E��A��=��8��4��0��,��'���#�������������̌555"��ل���������������������������������������������������9��~9��|:��z;��x<���o�����������������������������������������m��8��3��/��+���'�����������"""4:::&������������������������������������������������������8���9��~:��|;��z;��w<��u=��s>��q?��o@��mA��kB��iC��gC�dD��uZ������;��7��3��.��*�������������Ǒ%%%5��̎���������������������������������������������������È>���8���9��}:��{;��y<��w<��u=��s>��q?��o@��mA��jB��hC��fD�~dE��uZ�����?��:��6��2��5�����������������������������������������������������������������������������Оa���7���8��9��}:��{;��y<��w=��u>��r>��p?��n@��lA��jB��hC��fD�}dE�����B��>��:��5��^������������ό555"��܄����������������������������������������������������������ѳ�„7���7���8��9��}:��{;��x<��v=��t>��r?��p@��n@��lA��jB��gC��eD�����F��A��=��9������������"""4;;;&�����������������������������������������������������������������ŌC���8���9��~9��|:��z;��x<��v=��t>��r?��p@��mA��kA��iB��gC�����I��E��L��������������ɑQQQJnnn����������~~~�������������������������������������������������������������������������������������������Į��q?��o@��mA��kB��iC�������������������������HHH�"""���������������vvv������������������������������������������������������������������9��~:��{;��y<��w<��u=��s>��q?��o@��mA��kB�������������:::�'''�___���������sss�ttt��������������������������������������������������������������8�Ϧu�����ǣv��y<��w=��u=��s>��p?��n@��lA��������888T����---6fffnddd�%%%�"""�����OOO�SSS������������������������������������������������������������ċD�ҧu�����ʤv��{;��y<��v=��t>��r?��p?��xM�����<<<�MMM�������̑&&&5����;;;�<<<�xxx�QQQ�;;;�KKK����������������������������������������������������������8���8��~9��|:��z;��x<��v=��t>��r?�̷������999�����������������������VVV�###�)))�444��������������������������������������������������������������������ѳ�͝b���@��~9��|:��z;��}C���g��˶����Ӎ���������󑑑�����ZZZ�lll�;;;�!!!�"""�)))�___���������������������������������������������������������������������������������������&&&2����:::�ppp�{{{�___�WWW�WWW�:::�!!!�"""�***�www�������������������������������������������������������������������"""4888&���,������̑999����Ԗ���JJJ�|||�lll�:::�"""�BBB�XXX�|||��������������������������������������������������������������������$$$6�������,��������������������������������uuu�KKK�CCC�@@@�...�www����������������������������������������������������������������������������������*������Ҍ666"������������������������KKK�aaa�LLL�WWW��������������������������������������������������������������@��������$����"""4;;;&���������������������nnn�fff�!!!�$$$�999������������������������������������������������������������444]ttt|������ȇ������ɑ&&&5��Ў������������������������vvv�mmm�VVV�{{{�OOO����������������������������������������������������������������ڥ�����������������������������������������������aaa�CCC�����ppp�������������������������������������������������������������������������ό555"��ބ����������������������������������|||�MMM�����fff���������������������������������������������������������������"""4;;;&�������������������������������������������\\\�����������������������������������������������������������������Ǒ%%%5��Ύ�����������������������������������������������������������������������������������������������ݧ�����������������������������������������������������������������������������������������������������������������ܦ������͌555"��ۄ�����������������������������������������������������������������������������������ۥ����"""4:::&������������������������������������������������������������������������������������ڤ������Ñ%%%5��ˎ�����������������������������������������������������������������������ܤ��������������������������������������������������������������������������������������������������ׇ
������ww���?ww�?�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww��ww��ww��ww��ww��ww��ww�?�ww��ww���ww���ww( @ ����������������������������������!!!0\\\JeeeQ666D555A0$
�������v�H��<��6��0��2��\�������7���q��������������������ڴ���vvvj&&&D1"����g�L��F��@��;��5������?��������������������������������������������������к����V�Q�K��E��?��9������(�����������a���V�������������������������������������[�U�P��J��D��>��8��2��-���������uuun{{{j���������������������������������������`�Z�T�O������������������������������������������������������������������������V��o@��lA�����b�_�Y�S�M��G��B��<��6��0��+���%���<���������������a���V�����������������������m��t>��q?��n@�����b�b�^�X�R�L��F��A��;��5��/��)���$���Y����������wwwn}}}j����������������������~C��v=��s>��p?�����b�b�a�]�W�Q�K��E��@��:��4��.��(���+���������������������������������������{;��x<��v=��s>�����b�b�a�[�V�P��J��D��?��9��3��-��'��������������a���V����������������������~:��{;��x<��u=���p���������������������������������r��=��7��2��,����������yyynj�����������������������9��}:��z;��w<��u>��r?��o@��lA��iB��fD�}dE�|cE�|cE���i���B��<��6��1��������������������������������������?��9��}:��z;��w=��t>��q?��n@��kA��iC��fD�}cE�|cE�}dF�����G��A��;��=�������������a���V���������������������ңi���8��9��|:��y<��v=��s>��q?��n@��kB��hC��eD�|cE�|cE�����L��F��@��m����������zzzn���j�������������������������ʓP���8��~9��{;��y<��v=��s>��p?��mA��jB��gC�eD�|cE�����P��J��\��������������������������������������������������������������������������������¯��mA��jB��gC�~dE��������������������������a���V��������������������������������������}:��z;��x<��u=��r?��o@��lA��iB��fD���������|||n���m���������������������������������������9��������w=��t>��q?��n@��lA��iC�������������JJJ��������������������������������������������őP��������y<��v=��t>��q?��n@��~Y������������VVV�???�www�����iii�����������������������������������Ρk���A��|;��y<��v=��yF���p��������>>>3@@@y����~~~obbb�000�kkk�@@@������������������������������������������������������������������---U��������������<<<�&&&�[[[�������������������������������������������������������6���uuu�sss�WWW�III�$$$�&&&�qqq�����������������������������������lllg|||s���4����bbb�hhhƑ�������UUU�000�QQQ�}}}��������������������������������---{bbb�����(����������������������iii�LLL�BBB������������������������������������������������������a���V����������������ggg�+++�NNN�������������������������������������������|||n���j����������������]]]�ttt�kkk�������������������������������������������������������������������rrr�www���������������������������Ӧ�������a���V���������������������������������������������������Ӧ����zzzn���j�������������������������������������������Ӧ�����������������������������������������������������������ˉ��?������������������?�?�?���������������?�(  ������C�������������������﫫�o���������I�����������������������������������������ਨ������������S��=��?���������������������������������_�Q�F����4���������������������������������a�Z��������������������������������������м���oE�����c�a�X�M��B��7��0��������������������~I��q?�����c�`�V�K��@��5��8��������������������z;��u=���q�����������������v�>��3����������������������E��y<��t>��n@��iB�~dE�}dF�������G��H������YYY�uuu����������ġ���=��x<��s>��mA��hC�}dE�}eG�����S���������444�|||����������������������������gC�}cE�������������������������MMM������������������~>�����q?��kA��iG������������������RRR��������������¢���G��u=��xK�ʺ��������������������������������������������������������������������������������������������������������������������������������������������~�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A  �(  �h00 �%   � h<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD�������Ȣ��0�8�`��أ࣐����8�X�x���ث���� �(�8�H�X�h�x���������Ȭج����(�8�H�X�h�x������� �`�h�p�x�������������������ȡСء������� �(�0�8�@�H�P�X�`�h�p�x�������������������ȢТآ������(�@�H�P�X�`�h�p�x�������P�X�python3.4/site-packages/pip/_vendor/distlib/w64.exe000064400000263000151735047410016043 0ustar00MZ����@���	�!�L�!This program cannot be run in DOS mode.

$p���4���4���4���g�5���=�u����=�r�X���=�d�=���=�b�7���4���U���=�x�5���=�e�5���=�`�5���Rich4���PEd�1�R�"	��4*@�fv@��(P�P@`	����.textV�� `.rdata�+�,�@@.data�6�@�.pdata`	@
@@.rsrc�PPR@@.reloc��b@BL��I�SM�CM�K SWH��HH���H3�H��$03�;���L�ʺI�CD�B�H�L$0H�D$ �}3H�
V���H��H��H;�u,H;�tJH�E�H���H��H;�uH��w��#L�6�H�T$0A�3��D$(�f�|$ �й�7��H��$0H3��FH��H_[�H�\$H�t$WH�� �r�3�H��L�ًօ�x5�Lc�I�����
L��H��t����A;ID�I��A+��y�H�t$8H��H�\$0H�� _�H��H�XH�hH�PVWATAUAVH��@L��L��H��H�H3�H�h���;�H�f����f���H�L$xD�E3��H�L$x��H�L$x������D��;�L�E3�����L�L$xD�uI��A�I���D�ML�&H��I�����H��H;�tH�L$ D�EH���iA+����H����H�L$xA���;�H��L�E3����UL�L$xL��I��H���BL��A�H��H���j�����H���H;�H�����o���H�L$ H��A��li+�H�����
+\$0H�L$x+\$,��H�E3�����L�L$xA�I��I�����H�Q�H;�H��������N�\#�M;�r�N�fA9t
M+�M;�s��I��H�L$x�L�\$@H��I�[0I�k@I��A^A]A\_^��H�\$H�t$WH��@H��H�����H�#�D$0�L��H��L��H�׉t$(�d$ ���؅�u�ͼ��D�H�t$X��H�\$PH��@_��H��(��u�
r��t3�Z��H��(�H�\$WH��pH��3�3�f�L��$�A��H��H��$��	H��H�D$ �2���t��$��u��3�H�!������$�0L��$�A���	H����H�������3�H�L$pD�Bh�gO������D$ph�ĻH��$�H�����H������F�����������H��$�H���s���H������������r�H��$�H���J���H�������H�
�����DŽ$��W�L�\$PL�\$HH�D$pE3�H�D$@H�d$8H�d$0�d$(E3�H��3��D$ ��H���L�Nj����D�\$`H�T$PH��D�����H�L$X���H�L$P���u�H�L$PH��$����H�c����4�����$��'����H�\$H�l$H�t$WATAUH��`H��H3�H��$P�!��8"t� ��"H����H���3�H;�u	L�%(��L�`����;�tI��A�$@:�u�L�-��3�I��D����=�"��uL�-�H��A�lH�L$@H�����P�����H;�H���H�����I���H��H��H��H;�s�8
t�8
t
H��H;�r��H��H;���H�|�������@�/���;�tH��@8.u�>#��H�������������;�t
H�Ɗ@:�u�>!��H������������;�t
H�Ɗ@:�u�3�I��I��I�ɍP�H��H��L�A�I���I��H��H��L�I���H��I�\H���H�S�H;�H��@�ŋ��B���L�d$0L�
n�L��H��H��L�l$(H�t$ �FH�������H��(H�1��
'�������������������������ff�H;
��uH��f����u��H���	�@SH�� �������H�
���H��H�� [H�����@SH�� ��H�
����H��tH���H��ַH��t���H�� [����@SH�� �������?���̹��̹���H;�s-H�\$WH�� H��H��H�H��t��H��H;�r�H�\$0H�� _��H�\$WH�� 3�H��H��H;�s��uH�H��t��H��H;�r�H�\$0H�� _����H�\$WH�� H�=Z��tH�
O�b��t��>�H�R�H�
#��~�����uZH�
7��H���H�=���H�H��t��H��H;�r�H�=�tH�
����tE3�3�A�P��3�H�\$0H�� _��H�\$H�t$D�D$WATAUAVAWH��@E���D����B��=>����*�D�%�����H�
P�KH��H�D$0H����H�
+�.H��H�D$ L��H�t$(L��H�D$8H��H�|$ H;�r�H9u��H;�r\H���H����H���H�
���H��H�
���L;�uL;�t L��H�\$(H��H�\$0L��H�D$8H��H�D$ �H��H�
ŷ���H��H�
ҷ����E��t
��)E��u&��A�L$�A������A�����H�\$pH�t$xH��@A_A^A]A\_���E3�3��j�����E3�A�P�\���3�3�D�B�O�����̺3�D���=����@SH�� ��H��H����#H���#H����H���#H���v#H���� H����H����H�
����zH���H�� [��L��M�K H��8I�C(I�C�I�c��/&H��8���@SH�� H���AH�����H�CH���H�H���H�KH�
��H;�t����`�u�2H�H�G�H9CtH�C����
9�u	�)H�CH�C���u����C��o�H��H�� [����@SH��@�=�Hc�uH�?��X���VH�L$ 3��&���H�D$ ��~L�D$ ����2D���H��@D�XA���|$8tH�D$0����A��H��@[���H��t7SH�� L��H�
l3����u�H��²����H�� [����@SH�� �d$@L�D$@�c3H��H��u9D$@t��H��t���L$@�H��H�� [����H�\$H�t$WH�� H��H���w|�H��HE�H�
�H��u �������g���H�
�L��3�a�H��H��u,9�tH���U!��t
��6��+�H����/!��3�H�\$0H�t$8H�� _����:�t
H�����u�:�uH���3����M��t
8t	H��I��u�I��H�H#��H�\$H�t$H�|$ ATH��@H�d$0E��H��H��3�H������u'��H�d$ E3�E3�3�3��3���3�H������u'�]�H�d$ E3�E3�3�3��r3��3�8����u$�+�H�d$ E3�E3�3�3��@3��g�#7H��H�D$PH��u��3��F�>u"���H�H�L$0�j8��3��L��E��H��H���4H��H���|3H��H�\$XH�t$`H�|$hH��@A\����@SH��0I��L��H��H��u%�sH�d$ �E3�E3�3�3ɉ����$A��H��I���~���H�H��t3���1�H��0[��H�\$ UVWATAUAVAWH��03�L��L��H�L$xM��M��H��H��$�H��L;�t)L;�t$L;�u9��H�\$ �E3�E3�3�3��3�H��$�H��0A_A^A]A\_^]�H��$�H;�t3�H��I��L;�v)H���tL��3�I���BH��H;�t�3�H��I��L;�w�I��I��GH��tD�O$�A�D�L$pH���g�GA����taLcwE��tS�/I;�DB�E��L;���L�H��H�L$x�AD)wA��L�t$xH+�HH��$�D�L$pL�H+��L�t$xE��I;�rhE��t 3�I;�vA��E��A���	H��D��I��D+��
D��I;�EG�A��H;�wuH����@E��L�t$xI�֋��Q?�������tw��H+��s���H���V6���tdH��$�H��t*A�D�O$H��I��H��D�L$pL�t$xH��$�H������H���t
L��3�I���CA�H�d$ �"�����O H+�3�H��I�������O��I���������H��H�XH�pH�xL�` AUH��0I��M��H��L��M��trM��tmH�\$`H��u4H���t
L��3��@�z�H�d$ E3�E3�3�3��3��1H���/�H�\$ L��M��H��I������H��H���0H���3�H�\$@H�t$HH�|$PL�d$XH��0A]����H��8L�L$ M��L��H���,���H��8����H��H�XH�hH�pH�x ATAUAVH��0H��H��u'��H!\$ E3�E3�3�3�������X��>�{Lc�}�c3�A��D�B�4D��xҋS��u
+s����;L���+k��t<I��I��H����I��Hk�X�D�tH�C�
�8
u��H��H;r�u������x��
��Z��������{u3��+{M��M��{I��A��K��Mk�XA�D�tz3�A��D�B�nC;�u#H�C��H��
�8
u��H��H;�r��c
sG�CE3���A���:C�������;�w�Ct	�c
��s�{$H��J��A�Dt��+��D5H�\$PH�l$XH�t$`H�|$hH��0A^A]A\��H�\$H�L$WH��0H��3�H������u%��H�d$ E3�E3�3�3������$-�H�������H���-��H�\$HH��0_�H�\$H�l$H�t$WH�� �AA����H�٨�u�����j���3�AA��u	������H���VCD�[E��y
A��D�[�A��tA��tA��
r�C$H���<D�Nj֋���A���@�ōE�H�\$0H�l$8H�t$@H�� _���H�\$H�t$H�L$WH��0A�؋�H��3�H������u%���H�d$ E3�E3�3�3���
���R��t/��t*��t%��H�d$ E3�E3�3�3��
�����+�D��H�������H���C,��H�\$HH�t$PH��0_��H�\$WH��0��H��H��u#�BH!\$ E3�E3�3�3���X
��F�A�t:�BH�ˋ��EH���[;���hD��y���H�K(H��t
���H�c(�c��H�\$@H��0_����H�\$H�L$WH��0H�ك�3�H������u$�
�H�d$ E3�E3�3�3�����&�A@t�a��*�H��������H���;+��H�\$HH��0_���H�\$H�t$WH��H�L$0�K���MZf9~��ubHc���H�5n��HƁ8PEt3ۉ�$��N�f9Ht3ۉ�$��8���w3ۉ�$��$3�9���É�$��3ۉ�$�H�5
�������'��u!9=|�u���������@��u!9=R�u�������[��F��;��y
�������H�
�HH����G��y
����D��y
�	��������t�����D@�|$l�T$pA�
DE�L��3�H�������D$ ��u�����������$�u������������L��$�I�[I�s I��_����H��(�IH��(������H�L$H��H�
�����L���L�\$XE3�H�T$`H�L$X諠H�D$PH�|$PtAH�D$8H�D$HH�D$0H�D$@H�D$(H���H�D$ L�L$PL�D$XH�T$`3��Y��"H��$�H�L�H��$�H��H���H�2�H���H��$�H����z�	��t�H���H�D$hH���H�D$p��������RI3���H�
���m��=��u
��*I����	�H��>�H�Ĉ���H�%e��3�H�%[����H�%Y��H��(�
f����t
�[��
T��H��(����H�\$WH�� H��H��H�a�H����Aǁ�ƁtCƁ�CH���H����
�?�H�����
�)���H���H��uH��H���H����T!����H�\$0H�� _���H�\$WH�� �̣�
~����f�H��H��uH�H���UHH��H��t3�
S�H��B�H�˅�t3����F�H�K�����3ۋ�&�H��H�\$0H�� _�@SH�� �q���H��H��u�H��H��H�� [�H���+H�\$WH�� H��H�I8H��t� �H�KHH��t��H�KXH��t��H�KhH��t��H�KpH��t���H�KxH��t���H���H��t���H���H���H;�t���
��H���H�L$0H��t��uH���H�L$0H;�t�y���
�b��X�H���H��t+H���7 H;=@�tH���H;�t�?u	H������H����H�\$8H�� _����@SH�� �I�����t`H�
�������������tH����mFH��H��t1�
k�H��Z���t3�H�������^�H�K��������3�H�� [����H�\$H�|$L�l$ AVH��0L�5$���3�I��;t��H����r�����wK���|��dK��u
�=���a�����H�=��A�L���H��I���J��tH�d$ E3�E3�3�3��H�u�A�3��j��Ϡ��u1L�T�H�
N����cJ��tH�d$ E3�E3�3�3���H�
$��IH��H��<vFH�
��IH���L���H�L8�A�H+��pH��tH�d$ E3�E3�3�3��oL���I��H���G��tH�d$ E3�E3�3�3��DLc�I��H��M�O�D��G��tH�d$ E3�E3�3�3��H�>�A� H���hE�E�����H��H��t2H���t,Hc�H�I�L��HI�T�H�d$ L�L$HL��H��A�H�\$@H�|$PL�l$XH��0A^����H��(��I��t��wI��u�=��u����������H��(��H�\$H�t$H�|$ATH�� L�%(�3�3�I�܃{u%Hcƺ���H��H���H��H���
��t-H�/�H����H;�|øH�\$0H�t$8H�|$@H�� A\�Hc�H�I�$�3�����H�\$H�l$H�t$WH�� H���H�-��H��H�7H��t�tH��$�H���L�H�'H��H;�|�H�H��t�{u���H��H;�|�H�\$0H�l$8H�t$@H�� _��Hc�H�*�H�H��H�%̞H�\$H�t$H�|$AUH�� HcپH�=O�u�h����N�8��������H��H�L�-��I�|�t���{�(��AH��H��u��3��Z�
�f�I�|�u/��H���h��uH���P���3��I�\��	H���2��H�
�������H�\$0H�t$8H�|$@H�� A]�H�\$WH�� Hc�H�= �H�H�<�u�����u�H��H��H�\$0H�� _H�%��H�
���@SH����d$pH�L$t3�A���0L�\$pH��$H��$L�\$HH�D$P���H��$H�T$@H��E3���H��t;H�d$8H�T$@H�L$`H�L$0H�L$XL��H�L$(H��$L��H�L$ 3��і� H��$�H��$H��$�H��$�H��$��D$p��D$tH��$��E�3ɋ�3�H�L$H� ���u��u�H��?�R���H���H���[����H�\$H�l$H�t$WH��0H��H�
R�A��I��H�����H��tL�T$`D��L��H��H��L�T$ ���%��k?L�\$`D��L��H��H��L�\$ �h���H�\$@H�l$HH�t$PH��0_����L�
q�3�I��D�@;
t+��IЃ�-r�A�w�
Á�D������AF��H�A�D���H��(����H��u	H����H��H��(�H��(���H��u	H�g��H��H��(�@SH�� �����H��u	H�C��H����v���L�+�H��tL�P���;���A�H�� [���@SH�� ��J��>H��H���>���H�KH�<H��u�C�H�#3�H�� [���H�\$H�t$H�|$ATAUAVH�� L���'��H�
��L��H�
����H��I;���H��I+�L�oI����I���DH��I;�sT�H;�HB�H�H;�rI���>3�H;�u�3�H�V H;�rFI���w>H;�t9H��H��H���^�H�k�I���O�H�H�K�C�H�H�I���3��l�H��H�\$@H�t$HH�|$PH�� A^A]A\����H��(���H������H��(��H�\$WH�� H��H�=��H�H��t��H��H;�r�H�\$0H�� _�H�\$WH�� H�˰H�=İ�H�H��t��H��H;�r�H�\$0H�� _�H�\$WH�� H�3��
H��j�H�H��H��u�H�\$0H�� _���������������H���MZf9t3��HcH<H�3��9PEu�f9Q�����LcA<E3�L��L�A�@E�XJ�LE��t�QL;�r
�A�L;�rA��H��(E;�r�3��H�������������H��(L��L�
"��I���j�����t"M+�I��I�����H��t�@$���Ѓ��3�H��(����H��H�XH�hH�p H�PWATAUAVAWH��@M�yM�!I�q8M+�AfM��H��L����3�H�H�L�@�9>�+H�^�C�L;����C�L;����{���;t�H�L$0H��I�Ѕ���~sA�}csm�u(H�=�tH�
�������t�I�����KA�H��I��I�F@�SMcMH�D$(I�F(I�M��H��H�D$ �G����H��;>sj�>���3��fI�y 3�I+�9.vTH�^�K�L;�r>�C�L;�s6H;�rH;�sA�E u/�;t	�H;�t#�H�T$xIDZI�D�C�M�A���H��;.r��L�\$@I�[0I�k@I�sHI��A_A^A]A\_����H��(�O�H���H��t����z@H��(��H��(H�
�����H�e�H��(���H�\$H�l$H�t$WH�� H���r�E3�H��I;���H���Lcu�H��9:tI��H��H��H�H;�r�I��H��H�H;�s9:tI��I;��CL�BM;��6I��u
L�ZA�@��%I��u���H���H����J����Lc���
��A�M��D;�}*I��H���A��I��M�\��
������D;�|ځ:�����uǃ���v�:��uǃ���b�:��uǃ���N�:��uǃ���:�:��uǃ���&�:��uǃ����:��u
ǃ������A�Љ���L�ZA��H������3�H�\$0H�l$8H�t$@H�� _���H�
��H�
��H�
��H�
������H�
}���H�\$H�t$WATAUAVAWH��@��3��|$p3��у��	������������������tM��t,��t_�T����H!t$ E3�E3�3�3��j�������L�%��H�
����|$p�L�%��H�
����|$p�L�%��H�
����|$p�u��H��H��u���kH���H��Lc��9YtH��I��H��H�H;�r�I��H��H�H;�s9Yt3�L�aM�,$�L�%,�H�
%���|$p�_�L��I��u3��M��u
A�M�-��̅�t3�����t��t��tL�|$8D�t$p�1L���L�|$8H�����uD���dž���D�t$p��u9�
���щL$0����;�}*Hc�H�H���H�d��‰T$0�
������I�$��t3��Z�;�u
�����A�����A��;�t
��t��uL���;�uD���3�L�\$@I�[8I�s@I��A_A^A]A\_����H�
��H�
��H�
��H��8�ڑD�؉D$ �=�u���E3�D�\$ A��H��8����H�
���@SH�� H��H�
�����H��tH��Ѕ�t��3�H�� [���H��H�XH�hH�p �HWH�� H��H����"�KHc�u����	�K ���4��@t
�j����"��3���t�{����H�C��H��K�C�{�����C�u/�WH��0H;�t�IH��`H;�u����I;�uH���yI�C���+H�S+kH�BH��C$��;�C~D�ŋ��H���W�� �K�?������t#���tH��H��H�T���H��Hk�XH��H�
<��A t3ҋ�D�B�)?H������H�K�D$0���H�T$0��D���G��;������D$0H�\$8H�l$@H�t$HH�� _����H�\$H�l$H�t$WH��`3�M��I��H��L��L;�u'��E3�E3�3�3�H�\$ �����L;�tH;�t�L��$�����A��L;�L��$�H�T$@G�H�T$0H�L$0I���D$HB�D$8A�Ӌ�H;�t7;�|%�l$8x	H�D$0��H�T$03�������t���9\$8�\.��ÍC�L�\$`I�[I�kI�s I��_��H��H�XH�hH�pH�x ATH��0I��I��H��H��M����M��uH��uH����3��H����H����I;�vP���L�FH�
�K�H�D$hL��H�D$(H�D$`H��H�D$ ������uo��8"�������H�
�KL��D� H�D$hL��H�D$(H�D$`H��H�D$ �4����D����uH���u�G�8"uC�=�D� �9��y8����u-�'��"����H�d$ E3�E3�3�3��/��H�\$@H�l$HH�t$PH�|$XH��0A\��H��8H�D$`H�D$(H�d$ ���H��8���H�\$H�l$H�t$WH�� H�YH��H��L��3���E3�H�}A�KA��D�]D�]D�]f�H�=~�H+���H��H��u�H����9�H��H��u�H�\$0H�l$8H�t$@H�� _���H�\$H�t$WH��H�s�H3�H��$pH��IH�T$P�������=3�H�T$p���H��;�r��D$V�D$p H�|$V�)�WD��D;�wA+�I��J�LpD�B� ��H�����uӋF�d$8L�D$p�D$0�FD�ˉD$(H��$p�3�H�D$ ��\�d$@�F�V�D$8H��$p�\$0H�D$(L�L$pD��3ɉ\$ �Y�d$@�F�V�D$8H��$p�\$0H�D$(L�L$pA�3ɉ\$ �jYL��$pH�N3�A�t�	��p�A�t�	 ��p���ƁH��H��I��H��u��?3�H�ND�B�A�@ ��w�	�B �A��w�	 �B��Ɓ��H��;�r�H��$pH3�����L��$�I�[I�s I��_��H�\$WH�� ��H������
r�tH���t	H����n�
����H���H�\$0H;7�tDH��t��uH��H�L$0H;�t���H�
�H���H���H�D$0�H�\$0�
�c�H��u�K �*��H��H�\$8H�� _�@SH��@��H�L$ 3�����%q����u%�b��,��|$8tSH�L$0�����E���u�8�����ԃ��uH�D$ ���@뻀|$8tH�D$0������H��@[�H�\$UVWATAUH��@H�E�H3�H�D$8H���I���3ۋ�;�u
H�������L�-	���H��I��A�98�'A�I�H��0��r����������K�;���H�T$ ���;���H�N3�A���~�^D9d$ ��H�D$&8\$&t-8Xt(�8�H;�w+�H�T7I�I+�u�H��8u�H�F���I�I+�u��N��t(��t��
tA;�t�����������FD�f��^H�~�ùf���9�����������H�N3�A��H�lmL���H�A�M�D�I��A8t18Yt,��A;�wL�L2A�A�A�AM�;�v�H��8u�I��M�M+�u��~��D�ft$��t��
tA;�u��������^H�VI�|���H��f�H��I+�u�H���|���3�H�L$8H3��	��H��$�H��@A]A\_^]��H��H�XH�pH�xL�` AUH��0��A����H������H��������D��;C��� �,*H��3�H;��|H���H��A� �q1�;H��A������D��;��$H�����uH���L�%�I;�t����L�%ۺH��������	�����
�X���C����C����C����׉T$ L�ô����}Hc��DKfA��H� �‰T$ ��׉T$ ��}HcʊDB����‰T$ ��|$ ��}Hcϊ�B����lj|$ ��H�C���uH�
6�I;�t���H�%���
���+���u&L�%ٹI;�tH���������3�D��A��H�\$@H�t$HH�|$PL�d$XH��0A]�H��(�=��u��������k�3�H��(�H�\$H�t$WH�� H��(H��H��tyH�
��H;�tmH��H��ta�8u\H�� H��t�9u����H��(�7XH��H��t�9u���H��(��WH�����H��(���H��0H��tG�8uBH��8H���q��H��H��H+��]��H��PH+��N��H��0�B��H��XH���H;�t��`u�UUH��X���H�{X�H���H9G�tH�H��t
�9u����H��tH�OH��t
�9u����H�� H��u�H��H�\$0H�t$8H�� _������H��H��t�H�� H��t�H��H��t�H��0H��t�H�AXA�H��H9P�tH�H��t�H�x�t
H�PH��t�H�� I��u�H��X�`����H����A���D	H��H��t�DH�� H��t�DH��H��t�DH��0H��t�DH�AXA�H�>�H9P�tH�H��t�D
H�x�t
H�PH��t�D
H�� I��u�H��X�D�`H������@SH�� H��H��tAH��t<L�L;�t/H�H�����M��tI���%���A�:uH�ȻL;�t���H���3�H�� [��@SH�� ���H�؋���
~�tH���t���H����+�����H���H�ü�V���H�ع��H��u�K �t��H��H�� [����H�l$H�t$WH��`Hc���H�L$@I���S��D�_A��wH�D$@H��@�y���H�T$@��@����:���t@��$�@��$�Ƅ$�D�J�@��$�Ƅ$�D��H�L$@�T$8L��$��A�D$0�AH�L$@�D$(H�D$pH�D$ �Q��u8D$XtH�D$P����3���D$p#ŀ|$XtH�L$P����L�\$`I�kI�s I��_���̉L$H��(E3��3���H���H��t#L�D$0A�3�H���D$0�j��H��(�H�\$WH��0I��H��H��t23�H�B�H��H;�s$�X�H�d$ E3�E3�3�3���m�3��]H���H��HD�3�H���wH�
b��PL��H��u-�=R�tH������u�H��t���H��t�H�\$@H��0_��H����@SH�� ������u��;�L�HcȺ�i��"H�=�H��u$�PH�ˉL���"H� �H��u��x3�H�K�H�H��0H��H��t	H�����E3�H�B�E�HI��L���I��H����I��Hk�XL�I���tI���tM��u�����I��H��0I��u�3�H�� [���H��(�{�=��t�UH�
v�H��(����@SH�� H��H�
��H;�r:H� �H;�w.H��H��������*H+�H��H��H��H��?�L�0��k�
H�K0�~H�� [��@SH�� ��H��}�����k�
H�J0��}H�� [����H��(H��H;�r7H���H;�w+�qH+�H��������*H��H��H��H��?�L����
H��0�{}H��(���H��(��}�r���z���
H�J0�R}H��(��H�\$H�l$VWATAUAWH��0�-<�I��E3�E3�E3ۀ: E�yE��H��L��uI߀; t��;at?�;rt3�;wt'�V�H�d$ E3�E3�3�3���k�3��9��3�A���	��I�A�׊����A�������ȃ�S~to�� ����tLA+�tB��t+��
t���u���E����E�׃�����@��@����@�E���w@��uq�������jE��u]E�׃� �]��TtJ��t:A+�t'��t������A��u3���5E��u(E�����'E��uE�����A��u�����s3����Iߊ������E�����I߀; t�H�
6�A�H���_�������H���I߀; t��;=�n���I߀; t�H���A�H����]��u
H�����MH��A�H����]��u
H�����*H�ԄA�H���]������H�����I߀; t��;���H�L$hE��D��I���D$ ��H[�����D=m�!F�D$hH�&H�fH�f(�F�nH��H�\$`H�l$pH��0A_A]A\_^�H�\$H�t$WH��03ۍK����3��|$ ;=����Hc�H�^�H�<�tkH��@�uV�`rO�G���w�O�Z������H�'�H�������L��I��@�tH�Ћ��}����H����lj|$ �x���Hc��X�'H�
��H��H�
��H�<�tXH��H��0�������uH�
��H�����L���I�$��$H���H��H��0�uyL�v�I���cH��t�c��cH�cH�#H�c(�K���N��H��H�\$@H�t$HH��0_����������������������ff�H���M3�M3�H�d$ L�D$(��rH����������fDH�L$H�T$D�D$I� ��������f��������f�����H�\$H�t$WH��0H��H��u$����H!|$ E3�E3�3�3�������A����@���t�� �A�����A�u�	1�H�AH�H����	D�G$H�W���M�G����������G�u_H���	���t<H���	���t/H���	H��H�5��Hc�H���o	D��A��Mk�XL��L���A�C$�<�u�o
�$u�Gt�g
r�G$H��O�H��H���������	G�g��H�\$@H�t$HH��0_���H�T$�L$SUVWATAUAVAWH��XA�����Hc�A��D�d$4�\$8A;�u���3��8�_���	�3�;���;����H��L��L�
����I����K���`$Hk�X�D1��������v�%���8�������;������H;�t�D�|18A�E�A�A�σ�t��u��Шt���L���d��Шt���A;�AB؋��L��H;�u���������=��$�3�D�B�x$L�
����L��K���`$L�\0@K���`$I��A�
�D0H���L0	A:���;���A�MK���`$A��A�I�UA�h�D�D0	D:�tbK���`$�L09A:�tQ;�tM�
K���`$A�H��A�h�D�D09A��u.K���`$�L0:A:�t;�t�
K���`$H��A�h�A�D�D0:K���`$L�L$0D��H�1H�|$ �ju;���HcT$0;�����H;���L������K���`$�D0��yA����;�tA�}
u�L0��d0�Hc�I��M��I�H�D$@L;��:�
A�$<�
@:�t
�H��I����H�D$@H��L;�sI�D$�8
u	I���L���K���`$L�L$0H��$�H�1A�I��H�|$ �{t;�u
�1s;�u{9|$0tuL�����K���`$�D0Ht"��$�
t'@�+K���`$��$��D1	�GI;�u��$�
u�
�3��$�A�H���%"��$�
L�N���t�L�C���@�+H��L;d$@����K���`$�D0@u�L0�	A�$�H�Ë�A+�A����;���A�I+��uI��A�����I;�rI+�A��B8�`t��B��`;�u�]���*A�����;�uHc�H��^K���`$�D0Ht;I߃��L0	|�K���`$I߈D19��u�K���`$I߈D1:Hc�H+����$���E��Hc�� �D$8L��$�A+���D��M�ʼnD$(3ҹ�L�|$ ��r��;�u�aq������A����D�d$4;�H�۠��J���`$@���|0H�;׺
tfA9Uu�L0��d0�Hc�I��M��N�<(M;��{�
A�$f���Ef;�tf�H��I���%I�G�L;�sI�D$f9u	I����L���K���`$L�L$0H��$�H�1A�I��H�|$ ��q;�u�up;���9|$0��L��K���`$�D0HtF�
f9�$�tKf�+��$�K���`$�D1	��$�K���`$�D19K���`$�T0:�WI;�u�
f9�$�uf��>��$�H�����D�B�7�
L�c���f9�$�t��
L�K���f�+H��M;�������"K���`$�D0@u�L0�A�$f�H����A+�D�d$4L��$�M;�tI���p���A���DD�A���i�Mo��u����	����������muD��뮋��������3��)�v���8�O���	E3�E3�3�3�H�|$ �e����H��XA_A^A]A\_^][��H�\$H�t$�L$WATAUAVAWH��0A��L��Hc����u���3ۉ�����	���3�;���;=_���L��L��I��L�=d�A��Mk�XK��B�L ��u.��������	H�\$ E3�E3�3�3���������A�������;�u+�z����S���H�\$ E3�E3�3�3��i�����n����T�K��B�D tD��I�Ջ��s�������
���	���������3U���)�
��������	H�\$ E3�E3�3�3������H�\$hH�t$pH��0A_A^A]A\_���H��8H��u%���H�d$ E3�E3�3�3���������AH��8���H�\$H�t$WH��0I��I��H��M��u3��fH��u%�I���H�d$ E3�E3�3�3ɉ�]�����<M��tH;�r
L��H���t�L��3��HH��t�H;�s����"뮸H�\$@H�t$HH��0_��������������������ff�H��I��rS��I�I��I��@rH�ك�tL+�H�H�M��I��?I��u9M��I��I��tfff��H�H��I��u�M��t
�H��I��u��@fff�ff�I��s0H�H�QH�QH��@H�Q�H�Q�I��H�Q�H�Q�H�Q�u��fDH�H�QH�QH��@H�Q�H�Q�I��H�Q�H�Q�H�Q�u��$�T�����H��H�XH�pH�xL�` AUAVAWH��H�L$ ��k��XD�b�I���L��E3�I;�u���{H�-�A�̉
�HL;�sCE�{I��A�C	
E�{E�{8A�C9
A�C:
E�{PE�{LI��XH��HL;�rË
��fD9|$b�IH�D$hI;��;L�hHc0I��9L�;���L�5���XI���;L��I;�tiI���Y�AĉP�I��L;�sAE�{I��A�C	
E�{A�c8�A�C9
A�C:
E�{PE�{LI��XI��HL;�rŋ�H��;�|�����L�5�A��A;�~~H�>�tkH�>�teA�Et^A�EuH��4kA;�tILc�I��H��A��Mk�XM$�H�I�$A�EA�D$I�L$������A;�tA�D$�������I��H��;�|�E��I��H��Hk�XHm�H�;�tH�;�t�K���C�A�D$���Ƀ�������E;�D�:iH��H���tJI;�tEH��{jA;�t7H�3����u�K@�	��u�KH�K�����A;�t�C����.�K@H�����A��H��H���Q����
���j3����L��$�I�[ I�s(I�{0M�c8I��A_A^A]����H�\$H�t$WH�� Hc�A�������NH���u����	���RD��E3���H���i�����u�Jh�3���t	��������H��H��H�$�H����H��Hk�X�d���H�\$0H�t$8H�� _���H�\$H�t$�L$WATAUAVAWH��0E��D��Hcك��u�>��3��8����	����3�;���;����H��L��I��L�=����Hk�XK���L0��u+�����8����	H�|$ E3�E3�3�3��������m���1N�K���D0tE��A�Ջ��������w���	����8�����N���)�w���8�P���	H�|$ E3�E3�3�3��f����H�\$hH�t$pH��0A_A^A]A\_����H�\$H�t$WH�� �A3�H��$<u?�At6�9+y��~-�8���H�SD�Nj��;�u�C��y��C��K ��H�K�c��H�t$8H�H�\$0H�� _����@SH�� H��H��u�5�,�j�����t����csH���������O����3�H�� [��H�t$H�|$L�d$AUAVAWH��0D��E3�3��N�����3��|$ A��;=����Lc�H���J�<�tjJ��B�t`�����H���J��A�t5A��u�9���A;�t%A��D�d$$�E��u�At����A;�AD��t$(H�T�J�������lj|$ �n�����@��A��AD��H�t$PH�|$XL�d$`H��0A_A^A]ù������H�\$WH�� Hc����TKH���tYH�����u	@���u
;�u�@`t�%K�H���KH;�t���KH���d��u
��d���3ۋ��@JL��H��H��A��H�s�H��Mk�XB�D��t���������3�H�\$0H�� _�H�\$H�t$ �L$WATAUH��0Hcك��u���3��8�k���	����3�;���;���H��L��I��L�-���Hk�XK�D��L0��u+�;���8����	H�|$ E3�E3�3�3��*�����a���J�K�D��D0t�������������	�����K���)�����8����	H�|$ E3�E3�3�3�������H�\$`H�t$hH��0A]A\_�@SH�� �A�H��t"�AtH�I�*����c����3�H�H�C�CH�� [��H��(H��8csm�u+�xu%�@ = �t=!�t="�t=@�u����3�H��(����H��(H�
�����c3�H��(�H�\$WH�� 3�9=��u�G��H���H�txH��HD؀; w	�;t3��t)�;"u	3���������M��tH��H����< w	H�Ê��u�H��H�\$0H�� _����H�\$H�l$H�t$WH��0�=U�u����H��3�H��u����<=t��H���
H�\���u�G�Hc��sH��H���H��t�H����;teH����
�;=�ptCHc�H���8H�H��trL��H��H���F��tH�d$ E3�E3�3�3����H��Hc�H؀;u�H�W�H���O���H�%G�H�'�Y�3�H�\$@H�l$HH�t$PH��0_�H�
ۥ����H�%Υ�����H��H�XH�hH�pH�x ATAUAVH�� L�l$`M��I��A�eL��H��A�H��tL�I��3�;"u3���@�"��H�Ë��9A�EH��t��H���3H�Ë���K��tA�EH��t��H��H��@��t��u�@�� t@��	u�H��t	�G��H��3��;���; t�;	uH����;��M��tI�<$I��A��3��H����;\t��;"u6��u��tH�C�8"uH���3�3҅����������H��t�\H��A�E��u���tO��u< tG<	tC��t7���JH��t��t�H�ÈH��A�E��H�����tH��A�EA�EH���Y���H��t�H��A�E����M��tI�$$A�H�\$@H�l$HH�t$PH�|$XH�� A^A]A\��H�\$H�t$ WH��0�=Z�u����H�=��A�3�H������_H�
�H�=ΣH��t�;uH��H�D$HL�L$@E3�3�H��H�D$ ���Hct$@H��������H;�s\HcL$HH���sQH��H;�rHH����H��H��t8L��H�D$HL�L$@H��H��H�D$ �g���D�\$@H�=�A��3�D�����H�\$PH�t$XH��0_���H��H�XH�hH�pH�x ATH��@�
��E3�I��A�t$A;�u2�{_H��I;�t����!��]�
����xDΉ
�����I;�u�;_H��I;�u3��H��fD9#tH�fD9'u�H�fD9'u�L�d$8L�d$0H+�H�L��3�D�O3�D�d$(L�d$ ��^Hc�A;�tAH���H��I;�t1L�d$8L�d$0D�OL��3�3ɉl$(H�D$ ��^A;�uH���-���I��H���^H���s;�t	A;��L����a^H��I;��:���D8 tH��D8 u�H��D8 u�+��Hc�H���	H��I;�uH��^����L��H��H���MH���]H��H�\$PH�l$XH�t$`H�|$hH��@A\���H�\$WH�� H��H�d$0H�2��-�+H;�tH��H����vH�L$0��]H�\$0��]D��I3��\D��I3��]H�L$8D��I3��]L�\$8L3�H�������L#�H�3��-�+L;�LD�L���I��L���H�\$@H�� _�̃%���H�\$H�l$H�t$WH�� 3�H���H���0���H��H��u(9B�v ���[D���D;*�A��G�;�u�H�l$8H�t$@H��H�\$0H�� _�H��H�XH�hH�pH�x ATH�� 3�H��H��A��E3�H��H������H��H��u*9Ǭv"��I[D���D;��A��AG�A;�u�H�l$8H�t$@H�|$HH��H�\$0H�� A\��H��H�XH�hH�pH�x ATH�� 3�H��H��A��H��H���FH��H��u/H��t*9A�v"���ZD���D;)�A��AG�A;�u�H�l$8H�t$@H�|$HH��H�\$0H�� A\����H�\$H�l$VWATAUAVH��@A��L��L���X���3�H��H9Ы��H�
+e�ZH��H����H�eH���YH���sH������H��dH��H����YH�����H��dH��H�h���YH���ƴ��H�[dH��H�Q���YH��觴��L��H�I�H��t!H�dH��dYH��耴��H���H���H��L��H;�tcL;�t^H���b���H�
�H���S���L��H��t?H��t:��H��t-H��$�A�L�D$0H�L$ A�Q�H��A�ԅ�t�D$8u���>H�
��H;�t2���H��t(��H��H��tH�
m�H;�t�۳��H��tH���H��H�
?��³��H��tD��M��I��H����3�H�\$pH�l$xH��@A^A]A\_^�@SH��0L��H��t
H��tM��u,D��|����H�d$ E3�E3�3�3ɉ萼����H��0[À9t	H��H��u�H��uA��A�I���H����tH��u�H��uA������"�3�����@SH��0M��M��uH��uH��u 3��?H��tH��tM��uD�	��M��u,D��Ӽ���H�d$ E3�E3�3�3ɉ�����H��0[�L��L��I���uA�I��A�I�„�t,I��u��$A�I��A�I�„�tI��tI��u�M��uE�
M���f���I���uD�D�A�@P���E����"�m��������������������ff�H��H��H�tf��H����t_�u�I��������~I��H�M��H��L�H��I3�I#�t�H�P���tQ��tGH����t9��t/H����t!��t����t
��u�H�D��H�D��H�D��H�D��H�D��H�D��H�D��H�D��@SH��0H��t
H��tM��u,D��[����H�d$ E3�E3�3�3ɉ�o�����H��0[�L��A�I��A�I����tH��u�H��u������"�3������H��8��x ��~
��u��1����
���#�׺��H�d$ E3�E3�3�3�������H��8�H��8H��u&覺��H�d$ E3�E3�3�3��軹��H���L��H�
å3��VH��8��̹����H���b�t
�
膳���}���H��t
��z����;�t_H��$��cUH�L$03�A���I�H��$�3�H�D$@H�D$0�D$0@H�D$ H��$�H�D$(��TH�L$ ��T�褟������������������������ff�L��H+���I��ra��t6��t�
I�ȈH����tf�
I��f�H����t
�
I���H��M��I��uQM��I��tH�
H�H��I��u�I��M��uI���@�
�H��I��u�I���fffffff�fff�ff�I�� sBH�
L�T
H�� H�A�L�Q�H�D
�L�T
�I��H�A�L�Q�u�I���q���fff�f�H��r�� 
D
@H�����u�H���@L�
L�T
L�	L�QL�L
L�T
L�IL�QL�L
 L�T
(H��@L�I�L�Q�L�L
�L�T
���L�I�L�Q�u�I��I���q����$���ffff�fff�fff�f�I�I��ra��t6��tH�Ɋ
I�Ȉ��tH��f�
I��f���t
H���
I���M��I��uPM��I��tH��H�
I��H�u�I��M��uI���H�Ɋ
I�Ȉu�I���fffffff�fff�ff�I�� sBH�D
�L�T
�H�� H�AL�QH�D
L�
I��H�AL�u�I���s���ffff�f�H���w�� H��
D
@��u�H���@L�L
�L�T
�L�I�L�Q�L�L
�L�T
�L�I�L�Q�L�L
�L�T
�H��@L�IL�QL�L
L�
��L�IL�u�I��I���q����$���@SH�� E�H��L��A��A�L��tA�@McP��L�Hc�L#�Ic�J�H�C�HHK�At�A���H�L�L3�I��H�� [�y����H��(M�A8H��I������H��(����H�\$WH�� Hc�A��H�T$8����6H���u����	H���W�T$8L�D$<D��H���Q�D$8���u�IP��t	���Ƶ����H��H��H�'�H����H��Hk�X�d�H�D$8H�\$0H�� _����H�\$H�t$�L$WATAUAVAWH��0E��L��Hcك��u�B���3��8�����	H����3�;���;����H��L��I��L�=����Hk�XK���L0��u,����8�´���	H�|$ E3�E3�3�3��س��H���q���36�K���D0tE��I�Ջ����H����x����	荴���8H�����6H���*�v����8�O����	H�|$ E3�E3�3�3��e���H��H�\$hH�t$pH��0A_A^A]A\_��H�\$ UVWATAUAVAW�0�IH+�H�T~H3�H��$ 3�3�E��L��Hcىl$@E��u3���H��u.���!8軳��H!|$ E3�E3�3�3���Ѳ�����L��L��H�<�I��A��J��L�t$PMk�XA�t8@�@�@��t@��u	A��Шt�A�D t
3ҋ�D�B�Z����������H�ܡJ��A�D����w���3�H�T$XH���H���9YJ��I���fO������t	@�����CO!|$LI�܉D$XE���wD�t$X�
@����H�T$P�E3���
H�-H�H�T�A��A�|Pt A�DL�L$]A��D$\A�dPH�T$\�I������t4I��H+�I�H����H�L$DA�H���;����vH���A�H��H�L$D�;����UH�d$8H�d$0�L$XH�D$\L�D$DA�3��D$(H��H�D$ �N���H�D$PH�d$ H�
g�H��L�L$LH�T$\I�D��,M���B��A+�|$@9l$L���
E����H�D$PH�d$ @�l$\H�
�L�L$LD�E�H��H�T$\I���L�����|$L|{�D$@���e@��t@��u�E3�f��
f�D$DA��H��@��t@��u6�L$D��7f;D$D����E��t��f�l$D��7f;D$Dux��D$@��A+�A;������\$LL�t$P�l$@�������z���e苰���	蠰��������L�t$P��J�L�A�DLJ�D�A�DP�\$L�K��떋\$L�H��J��A�D���3�I��@����E�����S
D�t$@H��$ 3ɋ�A+�A;�s&�EH��<
u�A��H��H��H���H��H���r�H!\$ H��$ D��D+�H�h�D�t$@L�t$PL�L$HH��$ J��I��#K��t5|$HH��$ H+�HcD$HH;������ź
A+�A;��N�������J�����@����E���"�
D�t$@H��$ 3ɋ�A+�A;�s1�EH��f��
uf�A��H��H��H��f�H��H���r�H!\$ H��$ D��D+�H���D�t$@L�t$PL�L$HH��$ J��I��<J���J���|$HH��$ H+�HcD$HH;������ź
A+�A;��?�������E���NA�
H�L$p3ҋ�A+�A;�s.�EH��f��
ufD�H��H��H��f�H��H���r�H�d$8H�d$0H�D$p+�L�D$p�D$(U
�����+�3��D��H��$ H�D$ �
JD�������3�H�D$PH�d$ Hc�H�� E��H�
`�H��L�L$HD+�I��*I��tt$HD;����=H��D;�������A�
A+�A;��������I�H!|$ L�L$HE��I���H��t�|$H3������G��������d����~���H�țJ��A�D@tA�<$�.������������ �H���+���H��$ H3��E���H��$�H��0A_A^A]A\_^]���H�\$H�t$�L$WATAUAVAWH��0E��L��Hcك��u説��3��8聬���	����3�;���;����H��L��I��L�=����Hk�XK���L0��u+�R����8�+����	H�|$ E3�E3�3�3��A������m���-�K���D0tE��I�Ջ������������	����8�����.���)����8輫���	H�|$ E3�E3�3�3��Ҫ����H�\$hH�t$pH��0A_A^A]A\_����@SH�� �̖H�ٹ�c�H�CH��t
�K�C$��KH�C �C$H�CH�C�cH�H�� [��H��8���u
�"����	�R��x.;
��s&Hc�H���H����H��Hk�XH���D��@�"���H�d$ E3�E3�3�3��	���3�H��8��@SH��@��H�L$ �J���H�D$ D��H��@B�Y%��|$8tH�L$0����H��@[����@SH��@��H�L$ 3�����H�D$ D��H��@B�Y%��|$8tH�L$0����H��@[��H�
�t3�H��H9
�����H�\$fD�L$ UVWH��`3�I��H��H��H;�uL;�vH;�t�)3��H;�t�	�I�����v$�ͩ���E3�E3�3�3ɉH�l$ ������oH��$�H�L$@�8���L�\$@A9k����$���f;�vLH;�tH;�v
L��3�H������_����*�T����@8l$XtH�L$P����H��$�H��`_^]�H;�tCH;�w<� ����"E3�E3�3�3ɉH�l$ �5���@8l$X�H���H�L$P�����7����H;�t�@8l$X���H�D$P��������H��$���$�A�KH�D$8H�l$0L��$�A�3҉|$(H�t$ ��D;�t9�$�����H;�t���C��z�����H;�tH;�v
L��3�H������?����"E3�E3�3�3ɉH�l$ �T���@8l$X�g���H�D$P�����V���H��8H�d$ ���H��8�@SH�� �B@I��tH�zuA��&�B�x
H��H�������������u	��H�� [�̅�~LH�\$H�l$H�t$WH�� I��I���@��L��H��@�������?�t���H�\$0H�l$8H�t$@H�� _����H�\$H�l$H�t$WH�� A�@@I��I���H��tI�xuA�7��~3�ML��H�������H�Ń?�u�����8*uL��H�ֱ?������H�\$0H�l$8H�t$@H�� _���H�\$UVWATAUAVAWH���H�qH3�H��$�3�H��H�L$hH��H�L$xI��M��D$`D��D$TD���D$H�D$X�D$P����E3�I;�uA�k���3�E3�E3�3�3��H�\$ ����8�$�tH��$��������A���C@L�
pp����H���f��H���A;�t(���t#Lc�L�
Gp��I��A��H��Mk�XM��`$�
L��L�
$p��A�@8u)A;�t���tHc�H�ƒ�H��Hk�XI��`$�B8�tA蟥��3�E3�E3�3�3��H�\$ 賤��8�$�tH��$�����A���KE3�I;�t�@�/A��D�T$@D�T$DA��L��$�A:��H��$�A�H��A;�H��$����E�<XwH��B�������A��Hc�H��Hc�H�B��	�����T$\���/�����A;����������@�������������������<@�Ń�d�~����A�@��C����E�.��G�%��Stm��X����Zt��a���c���HI�EI��I;�t/H�XI;�t&A���s��D$P+���D�T$P�H��s��A��0uA��I�]E;�A�ǹ���D�I��A���I;��D$PHD�sH����A��0uA��I��A��t,E�M�H��$�H�L$DM���W���E3�A;�t�D$X�A�E��D$D��$�H��$��M�D$p@�� A��@E;�H��$�A���-A��k��e���g~σ�i����n����o����pte��s�������u����x���'�S��fD9t	H��A;�u�H+�H��!I;�HD�rH���
��D8tH��A;�u�+ˉL$D�A�A����D$`A�E��y`Q�D$L0A�Q�D$M�SA�E��yDA��	�=I�}I�����E3�A;��l���A�� tf�7��7�D$X�lA��@A�
�T$HA��rA��s
M�EI���.I��A�� tA��@tM�E��E�E��A��@tMcE��E�E�A��@t
M;�}I��A��A��r
A��rE��E;�}A��A��E;�EO�D�t$`I��H��$�H���#ʉL$HA��A��A;�M;�t 3�I��Ic�H��L���B0��9~AƈH����H��$�A�����+�H��A��	�D$D�A;�t	�;0�H��D$D�0�u@��guAA��9E;�EO�A���~)A��]Hc����H��$�H��tH�؋��A��I�EH�
XpI��@��Hc�H��$��h���H�L$xD��H�L$0�L$pL�ƉL$(H��$�H��D�|$ ��A��3���tD;�uH�
p� ���H�T$xH���3�@��gu;�uH�
�o���H�T$xH��Ѐ;-uA��H��H�����E3҉D$DD9T$X�KA��@t1A��s�D$L-�A��t�D$L+��|$H�A��t�D$L ��|$H�t$TH�l$h+t$D+�A��uL�L$@L�ŋֱ ����L�L$@H�L$LL�ŋ�����A��tA��uL�L$@L�ŋֱ0����|$D3�9D$Ptu;�~qH��D�MH��$�H��$�A���H������E3�A;�u2��$�A;�t&L�D$hL�L$@H��$����E3�A;�u�H�l$h�#H�l$hA�ƉD$@�L�L$@L�ŋ�H���X���E3ҋD$@A;�|A��tL�L$@L�ŋֱ ���E3�H��$�I;�tH���=���E3�L��$�H��$��t$@�T$\L�
�h��A�@�/A:�����A;�t	�������D8�$�tH��$�������H��$�H3��x���H��$ H���A_A^A]A\_^]�@��It=@��ht.@��lt
@��wu�A��끀?lu
H��A���o���A���f���A�� �]����A��<6u�4uH��A���>���<3u�2uH��A���&���<d����<i����<o����<u����<x�����<X�����D�T$\H�T$x@��D�T$P�k�3�;�t!H�T$hL�D$@@������@�/H��@:��H�T$hL�D$@@����E3����@��*uE�}I��E;������E���~���C��@��D�|H��l���E���d���@��*uA�EI��A;‰D$T�I���A������D$T��@�ōDHЉD$T�)���@�� tA@��#t1@��+t"@��-t@��0����A�����A�����A�����A�����A������D�T$pD�T$XD�T$TD�T$HE��E��D�T$P������E3�E3�3�3�H�t$ �����@8�$��Z�����@UATAUAVAWH��`H�l$@H�]PH�uXH�}`H�fH3�H�ED�@��3�M��L�MD�ED��UH��D�n�D;�uOL��AE�ͺ3ɉ|$(H�|$ ��7;�tE��D�-����5D�߇��xDD�D�чL�]D�MpD;�~5A��I��A+�@88t
I�;�u��A��+�A+�A;�}
D�HD�Mp�D�ȉEpD;��\D;��SE;���D�����D;�uH�D�`���M��A��҉|$(H�|$ ��A��6Lc�D;��<H�����A���A�~[3�H�B�I��H��rLK�L?I;�w.H�AH;�wH��H�����/H+�H�|$@H���������x���H��H��tD�0H��H����D�MpL�E�A��D�|$(H�|$ ��53�;��K�U�L$(H�L$ �ME��L��W6E3�Hc�A;��!D�UA��
s;���A;��;����M�D$(H�ExE��L��A��H�D$ �6��A;�~`3�H�B�H��H��rQH�L6I;�w*H�AH;�wH��H�����.H+�H�\$@I;�t�����y���E3�H��I;�tD�0H��D�U�I��I;�tn�ME��L��A�҉t$(H�\$ �z53�;�t?���3�H�L$8D��L��H�L$0;�u�L$(H�L$ �
�D$(H�ExH�D$ A���4��H�K�D91u�g���H�O�D91u�Y�������H��L��D;�uH�D�pD�u�����uH��xA���$D���u3��L�}xL�E;��<3�L�Mp�Ћω\$(H�\$ �$H��H;�t�D�Mp�UL��A�Ή\$(H�\$ ��4Lc�D�MD;�u���D;�A���~bI��I���wYH��H��w4H�YH;�w
H�����H���H���N-H+�H�\$@H��t%��������H��H��tD�0H��D�MH��u3��Mc�3�H�����D�]D�Mp�U�MD�\$(L��H�\$ ��3�E��u3��.���L�ML�ÉD$(��A��L�|$ �#�}L��3�L;�D�H�K�D91u(��~���!���D�Mp�U�D$(A��L�|$ �b3��3�H;�tH���~��L;�t
M;�tI���~����H�MH3��!y��H�]PH�uXH�}`H�e A_A^A]A\]����H�\$H�t$WH��p��H��H�L$PI��A���}����$�D��$�H�L$PD�\$@�D$8��$��D$0H��$�L��H�D$(��$�D�Nj։D$ �O����|$htH�L$`����L�\$pI�[I�sI��_���D�L$ UATAUAVAWH��@H�l$0H�]@H�uHH�}PH�2`H3�H�ED�
h��3�M��D��L��wD;�u=L�MH��;D�Nj�.2;�t�=0��6�<0D�
!���xDD�D�
�D;��&D;��D;��C�uh;�uI�E�p�]xD�MXM��ҋΉ\$(��H�\$ �1Lc�D;��A���~hH�����L;�wYK�L$H��w5H�AH;�w
H�����H����w*H+�H�|$0H;��������}��H��H;�tD�(H���H��H;���M��3�H��M�����D�MXM�ƺ��D�d$(H�|$ �^0;�tL�M`D��H��A���0��H�O�D9)u�|�����D�epH��D;�uI�ED�`�uh;�uI�E�pA���Z ���u3��U;�t$L�MXM�ƋЋΉ\$(H�\$ � H��H;�t�L��H�E`D�MXM��A��A��H�D$ �Y0��H;�tH���{����H�MH3��v��H�]@H�uHH�}PH�eA_A^A]A\]���H�\$H�t$WH��`��H��H�L$@A��I���z����$�D��$�H�L$@D�\$8�D$0��$��D$(H��$�D��L�Nj�H�D$ �.����|$XtH�L$P����H�\$pH�t$xH��`_����H����SH�� H��H�I�z��H�K�z��H�K�z��H�K �z��H�K(�z��H�K0�z��H��}z��H�K@�tz��H�KH�kz��H�KP�bz��H�KX�Yz��H�K`�Pz��H�Kh�Gz��H�K8�>z��H�Kp�5z��H�Kx�,z��H���� z��H����z��H����z��H����y��H�����y��H�����y��H�����y��H�����y��H����y��H����y��H����y��H����y��H����y��H����y��H����xy��H����ly��H���`y��H���Ty��H���Hy��H���<y��H�� �0y��H��(�$y��H��0�y��H��8�y��H��@�y��H��H��x��H��P��x��H�� [���H��tBSH�� H��H�	H;
�nt��x��H�KH;
�nt�x��H�KH;
�nt�x��H�� [�H����SH�� H��H�IH;
|nt�ux��H�K H;
rnt�cx��H�K(H;
hnt�Qx��H�K0H;
^nt�?x��H�K8H;
Tnt�-x��H�K@H;
Jnt�x��H�KHH;
@nt�	x��H�� [������������������ff�H+�L���t�B�	:�uVH����tWH��u�I��J�	f��f���w�H�J�	H;�u�I��������~L�H��H��I3�I��t��H�H���3��fff���t'��t#H����t��tH����t��t����t��u�3��H�H���������ff�H+�I��r"��tf��:
u,H��I���u�M��I��uM��t�:
uH��I��u�H3�����ÐI��t7H�H;
u[H�AH;D
uLH�AH;D
u=H�AH;D
u.H�� I��u�I��M��I��t�H�H;
uH��I��u�I���H��H��H��H�H�H�H;��������������������ff�M��tuH+�L��I����t�B�	H��:�uWI��tN��tJH��u�J�	f��f���w�H�J�	H;�u�H��I��I��������~vH��L�I3�I��t��H3��H�H��Ä�t'��t#H����t��tH����t��t����t��u�H3�����H�\$H�t$ATH��03��N�j�����^�\$ ;p�}iLc�H�D~J�<�tPJ��A�t������t�Ɖt$$��|1H�~J��H��0��(H�
~J���u��L��}K�$��É\$ 돹�����H�\$@H�t$HH��0A\�H��H�XL�@H�HUVWATAUAVAWH��3�A��A��H���@��o�x�@��$�H�x�E��t�x�A���l$pD��H�L$T� ;�tE3�E3�3�3�H�|$ 襊����r��@u
�|$T�tE
��A���A#Ⱥ�;�tT+�t:;�t1�|����8���R����E3�E3�3�3�H�|$ ��g������D���@��t��u�A�@�D����$�A���t,��t#��t��t��@u�D;������A���A�������ϋƺ�L$H#�tF=t8=t*=t=t*=t&=t;�t�/���A�����
��A����A��D�l$Ps��j��"�$���A�E�DD�D�l$P@��@tA��A����D�l$P�L$H��s
A��D�l$P@�� tA���@��t
A��D�l$P�e
����u!�����8�������܊����H��$�D�D$HH��$�H�|$0L�L$`A��D�l$(��l$ �>'H�D$XH�������A��#�;�uC�@��t9D�D$HH��$�H�|$0A��L�L$`D�l$(A�׉l$ ��&H�D$XH���u;HcL�-�xH����H��Hk�XI�D��d���$���O����
����8��H��&;�uMHcL�-�xH����H��Hk�XI�D��d���$�ȋ�����H�L$X��$;�u�豉���
�A;�uA��@�	��uA��H�T$X��A	HcL�-/xH�����H��D
�I�D�Hk�XD�tHcH����H��Hk�XI�D��d8�A��$H�D$L��E����A��tx�E�ă��6����D$D���u�,����8�tP�詾������H�T$@A�@�|$@�A���;�u�|$@uHcT$D�����t��E3�3��պ�����t��E���<�@��u�D$T#�u�����#�=@tJ=t,=@t%=t+=@t$=t=@u(��$�����#�;�uD��$��@��$������|$DA��@��A��%�=@�$=�t|=���;��A;�v��v8���l��$�A���A+�� A;��P�D$D����E��3����H;�t��E3�3����H����|����H�T$DA��Ϋ������a���A;�t ��uk�|$DuD�@�D��$����D$D=��u��ټ���(���������=��u#�E3�A���"�����������D��$���E3�3���������;;�vqA;������������E��3�����H;������E3�3����H���u8����D$DA��Hc�E��H�TDD+���������m����D;��A�Hc@��$�H����@��H��Hk�XI�D��d8�@l8HcH�ƒ�H��Hk�XI�L��ƀd8����D8@8|$Lu!@��tHcH����H��Hk�XI�D��L A��%�=���A����H�L$X�� �D$PD�D$HH��$�H�|$0�D$(A��L�L$`�D$ A��-"H���u6�9 ��躅��LcI��A��H��Mk�XI�D�B�d����B���HcH�ʃ�H��Hk�XI�L�H�
��H��$�H�ĀA_A^A]A\_^]���H�t$WH��PE��L���d$@3�H��$�H������u(�����8H�d$ E3�E3�3�3����������3�H������u(賄����8H�d$ E3�E3�3�3��ǃ�������$���t8A����������u%�m�����8H�d$ E3�E3�3�3�聃�����`�L$0D�L$(D�T$ D��H��H�L$@�������D$D�|$@t,��t!HcH��H��L��r��Hk�XI���d���6��t����H�t$`H��P_���H��8A��D�L$`E��L���D$(H�L$ D��A��I�����H��8���H��H�XH�hH�pWH��PH��H��H�H�I��I���j��3�H;�u@8l$HtH�D$@����3��H�L$89iuL��H��H�����[H;�u<�;���E3�E3�3�3�H�l$ ��Q���@8l$HtH�D$@���������-H;�t�A��H��H��D�L
tUH;�u�f��D�L�Z�����@8/u���C�f��H��f�f;Qrf;QwfQ�$f;Qrf;QwfQ���Dt��D�H��I��E�LtNH;�u���^H��@8.uf���Q�fA��H��fD�fA��fD;Arf;AwfA�+f;Ar%f;AwfA�A���Dt
���fA��f;�uf;������H;�������u��������@8l$HtH�L$@����H�\$`H�l$hH�t$pH��P_���E3�����H�\$H�l$H�t$WH��P3�I��H��H��L;�u3��&H�L$0I���h��L�\$8A9kuL��H��H�������H;�u<�X���E3�E3�3�3�H�l$ ��n���@8l$HtH�D$@���������H;�t�A��H��H��F�Dt-H;�u���F�Du[f���G@8/uf���
�f��f�H���H��F�Dt#H;�u���H��@8.uf���
�f��f�H��f;�u&f;�tH;�u�@8l$H�����H�D$@������������@8l$HtH�L$@����H�\$`H�l$hH�t$pH��P_���E3����H�\$H�l$H�t$WH�� H�څ�xi;
�nsaHc�H�-�nH����H��Hk�XH�D�H�<�u=�=RJu'��t��t��u���������������yH�D�H�3������	����� ��H�\$0H�l$8H�t$@H�� _��H�\$H�l$WH�� ��xs;
nskHc�H�-#nH����H��Hk�XH�D��DtGH�<�t@�=�Iu)��t��t��u��������������3��H�D�H��3���
���	�"��� ��H�\$0H�l$8H�� _�H��8���u�~��� ��~���	�]��x1;
Xms)Hc�H�
hmH�ƒ�H��Hk�XH���DtH��,�~��� �~��H�d$ E3�E3�3�3��	�}��H��H��8�H��H�XH�pH�xL�` AUH�� Hc�L��I��L�-�l��Hk�XK�t���|3u3�O	��{����|3uH�L3���ۇ�����#��D3�
�z����tK�L�H�L����H�\$0H�t$8H�|$@L�d$HH�� A]���Hc�H�
flH�ƒ�H��Hk�XH��H�LH�%8H�\$H�|$L�d$AUAVAWH��@I��E��E3�A�L$�?z����uA������{���3��|$$H��k��@��Lc�J��H���H�\$0J��HH;����C���{u;�
�z����{u H�K��軆����uD�pD�t$(��C�
�y��E��u H�K�d�CtH�K�L�HI��E��u?�CL�#L�CkK+�H���.�袋.H��L��I��I��H��?L���D�D�l$ �H��XH�\$0I��H��j� ���E;����lj|$$H��j����X�J�腻��H�D$0H��ttHc�L��jI�Ѓ�j I��H��H;�s�@L� �@	
�`H��XH�D$0����|$ Hc�H��H����Hk�XI���D���H�����AD�D��|$ ��Ux��A��H�\$`H�|$hL�d$pH��@A_A^A]�H�\$�L$VWATH��0Hc����u�^{���	��������;=�i��H��H��H��L�%�i��Hk�XI���L��u%�{���	H�d$ E3�E3�3�3��&z�����z������I��Dt+�����H��~��u
�|���3ۅ�t��z����z���	�����������#�z���	H�d$ E3�E3�3�3��y����H�\$`H��0A\_^��H�\$H�t$WH��@��H��H�L$ A��A����`��H�D$(D��A�|u��tH�D$ H��@B�Y#��3���t��|$8tH�L$0����H�\$PH�t$XH��@_�̋�A�E3�3��r�����H�\$H�t$WH�� H��H��H��u
H���b���jH��u�ra���\H���wCH�
�d�H��HD�L��3�L��9H��H��uo9�dtPH���}�����t+H���v�H���k����Ry���3�H�\$0H�t$8H�� _��5y��H�������x������y��H�������x���H��������H��hH�UCH3�H�D$P�=Wf�L$@tfH�
�WH���u�YH�
�WH�����H�d$ L�L$DH�T$@A��p�����=�V���=��xu}�%�V�;H�d$8H�d$0��H�D$HL�D$@A�3��D$(H�D$ �pH�
1WH���t0H�d$ L�L$DH�T$HD������tf�D$@��%V���H�L$PH3��aZ��H��h�H�\$H�l$H�t$WH��P3�I��H��H��H;�tL;�t
@8*uH;�tf�)3�H�\$`H�l$hH�t$pH��P_�H�L$0I���.^��L�\$0A9ku%H;�t�f�@8l$HtH�D$@�������H�T$0���;���H�L$0D��A��~0A;�|+�I��H;���L�Ǻ	�D$(H�\$ �H�L$0;�uHc�H;�r(@8ot"��@8l$H�4���H�L$@�����#�����v���*@8l$HtH�D$@�����������A�H;���A�QL�ljD$(H�D$0H�\$ �H�u;���������E3����H��H�XH�hH�pH�x ATAUAVH��PL��H��H�H�E��M����\��M��tM�uM��u*�+v��H�d$ E3�E3�3�3���@u���|$H��E��tA��|�A��$�A�.L�D$03�I�^A��~L�D$0@�ͺ��L�D$0�I��@@���H����t@�+H��뾋�$�@��-u���@��+u@�+H��E���SA���IA��$�?E��u(@��0tA�
�8�;xt
�;XtA��&A��A��u@��0u�;xt�;Xu@�kH��M��@3҃�A��D��@��E�JA��t	@�̓�0�A��t,�E�@��<w�� ���A;�s��A;�r"u;�v��M��uH��@��uM��IE�3��YA���@�+H��둽���@��u@��u:�ƃ�t���w��u';�v#�qt���"@��t���
@��$������M��tI�]@��t�߀|$HtH�L$@�������M��tM�u@8|$HtH�D$@����3�L�\$PI�[ I�k(I�s0I�{8I��A^A]A\���H��83�E��L�‰D$ H��9�^u	H�
�J�3��Q���H��8�H��8H�>H3�H�D$(L�D$ A���D$&����u���
H�L$ �H�L$(H3���U��H��8��@USVWATAUAVAWH��H�l$@H��=H3�H�E0L���E�!3�I��H���}L�MD��D��H�];��H�U��;����}��H�UA���;����}uz�EA���t`A������Hc�H�����H;���H�L	H��wlH�AH;�w
H�����H����'H+�H�\$@H��t<����NH���J����x�E��L�úA�ω|$(H�|$ �8�����o���3��7�~Z��H��H��t���H���3�H��t�Lc�3�H��M��G���L�EE�̺A�ω|$(H�\$ ��
E3�A;���M;�t;���L�|$8L�|$0�D$(D��L��3�A��L�t$ ��
A;���I���D9}u,L�|$8L�|$0D��L��3�A��D�|$(L�|$ ��
��A;�tWHc׹�°��H��I;�tBL�|$8L�|$0D��L��3�A�͉|$(H�D$ �b
A;�u
H����X��I���A���tH�M�H�K�9��u��X��H��H�M0H3��dS��H�eHA_A^A]A\_^[]����3�D�B
����L��M��t<E�
I��A�A���wA�� �
H�A���w�� I��t
E��tD;�t�D+�A���3���H��H�XH�hH�pWH��PI��H��H��M����H�H�I���V��H��u=�Pp��H�d$ E3�E3�3�3���eo���|$HtH�D$@���������H��t�H�����w�H�D$0�xu#L��H��H�������|$HtZH�L$@�����L�MH�T$0���H�T$0��H���H��H��t��t;�t�+؀|$HtH�L$@�������3�H�\$`H�l$hH�t$pH��P_����H��8�=�ZuAH��u'�ao��H�d$ E3�E3�3�3���vn�������H��t�I�����w��X����E3����H��8��H��H�XH�hH�pH�x ATAUAWH�� H��3�3�D�G������L��H���tPD�G3ҋ����H���t=H��H+�H;�����A��WH��M���	H��H;�u1�n����n���H�\$@H�l$HH�t$PH�|$XH�� A_A]A\ú�����D��D��I;�H��EMNj��3������tH�H+�H;�~���Un���8u�+n���
H��A�ԋ����
L��H��3�	�U}]E3�H�Ջ��
���H����T�������H���
��H�H��H��H���u%��m���
��m��H��f�H�������E3�I�Ջ�護��H��������3����H�\$Lc�H�%\M��A��I��Mk�XJ��B�D8F�\�A��D��A���@tX���tH��t(��t ��uHB�L�J��B�d8�B�L8�0B�L�J��B�d8�B�L8�B�d�B�L�J��B�d8�E��u���A���%�@H�\$���H��8H��u'�l��H�d$ E3�E3�3�3���k����
��Y�3�H��8��H��HH�d$0�d$(A�H�
PE3ɺ@D�D$ ��H�6KH��H��H��(H�
%KH���tH���t�H�
KH���tH���t��H��(��H�l$WH��pHc�H�L$P�R����sbH�T$P��~L�D$P������H�T$P�H��@�x����tH��H�8���|$htH�D$`��������H�D$P��~6��H�T$P��@�������t@��$�@��$�Ƅ$��� �2k����*@��$�Ƅ$�H�L$P�D$@L��$��AA��D$8H��$��D$0H�D$(�T$ �QH�L$P�;�����2�������$�t
��$�����|$htH�L$`����H��$�H��p_�%��%��%*����������������ff�H��L�$L�\$M3�L�T$L+�MB�eL�%M;�sfA���M���A�M;�u�L�$L�\$H�����@UH�� H�ꃽ�t
��f��H�� ]�@UH��0H��H�MP谇��H��0]�@UH��0H��H�M`蘇��H��0]�@UH��0H��H�M@耇��H��0]�@UH�� H��H�H�ы��n��H�� ]�@UH�� H��
�3f��H�� ]��������@UH�� H���f��H�� ]�@UH�� H��H�
�5��H�� ]�@UH�� H���GL��H�� ]��@UH�� H��H�3Ɂ8�������H�� ]�@UH��0H��}pt3��e��H��0]�@UH�� H��H�E3ہ8�A��A��H�� ]�@UH�� H��
�je��H�� ]�@UH�� H���Qe��H�� ]�@UH�� H���8e��H�� ]�@UH�� H��HcM H��H�YH��肆��H�� ]�����������@UH�� H����d��H�� ]�@UH��0H��MP�\�H��0]�@UH��0H��M`�E�H��0]�@UH��@H��}@t>�}Dt*H���Hc
H��H��L��V��Hk�XI���d��H����
���H��@]�@UH�� H��
�Ud��H�� ]�@UH�� H��
�<d��H�� ]��������@UH�� H���d��H�� ]�������(�D�V�r�������������$�:�L�h�|��������������$�>�R�b�r����������������,�T�`�j�v�������������2�L�b�|������������&�6�H�Z�h�x�����������86@$L@�Q@�m@x�@�R@1�RLH�H�CorExitProcessmscoree.dll�@0@runtime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...<program name unknown>Runtime Error!

Program: ������������������(null)(null)EEE50P( 8PX700WP  `h````xpxxxx	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ccsUTF-8UTF-16LEUNICODEGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLL�����������EEE���00�P��('8PW�700PP� (����`h`hhhxppwpp         (((((                  H����������������������          h((((                  H����������������������                                 H�����������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~�����������������������������������������������������������������������������������������������������������������������������HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$user32.dllMessageBoxTimeoutAFatal Error in LauncherrbFailed to open executableUnable to find an appended archive.Unable to read from file#!Job information querying failedJob information setting failedstdin duplication failedstdout duplication failedstderr duplication failedUnable to create process using '%s'Failed to get exit code of processFailed to find shebangExpected to find terminator in shebang lineExpected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to be able to allocate command line memory"%s" "%s" %sRSDS��م�ƋI�{஦`��c:\Users\Vinay\Projects\SimpleLauncher\dist\w64.pdb42p
d4r����p9+4��b

20t
d4r�9����� ��
4R���
�p`P
�t
d	4R�9^#w#��t
dT4
R���4	Rp9�%�%��d
4	Rp9*'9'��

4
Rp4	Rp97(A(��	d4p9j(v(*W)�)
��)

4
2p9.,9,&�N,u,F�42p9�-.&�.L.F��t
4R�td42�td42�93G3_�		�0d
T	4Rp
t
d	42���9�6_7{�	B9�8
9��
9  d T 4 r����p	B9�:�:�:RP
d4r���
�p9t>?��	b9�?�?���?d	T42pdT4�p
td
T	4R�$d�4��p�p

4
2p9�F�F��4r�
�p`P�8
�t
d	4R�9K�K��d42p209�O�O�dT�pB20
T4R���p`d	4Rp9�VX!��d	4Rp	�����
p`P
0
d4
R����p9�b�b��	 
 � t d 4 ���9�de�g
d4
R����p9iIi��
�td
R���9�jk:��j"kj�d
4R��p9�l�l��B

4
2ptd
T	42���d4
Rp
t
dT4
r�

4
2p
t	dT42�
T4r���p`R0�
d4
R����p9�I���/4qf���
�p`P� 
d4
R����p9��݉��r04�p
`PbdT42pdT42p)4dZ���
�p`P��-
Etd4C�
����P�Xd4�p1
5#td43r��
��P�8d4�p2
0d	4R�9�{�!�!
!4!�����p`PrP

d
�p9c�����dT
4�pT42p2P
�	td42�9�����
�t
4r���9��۸�\�
�=�4R
�p
`9Ǻ�����PtdT4����b�('EC
��	��p`0P�ptd
T	42���4�

T
�pd4
rp*�p0�0

40
.p
T4r���p`-d2T140,��p�P(�Z��������(�D�V�r�������������$�:�L�h�|��������������$�>�R�b�r����������������,�T�`�j�v�������������2�L�b�|������������&�6�H�Z�h�x�����������ExitProcess~SetInformationJobObjecthFreeLibrary�GetCurrentProcessWaitForSingleObjectmGenerateConsoleCtrlEvent�GetCommandLineAAssignProcessToJobObject�GetExitCodeProcess�CreateProcessA�QueryInformationJobObject�CreateJobObjectAkGetStdHandleGetLastErrorLGetProcAddress>LoadLibraryA;SetConsoleCtrlHandlerGetModuleFileNameA�DuplicateHandleRCloseHandleKERNEL32.dllGetModuleHandleW�Sleep�HeapFree�HeapAllociGetStartupInfoA�TerminateProcess�UnhandledExceptionFilter�SetUnhandledExceptionFilterIsDebuggerPresent&RtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContext�EncodePointer�DecodePointerZFlsGetValue[FlsSetValueYFlsFree�SetLastError�GetCurrentThreadIdXFlsAlloc4WriteFile�DeleteCriticalSection;LeaveCriticalSection�EnterCriticalSection%RtlUnwindEx�InitializeCriticalSectionAndSpinCountxGetCPInfonGetACP>GetOEMCPIsValidCodePage�HeapSetInformation�HeapCreateiMultiByteToWideChar�ReadFile|SetHandleCount�GetFileTypetSetFilePointerfFreeEnvironmentStringsA�GetEnvironmentStringsgFreeEnvironmentStringsW WideCharToMultiByte�GetEnvironmentStringsW�QueryPerformanceCounter�GetTickCount�GetCurrentProcessId�GetSystemTimeAsFileTime�HeapSize
GetLocaleInfoA�GetConsoleCP�GetConsoleMode-LCMapStringA/LCMapStringWmGetStringTypeApGetStringTypeW�CreateFileA�SetStdHandle]FlushFileBuffers�HeapReAlloc)WriteConsoleA�GetConsoleOutputCP3WriteConsoleWaSetEndOfFileQGetProcessHeap�@2��-�+�] �f��������@��@	X�@
��@��@X�@0�@�@��@��@h�@0�@�@��@��@ H�@!P�@"��@x��@y��@z��@�x�@�h�@
		


!
5A
CPR
S
WYl
m pr	�
�
�	��
�)�
���
���D{@D{@D{@D{@D{@D{@D{@D{@D{@D{@�
�@��@                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ�@�`�y�!�������@~�����ڣ ��@����ڣ ��A��Ϣ���[��@~��QQ�^� _�j�2�����1~���@����C@@@@@`@�@��@�@�@@@�@�&@�&@���������
�@�@`�@\�@X�@T�@P�@L�@H�@@�@8�@0�@ �@�@�@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@��@x�@p�@`�@P�@H�@D�@8�@ �@�@	�@.P@X"@X"@X"@X"@X"@X"@X"@X"@X"@`@.�p��PSTPDT�@0@����������������������������;Zx����0Nm����:Yw����/MlK����L��LG��H������������������@m8�p�8���8����I��L��������'8�(J��L�8��v��x�����8������! �$ � H�� �"@��"�#X��#�#���#�%���%�%���%�&��&S'��T'�'���'V(��X(1* �4*F*��H*�+\��+�+���+�,d��,-��-4-8�4-i.��l.�.8��.1��1[1��\1�1���1k2��2l3��l3�3���3�4 ��4e5,��5�5���5�5���5668�86z68�|6�7@��7�7���7�7���78��8B8���89p�9�:���:�:���:�:���:�<��<i?���?�?��?�?8��?�A$��AsB8�tB�CL��C�C���C�D��DgFd�hF$G��$G�G���G+J��,J$L��$LLL��LL�M��O_O8�`O�O��O�P ��P0Q0�0Q�Q���Q�R8��R�R���RSS8�TS�S8��S�S���ST��T�V@��V1XX�PXtX���XZ��Z�a���ac��c:c��<c�c���d�g���gbh��dh�i��ij��j[j8�\jPkH�\kl��l0m��0mgm8�hm�m���m�m���m=n��@noo,�po?q��@q6r��8r�s���s�t��tu�u�u��uv� vx0�x�xH��xuyH�8z�zH��z�z���zB{��P{�{P�D�8������]���`���X���������)���,��8�������5���8�������������������8��U���X�֎�؎ڙ$�ܙ�H����p������ �����������������u����������������α�б�����,���^�,�h����Ķ@�ĶH���H��X��4���4�G���H�û��ػ������Ľ��Ľ5�,�@��������G�$�H���4�$�5�,�8�������,�X�,���t���;���<�w�|�x�������$���P���������P���������������
���
�&�P�&�?�P�F�_�P�_�{�P�{���P�����P�����������P����P��!�P�!�:�P�:�`�P�j���P�������������������P��6�P�=�V�P�(�p�������������0�eH�`�x�������	�R���T(�V���^h�(d�%�Љ��x�h��h�H�Z�( @...GGGWWWiiiuuu����������������������������������̀�ww����ww||�����ww��������wwww��������ww��������f�wwwww|�����f�wwwwww����ff�wwwwww�����ff��wwwww���ffl����ww����ffffff��w����ffffffl�w������ffffff�w�����ffffff�|����������ff��������ffff�������ff��R\I���lffl���)����ff�ح���������2L���������18�������Ϥ"������A<��������ΣT��π�����U���������������������������؀����������������������?������������������?�?�?�?�?�?�������������( 444MMMSSSzzz������������������������������p�p�����{p{��f���fko�f�����_fffk�_�fff��[���f}��UUU�fL4�UUU_kJqO���_�~�'�[U_����U�����������wwwww{~����������������( @%%%+++000===AAAIIIMMMQQQVVVYYY]]]~dFgggjjjmmmrrruuu}}}�u?�z=�~;�gE�kC�oA�r@��:��I��b��pƏKУk(��,�1�?�5�<�\�C�K�Q�s�U�[�c�b�����������������������������������������ð����������������������������������������������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$"  _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_L'%$"_I_MMMMMMJJ__('%%_I_CEMIJJMEM_(''*_I_?BMDJEMDMF_)(-LI_MMMCMMMMM_________<____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/
N______MMMMJIDAI_9/	HJJMMJMMMJ??BAI_A7503	IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O;
@__C_C?J?AJI_?A_DJJI@O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ�����?������������������?������������������?�( 444MMMRRRYYY~eGuuu}}}�x>�iE�rC��E��~7�?�H�V�b�x����������������������������������������������������������������������������������/!P7pL�c�yϏ���1��Q��q�������������/Pp"�,�6�@�J�[1�qQ��q�������������/Pp�
��� �=�1[�Qy�q�����������/"P0p=�L�Y�g�x���1��Q��q����������&/@PZpt���������1�Q�q��������/&PAp[�t��ϩ������1��Q��q����������/P"p0�>�M�[�i�y��1��Q��q����ұ������/Pp�	�
��� �>1�\Q�zq������������/Pp!�+�6�@�I�Z�1p�Q��q�������������/ P6pL�b�x�������1��Q��q�������������,/KPip�����������1��Q��q������������/-P?pR�c�v������1��Q��q�ϑ�ܱ������/Pp�!�&�,�>�X1�qQ��q������������!%///* !*/"(%%'%/)
/!#''////+/+"*(/
/

!%(/
(

  (*/(///)
*/
	)*

	/"/////	/+///#
		+ !%//
+"*+'#+//+'!%*++$++!+!    !!!<(0` !!$&			&"

 ���W���������������������������������ܱ��Nj+<<</	&&&#&[[[?6666��׏��������������������������������������������Ҟ���BBB3"


mmm3����,����!!!4777&�����������������������������������������������������ʟ���}���}___E���OpppD���P,)+3���Z2226DDD(���,�����###5��������������������������������������������������������������������������������չ�������������5�������,�������������������������������������������������������������������������������������������������������������,������Ì222"��Є�����������������������������������������������������������������������������������������������������&&&2����   4888&�������������������������������������������������������������������������e��?��4��/��+���.���R�������ӎ����������$$$5��Ď���������������������������������������������������������������������D��@��;��7��3��/��*���&���"�����������������������������������������������������������������������������������������W��G��C��?��;��6��2��n������f��0�������������nj333"��ӄ��������������������������������������������������������������������O��K��G��B��>��:��5��p������i��$�����������!!!4888&���������������������������������������������������������������������S�N��J��F��B��=��9��5��0��,��(���������������%%%5��ǎ���������������������������������������������������������������������V�R�N��I��E���������������������������������������������������������������������������������������������������������ѹ���|J��q?��o@�����Z�U�Q�M��I��D��@��<��7��3��/��+���&���"���-����������������Ɍ444"��ք�������������������������������������������������̴��w<��u=��s>��q?�����]�Y�U�P��L��H��C��?��;��7��2��.��*���%���!����������������"""4888&���������������������������������������������������d��y<��w=��u=��s>�����a�\�X�T�P��K��G��C��>��:��6��1��-��)���%��� ���O������������Ñ%%%5��ʎ���������������������������������������������������A��{;��y<��w=��t>�����s�`�\�W�S�O��J��F��B��>��9��5��1��,��(���$���(����������������������������������������������������������������������9��|:��z;��x<��v=�������s�_�[�W�R�N��J��E��A��=��8��4��0��,��'���#�������������̌555"��ل���������������������������������������������������9��~9��|:��z;��x<���o�����������������������������������������m��8��3��/��+���'�����������"""4:::&������������������������������������������������������8���9��~:��|;��z;��w<��u=��s>��q?��o@��mA��kB��iC��gC�dD��uZ������;��7��3��.��*�������������Ǒ%%%5��̎���������������������������������������������������È>���8���9��}:��{;��y<��w<��u=��s>��q?��o@��mA��jB��hC��fD�~dE��uZ�����?��:��6��2��5�����������������������������������������������������������������������������Оa���7���8��9��}:��{;��y<��w=��u>��r>��p?��n@��lA��jB��hC��fD�}dE�����B��>��:��5��^������������ό555"��܄����������������������������������������������������������ѳ�„7���7���8��9��}:��{;��x<��v=��t>��r?��p@��n@��lA��jB��gC��eD�����F��A��=��9������������"""4;;;&�����������������������������������������������������������������ŌC���8���9��~9��|:��z;��x<��v=��t>��r?��p@��mA��kA��iB��gC�����I��E��L��������������ɑQQQJnnn����������~~~�������������������������������������������������������������������������������������������Į��q?��o@��mA��kB��iC�������������������������HHH�"""���������������vvv������������������������������������������������������������������9��~:��{;��y<��w<��u=��s>��q?��o@��mA��kB�������������:::�'''�___���������sss�ttt��������������������������������������������������������������8�Ϧu�����ǣv��y<��w=��u=��s>��p?��n@��lA��������888T����---6fffnddd�%%%�"""�����OOO�SSS������������������������������������������������������������ċD�ҧu�����ʤv��{;��y<��v=��t>��r?��p?��xM�����<<<�MMM�������̑&&&5����;;;�<<<�xxx�QQQ�;;;�KKK����������������������������������������������������������8���8��~9��|:��z;��x<��v=��t>��r?�̷������999�����������������������VVV�###�)))�444��������������������������������������������������������������������ѳ�͝b���@��~9��|:��z;��}C���g��˶����Ӎ���������󑑑�����ZZZ�lll�;;;�!!!�"""�)))�___���������������������������������������������������������������������������������������&&&2����:::�ppp�{{{�___�WWW�WWW�:::�!!!�"""�***�www�������������������������������������������������������������������"""4888&���,������̑999����Ԗ���JJJ�|||�lll�:::�"""�BBB�XXX�|||��������������������������������������������������������������������$$$6�������,��������������������������������uuu�KKK�CCC�@@@�...�www����������������������������������������������������������������������������������*������Ҍ666"������������������������KKK�aaa�LLL�WWW��������������������������������������������������������������@��������$����"""4;;;&���������������������nnn�fff�!!!�$$$�999������������������������������������������������������������444]ttt|������ȇ������ɑ&&&5��Ў������������������������vvv�mmm�VVV�{{{�OOO����������������������������������������������������������������ڥ�����������������������������������������������aaa�CCC�����ppp�������������������������������������������������������������������������ό555"��ބ����������������������������������|||�MMM�����fff���������������������������������������������������������������"""4;;;&�������������������������������������������\\\�����������������������������������������������������������������Ǒ%%%5��Ύ�����������������������������������������������������������������������������������������������ݧ�����������������������������������������������������������������������������������������������������������������ܦ������͌555"��ۄ�����������������������������������������������������������������������������������ۥ����"""4:::&������������������������������������������������������������������������������������ڤ������Ñ%%%5��ˎ�����������������������������������������������������������������������ܤ��������������������������������������������������������������������������������������������������ׇ
������ww���?ww�?�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�?ww�ww��ww��ww��ww��ww��ww��ww�?�ww��ww���ww���ww( @ ����������������������������������!!!0\\\JeeeQ666D555A0$
�������v�H��<��6��0��2��\�������7���q��������������������ڴ���vvvj&&&D1"����g�L��F��@��;��5������?��������������������������������������������������к����V�Q�K��E��?��9������(�����������a���V�������������������������������������[�U�P��J��D��>��8��2��-���������uuun{{{j���������������������������������������`�Z�T�O������������������������������������������������������������������������V��o@��lA�����b�_�Y�S�M��G��B��<��6��0��+���%���<���������������a���V�����������������������m��t>��q?��n@�����b�b�^�X�R�L��F��A��;��5��/��)���$���Y����������wwwn}}}j����������������������~C��v=��s>��p?�����b�b�a�]�W�Q�K��E��@��:��4��.��(���+���������������������������������������{;��x<��v=��s>�����b�b�a�[�V�P��J��D��?��9��3��-��'��������������a���V����������������������~:��{;��x<��u=���p���������������������������������r��=��7��2��,����������yyynj�����������������������9��}:��z;��w<��u>��r?��o@��lA��iB��fD�}dE�|cE�|cE���i���B��<��6��1��������������������������������������?��9��}:��z;��w=��t>��q?��n@��kA��iC��fD�}cE�|cE�}dF�����G��A��;��=�������������a���V���������������������ңi���8��9��|:��y<��v=��s>��q?��n@��kB��hC��eD�|cE�|cE�����L��F��@��m����������zzzn���j�������������������������ʓP���8��~9��{;��y<��v=��s>��p?��mA��jB��gC�eD�|cE�����P��J��\��������������������������������������������������������������������������������¯��mA��jB��gC�~dE��������������������������a���V��������������������������������������}:��z;��x<��u=��r?��o@��lA��iB��fD���������|||n���m���������������������������������������9��������w=��t>��q?��n@��lA��iC�������������JJJ��������������������������������������������őP��������y<��v=��t>��q?��n@��~Y������������VVV�???�www�����iii�����������������������������������Ρk���A��|;��y<��v=��yF���p��������>>>3@@@y����~~~obbb�000�kkk�@@@������������������������������������������������������������������---U��������������<<<�&&&�[[[�������������������������������������������������������6���uuu�sss�WWW�III�$$$�&&&�qqq�����������������������������������lllg|||s���4����bbb�hhhƑ�������UUU�000�QQQ�}}}��������������������������������---{bbb�����(����������������������iii�LLL�BBB������������������������������������������������������a���V����������������ggg�+++�NNN�������������������������������������������|||n���j����������������]]]�ttt�kkk�������������������������������������������������������������������rrr�www���������������������������Ӧ�������a���V���������������������������������������������������Ӧ����zzzn���j�������������������������������������������Ӧ�����������������������������������������������������������ˉ��?������������������?�?�?���������������?�(  ������C�������������������﫫�o���������I�����������������������������������������ਨ������������S��=��?���������������������������������_�Q�F����4���������������������������������a�Z��������������������������������������м���oE�����c�a�X�M��B��7��0��������������������~I��q?�����c�`�V�K��@��5��8��������������������z;��u=���q�����������������v�>��3����������������������E��y<��t>��n@��iB�~dE�}dF�������G��H������YYY�uuu����������ġ���=��x<��s>��mA��hC�}dE�}eG�����S���������444�|||����������������������������gC�}cE�������������������������MMM������������������~>�����q?��kA��iG������������������RRR��������������¢���G��u=��xK�ʺ��������������������������������������������������������������������������������������������������������������������������������������������~�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A  �(  �h00 �%   � h<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD�����ȢТ��X�`�t�8�H�X�h�x���������Ƞؠ����(�8�H�X�h�x�����P�X�`�h�p�x���������������x�����ث��8�P�X�`�h�p����������Сء������� �(�0�8�@�H�P�X�`�h�p�x�������������������ȢТآ������� �(�0�H�`�h�p�x���������������p�x�python3.4/site-packages/pip/_vendor/distlib/wheel.py000064400000112563151735047420016406 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2014 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals

import base64
import codecs
import datetime
import distutils.util
from email import message_from_file
import hashlib
import imp
import json
import logging
import os
import posixpath
import re
import shutil
import sys
import tempfile
import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import Metadata, METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)
from .version import NormalizedVersion, UnsupportedVersionError

logger = logging.getLogger(__name__)

cache = None    # created when needed

if hasattr(sys, 'pypy_version_info'):
    IMP_PREFIX = 'pp'
elif sys.platform.startswith('java'):
    IMP_PREFIX = 'jy'
elif sys.platform == 'cli':
    IMP_PREFIX = 'ip'
else:
    IMP_PREFIX = 'cp'

VER_SUFFIX = sysconfig.get_config_var('py_version_nodot')
if not VER_SUFFIX:   # pragma: no cover
    VER_SUFFIX = '%s%s' % sys.version_info[:2]
PYVER = 'py' + VER_SUFFIX
IMPVER = IMP_PREFIX + VER_SUFFIX

ARCH = distutils.util.get_platform().replace('-', '_').replace('.', '_')

ABI = sysconfig.get_config_var('SOABI')
if ABI and ABI.startswith('cpython-'):
    ABI = ABI.replace('cpython-', 'cp')
else:
    def _derive_abi():
        parts = ['cp', VER_SUFFIX]
        if sysconfig.get_config_var('Py_DEBUG'):
            parts.append('d')
        if sysconfig.get_config_var('WITH_PYMALLOC'):
            parts.append('m')
        if sysconfig.get_config_var('Py_UNICODE_SIZE') == 4:
            parts.append('u')
        return ''.join(parts)
    ABI = _derive_abi()
    del _derive_abi

FILENAME_RE = re.compile(r'''
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?
-(?P<py>\w+\d+(\.\w+\d+)*)
-(?P<bi>\w+)
-(?P<ar>\w+)
\.whl$
''', re.IGNORECASE | re.VERBOSE)

NAME_VERSION_RE = re.compile(r'''
(?P<nm>[^-]+)
-(?P<vn>\d+[^-]*)
(-(?P<bn>\d+[^-]*))?$
''', re.IGNORECASE | re.VERBOSE)

SHEBANG_RE = re.compile(br'\s*#![^\r\n]*')

if os.sep == '/':
    to_posix = lambda o: o
else:
    to_posix = lambda o: o.replace(os.sep, '/')


class Mounter(object):
    def __init__(self):
        self.impure_wheels = {}
        self.libs = {}

    def add(self, pathname, extensions):
        self.impure_wheels[pathname] = extensions
        self.libs.update(extensions)

    def remove(self, pathname):
        extensions = self.impure_wheels.pop(pathname)
        for k, v in extensions:
            if k in self.libs:
                del self.libs[k]

    def find_module(self, fullname, path=None):
        if fullname in self.libs:
            result = self
        else:
            result = None
        return result

    def load_module(self, fullname):
        if fullname in sys.modules:
            result = sys.modules[fullname]
        else:
            if fullname not in self.libs:
                raise ImportError('unable to find extension for %s' % fullname)
            result = imp.load_dynamic(fullname, self.libs[fullname])
            result.__loader__ = self
            parts = fullname.rsplit('.', 1)
            if len(parts) > 1:
                result.__package__ = parts[0]
        return result

_hook = Mounter()


class Wheel(object):
    """
    Class to build and install from Wheel files (PEP 427).
    """

    wheel_version = (1, 1)
    hash_kind = 'sha256'

    def __init__(self, filename=None, sign=False, verify=False):
        """
        Initialise an instance using a (valid) filename.
        """
        self.sign = sign
        self.should_verify = verify
        self.buildver = ''
        self.pyver = [PYVER]
        self.abi = ['none']
        self.arch = ['any']
        self.dirname = os.getcwd()
        if filename is None:
            self.name = 'dummy'
            self.version = '0.1'
            self._filename = self.filename
        else:
            m = NAME_VERSION_RE.match(filename)
            if m:
                info = m.groupdict('')
                self.name = info['nm']
                # Reinstate the local version separator
                self.version = info['vn'].replace('_', '-')
                self.buildver = info['bn']
                self._filename = self.filename
            else:
                dirname, filename = os.path.split(filename)
                m = FILENAME_RE.match(filename)
                if not m:
                    raise DistlibException('Invalid name or '
                                           'filename: %r' % filename)
                if dirname:
                    self.dirname = os.path.abspath(dirname)
                self._filename = filename
                info = m.groupdict('')
                self.name = info['nm']
                self.version = info['vn']
                self.buildver = info['bn']
                self.pyver = info['py'].split('.')
                self.abi = info['bi'].split('.')
                self.arch = info['ar'].split('.')

    @property
    def filename(self):
        """
        Build and return a filename from the various components.
        """
        if self.buildver:
            buildver = '-' + self.buildver
        else:
            buildver = ''
        pyver = '.'.join(self.pyver)
        abi = '.'.join(self.abi)
        arch = '.'.join(self.arch)
        # replace - with _ as a local version separator
        version = self.version.replace('-', '_')
        return '%s-%s%s-%s-%s-%s.whl' % (self.name, version, buildver,
                                         pyver, abi, arch)

    @property
    def exists(self):
        path = os.path.join(self.dirname, self.filename)
        return os.path.isfile(path)

    @property
    def tags(self):
        for pyver in self.pyver:
            for abi in self.abi:
                for arch in self.arch:
                    yield pyver, abi, arch

    @cached_property
    def metadata(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        wrapper = codecs.getreader('utf-8')
        with ZipFile(pathname, 'r') as zf:
            wheel_metadata = self.get_wheel_metadata(zf)
            wv = wheel_metadata['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            if file_version < (1, 1):
                fn = 'METADATA'
            else:
                fn = METADATA_FILENAME
            try:
                metadata_filename = posixpath.join(info_dir, fn)
                with zf.open(metadata_filename) as bf:
                    wf = wrapper(bf)
                    result = Metadata(fileobj=wf)
            except KeyError:
                raise ValueError('Invalid wheel, because %s is '
                                 'missing' % fn)
        return result

    def get_wheel_metadata(self, zf):
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        metadata_filename = posixpath.join(info_dir, 'WHEEL')
        with zf.open(metadata_filename) as bf:
            wf = codecs.getreader('utf-8')(bf)
            message = message_from_file(wf)
        return dict(message)

    @cached_property
    def info(self):
        pathname = os.path.join(self.dirname, self.filename)
        with ZipFile(pathname, 'r') as zf:
            result = self.get_wheel_metadata(zf)
        return result

    def process_shebang(self, data):
        m = SHEBANG_RE.match(data)
        if m:
            data = b'#!python' + data[m.end():]
        else:
            cr = data.find(b'\r')
            lf = data.find(b'\n')
            if cr < 0 or cr > lf:
                term = b'\n'
            else:
                if data[cr:cr + 2] == b'\r\n':
                    term = b'\r\n'
                else:
                    term = b'\r'
            data = b'#!python' + term + data
        return data

    def get_hash(self, data, hash_kind=None):
        if hash_kind is None:
            hash_kind = self.hash_kind
        try:
            hasher = getattr(hashlib, hash_kind)
        except AttributeError:
            raise DistlibException('Unsupported hash algorithm: %r' % hash_kind)
        result = hasher(data).digest()
        result = base64.urlsafe_b64encode(result).rstrip(b'=').decode('ascii')
        return hash_kind, result

    def write_record(self, records, record_path, base):
        with CSVWriter(record_path) as writer:
            for row in records:
                writer.writerow(row)
            p = to_posix(os.path.relpath(record_path, base))
            writer.writerow((p, '', ''))

    def write_records(self, info, libdir, archive_paths):
        records = []
        distinfo, info_dir = info
        hasher = getattr(hashlib, self.hash_kind)
        for ap, p in archive_paths:
            with open(p, 'rb') as f:
                data = f.read()
            digest = '%s=%s' % self.get_hash(data)
            size = os.path.getsize(p)
            records.append((ap, digest, size))

        p = os.path.join(distinfo, 'RECORD')
        self.write_record(records, p, libdir)
        ap = to_posix(os.path.join(info_dir, 'RECORD'))
        archive_paths.append((ap, p))

    def build_zip(self, pathname, archive_paths):
        with ZipFile(pathname, 'w', zipfile.ZIP_DEFLATED) as zf:
            for ap, p in archive_paths:
                logger.debug('Wrote %s to %s in wheel', p, ap)
                zf.write(p, ap)

    def build(self, paths, tags=None, wheel_version=None):
        """
        Build a wheel from files in specified paths, and use any specified tags
        when determining the name of the wheel.
        """
        if tags is None:
            tags = {}

        libkey = list(filter(lambda o: o in paths, ('purelib', 'platlib')))[0]
        if libkey == 'platlib':
            is_pure = 'false'
            default_pyver = [IMPVER]
            default_abi = [ABI]
            default_arch = [ARCH]
        else:
            is_pure = 'true'
            default_pyver = [PYVER]
            default_abi = ['none']
            default_arch = ['any']

        self.pyver = tags.get('pyver', default_pyver)
        self.abi = tags.get('abi', default_abi)
        self.arch = tags.get('arch', default_arch)

        libdir = paths[libkey]

        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        archive_paths = []

        # First, stuff which is not in site-packages
        for key in ('data', 'headers', 'scripts'):
            if key not in paths:
                continue
            path = paths[key]
            if os.path.isdir(path):
                for root, dirs, files in os.walk(path):
                    for fn in files:
                        p = fsdecode(os.path.join(root, fn))
                        rp = os.path.relpath(p, path)
                        ap = to_posix(os.path.join(data_dir, key, rp))
                        archive_paths.append((ap, p))
                        if key == 'scripts' and not p.endswith('.exe'):
                            with open(p, 'rb') as f:
                                data = f.read()
                            data = self.process_shebang(data)
                            with open(p, 'wb') as f:
                                f.write(data)

        # Now, stuff which is in site-packages, other than the
        # distinfo stuff.
        path = libdir
        distinfo = None
        for root, dirs, files in os.walk(path):
            if root == path:
                # At the top level only, save distinfo for later
                # and skip it for now
                for i, dn in enumerate(dirs):
                    dn = fsdecode(dn)
                    if dn.endswith('.dist-info'):
                        distinfo = os.path.join(root, dn)
                        del dirs[i]
                        break
                assert distinfo, '.dist-info directory expected, not found'

            for fn in files:
                # comment out next suite to leave .pyc files in
                if fsdecode(fn).endswith(('.pyc', '.pyo')):
                    continue
                p = os.path.join(root, fn)
                rp = to_posix(os.path.relpath(p, path))
                archive_paths.append((rp, p))

        # Now distinfo. Assumed to be flat, i.e. os.listdir is enough.
        files = os.listdir(distinfo)
        for fn in files:
            if fn not in ('RECORD', 'INSTALLER', 'SHARED'):
                p = fsdecode(os.path.join(distinfo, fn))
                ap = to_posix(os.path.join(info_dir, fn))
                archive_paths.append((ap, p))

        wheel_metadata = [
            'Wheel-Version: %d.%d' % (wheel_version or self.wheel_version),
            'Generator: distlib %s' % __version__,
            'Root-Is-Purelib: %s' % is_pure,
        ]
        for pyver, abi, arch in self.tags:
            wheel_metadata.append('Tag: %s-%s-%s' % (pyver, abi, arch))
        p = os.path.join(distinfo, 'WHEEL')
        with open(p, 'w') as f:
            f.write('\n'.join(wheel_metadata))
        ap = to_posix(os.path.join(info_dir, 'WHEEL'))
        archive_paths.append((ap, p))

        # Now, at last, RECORD.
        # Paths in here are archive paths - nothing else makes sense.
        self.write_records((distinfo, info_dir), libdir, archive_paths)
        # Now, ready to build the zip file
        pathname = os.path.join(self.dirname, self.filename)
        self.build_zip(pathname, archive_paths)
        return pathname

    def install(self, paths, maker, **kwargs):
        """
        Install a wheel to the specified paths. If kwarg ``warner`` is
        specified, it should be a callable, which will be called with two
        tuples indicating the wheel version of this software and the wheel
        version in the file, if there is a discrepancy in the versions.
        This can be used to issue any warnings to raise any exceptions.
        If kwarg ``lib_only`` is True, only the purelib/platlib files are
        installed, and the headers, scripts, data and dist-info metadata are
        not written.

        The return value is a :class:`InstalledDistribution` instance unless
        ``options.lib_only`` is True, in which case the return value is ``None``.
        """

        dry_run = maker.dry_run
        warner = kwargs.get('warner')
        lib_only = kwargs.get('lib_only', False)

        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        metadata_name = posixpath.join(info_dir, METADATA_FILENAME)
        wheel_metadata_name = posixpath.join(info_dir, 'WHEEL')
        record_name = posixpath.join(info_dir, 'RECORD')

        wrapper = codecs.getreader('utf-8')

        with ZipFile(pathname, 'r') as zf:
            with zf.open(wheel_metadata_name) as bwf:
                wf = wrapper(bwf)
                message = message_from_file(wf)
            wv = message['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            if (file_version != self.wheel_version) and warner:
                warner(self.wheel_version, file_version)

            if message['Root-Is-Purelib'] == 'true':
                libdir = paths['purelib']
            else:
                libdir = paths['platlib']

            records = {}
            with zf.open(record_name) as bf:
                with CSVReader(stream=bf) as reader:
                    for row in reader:
                        p = row[0]
                        records[p] = row

            data_pfx = posixpath.join(data_dir, '')
            info_pfx = posixpath.join(info_dir, '')
            script_pfx = posixpath.join(data_dir, 'scripts', '')

            # make a new instance rather than a copy of maker's,
            # as we mutate it
            fileop = FileOperator(dry_run=dry_run)
            fileop.record = True    # so we can rollback if needed

            bc = not sys.dont_write_bytecode    # Double negatives. Lovely!

            outfiles = []   # for RECORD writing

            # for script copying/shebang processing
            workdir = tempfile.mkdtemp()
            # set target dir later
            # we default add_launchers to False, as the
            # Python Launcher should be used instead
            maker.source_dir = workdir
            maker.target_dir = None
            try:
                for zinfo in zf.infolist():
                    arcname = zinfo.filename
                    if isinstance(arcname, text_type):
                        u_arcname = arcname
                    else:
                        u_arcname = arcname.decode('utf-8')
                    # The signature file won't be in RECORD,
                    # and we  don't currently don't do anything with it
                    if u_arcname.endswith('/RECORD.jws'):
                        continue
                    row = records[u_arcname]
                    if row[2] and str(zinfo.file_size) != row[2]:
                        raise DistlibException('size mismatch for '
                                               '%s' % u_arcname)
                    if row[1]:
                        kind, value = row[1].split('=', 1)
                        with zf.open(arcname) as bf:
                            data = bf.read()
                        _, digest = self.get_hash(data, kind)
                        if digest != value:
                            raise DistlibException('digest mismatch for '
                                                   '%s' % arcname)

                    if lib_only and u_arcname.startswith((info_pfx, data_pfx)):
                        logger.debug('lib_only: skipping %s', u_arcname)
                        continue
                    is_script = (u_arcname.startswith(script_pfx)
                                 and not u_arcname.endswith('.exe'))

                    if u_arcname.startswith(data_pfx):
                        _, where, rp = u_arcname.split('/', 2)
                        outfile = os.path.join(paths[where], convert_path(rp))
                    else:
                        # meant for site-packages.
                        if u_arcname in (wheel_metadata_name, record_name):
                            continue
                        outfile = os.path.join(libdir, convert_path(u_arcname))
                    if not is_script:
                        with zf.open(arcname) as bf:
                            fileop.copy_stream(bf, outfile)
                        outfiles.append(outfile)
                        # Double check the digest of the written file
                        if not dry_run and row[1]:
                            with open(outfile, 'rb') as bf:
                                data = bf.read()
                                _, newdigest = self.get_hash(data, kind)
                                if newdigest != digest:
                                    raise DistlibException('digest mismatch '
                                                           'on write for '
                                                           '%s' % outfile)
                        if bc and outfile.endswith('.py'):
                            try:
                                pyc = fileop.byte_compile(outfile)
                                outfiles.append(pyc)
                            except Exception:
                                # Don't give up if byte-compilation fails,
                                # but log it and perhaps warn the user
                                logger.warning('Byte-compilation failed',
                                               exc_info=True)
                    else:
                        fn = os.path.basename(convert_path(arcname))
                        workname = os.path.join(workdir, fn)
                        with zf.open(arcname) as bf:
                            fileop.copy_stream(bf, workname)

                        dn, fn = os.path.split(outfile)
                        maker.target_dir = dn
                        filenames = maker.make(fn)
                        fileop.set_executable_mode(filenames)
                        outfiles.extend(filenames)

                if lib_only:
                    logger.debug('lib_only: returning None')
                    dist = None
                else:
                    # Generate scripts

                    # Try to get pydist.json so we can see if there are
                    # any commands to generate. If this fails (e.g. because
                    # of a legacy wheel), log a warning but don't give up.
                    commands = None
                    file_version = self.info['Wheel-Version']
                    if file_version == '1.0':
                        # Use legacy info
                        ep = posixpath.join(info_dir, 'entry_points.txt')
                        try:
                            with zf.open(ep) as bwf:
                                epdata = read_exports(bwf)
                            commands = {}
                            for key in ('console', 'gui'):
                                k = '%s_scripts' % key
                                if k in epdata:
                                    commands['wrap_%s' % key] = d = {}
                                    for v in epdata[k].values():
                                        s = '%s:%s' % (v.prefix, v.suffix)
                                        if v.flags:
                                            s += ' %s' % v.flags
                                        d[v.name] = s
                        except Exception:
                            logger.warning('Unable to read legacy script '
                                           'metadata, so cannot generate '
                                           'scripts')
                    else:
                        try:
                            with zf.open(metadata_name) as bwf:
                                wf = wrapper(bwf)
                                commands = json.load(wf).get('commands')
                        except Exception:
                            logger.warning('Unable to read JSON metadata, so '
                                           'cannot generate scripts')
                    if commands:
                        console_scripts = commands.get('wrap_console', {})
                        gui_scripts = commands.get('wrap_gui', {})
                        if console_scripts or gui_scripts:
                            script_dir = paths.get('scripts', '')
                            if not os.path.isdir(script_dir):
                                raise ValueError('Valid script path not '
                                                 'specified')
                            maker.target_dir = script_dir
                            for k, v in console_scripts.items():
                                script = '%s = %s' % (k, v)
                                filenames = maker.make(script)
                                fileop.set_executable_mode(filenames)

                            if gui_scripts:
                                options = {'gui': True }
                                for k, v in gui_scripts.items():
                                    script = '%s = %s' % (k, v)
                                    filenames = maker.make(script, options)
                                    fileop.set_executable_mode(filenames)

                    p = os.path.join(libdir, info_dir)
                    dist = InstalledDistribution(p)

                    # Write SHARED
                    paths = dict(paths)     # don't change passed in dict
                    del paths['purelib']
                    del paths['platlib']
                    paths['lib'] = libdir
                    p = dist.write_shared_locations(paths, dry_run)
                    if p:
                        outfiles.append(p)

                    # Write RECORD
                    dist.write_installed_files(outfiles, paths['prefix'],
                                               dry_run)
                return dist
            except Exception:  # pragma: no cover
                logger.exception('installation failed.')
                fileop.rollback()
                raise
            finally:
                shutil.rmtree(workdir)

    def _get_dylib_cache(self):
        global cache
        if cache is None:
            # Use native string to avoid issues on 2.x: see Python #20140.
            base = os.path.join(get_cache_base(), str('dylib-cache'),
                                sys.version[:3])
            cache = Cache(base)
        return cache

    def _get_extensions(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        arcname = posixpath.join(info_dir, 'EXTENSIONS')
        wrapper = codecs.getreader('utf-8')
        result = []
        with ZipFile(pathname, 'r') as zf:
            try:
                with zf.open(arcname) as bf:
                    wf = wrapper(bf)
                    extensions = json.load(wf)
                    cache = self._get_dylib_cache()
                    prefix = cache.prefix_to_dir(pathname)
                    cache_base = os.path.join(cache.base, prefix)
                    if not os.path.isdir(cache_base):
                        os.makedirs(cache_base)
                    for name, relpath in extensions.items():
                        dest = os.path.join(cache_base, convert_path(relpath))
                        if not os.path.exists(dest):
                            extract = True
                        else:
                            file_time = os.stat(dest).st_mtime
                            file_time = datetime.datetime.fromtimestamp(file_time)
                            info = zf.getinfo(relpath)
                            wheel_time = datetime.datetime(*info.date_time)
                            extract = wheel_time > file_time
                        if extract:
                            zf.extract(relpath, cache_base)
                        result.append((name, dest))
            except KeyError:
                pass
        return result

    def is_compatible(self):
        """
        Determine if a wheel is compatible with the running system.
        """
        return is_compatible(self)

    def is_mountable(self):
        """
        Determine if a wheel is asserted as mountable by its metadata.
        """
        return True # for now - metadata details TBD

    def mount(self, append=False):
        pathname = os.path.abspath(os.path.join(self.dirname, self.filename))
        if not self.is_compatible():
            msg = 'Wheel %s not compatible with this Python.' % pathname
            raise DistlibException(msg)
        if not self.is_mountable():
            msg = 'Wheel %s is marked as not mountable.' % pathname
            raise DistlibException(msg)
        if pathname in sys.path:
            logger.debug('%s already in path', pathname)
        else:
            if append:
                sys.path.append(pathname)
            else:
                sys.path.insert(0, pathname)
            extensions = self._get_extensions()
            if extensions:
                if _hook not in sys.meta_path:
                    sys.meta_path.append(_hook)
                _hook.add(pathname, extensions)

    def unmount(self):
        pathname = os.path.abspath(os.path.join(self.dirname, self.filename))
        if pathname not in sys.path:
            logger.debug('%s not in path', pathname)
        else:
            sys.path.remove(pathname)
            if pathname in _hook.impure_wheels:
                _hook.remove(pathname)
            if not _hook.impure_wheels:
                if _hook in sys.meta_path:
                    sys.meta_path.remove(_hook)

    def verify(self):
        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        data_dir = '%s.data' % name_ver
        info_dir = '%s.dist-info' % name_ver

        metadata_name = posixpath.join(info_dir, METADATA_FILENAME)
        wheel_metadata_name = posixpath.join(info_dir, 'WHEEL')
        record_name = posixpath.join(info_dir, 'RECORD')

        wrapper = codecs.getreader('utf-8')

        with ZipFile(pathname, 'r') as zf:
            with zf.open(wheel_metadata_name) as bwf:
                wf = wrapper(bwf)
                message = message_from_file(wf)
            wv = message['Wheel-Version'].split('.', 1)
            file_version = tuple([int(i) for i in wv])
            # TODO version verification

            records = {}
            with zf.open(record_name) as bf:
                with CSVReader(stream=bf) as reader:
                    for row in reader:
                        p = row[0]
                        records[p] = row

            for zinfo in zf.infolist():
                arcname = zinfo.filename
                if isinstance(arcname, text_type):
                    u_arcname = arcname
                else:
                    u_arcname = arcname.decode('utf-8')
                if '..' in u_arcname:
                    raise DistlibException('invalid entry in '
                                           'wheel: %r' % u_arcname)

                # The signature file won't be in RECORD,
                # and we  don't currently don't do anything with it
                if u_arcname.endswith('/RECORD.jws'):
                    continue
                row = records[u_arcname]
                if row[2] and str(zinfo.file_size) != row[2]:
                    raise DistlibException('size mismatch for '
                                           '%s' % u_arcname)
                if row[1]:
                    kind, value = row[1].split('=', 1)
                    with zf.open(arcname) as bf:
                        data = bf.read()
                    _, digest = self.get_hash(data, kind)
                    if digest != value:
                        raise DistlibException('digest mismatch for '
                                               '%s' % arcname)

    def update(self, modifier, dest_dir=None, **kwargs):
        """
        Update the contents of a wheel in a generic way. The modifier should
        be a callable which expects a dictionary argument: its keys are
        archive-entry paths, and its values are absolute filesystem paths
        where the contents the corresponding archive entries can be found. The
        modifier is free to change the contents of the files pointed to, add
        new entries and remove entries, before returning. This method will
        extract the entire contents of the wheel to a temporary location, call
        the modifier, and then use the passed (and possibly updated)
        dictionary to write a new wheel. If ``dest_dir`` is specified, the new
        wheel is written there -- otherwise, the original wheel is overwritten.

        The modifier should return True if it updated the wheel, else False.
        This method returns the same value the modifier returns.
        """

        def get_version(path_map, info_dir):
            version = path = None
            key = '%s/%s' % (info_dir, METADATA_FILENAME)
            if key not in path_map:
                key = '%s/PKG-INFO' % info_dir
            if key in path_map:
                path = path_map[key]
                version = Metadata(path=path).version
            return version, path

        def update_version(version, path):
            updated = None
            try:
                v = NormalizedVersion(version)
                i = version.find('-')
                if i < 0:
                    updated = '%s-1' % version
                else:
                    parts = [int(s) for s in version[i + 1:].split('.')]
                    parts[-1] += 1
                    updated = '%s-%s' % (version[:i],
                                         '.'.join(str(i) for i in parts))
            except UnsupportedVersionError:
                logger.debug('Cannot update non-compliant (PEP-440) '
                             'version %r', version)
            if updated:
                md = Metadata(path=path)
                md.version = updated
                legacy = not path.endswith(METADATA_FILENAME)
                md.write(path=path, legacy=legacy)
                logger.debug('Version updated from %r to %r', version,
                             updated)

        pathname = os.path.join(self.dirname, self.filename)
        name_ver = '%s-%s' % (self.name, self.version)
        info_dir = '%s.dist-info' % name_ver
        record_name = posixpath.join(info_dir, 'RECORD')
        with tempdir() as workdir:
            with ZipFile(pathname, 'r') as zf:
                path_map = {}
                for zinfo in zf.infolist():
                    arcname = zinfo.filename
                    if isinstance(arcname, text_type):
                        u_arcname = arcname
                    else:
                        u_arcname = arcname.decode('utf-8')
                    if u_arcname == record_name:
                        continue
                    if '..' in u_arcname:
                        raise DistlibException('invalid entry in '
                                               'wheel: %r' % u_arcname)
                    zf.extract(zinfo, workdir)
                    path = os.path.join(workdir, convert_path(u_arcname))
                    path_map[u_arcname] = path

            # Remember the version.
            original_version, _ = get_version(path_map, info_dir)
            # Files extracted. Call the modifier.
            modified = modifier(path_map, **kwargs)
            if modified:
                # Something changed - need to build a new wheel.
                current_version, path = get_version(path_map, info_dir)
                if current_version and (current_version == original_version):
                    # Add or update local version to signify changes.
                    update_version(current_version, path)
                # Decide where the new wheel goes.
                if dest_dir is None:
                    fd, newpath = tempfile.mkstemp(suffix='.whl',
                                                   prefix='wheel-update-',
                                                   dir=workdir)
                    os.close(fd)
                else:
                    if not os.path.isdir(dest_dir):
                        raise DistlibException('Not a directory: %r' % dest_dir)
                    newpath = os.path.join(dest_dir, self.filename)
                archive_paths = list(path_map.items())
                distinfo = os.path.join(workdir, info_dir)
                info = distinfo, info_dir
                self.write_records(info, workdir, archive_paths)
                self.build_zip(newpath, archive_paths)
                if dest_dir is None:
                    shutil.copyfile(newpath, pathname)
        return modified

def compatible_tags():
    """
    Return (pyver, abi, arch) tuples compatible with this Python.
    """
    versions = [VER_SUFFIX]
    major = VER_SUFFIX[0]
    for minor in range(sys.version_info[1] - 1, - 1, -1):
        versions.append(''.join([major, str(minor)]))

    abis = []
    for suffix, _, _ in imp.get_suffixes():
        if suffix.startswith('.abi'):
            abis.append(suffix.split('.', 2)[1])
    abis.sort()
    if ABI != 'none':
        abis.insert(0, ABI)
    abis.append('none')
    result = []

    arches = [ARCH]
    if sys.platform == 'darwin':
        m = re.match('(\w+)_(\d+)_(\d+)_(\w+)$', ARCH)
        if m:
            name, major, minor, arch = m.groups()
            minor = int(minor)
            matches = [arch]
            if arch in ('i386', 'ppc'):
                matches.append('fat')
            if arch in ('i386', 'ppc', 'x86_64'):
                matches.append('fat3')
            if arch in ('ppc64', 'x86_64'):
                matches.append('fat64')
            if arch in ('i386', 'x86_64'):
                matches.append('intel')
            if arch in ('i386', 'x86_64', 'intel', 'ppc', 'ppc64'):
                matches.append('universal')
            while minor >= 0:
                for match in matches:
                    s = '%s_%s_%s_%s' % (name, major, minor, match)
                    if s != ARCH:   # already there
                        arches.append(s)
                minor -= 1

    # Most specific - our Python version, ABI and arch
    for abi in abis:
        for arch in arches:
            result.append((''.join((IMP_PREFIX, versions[0])), abi, arch))

    # where no ABI / arch dependency, but IMP_PREFIX dependency
    for i, version in enumerate(versions):
        result.append((''.join((IMP_PREFIX, version)), 'none', 'any'))
        if i == 0:
            result.append((''.join((IMP_PREFIX, version[0])), 'none', 'any'))

    # no IMP_PREFIX, ABI or arch dependency
    for i, version in enumerate(versions):
        result.append((''.join(('py', version)), 'none', 'any'))
        if i == 0:
            result.append((''.join(('py', version[0])), 'none', 'any'))
    return set(result)


COMPATIBLE_TAGS = compatible_tags()

del compatible_tags


def is_compatible(wheel, tags=None):
    if not isinstance(wheel, Wheel):
        wheel = Wheel(wheel)    # assume it's a filename
    result = False
    if tags is None:
        tags = COMPATIBLE_TAGS
    for ver, abi, arch in tags:
        if ver in wheel.pyver and abi in wheel.abi and arch in wheel.arch:
            result = True
            break
    return result
python3.4/site-packages/pip/_vendor/distlib/__init__.py000064400000001105151735047420017026 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2014 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import logging

__version__ = '0.1.8'

class DistlibException(Exception):
    pass

try:
    from logging import NullHandler
except ImportError: # pragma: no cover
    class NullHandler(logging.Handler):
        def handle(self, record): pass
        def emit(self, record): pass
        def createLock(self): self.lock = None

logger = logging.getLogger(__name__)
logger.addHandler(NullHandler())
python3.4/site-packages/pip/_vendor/distlib/locators.py000064400000133542151735047420017130 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#

import gzip
from io import BytesIO
import json
import logging
import os
import posixpath
import re
try:
    import threading
except ImportError:
    import dummy_threading as threading
import zlib

from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
                     queue, quote, unescape, string_types, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata
from .util import (cached_property, parse_credentials, ensure_slash,
                   split_filename, get_project_data, parse_requirement,
                   parse_name_and_version, ServerProxy)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

logger = logging.getLogger(__name__)

HASHER_HASH = re.compile('^(\w+)=([a-f0-9]+)')
CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I)
HTML_CONTENT_TYPE = re.compile('text/html|application/x(ht)?ml')
DEFAULT_INDEX = 'http://python.org/pypi'

def get_all_distribution_names(url=None):
    """
    Return all distribution names known by an index.
    :param url: The URL of the index.
    :return: A list of all known distribution names.
    """
    if url is None:
        url = DEFAULT_INDEX
    client = ServerProxy(url, timeout=3.0)
    return client.list_packages()

class RedirectHandler(BaseRedirectHandler):
    """
    A class to work around a bug in some Python 3.2.x releases.
    """
    # There's a bug in the base version for some 3.2.x
    # (e.g. 3.2.2 on Ubuntu Oneiric). If a Location header
    # returns e.g. /abc, it bails because it says the scheme ''
    # is bogus, when actually it should use the request's
    # URL for the scheme. See Python issue #13696.
    def http_error_302(self, req, fp, code, msg, headers):
        # Some servers (incorrectly) return multiple Location headers
        # (so probably same goes for URI).  Use first header.
        newurl = None
        for key in ('location', 'uri'):
            if key in headers:
                newurl = headers[key]
                break
        if newurl is None:
            return
        urlparts = urlparse(newurl)
        if urlparts.scheme == '':
            newurl = urljoin(req.get_full_url(), newurl)
            if hasattr(headers, 'replace_header'):
                headers.replace_header(key, newurl)
            else:
                headers[key] = newurl
        return BaseRedirectHandler.http_error_302(self, req, fp, code, msg,
                                                  headers)

    http_error_301 = http_error_303 = http_error_307 = http_error_302

class Locator(object):
    """
    A base class for locators - things that locate distributions.
    """
    source_extensions = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz')
    binary_extensions = ('.egg', '.exe', '.whl')
    excluded_extensions = ('.pdf',)

    # A list of tags indicating which wheels you want to match. The default
    # value of None matches against the tags compatible with the running
    # Python. If you want to match other values, set wheel_tags on a locator
    # instance to a list of tuples (pyver, abi, arch) which you want to match.
    wheel_tags = None

    downloadable_extensions = source_extensions + ('.whl',)

    def __init__(self, scheme='default'):
        """
        Initialise an instance.
        :param scheme: Because locators look for most recent versions, they
                       need to know the version scheme to use. This specifies
                       the current PEP-recommended scheme - use ``'legacy'``
                       if you need to support existing distributions on PyPI.
        """
        self._cache = {}
        self.scheme = scheme
        # Because of bugs in some of the handlers on some of the platforms,
        # we use our own opener rather than just using urlopen.
        self.opener = build_opener(RedirectHandler())
        # If get_project() is called from locate(), the matcher instance
        # is set from the requirement passed to locate(). See issue #18 for
        # why this can be useful to know.
        self.matcher = None

    def clear_cache(self):
        self._cache.clear()

    def _get_scheme(self):
        return self._scheme

    def _set_scheme(self, value):
        self._scheme = value

    scheme = property(_get_scheme, _set_scheme)

    def _get_project(self, name):
        """
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This should be implemented in subclasses.

        If called from a locate() request, self.matcher will be set to a
        matcher for the requirement to satisfy, otherwise it will be None.
        """
        raise NotImplementedError('Please implement in the subclass')

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Please implement in the subclass')

    def get_project(self, name):
        """
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This calls _get_project to do all the work, and just implements a caching layer on top.
        """
        if self._cache is None:
            result = self._get_project(name)
        elif name in self._cache:
            result = self._cache[name]
        else:
            result = self._get_project(name)
            self._cache[name] = result
        return result

    def score_url(self, url):
        """
        Give an url a score which can be used to choose preferred URLs
        for a given project release.
        """
        t = urlparse(url)
        return (t.scheme != 'https', 'pypi.python.org' in t.netloc,
                posixpath.basename(t.path))

    def prefer_url(self, url1, url2):
        """
        Choose one of two URLs where both are candidates for distribution
        archives for the same version of a distribution (for example,
        .tar.gz vs. zip).

        The current implement favours http:// URLs over https://, archives
        from PyPI over those from other locations and then the archive name.
        """
        result = url2
        if url1:
            s1 = self.score_url(url1)
            s2 = self.score_url(url2)
            if s1 > s2:
                result = url1
            if result != url2:
                logger.debug('Not replacing %r with %r', url1, url2)
            else:
                logger.debug('Replacing %r with %r', url1, url2)
        return result

    def split_filename(self, filename, project_name):
        """
        Attempt to split a filename in project name, version and Python version.
        """
        return split_filename(filename, project_name)

    def convert_url_to_download_info(self, url, project_name):
        """
        See if a URL is a candidate for a download URL for a project (the URL
        has typically been scraped from an HTML page).

        If it is, a dictionary is returned with keys "name", "version",
        "filename" and "url"; otherwise, None is returned.
        """
        def same_project(name1, name2):
            name1, name2 = name1.lower(), name2.lower()
            if name1 == name2:
                result = True
            else:
                # distribute replaces '-' by '_' in project names, so it
                # can tell where the version starts in a filename.
                result = name1.replace('_', '-') == name2.replace('_', '-')
            return result

        result = None
        scheme, netloc, path, params, query, frag = urlparse(url)
        if frag.lower().startswith('egg='):
            logger.debug('%s: version hint in fragment: %r',
                         project_name, frag)
        m = HASHER_HASH.match(frag)
        if m:
            algo, digest = m.groups()
        else:
            algo, digest = None, None
        origpath = path
        if path and path[-1] == '/':
            path = path[:-1]
        if path.endswith('.whl'):
            try:
                wheel = Wheel(path)
                if is_compatible(wheel, self.wheel_tags):
                    if project_name is None:
                        include = True
                    else:
                        include = same_project(wheel.name, project_name)
                    if include:
                        result = {
                            'name': wheel.name,
                            'version': wheel.version,
                            'filename': wheel.filename,
                            'url': urlunparse((scheme, netloc, origpath,
                                               params, query, '')),
                            'python-version': ', '.join(
                                ['.'.join(list(v[2:])) for v in wheel.pyver]),
                        }
            except Exception as e:
                logger.warning('invalid path for wheel: %s', path)
        elif path.endswith(self.downloadable_extensions):
            path = filename = posixpath.basename(path)
            for ext in self.downloadable_extensions:
                if path.endswith(ext):
                    path = path[:-len(ext)]
                    t = self.split_filename(path, project_name)
                    if not t:
                        logger.debug('No match for project/version: %s', path)
                    else:
                        name, version, pyver = t
                        if not project_name or same_project(project_name, name):
                            result = {
                                'name': name,
                                'version': version,
                                'filename': filename,
                                'url': urlunparse((scheme, netloc, origpath,
                                                   params, query, '')),
                                #'packagetype': 'sdist',
                            }
                            if pyver:
                                result['python-version'] = pyver
                    break
        if result and algo:
            result['%s_digest' % algo] = digest
        return result

    def _get_digest(self, info):
        """
        Get a digest from a dictionary by looking at keys of the form
        'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
        """
        result = None
        for algo in ('sha256', 'md5'):
            key = '%s_digest' % algo
            if key in info:
                result = (algo, info[key])
                break
        return result

    def _update_version_data(self, result, info):
        """
        Update a result dictionary (the final result from _get_project) with a dictionary for a
        specific version, whih typically holds information gleaned from a filename or URL for an
        archive for the distribution.
        """
        name = info.pop('name')
        version = info.pop('version')
        if version in result:
            dist = result[version]
            md = dist.metadata
        else:
            dist = make_dist(name, version, scheme=self.scheme)
            md = dist.metadata
        dist.digest = self._get_digest(info)
        if md.source_url != info['url']:
            md.source_url = self.prefer_url(md.source_url, info['url'])
        dist.locator = self
        result[version] = dist

    def locate(self, requirement, prereleases=False):
        """
        Find the most recent distribution which matches the given
        requirement.

        :param requirement: A requirement of the form 'foo (1.0)' or perhaps
                            'foo (>= 1.0, < 2.0, != 1.3)'
        :param prereleases: If ``True``, allow pre-release versions
                            to be located. Otherwise, pre-release versions
                            are not returned.
        :return: A :class:`Distribution` instance, or ``None`` if no such
                 distribution could be located.
        """
        result = None
        r = parse_requirement(requirement)
        if r is None:
            raise DistlibException('Not a valid requirement: %r' % requirement)
        scheme = get_scheme(self.scheme)
        self.matcher = matcher = scheme.matcher(r.requirement)
        logger.debug('matcher: %s (%s)', matcher, type(matcher).__name__)
        versions = self.get_project(r.name)
        if versions:
            # sometimes, versions are invalid
            slist = []
            vcls = matcher.version_class
            for k in versions:
                try:
                    if not matcher.match(k):
                        logger.debug('%s did not match %r', matcher, k)
                    else:
                        if prereleases or not vcls(k).is_prerelease:
                            slist.append(k)
                        else:
                            logger.debug('skipping pre-release '
                                         'version %s of %s', k, matcher.name)
                except Exception:
                    logger.warning('error matching %s with %r', matcher, k)
                    pass # slist.append(k)
            if len(slist) > 1:
                slist = sorted(slist, key=scheme.key)
            if slist:
                logger.debug('sorted list: %s', slist)
                result = versions[slist[-1]]
        if result and r.extras:
            result.extras = r.extras
        self.matcher = None
        return result


class PyPIRPCLocator(Locator):
    """
    This locator uses XML-RPC to locate distributions. It therefore
    cannot be used with simple mirrors (that only mirror file content).
    """
    def __init__(self, url, **kwargs):
        """
        Initialise an instance.

        :param url: The URL to use for XML-RPC.
        :param kwargs: Passed to the superclass constructor.
        """
        super(PyPIRPCLocator, self).__init__(**kwargs)
        self.base_url = url
        self.client = ServerProxy(url, timeout=3.0)

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        return set(self.client.list_packages())

    def _get_project(self, name):
        result = {}
        versions = self.client.package_releases(name, True)
        for v in versions:
            urls = self.client.release_urls(name, v)
            data = self.client.release_data(name, v)
            metadata = Metadata(scheme=self.scheme)
            metadata.name = data['name']
            metadata.version = data['version']
            metadata.license = data.get('license')
            metadata.keywords = data.get('keywords', [])
            metadata.summary = data.get('summary')
            dist = Distribution(metadata)
            if urls:
                info = urls[0]
                metadata.source_url = info['url']
                dist.digest = self._get_digest(info)
                dist.locator = self
                result[v] = dist
        return result

class PyPIJSONLocator(Locator):
    """
    This locator uses PyPI's JSON interface. It's very limited in functionality
    nad probably not worth using.
    """
    def __init__(self, url, **kwargs):
        super(PyPIJSONLocator, self).__init__(**kwargs)
        self.base_url = ensure_slash(url)

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Not available from this locator')

    def _get_project(self, name):
        result = {}
        url = urljoin(self.base_url, '%s/json' % quote(name))
        try:
            resp = self.opener.open(url)
            data = resp.read().decode() # for now
            d = json.loads(data)
            md = Metadata(scheme=self.scheme)
            data = d['info']
            md.name = data['name']
            md.version = data['version']
            md.license = data.get('license')
            md.keywords = data.get('keywords', [])
            md.summary = data.get('summary')
            dist = Distribution(md)
            urls = d['urls']
            if urls:
                info = urls[0]
                md.source_url = info['url']
                dist.digest = self._get_digest(info)
                dist.locator = self
                result[md.version] = dist
        except Exception as e:
            logger.exception('JSON fetch failed: %s', e)
        return result


class Page(object):
    """
    This class represents a scraped HTML page.
    """
    # The following slightly hairy-looking regex just looks for the contents of
    # an anchor link, which has an attribute "href" either immediately preceded
    # or immediately followed by a "rel" attribute. The attribute values can be
    # declared with double quotes, single quotes or no quotes - which leads to
    # the length of the expression.
    _href = re.compile("""
(rel\s*=\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\s\n]*))\s+)?
href\s*=\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\s\n]*))
(\s+rel\s*=\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\s\n]*)))?
""", re.I | re.S | re.X)
    _base = re.compile(r"""<base\s+href\s*=\s*['"]?([^'">]+)""", re.I | re.S)

    def __init__(self, data, url):
        """
        Initialise an instance with the Unicode page contents and the URL they
        came from.
        """
        self.data = data
        self.base_url = self.url = url
        m = self._base.search(self.data)
        if m:
            self.base_url = m.group(1)

    _clean_re = re.compile(r'[^a-z0-9$&+,/:;=?@.#%_\\|-]', re.I)

    @cached_property
    def links(self):
        """
        Return the URLs of all the links on a page together with information
        about their "rel" attribute, for determining which ones to treat as
        downloads and which ones to queue for further scraping.
        """
        def clean(url):
            "Tidy up an URL."
            scheme, netloc, path, params, query, frag = urlparse(url)
            return urlunparse((scheme, netloc, quote(path),
                               params, query, frag))

        result = set()
        for match in self._href.finditer(self.data):
            d = match.groupdict('')
            rel = (d['rel1'] or d['rel2'] or d['rel3'] or
                   d['rel4'] or d['rel5'] or d['rel6'])
            url = d['url1'] or d['url2'] or d['url3']
            url = urljoin(self.base_url, url)
            url = unescape(url)
            url = self._clean_re.sub(lambda m: '%%%2x' % ord(m.group(0)), url)
            result.add((url, rel))
        # We sort the result, hoping to bring the most recent versions
        # to the front
        result = sorted(result, key=lambda t: t[0], reverse=True)
        return result


class SimpleScrapingLocator(Locator):
    """
    A locator which scrapes HTML pages to locate downloads for a distribution.
    This runs multiple threads to do the I/O; performance is at least as good
    as pip's PackageFinder, which works in an analogous fashion.
    """

    # These are used to deal with various Content-Encoding schemes.
    decoders = {
        'deflate': zlib.decompress,
        'gzip': lambda b: gzip.GzipFile(fileobj=BytesIO(d)).read(),
        'none': lambda b: b,
    }

    def __init__(self, url, timeout=None, num_workers=10, **kwargs):
        """
        Initialise an instance.
        :param url: The root URL to use for scraping.
        :param timeout: The timeout, in seconds, to be applied to requests.
                        This defaults to ``None`` (no timeout specified).
        :param num_workers: The number of worker threads you want to do I/O,
                            This defaults to 10.
        :param kwargs: Passed to the superclass.
        """
        super(SimpleScrapingLocator, self).__init__(**kwargs)
        self.base_url = ensure_slash(url)
        self.timeout = timeout
        self._page_cache = {}
        self._seen = set()
        self._to_fetch = queue.Queue()
        self._bad_hosts = set()
        self.skip_externals = False
        self.num_workers = num_workers
        self._lock = threading.RLock()
        # See issue #45: we need to be resilient when the locator is used
        # in a thread, e.g. with concurrent.futures. We can't use self._lock
        # as it is for coordinating our internal threads - the ones created
        # in _prepare_threads.
        self._gplock = threading.RLock()

    def _prepare_threads(self):
        """
        Threads are created only when get_project is called, and terminate
        before it returns. They are there primarily to parallelise I/O (i.e.
        fetching web pages).
        """
        self._threads = []
        for i in range(self.num_workers):
            t = threading.Thread(target=self._fetch)
            t.setDaemon(True)
            t.start()
            self._threads.append(t)

    def _wait_threads(self):
        """
        Tell all the threads to terminate (by sending a sentinel value) and
        wait for them to do so.
        """
        # Note that you need two loops, since you can't say which
        # thread will get each sentinel
        for t in self._threads:
            self._to_fetch.put(None)    # sentinel
        for t in self._threads:
            t.join()
        self._threads = []

    def _get_project(self, name):
        result = {}
        with self._gplock:
            self.result = result
            self.project_name = name
            url = urljoin(self.base_url, '%s/' % quote(name))
            self._seen.clear()
            self._page_cache.clear()
            self._prepare_threads()
            try:
                logger.debug('Queueing %s', url)
                self._to_fetch.put(url)
                self._to_fetch.join()
            finally:
                self._wait_threads()
            del self.result
        return result

    platform_dependent = re.compile(r'\b(linux-(i\d86|x86_64|arm\w+)|'
                                    r'win(32|-amd64)|macosx-?\d+)\b', re.I)

    def _is_platform_dependent(self, url):
        """
        Does an URL refer to a platform-specific download?
        """
        return self.platform_dependent.search(url)

    def _process_download(self, url):
        """
        See if an URL is a suitable download for a project.

        If it is, register information in the result dictionary (for
        _get_project) about the specific version it's for.

        Note that the return value isn't actually used other than as a boolean
        value.
        """
        if self._is_platform_dependent(url):
            info = None
        else:
            info = self.convert_url_to_download_info(url, self.project_name)
        logger.debug('process_download: %s -> %s', url, info)
        if info:
            with self._lock:    # needed because self.result is shared
                self._update_version_data(self.result, info)
        return info

    def _should_queue(self, link, referrer, rel):
        """
        Determine whether a link URL from a referring page and with a
        particular "rel" attribute should be queued for scraping.
        """
        scheme, netloc, path, _, _, _ = urlparse(link)
        if path.endswith(self.source_extensions + self.binary_extensions +
                         self.excluded_extensions):
            result = False
        elif self.skip_externals and not link.startswith(self.base_url):
            result = False
        elif not referrer.startswith(self.base_url):
            result = False
        elif rel not in ('homepage', 'download'):
            result = False
        elif scheme not in ('http', 'https', 'ftp'):
            result = False
        elif self._is_platform_dependent(link):
            result = False
        else:
            host = netloc.split(':', 1)[0]
            if host.lower() == 'localhost':
                result = False
            else:
                result = True
        logger.debug('should_queue: %s (%s) from %s -> %s', link, rel,
                     referrer, result)
        return result

    def _fetch(self):
        """
        Get a URL to fetch from the work queue, get the HTML page, examine its
        links for download candidates and candidates for further scraping.

        This is a handy method to run in a thread.
        """
        while True:
            url = self._to_fetch.get()
            try:
                if url:
                    page = self.get_page(url)
                    if page is None:    # e.g. after an error
                        continue
                    for link, rel in page.links:
                        if link not in self._seen:
                            self._seen.add(link)
                            if (not self._process_download(link) and
                                self._should_queue(link, url, rel)):
                                logger.debug('Queueing %s from %s', link, url)
                                self._to_fetch.put(link)
            finally:
                # always do this, to avoid hangs :-)
                self._to_fetch.task_done()
            if not url:
                #logger.debug('Sentinel seen, quitting.')
                break

    def get_page(self, url):
        """
        Get the HTML for an URL, possibly from an in-memory cache.

        XXX TODO Note: this cache is never actually cleared. It's assumed that
        the data won't get stale over the lifetime of a locator instance (not
        necessarily true for the default_locator).
        """
        # http://peak.telecommunity.com/DevCenter/EasyInstall#package-index-api
        scheme, netloc, path, _, _, _ = urlparse(url)
        if scheme == 'file' and os.path.isdir(url2pathname(path)):
            url = urljoin(ensure_slash(url), 'index.html')

        if url in self._page_cache:
            result = self._page_cache[url]
            logger.debug('Returning %s from cache: %s', url, result)
        else:
            host = netloc.split(':', 1)[0]
            result = None
            if host in self._bad_hosts:
                logger.debug('Skipping %s due to bad host %s', url, host)
            else:
                req = Request(url, headers={'Accept-encoding': 'identity'})
                try:
                    logger.debug('Fetching %s', url)
                    resp = self.opener.open(req, timeout=self.timeout)
                    logger.debug('Fetched %s', url)
                    headers = resp.info()
                    content_type = headers.get('Content-Type', '')
                    if HTML_CONTENT_TYPE.match(content_type):
                        final_url = resp.geturl()
                        data = resp.read()
                        encoding = headers.get('Content-Encoding')
                        if encoding:
                            decoder = self.decoders[encoding]   # fail if not found
                            data = decoder(data)
                        encoding = 'utf-8'
                        m = CHARSET.search(content_type)
                        if m:
                            encoding = m.group(1)
                        try:
                            data = data.decode(encoding)
                        except UnicodeError:
                            data = data.decode('latin-1')    # fallback
                        result = Page(data, final_url)
                        self._page_cache[final_url] = result
                except HTTPError as e:
                    if e.code != 404:
                        logger.exception('Fetch failed: %s: %s', url, e)
                except URLError as e:
                    logger.exception('Fetch failed: %s: %s', url, e)
                    with self._lock:
                        self._bad_hosts.add(host)
                except Exception as e:
                    logger.exception('Fetch failed: %s: %s', url, e)
                finally:
                    self._page_cache[url] = result   # even if None (failure)
        return result

    _distname_re = re.compile('<a href=[^>]*>([^<]+)<')

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        page = self.get_page(self.base_url)
        if not page:
            raise DistlibException('Unable to get %s' % self.base_url)
        for match in self._distname_re.finditer(page.data):
            result.add(match.group(1))
        return result

class DirectoryLocator(Locator):
    """
    This class locates distributions in a directory tree.
    """

    def __init__(self, path, **kwargs):
        """
        Initialise an instance.
        :param path: The root of the directory tree to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * recursive - if True (the default), subdirectories are
                         recursed into. If False, only the top-level directory
                         is searched,
        """
        self.recursive = kwargs.pop('recursive', True)
        super(DirectoryLocator, self).__init__(**kwargs)
        path = os.path.abspath(path)
        if not os.path.isdir(path):
            raise DistlibException('Not a directory: %r' % path)
        self.base_dir = path

    def should_include(self, filename, parent):
        """
        Should a filename be considered as a candidate for a distribution
        archive? As well as the filename, the directory which contains it
        is provided, though not used by the current implementation.
        """
        return filename.endswith(self.downloadable_extensions)

    def _get_project(self, name):
        result = {}
        for root, dirs, files in os.walk(self.base_dir):
            for fn in files:
                if self.should_include(fn, root):
                    fn = os.path.join(root, fn)
                    url = urlunparse(('file', '',
                                      pathname2url(os.path.abspath(fn)),
                                      '', '', ''))
                    info = self.convert_url_to_download_info(url, name)
                    if info:
                        self._update_version_data(result, info)
            if not self.recursive:
                break
        return result

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        for root, dirs, files in os.walk(self.base_dir):
            for fn in files:
                if self.should_include(fn, root):
                    fn = os.path.join(root, fn)
                    url = urlunparse(('file', '',
                                      pathname2url(os.path.abspath(fn)),
                                      '', '', ''))
                    info = self.convert_url_to_download_info(url, None)
                    if info:
                        result.add(info['name'])
            if not self.recursive:
                break
        return result

class JSONLocator(Locator):
    """
    This locator uses special extended metadata (not available on PyPI) and is
    the basis of performant dependency resolution in distlib. Other locators
    require archive downloads before dependencies can be determined! As you
    might imagine, that can be slow.
    """
    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        raise NotImplementedError('Not available from this locator')

    def _get_project(self, name):
        result = {}
        data = get_project_data(name)
        if data:
            for info in data.get('files', []):
                if info['ptype'] != 'sdist' or info['pyversion'] != 'source':
                    continue
                # We don't store summary in project metadata as it makes
                # the data bigger for no benefit during dependency
                # resolution
                dist = make_dist(data['name'], info['version'],
                                 summary=data.get('summary',
                                                  'Placeholder for summary'),
                                 scheme=self.scheme)
                md = dist.metadata
                md.source_url = info['url']
                # TODO SHA256 digest
                if 'digest' in info and info['digest']:
                    dist.digest = ('md5', info['digest'])
                md.dependencies = info.get('requirements', {})
                dist.exports = info.get('exports', {})
                result[dist.version] = dist
        return result

class DistPathLocator(Locator):
    """
    This locator finds installed distributions in a path. It can be useful for
    adding to an :class:`AggregatingLocator`.
    """
    def __init__(self, distpath, **kwargs):
        """
        Initialise an instance.

        :param distpath: A :class:`DistributionPath` instance to search.
        """
        super(DistPathLocator, self).__init__(**kwargs)
        assert isinstance(distpath, DistributionPath)
        self.distpath = distpath

    def _get_project(self, name):
        dist = self.distpath.get_distribution(name)
        if dist is None:
            result = {}
        else:
            result = { dist.version: dist }
        return result


class AggregatingLocator(Locator):
    """
    This class allows you to chain and/or merge a list of locators.
    """
    def __init__(self, *locators, **kwargs):
        """
        Initialise an instance.

        :param locators: The list of locators to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * merge - if False (the default), the first successful
                         search from any of the locators is returned. If True,
                         the results from all locators are merged (this can be
                         slow).
        """
        self.merge = kwargs.pop('merge', False)
        self.locators = locators
        super(AggregatingLocator, self).__init__(**kwargs)

    def clear_cache(self):
        super(AggregatingLocator, self).clear_cache()
        for locator in self.locators:
            locator.clear_cache()

    def _set_scheme(self, value):
        self._scheme = value
        for locator in self.locators:
            locator.scheme = value

    scheme = property(Locator.scheme.fget, _set_scheme)

    def _get_project(self, name):
        result = {}
        for locator in self.locators:
            d = locator.get_project(name)
            if d:
                if self.merge:
                    result.update(d)
                else:
                    # See issue #18. If any dists are found and we're looking
                    # for specific constraints, we only return something if
                    # a match is found. For example, if a DirectoryLocator
                    # returns just foo (1.0) while we're looking for
                    # foo (>= 2.0), we'll pretend there was nothing there so
                    # that subsequent locators can be queried. Otherwise we
                    # would just return foo (1.0) which would then lead to a
                    # failure to find foo (>= 2.0), because other locators
                    # weren't searched. Note that this only matters when
                    # merge=False.
                    if self.matcher is None:
                        found = True
                    else:
                        found = False
                        for k in d:
                            if self.matcher.match(k):
                                found = True
                                break
                    if found:
                        result = d
                        break
        return result

    def get_distribution_names(self):
        """
        Return all the distribution names known to this locator.
        """
        result = set()
        for locator in self.locators:
            try:
                result |= locator.get_distribution_names()
            except NotImplementedError:
                pass
        return result


# We use a legacy scheme simply because most of the dists on PyPI use legacy
# versions which don't conform to PEP 426 / PEP 440.
default_locator = AggregatingLocator(
                    JSONLocator(),
                    SimpleScrapingLocator('https://pypi.python.org/simple/',
                                          timeout=3.0),
                    scheme='legacy')

locate = default_locator.locate

NAME_VERSION_RE = re.compile(r'(?P<name>[\w-]+)\s*'
                             r'\(\s*(==\s*)?(?P<ver>[^)]+)\)$')

class DependencyFinder(object):
    """
    Locate dependencies for distributions.
    """

    def __init__(self, locator=None):
        """
        Initialise an instance, using the specified locator
        to locate distributions.
        """
        self.locator = locator or default_locator
        self.scheme = get_scheme(self.locator.scheme)

    def add_distribution(self, dist):
        """
        Add a distribution to the finder. This will update internal information
        about who provides what.
        :param dist: The distribution to add.
        """
        logger.debug('adding distribution %s', dist)
        name = dist.key
        self.dists_by_name[name] = dist
        self.dists[(name, dist.version)] = dist
        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Add to provided: %s, %s, %s', name, version, dist)
            self.provided.setdefault(name, set()).add((version, dist))

    def remove_distribution(self, dist):
        """
        Remove a distribution from the finder. This will update internal
        information about who provides what.
        :param dist: The distribution to remove.
        """
        logger.debug('removing distribution %s', dist)
        name = dist.key
        del self.dists_by_name[name]
        del self.dists[(name, dist.version)]
        for p in dist.provides:
            name, version = parse_name_and_version(p)
            logger.debug('Remove from provided: %s, %s, %s', name, version, dist)
            s = self.provided[name]
            s.remove((version, dist))
            if not s:
                del self.provided[name]

    def get_matcher(self, reqt):
        """
        Get a version matcher for a requirement.
        :param reqt: The requirement
        :type reqt: str
        :return: A version matcher (an instance of
                 :class:`distlib.version.Matcher`).
        """
        try:
            matcher = self.scheme.matcher(reqt)
        except UnsupportedVersionError:
            # XXX compat-mode if cannot read the version
            name = reqt.split()[0]
            matcher = self.scheme.matcher(name)
        return matcher

    def find_providers(self, reqt):
        """
        Find the distributions which can fulfill a requirement.

        :param reqt: The requirement.
         :type reqt: str
        :return: A set of distribution which can fulfill the requirement.
        """
        matcher = self.get_matcher(reqt)
        name = matcher.key   # case-insensitive
        result = set()
        provided = self.provided
        if name in provided:
            for version, provider in provided[name]:
                try:
                    match = matcher.match(version)
                except UnsupportedVersionError:
                    match = False

                if match:
                    result.add(provider)
                    break
        return result

    def try_to_replace(self, provider, other, problems):
        """
        Attempt to replace one provider with another. This is typically used
        when resolving dependencies from multiple sources, e.g. A requires
        (B >= 1.0) while C requires (B >= 1.1).

        For successful replacement, ``provider`` must meet all the requirements
        which ``other`` fulfills.

        :param provider: The provider we are trying to replace with.
        :param other: The provider we're trying to replace.
        :param problems: If False is returned, this will contain what
                         problems prevented replacement. This is currently
                         a tuple of the literal string 'cantreplace',
                         ``provider``, ``other``  and the set of requirements
                         that ``provider`` couldn't fulfill.
        :return: True if we can replace ``other`` with ``provider``, else
                 False.
        """
        rlist = self.reqts[other]
        unmatched = set()
        for s in rlist:
            matcher = self.get_matcher(s)
            if not matcher.match(provider.version):
                unmatched.add(s)
        if unmatched:
            # can't replace other with provider
            problems.add(('cantreplace', provider, other, unmatched))
            result = False
        else:
            # can replace other with provider
            self.remove_distribution(other)
            del self.reqts[other]
            for s in rlist:
                self.reqts.setdefault(provider, set()).add(s)
            self.add_distribution(provider)
            result = True
        return result

    def find(self, requirement, meta_extras=None, prereleases=False):
        """
        Find a distribution and all distributions it depends on.

        :param requirement: The requirement specifying the distribution to
                            find, or a Distribution instance.
        :param meta_extras: A list of meta extras such as :test:, :build: and
                            so on.
        :param prereleases: If ``True``, allow pre-release versions to be
                            returned - otherwise, don't return prereleases
                            unless they're all that's available.

        Return a set of :class:`Distribution` instances and a set of
        problems.

        The distributions returned should be such that they have the
        :attr:`required` attribute set to ``True`` if they were
        from the ``requirement`` passed to ``find()``, and they have the
        :attr:`build_time_dependency` attribute set to ``True`` unless they
        are post-installation dependencies of the ``requirement``.

        The problems should be a tuple consisting of the string
        ``'unsatisfied'`` and the requirement which couldn't be satisfied
        by any distribution known to the locator.
        """

        self.provided = {}
        self.dists = {}
        self.dists_by_name = {}
        self.reqts = {}

        meta_extras = set(meta_extras or [])
        if ':*:' in meta_extras:
            meta_extras.remove(':*:')
            # :meta: and :run: are implicitly included
            meta_extras |= set([':test:', ':build:', ':dev:'])

        if isinstance(requirement, Distribution):
            dist = odist = requirement
            logger.debug('passed %s as requirement', odist)
        else:
            dist = odist = self.locator.locate(requirement,
                                               prereleases=prereleases)
            if dist is None:
                raise DistlibException('Unable to locate %r' % requirement)
            logger.debug('located %s', odist)
        dist.requested = True
        problems = set()
        todo = set([dist])
        install_dists = set([odist])
        while todo:
            dist = todo.pop()
            name = dist.key     # case-insensitive
            if name not in self.dists_by_name:
                self.add_distribution(dist)
            else:
                #import pdb; pdb.set_trace()
                other = self.dists_by_name[name]
                if other != dist:
                    self.try_to_replace(dist, other, problems)

            ireqts = dist.run_requires | dist.meta_requires
            sreqts = dist.build_requires
            ereqts = set()
            if dist in install_dists:
                for key in ('test', 'build', 'dev'):
                    e = ':%s:' % key
                    if e in meta_extras:
                        ereqts |= getattr(dist, '%s_requires' % key)
            all_reqts = ireqts | sreqts | ereqts
            for r in all_reqts:
                providers = self.find_providers(r)
                if not providers:
                    logger.debug('No providers found for %r', r)
                    provider = self.locator.locate(r, prereleases=prereleases)
                    # If no provider is found and we didn't consider
                    # prereleases, consider them now.
                    if provider is None and not prereleases:
                        provider = self.locator.locate(r, prereleases=True)
                    if provider is None:
                        logger.debug('Cannot satisfy %r', r)
                        problems.add(('unsatisfied', r))
                    else:
                        n, v = provider.key, provider.version
                        if (n, v) not in self.dists:
                            todo.add(provider)
                        providers.add(provider)
                        if r in ireqts and dist in install_dists:
                            install_dists.add(provider)
                            logger.debug('Adding %s to install_dists',
                                         provider.name_and_version)
                for p in providers:
                    name = p.key
                    if name not in self.dists_by_name:
                        self.reqts.setdefault(p, set()).add(r)
                    else:
                        other = self.dists_by_name[name]
                        if other != p:
                            # see if other can be replaced by p
                            self.try_to_replace(p, other, problems)

        dists = set(self.dists.values())
        for dist in dists:
            dist.build_time_dependency = dist not in install_dists
            if dist.build_time_dependency:
                logger.debug('%s is a build-time dependency only.',
                             dist.name_and_version)
        logger.debug('find done for %s', odist)
        return dists, problems
python3.4/site-packages/pip/_vendor/distlib/_backport/__pycache__/shutil.cpython-34.pyc000064400000055076151735047420025045 0ustar00�
�Re2d�-@s�dZddlZddlZddlZddlmZddlZddlZddlZddl	m
Z
yddlZdZWne
k
r�dZYnXyddlmZWne
k
r�dZYnXydd	lmZWne
k
r�dZYnXd
ddd
dddddddddddddddddgZGdd�de�ZGd d�de�ZGd!d�de�ZGd"d#�d#e�ZGd$d%�d%e�ZyeWnek
r�dZYnXded(d
�Zd)d*�Zd+d�Zd,d�Zd-d
�Z d.d�Z!d/d�Z"d0d�Z#dde"dd1d�Z$ddd2d�Z%d3d4�Z&d5d�Z'd6d7�Z(d8d9�Z)d:d;�Z*d<dddddd=d>�Z+ddd?d@�Z,ddddAdB�Z-ie+dfgdDfdE6e+dggdGfdH6e+dhgdIfdJ6e-gdKfdL6Z.erOe+digdGfe.dH<ndMd�Z/ddNdOd�Z0dPd�Z1ddddddddQd�Z2dRd�Z3dSdT�Z4ddNdUd�Z5dVd�Z6dWdX�Z7dYdZ�Z8d[d\�Z9id]d^ge9gdDfdE6d_ge9gdIfdJ6d`ge8gdKfdL6Z:eradage9gdGfe:dH<ndbdc�Z;ddddd�Z<dS)jz�Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.

�N)�abspath�)�tarfileTF)�getpwnam)�getgrnam�copyfileobj�copyfile�copymode�copystat�copy�copy2�copytree�move�rmtree�Error�SpecialFileError�	ExecError�make_archive�get_archive_formats�register_archive_format�unregister_archive_format�get_unpack_formats�register_unpack_format�unregister_unpack_format�unpack_archive�ignore_patternsc@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�?/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/_backport/shutil.pyr,sc@seZdZdZdS)rz|Raised when trying to do a kind of operation (e.g. copying) which is
    not supported on a special file (e.g. a named pipe)N)rrr�__doc__rrrr r/sc@seZdZdZdS)rz+Raised when a command could not be executedN)rrrr!rrrr r3sc@seZdZdZdS)�	ReadErrorz%Raised when an archive cannot be readN)rrrr!rrrr r"6sr"c@seZdZdZdS)�
RegistryErrorzXRaised when a registery operation with the archiving
    and unpacking registeries failsN)rrrr!rrrr r#9sr#�icCs1x*|j|�}|sPn|j|�qWdS)z=copy data from file-like object fsrc to file-like object fdstN)�read�write)�fsrc�fdst�length�bufrrr rCs
cCsttjd�rEytjj||�SWqEtk
rAdSYqEXntjjtjj|��tjjtjj|��kS)N�samefileF)�hasattr�os�pathr+�OSError�normcaser)�src�dstrrr �	_samefileKs
r3cCs�t||�r(td||f��nxa||gD]S}ytj|�}Wntk
rbYq5Xtj|j�r5td|��q5q5Wt|d��,}t|d��}t	||�WdQXWdQXdS)zCopy data from src to dstz`%s` and `%s` are the same filez`%s` is a named pipe�rb�wbN)
r3rr-�statr/�S_ISFIFO�st_moder�openr)r1r2�fn�str'r(rrr rWs
cCsGttd�rCtj|�}tj|j�}tj||�ndS)zCopy mode bits from src to dst�chmodN)r,r-r6�S_IMODEr8r<)r1r2r;�moderrr r	kscCs�tj|�}tj|j�}ttd�rOtj||j|jf�nttd�rqtj||�nttd�r�t|d�r�ytj	||j
�Wq�tk
r�}z-ttd�s�|jtj
kr��nWYdd}~Xq�XndS)zCCopy all stat info (mode bits, atime, mtime, flags) from src to dst�utimer<�chflags�st_flags�
EOPNOTSUPPN)r-r6r=r8r,r?�st_atime�st_mtimer<r@rAr/�errnorB)r1r2r;r>�whyrrr r
rscCsTtjj|�r6tjj|tjj|��}nt||�t||�dS)zVCopy data and mode bits ("cp src dst").

    The destination may be a directory.

    N)r-r.�isdir�join�basenamerr	)r1r2rrr r�s$
cCsTtjj|�r6tjj|tjj|��}nt||�t||�dS)z]Copy data and all stat info ("cp -p src dst").

    The destination may be a directory.

    N)r-r.rGrHrIrr
)r1r2rrr r�s$
cs�fdd�}|S)z�Function that can be used as copytree() ignore parameter.

    Patterns is a sequence of glob-style patterns
    that are used to exclude filescs:g}x'�D]}|jtj||��q
Wt|�S)N)�extend�fnmatch�filter�set)r.�names�
ignored_names�pattern)�patternsrr �_ignore_patterns�s
z)ignore_patterns.<locals>._ignore_patternsr)rQrRr)rQr r�scCsCtj|�}|dk	r-|||�}n	t�}tj|�g}xk|D]c}	|	|krhqPntjj||	�}
tjj||	�}y�tjj|
�r�tj|
�}|r�tj||�q6tjj	|�r�|r�wPn||
|�n8tjj
|
�r)t|
||||�n
||
|�WqPtk
rr}
z|j
|
jd�WYdd}
~
XqPtk
r�}z!|j|
|t|�f�WYdd}~XqPXqPWyt||�Wn_tk
r)}z?tdk	r�t|t�r�n|j
||t|�f�WYdd}~XnX|r?t|��ndS)a�Recursively copy a directory tree.

    The destination directory must not already exist.
    If exception(s) occur, an Error is raised with a list of reasons.

    If the optional symlinks flag is true, symbolic links in the
    source tree result in symbolic links in the destination tree; if
    it is false, the contents of the files pointed to by symbolic
    links are copied. If the file pointed by the symlink doesn't
    exist, an exception will be added in the list of errors raised in
    an Error exception at the end of the copy process.

    You can set the optional ignore_dangling_symlinks flag to true if you
    want to silence this exception. Notice that this has no effect on
    platforms that don't support os.symlink.

    The optional ignore argument is a callable. If given, it
    is called with the `src` parameter, which is the directory
    being visited by copytree(), and `names` which is the list of
    `src` contents, as returned by os.listdir():

        callable(src, names) -> ignored_names

    Since copytree() is called recursively, the callable will be
    called once for each directory that is copied. It returns a
    list of names relative to the `src` directory that should
    not be copied.

    The optional copy_function argument is a callable that will be used
    to copy each file. It will be called with the source path and the
    destination path as arguments. By default, copy2() is used, but any
    function that supports the same signature (like copy()) can be used.

    Nr)r-�listdirrM�makedirsr.rH�islink�readlink�symlink�existsrGr
rrJ�args�EnvironmentError�append�strr
r/�WindowsError�
isinstance)r1r2�symlinks�ignore�
copy_function�ignore_dangling_symlinksrNrO�errors�name�srcname�dstname�linkto�errrFrrr r
�sD$	

&3/c$Cs�|rdd�}n|dkr0dd�}ny%tjj|�rTtd��nWn2tk
r�|tjj|tj��dSYnXg}ytj|�}Wn.tjk
r�|tj|tj��YnXx�|D]�}tjj||�}ytj	|�j
}Wntjk
r)d}YnXtj|�rLt
|||�q�ytj|�Wq�tjk
r�|tj|tj��Yq�Xq�Wytj|�Wn.tjk
r�|tj|tj��YnXdS)a�Recursively delete a directory tree.

    If ignore_errors is set, errors are ignored; otherwise, if onerror
    is set, it is called to handle the error with arguments (func,
    path, exc_info) where func is os.listdir, os.remove, or os.rmdir;
    path is the argument to that function that caused it to fail; and
    exc_info is a tuple returned by sys.exc_info().  If ignore_errors
    is false and onerror is None, an exception is raised.

    cWsdS)Nr)rYrrr �onerrorszrmtree.<locals>.onerrorNcWs�dS)Nr)rYrrr risz%Cannot call rmtree on a symbolic linkr)r-r.rUr/�sys�exc_inforS�errorrH�lstatr8r6�S_ISDIRr�remove�rmdir)r.�
ignore_errorsrirNrd�fullnamer>rrr r�s>
	
"cCstjj|jtjj��S)N)r-r.rI�rstrip�sep)r.rrr �	_basename'srucCs|}tjj|�r~t||�r;tj||�dStjj|t|��}tjj|�r~td|��q~nytj||�Wn�t	k
rtjj|�r�t
||�r�td||f��nt||dd�t|�nt
||�tj|�YnXdS)a�Recursively move a file or directory to another location. This is
    similar to the Unix "mv" command.

    If the destination is a directory or a symlink to a directory, the source
    is moved inside the directory. The destination path must not already
    exist.

    If the destination already exists but is not a directory, it may be
    overwritten depending on os.rename() semantics.

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed.
    A lot more could be done here...  A look at a mv.c shows a lot of
    the issues this implementation glosses over.

    Nz$Destination path '%s' already existsz.Cannot move a directory '%s' into itself '%s'.r_T)r-r.rGr3�renamerHrurXrr/�
_destinsrcr
rr�unlink)r1r2�real_dstrrr r,s$


cCsut|�}t|�}|jtjj�s@|tjj7}n|jtjj�sh|tjj7}n|j|�S)N)r�endswithr-r.rt�
startswith)r1r2rrr rwTsrwcCs_tdks|dkrdSyt|�}Wntk
rFd}YnX|dk	r[|dSdS)z"Returns a gid, given a group name.N�)r�KeyError)rd�resultrrr �_get_gid]s
rcCs_tdks|dkrdSyt|�}Wntk
rFd}YnX|dk	r[|dSdS)z"Returns an uid, given a user name.Nr|)rr})rdr~rrr �_get_uidis
r��gzipc
sidd6dd6}idd6}	tr>d|d<d|	d<n|dk	rn||	krntd	j|���n|d
|	j|d�}
tjj|
�}tjj|�s�|dk	r�|jd|�n|s�tj	|�q�n|dk	r|jd�nt
���t�������fd
d�}|s{tj
|
d||�}
z|
j|d|�Wd|
j�Xn|
S)a�Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", or None.

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_name' +  ".tar", possibly plus
    the appropriate compression extension (".gz", or ".bz2").

    Returns the output filename.
    �gzr��Nz.gz�bz2�bzip2z.bz2zCbad value for 'compress', or compression format not supported : {0}z.tarzcreating %szCreating tar archivecsF�dk	r!�|_�|_n�dk	rB�|_�|_n|S)N)�gid�gname�uid�uname)�tarinfo)r��group�ownerr�rr �_set_uid_gid�s		z#_make_tarball.<locals>._set_uid_gidzw|%srL)�_BZ2_SUPPORTED�
ValueError�format�getr-r.�dirnamerX�inforTr�rrr9�add�close)�	base_name�base_dir�compress�verbose�dry_runr�r��logger�tar_compression�compress_ext�archive_name�archive_dirr��tarr)r�r�r�r�r �
_make_tarballus4


		r�cCs~|rd}nd}ddlm}ddlm}y |d|||gd|�Wn"|k
rytd�|�YnXdS)	Nz-rz-rqr)�DistutilsExecError)�spawn�zipr�zkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utility)�distutils.errorsr��distutils.spawnr�r)r��zip_filenamer�r��
zipoptionsr�r�rrr �_call_external_zip�s	 
	r�cCs�|d}tjj|�}tjj|�sf|dk	rM|jd|�n|sftj|�qfnyddl}Wntk
r�d}YnX|dkr�t||||�n�|dk	r�|jd||�n|s�|j	|dd|j
�}x�tj|�D]�\}	}
}xs|D]k}tjjtjj
|	|��}
tjj|
�r|j|
|
�|dk	r�|jd|
�q�qqWqW|j�n|S)	amCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises ExecError.  Returns the name of the output zip
    file.
    z.zipNzcreating %srz#creating '%s' and adding '%s' to it�w�compressionzadding '%s')r-r.r�rXr�rT�zipfile�ImportErrorr��ZipFile�ZIP_DEFLATED�walk�normpathrH�isfiler&r�)r�r�r�r�r�r�r�r�r��dirpath�dirnames�	filenamesrdr.rrr �
_make_zipfile�s8	

	

!
r�r�zgzip'ed tar-file�gztarr�zbzip2'ed tar-file�bztarzuncompressed tar filer�zZIP filer�cCs'dd�tj�D�}|j�|S)z�Returns a list of supported formats for archiving and unarchiving.

    Each element of the returned sequence is a tuple (name, description)
    cSs&g|]\}}||df�qS)r|r)�.0rd�registryrrr �
<listcomp>s	z'get_archive_formats.<locals>.<listcomp>)�_ARCHIVE_FORMATS�items�sort)�formatsrrr r�s	
r�cCs�|dkrg}nt|tj�s:td|��nt|ttf�s^td��nxE|D]=}t|ttf�s�t|�dkretd��qeqeW|||ft|<dS)auRegisters an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    NzThe %s object is not callablez!extra_args needs to be a sequencer|z+extra_args elements are : (arg_name, value))r^�collections�Callable�	TypeError�tuple�list�lenr�)rd�function�
extra_args�description�elementrrr rs		
(cCst|=dS)N)r�)rdrrr rsc	Csltj�}	|dk	rb|dk	r7|jd|�ntjj|�}|sbtj|�qbn|dkrztj}ni|d6|d6}
yt|}Wn"tk
r�t	d|��YnX|d}x"|dD]\}
}||
|
<q�W|dkr||
d	<||
d
<nz||||
�}Wd|dk	rg|dk	rW|jd|	�ntj|	�nX|S)a�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "bztar"
    or "gztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    Nzchanging into '%s'r�r�zunknown archive format '%s'rrr�r�r�zchanging back to '%s')
r-�getcwd�debugr.r�chdir�curdirr�r}r�)r�r��root_dirr�r�r�r�r�r��save_cwd�kwargs�format_info�func�arg�val�filenamerrr r s6



cCs'dd�tj�D�}|j�|S)z�Returns a list of supported formats for unpacking.

    Each element of the returned sequence is a tuple
    (name, extensions, description)
    cSs-g|]#\}}||d|df�qS)r�r)r�rdr�rrr r�]s	z&get_unpack_formats.<locals>.<listcomp>)�_UNPACK_FORMATSr�r�)r�rrr rWs	
c	Cs�i}x9tj�D]+\}}x|dD]}|||<q*WqWx=|D]5}||krId}t||||f��qIqIWt|tj�s�td��ndS)z+Checks what gets registered as an unpacker.rz!%s is already registered for "%s"z*The registered function must be a callableN)r�r�r#r^r�r�r�)	�
extensionsr�r��existing_extensionsrdr��ext�	extension�msgrrr �_check_unpack_optionsbs
	r�cCs?|dkrg}nt|||�||||ft|<dS)aMRegisters an unpack format.

    `name` is the name of the format. `extensions` is a list of extensions
    corresponding to the format.

    `function` is the callable that will be
    used to unpack archives. The callable will receive archives to unpack.
    If it's unable to handle an archive, it needs to raise a ReadError
    exception.

    If provided, `extra_args` is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_unpack_formats() function.
    N)r�r�)rdr�r�r�r�rrr rts	cCst|=dS)z+Removes the pack format from the registery.N)r�)rdrrr r�scCs8tjj|�}tjj|�s4tj|�ndS)z1Ensure that the parent directory of `path` existsN)r-r.r�rGrT)r.r�rrr �_ensure_directory�sr�c	CsByddl}Wntk
r0td��YnX|j|�sStd|��n|j|�}z�x�|j�D]�}|j}|jd�srd|kr�qrntj	j
||jd��}|s�qrnt|�|j
d�sr|j|j�}t|d�}z|j|�Wd|j�~XqrqrWWd|j�XdS)z+Unpack zip `filename` to `extract_dir`
    rNz/zlib not supported, cannot unpack this archive.z%s is not a zip file�/z..r5)r�r�r"�
is_zipfiler��infolistr�r{r-r.rH�splitr�rzr%r9r&r�)	r��extract_dirr�r�r�rd�target�data�frrr �_unpack_zipfile�s0
	

r�cCs^ytj|�}Wn%tjk
r:td|��YnXz|j|�Wd|j�XdS)z:Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`
    z/%s is not a compressed or uncompressed tar fileN)rr9�TarErrorr"�
extractallr�)r�r��tarobjrrr �_unpack_tarfile�sr�z.tar.gzz.tgzz.tarz.zipz.bz2cCsIxBtj�D]4\}}x%|dD]}|j|�r$|Sq$Wq
WdS)Nr)r�r�rz)r�rdr�r�rrr �_find_unpack_format�s
r�cCs�|dkrtj�}n|dk	r�yt|}Wn'tk
r^tdj|���YnX|d}|||t|d��nbt|�}|dkr�tdj|���nt|d}tt|d�}||||�dS)a�Unpack an archive.

    `filename` is the name of the archive.

    `extract_dir` is the name of the target directory, where the archive
    is unpacked. If not provided, the current working directory is used.

    `format` is the archive format: one of "zip", "tar", or "gztar". Or any
    other registered format. If not provided, unpack_archive will use the
    filename extension and see if an unpacker was registered for that
    extension.

    In case none is found, a ValueError is raised.
    NzUnknown unpack format '{0}'rr|zUnknown archive format '{0}')	r-r�r�r}r�r��dictr�r")r�r�r�r�r�r�rrr r�s

i@)�compresszgzip)r��bzip2)r�N)r�r�)=r!r-rjr6�os.pathrrKr�rEr�rr�r�r��pwdr�grpr�__all__rZrrrr"�	Exceptionr#r]�	NameErrorrr3rr	r
rrrr
rrurrwrr�r�r�r�r�rrrrrr�rrr�r�r�r�r�rrrrr �<module>
s�



	
	Q1(		=/	
	6%
python3.4/site-packages/pip/_vendor/distlib/_backport/__pycache__/__init__.cpython-34.pyc000064400000000660151735047430025262 0ustar00�
�Re�@s
dZdS)aModules copied from Python 3 standard libraries, for internal use only.

Individual classes and functions are found in d2._backport.misc.  Intended
usage is to always import things missing from 3.1 from that module: the
built-in/stdlib objects will be used if found.
N)�__doc__�rr�A/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/_backport/__init__.py�<module>spython3.4/site-packages/pip/_vendor/distlib/_backport/__pycache__/tarfile.cpython-34.pyc000064400000207632151735047430025161 0ustar00�
�Re�i�@sXddlmZdZdZdZdZdZdZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZyddlZddlZWnek
r�dZZYnXeefZyeef7ZWnek
rYnXd	d
ddgZejdd
kr5ddlZnddlZejZdZdZedZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1d Z2d!Z3d"Z4dZ5d#Z6d$Z7e6Z8e&e'e(e)e,e-e.e*e+e/e0e1fZ9e&e'e.e1fZ:e/e0e1fZ;d%d&d'd(d)d*d+d,fZ<e=d%d&d+d,f�Z>ie?d-6e?d.6e?d(6e@d)6e@d*6e@d'6ZAd/ZBd0ZCd1ZDd2ZEd3ZFd4ZGd5ZHd6ZIdZJd7ZKd8ZLd9ZMd:ZNd;ZOd<ZPd=ZQd$ZRd#ZSe	jTd>d?fkr+d@ZUnejV�ZUdAdB�ZWdCdD�ZXdEdF�ZYd<e8dGdH�ZZdIdJ�Z[ddKdL�Z\eBdMfeCdNfeDdOfeEdPfeFdQfeGdRffeKdSffeLdTffeMeHBdUfeHdVfeMdWffeNdSffeOdTffePeIBdUfeIdVfePdWffeQdSffeRdTffeSeJBdXfeJdYfeSdWfff
Z]dZd[�Z^Gd\d�de_�Z`Gd]d^�d^e`�ZaGd_d`�d`e`�ZbGdadb�dbe`�ZcGdcdd�dde`�ZdGdedf�dfe`�ZeGdgdh�dhee�ZfGdidj�djee�ZgGdkdl�dlee�ZhGdmdn�dnee�ZiGdodp�dpee�ZjGdqdr�drek�ZlGdsdt�dtek�ZmGdudv�dvek�ZnGdwdx�dxek�ZoGdydz�dzek�ZpGd{d|�d|ek�ZqGd}d
�d
ek�ZrGd~d	�d	ek�ZsGdd��d�ek�Ztd�d�ZueZvesjZdS)��)�print_functionz
$Revision$z0.9.0u"Lars Gustäbel (lars@gustaebel.de)z5$Date: 2011-02-25 17:42:01 +0200 (Fri, 25 Feb 2011) $z?$Id: tarfile.py 88586 2011-02-25 15:42:01Z marc-andre.lemburg $u4Gustavo Niemeyer, Niels Gustäbel, Richard Townsend.N�TarFile�TarInfo�
is_tarfile�TarError�si�sustar  sustar00�d��0�1�2�3�4�5�6�7�L�K�S�x�g�X���path�linkpath�size�mtime�uid�gid�uname�gname�atime�ctimei�i�i`i@i iii���@� ����nt�cezutf-8cCs2|j||�}|d|�|t|�tS)z8Convert a string to a null-terminated bytes object.
    N)�encode�len�NUL)�s�length�encoding�errors�r5�@/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/_backport/tarfile.py�stn�sr7cCs>|jd�}|dkr.|d|�}n|j||�S)z8Convert a null-terminated bytes object to a string.
    srN���)�find�decode)r1r3r4�pr5r5r6�nts�sr<cCs�|dtd�kr_y%tt|dd�p1dd�}Wq�tk
r[td��Yq�XnId}x@tt|�d�D](}|dK}|t||d�7}q|W|S)	z/Convert a number field to a python number.
    rr&�ascii�strict�0r*zinvalid headerr)�chr�intr<�
ValueError�InvalidHeaderError�ranger/�ord)r1�n�ir5r5r6�nti�s%

rHcCs�d|kod|dknrHd|d|fjd�t}n�|tksh|d|dkrwtd��n|dkr�tjdtjd	|��d}nt�}x6t|d�D]$}|j	d|d
@�|dL}q�W|j	dd�|S)z/Convert a python number to a number field.
    rr*rz%0*or=r%zoverflow in number field�L�l�r&)
r.r0�
GNU_FORMATrB�struct�unpack�pack�	bytearrayrD�insert)rF�digits�formatr1rGr5r5r6�itn�s	$$ %	rTcCs�dttjd|dd��tjd|dd���}dttjd|dd��tjd	|dd���}||fS)
a�Calculate the checksum for a member's header by summing up all
       characters except for the chksum field which is treated as if
       it was filled with spaces. According to the GNU tar sources,
       some tars (Sun and NeXT) calculate chksum with signed char,
       which will be different if there are chars in the buffer with
       the high bit set. So we calculate two checksums, unsigned and
       signed.
    r%Z148BN�Z356B�iZ148bZ356b)�sumrMrN)�buf�unsigned_chksum�
signed_chksumr5r5r6�calc_chksums�s	@@r[cCs|dkrdS|dkrMx*|jd�}|s8Pn|j|�qWdSd}t||�\}}xQt|�D]C}|j|�}t|�|kr�td��n|j|�quW|dkr|j|�}t|�|kr�td��n|j|�ndS)zjCopy length bytes from fileobj src to fileobj dst.
       If length is None, copy the entire content.
    rNr)izend of file reachedi@i@)�read�write�divmodrDr/�IOError)�src�dstr2rX�BUFSIZE�blocks�	remainder�br5r5r6�copyfileobjs,rfrJ�-re�d�cr;�r�wr1�S�x�t�TcCsig}xStD]K}xB|D]-\}}||@|kr|j|�PqqW|jd�q
Wdj|�S)zcConvert a file's mode to a string of the form
       -rwxrwxrwx.
       Used by TarFile.list()
    rg�)�filemode_table�append�join)�modeZperm�table�bit�charr5r5r6�filemode8s

rxc@seZdZdZdS)rzBase exception.N)�__name__�
__module__�__qualname__�__doc__r5r5r5r6rGsc@seZdZdZdS)�ExtractErrorz%General exception for extract errors.N)ryrzr{r|r5r5r5r6r}Jsr}c@seZdZdZdS)�	ReadErrorz%Exception for unreadble tar archives.N)ryrzr{r|r5r5r5r6r~Msr~c@seZdZdZdS)�CompressionErrorz.Exception for unavailable compression methods.N)ryrzr{r|r5r5r5r6rPsrc@seZdZdZdS)�StreamErrorz=Exception for unsupported operations on stream-like TarFiles.N)ryrzr{r|r5r5r5r6r�Ssr�c@seZdZdZdS)�HeaderErrorz!Base exception for header errors.N)ryrzr{r|r5r5r5r6r�Vsr�c@seZdZdZdS)�EmptyHeaderErrorzException for empty headers.N)ryrzr{r|r5r5r5r6r�Ysr�c@seZdZdZdS)�TruncatedHeaderErrorz Exception for truncated headers.N)ryrzr{r|r5r5r5r6r�\sr�c@seZdZdZdS)�EOFHeaderErrorz"Exception for end of file headers.N)ryrzr{r|r5r5r5r6r�_sr�c@seZdZdZdS)rCzException for invalid headers.N)ryrzr{r|r5r5r5r6rCbsrCc@seZdZdZdS)�SubsequentHeaderErrorz3Exception for missing and invalid extended headers.N)ryrzr{r|r5r5r5r6r�esr�c@sFeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�
_LowLevelFilez�Low-level file object. Supports reading and writing.
       It is used instead of a regular file object for streaming
       access.
    cCsgitjd6tjtjBtjBd6|}ttd�rK|tjO}ntj||d�|_dS)Nrjrk�O_BINARYi�)	�os�O_RDONLY�O_WRONLY�O_CREAT�O_TRUNC�hasattrr��open�fd)�self�namertr5r5r6�__init__rs
z_LowLevelFile.__init__cCstj|j�dS)N)r��closer�)r�r5r5r6r�{sz_LowLevelFile.closecCstj|j|�S)N)r�r\r�)r�rr5r5r6r\~sz_LowLevelFile.readcCstj|j|�dS)N)r�r]r�)r�r1r5r5r6r]�sz_LowLevelFile.writeN)ryrzr{r|r�r�r\r]r5r5r5r6r�ls
	r�c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zddd�Zddd�Z
dd�Zdd�ZdS)�_Streama�Class that serves as an adapter between TarFile and
       a stream-like object.  The stream-like object only
       needs to have a read() or write() method and is accessed
       blockwise.  Use of gzip or bzip2 compression is possible.
       A stream-like object could be for example: sys.stdin,
       sys.stdout, a socket, a tape device etc.

       _Stream is intended to be used only internally.
    cCs�d|_|dkr0t||�}d|_n|dkrWt|�}|j�}n|p`d|_||_||_||_||_d|_	d|_
d|_y�|dkr&yddl}Wnt
k
r�td	��YnX||_|jd�|_|d
kr|j�q&|j�n|dkr�yddl}Wnt
k
rbtd��YnX|d
kr�d|_|j�|_q�|j�|_nWn-|js�|jj�nd|_�YnXdS)
z$Construct a _Stream object.
        TNF�*rp�r�gzzzlib module is not availablerj�bz2zbz2 module is not available)�_extfileobjr��_StreamProxy�getcomptyper�rt�comptype�fileobj�bufsizerX�pos�closed�zlib�ImportErrorr�crc32�crc�
_init_read_gz�_init_write_gzr��dbuf�BZ2Decompressor�cmp�
BZ2Compressorr�)r�r�rtr�r�r�r�r�r5r5r6r��sP								
	


			z_Stream.__init__cCs*t|d�r&|jr&|j�ndS)Nr�)r�r�r�)r�r5r5r6�__del__�sz_Stream.__del__cCs�|jjd|jj|jj|jjd�|_tjdtt	j	���}|j
d|d�|jjd�r�|jdd�|_n|j
|jj
d	d
�t�dS)z6Initialize for writing with gzip compression.
        �	rz<Ls�s�z.gzNrz
iso-8859-1�replace���)r��compressobj�DEFLATED�	MAX_WBITS�
DEF_MEM_LEVELr�rMrOrA�time�_Stream__writer��endswithr.r0)r��	timestampr5r5r6r��s
	z_Stream._init_write_gzcCsw|jdkr-|jj||j�|_n|jt|�7_|jdkrf|jj|�}n|j|�dS)z&Write string s to the stream.
        r��tarN)	r�r�r�r�r�r/r��compressr�)r�r1r5r5r6r]�sz
_Stream.writecCsk|j|7_xUt|j�|jkrf|jj|jd|j��|j|jd�|_qWdS)z]Write string s to the stream if a whole new block
           is ready to be written.
        N)rXr/r�r�r])r�r1r5r5r6�__write�s z_Stream.__writecCs�|jr
dS|jdkrF|jdkrF|j|jj�7_n|jdkr�|jr�|jj|j�d|_|jdkr�|jjtj	d|j
d@��|jjtj	d|jd@��q�n|js�|jj
�nd|_dS)	z[Close the _Stream object. No operation should be
           done on it afterwards.
        Nrkr�r�r�z<Ll��T)r�rtr�rXr��flushr�r]rMrOr�r�r�r�)r�r5r5r6r��s		#)	z
_Stream.closecCsg|jj|jj�|_d|_|jd�dkrItd��n|jd�dkrmtd��nt|jd��}|jd�|d	@r�t|jd��d
t|jd��}|j	|�n|d@rx-|jd�}|s|t
kr�Pq�q�Wn|d@rIx-|jd�}|s>|t
krPqqWn|d@rc|jd�nd
S)z:Initialize for reading a gzip compressed fileobj.
        r�rs�znot a gzip filerszunsupported compression method�r+r%r*r)N)r��
decompressobjr�r�r��
_Stream__readr~rrEr\r0)r��flag�xlenr1r5r5r6r�s.	

,


z_Stream._init_read_gzcCs|jS)z3Return the stream's file pointer position.
        )r�)r�r5r5r6�tell#sz_Stream.tellrcCs|||jdkrit||j|j�\}}x$t|�D]}|j|j�q?W|j|�ntd��|jS)zXSet the stream's file pointer to pos. Negative seeking
           is forbidden.
        rz seeking backwards is not allowed)r�r^r�rDr\r�)r�r�rcrdrGr5r5r6�seek(sz_Stream.seekNcCs||dkrTg}x-|j|j�}|s1Pn|j|�qWdj|�}n|j|�}|jt|�7_|S)z�Return the next size number of bytes from the stream.
           If size is not defined, return all bytes of the stream
           up to EOF.
        Nrp)�_readr�rrrsr�r/)r�rrnrXr5r5r6r\5sz_Stream.readcCs�|jdkr|j|�St|j�}x�||kr�|j|j�}|sVPny|jj|�}Wntk
r�td��YnX|j|7_|t|�7}q.W|jd|�}|j|d�|_|S)z+Return size bytes from the stream.
        r�zinvalid compressed dataN)	r�r�r/r�r�r��
decompressr_r~)r�rrirXr5r5r6r�Gs 

z
_Stream._readcCs�t|j�}xN||kr_|jj|j�}|s=Pn|j|7_|t|�7}qW|jd|�}|j|d�|_|S)zsReturn size bytes from stream. If internal buffer is empty,
           read another block from the stream.
        N)r/rXr�r\r�)r�rrirXr5r5r6�__read\sz_Stream.__read)ryrzr{r|r�r�r�r]r�r�r�r�r�r\r�r�r5r5r5r6r��s	4
	
r�c@sFeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)r�zsSmall proxy class that enables transparent compression
       detection for the Stream interface (mode 'r|*').
    cCs"||_|jjt�|_dS)N)r�r\�	BLOCKSIZErX)r�r�r5r5r6r�qs	z_StreamProxy.__init__cCs|jj|_|jS)N)r�r\rX)r�rr5r5r6r\usz_StreamProxy.readcCs0|jjd�rdS|jjd�r,dSdS)Ns�r�sBZh91r�r�)rX�
startswith)r�r5r5r6r�ys
z_StreamProxy.getcomptypecCs|jj�dS)N)r�r�)r�r5r5r6r��sz_StreamProxy.closeN)ryrzr{r|r�r\r�r�r5r5r5r6r�ls
r�c@speZdZdZdZdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS)�	_BZ2ProxyaSmall proxy class that enables external file object
       support for "r:bz2" and "w:bz2" modes. This is actually
       a workaround for a limitation in bz2 module's BZ2File
       class which (unlike gzip.GzipFile) has no support for
       a file object argument.
    r)icCs8||_||_t|jdd�|_|j�dS)Nr�)r�rt�getattrr��init)r�r�rtr5r5r6r��s		z_BZ2Proxy.__init__cCsbddl}d|_|jdkrO|j�|_|jjd�d|_n|j�|_dS)Nrrjr�)	r�r�rtr��bz2objr�r�rXr�)r�r�r5r5r6r��s	z_BZ2Proxy.initcCs�t|j�}x`||krq|jj|j�}|s=Pn|jj|�}|j|7_|t|�7}qW|jd|�}|j|d�|_|jt|�7_|S)N)r/rXr�r\�	blocksizer�r�r�)r�rrm�raw�datarXr5r5r6r\�sz_BZ2Proxy.readcCs4||jkr|j�n|j||j�dS)N)r�r�r\)r�r�r5r5r6r��s
z_BZ2Proxy.seekcCs|jS)N)r�)r�r5r5r6r��sz_BZ2Proxy.tellcCs;|jt|�7_|jj|�}|jj|�dS)N)r�r/r�r�r�r])r�r�r�r5r5r6r]�sz_BZ2Proxy.writecCs5|jdkr1|jj�}|jj|�ndS)Nrk)rtr�r�r�r])r�r�r5r5r6r��sz_BZ2Proxy.closeNi@)ryrzr{r|r�r�r�r\r�r�r]r�r5r5r5r6r��s
r�c@sXeZdZdZddd�Zdd�Zdd�Zd	d
�Zddd�ZdS)
�_FileInFilezA thin wrapper around an existing file object that
       provides a part of its data as an individual file
       object.
    NcCs||_||_||_d|_|dkrBd|fg}nd|_g|_d}|j}xs|D]k\}}||kr�|jjd||df�n|jjd||||f�||7}||}qjW||jkr
|jjd||jdf�ndS)NrFT)r��offsetr�position�	map_index�maprr)r�r�r�r�	blockinfo�lastpos�realposr5r5r6r��s$							 
z_FileInFile.__init__cCs#t|jd�sdS|jj�S)N�seekableT)r�r�r�)r�r5r5r6r��sz_FileInFile.seekablecCs|jS)z*Return the current file position.
        )r�)r�r5r5r6r��sz_FileInFile.tellcCs
||_dS)z(Seek to a position in the file.
        N)r�)r�r�r5r5r6r��sz_FileInFile.seekcCsE|dkr|j|j}nt||j|j�}d}x|dkr@xv|j|j\}}}}||jko�|knr�PqP|jd7_|jt|j�krPd|_qPqPWt|||j�}|r|jj||j|�||jj|�7}n|t	|7}||8}|j|7_qAW|S)z!Read data from the file.
        Nr�rr)
rr��minr�r�r/r�r�r\r0)r�rrXr��start�stopr�r2r5r5r6r\�s(
z_FileInFile.read)	ryrzr{r|r�r�r�r�r\r5r5r5r6r��sr�c@s�eZdZdZdZdd�Zdd�Zdd�Zd	d
�Zddd
�Z	e	Z
ddd�Zdd�Zdd�Z
ejdd�Zdd�Zdd�ZdS)�ExFileObjectzaFile-like object for reading an archive member.
       Is returned by TarFile.extractfile().
    icCsdt|j|j|j|j�|_|j|_d|_d|_|j|_d|_d|_	dS)NrjFrr�)
r�r��offset_datar�sparser�rtr�r��buffer)r��tarfile�tarinfor5r5r6r�s				zExFileObject.__init__cCsdS)NTr5)r�r5r5r6�readable!szExFileObject.readablecCsdS)NFr5)r�r5r5r6�writable$szExFileObject.writablecCs
|jj�S)N)r�r�)r�r5r5r6r�'szExFileObject.seekableNcCs�|jrtd��nd}|jrt|dkrH|j}d|_qt|jd|�}|j|d�|_n|dkr�||jj�7}n ||jj|t|��7}|jt|�7_|S)z~Read at most size bytes from the file. If size is not
           present or None, read all data until EOF is reached.
        zI/O operation on closed filer�N)r�rBr�r�r\r/r�)r�rrXr5r5r6r\*s			 zExFileObject.readrcCs|jrtd��n|jjd�d}|dkr�xv|jj|j�}|j|7_|std|kr=|jjd�d}|dkr�t|j�}nPq=q=Wn|dkr�t||�}n|jd|�}|j|d�|_|j	t|�7_	|S)z�Read one entire line from the file. If size is present
           and non-negative, return a string with at most that
           size, which may be an incomplete line.
        zI/O operation on closed files
rrNr8)
r�rBr�r9r�r\r�r/r�r�)r�rr�rXr5r5r6�readlineEs$	zExFileObject.readlinecCs4g}x'|j�}|sPn|j|�q	W|S)z0Return a list with all remaining lines.
        )r�rr)r��result�liner5r5r6�	readlinesbszExFileObject.readlinescCs|jrtd��n|jS)z*Return the current file position.
        zI/O operation on closed file)r�rBr�)r�r5r5r6r�ls	zExFileObject.tellcCs|jrtd��n|tjkrHtt|d�|j�|_n�|tjkr�|dkrt|j|d�|_q�t|j||j�|_nC|tj	kr�tt|j||j�d�|_ntd��d|_
|jj|j�dS)z(Seek to a position in the file.
        zI/O operation on closed filerzInvalid argumentr�N)
r�rBr��SEEK_SETr��maxrr��SEEK_CUR�SEEK_ENDr�r�r�)r�r��whencer5r5r6r�ts	!(	zExFileObject.seekcCs
d|_dS)zClose the file object.
        TN)r�)r�r5r5r6r��szExFileObject.closeccs&x|j�}|sPn|VqWdS)z/Get an iterator over the file's lines.
        N)r�)r�r�r5r5r6�__iter__�s
zExFileObject.__iter__r8)ryrzr{r|r�r�r�r�r�r\�read1r�r�r�r�r�r�r�r�r5r5r5r6r�s

r�c@sPeZdZdZdiZddd�Zdd�Zdd�Zeee�Z	dd�Z
dd �Zee
e�Zd!d"�Z
d#d$�Zeed%d&d'�Zd(d)�Zd*d+�Zd,d-�Zed.d/��Zd0d1�Zed2d3��Zed4d5��Zed6d7��Zed8d9��Zed:d;��Zed<d=��Zd>d?�Zd@dA�Z dBdC�Z!dDdE�Z"dFdG�Z#dHdI�Z$dJdK�Z%dLdM�Z&dNdO�Z'dPdQ�Z(dRdS�Z)dTdU�Z*dVdW�Z+dXdY�Z,dZd[�Z-d\d]�Z.d^d_�Z/d`da�Z0dbdc�Z1ddde�Z2dfdg�Z3dhS)jraInformational class which holds the details about an
       archive member given by a tar header block.
       TarInfo objects are returned by TarFile.getmember(),
       TarFile.getmembers() and TarFile.gettarinfo() and are
       usually created internally.
    r�rtrr rr�chksum�type�linknamer!r"�devmajor�devminorr�r��pax_headersr�r��_sparse_structs�_link_targetrpcCs�||_d|_d|_d|_d|_d|_d|_t|_d|_	d|_
d|_d|_d|_
d|_d|_d|_i|_dS)zXConstruct a TarInfo object. name is the optional name
           of the member.
        i�rrpN)r�rtrr rrr��REGTYPEr�r�r!r"r�r�r�r�r�r�)r�r�r5r5r6r��s"																zTarInfo.__init__cCs|jS)N)r�)r�r5r5r6�_getpath�szTarInfo._getpathcCs
||_dS)N)r�)r�r�r5r5r6�_setpath�szTarInfo._setpathcCs|jS)N)r�)r�r5r5r6�_getlinkpath�szTarInfo._getlinkpathcCs
||_dS)N)r�)r�r�r5r5r6�_setlinkpath�szTarInfo._setlinkpathcCs d|jj|jt|�fS)Nz<%s %r at %#x>)�	__class__ryr��id)r�r5r5r6�__repr__�szTarInfo.__repr__cCs�i
|jd6|jd@d6|jd6|jd6|jd6|jd6|jd6|jd	6|jd
6|j	d6|j
d6|jd
6|jd6}|d	t
kr�|djd�r�|dd7<n|S)z9Return the TarInfo's attributes as a dictionary.
        r�i�rtrr rrr�r�r�r!r"r�r��/)r�rtrr rrr�r�r�r!r"r�r��DIRTYPEr�)r��infor5r5r6�get_info�s"











$zTarInfo.get_info�surrogateescapecCsv|j�}|tkr+|j|||�S|tkrJ|j|||�S|tkrf|j||�Std��dS)z<Return a tar header as a string of 512 byte blocks.
        zinvalid formatN)r�USTAR_FORMAT�create_ustar_headerrL�create_gnu_header�
PAX_FORMAT�create_pax_headerrB)r�rSr3r4r�r5r5r6�tobuf�sz
TarInfo.tobufcCst|d<t|d�tkr/td��nt|d�tkri|j|d�\|d<|d<n|j|t||�S)z3Return the object as a ustar header block.
        �magicr�zlinkname is too longr��prefix)�POSIX_MAGICr/�LENGTH_LINKrB�LENGTH_NAME�_posix_split_name�_create_headerr)r�r�r3r4r5r5r6r�s
$zTarInfo.create_ustar_headercCs�t|d<d}t|d�tkrI||j|dt||�7}nt|d�tkr�||j|dt||�7}n||j|t||�S)z:Return the object as a GNU header block sequence.
        rr�r�r�)	�	GNU_MAGICr/r�_create_gnu_long_header�GNUTYPE_LONGLINKr�GNUTYPE_LONGNAMErrL)r�r�r3r4rXr5r5r6rs
##zTarInfo.create_gnu_headerc
Cs�t|d<|jj�}x�ddtfddtfddfD]�\}}}||kr_q>ny||jd	d
�Wn#tk
r�||||<w>YnXt||�|kr>||||<q>q>Wx�dD]�\}}||kr�d||<q�n||}d|ko d|dkns5t|t	�r�t
|�||<d||<q�q�W|rt|j|t|�}	nd}	|	|j
|td	d�S)z�Return the object as a ustar header block. If it cannot be
           represented this way, prepend a pax extended header sequence
           with supplement information.
        rr�rr�rr!r(r"r=r>rr*r r�rrrr�r�)�unamerr()�gnamerr(�zuidr*�zgidr*�zsizer�zmtimer)rrrr)r
r��copyrrr.�UnicodeEncodeErrorr/�
isinstance�float�str�_create_pax_generic_header�XHDTYPErr)
r�r�r3r�r��hnamer2rR�valrXr5r5r6rs4



4zTarInfo.create_pax_headercCs|j|td�S)zAReturn the object as a pax global header block sequence.
        �utf8)r�XGLTYPE)�clsr�r5r5r6�create_pax_global_headerDsz TarInfo.create_pax_global_headercCs�|dtd�}x*|r@|ddkr@|dd�}qW|t|�d�}|dd�}|s�t|�tkr�td��n||fS)zUSplit a name longer than 100 chars into a prefix
           and a name part.
        Nrr�zname is too longr8r8r8)�
LENGTH_PREFIXr/rrB)r�r�r	r5r5r6r
JszTarInfo._posix_split_namecCs�t|jdd�d||�t|jdd�d@d|�t|jdd�d|�t|jd	d�d|�t|jd
d�d|�t|jdd�d|�d
|jdt�t|jdd�d||�|jdt�t|jdd�d||�t|jdd�d||�t|jdd�d|�t|jdd�d|�t|jdd�d||�g}tjdtdj|��}t	|td��d}|dd�d|j
d�|d d�}|S)!z�Return a header block. info is a dictionary with file
           information, format must be one of the *_FORMAT constants.
        r�rpr	rtri�r*rr rrrs        r�r�rr!r(r"r�r�r	r
z%dsr�Nilz%06or=iei����i����)r7�getrTr�r
rMrOr�rsr[r.)r�rSr3r4�partsrXr�r5r5r6rYs&$/zTarInfo._create_headercCs@tt|�t�\}}|dkr<|t|t7}n|S)zdReturn the string payload filled with zero bytes
           up to the next 512 byte border.
        r)r^r/r�r0)�payloadrcrdr5r5r6�_create_payloaduszTarInfo._create_payloadcCsm|j||�t}i}d|d<||d<t|�|d<t|d<|j|t||�|j|�S)zTReturn a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
           for name.
        z
././@LongLinkr�r�rr)r.r0r/rrrr+)r%r�r�r3r4r�r5r5r6rs


zTarInfo._create_gnu_long_headercCs�d}xJ|j�D]<\}}y|jdd�Wqtk
rNd}PYqXqWd}|rl|d7}nx�|j�D]�\}}|jd�}|r�|j|d�}n|jd�}t|�t|�d}d	}	}
x0|tt|
��}	|	|
krPn|	}
q�W|tt|
�d
�d|d|d
7}qyWi}d|d<||d<t|�|d<t|d<|j|td
d�|j	|�S)z�Return a POSIX.1-2008 extended or global header sequence
           that contains a list of keyword, value pairs. The values
           must be strings.
        Fr#r>Tr�s21 hdrcharset=BINARY
rrrr=� �=s
z././@PaxHeaderr�r�rrr�)
�itemsr.rr/r�bytesr
rrr+)r%r�r�r3�binary�keyword�value�recordsrJrFr;r�r5r5r6r�s<




1


z"TarInfo._create_pax_generic_headercCsft|�dkr!td��nt|�tkrBtd��n|jt�tkrftd��nt|dd��}|t|�kr�t	d��n|�}t
|dd�||�|_t|dd	��|_t|d	d
��|_
t|d
d��|_t|dd��|_t|dd��|_||_|dd
�|_t
|d
d�||�|_t
|dd�||�|_t
|dd�||�|_t|dd��|_t|dd��|_t
|dd�||�}|jtkr6|jjd�r6t|_n|jtkrd}g}x�td�D]u}	y<t|||d��}
t||d|d��}Wntk
r�PYnX|j|
|f�|d7}q^Wt|d�}t|dd��}
|||
f|_ n|j!�r6|jj"d�|_n|rb|jt#krb|d|j|_n|S)zAConstruct a TarInfo object from a 512 byte bytes object.
        rzempty headerztruncated headerzend of file headerrUrVzbad checksumr	�l�t�|��ii	i)iIiQiYi�r�i�r+r�i�i�i�)$r/r�r�r��countr0r�rHr[rCr<r�rtrr rrr�r�r�r!r"r�r��AREGTYPEr�r��GNUTYPE_SPARSErDrBrr�boolr��isdir�rstrip�	GNU_TYPES)r%rXr3r4r��objr	r��structsrGr��numbytes�
isextended�origsizer5r5r6�frombuf�sZ		!"
zTarInfo.frombufcCsP|jjt�}|j||j|j�}|jj�t|_|j|�S)zOReturn the next TarInfo object from TarFile object
           tarfile.
        )	r�r\r�rFr3r4r�r��_proc_member)r%r�rXrAr5r5r6�fromtarfileszTarInfo.fromtarfilecCst|jttfkr"|j|�S|jtkr>|j|�S|jtttfkrc|j	|�S|j
|�SdS)zYChoose the right processing method depending on
           the type and call it.
        N)r�rr�
_proc_gnulongr<�_proc_sparser r$�SOLARIS_XHDTYPE�	_proc_pax�
_proc_builtin)r�r�r5r5r6rGs


zTarInfo._proc_membercCsx|jj�|_|j}|j�s6|jtkrO||j|j�7}n||_|j	|j
|j|j�|S)zfProcess a builtin type or an unknown type which
           will be treated as a regular file.
        )
r�r�r��isregr��SUPPORTED_TYPES�_blockrr��_apply_pax_infor�r3r4)r�r�r�r5r5r6rM$s		zTarInfo._proc_builtincCs�|jj|j|j��}y|j|�}Wntk
rQtd��YnX|j|_|jt	kr�t
||j|j�|_
n-|jtkr�t
||j|j�|_n|S)zSProcess the blocks that hold a GNU longname
           or longlink member.
        z missing or bad subsequent header)r�r\rPrrHr�r�r�r�rr<r3r4r�rr�)r�r�rX�nextr5r5r6rI5s
zTarInfo._proc_gnulongc
Cs&|j\}}}|`x�|r�|jjt�}d}x�td�D]�}y<t|||d��}t||d|d��}	Wntk
r�PYnX|r�|	r�|j||	f�n|d7}qFWt|d�}qW||_	|jj
�|_|j|j|j
�|_||_
|S)z8Process a GNU sparse header plus extra headers.
        r�rr9i�)r�r�r\r�rDrHrBrrr=r�r�r�rPrr�)
r�r�rBrDrErXr�rGr�rCr5r5r6rJKs(	"
		zTarInfo._proc_sparsecCs�|jj|j|j��}|jtkr9|j}n|jj�}tj	d|�}|dk	r�|j
d�jd�|d<n|jd�}|dkr�|j
}nd}tjd�}d}x�|j||�}|s�Pn|j�\}	}
t|	�}	||jd	�d|jd�|	d�}|j|
dd|j�}
|
tkrz|j|||j
|j�}n|j|dd|j�}|||
<||	7}q�Wy|j|�}Wntk
r�td
��YnXd|kr|j||�nbd|kr"|j|||�n@|jd
�dkrb|jd�dkrb|j|||�n|jttfkr�|j||j
|j�|j |_ d|kr�|j!}
|j"�s�|jt#kr�|
|j|j�7}
n|
|_ q�n|S)zVProcess an extended or global header as described in
           POSIX.1-2008.
        s\d+ hdrcharset=([^\n]+)\nNrr#�
hdrcharset�BINARYs(\d+) ([^=]+)=rrz missing or bad subsequent headerzGNU.sparse.mapzGNU.sparse.sizezGNU.sparse.major�1zGNU.sparse.minorr?r)$r�r\rPrr�r$r�r�re�search�groupr:r(r3�compile�match�groupsrA�endr��_decode_pax_fieldr4�PAX_NAME_FIELDSrHr�r��_proc_gnusparse_01�_proc_gnusparse_00�_proc_gnusparse_10r rKrQr�r�rNrO)r�r�rXr�r[rTr3�regexr�r2r1r2rRr�r5r5r6rLgs`.	

*	zTarInfo._proc_paxcCs�g}x6tjd|�D]"}|jt|jd���qWg}x6tjd|�D]"}|jt|jd���qXWtt||��|_dS)z?Process a GNU tar extended sparse header, version 0.0.
        s\d+ GNU.sparse.offset=(\d+)\nrs\d+ GNU.sparse.numbytes=(\d+)\nN)rW�finditerrrrArY�list�zipr�)r�rRr�rX�offsetsr[rCr5r5r6ra�s  zTarInfo._proc_gnusparse_00cCsVdd�|djd�D�}tt|ddd�|ddd���|_dS)z?Process a GNU tar extended sparse header, version 0.1.
        cSsg|]}t|��qSr5)rA)�.0rmr5r5r6�
<listcomp>�s	z.TarInfo._proc_gnusparse_01.<locals>.<listcomp>zGNU.sparse.map�,Nrr)�splitrerfr�)r�rRr�r�r5r5r6r`�s zTarInfo._proc_gnusparse_01cCs�d}g}|jjt�}|jdd�\}}t|�}xjt|�|dkr�d|kr�||jjt�7}n|jdd�\}}|jt|��qEW|jj�|_t	t
|ddd�|ddd���|_dS)z?Process a GNU tar extended sparse header, version 1.0.
        Ns
rr)r�r\r�rkrAr/rrr�r�rerfr�)r�rRr�r��fieldsr�rX�numberr5r5r6rb�szTarInfo._proc_gnusparse_10c
Csx�|j�D]�\}}|dkr8t|d|�q
|dkr]t|dt|��q
|dkr�t|dt|��q
|tkr
|tkr�yt||�}Wq�tk
r�d}Yq�Xn|dkr�|jd�}nt|||�q
q
W|j�|_dS)	zoReplace fields with supplemental information from a previous
           pax extended or global header.
        zGNU.sparse.namerzGNU.sparse.sizerzGNU.sparse.realsizerr�N)	r.�setattrrA�
PAX_FIELDS�PAX_NUMBER_FIELDSrBr?rr�)r�r�r3r4r1r2r5r5r6rQ�s"
zTarInfo._apply_pax_infocCs=y|j|d�SWn"tk
r8|j||�SYnXdS)z1Decode a single field from a pax record.
        r>N)r:�UnicodeDecodeError)r�r2r3�fallback_encoding�fallback_errorsr5r5r6r^s
zTarInfo._decode_pax_fieldcCs0t|t�\}}|r(|d7}n|tS)z_Round up a byte count by BLOCKSIZE and return it,
           e.g. _block(834) => 1024.
        r)r^r�)r�r:rcrdr5r5r6rP
s
zTarInfo._blockcCs
|jtkS)N)r��
REGULAR_TYPES)r�r5r5r6rNsz
TarInfo.isregcCs
|j�S)N)rN)r�r5r5r6�isfileszTarInfo.isfilecCs
|jtkS)N)r�r�)r�r5r5r6r>sz
TarInfo.isdircCs
|jtkS)N)r��SYMTYPE)r�r5r5r6�issymsz
TarInfo.issymcCs
|jtkS)N)r��LNKTYPE)r�r5r5r6�islnksz
TarInfo.islnkcCs
|jtkS)N)r��CHRTYPE)r�r5r5r6�ischr sz
TarInfo.ischrcCs
|jtkS)N)r��BLKTYPE)r�r5r5r6�isblk"sz
TarInfo.isblkcCs
|jtkS)N)r��FIFOTYPE)r�r5r5r6�isfifo$szTarInfo.isfifocCs
|jdk	S)N)r�)r�r5r5r6�issparse&szTarInfo.issparsecCs|jtttfkS)N)r�rzr|r~)r�r5r5r6�isdev(sz
TarInfo.isdevN)znamezmodezuidzgidzsizezmtimezchksumztypezlinknamezunamezgnamezdevmajorzdevminorzoffsetzoffset_datazpax_headerszsparseztarfilez_sparse_structsz_link_target)4ryrzr{r|�	__slots__r�r�r��propertyrr�r�rr�r�DEFAULT_FORMAT�ENCODINGrrrr�classmethodr&r
�staticmethodrr+rrrFrHrGrMrIrJrLrar`rbrQr^rPrNrur>rwryr{r}rr�r�r5r5r5r6r�s`
1
3?
f	c@s�eZdZdZdZdZdZdZeZ	e
ZdZe
ZeZdddddddddddddd	�Zeddded
d��Zedddd
��Zeddddd��Zeddddd��Zidd6dd6dd6Zdd�Zdd�Zdd�Zdd �Zdddd!d"�Zd#d$d%�Zdd#ddd&d'�Zdd(d)�Z d*dd+d,�Z!d-d#d.d/�Z"d0d1�Z#d#d2d3�Z$d4d5�Z%d6d7�Z&d8d9�Z'd:d;�Z(d<d=�Z)d>d?�Z*d@dA�Z+dBdC�Z,dDdE�Z-dFdG�Z.dddHdI�Z/dJdK�Z0ddLdM�Z1dNdO�Z2dPdQ�Z3dRdS�Z4dTdU�Z5dVdW�Z6dS)Xrz=The TarFile Class provides an interface to tar archives.
    rFrNrjrc
Cs�t|�dks|dkr-td��n||_idd6dd6dd	6||_|s�|jdkr�tjj|�r�d	|_d|_nt||j�}d
|_nN|dkr�t	|d�r�|j
}nt	|d
�r�|j|_nd|_|rtjj|�nd|_
||_|dk	rC||_
n|dk	r[||_n|dk	rs||_n|dk	r�||_n|dk	r�||_n|	|_|
dk	r�|j
tkr�|
|_n	i|_|dk	r�||_n|dk	r||_nd
|_g|_d
|_|jj�|_i|_yF|jdkrod|_|j�|_n|jdkr x�|jj|j�y&|jj |�}|jj!|�Wq�t"k
r�|jj|j�PYq�t#k
r}
zt$t%|
���WYdd}
~
Xq�Xq�Wn|jdkr�d|_|jr�|jj&|jj'��}|jj(|�|jt|�7_q�nWn-|js�|jj)�nd|_�YnXdS)a�Open an (uncompressed) tar archive `name'. `mode' is either 'r' to
           read from an existing archive, 'a' to append data to an existing
           file or 'w' to create a new file overwriting an existing one. `mode'
           defaults to 'r'.
           If `fileobj' is given, it is used for reading or writing data. If it
           can be determined, `mode' is overridden by `fileobj's mode.
           `fileobj' is not closed, when TarFile is closed.
        rr�zmode must be 'r', 'a' or 'w'�rbrjzr+b�a�wbrkFNr�rtT�aw)*r/rBrt�_moder�r�exists�	bltn_openr�r�r��abspathr�rSr��dereference�ignore_zerosr3r4rr��debug�
errorlevelr��members�_loadedr�r��inodes�firstmemberrRr�rHrrr�r�r~rr&rr]r�)r�r�rtr�rSr�r�r�r3r4r�r�r��erXr5r5r6r�Fs�	""		!								
,				zTarFile.__init__c
KsG|r|rtd��n|dkr�x�|jD]�}t||j|�}|dk	rj|j�}ny||d||�SWq3ttfk
r�}	z$|dk	r�|j|�nw3WYdd}	~	Xq3Xq3Wtd��nVd|krh|jdd�\}
}|
pd}
|pd}||jkrEt||j|�}ntd	|��|||
||�Sd
|kr|jd
d�\}
}|
p�d}
|p�d}|
dkr�td��nt||
|||�}y|||
||�}Wn|j	��YnXd
|_
|S|dkr7|j||||�Std��dS)a|Open a tar archive for reading, writing or appending. Return
           an appropriate TarFile class.

           mode:
           'r' or 'r:*' open for reading with transparent compression
           'r:'         open for reading exclusively uncompressed
           'r:gz'       open for reading with gzip compression
           'r:bz2'      open for reading with bzip2 compression
           'a' or 'a:'  open for appending, creating the file if necessary
           'w' or 'w:'  open for writing without compression
           'w:gz'       open for writing with gzip compression
           'w:bz2'      open for writing with bzip2 compression

           'r|*'        open a stream of tar blocks with transparent compression
           'r|'         open an uncompressed stream of tar blocks for reading
           'r|gz'       open a gzip compressed stream of tar blocks
           'r|bz2'      open a bzip2 compressed stream of tar blocks
           'w|'         open an uncompressed stream for writing
           'w|gz'       open a gzip compressed stream for writing
           'w|bz2'      open a bzip2 compressed stream for writing
        znothing to openrj�r:*Nz%file could not be opened successfully�:rr�zunknown compression type %r�|�rwzmode must be 'r' or 'w'Fr�zundiscernible mode)rjr�)rB�	OPEN_METHr�r�r~rr�rkr�r�r��taropen)
r%r�rtr�r��kwargsr��func�	saved_posr�rx�streamrnr5r5r6r��sN
	zTarFile.opencKs@t|�dks|dkr-td��n|||||�S)zCOpen uncompressed tar archive name for reading or writing.
        rr�zmode must be 'r', 'a' or 'w')r/rB)r%r�rtr�r�r5r5r6r��szTarFile.taropenr�c	Ks9t|�dks|dkr-td��nyddl}|jWn$ttfk
rjtd��YnX|dk	}y8|j||d||�}|j||||�}Wnztk
r|r�|dk	r�|j	�n|dkr��nt
d��Yn+|r$|dk	r$|j	�n�YnX||_|S)	zkOpen gzip compressed tar archive name for reading or writing.
           Appending is not allowed.
        rr�zmode must be 'r' or 'w'rNzgzip module is not availablereznot a gzip file)r/rB�gzip�GzipFiler��AttributeErrorrr�r_r�r~r�)	r%r�rtr��
compresslevelr�r�Z
extfileobjrnr5r5r6�gzopens.


	zTarFile.gzopencKs�t|�dks|dkr-td��nyddl}Wntk
r]td��YnX|dk	r|t||�}n|j||d|�}y|j||||�}Wn.tt	fk
r�|j
�td��YnXd	|_|S)
zlOpen bzip2 compressed tar archive name for reading or writing.
           Appending is not allowed.
        rr�zmode must be 'r' or 'w'.rNzbz2 module is not availabler�znot a bzip2 fileF)
r/rBr�r�rr��BZ2Filer�r_�EOFErrorr�r~r�)r%r�rtr�r�r�r�rnr5r5r6�bz2open$s 

	zTarFile.bz2openr�r�r�r�r�r�cCs�|jr
dS|jdkr�|jjttd�|jtd7_t|jt�\}}|dkr�|jjtt|�q�n|j	s�|jj
�nd|_dS)zlClose the TarFile. In write-mode, two finishing zero blocks are
           appended to the archive.
        Nr�rrT)r�rtr�r]r0r�r�r^�
RECORDSIZEr�r�)r�rcrdr5r5r6r�Hs		z
TarFile.closecCs2|j|�}|dkr.td|��n|S)aReturn a TarInfo object for member `name'. If `name' can not be
           found in the archive, KeyError is raised. If a member occurs more
           than once in the archive, its last occurrence is assumed to be the
           most up-to-date version.
        Nzfilename %r not found)�
_getmember�KeyError)r�r�r�r5r5r6�	getmember\szTarFile.getmembercCs'|j�|js |j�n|jS)z�Return the members of the archive as a list of TarInfo objects. The
           list has the same order as the members in the archive.
        )�_checkr��_loadr�)r�r5r5r6�
getmembersgs
	
zTarFile.getmemberscCsdd�|j�D�S)z�Return the members of the archive as a list of their names. It has
           the same order as the list returned by getmembers().
        cSsg|]}|j�qSr5)r�)rhr�r5r5r6rius	z$TarFile.getnames.<locals>.<listcomp>)r�)r�r5r5r6�getnamesqszTarFile.getnamescCs^|jd�|dk	r%|j}n|dkr:|}ntjj|�\}}|jtjd�}|jd�}|j�}||_	|dkr�t
td�r�|jr�tj|�}q�tj
|�}ntj|j��}d}|j}t
j|�r�|j|jf}	|jrj|jdkrj|	|jkrj||j|	krjt}
|j|	}qt}
|	dr||j|	<qn�t
j|�r�t}
nst
j|�r�t}
n[t
j|�r�t}
tj|�}n4t
j|�r�t }
nt
j!|�rt"}
ndS||_||_#|j$|_%|j&|_'|
tkr]|j(|_)n	d|_)|j*|_+|
|_,||_-t.r�yt.j/|j%�d|_0Wq�t1k
r�Yq�Xnt2r�yt2j3|j'�d|_4Wq�t1k
r�Yq�Xn|
t t"fkrZt
td�rZt
td	�rZtj5|j6�|_7tj8|j6�|_9qZn|S)
aOCreate a TarInfo object for either the file `name' or the file
           object `fileobj' (using os.fstat on its file descriptor). You can
           modify some of the TarInfo's attributes before you add it using
           addfile(). If given, `arcname' specifies an alternative name for the
           file in the archive.
        r�Nr��lstatrprr�major�minor):r�r�r�r�
splitdriver��sep�lstripr�r�r�r�r��stat�fstat�fileno�st_mode�S_ISREG�st_ino�st_dev�st_nlinkr�rxr��S_ISDIRr��S_ISFIFOr~�S_ISLNKrv�readlink�S_ISCHRrz�S_ISBLKr|rt�st_uidr�st_gidr �st_sizer�st_mtimerr�r��pwd�getpwuidr!r��grp�getgrgidr"r��st_rdevr�r�r�)r�r��arcnamer��drvr��statresr��stmd�inoder�r5r5r6�
gettarinfows~
			"
									

zTarFile.gettarinfoTcCsv|j�xe|D]]}|r�tt|j�dd�td|jpK|j|jpZ|jfdd�|j�s�|j	�r�tdd|j
|jfdd�ntd|jdd�tdt
j|j�dd	�dd�nt|j|j�rd
nddd�|rg|j�r?td|jdd�n|j�rgtd
|jdd�qgnt�qWdS)z�Print a table of contents to sys.stdout. If `verbose' is False, only
           the names of the members are printed. If it is True, an `ls -l'-like
           output is produced.
        r]� z%s/%sz%10sz%d,%dz%10dz%d-%02d-%02d %02d:%02d:%02dNr�r�rpz->zlink to)r��printrxrtr!rr"r r{r}r�r�rr��	localtimerr�r>rwr�ry)r��verboser�r5r5r6re�s&

	')zTarFile.listc	Cs�|jd�|dkr"|}n|dk	rtddl}|jdtd�||�rt|jdd|�dSn|jdk	r�tjj|�|jkr�|jdd|�dS|jd|�|j	||�}|dkr�|jdd	|�dS|dk	r;||�}|dkr;|jdd|�dSn|j
�rst|d
�}|j||�|j
�n�|j�r�|j|�|r�xTtj|�D]@}|jtjj||�tjj||�||d|�q�Wq�n
|j|�dS)a~Add the file `name' to the archive. `name' may be any type of file
           (directory, fifo, symbolic link, etc.). If given, `arcname'
           specifies an alternative name for the file in the archive.
           Directories are added recursively by default. This can be avoided by
           setting `recursive' to False. `exclude' is a function that should
           return True for each filename to be excluded. `filter' is a function
           that expects a TarInfo object argument and returns the changed
           TarInfo object, if it returns None the TarInfo object will be
           excluded from the archive.
        r�Nrzuse the filter argument insteadrztarfile: Excluded %rztarfile: Skipped %rrztarfile: Unsupported type %rr��filter)r��warnings�warn�DeprecationWarning�_dbgr�r�rr�r�rNr��addfiler�r>�listdir�addrs)	r�r�r��	recursive�excluder�r�r��fr5r5r6r��sD
		
*

*zTarFile.addcCs�|jd�tj|�}|j|j|j|j�}|jj|�|jt	|�7_|dk	r�t
||j|j�t|jt
�\}}|dkr�|jjtt
|�|d7}n|j|t
7_n|jj|�dS)a]Add the TarInfo object `tarinfo' to the archive. If `fileobj' is
           given, tarinfo.size bytes are read from it and added to the archive.
           You can create TarInfo objects using gettarinfo().
           On Windows platforms, `fileobj' should always be opened with mode
           'rb' to avoid irritation about the file size.
        r�Nrr)r�rrrSr3r4r�r]r�r/rfrr^r�r0r�rr)r�r�r�rXrcrdr5r5r6r�4s

zTarFile.addfile�.cCsOg}|dkr|}nx_|D]W}|j�r\|j|�tj|�}d|_n|j||d|j��q"W|jddd��|j�x�|D]�}tjj	||j
�}y4|j||�|j||�|j
||�Wq�tk
rF}z.|jdkr �n|jdd|�WYdd}~Xq�Xq�WdS)	aMExtract all members from the archive to the current working
           directory and set owner, modification time and permissions on
           directories afterwards. `path' specifies a different directory
           to extract to. `members' is optional and must be a subset of the
           list returned by getmembers().
        Ni��	set_attrs�keycSs|jS)N)r�)r�r5r5r6�<lambda>dsz$TarFile.extractall.<locals>.<lambda>rztarfile: %s)r>rrrrt�extract�sort�reverser�rrsr��chown�utime�chmodr}r�r�)r�rr��directoriesr��dirpathr�r5r5r6�
extractallNs*	

!

zTarFile.extractallrpcCsa|jd�t|t�r.|j|�}n|}|j�r^tjj||j�|_	ny,|j
|tjj||j�d|�Wn�tk
r}zc|j
dkr��nI|jdkr�|jdd|j�n |jdd|j|jf�WYdd}~XnNtk
r\}z.|j
dkr6�n|jdd|�WYdd}~XnXdS)axExtract a member from the archive to the current working directory,
           using its full name. Its file information is extracted as accurately
           as possible. `member' may be a filename or a TarInfo object. You can
           specify a different directory using `path'. File attributes (owner,
           mtime, mode) are set unless `set_attrs' is False.
        rjr�rNrztarfile: %sztarfile: %s %r)r�rrr�ryr�rrsr�r��_extract_memberr��EnvironmentErrorr��filenamer��strerrorr})r��memberrr�r�r�r5r5r6r�ts&
!2zTarFile.extractcCs�|jd�t|t�r.|j|�}n|}|j�rP|j||�S|jtkro|j||�S|j�s�|j	�r�t|j
t�r�td��q�|j
|j|��SndSdS)a�Extract a member from the archive as a file object. `member' may be
           a filename or a TarInfo object. If `member' is a regular file, a
           file-like object is returned. If `member' is a link, a file-like
           object is constructed from the link's target. If `member' is none of
           the above, None is returned.
           The file-like object is read-only and provides the following
           methods: read(), readline(), readlines(), seek() and tell()
        rjz'cannot extract (sym)link as file objectN)r�rrr�rN�
fileobjectr�rOryrwr�r�r��extractfile�_find_link_target)r�r�r�r5r5r6r��s	
zTarFile.extractfilecCs�|jd�}|jdtj�}tjj|�}|r_tjj|�r_tj|�n|j�sw|j	�r�|j
dd|j|jf�n|j
d|j�|j
�r�|j||�n�|j�r�|j||�n�|j�r
|j||�n�|j�s"|j�r5|j||�n]|j�sM|j	�r`|j||�n2|jtkr�|j||�n|j||�|r�|j||�|j	�s�|j||�|j||�q�ndS)z\Extract the TarInfo object tarinfo to a physical
           file called targetpath.
        r�rz%s -> %sN)r?r�r�r�r�dirnamer��makedirsryrwr�r�r�rN�makefiler>�makedirr�makefifor{r}�makedev�makelinkr�rO�makeunknownr�r�r�)r�r��
targetpathr��	upperdirsr5r5r6r��s4#zTarFile._extract_membercCsXytj|d�Wn=tk
rS}z|jtjkrA�nWYdd}~XnXdS)z,Make a directory called targetpath.
        i�N)r��mkdirr��errno�EEXIST)r�r�rr�r5r5r6r��s
zTarFile.makedircCs�|j}|j|j�t|d�}|jdk	rqxJ|jD])\}}|j|�t|||�qAWnt|||j�|j|j�|j�|j�dS)z'Make a file called targetpath.
        r�N)	r�r�r�r�r�rfr�truncater�)r�r�r�source�targetr�rr5r5r6r��s	

zTarFile.makefilecCs+|j||�|jdd|j�dS)zYMake a file from a TarInfo object with an unknown type
           at targetpath.
        rz9tarfile: Unknown file type %r, extracted as regular file.N)r�r�r�)r�r�rr5r5r6r	szTarFile.makeunknowncCs/ttd�rtj|�ntd��dS)z'Make a fifo called targetpath.
        �mkfifozfifo not supported by systemN)r�r�r
r})r�r�rr5r5r6r�	szTarFile.makefifocCs�ttd�s ttd�r/td��n|j}|j�rT|tjO}n
|tjO}tj||tj	|j
|j��dS)z<Make a character or block device called targetpath.
        �mknodr�z'special devices not supported by systemN)r�r�r}rtr}r��S_IFBLK�S_IFCHRrr�r�r�)r�r�rrtr5r5r6r�	s 	
zTarFile.makedevcCsyj|j�r%tj|j|�nDtjj|j�rPtj|j|�n|j|j	|�|�WnQt
k
r�|j�r�tjjtjj|j
�|j�}n	|j}Yn?Xy|j|j	|�|�Wntk
r�td��YnXdS)z�Make a (symbolic) link called targetpath. If it cannot be created
          (platform limitation), we try to make a copy of the referenced file
          instead of a link.
        z%unable to resolve link inside archiveN)rwr��symlinkr�rr�r��linkr�r��symlink_exceptionrsr�r�r�r})r�r�rrr5r5r6r'	s"

zTarFile.makelinkc Cs,tr(ttd�r(tj�dkr(ytj|j�d}Wntk
r^|j}YnXytj	|j
�d}Wntk
r�|j}YnXyZ|j�r�ttd�r�tj
|||�n%tjdkr�tj|||�nWq(tk
r$}ztd��WYdd}~Xq(XndS)z6Set owner of targetpath according to tarinfo.
        �geteuidrr�lchownZos2emxzcould not change ownerN)r�r�r�rr��getgrnamr"r�r �getpwnamr!rrwr�sys�platformr�r�r})r�r�r�g�ur�r5r5r6r�D	s '

z
TarFile.chowncCsattd�r]ytj||j�Wq]tk
rY}ztd��WYdd}~Xq]XndS)zASet file permissions of targetpath according to tarinfo.
        r�zcould not change modeN)r�r�r�rtr�r})r�r�rr�r5r5r6r�Z	s
z
TarFile.chmodcCskttd�sdSy tj||j|jf�Wn1tk
rf}ztd��WYdd}~XnXdS)zBSet modification time of targetpath according to tarinfo.
        r�Nz"could not change modification time)r�r�r�rr�r})r�r�rr�r5r5r6r�c	s z
TarFile.utimecCs(|jd�|jdk	r2|j}d|_|S|jj|j�d}x�y|jj|�}Wn�tk
r�}z@|jr�|j	dd|j|f�|jt
7_wNnWYdd}~Xn1tk
rI}zd|jr|j	dd|j|f�|jt
7_wNn$|jdkr7tt
|���nWYdd}~Xn�tk
rx|jdkrttd��nYntk
r�}z)|jdkr�tt
|���nWYdd}~Xn7tk
r�}ztt
|���WYdd}~XnXPqNW|dk	r|jj|�n	d|_|S)z�Return the next member of the archive as a TarInfo object, when
           TarFile is opened for reading. Return None if there is no more
           available.
        �raNrz0x%X: %srz
empty fileT)r�r�r�r�r�r�rHr�r�r�r�rCr~rr�r�r�r�rrr�)r��mr�r�r5r5r6rRn	sF
				'
'%	zTarFile.nextcCs�|j�}|dk	r4|d|j|��}n|rOtjj|�}nxKt|�D]=}|r�tjj|j�}n	|j}||kr\|Sq\WdS)z}Find an archive member by name from bottom to top.
           If tarinfo is given, it is used as the starting point.
        N)r��indexr�r�normpath�reversedr�)r�r�r��	normalizer�r��member_namer5r5r6r��	s	zTarFile._getmembercCs0x |j�}|dkrPqqWd|_dS)zWRead through the entire archive file and look for readable
           members.
        NT)rRr�)r�r�r5r5r6r��	s
z
TarFile._loadcCsW|jr"td|jj��n|dk	rS|j|krStd|j��ndS)znCheck if TarFile is still open, and if the operation's mode
           corresponds to TarFile's mode.
        z%s is closedNzbad operation for mode %r)r�r_r�ryrt)r�rtr5r5r6r��	s	zTarFile._checkcCs�|j�r5tjj|j�d|j}d}n|j}|}|j|d|dd�}|dkr~td|��n|S)zZFind the target member of a symlink or hardlink member in the
           archive.
        r�Nr�rTzlinkname %r not found)rwr�rr�r�r�r�r�)r�r�r��limitr�r5r5r6r��	s 		zTarFile._find_link_targetcCs$|jrt|j�St|�SdS)z$Provide an iterator object.
        N)r��iterr��TarIter)r�r5r5r6r��	s	
zTarFile.__iter__cCs)||jkr%t|dtj�ndS)z.Write debugging output to sys.stderr.
        �fileN)r�r�r�stderr)r��level�msgr5r5r6r��	szTarFile._dbgcCs|j�|S)N)r�)r�r5r5r6�	__enter__�	s
zTarFile.__enter__cCs?|dkr|j�n"|js2|jj�nd|_dS)NT)r�r�r�r�)r�r�r2�	tracebackr5r5r6�__exit__�	s

	zTarFile.__exit__)7ryrzr{r|r�r�r�r�r�rSr�r3r4rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rer�r�r�r�r�r�r�r�rr�r�rr�r�r�rRr�r�r�r�r�r�r'r)r5r5r5r6r,sniK

b>&#&0	1
	c@s@eZdZdZdd�Zdd�Zdd�ZeZdS)	r"zMIterator Class.

       for tarinfo in TarFile(...):
           suite...
    cCs||_d|_dS)z$Construct a TarIter object.
        rN)r�r)r�r�r5r5r6r�
s	zTarIter.__init__cCs|S)z Return iterator object.
        r5)r�r5r5r6r�
szTarIter.__iter__cCs~|jjs9|jj�}|skd|j_t�qkn2y|jj|j}Wntk
rjt�YnX|jd7_|S)z�Return the next item using TarFile's next() method.
           When all members have been read, set TarFile as _loaded.
        Tr)r�r�rR�
StopIterationr�r�
IndexError)r�r�r5r5r6�__next__

s
zTarIter.__next__N)ryrzr{r|r�r�r,rRr5r5r5r6r"�	s
r"cCs;yt|�}|j�dSWntk
r6dSYnXdS)zfReturn True if name points to a tar archive that we
       are able to handle, else return False.
    TFN)r�r�r)r�rnr5r5r6r#
s

)w�
__future__r�__version__�version�
__author__�__date__�	__cvsid__�__credits__rr�r�rr�rMrrWr�r�r�r��NotImplementedErrorr�WindowsError�	NameError�__all__�version_info�__builtin__�builtinsr��_openr0r�r�rr
rrr'r�r;rxrvrzr|r�r~�CONTTYPErrr<r r$rKrrLrr�rOrtr@ro�setr_rrArp�S_IFLNK�S_IFREGr�S_IFDIRr
�S_IFIFOZTSUIDZTSGIDZTSVTXZTUREADZTUWRITEZTUEXECZTGREADZTGWRITEZTGEXECZTOREADZTOWRITEZTOEXECr�r��getfilesystemencodingr7r<rHrTr[rfrqrx�	Exceptionrr}r~rr�r�r�r�r�rCr��objectr�r�r�r�r�r�rrr"rr�r5r5r5r6�<module>s.

	
					
	
					
	
	
	�?K��������*python3.4/site-packages/pip/_vendor/distlib/_backport/__pycache__/sysconfig.cpython-34.pyc000064400000042531151735047430025532 0ustar00�
�ReNi�@s�dZddlZddlZddlZddlZddlmZmZyddlZWne	k
r|ddl
ZYnXdddddd	d
ddd
dgZdd�Zej
r�ejjeej
��Zneej��Zejdkr2dedEd�j�kr2eejjee��Znejdkr~dedFd�j�kr~eejjeee��Znejdkr�dedGd�j�kr�eejjeee��Zndd�Ze�Zdadd�Zej�Zejd�Zdd�Zejj�dZ ejdd �Z!e de d!Z"ejj#ej$�Z%ejj#ej&�Z'da(dZ)d"d#�Z*d$d%�Z+d&d'�Z,d(d)�Z-d*d+�Z.d,d-�Z/dd.d/�Z0d0d�Z1d1d2�Z2d3d4�Z3dd5d�Z4d6d�Z5d7d
�Z6d8d	�Z7e.�dd9d:d
�Z8e.�dd9d;d�Z9d<d�Z:d=d�Z;d>d�Z<d?d�Z=d@dA�Z>dBdC�Z?e@dDkr�e?�ndS)Hz-Access to Python's configuration information.�N)�pardir�realpath�get_config_h_filename�get_config_var�get_config_vars�get_makefile_filename�get_path�get_path_names�	get_paths�get_platform�get_python_version�get_scheme_names�parse_config_hcCs+yt|�SWntk
r&|SYnXdS)N)r�OSError)�path�r�B/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/_backport/sysconfig.py�_safe_realpath"s
r�ntZpcbuild�z\pc\v�
z\pcbuild\amd64�cCs=x6dD].}tjjtjjtd|��rdSqWdS)N�
Setup.dist�Setup.local�ModulesTF)rr)�osr�isfile�join�
_PROJECT_BASE)�fnrrr�is_python_build:s
$r FcCs�ts�ddlm}tjdd�d}||�}|jd�}|sYtd��|j��}tj	|�WdQXt
r�x7dD],}tj|d
d�tj|dd
�q�WndandS)N�)�finder�.�rz
sysconfig.cfgzsysconfig.cfg exists�posix_prefix�
posix_home�includez{srcdir}/Include�platincludez{projectbase}/.T)zposix_prefixz
posix_home)�	_cfg_read�	resourcesr"�__name__�rsplit�find�AssertionError�	as_stream�_SCHEMES�readfp�
_PYTHON_BUILD�set)r"Zbackport_packageZ_finderZ_cfgfile�s�schemerrr�_ensure_cfg_readDs
r6z\{([^{]*?)\}cs0t�|jd�r(|jd�}n	t�}|j�}xb|D]Z}|dkr\qDnx?|D]7\}}|j||�r�qcn|j|||�qcWqDW|jd�xz|j�D]l}t|j|����fdd�}x<|j|�D]+\}}|j||t	j
||��q�Wq�WdS)N�globalscs0|jd�}|�kr#�|S|jd�S)Nr$r)�group)�matchobj�name)�	variablesrr�	_replacerosz"_expand_globals.<locals>._replacer)r6�has_section�items�tuple�sections�
has_optionr3�remove_section�dict�	_VAR_REPL�sub)�configr7r@�section�option�valuer<r)r;r�_expand_globalsYs$	

rJ�r!cs"�fdd�}tj||�S)z�In the string `path`, replace tokens like {some.thing} with the
    corresponding value from the map `local_vars`.

    If there is no corresponding value, leave the token unchanged.
    csJ|jd�}|�kr#�|S|tjkr=tj|S|jd�S)Nr$r)r8r�environ)r9r:)�
local_varsrrr<�sz_subst_vars.<locals>._replacer)rDrE)rrMr<r)rMr�_subst_vars�srNcCsI|j�}x6|j�D](\}}||kr7qn|||<qWdS)N)�keysr>)�target_dict�
other_dict�target_keys�keyrIrrr�_extend_dict�s
rTcCs�i}|dkri}nt|t��x`tj|�D]O\}}tjdkrktjj|�}ntjjt	||��||<q;W|S)N�posixr)zposixznt)
rTrr0r>rr:r�
expanduser�normpathrN)r5�vars�resrSrIrrr�_expand_vars�s	#rZcs"�fdd�}tj||�S)Ncs0|jd�}|�kr#�|S|jd�S)Nr$r)r8)r9r:)rXrrr<�szformat_value.<locals>._replacer)rDrE)rIrXr<r)rXr�format_value�sr[cCstjdkrdStjS)NrUr%)rr:rrrr�_get_default_scheme�sr\cCs�tjjdd�}dd�}tjdkrbtjjd�pEd}|rR|S||d�Sntjdkr�td	�}|r�|r�|S|dd
|dtjdd��Sq�n|r�|S|dd
�SdS)N�PYTHONUSERBASEcWstjjtjj|��S)N)rrrVr)�argsrrr�joinuser�sz_getuserbase.<locals>.joinuserr�APPDATA�~�Python�darwin�PYTHONFRAMEWORK�Libraryz%d.%dr!z.local)rrL�getr:�sys�platformr�version_info)�env_baser_�base�	frameworkrrr�_getuserbase�s"rmcCstjd�}tjd�}tjd�}|dkrBi}ni}i}tj|dddd��}|j�}WdQXx�|D]�}	|	jd	�s�|	j�d
kr�q�n|j|	�}
|
r�|
jdd�\}}|j�}|j	d
d
�}
d|
kr|||<q^yt
|�}Wn(tk
rP|j	d
d�||<Yq^X|||<q�q�Wt|j
��}d}xNt|�dkr�x5t|�D]'}||}|j|�p�|j|�}
|
dk	r�|
jd�}d}||kr
t||�}n�||krd}n�|tjkr>tj|}nx||kr�|jd�rx|dd�|krxd
}q�d||kr�d}q�t|d|�}nd
||<}|r�||
j�d�}|d|
j��||}d|kr	|||<q�yt
|�}Wn"tk
r=|j�||<YnX|||<|j|�|jd�r�|dd�|kr�|dd�}||kr�|||<q�q�q�q�|||<|j|�q�Wq}Wx<|j�D].\}}t|t�r�|j�||<q�q�W|j|�|S)z�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    z"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}N�encodingzutf-8�errors�surrogateescape�#�r$r!z$$�$�CFLAGS�LDFLAGS�CPPFLAGSrTF�PY_rK)zCFLAGSzLDFLAGSzCPPFLAGS)�re�compile�codecs�open�	readlines�
startswith�strip�matchr8�replace�int�
ValueError�listrO�lenr?�search�strrrL�end�start�remover>�
isinstance�update)�filenamerX�_variable_rx�_findvar1_rx�_findvar2_rx�done�notdone�f�lines�line�m�n�v�tmpvr;�renamed_variablesr:rI�found�item�after�krrr�_parse_makefile�s�		
!


			





r�cCs`trtjjtd�Sttd�r>dttjf}nd}tjjt	d�|d�S)z Return the path of the Makefile.�Makefile�abiflagszconfig-%s%srF�stdlib)
r2rrrr�hasattrrg�_PY_VERSION_SHORTr�r)�config_dir_namerrrrMscCs&t�}yt||�Wn^tk
rz}z>d|}t|d�r\|d|j}nt|��WYdd}~XnXt�}y&t|��}t||�WdQXWn^tk
r
}z>d|}t|d�r�|d|j}nt|��WYdd}~XnXtr"|d|d<ndS)z7Initialize the module as appropriate for POSIX systems.z.invalid Python installation: unable to open %s�strerrorz (%s)N�	BLDSHARED�LDSHARED)	rr��IOErrorr�r�rr{rr2)rX�makefile�e�msg�config_hr�rrr�_init_posixXs&	
	
r�cCsqtd�|d<td�|d<td�|d<d|d<d	|d
<t|d<tjjttj��|d<d
S)z+Initialize the module as appropriate for NTr��LIBDEST�
platstdlib�
BINLIBDESTr'�	INCLUDEPYz.pyd�SOz.exe�EXE�VERSION�BINDIRN)r�_PY_VERSION_SHORT_NO_DOTrr�dirnamerrg�
executable)rXrrr�_init_non_posixts


r�cCs�|dkri}ntjd�}tjd�}x�|j�}|sLPn|j|�}|r�|jdd�\}}yt|�}Wntk
r�YnX|||<q6|j|�}|r6d||jd�<q6q6W|S)z�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
r$r!r)rxry�readlinerr8r�r�)�fprX�	define_rx�undef_rxr�r�r�r�rrrr�s(	

cCsUtr6tjdkr-tjjtd�}qBt}ntd�}tjj|d�S)zReturn the path of pyconfig.h.r�PCr(z
pyconfig.h)r2rr:rrrr)�inc_dirrrrr�s	cCstttj���S)z,Return a tuple containing the schemes names.)r?�sortedr0r@rrrrr
�scCs
tjd�S)z*Return a tuple containing the paths names.r%)r0�optionsrrrrr	�sTcCs1t�|rt||�Sttj|��SdS)z�Return a mapping containing an install scheme.

    ``scheme`` is the install scheme name. If not provided, it will
    return the default scheme for the current platform.
    N)r6rZrCr0r>)r5rX�expandrrrr
�s
cCst|||�|S)z[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    )r
)r:r5rXr�rrrr�scGs�tdkrTiattd<ttd<ttd<ttd<tdtdtd<ttd	<ttd
<ttd<ytjtd<Wntk
r�d
td<YnXt	j
d#kr�tt�nt	j
dkr�tt�ntj
dkr�t�td<ndtkrttd<nttd�td<tr�t	j
dkr�t}yt	j�}Wntk
rgd}YnXt	jjtd�r�||kr�t	jj|td�}t	jj|�td<q�ntjdkrTt	j�d}t|jd�d�}|dkrVxGd$D]D}t|}tjdd|�}tjdd|�}|t|<qWqQdt	jkr�t	jd}xHd%D]=}t|}tjdd|�}|d|}|t|<qyWntjdd
�}	tjd |	�}
|
dk	rQ|
j d!�}t	jj!|�sNx:d&D]/}t|}tjd"d|�}|t|<qWqNqQqTn|r�g}x$|D]}
|j"tj|
��qgW|StSdS)'ayWith no arguments, return a dictionary of all configuration
    variables relevant for the current platform.

    On Unix, this means every variable defined in Python's installed Makefile;
    On Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    N�prefix�exec_prefix�
py_version�py_version_shortrr!�py_version_nodotrk�platbase�projectbaser�rrr�os2rUz2.6�userbase�srcdirrcr#rru�
BASECFLAGSrt�	PY_CFLAGSr�z
-arch\s+\w+\s� z-isysroot [^ 	]*Z	ARCHFLAGSz-isysroot\s+(\S+)r$z-isysroot\s+\S+(\s|$))zntr�)�LDFLAGS�
BASECFLAGS�CFLAGS�	PY_CFLAGS�	BLDSHARED)r�r�r�r�r�)r�r�r�r�r�)#�_CONFIG_VARS�_PREFIX�_EXEC_PREFIX�_PY_VERSIONr�rrgr��AttributeErrorrr:r�r��versionrmrr2�getcwdrr�isabsrrWrh�unamer��splitrxrErLrfr�r8�exists�append)r^rk�cwdr�Zkernel_versionZ
major_versionrS�flags�archrtr�Zsdk�valsr:rrrr�s�



















cCst�j|�S)z�Return the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    )rrf)r:rrrrRscCs�tjdkr�d}tjj|�}|d:kr:tjStjjd|�}tj|t|�|�j�}|dkr�dS|dkr�dStjStjd	ks�ttd
�r�tjStj	�\}}}}}|j�j
dd�}|j
d
d�}|j
dd�}|dd�dkr:d||fS|dd�dkr�|ddkrzd}dt|d�d|dd�f}qzn�|dd�dkr�d||fS|dd�dkr�d|||fS|dd�d kr1d }tj
d!�}	|	j|�}
|
rz|
j�}qznI|dd�d"krzt�}|jd#�}|}
ytd$�}Wntk
r�YneXztjd%|j��}
Wd|j�X|
dk	r�d&j|
jd�jd&�dd��}
n|s�|
}n|rz|}d'}|
d&d(kr d)t�jd*d�j�kr d+}t�jd*�}tjd,|�}ttt|���}t|�dkr�|d}qt|d;kr�d+}qt|d<kr�d0}qt|d=kr�d1}qt|d>kr�d3}qt|d?kr
d4}qttd5|f��qw|d-krGtjd@krtd/}qtqw|dAkrwtjdBkrkd2}qtd.}qwqznd9|||fS)Ca�Return a string that identifies the current platform.

    This is used mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    rz bit (r$�)�amd64z	win-amd64�itaniumzwin-ia64rUr��/rrr��_�-N��linuxz%s-%s�sunosr�5�solarisz%d.%srKr!��irix�aixz%s-%s.%s��cygwinz[\d.]+rc�MACOSX_DEPLOYMENT_TARGETz0/System/Library/CoreServices/SystemVersion.plistz=<key>ProductUserVisibleVersion</key>\s*<string>(.*?)</string>r#�macosxz10.4.z-archrtZfatz
-arch\s+(\S+)�i386�ppc�x86_64ZintelZfat3�ppc64Zfat64�	universalz%Don't know machine value for archs=%r� �PowerPC�Power_Macintoshz%s-%s-%s���)r��ppc)r�r�)r�rr�)r�r�)r�rr�r�l)zPowerPCzPower_Macintoshl) rr:rgr�r-rhr��lowerr�r�r�r�rxryrr8rrfr{r�r��read�closerr�r~�findallr?r�r3r��maxsize)r��i�j�look�osname�host�releaser��machine�rel_rer�ZcfgvarsZmacverZ
macreleaser��cflagsZarchsrrrr[s�#.	
	.	!
						cCstS)N)r�rrrrr�scCsdx]tt|j���D]C\}\}}|dkrHtd|�ntd||f�qWdS)Nrz%s: z
	%s = "%s")�	enumerater�r>�print)�title�data�indexrSrIrrr�_print_dicts+rcCsetdt��tdt��tdt��t�tdt��t�tdt��dS)z*Display all information sysconfig detains.zPlatform: "%s"zPython version: "%s"z!Current installation scheme: "%s"�Paths�	VariablesN)rrrr\rr
rrrrr�_mainsr�__main__i����i����i�)A�__doc__rzrrxrg�os.pathrr�configparser�ImportError�ConfigParser�__all__rr�rr�rr�r:rrr r2r)r6�RawConfigParserr0ryrDrJr�r�r�r�r�rWr�r�r�r�r��
_USER_BASErNrTrZr[r\rmr�rr�r�rrr
r	r
rrrrrrrr+rrrr�<module>s�
		++!+!	#
	v
�	�python3.4/site-packages/pip/_vendor/distlib/_backport/__pycache__/misc.cpython-34.pyc000064400000002117151735047430024455 0ustar00�
�Re��@s�dZddlZddlZdddgZyddlmZWn!ek
rdedd�ZYnXy
eZWn.e	k
r�ddl
mZd	d�ZYnXy
ejZWne
k
r�d
d�ZYnXdS)z/Backports for individual classes and functions.�N�cache_from_source�callable�fsencode)rcCs|rdpd}||S)N�c�o�)Zpy_file�debug�extrr�=/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/_backport/misc.pyrs)�CallablecCs
t|t�S)N)�
isinstancer)�objrrr
rscCsRt|t�r|St|t�r5|jtj��Stdt|�j��dS)Nzexpect bytes or str, not %s)	r�bytes�str�encode�sys�getfilesystemencoding�	TypeError�type�__name__)�filenamerrr
r"s)�__doc__�osr�__all__�impr�ImportError�	__debug__r�	NameError�collectionsrr�AttributeErrorrrrr
�<module>s 




python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py000064400000264723151735047430020703 0ustar00#-------------------------------------------------------------------
# tarfile.py
#-------------------------------------------------------------------
# Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de>
# All rights reserved.
#
# Permission  is  hereby granted,  free  of charge,  to  any person
# obtaining a  copy of  this software  and associated documentation
# files  (the  "Software"),  to   deal  in  the  Software   without
# restriction,  including  without limitation  the  rights to  use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies  of  the  Software,  and to  permit  persons  to  whom the
# Software  is  furnished  to  do  so,  subject  to  the  following
# conditions:
#
# The above copyright  notice and this  permission notice shall  be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS  IS", WITHOUT WARRANTY OF ANY  KIND,
# EXPRESS OR IMPLIED, INCLUDING  BUT NOT LIMITED TO  THE WARRANTIES
# OF  MERCHANTABILITY,  FITNESS   FOR  A  PARTICULAR   PURPOSE  AND
# NONINFRINGEMENT.  IN  NO  EVENT SHALL  THE  AUTHORS  OR COPYRIGHT
# HOLDERS  BE LIABLE  FOR ANY  CLAIM, DAMAGES  OR OTHER  LIABILITY,
# WHETHER  IN AN  ACTION OF  CONTRACT, TORT  OR OTHERWISE,  ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
from __future__ import print_function

"""Read from and write to tar format archives.
"""

__version__ = "$Revision$"

version     = "0.9.0"
__author__  = "Lars Gust\u00e4bel (lars@gustaebel.de)"
__date__    = "$Date: 2011-02-25 17:42:01 +0200 (Fri, 25 Feb 2011) $"
__cvsid__   = "$Id: tarfile.py 88586 2011-02-25 15:42:01Z marc-andre.lemburg $"
__credits__ = "Gustavo Niemeyer, Niels Gust\u00e4bel, Richard Townsend."

#---------
# Imports
#---------
import sys
import os
import stat
import errno
import time
import struct
import copy
import re

try:
    import grp, pwd
except ImportError:
    grp = pwd = None

# os.symlink on Windows prior to 6.0 raises NotImplementedError
symlink_exception = (AttributeError, NotImplementedError)
try:
    # WindowsError (1314) will be raised if the caller does not hold the
    # SeCreateSymbolicLinkPrivilege privilege
    symlink_exception += (WindowsError,)
except NameError:
    pass

# from tarfile import *
__all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError"]

if sys.version_info[0] < 3:
    import __builtin__ as builtins
else:
    import builtins

_open = builtins.open   # Since 'open' is TarFile.open

#---------------------------------------------------------
# tar constants
#---------------------------------------------------------
NUL = b"\0"                     # the null character
BLOCKSIZE = 512                 # length of processing blocks
RECORDSIZE = BLOCKSIZE * 20     # length of records
GNU_MAGIC = b"ustar  \0"        # magic gnu tar string
POSIX_MAGIC = b"ustar\x0000"    # magic posix tar string

LENGTH_NAME = 100               # maximum length of a filename
LENGTH_LINK = 100               # maximum length of a linkname
LENGTH_PREFIX = 155             # maximum length of the prefix field

REGTYPE = b"0"                  # regular file
AREGTYPE = b"\0"                # regular file
LNKTYPE = b"1"                  # link (inside tarfile)
SYMTYPE = b"2"                  # symbolic link
CHRTYPE = b"3"                  # character special device
BLKTYPE = b"4"                  # block special device
DIRTYPE = b"5"                  # directory
FIFOTYPE = b"6"                 # fifo special device
CONTTYPE = b"7"                 # contiguous file

GNUTYPE_LONGNAME = b"L"         # GNU tar longname
GNUTYPE_LONGLINK = b"K"         # GNU tar longlink
GNUTYPE_SPARSE = b"S"           # GNU tar sparse file

XHDTYPE = b"x"                  # POSIX.1-2001 extended header
XGLTYPE = b"g"                  # POSIX.1-2001 global header
SOLARIS_XHDTYPE = b"X"          # Solaris extended header

USTAR_FORMAT = 0                # POSIX.1-1988 (ustar) format
GNU_FORMAT = 1                  # GNU tar format
PAX_FORMAT = 2                  # POSIX.1-2001 (pax) format
DEFAULT_FORMAT = GNU_FORMAT

#---------------------------------------------------------
# tarfile constants
#---------------------------------------------------------
# File types that tarfile supports:
SUPPORTED_TYPES = (REGTYPE, AREGTYPE, LNKTYPE,
                   SYMTYPE, DIRTYPE, FIFOTYPE,
                   CONTTYPE, CHRTYPE, BLKTYPE,
                   GNUTYPE_LONGNAME, GNUTYPE_LONGLINK,
                   GNUTYPE_SPARSE)

# File types that will be treated as a regular file.
REGULAR_TYPES = (REGTYPE, AREGTYPE,
                 CONTTYPE, GNUTYPE_SPARSE)

# File types that are part of the GNU tar format.
GNU_TYPES = (GNUTYPE_LONGNAME, GNUTYPE_LONGLINK,
             GNUTYPE_SPARSE)

# Fields from a pax header that override a TarInfo attribute.
PAX_FIELDS = ("path", "linkpath", "size", "mtime",
              "uid", "gid", "uname", "gname")

# Fields from a pax header that are affected by hdrcharset.
PAX_NAME_FIELDS = set(("path", "linkpath", "uname", "gname"))

# Fields in a pax header that are numbers, all other fields
# are treated as strings.
PAX_NUMBER_FIELDS = {
    "atime": float,
    "ctime": float,
    "mtime": float,
    "uid": int,
    "gid": int,
    "size": int
}

#---------------------------------------------------------
# Bits used in the mode field, values in octal.
#---------------------------------------------------------
S_IFLNK = 0o120000        # symbolic link
S_IFREG = 0o100000        # regular file
S_IFBLK = 0o060000        # block device
S_IFDIR = 0o040000        # directory
S_IFCHR = 0o020000        # character device
S_IFIFO = 0o010000        # fifo

TSUID   = 0o4000          # set UID on execution
TSGID   = 0o2000          # set GID on execution
TSVTX   = 0o1000          # reserved

TUREAD  = 0o400           # read by owner
TUWRITE = 0o200           # write by owner
TUEXEC  = 0o100           # execute/search by owner
TGREAD  = 0o040           # read by group
TGWRITE = 0o020           # write by group
TGEXEC  = 0o010           # execute/search by group
TOREAD  = 0o004           # read by other
TOWRITE = 0o002           # write by other
TOEXEC  = 0o001           # execute/search by other

#---------------------------------------------------------
# initialization
#---------------------------------------------------------
if os.name in ("nt", "ce"):
    ENCODING = "utf-8"
else:
    ENCODING = sys.getfilesystemencoding()

#---------------------------------------------------------
# Some useful functions
#---------------------------------------------------------

def stn(s, length, encoding, errors):
    """Convert a string to a null-terminated bytes object.
    """
    s = s.encode(encoding, errors)
    return s[:length] + (length - len(s)) * NUL

def nts(s, encoding, errors):
    """Convert a null-terminated bytes object to a string.
    """
    p = s.find(b"\0")
    if p != -1:
        s = s[:p]
    return s.decode(encoding, errors)

def nti(s):
    """Convert a number field to a python number.
    """
    # There are two possible encodings for a number field, see
    # itn() below.
    if s[0] != chr(0o200):
        try:
            n = int(nts(s, "ascii", "strict") or "0", 8)
        except ValueError:
            raise InvalidHeaderError("invalid header")
    else:
        n = 0
        for i in range(len(s) - 1):
            n <<= 8
            n += ord(s[i + 1])
    return n

def itn(n, digits=8, format=DEFAULT_FORMAT):
    """Convert a python number to a number field.
    """
    # POSIX 1003.1-1988 requires numbers to be encoded as a string of
    # octal digits followed by a null-byte, this allows values up to
    # (8**(digits-1))-1. GNU tar allows storing numbers greater than
    # that if necessary. A leading 0o200 byte indicates this particular
    # encoding, the following digits-1 bytes are a big-endian
    # representation. This allows values up to (256**(digits-1))-1.
    if 0 <= n < 8 ** (digits - 1):
        s = ("%0*o" % (digits - 1, n)).encode("ascii") + NUL
    else:
        if format != GNU_FORMAT or n >= 256 ** (digits - 1):
            raise ValueError("overflow in number field")

        if n < 0:
            # XXX We mimic GNU tar's behaviour with negative numbers,
            # this could raise OverflowError.
            n = struct.unpack("L", struct.pack("l", n))[0]

        s = bytearray()
        for i in range(digits - 1):
            s.insert(0, n & 0o377)
            n >>= 8
        s.insert(0, 0o200)
    return s

def calc_chksums(buf):
    """Calculate the checksum for a member's header by summing up all
       characters except for the chksum field which is treated as if
       it was filled with spaces. According to the GNU tar sources,
       some tars (Sun and NeXT) calculate chksum with signed char,
       which will be different if there are chars in the buffer with
       the high bit set. So we calculate two checksums, unsigned and
       signed.
    """
    unsigned_chksum = 256 + sum(struct.unpack("148B", buf[:148]) + struct.unpack("356B", buf[156:512]))
    signed_chksum = 256 + sum(struct.unpack("148b", buf[:148]) + struct.unpack("356b", buf[156:512]))
    return unsigned_chksum, signed_chksum

def copyfileobj(src, dst, length=None):
    """Copy length bytes from fileobj src to fileobj dst.
       If length is None, copy the entire content.
    """
    if length == 0:
        return
    if length is None:
        while True:
            buf = src.read(16*1024)
            if not buf:
                break
            dst.write(buf)
        return

    BUFSIZE = 16 * 1024
    blocks, remainder = divmod(length, BUFSIZE)
    for b in range(blocks):
        buf = src.read(BUFSIZE)
        if len(buf) < BUFSIZE:
            raise IOError("end of file reached")
        dst.write(buf)

    if remainder != 0:
        buf = src.read(remainder)
        if len(buf) < remainder:
            raise IOError("end of file reached")
        dst.write(buf)
    return

filemode_table = (
    ((S_IFLNK,      "l"),
     (S_IFREG,      "-"),
     (S_IFBLK,      "b"),
     (S_IFDIR,      "d"),
     (S_IFCHR,      "c"),
     (S_IFIFO,      "p")),

    ((TUREAD,       "r"),),
    ((TUWRITE,      "w"),),
    ((TUEXEC|TSUID, "s"),
     (TSUID,        "S"),
     (TUEXEC,       "x")),

    ((TGREAD,       "r"),),
    ((TGWRITE,      "w"),),
    ((TGEXEC|TSGID, "s"),
     (TSGID,        "S"),
     (TGEXEC,       "x")),

    ((TOREAD,       "r"),),
    ((TOWRITE,      "w"),),
    ((TOEXEC|TSVTX, "t"),
     (TSVTX,        "T"),
     (TOEXEC,       "x"))
)

def filemode(mode):
    """Convert a file's mode to a string of the form
       -rwxrwxrwx.
       Used by TarFile.list()
    """
    perm = []
    for table in filemode_table:
        for bit, char in table:
            if mode & bit == bit:
                perm.append(char)
                break
        else:
            perm.append("-")
    return "".join(perm)

class TarError(Exception):
    """Base exception."""
    pass
class ExtractError(TarError):
    """General exception for extract errors."""
    pass
class ReadError(TarError):
    """Exception for unreadble tar archives."""
    pass
class CompressionError(TarError):
    """Exception for unavailable compression methods."""
    pass
class StreamError(TarError):
    """Exception for unsupported operations on stream-like TarFiles."""
    pass
class HeaderError(TarError):
    """Base exception for header errors."""
    pass
class EmptyHeaderError(HeaderError):
    """Exception for empty headers."""
    pass
class TruncatedHeaderError(HeaderError):
    """Exception for truncated headers."""
    pass
class EOFHeaderError(HeaderError):
    """Exception for end of file headers."""
    pass
class InvalidHeaderError(HeaderError):
    """Exception for invalid headers."""
    pass
class SubsequentHeaderError(HeaderError):
    """Exception for missing and invalid extended headers."""
    pass

#---------------------------
# internal stream interface
#---------------------------
class _LowLevelFile(object):
    """Low-level file object. Supports reading and writing.
       It is used instead of a regular file object for streaming
       access.
    """

    def __init__(self, name, mode):
        mode = {
            "r": os.O_RDONLY,
            "w": os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
        }[mode]
        if hasattr(os, "O_BINARY"):
            mode |= os.O_BINARY
        self.fd = os.open(name, mode, 0o666)

    def close(self):
        os.close(self.fd)

    def read(self, size):
        return os.read(self.fd, size)

    def write(self, s):
        os.write(self.fd, s)

class _Stream(object):
    """Class that serves as an adapter between TarFile and
       a stream-like object.  The stream-like object only
       needs to have a read() or write() method and is accessed
       blockwise.  Use of gzip or bzip2 compression is possible.
       A stream-like object could be for example: sys.stdin,
       sys.stdout, a socket, a tape device etc.

       _Stream is intended to be used only internally.
    """

    def __init__(self, name, mode, comptype, fileobj, bufsize):
        """Construct a _Stream object.
        """
        self._extfileobj = True
        if fileobj is None:
            fileobj = _LowLevelFile(name, mode)
            self._extfileobj = False

        if comptype == '*':
            # Enable transparent compression detection for the
            # stream interface
            fileobj = _StreamProxy(fileobj)
            comptype = fileobj.getcomptype()

        self.name     = name or ""
        self.mode     = mode
        self.comptype = comptype
        self.fileobj  = fileobj
        self.bufsize  = bufsize
        self.buf      = b""
        self.pos      = 0
        self.closed   = False

        try:
            if comptype == "gz":
                try:
                    import zlib
                except ImportError:
                    raise CompressionError("zlib module is not available")
                self.zlib = zlib
                self.crc = zlib.crc32(b"")
                if mode == "r":
                    self._init_read_gz()
                else:
                    self._init_write_gz()

            if comptype == "bz2":
                try:
                    import bz2
                except ImportError:
                    raise CompressionError("bz2 module is not available")
                if mode == "r":
                    self.dbuf = b""
                    self.cmp = bz2.BZ2Decompressor()
                else:
                    self.cmp = bz2.BZ2Compressor()
        except:
            if not self._extfileobj:
                self.fileobj.close()
            self.closed = True
            raise

    def __del__(self):
        if hasattr(self, "closed") and not self.closed:
            self.close()

    def _init_write_gz(self):
        """Initialize for writing with gzip compression.
        """
        self.cmp = self.zlib.compressobj(9, self.zlib.DEFLATED,
                                            -self.zlib.MAX_WBITS,
                                            self.zlib.DEF_MEM_LEVEL,
                                            0)
        timestamp = struct.pack("<L", int(time.time()))
        self.__write(b"\037\213\010\010" + timestamp + b"\002\377")
        if self.name.endswith(".gz"):
            self.name = self.name[:-3]
        # RFC1952 says we must use ISO-8859-1 for the FNAME field.
        self.__write(self.name.encode("iso-8859-1", "replace") + NUL)

    def write(self, s):
        """Write string s to the stream.
        """
        if self.comptype == "gz":
            self.crc = self.zlib.crc32(s, self.crc)
        self.pos += len(s)
        if self.comptype != "tar":
            s = self.cmp.compress(s)
        self.__write(s)

    def __write(self, s):
        """Write string s to the stream if a whole new block
           is ready to be written.
        """
        self.buf += s
        while len(self.buf) > self.bufsize:
            self.fileobj.write(self.buf[:self.bufsize])
            self.buf = self.buf[self.bufsize:]

    def close(self):
        """Close the _Stream object. No operation should be
           done on it afterwards.
        """
        if self.closed:
            return

        if self.mode == "w" and self.comptype != "tar":
            self.buf += self.cmp.flush()

        if self.mode == "w" and self.buf:
            self.fileobj.write(self.buf)
            self.buf = b""
            if self.comptype == "gz":
                # The native zlib crc is an unsigned 32-bit integer, but
                # the Python wrapper implicitly casts that to a signed C
                # long.  So, on a 32-bit box self.crc may "look negative",
                # while the same crc on a 64-bit box may "look positive".
                # To avoid irksome warnings from the `struct` module, force
                # it to look positive on all boxes.
                self.fileobj.write(struct.pack("<L", self.crc & 0xffffffff))
                self.fileobj.write(struct.pack("<L", self.pos & 0xffffFFFF))

        if not self._extfileobj:
            self.fileobj.close()

        self.closed = True

    def _init_read_gz(self):
        """Initialize for reading a gzip compressed fileobj.
        """
        self.cmp = self.zlib.decompressobj(-self.zlib.MAX_WBITS)
        self.dbuf = b""

        # taken from gzip.GzipFile with some alterations
        if self.__read(2) != b"\037\213":
            raise ReadError("not a gzip file")
        if self.__read(1) != b"\010":
            raise CompressionError("unsupported compression method")

        flag = ord(self.__read(1))
        self.__read(6)

        if flag & 4:
            xlen = ord(self.__read(1)) + 256 * ord(self.__read(1))
            self.read(xlen)
        if flag & 8:
            while True:
                s = self.__read(1)
                if not s or s == NUL:
                    break
        if flag & 16:
            while True:
                s = self.__read(1)
                if not s or s == NUL:
                    break
        if flag & 2:
            self.__read(2)

    def tell(self):
        """Return the stream's file pointer position.
        """
        return self.pos

    def seek(self, pos=0):
        """Set the stream's file pointer to pos. Negative seeking
           is forbidden.
        """
        if pos - self.pos >= 0:
            blocks, remainder = divmod(pos - self.pos, self.bufsize)
            for i in range(blocks):
                self.read(self.bufsize)
            self.read(remainder)
        else:
            raise StreamError("seeking backwards is not allowed")
        return self.pos

    def read(self, size=None):
        """Return the next size number of bytes from the stream.
           If size is not defined, return all bytes of the stream
           up to EOF.
        """
        if size is None:
            t = []
            while True:
                buf = self._read(self.bufsize)
                if not buf:
                    break
                t.append(buf)
            buf = "".join(t)
        else:
            buf = self._read(size)
        self.pos += len(buf)
        return buf

    def _read(self, size):
        """Return size bytes from the stream.
        """
        if self.comptype == "tar":
            return self.__read(size)

        c = len(self.dbuf)
        while c < size:
            buf = self.__read(self.bufsize)
            if not buf:
                break
            try:
                buf = self.cmp.decompress(buf)
            except IOError:
                raise ReadError("invalid compressed data")
            self.dbuf += buf
            c += len(buf)
        buf = self.dbuf[:size]
        self.dbuf = self.dbuf[size:]
        return buf

    def __read(self, size):
        """Return size bytes from stream. If internal buffer is empty,
           read another block from the stream.
        """
        c = len(self.buf)
        while c < size:
            buf = self.fileobj.read(self.bufsize)
            if not buf:
                break
            self.buf += buf
            c += len(buf)
        buf = self.buf[:size]
        self.buf = self.buf[size:]
        return buf
# class _Stream

class _StreamProxy(object):
    """Small proxy class that enables transparent compression
       detection for the Stream interface (mode 'r|*').
    """

    def __init__(self, fileobj):
        self.fileobj = fileobj
        self.buf = self.fileobj.read(BLOCKSIZE)

    def read(self, size):
        self.read = self.fileobj.read
        return self.buf

    def getcomptype(self):
        if self.buf.startswith(b"\037\213\010"):
            return "gz"
        if self.buf.startswith(b"BZh91"):
            return "bz2"
        return "tar"

    def close(self):
        self.fileobj.close()
# class StreamProxy

class _BZ2Proxy(object):
    """Small proxy class that enables external file object
       support for "r:bz2" and "w:bz2" modes. This is actually
       a workaround for a limitation in bz2 module's BZ2File
       class which (unlike gzip.GzipFile) has no support for
       a file object argument.
    """

    blocksize = 16 * 1024

    def __init__(self, fileobj, mode):
        self.fileobj = fileobj
        self.mode = mode
        self.name = getattr(self.fileobj, "name", None)
        self.init()

    def init(self):
        import bz2
        self.pos = 0
        if self.mode == "r":
            self.bz2obj = bz2.BZ2Decompressor()
            self.fileobj.seek(0)
            self.buf = b""
        else:
            self.bz2obj = bz2.BZ2Compressor()

    def read(self, size):
        x = len(self.buf)
        while x < size:
            raw = self.fileobj.read(self.blocksize)
            if not raw:
                break
            data = self.bz2obj.decompress(raw)
            self.buf += data
            x += len(data)

        buf = self.buf[:size]
        self.buf = self.buf[size:]
        self.pos += len(buf)
        return buf

    def seek(self, pos):
        if pos < self.pos:
            self.init()
        self.read(pos - self.pos)

    def tell(self):
        return self.pos

    def write(self, data):
        self.pos += len(data)
        raw = self.bz2obj.compress(data)
        self.fileobj.write(raw)

    def close(self):
        if self.mode == "w":
            raw = self.bz2obj.flush()
            self.fileobj.write(raw)
# class _BZ2Proxy

#------------------------
# Extraction file object
#------------------------
class _FileInFile(object):
    """A thin wrapper around an existing file object that
       provides a part of its data as an individual file
       object.
    """

    def __init__(self, fileobj, offset, size, blockinfo=None):
        self.fileobj = fileobj
        self.offset = offset
        self.size = size
        self.position = 0

        if blockinfo is None:
            blockinfo = [(0, size)]

        # Construct a map with data and zero blocks.
        self.map_index = 0
        self.map = []
        lastpos = 0
        realpos = self.offset
        for offset, size in blockinfo:
            if offset > lastpos:
                self.map.append((False, lastpos, offset, None))
            self.map.append((True, offset, offset + size, realpos))
            realpos += size
            lastpos = offset + size
        if lastpos < self.size:
            self.map.append((False, lastpos, self.size, None))

    def seekable(self):
        if not hasattr(self.fileobj, "seekable"):
            # XXX gzip.GzipFile and bz2.BZ2File
            return True
        return self.fileobj.seekable()

    def tell(self):
        """Return the current file position.
        """
        return self.position

    def seek(self, position):
        """Seek to a position in the file.
        """
        self.position = position

    def read(self, size=None):
        """Read data from the file.
        """
        if size is None:
            size = self.size - self.position
        else:
            size = min(size, self.size - self.position)

        buf = b""
        while size > 0:
            while True:
                data, start, stop, offset = self.map[self.map_index]
                if start <= self.position < stop:
                    break
                else:
                    self.map_index += 1
                    if self.map_index == len(self.map):
                        self.map_index = 0
            length = min(size, stop - self.position)
            if data:
                self.fileobj.seek(offset + (self.position - start))
                buf += self.fileobj.read(length)
            else:
                buf += NUL * length
            size -= length
            self.position += length
        return buf
#class _FileInFile


class ExFileObject(object):
    """File-like object for reading an archive member.
       Is returned by TarFile.extractfile().
    """
    blocksize = 1024

    def __init__(self, tarfile, tarinfo):
        self.fileobj = _FileInFile(tarfile.fileobj,
                                   tarinfo.offset_data,
                                   tarinfo.size,
                                   tarinfo.sparse)
        self.name = tarinfo.name
        self.mode = "r"
        self.closed = False
        self.size = tarinfo.size

        self.position = 0
        self.buffer = b""

    def readable(self):
        return True

    def writable(self):
        return False

    def seekable(self):
        return self.fileobj.seekable()

    def read(self, size=None):
        """Read at most size bytes from the file. If size is not
           present or None, read all data until EOF is reached.
        """
        if self.closed:
            raise ValueError("I/O operation on closed file")

        buf = b""
        if self.buffer:
            if size is None:
                buf = self.buffer
                self.buffer = b""
            else:
                buf = self.buffer[:size]
                self.buffer = self.buffer[size:]

        if size is None:
            buf += self.fileobj.read()
        else:
            buf += self.fileobj.read(size - len(buf))

        self.position += len(buf)
        return buf

    # XXX TextIOWrapper uses the read1() method.
    read1 = read

    def readline(self, size=-1):
        """Read one entire line from the file. If size is present
           and non-negative, return a string with at most that
           size, which may be an incomplete line.
        """
        if self.closed:
            raise ValueError("I/O operation on closed file")

        pos = self.buffer.find(b"\n") + 1
        if pos == 0:
            # no newline found.
            while True:
                buf = self.fileobj.read(self.blocksize)
                self.buffer += buf
                if not buf or b"\n" in buf:
                    pos = self.buffer.find(b"\n") + 1
                    if pos == 0:
                        # no newline found.
                        pos = len(self.buffer)
                    break

        if size != -1:
            pos = min(size, pos)

        buf = self.buffer[:pos]
        self.buffer = self.buffer[pos:]
        self.position += len(buf)
        return buf

    def readlines(self):
        """Return a list with all remaining lines.
        """
        result = []
        while True:
            line = self.readline()
            if not line: break
            result.append(line)
        return result

    def tell(self):
        """Return the current file position.
        """
        if self.closed:
            raise ValueError("I/O operation on closed file")

        return self.position

    def seek(self, pos, whence=os.SEEK_SET):
        """Seek to a position in the file.
        """
        if self.closed:
            raise ValueError("I/O operation on closed file")

        if whence == os.SEEK_SET:
            self.position = min(max(pos, 0), self.size)
        elif whence == os.SEEK_CUR:
            if pos < 0:
                self.position = max(self.position + pos, 0)
            else:
                self.position = min(self.position + pos, self.size)
        elif whence == os.SEEK_END:
            self.position = max(min(self.size + pos, self.size), 0)
        else:
            raise ValueError("Invalid argument")

        self.buffer = b""
        self.fileobj.seek(self.position)

    def close(self):
        """Close the file object.
        """
        self.closed = True

    def __iter__(self):
        """Get an iterator over the file's lines.
        """
        while True:
            line = self.readline()
            if not line:
                break
            yield line
#class ExFileObject

#------------------
# Exported Classes
#------------------
class TarInfo(object):
    """Informational class which holds the details about an
       archive member given by a tar header block.
       TarInfo objects are returned by TarFile.getmember(),
       TarFile.getmembers() and TarFile.gettarinfo() and are
       usually created internally.
    """

    __slots__ = ("name", "mode", "uid", "gid", "size", "mtime",
                 "chksum", "type", "linkname", "uname", "gname",
                 "devmajor", "devminor",
                 "offset", "offset_data", "pax_headers", "sparse",
                 "tarfile", "_sparse_structs", "_link_target")

    def __init__(self, name=""):
        """Construct a TarInfo object. name is the optional name
           of the member.
        """
        self.name = name        # member name
        self.mode = 0o644       # file permissions
        self.uid = 0            # user id
        self.gid = 0            # group id
        self.size = 0           # file size
        self.mtime = 0          # modification time
        self.chksum = 0         # header checksum
        self.type = REGTYPE     # member type
        self.linkname = ""      # link name
        self.uname = ""         # user name
        self.gname = ""         # group name
        self.devmajor = 0       # device major number
        self.devminor = 0       # device minor number

        self.offset = 0         # the tar header starts here
        self.offset_data = 0    # the file's data starts here

        self.sparse = None      # sparse member information
        self.pax_headers = {}   # pax header information

    # In pax headers the "name" and "linkname" field are called
    # "path" and "linkpath".
    def _getpath(self):
        return self.name
    def _setpath(self, name):
        self.name = name
    path = property(_getpath, _setpath)

    def _getlinkpath(self):
        return self.linkname
    def _setlinkpath(self, linkname):
        self.linkname = linkname
    linkpath = property(_getlinkpath, _setlinkpath)

    def __repr__(self):
        return "<%s %r at %#x>" % (self.__class__.__name__,self.name,id(self))

    def get_info(self):
        """Return the TarInfo's attributes as a dictionary.
        """
        info = {
            "name":     self.name,
            "mode":     self.mode & 0o7777,
            "uid":      self.uid,
            "gid":      self.gid,
            "size":     self.size,
            "mtime":    self.mtime,
            "chksum":   self.chksum,
            "type":     self.type,
            "linkname": self.linkname,
            "uname":    self.uname,
            "gname":    self.gname,
            "devmajor": self.devmajor,
            "devminor": self.devminor
        }

        if info["type"] == DIRTYPE and not info["name"].endswith("/"):
            info["name"] += "/"

        return info

    def tobuf(self, format=DEFAULT_FORMAT, encoding=ENCODING, errors="surrogateescape"):
        """Return a tar header as a string of 512 byte blocks.
        """
        info = self.get_info()

        if format == USTAR_FORMAT:
            return self.create_ustar_header(info, encoding, errors)
        elif format == GNU_FORMAT:
            return self.create_gnu_header(info, encoding, errors)
        elif format == PAX_FORMAT:
            return self.create_pax_header(info, encoding)
        else:
            raise ValueError("invalid format")

    def create_ustar_header(self, info, encoding, errors):
        """Return the object as a ustar header block.
        """
        info["magic"] = POSIX_MAGIC

        if len(info["linkname"]) > LENGTH_LINK:
            raise ValueError("linkname is too long")

        if len(info["name"]) > LENGTH_NAME:
            info["prefix"], info["name"] = self._posix_split_name(info["name"])

        return self._create_header(info, USTAR_FORMAT, encoding, errors)

    def create_gnu_header(self, info, encoding, errors):
        """Return the object as a GNU header block sequence.
        """
        info["magic"] = GNU_MAGIC

        buf = b""
        if len(info["linkname"]) > LENGTH_LINK:
            buf += self._create_gnu_long_header(info["linkname"], GNUTYPE_LONGLINK, encoding, errors)

        if len(info["name"]) > LENGTH_NAME:
            buf += self._create_gnu_long_header(info["name"], GNUTYPE_LONGNAME, encoding, errors)

        return buf + self._create_header(info, GNU_FORMAT, encoding, errors)

    def create_pax_header(self, info, encoding):
        """Return the object as a ustar header block. If it cannot be
           represented this way, prepend a pax extended header sequence
           with supplement information.
        """
        info["magic"] = POSIX_MAGIC
        pax_headers = self.pax_headers.copy()

        # Test string fields for values that exceed the field length or cannot
        # be represented in ASCII encoding.
        for name, hname, length in (
                ("name", "path", LENGTH_NAME), ("linkname", "linkpath", LENGTH_LINK),
                ("uname", "uname", 32), ("gname", "gname", 32)):

            if hname in pax_headers:
                # The pax header has priority.
                continue

            # Try to encode the string as ASCII.
            try:
                info[name].encode("ascii", "strict")
            except UnicodeEncodeError:
                pax_headers[hname] = info[name]
                continue

            if len(info[name]) > length:
                pax_headers[hname] = info[name]

        # Test number fields for values that exceed the field limit or values
        # that like to be stored as float.
        for name, digits in (("uid", 8), ("gid", 8), ("size", 12), ("mtime", 12)):
            if name in pax_headers:
                # The pax header has priority. Avoid overflow.
                info[name] = 0
                continue

            val = info[name]
            if not 0 <= val < 8 ** (digits - 1) or isinstance(val, float):
                pax_headers[name] = str(val)
                info[name] = 0

        # Create a pax extended header if necessary.
        if pax_headers:
            buf = self._create_pax_generic_header(pax_headers, XHDTYPE, encoding)
        else:
            buf = b""

        return buf + self._create_header(info, USTAR_FORMAT, "ascii", "replace")

    @classmethod
    def create_pax_global_header(cls, pax_headers):
        """Return the object as a pax global header block sequence.
        """
        return cls._create_pax_generic_header(pax_headers, XGLTYPE, "utf8")

    def _posix_split_name(self, name):
        """Split a name longer than 100 chars into a prefix
           and a name part.
        """
        prefix = name[:LENGTH_PREFIX + 1]
        while prefix and prefix[-1] != "/":
            prefix = prefix[:-1]

        name = name[len(prefix):]
        prefix = prefix[:-1]

        if not prefix or len(name) > LENGTH_NAME:
            raise ValueError("name is too long")
        return prefix, name

    @staticmethod
    def _create_header(info, format, encoding, errors):
        """Return a header block. info is a dictionary with file
           information, format must be one of the *_FORMAT constants.
        """
        parts = [
            stn(info.get("name", ""), 100, encoding, errors),
            itn(info.get("mode", 0) & 0o7777, 8, format),
            itn(info.get("uid", 0), 8, format),
            itn(info.get("gid", 0), 8, format),
            itn(info.get("size", 0), 12, format),
            itn(info.get("mtime", 0), 12, format),
            b"        ", # checksum field
            info.get("type", REGTYPE),
            stn(info.get("linkname", ""), 100, encoding, errors),
            info.get("magic", POSIX_MAGIC),
            stn(info.get("uname", ""), 32, encoding, errors),
            stn(info.get("gname", ""), 32, encoding, errors),
            itn(info.get("devmajor", 0), 8, format),
            itn(info.get("devminor", 0), 8, format),
            stn(info.get("prefix", ""), 155, encoding, errors)
        ]

        buf = struct.pack("%ds" % BLOCKSIZE, b"".join(parts))
        chksum = calc_chksums(buf[-BLOCKSIZE:])[0]
        buf = buf[:-364] + ("%06o\0" % chksum).encode("ascii") + buf[-357:]
        return buf

    @staticmethod
    def _create_payload(payload):
        """Return the string payload filled with zero bytes
           up to the next 512 byte border.
        """
        blocks, remainder = divmod(len(payload), BLOCKSIZE)
        if remainder > 0:
            payload += (BLOCKSIZE - remainder) * NUL
        return payload

    @classmethod
    def _create_gnu_long_header(cls, name, type, encoding, errors):
        """Return a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
           for name.
        """
        name = name.encode(encoding, errors) + NUL

        info = {}
        info["name"] = "././@LongLink"
        info["type"] = type
        info["size"] = len(name)
        info["magic"] = GNU_MAGIC

        # create extended header + name blocks.
        return cls._create_header(info, USTAR_FORMAT, encoding, errors) + \
                cls._create_payload(name)

    @classmethod
    def _create_pax_generic_header(cls, pax_headers, type, encoding):
        """Return a POSIX.1-2008 extended or global header sequence
           that contains a list of keyword, value pairs. The values
           must be strings.
        """
        # Check if one of the fields contains surrogate characters and thereby
        # forces hdrcharset=BINARY, see _proc_pax() for more information.
        binary = False
        for keyword, value in pax_headers.items():
            try:
                value.encode("utf8", "strict")
            except UnicodeEncodeError:
                binary = True
                break

        records = b""
        if binary:
            # Put the hdrcharset field at the beginning of the header.
            records += b"21 hdrcharset=BINARY\n"

        for keyword, value in pax_headers.items():
            keyword = keyword.encode("utf8")
            if binary:
                # Try to restore the original byte representation of `value'.
                # Needless to say, that the encoding must match the string.
                value = value.encode(encoding, "surrogateescape")
            else:
                value = value.encode("utf8")

            l = len(keyword) + len(value) + 3   # ' ' + '=' + '\n'
            n = p = 0
            while True:
                n = l + len(str(p))
                if n == p:
                    break
                p = n
            records += bytes(str(p), "ascii") + b" " + keyword + b"=" + value + b"\n"

        # We use a hardcoded "././@PaxHeader" name like star does
        # instead of the one that POSIX recommends.
        info = {}
        info["name"] = "././@PaxHeader"
        info["type"] = type
        info["size"] = len(records)
        info["magic"] = POSIX_MAGIC

        # Create pax header + record blocks.
        return cls._create_header(info, USTAR_FORMAT, "ascii", "replace") + \
                cls._create_payload(records)

    @classmethod
    def frombuf(cls, buf, encoding, errors):
        """Construct a TarInfo object from a 512 byte bytes object.
        """
        if len(buf) == 0:
            raise EmptyHeaderError("empty header")
        if len(buf) != BLOCKSIZE:
            raise TruncatedHeaderError("truncated header")
        if buf.count(NUL) == BLOCKSIZE:
            raise EOFHeaderError("end of file header")

        chksum = nti(buf[148:156])
        if chksum not in calc_chksums(buf):
            raise InvalidHeaderError("bad checksum")

        obj = cls()
        obj.name = nts(buf[0:100], encoding, errors)
        obj.mode = nti(buf[100:108])
        obj.uid = nti(buf[108:116])
        obj.gid = nti(buf[116:124])
        obj.size = nti(buf[124:136])
        obj.mtime = nti(buf[136:148])
        obj.chksum = chksum
        obj.type = buf[156:157]
        obj.linkname = nts(buf[157:257], encoding, errors)
        obj.uname = nts(buf[265:297], encoding, errors)
        obj.gname = nts(buf[297:329], encoding, errors)
        obj.devmajor = nti(buf[329:337])
        obj.devminor = nti(buf[337:345])
        prefix = nts(buf[345:500], encoding, errors)

        # Old V7 tar format represents a directory as a regular
        # file with a trailing slash.
        if obj.type == AREGTYPE and obj.name.endswith("/"):
            obj.type = DIRTYPE

        # The old GNU sparse format occupies some of the unused
        # space in the buffer for up to 4 sparse structures.
        # Save the them for later processing in _proc_sparse().
        if obj.type == GNUTYPE_SPARSE:
            pos = 386
            structs = []
            for i in range(4):
                try:
                    offset = nti(buf[pos:pos + 12])
                    numbytes = nti(buf[pos + 12:pos + 24])
                except ValueError:
                    break
                structs.append((offset, numbytes))
                pos += 24
            isextended = bool(buf[482])
            origsize = nti(buf[483:495])
            obj._sparse_structs = (structs, isextended, origsize)

        # Remove redundant slashes from directories.
        if obj.isdir():
            obj.name = obj.name.rstrip("/")

        # Reconstruct a ustar longname.
        if prefix and obj.type not in GNU_TYPES:
            obj.name = prefix + "/" + obj.name
        return obj

    @classmethod
    def fromtarfile(cls, tarfile):
        """Return the next TarInfo object from TarFile object
           tarfile.
        """
        buf = tarfile.fileobj.read(BLOCKSIZE)
        obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors)
        obj.offset = tarfile.fileobj.tell() - BLOCKSIZE
        return obj._proc_member(tarfile)

    #--------------------------------------------------------------------------
    # The following are methods that are called depending on the type of a
    # member. The entry point is _proc_member() which can be overridden in a
    # subclass to add custom _proc_*() methods. A _proc_*() method MUST
    # implement the following
    # operations:
    # 1. Set self.offset_data to the position where the data blocks begin,
    #    if there is data that follows.
    # 2. Set tarfile.offset to the position where the next member's header will
    #    begin.
    # 3. Return self or another valid TarInfo object.
    def _proc_member(self, tarfile):
        """Choose the right processing method depending on
           the type and call it.
        """
        if self.type in (GNUTYPE_LONGNAME, GNUTYPE_LONGLINK):
            return self._proc_gnulong(tarfile)
        elif self.type == GNUTYPE_SPARSE:
            return self._proc_sparse(tarfile)
        elif self.type in (XHDTYPE, XGLTYPE, SOLARIS_XHDTYPE):
            return self._proc_pax(tarfile)
        else:
            return self._proc_builtin(tarfile)

    def _proc_builtin(self, tarfile):
        """Process a builtin type or an unknown type which
           will be treated as a regular file.
        """
        self.offset_data = tarfile.fileobj.tell()
        offset = self.offset_data
        if self.isreg() or self.type not in SUPPORTED_TYPES:
            # Skip the following data blocks.
            offset += self._block(self.size)
        tarfile.offset = offset

        # Patch the TarInfo object with saved global
        # header information.
        self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors)

        return self

    def _proc_gnulong(self, tarfile):
        """Process the blocks that hold a GNU longname
           or longlink member.
        """
        buf = tarfile.fileobj.read(self._block(self.size))

        # Fetch the next header and process it.
        try:
            next = self.fromtarfile(tarfile)
        except HeaderError:
            raise SubsequentHeaderError("missing or bad subsequent header")

        # Patch the TarInfo object from the next header with
        # the longname information.
        next.offset = self.offset
        if self.type == GNUTYPE_LONGNAME:
            next.name = nts(buf, tarfile.encoding, tarfile.errors)
        elif self.type == GNUTYPE_LONGLINK:
            next.linkname = nts(buf, tarfile.encoding, tarfile.errors)

        return next

    def _proc_sparse(self, tarfile):
        """Process a GNU sparse header plus extra headers.
        """
        # We already collected some sparse structures in frombuf().
        structs, isextended, origsize = self._sparse_structs
        del self._sparse_structs

        # Collect sparse structures from extended header blocks.
        while isextended:
            buf = tarfile.fileobj.read(BLOCKSIZE)
            pos = 0
            for i in range(21):
                try:
                    offset = nti(buf[pos:pos + 12])
                    numbytes = nti(buf[pos + 12:pos + 24])
                except ValueError:
                    break
                if offset and numbytes:
                    structs.append((offset, numbytes))
                pos += 24
            isextended = bool(buf[504])
        self.sparse = structs

        self.offset_data = tarfile.fileobj.tell()
        tarfile.offset = self.offset_data + self._block(self.size)
        self.size = origsize
        return self

    def _proc_pax(self, tarfile):
        """Process an extended or global header as described in
           POSIX.1-2008.
        """
        # Read the header information.
        buf = tarfile.fileobj.read(self._block(self.size))

        # A pax header stores supplemental information for either
        # the following file (extended) or all following files
        # (global).
        if self.type == XGLTYPE:
            pax_headers = tarfile.pax_headers
        else:
            pax_headers = tarfile.pax_headers.copy()

        # Check if the pax header contains a hdrcharset field. This tells us
        # the encoding of the path, linkpath, uname and gname fields. Normally,
        # these fields are UTF-8 encoded but since POSIX.1-2008 tar
        # implementations are allowed to store them as raw binary strings if
        # the translation to UTF-8 fails.
        match = re.search(br"\d+ hdrcharset=([^\n]+)\n", buf)
        if match is not None:
            pax_headers["hdrcharset"] = match.group(1).decode("utf8")

        # For the time being, we don't care about anything other than "BINARY".
        # The only other value that is currently allowed by the standard is
        # "ISO-IR 10646 2000 UTF-8" in other words UTF-8.
        hdrcharset = pax_headers.get("hdrcharset")
        if hdrcharset == "BINARY":
            encoding = tarfile.encoding
        else:
            encoding = "utf8"

        # Parse pax header information. A record looks like that:
        # "%d %s=%s\n" % (length, keyword, value). length is the size
        # of the complete record including the length field itself and
        # the newline. keyword and value are both UTF-8 encoded strings.
        regex = re.compile(br"(\d+) ([^=]+)=")
        pos = 0
        while True:
            match = regex.match(buf, pos)
            if not match:
                break

            length, keyword = match.groups()
            length = int(length)
            value = buf[match.end(2) + 1:match.start(1) + length - 1]

            # Normally, we could just use "utf8" as the encoding and "strict"
            # as the error handler, but we better not take the risk. For
            # example, GNU tar <= 1.23 is known to store filenames it cannot
            # translate to UTF-8 as raw strings (unfortunately without a
            # hdrcharset=BINARY header).
            # We first try the strict standard encoding, and if that fails we
            # fall back on the user's encoding and error handler.
            keyword = self._decode_pax_field(keyword, "utf8", "utf8",
                    tarfile.errors)
            if keyword in PAX_NAME_FIELDS:
                value = self._decode_pax_field(value, encoding, tarfile.encoding,
                        tarfile.errors)
            else:
                value = self._decode_pax_field(value, "utf8", "utf8",
                        tarfile.errors)

            pax_headers[keyword] = value
            pos += length

        # Fetch the next header.
        try:
            next = self.fromtarfile(tarfile)
        except HeaderError:
            raise SubsequentHeaderError("missing or bad subsequent header")

        # Process GNU sparse information.
        if "GNU.sparse.map" in pax_headers:
            # GNU extended sparse format version 0.1.
            self._proc_gnusparse_01(next, pax_headers)

        elif "GNU.sparse.size" in pax_headers:
            # GNU extended sparse format version 0.0.
            self._proc_gnusparse_00(next, pax_headers, buf)

        elif pax_headers.get("GNU.sparse.major") == "1" and pax_headers.get("GNU.sparse.minor") == "0":
            # GNU extended sparse format version 1.0.
            self._proc_gnusparse_10(next, pax_headers, tarfile)

        if self.type in (XHDTYPE, SOLARIS_XHDTYPE):
            # Patch the TarInfo object with the extended header info.
            next._apply_pax_info(pax_headers, tarfile.encoding, tarfile.errors)
            next.offset = self.offset

            if "size" in pax_headers:
                # If the extended header replaces the size field,
                # we need to recalculate the offset where the next
                # header starts.
                offset = next.offset_data
                if next.isreg() or next.type not in SUPPORTED_TYPES:
                    offset += next._block(next.size)
                tarfile.offset = offset

        return next

    def _proc_gnusparse_00(self, next, pax_headers, buf):
        """Process a GNU tar extended sparse header, version 0.0.
        """
        offsets = []
        for match in re.finditer(br"\d+ GNU.sparse.offset=(\d+)\n", buf):
            offsets.append(int(match.group(1)))
        numbytes = []
        for match in re.finditer(br"\d+ GNU.sparse.numbytes=(\d+)\n", buf):
            numbytes.append(int(match.group(1)))
        next.sparse = list(zip(offsets, numbytes))

    def _proc_gnusparse_01(self, next, pax_headers):
        """Process a GNU tar extended sparse header, version 0.1.
        """
        sparse = [int(x) for x in pax_headers["GNU.sparse.map"].split(",")]
        next.sparse = list(zip(sparse[::2], sparse[1::2]))

    def _proc_gnusparse_10(self, next, pax_headers, tarfile):
        """Process a GNU tar extended sparse header, version 1.0.
        """
        fields = None
        sparse = []
        buf = tarfile.fileobj.read(BLOCKSIZE)
        fields, buf = buf.split(b"\n", 1)
        fields = int(fields)
        while len(sparse) < fields * 2:
            if b"\n" not in buf:
                buf += tarfile.fileobj.read(BLOCKSIZE)
            number, buf = buf.split(b"\n", 1)
            sparse.append(int(number))
        next.offset_data = tarfile.fileobj.tell()
        next.sparse = list(zip(sparse[::2], sparse[1::2]))

    def _apply_pax_info(self, pax_headers, encoding, errors):
        """Replace fields with supplemental information from a previous
           pax extended or global header.
        """
        for keyword, value in pax_headers.items():
            if keyword == "GNU.sparse.name":
                setattr(self, "path", value)
            elif keyword == "GNU.sparse.size":
                setattr(self, "size", int(value))
            elif keyword == "GNU.sparse.realsize":
                setattr(self, "size", int(value))
            elif keyword in PAX_FIELDS:
                if keyword in PAX_NUMBER_FIELDS:
                    try:
                        value = PAX_NUMBER_FIELDS[keyword](value)
                    except ValueError:
                        value = 0
                if keyword == "path":
                    value = value.rstrip("/")
                setattr(self, keyword, value)

        self.pax_headers = pax_headers.copy()

    def _decode_pax_field(self, value, encoding, fallback_encoding, fallback_errors):
        """Decode a single field from a pax record.
        """
        try:
            return value.decode(encoding, "strict")
        except UnicodeDecodeError:
            return value.decode(fallback_encoding, fallback_errors)

    def _block(self, count):
        """Round up a byte count by BLOCKSIZE and return it,
           e.g. _block(834) => 1024.
        """
        blocks, remainder = divmod(count, BLOCKSIZE)
        if remainder:
            blocks += 1
        return blocks * BLOCKSIZE

    def isreg(self):
        return self.type in REGULAR_TYPES
    def isfile(self):
        return self.isreg()
    def isdir(self):
        return self.type == DIRTYPE
    def issym(self):
        return self.type == SYMTYPE
    def islnk(self):
        return self.type == LNKTYPE
    def ischr(self):
        return self.type == CHRTYPE
    def isblk(self):
        return self.type == BLKTYPE
    def isfifo(self):
        return self.type == FIFOTYPE
    def issparse(self):
        return self.sparse is not None
    def isdev(self):
        return self.type in (CHRTYPE, BLKTYPE, FIFOTYPE)
# class TarInfo

class TarFile(object):
    """The TarFile Class provides an interface to tar archives.
    """

    debug = 0                   # May be set from 0 (no msgs) to 3 (all msgs)

    dereference = False         # If true, add content of linked file to the
                                # tar file, else the link.

    ignore_zeros = False        # If true, skips empty or invalid blocks and
                                # continues processing.

    errorlevel = 1              # If 0, fatal errors only appear in debug
                                # messages (if debug >= 0). If > 0, errors
                                # are passed to the caller as exceptions.

    format = DEFAULT_FORMAT     # The format to use when creating an archive.

    encoding = ENCODING         # Encoding for 8-bit character strings.

    errors = None               # Error handler for unicode conversion.

    tarinfo = TarInfo           # The default TarInfo class to use.

    fileobject = ExFileObject   # The default ExFileObject class to use.

    def __init__(self, name=None, mode="r", fileobj=None, format=None,
            tarinfo=None, dereference=None, ignore_zeros=None, encoding=None,
            errors="surrogateescape", pax_headers=None, debug=None, errorlevel=None):
        """Open an (uncompressed) tar archive `name'. `mode' is either 'r' to
           read from an existing archive, 'a' to append data to an existing
           file or 'w' to create a new file overwriting an existing one. `mode'
           defaults to 'r'.
           If `fileobj' is given, it is used for reading or writing data. If it
           can be determined, `mode' is overridden by `fileobj's mode.
           `fileobj' is not closed, when TarFile is closed.
        """
        if len(mode) > 1 or mode not in "raw":
            raise ValueError("mode must be 'r', 'a' or 'w'")
        self.mode = mode
        self._mode = {"r": "rb", "a": "r+b", "w": "wb"}[mode]

        if not fileobj:
            if self.mode == "a" and not os.path.exists(name):
                # Create nonexistent files in append mode.
                self.mode = "w"
                self._mode = "wb"
            fileobj = bltn_open(name, self._mode)
            self._extfileobj = False
        else:
            if name is None and hasattr(fileobj, "name"):
                name = fileobj.name
            if hasattr(fileobj, "mode"):
                self._mode = fileobj.mode
            self._extfileobj = True
        self.name = os.path.abspath(name) if name else None
        self.fileobj = fileobj

        # Init attributes.
        if format is not None:
            self.format = format
        if tarinfo is not None:
            self.tarinfo = tarinfo
        if dereference is not None:
            self.dereference = dereference
        if ignore_zeros is not None:
            self.ignore_zeros = ignore_zeros
        if encoding is not None:
            self.encoding = encoding
        self.errors = errors

        if pax_headers is not None and self.format == PAX_FORMAT:
            self.pax_headers = pax_headers
        else:
            self.pax_headers = {}

        if debug is not None:
            self.debug = debug
        if errorlevel is not None:
            self.errorlevel = errorlevel

        # Init datastructures.
        self.closed = False
        self.members = []       # list of members as TarInfo objects
        self._loaded = False    # flag if all members have been read
        self.offset = self.fileobj.tell()
                                # current position in the archive file
        self.inodes = {}        # dictionary caching the inodes of
                                # archive members already added

        try:
            if self.mode == "r":
                self.firstmember = None
                self.firstmember = self.next()

            if self.mode == "a":
                # Move to the end of the archive,
                # before the first empty block.
                while True:
                    self.fileobj.seek(self.offset)
                    try:
                        tarinfo = self.tarinfo.fromtarfile(self)
                        self.members.append(tarinfo)
                    except EOFHeaderError:
                        self.fileobj.seek(self.offset)
                        break
                    except HeaderError as e:
                        raise ReadError(str(e))

            if self.mode in "aw":
                self._loaded = True

                if self.pax_headers:
                    buf = self.tarinfo.create_pax_global_header(self.pax_headers.copy())
                    self.fileobj.write(buf)
                    self.offset += len(buf)
        except:
            if not self._extfileobj:
                self.fileobj.close()
            self.closed = True
            raise

    #--------------------------------------------------------------------------
    # Below are the classmethods which act as alternate constructors to the
    # TarFile class. The open() method is the only one that is needed for
    # public use; it is the "super"-constructor and is able to select an
    # adequate "sub"-constructor for a particular compression using the mapping
    # from OPEN_METH.
    #
    # This concept allows one to subclass TarFile without losing the comfort of
    # the super-constructor. A sub-constructor is registered and made available
    # by adding it to the mapping in OPEN_METH.

    @classmethod
    def open(cls, name=None, mode="r", fileobj=None, bufsize=RECORDSIZE, **kwargs):
        """Open a tar archive for reading, writing or appending. Return
           an appropriate TarFile class.

           mode:
           'r' or 'r:*' open for reading with transparent compression
           'r:'         open for reading exclusively uncompressed
           'r:gz'       open for reading with gzip compression
           'r:bz2'      open for reading with bzip2 compression
           'a' or 'a:'  open for appending, creating the file if necessary
           'w' or 'w:'  open for writing without compression
           'w:gz'       open for writing with gzip compression
           'w:bz2'      open for writing with bzip2 compression

           'r|*'        open a stream of tar blocks with transparent compression
           'r|'         open an uncompressed stream of tar blocks for reading
           'r|gz'       open a gzip compressed stream of tar blocks
           'r|bz2'      open a bzip2 compressed stream of tar blocks
           'w|'         open an uncompressed stream for writing
           'w|gz'       open a gzip compressed stream for writing
           'w|bz2'      open a bzip2 compressed stream for writing
        """

        if not name and not fileobj:
            raise ValueError("nothing to open")

        if mode in ("r", "r:*"):
            # Find out which *open() is appropriate for opening the file.
            for comptype in cls.OPEN_METH:
                func = getattr(cls, cls.OPEN_METH[comptype])
                if fileobj is not None:
                    saved_pos = fileobj.tell()
                try:
                    return func(name, "r", fileobj, **kwargs)
                except (ReadError, CompressionError) as e:
                    if fileobj is not None:
                        fileobj.seek(saved_pos)
                    continue
            raise ReadError("file could not be opened successfully")

        elif ":" in mode:
            filemode, comptype = mode.split(":", 1)
            filemode = filemode or "r"
            comptype = comptype or "tar"

            # Select the *open() function according to
            # given compression.
            if comptype in cls.OPEN_METH:
                func = getattr(cls, cls.OPEN_METH[comptype])
            else:
                raise CompressionError("unknown compression type %r" % comptype)
            return func(name, filemode, fileobj, **kwargs)

        elif "|" in mode:
            filemode, comptype = mode.split("|", 1)
            filemode = filemode or "r"
            comptype = comptype or "tar"

            if filemode not in "rw":
                raise ValueError("mode must be 'r' or 'w'")

            stream = _Stream(name, filemode, comptype, fileobj, bufsize)
            try:
                t = cls(name, filemode, stream, **kwargs)
            except:
                stream.close()
                raise
            t._extfileobj = False
            return t

        elif mode in "aw":
            return cls.taropen(name, mode, fileobj, **kwargs)

        raise ValueError("undiscernible mode")

    @classmethod
    def taropen(cls, name, mode="r", fileobj=None, **kwargs):
        """Open uncompressed tar archive name for reading or writing.
        """
        if len(mode) > 1 or mode not in "raw":
            raise ValueError("mode must be 'r', 'a' or 'w'")
        return cls(name, mode, fileobj, **kwargs)

    @classmethod
    def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
        """Open gzip compressed tar archive name for reading or writing.
           Appending is not allowed.
        """
        if len(mode) > 1 or mode not in "rw":
            raise ValueError("mode must be 'r' or 'w'")

        try:
            import gzip
            gzip.GzipFile
        except (ImportError, AttributeError):
            raise CompressionError("gzip module is not available")

        extfileobj = fileobj is not None
        try:
            fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj)
            t = cls.taropen(name, mode, fileobj, **kwargs)
        except IOError:
            if not extfileobj and fileobj is not None:
                fileobj.close()
            if fileobj is None:
                raise
            raise ReadError("not a gzip file")
        except:
            if not extfileobj and fileobj is not None:
                fileobj.close()
            raise
        t._extfileobj = extfileobj
        return t

    @classmethod
    def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
        """Open bzip2 compressed tar archive name for reading or writing.
           Appending is not allowed.
        """
        if len(mode) > 1 or mode not in "rw":
            raise ValueError("mode must be 'r' or 'w'.")

        try:
            import bz2
        except ImportError:
            raise CompressionError("bz2 module is not available")

        if fileobj is not None:
            fileobj = _BZ2Proxy(fileobj, mode)
        else:
            fileobj = bz2.BZ2File(name, mode, compresslevel=compresslevel)

        try:
            t = cls.taropen(name, mode, fileobj, **kwargs)
        except (IOError, EOFError):
            fileobj.close()
            raise ReadError("not a bzip2 file")
        t._extfileobj = False
        return t

    # All *open() methods are registered here.
    OPEN_METH = {
        "tar": "taropen",   # uncompressed tar
        "gz":  "gzopen",    # gzip compressed tar
        "bz2": "bz2open"    # bzip2 compressed tar
    }

    #--------------------------------------------------------------------------
    # The public methods which TarFile provides:

    def close(self):
        """Close the TarFile. In write-mode, two finishing zero blocks are
           appended to the archive.
        """
        if self.closed:
            return

        if self.mode in "aw":
            self.fileobj.write(NUL * (BLOCKSIZE * 2))
            self.offset += (BLOCKSIZE * 2)
            # fill up the end with zero-blocks
            # (like option -b20 for tar does)
            blocks, remainder = divmod(self.offset, RECORDSIZE)
            if remainder > 0:
                self.fileobj.write(NUL * (RECORDSIZE - remainder))

        if not self._extfileobj:
            self.fileobj.close()
        self.closed = True

    def getmember(self, name):
        """Return a TarInfo object for member `name'. If `name' can not be
           found in the archive, KeyError is raised. If a member occurs more
           than once in the archive, its last occurrence is assumed to be the
           most up-to-date version.
        """
        tarinfo = self._getmember(name)
        if tarinfo is None:
            raise KeyError("filename %r not found" % name)
        return tarinfo

    def getmembers(self):
        """Return the members of the archive as a list of TarInfo objects. The
           list has the same order as the members in the archive.
        """
        self._check()
        if not self._loaded:    # if we want to obtain a list of
            self._load()        # all members, we first have to
                                # scan the whole archive.
        return self.members

    def getnames(self):
        """Return the members of the archive as a list of their names. It has
           the same order as the list returned by getmembers().
        """
        return [tarinfo.name for tarinfo in self.getmembers()]

    def gettarinfo(self, name=None, arcname=None, fileobj=None):
        """Create a TarInfo object for either the file `name' or the file
           object `fileobj' (using os.fstat on its file descriptor). You can
           modify some of the TarInfo's attributes before you add it using
           addfile(). If given, `arcname' specifies an alternative name for the
           file in the archive.
        """
        self._check("aw")

        # When fileobj is given, replace name by
        # fileobj's real name.
        if fileobj is not None:
            name = fileobj.name

        # Building the name of the member in the archive.
        # Backward slashes are converted to forward slashes,
        # Absolute paths are turned to relative paths.
        if arcname is None:
            arcname = name
        drv, arcname = os.path.splitdrive(arcname)
        arcname = arcname.replace(os.sep, "/")
        arcname = arcname.lstrip("/")

        # Now, fill the TarInfo object with
        # information specific for the file.
        tarinfo = self.tarinfo()
        tarinfo.tarfile = self

        # Use os.stat or os.lstat, depending on platform
        # and if symlinks shall be resolved.
        if fileobj is None:
            if hasattr(os, "lstat") and not self.dereference:
                statres = os.lstat(name)
            else:
                statres = os.stat(name)
        else:
            statres = os.fstat(fileobj.fileno())
        linkname = ""

        stmd = statres.st_mode
        if stat.S_ISREG(stmd):
            inode = (statres.st_ino, statres.st_dev)
            if not self.dereference and statres.st_nlink > 1 and \
                    inode in self.inodes and arcname != self.inodes[inode]:
                # Is it a hardlink to an already
                # archived file?
                type = LNKTYPE
                linkname = self.inodes[inode]
            else:
                # The inode is added only if its valid.
                # For win32 it is always 0.
                type = REGTYPE
                if inode[0]:
                    self.inodes[inode] = arcname
        elif stat.S_ISDIR(stmd):
            type = DIRTYPE
        elif stat.S_ISFIFO(stmd):
            type = FIFOTYPE
        elif stat.S_ISLNK(stmd):
            type = SYMTYPE
            linkname = os.readlink(name)
        elif stat.S_ISCHR(stmd):
            type = CHRTYPE
        elif stat.S_ISBLK(stmd):
            type = BLKTYPE
        else:
            return None

        # Fill the TarInfo object with all
        # information we can get.
        tarinfo.name = arcname
        tarinfo.mode = stmd
        tarinfo.uid = statres.st_uid
        tarinfo.gid = statres.st_gid
        if type == REGTYPE:
            tarinfo.size = statres.st_size
        else:
            tarinfo.size = 0
        tarinfo.mtime = statres.st_mtime
        tarinfo.type = type
        tarinfo.linkname = linkname
        if pwd:
            try:
                tarinfo.uname = pwd.getpwuid(tarinfo.uid)[0]
            except KeyError:
                pass
        if grp:
            try:
                tarinfo.gname = grp.getgrgid(tarinfo.gid)[0]
            except KeyError:
                pass

        if type in (CHRTYPE, BLKTYPE):
            if hasattr(os, "major") and hasattr(os, "minor"):
                tarinfo.devmajor = os.major(statres.st_rdev)
                tarinfo.devminor = os.minor(statres.st_rdev)
        return tarinfo

    def list(self, verbose=True):
        """Print a table of contents to sys.stdout. If `verbose' is False, only
           the names of the members are printed. If it is True, an `ls -l'-like
           output is produced.
        """
        self._check()

        for tarinfo in self:
            if verbose:
                print(filemode(tarinfo.mode), end=' ')
                print("%s/%s" % (tarinfo.uname or tarinfo.uid,
                                 tarinfo.gname or tarinfo.gid), end=' ')
                if tarinfo.ischr() or tarinfo.isblk():
                    print("%10s" % ("%d,%d" \
                                    % (tarinfo.devmajor, tarinfo.devminor)), end=' ')
                else:
                    print("%10d" % tarinfo.size, end=' ')
                print("%d-%02d-%02d %02d:%02d:%02d" \
                      % time.localtime(tarinfo.mtime)[:6], end=' ')

            print(tarinfo.name + ("/" if tarinfo.isdir() else ""), end=' ')

            if verbose:
                if tarinfo.issym():
                    print("->", tarinfo.linkname, end=' ')
                if tarinfo.islnk():
                    print("link to", tarinfo.linkname, end=' ')
            print()

    def add(self, name, arcname=None, recursive=True, exclude=None, filter=None):
        """Add the file `name' to the archive. `name' may be any type of file
           (directory, fifo, symbolic link, etc.). If given, `arcname'
           specifies an alternative name for the file in the archive.
           Directories are added recursively by default. This can be avoided by
           setting `recursive' to False. `exclude' is a function that should
           return True for each filename to be excluded. `filter' is a function
           that expects a TarInfo object argument and returns the changed
           TarInfo object, if it returns None the TarInfo object will be
           excluded from the archive.
        """
        self._check("aw")

        if arcname is None:
            arcname = name

        # Exclude pathnames.
        if exclude is not None:
            import warnings
            warnings.warn("use the filter argument instead",
                    DeprecationWarning, 2)
            if exclude(name):
                self._dbg(2, "tarfile: Excluded %r" % name)
                return

        # Skip if somebody tries to archive the archive...
        if self.name is not None and os.path.abspath(name) == self.name:
            self._dbg(2, "tarfile: Skipped %r" % name)
            return

        self._dbg(1, name)

        # Create a TarInfo object from the file.
        tarinfo = self.gettarinfo(name, arcname)

        if tarinfo is None:
            self._dbg(1, "tarfile: Unsupported type %r" % name)
            return

        # Change or exclude the TarInfo object.
        if filter is not None:
            tarinfo = filter(tarinfo)
            if tarinfo is None:
                self._dbg(2, "tarfile: Excluded %r" % name)
                return

        # Append the tar header and data to the archive.
        if tarinfo.isreg():
            f = bltn_open(name, "rb")
            self.addfile(tarinfo, f)
            f.close()

        elif tarinfo.isdir():
            self.addfile(tarinfo)
            if recursive:
                for f in os.listdir(name):
                    self.add(os.path.join(name, f), os.path.join(arcname, f),
                            recursive, exclude, filter=filter)

        else:
            self.addfile(tarinfo)

    def addfile(self, tarinfo, fileobj=None):
        """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is
           given, tarinfo.size bytes are read from it and added to the archive.
           You can create TarInfo objects using gettarinfo().
           On Windows platforms, `fileobj' should always be opened with mode
           'rb' to avoid irritation about the file size.
        """
        self._check("aw")

        tarinfo = copy.copy(tarinfo)

        buf = tarinfo.tobuf(self.format, self.encoding, self.errors)
        self.fileobj.write(buf)
        self.offset += len(buf)

        # If there's data to follow, append it.
        if fileobj is not None:
            copyfileobj(fileobj, self.fileobj, tarinfo.size)
            blocks, remainder = divmod(tarinfo.size, BLOCKSIZE)
            if remainder > 0:
                self.fileobj.write(NUL * (BLOCKSIZE - remainder))
                blocks += 1
            self.offset += blocks * BLOCKSIZE

        self.members.append(tarinfo)

    def extractall(self, path=".", members=None):
        """Extract all members from the archive to the current working
           directory and set owner, modification time and permissions on
           directories afterwards. `path' specifies a different directory
           to extract to. `members' is optional and must be a subset of the
           list returned by getmembers().
        """
        directories = []

        if members is None:
            members = self

        for tarinfo in members:
            if tarinfo.isdir():
                # Extract directories with a safe mode.
                directories.append(tarinfo)
                tarinfo = copy.copy(tarinfo)
                tarinfo.mode = 0o700
            # Do not set_attrs directories, as we will do that further down
            self.extract(tarinfo, path, set_attrs=not tarinfo.isdir())

        # Reverse sort directories.
        directories.sort(key=lambda a: a.name)
        directories.reverse()

        # Set correct owner, mtime and filemode on directories.
        for tarinfo in directories:
            dirpath = os.path.join(path, tarinfo.name)
            try:
                self.chown(tarinfo, dirpath)
                self.utime(tarinfo, dirpath)
                self.chmod(tarinfo, dirpath)
            except ExtractError as e:
                if self.errorlevel > 1:
                    raise
                else:
                    self._dbg(1, "tarfile: %s" % e)

    def extract(self, member, path="", set_attrs=True):
        """Extract a member from the archive to the current working directory,
           using its full name. Its file information is extracted as accurately
           as possible. `member' may be a filename or a TarInfo object. You can
           specify a different directory using `path'. File attributes (owner,
           mtime, mode) are set unless `set_attrs' is False.
        """
        self._check("r")

        if isinstance(member, str):
            tarinfo = self.getmember(member)
        else:
            tarinfo = member

        # Prepare the link target for makelink().
        if tarinfo.islnk():
            tarinfo._link_target = os.path.join(path, tarinfo.linkname)

        try:
            self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
                                 set_attrs=set_attrs)
        except EnvironmentError as e:
            if self.errorlevel > 0:
                raise
            else:
                if e.filename is None:
                    self._dbg(1, "tarfile: %s" % e.strerror)
                else:
                    self._dbg(1, "tarfile: %s %r" % (e.strerror, e.filename))
        except ExtractError as e:
            if self.errorlevel > 1:
                raise
            else:
                self._dbg(1, "tarfile: %s" % e)

    def extractfile(self, member):
        """Extract a member from the archive as a file object. `member' may be
           a filename or a TarInfo object. If `member' is a regular file, a
           file-like object is returned. If `member' is a link, a file-like
           object is constructed from the link's target. If `member' is none of
           the above, None is returned.
           The file-like object is read-only and provides the following
           methods: read(), readline(), readlines(), seek() and tell()
        """
        self._check("r")

        if isinstance(member, str):
            tarinfo = self.getmember(member)
        else:
            tarinfo = member

        if tarinfo.isreg():
            return self.fileobject(self, tarinfo)

        elif tarinfo.type not in SUPPORTED_TYPES:
            # If a member's type is unknown, it is treated as a
            # regular file.
            return self.fileobject(self, tarinfo)

        elif tarinfo.islnk() or tarinfo.issym():
            if isinstance(self.fileobj, _Stream):
                # A small but ugly workaround for the case that someone tries
                # to extract a (sym)link as a file-object from a non-seekable
                # stream of tar blocks.
                raise StreamError("cannot extract (sym)link as file object")
            else:
                # A (sym)link's file object is its target's file object.
                return self.extractfile(self._find_link_target(tarinfo))
        else:
            # If there's no data associated with the member (directory, chrdev,
            # blkdev, etc.), return None instead of a file object.
            return None

    def _extract_member(self, tarinfo, targetpath, set_attrs=True):
        """Extract the TarInfo object tarinfo to a physical
           file called targetpath.
        """
        # Fetch the TarInfo object for the given name
        # and build the destination pathname, replacing
        # forward slashes to platform specific separators.
        targetpath = targetpath.rstrip("/")
        targetpath = targetpath.replace("/", os.sep)

        # Create all upper directories.
        upperdirs = os.path.dirname(targetpath)
        if upperdirs and not os.path.exists(upperdirs):
            # Create directories that are not part of the archive with
            # default permissions.
            os.makedirs(upperdirs)

        if tarinfo.islnk() or tarinfo.issym():
            self._dbg(1, "%s -> %s" % (tarinfo.name, tarinfo.linkname))
        else:
            self._dbg(1, tarinfo.name)

        if tarinfo.isreg():
            self.makefile(tarinfo, targetpath)
        elif tarinfo.isdir():
            self.makedir(tarinfo, targetpath)
        elif tarinfo.isfifo():
            self.makefifo(tarinfo, targetpath)
        elif tarinfo.ischr() or tarinfo.isblk():
            self.makedev(tarinfo, targetpath)
        elif tarinfo.islnk() or tarinfo.issym():
            self.makelink(tarinfo, targetpath)
        elif tarinfo.type not in SUPPORTED_TYPES:
            self.makeunknown(tarinfo, targetpath)
        else:
            self.makefile(tarinfo, targetpath)

        if set_attrs:
            self.chown(tarinfo, targetpath)
            if not tarinfo.issym():
                self.chmod(tarinfo, targetpath)
                self.utime(tarinfo, targetpath)

    #--------------------------------------------------------------------------
    # Below are the different file methods. They are called via
    # _extract_member() when extract() is called. They can be replaced in a
    # subclass to implement other functionality.

    def makedir(self, tarinfo, targetpath):
        """Make a directory called targetpath.
        """
        try:
            # Use a safe mode for the directory, the real mode is set
            # later in _extract_member().
            os.mkdir(targetpath, 0o700)
        except EnvironmentError as e:
            if e.errno != errno.EEXIST:
                raise

    def makefile(self, tarinfo, targetpath):
        """Make a file called targetpath.
        """
        source = self.fileobj
        source.seek(tarinfo.offset_data)
        target = bltn_open(targetpath, "wb")
        if tarinfo.sparse is not None:
            for offset, size in tarinfo.sparse:
                target.seek(offset)
                copyfileobj(source, target, size)
        else:
            copyfileobj(source, target, tarinfo.size)
        target.seek(tarinfo.size)
        target.truncate()
        target.close()

    def makeunknown(self, tarinfo, targetpath):
        """Make a file from a TarInfo object with an unknown type
           at targetpath.
        """
        self.makefile(tarinfo, targetpath)
        self._dbg(1, "tarfile: Unknown file type %r, " \
                     "extracted as regular file." % tarinfo.type)

    def makefifo(self, tarinfo, targetpath):
        """Make a fifo called targetpath.
        """
        if hasattr(os, "mkfifo"):
            os.mkfifo(targetpath)
        else:
            raise ExtractError("fifo not supported by system")

    def makedev(self, tarinfo, targetpath):
        """Make a character or block device called targetpath.
        """
        if not hasattr(os, "mknod") or not hasattr(os, "makedev"):
            raise ExtractError("special devices not supported by system")

        mode = tarinfo.mode
        if tarinfo.isblk():
            mode |= stat.S_IFBLK
        else:
            mode |= stat.S_IFCHR

        os.mknod(targetpath, mode,
                 os.makedev(tarinfo.devmajor, tarinfo.devminor))

    def makelink(self, tarinfo, targetpath):
        """Make a (symbolic) link called targetpath. If it cannot be created
          (platform limitation), we try to make a copy of the referenced file
          instead of a link.
        """
        try:
            # For systems that support symbolic and hard links.
            if tarinfo.issym():
                os.symlink(tarinfo.linkname, targetpath)
            else:
                # See extract().
                if os.path.exists(tarinfo._link_target):
                    os.link(tarinfo._link_target, targetpath)
                else:
                    self._extract_member(self._find_link_target(tarinfo),
                                         targetpath)
        except symlink_exception:
            if tarinfo.issym():
                linkpath = os.path.join(os.path.dirname(tarinfo.name),
                                        tarinfo.linkname)
            else:
                linkpath = tarinfo.linkname
        else:
            try:
                self._extract_member(self._find_link_target(tarinfo),
                                     targetpath)
            except KeyError:
                raise ExtractError("unable to resolve link inside archive")

    def chown(self, tarinfo, targetpath):
        """Set owner of targetpath according to tarinfo.
        """
        if pwd and hasattr(os, "geteuid") and os.geteuid() == 0:
            # We have to be root to do so.
            try:
                g = grp.getgrnam(tarinfo.gname)[2]
            except KeyError:
                g = tarinfo.gid
            try:
                u = pwd.getpwnam(tarinfo.uname)[2]
            except KeyError:
                u = tarinfo.uid
            try:
                if tarinfo.issym() and hasattr(os, "lchown"):
                    os.lchown(targetpath, u, g)
                else:
                    if sys.platform != "os2emx":
                        os.chown(targetpath, u, g)
            except EnvironmentError as e:
                raise ExtractError("could not change owner")

    def chmod(self, tarinfo, targetpath):
        """Set file permissions of targetpath according to tarinfo.
        """
        if hasattr(os, 'chmod'):
            try:
                os.chmod(targetpath, tarinfo.mode)
            except EnvironmentError as e:
                raise ExtractError("could not change mode")

    def utime(self, tarinfo, targetpath):
        """Set modification time of targetpath according to tarinfo.
        """
        if not hasattr(os, 'utime'):
            return
        try:
            os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
        except EnvironmentError as e:
            raise ExtractError("could not change modification time")

    #--------------------------------------------------------------------------
    def next(self):
        """Return the next member of the archive as a TarInfo object, when
           TarFile is opened for reading. Return None if there is no more
           available.
        """
        self._check("ra")
        if self.firstmember is not None:
            m = self.firstmember
            self.firstmember = None
            return m

        # Read the next block.
        self.fileobj.seek(self.offset)
        tarinfo = None
        while True:
            try:
                tarinfo = self.tarinfo.fromtarfile(self)
            except EOFHeaderError as e:
                if self.ignore_zeros:
                    self._dbg(2, "0x%X: %s" % (self.offset, e))
                    self.offset += BLOCKSIZE
                    continue
            except InvalidHeaderError as e:
                if self.ignore_zeros:
                    self._dbg(2, "0x%X: %s" % (self.offset, e))
                    self.offset += BLOCKSIZE
                    continue
                elif self.offset == 0:
                    raise ReadError(str(e))
            except EmptyHeaderError:
                if self.offset == 0:
                    raise ReadError("empty file")
            except TruncatedHeaderError as e:
                if self.offset == 0:
                    raise ReadError(str(e))
            except SubsequentHeaderError as e:
                raise ReadError(str(e))
            break

        if tarinfo is not None:
            self.members.append(tarinfo)
        else:
            self._loaded = True

        return tarinfo

    #--------------------------------------------------------------------------
    # Little helper methods:

    def _getmember(self, name, tarinfo=None, normalize=False):
        """Find an archive member by name from bottom to top.
           If tarinfo is given, it is used as the starting point.
        """
        # Ensure that all members have been loaded.
        members = self.getmembers()

        # Limit the member search list up to tarinfo.
        if tarinfo is not None:
            members = members[:members.index(tarinfo)]

        if normalize:
            name = os.path.normpath(name)

        for member in reversed(members):
            if normalize:
                member_name = os.path.normpath(member.name)
            else:
                member_name = member.name

            if name == member_name:
                return member

    def _load(self):
        """Read through the entire archive file and look for readable
           members.
        """
        while True:
            tarinfo = self.next()
            if tarinfo is None:
                break
        self._loaded = True

    def _check(self, mode=None):
        """Check if TarFile is still open, and if the operation's mode
           corresponds to TarFile's mode.
        """
        if self.closed:
            raise IOError("%s is closed" % self.__class__.__name__)
        if mode is not None and self.mode not in mode:
            raise IOError("bad operation for mode %r" % self.mode)

    def _find_link_target(self, tarinfo):
        """Find the target member of a symlink or hardlink member in the
           archive.
        """
        if tarinfo.issym():
            # Always search the entire archive.
            linkname = os.path.dirname(tarinfo.name) + "/" + tarinfo.linkname
            limit = None
        else:
            # Search the archive before the link, because a hard link is
            # just a reference to an already archived file.
            linkname = tarinfo.linkname
            limit = tarinfo

        member = self._getmember(linkname, tarinfo=limit, normalize=True)
        if member is None:
            raise KeyError("linkname %r not found" % linkname)
        return member

    def __iter__(self):
        """Provide an iterator object.
        """
        if self._loaded:
            return iter(self.members)
        else:
            return TarIter(self)

    def _dbg(self, level, msg):
        """Write debugging output to sys.stderr.
        """
        if level <= self.debug:
            print(msg, file=sys.stderr)

    def __enter__(self):
        self._check()
        return self

    def __exit__(self, type, value, traceback):
        if type is None:
            self.close()
        else:
            # An exception occurred. We must not call close() because
            # it would try to write end-of-archive blocks and padding.
            if not self._extfileobj:
                self.fileobj.close()
            self.closed = True
# class TarFile

class TarIter(object):
    """Iterator Class.

       for tarinfo in TarFile(...):
           suite...
    """

    def __init__(self, tarfile):
        """Construct a TarIter object.
        """
        self.tarfile = tarfile
        self.index = 0
    def __iter__(self):
        """Return iterator object.
        """
        return self

    def __next__(self):
        """Return the next item using TarFile's next() method.
           When all members have been read, set TarFile as _loaded.
        """
        # Fix for SF #1100429: Under rare circumstances it can
        # happen that getmembers() is called during iteration,
        # which will cause TarIter to stop prematurely.
        if not self.tarfile._loaded:
            tarinfo = self.tarfile.next()
            if not tarinfo:
                self.tarfile._loaded = True
                raise StopIteration
        else:
            try:
                tarinfo = self.tarfile.members[self.index]
            except IndexError:
                raise StopIteration
        self.index += 1
        return tarinfo

    next = __next__ # for Python 2.x

#--------------------
# exported functions
#--------------------
def is_tarfile(name):
    """Return True if name points to a tar archive that we
       are able to handle, else return False.
    """
    try:
        t = open(name)
        t.close()
        return True
    except TarError:
        return False

bltn_open = open
open = TarFile.open
python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py000064400000000422151735047430020774 0ustar00"""Modules copied from Python 3 standard libraries, for internal use only.

Individual classes and functions are found in d2._backport.misc.  Intended
usage is to always import things missing from 3.1 from that module: the
built-in/stdlib objects will be used if found.
"""
python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py000064400000062062151735047430020555 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.

"""

import os
import sys
import stat
from os.path import abspath
import fnmatch
import collections
import errno
from . import tarfile

try:
    import bz2
    _BZ2_SUPPORTED = True
except ImportError:
    _BZ2_SUPPORTED = False

try:
    from pwd import getpwnam
except ImportError:
    getpwnam = None

try:
    from grp import getgrnam
except ImportError:
    getgrnam = None

__all__ = ["copyfileobj", "copyfile", "copymode", "copystat", "copy", "copy2",
           "copytree", "move", "rmtree", "Error", "SpecialFileError",
           "ExecError", "make_archive", "get_archive_formats",
           "register_archive_format", "unregister_archive_format",
           "get_unpack_formats", "register_unpack_format",
           "unregister_unpack_format", "unpack_archive", "ignore_patterns"]

class Error(EnvironmentError):
    pass

class SpecialFileError(EnvironmentError):
    """Raised when trying to do a kind of operation (e.g. copying) which is
    not supported on a special file (e.g. a named pipe)"""

class ExecError(EnvironmentError):
    """Raised when a command could not be executed"""

class ReadError(EnvironmentError):
    """Raised when an archive cannot be read"""

class RegistryError(Exception):
    """Raised when a registery operation with the archiving
    and unpacking registeries fails"""


try:
    WindowsError
except NameError:
    WindowsError = None

def copyfileobj(fsrc, fdst, length=16*1024):
    """copy data from file-like object fsrc to file-like object fdst"""
    while 1:
        buf = fsrc.read(length)
        if not buf:
            break
        fdst.write(buf)

def _samefile(src, dst):
    # Macintosh, Unix.
    if hasattr(os.path, 'samefile'):
        try:
            return os.path.samefile(src, dst)
        except OSError:
            return False

    # All other platforms: check for same pathname.
    return (os.path.normcase(os.path.abspath(src)) ==
            os.path.normcase(os.path.abspath(dst)))

def copyfile(src, dst):
    """Copy data from src to dst"""
    if _samefile(src, dst):
        raise Error("`%s` and `%s` are the same file" % (src, dst))

    for fn in [src, dst]:
        try:
            st = os.stat(fn)
        except OSError:
            # File most likely does not exist
            pass
        else:
            # XXX What about other special files? (sockets, devices...)
            if stat.S_ISFIFO(st.st_mode):
                raise SpecialFileError("`%s` is a named pipe" % fn)

    with open(src, 'rb') as fsrc:
        with open(dst, 'wb') as fdst:
            copyfileobj(fsrc, fdst)

def copymode(src, dst):
    """Copy mode bits from src to dst"""
    if hasattr(os, 'chmod'):
        st = os.stat(src)
        mode = stat.S_IMODE(st.st_mode)
        os.chmod(dst, mode)

def copystat(src, dst):
    """Copy all stat info (mode bits, atime, mtime, flags) from src to dst"""
    st = os.stat(src)
    mode = stat.S_IMODE(st.st_mode)
    if hasattr(os, 'utime'):
        os.utime(dst, (st.st_atime, st.st_mtime))
    if hasattr(os, 'chmod'):
        os.chmod(dst, mode)
    if hasattr(os, 'chflags') and hasattr(st, 'st_flags'):
        try:
            os.chflags(dst, st.st_flags)
        except OSError as why:
            if (not hasattr(errno, 'EOPNOTSUPP') or
                why.errno != errno.EOPNOTSUPP):
                raise

def copy(src, dst):
    """Copy data and mode bits ("cp src dst").

    The destination may be a directory.

    """
    if os.path.isdir(dst):
        dst = os.path.join(dst, os.path.basename(src))
    copyfile(src, dst)
    copymode(src, dst)

def copy2(src, dst):
    """Copy data and all stat info ("cp -p src dst").

    The destination may be a directory.

    """
    if os.path.isdir(dst):
        dst = os.path.join(dst, os.path.basename(src))
    copyfile(src, dst)
    copystat(src, dst)

def ignore_patterns(*patterns):
    """Function that can be used as copytree() ignore parameter.

    Patterns is a sequence of glob-style patterns
    that are used to exclude files"""
    def _ignore_patterns(path, names):
        ignored_names = []
        for pattern in patterns:
            ignored_names.extend(fnmatch.filter(names, pattern))
        return set(ignored_names)
    return _ignore_patterns

def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2,
             ignore_dangling_symlinks=False):
    """Recursively copy a directory tree.

    The destination directory must not already exist.
    If exception(s) occur, an Error is raised with a list of reasons.

    If the optional symlinks flag is true, symbolic links in the
    source tree result in symbolic links in the destination tree; if
    it is false, the contents of the files pointed to by symbolic
    links are copied. If the file pointed by the symlink doesn't
    exist, an exception will be added in the list of errors raised in
    an Error exception at the end of the copy process.

    You can set the optional ignore_dangling_symlinks flag to true if you
    want to silence this exception. Notice that this has no effect on
    platforms that don't support os.symlink.

    The optional ignore argument is a callable. If given, it
    is called with the `src` parameter, which is the directory
    being visited by copytree(), and `names` which is the list of
    `src` contents, as returned by os.listdir():

        callable(src, names) -> ignored_names

    Since copytree() is called recursively, the callable will be
    called once for each directory that is copied. It returns a
    list of names relative to the `src` directory that should
    not be copied.

    The optional copy_function argument is a callable that will be used
    to copy each file. It will be called with the source path and the
    destination path as arguments. By default, copy2() is used, but any
    function that supports the same signature (like copy()) can be used.

    """
    names = os.listdir(src)
    if ignore is not None:
        ignored_names = ignore(src, names)
    else:
        ignored_names = set()

    os.makedirs(dst)
    errors = []
    for name in names:
        if name in ignored_names:
            continue
        srcname = os.path.join(src, name)
        dstname = os.path.join(dst, name)
        try:
            if os.path.islink(srcname):
                linkto = os.readlink(srcname)
                if symlinks:
                    os.symlink(linkto, dstname)
                else:
                    # ignore dangling symlink if the flag is on
                    if not os.path.exists(linkto) and ignore_dangling_symlinks:
                        continue
                    # otherwise let the copy occurs. copy2 will raise an error
                    copy_function(srcname, dstname)
            elif os.path.isdir(srcname):
                copytree(srcname, dstname, symlinks, ignore, copy_function)
            else:
                # Will raise a SpecialFileError for unsupported file types
                copy_function(srcname, dstname)
        # catch the Error from the recursive copytree so that we can
        # continue with other files
        except Error as err:
            errors.extend(err.args[0])
        except EnvironmentError as why:
            errors.append((srcname, dstname, str(why)))
    try:
        copystat(src, dst)
    except OSError as why:
        if WindowsError is not None and isinstance(why, WindowsError):
            # Copying file access times may fail on Windows
            pass
        else:
            errors.extend((src, dst, str(why)))
    if errors:
        raise Error(errors)

def rmtree(path, ignore_errors=False, onerror=None):
    """Recursively delete a directory tree.

    If ignore_errors is set, errors are ignored; otherwise, if onerror
    is set, it is called to handle the error with arguments (func,
    path, exc_info) where func is os.listdir, os.remove, or os.rmdir;
    path is the argument to that function that caused it to fail; and
    exc_info is a tuple returned by sys.exc_info().  If ignore_errors
    is false and onerror is None, an exception is raised.

    """
    if ignore_errors:
        def onerror(*args):
            pass
    elif onerror is None:
        def onerror(*args):
            raise
    try:
        if os.path.islink(path):
            # symlinks to directories are forbidden, see bug #1669
            raise OSError("Cannot call rmtree on a symbolic link")
    except OSError:
        onerror(os.path.islink, path, sys.exc_info())
        # can't continue even if onerror hook returns
        return
    names = []
    try:
        names = os.listdir(path)
    except os.error:
        onerror(os.listdir, path, sys.exc_info())
    for name in names:
        fullname = os.path.join(path, name)
        try:
            mode = os.lstat(fullname).st_mode
        except os.error:
            mode = 0
        if stat.S_ISDIR(mode):
            rmtree(fullname, ignore_errors, onerror)
        else:
            try:
                os.remove(fullname)
            except os.error:
                onerror(os.remove, fullname, sys.exc_info())
    try:
        os.rmdir(path)
    except os.error:
        onerror(os.rmdir, path, sys.exc_info())


def _basename(path):
    # A basename() variant which first strips the trailing slash, if present.
    # Thus we always get the last component of the path, even for directories.
    return os.path.basename(path.rstrip(os.path.sep))

def move(src, dst):
    """Recursively move a file or directory to another location. This is
    similar to the Unix "mv" command.

    If the destination is a directory or a symlink to a directory, the source
    is moved inside the directory. The destination path must not already
    exist.

    If the destination already exists but is not a directory, it may be
    overwritten depending on os.rename() semantics.

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed.
    A lot more could be done here...  A look at a mv.c shows a lot of
    the issues this implementation glosses over.

    """
    real_dst = dst
    if os.path.isdir(dst):
        if _samefile(src, dst):
            # We might be on a case insensitive filesystem,
            # perform the rename anyway.
            os.rename(src, dst)
            return

        real_dst = os.path.join(dst, _basename(src))
        if os.path.exists(real_dst):
            raise Error("Destination path '%s' already exists" % real_dst)
    try:
        os.rename(src, real_dst)
    except OSError:
        if os.path.isdir(src):
            if _destinsrc(src, dst):
                raise Error("Cannot move a directory '%s' into itself '%s'." % (src, dst))
            copytree(src, real_dst, symlinks=True)
            rmtree(src)
        else:
            copy2(src, real_dst)
            os.unlink(src)

def _destinsrc(src, dst):
    src = abspath(src)
    dst = abspath(dst)
    if not src.endswith(os.path.sep):
        src += os.path.sep
    if not dst.endswith(os.path.sep):
        dst += os.path.sep
    return dst.startswith(src)

def _get_gid(name):
    """Returns a gid, given a group name."""
    if getgrnam is None or name is None:
        return None
    try:
        result = getgrnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None

def _get_uid(name):
    """Returns an uid, given a user name."""
    if getpwnam is None or name is None:
        return None
    try:
        result = getpwnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None

def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
                  owner=None, group=None, logger=None):
    """Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", or None.

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_name' +  ".tar", possibly plus
    the appropriate compression extension (".gz", or ".bz2").

    Returns the output filename.
    """
    tar_compression = {'gzip': 'gz', None: ''}
    compress_ext = {'gzip': '.gz'}

    if _BZ2_SUPPORTED:
        tar_compression['bzip2'] = 'bz2'
        compress_ext['bzip2'] = '.bz2'

    # flags for compression program, each element of list will be an argument
    if compress is not None and compress not in compress_ext:
        raise ValueError("bad value for 'compress', or compression format not "
                         "supported : {0}".format(compress))

    archive_name = base_name + '.tar' + compress_ext.get(compress, '')
    archive_dir = os.path.dirname(archive_name)

    if not os.path.exists(archive_dir):
        if logger is not None:
            logger.info("creating %s", archive_dir)
        if not dry_run:
            os.makedirs(archive_dir)

    # creating the tarball
    if logger is not None:
        logger.info('Creating tar archive')

    uid = _get_uid(owner)
    gid = _get_gid(group)

    def _set_uid_gid(tarinfo):
        if gid is not None:
            tarinfo.gid = gid
            tarinfo.gname = group
        if uid is not None:
            tarinfo.uid = uid
            tarinfo.uname = owner
        return tarinfo

    if not dry_run:
        tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress])
        try:
            tar.add(base_dir, filter=_set_uid_gid)
        finally:
            tar.close()

    return archive_name

def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False):
    # XXX see if we want to keep an external call here
    if verbose:
        zipoptions = "-r"
    else:
        zipoptions = "-rq"
    from distutils.errors import DistutilsExecError
    from distutils.spawn import spawn
    try:
        spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run)
    except DistutilsExecError:
        # XXX really should distinguish between "couldn't find
        # external 'zip' command" and "zip failed".
        raise ExecError("unable to create zip file '%s': "
            "could neither import the 'zipfile' module nor "
            "find a standalone zip utility") % zip_filename

def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
    """Create a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises ExecError.  Returns the name of the output zip
    file.
    """
    zip_filename = base_name + ".zip"
    archive_dir = os.path.dirname(base_name)

    if not os.path.exists(archive_dir):
        if logger is not None:
            logger.info("creating %s", archive_dir)
        if not dry_run:
            os.makedirs(archive_dir)

    # If zipfile module is not available, try spawning an external 'zip'
    # command.
    try:
        import zipfile
    except ImportError:
        zipfile = None

    if zipfile is None:
        _call_external_zip(base_dir, zip_filename, verbose, dry_run)
    else:
        if logger is not None:
            logger.info("creating '%s' and adding '%s' to it",
                        zip_filename, base_dir)

        if not dry_run:
            zip = zipfile.ZipFile(zip_filename, "w",
                                  compression=zipfile.ZIP_DEFLATED)

            for dirpath, dirnames, filenames in os.walk(base_dir):
                for name in filenames:
                    path = os.path.normpath(os.path.join(dirpath, name))
                    if os.path.isfile(path):
                        zip.write(path, path)
                        if logger is not None:
                            logger.info("adding '%s'", path)
            zip.close()

    return zip_filename

_ARCHIVE_FORMATS = {
    'gztar': (_make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
    'bztar': (_make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
    'tar':   (_make_tarball, [('compress', None)], "uncompressed tar file"),
    'zip':   (_make_zipfile, [], "ZIP file"),
    }

if _BZ2_SUPPORTED:
    _ARCHIVE_FORMATS['bztar'] = (_make_tarball, [('compress', 'bzip2')],
                                "bzip2'ed tar-file")

def get_archive_formats():
    """Returns a list of supported formats for archiving and unarchiving.

    Each element of the returned sequence is a tuple (name, description)
    """
    formats = [(name, registry[2]) for name, registry in
               _ARCHIVE_FORMATS.items()]
    formats.sort()
    return formats

def register_archive_format(name, function, extra_args=None, description=''):
    """Registers an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    """
    if extra_args is None:
        extra_args = []
    if not isinstance(function, collections.Callable):
        raise TypeError('The %s object is not callable' % function)
    if not isinstance(extra_args, (tuple, list)):
        raise TypeError('extra_args needs to be a sequence')
    for element in extra_args:
        if not isinstance(element, (tuple, list)) or len(element) !=2:
            raise TypeError('extra_args elements are : (arg_name, value)')

    _ARCHIVE_FORMATS[name] = (function, extra_args, description)

def unregister_archive_format(name):
    del _ARCHIVE_FORMATS[name]

def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
                 dry_run=0, owner=None, group=None, logger=None):
    """Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "bztar"
    or "gztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    """
    save_cwd = os.getcwd()
    if root_dir is not None:
        if logger is not None:
            logger.debug("changing into '%s'", root_dir)
        base_name = os.path.abspath(base_name)
        if not dry_run:
            os.chdir(root_dir)

    if base_dir is None:
        base_dir = os.curdir

    kwargs = {'dry_run': dry_run, 'logger': logger}

    try:
        format_info = _ARCHIVE_FORMATS[format]
    except KeyError:
        raise ValueError("unknown archive format '%s'" % format)

    func = format_info[0]
    for arg, val in format_info[1]:
        kwargs[arg] = val

    if format != 'zip':
        kwargs['owner'] = owner
        kwargs['group'] = group

    try:
        filename = func(base_name, base_dir, **kwargs)
    finally:
        if root_dir is not None:
            if logger is not None:
                logger.debug("changing back to '%s'", save_cwd)
            os.chdir(save_cwd)

    return filename


def get_unpack_formats():
    """Returns a list of supported formats for unpacking.

    Each element of the returned sequence is a tuple
    (name, extensions, description)
    """
    formats = [(name, info[0], info[3]) for name, info in
               _UNPACK_FORMATS.items()]
    formats.sort()
    return formats

def _check_unpack_options(extensions, function, extra_args):
    """Checks what gets registered as an unpacker."""
    # first make sure no other unpacker is registered for this extension
    existing_extensions = {}
    for name, info in _UNPACK_FORMATS.items():
        for ext in info[0]:
            existing_extensions[ext] = name

    for extension in extensions:
        if extension in existing_extensions:
            msg = '%s is already registered for "%s"'
            raise RegistryError(msg % (extension,
                                       existing_extensions[extension]))

    if not isinstance(function, collections.Callable):
        raise TypeError('The registered function must be a callable')


def register_unpack_format(name, extensions, function, extra_args=None,
                           description=''):
    """Registers an unpack format.

    `name` is the name of the format. `extensions` is a list of extensions
    corresponding to the format.

    `function` is the callable that will be
    used to unpack archives. The callable will receive archives to unpack.
    If it's unable to handle an archive, it needs to raise a ReadError
    exception.

    If provided, `extra_args` is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_unpack_formats() function.
    """
    if extra_args is None:
        extra_args = []
    _check_unpack_options(extensions, function, extra_args)
    _UNPACK_FORMATS[name] = extensions, function, extra_args, description

def unregister_unpack_format(name):
    """Removes the pack format from the registery."""
    del _UNPACK_FORMATS[name]

def _ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    if not os.path.isdir(dirname):
        os.makedirs(dirname)

def _unpack_zipfile(filename, extract_dir):
    """Unpack zip `filename` to `extract_dir`
    """
    try:
        import zipfile
    except ImportError:
        raise ReadError('zlib not supported, cannot unpack this archive.')

    if not zipfile.is_zipfile(filename):
        raise ReadError("%s is not a zip file" % filename)

    zip = zipfile.ZipFile(filename)
    try:
        for info in zip.infolist():
            name = info.filename

            # don't extract absolute paths or ones with .. in them
            if name.startswith('/') or '..' in name:
                continue

            target = os.path.join(extract_dir, *name.split('/'))
            if not target:
                continue

            _ensure_directory(target)
            if not name.endswith('/'):
                # file
                data = zip.read(info.filename)
                f = open(target, 'wb')
                try:
                    f.write(data)
                finally:
                    f.close()
                    del data
    finally:
        zip.close()

def _unpack_tarfile(filename, extract_dir):
    """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`
    """
    try:
        tarobj = tarfile.open(filename)
    except tarfile.TarError:
        raise ReadError(
            "%s is not a compressed or uncompressed tar file" % filename)
    try:
        tarobj.extractall(extract_dir)
    finally:
        tarobj.close()

_UNPACK_FORMATS = {
    'gztar': (['.tar.gz', '.tgz'], _unpack_tarfile, [], "gzip'ed tar-file"),
    'tar':   (['.tar'], _unpack_tarfile, [], "uncompressed tar file"),
    'zip':   (['.zip'], _unpack_zipfile, [], "ZIP file")
    }

if _BZ2_SUPPORTED:
    _UNPACK_FORMATS['bztar'] = (['.bz2'], _unpack_tarfile, [],
                                "bzip2'ed tar-file")

def _find_unpack_format(filename):
    for name, info in _UNPACK_FORMATS.items():
        for extension in info[0]:
            if filename.endswith(extension):
                return name
    return None

def unpack_archive(filename, extract_dir=None, format=None):
    """Unpack an archive.

    `filename` is the name of the archive.

    `extract_dir` is the name of the target directory, where the archive
    is unpacked. If not provided, the current working directory is used.

    `format` is the archive format: one of "zip", "tar", or "gztar". Or any
    other registered format. If not provided, unpack_archive will use the
    filename extension and see if an unpacker was registered for that
    extension.

    In case none is found, a ValueError is raised.
    """
    if extract_dir is None:
        extract_dir = os.getcwd()

    if format is not None:
        try:
            format_info = _UNPACK_FORMATS[format]
        except KeyError:
            raise ValueError("Unknown unpack format '{0}'".format(format))

        func = format_info[1]
        func(filename, extract_dir, **dict(format_info[2]))
    else:
        # we need to look at the registered unpackers supported extensions
        format = _find_unpack_format(filename)
        if format is None:
            raise ReadError("Unknown archive format '{0}'".format(filename))

        func = _UNPACK_FORMATS[format][1]
        kwargs = dict(_UNPACK_FORMATS[format][2])
        func(filename, extract_dir, **kwargs)
python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py000064400000064516151735047430021257 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Access to Python's configuration information."""

import codecs
import os
import re
import sys
from os.path import pardir, realpath
try:
    import configparser
except ImportError:
    import ConfigParser as configparser


__all__ = [
    'get_config_h_filename',
    'get_config_var',
    'get_config_vars',
    'get_makefile_filename',
    'get_path',
    'get_path_names',
    'get_paths',
    'get_platform',
    'get_python_version',
    'get_scheme_names',
    'parse_config_h',
]


def _safe_realpath(path):
    try:
        return realpath(path)
    except OSError:
        return path


if sys.executable:
    _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
else:
    # sys.executable can be empty if argv[0] has been changed and Python is
    # unable to retrieve the real program name
    _PROJECT_BASE = _safe_realpath(os.getcwd())

if os.name == "nt" and "pcbuild" in _PROJECT_BASE[-8:].lower():
    _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir))
# PC/VS7.1
if os.name == "nt" and "\\pc\\v" in _PROJECT_BASE[-10:].lower():
    _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))
# PC/AMD64
if os.name == "nt" and "\\pcbuild\\amd64" in _PROJECT_BASE[-14:].lower():
    _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))


def is_python_build():
    for fn in ("Setup.dist", "Setup.local"):
        if os.path.isfile(os.path.join(_PROJECT_BASE, "Modules", fn)):
            return True
    return False

_PYTHON_BUILD = is_python_build()

_cfg_read = False

def _ensure_cfg_read():
    global _cfg_read
    if not _cfg_read:
        from ..resources import finder
        backport_package = __name__.rsplit('.', 1)[0]
        _finder = finder(backport_package)
        _cfgfile = _finder.find('sysconfig.cfg')
        assert _cfgfile, 'sysconfig.cfg exists'
        with _cfgfile.as_stream() as s:
            _SCHEMES.readfp(s)
        if _PYTHON_BUILD:
            for scheme in ('posix_prefix', 'posix_home'):
                _SCHEMES.set(scheme, 'include', '{srcdir}/Include')
                _SCHEMES.set(scheme, 'platinclude', '{projectbase}/.')

        _cfg_read = True


_SCHEMES = configparser.RawConfigParser()
_VAR_REPL = re.compile(r'\{([^{]*?)\}')

def _expand_globals(config):
    _ensure_cfg_read()
    if config.has_section('globals'):
        globals = config.items('globals')
    else:
        globals = tuple()

    sections = config.sections()
    for section in sections:
        if section == 'globals':
            continue
        for option, value in globals:
            if config.has_option(section, option):
                continue
            config.set(section, option, value)
    config.remove_section('globals')

    # now expanding local variables defined in the cfg file
    #
    for section in config.sections():
        variables = dict(config.items(section))

        def _replacer(matchobj):
            name = matchobj.group(1)
            if name in variables:
                return variables[name]
            return matchobj.group(0)

        for option, value in config.items(section):
            config.set(section, option, _VAR_REPL.sub(_replacer, value))

#_expand_globals(_SCHEMES)

 # FIXME don't rely on sys.version here, its format is an implementation detail
 # of CPython, use sys.version_info or sys.hexversion
_PY_VERSION = sys.version.split()[0]
_PY_VERSION_SHORT = sys.version[:3]
_PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2]
_PREFIX = os.path.normpath(sys.prefix)
_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
_CONFIG_VARS = None
_USER_BASE = None


def _subst_vars(path, local_vars):
    """In the string `path`, replace tokens like {some.thing} with the
    corresponding value from the map `local_vars`.

    If there is no corresponding value, leave the token unchanged.
    """
    def _replacer(matchobj):
        name = matchobj.group(1)
        if name in local_vars:
            return local_vars[name]
        elif name in os.environ:
            return os.environ[name]
        return matchobj.group(0)
    return _VAR_REPL.sub(_replacer, path)


def _extend_dict(target_dict, other_dict):
    target_keys = target_dict.keys()
    for key, value in other_dict.items():
        if key in target_keys:
            continue
        target_dict[key] = value


def _expand_vars(scheme, vars):
    res = {}
    if vars is None:
        vars = {}
    _extend_dict(vars, get_config_vars())

    for key, value in _SCHEMES.items(scheme):
        if os.name in ('posix', 'nt'):
            value = os.path.expanduser(value)
        res[key] = os.path.normpath(_subst_vars(value, vars))
    return res


def format_value(value, vars):
    def _replacer(matchobj):
        name = matchobj.group(1)
        if name in vars:
            return vars[name]
        return matchobj.group(0)
    return _VAR_REPL.sub(_replacer, value)


def _get_default_scheme():
    if os.name == 'posix':
        # the default scheme for posix is posix_prefix
        return 'posix_prefix'
    return os.name


def _getuserbase():
    env_base = os.environ.get("PYTHONUSERBASE", None)

    def joinuser(*args):
        return os.path.expanduser(os.path.join(*args))

    # what about 'os2emx', 'riscos' ?
    if os.name == "nt":
        base = os.environ.get("APPDATA") or "~"
        if env_base:
            return env_base
        else:
            return joinuser(base, "Python")

    if sys.platform == "darwin":
        framework = get_config_var("PYTHONFRAMEWORK")
        if framework:
            if env_base:
                return env_base
            else:
                return joinuser("~", "Library", framework, "%d.%d" %
                                sys.version_info[:2])

    if env_base:
        return env_base
    else:
        return joinuser("~", ".local")


def _parse_makefile(filename, vars=None):
    """Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    # Regexes needed for parsing Makefile (and similar syntaxes,
    # like old-style Setup files).
    _variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
    _findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
    _findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")

    if vars is None:
        vars = {}
    done = {}
    notdone = {}

    with codecs.open(filename, encoding='utf-8', errors="surrogateescape") as f:
        lines = f.readlines()

    for line in lines:
        if line.startswith('#') or line.strip() == '':
            continue
        m = _variable_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            v = v.strip()
            # `$$' is a literal `$' in make
            tmpv = v.replace('$$', '')

            if "$" in tmpv:
                notdone[n] = v
            else:
                try:
                    v = int(v)
                except ValueError:
                    # insert literal `$'
                    done[n] = v.replace('$$', '$')
                else:
                    done[n] = v

    # do variable interpolation here
    variables = list(notdone.keys())

    # Variables with a 'PY_' prefix in the makefile. These need to
    # be made available without that prefix through sysconfig.
    # Special care is needed to ensure that variable expansion works, even
    # if the expansion uses the name without a prefix.
    renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')

    while len(variables) > 0:
        for name in tuple(variables):
            value = notdone[name]
            m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
            if m is not None:
                n = m.group(1)
                found = True
                if n in done:
                    item = str(done[n])
                elif n in notdone:
                    # get it on a subsequent round
                    found = False
                elif n in os.environ:
                    # do it like make: fall back to environment
                    item = os.environ[n]

                elif n in renamed_variables:
                    if (name.startswith('PY_') and
                        name[3:] in renamed_variables):
                        item = ""

                    elif 'PY_' + n in notdone:
                        found = False

                    else:
                        item = str(done['PY_' + n])

                else:
                    done[n] = item = ""

                if found:
                    after = value[m.end():]
                    value = value[:m.start()] + item + after
                    if "$" in after:
                        notdone[name] = value
                    else:
                        try:
                            value = int(value)
                        except ValueError:
                            done[name] = value.strip()
                        else:
                            done[name] = value
                        variables.remove(name)

                        if (name.startswith('PY_') and
                            name[3:] in renamed_variables):

                            name = name[3:]
                            if name not in done:
                                done[name] = value

            else:
                # bogus variable reference (e.g. "prefix=$/opt/python");
                # just drop it since we can't deal
                done[name] = value
                variables.remove(name)

    # strip spurious spaces
    for k, v in done.items():
        if isinstance(v, str):
            done[k] = v.strip()

    # save the results in the global dictionary
    vars.update(done)
    return vars


def get_makefile_filename():
    """Return the path of the Makefile."""
    if _PYTHON_BUILD:
        return os.path.join(_PROJECT_BASE, "Makefile")
    if hasattr(sys, 'abiflags'):
        config_dir_name = 'config-%s%s' % (_PY_VERSION_SHORT, sys.abiflags)
    else:
        config_dir_name = 'config'
    return os.path.join(get_path('stdlib'), config_dir_name, 'Makefile')


def _init_posix(vars):
    """Initialize the module as appropriate for POSIX systems."""
    # load the installed Makefile:
    makefile = get_makefile_filename()
    try:
        _parse_makefile(makefile, vars)
    except IOError as e:
        msg = "invalid Python installation: unable to open %s" % makefile
        if hasattr(e, "strerror"):
            msg = msg + " (%s)" % e.strerror
        raise IOError(msg)
    # load the installed pyconfig.h:
    config_h = get_config_h_filename()
    try:
        with open(config_h) as f:
            parse_config_h(f, vars)
    except IOError as e:
        msg = "invalid Python installation: unable to open %s" % config_h
        if hasattr(e, "strerror"):
            msg = msg + " (%s)" % e.strerror
        raise IOError(msg)
    # On AIX, there are wrong paths to the linker scripts in the Makefile
    # -- these paths are relative to the Python source, but when installed
    # the scripts are in another directory.
    if _PYTHON_BUILD:
        vars['LDSHARED'] = vars['BLDSHARED']


def _init_non_posix(vars):
    """Initialize the module as appropriate for NT"""
    # set basic install directories
    vars['LIBDEST'] = get_path('stdlib')
    vars['BINLIBDEST'] = get_path('platstdlib')
    vars['INCLUDEPY'] = get_path('include')
    vars['SO'] = '.pyd'
    vars['EXE'] = '.exe'
    vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
    vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))

#
# public APIs
#


def parse_config_h(fp, vars=None):
    """Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    if vars is None:
        vars = {}
    define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n")
    undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n")

    while True:
        line = fp.readline()
        if not line:
            break
        m = define_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            try:
                v = int(v)
            except ValueError:
                pass
            vars[n] = v
        else:
            m = undef_rx.match(line)
            if m:
                vars[m.group(1)] = 0
    return vars


def get_config_h_filename():
    """Return the path of pyconfig.h."""
    if _PYTHON_BUILD:
        if os.name == "nt":
            inc_dir = os.path.join(_PROJECT_BASE, "PC")
        else:
            inc_dir = _PROJECT_BASE
    else:
        inc_dir = get_path('platinclude')
    return os.path.join(inc_dir, 'pyconfig.h')


def get_scheme_names():
    """Return a tuple containing the schemes names."""
    return tuple(sorted(_SCHEMES.sections()))


def get_path_names():
    """Return a tuple containing the paths names."""
    # xxx see if we want a static list
    return _SCHEMES.options('posix_prefix')


def get_paths(scheme=_get_default_scheme(), vars=None, expand=True):
    """Return a mapping containing an install scheme.

    ``scheme`` is the install scheme name. If not provided, it will
    return the default scheme for the current platform.
    """
    _ensure_cfg_read()
    if expand:
        return _expand_vars(scheme, vars)
    else:
        return dict(_SCHEMES.items(scheme))


def get_path(name, scheme=_get_default_scheme(), vars=None, expand=True):
    """Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    """
    return get_paths(scheme, vars, expand)[name]


def get_config_vars(*args):
    """With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.

    On Unix, this means every variable defined in Python's installed Makefile;
    On Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    """
    global _CONFIG_VARS
    if _CONFIG_VARS is None:
        _CONFIG_VARS = {}
        # Normalized versions of prefix and exec_prefix are handy to have;
        # in fact, these are the standard versions used most places in the
        # distutils2 module.
        _CONFIG_VARS['prefix'] = _PREFIX
        _CONFIG_VARS['exec_prefix'] = _EXEC_PREFIX
        _CONFIG_VARS['py_version'] = _PY_VERSION
        _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT
        _CONFIG_VARS['py_version_nodot'] = _PY_VERSION[0] + _PY_VERSION[2]
        _CONFIG_VARS['base'] = _PREFIX
        _CONFIG_VARS['platbase'] = _EXEC_PREFIX
        _CONFIG_VARS['projectbase'] = _PROJECT_BASE
        try:
            _CONFIG_VARS['abiflags'] = sys.abiflags
        except AttributeError:
            # sys.abiflags may not be defined on all platforms.
            _CONFIG_VARS['abiflags'] = ''

        if os.name in ('nt', 'os2'):
            _init_non_posix(_CONFIG_VARS)
        if os.name == 'posix':
            _init_posix(_CONFIG_VARS)
        # Setting 'userbase' is done below the call to the
        # init function to enable using 'get_config_var' in
        # the init-function.
        if sys.version >= '2.6':
            _CONFIG_VARS['userbase'] = _getuserbase()

        if 'srcdir' not in _CONFIG_VARS:
            _CONFIG_VARS['srcdir'] = _PROJECT_BASE
        else:
            _CONFIG_VARS['srcdir'] = _safe_realpath(_CONFIG_VARS['srcdir'])

        # Convert srcdir into an absolute path if it appears necessary.
        # Normally it is relative to the build directory.  However, during
        # testing, for example, we might be running a non-installed python
        # from a different directory.
        if _PYTHON_BUILD and os.name == "posix":
            base = _PROJECT_BASE
            try:
                cwd = os.getcwd()
            except OSError:
                cwd = None
            if (not os.path.isabs(_CONFIG_VARS['srcdir']) and
                base != cwd):
                # srcdir is relative and we are not in the same directory
                # as the executable. Assume executable is in the build
                # directory and make srcdir absolute.
                srcdir = os.path.join(base, _CONFIG_VARS['srcdir'])
                _CONFIG_VARS['srcdir'] = os.path.normpath(srcdir)

        if sys.platform == 'darwin':
            kernel_version = os.uname()[2]  # Kernel version (8.4.3)
            major_version = int(kernel_version.split('.')[0])

            if major_version < 8:
                # On Mac OS X before 10.4, check if -arch and -isysroot
                # are in CFLAGS or LDFLAGS and remove them if they are.
                # This is needed when building extensions on a 10.3 system
                # using a universal build of python.
                for key in ('LDFLAGS', 'BASECFLAGS',
                        # a number of derived variables. These need to be
                        # patched up as well.
                        'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
                    flags = _CONFIG_VARS[key]
                    flags = re.sub('-arch\s+\w+\s', ' ', flags)
                    flags = re.sub('-isysroot [^ \t]*', ' ', flags)
                    _CONFIG_VARS[key] = flags
            else:
                # Allow the user to override the architecture flags using
                # an environment variable.
                # NOTE: This name was introduced by Apple in OSX 10.5 and
                # is used by several scripting languages distributed with
                # that OS release.
                if 'ARCHFLAGS' in os.environ:
                    arch = os.environ['ARCHFLAGS']
                    for key in ('LDFLAGS', 'BASECFLAGS',
                        # a number of derived variables. These need to be
                        # patched up as well.
                        'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):

                        flags = _CONFIG_VARS[key]
                        flags = re.sub('-arch\s+\w+\s', ' ', flags)
                        flags = flags + ' ' + arch
                        _CONFIG_VARS[key] = flags

                # If we're on OSX 10.5 or later and the user tries to
                # compiles an extension using an SDK that is not present
                # on the current machine it is better to not use an SDK
                # than to fail.
                #
                # The major usecase for this is users using a Python.org
                # binary installer  on OSX 10.6: that installer uses
                # the 10.4u SDK, but that SDK is not installed by default
                # when you install Xcode.
                #
                CFLAGS = _CONFIG_VARS.get('CFLAGS', '')
                m = re.search('-isysroot\s+(\S+)', CFLAGS)
                if m is not None:
                    sdk = m.group(1)
                    if not os.path.exists(sdk):
                        for key in ('LDFLAGS', 'BASECFLAGS',
                             # a number of derived variables. These need to be
                             # patched up as well.
                            'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):

                            flags = _CONFIG_VARS[key]
                            flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags)
                            _CONFIG_VARS[key] = flags

    if args:
        vals = []
        for name in args:
            vals.append(_CONFIG_VARS.get(name))
        return vals
    else:
        return _CONFIG_VARS


def get_config_var(name):
    """Return the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    """
    return get_config_vars().get(name)


def get_platform():
    """Return a string that identifies the current platform.

    This is used mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    """
    if os.name == 'nt':
        # sniff sys.version for architecture.
        prefix = " bit ("
        i = sys.version.find(prefix)
        if i == -1:
            return sys.platform
        j = sys.version.find(")", i)
        look = sys.version[i+len(prefix):j].lower()
        if look == 'amd64':
            return 'win-amd64'
        if look == 'itanium':
            return 'win-ia64'
        return sys.platform

    if os.name != "posix" or not hasattr(os, 'uname'):
        # XXX what about the architecture? NT is Intel or Alpha,
        # Mac OS is M68k or PPC, etc.
        return sys.platform

    # Try to distinguish various flavours of Unix
    osname, host, release, version, machine = os.uname()

    # Convert the OS name to lowercase, remove '/' characters
    # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh")
    osname = osname.lower().replace('/', '')
    machine = machine.replace(' ', '_')
    machine = machine.replace('/', '-')

    if osname[:5] == "linux":
        # At least on Linux/Intel, 'machine' is the processor --
        # i386, etc.
        # XXX what about Alpha, SPARC, etc?
        return  "%s-%s" % (osname, machine)
    elif osname[:5] == "sunos":
        if release[0] >= "5":           # SunOS 5 == Solaris 2
            osname = "solaris"
            release = "%d.%s" % (int(release[0]) - 3, release[2:])
        # fall through to standard osname-release-machine representation
    elif osname[:4] == "irix":              # could be "irix64"!
        return "%s-%s" % (osname, release)
    elif osname[:3] == "aix":
        return "%s-%s.%s" % (osname, version, release)
    elif osname[:6] == "cygwin":
        osname = "cygwin"
        rel_re = re.compile(r'[\d.]+')
        m = rel_re.match(release)
        if m:
            release = m.group()
    elif osname[:6] == "darwin":
        #
        # For our purposes, we'll assume that the system version from
        # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set
        # to. This makes the compatibility story a bit more sane because the
        # machine is going to compile and link as if it were
        # MACOSX_DEPLOYMENT_TARGET.
        cfgvars = get_config_vars()
        macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET')

        if True:
            # Always calculate the release of the running machine,
            # needed to determine if we can build fat binaries or not.

            macrelease = macver
            # Get the system version. Reading this plist is a documented
            # way to get the system version (see the documentation for
            # the Gestalt Manager)
            try:
                f = open('/System/Library/CoreServices/SystemVersion.plist')
            except IOError:
                # We're on a plain darwin box, fall back to the default
                # behaviour.
                pass
            else:
                try:
                    m = re.search(r'<key>ProductUserVisibleVersion</key>\s*'
                                  r'<string>(.*?)</string>', f.read())
                finally:
                    f.close()
                if m is not None:
                    macrelease = '.'.join(m.group(1).split('.')[:2])
                # else: fall back to the default behaviour

        if not macver:
            macver = macrelease

        if macver:
            release = macver
            osname = "macosx"

            if ((macrelease + '.') >= '10.4.' and
                '-arch' in get_config_vars().get('CFLAGS', '').strip()):
                # The universal build will build fat binaries, but not on
                # systems before 10.4
                #
                # Try to detect 4-way universal builds, those have machine-type
                # 'universal' instead of 'fat'.

                machine = 'fat'
                cflags = get_config_vars().get('CFLAGS')

                archs = re.findall('-arch\s+(\S+)', cflags)
                archs = tuple(sorted(set(archs)))

                if len(archs) == 1:
                    machine = archs[0]
                elif archs == ('i386', 'ppc'):
                    machine = 'fat'
                elif archs == ('i386', 'x86_64'):
                    machine = 'intel'
                elif archs == ('i386', 'ppc', 'x86_64'):
                    machine = 'fat3'
                elif archs == ('ppc64', 'x86_64'):
                    machine = 'fat64'
                elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'):
                    machine = 'universal'
                else:
                    raise ValueError(
                       "Don't know machine value for archs=%r" % (archs,))

            elif machine == 'i386':
                # On OSX the machine type returned by uname is always the
                # 32-bit variant, even if the executable architecture is
                # the 64-bit variant
                if sys.maxsize >= 2**32:
                    machine = 'x86_64'

            elif machine in ('PowerPC', 'Power_Macintosh'):
                # Pick a sane name for the PPC architecture.
                # See 'i386' case
                if sys.maxsize >= 2**32:
                    machine = 'ppc64'
                else:
                    machine = 'ppc'

    return "%s-%s-%s" % (osname, release, machine)


def get_python_version():
    return _PY_VERSION_SHORT


def _print_dict(title, data):
    for index, (key, value) in enumerate(sorted(data.items())):
        if index == 0:
            print('%s: ' % (title))
        print('\t%s = "%s"' % (key, value))


def _main():
    """Display all information sysconfig detains."""
    print('Platform: "%s"' % get_platform())
    print('Python version: "%s"' % get_python_version())
    print('Current installation scheme: "%s"' % _get_default_scheme())
    print()
    _print_dict('Paths', get_paths())
    print()
    _print_dict('Variables', get_config_vars())


if __name__ == '__main__':
    _main()
python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py000064400000001713151735047430020174 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Backports for individual classes and functions."""

import os
import sys

__all__ = ['cache_from_source', 'callable', 'fsencode']


try:
    from imp import cache_from_source
except ImportError:
    def cache_from_source(py_file, debug=__debug__):
        ext = debug and 'c' or 'o'
        return py_file + ext


try:
    callable = callable
except NameError:
    from collections import Callable

    def callable(obj):
        return isinstance(obj, Callable)


try:
    fsencode = os.fsencode
except AttributeError:
    def fsencode(filename):
        if isinstance(filename, bytes):
            return filename
        elif isinstance(filename, str):
            return filename.encode(sys.getfilesystemencoding())
        else:
            raise TypeError("expect bytes or str, not %s" %
                            type(filename).__name__)
python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg000064400000005071151735047440021356 0ustar00[posix_prefix]
# Configuration directories.  Some of these come straight out of the
# configure script.  They are for implementing the other variables, not to
# be used directly in [resource_locations].
confdir = /etc
datadir = /usr/share
libdir = /usr/lib
statedir = /var
# User resource directory
local = ~/.local/{distribution.name}

stdlib = {base}/lib/python{py_version_short}
platstdlib = {platbase}/lib/python{py_version_short}
purelib = {base}/lib/python{py_version_short}/site-packages
platlib = {platbase}/lib/python{py_version_short}/site-packages
include = {base}/include/python{py_version_short}{abiflags}
platinclude = {platbase}/include/python{py_version_short}{abiflags}
data = {base}

[posix_home]
stdlib = {base}/lib/python
platstdlib = {base}/lib/python
purelib = {base}/lib/python
platlib = {base}/lib/python
include = {base}/include/python
platinclude = {base}/include/python
scripts = {base}/bin
data = {base}

[nt]
stdlib = {base}/Lib
platstdlib = {base}/Lib
purelib = {base}/Lib/site-packages
platlib = {base}/Lib/site-packages
include = {base}/Include
platinclude = {base}/Include
scripts = {base}/Scripts
data = {base}

[os2]
stdlib = {base}/Lib
platstdlib = {base}/Lib
purelib = {base}/Lib/site-packages
platlib = {base}/Lib/site-packages
include = {base}/Include
platinclude = {base}/Include
scripts = {base}/Scripts
data = {base}

[os2_home]
stdlib = {userbase}/lib/python{py_version_short}
platstdlib = {userbase}/lib/python{py_version_short}
purelib = {userbase}/lib/python{py_version_short}/site-packages
platlib = {userbase}/lib/python{py_version_short}/site-packages
include = {userbase}/include/python{py_version_short}
scripts = {userbase}/bin
data = {userbase}

[nt_user]
stdlib = {userbase}/Python{py_version_nodot}
platstdlib = {userbase}/Python{py_version_nodot}
purelib = {userbase}/Python{py_version_nodot}/site-packages
platlib = {userbase}/Python{py_version_nodot}/site-packages
include = {userbase}/Python{py_version_nodot}/Include
scripts = {userbase}/Scripts
data = {userbase}

[posix_user]
stdlib = {userbase}/lib/python{py_version_short}
platstdlib = {userbase}/lib/python{py_version_short}
purelib = {userbase}/lib/python{py_version_short}/site-packages
platlib = {userbase}/lib/python{py_version_short}/site-packages
include = {userbase}/include/python{py_version_short}
scripts = {userbase}/bin
data = {userbase}

[osx_framework_user]
stdlib = {userbase}/lib/python
platstdlib = {userbase}/lib/python
purelib = {userbase}/lib/python/site-packages
platlib = {userbase}/lib/python/site-packages
include = {userbase}/include
scripts = {userbase}/bin
data = {userbase}
python3.4/site-packages/pip/_vendor/distlib/manifest.py000064400000032271151735047440017107 0ustar00# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.
"""
import fnmatch
import logging
import os
import re

from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']

logger = logging.getLogger(__name__)

# a \ followed by some spaces + EOL
_COLLAPSE_PATTERN = re.compile('\\\w*\n', re.M)
_COMMENTED_LINE = re.compile('#.*?(?=\n)|\n(?=$)', re.M | re.S)


class Manifest(object):
    """A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    """

    def __init__(self, base=None):
        """
        Initialise an instance.

        :param base: The base directory to explore under.
        """
        self.base = os.path.abspath(os.path.normpath(base or os.getcwd()))
        self.prefix = self.base + os.sep
        self.allfiles = None
        self.files = set()

    #
    # Public API
    #

    def findall(self):
        """Find all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        """
        from stat import S_ISREG, S_ISDIR, S_ISLNK

        self.allfiles = allfiles = []
        root = self.base
        stack = [root]
        pop = stack.pop
        push = stack.append

        while stack:
            root = pop()
            names = os.listdir(root)

            for name in names:
                fullname = os.path.join(root, name)

                # Avoid excess stat calls -- just one will do, thank you!
                stat = os.stat(fullname)
                mode = stat.st_mode
                if S_ISREG(mode):
                    allfiles.append(fsdecode(fullname))
                elif S_ISDIR(mode) and not S_ISLNK(mode):
                    push(fullname)

    def add(self, item):
        """
        Add a file to the manifest.

        :param item: The pathname to add. This can be relative to the base.
        """
        if not item.startswith(self.prefix):
            item = os.path.join(self.base, item)
        self.files.add(os.path.normpath(item))

    def add_many(self, items):
        """
        Add a list of files to the manifest.

        :param items: The pathnames to add. These can be relative to the base.
        """
        for item in items:
            self.add(item)

    def sorted(self, wantdirs=False):
        """
        Return sorted files in directory order
        """

        def add_dir(dirs, d):
            dirs.add(d)
            logger.debug('add_dir added %s', d)
            if d != self.base:
                parent, _ = os.path.split(d)
                assert parent not in ('', '/')
                add_dir(dirs, parent)

        result = set(self.files)    # make a copy!
        if wantdirs:
            dirs = set()
            for f in result:
                add_dir(dirs, os.path.dirname(f))
            result |= dirs
        return [os.path.join(*path_tuple) for path_tuple in
                sorted(os.path.split(path) for path in result)]

    def clear(self):
        """Clear all collected files."""
        self.files = set()
        self.allfiles = []

    def process_directive(self, directive):
        """
        Process a directive which either adds some files from ``allfiles`` to
        ``files``, or removes some files from ``files``.

        :param directive: The directive to process. This should be in a format
                     compatible with distutils ``MANIFEST.in`` files:

                     http://docs.python.org/distutils/sourcedist.html#commands
        """
        # Parse the line: split it up, make sure the right number of words
        # is there, and return the relevant words.  'action' is always
        # defined: it's the first word of the line.  Which of the other
        # three are defined depends on the action; it'll be either
        # patterns, (dir and patterns), or (dirpattern).
        action, patterns, thedir, dirpattern = self._parse_directive(directive)

        # OK, now we know that the action is valid and we have the
        # right number of words on the line for that action -- so we
        # can proceed with minimal error-checking.
        if action == 'include':
            for pattern in patterns:
                if not self._include_pattern(pattern, anchor=True):
                    logger.warning('no files found matching %r', pattern)

        elif action == 'exclude':
            for pattern in patterns:
                if not self._exclude_pattern(pattern, anchor=True):
                    logger.warning('no previously-included files '
                                   'found matching %r', pattern)

        elif action == 'global-include':
            for pattern in patterns:
                if not self._include_pattern(pattern, anchor=False):
                    logger.warning('no files found matching %r '
                                   'anywhere in distribution', pattern)

        elif action == 'global-exclude':
            for pattern in patterns:
                if not self._exclude_pattern(pattern, anchor=False):
                    logger.warning('no previously-included files '
                                   'matching %r found anywhere in '
                                   'distribution', pattern)

        elif action == 'recursive-include':
            for pattern in patterns:
                if not self._include_pattern(pattern, prefix=thedir):
                    logger.warning('no files found matching %r '
                                   'under directory %r', pattern, thedir)

        elif action == 'recursive-exclude':
            for pattern in patterns:
                if not self._exclude_pattern(pattern, prefix=thedir):
                    logger.warning('no previously-included files '
                                   'matching %r found under directory %r',
                                   pattern, thedir)

        elif action == 'graft':
            if not self._include_pattern(None, prefix=dirpattern):
                logger.warning('no directories found matching %r',
                               dirpattern)

        elif action == 'prune':
            if not self._exclude_pattern(None, prefix=dirpattern):
                logger.warning('no previously-included directories found '
                               'matching %r', dirpattern)
        else:   # pragma: no cover
            # This should never happen, as it should be caught in
            # _parse_template_line
            raise DistlibException(
                'invalid action %r' % action)

    #
    # Private API
    #

    def _parse_directive(self, directive):
        """
        Validate a directive.
        :param directive: The directive to validate.
        :return: A tuple of action, patterns, thedir, dir_patterns
        """
        words = directive.split()
        if len(words) == 1 and words[0] not in ('include', 'exclude',
                                                'global-include',
                                                'global-exclude',
                                                'recursive-include',
                                                'recursive-exclude',
                                                'graft', 'prune'):
            # no action given, let's use the default 'include'
            words.insert(0, 'include')

        action = words[0]
        patterns = thedir = dir_pattern = None

        if action in ('include', 'exclude',
                      'global-include', 'global-exclude'):
            if len(words) < 2:
                raise DistlibException(
                    '%r expects <pattern1> <pattern2> ...' % action)

            patterns = [convert_path(word) for word in words[1:]]

        elif action in ('recursive-include', 'recursive-exclude'):
            if len(words) < 3:
                raise DistlibException(
                    '%r expects <dir> <pattern1> <pattern2> ...' % action)

            thedir = convert_path(words[1])
            patterns = [convert_path(word) for word in words[2:]]

        elif action in ('graft', 'prune'):
            if len(words) != 2:
                raise DistlibException(
                    '%r expects a single <dir_pattern>' % action)

            dir_pattern = convert_path(words[1])

        else:
            raise DistlibException('unknown action %r' % action)

        return action, patterns, thedir, dir_pattern

    def _include_pattern(self, pattern, anchor=True, prefix=None,
                         is_regex=False):
        """Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found.
        """
        # XXX docstring lying about what the special chars are?
        found = False
        pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)

        # delayed loading of allfiles list
        if self.allfiles is None:
            self.findall()

        for name in self.allfiles:
            if pattern_re.search(name):
                self.files.add(name)
                found = True
        return found

    def _exclude_pattern(self, pattern, anchor=True, prefix=None,
                         is_regex=False):
        """Remove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return True if files are
        found.

        This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
        packaging source distributions
        """
        found = False
        pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)
        for f in list(self.files):
            if pattern_re.search(f):
                self.files.remove(f)
                found = True
        return found

    def _translate_pattern(self, pattern, anchor=True, prefix=None,
                           is_regex=False):
        """Translate a shell-like wildcard pattern to a compiled regular
        expression.

        Return the compiled regex.  If 'is_regex' true,
        then 'pattern' is directly compiled to a regex (if it's a string)
        or just returned as-is (assumes it's a regex object).
        """
        if is_regex:
            if isinstance(pattern, str):
                return re.compile(pattern)
            else:
                return pattern

        if pattern:
            pattern_re = self._glob_to_re(pattern)
        else:
            pattern_re = ''

        base = re.escape(os.path.join(self.base, ''))
        if prefix is not None:
            # ditch end of pattern character
            empty_pattern = self._glob_to_re('')
            prefix_re = self._glob_to_re(prefix)[:-len(empty_pattern)]
            sep = os.sep
            if os.sep == '\\':
                sep = r'\\'
            pattern_re = '^' + base + sep.join((prefix_re,
                                                '.*' + pattern_re))
        else:                               # no prefix -- respect anchor flag
            if anchor:
                pattern_re = '^' + base + pattern_re

        return re.compile(pattern_re)

    def _glob_to_re(self, pattern):
        """Translate a shell-like glob pattern to a regular expression.

        Return a string containing the regex.  Differs from
        'fnmatch.translate()' in that '*' does not match "special characters"
        (which are platform-specific).
        """
        pattern_re = fnmatch.translate(pattern)

        # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
        # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
        # and by extension they shouldn't match such "special characters" under
        # any OS.  So change all non-escaped dots in the RE to match any
        # character except the special characters (currently: just os.sep).
        sep = os.sep
        if os.sep == '\\':
            # we're using a regex to manipulate a regex, so we need
            # to escape the backslash twice
            sep = r'\\\\'
        escaped = r'\1[^%s]' % sep
        pattern_re = re.sub(r'((?<!\\)(\\\\)*)\.', escaped, pattern_re)
        return pattern_re
python3.4/site-packages/pip/_vendor/distlib/util.py000064400000144036151735047440016261 0ustar00#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import codecs
from collections import deque
import contextlib
import csv
from glob import iglob as std_iglob
import io
import json
import logging
import os
import py_compile
import re
import shutil
import socket
import ssl
import subprocess
import sys
import tarfile
import tempfile
try:
    import threading
except ImportError:
    import dummy_threading as threading
import time

from . import DistlibException
from .compat import (string_types, text_type, shutil, raw_input, StringIO,
                     cache_from_source, urlopen, httplib, xmlrpclib, splittype,
                     HTTPHandler, HTTPSHandler as BaseHTTPSHandler,
                     BaseConfigurator, valid_ident, Container, configparser,
                     URLError, match_hostname, CertificateError, ZipFile)

logger = logging.getLogger(__name__)

#
# Requirement parsing code for name + optional constraints + optional extras
#
# e.g. 'foo >= 1.2, < 2.0 [bar, baz]'
#
# The regex can seem a bit hairy, so we build it up out of smaller pieces
# which are manageable.
#

COMMA = r'\s*,\s*'
COMMA_RE = re.compile(COMMA)

IDENT = r'(\w|[.-])+'
EXTRA_IDENT = r'(\*|:(\*|\w+):|' + IDENT + ')'
VERSPEC = IDENT + r'\*?'

RELOP = '([<>=!~]=)|[<>]'

#
# The first relop is optional - if absent, will be taken as '~='
#
BARE_CONSTRAINTS = ('(' + RELOP + r')?\s*(' + VERSPEC + ')(' + COMMA + '(' +
                    RELOP + r')\s*(' + VERSPEC + '))*')

DIRECT_REF = '(from\s+(?P<diref>.*))'

#
# Either the bare constraints or the bare constraints in parentheses
#
CONSTRAINTS = (r'\(\s*(?P<c1>' + BARE_CONSTRAINTS + '|' + DIRECT_REF +
               r')\s*\)|(?P<c2>' + BARE_CONSTRAINTS + '\s*)')

EXTRA_LIST = EXTRA_IDENT + '(' + COMMA + EXTRA_IDENT + ')*'
EXTRAS = r'\[\s*(?P<ex>' + EXTRA_LIST + r')?\s*\]'
REQUIREMENT = ('(?P<dn>'  + IDENT + r')\s*(' + EXTRAS + r'\s*)?(\s*' +
               CONSTRAINTS + ')?$')
REQUIREMENT_RE = re.compile(REQUIREMENT)

#
# Used to scan through the constraints
#
RELOP_IDENT = '(?P<op>' + RELOP + r')\s*(?P<vn>' + VERSPEC + ')'
RELOP_IDENT_RE = re.compile(RELOP_IDENT)

def parse_requirement(s):

    def get_constraint(m):
        d = m.groupdict()
        return d['op'], d['vn']

    result = None
    m = REQUIREMENT_RE.match(s)
    if m:
        d = m.groupdict()
        name = d['dn']
        cons = d['c1'] or d['c2']
        if not d['diref']:
            url = None
        else:
            # direct reference
            cons = None
            url = d['diref'].strip()
        if not cons:
            cons = None
            constr = ''
            rs = d['dn']
        else:
            if cons[0] not in '<>!=':
                cons = '~=' + cons
            iterator = RELOP_IDENT_RE.finditer(cons)
            cons = [get_constraint(m) for m in iterator]
            rs = '%s (%s)' % (name, ', '.join(['%s %s' % con for con in cons]))
        if not d['ex']:
            extras = None
        else:
            extras = COMMA_RE.split(d['ex'])
        result = Container(name=name, constraints=cons, extras=extras,
                           requirement=rs, source=s, url=url)
    return result


def get_resources_dests(resources_root, rules):
    """Find destinations for resources files"""

    def get_rel_path(base, path):
        # normalizes and returns a lstripped-/-separated path
        base = base.replace(os.path.sep, '/')
        path = path.replace(os.path.sep, '/')
        assert path.startswith(base)
        return path[len(base):].lstrip('/')


    destinations = {}
    for base, suffix, dest in rules:
        prefix = os.path.join(resources_root, base)
        for abs_base in iglob(prefix):
            abs_glob = os.path.join(abs_base, suffix)
            for abs_path in iglob(abs_glob):
                resource_file = get_rel_path(resources_root, abs_path)
                if dest is None:  # remove the entry if it was here
                    destinations.pop(resource_file, None)
                else:
                    rel_path = get_rel_path(abs_base, abs_path)
                    rel_dest = dest.replace(os.path.sep, '/').rstrip('/')
                    destinations[resource_file] = rel_dest + '/' + rel_path
    return destinations


def in_venv():
    if hasattr(sys, 'real_prefix'):
        # virtualenv venvs
        result = True
    else:
        # PEP 405 venvs
        result = sys.prefix != getattr(sys, 'base_prefix', sys.prefix)
    return result


def get_executable():
    if sys.platform == 'darwin' and ('__PYVENV_LAUNCHER__'
                                     in os.environ):
        result =  os.environ['__PYVENV_LAUNCHER__']
    else:
        result = sys.executable
    return result


def proceed(prompt, allowed_chars, error_prompt=None, default=None):
    p = prompt
    while True:
        s = raw_input(p)
        p = prompt
        if not s and default:
            s = default
        if s:
            c = s[0].lower()
            if c in allowed_chars:
                break
            if error_prompt:
                p = '%c: %s\n%s' % (c, error_prompt, prompt)
    return c


def extract_by_key(d, keys):
    if isinstance(keys, string_types):
        keys = keys.split()
    result = {}
    for key in keys:
        if key in d:
            result[key] = d[key]
    return result

def read_exports(stream):
    if sys.version_info[0] >= 3:
        # needs to be a text stream
        stream = codecs.getreader('utf-8')(stream)
    # Try to load as JSON, falling back on legacy format
    data = stream.read()
    stream = StringIO(data)
    try:
        data = json.load(stream)
        result = data['exports']
        for group, entries in result.items():
            for k, v in entries.items():
                s = '%s = %s' % (k, v)
                entry = get_export_entry(s)
                assert entry is not None
                entries[k] = entry
        return result
    except Exception:
        stream.seek(0, 0)
    cp = configparser.ConfigParser()
    if hasattr(cp, 'read_file'):
        cp.read_file(stream)
    else:
        cp.readfp(stream)
    result = {}
    for key in cp.sections():
        result[key] = entries = {}
        for name, value in cp.items(key):
            s = '%s = %s' % (name, value)
            entry = get_export_entry(s)
            assert entry is not None
            #entry.dist = self
            entries[name] = entry
    return result


def write_exports(exports, stream):
    if sys.version_info[0] >= 3:
        # needs to be a text stream
        stream = codecs.getwriter('utf-8')(stream)
    cp = configparser.ConfigParser()
    for k, v in exports.items():
        # TODO check k, v for valid values
        cp.add_section(k)
        for entry in v.values():
            if entry.suffix is None:
                s = entry.prefix
            else:
                s = '%s:%s' % (entry.prefix, entry.suffix)
            if entry.flags:
                s = '%s [%s]' % (s, ', '.join(entry.flags))
            cp.set(k, entry.name, s)
    cp.write(stream)


@contextlib.contextmanager
def tempdir():
    td = tempfile.mkdtemp()
    try:
        yield td
    finally:
        shutil.rmtree(td)

@contextlib.contextmanager
def chdir(d):
    cwd = os.getcwd()
    try:
        os.chdir(d)
        yield
    finally:
        os.chdir(cwd)


@contextlib.contextmanager
def socket_timeout(seconds=15):
    cto = socket.getdefaulttimeout()
    try:
        socket.setdefaulttimeout(seconds)
        yield
    finally:
        socket.setdefaulttimeout(cto)


class cached_property(object):
    def __init__(self, func):
        self.func = func
        #for attr in ('__name__', '__module__', '__doc__'):
        #    setattr(self, attr, getattr(func, attr, None))

    def __get__(self, obj, cls=None):
        if obj is None:
            return self
        value = self.func(obj)
        object.__setattr__(obj, self.func.__name__, value)
        #obj.__dict__[self.func.__name__] = value = self.func(obj)
        return value

def convert_path(pathname):
    """Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    """
    if os.sep == '/':
        return pathname
    if not pathname:
        return pathname
    if pathname[0] == '/':
        raise ValueError("path '%s' cannot be absolute" % pathname)
    if pathname[-1] == '/':
        raise ValueError("path '%s' cannot end with '/'" % pathname)

    paths = pathname.split('/')
    while os.curdir in paths:
        paths.remove(os.curdir)
    if not paths:
        return os.curdir
    return os.path.join(*paths)


class FileOperator(object):
    def __init__(self, dry_run=False):
        self.dry_run = dry_run
        self.ensured = set()
        self._init_record()

    def _init_record(self):
        self.record = False
        self.files_written = set()
        self.dirs_created = set()

    def record_as_written(self, path):
        if self.record:
            self.files_written.add(path)

    def newer(self, source, target):
        """Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        """
        if not os.path.exists(source):
            raise DistlibException("file '%r' does not exist" %
                                   os.path.abspath(source))
        if not os.path.exists(target):
            return True

        return os.stat(source).st_mtime > os.stat(target).st_mtime

    def copy_file(self, infile, outfile, check=True):
        """Copy a file respecting dry-run and force flags.
        """
        self.ensure_dir(os.path.dirname(outfile))
        logger.info('Copying %s to %s', infile, outfile)
        if not self.dry_run:
            msg = None
            if check:
                if os.path.islink(outfile):
                    msg = '%s is a symlink' % outfile
                elif os.path.exists(outfile) and not os.path.isfile(outfile):
                    msg = '%s is a non-regular file' % outfile
            if msg:
                raise ValueError(msg + ' which would be overwritten')
            shutil.copyfile(infile, outfile)
        self.record_as_written(outfile)

    def copy_stream(self, instream, outfile, encoding=None):
        assert not os.path.isdir(outfile)
        self.ensure_dir(os.path.dirname(outfile))
        logger.info('Copying stream %s to %s', instream, outfile)
        if not self.dry_run:
            if encoding is None:
                outstream = open(outfile, 'wb')
            else:
                outstream = codecs.open(outfile, 'w', encoding=encoding)
            try:
                shutil.copyfileobj(instream, outstream)
            finally:
                outstream.close()
        self.record_as_written(outfile)

    def write_binary_file(self, path, data):
        self.ensure_dir(os.path.dirname(path))
        if not self.dry_run:
            with open(path, 'wb') as f:
                f.write(data)
        self.record_as_written(path)

    def write_text_file(self, path, data, encoding):
        self.ensure_dir(os.path.dirname(path))
        if not self.dry_run:
            with open(path, 'wb') as f:
                f.write(data.encode(encoding))
        self.record_as_written(path)

    def set_mode(self, bits, mask, files):
        if os.name == 'posix':
            # Set the executable bits (owner, group, and world) on
            # all the files specified.
            for f in files:
                if self.dry_run:
                    logger.info("changing mode of %s", f)
                else:
                    mode = (os.stat(f).st_mode | bits) & mask
                    logger.info("changing mode of %s to %o", f, mode)
                    os.chmod(f, mode)

    set_executable_mode = lambda s, f: s.set_mode(0o555, 0o7777, f)

    def ensure_dir(self, path):
        path = os.path.abspath(path)
        if path not in self.ensured and not os.path.exists(path):
            self.ensured.add(path)
            d, f = os.path.split(path)
            self.ensure_dir(d)
            logger.info('Creating %s' % path)
            if not self.dry_run:
                os.mkdir(path)
            if self.record:
                self.dirs_created.add(path)

    def byte_compile(self, path, optimize=False, force=False, prefix=None):
        dpath = cache_from_source(path, not optimize)
        logger.info('Byte-compiling %s to %s', path, dpath)
        if not self.dry_run:
            if force or self.newer(path, dpath):
                if not prefix:
                    diagpath = None
                else:
                    assert path.startswith(prefix)
                    diagpath = path[len(prefix):]
            py_compile.compile(path, dpath, diagpath, True)     # raise error
        self.record_as_written(dpath)
        return dpath

    def ensure_removed(self, path):
        if os.path.exists(path):
            if os.path.isdir(path) and not os.path.islink(path):
                logger.debug('Removing directory tree at %s', path)
                if not self.dry_run:
                    shutil.rmtree(path)
                if self.record:
                    if path in self.dirs_created:
                        self.dirs_created.remove(path)
            else:
                if os.path.islink(path):
                    s = 'link'
                else:
                    s = 'file'
                logger.debug('Removing %s %s', s, path)
                if not self.dry_run:
                    os.remove(path)
                if self.record:
                    if path in self.files_written:
                        self.files_written.remove(path)

    def is_writable(self, path):
        result = False
        while not result:
            if os.path.exists(path):
                result = os.access(path, os.W_OK)
                break
            parent = os.path.dirname(path)
            if parent == path:
                break
            path = parent
        return result

    def commit(self):
        """
        Commit recorded changes, turn off recording, return
        changes.
        """
        assert self.record
        result = self.files_written, self.dirs_created
        self._init_record()
        return result

    def rollback(self):
        if not self.dry_run:
            for f in list(self.files_written):
                if os.path.exists(f):
                    os.remove(f)
            # dirs should all be empty now, except perhaps for
            # __pycache__ subdirs
            # reverse so that subdirs appear before their parents
            dirs = sorted(self.dirs_created, reverse=True)
            for d in dirs:
                flist = os.listdir(d)
                if flist:
                    assert flist == ['__pycache__']
                    sd = os.path.join(d, flist[0])
                    os.rmdir(sd)
                os.rmdir(d)     # should fail if non-empty
        self._init_record()

def resolve(module_name, dotted_path):
    if module_name in sys.modules:
        mod = sys.modules[module_name]
    else:
        mod = __import__(module_name)
    if dotted_path is None:
        result = mod
    else:
        parts = dotted_path.split('.')
        result = getattr(mod, parts.pop(0))
        for p in parts:
            result = getattr(result, p)
    return result


class ExportEntry(object):
    def __init__(self, name, prefix, suffix, flags):
        self.name = name
        self.prefix = prefix
        self.suffix = suffix
        self.flags = flags

    @cached_property
    def value(self):
        return resolve(self.prefix, self.suffix)

    def __repr__(self):
        return '<ExportEntry %s = %s:%s %s>' % (self.name, self.prefix,
                                                self.suffix, self.flags)

    def __eq__(self, other):
        if not isinstance(other, ExportEntry):
            result = False
        else:
            result = (self.name == other.name and
                      self.prefix == other.prefix and
                      self.suffix == other.suffix and
                      self.flags == other.flags)
        return result

    __hash__ = object.__hash__


ENTRY_RE = re.compile(r'''(?P<name>(\w|[-.])+)
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>\w+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      ''', re.VERBOSE)


def get_export_entry(specification):
    m = ENTRY_RE.search(specification)
    if not m:
        result = None
        if '[' in specification or ']' in specification:
            raise DistlibException('Invalid specification '
                                   '%r' % specification)
    else:
        d = m.groupdict()
        name = d['name']
        path = d['callable']
        colons = path.count(':')
        if colons == 0:
            prefix, suffix = path, None
        else:
            if colons != 1:
                raise DistlibException('Invalid specification '
                                       '%r' % specification)
            prefix, suffix = path.split(':')
        flags = d['flags']
        if flags is None:
            if '[' in specification or ']' in specification:
                raise DistlibException('Invalid specification '
                                       '%r' % specification)
            flags = []
        else:
            flags = [f.strip() for f in flags.split(',')]
        result = ExportEntry(name, prefix, suffix, flags)
    return result


def get_cache_base(suffix=None):
    """
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    """
    if suffix is None:
        suffix = '.distlib'
    if os.name == 'nt' and 'LOCALAPPDATA' in os.environ:
        result = os.path.expandvars('$localappdata')
    else:
        # Assume posix, or old Windows
        result = os.path.expanduser('~')
    # we use 'isdir' instead of 'exists', because we want to
    # fail if there's a file with that name
    if os.path.isdir(result):
        usable = os.access(result, os.W_OK)
        if not usable:
            logger.warning('Directory exists but is not writable: %s', result)
    else:
        try:
            os.makedirs(result)
            usable = True
        except OSError:
            logger.warning('Unable to create %s', result, exc_info=True)
            usable = False
    if not usable:
        result = tempfile.mkdtemp()
        logger.warning('Default location unusable, using %s', result)
    return os.path.join(result, suffix)


def path_to_cache_dir(path):
    """
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    """
    d, p = os.path.splitdrive(os.path.abspath(path))
    if d:
        d = d.replace(':', '---')
    p = p.replace(os.sep, '--')
    return d + p + '.cache'


def ensure_slash(s):
    if not s.endswith('/'):
        return s + '/'
    return s


def parse_credentials(netloc):
    username = password = None
    if '@' in netloc:
        prefix, netloc = netloc.split('@', 1)
        if ':' not in prefix:
            username = prefix
        else:
            username, password = prefix.split(':', 1)
    return username, password, netloc


def get_process_umask():
    result = os.umask(0o22)
    os.umask(result)
    return result

def is_string_sequence(seq):
    result = True
    i = None
    for i, s in enumerate(seq):
        if not isinstance(s, string_types):
            result = False
            break
    assert i is not None
    return result

PROJECT_NAME_AND_VERSION = re.compile('([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-'
                                      '([a-z0-9_.+-]+)', re.I)
PYTHON_VERSION = re.compile(r'-py(\d\.?\d?)')


def split_filename(filename, project_name=None):
    """
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    """
    result = None
    pyver = None
    m = PYTHON_VERSION.search(filename)
    if m:
        pyver = m.group(1)
        filename = filename[:m.start()]
    if project_name and len(filename) > len(project_name) + 1:
        m = re.match(re.escape(project_name) + r'\b', filename)
        if m:
            n = m.end()
            result = filename[:n], filename[n + 1:], pyver
    if result is None:
        m = PROJECT_NAME_AND_VERSION.match(filename)
        if m:
            result = m.group(1), m.group(3), pyver
    return result

# Allow spaces in name because of legacy dists like "Twisted Core"
NAME_VERSION_RE = re.compile(r'(?P<name>[\w .-]+)\s*'
                             r'\(\s*(?P<ver>[^\s)]+)\)$')

def parse_name_and_version(p):
    """
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    """
    m = NAME_VERSION_RE.match(p)
    if not m:
        raise DistlibException('Ill-formed name/version string: \'%s\'' % p)
    d = m.groupdict()
    return d['name'].strip().lower(), d['ver']

def get_extras(requested, available):
    result = set()
    requested = set(requested or [])
    available = set(available or [])
    if '*' in requested:
        requested.remove('*')
        result |= available
    for r in requested:
        if r == '-':
            result.add(r)
        elif r.startswith('-'):
            unwanted = r[1:]
            if unwanted not in available:
                logger.warning('undeclared extra: %s' % unwanted)
            if unwanted in result:
                result.remove(unwanted)
        else:
            if r not in available:
                logger.warning('undeclared extra: %s' % r)
            result.add(r)
    return result
#
# Extended metadata functionality
#

def _get_external_data(url):
    result = {}
    try:
        # urlopen might fail if it runs into redirections,
        # because of Python issue #13696. Fixed in locators
        # using a custom redirect handler.
        resp = urlopen(url)
        headers = resp.info()
        if headers.get('Content-Type') != 'application/json':
            logger.debug('Unexpected response for JSON request')
        else:
            reader = codecs.getreader('utf-8')(resp)
            #data = reader.read().decode('utf-8')
            #result = json.loads(data)
            result = json.load(reader)
    except Exception as e:
        logger.exception('Failed to get external data for %s: %s', url, e)
    return result


def get_project_data(name):
    url = ('https://www.red-dove.com/pypi/projects/'
           '%s/%s/project.json' % (name[0].upper(), name))
    result = _get_external_data(url)
    return result

def get_package_data(name, version):
    url = ('https://www.red-dove.com/pypi/projects/'
           '%s/%s/package-%s.json' % (name[0].upper(), name, version))
    return _get_external_data(url)


class Cache(object):
    """
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    """

    def __init__(self, base):
        """
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        """
        # we use 'isdir' instead of 'exists', because we want to
        # fail if there's a file with that name
        if not os.path.isdir(base):
            os.makedirs(base)
        if (os.stat(base).st_mode & 0o77) != 0:
            logger.warning('Directory \'%s\' is not private', base)
        self.base = os.path.abspath(os.path.normpath(base))

    def prefix_to_dir(self, prefix):
        """
        Converts a resource prefix to a directory name in the cache.
        """
        return path_to_cache_dir(prefix)

    def clear(self):
        """
        Clear the cache.
        """
        not_removed = []
        for fn in os.listdir(self.base):
            fn = os.path.join(self.base, fn)
            try:
                if os.path.islink(fn) or os.path.isfile(fn):
                    os.remove(fn)
                elif os.path.isdir(fn):
                    shutil.rmtree(fn)
            except Exception:
                not_removed.append(fn)
        return not_removed


class EventMixin(object):
    """
    A very simple publish/subscribe system.
    """
    def __init__(self):
        self._subscribers = {}

    def add(self, event, subscriber, append=True):
        """
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        """
        subs = self._subscribers
        if event not in subs:
            subs[event] = deque([subscriber])
        else:
            sq = subs[event]
            if append:
                sq.append(subscriber)
            else:
                sq.appendleft(subscriber)

    def remove(self, event, subscriber):
        """
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        """
        subs = self._subscribers
        if event not in subs:
            raise ValueError('No subscribers: %r' % event)
        subs[event].remove(subscriber)

    def get_subscribers(self, event):
        """
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        """
        return iter(self._subscribers.get(event, ()))

    def publish(self, event, *args, **kwargs):
        """
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        """
        result = []
        for subscriber in self.get_subscribers(event):
            try:
                value = subscriber(event, *args, **kwargs)
            except Exception:
                logger.exception('Exception during event publication')
                value = None
            result.append(value)
        logger.debug('publish %s: args = %s, kwargs = %s, result = %s',
                     event, args, kwargs, result)
        return result

#
# Simple sequencing
#
class Sequencer(object):
    def __init__(self):
        self._preds = {}
        self._succs = {}
        self._nodes = set()     # nodes with no preds/succs

    def add_node(self, node):
        self._nodes.add(node)

    def remove_node(self, node, edges=False):
        if node in self._nodes:
            self._nodes.remove(node)
        if edges:
            for p in set(self._preds.get(node, ())):
                self.remove(p, node)
            for s in set(self._succs.get(node, ())):
                self.remove(node, s)
            # Remove empties
            for k, v in list(self._preds.items()):
                if not v:
                    del self._preds[k]
            for k, v in list(self._succs.items()):
                if not v:
                    del self._succs[k]

    def add(self, pred, succ):
        assert pred != succ
        self._preds.setdefault(succ, set()).add(pred)
        self._succs.setdefault(pred, set()).add(succ)

    def remove(self, pred, succ):
        assert pred != succ
        try:
            preds = self._preds[succ]
            succs = self._succs[pred]
        except KeyError:
            raise ValueError('%r not a successor of anything' % succ)
        try:
            preds.remove(pred)
            succs.remove(succ)
        except KeyError:
            raise ValueError('%r not a successor of %r' % (succ, pred))

    def is_step(self, step):
        return (step in self._preds or step in self._succs or
                step in self._nodes)

    def get_steps(self, final):
        if not self.is_step(final):
            raise ValueError('Unknown: %r' % final)
        result = []
        todo = []
        seen = set()
        todo.append(final)
        while todo:
            step = todo.pop(0)
            if step in seen:
                # if a step was already seen,
                # move it to the end (so it will appear earlier
                # when reversed on return) ... but not for the
                # final step, as that would be confusing for
                # users
                if step != final:
                    result.remove(step)
                    result.append(step)
            else:
                seen.add(step)
                result.append(step)
                preds = self._preds.get(step, ())
                todo.extend(preds)
        return reversed(result)

    @property
    def strong_connections(self):
        #http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
        index_counter = [0]
        stack = []
        lowlinks = {}
        index = {}
        result = []

        graph = self._succs

        def strongconnect(node):
            # set the depth index for this node to the smallest unused index
            index[node] = index_counter[0]
            lowlinks[node] = index_counter[0]
            index_counter[0] += 1
            stack.append(node)

            # Consider successors
            try:
                successors = graph[node]
            except Exception:
                successors = []
            for successor in successors:
                if successor not in lowlinks:
                    # Successor has not yet been visited
                    strongconnect(successor)
                    lowlinks[node] = min(lowlinks[node],lowlinks[successor])
                elif successor in stack:
                    # the successor is in the stack and hence in the current
                    # strongly connected component (SCC)
                    lowlinks[node] = min(lowlinks[node],index[successor])

            # If `node` is a root node, pop the stack and generate an SCC
            if lowlinks[node] == index[node]:
                connected_component = []

                while True:
                    successor = stack.pop()
                    connected_component.append(successor)
                    if successor == node: break
                component = tuple(connected_component)
                # storing the result
                result.append(component)

        for node in graph:
            if node not in lowlinks:
                strongconnect(node)

        return result

    @property
    def dot(self):
        result = ['digraph G {']
        for succ in self._preds:
            preds = self._preds[succ]
            for pred in preds:
                result.append('  %s -> %s;' % (pred, succ))
        for node in self._nodes:
            result.append('  %s;' % node)
        result.append('}')
        return '\n'.join(result)

#
# Unarchiving functionality for zip, tar, tgz, tbz, whl
#

ARCHIVE_EXTENSIONS = ('.tar.gz', '.tar.bz2', '.tar', '.zip',
                      '.tgz', '.tbz', '.whl')

def unarchive(archive_filename, dest_dir, format=None, check=True):

    def check_path(path):
        if not isinstance(path, text_type):
            path = path.decode('utf-8')
        p = os.path.abspath(os.path.join(dest_dir, path))
        if not p.startswith(dest_dir) or p[plen] != os.sep:
            raise ValueError('path outside destination: %r' % p)

    dest_dir = os.path.abspath(dest_dir)
    plen = len(dest_dir)
    archive = None
    if format is None:
        if archive_filename.endswith(('.zip', '.whl')):
            format = 'zip'
        elif archive_filename.endswith(('.tar.gz', '.tgz')):
            format = 'tgz'
            mode = 'r:gz'
        elif archive_filename.endswith(('.tar.bz2', '.tbz')):
            format = 'tbz'
            mode = 'r:bz2'
        elif archive_filename.endswith('.tar'):
            format = 'tar'
            mode = 'r'
        else:
            raise ValueError('Unknown format for %r' % archive_filename)
    try:
        if format == 'zip':
            archive = ZipFile(archive_filename, 'r')
            if check:
                names = archive.namelist()
                for name in names:
                    check_path(name)
        else:
            archive = tarfile.open(archive_filename, mode)
            if check:
                names = archive.getnames()
                for name in names:
                    check_path(name)
        if format != 'zip' and sys.version_info[0] < 3:
            # See Python issue 17153. If the dest path contains Unicode,
            # tarfile extraction fails on Python 2.x if a member path name
            # contains non-ASCII characters - it leads to an implicit
            # bytes -> unicode conversion using ASCII to decode.
            for tarinfo in archive.getmembers():
                if not isinstance(tarinfo.name, text_type):
                    tarinfo.name = tarinfo.name.decode('utf-8')
        archive.extractall(dest_dir)

    finally:
        if archive:
            archive.close()


def zip_dir(directory):
    """zip a directory tree into a BytesIO object"""
    result = io.BytesIO()
    dlen = len(directory)
    with ZipFile(result, "w") as zf:
        for root, dirs, files in os.walk(directory):
            for name in files:
                full = os.path.join(root, name)
                rel = root[dlen:]
                dest = os.path.join(rel, name)
                zf.write(full, dest)
    return result

#
# Simple progress bar
#

UNITS = ('', 'K', 'M', 'G','T','P')


class Progress(object):
    unknown = 'UNKNOWN'

    def __init__(self, minval=0, maxval=100):
        assert maxval is None or maxval >= minval
        self.min = self.cur = minval
        self.max = maxval
        self.started = None
        self.elapsed = 0
        self.done = False

    def update(self, curval):
        assert self.min <= curval
        assert self.max is None or curval <= self.max
        self.cur = curval
        now = time.time()
        if self.started is None:
            self.started = now
        else:
            self.elapsed = now - self.started

    def increment(self, incr):
        assert incr >= 0
        self.update(self.cur + incr)

    def start(self):
        self.update(self.min)
        return self

    def stop(self):
        if self.max is not None:
            self.update(self.max)
        self.done = True

    @property
    def maximum(self):
        return self.unknown if self.max is None else self.max

    @property
    def percentage(self):
        if self.done:
            result = '100 %'
        elif self.max is None:
            result = ' ?? %'
        else:
            v = 100.0 * (self.cur - self.min) / (self.max - self.min)
            result = '%3d %%' % v
        return result

    def format_duration(self, duration):
        if (duration <= 0) and self.max is None or self.cur == self.min:
            result = '??:??:??'
        #elif duration < 1:
        #    result = '--:--:--'
        else:
            result = time.strftime('%H:%M:%S', time.gmtime(duration))
        return result

    @property
    def ETA(self):
        if self.done:
            prefix = 'Done'
            t = self.elapsed
            #import pdb; pdb.set_trace()
        else:
            prefix = 'ETA '
            if self.max is None:
                t = -1
            elif self.elapsed == 0 or (self.cur == self.min):
                t = 0
            else:
                #import pdb; pdb.set_trace()
                t = float(self.max - self.min)
                t /= self.cur - self.min
                t = (t - 1) * self.elapsed
        return '%s: %s' % (prefix, self.format_duration(t))

    @property
    def speed(self):
        if self.elapsed == 0:
            result = 0.0
        else:
            result = (self.cur - self.min) / self.elapsed
        for unit in UNITS:
            if result < 1000:
                break
            result /= 1000.0
        return '%d %sB/s' % (result, unit)

#
# Glob functionality
#

RICH_GLOB = re.compile(r'\{([^}]*)\}')
_CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]')
_CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$')


def iglob(path_glob):
    """Extended globbing function that supports ** and {opt1,opt2,opt3}."""
    if _CHECK_RECURSIVE_GLOB.search(path_glob):
        msg = """invalid glob %r: recursive glob "**" must be used alone"""
        raise ValueError(msg % path_glob)
    if _CHECK_MISMATCH_SET.search(path_glob):
        msg = """invalid glob %r: mismatching set marker '{' or '}'"""
        raise ValueError(msg % path_glob)
    return _iglob(path_glob)


def _iglob(path_glob):
    rich_path_glob = RICH_GLOB.split(path_glob, 1)
    if len(rich_path_glob) > 1:
        assert len(rich_path_glob) == 3, rich_path_glob
        prefix, set, suffix = rich_path_glob
        for item in set.split(','):
            for path in _iglob(''.join((prefix, item, suffix))):
                yield path
    else:
        if '**' not in path_glob:
            for item in std_iglob(path_glob):
                yield item
        else:
            prefix, radical = path_glob.split('**', 1)
            if prefix == '':
                prefix = '.'
            if radical == '':
                radical = '*'
            else:
                # we support both
                radical = radical.lstrip('/')
                radical = radical.lstrip('\\')
            for path, dir, files in os.walk(prefix):
                path = os.path.normpath(path)
                for fn in _iglob(os.path.join(path, radical)):
                    yield fn



#
# HTTPSConnection which verifies certificates/matches domains
#

class HTTPSConnection(httplib.HTTPSConnection):
    ca_certs = None # set this to the path to the certs file (.pem)
    check_domain = True # only used if ca_certs is not None

    # noinspection PyPropertyAccess
    def connect(self):
        sock = socket.create_connection((self.host, self.port), self.timeout)
        if getattr(self, '_tunnel_host', False):
            self.sock = sock
            self._tunnel()

        if not hasattr(ssl, 'SSLContext'):
            # For 2.x
            if self.ca_certs:
                cert_reqs = ssl.CERT_REQUIRED
            else:
                cert_reqs = ssl.CERT_NONE
            self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
                                        cert_reqs=cert_reqs,
                                        ssl_version=ssl.PROTOCOL_SSLv23,
                                        ca_certs=self.ca_certs)
        else:
            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            context.options |= ssl.OP_NO_SSLv2
            if self.cert_file:
                context.load_cert_chain(self.cert_file, self.key_file)
            kwargs = {}
            if self.ca_certs:
                context.verify_mode = ssl.CERT_REQUIRED
                context.load_verify_locations(cafile=self.ca_certs)
                if getattr(ssl, 'HAS_SNI', False):
                    kwargs['server_hostname'] = self.host
            self.sock = context.wrap_socket(sock, **kwargs)
        if self.ca_certs and self.check_domain:
            try:
                match_hostname(self.sock.getpeercert(), self.host)
                logger.debug('Host verified: %s', self.host)
            except CertificateError:
                self.sock.shutdown(socket.SHUT_RDWR)
                self.sock.close()
                raise

class HTTPSHandler(BaseHTTPSHandler):
    def __init__(self, ca_certs, check_domain=True):
        BaseHTTPSHandler.__init__(self)
        self.ca_certs = ca_certs
        self.check_domain = check_domain

    def _conn_maker(self, *args, **kwargs):
        """
        This is called to create a connection instance. Normally you'd
        pass a connection class to do_open, but it doesn't actually check for
        a class, and just expects a callable. As long as we behave just as a
        constructor would have, we should be OK. If it ever changes so that
        we *must* pass a class, we'll create an UnsafeHTTPSConnection class
        which just sets check_domain to False in the class definition, and
        choose which one to pass to do_open.
        """
        result = HTTPSConnection(*args, **kwargs)
        if self.ca_certs:
            result.ca_certs = self.ca_certs
            result.check_domain = self.check_domain
        return result

    def https_open(self, req):
        try:
            return self.do_open(self._conn_maker, req)
        except URLError as e:
            if 'certificate verify failed' in str(e.reason):
                raise CertificateError('Unable to verify server certificate '
                                       'for %s' % req.host)
            else:
                raise

#
# To prevent against mixing HTTP traffic with HTTPS (examples: A Man-In-The-
# Middle proxy using HTTP listens on port 443, or an index mistakenly serves
# HTML containing a http://xyz link when it should be https://xyz),
# you can use the following handler class, which does not allow HTTP traffic.
#
# It works by inheriting from HTTPHandler - so build_opener won't add a
# handler for HTTP itself.
#
class HTTPSOnlyHandler(HTTPSHandler, HTTPHandler):
    def http_open(self, req):
        raise URLError('Unexpected HTTP request on what should be a secure '
                       'connection: %s' % req)

#
# XML-RPC with timeouts
#

_ver_info = sys.version_info[:2]

if _ver_info == (2, 6):
    class HTTP(httplib.HTTP):
        def __init__(self, host='', port=None, **kwargs):
            if port == 0:   # 0 means use port 0, not the default port
                port = None
            self._setup(self._connection_class(host, port, **kwargs))


    class HTTPS(httplib.HTTPS):
        def __init__(self, host='', port=None, **kwargs):
            if port == 0:   # 0 means use port 0, not the default port
                port = None
            self._setup(self._connection_class(host, port, **kwargs))


class Transport(xmlrpclib.Transport):
    def __init__(self, timeout, use_datetime=0):
        self.timeout = timeout
        xmlrpclib.Transport.__init__(self, use_datetime)

    def make_connection(self, host):
        h, eh, x509 = self.get_host_info(host)
        if _ver_info == (2, 6):
            result = HTTP(h, timeout=self.timeout)
        else:
            if not self._connection or host != self._connection[0]:
                self._extra_headers = eh
                self._connection = host, httplib.HTTPConnection(h)
            result = self._connection[1]
        return result

class SafeTransport(xmlrpclib.SafeTransport):
    def __init__(self, timeout, use_datetime=0):
        self.timeout = timeout
        xmlrpclib.SafeTransport.__init__(self, use_datetime)

    def make_connection(self, host):
        h, eh, kwargs = self.get_host_info(host)
        if not kwargs:
            kwargs = {}
        kwargs['timeout'] = self.timeout
        if _ver_info == (2, 6):
            result = HTTPS(host, None, **kwargs)
        else:
            if not self._connection or host != self._connection[0]:
                self._extra_headers = eh
                self._connection = host, httplib.HTTPSConnection(h, None,
                                                                 **kwargs)
            result = self._connection[1]
        return result


class ServerProxy(xmlrpclib.ServerProxy):
    def __init__(self, uri, **kwargs):
        self.timeout = timeout = kwargs.pop('timeout', None)
        # The above classes only come into play if a timeout
        # is specified
        if timeout is not None:
            scheme, _ = splittype(uri)
            use_datetime = kwargs.get('use_datetime', 0)
            if scheme == 'https':
                tcls = SafeTransport
            else:
                tcls = Transport
            kwargs['transport'] = t = tcls(timeout, use_datetime=use_datetime)
            self.transport = t
        xmlrpclib.ServerProxy.__init__(self, uri, **kwargs)

#
# CSV functionality. This is provided because on 2.x, the csv module can't
# handle Unicode. However, we need to deal with Unicode in e.g. RECORD files.
#

def _csv_open(fn, mode, **kwargs):
    if sys.version_info[0] < 3:
        mode += 'b'
    else:
        kwargs['newline'] = ''
    return open(fn, mode, **kwargs)


class CSVBase(object):
    defaults = {
        'delimiter': str(','),      # The strs are used because we need native
        'quotechar': str('"'),      # str in the csv API (2.x won't take
        'lineterminator': str('\n') # Unicode)
    }

    def __enter__(self):
        return self

    def __exit__(self, *exc_info):
        self.stream.close()


class CSVReader(CSVBase):
    def __init__(self, **kwargs):
        if 'stream' in kwargs:
            stream = kwargs['stream']
            if sys.version_info[0] >= 3:
                # needs to be a text stream
                stream = codecs.getreader('utf-8')(stream)
            self.stream = stream
        else:
            self.stream = _csv_open(kwargs['path'], 'r')
        self.reader = csv.reader(self.stream, **self.defaults)

    def __iter__(self):
        return self

    def next(self):
        result = next(self.reader)
        if sys.version_info[0] < 3:
            for i, item in enumerate(result):
                if not isinstance(item, text_type):
                    result[i] = item.decode('utf-8')
        return result

    __next__ = next

class CSVWriter(CSVBase):
    def __init__(self, fn, **kwargs):
        self.stream = _csv_open(fn, 'w')
        self.writer = csv.writer(self.stream, **self.defaults)

    def writerow(self, row):
        if sys.version_info[0] < 3:
            r = []
            for item in row:
                if isinstance(item, text_type):
                    item = item.encode('utf-8')
                r.append(item)
            row = r
        self.writer.writerow(row)

#
#   Configurator functionality
#

class Configurator(BaseConfigurator):

    value_converters = dict(BaseConfigurator.value_converters)
    value_converters['inc'] = 'inc_convert'

    def __init__(self, config, base=None):
        super(Configurator, self).__init__(config)
        self.base = base or os.getcwd()

    def configure_custom(self, config):
        def convert(o):
            if isinstance(o, (list, tuple)):
                result = type(o)([convert(i) for i in o])
            elif isinstance(o, dict):
                if '()' in o:
                    result = self.configure_custom(o)
                else:
                    result = {}
                    for k in o:
                        result[k] = convert(o[k])
            else:
                result = self.convert(o)
            return result

        c = config.pop('()')
        if not callable(c):
            c = self.resolve(c)
        props = config.pop('.', None)
        # Check for valid identifiers
        args = config.pop('[]', ())
        if args:
            args = tuple([convert(o) for o in args])
        items = [(k, convert(config[k])) for k in config if valid_ident(k)]
        kwargs = dict(items)
        result = c(*args, **kwargs)
        if props:
            for n, v in props.items():
                setattr(result, n, convert(v))
        return result

    def __getitem__(self, key):
        result = self.config[key]
        if isinstance(result, dict) and '()' in result:
            self.config[key] = result = self.configure_custom(result)
        return result

    def inc_convert(self, value):
        """Default converter for the inc:// protocol."""
        if not os.path.isabs(value):
            value = os.path.join(self.base, value)
        with codecs.open(value, 'r', encoding='utf-8') as f:
            result = json.load(f)
        return result

#
# Mixin for running subprocesses and capturing their output
#

class SubprocessMixin(object):
    def __init__(self, verbose=False, progress=None):
        self.verbose = verbose
        self.progress = progress

    def reader(self, stream, context):
        """
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        """
        progress = self.progress
        verbose = self.verbose
        while True:
            s = stream.readline()
            if not s:
                break
            if progress is not None:
                progress(s, context)
            else:
                if not verbose:
                    sys.stderr.write('.')
                else:
                    sys.stderr.write(s.decode('utf-8'))
                sys.stderr.flush()
        stream.close()

    def run_command(self, cmd, **kwargs):
        p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE, **kwargs)
        t1 = threading.Thread(target=self.reader, args=(p.stdout, 'stdout'))
        t1.start()
        t2 = threading.Thread(target=self.reader, args=(p.stderr, 'stderr'))
        t2.start()
        p.wait()
        t1.join()
        t2.join()
        if self.progress is not None:
            self.progress('done.', 'main')
        elif self.verbose:
            sys.stderr.write('done.\n')
        return p
python3.4/site-packages/pip/_vendor/__pycache__/__init__.cpython-34.pyc000064400000000647151735047440021672 0ustar00�
�Re
�@sdZddlmZdS)z�
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.

Files inside of pip._vendor should be considered immutable and should only be
updated to versions from upstream.
�)�absolute_importN)�__doc__�
__future__r�rr�//tmp/pip-ztkk0jow-build/pip/_vendor/__init__.py�<module>spython3.4/site-packages/pip/_vendor/__pycache__/pkg_resources.cpython-34.pyc000064400000275107151735047440023013 0ustar00�
�Re���m@sOdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlmZyddlmZmZWn(ek
rddlmZmZYnXyeWn"ek
r;ddlmZYnXy$edd�ZddlmZWn:ek
r�eZdd	lmZddd
d�Z YnXddlm!Z!y&dd
lm"Z"m#Z#m$Z$dZ%Wnek
r�dZ%YnXddlm&Z'ddl(m)Z)m*Z*ej+ddfko8ej,j-dkrMddl.j/Z0ndZ0yddl1Z1Wnek
rwYnXddd�Z2iZ3dd�Z4dd�Z5dd�Z6dd�Z7dd �Z8d!d"�Z9d#d$�Z:d%d�Z;Z<d&d'�Z=d(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdlgEZ>GdmdC�dCe?�Z@GdndD�dDe@�ZAGdodE�dEe@�ZBGdpdF�dFe@�ZCiZDejEdd�ZFdZGdqZHdrZIdZJdrZKdsdh�ZLdtd*�ZMgdudv�ZNdwdx�ZOdydz�ZPejQd{�ZRejQd|�ZSePZTd}dM�ZUd~d)�ZVeVZWdd+�ZXd�d,�ZYdd�d-�ZZd�d.�Z[Gd�d[�d[�Z\Gd�d\�d\e\�Z]Gd�d>�d>e^�Z_Gd�d=�d=e^�Z`e`ZaGd�dG�dGeb�ZcGd�d?�d?�Zdd�d<�Zed�dJ�Zfd�dK�Zgd�dP�Zhd�dQ�ZiGd�d��d�e^�ZjejjkZlejjmZmGd�db�db�ZneLe^en�Gd�dc�dcen�ZoGd�dd�ddeo�ZpeLeqd�ep�e0dk	r|eLe0jrep�nGd�d`�d`en�Zses�Ztd�d��ZuGd�de�deeo�ZveLejwev�Gd�d]�d]es�ZxGd�d^�d^ep�ZyGd�d_�d_ev�Zze4d�d�i�d�df�Z{dd�d9�Z|dd�d��Z}e{ejwe}�dd�d��Z~e{e^e~�dd�d��Ze{ej�e�e0dk	r�e{e0j�e�ne4d�d�i�e4d�d�i�d�dg�Z�d�d��Z�d�d6�Z�dd�di�Z�d�d��Z�e�ej�e��e�ejwe��e0dk	rQe�e0j�e��nd�d��Z�e�e^e��d�dU�Z�id�d��Z�d�d��Z�d�dN�Z�ejQd��j�Z�ejQd��j�Z�ejQd��j�Z�ejQd��j�Z�ejQd��j�Z�ejQd��j�Z�ejQd��j�Z�ejQd��j�Z�ejQd�ej�ej�B�j�Z�ejQd�ej��Z�id�d�6d�d�6d�d�6d�d�6d�d�6j�Z�d�d��Z�d�dI�Z�Gd�dB�dBe^�Z�d�d��Z�Gd�d@�d@e^�Z�Gd�d��d�e��Z�ie�d�6e�d�6e�d�6Z�d�d��Z�d�dH�Z�d�d��Z�Gd�dA�dA�Z�id�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Z�d�d��Z�d�d��Z�d�dT�Z�d�dO�Z�d�d��Z�ed�Z�d�d��Z�e�e���e_j��Z�e4d�d7e��e�j�Z�e�j�Z�e�j�Z�e�jVZVeVZWe�d�d��ge�_�e�e�e�j�ej���dS)�aZ
Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
�N)�get_importer)�urlparse�
urlunparse)�ImmutableSetcCs
|j�S)N)�next)�o�r�4/tmp/pip-ztkk0jow-build/pip/_vendor/pkg_resources.py�<lambda>-sr
)�StringIO)�BytesIOcCsY|dkrt�}n|dkr-|}nttt|�j�|d�||�dS)N�exec)�globalsr
�compile�open�read)�fn�globs�locsrrr	�execfile2s
	r)�utime)�mkdir�rename�unlinkTF)r)�isdir�split�Zcpythoni�cCs^tstd��nt|�\}}|rZ|rZt|�rZt|�t||�ndS)Nz*"os.mkdir" not supported on this platform.)�
WRITE_SUPPORT�IOErrorrr�_bypass_ensure_directoryr)�name�mode�dirname�filenamerrr	rPs
rcKs-t�j|�tjtj||��dS)N)r�update�_state_vars�dict�fromkeys)�vartype�kwrrr	�_declare_state\sr*cCsLi}t�}x6tj�D](\}}|d|||�||<qW|S)N�_sget_)rr%�items)�state�g�k�vrrr	�__getstate__`s
	 r1cCsJt�}x:|j�D],\}}|dt|||||�qW|S)N�_sset_)rr,r%)r-r.r/r0rrr	�__setstate__gs	$r3cCs
|j�S)N)�copy)�valrrr	�
_sget_dictmsr6cCs|j�|j|�dS)N)�clearr$)�key�obr-rrr	�
_sset_dictps
r:cCs
|j�S)N)r1)r5rrr	�_sget_objecttsr;cCs|j|�dS)N)r3)r8r9r-rrr	�_sset_objectwsr<cGsdS)Nr)�argsrrr	r
zscCs�t�}tj|�}|dk	r~tjdkr~y3ddjt�dd��|jd�f}Wq~tk
rzYq~Xn|S)aZReturn this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    N�darwinzmacosx-%s-%s�.�r)	�get_build_platform�macosVersionString�match�sys�platform�join�_macosx_vers�group�
ValueError)�plat�mrrr	�get_supported_platform}s
	3
rL�require�
run_script�get_provider�get_distribution�load_entry_point�
get_entry_map�get_entry_info�iter_entry_points�resource_string�resource_stream�resource_filename�resource_listdir�resource_exists�resource_isdir�declare_namespace�working_set�add_activation_listener�find_distributions�set_extraction_path�cleanup_resources�get_default_cache�Environment�
WorkingSet�ResourceManager�Distribution�Requirement�
EntryPoint�ResolutionError�VersionConflict�DistributionNotFound�UnknownExtra�ExtractionError�parse_requirements�
parse_version�	safe_name�safe_version�get_platform�compatible_platforms�yield_lines�split_sections�
safe_extra�to_filename�invalid_marker�evaluate_marker�ensure_directory�normalize_path�EGG_DIST�BINARY_DIST�SOURCE_DIST�
CHECKOUT_DIST�DEVELOP_DIST�IMetadataProvider�IResourceProvider�FileMetadata�PathMetadata�EggMetadata�
EmptyProvider�empty_provider�NullProvider�EggProvider�DefaultProvider�ZipProvider�register_finder�register_namespace_handler�register_loader_type�fixup_namespace_packagesr�run_main�AvailableDistributionsc@s"eZdZdZdd�ZdS)rhz.Abstract base for dependency resolution errorscCs|jjt|j�S)N)�	__class__�__name__�reprr=)�selfrrr	�__repr__�szResolutionError.__repr__N)r��
__module__�__qualname__�__doc__r�rrrr	rh�sc@seZdZdZdS)rizAAn already-installed version conflicts with the requested versionN)r�r�r�r�rrrr	ri�sc@seZdZdZdS)rjz&A requested distribution was not foundN)r�r�r�r�rrrr	rj�sc@seZdZdZdS)rkz>Distribution doesn't have an "extra feature" of the given nameN)r�r�r�r�rrrr	rk�sr@�cCs|t|<dS)aRegister `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    N)�_provider_factories)�loader_type�provider_factoryrrr	r��scCs�t|t�r2tj|�p1tt|��dSytj|}Wn)tk
rnt	|�tj|}YnXt
|dd�}tt|�|�S)z?Return an IResourceProvider for the named module or requirementr�
__loader__N)
�
isinstancerfr\�findrM�strrD�modules�KeyError�
__import__�getattr�
_find_adapterr�)�moduleOrReq�module�loaderrrr	rO�s#

cCs�|s�ddl}|j�d}|dkr�ddl}d}tjj|�r�t|d�r�|j|�}d|kr�|d}q�q�q�n|j|j	d��n|dS)Nr�z0/System/Library/CoreServices/SystemVersion.plist�	readPlist�ProductVersionr?)
rE�mac_ver�plistlib�os�path�exists�hasattrr��appendr)�_cacherE�versionr��plist�
plist_contentrrr	rG�srGcCsidd6dd6j||�S)N�ppc�PowerPC�Power_Macintosh)�get)�machinerrr	�_macosx_arch�sr�cCs�yddlm}Wn"tk
r8ddlm}YnX|�}tjdkr�|jd�r�yTt�}tj	�dj
dd�}dt|d�t|d	�t|�fSWq�t
k
r�Yq�Xn|S)
z�Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    r)rqr>zmacosx-�� �_zmacosx-%d.%d-%sr�)�	sysconfigrq�ImportError�distutils.utilrDrE�
startswithrGr��uname�replace�intr�rI)rqrJr�r�rrr	rA�s
		
rAzmacosx-(\d+)\.(\d+)-(.*)zdarwin-(\d+)\.(\d+)\.(\d+)-(.*)cCsO|dks$|dks$||kr(dStj|�}|rKtj|�}|s�tj|�}|r�t|jd��}d|jd�|jd�f}|dkr�|dks�|dkr�|d	kr�dSnd
S|jd�|jd�ks|jd�|jd�krd
St|jd��t|jd��krGd
SdSd
S)z�Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    NTr�z%s.%sr@�z10.3�z10.4Fr)rBrC�darwinVersionStringr�rH)�provided�required�reqMac�provMac�
provDarwin�dversion�macosversionrrr	rrs*$"*cCsNtjd�j}|d}|j�||d<t|�dj||�dS)z@Locate distribution `dist_spec` and run its `script_name` scriptr�r�rN)rD�	_getframe�	f_globalsr7rMrN)Z	dist_spec�script_name�nsr rrr	rNKs



cCsdt|t�r!tj|�}nt|t�r?t|�}nt|t�s`td|��n|S)z@Return a current distribution object for a Requirement or stringz-Expected string, Requirement, or Distribution)r��
basestringrf�parserOre�	TypeError)�distrrr	rPUscCst|�j||�S)zDReturn `name` entry point of `group` for `dist` or raise ImportError)rPrQ)r�rHr rrr	rQ]scCst|�j|�S)z=Return the entry point map for `group`, or the full entry map)rPrR)r�rHrrr	rRascCst|�j||�S)z<Return the EntryPoint object for `group`+`name`, or ``None``)rPrS)r�rHr rrr	rSesc@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)r�cCsdS)z;Does the package's distribution contain the named metadata?Nr)r rrr	�has_metadatalszIMetadataProvider.has_metadatacCsdS)z'The named metadata resource as a stringNr)r rrr	�get_metadataoszIMetadataProvider.get_metadatacCsdS)z�Yield named metadata resource as list of non-blank non-comment lines

       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted.Nr)r rrr	�get_metadata_linesrsz$IMetadataProvider.get_metadata_linescCsdS)z>Is the named metadata a directory?  (like ``os.path.isdir()``)Nr)r rrr	�metadata_isdirxsz IMetadataProvider.metadata_isdircCsdS)z?List of metadata names in the directory (like ``os.listdir()``)Nr)r rrr	�metadata_listdir{sz"IMetadataProvider.metadata_listdircCsdS)z=Execute the named script in the supplied namespace dictionaryNr)r��	namespacerrr	rN~szIMetadataProvider.run_scriptN)	r�r�r�r�r�r�r�r�rNrrrr	r�jsc@s^eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)r�z3An object that provides access to package resourcescCsdS)zdReturn a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``Nr)�manager�
resource_namerrr	�get_resource_filename�sz'IResourceProvider.get_resource_filenamecCsdS)ziReturn a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``Nr)r�r�rrr	�get_resource_stream�sz%IResourceProvider.get_resource_streamcCsdS)zmReturn a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``Nr)r�r�rrr	�get_resource_string�sz%IResourceProvider.get_resource_stringcCsdS)z,Does the package contain the named resource?Nr)r�rrr	�has_resource�szIResourceProvider.has_resourcecCsdS)z>Is the named resource a directory?  (like ``os.path.isdir()``)Nr)r�rrr	rZ�sz IResourceProvider.resource_isdircCsdS)z?List of resource names in the directory (like ``os.listdir()``)Nr)r�rrr	rX�sz"IResourceProvider.resource_listdirN)
r�r�r�r�r�r�r�r�rZrXrrrr	r��sc@seZdZdZddd�Zedd��Zedd��Zd	d
�Zdd�Z	d
d�Z
ddd�Zdd�Zdd�Z
ddddd�Zddddd�Zddddd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZdS)'rczDA collection of active distributions on sys.path (or a similar list)NcCs^g|_i|_i|_g|_|dkr<tj}nx|D]}|j|�qCWdS)z?Create working set from list of path entries (default=sys.path)N)�entries�
entry_keys�by_key�	callbacksrDr��	add_entry)r�r��entryrrr	�__init__�s				
zWorkingSet.__init__cCsm|�}yddlm}Wntk
r5|SYnXy|j|�Wntk
rh|j|�SYnX|S)z1
        Prepare the master working set.
        r)�__requires__)�__main__r�r�rMri�_build_from_requirements)�cls�wsr�rrr	�
_build_master�s	
	
zWorkingSet._build_mastercCs�|g�}t|�}|j|t��}x|D]}|j|�q4Wx0tjD]%}||jkrU|j|�qUqUW|jtjdd�<|S)zQ
        Build a working set from a requirement spec. Rewrites sys.path.
        N)rm�resolverb�addrDr�r�r�)r��req_specr��reqs�distsr�r�rrr	r��s
z#WorkingSet._build_from_requirementscCsT|jj|g�|jj|�x*t|d�D]}|j||d�q3WdS)a�Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        TFN)r��
setdefaultr�r�r^r�)r�r�r�rrr	r��s
zWorkingSet.add_entrycCs|jj|j�|kS)z9True if `dist` is the active distribution for its project)r�r�r8)r�r�rrr	�__contains__�szWorkingSet.__contains__cCsG|jj|j�}|dk	r?||kr?t||��n|SdS)a�Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        N)r�r�r8ri)r��reqr�rrr	r��s
zWorkingSet.findccsgx`|D]X}|j|�}|dkrGx4|j�D]}|Vq5Wq||kr||VqqWdS)aYield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        N)rR�values)r�rHr r�r��eprrr	rT�s
zWorkingSet.iter_entry_pointscCsQtjd�j}|d}|j�||d<|j|�dj||�dS)z?Locate distribution for `requires` and run `script_name` scriptr�r�rN)rDr�r�r7rMrN)r��requiresr�r�r rrr	rN
s



zWorkingSet.run_scriptccspi}xc|jD]X}||jkr+qnx:|j|D]+}||kr9d||<|j|Vq9q9WqWdS)z�Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        r�N)r�r�r�)r��seen�itemr8rrr	�__iter__s
zWorkingSet.__iter__TFcCs�|r|j|j|�n|dkr4|j}n|jj|g�}|jj|jg�}|r~|j|jkr~dS||j|j<|j|kr�|j|j�n|j|kr�|j|j�n|j|�dS)aAdd `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        N)	�	insert_onr��locationr�r�r8r�r��
_added_new)r�r�r��insertr��keys�keys2rrr	r�#szWorkingSet.addcCs�t|�ddd�}i}i}g}xc|r�|jd�}||krUq.n|j|j�}	|	dkr?|jj|j�}	|	dks�|	|kr/|r/|}
|dkr�|	dkr�t|j�}q�tg�}tg�}
n|j||
|�}	||j<|	dkr/t	|��q/n|j
|	�n|	|kr]t|	|��n|j|	j
|j�ddd��d||<q.W|S)aeList all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.

        Unless `replace_conflicting=True`, raises a VersionConflict exception if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
        Nr�rT���r)�list�popr�r8r�rbr�rc�
best_matchrjr�ri�extendr��extras)r��requirements�env�	installer�replace_conflicting�	processed�best�to_activater�r�r�rrr	r�@s6	 &zWorkingSet.resolvecCsPt|�}|j�i}i}|dkrJt|j�}||7}n
||}|jg�}	tt|	j|��x�|D]�}
x�||
D]�}|j�g}y|	j|||�}
Wn9t	k
r�t
j�d}|||<|r�w�nPYq�Xtt|	j|
��|jt
j|
��Pq�Wq�Wt|�}|j�||fS)abFind all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            map(working_set.add, distributions)  # add plugins+libs to sys.path
            print 'Could not load', errors        # display errors

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        Nr�)r�sortrbr�r��mapr��as_requirementr�rhrD�exc_infor$r&r')r��
plugin_env�full_envr�fallback�plugin_projects�
error_info�
distributionsr
�
shadow_set�project_namer�r��	resolveesr0rrr	�find_plugins~s6"





	
zWorkingSet.find_pluginscGs7|jt|��}x|D]}|j|�qW|S)a�Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        )r�rmr�)r�r�neededr�rrr	rM�s	
zWorkingSet.requirecCsB||jkrdS|jj|�x|D]}||�q*WdS)zAInvoke `callback` for all distributions (including existing ones)N)r�r�)r��callbackr�rrr	�	subscribe�s

zWorkingSet.subscribecCs"x|jD]}||�q
WdS)N)r�)r�r�r"rrr	r�szWorkingSet._added_newcCs<|jdd�|jj�|jj�|jdd�fS)N)r�r�r4r�r�)r�rrr	r1�s(zWorkingSet.__getstate__cCsZ|\}}}}|dd�|_|j�|_|j�|_|dd�|_dS)N)r�r4r�r�r�)r��e_k_b_cr�rr�r�rrr	r3�s
zWorkingSet.__setstate__)r�r�r�r�r��classmethodr�r�r�r�r�rTrNr�r�r�r rMr#rr1r3rrrr	rc�s(
=Mc@s�eZdZdZde�edd�Zdd�Zdd�Zdd	d
�Z	dd�Z
d
d�Zddd�Zddd�Z
dd�Zdd�Zdd�ZdS)rbz5Searchable snapshot of distributions on a search pathNcCs5i|_i|_||_||_|j|�dS)a!Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.3'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        N)�_distmapr�rE�python�scan)r��search_pathrEr'rrr	r��s
				zEnvironment.__init__cCsC|jdks0|jdks0|j|jkoBt|j|j�S)z�Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        N)r'�
py_versionrrrE)r�r�rrr	�can_addszEnvironment.can_addcCs|j|jj|�dS)z"Remove `dist` from the environmentN)r&r8�remove)r�r�rrr	r,szEnvironment.removecCsQ|dkrtj}nx2|D]*}x!t|�D]}|j|�q2WqWdS)adScan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        N)rDr�r^r�)r�r)r�r�rrr	r(s

zEnvironment.scancCs�y|j|SWn1tk
rB|j�}||jkr>gSYnX||jkrw|j|}|j|<t|�n|j|S)zKReturn a newest-to-oldest list of distributions for `project_name`
        )r�r��lowerr&�_sort_dists)r�rr�rrr	�__getitem__.s
	
zEnvironment.__getitem__cCs|j|�r{|j�r{|jj|jg�}||kr{|j|�|j|jkrxt|j|j�qxq{ndS)z<Add `dist` if we ``can_add()`` it and it isn't already addedN)r+�has_versionr&r�r8r�r�r.)r�r�r�rrr	r�>s
zEnvironment.addcCsW|j|�}|dk	r|Sx%||jD]}||kr-|Sq-W|j||�S)a�Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        N)r�r8�obtain)r�r�r\rr�rrr	r	Gs
zEnvironment.best_matchcCs|dk	r||�SdS)a�Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument.Nr)r��requirementrrrr	r1\s	zEnvironment.obtainccs0x)|jj�D]}||r|VqqWdS)z=Yield the unique project names of the available distributionsN)r&r)r�r8rrr	r�hs
zEnvironment.__iter__cCs{t|t�r|j|�nXt|t�rdxF|D](}x||D]}|j|�qFWq5Wntd|f��|S)z2In-place addition of a distribution or environmentzCan't add %r to environment)r�rer�rbr�)r��other�projectr�rrr	�__iadd__ms
zEnvironment.__iadd__cCs@|jgdddd�}x||fD]}||7}q(W|S)z4Add an environment or distribution to an environmentrENr')r�)r�r3�newr
rrr	�__add__yszEnvironment.__add__)r�r�r�r�rL�PY_MAJORr�r+r,r(r/r�r	r1r�r5r7rrrr	rb�s	c@seZdZdZdS)rlaTAn error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    N)r�r�r�r�rrrr	rl�s
c@s�eZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zfdd�Z
edd��Zdd�Zdd�Zddd�ZdS)rdz'Manage resource extraction and packagesNcCs
i|_dS)N)�cached_files)r�rrr	r��szResourceManager.__init__cCst|�j|�S)zDoes the named resource exist?)rOr�)r��package_or_requirementr�rrr	rY�szResourceManager.resource_existscCst|�j|�S)z,Is the named resource an existing directory?)rOrZ)r�r:r�rrr	rZ�szResourceManager.resource_isdircCst|�j||�S)z4Return a true filesystem path for specified resource)rOr�)r�r:r�rrr	rW�sz!ResourceManager.resource_filenamecCst|�j||�S)z9Return a readable file-like object for specified resource)rOr�)r�r:r�rrr	rV�szResourceManager.resource_streamcCst|�j||�S)z%Return specified resource as a string)rOr�)r�r:r�rrr	rU�szResourceManager.resource_stringcCst|�j|�S)z1List the contents of the named resource directory)rOrX)r�r:r�rrr	rX�sz ResourceManager.resource_listdircCs]tj�d}|jpt�}td||f�}||_||_||_|�dS)z5Give an error message for problems extracting file(s)r�a}Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  %s

The Python egg cache directory is currently set to:

  %s

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
N)rDr�extraction_pathrarlr��
cache_path�original_error)r��old_excr<�errrrr	�extraction_error�s			z ResourceManager.extraction_errorc	Cso|jpt�}tjj||d|�}yt|�Wn|j�YnX|j|�d|j|<|S)a�Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        z-tmpr�)	r;rar�r�rFrr@�_warn_unsafe_extraction_pathr9)r��archive_name�names�extract_path�target_pathrrr	�get_cache_path�s


zResourceManager.get_cache_pathcCswtjdkr*|jtjd�r*dStj|�j}|tj@sV|tj@rsd|}tj	|t
�ndS)aN
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        �nt�windirNz�%s is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).)r�r r��environ�stat�st_mode�S_IWOTH�S_IWGRP�warnings�warn�UserWarning)r�r!�msgrrr	rA�s
&z,ResourceManager._warn_unsafe_extraction_pathcCs@tjdkr<tj|�jdBd@}tj||�ndS)a4Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        �posiximi�N)r�r rJrK�chmod)r��tempnamer#r!rrr	�postprocess	szResourceManager.postprocesscCs%|jrtd��n||_dS)a�Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        z5Can't change extraction path, files already extractedN)r9rIr;)r�r�rrr	r_s	z#ResourceManager.set_extraction_pathFcCsdS)aB
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        Nr)r��forcerrr	r`7sz!ResourceManager.cleanup_resources)r�r�r�r�r;r�rYrZrWrVrUrXr@rF�staticmethodrArUr_r`rrrr	rd�scCsytjdSWntk
r#YnXtjdkrCtjjd�Sd}dd|fd|fd|fdd|fg}x�|D]�\}}d}xn|D]5}|tjkr�tjj|tj|�}q�Pq�W|r�tjj||�}ntjj|d
�Sq�Wtd��dS)aDetermine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    �PYTHON_EGG_CACHErGz~/.python-eggszApplication Data�APPDATAN�USERPROFILE�	HOMEDRIVE�HOMEPATH�HOME�WINDIRr�zPython-Eggsz3Please set the PYTHON_EGG_CACHE enviroment variable�zAPPDATA)r_N)zUSERPROFILE)z	HOMEDRIVE�HOMEPATH)r`�zHOME)raN)zWINDIR)r�rIr�r r��
expanduserrF�RuntimeError)�app_data�	app_homesr�subdirr"r8rrr	raDs0
			
cCstjdd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    z[^A-Za-z0-9.]+�-)�re�sub)r rrr	romscCs%|jdd�}tjdd|�S)z�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    r�r?z[^A-Za-z0-9.]+rg)r�rhri)r�rrr	rpuscCstjdd|�j�S)z�Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    z[^A-Za-z0-9.]+r�)rhrir-)�extrarrr	ruscCs|jdd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    rgr�)r�)r rrr	rv�sc@sIeZdZidd�d6dd�d6dd�d6dd�d	6ejd
6ejd6ejd6Zed
d��Z	e
dd��Zedd��Zedd��Z
edd��Zedd��Zedd��Zeddd��Zedd��Zd e�kr!eZned!d"��Zed#d$��ZdS)%�MarkerEvaluationcCstjS)N)r�r rrrr	r
�szMarkerEvaluation.<lambda>�os_namecCstjS)N)rDrErrrr	r
�s�sys_platformcCstjj�dS)Nr)rDr�rrrrr	r
�s�python_full_versioncCsdtjdtjdfS)Nz%s.%srr�)rD�version_inforrrr	r
�s�python_version�platform_version�platform_machine�python_implementationcCsAy|j|�Wn)tk
r<|jtj�d�SYnXdS)z{
        Validate text as a PEP 426 environment marker; return an exception
        if invalid or False otherwise.
        r�F)rx�SyntaxError�normalize_exceptionrDr)r��textrrr	�is_invalid_marker�s

z"MarkerEvaluation.is_invalid_markercCsEidd6dd6}d|_d|_|j|j|j�|_|S)z�
        Given a SyntaxError from a marker evaluation, normalize the error message:
         - Remove indications of filename and line number.
         - Replace platform-specific error messages with standard error messages.
        zinvalid syntaxzunexpected EOF while parsingzparenthesis is never closedN)r#�linenor�rQ)�exc�subsrrr	ru�s
		z$MarkerEvaluation.normalize_exceptioncs;tjtj��fdd�tdt��d�D��S)Ncs#g|]}�j�|��qSr)�	interpret)�.0�i)r��nodelistrr	�
<listcomp>�s	z-MarkerEvaluation.and_test.<locals>.<listcomp>r�r@)�	functools�reduce�operator�and_�range�len)r�r~r)r�r~r	�and_test�szMarkerEvaluation.and_testcs;tjtj��fdd�tdt��d�D��S)Ncs#g|]}�j�|��qSr)r{)r|r})r�r~rr	r�s	z)MarkerEvaluation.test.<locals>.<listcomp>r�r@)r�r�r��or_r�r�)r�r~r)r�r~r	�test�szMarkerEvaluation.testcCsd|dd}|tjkrT|ddtjkrCtd��n|j|d�Std��dS)Nr�rr@zEmpty parenthesesz5Language feature not supported in environment markers)�token�LPAR�RPARrtr{)r�r~�trrr	�atom�szMarkerEvaluation.atomc
Cs�t|�dkr!td��n|dd}|d}|dtjkr�t|d�dkr�|dkrwd}q�d	}q�ny|j|�}Wn(tk
r�tt|�d
��YnX||j|d�|j|d��S)Nr�z5Chained comparison not allowed in environment markersr@r�rr�notznot inzis notz, operator not allowed in environment markers)r�rtr��NAME�get_opr�r��evaluate)r�r~�comp�coprrr	�
comparison�s
	
zMarkerEvaluation.comparisoncCs�i|jtj6|jtj6|jtj6|jtj6dd�d6dd�d6tjd6tjd6}ttd�r�|j|tj	<n||S)	NcSs
||kS)Nr)�x�yrrr	r
�sz)MarkerEvaluation.get_op.<locals>.<lambda>znot incSs
||kS)Nr)r�r�rrr	r
�s�inz==z!=�or_test)
r��symbolr�r�r�r��eq�ner�r�)r��op�opsrrr	r��s







zMarkerEvaluation.get_opNcCs#|jtj|�jd�d�S)ar
        Evaluate a PEP 426 environment marker on CPython 2.4+.
        Return a boolean indicating the marker result in this environment.
        Raise SyntaxError if marker is invalid.

        This implementation uses the 'parser' module, which is not implemented on
        Jython and has been superseded by the 'ast' module in Python 2.6 and
        later.
        r�)r{�parser�expr�totuple)r�rvrjrrr	rx�sz MarkerEvaluation.evaluate_markercCs�ddlm}|j�}x9|j�D]+}|jdd�}|j|�||<q)Wy|j||�}Wn5tk
r�tj	�d}t
|jd��YnX|S)z�
        Evaluate a PEP 426 environment marker using markerlib.
        Return a boolean indicating the marker result in this environment.
        Raise SyntaxError if marker is invalid.
        r)�
_markerlibr?r�r�)�pip._vendorr��default_environmentrr�rr{�	NameErrorrDrrtr=)r�rvr�r
r8�new_key�result�errr	�_markerlib_evaluate�s
z$MarkerEvaluation._markerlib_evaluater�cCsex t|�dkr"|d}qWy|j|d�}Wntk
rZtd��YnX||�S)Nr@r�rz)Comparison or logical expression expected)r�r�r�rt)r�r~r�rrr	r{s
zMarkerEvaluation.interpretcCs	x t|�dkr"|d}qW|d}|d}|tjkr�y|j|}Wn"tk
r{td|��YnX|�S|tjkr�|d}|dd�dks�|jd�s�|jd�s�d|kr�td	��n|dd�Std
��dS)Nr@r�rzUnknown name %rz'"z"""z'''�\z1Only plain strings allowed in environment markersz5Language feature not supported in environment markersr)r�r�r�r�r�rt�STRINGr�)r�r~�kindr r��srrr	r�s$



4zMarkerEvaluation.evaluate)r�r�r�rEr�r�rsr�r%rwrWrur�r�r�r�r�rxr�rr{r�rrrr	rk�s,






			rkc@seZdZdZdZdZdZdd�Zdd�Zdd�Z	d	d
�Z
dd�Zd
d�Ze
jd)kr�dd�Zndd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�ZdS)*r�zETry to implement resources and metadata for arbitrary PEP 302 loadersNcCs:t|dd�|_tjjt|dd��|_dS)Nr��__file__r�)r�r�r�r�r"�module_path)r�r�rrr	r�:szNullProvider.__init__cCs|j|j|�S)N)�_fnr�)r�r�r�rrr	r�>sz"NullProvider.get_resource_filenamecCst|j||��S)N)rr�)r�r�r�rrr	r�Asz NullProvider.get_resource_streamcCs|j|j|j|��S)N)�_getr�r�)r�r�r�rrr	r�Dsz NullProvider.get_resource_stringcCs|j|j|j|��S)N)�_hasr�r�)r�r�rrr	r�GszNullProvider.has_resourcecCs%|jo$|j|j|j|��S)N)�egg_infor�r�)r�r rrr	r�JszNullProvider.has_metadatarcCs)|js
dS|j|j|j|��S)Nr�)r�r�r�)r�r rrr	r�Ns	zNullProvider.get_metadatacCs2|js
dS|j|j|j|��jd�S)Nr�zutf-8)r�r�r��decode)r�r rrr	r�Ss	cCst|j|��S)N)rsr�)r�r rrr	r�XszNullProvider.get_metadata_linescCs|j|j|j|��S)N)�_isdirr�r�)r�r�rrr	rZ[szNullProvider.resource_isdircCs%|jo$|j|j|j|��S)N)r�r�r�)r�r rrr	r�^szNullProvider.metadata_isdircCs|j|j|j|��S)N)�_listdirr�r�)r�r�rrr	rXaszNullProvider.resource_listdircCs)|jr%|j|j|j|��SgS)N)r�r�r�)r�r rrr	r�ds	zNullProvider.metadata_listdircCs�d|}|j|�s,td|��n|j|�jdd�}|jdd�}|j|j|�}||d<tjj|�r�t	|||�nWddl
m}t|�d|j
d�|f||<t||d	�}t|||�dS)
Nzscripts/zNo script named %rz
�
�
r�r)�cacher
)r�rhr�r�r�r�r�r�r�r�	linecacher�r�rrr
)r�r�r��script�script_text�script_filenamer��script_coderrr	rNis

%zNullProvider.run_scriptcCstd��dS)Nz9Can't perform this operation for unregistered loader type)�NotImplementedError)r�r�rrr	r�{szNullProvider._hascCstd��dS)Nz9Can't perform this operation for unregistered loader type)r�)r�r�rrr	r��szNullProvider._isdircCstd��dS)Nz9Can't perform this operation for unregistered loader type)r�)r�r�rrr	r��szNullProvider._listdircCs&|r"tjj||jd��S|S)N�/)r�r�rFr)r��baser�rrr	r��szNullProvider._fncCs2t|jd�r"|jj|�Std��dS)N�get_dataz=Can't perform this operation for loaders without 'get_data()')r�r�r�r�)r�r�rrr	r��szNullProvider._get)r)r�r�r�r��egg_namer�r�r�r�r�r�r�r�rDror�r�rZr�rXr�rNr�r�r�r�r�rrrr	r�3s0c@s.eZdZdZdd�Zdd�ZdS)r�z&Provider based on a virtual filesystemcCstj||�|j�dS)N)r�r��
_setup_prefix)r�r�rrr	r��szEggProvider.__init__cCs�|j}d}x}||kr�|j�jd�rmtjj|�|_tjj|d�|_||_	Pn|}tjj
|�\}}qWdS)Nz.eggzEGG-INFO)r�r-�endswithr�r��basenamer�rFr��egg_rootr)r�r��oldr�rrr	r��s		zEggProvider._setup_prefixN)r�r�r�r�r�r�rrrr	r��sc@sReZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
r�z6Provides access to package resources in the filesystemcCstjj|�S)N)r�r�r�)r�r�rrr	r��szDefaultProvider._hascCstjj|�S)N)r�r�r)r�r�rrr	r��szDefaultProvider._isdircCs
tj|�S)N)r��listdir)r�r�rrr	r��szDefaultProvider._listdircCst|j|j|�d�S)N�rb)rr�r�)r�r�r�rrr	r��sz#DefaultProvider.get_resource_streamc
Cs/t|d�}z|j�SWd|j�XdS)Nr�)rr�close)r�r��streamrrr	r��szDefaultProvider._getN)	r�r�r�r�r�r�r�r�r�rrrr	r��sc@sPeZdZdZdd�ZZdd�Zdd�ZdZdd�Z	dS)	r�z.Provider that returns nothing for all requestscCsdS)NFr)r�r�rrr	r
�szEmptyProvider.<lambda>cCsdS)Nr�r)r�r�rrr	r
�scCsgS)Nr)r�r�rrr	r
�sNcCsdS)Nr)r�rrr	r��szEmptyProvider.__init__)
r�r�r�r�r�r�r�r�r�r�rrrr	r��sc
Cs�t�}tj|�}zYxR|j�D]D}|jdtj�}|j|�||<||dk	s(t�q(WWd|j	�X|S)af
    This builds a similar dictionary to the zipimport directory
    caches.  However instead of tuples, ZipInfo objects are stored.

    The translation of the tuple is as follows:
      * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep
              on pypy it is the same (one reason why distribute did work
              in some cases on pypy and win32).
      * [1] - zipinfo.compress_type
      * [2] - zipinfo.compress_size
      * [3] - zipinfo.file_size
      * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
              len(ascii encoding of filename) otherwise
      * [5] - (zipinfo.date_time[0] - 1980) << 9 |
               zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
      * [6] - (zipinfo.date_time[3] - 1980) << 11 |
               zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
      * [7] - zipinfo.CRC
    r�N)
r&�zipfile�ZipFile�namelistr�r��sep�getinfo�AssertionErrorr�)r��zipinfo�zfile�zitem�zpathrrr	�build_zipmanifest�s	r�c@s�eZdZdZdZdd�Zdd�Zdd�Zd	d
�Ze	dd��Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS)r�z"Resource support for zips and eggsNcCs?tj||�t|jj�|_|jjtj|_dS)N)	r�r�r�r��archiver�r�r��zip_pre)r�r�rrr	r��szZipProvider.__init__cCsF|j|j�r)|t|j�d�Std||jf��dS)Nz%s is not a subpath of %s)r�r�r�r�)r��fspathrrr	�
_zipinfo_nameszZipProvider._zipinfo_namecCsj|j|}|j|jtj�rM|t|j�dd�jtj�Std||jf��dS)Nr�z%s is not a subpath of %s)r�r�r�r�r�r�rr�)r��zip_pathr�rrr	�_partss

'zZipProvider._partscCs�|jstd��n|j|�}|j�}dj|j|��|kr~x*|D]}|j||j|��qXWn|j||�S)Nz5resource_filename() only supported for .egg, not .zipr�)r�r��_resource_to_zip�_get_eager_resourcesrFr��_extract_resource�
_eager_to_zip)r�r�r�r��eagersr rrr	r�s	
 z!ZipProvider.get_resource_filenamecCs/|j}|jd}tj|�}||fS)Nrr�r)rrr)�	file_size�	date_time�time�mktime)�zip_stat�sizer��	timestamprrr	�_get_date_and_size"s	
zZipProvider._get_date_and_sizec
Cs�||j�kr^x9|j�|D]'}|j|tjj||��}q#Wtjj|�S|j|j|�\}}ts�t	d��ny)|j
|j|j|��}|j
||�r�|Stddtjj|��\}}	tj||jj|��tj|�t|	||f�|j|	|�yt|	|�Wnmtjk
r�tjj|�r�|j
||�r�|Stjdkr�t|�t|	|�|Sn�YnXWntjk
r�|j�YnX|S)Nz>"os.rename" and "os.unlink" are not supported on this platformz	.$extract�dirrG)�_indexr�r�r�rFr"r�r�rrrFr�r��_is_current�_mkstemp�writer�r�r�rrUr�error�isfiler rr@)
r�r�r�r �lastr�r��	real_path�outf�tmpnamrrr	r�*s@$


zZipProvider._extract_resourcec	Cs�|j|j|�\}}tjj|�s2dStj|�}|j|ks_|j|krcdS|jj	|�}t
|d�}|j�}|j�||kS)zK
        Return True if the file_path is current for this zip_path
        Fr�)
r�r�r�r�r�rJ�st_size�st_mtimer�r�rrr�)	r��	file_pathr�r�r�rJ�zip_contents�f�
file_contentsrrr	r�[s
zZipProvider._is_currentcCsa|jdkrZg}x6dD].}|j|�r|j|j|��qqW||_n|jS)N�native_libs.txt�eager_resources.txt)r�r�)r�r�r
r�)r�r�r rrr	r�ls
z ZipProvider._get_eager_resourcescCs�y|jSWn�tk
r�i}x�|jD]y}|jtj�}x^|r�tjj|dd��}||kr�||j|d�PqF|j�g||<qFWq+W||_|SYnXdS)Nr�rr)	�	_dirindex�AttributeErrorr�rr�r�rFr�r)r��indr��parts�parentrrr	r�us
		zZipProvider._indexcCs.|j|�}||jkp-||j�kS)N)r�r�r�)r�r�r�rrr	r��szZipProvider._hascCs|j|�|j�kS)N)r�r�)r�r�rrr	r��szZipProvider._isdircCs%t|j�j|j|�f��S)N)rr�r�r�)r�r�rrr	r��szZipProvider._listdircCs|j|j|j|��S)N)r�r�r�)r�r�rrr	r��szZipProvider._eager_to_zipcCs|j|j|j|��S)N)r�r�r�)r�r�rrr	r��szZipProvider._resource_to_zip)r�r�r�r�r�r�r�r�r�rWr�r�r�r�r�r�r�r�r�r�rrrr	r��s 		
1	c@sFeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)r�a*Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    cCs
||_dS)N)r�)r�r�rrr	r��szFileMetadata.__init__cCs
|dkS)NzPKG-INFOr)r�r rrr	r��szFileMetadata.has_metadatacCsH|dkr8t|jd�}|j�}|j�|Std��dS)NzPKG-INFO�rUz(No metadata except PKG-INFO is available)rr�rr�r�)r�r r��metadatarrr	r��s
zFileMetadata.get_metadatacCst|j|��S)N)rsr�)r�r rrr	r��szFileMetadata.get_metadata_linesN)r�r�r�r�r�r�r�r�rrrr	r��s

c@s"eZdZdZdd�ZdS)r�aqMetadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir,project_name=dist_name,metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    cCs||_||_dS)N)r�r�)r�r�r�rrr	r��s	zPathMetadata.__init__N)r�r�r�r�r�rrrr	r��sc@s"eZdZdZdd�ZdS)r�z Metadata provider for .egg filescCsrt|j�|_|jtj|_||_|jrXtjj	|j|j�|_
n|j|_
|j�dS)z-Create a metadata provider from a zipimporterN)r�r�r�r�r�r�r��prefixr�rFr�r�)r��importerrrr	r��s		!zEggMetadata.__init__N)r�r�r�r�r�rrrr	r��sr&�_distribution_finderscCs|t|<dS)axRegister `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example.N)r)�
importer_type�distribution_finderrrr	r��scCs+t|�}tt|�}||||�S)z.Yield distributions accessible via `path_item`)rr�r)�	path_item�onlyr�finderrrr	r^�sccs�|jjd�rdSt|�}|jd�rHtj|d|�Vn|rRdSxf|jd�D]U}|jd�rbtjj	||�}x(t
tj|�|�D]}|Vq�WqbqbWdS)z@
    Find eggs in zip files; possibly multiple nested eggs.
    z.whlNzPKG-INFOrr�z.egg)
r�r�r�r�re�
from_filenamerXr�r�rF�find_eggs_in_zip�	zipimport�zipimporter)rr	r
r�subitem�subpathr�rrr	r
�sr
cCsfS)Nr)rr	r
rrr	�find_nothingsrccst|�}tjj|�rtj|tj�r|j�jd�rwtj	|dt
|tjj|d���Vqx�tj|�D]}}|j�}|jd�s�|jd�rtjj||�}tjj|�r�t
||�}nt
|�}tj|||dt�Vq�|r]|jd�r]x�ttjj||��D]}|VqKWq�|r�|jd�r�ttjj||��}z|j�}	Wd|j�XxU|	D]J}
|
j�s�q�nx.ttjj||
j���D]}|Vq�WPq�Wq�q�WndS)	z6Yield distributions accessible on a sys.path directoryz.eggrzEGG-INFOz	.egg-infoz
.dist-info�
precedencez	.egg-linkN)�_normalize_cachedr�r�r�access�R_OKr-r�rerr�rFr�r��
from_locationrr^r�	readlinesr��strip�rstrip)rr	r
r�r-�fullpathrr��
entry_file�entry_lines�liner�rrr	�find_on_path
s:'	 "
(	r�_namespace_handlers�_namespace_packagescCs|t|<dS)a�Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer,path_entry,moduleName,module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    N)r )r�namespace_handlerrrr	r�;scCs7t|�}|dkrdS|j|�}|dkr;dStjj|�}|dkr�tj|�}tj|<g|_t|�n!t	|d�s�t
d|��ntt|�}|||||�}|dk	r3|j}|j
|�|j|�x3|D](}||jkr|jj
|�qqWn|S)zEEnsure that named package includes a subpath of path_item (if needed)N�__path__zNot a package:)r�find_modulerDr�r��imp�
new_moduler#�_set_parent_nsr�r�r�r r��load_module)�packageNamer	rr�r��handlerrr�rrr	�
_handle_nsLs.	
	


r+cCstj�z�|tkrdStjd}}d|kr�dj|jd�dd��}t|�|tkr~t|�nytj	|j
}Wq�tk
r�td|��Yq�Xntj
|g�j|�tj
|g�x|D]}t||�q�WWdtj�XdS)z9Declare that package 'packageName' is a namespace packageNr?r�zNot a package:r)r%�acquire_lockr!rDr�rFrr[r�r�r#r�r�r�r�r+�release_lock)r)r�rr	rrr	r[gs&
"



c
Csbtj�zFx?tj|f�D]+}t||�}|r t||�q q WWdtj�XdS)zDEnsure that previously-declared namespace packages include path_itemN)r%r,r!r�r+r�r-)r	r�packagerrrr	r��s
cCs`tjj||jd�d�}t|�}x+|jD]}t|�|kr8Pq8q8W|SdS)zBCompute an ns-package subpath for a filesystem or zipfile importerr?r�Nr)r�r�rFrrr#)rr	r)r�r�
normalizedr�rrr	�file_ns_handler�s"r0cCsdS)Nr)rr	r)r�rrr	�null_ns_handler�sr1cCstjjtjj|��S)z1Normalize a file/dir name for comparison purposes)r�r��normcase�realpath)r#rrr	rz�scCs=y||SWn*tk
r8t|�||<}|SYnXdS)N)r�rz)r#r�r�rrr	r�s

rcCsU|jd�}|j�}|rQdj|�}ttj||tj|�ndS)Nr?)rrrF�setattrrDr�)r)rr rrrr	r'�s
r'ccs�t|t�rSxn|j�D]0}|j�}|r|jd�r|VqqWn-x*|D]"}xt|�D]}|VqmWqZWdS)zAYield non-empty/non-comment lines of a ``basestring`` or sequence�#N)r�r��
splitlinesrr�rs)�strsr��ssrrr	rs�s
z
\s*(#.*)?$z\s*\\\s*(#.*)?$z\s*((\w|[-.])+)z!\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)z\s*,z\s*\[z\s*\]z\w+(\.\w+)*$zL(?P<name>[^-]+)( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?z(\d+ | [a-z]+ | \.| -)�c�pre�previewzfinal-rg�rc�@�devccs{xotj|�D]^}t||�}|s|dkr>qn|dd�dkre|jd�Vqd|VqWdVdS)Nr?r��
0123456789r��*z*final)�component_rerr��zfill)r��partrrr	�_parse_version_parts�s
rDcCs�g}x�t|j��D]�}|jd�r�|dkrdx'|r`|ddkr`|j�q=Wnx'|r�|ddkr�|j�qgWn|j|�qWt|�S)a�Convert a version string to a chronologically-sortable key

    This is a rough cross between distutils' StrictVersion and LooseVersion;
    if you give it versions that would work with StrictVersion, then it behaves
    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    *possible* to create pathological version coding schemes that will fool
    this parser, but they should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    than any other pre-release tag.
    r@z*finalr�z*final-�00000000rr)rDr-r�rr��tuple)r�rrCrrr	rn�sc@s�eZdZdZffddd�Zdd�Zdd�Zd	ddd
d�Zdddd
�Ze	ddd��Z
e	ddd��Ze	ddd��ZdS)rgz3Object representing an advertised importable objectNcCsnt|�std|��n||_||_t|�|_tjddj|��j	|_	||_
dS)NzInvalid module namezx[%s]�,)�MODULErIr �module_namerF�attrsrfr�rFrr�)r�r rIrJrr�rrr	r�s		"zEntryPoint.__init__cCsfd|j|jf}|jr<|ddj|j�7}n|jrb|ddj|j�7}n|S)Nz%s = %s�:r?z [%s]rG)r rIrJrFr)r�r�rrr	�__str__s		zEntryPoint.__str__cCsdt|�S)NzEntryPoint.parse(%r))r�)r�rrr	r�#szEntryPoint.__repr__TcCs�|r|j||�nt|jt�t�dg�}xO|jD]D}yt||�}WqDtk
r�td||f��YqDXqDW|S)Nr�z%r has no %r attribute)rMr�rIrrJr�r�r�)r�rMr
rr��attrrrr	�load&s!
zEntryPoint.loadcCs]|jr%|jr%td|��ntttjtj|jj|j�||���dS)Nz&Can't require() without a distribution)	rr�rkrrr\r�r�r�)r�r
rrrr	rM0szEntryPoint.requirecCsy�f}}|jdd�\}}d|krz|jdd�\}}tjd|�}|jrnt�n|j}nd|kr�|jdd�\}}t|j��s�t�n|j�jd�}nWn!tk
r�td|��Yn#X||j�|j�|||�SdS)	aParse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        �=r��[zx[rKr?z9EntryPoint must be in 'name=module:attrs [extras]' formatN)	rrfr��specsrIrrHrr)r��srcr�rJrr �valuer�rrr	r�6s&
			
zEntryPoint.parsecCs�t|�std|��ni}xZt|�D]L}|j||�}|j|krptd||j��n|||j<q1W|S)zParse an entry point groupzInvalid group namezDuplicate entry point)rHrIrsr�r )r�rH�linesr��thisrr�rrr	�parse_groupVszEntryPoint.parse_groupcCs�t|t�r|j�}nt|�}i}x~|D]v\}}|dkrj|s[q7ntd��n|j�}||kr�td|��n|j|||�||<q7W|S)z!Parse a map of entry point groupsNz%Entry points must be listed in groupszDuplicate group name)r�r&r,rtrIrrV)r��datar��mapsrHrTrrr	�	parse_mapcszEntryPoint.parse_map)
r�r�r�r�r�rLr�rNrMr%r�rVrYrrrr	rgs	
cCsE|s
dSt|�}|djd�rAt|dd�d�S|S)Nr�r�zmd5=rr)r�)rr�r)r�parsedrrr	�_remove_md5_fragmentwsr[c	@s�eZdZdZdZddddededd�Zeddd��Z	e
dd	��Zd
d�Zdd
�Z
dd�Zdd�Zdd�Zdd�Zdd�Ze
dd��Ze
dd��Ze
dd��Ze
dd��Zfd d!�Zd"d#�Zdd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zedd.d/��Zd0d1�Zd2d3�Z dd4d5�Z!d6d7�Z"dd8d9�Z#d:d;�Z$d<d=�Z%d>d?�Z&e
d@dA��Z'dS)Brez5Wrap an actual or potential sys.path entry w/metadatazPKG-INFONcCsjt|pd�|_|dk	r3t|�|_n||_||_||_||_|p`t|_	dS)N�Unknown)
rorrp�_versionr*rErrr��	_provider)r�rrrr�r*rErrrr	r��s				zDistribution.__init__cKs�dgd\}}}}tjj|�\}}	|	j�tkr�t|�}
|
r||
jdddd�\}}}}nt|	j�}n|||d|d|d|d	||�S)
Nr�r �ver�pyverrJrr�r*rE)r�r��splitextr-�_distributionImpl�EGG_NAMErH)r�rr�rr)rr�r*rE�extrCrrr	r�s!zDistribution.from_locationcCs7t|df�|j|jt|j�|j|jfS)N�parsed_version)r�rr8r[rr*rE)r�rrr	r
�szDistribution.<lambda>cCs
t|j�S)N)�hash�hashcmp)r�rrr	�__hash__�szDistribution.__hash__cCs|j|jkS)N)rg)r�r3rrr	�__lt__�szDistribution.__lt__cCs|j|jkS)N)rg)r�r3rrr	�__le__�szDistribution.__le__cCs|j|jkS)N)rg)r�r3rrr	�__gt__�szDistribution.__gt__cCs|j|jkS)N)rg)r�r3rrr	�__ge__�szDistribution.__ge__cCs&t||j�sdS|j|jkS)NF)r�r�rg)r�r3rrr	�__eq__�szDistribution.__eq__cCs||kS)Nr)r�r3rrr	�__ne__�szDistribution.__ne__cCs>y|jSWn,tk
r9|jj�|_}|SYnXdS)N)�_keyr�rr-)r�r8rrr	r8�s

zDistribution.keycCs>y|jSWn,tk
r9t|j�|_}|SYnXdS)N)�_parsed_versionr�rnr�)r��pvrrr	re�s

zDistribution.parsed_versioncCs�y|jSWn�tk
r�xq|j|j�D]G}|j�jd�r.t|jdd�dj��|_|jSq.Wt	d|j|��YnXdS)Nzversion:rKr�z(Missing 'Version:' header and/or %s file)
r]r��
_get_metadata�PKG_INFOr-r�rprrrI)r�rrrr	r��s
%zDistribution.versioncCs�y|jSWn�tk
r�igd6}|_x�dD]�}x�t|j|��D]�\}}|r�d|kr�|jdd�\}}t|�r�g}q�t|�s�g}q�nt|�p�d}n|j|g�j	t
|��qRWq6W|SYnXdS)N�requires.txt�depends.txtrKr�)rtru)�_Distribution__dep_mapr�rtrrrrwrxrur�r
rm)r��dmr rjr��markerrrr	�_dep_map�s 

"	'zDistribution._dep_mapcCs�|j}g}|j|jdf��xT|D]L}y|j|t|��Wq/tk
rztd||f��Yq/Xq/W|S)z@List of Requirements needed for this distro if `extras` are usedNz%s has no such extra feature %r)ryr
r�rur�rk)r�rrw�depsrdrrr	r��s	

zDistribution.requiresccs5|j|�r1x|j|�D]}|VqWndS)N)r�r�)r�r rrrr	rr�szDistribution._get_metadatacCs~|dkrtj}n|j|�|tjkrzt|j�x6|jd�D]"}|tjkrQt|�qQqQWndS)z>Ensure distribution is importable on `path` (default=sys.path)Nznamespace_packages.txt)rDr�rr�rrrr�r[)r�r��pkgrrr	�activate	s

zDistribution.activatecCsOdt|j�t|j�|jp'tf}|jrK|d|j7}n|S)z@Return what this distribution's standard .egg filename should bez
%s-%s-py%srg)rvrr�r*r8rE)r�r#rrr	r�	s	zDistribution.egg_namecCs(|jrd||jfSt|�SdS)Nz%s (%s))rr�)r�rrr	r�	s	zDistribution.__repr__cCsNyt|dd�}Wntk
r0d}YnX|p:d}d|j|fS)Nr�z[unknown version]z%s %s)r�rIr)r�r�rrr	rL	s
zDistribution.__str__cCs.|jd�rt|��nt|j|�S)zADelegate all unrecognized public attributes to .metadata providerr�)r�r�r�r^)r�rMrrr	�__getattr__%	szDistribution.__getattr__cKs(|jt|�tjj|�||�S)N)rrr�r�r�)r�r#rr)rrr	r+	szDistribution.from_filenamecCstjd|j|jf�S)z?Return a ``Requirement`` that matches this distribution exactlyz%s==%s)rfr�rr�)r�rrr	r2	szDistribution.as_requirementcCsD|j||�}|dkr:td||ff��n|j�S)z=Return the `name` entry point of `group` or raise ImportErrorNzEntry point %r not found)rSr�rN)r�rHr r�rrr	rQ6	szDistribution.load_entry_pointcCsdy
|j}Wn4tk
rCtj|jd�|�}|_YnX|dk	r`|j|i�S|S)z=Return the entry point map for `group`, or the full entry mapzentry_points.txtN)�_ep_mapr�rgrYrrr�)r�rH�ep_maprrr	rR=	s

!zDistribution.get_entry_mapcCs|j|�j|�S)z<Return the EntryPoint object for `group`+`name`, or ``None``)rRr�)r�rHr rrr	rSI	szDistribution.get_entry_infoc	CsN|p|j}|sdSt|�}tjj|�}dd�|D�}x�t|�D]w\}}||krsPqW||krW|jtkrW|tjkr�|j	�n|j
||�|j
||�PqWqWW|tjkr�|j	�n|j|�dSxHy|j||d�}Wnt
k
r1PYqX||=||=|}qWdS)z@Insert self.location in path before its nearest parent directoryNcSs(g|]}|rt|�p!|�qSr)r)r|�prrr	rV	s	z*Distribution.insert_on.<locals>.<listcomp>r�)rrr�r�r"�	enumeraterr{rD�check_version_conflictrr��indexrI)	r�r��loc�nloc�bdir�npathr�r��nprrr	rM	s6




zDistribution.insert_oncCs�|jdkrdStj|jd��}t|j�}x�|jd�D]�}|tjksJ||ksJ|tkr}qJn|dkr�qJnt	tj|dd�}|r�t|�j
|�sJ|j
|j�r�qJntd|||jf�qJWdS)	N�
setuptoolsznamespace_packages.txtz
top_level.txt�
pkg_resources�siter�zIModule %s was already imported from %s, but %s is being added to sys.path)z
pkg_resourcesz
setuptoolszsite)r8r&r'rrrzrrDr�r!r�r��
issue_warning)r��nspr��modnamerrrr	r�t	s"z#Distribution.check_version_conflictcCs<y|jWn*tk
r7tdt|��dSYnXdS)NzUnbuilt egg for FT)r�rIr�r�)r�rrr	r0�	s
	zDistribution.has_versioncKsMx*d	D]"}|j|t||d��qW|jd|j�|j|�S)
z@Copy this distribution, substituting in any changed keyword argsrr�r*rErrNr)zproject_namezversionz
py_versionzplatformzlocationz
precedence)r�r�r^r�)r�r)rMrrr	�clone�	s
 zDistribution.clonecCsdd�|jD�S)NcSsg|]}|r|�qSrr)r|�deprrr	r�	s	z'Distribution.extras.<locals>.<listcomp>)ry)r�rrr	r�	szDistribution.extras)(r�r�r�r�rsr8r{r�r%r�propertyrgrhrirjrkrlrmrnr8rer�ryr�rrr|r�r�rLr}rrrQrRrSrr�r0r�rrrrr	re�sL		
	
'
c@sgeZdZdZdZejd�Zedd��Z	edd��Z
dd	�Zd
d�ZdS)
�DistInfoDistributionzGWrap an actual or potential sys.path entry w/metadata, .dist-info style�METADATAz([\(,])\s*(\d.*?)\s*([,\)])cCs\y|jSWnJtk
rWddlm}|�j|j|j��|_|jSYnXdS)zParse and cache metadatar)�ParserN)�	_pkg_infor��email.parserr��parsestrr�rs)r�r�rrr	�_parsed_pkg_info�	s
!z%DistInfoDistribution._parsed_pkg_infocCs:y|jSWn(tk
r5|j�|_|jSYnXdS)N)�_DistInfoDistribution__dep_mapr��_compute_dependencies)r�rrr	ry�	s

zDistInfoDistribution._dep_mapcCsy|jdd�dg}|dj�}|dj�}tj|jd|�}|jdd�jdd�}||fS)z�Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz')
        Split environment marker, add == prefix to version specifiers as
        necessary, and remove parenthesis.
        �;r�r�rz\1==\2\3�(�))rrrhri�EQEQr�)r��
requires_distr�distvers�markrrr	�_preparse_requirement�	sz*DistInfoDistribution._preparse_requirementc
sddlm}igd6}|_g�xc|jjd�pBgD]I}|j|�\}}tt|��}||�|_�j	|�qCW�fdd�}t
|d��}|dj|�xR|jjd�p�gD]8}	t|	j
��}	tt
||	��|�||	<q�W|S)z+Recompute this distribution's dependencies.r)rNz
Requires-Distc3s6x/�D]'}|jdi|d6�r|VqqWdS)N�overriderj)�	marker_fn)rjr�)r�rr	�reqs_for_extra�	s
zBDistInfoDistribution._compute_dependencies.<locals>.reqs_for_extrazProvides-Extra)�pip._vendor._markerlibrr�r��get_allr�rrmr�r��	frozensetr
rurr)
r��compile_markerrwr�r�r�rZr��commonrjr)r�r	r��	s$z*DistInfoDistribution._compute_dependenciesN)
r�r�r�r�rsrhrr�r�r�ryr�r�rrrr	r��	s
r�z.eggz	.egg-infoz
.dist-infoc
Os|d}t�}y-x&tj|�j|kr:|d7}qWWntk
rPYnXddlm}|d|d||�dS)Nr�r)rO�
stacklevel)rrDr�r�rIrNrO)r=r)�levelr.rOrrr	r��	s	
r�c#stt|����fdd�}x��D]�}t|�}|sUtd|��n|jd�}|j�}g}t||�}|r�|j�}|tt||dd�\}}}n|tt	||dd�\}}}dd	�|D�}t
|||�Vq+Wd
S)
z�Yield ``Requirement`` objects for each specification in `strs`

    `strs` must be an instance of ``basestring``, or a (possibly-nested)
    iterable thereof.
    csLg}x|||�st||�rayt��}d}Wqatk
r]td��YqaXn|||�}|s�td|d|d||d���n|j|j|��|j�}t||�}|r�|j�}q	|||�s	td|d||d���q	q	W|||�}|r?|j�}n|||fS)Nrz+\ must not appear on the last nonblank linez	Expected z in�atzExpected ',' or end-of-list in)�CONTINUEr�
StopIterationrIr�rH�end�COMMA)�ITEM�
TERMINATORrr��groups�	item_namer,rC)rTrr	�	scan_list�	s0

*#z%parse_requirements.<locals>.scan_listzMissing distribution specr�z'extra' namer@zversion speccSs(g|]\}}|t|�f�qSr)rp)r|r�r5rrr	r.
s	z&parse_requirements.<locals>.<listcomp>N)r�)r�r@)�iterrs�DISTROrIrHr��OBRACKET�CBRACKET�VERSION�LINE_ENDrf)r7r�rrCrr�rrQr)rTr	rm�	s"!
$$cCsAdd�|D�}|j�dd�|D�|ddd�<dS)NcSsg|]}|j|f�qSr)rg)r|r�rrr	r3
s	z_sort_dists.<locals>.<listcomp>cSsg|]\}}|�qSrr)r|�hc�drrr	r5
s	r�r)r)r��tmprrr	r.2
s
r.c@sjeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Ze	d
d��Z
dS)rfcCs�|t|�|_}||j�|_|_dd�|D�}|j�dd�|D�|_|ttt	|��|_
|_|jtdd�|D��t|j�f|_
t|j
�|_dS)z>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!cSs2g|](\}}t|�t|||f�qSr)rn�
state_machine)r|r�r0rrr	r=
s	z(Requirement.__init__.<locals>.<listcomp>cSs(g|]\}}}}||f�qSrr)r|rZ�transr�r_rrr	r?
s	cSs(g|]\}}}}||f�qSrr)r|rZr�r�r_rrr	rB
s	N)ro�unsafe_namer-rr8rrQrFrrur�rr��hashCmprf�_Requirement__hash)r�rrQrr�rrr	r�9
s
"zRequirement.__init__cCsXdjdd�|jD��}dj|j�}|rDd|}nd|j||fS)NrGcSsg|]}dj|��qS)r�)rF)r|r�rrr	rH
s	z'Requirement.__str__.<locals>.<listcomp>z[%s]z%s%s%s)rFrQrr)r�rQrrrr	rLG
s

zRequirement.__str__cCst|t�o|j|jkS)N)r�rfr�)r�r3rrr	rmM
szRequirement.__eq__c	Cst|t�r=|j|jkr%dS|jr[|j}q[nt|t�r[t|�}nd}dd�}x�|jD]{\}}}}||||�}|dkr�dS|dkr�dS|dkr�d}qw|dks�|dkrwd}qwqwW|dkrd}n|S)	NFcSs||k||kS)Nr)�a�brrr	r
W
sz*Requirement.__contains__.<locals>.<lambda>�F�TT�+rg)r�rer8r�rer�rn)	r�r�r��comparerZr�r�r_�actionrrr	r�P
s,		
	zRequirement.__contains__cCs|jS)N)r�)r�rrr	rhd
szRequirement.__hash__cCsdt|�S)NzRequirement.parse(%r))r�)r�rrr	r�g
szRequirement.__repr__cCsWtt|��}|rDt|�dkr2|dStd|��ntd|��dS)Nr�rzExpected only one requirementzNo requirements found)rrmr�rI)r�r�rrr	r�i
szRequirement.parseN)r�r�r�r�rLrmr�rhr�rWr�rrrr	rf8
sz--T�<zT-Tz<=zF+F�>zT+Fz>=zT..z==zF++z!=cCs@t|t�s9Gdd�d|t�}|jdd�S|jS)z&Get an mro for a type or classic classc@seZdZdS)z_get_mro.<locals>.clsN)r�r�r�rrrr	r��
sr�r�N)r��type�object�__mro__)r�rrr	�_get_mro}
sr�cCsAx:tt|dt|���D]}||kr||SqWdS)z2Return an adapter factory for `ob` from `registry`r�N)r�r�r�)�registryr9r�rrr	r��
s%r�cCs8tjj|�}tjj|�s4tj|�ndS)z1Ensure that the parent directory of `path` existsN)r�r�r"r�makedirs)r�r"rrr	ry�
sccs�d}g}x�t|�D]|}|jd�r�|jd�rv|sI|rW||fVn|dd�j�}g}q�td|��q|j|�qW||fVdS)arSplit a string or iterable thereof into (section,content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    NrP�]r�zInvalid section headingr)rsr�r�rrIr�)r��section�contentrrrr	rt�
s	cOsDddlm}tj}ztt_|||�SWd|t_XdS)Nr)�mkstemp)�tempfiler�r�r�os_open)r=r)r��old_openrrr	r��
s		r�cCs@x9tt�D]+}|jd�s
tt|�||<q
q
WdS)Nr�)r��_managerr�r�)r.r rrr	�_initialize�
sr�r�cCs
|j�S)N)r|)r�rrr	r
�
s)�r�rDr�r�rhr%r�rrNrJr��pkgutilr�r�r�rErrrr��urllib.parser�r�Zsetsrr�r�	cStringIOrrr��iorrrrrrrr��os.pathrrro�implementationr Zimportlib._bootstrap�
_bootstrap�importlib_bootstrapr�rr%r*r1r3r6r:r;r<�
_sget_none�
_sset_nonerL�__all__�	Exceptionrhrirjrkr�r�r8r{r|r}r~rr�rOrGr�rArrBr�rqrrrNr�rPrQrRrSr�r�r�rcrbr�rcrlrdrarorprurvrkrwrwrxr�r�r�r��SourceFileLoaderr�r�r�r�rr�r�r�r�r^r
rr�ImpImporter�
FileFinderr�r+r[r�r0r1rzrr'rsrCr�r�r�r�r�r�r�rH�VERBOSE�
IGNORECASErcrAr�r�rDrnrgr[rer�rbr�rmr.rfr�r�r�ryrtr�r�r�rr�r\rMrTr#r]r�rrr�r�rrrr	�<module>s�




'

									1�Y��)
	�		c
	!�

( 

,)h	�!?
>:
	
					python3.4/site-packages/pip/_vendor/__pycache__/six.cpython-34.pyc000064400000046464151735047440020745 0ustar00�
�Re�[�A@sdZddlZddlZddlZdZdZejddkZejddkZer�e	fZ
efZe
fZe	ZeZejZn�efZ
eefZe
ejfZeZe	Zejjd�r�ed:�ZnWGd
d�de�Zyee��Wnek
r-ed<�ZYn
Xed>�Z[d
d�Zdd�ZGdd�de�Z Gdd�de �Z!Gdd�dej"�Z#Gdd�de �Z$Gdd�de#�Z%e$dddd�e$ddd d!d�e$d"ddd#d"�e$d$d%d d&d$�e$d'dd d(d'�e$d)d%d d*d)�e$d+d%d,d-�e$d.d%d/�e$ddd�e$d0d0d1�e$d*d%d d*d)�e$d2dd d3d2�e$d4ddd5d4�e!d d%�e!d6d7�e!d8d9�e!d:d;d<�e!d=d>d?�e!d@dAdB�e!dCdDdE�e!dFdGdH�e!dIdJdK�e!dLdMdN�e!dOdPdQ�e!dRdSdT�e!dUdUdV�e!dWdWdV�e!dXdXdV�e!dYdYdZ�e!d[d\�e!d]d^�e!d_d`�e!dadbda�e!dcdd�e!dedfdg�e!dhdidj�e!dkdldm�e!dndodp�e!dqdrds�e!dtdudv�e!dwdxdy�e!dzd{d|�e!d}d~d�e!d�d�d��e!d�d�dj�e!d�d�d��e!d�d�d��e!d�d�dp�e!d�e&d�d��e!d�e&d�d��e!d�e&d�e&d��e!d�d�d��e!d�d�d��e!d�d�d��e!d�d��g7Z'xKe'D]CZ(e)e%e(j*e(�e+e(e!�r:e(ej,e&d�e(j*<q:q:W[(e'e%_'e%e&d��Z-ej,e&d�<Gd�d��d�e#�Z.e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��gZ/x!e/D]Z(e)e.e(j*e(�q�W[(e/e._'e.e&d��ej,e&d�<ej,e&d�<Gd�d��d�e#�Z0e$d�d�d��e$d�d�d��e$d�d�d��gZ1x!e1D]Z(e)e0e(j*e(�qbW[(e1e0_'e0e&d��ej,e&d�<ej,e&d�<Gd�d��d�e#�Z2e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��g!Z3x!e3D]Z(e)e2e(j*e(�q�	W[(e3e2_'e2e&d��ej,e&d�<ej,e&d�<Gd�d��d�e#�Z4e$d�d�d��e$d�d�d��e$d�d�d��e$d�d�d��gZ5x!e5D]Z(e)e4e(j*e(�qy
W[(e5e4_'e4e&d��ej,e&d�<ej,e&d�<Gd�d��d�e#�Z6e$d�d�d��gZ7x!e7D]Z(e)e6e(j*e(�q�
W[(e7e6_'e6e&d��ej,e&d�<ej,e&d�<Gd�d��d�ej"�Z8e8e&d��ej,e&d�<d�d��Z9d�d��Z:er�d�Z;d�Z<d�Z=d�Z>d�Z?d�Z@d�ZAd�ZBd�ZCd�ZDn<d�Z;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDy
eEZFWneGk
rHd	d
�ZFYnXeFZEy
eHZHWneGk
rydd�ZHYnXer�d
d�ZIejJZKeZLn4dd�ZIdd�ZKGdd�de�ZLeHZHeeId�ejMe;�ZNejMe<�ZOejMe=�ZPejMe>�ZQejMe?�ZRejMe@�ZSdd�ZTdd�ZUdd�ZVdd�ZWerdd�ZXdd�ZYeZZ[ejddkr�
dd�Z\nej]ddd �Z\ej^d�Z_ej`ZaebZcddldZdedjeZeedjfZfnad!d�ZXd"d�ZYe[Z[eZZ\d#d$�Z_d%d&�Zad'd(�ZcddleZeeejeZeZfeeXd)�eeYd*�er�ege-jhd+�Zidd,d-�Zjnddd.d/�Zieid0�ege-jhd1d�Zkekdkr�d2d3�Zkneejd4�d5d6�Zld7d8�ZmdS(?z6Utilities for writing code that runs on Python 2 and 3�Nz'Benjamin Peterson <benjamin@python.org>z1.6.1���java��c@seZdZdd�ZdS)�XcCsdS)Nrrl�)�selfrr�*/tmp/pip-ztkk0jow-build/pip/_vendor/six.py�__len__8sz	X.__len__N)�__name__�
__module__�__qualname__rrrrr
r7sr�?cCs
||_dS)z Add documentation to a function.N)�__doc__)�func�docrrr
�_add_docEsrcCst|�tj|S)z7Import module, returning the module after the last dot.)�
__import__�sys�modules)�namerrr
�_import_moduleJs
rc@s(eZdZdd�Zdd�ZdS)�
_LazyDescrcCs
||_dS)N)r)r	rrrr
�__init__Rsz_LazyDescr.__init__cCsby|j�}Wn%tk
r7td|j��YnXt||j|�t|j|j�|S)Nz%s could not be imported )�_resolve�ImportError�AttributeErrorr�setattr�delattr�	__class__)r	�obj�tp�resultrrr
�__get__Us
z_LazyDescr.__get__N)rr
rrr$rrrr
rPsrcs=eZdZd�fdd�Zdd�Zdd�Z�S)�MovedModuleNcsJtt|�j|�tr=|dkr1|}n||_n	||_dS)N)�superr%r�PY3�mod)r	r�old�new)r rr
rcs	zMovedModule.__init__cCs
t|j�S)N)rr()r	rrr
rlszMovedModule._resolvecCs�|dkr-|jtjkr-t|��ny|j�}Wntk
r]t|��YnXt||�}t|||�|S)N�__file__r�__path__)z__file__z__name__z__path__)r(rrrrr�getattrr)r	�attr�_module�valuerrr
�__getattr__os

zMovedModule.__getattr__)rr
rrrr1rr)r r
r%as	r%cs4eZdZ�fdd�Zdd�ZgZ�S)�_LazyModulecs)tt|�j|�|jj|_dS)N)r&r2rr r)r	r)r rr
r�sz_LazyModule.__init__cCs*ddg}|dd�|jD�7}|S)NrrcSsg|]}|j�qSr)r)�.0r.rrr
�
<listcomp>�s	z'_LazyModule.__dir__.<locals>.<listcomp>)�_moved_attributes)r	�attrsrrr
�__dir__�sz_LazyModule.__dir__)rr
rrr7r5rr)r r
r2�sr2cs4eZdZdd�fdd�Zdd�Z�S)�MovedAttributeNcs�tt|�j|�trp|dkr1|}n||_|dkrd|dkr[|}qd|}n||_n'||_|dkr�|}n||_dS)N)r&r8rr'r(r.)r	r�old_mod�new_mod�old_attr�new_attr)r rr
r�s						zMovedAttribute.__init__cCst|j�}t||j�S)N)rr(r-r.)r	�modulerrr
r�szMovedAttribute._resolve)rr
rrrrr)r r
r8�sr8c@seZdZdZdS)�_MovedItemszLazy loading of moved objectsN)rr
rrrrrr
r>�sr>�	cStringIO�io�StringIO�filter�	itertools�builtins�ifilter�filterfalse�ifilterfalse�input�__builtin__�	raw_input�map�imap�range�xrange�
reload_module�imp�reload�reduce�	functools�
UserString�collections�zip�izip�zip_longest�izip_longest�configparser�ConfigParser�copyreg�copy_reg�dbm_gnu�gdbmzdbm.gnu�http_cookiejar�	cookielibzhttp.cookiejar�http_cookies�Cookiezhttp.cookies�
html_entities�htmlentitydefsz
html.entities�html_parser�
HTMLParserzhtml.parser�http_client�httplibzhttp.client�email_mime_multipartzemail.MIMEMultipartzemail.mime.multipart�email_mime_textzemail.MIMETextzemail.mime.text�email_mime_basezemail.MIMEBasezemail.mime.base�BaseHTTPServerzhttp.server�
CGIHTTPServer�SimpleHTTPServer�cPickle�pickle�queue�Queue�reprlib�repr�socketserver�SocketServer�_thread�thread�tkinter�Tkinter�tkinter_dialog�Dialogztkinter.dialog�tkinter_filedialog�
FileDialogztkinter.filedialog�tkinter_scrolledtext�ScrolledTextztkinter.scrolledtext�tkinter_simpledialog�SimpleDialogztkinter.simpledialog�tkinter_tix�Tixztkinter.tix�tkinter_ttk�ttkztkinter.ttk�tkinter_constants�Tkconstantsztkinter.constants�tkinter_dnd�Tkdndztkinter.dnd�tkinter_colorchooser�tkColorChooserztkinter.colorchooser�tkinter_commondialog�tkCommonDialogztkinter.commondialog�tkinter_tkfiledialog�tkFileDialog�tkinter_font�tkFontztkinter.font�tkinter_messagebox�tkMessageBoxztkinter.messagebox�tkinter_tksimpledialog�tkSimpleDialog�urllib_parsez.moves.urllib_parsezurllib.parse�urllib_errorz.moves.urllib_errorzurllib.error�urllibz
.moves.urllib�urllib_robotparser�robotparserzurllib.robotparser�
xmlrpc_client�	xmlrpclibz
xmlrpc.client�
xmlrpc_serverz
xmlrpc.server�winreg�_winregz.moves.z.movesc@seZdZdZdS)�Module_six_moves_urllib_parsez7Lazy loading of moved objects in six.moves.urllib_parseN)rr
rrrrrr
r��sr��ParseResult�urlparse�SplitResult�parse_qs�	parse_qsl�	urldefrag�urljoin�urlsplit�
urlunparse�
urlunsplit�quote�
quote_plus�unquote�unquote_plus�	urlencode�
splitqueryz.moves.urllib.parsec@seZdZdZdS)�Module_six_moves_urllib_errorz7Lazy loading of moved objects in six.moves.urllib_errorN)rr
rrrrrr
r�sr��URLError�urllib2�	HTTPError�ContentTooShortErrorz.moves.urllib.errorc@seZdZdZdS)�Module_six_moves_urllib_requestz9Lazy loading of moved objects in six.moves.urllib_requestN)rr
rrrrrr
r�+sr��urlopenzurllib.request�install_opener�build_opener�pathname2url�url2pathname�
getproxies�Request�OpenerDirector�HTTPDefaultErrorHandler�HTTPRedirectHandler�HTTPCookieProcessor�ProxyHandler�BaseHandler�HTTPPasswordMgr�HTTPPasswordMgrWithDefaultRealm�AbstractBasicAuthHandler�HTTPBasicAuthHandler�ProxyBasicAuthHandler�AbstractDigestAuthHandler�HTTPDigestAuthHandler�ProxyDigestAuthHandler�HTTPHandler�HTTPSHandler�FileHandler�
FTPHandler�CacheFTPHandler�UnknownHandler�HTTPErrorProcessor�urlretrieve�
urlcleanup�	URLopener�FancyURLopener�proxy_bypassz.moves.urllib.requestz.moves.urllib_requestc@seZdZdZdS)� Module_six_moves_urllib_responsez:Lazy loading of moved objects in six.moves.urllib_responseN)rr
rrrrrr
r�[sr��addbasezurllib.response�addclosehook�addinfo�
addinfourlz.moves.urllib.responsez.moves.urllib_responsec@seZdZdZdS)�#Module_six_moves_urllib_robotparserz=Lazy loading of moved objects in six.moves.urllib_robotparserN)rr
rrrrrr
r�nsr��RobotFileParserz.moves.urllib.robotparserz.moves.urllib_robotparserc@sweZdZdZejedZejedZejedZejedZ	ejedZ
dd�Zd	S)
�Module_six_moves_urllibzICreate a six.moves.urllib namespace that resembles the Python 3 namespacez.moves.urllib_parsez.moves.urllib_errorz.moves.urllib_requestz.moves.urllib_responsez.moves.urllib_robotparsercCsdddddgS)N�parse�error�request�responser�r)r	rrr
r7�szModule_six_moves_urllib.__dir__N)rr
rrrrr�r�r�r�r�r7rrrr
r�~sr�cCstt|j|�dS)zAdd an item to six.moves.N)rr>r)�moverrr
�add_move�sr�cCs`ytt|�WnHtk
r[ytj|=Wn%tk
rVtd|f��YnXYnXdS)zRemove item from six.moves.zno such move, %rN)rr>r�moves�__dict__�KeyError)rrrr
�remove_move�s

r��__func__�__self__�__closure__�__code__�__defaults__�__globals__�keys�values�items�lists�im_funcZim_selfZfunc_closureZ	func_codeZ
func_defaultsZfunc_globals�iterkeys�
itervalues�	iteritems�	iterlistscCs
|j�S)N)�next)�itrrr
�advance_iterator�sr�cCs tdd�t|�jD��S)Ncss|]}d|jkVqdS)�__call__N)r�)r3�klassrrr
�	<genexpr>�szcallable.<locals>.<genexpr>)�any�type�__mro__)r!rrr
�callable�srcCs|S)Nr)�unboundrrr
�get_unbound_function�srcCs|jS)N)r�)rrrr
r�scCstj|||j�S)N)�types�
MethodTyper )rr!rrr
�create_bound_method�sr	c@seZdZdd�ZdS)�IteratorcCst|�j|�S)N)r�__next__)r	rrr
r��sz
Iterator.nextN)rr
rr�rrrr
r
�sr
z3Get the function out of a possibly unbound functioncKstt|t�|��S)z1Return an iterator over the keys of a dictionary.)�iterr-�	_iterkeys)�d�kwrrr
r��scKstt|t�|��S)z3Return an iterator over the values of a dictionary.)rr-�_itervalues)rrrrr
r��scKstt|t�|��S)z?Return an iterator over the (key, value) pairs of a dictionary.)rr-�
_iteritems)rrrrr
r��scKstt|t�|��S)zBReturn an iterator over the (key, [values]) pairs of a dictionary.)rr-�
_iterlists)rrrrr
r��scCs
|jd�S)Nzlatin-1)�encode)�srrr
�b�srcCs|S)Nr)rrrr
�u�srcCs
t|f�S)N)�bytes)�irrr
�int2bytesr�to_bytes�bigcCs|S)Nr)rrrr
rscCst|jdd�d�S)Nz\\z\\\\Zunicode_escape)�unicode�replace)rrrr
rscCst|d�S)Nr)�ord)�bsrrr
�byte2intsr cCst||�S)N)r)�bufrrrr
�
indexbytessr"cCsdd�|D�S)Ncss|]}t|�VqdS)N)r)r3�byterrr
rsziterbytes.<locals>.<genexpr>r)r!rrr
�	iterbytessr$zByte literalzText literal�execcCs+|j|k	r!|j|��n|�dS)N)�
__traceback__�with_traceback)r"r0�tbrrr
�reraise#sr)cCse|dkrBtjd�}|j}|dkr<|j}n~n|dkrW|}ntd�dS)zExecute code in a namespace.Nrzexec _code_ in _globs_, _locs_)r�	_getframe�	f_globals�f_localsr%)Z_code_Z_globs_Z_locs_�framerrr
�exec_)s		r.z9def reraise(tp, value, tb=None):
    raise tp, value, tb
�printc
s�|jdtj���dkr%dS�fdd�}d}|jdd�}|dk	r�t|t�rsd}q�t|t�s�td��q�n|jd	d�}|dk	r�t|t�r�d}q�t|t�s�td
��q�n|rtd��n|s3x*|D]}t|t�r
d}Pq
q
Wn|rTtd�}td
�}nd}d
}|dkru|}n|dkr�|}nx7t|�D])\}	}|	r�||�n||�q�W||�dS)z4The new-style print function for Python 2.4 and 2.5.�fileNcs�t|t�st|�}nt�t�r�t|t�r��jdk	r�t�dd�}|dkrrd}n|j�j|�}n�j|�dS)N�errors�strict)	�
isinstance�
basestring�strr0r�encodingr-r�write)�datar1)�fprr
r7Bs	zprint_.<locals>.writeF�sepTzsep must be None or a string�endzend must be None or a stringz$invalid keyword arguments to print()�
� )�popr�stdoutr3rr5�	TypeError�	enumerate)
�args�kwargsr7Zwant_unicoder:r;�arg�newline�spacerr)r9r
�print_=sL		
		
rGzReraise an exception.cGs|d|i�S)z%Create a base class with a metaclass.�NewBaser)�meta�basesrrr
�with_metaclassusrKcs�fdd�}|S)z6Class decorator for creating a class with a metaclass.cs�|jj�}|jdd�|jdd�|jd�}|dk	r�t|t�re|g}nx|D]}|j|�qlWn�|j|j|�S)Nr��__weakref__�	__slots__)r��copyr>�getr3r5r�	__bases__)�cls�	orig_vars�slots�	slots_var)�	metaclassrr
�wrapper{s
zadd_metaclass.<locals>.wrapperr)rUrVr)rUr
�
add_metaclassysrWli���li���ll����)nr�operatorrr�
__author__�__version__�version_info�PY2r'r5�string_types�int�
integer_typesr�class_types�	text_typer�binary_type�maxsize�MAXSIZEr4�longZ	ClassTyper�platform�
startswith�objectr�len�
OverflowErrorrrrr%�
ModuleTyper2r8r>rr5r.rrr3rr�r��_urllib_parse_moved_attributesr��_urllib_error_moved_attributesr�� _urllib_request_moved_attributesr��!_urllib_response_moved_attributesr��$_urllib_robotparser_moved_attributesr�r�r��
_meth_func�
_meth_self�
_func_closure�
_func_code�_func_defaults�
_func_globalsr
rrrr�r��	NameErrorrrrr	r
�
attrgetter�get_method_function�get_method_self�get_function_closure�get_function_code�get_function_defaults�get_function_globalsr�r�r�r�rr�chr�unichrr�methodcaller�
itemgetterr �getitemr"rr$r@rA�BytesIOr-rDr.r)rGrKrWrrrr
�<module>s*				
$			
	
	*
	*
	*
	*
	*	



				



5
python3.4/site-packages/pip/_vendor/__pycache__/re-vendor.cpython-34.pyc000064400000002233151735047450022026 0ustar00�
�Re�@s�ddlZddlZddlZddlZddlZejjejje��Z	dd�Z
dd�Zdd�Ze
dkr�eej�d	kr�e
�nejd
dkr�e�q�ejd
dkr�e�q�e
�ndS)�NcCstd�tjd�dS)Nz"Usage: re-vendor.py [clean|vendor]�)�print�sys�exit�rr�0/tmp/pip-ztkk0jow-build/pip/_vendor/re-vendor.py�usage	s
rcCsqxNtjt�D]=}tjjt|�}tjj|�rtj|�qqWtjtjjtd��dS)Nzsix.py)	�os�listdir�here�path�join�isdir�shutil�rmtree�unlink)�fn�dirnamerrr�clean
s
rcCsGtjddtddg�x$tjd�D]}tj|�q,WdS)N�installz-tz-rz
vendor.txtz
*.egg-info)�pip�mainr�globrr)rrrr�vendorsr�__main__�r)r	rrrrr�abspathr�__file__rrrr�__name__�len�argvrrrr�<module>s 


python3.4/site-packages/pip/_vendor/six.py000064400000055646151735047450014466 0ustar00"""Utilities for writing code that runs on Python 2 and 3"""

# Copyright (c) 2010-2014 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import operator
import sys
import types

__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.6.1"


# Useful for very coarse version differentiation.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3

if PY3:
    string_types = str,
    integer_types = int,
    class_types = type,
    text_type = str
    binary_type = bytes

    MAXSIZE = sys.maxsize
else:
    string_types = basestring,
    integer_types = (int, long)
    class_types = (type, types.ClassType)
    text_type = unicode
    binary_type = str

    if sys.platform.startswith("java"):
        # Jython always uses 32 bits.
        MAXSIZE = int((1 << 31) - 1)
    else:
        # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
        class X(object):
            def __len__(self):
                return 1 << 31
        try:
            len(X())
        except OverflowError:
            # 32-bit
            MAXSIZE = int((1 << 31) - 1)
        else:
            # 64-bit
            MAXSIZE = int((1 << 63) - 1)
        del X


def _add_doc(func, doc):
    """Add documentation to a function."""
    func.__doc__ = doc


def _import_module(name):
    """Import module, returning the module after the last dot."""
    __import__(name)
    return sys.modules[name]


class _LazyDescr(object):

    def __init__(self, name):
        self.name = name

    def __get__(self, obj, tp):
        try:
            result = self._resolve()
        except ImportError:
            # See the nice big comment in MovedModule.__getattr__.
            raise AttributeError("%s could not be imported " % self.name)
        setattr(obj, self.name, result) # Invokes __set__.
        # This is a bit ugly, but it avoids running this again.
        delattr(obj.__class__, self.name)
        return result


class MovedModule(_LazyDescr):

    def __init__(self, name, old, new=None):
        super(MovedModule, self).__init__(name)
        if PY3:
            if new is None:
                new = name
            self.mod = new
        else:
            self.mod = old

    def _resolve(self):
        return _import_module(self.mod)

    def __getattr__(self, attr):
        # It turns out many Python frameworks like to traverse sys.modules and
        # try to load various attributes. This causes problems if this is a
        # platform-specific module on the wrong platform, like _winreg on
        # Unixes. Therefore, we silently pretend unimportable modules do not
        # have any attributes. See issues #51, #53, #56, and #63 for the full
        # tales of woe.
        #
        # First, if possible, avoid loading the module just to look at __file__,
        # __name__, or __path__.
        if (attr in ("__file__", "__name__", "__path__") and
            self.mod not in sys.modules):
            raise AttributeError(attr)
        try:
            _module = self._resolve()
        except ImportError:
            raise AttributeError(attr)
        value = getattr(_module, attr)
        setattr(self, attr, value)
        return value


class _LazyModule(types.ModuleType):

    def __init__(self, name):
        super(_LazyModule, self).__init__(name)
        self.__doc__ = self.__class__.__doc__

    def __dir__(self):
        attrs = ["__doc__", "__name__"]
        attrs += [attr.name for attr in self._moved_attributes]
        return attrs

    # Subclasses should override this
    _moved_attributes = []


class MovedAttribute(_LazyDescr):

    def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
        super(MovedAttribute, self).__init__(name)
        if PY3:
            if new_mod is None:
                new_mod = name
            self.mod = new_mod
            if new_attr is None:
                if old_attr is None:
                    new_attr = name
                else:
                    new_attr = old_attr
            self.attr = new_attr
        else:
            self.mod = old_mod
            if old_attr is None:
                old_attr = name
            self.attr = old_attr

    def _resolve(self):
        module = _import_module(self.mod)
        return getattr(module, self.attr)



class _MovedItems(_LazyModule):
    """Lazy loading of moved objects"""


_moved_attributes = [
    MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
    MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
    MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"),
    MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
    MovedAttribute("map", "itertools", "builtins", "imap", "map"),
    MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("reload_module", "__builtin__", "imp", "reload"),
    MovedAttribute("reduce", "__builtin__", "functools"),
    MovedAttribute("StringIO", "StringIO", "io"),
    MovedAttribute("UserString", "UserString", "collections"),
    MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
    MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),

    MovedModule("builtins", "__builtin__"),
    MovedModule("configparser", "ConfigParser"),
    MovedModule("copyreg", "copy_reg"),
    MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
    MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
    MovedModule("http_cookies", "Cookie", "http.cookies"),
    MovedModule("html_entities", "htmlentitydefs", "html.entities"),
    MovedModule("html_parser", "HTMLParser", "html.parser"),
    MovedModule("http_client", "httplib", "http.client"),
    MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
    MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
    MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
    MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
    MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
    MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
    MovedModule("cPickle", "cPickle", "pickle"),
    MovedModule("queue", "Queue"),
    MovedModule("reprlib", "repr"),
    MovedModule("socketserver", "SocketServer"),
    MovedModule("_thread", "thread", "_thread"),
    MovedModule("tkinter", "Tkinter"),
    MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
    MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
    MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
    MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
    MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
    MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
    MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
    MovedModule("tkinter_colorchooser", "tkColorChooser",
                "tkinter.colorchooser"),
    MovedModule("tkinter_commondialog", "tkCommonDialog",
                "tkinter.commondialog"),
    MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_font", "tkFont", "tkinter.font"),
    MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
    MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
                "tkinter.simpledialog"),
    MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
    MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
    MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
    MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
    MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
    MovedModule("xmlrpc_server", "xmlrpclib", "xmlrpc.server"),
    MovedModule("winreg", "_winreg"),
]
for attr in _moved_attributes:
    setattr(_MovedItems, attr.name, attr)
    if isinstance(attr, MovedModule):
        sys.modules[__name__ + ".moves." + attr.name] = attr
del attr

_MovedItems._moved_attributes = _moved_attributes

moves = sys.modules[__name__ + ".moves"] = _MovedItems(__name__ + ".moves")


class Module_six_moves_urllib_parse(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_parse"""


_urllib_parse_moved_attributes = [
    MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
    MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
    MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
    MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
    MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
    MovedAttribute("urljoin", "urlparse", "urllib.parse"),
    MovedAttribute("urlparse", "urlparse", "urllib.parse"),
    MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
    MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
    MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
    MovedAttribute("quote", "urllib", "urllib.parse"),
    MovedAttribute("quote_plus", "urllib", "urllib.parse"),
    MovedAttribute("unquote", "urllib", "urllib.parse"),
    MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
    MovedAttribute("urlencode", "urllib", "urllib.parse"),
    MovedAttribute("splitquery", "urllib", "urllib.parse"),
]
for attr in _urllib_parse_moved_attributes:
    setattr(Module_six_moves_urllib_parse, attr.name, attr)
del attr

Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes

sys.modules[__name__ + ".moves.urllib_parse"] = sys.modules[__name__ + ".moves.urllib.parse"] = Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse")


class Module_six_moves_urllib_error(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_error"""


_urllib_error_moved_attributes = [
    MovedAttribute("URLError", "urllib2", "urllib.error"),
    MovedAttribute("HTTPError", "urllib2", "urllib.error"),
    MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
]
for attr in _urllib_error_moved_attributes:
    setattr(Module_six_moves_urllib_error, attr.name, attr)
del attr

Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes

sys.modules[__name__ + ".moves.urllib_error"] = sys.modules[__name__ + ".moves.urllib.error"] = Module_six_moves_urllib_error(__name__ + ".moves.urllib.error")


class Module_six_moves_urllib_request(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_request"""


_urllib_request_moved_attributes = [
    MovedAttribute("urlopen", "urllib2", "urllib.request"),
    MovedAttribute("install_opener", "urllib2", "urllib.request"),
    MovedAttribute("build_opener", "urllib2", "urllib.request"),
    MovedAttribute("pathname2url", "urllib", "urllib.request"),
    MovedAttribute("url2pathname", "urllib", "urllib.request"),
    MovedAttribute("getproxies", "urllib", "urllib.request"),
    MovedAttribute("Request", "urllib2", "urllib.request"),
    MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
    MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
    MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
    MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
    MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
    MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
    MovedAttribute("FileHandler", "urllib2", "urllib.request"),
    MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
    MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
    MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
    MovedAttribute("urlretrieve", "urllib", "urllib.request"),
    MovedAttribute("urlcleanup", "urllib", "urllib.request"),
    MovedAttribute("URLopener", "urllib", "urllib.request"),
    MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
    MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
]
for attr in _urllib_request_moved_attributes:
    setattr(Module_six_moves_urllib_request, attr.name, attr)
del attr

Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes

sys.modules[__name__ + ".moves.urllib_request"] = sys.modules[__name__ + ".moves.urllib.request"] = Module_six_moves_urllib_request(__name__ + ".moves.urllib.request")


class Module_six_moves_urllib_response(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_response"""


_urllib_response_moved_attributes = [
    MovedAttribute("addbase", "urllib", "urllib.response"),
    MovedAttribute("addclosehook", "urllib", "urllib.response"),
    MovedAttribute("addinfo", "urllib", "urllib.response"),
    MovedAttribute("addinfourl", "urllib", "urllib.response"),
]
for attr in _urllib_response_moved_attributes:
    setattr(Module_six_moves_urllib_response, attr.name, attr)
del attr

Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes

sys.modules[__name__ + ".moves.urllib_response"] = sys.modules[__name__ + ".moves.urllib.response"] = Module_six_moves_urllib_response(__name__ + ".moves.urllib.response")


class Module_six_moves_urllib_robotparser(_LazyModule):
    """Lazy loading of moved objects in six.moves.urllib_robotparser"""


_urllib_robotparser_moved_attributes = [
    MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
]
for attr in _urllib_robotparser_moved_attributes:
    setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
del attr

Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes

sys.modules[__name__ + ".moves.urllib_robotparser"] = sys.modules[__name__ + ".moves.urllib.robotparser"] = Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser")


class Module_six_moves_urllib(types.ModuleType):
    """Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
    parse = sys.modules[__name__ + ".moves.urllib_parse"]
    error = sys.modules[__name__ + ".moves.urllib_error"]
    request = sys.modules[__name__ + ".moves.urllib_request"]
    response = sys.modules[__name__ + ".moves.urllib_response"]
    robotparser = sys.modules[__name__ + ".moves.urllib_robotparser"]

    def __dir__(self):
        return ['parse', 'error', 'request', 'response', 'robotparser']


sys.modules[__name__ + ".moves.urllib"] = Module_six_moves_urllib(__name__ + ".moves.urllib")


def add_move(move):
    """Add an item to six.moves."""
    setattr(_MovedItems, move.name, move)


def remove_move(name):
    """Remove item from six.moves."""
    try:
        delattr(_MovedItems, name)
    except AttributeError:
        try:
            del moves.__dict__[name]
        except KeyError:
            raise AttributeError("no such move, %r" % (name,))


if PY3:
    _meth_func = "__func__"
    _meth_self = "__self__"

    _func_closure = "__closure__"
    _func_code = "__code__"
    _func_defaults = "__defaults__"
    _func_globals = "__globals__"

    _iterkeys = "keys"
    _itervalues = "values"
    _iteritems = "items"
    _iterlists = "lists"
else:
    _meth_func = "im_func"
    _meth_self = "im_self"

    _func_closure = "func_closure"
    _func_code = "func_code"
    _func_defaults = "func_defaults"
    _func_globals = "func_globals"

    _iterkeys = "iterkeys"
    _itervalues = "itervalues"
    _iteritems = "iteritems"
    _iterlists = "iterlists"


try:
    advance_iterator = next
except NameError:
    def advance_iterator(it):
        return it.next()
next = advance_iterator


try:
    callable = callable
except NameError:
    def callable(obj):
        return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)


if PY3:
    def get_unbound_function(unbound):
        return unbound

    create_bound_method = types.MethodType

    Iterator = object
else:
    def get_unbound_function(unbound):
        return unbound.im_func

    def create_bound_method(func, obj):
        return types.MethodType(func, obj, obj.__class__)

    class Iterator(object):

        def next(self):
            return type(self).__next__(self)

    callable = callable
_add_doc(get_unbound_function,
         """Get the function out of a possibly unbound function""")


get_method_function = operator.attrgetter(_meth_func)
get_method_self = operator.attrgetter(_meth_self)
get_function_closure = operator.attrgetter(_func_closure)
get_function_code = operator.attrgetter(_func_code)
get_function_defaults = operator.attrgetter(_func_defaults)
get_function_globals = operator.attrgetter(_func_globals)


def iterkeys(d, **kw):
    """Return an iterator over the keys of a dictionary."""
    return iter(getattr(d, _iterkeys)(**kw))

def itervalues(d, **kw):
    """Return an iterator over the values of a dictionary."""
    return iter(getattr(d, _itervalues)(**kw))

def iteritems(d, **kw):
    """Return an iterator over the (key, value) pairs of a dictionary."""
    return iter(getattr(d, _iteritems)(**kw))

def iterlists(d, **kw):
    """Return an iterator over the (key, [values]) pairs of a dictionary."""
    return iter(getattr(d, _iterlists)(**kw))


if PY3:
    def b(s):
        return s.encode("latin-1")
    def u(s):
        return s
    unichr = chr
    if sys.version_info[1] <= 1:
        def int2byte(i):
            return bytes((i,))
    else:
        # This is about 2x faster than the implementation above on 3.2+
        int2byte = operator.methodcaller("to_bytes", 1, "big")
    byte2int = operator.itemgetter(0)
    indexbytes = operator.getitem
    iterbytes = iter
    import io
    StringIO = io.StringIO
    BytesIO = io.BytesIO
else:
    def b(s):
        return s
    # Workaround for standalone backslash
    def u(s):
        return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
    unichr = unichr
    int2byte = chr
    def byte2int(bs):
        return ord(bs[0])
    def indexbytes(buf, i):
        return ord(buf[i])
    def iterbytes(buf):
        return (ord(byte) for byte in buf)
    import StringIO
    StringIO = BytesIO = StringIO.StringIO
_add_doc(b, """Byte literal""")
_add_doc(u, """Text literal""")


if PY3:
    exec_ = getattr(moves.builtins, "exec")


    def reraise(tp, value, tb=None):
        if value.__traceback__ is not tb:
            raise value.with_traceback(tb)
        raise value

else:
    def exec_(_code_, _globs_=None, _locs_=None):
        """Execute code in a namespace."""
        if _globs_ is None:
            frame = sys._getframe(1)
            _globs_ = frame.f_globals
            if _locs_ is None:
                _locs_ = frame.f_locals
            del frame
        elif _locs_ is None:
            _locs_ = _globs_
        exec("""exec _code_ in _globs_, _locs_""")


    exec_("""def reraise(tp, value, tb=None):
    raise tp, value, tb
""")


print_ = getattr(moves.builtins, "print", None)
if print_ is None:
    def print_(*args, **kwargs):
        """The new-style print function for Python 2.4 and 2.5."""
        fp = kwargs.pop("file", sys.stdout)
        if fp is None:
            return
        def write(data):
            if not isinstance(data, basestring):
                data = str(data)
            # If the file has an encoding, encode unicode with it.
            if (isinstance(fp, file) and
                isinstance(data, unicode) and
                fp.encoding is not None):
                errors = getattr(fp, "errors", None)
                if errors is None:
                    errors = "strict"
                data = data.encode(fp.encoding, errors)
            fp.write(data)
        want_unicode = False
        sep = kwargs.pop("sep", None)
        if sep is not None:
            if isinstance(sep, unicode):
                want_unicode = True
            elif not isinstance(sep, str):
                raise TypeError("sep must be None or a string")
        end = kwargs.pop("end", None)
        if end is not None:
            if isinstance(end, unicode):
                want_unicode = True
            elif not isinstance(end, str):
                raise TypeError("end must be None or a string")
        if kwargs:
            raise TypeError("invalid keyword arguments to print()")
        if not want_unicode:
            for arg in args:
                if isinstance(arg, unicode):
                    want_unicode = True
                    break
        if want_unicode:
            newline = unicode("\n")
            space = unicode(" ")
        else:
            newline = "\n"
            space = " "
        if sep is None:
            sep = space
        if end is None:
            end = newline
        for i, arg in enumerate(args):
            if i:
                write(sep)
            write(arg)
        write(end)

_add_doc(reraise, """Reraise an exception.""")


def with_metaclass(meta, *bases):
    """Create a base class with a metaclass."""
    return meta("NewBase", bases, {})

def add_metaclass(metaclass):
    """Class decorator for creating a class with a metaclass."""
    def wrapper(cls):
        orig_vars = cls.__dict__.copy()
        orig_vars.pop('__dict__', None)
        orig_vars.pop('__weakref__', None)
        slots = orig_vars.get('__slots__')
        if slots is not None:
            if isinstance(slots, str):
                slots = [slots]
            for slots_var in slots:
                orig_vars.pop(slots_var)
        return metaclass(cls.__name__, cls.__bases__, orig_vars)
    return wrapper
python3.4/site-packages/pip/_vendor/html5lib/ihatexml.py000064400000040305151735047450017200 0ustar00from __future__ import absolute_import, division, unicode_literals

import re
import warnings

from .constants import DataLossWarning

baseChar = """
[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] |
[#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] |
[#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] |
[#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 |
[#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] |
[#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] |
[#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] |
[#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] |
[#x04EE-#x04F5] | [#x04F8-#x04F9] | [#x0531-#x0556] | #x0559 |
[#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] |
[#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] |
[#x06D0-#x06D3] | #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D |
[#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] |
[#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] |
[#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] |
[#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] |
[#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | [#x0A72-#x0A74] |
[#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] |
[#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 |
[#x0B05-#x0B0C] | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] |
[#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] |
[#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] |
[#x0B99-#x0B9A] | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] |
[#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] |
[#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] |
[#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] |
[#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] |
[#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | [#x0D2A-#x0D39] |
[#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] |
[#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A |
#x0E8D | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 |
#x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] |
#x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] |
[#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] |
[#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C |
#x113E | #x1140 | #x114C | #x114E | #x1150 | [#x1154-#x1155] | #x1159 |
[#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] |
[#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] |
[#x11B7-#x11B8] | #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 |
[#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] |
[#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | #x1F5B |
#x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE |
[#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] |
[#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 |
[#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] |
[#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3]"""

ideographic = """[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]"""

combiningCharacter = """
[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] |
[#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 |
[#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] |
[#x06E0-#x06E4] | [#x06E7-#x06E8] | [#x06EA-#x06ED] | [#x0901-#x0903] |
#x093C | [#x093E-#x094C] | #x094D | [#x0951-#x0954] | [#x0962-#x0963] |
[#x0981-#x0983] | #x09BC | #x09BE | #x09BF | [#x09C0-#x09C4] |
[#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 | [#x09E2-#x09E3] | #x0A02 |
#x0A3C | #x0A3E | #x0A3F | [#x0A40-#x0A42] | [#x0A47-#x0A48] |
[#x0A4B-#x0A4D] | [#x0A70-#x0A71] | [#x0A81-#x0A83] | #x0ABC |
[#x0ABE-#x0AC5] | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] |
#x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] | [#x0B4B-#x0B4D] |
[#x0B56-#x0B57] | [#x0B82-#x0B83] | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] |
[#x0BCA-#x0BCD] | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] |
[#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] | [#x0C82-#x0C83] |
[#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] |
[#x0D02-#x0D03] | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] |
#x0D57 | #x0E31 | [#x0E34-#x0E3A] | [#x0E47-#x0E4E] | #x0EB1 |
[#x0EB4-#x0EB9] | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] |
#x0F35 | #x0F37 | #x0F39 | #x0F3E | #x0F3F | [#x0F71-#x0F84] |
[#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] |
[#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] |
#x3099 | #x309A"""

digit = """
[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] |
[#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] |
[#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] |
[#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]"""

extender = """
#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 |
#[#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]"""

letter = " | ".join([baseChar, ideographic])

# Without the
name = " | ".join([letter, digit, ".", "-", "_", combiningCharacter,
                   extender])
nameFirst = " | ".join([letter, "_"])

reChar = re.compile(r"#x([\d|A-F]{4,4})")
reCharRange = re.compile(r"\[#x([\d|A-F]{4,4})-#x([\d|A-F]{4,4})\]")


def charStringToList(chars):
    charRanges = [item.strip() for item in chars.split(" | ")]
    rv = []
    for item in charRanges:
        foundMatch = False
        for regexp in (reChar, reCharRange):
            match = regexp.match(item)
            if match is not None:
                rv.append([hexToInt(item) for item in match.groups()])
                if len(rv[-1]) == 1:
                    rv[-1] = rv[-1] * 2
                foundMatch = True
                break
        if not foundMatch:
            assert len(item) == 1

            rv.append([ord(item)] * 2)
    rv = normaliseCharList(rv)
    return rv


def normaliseCharList(charList):
    charList = sorted(charList)
    for item in charList:
        assert item[1] >= item[0]
    rv = []
    i = 0
    while i < len(charList):
        j = 1
        rv.append(charList[i])
        while i + j < len(charList) and charList[i + j][0] <= rv[-1][1] + 1:
            rv[-1][1] = charList[i + j][1]
            j += 1
        i += j
    return rv

# We don't really support characters above the BMP :(
max_unicode = int("FFFF", 16)


def missingRanges(charList):
    rv = []
    if charList[0] != 0:
        rv.append([0, charList[0][0] - 1])
    for i, item in enumerate(charList[:-1]):
        rv.append([item[1] + 1, charList[i + 1][0] - 1])
    if charList[-1][1] != max_unicode:
        rv.append([charList[-1][1] + 1, max_unicode])
    return rv


def listToRegexpStr(charList):
    rv = []
    for item in charList:
        if item[0] == item[1]:
            rv.append(escapeRegexp(chr(item[0])))
        else:
            rv.append(escapeRegexp(chr(item[0])) + "-" +
                      escapeRegexp(chr(item[1])))
    return "[%s]" % "".join(rv)


def hexToInt(hex_str):
    return int(hex_str, 16)


def escapeRegexp(string):
    specialCharacters = (".", "^", "$", "*", "+", "?", "{", "}",
                         "[", "]", "|", "(", ")", "-")
    for char in specialCharacters:
        string = string.replace(char, "\\" + char)

    return string

# output from the above
nonXmlNameBMPRegexp = re.compile('[\x00-,/:-@\\[-\\^`\\{-\xb6\xb8-\xbf\xd7\xf7\u0132-\u0133\u013f-\u0140\u0149\u017f\u01c4-\u01cc\u01f1-\u01f3\u01f6-\u01f9\u0218-\u024f\u02a9-\u02ba\u02c2-\u02cf\u02d2-\u02ff\u0346-\u035f\u0362-\u0385\u038b\u038d\u03a2\u03cf\u03d7-\u03d9\u03db\u03dd\u03df\u03e1\u03f4-\u0400\u040d\u0450\u045d\u0482\u0487-\u048f\u04c5-\u04c6\u04c9-\u04ca\u04cd-\u04cf\u04ec-\u04ed\u04f6-\u04f7\u04fa-\u0530\u0557-\u0558\u055a-\u0560\u0587-\u0590\u05a2\u05ba\u05be\u05c0\u05c3\u05c5-\u05cf\u05eb-\u05ef\u05f3-\u0620\u063b-\u063f\u0653-\u065f\u066a-\u066f\u06b8-\u06b9\u06bf\u06cf\u06d4\u06e9\u06ee-\u06ef\u06fa-\u0900\u0904\u093a-\u093b\u094e-\u0950\u0955-\u0957\u0964-\u0965\u0970-\u0980\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09bb\u09bd\u09c5-\u09c6\u09c9-\u09ca\u09ce-\u09d6\u09d8-\u09db\u09de\u09e4-\u09e5\u09f2-\u0a01\u0a03-\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a3b\u0a3d\u0a43-\u0a46\u0a49-\u0a4a\u0a4e-\u0a58\u0a5d\u0a5f-\u0a65\u0a75-\u0a80\u0a84\u0a8c\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abb\u0ac6\u0aca\u0ace-\u0adf\u0ae1-\u0ae5\u0af0-\u0b00\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34-\u0b35\u0b3a-\u0b3b\u0b44-\u0b46\u0b49-\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b62-\u0b65\u0b70-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bb6\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce-\u0bd6\u0bd8-\u0be6\u0bf0-\u0c00\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c3d\u0c45\u0c49\u0c4e-\u0c54\u0c57-\u0c5f\u0c62-\u0c65\u0c70-\u0c81\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cbd\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce2-\u0ce5\u0cf0-\u0d01\u0d04\u0d0d\u0d11\u0d29\u0d3a-\u0d3d\u0d44-\u0d45\u0d49\u0d4e-\u0d56\u0d58-\u0d5f\u0d62-\u0d65\u0d70-\u0e00\u0e2f\u0e3b-\u0e3f\u0e4f\u0e5a-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eaf\u0eba\u0ebe-\u0ebf\u0ec5\u0ec7\u0ece-\u0ecf\u0eda-\u0f17\u0f1a-\u0f1f\u0f2a-\u0f34\u0f36\u0f38\u0f3a-\u0f3d\u0f48\u0f6a-\u0f70\u0f85\u0f8c-\u0f8f\u0f96\u0f98\u0fae-\u0fb0\u0fb8\u0fba-\u109f\u10c6-\u10cf\u10f7-\u10ff\u1101\u1104\u1108\u110a\u110d\u1113-\u113b\u113d\u113f\u1141-\u114b\u114d\u114f\u1151-\u1153\u1156-\u1158\u115a-\u115e\u1162\u1164\u1166\u1168\u116a-\u116c\u116f-\u1171\u1174\u1176-\u119d\u119f-\u11a7\u11a9-\u11aa\u11ac-\u11ad\u11b0-\u11b6\u11b9\u11bb\u11c3-\u11ea\u11ec-\u11ef\u11f1-\u11f8\u11fa-\u1dff\u1e9c-\u1e9f\u1efa-\u1eff\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fbd\u1fbf-\u1fc1\u1fc5\u1fcd-\u1fcf\u1fd4-\u1fd5\u1fdc-\u1fdf\u1fed-\u1ff1\u1ff5\u1ffd-\u20cf\u20dd-\u20e0\u20e2-\u2125\u2127-\u2129\u212c-\u212d\u212f-\u217f\u2183-\u3004\u3006\u3008-\u3020\u3030\u3036-\u3040\u3095-\u3098\u309b-\u309c\u309f-\u30a0\u30fb\u30ff-\u3104\u312d-\u4dff\u9fa6-\uabff\ud7a4-\uffff]')

nonXmlNameFirstBMPRegexp = re.compile('[\x00-@\\[-\\^`\\{-\xbf\xd7\xf7\u0132-\u0133\u013f-\u0140\u0149\u017f\u01c4-\u01cc\u01f1-\u01f3\u01f6-\u01f9\u0218-\u024f\u02a9-\u02ba\u02c2-\u0385\u0387\u038b\u038d\u03a2\u03cf\u03d7-\u03d9\u03db\u03dd\u03df\u03e1\u03f4-\u0400\u040d\u0450\u045d\u0482-\u048f\u04c5-\u04c6\u04c9-\u04ca\u04cd-\u04cf\u04ec-\u04ed\u04f6-\u04f7\u04fa-\u0530\u0557-\u0558\u055a-\u0560\u0587-\u05cf\u05eb-\u05ef\u05f3-\u0620\u063b-\u0640\u064b-\u0670\u06b8-\u06b9\u06bf\u06cf\u06d4\u06d6-\u06e4\u06e7-\u0904\u093a-\u093c\u093e-\u0957\u0962-\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09db\u09de\u09e2-\u09ef\u09f2-\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a58\u0a5d\u0a5f-\u0a71\u0a75-\u0a84\u0a8c\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abc\u0abe-\u0adf\u0ae1-\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34-\u0b35\u0b3a-\u0b3c\u0b3e-\u0b5b\u0b5e\u0b62-\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bb6\u0bba-\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c5f\u0c62-\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cdd\u0cdf\u0ce2-\u0d04\u0d0d\u0d11\u0d29\u0d3a-\u0d5f\u0d62-\u0e00\u0e2f\u0e31\u0e34-\u0e3f\u0e46-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eaf\u0eb1\u0eb4-\u0ebc\u0ebe-\u0ebf\u0ec5-\u0f3f\u0f48\u0f6a-\u109f\u10c6-\u10cf\u10f7-\u10ff\u1101\u1104\u1108\u110a\u110d\u1113-\u113b\u113d\u113f\u1141-\u114b\u114d\u114f\u1151-\u1153\u1156-\u1158\u115a-\u115e\u1162\u1164\u1166\u1168\u116a-\u116c\u116f-\u1171\u1174\u1176-\u119d\u119f-\u11a7\u11a9-\u11aa\u11ac-\u11ad\u11b0-\u11b6\u11b9\u11bb\u11c3-\u11ea\u11ec-\u11ef\u11f1-\u11f8\u11fa-\u1dff\u1e9c-\u1e9f\u1efa-\u1eff\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fbd\u1fbf-\u1fc1\u1fc5\u1fcd-\u1fcf\u1fd4-\u1fd5\u1fdc-\u1fdf\u1fed-\u1ff1\u1ff5\u1ffd-\u2125\u2127-\u2129\u212c-\u212d\u212f-\u217f\u2183-\u3006\u3008-\u3020\u302a-\u3040\u3095-\u30a0\u30fb-\u3104\u312d-\u4dff\u9fa6-\uabff\ud7a4-\uffff]')

# Simpler things
nonPubidCharRegexp = re.compile("[^\x20\x0D\x0Aa-zA-Z0-9\-\'()+,./:=?;!*#@$_%]")


class InfosetFilter(object):
    replacementRegexp = re.compile(r"U[\dA-F]{5,5}")

    def __init__(self, replaceChars=None,
                 dropXmlnsLocalName=False,
                 dropXmlnsAttrNs=False,
                 preventDoubleDashComments=False,
                 preventDashAtCommentEnd=False,
                 replaceFormFeedCharacters=True,
                 preventSingleQuotePubid=False):

        self.dropXmlnsLocalName = dropXmlnsLocalName
        self.dropXmlnsAttrNs = dropXmlnsAttrNs

        self.preventDoubleDashComments = preventDoubleDashComments
        self.preventDashAtCommentEnd = preventDashAtCommentEnd

        self.replaceFormFeedCharacters = replaceFormFeedCharacters

        self.preventSingleQuotePubid = preventSingleQuotePubid

        self.replaceCache = {}

    def coerceAttribute(self, name, namespace=None):
        if self.dropXmlnsLocalName and name.startswith("xmlns:"):
            warnings.warn("Attributes cannot begin with xmlns", DataLossWarning)
            return None
        elif (self.dropXmlnsAttrNs and
              namespace == "http://www.w3.org/2000/xmlns/"):
            warnings.warn("Attributes cannot be in the xml namespace", DataLossWarning)
            return None
        else:
            return self.toXmlName(name)

    def coerceElement(self, name, namespace=None):
        return self.toXmlName(name)

    def coerceComment(self, data):
        if self.preventDoubleDashComments:
            while "--" in data:
                warnings.warn("Comments cannot contain adjacent dashes", DataLossWarning)
                data = data.replace("--", "- -")
        return data

    def coerceCharacters(self, data):
        if self.replaceFormFeedCharacters:
            for i in range(data.count("\x0C")):
                warnings.warn("Text cannot contain U+000C", DataLossWarning)
            data = data.replace("\x0C", " ")
        # Other non-xml characters
        return data

    def coercePubid(self, data):
        dataOutput = data
        for char in nonPubidCharRegexp.findall(data):
            warnings.warn("Coercing non-XML pubid", DataLossWarning)
            replacement = self.getReplacementCharacter(char)
            dataOutput = dataOutput.replace(char, replacement)
        if self.preventSingleQuotePubid and dataOutput.find("'") >= 0:
            warnings.warn("Pubid cannot contain single quote", DataLossWarning)
            dataOutput = dataOutput.replace("'", self.getReplacementCharacter("'"))
        return dataOutput

    def toXmlName(self, name):
        nameFirst = name[0]
        nameRest = name[1:]
        m = nonXmlNameFirstBMPRegexp.match(nameFirst)
        if m:
            warnings.warn("Coercing non-XML name", DataLossWarning)
            nameFirstOutput = self.getReplacementCharacter(nameFirst)
        else:
            nameFirstOutput = nameFirst

        nameRestOutput = nameRest
        replaceChars = set(nonXmlNameBMPRegexp.findall(nameRest))
        for char in replaceChars:
            warnings.warn("Coercing non-XML name", DataLossWarning)
            replacement = self.getReplacementCharacter(char)
            nameRestOutput = nameRestOutput.replace(char, replacement)
        return nameFirstOutput + nameRestOutput

    def getReplacementCharacter(self, char):
        if char in self.replaceCache:
            replacement = self.replaceCache[char]
        else:
            replacement = self.escapeChar(char)
        return replacement

    def fromXmlName(self, name):
        for item in set(self.replacementRegexp.findall(name)):
            name = name.replace(item, self.unescapeChar(item))
        return name

    def escapeChar(self, char):
        replacement = "U%05X" % ord(char)
        self.replaceCache[char] = replacement
        return replacement

    def unescapeChar(self, charcode):
        return chr(int(charcode[1:], 16))
python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py000064400000000540151735047450021042 0ustar00from __future__ import absolute_import, division, unicode_literals

from . import _base
from ..sanitizer import HTMLSanitizerMixin


class Filter(_base.Filter, HTMLSanitizerMixin):
    def __iter__(self):
        for token in _base.Filter.__iter__(self):
            token = self.sanitize_token(token)
            if token:
                yield token
site-packages/pip/_vendor/html5lib/filters/__pycache__/alphabeticalattributes.cpython-34.pyc000064400000002106151735047460027756 0ustar00python3.4�
�Rep�@s�ddlmZmZmZddlmZyddlmZWn"ek
rdddl	mZYnXGdd�dej
�Z
dS)�)�absolute_import�division�unicode_literals�)�_base)�OrderedDictc@seZdZdd�ZdS)�Filterccs�x�tjj|�D]n}|ddkr|t�}x:t|dj�ddd��D]\}}|||<qUW||d<n|VqWdS)	N�type�StartTag�EmptyTag�data�keycSs|dS)Nr�)�xrr�N/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/filters/alphabeticalattributes.py�<lambda>sz!Filter.__iter__.<locals>.<lambda>)zStartTagzEmptyTag)rr�__iter__r�sorted�items)�self�token�attrs�name�valuerrrrs	
zFilter.__iter__N)�__name__�
__module__�__qualname__rrrrrrsrN)�
__future__rrr�r�collectionsr�ImportErrorZordereddictrrrrr�<module>s
python3.4/site-packages/pip/_vendor/html5lib/filters/__pycache__/whitespace.cpython-34.pyc000064400000002476151735047460025463 0ustar00�
�Rev�@s�ddlmZmZmZddlZddlmZddlmZm	Z	dj
e	�Z	ejde	�ZGd	d
�d
ej
�Z
dd�ZdS)
�)�absolute_import�division�unicode_literalsN�)�_base�)�rcdataElements�spaceCharacters�z[%s]+c@s8eZdZeddgee��Zdd�ZdS)�Filter�pre�textareaccs�d}x�tjj|�D]�}|d}|dkr[|sN|d|jkr[|d7}ns|dkrz|rz|d8}nT|r�|dkr�|dr�d	|d<n*|r�|d
kr�t|d�|d<n|VqWdS)Nr�type�StartTag�namer�EndTag�SpaceCharacters�data� �
Characters)rr�__iter__�spacePreserveElements�collapse_spaces)�selfZpreserve�tokenr�r�B/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/filters/whitespace.pyrs



zFilter.__iter__N)�__name__�
__module__�__qualname__�	frozenset�listrrrrrrrrsrcCstjd|�S)Nr)�SPACES_REGEX�sub)�textrrrr%sr)�
__future__rrr�rer
r�	constantsrr	�join�compiler"rrrrrr�<module>spython3.4/site-packages/pip/_vendor/html5lib/filters/__pycache__/sanitizer.cpython-34.pyc000064400000001336151735047460025331 0ustar00�
�Re`�@s\ddlmZmZmZddlmZddlmZGdd�deje�ZdS)	�)�absolute_import�division�unicode_literals�)�_base�)�HTMLSanitizerMixinc@seZdZdd�ZdS)�Filterccs>x7tjj|�D]#}|j|�}|r|VqqWdS)N)rr	�__iter__Zsanitize_token)�self�token�r
�A/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/filters/sanitizer.pyr
szFilter.__iter__N)�__name__�
__module__�__qualname__r
r
r
r
rr	sr	N)	�
__future__rrr�rZ	sanitizerrr	r
r
r
r�<module>spython3.4/site-packages/pip/_vendor/html5lib/filters/__pycache__/__init__.cpython-34.pyc000064400000000223151735047460025052 0ustar00�
�Re�@sdS)N�rrr�@/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/filters/__init__.py�<module>spython3.4/site-packages/pip/_vendor/html5lib/filters/__pycache__/inject_meta_charset.cpython-34.pyc000064400000003467151735047470027324 0ustar00�
�Re�
�@sIddlmZmZmZddlmZGdd�dej�ZdS)�)�absolute_import�division�unicode_literals�)�_basec@s(eZdZdd�Zdd�ZdS)�FiltercCs tjj||�||_dS)N)rr�__init__�encoding)�self�sourcer	�r�K/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/filters/inject_meta_charset.pyrszFilter.__init__c
cs�d}|jdk}g}xvtjj|�D]b}|d}|dkrl|dj�dkrod}qon|dkr�|dj�dkr^d	}xE|d
j�D]~\\}}}	|dk	r�q�q�|j�dkr�|j|d
||f<d}Pq�|d
kr�|	j�dkr�d}q�q�W|r�d|d
kr�d|j|d
d<d}q�qo|dj�dkro|roidd6dd6|d
d
6Vidd6dd6i|jd6d
6Vidd6dd6Vd}q.qon�|dkro|dj�dkro|ro|jd�V|sBidd6dd6i|jd6d
6Vnx|r\|jd�VqEWd}d}qon|dkr�|j|�q.|Vq.WdS)NZpre_head�type�StartTag�name�headZin_head�EmptyTag�metaF�data�charsetTz
http-equivzcontent-type�contentztext/html; charset=%s�EndTagrZ	post_head)N�content)Nr)N�charset)Nr)r	rr�__iter__�lower�items�pop�append)
r
�stateZ
meta_found�pending�tokenrZhas_http_equiv_content_type�	namespacer�valuerrr
rsX
#

		zFilter.__iter__N)�__name__�
__module__�__qualname__rrrrrr
rsrN)�
__future__rrr�rrrrrr
�<module>spython3.4/site-packages/pip/_vendor/html5lib/filters/__pycache__/_base.cpython-34.pyc000064400000001506151735047470024372 0ustar00�
�Re�@s6ddlmZmZmZGdd�de�ZdS)�)�absolute_import�division�unicode_literalsc@s4eZdZdd�Zdd�Zdd�ZdS)�FiltercCs
||_dS)N)�source)�selfr�r�=/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/filters/_base.py�__init__szFilter.__init__cCs
t|j�S)N)�iterr)rrrr	�__iter__szFilter.__iter__cCst|j|�S)N)�getattrr)r�namerrr	�__getattr__szFilter.__getattr__N)�__name__�
__module__�__qualname__r
rrrrrr	rsrN)�
__future__rrr�objectrrrrr	�<module>spython3.4/site-packages/pip/_vendor/html5lib/filters/__pycache__/lint.cpython-34.pyc000064400000006335151735047470024274 0ustar00�
�Re��@s�ddlmZmZmZddlmZeZddlmZddlm	Z	m
Z
mZddlmZdj
e�ZGd	d
�d
e�ZGdd�dej�Zd
S)�)�absolute_import�division�unicode_literals)�gettext�)�_base�)�
cdataElements�rcdataElements�voidElements)�spaceCharacters�c@seZdZdS)�	LintErrorN)�__name__�
__module__�__qualname__�rr�</tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/filters/lint.pyr
src@seZdZdd�ZdS)�Filterc	cs�g}d}xqtjj|�D]]}|d}|d&kr!|d}|dkrqttd�i|d6��nt|t�s�ttd�i|d6��n|s�ttd	���n|dkr�|tkr�ttd
�i|d6��n<|dkr/|tkr/ttd�i|dd6��n|dkrK|j|�nx�|dD]�\}}t|t�s�ttd
�i|d6��n|s�ttd���nt|t�sVttd�i|d6��qVqVW|t	kr�d}qw|t
kr	d}qw|dkrwd}qwnV|dkr�|d}t|t�sfttd�i|d6��n|s�ttd	���n|tkr�ttd�i|d6��n|j�}||kr�ttd�i|d6|d6��nd}n�|dkr%|dkrwttd���qwnR|d'kr�|d}t|t�sjttd
�i|d6��n|s�ttd�i|d6��n|dkrw|jt
�}|r�ttd�i|d 6��q�qwn�|d!krK|d}|dkrttd"�i|d6��nt|t�swttd�i|d6��qwn,|d(krZnttd%�i|d6��|VqWdS))NZPCDATA�type�StartTag�EmptyTag�namez2StartTag not in PCDATA content model flag: %(tag)s�tagz!Tag name is not a string: %(tag)rzEmpty tag namez0Void element reported as StartTag token: %(tag)sz4Non-void element reported as EmptyTag token: %(tag)s�dataz(Attribute name is not a string: %(name)rzEmpty attribute namez*Attribute value is not a string: %(value)r�value�CDATA�RCDATA�	plaintextZ	PLAINTEXT�EndTagz.Void element reported as EndTag token: %(tag)sz4EndTag (%(end)s) does not match StartTag (%(start)s)�end�start�Commentz(Comment not in PCDATA content model flag�
Characters�SpaceCharactersz%(type)s token with empty dataz@Non-space character(s) found in SpaceCharacters token: %(token)r�token�Doctypez2Doctype not in PCDATA content model flag: %(name)s�
ParseError�SerializeErrorzUnknown token type: %(type)s)zStartTagzEmptyTag)z
CharacterszSpaceCharacters)z
ParseErrorzSerializeError)rr�__iter__r�_�
isinstance�strr�appendr	r
�pop�stripr)	�selfZ
open_elementsZcontentModelFlagr%rrrZ
start_namerrrrr)s�

   $ $		
  '	
  &
 #zFilter.__iter__N)rrrr)rrrrrsrN)�
__future__rrrrr*r
r�	constantsr	r
rr�join�	Exceptionrrrrrr�<module>spython3.4/site-packages/pip/_vendor/html5lib/filters/__pycache__/optionaltags.cpython-34.pyc000064400000006464151735047470026035 0ustar00�
�Re)�@sIddlmZmZmZddlmZGdd�dej�ZdS)�)�absolute_import�division�unicode_literals�)�_basec@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�FilterccsYd}}x:|jD]/}|dk	r7|||fVn|}|}qW||dfVdS)N)�source)�selfZ	previous1Z	previous2�token�r�D/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/filters/optionaltags.py�sliders

z
Filter.sliderccs�x�|j�D]�\}}}|d}|dkra|dsV|j|d||�r�|Vq�q
|dkr�|j|d|�s�|Vq�q
|Vq
WdS)N�type�StartTag�data�name�EndTag)r
�is_optional_start�is_optional_end)r	�previousr
�nextrrrr�__iter__s

zFilter.__iter__cCs*|r|dpd}|dkr,|dkS|dkre|dkrHdS|d	kr&|d
dkSn�|dkr�|dkr�dS|dkr�|d
dkSdSn�|dkr�|dkr�|d
dkSdSnW|dkr&|dkr|r|dd	kr|d
dkrdS|d
dkSdSndS)Nr�html�Comment�SpaceCharacters�headr�EmptyTagTrr�bodyF�script�style�colgroup�col�tbody�thead�tfoot�tr)�Comment�SpaceCharacters)�StartTag�EmptyTag)r&r')zscriptzstyle)r(r))ztbodyztheadztfootr)r	�tagnamerrrrrrrs4
zFilter.is_optional_startcCs�|r|dpd}|d7kr,|d8kS|d9krk|d
krR|d|kS|dkpg|dkSn|d:kr�|d
kr�|dd;kS|dkr�|dkp�|dkSdSn�|dkr�|d<kr�|dd=kS|dkp�|dkSn�|d-kr8|d
kr|dd>kS|dkp4|dkSnI|d?krw|d
kr^|dd@kS|dkps|dkSn
|d0kr�|dAkr�dS|d
kr�|dd0kSd1Sn�|dBkr|d
kr�|ddCkS|d3kr�|dkp�|dkSdSn~|d4krB|d
kr)|dd3kS|dkp>|dkSn?|dDkr�|d
krh|ddEkS|dkp}|dkSndS)FNrrrrrr�li�optgroupr%rrr�dt�ddF�pr�address�article�aside�
blockquote�datagrid�dialog�dir�div�dl�fieldset�footer�form�h1�h2�h3�h4�h5�h6�header�hr�menu�nav�ol�pre�section�table�ul�option�rt�rpr Tr#r"r$�td�th)zhtmlzheadzbody)�Comment�SpaceCharacters)zli�optgroupztr)�dt�dd)rSrT)zStartTagzEmptyTag)zaddresszarticlezasidez
blockquotezdatagridzdialogzdirzdivzdlzfieldsetzfooterzformzh1zh2zh3zh4zh5zh6zheaderzhrzmenuznavzolr/zprezsectionztablezul)zoptionrR)�rt�rp)rUrV)rPrQ)zthead�tbody)rWztfoot)�td�th)rXrYr)r	r*rrrrrrVsf

zFilter.is_optional_endN)�__name__�
__module__�__qualname__r
rrrrrrrrs	
9rN)�
__future__rrr�rrrrrr�<module>spython3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py000064400000001160151735047500023545 0ustar00from __future__ import absolute_import, division, unicode_literals

from . import _base

try:
    from collections import OrderedDict
except ImportError:
    from ordereddict import OrderedDict


class Filter(_base.Filter):
    def __iter__(self):
        for token in _base.Filter.__iter__(self):
            if token["type"] in ("StartTag", "EmptyTag"):
                attrs = OrderedDict()
                for name, value in sorted(token["data"].items(),
                                          key=lambda x: x[0]):
                    attrs[name] = value
                token["data"] = attrs
            yield token
python3.4/site-packages/pip/_vendor/html5lib/filters/_base.py000064400000000436151735047500020103 0ustar00from __future__ import absolute_import, division, unicode_literals


class Filter(object):
    def __init__(self, source):
        self.source = source

    def __iter__(self):
        return iter(self.source)

    def __getattr__(self, name):
        return getattr(self.source, name)
python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py000064400000005272151735047500023030 0ustar00from __future__ import absolute_import, division, unicode_literals

from . import _base


class Filter(_base.Filter):
    def __init__(self, source, encoding):
        _base.Filter.__init__(self, source)
        self.encoding = encoding

    def __iter__(self):
        state = "pre_head"
        meta_found = (self.encoding is None)
        pending = []

        for token in _base.Filter.__iter__(self):
            type = token["type"]
            if type == "StartTag":
                if token["name"].lower() == "head":
                    state = "in_head"

            elif type == "EmptyTag":
                if token["name"].lower() == "meta":
                    # replace charset with actual encoding
                    has_http_equiv_content_type = False
                    for (namespace, name), value in token["data"].items():
                        if namespace is not None:
                            continue
                        elif name.lower() == 'charset':
                            token["data"][(namespace, name)] = self.encoding
                            meta_found = True
                            break
                        elif name == 'http-equiv' and value.lower() == 'content-type':
                            has_http_equiv_content_type = True
                    else:
                        if has_http_equiv_content_type and (None, "content") in token["data"]:
                            token["data"][(None, "content")] = 'text/html; charset=%s' % self.encoding
                            meta_found = True

                elif token["name"].lower() == "head" and not meta_found:
                    # insert meta into empty head
                    yield {"type": "StartTag", "name": "head",
                           "data": token["data"]}
                    yield {"type": "EmptyTag", "name": "meta",
                           "data": {(None, "charset"): self.encoding}}
                    yield {"type": "EndTag", "name": "head"}
                    meta_found = True
                    continue

            elif type == "EndTag":
                if token["name"].lower() == "head" and pending:
                    # insert meta into head (if necessary) and flush pending queue
                    yield pending.pop(0)
                    if not meta_found:
                        yield {"type": "EmptyTag", "name": "meta",
                               "data": {(None, "charset"): self.encoding}}
                    while pending:
                        yield pending.pop(0)
                    meta_found = True
                    state = "post_head"

            if state == "in_head":
                pending.append(token)
            else:
                yield token
python3.4/site-packages/pip/_vendor/html5lib/filters/__init__.py000064400000000000151735047500020554 0ustar00python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py000064400000024404151735047500021537 0ustar00from __future__ import absolute_import, division, unicode_literals

from . import _base


class Filter(_base.Filter):
    def slider(self):
        previous1 = previous2 = None
        for token in self.source:
            if previous1 is not None:
                yield previous2, previous1, token
            previous2 = previous1
            previous1 = token
        yield previous2, previous1, None

    def __iter__(self):
        for previous, token, next in self.slider():
            type = token["type"]
            if type == "StartTag":
                if (token["data"] or
                        not self.is_optional_start(token["name"], previous, next)):
                    yield token
            elif type == "EndTag":
                if not self.is_optional_end(token["name"], next):
                    yield token
            else:
                yield token

    def is_optional_start(self, tagname, previous, next):
        type = next and next["type"] or None
        if tagname in 'html':
            # An html element's start tag may be omitted if the first thing
            # inside the html element is not a space character or a comment.
            return type not in ("Comment", "SpaceCharacters")
        elif tagname == 'head':
            # A head element's start tag may be omitted if the first thing
            # inside the head element is an element.
            # XXX: we also omit the start tag if the head element is empty
            if type in ("StartTag", "EmptyTag"):
                return True
            elif type == "EndTag":
                return next["name"] == "head"
        elif tagname == 'body':
            # A body element's start tag may be omitted if the first thing
            # inside the body element is not a space character or a comment,
            # except if the first thing inside the body element is a script
            # or style element and the node immediately preceding the body
            # element is a head element whose end tag has been omitted.
            if type in ("Comment", "SpaceCharacters"):
                return False
            elif type == "StartTag":
                # XXX: we do not look at the preceding event, so we never omit
                # the body element's start tag if it's followed by a script or
                # a style element.
                return next["name"] not in ('script', 'style')
            else:
                return True
        elif tagname == 'colgroup':
            # A colgroup element's start tag may be omitted if the first thing
            # inside the colgroup element is a col element, and if the element
            # is not immediately preceeded by another colgroup element whose
            # end tag has been omitted.
            if type in ("StartTag", "EmptyTag"):
                # XXX: we do not look at the preceding event, so instead we never
                # omit the colgroup element's end tag when it is immediately
                # followed by another colgroup element. See is_optional_end.
                return next["name"] == "col"
            else:
                return False
        elif tagname == 'tbody':
            # A tbody element's start tag may be omitted if the first thing
            # inside the tbody element is a tr element, and if the element is
            # not immediately preceeded by a tbody, thead, or tfoot element
            # whose end tag has been omitted.
            if type == "StartTag":
                # omit the thead and tfoot elements' end tag when they are
                # immediately followed by a tbody element. See is_optional_end.
                if previous and previous['type'] == 'EndTag' and \
                        previous['name'] in ('tbody', 'thead', 'tfoot'):
                    return False
                return next["name"] == 'tr'
            else:
                return False
        return False

    def is_optional_end(self, tagname, next):
        type = next and next["type"] or None
        if tagname in ('html', 'head', 'body'):
            # An html element's end tag may be omitted if the html element
            # is not immediately followed by a space character or a comment.
            return type not in ("Comment", "SpaceCharacters")
        elif tagname in ('li', 'optgroup', 'tr'):
            # A li element's end tag may be omitted if the li element is
            # immediately followed by another li element or if there is
            # no more content in the parent element.
            # An optgroup element's end tag may be omitted if the optgroup
            # element is immediately followed by another optgroup element,
            # or if there is no more content in the parent element.
            # A tr element's end tag may be omitted if the tr element is
            # immediately followed by another tr element, or if there is
            # no more content in the parent element.
            if type == "StartTag":
                return next["name"] == tagname
            else:
                return type == "EndTag" or type is None
        elif tagname in ('dt', 'dd'):
            # A dt element's end tag may be omitted if the dt element is
            # immediately followed by another dt element or a dd element.
            # A dd element's end tag may be omitted if the dd element is
            # immediately followed by another dd element or a dt element,
            # or if there is no more content in the parent element.
            if type == "StartTag":
                return next["name"] in ('dt', 'dd')
            elif tagname == 'dd':
                return type == "EndTag" or type is None
            else:
                return False
        elif tagname == 'p':
            # A p element's end tag may be omitted if the p element is
            # immediately followed by an address, article, aside,
            # blockquote, datagrid, dialog, dir, div, dl, fieldset,
            # footer, form, h1, h2, h3, h4, h5, h6, header, hr, menu,
            # nav, ol, p, pre, section, table, or ul, element, or if
            # there is no more content in the parent element.
            if type in ("StartTag", "EmptyTag"):
                return next["name"] in ('address', 'article', 'aside',
                                        'blockquote', 'datagrid', 'dialog',
                                        'dir', 'div', 'dl', 'fieldset', 'footer',
                                        'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
                                        'header', 'hr', 'menu', 'nav', 'ol',
                                        'p', 'pre', 'section', 'table', 'ul')
            else:
                return type == "EndTag" or type is None
        elif tagname == 'option':
            # An option element's end tag may be omitted if the option
            # element is immediately followed by another option element,
            # or if it is immediately followed by an <code>optgroup</code>
            # element, or if there is no more content in the parent
            # element.
            if type == "StartTag":
                return next["name"] in ('option', 'optgroup')
            else:
                return type == "EndTag" or type is None
        elif tagname in ('rt', 'rp'):
            # An rt element's end tag may be omitted if the rt element is
            # immediately followed by an rt or rp element, or if there is
            # no more content in the parent element.
            # An rp element's end tag may be omitted if the rp element is
            # immediately followed by an rt or rp element, or if there is
            # no more content in the parent element.
            if type == "StartTag":
                return next["name"] in ('rt', 'rp')
            else:
                return type == "EndTag" or type is None
        elif tagname == 'colgroup':
            # A colgroup element's end tag may be omitted if the colgroup
            # element is not immediately followed by a space character or
            # a comment.
            if type in ("Comment", "SpaceCharacters"):
                return False
            elif type == "StartTag":
                # XXX: we also look for an immediately following colgroup
                # element. See is_optional_start.
                return next["name"] != 'colgroup'
            else:
                return True
        elif tagname in ('thead', 'tbody'):
            # A thead element's end tag may be omitted if the thead element
            # is immediately followed by a tbody or tfoot element.
            # A tbody element's end tag may be omitted if the tbody element
            # is immediately followed by a tbody or tfoot element, or if
            # there is no more content in the parent element.
            # A tfoot element's end tag may be omitted if the tfoot element
            # is immediately followed by a tbody element, or if there is no
            # more content in the parent element.
            # XXX: we never omit the end tag when the following element is
            # a tbody. See is_optional_start.
            if type == "StartTag":
                return next["name"] in ['tbody', 'tfoot']
            elif tagname == 'tbody':
                return type == "EndTag" or type is None
            else:
                return False
        elif tagname == 'tfoot':
            # A tfoot element's end tag may be omitted if the tfoot element
            # is immediately followed by a tbody element, or if there is no
            # more content in the parent element.
            # XXX: we never omit the end tag when the following element is
            # a tbody. See is_optional_start.
            if type == "StartTag":
                return next["name"] == 'tbody'
            else:
                return type == "EndTag" or type is None
        elif tagname in ('td', 'th'):
            # A td element's end tag may be omitted if the td element is
            # immediately followed by a td or th element, or if there is
            # no more content in the parent element.
            # A th element's end tag may be omitted if the th element is
            # immediately followed by a td or th element, or if there is
            # no more content in the parent element.
            if type == "StartTag":
                return next["name"] in ('td', 'th')
            else:
                return type == "EndTag" or type is None
        return False
python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py000064400000002166151735047500021170 0ustar00from __future__ import absolute_import, division, unicode_literals

import re

from . import _base
from ..constants import rcdataElements, spaceCharacters
spaceCharacters = "".join(spaceCharacters)

SPACES_REGEX = re.compile("[%s]+" % spaceCharacters)


class Filter(_base.Filter):

    spacePreserveElements = frozenset(["pre", "textarea"] + list(rcdataElements))

    def __iter__(self):
        preserve = 0
        for token in _base.Filter.__iter__(self):
            type = token["type"]
            if type == "StartTag" \
                    and (preserve or token["name"] in self.spacePreserveElements):
                preserve += 1

            elif type == "EndTag" and preserve:
                preserve -= 1

            elif not preserve and type == "SpaceCharacters" and token["data"]:
                # Test on token["data"] above to not introduce spaces where there were not
                token["data"] = " "

            elif not preserve and type == "Characters":
                token["data"] = collapse_spaces(token["data"])

            yield token


def collapse_spaces(text):
    return SPACES_REGEX.sub(' ', text)
python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py000064400000010322151735047510017774 0ustar00from __future__ import absolute_import, division, unicode_literals

from gettext import gettext
_ = gettext

from . import _base
from ..constants import cdataElements, rcdataElements, voidElements

from ..constants import spaceCharacters
spaceCharacters = "".join(spaceCharacters)


class LintError(Exception):
    pass


class Filter(_base.Filter):
    def __iter__(self):
        open_elements = []
        contentModelFlag = "PCDATA"
        for token in _base.Filter.__iter__(self):
            type = token["type"]
            if type in ("StartTag", "EmptyTag"):
                name = token["name"]
                if contentModelFlag != "PCDATA":
                    raise LintError(_("StartTag not in PCDATA content model flag: %(tag)s") % {"tag": name})
                if not isinstance(name, str):
                    raise LintError(_("Tag name is not a string: %(tag)r") % {"tag": name})
                if not name:
                    raise LintError(_("Empty tag name"))
                if type == "StartTag" and name in voidElements:
                    raise LintError(_("Void element reported as StartTag token: %(tag)s") % {"tag": name})
                elif type == "EmptyTag" and name not in voidElements:
                    raise LintError(_("Non-void element reported as EmptyTag token: %(tag)s") % {"tag": token["name"]})
                if type == "StartTag":
                    open_elements.append(name)
                for name, value in token["data"]:
                    if not isinstance(name, str):
                        raise LintError(_("Attribute name is not a string: %(name)r") % {"name": name})
                    if not name:
                        raise LintError(_("Empty attribute name"))
                    if not isinstance(value, str):
                        raise LintError(_("Attribute value is not a string: %(value)r") % {"value": value})
                if name in cdataElements:
                    contentModelFlag = "CDATA"
                elif name in rcdataElements:
                    contentModelFlag = "RCDATA"
                elif name == "plaintext":
                    contentModelFlag = "PLAINTEXT"

            elif type == "EndTag":
                name = token["name"]
                if not isinstance(name, str):
                    raise LintError(_("Tag name is not a string: %(tag)r") % {"tag": name})
                if not name:
                    raise LintError(_("Empty tag name"))
                if name in voidElements:
                    raise LintError(_("Void element reported as EndTag token: %(tag)s") % {"tag": name})
                start_name = open_elements.pop()
                if start_name != name:
                    raise LintError(_("EndTag (%(end)s) does not match StartTag (%(start)s)") % {"end": name, "start": start_name})
                contentModelFlag = "PCDATA"

            elif type == "Comment":
                if contentModelFlag != "PCDATA":
                    raise LintError(_("Comment not in PCDATA content model flag"))

            elif type in ("Characters", "SpaceCharacters"):
                data = token["data"]
                if not isinstance(data, str):
                    raise LintError(_("Attribute name is not a string: %(name)r") % {"name": data})
                if not data:
                    raise LintError(_("%(type)s token with empty data") % {"type": type})
                if type == "SpaceCharacters":
                    data = data.strip(spaceCharacters)
                    if data:
                        raise LintError(_("Non-space character(s) found in SpaceCharacters token: %(token)r") % {"token": data})

            elif type == "Doctype":
                name = token["name"]
                if contentModelFlag != "PCDATA":
                    raise LintError(_("Doctype not in PCDATA content model flag: %(name)s") % {"name": name})
                if not isinstance(name, str):
                    raise LintError(_("Tag name is not a string: %(tag)r") % {"tag": name})
                # XXX: what to do with token["data"] ?

            elif type in ("ParseError", "SerializeError"):
                pass

            else:
                raise LintError(_("Unknown token type: %(type)s") % {"type": type})

            yield token
python3.4/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py000064400000014107151735047510021714 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

from lxml import etree
from ..treebuilders.etree import tag_regexp

from gettext import gettext
_ = gettext

from . import _base

from .. import ihatexml


def ensure_str(s):
    if s is None:
        return None
    elif isinstance(s, text_type):
        return s
    else:
        return s.decode("utf-8", "strict")


class Root(object):
    def __init__(self, et):
        self.elementtree = et
        self.children = []
        if et.docinfo.internalDTD:
            self.children.append(Doctype(self,
                                         ensure_str(et.docinfo.root_name),
                                         ensure_str(et.docinfo.public_id),
                                         ensure_str(et.docinfo.system_url)))
        root = et.getroot()
        node = root

        while node.getprevious() is not None:
            node = node.getprevious()
        while node is not None:
            self.children.append(node)
            node = node.getnext()

        self.text = None
        self.tail = None

    def __getitem__(self, key):
        return self.children[key]

    def getnext(self):
        return None

    def __len__(self):
        return 1


class Doctype(object):
    def __init__(self, root_node, name, public_id, system_id):
        self.root_node = root_node
        self.name = name
        self.public_id = public_id
        self.system_id = system_id

        self.text = None
        self.tail = None

    def getnext(self):
        return self.root_node.children[1]


class FragmentRoot(Root):
    def __init__(self, children):
        self.children = [FragmentWrapper(self, child) for child in children]
        self.text = self.tail = None

    def getnext(self):
        return None


class FragmentWrapper(object):
    def __init__(self, fragment_root, obj):
        self.root_node = fragment_root
        self.obj = obj
        if hasattr(self.obj, 'text'):
            self.text = ensure_str(self.obj.text)
        else:
            self.text = None
        if hasattr(self.obj, 'tail'):
            self.tail = ensure_str(self.obj.tail)
        else:
            self.tail = None
        self.isstring = isinstance(obj, str) or isinstance(obj, bytes)
        # Support for bytes here is Py2
        if self.isstring:
            self.obj = ensure_str(self.obj)

    def __getattr__(self, name):
        return getattr(self.obj, name)

    def getnext(self):
        siblings = self.root_node.children
        idx = siblings.index(self)
        if idx < len(siblings) - 1:
            return siblings[idx + 1]
        else:
            return None

    def __getitem__(self, key):
        return self.obj[key]

    def __bool__(self):
        return bool(self.obj)

    def getparent(self):
        return None

    def __str__(self):
        return str(self.obj)

    def __unicode__(self):
        return str(self.obj)

    def __len__(self):
        return len(self.obj)


class TreeWalker(_base.NonRecursiveTreeWalker):
    def __init__(self, tree):
        if hasattr(tree, "getroot"):
            tree = Root(tree)
        elif isinstance(tree, list):
            tree = FragmentRoot(tree)
        _base.NonRecursiveTreeWalker.__init__(self, tree)
        self.filter = ihatexml.InfosetFilter()

    def getNodeDetails(self, node):
        if isinstance(node, tuple):  # Text node
            node, key = node
            assert key in ("text", "tail"), _("Text nodes are text or tail, found %s") % key
            return _base.TEXT, ensure_str(getattr(node, key))

        elif isinstance(node, Root):
            return (_base.DOCUMENT,)

        elif isinstance(node, Doctype):
            return _base.DOCTYPE, node.name, node.public_id, node.system_id

        elif isinstance(node, FragmentWrapper) and node.isstring:
            return _base.TEXT, node.obj

        elif node.tag == etree.Comment:
            return _base.COMMENT, ensure_str(node.text)

        elif node.tag == etree.Entity:
            return _base.ENTITY, ensure_str(node.text)[1:-1]  # strip &;

        else:
            # This is assumed to be an ordinary element
            match = tag_regexp.match(ensure_str(node.tag))
            if match:
                namespace, tag = match.groups()
            else:
                namespace = None
                tag = ensure_str(node.tag)
            attrs = {}
            for name, value in list(node.attrib.items()):
                name = ensure_str(name)
                value = ensure_str(value)
                match = tag_regexp.match(name)
                if match:
                    attrs[(match.group(1), match.group(2))] = value
                else:
                    attrs[(None, name)] = value
            return (_base.ELEMENT, namespace, self.filter.fromXmlName(tag),
                    attrs, len(node) > 0 or node.text)

    def getFirstChild(self, node):
        assert not isinstance(node, tuple), _("Text nodes have no children")

        assert len(node) or node.text, "Node has no children"
        if node.text:
            return (node, "text")
        else:
            return node[0]

    def getNextSibling(self, node):
        if isinstance(node, tuple):  # Text node
            node, key = node
            assert key in ("text", "tail"), _("Text nodes are text or tail, found %s") % key
            if key == "text":
                # XXX: we cannot use a "bool(node) and node[0] or None" construct here
                # because node[0] might evaluate to False if it has no child element
                if len(node):
                    return node[0]
                else:
                    return None
            else:  # tail
                return node.getnext()

        return (node, "tail") if node.tail else node.getnext()

    def getParentNode(self, node):
        if isinstance(node, tuple):  # Text node
            node, key = node
            assert key in ("text", "tail"), _("Text nodes are text or tail, found %s") % key
            if key == "text":
                return node
            # else: fallback to "normal" processing

        return node.getparent()
python3.4/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py000064400000004346151735047510022410 0ustar00from __future__ import absolute_import, division, unicode_literals

from genshi.core import QName
from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT
from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT

from . import _base

from ..constants import voidElements, namespaces


class TreeWalker(_base.TreeWalker):
    def __iter__(self):
        # Buffer the events so we can pass in the following one
        previous = None
        for event in self.tree:
            if previous is not None:
                for token in self.tokens(previous, event):
                    yield token
            previous = event

        # Don't forget the final event!
        if previous is not None:
            for token in self.tokens(previous, None):
                yield token

    def tokens(self, event, next):
        kind, data, pos = event
        if kind == START:
            tag, attribs = data
            name = tag.localname
            namespace = tag.namespace
            converted_attribs = {}
            for k, v in attribs:
                if isinstance(k, QName):
                    converted_attribs[(k.namespace, k.localname)] = v
                else:
                    converted_attribs[(None, k)] = v

            if namespace == namespaces["html"] and name in voidElements:
                for token in self.emptyTag(namespace, name, converted_attribs,
                                           not next or next[0] != END
                                           or next[1] != tag):
                    yield token
            else:
                yield self.startTag(namespace, name, converted_attribs)

        elif kind == END:
            name = data.localname
            namespace = data.namespace
            if name not in voidElements:
                yield self.endTag(namespace, name)

        elif kind == COMMENT:
            yield self.comment(data)

        elif kind == TEXT:
            for token in self.text(data):
                yield token

        elif kind == DOCTYPE:
            yield self.doctype(*data)

        elif kind in (XML_NAMESPACE, DOCTYPE, START_NS, END_NS,
                      START_CDATA, END_CDATA, PI):
            pass

        else:
            yield self.unknown(kind)
python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/genshistream.cpython-34.pyc000064400000004015151735047510026663 0ustar00�
�Re��@s�ddlmZmZmZddlmZddlmZmZmZm	Z	m
Z
ddlmZmZm
Z
mZmZmZddlmZddlmZmZGd	d
�d
ej�ZdS)�)�absolute_import�division�unicode_literals)�QName)�START�END�
XML_NAMESPACE�DOCTYPE�TEXT)�START_NS�END_NS�START_CDATA�	END_CDATA�PI�COMMENT�)�_base�)�voidElements�
namespacesc@s(eZdZdd�Zdd�ZdS)�
TreeWalkerccs�d}xH|jD]=}|dk	rGx"|j||�D]}|Vq5Wn|}qW|dk	r�x"|j|d�D]}|VqpWndS)N)�tree�tokens)�self�previous�event�token�r�H/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treewalkers/genshistream.py�__iter__
s
zTreeWalker.__iter__ccs�|\}}}|tkr
|\}}|j}|j}	i}
xL|D]D\}}t|t�rz||
|j|jf<qF||
d|f<qFW|	tdkr�|tkr�x]|j|	||
|p�|dtkp�|d|k�D]}
|
Vq�Wq�|j	|	||
�Vn�|tkrN|j}|j}	|tkr�|j
|	|�Vq�n�|tkrk|j|�Vn}|t
kr�xn|j|�D]}
|
Vq�WnO|tkr�|j|�Vn2|tttttttfkr�n|j|�VdS)N�htmlrr)r�	localname�	namespace�
isinstancerrrZemptyTagrZstartTag�endTagr�commentr
�textr	�doctyperrrr
rr�unknown)rr�next�kind�data�pos�tagZattribs�namer"Zconverted_attribs�k�vrrrrrs@				zTreeWalker.tokensN)�__name__�
__module__�__qualname__rrrrrrrsrN)�
__future__rrrZgenshi.corerrrrr	r
rrr
rrr�r�	constantsrrrrrrr�<module>s(.python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/__init__.cpython-34.pyc000064400000004306151735047510025734 0ustar00�
�Re	�@sWdZddlmZmZmZddlZddlmZiZddd�Z	dS)a�A collection of modules for iterating through different kinds of
tree, generating tokens identical to those produced by the tokenizer
module.

To create a tree walker for a new type of tree, you need to do
implement a tree walker object (called TreeWalker by convention) that
implements a 'serialize' method taking a tree as sole argument and
returning an iterator generating tokens.
�)�absolute_import�division�unicode_literalsN�)�
default_etreecKs|j�}|tkr�|dkr[dt|f}t|�tj|}|jt|<q�|dkr�ddlm}|jt|<q�|dkr�ddlm	}|jt|<q�|d	kr�dd
lm
}|dkr�t}n|j||�jSntj
|�S)
a6Get a TreeWalker class for various types of tree with built-in support

    treeType - the name of the tree type required (case-insensitive). Supported
               values are:

                "dom" - The xml.dom.minidom DOM implementation
                "pulldom" - The xml.dom.pulldom event stream
                "etree" - A generic walker for tree implementations exposing an
                          elementtree-like interface (known to work with
                          ElementTree, cElementTree and lxml.etree).
                "lxml" - Optimized walker for lxml.etree
                "genshi" - a Genshi stream

    implementation - (Currently applies to the "etree" tree type only). A module
                      implementing the tree type e.g. xml.etree.ElementTree or
                      cElementTree.�dom�pulldomz%s.%s�genshi�)�genshistream�lxml)�	lxmletree�etree)rN)zdomzpulldom)�lower�treeWalkerCache�__name__�
__import__�sys�modules�
TreeWalker�rr
rr�getETreeModule�get)�treeType�implementation�kwargs�name�modrr
r�r�D/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treewalkers/__init__.py�
getTreeWalkers&

	r )
�__doc__�
__future__rrrr�utilsrrr rrrr�<module>	s
python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/lxmletree.cpython-34.pyc000064400000016211151735047510026174 0ustar00�
�ReG�@sddlmZmZmZddlmZddlmZddlm	Z	ddl
m
Z
e
Zddlm
Z
dd	lmZd
d�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de
j�ZdS)�)�absolute_import�division�unicode_literals)�	text_type)�etree�)�
tag_regexp)�gettext�)�_base)�ihatexmlcCs7|dkrdSt|t�r#|S|jdd�SdS)Nzutf-8�strict)�
isinstancer�decode)�s�r�E/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treewalkers/lxmletree.py�
ensure_strs
rc@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�RootcCs�||_g|_|jjrd|jjt|t|jj�t|jj�t|jj	���n|j
�}|}x"|j�dk	r�|j�}qyWx,|dk	r�|jj|�|j�}q�Wd|_
d|_dS)N)Zelementtree�childrenZdocinfoZinternalDTD�append�DoctyperZ	root_name�	public_idZ
system_url�getrootZgetprevious�getnext�text�tail)�self�et�root�noderrr�__init__s 			z
Root.__init__cCs|j|S)N)r)r�keyrrr�__getitem__-szRoot.__getitem__cCsdS)Nr)rrrrr0szRoot.getnextcCsdS)Nr
r)rrrr�__len__3szRoot.__len__N)�__name__�
__module__�__qualname__r!r#rr$rrrrrsrc@s(eZdZdd�Zdd�ZdS)rcCs:||_||_||_||_d|_d|_dS)N)�	root_node�namer�	system_idrr)rr(r)rr*rrrr!8s					zDoctype.__init__cCs|jjdS)Nr
)r(r)rrrrrAszDoctype.getnextN)r%r&r'r!rrrrrr7s	rc@s(eZdZdd�Zdd�ZdS)�FragmentRootcs0�fdd�|D��_d�_�_dS)Ncsg|]}t�|��qSr)�FragmentWrapper)�.0�child)rrr�
<listcomp>Gs	z)FragmentRoot.__init__.<locals>.<listcomp>)rrr)rrr)rrr!FszFragmentRoot.__init__cCsdS)Nr)rrrrrJszFragmentRoot.getnextN)r%r&r'r!rrrrrr+Esr+c@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)r,cCs�||_||_t|jd�r<t|jj�|_n	d|_t|jd�rot|jj�|_n	d|_t|t�p�t|t�|_	|j	r�t|j�|_ndS)Nrr)
r(�obj�hasattrrrrr�str�bytes�isstring)rZ
fragment_rootr0rrrr!Os				!	zFragmentWrapper.__init__cCst|j|�S)N)�getattrr0)rr)rrr�__getattr___szFragmentWrapper.__getattr__cCsE|jj}|j|�}|t|�dkr=||dSdSdS)Nr
)r(r�index�len)rZsiblings�idxrrrrbs
zFragmentWrapper.getnextcCs|j|S)N)r0)rr"rrrr#jszFragmentWrapper.__getitem__cCs
t|j�S)N)�boolr0)rrrr�__bool__mszFragmentWrapper.__bool__cCsdS)Nr)rrrr�	getparentpszFragmentWrapper.getparentcCs
t|j�S)N)r2r0)rrrr�__str__sszFragmentWrapper.__str__cCs
t|j�S)N)r2r0)rrrr�__unicode__vszFragmentWrapper.__unicode__cCs
t|j�S)N)r8r0)rrrrr$yszFragmentWrapper.__len__N)r%r&r'r!r6rr#r;r<r=r>r$rrrrr,Nsr,c@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�
TreeWalkercCsbt|d�rt|�}nt|t�r<t|�}ntjj||�tj	�|_
dS)Nr)r1rr�listr+r�NonRecursiveTreeWalkerr!rZ
InfosetFilter�filter)r�treerrrr!~szTreeWalker.__init__c	Cs0t|t�rY|\}}|dks=ttd�|��tjtt||��fSt|t�rrtj	fSt|t
�r�tj|j|j
|jfSt|t�r�|jr�tj|jfS|jtjkr�tjt|j�fS|jtjkrtjt|j�dd�fStjt|j��}|rR|j�\}}nd}t|j�}i}x�t|jj��D]n\}}t|�}t|�}tj|�}|r�|||jd�|jd�f<q�||d|f<q�Wtj ||j!j"|�|t#|�dkp(|jfSdS)	Nrrz%Text nodes are text or tail, found %sr
rr)ztextztail���)$r�tuple�AssertionError�_rZTEXTrr5rZDOCUMENTrZDOCTYPEr)rr*r,r4r0�tagr�Comment�COMMENTr�EntityZENTITYr�match�groupsr@�attrib�items�groupZELEMENTrBZfromXmlNamer8)	rr r"rL�	namespacerH�attrsr)�valuerrr�getNodeDetails�s:"
 "%zTreeWalker.getNodeDetailscCsbt|t�s"ttd���t|�sC|jsCtd��|jrV|dfS|dSdS)NzText nodes have no childrenzNode has no childrenrr)rrErFrGr8r)rr rrr�
getFirstChild�s
"!	
zTreeWalker.getFirstChildcCs�t|t�rq|\}}|dks=ttd�|��|dkrdt|�r]|dSdSqq|j�Sn|jr�|dfS|j�S)Nrrz%Text nodes are text or tail, found %sr)ztextztail)rrErFrGr8rr)rr r"rrr�getNextSibling�s"
zTreeWalker.getNextSiblingcCsZt|t�rP|\}}|dks=ttd�|��|dkrP|Sn|j�S)Nrrz%Text nodes are text or tail, found %s)ztextztail)rrErFrGr<)rr r"rrr�
getParentNode�s"zTreeWalker.getParentNodeN)r%r&r'r!rTrUrVrWrrrrr?}s
)	r?N)�
__future__rrrZpip._vendor.sixr�lxmlrZtreebuilders.etreerr	rG�rrr�objectrrr+r,rAr?rrrr�<module>s		/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/_base.cpython-34.pyc000064400000015375151735047510025256 0ustar00�
�Re�@sddlmZmZmZddlmZmZddlZejZddl	m
Z
e
jZe
j
Ze
jZe
jZe
jZe
jZdZddlmZmZdje�Zd	d
d�Zdd
�ZGdd�de�ZGdd�de�Z dS)�)�absolute_import�division�unicode_literals)�	text_type�string_typesN)�Nodez<#UNKNOWN#>�)�voidElements�spaceCharacters�TcCs>|dkr|rdSdSnt|t�r0|St|�SdS)z<Wrapper around six.text_type to convert None to empty stringNr)�
isinstancer)�sZ
blank_if_none�r�A/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treewalkers/_base.py�to_textsrcCs|dkpt|t�S)z2Wrapper around isinstance(string_types) or is NoneN)rr)�stringrrr�is_text_or_none"src@s�eZdZdd�Zdd�Zdd�Zddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
ddddd�Zdd�Zdd�Z
dS)�
TreeWalkercCs
||_dS)N)�tree)�selfrrrr�__init__(szTreeWalker.__init__cCs
t�dS)N)�NotImplementedError)rrrr�__iter__+szTreeWalker.__iter__cCsidd6|d6S)N�SerializeError�type�datar)r�msgrrr�error.szTreeWalker.errorFccs�|dks-t|t�s-tt|���t|t�sNtt|���tdd�|j�D��sst�idd6t|d�d6t|�d6|d6V|r�|jtd	��VndS)
NcssT|]J\\}}}|dks0t|t�oKt|t�oKt|t�VqdS)N)rr)�.0�	namespace�name�valuerrr�	<genexpr>4sz&TreeWalker.emptyTag.<locals>.<genexpr>�EmptyTagrFr rrzVoid element has children)	rr�AssertionErrorr�all�itemsrr�_)rrr �attrs�hasChildrenrrr�emptyTag1s-!
	zTreeWalker.emptyTagcCs�|dks-t|t�s-tt|���t|t�sNtt|���tdd�|j�D��sst�idd6t|�d6t|�d6tdd�|j�D��d6S)	NcssT|]J\\}}}|dks0t|t�oKt|t�oKt|t�VqdS)N)rr)rrr r!rrrr"Bsz&TreeWalker.startTag.<locals>.<genexpr>�StartTagrr rcssE|];\\}}}t|d�t|�ft|d�fVqdS)FN)r)rrr r!rrrr"Jsr)	rrr$rr%r&rr�dict)rrr r(rrr�startTag?s-!


zTreeWalker.startTagcCs}|dks-t|t�s-tt|���t|t�sNtt|���idd6t|d�d6t|�d6id6S)N�EndTagrFr rr)rrr$rr)rrr rrr�endTagNs-!

zTreeWalker.endTagccs�t|t�s!tt|���t|�}|jt�}|dt|�t|��}|rxidd6|d6Vn|}|jt�}|t|�d�}|r�idd6|d6Vn|r�idd6|d6VndS)N�SpaceCharactersrr�
Characters)	rrr$rr�lstripr
�len�rstrip)rrZmiddle�left�rightrrr�textWs! zTreeWalker.textcCs9t|t�s!tt|���idd6t|�d6S)N�Commentrr)rrr$rr)rrrrr�commentgs!zTreeWalker.commentNTcCs�t|�stt|���t|�s<tt|���t|�sZtt|���idd6t|�d6t|�d6t|�d6t|�d6S)N�Doctyperr �publicId�systemId�correct)rr$rr)rr r;r<r=rrr�doctypels



zTreeWalker.doctypecCs9t|t�s!tt|���idd6t|�d6S)N�Entityrr )rrr$rr)rr rrr�entityws!zTreeWalker.entitycCs|jtd�|�S)NzUnknown node type: )rr')rZnodeTyperrr�unknown|szTreeWalker.unknown)�__name__�
__module__�__qualname__rrrr*r-r/r7r9r>r@rArrrrr's	rc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�NonRecursiveTreeWalkercCs
t�dS)N)r)r�noderrr�getNodeDetails�sz%NonRecursiveTreeWalker.getNodeDetailscCs
t�dS)N)r)rrFrrr�
getFirstChild�sz$NonRecursiveTreeWalker.getFirstChildcCs
t�dS)N)r)rrFrrr�getNextSibling�sz%NonRecursiveTreeWalker.getNextSiblingcCs
t�dS)N)r)rrFrrr�
getParentNode�sz$NonRecursiveTreeWalker.getParentNodeccst|j}xd|dk	ro|j|�}|d|dd�}}d}|tkre|j|�Vn	|tkr�x�|j|�D]}|Vq�Wn�|tkr|\}}}}|tkr�x%|j||||�D]}|Vq�Wd}qn|j	|||�Vni|t
kr&|j|d�VnH|tkrG|j
|d�Vn'|tkr\d}n|j|d�V|r�|j|�}	nd}	|	dk	r�|	}qx�|dk	rk|j|�}|d|dd�}}|tkr|\}}}}|tkr|j||�Vqn|j|kr4d}Pn|j|�}
|
dk	rY|
}Pq�|j|�}q�WqWdS)Nr�FT)rrG�DOCTYPEr>�TEXTr7�ELEMENTr	r*r-�COMMENTr9�ENTITYr@�DOCUMENTrArHr/rIrJ)r�currentNode�detailsrr)�tokenrr �
attributesZ
firstChildZnextSiblingrrrr�sZ	
				zNonRecursiveTreeWalker.__iter__N)rBrCrDrGrHrIrJrrrrrrE�s
rE)!�
__future__rrrZpip._vendor.sixrr�gettextr'�xml.domrZ
DOCUMENT_NODErQZDOCUMENT_TYPE_NODErLZ	TEXT_NODErMZELEMENT_NODErNZCOMMENT_NODErOZENTITY_NODErP�UNKNOWN�	constantsr	r
�joinrr�objectrrErrrr�<module>s"							
Ypython3.4/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/pulldom.cpython-34.pyc000064400000003733151735047510025654 0ustar00�
�Re��@s�ddlmZmZmZddlmZmZmZmZm	Z	ddl
mZddlm
Z
Gdd�dej�Zd	S)
�)�absolute_import�division�unicode_literals)�
START_ELEMENT�END_ELEMENT�COMMENT�IGNORABLE_WHITESPACE�
CHARACTERS�)�_base�)�voidElementsc@s(eZdZdd�Zdd�ZdS)�
TreeWalkerccs	d}d}x�|jD]�}|dk	r�|dksD|d|kr�|d|kr]d}nx?|j||�D](}|V|ddkrp|d}qpqpWn|}qW|dks�|d|kr�x=|j|d�D]}|Vq�Wn|dk	rtd��ndS)Nr
�type�EmptyTagz<Illformed DOM event stream: void element without END_ELEMENT)�tree�tokens�
ValueError)�selfZignore_until�previous�event�token�r�C/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treewalkers/pulldom.py�__iter__s"	
zTreeWalker.__iter__c
cs�|\}}|tkr�|j}|j}i}xEt|jj��D].}|j|�}|j||j|jf<qFW|t	kr�xM|j
||||p�|d|k	�D]}	|	Vq�Wq}|j|||�Vn�|tkr|j}|j}|t	kr}|j
||�Vq}ne|tkr8|j|j�VnE|ttfkrox0|j|j�D]}	|	Vq]Wn|j|�VdS)Nr
)r�nodeNameZnamespaceURI�list�
attributes�keysZgetAttributeNode�valueZ	localNamer
ZemptyTagZstartTagr�endTagr�commentZ	nodeValuerr	�text�unknown)
rr�nextr�node�name�	namespace�attrs�attrrrrrrs4				zTreeWalker.tokensN)�__name__�
__module__�__qualname__rrrrrrrsrN)�
__future__rrrZxml.dom.pulldomrrrrr	�r�	constantsr
rrrrr�<module>s(python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/dom.cpython-34.pyc000064400000003475151735047520024763 0ustar00�
�Re��@snddlmZmZmZddlmZddlZejZddlm	Z	Gdd�de	j
�ZdS)�)�absolute_import�division�unicode_literals)�NodeN�)�_basec@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
TreeWalkercCsX|jtjkr.tj|j|j|jfS|jtjtj	fkrYtj
|jfS|jtjkr�i}xgt
|jj��D]P}|j|�}|jr�|j||j|jf<q�|j|d|jf<q�Wtj|j|j||j�fS|jtjkrtj|jfS|jtjtjfkrDtjfStj|jfSdS)N)ZnodeTyperZDOCUMENT_TYPE_NODErZDOCTYPE�name�publicId�systemIdZ	TEXT_NODEZCDATA_SECTION_NODEZTEXTZ	nodeValueZELEMENT_NODE�list�
attributes�keysZgetAttributeNodeZnamespaceURI�valueZ	localNameZELEMENT�nodeNameZ
hasChildNodesZCOMMENT_NODE�COMMENTZ
DOCUMENT_NODEZDOCUMENT_FRAGMENT_NODEZDOCUMENT�UNKNOWN)�self�node�attrs�attr�r�?/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treewalkers/dom.py�getNodeDetailss$	
zTreeWalker.getNodeDetailscCs|jS)N)Z
firstChild)rrrrr�
getFirstChild'szTreeWalker.getFirstChildcCs|jS)N)ZnextSibling)rrrrr�getNextSibling*szTreeWalker.getNextSiblingcCs|jS)N)Z
parentNode)rrrrr�
getParentNode-szTreeWalker.getParentNodeN)�__name__�
__module__�__qualname__rrrrrrrrrsr)�
__future__rrr�xml.domr�gettext�_�rZNonRecursiveTreeWalkerrrrrr�<module>s
	python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__pycache__/etree.cpython-34.pyc000064400000007626151735047520025312 0ustar00�
�Re�@s�ddlmZmZmZyddlmZWnAek
rsyddlmZWnek
rneZYnXYnXddl	Z	e	j	Z
ddlZddlm
Z
ddlmZddlmZejd	�Zd
d�Zee�ZdS)�)�absolute_import�division�unicode_literals)�OrderedDictN)�	text_type�)�_base�)�moduleFactoryFactoryz
{([^}]*)}(.*)cs>|}|jd�j�G�fdd�dtj�}t�S)NZasdcsLeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
S)z#getETreeBuilder.<locals>.TreeWalkera�Given the particular ElementTree representation, this implementation,
        to avoid using recursion, returns "nodes" as tuples with the following
        content:

        1. The current element

        2. The index of the element relative to its parent

        3. A stack of ancestor elements

        4. A flag "text", "tail" or None to indicate if the current node is a
           text node; either the text or tail of the current element (1)
        cs�t|t�rL|\}}}}|dkrCtjt||�fS|}nt|d�sj|j�}n|jdkr�tjfS|jdkr�tj	|j
|jd�|jd�fS|j�kr�tj|j
fSt
|j�tkstt
|j���tj|j�}|r0|j�\}}nd}|j}t�}	xmt|jj��D]V\}
}tj|
�}|r�||	|jd	�|jd
�f<q^||	d|
f<q^Wtj|||	t|�p�|j
fSdS)
N�text�tail�tag�
DOCUMENT_ROOT�DOCUMENT_FRAGMENTz
<!DOCTYPE>�publicId�systemIdrr	)ztextztail)rr)�
isinstance�tuplerZTEXT�getattr�hasattr�getrootr
ZDOCUMENTZDOCTYPEr�get�COMMENT�typer�AssertionError�
tag_regexp�match�groupsr�list�attrib�items�groupZELEMENT�len)�self�node�elt�key�parents�flagr�	namespacer
�attrs�name�value)�ElementTreeCommentType��A/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treewalkers/etree.py�getNodeDetails)s8	
*		"%z2getETreeBuilder.<locals>.TreeWalker.getNodeDetailscSs�t|t�r$|\}}}}n|dgdf\}}}}|dkrRdS|jrk|||dfSt|�r�|j|�|dd|dfSdSdS)Nrrr)ztextztail)rrrr"�append)r#r$�elementr&r'r(r.r.r/�
getFirstChildQs	
z1getETreeBuilder.<locals>.TreeWalker.getFirstChildcSs�t|t�r$|\}}}}ndS|dkrht|�ra|j|�|dd|dfSdSnc|jr�|dkr�|||dfS|t|d�dkr�|d|d|d|dfSdSdS)Nrrrr���r4)rrr"r1r)r#r$r2r&r'r(r.r.r/�getNextSiblingbs
 z2getETreeBuilder.<locals>.TreeWalker.getNextSiblingcSs�t|t�r$|\}}}}ndS|dkrQ|s>|S|||dfSn9|j�}|sg|S|t|d�j|�|dfSdS)Nrrr4)rr�popr�index)r#r$r2r&r'r(�parentr.r.r/�
getParentNodevsz1getETreeBuilder.<locals>.TreeWalker.getParentNodeN)�__name__�
__module__�__qualname__�__doc__r0r3r5r9r.)r-r.r/�
TreeWalkers

(r>)�Commentr
rZNonRecursiveTreeWalker�locals)ZElementTreeImplementation�ElementTreer>r.)r-r/�getETreeBuildersmrB)�
__future__rrr�collectionsr�ImportErrorZordereddict�dict�gettext�_�reZpip._vendor.sixr�r�utilsr
�compilerrB�getETreeModuler.r.r.r/�<module>s 

	spython3.4/site-packages/pip/_vendor/html5lib/treewalkers/_base.py000064400000015407151735047520020771 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type, string_types

import gettext
_ = gettext.gettext

from xml.dom import Node

DOCUMENT = Node.DOCUMENT_NODE
DOCTYPE = Node.DOCUMENT_TYPE_NODE
TEXT = Node.TEXT_NODE
ELEMENT = Node.ELEMENT_NODE
COMMENT = Node.COMMENT_NODE
ENTITY = Node.ENTITY_NODE
UNKNOWN = "<#UNKNOWN#>"

from ..constants import voidElements, spaceCharacters
spaceCharacters = "".join(spaceCharacters)


def to_text(s, blank_if_none=True):
    """Wrapper around six.text_type to convert None to empty string"""
    if s is None:
        if blank_if_none:
            return ""
        else:
            return None
    elif isinstance(s, text_type):
        return s
    else:
        return text_type(s)


def is_text_or_none(string):
    """Wrapper around isinstance(string_types) or is None"""
    return string is None or isinstance(string, string_types)


class TreeWalker(object):
    def __init__(self, tree):
        self.tree = tree

    def __iter__(self):
        raise NotImplementedError

    def error(self, msg):
        return {"type": "SerializeError", "data": msg}

    def emptyTag(self, namespace, name, attrs, hasChildren=False):
        assert namespace is None or isinstance(namespace, string_types), type(namespace)
        assert isinstance(name, string_types), type(name)
        assert all((namespace is None or isinstance(namespace, string_types)) and
                   isinstance(name, string_types) and
                   isinstance(value, string_types)
                   for (namespace, name), value in attrs.items())

        yield {"type": "EmptyTag", "name": to_text(name, False),
               "namespace": to_text(namespace),
               "data": attrs}
        if hasChildren:
            yield self.error(_("Void element has children"))

    def startTag(self, namespace, name, attrs):
        assert namespace is None or isinstance(namespace, string_types), type(namespace)
        assert isinstance(name, string_types), type(name)
        assert all((namespace is None or isinstance(namespace, string_types)) and
                   isinstance(name, string_types) and
                   isinstance(value, string_types)
                   for (namespace, name), value in attrs.items())

        return {"type": "StartTag",
                "name": text_type(name),
                "namespace": to_text(namespace),
                "data": dict(((to_text(namespace, False), to_text(name)),
                              to_text(value, False))
                             for (namespace, name), value in attrs.items())}

    def endTag(self, namespace, name):
        assert namespace is None or isinstance(namespace, string_types), type(namespace)
        assert isinstance(name, string_types), type(namespace)

        return {"type": "EndTag",
                "name": to_text(name, False),
                "namespace": to_text(namespace),
                "data": {}}

    def text(self, data):
        assert isinstance(data, string_types), type(data)

        data = to_text(data)
        middle = data.lstrip(spaceCharacters)
        left = data[:len(data) - len(middle)]
        if left:
            yield {"type": "SpaceCharacters", "data": left}
        data = middle
        middle = data.rstrip(spaceCharacters)
        right = data[len(middle):]
        if middle:
            yield {"type": "Characters", "data": middle}
        if right:
            yield {"type": "SpaceCharacters", "data": right}

    def comment(self, data):
        assert isinstance(data, string_types), type(data)

        return {"type": "Comment", "data": text_type(data)}

    def doctype(self, name, publicId=None, systemId=None, correct=True):
        assert is_text_or_none(name), type(name)
        assert is_text_or_none(publicId), type(publicId)
        assert is_text_or_none(systemId), type(systemId)

        return {"type": "Doctype",
                "name": to_text(name),
                "publicId": to_text(publicId),
                "systemId": to_text(systemId),
                "correct": to_text(correct)}

    def entity(self, name):
        assert isinstance(name, string_types), type(name)

        return {"type": "Entity", "name": text_type(name)}

    def unknown(self, nodeType):
        return self.error(_("Unknown node type: ") + nodeType)


class NonRecursiveTreeWalker(TreeWalker):
    def getNodeDetails(self, node):
        raise NotImplementedError

    def getFirstChild(self, node):
        raise NotImplementedError

    def getNextSibling(self, node):
        raise NotImplementedError

    def getParentNode(self, node):
        raise NotImplementedError

    def __iter__(self):
        currentNode = self.tree
        while currentNode is not None:
            details = self.getNodeDetails(currentNode)
            type, details = details[0], details[1:]
            hasChildren = False

            if type == DOCTYPE:
                yield self.doctype(*details)

            elif type == TEXT:
                for token in self.text(*details):
                    yield token

            elif type == ELEMENT:
                namespace, name, attributes, hasChildren = details
                if name in voidElements:
                    for token in self.emptyTag(namespace, name, attributes,
                                               hasChildren):
                        yield token
                    hasChildren = False
                else:
                    yield self.startTag(namespace, name, attributes)

            elif type == COMMENT:
                yield self.comment(details[0])

            elif type == ENTITY:
                yield self.entity(details[0])

            elif type == DOCUMENT:
                hasChildren = True

            else:
                yield self.unknown(details[0])

            if hasChildren:
                firstChild = self.getFirstChild(currentNode)
            else:
                firstChild = None

            if firstChild is not None:
                currentNode = firstChild
            else:
                while currentNode is not None:
                    details = self.getNodeDetails(currentNode)
                    type, details = details[0], details[1:]
                    if type == ELEMENT:
                        namespace, name, attributes, hasChildren = details
                        if name not in voidElements:
                            yield self.endTag(namespace, name)
                    if self.tree is currentNode:
                        currentNode = None
                        break
                    nextSibling = self.getNextSibling(currentNode)
                    if nextSibling is not None:
                        currentNode = nextSibling
                        break
                    else:
                        currentNode = self.getParentNode(currentNode)
python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py000064400000002661151735047520020475 0ustar00from __future__ import absolute_import, division, unicode_literals

from xml.dom import Node

import gettext
_ = gettext.gettext

from . import _base


class TreeWalker(_base.NonRecursiveTreeWalker):
    def getNodeDetails(self, node):
        if node.nodeType == Node.DOCUMENT_TYPE_NODE:
            return _base.DOCTYPE, node.name, node.publicId, node.systemId

        elif node.nodeType in (Node.TEXT_NODE, Node.CDATA_SECTION_NODE):
            return _base.TEXT, node.nodeValue

        elif node.nodeType == Node.ELEMENT_NODE:
            attrs = {}
            for attr in list(node.attributes.keys()):
                attr = node.getAttributeNode(attr)
                if attr.namespaceURI:
                    attrs[(attr.namespaceURI, attr.localName)] = attr.value
                else:
                    attrs[(None, attr.name)] = attr.value
            return (_base.ELEMENT, node.namespaceURI, node.nodeName,
                    attrs, node.hasChildNodes())

        elif node.nodeType == Node.COMMENT_NODE:
            return _base.COMMENT, node.nodeValue

        elif node.nodeType in (Node.DOCUMENT_NODE, Node.DOCUMENT_FRAGMENT_NODE):
            return (_base.DOCUMENT,)

        else:
            return _base.UNKNOWN, node.nodeType

    def getFirstChild(self, node):
        return node.firstChild

    def getNextSibling(self, node):
        return node.nextSibling

    def getParentNode(self, node):
        return node.parentNode
python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py000064400000004376151735047520021377 0ustar00from __future__ import absolute_import, division, unicode_literals

from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \
    COMMENT, IGNORABLE_WHITESPACE, CHARACTERS

from . import _base

from ..constants import voidElements


class TreeWalker(_base.TreeWalker):
    def __iter__(self):
        ignore_until = None
        previous = None
        for event in self.tree:
            if previous is not None and \
                    (ignore_until is None or previous[1] is ignore_until):
                if previous[1] is ignore_until:
                    ignore_until = None
                for token in self.tokens(previous, event):
                    yield token
                    if token["type"] == "EmptyTag":
                        ignore_until = previous[1]
            previous = event
        if ignore_until is None or previous[1] is ignore_until:
            for token in self.tokens(previous, None):
                yield token
        elif ignore_until is not None:
            raise ValueError("Illformed DOM event stream: void element without END_ELEMENT")

    def tokens(self, event, next):
        type, node = event
        if type == START_ELEMENT:
            name = node.nodeName
            namespace = node.namespaceURI
            attrs = {}
            for attr in list(node.attributes.keys()):
                attr = node.getAttributeNode(attr)
                attrs[(attr.namespaceURI, attr.localName)] = attr.value
            if name in voidElements:
                for token in self.emptyTag(namespace,
                                           name,
                                           attrs,
                                           not next or next[1] is not node):
                    yield token
            else:
                yield self.startTag(namespace, name, attrs)

        elif type == END_ELEMENT:
            name = node.nodeName
            namespace = node.namespaceURI
            if name not in voidElements:
                yield self.endTag(namespace, name)

        elif type == COMMENT:
            yield self.comment(node.nodeValue)

        elif type in (IGNORABLE_WHITESPACE, CHARACTERS):
            for token in self.text(node.nodeValue):
                yield token

        else:
            yield self.unknown(type)
python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py000064400000004423151735047520021453 0ustar00"""A collection of modules for iterating through different kinds of
tree, generating tokens identical to those produced by the tokenizer
module.

To create a tree walker for a new type of tree, you need to do
implement a tree walker object (called TreeWalker by convention) that
implements a 'serialize' method taking a tree as sole argument and
returning an iterator generating tokens.
"""

from __future__ import absolute_import, division, unicode_literals

import sys

from ..utils import default_etree

treeWalkerCache = {}


def getTreeWalker(treeType, implementation=None, **kwargs):
    """Get a TreeWalker class for various types of tree with built-in support

    treeType - the name of the tree type required (case-insensitive). Supported
               values are:

                "dom" - The xml.dom.minidom DOM implementation
                "pulldom" - The xml.dom.pulldom event stream
                "etree" - A generic walker for tree implementations exposing an
                          elementtree-like interface (known to work with
                          ElementTree, cElementTree and lxml.etree).
                "lxml" - Optimized walker for lxml.etree
                "genshi" - a Genshi stream

    implementation - (Currently applies to the "etree" tree type only). A module
                      implementing the tree type e.g. xml.etree.ElementTree or
                      cElementTree."""

    treeType = treeType.lower()
    if treeType not in treeWalkerCache:
        if treeType in ("dom", "pulldom"):
            name = "%s.%s" % (__name__, treeType)
            __import__(name)
            mod = sys.modules[name]
            treeWalkerCache[treeType] = mod.TreeWalker
        elif treeType == "genshi":
            from . import genshistream
            treeWalkerCache[treeType] = genshistream.TreeWalker
        elif treeType == "lxml":
            from . import lxmletree
            treeWalkerCache[treeType] = lxmletree.TreeWalker
        elif treeType == "etree":
            from . import etree
            if implementation is None:
                implementation = default_etree
            # XXX: NEVER cache here, caching is done in the etree submodule
            return etree.getETreeModule(implementation, **kwargs).TreeWalker
    return treeWalkerCache.get(treeType)
python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py000064400000011021151735047520021010 0ustar00from __future__ import absolute_import, division, unicode_literals

try:
    from collections import OrderedDict
except ImportError:
    try:
        from ordereddict import OrderedDict
    except ImportError:
        OrderedDict = dict
import gettext
_ = gettext.gettext

import re

from pip._vendor.six import text_type

from . import _base
from ..utils import moduleFactoryFactory

tag_regexp = re.compile("{([^}]*)}(.*)")


def getETreeBuilder(ElementTreeImplementation):
    ElementTree = ElementTreeImplementation
    ElementTreeCommentType = ElementTree.Comment("asd").tag

    class TreeWalker(_base.NonRecursiveTreeWalker):
        """Given the particular ElementTree representation, this implementation,
        to avoid using recursion, returns "nodes" as tuples with the following
        content:

        1. The current element

        2. The index of the element relative to its parent

        3. A stack of ancestor elements

        4. A flag "text", "tail" or None to indicate if the current node is a
           text node; either the text or tail of the current element (1)
        """
        def getNodeDetails(self, node):
            if isinstance(node, tuple):  # It might be the root Element
                elt, key, parents, flag = node
                if flag in ("text", "tail"):
                    return _base.TEXT, getattr(elt, flag)
                else:
                    node = elt

            if not(hasattr(node, "tag")):
                node = node.getroot()

            if node.tag in ("DOCUMENT_ROOT", "DOCUMENT_FRAGMENT"):
                return (_base.DOCUMENT,)

            elif node.tag == "<!DOCTYPE>":
                return (_base.DOCTYPE, node.text,
                        node.get("publicId"), node.get("systemId"))

            elif node.tag == ElementTreeCommentType:
                return _base.COMMENT, node.text

            else:
                assert type(node.tag) == text_type, type(node.tag)
                # This is assumed to be an ordinary element
                match = tag_regexp.match(node.tag)
                if match:
                    namespace, tag = match.groups()
                else:
                    namespace = None
                    tag = node.tag
                attrs = OrderedDict()
                for name, value in list(node.attrib.items()):
                    match = tag_regexp.match(name)
                    if match:
                        attrs[(match.group(1), match.group(2))] = value
                    else:
                        attrs[(None, name)] = value
                return (_base.ELEMENT, namespace, tag,
                        attrs, len(node) or node.text)

        def getFirstChild(self, node):
            if isinstance(node, tuple):
                element, key, parents, flag = node
            else:
                element, key, parents, flag = node, None, [], None

            if flag in ("text", "tail"):
                return None
            else:
                if element.text:
                    return element, key, parents, "text"
                elif len(element):
                    parents.append(element)
                    return element[0], 0, parents, None
                else:
                    return None

        def getNextSibling(self, node):
            if isinstance(node, tuple):
                element, key, parents, flag = node
            else:
                return None

            if flag == "text":
                if len(element):
                    parents.append(element)
                    return element[0], 0, parents, None
                else:
                    return None
            else:
                if element.tail and flag != "tail":
                    return element, key, parents, "tail"
                elif key < len(parents[-1]) - 1:
                    return parents[-1][key + 1], key + 1, parents, None
                else:
                    return None

        def getParentNode(self, node):
            if isinstance(node, tuple):
                element, key, parents, flag = node
            else:
                return None

            if flag == "text":
                if not parents:
                    return element
                else:
                    return element, key, parents, None
            else:
                parent = parents.pop()
                if not parents:
                    return parent
                else:
                    return parent, list(parents[-1]).index(parent), parents, None

    return locals()

getETreeModule = moduleFactoryFactory(getETreeBuilder)
python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py000064400000033317151735047520022221 0ustar00"""Module for supporting the lxml.etree library. The idea here is to use as much
of the native library as possible, without using fragile hacks like custom element
names that break between releases. The downside of this is that we cannot represent
all possible trees; specifically the following are known to cause problems:

Text or comments as siblings of the root element
Docypes with no name

When any of these things occur, we emit a DataLossWarning
"""

from __future__ import absolute_import, division, unicode_literals

import warnings
import re
import sys

from . import _base
from ..constants import DataLossWarning
from .. import constants
from . import etree as etree_builders
from .. import ihatexml

import lxml.etree as etree


fullTree = True
tag_regexp = re.compile("{([^}]*)}(.*)")

comment_type = etree.Comment("asd").tag


class DocumentType(object):
    def __init__(self, name, publicId, systemId):
        self.name = name
        self.publicId = publicId
        self.systemId = systemId


class Document(object):
    def __init__(self):
        self._elementTree = None
        self._childNodes = []

    def appendChild(self, element):
        self._elementTree.getroot().addnext(element._element)

    def _getChildNodes(self):
        return self._childNodes

    childNodes = property(_getChildNodes)


def testSerializer(element):
    rv = []
    finalText = None
    infosetFilter = ihatexml.InfosetFilter()

    def serializeElement(element, indent=0):
        if not hasattr(element, "tag"):
            if hasattr(element, "getroot"):
                # Full tree case
                rv.append("#document")
                if element.docinfo.internalDTD:
                    if not (element.docinfo.public_id or
                            element.docinfo.system_url):
                        dtd_str = "<!DOCTYPE %s>" % element.docinfo.root_name
                    else:
                        dtd_str = """<!DOCTYPE %s "%s" "%s">""" % (
                            element.docinfo.root_name,
                            element.docinfo.public_id,
                            element.docinfo.system_url)
                    rv.append("|%s%s" % (' ' * (indent + 2), dtd_str))
                next_element = element.getroot()
                while next_element.getprevious() is not None:
                    next_element = next_element.getprevious()
                while next_element is not None:
                    serializeElement(next_element, indent + 2)
                    next_element = next_element.getnext()
            elif isinstance(element, str) or isinstance(element, bytes):
                # Text in a fragment
                assert isinstance(element, str) or sys.version_info.major == 2
                rv.append("|%s\"%s\"" % (' ' * indent, element))
            else:
                # Fragment case
                rv.append("#document-fragment")
                for next_element in element:
                    serializeElement(next_element, indent + 2)
        elif element.tag == comment_type:
            rv.append("|%s<!-- %s -->" % (' ' * indent, element.text))
            if hasattr(element, "tail") and element.tail:
                rv.append("|%s\"%s\"" % (' ' * indent, element.tail))
        else:
            assert isinstance(element, etree._Element)
            nsmatch = etree_builders.tag_regexp.match(element.tag)
            if nsmatch is not None:
                ns = nsmatch.group(1)
                tag = nsmatch.group(2)
                prefix = constants.prefixes[ns]
                rv.append("|%s<%s %s>" % (' ' * indent, prefix,
                                          infosetFilter.fromXmlName(tag)))
            else:
                rv.append("|%s<%s>" % (' ' * indent,
                                       infosetFilter.fromXmlName(element.tag)))

            if hasattr(element, "attrib"):
                attributes = []
                for name, value in element.attrib.items():
                    nsmatch = tag_regexp.match(name)
                    if nsmatch is not None:
                        ns, name = nsmatch.groups()
                        name = infosetFilter.fromXmlName(name)
                        prefix = constants.prefixes[ns]
                        attr_string = "%s %s" % (prefix, name)
                    else:
                        attr_string = infosetFilter.fromXmlName(name)
                    attributes.append((attr_string, value))

                for name, value in sorted(attributes):
                    rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))

            if element.text:
                rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
            indent += 2
            for child in element:
                serializeElement(child, indent)
            if hasattr(element, "tail") and element.tail:
                rv.append("|%s\"%s\"" % (' ' * (indent - 2), element.tail))
    serializeElement(element, 0)

    if finalText is not None:
        rv.append("|%s\"%s\"" % (' ' * 2, finalText))

    return "\n".join(rv)


def tostring(element):
    """Serialize an element and its child nodes to a string"""
    rv = []
    finalText = None

    def serializeElement(element):
        if not hasattr(element, "tag"):
            if element.docinfo.internalDTD:
                if element.docinfo.doctype:
                    dtd_str = element.docinfo.doctype
                else:
                    dtd_str = "<!DOCTYPE %s>" % element.docinfo.root_name
                rv.append(dtd_str)
            serializeElement(element.getroot())

        elif element.tag == comment_type:
            rv.append("<!--%s-->" % (element.text,))

        else:
            # This is assumed to be an ordinary element
            if not element.attrib:
                rv.append("<%s>" % (element.tag,))
            else:
                attr = " ".join(["%s=\"%s\"" % (name, value)
                                 for name, value in element.attrib.items()])
                rv.append("<%s %s>" % (element.tag, attr))
            if element.text:
                rv.append(element.text)

            for child in element:
                serializeElement(child)

            rv.append("</%s>" % (element.tag,))

        if hasattr(element, "tail") and element.tail:
            rv.append(element.tail)

    serializeElement(element)

    if finalText is not None:
        rv.append("%s\"" % (' ' * 2, finalText))

    return "".join(rv)


class TreeBuilder(_base.TreeBuilder):
    documentClass = Document
    doctypeClass = DocumentType
    elementClass = None
    commentClass = None
    fragmentClass = Document
    implementation = etree

    def __init__(self, namespaceHTMLElements, fullTree=False):
        builder = etree_builders.getETreeModule(etree, fullTree=fullTree)
        infosetFilter = self.infosetFilter = ihatexml.InfosetFilter()
        self.namespaceHTMLElements = namespaceHTMLElements

        class Attributes(dict):
            def __init__(self, element, value={}):
                self._element = element
                dict.__init__(self, value)
                for key, value in self.items():
                    if isinstance(key, tuple):
                        name = "{%s}%s" % (key[2], infosetFilter.coerceAttribute(key[1]))
                    else:
                        name = infosetFilter.coerceAttribute(key)
                    self._element._element.attrib[name] = value

            def __setitem__(self, key, value):
                dict.__setitem__(self, key, value)
                if isinstance(key, tuple):
                    name = "{%s}%s" % (key[2], infosetFilter.coerceAttribute(key[1]))
                else:
                    name = infosetFilter.coerceAttribute(key)
                self._element._element.attrib[name] = value

        class Element(builder.Element):
            def __init__(self, name, namespace):
                name = infosetFilter.coerceElement(name)
                builder.Element.__init__(self, name, namespace=namespace)
                self._attributes = Attributes(self)

            def _setName(self, name):
                self._name = infosetFilter.coerceElement(name)
                self._element.tag = self._getETreeTag(
                    self._name, self._namespace)

            def _getName(self):
                return infosetFilter.fromXmlName(self._name)

            name = property(_getName, _setName)

            def _getAttributes(self):
                return self._attributes

            def _setAttributes(self, attributes):
                self._attributes = Attributes(self, attributes)

            attributes = property(_getAttributes, _setAttributes)

            def insertText(self, data, insertBefore=None):
                data = infosetFilter.coerceCharacters(data)
                builder.Element.insertText(self, data, insertBefore)

            def appendChild(self, child):
                builder.Element.appendChild(self, child)

        class Comment(builder.Comment):
            def __init__(self, data):
                data = infosetFilter.coerceComment(data)
                builder.Comment.__init__(self, data)

            def _setData(self, data):
                data = infosetFilter.coerceComment(data)
                self._element.text = data

            def _getData(self):
                return self._element.text

            data = property(_getData, _setData)

        self.elementClass = Element
        self.commentClass = builder.Comment
        # self.fragmentClass = builder.DocumentFragment
        _base.TreeBuilder.__init__(self, namespaceHTMLElements)

    def reset(self):
        _base.TreeBuilder.reset(self)
        self.insertComment = self.insertCommentInitial
        self.initial_comments = []
        self.doctype = None

    def testSerializer(self, element):
        return testSerializer(element)

    def getDocument(self):
        if fullTree:
            return self.document._elementTree
        else:
            return self.document._elementTree.getroot()

    def getFragment(self):
        fragment = []
        element = self.openElements[0]._element
        if element.text:
            fragment.append(element.text)
        fragment.extend(list(element))
        if element.tail:
            fragment.append(element.tail)
        return fragment

    def insertDoctype(self, token):
        name = token["name"]
        publicId = token["publicId"]
        systemId = token["systemId"]

        if not name:
            warnings.warn("lxml cannot represent empty doctype", DataLossWarning)
            self.doctype = None
        else:
            coercedName = self.infosetFilter.coerceElement(name)
            if coercedName != name:
                warnings.warn("lxml cannot represent non-xml doctype", DataLossWarning)

            doctype = self.doctypeClass(coercedName, publicId, systemId)
            self.doctype = doctype

    def insertCommentInitial(self, data, parent=None):
        self.initial_comments.append(data)

    def insertCommentMain(self, data, parent=None):
        if (parent == self.document and
                self.document._elementTree.getroot()[-1].tag == comment_type):
                warnings.warn("lxml cannot represent adjacent comments beyond the root elements", DataLossWarning)
        super(TreeBuilder, self).insertComment(data, parent)

    def insertRoot(self, token):
        """Create the document root"""
        # Because of the way libxml2 works, it doesn't seem to be possible to
        # alter information like the doctype after the tree has been parsed.
        # Therefore we need to use the built-in parser to create our iniial
        # tree, after which we can add elements like normal
        docStr = ""
        if self.doctype:
            assert self.doctype.name
            docStr += "<!DOCTYPE %s" % self.doctype.name
            if (self.doctype.publicId is not None or
                    self.doctype.systemId is not None):
                docStr += (' PUBLIC "%s" ' %
                           (self.infosetFilter.coercePubid(self.doctype.publicId or "")))
                if self.doctype.systemId:
                    sysid = self.doctype.systemId
                    if sysid.find("'") >= 0 and sysid.find('"') >= 0:
                        warnings.warn("DOCTYPE system cannot contain single and double quotes", DataLossWarning)
                        sysid = sysid.replace("'", 'U00027')
                    if sysid.find("'") >= 0:
                        docStr += '"%s"' % sysid
                    else:
                        docStr += "'%s'" % sysid
                else:
                    docStr += "''"
            docStr += ">"
            if self.doctype.name != token["name"]:
                warnings.warn("lxml cannot represent doctype with a different name to the root element", DataLossWarning)
        docStr += "<THIS_SHOULD_NEVER_APPEAR_PUBLICLY/>"
        root = etree.fromstring(docStr)

        # Append the initial comments:
        for comment_token in self.initial_comments:
            root.addprevious(etree.Comment(comment_token["data"]))

        # Create the root document and add the ElementTree to it
        self.document = self.documentClass()
        self.document._elementTree = root.getroottree()

        # Give the root element the right name
        name = token["name"]
        namespace = token.get("namespace", self.defaultNamespace)
        if namespace is None:
            etree_tag = name
        else:
            etree_tag = "{%s}%s" % (namespace, name)
        root.tag = etree_tag

        # Add the root element to the internal child/open data structures
        root_element = self.elementClass(name, namespace)
        root_element._element = root
        self.document._childNodes.append(root_element)
        self.openElements.append(root_element)

        # Reset to the default insert comment function
        self.insertComment = self.insertCommentMain
python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/etree_lxml.cpython-34.pyc000064400000031257151735047520026504 0ustar00�
�Re�6�@s-dZddlmZmZmZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
dd	lmZ
dd
lmZddljZdZejd�Zejd
�jZGdd�de�ZGdd�de�Zdd�Zdd�ZGdd�de	j�ZdS)a�Module for supporting the lxml.etree library. The idea here is to use as much
of the native library as possible, without using fragile hacks like custom element
names that break between releases. The downside of this is that we cannot represent
all possible trees; specifically the following are known to cause problems:

Text or comments as siblings of the root element
Docypes with no name

When any of these things occur, we emit a DataLossWarning
�)�absolute_import�division�unicode_literalsN�)�_base�)�DataLossWarning)�	constants)�etree)�ihatexmlTz
{([^}]*)}(.*)Zasdc@seZdZdd�ZdS)�DocumentTypecCs||_||_||_dS)N)�name�publicId�systemId)�selfr
rr�r�G/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treebuilders/etree_lxml.py�__init__"s		zDocumentType.__init__N)�__name__�
__module__�__qualname__rrrrrr!src@s@eZdZdd�Zdd�Zdd�Zee�ZdS)�DocumentcCsd|_g|_dS)N)�_elementTree�_childNodes)rrrrr)s	zDocument.__init__cCs|jj�j|j�dS)N)r�getrootZaddnext�_element)r�elementrrr�appendChild-szDocument.appendChildcCs|jS)N)r)rrrr�_getChildNodes0szDocument._getChildNodesN)rrrrrr�property�
childNodesrrrrr(srcssg�d}tj��d���fdd���|d�|dk	rf�jdd|f�ndj��S)	Nrc
sLt|d�s�t|d�r
�jd�|jjr�|jjpL|jjsbd|jj}n%d|jj|jj|jjf}�jdd|d|f�n|j�}x"|j�dk	r�|j�}q�Wx�|dk	r	�||d�|j	�}q�WqHt
|t�s+t
|t�rpt
|t�sRt
jjdksRt��jd	d||f�qH�jd
�x�|D]}�||d�q�Wn�|jtkr�jdd||jf�t|d�rH|jrH�jd	d||jf�qHn=t
|tj�s#t�tjj|j�}|dk	r�|jd
�}|jd�}tj|}�jdd||�j|�f�n'�jdd|�j|j�f�t|d�r�g}x�|jj�D]�\}	}
tj|	�}|dk	rM|j �\}}	�j|	�}	tj|}d||	f}n�j|	�}|j||
f�q�Wx?t!|�D].\}	}
�jdd|d|	|
f�q�Wn|jr��jd	d|d|jf�n|d7}x|D]}�||�q�Wt|d�rH|jrH�jd	d|d|jf�ndS)N�tagrz	#documentz
<!DOCTYPE %s>z<!DOCTYPE %s "%s" "%s">z|%s%s� rz|%s"%s"z#document-fragmentz|%s<!-- %s -->�tailrz
|%s<%s %s>z|%s<%s>�attribz%s %sz
|%s%s="%s")"�hasattr�append�docinfo�internalDTD�	public_idZ
system_url�	root_namerZgetpreviousZgetnext�
isinstance�str�bytes�sys�version_info�major�AssertionErrorr!�comment_type�textr#r
Z_Element�etree_builders�
tag_regexp�match�groupr	�prefixes�fromXmlNamer$�items�groups�sorted)
r�indent�dtd_strZnext_elementZnsmatch�nsr!�prefix�
attributesr
�valueZattr_string�child)�
infosetFilter�rv�serializeElementrrrF;st
		"'

$

)	%

z(testSerializer.<locals>.serializeElementz|%s"%s"r"r�
z  )r�
InfosetFilterr&�join)r�	finalTextr)rDrErFr�testSerializer6sF
rKcs^g�d}��fdd���|�|dk	rQ�jdd|f�ndj��S)	z4Serialize an element and its child nodes to a stringNcsqt|d�si|jjrV|jjr6|jj}nd|jj}�j|�n�|j��n�|jtkr��jd|j	f�n�|j
s��jd|jf�n?djdd�|j
j�D��}�jd|j|f�|j	r�j|j	�nx|D]}�|�qW�jd	|jf�t|d
�rm|j
rm�j|j
�ndS)Nr!z
<!DOCTYPE %s>z	<!--%s-->z<%s>r"cSs&g|]\}}d||f�qS)z%s="%s"r)�.0r
rBrrr�
<listcomp>�s	z6tostring.<locals>.serializeElement.<locals>.<listcomp>z<%s %s>z</%s>r#)r%r'r(�doctyper*r&rr!r2r3r$rIr:r#)rr>�attrrC)rErFrrrF�s*		
z"tostring.<locals>.serializeElementz%s"r"r�z  )r&rI)rrJr)rErFr�tostring�s 
rQcs�eZdZeZeZdZdZeZ	e
Zddd�Zdd�Z
dd�Zd	d
�Zdd�Zd
d�Zddd�Zd�fdd�Zdd�Z�S)�TreeBuilderNFcs�tjtd|��tj��|_||_G�fdd�dt��G���fdd�d�j�}G��fdd�d�j	�}||_
�j	|_tj
j||�dS)N�fullTreecs7eZdZi�fdd�Z�fdd�ZdS)z(TreeBuilder.__init__.<locals>.Attributescs�||_tj||�xo|j�D]a\}}t|t�red|d�j|d�f}n�j|�}||jjj|<q&WdS)Nz{%s}%srr)r�dictrr:r+�tuple�coerceAttributer$)rrrB�keyr
)rDrrr�s	$z1TreeBuilder.__init__.<locals>.Attributes.__init__csltj|||�t|t�rFd|d�j|d�f}n�j|�}||jjj|<dS)Nz{%s}%srr)rT�__setitem__r+rUrVrr$)rrWrBr
)rDrrrX�s
$z4TreeBuilder.__init__.<locals>.Attributes.__setitem__N)rrrrrXr)rDrr�
Attributes�s
rYcs�eZdZ���fdd�Z�fdd�Z�fdd�Zeee�Zdd�Z�fd	d
�Z	eee	�Z
d��fdd
�Z�fdd�ZdS)z%TreeBuilder.__init__.<locals>.Elementcs;�j|�}�jj||d|��|�|_dS)N�	namespace)�
coerceElement�Elementr�_attributes)rr
rZ)rY�builderrDrrr�sz.TreeBuilder.__init__.<locals>.Element.__init__cs4�j|�|_|j|j|j�|j_dS)N)r[�_nameZ_getETreeTagZ
_namespacerr!)rr
)rDrr�_setName�sz.TreeBuilder.__init__.<locals>.Element._setNamecs�j|j�S)N)r9r_)r)rDrr�_getName�sz.TreeBuilder.__init__.<locals>.Element._getNamecSs|jS)N)r])rrrr�_getAttributes�sz4TreeBuilder.__init__.<locals>.Element._getAttributescs�||�|_dS)N)r])rrA)rYrr�_setAttributes�sz4TreeBuilder.__init__.<locals>.Element._setAttributesNcs)�j|�}�jj|||�dS)N)ZcoerceCharactersr\�
insertText)r�data�insertBefore)r^rDrrrd�sz0TreeBuilder.__init__.<locals>.Element.insertTextcs�jj||�dS)N)r\r)rrC)r^rrr�sz1TreeBuilder.__init__.<locals>.Element.appendChild)
rrrrr`rarr
rbrcrArdrr)rYr^rDrrr\�sr\csReZdZ��fdd�Z�fdd�Zdd�Zeee�ZdS)z%TreeBuilder.__init__.<locals>.Commentcs&�j|�}�jj||�dS)N)�
coerceComment�Commentr)rre)r^rDrrr�sz.TreeBuilder.__init__.<locals>.Comment.__init__cs�j|�}||j_dS)N)rgrr3)rre)rDrr�_setData�sz.TreeBuilder.__init__.<locals>.Comment._setDatacSs
|jjS)N)rr3)rrrr�_getData�sz.TreeBuilder.__init__.<locals>.Comment._getDataN)rrrrrirjrrer)r^rDrrrh�srh)r4�getETreeModuler
rrHrD�namespaceHTMLElementsrTr\rh�elementClass�commentClassrrRr)rrlrSr\rhr)rYr^rDrr�s	%"	zTreeBuilder.__init__cCs2tjj|�|j|_g|_d|_dS)N)rrR�reset�insertCommentInitial�
insertComment�initial_commentsrN)rrrrros	zTreeBuilder.resetcCs
t|�S)N)rK)rrrrrrKszTreeBuilder.testSerializercCs$tr|jjS|jjj�SdS)N)rS�documentrr)rrrr�getDocuments
zTreeBuilder.getDocumentcCseg}|jdj}|jr2|j|j�n|jt|��|jra|j|j�n|S)Nr)�openElementsrr3r&�extend�listr#)r�fragmentrrrr�getFragments		zTreeBuilder.getFragmentcCs�|d}|d}|d}|s@tjdt�d|_nO|jj|�}||krqtjdt�n|j|||�}||_dS)Nr
rrz#lxml cannot represent empty doctypez%lxml cannot represent non-xml doctype)�warnings�warnrrNrDr[�doctypeClass)r�tokenr
rrZcoercedNamerNrrr�
insertDoctype!s


zTreeBuilder.insertDoctypecCs|jj|�dS)N)rrr&)rre�parentrrrrp1sz TreeBuilder.insertCommentInitialcs^||jkrA|jjj�djtkrAtjdt�ntt	|�j
||�dS)Nrz@lxml cannot represent adjacent comments beyond the root elements���)rsrrr!r2rzr{r�superrRrq)rrer)�	__class__rr�insertCommentMain4szTreeBuilder.insertCommentMainc
Cscd}|jr`|jjs!t�|d|jj7}|jjdk	sY|jjdk	r*|d|jj|jjpwd�7}|jjr|jj}|jd�dkr�|jd�dkr�tj	dt
�|jdd	�}n|jd�dkr|d
|7}q'|d|7}q*|d7}n|d
7}|jj|dkr`tj	dt
�q`n|d7}tj
|�}x+|jD] }|jtj|d��q�W|j�|_|j�|j_|d}|jd|j�}|dkr�|}nd||f}||_|j||�}	||	_|jjj|	�|jj|	�|j|_dS)zCreate the document rootrPz<!DOCTYPE %sNz
 PUBLIC "%s" �'r�"z6DOCTYPE system cannot contain single and double quotesZU00027z"%s"z'%s'z''�>r
zGlxml cannot represent doctype with a different name to the root elementz$<THIS_SHOULD_NEVER_APPEAR_PUBLICLY/>rerZz{%s}%s)rNr
r1rrrDZcoercePubid�findrzr{r�replacer
�
fromstringrrZaddpreviousrh�
documentClassrsZgetroottreer�get�defaultNamespacer!rmrrr&rur�rq)
rr}ZdocStr�sysid�root�
comment_tokenr
rZZ	etree_tagZroot_elementrrr�
insertRoot:sJ	 *



			zTreeBuilder.insertRoot)rrrrr�rr|rmrn�
fragmentClassr
�implementationrrorKrtryr~rpr�r�rr)r�rrR�sJ
rR)�__doc__�
__future__rrrrz�rer.rPrr	rr
r4rZ
lxml.etreerS�compiler5rhr!r2�objectrrrKrQrRrrrr�<module>
s$S-python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/__init__.cpython-34.pyc000064400000006144151735047520026100 0ustar00�
�ReM
�@sKdZddlmZmZmZddlmZiZddd�ZdS)a�A collection of modules for building different kinds of tree from
HTML documents.

To create a treebuilder for a new type of tree, you need to do
implement several things:

1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders.Node (although comment nodes have a different
signature for their constructor, see treebuilders.etree.Comment)
Textual content may also be implemented as another node type, or not, as
your tree implementation requires.

2) A treebuilder object (called TreeBuilder by convention) that
inherits from treebuilders._base.TreeBuilder. This has 4 required attributes:
documentClass - the class to use for the bottommost node of a document
elementClass - the class to use for HTML Elements
commentClass - the class to use for comments
doctypeClass - the class to use for doctypes
It also has one required method:
getDocument - Returns the root node of the complete document tree

3) If you wish to run the unit tests, you must also create a
testSerializer method on your treebuilder which accepts a node and
returns a string containing Node and its children serialized according
to the format used in the unittests
�)�absolute_import�division�unicode_literals�)�
default_etreeNcKs�|j�}|tkr�|dkrlddlm}|dkrYddlm}|}n|j||�jS|dkr�ddlm}|jt|<q�|d	kr�dd
lm	}|dkr�t
}n|j||�jStd|��ntj
|�S)a�Get a TreeBuilder class for various types of tree with built-in support

    treeType - the name of the tree type required (case-insensitive). Supported
               values are:

               "dom" - A generic builder for DOM implementations, defaulting to
                       a xml.dom.minidom based implementation.
               "etree" - A generic builder for tree implementations exposing an
                         ElementTree-like interface, defaulting to
                         xml.etree.cElementTree if available and
                         xml.etree.ElementTree if not.
               "lxml" - A etree-based builder for lxml.etree, handling
                        limitations of lxml's implementation.

    implementation - (Currently applies to the "etree" and "dom" tree types). A
                      module implementing the tree type e.g.
                      xml.etree.ElementTree or xml.etree.cElementTree.�dom�)rNr)�minidom�lxml)�
etree_lxml�etree)rzUnrecognised treebuilder "%s" )�lower�treeBuilderCache�r�xml.domr	�getDomModule�TreeBuilderrrr�getETreeModule�
ValueError�get)�treeType�implementation�kwargsrr	rr�r�E/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treebuilders/__init__.py�getTreeBuilder$s$		r)	�__doc__�
__future__rrr�utilsrrrrrrr�<module>spython3.4/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/_base.cpython-34.pyc000064400000027145151735047520025416 0ustar00�
�Re�5�@shddlmZmZmZddlmZddlmZmZm	Z	dZ
iee�dfd6eeee	ddfg�B�dfd6eeee	dd	fe	dd
fg�B�dfd6ee	ddfe	ddfg�dfd6ee	dd
fe	ddfg�dfd6Z
Gdd�de�ZGdd�de�ZGdd�de�ZdS)�)�absolute_import�division�unicode_literals)�	text_type�)�scopingElements�tableInsertModeElements�
namespacesNF�html�button�ol�ul�list�table�optgroup�optionT�selectc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zd	S)�NodecCs:||_d|_d|_i|_g|_g|_dS)a6Node representing an item in the tree.
        name - The tag name associated with the node
        parent - The parent of the current node (or None for the document node)
        value - The value of the current node (applies to text nodes and
        comments
        attributes - a dict holding name, value pairs for attributes of the node
        childNodes - a list of child nodes of the current node. This must
        include all elements but not necessarily other node types
        _flags - A list of miscellaneous flags that can be set on the node
        N)�name�parent�value�
attributes�
childNodes�_flags)�selfr�r�B/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treebuilders/_base.py�__init__s					z
Node.__init__cCsKdjdd�|jj�D��}|r<d|j|fSd|jSdS)N� cSs&g|]\}}d||f�qS)z%s="%s"r)�.0rrrrr�
<listcomp>+s	z Node.__str__.<locals>.<listcomp>z<%s %s>z<%s>)�joinr�itemsr)r�
attributesStrrrr�__str__*s
zNode.__str__cCsd|jS)Nz<%s>)r)rrrr�__repr__3sz
Node.__repr__cCs
t�dS)z3Insert node as a child of the current node
        N)�NotImplementedError)r�noderrr�appendChild6szNode.appendChildNcCs
t�dS)z�Insert data as text in the current node, positioned before the
        start of node insertBefore or to the end of the node's text.
        N)r&)r�data�insertBeforerrr�
insertText;szNode.insertTextcCs
t�dS)z�Insert node as a child of the current node, before refNode in the
        list of child nodes. Raises ValueError if refNode is not a child of
        the current nodeN)r&)rr'�refNoderrrr*AszNode.insertBeforecCs
t�dS)z:Remove node from the children of the current node
        N)r&)rr'rrr�removeChildGszNode.removeChildcCs.x|jD]}|j|�q
Wg|_dS)z�Move all the children of the current node to newParent.
        This is needed so that trees that don't store text as nodes move the
        text in the correct way
        N)rr()r�	newParent�childrrr�reparentChildrenLszNode.reparentChildrencCs
t�dS)z�Return a shallow copy of the current node i.e. a node with the same
        name and attributes but with no parent or child nodes
        N)r&)rrrr�	cloneNodeVszNode.cloneNodecCs
t�dS)zFReturn true if the node has children or text, false otherwise
        N)r&)rrrr�
hasContent\szNode.hasContent)
�__name__�
__module__�__qualname__rr$r%r(r+r*r-r0r1r2rrrrrs	
rc@s(eZdZdd�Zdd�ZdS)�ActiveFormattingElementscCs�d}|tkrxj|ddd�D]R}|tkr<Pn|j||�r[|d7}n|dkr&|j|�Pq&q&Wntj||�dS)Nr�����)�Marker�
nodesEqual�remover�append)rr'�
equalCount�elementrrrr=cs

zActiveFormattingElements.appendcCs0|j|jksdS|j|jks,dSdS)NFT)�	nameTupler)r�node1�node2rrrr;ps
z#ActiveFormattingElements.nodesEqualN)r3r4r5r=r;rrrrr6bs
r6c@s?eZdZdZdZdZdZdZdZdd�Z	dd�Z
ddd�Zd	d
�Zdd�Z
d
d�Zdd�Zdd�Zddd�Zdd�Zdd�Zdd�Zeee�Zdd�Zdd�Zddd �Zd!d"�Zdd#d$�Zd%d&�Zd'd(�Zd)d*�ZdS)+�TreeBuilderaBase treebuilder implementation
    documentClass - the class to use for the bottommost node of a document
    elementClass - the class to use for HTML Elements
    commentClass - the class to use for comments
    doctypeClass - the class to use for doctypes
    NcCs)|rd|_n	d|_|j�dS)Nzhttp://www.w3.org/1999/xhtml)�defaultNamespace�reset)r�namespaceHTMLElementsrrrr�s	zTreeBuilder.__init__cCsCg|_t�|_d|_d|_d|_|j�|_dS)NF)�openElementsr6�activeFormattingElements�headPointer�formPointer�insertFromTable�
documentClass�document)rrrrrE�s				zTreeBuilder.resetcCs�t|d�}t|\}}xZt|j�D]I}|j|krK|s]||kra|radS||j|kAr/dSq/Wds�t�dS)Nr@TF)�hasattr�listElementsMap�reversedrGrr@�AssertionError)r�target�variant�	exactNode�listElements�invertr'rrr�elementInScope�szTreeBuilder.elementInScopecCs!|js
dSt|j�d}|j|}|tksH||jkrLdSxL|tkr�||jkr�|dkr�d}Pn|d8}|j|}qOWx|d7}|j|}|j�}|jidd6|jd6|jd6|jd6�}||j|<||jd	kr�Pq�q�WdS)
Nr7r�StartTag�typer�	namespacer)r9r9)	rH�lenr:rGr1�
insertElementrrZr)r�i�entry�cloner?rrr�#reconstructActiveFormattingElements�s.	






z/TreeBuilder.reconstructActiveFormattingElementscCs>|jj�}x(|jr9|tkr9|jj�}qWdS)N)rH�popr:)rr^rrr�clearActiveFormattingElements�sz)TreeBuilder.clearActiveFormattingElementscCsHxA|jddd�D])}|tkr-Pq|j|kr|SqWdS)z�Check if an element exists between the end of the active
        formatting elements and the last marker. If it does, return it, else
        return falseNr7Fr9)rHr:r)rr�itemrrr�!elementInActiveFormattingElements�sz-TreeBuilder.elementInActiveFormattingElementscCs3|j|�}|jj|�|jj|�dS)N)�
createElementrGr=rMr()r�tokenr?rrr�
insertRoot�szTreeBuilder.insertRootcCsG|d}|d}|d}|j|||�}|jj|�dS)Nr�publicId�systemId)�doctypeClassrMr()rrfrrhri�doctyperrr�
insertDoctype�s



zTreeBuilder.insertDoctypecCs:|dkr|jd}n|j|j|d��dS)Nr7r)r9)rGr(�commentClass)rrfrrrr�
insertCommentszTreeBuilder.insertCommentcCsB|d}|jd|j�}|j||�}|d|_|S)z.Create an element but don't insert it anywhererrZr))�getrD�elementClassr)rrfrrZr?rrrres


zTreeBuilder.createElementcCs|jS)N)�_insertFromTable)rrrr�_getInsertFromTableszTreeBuilder._getInsertFromTablecCs.||_|r|j|_n|j|_dS)zsSwitch the function used to insert an element from the
        normal one to the misnested table one and back againN)rq�insertElementTabler\�insertElementNormal)rrrrr�_setInsertFromTables	zTreeBuilder._setInsertFromTablecCs�|d}t|t�s)td|��|jd|j�}|j||�}|d|_|jdj|�|jj	|�|S)NrzElement %s not unicoderZr)r7r9)
�
isinstancerrQrorDrprrGr(r=)rrfrrZr?rrrrts

zTreeBuilder.insertElementNormalcCs�|j|�}|jdjtkr2|j|�S|j�\}}|dkr`|j|�n|j||�|jj|�|S)z-Create an element and insert it into the treer7Nr9)	rerGrrrt�getTableMisnestedNodePositionr(r*r=)rrfr?rr*rrrrs(s
zTreeBuilder.insertElementTablecCs{|dkr|jd}n|jsE|jrU|jdjtkrU|j|�n"|j�\}}|j||�dS)zInsert text data.Nr7r9r9)rGrKrrr+rw)rr)rr*rrrr+8s
	zTreeBuilder.insertTextcCs�d}d}d}x7|jddd�D]}|jdkr)|}Pq)q)W|r�|jrm|j}|}q�|j|jj|�d}n
|jd}||fS)zsGet the foster parent element, and sibling to insert before
        (or None) when inserting a misnested table nodeNr7rrr9)rGrr�index)r�	lastTable�fosterParentr*�elmrrrrwGs			
z)TreeBuilder.getTableMisnestedNodePositionc
CsO|jd
j}|td�krK||krK|jj�|j|�ndS)Nr7�dd�dt�lirr�p�rp�rtr9)zddzdtzlizoptionzoptgrouprzrpzrt)rGr�	frozensetra�generateImpliedEndTags)r�excluderrrrr�as

z"TreeBuilder.generateImpliedEndTagscCs|jS)zReturn the final tree)rM)rrrr�getDocumentkszTreeBuilder.getDocumentcCs$|j�}|jdj|�|S)zReturn the final fragmentr)�
fragmentClassrGr0)r�fragmentrrr�getFragmentoszTreeBuilder.getFragmentcCs
t�dS)zzSerialize the subtree of node in the format required by unit tests
        node - the node from which to start serializingN)r&)rr'rrr�testSerializervszTreeBuilder.testSerializer)r3r4r5�__doc__rLrprmrjr�rrErWr`rbrdrgrlrnrerrru�propertyrKrtrsr+rwr�r�r�r�rrrrrCzs6.	

rC)�
__future__rrrZpip._vendor.sixr�	constantsrrr	r:r��setrO�objectrrr6rCrrrr�<module>s*! Kpython3.4/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/dom.cpython-34.pyc000064400000023506151735047520025121 0ustar00�
�Re!�@s�ddlmZmZmZddlmZmZddlZddlm	Z	ddlm
Z
ddl
mZdd	lm
Z
d
d�Ze
e�ZdS)�)�absolute_import�division�unicode_literals)�minidom�NodeN�)�_base�)�	constants)�
namespaces)�moduleFactoryFactorycsy��Gdd�dt��G��fdd�dtj��G����fdd�dtj�}dd��t�S)	Nc@speZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)zgetDomBuilder.<locals>.AttrListcSs
||_dS)N)�element)�selfr
�r�@/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treebuilders/dom.py�__init__sz(getDomBuilder.<locals>.AttrList.__init__cSst|jjj��j�S)N)�listr
�
attributes�items�__iter__)rrrrrsz(getDomBuilder.<locals>.AttrList.__iter__cSs|jj||�dS)N)r
�setAttribute)r�name�valuerrr�__setitem__sz+getDomBuilder.<locals>.AttrList.__setitem__cSstt|jjj���S)N)�lenrr
rr)rrrr�__len__sz'getDomBuilder.<locals>.AttrList.__len__cSs#dd�t|jjj��D�S)NcSs$g|]}|d|df�qS)rrr)�.0�itemrrr�
<listcomp>s	z9getDomBuilder.<locals>.AttrList.items.<locals>.<listcomp>)rr
rr)rrrrrs	z%getDomBuilder.<locals>.AttrList.itemscSst|jjj��S)N)rr
r�keys)rrrrr!sz$getDomBuilder.<locals>.AttrList.keyscSs|jj|�S)N)r
�getAttribute)rrrrr�__getitem__$sz+getDomBuilder.<locals>.AttrList.__getitem__cSs,t|t�rt�n|jj|�SdS)N)�
isinstance�tuple�NotImplementedErrorr
ZhasAttribute)rrrrr�__contains__'s	z,getDomBuilder.<locals>.AttrList.__contains__N)�__name__�
__module__�__qualname__rrrrrrr!r%rrrr�AttrListsr)cs�eZdZdd�Zedd��Zdd�Zddd	�Zd
d�Zdd
�Z	dd�Z
�fdd�Zdd�Zeee�Z
�fdd�Zdd�Zdd�Zee�ZdS)z"getDomBuilder.<locals>.NodeBuildercSs#tjj||j�||_dS)N)rrr�nodeNamer
)rr
rrrr.sz+getDomBuilder.<locals>.NodeBuilder.__init__cSs"t|jd�r|jjp!dS)N�namespaceURI)�hasattrr
r+)rrrr�<lambda>2sz+getDomBuilder.<locals>.NodeBuilder.<lambda>cSs ||_|jj|j�dS)N)�parentr
�appendChild)r�noderrrr/5s	z.getDomBuilder.<locals>.NodeBuilder.appendChildNcSsH|jjj|�}|r4|jj||j�n|jj|�dS)N)r
�
ownerDocument�createTextNode�insertBeforer/)r�datar3�textrrr�
insertText9sz-getDomBuilder.<locals>.NodeBuilder.insertTextcSs&|jj|j|j�||_dS)N)r
r3r.)rr0�refNoderrrr3@sz/getDomBuilder.<locals>.NodeBuilder.insertBeforecSs8|jj|jkr+|jj|j�nd|_dS)N)r
Z
parentNode�removeChildr.)rr0rrrr8Dsz.getDomBuilder.<locals>.NodeBuilder.removeChildcSsOx?|jj�rA|jj}|jj|�|jj|�qWg|_dS)N)r
�
hasChildNodesZ
firstChildr8r/�
childNodes)r�	newParent�childrrr�reparentChildrenIs
z3getDomBuilder.<locals>.NodeBuilder.reparentChildrencs
�|j�S)N)r
)r)r)rr�
getAttributesPsz0getDomBuilder.<locals>.NodeBuilder.getAttributescSs�|r�x�t|j��D]~\}}t|t�r�|ddk	r]|dd|d}n
|d}|jj|d||�q|jj||�qWndS)Nr�:rr	)rrr"r#r
ZsetAttributeNSr)rrrrZ
qualifiedNamerrr�
setAttributesSs

	z0getDomBuilder.<locals>.NodeBuilder.setAttributescs�|jjd��S)NF)r
�	cloneNode)r)�NodeBuilderrrrAbsz,getDomBuilder.<locals>.NodeBuilder.cloneNodecSs
|jj�S)N)r
r9)rrrr�
hasContentesz-getDomBuilder.<locals>.NodeBuilder.hasContentcSs4|jdkr td|jfS|j|jfSdS)N�html)�	namespacerr)rrrr�getNameTuplehsz/getDomBuilder.<locals>.NodeBuilder.getNameTuple)r&r'r(r�propertyrEr/r6r3r8r=r>r@rrArCrF�	nameTupler)r)rBrrrB-s
rBcs�eZdZ�fdd�Z��fdd�Zd�fdd�Z�fdd	�Z�fd
d�Zdd
�Z�fdd�Z	dd�Z
dd�Zddd�Z�Z
dZdS)z"getDomBuilder.<locals>.TreeBuildercs+�j�jddd�|_tj|�S)N)�getDOMImplementationZcreateDocument�dom�weakref�proxy)r)�Domrr�
documentClassqsz0getDomBuilder.<locals>.TreeBuilder.documentClasscst|d}|d}|d}�j�}|j|||�}|jj�|���tkrp|j|_ndS)Nr�publicId�systemId)rIZcreateDocumentType�documentr/rrJr1)r�tokenrrOrPZdomimpl�doctype)rMrBrr�
insertDoctypeus


z0getDomBuilder.<locals>.TreeBuilder.insertDoctypeNcsO|dkr0|jdkr0|jj|�}n|jj||�}�|�S)N)�defaultNamespacerJ�
createElementZcreateElementNS)rrrEr0)rBrr�elementClass�sz/getDomBuilder.<locals>.TreeBuilder.elementClasscs�|jj|��S)N)rJZ
createComment)rr4)rBrr�commentClass�sz/getDomBuilder.<locals>.TreeBuilder.commentClasscs�|jj��S)N)rJZcreateDocumentFragment)r)rBrr�
fragmentClass�sz0getDomBuilder.<locals>.TreeBuilder.fragmentClasscSs|jj|j�dS)N)rJr/r
)rr0rrrr/�sz.getDomBuilder.<locals>.TreeBuilder.appendChildcs
�|�S)Nr)rr
)�testSerializerrrrZ�sz1getDomBuilder.<locals>.TreeBuilder.testSerializercSs|jS)N)rJ)rrrr�getDocument�sz.getDomBuilder.<locals>.TreeBuilder.getDocumentcSstjj|�jS)N)r�TreeBuilder�getFragmentr
)rrrrr]�sz.getDomBuilder.<locals>.TreeBuilder.getFragmentcSs�|}||kr+tjj|||�nwt|jd�r�tj|jjkr�t|jj�|j_|jjj	tj�q�n|jj
|jj|��dS)N�_child_node_types)rr\r6r,rJr�	TEXT_NODEr^r�appendr/r2)rr4r.rrrr6�sz-getDomBuilder.<locals>.TreeBuilder.insertText)r&r'r(rNrTrWrXrYr/rZr[r]r6�implementationrr)rM�DomImplementationrBrZrrr\psr\csB|j�g�d��fdd���|d�dj��S)Nrcs�|jtjkr�|jr�|js-|jrr|jp9d}|jpHd}�jdd||j||f�q��jdd||jf�q��jdd|f�n�|jtjkr��jd�n�|jtjkr��jd�n�|jtj	kr%�jdd||j
f�nu|jtjkrX�jd	d||j
f�nBt|d
�r�|j
dk	r�dtj|j
|jf}n	|j}�jdd||f�|j�r�g}x�tt|j��D]r}|jj|�}|j}|j}|j
}	|	r8dtj|	|jf}n	|j}|j||f�q�Wx?t|�D].\}}�jd
d|d||f�qeWn|d7}x|jD]}
�|
|�q�WdS)N�z|%s<!DOCTYPE %s "%s" "%s">� z|%s<!DOCTYPE %s>z|%s<!DOCTYPE >z	#documentz#document-fragmentz|%s<!-- %s -->z|%s"%s"r+z%s %sz|%s<%s>z
|%s%s="%s"r	)ZnodeTyperZDOCUMENT_TYPE_NODErrOrPr`Z
DOCUMENT_NODEZDOCUMENT_FRAGMENT_NODEZCOMMENT_NODEZ	nodeValuer_r,r+r
�prefixesr*Z
hasAttributes�rangerrrrZ	localName�sortedr:)r
�indentrOrPrr�i�attrr�nsr<)�rv�serializeElementrrrm�sN		!!!					)
z?getDomBuilder.<locals>.testSerializer.<locals>.serializeElement�
)�	normalize�join)r
r)rlrmrrZ�s

.
z%getDomBuilder.<locals>.testSerializer)�objectrrr\�locals)rbr\r)r)rMrbrBrZr�
getDomBuilder
s"C(96rs)�
__future__rrr�xml.domrrrKrcrr
r�utilsrrs�getDomModulerrrr�<module>s�python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__pycache__/etree.cpython-34.pyc000064400000031277151735047520025452 0ustar00�
�ReM1�@s�ddlmZmZmZddlmZddlZddlmZddlm	Z	ddlm
Z
dd	l
mZdd
lm
Z
ejd�Zdd
d�Ze
e�ZdS)�)�absolute_import�division�unicode_literals)�	text_typeN�)�_base�)�ihatexml)�	constants)�
namespaces)�moduleFactoryFactoryz
{([^}]*)}(.*)Fc	s	���jd�j�G�fdd�dtj��G�fdd�d���G�fdd�d���G�fdd	�d	���G�fd
d�d����fdd
��	��fdd�}G��������	fdd�dtj�}t�S)NZasdcs$eZdZd�fdd�Zdd�Zdd�Zdd	�Zeee�Zd
d�Z	dd
�Z
ee
e	�Zdd�Zdd�Z
eee
�Zdd�Zdd�Zeee�Zdd�Zdd�Zdd�Zdd�Zddd�Zd d!�Zd"d#�ZdS)$z getETreeBuilder.<locals>.ElementNcs�||_||_�j|j||��|_|dkrUtd|jf|_n|j|jf|_d|_g|_g|_	dS)N�html)
�_name�
_namespace�Element�_getETreeTag�_elementr�	nameTuple�parent�_childNodes�_flags)�self�name�	namespace)�ElementTree��B/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treebuilders/etree.py�__init__s				z)getETreeBuilder.<locals>.Element.__init__cSs)|dkr|}nd||f}|S)Nz{%s}%sr)rrrZ	etree_tagrrrr!s	z-getETreeBuilder.<locals>.Element._getETreeTagcSs+||_|j|j|j�|j_dS)N)rrrr�tag)rrrrr�_setName(s	z)getETreeBuilder.<locals>.Element._setNamecSs|jS)N)r)rrrr�_getName,sz)getETreeBuilder.<locals>.Element._getNamecSs+||_|j|j|j�|j_dS)N)rrrrr)rrrrr�
_setNamespace1s	z.getETreeBuilder.<locals>.Element._setNamespacecSs|jS)N)r)rrrr�
_getNamespace5sz.getETreeBuilder.<locals>.Element._getNamespacecSs
|jjS)N)r�attrib)rrrr�_getAttributes:sz/getETreeBuilder.<locals>.Element._getAttributescSs�x-t|jjj��D]}|jj|=qWx]|j�D]O\}}t|t�rsd|d|df}n|}|jj||�q=WdS)Nz{%s}%srr)�listrr#�keys�items�
isinstance�tuple�set)r�
attributes�key�valuerrrr�_setAttributes=sz/getETreeBuilder.<locals>.Element._setAttributescSs|jS)N)r)rrrr�_getChildNodesKsz/getETreeBuilder.<locals>.Element._getChildNodescSs;|jdd�=g|_x|D]}|j|�q WdS)N)rrZinsertChild)rr-�elementrrr�_setChildNodesNs	
z/getETreeBuilder.<locals>.Element._setChildNodescSst|jjpt|j��S)z,Return true if the node has children or text)�boolr�text�len)rrrr�
hasContentVsz+getETreeBuilder.<locals>.Element.hasContentcSs0|jj|�|jj|j�||_dS)N)r�appendrr)r�noderrr�appendChildZsz,getETreeBuilder.<locals>.Element.appendChildcSs>t|j�j|j�}|jj||j�||_dS)N)r%r�index�insertr)rr7�refNoder9rrr�insertBefore_sz-getETreeBuilder.<locals>.Element.insertBeforecSs |jj|j�d|_dS)N)r�remover)rr7rrr�removeChilddsz,getETreeBuilder.<locals>.Element.removeChildcSs-t|j�s?|jjs*d|j_n|jj|7_n�|dkr�|jdjsnd|jd_n|jdj|7_n�t|j�}|j|j�}|dkr�|j|djs�d|j|d_n|j|dj|7_n-|jjsd|j_n|jj|7_dS)N�rr���r@r@)r4rr3�tailr%r9)r�datar<Zchildrenr9rrr�
insertTexths"z+getETreeBuilder.<locals>.Element.insertTextcSsLt|�|j|j�}x*|jj�D]\}}||j|<q+W|S)N)�typerrr+r')rr0rr-rrr�	cloneNodesz*getETreeBuilder.<locals>.Element.cloneNodecSs�|jr+|jdjj|jj7_nH|jjsFd|j_n|jjdk	rs|jj|jj7_nd|j_tjj||�dS)Nrr?r@)�
childNodesrrAr3r�Node�reparentChildren)r�	newParentrrrrH�s	"z1getETreeBuilder.<locals>.Element.reparentChildren)�__name__�
__module__�__qualname__rrrr �propertyrr!r"rr$r.r+r/r1rFr5r8r<r>rCrErHr)rrrrs*
rcsIeZdZ�fdd�Zdd�Zdd�Zeee�ZdS)z getETreeBuilder.<locals>.Commentcs1�j|�|_d|_g|_g|_dS)N)�Commentrrrr)rrB)rrrr�s		z)getETreeBuilder.<locals>.Comment.__init__cSs
|jjS)N)rr3)rrrr�_getData�sz)getETreeBuilder.<locals>.Comment._getDatacSs||j_dS)N)rr3)rr-rrr�_setData�sz)getETreeBuilder.<locals>.Comment._setDataN)rJrKrLrrOrPrMrBr)rrrrN�srNcspeZdZ�fdd�Zdd�Zdd�Zeee�Zdd�Zd	d
�Z	eee	�Z
dS)z%getETreeBuilder.<locals>.DocumentTypecs2�j|d�||j_||_||_dS)Nz
<!DOCTYPE>)rrr3�publicId�systemId)rrrQrR)rrrr�s	z.getETreeBuilder.<locals>.DocumentType.__init__cSs|jjdd�S)NrQr?)r�get)rrrr�_getPublicId�sz2getETreeBuilder.<locals>.DocumentType._getPublicIdcSs&|dk	r"|jjd|�ndS)NrQ)rr*)rr-rrr�_setPublicId�sz2getETreeBuilder.<locals>.DocumentType._setPublicIdcSs|jjdd�S)NrRr?)rrS)rrrr�_getSystemId�sz2getETreeBuilder.<locals>.DocumentType._getSystemIdcSs&|dk	r"|jjd|�ndS)NrR)rr*)rr-rrr�_setSystemId�sz2getETreeBuilder.<locals>.DocumentType._setSystemIdN)rJrKrLrrTrUrMrQrVrWrRr)rrr�DocumentType�srXcs"eZdZ�fdd�ZdS)z!getETreeBuilder.<locals>.Documentcs�j|d�dS)N�
DOCUMENT_ROOT)r)r)rrrr�sz*getETreeBuilder.<locals>.Document.__init__N)rJrKrLrr)rrr�Document�srZcs"eZdZ�fdd�ZdS)z)getETreeBuilder.<locals>.DocumentFragmentcs�j|d�dS)NZDOCUMENT_FRAGMENT)r)r)rrrr�sz2getETreeBuilder.<locals>.DocumentFragment.__init__N)rJrKrLrr)rrr�DocumentFragment�sr[cs;g�d���fdd���|d�dj��S)Nrcs�t|d�s|j�}n|jdkr�|jd�sK|jd�r�|jd�p]d}|jd�prd}�jd|j||f�q0�jd|jf�n�|jdkrM�jd	�|jdk	r��jd
d|d|jf�n|jdk	rtd
��nt|d�r0t|j	�r0td��q0n�|j�kr}�jdd||jf�n�t
|jt�s�tdt
|j�|jf��tj|j�}|dkr�|j}n/|j�\}}tj|}d||f}�jdd||f�t|d�rg}x�|j	j�D]r\}}	tj|�}|dk	r�|j�\}}tj|}d||f}
n|}
|j|
|	f�qJWx?t|�D].\}}	�jdd|d||	f�q�Wn|jr0�jd
d|d|jf�n|d7}x|D]}�||�qAW|jr��jd
d|d|jf�ndS)Nrz
<!DOCTYPE>rQrRr?z<!DOCTYPE %s "%s" "%s">z
<!DOCTYPE %s>rYz	#documentz|%s"%s"� rzDocument node cannot have tailr#z$Document node cannot have attributesz|%s<!-- %s -->zExpected unicode, got %s, %sz%s %sz|%s<%s>z
|%s%s="%s")�hasattr�getrootrrSr6r3rA�	TypeErrorr4r#r(r�AssertionErrorrD�
tag_regexp�match�groupsr
�prefixesr'�sorted)r0�indentrQrRZnsmatchr�ns�prefixr+r-Zattr_string�child)�ElementTreeCommentType�rv�serializeElementrrrl�s^	
%!

)	%

	zAgetETreeBuilder.<locals>.testSerializer.<locals>.serializeElement�
)�join)r0)rj)rkrlr�testSerializer�s7
z'getETreeBuilder.<locals>.testSerializercsGg�tj�������fdd���|�dj��S)z4Serialize an element and its child nodes to a stringcsTt|�j�r!|j�}n|jdkr�|jd�sN|jd�r�|jd�p`d}|jd�pud}�jd|j||f�q4�jd|jf�n�|jdkrL|jdk	r��j|j�n|jdk	rtd��nt	|d	�r.t
|j�r.td
��nx|D]}�|�q5Wn�|j�kru�jd|jf�n�|js��jd�j|j�f�nEd
j
�fdd�|jj�D��}�jd|j|f�|jr�j|j�nx|D]}�|�q	W�jd|jf�|jrP�j|j�ndS)Nz
<!DOCTYPE>rQrRr?z<!DOCTYPE %s PUBLIC "%s" "%s">z
<!DOCTYPE %s>rYzDocument node cannot have tailr#z$Document node cannot have attributesz	<!--%s-->z<%s>r\cs/g|]%\}}d�j|�|f�qS)z%s="%s")�fromXmlName)�.0rr-)�filterrr�
<listcomp>#s	zOgetETreeBuilder.<locals>.tostring.<locals>.serializeElement.<locals>.<listcomp>z<%s %s>z</%s>)r(rr^rrSr6r3rAr_r]r4r#rprnr')r0rQrRri�attr)rrjrrrkrlrrrls@	
	#	
	z;getETreeBuilder.<locals>.tostring.<locals>.serializeElementr?)r	Z
InfosetFilterrn)r0)rrj)rrrkrlr�tostrings
-
z!getETreeBuilder.<locals>.tostringcsdeZdZ�Z�Z�Z�Z�Z�Z�fdd�Z	�fdd�Z
dd�ZdS)z$getETreeBuilder.<locals>.TreeBuildercs
�|�S)Nr)rr0)rorrro>sz3getETreeBuilder.<locals>.TreeBuilder.testSerializercsP�r|jjS|jdk	r9|jjjd|j�S|jjjd�SdS)Nz{%s}htmlr
)�documentr�defaultNamespace�find)r)�fullTreerr�getDocumentAs
z0getETreeBuilder.<locals>.TreeBuilder.getDocumentcSstjj|�jS)N)r�TreeBuilder�getFragmentr)rrrrr|Ksz0getETreeBuilder.<locals>.TreeBuilder.getFragmentN)rJrKrL�
documentClass�doctypeClass�elementClass�commentClass�
fragmentClass�implementationrorzr|r)rNrZr[rXr�ElementTreeImplementationryrorrr{6s
r{)rNrrrGr{�locals)r�ryrur{r)
rNrZr[rXrrrjr�ryror�getETreeBuilders}>64r�)�
__future__rrrZpip._vendor.sixr�rer?rr	r
r�utilsr�compilerar��getETreeModulerrrr�<module>s�Cpython3.4/site-packages/pip/_vendor/html5lib/treebuilders/_base.py000064400000032617151735047520021134 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

from ..constants import scopingElements, tableInsertModeElements, namespaces

# The scope markers are inserted when entering object elements,
# marquees, table cells, and table captions, and are used to prevent formatting
# from "leaking" into tables, object elements, and marquees.
Marker = None

listElementsMap = {
    None: (frozenset(scopingElements), False),
    "button": (frozenset(scopingElements | set([(namespaces["html"], "button")])), False),
    "list": (frozenset(scopingElements | set([(namespaces["html"], "ol"),
                                              (namespaces["html"], "ul")])), False),
    "table": (frozenset([(namespaces["html"], "html"),
                         (namespaces["html"], "table")]), False),
    "select": (frozenset([(namespaces["html"], "optgroup"),
                          (namespaces["html"], "option")]), True)
}


class Node(object):
    def __init__(self, name):
        """Node representing an item in the tree.
        name - The tag name associated with the node
        parent - The parent of the current node (or None for the document node)
        value - The value of the current node (applies to text nodes and
        comments
        attributes - a dict holding name, value pairs for attributes of the node
        childNodes - a list of child nodes of the current node. This must
        include all elements but not necessarily other node types
        _flags - A list of miscellaneous flags that can be set on the node
        """
        self.name = name
        self.parent = None
        self.value = None
        self.attributes = {}
        self.childNodes = []
        self._flags = []

    def __str__(self):
        attributesStr = " ".join(["%s=\"%s\"" % (name, value)
                                  for name, value in
                                  self.attributes.items()])
        if attributesStr:
            return "<%s %s>" % (self.name, attributesStr)
        else:
            return "<%s>" % (self.name)

    def __repr__(self):
        return "<%s>" % (self.name)

    def appendChild(self, node):
        """Insert node as a child of the current node
        """
        raise NotImplementedError

    def insertText(self, data, insertBefore=None):
        """Insert data as text in the current node, positioned before the
        start of node insertBefore or to the end of the node's text.
        """
        raise NotImplementedError

    def insertBefore(self, node, refNode):
        """Insert node as a child of the current node, before refNode in the
        list of child nodes. Raises ValueError if refNode is not a child of
        the current node"""
        raise NotImplementedError

    def removeChild(self, node):
        """Remove node from the children of the current node
        """
        raise NotImplementedError

    def reparentChildren(self, newParent):
        """Move all the children of the current node to newParent.
        This is needed so that trees that don't store text as nodes move the
        text in the correct way
        """
        # XXX - should this method be made more general?
        for child in self.childNodes:
            newParent.appendChild(child)
        self.childNodes = []

    def cloneNode(self):
        """Return a shallow copy of the current node i.e. a node with the same
        name and attributes but with no parent or child nodes
        """
        raise NotImplementedError

    def hasContent(self):
        """Return true if the node has children or text, false otherwise
        """
        raise NotImplementedError


class ActiveFormattingElements(list):
    def append(self, node):
        equalCount = 0
        if node != Marker:
            for element in self[::-1]:
                if element == Marker:
                    break
                if self.nodesEqual(element, node):
                    equalCount += 1
                if equalCount == 3:
                    self.remove(element)
                    break
        list.append(self, node)

    def nodesEqual(self, node1, node2):
        if not node1.nameTuple == node2.nameTuple:
            return False

        if not node1.attributes == node2.attributes:
            return False

        return True


class TreeBuilder(object):
    """Base treebuilder implementation
    documentClass - the class to use for the bottommost node of a document
    elementClass - the class to use for HTML Elements
    commentClass - the class to use for comments
    doctypeClass - the class to use for doctypes
    """

    # Document class
    documentClass = None

    # The class to use for creating a node
    elementClass = None

    # The class to use for creating comments
    commentClass = None

    # The class to use for creating doctypes
    doctypeClass = None

    # Fragment class
    fragmentClass = None

    def __init__(self, namespaceHTMLElements):
        if namespaceHTMLElements:
            self.defaultNamespace = "http://www.w3.org/1999/xhtml"
        else:
            self.defaultNamespace = None
        self.reset()

    def reset(self):
        self.openElements = []
        self.activeFormattingElements = ActiveFormattingElements()

        # XXX - rename these to headElement, formElement
        self.headPointer = None
        self.formPointer = None

        self.insertFromTable = False

        self.document = self.documentClass()

    def elementInScope(self, target, variant=None):

        # If we pass a node in we match that. if we pass a string
        # match any node with that name
        exactNode = hasattr(target, "nameTuple")

        listElements, invert = listElementsMap[variant]

        for node in reversed(self.openElements):
            if (node.name == target and not exactNode or
                    node == target and exactNode):
                return True
            elif (invert ^ (node.nameTuple in listElements)):
                return False

        assert False  # We should never reach this point

    def reconstructActiveFormattingElements(self):
        # Within this algorithm the order of steps described in the
        # specification is not quite the same as the order of steps in the
        # code. It should still do the same though.

        # Step 1: stop the algorithm when there's nothing to do.
        if not self.activeFormattingElements:
            return

        # Step 2 and step 3: we start with the last element. So i is -1.
        i = len(self.activeFormattingElements) - 1
        entry = self.activeFormattingElements[i]
        if entry == Marker or entry in self.openElements:
            return

        # Step 6
        while entry != Marker and entry not in self.openElements:
            if i == 0:
                # This will be reset to 0 below
                i = -1
                break
            i -= 1
            # Step 5: let entry be one earlier in the list.
            entry = self.activeFormattingElements[i]

        while True:
            # Step 7
            i += 1

            # Step 8
            entry = self.activeFormattingElements[i]
            clone = entry.cloneNode()  # Mainly to get a new copy of the attributes

            # Step 9
            element = self.insertElement({"type": "StartTag",
                                          "name": clone.name,
                                          "namespace": clone.namespace,
                                          "data": clone.attributes})

            # Step 10
            self.activeFormattingElements[i] = element

            # Step 11
            if element == self.activeFormattingElements[-1]:
                break

    def clearActiveFormattingElements(self):
        entry = self.activeFormattingElements.pop()
        while self.activeFormattingElements and entry != Marker:
            entry = self.activeFormattingElements.pop()

    def elementInActiveFormattingElements(self, name):
        """Check if an element exists between the end of the active
        formatting elements and the last marker. If it does, return it, else
        return false"""

        for item in self.activeFormattingElements[::-1]:
            # Check for Marker first because if it's a Marker it doesn't have a
            # name attribute.
            if item == Marker:
                break
            elif item.name == name:
                return item
        return False

    def insertRoot(self, token):
        element = self.createElement(token)
        self.openElements.append(element)
        self.document.appendChild(element)

    def insertDoctype(self, token):
        name = token["name"]
        publicId = token["publicId"]
        systemId = token["systemId"]

        doctype = self.doctypeClass(name, publicId, systemId)
        self.document.appendChild(doctype)

    def insertComment(self, token, parent=None):
        if parent is None:
            parent = self.openElements[-1]
        parent.appendChild(self.commentClass(token["data"]))

    def createElement(self, token):
        """Create an element but don't insert it anywhere"""
        name = token["name"]
        namespace = token.get("namespace", self.defaultNamespace)
        element = self.elementClass(name, namespace)
        element.attributes = token["data"]
        return element

    def _getInsertFromTable(self):
        return self._insertFromTable

    def _setInsertFromTable(self, value):
        """Switch the function used to insert an element from the
        normal one to the misnested table one and back again"""
        self._insertFromTable = value
        if value:
            self.insertElement = self.insertElementTable
        else:
            self.insertElement = self.insertElementNormal

    insertFromTable = property(_getInsertFromTable, _setInsertFromTable)

    def insertElementNormal(self, token):
        name = token["name"]
        assert isinstance(name, text_type), "Element %s not unicode" % name
        namespace = token.get("namespace", self.defaultNamespace)
        element = self.elementClass(name, namespace)
        element.attributes = token["data"]
        self.openElements[-1].appendChild(element)
        self.openElements.append(element)
        return element

    def insertElementTable(self, token):
        """Create an element and insert it into the tree"""
        element = self.createElement(token)
        if self.openElements[-1].name not in tableInsertModeElements:
            return self.insertElementNormal(token)
        else:
            # We should be in the InTable mode. This means we want to do
            # special magic element rearranging
            parent, insertBefore = self.getTableMisnestedNodePosition()
            if insertBefore is None:
                parent.appendChild(element)
            else:
                parent.insertBefore(element, insertBefore)
            self.openElements.append(element)
        return element

    def insertText(self, data, parent=None):
        """Insert text data."""
        if parent is None:
            parent = self.openElements[-1]

        if (not self.insertFromTable or (self.insertFromTable and
                                         self.openElements[-1].name
                                         not in tableInsertModeElements)):
            parent.insertText(data)
        else:
            # We should be in the InTable mode. This means we want to do
            # special magic element rearranging
            parent, insertBefore = self.getTableMisnestedNodePosition()
            parent.insertText(data, insertBefore)

    def getTableMisnestedNodePosition(self):
        """Get the foster parent element, and sibling to insert before
        (or None) when inserting a misnested table node"""
        # The foster parent element is the one which comes before the most
        # recently opened table element
        # XXX - this is really inelegant
        lastTable = None
        fosterParent = None
        insertBefore = None
        for elm in self.openElements[::-1]:
            if elm.name == "table":
                lastTable = elm
                break
        if lastTable:
            # XXX - we should really check that this parent is actually a
            # node here
            if lastTable.parent:
                fosterParent = lastTable.parent
                insertBefore = lastTable
            else:
                fosterParent = self.openElements[
                    self.openElements.index(lastTable) - 1]
        else:
            fosterParent = self.openElements[0]
        return fosterParent, insertBefore

    def generateImpliedEndTags(self, exclude=None):
        name = self.openElements[-1].name
        # XXX td, th and tr are not actually needed
        if (name in frozenset(("dd", "dt", "li", "option", "optgroup", "p", "rp", "rt"))
                and name != exclude):
            self.openElements.pop()
            # XXX This is not entirely what the specification says. We should
            # investigate it more closely.
            self.generateImpliedEndTags(exclude)

    def getDocument(self):
        "Return the final tree"
        return self.document

    def getFragment(self):
        "Return the final fragment"
        # assert self.innerHTML
        fragment = self.fragmentClass()
        self.openElements[0].reparentChildren(fragment)
        return fragment

    def testSerializer(self, node):
        """Serialize the subtree of node in the format required by unit tests
        node - the node from which to start serializing"""
        raise NotImplementedError
python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py000064400000020425151735047520020634 0ustar00from __future__ import absolute_import, division, unicode_literals


from xml.dom import minidom, Node
import weakref

from . import _base
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory


def getDomBuilder(DomImplementation):
    Dom = DomImplementation

    class AttrList(object):
        def __init__(self, element):
            self.element = element

        def __iter__(self):
            return list(self.element.attributes.items()).__iter__()

        def __setitem__(self, name, value):
            self.element.setAttribute(name, value)

        def __len__(self):
            return len(list(self.element.attributes.items()))

        def items(self):
            return [(item[0], item[1]) for item in
                    list(self.element.attributes.items())]

        def keys(self):
            return list(self.element.attributes.keys())

        def __getitem__(self, name):
            return self.element.getAttribute(name)

        def __contains__(self, name):
            if isinstance(name, tuple):
                raise NotImplementedError
            else:
                return self.element.hasAttribute(name)

    class NodeBuilder(_base.Node):
        def __init__(self, element):
            _base.Node.__init__(self, element.nodeName)
            self.element = element

        namespace = property(lambda self: hasattr(self.element, "namespaceURI")
                             and self.element.namespaceURI or None)

        def appendChild(self, node):
            node.parent = self
            self.element.appendChild(node.element)

        def insertText(self, data, insertBefore=None):
            text = self.element.ownerDocument.createTextNode(data)
            if insertBefore:
                self.element.insertBefore(text, insertBefore.element)
            else:
                self.element.appendChild(text)

        def insertBefore(self, node, refNode):
            self.element.insertBefore(node.element, refNode.element)
            node.parent = self

        def removeChild(self, node):
            if node.element.parentNode == self.element:
                self.element.removeChild(node.element)
            node.parent = None

        def reparentChildren(self, newParent):
            while self.element.hasChildNodes():
                child = self.element.firstChild
                self.element.removeChild(child)
                newParent.element.appendChild(child)
            self.childNodes = []

        def getAttributes(self):
            return AttrList(self.element)

        def setAttributes(self, attributes):
            if attributes:
                for name, value in list(attributes.items()):
                    if isinstance(name, tuple):
                        if name[0] is not None:
                            qualifiedName = (name[0] + ":" + name[1])
                        else:
                            qualifiedName = name[1]
                        self.element.setAttributeNS(name[2], qualifiedName,
                                                    value)
                    else:
                        self.element.setAttribute(
                            name, value)
        attributes = property(getAttributes, setAttributes)

        def cloneNode(self):
            return NodeBuilder(self.element.cloneNode(False))

        def hasContent(self):
            return self.element.hasChildNodes()

        def getNameTuple(self):
            if self.namespace is None:
                return namespaces["html"], self.name
            else:
                return self.namespace, self.name

        nameTuple = property(getNameTuple)

    class TreeBuilder(_base.TreeBuilder):
        def documentClass(self):
            self.dom = Dom.getDOMImplementation().createDocument(None, None, None)
            return weakref.proxy(self)

        def insertDoctype(self, token):
            name = token["name"]
            publicId = token["publicId"]
            systemId = token["systemId"]

            domimpl = Dom.getDOMImplementation()
            doctype = domimpl.createDocumentType(name, publicId, systemId)
            self.document.appendChild(NodeBuilder(doctype))
            if Dom == minidom:
                doctype.ownerDocument = self.dom

        def elementClass(self, name, namespace=None):
            if namespace is None and self.defaultNamespace is None:
                node = self.dom.createElement(name)
            else:
                node = self.dom.createElementNS(namespace, name)

            return NodeBuilder(node)

        def commentClass(self, data):
            return NodeBuilder(self.dom.createComment(data))

        def fragmentClass(self):
            return NodeBuilder(self.dom.createDocumentFragment())

        def appendChild(self, node):
            self.dom.appendChild(node.element)

        def testSerializer(self, element):
            return testSerializer(element)

        def getDocument(self):
            return self.dom

        def getFragment(self):
            return _base.TreeBuilder.getFragment(self).element

        def insertText(self, data, parent=None):
            data = data
            if parent != self:
                _base.TreeBuilder.insertText(self, data, parent)
            else:
                # HACK: allow text nodes as children of the document node
                if hasattr(self.dom, '_child_node_types'):
                    if not Node.TEXT_NODE in self.dom._child_node_types:
                        self.dom._child_node_types = list(self.dom._child_node_types)
                        self.dom._child_node_types.append(Node.TEXT_NODE)
                self.dom.appendChild(self.dom.createTextNode(data))

        implementation = DomImplementation
        name = None

    def testSerializer(element):
        element.normalize()
        rv = []

        def serializeElement(element, indent=0):
            if element.nodeType == Node.DOCUMENT_TYPE_NODE:
                if element.name:
                    if element.publicId or element.systemId:
                        publicId = element.publicId or ""
                        systemId = element.systemId or ""
                        rv.append("""|%s<!DOCTYPE %s "%s" "%s">""" %
                                  (' ' * indent, element.name, publicId, systemId))
                    else:
                        rv.append("|%s<!DOCTYPE %s>" % (' ' * indent, element.name))
                else:
                    rv.append("|%s<!DOCTYPE >" % (' ' * indent,))
            elif element.nodeType == Node.DOCUMENT_NODE:
                rv.append("#document")
            elif element.nodeType == Node.DOCUMENT_FRAGMENT_NODE:
                rv.append("#document-fragment")
            elif element.nodeType == Node.COMMENT_NODE:
                rv.append("|%s<!-- %s -->" % (' ' * indent, element.nodeValue))
            elif element.nodeType == Node.TEXT_NODE:
                rv.append("|%s\"%s\"" % (' ' * indent, element.nodeValue))
            else:
                if (hasattr(element, "namespaceURI") and
                        element.namespaceURI is not None):
                    name = "%s %s" % (constants.prefixes[element.namespaceURI],
                                      element.nodeName)
                else:
                    name = element.nodeName
                rv.append("|%s<%s>" % (' ' * indent, name))
                if element.hasAttributes():
                    attributes = []
                    for i in range(len(element.attributes)):
                        attr = element.attributes.item(i)
                        name = attr.nodeName
                        value = attr.value
                        ns = attr.namespaceURI
                        if ns:
                            name = "%s %s" % (constants.prefixes[ns], attr.localName)
                        else:
                            name = attr.nodeName
                        attributes.append((name, value))

                    for name, value in sorted(attributes):
                        rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))
            indent += 2
            for child in element.childNodes:
                serializeElement(child, indent)
        serializeElement(element, 0)

        return "\n".join(rv)

    return locals()


# The actual means to get a module!
getDomModule = moduleFactoryFactory(getDomBuilder)
python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py000064400000006515151735047520021620 0ustar00"""A collection of modules for building different kinds of tree from
HTML documents.

To create a treebuilder for a new type of tree, you need to do
implement several things:

1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders.Node (although comment nodes have a different
signature for their constructor, see treebuilders.etree.Comment)
Textual content may also be implemented as another node type, or not, as
your tree implementation requires.

2) A treebuilder object (called TreeBuilder by convention) that
inherits from treebuilders._base.TreeBuilder. This has 4 required attributes:
documentClass - the class to use for the bottommost node of a document
elementClass - the class to use for HTML Elements
commentClass - the class to use for comments
doctypeClass - the class to use for doctypes
It also has one required method:
getDocument - Returns the root node of the complete document tree

3) If you wish to run the unit tests, you must also create a
testSerializer method on your treebuilder which accepts a node and
returns a string containing Node and its children serialized according
to the format used in the unittests
"""

from __future__ import absolute_import, division, unicode_literals

from ..utils import default_etree

treeBuilderCache = {}


def getTreeBuilder(treeType, implementation=None, **kwargs):
    """Get a TreeBuilder class for various types of tree with built-in support

    treeType - the name of the tree type required (case-insensitive). Supported
               values are:

               "dom" - A generic builder for DOM implementations, defaulting to
                       a xml.dom.minidom based implementation.
               "etree" - A generic builder for tree implementations exposing an
                         ElementTree-like interface, defaulting to
                         xml.etree.cElementTree if available and
                         xml.etree.ElementTree if not.
               "lxml" - A etree-based builder for lxml.etree, handling
                        limitations of lxml's implementation.

    implementation - (Currently applies to the "etree" and "dom" tree types). A
                      module implementing the tree type e.g.
                      xml.etree.ElementTree or xml.etree.cElementTree."""

    treeType = treeType.lower()
    if treeType not in treeBuilderCache:
        if treeType == "dom":
            from . import dom
            # Come up with a sane default (pref. from the stdlib)
            if implementation is None:
                from xml.dom import minidom
                implementation = minidom
            # NEVER cache here, caching is done in the dom submodule
            return dom.getDomModule(implementation, **kwargs).TreeBuilder
        elif treeType == "lxml":
            from . import etree_lxml
            treeBuilderCache[treeType] = etree_lxml.TreeBuilder
        elif treeType == "etree":
            from . import etree
            if implementation is None:
                implementation = default_etree
            # NEVER cache here, caching is done in the etree submodule
            return etree.getETreeModule(implementation, **kwargs).TreeBuilder
        else:
            raise ValueError("""Unrecognised treebuilder "%s" """ % treeType)
    return treeBuilderCache.get(treeType)
python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py000064400000030515151735047520021162 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

import re

from . import _base
from .. import ihatexml
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory

tag_regexp = re.compile("{([^}]*)}(.*)")


def getETreeBuilder(ElementTreeImplementation, fullTree=False):
    ElementTree = ElementTreeImplementation
    ElementTreeCommentType = ElementTree.Comment("asd").tag

    class Element(_base.Node):
        def __init__(self, name, namespace=None):
            self._name = name
            self._namespace = namespace
            self._element = ElementTree.Element(self._getETreeTag(name,
                                                                  namespace))
            if namespace is None:
                self.nameTuple = namespaces["html"], self._name
            else:
                self.nameTuple = self._namespace, self._name
            self.parent = None
            self._childNodes = []
            self._flags = []

        def _getETreeTag(self, name, namespace):
            if namespace is None:
                etree_tag = name
            else:
                etree_tag = "{%s}%s" % (namespace, name)
            return etree_tag

        def _setName(self, name):
            self._name = name
            self._element.tag = self._getETreeTag(self._name, self._namespace)

        def _getName(self):
            return self._name

        name = property(_getName, _setName)

        def _setNamespace(self, namespace):
            self._namespace = namespace
            self._element.tag = self._getETreeTag(self._name, self._namespace)

        def _getNamespace(self):
            return self._namespace

        namespace = property(_getNamespace, _setNamespace)

        def _getAttributes(self):
            return self._element.attrib

        def _setAttributes(self, attributes):
            # Delete existing attributes first
            # XXX - there may be a better way to do this...
            for key in list(self._element.attrib.keys()):
                del self._element.attrib[key]
            for key, value in attributes.items():
                if isinstance(key, tuple):
                    name = "{%s}%s" % (key[2], key[1])
                else:
                    name = key
                self._element.set(name, value)

        attributes = property(_getAttributes, _setAttributes)

        def _getChildNodes(self):
            return self._childNodes

        def _setChildNodes(self, value):
            del self._element[:]
            self._childNodes = []
            for element in value:
                self.insertChild(element)

        childNodes = property(_getChildNodes, _setChildNodes)

        def hasContent(self):
            """Return true if the node has children or text"""
            return bool(self._element.text or len(self._element))

        def appendChild(self, node):
            self._childNodes.append(node)
            self._element.append(node._element)
            node.parent = self

        def insertBefore(self, node, refNode):
            index = list(self._element).index(refNode._element)
            self._element.insert(index, node._element)
            node.parent = self

        def removeChild(self, node):
            self._element.remove(node._element)
            node.parent = None

        def insertText(self, data, insertBefore=None):
            if not(len(self._element)):
                if not self._element.text:
                    self._element.text = ""
                self._element.text += data
            elif insertBefore is None:
                # Insert the text as the tail of the last child element
                if not self._element[-1].tail:
                    self._element[-1].tail = ""
                self._element[-1].tail += data
            else:
                # Insert the text before the specified node
                children = list(self._element)
                index = children.index(insertBefore._element)
                if index > 0:
                    if not self._element[index - 1].tail:
                        self._element[index - 1].tail = ""
                    self._element[index - 1].tail += data
                else:
                    if not self._element.text:
                        self._element.text = ""
                    self._element.text += data

        def cloneNode(self):
            element = type(self)(self.name, self.namespace)
            for name, value in self.attributes.items():
                element.attributes[name] = value
            return element

        def reparentChildren(self, newParent):
            if newParent.childNodes:
                newParent.childNodes[-1]._element.tail += self._element.text
            else:
                if not newParent._element.text:
                    newParent._element.text = ""
                if self._element.text is not None:
                    newParent._element.text += self._element.text
            self._element.text = ""
            _base.Node.reparentChildren(self, newParent)

    class Comment(Element):
        def __init__(self, data):
            # Use the superclass constructor to set all properties on the
            # wrapper element
            self._element = ElementTree.Comment(data)
            self.parent = None
            self._childNodes = []
            self._flags = []

        def _getData(self):
            return self._element.text

        def _setData(self, value):
            self._element.text = value

        data = property(_getData, _setData)

    class DocumentType(Element):
        def __init__(self, name, publicId, systemId):
            Element.__init__(self, "<!DOCTYPE>")
            self._element.text = name
            self.publicId = publicId
            self.systemId = systemId

        def _getPublicId(self):
            return self._element.get("publicId", "")

        def _setPublicId(self, value):
            if value is not None:
                self._element.set("publicId", value)

        publicId = property(_getPublicId, _setPublicId)

        def _getSystemId(self):
            return self._element.get("systemId", "")

        def _setSystemId(self, value):
            if value is not None:
                self._element.set("systemId", value)

        systemId = property(_getSystemId, _setSystemId)

    class Document(Element):
        def __init__(self):
            Element.__init__(self, "DOCUMENT_ROOT")

    class DocumentFragment(Element):
        def __init__(self):
            Element.__init__(self, "DOCUMENT_FRAGMENT")

    def testSerializer(element):
        rv = []

        def serializeElement(element, indent=0):
            if not(hasattr(element, "tag")):
                element = element.getroot()
            if element.tag == "<!DOCTYPE>":
                if element.get("publicId") or element.get("systemId"):
                    publicId = element.get("publicId") or ""
                    systemId = element.get("systemId") or ""
                    rv.append("""<!DOCTYPE %s "%s" "%s">""" %
                              (element.text, publicId, systemId))
                else:
                    rv.append("<!DOCTYPE %s>" % (element.text,))
            elif element.tag == "DOCUMENT_ROOT":
                rv.append("#document")
                if element.text is not None:
                    rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
                if element.tail is not None:
                    raise TypeError("Document node cannot have tail")
                if hasattr(element, "attrib") and len(element.attrib):
                    raise TypeError("Document node cannot have attributes")
            elif element.tag == ElementTreeCommentType:
                rv.append("|%s<!-- %s -->" % (' ' * indent, element.text))
            else:
                assert isinstance(element.tag, text_type), \
                    "Expected unicode, got %s, %s" % (type(element.tag), element.tag)
                nsmatch = tag_regexp.match(element.tag)

                if nsmatch is None:
                    name = element.tag
                else:
                    ns, name = nsmatch.groups()
                    prefix = constants.prefixes[ns]
                    name = "%s %s" % (prefix, name)
                rv.append("|%s<%s>" % (' ' * indent, name))

                if hasattr(element, "attrib"):
                    attributes = []
                    for name, value in element.attrib.items():
                        nsmatch = tag_regexp.match(name)
                        if nsmatch is not None:
                            ns, name = nsmatch.groups()
                            prefix = constants.prefixes[ns]
                            attr_string = "%s %s" % (prefix, name)
                        else:
                            attr_string = name
                        attributes.append((attr_string, value))

                    for name, value in sorted(attributes):
                        rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))
                if element.text:
                    rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
            indent += 2
            for child in element:
                serializeElement(child, indent)
            if element.tail:
                rv.append("|%s\"%s\"" % (' ' * (indent - 2), element.tail))
        serializeElement(element, 0)

        return "\n".join(rv)

    def tostring(element):
        """Serialize an element and its child nodes to a string"""
        rv = []
        filter = ihatexml.InfosetFilter()

        def serializeElement(element):
            if isinstance(element, ElementTree.ElementTree):
                element = element.getroot()

            if element.tag == "<!DOCTYPE>":
                if element.get("publicId") or element.get("systemId"):
                    publicId = element.get("publicId") or ""
                    systemId = element.get("systemId") or ""
                    rv.append("""<!DOCTYPE %s PUBLIC "%s" "%s">""" %
                              (element.text, publicId, systemId))
                else:
                    rv.append("<!DOCTYPE %s>" % (element.text,))
            elif element.tag == "DOCUMENT_ROOT":
                if element.text is not None:
                    rv.append(element.text)
                if element.tail is not None:
                    raise TypeError("Document node cannot have tail")
                if hasattr(element, "attrib") and len(element.attrib):
                    raise TypeError("Document node cannot have attributes")

                for child in element:
                    serializeElement(child)

            elif element.tag == ElementTreeCommentType:
                rv.append("<!--%s-->" % (element.text,))
            else:
                # This is assumed to be an ordinary element
                if not element.attrib:
                    rv.append("<%s>" % (filter.fromXmlName(element.tag),))
                else:
                    attr = " ".join(["%s=\"%s\"" % (
                        filter.fromXmlName(name), value)
                        for name, value in element.attrib.items()])
                    rv.append("<%s %s>" % (element.tag, attr))
                if element.text:
                    rv.append(element.text)

                for child in element:
                    serializeElement(child)

                rv.append("</%s>" % (element.tag,))

            if element.tail:
                rv.append(element.tail)

        serializeElement(element)

        return "".join(rv)

    class TreeBuilder(_base.TreeBuilder):
        documentClass = Document
        doctypeClass = DocumentType
        elementClass = Element
        commentClass = Comment
        fragmentClass = DocumentFragment
        implementation = ElementTreeImplementation

        def testSerializer(self, element):
            return testSerializer(element)

        def getDocument(self):
            if fullTree:
                return self.document._element
            else:
                if self.defaultNamespace is not None:
                    return self.document._element.find(
                        "{%s}html" % self.defaultNamespace)
                else:
                    return self.document._element.find("html")

        def getFragment(self):
            return _base.TreeBuilder.getFragment(self)._element

    return locals()


getETreeModule = moduleFactoryFactory(getETreeBuilder)
python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py000064400000040054151735047520017374 0ustar00from __future__ import absolute_import, division, unicode_literals

import re
from xml.sax.saxutils import escape, unescape

from .tokenizer import HTMLTokenizer
from .constants import tokenTypes


class HTMLSanitizerMixin(object):
    """ sanitization of XHTML+MathML+SVG and of inline style attributes."""

    acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area',
                           'article', 'aside', 'audio', 'b', 'big', 'blockquote', 'br', 'button',
                           'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup',
                           'command', 'datagrid', 'datalist', 'dd', 'del', 'details', 'dfn',
                           'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'event-source', 'fieldset',
                           'figcaption', 'figure', 'footer', 'font', 'form', 'header', 'h1',
                           'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'input', 'ins',
                           'keygen', 'kbd', 'label', 'legend', 'li', 'm', 'map', 'menu', 'meter',
                           'multicol', 'nav', 'nextid', 'ol', 'output', 'optgroup', 'option',
                           'p', 'pre', 'progress', 'q', 's', 'samp', 'section', 'select',
                           'small', 'sound', 'source', 'spacer', 'span', 'strike', 'strong',
                           'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'time', 'tfoot',
                           'th', 'thead', 'tr', 'tt', 'u', 'ul', 'var', 'video']

    mathml_elements = ['maction', 'math', 'merror', 'mfrac', 'mi',
                       'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom',
                       'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', 'msub',
                       'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder',
                       'munderover', 'none']

    svg_elements = ['a', 'animate', 'animateColor', 'animateMotion',
                    'animateTransform', 'clipPath', 'circle', 'defs', 'desc', 'ellipse',
                    'font-face', 'font-face-name', 'font-face-src', 'g', 'glyph', 'hkern',
                    'linearGradient', 'line', 'marker', 'metadata', 'missing-glyph',
                    'mpath', 'path', 'polygon', 'polyline', 'radialGradient', 'rect',
                    'set', 'stop', 'svg', 'switch', 'text', 'title', 'tspan', 'use']

    acceptable_attributes = ['abbr', 'accept', 'accept-charset', 'accesskey',
                             'action', 'align', 'alt', 'autocomplete', 'autofocus', 'axis',
                             'background', 'balance', 'bgcolor', 'bgproperties', 'border',
                             'bordercolor', 'bordercolordark', 'bordercolorlight', 'bottompadding',
                             'cellpadding', 'cellspacing', 'ch', 'challenge', 'char', 'charoff',
                             'choff', 'charset', 'checked', 'cite', 'class', 'clear', 'color',
                             'cols', 'colspan', 'compact', 'contenteditable', 'controls', 'coords',
                             'data', 'datafld', 'datapagesize', 'datasrc', 'datetime', 'default',
                             'delay', 'dir', 'disabled', 'draggable', 'dynsrc', 'enctype', 'end',
                             'face', 'for', 'form', 'frame', 'galleryimg', 'gutter', 'headers',
                             'height', 'hidefocus', 'hidden', 'high', 'href', 'hreflang', 'hspace',
                             'icon', 'id', 'inputmode', 'ismap', 'keytype', 'label', 'leftspacing',
                             'lang', 'list', 'longdesc', 'loop', 'loopcount', 'loopend',
                             'loopstart', 'low', 'lowsrc', 'max', 'maxlength', 'media', 'method',
                             'min', 'multiple', 'name', 'nohref', 'noshade', 'nowrap', 'open',
                             'optimum', 'pattern', 'ping', 'point-size', 'poster', 'pqg', 'preload',
                             'prompt', 'radiogroup', 'readonly', 'rel', 'repeat-max', 'repeat-min',
                             'replace', 'required', 'rev', 'rightspacing', 'rows', 'rowspan',
                             'rules', 'scope', 'selected', 'shape', 'size', 'span', 'src', 'start',
                             'step', 'style', 'summary', 'suppress', 'tabindex', 'target',
                             'template', 'title', 'toppadding', 'type', 'unselectable', 'usemap',
                             'urn', 'valign', 'value', 'variable', 'volume', 'vspace', 'vrml',
                             'width', 'wrap', 'xml:lang']

    mathml_attributes = ['actiontype', 'align', 'columnalign', 'columnalign',
                         'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'depth',
                         'display', 'displaystyle', 'equalcolumns', 'equalrows', 'fence',
                         'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', 'lspace',
                         'mathbackground', 'mathcolor', 'mathvariant', 'mathvariant', 'maxsize',
                         'minsize', 'other', 'rowalign', 'rowalign', 'rowalign', 'rowlines',
                         'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection',
                         'separator', 'stretchy', 'width', 'width', 'xlink:href', 'xlink:show',
                         'xlink:type', 'xmlns', 'xmlns:xlink']

    svg_attributes = ['accent-height', 'accumulate', 'additive', 'alphabetic',
                      'arabic-form', 'ascent', 'attributeName', 'attributeType',
                      'baseProfile', 'bbox', 'begin', 'by', 'calcMode', 'cap-height',
                      'class', 'clip-path', 'color', 'color-rendering', 'content', 'cx',
                      'cy', 'd', 'dx', 'dy', 'descent', 'display', 'dur', 'end', 'fill',
                      'fill-opacity', 'fill-rule', 'font-family', 'font-size',
                      'font-stretch', 'font-style', 'font-variant', 'font-weight', 'from',
                      'fx', 'fy', 'g1', 'g2', 'glyph-name', 'gradientUnits', 'hanging',
                      'height', 'horiz-adv-x', 'horiz-origin-x', 'id', 'ideographic', 'k',
                      'keyPoints', 'keySplines', 'keyTimes', 'lang', 'marker-end',
                      'marker-mid', 'marker-start', 'markerHeight', 'markerUnits',
                      'markerWidth', 'mathematical', 'max', 'min', 'name', 'offset',
                      'opacity', 'orient', 'origin', 'overline-position',
                      'overline-thickness', 'panose-1', 'path', 'pathLength', 'points',
                      'preserveAspectRatio', 'r', 'refX', 'refY', 'repeatCount',
                      'repeatDur', 'requiredExtensions', 'requiredFeatures', 'restart',
                      'rotate', 'rx', 'ry', 'slope', 'stemh', 'stemv', 'stop-color',
                      'stop-opacity', 'strikethrough-position', 'strikethrough-thickness',
                      'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap',
                      'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity',
                      'stroke-width', 'systemLanguage', 'target', 'text-anchor', 'to',
                      'transform', 'type', 'u1', 'u2', 'underline-position',
                      'underline-thickness', 'unicode', 'unicode-range', 'units-per-em',
                      'values', 'version', 'viewBox', 'visibility', 'width', 'widths', 'x',
                      'x-height', 'x1', 'x2', 'xlink:actuate', 'xlink:arcrole',
                      'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type',
                      'xml:base', 'xml:lang', 'xml:space', 'xmlns', 'xmlns:xlink', 'y',
                      'y1', 'y2', 'zoomAndPan']

    attr_val_is_uri = ['href', 'src', 'cite', 'action', 'longdesc', 'poster',
                       'xlink:href', 'xml:base']

    svg_attr_val_allows_ref = ['clip-path', 'color-profile', 'cursor', 'fill',
                               'filter', 'marker', 'marker-start', 'marker-mid', 'marker-end',
                               'mask', 'stroke']

    svg_allow_local_href = ['altGlyph', 'animate', 'animateColor',
                            'animateMotion', 'animateTransform', 'cursor', 'feImage', 'filter',
                            'linearGradient', 'pattern', 'radialGradient', 'textpath', 'tref',
                            'set', 'use']

    acceptable_css_properties = ['azimuth', 'background-color',
                                 'border-bottom-color', 'border-collapse', 'border-color',
                                 'border-left-color', 'border-right-color', 'border-top-color', 'clear',
                                 'color', 'cursor', 'direction', 'display', 'elevation', 'float', 'font',
                                 'font-family', 'font-size', 'font-style', 'font-variant', 'font-weight',
                                 'height', 'letter-spacing', 'line-height', 'overflow', 'pause',
                                 'pause-after', 'pause-before', 'pitch', 'pitch-range', 'richness',
                                 'speak', 'speak-header', 'speak-numeral', 'speak-punctuation',
                                 'speech-rate', 'stress', 'text-align', 'text-decoration', 'text-indent',
                                 'unicode-bidi', 'vertical-align', 'voice-family', 'volume',
                                 'white-space', 'width']

    acceptable_css_keywords = ['auto', 'aqua', 'black', 'block', 'blue',
                               'bold', 'both', 'bottom', 'brown', 'center', 'collapse', 'dashed',
                               'dotted', 'fuchsia', 'gray', 'green', '!important', 'italic', 'left',
                               'lime', 'maroon', 'medium', 'none', 'navy', 'normal', 'nowrap', 'olive',
                               'pointer', 'purple', 'red', 'right', 'solid', 'silver', 'teal', 'top',
                               'transparent', 'underline', 'white', 'yellow']

    acceptable_svg_properties = ['fill', 'fill-opacity', 'fill-rule',
                                 'stroke', 'stroke-width', 'stroke-linecap', 'stroke-linejoin',
                                 'stroke-opacity']

    acceptable_protocols = ['ed2k', 'ftp', 'http', 'https', 'irc',
                            'mailto', 'news', 'gopher', 'nntp', 'telnet', 'webcal',
                            'xmpp', 'callto', 'feed', 'urn', 'aim', 'rsync', 'tag',
                            'ssh', 'sftp', 'rtsp', 'afs']

    # subclasses may define their own versions of these constants
    allowed_elements = acceptable_elements + mathml_elements + svg_elements
    allowed_attributes = acceptable_attributes + mathml_attributes + svg_attributes
    allowed_css_properties = acceptable_css_properties
    allowed_css_keywords = acceptable_css_keywords
    allowed_svg_properties = acceptable_svg_properties
    allowed_protocols = acceptable_protocols

    # Sanitize the +html+, escaping all elements not in ALLOWED_ELEMENTS, and
    # stripping out all # attributes not in ALLOWED_ATTRIBUTES. Style
    # attributes are parsed, and a restricted set, # specified by
    # ALLOWED_CSS_PROPERTIES and ALLOWED_CSS_KEYWORDS, are allowed through.
    # attributes in ATTR_VAL_IS_URI are scanned, and only URI schemes specified
    # in ALLOWED_PROTOCOLS are allowed.
    #
    #   sanitize_html('<script> do_nasty_stuff() </script>')
    #    => &lt;script> do_nasty_stuff() &lt;/script>
    #   sanitize_html('<a href="javascript: sucker();">Click here for $100</a>')
    #    => <a>Click here for $100</a>
    def sanitize_token(self, token):

        # accommodate filters which use token_type differently
        token_type = token["type"]
        if token_type in list(tokenTypes.keys()):
            token_type = tokenTypes[token_type]

        if token_type in (tokenTypes["StartTag"], tokenTypes["EndTag"],
                          tokenTypes["EmptyTag"]):
            if token["name"] in self.allowed_elements:
                return self.allowed_token(token, token_type)
            else:
                return self.disallowed_token(token, token_type)
        elif token_type == tokenTypes["Comment"]:
            pass
        else:
            return token

    def allowed_token(self, token, token_type):
        if "data" in token:
            attrs = dict([(name, val) for name, val in
                          token["data"][::-1]
                          if name in self.allowed_attributes])
            for attr in self.attr_val_is_uri:
                if attr not in attrs:
                    continue
                val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '',
                                       unescape(attrs[attr])).lower()
                # remove replacement characters from unescaped characters
                val_unescaped = val_unescaped.replace("\ufffd", "")
                if (re.match("^[a-z0-9][-+.a-z0-9]*:", val_unescaped) and
                    (val_unescaped.split(':')[0] not in
                     self.allowed_protocols)):
                    del attrs[attr]
            for attr in self.svg_attr_val_allows_ref:
                if attr in attrs:
                    attrs[attr] = re.sub(r'url\s*\(\s*[^#\s][^)]+?\)',
                                         ' ',
                                         unescape(attrs[attr]))
            if (token["name"] in self.svg_allow_local_href and
                'xlink:href' in attrs and re.search('^\s*[^#\s].*',
                                                    attrs['xlink:href'])):
                del attrs['xlink:href']
            if 'style' in attrs:
                attrs['style'] = self.sanitize_css(attrs['style'])
            token["data"] = [[name, val] for name, val in list(attrs.items())]
        return token

    def disallowed_token(self, token, token_type):
        if token_type == tokenTypes["EndTag"]:
            token["data"] = "</%s>" % token["name"]
        elif token["data"]:
            attrs = ''.join([' %s="%s"' % (k, escape(v)) for k, v in token["data"]])
            token["data"] = "<%s%s>" % (token["name"], attrs)
        else:
            token["data"] = "<%s>" % token["name"]
        if token.get("selfClosing"):
            token["data"] = token["data"][:-1] + "/>"

        if token["type"] in list(tokenTypes.keys()):
            token["type"] = "Characters"
        else:
            token["type"] = tokenTypes["Characters"]

        del token["name"]
        return token

    def sanitize_css(self, style):
        # disallow urls
        style = re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style)

        # gauntlet
        if not re.match("""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style):
            return ''
        if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style):
            return ''

        clean = []
        for prop, value in re.findall("([-\w]+)\s*:\s*([^:;]*)", style):
            if not value:
                continue
            if prop.lower() in self.allowed_css_properties:
                clean.append(prop + ': ' + value + ';')
            elif prop.split('-')[0].lower() in ['background', 'border', 'margin',
                                                'padding']:
                for keyword in value.split():
                    if not keyword in self.acceptable_css_keywords and \
                            not re.match("^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$", keyword):
                        break
                else:
                    clean.append(prop + ': ' + value + ';')
            elif prop.lower() in self.allowed_svg_properties:
                clean.append(prop + ': ' + value + ';')

        return ' '.join(clean)


class HTMLSanitizer(HTMLTokenizer, HTMLSanitizerMixin):
    def __init__(self, stream, encoding=None, parseMeta=True, useChardet=True,
                 lowercaseElementName=False, lowercaseAttrName=False, parser=None):
        # Change case matching defaults as we only output lowercase html anyway
        # This solution doesn't seem ideal...
        HTMLTokenizer.__init__(self, stream, encoding, parseMeta, useChardet,
                               lowercaseElementName, lowercaseAttrName, parser=parser)

    def __iter__(self):
        for token in HTMLTokenizer.__iter__(self):
            token = self.sanitize_token(token)
            if token:
                yield token
python3.4/site-packages/pip/_vendor/html5lib/__pycache__/sanitizer.cpython-34.pyc000064400000027711151735047520023663 0ustar00�
�Re,@�@s�ddlmZmZmZddlZddlmZmZddlm	Z	ddl
mZGdd�de�Z
Gd	d
�d
e	e
�ZdS)�)�absolute_import�division�unicode_literalsN)�escape�unescape�)�
HTMLTokenizer)�
tokenTypesc�@s?eZdZdZdddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcddgcZdedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dgZdd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�g#Zdd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d)d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d8d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddRdddddddddd�ddddddd d!d"d#d$d%d&d'g�Zd(d�d)d)d)d*d+d,d-d.d/d0d1d2d3d4d�d�d5d6d7d8d9d9d:d;d<d=d=d=d>d?dd@dAdBdCdDd%d%dEdFdGdHdIg-ZdJdKdLdMdNdOdPdQdRdSdTdUdVdWd�dXd�dYdZd[d\d]d^d_d`d.dad�dbdcdddedfdgdhdidjdkdldmdndodpdqdrd�dsdtd�dudvdwdxdyd�dzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�dd�d�d�d�d�d�d�d�d�d�d�d%d�d�d�d�d�d�d�dEd�dFd�dGd�d'd�dHdId�d�d�d�g�Z	d�ddd�d�d�dEd�gZ
dXd�d�dbd�d�d|d{dzd�d�gZd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZd�d�d�d�d�d�d�d�d�d�d�d�d.d�d�d(dedfdhdidjd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d"d�d%g.Z
d�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d�d�d�d�ddddd�ddddddd	d
ddd
ddg'Zdbdcddd�d�d�d�d�gZdddddddddddddddddd d!d"d#d$gZeeeZeee	Ze
ZeZeZeZd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-S(.�HTMLSanitizerMixinzA sanitization of XHTML+MathML+SVG and of inline style attributes.�aZabbrZacronym�address�area�article�aside�audio�b�big�
blockquote�br�buttonZcanvas�caption�centerZcite�code�col�colgroup�command�datagridZdatalist�dd�del�details�dfn�dialog�dir�div�dl�dt�emzevent-source�fieldset�
figcaption�figure�footer�font�form�header�h1�h2�h3�h4�h5�h6�hr�i�img�inputZins�keygenZkbd�labelZlegend�li�m�map�menuZmeterZmulticol�navZnextid�ol�output�optgroup�option�p�pre�progress�q�sZsamp�section�select�smallZsound�sourceZspacer�span�strike�strong�sub�sup�table�tbody�td�textarea�time�tfoot�th�thead�tr�tt�u�ul�var�videoZmaction�mathZmerrorZmfrac�miZ
mmultiscripts�mn�moZmoverZmpaddedZmphantomZmprescriptsZmrootZmrowZmspaceZmsqrtZmstyleZmsubZmsubsupZmsupZmtableZmtd�mtextZmtrZmunderZ
munderover�noneZanimate�animateColor�
animateMotion�animateTransform�clipPathZcircleZdefs�descZellipsez	font-facezfont-face-namez
font-face-src�gZglyphZhkern�linearGradient�line�marker�metadataz
missing-glyphZmpath�pathZpolygonZpolyline�radialGradientZrect�set�stop�svg�switch�text�titleZtspanZuse�acceptzaccept-charsetZ	accesskey�actionZalignZalt�autocompleteZ	autofocusZaxis�
backgroundZbalanceZbgcolorZbgproperties�borderZbordercolorZbordercolordarkZbordercolorlightZ
bottompaddingZcellpaddingZcellspacing�ch�	challenge�charZcharoffZchoff�charset�checked�class�clear�color�colsZcolspan�compactZcontenteditableZcontrolsZcoords�dataZdatafldZdatapagesizeZdatasrc�datetime�default�delay�disabledZ	draggableZdynsrcZenctype�end�face�for�frameZ
galleryimgZgutter�headers�heightZ	hidefocus�hidden�high�hrefZhreflangZhspaceZicon�idZ	inputmodeZismapZkeytypeZleftspacing�lang�listZlongdescZloopZ	loopcountZloopendZ	loopstart�lowZlowsrc�maxZ	maxlengthZmedia�method�minZmultiple�nameZnohrefZnoshadeZnowrap�openZoptimum�patternZpingz
point-sizeZposterZpqgZpreload�promptZ
radiogroup�readonly�relz
repeat-maxz
repeat-min�replace�required�revZrightspacing�rowsZrowspan�rulesZscope�selected�shape�size�src�start�step�style�summary�suppressZtabindex�target�templateZ
toppadding�typeZunselectableZusemap�urnZvalign�value�variable�volumeZvspaceZvrml�width�wrapzxml:langZ
actiontypeZcolumnalignZcolumnlinesZ
columnspacingZ
columnspan�depthZdisplayZdisplaystyleZequalcolumnsZ	equalrowsZfenceZ	fontstyleZ
fontweightZ
linethicknessZlspaceZmathbackgroundZ	mathcolorZmathvariant�maxsizeZminsize�otherZrowalignZrowlinesZ
rowspacingZrspaceZscriptlevelZ	selection�	separatorZstretchyz
xlink:hrefz
xlink:showz
xlink:type�xmlnszxmlns:xlinkz
accent-height�
accumulateZadditiveZ
alphabeticzarabic-formZascent�
attributeName�
attributeType�baseProfileZbbox�beginZby�calcModez
cap-heightz	clip-pathzcolor-rendering�contentZcx�cy�dZdxZdyZdescentZdur�fillzfill-opacityz	fill-rulezfont-familyz	font-sizezfont-stretchz
font-stylezfont-variantzfont-weight�fromZfxZfyZg1Zg2z
glyph-name�
gradientUnitsZhangingzhoriz-adv-xzhoriz-origin-xZideographic�k�	keyPoints�
keySplines�keyTimesz
marker-endz
marker-midzmarker-start�markerHeight�markerUnits�markerWidthZmathematical�offsetZopacityZorient�originzoverline-positionzoverline-thicknesszpanose-1�
pathLengthZpoints�preserveAspectRatio�r�refX�refY�repeatCount�	repeatDur�requiredExtensions�requiredFeaturesZrestart�rotate�rxZryZslopeZstemhZstemvz
stop-colorzstop-opacityzstrikethrough-positionzstrikethrough-thicknessZstrokezstroke-dasharrayzstroke-dashoffsetzstroke-linecapzstroke-linejoinzstroke-miterlimitzstroke-opacityzstroke-width�systemLanguageztext-anchorZtoZ	transform�u1�u2zunderline-positionzunderline-thickness�unicodez
unicode-rangezunits-per-em�values�version�viewBoxZ
visibilityZwidths�xzx-heightZx1Zx2z
xlink:actuatez
xlink:arcrolez
xlink:rolezxlink:titlezxml:basez	xml:space�y�y1�y2�
zoomAndPanz
color-profile�cursor�filter�mask�altGlyph�feImage�textpathZtrefZazimuthzbackground-colorzborder-bottom-colorzborder-collapsezborder-colorzborder-left-colorzborder-right-colorzborder-top-colorZ	directionZ	elevation�floatzletter-spacingzline-heightZoverflow�pausezpause-afterzpause-beforeZpitchzpitch-rangeZrichnessZspeakzspeak-headerz
speak-numeralzspeak-punctuationzspeech-rateZstressz
text-alignztext-decorationztext-indentzunicode-bidizvertical-alignzvoice-familyzwhite-spaceZautoZaquaZblack�blockZblueZboldZbothZbottomZbrownZcollapseZdashedZdottedZfuchsiaZgrayZgreenz
!importantZitalic�leftZlimeZmaroonZmediumZnavyZnormalZolive�pointerZpurpleZred�rightZsolidZsilverZteal�topZtransparentZ	underlineZwhiteZyellowZed2k�ftp�http�httpsZirc�mailto�news�gopher�nntp�telnetZwebcalZxmppZcallto�feedZaim�rsync�tag�ssh�sftp�rtspZafscCs�|d}|ttj��kr/t|}n|tdtdtdfkr�|d|jkrs|j||�S|j||�Sn|tdkr�n|SdS)Nr��StartTag�EndTag�EmptyTagr��Comment)r�r	�keys�allowed_elements�
allowed_token�disallowed_token)�self�token�
token_type�r�9/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/sanitizer.py�sanitize_token�s

z!HTMLSanitizerMixin.sanitize_tokencs�d|kr�t�fdd�|dddd�D��}x��jD]�}||kr^qFntjddt||��j�}|jdd�}tjd|�rF|jd	�d
�j	krF||=qFqFWxC�j
D]8}||kr�tjddt||��||<q�q�W|d
�jkrVd|krVtjd|d�rV|d=nd|kr|�j
|d�|d<ndd�t|j��D�|d<n|S)Nr�cs1g|]'\}}|�jkr||f�qSr)�allowed_attributes)�.0r��val)rrr�
<listcomp>�s		z4HTMLSanitizerMixin.allowed_token.<locals>.<listcomp>ru
[`- - \s]+�u�z^[a-z0-9][-+.a-z0-9]*:�:rzurl\s*\(\s*[^#\s][^)]+?\)� r�z
xlink:hrefz^\s*[^#\s].*r�cSs"g|]\}}||g�qSrr)rr�rrrrr�s	���)�dict�attr_val_is_uri�rerOr�lowerr��match�split�allowed_protocols�svg_attr_val_allows_ref�svg_allow_local_href�search�sanitize_cssr��items)rr
r�attrs�attrZ
val_unescapedr)rrr
�s4	

&z HTMLSanitizerMixin.allowed_tokencCs�|tdkr%d|d|d<nW|drjdjdd�|dD��}d|d|f|d<nd	|d|d<|jd
�r�|ddd�d|d<n|d
ttj��kr�d|d
<ntd|d
<|d=|S)Nrz</%s>r�r�rcSs,g|]"\}}d|t|�f�qS)z %s="%s")r)rr��vrrrr�s	z7HTMLSanitizerMixin.disallowed_token.<locals>.<listcomp>z<%s%s>z<%s>�selfClosingrz/>r��
Charactersr)r	�join�getr�r)rr
rr&rrrr�s
 
z#HTMLSanitizerMixin.disallowed_tokencCsctjd�jd|�}tjd|�s1dStjd|�sGdSg}xtjd|�D]�\}}|sxq`n|j�|jkr�|j|d|d�q`|jd	�d
j�dkr!x�|j�D],}||j	kr�tjd|�r�Pq�q�W|j|d|d�q`|j�|j
kr`|j|d|d�q`q`Wdj|�S)Nzurl\s*\(\s*[^\s)]+?\s*\)\s*rz@^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$rz ^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$z([-\w]+)\s*:\s*([^:;]*)z: �;�-rrzr{�margin�paddingz\^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$)rzr{zmarginzpadding)r�compilerOr�findallr�allowed_css_properties�appendr�acceptable_css_keywords�allowed_svg_propertiesr+)rr��clean�propr��keywordrrrr$�s*	 zHTMLSanitizerMixin.sanitize_cssN)�__name__�
__module__�__qualname__�__doc__Zacceptable_elementsZmathml_elementsZsvg_elementsZacceptable_attributesZmathml_attributesZsvg_attributesrr!r"Zacceptable_css_propertiesr5Zacceptable_svg_propertiesZacceptable_protocolsr	rr3Zallowed_css_keywordsr6r rr
rr$rrrrr

s						
r
c@s:eZdZdddddddd�Zdd�ZdS)�
HTMLSanitizerNTFc
Cs)tj|||||||d|�dS)N�parser)r�__init__)r�stream�encoding�	parseMeta�
useChardet�lowercaseElementName�lowercaseAttrNamer?rrrr@szHTMLSanitizer.__init__ccs;x4tj|�D]#}|j|�}|r|VqqWdS)N)r�__iter__r)rr
rrrrGszHTMLSanitizer.__iter__)r:r;r<r@rGrrrrr>s	r>)�
__future__rrrr�xml.sax.saxutilsrr�	tokenizerr�	constantsr	�objectr
r>rrrr�<module>s�python3.4/site-packages/pip/_vendor/html5lib/__pycache__/ihatexml.cpython-34.pyc000064400000034044151735047530023464 0ustar00�
�Re�@�@slddlmZmZmZddlZddlZddlmZdZdZ	dZ
dZd	Zd
j
ee	g�Zd
j
eeddd
e
eg�Zd
j
ed
g�Zejd�Zejd�Zdd�Zdd�Zedd�Zdd�Zdd�Zdd�Zdd�Zejd�Zejd�Zejd �ZGd!d"�d"e�Z dS)#�)�absolute_import�division�unicode_literalsN�)�DataLossWarninga^
[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] |
[#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] |
[#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] |
[#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 |
[#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] |
[#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] |
[#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] |
[#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] |
[#x04EE-#x04F5] | [#x04F8-#x04F9] | [#x0531-#x0556] | #x0559 |
[#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] |
[#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] |
[#x06D0-#x06D3] | #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D |
[#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] |
[#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] |
[#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] |
[#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] |
[#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | [#x0A72-#x0A74] |
[#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] |
[#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 |
[#x0B05-#x0B0C] | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] |
[#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] |
[#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] |
[#x0B99-#x0B9A] | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] |
[#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] |
[#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] |
[#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] |
[#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] |
[#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | [#x0D2A-#x0D39] |
[#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] |
[#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A |
#x0E8D | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 |
#x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] |
#x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] |
[#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] |
[#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C |
#x113E | #x1140 | #x114C | #x114E | #x1150 | [#x1154-#x1155] | #x1159 |
[#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] |
[#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] |
[#x11B7-#x11B8] | #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 |
[#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] |
[#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | #x1F5B |
#x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE |
[#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] |
[#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 |
[#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] |
[#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3]z*[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]a�
[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] |
[#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 |
[#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] |
[#x06E0-#x06E4] | [#x06E7-#x06E8] | [#x06EA-#x06ED] | [#x0901-#x0903] |
#x093C | [#x093E-#x094C] | #x094D | [#x0951-#x0954] | [#x0962-#x0963] |
[#x0981-#x0983] | #x09BC | #x09BE | #x09BF | [#x09C0-#x09C4] |
[#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 | [#x09E2-#x09E3] | #x0A02 |
#x0A3C | #x0A3E | #x0A3F | [#x0A40-#x0A42] | [#x0A47-#x0A48] |
[#x0A4B-#x0A4D] | [#x0A70-#x0A71] | [#x0A81-#x0A83] | #x0ABC |
[#x0ABE-#x0AC5] | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] |
#x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] | [#x0B4B-#x0B4D] |
[#x0B56-#x0B57] | [#x0B82-#x0B83] | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] |
[#x0BCA-#x0BCD] | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] |
[#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] | [#x0C82-#x0C83] |
[#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] |
[#x0D02-#x0D03] | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] |
#x0D57 | #x0E31 | [#x0E34-#x0E3A] | [#x0E47-#x0E4E] | #x0EB1 |
[#x0EB4-#x0EB9] | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] |
#x0F35 | #x0F37 | #x0F39 | #x0F3E | #x0F3F | [#x0F71-#x0F84] |
[#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] |
[#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] |
#x3099 | #x309Aa
[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] |
[#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] |
[#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] |
[#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]z}
#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 |
#[#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]z | �.�-�_z#x([\d|A-F]{4,4})z'\[#x([\d|A-F]{4,4})-#x([\d|A-F]{4,4})\]cCsdd�|jd�D�}g}x�|D]�}d}x�ttfD]v}|j|�}|dk	rB|jdd�|j�D��t|d	�dkr�|d
d|d<nd}PqBqBW|s)t|�dks�t�|jt|�gd�q)q)Wt	|�}|S)NcSsg|]}|j��qS�)�strip)�.0�itemr
r
�8/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/ihatexml.py�
<listcomp>hs	z$charStringToList.<locals>.<listcomp>z | FcSsg|]}t|��qSr
)�hexToInt)rr
r
r
rros	r�T���rr)
�split�reChar�reCharRange�match�append�groups�len�AssertionError�ord�normaliseCharList)�charsZ
charRanges�rvr
Z
foundMatch�regexprr
r
r�charStringToListgs"
 !r cCs�t|�}x(|D] }|d|dkst�qWg}d}x�|t|�kr�d}|j||�xb||t|�kr�|||d|dddkr�|||d|dd<|d7}qrW||7}qFW|S)Nrrrr)�sortedrrr)�charListr
r�i�jr
r
rr|s
=rZFFFF�cCs�g}|ddkr8|jd|dddg�nxOt|dd��D]7\}}|j|dd||dddg�qOW|ddtkr�|j|dddtg�n|S)Nrrrrr)r�	enumerate�max_unicode)r"rr#r
r
r
r�
missingRanges�s"#/"r(cCs�g}xw|D]o}|d|dkrG|jtt|d���q
|jtt|d��dtt|d���q
Wddj|�S)Nrrrz[%s]�)r�escapeRegexp�chr�join)r"rr
r
r
r�listToRegexpStr�s
 r-cCs
t|d�S)Nr%)�int)Zhex_strr
r
rr�srcCs1d}x$|D]}|j|d|�}q
W|S)Nr�^�$�*�+�?�{�}�[�]�|�(�)r�\)rr/r0r1r2r3r4r5r6r7r8r9r:r)�replace)�stringZspecialCharacters�charr
r
rr*�s

r*u�[-,/:-@\[-\^`\{-¶¸-¿×÷IJ-ijĿ-ŀʼnſDŽ-njDZ-dzǶ-ǹȘ-ɏʩ-ʺ˂-ˏ˒-˿͆-͟͢-΅΋΍΢Ϗϗ-ϙϛϝϟϡϴ-ЀЍѐѝ҂҇-ҏӅ-ӆӉ-ӊӍ-ӏӬ-ӭӶ-ӷӺ-԰՗-՘՚-ՠև-֐ֺ֢־׀׃ׅ-׏׫-ׯ׳-ؠػ-ؿٓ-ٟ٪-ٯڸ-ڹڿۏ۔۩ۮ-ۯۺ-ऀऄऺ-ऻॎ-ॐॕ-ॗ।-॥॰-ঀ঄঍-঎঑-঒঩঱঳-঵঺-঻ঽ৅-৆৉-৊ৎ-৖৘-৛৞৤-৥৲-ਁਃ-਄਋-਎਑-਒਩਱਴਷਺-਻਽੃-੆੉-੊੎-੘੝੟-੥ੵ-઀઄ઌ઎઒઩઱઴઺-઻૆૊૎-૟ૡ-૥૰-଀଄଍-଎଑-଒଩଱଴-ଵ଺-଻ୄ-୆୉-୊୎-୕୘-୛୞ୢ-୥୰-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭ஶ஺-஽௃-௅௉௎-௖௘-௦௰-ఀఄ఍఑఩ఴ఺-ఽ౅౉౎-౔౗-౟ౢ-౥౰-ಁ಄಍಑಩಴಺-ಽ೅೉೎-೔೗-ೝ೟ೢ-೥೰-ഁഄ഍഑ഩഺ-ഽൄ-൅൉ൎ-ൖ൘-ൟൢ-൥൰-฀ฯ฻-฿๏๚-຀຃຅-ຆຉ຋-ຌຎ-ຓຘຠ຤຦ຨ-ຩຬຯ຺຾-຿໅໇໎-໏໚-༗༚-༟༪-༴༶༸༺-༽཈ཪ-཰྅ྌ-ྏྖ྘ྮ-ྰྸྺ-႟჆-჏ჷ-ჿᄁᄄᄈᄊᄍᄓ-ᄻᄽᄿᅁ-ᅋᅍᅏᅑ-ᅓᅖ-ᅘᅚ-ᅞᅢᅤᅦᅨᅪ-ᅬᅯ-ᅱᅴᅶ-ᆝᆟ-ᆧᆩ-ᆪᆬ-ᆭᆰ-ᆶᆹᆻᇃ-ᇪᇬ-ᇯᇱ-ᇸᇺ-᷿ẜ-ẟỺ-ỿ἖-἗἞-἟὆-὇὎-὏὘὚὜὞὾-὿᾵᾽᾿-῁῅῍-῏῔-῕῜-῟῭-῱῵´-⃏⃝-⃠⃢-℥℧-℩ℬ-ℭℯ-ⅿↃ-〄〆〈-〠〰〶-぀ゕ-゘゛-゜ゟ-゠・ヿ-㄄ㄭ-䷿龦-꯿힤-￿]u�[-@\[-\^`\{-¿×÷IJ-ijĿ-ŀʼnſDŽ-njDZ-dzǶ-ǹȘ-ɏʩ-ʺ˂-΅·΋΍΢Ϗϗ-ϙϛϝϟϡϴ-ЀЍѐѝ҂-ҏӅ-ӆӉ-ӊӍ-ӏӬ-ӭӶ-ӷӺ-԰՗-՘՚-ՠև-׏׫-ׯ׳-ؠػ-ـً-ٰڸ-ڹڿۏ۔ۖ-ۤۧ-ऄऺ-़ा-ॗॢ-঄঍-঎঑-঒঩঱঳-঵঺-৛৞ৢ-৯৲-਄਋-਎਑-਒਩਱਴਷਺-੘੝੟-ੱੵ-઄ઌ઎઒઩઱઴઺-઼ા-૟ૡ-଄଍-଎଑-଒଩଱଴-ଵ଺-଼ା-୛୞ୢ-஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭ஶ஺-ఄ఍఑఩ఴ఺-౟ౢ-಄಍಑಩಴಺-ೝ೟ೢ-ഄ഍഑ഩഺ-ൟൢ-฀ฯัิ-฿ๆ-຀຃຅-ຆຉ຋-ຌຎ-ຓຘຠ຤຦ຨ-ຩຬຯັິ-ຼ຾-຿໅-༿཈ཪ-႟჆-჏ჷ-ჿᄁᄄᄈᄊᄍᄓ-ᄻᄽᄿᅁ-ᅋᅍᅏᅑ-ᅓᅖ-ᅘᅚ-ᅞᅢᅤᅦᅨᅪ-ᅬᅯ-ᅱᅴᅶ-ᆝᆟ-ᆧᆩ-ᆪᆬ-ᆭᆰ-ᆶᆹᆻᇃ-ᇪᇬ-ᇯᇱ-ᇸᇺ-᷿ẜ-ẟỺ-ỿ἖-἗἞-἟὆-὇὎-὏὘὚὜὞὾-὿᾵᾽᾿-῁῅῍-῏῔-῕῜-῟῭-῱῵´-℥℧-℩ℬ-ℭℯ-ⅿↃ-〆〈-〠〪-぀ゕ-゠・-㄄ㄭ-䷿龦-꯿힤-￿]z#[^ 
a-zA-Z0-9\-'()+,./:=?;!*#@$_%]c	@s�eZdZejd�Zddddddddd�Zddd�Zdd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�
InfosetFilterz
U[\dA-F]{5,5}NFTcCsC||_||_||_||_||_||_i|_dS)N)�dropXmlnsLocalName�dropXmlnsAttrNs�preventDoubleDashComments�preventDashAtCommentEnd�replaceFormFeedCharacters�preventSingleQuotePubid�replaceCache)�self�replaceCharsr@rArBrCrDrEr
r
r�__init__�s						zInfosetFilter.__init__cCsf|jr,|jd�r,tjdt�dS|jrU|dkrUtjdt�dS|j|�SdS)Nzxmlns:z"Attributes cannot begin with xmlnszhttp://www.w3.org/2000/xmlns/z)Attributes cannot be in the xml namespace)r@�
startswith�warnings�warnrrA�	toXmlName)rG�name�	namespacer
r
r�coerceAttribute�s	zInfosetFilter.coerceAttributecCs
|j|�S)N)rM)rGrNrOr
r
r�
coerceElement�szInfosetFilter.coerceElementcCsE|jrAx5d|kr=tjdt�|jdd�}qWn|S)Nz--z'Comments cannot contain adjacent dashesz- -)rBrKrLrr<)rG�datar
r
r�
coerceComment�s
	zInfosetFilter.coerceCommentcCsR|jrNx-t|jd��D]}tjdt�qW|jdd�}n|S)N�zText cannot contain U+000C� )rD�range�countrKrLrr<)rGrRr#r
r
r�coerceCharacters�s
	zInfosetFilter.coerceCharacterscCs�|}xHtj|�D]7}tjdt�|j|�}|j||�}qW|jr�|jd�dkr�tjdt�|jd|jd��}n|S)NzCoercing non-XML pubid�'rz!Pubid cannot contain single quote)	�nonPubidCharRegexp�findallrKrLr�getReplacementCharacterr<rE�find)rGrRZ
dataOutputr>�replacementr
r
r�coercePubid�szInfosetFilter.coercePubidc
Cs�|d}|dd�}tj|�}|rQtjdt�|j|�}n|}|}ttj|��}x?|D]7}tjdt�|j|�}	|j	||	�}qyW||S)NrrzCoercing non-XML name)
�nonXmlNameFirstBMPRegexprrKrLrr\�set�nonXmlNameBMPRegexpr[r<)
rGrN�	nameFirstZnameRest�mZnameFirstOutputZnameRestOutputrHr>r^r
r
rrM�s

zInfosetFilter.toXmlNamecCs2||jkr|j|}n|j|�}|S)N)rF�
escapeChar)rGr>r^r
r
rr\sz%InfosetFilter.getReplacementCharactercCsBx;t|jj|��D]!}|j||j|��}qW|S)N)ra�replacementRegexpr[r<�unescapeChar)rGrNr
r
r
r�fromXmlNameszInfosetFilter.fromXmlNamecCs!dt|�}||j|<|S)NzU%05X)rrF)rGr>r^r
r
rres
zInfosetFilter.escapeCharcCstt|dd�d��S)Nrr%)r+r.)rGZcharcoder
r
rrgszInfosetFilter.unescapeChar)�__name__�
__module__�__qualname__�re�compilerfrIrPrQrSrXr_rMr\rhrergr
r
r
rr?�s$r?)!�
__future__rrrrlrK�	constantsrZbaseCharZideographicZcombiningCharacterZdigitZextenderr,ZletterrNrcrmrrr rr.r'r(r-rr*rbr`rZ�objectr?r
r
r
r�<module>s20	python3.4/site-packages/pip/_vendor/html5lib/__pycache__/__init__.cpython-34.pyc000064400000001664151735047530023412 0ustar00�
�Re��@s�dZddlmZmZmZddlmZmZmZddl	m
Z
ddlmZddl
mZdd	d
ddd
gZdZdS)aM
HTML parsing library based on the WHATWG "HTML5"
specification. The parser is designed to be compatible with existing
HTML found in the wild and implements well-defined error recovery that
is largely compatible with modern desktop web browsers.

Example usage:

import html5lib
f = open("my_document.html")
tree = html5lib.parse(f)
�)�absolute_import�division�unicode_literals�)�
HTMLParser�parse�
parseFragment)�getTreeBuilder)�
getTreeWalker)�	serializerrrr	r
rz1.0b3N)�__doc__�
__future__rrr�html5parserrrr�treebuildersr	�treewalkersr
�
serializerr�__all__�__version__�rr�8/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/__init__.py�<module>spython3.4/site-packages/pip/_vendor/html5lib/__pycache__/html5parser.cpython-34.pyc000064400000314655151735047530024130 0ustar00�
�Re%��@s�ddlmZmZmZddlmZddlZddlmZddlm	Z	ddlm
Z
ddlmZdd	lm
Z
dd
lmZddlmZmZddlmZdd
lmZddlmZmZddlmZmZmZddlmZmZddlmZddddd�Zdddddd�Zdd�ZGdd�de�Z dd�Z!ddd d!d"�Z"Gd#d$�d$e#�Z$dS)%�)�absolute_import�division�unicode_literals)�with_metaclassN�)�inputstream)�	tokenizer)�treebuilders)�Marker)�utils)�	constants)�spaceCharacters�asciiUpper2Lower)�specialElements)�headingElements)�
cdataElements�rcdataElements)�
tokenTypes�ReparseException�
namespaces)�htmlIntegrationPointElements�"mathmlTextIntegrationPointElements)�adjustForeignAttributes�etreeTcCs4tj|�}t|d|�}|j|d|�S)z.Parse a string or file-like object into a tree�namespaceHTMLElements�encoding)r	�getTreeBuilder�
HTMLParser�parse)�doc�treebuilderrr�tb�p�r#�;/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/html5parser.pyrsr�divcCs:tj|�}t|d|�}|j|d|d|�S)Nr�	containerr)r	rr�
parseFragment)rr&r rrr!r"r#r#r$r'sr'cs G�fdd�dt�}|S)Ncs"eZdZ�fdd�ZdS)z-method_decorator_metaclass.<locals>.Decoratedcs^xE|j�D]7\}}t|tj�r:�|�}n|||<q
Wtj||||�S)N)�items�
isinstance�types�FunctionType�type�__new__)�meta�	classname�bases�	classDict�
attributeName�	attribute)�functionr#r$r-(s
z5method_decorator_metaclass.<locals>.Decorated.__new__N)�__name__�
__module__�__qualname__r-r#)r4r#r$�	Decorated'sr8)r,)r4r8r#)r4r$�method_decorator_metaclass&sr9c@seZdZdZdejddddd�Zddddddd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zddddd�Z
dddddd�Zdidd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�ZdS))rzZHTML parser. Generates a tree structure from a stream of (possibly
        malformed) HTMLNFTcsz|�_|dkr'tjd�}n||��_|�_g�_t�fdd�t|�j�D���_	dS)a�
        strict - raise an exception when a parse error is encountered

        tree - a treebuilder class controlling the type of tree that will be
        returned. Built in treebuilders can be accessed through
        html5lib.treebuilders.getTreeBuilder(treeType)

        tokenizer - a class that provides a stream of tokens to the treebuilder.
        This may be replaced for e.g. a sanitizer which converts some tags to
        text
        Nrcs.g|]$\}}||��j�f�qSr#)�tree)�.0�name�cls)�selfr#r$�
<listcomp>Ms	z'HTMLParser.__init__.<locals>.<listcomp>)
�strictr	rr:�tokenizer_class�errors�dict�	getPhasesr(�phases)r>r:rr@r�debugr#)r>r$�__init__6s			zHTMLParser.__init__r%cKs�||_||_|j|d|d|d|d||�|_|j�x2y|j�PWqLtk
ry|j�YqLXqLWdS)Nr�	parseMeta�
useChardet�parser)�
innerHTMLModer&rAr�reset�mainLoopr)r>�stream�	innerHTMLr&rrHrI�kwargsr#r#r$�_parsePs		


zHTMLParser._parsecCs|jj�d|_g|_g|_d|_|jr�|jj�|_	|j	t
krp|jj|j_
nH|j	tkr�|jj|j_
n$|j	dkr�|jj|j_
n|jd|_|jj�|j�nd|_	|jd|_d|_d|_d|_dS)NFz	no quirks�	plaintext�
beforeHtml�initialT)r:rL�
firstStartTagrB�log�
compatModerKr&�lowerrOrr�rcdataState�stater�rawtextState�plaintextStaterE�phase�insertHtmlElement�resetInsertionMode�	lastPhase�beforeRCDataPhase�
framesetOK)r>r#r#r$rLbs*
					

			zHTMLParser.resetcCse|jdkrK|jtdkrKd|jkoJ|jdjt�dkS|j|jftkSdS)Nzannotation-xml�mathmlr�	text/html�application/xhtml+xml)rdre)r<�	namespacer�
attributes�	translaterr)r>�elementr#r#r$�isHTMLIntegrationPoint�s
z!HTMLParser.isHTMLIntegrationPointcCs|j|jftkS)N)rfr<r)r>rir#r#r$�isMathMLTextIntegrationPoint�sz'HTMLParser.isMathMLTextIntegrationPointcCs*td}td}td}td}td}td}td}x�|j�D]y}|}	x+|	dk	r�|jjr�|jjdnd}
|
r�|
jnd}|
r�|
jnd}|	d	}
|
|kr�|j|	d
|	jdi��d}	qbt|jj�dks�||jj	ks�|j
|
�rl|
|krZ|d
tddg�ks�|
||fks�|tdkr�|dkr�|d
dks�|j
|
�r�|
|||fkr�|j}n
|jd}|
|kr�|j|	�}	qb|
|kr|j|	�}	qb|
|kr/|j|	�}	qb|
|krM|j|	�}	qb|
|krk|j|	�}	qb|
|krb|j|	�}	qbqbW|
|krS|drS|drS|jdi|d
d
6�qSqSWd}g}xG|r%|j|j�|jj�}|r�|j|ks"t�q�q�WdS)N�
Characters�SpaceCharacters�StartTag�EndTag�Comment�Doctype�
ParseErrorrr,�data�datavarsrr<�mglyph�
malignmarkrczannotation-xml�svg�inForeignContent�selfClosing�selfClosingAcknowledgedz&non-void-element-with-trailing-solidusT���)r�normalizedTokensr:�openElementsrfr<�
parseError�get�len�defaultNamespacerk�	frozensetrrjr]rE�processCharacters�processSpaceCharacters�processStartTag�
processEndTag�processComment�processDoctype�append�
processEOF�AssertionError)r>�CharactersToken�SpaceCharactersToken�
StartTagToken�EndTagToken�CommentToken�DoctypeToken�ParseErrorToken�token�	new_token�currentNode�currentNodeNamespace�currentNodeNamer,r]�	reprocessrEr#r#r$rM�sj






"
 	
		zHTMLParser.mainLoopccs&x|jD]}|j|�Vq
WdS)N)r�normalizeToken)r>r�r#r#r$r|�szHTMLParser.normalizedTokensc
Cs2|j|ddd|d|d|�|jj�S)afParse a HTML document into a well-formed tree

        stream - a filelike object or string containing the HTML to be parsed

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)
        rOFrrHrI)rQr:�getDocument)r>rNrrHrIr#r#r$r�s

zHTMLParser.parsecCs)|j|dd|d|�|jj�S)a�Parse a HTML fragment into a well-formed tree fragment

        container - name of the element we're setting the innerHTML property
        if set to None, default to 'div'

        stream - a filelike object or string containing the HTML to be parsed

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)
        Tr&r)rQr:�getFragment)r>rNr&rrHrIr#r#r$r'�szHTMLParser.parseFragmentzXXX-undefined-errorcCs;|jj|jjj�||f�|jr7t�ndS)N)rBr�rrN�positionr@rr)r>�	errorcodertr#r#r$r~�s%	zHTMLParser.parseErrorcCs<|dtdkr8t|dddd��|d<n|S)z3 HTML5 specific normalizations to the token stream r,rnrsNrr{)rrC)r>r�r#r#r$r��s$zHTMLParser.normalizeTokencCsbidd6}xN|j�D]@\}}||dkr|d||d|<|d|=qqWdS)N�
definitionURL�
definitionurlrs)r()r>r��replacements�k�vr#r#r$�adjustMathMLAttributess

z!HTMLParser.adjustMathMLAttributescCsi>dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6}xXt|d}j��D]@}||kr�||}|d}||d}|<|d}|=q�q�WdS)~Nr2�
attributename�
attributeType�
attributetype�
baseFrequency�
basefrequency�baseProfile�baseprofile�calcMode�calcmode�
clipPathUnits�
clippathunits�contentScriptType�contentscripttype�contentStyleType�contentstyletype�diffuseConstant�diffuseconstant�edgeMode�edgemode�externalResourcesRequired�externalresourcesrequired�	filterRes�	filterres�filterUnits�filterunits�glyphRef�glyphref�gradientTransform�gradienttransform�
gradientUnits�
gradientunits�kernelMatrix�kernelmatrix�kernelUnitLength�kernelunitlength�	keyPoints�	keypoints�
keySplines�
keysplines�keyTimes�keytimes�lengthAdjust�lengthadjust�limitingConeAngle�limitingconeangle�markerHeight�markerheight�markerUnits�markerunits�markerWidth�markerwidth�maskContentUnits�maskcontentunits�	maskUnits�	maskunits�
numOctaves�
numoctaves�
pathLength�
pathlength�patternContentUnits�patterncontentunits�patternTransform�patterntransform�patternUnits�patternunits�	pointsAtX�	pointsatx�	pointsAtY�	pointsaty�	pointsAtZ�	pointsatz�
preserveAlpha�
preservealpha�preserveAspectRatio�preserveaspectratio�primitiveUnits�primitiveunits�refX�refx�refY�refy�repeatCount�repeatcount�	repeatDur�	repeatdur�requiredExtensions�requiredextensions�requiredFeatures�requiredfeatures�specularConstant�specularconstant�specularExponent�specularexponent�spreadMethod�spreadmethod�startOffset�startoffset�stdDeviation�stddeviation�stitchTiles�stitchtiles�surfaceScale�surfacescale�systemLanguage�systemlanguage�tableValues�tablevalues�targetX�targetx�targetY�targety�
textLength�
textlength�viewBox�viewbox�
viewTarget�
viewtarget�xChannelSelector�xchannelselector�yChannelSelector�ychannelselector�
zoomAndPan�
zoomandpanrs)�list�keys)r>r�r��originalName�svgNamer#r#r$�adjustSVGAttributes	s�

zHTMLParser.adjustSVGAttributescCs_t}xR|dj�D]@}||kr||}|d||d|<|d|=qqWdS)Nrs)�adjustForeignAttributesMapr )r>r�r�r!�foreignNamer#r#r$rPs
z"HTMLParser.adjustForeignAttributescCs|jj�dS)N)rJr])r>r�r#r#r$�reparseTokenNormalYszHTMLParser.reparseTokenNormalcCs]d}idd6dd6dd6dd6d	d
6d	d6d	d6d
d6dd6dd6dd6dd6dd6dd6}x�|jjddd�D]�}|j}d}||jjdkr�|js�t�d}|j}n|dkr�|js�t�n|r|j|jjkrq�n||kr5|j||}Pq�|r�|jd}Pq�q�W||_dS)NF�inSelect�select�inCell�td�th�inRow�tr�inTableBody�tbody�thead�tfoot�	inCaption�caption�
inColumnGroup�colgroup�inTable�table�inBody�head�body�
inFrameset�frameset�
beforeHead�htmlrrTr{)zselectzcolgroupzheadzhtml)	r:r}r<rOr�rfr�rEr])r>�last�newModes�node�nodeName�	new_phaser#r#r$r_\sD
 	
zHTMLParser.resetInsertionModecCsu|dkst�|jj|�|dkrC|jj|j_n|jj|j_|j|_|j	d|_dS)zYGeneric RCDATA/RAWTEXT Parsing algorithm
        contentType - RCDATA or RAWTEXT
        �RAWTEXT�RCDATA�textN)zRAWTEXTzRCDATA)
r�r:�
insertElementrr[rZrYr]�
originalPhaserE)r>r��contentTyper#r#r$�parseRCDataRawtext�szHTMLParser.parseRCDataRawtext)r5r6r7�__doc__r�
HTMLTokenizerrGrQrLrjrkrMr|rr'r~r�r�r#rr&r_rJr#r#r#r$r2s*	"
@G	,rcs7dd�}dd�}Gdd�dt|||����Gdd�d��}Gd	d
�d
��}G�fdd�d��}G�fd
d�d��}G�fdd�d��}G�fdd�d��}G�fdd�d��}	G�fdd�d��}
G�fdd�d��}G�fdd�d��}G�fdd�d��}
G�fdd�d��}G�fdd �d ��}G�fd!d"�d"��}G�fd#d$�d$��}G�fd%d&�d&��}G�fd'd(�d(��}G�fd)d*�d*��}G�fd+d,�d,��}G�fd-d.�d.��}G�fd/d0�d0��}G�fd1d2�d2��}i|d36|d46|d56|d66|d76|d86|	d96|
d:6|d;6|d<6|
d=6|d>6|d?6|d@6|dA6|dB6|dC6|dD6|dE6|dF6|dG6|dH6S)INcs;tdd�tjj�D�����fdd�}|S)z4Logger that records which phase processes each tokencss!|]\}}||fVqdS)Nr#)r;�key�valuer#r#r$�	<genexpr>�sz)getPhases.<locals>.log.<locals>.<genexpr>cs��jjd�r�t|�dkr�|d}yi�|dd6}Wn�YnX|dtjkry|d|d<n|jjj|jjj	j|jj
jj|jj�j|f��|||�S�|||�SdS)N�processrr,r<)r5�
startswithr�r�
tagTokenTypesrJrVr�rrZr]�	__class__)r>�argsrPr��info)r4�
type_namesr#r$�wrapped�s$
	
z'getPhases.<locals>.log.<locals>.wrapped)rCrrr()r4rWr#)r4rVr$rV�szgetPhases.<locals>.logcSs|rt|�StSdS)N)r9r,)�
use_metaclass�metaclass_funcr#r#r$�getMetaclass�s
zgetPhases.<locals>.getMetaclassc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)zgetPhases.<locals>.PhasezNBase class for helper object that implements each phase of processing
        cSs||_||_dS)N)rJr:)r>rJr:r#r#r$rG�s	z!getPhases.<locals>.Phase.__init__cSs
t�dS)N)�NotImplementedError)r>r#r#r$r��sz#getPhases.<locals>.Phase.processEOFcSs!|jj||jjd�dS)Nrr{)r:�
insertCommentr})r>r�r#r#r$r��sz'getPhases.<locals>.Phase.processCommentcSs|jjd�dS)Nzunexpected-doctype)rJr~)r>r�r#r#r$r��sz'getPhases.<locals>.Phase.processDoctypecSs|jj|d�dS)Nrs)r:�
insertText)r>r�r#r#r$r��sz*getPhases.<locals>.Phase.processCharacterscSs|jj|d�dS)Nrs)r:r])r>r�r#r#r$r��sz/getPhases.<locals>.Phase.processSpaceCharacterscSs|j|d|�S)Nr<)�startTagHandler)r>r�r#r#r$r��sz(getPhases.<locals>.Phase.processStartTagcSs�|jjr0|ddkr0|jjd�nxQ|dj�D]?\}}||jjdjkrA||jjdj|<qAqAWd|j_dS)Nr<r>z
non-html-rootrsrF)rJrUr~r(r:r}rg)r>r��attrrNr#r#r$�startTagHtml�sz%getPhases.<locals>.Phase.startTagHtmlcSs|j|d|�S)Nr<)�
endTagHandler)r>r�r#r#r$r��sz&getPhases.<locals>.Phase.processEndTagN)
r5r6r7rKrGr�r�r�r�r�r�r`r�r#r#r#r$�Phase�s
rbc@speZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)zgetPhases.<locals>.InitialPhasecSsdS)Nr#)r>r�r#r#r$r��sz6getPhases.<locals>.InitialPhase.processSpaceCharacterscSs|jj||jj�dS)N)r:r\�document)r>r�r#r#r$r��sz.getPhases.<locals>.InitialPhase.processCommentc8Ssu|d}|d}|d}|d}|dksX|dk	sX|dk	rk|dkrk|jjd�n|dkr�d}n|jj|�|dkr�|jt�}n|s|ddks|jdJ�s|dKks|jdL�r�|dks|r"|j�dDkr"dE|j_n9|jdM�sL|jdN�r[|dk	r[dH|j_n|jj	dI|j_
dS)ONr<�publicId�systemId�correctr>zabout:legacy-compatzunknown-doctype��*+//silmaril//dtd html pro v0r11 19970101//�4-//advasoft ltd//dtd html 3.0 aswedit + extensions//�*-//as//dtd html 3.0 aswedit + extensions//�-//ietf//dtd html 2.0 level 1//�-//ietf//dtd html 2.0 level 2//�&-//ietf//dtd html 2.0 strict level 1//�&-//ietf//dtd html 2.0 strict level 2//�-//ietf//dtd html 2.0 strict//�-//ietf//dtd html 2.0//�-//ietf//dtd html 2.1e//�-//ietf//dtd html 3.0//�-//ietf//dtd html 3.2 final//�-//ietf//dtd html 3.2//�-//ietf//dtd html 3//�-//ietf//dtd html level 0//�-//ietf//dtd html level 1//�-//ietf//dtd html level 2//�-//ietf//dtd html level 3//�"-//ietf//dtd html strict level 0//�"-//ietf//dtd html strict level 1//�"-//ietf//dtd html strict level 2//�"-//ietf//dtd html strict level 3//�-//ietf//dtd html strict//�-//ietf//dtd html//�(-//metrius//dtd metrius presentational//�5-//microsoft//dtd internet explorer 2.0 html strict//�.-//microsoft//dtd internet explorer 2.0 html//�0-//microsoft//dtd internet explorer 2.0 tables//�5-//microsoft//dtd internet explorer 3.0 html strict//�.-//microsoft//dtd internet explorer 3.0 html//�0-//microsoft//dtd internet explorer 3.0 tables//�#-//netscape comm. corp.//dtd html//�*-//netscape comm. corp.//dtd strict html//�*-//o'reilly and associates//dtd html 2.0//�3-//o'reilly and associates//dtd html extended 1.0//�;-//o'reilly and associates//dtd html extended relaxed 1.0//�N-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//�E-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//�$-//spyglass//dtd html 2.0 extended//�+-//sq//dtd html 2.0 hotmetal + extensions//�--//sun microsystems corp.//dtd hotjava html//�4-//sun microsystems corp.//dtd hotjava strict html//�-//w3c//dtd html 3 1995-03-24//�-//w3c//dtd html 3.2 draft//�-//w3c//dtd html 3.2 final//�-//w3c//dtd html 3.2//�-//w3c//dtd html 3.2s draft//�-//w3c//dtd html 4.0 frameset//�#-//w3c//dtd html 4.0 transitional//�(-//w3c//dtd html experimental 19960712//�&-//w3c//dtd html experimental 970421//�-//w3c//dtd w3 html//�-//w3o//dtd w3 html 3.0//�#-//webtechs//dtd mozilla html 2.0//�-//webtechs//dtd mozilla html//�$-//w3o//dtd w3 html strict 3.0//en//�"-/w3c/dtd html 4.0 transitional/en� -//w3c//dtd html 4.01 frameset//�$-//w3c//dtd html 4.01 transitional//z:http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd�quirks� -//w3c//dtd xhtml 1.0 frameset//�$-//w3c//dtd xhtml 1.0 transitional//zlimited quirksrS)7rhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)r�r�zhtml)r�r�)r�r�)r�r�)rJr~r:�
insertDoctyperhrrQrXrWrEr])r>r�r<rdrerfr#r#r$r��s�



						z.getPhases.<locals>.InitialPhase.processDoctypecSs&d|j_|jjd|j_dS)Nr�rS)rJrWrEr])r>r#r#r$�anythingElseJsz,getPhases.<locals>.InitialPhase.anythingElsecSs|jjd�|j�|S)Nzexpected-doctype-but-got-chars)rJr~r�)r>r�r#r#r$r�Ns
z1getPhases.<locals>.InitialPhase.processCharacterscSs,|jjdi|dd6�|j�|S)Nz"expected-doctype-but-got-start-tagr<)rJr~r�)r>r�r#r#r$r�Ss
z/getPhases.<locals>.InitialPhase.processStartTagcSs,|jjdi|dd6�|j�|S)Nz expected-doctype-but-got-end-tagr<)rJr~r�)r>r�r#r#r$r�Ys
z-getPhases.<locals>.InitialPhase.processEndTagcSs|jjd�|j�dS)Nzexpected-doctype-but-got-eofT)rJr~r�)r>r#r#r$r�_s
z*getPhases.<locals>.InitialPhase.processEOFN)r5r6r7r�r�r�r�r�r�r�r�r#r#r#r$�InitialPhase�s`r�c@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)z"getPhases.<locals>.BeforeHtmlPhasecSs3|jjtdd��|jjd|j_dS)Nr>rnr=)r:�
insertRoot�impliedTagTokenrJrEr])r>r#r#r$r^fsz4getPhases.<locals>.BeforeHtmlPhase.insertHtmlElementcSs|j�dS)NT)r^)r>r#r#r$r�ks
z-getPhases.<locals>.BeforeHtmlPhase.processEOFcSs|jj||jj�dS)N)r:r\rc)r>r�r#r#r$r�osz1getPhases.<locals>.BeforeHtmlPhase.processCommentcSsdS)Nr#)r>r�r#r#r$r�rsz9getPhases.<locals>.BeforeHtmlPhase.processSpaceCharacterscSs|j�|S)N)r^)r>r�r#r#r$r�us
z4getPhases.<locals>.BeforeHtmlPhase.processCharacterscSs-|ddkrd|j_n|j�|S)Nr<r>T)rJrUr^)r>r�r#r#r$r�ys
z2getPhases.<locals>.BeforeHtmlPhase.processStartTagcSsC|ddkr1|jjdi|dd6�n|j�|SdS)Nr<r9r:r>�brzunexpected-end-tag-before-html)zheadzbodyzhtmlzbr)rJr~r^)r>r�r#r#r$r�s

z0getPhases.<locals>.BeforeHtmlPhase.processEndTagN)
r5r6r7r^r�r�r�r�r�r�r#r#r#r$�BeforeHtmlPhasedsr�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)z"getPhases.<locals>.BeforeHeadPhasecs}�j|||�tjd|jfd|jfg�|_|j|j_tjd|jfg�|_	|j
|j	_dS)Nr>r9r:r�)zheadzbodyzhtmlzbr)rGr�MethodDispatcherr`�startTagHeadr^�
startTagOther�default�endTagImplyHeadra�endTagOther)r>rJr:)rbr#r$rG�sz+getPhases.<locals>.BeforeHeadPhase.__init__cSs|jtdd��dS)Nr9rnT)r�r�)r>r#r#r$r��sz-getPhases.<locals>.BeforeHeadPhase.processEOFcSsdS)Nr#)r>r�r#r#r$r��sz9getPhases.<locals>.BeforeHeadPhase.processSpaceCharacterscSs|jtdd��|S)Nr9rn)r�r�)r>r�r#r#r$r��sz4getPhases.<locals>.BeforeHeadPhase.processCharacterscSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r`�sz/getPhases.<locals>.BeforeHeadPhase.startTagHtmlcSs@|jj|�|jjd|j_|jjd|j_dS)Nr�inHeadr{)r:rGr}�headPointerrJrEr])r>r�r#r#r$r��sz/getPhases.<locals>.BeforeHeadPhase.startTagHeadcSs|jtdd��|S)Nr9rn)r�r�)r>r�r#r#r$r��sz0getPhases.<locals>.BeforeHeadPhase.startTagOthercSs|jtdd��|S)Nr9rn)r�r�)r>r�r#r#r$r��sz2getPhases.<locals>.BeforeHeadPhase.endTagImplyHeadcSs"|jjdi|dd6�dS)Nzend-tag-after-implied-rootr<)rJr~)r>r�r#r#r$r��sz.getPhases.<locals>.BeforeHeadPhase.endTagOtherN)r5r6r7rGr�r�r�r`r�r�r�r�r#)rbr#r$�BeforeHeadPhase�sr�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS) zgetPhases.<locals>.InHeadPhasec
s��j|||�tjd|jfd|jfd|jfd|jfd|jfd|jfd
|j	fg�|_
|j|j
_tjd
|j
fd|jfg�|_|j|j_dS)Nr>�title�noscript�noframes�style�script�base�basefont�bgsound�command�linkr.r9r�r:)znoscriptznoframeszstyle)zbasezbasefontzbgsoundzcommandzlink)zbrzhtmlzbody)rGrr�r`�
startTagTitle�startTagNoScriptNoFramesStyle�startTagScript�startTagBaseLinkCommand�startTagMetar�r^r�r��
endTagHead�endTagHtmlBodyBrrar�)r>rJr:)rbr#r$rG�s	z'getPhases.<locals>.InHeadPhase.__init__cSs|j�dS)NT)r�)r>r#r#r$r��s
z)getPhases.<locals>.InHeadPhase.processEOFcSs|j�|S)N)r�)r>r�r#r#r$r��s
z0getPhases.<locals>.InHeadPhase.processCharacterscSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r`�sz+getPhases.<locals>.InHeadPhase.startTagHtmlcSs|jjd�dS)Nz!two-heads-are-not-better-than-one)rJr~)r>r�r#r#r$r��sz+getPhases.<locals>.InHeadPhase.startTagHeadcSs.|jj|�|jjj�d|d<dS)NTrz)r:rGr}�pop)r>r�r#r#r$r��sz6getPhases.<locals>.InHeadPhase.startTagBaseLinkCommandcSs�|jj|�|jjj�d|d<|d}|jjjjddkr�d|kry|jjjj|d�q�d|kr�d|kr�|dj	�d	kr�t
j|djd
��}t
j
|�}|j�}|jjjj|�q�ndS)NTrzrsr�	tentative�charset�contentz
http-equivzcontent-typezutf-8)r:rGr}r�rJrrN�charEncoding�changeEncodingrXr�
EncodingBytes�encode�ContentAttrParserr)r>r�rgrsrJ�codecr#r#r$r��s

z+getPhases.<locals>.InHeadPhase.startTagMetacSs|jj|d�dS)NrE)rJrJ)r>r�r#r#r$r��sz,getPhases.<locals>.InHeadPhase.startTagTitlecSs|jj|d�dS)NrD)rJrJ)r>r�r#r#r$r��sz<getPhases.<locals>.InHeadPhase.startTagNoScriptNoFramesStylecSsT|jj|�|jjj|jj_|jj|j_|jjd|j_dS)NrF)	r:rGrJr�scriptDataStaterZr]rHrE)r>r�r#r#r$r��sz-getPhases.<locals>.InHeadPhase.startTagScriptcSs|j�|S)N)r�)r>r�r#r#r$r�s
z,getPhases.<locals>.InHeadPhase.startTagOthercSsQ|jjjj�}|jdks7td|j��|jjd|j_dS)Nr9zExpected head got %s�	afterHead)rJr:r}r�r<r�rEr])r>r�rAr#r#r$r�s"z)getPhases.<locals>.InHeadPhase.endTagHeadcSs|j�|S)N)r�)r>r�r#r#r$r�
s
z/getPhases.<locals>.InHeadPhase.endTagHtmlBodyBrcSs"|jjdi|dd6�dS)Nzunexpected-end-tagr<)rJr~)r>r�r#r#r$r�sz*getPhases.<locals>.InHeadPhase.endTagOthercSs|jtd��dS)Nr9)r�r�)r>r#r#r$r�sz+getPhases.<locals>.InHeadPhase.anythingElseN)r5r6r7rGr�r�r`r�r�r�r�r�r�r�r�r�r�r�r#)rbr#r$�InHeadPhase�sr�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)z!getPhases.<locals>.AfterHeadPhasec
s��j|||�tjd|jfd|jfd|jfd|jfd
|jfg�|_|j	|j_
tjd|jfg�|_|j
|j_
dS)Nr>r:r<r�r�r�r�r.r�r�r�r�r9r�)	zbasezbasefontzbgsoundzlinkzmetaznoframeszscriptzstyleztitle)zbodyzhtmlzbr)rGrr�r`�startTagBody�startTagFrameset�startTagFromHeadr�r^r�r�r�rar�)r>rJr:)rbr#r$rGs		z*getPhases.<locals>.AfterHeadPhase.__init__cSs|j�dS)NT)r�)r>r#r#r$r�*s
z,getPhases.<locals>.AfterHeadPhase.processEOFcSs|j�|S)N)r�)r>r�r#r#r$r�.s
z3getPhases.<locals>.AfterHeadPhase.processCharacterscSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r`2sz.getPhases.<locals>.AfterHeadPhase.startTagHtmlcSs6d|j_|jj|�|jjd|j_dS)NFr8)rJrbr:rGrEr])r>r�r#r#r$r�5sz.getPhases.<locals>.AfterHeadPhase.startTagBodycSs*|jj|�|jjd|j_dS)Nr;)r:rGrJrEr])r>r�r#r#r$r�:sz2getPhases.<locals>.AfterHeadPhase.startTagFramesetcSs�|jjdi|dd6�|jjj|jj�|jjdj|�xG|jjddd�D],}|jdkrh|jjj	|�PqhqhWdS)Nz#unexpected-start-tag-out-of-my-headr<r�rr9r{)
rJr~r:r}r�r�rEr�r<�remove)r>r�rAr#r#r$r�>s z2getPhases.<locals>.AfterHeadPhase.startTagFromHeadcSs"|jjdi|dd6�dS)Nzunexpected-start-tagr<)rJr~)r>r�r#r#r$r�Hsz.getPhases.<locals>.AfterHeadPhase.startTagHeadcSs|j�|S)N)r�)r>r�r#r#r$r�Ks
z/getPhases.<locals>.AfterHeadPhase.startTagOthercSs|j�|S)N)r�)r>r�r#r#r$r�Os
z2getPhases.<locals>.AfterHeadPhase.endTagHtmlBodyBrcSs"|jjdi|dd6�dS)Nzunexpected-end-tagr<)rJr~)r>r�r#r#r$r�Ssz-getPhases.<locals>.AfterHeadPhase.endTagOthercSs?|jjtdd��|jjd|j_d|j_dS)Nr:rnr8T)r:rGr�rJrEr]rb)r>r#r#r$r�Vsz.getPhases.<locals>.AfterHeadPhase.anythingElseN)r5r6r7rGr�r�r`r�r�r�r�r�r�r�r�r#)rbr#r$�AfterHeadPhases
r�csneZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dEdF�Z%dGdH�Z&dIdJ�Z'dKdL�Z(dMdN�Z)dOdP�Z*dQdR�Z+dSdT�Z,dUdV�Z-dWdX�Z.dYdZ�Z/d[d\�Z0d]d^�Z1d_d`�Z2dadb�Z3dcdd�Z4deS)fzgetPhases.<locals>.InBodyPhasec+s]�j|||�|j|_tjd|jfdd|jfd|jfd
|jfde|j	ft
|jfdf|jfd'|j
fdg|jfd+|jfd,|jfdh|jfd9|jfd:|jfdi|jfd>|jfd?|jfdj|jfdk|jfdI|jfdJ|jfdK|jfdL|jfdM|jfdN|jfdl|jfdQ|j fdm|j!fdn|j"fdV|j#fdW|j$fdo|j%fg �|_&|j'|j&_(tjd|j)fd|j*fdp|j+fd'|j,fd!|j-fdq|j.ft
|j/fdr|j0fds|j1fdA|j2fg
�|_3|j4|j3_(dS)tNr>r�r�r�r�r�r.r�r�r�r�r:r<�address�article�aside�
blockquote�center�details�dirr%�dl�fieldset�
figcaption�figure�footer�header�hgroup�main�menu�nav�olr"�section�summary�ul�pre�listing�form�li�dd�dtrR�a�b�big�code�em�font�i�s�small�strike�strong�tt�u�nobr�button�applet�marquee�object�xmpr7�arear��embed�img�keygen�wbr�param�source�track�input�hr�image�isindex�textarea�iframe�noembedr�r(�rp�rt�option�optgroup�mathrwr3�colr5�framer9r/r*r1r+r0r-�dialog)
zbasezbasefontzbgsoundzcommandzlinkzmeta�noframeszscriptzstyleztitle)�address�article�aside�
blockquote�center�detailsr$�dir�div�dl�fieldset�
figcaption�figure�footer�header�hgroup�main�menu�nav�olr"�section�summary�ul)�pre�listing)�li�dd�dt)r��big�code�em�fontr�r��small�strike�strong�ttr)�applet�marquee�object)zareazbrzembedzimgzkeygenzwbr)zparamzsourceztrack)znoembedrznoscript)zrpzrt)zoptionzoptgroup)zcaptionzcolzcolgroupzframezheadztbodyztdztfootzthztheadztr)rr r!r"zbuttonr#r$zdialogr%r&r'r(r)r*r+r,r-r6r.r/r0r1r5r2r3r4)r8r9r7)r�r�r:r;r<r=r�znobrr�r>r?r@rAr)rBrCrD)5rGr��processSpaceCharactersNonPrerr�r`�startTagProcessInHeadr�r��startTagClosePr�startTagHeading�startTagPreListing�startTagForm�startTagListItem�startTagPlaintext�	startTagA�startTagFormatting�startTagNobr�startTagButton�startTagAppletMarqueeObject�startTagXmp�
startTagTable�startTagVoidFormatting�startTagParamSource�
startTagInput�
startTagHr�
startTagImage�startTagIsIndex�startTagTextarea�startTagIFrame�startTagRawtext�startTagSelect�startTagRpRt�startTagOpt�startTagMath�startTagSvg�startTagMisplacedr^r�r��
endTagBody�
endTagHtml�endTagBlock�
endTagForm�endTagP�endTagListItem�
endTagHeading�endTagFormatting�endTagAppletMarqueeObject�endTagBrrar�)r>rJr:)rbr#r$rG^s|			z'getPhases.<locals>.InBodyPhase.__init__cSs�|j|jks$|j|jkr(dSt|j�t|j�krJdSt|jj��}t|jj��}x-t||�D]\}}||kr�dSq�WdS)NFT)r<rfr�rg�sortedr(�zip)r>�node1�node2�attributes1�attributes2�attr1�attr2r#r#r$�isMatchingFormattingElement�s$z:getPhases.<locals>.InBodyPhase.isMatchingFormattingElementcSs�|jj|�|jjd}g}xS|jjddd�D]8}|tkrVPq@|j||�r@|j|�q@q@Wt|�dks�t�t|�dkr�|jjj	|d�n|jjj|�dS)Nr�r{r{r{)
r:rGr}�activeFormattingElementsr
rur�r�r�r�)r>r�ri�matchingElementsrAr#r#r$�addFormattingElement�s z3getPhases.<locals>.InBodyPhase.addFormattingElementc
SsWtd�}xD|jjddd�D])}|j|kr&|jjd�Pq&q&WdS)Nr�r�r�r"r/r*r1r+r0r-r:r>rz expected-closing-tag-but-got-eof)zddzdtzlir"ztbodyztdztfootzthztheadztrzbodyzhtmlr{)r�r:r}r<rJr~)r>�allowed_elementsrAr#r#r$r��s	 z)getPhases.<locals>.InBodyPhase.processEOFcSs�|d}|j|_|jd�rh|jjdjdkrh|jjd	j�rh|dd�}n|r�|jj�|jj|�ndS)
Nrs�
rr�r�rr{)zprezlistingztextarear{)	rEr�rQr:r}r<�
hasContent�#reconstructActiveFormattingElementsr])r>r�rsr#r#r$�!processSpaceCharactersDropNewline�s

z@getPhases.<locals>.InBodyPhase.processSpaceCharactersDropNewlinecSsq|ddkrdS|jj�|jj|d�|jjrmtdd�|dD��rmd|j_ndS)Nrs�cSsg|]}|tk�qSr#)r
)r;�charr#r#r$r?�s	zDgetPhases.<locals>.InBodyPhase.processCharacters.<locals>.<listcomp>F)r:r}r]rJrb�any)r>r�r#r#r$r��s
z0getPhases.<locals>.InBodyPhase.processCharacterscSs%|jj�|jj|d�dS)Nrs)r:r}r])r>r�r#r#r$r��s
z5getPhases.<locals>.InBodyPhase.processSpaceCharacterscSs|jjdj|�S)Nr�)rJrEr�)r>r�r#r#r$rF�sz4getPhases.<locals>.InBodyPhase.startTagProcessInHeadcSs�|jjdidd6�t|jj�dksK|jjdjdkr`|jjs�t�n`d|j_xQ|dj	�D]?\}}||jjdj
kr}||jjdj
|<q}q}WdS)Nzunexpected-start-tagr:r<rFrs)rJr~r�r:r}r<rOr�rbr(rg)r>r�r_rNr#r#r$r��sz+getPhases.<locals>.InBodyPhase.startTagBodycSs|jjdidd6�t|jj�dksK|jjdjdkr`|jjs�t�n�|jjson�|jjdj	r�|jjdj	j
|jjd�nx-|jjdjdkr�|jjj�q�W|jj|�|jj
d|j_dS)	Nzunexpected-start-tagr<r<rr:r>r;r{)rJr~r�r:r}r<rOr�rb�parent�removeChildr�rGrEr])r>r�r#r#r$r��s1'z/getPhases.<locals>.InBodyPhase.startTagFramesetcSsB|jjddd�r.|jtd��n|jj|�dS)Nr"�variantr)r:�elementInScopergr�rG)r>r�r#r#r$rGsz-getPhases.<locals>.InBodyPhase.startTagClosePcSsZ|jjddd�r.|jtd��n|jj|�d|j_|j|_dS)Nr"r�rF)	r:r�rgr�rGrJrbr~r�)r>r�r#r#r$rIs
z1getPhases.<locals>.InBodyPhase.startTagPreListingcSs�|jjr)|jjdidd6�nT|jjddd�rW|jtd��n|jj|�|jjd|j_dS)	Nzunexpected-start-tagr�r<r"r�rrr{)	r:�formPointerrJr~r�rgr�rGr})r>r�r#r#r$rJsz+getPhases.<locals>.InBodyPhase.startTagFormcSsd|j_idgd6ddgd6ddgd6}||d}xnt|jj�D]Z}|j|kr�|jjjt|jd��Pn|j	t
krW|jdkrWPqWqWW|jjd	d
d�r�|jjjtd	d��n|jj|�dS)
NFr�r�r�r<ror�r%r"r�r)zaddresszdivr")
rJrb�reversedr:r}r<r]r�r��	nameTuplerr�rG)r>r��stopNamesMap�	stopNamesrAr#r#r$rKs"

z/getPhases.<locals>.InBodyPhase.startTagListItemcSsZ|jjddd�r.|jtd��n|jj|�|jjj|jj_dS)Nr"r�r)	r:r�rgr�rGrJrr\rZ)r>r�r#r#r$rL1sz0getPhases.<locals>.InBodyPhase.startTagPlaintextcSs�|jjddd�r.|jtd��n|jjdjtkrx|jjdi|dd6�|jjj	�n|jj
|�dS)Nr"r�rrzunexpected-start-tagr<r{)r:r�rgr�r}r<rrJr~r�rG)r>r�r#r#r$rH7sz.getPhases.<locals>.InBodyPhase.startTagHeadingcSs�|jjd�}|r�|jjdidd6dd6�|jtd��||jjkrt|jjj|�n||jjkr�|jjj|�q�n|jj	�|j
|�dS)Nr�z$unexpected-start-tag-implies-end-tag�	startName�endName)r:�!elementInActiveFormattingElementsrJr~rjr�r}r�rwr}ry)r>r��afeAElementr#r#r$rM?s
z(getPhases.<locals>.InBodyPhase.startTagAcSs|jj�|j|�dS)N)r:r}ry)r>r�r#r#r$rNLs
z1getPhases.<locals>.InBodyPhase.startTagFormattingcSst|jj�|jjd�rc|jjdidd6dd6�|jtd��|jj�n|j|�dS)Nrz$unexpected-start-tag-implies-end-tagr�r�)r:r}r�rJr~r�r�ry)r>r�r#r#r$rOPs
z+getPhases.<locals>.InBodyPhase.startTagNobrcSsw|jjd�rJ|jjdidd6dd6�|jtd��|S|jj�|jj|�d|j_dS)Nrz$unexpected-start-tag-implies-end-tagr�r�F)	r:r�rJr~r�r�r}rGrb)r>r�r#r#r$rPZs
z-getPhases.<locals>.InBodyPhase.startTagButtoncSs@|jj�|jj|�|jjjt�d|j_dS)NF)r:r}rGrwr�r
rJrb)r>r�r#r#r$rQes
z:getPhases.<locals>.InBodyPhase.startTagAppletMarqueeObjectcSs^|jjddd�r.|jtd��n|jj�d|j_|jj|d�dS)Nr"r�rFrD)r:r�rgr�r}rJrbrJ)r>r�r#r#r$rRks

z*getPhases.<locals>.InBodyPhase.startTagXmpcSsy|jjdkrC|jjddd�rC|jtd��qCn|jj|�d|j_|jjd|j_	dS)Nr�r"r�rFr6)
rJrWr:r�r�r�rGrbrEr])r>r�r#r#r$rSrsz,getPhases.<locals>.InBodyPhase.startTagTablecSsG|jj�|jj|�|jjj�d|d<d|j_dS)NTrzF)r:r}rGr}r�rJrb)r>r�r#r#r$rTzs


z5getPhases.<locals>.InBodyPhase.startTagVoidFormattingcSsY|jj}|j|�d|dkrU|ddjt�dkrU||j_ndS)Nr,rs�hidden)rJrbrTrhr)r>r�rbr#r#r$rV�s

z,getPhases.<locals>.InBodyPhase.startTagInputcSs.|jj|�|jjj�d|d<dS)NTrz)r:rGr}r�)r>r�r#r#r$rU�sz2getPhases.<locals>.InBodyPhase.startTagParamSourcecSsh|jjddd�r.|jtd��n|jj|�|jjj�d|d<d|j_dS)Nr"r�rTrzF)	r:r�rgr�rGr}r�rJrb)r>r�r#r#r$rW�s
z)getPhases.<locals>.InBodyPhase.startTagHrc	SsO|jjdidd6dd6�|jtddd|dd	|d	��dS)
Nzunexpected-start-tag-treated-asrr!r	�newNamernrgrsry)rJr~r�r�)r>r�r#r#r$rX�s

z,getPhases.<locals>.InBodyPhase.startTagImagec	Ss�|jjdidd6�|jjr*dSi}d|dkrU|dd|d<n|jtddd|��|jtd	d��|jtd
d��d|dkr�|dd}nd}|jitd
d6|d6�|dj�}d|kr	|d=nd|kr|d=nd|d<|jtddd|d|d��|j	td
��|jtd	d��|j	td��dS)Nzdeprecated-tagrr<�actionrsr�rnrgr�label�promptz3This is a searchable index. Enter search keywords: rlr,rry)
rJr~r:r�r�r�r�r�copyr�)r>r��
form_attrsr�rgr#r#r$rY�s6



z.getPhases.<locals>.InBodyPhase.startTagIsIndexcSsD|jj|�|jjj|jj_|j|_d|j_dS)NF)	r:rGrJrrYrZr~r�rb)r>r�r#r#r$rZ�sz/getPhases.<locals>.InBodyPhase.startTagTextareacSsd|j_|j|�dS)NF)rJrbr\)r>r�r#r#r$r[�sz-getPhases.<locals>.InBodyPhase.startTagIFramecSs|jj|d�dS)z8iframe, noembed noframes, noscript(if scripting enabled)rDN)rJrJ)r>r�r#r#r$r\�sz.getPhases.<locals>.InBodyPhase.startTagRawtextcSsY|jjdjdkr5|jjjtd��n|jj�|jjj|�dS)Nrrr{)	r:r}r<rJr]r�r�r}rG)r>r�r#r#r$r_�s
z*getPhases.<locals>.InBodyPhase.startTagOptcSs�|jj�|jj|�d|j_|jj|jjd|jjd|jjd|jjd|jjd|jjdfkr�|jjd|j_n|jjd	|j_dS)
NFr6r2r4r.r,r)�inSelectInTabler')r:r}rGrJrbr]rE)r>r�r#r#r$r]�s




z-getPhases.<locals>.InBodyPhase.startTagSelectcSs_|jjd�rK|jj�|jjdjdkrK|jj�qKn|jj|�dS)N�rubyrr{)r:r��generateImpliedEndTagsr}r<rJr~rG)r>r�r#r#r$r^�s

z+getPhases.<locals>.InBodyPhase.startTagRpRtcSsv|jj�|jj|�|jj|�td|d<|jj|�|drr|jjj�d|d<ndS)NrcrfryTrz)	r:r}rJr�rrrGr}r�)r>r�r#r#r$r`�s

z+getPhases.<locals>.InBodyPhase.startTagMathcSsv|jj�|jj|�|jj|�td|d<|jj|�|drr|jjj�d|d<ndS)NrwrfryTrz)	r:r}rJr#rrrGr}r�)r>r�r#r#r$ra�s

z*getPhases.<locals>.InBodyPhase.startTagSvgcSs"|jjdi|dd6�dS)a5 Elements that should be children of other elements that have a
            different insertion mode; here they are ignored
            "caption", "col", "colgroup", "frame", "frameset", "head",
            "option", "optgroup", "tbody", "td", "tfoot", "th", "thead",
            "tr", "noscript"
            zunexpected-start-tag-ignoredr<N)rJr~)r>r�r#r#r$rb�sz0getPhases.<locals>.InBodyPhase.startTagMisplacedcSs!|jj�|jj|�dS)N)r:r}rG)r>r�r#r#r$r�s
z,getPhases.<locals>.InBodyPhase.startTagOthercSs�|jjddd�sa|jtdd��|jjdidd6�|jtdd��n�|jjd�|jjd	j	dkr�|jjdidd6�n|jjj
�}x%|j	dkr�|jjj
�}q�WdS)
Nr"r�rrnzunexpected-end-tagr<rorr{)r:r�rGr�rJr~rgr�r}r<r�)r>r�rAr#r#r$rgsz&getPhases.<locals>.InBodyPhase.endTagPcSs�|jjd�s#|jj�dS|jjdjdkr�x^|jjdd�D]C}|jtd�krS|jjdidd6|jd6�PqSqSWn|jjd|j_dS)Nr:r�r�r�r�rrr"rrr/r*r1r+r0r-r>z$expected-one-end-tag-but-got-another�expectedName�gotName�	afterBodyr{)zddzdtzlizoptgroupzoptionr"zrpzrtztbodyztdztfootzthztheadztrzbodyzhtml)	r:r�rJr~r}r<r�rEr])r>r�rAr#r#r$rcs
		z)getPhases.<locals>.InBodyPhase.endTagBodycSs-|jjd�r)|jtd��|SdS)Nr:)r:r�rcr�)r>r�r#r#r$rd+sz)getPhases.<locals>.InBodyPhase.endTagHtmlcSs�|ddkr|j|_n|jj|d�}|rK|jj�n|jjdj|dkr�|jjdi|dd6�n|r�|jjj	�}x,|j|dkr�|jjj	�}q�WndS)Nr<r�rzend-tag-too-earlyr{)
rEr�r:r�r�r}r<rJr~r�)r>r��inScoperAr#r#r$re1s!z*getPhases.<locals>.InBodyPhase.endTagBlockcSs�|jj}d|j_|dks7|jj|�rT|jjdidd6�nS|jj�|jjd|kr�|jjdidd6�n|jjj|�dS)Nzunexpected-end-tagr�r<rzend-tag-too-early-ignoredr{)r:r�r�rJr~r�r}r�)r>r�rAr#r#r$rf?s
z)getPhases.<locals>.InBodyPhase.endTagFormcSs�|ddkrd}nd}|jj|dd|�s\|jjdi|dd6�n�|jjd|d�|jjd	j|dkr�|jjdi|dd6�n|jjj�}x)|j|dkr�|jjj�}q�WdS)
Nr<r�rr�zunexpected-end-tag�excluderzend-tag-too-earlyr{)r:r�rJr~r�r}r<r�)r>r�r�rAr#r#r$rhLs	!	z-getPhases.<locals>.InBodyPhase.endTagListItemcSs�x1tD])}|jj|�r|jj�PqqW|jjdj|dkrr|jjdi|dd6�nx^tD]V}|jj|�ry|jjj�}x%|jtkr�|jjj�}q�WPqyqyWdS)Nrr<zend-tag-too-earlyr{)	rr:r�r�r}r<rJr~r�)r>r��itemr#r#r$ri]s

!
z,getPhases.<locals>.InBodyPhase.endTagHeadingcSs9d}x,|dkr4|d7}|jj|d�}|sd||jjkru|jj|j�ru|j|�dS||jjkr�|jjdi|dd6�|jjj	|�dS|jj|j�s�|jjdi|dd6�dS||jjdkr*|jjdi|dd6�n|jjj
|�}d}x7|jj|d�D]}|jtkr\|}Pq\q\W|dkr�|jjj
�}x"||kr�|jjj
�}q�W|jjj	|�dS|jj|d}|jjj
|�}|}	}
d}|jjj
|
�}x|d	kr?|d7}|d8}|jj|}
|
|jjkr�|jjj	|
�q*n|
|kr�Pn|	|kr�|jjj
|
�d}n|
j�}
|
|jj|jjj
|
�<|
|jj|jjj
|
�<|
}
|	jr)|	jj|	�n|
j|	�|
}	q*W|	jr\|	jj|	�n|jtd�kr�|jj�\}}|j|	|�n
|j|	�|j�}
|j|
�|j|
�|jjj	|�|jjj||
�|jjj	|�|jjj|jjj
|�d|
�q	WdS)z)The much-feared adoption agency algorithmr�rr<Nzadoption-agency-1.2zadoption-agency-4.4zadoption-agency-1.3rvr7r/r1r0r-r{)ztableztbodyztfootztheadztr)r:r�r}r�r<r�rJr~rwr��indexr�rr��	cloneNoder�r��appendChildr��getTableMisnestedNodePosition�insertBefore�reparentChildren�insert)r>r��outerLoopCounter�formattingElement�afeIndex�
furthestBlockri�commonAncestor�bookmark�lastNoderA�innerLoopCounterr��cloner�r�r#r#r$rjls�

	

!



	

	


z/getPhases.<locals>.InBodyPhase.endTagFormattingcSs�|jj|d�r&|jj�n|jjdj|dkrd|jjdi|dd6�n|jj|d�r�|jjj�}x)|j|dkr�|jjj�}q�W|jj�ndS)Nr<rzend-tag-too-earlyr{)	r:r�r�r}r<rJr~r��clearActiveFormattingElements)r>r�rir#r#r$rks!z8getPhases.<locals>.InBodyPhase.endTagAppletMarqueeObjectcSs[|jjdidd6dd6�|jj�|jjtdd��|jjj�dS)Nzunexpected-end-tag-treated-asr�r!z
br elementr�rn)rJr~r:r}rGr�r}r�)r>r�r#r#r$rls

z'getPhases.<locals>.InBodyPhase.endTagBrcSs�x�|jjddd�D]�}|j|dkr�|jjd|d�|jjdj|dkr�|jjdi|dd6�nx|jjj�|kr�q�WPq|jtkr|jjdi|dd6�PqqWdS)Nrr<r�zunexpected-end-tagr{r{)	r:r}r<r�rJr~r�r�r)r>r�rAr#r#r$r�"s !z*getPhases.<locals>.InBodyPhase.endTagOtherN)5r5r6r7rGruryr�r~r�r�rFr�r�rGrIrJrKrLrHrMrNrOrPrQrRrSrTrVrUrWrXrYrZr[r\r_r]r^r`rarbr�rgrcrdrerfrhrirjrkrlr�r#)rbr#r$�InBodyPhase[sdF

	

 	

�r�cs^eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)zgetPhases.<locals>.TextPhasecse�j|||�tjg�|_|j|j_tjd|jfg�|_|j|j_dS)Nr�)	rGrr�r^r�r��endTagScriptrar�)r>rJr:)rbr#r$rG1sz%getPhases.<locals>.TextPhase.__init__cSs|jj|d�dS)Nrs)r:r])r>r�r#r#r$r�9sz.getPhases.<locals>.TextPhase.processCharacterscSsM|jjdi|jjdjd6�|jjj�|jj|j_dS)Nz&expected-named-closing-tag-but-got-eofrr<Tr{)rJr~r:r}r<r�rHr])r>r#r#r$r�<s
z'getPhases.<locals>.TextPhase.processEOFcSsdstd|d��dS)NFz4Tried to process start tag %s in RCDATA/RAWTEXT moder<)r�)r>r�r#r#r$r�Csz*getPhases.<locals>.TextPhase.startTagOthercSs=|jjj�}|jdks't�|jj|j_dS)Nr�)r:r}r�r<r�rJrHr])r>r�rAr#r#r$r�Fsz)getPhases.<locals>.TextPhase.endTagScriptcSs&|jjj�|jj|j_dS)N)r:r}r�rJrHr])r>r�r#r#r$r�Msz(getPhases.<locals>.TextPhase.endTagOtherN)	r5r6r7rGr�r�r�r�r�r#)rbr#r$�	TextPhase0sr�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'S)(zgetPhases.<locals>.InTablePhasec
s��j|||�tjd|jfd|jfd|jfd|jfd|jfd|jfd|j	fd|j
fd|jfd|jfg
�|_
|j|j
_tjd|jfd|jfg�|_|j|j_dS)Nr>r3r5rr/r1r0r*r+r-r7r�r�rr�r:)�tbody�tfoot�thead)�td�th�tr)zstylezscript)zbodyzcaptionzcolzcolgroupzhtmlr�r�r�r�r�r�)rGrr�r`�startTagCaption�startTagColgroup�startTagCol�startTagRowGroup�startTagImplyTbodyrS�startTagStyleScriptrVrJr^r�r��endTagTable�endTagIgnorerar�)r>rJr:)rbr#r$rGSs$z(getPhases.<locals>.InTablePhase.__init__cSs4x-|jjdjdkr/|jjj�qWdS)Nrr7r>r{)ztablezhtml)r:r}r<r�)r>r#r#r$�clearStackToTableContextksz8getPhases.<locals>.InTablePhase.clearStackToTableContextcSsB|jjdjdkr,|jjd�n|jjs>t�dS)Nrr>zeof-in-tabler{)r:r}r<rJr~rOr�)r>r#r#r$r�tsz*getPhases.<locals>.InTablePhase.processEOFcSsH|jj}|jjd|j_||jj_|jjj|�dS)N�inTableText)rJr]rErHr�)r>r�rHr#r#r$r�{sz6getPhases.<locals>.InTablePhase.processSpaceCharacterscSsH|jj}|jjd|j_||jj_|jjj|�dS)Nr�)rJr]rErHr�)r>r�rHr#r#r$r��sz1getPhases.<locals>.InTablePhase.processCharacterscSs3d|j_|jjdj|�d|j_dS)NTr8F)r:�insertFromTablerJrEr�)r>r�r#r#r$r]�sz*getPhases.<locals>.InTablePhase.insertTextcSsG|j�|jjjt�|jj|�|jjd|j_dS)Nr2)	r�r:rwr�r
rGrJrEr])r>r�r#r#r$r��s
z/getPhases.<locals>.InTablePhase.startTagCaptioncSs4|j�|jj|�|jjd|j_dS)Nr4)r�r:rGrJrEr])r>r�r#r#r$r��s
z0getPhases.<locals>.InTablePhase.startTagColgroupcSs|jtdd��|S)Nr5rn)r�r�)r>r�r#r#r$r��sz+getPhases.<locals>.InTablePhase.startTagColcSs4|j�|jj|�|jjd|j_dS)Nr.)r�r:rGrJrEr])r>r�r#r#r$r��s
z0getPhases.<locals>.InTablePhase.startTagRowGroupcSs|jtdd��|S)Nr/rn)r�r�)r>r�r#r#r$r��sz2getPhases.<locals>.InTablePhase.startTagImplyTbodycSsN|jjdidd6dd6�|jjjtd��|jjsJ|SdS)Nz$unexpected-start-tag-implies-end-tagr7r�r�)rJr~r]r�r�rO)r>r�r#r#r$rS�s
z-getPhases.<locals>.InTablePhase.startTagTablecSs|jjdj|�S)Nr�)rJrEr�)r>r�r#r#r$r��sz3getPhases.<locals>.InTablePhase.startTagStyleScriptcSsqd|dkr`|ddjt�dkr`|jjd�|jj|�|jjj�n
|j|�dS)Nr,rsr�z unexpected-hidden-input-in-table)	rhrrJr~r:rGr}r�r�)r>r�r#r#r$rV�sz-getPhases.<locals>.InTablePhase.startTagInputcSs_|jjd�|jjdkr[|jj|�|jjd|j_|jjj�ndS)Nzunexpected-form-in-tablerr{)rJr~r:r�rGr}r�)r>r�r#r#r$rJ�s
z,getPhases.<locals>.InTablePhase.startTagFormcSsQ|jjdi|dd6�d|j_|jjdj|�d|j_dS)Nz)unexpected-start-tag-implies-table-voodoor<Tr8F)rJr~r:r�rEr�)r>r�r#r#r$r��sz-getPhases.<locals>.InTablePhase.startTagOthercSs�|jjddd�r�|jj�|jjdjdkro|jjdidd6|jjdjd6�nx-|jjd	jdkr�|jjj�qrW|jjj�|jj�n|jj	s�t
�|jj�dS)
Nr7r�rzend-tag-too-early-namedr�r�r{r{r{)r:r�r�r}r<rJr~r�r_rOr�)r>r�r#r#r$r��s

z+getPhases.<locals>.InTablePhase.endTagTablecSs"|jjdi|dd6�dS)Nzunexpected-end-tagr<)rJr~)r>r�r#r#r$r��sz,getPhases.<locals>.InTablePhase.endTagIgnorecSsQ|jjdi|dd6�d|j_|jjdj|�d|j_dS)Nz'unexpected-end-tag-implies-table-voodoor<Tr8F)rJr~r:r�rEr�)r>r�r#r#r$r��sz+getPhases.<locals>.InTablePhase.endTagOtherN)r5r6r7rGr�r�r�r�r]r�r�r�r�r�rSr�rVrJr�r�r�r�r#)rbr#r$�InTablePhaseQs&	
r�csveZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)z#getPhases.<locals>.InTableTextPhasecs)�j|||�d|_g|_dS)N)rGrH�characterTokens)r>rJr:)rbr#r$rG�s	z,getPhases.<locals>.InTableTextPhase.__init__cSs�djdd�|jD��}tdd�|D��rjitdd6|d6}|jjdj|�n|r�|jj|�ng|_dS)	NrgcSsg|]}|d�qS)rsr#)r;r�r#r#r$r?�s	zGgetPhases.<locals>.InTableTextPhase.flushCharacters.<locals>.<listcomp>cSsg|]}|tk�qSr#)r
)r;r�r#r#r$r?�s	rlr,rsr6)�joinr�r�rrJrEr]r:)r>rsr�r#r#r$�flushCharacters�sz3getPhases.<locals>.InTableTextPhase.flushCharacterscSs|j�|j|j_|S)N)r�rHrJr])r>r�r#r#r$r��s
z2getPhases.<locals>.InTableTextPhase.processCommentcSs|j�|j|j_dS)NT)r�rHrJr])r>r#r#r$r��s
z.getPhases.<locals>.InTableTextPhase.processEOFcSs(|ddkrdS|jj|�dS)Nrsr)r�r�)r>r�r#r#r$r��sz5getPhases.<locals>.InTableTextPhase.processCharacterscSs|jj|�dS)N)r�r�)r>r�r#r#r$r�sz:getPhases.<locals>.InTableTextPhase.processSpaceCharacterscSs|j�|j|j_|S)N)r�rHrJr])r>r�r#r#r$r�s
z3getPhases.<locals>.InTableTextPhase.processStartTagcSs|j�|j|j_|S)N)r�rHrJr])r>r�r#r#r$r�
s
z1getPhases.<locals>.InTableTextPhase.processEndTagN)r5r6r7rGr�r�r�r�r�r�r�r#)rbr#r$�InTableTextPhase�s	r�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�ZdS)z!getPhases.<locals>.InCaptionPhasec
s��j|||�tjd|jfd
|jfg�|_|j|j_tjd|jfd|j	fd|j
fg�|_|j|j_dS)Nr>r3rr5r/r*r1r+r0r-r7r:)	zcaption�col�colgroup�tbody�td�tfoot�th�thead�tr)
zbodyr�r�zhtmlr�r�r�r�r�r�)
rGrr�r`�startTagTableElementr^r�r��
endTagCaptionr�r�rar�)r>rJr:)rbr#r$rGsz*getPhases.<locals>.InCaptionPhase.__init__cSs|jjddd�S)Nr3r�r7)r:r�)r>r#r#r$�ignoreEndTagCaption#sz5getPhases.<locals>.InCaptionPhase.ignoreEndTagCaptioncSs|jjdj�dS)Nr8)rJrEr�)r>r#r#r$r�&sz,getPhases.<locals>.InCaptionPhase.processEOFcSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r�)sz3getPhases.<locals>.InCaptionPhase.processCharacterscSs@|jj�|j�}|jjjtd��|s<|SdS)Nr3)rJr~r�r]r�r�)r>r��ignoreEndTagr#r#r$r�,s

z6getPhases.<locals>.InCaptionPhase.startTagTableElementcSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r�4sz/getPhases.<locals>.InCaptionPhase.startTagOthercSs�|j�s�|jj�|jjdjdkrc|jjdidd6|jjdjd6�nx-|jjd	jdkr�|jjj�qfW|jjj�|jj�|jj	d|j_
n|jjs�t�|jj�dS)
Nrr3z$expected-one-end-tag-but-got-anotherr�r�r6r{r{r{)
r�r:r�r}r<rJr~r�r�rEr]rOr�)r>r�r#r#r$r�7s


z/getPhases.<locals>.InCaptionPhase.endTagCaptioncSs@|jj�|j�}|jjjtd��|s<|SdS)Nr3)rJr~r�r]r�r�)r>r�r�r#r#r$r�Is

z-getPhases.<locals>.InCaptionPhase.endTagTablecSs"|jjdi|dd6�dS)Nzunexpected-end-tagr<)rJr~)r>r�r#r#r$r�Psz.getPhases.<locals>.InCaptionPhase.endTagIgnorecSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r�Ssz-getPhases.<locals>.InCaptionPhase.endTagOtherN)
r5r6r7rGr�r�r�r�r�r�r�r�r�r#)rbr#r$�InCaptionPhasesr�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)z%getPhases.<locals>.InColumnGroupPhasecs��j|||�tjd|jfd|jfg�|_|j|j_tjd|jfd|j	fg�|_
|j|j
_dS)Nr>rr5)rGrr�r`r�r^r�r��endTagColgroup�	endTagColrar�)r>rJr:)rbr#r$rGYsz.getPhases.<locals>.InColumnGroupPhase.__init__cSs|jjdjdkS)Nrr>r{)r:r}r<)r>r#r#r$�ignoreEndTagColgrouphsz:getPhases.<locals>.InColumnGroupPhase.ignoreEndTagColgroupcSs\|jjdjdkr/|jjs+t�dS|j�}|jtd��|sXdSdS)Nrr>r5Tr{)	r:r}r<rJrOr�r�r�r�)r>r�r#r#r$r�ksz0getPhases.<locals>.InColumnGroupPhase.processEOFcSs-|j�}|jtd��|s)|SdS)Nr5)r�r�r�)r>r�r�r#r#r$r�usz7getPhases.<locals>.InColumnGroupPhase.processCharacterscSs$|jj|�|jjj�dS)N)r:rGr}r�)r>r�r#r#r$r�{sz1getPhases.<locals>.InColumnGroupPhase.startTagColcSs-|j�}|jtd��|s)|SdS)Nr5)r�r�r�)r>r�r�r#r#r$r�sz3getPhases.<locals>.InColumnGroupPhase.startTagOthercSsX|j�r.|jjst�|jj�n&|jjj�|jjd|j_	dS)Nr6)
r�rJrOr�r~r:r}r�rEr])r>r�r#r#r$r��s
z4getPhases.<locals>.InColumnGroupPhase.endTagColgroupcSs|jjdidd6�dS)Nz
no-end-tagrr<)rJr~)r>r�r#r#r$r��sz/getPhases.<locals>.InColumnGroupPhase.endTagColcSs-|j�}|jtd��|s)|SdS)Nr5)r�r�r�)r>r�r�r#r#r$r��sz1getPhases.<locals>.InColumnGroupPhase.endTagOtherN)r5r6r7rGr�r�r�r�r�r�r�r�r#)rbr#r$�InColumnGroupPhaseVs
	r�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)z#getPhases.<locals>.InTableBodyPhasecs��j|||�tjd|jfd|jfd
|jfd|jfg�|_|j|j_	tjd|j
fd|jfd|jfg�|_
|j|j
_	dS)Nr>r-r*r+r3rr5r/r1r0r7r:)�td�th)�caption�col�colgroup�tbody�tfoot�thead)r�r�r�)zbodyr�r�r�zhtmlr�r�ztr)rGrr�r`�
startTagTr�startTagTableCell�startTagTableOtherr^r�r��endTagTableRowGroupr�r�rar�)r>rJr:)rbr#r$rG�sz,getPhases.<locals>.InTableBodyPhase.__init__cSsbx-|jjdjdkr/|jjj�qW|jjdjdkr^|jjs^t�ndS)	Nrr/r1r0r>r{)ztbodyztfootztheadzhtmlr{)r:r}r<r�rJrOr�)r>r#r#r$�clearStackToTableBodyContext�s
	z@getPhases.<locals>.InTableBodyPhase.clearStackToTableBodyContextcSs|jjdj�dS)Nr6)rJrEr�)r>r#r#r$r��sz.getPhases.<locals>.InTableBodyPhase.processEOFcSs|jjdj|�S)Nr6)rJrEr�)r>r�r#r#r$r��sz:getPhases.<locals>.InTableBodyPhase.processSpaceCharacterscSs|jjdj|�S)Nr6)rJrEr�)r>r�r#r#r$r��sz5getPhases.<locals>.InTableBodyPhase.processCharacterscSs4|j�|jj|�|jjd|j_dS)Nr,)r�r:rGrJrEr])r>r�r#r#r$r��s
z.getPhases.<locals>.InTableBodyPhase.startTagTrcSs8|jjdi|dd6�|jtdd��|S)Nzunexpected-cell-in-table-bodyr<r-rn)rJr~r�r�)r>r�r#r#r$r��sz5getPhases.<locals>.InTableBodyPhase.startTagTableCellcSs�|jjddd�sH|jjddd�sH|jjddd�rv|j�|jt|jjdj��|S|jjs�t	�|jj
�dS)Nr/r�r7r0r1rr{)r:r�r�r�r�r}r<rJrOr�r~)r>r�r#r#r$r��s
z6getPhases.<locals>.InTableBodyPhase.startTagTableOthercSs|jjdj|�S)Nr6)rJrEr�)r>r�r#r#r$r��sz1getPhases.<locals>.InTableBodyPhase.startTagOthercSsq|jj|ddd�rO|j�|jjj�|jjd|j_n|jjdi|dd6�dS)Nr<r�r7r6z unexpected-end-tag-in-table-body)	r:r�r�r}r�rJrEr]r~)r>r�r#r#r$r��s
z7getPhases.<locals>.InTableBodyPhase.endTagTableRowGroupcSs�|jjddd�sH|jjddd�sH|jjddd�rv|j�|jt|jjdj��|S|jjs�t	�|jj
�dS)Nr/r�r7r0r1rr{)r:r�r�r�r�r}r<rJrOr�r~)r>r�r#r#r$r��s
z/getPhases.<locals>.InTableBodyPhase.endTagTablecSs"|jjdi|dd6�dS)Nz unexpected-end-tag-in-table-bodyr<)rJr~)r>r�r#r#r$r��sz0getPhases.<locals>.InTableBodyPhase.endTagIgnorecSs|jjdj|�S)Nr6)rJrEr�)r>r�r#r#r$r��sz/getPhases.<locals>.InTableBodyPhase.endTagOtherN)r5r6r7rGr�r�r�r�r�r�r�r�r�r�r�r�r#)rbr#r$�InTableBodyPhase�s
	
r�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)zgetPhases.<locals>.InRowPhasecs��j|||�tjd|jfd
|jfd|jfg�|_|j|j_tjd
|j	fd|j
fd|jfd|jfg�|_
|j|j
_dS)Nr>r*r+r3rr5r/r1r0r-r7r:)�td�th)�caption�col�colgroup�tbody�tfoot�theadztr)r�r�r�)zbodyr�r�r�zhtmlr�r�)rGrr�r`r�r�r^r�r��endTagTrr�r�r�rar�)r>rJr:)rbr#r$rG�sz&getPhases.<locals>.InRowPhase.__init__cSs[xT|jjdjdkrV|jjdi|jjdjd6�|jjj�qWdS)	Nrr-r>z'unexpected-implied-end-tag-in-table-rowr<r{)ztrzhtmlr{)r:r}r<rJr~r�)r>r#r#r$�clearStackToTableRowContextsz9getPhases.<locals>.InRowPhase.clearStackToTableRowContextcSs|jjddd�S)Nr-r�r7)r:r�)r>r#r#r$�ignoreEndTagTrsz,getPhases.<locals>.InRowPhase.ignoreEndTagTrcSs|jjdj�dS)Nr6)rJrEr�)r>r#r#r$r�sz(getPhases.<locals>.InRowPhase.processEOFcSs|jjdj|�S)Nr6)rJrEr�)r>r�r#r#r$r�sz4getPhases.<locals>.InRowPhase.processSpaceCharacterscSs|jjdj|�S)Nr6)rJrEr�)r>r�r#r#r$r�sz/getPhases.<locals>.InRowPhase.processCharacterscSsG|j�|jj|�|jjd|j_|jjjt�dS)Nr))	r�r:rGrJrEr]rwr�r
)r>r�r#r#r$r�"s
z/getPhases.<locals>.InRowPhase.startTagTableCellcSs-|j�}|jtd��|s)|SdS)Nr-)r�r�r�)r>r�r�r#r#r$r�(sz0getPhases.<locals>.InRowPhase.startTagTableOthercSs|jjdj|�S)Nr6)rJrEr�)r>r�r#r#r$r�/sz+getPhases.<locals>.InRowPhase.startTagOthercSsb|j�s?|j�|jjj�|jjd|j_n|jjsQt	�|jj
�dS)Nr.)r�r�r:r}r�rJrEr]rOr�r~)r>r�r#r#r$r�2s
z&getPhases.<locals>.InRowPhase.endTagTrcSs-|j�}|jtd��|s)|SdS)Nr-)r�r�r�)r>r�r�r#r#r$r�<sz)getPhases.<locals>.InRowPhase.endTagTablecSsD|jj|ddd�r3|jtd��|S|jj�dS)Nr<r�r7r-)r:r�r�r�rJr~)r>r�r#r#r$r�Dsz1getPhases.<locals>.InRowPhase.endTagTableRowGroupcSs"|jjdi|dd6�dS)Nzunexpected-end-tag-in-table-rowr<)rJr~)r>r�r#r#r$r�Ksz*getPhases.<locals>.InRowPhase.endTagIgnorecSs|jjdj|�S)Nr6)rJrEr�)r>r�r#r#r$r�Osz)getPhases.<locals>.InRowPhase.endTagOtherN)r5r6r7rGr�r�r�r�r�r�r�r�r�r�r�r�r�r#)rbr#r$�
InRowPhase�s
r�cs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�ZdS)zgetPhases.<locals>.InCellPhasecs��j|||�tjd|jfd
|jfg�|_|j|j_tjd|jfd|j	fd|j
fg�|_|j|j_dS)Nr>r3rr5r/r*r1r+r0r-r:r7)	�caption�col�colgroup�tbody�td�tfoot�th�thead�tr)r�r�)zbodyr�r�r�zhtml)ztabler�r�r�r�)
rGrr�r`r�r^r�r��endTagTableCellr��endTagImplyrar�)r>rJr:)rbr#r$rGTsz'getPhases.<locals>.InCellPhase.__init__cSs`|jjddd�r.|jtd��n.|jjddd�r\|jtd��ndS)Nr*r�r7r+)r:r�r�r�)r>r#r#r$�	closeCellesz(getPhases.<locals>.InCellPhase.closeCellcSs|jjdj�dS)Nr8)rJrEr�)r>r#r#r$r�lsz)getPhases.<locals>.InCellPhase.processEOFcSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r�osz0getPhases.<locals>.InCellPhase.processCharacterscSsa|jjddd�s0|jjddd�r>|j�|S|jjsPt�|jj�dS)Nr*r�r7r+)r:r�rrJrOr�r~)r>r�r#r#r$r�rs
z1getPhases.<locals>.InCellPhase.startTagTableOthercSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r�|sz,getPhases.<locals>.InCellPhase.startTagOthercSs�|jj|ddd�r�|jj|d�|jjdj|dkr�|jjdi|dd6�x@|jjj�}|j|dkrnPqnqnWn|jjj�|jj�|jj	d|j_
n|jjdi|dd6�dS)	Nr<r�r7rzunexpected-cell-end-tagr,zunexpected-end-tagr{)r:r�r�r}r<rJr~r�r�rEr])r>r�rAr#r#r$r�s
z.getPhases.<locals>.InCellPhase.endTagTableCellcSs"|jjdi|dd6�dS)Nzunexpected-end-tagr<)rJr~)r>r�r#r#r$r��sz+getPhases.<locals>.InCellPhase.endTagIgnorecSs;|jj|ddd�r*|j�|S|jj�dS)Nr<r�r7)r:r�rrJr~)r>r�r#r#r$r�s
z*getPhases.<locals>.InCellPhase.endTagImplycSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r��sz*getPhases.<locals>.InCellPhase.endTagOtherN)
r5r6r7rGrr�r�r�r�r�r�rr�r#)rbr#r$�InCellPhaseRs
rcs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)z getPhases.<locals>.InSelectPhasecs��j|||�tjd|jfd|jfd|jfd|jfd	|jfd|jfg�|_	|j
|j	_tjd|jfd|j
fd|jfg�|_|j|j_dS)
Nr>rrr(rr
rr�)zinputzkeygenztextarea)rGrr�r`�startTagOption�startTagOptgroupr]rVr�r^r�r��endTagOption�endTagOptgroup�endTagSelectrar�)r>rJr:)rbr#r$rG�sz)getPhases.<locals>.InSelectPhase.__init__cSsB|jjdjdkr,|jjd�n|jjs>t�dS)Nrr>z
eof-in-selectr{)r:r}r<rJr~rOr�)r>r#r#r$r��sz+getPhases.<locals>.InSelectPhase.processEOFcSs,|ddkrdS|jj|d�dS)Nrsr)r:r])r>r�r#r#r$r��sz2getPhases.<locals>.InSelectPhase.processCharacterscSs@|jjdjdkr,|jjj�n|jj|�dS)Nrrr{)r:r}r<r�rG)r>r�r#r#r$r�sz/getPhases.<locals>.InSelectPhase.startTagOptioncSsl|jjdjdkr,|jjj�n|jjdjdkrX|jjj�n|jj|�dS)Nrrrr{r{)r:r}r<r�rG)r>r�r#r#r$r�s
z1getPhases.<locals>.InSelectPhase.startTagOptgroupcSs'|jjd�|jtd��dS)Nzunexpected-select-in-selectr()rJr~rr�)r>r�r#r#r$r]�sz/getPhases.<locals>.InSelectPhase.startTagSelectcSsU|jjd�|jjddd�r?|jtd��|S|jjsQt�dS)Nzunexpected-input-in-selectr(r�)rJr~r:r�rr�rOr�)r>r�r#r#r$rV�s
z.getPhases.<locals>.InSelectPhase.startTagInputcSs|jjdj|�S)Nr�)rJrEr�)r>r�r#r#r$r��sz/getPhases.<locals>.InSelectPhase.startTagScriptcSs"|jjdi|dd6�dS)Nzunexpected-start-tag-in-selectr<)rJr~)r>r�r#r#r$r��sz.getPhases.<locals>.InSelectPhase.startTagOthercSsJ|jjdjdkr,|jjj�n|jjdidd6�dS)Nrrzunexpected-end-tag-in-selectr<r{)r:r}r<r�rJr~)r>r�r#r#r$r�sz-getPhases.<locals>.InSelectPhase.endTagOptioncSs�|jjdjdkrE|jjdjdkrE|jjj�n|jjd	jdkrq|jjj�n|jjdidd6�dS)
Nrrr�rzunexpected-end-tag-in-selectr<r{���r{)r:r}r<r�rJr~)r>r�r#r#r$r�sz/getPhases.<locals>.InSelectPhase.endTagOptgroupcSs�|jjddd�rb|jjj�}x%|jdkrQ|jjj�}q-W|jj�n|jjstt�|jj	�dS)Nr(r�)
r:r�r}r�r<rJr_rOr�r~)r>r�rAr#r#r$r�sz-getPhases.<locals>.InSelectPhase.endTagSelectcSs"|jjdi|dd6�dS)Nzunexpected-end-tag-in-selectr<)rJr~)r>r�r#r#r$r��sz,getPhases.<locals>.InSelectPhase.endTagOtherN)r5r6r7rGr�r�rrr]rVr�r�rrrr�r#)rbr#r$�
InSelectPhase�s
r	csjeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)z'getPhases.<locals>.InSelectInTablePhasec	sq�j|||�tjd	|jfg�|_|j|j_tjd
|jfg�|_|j	|j_dS)Nr3r7r/r1r0r-r*r+)�caption�table�tbody�tfoot�thead�tr�td�th)r
rrr
rrrr)
rGrr�rSr^r�r�r�rar�)r>rJr:)rbr#r$rG	sz0getPhases.<locals>.InSelectInTablePhase.__init__cSs|jjdj�dS)Nr')rJrEr�)r>r#r#r$r�	sz2getPhases.<locals>.InSelectInTablePhase.processEOFcSs|jjdj|�S)Nr')rJrEr�)r>r�r#r#r$r�	sz9getPhases.<locals>.InSelectInTablePhase.processCharacterscSs5|jjdi|dd6�|jtd��|S)Nz5unexpected-table-element-start-tag-in-select-in-tabler<r()rJr~r�r�)r>r�r#r#r$rS	sz5getPhases.<locals>.InSelectInTablePhase.startTagTablecSs|jjdj|�S)Nr')rJrEr�)r>r�r#r#r$r�	sz5getPhases.<locals>.InSelectInTablePhase.startTagOthercSsU|jjdi|dd6�|jj|ddd�rQ|jtd��|SdS)Nz3unexpected-table-element-end-tag-in-select-in-tabler<r�r7r()rJr~r:r�r�r�)r>r�r#r#r$r� 	sz3getPhases.<locals>.InSelectInTablePhase.endTagTablecSs|jjdj|�S)Nr')rJrEr�)r>r�r#r#r$r�&	sz3getPhases.<locals>.InSelectInTablePhase.endTagOtherN)
r5r6r7rGr�r�rSr�r�r�r#)rbr#r$�InSelectInTablePhase	src-s�eZdZeddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,g,�Z�fd-d.�Zd/d0�Z�fd1d2�Zd3d4�Zd5d6�Z	d7S)8z(getPhases.<locals>.InForeignContentPhaser�r�r�r:r�r�r�r�r%r�r�r�r�h1�h2�h3�h4�h5�h6r9rr�r	r�r�r�r.rr�r"r�r�r�r��spanr�r��sub�supr7r�rr��varcs�j|||�dS)N)rG)r>rJr:)rbr#r$rG3	sz1getPhases.<locals>.InForeignContentPhase.__init__cSs+i$dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6}|dI|kr'||dI|dI<ndS)JN�altGlyph�altglyph�altGlyphDef�altglyphdef�altGlyphItem�altglyphitem�animateColor�animatecolor�
animateMotion�
animatemotion�animateTransform�animatetransform�clipPath�clippath�feBlend�feblend�
feColorMatrix�
fecolormatrix�feComponentTransfer�fecomponenttransfer�feComposite�fecomposite�feConvolveMatrix�feconvolvematrix�feDiffuseLighting�fediffuselighting�feDisplacementMap�fedisplacementmap�feDistantLight�fedistantlight�feFlood�feflood�feFuncA�fefunca�feFuncB�fefuncb�feFuncG�fefuncg�feFuncR�fefuncr�feGaussianBlur�fegaussianblur�feImage�feimage�feMerge�femerge�feMergeNode�femergenode�feMorphology�femorphology�feOffset�feoffset�fePointLight�fepointlight�feSpecularLighting�fespecularlighting�feSpotLight�fespotlight�feTile�fetile�feTurbulence�feturbulence�
foreignObject�
foreignobjectr�r��linearGradient�lineargradient�radialGradient�radialgradient�textPath�textpathr<r#)r>r�r�r#r#r$�adjustSVGTagNames6	sL

z:getPhases.<locals>.InForeignContentPhase.adjustSVGTagNamescsi|ddkrd|d<n8|jjrUtdd�|dD��rUd|j_n�j||�dS)Nrsru�css|]}|tkVqdS)N)r
)r;r�r#r#r$rOc	szMgetPhases.<locals>.InForeignContentPhase.processCharacters.<locals>.<genexpr>F)rJrbr�r�)r>r�)rbr#r$r�_	s
z:getPhases.<locals>.InForeignContentPhase.processCharacterscSs�|jjd}|d|jks\|ddkr�t|dj��tdddg�@r�|jjdi|dd6�xm|jjdj|jjkr�|jj	|jjd�r�|jj
|jjd�r�|jjj�q}W|S|jtd	kr|jj
|�n3|jtd
krG|j|�|jj|�n|jj|�|j|d<|jj|�|dr�|jjj�d
|d<ndS)Nrr<r�rs�color�face�sizez*unexpected-html-element-in-foreign-contentrcrwrfryTrzr{r{r{r{)r:r}�breakoutElements�setr rJr~rfr�rjrkr�rr�rcr#rrG)r>r�r�r#r#r$r�g	s.)


z8getPhases.<locals>.InForeignContentPhase.processStartTagcSsKt|jj�d}|jjd}|j|dkrZ|jjdi|dd6�nx�|jjt�|dkr�|jj|jj	dkr�|jjj
�|jjj|j_nx.|jjj�|kr�|jjs�t
�q�Wd}Pn|d8}|jj|}|j|jjkr-q]q]|jjj|�}Pq]W|S)Nrr<zunexpected-end-tagr�r{)r�r:r}r<rJr~rhrr]rEr�rHr�r�rfr�r�)r>r��	nodeIndexrAr�r#r#r$r��	s(!
z6getPhases.<locals>.InForeignContentPhase.processEndTagN)
r5r6r7r�rgrGrcr�r�r�r#)rbr#r$�InForeignContentPhase)	s)rjcsveZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)z!getPhases.<locals>.AfterBodyPhasecsq�j|||�tjd|jfg�|_|j|j_tjd|jfg�|_|j	|j_dS)Nr>)
rGrr�r`r^r�r�rdrar�)r>rJr:)rbr#r$rG�	sz*getPhases.<locals>.AfterBodyPhase.__init__cSsdS)Nr#)r>r#r#r$r��	sz,getPhases.<locals>.AfterBodyPhase.processEOFcSs!|jj||jjd�dS)Nr)r:r\r})r>r�r#r#r$r��	sz0getPhases.<locals>.AfterBodyPhase.processCommentcSs*|jjd�|jjd|j_|S)Nzunexpected-char-after-bodyr8)rJr~rEr])r>r�r#r#r$r��	sz3getPhases.<locals>.AfterBodyPhase.processCharacterscSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r`�	sz.getPhases.<locals>.AfterBodyPhase.startTagHtmlcSs8|jjdi|dd6�|jjd|j_|S)Nzunexpected-start-tag-after-bodyr<r8)rJr~rEr])r>r�r#r#r$r��	sz/getPhases.<locals>.AfterBodyPhase.startTagOthercSs9|jjr|jjd�n|jjd|j_dS)Nz'unexpected-end-tag-after-body-innerhtml�afterAfterBody)rJrOr~rEr])r>r<r#r#r$rd�	sz,getPhases.<locals>.AfterBodyPhase.endTagHtmlcSs8|jjdi|dd6�|jjd|j_|S)Nzunexpected-end-tag-after-bodyr<r8)rJr~rEr])r>r�r#r#r$r��	sz-getPhases.<locals>.AfterBodyPhase.endTagOtherN)r5r6r7rGr�r�r�r`r�rdr�r#)rbr#r$�AfterBodyPhase�	srlcs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)z"getPhases.<locals>.InFramesetPhasecs��j|||�tjd|jfd|jfd|jfd|jfg�|_|j|j_	tjd|j
fg�|_|j|j_	dS)Nr>r<rr�)
rGrr�r`r��
startTagFrame�startTagNoframesr^r�r��endTagFramesetrar�)r>rJr:)rbr#r$rG�	sz+getPhases.<locals>.InFramesetPhase.__init__cSsB|jjdjdkr,|jjd�n|jjs>t�dS)Nrr>zeof-in-framesetr{)r:r}r<rJr~rOr�)r>r#r#r$r��	sz-getPhases.<locals>.InFramesetPhase.processEOFcSs|jjd�dS)Nzunexpected-char-in-frameset)rJr~)r>r�r#r#r$r��	sz4getPhases.<locals>.InFramesetPhase.processCharacterscSs|jj|�dS)N)r:rG)r>r�r#r#r$r��	sz3getPhases.<locals>.InFramesetPhase.startTagFramesetcSs$|jj|�|jjj�dS)N)r:rGr}r�)r>r�r#r#r$rm�	sz0getPhases.<locals>.InFramesetPhase.startTagFramecSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$rn�	sz3getPhases.<locals>.InFramesetPhase.startTagNoframescSs"|jjdi|dd6�dS)Nz unexpected-start-tag-in-framesetr<)rJr~)r>r�r#r#r$r��	sz0getPhases.<locals>.InFramesetPhase.startTagOthercSs|jjdjdkr,|jjd�n|jjj�|jjr{|jjdjdkr{|jjd|j_ndS)Nrr>z)unexpected-frameset-in-frameset-innerhtmlr<�
afterFramesetr{r{)	r:r}r<rJr~r�rOrEr])r>r�r#r#r$ro�	s
z1getPhases.<locals>.InFramesetPhase.endTagFramesetcSs"|jjdi|dd6�dS)Nzunexpected-end-tag-in-framesetr<)rJr~)r>r�r#r#r$r�
sz.getPhases.<locals>.InFramesetPhase.endTagOtherN)r5r6r7rGr�r�r�rmrnr�ror�r#)rbr#r$�InFramesetPhase�	srqcsjeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)z%getPhases.<locals>.AfterFramesetPhasecs}�j|||�tjd|jfd|jfg�|_|j|j_tjd|jfg�|_	|j
|j	_dS)Nr>r�)rGrr�r`rnr^r�r�rdrar�)r>rJr:)rbr#r$rG
sz.getPhases.<locals>.AfterFramesetPhase.__init__cSsdS)Nr#)r>r#r#r$r�
sz0getPhases.<locals>.AfterFramesetPhase.processEOFcSs|jjd�dS)Nzunexpected-char-after-frameset)rJr~)r>r�r#r#r$r�
sz7getPhases.<locals>.AfterFramesetPhase.processCharacterscSs|jjdj|�S)Nr�)rJrEr�)r>r�r#r#r$rn
sz6getPhases.<locals>.AfterFramesetPhase.startTagNoframescSs"|jjdi|dd6�dS)Nz#unexpected-start-tag-after-framesetr<)rJr~)r>r�r#r#r$r�
sz3getPhases.<locals>.AfterFramesetPhase.startTagOthercSs|jjd|j_dS)N�afterAfterFrameset)rJrEr])r>r�r#r#r$rd"
sz0getPhases.<locals>.AfterFramesetPhase.endTagHtmlcSs"|jjdi|dd6�dS)Nz!unexpected-end-tag-after-framesetr<)rJr~)r>r�r#r#r$r�%
sz1getPhases.<locals>.AfterFramesetPhase.endTagOtherN)
r5r6r7rGr�r�rnr�rdr�r#)rbr#r$�AfterFramesetPhase
srscsveZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)z&getPhases.<locals>.AfterAfterBodyPhasecsD�j|||�tjd|jfg�|_|j|j_dS)Nr>)rGrr�r`r^r�r�)r>rJr:)rbr#r$rG*
sz/getPhases.<locals>.AfterAfterBodyPhase.__init__cSsdS)Nr#)r>r#r#r$r�2
sz1getPhases.<locals>.AfterAfterBodyPhase.processEOFcSs|jj||jj�dS)N)r:r\rc)r>r�r#r#r$r�5
sz5getPhases.<locals>.AfterAfterBodyPhase.processCommentcSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r�8
sz=getPhases.<locals>.AfterAfterBodyPhase.processSpaceCharacterscSs*|jjd�|jjd|j_|S)Nzexpected-eof-but-got-charr8)rJr~rEr])r>r�r#r#r$r�;
sz8getPhases.<locals>.AfterAfterBodyPhase.processCharacterscSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r`@
sz3getPhases.<locals>.AfterAfterBodyPhase.startTagHtmlcSs8|jjdi|dd6�|jjd|j_|S)Nzexpected-eof-but-got-start-tagr<r8)rJr~rEr])r>r�r#r#r$r�C
sz4getPhases.<locals>.AfterAfterBodyPhase.startTagOthercSs8|jjdi|dd6�|jjd|j_|S)Nzexpected-eof-but-got-end-tagr<r8)rJr~rEr])r>r�r#r#r$r�I
sz4getPhases.<locals>.AfterAfterBodyPhase.processEndTagN)r5r6r7rGr�r�r�r�r`r�r�r#)rbr#r$�AfterAfterBodyPhase)
srtcs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)z*getPhases.<locals>.AfterAfterFramesetPhasecsP�j|||�tjd|jfd|jfg�|_|j|j_dS)Nr>r�)rGrr�r`�startTagNoFramesr^r�r�)r>rJr:)rbr#r$rGP
s
z3getPhases.<locals>.AfterAfterFramesetPhase.__init__cSsdS)Nr#)r>r#r#r$r�Y
sz5getPhases.<locals>.AfterAfterFramesetPhase.processEOFcSs|jj||jj�dS)N)r:r\rc)r>r�r#r#r$r�\
sz9getPhases.<locals>.AfterAfterFramesetPhase.processCommentcSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r�_
szAgetPhases.<locals>.AfterAfterFramesetPhase.processSpaceCharacterscSs|jjd�dS)Nzexpected-eof-but-got-char)rJr~)r>r�r#r#r$r�b
sz<getPhases.<locals>.AfterAfterFramesetPhase.processCharacterscSs|jjdj|�S)Nr8)rJrEr�)r>r�r#r#r$r`e
sz7getPhases.<locals>.AfterAfterFramesetPhase.startTagHtmlcSs|jjdj|�S)Nr�)rJrEr�)r>r�r#r#r$ruh
sz;getPhases.<locals>.AfterAfterFramesetPhase.startTagNoFramescSs"|jjdi|dd6�dS)Nzexpected-eof-but-got-start-tagr<)rJr~)r>r�r#r#r$r�k
sz8getPhases.<locals>.AfterAfterFramesetPhase.startTagOthercSs"|jjdi|dd6�dS)Nzexpected-eof-but-got-end-tagr<)rJr~)r>r�r#r#r$r�o
sz8getPhases.<locals>.AfterAfterFramesetPhase.processEndTagN)r5r6r7rGr�r�r�r�r`rur�r�r#)rbr#r$�AfterAfterFramesetPhaseO
s	rvrTrSr=r�r�r8rFr6r�r2r4r.r,r)r'r�rxr�r;rprkrr)r)rFrVrZr�r�r�r�r�r�r�r�r�r�r�r�r�rr	rrjrlrqrsrtrvr#)rbr$rD�sd%)�#.cC���!�-GAbYLd's/9%&$rDroFcCs9|dkri}nit|d6|d6|d6|d6S)Nr,r<rsry)r)r<r,rgryr#r#r$r��
s	r�c@seZdZdZdS)rrzError in parsed documentN)r5r6r7rKr#r#r#r$rr�
srr)%�
__future__rrrZpip._vendor.sixrr*rgrrr	Ztreebuilders._baser
rrr
rrrrrrrrrrrr$rr'r9rrrDr��	Exceptionrrr#r#r#r$�<module>sD	�i���������python3.4/site-packages/pip/_vendor/html5lib/__pycache__/constants.cpython-34.pyc000064400000227334151735047530023673 0ustar00�
�Re2U�P@s�TddlmZmZmZddlZddlZejZdZied�d6ed�d6ed�d6ed	�d
6ed�d6ed
�d6ed�d6ed�d6ed�d6ed�d6ed�d6ed�d6ed�d6ed�d6ed�d 6ed!�d"6ed#�d$6ed%�d&6ed'�d(6ed)�d*6ed+�d,6ed-�d.6ed/�d06ed1�d26ed3�d46ed5�d66ed7�d86ed9�d:6ed;�d<6ed=�d>6ed?�d@6edA�dB6edC�dD6edE�dF6edG�dH6edI�dJ6edK�dL6edM�dN6edO�dP6edQ�dR6edS�dT6edU�dV6edW�dX6edY�dZ6ed[�d\6edU�d]6edU�d^6ed_�d`6eda�db6edc�dd6ede�df6edg�dh6edi�dj6edk�dl6edm�dn6edo�dp6edq�dr6eds�dt6edu�dv6edw�dx6edy�dz6ed{�d|6ed}�d~6ed�d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6ed��d�6Zid�d6dd6dd6dd6dd6d	d
6Z	e
e	ddfe	ddfe	ddfe	dd
fe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddff�Ze
e	ddfe	ddfe	ddfe	ddfe	ddfe	dd fe	dd!fe	dd"fe	dd#fe	dd$fe	dd%fe	dd&fe	dd'fe	dd(ff�Ze
e	dd)fe	ddfe	dd*fe	dd+fe	dd,fe	dd-fe	dd.fe	dd/fe	dd0fe	dd1fe	dd2fe	dd3fe	ddfe	dd4fe	dd5fe	dd6fe	dd7fe	dd8fe	dd9fe	dd:fe	dd;fe	dd<fe	dd=fe	dd>fe	dd?fe	dd@fe	ddAfe	ddBfe	ddCfe	ddDfe	ddEfe	ddFfe	ddGfe	ddHfe	ddIfe	ddJfe	ddKfe	ddLfe	ddMfe	ddfe	ddNfe	ddOfe	ddPfe	ddQfe	ddRfe	ddSfe	ddTfe	ddUfe	dd
fe	ddVfe	ddWfe	ddXfe	ddYfe	ddZfe	dd[fe	ddfe	dd\fe	dd]fe	dd^fe	dd_fe	dd`fe	ddafe	ddbfe	ddcfe	dddfe	ddfe	ddefe	ddfe	ddffe	ddgfe	ddfe	ddhfe	ddfe	ddife	ddjfe	ddkfe	ddlfe	ddffN�Z
e
e	ddmfe	ddfe	ddfe	ddff�Ze
e	ddfe	ddfe	ddfe	ddfe	ddff�Ziddne	dfdo6ddpe	dfdq6ddre	dfds6ddte	dfdu6ddve	dfdw6dde	dfdx6ddye	dfdz6dd-e	dfd{6dd|e	dfd}6dd~e	dfd6dd
e	d
fd
6d
de	d
fd�6Zed�d��ej�D��Ze
d��Ze
d��Ze
ej�Ze
ej�Ze
ej�Ze
ej�Ze
ej�Zed�d��ejD��Zd�Z e
d��Z!e
d��Z"e
d��Z#ie
d��d�6e
d��dd6e
d��dP6e
d��d�6e
d��d�6e
d��da6e
d��d96e
d��d�6e
d��d76e
d��dM6e
d��dV6e
d��d?6e
d��d�6e
d��d�6e
d��d36e
d��dQ6e
d��dc6e
d��d�6Z$d�Z%e
d��Z&i�d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6dd6dd6dd6dd6d�d	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6dd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6ddQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d?d�6dzd�6d�d�6d�d�6d�d�6d^d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d3d96d:d;6d
d<6d=d>6d?d@6dAdB6dCdD6dEdF6dEdG6dHdI6dHdJ6dKdL6dMdN6dOdP6dQdR6dQdS6dOdT6dUdV6dWdX6d�dY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6dpdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6d'd"6dd#6d�d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d1d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d9d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6d�d6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6d�dG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6d�dh6d�di6ddj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dkd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6d�d6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dLdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dde6dfdg6dhdi6djdk6dldm6dndo6dndp6dqdr6dsdt6dudv6dwdx6dydz6dyd{6djd|6djd}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dOd�6d�d�6d�d�6d�d�6d�d�6dGd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6dd6d^d6d	d
6d�d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6d6d6dd6d d!6d�d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d�d=6d�d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6d7ds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d
d�6d�d�6d=d�6d=d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d+d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d$d�6d$d�6d�d�6d�d�6d�d�6d&d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6d�d6d�d6dd6d	d
6dd6dod
6dd6dCd6d�d6dd6dAd6dd6dEd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6d/dI6d1dJ6dKdL6dMdN6dOdP6dOdQ6d3dR6dEdS6dKdT6dMdU6d3dV6dWdX6dYdZ6d�d[6d\d]6d^d_6d`da6d�db6dcdd6d�de6dfdg6dndh6didj6dkdl6dvdm6dZdn6dodp6dqdr6dsdt6dsdu6dvdw6dxdy6dzd{6d|d}6d�d~6d)d6dtd�6dtd�6d�d�6d�d�6dzd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dld�6d~d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dod�6d�d�6d)d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d%d�6d�d�6dd�6d�d�6d�d�6d�d�6dqd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d	d	6d	d	6d	d	6d	d	6d	d		6d
	d	6d
	d	6d
	d	6d�d	6d�d	6d�d	6d�d	6d�d	6d	d	6d	d	6d=d	6d	d	6d	d	6d	d	6d	d 	6d!	d"	6d~d#	6d�d$	6d%	d&	6d'	d(	6d'	d)	6d*	d+	6d*	d,	6d-	d.	6d/	d0	6d�d1	6d�d2	6d�d3	6d�d4	6d5	d6	6d7	d8	6d9	d:	6d;	d<	6d=	d>	6d?	d@	6dA	dB	6dC	dD	6dE	dF	6dG	dH	6dI	dJ	6dK	dL	6dM	dN	6d�dO	6dP	dQ	6dR	dS	6dT	dU	6dV	dW	6dV	dX	6dY	dZ	6d[	d\	6d[	d]	6d^	d_	6d`	da	6db	dc	6dd	de	6df	dg	6dh	di	6dh	dj	6dk	dl	6dm	dn	6do	dp	6dq	dr	6ds	dt	6du	dv	6dw	dx	6dy	dz	6d{	d|	6dd}	6d~	d	6d�	d�	6d�	d�	6d�d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6dd�	6dd�	6dd�	6dd�	6d!d�	6d!d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d'd�	6dd�	6d�	d�	6d�	d�	6dd�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6dpd�	6d�	d�	6d#d�	6d�	d�	6d�	d�	6dd�	6dd�6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6dd�	6d~	d�	6dd�	6d#d�	6d�	d�	6d�	d�	6d�d�	6d*d�	6dV	d�	6d3d�	6d�	d�	6d�d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d�	6d�	d
6d
d
6d
d
6d�	d
6d
d
6d
d	
6dcd

6d
d
6d
d
6d`d
6d
d
6d
d
6d
d
6d
d
6d
d
6d
d
6d�d
6d
d
6d
d
6d
d
6dWd
6d 
d!
6d"
d#
6d$
d%
6d&
d'
6d(
d)
6d*
d+
6dOd,
6djd-
6dOd.
6d/
d0
6d1
d2
6d3
d4
6d�d5
6d6
d7
6d8
d9
6d:
d;
6d/
d<
6d\d=
6d>
d?
6djd@
6d>
dA
6dB
dC
6dD
dE
6dF
dG
6dH
dI
6dJ
dK
6dL
dM
6dD
dN
6dO
dP
6dO
dQ
6dR
dS
6d�dT
6dU
dV
6dW
dX
6dY
dZ
6d[
d\
6d�d]
6dbd^
6d_
d`
6da
db
6dc
dd
6dc
de
6df
dg
6dh
di
6dj
dk
6dl
dm
6dn
do
6dp
dq
6dr
ds
6dt
du
6dv
dw
6dx
dy
6dz
d{
6d|
d}
6d~
d
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�d�
6d�
d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d�
d�
6d�	d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d�d�
6d�d�
6dd�
6d�	d�
6d�
d�
6d�d�
6d�
d�
6d�d�
6d�d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6d�
d�
6d�d6d�d6dd6d�d6dd6d�d6dd	6d�d
6d�d6dd
6dd6dd6dd6d�
d6d�d6dd6dd6dd6dd6dd6dd6d d!6d d"6d#d$6d#d%6dd&6d'd(6d)d*6d+d,6d�d-6d�d.6d�d/6d0d16d�d26d�
d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d�d@6dAdB6dAdC6d dD6dEdF6dGdH6d�dI6d�dJ6ddK6dLdM6dNdO6dPdQ6dRdS6dTdU6d�dV6d�dW6dXdY6dZd[6d�
d\6d�d]6d^d_6d`da6d�db6d�d�6dcdd6dedf6d�
dg6d�
dh6didj6dkdl6dmdn6dodp6dqdr6d�ds6d'dt6dudv6dwdx6dydz6dyd{6d|d}6d~d6d~d�6d�d�6d�d�6d�d�6d1d�6d1d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d"d�6d�d�6d�d�6d&d�6d&d�6d�d�6d|d�6d�d�6d�d�6d�d�6d�	d�6dd�6d�d�6d�d�6dd�6d�d�6dsd�6d�d�6d�d�6d�d�6d�d�6d�d�6dCd�6d�d�6d�d�6d�d�6d�d�6d[d�6d�d�6d�d�6d�d�6ddd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d+d�6d)d�6d)d�6dKd�6dMd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d7d�6d�d�6d�d�6dd�6dd�6d�d�6d/d�6d�d�6d9d�6d;d�6d;d�6d�d6dAd6d?d6d?d6dAd6dGd6dGd6dId6d=d6d=d	6d�d
6dd6d
d6dd6dd6dd6dd6dd6d�d6dd6dd6dd6dWd6dd6dd 6dWd!6dd"6d]d#6d]d$6dUd%6d_d&6dUd'6dOd(6dSd)6d�d*6d+d,6d-d.6d-d/6d5d06d1d26d3d46d5d56d6d76d8d96dkd:6dkd;6d<d=6d>d?6d3d@6d3dA6dBdC6dDdE6dFdG6dedH6didI6dgdJ6dedK6dgdL6d�dM6dNdO6dPdQ6dRdS6dNdT6dmdU6dqdV6ddW6d�dX6d�dY6dZd[6d�d\6d3d]6d�d^6d�d_6d�d`6d�da6d3db6dudc6dydd6dedf6dgdh6d}di6d{dj6d}dk6dgdl6ddm6d�dn6dodp6dqdr6d�ds6d�dt6d�du6dqdv6dEdw6dxdy6dxdz6dYd{6dOd|6dSd}6dmd~6dqd6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d+d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dAd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d-d�6d�d�6d�d�6d�d�6d/d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d
6d�d
6d
d
6d
d
6d
d
6d1d
6d
d	
6d

d
6d

d
6d

d
6d�d
6d
d
6d
d
6d�d
6d
d
6d
d
6d�d
6d
d
6d
d
6d
d
6d
d 
6d�d!
6d"
d#
6d$
d%
6d&
d'
6d(
d)
6dd*
6d+
d,
6d-
d.
6dP	d/
6d0
d1
6d�	d2
6d3
d4
6d�	d5
6d6
d7
6d8
d9
6d~d:
6d;
d<
6d�d=
6d>
d?
6d@
dA
6d�dB
6d�dC
6dD
dE
6dF
dG
6d�dH
6dI
dJ
6dK
dL
6dM
dN
6dM
dO
6d�dP
6dQ
dR
6dS
dT
6d�dU
6d�dV
6d�dW
6dS
dX
6d�dY
6d�dZ
6d[
d\
6d]
d^
6d_
d`
6d�da
6db
dc
6d�dd
6d]
de
6d[
df
6d_
dg
6d�dh
6di
dj
6dk
dl
6dm
dn
6d�do
6d�dp
6d�dq
6dr
ds
6dt
du
6dv
dw
6dx
dy
6dz
d{
6d 
d|
6d}
d~
6d
d�
6d�
d�
6d5d�
6d�
d�
6d�
d�
6d	d�
6d�d�
6d�d�6dLd�
6d�d�
6d�
d�
6dfd�
6d�
d�
6d�
d�
6d�
d�
6dsd�
6d�
d�
6dd�
6d�
d�
6d�
d�
6dd�
6d�
d�
6d�
d�
6dd�
6d�
d�
6dd�
6d�
d�
6d�
d�
6d�
d�
6d�	d�
6d4d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�d�
6dd�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d#d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d5d�
6d5d�
6d�
d�
6dd�
6dNd�
6dd�
6dHd�
6d�
d�
6d�d�
6d�d�
6d�
d�
6d-d�
6d�
d�
6d�d�
6dCd�
6d�
d�
6d�
d�
6d�
d�
6dd�
6d�
d�
6d�d�
6dCd�
6d!d�
6d�d�
6d�
d�
6d�
d�
6d�
d�
6d�
d�
6d	d�
6d!d�
6d�d�
6d�
d�
6d�
d�
6d�
d6dd6dd6dd6d%d6dd	6d
d6dd
6dd6dd6dd6dd6d�
d6dd6dd6dPd6d�
d6d7d6d7d6d�
d6d d!6d"d#6d9d$6d)d%6d&d'6d(d)6d*d+6d,d-6d^d.6d�d/6d0d16d2d36d4d56d�d66d�d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6d�dD6dEdF6dGdH6d�dI6dJdK6dLdM6d�	dN6d�dO6d�dP6dQdR6dQdS6dTdU6dVdW6d�dX6d�dY6dZd[6d\d]6dy	d^6d_d`6dadb6dcdd6d"de6d�df6dgdh6dgdi6djdk6dldm6dldn6d�do6dpdq6d�dr6d�ds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d"d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dwd�6d�d�6d�d�6d�d�6dyd�6d{d�6dyd�6d{d�6d}d�6dd�6d}d�6dd�6dud�6dud�6d�d�6d�d�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6dd�6d
	d�6d(
d�6d~d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d2d�6d�d�6d�d�6d>d�6d<d�6d@d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6dd6dd6dd6d�d6d�d6d�d	6dd
6dd6dd
6dd6dd6dd6d�	d6d�d6d�d6dd6dd6dd6dd6dd6d�d 6d!d"6d#d$6d%d&6d�d'6d(d)6d*d+6d�d,6d�d-6d.d/6d0d16d0d26d�d36d�d46d�d56d�d66d�d76d8d96d8d:6drd;6d<d=6d<d>6d�d?6d@dA6dBdC6d"
dD6d�dE6d�dF6dGdH6dIdJ6dKdL6dMdN6dVdO6dPdQ6d�dR6dSdT6d�dU6dqdV6d�dW6dXdY6d"dZ6d9d[6d\d]6dXd^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6ddq6d�dr6dds6d�dt6dudv6dwdx6dwdy6dkdz6d{d|6d}d~6dd�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d?d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dzd�6dzd�6d�d�6d�d�6dkd�6d�d�6d�d�6d?d�6d�d�6d�d�6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dSd�6d#d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d
	d�6dx
d�6d�d�6d(
d�6d0
d�6d�d�6d�d�6d�
d�6dld�6d�d�6d�d�6d�d�6d�d�6d0d�6d�d�6d5d�6d�d�6d/d�6d�d�6d�d�6d�d�6d�d�6d$d�6d$d�6d�d�6d�d�6d{d�6d�d�6d�d�6d�d�6d5d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6d�d6dd6dd6dd6dd	6dd
6d(d6d(d6d
d6d^d6d	d6d�d6dd6dd6d�d6d�d6dd6d�d6d�d6d0d6dd6dd6dd 6dd!6dd"6d�d#6d�d$6d%d&6dd'6dd(6dd)6dd*6d6d+6d,d-6d,d.6d/d06d1d26d3d46d5d66d5d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dBdD6dEdF6dGdH6dIdJ6dKdL6dhdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6Z'i#d^d6d�d_6d-	d`6dadb6dadb6d^dc6dK	dd6d�de6d�	df6d^dg6dZdh6d�di6d
dj6d^dk6dRdl6d�dm6dndo6d_dp6dqdr6dsdt6d�du6d7dv6d�dw6d5dx6d�dy6d�dz6d�d{6drd|6d�d}6d4d~6dd6d�d�6d�d�6dGd�6dYd�6Z(i�d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6d�d6d�d6d�d�6d�d6d�d6d�d6d�d6dd6d�d	6d�d
6d�d6d�d6d�d
6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d6d�d 6d�d!6d�d"6d�d#6d�d$6d�d%6d&d'6d(d)6d(d*6d+d,6d-d.6d-d/6d�d06d�d16d�d26d�d36d�d46d�d56d�d66d�d76d�d86d�d96d�d:6d�d;6d�d<6d�d=6d�d>6d�d?6d(d@6d�dA6d�dB6d�dC6d�dD6d�dE6d�dF6d�dG6d�dH6d�dI6d�dJ6d�dK6d(dL6d-dM6d�dN6d�dO6d�dP6dQdR6d�dS6d�dT6d�dU6d�dV6d�dW6d-dX6d�dY6d�dZ6d�d[6d�d\6d�d]6d(d^6d�d_6d-d`6d�da6d�db6d�dc6d�dd6d�de6d(df6d+dg6d�dh6d�di6d�dj6d�d�6d�dk6d�dl6d�dm6dndo6d�dp6d�dq6d�dr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Z)idd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Z*e
e*d�e*d�e*d�f�Z+ed�d��e	j�D��Z,d�e,d<Gd�d��d�e-�Z.Gd�d��d�e/�Z0dS(��)�absolute_import�division�unicode_literalsNz5Null character in input stream, replaced with U+FFFD.znull-characterzInvalid codepoint in stream.zinvalid-codepointz&Solidus (/) incorrectly placed in tag.zincorrectly-placed-solidusz.Incorrect CR newline entity, replaced with LF.zincorrect-cr-newline-entityz9Entity used with illegal number (windows-1252 reference).zillegal-windows-1252-entityzPNumeric entity couldn't be converted to character (codepoint U+%(charAsInt)08x).zcant-convert-numeric-entityzBNumeric entity represents an illegal codepoint: U+%(charAsInt)08x.z$illegal-codepoint-for-numeric-entityz#Numeric entity didn't end with ';'.z numeric-entity-without-semicolonz1Numeric entity expected. Got end of file instead.z#expected-numeric-entity-but-got-eofz'Numeric entity expected but none found.zexpected-numeric-entityz!Named entity didn't end with ';'.znamed-entity-without-semicolonz Named entity expected. Got none.zexpected-named-entityz'End tag contains unexpected attributes.zattributes-in-end-tagz.End tag contains unexpected self-closing flag.zself-closing-flag-on-end-tagz#Expected tag name. Got '>' instead.z'expected-tag-name-but-got-right-bracketzSExpected tag name. Got '?' instead. (HTML doesn't support processing instructions.)z'expected-tag-name-but-got-question-markz-Expected tag name. Got something else insteadzexpected-tag-namez6Expected closing tag. Got '>' instead. Ignoring '</>'.z*expected-closing-tag-but-got-right-bracketz-Expected closing tag. Unexpected end of file.z expected-closing-tag-but-got-eofz<Expected closing tag. Unexpected character '%(data)s' found.z!expected-closing-tag-but-got-charz'Unexpected end of file in the tag name.zeof-in-tag-namez8Unexpected end of file. Expected attribute name instead.z#expected-attribute-name-but-got-eofz)Unexpected end of file in attribute name.zeof-in-attribute-namez#Invalid character in attribute namez#invalid-character-in-attribute-namez#Dropped duplicate attribute on tag.zduplicate-attributez1Unexpected end of file. Expected = or end of tag.z$expected-end-of-tag-name-but-got-eofz1Unexpected end of file. Expected attribute value.z$expected-attribute-value-but-got-eofz*Expected attribute value. Got '>' instead.z.expected-attribute-value-but-got-right-bracketz"Unexpected = in unquoted attributez"equals-in-unquoted-attribute-valuez*Unexpected character in unquoted attributez0unexpected-character-in-unquoted-attribute-valuez*Unexpected character after attribute name.z&invalid-character-after-attribute-namez+Unexpected character after attribute value.z*unexpected-character-after-attribute-valuez.Unexpected end of file in attribute value (").z#eof-in-attribute-value-double-quotez.Unexpected end of file in attribute value (').z#eof-in-attribute-value-single-quotez*Unexpected end of file in attribute value.z eof-in-attribute-value-no-quotesz)Unexpected end of file in tag. Expected >z#unexpected-EOF-after-solidus-in-tagz/Unexpected character after / in tag. Expected >z)unexpected-character-after-solidus-in-tagz&Expected '--' or 'DOCTYPE'. Not found.zexpected-dashes-or-doctypez Unexpected ! after -- in commentz,unexpected-bang-after-double-dash-in-commentz$Unexpected space after -- in commentz-unexpected-space-after-double-dash-in-commentzIncorrect comment.zincorrect-commentz"Unexpected end of file in comment.zeof-in-commentz%Unexpected end of file in comment (-)zeof-in-comment-end-dashz+Unexpected '-' after '--' found in comment.z,unexpected-dash-after-double-dash-in-commentz'Unexpected end of file in comment (--).zeof-in-comment-double-dashzeof-in-comment-end-space-statezeof-in-comment-end-bang-statez&Unexpected character in comment found.zunexpected-char-in-commentz(No space after literal string 'DOCTYPE'.zneed-space-after-doctypez.Unexpected > character. Expected DOCTYPE name.z+expected-doctype-name-but-got-right-bracketz.Unexpected end of file. Expected DOCTYPE name.z!expected-doctype-name-but-got-eofz'Unexpected end of file in DOCTYPE name.zeof-in-doctype-namez"Unexpected end of file in DOCTYPE.zeof-in-doctypez%Expected space or '>'. Got '%(data)s'z*expected-space-or-right-bracket-in-doctypezUnexpected end of DOCTYPE.zunexpected-end-of-doctypez Unexpected character in DOCTYPE.zunexpected-char-in-doctypezXXX innerHTML EOFzeof-in-innerhtmlzUnexpected DOCTYPE. Ignored.zunexpected-doctypez%html needs to be the first start tag.z
non-html-rootz)Unexpected End of file. Expected DOCTYPE.zexpected-doctype-but-got-eofzErroneous DOCTYPE.zunknown-doctypez2Unexpected non-space characters. Expected DOCTYPE.zexpected-doctype-but-got-charsz2Unexpected start tag (%(name)s). Expected DOCTYPE.z"expected-doctype-but-got-start-tagz0Unexpected end tag (%(name)s). Expected DOCTYPE.z expected-doctype-but-got-end-tagz?Unexpected end tag (%(name)s) after the (implied) root element.zend-tag-after-implied-rootz4Unexpected end of file. Expected end tag (%(name)s).z&expected-named-closing-tag-but-got-eofz4Unexpected start tag head in existing head. Ignored.z!two-heads-are-not-better-than-onez'Unexpected end tag (%(name)s). Ignored.zunexpected-end-tagz;Unexpected start tag (%(name)s) that can be in head. Moved.z#unexpected-start-tag-out-of-my-headz Unexpected start tag (%(name)s).zunexpected-start-tagzMissing end tag (%(name)s).zmissing-end-tagzMissing end tags (%(name)s).zmissing-end-tagszCUnexpected start tag (%(startName)s) implies end tag (%(endName)s).z$unexpected-start-tag-implies-end-tagz@Unexpected start tag (%(originalName)s). Treated as %(newName)s.zunexpected-start-tag-treated-asz,Unexpected start tag %(name)s. Don't use it!zdeprecated-tagz'Unexpected start tag %(name)s. Ignored.zunexpected-start-tag-ignoredzEUnexpected end tag (%(gotName)s). Missing end tag (%(expectedName)s).z$expected-one-end-tag-but-got-anotherz:End tag (%(name)s) seen too early. Expected other end tag.zend-tag-too-earlyzFUnexpected end tag (%(gotName)s). Expected end tag (%(expectedName)s).zend-tag-too-early-namedz+End tag (%(name)s) seen too early. Ignored.zend-tag-too-early-ignoredzQEnd tag (%(name)s) violates step 1, paragraph 1 of the adoption agency algorithm.zadoption-agency-1.1zQEnd tag (%(name)s) violates step 1, paragraph 2 of the adoption agency algorithm.zadoption-agency-1.2zQEnd tag (%(name)s) violates step 1, paragraph 3 of the adoption agency algorithm.zadoption-agency-1.3zQEnd tag (%(name)s) violates step 4, paragraph 4 of the adoption agency algorithm.zadoption-agency-4.4z>Unexpected end tag (%(originalName)s). Treated as %(newName)s.zunexpected-end-tag-treated-asz'This element (%(name)s) has no end tag.z
no-end-tagz9Unexpected implied end tag (%(name)s) in the table phase.z#unexpected-implied-end-tag-in-tablez>Unexpected implied end tag (%(name)s) in the table body phase.z(unexpected-implied-end-tag-in-table-bodyzDUnexpected non-space characters in table context caused voodoo mode.z$unexpected-char-implies-table-voodooz3Unexpected input with type hidden in table context.z unexpected-hidden-input-in-tablez!Unexpected form in table context.zunexpected-form-in-tablezDUnexpected start tag (%(name)s) in table context caused voodoo mode.z)unexpected-start-tag-implies-table-voodoozBUnexpected end tag (%(name)s) in table context caused voodoo mode.z'unexpected-end-tag-implies-table-voodoozCUnexpected table cell start tag (%(name)s) in the table body phase.zunexpected-cell-in-table-bodyzFGot table cell end tag (%(name)s) while required end tags are missing.zunexpected-cell-end-tagz?Unexpected end tag (%(name)s) in the table body phase. Ignored.z unexpected-end-tag-in-table-bodyz=Unexpected implied end tag (%(name)s) in the table row phase.z'unexpected-implied-end-tag-in-table-rowz>Unexpected end tag (%(name)s) in the table row phase. Ignored.zunexpected-end-tag-in-table-rowzJUnexpected select start tag in the select phase treated as select end tag.zunexpected-select-in-selectz/Unexpected input start tag in the select phase.zunexpected-input-in-selectzBUnexpected start tag token (%(name)s in the select phase. Ignored.zunexpected-start-tag-in-selectz;Unexpected end tag (%(name)s) in the select phase. Ignored.zunexpected-end-tag-in-selectzKUnexpected table element start tag (%(name)s) in the select in table phase.z5unexpected-table-element-start-tag-in-select-in-tablezIUnexpected table element end tag (%(name)s) in the select in table phase.z3unexpected-table-element-end-tag-in-select-in-tablez8Unexpected non-space characters in the after body phase.zunexpected-char-after-bodyz>Unexpected start tag token (%(name)s) in the after body phase.zunexpected-start-tag-after-bodyz<Unexpected end tag token (%(name)s) in the after body phase.zunexpected-end-tag-after-bodyz@Unexpected characters in the frameset phase. Characters ignored.zunexpected-char-in-framesetzEUnexpected start tag token (%(name)s) in the frameset phase. Ignored.z unexpected-start-tag-in-framesetzFUnexpected end tag token (frameset) in the frameset phase (innerHTML).z)unexpected-frameset-in-frameset-innerhtmlzCUnexpected end tag token (%(name)s) in the frameset phase. Ignored.zunexpected-end-tag-in-framesetzEUnexpected non-space characters in the after frameset phase. Ignored.zunexpected-char-after-framesetzEUnexpected start tag (%(name)s) in the after frameset phase. Ignored.z#unexpected-start-tag-after-framesetzCUnexpected end tag (%(name)s) in the after frameset phase. Ignored.z!unexpected-end-tag-after-framesetz(Unexpected end tag after body(innerHtml)z'unexpected-end-tag-after-body-innerhtmlz6Unexpected non-space characters. Expected end of file.zexpected-eof-but-got-charz6Unexpected start tag (%(name)s). Expected end of file.zexpected-eof-but-got-start-tagz4Unexpected end tag (%(name)s). Expected end of file.zexpected-eof-but-got-end-tagz/Unexpected end of file. Expected table content.zeof-in-tablez0Unexpected end of file. Expected select content.z
eof-in-selectz2Unexpected end of file. Expected frameset content.zeof-in-framesetz0Unexpected end of file. Expected script content.zeof-in-script-in-scriptz0Unexpected end of file. Expected foreign contentzeof-in-foreign-landsz0Trailing solidus not allowed on element %(name)sz&non-void-element-with-trailing-solidusz2Element %(name)s not allowed in a non-html contextz*unexpected-html-element-in-foreign-contentz*Unexpected end tag (%(name)s) before html.zunexpected-end-tag-before-htmlz0Undefined error (this sucks and should be fixed)zXXX-undefined-errorzhttp://www.w3.org/1999/xhtml�htmlz"http://www.w3.org/1998/Math/MathML�mathmlzhttp://www.w3.org/2000/svg�svgzhttp://www.w3.org/1999/xlink�xlinkz$http://www.w3.org/XML/1998/namespace�xmlzhttp://www.w3.org/2000/xmlns/�xmlns�applet�caption�marquee�object�table�td�th�mi�mo�mn�ms�mtextzannotation-xml�
foreignObject�desc�title�a�b�big�code�em�font�i�nobr�s�small�strike�strong�tt�u�address�area�article�aside�base�basefont�bgsound�
blockquote�body�br�button�center�col�colgroup�command�dd�details�dir�div�dl�dt�embed�fieldset�figure�footer�form�frame�frameset�h1�h2�h3�h4�h5�h6�head�header�hr�iframe�image�img�input�isindex�li�link�listing�menu�meta�nav�noembed�noframes�noscript�ol�p�param�	plaintext�pre�script�section�select�style�tbody�textarea�tfoot�thead�tr�ul�wbr�xmpz
annotaion-xml�actuatez
xlink:actuate�arcrolez
xlink:arcrole�hrefz
xlink:href�rolez
xlink:role�showz
xlink:showzxlink:title�typez
xlink:typezxml:base�langzxml:lang�spacez	xml:spacezxmlns:xlinkcCs1g|]'\}\}}}||f|f�qS�rt)�.0�qname�prefix�local�nsrtrt�9/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/constants.py�
<listcomp>�s	r{�	�
�� �
cCs.g|]$}t|�t|j��f�qSrt)�ord�lower)ru�crtrtrzr{�s	�event-source�source�track�
irrelevant��scoped�ismap�autoplay�controls�audio�video�defer�async�open�multiple�disabled�datagrid�hidden�checked�defaultZnoshade�
autosubmit�readonly�selected�option�optgroup�	autofocus�required�output� �� �� �& �  �! ���0 �`�9 �R�}� � � � �" � � ���"!�a�: �S�~�x�lt;�gt;�amp;�apos;�quot;�Æ�AEligzAElig;�&�AMPzAMP;�Á�AacutezAacute;uĂzAbreve;�Â�AcirczAcirc;uАzAcy;u𝔄zAfr;�À�AgravezAgrave;uΑzAlpha;uĀzAmacr;u⩓zAnd;uĄzAogon;u𝔸zAopf;u⁡zApplyFunction;�Å�AringzAring;u𝒜zAscr;u≔zAssign;�Ã�AtildezAtilde;�Ä�AumlzAuml;u∖z
Backslash;u⫧zBarv;u⌆zBarwed;uБzBcy;u∵zBecause;uℬzBernoullis;uΒzBeta;u𝔅zBfr;u𝔹zBopf;u˘zBreve;zBscr;u≎zBumpeq;uЧzCHcy;�©�COPYzCOPY;uĆzCacute;u⋒zCap;uⅅzCapitalDifferentialD;uℭzCayleys;uČzCcaron;�Ç�CcedilzCcedil;uĈzCcirc;u∰zCconint;uĊzCdot;�¸zCedilla;�·z
CenterDot;zCfr;uΧzChi;u⊙z
CircleDot;u⊖zCircleMinus;u⊕zCirclePlus;u⊗zCircleTimes;u∲zClockwiseContourIntegral;u”zCloseCurlyDoubleQuote;u’zCloseCurlyQuote;u∷zColon;u⩴zColone;u≡z
Congruent;u∯zConint;u∮zContourIntegral;uℂzCopf;u∐z
Coproduct;u∳z CounterClockwiseContourIntegral;u⨯zCross;u𝒞zCscr;u⋓zCup;u≍zCupCap;zDD;u⤑z	DDotrahd;uЂzDJcy;uЅzDScy;uЏzDZcy;u‡zDagger;u↡zDarr;u⫤zDashv;uĎzDcaron;uДzDcy;u∇zDel;uΔzDelta;u𝔇zDfr;�´zDiacriticalAcute;u˙zDiacriticalDot;u˝zDiacriticalDoubleAcute;�`zDiacriticalGrave;u˜zDiacriticalTilde;u⋄zDiamond;uⅆzDifferentialD;u𝔻zDopf;�¨zDot;u⃜zDotDot;u≐z	DotEqual;zDoubleContourIntegral;z
DoubleDot;u⇓zDoubleDownArrow;u⇐zDoubleLeftArrow;u⇔zDoubleLeftRightArrow;zDoubleLeftTee;u⟸zDoubleLongLeftArrow;u⟺zDoubleLongLeftRightArrow;u⟹zDoubleLongRightArrow;u⇒zDoubleRightArrow;u⊨zDoubleRightTee;u⇑zDoubleUpArrow;u⇕zDoubleUpDownArrow;u∥zDoubleVerticalBar;u↓z
DownArrow;u⤓z
DownArrowBar;u⇵zDownArrowUpArrow;ȗz
DownBreve;u⥐zDownLeftRightVector;u⥞zDownLeftTeeVector;u↽zDownLeftVector;u⥖zDownLeftVectorBar;u⥟zDownRightTeeVector;u⇁zDownRightVector;u⥗zDownRightVectorBar;u⊤zDownTee;u↧z
DownTeeArrow;z
Downarrow;u𝒟zDscr;uĐzDstrok;uŊzENG;�Ð�ETHzETH;�É�EacutezEacute;uĚzEcaron;�Ê�EcirczEcirc;uЭzEcy;uĖzEdot;u𝔈zEfr;�È�EgravezEgrave;u∈zElement;uĒzEmacr;u◻zEmptySmallSquare;u▫zEmptyVerySmallSquare;uĘzEogon;u𝔼zEopf;uΕzEpsilon;u⩵zEqual;u≂zEqualTilde;u⇌zEquilibrium;uℰzEscr;u⩳zEsim;uΗzEta;�Ë�EumlzEuml;u∃zExists;uⅇz
ExponentialE;uФzFcy;u𝔉zFfr;u◼zFilledSmallSquare;u▪zFilledVerySmallSquare;u𝔽zFopf;u∀zForAll;uℱzFouriertrf;zFscr;uЃzGJcy;�>�GTzGT;uΓzGamma;uϜzGammad;uĞzGbreve;uĢzGcedil;uĜzGcirc;uГzGcy;uĠzGdot;u𝔊zGfr;u⋙zGg;u𝔾zGopf;u≥z
GreaterEqual;u⋛zGreaterEqualLess;u≧zGreaterFullEqual;u⪢zGreaterGreater;u≷zGreaterLess;u⩾zGreaterSlantEqual;u≳z
GreaterTilde;u𝒢zGscr;u≫zGt;uЪzHARDcy;uˇzHacek;�^zHat;uĤzHcirc;uℌzHfr;uℋz
HilbertSpace;uℍzHopf;u─zHorizontalLine;zHscr;uĦzHstrok;z
HumpDownHump;u≏z
HumpEqual;uЕzIEcy;uIJzIJlig;uЁzIOcy;�Í�IacutezIacute;�Î�IcirczIcirc;uИzIcy;uİzIdot;uℑzIfr;�Ì�IgravezIgrave;zIm;uĪzImacr;uⅈzImaginaryI;zImplies;u∬zInt;u∫z	Integral;u⋂z
Intersection;u⁣zInvisibleComma;u⁢zInvisibleTimes;uĮzIogon;u𝕀zIopf;uΙzIota;uℐzIscr;uĨzItilde;uІzIukcy;�Ï�IumlzIuml;uĴzJcirc;uЙzJcy;u𝔍zJfr;u𝕁zJopf;u𝒥zJscr;uЈzJsercy;uЄzJukcy;uХzKHcy;uЌzKJcy;uΚzKappa;uĶzKcedil;uКzKcy;u𝔎zKfr;u𝕂zKopf;u𝒦zKscr;uЉzLJcy;�<�LTzLT;uĹzLacute;uΛzLambda;u⟪zLang;uℒzLaplacetrf;u↞zLarr;uĽzLcaron;uĻzLcedil;uЛzLcy;u⟨zLeftAngleBracket;u←z
LeftArrow;u⇤z
LeftArrowBar;u⇆zLeftArrowRightArrow;u⌈zLeftCeiling;u⟦zLeftDoubleBracket;u⥡zLeftDownTeeVector;u⇃zLeftDownVector;u⥙zLeftDownVectorBar;u⌊z
LeftFloor;u↔zLeftRightArrow;u⥎zLeftRightVector;u⊣zLeftTee;u↤z
LeftTeeArrow;u⥚zLeftTeeVector;u⊲z
LeftTriangle;u⧏zLeftTriangleBar;u⊴zLeftTriangleEqual;u⥑zLeftUpDownVector;u⥠zLeftUpTeeVector;u↿z
LeftUpVector;u⥘zLeftUpVectorBar;u↼zLeftVector;u⥒zLeftVectorBar;z
Leftarrow;zLeftrightarrow;u⋚zLessEqualGreater;u≦zLessFullEqual;u≶zLessGreater;u⪡z	LessLess;u⩽zLessSlantEqual;u≲z
LessTilde;u𝔏zLfr;u⋘zLl;u⇚zLleftarrow;uĿzLmidot;u⟵zLongLeftArrow;u⟷zLongLeftRightArrow;u⟶zLongRightArrow;zLongleftarrow;zLongleftrightarrow;zLongrightarrow;u𝕃zLopf;u↙zLowerLeftArrow;u↘zLowerRightArrow;zLscr;u↰zLsh;uŁzLstrok;u≪zLt;u⤅zMap;uМzMcy;u zMediumSpace;uℳz
Mellintrf;u𝔐zMfr;u∓z
MinusPlus;u𝕄zMopf;zMscr;uΜzMu;uЊzNJcy;uŃzNacute;uŇzNcaron;uŅzNcedil;uНzNcy;u​zNegativeMediumSpace;zNegativeThickSpace;zNegativeThinSpace;zNegativeVeryThinSpace;zNestedGreaterGreater;zNestedLessLess;zNewLine;u𝔑zNfr;u⁠zNoBreak;� zNonBreakingSpace;uℕzNopf;u⫬zNot;u≢z
NotCongruent;u≭z
NotCupCap;u∦zNotDoubleVerticalBar;u∉zNotElement;u≠z	NotEqual;u≂̸zNotEqualTilde;u∄z
NotExists;u≯zNotGreater;u≱zNotGreaterEqual;u≧̸zNotGreaterFullEqual;u≫̸zNotGreaterGreater;u≹zNotGreaterLess;u⩾̸zNotGreaterSlantEqual;u≵zNotGreaterTilde;u≎̸zNotHumpDownHump;u≏̸z
NotHumpEqual;u⋪zNotLeftTriangle;u⧏̸zNotLeftTriangleBar;u⋬zNotLeftTriangleEqual;u≮zNotLess;u≰z
NotLessEqual;u≸zNotLessGreater;u≪̸zNotLessLess;u⩽̸zNotLessSlantEqual;u≴z
NotLessTilde;u⪢̸zNotNestedGreaterGreater;u⪡̸zNotNestedLessLess;u⊀zNotPrecedes;u⪯̸zNotPrecedesEqual;u⋠zNotPrecedesSlantEqual;u∌zNotReverseElement;u⋫zNotRightTriangle;u⧐̸zNotRightTriangleBar;u⋭zNotRightTriangleEqual;u⊏̸zNotSquareSubset;u⋢zNotSquareSubsetEqual;u⊐̸zNotSquareSuperset;u⋣zNotSquareSupersetEqual;u⊂⃒z
NotSubset;u⊈zNotSubsetEqual;u⊁zNotSucceeds;u⪰̸zNotSucceedsEqual;u⋡zNotSucceedsSlantEqual;u≿̸zNotSucceedsTilde;u⊃⃒zNotSuperset;u⊉zNotSupersetEqual;u≁z	NotTilde;u≄zNotTildeEqual;u≇zNotTildeFullEqual;u≉zNotTildeTilde;u∤zNotVerticalBar;u𝒩zNscr;�Ñ�NtildezNtilde;uΝzNu;uŒzOElig;�Ó�OacutezOacute;�Ô�OcirczOcirc;uОzOcy;uŐzOdblac;u𝔒zOfr;�Ò�OgravezOgrave;uŌzOmacr;uΩzOmega;uΟzOmicron;u𝕆zOopf;u“zOpenCurlyDoubleQuote;u‘zOpenCurlyQuote;u⩔zOr;u𝒪zOscr;�Ø�OslashzOslash;�Õ�OtildezOtilde;u⨷zOtimes;�Ö�OumlzOuml;u‾zOverBar;u⏞z
OverBrace;u⎴zOverBracket;u⏜zOverParenthesis;u∂z	PartialD;uПzPcy;u𝔓zPfr;uΦzPhi;uΠzPi;�±z
PlusMinus;zPoincareplane;uℙzPopf;u⪻zPr;u≺z	Precedes;u⪯zPrecedesEqual;u≼zPrecedesSlantEqual;u≾zPrecedesTilde;u″zPrime;u∏zProduct;zProportion;u∝z
Proportional;u𝒫zPscr;uΨzPsi;�"�QUOTzQUOT;u𝔔zQfr;uℚzQopf;u𝒬zQscr;u⤐zRBarr;�®�REGzREG;uŔzRacute;u⟫zRang;u↠zRarr;u⤖zRarrtl;uŘzRcaron;uŖzRcedil;uРzRcy;uℜzRe;u∋zReverseElement;u⇋zReverseEquilibrium;u⥯zReverseUpEquilibrium;zRfr;uΡzRho;u⟩zRightAngleBracket;u→zRightArrow;u⇥zRightArrowBar;u⇄zRightArrowLeftArrow;u⌉z
RightCeiling;u⟧zRightDoubleBracket;u⥝zRightDownTeeVector;u⇂zRightDownVector;u⥕zRightDownVectorBar;u⌋zRightFloor;u⊢z	RightTee;u↦zRightTeeArrow;u⥛zRightTeeVector;u⊳zRightTriangle;u⧐zRightTriangleBar;u⊵zRightTriangleEqual;u⥏zRightUpDownVector;u⥜zRightUpTeeVector;u↾zRightUpVector;u⥔zRightUpVectorBar;u⇀zRightVector;u⥓zRightVectorBar;zRightarrow;uℝzRopf;u⥰z
RoundImplies;u⇛zRrightarrow;uℛzRscr;u↱zRsh;u⧴zRuleDelayed;uЩzSHCHcy;uШzSHcy;uЬzSOFTcy;uŚzSacute;u⪼zSc;uŠzScaron;uŞzScedil;uŜzScirc;uСzScy;u𝔖zSfr;zShortDownArrow;zShortLeftArrow;zShortRightArrow;u↑z
ShortUpArrow;uΣzSigma;u∘zSmallCircle;u𝕊zSopf;u√zSqrt;u□zSquare;u⊓zSquareIntersection;u⊏z
SquareSubset;u⊑zSquareSubsetEqual;u⊐zSquareSuperset;u⊒zSquareSupersetEqual;u⊔zSquareUnion;u𝒮zSscr;u⋆zStar;u⋐zSub;zSubset;u⊆zSubsetEqual;u≻z	Succeeds;u⪰zSucceedsEqual;u≽zSucceedsSlantEqual;u≿zSucceedsTilde;z	SuchThat;u∑zSum;u⋑zSup;u⊃z	Superset;u⊇zSupersetEqual;zSupset;�Þ�THORNzTHORN;u™zTRADE;uЋzTSHcy;uЦzTScy;zTab;uΤzTau;uŤzTcaron;uŢzTcedil;uТzTcy;u𝔗zTfr;u∴z
Therefore;uΘzTheta;u  zThickSpace;u z
ThinSpace;u∼zTilde;u≃zTildeEqual;u≅zTildeFullEqual;u≈zTildeTilde;u𝕋zTopf;u⃛z
TripleDot;u𝒯zTscr;uŦzTstrok;�Ú�UacutezUacute;u↟zUarr;u⥉z	Uarrocir;uЎzUbrcy;uŬzUbreve;�Û�UcirczUcirc;uУzUcy;uŰzUdblac;u𝔘zUfr;�Ù�UgravezUgrave;uŪzUmacr;�_z	UnderBar;u⏟zUnderBrace;u⎵z
UnderBracket;u⏝zUnderParenthesis;u⋃zUnion;u⊎z
UnionPlus;uŲzUogon;u𝕌zUopf;zUpArrow;u⤒zUpArrowBar;u⇅zUpArrowDownArrow;u↕zUpDownArrow;u⥮zUpEquilibrium;u⊥zUpTee;u↥zUpTeeArrow;zUparrow;zUpdownarrow;u↖zUpperLeftArrow;u↗zUpperRightArrow;uϒzUpsi;uΥzUpsilon;uŮzUring;u𝒰zUscr;uŨzUtilde;�Ü�UumlzUuml;u⊫zVDash;u⫫zVbar;uВzVcy;u⊩zVdash;u⫦zVdashl;u⋁zVee;u‖zVerbar;zVert;u∣zVerticalBar;�|z
VerticalLine;u❘zVerticalSeparator;u≀zVerticalTilde;u zVeryThinSpace;u𝔙zVfr;u𝕍zVopf;u𝒱zVscr;u⊪zVvdash;uŴzWcirc;u⋀zWedge;u𝔚zWfr;u𝕎zWopf;u𝒲zWscr;u𝔛zXfr;uΞzXi;u𝕏zXopf;u𝒳zXscr;uЯzYAcy;uЇzYIcy;uЮzYUcy;�Ý�YacutezYacute;uŶzYcirc;uЫzYcy;u𝔜zYfr;u𝕐zYopf;u𝒴zYscr;uŸzYuml;uЖzZHcy;uŹzZacute;uŽzZcaron;uЗzZcy;uŻzZdot;zZeroWidthSpace;uΖzZeta;uℨzZfr;uℤzZopf;u𝒵zZscr;�á�aacutezaacute;uăzabreve;u∾zac;u∾̳zacE;u∿zacd;�â�acirczacirc;�acutezacute;uаzacy;�æ�aeligzaelig;zaf;u𝔞zafr;�à�agravezagrave;uℵzalefsym;zaleph;uαzalpha;uāzamacr;u⨿zamalg;�ampu∧zand;u⩕zandand;u⩜zandd;u⩘z	andslope;u⩚zandv;u∠zang;u⦤zange;zangle;u∡zangmsd;u⦨z	angmsdaa;u⦩z	angmsdab;u⦪z	angmsdac;u⦫z	angmsdad;u⦬z	angmsdae;u⦭z	angmsdaf;u⦮z	angmsdag;u⦯z	angmsdah;u∟zangrt;u⊾zangrtvb;u⦝z	angrtvbd;u∢zangsph;zangst;u⍼zangzarr;uązaogon;u𝕒zaopf;zap;u⩰zapE;u⩯zapacir;u≊zape;u≋zapid;�'zapprox;z	approxeq;�å�aringzaring;u𝒶zascr;�*zast;zasymp;zasympeq;�ã�atildezatilde;�ä�aumlzauml;z	awconint;u⨑zawint;u⫭zbNot;u≌z	backcong;u϶zbackepsilon;u‵z
backprime;u∽zbacksim;u⋍z
backsimeq;u⊽zbarvee;u⌅zbarwed;z	barwedge;zbbrk;u⎶z	bbrktbrk;zbcong;uбzbcy;u„zbdquo;zbecaus;zbecause;u⦰zbemptyv;zbepsi;zbernou;uβzbeta;uℶzbeth;u≬zbetween;u𝔟zbfr;zbigcap;u◯zbigcirc;zbigcup;u⨀zbigodot;u⨁z	bigoplus;u⨂z
bigotimes;u⨆z	bigsqcup;u★zbigstar;u▽zbigtriangledown;u△zbigtriangleup;u⨄z	biguplus;zbigvee;z	bigwedge;u⤍zbkarow;u⧫z
blacklozenge;zblacksquare;u▴zblacktriangle;u▾zblacktriangledown;u◂zblacktriangleleft;u▸zblacktriangleright;u␣zblank;u▒zblk12;u░zblk14;u▓zblk34;u█zblock;u=⃥zbne;u≡⃥zbnequiv;u⌐zbnot;u𝕓zbopf;zbot;zbottom;u⋈zbowtie;u╗zboxDL;u╔zboxDR;u╖zboxDl;u╓zboxDr;u═zboxH;u╦zboxHD;u╩zboxHU;u╤zboxHd;u╧zboxHu;u╝zboxUL;u╚zboxUR;u╜zboxUl;u╙zboxUr;u║zboxV;u╬zboxVH;u╣zboxVL;u╠zboxVR;u╫zboxVh;u╢zboxVl;u╟zboxVr;u⧉zboxbox;u╕zboxdL;u╒zboxdR;u┐zboxdl;u┌zboxdr;zboxh;u╥zboxhD;u╨zboxhU;u┬zboxhd;u┴zboxhu;u⊟z	boxminus;u⊞zboxplus;u⊠z	boxtimes;u╛zboxuL;u╘zboxuR;u┘zboxul;u└zboxur;u│zboxv;u╪zboxvH;u╡zboxvL;u╞zboxvR;u┼zboxvh;u┤zboxvl;u├zboxvr;zbprime;zbreve;�¦�brvbarzbrvbar;u𝒷zbscr;u⁏zbsemi;zbsim;zbsime;�\zbsol;u⧅zbsolb;u⟈z	bsolhsub;u•zbull;zbullet;zbump;u⪮zbumpE;zbumpe;zbumpeq;ućzcacute;u∩zcap;u⩄zcapand;u⩉z	capbrcup;u⩋zcapcap;u⩇zcapcup;u⩀zcapdot;u∩︀zcaps;u⁁zcaret;zcaron;u⩍zccaps;učzccaron;�ç�ccedilzccedil;uĉzccirc;u⩌zccups;u⩐zccupssm;uċzcdot;�cedilzcedil;u⦲zcemptyv;�¢�centzcent;z
centerdot;u𝔠zcfr;uчzchcy;u✓zcheck;z
checkmark;uχzchi;u○zcir;u⧃zcirE;uˆzcirc;u≗zcirceq;u↺zcirclearrowleft;u↻zcirclearrowright;z	circledR;uⓈz	circledS;u⊛zcircledast;u⊚zcircledcirc;u⊝zcircleddash;zcire;u⨐z	cirfnint;u⫯zcirmid;u⧂zcirscir;u♣zclubs;z	clubsuit;�:zcolon;zcolone;zcoloneq;�,zcomma;�@zcommat;u∁zcomp;zcompfn;zcomplement;z
complexes;zcong;u⩭zcongdot;zconint;u𝕔zcopf;zcoprod;�copyzcopy;u℗zcopysr;u↵zcrarr;u✗zcross;u𝒸zcscr;u⫏zcsub;u⫑zcsube;u⫐zcsup;u⫒zcsupe;u⋯zctdot;u⤸zcudarrl;u⤵zcudarrr;u⋞zcuepr;u⋟zcuesc;u↶zcularr;u⤽zcularrp;u∪zcup;u⩈z	cupbrcap;u⩆zcupcap;u⩊zcupcup;u⊍zcupdot;u⩅zcupor;u∪︀zcups;u↷zcurarr;u⤼zcurarrm;zcurlyeqprec;zcurlyeqsucc;u⋎z	curlyvee;u⋏zcurlywedge;�¤�currenzcurren;zcurvearrowleft;zcurvearrowright;zcuvee;zcuwed;z	cwconint;u∱zcwint;u⌭zcylcty;zdArr;u⥥zdHar;u†zdagger;uℸzdaleth;zdarr;u‐zdash;zdashv;u⤏zdbkarow;zdblac;uďzdcaron;uдzdcy;zdd;zddagger;u⇊zddarr;u⩷zddotseq;�°�degzdeg;uδzdelta;u⦱zdemptyv;u⥿zdfisht;u𝔡zdfr;zdharl;zdharr;zdiam;zdiamond;u♦zdiamondsuit;zdiams;zdie;uϝzdigamma;u⋲zdisin;�÷zdiv;�dividezdivide;u⋇zdivideontimes;zdivonx;uђzdjcy;u⌞zdlcorn;u⌍zdlcrop;�$zdollar;u𝕕zdopf;zdot;zdoteq;u≑z	doteqdot;u∸z	dotminus;u∔zdotplus;u⊡z
dotsquare;zdoublebarwedge;z
downarrow;zdowndownarrows;zdownharpoonleft;zdownharpoonright;z	drbkarow;u⌟zdrcorn;u⌌zdrcrop;u𝒹zdscr;uѕzdscy;u⧶zdsol;uđzdstrok;u⋱zdtdot;u▿zdtri;zdtrif;zduarr;zduhar;u⦦zdwangle;uџzdzcy;u⟿z	dzigrarr;zeDDot;zeDot;�é�eacutezeacute;u⩮zeaster;uězecaron;u≖zecir;�ê�ecirczecirc;u≕zecolon;uэzecy;uėzedot;zee;u≒zefDot;u𝔢zefr;u⪚zeg;�è�egravezegrave;u⪖zegs;u⪘zegsdot;u⪙zel;u⏧z	elinters;uℓzell;u⪕zels;u⪗zelsdot;uēzemacr;u∅zempty;z	emptyset;zemptyv;u zemsp13;u zemsp14;u zemsp;uŋzeng;u zensp;uęzeogon;u𝕖zeopf;u⋕zepar;u⧣zeparsl;u⩱zeplus;uεzepsi;zepsilon;uϵzepsiv;zeqcirc;zeqcolon;zeqsim;zeqslantgtr;zeqslantless;�=zequals;u≟zequest;zequiv;u⩸zequivDD;u⧥z	eqvparsl;u≓zerDot;u⥱zerarr;uℯzescr;zesdot;zesim;uηzeta;�ð�ethzeth;�ë�eumlzeuml;u€zeuro;�!zexcl;zexist;zexpectation;z
exponentiale;zfallingdotseq;uфzfcy;u♀zfemale;uffizffilig;uffzfflig;ufflzffllig;u𝔣zffr;ufizfilig;�fjzfjlig;u♭zflat;uflzfllig;u▱zfltns;uƒzfnof;u𝕗zfopf;zforall;u⋔zfork;u⫙zforkv;u⨍z	fpartint;�½�frac12zfrac12;u⅓zfrac13;�¼�frac14zfrac14;u⅕zfrac15;u⅙zfrac16;u⅛zfrac18;u⅔zfrac23;u⅖zfrac25;�¾�frac34zfrac34;u⅗zfrac35;u⅜zfrac38;u⅘zfrac45;u⅚zfrac56;u⅝zfrac58;u⅞zfrac78;u⁄zfrasl;u⌢zfrown;u𝒻zfscr;zgE;u⪌zgEl;uǵzgacute;uγzgamma;zgammad;u⪆zgap;uğzgbreve;uĝzgcirc;uгzgcy;uġzgdot;zge;zgel;zgeq;zgeqq;z	geqslant;zges;u⪩zgescc;u⪀zgesdot;u⪂zgesdoto;u⪄z	gesdotol;u⋛︀zgesl;u⪔zgesles;u𝔤zgfr;zgg;zggg;uℷzgimel;uѓzgjcy;zgl;u⪒zglE;u⪥zgla;u⪤zglj;u≩zgnE;u⪊zgnap;z	gnapprox;u⪈zgne;zgneq;zgneqq;u⋧zgnsim;u𝕘zgopf;zgrave;uℊzgscr;zgsim;u⪎zgsime;u⪐zgsiml;�gtu⪧zgtcc;u⩺zgtcir;u⋗zgtdot;u⦕zgtlPar;u⩼zgtquest;z
gtrapprox;u⥸zgtrarr;zgtrdot;z
gtreqless;zgtreqqless;zgtrless;zgtrsim;u≩︀z
gvertneqq;zgvnE;zhArr;zhairsp;zhalf;zhamilt;uъzhardcy;zharr;u⥈zharrcir;u↭zharrw;uℏzhbar;uĥzhcirc;u♥zhearts;z
heartsuit;u…zhellip;u⊹zhercon;u𝔥zhfr;u⤥z	hksearow;u⤦z	hkswarow;u⇿zhoarr;u∻zhomtht;u↩zhookleftarrow;u↪zhookrightarrow;u𝕙zhopf;u―zhorbar;u𝒽zhscr;zhslash;uħzhstrok;u⁃zhybull;zhyphen;�í�iacuteziacute;zic;�î�icirczicirc;uиzicy;uеziecy;�¡�iexclziexcl;ziff;u𝔦zifr;�ì�igravezigrave;zii;u⨌ziiiint;u∭ziiint;u⧜ziinfin;u℩ziiota;uijzijlig;uīzimacr;zimage;z	imagline;z	imagpart;uızimath;u⊷zimof;uƵzimped;zin;u℅zincare;u∞zinfin;u⧝z	infintie;zinodot;zint;u⊺zintcal;z	integers;z	intercal;u⨗z	intlarhk;u⨼zintprod;uёziocy;uįziogon;u𝕚ziopf;uιziota;ziprod;�¿�iquestziquest;u𝒾ziscr;zisin;u⋹zisinE;u⋵zisindot;u⋴zisins;u⋳zisinsv;zisinv;zit;uĩzitilde;uіziukcy;�ï�iumlziuml;uĵzjcirc;uйzjcy;u𝔧zjfr;uȷzjmath;u𝕛zjopf;u𝒿zjscr;uјzjsercy;uєzjukcy;uκzkappa;uϰzkappav;uķzkcedil;uкzkcy;u𝔨zkfr;uĸzkgreen;uхzkhcy;uќzkjcy;u𝕜zkopf;u𝓀zkscr;zlAarr;zlArr;u⤛zlAtail;u⤎zlBarr;zlE;u⪋zlEg;u⥢zlHar;uĺzlacute;u⦴z	laemptyv;zlagran;uλzlambda;zlang;u⦑zlangd;zlangle;u⪅zlap;�«�laquozlaquo;zlarr;zlarrb;u⤟zlarrbfs;u⤝zlarrfs;zlarrhk;u↫zlarrlp;u⤹zlarrpl;u⥳zlarrsim;u↢zlarrtl;u⪫zlat;u⤙zlatail;u⪭zlate;u⪭︀zlates;u⤌zlbarr;u❲zlbbrk;�{zlbrace;�[zlbrack;u⦋zlbrke;u⦏zlbrksld;u⦍zlbrkslu;uľzlcaron;uļzlcedil;zlceil;zlcub;uлzlcy;u⤶zldca;zldquo;zldquor;u⥧zldrdhar;u⥋z	ldrushar;u↲zldsh;u≤zle;z
leftarrow;zleftarrowtail;zleftharpoondown;zleftharpoonup;u⇇zleftleftarrows;zleftrightarrow;zleftrightarrows;zleftrightharpoons;zleftrightsquigarrow;u⋋zleftthreetimes;zleg;zleq;zleqq;z	leqslant;zles;u⪨zlescc;u⩿zlesdot;u⪁zlesdoto;u⪃z	lesdotor;u⋚︀zlesg;u⪓zlesges;zlessapprox;u⋖zlessdot;z
lesseqgtr;zlesseqqgtr;zlessgtr;zlesssim;u⥼zlfisht;zlfloor;u𝔩zlfr;zlg;u⪑zlgE;zlhard;zlharu;u⥪zlharul;u▄zlhblk;uљzljcy;zll;zllarr;z	llcorner;u⥫zllhard;u◺zlltri;uŀzlmidot;u⎰zlmoust;zlmoustache;u≨zlnE;u⪉zlnap;z	lnapprox;u⪇zlne;zlneq;zlneqq;u⋦zlnsim;u⟬zloang;u⇽zloarr;zlobrk;zlongleftarrow;zlongleftrightarrow;u⟼zlongmapsto;zlongrightarrow;zlooparrowleft;u↬zlooparrowright;u⦅zlopar;u𝕝zlopf;u⨭zloplus;u⨴zlotimes;u∗zlowast;zlowbar;u◊zloz;zlozenge;zlozf;�(zlpar;u⦓zlparlt;zlrarr;z	lrcorner;zlrhar;u⥭zlrhard;u‎zlrm;u⊿zlrtri;u‹zlsaquo;u𝓁zlscr;zlsh;zlsim;u⪍zlsime;u⪏zlsimg;zlsqb;zlsquo;u‚zlsquor;ułzlstrok;�ltu⪦zltcc;u⩹zltcir;zltdot;zlthree;u⋉zltimes;u⥶zltlarr;u⩻zltquest;u⦖zltrPar;u◃zltri;zltrie;zltrif;u⥊z	lurdshar;u⥦zluruhar;u≨︀z
lvertneqq;zlvnE;u∺zmDDot;�¯�macrzmacr;u♂zmale;u✠zmalt;zmaltese;zmap;zmapsto;zmapstodown;zmapstoleft;z	mapstoup;u▮zmarker;u⨩zmcomma;uмzmcy;u—zmdash;zmeasuredangle;u𝔪zmfr;u℧zmho;�µ�microzmicro;zmid;zmidast;u⫰zmidcir;�middotzmiddot;u−zminus;zminusb;zminusd;u⨪zminusdu;u⫛zmlcp;zmldr;zmnplus;u⊧zmodels;u𝕞zmopf;zmp;u𝓂zmscr;zmstpos;uμzmu;u⊸z	multimap;zmumap;u⋙̸znGg;u≫⃒znGt;znGtv;u⇍znLeftarrow;u⇎znLeftrightarrow;u⋘̸znLl;u≪⃒znLt;znLtv;u⇏znRightarrow;u⊯znVDash;u⊮znVdash;znabla;uńznacute;u∠⃒znang;znap;u⩰̸znapE;u≋̸znapid;uʼnznapos;znapprox;u♮znatur;znatural;z	naturals;�nbspznbsp;znbump;znbumpe;u⩃zncap;uňzncaron;uņzncedil;zncong;u⩭̸z	ncongdot;u⩂zncup;uнzncy;u–zndash;zne;u⇗zneArr;u⤤znearhk;znearr;znearrow;u≐̸znedot;znequiv;u⤨znesear;znesim;znexist;znexists;u𝔫znfr;zngE;znge;zngeq;zngeqq;z
ngeqslant;znges;zngsim;zngt;zngtr;znhArr;u↮znharr;u⫲znhpar;zni;u⋼znis;u⋺znisd;zniv;uњznjcy;znlArr;u≦̸znlE;u↚znlarr;u‥znldr;znle;znleftarrow;znleftrightarrow;znleq;znleqq;z
nleqslant;znles;znless;znlsim;znlt;znltri;znltrie;znmid;u𝕟znopf;�¬�notznot;znotin;u⋹̸znotinE;u⋵̸z	notindot;znotinva;u⋷znotinvb;u⋶znotinvc;znotni;znotniva;u⋾znotnivb;u⋽znotnivc;znpar;z
nparallel;u⫽⃥znparsl;u∂̸znpart;u⨔znpolint;znpr;znprcue;znpre;znprec;znpreceq;znrArr;u↛znrarr;u⤳̸znrarrc;u↝̸znrarrw;znrightarrow;znrtri;znrtrie;znsc;znsccue;znsce;u𝓃znscr;z
nshortmid;znshortparallel;znsim;znsime;znsimeq;znsmid;znspar;znsqsube;znsqsupe;u⊄znsub;u⫅̸znsubE;znsube;znsubset;z
nsubseteq;znsubseteqq;znsucc;znsucceq;u⊅znsup;u⫆̸znsupE;znsupe;znsupset;z
nsupseteq;znsupseteqq;zntgl;�ñ�ntildezntilde;zntlg;zntriangleleft;zntrianglelefteq;zntriangleright;zntrianglerighteq;uνznu;�#znum;u№znumero;u znumsp;u⊭znvDash;u⤄znvHarr;u≍⃒znvap;u⊬znvdash;u≥⃒znvge;u>⃒znvgt;u⧞znvinfin;u⤂znvlArr;u≤⃒znvle;u<⃒znvlt;u⊴⃒znvltrie;u⤃znvrArr;u⊵⃒znvrtrie;u∼⃒znvsim;u⇖znwArr;u⤣znwarhk;znwarr;znwarrow;u⤧znwnear;zoS;�ó�oacutezoacute;zoast;zocir;�ô�ocirczocirc;uоzocy;zodash;uőzodblac;u⨸zodiv;zodot;u⦼zodsold;uœzoelig;u⦿zofcir;u𝔬zofr;u˛zogon;�ò�ogravezograve;u⧁zogt;u⦵zohbar;zohm;zoint;zolarr;u⦾zolcir;u⦻zolcross;zoline;u⧀zolt;uōzomacr;uωzomega;uοzomicron;u⦶zomid;zominus;u𝕠zoopf;u⦷zopar;u⦹zoperp;zoplus;u∨zor;zorarr;u⩝zord;uℴzorder;zorderof;�ª�ordfzordf;�º�ordmzordm;u⊶zorigof;u⩖zoror;u⩗zorslope;u⩛zorv;zoscr;�ø�oslashzoslash;u⊘zosol;�õ�otildezotilde;zotimes;u⨶z	otimesas;�ö�oumlzouml;u⌽zovbar;zpar;�¶�parazpara;z	parallel;u⫳zparsim;u⫽zparsl;zpart;uпzpcy;�%zpercnt;�.zperiod;u‰zpermil;zperp;u‱zpertenk;u𝔭zpfr;uφzphi;uϕzphiv;zphmmat;u☎zphone;uπzpi;z
pitchfork;uϖzpiv;zplanck;uℎzplanckh;zplankv;�+zplus;u⨣z	plusacir;zplusb;u⨢zpluscir;zplusdo;u⨥zplusdu;u⩲zpluse;�plusmnzplusmn;u⨦zplussim;u⨧zplustwo;zpm;u⨕z	pointint;u𝕡zpopf;�£�poundzpound;zpr;u⪳zprE;u⪷zprap;zprcue;zpre;zprec;zprecapprox;zpreccurlyeq;zpreceq;u⪹zprecnapprox;u⪵z	precneqq;u⋨z	precnsim;zprecsim;u′zprime;zprimes;zprnE;zprnap;zprnsim;zprod;u⌮z	profalar;u⌒z	profline;u⌓z	profsurf;zprop;zpropto;zprsim;u⊰zprurel;u𝓅zpscr;uψzpsi;u zpuncsp;u𝔮zqfr;zqint;u𝕢zqopf;u⁗zqprime;u𝓆zqscr;zquaternions;u⨖zquatint;�?zquest;zquesteq;�quotzrAarr;zrArr;u⤜zrAtail;zrBarr;u⥤zrHar;u∽̱zrace;uŕzracute;zradic;u⦳z	raemptyv;zrang;u⦒zrangd;u⦥zrange;zrangle;�»�raquozraquo;zrarr;u⥵zrarrap;zrarrb;u⤠zrarrbfs;u⤳zrarrc;u⤞zrarrfs;zrarrhk;zrarrlp;u⥅zrarrpl;u⥴zrarrsim;u↣zrarrtl;u↝zrarrw;u⤚zratail;u∶zratio;z
rationals;zrbarr;u❳zrbbrk;�}zrbrace;�]zrbrack;u⦌zrbrke;u⦎zrbrksld;u⦐zrbrkslu;uřzrcaron;uŗzrcedil;zrceil;zrcub;uрzrcy;u⤷zrdca;u⥩zrdldhar;zrdquo;zrdquor;u↳zrdsh;zreal;zrealine;z	realpart;zreals;u▭zrect;�regzreg;u⥽zrfisht;zrfloor;u𝔯zrfr;zrhard;zrharu;u⥬zrharul;uρzrho;uϱzrhov;zrightarrow;zrightarrowtail;zrightharpoondown;zrightharpoonup;zrightleftarrows;zrightleftharpoons;u⇉zrightrightarrows;zrightsquigarrow;u⋌zrightthreetimes;u˚zring;z
risingdotseq;zrlarr;zrlhar;u‏zrlm;u⎱zrmoust;zrmoustache;u⫮zrnmid;u⟭zroang;u⇾zroarr;zrobrk;u⦆zropar;u𝕣zropf;u⨮zroplus;u⨵zrotimes;�)zrpar;u⦔zrpargt;u⨒z	rppolint;zrrarr;u›zrsaquo;u𝓇zrscr;zrsh;zrsqb;zrsquo;zrsquor;zrthree;u⋊zrtimes;u▹zrtri;zrtrie;zrtrif;u⧎z	rtriltri;u⥨zruluhar;u℞zrx;uśzsacute;zsbquo;zsc;u⪴zscE;u⪸zscap;ušzscaron;zsccue;zsce;uşzscedil;uŝzscirc;u⪶zscnE;u⪺zscnap;u⋩zscnsim;u⨓z	scpolint;zscsim;uсzscy;u⋅zsdot;zsdotb;u⩦zsdote;u⇘zseArr;zsearhk;zsearr;zsearrow;�§�sectzsect;�;zsemi;u⤩zseswar;z	setminus;zsetmn;u✶zsext;u𝔰zsfr;zsfrown;u♯zsharp;uщzshchcy;uшzshcy;z	shortmid;zshortparallel;�­�shyzshy;uσzsigma;uςzsigmaf;zsigmav;zsim;u⩪zsimdot;zsime;zsimeq;u⪞zsimg;u⪠zsimgE;u⪝zsiml;u⪟zsimlE;u≆zsimne;u⨤zsimplus;u⥲zsimrarr;zslarr;zsmallsetminus;u⨳zsmashp;u⧤z	smeparsl;zsmid;u⌣zsmile;u⪪zsmt;u⪬zsmte;u⪬︀zsmtes;uьzsoftcy;�/zsol;u⧄zsolb;u⌿zsolbar;u𝕤zsopf;u♠zspades;z
spadesuit;zspar;zsqcap;u⊓︀zsqcaps;zsqcup;u⊔︀zsqcups;zsqsub;zsqsube;z	sqsubset;zsqsubseteq;zsqsup;zsqsupe;z	sqsupset;zsqsupseteq;zsqu;zsquare;zsquarf;zsquf;zsrarr;u𝓈zsscr;zssetmn;zssmile;zsstarf;u☆zstar;zstarf;zstraightepsilon;zstraightphi;zstrns;u⊂zsub;u⫅zsubE;u⪽zsubdot;zsube;u⫃zsubedot;u⫁zsubmult;u⫋zsubnE;u⊊zsubne;u⪿zsubplus;u⥹zsubrarr;zsubset;z	subseteq;z
subseteqq;z
subsetneq;zsubsetneqq;u⫇zsubsim;u⫕zsubsub;u⫓zsubsup;zsucc;zsuccapprox;zsucccurlyeq;zsucceq;zsuccnapprox;z	succneqq;z	succnsim;zsuccsim;zsum;u♪zsung;�¹�sup1zsup1;�²�sup2zsup2;�³�sup3zsup3;zsup;u⫆zsupE;u⪾zsupdot;u⫘zsupdsub;zsupe;u⫄zsupedot;u⟉zsuphsol;u⫗zsuphsub;u⥻zsuplarr;u⫂zsupmult;u⫌zsupnE;u⊋zsupne;u⫀zsupplus;zsupset;z	supseteq;z
supseteqq;z
supsetneq;zsupsetneqq;u⫈zsupsim;u⫔zsupsub;u⫖zsupsup;u⇙zswArr;zswarhk;zswarr;zswarrow;u⤪zswnwar;�ß�szligzszlig;u⌖ztarget;uτztau;ztbrk;uťztcaron;uţztcedil;uтztcy;ztdot;u⌕ztelrec;u𝔱ztfr;zthere4;z
therefore;uθztheta;uϑz	thetasym;zthetav;zthickapprox;z	thicksim;zthinsp;zthkap;zthksim;�þ�thornzthorn;ztilde;�×�timesztimes;ztimesb;u⨱z	timesbar;u⨰ztimesd;ztint;ztoea;ztop;u⌶ztopbot;u⫱ztopcir;u𝕥ztopf;u⫚ztopfork;ztosa;u‴ztprime;ztrade;u▵z	triangle;z
triangledown;z
triangleleft;ztrianglelefteq;u≜z
triangleq;ztriangleright;ztrianglerighteq;u◬ztridot;ztrie;u⨺z	triminus;u⨹ztriplus;u⧍ztrisb;u⨻ztritime;u⏢z	trpezium;u𝓉ztscr;uцztscy;uћztshcy;uŧztstrok;ztwixt;ztwoheadleftarrow;ztwoheadrightarrow;zuArr;u⥣zuHar;�ú�uacutezuacute;zuarr;uўzubrcy;uŭzubreve;�û�ucirczucirc;uуzucy;zudarr;uűzudblac;zudhar;u⥾zufisht;u𝔲zufr;�ù�ugravezugrave;zuharl;zuharr;u▀zuhblk;u⌜zulcorn;z	ulcorner;u⌏zulcrop;u◸zultri;uūzumacr;�umlzuml;uųzuogon;u𝕦zuopf;zuparrow;zupdownarrow;zupharpoonleft;zupharpoonright;zuplus;uυzupsi;zupsih;zupsilon;u⇈zupuparrows;u⌝zurcorn;z	urcorner;u⌎zurcrop;uůzuring;u◹zurtri;u𝓊zuscr;u⋰zutdot;uũzutilde;zutri;zutrif;zuuarr;�ü�uumlzuuml;u⦧zuwangle;zvArr;u⫨zvBar;u⫩zvBarv;zvDash;u⦜zvangrt;zvarepsilon;z	varkappa;zvarnothing;zvarphi;zvarpi;z
varpropto;zvarr;zvarrho;z	varsigma;u⊊︀z
varsubsetneq;u⫋︀zvarsubsetneqq;u⊋︀z
varsupsetneq;u⫌︀zvarsupsetneqq;z	vartheta;zvartriangleleft;zvartriangleright;uвzvcy;zvdash;zvee;u⊻zveebar;u≚zveeeq;u⋮zvellip;zverbar;zvert;u𝔳zvfr;zvltri;zvnsub;zvnsup;u𝕧zvopf;zvprop;zvrtri;u𝓋zvscr;zvsubnE;zvsubne;zvsupnE;zvsupne;u⦚zvzigzag;uŵzwcirc;u⩟zwedbar;zwedge;u≙zwedgeq;u℘zweierp;u𝔴zwfr;u𝕨zwopf;zwp;zwr;zwreath;u𝓌zwscr;zxcap;zxcirc;zxcup;zxdtri;u𝔵zxfr;zxhArr;zxharr;uξzxi;zxlArr;zxlarr;zxmap;u⋻zxnis;zxodot;u𝕩zxopf;zxoplus;zxotime;zxrArr;zxrarr;u𝓍zxscr;zxsqcup;zxuplus;zxutri;zxvee;zxwedge;�ý�yacutezyacute;uяzyacy;uŷzycirc;uыzycy;�¥�yenzyen;u𝔶zyfr;uїzyicy;u𝕪zyopf;u𝓎zyscr;uюzyucy;�ÿ�yumlzyuml;uźzzacute;užzzcaron;uзzzcy;użzzdot;zzeetrf;uζzzeta;u𝔷zzfr;uжzzhcy;u⇝zzigrarr;u𝕫zzopf;u𝓏zzscr;u‍zzwj;u‌zzwnj;u��
��������������������������������������cp437�437�cp850�850�cp852�852�cp855�855�cp857�857�cp860�860�cp861�861�cp862�862�cp863�863�cp865�865�cp866�866�cp869�869�ascii�ansix341968�ansix341986z	iso8859-6�arabic�asmo708�big5�	big5hkscs�gbk�chinese�cp037�cp1026�ptcp154�cp154�cp367�cp424�cp500�cp775zwindows-1252�cp819�cp864�cp936�cpgr�cpis�csascii�csbig5�cp949�cseuckr�euc_jp�cseucpkdfmtjapanese�csgb2312z	hp-roman8�
cshproman8�csibm037�	csibm1026�csibm424�csibm500�csibm855�csibm857�csibm860�csibm861�csibm863�csibm864�csibm865�csibm866�csibm869�
iso2022_jp�csiso2022jp�iso2022_jp_2�csiso2022jp2�
iso2022_kr�csiso2022kr�csiso58gb231280�csisolatin1z	iso8859-2�csisolatin2z	iso8859-3�csisolatin3z	iso8859-4�csisolatin4zwindows-1254�csisolatin5z
iso8859-10�csisolatin6�csisolatinarabicz	iso8859-5�csisolatincyrillicz	iso8859-7�csisolatingreekz	iso8859-8�csisolatinhebrewzkoi8-r�cskoi8r�
csksc56011987�
cspc775baltic�cspc850multilingual�cspc862latinhebrew�cspc8codepage437�cspcp852�	csptcp154�	shift_jis�
csshiftjiszutf-7�csunicode11utf7�cyrillic�
cyrillicasian�
ebcdiccpbe�
ebcdiccpca�
ebcdiccpch�
ebcdiccphe�
ebcdiccpnl�
ebcdiccpus�
ebcdiccpwt�ecma114�ecma118�elot928�eucjp�euckr�'extendedunixcodepackedformatforjapanese�gb18030�gb2312�gb231280�greek�greek8�hebrew�hproman8�hz�hzgb2312�ibm037�ibm1026�ibm367�ibm424�ibm437�ibm500�ibm775�ibm819�ibm850�ibm852�ibm855�ibm857�ibm860�ibm861�ibm862�ibm863�ibm864�ibm865�ibm866�ibm869�	iso2022jp�
iso2022jp2�	iso2022kr�
iso646irv1991�iso646us�iso88591�	iso885910�
iso8859101992�iso885911987z
iso8859-13�	iso885913z
iso8859-14�	iso885914�
iso8859141998z
iso8859-15�	iso885915z
iso8859-16�	iso885916�
iso8859162001�iso88592�iso885921987�iso88593�iso885931988�iso88594�iso885941988�iso88595�iso885951988�iso88596�iso885961987�iso88597�iso885971987�iso88598�iso885981988�iso88599�iso885991989�	isoceltic�isoir100�isoir101�isoir109�isoir110�isoir126�isoir127�isoir138�isoir144�isoir148�isoir149�isoir157�isoir199�isoir226�isoir58�isoir6�koi8rzkoi8-u�koi8u�korean�ksc5601�ksc56011987�ksc56011989�l1�l10�l2�l3�l4�l5�l6�l8�latin1�latin10�latin2�latin3�latin4�latin5�latin6�latin8�latin9�ms936�mskanji�pt154�r8�roman8�shiftjis�cp874�tis620�
unicode11utf7�us�usasciizutf-16�utf16z	utf-16-be�utf16bez	utf-16-le�utf16lezutf-8�utf8�cp1250�windows1250�cp1251�windows1251�cp1252�windows1252�cp1253�windows1253�cp1254�windows1254�cp1255�windows1255�cp1256�windows1256�cp1257�windows1257�cp1258�windows1258�
windows936zx-x-big5�Doctype��
Characters��SpaceCharacters��StartTag��EndTag��EmptyTag��Comment��
ParseErrorcCs"g|]\}}||f�qSrtrt)ru�k�vrtrtrzr{s	�mathc@seZdZdS)�DataLossWarningN)�__name__�
__module__�__qualname__rtrtrtrzr�sr�c@seZdZdS)�ReparseExceptionN)r�r�r�rtrtrtrzr�sr�)r|r}r~rr�)ztableztbodyztfootztheadztr)zh1zh2zh3zh4zh5zh6)zbasezcommandr�zlinkzmetazhrzbrzimgzembedzparamzareazcolzinputzsourceztrack)ztitleztextarea)zstylezscriptzxmpziframeznoembedznoframesznoscript)r�)r�)r�)r�r�)r�r�)r�r�)zopen)r��disabled)zhiddenr��checkedzdefault)r�)r��readonly)r�r�zselected)r�r�)r�r�)r�r�zrequiredr�r�r�)r�r�r�r�)r�r�) r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)r�r�r�r�r�)1�
__future__rrr�string�gettextr
�EOF�E�
namespaces�	frozenset�scopingElements�formattingElements�specialElements�htmlIntegrationPointElements�"mathmlTextIntegrationPointElements�adjustForeignAttributes�dict�items�unadjustForeignAttributes�spaceCharacters�tableInsertModeElements�ascii_lowercase�asciiLowercase�ascii_uppercase�asciiUppercase�
ascii_letters�asciiLetters�digits�	hexdigits�	hexDigits�asciiUpper2Lower�headingElements�voidElements�
cdataElements�rcdataElements�booleanAttributes�entitiesWindows1252�xmlEntities�entities�replacementCharacters�	encodings�
tokenTypes�
tagTokenTypes�prefixes�UserWarningr��	Exceptionr�rtrtrtrz�<module>s�	















































































































































































































































				





















python3.4/site-packages/pip/_vendor/html5lib/__pycache__/inputstream.cpython-34.pyc000064400000057624151735047530024235 0ustar00�
�Re�w�1@s�ddlmZmZmZddlmZddlZddlZddlm	Z	m
Z
mZmZddlm
Z
mZddlmZddlmZydd	lmZWnek
r�eZYnXydd
lmZWn(ek
r	Gdd�de�ZYnXed
d�e
D��Zedd�eD��Zedd�eD��Zeeddg�BZejd�Zeddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3g �Zejd4�Z iZ!Gd5d6�d6e�Z"dd7d7d8d9�Z#Gd:d;�d;e�Z$Gd<d=�d=e$�Z%Gd>d?�d?e&�Z'Gd@dA�dAe�Z(GdBdC�dCe�Z)dDdE�Z*dS)F�)�absolute_import�division�unicode_literals)�	text_typeN�)�EOF�spaceCharacters�asciiLetters�asciiUppercase)�	encodings�ReparseException)�utils)�StringIO)�BytesIO)�BufferedIOBasec@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�;/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/inputstream.pyrsrcCsg|]}|jd��qS)�ascii)�encode)�.0�itemrrr�
<listcomp>s	rcCsg|]}|jd��qS)r)r)rrrrrrs	cCsg|]}|jd��qS)r)r)rrrrrrs	�>�<u�[---Ÿ�-�﷐-﷯￾￿🿾🿿𯿾𯿿𿿾𿿿񏿾񏿿񟿾񟿿񯿾񯿿񿿾񿿿򏿾򏿿򟿾򟿿򯿾򯿿򿿾򿿿󏿾󏿿󟿾󟿿󯿾󯿿󿿾󿿿􏿾􏿿]i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��	i��	i��
i��
i��i��i��i��i��
i��
i��i��i��i��i��i��z[	-
 -/:-@[-`{-~]c@sjeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�BufferedStreamz�Buffering for streams that do not have buffering of their own

    The buffer is implemented as a list of chunks on the assumption that
    joining many strings will be slow since it is O(n**2)
    cCs%||_g|_ddg|_dS)Nrr���)�stream�buffer�position)�selfrrrr�__init__5s		zBufferedStream.__init__cCsPd}x2|jd|jd�D]}|t|�7}q!W||jd7}|S)Nrr)r r!�len)r"�pos�chunkrrr�tell:s
!zBufferedStream.tellcCsx||j�kst�|}d}x>t|j|�|krd|t|j|�8}|d7}q'W||g|_dS)Nrr)�_bufferedBytes�AssertionErrorr$r r!)r"r%�offset�irrr�seekAszBufferedStream.seekcCsp|js|j|�S|jdt|j�kr_|jdt|jd�kr_|j|�S|j|�SdS)Nrrr)r �_readStreamr!r$�_readFromBuffer)r"�bytesrrr�readJs	
 
zBufferedStream.readcCstdd�|jD��S)NcSsg|]}t|��qSr)r$)rrrrrrTs	z1BufferedStream._bufferedBytes.<locals>.<listcomp>)�sumr )r"rrrr(SszBufferedStream._bufferedBytescCsJ|jj|�}|jj|�|jdd7<t|�|jd<|S)Nrr)rr0r �appendr!r$)r"r/�datarrrr-Vs
zBufferedStream._readStreamcCs%|}g}|jd}|jd}x�|t|j�kr�|dkr�|dks\t�|j|}|t|�|kr�|}|||g|_n/t|�|}|t|�g|_|d7}|j||||��||8}d}q)W|r|j|j|��ndj|�S)Nrr�)r!r$r r)r2r-�join)r"r/�remainingBytes�rv�bufferIndex�bufferOffset�bufferedData�bytesToReadrrrr.]s&

$



zBufferedStream._readFromBufferN)rrr�__doc__r#r'r,r0r(r-r.rrrrr.s		rTcCs{t|d�r*t|jd�t�}nt|t�}|rd|dk	rZtd��nt|�St||||�SdS)Nr0rz7Cannot explicitly set an encoding with a unicode string)�hasattr�
isinstancer0r�	TypeError�HTMLUnicodeInputStream�HTMLBinaryInputStream)�source�encoding�	parseMeta�chardet�	isUnicoderrr�HTMLInputStreamxs
rGc@s�eZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
ddd�Zdd�Zdd�Z
ddd�Zdd�ZdS)r@z�Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    i(cCs�td�dkr3|j|_tjd�|_n|j|_tjd�|_dg|_d	|_|j	|�|_
|j�dS)
aInitialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        u􏿿ru	[�-�]u0([�-�](?![�-�])|(?<![�-�])[�-�])r�utf-8�certainN)rHzcertain)r$�characterErrorsUCS4�reportCharacterErrors�re�compile�replaceCharactersRegexp�characterErrorsUCS2�newLines�charEncoding�
openStream�
dataStream�reset)r"rBrrrr#�s	zHTMLUnicodeInputStream.__init__cCsCd|_d|_d|_g|_d|_d|_d|_dS)N�r)r&�	chunkSize�chunkOffset�errors�prevNumLines�prevNumCols�_bufferedCharacter)r"rrrrT�s						zHTMLUnicodeInputStream.resetcCs(t|d�r|}nt|�}|S)zvProduces a file object from source.

        source can be either a file object, local filename or a string.

        r0)r=r)r"rBrrrrrR�s	z!HTMLUnicodeInputStream.openStreamcCst|j}|jdd|�}|j|}|jdd|�}|dkr\|j|}n||d}||fS)N�
rrr)r&�countrY�rfindrZ)r"r*r&�nLines�positionLine�lastLinePos�positionColumnrrr�	_position�s	
z HTMLUnicodeInputStream._positioncCs&|j|j�\}}|d|fS)z:Returns (line, col) of the current position in the stream.r)rcrW)r"�line�colrrrr!�szHTMLUnicodeInputStream.positioncCsL|j|jkr%|j�s%tSn|j}|j|}|d|_|S)zo Read one character from the stream or queue if available. Return
            EOF when EOF is reached.
        r)rWrV�	readChunkrr&)r"rW�charrrrrg�s	

zHTMLUnicodeInputStream.charNcCs^|dkr|j}n|j|j�\|_|_d|_d|_d|_|jj|�}|j	r�|j	|}d|_	n
|s�dSt
|�dkr�t|d
�}|dks�d|ko�dknr�|d|_	|dd�}q�n|j|�|j
jd|�}|jd	d
�}|jdd
�}||_t
|�|_dS)NrUrFr�
i�i��u�z
r\�
Trrr)�_defaultChunkSizercrVrYrZr&rWrSr0r[r$�ordrKrN�sub�replace)r"rVr3�lastvrrrrf�s0				
(

	z HTMLUnicodeInputStream.readChunkcCs:x3tttj|���D]}|jjd�qWdS)Nzinvalid-codepoint)�ranger$�invalid_unicode_re�findallrXr2)r"r3r+rrrrJs"z*HTMLUnicodeInputStream.characterErrorsUCS4cCsd}x�tj|�D]�}|r(qnt|j��}|j�}tj|||d��r�tj|||d��}|tkr�|j	j
d�nd}q|dkr�|dkr�|t|�dkr�|j	j
d�qd}|j	j
d�qWdS)NF�zinvalid-codepointTi�i��r)rp�finditerrk�group�startr
�isSurrogatePair�surrogatePairToCodepoint�non_bmp_invalid_codepointsrXr2r$)r"r3�skip�match�	codepointr%�char_valrrrrOs 	z*HTMLUnicodeInputStream.characterErrorsUCS2Fc
Csqyt||f}Wn�tk
r�x&|D]}t|�dks+t�q+Wdjdd�|D��}|s|d|}ntjd|�}t||f<YnXg}x�|j|j|j	�}|dkr�|j	|j
kr-Pq-nE|j�}||j
kr-|j|j|j	|��||_	Pn|j|j|j	d��|j
�s�Pq�q�Wdj|�}	|	S)z� Returns a string of characters from the stream up to but not
        including any character in 'characters' or EOF. 'characters' must be
        a container that supports the 'in' method and iteration over its
        characters.
        �rUcSs g|]}dt|��qS)z\x%02x)rk)r�crrrr>s	z5HTMLUnicodeInputStream.charsUntil.<locals>.<listcomp>z^%sz[%s]+N)�charsUntilRegEx�KeyErrorrkr)r5rLrMrzr&rWrV�endr2rf)
r"�
characters�opposite�charsr~�regexr7�mr��rrrr�
charsUntil0s2


&	z!HTMLUnicodeInputStream.charsUntilcCso|dk	rk|jdkr=||j|_|jd7_qk|jd8_|j|j|kskt�ndS)Nrr)rWr&rVr))r"rgrrr�unget_szHTMLUnicodeInputStream.unget)rrrr<rjr#rTrRrcr!rgrfrJrOr�r�rrrrr@�s!(/r@c@syeZdZdZddddd�Zdd�Zdd	�Zddd
d�Zdd
�Zdd�Z	dd�Z
dS)rAz�Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    NTcCs�|j|�|_tj||j�t|�df|_d|_d|_d|_|jddkr�|j	||�|_n|j
�dS)aInitialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        rIi�dzwindows-1252rN)rR�	rawStreamr@r#�	codecNamerQ�numBytesMeta�numBytesChardet�defaultEncoding�detectEncodingrT)r"rBrCrDrErrrr#xs			zHTMLBinaryInputStream.__init__cCs6tj|jd�|jd�|_tj|�dS)Nrrm)�codecs�	getreaderrQr�rSr@rT)r"rrrrT�szHTMLBinaryInputStream.resetc	CsVt|d�r|}nt|�}y|j|j��Wnt|�}YnX|S)zvProduces a file object from source.

        source can be either a file object, local filename or a string.

        r0)r=rr,r'r)r"rBrrrrrR�s	z HTMLBinaryInputStream.openStreamc
Cs�|j�}d}|dkr9|r9|j�}d}n|dkr:|r:d}y�yddlm}Wn"tk
r�ddlm}YnXg}|�}x[|js�|jj|j	�}t
|t�s�t�|s�Pn|j
|�|j|�q�W|j�|jd}|jjd�Wq:tk
r6Yq:Xn|dkrXd}|j}nidd6}	|j�|	kr�|	|j�}n||fS)NrI�	tentativer)�UniversalDetectorrCzwindows-1252z
iso-8859-1)�	detectBOM�detectEncodingMeta�charade.universaldetectorr��ImportError�chardet.universaldetector�doner�r0r�r>r/r)r2�feed�close�resultr,r��lower)
r"rDrErC�
confidencer��buffers�detectorr �encodingSubrrrr��sB	
	




z$HTMLBinaryInputStream.detectEncodingcCs�|jddkst�t|�}|d	kr:d}n|dkrJdS||jdkrv|jddf|_nF|jjd�|j�|df|_td|jd|f��dS)
NrrI�utf-16�	utf-16-be�	utf-16-lezutf-8rzEncoding changed from %s to %s)r�r�r�)rQr)r�r�r,rTr)r"�newEncodingrrr�changeEncoding�s	
z$HTMLBinaryInputStream.changeEncodingcCs�idtj6dtj6dtj6dtj6dtj6}|jjd�}t|t	�s_t
�|j|dd��}d}|s�|j|�}d}|s�|j|dd	��}d	}q�n|jj|r�|p�d
�|S)z�Attempts to detect at BOM at the start of the stream. If
        an encoding can be determined from the BOM return the name of the
        encoding otherwise return Nonezutf-8z	utf-16-lez	utf-16-bez	utf-32-lez	utf-32-be�N�rrr)
r��BOM_UTF8�BOM_UTF16_LE�BOM_UTF16_BE�BOM_UTF32_LE�BOM_UTF32_BEr�r0r>r/r)�getr,)r"�bomDict�stringrCr,rrrr��s 
zHTMLBinaryInputStream.detectBOMcCsk|jj|j�}t|t�s*t�t|�}|jjd�|j�}|dkrgd}n|S)z9Report the encoding declared by the meta element
        r�utf-16�	utf-16-be�	utf-16-lezutf-8)r�r�r�)	r�r0r�r>r/r)�EncodingParserr,�getEncoding)r"r �parserrCrrrr�s	z(HTMLBinaryInputStream.detectEncodingMeta)rrrr<r#rTrRr�r�r�r�rrrrrAps(-rAc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zeee
�Z
dd�Zee�Zedd�Zdd�Zdd�Zdd�ZdS)�
EncodingBytesz�String-like object with an associated position and various extra methods
    If the position is ever greater than the string length then an exception is
    raisedcCs+t|t�st�tj||j��S)N)r>r/r)�__new__r�)r"�valuerrrr�&szEncodingBytes.__new__cCs
d|_dS)Nrr)rc)r"r�rrrr#*szEncodingBytes.__init__cCs|S)Nr)r"rrr�__iter__-szEncodingBytes.__iter__cCsV|jd}|_|t|�kr/t�n|dkrDt�n|||d�S)Nrr)rcr$�
StopIterationr?)r"�prrr�__next__0s		zEncodingBytes.__next__cCs
|j�S)N)r�)r"rrr�next8szEncodingBytes.nextcCs\|j}|t|�kr$t�n|dkr9t�n|d|_}|||d�S)Nrr)rcr$r�r?)r"r�rrr�previous<s			zEncodingBytes.previouscCs+|jt|�krt�n||_dS)N)rcr$r�)r"r!rrr�setPositionEs	zEncodingBytes.setPositioncCs<|jt|�krt�n|jdkr4|jSdSdS)Nr)rcr$r�)r"rrr�getPositionJs
	zEncodingBytes.getPositioncCs||j|jd�S)Nr)r!)r"rrr�getCurrentByteTszEncodingBytes.getCurrentBytecCsf|j}xM|t|�krX|||d�}||krK||_|S|d7}qW||_dS)zSkip past a list of charactersrN)r!r$rc)r"r�r�r~rrrryYs			zEncodingBytes.skipcCsf|j}xM|t|�krX|||d�}||krK||_|S|d7}qW||_dS)Nr)r!r$rc)r"r�r�r~rrr�	skipUntiles			zEncodingBytes.skipUntilcCsT|j}|||t|��}|j|�}|rP|jt|�7_n|S)z�Look for a sequence of bytes at the start of a string. If the bytes
        are found return True and advance the position to the byte after the
        match. Otherwise return False and leave the position alone)r!r$�
startswith)r"r/r�r3r7rrr�
matchBytesps	zEncodingBytes.matchBytescCsn||jd�j|�}|dkrd|jdkrCd|_n|j|t|�d7_dSt�dS)z�Look for the next sequence of bytes matching a given sequence. If
        a match is found advance the position to the last byte of the matchNrrTrr)r!�findrcr$r�)r"r/�newPositionrrr�jumpTo{szEncodingBytes.jumpToN)rrrr<r�r#r�r�r�r�r�r��propertyr!r��currentByte�spaceCharactersBytesryr�r�r�rrrrr�"s 	r�c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)r�z?Mini parser for detecting character encoding from meta elementscCst|�|_d|_dS)z3string - the data to work on for encoding detectionN)r�r3rC)r"r3rrrr#�szEncodingParser.__init__c
Cs�d|jfd|jfd|jfd|jfd|jfd|jff}xw|jD]l}d}xS|D]K\}}|jj|�rky|�}PWq�tk
r�d}PYq�XqkqkW|sXPqXqXW|jS)	Ns<!--s<metas</s<!s<?rTF)	�
handleComment�
handleMeta�handlePossibleEndTag�handleOther�handlePossibleStartTagr3r�r�rC)r"�methodDispatch�byte�keepParsing�key�methodrrrr��s&	

zEncodingParser.getEncodingcCs|jjd�S)zSkip over commentss-->)r3r�)r"rrrr��szEncodingParser.handleCommentcCsE|jjtkrdSd}d}x|j�}|dkrAdS|ddkr�|ddk}|r=|dk	r=||_dSq%|ddkr�|d}t|�}|dk	r=||_dSq%|ddkr%tt|d��}|j�}|dk	r=t|�}|dk	r:|r.||_dS|}q:q=q%q%WdS)	NTFrs
http-equivrscontent-typescharsetscontent)	r3r�r��getAttributerCr��ContentAttrParserr��parse)r"�	hasPragma�pendingEncoding�attr�tentativeEncoding�codec�
contentParserrrrr��s:	
		zEncodingParser.handleMetacCs
|jd�S)NF)�handlePossibleTag)r"rrrr��sz%EncodingParser.handlePossibleStartTagcCst|j�|jd�S)NT)r�r3r�)r"rrrr��s
z#EncodingParser.handlePossibleEndTagcCs�|j}|jtkr9|r5|j�|j�ndS|jt�}|dkra|j�n+|j�}x|dk	r�|j�}qpWdS)NTr)r3r��asciiLettersBytesr�r�r��spacesAngleBracketsr�)r"�endTagr3r~r�rrrr��s	


z EncodingParser.handlePossibleTagcCs|jjd�S)Nr)r3r�)r"rrrr��szEncodingParser.handleOthercCs�|j}|jttdg�B�}|dksIt|�dksIt�|d	krYdSg}g}x�|dkr~|r~Pnz|tkr�|j�}Pn^|d
kr�dj|�dfS|tkr�|j|j	��n|dkr�dS|j|�t
|�}qhW|dkr1|j�dj|�dfSt
|�|j�}|dkr�|}x�t
|�}||kr�t
|�dj|�dj|�fS|tkr�|j|j	��q\|j|�q\Wn^|dkr�dj|�dfS|tkr|j|j	��n|dkr!dS|j|�xwt
|�}|tkredj|�dj|�fS|tkr�|j|j	��q1|dkr�dS|j|�q1WdS)z_Return a name,value pair for the next attribute in the stream,
        if one is found, or None�/Nrr�=r4�'�")rN)r�r)r�r�)
r3ryr��	frozensetr$r)r5�asciiUppercaseBytesr2r�r�r�r�)r"r3r~�attrName�	attrValue�	quoteCharrrrr��sh	$




zEncodingParser.getAttributeN)
rrrr<r#r�r�r�r�r�r�r�r�rrrrr��s$r�c@s(eZdZdd�Zdd�ZdS)r�cCs"t|t�st�||_dS)N)r>r/r)r3)r"r3rrrr#?szContentAttrParser.__init__cCsNy1|jjd�|jjd7_|jj�|jjdksHdS|jjd7_|jj�|jjdkr�|jj}|jjd7_|jj}|jj|�r�|j||jj�SdSn]|jj}y+|jjt�|j||jj�SWn#tk
r/|j|d�SYnXWntk
rIdSYnXdS)Nscharsetrr�r�r�)r�r�)r3r�r!ryr�r�r�r�)r"�	quoteMark�oldPositionrrrr�Cs.



zContentAttrParser.parseN)rrrr#r�rrrrr�>sr�cCstt|t�r>y|jd�}Wq>tk
r:dSYq>Xn|rltjd|�j�}tj|d�SdSdS)z{Return the python codec name corresponding to an encoding or None if the
    string doesn't correspond to a valid encoding.rNrU)	r>r/�decode�UnicodeDecodeError�ascii_punctuation_rerlr�rr�)rC�
canonicalNamerrrr�es
r�)+�
__future__rrrZpip._vendor.sixrr�rL�	constantsrrr	r
rrrUr
�iorrr�r�objectr�r�r�r�r�rMrp�setrxr�rrrGr@rAr/r�r�r�r�rrrr�<module>sJ"

J��g�'python3.4/site-packages/pip/_vendor/html5lib/__pycache__/tokenizer.cpython-34.pyc000064400000136417151735047530023672 0ustar00�
�Re�,�@s	ddlmZmZmZy
eZWnek
r:YnXddlmZddl	m
Z
ddl	mZddl	mZm
Z
ddl	mZmZmZddl	mZmZdd	l	mZdd
lmZddlmZee�ZGdd
�d
e�ZdS)�)�absolute_import�division�unicode_literals)�deque�)�spaceCharacters)�entities)�asciiLetters�asciiUpper2Lower)�digits�	hexDigits�EOF)�
tokenTypes�
tagTokenTypes)�replacementCharacters)�HTMLInputStream)�Triec	s�eZdZdZdddddd�fdd�Zdd�Zdd	�Zdd
dd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Z d?d@�Z!dAdB�Z"dCdD�Z#dEdF�Z$dGdH�Z%dIdJ�Z&dKdL�Z'dMdN�Z(dOdP�Z)dQdR�Z*dSdT�Z+dUdV�Z,dWdX�Z-dYdZ�Z.d[d\�Z/d]d^�Z0d_d`�Z1dadb�Z2dcdd�Z3dedf�Z4dgdh�Z5didj�Z6dkdl�Z7dmdn�Z8dodp�Z9dqdr�Z:dsdt�Z;dudv�Z<dwdx�Z=dydz�Z>d{d|�Z?d}d~�Z@dd��ZAd�d��ZBd�d��ZCd�d��ZDd�d��ZEd�d��ZFd�d��ZGd�d��ZHd�d��ZId�d��ZJd�d��ZKd�d��ZL�S)��
HTMLTokenizera	 This class takes care of tokenizing HTML.

    * self.currentToken
      Holds the token that is currently being processed.

    * self.state
      Holds a reference to the method to be invoked... XXX

    * self.stream
      Points to HTMLInputStream object.
    NTcszt||||�|_||_||_||_d|_g|_|j|_d|_	d|_
tt|�j
�dS)NF)r�stream�parser�lowercaseElementName�lowercaseAttrName�
escapeFlag�
lastFourChars�	dataState�state�escape�currentToken�superr�__init__)�selfr�encoding�	parseMeta�
useChardetrrr)�	__class__��9/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/tokenizer.pyr%s							zHTMLTokenizer.__init__ccs}tg�|_xg|j�rxx6|jjrVitdd6|jjjd�d6Vq!Wx|jrt|jj�VqZWqWdS)z� This is where the magic happens.

        We do our usually processing through the states and when we have a token
        to return we yield the token which pauses processing until the next token
        is requested.
        �
ParseError�typer�dataN)r�
tokenQueuerr�errorsr�pop�popleft)r r%r%r&�__iter__9s*zHTMLTokenizer.__iter__c	%Cs�t}d}|r!t}d}ng}|jj�}x8||krp|tk	rp|j|�|jj�}q9Wtdj|�|�}|tkr�t|}|j	jit
dd6dd6i|d6d	6�n�d
|ko�dkns�|dkr3d
}|j	jit
dd6dd6i|d6d	6�nsd|koJdknsd|kofdknsd|ko�dknsd|ko�dkns|tddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7dg#�krQ|j	jit
dd6dd6i|d6d	6�nyt|�}WnBt
k
r�|d8}td
|d?B�td9|d:@B�}YnX|d;kr�|j	jit
dd6d<d6�|jj|�n|S)=z�This function returns either U+FFFD or the character based on the
        decimal or hexadecimal representation. It also discards ";" if present.
        If not present self.tokenQueue.append({"type": tokenTypes["ParseError"]}) is invoked.
        �
��r'r(z$illegal-codepoint-for-numeric-entityr)�	charAsInt�datavarsi�i��i��u�r�����i�i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��i��	i��	i��
i��
i��i��i��i��i��
i��
i��i��i��i��i��ii�i��;z numeric-entity-without-semicolon)rrr�charr
�append�int�joinrr*r�	frozenset�chr�
ValueError�unget)	r �isHex�allowed�radix�	charStack�cr2r;�vr%r%r&�consumeNumberEntityIs`	



+z!HTMLTokenizer.consumeNumberEntityFc	
Cs�d}|jj�g}|dtks]|dtddfks]|dk	rt||dkrt|jj|d�n�|ddkrpd}|j|jj��|ddkr�d	}|j|jj��n|r�|dtks�|r"|dtkr"|jj|d�|j|�}qD|j	jit
d
d6dd
6�|jj|j��ddj|�}n�xF|dtk	r�t
jdj|��s�Pn|j|jj��qsWy2t
jdj|dd���}t|�}Wntk
rd}YnX|dk	r�|ddkrG|j	jit
d
d6dd
6�n|ddkr�|r�||tks�||tks�||dkr�|jj|j��ddj|�}qDt|}|jj|j��|dj||d��7}nK|j	jit
d
d6dd
6�|jj|j��ddj|�}|rf|jd
dd|7<n=|tkr{d}nd}|j	jit
|d6|d
6�dS)N�&r�<�#Fr�x�XTr'r(zexpected-numeric-entityr)r1r:znamed-entity-without-semicolon�=zexpected-named-entity�SpaceCharacters�
Characters���)rMrNrRrRrRrRrRrRrRrR)rr;rr
rBr<rrrIr*rr,r>�entitiesTrie�has_keys_with_prefix�longest_prefix�len�KeyErrorr	rr)	r �allowedChar�
fromAttribute�outputrF�hex�
entityName�entityLength�	tokenTyper%r%r&�
consumeEntity�sf)"

 	zHTMLTokenizer.consumeEntitycCs|jd|dd�dS)zIThis method replaces the need for "entityInAttributeValueState".
        rXrYTN)r_)r rXr%r%r&�processEntityInAttribute�sz&HTMLTokenizer.processEntityInAttributecCs�|j}|dtkr�|jr<|djt�|d<n|dtdkr�|dr|jjitdd6dd6�n|dr�|jjitdd6dd6�q�q�n|jj|�|j|_	d	S)
z�This method is a generic handler for emitting the tags. It also sets
        the state to "data" because that's what's needed after a token has been
        emitted.
        r(�name�EndTagr)r'zattributes-in-end-tag�selfClosingzself-closing-flag-on-end-tagN)
rrr�	translater
rr*r<rr)r �tokenr%r%r&�emitCurrentToken�s		

zHTMLTokenizer.emitCurrentTokencCs(|jj�}|dkr*|j|_n�|dkrE|j|_n�|dkr�|jjitdd6dd6�|jjitdd6dd6�n�|tkr�d	S|t	kr�|jjitd
d6||jj
t	d�d6�n8|jj
d�}|jjitdd6||d6�dS)
NrJrK�r'r(zinvalid-codepointr)rQFrPT)rJrKrg)rr;�entityDataStater�tagOpenStater*r<rr
r�
charsUntil)r r)�charsr%r%r&r�s&!zHTMLTokenizer.dataStatecCs|j�|j|_dS)NT)r_rr)r r%r%r&rhs
zHTMLTokenizer.entityDataStatecCs(|jj�}|dkr*|j|_n�|dkrE|j|_n�|tkrUdS|dkr�|jjitdd6dd6�|jjitd	d6d
d6�n||t	kr�|jjitdd6||jj
t	d�d6�n8|jj
d
�}|jjitd	d6||d6�dS)NrJrKFrgr'r(zinvalid-codepointr)rQu�rPT)rJrKrg)rr;�characterReferenceInRcdatar�rcdataLessThanSignStater
r*r<rrrj)r r)rkr%r%r&�rcdataStates&!zHTMLTokenizer.rcdataStatecCs|j�|j|_dS)NT)r_rnr)r r%r%r&rl:s
z(HTMLTokenizer.characterReferenceInRcdatacCs�|jj�}|dkr*|j|_n�|dkr}|jjitdd6dd6�|jjitdd6dd6�nH|tkr�d	S|jjd�}|jjitdd6||d6�d
S)NrKrgr'r(zinvalid-codepointr)rQu�FT)rKrg)	rr;�rawtextLessThanSignStaterr*r<rr
rj)r r)rkr%r%r&�rawtextState?szHTMLTokenizer.rawtextStatecCs�|jj�}|dkr*|j|_n�|dkr}|jjitdd6dd6�|jjitdd6dd6�nH|tkr�d	S|jjd�}|jjitdd6||d6�d
S)NrKrgr'r(zinvalid-codepointr)rQu�FT)rKrg)	rr;�scriptDataLessThanSignStaterr*r<rr
rj)r r)rkr%r%r&�scriptDataStateQszHTMLTokenizer.scriptDataStatecCs�|jj�}|tkrdS|dkrr|jjitdd6dd6�|jjitdd6dd6�n2|jjitdd6||jjd�d6�d	S)
NFrgr'r(zinvalid-codepointr)rQu�T)rr;r
r*r<rrj)r r)r%r%r&�plaintextStatecszHTMLTokenizer.plaintextStatecCs�|jj�}|dkr*|j|_nr|dkrE|j|_nW|tkr�itdd6|d6gd6dd6dd	6|_|j|_n|d
kr�|j	j
itdd6dd6�|j	j
itd
d6dd6�|j|_n�|dkr<|j	j
itdd6dd6�|jj|�|j
|_n`|j	j
itdd6dd6�|j	j
itd
d6dd6�|jj|�|j|_dS)N�!�/�StartTagr(rar)Frc�selfClosingAcknowledged�>r'z'expected-tag-name-but-got-right-bracketrQz<>�?z'expected-tag-name-but-got-question-markzexpected-tag-namerKT)rr;�markupDeclarationOpenStater�closeTagOpenStater	rr�tagNameStater*r<rrB�bogusCommentState)r r)r%r%r&rirs6
""zHTMLTokenizer.tagOpenStatecCs?|jj�}|tkrSitdd6|d6gd6dd6|_|j|_n�|dkr�|jjitdd6d	d6�|j	|_n�|t
kr�|jjitdd6d
d6�|jjitdd6dd6�|j	|_nL|jjitdd6d
d6i|d6d6�|jj|�|j|_dS)Nrbr(rar)Frcrxr'z*expected-closing-tag-but-got-right-bracketz expected-closing-tag-but-got-eofrQz</z!expected-closing-tag-but-got-charr3T)
rr;r	rrr|rr*r<rr
rBr})r r)r%r%r&r{�s("zHTMLTokenizer.closeTagOpenStatecCs�|jj�}|tkr*|j|_n�|dkrC|j�n�|tkr�|jjit	dd6dd6�|j
|_nn|dkr�|j|_nS|dkr�|jjit	dd6dd6�|jd	d
7<n|jd	|7<dS)Nrxr'r(zeof-in-tag-namer)rurgzinvalid-codepointrau�T)
rr;r�beforeAttributeNameStaterrfr
r*r<rr�selfClosingStartTagStater)r r)r%r%r&r|�s"
zHTMLTokenizer.tagNameStatecCsu|jj�}|dkr3d|_|j|_n>|jjitdd6dd6�|jj|�|j	|_dS)Nrur1rQr(rKr)T)
rr;�temporaryBuffer�rcdataEndTagOpenStaterr*r<rrBrn)r r)r%r%r&rm�s	"z%HTMLTokenizer.rcdataLessThanSignStatecCs{|jj�}|tkr9|j|7_|j|_n>|jjitdd6dd6�|jj	|�|j
|_dS)NrQr(z</r)T)rr;r	r��rcdataEndTagNameStaterr*r<rrBrn)r r)r%r%r&r��s"z#HTMLTokenizer.rcdataEndTagOpenStatecCs�|jo(|jdj�|jj�k}|jj�}|tkr�|r�itdd6|jd6gd6dd6|_|j|_n|dkr�|r�itdd6|jd6gd6dd6|_|j	|_n�|dkr+|r+itdd6|jd6gd6dd6|_|j
�|j|_nc|tkrI|j|7_nE|j
jitd	d6d
|jd6�|jj|�|j|_dS)Nrarbr(r)FrcrurxrQz</T)r�lowerr�rr;rrr~rrrfrr	r*r<rBrn)r �appropriater)r%r%r&r��s2+



z#HTMLTokenizer.rcdataEndTagNameStatecCsu|jj�}|dkr3d|_|j|_n>|jjitdd6dd6�|jj|�|j	|_dS)Nrur1rQr(rKr)T)
rr;r��rawtextEndTagOpenStaterr*r<rrBrp)r r)r%r%r&ro�s	"z&HTMLTokenizer.rawtextLessThanSignStatecCs{|jj�}|tkr9|j|7_|j|_n>|jjitdd6dd6�|jj	|�|j
|_dS)NrQr(z</r)T)rr;r	r��rawtextEndTagNameStaterr*r<rrBrp)r r)r%r%r&r�s"z$HTMLTokenizer.rawtextEndTagOpenStatecCs�|jo(|jdj�|jj�k}|jj�}|tkr�|r�itdd6|jd6gd6dd6|_|j|_n|dkr�|r�itdd6|jd6gd6dd6|_|j	|_n�|dkr+|r+itdd6|jd6gd6dd6|_|j
�|j|_nc|tkrI|j|7_nE|j
jitd	d6d
|jd6�|jj|�|j|_dS)Nrarbr(r)FrcrurxrQz</T)rr�r�rr;rrr~rrrfrr	r*r<rBrp)r r�r)r%r%r&r�s2+



z$HTMLTokenizer.rawtextEndTagNameStatecCs�|jj�}|dkr3d|_|j|_n{|dkrp|jjitdd6dd6�|j|_n>|jjitdd6dd6�|jj	|�|j
|_d	S)
Nrur1rtrQr(z<!r)rKT)rr;r��scriptDataEndTagOpenStaterr*r<r�scriptDataEscapeStartStaterBrr)r r)r%r%r&rq's	""z)HTMLTokenizer.scriptDataLessThanSignStatecCs{|jj�}|tkr9|j|7_|j|_n>|jjitdd6dd6�|jj	|�|j
|_dS)NrQr(z</r)T)rr;r	r��scriptDataEndTagNameStaterr*r<rrBrr)r r)r%r%r&r�5s"z'HTMLTokenizer.scriptDataEndTagOpenStatecCs�|jo(|jdj�|jj�k}|jj�}|tkr�|r�itdd6|jd6gd6dd6|_|j|_n|dkr�|r�itdd6|jd6gd6dd6|_|j	|_n�|dkr+|r+itdd6|jd6gd6dd6|_|j
�|j|_nc|tkrI|j|7_nE|j
jitd	d6d
|jd6�|jj|�|j|_dS)Nrarbr(r)FrcrurxrQz</T)rr�r�rr;rrr~rrrfrr	r*r<rBrr)r r�r)r%r%r&r�@s2+



z'HTMLTokenizer.scriptDataEndTagNameStatecCsl|jj�}|dkrL|jjitdd6dd6�|j|_n|jj|�|j|_dS)N�-rQr(r)T)	rr;r*r<r�scriptDataEscapeStartDashStaterrBrr)r r)r%r%r&r�\s"z(HTMLTokenizer.scriptDataEscapeStartStatecCsl|jj�}|dkrL|jjitdd6dd6�|j|_n|jj|�|j|_dS)Nr�rQr(r)T)	rr;r*r<r�scriptDataEscapedDashDashStaterrBrr)r r)r%r%r&r�fs"z,HTMLTokenizer.scriptDataEscapeStartDashStatecCs|jj�}|dkrL|jjitdd6dd6�|j|_n�|dkrg|j|_n�|dkr�|jjitdd6dd6�|jjitdd6d	d6�nS|tkr�|j	|_n8|jj
d�}|jjitdd6||d6�d
S)Nr�rQr(r)rKrgr'zinvalid-codepointu�T)rKr�rg)rr;r*r<r�scriptDataEscapedDashStater�"scriptDataEscapedLessThanSignStater
rrj)r r)rkr%r%r&�scriptDataEscapedStateps""z$HTMLTokenizer.scriptDataEscapedStatecCs|jj�}|dkrL|jjitdd6dd6�|j|_n�|dkrg|j|_n�|dkr�|jjitdd6dd6�|jjitdd6d	d6�|j|_nI|t	kr�|j
|_n.|jjitdd6|d6�|j|_d
S)Nr�rQr(r)rKrgr'zinvalid-codepointu�T)rr;r*r<rr�rr�r�r
r)r r)r%r%r&r��s"""z(HTMLTokenizer.scriptDataEscapedDashStatecCsD|jj�}|dkr@|jjitdd6dd6�n|dkr[|j|_n�|dkr�|jjitdd6dd6�|j|_n�|dkr�|jjitdd6d	d6�|jjitdd6d
d6�|j|_nI|t	kr|j
|_n.|jjitdd6|d6�|j|_dS)Nr�rQr(r)rKrxrgr'zinvalid-codepointu�T)rr;r*r<rr�rrrr�r
r)r r)r%r%r&r��s&%""z,HTMLTokenizer.scriptDataEscapedDashDashStatecCs�|jj�}|dkr3d|_|j|_n�|tkr}|jjitdd6d|d6�||_|j	|_n>|jjitdd6dd6�|jj
|�|j|_dS)Nrur1rQr(rKr)T)rr;r�� scriptDataEscapedEndTagOpenStaterr	r*r<r� scriptDataDoubleEscapeStartStaterBr�)r r)r%r%r&r��s	&	"z0HTMLTokenizer.scriptDataEscapedLessThanSignStatecCsu|jj�}|tkr3||_|j|_n>|jjitdd6dd6�|jj	|�|j
|_dS)NrQr(z</r)T)rr;r	r�� scriptDataEscapedEndTagNameStaterr*r<rrBr�)r r)r%r%r&r��s	"z.HTMLTokenizer.scriptDataEscapedEndTagOpenStatecCs�|jo(|jdj�|jj�k}|jj�}|tkr�|r�itdd6|jd6gd6dd6|_|j|_n|dkr�|r�itdd6|jd6gd6dd6|_|j	|_n�|dkr+|r+itdd6|jd6gd6dd6|_|j
�|j|_nc|tkrI|j|7_nE|j
jitd	d6d
|jd6�|jj|�|j|_dS)Nrarbr(r)FrcrurxrQz</T)rr�r�rr;rrr~rrrfrr	r*r<rBr�)r r�r)r%r%r&r��s2+



z.HTMLTokenizer.scriptDataEscapedEndTagNameStatecCs�|jj�}|ttd�Bkrz|jjitdd6|d6�|jj�dkrk|j	|_
q�|j|_
n\|tkr�|jjitdd6|d6�|j|7_n|jj
|�|j|_
dS)	NrurxrQr(r)�scriptT)rurx)rr;rr?r*r<rr�r��scriptDataDoubleEscapedStaterr�r	rB)r r)r%r%r&r��s""z.HTMLTokenizer.scriptDataDoubleEscapeStartStatecCs?|jj�}|dkrL|jjitdd6dd6�|j|_n�|dkr�|jjitdd6dd6�|j|_n�|dkr�|jjitdd6dd6�|jjitdd6d	d6�n_|tkr|jjitdd6d
d6�|j	|_n"|jjitdd6|d6�dS)Nr�rQr(r)rKrgr'zinvalid-codepointu�zeof-in-script-in-scriptT)
rr;r*r<r� scriptDataDoubleEscapedDashStater�(scriptDataDoubleEscapedLessThanSignStater
r)r r)r%r%r&r��s$"""z*HTMLTokenizer.scriptDataDoubleEscapedStatecCsW|jj�}|dkrL|jjitdd6dd6�|j|_n|dkr�|jjitdd6dd6�|j|_n�|dkr�|jjitdd6dd6�|jjitdd6d	d6�|j|_nk|t	kr%|jjitdd6d
d6�|j
|_n.|jjitdd6|d6�|j|_dS)Nr�rQr(r)rKrgr'zinvalid-codepointu�zeof-in-script-in-scriptT)rr;r*r<r�$scriptDataDoubleEscapedDashDashStaterr�r�r
r)r r)r%r%r&r�	s("""z.HTMLTokenizer.scriptDataDoubleEscapedDashStatecCs�|jj�}|dkr@|jjitdd6dd6�nD|dkr}|jjitdd6dd6�|j|_n|dkr�|jjitdd6dd6�|j|_n�|dkr|jjitdd6d	d6�|jjitdd6d
d6�|j|_nk|t	krV|jjitdd6dd6�|j
|_n.|jjitdd6|d6�|j|_dS)
Nr�rQr(r)rKrxrgr'zinvalid-codepointu�zeof-in-script-in-scriptT)rr;r*r<rr�rrrr�r
r)r r)r%r%r&r� s,%"""z2HTMLTokenizer.scriptDataDoubleEscapedDashDashStatecCsu|jj�}|dkrU|jjitdd6dd6�d|_|j|_n|jj|�|j	|_dS)NrurQr(r)r1T)
rr;r*r<rr��scriptDataDoubleEscapeEndStaterrBr�)r r)r%r%r&r�9s"	z6HTMLTokenizer.scriptDataDoubleEscapedLessThanSignStatecCs�|jj�}|ttd�Bkrz|jjitdd6|d6�|jj�dkrk|j	|_
q�|j|_
n\|tkr�|jjitdd6|d6�|j|7_n|jj
|�|j|_
dS)	NrurxrQr(r)r�T)rurx)rr;rr?r*r<rr�r�r�rr�r	rB)r r)r%r%r&r�Ds""z,HTMLTokenizer.scriptDataDoubleEscapeEndStatecCs�|jj�}|tkr1|jjtd�nz|tkrf|jdj|dg�|j|_nE|dkr|j	�n,|dkr�|j
|_n|dkr�|jjitd
d6dd6�|jdj|dg�|j|_n�|d
krH|jjitd
d6dd6�|jdjddg�|j|_nc|t
kr�|jjitd
d6dd6�|j|_n&|jdj|dg�|j|_dS)NTr)r1rxru�'�"rOrKr'r(z#invalid-character-in-attribute-namergzinvalid-codepointu�z#expected-attribute-name-but-got-eof)r�r�rOrK)rr;rrjr	rr<�attributeNameStaterrfrr*rr
r)r r)r%r%r&r~Ts6
z&HTMLTokenizer.beforeAttributeNameStatecCs�|jj�}d}d}|dkr6|j|_n�|tkrw|jddd||jjtd�7<d}nG|dkr�d}n2|tkr�|j|_n|dkr�|j	|_n�|d	kr|j
jitd
d6dd6�|jdddd
7<d}n�|dkrb|j
jitd
d6dd6�|jddd|7<d}n\|t
kr�|j
jitd
d6dd6�|j|_n|jddd|7<d}|r||jr�|jdddjt�|jddd<nxf|jddd�D]M\}}|jddd|kr|j
jitd
d6dd6�PqqW|r||j�q|ndS)NTFrOr)rrrxrurgr'r(zinvalid-codepointu�r�r�rKz#invalid-character-in-attribute-namezeof-in-attribute-namezduplicate-attributerRrR)r�r�rKrRrRrRrRrRrR)rr;�beforeAttributeValueStaterr	rrjr�afterAttributeNameStaterr*r<rr
rrrdr
rf)r r)�leavingThisState�	emitTokenra�valuer%r%r&r�rsT					0$z HTMLTokenizer.attributeNameStatecCs�|jj�}|tkr1|jjtd�n�|dkrL|j|_nz|dkre|j�na|tkr�|jdj	|dg�|j
|_n,|dkr�|j|_n|dkr|jj	it
dd	6d
d6�|jdj	ddg�|j
|_n�|dkrc|jj	it
dd	6dd6�|jdj	|dg�|j
|_nc|tkr�|jj	it
dd	6dd6�|j|_n&|jdj	|dg�|j
|_dS)NTrOrxr)r1rurgr'r(zinvalid-codepointu�r�r�rKz&invalid-character-after-attribute-namezexpected-end-of-tag-but-got-eof)r�r�rK)rr;rrjr�rrfr	rr<r�rr*rr
r)r r)r%r%r&r��s:
z%HTMLTokenizer.afterAttributeNameStatecCs�|jj�}|tkr1|jjtd�n�|dkrL|j|_n�|dkrw|j|_|jj|�nd|dkr�|j|_nI|dkr�|j	j
itdd6dd	6�|j�n|d
kr#|j	j
itdd6dd	6�|j
d	ddd
7<|j|_n�|dkry|j	j
itdd6dd	6�|j
d	dd|7<|j|_nb|tkr�|j	j
itdd6dd	6�|j|_n%|j
d	dd|7<|j|_dS)NTr�rJr�rxr'r(z.expected-attribute-value-but-got-right-bracketr)rgzinvalid-codepointru�rOrK�`z"equals-in-unquoted-attribute-valuez$expected-attribute-value-but-got-eofrR)rOrKr�rRrR)rr;rrj�attributeValueDoubleQuotedStater�attributeValueUnQuotedStaterB�attributeValueSingleQuotedStater*r<rrfrr
r)r r)r%r%r&r��s>
z'HTMLTokenizer.beforeAttributeValueStatecCs�|jj�}|dkr*|j|_n�|dkrF|jd�n�|dkr�|jjitdd6dd6�|jdddd	7<nf|t	kr�|jjitdd6d
d6�|j
|_n)|jdd
d||jjd�7<dS)Nr�rJrgr'r(zinvalid-codepointr)ru�z#eof-in-attribute-value-double-quoteTrRrR)r�rJrg)rr;�afterAttributeValueStaterr`r*r<rrr
rrj)r r)r%r%r&r��s z-HTMLTokenizer.attributeValueDoubleQuotedStatecCs�|jj�}|dkr*|j|_n�|dkrF|jd�n�|dkr�|jjitdd6dd6�|jdddd	7<nf|t	kr�|jjitdd6d
d6�|j
|_n)|jdd
d||jjd�7<dS)Nr�rJrgr'r(zinvalid-codepointr)ru�z#eof-in-attribute-value-single-quoteTrRrR)r�rJrg)rr;r�rr`r*r<rrr
rrj)r r)r%r%r&r��s z-HTMLTokenizer.attributeValueSingleQuotedStatecCsg|jj�}|tkr*|j|_n9|dkrF|jd�n|dkr_|j�n|dkr�|jjit	dd	6d
d6�|j
ddd|7<n�|d
kr�|jjit	dd	6dd6�|j
dddd7<np|tkr0|jjit	dd	6dd6�|j|_n3|j
ddd||jj
td�tB�7<dS)NrJrxr�r�rOrKr�r'r(z0unexpected-character-in-unquoted-attribute-valuer)rrgzinvalid-codepointu�z eof-in-attribute-value-no-quotesT)r�r�rOrKr�rRrRrR)rJrxr�r�rOrKr�rg)rr;rr~rr`rfr*r<rrr
rrjr?)r r)r%r%r&r�s,
z)HTMLTokenizer.attributeValueUnQuotedStatecCs�|jj�}|tkr*|j|_n�|dkrC|j�n�|dkr^|j|_n�|tkr�|jj	it
dd6dd6�|jj|�|j|_n>|jj	it
dd6dd6�|jj|�|j|_dS)	Nrxrur'r(z$unexpected-EOF-after-attribute-valuer)z*unexpected-character-after-attribute-valueT)
rr;rr~rrfrr
r*r<rrBr)r r)r%r%r&r�*s"
z&HTMLTokenizer.afterAttributeValueStatecCs�|jj�}|dkr5d|jd<|j�n�|tkr�|jjitdd6dd6�|jj|�|j	|_
n>|jjitdd6dd6�|jj|�|j|_
dS)	NrxTrcr'r(z#unexpected-EOF-after-solidus-in-tagr)z)unexpected-character-after-solidus-in-tag)rr;rrfr
r*r<rrBrrr~)r r)r%r%r&r>s

z&HTMLTokenizer.selfClosingStartTagStatecCsc|jjd�}|jdd�}|jjitdd6|d6�|jj�|j|_dS)Nrxrgu��Commentr(r)T)	rrj�replacer*r<rr;rr)r r)r%r%r&r}Ps	
zHTMLTokenizer.bogusCommentStatecCs0|jj�g}|d dkrv|j|jj��|d!dkr�itdd6dd6|_|j|_dSne|d"d#krd}x>d*D]6}|j|jj��|d+|kr�d}Pq�q�W|r�itdd6dd6dd6dd6dd6|_|j|_dSn�|d,dkr�|jdk	r�|jj	j
r�|jj	j
d-j|jj	jkr�d}xPd
d	ddddgD]6}|j|jj��|d.|kr�d}Pq�q�W|r�|j
|_dSn|jjitdd6dd6�x |r|jj|j��qW|j|_dS)/Nrr�r�r(r1r)T�d�D�o�OrG�C�t�T�y�Y�p�P�e�EF�Doctypera�publicId�systemId�correct�[�Ar'zexpected-dashes-or-doctyperRrRrR)r�r��r�r��rGr��r�r��r�r��r�r��r�r�)r�r�r�r�r�r�rRrRrRrR)rr;r<rr�commentStartStater�doctypeStater�tree�openElements�	namespace�defaultNamespace�cdataSectionStater*rBr,r})r rF�matched�expectedr%r%r&rz_sR

%	z(HTMLTokenizer.markupDeclarationOpenStatecCs-|jj�}|dkr*|j|_n�|dkrl|jjitdd6dd6�|jdd7<n�|dkr�|jjitdd6d	d6�|jj|j�|j|_nm|t	kr|jjitdd6d
d6�|jj|j�|j|_n|jd|7<|j
|_dS)Nr�rgr'r(zinvalid-codepointr)u�rxzincorrect-commentzeof-in-commentT)rr;�commentStartDashStaterr*r<rrrr
�commentState)r r)r%r%r&r��s(zHTMLTokenizer.commentStartStatecCs1|jj�}|dkr*|j|_n|dkrl|jjitdd6dd6�|jdd7<n�|dkr�|jjitdd6d	d6�|jj|j�|j|_nq|t	kr|jjitdd6d
d6�|jj|j�|j|_n!|jdd|7<|j
|_dS)Nr�rgr'r(zinvalid-codepointr)u-�rxzincorrect-commentzeof-in-commentT)rr;�commentEndStaterr*r<rrrr
r�)r r)r%r%r&r��s(z#HTMLTokenizer.commentStartDashStatecCs�|jj�}|dkr*|j|_n�|dkrl|jjitdd6dd6�|jdd7<nq|tkr�|jjitdd6dd6�|jj|j�|j	|_n!|jd||jj
d
�7<d	S)Nr�rgr'r(zinvalid-codepointr)u�zeof-in-commentT)r�rg)rr;�commentEndDashStaterr*r<rrr
rrj)r r)r%r%r&r��szHTMLTokenizer.commentStatecCs�|jj�}|dkr*|j|_n�|dkrx|jjitdd6dd6�|jdd7<|j|_nq|t	kr�|jjitdd6dd6�|jj|j�|j
|_n!|jdd|7<|j|_d	S)
Nr�rgr'r(zinvalid-codepointr)u-�zeof-in-comment-end-dashT)rr;r�rr*r<rrr�r
r)r r)r%r%r&r��s z!HTMLTokenizer.commentEndDashStatecCs�|jj�}|dkr=|jj|j�|j|_n`|dkr�|jjitdd6dd6�|jdd7<|j|_n|dkr�|jjitdd6d	d6�|j	|_n�|d
kr
|jjitdd6dd6�|jd|7<n�|t
krZ|jjitdd6dd6�|jj|j�|j|_nC|jjitdd6d
d6�|jdd|7<|j|_dS)Nrxrgr'r(zinvalid-codepointr)u--�rtz,unexpected-bang-after-double-dash-in-commentr�z,unexpected-dash-after-double-dash-in-commentzeof-in-comment-double-dashzunexpected-char-in-commentz--T)rr;r*r<rrrrr��commentEndBangStater
)r r)r%r%r&r��s6zHTMLTokenizer.commentEndStatecCs,|jj�}|dkr=|jj|j�|j|_n�|dkri|jdd7<|j|_n�|dkr�|jjitdd6dd6�|jdd	7<|j	|_nq|t
kr|jjitdd6d
d6�|jj|j�|j|_n!|jdd|7<|j	|_dS)Nrxr�r)z--!rgr'r(zinvalid-codepointu--!�zeof-in-comment-end-bang-stateT)rr;r*r<rrrr�rr�r
)r r)r%r%r&r��s(z!HTMLTokenizer.commentEndBangStatecCs�|jj�}|tkr*|j|_n�|tkr�|jjitdd6dd6�d|j	d<|jj|j	�|j
|_n>|jjitdd6dd6�|jj|�|j|_dS)	Nr'r(z!expected-doctype-name-but-got-eofr)Fr�zneed-space-after-doctypeT)rr;r�beforeDoctypeNameStaterr
r*r<rrrrB)r r)r%r%r&r�s
zHTMLTokenizer.doctypeStatecCs?|jj�}|tkrn|dkr{|jjitdd6dd6�d|jd<|jj|j�|j|_n�|dkr�|jjitdd6d	d6�d
|jd<|j	|_nv|t
kr"|jjitdd6dd6�d|jd<|jj|j�|j|_n||jd<|j	|_d
S)Nrxr'r(z+expected-doctype-name-but-got-right-bracketr)Fr�rgzinvalid-codepointu�raz!expected-doctype-name-but-got-eofT)rr;rr*r<rrrr�doctypeNameStater
)r r)r%r%r&r�&s.



z$HTMLTokenizer.beforeDoctypeNameStatecCso|jj�}|tkrG|jdjt�|jd<|j|_n$|dkr�|jdjt�|jd<|jj	|j�|j
|_n�|dkr�|jj	itdd6dd6�|jdd7<|j|_n�|t
krZ|jj	itdd6d	d6�d
|jd<|jdjt�|jd<|jj	|j�|j
|_n|jd|7<dS)
Nrarxrgr'r(zinvalid-codepointr)u�zeof-in-doctype-nameFr�T)rr;rrrdr
�afterDoctypeNameStaterr*r<rrr�r
)r r)r%r%r&r�@s,
zHTMLTokenizer.doctypeNameStatecCs�|jj�}|tkrn�|dkrL|jj|j�|j|_n�|tkr�d|jd<|jj	|�|jjit
dd6dd6�|jj|j�|j|_n|d!krd
}x3d'D]+}|jj�}||kr�d}Pq�q�W|r{|j|_d
Sna|d(kr{d
}x3d.D]+}|jj�}||kr3d}Pq3q3W|r{|j|_d
Sn|jj	|�|jjit
dd6dd6i|d6d 6�d|jd<|j
|_d
S)/NrxFr�r'r(zeof-in-doctyper)r�r�T�u�U�b�B�l�L�i�IrGr��s�Sr�r�r�r�r�r��m�Mz*expected-space-or-right-bracket-in-doctyper3)r�r��r�r��r�r��r�r��r�r��rGr�)r�r�r�r�r�)r�r��r�r��r�r��r�r��r�r��r�r�)r�r�r�r�r�)rr;rr*r<rrrr
rBr�afterDoctypePublicKeywordState�afterDoctypeSystemKeywordState�bogusDoctypeState)r r)r�r�r%r%r&r�YsT



z#HTMLTokenizer.afterDoctypeNameStatecCs�|jj�}|tkr*|j|_n�|dkrw|jjitdd6dd6�|jj|�|j|_ny|t	kr�|jjitdd6dd6�d|j
d	<|jj|j
�|j|_n|jj|�|j|_d
S)Nr�r�r'r(zunexpected-char-in-doctyper)zeof-in-doctypeFr�T)r�r�)rr;r�"beforeDoctypePublicIdentifierStaterr*r<rrBr
rr)r r)r%r%r&r��s"
z,HTMLTokenizer.afterDoctypePublicKeywordStatecCsg|jj�}|tkrnE|dkrFd|jd<|j|_n|dkrnd|jd<|j|_n�|dkr�|jjit	dd6dd	6�d
|jd<|jj|j�|j
|_n�|tkr(|jjit	dd6dd	6�d
|jd<|jj|j�|j
|_n;|jjit	dd6d
d	6�d
|jd<|j|_dS)Nr�r1r�r�rxr'r(zunexpected-end-of-doctyper)Fr�zeof-in-doctypezunexpected-char-in-doctypeT)
rr;rr�(doctypePublicIdentifierDoubleQuotedStater�(doctypePublicIdentifierSingleQuotedStater*r<rrr
r�)r r)r%r%r&r��s4




z0HTMLTokenizer.beforeDoctypePublicIdentifierStatecCs;|jj�}|dkr*|j|_n
|dkrl|jjitdd6dd6�|jdd7<n�|d	kr�|jjitdd6d
d6�d|jd<|jj|j�|j|_nn|t	kr&|jjitdd6d
d6�d|jd<|jj|j�|j|_n|jd|7<dS)Nr�rgr'r(zinvalid-codepointr)r�u�rxzunexpected-end-of-doctypeFr�zeof-in-doctypeT)
rr;�!afterDoctypePublicIdentifierStaterr*r<rrrr
)r r)r%r%r&r��s*

z6HTMLTokenizer.doctypePublicIdentifierDoubleQuotedStatecCs;|jj�}|dkr*|j|_n
|dkrl|jjitdd6dd6�|jdd7<n�|d	kr�|jjitdd6d
d6�d|jd<|jj|j�|j|_nn|t	kr&|jjitdd6d
d6�d|jd<|jj|j�|j|_n|jd|7<dS)Nr�rgr'r(zinvalid-codepointr)r�u�rxzunexpected-end-of-doctypeFr�zeof-in-doctypeT)
rr;r�rr*r<rrrr
)r r)r%r%r&r��s*

z6HTMLTokenizer.doctypePublicIdentifierSingleQuotedStatecCs�|jj�}|tkr*|j|_nZ|dkrX|jj|j�|j|_n,|dkr�|jjit	dd6dd6�d|jd<|j
|_n�|d	kr�|jjit	dd6dd6�d|jd<|j|_n�|tkrI|jjit	dd6d
d6�d|jd<|jj|j�|j|_n;|jjit	dd6dd6�d|jd<|j
|_d
S)Nrxr�r'r(zunexpected-char-in-doctyper)r1r�r�zeof-in-doctypeFr�T)rr;r�-betweenDoctypePublicAndSystemIdentifiersStaterr*r<rrr�(doctypeSystemIdentifierDoubleQuotedState�(doctypeSystemIdentifierSingleQuotedStater
r�)r r)r%r%r&r��s6



z/HTMLTokenizer.afterDoctypePublicIdentifierStatecCs8|jj�}|tkrn|dkrL|jj|j�|j|_n�|dkrtd|jd<|j|_n�|dkr�d|jd<|j	|_n�|t
kr�|jjitdd6dd	6�d
|jd<|jj|j�|j|_n;|jjitdd6dd	6�d
|jd<|j|_d
S)Nrxr�r1r�r�r'r(zeof-in-doctyper)Fr�zunexpected-char-in-doctypeT)
rr;rr*r<rrrr�r�r
rr�)r r)r%r%r&r�s.



z;HTMLTokenizer.betweenDoctypePublicAndSystemIdentifiersStatecCs�|jj�}|tkr*|j|_n�|dkrw|jjitdd6dd6�|jj|�|j|_ny|t	kr�|jjitdd6dd6�d|j
d	<|jj|j
�|j|_n|jj|�|j|_d
S)Nr�r�r'r(zunexpected-char-in-doctyper)zeof-in-doctypeFr�T)r�r�)rr;r�"beforeDoctypeSystemIdentifierStaterr*r<rrBr
rr)r r)r%r%r&r�%s"
z,HTMLTokenizer.afterDoctypeSystemKeywordStatecCsg|jj�}|tkrnE|dkrFd|jd<|j|_n|dkrnd|jd<|j|_n�|dkr�|jjit	dd6dd	6�d
|jd<|jj|j�|j
|_n�|tkr(|jjit	dd6dd	6�d
|jd<|jj|j�|j
|_n;|jjit	dd6dd	6�d
|jd<|j|_d
S)Nr�r1r�r�rxr'r(zunexpected-char-in-doctyper)Fr�zeof-in-doctypeT)
rr;rrr�rr�r*r<rrr
r�)r r)r%r%r&r�9s4




z0HTMLTokenizer.beforeDoctypeSystemIdentifierStatecCs;|jj�}|dkr*|j|_n
|dkrl|jjitdd6dd6�|jdd7<n�|d	kr�|jjitdd6d
d6�d|jd<|jj|j�|j|_nn|t	kr&|jjitdd6d
d6�d|jd<|jj|j�|j|_n|jd|7<dS)Nr�rgr'r(zinvalid-codepointr)r�u�rxzunexpected-end-of-doctypeFr�zeof-in-doctypeT)
rr;�!afterDoctypeSystemIdentifierStaterr*r<rrrr
)r r)r%r%r&r�Vs*

z6HTMLTokenizer.doctypeSystemIdentifierDoubleQuotedStatecCs;|jj�}|dkr*|j|_n
|dkrl|jjitdd6dd6�|jdd7<n�|d	kr�|jjitdd6d
d6�d|jd<|jj|j�|j|_nn|t	kr&|jjitdd6d
d6�d|jd<|jj|j�|j|_n|jd|7<dS)Nr�rgr'r(zinvalid-codepointr)r�u�rxzunexpected-end-of-doctypeFr�zeof-in-doctypeT)
rr;r�rr*r<rrrr
)r r)r%r%r&r�ns*

z6HTMLTokenizer.doctypeSystemIdentifierSingleQuotedStatecCs�|jj�}|tkrn�|dkrL|jj|j�|j|_n�|tkr�|jjit	dd6dd6�d|jd<|jj|j�|j|_n.|jjit	dd6dd6�|j
|_d	S)
Nrxr'r(zeof-in-doctyper)Fr�zunexpected-char-in-doctypeT)rr;rr*r<rrrr
rr�)r r)r%r%r&r��s 
z/HTMLTokenizer.afterDoctypeSystemIdentifierStatecCs|jj�}|dkr=|jj|j�|j|_n>|tkr{|jj|�|jj|j�|j|_ndS)NrxT)	rr;r*r<rrrr
rB)r r)r%r%r&r��szHTMLTokenizer.bogusDoctypeStatecCsfg}x�|j|jjd��|j|jjd��|jj�}|tkrZPq	|dkslt�|ddd�dkr�|ddd�|d<Pq	|j|�q	Wdj|�}|jd�}|dkr+x6t|�D](}|j	jit
d	d
6dd6�q�W|jdd
�}n|rV|j	jit
dd
6|d6�n|j|_
dS)N�]rxr�z]]r1rgrr'r(zinvalid-codepointr)u�rQTrR���rRr�rR)r<rrjr;r
�AssertionErrorr>�count�ranger*rr�rr)r r)r;�	nullCountr�r%r%r&r��s0zHTMLTokenizer.cdataSectionState)M�__name__�
__module__�__qualname__�__doc__rr.rIr_r`rfrrhrnrlrprrrsrir{r|rmr�r�ror�r�rqr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r~r�r�r�r�r�r�r�rr}rzr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r%r%)r$r&rs�	HP#

7 "-3rN)�
__future__rrr�unichrr@�	NameError�collectionsr�	constantsrrr	r
rrr
rrr�inputstreamr�trierrS�objectrr%r%r%r&�<module>s

python3.4/site-packages/pip/_vendor/html5lib/__pycache__/utils.cpython-34.pyc000064400000005147151735047530023013 0ustar00�
�Re�	�
@s�ddlmZmZmZddlmZyddljjZ	Wn$e
k
rhddljjZ	YnXdddddgZ
Gd	d�de�Zd
d�Zdd�Zdd�ZdS)
�)�absolute_import�division�unicode_literals)�
ModuleTypeN�
default_etree�MethodDispatcher�isSurrogatePair�surrogatePairToCodepoint�moduleFactoryFactoryc@s1eZdZdZfdd�Zdd�ZdS)rapDict with 2 special properties:

    On initiation, keys that are lists, sets or tuples are converted to
    multiple keys so accessing any one of the items in the original
    list-like object returns the matching value

    md = MethodDispatcher({("foo", "bar"):"baz"})
    md["foo"] == "baz"

    A default value which can be set through the default attribute.
    cCs�g}xl|D]d\}}t|�ttttfkr^x7|D]}|j||f�q>Wq
|j||f�q
Wtj||�d|_dS)N)	�type�list�tuple�	frozenset�set�append�dict�__init__�default)�self�items�_dictEntries�name�value�item�r�5/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/utils.pyrs
zMethodDispatcher.__init__cCstj|||j�S)N)r�getr)r�keyrrr�__getitem__*szMethodDispatcher.__getitem__N)�__name__�
__module__�__qualname__�__doc__rrrrrrrscCsht|�dkogt|d�dkogt|d�dkogt|d�dkogt|d�dkS)N�ri�i���i�i��)�len�ord)�datarrrr1s,cCs2dt|d�ddt|d�d}|S)Niri�ir$i�)r&)r'�char_valrrrr	7scsi���fdd�}|S)Ncs�ttjtd��r(d|j}n
d|j}|�krI�|St|�}�|||�}|jj|�|�|<|SdS)N�z_%s_factorys_%s_factory)�
isinstancerrr�__dict__�update)�
baseModule�args�kwargsr�mod�objs)�factory�moduleCacherr�
moduleFactoryCs

z+moduleFactoryFactory.<locals>.moduleFactoryr)r2r4r)r2r3rr
@s)�
__future__rrr�typesr�xml.etree.cElementTree�etree�cElementTreer�ImportError�xml.etree.ElementTree�ElementTree�__all__rrrr	r
rrrr�<module>s
	"	python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__pycache__/__init__.cpython-34.pyc000064400000000230151735047530026061 0ustar00�
�Re�@sdS)N�rrr�E/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treeadapters/__init__.py�<module>spython3.4/site-packages/pip/_vendor/html5lib/treeadapters/__pycache__/sax.cpython-34.pyc000064400000002731151735047530025125 0ustar00�
�Re}�@s�ddlmZmZmZddlmZddlmZmZiZ	x6ej
�D](\ZZZ
edk	rUe
e	e<qUqUWdd�ZdS)�)�absolute_import�division�unicode_literals)�AttributesNSImpl�)�adjustForeignAttributes�unadjustForeignAttributesNcCs�|j�x*tj�D]\}}|j||�qWx|D]}|d}|dkr`q>q>|dkr�t|dt�}|j|d|df|d|�|dkrJ|j|d|df|d�qJq>|dkr	|j|d|df|d�q>|dkr)|j|d�q>|dkr8q>ds>t	d
��q>Wx'tj�D]\}}|j
|�q[W|j�dS)z8Call SAX-like content handler based on treewalker walker�type�Doctype�StartTag�EmptyTag�data�	namespace�name�EndTag�
Characters�SpaceCharacters�CommentFzUnknown token typeN)zStartTagzEmptyTag)z
CharacterszSpaceCharacters)�
startDocument�prefix_mapping�items�startPrefixMappingrr�startElementNS�endElementNS�
characters�AssertionError�endPrefixMapping�endDocument)�walker�handler�prefixr�tokenr	�attrs�r#�@/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/treeadapters/sax.py�to_sax
s6



	r%)�
__future__rrrZxml.sax.xmlreaderr�	constantsrrr�valuesr Z	localNamerr%r#r#r#r$�<module>spython3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py000064400000003175151735047530020646 0ustar00from __future__ import absolute_import, division, unicode_literals

from xml.sax.xmlreader import AttributesNSImpl

from ..constants import adjustForeignAttributes, unadjustForeignAttributes

prefix_mapping = {}
for prefix, localName, namespace in adjustForeignAttributes.values():
    if prefix is not None:
        prefix_mapping[prefix] = namespace


def to_sax(walker, handler):
    """Call SAX-like content handler based on treewalker walker"""
    handler.startDocument()
    for prefix, namespace in prefix_mapping.items():
        handler.startPrefixMapping(prefix, namespace)

    for token in walker:
        type = token["type"]
        if type == "Doctype":
            continue
        elif type in ("StartTag", "EmptyTag"):
            attrs = AttributesNSImpl(token["data"],
                                     unadjustForeignAttributes)
            handler.startElementNS((token["namespace"], token["name"]),
                                   token["name"],
                                   attrs)
            if type == "EmptyTag":
                handler.endElementNS((token["namespace"], token["name"]),
                                     token["name"])
        elif type == "EndTag":
            handler.endElementNS((token["namespace"], token["name"]),
                                 token["name"])
        elif type in ("Characters", "SpaceCharacters"):
            handler.characters(token["data"])
        elif type == "Comment":
            pass
        else:
            assert False, "Unknown token type"

    for prefix, namespace in prefix_mapping.items():
        handler.endPrefixMapping(prefix)
    handler.endDocument()
python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py000064400000000000151735047530021572 0ustar00python3.4/site-packages/pip/_vendor/html5lib/constants.py000064400000252462151735047530017411 0ustar00from __future__ import absolute_import, division, unicode_literals

import string
import gettext
_ = gettext.gettext

EOF = None

E = {
    "null-character":
        _("Null character in input stream, replaced with U+FFFD."),
    "invalid-codepoint":
        _("Invalid codepoint in stream."),
    "incorrectly-placed-solidus":
        _("Solidus (/) incorrectly placed in tag."),
    "incorrect-cr-newline-entity":
        _("Incorrect CR newline entity, replaced with LF."),
    "illegal-windows-1252-entity":
        _("Entity used with illegal number (windows-1252 reference)."),
    "cant-convert-numeric-entity":
        _("Numeric entity couldn't be converted to character "
          "(codepoint U+%(charAsInt)08x)."),
    "illegal-codepoint-for-numeric-entity":
        _("Numeric entity represents an illegal codepoint: "
          "U+%(charAsInt)08x."),
    "numeric-entity-without-semicolon":
        _("Numeric entity didn't end with ';'."),
    "expected-numeric-entity-but-got-eof":
        _("Numeric entity expected. Got end of file instead."),
    "expected-numeric-entity":
        _("Numeric entity expected but none found."),
    "named-entity-without-semicolon":
        _("Named entity didn't end with ';'."),
    "expected-named-entity":
        _("Named entity expected. Got none."),
    "attributes-in-end-tag":
        _("End tag contains unexpected attributes."),
    'self-closing-flag-on-end-tag':
        _("End tag contains unexpected self-closing flag."),
    "expected-tag-name-but-got-right-bracket":
        _("Expected tag name. Got '>' instead."),
    "expected-tag-name-but-got-question-mark":
        _("Expected tag name. Got '?' instead. (HTML doesn't "
          "support processing instructions.)"),
    "expected-tag-name":
        _("Expected tag name. Got something else instead"),
    "expected-closing-tag-but-got-right-bracket":
        _("Expected closing tag. Got '>' instead. Ignoring '</>'."),
    "expected-closing-tag-but-got-eof":
        _("Expected closing tag. Unexpected end of file."),
    "expected-closing-tag-but-got-char":
        _("Expected closing tag. Unexpected character '%(data)s' found."),
    "eof-in-tag-name":
        _("Unexpected end of file in the tag name."),
    "expected-attribute-name-but-got-eof":
        _("Unexpected end of file. Expected attribute name instead."),
    "eof-in-attribute-name":
        _("Unexpected end of file in attribute name."),
    "invalid-character-in-attribute-name":
        _("Invalid character in attribute name"),
    "duplicate-attribute":
        _("Dropped duplicate attribute on tag."),
    "expected-end-of-tag-name-but-got-eof":
        _("Unexpected end of file. Expected = or end of tag."),
    "expected-attribute-value-but-got-eof":
        _("Unexpected end of file. Expected attribute value."),
    "expected-attribute-value-but-got-right-bracket":
        _("Expected attribute value. Got '>' instead."),
    'equals-in-unquoted-attribute-value':
        _("Unexpected = in unquoted attribute"),
    'unexpected-character-in-unquoted-attribute-value':
        _("Unexpected character in unquoted attribute"),
    "invalid-character-after-attribute-name":
        _("Unexpected character after attribute name."),
    "unexpected-character-after-attribute-value":
        _("Unexpected character after attribute value."),
    "eof-in-attribute-value-double-quote":
        _("Unexpected end of file in attribute value (\")."),
    "eof-in-attribute-value-single-quote":
        _("Unexpected end of file in attribute value (')."),
    "eof-in-attribute-value-no-quotes":
        _("Unexpected end of file in attribute value."),
    "unexpected-EOF-after-solidus-in-tag":
        _("Unexpected end of file in tag. Expected >"),
    "unexpected-character-after-solidus-in-tag":
        _("Unexpected character after / in tag. Expected >"),
    "expected-dashes-or-doctype":
        _("Expected '--' or 'DOCTYPE'. Not found."),
    "unexpected-bang-after-double-dash-in-comment":
        _("Unexpected ! after -- in comment"),
    "unexpected-space-after-double-dash-in-comment":
        _("Unexpected space after -- in comment"),
    "incorrect-comment":
        _("Incorrect comment."),
    "eof-in-comment":
        _("Unexpected end of file in comment."),
    "eof-in-comment-end-dash":
        _("Unexpected end of file in comment (-)"),
    "unexpected-dash-after-double-dash-in-comment":
        _("Unexpected '-' after '--' found in comment."),
    "eof-in-comment-double-dash":
        _("Unexpected end of file in comment (--)."),
    "eof-in-comment-end-space-state":
        _("Unexpected end of file in comment."),
    "eof-in-comment-end-bang-state":
        _("Unexpected end of file in comment."),
    "unexpected-char-in-comment":
        _("Unexpected character in comment found."),
    "need-space-after-doctype":
        _("No space after literal string 'DOCTYPE'."),
    "expected-doctype-name-but-got-right-bracket":
        _("Unexpected > character. Expected DOCTYPE name."),
    "expected-doctype-name-but-got-eof":
        _("Unexpected end of file. Expected DOCTYPE name."),
    "eof-in-doctype-name":
        _("Unexpected end of file in DOCTYPE name."),
    "eof-in-doctype":
        _("Unexpected end of file in DOCTYPE."),
    "expected-space-or-right-bracket-in-doctype":
        _("Expected space or '>'. Got '%(data)s'"),
    "unexpected-end-of-doctype":
        _("Unexpected end of DOCTYPE."),
    "unexpected-char-in-doctype":
        _("Unexpected character in DOCTYPE."),
    "eof-in-innerhtml":
        _("XXX innerHTML EOF"),
    "unexpected-doctype":
        _("Unexpected DOCTYPE. Ignored."),
    "non-html-root":
        _("html needs to be the first start tag."),
    "expected-doctype-but-got-eof":
        _("Unexpected End of file. Expected DOCTYPE."),
    "unknown-doctype":
        _("Erroneous DOCTYPE."),
    "expected-doctype-but-got-chars":
        _("Unexpected non-space characters. Expected DOCTYPE."),
    "expected-doctype-but-got-start-tag":
        _("Unexpected start tag (%(name)s). Expected DOCTYPE."),
    "expected-doctype-but-got-end-tag":
        _("Unexpected end tag (%(name)s). Expected DOCTYPE."),
    "end-tag-after-implied-root":
        _("Unexpected end tag (%(name)s) after the (implied) root element."),
    "expected-named-closing-tag-but-got-eof":
        _("Unexpected end of file. Expected end tag (%(name)s)."),
    "two-heads-are-not-better-than-one":
        _("Unexpected start tag head in existing head. Ignored."),
    "unexpected-end-tag":
        _("Unexpected end tag (%(name)s). Ignored."),
    "unexpected-start-tag-out-of-my-head":
        _("Unexpected start tag (%(name)s) that can be in head. Moved."),
    "unexpected-start-tag":
        _("Unexpected start tag (%(name)s)."),
    "missing-end-tag":
        _("Missing end tag (%(name)s)."),
    "missing-end-tags":
        _("Missing end tags (%(name)s)."),
    "unexpected-start-tag-implies-end-tag":
        _("Unexpected start tag (%(startName)s) "
          "implies end tag (%(endName)s)."),
    "unexpected-start-tag-treated-as":
        _("Unexpected start tag (%(originalName)s). Treated as %(newName)s."),
    "deprecated-tag":
        _("Unexpected start tag %(name)s. Don't use it!"),
    "unexpected-start-tag-ignored":
        _("Unexpected start tag %(name)s. Ignored."),
    "expected-one-end-tag-but-got-another":
        _("Unexpected end tag (%(gotName)s). "
          "Missing end tag (%(expectedName)s)."),
    "end-tag-too-early":
        _("End tag (%(name)s) seen too early. Expected other end tag."),
    "end-tag-too-early-named":
        _("Unexpected end tag (%(gotName)s). Expected end tag (%(expectedName)s)."),
    "end-tag-too-early-ignored":
        _("End tag (%(name)s) seen too early. Ignored."),
    "adoption-agency-1.1":
        _("End tag (%(name)s) violates step 1, "
          "paragraph 1 of the adoption agency algorithm."),
    "adoption-agency-1.2":
        _("End tag (%(name)s) violates step 1, "
          "paragraph 2 of the adoption agency algorithm."),
    "adoption-agency-1.3":
        _("End tag (%(name)s) violates step 1, "
          "paragraph 3 of the adoption agency algorithm."),
    "adoption-agency-4.4":
        _("End tag (%(name)s) violates step 4, "
          "paragraph 4 of the adoption agency algorithm."),
    "unexpected-end-tag-treated-as":
        _("Unexpected end tag (%(originalName)s). Treated as %(newName)s."),
    "no-end-tag":
        _("This element (%(name)s) has no end tag."),
    "unexpected-implied-end-tag-in-table":
        _("Unexpected implied end tag (%(name)s) in the table phase."),
    "unexpected-implied-end-tag-in-table-body":
        _("Unexpected implied end tag (%(name)s) in the table body phase."),
    "unexpected-char-implies-table-voodoo":
        _("Unexpected non-space characters in "
          "table context caused voodoo mode."),
    "unexpected-hidden-input-in-table":
        _("Unexpected input with type hidden in table context."),
    "unexpected-form-in-table":
        _("Unexpected form in table context."),
    "unexpected-start-tag-implies-table-voodoo":
        _("Unexpected start tag (%(name)s) in "
          "table context caused voodoo mode."),
    "unexpected-end-tag-implies-table-voodoo":
        _("Unexpected end tag (%(name)s) in "
          "table context caused voodoo mode."),
    "unexpected-cell-in-table-body":
        _("Unexpected table cell start tag (%(name)s) "
          "in the table body phase."),
    "unexpected-cell-end-tag":
        _("Got table cell end tag (%(name)s) "
          "while required end tags are missing."),
    "unexpected-end-tag-in-table-body":
        _("Unexpected end tag (%(name)s) in the table body phase. Ignored."),
    "unexpected-implied-end-tag-in-table-row":
        _("Unexpected implied end tag (%(name)s) in the table row phase."),
    "unexpected-end-tag-in-table-row":
        _("Unexpected end tag (%(name)s) in the table row phase. Ignored."),
    "unexpected-select-in-select":
        _("Unexpected select start tag in the select phase "
          "treated as select end tag."),
    "unexpected-input-in-select":
        _("Unexpected input start tag in the select phase."),
    "unexpected-start-tag-in-select":
        _("Unexpected start tag token (%(name)s in the select phase. "
          "Ignored."),
    "unexpected-end-tag-in-select":
        _("Unexpected end tag (%(name)s) in the select phase. Ignored."),
    "unexpected-table-element-start-tag-in-select-in-table":
        _("Unexpected table element start tag (%(name)s) in the select in table phase."),
    "unexpected-table-element-end-tag-in-select-in-table":
        _("Unexpected table element end tag (%(name)s) in the select in table phase."),
    "unexpected-char-after-body":
        _("Unexpected non-space characters in the after body phase."),
    "unexpected-start-tag-after-body":
        _("Unexpected start tag token (%(name)s)"
          " in the after body phase."),
    "unexpected-end-tag-after-body":
        _("Unexpected end tag token (%(name)s)"
          " in the after body phase."),
    "unexpected-char-in-frameset":
        _("Unexpected characters in the frameset phase. Characters ignored."),
    "unexpected-start-tag-in-frameset":
        _("Unexpected start tag token (%(name)s)"
          " in the frameset phase. Ignored."),
    "unexpected-frameset-in-frameset-innerhtml":
        _("Unexpected end tag token (frameset) "
          "in the frameset phase (innerHTML)."),
    "unexpected-end-tag-in-frameset":
        _("Unexpected end tag token (%(name)s)"
          " in the frameset phase. Ignored."),
    "unexpected-char-after-frameset":
        _("Unexpected non-space characters in the "
          "after frameset phase. Ignored."),
    "unexpected-start-tag-after-frameset":
        _("Unexpected start tag (%(name)s)"
          " in the after frameset phase. Ignored."),
    "unexpected-end-tag-after-frameset":
        _("Unexpected end tag (%(name)s)"
          " in the after frameset phase. Ignored."),
    "unexpected-end-tag-after-body-innerhtml":
        _("Unexpected end tag after body(innerHtml)"),
    "expected-eof-but-got-char":
        _("Unexpected non-space characters. Expected end of file."),
    "expected-eof-but-got-start-tag":
        _("Unexpected start tag (%(name)s)"
          ". Expected end of file."),
    "expected-eof-but-got-end-tag":
        _("Unexpected end tag (%(name)s)"
          ". Expected end of file."),
    "eof-in-table":
        _("Unexpected end of file. Expected table content."),
    "eof-in-select":
        _("Unexpected end of file. Expected select content."),
    "eof-in-frameset":
        _("Unexpected end of file. Expected frameset content."),
    "eof-in-script-in-script":
        _("Unexpected end of file. Expected script content."),
    "eof-in-foreign-lands":
        _("Unexpected end of file. Expected foreign content"),
    "non-void-element-with-trailing-solidus":
        _("Trailing solidus not allowed on element %(name)s"),
    "unexpected-html-element-in-foreign-content":
        _("Element %(name)s not allowed in a non-html context"),
    "unexpected-end-tag-before-html":
        _("Unexpected end tag (%(name)s) before html."),
    "XXX-undefined-error":
        _("Undefined error (this sucks and should be fixed)"),
}

namespaces = {
    "html": "http://www.w3.org/1999/xhtml",
    "mathml": "http://www.w3.org/1998/Math/MathML",
    "svg": "http://www.w3.org/2000/svg",
    "xlink": "http://www.w3.org/1999/xlink",
    "xml": "http://www.w3.org/XML/1998/namespace",
    "xmlns": "http://www.w3.org/2000/xmlns/"
}

scopingElements = frozenset((
    (namespaces["html"], "applet"),
    (namespaces["html"], "caption"),
    (namespaces["html"], "html"),
    (namespaces["html"], "marquee"),
    (namespaces["html"], "object"),
    (namespaces["html"], "table"),
    (namespaces["html"], "td"),
    (namespaces["html"], "th"),
    (namespaces["mathml"], "mi"),
    (namespaces["mathml"], "mo"),
    (namespaces["mathml"], "mn"),
    (namespaces["mathml"], "ms"),
    (namespaces["mathml"], "mtext"),
    (namespaces["mathml"], "annotation-xml"),
    (namespaces["svg"], "foreignObject"),
    (namespaces["svg"], "desc"),
    (namespaces["svg"], "title"),
))

formattingElements = frozenset((
    (namespaces["html"], "a"),
    (namespaces["html"], "b"),
    (namespaces["html"], "big"),
    (namespaces["html"], "code"),
    (namespaces["html"], "em"),
    (namespaces["html"], "font"),
    (namespaces["html"], "i"),
    (namespaces["html"], "nobr"),
    (namespaces["html"], "s"),
    (namespaces["html"], "small"),
    (namespaces["html"], "strike"),
    (namespaces["html"], "strong"),
    (namespaces["html"], "tt"),
    (namespaces["html"], "u")
))

specialElements = frozenset((
    (namespaces["html"], "address"),
    (namespaces["html"], "applet"),
    (namespaces["html"], "area"),
    (namespaces["html"], "article"),
    (namespaces["html"], "aside"),
    (namespaces["html"], "base"),
    (namespaces["html"], "basefont"),
    (namespaces["html"], "bgsound"),
    (namespaces["html"], "blockquote"),
    (namespaces["html"], "body"),
    (namespaces["html"], "br"),
    (namespaces["html"], "button"),
    (namespaces["html"], "caption"),
    (namespaces["html"], "center"),
    (namespaces["html"], "col"),
    (namespaces["html"], "colgroup"),
    (namespaces["html"], "command"),
    (namespaces["html"], "dd"),
    (namespaces["html"], "details"),
    (namespaces["html"], "dir"),
    (namespaces["html"], "div"),
    (namespaces["html"], "dl"),
    (namespaces["html"], "dt"),
    (namespaces["html"], "embed"),
    (namespaces["html"], "fieldset"),
    (namespaces["html"], "figure"),
    (namespaces["html"], "footer"),
    (namespaces["html"], "form"),
    (namespaces["html"], "frame"),
    (namespaces["html"], "frameset"),
    (namespaces["html"], "h1"),
    (namespaces["html"], "h2"),
    (namespaces["html"], "h3"),
    (namespaces["html"], "h4"),
    (namespaces["html"], "h5"),
    (namespaces["html"], "h6"),
    (namespaces["html"], "head"),
    (namespaces["html"], "header"),
    (namespaces["html"], "hr"),
    (namespaces["html"], "html"),
    (namespaces["html"], "iframe"),
    # Note that image is commented out in the spec as "this isn't an
    # element that can end up on the stack, so it doesn't matter,"
    (namespaces["html"], "image"),
    (namespaces["html"], "img"),
    (namespaces["html"], "input"),
    (namespaces["html"], "isindex"),
    (namespaces["html"], "li"),
    (namespaces["html"], "link"),
    (namespaces["html"], "listing"),
    (namespaces["html"], "marquee"),
    (namespaces["html"], "menu"),
    (namespaces["html"], "meta"),
    (namespaces["html"], "nav"),
    (namespaces["html"], "noembed"),
    (namespaces["html"], "noframes"),
    (namespaces["html"], "noscript"),
    (namespaces["html"], "object"),
    (namespaces["html"], "ol"),
    (namespaces["html"], "p"),
    (namespaces["html"], "param"),
    (namespaces["html"], "plaintext"),
    (namespaces["html"], "pre"),
    (namespaces["html"], "script"),
    (namespaces["html"], "section"),
    (namespaces["html"], "select"),
    (namespaces["html"], "style"),
    (namespaces["html"], "table"),
    (namespaces["html"], "tbody"),
    (namespaces["html"], "td"),
    (namespaces["html"], "textarea"),
    (namespaces["html"], "tfoot"),
    (namespaces["html"], "th"),
    (namespaces["html"], "thead"),
    (namespaces["html"], "title"),
    (namespaces["html"], "tr"),
    (namespaces["html"], "ul"),
    (namespaces["html"], "wbr"),
    (namespaces["html"], "xmp"),
    (namespaces["svg"], "foreignObject")
))

htmlIntegrationPointElements = frozenset((
    (namespaces["mathml"], "annotaion-xml"),
    (namespaces["svg"], "foreignObject"),
    (namespaces["svg"], "desc"),
    (namespaces["svg"], "title")
))

mathmlTextIntegrationPointElements = frozenset((
    (namespaces["mathml"], "mi"),
    (namespaces["mathml"], "mo"),
    (namespaces["mathml"], "mn"),
    (namespaces["mathml"], "ms"),
    (namespaces["mathml"], "mtext")
))

adjustForeignAttributes = {
    "xlink:actuate": ("xlink", "actuate", namespaces["xlink"]),
    "xlink:arcrole": ("xlink", "arcrole", namespaces["xlink"]),
    "xlink:href": ("xlink", "href", namespaces["xlink"]),
    "xlink:role": ("xlink", "role", namespaces["xlink"]),
    "xlink:show": ("xlink", "show", namespaces["xlink"]),
    "xlink:title": ("xlink", "title", namespaces["xlink"]),
    "xlink:type": ("xlink", "type", namespaces["xlink"]),
    "xml:base": ("xml", "base", namespaces["xml"]),
    "xml:lang": ("xml", "lang", namespaces["xml"]),
    "xml:space": ("xml", "space", namespaces["xml"]),
    "xmlns": (None, "xmlns", namespaces["xmlns"]),
    "xmlns:xlink": ("xmlns", "xlink", namespaces["xmlns"])
}

unadjustForeignAttributes = dict([((ns, local), qname) for qname, (prefix, local, ns) in
                                  adjustForeignAttributes.items()])

spaceCharacters = frozenset((
    "\t",
    "\n",
    "\u000C",
    " ",
    "\r"
))

tableInsertModeElements = frozenset((
    "table",
    "tbody",
    "tfoot",
    "thead",
    "tr"
))

asciiLowercase = frozenset(string.ascii_lowercase)
asciiUppercase = frozenset(string.ascii_uppercase)
asciiLetters = frozenset(string.ascii_letters)
digits = frozenset(string.digits)
hexDigits = frozenset(string.hexdigits)

asciiUpper2Lower = dict([(ord(c), ord(c.lower()))
                         for c in string.ascii_uppercase])

# Heading elements need to be ordered
headingElements = (
    "h1",
    "h2",
    "h3",
    "h4",
    "h5",
    "h6"
)

voidElements = frozenset((
    "base",
    "command",
    "event-source",
    "link",
    "meta",
    "hr",
    "br",
    "img",
    "embed",
    "param",
    "area",
    "col",
    "input",
    "source",
    "track"
))

cdataElements = frozenset(('title', 'textarea'))

rcdataElements = frozenset((
    'style',
    'script',
    'xmp',
    'iframe',
    'noembed',
    'noframes',
    'noscript'
))

booleanAttributes = {
    "": frozenset(("irrelevant",)),
    "style": frozenset(("scoped",)),
    "img": frozenset(("ismap",)),
    "audio": frozenset(("autoplay", "controls")),
    "video": frozenset(("autoplay", "controls")),
    "script": frozenset(("defer", "async")),
    "details": frozenset(("open",)),
    "datagrid": frozenset(("multiple", "disabled")),
    "command": frozenset(("hidden", "disabled", "checked", "default")),
    "hr": frozenset(("noshade")),
    "menu": frozenset(("autosubmit",)),
    "fieldset": frozenset(("disabled", "readonly")),
    "option": frozenset(("disabled", "readonly", "selected")),
    "optgroup": frozenset(("disabled", "readonly")),
    "button": frozenset(("disabled", "autofocus")),
    "input": frozenset(("disabled", "readonly", "required", "autofocus", "checked", "ismap")),
    "select": frozenset(("disabled", "readonly", "autofocus", "multiple")),
    "output": frozenset(("disabled", "readonly")),
}

# entitiesWindows1252 has to be _ordered_ and needs to have an index. It
# therefore can't be a frozenset.
entitiesWindows1252 = (
    8364,   # 0x80  0x20AC  EURO SIGN
    65533,  # 0x81          UNDEFINED
    8218,   # 0x82  0x201A  SINGLE LOW-9 QUOTATION MARK
    402,    # 0x83  0x0192  LATIN SMALL LETTER F WITH HOOK
    8222,   # 0x84  0x201E  DOUBLE LOW-9 QUOTATION MARK
    8230,   # 0x85  0x2026  HORIZONTAL ELLIPSIS
    8224,   # 0x86  0x2020  DAGGER
    8225,   # 0x87  0x2021  DOUBLE DAGGER
    710,    # 0x88  0x02C6  MODIFIER LETTER CIRCUMFLEX ACCENT
    8240,   # 0x89  0x2030  PER MILLE SIGN
    352,    # 0x8A  0x0160  LATIN CAPITAL LETTER S WITH CARON
    8249,   # 0x8B  0x2039  SINGLE LEFT-POINTING ANGLE QUOTATION MARK
    338,    # 0x8C  0x0152  LATIN CAPITAL LIGATURE OE
    65533,  # 0x8D          UNDEFINED
    381,    # 0x8E  0x017D  LATIN CAPITAL LETTER Z WITH CARON
    65533,  # 0x8F          UNDEFINED
    65533,  # 0x90          UNDEFINED
    8216,   # 0x91  0x2018  LEFT SINGLE QUOTATION MARK
    8217,   # 0x92  0x2019  RIGHT SINGLE QUOTATION MARK
    8220,   # 0x93  0x201C  LEFT DOUBLE QUOTATION MARK
    8221,   # 0x94  0x201D  RIGHT DOUBLE QUOTATION MARK
    8226,   # 0x95  0x2022  BULLET
    8211,   # 0x96  0x2013  EN DASH
    8212,   # 0x97  0x2014  EM DASH
    732,    # 0x98  0x02DC  SMALL TILDE
    8482,   # 0x99  0x2122  TRADE MARK SIGN
    353,    # 0x9A  0x0161  LATIN SMALL LETTER S WITH CARON
    8250,   # 0x9B  0x203A  SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
    339,    # 0x9C  0x0153  LATIN SMALL LIGATURE OE
    65533,  # 0x9D          UNDEFINED
    382,    # 0x9E  0x017E  LATIN SMALL LETTER Z WITH CARON
    376     # 0x9F  0x0178  LATIN CAPITAL LETTER Y WITH DIAERESIS
)

xmlEntities = frozenset(('lt;', 'gt;', 'amp;', 'apos;', 'quot;'))

entities = {
    "AElig": "\xc6",
    "AElig;": "\xc6",
    "AMP": "&",
    "AMP;": "&",
    "Aacute": "\xc1",
    "Aacute;": "\xc1",
    "Abreve;": "\u0102",
    "Acirc": "\xc2",
    "Acirc;": "\xc2",
    "Acy;": "\u0410",
    "Afr;": "\U0001d504",
    "Agrave": "\xc0",
    "Agrave;": "\xc0",
    "Alpha;": "\u0391",
    "Amacr;": "\u0100",
    "And;": "\u2a53",
    "Aogon;": "\u0104",
    "Aopf;": "\U0001d538",
    "ApplyFunction;": "\u2061",
    "Aring": "\xc5",
    "Aring;": "\xc5",
    "Ascr;": "\U0001d49c",
    "Assign;": "\u2254",
    "Atilde": "\xc3",
    "Atilde;": "\xc3",
    "Auml": "\xc4",
    "Auml;": "\xc4",
    "Backslash;": "\u2216",
    "Barv;": "\u2ae7",
    "Barwed;": "\u2306",
    "Bcy;": "\u0411",
    "Because;": "\u2235",
    "Bernoullis;": "\u212c",
    "Beta;": "\u0392",
    "Bfr;": "\U0001d505",
    "Bopf;": "\U0001d539",
    "Breve;": "\u02d8",
    "Bscr;": "\u212c",
    "Bumpeq;": "\u224e",
    "CHcy;": "\u0427",
    "COPY": "\xa9",
    "COPY;": "\xa9",
    "Cacute;": "\u0106",
    "Cap;": "\u22d2",
    "CapitalDifferentialD;": "\u2145",
    "Cayleys;": "\u212d",
    "Ccaron;": "\u010c",
    "Ccedil": "\xc7",
    "Ccedil;": "\xc7",
    "Ccirc;": "\u0108",
    "Cconint;": "\u2230",
    "Cdot;": "\u010a",
    "Cedilla;": "\xb8",
    "CenterDot;": "\xb7",
    "Cfr;": "\u212d",
    "Chi;": "\u03a7",
    "CircleDot;": "\u2299",
    "CircleMinus;": "\u2296",
    "CirclePlus;": "\u2295",
    "CircleTimes;": "\u2297",
    "ClockwiseContourIntegral;": "\u2232",
    "CloseCurlyDoubleQuote;": "\u201d",
    "CloseCurlyQuote;": "\u2019",
    "Colon;": "\u2237",
    "Colone;": "\u2a74",
    "Congruent;": "\u2261",
    "Conint;": "\u222f",
    "ContourIntegral;": "\u222e",
    "Copf;": "\u2102",
    "Coproduct;": "\u2210",
    "CounterClockwiseContourIntegral;": "\u2233",
    "Cross;": "\u2a2f",
    "Cscr;": "\U0001d49e",
    "Cup;": "\u22d3",
    "CupCap;": "\u224d",
    "DD;": "\u2145",
    "DDotrahd;": "\u2911",
    "DJcy;": "\u0402",
    "DScy;": "\u0405",
    "DZcy;": "\u040f",
    "Dagger;": "\u2021",
    "Darr;": "\u21a1",
    "Dashv;": "\u2ae4",
    "Dcaron;": "\u010e",
    "Dcy;": "\u0414",
    "Del;": "\u2207",
    "Delta;": "\u0394",
    "Dfr;": "\U0001d507",
    "DiacriticalAcute;": "\xb4",
    "DiacriticalDot;": "\u02d9",
    "DiacriticalDoubleAcute;": "\u02dd",
    "DiacriticalGrave;": "`",
    "DiacriticalTilde;": "\u02dc",
    "Diamond;": "\u22c4",
    "DifferentialD;": "\u2146",
    "Dopf;": "\U0001d53b",
    "Dot;": "\xa8",
    "DotDot;": "\u20dc",
    "DotEqual;": "\u2250",
    "DoubleContourIntegral;": "\u222f",
    "DoubleDot;": "\xa8",
    "DoubleDownArrow;": "\u21d3",
    "DoubleLeftArrow;": "\u21d0",
    "DoubleLeftRightArrow;": "\u21d4",
    "DoubleLeftTee;": "\u2ae4",
    "DoubleLongLeftArrow;": "\u27f8",
    "DoubleLongLeftRightArrow;": "\u27fa",
    "DoubleLongRightArrow;": "\u27f9",
    "DoubleRightArrow;": "\u21d2",
    "DoubleRightTee;": "\u22a8",
    "DoubleUpArrow;": "\u21d1",
    "DoubleUpDownArrow;": "\u21d5",
    "DoubleVerticalBar;": "\u2225",
    "DownArrow;": "\u2193",
    "DownArrowBar;": "\u2913",
    "DownArrowUpArrow;": "\u21f5",
    "DownBreve;": "\u0311",
    "DownLeftRightVector;": "\u2950",
    "DownLeftTeeVector;": "\u295e",
    "DownLeftVector;": "\u21bd",
    "DownLeftVectorBar;": "\u2956",
    "DownRightTeeVector;": "\u295f",
    "DownRightVector;": "\u21c1",
    "DownRightVectorBar;": "\u2957",
    "DownTee;": "\u22a4",
    "DownTeeArrow;": "\u21a7",
    "Downarrow;": "\u21d3",
    "Dscr;": "\U0001d49f",
    "Dstrok;": "\u0110",
    "ENG;": "\u014a",
    "ETH": "\xd0",
    "ETH;": "\xd0",
    "Eacute": "\xc9",
    "Eacute;": "\xc9",
    "Ecaron;": "\u011a",
    "Ecirc": "\xca",
    "Ecirc;": "\xca",
    "Ecy;": "\u042d",
    "Edot;": "\u0116",
    "Efr;": "\U0001d508",
    "Egrave": "\xc8",
    "Egrave;": "\xc8",
    "Element;": "\u2208",
    "Emacr;": "\u0112",
    "EmptySmallSquare;": "\u25fb",
    "EmptyVerySmallSquare;": "\u25ab",
    "Eogon;": "\u0118",
    "Eopf;": "\U0001d53c",
    "Epsilon;": "\u0395",
    "Equal;": "\u2a75",
    "EqualTilde;": "\u2242",
    "Equilibrium;": "\u21cc",
    "Escr;": "\u2130",
    "Esim;": "\u2a73",
    "Eta;": "\u0397",
    "Euml": "\xcb",
    "Euml;": "\xcb",
    "Exists;": "\u2203",
    "ExponentialE;": "\u2147",
    "Fcy;": "\u0424",
    "Ffr;": "\U0001d509",
    "FilledSmallSquare;": "\u25fc",
    "FilledVerySmallSquare;": "\u25aa",
    "Fopf;": "\U0001d53d",
    "ForAll;": "\u2200",
    "Fouriertrf;": "\u2131",
    "Fscr;": "\u2131",
    "GJcy;": "\u0403",
    "GT": ">",
    "GT;": ">",
    "Gamma;": "\u0393",
    "Gammad;": "\u03dc",
    "Gbreve;": "\u011e",
    "Gcedil;": "\u0122",
    "Gcirc;": "\u011c",
    "Gcy;": "\u0413",
    "Gdot;": "\u0120",
    "Gfr;": "\U0001d50a",
    "Gg;": "\u22d9",
    "Gopf;": "\U0001d53e",
    "GreaterEqual;": "\u2265",
    "GreaterEqualLess;": "\u22db",
    "GreaterFullEqual;": "\u2267",
    "GreaterGreater;": "\u2aa2",
    "GreaterLess;": "\u2277",
    "GreaterSlantEqual;": "\u2a7e",
    "GreaterTilde;": "\u2273",
    "Gscr;": "\U0001d4a2",
    "Gt;": "\u226b",
    "HARDcy;": "\u042a",
    "Hacek;": "\u02c7",
    "Hat;": "^",
    "Hcirc;": "\u0124",
    "Hfr;": "\u210c",
    "HilbertSpace;": "\u210b",
    "Hopf;": "\u210d",
    "HorizontalLine;": "\u2500",
    "Hscr;": "\u210b",
    "Hstrok;": "\u0126",
    "HumpDownHump;": "\u224e",
    "HumpEqual;": "\u224f",
    "IEcy;": "\u0415",
    "IJlig;": "\u0132",
    "IOcy;": "\u0401",
    "Iacute": "\xcd",
    "Iacute;": "\xcd",
    "Icirc": "\xce",
    "Icirc;": "\xce",
    "Icy;": "\u0418",
    "Idot;": "\u0130",
    "Ifr;": "\u2111",
    "Igrave": "\xcc",
    "Igrave;": "\xcc",
    "Im;": "\u2111",
    "Imacr;": "\u012a",
    "ImaginaryI;": "\u2148",
    "Implies;": "\u21d2",
    "Int;": "\u222c",
    "Integral;": "\u222b",
    "Intersection;": "\u22c2",
    "InvisibleComma;": "\u2063",
    "InvisibleTimes;": "\u2062",
    "Iogon;": "\u012e",
    "Iopf;": "\U0001d540",
    "Iota;": "\u0399",
    "Iscr;": "\u2110",
    "Itilde;": "\u0128",
    "Iukcy;": "\u0406",
    "Iuml": "\xcf",
    "Iuml;": "\xcf",
    "Jcirc;": "\u0134",
    "Jcy;": "\u0419",
    "Jfr;": "\U0001d50d",
    "Jopf;": "\U0001d541",
    "Jscr;": "\U0001d4a5",
    "Jsercy;": "\u0408",
    "Jukcy;": "\u0404",
    "KHcy;": "\u0425",
    "KJcy;": "\u040c",
    "Kappa;": "\u039a",
    "Kcedil;": "\u0136",
    "Kcy;": "\u041a",
    "Kfr;": "\U0001d50e",
    "Kopf;": "\U0001d542",
    "Kscr;": "\U0001d4a6",
    "LJcy;": "\u0409",
    "LT": "<",
    "LT;": "<",
    "Lacute;": "\u0139",
    "Lambda;": "\u039b",
    "Lang;": "\u27ea",
    "Laplacetrf;": "\u2112",
    "Larr;": "\u219e",
    "Lcaron;": "\u013d",
    "Lcedil;": "\u013b",
    "Lcy;": "\u041b",
    "LeftAngleBracket;": "\u27e8",
    "LeftArrow;": "\u2190",
    "LeftArrowBar;": "\u21e4",
    "LeftArrowRightArrow;": "\u21c6",
    "LeftCeiling;": "\u2308",
    "LeftDoubleBracket;": "\u27e6",
    "LeftDownTeeVector;": "\u2961",
    "LeftDownVector;": "\u21c3",
    "LeftDownVectorBar;": "\u2959",
    "LeftFloor;": "\u230a",
    "LeftRightArrow;": "\u2194",
    "LeftRightVector;": "\u294e",
    "LeftTee;": "\u22a3",
    "LeftTeeArrow;": "\u21a4",
    "LeftTeeVector;": "\u295a",
    "LeftTriangle;": "\u22b2",
    "LeftTriangleBar;": "\u29cf",
    "LeftTriangleEqual;": "\u22b4",
    "LeftUpDownVector;": "\u2951",
    "LeftUpTeeVector;": "\u2960",
    "LeftUpVector;": "\u21bf",
    "LeftUpVectorBar;": "\u2958",
    "LeftVector;": "\u21bc",
    "LeftVectorBar;": "\u2952",
    "Leftarrow;": "\u21d0",
    "Leftrightarrow;": "\u21d4",
    "LessEqualGreater;": "\u22da",
    "LessFullEqual;": "\u2266",
    "LessGreater;": "\u2276",
    "LessLess;": "\u2aa1",
    "LessSlantEqual;": "\u2a7d",
    "LessTilde;": "\u2272",
    "Lfr;": "\U0001d50f",
    "Ll;": "\u22d8",
    "Lleftarrow;": "\u21da",
    "Lmidot;": "\u013f",
    "LongLeftArrow;": "\u27f5",
    "LongLeftRightArrow;": "\u27f7",
    "LongRightArrow;": "\u27f6",
    "Longleftarrow;": "\u27f8",
    "Longleftrightarrow;": "\u27fa",
    "Longrightarrow;": "\u27f9",
    "Lopf;": "\U0001d543",
    "LowerLeftArrow;": "\u2199",
    "LowerRightArrow;": "\u2198",
    "Lscr;": "\u2112",
    "Lsh;": "\u21b0",
    "Lstrok;": "\u0141",
    "Lt;": "\u226a",
    "Map;": "\u2905",
    "Mcy;": "\u041c",
    "MediumSpace;": "\u205f",
    "Mellintrf;": "\u2133",
    "Mfr;": "\U0001d510",
    "MinusPlus;": "\u2213",
    "Mopf;": "\U0001d544",
    "Mscr;": "\u2133",
    "Mu;": "\u039c",
    "NJcy;": "\u040a",
    "Nacute;": "\u0143",
    "Ncaron;": "\u0147",
    "Ncedil;": "\u0145",
    "Ncy;": "\u041d",
    "NegativeMediumSpace;": "\u200b",
    "NegativeThickSpace;": "\u200b",
    "NegativeThinSpace;": "\u200b",
    "NegativeVeryThinSpace;": "\u200b",
    "NestedGreaterGreater;": "\u226b",
    "NestedLessLess;": "\u226a",
    "NewLine;": "\n",
    "Nfr;": "\U0001d511",
    "NoBreak;": "\u2060",
    "NonBreakingSpace;": "\xa0",
    "Nopf;": "\u2115",
    "Not;": "\u2aec",
    "NotCongruent;": "\u2262",
    "NotCupCap;": "\u226d",
    "NotDoubleVerticalBar;": "\u2226",
    "NotElement;": "\u2209",
    "NotEqual;": "\u2260",
    "NotEqualTilde;": "\u2242\u0338",
    "NotExists;": "\u2204",
    "NotGreater;": "\u226f",
    "NotGreaterEqual;": "\u2271",
    "NotGreaterFullEqual;": "\u2267\u0338",
    "NotGreaterGreater;": "\u226b\u0338",
    "NotGreaterLess;": "\u2279",
    "NotGreaterSlantEqual;": "\u2a7e\u0338",
    "NotGreaterTilde;": "\u2275",
    "NotHumpDownHump;": "\u224e\u0338",
    "NotHumpEqual;": "\u224f\u0338",
    "NotLeftTriangle;": "\u22ea",
    "NotLeftTriangleBar;": "\u29cf\u0338",
    "NotLeftTriangleEqual;": "\u22ec",
    "NotLess;": "\u226e",
    "NotLessEqual;": "\u2270",
    "NotLessGreater;": "\u2278",
    "NotLessLess;": "\u226a\u0338",
    "NotLessSlantEqual;": "\u2a7d\u0338",
    "NotLessTilde;": "\u2274",
    "NotNestedGreaterGreater;": "\u2aa2\u0338",
    "NotNestedLessLess;": "\u2aa1\u0338",
    "NotPrecedes;": "\u2280",
    "NotPrecedesEqual;": "\u2aaf\u0338",
    "NotPrecedesSlantEqual;": "\u22e0",
    "NotReverseElement;": "\u220c",
    "NotRightTriangle;": "\u22eb",
    "NotRightTriangleBar;": "\u29d0\u0338",
    "NotRightTriangleEqual;": "\u22ed",
    "NotSquareSubset;": "\u228f\u0338",
    "NotSquareSubsetEqual;": "\u22e2",
    "NotSquareSuperset;": "\u2290\u0338",
    "NotSquareSupersetEqual;": "\u22e3",
    "NotSubset;": "\u2282\u20d2",
    "NotSubsetEqual;": "\u2288",
    "NotSucceeds;": "\u2281",
    "NotSucceedsEqual;": "\u2ab0\u0338",
    "NotSucceedsSlantEqual;": "\u22e1",
    "NotSucceedsTilde;": "\u227f\u0338",
    "NotSuperset;": "\u2283\u20d2",
    "NotSupersetEqual;": "\u2289",
    "NotTilde;": "\u2241",
    "NotTildeEqual;": "\u2244",
    "NotTildeFullEqual;": "\u2247",
    "NotTildeTilde;": "\u2249",
    "NotVerticalBar;": "\u2224",
    "Nscr;": "\U0001d4a9",
    "Ntilde": "\xd1",
    "Ntilde;": "\xd1",
    "Nu;": "\u039d",
    "OElig;": "\u0152",
    "Oacute": "\xd3",
    "Oacute;": "\xd3",
    "Ocirc": "\xd4",
    "Ocirc;": "\xd4",
    "Ocy;": "\u041e",
    "Odblac;": "\u0150",
    "Ofr;": "\U0001d512",
    "Ograve": "\xd2",
    "Ograve;": "\xd2",
    "Omacr;": "\u014c",
    "Omega;": "\u03a9",
    "Omicron;": "\u039f",
    "Oopf;": "\U0001d546",
    "OpenCurlyDoubleQuote;": "\u201c",
    "OpenCurlyQuote;": "\u2018",
    "Or;": "\u2a54",
    "Oscr;": "\U0001d4aa",
    "Oslash": "\xd8",
    "Oslash;": "\xd8",
    "Otilde": "\xd5",
    "Otilde;": "\xd5",
    "Otimes;": "\u2a37",
    "Ouml": "\xd6",
    "Ouml;": "\xd6",
    "OverBar;": "\u203e",
    "OverBrace;": "\u23de",
    "OverBracket;": "\u23b4",
    "OverParenthesis;": "\u23dc",
    "PartialD;": "\u2202",
    "Pcy;": "\u041f",
    "Pfr;": "\U0001d513",
    "Phi;": "\u03a6",
    "Pi;": "\u03a0",
    "PlusMinus;": "\xb1",
    "Poincareplane;": "\u210c",
    "Popf;": "\u2119",
    "Pr;": "\u2abb",
    "Precedes;": "\u227a",
    "PrecedesEqual;": "\u2aaf",
    "PrecedesSlantEqual;": "\u227c",
    "PrecedesTilde;": "\u227e",
    "Prime;": "\u2033",
    "Product;": "\u220f",
    "Proportion;": "\u2237",
    "Proportional;": "\u221d",
    "Pscr;": "\U0001d4ab",
    "Psi;": "\u03a8",
    "QUOT": "\"",
    "QUOT;": "\"",
    "Qfr;": "\U0001d514",
    "Qopf;": "\u211a",
    "Qscr;": "\U0001d4ac",
    "RBarr;": "\u2910",
    "REG": "\xae",
    "REG;": "\xae",
    "Racute;": "\u0154",
    "Rang;": "\u27eb",
    "Rarr;": "\u21a0",
    "Rarrtl;": "\u2916",
    "Rcaron;": "\u0158",
    "Rcedil;": "\u0156",
    "Rcy;": "\u0420",
    "Re;": "\u211c",
    "ReverseElement;": "\u220b",
    "ReverseEquilibrium;": "\u21cb",
    "ReverseUpEquilibrium;": "\u296f",
    "Rfr;": "\u211c",
    "Rho;": "\u03a1",
    "RightAngleBracket;": "\u27e9",
    "RightArrow;": "\u2192",
    "RightArrowBar;": "\u21e5",
    "RightArrowLeftArrow;": "\u21c4",
    "RightCeiling;": "\u2309",
    "RightDoubleBracket;": "\u27e7",
    "RightDownTeeVector;": "\u295d",
    "RightDownVector;": "\u21c2",
    "RightDownVectorBar;": "\u2955",
    "RightFloor;": "\u230b",
    "RightTee;": "\u22a2",
    "RightTeeArrow;": "\u21a6",
    "RightTeeVector;": "\u295b",
    "RightTriangle;": "\u22b3",
    "RightTriangleBar;": "\u29d0",
    "RightTriangleEqual;": "\u22b5",
    "RightUpDownVector;": "\u294f",
    "RightUpTeeVector;": "\u295c",
    "RightUpVector;": "\u21be",
    "RightUpVectorBar;": "\u2954",
    "RightVector;": "\u21c0",
    "RightVectorBar;": "\u2953",
    "Rightarrow;": "\u21d2",
    "Ropf;": "\u211d",
    "RoundImplies;": "\u2970",
    "Rrightarrow;": "\u21db",
    "Rscr;": "\u211b",
    "Rsh;": "\u21b1",
    "RuleDelayed;": "\u29f4",
    "SHCHcy;": "\u0429",
    "SHcy;": "\u0428",
    "SOFTcy;": "\u042c",
    "Sacute;": "\u015a",
    "Sc;": "\u2abc",
    "Scaron;": "\u0160",
    "Scedil;": "\u015e",
    "Scirc;": "\u015c",
    "Scy;": "\u0421",
    "Sfr;": "\U0001d516",
    "ShortDownArrow;": "\u2193",
    "ShortLeftArrow;": "\u2190",
    "ShortRightArrow;": "\u2192",
    "ShortUpArrow;": "\u2191",
    "Sigma;": "\u03a3",
    "SmallCircle;": "\u2218",
    "Sopf;": "\U0001d54a",
    "Sqrt;": "\u221a",
    "Square;": "\u25a1",
    "SquareIntersection;": "\u2293",
    "SquareSubset;": "\u228f",
    "SquareSubsetEqual;": "\u2291",
    "SquareSuperset;": "\u2290",
    "SquareSupersetEqual;": "\u2292",
    "SquareUnion;": "\u2294",
    "Sscr;": "\U0001d4ae",
    "Star;": "\u22c6",
    "Sub;": "\u22d0",
    "Subset;": "\u22d0",
    "SubsetEqual;": "\u2286",
    "Succeeds;": "\u227b",
    "SucceedsEqual;": "\u2ab0",
    "SucceedsSlantEqual;": "\u227d",
    "SucceedsTilde;": "\u227f",
    "SuchThat;": "\u220b",
    "Sum;": "\u2211",
    "Sup;": "\u22d1",
    "Superset;": "\u2283",
    "SupersetEqual;": "\u2287",
    "Supset;": "\u22d1",
    "THORN": "\xde",
    "THORN;": "\xde",
    "TRADE;": "\u2122",
    "TSHcy;": "\u040b",
    "TScy;": "\u0426",
    "Tab;": "\t",
    "Tau;": "\u03a4",
    "Tcaron;": "\u0164",
    "Tcedil;": "\u0162",
    "Tcy;": "\u0422",
    "Tfr;": "\U0001d517",
    "Therefore;": "\u2234",
    "Theta;": "\u0398",
    "ThickSpace;": "\u205f\u200a",
    "ThinSpace;": "\u2009",
    "Tilde;": "\u223c",
    "TildeEqual;": "\u2243",
    "TildeFullEqual;": "\u2245",
    "TildeTilde;": "\u2248",
    "Topf;": "\U0001d54b",
    "TripleDot;": "\u20db",
    "Tscr;": "\U0001d4af",
    "Tstrok;": "\u0166",
    "Uacute": "\xda",
    "Uacute;": "\xda",
    "Uarr;": "\u219f",
    "Uarrocir;": "\u2949",
    "Ubrcy;": "\u040e",
    "Ubreve;": "\u016c",
    "Ucirc": "\xdb",
    "Ucirc;": "\xdb",
    "Ucy;": "\u0423",
    "Udblac;": "\u0170",
    "Ufr;": "\U0001d518",
    "Ugrave": "\xd9",
    "Ugrave;": "\xd9",
    "Umacr;": "\u016a",
    "UnderBar;": "_",
    "UnderBrace;": "\u23df",
    "UnderBracket;": "\u23b5",
    "UnderParenthesis;": "\u23dd",
    "Union;": "\u22c3",
    "UnionPlus;": "\u228e",
    "Uogon;": "\u0172",
    "Uopf;": "\U0001d54c",
    "UpArrow;": "\u2191",
    "UpArrowBar;": "\u2912",
    "UpArrowDownArrow;": "\u21c5",
    "UpDownArrow;": "\u2195",
    "UpEquilibrium;": "\u296e",
    "UpTee;": "\u22a5",
    "UpTeeArrow;": "\u21a5",
    "Uparrow;": "\u21d1",
    "Updownarrow;": "\u21d5",
    "UpperLeftArrow;": "\u2196",
    "UpperRightArrow;": "\u2197",
    "Upsi;": "\u03d2",
    "Upsilon;": "\u03a5",
    "Uring;": "\u016e",
    "Uscr;": "\U0001d4b0",
    "Utilde;": "\u0168",
    "Uuml": "\xdc",
    "Uuml;": "\xdc",
    "VDash;": "\u22ab",
    "Vbar;": "\u2aeb",
    "Vcy;": "\u0412",
    "Vdash;": "\u22a9",
    "Vdashl;": "\u2ae6",
    "Vee;": "\u22c1",
    "Verbar;": "\u2016",
    "Vert;": "\u2016",
    "VerticalBar;": "\u2223",
    "VerticalLine;": "|",
    "VerticalSeparator;": "\u2758",
    "VerticalTilde;": "\u2240",
    "VeryThinSpace;": "\u200a",
    "Vfr;": "\U0001d519",
    "Vopf;": "\U0001d54d",
    "Vscr;": "\U0001d4b1",
    "Vvdash;": "\u22aa",
    "Wcirc;": "\u0174",
    "Wedge;": "\u22c0",
    "Wfr;": "\U0001d51a",
    "Wopf;": "\U0001d54e",
    "Wscr;": "\U0001d4b2",
    "Xfr;": "\U0001d51b",
    "Xi;": "\u039e",
    "Xopf;": "\U0001d54f",
    "Xscr;": "\U0001d4b3",
    "YAcy;": "\u042f",
    "YIcy;": "\u0407",
    "YUcy;": "\u042e",
    "Yacute": "\xdd",
    "Yacute;": "\xdd",
    "Ycirc;": "\u0176",
    "Ycy;": "\u042b",
    "Yfr;": "\U0001d51c",
    "Yopf;": "\U0001d550",
    "Yscr;": "\U0001d4b4",
    "Yuml;": "\u0178",
    "ZHcy;": "\u0416",
    "Zacute;": "\u0179",
    "Zcaron;": "\u017d",
    "Zcy;": "\u0417",
    "Zdot;": "\u017b",
    "ZeroWidthSpace;": "\u200b",
    "Zeta;": "\u0396",
    "Zfr;": "\u2128",
    "Zopf;": "\u2124",
    "Zscr;": "\U0001d4b5",
    "aacute": "\xe1",
    "aacute;": "\xe1",
    "abreve;": "\u0103",
    "ac;": "\u223e",
    "acE;": "\u223e\u0333",
    "acd;": "\u223f",
    "acirc": "\xe2",
    "acirc;": "\xe2",
    "acute": "\xb4",
    "acute;": "\xb4",
    "acy;": "\u0430",
    "aelig": "\xe6",
    "aelig;": "\xe6",
    "af;": "\u2061",
    "afr;": "\U0001d51e",
    "agrave": "\xe0",
    "agrave;": "\xe0",
    "alefsym;": "\u2135",
    "aleph;": "\u2135",
    "alpha;": "\u03b1",
    "amacr;": "\u0101",
    "amalg;": "\u2a3f",
    "amp": "&",
    "amp;": "&",
    "and;": "\u2227",
    "andand;": "\u2a55",
    "andd;": "\u2a5c",
    "andslope;": "\u2a58",
    "andv;": "\u2a5a",
    "ang;": "\u2220",
    "ange;": "\u29a4",
    "angle;": "\u2220",
    "angmsd;": "\u2221",
    "angmsdaa;": "\u29a8",
    "angmsdab;": "\u29a9",
    "angmsdac;": "\u29aa",
    "angmsdad;": "\u29ab",
    "angmsdae;": "\u29ac",
    "angmsdaf;": "\u29ad",
    "angmsdag;": "\u29ae",
    "angmsdah;": "\u29af",
    "angrt;": "\u221f",
    "angrtvb;": "\u22be",
    "angrtvbd;": "\u299d",
    "angsph;": "\u2222",
    "angst;": "\xc5",
    "angzarr;": "\u237c",
    "aogon;": "\u0105",
    "aopf;": "\U0001d552",
    "ap;": "\u2248",
    "apE;": "\u2a70",
    "apacir;": "\u2a6f",
    "ape;": "\u224a",
    "apid;": "\u224b",
    "apos;": "'",
    "approx;": "\u2248",
    "approxeq;": "\u224a",
    "aring": "\xe5",
    "aring;": "\xe5",
    "ascr;": "\U0001d4b6",
    "ast;": "*",
    "asymp;": "\u2248",
    "asympeq;": "\u224d",
    "atilde": "\xe3",
    "atilde;": "\xe3",
    "auml": "\xe4",
    "auml;": "\xe4",
    "awconint;": "\u2233",
    "awint;": "\u2a11",
    "bNot;": "\u2aed",
    "backcong;": "\u224c",
    "backepsilon;": "\u03f6",
    "backprime;": "\u2035",
    "backsim;": "\u223d",
    "backsimeq;": "\u22cd",
    "barvee;": "\u22bd",
    "barwed;": "\u2305",
    "barwedge;": "\u2305",
    "bbrk;": "\u23b5",
    "bbrktbrk;": "\u23b6",
    "bcong;": "\u224c",
    "bcy;": "\u0431",
    "bdquo;": "\u201e",
    "becaus;": "\u2235",
    "because;": "\u2235",
    "bemptyv;": "\u29b0",
    "bepsi;": "\u03f6",
    "bernou;": "\u212c",
    "beta;": "\u03b2",
    "beth;": "\u2136",
    "between;": "\u226c",
    "bfr;": "\U0001d51f",
    "bigcap;": "\u22c2",
    "bigcirc;": "\u25ef",
    "bigcup;": "\u22c3",
    "bigodot;": "\u2a00",
    "bigoplus;": "\u2a01",
    "bigotimes;": "\u2a02",
    "bigsqcup;": "\u2a06",
    "bigstar;": "\u2605",
    "bigtriangledown;": "\u25bd",
    "bigtriangleup;": "\u25b3",
    "biguplus;": "\u2a04",
    "bigvee;": "\u22c1",
    "bigwedge;": "\u22c0",
    "bkarow;": "\u290d",
    "blacklozenge;": "\u29eb",
    "blacksquare;": "\u25aa",
    "blacktriangle;": "\u25b4",
    "blacktriangledown;": "\u25be",
    "blacktriangleleft;": "\u25c2",
    "blacktriangleright;": "\u25b8",
    "blank;": "\u2423",
    "blk12;": "\u2592",
    "blk14;": "\u2591",
    "blk34;": "\u2593",
    "block;": "\u2588",
    "bne;": "=\u20e5",
    "bnequiv;": "\u2261\u20e5",
    "bnot;": "\u2310",
    "bopf;": "\U0001d553",
    "bot;": "\u22a5",
    "bottom;": "\u22a5",
    "bowtie;": "\u22c8",
    "boxDL;": "\u2557",
    "boxDR;": "\u2554",
    "boxDl;": "\u2556",
    "boxDr;": "\u2553",
    "boxH;": "\u2550",
    "boxHD;": "\u2566",
    "boxHU;": "\u2569",
    "boxHd;": "\u2564",
    "boxHu;": "\u2567",
    "boxUL;": "\u255d",
    "boxUR;": "\u255a",
    "boxUl;": "\u255c",
    "boxUr;": "\u2559",
    "boxV;": "\u2551",
    "boxVH;": "\u256c",
    "boxVL;": "\u2563",
    "boxVR;": "\u2560",
    "boxVh;": "\u256b",
    "boxVl;": "\u2562",
    "boxVr;": "\u255f",
    "boxbox;": "\u29c9",
    "boxdL;": "\u2555",
    "boxdR;": "\u2552",
    "boxdl;": "\u2510",
    "boxdr;": "\u250c",
    "boxh;": "\u2500",
    "boxhD;": "\u2565",
    "boxhU;": "\u2568",
    "boxhd;": "\u252c",
    "boxhu;": "\u2534",
    "boxminus;": "\u229f",
    "boxplus;": "\u229e",
    "boxtimes;": "\u22a0",
    "boxuL;": "\u255b",
    "boxuR;": "\u2558",
    "boxul;": "\u2518",
    "boxur;": "\u2514",
    "boxv;": "\u2502",
    "boxvH;": "\u256a",
    "boxvL;": "\u2561",
    "boxvR;": "\u255e",
    "boxvh;": "\u253c",
    "boxvl;": "\u2524",
    "boxvr;": "\u251c",
    "bprime;": "\u2035",
    "breve;": "\u02d8",
    "brvbar": "\xa6",
    "brvbar;": "\xa6",
    "bscr;": "\U0001d4b7",
    "bsemi;": "\u204f",
    "bsim;": "\u223d",
    "bsime;": "\u22cd",
    "bsol;": "\\",
    "bsolb;": "\u29c5",
    "bsolhsub;": "\u27c8",
    "bull;": "\u2022",
    "bullet;": "\u2022",
    "bump;": "\u224e",
    "bumpE;": "\u2aae",
    "bumpe;": "\u224f",
    "bumpeq;": "\u224f",
    "cacute;": "\u0107",
    "cap;": "\u2229",
    "capand;": "\u2a44",
    "capbrcup;": "\u2a49",
    "capcap;": "\u2a4b",
    "capcup;": "\u2a47",
    "capdot;": "\u2a40",
    "caps;": "\u2229\ufe00",
    "caret;": "\u2041",
    "caron;": "\u02c7",
    "ccaps;": "\u2a4d",
    "ccaron;": "\u010d",
    "ccedil": "\xe7",
    "ccedil;": "\xe7",
    "ccirc;": "\u0109",
    "ccups;": "\u2a4c",
    "ccupssm;": "\u2a50",
    "cdot;": "\u010b",
    "cedil": "\xb8",
    "cedil;": "\xb8",
    "cemptyv;": "\u29b2",
    "cent": "\xa2",
    "cent;": "\xa2",
    "centerdot;": "\xb7",
    "cfr;": "\U0001d520",
    "chcy;": "\u0447",
    "check;": "\u2713",
    "checkmark;": "\u2713",
    "chi;": "\u03c7",
    "cir;": "\u25cb",
    "cirE;": "\u29c3",
    "circ;": "\u02c6",
    "circeq;": "\u2257",
    "circlearrowleft;": "\u21ba",
    "circlearrowright;": "\u21bb",
    "circledR;": "\xae",
    "circledS;": "\u24c8",
    "circledast;": "\u229b",
    "circledcirc;": "\u229a",
    "circleddash;": "\u229d",
    "cire;": "\u2257",
    "cirfnint;": "\u2a10",
    "cirmid;": "\u2aef",
    "cirscir;": "\u29c2",
    "clubs;": "\u2663",
    "clubsuit;": "\u2663",
    "colon;": ":",
    "colone;": "\u2254",
    "coloneq;": "\u2254",
    "comma;": ",",
    "commat;": "@",
    "comp;": "\u2201",
    "compfn;": "\u2218",
    "complement;": "\u2201",
    "complexes;": "\u2102",
    "cong;": "\u2245",
    "congdot;": "\u2a6d",
    "conint;": "\u222e",
    "copf;": "\U0001d554",
    "coprod;": "\u2210",
    "copy": "\xa9",
    "copy;": "\xa9",
    "copysr;": "\u2117",
    "crarr;": "\u21b5",
    "cross;": "\u2717",
    "cscr;": "\U0001d4b8",
    "csub;": "\u2acf",
    "csube;": "\u2ad1",
    "csup;": "\u2ad0",
    "csupe;": "\u2ad2",
    "ctdot;": "\u22ef",
    "cudarrl;": "\u2938",
    "cudarrr;": "\u2935",
    "cuepr;": "\u22de",
    "cuesc;": "\u22df",
    "cularr;": "\u21b6",
    "cularrp;": "\u293d",
    "cup;": "\u222a",
    "cupbrcap;": "\u2a48",
    "cupcap;": "\u2a46",
    "cupcup;": "\u2a4a",
    "cupdot;": "\u228d",
    "cupor;": "\u2a45",
    "cups;": "\u222a\ufe00",
    "curarr;": "\u21b7",
    "curarrm;": "\u293c",
    "curlyeqprec;": "\u22de",
    "curlyeqsucc;": "\u22df",
    "curlyvee;": "\u22ce",
    "curlywedge;": "\u22cf",
    "curren": "\xa4",
    "curren;": "\xa4",
    "curvearrowleft;": "\u21b6",
    "curvearrowright;": "\u21b7",
    "cuvee;": "\u22ce",
    "cuwed;": "\u22cf",
    "cwconint;": "\u2232",
    "cwint;": "\u2231",
    "cylcty;": "\u232d",
    "dArr;": "\u21d3",
    "dHar;": "\u2965",
    "dagger;": "\u2020",
    "daleth;": "\u2138",
    "darr;": "\u2193",
    "dash;": "\u2010",
    "dashv;": "\u22a3",
    "dbkarow;": "\u290f",
    "dblac;": "\u02dd",
    "dcaron;": "\u010f",
    "dcy;": "\u0434",
    "dd;": "\u2146",
    "ddagger;": "\u2021",
    "ddarr;": "\u21ca",
    "ddotseq;": "\u2a77",
    "deg": "\xb0",
    "deg;": "\xb0",
    "delta;": "\u03b4",
    "demptyv;": "\u29b1",
    "dfisht;": "\u297f",
    "dfr;": "\U0001d521",
    "dharl;": "\u21c3",
    "dharr;": "\u21c2",
    "diam;": "\u22c4",
    "diamond;": "\u22c4",
    "diamondsuit;": "\u2666",
    "diams;": "\u2666",
    "die;": "\xa8",
    "digamma;": "\u03dd",
    "disin;": "\u22f2",
    "div;": "\xf7",
    "divide": "\xf7",
    "divide;": "\xf7",
    "divideontimes;": "\u22c7",
    "divonx;": "\u22c7",
    "djcy;": "\u0452",
    "dlcorn;": "\u231e",
    "dlcrop;": "\u230d",
    "dollar;": "$",
    "dopf;": "\U0001d555",
    "dot;": "\u02d9",
    "doteq;": "\u2250",
    "doteqdot;": "\u2251",
    "dotminus;": "\u2238",
    "dotplus;": "\u2214",
    "dotsquare;": "\u22a1",
    "doublebarwedge;": "\u2306",
    "downarrow;": "\u2193",
    "downdownarrows;": "\u21ca",
    "downharpoonleft;": "\u21c3",
    "downharpoonright;": "\u21c2",
    "drbkarow;": "\u2910",
    "drcorn;": "\u231f",
    "drcrop;": "\u230c",
    "dscr;": "\U0001d4b9",
    "dscy;": "\u0455",
    "dsol;": "\u29f6",
    "dstrok;": "\u0111",
    "dtdot;": "\u22f1",
    "dtri;": "\u25bf",
    "dtrif;": "\u25be",
    "duarr;": "\u21f5",
    "duhar;": "\u296f",
    "dwangle;": "\u29a6",
    "dzcy;": "\u045f",
    "dzigrarr;": "\u27ff",
    "eDDot;": "\u2a77",
    "eDot;": "\u2251",
    "eacute": "\xe9",
    "eacute;": "\xe9",
    "easter;": "\u2a6e",
    "ecaron;": "\u011b",
    "ecir;": "\u2256",
    "ecirc": "\xea",
    "ecirc;": "\xea",
    "ecolon;": "\u2255",
    "ecy;": "\u044d",
    "edot;": "\u0117",
    "ee;": "\u2147",
    "efDot;": "\u2252",
    "efr;": "\U0001d522",
    "eg;": "\u2a9a",
    "egrave": "\xe8",
    "egrave;": "\xe8",
    "egs;": "\u2a96",
    "egsdot;": "\u2a98",
    "el;": "\u2a99",
    "elinters;": "\u23e7",
    "ell;": "\u2113",
    "els;": "\u2a95",
    "elsdot;": "\u2a97",
    "emacr;": "\u0113",
    "empty;": "\u2205",
    "emptyset;": "\u2205",
    "emptyv;": "\u2205",
    "emsp13;": "\u2004",
    "emsp14;": "\u2005",
    "emsp;": "\u2003",
    "eng;": "\u014b",
    "ensp;": "\u2002",
    "eogon;": "\u0119",
    "eopf;": "\U0001d556",
    "epar;": "\u22d5",
    "eparsl;": "\u29e3",
    "eplus;": "\u2a71",
    "epsi;": "\u03b5",
    "epsilon;": "\u03b5",
    "epsiv;": "\u03f5",
    "eqcirc;": "\u2256",
    "eqcolon;": "\u2255",
    "eqsim;": "\u2242",
    "eqslantgtr;": "\u2a96",
    "eqslantless;": "\u2a95",
    "equals;": "=",
    "equest;": "\u225f",
    "equiv;": "\u2261",
    "equivDD;": "\u2a78",
    "eqvparsl;": "\u29e5",
    "erDot;": "\u2253",
    "erarr;": "\u2971",
    "escr;": "\u212f",
    "esdot;": "\u2250",
    "esim;": "\u2242",
    "eta;": "\u03b7",
    "eth": "\xf0",
    "eth;": "\xf0",
    "euml": "\xeb",
    "euml;": "\xeb",
    "euro;": "\u20ac",
    "excl;": "!",
    "exist;": "\u2203",
    "expectation;": "\u2130",
    "exponentiale;": "\u2147",
    "fallingdotseq;": "\u2252",
    "fcy;": "\u0444",
    "female;": "\u2640",
    "ffilig;": "\ufb03",
    "fflig;": "\ufb00",
    "ffllig;": "\ufb04",
    "ffr;": "\U0001d523",
    "filig;": "\ufb01",
    "fjlig;": "fj",
    "flat;": "\u266d",
    "fllig;": "\ufb02",
    "fltns;": "\u25b1",
    "fnof;": "\u0192",
    "fopf;": "\U0001d557",
    "forall;": "\u2200",
    "fork;": "\u22d4",
    "forkv;": "\u2ad9",
    "fpartint;": "\u2a0d",
    "frac12": "\xbd",
    "frac12;": "\xbd",
    "frac13;": "\u2153",
    "frac14": "\xbc",
    "frac14;": "\xbc",
    "frac15;": "\u2155",
    "frac16;": "\u2159",
    "frac18;": "\u215b",
    "frac23;": "\u2154",
    "frac25;": "\u2156",
    "frac34": "\xbe",
    "frac34;": "\xbe",
    "frac35;": "\u2157",
    "frac38;": "\u215c",
    "frac45;": "\u2158",
    "frac56;": "\u215a",
    "frac58;": "\u215d",
    "frac78;": "\u215e",
    "frasl;": "\u2044",
    "frown;": "\u2322",
    "fscr;": "\U0001d4bb",
    "gE;": "\u2267",
    "gEl;": "\u2a8c",
    "gacute;": "\u01f5",
    "gamma;": "\u03b3",
    "gammad;": "\u03dd",
    "gap;": "\u2a86",
    "gbreve;": "\u011f",
    "gcirc;": "\u011d",
    "gcy;": "\u0433",
    "gdot;": "\u0121",
    "ge;": "\u2265",
    "gel;": "\u22db",
    "geq;": "\u2265",
    "geqq;": "\u2267",
    "geqslant;": "\u2a7e",
    "ges;": "\u2a7e",
    "gescc;": "\u2aa9",
    "gesdot;": "\u2a80",
    "gesdoto;": "\u2a82",
    "gesdotol;": "\u2a84",
    "gesl;": "\u22db\ufe00",
    "gesles;": "\u2a94",
    "gfr;": "\U0001d524",
    "gg;": "\u226b",
    "ggg;": "\u22d9",
    "gimel;": "\u2137",
    "gjcy;": "\u0453",
    "gl;": "\u2277",
    "glE;": "\u2a92",
    "gla;": "\u2aa5",
    "glj;": "\u2aa4",
    "gnE;": "\u2269",
    "gnap;": "\u2a8a",
    "gnapprox;": "\u2a8a",
    "gne;": "\u2a88",
    "gneq;": "\u2a88",
    "gneqq;": "\u2269",
    "gnsim;": "\u22e7",
    "gopf;": "\U0001d558",
    "grave;": "`",
    "gscr;": "\u210a",
    "gsim;": "\u2273",
    "gsime;": "\u2a8e",
    "gsiml;": "\u2a90",
    "gt": ">",
    "gt;": ">",
    "gtcc;": "\u2aa7",
    "gtcir;": "\u2a7a",
    "gtdot;": "\u22d7",
    "gtlPar;": "\u2995",
    "gtquest;": "\u2a7c",
    "gtrapprox;": "\u2a86",
    "gtrarr;": "\u2978",
    "gtrdot;": "\u22d7",
    "gtreqless;": "\u22db",
    "gtreqqless;": "\u2a8c",
    "gtrless;": "\u2277",
    "gtrsim;": "\u2273",
    "gvertneqq;": "\u2269\ufe00",
    "gvnE;": "\u2269\ufe00",
    "hArr;": "\u21d4",
    "hairsp;": "\u200a",
    "half;": "\xbd",
    "hamilt;": "\u210b",
    "hardcy;": "\u044a",
    "harr;": "\u2194",
    "harrcir;": "\u2948",
    "harrw;": "\u21ad",
    "hbar;": "\u210f",
    "hcirc;": "\u0125",
    "hearts;": "\u2665",
    "heartsuit;": "\u2665",
    "hellip;": "\u2026",
    "hercon;": "\u22b9",
    "hfr;": "\U0001d525",
    "hksearow;": "\u2925",
    "hkswarow;": "\u2926",
    "hoarr;": "\u21ff",
    "homtht;": "\u223b",
    "hookleftarrow;": "\u21a9",
    "hookrightarrow;": "\u21aa",
    "hopf;": "\U0001d559",
    "horbar;": "\u2015",
    "hscr;": "\U0001d4bd",
    "hslash;": "\u210f",
    "hstrok;": "\u0127",
    "hybull;": "\u2043",
    "hyphen;": "\u2010",
    "iacute": "\xed",
    "iacute;": "\xed",
    "ic;": "\u2063",
    "icirc": "\xee",
    "icirc;": "\xee",
    "icy;": "\u0438",
    "iecy;": "\u0435",
    "iexcl": "\xa1",
    "iexcl;": "\xa1",
    "iff;": "\u21d4",
    "ifr;": "\U0001d526",
    "igrave": "\xec",
    "igrave;": "\xec",
    "ii;": "\u2148",
    "iiiint;": "\u2a0c",
    "iiint;": "\u222d",
    "iinfin;": "\u29dc",
    "iiota;": "\u2129",
    "ijlig;": "\u0133",
    "imacr;": "\u012b",
    "image;": "\u2111",
    "imagline;": "\u2110",
    "imagpart;": "\u2111",
    "imath;": "\u0131",
    "imof;": "\u22b7",
    "imped;": "\u01b5",
    "in;": "\u2208",
    "incare;": "\u2105",
    "infin;": "\u221e",
    "infintie;": "\u29dd",
    "inodot;": "\u0131",
    "int;": "\u222b",
    "intcal;": "\u22ba",
    "integers;": "\u2124",
    "intercal;": "\u22ba",
    "intlarhk;": "\u2a17",
    "intprod;": "\u2a3c",
    "iocy;": "\u0451",
    "iogon;": "\u012f",
    "iopf;": "\U0001d55a",
    "iota;": "\u03b9",
    "iprod;": "\u2a3c",
    "iquest": "\xbf",
    "iquest;": "\xbf",
    "iscr;": "\U0001d4be",
    "isin;": "\u2208",
    "isinE;": "\u22f9",
    "isindot;": "\u22f5",
    "isins;": "\u22f4",
    "isinsv;": "\u22f3",
    "isinv;": "\u2208",
    "it;": "\u2062",
    "itilde;": "\u0129",
    "iukcy;": "\u0456",
    "iuml": "\xef",
    "iuml;": "\xef",
    "jcirc;": "\u0135",
    "jcy;": "\u0439",
    "jfr;": "\U0001d527",
    "jmath;": "\u0237",
    "jopf;": "\U0001d55b",
    "jscr;": "\U0001d4bf",
    "jsercy;": "\u0458",
    "jukcy;": "\u0454",
    "kappa;": "\u03ba",
    "kappav;": "\u03f0",
    "kcedil;": "\u0137",
    "kcy;": "\u043a",
    "kfr;": "\U0001d528",
    "kgreen;": "\u0138",
    "khcy;": "\u0445",
    "kjcy;": "\u045c",
    "kopf;": "\U0001d55c",
    "kscr;": "\U0001d4c0",
    "lAarr;": "\u21da",
    "lArr;": "\u21d0",
    "lAtail;": "\u291b",
    "lBarr;": "\u290e",
    "lE;": "\u2266",
    "lEg;": "\u2a8b",
    "lHar;": "\u2962",
    "lacute;": "\u013a",
    "laemptyv;": "\u29b4",
    "lagran;": "\u2112",
    "lambda;": "\u03bb",
    "lang;": "\u27e8",
    "langd;": "\u2991",
    "langle;": "\u27e8",
    "lap;": "\u2a85",
    "laquo": "\xab",
    "laquo;": "\xab",
    "larr;": "\u2190",
    "larrb;": "\u21e4",
    "larrbfs;": "\u291f",
    "larrfs;": "\u291d",
    "larrhk;": "\u21a9",
    "larrlp;": "\u21ab",
    "larrpl;": "\u2939",
    "larrsim;": "\u2973",
    "larrtl;": "\u21a2",
    "lat;": "\u2aab",
    "latail;": "\u2919",
    "late;": "\u2aad",
    "lates;": "\u2aad\ufe00",
    "lbarr;": "\u290c",
    "lbbrk;": "\u2772",
    "lbrace;": "{",
    "lbrack;": "[",
    "lbrke;": "\u298b",
    "lbrksld;": "\u298f",
    "lbrkslu;": "\u298d",
    "lcaron;": "\u013e",
    "lcedil;": "\u013c",
    "lceil;": "\u2308",
    "lcub;": "{",
    "lcy;": "\u043b",
    "ldca;": "\u2936",
    "ldquo;": "\u201c",
    "ldquor;": "\u201e",
    "ldrdhar;": "\u2967",
    "ldrushar;": "\u294b",
    "ldsh;": "\u21b2",
    "le;": "\u2264",
    "leftarrow;": "\u2190",
    "leftarrowtail;": "\u21a2",
    "leftharpoondown;": "\u21bd",
    "leftharpoonup;": "\u21bc",
    "leftleftarrows;": "\u21c7",
    "leftrightarrow;": "\u2194",
    "leftrightarrows;": "\u21c6",
    "leftrightharpoons;": "\u21cb",
    "leftrightsquigarrow;": "\u21ad",
    "leftthreetimes;": "\u22cb",
    "leg;": "\u22da",
    "leq;": "\u2264",
    "leqq;": "\u2266",
    "leqslant;": "\u2a7d",
    "les;": "\u2a7d",
    "lescc;": "\u2aa8",
    "lesdot;": "\u2a7f",
    "lesdoto;": "\u2a81",
    "lesdotor;": "\u2a83",
    "lesg;": "\u22da\ufe00",
    "lesges;": "\u2a93",
    "lessapprox;": "\u2a85",
    "lessdot;": "\u22d6",
    "lesseqgtr;": "\u22da",
    "lesseqqgtr;": "\u2a8b",
    "lessgtr;": "\u2276",
    "lesssim;": "\u2272",
    "lfisht;": "\u297c",
    "lfloor;": "\u230a",
    "lfr;": "\U0001d529",
    "lg;": "\u2276",
    "lgE;": "\u2a91",
    "lhard;": "\u21bd",
    "lharu;": "\u21bc",
    "lharul;": "\u296a",
    "lhblk;": "\u2584",
    "ljcy;": "\u0459",
    "ll;": "\u226a",
    "llarr;": "\u21c7",
    "llcorner;": "\u231e",
    "llhard;": "\u296b",
    "lltri;": "\u25fa",
    "lmidot;": "\u0140",
    "lmoust;": "\u23b0",
    "lmoustache;": "\u23b0",
    "lnE;": "\u2268",
    "lnap;": "\u2a89",
    "lnapprox;": "\u2a89",
    "lne;": "\u2a87",
    "lneq;": "\u2a87",
    "lneqq;": "\u2268",
    "lnsim;": "\u22e6",
    "loang;": "\u27ec",
    "loarr;": "\u21fd",
    "lobrk;": "\u27e6",
    "longleftarrow;": "\u27f5",
    "longleftrightarrow;": "\u27f7",
    "longmapsto;": "\u27fc",
    "longrightarrow;": "\u27f6",
    "looparrowleft;": "\u21ab",
    "looparrowright;": "\u21ac",
    "lopar;": "\u2985",
    "lopf;": "\U0001d55d",
    "loplus;": "\u2a2d",
    "lotimes;": "\u2a34",
    "lowast;": "\u2217",
    "lowbar;": "_",
    "loz;": "\u25ca",
    "lozenge;": "\u25ca",
    "lozf;": "\u29eb",
    "lpar;": "(",
    "lparlt;": "\u2993",
    "lrarr;": "\u21c6",
    "lrcorner;": "\u231f",
    "lrhar;": "\u21cb",
    "lrhard;": "\u296d",
    "lrm;": "\u200e",
    "lrtri;": "\u22bf",
    "lsaquo;": "\u2039",
    "lscr;": "\U0001d4c1",
    "lsh;": "\u21b0",
    "lsim;": "\u2272",
    "lsime;": "\u2a8d",
    "lsimg;": "\u2a8f",
    "lsqb;": "[",
    "lsquo;": "\u2018",
    "lsquor;": "\u201a",
    "lstrok;": "\u0142",
    "lt": "<",
    "lt;": "<",
    "ltcc;": "\u2aa6",
    "ltcir;": "\u2a79",
    "ltdot;": "\u22d6",
    "lthree;": "\u22cb",
    "ltimes;": "\u22c9",
    "ltlarr;": "\u2976",
    "ltquest;": "\u2a7b",
    "ltrPar;": "\u2996",
    "ltri;": "\u25c3",
    "ltrie;": "\u22b4",
    "ltrif;": "\u25c2",
    "lurdshar;": "\u294a",
    "luruhar;": "\u2966",
    "lvertneqq;": "\u2268\ufe00",
    "lvnE;": "\u2268\ufe00",
    "mDDot;": "\u223a",
    "macr": "\xaf",
    "macr;": "\xaf",
    "male;": "\u2642",
    "malt;": "\u2720",
    "maltese;": "\u2720",
    "map;": "\u21a6",
    "mapsto;": "\u21a6",
    "mapstodown;": "\u21a7",
    "mapstoleft;": "\u21a4",
    "mapstoup;": "\u21a5",
    "marker;": "\u25ae",
    "mcomma;": "\u2a29",
    "mcy;": "\u043c",
    "mdash;": "\u2014",
    "measuredangle;": "\u2221",
    "mfr;": "\U0001d52a",
    "mho;": "\u2127",
    "micro": "\xb5",
    "micro;": "\xb5",
    "mid;": "\u2223",
    "midast;": "*",
    "midcir;": "\u2af0",
    "middot": "\xb7",
    "middot;": "\xb7",
    "minus;": "\u2212",
    "minusb;": "\u229f",
    "minusd;": "\u2238",
    "minusdu;": "\u2a2a",
    "mlcp;": "\u2adb",
    "mldr;": "\u2026",
    "mnplus;": "\u2213",
    "models;": "\u22a7",
    "mopf;": "\U0001d55e",
    "mp;": "\u2213",
    "mscr;": "\U0001d4c2",
    "mstpos;": "\u223e",
    "mu;": "\u03bc",
    "multimap;": "\u22b8",
    "mumap;": "\u22b8",
    "nGg;": "\u22d9\u0338",
    "nGt;": "\u226b\u20d2",
    "nGtv;": "\u226b\u0338",
    "nLeftarrow;": "\u21cd",
    "nLeftrightarrow;": "\u21ce",
    "nLl;": "\u22d8\u0338",
    "nLt;": "\u226a\u20d2",
    "nLtv;": "\u226a\u0338",
    "nRightarrow;": "\u21cf",
    "nVDash;": "\u22af",
    "nVdash;": "\u22ae",
    "nabla;": "\u2207",
    "nacute;": "\u0144",
    "nang;": "\u2220\u20d2",
    "nap;": "\u2249",
    "napE;": "\u2a70\u0338",
    "napid;": "\u224b\u0338",
    "napos;": "\u0149",
    "napprox;": "\u2249",
    "natur;": "\u266e",
    "natural;": "\u266e",
    "naturals;": "\u2115",
    "nbsp": "\xa0",
    "nbsp;": "\xa0",
    "nbump;": "\u224e\u0338",
    "nbumpe;": "\u224f\u0338",
    "ncap;": "\u2a43",
    "ncaron;": "\u0148",
    "ncedil;": "\u0146",
    "ncong;": "\u2247",
    "ncongdot;": "\u2a6d\u0338",
    "ncup;": "\u2a42",
    "ncy;": "\u043d",
    "ndash;": "\u2013",
    "ne;": "\u2260",
    "neArr;": "\u21d7",
    "nearhk;": "\u2924",
    "nearr;": "\u2197",
    "nearrow;": "\u2197",
    "nedot;": "\u2250\u0338",
    "nequiv;": "\u2262",
    "nesear;": "\u2928",
    "nesim;": "\u2242\u0338",
    "nexist;": "\u2204",
    "nexists;": "\u2204",
    "nfr;": "\U0001d52b",
    "ngE;": "\u2267\u0338",
    "nge;": "\u2271",
    "ngeq;": "\u2271",
    "ngeqq;": "\u2267\u0338",
    "ngeqslant;": "\u2a7e\u0338",
    "nges;": "\u2a7e\u0338",
    "ngsim;": "\u2275",
    "ngt;": "\u226f",
    "ngtr;": "\u226f",
    "nhArr;": "\u21ce",
    "nharr;": "\u21ae",
    "nhpar;": "\u2af2",
    "ni;": "\u220b",
    "nis;": "\u22fc",
    "nisd;": "\u22fa",
    "niv;": "\u220b",
    "njcy;": "\u045a",
    "nlArr;": "\u21cd",
    "nlE;": "\u2266\u0338",
    "nlarr;": "\u219a",
    "nldr;": "\u2025",
    "nle;": "\u2270",
    "nleftarrow;": "\u219a",
    "nleftrightarrow;": "\u21ae",
    "nleq;": "\u2270",
    "nleqq;": "\u2266\u0338",
    "nleqslant;": "\u2a7d\u0338",
    "nles;": "\u2a7d\u0338",
    "nless;": "\u226e",
    "nlsim;": "\u2274",
    "nlt;": "\u226e",
    "nltri;": "\u22ea",
    "nltrie;": "\u22ec",
    "nmid;": "\u2224",
    "nopf;": "\U0001d55f",
    "not": "\xac",
    "not;": "\xac",
    "notin;": "\u2209",
    "notinE;": "\u22f9\u0338",
    "notindot;": "\u22f5\u0338",
    "notinva;": "\u2209",
    "notinvb;": "\u22f7",
    "notinvc;": "\u22f6",
    "notni;": "\u220c",
    "notniva;": "\u220c",
    "notnivb;": "\u22fe",
    "notnivc;": "\u22fd",
    "npar;": "\u2226",
    "nparallel;": "\u2226",
    "nparsl;": "\u2afd\u20e5",
    "npart;": "\u2202\u0338",
    "npolint;": "\u2a14",
    "npr;": "\u2280",
    "nprcue;": "\u22e0",
    "npre;": "\u2aaf\u0338",
    "nprec;": "\u2280",
    "npreceq;": "\u2aaf\u0338",
    "nrArr;": "\u21cf",
    "nrarr;": "\u219b",
    "nrarrc;": "\u2933\u0338",
    "nrarrw;": "\u219d\u0338",
    "nrightarrow;": "\u219b",
    "nrtri;": "\u22eb",
    "nrtrie;": "\u22ed",
    "nsc;": "\u2281",
    "nsccue;": "\u22e1",
    "nsce;": "\u2ab0\u0338",
    "nscr;": "\U0001d4c3",
    "nshortmid;": "\u2224",
    "nshortparallel;": "\u2226",
    "nsim;": "\u2241",
    "nsime;": "\u2244",
    "nsimeq;": "\u2244",
    "nsmid;": "\u2224",
    "nspar;": "\u2226",
    "nsqsube;": "\u22e2",
    "nsqsupe;": "\u22e3",
    "nsub;": "\u2284",
    "nsubE;": "\u2ac5\u0338",
    "nsube;": "\u2288",
    "nsubset;": "\u2282\u20d2",
    "nsubseteq;": "\u2288",
    "nsubseteqq;": "\u2ac5\u0338",
    "nsucc;": "\u2281",
    "nsucceq;": "\u2ab0\u0338",
    "nsup;": "\u2285",
    "nsupE;": "\u2ac6\u0338",
    "nsupe;": "\u2289",
    "nsupset;": "\u2283\u20d2",
    "nsupseteq;": "\u2289",
    "nsupseteqq;": "\u2ac6\u0338",
    "ntgl;": "\u2279",
    "ntilde": "\xf1",
    "ntilde;": "\xf1",
    "ntlg;": "\u2278",
    "ntriangleleft;": "\u22ea",
    "ntrianglelefteq;": "\u22ec",
    "ntriangleright;": "\u22eb",
    "ntrianglerighteq;": "\u22ed",
    "nu;": "\u03bd",
    "num;": "#",
    "numero;": "\u2116",
    "numsp;": "\u2007",
    "nvDash;": "\u22ad",
    "nvHarr;": "\u2904",
    "nvap;": "\u224d\u20d2",
    "nvdash;": "\u22ac",
    "nvge;": "\u2265\u20d2",
    "nvgt;": ">\u20d2",
    "nvinfin;": "\u29de",
    "nvlArr;": "\u2902",
    "nvle;": "\u2264\u20d2",
    "nvlt;": "<\u20d2",
    "nvltrie;": "\u22b4\u20d2",
    "nvrArr;": "\u2903",
    "nvrtrie;": "\u22b5\u20d2",
    "nvsim;": "\u223c\u20d2",
    "nwArr;": "\u21d6",
    "nwarhk;": "\u2923",
    "nwarr;": "\u2196",
    "nwarrow;": "\u2196",
    "nwnear;": "\u2927",
    "oS;": "\u24c8",
    "oacute": "\xf3",
    "oacute;": "\xf3",
    "oast;": "\u229b",
    "ocir;": "\u229a",
    "ocirc": "\xf4",
    "ocirc;": "\xf4",
    "ocy;": "\u043e",
    "odash;": "\u229d",
    "odblac;": "\u0151",
    "odiv;": "\u2a38",
    "odot;": "\u2299",
    "odsold;": "\u29bc",
    "oelig;": "\u0153",
    "ofcir;": "\u29bf",
    "ofr;": "\U0001d52c",
    "ogon;": "\u02db",
    "ograve": "\xf2",
    "ograve;": "\xf2",
    "ogt;": "\u29c1",
    "ohbar;": "\u29b5",
    "ohm;": "\u03a9",
    "oint;": "\u222e",
    "olarr;": "\u21ba",
    "olcir;": "\u29be",
    "olcross;": "\u29bb",
    "oline;": "\u203e",
    "olt;": "\u29c0",
    "omacr;": "\u014d",
    "omega;": "\u03c9",
    "omicron;": "\u03bf",
    "omid;": "\u29b6",
    "ominus;": "\u2296",
    "oopf;": "\U0001d560",
    "opar;": "\u29b7",
    "operp;": "\u29b9",
    "oplus;": "\u2295",
    "or;": "\u2228",
    "orarr;": "\u21bb",
    "ord;": "\u2a5d",
    "order;": "\u2134",
    "orderof;": "\u2134",
    "ordf": "\xaa",
    "ordf;": "\xaa",
    "ordm": "\xba",
    "ordm;": "\xba",
    "origof;": "\u22b6",
    "oror;": "\u2a56",
    "orslope;": "\u2a57",
    "orv;": "\u2a5b",
    "oscr;": "\u2134",
    "oslash": "\xf8",
    "oslash;": "\xf8",
    "osol;": "\u2298",
    "otilde": "\xf5",
    "otilde;": "\xf5",
    "otimes;": "\u2297",
    "otimesas;": "\u2a36",
    "ouml": "\xf6",
    "ouml;": "\xf6",
    "ovbar;": "\u233d",
    "par;": "\u2225",
    "para": "\xb6",
    "para;": "\xb6",
    "parallel;": "\u2225",
    "parsim;": "\u2af3",
    "parsl;": "\u2afd",
    "part;": "\u2202",
    "pcy;": "\u043f",
    "percnt;": "%",
    "period;": ".",
    "permil;": "\u2030",
    "perp;": "\u22a5",
    "pertenk;": "\u2031",
    "pfr;": "\U0001d52d",
    "phi;": "\u03c6",
    "phiv;": "\u03d5",
    "phmmat;": "\u2133",
    "phone;": "\u260e",
    "pi;": "\u03c0",
    "pitchfork;": "\u22d4",
    "piv;": "\u03d6",
    "planck;": "\u210f",
    "planckh;": "\u210e",
    "plankv;": "\u210f",
    "plus;": "+",
    "plusacir;": "\u2a23",
    "plusb;": "\u229e",
    "pluscir;": "\u2a22",
    "plusdo;": "\u2214",
    "plusdu;": "\u2a25",
    "pluse;": "\u2a72",
    "plusmn": "\xb1",
    "plusmn;": "\xb1",
    "plussim;": "\u2a26",
    "plustwo;": "\u2a27",
    "pm;": "\xb1",
    "pointint;": "\u2a15",
    "popf;": "\U0001d561",
    "pound": "\xa3",
    "pound;": "\xa3",
    "pr;": "\u227a",
    "prE;": "\u2ab3",
    "prap;": "\u2ab7",
    "prcue;": "\u227c",
    "pre;": "\u2aaf",
    "prec;": "\u227a",
    "precapprox;": "\u2ab7",
    "preccurlyeq;": "\u227c",
    "preceq;": "\u2aaf",
    "precnapprox;": "\u2ab9",
    "precneqq;": "\u2ab5",
    "precnsim;": "\u22e8",
    "precsim;": "\u227e",
    "prime;": "\u2032",
    "primes;": "\u2119",
    "prnE;": "\u2ab5",
    "prnap;": "\u2ab9",
    "prnsim;": "\u22e8",
    "prod;": "\u220f",
    "profalar;": "\u232e",
    "profline;": "\u2312",
    "profsurf;": "\u2313",
    "prop;": "\u221d",
    "propto;": "\u221d",
    "prsim;": "\u227e",
    "prurel;": "\u22b0",
    "pscr;": "\U0001d4c5",
    "psi;": "\u03c8",
    "puncsp;": "\u2008",
    "qfr;": "\U0001d52e",
    "qint;": "\u2a0c",
    "qopf;": "\U0001d562",
    "qprime;": "\u2057",
    "qscr;": "\U0001d4c6",
    "quaternions;": "\u210d",
    "quatint;": "\u2a16",
    "quest;": "?",
    "questeq;": "\u225f",
    "quot": "\"",
    "quot;": "\"",
    "rAarr;": "\u21db",
    "rArr;": "\u21d2",
    "rAtail;": "\u291c",
    "rBarr;": "\u290f",
    "rHar;": "\u2964",
    "race;": "\u223d\u0331",
    "racute;": "\u0155",
    "radic;": "\u221a",
    "raemptyv;": "\u29b3",
    "rang;": "\u27e9",
    "rangd;": "\u2992",
    "range;": "\u29a5",
    "rangle;": "\u27e9",
    "raquo": "\xbb",
    "raquo;": "\xbb",
    "rarr;": "\u2192",
    "rarrap;": "\u2975",
    "rarrb;": "\u21e5",
    "rarrbfs;": "\u2920",
    "rarrc;": "\u2933",
    "rarrfs;": "\u291e",
    "rarrhk;": "\u21aa",
    "rarrlp;": "\u21ac",
    "rarrpl;": "\u2945",
    "rarrsim;": "\u2974",
    "rarrtl;": "\u21a3",
    "rarrw;": "\u219d",
    "ratail;": "\u291a",
    "ratio;": "\u2236",
    "rationals;": "\u211a",
    "rbarr;": "\u290d",
    "rbbrk;": "\u2773",
    "rbrace;": "}",
    "rbrack;": "]",
    "rbrke;": "\u298c",
    "rbrksld;": "\u298e",
    "rbrkslu;": "\u2990",
    "rcaron;": "\u0159",
    "rcedil;": "\u0157",
    "rceil;": "\u2309",
    "rcub;": "}",
    "rcy;": "\u0440",
    "rdca;": "\u2937",
    "rdldhar;": "\u2969",
    "rdquo;": "\u201d",
    "rdquor;": "\u201d",
    "rdsh;": "\u21b3",
    "real;": "\u211c",
    "realine;": "\u211b",
    "realpart;": "\u211c",
    "reals;": "\u211d",
    "rect;": "\u25ad",
    "reg": "\xae",
    "reg;": "\xae",
    "rfisht;": "\u297d",
    "rfloor;": "\u230b",
    "rfr;": "\U0001d52f",
    "rhard;": "\u21c1",
    "rharu;": "\u21c0",
    "rharul;": "\u296c",
    "rho;": "\u03c1",
    "rhov;": "\u03f1",
    "rightarrow;": "\u2192",
    "rightarrowtail;": "\u21a3",
    "rightharpoondown;": "\u21c1",
    "rightharpoonup;": "\u21c0",
    "rightleftarrows;": "\u21c4",
    "rightleftharpoons;": "\u21cc",
    "rightrightarrows;": "\u21c9",
    "rightsquigarrow;": "\u219d",
    "rightthreetimes;": "\u22cc",
    "ring;": "\u02da",
    "risingdotseq;": "\u2253",
    "rlarr;": "\u21c4",
    "rlhar;": "\u21cc",
    "rlm;": "\u200f",
    "rmoust;": "\u23b1",
    "rmoustache;": "\u23b1",
    "rnmid;": "\u2aee",
    "roang;": "\u27ed",
    "roarr;": "\u21fe",
    "robrk;": "\u27e7",
    "ropar;": "\u2986",
    "ropf;": "\U0001d563",
    "roplus;": "\u2a2e",
    "rotimes;": "\u2a35",
    "rpar;": ")",
    "rpargt;": "\u2994",
    "rppolint;": "\u2a12",
    "rrarr;": "\u21c9",
    "rsaquo;": "\u203a",
    "rscr;": "\U0001d4c7",
    "rsh;": "\u21b1",
    "rsqb;": "]",
    "rsquo;": "\u2019",
    "rsquor;": "\u2019",
    "rthree;": "\u22cc",
    "rtimes;": "\u22ca",
    "rtri;": "\u25b9",
    "rtrie;": "\u22b5",
    "rtrif;": "\u25b8",
    "rtriltri;": "\u29ce",
    "ruluhar;": "\u2968",
    "rx;": "\u211e",
    "sacute;": "\u015b",
    "sbquo;": "\u201a",
    "sc;": "\u227b",
    "scE;": "\u2ab4",
    "scap;": "\u2ab8",
    "scaron;": "\u0161",
    "sccue;": "\u227d",
    "sce;": "\u2ab0",
    "scedil;": "\u015f",
    "scirc;": "\u015d",
    "scnE;": "\u2ab6",
    "scnap;": "\u2aba",
    "scnsim;": "\u22e9",
    "scpolint;": "\u2a13",
    "scsim;": "\u227f",
    "scy;": "\u0441",
    "sdot;": "\u22c5",
    "sdotb;": "\u22a1",
    "sdote;": "\u2a66",
    "seArr;": "\u21d8",
    "searhk;": "\u2925",
    "searr;": "\u2198",
    "searrow;": "\u2198",
    "sect": "\xa7",
    "sect;": "\xa7",
    "semi;": ";",
    "seswar;": "\u2929",
    "setminus;": "\u2216",
    "setmn;": "\u2216",
    "sext;": "\u2736",
    "sfr;": "\U0001d530",
    "sfrown;": "\u2322",
    "sharp;": "\u266f",
    "shchcy;": "\u0449",
    "shcy;": "\u0448",
    "shortmid;": "\u2223",
    "shortparallel;": "\u2225",
    "shy": "\xad",
    "shy;": "\xad",
    "sigma;": "\u03c3",
    "sigmaf;": "\u03c2",
    "sigmav;": "\u03c2",
    "sim;": "\u223c",
    "simdot;": "\u2a6a",
    "sime;": "\u2243",
    "simeq;": "\u2243",
    "simg;": "\u2a9e",
    "simgE;": "\u2aa0",
    "siml;": "\u2a9d",
    "simlE;": "\u2a9f",
    "simne;": "\u2246",
    "simplus;": "\u2a24",
    "simrarr;": "\u2972",
    "slarr;": "\u2190",
    "smallsetminus;": "\u2216",
    "smashp;": "\u2a33",
    "smeparsl;": "\u29e4",
    "smid;": "\u2223",
    "smile;": "\u2323",
    "smt;": "\u2aaa",
    "smte;": "\u2aac",
    "smtes;": "\u2aac\ufe00",
    "softcy;": "\u044c",
    "sol;": "/",
    "solb;": "\u29c4",
    "solbar;": "\u233f",
    "sopf;": "\U0001d564",
    "spades;": "\u2660",
    "spadesuit;": "\u2660",
    "spar;": "\u2225",
    "sqcap;": "\u2293",
    "sqcaps;": "\u2293\ufe00",
    "sqcup;": "\u2294",
    "sqcups;": "\u2294\ufe00",
    "sqsub;": "\u228f",
    "sqsube;": "\u2291",
    "sqsubset;": "\u228f",
    "sqsubseteq;": "\u2291",
    "sqsup;": "\u2290",
    "sqsupe;": "\u2292",
    "sqsupset;": "\u2290",
    "sqsupseteq;": "\u2292",
    "squ;": "\u25a1",
    "square;": "\u25a1",
    "squarf;": "\u25aa",
    "squf;": "\u25aa",
    "srarr;": "\u2192",
    "sscr;": "\U0001d4c8",
    "ssetmn;": "\u2216",
    "ssmile;": "\u2323",
    "sstarf;": "\u22c6",
    "star;": "\u2606",
    "starf;": "\u2605",
    "straightepsilon;": "\u03f5",
    "straightphi;": "\u03d5",
    "strns;": "\xaf",
    "sub;": "\u2282",
    "subE;": "\u2ac5",
    "subdot;": "\u2abd",
    "sube;": "\u2286",
    "subedot;": "\u2ac3",
    "submult;": "\u2ac1",
    "subnE;": "\u2acb",
    "subne;": "\u228a",
    "subplus;": "\u2abf",
    "subrarr;": "\u2979",
    "subset;": "\u2282",
    "subseteq;": "\u2286",
    "subseteqq;": "\u2ac5",
    "subsetneq;": "\u228a",
    "subsetneqq;": "\u2acb",
    "subsim;": "\u2ac7",
    "subsub;": "\u2ad5",
    "subsup;": "\u2ad3",
    "succ;": "\u227b",
    "succapprox;": "\u2ab8",
    "succcurlyeq;": "\u227d",
    "succeq;": "\u2ab0",
    "succnapprox;": "\u2aba",
    "succneqq;": "\u2ab6",
    "succnsim;": "\u22e9",
    "succsim;": "\u227f",
    "sum;": "\u2211",
    "sung;": "\u266a",
    "sup1": "\xb9",
    "sup1;": "\xb9",
    "sup2": "\xb2",
    "sup2;": "\xb2",
    "sup3": "\xb3",
    "sup3;": "\xb3",
    "sup;": "\u2283",
    "supE;": "\u2ac6",
    "supdot;": "\u2abe",
    "supdsub;": "\u2ad8",
    "supe;": "\u2287",
    "supedot;": "\u2ac4",
    "suphsol;": "\u27c9",
    "suphsub;": "\u2ad7",
    "suplarr;": "\u297b",
    "supmult;": "\u2ac2",
    "supnE;": "\u2acc",
    "supne;": "\u228b",
    "supplus;": "\u2ac0",
    "supset;": "\u2283",
    "supseteq;": "\u2287",
    "supseteqq;": "\u2ac6",
    "supsetneq;": "\u228b",
    "supsetneqq;": "\u2acc",
    "supsim;": "\u2ac8",
    "supsub;": "\u2ad4",
    "supsup;": "\u2ad6",
    "swArr;": "\u21d9",
    "swarhk;": "\u2926",
    "swarr;": "\u2199",
    "swarrow;": "\u2199",
    "swnwar;": "\u292a",
    "szlig": "\xdf",
    "szlig;": "\xdf",
    "target;": "\u2316",
    "tau;": "\u03c4",
    "tbrk;": "\u23b4",
    "tcaron;": "\u0165",
    "tcedil;": "\u0163",
    "tcy;": "\u0442",
    "tdot;": "\u20db",
    "telrec;": "\u2315",
    "tfr;": "\U0001d531",
    "there4;": "\u2234",
    "therefore;": "\u2234",
    "theta;": "\u03b8",
    "thetasym;": "\u03d1",
    "thetav;": "\u03d1",
    "thickapprox;": "\u2248",
    "thicksim;": "\u223c",
    "thinsp;": "\u2009",
    "thkap;": "\u2248",
    "thksim;": "\u223c",
    "thorn": "\xfe",
    "thorn;": "\xfe",
    "tilde;": "\u02dc",
    "times": "\xd7",
    "times;": "\xd7",
    "timesb;": "\u22a0",
    "timesbar;": "\u2a31",
    "timesd;": "\u2a30",
    "tint;": "\u222d",
    "toea;": "\u2928",
    "top;": "\u22a4",
    "topbot;": "\u2336",
    "topcir;": "\u2af1",
    "topf;": "\U0001d565",
    "topfork;": "\u2ada",
    "tosa;": "\u2929",
    "tprime;": "\u2034",
    "trade;": "\u2122",
    "triangle;": "\u25b5",
    "triangledown;": "\u25bf",
    "triangleleft;": "\u25c3",
    "trianglelefteq;": "\u22b4",
    "triangleq;": "\u225c",
    "triangleright;": "\u25b9",
    "trianglerighteq;": "\u22b5",
    "tridot;": "\u25ec",
    "trie;": "\u225c",
    "triminus;": "\u2a3a",
    "triplus;": "\u2a39",
    "trisb;": "\u29cd",
    "tritime;": "\u2a3b",
    "trpezium;": "\u23e2",
    "tscr;": "\U0001d4c9",
    "tscy;": "\u0446",
    "tshcy;": "\u045b",
    "tstrok;": "\u0167",
    "twixt;": "\u226c",
    "twoheadleftarrow;": "\u219e",
    "twoheadrightarrow;": "\u21a0",
    "uArr;": "\u21d1",
    "uHar;": "\u2963",
    "uacute": "\xfa",
    "uacute;": "\xfa",
    "uarr;": "\u2191",
    "ubrcy;": "\u045e",
    "ubreve;": "\u016d",
    "ucirc": "\xfb",
    "ucirc;": "\xfb",
    "ucy;": "\u0443",
    "udarr;": "\u21c5",
    "udblac;": "\u0171",
    "udhar;": "\u296e",
    "ufisht;": "\u297e",
    "ufr;": "\U0001d532",
    "ugrave": "\xf9",
    "ugrave;": "\xf9",
    "uharl;": "\u21bf",
    "uharr;": "\u21be",
    "uhblk;": "\u2580",
    "ulcorn;": "\u231c",
    "ulcorner;": "\u231c",
    "ulcrop;": "\u230f",
    "ultri;": "\u25f8",
    "umacr;": "\u016b",
    "uml": "\xa8",
    "uml;": "\xa8",
    "uogon;": "\u0173",
    "uopf;": "\U0001d566",
    "uparrow;": "\u2191",
    "updownarrow;": "\u2195",
    "upharpoonleft;": "\u21bf",
    "upharpoonright;": "\u21be",
    "uplus;": "\u228e",
    "upsi;": "\u03c5",
    "upsih;": "\u03d2",
    "upsilon;": "\u03c5",
    "upuparrows;": "\u21c8",
    "urcorn;": "\u231d",
    "urcorner;": "\u231d",
    "urcrop;": "\u230e",
    "uring;": "\u016f",
    "urtri;": "\u25f9",
    "uscr;": "\U0001d4ca",
    "utdot;": "\u22f0",
    "utilde;": "\u0169",
    "utri;": "\u25b5",
    "utrif;": "\u25b4",
    "uuarr;": "\u21c8",
    "uuml": "\xfc",
    "uuml;": "\xfc",
    "uwangle;": "\u29a7",
    "vArr;": "\u21d5",
    "vBar;": "\u2ae8",
    "vBarv;": "\u2ae9",
    "vDash;": "\u22a8",
    "vangrt;": "\u299c",
    "varepsilon;": "\u03f5",
    "varkappa;": "\u03f0",
    "varnothing;": "\u2205",
    "varphi;": "\u03d5",
    "varpi;": "\u03d6",
    "varpropto;": "\u221d",
    "varr;": "\u2195",
    "varrho;": "\u03f1",
    "varsigma;": "\u03c2",
    "varsubsetneq;": "\u228a\ufe00",
    "varsubsetneqq;": "\u2acb\ufe00",
    "varsupsetneq;": "\u228b\ufe00",
    "varsupsetneqq;": "\u2acc\ufe00",
    "vartheta;": "\u03d1",
    "vartriangleleft;": "\u22b2",
    "vartriangleright;": "\u22b3",
    "vcy;": "\u0432",
    "vdash;": "\u22a2",
    "vee;": "\u2228",
    "veebar;": "\u22bb",
    "veeeq;": "\u225a",
    "vellip;": "\u22ee",
    "verbar;": "|",
    "vert;": "|",
    "vfr;": "\U0001d533",
    "vltri;": "\u22b2",
    "vnsub;": "\u2282\u20d2",
    "vnsup;": "\u2283\u20d2",
    "vopf;": "\U0001d567",
    "vprop;": "\u221d",
    "vrtri;": "\u22b3",
    "vscr;": "\U0001d4cb",
    "vsubnE;": "\u2acb\ufe00",
    "vsubne;": "\u228a\ufe00",
    "vsupnE;": "\u2acc\ufe00",
    "vsupne;": "\u228b\ufe00",
    "vzigzag;": "\u299a",
    "wcirc;": "\u0175",
    "wedbar;": "\u2a5f",
    "wedge;": "\u2227",
    "wedgeq;": "\u2259",
    "weierp;": "\u2118",
    "wfr;": "\U0001d534",
    "wopf;": "\U0001d568",
    "wp;": "\u2118",
    "wr;": "\u2240",
    "wreath;": "\u2240",
    "wscr;": "\U0001d4cc",
    "xcap;": "\u22c2",
    "xcirc;": "\u25ef",
    "xcup;": "\u22c3",
    "xdtri;": "\u25bd",
    "xfr;": "\U0001d535",
    "xhArr;": "\u27fa",
    "xharr;": "\u27f7",
    "xi;": "\u03be",
    "xlArr;": "\u27f8",
    "xlarr;": "\u27f5",
    "xmap;": "\u27fc",
    "xnis;": "\u22fb",
    "xodot;": "\u2a00",
    "xopf;": "\U0001d569",
    "xoplus;": "\u2a01",
    "xotime;": "\u2a02",
    "xrArr;": "\u27f9",
    "xrarr;": "\u27f6",
    "xscr;": "\U0001d4cd",
    "xsqcup;": "\u2a06",
    "xuplus;": "\u2a04",
    "xutri;": "\u25b3",
    "xvee;": "\u22c1",
    "xwedge;": "\u22c0",
    "yacute": "\xfd",
    "yacute;": "\xfd",
    "yacy;": "\u044f",
    "ycirc;": "\u0177",
    "ycy;": "\u044b",
    "yen": "\xa5",
    "yen;": "\xa5",
    "yfr;": "\U0001d536",
    "yicy;": "\u0457",
    "yopf;": "\U0001d56a",
    "yscr;": "\U0001d4ce",
    "yucy;": "\u044e",
    "yuml": "\xff",
    "yuml;": "\xff",
    "zacute;": "\u017a",
    "zcaron;": "\u017e",
    "zcy;": "\u0437",
    "zdot;": "\u017c",
    "zeetrf;": "\u2128",
    "zeta;": "\u03b6",
    "zfr;": "\U0001d537",
    "zhcy;": "\u0436",
    "zigrarr;": "\u21dd",
    "zopf;": "\U0001d56b",
    "zscr;": "\U0001d4cf",
    "zwj;": "\u200d",
    "zwnj;": "\u200c",
}

replacementCharacters = {
    0x0: "\uFFFD",
    0x0d: "\u000D",
    0x80: "\u20AC",
    0x81: "\u0081",
    0x81: "\u0081",
    0x82: "\u201A",
    0x83: "\u0192",
    0x84: "\u201E",
    0x85: "\u2026",
    0x86: "\u2020",
    0x87: "\u2021",
    0x88: "\u02C6",
    0x89: "\u2030",
    0x8A: "\u0160",
    0x8B: "\u2039",
    0x8C: "\u0152",
    0x8D: "\u008D",
    0x8E: "\u017D",
    0x8F: "\u008F",
    0x90: "\u0090",
    0x91: "\u2018",
    0x92: "\u2019",
    0x93: "\u201C",
    0x94: "\u201D",
    0x95: "\u2022",
    0x96: "\u2013",
    0x97: "\u2014",
    0x98: "\u02DC",
    0x99: "\u2122",
    0x9A: "\u0161",
    0x9B: "\u203A",
    0x9C: "\u0153",
    0x9D: "\u009D",
    0x9E: "\u017E",
    0x9F: "\u0178",
}

encodings = {
    '437': 'cp437',
    '850': 'cp850',
    '852': 'cp852',
    '855': 'cp855',
    '857': 'cp857',
    '860': 'cp860',
    '861': 'cp861',
    '862': 'cp862',
    '863': 'cp863',
    '865': 'cp865',
    '866': 'cp866',
    '869': 'cp869',
    'ansix341968': 'ascii',
    'ansix341986': 'ascii',
    'arabic': 'iso8859-6',
    'ascii': 'ascii',
    'asmo708': 'iso8859-6',
    'big5': 'big5',
    'big5hkscs': 'big5hkscs',
    'chinese': 'gbk',
    'cp037': 'cp037',
    'cp1026': 'cp1026',
    'cp154': 'ptcp154',
    'cp367': 'ascii',
    'cp424': 'cp424',
    'cp437': 'cp437',
    'cp500': 'cp500',
    'cp775': 'cp775',
    'cp819': 'windows-1252',
    'cp850': 'cp850',
    'cp852': 'cp852',
    'cp855': 'cp855',
    'cp857': 'cp857',
    'cp860': 'cp860',
    'cp861': 'cp861',
    'cp862': 'cp862',
    'cp863': 'cp863',
    'cp864': 'cp864',
    'cp865': 'cp865',
    'cp866': 'cp866',
    'cp869': 'cp869',
    'cp936': 'gbk',
    'cpgr': 'cp869',
    'cpis': 'cp861',
    'csascii': 'ascii',
    'csbig5': 'big5',
    'cseuckr': 'cp949',
    'cseucpkdfmtjapanese': 'euc_jp',
    'csgb2312': 'gbk',
    'cshproman8': 'hp-roman8',
    'csibm037': 'cp037',
    'csibm1026': 'cp1026',
    'csibm424': 'cp424',
    'csibm500': 'cp500',
    'csibm855': 'cp855',
    'csibm857': 'cp857',
    'csibm860': 'cp860',
    'csibm861': 'cp861',
    'csibm863': 'cp863',
    'csibm864': 'cp864',
    'csibm865': 'cp865',
    'csibm866': 'cp866',
    'csibm869': 'cp869',
    'csiso2022jp': 'iso2022_jp',
    'csiso2022jp2': 'iso2022_jp_2',
    'csiso2022kr': 'iso2022_kr',
    'csiso58gb231280': 'gbk',
    'csisolatin1': 'windows-1252',
    'csisolatin2': 'iso8859-2',
    'csisolatin3': 'iso8859-3',
    'csisolatin4': 'iso8859-4',
    'csisolatin5': 'windows-1254',
    'csisolatin6': 'iso8859-10',
    'csisolatinarabic': 'iso8859-6',
    'csisolatincyrillic': 'iso8859-5',
    'csisolatingreek': 'iso8859-7',
    'csisolatinhebrew': 'iso8859-8',
    'cskoi8r': 'koi8-r',
    'csksc56011987': 'cp949',
    'cspc775baltic': 'cp775',
    'cspc850multilingual': 'cp850',
    'cspc862latinhebrew': 'cp862',
    'cspc8codepage437': 'cp437',
    'cspcp852': 'cp852',
    'csptcp154': 'ptcp154',
    'csshiftjis': 'shift_jis',
    'csunicode11utf7': 'utf-7',
    'cyrillic': 'iso8859-5',
    'cyrillicasian': 'ptcp154',
    'ebcdiccpbe': 'cp500',
    'ebcdiccpca': 'cp037',
    'ebcdiccpch': 'cp500',
    'ebcdiccphe': 'cp424',
    'ebcdiccpnl': 'cp037',
    'ebcdiccpus': 'cp037',
    'ebcdiccpwt': 'cp037',
    'ecma114': 'iso8859-6',
    'ecma118': 'iso8859-7',
    'elot928': 'iso8859-7',
    'eucjp': 'euc_jp',
    'euckr': 'cp949',
    'extendedunixcodepackedformatforjapanese': 'euc_jp',
    'gb18030': 'gb18030',
    'gb2312': 'gbk',
    'gb231280': 'gbk',
    'gbk': 'gbk',
    'greek': 'iso8859-7',
    'greek8': 'iso8859-7',
    'hebrew': 'iso8859-8',
    'hproman8': 'hp-roman8',
    'hzgb2312': 'hz',
    'ibm037': 'cp037',
    'ibm1026': 'cp1026',
    'ibm367': 'ascii',
    'ibm424': 'cp424',
    'ibm437': 'cp437',
    'ibm500': 'cp500',
    'ibm775': 'cp775',
    'ibm819': 'windows-1252',
    'ibm850': 'cp850',
    'ibm852': 'cp852',
    'ibm855': 'cp855',
    'ibm857': 'cp857',
    'ibm860': 'cp860',
    'ibm861': 'cp861',
    'ibm862': 'cp862',
    'ibm863': 'cp863',
    'ibm864': 'cp864',
    'ibm865': 'cp865',
    'ibm866': 'cp866',
    'ibm869': 'cp869',
    'iso2022jp': 'iso2022_jp',
    'iso2022jp2': 'iso2022_jp_2',
    'iso2022kr': 'iso2022_kr',
    'iso646irv1991': 'ascii',
    'iso646us': 'ascii',
    'iso88591': 'windows-1252',
    'iso885910': 'iso8859-10',
    'iso8859101992': 'iso8859-10',
    'iso885911987': 'windows-1252',
    'iso885913': 'iso8859-13',
    'iso885914': 'iso8859-14',
    'iso8859141998': 'iso8859-14',
    'iso885915': 'iso8859-15',
    'iso885916': 'iso8859-16',
    'iso8859162001': 'iso8859-16',
    'iso88592': 'iso8859-2',
    'iso885921987': 'iso8859-2',
    'iso88593': 'iso8859-3',
    'iso885931988': 'iso8859-3',
    'iso88594': 'iso8859-4',
    'iso885941988': 'iso8859-4',
    'iso88595': 'iso8859-5',
    'iso885951988': 'iso8859-5',
    'iso88596': 'iso8859-6',
    'iso885961987': 'iso8859-6',
    'iso88597': 'iso8859-7',
    'iso885971987': 'iso8859-7',
    'iso88598': 'iso8859-8',
    'iso885981988': 'iso8859-8',
    'iso88599': 'windows-1254',
    'iso885991989': 'windows-1254',
    'isoceltic': 'iso8859-14',
    'isoir100': 'windows-1252',
    'isoir101': 'iso8859-2',
    'isoir109': 'iso8859-3',
    'isoir110': 'iso8859-4',
    'isoir126': 'iso8859-7',
    'isoir127': 'iso8859-6',
    'isoir138': 'iso8859-8',
    'isoir144': 'iso8859-5',
    'isoir148': 'windows-1254',
    'isoir149': 'cp949',
    'isoir157': 'iso8859-10',
    'isoir199': 'iso8859-14',
    'isoir226': 'iso8859-16',
    'isoir58': 'gbk',
    'isoir6': 'ascii',
    'koi8r': 'koi8-r',
    'koi8u': 'koi8-u',
    'korean': 'cp949',
    'ksc5601': 'cp949',
    'ksc56011987': 'cp949',
    'ksc56011989': 'cp949',
    'l1': 'windows-1252',
    'l10': 'iso8859-16',
    'l2': 'iso8859-2',
    'l3': 'iso8859-3',
    'l4': 'iso8859-4',
    'l5': 'windows-1254',
    'l6': 'iso8859-10',
    'l8': 'iso8859-14',
    'latin1': 'windows-1252',
    'latin10': 'iso8859-16',
    'latin2': 'iso8859-2',
    'latin3': 'iso8859-3',
    'latin4': 'iso8859-4',
    'latin5': 'windows-1254',
    'latin6': 'iso8859-10',
    'latin8': 'iso8859-14',
    'latin9': 'iso8859-15',
    'ms936': 'gbk',
    'mskanji': 'shift_jis',
    'pt154': 'ptcp154',
    'ptcp154': 'ptcp154',
    'r8': 'hp-roman8',
    'roman8': 'hp-roman8',
    'shiftjis': 'shift_jis',
    'tis620': 'cp874',
    'unicode11utf7': 'utf-7',
    'us': 'ascii',
    'usascii': 'ascii',
    'utf16': 'utf-16',
    'utf16be': 'utf-16-be',
    'utf16le': 'utf-16-le',
    'utf8': 'utf-8',
    'windows1250': 'cp1250',
    'windows1251': 'cp1251',
    'windows1252': 'cp1252',
    'windows1253': 'cp1253',
    'windows1254': 'cp1254',
    'windows1255': 'cp1255',
    'windows1256': 'cp1256',
    'windows1257': 'cp1257',
    'windows1258': 'cp1258',
    'windows936': 'gbk',
    'x-x-big5': 'big5'}

tokenTypes = {
    "Doctype": 0,
    "Characters": 1,
    "SpaceCharacters": 2,
    "StartTag": 3,
    "EndTag": 4,
    "EmptyTag": 5,
    "Comment": 6,
    "ParseError": 7
}

tagTokenTypes = frozenset((tokenTypes["StartTag"], tokenTypes["EndTag"],
                           tokenTypes["EmptyTag"]))


prefixes = dict([(v, k) for k, v in namespaces.items()])
prefixes["http://www.w3.org/1998/Math/MathML"] = "math"


class DataLossWarning(UserWarning):
    pass


class ReparseException(Exception):
    pass
python3.4/site-packages/pip/_vendor/html5lib/html5parser.py000064400000344445151735047530017646 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import with_metaclass

import types

from . import inputstream
from . import tokenizer

from . import treebuilders
from .treebuilders._base import Marker

from . import utils
from . import constants
from .constants import spaceCharacters, asciiUpper2Lower
from .constants import specialElements
from .constants import headingElements
from .constants import cdataElements, rcdataElements
from .constants import tokenTypes, ReparseException, namespaces
from .constants import htmlIntegrationPointElements, mathmlTextIntegrationPointElements
from .constants import adjustForeignAttributes as adjustForeignAttributesMap


def parse(doc, treebuilder="etree", encoding=None,
          namespaceHTMLElements=True):
    """Parse a string or file-like object into a tree"""
    tb = treebuilders.getTreeBuilder(treebuilder)
    p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements)
    return p.parse(doc, encoding=encoding)


def parseFragment(doc, container="div", treebuilder="etree", encoding=None,
                  namespaceHTMLElements=True):
    tb = treebuilders.getTreeBuilder(treebuilder)
    p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements)
    return p.parseFragment(doc, container=container, encoding=encoding)


def method_decorator_metaclass(function):
    class Decorated(type):
        def __new__(meta, classname, bases, classDict):
            for attributeName, attribute in classDict.items():
                if isinstance(attribute, types.FunctionType):
                    attribute = function(attribute)

                classDict[attributeName] = attribute
            return type.__new__(meta, classname, bases, classDict)
    return Decorated


class HTMLParser(object):
    """HTML parser. Generates a tree structure from a stream of (possibly
        malformed) HTML"""

    def __init__(self, tree=None, tokenizer=tokenizer.HTMLTokenizer,
                 strict=False, namespaceHTMLElements=True, debug=False):
        """
        strict - raise an exception when a parse error is encountered

        tree - a treebuilder class controlling the type of tree that will be
        returned. Built in treebuilders can be accessed through
        html5lib.treebuilders.getTreeBuilder(treeType)

        tokenizer - a class that provides a stream of tokens to the treebuilder.
        This may be replaced for e.g. a sanitizer which converts some tags to
        text
        """

        # Raise an exception on the first error encountered
        self.strict = strict

        if tree is None:
            tree = treebuilders.getTreeBuilder("etree")
        self.tree = tree(namespaceHTMLElements)
        self.tokenizer_class = tokenizer
        self.errors = []

        self.phases = dict([(name, cls(self, self.tree)) for name, cls in
                            getPhases(debug).items()])

    def _parse(self, stream, innerHTML=False, container="div",
               encoding=None, parseMeta=True, useChardet=True, **kwargs):

        self.innerHTMLMode = innerHTML
        self.container = container
        self.tokenizer = self.tokenizer_class(stream, encoding=encoding,
                                              parseMeta=parseMeta,
                                              useChardet=useChardet,
                                              parser=self, **kwargs)
        self.reset()

        while True:
            try:
                self.mainLoop()
                break
            except ReparseException:
                self.reset()

    def reset(self):
        self.tree.reset()
        self.firstStartTag = False
        self.errors = []
        self.log = []  # only used with debug mode
        # "quirks" / "limited quirks" / "no quirks"
        self.compatMode = "no quirks"

        if self.innerHTMLMode:
            self.innerHTML = self.container.lower()

            if self.innerHTML in cdataElements:
                self.tokenizer.state = self.tokenizer.rcdataState
            elif self.innerHTML in rcdataElements:
                self.tokenizer.state = self.tokenizer.rawtextState
            elif self.innerHTML == 'plaintext':
                self.tokenizer.state = self.tokenizer.plaintextState
            else:
                # state already is data state
                # self.tokenizer.state = self.tokenizer.dataState
                pass
            self.phase = self.phases["beforeHtml"]
            self.phase.insertHtmlElement()
            self.resetInsertionMode()
        else:
            self.innerHTML = False
            self.phase = self.phases["initial"]

        self.lastPhase = None

        self.beforeRCDataPhase = None

        self.framesetOK = True

    def isHTMLIntegrationPoint(self, element):
        if (element.name == "annotation-xml" and
                element.namespace == namespaces["mathml"]):
            return ("encoding" in element.attributes and
                    element.attributes["encoding"].translate(
                        asciiUpper2Lower) in
                    ("text/html", "application/xhtml+xml"))
        else:
            return (element.namespace, element.name) in htmlIntegrationPointElements

    def isMathMLTextIntegrationPoint(self, element):
        return (element.namespace, element.name) in mathmlTextIntegrationPointElements

    def mainLoop(self):
        CharactersToken = tokenTypes["Characters"]
        SpaceCharactersToken = tokenTypes["SpaceCharacters"]
        StartTagToken = tokenTypes["StartTag"]
        EndTagToken = tokenTypes["EndTag"]
        CommentToken = tokenTypes["Comment"]
        DoctypeToken = tokenTypes["Doctype"]
        ParseErrorToken = tokenTypes["ParseError"]

        for token in self.normalizedTokens():
            new_token = token
            while new_token is not None:
                currentNode = self.tree.openElements[-1] if self.tree.openElements else None
                currentNodeNamespace = currentNode.namespace if currentNode else None
                currentNodeName = currentNode.name if currentNode else None

                type = new_token["type"]

                if type == ParseErrorToken:
                    self.parseError(new_token["data"], new_token.get("datavars", {}))
                    new_token = None
                else:
                    if (len(self.tree.openElements) == 0 or
                        currentNodeNamespace == self.tree.defaultNamespace or
                        (self.isMathMLTextIntegrationPoint(currentNode) and
                         ((type == StartTagToken and
                           token["name"] not in frozenset(["mglyph", "malignmark"])) or
                          type in (CharactersToken, SpaceCharactersToken))) or
                        (currentNodeNamespace == namespaces["mathml"] and
                         currentNodeName == "annotation-xml" and
                         token["name"] == "svg") or
                        (self.isHTMLIntegrationPoint(currentNode) and
                         type in (StartTagToken, CharactersToken, SpaceCharactersToken))):
                        phase = self.phase
                    else:
                        phase = self.phases["inForeignContent"]

                    if type == CharactersToken:
                        new_token = phase.processCharacters(new_token)
                    elif type == SpaceCharactersToken:
                        new_token = phase.processSpaceCharacters(new_token)
                    elif type == StartTagToken:
                        new_token = phase.processStartTag(new_token)
                    elif type == EndTagToken:
                        new_token = phase.processEndTag(new_token)
                    elif type == CommentToken:
                        new_token = phase.processComment(new_token)
                    elif type == DoctypeToken:
                        new_token = phase.processDoctype(new_token)

            if (type == StartTagToken and token["selfClosing"]
                    and not token["selfClosingAcknowledged"]):
                self.parseError("non-void-element-with-trailing-solidus",
                                {"name": token["name"]})

        # When the loop finishes it's EOF
        reprocess = True
        phases = []
        while reprocess:
            phases.append(self.phase)
            reprocess = self.phase.processEOF()
            if reprocess:
                assert self.phase not in phases

    def normalizedTokens(self):
        for token in self.tokenizer:
            yield self.normalizeToken(token)

    def parse(self, stream, encoding=None, parseMeta=True, useChardet=True):
        """Parse a HTML document into a well-formed tree

        stream - a filelike object or string containing the HTML to be parsed

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)
        """
        self._parse(stream, innerHTML=False, encoding=encoding,
                    parseMeta=parseMeta, useChardet=useChardet)
        return self.tree.getDocument()

    def parseFragment(self, stream, container="div", encoding=None,
                      parseMeta=False, useChardet=True):
        """Parse a HTML fragment into a well-formed tree fragment

        container - name of the element we're setting the innerHTML property
        if set to None, default to 'div'

        stream - a filelike object or string containing the HTML to be parsed

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)
        """
        self._parse(stream, True, container=container, encoding=encoding)
        return self.tree.getFragment()

    def parseError(self, errorcode="XXX-undefined-error", datavars={}):
        # XXX The idea is to make errorcode mandatory.
        self.errors.append((self.tokenizer.stream.position(), errorcode, datavars))
        if self.strict:
            raise ParseError

    def normalizeToken(self, token):
        """ HTML5 specific normalizations to the token stream """

        if token["type"] == tokenTypes["StartTag"]:
            token["data"] = dict(token["data"][::-1])

        return token

    def adjustMathMLAttributes(self, token):
        replacements = {"definitionurl": "definitionURL"}
        for k, v in replacements.items():
            if k in token["data"]:
                token["data"][v] = token["data"][k]
                del token["data"][k]

    def adjustSVGAttributes(self, token):
        replacements = {
            "attributename": "attributeName",
            "attributetype": "attributeType",
            "basefrequency": "baseFrequency",
            "baseprofile": "baseProfile",
            "calcmode": "calcMode",
            "clippathunits": "clipPathUnits",
            "contentscripttype": "contentScriptType",
            "contentstyletype": "contentStyleType",
            "diffuseconstant": "diffuseConstant",
            "edgemode": "edgeMode",
            "externalresourcesrequired": "externalResourcesRequired",
            "filterres": "filterRes",
            "filterunits": "filterUnits",
            "glyphref": "glyphRef",
            "gradienttransform": "gradientTransform",
            "gradientunits": "gradientUnits",
            "kernelmatrix": "kernelMatrix",
            "kernelunitlength": "kernelUnitLength",
            "keypoints": "keyPoints",
            "keysplines": "keySplines",
            "keytimes": "keyTimes",
            "lengthadjust": "lengthAdjust",
            "limitingconeangle": "limitingConeAngle",
            "markerheight": "markerHeight",
            "markerunits": "markerUnits",
            "markerwidth": "markerWidth",
            "maskcontentunits": "maskContentUnits",
            "maskunits": "maskUnits",
            "numoctaves": "numOctaves",
            "pathlength": "pathLength",
            "patterncontentunits": "patternContentUnits",
            "patterntransform": "patternTransform",
            "patternunits": "patternUnits",
            "pointsatx": "pointsAtX",
            "pointsaty": "pointsAtY",
            "pointsatz": "pointsAtZ",
            "preservealpha": "preserveAlpha",
            "preserveaspectratio": "preserveAspectRatio",
            "primitiveunits": "primitiveUnits",
            "refx": "refX",
            "refy": "refY",
            "repeatcount": "repeatCount",
            "repeatdur": "repeatDur",
            "requiredextensions": "requiredExtensions",
            "requiredfeatures": "requiredFeatures",
            "specularconstant": "specularConstant",
            "specularexponent": "specularExponent",
            "spreadmethod": "spreadMethod",
            "startoffset": "startOffset",
            "stddeviation": "stdDeviation",
            "stitchtiles": "stitchTiles",
            "surfacescale": "surfaceScale",
            "systemlanguage": "systemLanguage",
            "tablevalues": "tableValues",
            "targetx": "targetX",
            "targety": "targetY",
            "textlength": "textLength",
            "viewbox": "viewBox",
            "viewtarget": "viewTarget",
            "xchannelselector": "xChannelSelector",
            "ychannelselector": "yChannelSelector",
            "zoomandpan": "zoomAndPan"
        }
        for originalName in list(token["data"].keys()):
            if originalName in replacements:
                svgName = replacements[originalName]
                token["data"][svgName] = token["data"][originalName]
                del token["data"][originalName]

    def adjustForeignAttributes(self, token):
        replacements = adjustForeignAttributesMap

        for originalName in token["data"].keys():
            if originalName in replacements:
                foreignName = replacements[originalName]
                token["data"][foreignName] = token["data"][originalName]
                del token["data"][originalName]

    def reparseTokenNormal(self, token):
        self.parser.phase()

    def resetInsertionMode(self):
        # The name of this method is mostly historical. (It's also used in the
        # specification.)
        last = False
        newModes = {
            "select": "inSelect",
            "td": "inCell",
            "th": "inCell",
            "tr": "inRow",
            "tbody": "inTableBody",
            "thead": "inTableBody",
            "tfoot": "inTableBody",
            "caption": "inCaption",
            "colgroup": "inColumnGroup",
            "table": "inTable",
            "head": "inBody",
            "body": "inBody",
            "frameset": "inFrameset",
            "html": "beforeHead"
        }
        for node in self.tree.openElements[::-1]:
            nodeName = node.name
            new_phase = None
            if node == self.tree.openElements[0]:
                assert self.innerHTML
                last = True
                nodeName = self.innerHTML
            # Check for conditions that should only happen in the innerHTML
            # case
            if nodeName in ("select", "colgroup", "head", "html"):
                assert self.innerHTML

            if not last and node.namespace != self.tree.defaultNamespace:
                continue

            if nodeName in newModes:
                new_phase = self.phases[newModes[nodeName]]
                break
            elif last:
                new_phase = self.phases["inBody"]
                break

        self.phase = new_phase

    def parseRCDataRawtext(self, token, contentType):
        """Generic RCDATA/RAWTEXT Parsing algorithm
        contentType - RCDATA or RAWTEXT
        """
        assert contentType in ("RAWTEXT", "RCDATA")

        self.tree.insertElement(token)

        if contentType == "RAWTEXT":
            self.tokenizer.state = self.tokenizer.rawtextState
        else:
            self.tokenizer.state = self.tokenizer.rcdataState

        self.originalPhase = self.phase

        self.phase = self.phases["text"]


def getPhases(debug):
    def log(function):
        """Logger that records which phase processes each token"""
        type_names = dict((value, key) for key, value in
                          constants.tokenTypes.items())

        def wrapped(self, *args, **kwargs):
            if function.__name__.startswith("process") and len(args) > 0:
                token = args[0]
                try:
                    info = {"type": type_names[token['type']]}
                except:
                    raise
                if token['type'] in constants.tagTokenTypes:
                    info["name"] = token['name']

                self.parser.log.append((self.parser.tokenizer.state.__name__,
                                        self.parser.phase.__class__.__name__,
                                        self.__class__.__name__,
                                        function.__name__,
                                        info))
                return function(self, *args, **kwargs)
            else:
                return function(self, *args, **kwargs)
        return wrapped

    def getMetaclass(use_metaclass, metaclass_func):
        if use_metaclass:
            return method_decorator_metaclass(metaclass_func)
        else:
            return type

    class Phase(with_metaclass(getMetaclass(debug, log))):
        """Base class for helper object that implements each phase of processing
        """

        def __init__(self, parser, tree):
            self.parser = parser
            self.tree = tree

        def processEOF(self):
            raise NotImplementedError

        def processComment(self, token):
            # For most phases the following is correct. Where it's not it will be
            # overridden.
            self.tree.insertComment(token, self.tree.openElements[-1])

        def processDoctype(self, token):
            self.parser.parseError("unexpected-doctype")

        def processCharacters(self, token):
            self.tree.insertText(token["data"])

        def processSpaceCharacters(self, token):
            self.tree.insertText(token["data"])

        def processStartTag(self, token):
            return self.startTagHandler[token["name"]](token)

        def startTagHtml(self, token):
            if not self.parser.firstStartTag and token["name"] == "html":
                self.parser.parseError("non-html-root")
            # XXX Need a check here to see if the first start tag token emitted is
            # this token... If it's not, invoke self.parser.parseError().
            for attr, value in token["data"].items():
                if attr not in self.tree.openElements[0].attributes:
                    self.tree.openElements[0].attributes[attr] = value
            self.parser.firstStartTag = False

        def processEndTag(self, token):
            return self.endTagHandler[token["name"]](token)

    class InitialPhase(Phase):
        def processSpaceCharacters(self, token):
            pass

        def processComment(self, token):
            self.tree.insertComment(token, self.tree.document)

        def processDoctype(self, token):
            name = token["name"]
            publicId = token["publicId"]
            systemId = token["systemId"]
            correct = token["correct"]

            if (name != "html" or publicId is not None or
                    systemId is not None and systemId != "about:legacy-compat"):
                self.parser.parseError("unknown-doctype")

            if publicId is None:
                publicId = ""

            self.tree.insertDoctype(token)

            if publicId != "":
                publicId = publicId.translate(asciiUpper2Lower)

            if (not correct or token["name"] != "html"
                or publicId.startswith(
                    ("+//silmaril//dtd html pro v0r11 19970101//",
                     "-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
                     "-//as//dtd html 3.0 aswedit + extensions//",
                     "-//ietf//dtd html 2.0 level 1//",
                     "-//ietf//dtd html 2.0 level 2//",
                     "-//ietf//dtd html 2.0 strict level 1//",
                     "-//ietf//dtd html 2.0 strict level 2//",
                     "-//ietf//dtd html 2.0 strict//",
                     "-//ietf//dtd html 2.0//",
                     "-//ietf//dtd html 2.1e//",
                     "-//ietf//dtd html 3.0//",
                     "-//ietf//dtd html 3.2 final//",
                     "-//ietf//dtd html 3.2//",
                     "-//ietf//dtd html 3//",
                     "-//ietf//dtd html level 0//",
                     "-//ietf//dtd html level 1//",
                     "-//ietf//dtd html level 2//",
                     "-//ietf//dtd html level 3//",
                     "-//ietf//dtd html strict level 0//",
                     "-//ietf//dtd html strict level 1//",
                     "-//ietf//dtd html strict level 2//",
                     "-//ietf//dtd html strict level 3//",
                     "-//ietf//dtd html strict//",
                     "-//ietf//dtd html//",
                     "-//metrius//dtd metrius presentational//",
                     "-//microsoft//dtd internet explorer 2.0 html strict//",
                     "-//microsoft//dtd internet explorer 2.0 html//",
                     "-//microsoft//dtd internet explorer 2.0 tables//",
                     "-//microsoft//dtd internet explorer 3.0 html strict//",
                     "-//microsoft//dtd internet explorer 3.0 html//",
                     "-//microsoft//dtd internet explorer 3.0 tables//",
                     "-//netscape comm. corp.//dtd html//",
                     "-//netscape comm. corp.//dtd strict html//",
                     "-//o'reilly and associates//dtd html 2.0//",
                     "-//o'reilly and associates//dtd html extended 1.0//",
                     "-//o'reilly and associates//dtd html extended relaxed 1.0//",
                     "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//",
                     "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//",
                     "-//spyglass//dtd html 2.0 extended//",
                     "-//sq//dtd html 2.0 hotmetal + extensions//",
                     "-//sun microsystems corp.//dtd hotjava html//",
                     "-//sun microsystems corp.//dtd hotjava strict html//",
                     "-//w3c//dtd html 3 1995-03-24//",
                     "-//w3c//dtd html 3.2 draft//",
                     "-//w3c//dtd html 3.2 final//",
                     "-//w3c//dtd html 3.2//",
                     "-//w3c//dtd html 3.2s draft//",
                     "-//w3c//dtd html 4.0 frameset//",
                     "-//w3c//dtd html 4.0 transitional//",
                     "-//w3c//dtd html experimental 19960712//",
                     "-//w3c//dtd html experimental 970421//",
                     "-//w3c//dtd w3 html//",
                     "-//w3o//dtd w3 html 3.0//",
                     "-//webtechs//dtd mozilla html 2.0//",
                     "-//webtechs//dtd mozilla html//"))
                or publicId in
                    ("-//w3o//dtd w3 html strict 3.0//en//",
                     "-/w3c/dtd html 4.0 transitional/en",
                     "html")
                or publicId.startswith(
                    ("-//w3c//dtd html 4.01 frameset//",
                     "-//w3c//dtd html 4.01 transitional//")) and
                    systemId is None
                    or systemId and systemId.lower() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"):
                self.parser.compatMode = "quirks"
            elif (publicId.startswith(
                    ("-//w3c//dtd xhtml 1.0 frameset//",
                     "-//w3c//dtd xhtml 1.0 transitional//"))
                  or publicId.startswith(
                      ("-//w3c//dtd html 4.01 frameset//",
                       "-//w3c//dtd html 4.01 transitional//")) and
                  systemId is not None):
                self.parser.compatMode = "limited quirks"

            self.parser.phase = self.parser.phases["beforeHtml"]

        def anythingElse(self):
            self.parser.compatMode = "quirks"
            self.parser.phase = self.parser.phases["beforeHtml"]

        def processCharacters(self, token):
            self.parser.parseError("expected-doctype-but-got-chars")
            self.anythingElse()
            return token

        def processStartTag(self, token):
            self.parser.parseError("expected-doctype-but-got-start-tag",
                                   {"name": token["name"]})
            self.anythingElse()
            return token

        def processEndTag(self, token):
            self.parser.parseError("expected-doctype-but-got-end-tag",
                                   {"name": token["name"]})
            self.anythingElse()
            return token

        def processEOF(self):
            self.parser.parseError("expected-doctype-but-got-eof")
            self.anythingElse()
            return True

    class BeforeHtmlPhase(Phase):
        # helper methods
        def insertHtmlElement(self):
            self.tree.insertRoot(impliedTagToken("html", "StartTag"))
            self.parser.phase = self.parser.phases["beforeHead"]

        # other
        def processEOF(self):
            self.insertHtmlElement()
            return True

        def processComment(self, token):
            self.tree.insertComment(token, self.tree.document)

        def processSpaceCharacters(self, token):
            pass

        def processCharacters(self, token):
            self.insertHtmlElement()
            return token

        def processStartTag(self, token):
            if token["name"] == "html":
                self.parser.firstStartTag = True
            self.insertHtmlElement()
            return token

        def processEndTag(self, token):
            if token["name"] not in ("head", "body", "html", "br"):
                self.parser.parseError("unexpected-end-tag-before-html",
                                       {"name": token["name"]})
            else:
                self.insertHtmlElement()
                return token

    class BeforeHeadPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("head", self.startTagHead)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                (("head", "body", "html", "br"), self.endTagImplyHead)
            ])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            self.startTagHead(impliedTagToken("head", "StartTag"))
            return True

        def processSpaceCharacters(self, token):
            pass

        def processCharacters(self, token):
            self.startTagHead(impliedTagToken("head", "StartTag"))
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagHead(self, token):
            self.tree.insertElement(token)
            self.tree.headPointer = self.tree.openElements[-1]
            self.parser.phase = self.parser.phases["inHead"]

        def startTagOther(self, token):
            self.startTagHead(impliedTagToken("head", "StartTag"))
            return token

        def endTagImplyHead(self, token):
            self.startTagHead(impliedTagToken("head", "StartTag"))
            return token

        def endTagOther(self, token):
            self.parser.parseError("end-tag-after-implied-root",
                                   {"name": token["name"]})

    class InHeadPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("title", self.startTagTitle),
                (("noscript", "noframes", "style"), self.startTagNoScriptNoFramesStyle),
                ("script", self.startTagScript),
                (("base", "basefont", "bgsound", "command", "link"),
                 self.startTagBaseLinkCommand),
                ("meta", self.startTagMeta),
                ("head", self.startTagHead)
            ])
            self.startTagHandler.default = self.startTagOther

            self. endTagHandler = utils.MethodDispatcher([
                ("head", self.endTagHead),
                (("br", "html", "body"), self.endTagHtmlBodyBr)
            ])
            self.endTagHandler.default = self.endTagOther

        # the real thing
        def processEOF(self):
            self.anythingElse()
            return True

        def processCharacters(self, token):
            self.anythingElse()
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagHead(self, token):
            self.parser.parseError("two-heads-are-not-better-than-one")

        def startTagBaseLinkCommand(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True

        def startTagMeta(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True

            attributes = token["data"]
            if self.parser.tokenizer.stream.charEncoding[1] == "tentative":
                if "charset" in attributes:
                    self.parser.tokenizer.stream.changeEncoding(attributes["charset"])
                elif ("content" in attributes and
                      "http-equiv" in attributes and
                      attributes["http-equiv"].lower() == "content-type"):
                    # Encoding it as UTF-8 here is a hack, as really we should pass
                    # the abstract Unicode string, and just use the
                    # ContentAttrParser on that, but using UTF-8 allows all chars
                    # to be encoded and as a ASCII-superset works.
                    data = inputstream.EncodingBytes(attributes["content"].encode("utf-8"))
                    parser = inputstream.ContentAttrParser(data)
                    codec = parser.parse()
                    self.parser.tokenizer.stream.changeEncoding(codec)

        def startTagTitle(self, token):
            self.parser.parseRCDataRawtext(token, "RCDATA")

        def startTagNoScriptNoFramesStyle(self, token):
            # Need to decide whether to implement the scripting-disabled case
            self.parser.parseRCDataRawtext(token, "RAWTEXT")

        def startTagScript(self, token):
            self.tree.insertElement(token)
            self.parser.tokenizer.state = self.parser.tokenizer.scriptDataState
            self.parser.originalPhase = self.parser.phase
            self.parser.phase = self.parser.phases["text"]

        def startTagOther(self, token):
            self.anythingElse()
            return token

        def endTagHead(self, token):
            node = self.parser.tree.openElements.pop()
            assert node.name == "head", "Expected head got %s" % node.name
            self.parser.phase = self.parser.phases["afterHead"]

        def endTagHtmlBodyBr(self, token):
            self.anythingElse()
            return token

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def anythingElse(self):
            self.endTagHead(impliedTagToken("head"))

    # XXX If we implement a parser for which scripting is disabled we need to
    # implement this phase.
    #
    # class InHeadNoScriptPhase(Phase):
    class AfterHeadPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("body", self.startTagBody),
                ("frameset", self.startTagFrameset),
                (("base", "basefont", "bgsound", "link", "meta", "noframes", "script",
                  "style", "title"),
                 self.startTagFromHead),
                ("head", self.startTagHead)
            ])
            self.startTagHandler.default = self.startTagOther
            self.endTagHandler = utils.MethodDispatcher([(("body", "html", "br"),
                                                          self.endTagHtmlBodyBr)])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            self.anythingElse()
            return True

        def processCharacters(self, token):
            self.anythingElse()
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagBody(self, token):
            self.parser.framesetOK = False
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inBody"]

        def startTagFrameset(self, token):
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inFrameset"]

        def startTagFromHead(self, token):
            self.parser.parseError("unexpected-start-tag-out-of-my-head",
                                   {"name": token["name"]})
            self.tree.openElements.append(self.tree.headPointer)
            self.parser.phases["inHead"].processStartTag(token)
            for node in self.tree.openElements[::-1]:
                if node.name == "head":
                    self.tree.openElements.remove(node)
                    break

        def startTagHead(self, token):
            self.parser.parseError("unexpected-start-tag", {"name": token["name"]})

        def startTagOther(self, token):
            self.anythingElse()
            return token

        def endTagHtmlBodyBr(self, token):
            self.anythingElse()
            return token

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def anythingElse(self):
            self.tree.insertElement(impliedTagToken("body", "StartTag"))
            self.parser.phase = self.parser.phases["inBody"]
            self.parser.framesetOK = True

    class InBodyPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#parsing-main-inbody
        # the really-really-really-very crazy mode
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            # Keep a ref to this for special handling of whitespace in <pre>
            self.processSpaceCharactersNonPre = self.processSpaceCharacters

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                (("base", "basefont", "bgsound", "command", "link", "meta",
                  "noframes", "script", "style", "title"),
                 self.startTagProcessInHead),
                ("body", self.startTagBody),
                ("frameset", self.startTagFrameset),
                (("address", "article", "aside", "blockquote", "center", "details",
                  "details", "dir", "div", "dl", "fieldset", "figcaption", "figure",
                  "footer", "header", "hgroup", "main", "menu", "nav", "ol", "p",
                  "section", "summary", "ul"),
                 self.startTagCloseP),
                (headingElements, self.startTagHeading),
                (("pre", "listing"), self.startTagPreListing),
                ("form", self.startTagForm),
                (("li", "dd", "dt"), self.startTagListItem),
                ("plaintext", self.startTagPlaintext),
                ("a", self.startTagA),
                (("b", "big", "code", "em", "font", "i", "s", "small", "strike",
                  "strong", "tt", "u"), self.startTagFormatting),
                ("nobr", self.startTagNobr),
                ("button", self.startTagButton),
                (("applet", "marquee", "object"), self.startTagAppletMarqueeObject),
                ("xmp", self.startTagXmp),
                ("table", self.startTagTable),
                (("area", "br", "embed", "img", "keygen", "wbr"),
                 self.startTagVoidFormatting),
                (("param", "source", "track"), self.startTagParamSource),
                ("input", self.startTagInput),
                ("hr", self.startTagHr),
                ("image", self.startTagImage),
                ("isindex", self.startTagIsIndex),
                ("textarea", self.startTagTextarea),
                ("iframe", self.startTagIFrame),
                (("noembed", "noframes", "noscript"), self.startTagRawtext),
                ("select", self.startTagSelect),
                (("rp", "rt"), self.startTagRpRt),
                (("option", "optgroup"), self.startTagOpt),
                (("math"), self.startTagMath),
                (("svg"), self.startTagSvg),
                (("caption", "col", "colgroup", "frame", "head",
                  "tbody", "td", "tfoot", "th", "thead",
                  "tr"), self.startTagMisplaced)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("body", self.endTagBody),
                ("html", self.endTagHtml),
                (("address", "article", "aside", "blockquote", "button", "center",
                  "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure",
                  "footer", "header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre",
                  "section", "summary", "ul"), self.endTagBlock),
                ("form", self.endTagForm),
                ("p", self.endTagP),
                (("dd", "dt", "li"), self.endTagListItem),
                (headingElements, self.endTagHeading),
                (("a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small",
                  "strike", "strong", "tt", "u"), self.endTagFormatting),
                (("applet", "marquee", "object"), self.endTagAppletMarqueeObject),
                ("br", self.endTagBr),
            ])
            self.endTagHandler.default = self.endTagOther

        def isMatchingFormattingElement(self, node1, node2):
            if node1.name != node2.name or node1.namespace != node2.namespace:
                return False
            elif len(node1.attributes) != len(node2.attributes):
                return False
            else:
                attributes1 = sorted(node1.attributes.items())
                attributes2 = sorted(node2.attributes.items())
                for attr1, attr2 in zip(attributes1, attributes2):
                    if attr1 != attr2:
                        return False
            return True

        # helper
        def addFormattingElement(self, token):
            self.tree.insertElement(token)
            element = self.tree.openElements[-1]

            matchingElements = []
            for node in self.tree.activeFormattingElements[::-1]:
                if node is Marker:
                    break
                elif self.isMatchingFormattingElement(node, element):
                    matchingElements.append(node)

            assert len(matchingElements) <= 3
            if len(matchingElements) == 3:
                self.tree.activeFormattingElements.remove(matchingElements[-1])
            self.tree.activeFormattingElements.append(element)

        # the real deal
        def processEOF(self):
            allowed_elements = frozenset(("dd", "dt", "li", "p", "tbody", "td",
                                          "tfoot", "th", "thead", "tr", "body",
                                          "html"))
            for node in self.tree.openElements[::-1]:
                if node.name not in allowed_elements:
                    self.parser.parseError("expected-closing-tag-but-got-eof")
                    break
            # Stop parsing

        def processSpaceCharactersDropNewline(self, token):
            # Sometimes (start of <pre>, <listing>, and <textarea> blocks) we
            # want to drop leading newlines
            data = token["data"]
            self.processSpaceCharacters = self.processSpaceCharactersNonPre
            if (data.startswith("\n") and
                self.tree.openElements[-1].name in ("pre", "listing", "textarea")
                    and not self.tree.openElements[-1].hasContent()):
                data = data[1:]
            if data:
                self.tree.reconstructActiveFormattingElements()
                self.tree.insertText(data)

        def processCharacters(self, token):
            if token["data"] == "\u0000":
                # The tokenizer should always emit null on its own
                return
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertText(token["data"])
            # This must be bad for performance
            if (self.parser.framesetOK and
                any([char not in spaceCharacters
                     for char in token["data"]])):
                self.parser.framesetOK = False

        def processSpaceCharacters(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertText(token["data"])

        def startTagProcessInHead(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagBody(self, token):
            self.parser.parseError("unexpected-start-tag", {"name": "body"})
            if (len(self.tree.openElements) == 1
                    or self.tree.openElements[1].name != "body"):
                assert self.parser.innerHTML
            else:
                self.parser.framesetOK = False
                for attr, value in token["data"].items():
                    if attr not in self.tree.openElements[1].attributes:
                        self.tree.openElements[1].attributes[attr] = value

        def startTagFrameset(self, token):
            self.parser.parseError("unexpected-start-tag", {"name": "frameset"})
            if (len(self.tree.openElements) == 1 or self.tree.openElements[1].name != "body"):
                assert self.parser.innerHTML
            elif not self.parser.framesetOK:
                pass
            else:
                if self.tree.openElements[1].parent:
                    self.tree.openElements[1].parent.removeChild(self.tree.openElements[1])
                while self.tree.openElements[-1].name != "html":
                    self.tree.openElements.pop()
                self.tree.insertElement(token)
                self.parser.phase = self.parser.phases["inFrameset"]

        def startTagCloseP(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.insertElement(token)

        def startTagPreListing(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.insertElement(token)
            self.parser.framesetOK = False
            self.processSpaceCharacters = self.processSpaceCharactersDropNewline

        def startTagForm(self, token):
            if self.tree.formPointer:
                self.parser.parseError("unexpected-start-tag", {"name": "form"})
            else:
                if self.tree.elementInScope("p", variant="button"):
                    self.endTagP(impliedTagToken("p"))
                self.tree.insertElement(token)
                self.tree.formPointer = self.tree.openElements[-1]

        def startTagListItem(self, token):
            self.parser.framesetOK = False

            stopNamesMap = {"li": ["li"],
                            "dt": ["dt", "dd"],
                            "dd": ["dt", "dd"]}
            stopNames = stopNamesMap[token["name"]]
            for node in reversed(self.tree.openElements):
                if node.name in stopNames:
                    self.parser.phase.processEndTag(
                        impliedTagToken(node.name, "EndTag"))
                    break
                if (node.nameTuple in specialElements and
                        node.name not in ("address", "div", "p")):
                    break

            if self.tree.elementInScope("p", variant="button"):
                self.parser.phase.processEndTag(
                    impliedTagToken("p", "EndTag"))

            self.tree.insertElement(token)

        def startTagPlaintext(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.insertElement(token)
            self.parser.tokenizer.state = self.parser.tokenizer.plaintextState

        def startTagHeading(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            if self.tree.openElements[-1].name in headingElements:
                self.parser.parseError("unexpected-start-tag", {"name": token["name"]})
                self.tree.openElements.pop()
            self.tree.insertElement(token)

        def startTagA(self, token):
            afeAElement = self.tree.elementInActiveFormattingElements("a")
            if afeAElement:
                self.parser.parseError("unexpected-start-tag-implies-end-tag",
                                       {"startName": "a", "endName": "a"})
                self.endTagFormatting(impliedTagToken("a"))
                if afeAElement in self.tree.openElements:
                    self.tree.openElements.remove(afeAElement)
                if afeAElement in self.tree.activeFormattingElements:
                    self.tree.activeFormattingElements.remove(afeAElement)
            self.tree.reconstructActiveFormattingElements()
            self.addFormattingElement(token)

        def startTagFormatting(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.addFormattingElement(token)

        def startTagNobr(self, token):
            self.tree.reconstructActiveFormattingElements()
            if self.tree.elementInScope("nobr"):
                self.parser.parseError("unexpected-start-tag-implies-end-tag",
                                       {"startName": "nobr", "endName": "nobr"})
                self.processEndTag(impliedTagToken("nobr"))
                # XXX Need tests that trigger the following
                self.tree.reconstructActiveFormattingElements()
            self.addFormattingElement(token)

        def startTagButton(self, token):
            if self.tree.elementInScope("button"):
                self.parser.parseError("unexpected-start-tag-implies-end-tag",
                                       {"startName": "button", "endName": "button"})
                self.processEndTag(impliedTagToken("button"))
                return token
            else:
                self.tree.reconstructActiveFormattingElements()
                self.tree.insertElement(token)
                self.parser.framesetOK = False

        def startTagAppletMarqueeObject(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(token)
            self.tree.activeFormattingElements.append(Marker)
            self.parser.framesetOK = False

        def startTagXmp(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.reconstructActiveFormattingElements()
            self.parser.framesetOK = False
            self.parser.parseRCDataRawtext(token, "RAWTEXT")

        def startTagTable(self, token):
            if self.parser.compatMode != "quirks":
                if self.tree.elementInScope("p", variant="button"):
                    self.processEndTag(impliedTagToken("p"))
            self.tree.insertElement(token)
            self.parser.framesetOK = False
            self.parser.phase = self.parser.phases["inTable"]

        def startTagVoidFormatting(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True
            self.parser.framesetOK = False

        def startTagInput(self, token):
            framesetOK = self.parser.framesetOK
            self.startTagVoidFormatting(token)
            if ("type" in token["data"] and
                    token["data"]["type"].translate(asciiUpper2Lower) == "hidden"):
                # input type=hidden doesn't change framesetOK
                self.parser.framesetOK = framesetOK

        def startTagParamSource(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True

        def startTagHr(self, token):
            if self.tree.elementInScope("p", variant="button"):
                self.endTagP(impliedTagToken("p"))
            self.tree.insertElement(token)
            self.tree.openElements.pop()
            token["selfClosingAcknowledged"] = True
            self.parser.framesetOK = False

        def startTagImage(self, token):
            # No really...
            self.parser.parseError("unexpected-start-tag-treated-as",
                                   {"originalName": "image", "newName": "img"})
            self.processStartTag(impliedTagToken("img", "StartTag",
                                                 attributes=token["data"],
                                                 selfClosing=token["selfClosing"]))

        def startTagIsIndex(self, token):
            self.parser.parseError("deprecated-tag", {"name": "isindex"})
            if self.tree.formPointer:
                return
            form_attrs = {}
            if "action" in token["data"]:
                form_attrs["action"] = token["data"]["action"]
            self.processStartTag(impliedTagToken("form", "StartTag",
                                                 attributes=form_attrs))
            self.processStartTag(impliedTagToken("hr", "StartTag"))
            self.processStartTag(impliedTagToken("label", "StartTag"))
            # XXX Localization ...
            if "prompt" in token["data"]:
                prompt = token["data"]["prompt"]
            else:
                prompt = "This is a searchable index. Enter search keywords: "
            self.processCharacters(
                {"type": tokenTypes["Characters"], "data": prompt})
            attributes = token["data"].copy()
            if "action" in attributes:
                del attributes["action"]
            if "prompt" in attributes:
                del attributes["prompt"]
            attributes["name"] = "isindex"
            self.processStartTag(impliedTagToken("input", "StartTag",
                                                 attributes=attributes,
                                                 selfClosing=
                                                 token["selfClosing"]))
            self.processEndTag(impliedTagToken("label"))
            self.processStartTag(impliedTagToken("hr", "StartTag"))
            self.processEndTag(impliedTagToken("form"))

        def startTagTextarea(self, token):
            self.tree.insertElement(token)
            self.parser.tokenizer.state = self.parser.tokenizer.rcdataState
            self.processSpaceCharacters = self.processSpaceCharactersDropNewline
            self.parser.framesetOK = False

        def startTagIFrame(self, token):
            self.parser.framesetOK = False
            self.startTagRawtext(token)

        def startTagRawtext(self, token):
            """iframe, noembed noframes, noscript(if scripting enabled)"""
            self.parser.parseRCDataRawtext(token, "RAWTEXT")

        def startTagOpt(self, token):
            if self.tree.openElements[-1].name == "option":
                self.parser.phase.processEndTag(impliedTagToken("option"))
            self.tree.reconstructActiveFormattingElements()
            self.parser.tree.insertElement(token)

        def startTagSelect(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(token)
            self.parser.framesetOK = False
            if self.parser.phase in (self.parser.phases["inTable"],
                                     self.parser.phases["inCaption"],
                                     self.parser.phases["inColumnGroup"],
                                     self.parser.phases["inTableBody"],
                                     self.parser.phases["inRow"],
                                     self.parser.phases["inCell"]):
                self.parser.phase = self.parser.phases["inSelectInTable"]
            else:
                self.parser.phase = self.parser.phases["inSelect"]

        def startTagRpRt(self, token):
            if self.tree.elementInScope("ruby"):
                self.tree.generateImpliedEndTags()
                if self.tree.openElements[-1].name != "ruby":
                    self.parser.parseError()
            self.tree.insertElement(token)

        def startTagMath(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.parser.adjustMathMLAttributes(token)
            self.parser.adjustForeignAttributes(token)
            token["namespace"] = namespaces["mathml"]
            self.tree.insertElement(token)
            # Need to get the parse error right for the case where the token
            # has a namespace not equal to the xmlns attribute
            if token["selfClosing"]:
                self.tree.openElements.pop()
                token["selfClosingAcknowledged"] = True

        def startTagSvg(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.parser.adjustSVGAttributes(token)
            self.parser.adjustForeignAttributes(token)
            token["namespace"] = namespaces["svg"]
            self.tree.insertElement(token)
            # Need to get the parse error right for the case where the token
            # has a namespace not equal to the xmlns attribute
            if token["selfClosing"]:
                self.tree.openElements.pop()
                token["selfClosingAcknowledged"] = True

        def startTagMisplaced(self, token):
            """ Elements that should be children of other elements that have a
            different insertion mode; here they are ignored
            "caption", "col", "colgroup", "frame", "frameset", "head",
            "option", "optgroup", "tbody", "td", "tfoot", "th", "thead",
            "tr", "noscript"
            """
            self.parser.parseError("unexpected-start-tag-ignored", {"name": token["name"]})

        def startTagOther(self, token):
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(token)

        def endTagP(self, token):
            if not self.tree.elementInScope("p", variant="button"):
                self.startTagCloseP(impliedTagToken("p", "StartTag"))
                self.parser.parseError("unexpected-end-tag", {"name": "p"})
                self.endTagP(impliedTagToken("p", "EndTag"))
            else:
                self.tree.generateImpliedEndTags("p")
                if self.tree.openElements[-1].name != "p":
                    self.parser.parseError("unexpected-end-tag", {"name": "p"})
                node = self.tree.openElements.pop()
                while node.name != "p":
                    node = self.tree.openElements.pop()

        def endTagBody(self, token):
            if not self.tree.elementInScope("body"):
                self.parser.parseError()
                return
            elif self.tree.openElements[-1].name != "body":
                for node in self.tree.openElements[2:]:
                    if node.name not in frozenset(("dd", "dt", "li", "optgroup",
                                                   "option", "p", "rp", "rt",
                                                   "tbody", "td", "tfoot",
                                                   "th", "thead", "tr", "body",
                                                   "html")):
                        # Not sure this is the correct name for the parse error
                        self.parser.parseError(
                            "expected-one-end-tag-but-got-another",
                            {"expectedName": "body", "gotName": node.name})
                        break
            self.parser.phase = self.parser.phases["afterBody"]

        def endTagHtml(self, token):
            # We repeat the test for the body end tag token being ignored here
            if self.tree.elementInScope("body"):
                self.endTagBody(impliedTagToken("body"))
                return token

        def endTagBlock(self, token):
            # Put us back in the right whitespace handling mode
            if token["name"] == "pre":
                self.processSpaceCharacters = self.processSpaceCharactersNonPre
            inScope = self.tree.elementInScope(token["name"])
            if inScope:
                self.tree.generateImpliedEndTags()
            if self.tree.openElements[-1].name != token["name"]:
                self.parser.parseError("end-tag-too-early", {"name": token["name"]})
            if inScope:
                node = self.tree.openElements.pop()
                while node.name != token["name"]:
                    node = self.tree.openElements.pop()

        def endTagForm(self, token):
            node = self.tree.formPointer
            self.tree.formPointer = None
            if node is None or not self.tree.elementInScope(node):
                self.parser.parseError("unexpected-end-tag",
                                       {"name": "form"})
            else:
                self.tree.generateImpliedEndTags()
                if self.tree.openElements[-1] != node:
                    self.parser.parseError("end-tag-too-early-ignored",
                                           {"name": "form"})
                self.tree.openElements.remove(node)

        def endTagListItem(self, token):
            if token["name"] == "li":
                variant = "list"
            else:
                variant = None
            if not self.tree.elementInScope(token["name"], variant=variant):
                self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
            else:
                self.tree.generateImpliedEndTags(exclude=token["name"])
                if self.tree.openElements[-1].name != token["name"]:
                    self.parser.parseError(
                        "end-tag-too-early",
                        {"name": token["name"]})
                node = self.tree.openElements.pop()
                while node.name != token["name"]:
                    node = self.tree.openElements.pop()

        def endTagHeading(self, token):
            for item in headingElements:
                if self.tree.elementInScope(item):
                    self.tree.generateImpliedEndTags()
                    break
            if self.tree.openElements[-1].name != token["name"]:
                self.parser.parseError("end-tag-too-early", {"name": token["name"]})

            for item in headingElements:
                if self.tree.elementInScope(item):
                    item = self.tree.openElements.pop()
                    while item.name not in headingElements:
                        item = self.tree.openElements.pop()
                    break

        def endTagFormatting(self, token):
            """The much-feared adoption agency algorithm"""
            # http://svn.whatwg.org/webapps/complete.html#adoptionAgency revision 7867
            # XXX Better parseError messages appreciated.

            # Step 1
            outerLoopCounter = 0

            # Step 2
            while outerLoopCounter < 8:

                # Step 3
                outerLoopCounter += 1

                # Step 4:

                # Let the formatting element be the last element in
                # the list of active formatting elements that:
                # - is between the end of the list and the last scope
                # marker in the list, if any, or the start of the list
                # otherwise, and
                # - has the same tag name as the token.
                formattingElement = self.tree.elementInActiveFormattingElements(
                    token["name"])
                if (not formattingElement or
                    (formattingElement in self.tree.openElements and
                     not self.tree.elementInScope(formattingElement.name))):
                    # If there is no such node, then abort these steps
                    # and instead act as described in the "any other
                    # end tag" entry below.
                    self.endTagOther(token)
                    return

                # Otherwise, if there is such a node, but that node is
                # not in the stack of open elements, then this is a
                # parse error; remove the element from the list, and
                # abort these steps.
                elif formattingElement not in self.tree.openElements:
                    self.parser.parseError("adoption-agency-1.2", {"name": token["name"]})
                    self.tree.activeFormattingElements.remove(formattingElement)
                    return

                # Otherwise, if there is such a node, and that node is
                # also in the stack of open elements, but the element
                # is not in scope, then this is a parse error; ignore
                # the token, and abort these steps.
                elif not self.tree.elementInScope(formattingElement.name):
                    self.parser.parseError("adoption-agency-4.4", {"name": token["name"]})
                    return

                # Otherwise, there is a formatting element and that
                # element is in the stack and is in scope. If the
                # element is not the current node, this is a parse
                # error. In any case, proceed with the algorithm as
                # written in the following steps.
                else:
                    if formattingElement != self.tree.openElements[-1]:
                        self.parser.parseError("adoption-agency-1.3", {"name": token["name"]})

                # Step 5:

                # Let the furthest block be the topmost node in the
                # stack of open elements that is lower in the stack
                # than the formatting element, and is an element in
                # the special category. There might not be one.
                afeIndex = self.tree.openElements.index(formattingElement)
                furthestBlock = None
                for element in self.tree.openElements[afeIndex:]:
                    if element.nameTuple in specialElements:
                        furthestBlock = element
                        break

                # Step 6:

                # If there is no furthest block, then the UA must
                # first pop all the nodes from the bottom of the stack
                # of open elements, from the current node up to and
                # including the formatting element, then remove the
                # formatting element from the list of active
                # formatting elements, and finally abort these steps.
                if furthestBlock is None:
                    element = self.tree.openElements.pop()
                    while element != formattingElement:
                        element = self.tree.openElements.pop()
                    self.tree.activeFormattingElements.remove(element)
                    return

                # Step 7
                commonAncestor = self.tree.openElements[afeIndex - 1]

                # Step 8:
                # The bookmark is supposed to help us identify where to reinsert
                # nodes in step 15. We have to ensure that we reinsert nodes after
                # the node before the active formatting element. Note the bookmark
                # can move in step 9.7
                bookmark = self.tree.activeFormattingElements.index(formattingElement)

                # Step 9
                lastNode = node = furthestBlock
                innerLoopCounter = 0

                index = self.tree.openElements.index(node)
                while innerLoopCounter < 3:
                    innerLoopCounter += 1
                    # Node is element before node in open elements
                    index -= 1
                    node = self.tree.openElements[index]
                    if node not in self.tree.activeFormattingElements:
                        self.tree.openElements.remove(node)
                        continue
                    # Step 9.6
                    if node == formattingElement:
                        break
                    # Step 9.7
                    if lastNode == furthestBlock:
                        bookmark = self.tree.activeFormattingElements.index(node) + 1
                    # Step 9.8
                    clone = node.cloneNode()
                    # Replace node with clone
                    self.tree.activeFormattingElements[
                        self.tree.activeFormattingElements.index(node)] = clone
                    self.tree.openElements[
                        self.tree.openElements.index(node)] = clone
                    node = clone
                    # Step 9.9
                    # Remove lastNode from its parents, if any
                    if lastNode.parent:
                        lastNode.parent.removeChild(lastNode)
                    node.appendChild(lastNode)
                    # Step 9.10
                    lastNode = node

                # Step 10
                # Foster parent lastNode if commonAncestor is a
                # table, tbody, tfoot, thead, or tr we need to foster
                # parent the lastNode
                if lastNode.parent:
                    lastNode.parent.removeChild(lastNode)

                if commonAncestor.name in frozenset(("table", "tbody", "tfoot", "thead", "tr")):
                    parent, insertBefore = self.tree.getTableMisnestedNodePosition()
                    parent.insertBefore(lastNode, insertBefore)
                else:
                    commonAncestor.appendChild(lastNode)

                # Step 11
                clone = formattingElement.cloneNode()

                # Step 12
                furthestBlock.reparentChildren(clone)

                # Step 13
                furthestBlock.appendChild(clone)

                # Step 14
                self.tree.activeFormattingElements.remove(formattingElement)
                self.tree.activeFormattingElements.insert(bookmark, clone)

                # Step 15
                self.tree.openElements.remove(formattingElement)
                self.tree.openElements.insert(
                    self.tree.openElements.index(furthestBlock) + 1, clone)

        def endTagAppletMarqueeObject(self, token):
            if self.tree.elementInScope(token["name"]):
                self.tree.generateImpliedEndTags()
            if self.tree.openElements[-1].name != token["name"]:
                self.parser.parseError("end-tag-too-early", {"name": token["name"]})

            if self.tree.elementInScope(token["name"]):
                element = self.tree.openElements.pop()
                while element.name != token["name"]:
                    element = self.tree.openElements.pop()
                self.tree.clearActiveFormattingElements()

        def endTagBr(self, token):
            self.parser.parseError("unexpected-end-tag-treated-as",
                                   {"originalName": "br", "newName": "br element"})
            self.tree.reconstructActiveFormattingElements()
            self.tree.insertElement(impliedTagToken("br", "StartTag"))
            self.tree.openElements.pop()

        def endTagOther(self, token):
            for node in self.tree.openElements[::-1]:
                if node.name == token["name"]:
                    self.tree.generateImpliedEndTags(exclude=token["name"])
                    if self.tree.openElements[-1].name != token["name"]:
                        self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
                    while self.tree.openElements.pop() != node:
                        pass
                    break
                else:
                    if node.nameTuple in specialElements:
                        self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
                        break

    class TextPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([])
            self.startTagHandler.default = self.startTagOther
            self.endTagHandler = utils.MethodDispatcher([
                ("script", self.endTagScript)])
            self.endTagHandler.default = self.endTagOther

        def processCharacters(self, token):
            self.tree.insertText(token["data"])

        def processEOF(self):
            self.parser.parseError("expected-named-closing-tag-but-got-eof",
                                   {"name": self.tree.openElements[-1].name})
            self.tree.openElements.pop()
            self.parser.phase = self.parser.originalPhase
            return True

        def startTagOther(self, token):
            assert False, "Tried to process start tag %s in RCDATA/RAWTEXT mode" % token['name']

        def endTagScript(self, token):
            node = self.tree.openElements.pop()
            assert node.name == "script"
            self.parser.phase = self.parser.originalPhase
            # The rest of this method is all stuff that only happens if
            # document.write works

        def endTagOther(self, token):
            self.tree.openElements.pop()
            self.parser.phase = self.parser.originalPhase

    class InTablePhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-table
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("caption", self.startTagCaption),
                ("colgroup", self.startTagColgroup),
                ("col", self.startTagCol),
                (("tbody", "tfoot", "thead"), self.startTagRowGroup),
                (("td", "th", "tr"), self.startTagImplyTbody),
                ("table", self.startTagTable),
                (("style", "script"), self.startTagStyleScript),
                ("input", self.startTagInput),
                ("form", self.startTagForm)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("table", self.endTagTable),
                (("body", "caption", "col", "colgroup", "html", "tbody", "td",
                  "tfoot", "th", "thead", "tr"), self.endTagIgnore)
            ])
            self.endTagHandler.default = self.endTagOther

        # helper methods
        def clearStackToTableContext(self):
            # "clear the stack back to a table context"
            while self.tree.openElements[-1].name not in ("table", "html"):
                # self.parser.parseError("unexpected-implied-end-tag-in-table",
                #  {"name":  self.tree.openElements[-1].name})
                self.tree.openElements.pop()
            # When the current node is <html> it's an innerHTML case

        # processing methods
        def processEOF(self):
            if self.tree.openElements[-1].name != "html":
                self.parser.parseError("eof-in-table")
            else:
                assert self.parser.innerHTML
            # Stop parsing

        def processSpaceCharacters(self, token):
            originalPhase = self.parser.phase
            self.parser.phase = self.parser.phases["inTableText"]
            self.parser.phase.originalPhase = originalPhase
            self.parser.phase.processSpaceCharacters(token)

        def processCharacters(self, token):
            originalPhase = self.parser.phase
            self.parser.phase = self.parser.phases["inTableText"]
            self.parser.phase.originalPhase = originalPhase
            self.parser.phase.processCharacters(token)

        def insertText(self, token):
            # If we get here there must be at least one non-whitespace character
            # Do the table magic!
            self.tree.insertFromTable = True
            self.parser.phases["inBody"].processCharacters(token)
            self.tree.insertFromTable = False

        def startTagCaption(self, token):
            self.clearStackToTableContext()
            self.tree.activeFormattingElements.append(Marker)
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inCaption"]

        def startTagColgroup(self, token):
            self.clearStackToTableContext()
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inColumnGroup"]

        def startTagCol(self, token):
            self.startTagColgroup(impliedTagToken("colgroup", "StartTag"))
            return token

        def startTagRowGroup(self, token):
            self.clearStackToTableContext()
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inTableBody"]

        def startTagImplyTbody(self, token):
            self.startTagRowGroup(impliedTagToken("tbody", "StartTag"))
            return token

        def startTagTable(self, token):
            self.parser.parseError("unexpected-start-tag-implies-end-tag",
                                   {"startName": "table", "endName": "table"})
            self.parser.phase.processEndTag(impliedTagToken("table"))
            if not self.parser.innerHTML:
                return token

        def startTagStyleScript(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagInput(self, token):
            if ("type" in token["data"] and
                    token["data"]["type"].translate(asciiUpper2Lower) == "hidden"):
                self.parser.parseError("unexpected-hidden-input-in-table")
                self.tree.insertElement(token)
                # XXX associate with form
                self.tree.openElements.pop()
            else:
                self.startTagOther(token)

        def startTagForm(self, token):
            self.parser.parseError("unexpected-form-in-table")
            if self.tree.formPointer is None:
                self.tree.insertElement(token)
                self.tree.formPointer = self.tree.openElements[-1]
                self.tree.openElements.pop()

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-implies-table-voodoo", {"name": token["name"]})
            # Do the table magic!
            self.tree.insertFromTable = True
            self.parser.phases["inBody"].processStartTag(token)
            self.tree.insertFromTable = False

        def endTagTable(self, token):
            if self.tree.elementInScope("table", variant="table"):
                self.tree.generateImpliedEndTags()
                if self.tree.openElements[-1].name != "table":
                    self.parser.parseError("end-tag-too-early-named",
                                           {"gotName": "table",
                                            "expectedName": self.tree.openElements[-1].name})
                while self.tree.openElements[-1].name != "table":
                    self.tree.openElements.pop()
                self.tree.openElements.pop()
                self.parser.resetInsertionMode()
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-implies-table-voodoo", {"name": token["name"]})
            # Do the table magic!
            self.tree.insertFromTable = True
            self.parser.phases["inBody"].processEndTag(token)
            self.tree.insertFromTable = False

    class InTableTextPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.originalPhase = None
            self.characterTokens = []

        def flushCharacters(self):
            data = "".join([item["data"] for item in self.characterTokens])
            if any([item not in spaceCharacters for item in data]):
                token = {"type": tokenTypes["Characters"], "data": data}
                self.parser.phases["inTable"].insertText(token)
            elif data:
                self.tree.insertText(data)
            self.characterTokens = []

        def processComment(self, token):
            self.flushCharacters()
            self.parser.phase = self.originalPhase
            return token

        def processEOF(self):
            self.flushCharacters()
            self.parser.phase = self.originalPhase
            return True

        def processCharacters(self, token):
            if token["data"] == "\u0000":
                return
            self.characterTokens.append(token)

        def processSpaceCharacters(self, token):
            # pretty sure we should never reach here
            self.characterTokens.append(token)
    #        assert False

        def processStartTag(self, token):
            self.flushCharacters()
            self.parser.phase = self.originalPhase
            return token

        def processEndTag(self, token):
            self.flushCharacters()
            self.parser.phase = self.originalPhase
            return token

    class InCaptionPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-caption
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                (("caption", "col", "colgroup", "tbody", "td", "tfoot", "th",
                  "thead", "tr"), self.startTagTableElement)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("caption", self.endTagCaption),
                ("table", self.endTagTable),
                (("body", "col", "colgroup", "html", "tbody", "td", "tfoot", "th",
                  "thead", "tr"), self.endTagIgnore)
            ])
            self.endTagHandler.default = self.endTagOther

        def ignoreEndTagCaption(self):
            return not self.tree.elementInScope("caption", variant="table")

        def processEOF(self):
            self.parser.phases["inBody"].processEOF()

        def processCharacters(self, token):
            return self.parser.phases["inBody"].processCharacters(token)

        def startTagTableElement(self, token):
            self.parser.parseError()
            # XXX Have to duplicate logic here to find out if the tag is ignored
            ignoreEndTag = self.ignoreEndTagCaption()
            self.parser.phase.processEndTag(impliedTagToken("caption"))
            if not ignoreEndTag:
                return token

        def startTagOther(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def endTagCaption(self, token):
            if not self.ignoreEndTagCaption():
                # AT this code is quite similar to endTagTable in "InTable"
                self.tree.generateImpliedEndTags()
                if self.tree.openElements[-1].name != "caption":
                    self.parser.parseError("expected-one-end-tag-but-got-another",
                                           {"gotName": "caption",
                                            "expectedName": self.tree.openElements[-1].name})
                while self.tree.openElements[-1].name != "caption":
                    self.tree.openElements.pop()
                self.tree.openElements.pop()
                self.tree.clearActiveFormattingElements()
                self.parser.phase = self.parser.phases["inTable"]
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagTable(self, token):
            self.parser.parseError()
            ignoreEndTag = self.ignoreEndTagCaption()
            self.parser.phase.processEndTag(impliedTagToken("caption"))
            if not ignoreEndTag:
                return token

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def endTagOther(self, token):
            return self.parser.phases["inBody"].processEndTag(token)

    class InColumnGroupPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-column

        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("col", self.startTagCol)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("colgroup", self.endTagColgroup),
                ("col", self.endTagCol)
            ])
            self.endTagHandler.default = self.endTagOther

        def ignoreEndTagColgroup(self):
            return self.tree.openElements[-1].name == "html"

        def processEOF(self):
            if self.tree.openElements[-1].name == "html":
                assert self.parser.innerHTML
                return
            else:
                ignoreEndTag = self.ignoreEndTagColgroup()
                self.endTagColgroup(impliedTagToken("colgroup"))
                if not ignoreEndTag:
                    return True

        def processCharacters(self, token):
            ignoreEndTag = self.ignoreEndTagColgroup()
            self.endTagColgroup(impliedTagToken("colgroup"))
            if not ignoreEndTag:
                return token

        def startTagCol(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()

        def startTagOther(self, token):
            ignoreEndTag = self.ignoreEndTagColgroup()
            self.endTagColgroup(impliedTagToken("colgroup"))
            if not ignoreEndTag:
                return token

        def endTagColgroup(self, token):
            if self.ignoreEndTagColgroup():
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()
            else:
                self.tree.openElements.pop()
                self.parser.phase = self.parser.phases["inTable"]

        def endTagCol(self, token):
            self.parser.parseError("no-end-tag", {"name": "col"})

        def endTagOther(self, token):
            ignoreEndTag = self.ignoreEndTagColgroup()
            self.endTagColgroup(impliedTagToken("colgroup"))
            if not ignoreEndTag:
                return token

    class InTableBodyPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-table0
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("tr", self.startTagTr),
                (("td", "th"), self.startTagTableCell),
                (("caption", "col", "colgroup", "tbody", "tfoot", "thead"),
                 self.startTagTableOther)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                (("tbody", "tfoot", "thead"), self.endTagTableRowGroup),
                ("table", self.endTagTable),
                (("body", "caption", "col", "colgroup", "html", "td", "th",
                  "tr"), self.endTagIgnore)
            ])
            self.endTagHandler.default = self.endTagOther

        # helper methods
        def clearStackToTableBodyContext(self):
            while self.tree.openElements[-1].name not in ("tbody", "tfoot",
                                                          "thead", "html"):
                # self.parser.parseError("unexpected-implied-end-tag-in-table",
                #  {"name": self.tree.openElements[-1].name})
                self.tree.openElements.pop()
            if self.tree.openElements[-1].name == "html":
                assert self.parser.innerHTML

        # the rest
        def processEOF(self):
            self.parser.phases["inTable"].processEOF()

        def processSpaceCharacters(self, token):
            return self.parser.phases["inTable"].processSpaceCharacters(token)

        def processCharacters(self, token):
            return self.parser.phases["inTable"].processCharacters(token)

        def startTagTr(self, token):
            self.clearStackToTableBodyContext()
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inRow"]

        def startTagTableCell(self, token):
            self.parser.parseError("unexpected-cell-in-table-body",
                                   {"name": token["name"]})
            self.startTagTr(impliedTagToken("tr", "StartTag"))
            return token

        def startTagTableOther(self, token):
            # XXX AT Any ideas on how to share this with endTagTable?
            if (self.tree.elementInScope("tbody", variant="table") or
                self.tree.elementInScope("thead", variant="table") or
                    self.tree.elementInScope("tfoot", variant="table")):
                self.clearStackToTableBodyContext()
                self.endTagTableRowGroup(
                    impliedTagToken(self.tree.openElements[-1].name))
                return token
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def startTagOther(self, token):
            return self.parser.phases["inTable"].processStartTag(token)

        def endTagTableRowGroup(self, token):
            if self.tree.elementInScope(token["name"], variant="table"):
                self.clearStackToTableBodyContext()
                self.tree.openElements.pop()
                self.parser.phase = self.parser.phases["inTable"]
            else:
                self.parser.parseError("unexpected-end-tag-in-table-body",
                                       {"name": token["name"]})

        def endTagTable(self, token):
            if (self.tree.elementInScope("tbody", variant="table") or
                self.tree.elementInScope("thead", variant="table") or
                    self.tree.elementInScope("tfoot", variant="table")):
                self.clearStackToTableBodyContext()
                self.endTagTableRowGroup(
                    impliedTagToken(self.tree.openElements[-1].name))
                return token
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag-in-table-body",
                                   {"name": token["name"]})

        def endTagOther(self, token):
            return self.parser.phases["inTable"].processEndTag(token)

    class InRowPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-row
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                (("td", "th"), self.startTagTableCell),
                (("caption", "col", "colgroup", "tbody", "tfoot", "thead",
                  "tr"), self.startTagTableOther)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("tr", self.endTagTr),
                ("table", self.endTagTable),
                (("tbody", "tfoot", "thead"), self.endTagTableRowGroup),
                (("body", "caption", "col", "colgroup", "html", "td", "th"),
                 self.endTagIgnore)
            ])
            self.endTagHandler.default = self.endTagOther

        # helper methods (XXX unify this with other table helper methods)
        def clearStackToTableRowContext(self):
            while self.tree.openElements[-1].name not in ("tr", "html"):
                self.parser.parseError("unexpected-implied-end-tag-in-table-row",
                                       {"name": self.tree.openElements[-1].name})
                self.tree.openElements.pop()

        def ignoreEndTagTr(self):
            return not self.tree.elementInScope("tr", variant="table")

        # the rest
        def processEOF(self):
            self.parser.phases["inTable"].processEOF()

        def processSpaceCharacters(self, token):
            return self.parser.phases["inTable"].processSpaceCharacters(token)

        def processCharacters(self, token):
            return self.parser.phases["inTable"].processCharacters(token)

        def startTagTableCell(self, token):
            self.clearStackToTableRowContext()
            self.tree.insertElement(token)
            self.parser.phase = self.parser.phases["inCell"]
            self.tree.activeFormattingElements.append(Marker)

        def startTagTableOther(self, token):
            ignoreEndTag = self.ignoreEndTagTr()
            self.endTagTr(impliedTagToken("tr"))
            # XXX how are we sure it's always ignored in the innerHTML case?
            if not ignoreEndTag:
                return token

        def startTagOther(self, token):
            return self.parser.phases["inTable"].processStartTag(token)

        def endTagTr(self, token):
            if not self.ignoreEndTagTr():
                self.clearStackToTableRowContext()
                self.tree.openElements.pop()
                self.parser.phase = self.parser.phases["inTableBody"]
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagTable(self, token):
            ignoreEndTag = self.ignoreEndTagTr()
            self.endTagTr(impliedTagToken("tr"))
            # Reprocess the current tag if the tr end tag was not ignored
            # XXX how are we sure it's always ignored in the innerHTML case?
            if not ignoreEndTag:
                return token

        def endTagTableRowGroup(self, token):
            if self.tree.elementInScope(token["name"], variant="table"):
                self.endTagTr(impliedTagToken("tr"))
                return token
            else:
                self.parser.parseError()

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag-in-table-row",
                                   {"name": token["name"]})

        def endTagOther(self, token):
            return self.parser.phases["inTable"].processEndTag(token)

    class InCellPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-cell
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)
            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                (("caption", "col", "colgroup", "tbody", "td", "tfoot", "th",
                  "thead", "tr"), self.startTagTableOther)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                (("td", "th"), self.endTagTableCell),
                (("body", "caption", "col", "colgroup", "html"), self.endTagIgnore),
                (("table", "tbody", "tfoot", "thead", "tr"), self.endTagImply)
            ])
            self.endTagHandler.default = self.endTagOther

        # helper
        def closeCell(self):
            if self.tree.elementInScope("td", variant="table"):
                self.endTagTableCell(impliedTagToken("td"))
            elif self.tree.elementInScope("th", variant="table"):
                self.endTagTableCell(impliedTagToken("th"))

        # the rest
        def processEOF(self):
            self.parser.phases["inBody"].processEOF()

        def processCharacters(self, token):
            return self.parser.phases["inBody"].processCharacters(token)

        def startTagTableOther(self, token):
            if (self.tree.elementInScope("td", variant="table") or
                    self.tree.elementInScope("th", variant="table")):
                self.closeCell()
                return token
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def startTagOther(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def endTagTableCell(self, token):
            if self.tree.elementInScope(token["name"], variant="table"):
                self.tree.generateImpliedEndTags(token["name"])
                if self.tree.openElements[-1].name != token["name"]:
                    self.parser.parseError("unexpected-cell-end-tag",
                                           {"name": token["name"]})
                    while True:
                        node = self.tree.openElements.pop()
                        if node.name == token["name"]:
                            break
                else:
                    self.tree.openElements.pop()
                self.tree.clearActiveFormattingElements()
                self.parser.phase = self.parser.phases["inRow"]
            else:
                self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def endTagIgnore(self, token):
            self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

        def endTagImply(self, token):
            if self.tree.elementInScope(token["name"], variant="table"):
                self.closeCell()
                return token
            else:
                # sometimes innerHTML case
                self.parser.parseError()

        def endTagOther(self, token):
            return self.parser.phases["inBody"].processEndTag(token)

    class InSelectPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("option", self.startTagOption),
                ("optgroup", self.startTagOptgroup),
                ("select", self.startTagSelect),
                (("input", "keygen", "textarea"), self.startTagInput),
                ("script", self.startTagScript)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("option", self.endTagOption),
                ("optgroup", self.endTagOptgroup),
                ("select", self.endTagSelect)
            ])
            self.endTagHandler.default = self.endTagOther

        # http://www.whatwg.org/specs/web-apps/current-work/#in-select
        def processEOF(self):
            if self.tree.openElements[-1].name != "html":
                self.parser.parseError("eof-in-select")
            else:
                assert self.parser.innerHTML

        def processCharacters(self, token):
            if token["data"] == "\u0000":
                return
            self.tree.insertText(token["data"])

        def startTagOption(self, token):
            # We need to imply </option> if <option> is the current node.
            if self.tree.openElements[-1].name == "option":
                self.tree.openElements.pop()
            self.tree.insertElement(token)

        def startTagOptgroup(self, token):
            if self.tree.openElements[-1].name == "option":
                self.tree.openElements.pop()
            if self.tree.openElements[-1].name == "optgroup":
                self.tree.openElements.pop()
            self.tree.insertElement(token)

        def startTagSelect(self, token):
            self.parser.parseError("unexpected-select-in-select")
            self.endTagSelect(impliedTagToken("select"))

        def startTagInput(self, token):
            self.parser.parseError("unexpected-input-in-select")
            if self.tree.elementInScope("select", variant="select"):
                self.endTagSelect(impliedTagToken("select"))
                return token
            else:
                assert self.parser.innerHTML

        def startTagScript(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-in-select",
                                   {"name": token["name"]})

        def endTagOption(self, token):
            if self.tree.openElements[-1].name == "option":
                self.tree.openElements.pop()
            else:
                self.parser.parseError("unexpected-end-tag-in-select",
                                       {"name": "option"})

        def endTagOptgroup(self, token):
            # </optgroup> implicitly closes <option>
            if (self.tree.openElements[-1].name == "option" and
                    self.tree.openElements[-2].name == "optgroup"):
                self.tree.openElements.pop()
            # It also closes </optgroup>
            if self.tree.openElements[-1].name == "optgroup":
                self.tree.openElements.pop()
            # But nothing else
            else:
                self.parser.parseError("unexpected-end-tag-in-select",
                                       {"name": "optgroup"})

        def endTagSelect(self, token):
            if self.tree.elementInScope("select", variant="select"):
                node = self.tree.openElements.pop()
                while node.name != "select":
                    node = self.tree.openElements.pop()
                self.parser.resetInsertionMode()
            else:
                # innerHTML case
                assert self.parser.innerHTML
                self.parser.parseError()

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-in-select",
                                   {"name": token["name"]})

    class InSelectInTablePhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                (("caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th"),
                 self.startTagTable)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                (("caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th"),
                 self.endTagTable)
            ])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            self.parser.phases["inSelect"].processEOF()

        def processCharacters(self, token):
            return self.parser.phases["inSelect"].processCharacters(token)

        def startTagTable(self, token):
            self.parser.parseError("unexpected-table-element-start-tag-in-select-in-table", {"name": token["name"]})
            self.endTagOther(impliedTagToken("select"))
            return token

        def startTagOther(self, token):
            return self.parser.phases["inSelect"].processStartTag(token)

        def endTagTable(self, token):
            self.parser.parseError("unexpected-table-element-end-tag-in-select-in-table", {"name": token["name"]})
            if self.tree.elementInScope(token["name"], variant="table"):
                self.endTagOther(impliedTagToken("select"))
                return token

        def endTagOther(self, token):
            return self.parser.phases["inSelect"].processEndTag(token)

    class InForeignContentPhase(Phase):
        breakoutElements = frozenset(["b", "big", "blockquote", "body", "br",
                                      "center", "code", "dd", "div", "dl", "dt",
                                      "em", "embed", "h1", "h2", "h3",
                                      "h4", "h5", "h6", "head", "hr", "i", "img",
                                      "li", "listing", "menu", "meta", "nobr",
                                      "ol", "p", "pre", "ruby", "s", "small",
                                      "span", "strong", "strike", "sub", "sup",
                                      "table", "tt", "u", "ul", "var"])

        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

        def adjustSVGTagNames(self, token):
            replacements = {"altglyph": "altGlyph",
                            "altglyphdef": "altGlyphDef",
                            "altglyphitem": "altGlyphItem",
                            "animatecolor": "animateColor",
                            "animatemotion": "animateMotion",
                            "animatetransform": "animateTransform",
                            "clippath": "clipPath",
                            "feblend": "feBlend",
                            "fecolormatrix": "feColorMatrix",
                            "fecomponenttransfer": "feComponentTransfer",
                            "fecomposite": "feComposite",
                            "feconvolvematrix": "feConvolveMatrix",
                            "fediffuselighting": "feDiffuseLighting",
                            "fedisplacementmap": "feDisplacementMap",
                            "fedistantlight": "feDistantLight",
                            "feflood": "feFlood",
                            "fefunca": "feFuncA",
                            "fefuncb": "feFuncB",
                            "fefuncg": "feFuncG",
                            "fefuncr": "feFuncR",
                            "fegaussianblur": "feGaussianBlur",
                            "feimage": "feImage",
                            "femerge": "feMerge",
                            "femergenode": "feMergeNode",
                            "femorphology": "feMorphology",
                            "feoffset": "feOffset",
                            "fepointlight": "fePointLight",
                            "fespecularlighting": "feSpecularLighting",
                            "fespotlight": "feSpotLight",
                            "fetile": "feTile",
                            "feturbulence": "feTurbulence",
                            "foreignobject": "foreignObject",
                            "glyphref": "glyphRef",
                            "lineargradient": "linearGradient",
                            "radialgradient": "radialGradient",
                            "textpath": "textPath"}

            if token["name"] in replacements:
                token["name"] = replacements[token["name"]]

        def processCharacters(self, token):
            if token["data"] == "\u0000":
                token["data"] = "\uFFFD"
            elif (self.parser.framesetOK and
                  any(char not in spaceCharacters for char in token["data"])):
                self.parser.framesetOK = False
            Phase.processCharacters(self, token)

        def processStartTag(self, token):
            currentNode = self.tree.openElements[-1]
            if (token["name"] in self.breakoutElements or
                (token["name"] == "font" and
                 set(token["data"].keys()) & set(["color", "face", "size"]))):
                self.parser.parseError("unexpected-html-element-in-foreign-content",
                                       {"name": token["name"]})
                while (self.tree.openElements[-1].namespace !=
                       self.tree.defaultNamespace and
                       not self.parser.isHTMLIntegrationPoint(self.tree.openElements[-1]) and
                       not self.parser.isMathMLTextIntegrationPoint(self.tree.openElements[-1])):
                    self.tree.openElements.pop()
                return token

            else:
                if currentNode.namespace == namespaces["mathml"]:
                    self.parser.adjustMathMLAttributes(token)
                elif currentNode.namespace == namespaces["svg"]:
                    self.adjustSVGTagNames(token)
                    self.parser.adjustSVGAttributes(token)
                self.parser.adjustForeignAttributes(token)
                token["namespace"] = currentNode.namespace
                self.tree.insertElement(token)
                if token["selfClosing"]:
                    self.tree.openElements.pop()
                    token["selfClosingAcknowledged"] = True

        def processEndTag(self, token):
            nodeIndex = len(self.tree.openElements) - 1
            node = self.tree.openElements[-1]
            if node.name != token["name"]:
                self.parser.parseError("unexpected-end-tag", {"name": token["name"]})

            while True:
                if node.name.translate(asciiUpper2Lower) == token["name"]:
                    # XXX this isn't in the spec but it seems necessary
                    if self.parser.phase == self.parser.phases["inTableText"]:
                        self.parser.phase.flushCharacters()
                        self.parser.phase = self.parser.phase.originalPhase
                    while self.tree.openElements.pop() != node:
                        assert self.tree.openElements
                    new_token = None
                    break
                nodeIndex -= 1

                node = self.tree.openElements[nodeIndex]
                if node.namespace != self.tree.defaultNamespace:
                    continue
                else:
                    new_token = self.parser.phase.processEndTag(token)
                    break
            return new_token

    class AfterBodyPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([("html", self.endTagHtml)])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            # Stop parsing
            pass

        def processComment(self, token):
            # This is needed because data is to be appended to the <html> element
            # here and not to whatever is currently open.
            self.tree.insertComment(token, self.tree.openElements[0])

        def processCharacters(self, token):
            self.parser.parseError("unexpected-char-after-body")
            self.parser.phase = self.parser.phases["inBody"]
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-after-body",
                                   {"name": token["name"]})
            self.parser.phase = self.parser.phases["inBody"]
            return token

        def endTagHtml(self, name):
            if self.parser.innerHTML:
                self.parser.parseError("unexpected-end-tag-after-body-innerhtml")
            else:
                self.parser.phase = self.parser.phases["afterAfterBody"]

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-after-body",
                                   {"name": token["name"]})
            self.parser.phase = self.parser.phases["inBody"]
            return token

    class InFramesetPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#in-frameset
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("frameset", self.startTagFrameset),
                ("frame", self.startTagFrame),
                ("noframes", self.startTagNoframes)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("frameset", self.endTagFrameset)
            ])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            if self.tree.openElements[-1].name != "html":
                self.parser.parseError("eof-in-frameset")
            else:
                assert self.parser.innerHTML

        def processCharacters(self, token):
            self.parser.parseError("unexpected-char-in-frameset")

        def startTagFrameset(self, token):
            self.tree.insertElement(token)

        def startTagFrame(self, token):
            self.tree.insertElement(token)
            self.tree.openElements.pop()

        def startTagNoframes(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-in-frameset",
                                   {"name": token["name"]})

        def endTagFrameset(self, token):
            if self.tree.openElements[-1].name == "html":
                # innerHTML case
                self.parser.parseError("unexpected-frameset-in-frameset-innerhtml")
            else:
                self.tree.openElements.pop()
            if (not self.parser.innerHTML and
                    self.tree.openElements[-1].name != "frameset"):
                # If we're not in innerHTML mode and the the current node is not a
                # "frameset" element (anymore) then switch.
                self.parser.phase = self.parser.phases["afterFrameset"]

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-in-frameset",
                                   {"name": token["name"]})

    class AfterFramesetPhase(Phase):
        # http://www.whatwg.org/specs/web-apps/current-work/#after3
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("noframes", self.startTagNoframes)
            ])
            self.startTagHandler.default = self.startTagOther

            self.endTagHandler = utils.MethodDispatcher([
                ("html", self.endTagHtml)
            ])
            self.endTagHandler.default = self.endTagOther

        def processEOF(self):
            # Stop parsing
            pass

        def processCharacters(self, token):
            self.parser.parseError("unexpected-char-after-frameset")

        def startTagNoframes(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("unexpected-start-tag-after-frameset",
                                   {"name": token["name"]})

        def endTagHtml(self, token):
            self.parser.phase = self.parser.phases["afterAfterFrameset"]

        def endTagOther(self, token):
            self.parser.parseError("unexpected-end-tag-after-frameset",
                                   {"name": token["name"]})

    class AfterAfterBodyPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml)
            ])
            self.startTagHandler.default = self.startTagOther

        def processEOF(self):
            pass

        def processComment(self, token):
            self.tree.insertComment(token, self.tree.document)

        def processSpaceCharacters(self, token):
            return self.parser.phases["inBody"].processSpaceCharacters(token)

        def processCharacters(self, token):
            self.parser.parseError("expected-eof-but-got-char")
            self.parser.phase = self.parser.phases["inBody"]
            return token

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("expected-eof-but-got-start-tag",
                                   {"name": token["name"]})
            self.parser.phase = self.parser.phases["inBody"]
            return token

        def processEndTag(self, token):
            self.parser.parseError("expected-eof-but-got-end-tag",
                                   {"name": token["name"]})
            self.parser.phase = self.parser.phases["inBody"]
            return token

    class AfterAfterFramesetPhase(Phase):
        def __init__(self, parser, tree):
            Phase.__init__(self, parser, tree)

            self.startTagHandler = utils.MethodDispatcher([
                ("html", self.startTagHtml),
                ("noframes", self.startTagNoFrames)
            ])
            self.startTagHandler.default = self.startTagOther

        def processEOF(self):
            pass

        def processComment(self, token):
            self.tree.insertComment(token, self.tree.document)

        def processSpaceCharacters(self, token):
            return self.parser.phases["inBody"].processSpaceCharacters(token)

        def processCharacters(self, token):
            self.parser.parseError("expected-eof-but-got-char")

        def startTagHtml(self, token):
            return self.parser.phases["inBody"].processStartTag(token)

        def startTagNoFrames(self, token):
            return self.parser.phases["inHead"].processStartTag(token)

        def startTagOther(self, token):
            self.parser.parseError("expected-eof-but-got-start-tag",
                                   {"name": token["name"]})

        def processEndTag(self, token):
            self.parser.parseError("expected-eof-but-got-end-tag",
                                   {"name": token["name"]})

    return {
        "initial": InitialPhase,
        "beforeHtml": BeforeHtmlPhase,
        "beforeHead": BeforeHeadPhase,
        "inHead": InHeadPhase,
        # XXX "inHeadNoscript": InHeadNoScriptPhase,
        "afterHead": AfterHeadPhase,
        "inBody": InBodyPhase,
        "text": TextPhase,
        "inTable": InTablePhase,
        "inTableText": InTableTextPhase,
        "inCaption": InCaptionPhase,
        "inColumnGroup": InColumnGroupPhase,
        "inTableBody": InTableBodyPhase,
        "inRow": InRowPhase,
        "inCell": InCellPhase,
        "inSelect": InSelectPhase,
        "inSelectInTable": InSelectInTablePhase,
        "inForeignContent": InForeignContentPhase,
        "afterBody": AfterBodyPhase,
        "inFrameset": InFramesetPhase,
        "afterFrameset": AfterFramesetPhase,
        "afterAfterBody": AfterAfterBodyPhase,
        "afterAfterFrameset": AfterAfterFramesetPhase,
        # XXX after after frameset
    }


def impliedTagToken(name, type="EndTag", attributes=None,
                    selfClosing=False):
    if attributes is None:
        attributes = {}
    return {"type": tokenTypes[type], "name": name, "data": attributes,
            "selfClosing": selfClosing}


class ParseError(Exception):
    """Error in parsed document"""
    pass
python3.4/site-packages/pip/_vendor/html5lib/__init__.py000064400000001312151735047530017116 0ustar00"""
HTML parsing library based on the WHATWG "HTML5"
specification. The parser is designed to be compatible with existing
HTML found in the wild and implements well-defined error recovery that
is largely compatible with modern desktop web browsers.

Example usage:

import html5lib
f = open("my_document.html")
tree = html5lib.parse(f)
"""

from __future__ import absolute_import, division, unicode_literals

from .html5parser import HTMLParser, parse, parseFragment
from .treebuilders import getTreeBuilder
from .treewalkers import getTreeWalker
from .serializer import serialize

__all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder",
           "getTreeWalker", "serialize"]
__version__ = "1.0b3"
python3.4/site-packages/pip/_vendor/html5lib/trie/py.py000064400000003357151735047530016765 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

from bisect import bisect_left

from ._base import Trie as ABCTrie


class Trie(ABCTrie):
    def __init__(self, data):
        if not all(isinstance(x, text_type) for x in data.keys()):
            raise TypeError("All keys must be strings")

        self._data = data
        self._keys = sorted(data.keys())
        self._cachestr = ""
        self._cachepoints = (0, len(data))

    def __contains__(self, key):
        return key in self._data

    def __len__(self):
        return len(self._data)

    def __iter__(self):
        return iter(self._data)

    def __getitem__(self, key):
        return self._data[key]

    def keys(self, prefix=None):
        if prefix is None or prefix == "" or not self._keys:
            return set(self._keys)

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints
            start = i = bisect_left(self._keys, prefix, lo, hi)
        else:
            start = i = bisect_left(self._keys, prefix)

        keys = set()
        if start == len(self._keys):
            return keys

        while self._keys[i].startswith(prefix):
            keys.add(self._keys[i])
            i += 1

        self._cachestr = prefix
        self._cachepoints = (start, i)

        return keys

    def has_keys_with_prefix(self, prefix):
        if prefix in self._data:
            return True

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints
            i = bisect_left(self._keys, prefix, lo, hi)
        else:
            i = bisect_left(self._keys, prefix)

        if i == len(self._keys):
            return False

        return self._keys[i].startswith(prefix)
python3.4/site-packages/pip/_vendor/html5lib/trie/__pycache__/__init__.cpython-34.pyc000064400000000606151735047530024350 0ustar00�
�Re��@seddlmZmZmZddlmZeZyddlmZWne	k
rZYnXeZdS)�)�absolute_import�division�unicode_literals�)�TrieN)
�
__future__rrr�pyr�PyTrieZdatrieZDATrie�ImportError�rr�=/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/trie/__init__.py�<module>s
python3.4/site-packages/pip/_vendor/html5lib/trie/__pycache__/datrie.cpython-34.pyc000064400000004073151735047530024063 0ustar00�
�Re��@sfddlmZmZmZddlmZddlmZddl	mZ
Gdd�de
�ZdS)�)�absolute_import�division�unicode_literals)�Trie)�	text_type�c@seZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zddd
�Zdd�Z	dd�Z
dd�ZdS)rcCs�t�}xP|j�D]B}t|t�s:td��nx|D]}|j|�qAWqWtdj|��|_x'|j	�D]\}}||j|<q�WdS)NzAll keys must be strings�)
�set�keys�
isinstancer�	TypeError�add�DATrie�join�_data�items)�self�data�chars�key�char�value�r�;/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/trie/datrie.py�__init__
s	
z
Trie.__init__cCs
||jkS)N)r)rrrrr�__contains__szTrie.__contains__cCs
t|j�S)N)�lenr)rrrr�__len__szTrie.__len__cCs
t��dS)N)�NotImplementedError)rrrr�__iter__sz
Trie.__iter__cCs|j|S)N)r)rrrrr�__getitem__szTrie.__getitem__NcCs|jj|�S)N)rr
)r�prefixrrrr
"sz	Trie.keyscCs|jj|�S)N)r�has_keys_with_prefix)rr!rrrr"%szTrie.has_keys_with_prefixcCs|jj|�S)N)r�longest_prefix)rr!rrrr#(szTrie.longest_prefixcCs|jj|�S)N)r�longest_prefix_item)rr!rrrr$+szTrie.longest_prefix_item)�__name__�
__module__�__qualname__rrrrr r
r"r#r$rrrrr	srN)�
__future__rrrZdatrierrZpip._vendor.sixr�_base�ABCTrierrrr�<module>spython3.4/site-packages/pip/_vendor/html5lib/trie/__pycache__/py.cpython-34.pyc000064400000004536151735047530023247 0ustar00�
�Re��@sfddlmZmZmZddlmZddlmZddlm	Z
Gdd�de
�Z	dS)	�)�absolute_import�division�unicode_literals)�	text_type)�bisect_left�)�Triec@sgeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zddd
�Zdd�Z	dS)rcCsntdd�|j�D��s.td��n||_t|j��|_d|_dt|�f|_dS)Ncss|]}t|t�VqdS)N)�
isinstancer)�.0�x�r�7/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/trie/py.py�	<genexpr>sz Trie.__init__.<locals>.<genexpr>zAll keys must be strings�r)	�all�keys�	TypeError�_data�sorted�_keys�	_cachestr�len�_cachepoints)�self�datarrr
�__init__
s		z
Trie.__init__cCs
||jkS)N)r)r�keyrrr
�__contains__szTrie.__contains__cCs
t|j�S)N)rr)rrrr
�__len__szTrie.__len__cCs
t|j�S)N)�iterr)rrrr
�__iter__sz
Trie.__iter__cCs|j|S)N)r)rrrrr
�__getitem__szTrie.__getitem__NcCs�|dks"|dks"|jr/t|j�S|j|j�ro|j\}}t|j|||�}}nt|j|�}}t�}|t|j�kr�|Sx8|j|j|�r�|j|j|�|d7}q�W||_||f|_|S)Nrr)r�set�
startswithrrrr�add)r�prefix�lo�hi�start�irrrr
rs"
		z	Trie.keyscCs�||jkrdS|j|j�rO|j\}}t|j|||�}nt|j|�}|t|j�krzdS|j|j|�S)NTF)rr#rrrrr)rr%r&r'r)rrr
�has_keys_with_prefix6szTrie.has_keys_with_prefix)
�__name__�
__module__�__qualname__rrrr r!rr*rrrr
r	s	rN)�
__future__rrrZpip._vendor.sixr�bisectr�_baser�ABCTrierrrr
�<module>spython3.4/site-packages/pip/_vendor/html5lib/trie/__pycache__/_base.cpython-34.pyc000064400000003004151735047530023655 0ustar00�
�Re��@sFddlmZmZmZddlmZGdd�de�ZdS)�)�absolute_import�division�unicode_literals)�MappingcsOeZdZdZd�fdd�Zdd�Zdd�Zd	d
�Z�S)�TriezAbstract base class for triesNcsBt�j�}�dkr%t|�St�fdd�|D��S)Ncs%g|]}|j��r|�qS�)�
startswith)�.0�x)�prefixr�:/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/trie/_base.py�
<listcomp>s	zTrie.keys.<locals>.<listcomp>)�super�keys�set)�selfrr)�	__class__)rrr	s
z	Trie.keyscCs.x'|j�D]}|j|�r
dSq
WdS)NTF)rr)rr�keyrrr�has_keys_with_prefixszTrie.has_keys_with_prefixcCsj||kr|SxGtdt|�d�D],}|d|�|kr*|d|�Sq*Wt|��dS)N�)�range�len�KeyError)rr�irrr�longest_prefixs zTrie.longest_prefixcCs|j|�}|||fS)N)r)rr�lprefixrrr�longest_prefix_item#szTrie.longest_prefix_item)�__name__�
__module__�__qualname__�__doc__rrrrrr)rrrs
	
rN)�
__future__rrr�collectionsrrrrrr�<module>spython3.4/site-packages/pip/_vendor/html5lib/trie/_base.py000064400000001637151735047530017405 0ustar00from __future__ import absolute_import, division, unicode_literals

from collections import Mapping


class Trie(Mapping):
    """Abstract base class for tries"""

    def keys(self, prefix=None):
        keys = super().keys()

        if prefix is None:
            return set(keys)

        # Python 2.6: no set comprehensions
        return set([x for x in keys if x.startswith(prefix)])

    def has_keys_with_prefix(self, prefix):
        for key in self.keys():
            if key.startswith(prefix):
                return True

        return False

    def longest_prefix(self, prefix):
        if prefix in self:
            return prefix

        for i in range(1, len(prefix) + 1):
            if prefix[:-i] in self:
                return prefix[:-i]

        raise KeyError(prefix)

    def longest_prefix_item(self, prefix):
        lprefix = self.longest_prefix(prefix)
        return (lprefix, self[lprefix])
python3.4/site-packages/pip/_vendor/html5lib/trie/datrie.py000064400000002232151735047530017574 0ustar00from __future__ import absolute_import, division, unicode_literals

from datrie import Trie as DATrie
from pip._vendor.six import text_type

from ._base import Trie as ABCTrie


class Trie(ABCTrie):
    def __init__(self, data):
        chars = set()
        for key in data.keys():
            if not isinstance(key, text_type):
                raise TypeError("All keys must be strings")
            for char in key:
                chars.add(char)

        self._data = DATrie("".join(chars))
        for key, value in data.items():
            self._data[key] = value

    def __contains__(self, key):
        return key in self._data

    def __len__(self):
        return len(self._data)

    def __iter__(self):
        raise NotImplementedError()

    def __getitem__(self, key):
        return self._data[key]

    def keys(self, prefix=None):
        return self._data.keys(prefix)

    def has_keys_with_prefix(self, prefix):
        return self._data.has_keys_with_prefix(prefix)

    def longest_prefix(self, prefix):
        return self._data.longest_prefix(prefix)

    def longest_prefix_item(self, prefix):
        return self._data.longest_prefix_item(prefix)
python3.4/site-packages/pip/_vendor/html5lib/trie/__init__.py000064400000000324151735047530020063 0ustar00from __future__ import absolute_import, division, unicode_literals

from .py import Trie as PyTrie

Trie = PyTrie

try:
    from .datrie import Trie as DATrie
except ImportError:
    pass
else:
    Trie = DATrie
python3.4/site-packages/pip/_vendor/html5lib/tokenizer.py000064400000226201151735047530017377 0ustar00from __future__ import absolute_import, division, unicode_literals

try:
    chr = unichr # flake8: noqa
except NameError:
    pass

from collections import deque

from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, hexDigits, EOF
from .constants import tokenTypes, tagTokenTypes
from .constants import replacementCharacters

from .inputstream import HTMLInputStream

from .trie import Trie

entitiesTrie = Trie(entities)


class HTMLTokenizer(object):
    """ This class takes care of tokenizing HTML.

    * self.currentToken
      Holds the token that is currently being processed.

    * self.state
      Holds a reference to the method to be invoked... XXX

    * self.stream
      Points to HTMLInputStream object.
    """

    def __init__(self, stream, encoding=None, parseMeta=True, useChardet=True,
                 lowercaseElementName=True, lowercaseAttrName=True, parser=None):

        self.stream = HTMLInputStream(stream, encoding, parseMeta, useChardet)
        self.parser = parser

        # Perform case conversions?
        self.lowercaseElementName = lowercaseElementName
        self.lowercaseAttrName = lowercaseAttrName

        # Setup the initial tokenizer state
        self.escapeFlag = False
        self.lastFourChars = []
        self.state = self.dataState
        self.escape = False

        # The current token being created
        self.currentToken = None
        super(HTMLTokenizer, self).__init__()

    def __iter__(self):
        """ This is where the magic happens.

        We do our usually processing through the states and when we have a token
        to return we yield the token which pauses processing until the next token
        is requested.
        """
        self.tokenQueue = deque([])
        # Start processing. When EOF is reached self.state will return False
        # instead of True and the loop will terminate.
        while self.state():
            while self.stream.errors:
                yield {"type": tokenTypes["ParseError"], "data": self.stream.errors.pop(0)}
            while self.tokenQueue:
                yield self.tokenQueue.popleft()

    def consumeNumberEntity(self, isHex):
        """This function returns either U+FFFD or the character based on the
        decimal or hexadecimal representation. It also discards ";" if present.
        If not present self.tokenQueue.append({"type": tokenTypes["ParseError"]}) is invoked.
        """

        allowed = digits
        radix = 10
        if isHex:
            allowed = hexDigits
            radix = 16

        charStack = []

        # Consume all the characters that are in range while making sure we
        # don't hit an EOF.
        c = self.stream.char()
        while c in allowed and c is not EOF:
            charStack.append(c)
            c = self.stream.char()

        # Convert the set of characters consumed to an int.
        charAsInt = int("".join(charStack), radix)

        # Certain characters get replaced with others
        if charAsInt in replacementCharacters:
            char = replacementCharacters[charAsInt]
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "illegal-codepoint-for-numeric-entity",
                                    "datavars": {"charAsInt": charAsInt}})
        elif ((0xD800 <= charAsInt <= 0xDFFF) or
              (charAsInt > 0x10FFFF)):
            char = "\uFFFD"
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "illegal-codepoint-for-numeric-entity",
                                    "datavars": {"charAsInt": charAsInt}})
        else:
            # Should speed up this check somehow (e.g. move the set to a constant)
            if ((0x0001 <= charAsInt <= 0x0008) or
                (0x000E <= charAsInt <= 0x001F) or
                (0x007F <= charAsInt <= 0x009F) or
                (0xFDD0 <= charAsInt <= 0xFDEF) or
                charAsInt in frozenset([0x000B, 0xFFFE, 0xFFFF, 0x1FFFE,
                                        0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE,
                                        0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE,
                                        0x5FFFF, 0x6FFFE, 0x6FFFF, 0x7FFFE,
                                        0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE,
                                        0x9FFFF, 0xAFFFE, 0xAFFFF, 0xBFFFE,
                                        0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE,
                                        0xDFFFF, 0xEFFFE, 0xEFFFF, 0xFFFFE,
                                        0xFFFFF, 0x10FFFE, 0x10FFFF])):
                self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                        "data":
                                        "illegal-codepoint-for-numeric-entity",
                                        "datavars": {"charAsInt": charAsInt}})
            try:
                # Try/except needed as UCS-2 Python builds' unichar only works
                # within the BMP.
                char = chr(charAsInt)
            except ValueError:
                v = charAsInt - 0x10000
                char = chr(0xD800 | (v >> 10)) + chr(0xDC00 | (v & 0x3FF))

        # Discard the ; if present. Otherwise, put it back on the queue and
        # invoke parseError on parser.
        if c != ";":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "numeric-entity-without-semicolon"})
            self.stream.unget(c)

        return char

    def consumeEntity(self, allowedChar=None, fromAttribute=False):
        # Initialise to the default output for when no entity is matched
        output = "&"

        charStack = [self.stream.char()]
        if (charStack[0] in spaceCharacters or charStack[0] in (EOF, "<", "&")
                or (allowedChar is not None and allowedChar == charStack[0])):
            self.stream.unget(charStack[0])

        elif charStack[0] == "#":
            # Read the next character to see if it's hex or decimal
            hex = False
            charStack.append(self.stream.char())
            if charStack[-1] in ("x", "X"):
                hex = True
                charStack.append(self.stream.char())

            # charStack[-1] should be the first digit
            if (hex and charStack[-1] in hexDigits) \
                    or (not hex and charStack[-1] in digits):
                # At least one digit found, so consume the whole number
                self.stream.unget(charStack[-1])
                output = self.consumeNumberEntity(hex)
            else:
                # No digits found
                self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                        "data": "expected-numeric-entity"})
                self.stream.unget(charStack.pop())
                output = "&" + "".join(charStack)

        else:
            # At this point in the process might have named entity. Entities
            # are stored in the global variable "entities".
            #
            # Consume characters and compare to these to a substring of the
            # entity names in the list until the substring no longer matches.
            while (charStack[-1] is not EOF):
                if not entitiesTrie.has_keys_with_prefix("".join(charStack)):
                    break
                charStack.append(self.stream.char())

            # At this point we have a string that starts with some characters
            # that may match an entity
            # Try to find the longest entity the string will match to take care
            # of &noti for instance.
            try:
                entityName = entitiesTrie.longest_prefix("".join(charStack[:-1]))
                entityLength = len(entityName)
            except KeyError:
                entityName = None

            if entityName is not None:
                if entityName[-1] != ";":
                    self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                            "named-entity-without-semicolon"})
                if (entityName[-1] != ";" and fromAttribute and
                    (charStack[entityLength] in asciiLetters or
                     charStack[entityLength] in digits or
                     charStack[entityLength] == "=")):
                    self.stream.unget(charStack.pop())
                    output = "&" + "".join(charStack)
                else:
                    output = entities[entityName]
                    self.stream.unget(charStack.pop())
                    output += "".join(charStack[entityLength:])
            else:
                self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                        "expected-named-entity"})
                self.stream.unget(charStack.pop())
                output = "&" + "".join(charStack)

        if fromAttribute:
            self.currentToken["data"][-1][1] += output
        else:
            if output in spaceCharacters:
                tokenType = "SpaceCharacters"
            else:
                tokenType = "Characters"
            self.tokenQueue.append({"type": tokenTypes[tokenType], "data": output})

    def processEntityInAttribute(self, allowedChar):
        """This method replaces the need for "entityInAttributeValueState".
        """
        self.consumeEntity(allowedChar=allowedChar, fromAttribute=True)

    def emitCurrentToken(self):
        """This method is a generic handler for emitting the tags. It also sets
        the state to "data" because that's what's needed after a token has been
        emitted.
        """
        token = self.currentToken
        # Add token to the queue to be yielded
        if (token["type"] in tagTokenTypes):
            if self.lowercaseElementName:
                token["name"] = token["name"].translate(asciiUpper2Lower)
            if token["type"] == tokenTypes["EndTag"]:
                if token["data"]:
                    self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                            "data": "attributes-in-end-tag"})
                if token["selfClosing"]:
                    self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                            "data": "self-closing-flag-on-end-tag"})
        self.tokenQueue.append(token)
        self.state = self.dataState

    # Below are the various tokenizer states worked out.
    def dataState(self):
        data = self.stream.char()
        if data == "&":
            self.state = self.entityDataState
        elif data == "<":
            self.state = self.tagOpenState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\u0000"})
        elif data is EOF:
            # Tokenization ends.
            return False
        elif data in spaceCharacters:
            # Directly after emitting a token you switch back to the "data
            # state". At that point spaceCharacters are important so they are
            # emitted separately.
            self.tokenQueue.append({"type": tokenTypes["SpaceCharacters"], "data":
                                    data + self.stream.charsUntil(spaceCharacters, True)})
            # No need to update lastFourChars here, since the first space will
            # have already been appended to lastFourChars and will have broken
            # any <!-- or --> sequences
        else:
            chars = self.stream.charsUntil(("&", "<", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def entityDataState(self):
        self.consumeEntity()
        self.state = self.dataState
        return True

    def rcdataState(self):
        data = self.stream.char()
        if data == "&":
            self.state = self.characterReferenceInRcdata
        elif data == "<":
            self.state = self.rcdataLessThanSignState
        elif data == EOF:
            # Tokenization ends.
            return False
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data in spaceCharacters:
            # Directly after emitting a token you switch back to the "data
            # state". At that point spaceCharacters are important so they are
            # emitted separately.
            self.tokenQueue.append({"type": tokenTypes["SpaceCharacters"], "data":
                                    data + self.stream.charsUntil(spaceCharacters, True)})
            # No need to update lastFourChars here, since the first space will
            # have already been appended to lastFourChars and will have broken
            # any <!-- or --> sequences
        else:
            chars = self.stream.charsUntil(("&", "<", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def characterReferenceInRcdata(self):
        self.consumeEntity()
        self.state = self.rcdataState
        return True

    def rawtextState(self):
        data = self.stream.char()
        if data == "<":
            self.state = self.rawtextLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data == EOF:
            # Tokenization ends.
            return False
        else:
            chars = self.stream.charsUntil(("<", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def scriptDataState(self):
        data = self.stream.char()
        if data == "<":
            self.state = self.scriptDataLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data == EOF:
            # Tokenization ends.
            return False
        else:
            chars = self.stream.charsUntil(("<", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def plaintextState(self):
        data = self.stream.char()
        if data == EOF:
            # Tokenization ends.
            return False
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + self.stream.charsUntil("\u0000")})
        return True

    def tagOpenState(self):
        data = self.stream.char()
        if data == "!":
            self.state = self.markupDeclarationOpenState
        elif data == "/":
            self.state = self.closeTagOpenState
        elif data in asciiLetters:
            self.currentToken = {"type": tokenTypes["StartTag"],
                                 "name": data, "data": [],
                                 "selfClosing": False,
                                 "selfClosingAcknowledged": False}
            self.state = self.tagNameState
        elif data == ">":
            # XXX In theory it could be something besides a tag name. But
            # do we really care?
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-tag-name-but-got-right-bracket"})
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<>"})
            self.state = self.dataState
        elif data == "?":
            # XXX In theory it could be something besides a tag name. But
            # do we really care?
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-tag-name-but-got-question-mark"})
            self.stream.unget(data)
            self.state = self.bogusCommentState
        else:
            # XXX
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-tag-name"})
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.dataState
        return True

    def closeTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.currentToken = {"type": tokenTypes["EndTag"], "name": data,
                                 "data": [], "selfClosing": False}
            self.state = self.tagNameState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-closing-tag-but-got-right-bracket"})
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-closing-tag-but-got-eof"})
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.state = self.dataState
        else:
            # XXX data can be _'_...
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-closing-tag-but-got-char",
                                    "datavars": {"data": data}})
            self.stream.unget(data)
            self.state = self.bogusCommentState
        return True

    def tagNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeAttributeNameState
        elif data == ">":
            self.emitCurrentToken()
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-tag-name"})
            self.state = self.dataState
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["name"] += "\uFFFD"
        else:
            self.currentToken["name"] += data
            # (Don't use charsUntil here, because tag names are
            # very short and it's faster to not do anything fancy)
        return True

    def rcdataLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.temporaryBuffer = ""
            self.state = self.rcdataEndTagOpenState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.rcdataState
        return True

    def rcdataEndTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.temporaryBuffer += data
            self.state = self.rcdataEndTagNameState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.stream.unget(data)
            self.state = self.rcdataState
        return True

    def rcdataEndTagNameState(self):
        appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
        data = self.stream.char()
        if data in spaceCharacters and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.beforeAttributeNameState
        elif data == "/" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.selfClosingStartTagState
        elif data == ">" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.emitCurrentToken()
            self.state = self.dataState
        elif data in asciiLetters:
            self.temporaryBuffer += data
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "</" + self.temporaryBuffer})
            self.stream.unget(data)
            self.state = self.rcdataState
        return True

    def rawtextLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.temporaryBuffer = ""
            self.state = self.rawtextEndTagOpenState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.rawtextState
        return True

    def rawtextEndTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.temporaryBuffer += data
            self.state = self.rawtextEndTagNameState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.stream.unget(data)
            self.state = self.rawtextState
        return True

    def rawtextEndTagNameState(self):
        appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
        data = self.stream.char()
        if data in spaceCharacters and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.beforeAttributeNameState
        elif data == "/" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.selfClosingStartTagState
        elif data == ">" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.emitCurrentToken()
            self.state = self.dataState
        elif data in asciiLetters:
            self.temporaryBuffer += data
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "</" + self.temporaryBuffer})
            self.stream.unget(data)
            self.state = self.rawtextState
        return True

    def scriptDataLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.temporaryBuffer = ""
            self.state = self.scriptDataEndTagOpenState
        elif data == "!":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<!"})
            self.state = self.scriptDataEscapeStartState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEndTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.temporaryBuffer += data
            self.state = self.scriptDataEndTagNameState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEndTagNameState(self):
        appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
        data = self.stream.char()
        if data in spaceCharacters and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.beforeAttributeNameState
        elif data == "/" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.selfClosingStartTagState
        elif data == ">" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.emitCurrentToken()
            self.state = self.dataState
        elif data in asciiLetters:
            self.temporaryBuffer += data
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "</" + self.temporaryBuffer})
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEscapeStartState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataEscapeStartDashState
        else:
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEscapeStartDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataEscapedDashDashState
        else:
            self.stream.unget(data)
            self.state = self.scriptDataState
        return True

    def scriptDataEscapedState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataEscapedDashState
        elif data == "<":
            self.state = self.scriptDataEscapedLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data == EOF:
            self.state = self.dataState
        else:
            chars = self.stream.charsUntil(("<", "-", "\u0000"))
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
                                    data + chars})
        return True

    def scriptDataEscapedDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataEscapedDashDashState
        elif data == "<":
            self.state = self.scriptDataEscapedLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
            self.state = self.scriptDataEscapedState
        elif data == EOF:
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataEscapedDashDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
        elif data == "<":
            self.state = self.scriptDataEscapedLessThanSignState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": ">"})
            self.state = self.scriptDataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
            self.state = self.scriptDataEscapedState
        elif data == EOF:
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataEscapedLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.temporaryBuffer = ""
            self.state = self.scriptDataEscapedEndTagOpenState
        elif data in asciiLetters:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<" + data})
            self.temporaryBuffer = data
            self.state = self.scriptDataDoubleEscapeStartState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.stream.unget(data)
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataEscapedEndTagOpenState(self):
        data = self.stream.char()
        if data in asciiLetters:
            self.temporaryBuffer = data
            self.state = self.scriptDataEscapedEndTagNameState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
            self.stream.unget(data)
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataEscapedEndTagNameState(self):
        appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
        data = self.stream.char()
        if data in spaceCharacters and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.beforeAttributeNameState
        elif data == "/" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.state = self.selfClosingStartTagState
        elif data == ">" and appropriate:
            self.currentToken = {"type": tokenTypes["EndTag"],
                                 "name": self.temporaryBuffer,
                                 "data": [], "selfClosing": False}
            self.emitCurrentToken()
            self.state = self.dataState
        elif data in asciiLetters:
            self.temporaryBuffer += data
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "</" + self.temporaryBuffer})
            self.stream.unget(data)
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataDoubleEscapeStartState(self):
        data = self.stream.char()
        if data in (spaceCharacters | frozenset(("/", ">"))):
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            if self.temporaryBuffer.lower() == "script":
                self.state = self.scriptDataDoubleEscapedState
            else:
                self.state = self.scriptDataEscapedState
        elif data in asciiLetters:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.temporaryBuffer += data
        else:
            self.stream.unget(data)
            self.state = self.scriptDataEscapedState
        return True

    def scriptDataDoubleEscapedState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataDoubleEscapedDashState
        elif data == "<":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.state = self.scriptDataDoubleEscapedLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
        elif data == EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-script-in-script"})
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
        return True

    def scriptDataDoubleEscapedDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
            self.state = self.scriptDataDoubleEscapedDashDashState
        elif data == "<":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.state = self.scriptDataDoubleEscapedLessThanSignState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
            self.state = self.scriptDataDoubleEscapedState
        elif data == EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-script-in-script"})
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.state = self.scriptDataDoubleEscapedState
        return True

    def scriptDataDoubleEscapedDashDashState(self):
        data = self.stream.char()
        if data == "-":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
        elif data == "<":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
            self.state = self.scriptDataDoubleEscapedLessThanSignState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": ">"})
            self.state = self.scriptDataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": "\uFFFD"})
            self.state = self.scriptDataDoubleEscapedState
        elif data == EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-script-in-script"})
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.state = self.scriptDataDoubleEscapedState
        return True

    def scriptDataDoubleEscapedLessThanSignState(self):
        data = self.stream.char()
        if data == "/":
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "/"})
            self.temporaryBuffer = ""
            self.state = self.scriptDataDoubleEscapeEndState
        else:
            self.stream.unget(data)
            self.state = self.scriptDataDoubleEscapedState
        return True

    def scriptDataDoubleEscapeEndState(self):
        data = self.stream.char()
        if data in (spaceCharacters | frozenset(("/", ">"))):
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            if self.temporaryBuffer.lower() == "script":
                self.state = self.scriptDataEscapedState
            else:
                self.state = self.scriptDataDoubleEscapedState
        elif data in asciiLetters:
            self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
            self.temporaryBuffer += data
        else:
            self.stream.unget(data)
            self.state = self.scriptDataDoubleEscapedState
        return True

    def beforeAttributeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.stream.charsUntil(spaceCharacters, True)
        elif data in asciiLetters:
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        elif data == ">":
            self.emitCurrentToken()
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data in ("'", '"', "=", "<"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "invalid-character-in-attribute-name"})
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"].append(["\uFFFD", ""])
            self.state = self.attributeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-attribute-name-but-got-eof"})
            self.state = self.dataState
        else:
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        return True

    def attributeNameState(self):
        data = self.stream.char()
        leavingThisState = True
        emitToken = False
        if data == "=":
            self.state = self.beforeAttributeValueState
        elif data in asciiLetters:
            self.currentToken["data"][-1][0] += data +\
                self.stream.charsUntil(asciiLetters, True)
            leavingThisState = False
        elif data == ">":
            # XXX If we emit here the attributes are converted to a dict
            # without being checked and when the code below runs we error
            # because data is a dict not a list
            emitToken = True
        elif data in spaceCharacters:
            self.state = self.afterAttributeNameState
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][0] += "\uFFFD"
            leavingThisState = False
        elif data in ("'", '"', "<"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data":
                                    "invalid-character-in-attribute-name"})
            self.currentToken["data"][-1][0] += data
            leavingThisState = False
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "eof-in-attribute-name"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][0] += data
            leavingThisState = False

        if leavingThisState:
            # Attributes are not dropped at this stage. That happens when the
            # start tag token is emitted so values can still be safely appended
            # to attributes, but we do want to report the parse error in time.
            if self.lowercaseAttrName:
                self.currentToken["data"][-1][0] = (
                    self.currentToken["data"][-1][0].translate(asciiUpper2Lower))
            for name, value in self.currentToken["data"][:-1]:
                if self.currentToken["data"][-1][0] == name:
                    self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                            "duplicate-attribute"})
                    break
            # XXX Fix for above XXX
            if emitToken:
                self.emitCurrentToken()
        return True

    def afterAttributeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.stream.charsUntil(spaceCharacters, True)
        elif data == "=":
            self.state = self.beforeAttributeValueState
        elif data == ">":
            self.emitCurrentToken()
        elif data in asciiLetters:
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"].append(["\uFFFD", ""])
            self.state = self.attributeNameState
        elif data in ("'", '"', "<"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "invalid-character-after-attribute-name"})
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-end-of-tag-but-got-eof"})
            self.state = self.dataState
        else:
            self.currentToken["data"].append([data, ""])
            self.state = self.attributeNameState
        return True

    def beforeAttributeValueState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.stream.charsUntil(spaceCharacters, True)
        elif data == "\"":
            self.state = self.attributeValueDoubleQuotedState
        elif data == "&":
            self.state = self.attributeValueUnQuotedState
            self.stream.unget(data)
        elif data == "'":
            self.state = self.attributeValueSingleQuotedState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-attribute-value-but-got-right-bracket"})
            self.emitCurrentToken()
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][1] += "\uFFFD"
            self.state = self.attributeValueUnQuotedState
        elif data in ("=", "<", "`"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "equals-in-unquoted-attribute-value"})
            self.currentToken["data"][-1][1] += data
            self.state = self.attributeValueUnQuotedState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-attribute-value-but-got-eof"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][1] += data
            self.state = self.attributeValueUnQuotedState
        return True

    def attributeValueDoubleQuotedState(self):
        data = self.stream.char()
        if data == "\"":
            self.state = self.afterAttributeValueState
        elif data == "&":
            self.processEntityInAttribute('"')
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][1] += "\uFFFD"
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-attribute-value-double-quote"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][1] += data +\
                self.stream.charsUntil(("\"", "&", "\u0000"))
        return True

    def attributeValueSingleQuotedState(self):
        data = self.stream.char()
        if data == "'":
            self.state = self.afterAttributeValueState
        elif data == "&":
            self.processEntityInAttribute("'")
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][1] += "\uFFFD"
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-attribute-value-single-quote"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][1] += data +\
                self.stream.charsUntil(("'", "&", "\u0000"))
        return True

    def attributeValueUnQuotedState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeAttributeNameState
        elif data == "&":
            self.processEntityInAttribute(">")
        elif data == ">":
            self.emitCurrentToken()
        elif data in ('"', "'", "=", "<", "`"):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-character-in-unquoted-attribute-value"})
            self.currentToken["data"][-1][1] += data
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"][-1][1] += "\uFFFD"
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-attribute-value-no-quotes"})
            self.state = self.dataState
        else:
            self.currentToken["data"][-1][1] += data + self.stream.charsUntil(
                frozenset(("&", ">", '"', "'", "=", "<", "`", "\u0000")) | spaceCharacters)
        return True

    def afterAttributeValueState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeAttributeNameState
        elif data == ">":
            self.emitCurrentToken()
        elif data == "/":
            self.state = self.selfClosingStartTagState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-EOF-after-attribute-value"})
            self.stream.unget(data)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-character-after-attribute-value"})
            self.stream.unget(data)
            self.state = self.beforeAttributeNameState
        return True

    def selfClosingStartTagState(self):
        data = self.stream.char()
        if data == ">":
            self.currentToken["selfClosing"] = True
            self.emitCurrentToken()
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data":
                                    "unexpected-EOF-after-solidus-in-tag"})
            self.stream.unget(data)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-character-after-solidus-in-tag"})
            self.stream.unget(data)
            self.state = self.beforeAttributeNameState
        return True

    def bogusCommentState(self):
        # Make a new comment token and give it as value all the characters
        # until the first > or EOF (charsUntil checks for EOF automatically)
        # and emit it.
        data = self.stream.charsUntil(">")
        data = data.replace("\u0000", "\uFFFD")
        self.tokenQueue.append(
            {"type": tokenTypes["Comment"], "data": data})

        # Eat the character directly after the bogus comment which is either a
        # ">" or an EOF.
        self.stream.char()
        self.state = self.dataState
        return True

    def markupDeclarationOpenState(self):
        charStack = [self.stream.char()]
        if charStack[-1] == "-":
            charStack.append(self.stream.char())
            if charStack[-1] == "-":
                self.currentToken = {"type": tokenTypes["Comment"], "data": ""}
                self.state = self.commentStartState
                return True
        elif charStack[-1] in ('d', 'D'):
            matched = True
            for expected in (('o', 'O'), ('c', 'C'), ('t', 'T'),
                             ('y', 'Y'), ('p', 'P'), ('e', 'E')):
                charStack.append(self.stream.char())
                if charStack[-1] not in expected:
                    matched = False
                    break
            if matched:
                self.currentToken = {"type": tokenTypes["Doctype"],
                                     "name": "",
                                     "publicId": None, "systemId": None,
                                     "correct": True}
                self.state = self.doctypeState
                return True
        elif (charStack[-1] == "[" and
              self.parser is not None and
              self.parser.tree.openElements and
              self.parser.tree.openElements[-1].namespace != self.parser.tree.defaultNamespace):
            matched = True
            for expected in ["C", "D", "A", "T", "A", "["]:
                charStack.append(self.stream.char())
                if charStack[-1] != expected:
                    matched = False
                    break
            if matched:
                self.state = self.cdataSectionState
                return True

        self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                "expected-dashes-or-doctype"})

        while charStack:
            self.stream.unget(charStack.pop())
        self.state = self.bogusCommentState
        return True

    def commentStartState(self):
        data = self.stream.char()
        if data == "-":
            self.state = self.commentStartDashState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "incorrect-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += data
            self.state = self.commentState
        return True

    def commentStartDashState(self):
        data = self.stream.char()
        if data == "-":
            self.state = self.commentEndState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "-\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "incorrect-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += "-" + data
            self.state = self.commentState
        return True

    def commentState(self):
        data = self.stream.char()
        if data == "-":
            self.state = self.commentEndDashState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "\uFFFD"
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "eof-in-comment"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += data + \
                self.stream.charsUntil(("-", "\u0000"))
        return True

    def commentEndDashState(self):
        data = self.stream.char()
        if data == "-":
            self.state = self.commentEndState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "-\uFFFD"
            self.state = self.commentState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment-end-dash"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += "-" + data
            self.state = self.commentState
        return True

    def commentEndState(self):
        data = self.stream.char()
        if data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "--\uFFFD"
            self.state = self.commentState
        elif data == "!":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-bang-after-double-dash-in-comment"})
            self.state = self.commentEndBangState
        elif data == "-":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-dash-after-double-dash-in-comment"})
            self.currentToken["data"] += data
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment-double-dash"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            # XXX
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-comment"})
            self.currentToken["data"] += "--" + data
            self.state = self.commentState
        return True

    def commentEndBangState(self):
        data = self.stream.char()
        if data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == "-":
            self.currentToken["data"] += "--!"
            self.state = self.commentEndDashState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["data"] += "--!\uFFFD"
            self.state = self.commentState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-comment-end-bang-state"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["data"] += "--!" + data
            self.state = self.commentState
        return True

    def doctypeState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeDoctypeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-doctype-name-but-got-eof"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "need-space-after-doctype"})
            self.stream.unget(data)
            self.state = self.beforeDoctypeNameState
        return True

    def beforeDoctypeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-doctype-name-but-got-right-bracket"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["name"] = "\uFFFD"
            self.state = self.doctypeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-doctype-name-but-got-eof"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["name"] = data
            self.state = self.doctypeNameState
        return True

    def doctypeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
            self.state = self.afterDoctypeNameState
        elif data == ">":
            self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["name"] += "\uFFFD"
            self.state = self.doctypeNameState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype-name"})
            self.currentToken["correct"] = False
            self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["name"] += data
        return True

    def afterDoctypeNameState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.currentToken["correct"] = False
            self.stream.unget(data)
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            if data in ("p", "P"):
                matched = True
                for expected in (("u", "U"), ("b", "B"), ("l", "L"),
                                 ("i", "I"), ("c", "C")):
                    data = self.stream.char()
                    if data not in expected:
                        matched = False
                        break
                if matched:
                    self.state = self.afterDoctypePublicKeywordState
                    return True
            elif data in ("s", "S"):
                matched = True
                for expected in (("y", "Y"), ("s", "S"), ("t", "T"),
                                 ("e", "E"), ("m", "M")):
                    data = self.stream.char()
                    if data not in expected:
                        matched = False
                        break
                if matched:
                    self.state = self.afterDoctypeSystemKeywordState
                    return True

            # All the characters read before the current 'data' will be
            # [a-zA-Z], so they're garbage in the bogus doctype and can be
            # discarded; only the latest character might be '>' or EOF
            # and needs to be ungetted
            self.stream.unget(data)
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "expected-space-or-right-bracket-in-doctype", "datavars":
                                    {"data": data}})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState

        return True

    def afterDoctypePublicKeywordState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeDoctypePublicIdentifierState
        elif data in ("'", '"'):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.stream.unget(data)
            self.state = self.beforeDoctypePublicIdentifierState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.stream.unget(data)
            self.state = self.beforeDoctypePublicIdentifierState
        return True

    def beforeDoctypePublicIdentifierState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == "\"":
            self.currentToken["publicId"] = ""
            self.state = self.doctypePublicIdentifierDoubleQuotedState
        elif data == "'":
            self.currentToken["publicId"] = ""
            self.state = self.doctypePublicIdentifierSingleQuotedState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState
        return True

    def doctypePublicIdentifierDoubleQuotedState(self):
        data = self.stream.char()
        if data == "\"":
            self.state = self.afterDoctypePublicIdentifierState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["publicId"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["publicId"] += data
        return True

    def doctypePublicIdentifierSingleQuotedState(self):
        data = self.stream.char()
        if data == "'":
            self.state = self.afterDoctypePublicIdentifierState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["publicId"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["publicId"] += data
        return True

    def afterDoctypePublicIdentifierState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.betweenDoctypePublicAndSystemIdentifiersState
        elif data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == '"':
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierDoubleQuotedState
        elif data == "'":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierSingleQuotedState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState
        return True

    def betweenDoctypePublicAndSystemIdentifiersState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data == '"':
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierDoubleQuotedState
        elif data == "'":
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierSingleQuotedState
        elif data == EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState
        return True

    def afterDoctypeSystemKeywordState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            self.state = self.beforeDoctypeSystemIdentifierState
        elif data in ("'", '"'):
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.stream.unget(data)
            self.state = self.beforeDoctypeSystemIdentifierState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.stream.unget(data)
            self.state = self.beforeDoctypeSystemIdentifierState
        return True

    def beforeDoctypeSystemIdentifierState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == "\"":
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierDoubleQuotedState
        elif data == "'":
            self.currentToken["systemId"] = ""
            self.state = self.doctypeSystemIdentifierSingleQuotedState
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.currentToken["correct"] = False
            self.state = self.bogusDoctypeState
        return True

    def doctypeSystemIdentifierDoubleQuotedState(self):
        data = self.stream.char()
        if data == "\"":
            self.state = self.afterDoctypeSystemIdentifierState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["systemId"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["systemId"] += data
        return True

    def doctypeSystemIdentifierSingleQuotedState(self):
        data = self.stream.char()
        if data == "'":
            self.state = self.afterDoctypeSystemIdentifierState
        elif data == "\u0000":
            self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                    "data": "invalid-codepoint"})
            self.currentToken["systemId"] += "\uFFFD"
        elif data == ">":
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-end-of-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.currentToken["systemId"] += data
        return True

    def afterDoctypeSystemIdentifierState(self):
        data = self.stream.char()
        if data in spaceCharacters:
            pass
        elif data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "eof-in-doctype"})
            self.currentToken["correct"] = False
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
                                    "unexpected-char-in-doctype"})
            self.state = self.bogusDoctypeState
        return True

    def bogusDoctypeState(self):
        data = self.stream.char()
        if data == ">":
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        elif data is EOF:
            # XXX EMIT
            self.stream.unget(data)
            self.tokenQueue.append(self.currentToken)
            self.state = self.dataState
        else:
            pass
        return True

    def cdataSectionState(self):
        data = []
        while True:
            data.append(self.stream.charsUntil("]"))
            data.append(self.stream.charsUntil(">"))
            char = self.stream.char()
            if char == EOF:
                break
            else:
                assert char == ">"
                if data[-1][-2:] == "]]":
                    data[-1] = data[-1][:-2]
                    break
                else:
                    data.append(char)

        data = "".join(data)
        # Deal with null here rather than in the parser
        nullCount = data.count("\u0000")
        if nullCount > 0:
            for i in range(nullCount):
                self.tokenQueue.append({"type": tokenTypes["ParseError"],
                                        "data": "invalid-codepoint"})
            data = data.replace("\u0000", "\uFFFD")
        if data:
            self.tokenQueue.append({"type": tokenTypes["Characters"],
                                    "data": data})
        self.state = self.dataState
        return True
python3.4/site-packages/pip/_vendor/html5lib/inputstream.py000064400000073654151735047530017754 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

import codecs
import re

from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
from .constants import encodings, ReparseException
from . import utils

from io import StringIO

try:
    from io import BytesIO
except ImportError:
    BytesIO = StringIO

try:
    from io import BufferedIOBase
except ImportError:
    class BufferedIOBase(object):
        pass

# Non-unicode versions of constants for use in the pre-parser
spaceCharactersBytes = frozenset([item.encode("ascii") for item in spaceCharacters])
asciiLettersBytes = frozenset([item.encode("ascii") for item in asciiLetters])
asciiUppercaseBytes = frozenset([item.encode("ascii") for item in asciiUppercase])
spacesAngleBrackets = spaceCharactersBytes | frozenset([b">", b"<"])

invalid_unicode_re = re.compile("[\u0001-\u0008\u000B\u000E-\u001F\u007F-\u009F\uD800-\uDFFF\uFDD0-\uFDEF\uFFFE\uFFFF\U0001FFFE\U0001FFFF\U0002FFFE\U0002FFFF\U0003FFFE\U0003FFFF\U0004FFFE\U0004FFFF\U0005FFFE\U0005FFFF\U0006FFFE\U0006FFFF\U0007FFFE\U0007FFFF\U0008FFFE\U0008FFFF\U0009FFFE\U0009FFFF\U000AFFFE\U000AFFFF\U000BFFFE\U000BFFFF\U000CFFFE\U000CFFFF\U000DFFFE\U000DFFFF\U000EFFFE\U000EFFFF\U000FFFFE\U000FFFFF\U0010FFFE\U0010FFFF]")

non_bmp_invalid_codepoints = set([0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE,
                                  0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE, 0x5FFFF,
                                  0x6FFFE, 0x6FFFF, 0x7FFFE, 0x7FFFF, 0x8FFFE,
                                  0x8FFFF, 0x9FFFE, 0x9FFFF, 0xAFFFE, 0xAFFFF,
                                  0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE,
                                  0xDFFFF, 0xEFFFE, 0xEFFFF, 0xFFFFE, 0xFFFFF,
                                  0x10FFFE, 0x10FFFF])

ascii_punctuation_re = re.compile("[\u0009-\u000D\u0020-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]")

# Cache for charsUntil()
charsUntilRegEx = {}


class BufferedStream(object):
    """Buffering for streams that do not have buffering of their own

    The buffer is implemented as a list of chunks on the assumption that
    joining many strings will be slow since it is O(n**2)
    """

    def __init__(self, stream):
        self.stream = stream
        self.buffer = []
        self.position = [-1, 0]  # chunk number, offset

    def tell(self):
        pos = 0
        for chunk in self.buffer[:self.position[0]]:
            pos += len(chunk)
        pos += self.position[1]
        return pos

    def seek(self, pos):
        assert pos <= self._bufferedBytes()
        offset = pos
        i = 0
        while len(self.buffer[i]) < offset:
            offset -= len(self.buffer[i])
            i += 1
        self.position = [i, offset]

    def read(self, bytes):
        if not self.buffer:
            return self._readStream(bytes)
        elif (self.position[0] == len(self.buffer) and
              self.position[1] == len(self.buffer[-1])):
            return self._readStream(bytes)
        else:
            return self._readFromBuffer(bytes)

    def _bufferedBytes(self):
        return sum([len(item) for item in self.buffer])

    def _readStream(self, bytes):
        data = self.stream.read(bytes)
        self.buffer.append(data)
        self.position[0] += 1
        self.position[1] = len(data)
        return data

    def _readFromBuffer(self, bytes):
        remainingBytes = bytes
        rv = []
        bufferIndex = self.position[0]
        bufferOffset = self.position[1]
        while bufferIndex < len(self.buffer) and remainingBytes != 0:
            assert remainingBytes > 0
            bufferedData = self.buffer[bufferIndex]

            if remainingBytes <= len(bufferedData) - bufferOffset:
                bytesToRead = remainingBytes
                self.position = [bufferIndex, bufferOffset + bytesToRead]
            else:
                bytesToRead = len(bufferedData) - bufferOffset
                self.position = [bufferIndex, len(bufferedData)]
                bufferIndex += 1
            rv.append(bufferedData[bufferOffset:bufferOffset + bytesToRead])
            remainingBytes -= bytesToRead

            bufferOffset = 0

        if remainingBytes:
            rv.append(self._readStream(remainingBytes))

        return b"".join(rv)


def HTMLInputStream(source, encoding=None, parseMeta=True, chardet=True):
    if hasattr(source, "read"):
        isUnicode = isinstance(source.read(0), text_type)
    else:
        isUnicode = isinstance(source, text_type)

    if isUnicode:
        if encoding is not None:
            raise TypeError("Cannot explicitly set an encoding with a unicode string")

        return HTMLUnicodeInputStream(source)
    else:
        return HTMLBinaryInputStream(source, encoding, parseMeta, chardet)


class HTMLUnicodeInputStream(object):
    """Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    """

    _defaultChunkSize = 10240

    def __init__(self, source):
        """Initialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        """

        # Craziness
        if len("\U0010FFFF") == 1:
            self.reportCharacterErrors = self.characterErrorsUCS4
            self.replaceCharactersRegexp = re.compile("[\uD800-\uDFFF]")
        else:
            self.reportCharacterErrors = self.characterErrorsUCS2
            self.replaceCharactersRegexp = re.compile("([\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF])")

        # List of where new lines occur
        self.newLines = [0]

        self.charEncoding = ("utf-8", "certain")
        self.dataStream = self.openStream(source)

        self.reset()

    def reset(self):
        self.chunk = ""
        self.chunkSize = 0
        self.chunkOffset = 0
        self.errors = []

        # number of (complete) lines in previous chunks
        self.prevNumLines = 0
        # number of columns in the last line of the previous chunk
        self.prevNumCols = 0

        # Deal with CR LF and surrogates split over chunk boundaries
        self._bufferedCharacter = None

    def openStream(self, source):
        """Produces a file object from source.

        source can be either a file object, local filename or a string.

        """
        # Already a file object
        if hasattr(source, 'read'):
            stream = source
        else:
            stream = StringIO(source)

        return stream

    def _position(self, offset):
        chunk = self.chunk
        nLines = chunk.count('\n', 0, offset)
        positionLine = self.prevNumLines + nLines
        lastLinePos = chunk.rfind('\n', 0, offset)
        if lastLinePos == -1:
            positionColumn = self.prevNumCols + offset
        else:
            positionColumn = offset - (lastLinePos + 1)
        return (positionLine, positionColumn)

    def position(self):
        """Returns (line, col) of the current position in the stream."""
        line, col = self._position(self.chunkOffset)
        return (line + 1, col)

    def char(self):
        """ Read one character from the stream or queue if available. Return
            EOF when EOF is reached.
        """
        # Read a new chunk from the input stream if necessary
        if self.chunkOffset >= self.chunkSize:
            if not self.readChunk():
                return EOF

        chunkOffset = self.chunkOffset
        char = self.chunk[chunkOffset]
        self.chunkOffset = chunkOffset + 1

        return char

    def readChunk(self, chunkSize=None):
        if chunkSize is None:
            chunkSize = self._defaultChunkSize

        self.prevNumLines, self.prevNumCols = self._position(self.chunkSize)

        self.chunk = ""
        self.chunkSize = 0
        self.chunkOffset = 0

        data = self.dataStream.read(chunkSize)

        # Deal with CR LF and surrogates broken across chunks
        if self._bufferedCharacter:
            data = self._bufferedCharacter + data
            self._bufferedCharacter = None
        elif not data:
            # We have no more data, bye-bye stream
            return False

        if len(data) > 1:
            lastv = ord(data[-1])
            if lastv == 0x0D or 0xD800 <= lastv <= 0xDBFF:
                self._bufferedCharacter = data[-1]
                data = data[:-1]

        self.reportCharacterErrors(data)

        # Replace invalid characters
        # Note U+0000 is dealt with in the tokenizer
        data = self.replaceCharactersRegexp.sub("\ufffd", data)

        data = data.replace("\r\n", "\n")
        data = data.replace("\r", "\n")

        self.chunk = data
        self.chunkSize = len(data)

        return True

    def characterErrorsUCS4(self, data):
        for i in range(len(invalid_unicode_re.findall(data))):
            self.errors.append("invalid-codepoint")

    def characterErrorsUCS2(self, data):
        # Someone picked the wrong compile option
        # You lose
        skip = False
        for match in invalid_unicode_re.finditer(data):
            if skip:
                continue
            codepoint = ord(match.group())
            pos = match.start()
            # Pretty sure there should be endianness issues here
            if utils.isSurrogatePair(data[pos:pos + 2]):
                # We have a surrogate pair!
                char_val = utils.surrogatePairToCodepoint(data[pos:pos + 2])
                if char_val in non_bmp_invalid_codepoints:
                    self.errors.append("invalid-codepoint")
                skip = True
            elif (codepoint >= 0xD800 and codepoint <= 0xDFFF and
                  pos == len(data) - 1):
                self.errors.append("invalid-codepoint")
            else:
                skip = False
                self.errors.append("invalid-codepoint")

    def charsUntil(self, characters, opposite=False):
        """ Returns a string of characters from the stream up to but not
        including any character in 'characters' or EOF. 'characters' must be
        a container that supports the 'in' method and iteration over its
        characters.
        """

        # Use a cache of regexps to find the required characters
        try:
            chars = charsUntilRegEx[(characters, opposite)]
        except KeyError:
            if __debug__:
                for c in characters:
                    assert(ord(c) < 128)
            regex = "".join(["\\x%02x" % ord(c) for c in characters])
            if not opposite:
                regex = "^%s" % regex
            chars = charsUntilRegEx[(characters, opposite)] = re.compile("[%s]+" % regex)

        rv = []

        while True:
            # Find the longest matching prefix
            m = chars.match(self.chunk, self.chunkOffset)
            if m is None:
                # If nothing matched, and it wasn't because we ran out of chunk,
                # then stop
                if self.chunkOffset != self.chunkSize:
                    break
            else:
                end = m.end()
                # If not the whole chunk matched, return everything
                # up to the part that didn't match
                if end != self.chunkSize:
                    rv.append(self.chunk[self.chunkOffset:end])
                    self.chunkOffset = end
                    break
            # If the whole remainder of the chunk matched,
            # use it all and read the next chunk
            rv.append(self.chunk[self.chunkOffset:])
            if not self.readChunk():
                # Reached EOF
                break

        r = "".join(rv)
        return r

    def unget(self, char):
        # Only one character is allowed to be ungotten at once - it must
        # be consumed again before any further call to unget
        if char is not None:
            if self.chunkOffset == 0:
                # unget is called quite rarely, so it's a good idea to do
                # more work here if it saves a bit of work in the frequently
                # called char and charsUntil.
                # So, just prepend the ungotten character onto the current
                # chunk:
                self.chunk = char + self.chunk
                self.chunkSize += 1
            else:
                self.chunkOffset -= 1
                assert self.chunk[self.chunkOffset] == char


class HTMLBinaryInputStream(HTMLUnicodeInputStream):
    """Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    """

    def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
        """Initialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        """
        # Raw Stream - for unicode objects this will encode to utf-8 and set
        #              self.charEncoding as appropriate
        self.rawStream = self.openStream(source)

        HTMLUnicodeInputStream.__init__(self, self.rawStream)

        self.charEncoding = (codecName(encoding), "certain")

        # Encoding Information
        # Number of bytes to use when looking for a meta element with
        # encoding information
        self.numBytesMeta = 512
        # Number of bytes to use when using detecting encoding using chardet
        self.numBytesChardet = 100
        # Encoding to use if no other information can be found
        self.defaultEncoding = "windows-1252"

        # Detect encoding iff no explicit "transport level" encoding is supplied
        if (self.charEncoding[0] is None):
            self.charEncoding = self.detectEncoding(parseMeta, chardet)

        # Call superclass
        self.reset()

    def reset(self):
        self.dataStream = codecs.getreader(self.charEncoding[0])(self.rawStream,
                                                                 'replace')
        HTMLUnicodeInputStream.reset(self)

    def openStream(self, source):
        """Produces a file object from source.

        source can be either a file object, local filename or a string.

        """
        # Already a file object
        if hasattr(source, 'read'):
            stream = source
        else:
            stream = BytesIO(source)

        try:
            stream.seek(stream.tell())
        except:
            stream = BufferedStream(stream)

        return stream

    def detectEncoding(self, parseMeta=True, chardet=True):
        # First look for a BOM
        # This will also read past the BOM if present
        encoding = self.detectBOM()
        confidence = "certain"
        # If there is no BOM need to look for meta elements with encoding
        # information
        if encoding is None and parseMeta:
            encoding = self.detectEncodingMeta()
            confidence = "tentative"
        # Guess with chardet, if avaliable
        if encoding is None and chardet:
            confidence = "tentative"
            try:
                try:
                    from charade.universaldetector import UniversalDetector
                except ImportError:
                    from chardet.universaldetector import UniversalDetector
                buffers = []
                detector = UniversalDetector()
                while not detector.done:
                    buffer = self.rawStream.read(self.numBytesChardet)
                    assert isinstance(buffer, bytes)
                    if not buffer:
                        break
                    buffers.append(buffer)
                    detector.feed(buffer)
                detector.close()
                encoding = detector.result['encoding']
                self.rawStream.seek(0)
            except ImportError:
                pass
        # If all else fails use the default encoding
        if encoding is None:
            confidence = "tentative"
            encoding = self.defaultEncoding

        # Substitute for equivalent encodings:
        encodingSub = {"iso-8859-1": "windows-1252"}

        if encoding.lower() in encodingSub:
            encoding = encodingSub[encoding.lower()]

        return encoding, confidence

    def changeEncoding(self, newEncoding):
        assert self.charEncoding[1] != "certain"
        newEncoding = codecName(newEncoding)
        if newEncoding in ("utf-16", "utf-16-be", "utf-16-le"):
            newEncoding = "utf-8"
        if newEncoding is None:
            return
        elif newEncoding == self.charEncoding[0]:
            self.charEncoding = (self.charEncoding[0], "certain")
        else:
            self.rawStream.seek(0)
            self.reset()
            self.charEncoding = (newEncoding, "certain")
            raise ReparseException("Encoding changed from %s to %s" % (self.charEncoding[0], newEncoding))

    def detectBOM(self):
        """Attempts to detect at BOM at the start of the stream. If
        an encoding can be determined from the BOM return the name of the
        encoding otherwise return None"""
        bomDict = {
            codecs.BOM_UTF8: 'utf-8',
            codecs.BOM_UTF16_LE: 'utf-16-le', codecs.BOM_UTF16_BE: 'utf-16-be',
            codecs.BOM_UTF32_LE: 'utf-32-le', codecs.BOM_UTF32_BE: 'utf-32-be'
        }

        # Go to beginning of file and read in 4 bytes
        string = self.rawStream.read(4)
        assert isinstance(string, bytes)

        # Try detecting the BOM using bytes from the string
        encoding = bomDict.get(string[:3])         # UTF-8
        seek = 3
        if not encoding:
            # Need to detect UTF-32 before UTF-16
            encoding = bomDict.get(string)         # UTF-32
            seek = 4
            if not encoding:
                encoding = bomDict.get(string[:2])  # UTF-16
                seek = 2

        # Set the read position past the BOM if one was found, otherwise
        # set it to the start of the stream
        self.rawStream.seek(encoding and seek or 0)

        return encoding

    def detectEncodingMeta(self):
        """Report the encoding declared by the meta element
        """
        buffer = self.rawStream.read(self.numBytesMeta)
        assert isinstance(buffer, bytes)
        parser = EncodingParser(buffer)
        self.rawStream.seek(0)
        encoding = parser.getEncoding()

        if encoding in ("utf-16", "utf-16-be", "utf-16-le"):
            encoding = "utf-8"

        return encoding


class EncodingBytes(bytes):
    """String-like object with an associated position and various extra methods
    If the position is ever greater than the string length then an exception is
    raised"""
    def __new__(self, value):
        assert isinstance(value, bytes)
        return bytes.__new__(self, value.lower())

    def __init__(self, value):
        self._position = -1

    def __iter__(self):
        return self

    def __next__(self):
        p = self._position = self._position + 1
        if p >= len(self):
            raise StopIteration
        elif p < 0:
            raise TypeError
        return self[p:p + 1]

    def next(self):
        # Py2 compat
        return self.__next__()

    def previous(self):
        p = self._position
        if p >= len(self):
            raise StopIteration
        elif p < 0:
            raise TypeError
        self._position = p = p - 1
        return self[p:p + 1]

    def setPosition(self, position):
        if self._position >= len(self):
            raise StopIteration
        self._position = position

    def getPosition(self):
        if self._position >= len(self):
            raise StopIteration
        if self._position >= 0:
            return self._position
        else:
            return None

    position = property(getPosition, setPosition)

    def getCurrentByte(self):
        return self[self.position:self.position + 1]

    currentByte = property(getCurrentByte)

    def skip(self, chars=spaceCharactersBytes):
        """Skip past a list of characters"""
        p = self.position               # use property for the error-checking
        while p < len(self):
            c = self[p:p + 1]
            if c not in chars:
                self._position = p
                return c
            p += 1
        self._position = p
        return None

    def skipUntil(self, chars):
        p = self.position
        while p < len(self):
            c = self[p:p + 1]
            if c in chars:
                self._position = p
                return c
            p += 1
        self._position = p
        return None

    def matchBytes(self, bytes):
        """Look for a sequence of bytes at the start of a string. If the bytes
        are found return True and advance the position to the byte after the
        match. Otherwise return False and leave the position alone"""
        p = self.position
        data = self[p:p + len(bytes)]
        rv = data.startswith(bytes)
        if rv:
            self.position += len(bytes)
        return rv

    def jumpTo(self, bytes):
        """Look for the next sequence of bytes matching a given sequence. If
        a match is found advance the position to the last byte of the match"""
        newPosition = self[self.position:].find(bytes)
        if newPosition > -1:
            # XXX: This is ugly, but I can't see a nicer way to fix this.
            if self._position == -1:
                self._position = 0
            self._position += (newPosition + len(bytes) - 1)
            return True
        else:
            raise StopIteration


class EncodingParser(object):
    """Mini parser for detecting character encoding from meta elements"""

    def __init__(self, data):
        """string - the data to work on for encoding detection"""
        self.data = EncodingBytes(data)
        self.encoding = None

    def getEncoding(self):
        methodDispatch = (
            (b"<!--", self.handleComment),
            (b"<meta", self.handleMeta),
            (b"</", self.handlePossibleEndTag),
            (b"<!", self.handleOther),
            (b"<?", self.handleOther),
            (b"<", self.handlePossibleStartTag))
        for byte in self.data:
            keepParsing = True
            for key, method in methodDispatch:
                if self.data.matchBytes(key):
                    try:
                        keepParsing = method()
                        break
                    except StopIteration:
                        keepParsing = False
                        break
            if not keepParsing:
                break

        return self.encoding

    def handleComment(self):
        """Skip over comments"""
        return self.data.jumpTo(b"-->")

    def handleMeta(self):
        if self.data.currentByte not in spaceCharactersBytes:
            # if we have <meta not followed by a space so just keep going
            return True
        # We have a valid meta element we want to search for attributes
        hasPragma = False
        pendingEncoding = None
        while True:
            # Try to find the next attribute after the current position
            attr = self.getAttribute()
            if attr is None:
                return True
            else:
                if attr[0] == b"http-equiv":
                    hasPragma = attr[1] == b"content-type"
                    if hasPragma and pendingEncoding is not None:
                        self.encoding = pendingEncoding
                        return False
                elif attr[0] == b"charset":
                    tentativeEncoding = attr[1]
                    codec = codecName(tentativeEncoding)
                    if codec is not None:
                        self.encoding = codec
                        return False
                elif attr[0] == b"content":
                    contentParser = ContentAttrParser(EncodingBytes(attr[1]))
                    tentativeEncoding = contentParser.parse()
                    if tentativeEncoding is not None:
                        codec = codecName(tentativeEncoding)
                        if codec is not None:
                            if hasPragma:
                                self.encoding = codec
                                return False
                            else:
                                pendingEncoding = codec

    def handlePossibleStartTag(self):
        return self.handlePossibleTag(False)

    def handlePossibleEndTag(self):
        next(self.data)
        return self.handlePossibleTag(True)

    def handlePossibleTag(self, endTag):
        data = self.data
        if data.currentByte not in asciiLettersBytes:
            # If the next byte is not an ascii letter either ignore this
            # fragment (possible start tag case) or treat it according to
            # handleOther
            if endTag:
                data.previous()
                self.handleOther()
            return True

        c = data.skipUntil(spacesAngleBrackets)
        if c == b"<":
            # return to the first step in the overall "two step" algorithm
            # reprocessing the < byte
            data.previous()
        else:
            # Read all attributes
            attr = self.getAttribute()
            while attr is not None:
                attr = self.getAttribute()
        return True

    def handleOther(self):
        return self.data.jumpTo(b">")

    def getAttribute(self):
        """Return a name,value pair for the next attribute in the stream,
        if one is found, or None"""
        data = self.data
        # Step 1 (skip chars)
        c = data.skip(spaceCharactersBytes | frozenset([b"/"]))
        assert c is None or len(c) == 1
        # Step 2
        if c in (b">", None):
            return None
        # Step 3
        attrName = []
        attrValue = []
        # Step 4 attribute name
        while True:
            if c == b"=" and attrName:
                break
            elif c in spaceCharactersBytes:
                # Step 6!
                c = data.skip()
                break
            elif c in (b"/", b">"):
                return b"".join(attrName), b""
            elif c in asciiUppercaseBytes:
                attrName.append(c.lower())
            elif c is None:
                return None
            else:
                attrName.append(c)
            # Step 5
            c = next(data)
        # Step 7
        if c != b"=":
            data.previous()
            return b"".join(attrName), b""
        # Step 8
        next(data)
        # Step 9
        c = data.skip()
        # Step 10
        if c in (b"'", b'"'):
            # 10.1
            quoteChar = c
            while True:
                # 10.2
                c = next(data)
                # 10.3
                if c == quoteChar:
                    next(data)
                    return b"".join(attrName), b"".join(attrValue)
                # 10.4
                elif c in asciiUppercaseBytes:
                    attrValue.append(c.lower())
                # 10.5
                else:
                    attrValue.append(c)
        elif c == b">":
            return b"".join(attrName), b""
        elif c in asciiUppercaseBytes:
            attrValue.append(c.lower())
        elif c is None:
            return None
        else:
            attrValue.append(c)
        # Step 11
        while True:
            c = next(data)
            if c in spacesAngleBrackets:
                return b"".join(attrName), b"".join(attrValue)
            elif c in asciiUppercaseBytes:
                attrValue.append(c.lower())
            elif c is None:
                return None
            else:
                attrValue.append(c)


class ContentAttrParser(object):
    def __init__(self, data):
        assert isinstance(data, bytes)
        self.data = data

    def parse(self):
        try:
            # Check if the attr name is charset
            # otherwise return
            self.data.jumpTo(b"charset")
            self.data.position += 1
            self.data.skip()
            if not self.data.currentByte == b"=":
                # If there is no = sign keep looking for attrs
                return None
            self.data.position += 1
            self.data.skip()
            # Look for an encoding between matching quote marks
            if self.data.currentByte in (b'"', b"'"):
                quoteMark = self.data.currentByte
                self.data.position += 1
                oldPosition = self.data.position
                if self.data.jumpTo(quoteMark):
                    return self.data[oldPosition:self.data.position]
                else:
                    return None
            else:
                # Unquoted value
                oldPosition = self.data.position
                try:
                    self.data.skipUntil(spaceCharactersBytes)
                    return self.data[oldPosition:self.data.position]
                except StopIteration:
                    # Return the whole remaining value
                    return self.data[oldPosition:]
        except StopIteration:
            return None


def codecName(encoding):
    """Return the python codec name corresponding to an encoding or None if the
    string doesn't correspond to a valid encoding."""
    if isinstance(encoding, bytes):
        try:
            encoding = encoding.decode("ascii")
        except UnicodeDecodeError:
            return None
    if encoding:
        canonicalName = ascii_punctuation_re.sub("", encoding).lower()
        return encodings.get(canonicalName, None)
    else:
        return None
python3.4/site-packages/pip/_vendor/html5lib/serializer/__pycache__/__init__.cpython-34.pyc000064400000001261151735047530025554 0ustar00�
�Re��@sUddlmZmZmZddlmZddlmZdddd	d
�ZdS)�)�absolute_import�division�unicode_literals�)�treewalkers�)�HTMLSerializer�etree�htmlNcKsLtj|�}|dkr*t|�}ntd��|j||�|�S)Nr
ztype must be html)r�
getTreeWalkerr�
ValueError�render)�input�tree�format�encoding�serializer_opts�walker�s�r�C/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/serializer/__init__.py�	serializes
r)	�
__future__rrr�r�htmlserializerrrrrrr�<module>spython3.4/site-packages/pip/_vendor/html5lib/serializer/__pycache__/htmlserializer.cpython-34.pyc000064400000023025151735047530027055 0ustar00�
�Rem2�@s$ddlmZmZmZddlmZddlZejZyddlm	Z	Wne
k
riYnXddlmZm
Z
mZddlmZmZmZddlmZdd	lmZd
je�ZyddlmZmZWne
k
rdZYn�Xd
ZiZed�dkZx�eej��D]�\Z Z!er[ee!�dks7erzee!�dkrzq7ne!dkr7ee!�dkr�ej"e!�Z!ne#e!�Z!e!eks�e j$�r�e ee!<q�q7q7Wdd�Z%eee%�[Gdd�de&�Z'dd�Z(dS)�)�absolute_import�division�unicode_literals)�	text_typeN)�reduce�)�voidElements�booleanAttributes�spaceCharacters)�rcdataElements�entities�xmlEntities)�utils)�escape�)�register_error�xmlcharrefreplace_errors�strict�htmlentityreplaceu􏿿��&c
Cs�t|ttf�r�g}g}d}x�t|j|j|j��D]�\}}|red}qGn||j}tj|j|t	|j|dg���r�tj
|j||d��}d}nt|�}|j|�qGWx�|D]x}t
j|�}	|	rE|jd�|j|	�|	jd�sf|jd�qfq�|jdt|�dd��q�Wdj|�|jfSt|�SdS)NFrTr�;z&#x%s;r)�
isinstance�UnicodeEncodeError�UnicodeTranslateError�	enumerate�object�start�endr�isSurrogatePair�min�surrogatePairToCodepoint�ord�append�encode_entity_map�get�endswith�hex�joinr)
�exc�res�
codepoints�skip�i�c�index�	codepoint�cp�e�r3�I/tmp/pip-ztkk0jow-build/pip/_vendor/html5lib/serializer/htmlserializer.py�htmlentityreplace_errors*s0,
/ 	


%r5c@s�eZdZdZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZd Zdd�Zdd�Zdd�Zddd�Zddd�Zddd�ZdS)!�HTMLSerializerF�"T�quote_attr_values�
quote_char�use_best_quote_char�omit_optional_tags�minimize_boolean_attributes�use_trailing_solidus�space_before_trailing_solidus�escape_lt_in_attrs�
escape_rcdata�resolve_entities�alphabetical_attributes�inject_meta_charset�strip_whitespace�sanitizec	Ksgd|krd|_nx6|jD]+}t|||j|t||���q"Wg|_d|_dS)a�Initialize HTMLSerializer.

        Keyword options (default given first unless specified) include:

        inject_meta_charset=True|False
          Whether it insert a meta element to define the character set of the
          document.
        quote_attr_values=True|False
          Whether to quote attribute values that don't require quoting
          per HTML5 parsing rules.
        quote_char=u'"'|u"'"
          Use given quote character for attribute quoting. Default is to
          use double quote unless attribute value contains a double quote,
          in which case single quotes are used instead.
        escape_lt_in_attrs=False|True
          Whether to escape < in attribute values.
        escape_rcdata=False|True
          Whether to escape characters that need to be escaped within normal
          elements within rcdata elements such as style.
        resolve_entities=True|False
          Whether to resolve named character entities that appear in the
          source tree. The XML predefined entities &lt; &gt; &amp; &quot; &apos;
          are unaffected by this setting.
        strip_whitespace=False|True
          Whether to remove semantically meaningless whitespace. (This
          compresses all whitespace to a single space except within pre.)
        minimize_boolean_attributes=True|False
          Shortens boolean attributes to give just the attribute value,
          for example <input disabled="disabled"> becomes <input disabled>.
        use_trailing_solidus=False|True
          Includes a close-tag slash at the end of the start tag of void
          elements (empty elements whose end tag is forbidden). E.g. <hr/>.
        space_before_trailing_solidus=True|False
          Places a space immediately before the closing slash in a tag
          using a trailing solidus. E.g. <hr />. Requires use_trailing_solidus.
        sanitize=False|True
          Strip all unsafe or unknown constructs from output.
          See `html5lib user documentation`_
        omit_optional_tags=True|False
          Omit start/end tags that are optional.
        alphabetical_attributes=False|True
          Reorder attributes to be in alphabetical order.

        .. _html5lib user documentation: http://code.google.com/p/html5lib/wiki/UserDocumentation
        r9FN)r:�options�setattrr%�getattr�errorsr)�self�kwargs�attrr3r3r4�__init__ks.)	zHTMLSerializer.__init__cCs9t|t�st�|jr1|j|jt�S|SdS)N)rr�AssertionError�encoding�encode�unicode_encode_errors)rJ�stringr3r3r4rP�s	zHTMLSerializer.encodecCs9t|t�st�|jr1|j|jd�S|SdS)Nr)rrrNrOrP)rJrRr3r3r4�encodeStrict�s	zHTMLSerializer.encodeStrictNc#sI||_d}g|_|rI|jrIddlm}|||�}n|jrqddlm}||�}n|jr�ddlm}||�}n|j	r�ddl
m}||�}n|jr�ddlm}||�}nxY|D]Q}|d}|dkr�d|d}|dr9|d	|d7}n|d
rP|d7}n|d
r�|d
j
d�d
kr�|d
j
d�d
kr�|jtd��nd}nd}|d||d
|f7}n|d7}|j|�Vq�|d4krm|dks|rR|r=|dj
d�d
kr=|jtd��n|j|d�VqA|jt|d��Vq�|d5kr�|d}	|jd|	�V|	tkr�|jr�d}n|r�|jtd��nx�|dj�D]�\\}
}}|}
|�|jd�V|j|
�V|js[|
tj|	t��kr�|
tjdt��kr�|jd�V|jsy�r�d}n"t�fdd �td!d�}�jd"d#��|jr��jd$d%��n|r�|j}|j r1d�kr
d�kr
d}q1d�kr1d�kr1d}q1n|dkrR�jdd&��n�jdd'��|j|�V|j��V|j|�Vq�|j��Vq�q�W|	t!kr�|j"r�|j#r�|jd(�Vq�|jd)�Vn|jd�Vq�|d*krS|d}	|	tkr"d}n|r>|jtd��n|jd+|	�Vq�|d,kr�|d}|j
d-�d
kr�|jtd.��n|jd/|d�Vq�|d0kr0|d}	|	d1}|t$kr�|jtd2|	��n|j%r|t&krt$|}n
d3|	}|j|�Vq�|j|d�q�WdS)6NFr)�Filter�type�Doctypez<!DOCTYPE %s�name�publicIdz PUBLIC "%s"�systemIdz SYSTEMr7r�'zASystem identifer contains both single and double quote charactersz %s%s%s�>�
Characters�SpaceCharacters�dataz</zUnexpected </ in CDATA�StartTag�EmptyTagz<%sTz+Unexpected child element of a CDATA element� r�=cs|p|�kS)Nr3)�x�y)�vr3r4�<lambda>�sz*HTMLSerializer.serialize.<locals>.<lambda>z>"'=rz&amp;�<z&lt;z&#39;z&quot;z /�/�EndTagz</%s>�Commentz--zComment contains --z	<!--%s-->�EntityrzEntity %s not recognizedz&%s;)z
CharacterszSpaceCharacters)zStartTagzEmptyTag)'rOrIrC�filters.inject_meta_charsetrTrD�filters.whitespacerE�filters.sanitizerr;�filters.optionaltagsrB�filters.alphabeticalattributes�find�serializeError�_rSrPrrr@�itemsr<r	r%�tupler8rr
�replacer?r9r:rr=r>rrAr
)rJ�
treewalkerrO�in_cdatarT�tokenrU�doctyper9rW�attr_namespace�	attr_name�
attr_value�k�
quote_attrr^�keyr3)rer4�	serialize�s�						





	

	#
						
	




zHTMLSerializer.serializecCsE|r%djt|j||���Sdjt|j|���SdS)N�r)r(�listr�)rJrwrOr3r3r4�render1szHTMLSerializer.renderzXXX ERROR MESSAGE NEEDEDcCs&|jj|�|jr"t�ndS)N)rIr#r�SerializeError)rJr^r3r3r4rr7s	zHTMLSerializer.serializeError)zquote_attr_valuesz
quote_charzuse_best_quote_charzomit_optional_tagszminimize_boolean_attributeszuse_trailing_soliduszspace_before_trailing_soliduszescape_lt_in_attrsz
escape_rcdatazresolve_entitieszalphabetical_attributeszinject_meta_charsetzstrip_whitespacezsanitize)�__name__�
__module__�__qualname__r8r9r:r;r<r=r>r?r@rArBrCrDrErFrMrPrSr�r�rrr3r3r3r4r6Ls45�r6cCsdS)zError in serialized treeNr3)�	Exceptionr3r3r4r�>sr�))�
__future__rrrZpip._vendor.sixr�gettextrs�	functoolsr�ImportError�	constantsrr	r
rrr
rr�xml.sax.saxutilsrr(�codecsrrrQr$�len�is_ucs4r�rtr~rer!r"�islowerr5rr6r�r3r3r3r4�<module>sD	


�python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py000064400000000752151735047530021276 0ustar00from __future__ import absolute_import, division, unicode_literals

from .. import treewalkers

from .htmlserializer import HTMLSerializer


def serialize(input, tree="etree", format="html", encoding=None,
              **serializer_opts):
    # XXX: Should we cache this?
    walker = treewalkers.getTreeWalker(tree)
    if format == "html":
        s = HTMLSerializer(**serializer_opts)
    else:
        raise ValueError("type must be html")
    return s.render(walker(input), encoding)
python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py000064400000031155151735047530022576 0ustar00from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type

import gettext
_ = gettext.gettext

try:
    from functools import reduce
except ImportError:
    pass

from ..constants import voidElements, booleanAttributes, spaceCharacters
from ..constants import rcdataElements, entities, xmlEntities
from .. import utils
from xml.sax.saxutils import escape

spaceCharacters = "".join(spaceCharacters)

try:
    from codecs import register_error, xmlcharrefreplace_errors
except ImportError:
    unicode_encode_errors = "strict"
else:
    unicode_encode_errors = "htmlentityreplace"

    encode_entity_map = {}
    is_ucs4 = len("\U0010FFFF") == 1
    for k, v in list(entities.items()):
        # skip multi-character entities
        if ((is_ucs4 and len(v) > 1) or
                (not is_ucs4 and len(v) > 2)):
            continue
        if v != "&":
            if len(v) == 2:
                v = utils.surrogatePairToCodepoint(v)
            else:
                v = ord(v)
            if not v in encode_entity_map or k.islower():
                # prefer &lt; over &LT; and similarly for &amp;, &gt;, etc.
                encode_entity_map[v] = k

    def htmlentityreplace_errors(exc):
        if isinstance(exc, (UnicodeEncodeError, UnicodeTranslateError)):
            res = []
            codepoints = []
            skip = False
            for i, c in enumerate(exc.object[exc.start:exc.end]):
                if skip:
                    skip = False
                    continue
                index = i + exc.start
                if utils.isSurrogatePair(exc.object[index:min([exc.end, index + 2])]):
                    codepoint = utils.surrogatePairToCodepoint(exc.object[index:index + 2])
                    skip = True
                else:
                    codepoint = ord(c)
                codepoints.append(codepoint)
            for cp in codepoints:
                e = encode_entity_map.get(cp)
                if e:
                    res.append("&")
                    res.append(e)
                    if not e.endswith(";"):
                        res.append(";")
                else:
                    res.append("&#x%s;" % (hex(cp)[2:]))
            return ("".join(res), exc.end)
        else:
            return xmlcharrefreplace_errors(exc)

    register_error(unicode_encode_errors, htmlentityreplace_errors)

    del register_error


class HTMLSerializer(object):

    # attribute quoting options
    quote_attr_values = False
    quote_char = '"'
    use_best_quote_char = True

    # tag syntax options
    omit_optional_tags = True
    minimize_boolean_attributes = True
    use_trailing_solidus = False
    space_before_trailing_solidus = True

    # escaping options
    escape_lt_in_attrs = False
    escape_rcdata = False
    resolve_entities = True

    # miscellaneous options
    alphabetical_attributes = False
    inject_meta_charset = True
    strip_whitespace = False
    sanitize = False

    options = ("quote_attr_values", "quote_char", "use_best_quote_char",
               "omit_optional_tags", "minimize_boolean_attributes",
               "use_trailing_solidus", "space_before_trailing_solidus",
               "escape_lt_in_attrs", "escape_rcdata", "resolve_entities",
               "alphabetical_attributes", "inject_meta_charset",
               "strip_whitespace", "sanitize")

    def __init__(self, **kwargs):
        """Initialize HTMLSerializer.

        Keyword options (default given first unless specified) include:

        inject_meta_charset=True|False
          Whether it insert a meta element to define the character set of the
          document.
        quote_attr_values=True|False
          Whether to quote attribute values that don't require quoting
          per HTML5 parsing rules.
        quote_char=u'"'|u"'"
          Use given quote character for attribute quoting. Default is to
          use double quote unless attribute value contains a double quote,
          in which case single quotes are used instead.
        escape_lt_in_attrs=False|True
          Whether to escape < in attribute values.
        escape_rcdata=False|True
          Whether to escape characters that need to be escaped within normal
          elements within rcdata elements such as style.
        resolve_entities=True|False
          Whether to resolve named character entities that appear in the
          source tree. The XML predefined entities &lt; &gt; &amp; &quot; &apos;
          are unaffected by this setting.
        strip_whitespace=False|True
          Whether to remove semantically meaningless whitespace. (This
          compresses all whitespace to a single space except within pre.)
        minimize_boolean_attributes=True|False
          Shortens boolean attributes to give just the attribute value,
          for example <input disabled="disabled"> becomes <input disabled>.
        use_trailing_solidus=False|True
          Includes a close-tag slash at the end of the start tag of void
          elements (empty elements whose end tag is forbidden). E.g. <hr/>.
        space_before_trailing_solidus=True|False
          Places a space immediately before the closing slash in a tag
          using a trailing solidus. E.g. <hr />. Requires use_trailing_solidus.
        sanitize=False|True
          Strip all unsafe or unknown constructs from output.
          See `html5lib user documentation`_
        omit_optional_tags=True|False
          Omit start/end tags that are optional.
        alphabetical_attributes=False|True
          Reorder attributes to be in alphabetical order.

        .. _html5lib user documentation: http://code.google.com/p/html5lib/wiki/UserDocumentation
        """
        if 'quote_char' in kwargs:
            self.use_best_quote_char = False
        for attr in self.options:
            setattr(self, attr, kwargs.get(attr, getattr(self, attr)))
        self.errors = []
        self.strict = False

    def encode(self, string):
        assert(isinstance(string, text_type))
        if self.encoding:
            return string.encode(self.encoding, unicode_encode_errors)
        else:
            return string

    def encodeStrict(self, string):
        assert(isinstance(string, text_type))
        if self.encoding:
            return string.encode(self.encoding, "strict")
        else:
            return string

    def serialize(self, treewalker, encoding=None):
        self.encoding = encoding
        in_cdata = False
        self.errors = []

        if encoding and self.inject_meta_charset:
            from ..filters.inject_meta_charset import Filter
            treewalker = Filter(treewalker, encoding)
        # WhitespaceFilter should be used before OptionalTagFilter
        # for maximum efficiently of this latter filter
        if self.strip_whitespace:
            from ..filters.whitespace import Filter
            treewalker = Filter(treewalker)
        if self.sanitize:
            from ..filters.sanitizer import Filter
            treewalker = Filter(treewalker)
        if self.omit_optional_tags:
            from ..filters.optionaltags import Filter
            treewalker = Filter(treewalker)
        # Alphabetical attributes must be last, as other filters
        # could add attributes and alter the order
        if self.alphabetical_attributes:
            from ..filters.alphabeticalattributes import Filter
            treewalker = Filter(treewalker)

        for token in treewalker:
            type = token["type"]
            if type == "Doctype":
                doctype = "<!DOCTYPE %s" % token["name"]

                if token["publicId"]:
                    doctype += ' PUBLIC "%s"' % token["publicId"]
                elif token["systemId"]:
                    doctype += " SYSTEM"
                if token["systemId"]:
                    if token["systemId"].find('"') >= 0:
                        if token["systemId"].find("'") >= 0:
                            self.serializeError(_("System identifer contains both single and double quote characters"))
                        quote_char = "'"
                    else:
                        quote_char = '"'
                    doctype += " %s%s%s" % (quote_char, token["systemId"], quote_char)

                doctype += ">"
                yield self.encodeStrict(doctype)

            elif type in ("Characters", "SpaceCharacters"):
                if type == "SpaceCharacters" or in_cdata:
                    if in_cdata and token["data"].find("</") >= 0:
                        self.serializeError(_("Unexpected </ in CDATA"))
                    yield self.encode(token["data"])
                else:
                    yield self.encode(escape(token["data"]))

            elif type in ("StartTag", "EmptyTag"):
                name = token["name"]
                yield self.encodeStrict("<%s" % name)
                if name in rcdataElements and not self.escape_rcdata:
                    in_cdata = True
                elif in_cdata:
                    self.serializeError(_("Unexpected child element of a CDATA element"))
                for (attr_namespace, attr_name), attr_value in token["data"].items():
                    # TODO: Add namespace support here
                    k = attr_name
                    v = attr_value
                    yield self.encodeStrict(' ')

                    yield self.encodeStrict(k)
                    if not self.minimize_boolean_attributes or \
                        (k not in booleanAttributes.get(name, tuple())
                         and k not in booleanAttributes.get("", tuple())):
                        yield self.encodeStrict("=")
                        if self.quote_attr_values or not v:
                            quote_attr = True
                        else:
                            quote_attr = reduce(lambda x, y: x or (y in v),
                                                spaceCharacters + ">\"'=", False)
                        v = v.replace("&", "&amp;")
                        if self.escape_lt_in_attrs:
                            v = v.replace("<", "&lt;")
                        if quote_attr:
                            quote_char = self.quote_char
                            if self.use_best_quote_char:
                                if "'" in v and '"' not in v:
                                    quote_char = '"'
                                elif '"' in v and "'" not in v:
                                    quote_char = "'"
                            if quote_char == "'":
                                v = v.replace("'", "&#39;")
                            else:
                                v = v.replace('"', "&quot;")
                            yield self.encodeStrict(quote_char)
                            yield self.encode(v)
                            yield self.encodeStrict(quote_char)
                        else:
                            yield self.encode(v)
                if name in voidElements and self.use_trailing_solidus:
                    if self.space_before_trailing_solidus:
                        yield self.encodeStrict(" /")
                    else:
                        yield self.encodeStrict("/")
                yield self.encode(">")

            elif type == "EndTag":
                name = token["name"]
                if name in rcdataElements:
                    in_cdata = False
                elif in_cdata:
                    self.serializeError(_("Unexpected child element of a CDATA element"))
                yield self.encodeStrict("</%s>" % name)

            elif type == "Comment":
                data = token["data"]
                if data.find("--") >= 0:
                    self.serializeError(_("Comment contains --"))
                yield self.encodeStrict("<!--%s-->" % token["data"])

            elif type == "Entity":
                name = token["name"]
                key = name + ";"
                if not key in entities:
                    self.serializeError(_("Entity %s not recognized" % name))
                if self.resolve_entities and key not in xmlEntities:
                    data = entities[key]
                else:
                    data = "&%s;" % name
                yield self.encodeStrict(data)

            else:
                self.serializeError(token["data"])

    def render(self, treewalker, encoding=None):
        if encoding:
            return b"".join(list(self.serialize(treewalker, encoding)))
        else:
            return "".join(list(self.serialize(treewalker)))

    def serializeError(self, data="XXX ERROR MESSAGE NEEDED"):
        # XXX The idea is to make data mandatory.
        self.errors.append(data)
        if self.strict:
            raise SerializeError


def SerializeError(Exception):
    """Error in serialized tree"""
    pass
python3.4/site-packages/pip/_vendor/html5lib/utils.py000064400000004761151735047530016532 0ustar00from __future__ import absolute_import, division, unicode_literals

from types import ModuleType

try:
    import xml.etree.cElementTree as default_etree
except ImportError:
    import xml.etree.ElementTree as default_etree


__all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair",
           "surrogatePairToCodepoint", "moduleFactoryFactory"]


class MethodDispatcher(dict):
    """Dict with 2 special properties:

    On initiation, keys that are lists, sets or tuples are converted to
    multiple keys so accessing any one of the items in the original
    list-like object returns the matching value

    md = MethodDispatcher({("foo", "bar"):"baz"})
    md["foo"] == "baz"

    A default value which can be set through the default attribute.
    """

    def __init__(self, items=()):
        # Using _dictEntries instead of directly assigning to self is about
        # twice as fast. Please do careful performance testing before changing
        # anything here.
        _dictEntries = []
        for name, value in items:
            if type(name) in (list, tuple, frozenset, set):
                for item in name:
                    _dictEntries.append((item, value))
            else:
                _dictEntries.append((name, value))
        dict.__init__(self, _dictEntries)
        self.default = None

    def __getitem__(self, key):
        return dict.get(self, key, self.default)


# Some utility functions to dal with weirdness around UCS2 vs UCS4
# python builds

def isSurrogatePair(data):
    return (len(data) == 2 and
            ord(data[0]) >= 0xD800 and ord(data[0]) <= 0xDBFF and
            ord(data[1]) >= 0xDC00 and ord(data[1]) <= 0xDFFF)


def surrogatePairToCodepoint(data):
    char_val = (0x10000 + (ord(data[0]) - 0xD800) * 0x400 +
                (ord(data[1]) - 0xDC00))
    return char_val

# Module Factory Factory (no, this isn't Java, I know)
# Here to stop this being duplicated all over the place.


def moduleFactoryFactory(factory):
    moduleCache = {}

    def moduleFactory(baseModule, *args, **kwargs):
        if isinstance(ModuleType.__name__, type("")):
            name = "_%s_factory" % baseModule.__name__
        else:
            name = b"_%s_factory" % baseModule.__name__

        if name in moduleCache:
            return moduleCache[name]
        else:
            mod = ModuleType(name)
            objs = factory(baseModule, *args, **kwargs)
            mod.__dict__.update(objs)
            moduleCache[name] = mod
            return mod

    return moduleFactory
python3.4/site-packages/pip/_vendor/requests/compat.py000064400000004774151735047530017014 0ustar00# -*- coding: utf-8 -*-

"""
pythoncompat
"""

from .packages import chardet

import sys

# -------
# Pythons
# -------

# Syntax sugar.
_ver = sys.version_info

#: Python 2.x?
is_py2 = (_ver[0] == 2)

#: Python 3.x?
is_py3 = (_ver[0] == 3)

#: Python 3.0.x
is_py30 = (is_py3 and _ver[1] == 0)

#: Python 3.1.x
is_py31 = (is_py3 and _ver[1] == 1)

#: Python 3.2.x
is_py32 = (is_py3 and _ver[1] == 2)

#: Python 3.3.x
is_py33 = (is_py3 and _ver[1] == 3)

#: Python 3.4.x
is_py34 = (is_py3 and _ver[1] == 4)

#: Python 2.7.x
is_py27 = (is_py2 and _ver[1] == 7)

#: Python 2.6.x
is_py26 = (is_py2 and _ver[1] == 6)

#: Python 2.5.x
is_py25 = (is_py2 and _ver[1] == 5)

#: Python 2.4.x
is_py24 = (is_py2 and _ver[1] == 4)   # I'm assuming this is not by choice.


# ---------
# Platforms
# ---------


# Syntax sugar.
_ver = sys.version.lower()

is_pypy = ('pypy' in _ver)
is_jython = ('jython' in _ver)
is_ironpython = ('iron' in _ver)

# Assume CPython, if nothing else.
is_cpython = not any((is_pypy, is_jython, is_ironpython))

# Windows-based system.
is_windows = 'win32' in str(sys.platform).lower()

# Standard Linux 2+ system.
is_linux = ('linux' in str(sys.platform).lower())
is_osx = ('darwin' in str(sys.platform).lower())
is_hpux = ('hpux' in str(sys.platform).lower())   # Complete guess.
is_solaris = ('solar==' in str(sys.platform).lower())   # Complete guess.

try:
    import simplejson as json
except ImportError:
    import json

# ---------
# Specifics
# ---------

if is_py2:
    from urllib import quote, unquote, quote_plus, unquote_plus, urlencode, getproxies, proxy_bypass
    from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag
    from urllib2 import parse_http_list
    import cookielib
    from Cookie import Morsel
    from StringIO import StringIO
    from .packages.urllib3.packages.ordered_dict import OrderedDict
    from httplib import IncompleteRead

    builtin_str = str
    bytes = str
    str = unicode
    basestring = basestring
    numeric_types = (int, long, float)


elif is_py3:
    from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag
    from urllib.request import parse_http_list, getproxies, proxy_bypass
    from http import cookiejar as cookielib
    from http.cookies import Morsel
    from io import StringIO
    from collections import OrderedDict
    from http.client import IncompleteRead

    builtin_str = str
    str = str
    bytes = bytes
    basestring = (str, bytes)
    numeric_types = (int, float)
python3.4/site-packages/pip/_vendor/requests/certs.py000064400000001040151735047530016630 0ustar00#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
certs.py
~~~~~~~~

This module returns the preferred default CA certificate bundle.

If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.
"""

import os.path


def where():
    """Return the preferred certificate bundle."""
    # vendored bundle inside Requests
    return os.path.join(os.path.dirname(__file__), 'cacert.pem')

if __name__ == '__main__':
    print(where())
python3.4/site-packages/pip/_vendor/requests/models.py000064400000063504151735047530017010 0ustar00# -*- coding: utf-8 -*-

"""
requests.models
~~~~~~~~~~~~~~~

This module contains the primary objects that power Requests.
"""

import collections
import datetime

from io import BytesIO, UnsupportedOperation
from .hooks import default_hooks
from .structures import CaseInsensitiveDict

from .auth import HTTPBasicAuth
from .cookies import cookiejar_from_dict, get_cookie_header
from .packages.urllib3.fields import RequestField
from .packages.urllib3.filepost import encode_multipart_formdata
from .packages.urllib3.util import parse_url
from .packages.urllib3.exceptions import DecodeError
from .exceptions import (
    HTTPError, RequestException, MissingSchema, InvalidURL,
    ChunkedEncodingError, ContentDecodingError)
from .utils import (
    guess_filename, get_auth_from_url, requote_uri,
    stream_decode_response_unicode, to_key_val_list, parse_header_links,
    iter_slices, guess_json_utf, super_len, to_native_string)
from .compat import (
    cookielib, urlunparse, urlsplit, urlencode, str, bytes, StringIO,
    is_py2, chardet, json, builtin_str, basestring, IncompleteRead)
from .status_codes import codes

#: The set of HTTP status codes that indicate an automatically
#: processable redirect.
REDIRECT_STATI = (
    codes.moved,  # 301
    codes.found,  # 302
    codes.other,  # 303
    codes.temporary_moved,  # 307
)
DEFAULT_REDIRECT_LIMIT = 30
CONTENT_CHUNK_SIZE = 10 * 1024
ITER_CHUNK_SIZE = 512


class RequestEncodingMixin(object):
    @property
    def path_url(self):
        """Build the path URL to use."""

        url = []

        p = urlsplit(self.url)

        path = p.path
        if not path:
            path = '/'

        url.append(path)

        query = p.query
        if query:
            url.append('?')
            url.append(query)

        return ''.join(url)

    @staticmethod
    def _encode_params(data):
        """Encode parameters in a piece of data.

        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        """

        if isinstance(data, (str, bytes)):
            return data
        elif hasattr(data, 'read'):
            return data
        elif hasattr(data, '__iter__'):
            result = []
            for k, vs in to_key_val_list(data):
                if isinstance(vs, basestring) or not hasattr(vs, '__iter__'):
                    vs = [vs]
                for v in vs:
                    if v is not None:
                        result.append(
                            (k.encode('utf-8') if isinstance(k, str) else k,
                             v.encode('utf-8') if isinstance(v, str) else v))
            return urlencode(result, doseq=True)
        else:
            return data

    @staticmethod
    def _encode_files(files, data):
        """Build the body for a multipart/form-data request.

        Will successfully encode files when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.

        """
        if (not files):
            raise ValueError("Files must be provided.")
        elif isinstance(data, basestring):
            raise ValueError("Data must not be a string.")

        new_fields = []
        fields = to_key_val_list(data or {})
        files = to_key_val_list(files or {})

        for field, val in fields:
            if isinstance(val, basestring) or not hasattr(val, '__iter__'):
                val = [val]
            for v in val:
                if v is not None:
                    # Don't call str() on bytestrings: in Py3 it all goes wrong.
                    if not isinstance(v, bytes):
                        v = str(v)

                    new_fields.append(
                        (field.decode('utf-8') if isinstance(field, bytes) else field,
                         v.encode('utf-8') if isinstance(v, str) else v))

        for (k, v) in files:
            # support for explicit filename
            ft = None
            fh = None
            if isinstance(v, (tuple, list)):
                if len(v) == 2:
                    fn, fp = v
                elif len(v) == 3:
                    fn, fp, ft = v
                else:
                    fn, fp, ft, fh = v
            else:
                fn = guess_filename(v) or k
                fp = v
            if isinstance(fp, str):
                fp = StringIO(fp)
            if isinstance(fp, bytes):
                fp = BytesIO(fp)

            rf = RequestField(name=k, data=fp.read(),
                              filename=fn, headers=fh)
            rf.make_multipart(content_type=ft)
            new_fields.append(rf)

        body, content_type = encode_multipart_formdata(new_fields)

        return body, content_type


class RequestHooksMixin(object):
    def register_hook(self, event, hook):
        """Properly register a hook."""

        if event not in self.hooks:
            raise ValueError('Unsupported event specified, with event name "%s"' % (event))

        if isinstance(hook, collections.Callable):
            self.hooks[event].append(hook)
        elif hasattr(hook, '__iter__'):
            self.hooks[event].extend(h for h in hook if isinstance(h, collections.Callable))

    def deregister_hook(self, event, hook):
        """Deregister a previously registered hook.
        Returns True if the hook existed, False if not.
        """

        try:
            self.hooks[event].remove(hook)
            return True
        except ValueError:
            return False


class Request(RequestHooksMixin):
    """A user-created :class:`Request <Request>` object.

    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach the request. If a dictionary is provided, form-encoding will take place.
    :param params: dictionary of URL parameters to append to the URL.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'http://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>

    """
    def __init__(self,
        method=None,
        url=None,
        headers=None,
        files=None,
        data=None,
        params=None,
        auth=None,
        cookies=None,
        hooks=None):

        # Default empty dicts for dict params.
        data = [] if data is None else data
        files = [] if files is None else files
        headers = {} if headers is None else headers
        params = {} if params is None else params
        hooks = {} if hooks is None else hooks

        self.hooks = default_hooks()
        for (k, v) in list(hooks.items()):
            self.register_hook(event=k, hook=v)

        self.method = method
        self.url = url
        self.headers = headers
        self.files = files
        self.data = data
        self.params = params
        self.auth = auth
        self.cookies = cookies

    def __repr__(self):
        return '<Request [%s]>' % (self.method)

    def prepare(self):
        """Constructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it."""
        p = PreparedRequest()
        p.prepare(
            method=self.method,
            url=self.url,
            headers=self.headers,
            files=self.files,
            data=self.data,
            params=self.params,
            auth=self.auth,
            cookies=self.cookies,
            hooks=self.hooks,
        )
        return p


class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
    """The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.

    Generated from either a :class:`Request <Request>` object or manually.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'http://httpbin.org/get')
      >>> r = req.prepare()
      <PreparedRequest [GET]>

      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>

    """

    def __init__(self):
        #: HTTP verb to send to the server.
        self.method = None
        #: HTTP URL to send the request to.
        self.url = None
        #: dictionary of HTTP headers.
        self.headers = None
        # The `CookieJar` used to create the Cookie header will be stored here
        # after prepare_cookies is called
        self._cookies = None
        #: request body to send to the server.
        self.body = None
        #: dictionary of callback hooks, for internal usage.
        self.hooks = default_hooks()

    def prepare(self, method=None, url=None, headers=None, files=None,
                data=None, params=None, auth=None, cookies=None, hooks=None):
        """Prepares the entire request with the given parameters."""

        self.prepare_method(method)
        self.prepare_url(url, params)
        self.prepare_headers(headers)
        self.prepare_cookies(cookies)
        self.prepare_body(data, files)
        self.prepare_auth(auth, url)
        # Note that prepare_auth must be last to enable authentication schemes
        # such as OAuth to work on a fully prepared request.

        # This MUST go after prepare_auth. Authenticators could add a hook
        self.prepare_hooks(hooks)

    def __repr__(self):
        return '<PreparedRequest [%s]>' % (self.method)

    def copy(self):
        p = PreparedRequest()
        p.method = self.method
        p.url = self.url
        p.headers = self.headers.copy()
        p._cookies = self._cookies.copy()
        p.body = self.body
        p.hooks = self.hooks
        return p

    def prepare_method(self, method):
        """Prepares the given HTTP method."""
        self.method = method
        if self.method is not None:
            self.method = self.method.upper()

    def prepare_url(self, url, params):
        """Prepares the given HTTP URL."""
        #: Accept objects that have string representations.
        try:
            url = unicode(url)
        except NameError:
            # We're on Python 3.
            url = str(url)
        except UnicodeDecodeError:
            pass

        # Don't do any URL preparation for oddball schemes
        if ':' in url and not url.lower().startswith('http'):
            self.url = url
            return

        # Support for unicode domain names and paths.
        scheme, auth, host, port, path, query, fragment = parse_url(url)

        if not scheme:
            raise MissingSchema("Invalid URL {0!r}: No schema supplied. "
                                "Perhaps you meant http://{0}?".format(url))

        if not host:
            raise InvalidURL("Invalid URL %r: No host supplied" % url)

        # Only want to apply IDNA to the hostname
        try:
            host = host.encode('idna').decode('utf-8')
        except UnicodeError:
            raise InvalidURL('URL has an invalid label.')

        # Carefully reconstruct the network location
        netloc = auth or ''
        if netloc:
            netloc += '@'
        netloc += host
        if port:
            netloc += ':' + str(port)

        # Bare domains aren't valid URLs.
        if not path:
            path = '/'

        if is_py2:
            if isinstance(scheme, str):
                scheme = scheme.encode('utf-8')
            if isinstance(netloc, str):
                netloc = netloc.encode('utf-8')
            if isinstance(path, str):
                path = path.encode('utf-8')
            if isinstance(query, str):
                query = query.encode('utf-8')
            if isinstance(fragment, str):
                fragment = fragment.encode('utf-8')

        enc_params = self._encode_params(params)
        if enc_params:
            if query:
                query = '%s&%s' % (query, enc_params)
            else:
                query = enc_params

        url = requote_uri(urlunparse([scheme, netloc, path, None, query, fragment]))
        self.url = url

    def prepare_headers(self, headers):
        """Prepares the given HTTP headers."""

        if headers:
            self.headers = CaseInsensitiveDict((to_native_string(name), value) for name, value in headers.items())
        else:
            self.headers = CaseInsensitiveDict()

    def prepare_body(self, data, files):
        """Prepares the given HTTP body data."""

        # Check if file, fo, generator, iterator.
        # If not, run through normal process.

        # Nottin' on you.
        body = None
        content_type = None
        length = None

        is_stream = all([
            hasattr(data, '__iter__'),
            not isinstance(data, (basestring, list, tuple, dict))
        ])

        try:
            length = super_len(data)
        except (TypeError, AttributeError, UnsupportedOperation):
            length = None

        if is_stream:
            body = data

            if files:
                raise NotImplementedError('Streamed bodies and files are mutually exclusive.')

            if length is not None:
                self.headers['Content-Length'] = builtin_str(length)
            else:
                self.headers['Transfer-Encoding'] = 'chunked'
        else:
            # Multi-part file uploads.
            if files:
                (body, content_type) = self._encode_files(files, data)
            else:
                if data:
                    body = self._encode_params(data)
                    if isinstance(data, str) or isinstance(data, builtin_str) or hasattr(data, 'read'):
                        content_type = None
                    else:
                        content_type = 'application/x-www-form-urlencoded'

            self.prepare_content_length(body)

            # Add content-type if it wasn't explicitly provided.
            if (content_type) and (not 'content-type' in self.headers):
                self.headers['Content-Type'] = content_type

        self.body = body

    def prepare_content_length(self, body):
        if hasattr(body, 'seek') and hasattr(body, 'tell'):
            body.seek(0, 2)
            self.headers['Content-Length'] = builtin_str(body.tell())
            body.seek(0, 0)
        elif body is not None:
            l = super_len(body)
            if l:
                self.headers['Content-Length'] = builtin_str(l)
        elif self.method not in ('GET', 'HEAD'):
            self.headers['Content-Length'] = '0'

    def prepare_auth(self, auth, url=''):
        """Prepares the given HTTP auth data."""

        # If no Auth is explicitly provided, extract it from the URL first.
        if auth is None:
            url_auth = get_auth_from_url(self.url)
            auth = url_auth if any(url_auth) else None

        if auth:
            if isinstance(auth, tuple) and len(auth) == 2:
                # special-case basic HTTP auth
                auth = HTTPBasicAuth(*auth)

            # Allow auth to make its changes.
            r = auth(self)

            # Update self to reflect the auth changes.
            self.__dict__.update(r.__dict__)

            # Recompute Content-Length
            self.prepare_content_length(self.body)

    def prepare_cookies(self, cookies):
        """Prepares the given HTTP cookie data."""

        if isinstance(cookies, cookielib.CookieJar):
            self._cookies = cookies
        else:
            self._cookies = cookiejar_from_dict(cookies)

        cookie_header = get_cookie_header(self._cookies, self)
        if cookie_header is not None:
            self.headers['Cookie'] = cookie_header

    def prepare_hooks(self, hooks):
        """Prepares the given hooks."""
        for event in hooks:
            self.register_hook(event, hooks[event])


class Response(object):
    """The :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    """

    __attrs__ = [
        '_content',
        'status_code',
        'headers',
        'url',
        'history',
        'encoding',
        'reason',
        'cookies',
        'elapsed',
        'request',
    ]

    def __init__(self):
        super(Response, self).__init__()

        self._content = False
        self._content_consumed = False

        #: Integer Code of responded HTTP Status, e.g. 404 or 200.
        self.status_code = None

        #: Case-insensitive Dictionary of Response Headers.
        #: For example, ``headers['content-encoding']`` will return the
        #: value of a ``'Content-Encoding'`` response header.
        self.headers = CaseInsensitiveDict()

        #: File-like object representation of response (for advanced usage).
        #: Use of ``raw`` requires that ``stream=True`` be set on the request.
        # This requirement does not apply for use internally to Requests.
        self.raw = None

        #: Final URL location of Response.
        self.url = None

        #: Encoding to decode with when accessing r.text.
        self.encoding = None

        #: A list of :class:`Response <Response>` objects from
        #: the history of the Request. Any redirect responses will end
        #: up here. The list is sorted from the oldest to the most recent request.
        self.history = []

        #: Textual reason of responded HTTP Status, e.g. "Not Found" or "OK".
        self.reason = None

        #: A CookieJar of Cookies the server sent back.
        self.cookies = cookiejar_from_dict({})

        #: The amount of time elapsed between sending the request
        #: and the arrival of the response (as a timedelta)
        self.elapsed = datetime.timedelta(0)

    def __getstate__(self):
        # Consume everything; accessing the content attribute makes
        # sure the content has been fully read.
        if not self._content_consumed:
            self.content

        return dict(
            (attr, getattr(self, attr, None))
            for attr in self.__attrs__
        )

    def __setstate__(self, state):
        for name, value in state.items():
            setattr(self, name, value)

        # pickled objects do not have .raw
        setattr(self, '_content_consumed', True)
        setattr(self, 'raw', None)

    def __repr__(self):
        return '<Response [%s]>' % (self.status_code)

    def __bool__(self):
        """Returns true if :attr:`status_code` is 'OK'."""
        return self.ok

    def __nonzero__(self):
        """Returns true if :attr:`status_code` is 'OK'."""
        return self.ok

    def __iter__(self):
        """Allows you to use a response as an iterator."""
        return self.iter_content(128)

    @property
    def ok(self):
        try:
            self.raise_for_status()
        except RequestException:
            return False
        return True

    @property
    def is_redirect(self):
        """True if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        """
        return ('location' in self.headers and self.status_code in REDIRECT_STATI)

    @property
    def apparent_encoding(self):
        """The apparent encoding, provided by the chardet library"""
        return chardet.detect(self.content)['encoding']

    def iter_content(self, chunk_size=1, decode_unicode=False):
        """Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        """
        def generate():
            try:
                # Special case for urllib3.
                try:
                    for chunk in self.raw.stream(chunk_size, decode_content=True):
                        yield chunk
                except IncompleteRead as e:
                    raise ChunkedEncodingError(e)
                except DecodeError as e:
                    raise ContentDecodingError(e)
            except AttributeError:
                # Standard file-like object.
                while True:
                    chunk = self.raw.read(chunk_size)
                    if not chunk:
                        break
                    yield chunk

            self._content_consumed = True

        # simulate reading small chunks of the content
        reused_chunks = iter_slices(self._content, chunk_size)

        stream_chunks = generate()

        chunks = reused_chunks if self._content_consumed else stream_chunks

        if decode_unicode:
            chunks = stream_decode_response_unicode(chunks, self)

        return chunks

    def iter_lines(self, chunk_size=ITER_CHUNK_SIZE, decode_unicode=None):
        """Iterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.
        """

        pending = None

        for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode):

            if pending is not None:
                chunk = pending + chunk
            lines = chunk.splitlines()

            if lines and lines[-1] and chunk and lines[-1][-1] == chunk[-1]:
                pending = lines.pop()
            else:
                pending = None

            for line in lines:
                yield line

        if pending is not None:
            yield pending

    @property
    def content(self):
        """Content of the response, in bytes."""

        if self._content is False:
            # Read the contents.
            try:
                if self._content_consumed:
                    raise RuntimeError(
                        'The content for this response was already consumed')

                if self.status_code == 0:
                    self._content = None
                else:
                    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()

            except AttributeError:
                self._content = None

        self._content_consumed = True
        # don't need to release the connection; that's been handled by urllib3
        # since we exhausted the data.
        return self._content

    @property
    def text(self):
        """Content of the response, in unicode.

        If Response.encoding is None, encoding will be guessed using
        ``chardet``.

        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        """

        # Try charset from content-type
        content = None
        encoding = self.encoding

        if not self.content:
            return str('')

        # Fallback to auto-detected encoding.
        if self.encoding is None:
            encoding = self.apparent_encoding

        # Decode unicode from given encoding.
        try:
            content = str(self.content, encoding, errors='replace')
        except (LookupError, TypeError):
            # A LookupError is raised if the encoding was not found which could
            # indicate a misspelling or similar mistake.
            #
            # A TypeError can be raised if encoding is None
            #
            # So we try blindly encoding.
            content = str(self.content, errors='replace')

        return content

    def json(self, **kwargs):
        """Returns the json-encoded content of a response, if any.

        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        """

        if not self.encoding and len(self.content) > 3:
            # No encoding set. JSON RFC 4627 section 3 states we should expect
            # UTF-8, -16 or -32. Detect which one to use; If the detection or
            # decoding fails, fall back to `self.text` (using chardet to make
            # a best guess).
            encoding = guess_json_utf(self.content)
            if encoding is not None:
                try:
                    return json.loads(self.content.decode(encoding), **kwargs)
                except UnicodeDecodeError:
                    # Wrong UTF codec detected; usually because it's not UTF-8
                    # but some other 8-bit codec.  This is an RFC violation,
                    # and the server didn't bother to tell us what codec *was*
                    # used.
                    pass
        return json.loads(self.text, **kwargs)

    @property
    def links(self):
        """Returns the parsed header links of the response, if any."""

        header = self.headers.get('link')

        # l = MultiDict()
        l = {}

        if header:
            links = parse_header_links(header)

            for link in links:
                key = link.get('rel') or link.get('url')
                l[key] = link

        return l

    def raise_for_status(self):
        """Raises stored :class:`HTTPError`, if one occurred."""

        http_error_msg = ''

        if 400 <= self.status_code < 500:
            http_error_msg = '%s Client Error: %s' % (self.status_code, self.reason)

        elif 500 <= self.status_code < 600:
            http_error_msg = '%s Server Error: %s' % (self.status_code, self.reason)

        if http_error_msg:
            raise HTTPError(http_error_msg, response=self)

    def close(self):
        """Releases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.

        *Note: Should not normally need to be called explicitly.*
        """
        return self.raw.release_conn()
python3.4/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-34.pyc000064400000001313151735047530023115 0ustar00�
�Re �@s>dZddlZdd�Zedkr:ee��ndS)a
certs.py
~~~~~~~~

This module returns the preferred default CA certificate bundle.

If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.
�NcCstjjtjjt�d�S)z(Return the preferred certificate bundle.z
cacert.pem)�os�path�join�dirname�__file__�rr�5/tmp/pip-ztkk0jow-build/pip/_vendor/requests/certs.py�wheresr	�__main__)�__doc__�os.pathrr	�__name__�printrrrr�<module>
spython3.4/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-34.pyc000064400000043257151735047530023446 0ustar00�
�Re.A�
@s:dZddlZddlZddlmZmZmZmZyddlZeWne	k
rtddl
ZYnXGdd�de�ZGdd�de�Z
d	d
�Zdd�Zddd
d�ZGdd�de�ZGdd�dejej�Zdd�Zdd�Zdddd�Zdd�ZdS)z�
Compatibility code to be able to use `cookielib.CookieJar` with requests.

requests.utils imports from here, so be careful with imports.
�N�)�	cookielib�urlparse�
urlunparse�Morselc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
ddd�Zdd�Zdd�Z
dd�Zedd��Zedd��Zedd��ZdS)�MockRequesta�Wraps a `requests.Request` to mimic a `urllib2.Request`.

    The code in `cookielib.CookieJar` expects this interface in order to correctly
    manage cookie policies, i.e., determine whether a cookie can be set, given the
    domains of the request and the cookie.

    The original request object is read-only. The client is responsible for collecting
    the new headers via `get_new_headers()` and interpreting them appropriately. You
    probably want `get_cookie_header`, defined below.
    cCs.||_i|_t|jj�j|_dS)N)�_r�_new_headersr�url�scheme�type)�self�request�r�7/tmp/pip-ztkk0jow-build/pip/_vendor/requests/cookies.py�__init__!s		zMockRequest.__init__cCs|jS)N)r)r
rrr�get_type&szMockRequest.get_typecCst|jj�jS)N)rrr
�netloc)r
rrr�get_host)szMockRequest.get_hostcCs
|j�S)N)r)r
rrr�get_origin_req_host,szMockRequest.get_origin_req_hostcCsl|jjjd�s|jjS|jjd}t|jj�}t|j||j|j|j	|j
g�S)N�Host)r�headers�getr
rrr�path�params�query�fragment)r
�host�parsedrrr�get_full_url/s
zMockRequest.get_full_urlcCsdS)NTr)r
rrr�is_unverifiable=szMockRequest.is_unverifiablecCs||jjkp||jkS)N)rrr	)r
�namerrr�
has_header@szMockRequest.has_headerNcCs%|jjj||jj||��S)N)rrrr	)r
r!�defaultrrr�
get_headerCszMockRequest.get_headercCstd��dS)zMcookielib has no legitimate use for this method; add it back if you find one.z=Cookie headers should be added with add_unredirected_header()N)�NotImplementedError)r
�key�valrrr�
add_headerFszMockRequest.add_headercCs||j|<dS)N)r	)r
r!�valuerrr�add_unredirected_headerJsz#MockRequest.add_unredirected_headercCs|jS)N)r	)r
rrr�get_new_headersMszMockRequest.get_new_headerscCs
|j�S)N)r )r
rrr�unverifiablePszMockRequest.unverifiablecCs
|j�S)N)r)r
rrr�origin_req_hostTszMockRequest.origin_req_hostcCs
|j�S)N)r)r
rrrrXszMockRequest.host)�__name__�
__module__�__qualname__�__doc__rrrrrr r"r$r(r*r+�propertyr,r-rrrrrrs
rc@s:eZdZdZdd�Zdd�Zdd�ZdS)	�MockResponsez�Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.

    ...what? Basically, expose the parsed HTTP headers from the server response
    the way `cookielib` expects to see them.
    cCs
||_dS)z�Make a MockResponse for `cookielib` to read.

        :param headers: a httplib.HTTPMessage or analogous carrying the headers
        N)�_headers)r
rrrrrdszMockResponse.__init__cCs|jS)N)r4)r
rrr�infokszMockResponse.infocCs|jj|�dS)N)r4�
getheaders)r
r!rrrr6nszMockResponse.getheadersN)r.r/r0r1rr5r6rrrrr3]sr3cCsNt|d�o|jsdSt|�}t|jj�}|j||�dS)z�Extract the cookies from the response into a CookieJar.

    :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)
    :param request: our own requests.Request object
    :param response: urllib3.HTTPResponse object
    �_original_responseN)�hasattrr7rr3�msg�extract_cookies)�jarr�response�req�resrrr�extract_cookies_to_jarrs	r?cCs,t|�}|j|�|j�jd�S)zOProduce an appropriate Cookie header string to be sent with `request`, or None.�Cookie)r�add_cookie_headerr+r)r;r�rrrr�get_cookie_header�s
rCcCs�g}x{|D]s}|j|kr
|dks=||jkr�|dksX||jkr}|j|j|j|jf�q}q�q
q
Wx*|D]"\}}}|j|||�q�WdS)zkUnsets a cookie by name, by default over all domains and paths.

    Wraps CookieJar.clear(), is O(n).
    N)r!�domainr�append�clear)�	cookiejarr!rDr�
clearables�cookierrr�remove_cookie_by_name�s
,rJc@seZdZdZdS)�CookieConflictErrorz�There are two cookies that meet the criteria specified in the cookie jar.
    Use .get and .set and include domain and path args in order to be more specific.N)r.r/r0r1rrrrrK�srKcsEeZdZdZddddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdddd�Zdd�Zdd�Zdd �Z�fd!d"�Z�fd#d$�Zddd%d&�Zddd'd(�Zd)d*�Zd+d,�Zd-d.�Z�S)/�RequestsCookieJara�Compatibility class; is a cookielib.CookieJar, but exposes a dict interface.

    This is the CookieJar we create by default for requests and sessions that
    don't specify one, since some clients may expect response.cookies and
    session.cookies to support dict operations.

    Don't use the dict interface internally; it's just for compatibility with
    with external client code. All `requests` code should work out of the box
    with externally provided instances of CookieJar, e.g., LWPCookieJar and
    FileCookieJar.

    Caution: dictionary operations that are normally O(1) may be O(n).

    Unlike a regular CookieJar, this class is pickleable.
    NcCs4y|j|||�SWntk
r/|SYnXdS)z�Dict-like get() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains. Caution: operation is O(n), not O(1).N)�_find_no_duplicates�KeyError)r
r!r#rDrrrrr�s
zRequestsCookieJar.getcKs||dkr;t||d|jd�d|jd��dSt|t�rYt|�}nt|||�}|j|�|S)z�Dict-like set() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains.NrDr)rJr�
isinstancer�morsel_to_cookie�
create_cookie�
set_cookie)r
r!r)�kwargs�crrr�set�s+
zRequestsCookieJar.setccs#xt|�D]}|jVq
WdS)zyDict-like iterkeys() that returns an iterator of names of cookies from the jar.
        See itervalues() and iteritems().N)�iterr!)r
rIrrr�iterkeys�szRequestsCookieJar.iterkeyscCst|j��S)zhDict-like keys() that returns a list of names of cookies from the jar.
        See values() and items().)�listrW)r
rrr�keys�szRequestsCookieJar.keysccs#xt|�D]}|jVq
WdS)zzDict-like itervalues() that returns an iterator of values of cookies from the jar.
        See iterkeys() and iteritems().N)rVr))r
rIrrr�
itervalues�szRequestsCookieJar.itervaluescCst|j��S)ziDict-like values() that returns a list of values of cookies from the jar.
        See keys() and items().)rXrZ)r
rrr�values�szRequestsCookieJar.valuesccs,x%t|�D]}|j|jfVq
WdS)zzDict-like iteritems() that returns an iterator of name-value tuples from the jar.
        See iterkeys() and itervalues().N)rVr!r))r
rIrrr�	iteritems�szRequestsCookieJar.iteritemscCst|j��S)z�Dict-like items() that returns a list of name-value tuples from the jar.
        See keys() and values(). Allows client-code to call "dict(RequestsCookieJar)
        and get a vanilla python dict of key value pairs.)rXr\)r
rrr�items�szRequestsCookieJar.itemscCsCg}x6t|�D](}|j|kr|j|j�qqW|S)z2Utility method to list all the domains in the jar.)rVrDrE)r
�domainsrIrrr�list_domains�s
zRequestsCookieJar.list_domainscCsCg}x6t|�D](}|j|kr|j|j�qqW|S)z0Utility method to list all the paths in the jar.)rVrrE)r
�pathsrIrrr�
list_paths�s
zRequestsCookieJar.list_pathscCsSg}xFt|�D]8}|jdk	r;|j|kr;dS|j|j�qWdS)zWReturns True if there are multiple domains in the jar.
        Returns False otherwise.NTF)rVrDrE)r
r^rIrrr�multiple_domains�sz"RequestsCookieJar.multiple_domainscCsji}x]t|�D]O}|dks4|j|kr|dksO|j|kr|j||j<qqW|S)z�Takes as an argument an optional domain and path and returns a plain old
        Python dict of name-value pairs of cookies that meet the requirements.N)rVrDrr)r!)r
rDr�
dictionaryrIrrr�get_dicts'zRequestsCookieJar.get_dictcCs
|j|�S)z�Dict-like __getitem__() for compatibility with client code. Throws exception
        if there are more than one cookie with name. In that case, use the more
        explicit get() method instead. Caution: operation is O(n), not O(1).)rM)r
r!rrr�__getitem__szRequestsCookieJar.__getitem__cCs|j||�dS)z�Dict-like __setitem__ for compatibility with client code. Throws exception
        if there is already a cookie of that name in the jar. In that case, use the more
        explicit set() method instead.N)rU)r
r!r)rrr�__setitem__szRequestsCookieJar.__setitem__cCst||�dS)zSDeletes a cookie given a name. Wraps cookielib.CookieJar's remove_cookie_by_name().N)rJ)r
r!rrr�__delitem__szRequestsCookieJar.__delitem__csmt|jd�rQ|jjd�rQ|jjd�rQ|jjdd�|_ntt|�j|||�S)N�
startswith�"z\"�)r8r)rh�endswith�replace�superrLrR)r
rI�argsrS)�	__class__rrrR!s6zRequestsCookieJar.set_cookiecsMt|tj�r3x4|D]}|j|�qWntt|�j|�dS)zAUpdates this jar with cookies from another CookieJar or dict-likeN)rOr�	CookieJarrRrmrL�update)r
�otherrI)rorrrq&s
zRequestsCookieJar.updatecCs�xft|�D]X}|j|kr
|dks=|j|kre|dksX|j|krb|jSqeq
q
Wtd|||f��dS)a6Requests uses this method internally to get cookie values. Takes as args name
        and optional domain and path. Returns a cookie.value. If there are conflicting cookies,
        _find arbitrarily chooses one. See _find_no_duplicates if you want an exception thrown
        if there are conflicting cookies.Nzname=%r, domain=%r, path=%r)rVr!rDrr)rN)r
r!rDrrIrrr�_find.szRequestsCookieJar._findcCs�d}x�t|�D]|}|j|kr|dksC|j|kr�|dks^|j|kr�|dk	r}td|��n|j}q�q�qqW|r�|Std|||f��dS)aA__get_item__ and get call _find_no_duplicates -- never used in Requests internally.
        Takes as args name and optional domain and path. Returns a cookie.value.
        Throws KeyError if cookie is not found and CookieConflictError if there are
        multiple cookies that match name and optionally domain and path.Nz(There are multiple cookies with name, %rzname=%r, domain=%r, path=%r)rVr!rDrrKr)rN)r
r!rDr�toReturnrIrrrrM;sz%RequestsCookieJar._find_no_duplicatescCs |jj�}|jd�|S)z4Unlike a normal CookieJar, this class is pickleable.�
_cookies_lock)�__dict__�copy�pop)r
�staterrr�__getstate__Ms
zRequestsCookieJar.__getstate__cCs5|jj|�d|jkr1tj�|_ndS)z4Unlike a normal CookieJar, this class is pickleable.ruN)rvrq�	threading�RLockru)r
ryrrr�__setstate__TszRequestsCookieJar.__setstate__cCst�}|j|�|S)z(Return a copy of this RequestsCookieJar.)rLrq)r
�new_cjrrrrwZs	
zRequestsCookieJar.copy)r.r/r0r1rrUrWrYrZr[r\r]r_rarbrdrerfrgrRrqrsrMrzr}rwrr)rorrL�s.	


rLcKstddd|d|ddddd	d
ddd
ddddddddidd6dd�
}t|�t|�}|r�d}t|t|���n|j|�t|d�|d<t|d�|d<|djd�|d<t|d	�|d<tj|�S)z�Make a cookie from underspecified parameters.

    By default, the pair of `name` and `value` will be set for the domain ''
    and sent on every request (this is sometimes called a "supercookie").
    �versionrr!r)�portNrDrjr�/�secureF�expires�discardT�comment�comment_url�rest�HttpOnly�rfc2109z4create_cookie() got unexpected keyword arguments: %s�port_specified�domain_specified�.�domain_initial_dot�path_specified)	�dictrU�	TypeErrorrXrq�boolrhrr@)r!r)rS�result�badargs�errrrrrQas0
	
rQcCs�d}|dr'tj�|d}n9|dr`d}tjtj|d|��tj}ntd|ddt|d�ddd	|d	d|d
|jd|dddd
i|dd6dddt|d�d|jd|dp�d�
S)zBConvert a Morsel object into a Cookie containing the one k/v pair.Nzmax-ager�z%a, %d-%b-%Y %H:%M:%S GMTr�r�r�FrDr!rr�r��httponlyr�r�r�r)rr)�time�mktime�strptime�timezonerQr�r&r))�morselr��
time_templaterrrrP�s*

#

	
	rPTcCs~|dkrt�}n|dk	rzdd�|D�}x@|D]5}|sV||kr>|jt|||��q>q>Wn|S)a-Returns a CookieJar from a key/value dictionary.

    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :param cookiejar: (optional) A cookiejar to add the cookies to.
    :param overwrite: (optional) If False, will not replace cookies
        already in the jar with new ones.
    NcSsg|]}|j�qSr)r!)�.0rIrrr�
<listcomp>�s	z'cookiejar_from_dict.<locals>.<listcomp>)rLrRrQ)�cookie_dictrG�	overwrite�names_from_jarr!rrr�cookiejar_from_dict�s
$r�cCs�t|tj�s!td��nt|t�rKt|d|dd�}nYt|tj�r�y|j|�Wq�tk
r�x|D]}|j|�q�WYq�Xn|S)z�Add cookies to cookiejar and returns a merged CookieJar.

    :param cookiejar: CookieJar object to add the cookies to.
    :param cookies: Dictionary or CookieJar object to be added.
    z!You can only merge into CookieJarrGr�F)	rOrrp�
ValueErrorr�r�rq�AttributeErrorrR)rG�cookies�
cookie_in_jarrrr�
merge_cookies�s

r�)r1r��collections�compatrrrrr{�ImportError�dummy_threading�objectrr3r?rCrJ�RuntimeErrorrKrp�MutableMappingrLrQrPr�r�rrrr�<module>s&"
H�#python3.4/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-34.pyc000064400000014232151735047530022742 0ustar00�
�Re��@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
dZd	Zd
d�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�ZdS)z]
requests.auth
~~~~~~~~~~~~~

This module contains the authentication handlers for Requests.
�N)�	b64encode�)�urlparse�str)�extract_cookies_to_jar)�parse_dict_headerz!application/x-www-form-urlencodedzmultipart/form-datacCs0dtd||fjd��j�jd�S)zReturns a Basic Auth string.zBasic z%s:%s�latin1)r�encode�strip�decode)�username�password�r�4/tmp/pip-ztkk0jow-build/pip/_vendor/requests/auth.py�_basic_auth_strsrc@s"eZdZdZdd�ZdS)�AuthBasez4Base class that all auth implementations derive fromcCstd��dS)NzAuth hooks must be callable.)�NotImplementedError)�self�rrrr�__call__"szAuthBase.__call__N)�__name__�
__module__�__qualname__�__doc__rrrrrrsrc@s.eZdZdZdd�Zdd�ZdS)�
HTTPBasicAuthz?Attaches HTTP Basic Authentication to the given Request object.cCs||_||_dS)N)rr
)rrr
rrr�__init__(s	zHTTPBasicAuth.__init__cCs t|j|j�|jd<|S)N�
Authorization)rrr
�headers)rrrrrr,szHTTPBasicAuth.__call__N)rrrrrrrrrrr&src@s"eZdZdZdd�ZdS)�
HTTPProxyAuthz=Attaches HTTP Proxy Authentication to a given Request object.cCs t|j|j�|jd<|S)NzProxy-Authorization)rrr
r)rrrrrr3szHTTPProxyAuth.__call__N)rrrrrrrrrr1src@sFeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�HTTPDigestAuthz@Attaches HTTP Digest Authentication to the given Request object.cCs:||_||_d|_d|_i|_d|_dS)N�r)rr
�
last_nonce�nonce_count�chal�pos)rrr
rrrr:s					zHTTPDigestAuth.__init__cs6|jd}|jd}|jjd�}|jjd�}|jjd�}|dkred}n|j�}|dks�|dkr�dd	�}	|	�n!|d
kr�dd�}
|
�n�fd
d�}�dkr�dSd}t|�}
|
j}|
jr|d|
j7}nd|j||jf}d||f}�|�}�|�}||jkr{|j	d7_	n	d|_	d|j	}t
|j	�jd�}||jd�7}|tj
�jd�7}|tjd�7}tj|�j�dd�}d|||||f}|dkrH�d|||f�}n|dkrp||d||f�}n7|dks�d|jd�kr�|||�}ndS||_d|j||||f}|r�|d|7}n|r�|d|7}n|r|d|7}n|r.|d||f7}nd|S) N�realm�nonce�qop�	algorithm�opaque�MD5zMD5-SESScSs4t|t�r!|jd�}ntj|�j�S)Nzutf-8)�
isinstancerr	�hashlib�md5�	hexdigest)�xrrr�md5_utf8Psz4HTTPDigestAuth.build_digest_header.<locals>.md5_utf8�SHAcSs4t|t�r!|jd�}ntj|�j�S)Nzutf-8)r+rr	r,�sha1r.)r/rrr�sha_utf8Vsz4HTTPDigestAuth.build_digest_header.<locals>.sha_utf8cs�d||f�S)Nz%s:%sr)�s�d)�	hash_utf8rr�<lambda>\sz4HTTPDigestAuth.build_digest_header.<locals>.<lambda>�?z%s:%s:%sz%s:%srz%08xzutf-8��z%s:%s:%s:%s:%s�auth�,z>username="%s", realm="%s", nonce="%s", uri="%s", response="%s"z
, opaque="%s"z, algorithm="%s"z
, digest="%s"z , qop="auth", nc=%s, cnonce="%s"z	Digest %s)r#�get�upperr�path�queryrr
r!r"rr	�time�ctime�os�urandomr,r2r.�split)r�method�urlr%r&r'r(r)�
_algorithmr0r3�KD�entdig�p_parsedr?�A1�A2�HA1�HA2�ncvaluer4�cnonce�noncebit�respdig�baser)r6r�build_digest_headerBsn

						
!	z"HTTPDigestAuth.build_digest_headercKsk|jdk	r(|jjj|j�nt|dd�}|jjdd�}d|j�krW|dkrWt|d|d�t	j
dd	t	j�}t|j
d|d
d��|_|j|jj�|jj�}t|j|j|j�|j|j�|j|j|j�|jd<|jj||�}|jj|�||_|St|dd�|S)z:Takes the given response and tries digest-auth, if needed.N�
num_401_callsrzwww-authenticater �digest�zdigest �flags�countr)r$�request�body�seek�getattrrr=�lower�setattr�re�compile�
IGNORECASEr�subr#�content�raw�release_conn�copyr�_cookies�prepare_cookiesrUrFrG�
connection�send�history�append)rr�kwargsrV�s_auth�pat�prep�_rrrr�
handle_401�s*!
	zHTTPDigestAuth.handle_401cCsm|jr+|j|j|j�|jd<ny|jj�|_Wntk
rUYnX|j	d|j
�|S)Nr�response)r!rUrFrGrr\�tellr$�AttributeError�
register_hookrt)rrrrrr�s	"
zHTTPDigestAuth.__call__N)rrrrrrUrtrrrrrr8s
S#r)rrCrarAr,�base64r�compatrr�cookiesr�utilsr�CONTENT_TYPE_FORM_URLENCODED�CONTENT_TYPE_MULTI_PARTr�objectrrrrrrrr�<module>spython3.4/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-34.pyc000064400000001576151735047530023133 0ustar00�
�Re4�@s+dZdgZdd�Zdd�ZdS)z�
requests.hooks
~~~~~~~~~~~~~~

This module provides the capabilities for the Requests hooks system.

Available hooks:

``response``:
    The response generated from a Request.

�responsecCs%i}xtD]}g||<q
W|S)N)�HOOKS)�hooks�event�r�5/tmp/pip-ztkk0jow-build/pip/_vendor/requests/hooks.py�
default_hookss
rcKs�|pt�}||kr}|j|�}t|d�rE|g}nx5|D]*}|||�}|dk	rL|}qLqLWn|S)z6Dispatches a hook dictionary on a given piece of data.�__call__N)�dict�get�hasattr)�keyr�	hook_data�kwargs�hook�
_hook_datarrr�
dispatch_hooks
rN)�__doc__rrrrrrr�<module>s		python3.4/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-34.pyc000064400000004330151735047530023536 0ustar00�
�Re@�@s�dZdZdZdZdZdZdZyddlmZej	�Wne
k
r\YnXdd	lmZdd
l
mZmZmZddlmZmZmZmZmZmZmZmZddlmZmZdd
lmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%ddl&Z&yddl&m'Z'Wn+e
k
rdGdd�de&j(�Z'YnXe&j)e*�j+e'��dS)a�
requests HTTP library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:

   >>> import requests
   >>> r = requests.get('http://python.org')
   >>> r.status_code
   200
   >>> 'Python is a programming language' in r.content
   True

... or POST:

   >>> payload = dict(key1='value1', key2='value2')
   >>> r = requests.post("http://httpbin.org/post", data=payload)
   >>> print(r.text)
   {
     ...
     "form": {
       "key2": "value2",
       "key1": "value1"
     },
     ...
   }

The other HTTP methods are supported - see `requests.api`. Full documentation
is at <http://python-requests.org>.

:copyright: (c) 2014 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.

�requestsz2.3.0iz
Kenneth Reitzz
Apache 2.0zCopyright 2014 Kenneth Reitz�)�	pyopenssl)�utils)�Request�Response�PreparedRequest)�request�get�head�post�patch�put�delete�options)�session�Session)�codes)�RequestException�Timeout�URLRequired�TooManyRedirects�	HTTPError�ConnectionError�N)�NullHandlerc@seZdZdd�ZdS)rcCsdS)N�)�self�recordrr�8/tmp/pip-ztkk0jow-build/pip/_vendor/requests/__init__.py�emitJszNullHandler.emitN)�__name__�
__module__�__qualname__rrrrrrIsr),�__doc__�	__title__�__version__�	__build__�
__author__�__license__�
__copyright__Zpackages.urllib3.contribrZinject_into_urllib3�ImportError�r�modelsrrr�apirr	r
rrr
rr�sessionsrr�status_codesr�
exceptionsrrrrrr�loggingr�Handler�	getLoggerr �
addHandlerrrrr�<module>*s.
:.
python3.4/site-packages/pip/_vendor/requests/__pycache__/models.cpython-34.pyc000064400000052035151735047530023267 0ustar00�
�ReDg�@s;dZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
mZdd	lmZdd
lmZddlmZddlmZdd
lmZmZmZmZmZmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(ddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6ddl7m8Z8e8j9e8j:e8j;e8j<fZ=dZ>dZ?dZ@Gdd�deA�ZBGdd�deA�ZCGdd�deC�ZDGdd�deBeC�ZEGdd�deA�ZFdS) z`
requests.models
~~~~~~~~~~~~~~~

This module contains the primary objects that power Requests.
�N)�BytesIO�UnsupportedOperation�)�
default_hooks)�CaseInsensitiveDict)�
HTTPBasicAuth)�cookiejar_from_dict�get_cookie_header)�RequestField)�encode_multipart_formdata)�	parse_url)�DecodeError)�	HTTPError�RequestException�
MissingSchema�
InvalidURL�ChunkedEncodingError�ContentDecodingError)
�guess_filename�get_auth_from_url�requote_uri�stream_decode_response_unicode�to_key_val_list�parse_header_links�iter_slices�guess_json_utf�	super_len�to_native_string)
�	cookielib�
urlunparse�urlsplit�	urlencode�str�bytes�StringIO�is_py2�chardet�json�builtin_str�
basestring�IncompleteRead)�codes��
iic@sFeZdZedd��Zedd��Zedd��ZdS)�RequestEncodingMixincCssg}t|j�}|j}|s-d}n|j|�|j}|rf|jd�|j|�ndj|�S)zBuild the path URL to use.�/�?�)r �url�path�append�query�join)�selfr2�pr3r5�r9�6/tmp/pip-ztkk0jow-build/pip/_vendor/requests/models.py�path_url1s		
	
zRequestEncodingMixin.path_urlcCst|ttf�r|St|d�r,|St|d�rg}x�t|�D]�\}}t|t�syt|d�r�|g}nxl|D]d}|dk	r�|jt|t�r�|jd�n|t|t�r�|jd�n|f�q�q�WqNWt|dd�S|SdS)z�Encode parameters in a piece of data.

        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        �read�__iter__Nzutf-8�doseqT)	�
isinstancer"r#�hasattrrr)r4�encoder!)�data�result�k�vs�vr9r9r:�_encode_paramsFs 	
!3z#RequestEncodingMixin._encode_paramsc
Csr|std��nt|t�r3td��ng}t|pEi�}t|pWi�}x�|D]�\}}t|t�s�t|d�r�|g}nx�|D]�}|dk	r�t|t�s�t|�}n|jt|t�r�|jd�n|t|t�r|j	d�n|f�q�q�WqdWx'|D]\}}d}d}	t|t
tf�r�t|�dkr�|\}
}q�t|�dkr�|\}
}}q�|\}
}}}	nt
|�p�|}
|}t|t�r�t|�}nt|t�rt|�}ntd|d	|j�d
|
d|	�}|jd|�|j|�q3Wt|�\}
}|
|fS)
aBuild the body for a multipart/form-data request.

        Will successfully encode files when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.

        zFiles must be provided.zData must not be a string.r=Nzutf-8���namerB�filename�headers�content_type)�
ValueErrorr?r)rr@r#r"r4�decoderA�tuple�list�lenrr$rr
r<�make_multipartr)�filesrB�
new_fields�fields�field�valrFrD�ft�fh�fn�fp�rf�bodyrMr9r9r:�
_encode_filesasL	
!3z"RequestEncodingMixin._encode_filesN)�__name__�
__module__�__qualname__�propertyr;�staticmethodrGr_r9r9r9r:r.0sr.c@s(eZdZdd�Zdd�ZdS)�RequestHooksMixincCs�||jkr"td|��nt|tj�rK|j|j|�n3t|d�r~|j|jdd�|D��ndS)zProperly register a hook.z1Unsupported event specified, with event name "%s"r=css'|]}t|tj�r|VqdS)N)r?�collections�Callable)�.0�hr9r9r:�	<genexpr>�sz2RequestHooksMixin.register_hook.<locals>.<genexpr>N)�hooksrNr?rfrgr4r@�extend)r7�event�hookr9r9r:�
register_hook�szRequestHooksMixin.register_hookcCs9y|j|j|�dSWntk
r4dSYnXdS)ziDeregister a previously registered hook.
        Returns True if the hook existed, False if not.
        TFN)rk�removerN)r7rmrnr9r9r:�deregister_hook�s

z!RequestHooksMixin.deregister_hookN)r`rarbrorqr9r9r9r:re�srec@sUeZdZdZddddddddddd�	Zdd�Zdd�ZdS)	�RequestaA user-created :class:`Request <Request>` object.

    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach the request. If a dictionary is provided, form-encoding will take place.
    :param params: dictionary of URL parameters to append to the URL.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'http://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>

    Nc
Cs	|dkrgn|}|dkr*gn|}|dkrBin|}|dkrZin|}|	dkrrin|	}	t�|_x6t|	j��D]"\}
}|jd|
d|�q�W||_||_||_||_||_	||_
||_||_dS)Nrmrn)
rrkrQ�itemsro�methodr2rLrTrB�params�auth�cookies)r7rtr2rLrTrBrurvrwrkrDrFr9r9r:�__init__�s 							zRequest.__init__cCsd|jS)Nz<Request [%s]>)rt)r7r9r9r:�__repr__�szRequest.__repr__cCsht�}|jd|jd|jd|jd|jd|jd|jd|jd|j	d	|j
�	|S)
zXConstructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it.rtr2rLrTrBrurvrwrk)�PreparedRequest�preparertr2rLrTrBrurvrwrk)r7r8r9r9r:r{�s										
zRequest.prepare)r`rarb�__doc__rxryr{r9r9r9r:rr�srrc@s�eZdZdZdd�Zddddddddddd�	Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zddd�Z
dd�Zdd�ZdS)rza�The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.

    Generated from either a :class:`Request <Request>` object or manually.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'http://httpbin.org/get')
      >>> r = req.prepare()
      <PreparedRequest [GET]>

      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>

    cCs=d|_d|_d|_d|_d|_t�|_dS)N)rtr2rL�_cookiesr^rrk)r7r9r9r:rxs					zPreparedRequest.__init__Nc

Csh|j|�|j||�|j|�|j|�|j||�|j||�|j|	�dS)z6Prepares the entire request with the given parameters.N)�prepare_method�prepare_url�prepare_headers�prepare_cookies�prepare_body�prepare_auth�
prepare_hooks)
r7rtr2rLrTrBrurvrwrkr9r9r:r{!s


zPreparedRequest.preparecCsd|jS)Nz<PreparedRequest [%s]>)rt)r7r9r9r:ry1szPreparedRequest.__repr__cCsat�}|j|_|j|_|jj�|_|jj�|_|j|_|j|_|S)N)rzrtr2rL�copyr}r^rk)r7r8r9r9r:r�4s	zPreparedRequest.copycCs1||_|jdk	r-|jj�|_ndS)zPrepares the given HTTP method.N)rt�upper)r7rtr9r9r:r~>s	zPreparedRequest.prepare_methodcCsqyt|�}Wn/tk
r0t|�}Yntk
rAYnXd|krq|j�jd�rq||_dSt|�\}}}}}}}	|s�tdj	|���n|s�t
d|��ny|jd�jd�}Wnt
k
rt
d��YnX|pd	}
|
r%|
d
7}
n|
|7}
|rL|
dt|�7}
n|s[d}ntr	t|t�r�|jd�}nt|
t�r�|
jd�}
nt|t�r�|jd�}nt|t�r�|jd�}nt|	t�r	|	jd�}	q	n|j|�}|r@|r7d||f}q@|}ntt||
|d||	g��}||_dS)
zPrepares the given HTTP URL.�:�httpNzDInvalid URL {0!r}: No schema supplied. Perhaps you meant http://{0}?z Invalid URL %r: No host supplied�idnazutf-8zURL has an invalid label.r1�@r/z%s&%s)�unicode�	NameErrorr"�UnicodeDecodeError�lower�
startswithr2rr�formatrrArO�UnicodeErrorr%r?rGrr)r7r2ru�schemerv�host�portr3r5�fragment�netloc�
enc_paramsr9r9r:rDsZ

"	!	


		$zPreparedRequest.prepare_urlcCs;|r+tdd�|j�D��|_nt�|_dS)z Prepares the given HTTP headers.css'|]\}}t|�|fVqdS)N)r)rhrJ�valuer9r9r:rj�sz2PreparedRequest.prepare_headers.<locals>.<genexpr>N)rrsrL)r7rLr9r9r:r��s%zPreparedRequest.prepare_headersc
Cs~d}d}d}tt|d�t|ttttf�g�}yt|�}Wn!tt	t
fk
rvd}YnX|r�|}|r�td��n|dk	r�t|�|j
d<qqd|j
d<n�|r�|j||�\}}nT|r?|j|�}t|t�s-t|t�s-t|d�r6d}q?d}n|j|�|rqd	|j
krq||j
d
<n||_dS)z"Prepares the given HTTP body data.Nr=z1Streamed bodies and files are mutually exclusive.zContent-Length�chunkedzTransfer-Encodingr<z!application/x-www-form-urlencodedzcontent-typezContent-Type)�allr@r?r)rQrP�dictr�	TypeError�AttributeErrorr�NotImplementedErrorr(rLr_rGr"�prepare_content_lengthr^)r7rBrTr^rM�length�	is_streamr9r9r:r��s8"-		
zPreparedRequest.prepare_bodycCs�t|d�rZt|d�rZ|jdd�t|j��|jd<|jdd�nV|dk	r�t|�}|r�t|�|jd<q�n|jd	kr�d|jd<ndS)
N�seek�tellrrHzContent-Length�GET�HEAD�0)zGETzHEAD)r@r�r(r�rLrrt)r7r^�lr9r9r:r��sz&PreparedRequest.prepare_content_lengthr1cCs�|dkr6t|j�}t|�r-|nd}n|r�t|t�rlt|�dkrlt|�}n||�}|jj|j�|j	|j
�ndS)z"Prepares the given HTTP auth data.NrH)rr2�anyr?rPrRr�__dict__�updater�r^)r7rvr2�url_auth�rr9r9r:r��s!zPreparedRequest.prepare_authcCs_t|tj�r||_nt|�|_t|j|�}|dk	r[||jd<ndS)z$Prepares the given HTTP cookie data.N�Cookie)r?r�	CookieJarr}rr	rL)r7rw�
cookie_headerr9r9r:r��szPreparedRequest.prepare_cookiescCs)x"|D]}|j|||�qWdS)zPrepares the given hooks.N)ro)r7rkrmr9r9r:r��s
zPreparedRequest.prepare_hooks)r`rarbr|rxr{ryr�r~rr�r�r�r�r�r�r9r9r9r:rz�s
B3rzc
sHeZdZdZdddddddd	d
dg
Z�fdd
�Zdd�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zedd��Z
edd��Zedd��Zd d!d"d#�Zed$d%d&�Zed'd(��Zed)d*��Zd+d,�Zed-d.��Zd/d0�Zd1d2�Z�S)3�ResponsezhThe :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    �_content�status_coderLr2�history�encoding�reasonrw�elapsed�requestcs�tt|�j�d|_d|_d|_t�|_d|_d|_	d|_
g|_d|_t
i�|_tjd�|_dS)NFr)�superr�rxr��_content_consumedr�rrL�rawr2r�r�r�rrw�datetime�	timedeltar�)r7)�	__class__r9r:rxs								zResponse.__init__cs3�js�jnt�fdd��jD��S)Nc3s'|]}|t�|d�fVqdS)N)�getattr)rh�attr)r7r9r:rj6sz(Response.__getstate__.<locals>.<genexpr>)r��contentr��	__attrs__)r7r9)r7r:�__getstate__/s
	
zResponse.__getstate__cCsQx*|j�D]\}}t|||�q
Wt|dd�t|dd�dS)Nr�Tr�)rs�setattr)r7�staterJr�r9r9r:�__setstate__:szResponse.__setstate__cCsd|jS)Nz<Response [%s]>)r�)r7r9r9r:ryBszResponse.__repr__cCs|jS)z,Returns true if :attr:`status_code` is 'OK'.)�ok)r7r9r9r:�__bool__EszResponse.__bool__cCs|jS)z,Returns true if :attr:`status_code` is 'OK'.)r�)r7r9r9r:�__nonzero__IszResponse.__nonzero__cCs
|jd�S)z,Allows you to use a response as an iterator.�)�iter_content)r7r9r9r:r=MszResponse.__iter__cCs+y|j�Wntk
r&dSYnXdS)NFT)�raise_for_statusr)r7r9r9r:r�Qs

	zResponse.okcCsd|jko|jtkS)z�True if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        �location)rLr��REDIRECT_STATI)r7r9r9r:�is_redirectYszResponse.is_redirectcCstj|j�dS)z6The apparent encoding, provided by the chardet libraryr�)r&�detectr�)r7r9r9r:�apparent_encoding`szResponse.apparent_encodingrFcsa��fdd�}t�j��}|�}�jr?|n|}|r]t|��}n|S)a�Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        c3s�y�y,x%�jj�dd�D]}|VqWWnatk
rb}zt|��WYdd}~Xn1tk
r�}zt|��WYdd}~XnXWn:tk
r�x%�jj��}|s�Pn|Vq�WYnXd�_dS)N�decode_contentT)	r��streamr*rr
rr�r<r�)�chunk�e)�
chunk_sizer7r9r:�generateos
#
z'Response.iter_content.<locals>.generate)rr�r�r)r7r��decode_unicoder��
reused_chunks�
stream_chunks�chunksr9)r�r7r:r�es
	zResponse.iter_contentNccs�d}x�|jd|d|�D]�}|dk	r>||}n|j�}|r�|dr�|r�|dd|dkr�|j�}nd}x|D]}|Vq�WqW|dk	r�|VndS)	z�Iterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.
        Nr�r�r���r�r�r�)r��
splitlines�pop)r7r�r��pendingr��lines�liner9r9r:�
iter_lines�s
.

zResponse.iter_linescCs�|jdkr�y^|jr*td��n|jdkrEd|_n't�j|jt��pft�|_Wq�tk
r�d|_Yq�Xnd|_|jS)z"Content of the response, in bytes.Fz2The content for this response was already consumedrNT)	r�r��RuntimeErrorr�r#r6r��CONTENT_CHUNK_SIZEr�)r7r9r9r:r��s	+
	zResponse.contentcCs�d}|j}|js"td�S|jdkr=|j}nyt|j|dd�}Wn-ttfk
r�t|jdd�}YnX|S)a�Content of the response, in unicode.

        If Response.encoding is None, encoding will be guessed using
        ``chardet``.

        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        Nr1�errors�replace)r�r�r"r��LookupErrorr�)r7r�r�r9r9r:�text�s		
z
Response.textcKs�|jrut|j�dkrut|j�}|dk	ruy tj|jj|�|�SWqrtk
rnYqrXquntj|j|�S)z�Returns the json-encoded content of a response, if any.

        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        rIN)	r�rRr�rr'�loadsrOr�r�)r7�kwargsr�r9r9r:r'�s 
z
Response.jsoncCsj|jjd�}i}|rft|�}x9|D].}|jd�pR|jd�}|||<q1Wn|S)z8Returns the parsed header links of the response, if any.�link�relr2)rL�getr)r7�headerr��linksr��keyr9r9r:r��s
zResponse.linkscCs�d}d|jko dknr>d|j|jf}n8d|jkoXdknrvd|j|jf}n|r�t|d|��ndS)	z2Raises stored :class:`HTTPError`, if one occurred.r1i�i�z%s Client Error: %siXz%s Server Error: %s�responseN)r�r�r)r7�http_error_msgr9r9r:r�szResponse.raise_for_statuscCs
|jj�S)z�Releases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.

        *Note: Should not normally need to be called explicitly.*
        )r��release_conn)r7r9r9r:�closeszResponse.close)r`rarbr|r�rxr�r�ryr�r�r=rcr�r�r�r��ITER_CHUNK_SIZEr�r�r�r'r�r�r�r9r9)r�r:r��s:	(*&r�i()Gr|rfr��iorrrkr�
structuresrrvrrwrr	Zpackages.urllib3.fieldsr
Zpackages.urllib3.filepostrZpackages.urllib3.utilrZpackages.urllib3.exceptionsr
�
exceptionsrrrrrr�utilsrrrrrrrrrr�compatrrr r!r"r#r$r%r&r'r(r)r*�status_codesr+�moved�found�other�temporary_movedr��DEFAULT_REDIRECT_LIMITr�r��objectr.rerrrzr�r9r9r9r:�<module>s6.FXmJ�python3.4/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-34.pyc000064400000030624151735047530023607 0ustar00�
�Re9�@s�dZddlZddlmZddlmZmZddlmZddl	m
Zddlm
Z
mZmZmZdd	lmZmZmZmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZ ddl!m"Z"ddl#m$Z$m
Z
mZmZddl%m&Z&dZ'dZ(dZ)Gdd�de*�Z+Gdd�de+�Z,dS)z�
requests.adapters
~~~~~~~~~~~~~~~~~

This module contains the transport adapters that Requests uses to define
and maintain connections.
�N�)�Response)�PoolManager�proxy_from_url)�HTTPResponse)�Timeout)�urlparse�
basestring�	urldefrag�unquote)�DEFAULT_CA_BUNDLE_PATH�get_encoding_from_headers�prepend_scheme_if_needed�get_auth_from_url)�CaseInsensitiveDict)�
MaxRetryError)�TimeoutError)�SSLError)�	HTTPError)�
ProxyError)�extract_cookies_to_jar)�ConnectionErrorrrr)�_basic_auth_strF�
cs@eZdZdZ�fdd�Zdd�Zdd�Z�S)�BaseAdapterzThe Base Transport Adaptercstt|�j�dS)N)�superr�__init__)�self)�	__class__��8/tmp/pip-ztkk0jow-build/pip/_vendor/requests/adapters.pyr&szBaseAdapter.__init__cCs
t�dS)N)�NotImplementedError)rrrr �send)szBaseAdapter.sendcCs
t�dS)N)r!)rrrr �close,szBaseAdapter.close)�__name__�
__module__�__qualname__�__doc__rr"r#rr)rr r#srcs�eZdZdZdddddgZeeee�fdd�Zd	d
�Z	dd�Z
ed
d�Zdd�Zdd�Z
ddd�Zdd�Zdd�Zdd�Zdd�Zdddddd d!�Z�S)"�HTTPAdaptera�The built-in HTTP Adapter for urllib3.

    Provides a general-case interface for Requests sessions to contact HTTP and
    HTTPS urls by implementing the Transport Adapter interface. This class will
    usually be created by the :class:`Session <Session>` class under the
    covers.

    :param pool_connections: The number of urllib3 connection pools to cache.
    :param pool_maxsize: The maximum number of connections to save in the pool.
    :param int max_retries: The maximum number of retries each connection
        should attempt. Note, this applies only to failed connections and
        timeouts, never to requests where the server returns a response.
    :param pool_block: Whether the connection pool should block for connections.

    Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> a = requests.adapters.HTTPAdapter(max_retries=3)
      >>> s.mount('http://', a)
    �max_retries�config�_pool_connections�
_pool_maxsize�_pool_blockcsc||_i|_i|_tt|�j�||_||_||_|j	||d|�dS)N�block)
r)r*�
proxy_managerrr(rr+r,r-�init_poolmanager)r�pool_connections�pool_maxsizer)�
pool_block)rrr rIs						zHTTPAdapter.__init__cs t�fdd��jD��S)Nc3s'|]}|t�|d�fVqdS)N)�getattr)�.0�attr)rrr �	<genexpr>Ysz+HTTPAdapter.__getstate__.<locals>.<genexpr>)�dict�	__attrs__)rr)rr �__getstate__XszHTTPAdapter.__getstate__cCsbi|_i|_x*|j�D]\}}t|||�qW|j|j|jd|j�dS)Nr.)r/r*�items�setattrr0r+r,r-)r�stater6�valuerrr �__setstate__\s		zHTTPAdapter.__setstate__cCs=||_||_||_td|d|d|�|_dS)a�Initializes a urllib3 PoolManager. This method should not be called
        from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param connections: The number of urllib3 connection pools to cache.
        :param maxsize: The maximum number of connections to save in the pool.
        :param block: Block when no free connections are available.
        �	num_pools�maxsizer.N)r+r,r-r�poolmanager)r�connectionsrAr.rrr r0hs

			zHTTPAdapter.init_poolmanagercCs�|j�jd�ro|rod}|dk	r6|}n|sEt}n|sZtd��nd|_||_nd|_d|_|r�t|t�s�|d|_|d|_	q�||_ndS)	a�Verify a SSL certificate. This method should not be called from user
        code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param conn: The urllib3 connection object associated with the cert.
        :param url: The requested URL.
        :param verify: Whether we should actually verify the certificate.
        :param cert: The SSL certificate to verify.
        �httpsNTz4Could not find a suitable SSL CA certificate bundle.�
CERT_REQUIRED�	CERT_NONErr)
�lower�
startswithr�	Exception�	cert_reqs�ca_certs�
isinstancer	�	cert_file�key_file)r�conn�url�verify�cert�cert_locrrr �cert_verifyys"
					
zHTTPAdapter.cert_verifycCs�t�}t|dd�|_tt|di��|_t|j�|_||_|jj|_t	|j
t�r�|j
jd�|_
n|j
|_
t
|j||�||_||_|S)a�Builds a :class:`Response <requests.Response>` object from a urllib3
        response. This should not be called from user code, and is only exposed
        for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`

        :param req: The :class:`PreparedRequest <PreparedRequest>` used to generate the response.
        :param resp: The urllib3 response object.
        �statusN�headerszutf-8)rr4�status_coderrVr
�encoding�raw�reasonrLrP�bytes�decoder�cookies�request�
connection)r�req�resp�responserrr �build_response�s					zHTTPAdapter.build_responseNc
Cs�|p	i}|jt|j��j�}|r�t|d�}|j|�}||jkr�t|d|d|jd|j	d|j
�|j|<n|j|j|�}n*t|�}|j�}|j
j|�}|S)aeReturns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        �http�
proxy_headersr@rAr.)�getrrG�schemerrer/rr+r,r-�connection_from_url�geturlrB)rrP�proxies�proxyrerO�parsedrrr �get_connection�s"		zHTTPAdapter.get_connectioncCs|jj�dS)z�Disposes of any internal state.

        Currently, this just closes the PoolManager, which closes pooled
        connections.
        N)rB�clear)rrrr r#�szHTTPAdapter.closecCsd|p	i}t|j�j}|j|�}|rW|dkrWt|j�\}}n	|j}|S)aObtain the url to use when making the final request.

        If the message is being sent through a HTTP proxy, the full URL has to
        be used. Otherwise, we should only use the path portion of the URL.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param proxies: A dictionary of schemes to proxy URLs.
        rD)rrPrgrfr
�path_url)rr^rjrgrkrP�_rrr �request_url�s
	zHTTPAdapter.request_urlcKsdS)a"Add any headers needed by the connection. As of v2.0 this does
        nothing by default, but is left for overriding by users that subclass
        the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
        :param kwargs: The keyword arguments from the call to send().
        Nr)rr^�kwargsrrr �add_headersszHTTPAdapter.add_headerscCs>i}t|�\}}|r:|r:t||�|d<n|S)a3Returns a dictionary of the headers to add to any request sent
        through a proxy. This works with urllib3 magic to ensure that they are
        correctly sent to the proxy, rather than in a tunnelled request if
        CONNECT is being used.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxies: The url of the proxy being used for this request.
        :param kwargs: Optional additional keyword arguments.
        zProxy-Authorization)rr)rrkrV�username�passwordrrr res
zHTTPAdapter.proxy_headersFTcCsZ|j|j|�}|j||j||�|j||�}|j|�|jdkphd|jk}	td|d|�}y�|	s�|jd|j	d|d|jd|jd	d
dd
dd
d
d
d|j
d|�
}
nPt|d�r�|j}n|j
d|�}y�|j|j	|dd�x-|jj�D]\}}
|j||
�q:W|j�xd|jD]Y}|jtt|��dd�jd��|jd�|j|�|jd�qnW|jd�|j�}tj|d|d|dd
d
d
�}
Wn|j��YnX|j|�Wntjk
rn}zt|d|��WYdd}~Xn�tk
r�}zt|d|��WYdd}~Xn�tk
r�}zt |��WYdd}~Xnvt!t"fk
rI}zPt#|t!�rt$|d|��n't#|t%�r4t&|d|��n�WYdd}~XnX|j'||
�S)aSends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) The timeout on the request.
        :param verify: (optional) Whether to verify SSL certificates.
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        NzContent-Length�connect�read�methodrP�bodyrV�redirectF�assert_same_host�preload_content�decode_content�retries�timeout�
proxy_pool�skip_accept_encodingT�zutf-8s
s0

�poolr_r^)(rmrPrTrqrsryrV�TimeoutSauce�urlopenrxr)�hasattrr��	_get_conn�
putrequestr;�	putheader�
endheadersr"�hex�len�encode�getresponser�from_httplibr#�	_put_conn�socket�errorrr�_ProxyErrorr�	_SSLError�
_HTTPErrorrLrrrrc)rr^�streamrrQrRrjrOrP�chunkedra�low_conn�headerr>�i�r�sockerr�errr r"&sv
					
,




$$zHTTPAdapter.send)r$r%r&r'r9�DEFAULT_POOLSIZE�DEFAULT_RETRIES�DEFAULT_POOLBLOCKrr:r?r0rTrcrmr#rqrsrer"rr)rr r(0s"	
%$ r()-r'r��modelsrZpackages.urllib3.poolmanagerrrZpackages.urllib3.responserZpackages.urllib3.utilrr��compatrr	r
r�utilsrr
rr�
structuresrZpackages.urllib3.exceptionsrrrr�rr�rr�r]r�
exceptionsr�authrr�r�r��objectrr(rrrr �<module>	s*"""
python3.4/site-packages/pip/_vendor/requests/__pycache__/api.cpython-34.pyc000064400000011303151735047540022547 0ustar00�
�Re��@s�dZddlmZdd�Zdd�Zdd�Zd	d
�Zddd
�Zddd�Zddd�Z	dd�Z
dS)z�
requests.api
~~~~~~~~~~~~

This module implements the Requests API.

:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.

�)�sessionscKs%tj�}|jd|d||�S)a%Constructs and sends a :class:`Request <Request>`.
    Returns :class:`Response <Response>` object.

    :param method: method for the new :class:`Request` object.
    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
    :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
    :param files: (optional) Dictionary of 'name': file-like-objects (or {'name': ('filename', fileobj)}) for multipart encoding upload.
    :param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
    :param timeout: (optional) Float describing the timeout of the request in seconds.
    :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.
    :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
    :param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.
    :param stream: (optional) if ``False``, the response content will be immediately downloaded.
    :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.

    Usage::

      >>> import requests
      >>> req = requests.request('GET', 'http://httpbin.org/get')
      <Response [200]>
    �method�url)r�Session�request)rr�kwargs�session�r	�3/tmp/pip-ztkk0jow-build/pip/_vendor/requests/api.pyrsrcKs |jdd�td||�S)z�Sends a GET request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    �allow_redirectsT�get)�
setdefaultr)rrr	r	r
r/srcKs |jdd�td||�S)z�Sends a OPTIONS request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    rT�options)r
r)rrr	r	r
r:srcKs |jdd�td||�S)z�Sends a HEAD request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    rF�head)r
r)rrr	r	r
rEsrNcKstd|d||�S)a(Sends a POST request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    �post�data)r)rrrr	r	r
rPsrcKstd|d||�S)a'Sends a PUT request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    �putr)r)rrrr	r	r
r[srcKstd|d||�S)a)Sends a PATCH request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    �patchr)r)rrrr	r	r
rfsrcKstd||�S)z�Sends a DELETE request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    �delete)r)rrr	r	r
rqsr)�__doc__�rrrrrrrrrr	r	r	r
�<module>spython3.4/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-34.pyc000064400000011562151735047540024505 0ustar00�
�Re@�@scddlmZiBd�d6d�d6d�d6d�d	6d�d6d�d6d�d6d�d6d�d6d�d6d�d 6d�d#6d�d(6d�d*6d�d,6d�d.6d�d26d�d46d�d76d�d96d�d;6d�d=6d�dA6d�dD6d�dG6d�dI6d�dL6d�dN6d�dQ6d�dT6d�dV6d�dZ6d�d]6d�d_6d�da6d�dc6d�df6d�dh6d�dj6d�dn6d�dr6d�dt6d�dx6d�d{6d�d}6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Zed�d��Zxieej��D]U\ZZxFeD]>Ze	eee�ej
d��se	eej�e�qqWqWd�S)��)�
LookupDict�continue�d�switching_protocols�e�
processing�f�
checkpoint�g�uri_too_long�request_uri_too_long�z�ok�okay�all_ok�all_okay�all_good�\o/�✓���created���accepted���non_authoritative_info�non_authoritative_information���
no_content���
reset_content�reset���partial_content�partial���multi_status�multiple_status�multi_stati�multiple_stati���already_reported���im_used���multiple_choicesi,�moved_permanently�moved�\o-i-�foundi.�	see_other�otheri/�not_modifiedi0�	use_proxyi1�switch_proxyi2�temporary_redirect�temporary_moved�	temporaryi3�resume_incomplete�resumei4�bad_request�badi��unauthorizedi��payment_required�paymenti��	forbiddeni��	not_found�-o-i��method_not_allowed�not_allowedi��not_acceptablei��proxy_authentication_required�
proxy_auth�proxy_authenticationi��request_timeout�timeouti��conflicti��gonei��length_requiredi��precondition_failed�preconditioni��request_entity_too_largei��request_uri_too_largei��unsupported_media_type�unsupported_media�
media_typei��requested_range_not_satisfiable�requested_range�range_not_satisfiablei��expectation_failedi��im_a_teapot�teapot�
i_am_a_teapoti��unprocessable_entity�
unprocessablei��lockedi��failed_dependency�
dependencyi��unordered_collection�	unorderedi��upgrade_required�upgradei��precondition_requiredi��too_many_requests�too_manyi��header_fields_too_large�fields_too_largei��no_response�nonei��
retry_with�retryi��$blocked_by_windows_parental_controls�parental_controlsi��unavailable_for_legal_reasons�
legal_reasonsi��client_closed_requesti��internal_server_error�server_error�/o\�✗i��not_implementedi��bad_gatewayi��service_unavailable�unavailablei��gateway_timeouti��http_version_not_supported�http_versioni��variant_also_negotiatesi��insufficient_storagei��bandwidth_limit_exceeded�	bandwidthi��not_extendedi��name�status_codes�\N)zcontinue)zswitching_protocols)z
processing)z
checkpoint)zuri_too_longzrequest_uri_too_long)zokzokayzall_okzall_okayzall_goodrr)zcreated)zaccepted)znon_authoritative_infoznon_authoritative_information)z
no_content)z
reset_contentzreset)zpartial_contentzpartial)zmulti_statuszmultiple_statuszmulti_statizmultiple_stati)zalready_reported)zim_used)zmultiple_choices)zmoved_permanentlyzmovedr1)zfound)z	see_otherzother)znot_modified)z	use_proxy)zswitch_proxy)ztemporary_redirectztemporary_movedz	temporary)zresume_incompletezresume)zbad_requestzbad)zunauthorized)zpayment_requiredzpayment)z	forbidden)z	not_foundrD)zmethod_not_allowedznot_allowed)znot_acceptable)zproxy_authentication_requiredz
proxy_authzproxy_authentication)zrequest_timeoutztimeout)zconflict)zgone)zlength_required)zprecondition_failed�precondition)zrequest_entity_too_large)zrequest_uri_too_large)zunsupported_media_typezunsupported_mediaz
media_type)zrequested_range_not_satisfiablezrequested_rangezrange_not_satisfiable)zexpectation_failed)zim_a_teapotzteapotz
i_am_a_teapot)zunprocessable_entityz
unprocessable)zlocked)zfailed_dependencyz
dependency)zunordered_collectionz	unordered)zupgrade_requiredzupgrade)zprecondition_requiredr�)ztoo_many_requestsztoo_many)zheader_fields_too_largezfields_too_large)zno_responseznone)z
retry_withzretry)z$blocked_by_windows_parental_controlszparental_controls)zunavailable_for_legal_reasonsz
legal_reasons)zclient_closed_request)zinternal_server_errorzserver_errorrwrx)znot_implemented)zbad_gateway)zservice_unavailablezunavailable)zgateway_timeout)zhttp_version_not_supportedzhttp_version)zvariant_also_negotiates)zinsufficient_storage)zbandwidth_limit_exceededz	bandwidth)znot_extended)�
structuresr�_codes�codes�list�items�code�titles�title�setattr�
startswith�upper�r�r��</tmp/pip-ztkk0jow-build/pip/_vendor/requests/status_codes.py�<module>s�

python3.4/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-34.pyc000064400000004362151735047540023270 0ustar00�
�Re�	�@s�dZddlmZddlZejZeddkZeddkZeo^eddkZeoteddkZ	eo�eddkZ
eo�eddkZeo�eddkZeo�eddkZ
eo�edd	kZeo�edd
kZeoeddkZejj�ZdekZdekZd
ekZeeeef�Zdeej�j�kZdeej�j�kZdeej�j�kZdeej�j�kZdeej�j�kZyddlZ Wne!k
rddl Z YnXer�ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)ddl*m*Z*m+Z+m,Z,m-Z-m.Z.ddl/m0Z0ddl1Z1ddl2m3Z3ddl4m4Z4ddl5m6Z6ddl7m8Z8eZ9eZ:e;Ze<Z<e=e>e?fZ@n�er�ddlAm*Z*m+Z+m,Z,m-Z-m'Z'm#Z#m$Z$m%Z%m&Z&m.Z.ddlBm0Z0m(Z(m)Z)ddlCmDZ1ddlEm3Z3ddlFm4Z4ddlGm6Z6ddlHm8Z8eZ9eZe:Z:ee:fZ<e=e?fZ@ndS)z
pythoncompat
�)�chardet�N������ZpypyZjythonZiron�win32�linux�darwinZhpuxzsolar==)�quote�unquote�
quote_plus�unquote_plus�	urlencode�
getproxies�proxy_bypass)�urlparse�
urlunparse�urljoin�urlsplit�	urldefrag)�parse_http_list)�Morsel)�StringIO)�OrderedDict)�IncompleteRead)
rrrrrr
rrrr)rrr)�	cookiejar)I�__doc__�packagesr�sys�version_info�_ver�is_py2�is_py3�is_py30�is_py31�is_py32�is_py33�is_py34�is_py27�is_py26�is_py25�is_py24�version�lower�is_pypy�	is_jython�
is_ironpython�any�
is_cpython�str�platform�
is_windows�is_linux�is_osx�is_hpux�
is_solarisZ
simplejson�json�ImportError�urllibr
rrrrrrrrrrr�urllib2r�	cookielib�CookierrZ&packages.urllib3.packages.ordered_dictr�httplibr�builtin_str�bytes�unicode�
basestring�int�long�float�
numeric_types�urllib.parse�urllib.request�httpr�http.cookies�io�collections�http.client�rSrS�6/tmp/pip-ztkk0jow-build/pip/_vendor/requests/compat.py�<module>sn		
4(Fpython3.4/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-34.pyc000064400000012504151735047540024225 0ustar00�
�Re�
�@swdZddlZddlZddlmZGdd�de�ZGdd�dej�ZGdd	�d	e	�Z
dS)
zP
requests.structures
~~~~~~~~~~~~~~~~~~~

Data structures that power Requests.

�N)�islicec@sFeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�
IteratorProxyzdocstring for IteratorProxycCs
||_dS)N)�i)�selfr�r�:/tmp/pip-ztkk0jow-build/pip/_vendor/requests/structures.py�__init__szIteratorProxy.__init__cCs|jS)N)r)rrrr�__iter__szIteratorProxy.__iter__cCsjt|jd�rt|j�St|jd�r;|jjSt|jd�rftj|jj��jSdS)N�__len__�len�fileno)�hasattrrr�os�fstatr�st_size)rrrrr
s

zIteratorProxy.__len__cCsdjt|jd|��S)N�)�joinrr)r�nrrr�read!szIteratorProxy.readN)�__name__�
__module__�__qualname__�__doc__rr	r
rrrrrrs
rc@s�eZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�CaseInsensitiveDicta�
    A case-insensitive ``dict``-like object.

    Implements all methods and operations of
    ``collections.MutableMapping`` as well as dict's ``copy``. Also
    provides ``lower_items``.

    All keys are expected to be strings. The structure remembers the
    case of the last key to be set, and ``iter(instance)``,
    ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()``
    will contain case-sensitive keys. However, querying and contains
    testing is case insensitive:

        cid = CaseInsensitiveDict()
        cid['Accept'] = 'application/json'
        cid['aCCEPT'] == 'application/json'  # True
        list(cid) == ['Accept']  # True

    For example, ``headers['content-encoding']`` will return the
    value of a ``'Content-Encoding'`` response header, regardless
    of how the header name was originally stored.

    If the constructor, ``.update``, or equality comparison
    operations are given keys that have equal ``.lower()``s, the
    behavior is undefined.

    NcKs5t�|_|dkr!i}n|j||�dS)N)�dict�_store�update)r�data�kwargsrrrrAs	zCaseInsensitiveDict.__init__cCs||f|j|j�<dS)N)r�lower)r�key�valuerrr�__setitem__GszCaseInsensitiveDict.__setitem__cCs|j|j�dS)N�)rr)rr rrr�__getitem__LszCaseInsensitiveDict.__getitem__cCs|j|j�=dS)N)rr)rr rrr�__delitem__OszCaseInsensitiveDict.__delitem__cCsdd�|jj�D�S)Ncss|]\}}|VqdS)Nr)�.0�casedkey�mappedvaluerrr�	<genexpr>Ssz/CaseInsensitiveDict.__iter__.<locals>.<genexpr>)r�values)rrrrr	RszCaseInsensitiveDict.__iter__cCs
t|j�S)N)rr)rrrrr
UszCaseInsensitiveDict.__len__cCsdd�|jj�D�S)z.Like iteritems(), but with all lowercase keys.css%|]\}}||dfVqdS)r#Nr)r&�lowerkey�keyvalrrrr)[sz2CaseInsensitiveDict.lower_items.<locals>.<genexpr>)r�items)rrrr�lower_itemsXs	zCaseInsensitiveDict.lower_itemscCsGt|tj�r!t|�}ntSt|j��t|j��kS)N)�
isinstance�collections�Mappingr�NotImplementedrr.)r�otherrrr�__eq__`szCaseInsensitiveDict.__eq__cCst|jj��S)N)rrr*)rrrr�copyiszCaseInsensitiveDict.copycCstt|j���S)N)�strrr-)rrrr�__repr__lszCaseInsensitiveDict.__repr__)rrrrrr"r$r%r	r
r.r4r5r7rrrrr%s	rcsReZdZdZd�fdd�Zdd�Zdd�Zdd	d
�Z�S)�
LookupDictzDictionary lookup object.Ncs ||_tt|�j�dS)N)�name�superr8r)rr9)�	__class__rrrrs	zLookupDict.__init__cCsd|jS)Nz
<lookup '%s'>)r9)rrrrr7vszLookupDict.__repr__cCs|jj|d�S)N)�__dict__�get)rr rrrr$yszLookupDict.__getitem__cCs|jj||�S)N)r<r=)rr �defaultrrrr=~szLookupDict.get)rrrrrr7r$r=rr)r;rr8os
r8)rrr0�	itertoolsr�objectr�MutableMappingrrr8rrrr�<module>	sJpython3.4/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-34.pyc000064400000041076151735047540023656 0ustar00�
�ReW�@s�dZddlZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZddl
mZmZmZmZdd	lmZmZmZdd
lmZmZddlmZmZmZddlmZmZm Z m!Z!dd
l"m#Z#ddl$m%Z%ddlm&Z&m'Z'm(Z(m)Z)m*Z*ddl+m,Z,ddlm-Z-e	dd�Z.e	dd�Z/Gdd�de0�Z1Gdd�de1�Z2dd�Z3dS)z�
requests.session
~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).

�N)�Mapping)�datetime�)�_basic_auth_str)�	cookielib�OrderedDict�urljoin�urlparse�builtin_str)�cookiejar_from_dict�extract_cookies_to_jar�RequestsCookieJar�
merge_cookies)�Request�PreparedRequest�DEFAULT_REDIRECT_LIMIT)�
default_hooks�
dispatch_hook)�to_key_val_list�default_headers�to_native_string)�TooManyRedirects�
InvalidSchema�ChunkedEncodingError�ContentDecodingError)�CaseInsensitiveDict)�HTTPAdapter)�requote_uri�get_environ_proxies�get_netrc_auth�should_bypass_proxies�get_auth_from_url)�codes)�REDIRECT_STATIcCs�|dkr|S|dkr |St|t�o;t|t�sB|S|t|��}|jt|��x0|j�D]"\}}|dkrt||=qtqtWtdd�|j�D��}|S)z�
    Determines appropriate setting for a given request, taking into account the
    explicit setting on that request, and the setting in the session. If a
    setting is a dictionary, they will be merged together using `dict_class`
    Ncss-|]#\}}|dk	r||fVqdS)N�)�.0�k�vr$r$�8/tmp/pip-ztkk0jow-build/pip/_vendor/requests/sessions.py�	<genexpr>Csz merge_setting.<locals>.<genexpr>)�
isinstancerr�update�items�dict)�request_setting�session_setting�
dict_class�merged_settingr&r'r$r$r(�
merge_setting'sr2cCsZ|dks!|jd�gkr%|S|dksF|jd�gkrJ|St|||�S)z�
    Properly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    N�response)�getr2)�
request_hooks�
session_hooksr0r$r$r(�merge_hooksHs
!!r7c@sCeZdZddddddd�Zdd�Zdd	�ZdS)
�SessionRedirectMixinFNTccs�d}x�|jr�|j�}	y|jWn.tttfk
rY|jjdd�YnX||jkrt	d|j��n|j
�|jd}
|j}|
j
d�r�t|j�}d|j|
f}
nt|
�}
|
j�}
t|
�jst|jt|
��}
nt|
�}
t|
�|	_|jtjkrW|dkrWd	}n|jtjkr~|dkr~d	}n|jtjkr�|d
kr�d	}n||	_|jtjtjfkr�d|	jkr�|	jd=nd|	_n|	j}y|d
=Wntk
rYnXt|	j |	|j�|	j j!|j"�|	j#|	j �|j$|	|�}|j%|	|�|	}|j&|d|d|d|d|d|dd�}t|j"|	|j�|d7}|Vq	WdS)z6Receives a Response. Returns a generator of Responses.r�decode_contentFzExceeded %s redirects.�locationz//z%s:%s�HEAD�GET�POSTzContent-LengthN�Cookie�stream�timeout�verify�cert�proxies�allow_redirectsr)'�is_redirect�copy�contentrr�RuntimeError�raw�read�
max_redirectsr�close�headers�method�
startswithr	�url�scheme�geturl�netlocrrr�status_coder"�	see_other�found�moved�	temporary�resume�body�KeyErrorr�_cookiesr+�cookies�prepare_cookies�rebuild_proxies�rebuild_auth�send)�self�resp�reqr?r@rArBrC�i�prepared_requestrPrN�parsed_rurl�parsedrMr$r$r(�resolve_redirectsYsn

					
	
	
z&SessionRedirectMixin.resolve_redirectscCs�|j}|j}d|kr[t|jj�}t|�}|j|jkr[|d=q[n|jrpt|�nd}|dk	r�|j|�ndS)z�
        When being redirected we may want to strip authentication from the
        request to avoid leaking credentials. This method intelligently removes
        and reapplies authentication where possible to avoid credential loss.
        �
AuthorizationN)rMrPr	�request�hostname�	trust_envr�prepare_auth)rbrfr3rMrP�original_parsed�redirect_parsed�new_authr$r$r(r`�s		
z!SessionRedirectMixin.rebuild_authcCs|j}|j}t|�j}|dk	r9|j�ni}|jr�t|�r�t|�}|j|�}|r�|j	|||�q�nd|kr�|d=nyt
||�\}	}
Wntk
r�d\}	}
YnX|	r|
rt|	|
�|d<n|S)a�
        This method re-evaluates the proxy configuration by considering the
        environment variables. If we are redirected to a URL covered by
        NO_PROXY, we strip the proxy configuration. Otherwise, we set missing
        proxy keys for this URL (in case they were stripped by a previous
        redirect).

        This method also replaces the Proxy-Authorization header where
        necessary.
        NzProxy-Authorization)NN)
rMrPr	rQrFrmr rr4�
setdefaultr!r[r)rbrfrCrMrPrQ�new_proxies�environ_proxies�proxy�username�passwordr$r$r(r_�s$		

z$SessionRedirectMixin.rebuild_proxies)�__name__�
__module__�__qualname__rir`r_r$r$r$r(r8Xsar8c@sNeZdZdZdddddddd	d
ddd
ddgZdd�Zdd�Zdd�Zdd�Zddddddddddddddd�
Z	dd�Z
dd�Zd d!�Zdd"d#�Z
dd$d%�Zdd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�ZdS)6�Sessionz�A Requests session.

    Provides cookie persistence, connection-pooling, and configuration.

    Basic Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> s.get('http://httpbin.org/get')
      200
    rMr]�authr@rC�hooks�paramsrArB�prefetch�adaptersr?rmrKcCs�t�|_d|_i|_t�|_i|_d|_d|_d|_	t
|_d|_t
i�|_t�|_|jdt��|jdt��dS)NFTzhttps://zhttp://)rrMr|rCrr}r~r?rArBrrKrmrr]rr��mountr)rbr$r$r(�__init__s								zSession.__init__cCs|S)Nr$)rbr$r$r(�	__enter__?szSession.__enter__cGs|j�dS)N)rL)rb�argsr$r$r(�__exit__BszSession.__exit__cCs!|jpi}t|tj�s0t|�}nttt�|j�|�}|j}|jr�|r�|jr�t	|j
�}nt�}|jd|j
j�d|j
d|jd|jdt|j|jdt�dt|j|j�dt||j�d	|d
t|j|j��	|S)abConstructs a :class:`PreparedRequest <PreparedRequest>` for
        transmission and returns it. The :class:`PreparedRequest` has settings
        merged from the :class:`Request <Request>` instance and those of the
        :class:`Session`.

        :param request: :class:`Request` instance to prepare with this
            session's settings.
        rNrP�files�datarMr0r~r|r]r})r]r*r�	CookieJarrrr
r|rmrrPr�preparerN�upperr�r�r2rMrr~r7r})rbrkr]�merged_cookiesr|�pr$r$r(�prepare_requestEs(							zSession.prepare_requestNTcCs�t|�}td|j�d|d|d|d|p9id|pEid|d|d	|�	}|j|�}|pui}|jrt|�p�i}x*|j�D]\}}|j||�q�W|r�|d
k	r�tj	j
d�}n|r|d
k	rtj	j
d�}qnt||j�}t|
|j
�}
t||j�}t||j�}i|
d
6|	d6|d6|d6|d6|
d6}|j||�}|S)a4Constructs a :class:`Request <Request>`, prepares it and sends it.
        Returns :class:`Response <Response>` object.

        :param method: method for the new :class:`Request` object.
        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary or bytes to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of 'filename': file-like-objects
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) Float describing the timeout of the
            request in seconds.
        :param allow_redirects: (optional) Boolean. Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol to the URL of
            the proxy.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) if ``True``, the SSL cert will be verified.
            A CA_BUNDLE path can also be provided.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair.
        rNrPrMr�r�r~r|r]r}F�REQUESTS_CA_BUNDLE�CURL_CA_BUNDLEr?r@rArBrCrD)r
rr�r�rmrr,rr�os�environr4r2rCr?rArBra)rbrNrPr~r�rMr]r�r|r@rDrCr}r?rArBrd�prep�env_proxiesr&r'�send_kwargsrcr$r$r(rklsD,		
zSession.requestcKs#|jdd�|jd||�S)z�Sends a GET request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        rDTr<)rrrk)rbrP�kwargsr$r$r(r4�szSession.getcKs#|jdd�|jd||�S)z�Sends a OPTIONS request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        rDT�OPTIONS)rrrk)rbrPr�r$r$r(�options�szSession.optionscKs#|jdd�|jd||�S)z�Sends a HEAD request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        rDFr;)rrrk)rbrPr�r$r$r(�head�szSession.headcKs|jd|d||�S)a8Sends a POST request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        r=r�)rk)rbrPr�r�r$r$r(�post�szSession.postcKs|jd|d||�S)a7Sends a PUT request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        �PUTr�)rk)rbrPr�r�r$r$r(�put�szSession.putcKs|jd|d||�S)a9Sends a PATCH request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        �PATCHr�)rk)rbrPr�r�r$r$r(�patch�sz
Session.patchcKs|jd||�S)z�Sends a DELETE request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        �DELETE)rk)rbrPr�r$r$r(�deleteszSession.deletec
Ks|jd|j�|jd|j�|jd|j�|jd|j�t|t�sjtd��n|jdd�}|j	d�}|j	d�}|j	d�}|j	d�}|j	d�}|j
}	|jd	|j�}
t
j�}|
j||�}t
j�||_td
|	||�}|jrdx-|jD]}
t|j|
j|
j�q>Wnt|j||j�|j||d|d|d|d|d|�}|r�dd�|D�ng}|r�|jd
|�|j�}||_n|s|jn|S)zSend a given PreparedRequest.r?rArBrCz#You can only send PreparedRequests.rDTr@rPr3cSsg|]}|�qSr$r$)r%rcr$r$r(�
<listcomp>Is	z Session.send.<locals>.<listcomp>r)rrr?rArBrCr*r�
ValueError�popr4r}�get_adapterrPr�utcnowra�elapsedr�historyrr]rkrIri�insertrG)rbrkr�rDr?r@rArBrCr}�adapter�start�rrc�genr�r$r$r(rasH		 	
zSession.sendcCsMx6|jj�D]%\}}|j�j|�r|SqWtd|��dS)z>Returns the appropriate connnection adapter for the given URL.z*No connection adapters were found for '%s'N)r�r,�lowerrOr)rbrP�prefixr�r$r$r(r�XszSession.get_adaptercCs(x!|jj�D]}|j�qWdS)z+Closes all adapters and as such the sessionN)r��valuesrL)rbr'r$r$r(rLbsz
Session.closecsW||j�<�fdd�|jD�}x'|D]}|jj|�|j|<q0WdS)zkRegisters a connection adapter to a prefix.

        Adapters are sorted in descending order by key length.cs.g|]$}t|�t��kr|�qSr$)�len)r%r&)r�r$r(r�ms	z!Session.mount.<locals>.<listcomp>N)r�r�)rbr�r��keys_to_move�keyr$)r�r(r�gs

z
Session.mountcs t�fdd��jD��S)Nc3s'|]}|t�|d�fVqdS)N)�getattr)r%�attr)rbr$r(r)ssz'Session.__getstate__.<locals>.<genexpr>)r-�	__attrs__)rbr$)rbr(�__getstate__rszSession.__getstate__cCs1x*|j�D]\}}t|||�q
WdS)N)r,�setattr)rb�stater��valuer$r$r(�__setstate__uszSession.__setstate__)rxryrz�__doc__r�r�r�r�r�rkr4r�r�r�r�r�r�rar�rLr�r�r�r$r$r$r(r{�sD3(S





	G
r{cCst�S)z2Returns a :class:`Session` for context-management.)r{r$r$r$r(�sessionzsr�)4r�r��collectionsrrr|r�compatrrrr	r
r]rrr
r�modelsrrrr}rr�utilsrrr�
exceptionsrrrr�
structuresrr�rrrrr r!�status_codesr"r#r2r7�objectr8r{r�r$r$r$r(�<module>
s*(""(!���python3.4/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-34.pyc000064400000041216151735047540023144 0ustar00�
�ReN�@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddlm
Z
ddlmZddlmZmZmZmZmZmZmZmZmZmZmZddlmZmZdd	lm Z dd
l!m"Z"efZ#dSZ$e
j%�Z&d
d�Z'dd�Z(dd�Z)dd�Z*dd�Z+dd�Z,dd�Z-dd�Z.ddd�Z/d d!�Z0d"d#�Z1d$d%�Z2d&d'�Z3d(d)�Z4d*d+�Z5d,d-�Z6e7d.d/�Z8d0d1�Z9d2d3�Z:d4d5�Z;d6d7�Z<d8d9�Z=d:d;�Z>d<d=�Z?d>d?�Z@d@dAdB�ZAdCdD�ZBdEdF�ZCdGjDdH�ZEeEdIZFeEdJZGdKdL�ZHdMdN�ZIdOdP�ZJdHdQdR�ZKdS)Tz�
requests.utils
~~~~~~~~~~~~~~

This module provides utility functions that are used within Requests
that are also useful for external consumption.

�N�)�__version__)�certs)�parse_http_list)�quote�urlparse�bytes�str�OrderedDict�unquote�is_py2�builtin_str�
getproxies�proxy_bypass�
urlunparse)�RequestsCookieJar�cookiejar_from_dict)�CaseInsensitiveDict)�
InvalidURL�.netrc�_netrccCs"t|d�r|j�}n|S)z/Returns an internal sequence dictionary update.�items)�hasattrr)�d�r�5/tmp/pip-ztkk0jow-build/pip/_vendor/requests/utils.py�dict_to_sequence'srcCs�t|d�rt|�St|d�r/|jSt|d�ryy|j�}Wntjk
reYqyXtj|�jSnt|d�r�t|j��SdS)N�__len__�len�fileno�getvalue)	rrr�io�UnsupportedOperation�os�fstat�st_sizer )�orrrr�	super_len0s
r'c
Cs8yddlm}m}d}xbtD]Z}ytjjdj|��}Wntk
rcdSYnXtjj|�r&|}Pq&q&W|dkr�dSt	|�}|j
jd�d}yG||�j|�}|r�|dr�dnd}	||	|dfSWn|t
fk
rYnXWnttfk
r3YnXdS)z;Returns the Requests tuple auth for a given url from netrc.r)�netrc�NetrcParseErrorNz~/{0}�:r�)r(r)�NETRC_FILESr#�path�
expanduser�format�KeyError�existsr�netloc�split�authenticators�IOError�ImportError�AttributeError)
�urlr(r)�
netrc_path�f�loc�ri�hostr�login_irrr�get_netrc_authDs0

		r?cCsLt|dd�}|rH|ddkrH|ddkrHtjj|�SdS)z0Tries to guess the filename of the given object.�nameNr�<r�>���)�getattrr#r-�basename)�objr@rrr�guess_filenamers&rGcCsD|dkrdSt|ttttf�r:td��nt|�S)a�Take an object and test to see if it can be represented as a
    dictionary. Unless it can not be represented as such, return an
    OrderedDict, e.g.,

    ::

        >>> from_key_val_list([('key', 'val')])
        OrderedDict([('key', 'val')])
        >>> from_key_val_list('string')
        ValueError: need more than 1 value to unpack
        >>> from_key_val_list({'key': 'val'})
        OrderedDict([('key', 'val')])
    Nz+cannot encode objects that are not 2-tuples)�
isinstancer	r�bool�int�
ValueErrorr
)�valuerrr�from_key_val_listys
rMcCse|dkrdSt|ttttf�r:td��nt|tj�r[|j�}nt	|�S)azTake an object and test to see if it can be represented as a
    dictionary. If it can be, return a list of tuples, e.g.,

    ::

        >>> to_key_val_list([('key', 'val')])
        [('key', 'val')]
        >>> to_key_val_list({'key': 'val'})
        [('key', 'val')]
        >>> to_key_val_list('string')
        ValueError: cannot encode objects that are not 2-tuples.
    Nz+cannot encode objects that are not 2-tuples)
rHr	rrIrJrK�collections�Mappingr�list)rLrrr�to_key_val_list�s
rQcCswg}xjt|�D]\}|dd�|dd�koDdknrbt|dd��}n|j|�qW|S)a�Parse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Quotes are removed automatically after parsing.

    It basically works like :func:`parse_set_header` just that items
    may appear multiple times and case sensitivity is preserved.

    The return value is a standard :class:`list`:

    >>> parse_list_header('token, "quoted value"')
    ['token', 'quoted value']

    To create a header from the :class:`list` again, use the
    :func:`dump_header` function.

    :param value: a string with a list header.
    :return: :class:`list`
    Nr�"rCrC)�_parse_list_header�unquote_header_value�append)rL�result�itemrrr�parse_list_header�s0rXcCs�i}x�t|�D]�}d|kr5d||<qn|jdd�\}}|dd�|dd�koxdknr�t|dd��}n|||<qW|S)aMParse lists of key, value pairs as described by RFC 2068 Section 2 and
    convert them into a python dict:

    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
    >>> type(d) is dict
    True
    >>> sorted(d.items())
    [('bar', 'as well'), ('foo', 'is a fish')]

    If there is no value for a key it will be `None`:

    >>> parse_dict_header('key_without_value')
    {'key_without_value': None}

    To create a header from the :class:`dict` again, use the
    :func:`dump_header` function.

    :param value: a string with a dict header.
    :return: :class:`dict`
    �=NrrRrCrC)rSr3rT)rLrVrWr@rrr�parse_dict_header�s
0rZFcCsz|rv|d|d	ko%dknrv|dd
�}|sW|dd�dkrv|jdd�jdd�Sn|S)z�Unquotes a header value.  (Reversal of :func:`quote_header_value`).
    This does not use the real unquoting but what browsers are actually
    using for quoting.

    :param value: the header value to unquote.
    rrrRNr+z\\�\z\"rCrC)�replace)rL�is_filenamerrrrT�s
*rTcCs+i}x|D]}|j||j<q
W|S)zoReturns a key/value dictionary from a CookieJar.

    :param cj: CookieJar object to extract cookies from.
    )rLr@)�cj�cookie_dict�cookierrr�dict_from_cookiejars
racCst|�}|j|�|S)z�Returns a CookieJar from a key/value dictionary.

    :param cj: CookieJar to insert cookies into.
    :param cookie_dict: Dict of key/values to insert into CookieJar.
    )r�update)r^r_�cj2rrr�add_dict_to_cookiejars
rdcCsftjddtj�}tjddtj�}tjd�}|j|�|j|�|j|�S)zlReturns encodings from given content string.

    :param content: bytestring to extract encodings from.
    z!<meta.*?charset=["\']*(.+?)["\'>]�flagsz+<meta.*?content=["\']*;?charset=(.+?)["\'>]z$^<\?xml.*?encoding=["\']*(.+?)["\'>])�re�compile�I�findall)�content�
charset_re�	pragma_re�xml_rerrr�get_encodings_from_contents
rncCs_|jd�}|sdStj|�\}}d|krK|djd�Sd|kr[dSdS)zmReturns encodings from given HTTP Header Dict.

    :param headers: dictionary to extract encoding from.
    zcontent-typeN�charsetz'"�textz
ISO-8859-1)�get�cgi�parse_header�strip)�headers�content_type�paramsrrr�get_encoding_from_headers,srxccs�|jdkr)x|D]}|VqWdStj|j�dd�}x+|D]#}|j|�}|rK|VqKqKW|jddd�}|r�|VndS)zStream decodes a iterator.N�errorsr\��finalT)�encoding�codecs�getincrementaldecoder�decode)�iterator�rrW�decoder�chunk�rvrrr�stream_decode_response_unicode@s
	
r�ccs@d}x3|t|�kr;||||�V||7}q	WdS)z Iterate over slices of a string.rN)r)�string�slice_length�posrrr�iter_slicesRsr�cCs�g}t|j�}|rTyt|j|�SWqTtk
rP|j|�YqTXnyt|j|dd�SWntk
r�|jSYnXdS)aReturns the requested content back in unicode.

    :param r: Response object to get unicode content from.

    Tried:

    1. charset from content-type

    2. every encodings from ``<meta ... charset=XXX>``

    3. fall back and replace all unicode characters

    ryr\N)rxrur	rj�UnicodeErrorrU�	TypeError)r��tried_encodingsr|rrr�get_unicode_from_responseZs

r�Z4ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzz0123456789-._~c
Cs�|jd�}x�tdt|��D]�}||dd�}t|�dkr�|j�r�ytt|d��}Wn"tk
r�td|��YnX|tkr�|||dd�||<q�d||||<q%d||||<q%Wdj	|�S)	z�Un-escape any percent-escape sequences in a URI that are unreserved
    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
    �%rrr+�z%Invalid percent-escape sequence: '%s'N�)
r3�ranger�isalnum�chrrJrKr�UNRESERVED_SET�join)�uri�parts�i�h�crrr�unquote_unreserved�s
r�cCstt|�dd�S)z�Re-quote the given URI.

    This function passes the given URI through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.
    �safez!#$%&'()*+,/:;=?@[]~)rr�)r�rrr�requote_uri�s	r�cCs�tjdtj|��d}|jd�\}}tjdtjtt|����d}tjdtj|��d|@}||@||@kS)z�
    This function allows you to check if on IP belongs to a network subnet
    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
    z=Lr�/)�struct�unpack�socket�	inet_atonr3�dotted_netmaskrJ)�ip�net�ipaddr�netaddr�bits�netmask�networkrrr�address_in_network�s
+#r�cCs/ddd|>dA}tjtjd|��S)zt
    Converts mask from /xx format to xxx.xxx.xxx.xxx
    Example: if mask is 24 function returns 255.255.255.0
    l��r� z>I)r��	inet_ntoar��pack)�maskr�rrrr��sr�cCs1ytj|�Wntjk
r,dSYnXdS)NFT)r�r��error)�	string_iprrr�is_ipv4_address�s
	r�cCs�|jd�dkr�yt|jd�d�}Wntk
rJdSYnX|dksc|dkrgdSytj|jd�d�Wq�tjk
r�dSYq�XndSdS)z9Very simple check of the cidr format in no_proxy variabler�rFr�rT)�countrJr3rKr�r�r�)�string_networkr�rrr�
is_valid_cidr�s
	r�cCs"dd�}|d�}t|�j}|r�|jdd�jd�}|jd�d}t|�r�xs|D](}t|�rnt||�r�d	SqnqnWq�x@|D]5}|j|�s�|jd�dj|�r�d	Sq�Wnyt|�}Wn!t	t
jfk
rd
}YnX|rd	Sd
S)z:
    Returns whether we should bypass proxies or not.
    cSs(tjj|�p'tjj|j��S)N)r#�environrq�upper)�krrr�<lambda>�sz'should_bypass_proxies.<locals>.<lambda>�no_proxy� r��,r*rTF)rr2r\r3r�r�r��endswithrr�r��gaierror)r8�	get_proxyr�r2r��proxy_ipr=�bypassrrr�should_bypass_proxies�s*

+r�cCst|�riSt�SdS)z%Return a dict of environment proxies.N)r�r)r8rrr�get_environ_proxiessr�zpython-requestscCs8tj�}|dkr'tj�}n�|dkr�dtjjtjjtjjf}tjjdkr�dj	|tjjg�}q�n<|dkr�tj�}n!|dkr�tj�}nd}ytj
�}tj�}Wntk
rd}d}YnXd	j	d
|t
fd
||fd
||fg�S)z4Return a string representing the default user agent.�CPython�PyPyz%s.%s.%sr{r��Jython�
IronPython�Unknownr�z%s/%s)�platform�python_implementation�python_version�sys�pypy_version_info�major�minor�micro�releaselevelr��system�releaser5r)r@�_implementation�_implementation_version�p_system�	p_releaserrr�default_user_agent
s.	!

r�cCs+tit�d6djd�d6dd6�S)	Nz
User-Agentz, �gzip�deflatezAccept-Encodingz*/*�Accept)zgzipzdeflate)rr�r�rrrr�default_headers)s
r�c	Cs�g}d}x�|jd�D]�}y|jdd�\}}Wntk
r_|d}}YnXi}|jd�|d<xb|jd�D]Q}y|jd�\}}Wntk
r�PYnX|j|�||j|�<q�W|j|�qW|S)	z�Return a dict of parsed link headers proxies.

    i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

    z '"r��;rr�z<> '"r8rY)r3rKrtrU)	rL�links�
replace_chars�valr8rw�link�param�keyrrr�parse_header_links1s"

 r���asciir+�cCs|dd�}|tjtjfkr,dS|dd�tjkrIdS|dd�tjtjfkrodS|jt�}|dkr�dS|dkr�|ddd�tkr�d	S|d
dd�tkr�dSn|dkr|dd�t	kr�dS|d
d�t	krd
SndS)N�zutf-32r�z	utf-8-sigr+zutf-16rzutf-8z	utf-16-berz	utf-16-lez	utf-32-bez	utf-32-le)
r}�BOM_UTF32_LE�BOM32_BE�BOM_UTF8�BOM_UTF16_LE�BOM_UTF16_BEr��_null�_null2�_null3)�data�sample�	nullcountrrr�guess_json_utfYs*"r�cCsSt||�\}}}}}}|s7||}}nt||||||f�S)z�Given a URL that may or may not have a scheme, prepend the given scheme.
    Does not replace a present scheme with the one provided as an argument.)rr)r8�
new_scheme�schemer2r-rw�query�fragmentrrr�prepend_scheme_if_neededvs!r�cCsSt|�}y"t|j�t|j�f}Wnttfk
rNd}YnX|S)z_Given a url with authentication components, extract them into a tuple of
    username,password.r�)r�r�)rr�username�passwordr7r�)r8�parsed�authrrr�get_auth_from_url�s"r�cCsId}t|t�r|}n'tr6|j|�}n|j|�}|S)z�
    Given a string object, regardless of type, returns a representation of that
    string in the native string type, encoding and decoding where necessary.
    This assumes ASCII unless told otherwise.
    N)rHr
r�encoder)r�r|�outrrr�to_native_string�s	r)rz_netrc)L�__doc__rrr}rNr!r#r�rfr�r�r�r�rr�compatrrSrrrr	r
rrr
rrr�cookiesrr�
structuresr�
exceptionsr�_hush_pyflakesr,�where�DEFAULT_CA_BUNDLE_PATHrr'r?rGrMrQrXrZrTrardrnrxr�r�r��	frozensetr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�<module>
srL		.""

	-#


python3.4/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-34.pyc000064400000006462151735047540024171 0ustar00�
�ReU�@sDdZddlmZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�Z	Gdd�de�Z
Gdd�de�ZGdd�dee�Z
Gdd�dee�ZGdd�dee�ZGdd�de�ZGdd�dee�ZdS)za
requests.exceptions
~~~~~~~~~~~~~~~~~~~

This module contains the set of Requests' exceptions.

�)�	HTTPErrorcs(eZdZdZ�fdd�Z�S)�RequestExceptionzOThere was an ambiguous exception that occurred while handling your
    request.cs�|jdd�}||_|jdd�|_|dk	rg|jrgt|d�rg|jj|_ntt|�j||�dS)zT
        Initialize RequestException with `request` and `response` objects.
        �responseN�request)�poprr�hasattr�superr�__init__)�self�args�kwargsr)�	__class__��:/tmp/pip-ztkk0jow-build/pip/_vendor/requests/exceptions.pyr	s	zRequestException.__init__)�__name__�
__module__�__qualname__�__doc__r	rr)r
rr
src@seZdZdZdS)rzAn HTTP error occurred.N)rrrrrrrrrsrc@seZdZdZdS)�ConnectionErrorzA Connection error occurred.N)rrrrrrrrr"src@seZdZdZdS)�
ProxyErrorzA proxy error occurred.N)rrrrrrrrr&src@seZdZdZdS)�SSLErrorzAn SSL error occurred.N)rrrrrrrrr*src@seZdZdZdS)�TimeoutzThe request timed out.N)rrrrrrrrr.src@seZdZdZdS)�URLRequiredz*A valid URL is required to make a request.N)rrrrrrrrr2src@seZdZdZdS)�TooManyRedirectszToo many redirects.N)rrrrrrrrr6src@seZdZdZdS)�
MissingSchemaz/The URL schema (e.g. http or https) is missing.N)rrrrrrrrr:src@seZdZdZdS)�
InvalidSchemaz"See defaults.py for valid schemas.N)rrrrrrrrr>src@seZdZdZdS)�
InvalidURLz' The URL provided was somehow invalid. N)rrrrrrrrrBsrc@seZdZdZdS)�ChunkedEncodingErrorz?The server declared chunked encoding but sent an invalid chunk.N)rrrrrrrrrFsrc@seZdZdZdS)�ContentDecodingErrorz!Failed to decode response contentN)rrrrrrrrrJsrN)rZpackages.urllib3.exceptionsr�
BaseHTTPError�IOErrorrrrrrrr�
ValueErrorrrrrrrrrr�<module>	spython3.4/site-packages/pip/_vendor/requests/status_codes.py000064400000006100151735047540020213 0ustar00# -*- coding: utf-8 -*-

from .structures import LookupDict

_codes = {

    # Informational.
    100: ('continue',),
    101: ('switching_protocols',),
    102: ('processing',),
    103: ('checkpoint',),
    122: ('uri_too_long', 'request_uri_too_long'),
    200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/', '✓'),
    201: ('created',),
    202: ('accepted',),
    203: ('non_authoritative_info', 'non_authoritative_information'),
    204: ('no_content',),
    205: ('reset_content', 'reset'),
    206: ('partial_content', 'partial'),
    207: ('multi_status', 'multiple_status', 'multi_stati', 'multiple_stati'),
    208: ('already_reported',),
    226: ('im_used',),

    # Redirection.
    300: ('multiple_choices',),
    301: ('moved_permanently', 'moved', '\\o-'),
    302: ('found',),
    303: ('see_other', 'other'),
    304: ('not_modified',),
    305: ('use_proxy',),
    306: ('switch_proxy',),
    307: ('temporary_redirect', 'temporary_moved', 'temporary'),
    308: ('resume_incomplete', 'resume'),

    # Client Error.
    400: ('bad_request', 'bad'),
    401: ('unauthorized',),
    402: ('payment_required', 'payment'),
    403: ('forbidden',),
    404: ('not_found', '-o-'),
    405: ('method_not_allowed', 'not_allowed'),
    406: ('not_acceptable',),
    407: ('proxy_authentication_required', 'proxy_auth', 'proxy_authentication'),
    408: ('request_timeout', 'timeout'),
    409: ('conflict',),
    410: ('gone',),
    411: ('length_required',),
    412: ('precondition_failed', 'precondition'),
    413: ('request_entity_too_large',),
    414: ('request_uri_too_large',),
    415: ('unsupported_media_type', 'unsupported_media', 'media_type'),
    416: ('requested_range_not_satisfiable', 'requested_range', 'range_not_satisfiable'),
    417: ('expectation_failed',),
    418: ('im_a_teapot', 'teapot', 'i_am_a_teapot'),
    422: ('unprocessable_entity', 'unprocessable'),
    423: ('locked',),
    424: ('failed_dependency', 'dependency'),
    425: ('unordered_collection', 'unordered'),
    426: ('upgrade_required', 'upgrade'),
    428: ('precondition_required', 'precondition'),
    429: ('too_many_requests', 'too_many'),
    431: ('header_fields_too_large', 'fields_too_large'),
    444: ('no_response', 'none'),
    449: ('retry_with', 'retry'),
    450: ('blocked_by_windows_parental_controls', 'parental_controls'),
    451: ('unavailable_for_legal_reasons', 'legal_reasons'),
    499: ('client_closed_request',),

    # Server Error.
    500: ('internal_server_error', 'server_error', '/o\\', '✗'),
    501: ('not_implemented',),
    502: ('bad_gateway',),
    503: ('service_unavailable', 'unavailable'),
    504: ('gateway_timeout',),
    505: ('http_version_not_supported', 'http_version'),
    506: ('variant_also_negotiates',),
    507: ('insufficient_storage',),
    509: ('bandwidth_limit_exceeded', 'bandwidth'),
    510: ('not_extended',),
}

codes = LookupDict(name='status_codes')

for (code, titles) in list(_codes.items()):
    for title in titles:
        setattr(codes, title, code)
        if not title.startswith('\\'):
            setattr(codes, title.upper(), code)
python3.4/site-packages/pip/_vendor/requests/structures.py000064400000006725151735047540017753 0ustar00# -*- coding: utf-8 -*-

"""
requests.structures
~~~~~~~~~~~~~~~~~~~

Data structures that power Requests.

"""

import os
import collections
from itertools import islice


class IteratorProxy(object):
    """docstring for IteratorProxy"""
    def __init__(self, i):
        self.i = i
        # self.i = chain.from_iterable(i)

    def __iter__(self):
        return self.i

    def __len__(self):
        if hasattr(self.i, '__len__'):
            return len(self.i)
        if hasattr(self.i, 'len'):
            return self.i.len
        if hasattr(self.i, 'fileno'):
            return os.fstat(self.i.fileno()).st_size

    def read(self, n):
        return "".join(islice(self.i, None, n))


class CaseInsensitiveDict(collections.MutableMapping):
    """
    A case-insensitive ``dict``-like object.

    Implements all methods and operations of
    ``collections.MutableMapping`` as well as dict's ``copy``. Also
    provides ``lower_items``.

    All keys are expected to be strings. The structure remembers the
    case of the last key to be set, and ``iter(instance)``,
    ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()``
    will contain case-sensitive keys. However, querying and contains
    testing is case insensitive:

        cid = CaseInsensitiveDict()
        cid['Accept'] = 'application/json'
        cid['aCCEPT'] == 'application/json'  # True
        list(cid) == ['Accept']  # True

    For example, ``headers['content-encoding']`` will return the
    value of a ``'Content-Encoding'`` response header, regardless
    of how the header name was originally stored.

    If the constructor, ``.update``, or equality comparison
    operations are given keys that have equal ``.lower()``s, the
    behavior is undefined.

    """
    def __init__(self, data=None, **kwargs):
        self._store = dict()
        if data is None:
            data = {}
        self.update(data, **kwargs)

    def __setitem__(self, key, value):
        # Use the lowercased key for lookups, but store the actual
        # key alongside the value.
        self._store[key.lower()] = (key, value)

    def __getitem__(self, key):
        return self._store[key.lower()][1]

    def __delitem__(self, key):
        del self._store[key.lower()]

    def __iter__(self):
        return (casedkey for casedkey, mappedvalue in self._store.values())

    def __len__(self):
        return len(self._store)

    def lower_items(self):
        """Like iteritems(), but with all lowercase keys."""
        return (
            (lowerkey, keyval[1])
            for (lowerkey, keyval)
            in self._store.items()
        )

    def __eq__(self, other):
        if isinstance(other, collections.Mapping):
            other = CaseInsensitiveDict(other)
        else:
            return NotImplemented
        # Compare insensitively
        return dict(self.lower_items()) == dict(other.lower_items())

    # Copy is required
    def copy(self):
        return CaseInsensitiveDict(self._store.values())

    def __repr__(self):
        return str(dict(self.items()))

class LookupDict(dict):
    """Dictionary lookup object."""

    def __init__(self, name=None):
        self.name = name
        super(LookupDict, self).__init__()

    def __repr__(self):
        return '<lookup \'%s\'>' % (self.name)

    def __getitem__(self, key):
        # We allow fall-through here, so values default to None

        return self.__dict__.get(key, None)

    def get(self, key, default=None):
        return self.__dict__.get(key, default)
python3.4/site-packages/pip/_vendor/requests/sessions.py000064400000053422151735047540017372 0ustar00# -*- coding: utf-8 -*-

"""
requests.session
~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).

"""
import os
from collections import Mapping
from datetime import datetime

from .auth import _basic_auth_str
from .compat import cookielib, OrderedDict, urljoin, urlparse, builtin_str
from .cookies import (
    cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)
from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook
from .utils import to_key_val_list, default_headers, to_native_string
from .exceptions import (
    TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)
from .structures import CaseInsensitiveDict

from .adapters import HTTPAdapter

from .utils import (
    requote_uri, get_environ_proxies, get_netrc_auth, should_bypass_proxies,
    get_auth_from_url
)

from .status_codes import codes

# formerly defined here, reexposed here for backward compatibility
from .models import REDIRECT_STATI


def merge_setting(request_setting, session_setting, dict_class=OrderedDict):
    """
    Determines appropriate setting for a given request, taking into account the
    explicit setting on that request, and the setting in the session. If a
    setting is a dictionary, they will be merged together using `dict_class`
    """

    if session_setting is None:
        return request_setting

    if request_setting is None:
        return session_setting

    # Bypass if not a dictionary (e.g. verify)
    if not (
            isinstance(session_setting, Mapping) and
            isinstance(request_setting, Mapping)
    ):
        return request_setting

    merged_setting = dict_class(to_key_val_list(session_setting))
    merged_setting.update(to_key_val_list(request_setting))

    # Remove keys that are set to None.
    for (k, v) in request_setting.items():
        if v is None:
            del merged_setting[k]

    merged_setting = dict((k, v) for (k, v) in merged_setting.items() if v is not None)

    return merged_setting


def merge_hooks(request_hooks, session_hooks, dict_class=OrderedDict):
    """
    Properly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    """
    if session_hooks is None or session_hooks.get('response') == []:
        return request_hooks

    if request_hooks is None or request_hooks.get('response') == []:
        return session_hooks

    return merge_setting(request_hooks, session_hooks, dict_class)


class SessionRedirectMixin(object):
    def resolve_redirects(self, resp, req, stream=False, timeout=None,
                          verify=True, cert=None, proxies=None):
        """Receives a Response. Returns a generator of Responses."""

        i = 0

        while resp.is_redirect:
            prepared_request = req.copy()

            try:
                resp.content  # Consume socket so it can be released
            except (ChunkedEncodingError, ContentDecodingError, RuntimeError):
                resp.raw.read(decode_content=False)

            if i >= self.max_redirects:
                raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)

            # Release the connection back into the pool.
            resp.close()

            url = resp.headers['location']
            method = req.method

            # Handle redirection without scheme (see: RFC 1808 Section 4)
            if url.startswith('//'):
                parsed_rurl = urlparse(resp.url)
                url = '%s:%s' % (parsed_rurl.scheme, url)

            # The scheme should be lower case...
            parsed = urlparse(url)
            url = parsed.geturl()

            # Facilitate non-RFC2616-compliant 'location' headers
            # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')
            # Compliant with RFC3986, we percent encode the url.
            if not urlparse(url).netloc:
                url = urljoin(resp.url, requote_uri(url))
            else:
                url = requote_uri(url)

            prepared_request.url = to_native_string(url)

            # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
            if (resp.status_code == codes.see_other and
                    method != 'HEAD'):
                method = 'GET'

            # Do what the browsers do, despite standards...
            # First, turn 302s into GETs.
            if resp.status_code == codes.found and method != 'HEAD':
                method = 'GET'

            # Second, if a POST is responded to with a 301, turn it into a GET.
            # This bizarre behaviour is explained in Issue 1704.
            if resp.status_code == codes.moved and method == 'POST':
                method = 'GET'

            prepared_request.method = method

            # https://github.com/kennethreitz/requests/issues/1084
            if resp.status_code not in (codes.temporary, codes.resume):
                if 'Content-Length' in prepared_request.headers:
                    del prepared_request.headers['Content-Length']

                prepared_request.body = None

            headers = prepared_request.headers
            try:
                del headers['Cookie']
            except KeyError:
                pass

            extract_cookies_to_jar(prepared_request._cookies, prepared_request, resp.raw)
            prepared_request._cookies.update(self.cookies)
            prepared_request.prepare_cookies(prepared_request._cookies)

            # Rebuild auth and proxy information.
            proxies = self.rebuild_proxies(prepared_request, proxies)
            self.rebuild_auth(prepared_request, resp)

            # Override the original request.
            req = prepared_request

            resp = self.send(
                req,
                stream=stream,
                timeout=timeout,
                verify=verify,
                cert=cert,
                proxies=proxies,
                allow_redirects=False,
            )

            extract_cookies_to_jar(self.cookies, prepared_request, resp.raw)

            i += 1
            yield resp

    def rebuild_auth(self, prepared_request, response):
        """
        When being redirected we may want to strip authentication from the
        request to avoid leaking credentials. This method intelligently removes
        and reapplies authentication where possible to avoid credential loss.
        """
        headers = prepared_request.headers
        url = prepared_request.url

        if 'Authorization' in headers:
            # If we get redirected to a new host, we should strip out any
            # authentication headers.
            original_parsed = urlparse(response.request.url)
            redirect_parsed = urlparse(url)

            if (original_parsed.hostname != redirect_parsed.hostname):
                del headers['Authorization']

        # .netrc might have more auth for us on our new host.
        new_auth = get_netrc_auth(url) if self.trust_env else None
        if new_auth is not None:
            prepared_request.prepare_auth(new_auth)

        return

    def rebuild_proxies(self, prepared_request, proxies):
        """
        This method re-evaluates the proxy configuration by considering the
        environment variables. If we are redirected to a URL covered by
        NO_PROXY, we strip the proxy configuration. Otherwise, we set missing
        proxy keys for this URL (in case they were stripped by a previous
        redirect).

        This method also replaces the Proxy-Authorization header where
        necessary.
        """
        headers = prepared_request.headers
        url = prepared_request.url
        scheme = urlparse(url).scheme
        new_proxies = proxies.copy() if proxies is not None else {}

        if self.trust_env and not should_bypass_proxies(url):
            environ_proxies = get_environ_proxies(url)

            proxy = environ_proxies.get(scheme)

            if proxy:
                new_proxies.setdefault(scheme, environ_proxies[scheme])

        if 'Proxy-Authorization' in headers:
            del headers['Proxy-Authorization']

        try:
            username, password = get_auth_from_url(new_proxies[scheme])
        except KeyError:
            username, password = None, None

        if username and password:
            headers['Proxy-Authorization'] = _basic_auth_str(username, password)

        return new_proxies


class Session(SessionRedirectMixin):
    """A Requests session.

    Provides cookie persistence, connection-pooling, and configuration.

    Basic Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> s.get('http://httpbin.org/get')
      200
    """

    __attrs__ = [
        'headers', 'cookies', 'auth', 'timeout', 'proxies', 'hooks',
        'params', 'verify', 'cert', 'prefetch', 'adapters', 'stream',
        'trust_env', 'max_redirects']

    def __init__(self):

        #: A case-insensitive dictionary of headers to be sent on each
        #: :class:`Request <Request>` sent from this
        #: :class:`Session <Session>`.
        self.headers = default_headers()

        #: Default Authentication tuple or object to attach to
        #: :class:`Request <Request>`.
        self.auth = None

        #: Dictionary mapping protocol to the URL of the proxy (e.g.
        #: {'http': 'foo.bar:3128'}) to be used on each
        #: :class:`Request <Request>`.
        self.proxies = {}

        #: Event-handling hooks.
        self.hooks = default_hooks()

        #: Dictionary of querystring data to attach to each
        #: :class:`Request <Request>`. The dictionary values may be lists for
        #: representing multivalued query parameters.
        self.params = {}

        #: Stream response content default.
        self.stream = False

        #: SSL Verification default.
        self.verify = True

        #: SSL certificate default.
        self.cert = None

        #: Maximum number of redirects allowed. If the request exceeds this
        #: limit, a :class:`TooManyRedirects` exception is raised.
        self.max_redirects = DEFAULT_REDIRECT_LIMIT

        #: Should we trust the environment?
        self.trust_env = True

        #: A CookieJar containing all currently outstanding cookies set on this
        #: session. By default it is a
        #: :class:`RequestsCookieJar <requests.cookies.RequestsCookieJar>`, but
        #: may be any other ``cookielib.CookieJar`` compatible object.
        self.cookies = cookiejar_from_dict({})

        # Default connection adapters.
        self.adapters = OrderedDict()
        self.mount('https://', HTTPAdapter())
        self.mount('http://', HTTPAdapter())

    def __enter__(self):
        return self

    def __exit__(self, *args):
        self.close()

    def prepare_request(self, request):
        """Constructs a :class:`PreparedRequest <PreparedRequest>` for
        transmission and returns it. The :class:`PreparedRequest` has settings
        merged from the :class:`Request <Request>` instance and those of the
        :class:`Session`.

        :param request: :class:`Request` instance to prepare with this
            session's settings.
        """
        cookies = request.cookies or {}

        # Bootstrap CookieJar.
        if not isinstance(cookies, cookielib.CookieJar):
            cookies = cookiejar_from_dict(cookies)

        # Merge with session cookies
        merged_cookies = merge_cookies(
            merge_cookies(RequestsCookieJar(), self.cookies), cookies)


        # Set environment's basic authentication if not explicitly set.
        auth = request.auth
        if self.trust_env and not auth and not self.auth:
            auth = get_netrc_auth(request.url)

        p = PreparedRequest()
        p.prepare(
            method=request.method.upper(),
            url=request.url,
            files=request.files,
            data=request.data,
            headers=merge_setting(request.headers, self.headers, dict_class=CaseInsensitiveDict),
            params=merge_setting(request.params, self.params),
            auth=merge_setting(auth, self.auth),
            cookies=merged_cookies,
            hooks=merge_hooks(request.hooks, self.hooks),
        )
        return p

    def request(self, method, url,
        params=None,
        data=None,
        headers=None,
        cookies=None,
        files=None,
        auth=None,
        timeout=None,
        allow_redirects=True,
        proxies=None,
        hooks=None,
        stream=None,
        verify=None,
        cert=None):
        """Constructs a :class:`Request <Request>`, prepares it and sends it.
        Returns :class:`Response <Response>` object.

        :param method: method for the new :class:`Request` object.
        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary or bytes to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of 'filename': file-like-objects
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) Float describing the timeout of the
            request in seconds.
        :param allow_redirects: (optional) Boolean. Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol to the URL of
            the proxy.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) if ``True``, the SSL cert will be verified.
            A CA_BUNDLE path can also be provided.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair.
        """

        method = builtin_str(method)

        # Create the Request.
        req = Request(
            method = method.upper(),
            url = url,
            headers = headers,
            files = files,
            data = data or {},
            params = params or {},
            auth = auth,
            cookies = cookies,
            hooks = hooks,
        )
        prep = self.prepare_request(req)

        proxies = proxies or {}

        # Gather clues from the surrounding environment.
        if self.trust_env:
            # Set environment's proxies.
            env_proxies = get_environ_proxies(url) or {}
            for (k, v) in env_proxies.items():
                proxies.setdefault(k, v)

            # Look for configuration.
            if not verify and verify is not False:
                verify = os.environ.get('REQUESTS_CA_BUNDLE')

            # Curl compatibility.
            if not verify and verify is not False:
                verify = os.environ.get('CURL_CA_BUNDLE')

        # Merge all the kwargs.
        proxies = merge_setting(proxies, self.proxies)
        stream = merge_setting(stream, self.stream)
        verify = merge_setting(verify, self.verify)
        cert = merge_setting(cert, self.cert)

        # Send the request.
        send_kwargs = {
            'stream': stream,
            'timeout': timeout,
            'verify': verify,
            'cert': cert,
            'proxies': proxies,
            'allow_redirects': allow_redirects,
        }
        resp = self.send(prep, **send_kwargs)

        return resp

    def get(self, url, **kwargs):
        """Sends a GET request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        kwargs.setdefault('allow_redirects', True)
        return self.request('GET', url, **kwargs)

    def options(self, url, **kwargs):
        """Sends a OPTIONS request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        kwargs.setdefault('allow_redirects', True)
        return self.request('OPTIONS', url, **kwargs)

    def head(self, url, **kwargs):
        """Sends a HEAD request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        kwargs.setdefault('allow_redirects', False)
        return self.request('HEAD', url, **kwargs)

    def post(self, url, data=None, **kwargs):
        """Sends a POST request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        return self.request('POST', url, data=data, **kwargs)

    def put(self, url, data=None, **kwargs):
        """Sends a PUT request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        return self.request('PUT', url, data=data, **kwargs)

    def patch(self, url, data=None, **kwargs):
        """Sends a PATCH request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        return self.request('PATCH', url,  data=data, **kwargs)

    def delete(self, url, **kwargs):
        """Sends a DELETE request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        """

        return self.request('DELETE', url, **kwargs)

    def send(self, request, **kwargs):
        """Send a given PreparedRequest."""
        # Set defaults that the hooks can utilize to ensure they always have
        # the correct parameters to reproduce the previous request.
        kwargs.setdefault('stream', self.stream)
        kwargs.setdefault('verify', self.verify)
        kwargs.setdefault('cert', self.cert)
        kwargs.setdefault('proxies', self.proxies)

        # It's possible that users might accidentally send a Request object.
        # Guard against that specific failure case.
        if not isinstance(request, PreparedRequest):
            raise ValueError('You can only send PreparedRequests.')

        # Set up variables needed for resolve_redirects and dispatching of hooks
        allow_redirects = kwargs.pop('allow_redirects', True)
        stream = kwargs.get('stream')
        timeout = kwargs.get('timeout')
        verify = kwargs.get('verify')
        cert = kwargs.get('cert')
        proxies = kwargs.get('proxies')
        hooks = request.hooks

        # Get the appropriate adapter to use
        adapter = self.get_adapter(url=request.url)

        # Start time (approximately) of the request
        start = datetime.utcnow()

        # Send the request
        r = adapter.send(request, **kwargs)

        # Total elapsed time of the request (approximately)
        r.elapsed = datetime.utcnow() - start

        # Response manipulation hooks
        r = dispatch_hook('response', hooks, r, **kwargs)

        # Persist cookies
        if r.history:

            # If the hooks create history then we want those cookies too
            for resp in r.history:
                extract_cookies_to_jar(self.cookies, resp.request, resp.raw)

        extract_cookies_to_jar(self.cookies, request, r.raw)

        # Redirect resolving generator.
        gen = self.resolve_redirects(r, request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies)

        # Resolve redirects if allowed.
        history = [resp for resp in gen] if allow_redirects else []

        # Shuffle things around if there's history.
        if history:
            # Insert the first (original) request at the start
            history.insert(0, r)
            # Get the last request made
            r = history.pop()
            r.history = history

        if not stream:
            r.content

        return r

    def get_adapter(self, url):
        """Returns the appropriate connnection adapter for the given URL."""
        for (prefix, adapter) in self.adapters.items():

            if url.lower().startswith(prefix):
                return adapter

        # Nothing matches :-/
        raise InvalidSchema("No connection adapters were found for '%s'" % url)

    def close(self):
        """Closes all adapters and as such the session"""
        for v in self.adapters.values():
            v.close()

    def mount(self, prefix, adapter):
        """Registers a connection adapter to a prefix.

        Adapters are sorted in descending order by key length."""

        self.adapters[prefix] = adapter
        keys_to_move = [k for k in self.adapters if len(k) < len(prefix)]

        for key in keys_to_move:
            self.adapters[key] = self.adapters.pop(key)

    def __getstate__(self):
        return dict((attr, getattr(self, attr, None)) for attr in self.__attrs__)

    def __setstate__(self, state):
        for attr, value in state.items():
            setattr(self, attr, value)


def session():
    """Returns a :class:`Session` for context-management."""

    return Session()
python3.4/site-packages/pip/_vendor/requests/api.py000064400000010370151735047540016270 0ustar00# -*- coding: utf-8 -*-

"""
requests.api
~~~~~~~~~~~~

This module implements the Requests API.

:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.

"""

from . import sessions


def request(method, url, **kwargs):
    """Constructs and sends a :class:`Request <Request>`.
    Returns :class:`Response <Response>` object.

    :param method: method for the new :class:`Request` object.
    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
    :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
    :param files: (optional) Dictionary of 'name': file-like-objects (or {'name': ('filename', fileobj)}) for multipart encoding upload.
    :param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
    :param timeout: (optional) Float describing the timeout of the request in seconds.
    :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.
    :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
    :param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.
    :param stream: (optional) if ``False``, the response content will be immediately downloaded.
    :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.

    Usage::

      >>> import requests
      >>> req = requests.request('GET', 'http://httpbin.org/get')
      <Response [200]>
    """

    session = sessions.Session()
    return session.request(method=method, url=url, **kwargs)


def get(url, **kwargs):
    """Sends a GET request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    kwargs.setdefault('allow_redirects', True)
    return request('get', url, **kwargs)


def options(url, **kwargs):
    """Sends a OPTIONS request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    kwargs.setdefault('allow_redirects', True)
    return request('options', url, **kwargs)


def head(url, **kwargs):
    """Sends a HEAD request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    kwargs.setdefault('allow_redirects', False)
    return request('head', url, **kwargs)


def post(url, data=None, **kwargs):
    """Sends a POST request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    return request('post', url, data=data, **kwargs)


def put(url, data=None, **kwargs):
    """Sends a PUT request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    return request('put', url, data=data, **kwargs)


def patch(url, data=None, **kwargs):
    """Sends a PATCH request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    return request('patch', url,  data=data, **kwargs)


def delete(url, **kwargs):
    """Sends a DELETE request. Returns :class:`Response` object.

    :param url: URL for the new :class:`Request` object.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    """

    return request('delete', url, **kwargs)
python3.4/site-packages/pip/_vendor/requests/__init__.py000064400000003500151735047540017253 0ustar00# -*- coding: utf-8 -*-

#   __
#  /__)  _  _     _   _ _/   _
# / (   (- (/ (/ (- _)  /  _)
#          /

"""
requests HTTP library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:

   >>> import requests
   >>> r = requests.get('http://python.org')
   >>> r.status_code
   200
   >>> 'Python is a programming language' in r.content
   True

... or POST:

   >>> payload = dict(key1='value1', key2='value2')
   >>> r = requests.post("http://httpbin.org/post", data=payload)
   >>> print(r.text)
   {
     ...
     "form": {
       "key2": "value2",
       "key1": "value1"
     },
     ...
   }

The other HTTP methods are supported - see `requests.api`. Full documentation
is at <http://python-requests.org>.

:copyright: (c) 2014 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.

"""

__title__ = 'requests'
__version__ = '2.3.0'
__build__ = 0x020300
__author__ = 'Kenneth Reitz'
__license__ = 'Apache 2.0'
__copyright__ = 'Copyright 2014 Kenneth Reitz'

# Attempt to enable urllib3's SNI support, if possible
try:
    from .packages.urllib3.contrib import pyopenssl
    pyopenssl.inject_into_urllib3()
except ImportError:
    pass

from . import utils
from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options
from .sessions import session, Session
from .status_codes import codes
from .exceptions import (
    RequestException, Timeout, URLRequired,
    TooManyRedirects, HTTPError, ConnectionError
)

# Set default logging handler to avoid "No handler found" warnings.
import logging
try:  # Python 2.7+
    from logging import NullHandler
except ImportError:
    class NullHandler(logging.Handler):
        def emit(self, record):
            pass

logging.getLogger(__name__).addHandler(NullHandler())
python3.4/site-packages/pip/_vendor/requests/auth.py000064400000013753151735047540016470 0ustar00# -*- coding: utf-8 -*-

"""
requests.auth
~~~~~~~~~~~~~

This module contains the authentication handlers for Requests.
"""

import os
import re
import time
import hashlib

from base64 import b64encode

from .compat import urlparse, str
from .cookies import extract_cookies_to_jar
from .utils import parse_dict_header

CONTENT_TYPE_FORM_URLENCODED = 'application/x-www-form-urlencoded'
CONTENT_TYPE_MULTI_PART = 'multipart/form-data'


def _basic_auth_str(username, password):
    """Returns a Basic Auth string."""

    return 'Basic ' + b64encode(('%s:%s' % (username, password)).encode('latin1')).strip().decode('latin1')


class AuthBase(object):
    """Base class that all auth implementations derive from"""

    def __call__(self, r):
        raise NotImplementedError('Auth hooks must be callable.')


class HTTPBasicAuth(AuthBase):
    """Attaches HTTP Basic Authentication to the given Request object."""
    def __init__(self, username, password):
        self.username = username
        self.password = password

    def __call__(self, r):
        r.headers['Authorization'] = _basic_auth_str(self.username, self.password)
        return r


class HTTPProxyAuth(HTTPBasicAuth):
    """Attaches HTTP Proxy Authentication to a given Request object."""
    def __call__(self, r):
        r.headers['Proxy-Authorization'] = _basic_auth_str(self.username, self.password)
        return r


class HTTPDigestAuth(AuthBase):
    """Attaches HTTP Digest Authentication to the given Request object."""
    def __init__(self, username, password):
        self.username = username
        self.password = password
        self.last_nonce = ''
        self.nonce_count = 0
        self.chal = {}
        self.pos = None

    def build_digest_header(self, method, url):

        realm = self.chal['realm']
        nonce = self.chal['nonce']
        qop = self.chal.get('qop')
        algorithm = self.chal.get('algorithm')
        opaque = self.chal.get('opaque')

        if algorithm is None:
            _algorithm = 'MD5'
        else:
            _algorithm = algorithm.upper()
        # lambdas assume digest modules are imported at the top level
        if _algorithm == 'MD5' or _algorithm == 'MD5-SESS':
            def md5_utf8(x):
                if isinstance(x, str):
                    x = x.encode('utf-8')
                return hashlib.md5(x).hexdigest()
            hash_utf8 = md5_utf8
        elif _algorithm == 'SHA':
            def sha_utf8(x):
                if isinstance(x, str):
                    x = x.encode('utf-8')
                return hashlib.sha1(x).hexdigest()
            hash_utf8 = sha_utf8

        KD = lambda s, d: hash_utf8("%s:%s" % (s, d))

        if hash_utf8 is None:
            return None

        # XXX not implemented yet
        entdig = None
        p_parsed = urlparse(url)
        path = p_parsed.path
        if p_parsed.query:
            path += '?' + p_parsed.query

        A1 = '%s:%s:%s' % (self.username, realm, self.password)
        A2 = '%s:%s' % (method, path)

        HA1 = hash_utf8(A1)
        HA2 = hash_utf8(A2)

        if nonce == self.last_nonce:
            self.nonce_count += 1
        else:
            self.nonce_count = 1
        ncvalue = '%08x' % self.nonce_count
        s = str(self.nonce_count).encode('utf-8')
        s += nonce.encode('utf-8')
        s += time.ctime().encode('utf-8')
        s += os.urandom(8)

        cnonce = (hashlib.sha1(s).hexdigest()[:16])
        noncebit = "%s:%s:%s:%s:%s" % (nonce, ncvalue, cnonce, qop, HA2)
        if _algorithm == 'MD5-SESS':
            HA1 = hash_utf8('%s:%s:%s' % (HA1, nonce, cnonce))

        if qop is None:
            respdig = KD(HA1, "%s:%s" % (nonce, HA2))
        elif qop == 'auth' or 'auth' in qop.split(','):
            respdig = KD(HA1, noncebit)
        else:
            # XXX handle auth-int.
            return None

        self.last_nonce = nonce

        # XXX should the partial digests be encoded too?
        base = 'username="%s", realm="%s", nonce="%s", uri="%s", ' \
               'response="%s"' % (self.username, realm, nonce, path, respdig)
        if opaque:
            base += ', opaque="%s"' % opaque
        if algorithm:
            base += ', algorithm="%s"' % algorithm
        if entdig:
            base += ', digest="%s"' % entdig
        if qop:
            base += ', qop="auth", nc=%s, cnonce="%s"' % (ncvalue, cnonce)

        return 'Digest %s' % (base)

    def handle_401(self, r, **kwargs):
        """Takes the given response and tries digest-auth, if needed."""

        if self.pos is not None:
            # Rewind the file position indicator of the body to where
            # it was to resend the request.
            r.request.body.seek(self.pos)
        num_401_calls = getattr(self, 'num_401_calls', 1)
        s_auth = r.headers.get('www-authenticate', '')

        if 'digest' in s_auth.lower() and num_401_calls < 2:

            setattr(self, 'num_401_calls', num_401_calls + 1)
            pat = re.compile(r'digest ', flags=re.IGNORECASE)
            self.chal = parse_dict_header(pat.sub('', s_auth, count=1))

            # Consume content and release the original connection
            # to allow our new request to reuse the same one.
            r.content
            r.raw.release_conn()
            prep = r.request.copy()
            extract_cookies_to_jar(prep._cookies, r.request, r.raw)
            prep.prepare_cookies(prep._cookies)

            prep.headers['Authorization'] = self.build_digest_header(
                prep.method, prep.url)
            _r = r.connection.send(prep, **kwargs)
            _r.history.append(r)
            _r.request = prep

            return _r

        setattr(self, 'num_401_calls', 1)
        return r

    def __call__(self, r):
        # If we have a saved nonce, skip the 401
        if self.last_nonce:
            r.headers['Authorization'] = self.build_digest_header(r.method, r.url)
        try:
            self.pos = r.body.tell()
        except AttributeError:
            pass
        r.register_hook('response', self.handle_401)
        return r
python3.4/site-packages/pip/_vendor/requests/hooks.py000064400000001464151735047540016646 0ustar00# -*- coding: utf-8 -*-

"""
requests.hooks
~~~~~~~~~~~~~~

This module provides the capabilities for the Requests hooks system.

Available hooks:

``response``:
    The response generated from a Request.

"""


HOOKS = ['response']


def default_hooks():
    hooks = {}
    for event in HOOKS:
        hooks[event] = []
    return hooks

# TODO: response is the only one


def dispatch_hook(key, hooks, hook_data, **kwargs):
    """Dispatches a hook dictionary on a given piece of data."""

    hooks = hooks or dict()

    if key in hooks:
        hooks = hooks.get(key)

        if hasattr(hooks, '__call__'):
            hooks = [hooks]

        for hook in hooks:
            _hook_data = hook(hook_data, **kwargs)
            if _hook_data is not None:
                hook_data = _hook_data

    return hook_data
python3.4/site-packages/pip/_vendor/requests/adapters.py000064400000034420151735047540017324 0ustar00# -*- coding: utf-8 -*-

"""
requests.adapters
~~~~~~~~~~~~~~~~~

This module contains the transport adapters that Requests uses to define
and maintain connections.
"""

import socket

from .models import Response
from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
from .packages.urllib3.response import HTTPResponse
from .packages.urllib3.util import Timeout as TimeoutSauce
from .compat import urlparse, basestring, urldefrag, unquote
from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
                    prepend_scheme_if_needed, get_auth_from_url)
from .structures import CaseInsensitiveDict
from .packages.urllib3.exceptions import MaxRetryError
from .packages.urllib3.exceptions import TimeoutError
from .packages.urllib3.exceptions import SSLError as _SSLError
from .packages.urllib3.exceptions import HTTPError as _HTTPError
from .packages.urllib3.exceptions import ProxyError as _ProxyError
from .cookies import extract_cookies_to_jar
from .exceptions import ConnectionError, Timeout, SSLError, ProxyError
from .auth import _basic_auth_str

DEFAULT_POOLBLOCK = False
DEFAULT_POOLSIZE = 10
DEFAULT_RETRIES = 0


class BaseAdapter(object):
    """The Base Transport Adapter"""

    def __init__(self):
        super(BaseAdapter, self).__init__()

    def send(self):
        raise NotImplementedError

    def close(self):
        raise NotImplementedError


class HTTPAdapter(BaseAdapter):
    """The built-in HTTP Adapter for urllib3.

    Provides a general-case interface for Requests sessions to contact HTTP and
    HTTPS urls by implementing the Transport Adapter interface. This class will
    usually be created by the :class:`Session <Session>` class under the
    covers.

    :param pool_connections: The number of urllib3 connection pools to cache.
    :param pool_maxsize: The maximum number of connections to save in the pool.
    :param int max_retries: The maximum number of retries each connection
        should attempt. Note, this applies only to failed connections and
        timeouts, never to requests where the server returns a response.
    :param pool_block: Whether the connection pool should block for connections.

    Usage::

      >>> import requests
      >>> s = requests.Session()
      >>> a = requests.adapters.HTTPAdapter(max_retries=3)
      >>> s.mount('http://', a)
    """
    __attrs__ = ['max_retries', 'config', '_pool_connections', '_pool_maxsize',
                 '_pool_block']

    def __init__(self, pool_connections=DEFAULT_POOLSIZE,
                 pool_maxsize=DEFAULT_POOLSIZE, max_retries=DEFAULT_RETRIES,
                 pool_block=DEFAULT_POOLBLOCK):
        self.max_retries = max_retries
        self.config = {}
        self.proxy_manager = {}

        super(HTTPAdapter, self).__init__()

        self._pool_connections = pool_connections
        self._pool_maxsize = pool_maxsize
        self._pool_block = pool_block

        self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block)

    def __getstate__(self):
        return dict((attr, getattr(self, attr, None)) for attr in
                    self.__attrs__)

    def __setstate__(self, state):
        # Can't handle by adding 'proxy_manager' to self.__attrs__ because
        # because self.poolmanager uses a lambda function, which isn't pickleable.
        self.proxy_manager = {}
        self.config = {}

        for attr, value in state.items():
            setattr(self, attr, value)

        self.init_poolmanager(self._pool_connections, self._pool_maxsize,
                              block=self._pool_block)

    def init_poolmanager(self, connections, maxsize, block=DEFAULT_POOLBLOCK):
        """Initializes a urllib3 PoolManager. This method should not be called
        from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param connections: The number of urllib3 connection pools to cache.
        :param maxsize: The maximum number of connections to save in the pool.
        :param block: Block when no free connections are available.
        """
        # save these values for pickling
        self._pool_connections = connections
        self._pool_maxsize = maxsize
        self._pool_block = block

        self.poolmanager = PoolManager(num_pools=connections, maxsize=maxsize,
                                       block=block)

    def cert_verify(self, conn, url, verify, cert):
        """Verify a SSL certificate. This method should not be called from user
        code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param conn: The urllib3 connection object associated with the cert.
        :param url: The requested URL.
        :param verify: Whether we should actually verify the certificate.
        :param cert: The SSL certificate to verify.
        """
        if url.lower().startswith('https') and verify:

            cert_loc = None

            # Allow self-specified cert location.
            if verify is not True:
                cert_loc = verify

            if not cert_loc:
                cert_loc = DEFAULT_CA_BUNDLE_PATH

            if not cert_loc:
                raise Exception("Could not find a suitable SSL CA certificate bundle.")

            conn.cert_reqs = 'CERT_REQUIRED'
            conn.ca_certs = cert_loc
        else:
            conn.cert_reqs = 'CERT_NONE'
            conn.ca_certs = None

        if cert:
            if not isinstance(cert, basestring):
                conn.cert_file = cert[0]
                conn.key_file = cert[1]
            else:
                conn.cert_file = cert

    def build_response(self, req, resp):
        """Builds a :class:`Response <requests.Response>` object from a urllib3
        response. This should not be called from user code, and is only exposed
        for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`

        :param req: The :class:`PreparedRequest <PreparedRequest>` used to generate the response.
        :param resp: The urllib3 response object.
        """
        response = Response()

        # Fallback to None if there's no status_code, for whatever reason.
        response.status_code = getattr(resp, 'status', None)

        # Make headers case-insensitive.
        response.headers = CaseInsensitiveDict(getattr(resp, 'headers', {}))

        # Set encoding.
        response.encoding = get_encoding_from_headers(response.headers)
        response.raw = resp
        response.reason = response.raw.reason

        if isinstance(req.url, bytes):
            response.url = req.url.decode('utf-8')
        else:
            response.url = req.url

        # Add new cookies from the server.
        extract_cookies_to_jar(response.cookies, req, resp)

        # Give the Response some context.
        response.request = req
        response.connection = self

        return response

    def get_connection(self, url, proxies=None):
        """Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        """
        proxies = proxies or {}
        proxy = proxies.get(urlparse(url.lower()).scheme)

        if proxy:
            proxy = prepend_scheme_if_needed(proxy, 'http')
            proxy_headers = self.proxy_headers(proxy)

            if not proxy in self.proxy_manager:
                self.proxy_manager[proxy] = proxy_from_url(
                                                proxy,
                                                proxy_headers=proxy_headers,
                                                num_pools=self._pool_connections,
                                                maxsize=self._pool_maxsize,
                                                block=self._pool_block)

            conn = self.proxy_manager[proxy].connection_from_url(url)
        else:
            # Only scheme should be lower case
            parsed = urlparse(url)
            url = parsed.geturl()
            conn = self.poolmanager.connection_from_url(url)

        return conn

    def close(self):
        """Disposes of any internal state.

        Currently, this just closes the PoolManager, which closes pooled
        connections.
        """
        self.poolmanager.clear()

    def request_url(self, request, proxies):
        """Obtain the url to use when making the final request.

        If the message is being sent through a HTTP proxy, the full URL has to
        be used. Otherwise, we should only use the path portion of the URL.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param proxies: A dictionary of schemes to proxy URLs.
        """
        proxies = proxies or {}
        scheme = urlparse(request.url).scheme
        proxy = proxies.get(scheme)

        if proxy and scheme != 'https':
            url, _ = urldefrag(request.url)
        else:
            url = request.path_url

        return url

    def add_headers(self, request, **kwargs):
        """Add any headers needed by the connection. As of v2.0 this does
        nothing by default, but is left for overriding by users that subclass
        the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
        :param kwargs: The keyword arguments from the call to send().
        """
        pass

    def proxy_headers(self, proxy):
        """Returns a dictionary of the headers to add to any request sent
        through a proxy. This works with urllib3 magic to ensure that they are
        correctly sent to the proxy, rather than in a tunnelled request if
        CONNECT is being used.

        This should not be called from user code, and is only exposed for use
        when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxies: The url of the proxy being used for this request.
        :param kwargs: Optional additional keyword arguments.
        """
        headers = {}
        username, password = get_auth_from_url(proxy)

        if username and password:
            headers['Proxy-Authorization'] = _basic_auth_str(username,
                                                             password)

        return headers

    def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None):
        """Sends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) The timeout on the request.
        :param verify: (optional) Whether to verify SSL certificates.
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        """

        conn = self.get_connection(request.url, proxies)

        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(request)

        chunked = not (request.body is None or 'Content-Length' in request.headers)

        timeout = TimeoutSauce(connect=timeout, read=timeout)

        try:
            if not chunked:
                resp = conn.urlopen(
                    method=request.method,
                    url=url,
                    body=request.body,
                    headers=request.headers,
                    redirect=False,
                    assert_same_host=False,
                    preload_content=False,
                    decode_content=False,
                    retries=self.max_retries,
                    timeout=timeout
                )

            # Send the request.
            else:
                if hasattr(conn, 'proxy_pool'):
                    conn = conn.proxy_pool

                low_conn = conn._get_conn(timeout=timeout)

                try:
                    low_conn.putrequest(request.method,
                                        url,
                                        skip_accept_encoding=True)

                    for header, value in request.headers.items():
                        low_conn.putheader(header, value)

                    low_conn.endheaders()

                    for i in request.body:
                        low_conn.send(hex(len(i))[2:].encode('utf-8'))
                        low_conn.send(b'\r\n')
                        low_conn.send(i)
                        low_conn.send(b'\r\n')
                    low_conn.send(b'0\r\n\r\n')

                    r = low_conn.getresponse()
                    resp = HTTPResponse.from_httplib(
                        r,
                        pool=conn,
                        connection=low_conn,
                        preload_content=False,
                        decode_content=False
                    )
                except:
                    # If we hit any problems here, clean up the connection.
                    # Then, reraise so that we can handle the actual exception.
                    low_conn.close()
                    raise
                else:
                    # All is well, return the connection to the pool.
                    conn._put_conn(low_conn)

        except socket.error as sockerr:
            raise ConnectionError(sockerr, request=request)

        except MaxRetryError as e:
            raise ConnectionError(e, request=request)

        except _ProxyError as e:
            raise ProxyError(e)

        except (_SSLError, _HTTPError) as e:
            if isinstance(e, _SSLError):
                raise SSLError(e, request=request)
            elif isinstance(e, TimeoutError):
                raise Timeout(e, request=request)
            else:
                raise

        return self.build_response(request, resp)
python3.4/site-packages/pip/_vendor/requests/cookies.py000064400000040456151735047540017163 0ustar00# -*- coding: utf-8 -*-

"""
Compatibility code to be able to use `cookielib.CookieJar` with requests.

requests.utils imports from here, so be careful with imports.
"""

import time
import collections
from .compat import cookielib, urlparse, urlunparse, Morsel

try:
    import threading
    # grr, pyflakes: this fixes "redefinition of unused 'threading'"
    threading
except ImportError:
    import dummy_threading as threading


class MockRequest(object):
    """Wraps a `requests.Request` to mimic a `urllib2.Request`.

    The code in `cookielib.CookieJar` expects this interface in order to correctly
    manage cookie policies, i.e., determine whether a cookie can be set, given the
    domains of the request and the cookie.

    The original request object is read-only. The client is responsible for collecting
    the new headers via `get_new_headers()` and interpreting them appropriately. You
    probably want `get_cookie_header`, defined below.
    """

    def __init__(self, request):
        self._r = request
        self._new_headers = {}
        self.type = urlparse(self._r.url).scheme

    def get_type(self):
        return self.type

    def get_host(self):
        return urlparse(self._r.url).netloc

    def get_origin_req_host(self):
        return self.get_host()

    def get_full_url(self):
        # Only return the response's URL if the user hadn't set the Host
        # header
        if not self._r.headers.get('Host'):
            return self._r.url
        # If they did set it, retrieve it and reconstruct the expected domain
        host = self._r.headers['Host']
        parsed = urlparse(self._r.url)
        # Reconstruct the URL as we expect it
        return urlunparse([
            parsed.scheme, host, parsed.path, parsed.params, parsed.query,
            parsed.fragment
        ])

    def is_unverifiable(self):
        return True

    def has_header(self, name):
        return name in self._r.headers or name in self._new_headers

    def get_header(self, name, default=None):
        return self._r.headers.get(name, self._new_headers.get(name, default))

    def add_header(self, key, val):
        """cookielib has no legitimate use for this method; add it back if you find one."""
        raise NotImplementedError("Cookie headers should be added with add_unredirected_header()")

    def add_unredirected_header(self, name, value):
        self._new_headers[name] = value

    def get_new_headers(self):
        return self._new_headers

    @property
    def unverifiable(self):
        return self.is_unverifiable()

    @property
    def origin_req_host(self):
        return self.get_origin_req_host()

    @property
    def host(self):
        return self.get_host()


class MockResponse(object):
    """Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.

    ...what? Basically, expose the parsed HTTP headers from the server response
    the way `cookielib` expects to see them.
    """

    def __init__(self, headers):
        """Make a MockResponse for `cookielib` to read.

        :param headers: a httplib.HTTPMessage or analogous carrying the headers
        """
        self._headers = headers

    def info(self):
        return self._headers

    def getheaders(self, name):
        self._headers.getheaders(name)


def extract_cookies_to_jar(jar, request, response):
    """Extract the cookies from the response into a CookieJar.

    :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)
    :param request: our own requests.Request object
    :param response: urllib3.HTTPResponse object
    """
    if not (hasattr(response, '_original_response') and
            response._original_response):
        return
    # the _original_response field is the wrapped httplib.HTTPResponse object,
    req = MockRequest(request)
    # pull out the HTTPMessage with the headers and put it in the mock:
    res = MockResponse(response._original_response.msg)
    jar.extract_cookies(res, req)


def get_cookie_header(jar, request):
    """Produce an appropriate Cookie header string to be sent with `request`, or None."""
    r = MockRequest(request)
    jar.add_cookie_header(r)
    return r.get_new_headers().get('Cookie')


def remove_cookie_by_name(cookiejar, name, domain=None, path=None):
    """Unsets a cookie by name, by default over all domains and paths.

    Wraps CookieJar.clear(), is O(n).
    """
    clearables = []
    for cookie in cookiejar:
        if cookie.name == name:
            if domain is None or domain == cookie.domain:
                if path is None or path == cookie.path:
                    clearables.append((cookie.domain, cookie.path, cookie.name))

    for domain, path, name in clearables:
        cookiejar.clear(domain, path, name)


class CookieConflictError(RuntimeError):
    """There are two cookies that meet the criteria specified in the cookie jar.
    Use .get and .set and include domain and path args in order to be more specific."""


class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
    """Compatibility class; is a cookielib.CookieJar, but exposes a dict interface.

    This is the CookieJar we create by default for requests and sessions that
    don't specify one, since some clients may expect response.cookies and
    session.cookies to support dict operations.

    Don't use the dict interface internally; it's just for compatibility with
    with external client code. All `requests` code should work out of the box
    with externally provided instances of CookieJar, e.g., LWPCookieJar and
    FileCookieJar.

    Caution: dictionary operations that are normally O(1) may be O(n).

    Unlike a regular CookieJar, this class is pickleable.
    """

    def get(self, name, default=None, domain=None, path=None):
        """Dict-like get() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains. Caution: operation is O(n), not O(1)."""
        try:
            return self._find_no_duplicates(name, domain, path)
        except KeyError:
            return default

    def set(self, name, value, **kwargs):
        """Dict-like set() that also supports optional domain and path args in
        order to resolve naming collisions from using one cookie jar over
        multiple domains."""
        # support client code that unsets cookies by assignment of a None value:
        if value is None:
            remove_cookie_by_name(self, name, domain=kwargs.get('domain'), path=kwargs.get('path'))
            return

        if isinstance(value, Morsel):
            c = morsel_to_cookie(value)
        else:
            c = create_cookie(name, value, **kwargs)
        self.set_cookie(c)
        return c

    def iterkeys(self):
        """Dict-like iterkeys() that returns an iterator of names of cookies from the jar.
        See itervalues() and iteritems()."""
        for cookie in iter(self):
            yield cookie.name

    def keys(self):
        """Dict-like keys() that returns a list of names of cookies from the jar.
        See values() and items()."""
        return list(self.iterkeys())

    def itervalues(self):
        """Dict-like itervalues() that returns an iterator of values of cookies from the jar.
        See iterkeys() and iteritems()."""
        for cookie in iter(self):
            yield cookie.value

    def values(self):
        """Dict-like values() that returns a list of values of cookies from the jar.
        See keys() and items()."""
        return list(self.itervalues())

    def iteritems(self):
        """Dict-like iteritems() that returns an iterator of name-value tuples from the jar.
        See iterkeys() and itervalues()."""
        for cookie in iter(self):
            yield cookie.name, cookie.value

    def items(self):
        """Dict-like items() that returns a list of name-value tuples from the jar.
        See keys() and values(). Allows client-code to call "dict(RequestsCookieJar)
        and get a vanilla python dict of key value pairs."""
        return list(self.iteritems())

    def list_domains(self):
        """Utility method to list all the domains in the jar."""
        domains = []
        for cookie in iter(self):
            if cookie.domain not in domains:
                domains.append(cookie.domain)
        return domains

    def list_paths(self):
        """Utility method to list all the paths in the jar."""
        paths = []
        for cookie in iter(self):
            if cookie.path not in paths:
                paths.append(cookie.path)
        return paths

    def multiple_domains(self):
        """Returns True if there are multiple domains in the jar.
        Returns False otherwise."""
        domains = []
        for cookie in iter(self):
            if cookie.domain is not None and cookie.domain in domains:
                return True
            domains.append(cookie.domain)
        return False  # there is only one domain in jar

    def get_dict(self, domain=None, path=None):
        """Takes as an argument an optional domain and path and returns a plain old
        Python dict of name-value pairs of cookies that meet the requirements."""
        dictionary = {}
        for cookie in iter(self):
            if (domain is None or cookie.domain == domain) and (path is None
                                                or cookie.path == path):
                dictionary[cookie.name] = cookie.value
        return dictionary

    def __getitem__(self, name):
        """Dict-like __getitem__() for compatibility with client code. Throws exception
        if there are more than one cookie with name. In that case, use the more
        explicit get() method instead. Caution: operation is O(n), not O(1)."""

        return self._find_no_duplicates(name)

    def __setitem__(self, name, value):
        """Dict-like __setitem__ for compatibility with client code. Throws exception
        if there is already a cookie of that name in the jar. In that case, use the more
        explicit set() method instead."""

        self.set(name, value)

    def __delitem__(self, name):
        """Deletes a cookie given a name. Wraps cookielib.CookieJar's remove_cookie_by_name()."""
        remove_cookie_by_name(self, name)

    def set_cookie(self, cookie, *args, **kwargs):
        if hasattr(cookie.value, 'startswith') and cookie.value.startswith('"') and cookie.value.endswith('"'):
            cookie.value = cookie.value.replace('\\"', '')
        return super(RequestsCookieJar, self).set_cookie(cookie, *args, **kwargs)

    def update(self, other):
        """Updates this jar with cookies from another CookieJar or dict-like"""
        if isinstance(other, cookielib.CookieJar):
            for cookie in other:
                self.set_cookie(cookie)
        else:
            super(RequestsCookieJar, self).update(other)

    def _find(self, name, domain=None, path=None):
        """Requests uses this method internally to get cookie values. Takes as args name
        and optional domain and path. Returns a cookie.value. If there are conflicting cookies,
        _find arbitrarily chooses one. See _find_no_duplicates if you want an exception thrown
        if there are conflicting cookies."""
        for cookie in iter(self):
            if cookie.name == name:
                if domain is None or cookie.domain == domain:
                    if path is None or cookie.path == path:
                        return cookie.value

        raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))

    def _find_no_duplicates(self, name, domain=None, path=None):
        """__get_item__ and get call _find_no_duplicates -- never used in Requests internally.
        Takes as args name and optional domain and path. Returns a cookie.value.
        Throws KeyError if cookie is not found and CookieConflictError if there are
        multiple cookies that match name and optionally domain and path."""
        toReturn = None
        for cookie in iter(self):
            if cookie.name == name:
                if domain is None or cookie.domain == domain:
                    if path is None or cookie.path == path:
                        if toReturn is not None:  # if there are multiple cookies that meet passed in criteria
                            raise CookieConflictError('There are multiple cookies with name, %r' % (name))
                        toReturn = cookie.value  # we will eventually return this as long as no cookie conflict

        if toReturn:
            return toReturn
        raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))

    def __getstate__(self):
        """Unlike a normal CookieJar, this class is pickleable."""
        state = self.__dict__.copy()
        # remove the unpickleable RLock object
        state.pop('_cookies_lock')
        return state

    def __setstate__(self, state):
        """Unlike a normal CookieJar, this class is pickleable."""
        self.__dict__.update(state)
        if '_cookies_lock' not in self.__dict__:
            self._cookies_lock = threading.RLock()

    def copy(self):
        """Return a copy of this RequestsCookieJar."""
        new_cj = RequestsCookieJar()
        new_cj.update(self)
        return new_cj


def create_cookie(name, value, **kwargs):
    """Make a cookie from underspecified parameters.

    By default, the pair of `name` and `value` will be set for the domain ''
    and sent on every request (this is sometimes called a "supercookie").
    """
    result = dict(
        version=0,
        name=name,
        value=value,
        port=None,
        domain='',
        path='/',
        secure=False,
        expires=None,
        discard=True,
        comment=None,
        comment_url=None,
        rest={'HttpOnly': None},
        rfc2109=False,)

    badargs = set(kwargs) - set(result)
    if badargs:
        err = 'create_cookie() got unexpected keyword arguments: %s'
        raise TypeError(err % list(badargs))

    result.update(kwargs)
    result['port_specified'] = bool(result['port'])
    result['domain_specified'] = bool(result['domain'])
    result['domain_initial_dot'] = result['domain'].startswith('.')
    result['path_specified'] = bool(result['path'])

    return cookielib.Cookie(**result)


def morsel_to_cookie(morsel):
    """Convert a Morsel object into a Cookie containing the one k/v pair."""

    expires = None
    if morsel['max-age']:
        expires = time.time() + morsel['max-age']
    elif morsel['expires']:
        time_template = '%a, %d-%b-%Y %H:%M:%S GMT'
        expires = time.mktime(
            time.strptime(morsel['expires'], time_template)) - time.timezone
    return create_cookie(
        comment=morsel['comment'],
        comment_url=bool(morsel['comment']),
        discard=False,
        domain=morsel['domain'],
        expires=expires,
        name=morsel.key,
        path=morsel['path'],
        port=None,
        rest={'HttpOnly': morsel['httponly']},
        rfc2109=False,
        secure=bool(morsel['secure']),
        value=morsel.value,
        version=morsel['version'] or 0,
    )


def cookiejar_from_dict(cookie_dict, cookiejar=None, overwrite=True):
    """Returns a CookieJar from a key/value dictionary.

    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :param cookiejar: (optional) A cookiejar to add the cookies to.
    :param overwrite: (optional) If False, will not replace cookies
        already in the jar with new ones.
    """
    if cookiejar is None:
        cookiejar = RequestsCookieJar()

    if cookie_dict is not None:
        names_from_jar = [cookie.name for cookie in cookiejar]
        for name in cookie_dict:
            if overwrite or (name not in names_from_jar):
                cookiejar.set_cookie(create_cookie(name, cookie_dict[name]))

    return cookiejar


def merge_cookies(cookiejar, cookies):
    """Add cookies to cookiejar and returns a merged CookieJar.

    :param cookiejar: CookieJar object to add the cookies to.
    :param cookies: Dictionary or CookieJar object to be added.
    """
    if not isinstance(cookiejar, cookielib.CookieJar):
        raise ValueError('You can only merge into CookieJar')
    
    if isinstance(cookies, dict):
        cookiejar = cookiejar_from_dict(
            cookies, cookiejar=cookiejar, overwrite=False)
    elif isinstance(cookies, cookielib.CookieJar):
        try:
            cookiejar.update(cookies)
        except AttributeError:
            for cookie_in_jar in cookies:
                cookiejar.set_cookie(cookie_in_jar)

    return cookiejar
python3.4/site-packages/pip/_vendor/requests/exceptions.py000064400000003525151735047540017704 0ustar00# -*- coding: utf-8 -*-

"""
requests.exceptions
~~~~~~~~~~~~~~~~~~~

This module contains the set of Requests' exceptions.

"""
from .packages.urllib3.exceptions import HTTPError as BaseHTTPError


class RequestException(IOError):
    """There was an ambiguous exception that occurred while handling your
    request."""

    def __init__(self, *args, **kwargs):
        """
        Initialize RequestException with `request` and `response` objects.
        """
        response = kwargs.pop('response', None)
        self.response = response
        self.request = kwargs.pop('request', None)
        if (response is not None and not self.request and
                hasattr(response, 'request')):
            self.request = self.response.request
        super(RequestException, self).__init__(*args, **kwargs)


class HTTPError(RequestException):
    """An HTTP error occurred."""


class ConnectionError(RequestException):
    """A Connection error occurred."""


class ProxyError(ConnectionError):
    """A proxy error occurred."""


class SSLError(ConnectionError):
    """An SSL error occurred."""


class Timeout(RequestException):
    """The request timed out."""


class URLRequired(RequestException):
    """A valid URL is required to make a request."""


class TooManyRedirects(RequestException):
    """Too many redirects."""


class MissingSchema(RequestException, ValueError):
    """The URL schema (e.g. http or https) is missing."""


class InvalidSchema(RequestException, ValueError):
    """See defaults.py for valid schemas."""


class InvalidURL(RequestException, ValueError):
    """ The URL provided was somehow invalid. """


class ChunkedEncodingError(RequestException):
    """The server declared chunked encoding but sent an invalid chunk."""


class ContentDecodingError(RequestException, BaseHTTPError):
    """Failed to decode response content"""
python3.4/site-packages/pip/_vendor/requests/cacert.pem000064400001132322151735047540017114 0ustar00# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Issuer: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
# Subject: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
# Label: "GTE CyberTrust Global Root"
# Serial: 421
# MD5 Fingerprint: ca:3d:d3:68:f1:03:5c:d0:32:fa:b8:2b:59:e8:5a:db
# SHA1 Fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74
# SHA256 Fingerprint: a5:31:25:18:8d:21:10:aa:96:4b:02:c7:b7:c6:da:32:03:17:08:94:e5:fb:71:ff:fb:66:67:d5:e6:81:0a:36
-----BEGIN CERTIFICATE-----
MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
-----END CERTIFICATE-----

# Issuer: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
# Subject: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
# Label: "Thawte Server CA"
# Serial: 1
# MD5 Fingerprint: c5:70:c4:a2:ed:53:78:0c:c8:10:53:81:64:cb:d0:1d
# SHA1 Fingerprint: 23:e5:94:94:51:95:f2:41:48:03:b4:d5:64:d2:a3:a3:f5:d8:8b:8c
# SHA256 Fingerprint: b4:41:0b:73:e2:e6:ea:ca:47:fb:c4:2f:8f:a4:01:8a:f4:38:1d:c5:4c:fa:a8:44:50:46:1e:ed:09:45:4d:e9
-----BEGIN CERTIFICATE-----
MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
-----END CERTIFICATE-----

# Issuer: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
# Subject: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
# Label: "Thawte Premium Server CA"
# Serial: 1
# MD5 Fingerprint: 06:9f:69:79:16:66:90:02:1b:8c:8c:a2:c3:07:6f:3a
# SHA1 Fingerprint: 62:7f:8d:78:27:65:63:99:d2:7d:7f:90:44:c9:fe:b3:f3:3e:fa:9a
# SHA256 Fingerprint: ab:70:36:36:5c:71:54:aa:29:c2:c2:9f:5d:41:91:16:3b:16:2a:22:25:01:13:57:d5:6d:07:ff:a7:bc:1f:72
-----BEGIN CERTIFICATE-----
MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
-----END CERTIFICATE-----

# Issuer: O=Equifax OU=Equifax Secure Certificate Authority
# Subject: O=Equifax OU=Equifax Secure Certificate Authority
# Label: "Equifax Secure CA"
# Serial: 903804111
# MD5 Fingerprint: 67:cb:9d:c0:13:24:8a:82:9b:b2:17:1e:d1:1b:ec:d4
# SHA1 Fingerprint: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a
# SHA256 Fingerprint: 08:29:7a:40:47:db:a2:36:80:c7:31:db:6e:31:76:53:ca:78:48:e1:be:bd:3a:0b:01:79:a7:07:f9:2c:f1:78
-----BEGIN CERTIFICATE-----
MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
-----END CERTIFICATE-----

# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
# Label: "Verisign Class 3 Public Primary Certification Authority"
# Serial: 149843929435818692848040365716851702463
# MD5 Fingerprint: 10:fc:63:5d:f6:26:3e:0d:f3:25:be:5f:79:cd:67:67
# SHA1 Fingerprint: 74:2c:31:92:e6:07:e4:24:eb:45:49:54:2b:e1:bb:c5:3e:61:74:e2
# SHA256 Fingerprint: e7:68:56:34:ef:ac:f6:9a:ce:93:9a:6b:25:5b:7b:4f:ab:ef:42:93:5b:50:a2:65:ac:b5:cb:60:27:e4:4e:70
-----BEGIN CERTIFICATE-----
MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
-----END CERTIFICATE-----

# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
# Label: "Verisign Class 3 Public Primary Certification Authority - G2"
# Serial: 167285380242319648451154478808036881606
# MD5 Fingerprint: a2:33:9b:4c:74:78:73:d4:6c:e7:c1:f3:8d:cb:5c:e9
# SHA1 Fingerprint: 85:37:1c:a6:e5:50:14:3d:ce:28:03:47:1b:de:3a:09:e8:f8:77:0f
# SHA256 Fingerprint: 83:ce:3c:12:29:68:8a:59:3d:48:5f:81:97:3c:0f:91:95:43:1e:da:37:cc:5e:36:43:0e:79:c7:a8:88:63:8b
-----BEGIN CERTIFICATE-----
MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
oJ2daZH9
-----END CERTIFICATE-----

# Issuer: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
# Subject: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
# Label: "GlobalSign Root CA"
# Serial: 4835703278459707669005204
# MD5 Fingerprint: 3e:45:52:15:09:51:92:e1:b7:5d:37:9f:b1:87:29:8a
# SHA1 Fingerprint: b1:bc:96:8b:d4:f4:9d:62:2a:a8:9a:81:f2:15:01:52:a4:1d:82:9c
# SHA256 Fingerprint: eb:d4:10:40:e4:bb:3e:c7:42:c9:e3:81:d3:1e:f2:a4:1a:48:b6:68:5c:96:e7:ce:f3:c1:df:6c:d4:33:1c:99
-----BEGIN CERTIFICATE-----
MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B
AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz
yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE
38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP
AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
-----END CERTIFICATE-----

# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
# Label: "GlobalSign Root CA - R2"
# Serial: 4835703278459682885658125
# MD5 Fingerprint: 94:14:77:7e:3e:5e:fd:8f:30:bd:41:b0:cf:e7:d0:30
# SHA1 Fingerprint: 75:e0:ab:b6:13:85:12:27:1c:04:f8:5f:dd:de:38:e4:b7:24:2e:fe
# SHA256 Fingerprint: ca:42:dd:41:74:5f:d0:b8:1e:b9:02:36:2c:f9:d8:bf:71:9d:a1:bd:1b:1e:fc:94:6f:5b:4c:99:f4:2c:1b:9e
-----BEGIN CERTIFICATE-----
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
-----END CERTIFICATE-----

# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
# Label: "ValiCert Class 1 VA"
# Serial: 1
# MD5 Fingerprint: 65:58:ab:15:ad:57:6c:1e:a8:a7:b5:69:ac:bf:ff:eb
# SHA1 Fingerprint: e5:df:74:3c:b6:01:c4:9b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e
# SHA256 Fingerprint: f4:c1:49:55:1a:30:13:a3:5b:c7:bf:fe:17:a7:f3:44:9b:c1:ab:5b:5a:0a:e7:4b:06:c2:3b:90:00:4c:01:04
-----BEGIN CERTIFICATE-----
MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
-----END CERTIFICATE-----

# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
# Label: "ValiCert Class 2 VA"
# Serial: 1
# MD5 Fingerprint: a9:23:75:9b:ba:49:36:6e:31:c2:db:f2:e7:66:ba:87
# SHA1 Fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6
# SHA256 Fingerprint: 58:d0:17:27:9c:d4:dc:63:ab:dd:b1:96:a6:c9:90:6c:30:c4:e0:87:83:ea:e8:c1:60:99:54:d6:93:55:59:6b
-----BEGIN CERTIFICATE-----
MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
-----END CERTIFICATE-----

# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
# Label: "RSA Root Certificate 1"
# Serial: 1
# MD5 Fingerprint: a2:6f:53:b7:ee:40:db:4a:68:e7:fa:18:d9:10:4b:72
# SHA1 Fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb
# SHA256 Fingerprint: bc:23:f9:8a:31:3c:b9:2d:e3:bb:fc:3a:5a:9f:44:61:ac:39:49:4c:4a:e1:5a:9e:9d:f1:31:e9:9b:73:01:9a
-----BEGIN CERTIFICATE-----
MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy
NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD
cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs
2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY
JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE
Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
# Label: "Verisign Class 3 Public Primary Certification Authority - G3"
# Serial: 206684696279472310254277870180966723415
# MD5 Fingerprint: cd:68:b6:a7:c7:c4:ce:75:e0:1d:4f:57:44:61:92:09
# SHA1 Fingerprint: 13:2d:0d:45:53:4b:69:97:cd:b2:d5:c3:39:e2:55:76:60:9b:5c:c6
# SHA256 Fingerprint: eb:04:cf:5e:b1:f3:9a:fa:76:2f:2b:b1:20:f2:96:cb:a5:20:c1:b9:7d:b1:58:95:65:b8:1c:b9:a1:7b:72:44
-----BEGIN CERTIFICATE-----
MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b
N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t
KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu
kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm
CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ
Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
# Label: "Verisign Class 4 Public Primary Certification Authority - G3"
# Serial: 314531972711909413743075096039378935511
# MD5 Fingerprint: db:c8:f2:27:2e:b1:ea:6a:29:23:5d:fe:56:3e:33:df
# SHA1 Fingerprint: c8:ec:8c:87:92:69:cb:4b:ab:39:e9:8d:7e:57:67:f3:14:95:73:9d
# SHA256 Fingerprint: e3:89:36:0d:0f:db:ae:b3:d2:50:58:4b:47:30:31:4e:22:2f:39:c1:56:a0:20:14:4e:8d:96:05:61:79:15:06
-----BEGIN CERTIFICATE-----
MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1
GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ
+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd
U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm
NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY
ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/
ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1
CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
-----END CERTIFICATE-----

# Issuer: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
# Subject: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
# Label: "Entrust.net Secure Server CA"
# Serial: 927650371
# MD5 Fingerprint: df:f2:80:73:cc:f1:e6:61:73:fc:f5:42:e9:c5:7c:ee
# SHA1 Fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39
# SHA256 Fingerprint: 62:f2:40:27:8c:56:4c:4d:d8:bf:7d:9d:4f:6f:36:6e:a8:94:d2:2f:5f:34:d9:89:a9:83:ac:ec:2f:ff:ed:50
-----BEGIN CERTIFICATE-----
MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3
wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC
AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb
oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5
BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p
dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
-----END CERTIFICATE-----

# Issuer: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
# Subject: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
# Label: "Entrust.net Premium 2048 Secure Server CA"
# Serial: 946069240
# MD5 Fingerprint: ee:29:31:bc:32:7e:9a:e6:e8:b5:f7:51:b4:34:71:90
# SHA1 Fingerprint: 50:30:06:09:1d:97:d4:f5:ae:39:f7:cb:e7:92:7d:7d:65:2d:34:31
# SHA256 Fingerprint: 6d:c4:71:72:e0:1c:bc:b0:bf:62:58:0d:89:5f:e2:b8:ac:9a:d4:f8:73:80:1e:0c:10:b9:c8:37:d2:1e:b1:77
-----BEGIN CERTIFICATE-----
MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0yOTA3
MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
4QIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV
HQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJKoZIhvcNAQEFBQADggEBADub
j1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPyT/4xmf3IDExo
U8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf
zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5b
u/8j72gZyxKTJ1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+
bYQLCIt+jerXmCHG8+c8eS9enNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/Er
fF6adulZkMV8gzURZVE=
-----END CERTIFICATE-----

# Issuer: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
# Subject: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
# Label: "Baltimore CyberTrust Root"
# Serial: 33554617
# MD5 Fingerprint: ac:b6:94:a5:9c:17:e0:d7:91:52:9b:b1:97:06:a6:e4
# SHA1 Fingerprint: d4:de:20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74
# SHA256 Fingerprint: 16:af:57:a9:f6:76:b0:ab:12:60:95:aa:5e:ba:de:f2:2a:b3:11:19:d6:44:ac:95:cd:4b:93:db:f3:f2:6a:eb
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
-----END CERTIFICATE-----

# Issuer: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
# Subject: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
# Label: "Equifax Secure Global eBusiness CA"
# Serial: 1
# MD5 Fingerprint: 8f:5d:77:06:27:c4:98:3c:5b:93:78:e7:d7:7d:9b:cc
# SHA1 Fingerprint: 7e:78:4a:10:1c:82:65:cc:2d:e1:f1:6d:47:b4:40:ca:d9:0a:19:45
# SHA256 Fingerprint: 5f:0b:62:ea:b5:e3:53:ea:65:21:65:16:58:fb:b6:53:59:f4:43:28:0a:4a:fb:d1:04:d7:7d:10:f9:f0:4c:07
-----BEGIN CERTIFICATE-----
MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc
MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT
ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw
MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj
dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l
c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC
UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc
58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/
o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH
MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr
aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA
A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA
Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv
8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
-----END CERTIFICATE-----

# Issuer: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
# Subject: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
# Label: "Equifax Secure eBusiness CA 1"
# Serial: 4
# MD5 Fingerprint: 64:9c:ef:2e:44:fc:c6:8f:52:07:d0:51:73:8f:cb:3d
# SHA1 Fingerprint: da:40:18:8b:91:89:a3:ed:ee:ae:da:97:fe:2f:9d:f5:b7:d1:8a:41
# SHA256 Fingerprint: cf:56:ff:46:a4:a1:86:10:9d:d9:65:84:b5:ee:b5:8a:51:0c:42:75:b0:e5:f9:4f:40:bb:ae:86:5e:19:f6:73
-----BEGIN CERTIFICATE-----
MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc
MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT
ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw
MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j
LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ
KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo
RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu
WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw
Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD
AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK
eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM
zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+
WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
/Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==
-----END CERTIFICATE-----

# Issuer: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
# Subject: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
# Label: "AddTrust Low-Value Services Root"
# Serial: 1
# MD5 Fingerprint: 1e:42:95:02:33:92:6b:b9:5f:c0:7f:da:d6:b2:4b:fc
# SHA1 Fingerprint: cc:ab:0e:a0:4c:23:01:d6:69:7b:dd:37:9f:cd:12:eb:24:e3:94:9d
# SHA256 Fingerprint: 8c:72:09:27:9a:c0:4e:27:5e:16:d0:7f:d3:b7:75:e8:01:54:b5:96:80:46:e3:1f:52:dd:25:76:63:24:e9:a7
-----BEGIN CERTIFICATE-----
MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMw
MTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYD
VQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUA
A4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ul
CDtbKRY654eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6n
tGO0/7Gcrjyvd7ZWxbWroulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyl
dI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1Zmne3yzxbrww2ywkEtvrNTVokMsAsJch
PXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJuiGMx1I4S+6+JNM3GOGvDC
+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8wHQYDVR0O
BBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8E
BTADAQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBl
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFk
ZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENB
IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxtZBsfzQ3duQH6lmM0MkhHma6X
7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0PhiVYrqW9yTkkz
43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl
pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA
WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
-----END CERTIFICATE-----

# Issuer: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
# Subject: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
# Label: "AddTrust External Root"
# Serial: 1
# MD5 Fingerprint: 1d:35:54:04:85:78:b0:3f:42:42:4d:bf:20:73:0a:3f
# SHA1 Fingerprint: 02:fa:f3:e2:91:43:54:68:60:78:57:69:4d:f5:e4:5b:68:85:18:68
# SHA256 Fingerprint: 68:7f:a4:51:38:22:78:ff:f0:c8:b1:1f:8d:43:d5:76:67:1c:6e:b2:bc:ea:b4:13:fb:83:d9:65:d0:6d:2f:f2
-----BEGIN CERTIFICATE-----
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
-----END CERTIFICATE-----

# Issuer: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
# Subject: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
# Label: "AddTrust Public Services Root"
# Serial: 1
# MD5 Fingerprint: c1:62:3e:23:c5:82:73:9c:03:59:4b:2b:e9:77:49:7f
# SHA1 Fingerprint: 2a:b6:28:48:5e:78:fb:f3:ad:9e:79:10:dd:6b:df:99:72:2c:96:e5
# SHA256 Fingerprint: 07:91:ca:07:49:b2:07:82:aa:d3:c7:d7:bd:0c:df:c9:48:58:35:84:3e:b2:d7:99:60:09:ce:43:ab:6c:69:27
-----BEGIN CERTIFICATE-----
MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
b3JrMSAwHgYDVQQDExdBZGRUcnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAx
MDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtB
ZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIDAeBgNV
BAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV
6tsfSlbunyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nX
GCwwfQ56HmIexkvA/X1id9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnP
dzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSGAa2Il+tmzV7R/9x98oTaunet3IAIx6eH
1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAwHM+A+WD+eeSI8t0A65RF
62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0GA1UdDgQW
BBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUw
AwEB/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDEL
MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRU
cnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJv
b3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6
IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/
iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh
4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm
XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
-----END CERTIFICATE-----

# Issuer: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
# Subject: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
# Label: "AddTrust Qualified Certificates Root"
# Serial: 1
# MD5 Fingerprint: 27:ec:39:47:cd:da:5a:af:e2:9a:01:65:21:a9:4c:bb
# SHA1 Fingerprint: 4d:23:78:ec:91:95:39:b5:00:7f:75:8f:03:3b:21:1e:c5:4d:8b:cf
# SHA256 Fingerprint: 80:95:21:08:05:db:4b:bc:35:5e:44:28:d8:fd:6e:c2:cd:e3:ab:5f:b9:7a:99:42:98:8e:b8:f4:dc:d0:60:16
-----BEGIN CERTIFICATE-----
MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1
MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK
EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIzAh
BgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq
xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G
87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i
2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U
WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G
A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T
AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr
pGkwZzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQL
ExRBZGRUcnVzdCBUVFAgTmV0d29yazEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlm
aWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBABmrder4i2VhlRO6aQTv
hsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxGGuoYQ992zPlm
hpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3
P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y
iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
xqE=
-----END CERTIFICATE-----

# Issuer: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
# Subject: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
# Label: "Entrust Root Certification Authority"
# Serial: 1164660820
# MD5 Fingerprint: d6:a5:c3:ed:5d:dd:3e:00:c1:3d:87:92:1f:1d:3f:e4
# SHA1 Fingerprint: b3:1e:b1:b7:40:e3:6c:84:02:da:dc:37:d4:4d:f5:d4:67:49:52:f9
# SHA256 Fingerprint: 73:c1:76:43:4f:1b:c6:d5:ad:f4:5b:0e:76:e7:27:28:7c:8d:e5:76:16:c1:e6:e6:14:1a:2b:2c:bc:7d:8e:4c
-----BEGIN CERTIFICATE-----
MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC
VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0
Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW
KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl
cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw
NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw
NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy
ZWZlcmVuY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNV
BAMTJEVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBALaVtkNC+sZtKm9I35RMOVcF7sN5EUFo
Nu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYszA9u3g3s+IIRe7bJWKKf4
4LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOwwCj0Yzfv9
KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGI
rb68j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi
94DkZfs0Nw4pgHBNrziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOB
sDCBrTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAi
gA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1MzQyWjAfBgNVHSMEGDAWgBRo
kORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DHhmak8fdLQ/uE
vW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9t
O1KzKtvn1ISMY/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6Zua
AGAT/3B+XxFNSRuzFVJ7yVTav52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP
9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/
eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m
0vdXcDazv/wor3ElhVsT/h5/WrQ8
-----END CERTIFICATE-----

# Issuer: O=RSA Security Inc OU=RSA Security 2048 V3
# Subject: O=RSA Security Inc OU=RSA Security 2048 V3
# Label: "RSA Security 2048 v3"
# Serial: 13297492616345471454730593562152402946
# MD5 Fingerprint: 77:0d:19:b1:21:fd:00:42:9c:3e:0c:a5:dd:0b:02:8e
# SHA1 Fingerprint: 25:01:90:19:cf:fb:d9:99:1c:b7:68:25:74:8d:94:5f:30:93:95:42
# SHA256 Fingerprint: af:8b:67:62:a1:e5:28:22:81:61:a9:5d:5c:55:9e:e2:66:27:8f:75:d7:9e:83:01:89:a5:03:50:6a:bd:6b:4c
-----BEGIN CERTIFICATE-----
MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6
MRkwFwYDVQQKExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJp
dHkgMjA0OCBWMzAeFw0wMTAyMjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAX
BgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAbBgNVBAsTFFJTQSBTZWN1cml0eSAy
MDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt49VcdKA3Xtp
eafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7Jylg
/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGl
wSMiuLgbWhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnh
AMFRD0xS+ARaqn1y07iHKrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2
PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP+Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpu
AWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
BjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4EFgQUB8NR
MKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYc
HnmYv/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/
Zb5gEydxiKRz44Rj0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+
f00/FGj1EVDVwfSQpQgdMWD/YIwjVAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVO
rSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395nzIlQnQFgCi/vcEkllgVsRch
6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kApKnXwiJPZ9d3
7CAFYd4=
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Global CA O=GeoTrust Inc.
# Subject: CN=GeoTrust Global CA O=GeoTrust Inc.
# Label: "GeoTrust Global CA"
# Serial: 144470
# MD5 Fingerprint: f7:75:ab:29:fb:51:4e:b7:77:5e:ff:05:3c:99:8e:f5
# SHA1 Fingerprint: de:28:f4:a4:ff:e5:b9:2f:a3:c5:03:d1:a3:49:a7:f9:96:2a:82:12
# SHA256 Fingerprint: ff:85:6a:2d:25:1d:cd:88:d3:66:56:f4:50:12:67:98:cf:ab:aa:de:40:79:9c:72:2d:e4:d2:b5:db:36:a7:3a
-----BEGIN CERTIFICATE-----
MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
# Subject: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
# Label: "GeoTrust Global CA 2"
# Serial: 1
# MD5 Fingerprint: 0e:40:a7:6c:de:03:5d:8f:d1:0f:e4:d1:8d:f9:6c:a9
# SHA1 Fingerprint: a9:e9:78:08:14:37:58:88:f2:05:19:b0:6d:2b:0d:2b:60:16:90:7d
# SHA256 Fingerprint: ca:2d:82:a0:86:77:07:2f:8a:b6:76:4f:f0:35:67:6c:fe:3e:5e:32:5e:01:21:72:df:3f:92:09:6d:b7:9b:85
-----BEGIN CERTIFICATE-----
MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEW
MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFs
IENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3Qg
R2xvYmFsIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDvPE1A
PRDfO1MA4Wf+lGAVPoWI8YkNkMgoI5kF6CsgncbzYEbYwbLVjDHZ3CB5JIG/NTL8
Y2nbsSpr7iFY8gjpeMtvy/wWUsiRxP89c96xPqfCfWbB9X5SJBri1WeR0IIQ13hL
TytCOb1kLUCgsBDTOEhGiKEMuzozKmKY+wCdE1l/bztyqu6mD4b5BWHqZ38MN5aL
5mkWRxHCJ1kDs6ZgwiFAVvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7
S4wMcoKK+xfNAGw6EzywhIdLFnopsk/bHdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe
2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNHK266ZUap
EBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6td
EPx7srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv
/NgdRN3ggX+d6YvhZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywN
A0ZF66D0f0hExghAzN4bcLUprbqLOzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0
abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkCx1YAzUm5s2x7UwQa4qjJqhIF
I8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqFH4z1Ir+rzoPz
4iIprn2DQKi6bA==
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Universal CA O=GeoTrust Inc.
# Subject: CN=GeoTrust Universal CA O=GeoTrust Inc.
# Label: "GeoTrust Universal CA"
# Serial: 1
# MD5 Fingerprint: 92:65:58:8b:a2:1a:31:72:73:68:5c:b4:a5:7a:07:48
# SHA1 Fingerprint: e6:21:f3:35:43:79:05:9a:4b:68:30:9d:8a:2f:74:22:15:87:ec:79
# SHA256 Fingerprint: a0:45:9b:9f:63:b2:25:59:f5:fa:5d:4c:6d:b3:f9:f7:2f:f1:93:42:03:35:78:f0:73:bf:1d:1b:46:cb:b9:12
-----BEGIN CERTIFICATE-----
MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW
MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVy
c2FsIENBMB4XDTA0MDMwNDA1MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UE
BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHjAcBgNVBAMTFUdlb1RydXN0
IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKYV
VaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9tJPi8
cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTT
QjOgNB0eRXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFh
F7em6fgemdtzbvQKoiFs7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2v
c7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d8Lsrlh/eezJS/R27tQahsiFepdaVaH/w
mZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7VqnJNk22CDtucvc+081xd
VHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3CgaRr0BHdCX
teGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZ
f9hBZ3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfRe
Bi9Fi1jUIxaS5BZuKGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+
nhutxx9z3SxPGWX9f5NAEC7S8O08ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB
/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0XG0D08DYj3rWMB8GA1UdIwQY
MBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG
9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fX
IwjhmF7DWgh2qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzyn
ANXH/KttgCJwpQzgXQQpAvvLoJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0z
uzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsKxr2EoyNB3tZ3b4XUhRxQ4K5RirqN
Pnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxFKyDuSN/n3QmOGKja
QI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2DFKW
koRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9
ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt
DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm
bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw=
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
# Subject: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
# Label: "GeoTrust Universal CA 2"
# Serial: 1
# MD5 Fingerprint: 34:fc:b8:d0:36:db:9e:14:b3:c2:f2:db:8f:e4:94:c7
# SHA1 Fingerprint: 37:9a:19:7b:41:85:45:35:0c:a6:03:69:f3:3c:2e:af:47:4f:20:79
# SHA256 Fingerprint: a0:23:4f:3b:c8:52:7c:a5:62:8e:ec:81:ad:5d:69:89:5d:a5:68:0d:c9:1d:1c:b8:47:7f:33:f8:78:b9:5b:0b
-----BEGIN CERTIFICATE-----
MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW
MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy
c2FsIENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYD
VQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1
c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
AQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0DE81
WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUG
FF+3Qs17j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdq
XbboW0W63MOhBW9Wjo8QJqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxL
se4YuU6W3Nx2/zu+z18DwPw76L5GG//aQMJS9/7jOvdqdzXQ2o3rXhhqMcceujwb
KNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2WP0+GfPtDCapkzj4T8Fd
IgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP20gaXT73
y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRt
hAAnZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgoc
QIgfksILAAX/8sgCSqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4
Lt1ZrtmhN79UNdxzMk+MBB4zsslG8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAfBgNV
HSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8EBAMCAYYwDQYJ
KoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQ
L1EuxBRa3ugZ4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgr
Fg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSo
ag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaY
T1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz
GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m
1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV
OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH
6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX
QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
-----END CERTIFICATE-----

# Issuer: CN=America Online Root Certification Authority 1 O=America Online Inc.
# Subject: CN=America Online Root Certification Authority 1 O=America Online Inc.
# Label: "America Online Root Certification Authority 1"
# Serial: 1
# MD5 Fingerprint: 14:f1:08:ad:9d:fa:64:e2:89:e7:1c:cf:a8:ad:7d:5e
# SHA1 Fingerprint: 39:21:c1:15:c1:5d:0e:ca:5c:cb:5b:c4:f0:7d:21:d8:05:0b:56:6a
# SHA256 Fingerprint: 77:40:73:12:c6:3a:15:3d:5b:c0:0b:4e:51:75:9c:df:da:c2:37:dc:2a:33:b6:79:46:e9:8e:9b:fa:68:0a:e3
-----BEGIN CERTIFICATE-----
MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2
MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lk
hsmj76CGv2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym
1BW32J/X3HGrfpq/m44zDyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsW
OqMFf6Dch9Wc/HKpoH145LcxVR5lu9RhsCFg7RAycsWSJR74kEoYeEfffjA3PlAb
2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP8c9GsEsPPt2IYriMqQko
O3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAU
AK3Zo/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
BQUAA4IBAQB8itEfGDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkF
Zu90821fnZmv9ov761KyBZiibyrFVL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAb
LjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir
oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C
MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
-----END CERTIFICATE-----

# Issuer: CN=America Online Root Certification Authority 2 O=America Online Inc.
# Subject: CN=America Online Root Certification Authority 2 O=America Online Inc.
# Label: "America Online Root Certification Authority 2"
# Serial: 1
# MD5 Fingerprint: d6:ed:3c:ca:e2:66:0f:af:10:43:0d:77:9b:04:09:bf
# SHA1 Fingerprint: 85:b5:ff:67:9b:0c:79:96:1f:c8:6e:44:22:00:46:13:db:17:92:84
# SHA256 Fingerprint: 7d:3b:46:5a:60:14:e5:26:c0:af:fc:ee:21:27:d2:31:17:27:ad:81:1c:26:84:2d:00:6a:f3:73:06:cc:80:bd
-----BEGIN CERTIFICATE-----
MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2
MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
ADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC
206B89enfHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFci
KtZHgVdEglZTvYYUAQv8f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2
JxhP7JsowtS013wMPgwr38oE18aO6lhOqKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9
BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JNRvCAOVIyD+OEsnpD8l7e
Xz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0gBe4lL8B
PeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67
Xnfn6KVuY8INXWHQjNJsWiEOyiijzirplcdIz5ZvHZIlyMbGwcEMBawmxNJ10uEq
Z8A9W6Wa6897GqidFEXlD6CaZd4vKL3Ob5Rmg0gp2OpljK+T2WSfVVcmv2/LNzGZ
o2C7HK2JNDJiuEMhBnIMoVxtRsX6Kc8w3onccVvdtjc+31D1uAclJuW8tf48ArO3
+L5DwYcRlJ4jbBeKuIonDFRH8KmzwICMoCfrHRnjB453cMor9H124HhnAgMBAAGj
YzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE1FwWg4u3OpaaEg5+31IqEj
FNeeMB8GA1UdIwQYMBaAFE1FwWg4u3OpaaEg5+31IqEjFNeeMA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmn
xPBUlgtk87FYT15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2
LHo1YGwRgJfMqZJS5ivmae2p+DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzccc
obGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXgJXUjhx5c3LqdsKyzadsXg8n33gy8
CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//ZoyzH1kUQ7rVyZ2OuMe
IjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgOZtMA
DjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2F
AjgQ5ANh1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUX
Om/9riW99XJZZLF0KjhfGEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPb
AZO1XB4Y3WRayhgoPmMEEf0cjQAPuDffZ4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQl
Zvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuPcX/9XhmgD0uRuMRUvAaw
RY8mkaKO/qk=
-----END CERTIFICATE-----

# Issuer: CN=Visa eCommerce Root O=VISA OU=Visa International Service Association
# Subject: CN=Visa eCommerce Root O=VISA OU=Visa International Service Association
# Label: "Visa eCommerce Root"
# Serial: 25952180776285836048024890241505565794
# MD5 Fingerprint: fc:11:b8:d8:08:93:30:00:6d:23:f9:7e:eb:52:1e:02
# SHA1 Fingerprint: 70:17:9b:86:8c:00:a4:fa:60:91:52:22:3f:9f:3e:32:bd:e0:05:62
# SHA256 Fingerprint: 69:fa:c9:bd:55:fb:0a:c7:8d:53:bb:ee:5c:f1:d5:97:98:9f:d0:aa:ab:20:a2:51:51:bd:f1:73:3e:e7:d1:22
-----BEGIN CERTIFICATE-----
MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBr
MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl
cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv
bW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2WhcNMjIwNjI0MDAxNjEyWjBrMQsw
CQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5h
dGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1l
cmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h
2mCxlCfLF9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4E
lpF7sDPwsRROEW+1QK8bRaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdV
ZqW1LS7YgFmypw23RuwhY/81q6UCzyr0TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq
299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI/k4+oKsGGelT84ATB+0t
vz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzsGHxBvfaL
dXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD
AgEGMB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUF
AAOCAQEAX/FBfXxcCLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcR
zCSs00Rsca4BIGsDoo8Ytyk6feUWYFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3
LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd
7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw
++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
398znM/jra6O1I7mT1GvFpLgXPYHDw==
-----END CERTIFICATE-----

# Issuer: CN=Certum CA O=Unizeto Sp. z o.o.
# Subject: CN=Certum CA O=Unizeto Sp. z o.o.
# Label: "Certum Root CA"
# Serial: 65568
# MD5 Fingerprint: 2c:8f:9f:66:1d:18:90:b1:47:26:9d:8e:86:82:8c:a9
# SHA1 Fingerprint: 62:52:dc:40:f7:11:43:a2:2f:de:9e:f7:34:8e:06:42:51:b1:81:18
# SHA256 Fingerprint: d8:e0:fe:bc:1d:b2:e3:8d:00:94:0f:37:d2:7d:41:34:4d:99:3e:73:4b:99:d5:65:6d:97:78:d4:d8:14:36:24
-----BEGIN CERTIFICATE-----
MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM
MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD
QTAeFw0wMjA2MTExMDQ2MzlaFw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBM
MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD
QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6xwS7TT3zNJc4YPk/E
jG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdLkKWo
ePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GI
ULdtlkIJ89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapu
Ob7kky/ZR6By6/qmW6/KUz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUg
AKpoC6EahQGcxEZjgoi2IrHu/qpGWX7PNSzVttpd90gzFFS269lvzs2I1qsb2pY7
HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEA
uI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+GXYkHAQa
TOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTg
xSvgGrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1q
CjqTE5s7FCMTY5w/0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5x
O/fIR/RpbxXyEV6DHpx8Uq79AtoSqFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs
6GAqm4VKQPNriiTsBhYscw==
-----END CERTIFICATE-----

# Issuer: CN=AAA Certificate Services O=Comodo CA Limited
# Subject: CN=AAA Certificate Services O=Comodo CA Limited
# Label: "Comodo AAA Services root"
# Serial: 1
# MD5 Fingerprint: 49:79:04:b0:eb:87:19:ac:47:b0:bc:11:51:9b:74:d0
# SHA1 Fingerprint: d1:eb:23:a4:6d:17:d6:8f:d9:25:64:c2:f1:f1:60:17:64:d8:e3:49
# SHA256 Fingerprint: d7:a7:a0:fb:5d:7e:27:31:d7:71:e9:48:4e:bc:de:f7:1d:5f:0c:3e:0a:29:48:78:2b:c8:3e:e0:ea:69:9e:f4
-----BEGIN CERTIFICATE-----
MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj
YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL
MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM
GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua
BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe
3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4
YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR
rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm
ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU
oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v
QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
-----END CERTIFICATE-----

# Issuer: CN=Secure Certificate Services O=Comodo CA Limited
# Subject: CN=Secure Certificate Services O=Comodo CA Limited
# Label: "Comodo Secure Services root"
# Serial: 1
# MD5 Fingerprint: d3:d9:bd:ae:9f:ac:67:24:b3:c8:1b:52:e1:b9:a9:bd
# SHA1 Fingerprint: 4a:65:d5:f4:1d:ef:39:b8:b8:90:4a:4a:d3:64:81:33:cf:c7:a1:d1
# SHA256 Fingerprint: bd:81:ce:3b:4f:65:91:d1:1a:67:b5:fc:7a:47:fd:ef:25:52:1b:f9:aa:4e:18:b9:e3:df:2e:34:a7:80:3b:e8
-----BEGIN CERTIFICATE-----
MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRp
ZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVow
fjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAiBgNV
BAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPM
cm3ye5drswfxdySRXyWP9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3S
HpR7LZQdqnXXs5jLrLxkU0C8j6ysNstcrbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996
CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rCoznl2yY4rYsK7hljxxwk
3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3Vp6ea5EQz
6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNV
HQ4EFgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1Ud
EwEB/wQFMAMBAf8wgYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2Rv
Y2EuY29tL1NlY3VyZUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRw
Oi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmww
DQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q0
5qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj
Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI
gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ
aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl
izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk=
-----END CERTIFICATE-----

# Issuer: CN=Trusted Certificate Services O=Comodo CA Limited
# Subject: CN=Trusted Certificate Services O=Comodo CA Limited
# Label: "Comodo Trusted Services root"
# Serial: 1
# MD5 Fingerprint: 91:1b:3f:6e:cd:9e:ab:ee:07:fe:1f:71:d2:b3:61:27
# SHA1 Fingerprint: e1:9f:e3:0e:8b:84:60:9e:80:9b:17:0d:72:a8:c5:ba:6e:14:09:bd
# SHA256 Fingerprint: 3f:06:e5:56:81:d4:96:f5:be:16:9e:b5:38:9f:9f:2b:8f:f6:1e:17:08:df:68:81:72:48:49:cd:5d:27:cb:69
-----BEGIN CERTIFICATE-----
MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0
aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEwMDAwMDBaFw0yODEyMzEyMzU5NTla
MH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
BgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUwIwYD
VQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWW
fnJSoBVC21ndZHoa0Lh73TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMt
TGo87IvDktJTdyR0nAducPy9C1t2ul/y/9c3S0pgePfw+spwtOpZqqPOSC+pw7IL
fhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6juljatEPmsbS9Is6FARW
1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsSivnkBbA7
kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0G
A1UdDgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYD
VR0TAQH/BAUwAwEB/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21v
ZG9jYS5jb20vVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRo
dHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMu
Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFTQQuS9/
HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS
jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+
xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn
dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi
-----END CERTIFICATE-----

# Issuer: CN=QuoVadis Root Certification Authority O=QuoVadis Limited OU=Root Certification Authority
# Subject: CN=QuoVadis Root Certification Authority O=QuoVadis Limited OU=Root Certification Authority
# Label: "QuoVadis Root CA"
# Serial: 985026699
# MD5 Fingerprint: 27:de:36:fe:72:b7:00:03:00:9d:f4:f0:1e:6c:04:24
# SHA1 Fingerprint: de:3f:40:bd:50:93:d3:9b:6c:60:f6:da:bc:07:62:01:00:89:76:c9
# SHA256 Fingerprint: a4:5e:de:3b:bb:f0:9c:8a:e1:5c:72:ef:c0:72:68:d6:93:a2:1c:99:6f:d5:1e:67:ca:07:94:60:fd:6d:88:73
-----BEGIN CERTIFICATE-----
MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC
TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0
aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0
aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAzMTkxODMzMzNaFw0yMTAzMTcxODMz
MzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUw
IwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQDEyVR
dW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Yp
li4kVEAkOPcahdxYTMukJ0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2D
rOpm2RgbaIr1VxqYuvXtdj182d6UajtLF8HVj71lODqV0D1VNk7feVcxKh7YWWVJ
WCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeLYzcS19Dsw3sgQUSj7cug
F+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWenAScOospU
xbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCC
Ak4wPQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVv
dmFkaXNvZmZzaG9yZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREw
ggENMIIBCQYJKwYBBAG+WAABMIH7MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNl
IG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBh
c3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFy
ZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYI
KwYBBQUHAgEWFmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3T
KbkGGew5Oanwl4Rqy+/fMIGuBgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rq
y+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1p
dGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYD
VQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCL
MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSk
fnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf8
7C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1R
cHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0y
mQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQW
xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK
SnQ2+Q==
-----END CERTIFICATE-----

# Issuer: CN=QuoVadis Root CA 2 O=QuoVadis Limited
# Subject: CN=QuoVadis Root CA 2 O=QuoVadis Limited
# Label: "QuoVadis Root CA 2"
# Serial: 1289
# MD5 Fingerprint: 5e:39:7b:dd:f8:ba:ec:82:e9:ac:62:ba:0c:54:00:2b
# SHA1 Fingerprint: ca:3a:fb:cf:12:40:36:4b:44:b2:16:20:88:80:48:39:19:93:7c:f7
# SHA256 Fingerprint: 85:a0:dd:7d:d7:20:ad:b7:ff:05:f8:3d:54:2b:20:9d:c7:ff:45:28:f7:d6:77:b1:83:89:fe:a5:e5:c4:9e:86
-----BEGIN CERTIFICATE-----
MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x
GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv
b3QgQ0EgMjAeFw0wNjExMjQxODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNV
BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W
YWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCa
GMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6XJxg
Fyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55J
WpzmM+Yklvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bB
rrcCaoF6qUWD4gXmuVbBlDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp
+ARz8un+XJiM9XOva7R+zdRcAitMOeGylZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1
ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt66/3FsvbzSUr5R/7mp/i
Ucw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1JdxnwQ5hYIiz
PtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og
/zOhD7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UH
oycR7hYQe7xFSkyyBNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuI
yV77zGHcizN300QyNQliBJIWENieJ0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1Ud
EwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBQahGK8SEwzJQTU7tD2
A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGUa6FJpEcwRTEL
MAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2f
BluornFdLwUvZ+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzn
g/iN/Ae42l9NLmeyhP3ZRPx3UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2Bl
fF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodmVjB3pjd4M1IQWK4/YY7yarHvGH5K
WWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK+JDSV6IZUaUtl0Ha
B0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrWIozc
hLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPR
TUIZ3Ph1WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWD
mbA4CD/pXvk1B+TJYm5Xf6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0Z
ohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y
4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8VCLAAVBpQ570su9t+Oza
8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
-----END CERTIFICATE-----

# Issuer: CN=QuoVadis Root CA 3 O=QuoVadis Limited
# Subject: CN=QuoVadis Root CA 3 O=QuoVadis Limited
# Label: "QuoVadis Root CA 3"
# Serial: 1478
# MD5 Fingerprint: 31:85:3c:62:94:97:63:b9:aa:fd:89:4e:af:6f:e0:cf
# SHA1 Fingerprint: 1f:49:14:f7:d8:74:95:1d:dd:ae:02:c0:be:fd:3a:2d:82:75:51:85
# SHA256 Fingerprint: 18:f1:fc:7f:20:5d:f8:ad:dd:eb:7f:e0:07:dd:57:e3:af:37:5a:9c:4d:8d:73:54:6b:f4:f1:fe:d1:e1:8d:35
-----BEGIN CERTIFICATE-----
MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x
GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv
b3QgQ0EgMzAeFw0wNjExMjQxOTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNV
BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W
YWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDM
V0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNggDhoB
4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUr
H556VOijKTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd
8lyyBTNvijbO0BNO/79KDDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9Cabwv
vWhDFlaJKjdhkf2mrk7AyxRllDdLkgbvBNDInIjbC3uBr7E9KsRlOni27tyAsdLT
mZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwpp5ijJUMv7/FfJuGITfhe
btfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8nT8KKdjc
T5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDt
WAEXMJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZ
c6tsgLjoC2SToJyMGf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A
4iLItLRkT9a6fUg+qGkM17uGcclzuD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYD
VR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHTBgkrBgEEAb5YAAMwgcUwgZMG
CCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmljYXRlIGNvbnN0
aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0
aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVu
dC4wLQYIKwYBBQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2Nw
czALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4G
A1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4ywLQoUmkRzBFMQswCQYDVQQGEwJC
TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UEAxMSUXVvVmFkaXMg
Um9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZVqyM0
7ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSem
d1o417+shvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd
+LJ2w/w4E6oM3kJpK27zPOuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B
4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadN
t54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp8kokUvd0/bpO5qgdAm6x
DYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBCbjPsMZ57
k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6s
zHXug/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0j
Wy10QJLZYxkNc91pvGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeT
mJlglFwjz1onl14LBQaTNx47aTbrqZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK
4SVhM7JZG+Ju1zdXtg2pEto=
-----END CERTIFICATE-----

# Issuer: O=SECOM Trust.net OU=Security Communication RootCA1
# Subject: O=SECOM Trust.net OU=Security Communication RootCA1
# Label: "Security Communication Root CA"
# Serial: 0
# MD5 Fingerprint: f1:bc:63:6a:54:e0:b5:27:f5:cd:e7:1a:e3:4d:6e:4a
# SHA1 Fingerprint: 36:b1:2b:49:f9:81:9e:d7:4c:9e:bc:38:0f:c6:56:8f:5d:ac:b2:f7
# SHA256 Fingerprint: e7:5e:72:ed:9f:56:0e:ec:6e:b4:80:00:73:a4:3f:c3:ad:19:19:5a:39:22:82:01:78:95:97:4a:99:02:6b:6c
-----BEGIN CERTIFICATE-----
MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEY
MBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21t
dW5pY2F0aW9uIFJvb3RDQTEwHhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5
WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYD
VQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw8yl8
9f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJ
DKaVv0uMDPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9
Ms+k2Y7CI9eNqPPYJayX5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/N
QV3Is00qVUarH9oe4kA92819uZKAnDfdDJZkndwi92SL32HeFZRSFaB9UslLqCHJ
xrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2JChzAgMBAAGjPzA9MB0G
A1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYwDwYDVR0T
AQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vG
kl3g0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfr
Uj94nK9NrvjVT8+amCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5
Bw+SUEmK3TGXX8npN6o7WWWXlDLJs58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJU
JRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ6rBK+1YWc26sTfcioU+tHXot
RSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAiFL39vmwLAw==
-----END CERTIFICATE-----

# Issuer: CN=Sonera Class2 CA O=Sonera
# Subject: CN=Sonera Class2 CA O=Sonera
# Label: "Sonera Class 2 Root CA"
# Serial: 29
# MD5 Fingerprint: a3:ec:75:0f:2e:88:df:fa:48:01:4e:0b:5c:48:6f:fb
# SHA1 Fingerprint: 37:f7:6d:e6:07:7c:90:c5:b1:3e:93:1a:b7:41:10:b4:f2:e4:9a:27
# SHA256 Fingerprint: 79:08:b4:03:14:c1:38:10:0b:51:8d:07:35:80:7f:fb:fc:f8:51:8a:00:95:33:71:05:ba:38:6b:15:3d:d9:27
-----BEGIN CERTIFICATE-----
MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP
MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAx
MDQwNjA3Mjk0MFoXDTIxMDQwNjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNV
BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMiBDQTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3/Ei9vX+ALTU74W+o
Z6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybTdXnt
5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s
3TmVToMGf+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2Ej
vOr7nQKV0ba5cTppCD8PtOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu
8nYybieDwnPz3BjotJPqdURrBGAgcVeHnfO+oJAjPYok4doh28MCAwEAAaMzMDEw
DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITTXjwwCwYDVR0PBAQDAgEG
MA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt0jSv9zil
zqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/
3DEIcbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvD
FNr450kkkdAdavphOe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6
Tk6ezAyNlNzZRZxe7EJQY670XcSxEtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2
ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLHllpwrN9M
-----END CERTIFICATE-----

# Issuer: CN=Staat der Nederlanden Root CA O=Staat der Nederlanden
# Subject: CN=Staat der Nederlanden Root CA O=Staat der Nederlanden
# Label: "Staat der Nederlanden Root CA"
# Serial: 10000010
# MD5 Fingerprint: 60:84:7c:5a:ce:db:0c:d4:cb:a7:e9:fe:02:c6:a9:c0
# SHA1 Fingerprint: 10:1d:fa:3f:d5:0b:cb:bb:9b:b5:60:0c:19:55:a4:1a:f4:73:3a:04
# SHA256 Fingerprint: d4:1d:82:9e:8c:16:59:82:2a:f9:3f:ce:62:bf:fc:de:26:4f:c8:4e:8b:95:0c:5f:f2:75:d0:52:35:46:95:a3
-----BEGIN CERTIFICATE-----
MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJO
TDEeMBwGA1UEChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFh
dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEy
MTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4wHAYDVQQKExVTdGFhdCBkZXIgTmVk
ZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxhbmRlbiBSb290IENB
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFtvszn
ExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw71
9tV2U02PjLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MO
hXeiD+EwR+4A5zN9RGcaC1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+U
tFE5A3+y3qcym7RHjm+0Sq7lr7HcsBthvJly3uSJt3omXdozSVtSnA71iq3DuD3o
BmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn622r+I/q85Ej0ZytqERAh
SQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRVHSAAMDww
OgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMv
cm9vdC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA
7Jbg0zTBLL9s+DANBgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k
/rvuFbQvBgwp8qiSpGEN/KtcCFtREytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzm
eafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbwMVcoEoJz6TMvplW0C5GUR5z6
u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3ynGQI0DvDKcWy
7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
-----END CERTIFICATE-----

# Issuer: O=TDC Internet OU=TDC Internet Root CA
# Subject: O=TDC Internet OU=TDC Internet Root CA
# Label: "TDC Internet Root CA"
# Serial: 986490188
# MD5 Fingerprint: 91:f4:03:55:20:a1:f8:63:2c:62:de:ac:fb:61:1c:8e
# SHA1 Fingerprint: 21:fc:bd:8e:7f:6c:af:05:1b:d1:b3:43:ec:a8:e7:61:47:f2:0f:8a
# SHA256 Fingerprint: 48:98:c6:88:8c:0c:ff:b0:d3:e3:1a:ca:8a:37:d4:e3:51:5f:f7:46:d0:26:35:d8:66:46:cf:a0:a3:18:5a:e7
-----BEGIN CERTIFICATE-----
MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJE
SzEVMBMGA1UEChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQg
Um9vdCBDQTAeFw0wMTA0MDUxNjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNV
BAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJuZXQxHTAbBgNVBAsTFFREQyBJbnRl
cm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxLhA
vJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20jxsNu
Zp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a
0vnRrEvLznWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc1
4izbSysseLlJ28TQx5yc5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGN
eGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcD
R0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZIAYb4QgEBBAQDAgAHMGUG
A1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMMVERDIElu
dGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxME
Q1JMMTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3
WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAw
HQYDVR0OBBYEFGxkAcf9hW2syNqeUAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJ
KoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4IBAQBO
Q8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540mgwV5dOy0uaOX
wTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+
2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm89
9qNLPg7kbWzbO0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0
jUNAE4z9mQNUecYu6oah9jrUCbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38
aQNiuJkFBT1reBK9sG9l
-----END CERTIFICATE-----

# Issuer: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
# Subject: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
# Label: "UTN DATACorp SGC Root CA"
# Serial: 91374294542884689855167577680241077609
# MD5 Fingerprint: b3:a5:3e:77:21:6d:ac:4a:c0:c9:fb:d5:41:3d:ca:06
# SHA1 Fingerprint: 58:11:9f:0e:12:82:87:ea:50:fd:d9:87:45:6f:4f:78:dc:fa:d6:d4
# SHA256 Fingerprint: 85:fb:2f:91:dd:12:27:5a:01:45:b6:36:53:4f:84:02:4a:d6:8b:69:b8:ee:88:68:4f:f7:11:37:58:05:b3:48
-----BEGIN CERTIFICATE-----
MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB
kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG
EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD
VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cu
dXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6
E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ
D0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlowHDyUwDAXlCCpVZvNvlK
4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA9P4yPykq
lXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulW
bfXv33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQAB
o4GrMIGoMAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRT
MtGzz3/64PGgXYVOktKeRR20TzA9BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3Js
LnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dDLmNybDAqBgNVHSUEIzAhBggr
BgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IB
AQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft
Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyj
j98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH
KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv
2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3
mfnGV/TJVTl4uix5yaaIK/QI
-----END CERTIFICATE-----

# Issuer: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
# Subject: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
# Label: "UTN USERFirst Hardware Root CA"
# Serial: 91374294542884704022267039221184531197
# MD5 Fingerprint: 4c:56:41:e5:0d:bb:2b:e8:ca:a3:ed:18:08:ad:43:39
# SHA1 Fingerprint: 04:83:ed:33:99:ac:36:08:05:87:22:ed:bc:5e:46:00:e3:be:f9:d7
# SHA256 Fingerprint: 6e:a5:47:41:d0:04:66:7e:ed:1b:48:16:63:4a:a3:a7:9e:6e:4b:96:95:0f:82:79:da:fc:8d:9b:d8:81:21:37
-----BEGIN CERTIFICATE-----
MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG
A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe
MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v
d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh
cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn
0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ
M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a
MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd
oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI
DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy
oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0
dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy
bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF
BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli
CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE
CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t
3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS
KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA==
-----END CERTIFICATE-----

# Issuer: CN=Chambers of Commerce Root O=AC Camerfirma SA CIF A82743287 OU=http://www.chambersign.org
# Subject: CN=Chambers of Commerce Root O=AC Camerfirma SA CIF A82743287 OU=http://www.chambersign.org
# Label: "Camerfirma Chambers of Commerce Root"
# Serial: 0
# MD5 Fingerprint: b0:01:ee:14:d9:af:29:18:94:76:8e:f1:69:33:2a:84
# SHA1 Fingerprint: 6e:3a:55:a4:19:0c:19:5c:93:84:3c:c0:db:72:2e:31:30:61:f0:b1
# SHA256 Fingerprint: 0c:25:8a:12:a5:67:4a:ef:25:f2:8b:a7:dc:fa:ec:ee:a3:48:e5:41:e6:f5:cc:4e:e6:3b:71:b3:61:60:6a:c3
-----BEGIN CERTIFICATE-----
MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEn
MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL
ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMg
b2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAxNjEzNDNaFw0zNzA5MzAxNjEzNDRa
MH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZpcm1hIFNBIENJRiBB
ODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3JnMSIw
IAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0B
AQEFAAOCAQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtb
unXF/KGIJPov7coISjlUxFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0d
BmpAPrMMhe5cG3nCYsS4No41XQEMIwRHNaqbYE6gZj3LJgqcQKH0XZi/caulAGgq
7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jWDA+wWFjbw2Y3npuRVDM3
0pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFVd9oKDMyX
roDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIG
A1UdEwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5j
aGFtYmVyc2lnbi5vcmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p
26EpW1eLTXYGduHRooowDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIA
BzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hhbWJlcnNpZ24ub3JnMCcGA1Ud
EgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYDVR0gBFEwTzBN
BgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz
aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEB
AAxBl8IahsAifJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZd
p0AJPaxJRUXcLo0waLIJuvvDL8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi
1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wNUPf6s+xCX6ndbcj0dc97wXImsQEc
XCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/nADydb47kMgkdTXg0
eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1erfu
tGWaIZDgqtCYvDi1czyL+Nw=
-----END CERTIFICATE-----

# Issuer: CN=Global Chambersign Root O=AC Camerfirma SA CIF A82743287 OU=http://www.chambersign.org
# Subject: CN=Global Chambersign Root O=AC Camerfirma SA CIF A82743287 OU=http://www.chambersign.org
# Label: "Camerfirma Global Chambersign Root"
# Serial: 0
# MD5 Fingerprint: c5:e6:7b:bf:06:d0:4f:43:ed:c4:7a:65:8a:fb:6b:19
# SHA1 Fingerprint: 33:9b:6b:14:50:24:9b:55:7a:01:87:72:84:d9:e0:2f:c3:d2:d8:e9
# SHA256 Fingerprint: ef:3c:b4:17:fc:8e:bf:6f:97:87:6c:9e:4e:ce:39:de:1e:a5:fe:64:91:41:d1:02:8b:7d:11:c0:b2:29:8c:ed
-----BEGIN CERTIFICATE-----
MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEn
MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL
ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENo
YW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYxNDE4WhcNMzcwOTMwMTYxNDE4WjB9
MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgy
NzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4G
A1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUA
A4IBDQAwggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0
Mi+ITaFgCPS3CU6gSS9J1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/s
QJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8Oby4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpV
eAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl6DJWk0aJqCWKZQbua795
B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c8lCrEqWh
z0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0T
AQH/BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1i
ZXJzaWduLm9yZy9jaGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4w
TcbOX60Qq+UDpfqpFDAOBgNVHQ8BAf8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAH
MCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBjaGFtYmVyc2lnbi5vcmcwKgYD
VR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9yZzBbBgNVHSAE
VDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh
bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0B
AQUFAAOCAQEAPDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUM
bKGKfKX0j//U2K0X1S0E0T9YgOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXi
ryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJPJ7oKXqJ1/6v/2j1pReQvayZzKWG
VwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4IBHNfTIzSJRUTN3c
ecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREest2d/
AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
-----END CERTIFICATE-----

# Issuer: CN=NetLock Kozjegyzoi (Class A) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Subject: CN=NetLock Kozjegyzoi (Class A) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Label: "NetLock Notary (Class A) Root"
# Serial: 259
# MD5 Fingerprint: 86:38:6d:5e:49:63:6c:85:5c:db:6d:dc:94:b7:d0:f7
# SHA1 Fingerprint: ac:ed:5f:65:53:fd:25:ce:01:5f:1f:7a:48:3b:6a:74:9f:61:78:c6
# SHA256 Fingerprint: 7f:12:cd:5f:7e:5e:29:0e:c7:d8:51:79:d5:b7:2c:20:a5:be:75:08:ff:db:5b:f8:1a:b9:68:4a:7f:c9:f6:67
-----BEGIN CERTIFICATE-----
MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhV
MRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMe
TmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0
dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBB
KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oXDTE5MDIxOTIzMTQ0
N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhC
dWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQu
MRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBL
b3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSMD7tM9DceqQWC2ObhbHDqeLVu0ThEDaiD
zl3S1tWBxdRL51uUcCbbO51qTGL3cfNk1mE7PetzozfZz+qMkjvN9wfcZnSX9EUi
3fRc4L9t875lM+QVOr/bmJBVOMTtplVjC7B4BPTjbsE/jvxReB+SnoPC/tmwqcm8
WgD/qaiYdPv2LD4VOQ22BFWoDpggQrOxJa1+mm9dU7GrDPzr4PN6s6iz/0b2Y6LY
Oph7tqyF/7AlT3Rj5xMHpQqPBffAZG9+pyeAlt7ULoZgx2srXnN7F+eRP2QM2Esi
NCubMvJIH5+hCoR64sKtlz2O1cH5VqNQ6ca0+pii7pXmKgOM3wIDAQABo4ICnzCC
ApswDgYDVR0PAQH/BAQDAgAGMBIGA1UdEwEB/wQIMAYBAf8CAQQwEQYJYIZIAYb4
QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1GSUdZRUxFTSEgRXplbiB0
YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pvbGdhbHRhdGFz
aSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQu
IEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtm
ZWxlbG9zc2VnLWJpenRvc2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMg
ZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVs
amFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJhc2EgbWVndGFsYWxoYXRv
IGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBzOi8vd3d3
Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6
ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1
YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3Qg
dG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRs
b2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNAbmV0bG9jay5uZXQuMA0G
CSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5ayZrU3/b39/zcT0mwBQO
xmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjPytoUMaFP
0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQ
QeJBCWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxk
f1qbFFgBJ34TUMdrKuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK
8CtmdWOMovsEPoMOmzbwGOQmIMOM8CgHrTwXZoi1/baI
-----END CERTIFICATE-----

# Issuer: CN=NetLock Uzleti (Class B) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Subject: CN=NetLock Uzleti (Class B) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Label: "NetLock Business (Class B) Root"
# Serial: 105
# MD5 Fingerprint: 39:16:aa:b9:6a:41:e1:14:69:df:9e:6c:3b:72:dc:b6
# SHA1 Fingerprint: 87:9f:4b:ee:05:df:98:58:3b:e3:60:d6:33:e7:0d:3f:fe:98:71:af
# SHA256 Fingerprint: 39:df:7b:68:2b:7b:93:8f:84:71:54:81:cc:de:8d:60:d8:f2:2e:c5:98:87:7d:0a:aa:c1:2b:59:18:2b:03:12
-----BEGIN CERTIFICATE-----
MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUx
ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQD
EylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikgVGFudXNpdHZhbnlraWFkbzAeFw05
OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYDVQQGEwJIVTERMA8G
A1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNh
Z2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5l
dExvY2sgVXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqG
SIb3DQEBAQUAA4GNADCBiQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xK
gZjupNTKihe5In+DCnVMm8Bp2GQ5o+2So/1bXHQawEfKOml2mrriRBf8TKPV/riX
iK+IA4kfpPIEPsgHC+b5sy96YhQJRhTKZPWLgLViqNhr1nGTLbO/CVRY7QbrqHvc
Q7GhaQIDAQABo4ICnzCCApswEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNVHQ8BAf8E
BAMCAAYwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1G
SUdZRUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFu
b3MgU3pvbGdhbHRhdGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBh
bGFwamFuIGtlc3p1bHQuIEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExv
Y2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2VnLWJpenRvc2l0YXNhIHZlZGkuIEEgZGln
aXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYXogZWxvaXJ0
IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh
c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGph
biBhIGh0dHBzOi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJo
ZXRvIGF6IGVsbGVub3J6ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBP
UlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmlj
YXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBo
dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNA
bmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06
sPgzTEdM43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXa
n3BukxowOR0w2y7jfLKRstE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKS
NitjrFgBazMpUIaD8QFI
-----END CERTIFICATE-----

# Issuer: CN=NetLock Expressz (Class C) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Subject: CN=NetLock Expressz (Class C) Tanusitvanykiado O=NetLock Halozatbiztonsagi Kft. OU=Tanusitvanykiadok
# Label: "NetLock Express (Class C) Root"
# Serial: 104
# MD5 Fingerprint: 4f:eb:f1:f0:70:c2:80:63:5d:58:9f:da:12:3c:a9:c4
# SHA1 Fingerprint: e3:92:51:2f:0a:cf:f5:05:df:f6:de:06:7f:75:37:e1:65:ea:57:4b
# SHA256 Fingerprint: 0b:5e:ed:4e:84:64:03:cf:55:e0:65:84:84:40:ed:2a:82:75:8b:f5:b9:aa:1f:25:3d:46:13:cf:a0:80:ff:3f
-----BEGIN CERTIFICATE-----
MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUx
ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQD
EytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBDKSBUYW51c2l0dmFueWtpYWRvMB4X
DTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJBgNVBAYTAkhVMREw
DwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9u
c2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMr
TmV0TG9jayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzAN
BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNA
OoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3ZW3oDvV3zOwzDUXmbrVWg6dADEK8KuhRC
2VImESLH0iDMgqSaqf64gXadarfSNnU+sYYJ9m5tfk63euyucYT2BDMIJTLrdKwW
RMbkQJMdf60CAwEAAaOCAp8wggKbMBIGA1UdEwEB/wQIMAYBAf8CAQQwDgYDVR0P
AQH/BAQDAgAGMBEGCWCGSAGG+EIBAQQEAwIABzCCAmAGCWCGSAGG+EIBDQSCAlEW
ggJNRklHWUVMRU0hIEV6ZW4gdGFudXNpdHZhbnkgYSBOZXRMb2NrIEtmdC4gQWx0
YWxhbm9zIFN6b2xnYWx0YXRhc2kgRmVsdGV0ZWxlaWJlbiBsZWlydCBlbGphcmFz
b2sgYWxhcGphbiBrZXN6dWx0LiBBIGhpdGVsZXNpdGVzIGZvbHlhbWF0YXQgYSBO
ZXRMb2NrIEtmdC4gdGVybWVrZmVsZWxvc3NlZy1iaXp0b3NpdGFzYSB2ZWRpLiBB
IGRpZ2l0YWxpcyBhbGFpcmFzIGVsZm9nYWRhc2FuYWsgZmVsdGV0ZWxlIGF6IGVs
b2lydCBlbGxlbm9yemVzaSBlbGphcmFzIG1lZ3RldGVsZS4gQXogZWxqYXJhcyBs
ZWlyYXNhIG1lZ3RhbGFsaGF0byBhIE5ldExvY2sgS2Z0LiBJbnRlcm5ldCBob25s
YXBqYW4gYSBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIGNpbWVuIHZhZ3kg
a2VyaGV0byBheiBlbGxlbm9yemVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4g
SU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5kIHRoZSB1c2Ugb2YgdGhpcyBjZXJ0
aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQUyBhdmFpbGFibGUg
YXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwgYXQg
Y3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmY
ta3UzbM2xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2g
pO0u9f38vf5NNwgMvOOWgyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4
Fp1hBWeAyNDYpQcCNJgEjTME1A==
-----END CERTIFICATE-----

# Issuer: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
# Subject: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
# Label: "XRamp Global CA Root"
# Serial: 107108908803651509692980124233745014957
# MD5 Fingerprint: a1:0b:44:b3:ca:10:d8:00:6e:9d:0f:d8:0f:92:0a:d1
# SHA1 Fingerprint: b8:01:86:d1:eb:9c:86:a5:41:04:cf:30:54:f3:4c:52:b7:e5:58:c6
# SHA256 Fingerprint: ce:cd:dc:90:50:99:d8:da:df:c5:b1:d2:09:b7:37:cb:e2:c1:8c:fb:2c:10:c0:ff:0b:cf:0d:32:86:fc:1a:a2
-----BEGIN CERTIFICATE-----
MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB
gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk
MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY
UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx
NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3
dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy
dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS6
38eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCP
KZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7Q
DxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4
qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRa
JSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNVi
PvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0P
BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASs
jVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0
eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcNAQEFBQAD
ggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR
vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLa
IR9NmXmd4c8nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy
i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ
O+7ETPTsJ3xCwnR8gooJybQDJbw=
-----END CERTIFICATE-----

# Issuer: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
# Subject: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
# Label: "Go Daddy Class 2 CA"
# Serial: 0
# MD5 Fingerprint: 91:de:06:25:ab:da:fd:32:17:0c:bb:25:17:2a:84:67
# SHA1 Fingerprint: 27:96:ba:e6:3f:18:01:e2:77:26:1b:a0:d7:77:70:02:8f:20:ee:e4
# SHA256 Fingerprint: c3:84:6b:f2:4b:9e:93:ca:64:27:4c:0e:c6:7c:1e:cc:5e:02:4f:fc:ac:d2:d7:40:19:35:0e:81:fe:54:6a:e4
-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh
MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE
YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3
MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo
ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg
MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN
ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA
PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w
wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi
EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY
avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+
YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE
sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h
/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
ReYNnyicsbkqWletNw+vHX/bvZ8=
-----END CERTIFICATE-----

# Issuer: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
# Subject: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
# Label: "Starfield Class 2 CA"
# Serial: 0
# MD5 Fingerprint: 32:4a:4b:bb:c8:63:69:9b:be:74:9a:c6:dd:1d:46:24
# SHA1 Fingerprint: ad:7e:1c:28:b0:64:ef:8f:60:03:40:20:14:c3:d0:e3:37:0e:b5:8a
# SHA256 Fingerprint: 14:65:fa:20:53:97:b8:76:fa:a6:f0:a9:95:8e:55:90:e4:0f:cc:7f:aa:4f:b7:c2:c8:67:75:21:fb:5f:b6:58
-----BEGIN CERTIFICATE-----
MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp
U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw
NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE
ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp
ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3
DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf
8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN
+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0
X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa
K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA
1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G
A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR
zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0
YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD
bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w
DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3
L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D
eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
-----END CERTIFICATE-----

# Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
# Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
# Label: "StartCom Certification Authority"
# Serial: 1
# MD5 Fingerprint: 22:4d:8f:8a:fc:f7:35:c2:bb:57:34:90:7b:8b:22:16
# SHA1 Fingerprint: 3e:2b:f7:f2:03:1b:96:f3:8c:e6:c4:d8:a8:5d:3e:2d:58:47:6a:0f
# SHA256 Fingerprint: c7:66:a9:be:f2:d4:07:1c:86:3a:31:aa:49:20:e8:13:b2:d1:98:60:8c:b7:b7:cf:e2:11:43:b8:36:df:09:ea
-----BEGIN CERTIFICATE-----
MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW
MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9
MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w
+2OqqGwaVLRcJXrJosmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+
Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3
Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVcUjyJthkqcwEKDwOzEmDyei+B
26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT37uMdBNSSwID
AQABo4ICUjCCAk4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAa4wHQYDVR0OBBYE
FE4L7xqkQFulF2mHMMo0aEPQQa7yMGQGA1UdHwRdMFswLKAqoCiGJmh0dHA6Ly9j
ZXJ0LnN0YXJ0Y29tLm9yZy9zZnNjYS1jcmwuY3JsMCugKaAnhiVodHRwOi8vY3Js
LnN0YXJ0Y29tLm9yZy9zZnNjYS1jcmwuY3JsMIIBXQYDVR0gBIIBVDCCAVAwggFM
BgsrBgEEAYG1NwEBATCCATswLwYIKwYBBQUHAgEWI2h0dHA6Ly9jZXJ0LnN0YXJ0
Y29tLm9yZy9wb2xpY3kucGRmMDUGCCsGAQUFBwIBFilodHRwOi8vY2VydC5zdGFy
dGNvbS5vcmcvaW50ZXJtZWRpYXRlLnBkZjCB0AYIKwYBBQUHAgIwgcMwJxYgU3Rh
cnQgQ29tbWVyY2lhbCAoU3RhcnRDb20pIEx0ZC4wAwIBARqBl0xpbWl0ZWQgTGlh
YmlsaXR5LCByZWFkIHRoZSBzZWN0aW9uICpMZWdhbCBMaW1pdGF0aW9ucyogb2Yg
dGhlIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFp
bGFibGUgYXQgaHR0cDovL2NlcnQuc3RhcnRjb20ub3JnL3BvbGljeS5wZGYwEQYJ
YIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNT
TCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAgEAFmyZ
9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8
jhvh3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUW
FjgKXlf2Ysd6AgXmvB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJz
ewT4F+irsfMuXGRuczE6Eri8sxHkfY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1
ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L
EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu
L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC
O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V
um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh
NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14=
-----END CERTIFICATE-----

# Issuer: O=Government Root Certification Authority
# Subject: O=Government Root Certification Authority
# Label: "Taiwan GRCA"
# Serial: 42023070807708724159991140556527066870
# MD5 Fingerprint: 37:85:44:53:32:45:1f:20:f0:f3:95:e1:25:c4:43:4e
# SHA1 Fingerprint: f4:8b:11:bf:de:ab:be:94:54:20:71:e6:41:de:6b:be:88:2b:40:b9
# SHA256 Fingerprint: 76:00:29:5e:ef:e8:5b:9e:1f:d6:24:db:76:06:2a:aa:ae:59:81:8a:54:d2:77:4c:d4:c0:b2:c0:11:31:e1:b3
-----BEGIN CERTIFICATE-----
MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/
MQswCQYDVQQGEwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmlj
YXRpb24gQXV0aG9yaXR5MB4XDTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1ow
PzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dvdmVybm1lbnQgUm9vdCBDZXJ0aWZp
Y2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
AJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qNw8XR
IePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1q
gQdW8or5BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKy
yhwOeYHWtXBiCAEuTk8O1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAts
F/tnyMKtsc2AtJfcdgEWFelq16TheEfOhtX7MfP6Mb40qij7cEwdScevLJ1tZqa2
jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wovJ5pGfaENda1UhhXcSTvx
ls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7Q3hub/FC
VGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHK
YS1tB6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoH
EgKXTiCQ8P8NHuJBO9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThN
Xo+EHWbNxWCWtFJaBYmOlXqYwZE8lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1Ud
DgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNVHRMEBTADAQH/MDkGBGcqBwAE
MTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg209yewDL7MTqK
UWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ
TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyf
qzvS/3WXy6TjZwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaK
ZEk9GhiHkASfQlK3T8v+R0F2Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFE
JPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlUD7gsL0u8qV1bYH+Mh6XgUmMqvtg7
hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6QzDxARvBMB1uUO07+1
EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+HbkZ6Mm
nD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WX
udpVBrkk7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44Vbnz
ssQwmSNOXfJIoRIM3BKQCZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDe
LMDDav7v3Aun+kbfYNucpllQdSNpc5Oy+fwC00fmcc4QAu4njIT/rEUNE1yDMuAl
pYYsfPQS
-----END CERTIFICATE-----

# Issuer: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
# Subject: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
# Label: "Firmaprofesional Root CA"
# Serial: 1
# MD5 Fingerprint: 11:92:79:40:3c:b1:83:40:e5:ab:66:4a:67:92:80:df
# SHA1 Fingerprint: a9:62:8f:4b:98:a9:1b:48:35:ba:d2:c1:46:32:86:bb:66:64:6a:8c
# SHA256 Fingerprint: c1:cf:0b:52:09:64:35:e3:f1:b7:1d:aa:ec:45:5a:23:11:c8:40:4f:55:83:a9:e2:13:c6:9d:85:7d:94:33:05
-----BEGIN CERTIFICATE-----
MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMx
IjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1
dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20w
HhcNMDExMDI0MjIwMDAwWhcNMTMxMDI0MjIwMDAwWjCBnTELMAkGA1UEBhMCRVMx
IjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1
dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20w
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDnIwNvbyOlXnjOlSztlB5u
Cp4Bx+ow0Syd3Tfom5h5VtP8c9/Qit5Vj1H5WuretXDE7aTt/6MNbg9kUDGvASdY
rv5sp0ovFy3Tc9UTHI9ZpTQsHVQERc1ouKDAA6XPhUJHlShbz++AbOCQl4oBPB3z
hxAwJkh91/zpnZFx/0GaqUC1N5wpIE8fUuOgfRNtVLcK3ulqTgesrBlf3H5idPay
BQC6haD9HThuy1q7hryUZzM1gywfI834yJFxzJeL764P3CkDG8A563DtwW4O2GcL
iam8NeTvtjS0pbbELaW+0MOUJEjb35bTALVmGotmBQ/dPz/LP6pemkr4tErvlTcb
AgMBAAGjgZ8wgZwwKgYDVR0RBCMwIYYfaHR0cDovL3d3dy5maXJtYXByb2Zlc2lv
bmFsLmNvbTASBgNVHRMBAf8ECDAGAQH/AgEBMCsGA1UdEAQkMCKADzIwMDExMDI0
MjIwMDAwWoEPMjAxMzEwMjQyMjAwMDBaMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4E
FgQUMwugZtHq2s7eYpMEKFK1FH84aLcwDQYJKoZIhvcNAQEFBQADggEBAEdz/o0n
VPD11HecJ3lXV7cVVuzH2Fi3AQL0M+2TUIiefEaxvT8Ub/GzR0iLjJcG1+p+o1wq
u00vR+L4OQbJnC4xGgN49Lw4xiKLMzHwFgQEffl25EvXwOaD7FnMP97/T2u3Z36m
hoEyIwOdyPdfwUpgpZKpsaSgYMN4h7Mi8yrrW6ntBas3D7Hi05V2Y1Z0jFhyGzfl
ZKG+TQyTmAyX9odtsz/ny4Cm7YjHX1BiAuiZdBbQ5rQ58SfLyEDW44YQqSMSkuBp
QWOnryULwMWSyx6Yo1q6xTMPoJcB3X/ge9YGVM+h4k0460tQtcsm9MracEpqoeJ5
quGnM/b9Sh/22WA=
-----END CERTIFICATE-----

# Issuer: CN=Swisscom Root CA 1 O=Swisscom OU=Digital Certificate Services
# Subject: CN=Swisscom Root CA 1 O=Swisscom OU=Digital Certificate Services
# Label: "Swisscom Root CA 1"
# Serial: 122348795730808398873664200247279986742
# MD5 Fingerprint: f8:38:7c:77:88:df:2c:16:68:2e:c2:e2:52:4b:b8:f9
# SHA1 Fingerprint: 5f:3a:fc:0a:8b:64:f6:86:67:34:74:df:7e:a9:a2:fe:f9:fa:7a:51
# SHA256 Fingerprint: 21:db:20:12:36:60:bb:2e:d4:18:20:5d:a1:1e:e7:a8:5a:65:e2:bc:6e:55:b5:af:7e:78:99:c8:a2:66:d9:2e
-----BEGIN CERTIFICATE-----
MIIF2TCCA8GgAwIBAgIQXAuFXAvnWUHfV8w/f52oNjANBgkqhkiG9w0BAQUFADBk
MQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0
YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3Qg
Q0EgMTAeFw0wNTA4MTgxMjA2MjBaFw0yNTA4MTgyMjA2MjBaMGQxCzAJBgNVBAYT
AmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGlnaXRhbCBDZXJ0aWZp
Y2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAxMIICIjAN
BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0LmwqAzZuz8h+BvVM5OAFmUgdbI9
m2BtRsiMMW8Xw/qabFbtPMWRV8PNq5ZJkCoZSx6jbVfd8StiKHVFXqrWW/oLJdih
FvkcxC7mlSpnzNApbjyFNDhhSbEAn9Y6cV9Nbc5fuankiX9qUvrKm/LcqfmdmUc/
TilftKaNXXsLmREDA/7n29uj/x2lzZAeAR81sH8A25Bvxn570e56eqeqDFdvpG3F
EzuwpdntMhy0XmeLVNxzh+XTF3xmUHJd1BpYwdnP2IkCb6dJtDZd0KTeByy2dbco
kdaXvij1mB7qWybJvbCXc9qukSbraMH5ORXWZ0sKbU/Lz7DkQnGMU3nn7uHbHaBu
HYwadzVcFh4rUx80i9Fs/PJnB3r1re3WmquhsUvhzDdf/X/NTa64H5xD+SpYVUNF
vJbNcA78yeNmuk6NO4HLFWR7uZToXTNShXEuT46iBhFRyePLoW4xCGQMwtI89Tbo
19AOeCMgkckkKmUpWyL3Ic6DXqTz3kvTaI9GdVyDCW4pa8RwjPWd1yAv/0bSKzjC
L3UcPX7ape8eYIVpQtPM+GP+HkM5haa2Y0EQs3MevNP6yn0WR+Kn1dCjigoIlmJW
bjTb2QK5MHXjBNLnj8KwEUAKrNVxAmKLMb7dxiNYMUJDLXT5xp6mig/p/r+D5kNX
JLrvRjSq1xIBOO0CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0hBBYw
FDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j
BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzc
K6FptWfUjNP9MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzf
ky9NfEBWMXrrpA9gzXrzvsMnjgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7Ik
Vh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQMbFamIp1TpBcahQq4FJHgmDmHtqB
sfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4HVtA4oJVwIHaM190e
3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtlvrsR
ls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ip
mXeascClOS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HH
b6D0jqTsNFFbjCYDcKF31QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksf
rK/7DZBaZmBwXarNeNQk7shBoJMBkpxqnvy5JMWzFYJ+vq6VK+uxwNrjAWALXmms
hFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCyx/yP2FS1k2Kdzs9Z+z0Y
zirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMWNY6E0F/6
MBr1mmz0DlP5OlvRHA==
-----END CERTIFICATE-----

# Issuer: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
# Subject: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
# Label: "DigiCert Assured ID Root CA"
# Serial: 17154717934120587862167794914071425081
# MD5 Fingerprint: 87:ce:0b:7b:2a:0e:49:00:e1:58:71:9b:37:a8:93:72
# SHA1 Fingerprint: 05:63:b8:63:0d:62:d7:5a:bb:c8:ab:1e:4b:df:b5:a8:99:b2:4d:43
# SHA256 Fingerprint: 3e:90:99:b5:01:5e:8f:48:6c:00:bc:ea:9d:11:1e:e7:21:fa:ba:35:5a:89:bc:f1:df:69:56:1e:3d:c6:32:5c
-----BEGIN CERTIFICATE-----
MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl
cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c
JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP
mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+
wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4
VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/
AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB
AAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
BBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC
dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf
fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm
NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx
H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
-----END CERTIFICATE-----

# Issuer: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
# Subject: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
# Label: "DigiCert Global Root CA"
# Serial: 10944719598952040374951832963794454346
# MD5 Fingerprint: 79:e4:a9:84:0d:7d:3a:96:d7:c0:4f:e2:43:4c:89:2e
# SHA1 Fingerprint: a8:98:5d:3a:65:e5:e5:c4:b2:d7:d6:6d:40:c6:dd:2f:b1:9c:54:36
# SHA256 Fingerprint: 43:48:a0:e9:44:4c:78:cb:26:5e:05:8d:5e:89:44:b4:d8:4f:96:62:bd:26:db:25:7f:89:34:a4:43:c7:01:61
-----BEGIN CERTIFICATE-----
MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB
CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97
nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt
43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P
T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4
gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO
BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR
TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw
DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr
hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg
06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF
PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls
YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
-----END CERTIFICATE-----

# Issuer: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
# Subject: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
# Label: "DigiCert High Assurance EV Root CA"
# Serial: 3553400076410547919724730734378100087
# MD5 Fingerprint: d4:74:de:57:5c:39:b2:d3:9c:85:83:c5:c0:65:49:8a
# SHA1 Fingerprint: 5f:b7:ee:06:33:e2:59:db:ad:0c:4c:9a:e6:d3:8f:1a:61:c7:dc:25
# SHA256 Fingerprint: 74:31:e5:f4:c3:c1:ce:46:90:77:4f:0b:61:e0:54:40:88:3b:a9:a0:1e:d0:0b:a6:ab:d7:80:6e:d3:b1:18:cf
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL
MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3
LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug
RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm
+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW
PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM
xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB
Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3
hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg
EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA
FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec
nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z
eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF
hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2
Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
+OkuE6N36B9K
-----END CERTIFICATE-----

# Issuer: CN=Class 2 Primary CA O=Certplus
# Subject: CN=Class 2 Primary CA O=Certplus
# Label: "Certplus Class 2 Primary CA"
# Serial: 177770208045934040241468760488327595043
# MD5 Fingerprint: 88:2c:8c:52:b8:a2:3c:f3:f7:bb:03:ea:ae:ac:42:0b
# SHA1 Fingerprint: 74:20:74:41:72:9c:dd:92:ec:79:31:d8:23:10:8d:c2:81:92:e2:bb
# SHA256 Fingerprint: 0f:99:3c:8a:ef:97:ba:af:56:87:14:0e:d5:9a:d1:82:1b:b4:af:ac:f0:aa:9a:58:b5:d5:7a:33:8a:3a:fb:cb
-----BEGIN CERTIFICATE-----
MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAw
PTELMAkGA1UEBhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFz
cyAyIFByaW1hcnkgQ0EwHhcNOTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9
MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2VydHBsdXMxGzAZBgNVBAMTEkNsYXNz
IDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANxQ
ltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR5aiR
VhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyL
kcAbmXuZVg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCd
EgETjdyAYveVqUSISnFOYFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yas
H7WLO7dDWWuwJKZtkIvEcupdM5i3y95ee++U8Rs+yskhwcWYAqqi9lt3m/V+llU0
HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRMECDAGAQH/AgEKMAsGA1Ud
DwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJYIZIAYb4
QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMu
Y29tL0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/
AN9WM2K191EBkOvDP9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8
yfFC82x/xXp8HVGIutIKPidd3i1RTtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMR
FcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+7UCmnYR0ObncHoUW2ikbhiMA
ybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW//1IMwrh3KWB
kJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
l7+ijrRU
-----END CERTIFICATE-----

# Issuer: CN=DST Root CA X3 O=Digital Signature Trust Co.
# Subject: CN=DST Root CA X3 O=Digital Signature Trust Co.
# Label: "DST Root CA X3"
# Serial: 91299735575339953335919266965803778155
# MD5 Fingerprint: 41:03:52:dc:0f:f7:50:1b:16:f0:02:8e:ba:6f:45:c5
# SHA1 Fingerprint: da:c9:02:4f:54:d8:f6:df:94:93:5f:b1:73:26:38:ca:6a:d7:7c:13
# SHA256 Fingerprint: 06:87:26:03:31:a7:24:03:d9:09:f1:05:e6:9b:cf:0d:32:e1:bd:24:93:ff:c6:d9:20:6d:11:bc:d6:77:07:39
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----

# Issuer: CN=DST ACES CA X6 O=Digital Signature Trust OU=DST ACES
# Subject: CN=DST ACES CA X6 O=Digital Signature Trust OU=DST ACES
# Label: "DST ACES CA X6"
# Serial: 17771143917277623872238992636097467865
# MD5 Fingerprint: 21:d8:4c:82:2b:99:09:33:a2:eb:14:24:8d:8e:5f:e8
# SHA1 Fingerprint: 40:54:da:6f:1c:3f:40:74:ac:ed:0f:ec:cd:db:79:d1:53:fb:90:1d
# SHA256 Fingerprint: 76:7c:95:5a:76:41:2c:89:af:68:8e:90:a1:c7:0f:55:6c:fd:6b:60:25:db:ea:10:41:6d:7e:b6:83:1f:8c:40
-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBb
MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3Qx
ETAPBgNVBAsTCERTVCBBQ0VTMRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0w
MzExMjAyMTE5NThaFw0xNzExMjAyMTE5NThaMFsxCzAJBgNVBAYTAlVTMSAwHgYD
VQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UECxMIRFNUIEFDRVMx
FzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPu
ktKe1jzIDZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7
gLFViYsx+tC3dr5BPTCapCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZH
fAjIgrrep4c9oW24MFbCswKBXy314powGCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4a
ahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPyMjwmR/onJALJfh1biEIT
ajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1UdEwEB/wQF
MAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rk
c3QuY29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjto
dHRwOi8vd3d3LnRydXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMt
aW5kZXguaHRtbDAdBgNVHQ4EFgQUCXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZI
hvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V25FYrnJmQ6AgwbN99Pe7lv7Uk
QIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6tFr8hlxCBPeP/
h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq
nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpR
rscL9yuwNwXsvFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf2
9w4LTJxoeHtxMcfrHuBnQfO3oKfN5XozNmr6mis=
-----END CERTIFICATE-----

# Issuer: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=(c) 2005 TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş.
# Subject: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=(c) 2005 TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş.
# Label: "TURKTRUST Certificate Services Provider Root 1"
# Serial: 1
# MD5 Fingerprint: f1:6a:22:18:c9:cd:df:ce:82:1d:1d:b7:78:5c:a9:a5
# SHA1 Fingerprint: 79:98:a3:08:e1:4d:65:85:e6:c2:1e:15:3a:71:9f:ba:5a:d3:4a:d9
# SHA256 Fingerprint: 44:04:e3:3b:5e:14:0d:cf:99:80:51:fd:fc:80:28:c7:c8:16:15:c5:ee:73:7b:11:1b:58:82:33:a9:b5:35:a0
-----BEGIN CERTIFICATE-----
MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOc
UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
c8SxMQswCQYDVQQGDAJUUjEPMA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykg
MjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8
dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMxMDI3MTdaFw0xNTAz
MjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsgU2Vy
dGlmaWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYMAlRSMQ8wDQYD
VQQHDAZBTktBUkExVjBUBgNVBAoMTShjKSAyMDA1IFTDnFJLVFJVU1QgQmlsZ2kg
xLBsZXRpxZ9pbSB2ZSBCaWxpxZ9pbSBHw7x2ZW5sacSfaSBIaXptZXRsZXJpIEEu
xZ4uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAylIF1mMD2Bxf3dJ7
XfIMYGFbazt0K3gNfUW9InTojAPBxhEqPZW8qZSwu5GXyGl8hMW0kWxsE2qkVa2k
heiVfrMArwDCBRj1cJ02i67L5BuBf5OI+2pVu32Fks66WJ/bMsW9Xe8iSi9BB35J
YbOG7E6mQW6EvAPs9TscyB/C7qju6hJKjRTP8wrgUDn5CDX4EVmt5yLqS8oUBt5C
urKZ8y1UiBAG6uEaPj1nH/vO+3yC6BFdSsG5FOpU2WabfIl9BJpiyelSPJ6c79L1
JuTm5Rh8i27fbMx4W09ysstcP4wFjdFMjK2Sx+F4f2VsSQZQLJ4ywtdKxnWKWU51
b0dewQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAV
9VX/N5aAWSGk/KEVTCD21F/aAyT8z5Aa9CEKmu46sWrv7/hg0Uw2ZkUd82YCdAR7
kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxEq8Sn5RTOPEFh
fEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy
B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdA
aLX/7KfS0zgYnNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKS
RGQDJereW26fyfJOrN3H
-----END CERTIFICATE-----

# Issuer: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş. (c) Kasım 2005
# Subject: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş. (c) Kasım 2005
# Label: "TURKTRUST Certificate Services Provider Root 2"
# Serial: 1
# MD5 Fingerprint: 37:a5:6e:d4:b1:25:84:97:b7:fd:56:15:7a:f9:a2:00
# SHA1 Fingerprint: b4:35:d4:e1:11:9d:1c:66:90:a7:49:eb:b3:94:bd:63:7b:a7:82:b7
# SHA256 Fingerprint: c4:70:cf:54:7e:23:02:b9:77:fb:29:dd:71:a8:9a:7b:6c:1f:60:77:7b:03:29:f5:60:17:f3:28:bf:4f:6b:e6
-----BEGIN CERTIFICATE-----
MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOc
UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
c8SxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xS
S1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kg
SGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcNMDUxMTA3MTAwNzU3
WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVrdHJv
bmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJU
UjEPMA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSw
bGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWe
LiAoYykgS2FzxLFtIDIwMDUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqeLCDe2JAOCtFp0if7qnef
J1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKIx+XlZEdh
R3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJ
Qv2gQrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGX
JHpsmxcPbe9TmJEr5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1p
zpwACPI2/z7woQ8arBT9pmAPAgMBAAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58S
Fq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
KoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/nttRbj2hWyfIvwq
ECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4
Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFz
gw2lGh1uEpJ+hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotH
uFEJjOp9zYhys2AzsfAKRO8P9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LS
y3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5UrbnBEI=
-----END CERTIFICATE-----

# Issuer: CN=SwissSign Gold CA - G2 O=SwissSign AG
# Subject: CN=SwissSign Gold CA - G2 O=SwissSign AG
# Label: "SwissSign Gold CA - G2"
# Serial: 13492815561806991280
# MD5 Fingerprint: 24:77:d9:a8:91:d1:3b:fa:88:2d:c2:ff:f8:cd:33:93
# SHA1 Fingerprint: d8:c5:38:8a:b7:30:1b:1b:6e:d4:7a:e6:45:25:3a:6f:9f:1a:27:61
# SHA256 Fingerprint: 62:dd:0b:e9:b9:f5:0a:16:3e:a0:f8:e7:5c:05:3b:1e:ca:57:ea:55:c8:68:8f:64:7c:68:81:f2:c8:35:7b:95
-----BEGIN CERTIFICATE-----
MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
BAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2ln
biBHb2xkIENBIC0gRzIwHhcNMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBF
MQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMR8wHQYDVQQDExZT
d2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
CgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUqt2/8
76LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+
bbqBHH5CjCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c
6bM8K8vzARO/Ws/BtQpgvd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqE
emA8atufK+ze3gE/bk3lUIbLtK/tREDFylqM2tIrfKjuvqblCqoOpd8FUrdVxyJd
MmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvRAiTysybUa9oEVeXBCsdt
MDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuendjIj3o02y
MszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69y
FGkOpeUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPi
aG59je883WX0XaxR7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxM
gI93e2CaHt+28kgeDrpOVG2Y4OGiGqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCB
qTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWyV7
lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64OfPAeGZe6Drn
8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe6
45R88a7A3hfm5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczO
UYrHUDFu4Up+GC9pWbY9ZIEr44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5
O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOfMke6UiI0HTJ6CVanfCU2qT1L2sCC
bwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6mGu6uLftIdxf+u+yv
GPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxpmo/a
77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCC
hdiDyyJkvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid3
92qgQmwLOM7XdVAyksLfKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEpp
Ld6leNcG2mqeSz53OiATIgHQv2ieY2BrNU0LbbqhPcCT4H8js1WtciVORvnSFu+w
ZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6LqjviOvrv1vA+ACOzB2+htt
Qc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
-----END CERTIFICATE-----

# Issuer: CN=SwissSign Silver CA - G2 O=SwissSign AG
# Subject: CN=SwissSign Silver CA - G2 O=SwissSign AG
# Label: "SwissSign Silver CA - G2"
# Serial: 5700383053117599563
# MD5 Fingerprint: e0:06:a1:c9:7d:cf:c9:fc:0d:c0:56:75:96:d8:62:13
# SHA1 Fingerprint: 9b:aa:e5:9f:56:ee:21:cb:43:5a:be:25:93:df:a7:f0:40:d1:1d:cb
# SHA256 Fingerprint: be:6c:4d:a2:bb:b9:ba:59:b6:f3:93:97:68:37:42:46:c3:c0:05:99:3f:a9:8f:02:0d:1d:ed:be:d4:8a:81:d5
-----BEGIN CERTIFICATE-----
MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UE
BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWdu
IFNpbHZlciBDQSAtIEcyMB4XDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0Nlow
RzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMY
U3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644N0Mv
Fz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7br
YT7QbNHm+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieF
nbAVlDLaYQ1HTWBCrpJH6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH
6ATK72oxh9TAtvmUcXtnZLi2kUpCe2UuMGoM9ZDulebyzYLs2aFK7PayS+VFheZt
eJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5hqAaEuSh6XzjZG6k4sIN/
c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5FZGkECwJ
MoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRH
HTBsROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTf
jNFusB3hB48IHpmccelM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb6
5i/4z3GcRm25xBWNOHkDRUjvxF3XCO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOB
rDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU
F6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRBtjpbO8tFnb0c
wpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIB
AHPGgeAn0i0P4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShp
WJHckRE1qTodvBqlYJ7YH39FkWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9
xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L3XWgwF15kIwb4FDm3jH+mHtwX6WQ
2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx/uNncqCxv1yL5PqZ
IseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFaDGi8
aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2X
em1ZqSqPe97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQR
dAtq/gsD/KNVV4n+SsuuWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/
OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+
hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLy
tGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
# Subject: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
# Label: "GeoTrust Primary Certification Authority"
# Serial: 32798226551256963324313806436981982369
# MD5 Fingerprint: 02:26:c3:01:5e:08:30:37:43:a9:d0:7d:cf:37:e6:bf
# SHA1 Fingerprint: 32:3c:11:8e:1b:f7:b8:b6:52:54:e2:e2:10:0d:d6:02:90:37:f0:96
# SHA256 Fingerprint: 37:d5:10:06:c5:12:ea:ab:62:64:21:f1:ec:8c:92:01:3f:c5:f8:2a:e9:8e:e5:33:eb:46:19:b8:de:b4:d0:6c
-----BEGIN CERTIFICATE-----
MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY
MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo
R2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEx
MjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
Ew1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQcmltYXJ5IENlcnRp
ZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9
AWbK7hWNb6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjA
ZIVcFU2Ix7e64HXprQU9nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE0
7e9GceBrAqg1cmuXm2bgyxx5X9gaBGgeRwLmnWDiNpcB3841kt++Z8dtd1k7j53W
kBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGttm/81w7a4DSwDRp35+MI
mO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G
A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJ
KoZIhvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ1
6CePbJC/kRYkRj5KTs4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl
4b7UVXGYNTq+k+qurUKykG/g/CFNNWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6K
oKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHaFloxt/m0cYASSJlyc1pZU8Fj
UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU
AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
-----END CERTIFICATE-----

# Issuer: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
# Subject: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
# Label: "thawte Primary Root CA"
# Serial: 69529181992039203566298953787712940909
# MD5 Fingerprint: 8c:ca:dc:0b:22:ce:f5:be:72:ac:41:1a:11:a8:d8:12
# SHA1 Fingerprint: 91:c6:d6:ee:3e:8a:c8:63:84:e5:48:c2:99:29:5c:75:6c:81:7b:81
# SHA256 Fingerprint: 8d:72:2f:81:a9:c1:13:c0:79:1d:f1:36:a2:96:6d:b2:6c:95:0a:97:1d:b4:6b:41:99:f4:ea:54:b7:8b:fb:9f
-----BEGIN CERTIFICATE-----
MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB
qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV
BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw
NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j
LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG
A1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
IG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs
W0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta
3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk
6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6
Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J
NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA
MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP
r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU
DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz
YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2
/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/
LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7
jVaMaA==
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
# Label: "VeriSign Class 3 Public Primary Certification Authority - G5"
# Serial: 33037644167568058970164719475676101450
# MD5 Fingerprint: cb:17:e4:31:67:3e:e2:09:fe:45:57:93:f3:0a:fa:1c
# SHA1 Fingerprint: 4e:b6:d5:78:49:9b:1c:cf:5f:58:1e:ad:56:be:3d:9b:67:44:a5:e5
# SHA256 Fingerprint: 9a:cf:ab:7e:43:c8:d8:80:d0:6b:26:2a:94:de:ee:e4:b4:65:99:89:c3:d0:ca:f1:9b:af:64:05:e4:1a:b7:df
-----BEGIN CERTIFICATE-----
MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB
yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp
U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW
ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0
aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL
MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln
biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1
nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex
t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz
SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG
BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+
rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/
NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv
MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE
p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y
5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK
WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
-----END CERTIFICATE-----

# Issuer: CN=SecureTrust CA O=SecureTrust Corporation
# Subject: CN=SecureTrust CA O=SecureTrust Corporation
# Label: "SecureTrust CA"
# Serial: 17199774589125277788362757014266862032
# MD5 Fingerprint: dc:32:c3:a7:6d:25:57:c7:68:09:9d:ea:2d:a9:a2:d1
# SHA1 Fingerprint: 87:82:c6:c3:04:35:3b:cf:d2:96:92:d2:59:3e:7d:44:d9:34:ff:11
# SHA256 Fingerprint: f1:c1:b5:0a:e5:a2:0d:d8:03:0e:c9:f6:bc:24:82:3d:d3:67:b5:25:57:59:b4:e7:1b:61:fc:e9:f7:37:5d:73
-----BEGIN CERTIFICATE-----
MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBI
MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x
FzAVBgNVBAMTDlNlY3VyZVRydXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIz
MTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1NlY3VyZVRydXN0IENv
cnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQXOZEz
Zum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO
0gMdA+9tDWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIao
wW8xQmxSPmjL8xk037uHGFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj
7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b01k/unK8RCSc43Oz969XL0Imnal0ugBS
8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmHursCAwEAAaOBnTCBmjAT
BgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCeg
JYYjaHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGC
NxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt3
6Z3q059c4EVlew3KW+JwULKUBRSuSceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/
3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHfmbx8IVQr5Fiiu1cprp6poxkm
D5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZnMUFdAvnZyPS
CPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
-----END CERTIFICATE-----

# Issuer: CN=Secure Global CA O=SecureTrust Corporation
# Subject: CN=Secure Global CA O=SecureTrust Corporation
# Label: "Secure Global CA"
# Serial: 9751836167731051554232119481456978597
# MD5 Fingerprint: cf:f4:27:0d:d4:ed:dc:65:16:49:6d:3d:da:bf:6e:de
# SHA1 Fingerprint: 3a:44:73:5a:e5:81:90:1f:24:86:61:46:1e:3b:9c:c4:5f:f5:3a:1b
# SHA256 Fingerprint: 42:00:f5:04:3a:c8:59:0e:bb:52:7d:20:9e:d1:50:30:29:fb:cb:d4:1c:a1:b5:06:ec:27:f1:5a:de:7d:ac:69
-----BEGIN CERTIFICATE-----
MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBK
MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x
GTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkx
MjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3Qg
Q29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jxYDiJ
iQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa
/FHtaMbQbqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJ
jnIFHovdRIWCQtBJwB1g8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnI
HmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYVHDGA76oYa8J719rO+TMg1fW9ajMtgQT7
sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi0XPnj3pDAgMBAAGjgZ0w
gZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCsw
KaAnoCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsG
AQQBgjcVAQQDAgEAMA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0L
URYD7xh8yOOvaliTFGCRsoTciE6+OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXO
H0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cnCDpOGR86p1hcF895P4vkp9Mm
I50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/53CYNv6ZHdAbY
iNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
-----END CERTIFICATE-----

# Issuer: CN=COMODO Certification Authority O=COMODO CA Limited
# Subject: CN=COMODO Certification Authority O=COMODO CA Limited
# Label: "COMODO Certification Authority"
# Serial: 104350513648249232941998508985834464573
# MD5 Fingerprint: 5c:48:dc:f7:42:72:ec:56:94:6d:1c:cc:71:35:80:75
# SHA1 Fingerprint: 66:31:bf:9e:f7:4f:9e:b6:c9:d5:a6:0c:ba:6a:be:d1:f7:bd:ef:7b
# SHA256 Fingerprint: 0c:2c:d6:3d:f7:80:6f:a3:99:ed:e8:09:11:6b:57:5b:f8:79:89:f0:65:18:f9:80:8c:86:05:03:17:8b:af:66
-----BEGIN CERTIFICATE-----
MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB
gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV
BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw
MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl
YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P
RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0
aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3
UcEbVASY06m/weaKXTuH+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI
2GqGd0S7WWaXUF601CxwRM/aN5VCaTwwxHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8
Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV4EajcNxo2f8ESIl33rXp
+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA1KGzqSX+
DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5O
nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW
/zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g
PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u
QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY
SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv
IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4
zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd
BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB
ZQ==
-----END CERTIFICATE-----

# Issuer: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
# Subject: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
# Label: "Network Solutions Certificate Authority"
# Serial: 116697915152937497490437556386812487904
# MD5 Fingerprint: d3:f3:a6:16:c0:fa:6b:1d:59:b1:2d:96:4d:0e:11:2e
# SHA1 Fingerprint: 74:f8:a3:c3:ef:e7:b3:90:06:4b:83:90:3c:21:64:60:20:e5:df:ce
# SHA256 Fingerprint: 15:f0:ba:00:a3:ac:7a:f3:ac:88:4c:07:2b:10:11:a0:77:bd:77:c0:97:f4:01:64:b2:f8:59:8a:bd:83:86:0c
-----BEGIN CERTIFICATE-----
MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi
MQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3Jp
dHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMxMjM1OTU5WjBiMQswCQYDVQQGEwJV
UzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydO
ZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwz
c7MEL7xxjOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPP
OCwGJgl6cvf6UDL4wpPTaaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rl
mGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXTcrA/vGp97Eh/jcOrqnErU2lBUzS1sLnF
BgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc/Qzpf14Dl847ABSHJ3A4
qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMBAAGjgZcw
gZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIB
BjAPBgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwu
bmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3Jp
dHkuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc8
6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/
h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH
/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN
pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
-----END CERTIFICATE-----

# Issuer: CN=WellsSecure Public Root Certificate Authority O=Wells Fargo WellsSecure OU=Wells Fargo Bank NA
# Subject: CN=WellsSecure Public Root Certificate Authority O=Wells Fargo WellsSecure OU=Wells Fargo Bank NA
# Label: "WellsSecure Public Root Certificate Authority"
# Serial: 1
# MD5 Fingerprint: 15:ac:a5:c2:92:2d:79:bc:e8:7f:cb:67:ed:02:cf:36
# SHA1 Fingerprint: e7:b4:f6:9d:61:ec:90:69:db:7e:90:a7:40:1a:3c:f4:7d:4f:e8:ee
# SHA256 Fingerprint: a7:12:72:ae:aa:a3:cf:e8:72:7f:7f:b3:9f:0f:b3:d1:e5:42:6e:90:60:b0:6e:e6:f1:3e:9a:3c:58:33:cd:43
-----BEGIN CERTIFICATE-----
MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMx
IDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxs
cyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9v
dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDcxMjEzMTcwNzU0WhcNMjIxMjE0
MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdl
bGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQD
DC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkw
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+r
WxxTkqxtnt3CxC5FlAM1iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjU
Dk/41itMpBb570OYj7OeUt9tkTmPOL13i0Nj67eT/DBMHAGTthP796EfvyXhdDcs
HqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8bJVhHlfXBIEyg1J55oNj
z7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiBK0HmOFaf
SZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/Slwxl
AgMBAAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqG
KGh0dHA6Ly9jcmwucGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0P
AQH/BAQDAgHGMB0GA1UdDgQWBBQmlRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0j
BIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGBi6SBiDCBhTELMAkGA1UEBhMC
VVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNX
ZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg
Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEB
ALkVsUSRzCPIK0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd
/ZDJPHV3V3p9+N701NX3leZ0bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pB
A4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSljqHyita04pO2t/caaH/+Xc/77szWn
k4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+esE2fDbbFwRnzVlhE9
iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJtylv
2G0xffX8oRAHh84vWdw+WNs=
-----END CERTIFICATE-----

# Issuer: CN=COMODO ECC Certification Authority O=COMODO CA Limited
# Subject: CN=COMODO ECC Certification Authority O=COMODO CA Limited
# Label: "COMODO ECC Certification Authority"
# Serial: 41578283867086692638256921589707938090
# MD5 Fingerprint: 7c:62:ff:74:9d:31:53:5e:68:4a:d5:78:aa:1e:bf:23
# SHA1 Fingerprint: 9f:74:4e:9f:2b:4d:ba:ec:0f:31:2c:50:b6:56:3b:8e:2d:93:c3:11
# SHA256 Fingerprint: 17:93:92:7a:06:14:54:97:89:ad:ce:2f:8f:34:f7:f0:b6:6d:0f:3a:e3:a3:b8:4d:21:ec:15:db:ba:4f:ad:c7
-----BEGIN CERTIFICATE-----
MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL
MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT
IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw
MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy
ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N
T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR
FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J
cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW
BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm
fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv
GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
-----END CERTIFICATE-----

# Issuer: CN=IGC/A O=PM/SGDN OU=DCSSI
# Subject: CN=IGC/A O=PM/SGDN OU=DCSSI
# Label: "IGC/A"
# Serial: 245102874772
# MD5 Fingerprint: 0c:7f:dd:6a:f4:2a:b9:c8:9b:bd:20:7e:a9:db:5c:37
# SHA1 Fingerprint: 60:d6:89:74:b5:c2:65:9e:8a:0f:c1:88:7c:88:d2:46:69:1b:18:2c
# SHA256 Fingerprint: b9:be:a7:86:0a:96:2e:a3:61:1d:ab:97:ab:6d:a3:e2:1c:10:68:b9:7d:55:57:5e:d0:e1:12:79:c1:1c:89:32
-----BEGIN CERTIFICATE-----
MIIEAjCCAuqgAwIBAgIFORFFEJQwDQYJKoZIhvcNAQEFBQAwgYUxCzAJBgNVBAYT
AkZSMQ8wDQYDVQQIEwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQ
TS9TR0ROMQ4wDAYDVQQLEwVEQ1NTSTEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG
9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZyMB4XDTAyMTIxMzE0MjkyM1oXDTIw
MTAxNzE0MjkyMlowgYUxCzAJBgNVBAYTAkZSMQ8wDQYDVQQIEwZGcmFuY2UxDjAM
BgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVEQ1NTSTEO
MAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2
LmZyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsh/R0GLFMzvABIaI
s9z4iPf930Pfeo2aSVz2TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2
xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCWSo7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4
u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYyHF2fYPepraX/z9E0+X1b
F8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNdfrGoRpAx
Vs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGd
PDPQtQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNV
HSAEDjAMMAoGCCqBegF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAx
NjAfBgNVHSMEGDAWgBSjBS8YYFDCiQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUF
AAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RKq89toB9RlPhJy3Q2FLwV3duJ
L92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3QMZsyK10XZZOY
YLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg
Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2a
NjSaTFR+FwNIlQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R
0982gaEbeC9xs/FZTEYYKKuF0mBWWg==
-----END CERTIFICATE-----

# Issuer: O=SECOM Trust Systems CO.,LTD. OU=Security Communication EV RootCA1
# Subject: O=SECOM Trust Systems CO.,LTD. OU=Security Communication EV RootCA1
# Label: "Security Communication EV RootCA1"
# Serial: 0
# MD5 Fingerprint: 22:2d:a6:01:ea:7c:0a:f7:f0:6c:56:43:3f:77:76:d3
# SHA1 Fingerprint: fe:b8:c4:32:dc:f9:76:9a:ce:ae:3d:d8:90:8f:fd:28:86:65:64:7d
# SHA256 Fingerprint: a2:2d:ba:68:1e:97:37:6e:2d:39:7d:72:8a:ae:3a:9b:62:96:b9:fd:ba:60:bc:2e:11:f6:47:f2:c6:75:fb:37
-----BEGIN CERTIFICATE-----
MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDEl
MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMh
U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIz
MloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09N
IFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNlY3VyaXR5IENvbW11
bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSE
RMqm4miO/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gO
zXppFodEtZDkBp2uoQSXWHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5
bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4zZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDF
MxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4bepJz11sS6/vmsJWXMY1
VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK9U2vP9eC
OKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0G
CSqGSIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HW
tWS3irO4G8za+6xmiEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZ
q51ihPZRwSzJIxXYKLerJRO1RuGGAv8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDb
EJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnWmHyojf6GPgcWkuF75x3sM3Z+
Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEWT1MKZPlO9L9O
VL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490
-----END CERTIFICATE-----

# Issuer: CN=OISTE WISeKey Global Root GA CA O=WISeKey OU=Copyright (c) 2005/OISTE Foundation Endorsed
# Subject: CN=OISTE WISeKey Global Root GA CA O=WISeKey OU=Copyright (c) 2005/OISTE Foundation Endorsed
# Label: "OISTE WISeKey Global Root GA CA"
# Serial: 86718877871133159090080555911823548314
# MD5 Fingerprint: bc:6c:51:33:a7:e9:d3:66:63:54:15:72:1b:21:92:93
# SHA1 Fingerprint: 59:22:a1:e1:5a:ea:16:35:21:f8:98:39:6a:46:46:b0:44:1b:0f:a9
# SHA256 Fingerprint: 41:c9:23:86:6a:b4:ca:d6:b7:ad:57:80:81:58:2e:02:07:97:a6:cb:df:4f:ff:78:ce:83:96:b3:89:37:d7:f5
-----BEGIN CERTIFICATE-----
MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCB
ijELMAkGA1UEBhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHly
aWdodCAoYykgMjAwNTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQSBDQTAeFw0w
NTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYDVQQGEwJDSDEQMA4G
A1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIwIAYD
VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBX
SVNlS2V5IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAy0+zAJs9Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxR
VVuuk+g3/ytr6dTqvirdqFEr12bDYVxgAsj1znJ7O7jyTmUIms2kahnBAbtzptf2
w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbDd50kc3vkDIzh2TbhmYsF
mQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ/yxViJGg
4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t9
4B3RLoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQw
EAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOx
SPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vImMMkQyh2I+3QZH4VFvbBsUfk2
ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4+vg1YFkCExh8
vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZi
Fj4A4xylNoEYokxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ
/L7fCg0=
-----END CERTIFICATE-----

# Issuer: CN=Microsec e-Szigno Root CA O=Microsec Ltd. OU=e-Szigno CA
# Subject: CN=Microsec e-Szigno Root CA O=Microsec Ltd. OU=e-Szigno CA
# Label: "Microsec e-Szigno Root CA"
# Serial: 272122594155480254301341951808045322001
# MD5 Fingerprint: f0:96:b6:2f:c5:10:d5:67:8e:83:25:32:e8:5e:2e:e5
# SHA1 Fingerprint: 23:88:c9:d3:71:cc:9e:96:3d:ff:7d:3c:a7:ce:fc:d6:25:ec:19:0d
# SHA256 Fingerprint: 32:7a:3d:76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f:55:67:d0
-----BEGIN CERTIFICATE-----
MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAw
cjELMAkGA1UEBhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNy
b3NlYyBMdGQuMRQwEgYDVQQLEwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9z
ZWMgZS1Temlnbm8gUm9vdCBDQTAeFw0wNTA0MDYxMjI4NDRaFw0xNzA0MDYxMjI4
NDRaMHIxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEWMBQGA1UEChMN
TWljcm9zZWMgTHRkLjEUMBIGA1UECxMLZS1Temlnbm8gQ0ExIjAgBgNVBAMTGU1p
Y3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDtyADVgXvNOABHzNuEwSFpLHSQDCHZU4ftPkNEU6+r+ICbPHiN1I2u
uO/TEdyB5s87lozWbxXGd36hL+BfkrYn13aaHUM86tnsL+4582pnS4uCzyL4ZVX+
LMsvfUh6PXX5qqAnu3jCBspRwn5mS6/NoqdNAoI/gqyFxuEPkEeZlApxcpMqyabA
vjxWTHOSJ/FrtfX9/DAFYJLG65Z+AZHCabEeHXtTRbjcQR/Ji3HWVBTji1R4P770
Yjtb9aPs1ZJ04nQw7wHb4dSrmZsqa/i9phyGI0Jf7Enemotb9HI6QMVJPqW+jqpx
62z69Rrkav17fVVA71hu5tnVvCSrwe+3AgMBAAGjggQ3MIIEMzBnBggrBgEFBQcB
AQRbMFkwKAYIKwYBBQUHMAGGHGh0dHBzOi8vcmNhLmUtc3ppZ25vLmh1L29jc3Aw
LQYIKwYBBQUHMAKGIWh0dHA6Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNydDAP
BgNVHRMBAf8EBTADAQH/MIIBcwYDVR0gBIIBajCCAWYwggFiBgwrBgEEAYGoGAIB
AQEwggFQMCgGCCsGAQUFBwIBFhxodHRwOi8vd3d3LmUtc3ppZ25vLmh1L1NaU1ov
MIIBIgYIKwYBBQUHAgIwggEUHoIBEABBACAAdABhAG4A+gBzAO0AdAB2AOEAbgB5
ACAA6QByAHQAZQBsAG0AZQB6AOkAcwDpAGgAZQB6ACAA6QBzACAAZQBsAGYAbwBn
AGEAZADhAHMA4QBoAG8AegAgAGEAIABTAHoAbwBsAGcA4QBsAHQAYQB0APMAIABT
AHoAbwBsAGcA4QBsAHQAYQB0AOEAcwBpACAAUwB6AGEAYgDhAGwAeQB6AGEAdABh
ACAAcwB6AGUAcgBpAG4AdAAgAGsAZQBsAGwAIABlAGwAagDhAHIAbgBpADoAIABo
AHQAdABwADoALwAvAHcAdwB3AC4AZQAtAHMAegBpAGcAbgBvAC4AaAB1AC8AUwBa
AFMAWgAvMIHIBgNVHR8EgcAwgb0wgbqggbeggbSGIWh0dHA6Ly93d3cuZS1zemln
bm8uaHUvUm9vdENBLmNybIaBjmxkYXA6Ly9sZGFwLmUtc3ppZ25vLmh1L0NOPU1p
Y3Jvc2VjJTIwZS1Temlnbm8lMjBSb290JTIwQ0EsT1U9ZS1Temlnbm8lMjBDQSxP
PU1pY3Jvc2VjJTIwTHRkLixMPUJ1ZGFwZXN0LEM9SFU/Y2VydGlmaWNhdGVSZXZv
Y2F0aW9uTGlzdDtiaW5hcnkwDgYDVR0PAQH/BAQDAgEGMIGWBgNVHREEgY4wgYuB
EGluZm9AZS1zemlnbm8uaHWkdzB1MSMwIQYDVQQDDBpNaWNyb3NlYyBlLVN6aWdu
w7MgUm9vdCBDQTEWMBQGA1UECwwNZS1TemlnbsOzIEhTWjEWMBQGA1UEChMNTWlj
cm9zZWMgS2Z0LjERMA8GA1UEBxMIQnVkYXBlc3QxCzAJBgNVBAYTAkhVMIGsBgNV
HSMEgaQwgaGAFMegSXUWYYTbMUuE0vE3QJDvTtz3oXakdDByMQswCQYDVQQGEwJI
VTERMA8GA1UEBxMIQnVkYXBlc3QxFjAUBgNVBAoTDU1pY3Jvc2VjIEx0ZC4xFDAS
BgNVBAsTC2UtU3ppZ25vIENBMSIwIAYDVQQDExlNaWNyb3NlYyBlLVN6aWdubyBS
b290IENBghEAzLjnv04pGv2i3GalHCwPETAdBgNVHQ4EFgQUx6BJdRZhhNsxS4TS
8TdAkO9O3PcwDQYJKoZIhvcNAQEFBQADggEBANMTnGZjWS7KXHAM/IO8VbH0jgds
ZifOwTsgqRy7RlRw7lrMoHfqaEQn6/Ip3Xep1fvj1KcExJW4C+FEaGAHQzAxQmHl
7tnlJNUb3+FKG6qfx1/4ehHqE5MAyopYse7tDk2016g2JnzgOsHVV4Lxdbb9iV/a
86g4nzUGCM4ilb7N1fy+W955a9x6qWVmvrElWl/tftOsRm1M9DKHtCAE4Gx4sHfR
hUZLphK3dehKyVZs15KrnfVJONJPU+NVkBHbmJbGSfI+9J8b4PeI3CVimUTYc78/
MPMMNz7UwiiAc7EBt51alhQBS6kRnSlqLtBdgcDPsiBDxwPgN05dCtxZICU=
-----END CERTIFICATE-----

# Issuer: CN=Certigna O=Dhimyotis
# Subject: CN=Certigna O=Dhimyotis
# Label: "Certigna"
# Serial: 18364802974209362175
# MD5 Fingerprint: ab:57:a6:5b:7d:42:82:19:b5:d8:58:26:28:5e:fd:ff
# SHA1 Fingerprint: b1:2e:13:63:45:86:a4:6f:1a:b2:60:68:37:58:2d:c4:ac:fd:94:97
# SHA256 Fingerprint: e3:b6:a2:db:2e:d7:ce:48:84:2f:7a:c5:32:41:c7:b7:1d:54:14:4b:fb:40:c1:1f:3f:1d:0b:42:f5:ee:a1:2d
-----BEGIN CERTIFICATE-----
MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV
BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X
DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ
BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4
QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny
gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw
zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q
130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2
JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw
ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT
AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj
AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG
9w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h
bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc
fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu
HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w
t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
-----END CERTIFICATE-----

# Issuer: CN=AC Raíz Certicámara S.A. O=Sociedad Cameral de Certificación Digital - Certicámara S.A.
# Subject: CN=AC Raíz Certicámara S.A. O=Sociedad Cameral de Certificación Digital - Certicámara S.A.
# Label: "AC Ra\xC3\xADz Certic\xC3\xA1mara S.A."
# Serial: 38908203973182606954752843738508300
# MD5 Fingerprint: 93:2a:3e:f6:fd:23:69:0d:71:20:d4:2b:47:99:2b:a6
# SHA1 Fingerprint: cb:a1:c5:f8:b0:e3:5e:b8:b9:45:12:d3:f9:34:a2:e9:06:10:d3:36
# SHA256 Fingerprint: a6:c5:1e:0d:a5:ca:0a:93:09:d2:e4:c0:e4:0c:2a:f9:10:7a:ae:82:03:85:7f:e1:98:e3:e7:69:e3:43:08:5c
-----BEGIN CERTIFICATE-----
MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsx
CzAJBgNVBAYTAkNPMUcwRQYDVQQKDD5Tb2NpZWRhZCBDYW1lcmFsIGRlIENlcnRp
ZmljYWNpw7NuIERpZ2l0YWwgLSBDZXJ0aWPDoW1hcmEgUy5BLjEjMCEGA1UEAwwa
QUMgUmHDrXogQ2VydGljw6FtYXJhIFMuQS4wHhcNMDYxMTI3MjA0NjI5WhcNMzAw
NDAyMjE0MjAyWjB7MQswCQYDVQQGEwJDTzFHMEUGA1UECgw+U29jaWVkYWQgQ2Ft
ZXJhbCBkZSBDZXJ0aWZpY2FjacOzbiBEaWdpdGFsIC0gQ2VydGljw6FtYXJhIFMu
QS4xIzAhBgNVBAMMGkFDIFJhw616IENlcnRpY8OhbWFyYSBTLkEuMIICIjANBgkq
hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq2uJo1PMSCMI+8PPUZYILrgIem08kBeG
qentLhM0R7LQcNzJPNCNyu5LF6vQhbCnIwTLqKL85XXbQMpiiY9QngE9JlsYhBzL
fDe3fezTf3MZsGqy2IiKLUV0qPezuMDU2s0iiXRNWhU5cxh0T7XrmafBHoi0wpOQ
Y5fzp6cSsgkiBzPZkc0OnB8OIMfuuzONj8LSWKdf/WU34ojC2I+GdV75LaeHM/J4
Ny+LvB2GNzmxlPLYvEqcgxhaBvzz1NS6jBUJJfD5to0EfhcSM2tXSExP2yYe68yQ
54v5aHxwD6Mq0Do43zeX4lvegGHTgNiRg0JaTASJaBE8rF9ogEHMYELODVoqDA+b
MMCm8Ibbq0nXl21Ii/kDwFJnmxL3wvIumGVC2daa49AZMQyth9VXAnow6IYm+48j
ilSH5L887uvDdUhfHjlvgWJsxS3EF1QZtzeNnDeRyPYL1epjb4OsOMLzP96a++Ej
YfDIJss2yKHzMI+ko6Kh3VOz3vCaMh+DkXkwwakfU5tTohVTP92dsxA7SH2JD/zt
A/X7JWR1DhcZDY8AFmd5ekD8LVkH2ZD6mq093ICK5lw1omdMEWux+IBkAC1vImHF
rEsm5VoQgpukg3s0956JkSCXjrdCx2bD0Omk1vUgjcTDlaxECp1bczwmPS9KvqfJ
pxAe+59QafMCAwEAAaOB5jCB4zAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
AwIBBjAdBgNVHQ4EFgQU0QnQ6dfOeXRU+Tows/RtLAMDG2gwgaAGA1UdIASBmDCB
lTCBkgYEVR0gADCBiTArBggrBgEFBQcCARYfaHR0cDovL3d3dy5jZXJ0aWNhbWFy
YS5jb20vZHBjLzBaBggrBgEFBQcCAjBOGkxMaW1pdGFjaW9uZXMgZGUgZ2FyYW50
7WFzIGRlIGVzdGUgY2VydGlmaWNhZG8gc2UgcHVlZGVuIGVuY29udHJhciBlbiBs
YSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEfAygPU3zmpFmps4p6
xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuXEpBc
unvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/
Jre7Ir5v/zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dp
ezy4ydV/NgIlqmjCMRW3MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42
gzmRkBDI8ck1fj+404HGIGQatlDCIaR43NAvO2STdPCWkPHv+wlaNECW8DYSwaN0
jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wkeZBWN7PGKX6jD/EpOe9+
XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f/RWmnkJD
W2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/
RL5hRqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35r
MDOhYil/SrnhLecUIw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxk
BYn8eNZcLCZDqQ==
-----END CERTIFICATE-----

# Issuer: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
# Subject: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
# Label: "TC TrustCenter Class 2 CA II"
# Serial: 941389028203453866782103406992443
# MD5 Fingerprint: ce:78:33:5c:59:78:01:6e:18:ea:b9:36:a0:b9:2e:23
# SHA1 Fingerprint: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e
# SHA256 Fingerprint: e6:b8:f8:76:64:85:f8:07:ae:7f:8d:ac:16:70:46:1f:07:c0:a1:3e:ef:3a:1f:f7:17:53:8d:7a:ba:d3:91:b4
-----BEGIN CERTIFICATE-----
MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjEL
MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYwMTEyMTQzODQzWhcNMjUxMjMxMjI1
OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UEAxMc
VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jf
tMjWQ+nEdVl//OEd+DFwIxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKg
uNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2J
XjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQXa7pIXSSTYtZgo+U4+lK
8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7uSNQZu+99
5OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1Ud
EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3
kUrL84J6E1wIqzCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6
Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
JTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iS
GNn3Bzn1LL4GdXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprt
ZjluS5TmVfwLG4t3wVMTZonZKNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8
au0WOB9/WIFaGusyiC2y8zl3gK9etmF1KdsjTYjKUCjLhdLTEKJZbtOTVAB6okaV
hgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kPJOzHdiEoZa5X6AeI
dUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfkvQ==
-----END CERTIFICATE-----

# Issuer: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
# Subject: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
# Label: "TC TrustCenter Class 3 CA II"
# Serial: 1506523511417715638772220530020799
# MD5 Fingerprint: 56:5f:aa:80:61:12:17:f6:67:21:e6:2b:6d:61:56:8e
# SHA1 Fingerprint: 80:25:ef:f4:6e:70:c8:d4:72:24:65:84:fe:40:3b:8a:8d:6a:db:f5
# SHA256 Fingerprint: 8d:a0:84:fc:f9:9c:e0:77:22:f8:9b:32:05:93:98:06:fa:5c:b8:11:e1:c8:13:f6:a1:08:c7:d3:36:b3:40:8e
-----BEGIN CERTIFICATE-----
MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjEL
MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYwMTEyMTQ0MTU3WhcNMjUxMjMxMjI1
OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UEAxMc
VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBALTgu1G7OVyLBMVMeRwjhjEQY0NVJz/GRcekPewJDRoeIMJW
Ht4bNwcwIi9v8Qbxq63WyKthoy9DxLCyLfzDlml7forkzMA5EpBCYMnMNWju2l+Q
Vl/NHE1bWEnrDgFPZPosPIlY2C8u4rBo6SI7dYnWRBpl8huXJh0obazovVkdKyT2
1oQDZogkAHhg8fir/gKya/si+zXmFtGt9i4S5Po1auUZuV3bOx4a+9P/FRQI2Alq
ukWdFHlgfa9Aigdzs5OW03Q0jTo3Kd5c7PXuLjHCINy+8U9/I1LZW+Jk2ZyqBwi1
Rb3R0DHBq1SfqdLDYmAD8bs5SpJKPQq5ncWg/jcCAwEAAaOCATQwggEwMA8GA1Ud
EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTUovyfs8PYA9NX
XAek0CSnwPIA1DCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6
Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
JTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlN
irTzwppVMXzEO2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8
TtXqluJucsG7Kv5sbviRmEb8yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6
g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9IJqDnxrcOfHFcqMRA/07QlIp2+gB
95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal092Y+tTmBvTwtiBj
S+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc5A==
-----END CERTIFICATE-----

# Issuer: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
# Subject: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
# Label: "TC TrustCenter Universal CA I"
# Serial: 601024842042189035295619584734726
# MD5 Fingerprint: 45:e1:a5:72:c5:a9:36:64:40:9e:f5:e4:58:84:67:8c
# SHA1 Fingerprint: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3
# SHA256 Fingerprint: eb:f3:c0:2a:87:89:b1:fb:7d:51:19:95:d6:63:b7:29:06:d9:13:ce:0d:5e:10:56:8a:8a:77:e2:58:61:67:e7
-----BEGIN CERTIFICATE-----
MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTEL
MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1
c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcNMDYwMzIyMTU1NDI4WhcNMjUxMjMx
MjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIg
R21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYwJAYD
VQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSR
JJZ4Hgmgm5qVSkr1YnwCqMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3T
fCZdzHd55yx4Oagmcw6iXSVphU9VDprvxrlE4Vc93x9UIuVvZaozhDrzznq+VZeu
jRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtwag+1m7Z3W0hZneTvWq3z
wZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9OgdwZu5GQ
fezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYD
VR0jBBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAO
BgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0G
CSqGSIb3DQEBBQUAA4IBAQAo0uCG1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X1
7caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/CyvwbZ71q+s2IhtNerNXxTPqYn
8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3ghUJGooWMNjs
ydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT
ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/
2TYcuiUaUj0a7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY
-----END CERTIFICATE-----

# Issuer: CN=Deutsche Telekom Root CA 2 O=Deutsche Telekom AG OU=T-TeleSec Trust Center
# Subject: CN=Deutsche Telekom Root CA 2 O=Deutsche Telekom AG OU=T-TeleSec Trust Center
# Label: "Deutsche Telekom Root CA 2"
# Serial: 38
# MD5 Fingerprint: 74:01:4a:91:b1:08:c4:58:ce:47:cd:f0:dd:11:53:08
# SHA1 Fingerprint: 85:a4:08:c0:9c:19:3e:5d:51:58:7d:cd:d6:13:30:fd:8c:de:37:bf
# SHA256 Fingerprint: b6:19:1a:50:d0:c3:97:7f:7d:a9:9b:cd:aa:c8:6a:22:7d:ae:b9:67:9e:c7:0b:a3:b0:c9:d9:22:71:c1:70:d3
-----BEGIN CERTIFICATE-----
MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEc
MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2Vj
IFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENB
IDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5MjM1OTAwWjBxMQswCQYDVQQGEwJE
RTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxl
U2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290
IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEU
ha88EOQ5bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhC
QN/Po7qCWWqSG6wcmtoIKyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1Mjwr
rFDa1sPeg5TKqAyZMg4ISFZbavva4VhYAUlfckE8FQYBjl2tqriTtM2e66foai1S
NNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aKSe5TBY8ZTNXeWHmb0moc
QqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTVjlsB9WoH
txa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAP
BgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
AQEAlGRZrTlk5ynrE/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756Abrsp
tJh6sTtU6zkXR34ajgv8HzFZMQSyzhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpa
IzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8rZ7/gFnkm0W09juwzTkZmDLl
6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4Gdyd1Lx+4ivn+
xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
Cm26OWMohpLzGITY+9HPBVZkVw==
-----END CERTIFICATE-----

# Issuer: CN=ComSign Secured CA O=ComSign
# Subject: CN=ComSign Secured CA O=ComSign
# Label: "ComSign Secured CA"
# Serial: 264725503855295744117309814499492384489
# MD5 Fingerprint: 40:01:25:06:8d:21:43:6a:0e:43:00:9c:e7:43:f3:d5
# SHA1 Fingerprint: f9:cd:0e:2c:da:76:24:c1:8f:bd:f0:f0:ab:b6:45:b8:f7:fe:d5:7a
# SHA256 Fingerprint: 50:79:41:c7:44:60:a0:b4:70:86:22:0d:4e:99:32:57:2a:b5:d1:b5:bb:cb:89:80:ab:1c:b1:76:51:a8:44:d2
-----BEGIN CERTIFICATE-----
MIIDqzCCApOgAwIBAgIRAMcoRwmzuGxFjB36JPU2TukwDQYJKoZIhvcNAQEFBQAw
PDEbMBkGA1UEAxMSQ29tU2lnbiBTZWN1cmVkIENBMRAwDgYDVQQKEwdDb21TaWdu
MQswCQYDVQQGEwJJTDAeFw0wNDAzMjQxMTM3MjBaFw0yOTAzMTYxNTA0NTZaMDwx
GzAZBgNVBAMTEkNvbVNpZ24gU2VjdXJlZCBDQTEQMA4GA1UEChMHQ29tU2lnbjEL
MAkGA1UEBhMCSUwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGtWhf
HZQVw6QIVS3joFd67+l0Kru5fFdJGhFeTymHDEjWaueP1H5XJLkGieQcPOqs49oh
gHMhCu95mGwfCP+hUH3ymBvJVG8+pSjsIQQPRbsHPaHA+iqYHU4Gk/v1iDurX8sW
v+bznkqH7Rnqwp9D5PGBpX8QTz7RSmKtUxvLg/8HZaWSLWapW7ha9B20IZFKF3ue
Mv5WJDmyVIRD9YTC2LxBkMyd1mja6YJQqTtoz7VdApRgFrFD2UNd3V2Hbuq7s8lr
9gOUCXDeFhF6K+h2j0kQmHe5Y1yLM5d19guMsqtb3nQgJT/j8xH5h2iGNXHDHYwt
6+UarA9z1YJZQIDTAgMBAAGjgacwgaQwDAYDVR0TBAUwAwEB/zBEBgNVHR8EPTA7
MDmgN6A1hjNodHRwOi8vZmVkaXIuY29tc2lnbi5jby5pbC9jcmwvQ29tU2lnblNl
Y3VyZWRDQS5jcmwwDgYDVR0PAQH/BAQDAgGGMB8GA1UdIwQYMBaAFMFL7XC29z58
ADsAj8c+DkWfHl3sMB0GA1UdDgQWBBTBS+1wtvc+fAA7AI/HPg5Fnx5d7DANBgkq
hkiG9w0BAQUFAAOCAQEAFs/ukhNQq3sUnjO2QiBq1BW9Cav8cujvR3qQrFHBZE7p
iL1DRYHjZiM/EoZNGeQFsOY3wo3aBijJD4mkU6l1P7CW+6tMM1X5eCZGbxs2mPtC
dsGCuY7e+0X5YxtiOzkGynd6qDwJz2w2PQ8KRUtpFhpFfTMDZflScZAmlaxMDPWL
kz/MdXSFmLr/YnpNH4n+rr2UAJm/EaXc4HnFFgt9AmEd6oX5AhVP51qJThRv4zdL
hfXBPGHg/QVBspJ/wx2g0K5SZGBrGMYmnNj1ZOQ2GmKfig8+/21OGVZOIJFsnzQz
OjRXUDpvgV4GxvU+fE6OK85lBi5d0ipTdF7Tbieejw==
-----END CERTIFICATE-----

# Issuer: CN=Cybertrust Global Root O=Cybertrust, Inc
# Subject: CN=Cybertrust Global Root O=Cybertrust, Inc
# Label: "Cybertrust Global Root"
# Serial: 4835703278459682877484360
# MD5 Fingerprint: 72:e4:4a:87:e3:69:40:80:77:ea:bc:e3:f4:ff:f0:e1
# SHA1 Fingerprint: 5f:43:e5:b1:bf:f8:78:8c:ac:1c:c7:ca:4a:9a:c6:22:2b:cc:34:c6
# SHA256 Fingerprint: 96:0a:df:00:63:e9:63:56:75:0c:29:65:dd:0a:08:67:da:0b:9c:bd:6e:77:71:4a:ea:fb:23:49:ab:39:3d:a3
-----BEGIN CERTIFICATE-----
MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYG
A1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2Jh
bCBSb290MB4XDTA2MTIxNTA4MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UE
ChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBS
b290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Mi8vRRQZhP/8NN5
7CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW0ozS
J8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2y
HLtgwEZLAfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iP
t3sMpTjr3kfb1V05/Iin89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNz
FtApD0mpSPCzqrdsxacwOUBdrsTiXSZT8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAY
XSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2MDSgMqAw
hi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3Js
MB8GA1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUA
A4IBAQBW7wojoFROlZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMj
Wqd8BfP9IjsO0QbE2zZMcwSO5bAi5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUx
XOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2hO0j9n0Hq0V+09+zv+mKts2o
omcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+TX3EJIrduPuoc
A06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
WL1WMRJOEcgh4LMRkWXbtKaIOM5V
-----END CERTIFICATE-----

# Issuer: O=Chunghwa Telecom Co., Ltd. OU=ePKI Root Certification Authority
# Subject: O=Chunghwa Telecom Co., Ltd. OU=ePKI Root Certification Authority
# Label: "ePKI Root Certification Authority"
# Serial: 28956088682735189655030529057352760477
# MD5 Fingerprint: 1b:2e:00:ca:26:06:90:3d:ad:fe:6f:15:68:d3:6b:b3
# SHA1 Fingerprint: 67:65:0d:f1:7e:8e:7e:5b:82:40:a4:f4:56:4b:cf:e2:3d:69:c6:f0
# SHA256 Fingerprint: c0:a6:f4:dc:63:a2:4b:fd:cf:54:ef:2a:6a:08:2a:0a:72:de:35:80:3e:2f:f5:ff:52:7a:e5:d8:72:06:df:d5
-----BEGIN CERTIFICATE-----
MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBe
MQswCQYDVQQGEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0
ZC4xKjAoBgNVBAsMIWVQS0kgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
Fw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMxMjdaMF4xCzAJBgNVBAYTAlRXMSMw
IQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEqMCgGA1UECwwhZVBL
SSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEF
AAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAH
SyZbCUNsIZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAh
ijHyl3SJCRImHJ7K2RKilTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3X
DZoTM1PRYfl61dd4s5oz9wCGzh1NlDivqOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1
TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX12ruOzjjK9SXDrkb5wdJ
fzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0OWQqraffA
sgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uU
WH1+ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLS
nT0IFaUQAS2zMnaolQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pH
dmX2Os+PYhcZewoozRrSgx4hxyy/vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJip
NiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXiZo1jDiVN1Rmy5nk3pyKdVDEC
AwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/QkqiMAwGA1UdEwQF
MAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH
ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGB
uvl2ICO1J2B01GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6Yl
PwZpVnPDimZI+ymBV3QGypzqKOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkP
JXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdVxrsStZf0X4OFunHB2WyBEXYKCrC/
gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEPNXubrjlpC2JgQCA2
j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+rGNm6
5ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUB
o2M3IUxExJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS
/jQ6fbjpKdx2qcgw+BRxgMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2z
Gp1iro2C6pSe3VkQw63d4k3jMdXH7OjysP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTE
W9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmODBCEIZ43ygknQW/2xzQ+D
hNQ+IIX3Sj0rnP0qCglN6oH4EZw=
-----END CERTIFICATE-----

# Issuer: CN=TÜBİTAK UEKAE Kök Sertifika Hizmet Sağlayıcısı - Sürüm 3 O=Türkiye Bilimsel ve Teknolojik Araştırma Kurumu - TÜBİTAK OU=Ulusal Elektronik ve Kriptoloji Araştırma Enstitüsü - UEKAE/Kamu Sertifikasyon Merkezi
# Subject: CN=TÜBİTAK UEKAE Kök Sertifika Hizmet Sağlayıcısı - Sürüm 3 O=Türkiye Bilimsel ve Teknolojik Araştırma Kurumu - TÜBİTAK OU=Ulusal Elektronik ve Kriptoloji Araştırma Enstitüsü - UEKAE/Kamu Sertifikasyon Merkezi
# Label: "T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3"
# Serial: 17
# MD5 Fingerprint: ed:41:f5:8c:50:c5:2b:9c:73:e6:ee:6c:eb:c2:a8:26
# SHA1 Fingerprint: 1b:4b:39:61:26:27:6b:64:91:a2:68:6d:d7:02:43:21:2d:1f:1d:96
# SHA256 Fingerprint: e4:c7:34:30:d7:a5:b5:09:25:df:43:37:0a:0d:21:6e:9a:79:b9:d6:db:83:73:a0:c6:9e:b1:cc:31:c7:c5:2a
-----BEGIN CERTIFICATE-----
MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRS
MRgwFgYDVQQHDA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJp
bGltc2VsIHZlIFRla25vbG9qaWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSw
VEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ryb25payB2ZSBLcmlwdG9sb2ppIEFy
YcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNVBAsMGkthbXUgU2Vy
dGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUgS8O2
ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAe
Fw0wNzA4MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIx
GDAWBgNVBAcMD0dlYnplIC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmls
aW1zZWwgdmUgVGVrbm9sb2ppayBBcmHFn3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBU
QUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZlIEtyaXB0b2xvamkgQXJh
xZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2FtdSBTZXJ0
aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7Zr
IFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4h
gb46ezzb8R1Sf1n68yJMlaCQvEhOEav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yK
O7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1xnnRFDDtG1hba+818qEhTsXO
fJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR6Oqeyjh1jmKw
lZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL
hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQID
AQABo0IwQDAdBgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/
BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmP
NOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4N5EY3ATIZJkrGG2AA1nJrvhY0D7t
wyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLTy9LQQfMmNkqblWwM
7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYhLBOh
gLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5n
oN+J1q2MdqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUs
yZyQ2uypQjyttgI=
-----END CERTIFICATE-----

# Issuer: CN=Buypass Class 2 CA 1 O=Buypass AS-983163327
# Subject: CN=Buypass Class 2 CA 1 O=Buypass AS-983163327
# Label: "Buypass Class 2 CA 1"
# Serial: 1
# MD5 Fingerprint: b8:08:9a:f0:03:cc:1b:0d:c8:6c:0b:76:a1:75:64:23
# SHA1 Fingerprint: a0:a1:ab:90:c9:fc:84:7b:3b:12:61:e8:97:7d:5f:d3:22:61:d3:cc
# SHA256 Fingerprint: 0f:4e:9c:dd:26:4b:02:55:50:d1:70:80:63:40:21:4f:e9:44:34:c9:b0:2f:69:7e:c7:10:fc:5f:ea:fb:5e:38
-----BEGIN CERTIFICATE-----
MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEd
MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3Mg
Q2xhc3MgMiBDQSAxMB4XDTA2MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzEL
MAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MR0wGwYD
VQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7McXA0
ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLX
l18xoS830r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVB
HfCuuCkslFJgNJQ72uA40Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B
5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/RuFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3
WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0PAQH/BAQD
AgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLP
gcIV1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+
DKhQ7SLHrQVMdvvt7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKu
BctN518fV4bVIJwo+28TOPX2EZL2fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHs
h7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5wwDX3OaJdZtB7WZ+oRxKaJyOk
LY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho
-----END CERTIFICATE-----

# Issuer: CN=Buypass Class 3 CA 1 O=Buypass AS-983163327
# Subject: CN=Buypass Class 3 CA 1 O=Buypass AS-983163327
# Label: "Buypass Class 3 CA 1"
# Serial: 2
# MD5 Fingerprint: df:3c:73:59:81:e7:39:50:81:04:4c:34:a2:cb:b3:7b
# SHA1 Fingerprint: 61:57:3a:11:df:0e:d8:7e:d5:92:65:22:ea:d0:56:d7:44:b3:23:71
# SHA256 Fingerprint: b7:b1:2b:17:1f:82:1d:aa:99:0c:d0:fe:50:87:b1:28:44:8b:a8:e5:18:4f:84:c5:1e:02:b5:c8:fb:96:2b:24
-----BEGIN CERTIFICATE-----
MIIDUzCCAjugAwIBAgIBAjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEd
MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3Mg
Q2xhc3MgMyBDQSAxMB4XDTA1MDUwOTE0MTMwM1oXDTE1MDUwOTE0MTMwM1owSzEL
MAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MR0wGwYD
VQQDDBRCdXlwYXNzIENsYXNzIDMgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAKSO13TZKWTeXx+HgJHqTjnmGcZEC4DVC69TB4sSveZn8AKxifZg
isRbsELRwCGoy+Gb72RRtqfPFfV0gGgEkKBYouZ0plNTVUhjP5JW3SROjvi6K//z
NIqeKNc0n6wv1g/xpC+9UrJJhW05NfBEMJNGJPO251P7vGGvqaMU+8IXF4Rs4HyI
+MkcVyzwPX6UvCWThOiaAJpFBUJXgPROztmuOfbIUxAMZTpHe2DC1vqRycZxbL2R
hzyRhkmr8w+gbCZ2Xhysm3HljbybIR6c1jh+JIAVMYKWsUnTYjdbiAwKYjT+p0h+
mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0PAQH/BAQD
AgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFP
Bdy7pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27s
EzNxZy5p+qksP2bAEllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2
mSlf56oBzKwzqBwKu5HEA6BvtjT5htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yC
e/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQjel/wroQk5PMr+4okoyeYZdow
dXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915
-----END CERTIFICATE-----

# Issuer: CN=EBG Elektronik Sertifika Hizmet Sağlayıcısı O=EBG Bilişim Teknolojileri ve Hizmetleri A.Ş.
# Subject: CN=EBG Elektronik Sertifika Hizmet Sağlayıcısı O=EBG Bilişim Teknolojileri ve Hizmetleri A.Ş.
# Label: "EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1"
# Serial: 5525761995591021570
# MD5 Fingerprint: 2c:20:26:9d:cb:1a:4a:00:85:b5:b7:5a:ae:c2:01:37
# SHA1 Fingerprint: 8c:96:ba:eb:dd:2b:07:07:48:ee:30:32:66:a0:f3:98:6e:7c:ae:58
# SHA256 Fingerprint: 35:ae:5b:dd:d8:f7:ae:63:5c:ff:ba:56:82:a8:f0:0b:95:f4:84:62:c7:10:8e:e9:a0:e5:29:2b:07:4a:af:b2
-----BEGIN CERTIFICATE-----
MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNV
BAMML0VCRyBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
c8SxMTcwNQYDVQQKDC5FQkcgQmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXpt
ZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAeFw0wNjA4MTcwMDIxMDlaFw0xNjA4
MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25payBTZXJ0aWZpa2Eg
SGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2ltIFRl
a25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIi
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h
4fuXd7hxlugTlkaDT7byX3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAk
tiHq6yOU/im/+4mRDGSaBUorzAzu8T2bgmmkTPiab+ci2hC6X5L8GCcKqKpE+i4s
tPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfreYteIAbTdgtsApWjluTL
dlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZTqNGFav4
c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8Um
TDGyY5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z
+kI2sSXFCjEmN1ZnuqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0O
Lna9XvNRiYuoP1Vzv9s6xiQFlpJIqkuNKgPlV5EQ9GooFW5Hd4RcUXSfGenmHmMW
OeMRFeNYGkS9y8RsZteEBt8w9DeiQyJ50hBs37vmExH8nYQKE3vwO9D8owrXieqW
fo1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0Nokb+Clsi7n2
l9GkLqq+CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
/wQEAwIBBjAdBgNVHQ4EFgQU587GT/wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgw
FoAU587GT/wWZ5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2+
8ygjdsZs93/mQJ7ANtyVDR2tFcU22NU57/IeIl6zgrRdu0waypIN30ckHrMk2pGI
6YNw3ZPX6bqz3xZaPt7gyPvT/Wwp+BVGoGgmzJNSroIBk5DKd8pNSe/iWtkqvTDO
TLKBtjDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64kXPBfrAowzIpAoHME
wfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqTbCmY
Iai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJn
xk1Gj7sURT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4Q
DgZxGhBM/nV+/x5XOULK1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9q
Kd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11t
hie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQY9iJSrSq3RZj9W6+YKH4
7ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9AahH3eU7
QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT
-----END CERTIFICATE-----

# Issuer: O=certSIGN OU=certSIGN ROOT CA
# Subject: O=certSIGN OU=certSIGN ROOT CA
# Label: "certSIGN ROOT CA"
# Serial: 35210227249154
# MD5 Fingerprint: 18:98:c0:d6:e9:3a:fc:f9:b0:f5:0c:f7:4b:01:44:17
# SHA1 Fingerprint: fa:b7:ee:36:97:26:62:fb:2d:b0:2a:f6:bf:03:fd:e8:7c:4b:2f:9b
# SHA256 Fingerprint: ea:a9:62:c4:fa:4a:6b:af:eb:e4:15:19:6d:35:1c:cd:88:8d:4f:53:f3:fa:8a:e6:d7:c4:66:a9:4e:60:42:bb
-----BEGIN CERTIFICATE-----
MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYT
AlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBD
QTAeFw0wNjA3MDQxNzIwMDRaFw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJP
MREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7IJUqOtdu0KBuqV5Do
0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHHrfAQ
UySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5d
RdY4zTW2ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQ
OA7+j0xbm0bqQfWwCHTD0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwv
JoIQ4uNllAoEwF73XVv4EOLQunpL+943AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08C
AwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAcYwHQYDVR0O
BBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IBAQA+0hyJ
LjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecY
MnQ8SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ
44gx+FkagQnIl6Z0x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6I
Jd1hJyMctTEHBDa0GpC9oHRxUIltvBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNw
i/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7NzTogVZ96edhBiIL5VaZVDADlN
9u6wWk5JRFRYX0KD
-----END CERTIFICATE-----

# Issuer: CN=CNNIC ROOT O=CNNIC
# Subject: CN=CNNIC ROOT O=CNNIC
# Label: "CNNIC ROOT"
# Serial: 1228079105
# MD5 Fingerprint: 21:bc:82:ab:49:c4:13:3b:4b:b2:2b:5c:6b:90:9c:19
# SHA1 Fingerprint: 8b:af:4c:9b:1d:f0:2a:92:f7:da:12:8e:b9:1b:ac:f4:98:60:4b:6f
# SHA256 Fingerprint: e2:83:93:77:3d:a8:45:a6:79:f2:08:0c:c7:fb:44:a3:b7:a1:c3:79:2c:b7:eb:77:29:fd:cb:6a:8d:99:ae:a7
-----BEGIN CERTIFICATE-----
MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJD
TjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2
MDcwOTE0WhcNMjcwNDE2MDcwOTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMF
Q05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzDo+/hn7E7SIX1mlwh
IhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tizVHa6
dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZO
V/kbZKKTVrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrC
GHn2emU1z5DrvTOTn1OrczvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gN
v7Sg2Ca+I19zN38m5pIEo3/PIKe38zrKy5nLAgMBAAGjczBxMBEGCWCGSAGG+EIB
AQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscCwQ7vptU7ETAPBgNVHRMB
Af8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991SlgrHAsEO
76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnK
OOK5Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvH
ugDnuL8BV8F3RTIMO/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7Hgvi
yJA/qIYM/PmLXoXLT1tLYhFHxUV8BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fL
buXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2G8kS1sHNzYDzAgE8yGnLRUhj
2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5mmxE=
-----END CERTIFICATE-----

# Issuer: O=Japanese Government OU=ApplicationCA
# Subject: O=Japanese Government OU=ApplicationCA
# Label: "ApplicationCA - Japanese Government"
# Serial: 49
# MD5 Fingerprint: 7e:23:4e:5b:a7:a5:b4:25:e9:00:07:74:11:62:ae:d6
# SHA1 Fingerprint: 7f:8a:b0:cf:d0:51:87:6a:66:f3:36:0f:47:c8:8d:8c:d3:35:fc:74
# SHA256 Fingerprint: 2d:47:43:7d:e1:79:51:21:5a:12:f3:c5:8e:51:c7:29:a5:80:26:ef:1f:cc:0a:5f:b3:d9:dc:01:2f:60:0d:19
-----BEGIN CERTIFICATE-----
MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEc
MBoGA1UEChMTSmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRp
b25DQTAeFw0wNzEyMTIxNTAwMDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYT
AkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zlcm5tZW50MRYwFAYDVQQLEw1BcHBs
aWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp23gdE6H
j6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4fl+K
f5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55
IrmTwcrNwVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cw
FO5cjFW6WY2H/CPek9AEjP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDiht
QWEjdnjDuGWk81quzMKq2edY3rZ+nYVunyoKb58DKTCXKB28t89UKU5RMfkntigm
/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRUWssmP3HMlEYNllPqa0jQ
k/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNVBAYTAkpQ
MRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOC
seODvOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
ggEBADlqRHZ3ODrso2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJ
hyzjVOGjprIIC8CFqMjSnHH2HZ9g/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+
eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYDio+nEhEMy/0/ecGc/WLuo89U
DNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmWdupwX3kSa+Sj
B1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
rosot4LKGAfmt1t06SAZf7IbiVQ=
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
# Subject: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
# Label: "GeoTrust Primary Certification Authority - G3"
# Serial: 28809105769928564313984085209975885599
# MD5 Fingerprint: b5:e8:34:36:c9:10:44:58:48:70:6d:2e:83:d4:b8:05
# SHA1 Fingerprint: 03:9e:ed:b8:0b:e7:a0:3c:69:53:89:3b:20:d2:d9:32:3a:4c:2a:fd
# SHA256 Fingerprint: b4:78:b8:12:25:0d:f8:78:63:5c:2a:a7:ec:7d:15:5e:aa:62:5e:e8:29:16:e2:cd:29:43:61:88:6c:d1:fb:d4
-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT
MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhv
cml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIzNTk1OVowgZgxCzAJ
BgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
MjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0
BgNVBAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz
+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5jK/BGvESyiaHAKAxJcCGVn2TAppMSAmUm
hsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdEc5IiaacDiGydY8hS2pgn
5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3CIShwiP/W
JmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exAL
DmKudlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZC
huOl1UcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw
HQYDVR0OBBYEFMR5yo6hTgMdHNxr2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IB
AQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9cr5HqQ6XErhK8WTTOd8lNNTB
zU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbEAp7aDHdlDkQN
kv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH
SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G
spki4cErx5z481+oghLrGREt
-----END CERTIFICATE-----

# Issuer: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
# Subject: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
# Label: "thawte Primary Root CA - G2"
# Serial: 71758320672825410020661621085256472406
# MD5 Fingerprint: 74:9d:ea:60:24:c4:fd:22:53:3e:cc:3a:72:d9:29:4f
# SHA1 Fingerprint: aa:db:bc:22:23:8f:c4:01:a1:27:bb:38:dd:f4:1d:db:08:9e:f0:12
# SHA256 Fingerprint: a4:31:0d:50:af:18:a6:44:71:90:37:2a:86:af:af:8b:95:1f:fb:43:1d:83:7f:1e:56:88:b4:59:71:ed:15:57
-----BEGIN CERTIFICATE-----
MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL
MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp
IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi
BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw
MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig
YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v
dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/
BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6
papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E
BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K
DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3
KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox
XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
-----END CERTIFICATE-----

# Issuer: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
# Subject: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
# Label: "thawte Primary Root CA - G3"
# Serial: 127614157056681299805556476275995414779
# MD5 Fingerprint: fb:1b:5d:43:8a:94:cd:44:c6:76:f2:43:4b:47:e7:31
# SHA1 Fingerprint: f1:8b:53:8d:1b:e9:03:b6:a6:f0:56:43:5b:17:15:89:ca:f3:6b:f2
# SHA256 Fingerprint: 4b:03:f4:58:07:ad:70:f2:1b:fc:2c:ae:71:c9:fd:e4:60:4c:06:4c:f5:ff:b6:86:ba:e5:db:aa:d7:fd:d3:4c
-----BEGIN CERTIFICATE-----
MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCB
rjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
MDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNV
BAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0wODA0MDIwMDAwMDBa
Fw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3Rl
LCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u
MTgwNgYDVQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXpl
ZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEcz
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr8nLPvb2FvdeHsbnndm
gcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2AtP0LMqmsywCPLLEHd5N/8
YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC+BsUa0Lf
b1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS9
9irY7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2S
zhkGcuYMXDhpxwTWvGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUk
OQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV
HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA
2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW
oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c
KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM
m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu
MdRAGmI0Nj81Aa6sY6A=
-----END CERTIFICATE-----

# Issuer: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
# Subject: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
# Label: "GeoTrust Primary Certification Authority - G2"
# Serial: 80682863203381065782177908751794619243
# MD5 Fingerprint: 01:5e:d8:6b:bd:6f:3d:8e:a1:31:f8:12:e0:98:73:6a
# SHA1 Fingerprint: 8d:17:84:d5:37:f3:03:7d:ec:70:fe:57:8b:51:9a:99:e6:10:d7:b0
# SHA256 Fingerprint: 5e:db:7a:c4:3b:82:a0:6a:87:61:e8:d7:be:49:79:eb:f2:61:1f:7d:d7:9b:f9:1c:1c:6b:56:6a:21:9e:d7:66
-----BEGIN CERTIFICATE-----
MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDEL
MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChj
KSAyMDA3IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2
MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1OVowgZgxCzAJBgNV
BAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykgMjAw
NyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNV
BAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
MjB2MBAGByqGSM49AgEGBSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcL
So17VDs6bl8VAsBQps8lL33KSLjHUGMcKiEIfJo22Av+0SbFWDEwKCXzXV2juLal
tJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+EVXVMAoG
CCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGT
qQ7mndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBucz
rD6ogRLQy7rQkgu2npaqBA+K
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
# Label: "VeriSign Universal Root Certification Authority"
# Serial: 85209574734084581917763752644031726877
# MD5 Fingerprint: 8e:ad:b5:01:aa:4d:81:e4:8c:1d:d1:e1:14:00:95:19
# SHA1 Fingerprint: 36:79:ca:35:66:87:72:30:4d:30:a5:fb:87:3b:0f:a7:7b:b7:0d:54
# SHA256 Fingerprint: 23:99:56:11:27:a5:71:25:de:8c:ef:ea:61:0d:df:2f:a0:78:b5:c8:06:7f:4e:82:82:90:bf:b8:60:e8:4b:3c
-----BEGIN CERTIFICATE-----
MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCB
vTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJp
U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYDVQQDEy9W
ZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
Fw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJVUzEX
MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0
IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9y
IGF1dGhvcml6ZWQgdXNlIG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNh
bCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj1mCOkdeQmIN65lgZOIzF
9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGPMiJhgsWH
H26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+H
LL729fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN
/BMReYTtXlT2NJ8IAfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPT
rJ9VAMf2CGqUuV/c4DPxhGD5WycRtPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1Ud
EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0GCCsGAQUFBwEMBGEwX6FdoFsw
WTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2Oa8PPgGrUSBgs
exkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4
sAPmLGd75JR3Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+
seQxIcaBlVZaDrHC1LGmWazxY8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz
4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTxP/jgdFcrGJ2BtMQo2pSXpXDrrB2+
BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+PwGZsY6rp2aQW9IHR
lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3
7M2CYfE45k+XmCpajQ==
-----END CERTIFICATE-----

# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
# Label: "VeriSign Class 3 Public Primary Certification Authority - G4"
# Serial: 63143484348153506665311985501458640051
# MD5 Fingerprint: 3a:52:e1:e7:fd:6f:3a:e3:6f:f3:6f:99:1b:f9:22:41
# SHA1 Fingerprint: 22:d5:d8:df:8f:02:31:d1:8d:f7:9d:b7:cf:8a:2d:64:c9:3f:6c:3a
# SHA256 Fingerprint: 69:dd:d7:ea:90:bb:57:c9:3e:13:5d:c8:5e:a6:fc:d5:48:0b:60:32:39:bd:c4:54:fc:75:8b:2a:26:cf:7f:79
-----BEGIN CERTIFICATE-----
MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjEL
MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2ln
biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
aXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjELMAkG
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
U2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwg
SW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2ln
biBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8Utpkmw4tXNherJI9/gHm
GUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGzrl0Bp3ve
fLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUw
AwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJ
aW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYj
aHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMW
kf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMDA2gAMGUCMGYhDBgmYFo4e1ZC
4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIxAJw9SDkjOVga
FRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
-----END CERTIFICATE-----

# Issuer: CN=NetLock Arany (Class Gold) Főtanúsítvány O=NetLock Kft. OU=Tanúsítványkiadók (Certification Services)
# Subject: CN=NetLock Arany (Class Gold) Főtanúsítvány O=NetLock Kft. OU=Tanúsítványkiadók (Certification Services)
# Label: "NetLock Arany (Class Gold) Főtanúsítvány"
# Serial: 80544274841616
# MD5 Fingerprint: c5:a1:b7:ff:73:dd:d6:d7:34:32:18:df:fc:3c:ad:88
# SHA1 Fingerprint: 06:08:3f:59:3f:15:a1:04:a0:69:a4:6b:a9:03:d0:06:b7:97:09:91
# SHA256 Fingerprint: 6c:61:da:c3:a2:de:f0:31:50:6b:e0:36:d2:a6:fe:40:19:94:fb:d1:3d:f9:c8:d4:66:59:92:74:c4:46:ec:98
-----BEGIN CERTIFICATE-----
MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQG
EwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3
MDUGA1UECwwuVGFuw7pzw610dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNl
cnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBBcmFueSAoQ2xhc3MgR29sZCkgRsWR
dGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgxMjA2MTUwODIxWjCB
pzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxOZXRM
b2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlm
aWNhdGlvbiBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNz
IEdvbGQpIEbFkXRhbsO6c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAxCRec75LbRTDofTjl5Bu0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrT
lF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw/HpYzY6b7cNGbIRwXdrz
AZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAkH3B5r9s5
VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRG
ILdwfzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2
BJtr+UBdADTHLpl1neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAG
AQH/AgEEMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2M
U9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwWqZw8UQCgwBEIBaeZ5m8BiFRh
bvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTtaYtOUZcTh5m2C
+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2F
uLjbvrW5KfnaNwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2
XjG4Kvte9nHfRCaexOYNkbQudZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
-----END CERTIFICATE-----

# Issuer: CN=Staat der Nederlanden Root CA - G2 O=Staat der Nederlanden
# Subject: CN=Staat der Nederlanden Root CA - G2 O=Staat der Nederlanden
# Label: "Staat der Nederlanden Root CA - G2"
# Serial: 10000012
# MD5 Fingerprint: 7c:a5:0f:f8:5b:9a:7d:6d:30:ae:54:5a:e3:42:a2:8a
# SHA1 Fingerprint: 59:af:82:79:91:86:c7:b4:75:07:cb:cf:03:57:46:eb:04:dd:b7:16
# SHA256 Fingerprint: 66:8c:83:94:7d:a6:3b:72:4b:ec:e1:74:3c:31:a0:e6:ae:d0:db:8e:c5:b3:1b:e3:77:bb:78:4f:91:b6:71:6f
-----BEGIN CERTIFICATE-----
MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJO
TDEeMBwGA1UECgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFh
dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oX
DTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMCTkwxHjAcBgNVBAoMFVN0YWF0IGRl
ciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5lZGVybGFuZGVuIFJv
b3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ5291
qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8Sp
uOUfiUtnvWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPU
Z5uW6M7XxgpT0GtJlvOjCwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvE
pMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiile7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp
5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCROME4HYYEhLoaJXhena/M
UGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpICT0ugpTN
GmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy
5V6548r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv
6q012iDTiIJh8BIitrzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEK
eN5KzlW/HdXZt1bv8Hb/C3m1r737qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6
B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMBAAGjgZcwgZQwDwYDVR0TAQH/
BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcCARYxaHR0cDov
L3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqG
SIb3DQEBCwUAA4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLyS
CZa59sCrI2AGeYwRTlHSeYAz+51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen
5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwjf/ST7ZwaUb7dRUG/kSS0H4zpX897
IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaNkqbG9AclVMwWVxJK
gnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfkCpYL
+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxL
vJxxcypFURmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkm
bEgeqmiSBeGCc1qb3AdbCG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvk
N1trSt8sV4pAWja63XVECDdCcAz+3F4hoKOKwJCcaNpQ5kUQR3i2TtJlycM33+FC
Y7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoVIPVVYpbtbZNQvOSqeK3Z
ywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm66+KAQ==
-----END CERTIFICATE-----

# Issuer: CN=CA Disig O=Disig a.s.
# Subject: CN=CA Disig O=Disig a.s.
# Label: "CA Disig"
# Serial: 1
# MD5 Fingerprint: 3f:45:96:39:e2:50:87:f7:bb:fe:98:0c:3c:20:98:e6
# SHA1 Fingerprint: 2a:c8:d5:8b:57:ce:bf:2f:49:af:f2:fc:76:8f:51:14:62:90:7a:41
# SHA256 Fingerprint: 92:bf:51:19:ab:ec:ca:d0:b1:33:2d:c4:e1:d0:5f:ba:75:b5:67:90:44:ee:0c:a2:6e:93:1f:74:4f:2f:33:cf
-----BEGIN CERTIFICATE-----
MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzET
MBEGA1UEBxMKQnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UE
AxMIQ0EgRGlzaWcwHhcNMDYwMzIyMDEzOTM0WhcNMTYwMzIyMDEzOTM0WjBKMQsw
CQYDVQQGEwJTSzETMBEGA1UEBxMKQnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcg
YS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQCS9jHBfYj9mQGp2HvycXXxMcbzdWb6UShGhJd4NLxs/LxFWYgmGErE
Nx+hSkS943EE9UQX4j/8SFhvXJ56CbpRNyIjZkMhsDxkovhqFQ4/61HhVKndBpnX
mjxUizkDPw/Fzsbrg3ICqB9x8y34dQjbYkzo+s7552oftms1grrijxaSfQUMbEYD
XcDtab86wYqg6I7ZuUUohwjstMoVvoLdtUSLLa2GDGhibYVW8qwUYzrG0ZmsNHhW
S8+2rT+MitcE5eN4TPWGqvWP+j1scaMtymfraHtuM6kMgiioTGohQBUgDCZbg8Kp
FhXAJIJdKxatymP2dACw30PEEGBWZ2NFAgMBAAGjgf8wgfwwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUjbJJaJ1yCCW5wCf1UJNWSEZx+Y8wDgYDVR0PAQH/BAQD
AgEGMDYGA1UdEQQvMC2BE2Nhb3BlcmF0b3JAZGlzaWcuc2uGFmh0dHA6Ly93d3cu
ZGlzaWcuc2svY2EwZgYDVR0fBF8wXTAtoCugKYYnaHR0cDovL3d3dy5kaXNpZy5z
ay9jYS9jcmwvY2FfZGlzaWcuY3JsMCygKqAohiZodHRwOi8vY2EuZGlzaWcuc2sv
Y2EvY3JsL2NhX2Rpc2lnLmNybDAaBgNVHSAEEzARMA8GDSuBHpGT5goAAAABAQEw
DQYJKoZIhvcNAQEFBQADggEBAF00dGFMrzvY/59tWDYcPQuBDRIrRhCA/ec8J9B6
yKm2fnQwM6M6int0wHl5QpNt/7EpFIKrIYwvF/k/Ji/1WcbvgAa3mkkp7M5+cTxq
EEHA9tOasnxakZzArFvITV734VP/Q3f8nktnbNfzg9Gg4H8l37iYC5oyOGwwoPP/
CBUz91BKez6jPiCp3C9WgArtQVCwyfTssuMmRAAOb54GvCKWU3BlxFAKRmukLyeB
EicTXxChds6KezfqwzlhA5WYOudsiCUI/HloDYd9Yvi0X/vF2Ey9WLw/Q1vUHgFN
PGO+I++MzVpQuGhU+QqZMxEA4Z7CRneC9VkGjCFMhwnN5ag=
-----END CERTIFICATE-----

# Issuer: CN=Juur-SK O=AS Sertifitseerimiskeskus
# Subject: CN=Juur-SK O=AS Sertifitseerimiskeskus
# Label: "Juur-SK"
# Serial: 999181308
# MD5 Fingerprint: aa:8e:5d:d9:f8:db:0a:58:b7:8d:26:87:6c:82:35:55
# SHA1 Fingerprint: 40:9d:4b:d9:17:b5:5c:27:b6:9b:64:cb:98:22:44:0d:cd:09:b8:89
# SHA256 Fingerprint: ec:c3:e9:c3:40:75:03:be:e0:91:aa:95:2f:41:34:8f:f8:8b:aa:86:3b:22:64:be:fa:c8:07:90:15:74:e9:39
-----BEGIN CERTIFICATE-----
MIIE5jCCA86gAwIBAgIEO45L/DANBgkqhkiG9w0BAQUFADBdMRgwFgYJKoZIhvcN
AQkBFglwa2lAc2suZWUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKExlBUyBTZXJ0aWZp
dHNlZXJpbWlza2Vza3VzMRAwDgYDVQQDEwdKdXVyLVNLMB4XDTAxMDgzMDE0MjMw
MVoXDTE2MDgyNjE0MjMwMVowXTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMQsw
CQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEQ
MA4GA1UEAxMHSnV1ci1TSzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AIFxNj4zB9bjMI0TfncyRsvPGbJgMUaXhvSYRqTCZUXP00B841oiqBB4M8yIsdOB
SvZiF3tfTQou0M+LI+5PAk676w7KvRhj6IAcjeEcjT3g/1tf6mTll+g/mX8MCgkz
ABpTpyHhOEvWgxutr2TC+Rx6jGZITWYfGAriPrsfB2WThbkasLnE+w0R9vXW+RvH
LCu3GFH+4Hv2qEivbDtPL+/40UceJlfwUR0zlv/vWT3aTdEVNMfqPxZIe5EcgEMP
PbgFPtGzlc3Yyg/CQ2fbt5PgIoIuvvVoKIO5wTtpeyDaTpxt4brNj3pssAki14sL
2xzVWiZbDcDq5WDQn/413z8CAwEAAaOCAawwggGoMA8GA1UdEwEB/wQFMAMBAf8w
ggEWBgNVHSAEggENMIIBCTCCAQUGCisGAQQBzh8BAQEwgfYwgdAGCCsGAQUFBwIC
MIHDHoHAAFMAZQBlACAAcwBlAHIAdABpAGYAaQBrAGEAYQB0ACAAbwBuACAAdgDk
AGwAagBhAHMAdABhAHQAdQBkACAAQQBTAC0AaQBzACAAUwBlAHIAdABpAGYAaQB0
AHMAZQBlAHIAaQBtAGkAcwBrAGUAcwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABz
AGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABrAGkAbgBuAGkAdABhAG0AaQBz
AGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nwcy8wKwYDVR0f
BCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE
FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcY
P2/v6X2+MA4GA1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOi
CfP+JmeaUOTDBS8rNXiRTHyoERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+g
kcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyLabVAyJRld/JXIWY7zoVAtjNjGr95
HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678IIbsSt4beDI3poHS
na9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkhMp6q
qIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0Z
TbvGRNs2yyqcjg==
-----END CERTIFICATE-----

# Issuer: CN=Hongkong Post Root CA 1 O=Hongkong Post
# Subject: CN=Hongkong Post Root CA 1 O=Hongkong Post
# Label: "Hongkong Post Root CA 1"
# Serial: 1000
# MD5 Fingerprint: a8:0d:6f:39:78:b9:43:6d:77:42:6d:98:5a:cc:23:ca
# SHA1 Fingerprint: d6:da:a8:20:8d:09:d2:15:4d:24:b5:2f:cb:34:6e:b2:58:b2:8a:58
# SHA256 Fingerprint: f9:e6:7d:33:6c:51:00:2a:c0:54:c6:32:02:2d:66:dd:a2:e7:e3:ff:f1:0a:d0:61:ed:31:d8:bb:b4:10:cf:b2
-----BEGIN CERTIFICATE-----
MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsx
FjAUBgNVBAoTDUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3Qg
Um9vdCBDQSAxMB4XDTAzMDUxNTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkG
A1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdr
b25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1ApzQ
jVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEn
PzlTCeqrauh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjh
ZY4bXSNmO7ilMlHIhqqhqZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9
nnV0ttgCXjqQesBCNnLsak3c78QA3xMYV18meMjWCnl3v/evt3a5pQuEF10Q6m/h
q5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNVHRMBAf8ECDAGAQH/AgED
MA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7ih9legYsC
mEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI3
7piol7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clB
oiMBdDhViw+5LmeiIAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJs
EhTkYY2sEJCehFC78JZvRZ+K88psT/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpO
fMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilTc4afU9hDDl3WY4JxHYB0yvbi
AmvZWg==
-----END CERTIFICATE-----

# Issuer: CN=SecureSign RootCA11 O=Japan Certification Services, Inc.
# Subject: CN=SecureSign RootCA11 O=Japan Certification Services, Inc.
# Label: "SecureSign RootCA11"
# Serial: 1
# MD5 Fingerprint: b7:52:74:e2:92:b4:80:93:f2:75:e4:cc:d7:f2:ea:26
# SHA1 Fingerprint: 3b:c4:9f:48:f8:f3:73:a0:9c:1e:bd:f8:5b:b1:c3:65:c7:d8:11:b3
# SHA256 Fingerprint: bf:0f:ee:fb:9e:3a:58:1a:d5:f9:e9:db:75:89:98:57:43:d2:61:08:5c:4d:31:4f:6f:5d:72:59:aa:42:16:12
-----BEGIN CERTIFICATE-----
MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDEr
MCkGA1UEChMiSmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoG
A1UEAxMTU2VjdXJlU2lnbiBSb290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0
MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSswKQYDVQQKEyJKYXBhbiBDZXJ0aWZp
Y2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1cmVTaWduIFJvb3RD
QTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvLTJsz
i1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8
h9uuywGOwvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOV
MdrAG/LuYpmGYz+/3ZMqg6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9
UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rPO7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni
8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitAbpSACW22s293bzUIUPsC
h8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZXt94wDgYD
VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB
AKChOBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xm
KbabfSVSSUOrTC4rbnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQ
X5Ucv+2rIrVls4W6ng+4reV6G4pQOh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWr
QbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01y8hSyn+B/tlr0/cR7SXf+Of5
pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061lgeLKBObjBmN
QSdJQO7e5iNEOdyhIta6A/I=
-----END CERTIFICATE-----

# Issuer: CN=ACEDICOM Root O=EDICOM OU=PKI
# Subject: CN=ACEDICOM Root O=EDICOM OU=PKI
# Label: "ACEDICOM Root"
# Serial: 7029493972724711941
# MD5 Fingerprint: 42:81:a0:e2:1c:e3:55:10:de:55:89:42:65:96:22:e6
# SHA1 Fingerprint: e0:b4:32:2e:b2:f6:a5:68:b6:54:53:84:48:18:4a:50:36:87:43:84
# SHA256 Fingerprint: 03:95:0f:b4:9a:53:1f:3e:19:91:94:23:98:df:a9:e0:ea:32:d7:ba:1c:dd:9b:c8:5d:b5:7e:d9:40:0b:43:4a
-----BEGIN CERTIFICATE-----
MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UE
AwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00x
CzAJBgNVBAYTAkVTMB4XDTA4MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEW
MBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZF
RElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
AgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHkWLn7
09gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7
XBZXehuDYAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5P
Grjm6gSSrj0RuVFCPYewMYWveVqc/udOXpJPQ/yrOq2lEiZmueIM15jO1FillUAK
t0SdE3QrwqXrIhWYENiLxQSfHY9g5QYbm8+5eaA9oiM/Qj9r+hwDezCNzmzAv+Yb
X79nuIQZ1RXve8uQNjFiybwCq0Zfm/4aaJQ0PZCOrfbkHQl/Sog4P75n/TSW9R28
MHTLOO7VbKvU/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXTTxKJxqvQU
fecyuB+81fFOvW8XAjnXDpVCOscAPukmYxHqC9FK/xidstd7LzrZlvvoHpKuE1XI
2Sf23EgbsCTBheN3nZqk8wwRHQ3ItBTutYJXCb8gWH8vIiPYcMt5bMlL8qkqyPyH
K9caUPgn6C9D4zq92Fdx/c6mUlv53U3t5fZvie27k5x2IXXwkkwp9y+cAS7+UEae
ZAwUswdbxcJzbPEHXEUkFDWug/FqTYl6+rPYLWbwNof1K1MCAwEAAaOBqjCBpzAP
BgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKaz4SsrSbbXc6GqlPUB53NlTKxQ
MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU9QHnc2VMrFAw
RAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv
bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWIm
fQwng4/F9tqgaHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3
gvoFNTPhNahXwOf9jU8/kzJPeGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKe
I6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1PwkzQSulgUV1qzOMPPKC8W64iLgpq0i
5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1ThCojz2GuHURwCRi
ipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oIKiMn
MCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZ
o5NjEFIqnxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6
zqylfDJKZ0DcMDQj3dcEI2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacN
GHk0vFQYXlPKNFHtRQrmjseCNj6nOGOpMCwXEGCSn1WHElkQwg9naRHMTh5+Spqt
r0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3otkYNbn5XOmeUwssfnHdK
Z05phkOTOPu220+DkdRgfks+KzgHVZhepA==
-----END CERTIFICATE-----

# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
# Label: "Verisign Class 3 Public Primary Certification Authority"
# Serial: 80507572722862485515306429940691309246
# MD5 Fingerprint: ef:5a:f1:33:ef:f1:cd:bb:51:02:ee:12:14:4b:96:c4
# SHA1 Fingerprint: a1:db:63:93:91:6f:17:e4:18:55:09:40:04:15:c7:02:40:b0:ae:6b
# SHA256 Fingerprint: a4:b6:b3:99:6f:c2:f3:06:b3:fd:86:81:bd:63:41:3d:8c:50:09:cc:4f:a3:29:c2:cc:f0:e2:fa:1b:14:03:05
-----BEGIN CERTIFICATE-----
MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
CSqGSIb3DQEBBQUAA4GBABByUqkFFBkyCEHwxWsKzH4PIRnN5GfcX6kb5sroc50i
2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWXbj9T/UWZYB2oK0z5XqcJ
2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/D/xwzoiQ
-----END CERTIFICATE-----

# Issuer: CN=Microsec e-Szigno Root CA 2009 O=Microsec Ltd.
# Subject: CN=Microsec e-Szigno Root CA 2009 O=Microsec Ltd.
# Label: "Microsec e-Szigno Root CA 2009"
# Serial: 14014712776195784473
# MD5 Fingerprint: f8:49:f4:03:bc:44:2d:83:be:48:69:7d:29:64:fc:b1
# SHA1 Fingerprint: 89:df:74:fe:5c:f4:0f:4a:80:f9:e3:37:7d:54:da:91:e1:01:31:8e
# SHA256 Fingerprint: 3c:5f:81:fe:a5:fa:b8:2c:64:bf:a2:ea:ec:af:cd:e8:e0:77:fc:86:20:a7:ca:e5:37:16:3d:f3:6e:db:f3:78
-----BEGIN CERTIFICATE-----
MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD
VQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0
ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0G
CSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTAeFw0wOTA2MTYxMTMwMThaFw0y
OTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3Qx
FjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3pp
Z25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o
dTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvP
kd6mJviZpWNwrZuuyjNAfW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tc
cbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG0IMZfcChEhyVbUr02MelTTMuhTlAdX4U
fIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKApxn1ntxVUwOXewdI/5n7
N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm1HxdrtbC
xkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1
+rUCAwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G
A1UdDgQWBBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPM
Pcu1SCOhGnqmKrs0aDAbBgNVHREEFDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqG
SIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0olZMEyL/azXm4Q5DwpL7v8u8h
mLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfXI/OMn74dseGk
ddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c
2Pm2G2JwCz02yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5t
HMN1Rq41Bab2XD0h7lbwyYIiLXpUq3DDfSJlgnCW
-----END CERTIFICATE-----

# Issuer: CN=e-Guven Kok Elektronik Sertifika Hizmet Saglayicisi O=Elektronik Bilgi Guvenligi A.S.
# Subject: CN=e-Guven Kok Elektronik Sertifika Hizmet Saglayicisi O=Elektronik Bilgi Guvenligi A.S.
# Label: "E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi"
# Serial: 91184789765598910059173000485363494069
# MD5 Fingerprint: 3d:41:29:cb:1e:aa:11:74:cd:5d:b0:62:af:b0:43:5b
# SHA1 Fingerprint: dd:e1:d2:a9:01:80:2e:1d:87:5e:84:b3:80:7e:4b:b1:fd:99:41:34
# SHA256 Fingerprint: e6:09:07:84:65:a4:19:78:0c:b6:ac:4c:1c:0b:fb:46:53:d9:d9:cc:6e:b3:94:6e:b7:f3:d6:99:97:ba:d5:98
-----BEGIN CERTIFICATE-----
MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1
MQswCQYDVQQGEwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxp
Z2kgQS5TLjE8MDoGA1UEAxMzZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZp
a2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3MDEwNDExMzI0OFoXDTE3MDEwNDEx
MzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0cm9uaWsgQmlsZ2kg
R3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9uaWsg
U2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAMMSIJ6wXgBljU5Gu4Bc6SwGl9XzcslwuedLZYDBS75+PNdU
MZTe1RK6UxYC6lhj71vY8+0qGqpxSKPcEC1fX+tcS5yWCEIlKBHMilpiAVDV6wlT
L/jDj/6z/P2douNffb7tC+Bg62nsM+3YjfsSSYMAyYuXjDtzKjKzEve5TfL0TW3H
5tYmNwjy2f1rXKPlSFxYvEK+A1qBuhw1DADT9SN+cTAIJjjcJRFHLfO6IxClv7wC
90Nex/6wN1CZew+TzuZDLMN+DfIcQ2Zgy2ExR4ejT669VmxMvLz4Bcpk9Ok0oSy1
c+HCPujIyTQlCFzz7abHlJ+tiEMl1+E5YP6sOVkCAwEAAaNCMEAwDgYDVR0PAQH/
BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ/uRLOU1fqRTy7ZVZoE
VtstxNulMA0GCSqGSIb3DQEBBQUAA4IBAQB/X7lTW2M9dTLn+sR0GstG30ZpHFLP
qk/CaOv/gKlR6D1id4k9CnU58W5dF4dvaAXBlGzZXd/aslnLpRCKysw5zZ/rTt5S
/wzw9JKp8mxTq5vSR6AfdPebmvEvFZ96ZDAYBzwqD2fK/A+JYZ1lpTzlvBNbCNvj
/+27BrtqBrF6T2XGgv0enIu1De5Iu7i9qgi0+6N8y5/NkHZchpZ4Vwpm+Vganf2X
KWDeEaaQHBkc7gGWIjQ0LpH5t8Qn0Xvmv/uARFoW5evg1Ao4vOSR49XrXMGs3xtq
fJ7lddK2l4fbzIcrQzqECK+rPNv3PGYxhrCdU3nt+CPeQuMtgvEP5fqX
-----END CERTIFICATE-----

# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
# Label: "GlobalSign Root CA - R3"
# Serial: 4835703278459759426209954
# MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
# SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
# SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
-----BEGIN CERTIFICATE-----
MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
WD9f
-----END CERTIFICATE-----

# Issuer: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
# Subject: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
# Label: "Autoridad de Certificacion Firmaprofesional CIF A62634068"
# Serial: 6047274297262753887
# MD5 Fingerprint: 73:3a:74:7a:ec:bb:a3:96:a6:c2:e4:e2:c8:9b:c0:c3
# SHA1 Fingerprint: ae:c5:fb:3f:c8:e1:bf:c4:e5:4f:03:07:5a:9a:e8:00:b7:f7:b6:fa
# SHA256 Fingerprint: 04:04:80:28:bf:1f:28:64:d4:8f:9a:d4:d8:32:94:36:6a:82:88:56:55:3f:3b:14:30:3f:90:14:7f:5d:40:ef
-----BEGIN CERTIFICATE-----
MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UE
BhMCRVMxQjBABgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1h
cHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEy
MzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUg
Q2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBBNjI2MzQwNjgwggIi
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDDUtd9
thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQM
cas9UX4PB99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefG
L9ItWY16Ck6WaVICqjaY7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15i
NA9wBj4gGFrO93IbJWyTdBSTo3OxDqqHECNZXyAFGUftaI6SEspd/NYrspI8IM/h
X68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyIplD9amML9ZMWGxmPsu2b
m8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctXMbScyJCy
Z/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirja
EbsXLZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/T
KI8xWVvTyQKmtFLKbpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF
6NkBiDkal4ZkQdU7hwxu+g/GvUgUvzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVh
OSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYD
VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNHDhpkLzCBpgYD
VR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBv
ACAAZABlACAAbABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBl
AGwAbwBuAGEAIAAwADgAMAAxADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF
661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx51tkljYyGOylMnfX40S2wBEqgLk9
am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qkR71kMrv2JYSiJ0L1
ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaPT481
PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS
3a/DTg4fJl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5k
SeTy36LssUzAKh3ntLFlosS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF
3dvd6qJ2gHN99ZwExEWN57kci57q13XRcrHedUTnQn3iV2t93Jm8PYMo6oCTjcVM
ZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoRsaS8I8nkvof/uZS2+F0g
StRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTDKCOM/icz
Q0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQB
jLMi6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
-----END CERTIFICATE-----

# Issuer: CN=Izenpe.com O=IZENPE S.A.
# Subject: CN=Izenpe.com O=IZENPE S.A.
# Label: "Izenpe.com"
# Serial: 917563065490389241595536686991402621
# MD5 Fingerprint: a6:b0:cd:85:80:da:5c:50:34:a3:39:90:2f:55:67:73
# SHA1 Fingerprint: 2f:78:3d:25:52:18:a7:4a:65:39:71:b5:2c:a2:9c:45:15:6f:e9:19
# SHA256 Fingerprint: 25:30:cc:8e:98:32:15:02:ba:d9:6f:9b:1f:ba:1b:09:9e:2d:29:9e:0f:45:48:bb:91:4f:36:3b:c0:d4:53:1f
-----BEGIN CERTIFICATE-----
MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4
MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6
ZW5wZS5jb20wHhcNMDcxMjEzMTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYD
VQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5j
b20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ03rKDx6sp4boFmVq
scIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAKClaO
xdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6H
LmYRY2xU+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFX
uaOKmMPsOzTFlUFpfnXCPCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQD
yCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxTOTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+
JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbKF7jJeodWLBoBHmy+E60Q
rLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK0GqfvEyN
BjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8L
hij+0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIB
QFqNeb+Lz0vPqhbBleStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+
HMh3/1uaD7euBUbl8agW7EekFwIDAQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2lu
Zm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+SVpFTlBFIFMuQS4gLSBDSUYg
QTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBGNjIgUzgxQzBB
BgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx
MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AQYwHQYDVR0OBBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUA
A4ICAQB4pgwWSp9MiDrAyw6lFn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWb
laQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbgakEyrkgPH7UIBzg/YsfqikuFgba56
awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8qhT/AQKM6WfxZSzwo
JNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Csg1lw
LDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCT
VyvehQP5aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGk
LhObNA5me0mrZJfQRsN5nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJb
UjWumDqtujWTI6cfSN01RpiyEGjkpTHCClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/
QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZoQ0iy2+tzJOeRf1SktoA+
naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1ZWrOZyGls
QyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
-----END CERTIFICATE-----

# Issuer: CN=Chambers of Commerce Root - 2008 O=AC Camerfirma S.A.
# Subject: CN=Chambers of Commerce Root - 2008 O=AC Camerfirma S.A.
# Label: "Chambers of Commerce Root - 2008"
# Serial: 11806822484801597146
# MD5 Fingerprint: 5e:80:9e:84:5a:0e:65:0b:17:02:f3:55:18:2a:3e:d7
# SHA1 Fingerprint: 78:6a:74:ac:76:ab:14:7f:9c:6a:30:50:ba:9e:a8:7e:fe:9a:ce:3c
# SHA256 Fingerprint: 06:3e:4a:fa:c4:91:df:d3:32:f3:08:9b:85:42:e9:46:17:d8:93:d7:fe:94:4e:10:a7:93:7e:e2:9d:96:93:c0
-----BEGIN CERTIFICATE-----
MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYD
VQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0
IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3
MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xKTAnBgNVBAMTIENoYW1iZXJz
IG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEyMjk1MFoXDTM4MDcz
MTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBj
dXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIw
EAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEp
MCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0G
CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW9
28sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKAXuFixrYp4YFs8r/lfTJq
VKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorjh40G072Q
DuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR
5gN/ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfL
ZEFHcpOrUMPrCXZkNNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05a
Sd+pZgvMPMZ4fKecHePOjlO+Bd5gD2vlGts/4+EhySnB8esHnFIbAURRPHsl18Tl
UlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331lubKgdaX8ZSD6e2wsWsSaR6s
+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ0wlf2eOKNcx5
Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj
ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAx
hduub+84Mxh2EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNV
HQ4EFgQU+SSsD7K1+HnA+mCIG8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1
+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpN
YWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29t
L2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVy
ZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAt
IDIwMDiCCQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRV
HSAAMCowKAYIKwYBBQUHAgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20w
DQYJKoZIhvcNAQEFBQADggIBAJASryI1wqM58C7e6bXpeHxIvj99RZJe6dqxGfwW
PJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH3qLPaYRgM+gQDROpI9CF
5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbURWpGqOt1
glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaH
FoI6M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2
pSB7+R5KBWIBpih1YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MD
xvbxrN8y8NmBGuScvfaAFPDRLLmF9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QG
tjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcKzBIKinmwPQN/aUv0NCB9szTq
jktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvGnrDQWzilm1De
fhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZ
d0jQ
-----END CERTIFICATE-----

# Issuer: CN=Global Chambersign Root - 2008 O=AC Camerfirma S.A.
# Subject: CN=Global Chambersign Root - 2008 O=AC Camerfirma S.A.
# Label: "Global Chambersign Root - 2008"
# Serial: 14541511773111788494
# MD5 Fingerprint: 9e:80:ff:78:01:0c:2e:c1:36:bd:fe:96:90:6e:08:f3
# SHA1 Fingerprint: 4a:bd:ee:ec:95:0d:35:9c:89:ae:c7:52:a1:2c:5b:29:f6:d6:aa:0c
# SHA256 Fingerprint: 13:63:35:43:93:34:a7:69:80:16:a0:d3:24:de:72:28:4e:07:9d:7b:52:20:bb:8f:bd:74:78:16:ee:be:ba:ca
-----BEGIN CERTIFICATE-----
MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYD
VQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0
IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3
MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
aGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMxNDBaFw0zODA3MzEx
MjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3Vy
cmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAG
A1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAl
BgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZI
hvcNAQEBBQADggIPADCCAgoCggIBAMDfVtPkOpt2RbQT2//BthmLN0EYlVJH6xed
KYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXfXjaOcNFccUMd2drvXNL7
G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0ZJJ0YPP2
zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4
ddPB/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyG
HoiMvvKRhI9lNNgATH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2
Id3UwD2ln58fQ1DJu7xsepeY7s2MH/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3V
yJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfeOx2YItaswTXbo6Al/3K1dh3e
beksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSFHTynyQbehP9r
6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh
wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsog
zCtLkykPAgMBAAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQW
BBS5CcqcHtvTbDprru1U8VuTBjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDpr
ru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UEBhMCRVUxQzBBBgNVBAcTOk1hZHJp
ZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJmaXJtYS5jb20vYWRk
cmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJmaXJt
YSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiC
CQDJzdPp1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCow
KAYIKwYBBQUHAgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZI
hvcNAQEFBQADggIBAICIf3DekijZBZRG/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZ
UohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6ReAJ3spED8IXDneRRXoz
X1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/sdZ7LoR/x
fxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVz
a2Mg9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yyd
Yhz2rXzdpjEetrHHfoUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMd
SqlapskD7+3056huirRXhOukP9DuqqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9O
AP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETrP3iZ8ntxPjzxmKfFGBI/5rso
M0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVqc5iJWzouE4ge
v8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
-----END CERTIFICATE-----

# Issuer: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
# Subject: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
# Label: "Go Daddy Root Certificate Authority - G2"
# Serial: 0
# MD5 Fingerprint: 80:3a:bc:22:c1:e6:fb:8d:9b:3b:27:4a:32:1b:9a:01
# SHA1 Fingerprint: 47:be:ab:c9:22:ea:e8:0e:78:78:34:62:a7:9f:45:c2:54:fd:e6:8b
# SHA256 Fingerprint: 45:14:0b:32:47:eb:9c:c8:c5:b4:f0:d7:b5:30:91:f7:32:92:08:9e:6e:5a:63:e2:74:9d:d3:ac:a9:19:8e:da
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT
EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp
ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz
NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH
EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE
AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD
E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH
/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy
DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh
GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR
tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA
AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX
WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu
9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr
gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo
2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI
4uJEvlz36hz1
-----END CERTIFICATE-----

# Issuer: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
# Subject: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
# Label: "Starfield Root Certificate Authority - G2"
# Serial: 0
# MD5 Fingerprint: d6:39:81:c6:52:7e:96:69:fc:fc:ca:66:ed:05:f2:96
# SHA1 Fingerprint: b5:1c:06:7c:ee:2b:0c:3d:f8:55:ab:2d:92:f4:fe:39:d4:e7:0f:0e
# SHA256 Fingerprint: 2c:e1:cb:0b:f9:d2:f9:e1:02:99:3f:be:21:51:52:c3:b2:dd:0c:ab:de:1c:68:e5:31:9b:83:91:54:db:b7:f5
-----BEGIN CERTIFICATE-----
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs
ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw
MFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj
aG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZp
Y2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAL3twQP89o/8ArFvW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMg
nLRJdzIpVv257IzdIvpy3Cdhl+72WoTsbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1
HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNkN3mSwOxGXn/hbVNMYq/N
Hwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7NfZTD4p7dN
dloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0
HZbUJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0G
CSqGSIb3DQEBCwUAA4IBAQARWfolTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjU
sHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx4mcujJUDJi5DnUox9g61DLu3
4jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUwF5okxBDgBPfg
8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1
mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
-----END CERTIFICATE-----

# Issuer: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
# Subject: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
# Label: "Starfield Services Root Certificate Authority - G2"
# Serial: 0
# MD5 Fingerprint: 17:35:74:af:7b:61:1c:eb:f4:f9:3c:e2:ee:40:f9:a2
# SHA1 Fingerprint: 92:5a:8f:8d:2c:6d:04:e0:66:5f:59:6a:ff:22:d8:63:e8:25:6f:3f
# SHA256 Fingerprint: 56:8d:69:05:a2:c8:87:08:a4:b3:02:51:90:ed:cf:ed:b1:97:4a:60:6a:13:c6:e5:29:0f:cb:2a:e6:3e:da:b5
-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
sSi6
-----END CERTIFICATE-----

# Issuer: CN=AffirmTrust Commercial O=AffirmTrust
# Subject: CN=AffirmTrust Commercial O=AffirmTrust
# Label: "AffirmTrust Commercial"
# Serial: 8608355977964138876
# MD5 Fingerprint: 82:92:ba:5b:ef:cd:8a:6f:a6:3d:55:f9:84:f6:d6:b7
# SHA1 Fingerprint: f9:b5:b6:32:45:5f:9c:be:ec:57:5f:80:dc:e9:6e:2c:c7:b2:78:b7
# SHA256 Fingerprint: 03:76:ab:1d:54:c5:f9:80:3c:e4:b2:e2:01:a0:ee:7e:ef:7b:57:b6:36:e8:a9:3c:9b:8d:48:60:c9:6f:5f:a7
-----BEGIN CERTIFICATE-----
MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UE
BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
dCBDb21tZXJjaWFsMB4XDTEwMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDEL
MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
cm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6EqdbDuKP
Hx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yr
ba0F8PrVC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPAL
MeIrJmqbTFeurCA+ukV6BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1
yHp52UKqK39c/s4mT6NmgTWvRLpUHhwwMmWd5jyTXlBOeuM61G7MGvv50jeuJCqr
VwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNVHQ4EFgQUnZPGU4teyq8/
nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
KoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYG
XUPGhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNj
vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt
Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g
N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC
nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
-----END CERTIFICATE-----

# Issuer: CN=AffirmTrust Networking O=AffirmTrust
# Subject: CN=AffirmTrust Networking O=AffirmTrust
# Label: "AffirmTrust Networking"
# Serial: 8957382827206547757
# MD5 Fingerprint: 42:65:ca:be:01:9a:9a:4c:a9:8c:41:49:cd:c0:d5:7f
# SHA1 Fingerprint: 29:36:21:02:8b:20:ed:02:f5:66:c5:32:d1:d6:ed:90:9f:45:00:2f
# SHA256 Fingerprint: 0a:81:ec:5a:92:97:77:f1:45:90:4a:f3:8d:5d:50:9f:66:b5:e2:c5:8f:cd:b5:31:05:8b:0e:17:f3:f0:b4:1b
-----BEGIN CERTIFICATE-----
MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE
BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDEL
MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
cm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SEHi3y
YJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbua
kCNrmreIdIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRL
QESxG9fhwoXA3hA/Pe24/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp
6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gbh+0t+nvujArjqWaJGctB+d1ENmHP4ndG
yH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNVHQ4EFgQUBx/S55zawm6i
QLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
KoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfO
tDIuUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzu
QY0x2+c06lkh1QF612S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZ
Lgo/bNjR9eUJtGxUAArgFU2HdW23WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4u
olu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9/ZFvgrG+CJPbFEfxojfHRZ48
x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
-----END CERTIFICATE-----

# Issuer: CN=AffirmTrust Premium O=AffirmTrust
# Subject: CN=AffirmTrust Premium O=AffirmTrust
# Label: "AffirmTrust Premium"
# Serial: 7893706540734352110
# MD5 Fingerprint: c4:5d:0e:48:b6:ac:28:30:4e:0a:bc:f9:38:16:87:57
# SHA1 Fingerprint: d8:a6:33:2c:e0:03:6f:b1:85:f6:63:4f:7d:6a:06:65:26:32:28:27
# SHA256 Fingerprint: 70:a7:3f:7f:37:6b:60:07:42:48:90:45:34:b1:14:82:d5:bf:0e:69:8e:cc:49:8d:f5:25:77:eb:f2:e9:3b:9a
-----BEGIN CERTIFICATE-----
MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UE
BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVz
dCBQcmVtaXVtMB4XDTEwMDEyOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkG
A1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1U
cnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxBLf
qV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtnBKAQ
JG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ
+jjeRFcV5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrS
s8PhaJyJ+HoAVt70VZVs+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5
HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmdGPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d7
70O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5Rp9EixAqnOEhss/n/fauG
V+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NIS+LI+H+S
qHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S
5u046uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4Ia
C1nEWTJ3s7xgaVY5/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TX
OwF0lkLgAOIua+rF7nKsu7/+6qqo+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYE
FJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByvMiPIs0laUZx2
KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B
8OWycvpEgjNC6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQ
MKSOyARiqcTtNd56l+0OOF6SL5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc
0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK+4w1IX2COPKpVJEZNZOUbWo6xbLQ
u4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmVBtWVyuEklut89pMF
u+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFgIxpH
YoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8
GKa1qF60g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaO
RtGdFNrHF+QFlozEJLUbzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6e
KeC2uAloGRwYQw==
-----END CERTIFICATE-----

# Issuer: CN=AffirmTrust Premium ECC O=AffirmTrust
# Subject: CN=AffirmTrust Premium ECC O=AffirmTrust
# Label: "AffirmTrust Premium ECC"
# Serial: 8401224907861490260
# MD5 Fingerprint: 64:b0:09:55:cf:b1:d5:99:e2:be:13:ab:a6:5d:ea:4d
# SHA1 Fingerprint: b8:23:6b:00:2f:1d:16:86:53:01:55:6c:11:a4:37:ca:eb:ff:c3:bb
# SHA256 Fingerprint: bd:71:fd:f6:da:97:e4:cf:62:d1:64:7a:dd:25:81:b0:7d:79:ad:f8:39:7e:b4:ec:ba:9c:5e:84:88:82:14:23
-----BEGIN CERTIFICATE-----
MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC
VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ
cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ
BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt
VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D
0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9
ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G
A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G
A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs
aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I
flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ==
-----END CERTIFICATE-----

# Issuer: CN=Certum Trusted Network CA O=Unizeto Technologies S.A. OU=Certum Certification Authority
# Subject: CN=Certum Trusted Network CA O=Unizeto Technologies S.A. OU=Certum Certification Authority
# Label: "Certum Trusted Network CA"
# Serial: 279744
# MD5 Fingerprint: d5:e9:81:40:c5:18:69:fc:46:2c:89:75:62:0f:aa:78
# SHA1 Fingerprint: 07:e0:32:e0:20:b7:2c:3f:19:2f:06:28:a2:59:3a:19:a7:0f:06:9e
# SHA256 Fingerprint: 5c:58:46:8d:55:f5:8e:49:7e:74:39:82:d2:b5:00:10:b6:d1:65:37:4a:cf:83:a7:d4:a3:2d:b7:68:c4:40:8e
-----BEGIN CERTIFICATE-----
MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBM
MSIwIAYDVQQKExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5D
ZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBU
cnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIyMTIwNzM3WhcNMjkxMjMxMTIwNzM3
WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMg
Uy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSIw
IAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rH
UV+rpDKmYYe2bg+G0jACl/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LM
TXPb865Px1bVWqeWifrzq2jUI4ZZJ88JJ7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVU
BBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4fOQtf/WsX+sWn7Et0brM
kUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0cvW0QM8x
AcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNV
HQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15y
sHhE49wcrwn9I0j6vSrEuVUEtRCjjSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfL
I9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1mS1FhIrlQgnXdAIv94nYmem8
J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5ajZt3hrvJBW8qY
VoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
-----END CERTIFICATE-----

# Issuer: CN=Certinomis - Autorité Racine O=Certinomis OU=0002 433998903
# Subject: CN=Certinomis - Autorité Racine O=Certinomis OU=0002 433998903
# Label: "Certinomis - Autorité Racine"
# Serial: 1
# MD5 Fingerprint: 7f:30:78:8c:03:e3:ca:c9:0a:e2:c9:ea:1e:aa:55:1a
# SHA1 Fingerprint: 2e:14:da:ec:28:f0:fa:1e:8e:38:9a:4e:ab:eb:26:c0:0a:d3:83:c3
# SHA256 Fingerprint: fc:bf:e2:88:62:06:f7:2b:27:59:3c:8b:07:02:97:e1:2d:76:9e:d1:0e:d7:93:07:05:a8:09:8e:ff:c1:4d:17
-----BEGIN CERTIFICATE-----
MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjET
MBEGA1UEChMKQ2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAk
BgNVBAMMHUNlcnRpbm9taXMgLSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4
Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkGA1UEBhMCRlIxEzARBgNVBAoTCkNl
cnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYwJAYDVQQDDB1DZXJ0
aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
ADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jY
F1AMnmHawE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N
8y4oH3DfVS9O7cdxbwlyLu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWe
rP5pqZ56XjUl+rSnSTV3lqc2W+HN3yNw2F1MpQiD8aYkOBOo7C+ooWfHpi2GR+6K
/OybDnT0K0kCe5B1jPyZOQE51kqJ5Z52qz6WKDgmi92NjMD2AR5vpTESOH2VwnHu
7XSu5DaiQ3XV8QCb4uTXzEIDS3h65X27uK4uIJPT5GHfceF2Z5c/tt9qc1pkIuVC
28+BA5PY9OMQ4HL2AHCs8MF6DwV/zzRpRbWT5BnbUhYjBYkOjUjkJW+zeL9i9Qf6
lSTClrLooyPCXQP8w9PlfMl1I9f09bze5N/NgL+RiH2nE7Q5uiy6vdFrzPOlKO1E
nn1So2+WLhl+HPNbxxaOu2B9d2ZHVIIAEWBsMsGoOBvrbpgT1u449fCfDu/+MYHB
0iSVL1N6aaLwD4ZFjliCK0wi1F6g530mJ0jfJUaNSih8hp75mxpZuWW/Bd22Ql09
5gBIgl4g9xGC3srYn+Y3RyYe63j3YcNBZFgCQfna4NH4+ej9Uji29YnfAgMBAAGj
WzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQN
jLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ
KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9s
ov3/4gbIOZ/xWqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZM
OH8oMDX/nyNTt7buFHAAQCvaR6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q
619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40nJ+U8/aGH88bc62UeYdocMMzpXDn
2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1BCxMjidPJC+iKunqj
o3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjvJL1v
nxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG
5ERQL1TEqkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWq
pdEdnV1j6CTmNhTih60bWfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZb
dsLLO7XSAPCjDuGtbkD326C00EauFddEwk01+dIL8hf2rGbVJLJP0RyZwG71fet0
BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/vgt2Fl43N+bYdJeimUV5
-----END CERTIFICATE-----

# Issuer: CN=Root CA Generalitat Valenciana O=Generalitat Valenciana OU=PKIGVA
# Subject: CN=Root CA Generalitat Valenciana O=Generalitat Valenciana OU=PKIGVA
# Label: "Root CA Generalitat Valenciana"
# Serial: 994436456
# MD5 Fingerprint: 2c:8c:17:5e:b1:54:ab:93:17:b5:36:5a:db:d1:c6:f2
# SHA1 Fingerprint: a0:73:e5:c5:bd:43:61:0d:86:4c:21:13:0a:85:58:57:cc:9c:ea:46
# SHA256 Fingerprint: 8c:4e:df:d0:43:48:f3:22:96:9e:7e:29:a4:cd:4d:ca:00:46:55:06:1c:16:e1:b0:76:42:2e:f3:42:ad:63:0e
-----BEGIN CERTIFICATE-----
MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJF
UzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJ
R1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwHhcN
MDEwNzA2MTYyMjQ3WhcNMjEwNzAxMTUyMjQ3WjBoMQswCQYDVQQGEwJFUzEfMB0G
A1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScw
JQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGKqtXETcvIorKA3Qdyu0togu8M1JAJke+
WmmmO3I2F0zo37i7L3bhQEZ0ZQKQUgi0/6iMweDHiVYQOTPvaLRfX9ptI6GJXiKj
SgbwJ/BXufjpTjJ3Cj9BZPPrZe52/lSqfR0grvPXdMIKX/UIKFIIzFVd0g/bmoGl
u6GzwZTNVOAydTGRGmKy3nXiz0+J2ZGQD0EbtFpKd71ng+CT516nDOeB0/RSrFOy
A8dEJvt55cs0YFAQexvba9dHq198aMpunUEDEO5rmXteJajCq+TA81yc477OMUxk
Hl6AovWDfgzWyoxVjr7gvkkHD6MkQXpYHYTqWBLI4bft75PelAgxAgMBAAGjggM7
MIIDNzAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLnBr
aS5ndmEuZXMwEgYDVR0TAQH/BAgwBgEB/wIBAjCCAjQGA1UdIASCAiswggInMIIC
IwYKKwYBBAG/VQIBADCCAhMwggHoBggrBgEFBQcCAjCCAdoeggHWAEEAdQB0AG8A
cgBpAGQAYQBkACAAZABlACAAQwBlAHIAdABpAGYAaQBjAGEAYwBpAPMAbgAgAFIA
YQDtAHoAIABkAGUAIABsAGEAIABHAGUAbgBlAHIAYQBsAGkAdABhAHQAIABWAGEA
bABlAG4AYwBpAGEAbgBhAC4ADQAKAEwAYQAgAEQAZQBjAGwAYQByAGEAYwBpAPMA
bgAgAGQAZQAgAFAAcgDhAGMAdABpAGMAYQBzACAAZABlACAAQwBlAHIAdABpAGYA
aQBjAGEAYwBpAPMAbgAgAHEAdQBlACAAcgBpAGcAZQAgAGUAbAAgAGYAdQBuAGMA
aQBvAG4AYQBtAGkAZQBuAHQAbwAgAGQAZQAgAGwAYQAgAHAAcgBlAHMAZQBuAHQA
ZQAgAEEAdQB0AG8AcgBpAGQAYQBkACAAZABlACAAQwBlAHIAdABpAGYAaQBjAGEA
YwBpAPMAbgAgAHMAZQAgAGUAbgBjAHUAZQBuAHQAcgBhACAAZQBuACAAbABhACAA
ZABpAHIAZQBjAGMAaQDzAG4AIAB3AGUAYgAgAGgAdAB0AHAAOgAvAC8AdwB3AHcA
LgBwAGsAaQAuAGcAdgBhAC4AZQBzAC8AYwBwAHMwJQYIKwYBBQUHAgEWGWh0dHA6
Ly93d3cucGtpLmd2YS5lcy9jcHMwHQYDVR0OBBYEFHs100DSHHgZZu90ECjcPk+y
eAT8MIGVBgNVHSMEgY0wgYqAFHs100DSHHgZZu90ECjcPk+yeAT8oWykajBoMQsw
CQYDVQQGEwJFUzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0G
A1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVu
Y2lhbmGCBDtF5WgwDQYJKoZIhvcNAQEFBQADggEBACRhTvW1yEICKrNcda3Fbcrn
lD+laJWIwVTAEGmiEi8YPyVQqHxK6sYJ2fR1xkDar1CdPaUWu20xxsdzCkj+IHLt
b8zog2EWRpABlUt9jppSCS/2bxzkoXHPjCpaF3ODR00PNvsETUlR4hTJZGH71BTg
9J63NI8KJr2XXPR5OkowGcytT6CYirQxlyric21+eLj4iIlPsSKRZEv1UN4D2+XF
ducTZnV+ZfsBn5OHiJ35Rld8TWCvmHMTI6QgkYH60GFmuH3Rr9ZvHmw96RH9qfmC
IoaZM3Fa6hlXPZHNqcCjbgcTpsnt+GijnsNacgmHKNHEc8RzGF9QdRYxn7fofMM=
-----END CERTIFICATE-----

# Issuer: CN=A-Trust-nQual-03 O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH OU=A-Trust-nQual-03
# Subject: CN=A-Trust-nQual-03 O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH OU=A-Trust-nQual-03
# Label: "A-Trust-nQual-03"
# Serial: 93214
# MD5 Fingerprint: 49:63:ae:27:f4:d5:95:3d:d8:db:24:86:b8:9c:07:53
# SHA1 Fingerprint: d3:c0:63:f2:19:ed:07:3e:34:ad:5d:75:0b:32:76:29:ff:d5:9a:f2
# SHA256 Fingerprint: 79:3c:bf:45:59:b9:fd:e3:8a:b2:2d:f1:68:69:f6:98:81:ae:14:c4:b0:13:9a:c7:88:a7:8a:1a:fc:ca:02:fb
-----BEGIN CERTIFICATE-----
MIIDzzCCAregAwIBAgIDAWweMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJB
VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRkwFwYDVQQLDBBBLVRydXN0LW5R
dWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5RdWFsLTAzMB4XDTA1MDgxNzIyMDAw
MFoXDTE1MDgxNzIyMDAwMFowgY0xCzAJBgNVBAYTAkFUMUgwRgYDVQQKDD9BLVRy
dXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0ZW52
ZXJrZWhyIEdtYkgxGTAXBgNVBAsMEEEtVHJ1c3QtblF1YWwtMDMxGTAXBgNVBAMM
EEEtVHJ1c3QtblF1YWwtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCtPWFuA/OQO8BBC4SAzewqo51ru27CQoT3URThoKgtUaNR8t4j8DRE/5TrzAUj
lUC5B3ilJfYKvUWG6Nm9wASOhURh73+nyfrBJcyFLGM/BWBzSQXgYHiVEEvc+RFZ
znF/QJuKqiTfC0Li21a8StKlDJu3Qz7dg9MmEALP6iPESU7l0+m0iKsMrmKS1GWH
2WrX9IWf5DMiJaXlyDO6w8dB3F/GaswADm0yqLaHNgBid5seHzTLkDx4iHQF63n1
k3Flyp3HaxgtPVxO59X4PzF9j4fsCiIvI+n+u33J4PTs63zEsMMtYrWacdaxaujs
2e3Vcuy+VwHOBVWf3tFgiBCzAgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYD
VR0OBAoECERqlWdVeRFPMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
AQEAVdRU0VlIXLOThaq/Yy/kgM40ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fG
KOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmrsQd7TZjTXLDR8KdCoLXEjq/+
8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZdJXDRZslo+S4R
FGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS
mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmE
DNuxUCAKGkq6ahq97BvIxYSazQ==
-----END CERTIFICATE-----

# Issuer: CN=TWCA Root Certification Authority O=TAIWAN-CA OU=Root CA
# Subject: CN=TWCA Root Certification Authority O=TAIWAN-CA OU=Root CA
# Label: "TWCA Root Certification Authority"
# Serial: 1
# MD5 Fingerprint: aa:08:8f:f6:f9:7b:b7:f2:b1:a7:1e:9b:ea:ea:bd:79
# SHA1 Fingerprint: cf:9e:87:6d:d3:eb:fc:42:26:97:a3:b5:a3:7a:a0:76:a9:06:23:48
# SHA256 Fingerprint: bf:d8:8f:e1:10:1c:41:ae:3e:80:1b:f8:be:56:35:0e:e9:ba:d1:a6:b9:bd:51:5e:dc:5c:6d:5b:87:11:ac:44
-----BEGIN CERTIFICATE-----
MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzES
MBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFU
V0NBIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMz
WhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJVEFJV0FO
LUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlm
aWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFE
AcK0HMMxQhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HH
K3XLfJ+utdGdIzdjp9xCoi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeX
RfwZVzsrb+RH9JlF/h3x+JejiB03HFyP4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/z
rX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1ry+UPizgN7gr8/g+YnzAx
3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkq
hkiG9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeC
MErJk/9q56YAf4lCmtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdls
XebQ79NqZp4VKIV66IIArB6nCWlWQtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62D
lhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVYT0bf+215WfKEIlKuD8z7fDvn
aspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocnyYh0igzyXxfkZ
YiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
-----END CERTIFICATE-----

# Issuer: O=SECOM Trust Systems CO.,LTD. OU=Security Communication RootCA2
# Subject: O=SECOM Trust Systems CO.,LTD. OU=Security Communication RootCA2
# Label: "Security Communication RootCA2"
# Serial: 0
# MD5 Fingerprint: 6c:39:7d:a4:0e:55:59:b2:3f:d6:41:b1:12:50:de:43
# SHA1 Fingerprint: 5f:3b:8c:f2:f8:10:b3:7d:78:b4:ce:ec:19:19:c3:73:34:b9:c7:74
# SHA256 Fingerprint: 51:3b:2c:ec:b8:10:d4:cd:e5:dd:85:39:1a:df:c6:c2:dd:60:d8:7b:b7:36:d2:b5:21:48:4a:a4:7a:0e:be:f6
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDEl
MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMe
U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoX
DTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy
dXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj
YXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV
OVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr
zbl+dp+++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM
VAX3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQ
hNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWO
ojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY6rCcMU/Gt1SSw
awNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8QIH4D5cs
OPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3
DQEBCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF
coJxDjrSzG+ntKEju/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc
okgfGT+Ok+vx+hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8
t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy
1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHIRc/
SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
-----END CERTIFICATE-----

# Issuer: CN=Hellenic Academic and Research Institutions RootCA 2011 O=Hellenic Academic and Research Institutions Cert. Authority
# Subject: CN=Hellenic Academic and Research Institutions RootCA 2011 O=Hellenic Academic and Research Institutions Cert. Authority
# Label: "Hellenic Academic and Research Institutions RootCA 2011"
# Serial: 0
# MD5 Fingerprint: 73:9f:4c:4b:73:5b:79:e9:fa:ba:1c:ef:6e:cb:d5:c9
# SHA1 Fingerprint: fe:45:65:9b:79:03:5b:98:a1:61:b5:51:2e:ac:da:58:09:48:22:4d
# SHA256 Fingerprint: bc:10:4f:15:a4:8b:e7:09:dc:a5:42:a7:e1:d4:b9:df:6f:05:45:27:e8:02:ea:a9:2d:59:54:44:25:8a:fe:71
-----BEGIN CERTIFICATE-----
MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1Ix
RDBCBgNVBAoTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1
dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1p
YyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIFJvb3RDQSAyMDExMB4XDTExMTIw
NjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYTAkdSMUQwQgYDVQQK
EztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIENl
cnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJl
c2VhcmNoIEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPz
dYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJ
fel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa71HFK9+WXesyHgLacEns
bgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u8yBRQlqD
75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSP
FEDH3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNV
HRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp
5dgTBCPuQSUwRwYDVR0eBEAwPqA8MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQu
b3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQub3JnMA0GCSqGSIb3DQEBBQUA
A4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVtXdMiKahsog2p
6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7
dIsXRSZMFpGD/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8Acys
Nnq/onN694/BtZqhFLKPM58N7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXI
l7WdmplNsDz4SgCbZN2fOUvRJ9e4
-----END CERTIFICATE-----

# Issuer: CN=Actalis Authentication Root CA O=Actalis S.p.A./03358520967
# Subject: CN=Actalis Authentication Root CA O=Actalis S.p.A./03358520967
# Label: "Actalis Authentication Root CA"
# Serial: 6271844772424770508
# MD5 Fingerprint: 69:c1:0d:4f:07:a3:1b:c3:fe:56:3d:04:bc:11:f6:a6
# SHA1 Fingerprint: f3:73:b3:87:06:5a:28:84:8a:f2:f3:4a:ce:19:2b:dd:c7:8e:9c:ac
# SHA256 Fingerprint: 55:92:60:84:ec:96:3a:64:b9:6e:2a:be:01:ce:0b:a8:6a:64:fb:fe:bc:c7:aa:b5:af:c1:55:b3:7f:d7:60:66
-----BEGIN CERTIFICATE-----
MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UE
BhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8w
MzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDkyMjExMjIwMlowazELMAkGA1UEBhMC
SVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1
ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENB
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNv
UTufClrJwkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX
4ay8IMKx4INRimlNAJZaby/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9
KK3giq0itFZljoZUj5NDKd45RnijMCO6zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/
gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1fYVEiVRvjRuPjPdA1Yprb
rxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2oxgkg4YQ
51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2F
be8lEfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxe
KF+w6D9Fz8+vm2/7hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4F
v6MGn8i1zeQf1xcGDXqVdFUNaBr8EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbn
fpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5jF66CyCU3nuDuP/jVo23Eek7
jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLYiDrIn3hm7Ynz
ezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt
ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQAL
e3KHwGCmSUyIWOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70
jsNjLiNmsGe+b7bAEzlgqqI0JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDz
WochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKxK3JCaKygvU5a2hi/a5iB0P2avl4V
SM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+Xlff1ANATIGk0k9j
pwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC4yyX
X04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+Ok
fcvHlXHo2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7R
K4X9p2jIugErsWx0Hbhzlefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btU
ZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXemOR/qnuOf0GZvBeyqdn6/axag67XH/JJU
LysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9vwGYT7JZVEc+NHt4bVaT
LnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
-----END CERTIFICATE-----

# Issuer: O=Trustis Limited OU=Trustis FPS Root CA
# Subject: O=Trustis Limited OU=Trustis FPS Root CA
# Label: "Trustis FPS Root CA"
# Serial: 36053640375399034304724988975563710553
# MD5 Fingerprint: 30:c9:e7:1e:6b:e6:14:eb:65:b2:16:69:20:31:67:4d
# SHA1 Fingerprint: 3b:c0:38:0b:33:c3:f6:a6:0c:86:15:22:93:d9:df:f5:4b:81:c0:04
# SHA256 Fingerprint: c1:b4:82:99:ab:a5:20:8f:e9:63:0a:ce:55:ca:68:a0:3e:da:5a:51:9c:88:02:a0:d3:a6:73:be:8f:8e:55:7d
-----BEGIN CERTIFICATE-----
MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBF
MQswCQYDVQQGEwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQL
ExNUcnVzdGlzIEZQUyBSb290IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTEx
MzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNVBAoTD1RydXN0aXMgTGltaXRlZDEc
MBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQRUN+
AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihH
iTHcDnlkH5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjj
vSkCqPoc4Vu5g6hBSLwacY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA
0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zto3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlB
OrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEAAaNTMFEwDwYDVR0TAQH/
BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAdBgNVHQ4E
FgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01
GX2cGE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmW
zaD+vkAMXBJV+JOCyinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP4
1BIy+Q7DsdwyhEQsb8tGD+pmQQ9P8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZE
f1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHVl/9D7S3B2l0pKoU/rGXuhg8F
jZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYliB6XzCGcKQEN
ZetX2fNXlrtIzYE=
-----END CERTIFICATE-----

# Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
# Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
# Label: "StartCom Certification Authority"
# Serial: 45
# MD5 Fingerprint: c9:3b:0d:84:41:fc:a4:76:79:23:08:57:de:10:19:16
# SHA1 Fingerprint: a3:f1:33:3f:e2:42:bf:cf:c5:d1:4e:8f:39:42:98:40:68:10:d1:a0
# SHA256 Fingerprint: e1:78:90:ee:09:a3:fb:f4:f4:8b:9c:41:4a:17:d6:37:b7:a5:06:47:e9:bc:75:23:22:72:7f:cc:17:42:a9:11
-----BEGIN CERTIFICATE-----
MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEW
MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM3WhcNMzYwOTE3MTk0NjM2WjB9
MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w
+2OqqGwaVLRcJXrJosmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+
Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3
Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVcUjyJthkqcwEKDwOzEmDyei+B
26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT37uMdBNSSwID
AQABo4ICEDCCAgwwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD
VR0OBBYEFE4L7xqkQFulF2mHMMo0aEPQQa7yMB8GA1UdIwQYMBaAFE4L7xqkQFul
F2mHMMo0aEPQQa7yMIIBWgYDVR0gBIIBUTCCAU0wggFJBgsrBgEEAYG1NwEBATCC
ATgwLgYIKwYBBQUHAgEWImh0dHA6Ly93d3cuc3RhcnRzc2wuY29tL3BvbGljeS5w
ZGYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cuc3RhcnRzc2wuY29tL2ludGVybWVk
aWF0ZS5wZGYwgc8GCCsGAQUFBwICMIHCMCcWIFN0YXJ0IENvbW1lcmNpYWwgKFN0
YXJ0Q29tKSBMdGQuMAMCAQEagZZMaW1pdGVkIExpYWJpbGl0eSwgcmVhZCB0aGUg
c2VjdGlvbiAqTGVnYWwgTGltaXRhdGlvbnMqIG9mIHRoZSBTdGFydENvbSBDZXJ0
aWZpY2F0aW9uIEF1dGhvcml0eSBQb2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93
d3cuc3RhcnRzc2wuY29tL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgG
CWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5fPGFf59Jb2vKXfuM/gTF
wWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWmN3PH/UvS
Ta0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst
0OcNOrg+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNc
pRJvkrKTlMeIFw6Ttn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKl
CcWw0bdT82AUuoVpaiF8H3VhFyAXe2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVF
P0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA2MFrLH9ZXF2RsXAiV+uKa0hK
1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBsHvUwyKMQ5bLm
KhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE
JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ
8dCAWZvLMdibD4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnm
fyWl8kgAwKQB2j8=
-----END CERTIFICATE-----

# Issuer: CN=StartCom Certification Authority G2 O=StartCom Ltd.
# Subject: CN=StartCom Certification Authority G2 O=StartCom Ltd.
# Label: "StartCom Certification Authority G2"
# Serial: 59
# MD5 Fingerprint: 78:4b:fb:9e:64:82:0a:d3:b8:4c:62:f3:64:f2:90:64
# SHA1 Fingerprint: 31:f1:fd:68:22:63:20:ee:c6:3b:3f:9d:ea:4a:3e:53:7c:7c:39:17
# SHA256 Fingerprint: c7:ba:65:67:de:93:a7:98:ae:1f:aa:79:1e:71:2d:37:8f:ae:1f:93:c4:39:7f:ea:44:1b:b7:cb:e6:fd:59:95
-----BEGIN CERTIFICATE-----
MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEW
MBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlm
aWNhdGlvbiBBdXRob3JpdHkgRzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1
OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoG
A1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRzIwggIiMA0G
CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8Oo1XJ
JZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsD
vfOpL9HG4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnoo
D/Uefyf3lLE3PbfHkffiAez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/
Q0kGi4xDuFby2X8hQxfqp0iVAXV16iulQ5XqFYSdCI0mblWbq9zSOdIxHWDirMxW
RST1HFSr7obdljKF+ExP6JV2tgXdNiNnvP8V4so75qbsO+wmETRIjfaAKxojAuuK
HDp2KntWFhxyKrOq42ClAJ8Em+JvHhRYW6Vsi1g8w7pOOlz34ZYrPu8HvKTlXcxN
nw3h3Kq74W4a7I/htkxNeXJdFzULHdfBR9qWJODQcqhaX2YtENwvKhOuJv4KHBnM
0D4LnMgJLvlblnpHnOl68wVQdJVznjAJ85eCXuaPOQgeWeU1FEIT/wCc976qUM/i
UUjXuG+v+E5+M5iSFGI6dWPPe/regjupuznixL0sAA7IF6wT700ljtizkC+p2il9
Ha90OrInwMEePnWjFqmveiJdnxMaz6eg6+OGCtP95paV1yPIN93EfKo2rJgaErHg
TuixO/XWb/Ew1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
AwIBBjAdBgNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJKoZIhvcNAQEL
BQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K
2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfX
UfEpY9Z1zRbkJ4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl
6/2o1PXWT6RbdejF0mCy2wl+JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK
9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG/+gyRr61M3Z3qAFdlsHB1b6uJcDJ
HgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTcnIhT76IxW1hPkWLI
wpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/XldblhY
XzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5l
IxKVCCIcl85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoo
hdVddLHRDiBYmxOlsGOm7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulr
so8uBtjRkcfGEvRM/TAXw8HaOFvjqermobp573PYtlNXLfbQ4ddI
-----END CERTIFICATE-----

# Issuer: CN=Buypass Class 2 Root CA O=Buypass AS-983163327
# Subject: CN=Buypass Class 2 Root CA O=Buypass AS-983163327
# Label: "Buypass Class 2 Root CA"
# Serial: 2
# MD5 Fingerprint: 46:a7:d2:fe:45:fb:64:5a:a8:59:90:9b:78:44:9b:29
# SHA1 Fingerprint: 49:0a:75:74:de:87:0a:47:fe:58:ee:f6:c7:6b:eb:c6:0b:12:40:99
# SHA256 Fingerprint: 9a:11:40:25:19:7c:5b:b9:5d:94:e6:3d:55:cd:43:79:08:47:b6:46:b2:3c:df:11:ad:a4:a0:0e:ff:15:fb:48
-----BEGIN CERTIFICATE-----
MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd
MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg
Q2xhc3MgMiBSb290IENBMB4XDTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1ow
TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw
HgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB
BQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1g1Lr
6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPV
L4O2fuPn9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC91
1K2GScuVr1QGbNgGE41b/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHx
MlAQTn/0hpPshNOOvEu/XAFOBz3cFIqUCqTqc/sLUegTBxj6DvEr0VQVfTzh97QZ
QmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeffawrbD02TTqigzXsu8lkB
arcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgIzRFo1clr
Us3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLi
FRhnBkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRS
P/TizPJhk9H9Z2vXUq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN
9SG9dKpN6nIDSdvHXx1iY8f93ZHsM+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxP
AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMmAd+BikoL1Rpzz
uvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAU18h
9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3t
OluwlN5E40EIosHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo
+fsicdl9sz1Gv7SEr5AcD48Saq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7
KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYdDnkM/crqJIByw5c/8nerQyIKx+u2
DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWDLfJ6v9r9jv6ly0Us
H8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0oyLQ
I+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK7
5t98biGCwWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h
3PFaTWwyI0PurKju7koSCTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPz
Y11aWOIv4x3kqdbQCtCev9eBCfHJxyYNrJgWVqA=
-----END CERTIFICATE-----

# Issuer: CN=Buypass Class 3 Root CA O=Buypass AS-983163327
# Subject: CN=Buypass Class 3 Root CA O=Buypass AS-983163327
# Label: "Buypass Class 3 Root CA"
# Serial: 2
# MD5 Fingerprint: 3d:3b:18:9e:2c:64:5a:e8:d5:88:ce:0e:f9:37:c2:ec
# SHA1 Fingerprint: da:fa:f7:fa:66:84:ec:06:8f:14:50:bd:c7:c2:81:a5:bc:a9:64:57
# SHA256 Fingerprint: ed:f7:eb:bc:a2:7a:2a:38:4d:38:7b:7d:40:10:c6:66:e2:ed:b4:84:3e:4c:29:b4:ae:1d:5b:93:32:e6:b2:4d
-----BEGIN CERTIFICATE-----
MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd
MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg
Q2xhc3MgMyBSb290IENBMB4XDTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFow
TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw
HgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB
BQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRHsJ8Y
ZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3E
N3coTRiR5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9
tznDDgFHmV0ST9tD+leh7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX
0DJq1l1sDPGzbjniazEuOQAnFN44wOwZZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c
/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH2xc519woe2v1n/MuwU8X
KhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV/afmiSTY
zIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvS
O1UQRwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D
34xFMFbG02SrZvPAXpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgP
K9Dx2hzLabjKSWJtyNBjYt1gD1iqj6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3
AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEe4zf/lb+74suwv
Tg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAACAj
QTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV
cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXS
IGrs/CIBKM+GuIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2
HJLw5QY33KbmkJs4j1xrG0aGQ0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsa
O5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8ZORK15FTAaggiG6cX0S5y2CBNOxv
033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2KSb12tjE8nVhz36u
dmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz6MkE
kbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg41
3OEMXbugUZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvD
u79leNKGef9JOxqDDPDeeOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq
4/g7u9xN12TyUb7mqqta6THuBrxzvxNiCp/HuZc=
-----END CERTIFICATE-----

# Issuer: CN=T-TeleSec GlobalRoot Class 3 O=T-Systems Enterprise Services GmbH OU=T-Systems Trust Center
# Subject: CN=T-TeleSec GlobalRoot Class 3 O=T-Systems Enterprise Services GmbH OU=T-Systems Trust Center
# Label: "T-TeleSec GlobalRoot Class 3"
# Serial: 1
# MD5 Fingerprint: ca:fb:40:a8:4e:39:92:8a:1d:fe:8e:2f:c4:27:ea:ef
# SHA1 Fingerprint: 55:a6:72:3e:cb:f2:ec:cd:c3:23:74:70:19:9d:2a:be:11:e3:81:d1
# SHA256 Fingerprint: fd:73:da:d3:1c:64:4f:f1:b4:3b:ef:0c:cd:da:96:71:0b:9c:d9:87:5e:ca:7e:31:70:7a:f3:e9:6d:52:2b:bd
-----BEGIN CERTIFICATE-----
MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUx
KzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAd
BgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNl
YyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgxMDAxMTAyOTU2WhcNMzMxMDAxMjM1
OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnBy
aXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50
ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN
8ELg63iIVl6bmlQdTQyK9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/
RLyTPWGrTs0NvvAgJ1gORH8EGoel15YUNpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4
hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZFiP0Zf3WHHx+xGwpzJFu5
ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W0eDrXltM
EnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGj
QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1
A/d2O2GCahKqGFPrAyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOy
WL6ukK2YJ5f+AbGwUgC4TeQbIXQbfsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ
1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzTucpH9sry9uetuUg/vBa3wW30
6gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7hP0HHRwA11fXT
91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4p
TpPDpFQUWw==
-----END CERTIFICATE-----

# Issuer: CN=EE Certification Centre Root CA O=AS Sertifitseerimiskeskus
# Subject: CN=EE Certification Centre Root CA O=AS Sertifitseerimiskeskus
# Label: "EE Certification Centre Root CA"
# Serial: 112324828676200291871926431888494945866
# MD5 Fingerprint: 43:5e:88:d4:7d:1a:4a:7e:fd:84:2e:52:eb:01:d4:6f
# SHA1 Fingerprint: c9:a8:b9:e7:55:80:5e:58:e3:53:77:a7:25:eb:af:c3:7b:27:cc:d7
# SHA256 Fingerprint: 3e:84:ba:43:42:90:85:16:e7:75:73:c0:99:2f:09:79:ca:08:4e:46:85:68:1f:f1:95:cc:ba:8a:22:9b:8a:76
-----BEGIN CERTIFICATE-----
MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1
MQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1
czEoMCYGA1UEAwwfRUUgQ2VydGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYG
CSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIwMTAxMDMwMTAxMDMwWhgPMjAzMDEy
MTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlBUyBTZXJ0aWZpdHNl
ZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRyZSBS
b290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUy
euuOF0+W2Ap7kaJjbMeMTC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvO
bntl8jixwKIy72KyaOBhU8E2lf/slLo2rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIw
WFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw93X2PaRka9ZP585ArQ/d
MtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtNP2MbRMNE
1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYD
VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/
zQas8fElyalL1BSZMEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYB
BQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEF
BQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+RjxY6hUFaTlrg4wCQiZrxTFGGV
v9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqMlIpPnTX/dqQG
E5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u
uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIW
iAYLtqZLICjU3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/v
GVCJYMzpJJUPwssd8m92kMfMdcGWxZ0=
-----END CERTIFICATE-----

# Issuer: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş. (c) Aralık 2007
# Subject: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş. (c) Aralık 2007
# Label: "TURKTRUST Certificate Services Provider Root 2007"
# Serial: 1
# MD5 Fingerprint: 2b:70:20:56:86:82:a0:18:c8:07:53:12:28:70:21:72
# SHA1 Fingerprint: f1:7f:6f:b6:31:dc:99:e3:a3:c8:7f:fe:1c:f1:81:10:88:d9:60:33
# SHA256 Fingerprint: 97:8c:d9:66:f2:fa:a0:7b:a7:aa:95:00:d9:c0:2e:9d:77:f2:cd:ad:a6:ad:6b:a7:4a:f4:b9:1c:66:59:3c:50
-----BEGIN CERTIFICATE-----
MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOc
UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
c8SxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xS
S1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kg
SGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4XDTA3MTIyNTE4Mzcx
OVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxla3Ry
b25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMC
VFIxDzANBgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDE
sGxldGnFn2ltIHZlIEJpbGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7F
ni4gKGMpIEFyYWzEsWsgMjAwNzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9NYvDdE3ePYakqtdTyuTFY
KTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQvKUmi8wUG
+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveG
HtyaKhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6P
IzdezKKqdfcYbwnTrqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M
733WB2+Y8a+xwXrXgTW4qhe04MsCAwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHk
Yb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0G
CSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/sPx+EnWVUXKgW
AkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I
aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5
mxRZNTZPz/OOXl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsa
XRik7r4EW5nVcV9VZWRi1aKbBFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZ
qxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAKpoRq0Tl9
-----END CERTIFICATE-----

# Issuer: CN=D-TRUST Root Class 3 CA 2 2009 O=D-Trust GmbH
# Subject: CN=D-TRUST Root Class 3 CA 2 2009 O=D-Trust GmbH
# Label: "D-TRUST Root Class 3 CA 2 2009"
# Serial: 623603
# MD5 Fingerprint: cd:e0:25:69:8d:47:ac:9c:89:35:90:f7:fd:51:3d:2f
# SHA1 Fingerprint: 58:e8:ab:b0:36:15:33:fb:80:f7:9b:1b:6d:29:d3:ff:8d:5f:00:f0
# SHA256 Fingerprint: 49:e7:a4:42:ac:f0:ea:62:87:05:00:54:b5:25:64:b6:50:e4:f4:9e:42:e3:48:d6:aa:38:e0:39:e9:57:b1:c1
-----BEGIN CERTIFICATE-----
MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRF
MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBD
bGFzcyAzIENBIDIgMjAwOTAeFw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NTha
ME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMM
HkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOADER03
UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42
tSHKXzlABF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9R
ySPocq60vFYJfxLLHLGvKZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsM
lFqVlNpQmvH/pStmMaTJOKDfHR+4CS7zp+hnUquVH+BGPtikw8paxTGA6Eian5Rp
/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUCAwEAAaOCARowggEWMA8G
A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ4PGEMA4G
A1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVj
dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUy
MENBJTIwMiUyMDIwMDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRl
cmV2b2NhdGlvbmxpc3QwQ6BBoD+GPWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3Js
L2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAwOS5jcmwwDQYJKoZIhvcNAQEL
BQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm2H6NMLVwMeni
acfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4K
zCUqNQT4YJEVdT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8
PIWmawomDeCTmGCufsYkl4phX5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3Y
Johw1+qRzT65ysCQblrGXnRl11z+o+I=
-----END CERTIFICATE-----

# Issuer: CN=D-TRUST Root Class 3 CA 2 EV 2009 O=D-Trust GmbH
# Subject: CN=D-TRUST Root Class 3 CA 2 EV 2009 O=D-Trust GmbH
# Label: "D-TRUST Root Class 3 CA 2 EV 2009"
# Serial: 623604
# MD5 Fingerprint: aa:c6:43:2c:5e:2d:cd:c4:34:c0:50:4f:11:02:4f:b6
# SHA1 Fingerprint: 96:c9:1b:0b:95:b4:10:98:42:fa:d0:d8:22:79:fe:60:fa:b9:16:83
# SHA256 Fingerprint: ee:c5:49:6b:98:8c:e9:86:25:b9:34:09:2e:ec:29:08:be:d0:b0:f3:16:c2:d4:73:0c:84:ea:f1:f3:d3:48:81
-----BEGIN CERTIFICATE-----
MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRF
MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBD
bGFzcyAzIENBIDIgRVYgMjAwOTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUw
NDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNV
BAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAwOTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfSegpn
ljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM0
3TP1YtHhzRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6Z
qQTMFexgaDbtCHu39b+T7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lR
p75mpoo6Kr3HGrHhFPC+Oh25z1uxav60sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8
HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure3511H3a6UCAwEAAaOCASQw
ggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyvcop9Ntea
HNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFw
Oi8vZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xh
c3MlMjAzJTIwQ0ElMjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1E
RT9jZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0MEagRKBChkBodHRwOi8vd3d3LmQt
dHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xhc3NfM19jYV8yX2V2XzIwMDku
Y3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+PPoeUSbrh/Yp
3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05
nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNF
CSuGdXzfX2lXANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7na
xpeG0ILD5EJt/rDiZE4OJudANCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqX
KVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVvw9y4AyHqnxbxLFS1
-----END CERTIFICATE-----

# Issuer: CN=Autoridad de Certificacion Raiz del Estado Venezolano O=Sistema Nacional de Certificacion Electronica OU=Superintendencia de Servicios de Certificacion Electronica
# Subject: CN=PSCProcert O=Sistema Nacional de Certificacion Electronica OU=Proveedor de Certificados PROCERT
# Label: "PSCProcert"
# Serial: 11
# MD5 Fingerprint: e6:24:e9:12:01:ae:0c:de:8e:85:c4:ce:a3:12:dd:ec
# SHA1 Fingerprint: 70:c1:8d:74:b4:28:81:0a:e4:fd:a5:75:d7:01:9f:99:b0:3d:50:74
# SHA256 Fingerprint: 3c:fc:3c:14:d1:f6:84:ff:17:e3:8c:43:ca:44:0c:00:b9:67:ec:93:3e:8b:fe:06:4c:a1:d7:2c:90:f2:ad:b0
-----BEGIN CERTIFICATE-----
MIIJhjCCB26gAwIBAgIBCzANBgkqhkiG9w0BAQsFADCCAR4xPjA8BgNVBAMTNUF1
dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIFJhaXogZGVsIEVzdGFkbyBWZW5lem9s
YW5vMQswCQYDVQQGEwJWRTEQMA4GA1UEBxMHQ2FyYWNhczEZMBcGA1UECBMQRGlz
dHJpdG8gQ2FwaXRhbDE2MDQGA1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0
aWZpY2FjaW9uIEVsZWN0cm9uaWNhMUMwQQYDVQQLEzpTdXBlcmludGVuZGVuY2lh
IGRlIFNlcnZpY2lvcyBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMSUwIwYJ
KoZIhvcNAQkBFhZhY3JhaXpAc3VzY2VydGUuZ29iLnZlMB4XDTEwMTIyODE2NTEw
MFoXDTIwMTIyNTIzNTk1OVowgdExJjAkBgkqhkiG9w0BCQEWF2NvbnRhY3RvQHBy
b2NlcnQubmV0LnZlMQ8wDQYDVQQHEwZDaGFjYW8xEDAOBgNVBAgTB01pcmFuZGEx
KjAoBgNVBAsTIVByb3ZlZWRvciBkZSBDZXJ0aWZpY2Fkb3MgUFJPQ0VSVDE2MDQG
A1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9u
aWNhMQswCQYDVQQGEwJWRTETMBEGA1UEAxMKUFNDUHJvY2VydDCCAiIwDQYJKoZI
hvcNAQEBBQADggIPADCCAgoCggIBANW39KOUM6FGqVVhSQ2oh3NekS1wwQYalNo9
7BVCwfWMrmoX8Yqt/ICV6oNEolt6Vc5Pp6XVurgfoCfAUFM+jbnADrgV3NZs+J74
BCXfgI8Qhd19L3uA3VcAZCP4bsm+lU/hdezgfl6VzbHvvnpC2Mks0+saGiKLt38G
ieU89RLAu9MLmV+QfI4tL3czkkohRqipCKzx9hEC2ZUWno0vluYC3XXCFCpa1sl9
JcLB/KpnheLsvtF8PPqv1W7/U0HU9TI4seJfxPmOEO8GqQKJ/+MMbpfg353bIdD0
PghpbNjU5Db4g7ayNo+c7zo3Fn2/omnXO1ty0K+qP1xmk6wKImG20qCZyFSTXai2
0b1dCl53lKItwIKOvMoDKjSuc/HUtQy9vmebVOvh+qBa7Dh+PsHMosdEMXXqP+UH
0quhJZb25uSgXTcYOWEAM11G1ADEtMo88aKjPvM6/2kwLkDd9p+cJsmWN63nOaK/
6mnbVSKVUyqUtd+tFjiBdWbjxywbk5yqjKPK2Ww8F22c3HxT4CAnQzb5EuE8XL1m
v6JpIzi4mWCZDlZTOpx+FIywBm/xhnaQr/2v/pDGj59/i5IjnOcVdo/Vi5QTcmn7
K2FjiO/mpF7moxdqWEfLcU8UC17IAggmosvpr2uKGcfLFFb14dq12fy/czja+eev
bqQ34gcnAgMBAAGjggMXMIIDEzASBgNVHRMBAf8ECDAGAQH/AgEBMDcGA1UdEgQw
MC6CD3N1c2NlcnRlLmdvYi52ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAzNi0w
MB0GA1UdDgQWBBRBDxk4qpl/Qguk1yeYVKIXTC1RVDCCAVAGA1UdIwSCAUcwggFD
gBStuyIdxuDSAaj9dlBSk+2YwU2u06GCASakggEiMIIBHjE+MDwGA1UEAxM1QXV0
b3JpZGFkIGRlIENlcnRpZmljYWNpb24gUmFpeiBkZWwgRXN0YWRvIFZlbmV6b2xh
bm8xCzAJBgNVBAYTAlZFMRAwDgYDVQQHEwdDYXJhY2FzMRkwFwYDVQQIExBEaXN0
cml0byBDYXBpdGFsMTYwNAYDVQQKEy1TaXN0ZW1hIE5hY2lvbmFsIGRlIENlcnRp
ZmljYWNpb24gRWxlY3Ryb25pY2ExQzBBBgNVBAsTOlN1cGVyaW50ZW5kZW5jaWEg
ZGUgU2VydmljaW9zIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExJTAjBgkq
hkiG9w0BCQEWFmFjcmFpekBzdXNjZXJ0ZS5nb2IudmWCAQowDgYDVR0PAQH/BAQD
AgEGME0GA1UdEQRGMESCDnByb2NlcnQubmV0LnZloBUGBWCGXgIBoAwMClBTQy0w
MDAwMDKgGwYFYIZeAgKgEgwQUklGLUotMzE2MzUzNzMtNzB2BgNVHR8EbzBtMEag
RKBChkBodHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9sY3IvQ0VSVElGSUNBRE8t
UkFJWi1TSEEzODRDUkxERVIuY3JsMCOgIaAfhh1sZGFwOi8vYWNyYWl6LnN1c2Nl
cnRlLmdvYi52ZTA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9v
Y3NwLnN1c2NlcnRlLmdvYi52ZTBBBgNVHSAEOjA4MDYGBmCGXgMBAjAsMCoGCCsG
AQUFBwIBFh5odHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9kcGMwDQYJKoZIhvcN
AQELBQADggIBACtZ6yKZu4SqT96QxtGGcSOeSwORR3C7wJJg7ODU523G0+1ng3dS
1fLld6c2suNUvtm7CpsR72H0xpkzmfWvADmNg7+mvTV+LFwxNG9s2/NkAZiqlCxB
3RWGymspThbASfzXg0gTB1GEMVKIu4YXx2sviiCtxQuPcD4quxtxj7mkoP3Yldmv
Wb8lK5jpY5MvYB7Eqvh39YtsL+1+LrVPQA3uvFd359m21D+VJzog1eWuq2w1n8Gh
HVnchIHuTQfiSLaeS5UtQbHh6N5+LwUeaO6/u5BlOsju6rEYNxxik6SgMexxbJHm
pHmJWhSnFFAFTKQAVzAswbVhltw+HoSvOULP5dAssSS830DD7X9jSr3hTxJkhpXz
sOfIt+FTvZLm8wyWuevo5pLtp4EJFAv8lXrPj9Y0TzYS3F7RNHXGRoAvlQSMx4bE
qCaJqD8Zm4G7UaRKhqsLEQ+xrmNTbSjq3TNWOByyrYDT13K9mmyZY+gAu0F2Bbdb
mRiKw7gSXFbPVgx96OLP7bx0R/vu0xdOIk9W/1DzLuY5poLWccret9W6aAjtmcz9
opLLabid+Qqkpj5PkygqYWwHJgD/ll9ohri4zspV4KuxPX+Y1zMOWj3YeMLEYC/H
YvBhkdI4sPaeVdtAgAUSM84dkpvRabP/v/GSCmE1P93+hvS84Bpxs2Km
-----END CERTIFICATE-----

# Issuer: CN=China Internet Network Information Center EV Certificates Root O=China Internet Network Information Center
# Subject: CN=China Internet Network Information Center EV Certificates Root O=China Internet Network Information Center
# Label: "China Internet Network Information Center EV Certificates Root"
# Serial: 1218379777
# MD5 Fingerprint: 55:5d:63:00:97:bd:6a:97:f5:67:ab:4b:fb:6e:63:15
# SHA1 Fingerprint: 4f:99:aa:93:fb:2b:d1:37:26:a1:99:4a:ce:7f:f0:05:f2:93:5d:1e
# SHA256 Fingerprint: 1c:01:c6:f4:db:b2:fe:fc:22:55:8b:2b:ca:32:56:3f:49:84:4a:cf:c3:2b:7b:e4:b0:ff:59:9f:9e:8c:7a:f7
-----BEGIN CERTIFICATE-----
MIID9zCCAt+gAwIBAgIESJ8AATANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC
Q04xMjAwBgNVBAoMKUNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24g
Q2VudGVyMUcwRQYDVQQDDD5DaGluYSBJbnRlcm5ldCBOZXR3b3JrIEluZm9ybWF0
aW9uIENlbnRlciBFViBDZXJ0aWZpY2F0ZXMgUm9vdDAeFw0xMDA4MzEwNzExMjVa
Fw0zMDA4MzEwNzExMjVaMIGKMQswCQYDVQQGEwJDTjEyMDAGA1UECgwpQ2hpbmEg
SW50ZXJuZXQgTmV0d29yayBJbmZvcm1hdGlvbiBDZW50ZXIxRzBFBgNVBAMMPkNo
aW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyIEVWIENlcnRp
ZmljYXRlcyBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm35z
7r07eKpkQ0H1UN+U8i6yjUqORlTSIRLIOTJCBumD1Z9S7eVnAztUwYyZmczpwA//
DdmEEbK40ctb3B75aDFk4Zv6dOtouSCV98YPjUesWgbdYavi7NifFy2cyjw1l1Vx
zUOFsUcW9SxTgHbP0wBkvUCZ3czY28Sf1hNfQYOL+Q2HklY0bBoQCxfVWhyXWIQ8
hBouXJE0bhlffxdpxWXvayHG1VA6v2G5BY3vbzQ6sm8UY78WO5upKv23KzhmBsUs
4qpnHkWnjQRmQvaPK++IIGmPMowUc9orhpFjIpryp9vOiYurXccUwVswah+xt54u
gQEC7c+WXmPbqOY4twIDAQABo2MwYTAfBgNVHSMEGDAWgBR8cks5x8DbYqVPm6oY
NJKiyoOCWTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4E
FgQUfHJLOcfA22KlT5uqGDSSosqDglkwDQYJKoZIhvcNAQEFBQADggEBACrDx0M3
j92tpLIM7twUbY8opJhJywyA6vPtI2Z1fcXTIWd50XPFtQO3WKwMVC/GVhMPMdoG
52U7HW8228gd+f2ABsqjPWYWqJ1MFn3AlUa1UeTiH9fqBk1jjZaM7+czV0I664zB
echNdn3e9rG3geCg+aF4RhcaVpjwTj2rHO3sOdwHSPdj/gauwqRcalsyiMXHM4Ws
ZkJHwlgkmeHlPuV1LI5D1l08eB6olYIpUNHRFrrvwb562bTYzB5MRuF3sTGrvSrI
zo9uoV1/A3U05K2JRVRevq4opbs/eHnrc7MKDf2+yfdWrPa37S+bISnHOLaVxATy
wy39FCqQmbkHzJ8=
-----END CERTIFICATE-----

# Issuer: CN=Swisscom Root CA 2 O=Swisscom OU=Digital Certificate Services
# Subject: CN=Swisscom Root CA 2 O=Swisscom OU=Digital Certificate Services
# Label: "Swisscom Root CA 2"
# Serial: 40698052477090394928831521023204026294
# MD5 Fingerprint: 5b:04:69:ec:a5:83:94:63:18:a7:86:d0:e4:f2:6e:19
# SHA1 Fingerprint: 77:47:4f:c6:30:e4:0f:4c:47:64:3f:84:ba:b8:c6:95:4a:8a:41:ec
# SHA256 Fingerprint: f0:9b:12:2c:71:14:f4:a0:9b:d4:ea:4f:4a:99:d5:58:b4:6e:4c:25:cd:81:14:0d:29:c0:56:13:91:4c:38:41
-----BEGIN CERTIFICATE-----
MIIF2TCCA8GgAwIBAgIQHp4o6Ejy5e/DfEoeWhhntjANBgkqhkiG9w0BAQsFADBk
MQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0
YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3Qg
Q0EgMjAeFw0xMTA2MjQwODM4MTRaFw0zMTA2MjUwNzM4MTRaMGQxCzAJBgNVBAYT
AmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGlnaXRhbCBDZXJ0aWZp
Y2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAyMIICIjAN
BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlUJOhJ1R5tMJ6HJaI2nbeHCOFvEr
jw0DzpPMLgAIe6szjPTpQOYXTKueuEcUMncy3SgM3hhLX3af+Dk7/E6J2HzFZ++r
0rk0X2s682Q2zsKwzxNoysjL67XiPS4h3+os1OD5cJZM/2pYmLcX5BtS5X4HAB1f
2uY+lQS3aYg5oUFgJWFLlTloYhyxCwWJwDaCFCE/rtuh/bxvHGCGtlOUSbkrRsVP
ACu/obvLP+DHVxxX6NZp+MEkUp2IVd3Chy50I9AU/SpHWrumnf2U5NGKpV+GY3aF
y6//SSj8gO1MedK75MDvAe5QQQg1I3ArqRa0jG6F6bYRzzHdUyYb3y1aSgJA/MTA
tukxGggo5WDDH8SQjhBiYEQN7Aq+VRhxLKX0srwVYv8c474d2h5Xszx+zYIdkeNL
6yxSNLCK/RJOlrDrcH+eOfdmQrGrrFLadkBXeyq96G4DsguAhYidDMfCd7Camlf0
uPoTXGiTOmekl9AbmbeGMktg2M7v0Ax/lZ9vh0+Hio5fCHyqW/xavqGRn1V9TrAL
acywlKinh/LTSlDcX3KwFnUey7QYYpqwpzmqm59m2I2mbJYV4+by+PGDYmy7Velh
k6M99bFXi08jsJvllGov34zflVEpYKELKeRcVVi3qPyZ7iVNTA6z00yPhOgpD/0Q
VAKFyPnlw4vP5w8CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0hBBYw
FDASBgdghXQBUwIBBgdghXQBUwIBMBIGA1UdEwEB/wQIMAYBAf8CAQcwHQYDVR0O
BBYEFE0mICKJS9PVpAqhb97iEoHF8TwuMB8GA1UdIwQYMBaAFE0mICKJS9PVpAqh
b97iEoHF8TwuMA0GCSqGSIb3DQEBCwUAA4ICAQAyCrKkG8t9voJXiblqf/P0wS4R
fbgZPnm3qKhyN2abGu2sEzsOv2LwnN+ee6FTSA5BesogpxcbtnjsQJHzQq0Qw1zv
/2BZf82Fo4s9SBwlAjxnffUy6S8w5X2lejjQ82YqZh6NM4OKb3xuqFp1mrjX2lhI
REeoTPpMSQpKwhI3qEAMw8jh0FcNlzKVxzqfl9NX+Ave5XLzo9v/tdhZsnPdTSpx
srpJ9csc1fV5yJmz/MFMdOO0vSk3FQQoHt5FRnDsr7p4DooqzgB53MBfGWcsa0vv
aGgLQ+OswWIJ76bdZWGgr4RVSJFSHMYlkSrQwSIjYVmvRRGFHQEkNI/Ps/8XciAT
woCqISxxOQ7Qj1zB09GOInJGTB2Wrk9xseEFKZZZ9LuedT3PDTcNYtsmjGOpI99n
Bjx8Oto0QuFmtEYE3saWmA9LSHokMnWRn6z3aOkquVVlzl1h0ydw2Df+n7mvoC5W
t6NlUe07qxS/TFED6F+KBZvuim6c779o+sjaC+NCydAXFJy3SuCvkychVSa1ZC+N
8f+mQAWFBVzKBxlcCxMoTFh/wqXvRdpg065lYZ1Tg3TCrvJcwhbtkj6EPnNgiLx2
9CzP0H1907he0ZESEOnN3col49XtmS++dYFLJPlFRpTJKSFTnCZFqhMX5OfNeOI5
wSsSnqaeG8XmDtkx2Q==
-----END CERTIFICATE-----

# Issuer: CN=Swisscom Root EV CA 2 O=Swisscom OU=Digital Certificate Services
# Subject: CN=Swisscom Root EV CA 2 O=Swisscom OU=Digital Certificate Services
# Label: "Swisscom Root EV CA 2"
# Serial: 322973295377129385374608406479535262296
# MD5 Fingerprint: 7b:30:34:9f:dd:0a:4b:6b:35:ca:31:51:28:5d:ae:ec
# SHA1 Fingerprint: e7:a1:90:29:d3:d5:52:dc:0d:0f:c6:92:d3:ea:88:0d:15:2e:1a:6b
# SHA256 Fingerprint: d9:5f:ea:3c:a4:ee:dc:e7:4c:d7:6e:75:fc:6d:1f:f6:2c:44:1f:0f:a8:bc:77:f0:34:b1:9e:5d:b2:58:01:5d
-----BEGIN CERTIFICATE-----
MIIF4DCCA8igAwIBAgIRAPL6ZOJ0Y9ON/RAdBB92ylgwDQYJKoZIhvcNAQELBQAw
ZzELMAkGA1UEBhMCY2gxETAPBgNVBAoTCFN3aXNzY29tMSUwIwYDVQQLExxEaWdp
dGFsIENlcnRpZmljYXRlIFNlcnZpY2VzMR4wHAYDVQQDExVTd2lzc2NvbSBSb290
IEVWIENBIDIwHhcNMTEwNjI0MDk0NTA4WhcNMzEwNjI1MDg0NTA4WjBnMQswCQYD
VQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2Vy
dGlmaWNhdGUgU2VydmljZXMxHjAcBgNVBAMTFVN3aXNzY29tIFJvb3QgRVYgQ0Eg
MjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMT3HS9X6lds93BdY7Bx
UglgRCgzo3pOCvrY6myLURYaVa5UJsTMRQdBTxB5f3HSek4/OE6zAMaVylvNwSqD
1ycfMQ4jFrclyxy0uYAyXhqdk/HoPGAsp15XGVhRXrwsVgu42O+LgrQ8uMIkqBPH
oCE2G3pXKSinLr9xJZDzRINpUKTk4RtiGZQJo/PDvO/0vezbE53PnUgJUmfANykR
HvvSEaeFGHR55E+FFOtSN+KxRdjMDUN/rhPSays/p8LiqG12W0OfvrSdsyaGOx9/
5fLoZigWJdBLlzin5M8J0TbDC77aO0RYjb7xnglrPvMyxyuHxuxenPaHZa0zKcQv
idm5y8kDnftslFGXEBuGCxobP/YCfnvUxVFkKJ3106yDgYjTdLRZncHrYTNaRdHL
OdAGalNgHa/2+2m8atwBz735j9m9W8E6X47aD0upm50qKGsaCnw8qyIL5XctcfaC
NYGu+HuB5ur+rPQam3Rc6I8k9l2dRsQs0h4rIWqDJ2dVSqTjyDKXZpBy2uPUZC5f
46Fq9mDU5zXNysRojddxyNMkM3OxbPlq4SjbX8Y96L5V5jcb7STZDxmPX2MYWFCB
UWVv8p9+agTnNCRxunZLWB4ZvRVgRaoMEkABnRDixzgHcgplwLa7JSnaFp6LNYth
7eVxV4O1PHGf40+/fh6Bn0GXAgMBAAGjgYYwgYMwDgYDVR0PAQH/BAQDAgGGMB0G
A1UdIQQWMBQwEgYHYIV0AVMCAgYHYIV0AVMCAjASBgNVHRMBAf8ECDAGAQH/AgED
MB0GA1UdDgQWBBRF2aWBbj2ITY1x0kbBbkUe88SAnTAfBgNVHSMEGDAWgBRF2aWB
bj2ITY1x0kbBbkUe88SAnTANBgkqhkiG9w0BAQsFAAOCAgEAlDpzBp9SSzBc1P6x
XCX5145v9Ydkn+0UjrgEjihLj6p7jjm02Vj2e6E1CqGdivdj5eu9OYLU43otb98T
PLr+flaYC/NUn81ETm484T4VvwYmneTwkLbUwp4wLh/vx3rEUMfqe9pQy3omywC0
Wqu1kx+AiYQElY2NfwmTv9SoqORjbdlk5LgpWgi/UOGED1V7XwgiG/W9mR4U9s70
WBCCswo9GcG/W6uqmdjyMb3lOGbcWAXH7WMaLgqXfIeTK7KK4/HsGOV1timH59yL
Gn602MnTihdsfSlEvoqq9X46Lmgxk7lq2prg2+kupYTNHAq4Sgj5nPFhJpiTt3tm
7JFe3VE/23MPrQRYCd0EApUKPtN236YQHoA96M2kZNEzx5LH4k5E4wnJTsJdhw4S
nr8PyQUQ3nqjsTzyP6WqJ3mtMX0f/fwZacXduT98zca0wjAefm6S139hdlqP65VN
vBFuIXxZN5nQBrz5Bm0yFqXZaajh3DyAHmBR3NdUIR7KYndP+tiPsys6DXhyyWhB
WkdKwqPrGtcKqzwyVcgKEZzfdNbwQBUdyLmPtTbFr/giuMod89a2GQ+fYWVq6nTI
fI/DT11lgh/ZDYnadXL77/FHZxOzyNEZiCcmmpl5fx7kLD977vHeTYuWl8PVP3wb
I+2ksx0WckNLIOFZfsLorSa/ovc=
-----END CERTIFICATE-----

# Issuer: CN=CA Disig Root R1 O=Disig a.s.
# Subject: CN=CA Disig Root R1 O=Disig a.s.
# Label: "CA Disig Root R1"
# Serial: 14052245610670616104
# MD5 Fingerprint: be:ec:11:93:9a:f5:69:21:bc:d7:c1:c0:67:89:cc:2a
# SHA1 Fingerprint: 8e:1c:74:f8:a6:20:b9:e5:8a:f4:61:fa:ec:2b:47:56:51:1a:52:c6
# SHA256 Fingerprint: f9:6f:23:f4:c3:e7:9c:07:7a:46:98:8d:5a:f5:90:06:76:a0:f0:39:cb:64:5d:d1:75:49:b2:16:c8:24:40:ce
-----BEGIN CERTIFICATE-----
MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNV
BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu
MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQy
MDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx
EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjEw
ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy3QRk
D2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/o
OI7bm+V8u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3A
fQ+lekLZWnDZv6fXARz2m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJe
IgpFy4QxTaz+29FHuvlglzmxZcfe+5nkCiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8n
oc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTaYVKvJrT1cU/J19IG32PK
/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6vpmumwKj
rckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD
3AjLLhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE
7cderVC6xkGbrPAXZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkC
yC2fg69naQanMVXVz0tv/wQFx1isXxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLd
qvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
DwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ04IwDQYJKoZI
hvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR
xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaA
SfX8MPWbTx9BLxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXo
HqJPYNcHKfyyo6SdbhWSVhlMCrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpB
emOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5GfbVSUZP/3oNn6z4eGBrxEWi1CXYBmC
AMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85YmLLW1AL14FABZyb
7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKSds+x
DzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvk
F7mGnjixlAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqF
a3qdnom2piiZk4hA9z7NUaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsT
Q6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJa7+h89n07eLw4+1knj0vllJPgFOL
-----END CERTIFICATE-----

# Issuer: CN=CA Disig Root R2 O=Disig a.s.
# Subject: CN=CA Disig Root R2 O=Disig a.s.
# Label: "CA Disig Root R2"
# Serial: 10572350602393338211
# MD5 Fingerprint: 26:01:fb:d8:27:a7:17:9a:45:54:38:1a:43:01:3b:03
# SHA1 Fingerprint: b5:61:eb:ea:a4:de:e4:25:4b:69:1a:98:a5:57:47:c2:34:c7:d9:71
# SHA256 Fingerprint: e2:3d:4a:03:6d:7b:70:e9:f5:95:b1:42:20:79:d2:b9:1e:df:bb:1f:b6:51:a0:63:3e:aa:8a:9d:c5:f8:07:03
-----BEGIN CERTIFICATE-----
MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV
BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu
MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQy
MDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx
EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjIw
ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbCw3Oe
NcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNH
PWSb6WiaxswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3I
x2ymrdMxp7zo5eFm1tL7A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbe
QTg06ov80egEFGEtQX6sx3dOy1FU+16SGBsEWmjGycT6txOgmLcRK7fWV8x8nhfR
yyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqVg8NTEQxzHQuyRpDRQjrO
QG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa5Beny912
H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJ
QfYEkoopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUD
i/ZnWejBBhG93c+AAk9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORs
nLMOPReisjQS1n6yqEm70XooQL6iFh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1
rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
DwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5uQu0wDQYJKoZI
hvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM
tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqf
GopTpti72TVVsRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkb
lvdhuDvEK7Z4bLQjb/D907JedR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka
+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W81k/BfDxujRNt+3vrMNDcTa/F1bal
TFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjxmHHEt38OFdAlab0i
nSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01utI3
gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18Dr
G5gPcFw0sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3Os
zMOl6W8KjptlwlCFtaOgUxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8x
L4ysEr3vQCj8KWefshNPZiTEUxnpHikV7+ZtsH8tZ/3zbBt1RqPlShfppNcL
-----END CERTIFICATE-----

# Issuer: CN=ACCVRAIZ1 O=ACCV OU=PKIACCV
# Subject: CN=ACCVRAIZ1 O=ACCV OU=PKIACCV
# Label: "ACCVRAIZ1"
# Serial: 6828503384748696800
# MD5 Fingerprint: d0:a0:5a:ee:05:b6:09:94:21:a1:7d:f1:b2:29:82:02
# SHA1 Fingerprint: 93:05:7a:88:15:c6:4f:ce:88:2f:fa:91:16:52:28:78:bc:53:64:17
# SHA256 Fingerprint: 9a:6e:c0:12:e1:a7:da:9d:be:34:19:4d:47:8a:d7:c0:db:18:22:fb:07:1d:f1:29:81:49:6e:d1:04:38:41:13
-----BEGIN CERTIFICATE-----
MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE
AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw
CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQ
BgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwHUEtJQUNDVjENMAsGA1UECgwEQUND
VjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCb
qau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gMjmoY
HtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWo
G2ioPej0RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpA
lHPrzg5XPAOBOp0KoVdDaaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhr
IA8wKFSVf+DuzgpmndFALW4ir50awQUZ0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/
0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDGWuzndN9wrqODJerWx5eH
k6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs78yM2x/47
4KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMO
m3WR5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpa
cXpkatcnYGMN285J9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPl
uUsXQA+xtrn13k/c4LOsOxFwYIRKQ26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYI
KwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRwOi8vd3d3LmFjY3YuZXMvZmls
ZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEuY3J0MB8GCCsG
AQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2
VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeT
VfZW6oHlNsyMHj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIG
CCsGAQUFBwICMIIBFB6CARAAQQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUA
cgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBhAO0AegAgAGQAZQAgAGwAYQAgAEEA
QwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUAYwBuAG8AbABvAGcA
7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBjAHQA
cgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAA
QwBQAFMAIABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUA
czAwBggrBgEFBQcCARYkaHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2Mu
aHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRt
aW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2MV9kZXIuY3JsMA4GA1Ud
DwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZIhvcNAQEF
BQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdp
D70ER9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gU
JyCpZET/LtZ1qmxNYEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+m
AM/EKXMRNt6GGT6d7hmKG9Ww7Y49nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepD
vV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJTS+xJlsndQAJxGJ3KQhfnlms
tn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3sCPdK6jT2iWH
7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h
I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szA
h1xA2syVP1XgNce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xF
d3+YJ5oyXSrjhO7FmGYvliAd3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2H
pPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3pEfbRD0tVNEYqi4Y7
-----END CERTIFICATE-----

# Issuer: CN=TWCA Global Root CA O=TAIWAN-CA OU=Root CA
# Subject: CN=TWCA Global Root CA O=TAIWAN-CA OU=Root CA
# Label: "TWCA Global Root CA"
# Serial: 3262
# MD5 Fingerprint: f9:03:7e:cf:e6:9e:3c:73:7a:2a:90:07:69:ff:2b:96
# SHA1 Fingerprint: 9c:bb:48:53:f6:a4:f6:d3:52:a4:e8:32:52:55:60:13:f5:ad:af:65
# SHA256 Fingerprint: 59:76:90:07:f7:68:5d:0f:cd:50:87:2f:9f:95:d5:75:5a:5b:2b:45:7d:81:f3:69:2b:61:0a:98:67:2f:0e:1b
-----BEGIN CERTIFICATE-----
MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcx
EjAQBgNVBAoTCVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMT
VFdDQSBHbG9iYWwgUm9vdCBDQTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5
NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQKEwlUQUlXQU4tQ0ExEDAOBgNVBAsT
B1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3QgQ0EwggIiMA0GCSqG
SIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2CnJfF
10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz
0ALfUPZVr2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfCh
MBwqoJimFb3u/Rk28OKRQ4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbH
zIh1HrtsBv+baz4X7GGqcXzGHaL3SekVtTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc
46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1WKKD+u4ZqyPpcC1jcxkt2
yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99sy2sbZCi
laLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYP
oA/pyJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQA
BDzfuBSO6N+pjWxnkjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcE
qYSjMq+u7msXi7Kx/mzhkIyIqJdIzshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm
4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6gcFGn90xHNcgL
1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn
LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WF
H6vPNOw/KP4M8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNo
RI2T9GRwoD2dKAXDOXC4Ynsg/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+
nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlglPx4mI88k1HtQJAH32RjJMtOcQWh
15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryPA9gK8kxkRr05YuWW
6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3mi4TW
nsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5j
wa19hAM8EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWz
aGHQRiapIVJpLesux+t3zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmy
KwbQBM0=
-----END CERTIFICATE-----
python3.4/site-packages/pip/_vendor/requests/packages/__pycache__/__init__.cpython-34.pyc000064400000000363151735047540025317 0ustar00�
�Re>�@s$ddlmZddlmZdS)�)�absolute_import�)�urllib3N)�
__future__r�r�rr�A/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/__init__.py�<module>spython3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py000064400000014605151735047540023015 0ustar00# urllib3/connection.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import sys
import socket
from socket import timeout as SocketTimeout

try: # Python 3
    from http.client import HTTPConnection as _HTTPConnection, HTTPException
except ImportError:
    from httplib import HTTPConnection as _HTTPConnection, HTTPException

class DummyConnection(object):
    "Used to detect a failed ConnectionCls import."
    pass

try: # Compiled with SSL?
    ssl = None
    HTTPSConnection = DummyConnection

    class BaseSSLError(BaseException):
        pass

    try: # Python 3
        from http.client import HTTPSConnection as _HTTPSConnection
    except ImportError:
        from httplib import HTTPSConnection as _HTTPSConnection

    import ssl
    BaseSSLError = ssl.SSLError

except (ImportError, AttributeError): # Platform-specific: No SSL.
    pass

from .exceptions import (
    ConnectTimeoutError,
)
from .packages.ssl_match_hostname import match_hostname
from .packages import six
from .util import (
    assert_fingerprint,
    resolve_cert_reqs,
    resolve_ssl_version,
    ssl_wrap_socket,
)


port_by_scheme = {
    'http': 80,
    'https': 443,
}


class HTTPConnection(_HTTPConnection, object):
    """
    Based on httplib.HTTPConnection but provides an extra constructor
    backwards-compatibility layer between older and newer Pythons.
    """

    default_port = port_by_scheme['http']

    # By default, disable Nagle's Algorithm.
    tcp_nodelay = 1

    def __init__(self, *args, **kw):
        if six.PY3:  # Python 3
            kw.pop('strict', None)
        if sys.version_info < (2, 7):  # Python 2.6 and older
            kw.pop('source_address', None)

        # Pre-set source_address in case we have an older Python like 2.6.
        self.source_address = kw.get('source_address')

        # Superclass also sets self.source_address in Python 2.7+.
        _HTTPConnection.__init__(self, *args, **kw)  

    def _new_conn(self):
        """ Establish a socket connection and set nodelay settings on it.

        :return: a new socket connection
        """
        extra_args = []
        if self.source_address:  # Python 2.7+
            extra_args.append(self.source_address)

        conn = socket.create_connection(
            (self.host, self.port), self.timeout, *extra_args)
        conn.setsockopt(
            socket.IPPROTO_TCP, socket.TCP_NODELAY, self.tcp_nodelay)

        return conn

    def _prepare_conn(self, conn):
        self.sock = conn
        # the _tunnel_host attribute was added in python 2.6.3 (via
        # http://hg.python.org/cpython/rev/0f57b30a152f) so pythons 2.6(0-2) do
        # not have them.
        if getattr(self, '_tunnel_host', None):
            # TODO: Fix tunnel so it doesn't depend on self.sock state.
            self._tunnel()

    def connect(self):
        conn = self._new_conn()
        self._prepare_conn(conn)


class HTTPSConnection(HTTPConnection):
    default_port = port_by_scheme['https']

    def __init__(self, host, port=None, key_file=None, cert_file=None,
                 strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, **kw):

        HTTPConnection.__init__(self, host, port, strict=strict,
                                timeout=timeout, **kw)

        self.key_file = key_file
        self.cert_file = cert_file

        # Required property for Google AppEngine 1.9.0 which otherwise causes
        # HTTPS requests to go out as HTTP. (See Issue #356)
        self._protocol = 'https'

    def connect(self):
        conn = self._new_conn()
        self._prepare_conn(conn)
        self.sock = ssl.wrap_socket(conn, self.key_file, self.cert_file)


class VerifiedHTTPSConnection(HTTPSConnection):
    """
    Based on httplib.HTTPSConnection but wraps the socket with
    SSL certification.
    """
    cert_reqs = None
    ca_certs = None
    ssl_version = None
    conn_kw = {}

    def set_cert(self, key_file=None, cert_file=None,
                 cert_reqs=None, ca_certs=None,
                 assert_hostname=None, assert_fingerprint=None):

        self.key_file = key_file
        self.cert_file = cert_file
        self.cert_reqs = cert_reqs
        self.ca_certs = ca_certs
        self.assert_hostname = assert_hostname
        self.assert_fingerprint = assert_fingerprint

    def connect(self):
        # Add certificate verification

        try:
            sock = socket.create_connection(
                address=(self.host, self.port), timeout=self.timeout,
                **self.conn_kw)
        except SocketTimeout:
            raise ConnectTimeoutError(
                self, "Connection to %s timed out. (connect timeout=%s)" %
                (self.host, self.timeout))

        sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY,
                        self.tcp_nodelay)

        resolved_cert_reqs = resolve_cert_reqs(self.cert_reqs)
        resolved_ssl_version = resolve_ssl_version(self.ssl_version)

        hostname = self.host
        if getattr(self, '_tunnel_host', None):
            # _tunnel_host was added in Python 2.6.3
            # (See: http://hg.python.org/cpython/rev/0f57b30a152f)

            self.sock = sock
            # Calls self._set_hostport(), so self.host is
            # self._tunnel_host below.
            self._tunnel()

            # Override the host with the one we're requesting data from.
            hostname = self._tunnel_host

        # Wrap socket using verification with the root certs in
        # trusted_root_certs
        self.sock = ssl_wrap_socket(sock, self.key_file, self.cert_file,
                                    cert_reqs=resolved_cert_reqs,
                                    ca_certs=self.ca_certs,
                                    server_hostname=hostname,
                                    ssl_version=resolved_ssl_version)

        if resolved_cert_reqs != ssl.CERT_NONE:
            if self.assert_fingerprint:
                assert_fingerprint(self.sock.getpeercert(binary_form=True),
                                   self.assert_fingerprint)
            elif self.assert_hostname is not False:
                match_hostname(self.sock.getpeercert(),
                               self.assert_hostname or hostname)


if ssl:
    # Make a copy for testing.
    UnverifiedHTTPSConnection = HTTPSConnection
    HTTPSConnection = VerifiedHTTPSConnection
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py000064400000014635151735047540023336 0ustar00# urllib3/_collections.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

from collections import Mapping, MutableMapping
try:
    from threading import RLock
except ImportError: # Platform-specific: No threads available
    class RLock:
        def __enter__(self):
            pass

        def __exit__(self, exc_type, exc_value, traceback):
            pass


try: # Python 2.7+
    from collections import OrderedDict
except ImportError:
    from .packages.ordered_dict import OrderedDict
from .packages.six import itervalues


__all__ = ['RecentlyUsedContainer', 'HTTPHeaderDict']


_Null = object()


class RecentlyUsedContainer(MutableMapping):
    """
    Provides a thread-safe dict-like container which maintains up to
    ``maxsize`` keys while throwing away the least-recently-used keys beyond
    ``maxsize``.

    :param maxsize:
        Maximum number of recent elements to retain.

    :param dispose_func:
        Every time an item is evicted from the container,
        ``dispose_func(value)`` is called.  Callback which will get called
    """

    ContainerCls = OrderedDict

    def __init__(self, maxsize=10, dispose_func=None):
        self._maxsize = maxsize
        self.dispose_func = dispose_func

        self._container = self.ContainerCls()
        self.lock = RLock()

    def __getitem__(self, key):
        # Re-insert the item, moving it to the end of the eviction line.
        with self.lock:
            item = self._container.pop(key)
            self._container[key] = item
            return item

    def __setitem__(self, key, value):
        evicted_value = _Null
        with self.lock:
            # Possibly evict the existing value of 'key'
            evicted_value = self._container.get(key, _Null)
            self._container[key] = value

            # If we didn't evict an existing value, we might have to evict the
            # least recently used item from the beginning of the container.
            if len(self._container) > self._maxsize:
                _key, evicted_value = self._container.popitem(last=False)

        if self.dispose_func and evicted_value is not _Null:
            self.dispose_func(evicted_value)

    def __delitem__(self, key):
        with self.lock:
            value = self._container.pop(key)

        if self.dispose_func:
            self.dispose_func(value)

    def __len__(self):
        with self.lock:
            return len(self._container)

    def __iter__(self):
        raise NotImplementedError('Iteration over this class is unlikely to be threadsafe.')

    def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            # under Python 2, this copies the list of values twice :-|
            values = list(self._container.values())
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)

    def keys(self):
        with self.lock:
            return self._container.keys()


class HTTPHeaderDict(MutableMapping):
    """
    :param headers:
        An iterable of field-value pairs. Must not contain multiple field names
        when compared case-insensitively.

    :param kwargs:
        Additional field-value pairs to pass in to ``dict.update``.

    A ``dict`` like container for storing HTTP Headers.

    Field names are stored and compared case-insensitively in compliance with
    RFC 2616. Iteration provides the first case-sensitive key seen for each
    case-insensitive pair.

    Using ``__setitem__`` syntax overwrites fields that compare equal
    case-insensitively in order to maintain ``dict``'s api. For fields that
    compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
    in a loop.

    If multiple fields that are equal case-insensitively are passed to the
    constructor or ``.update``, the behavior is undefined and some will be
    lost.

    >>> headers = HTTPHeaderDict()
    >>> headers.add('Set-Cookie', 'foo=bar')
    >>> headers.add('set-cookie', 'baz=quxx')
    >>> headers['content-length'] = '7'
    >>> headers['SET-cookie']
    'foo=bar, baz=quxx'
    >>> headers['Content-Length']
    '7'

    If you want to access the raw headers with their original casing
    for debugging purposes you can access the private ``._data`` attribute
    which is a normal python ``dict`` that maps the case-insensitive key to a
    list of tuples stored as (case-sensitive-original-name, value). Using the
    structure from above as our example:

    >>> headers._data
    {'set-cookie': [('Set-Cookie', 'foo=bar'), ('set-cookie', 'baz=quxx')],
    'content-length': [('content-length', '7')]}
    """

    def __init__(self, headers=None, **kwargs):
        self._data = {}
        if headers is None:
            headers = {}
        self.update(headers, **kwargs)

    def add(self, key, value):
        """Adds a (name, value) pair, doesn't overwrite the value if it already
        exists.

        >>> headers = HTTPHeaderDict(foo='bar')
        >>> headers.add('Foo', 'baz')
        >>> headers['foo']
        'bar, baz'
        """
        self._data.setdefault(key.lower(), []).append((key, value))

    def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        return self[key].split(', ') if key in self else []

    def copy(self):
        h = HTTPHeaderDict()
        for key in self._data:
            for rawkey, value in self._data[key]:
                h.add(rawkey, value)
        return h

    def __eq__(self, other):
        if not isinstance(other, Mapping):
            return False
        other = HTTPHeaderDict(other)
        return dict((k1, self[k1]) for k1 in self._data) == \
                dict((k2, other[k2]) for k2 in other._data)

    def __getitem__(self, key):
        values = self._data[key.lower()]
        return ', '.join(value[1] for value in values)

    def __setitem__(self, key, value):
        self._data[key.lower()] = [(key, value)]

    def __delitem__(self, key):
        del self._data[key.lower()]

    def __len__(self):
        return len(self._data)

    def __iter__(self):
        for headers in itervalues(self._data):
            yield headers[0][0]

    def __repr__(self):
        return '%s(%r)' % (self.__class__.__name__, dict(self.items()))
site-packages/pip/_vendor/requests/packages/urllib3/contrib/__pycache__/pyopenssl.cpython-34.pyc000064400000024130151735047540030547 0ustar00python3.4�
�Re�:�@s�dZddlmZddlmZddlZddlm	Z
ddlmZm
Z
ddlmZmZddlZddlZddlmZd	d
lmZd	dlmZdd
gZeZiejjej6ejjej6ejjej 6Z!iejj"ej#6ejj$ej%6ejj$ejj&ej'6Z(dddZ)ejZ*ej+Z,dd�Z-dd
�Z.Gdd�de�Zdd�Z/Gdd�de�Z0Gdd�de1�Z2dd�Z3dddddddd�Z+dS)a�SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.

This needs the following packages installed:

* pyOpenSSL (tested with 0.13)
* ndg-httpsclient (tested with 0.3.2)
* pyasn1 (tested with 0.1.6)

You can install them with the following command:

    pip install pyopenssl ndg-httpsclient pyasn1

To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this::

    try:
        import urllib3.contrib.pyopenssl
        urllib3.contrib.pyopenssl.inject_into_urllib3()
    except ImportError:
        pass

Now you can use :mod:`urllib3` as you normally would, and it will support SNI
when the required modules are installed.

Activating this module also has the positive side effect of disabling SSL/TLS
encryption in Python 2 (see `CRIME attack`_).

If you want to configure the default list of supported cipher suites, you can
set the ``urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST`` variable.

Module Variables
----------------

:var DEFAULT_SSL_CIPHER_LIST: The list of supported SSL/TLS cipher suites.
    Default: ``ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:
    ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS``

.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)

�)�SUBJ_ALT_NAME_SUPPORT)�SubjectAltNameN)�decoder)�univ�
constraint)�_fileobject�timeout)�StringIO�)�
connection)�util�inject_into_urllib3�extract_from_urllib3z,ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:zAECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:z!aNULL:!MD5:!DSScCstt_tt_dS)z7Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.N)�ssl_wrap_socketr�HAS_SNIr�rr�R/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyr
fs	cCstt_tt_dS)z4Undo monkey-patching by :func:`inject_into_urllib3`.N)�orig_connection_ssl_wrap_socketrr�orig_util_HAS_SNIrrrrrrrms	c@s2eZdZdZejjejdd�ZdS)rz0ASN.1 implementation for subjectAltNames support�iN)	�__name__�
__module__�__qualname__�__doc__rZ
SequenceOfZsizeSpecrZValueSizeConstraintrrrrrus	rcCsg}ts|St�}x�t|j��D]�}|j|�}|j�}|dkr_q,n|j�}tj|d|�}x�|D]x}t	|t�s�q�nxZtt
|��D]F}	|j|	�}
|
j�dkr�q�n|j
t|
j���q�Wq�Wq,W|S)N�subjectAltNameZasn1SpecZdNSName)rr�rangeZget_extension_count�
get_extensionZget_short_name�get_data�der_decoder�decode�
isinstance�lenZgetComponentByPosition�getName�append�strZgetComponent)Z	peer_certZdns_nameZ
general_names�i�extZext_nameZext_datZdecoded_dat�name�entry�	componentrrr�get_subj_alt_name�s*		
%r*c@s:eZdZdd�Zd	dd�Zd
dd�ZdS)�
fileobjectcCsFtj|jggg|jj��\}}}|sBt��ndS)N)�select�_sock�
gettimeoutr)�self�rd�wdZedrrr�_wait_for_sock�szfileobject._wait_for_sockrc	Cs�t|j|j�}|j}|jdd�|dkr�t�|_xYy|jj|�}Wn%tj	j
k
r�|j�wIYnX|s�Pn|j|�qIW|j
�S|j�}||kr|jd�|j|�}t�|_|jj|j��|St�|_x�||}y|jj|�}Wn%tj	j
k
r\|j�wYnX|sgPnt|�}||kr�|r�|S||kr�|j|�~Pn||ks�td||f��|j|�||7}~qW|j
�SdS)Nrr
zrecv(%d) returned %d bytes)�max�	_rbufsizeZdefault_bufsize�_rbuf�seekr	r-�recv�OpenSSL�SSL�
WantReadErrorr2�write�getvalue�tell�readr!�AssertionError)	r/�size�rbufsize�buf�data�buf_len�rv�left�nrrrr>�sX	





"

zfileobject.readcCs|j}|jdd�|j�dkr�|jd�|j|�}|jd�sht|�|kr�t�|_|jj|j��|S~n|dkrB|j	dkr`|jd�|j�g}t�|_d}|j
j}xgy:x3|dkr$|d�}|sPn|j|�q�WWn%t
jjk
rM|j�w�YnXPq�Wdj|�S|jdd�t�|_x�y|j
j|j	�}Wn%t
jjk
r�|j�wYnX|s�Pn|jd�}|dkr'|d7}|j|d|��|jj||d��~Pn|j|�qW|j�S|jdd�|j�}||kr�|jd�|j|�}	t�|_|jj|j��|	St�|_xKy|j
j|j	�}Wn%t
jjk
r�|j�w�YnX|sPn||}
|jdd|
�}|dkr�|d7}|jj||d��|rv|j|d|��Pq�|d|�Snt|�}||kr�|r�|S||
kr�|j|d|
��|jj||
d��Pn|j|�||7}q�W|j�SdS)Nrr
�
r�)r5r6r=�readline�endswithr!r	r;r>r4r-r7r#r8r9r:r2�join�findr<)r/r@rBZbline�buffersrCr7�nlrDrErFrGrrrrJ�s�	
!










zfileobject.readlineN���rP)rrrr2r>rJrrrrr+�sDr+c@speZdZdZdd�Zdd�Zddd�Zd	d
�Zdd�Zd
d�Z	ddd�Z
dS)�
WrappedSocketz@API-compatibility wrapper for Python OpenSSL's Connection-class.cCs||_||_dS)N)r�socket)r/rrRrrr�__init__Ss	zWrappedSocket.__init__cCs
|jj�S)N)rR�fileno)r/rrrrTWszWrappedSocket.filenorcCst|j||�S)N)r+r)r/�mode�bufsizerrr�makefileZszWrappedSocket.makefilecCs|jj|�S)N)rR�
settimeout)r/rrrrrX]szWrappedSocket.settimeoutcCs|jj|�S)N)r�sendall)r/rCrrrrY`szWrappedSocket.sendallcCs
|jj�S)N)r�shutdown)r/rrr�closecszWrappedSocket.closeFcCsr|jj�}|s|S|r8tjjtjj|�Sid|j�jfffd6dd�t|�D�d6S)N�
commonName�subjectcSsg|]}d|f�qS)�DNSr)�.0�valuerrr�
<listcomp>vs	z-WrappedSocket.getpeercert.<locals>.<listcomp>r)	rZget_peer_certificater8ZcryptoZdump_certificateZ
FILETYPE_ASN1Zget_subjectZCNr*)r/�binary_form�x509rrr�getpeercertfs			zWrappedSocket.getpeercertNrP)rrrrrSrTrWrXrYr[rdrrrrrQPsrQcCs
|dkS)Nrr)�cnxrcZerr_noZ	err_depthZreturn_coderrr�_verify_callback|srfcCs�tjjt|�}|r,|j|�n|rB|j|�n|tjkrh|jt	|t
�n|r�y|j|d�Wq�tjjk
r�}ztj
d||��WYdd}~Xq�Xn
|j�d}	|j|	�|jt�tjj||�}
|
j|�|
j�x�y|
j�Wnmtjjk
rctj|ggg�w"Yn=tjjk
r�}ztj
d|��WYdd}~XnXPq"Wt|
|�S)Nzbad ca_certs: %riz
bad handshake)r8r9ZContext�_openssl_versionsZuse_certificate_fileZuse_privatekey_file�ssl�	CERT_NONEZ
set_verify�_openssl_verifyrf�load_verify_locations�Error�SSLError�set_default_verify_pathsZset_optionsZset_cipher_list�DEFAULT_SSL_CIPHER_LIST�
ConnectionZset_tlsext_host_nameZset_connect_state�do_handshaker:r,rQ)�sock�keyfile�certfile�	cert_reqs�ca_certs�server_hostname�ssl_version�ctx�e�OP_NO_COMPRESSIONrerrrr�s:,




%r)4rZ%ndg.httpsclient.ssl_peer_verificationrZndg.httpsclient.subj_alt_namerZBaseSubjectAltNameZOpenSSL.SSLr8Zpyasn1.codec.derrrZpyasn1.typerrrRrrrhr,�	cStringIOr	rIrr�__all__rr9Z
SSLv23_METHOD�PROTOCOL_SSLv23ZSSLv3_METHODZPROTOCOL_SSLv3ZTLSv1_METHOD�PROTOCOL_TLSv1rgZVERIFY_NONEriZVERIFY_PEER�
CERT_OPTIONALZVERIFY_FAIL_IF_NO_PEER_CERT�
CERT_REQUIREDrjrorrrr
rr*r+�objectrQrfrrrr�<module>/sH			�,	site-packages/pip/_vendor/requests/packages/urllib3/contrib/__pycache__/ntlmpool.cpython-34.pyc000064400000006676151735047540030376 0ustar00python3.4�
�Re��@s�dZyddlmZWn"ek
r>ddlmZYnXddlmZddlmZddlm	Z	ee
�ZGdd�de	�ZdS)	z
NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
�)�HTTPSConnection)�	getLogger)�ntlm)�HTTPSConnectionPoolcs[eZdZdZdZ�fdd�Zdd�Zdddd	d	�fd
d�Z�S)�NTLMConnectionPoolzQ
    Implements an NTLM authentication version of an urllib3 connection pool
    �httpscsjtt|�j||�||_||_|jdd�}|dj�|_|d|_||_	dS)z�
        authurl is a random URL on the server that is protected by NTLM.
        user is the Windows user, probably in the DOMAIN\username format.
        pw is the password for the user.
        �\�rN)
�superr�__init__�authurl�rawuser�split�upper�domain�user�pw)�selfrrr�args�kwargsZ
user_parts)�	__class__��Q/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.pyr!s		
zNTLMConnectionPool.__init__c
Cs�|jd7_tjd|j|j|jf�i}d|d<d}d}td|jd|j�}d	tj|j	�||<tjd
|�|j
d|jd|�|j�}t|j
��}tjd|j|jf�tjd
|�tjd|jd��d|_||jd�}d}x7|D]/}	|	dd�dkr<|	dd�}q<q<W|dkr�td|||f��ntj|�\}
}tj|
|j|j|j|�}d	|||<tjd
|�|j
d|jd|�|j�}tjd|j|jf�tjd
t|j
���tjd|j�dd��|jdkr�|jdkr�td��ntd|j|jf��nd|_tjd�|S)Nr	z3Starting NTLM HTTPS connection no. %d: https://%s%sz
Keep-Alive�
Connection�
Authorizationzwww-authenticate�host�portzNTLM %szRequest headers: %s�GETzResponse status: %s %szResponse headers: %szResponse data: %s [...]�dz, �zNTLM z!Unexpected %s response header: %s��i�z3Server rejected request: wrong username or passwordzWrong server response: %s %szConnection established)�num_connections�log�debugrrrrrZcreate_NTLM_NEGOTIATE_MESSAGEr
�request�getresponse�dict�
getheaders�status�reason�read�fpr�	ExceptionZparse_NTLM_CHALLENGE_MESSAGEZ create_NTLM_AUTHENTICATE_MESSAGErrr)
r�headersZ
req_headerZresp_header�conn�resZreshdrZauth_header_valuesZauth_header_value�sZServerChallengeZNegotiateFlagsZauth_msgrrr�	_new_conn/s\	
	
		!	
zNTLMConnectionPool._new_connN�TcsG|dkri}nd|d<tt|�j|||||||�S)Nz
Keep-Aliver)r
r�urlopen)r�method�url�bodyr-�retries�redirect�assert_same_host)rrrr3ps	
zNTLMConnectionPool.urlopen)�__name__�
__module__�__qualname__�__doc__�schemerr1r3rr)rrrsA	rN)
r=�http.clientr�ImportError�httplib�loggingrr�urllib3rr:r"rrrrr�<module>s
site-packages/pip/_vendor/requests/packages/urllib3/contrib/__pycache__/__init__.cpython-34.pyc000064400000000244151735047540030252 0ustar00python3.4�
�Re�@sdS)N�rrr�Q/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/contrib/__init__.py�<module>spython3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py000064400000011205151735047540024153 0ustar00# urllib3/contrib/ntlmpool.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

"""
NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""

try:
    from http.client import HTTPSConnection
except ImportError:
    from httplib import HTTPSConnection
from logging import getLogger
from ntlm import ntlm

from urllib3 import HTTPSConnectionPool


log = getLogger(__name__)


class NTLMConnectionPool(HTTPSConnectionPool):
    """
    Implements an NTLM authentication version of an urllib3 connection pool
    """

    scheme = 'https'

    def __init__(self, user, pw, authurl, *args, **kwargs):
        """
        authurl is a random URL on the server that is protected by NTLM.
        user is the Windows user, probably in the DOMAIN\\username format.
        pw is the password for the user.
        """
        super(NTLMConnectionPool, self).__init__(*args, **kwargs)
        self.authurl = authurl
        self.rawuser = user
        user_parts = user.split('\\', 1)
        self.domain = user_parts[0].upper()
        self.user = user_parts[1]
        self.pw = pw

    def _new_conn(self):
        # Performs the NTLM handshake that secures the connection. The socket
        # must be kept open while requests are performed.
        self.num_connections += 1
        log.debug('Starting NTLM HTTPS connection no. %d: https://%s%s' %
                  (self.num_connections, self.host, self.authurl))

        headers = {}
        headers['Connection'] = 'Keep-Alive'
        req_header = 'Authorization'
        resp_header = 'www-authenticate'

        conn = HTTPSConnection(host=self.host, port=self.port)

        # Send negotiation message
        headers[req_header] = (
            'NTLM %s' % ntlm.create_NTLM_NEGOTIATE_MESSAGE(self.rawuser))
        log.debug('Request headers: %s' % headers)
        conn.request('GET', self.authurl, None, headers)
        res = conn.getresponse()
        reshdr = dict(res.getheaders())
        log.debug('Response status: %s %s' % (res.status, res.reason))
        log.debug('Response headers: %s' % reshdr)
        log.debug('Response data: %s [...]' % res.read(100))

        # Remove the reference to the socket, so that it can not be closed by
        # the response object (we want to keep the socket open)
        res.fp = None

        # Server should respond with a challenge message
        auth_header_values = reshdr[resp_header].split(', ')
        auth_header_value = None
        for s in auth_header_values:
            if s[:5] == 'NTLM ':
                auth_header_value = s[5:]
        if auth_header_value is None:
            raise Exception('Unexpected %s response header: %s' %
                            (resp_header, reshdr[resp_header]))

        # Send authentication message
        ServerChallenge, NegotiateFlags = \
            ntlm.parse_NTLM_CHALLENGE_MESSAGE(auth_header_value)
        auth_msg = ntlm.create_NTLM_AUTHENTICATE_MESSAGE(ServerChallenge,
                                                         self.user,
                                                         self.domain,
                                                         self.pw,
                                                         NegotiateFlags)
        headers[req_header] = 'NTLM %s' % auth_msg
        log.debug('Request headers: %s' % headers)
        conn.request('GET', self.authurl, None, headers)
        res = conn.getresponse()
        log.debug('Response status: %s %s' % (res.status, res.reason))
        log.debug('Response headers: %s' % dict(res.getheaders()))
        log.debug('Response data: %s [...]' % res.read()[:100])
        if res.status != 200:
            if res.status == 401:
                raise Exception('Server rejected request: wrong '
                                'username or password')
            raise Exception('Wrong server response: %s %s' %
                            (res.status, res.reason))

        res.fp = None
        log.debug('Connection established')
        return conn

    def urlopen(self, method, url, body=None, headers=None, retries=3,
                redirect=True, assert_same_host=True):
        if headers is None:
            headers = {}
        headers['Connection'] = 'Keep-Alive'
        return super(NTLMConnectionPool, self).urlopen(method, url, body,
                                                       headers, retries,
                                                       redirect,
                                                       assert_same_host)
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py000064400000035356151735047540024360 0ustar00'''SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.

This needs the following packages installed:

* pyOpenSSL (tested with 0.13)
* ndg-httpsclient (tested with 0.3.2)
* pyasn1 (tested with 0.1.6)

You can install them with the following command:

    pip install pyopenssl ndg-httpsclient pyasn1

To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this::

    try:
        import urllib3.contrib.pyopenssl
        urllib3.contrib.pyopenssl.inject_into_urllib3()
    except ImportError:
        pass

Now you can use :mod:`urllib3` as you normally would, and it will support SNI
when the required modules are installed.

Activating this module also has the positive side effect of disabling SSL/TLS
encryption in Python 2 (see `CRIME attack`_).

If you want to configure the default list of supported cipher suites, you can
set the ``urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST`` variable.

Module Variables
----------------

:var DEFAULT_SSL_CIPHER_LIST: The list of supported SSL/TLS cipher suites.
    Default: ``ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:
    ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS``

.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)

'''

from ndg.httpsclient.ssl_peer_verification import SUBJ_ALT_NAME_SUPPORT
from ndg.httpsclient.subj_alt_name import SubjectAltName as BaseSubjectAltName
import OpenSSL.SSL
from pyasn1.codec.der import decoder as der_decoder
from pyasn1.type import univ, constraint
from socket import _fileobject, timeout
import ssl
import select
from cStringIO import StringIO

from .. import connection
from .. import util

__all__ = ['inject_into_urllib3', 'extract_from_urllib3']

# SNI only *really* works if we can read the subjectAltName of certificates.
HAS_SNI = SUBJ_ALT_NAME_SUPPORT

# Map from urllib3 to PyOpenSSL compatible parameter-values.
_openssl_versions = {
    ssl.PROTOCOL_SSLv23: OpenSSL.SSL.SSLv23_METHOD,
    ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
    ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
}
_openssl_verify = {
    ssl.CERT_NONE: OpenSSL.SSL.VERIFY_NONE,
    ssl.CERT_OPTIONAL: OpenSSL.SSL.VERIFY_PEER,
    ssl.CERT_REQUIRED: OpenSSL.SSL.VERIFY_PEER
                       + OpenSSL.SSL.VERIFY_FAIL_IF_NO_PEER_CERT,
}

# A secure default.
# Sources for more information on TLS ciphers:
#
# - https://wiki.mozilla.org/Security/Server_Side_TLS
# - https://www.ssllabs.com/projects/best-practices/index.html
# - https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
#
# The general intent is:
# - Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE),
# - prefer ECDHE over DHE for better performance,
# - prefer any AES-GCM over any AES-CBC for better performance and security,
# - use 3DES as fallback which is secure but slow,
# - disable NULL authentication, MD5 MACs and DSS for security reasons.
DEFAULT_SSL_CIPHER_LIST = "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:" + \
    "ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:" + \
    "!aNULL:!MD5:!DSS"


orig_util_HAS_SNI = util.HAS_SNI
orig_connection_ssl_wrap_socket = connection.ssl_wrap_socket


def inject_into_urllib3():
    'Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.'

    connection.ssl_wrap_socket = ssl_wrap_socket
    util.HAS_SNI = HAS_SNI


def extract_from_urllib3():
    'Undo monkey-patching by :func:`inject_into_urllib3`.'

    connection.ssl_wrap_socket = orig_connection_ssl_wrap_socket
    util.HAS_SNI = orig_util_HAS_SNI


### Note: This is a slightly bug-fixed version of same from ndg-httpsclient.
class SubjectAltName(BaseSubjectAltName):
    '''ASN.1 implementation for subjectAltNames support'''

    # There is no limit to how many SAN certificates a certificate may have,
    #   however this needs to have some limit so we'll set an arbitrarily high
    #   limit.
    sizeSpec = univ.SequenceOf.sizeSpec + \
        constraint.ValueSizeConstraint(1, 1024)


### Note: This is a slightly bug-fixed version of same from ndg-httpsclient.
def get_subj_alt_name(peer_cert):
    # Search through extensions
    dns_name = []
    if not SUBJ_ALT_NAME_SUPPORT:
        return dns_name

    general_names = SubjectAltName()
    for i in range(peer_cert.get_extension_count()):
        ext = peer_cert.get_extension(i)
        ext_name = ext.get_short_name()
        if ext_name != 'subjectAltName':
            continue

        # PyOpenSSL returns extension data in ASN.1 encoded form
        ext_dat = ext.get_data()
        decoded_dat = der_decoder.decode(ext_dat,
                                         asn1Spec=general_names)

        for name in decoded_dat:
            if not isinstance(name, SubjectAltName):
                continue
            for entry in range(len(name)):
                component = name.getComponentByPosition(entry)
                if component.getName() != 'dNSName':
                    continue
                dns_name.append(str(component.getComponent()))

    return dns_name


class fileobject(_fileobject):

    def _wait_for_sock(self):
        rd, wd, ed = select.select([self._sock], [], [],
                                   self._sock.gettimeout())
        if not rd:
            raise timeout()


    def read(self, size=-1):
        # Use max, disallow tiny reads in a loop as they are very inefficient.
        # We never leave read() with any leftover data from a new recv() call
        # in our internal buffer.
        rbufsize = max(self._rbufsize, self.default_bufsize)
        # Our use of StringIO rather than lists of string objects returned by
        # recv() minimizes memory usage and fragmentation that occurs when
        # rbufsize is large compared to the typical return value of recv().
        buf = self._rbuf
        buf.seek(0, 2)  # seek end
        if size < 0:
            # Read until EOF
            self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
            while True:
                try:
                    data = self._sock.recv(rbufsize)
                except OpenSSL.SSL.WantReadError:
                    self._wait_for_sock()
                    continue
                if not data:
                    break
                buf.write(data)
            return buf.getvalue()
        else:
            # Read until size bytes or EOF seen, whichever comes first
            buf_len = buf.tell()
            if buf_len >= size:
                # Already have size bytes in our buffer?  Extract and return.
                buf.seek(0)
                rv = buf.read(size)
                self._rbuf = StringIO()
                self._rbuf.write(buf.read())
                return rv

            self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
            while True:
                left = size - buf_len
                # recv() will malloc the amount of memory given as its
                # parameter even though it often returns much less data
                # than that.  The returned data string is short lived
                # as we copy it into a StringIO and free it.  This avoids
                # fragmentation issues on many platforms.
                try:
                    data = self._sock.recv(left)
                except OpenSSL.SSL.WantReadError:
                    self._wait_for_sock()
                    continue
                if not data:
                    break
                n = len(data)
                if n == size and not buf_len:
                    # Shortcut.  Avoid buffer data copies when:
                    # - We have no data in our buffer.
                    # AND
                    # - Our call to recv returned exactly the
                    #   number of bytes we were asked to read.
                    return data
                if n == left:
                    buf.write(data)
                    del data  # explicit free
                    break
                assert n <= left, "recv(%d) returned %d bytes" % (left, n)
                buf.write(data)
                buf_len += n
                del data  # explicit free
                #assert buf_len == buf.tell()
            return buf.getvalue()

    def readline(self, size=-1):
        buf = self._rbuf
        buf.seek(0, 2)  # seek end
        if buf.tell() > 0:
            # check if we already have it in our buffer
            buf.seek(0)
            bline = buf.readline(size)
            if bline.endswith('\n') or len(bline) == size:
                self._rbuf = StringIO()
                self._rbuf.write(buf.read())
                return bline
            del bline
        if size < 0:
            # Read until \n or EOF, whichever comes first
            if self._rbufsize <= 1:
                # Speed up unbuffered case
                buf.seek(0)
                buffers = [buf.read()]
                self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
                data = None
                recv = self._sock.recv
                while True:
                    try:
                        while data != "\n":
                            data = recv(1)
                            if not data:
                                break
                            buffers.append(data)
                    except OpenSSL.SSL.WantReadError:
                        self._wait_for_sock()
                        continue
                    break
                return "".join(buffers)

            buf.seek(0, 2)  # seek end
            self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
            while True:
                try:
                    data = self._sock.recv(self._rbufsize)
                except OpenSSL.SSL.WantReadError:
                    self._wait_for_sock()
                    continue
                if not data:
                    break
                nl = data.find('\n')
                if nl >= 0:
                    nl += 1
                    buf.write(data[:nl])
                    self._rbuf.write(data[nl:])
                    del data
                    break
                buf.write(data)
            return buf.getvalue()
        else:
            # Read until size bytes or \n or EOF seen, whichever comes first
            buf.seek(0, 2)  # seek end
            buf_len = buf.tell()
            if buf_len >= size:
                buf.seek(0)
                rv = buf.read(size)
                self._rbuf = StringIO()
                self._rbuf.write(buf.read())
                return rv
            self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
            while True:
                try:
                    data = self._sock.recv(self._rbufsize)
                except OpenSSL.SSL.WantReadError:
                    self._wait_for_sock()
                    continue
                if not data:
                    break
                left = size - buf_len
                # did we just receive a newline?
                nl = data.find('\n', 0, left)
                if nl >= 0:
                    nl += 1
                    # save the excess data to _rbuf
                    self._rbuf.write(data[nl:])
                    if buf_len:
                        buf.write(data[:nl])
                        break
                    else:
                        # Shortcut.  Avoid data copy through buf when returning
                        # a substring of our first recv().
                        return data[:nl]
                n = len(data)
                if n == size and not buf_len:
                    # Shortcut.  Avoid data copy through buf when
                    # returning exactly all of our first recv().
                    return data
                if n >= left:
                    buf.write(data[:left])
                    self._rbuf.write(data[left:])
                    break
                buf.write(data)
                buf_len += n
                #assert buf_len == buf.tell()
            return buf.getvalue()


class WrappedSocket(object):
    '''API-compatibility wrapper for Python OpenSSL's Connection-class.'''

    def __init__(self, connection, socket):
        self.connection = connection
        self.socket = socket

    def fileno(self):
        return self.socket.fileno()

    def makefile(self, mode, bufsize=-1):
        return fileobject(self.connection, mode, bufsize)

    def settimeout(self, timeout):
        return self.socket.settimeout(timeout)

    def sendall(self, data):
        return self.connection.sendall(data)

    def close(self):
        return self.connection.shutdown()

    def getpeercert(self, binary_form=False):
        x509 = self.connection.get_peer_certificate()

        if not x509:
            return x509

        if binary_form:
            return OpenSSL.crypto.dump_certificate(
                OpenSSL.crypto.FILETYPE_ASN1,
                x509)

        return {
            'subject': (
                (('commonName', x509.get_subject().CN),),
            ),
            'subjectAltName': [
                ('DNS', value)
                for value in get_subj_alt_name(x509)
            ]
        }


def _verify_callback(cnx, x509, err_no, err_depth, return_code):
    return err_no == 0


def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None,
                    ca_certs=None, server_hostname=None,
                    ssl_version=None):
    ctx = OpenSSL.SSL.Context(_openssl_versions[ssl_version])
    if certfile:
        ctx.use_certificate_file(certfile)
    if keyfile:
        ctx.use_privatekey_file(keyfile)
    if cert_reqs != ssl.CERT_NONE:
        ctx.set_verify(_openssl_verify[cert_reqs], _verify_callback)
    if ca_certs:
        try:
            ctx.load_verify_locations(ca_certs, None)
        except OpenSSL.SSL.Error as e:
            raise ssl.SSLError('bad ca_certs: %r' % ca_certs, e)
    else:
        ctx.set_default_verify_paths()

    # Disable TLS compression to migitate CRIME attack (issue #309)
    OP_NO_COMPRESSION = 0x20000
    ctx.set_options(OP_NO_COMPRESSION)

    # Set list of supported ciphersuites.
    ctx.set_cipher_list(DEFAULT_SSL_CIPHER_LIST)

    cnx = OpenSSL.SSL.Connection(ctx, sock)
    cnx.set_tlsext_host_name(server_hostname)
    cnx.set_connect_state()
    while True:
        try:
            cnx.do_handshake()
        except OpenSSL.SSL.WantReadError:
            select.select([sock], [], [])
            continue
        except OpenSSL.SSL.Error as e:
            raise ssl.SSLError('bad handshake', e)
        break

    return WrappedSocket(cnx, sock)
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py000064400000000000151735047540024035 0ustar00python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/poolmanager.cpython-34.pyc000064400000020171151735047540027437 0ustar00�
�Re#�
@sddlZyddlmZWn"ek
rDddlmZYnXddlmZddlmZm	Z	ddlm
Z
ddlmZddl
mZd	d
dgZied6e	d
6Zeje�ZdZGdd	�d	e�ZGdd
�d
e�Zdd�ZdS)�N)�urljoin�)�RecentlyUsedContainer)�HTTPConnectionPool�HTTPSConnectionPool)�port_by_scheme)�RequestMethods)�	parse_url�PoolManager�ProxyManager�proxy_from_url�http�https�key_file�	cert_file�	cert_reqs�ca_certs�ssl_versionc@sseZdZdZdZdddd�Zdd�Zdd	�Zdd
dd�Zd
d�Z	ddd�Z
dS)r
a&
    Allows for arbitrary requests while transparently keeping track of
    necessary connection pools for you.

    :param num_pools:
        Number of connection pools to cache before discarding the least
        recently used pool.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param \**connection_pool_kw:
        Additional parameters are used to create fresh
        :class:`urllib3.connectionpool.ConnectionPool` instances.

    Example: ::

        >>> manager = PoolManager(num_pools=2)
        >>> r = manager.request('GET', 'http://google.com/')
        >>> r = manager.request('GET', 'http://google.com/mail')
        >>> r = manager.request('GET', 'http://yahoo.com/')
        >>> len(manager.pools)
        2

    N�
cKs8tj||�||_t|ddd��|_dS)N�dispose_funccSs
|j�S)N)�close)�p�r�L/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/poolmanager.py�<lambda>Esz&PoolManager.__init__.<locals>.<lambda>)r�__init__�connection_pool_kwr�pools)�self�	num_pools�headersrrrrrAs		zPoolManager.__init__cCsbt|}|j}|dkrR|jj�}x!tD]}|j|d�q5Wn||||�S)a
        Create a new :class:`ConnectionPool` based on host, port and scheme.

        This method is used to actually create the connection pools handed out
        by :meth:`connection_from_url` and companion methods. It is intended
        to be overridden for customization.
        r
N)�pool_classes_by_schemer�copy�SSL_KEYWORDS�pop)r�scheme�host�port�pool_cls�kwargs�kwrrr�	_new_poolGs
	
zPoolManager._new_poolcCs|jj�dS)z�
        Empty our store of pools and direct them all to close.

        This will not affect in-flight connections, but they will not be
        re-used after completion.
        N)r�clear)rrrrr,XszPoolManager.clearr
cCs�|p	d}|p!tj|d�}|||f}|jj�C|jj|�}|r\|S|j|||�}||j|<WdQX|S)z�
        Get a :class:`ConnectionPool` based on the host, port, and scheme.

        If ``port`` isn't given, it will be derived from the ``scheme`` using
        ``urllib3.connectionpool.port_by_scheme``.
        r
�PN)r�getr�lockr+)rr&r'r%�pool_key�poolrrr�connection_from_hostas
z PoolManager.connection_from_hostcCs.t|�}|j|jd|jd|j�S)a*
        Similar to :func:`urllib3.connectionpool.connection_from_url` but
        doesn't pass any additional parameters to the
        :class:`urllib3.connectionpool.ConnectionPool` constructor.

        Additional parameters are taken from the :class:`.PoolManager`
        constructor.
        r'r%)r	r2r&r'r%)r�url�urrr�connection_from_url{s	zPoolManager.connection_from_urlTc	Ks?t|�}|j|jd|jd|j�}d|d<d|d<d|kr`|j|d<n|jdk	r�|jdkr�|j|||�}n|j||j|�}|o�|j	�}|s�|St
||�}|jd	kr�d
}ntj
d||f�|jdd
�d|d<||d<|j|||�S)a]
        Same as :meth:`urllib3.connectionpool.HTTPConnectionPool.urlopen`
        with custom cross-host redirect logic and only sends the request-uri
        portion of the ``url``.

        The given ``url`` parameter must be absolute, such that an appropriate
        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
        r'r%F�assert_same_host�redirectr Nr
i/�GETzRedirecting %s -> %s�retries�r)r	r2r&r'r%r �proxy�urlopen�request_uri�get_redirect_locationr�status�log�infor.)	r�methodr3r7r*r4�conn�response�redirect_locationrrrr<�s&	$

	
zPoolManager.urlopen)�__name__�
__module__�__qualname__�__doc__r;rr+r,r2r5r<rrrrr
#s	csmeZdZdZddd�fdd�Zdd�fdd�Zdd	d
�Zd�fdd
�Z�S)raw
    Behaves just like :class:`PoolManager`, but sends all requests through
    the defined proxy, using the CONNECT method for HTTPS URLs.

    :param proxy_url:
        The URL of the proxy to be used.

    :param proxy_headers:
        A dictionary contaning headers that will be sent to the proxy. In case
        of HTTP they are being sent with each request, while in the
        HTTPS/CONNECT case they are sent only once. Could be used for proxy
        authentication.

    Example:
        >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
        >>> r1 = proxy.request('GET', 'http://google.com/')
        >>> r2 = proxy.request('GET', 'http://httpbin.org/')
        >>> len(proxy.pools)
        1
        >>> r3 = proxy.request('GET', 'https://httpbin.org/')
        >>> r4 = proxy.request('GET', 'https://twitter.com/')
        >>> len(proxy.pools)
        3

    rNcs�t|t�r.d|j|j|jf}nt|�}|jsmtj|jd�}|jd|�}n||_	|pi|_
|j	jd	ks�td|j	j��|j	|d<|j
|d<tt
|�j|||�dS)
Nz
%s://%s:%ir-r'r
rzNot supported proxy scheme %s�_proxy�_proxy_headers)zhttpzhttps)�
isinstancerr%r&r'r	rr.�_replacer;�
proxy_headers�AssertionError�superrr)r�	proxy_urlrr rNrr;r')�	__class__rrr�s		

zProxyManager.__init__r
csV|dkr(tt|�j|||�Stt|�j|jj|jj|jj�S)Nr)rPrr2r;r&r'r%)rr&r'r%)rRrrr2�s

z!ProxyManager.connection_from_hostcCsIidd6}t|�j}|r/||d<n|rE|j|�n|S)z�
        Sets headers needed by proxies: specifically, the Accept and Host
        headers. Only sets headers not provided by the user.
        z*/*�Accept�Host)r	�netloc�update)rr3r �headers_rUrrr�_set_proxy_headers�s

zProxyManager._set_proxy_headersTcsbt|�}|jdkrC|j||jd|j��|d<ntt|�j||||�S)z@Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute.r
r )r	r%rXr.r rPrr<)rrBr3r7r*r4)rRrrr<�s
zProxyManager.urlopen)rFrGrHrIrr2rXr<rr)rRrr�scKstd||�S)NrQ)r)r3r*rrrrs)zkey_filez	cert_filez	cert_reqszca_certszssl_version)�logging�urllib.parser�ImportError�urlparse�_collectionsr�connectionpoolrrr�requestr�utilr	�__all__r!�	getLoggerrFr@r#r
rrrrrr�<module>s&

�Spython3.4/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/__init__.cpython-34.pyc000064400000003420151735047540026670 0ustar00�
�Re��@sdZdZdZdZddlmZmZmZddlm	Z	ddl
mZddlm
Z
mZmZdd	lmZdd
lmZmZmZddlZydd
lmZWn+ek
r�Gdd�dej�ZYnXeje�je��ejdd�Z[dS)z8
urllib3 - Thread-safe connection pooling and re-using.
z(Andrey Petrov (andrey.petrov@shazow.net)�MIT�dev�)�HTTPConnectionPool�HTTPSConnectionPool�connection_from_url)�
exceptions)�encode_multipart_formdata)�PoolManager�ProxyManager�proxy_from_url)�HTTPResponse)�make_headers�get_host�Timeout�N)�NullHandlerc@seZdZdd�ZdS)rcCsdS)N�)�self�recordrr�I/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/__init__.py�emit#szNullHandler.emitN)�__name__�
__module__�__qualname__rrrrrr"srcCs`tjt�}tj�}|jtjd��|j|�|j|�|jdt�|S)z�
    Helper for quickly adding a StreamHandler to the logger. Useful for
    debugging.

    Returns the handler after adding it.
    z%%(asctime)s %(levelname)s %(message)sz-Added an stderr logging handler to logger: %s)	�logging�	getLoggerr�
StreamHandler�setFormatter�	Formatter�
addHandler�setLevel�debug)�level�logger�handlerrrr�add_stderr_logger(s	

r%)�__doc__�
__author__�__license__�__version__�connectionpoolrrr�r�filepostr�poolmanagerr	r
r�responser�utilr
rrrr�ImportError�Handlerrrr�DEBUGr%rrrr�<module>	s"
site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/connectionpool.cpython-34.pyc000064400000045416151735047540030116 0ustar00python3.4�
�Rei�
@sddlZddlZddlZddlmZmZddlZy ddlm	Z	m
Z
mZWn:ek
r�ddl
m	Z	m
Z
mZddl
ZYnXddlmZmZmZmZmZmZmZmZmZmZmZddlmZddlmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&dd	l'm(Z(dd
l)m*Z*ddl+m,Z,m-Z-m.Z.ej/j0Z0ej1e2�Z3e4�Z5Gdd
�d
e4�Z6e7ej8ej9g�Z:Gdd�de6e(�Z;Gdd�de;�Z<dd�Z=dS)�N)�error�timeout)�	LifoQueue�Empty�Full�)�ClosedPoolError�ConnectionError�ConnectTimeoutError�EmptyPoolError�HostChangedError�LocationParseError�
MaxRetryError�SSLError�TimeoutError�ReadTimeoutError�
ProxyError)�CertificateError)�six)�port_by_scheme�DummyConnection�HTTPConnection�HTTPSConnection�VerifiedHTTPSConnection�
HTTPException�BaseSSLError)�RequestMethods)�HTTPResponse)�get_host�is_connection_dropped�Timeoutc@s=eZdZdZdZeZddd�Zdd�ZdS)�ConnectionPoolzz
    Base class for all connection pools, such as
    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.
    NcCs@|dkrt|��n|jd�}||_||_dS)Nz[])r
�strip�host�port)�selfr#r$�r&�O/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/connectionpool.py�__init__Ds
	zConnectionPool.__init__cCs dt|�j|j|jfS)Nz%s(host=%r, port=%r))�type�__name__r#r$)r%r&r&r'�__str__NszConnectionPool.__str__)	r*�
__module__�__qualname__�__doc__�schemer�QueueClsr(r+r&r&r&r'r!;s

r!c
@s�eZdZdZdZeZddejddddddd�Z	dd	�Z
dd
d�Zdd
�Zdd�Z
edd�Zdd�Zdd�Zdddddedddd�ZdS)�HTTPConnectionPoola5
    Thread-safe connection pool for one host.

    :param host:
        Host used for this HTTP Connection (e.g. "localhost"), passed into
        :class:`httplib.HTTPConnection`.

    :param port:
        Port used for this HTTP Connection (None is equivalent to 80), passed
        into :class:`httplib.HTTPConnection`.

    :param strict:
        Causes BadStatusLine to be raised if the status line can't be parsed
        as a valid HTTP/1.0 or 1.1 status line, passed into
        :class:`httplib.HTTPConnection`.

        .. note::
           Only works in Python 2. This parameter is ignored in Python 3.

    :param timeout:
        Socket timeout in seconds for each individual connection. This can
        be a float or integer, which sets the timeout for the HTTP request,
        or an instance of :class:`urllib3.util.Timeout` which gives you more
        fine-grained control over request timeouts. After the constructor has
        been parsed, this is always a `urllib3.util.Timeout` object.

    :param maxsize:
        Number of connections to save that can be reused. More than 1 is useful
        in multithreaded situations. If ``block`` is set to false, more
        connections will be created but they will not be saved once they've
        been used.

    :param block:
        If set to True, no more than ``maxsize`` connections will be used at
        a time. When no free connections are available, the call will block
        until a connection has been released. This is a useful side effect for
        particular multithreaded situations where one does not want to use more
        than maxsize connections per host to prevent flooding.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param _proxy:
        Parsed proxy URL, should not be used directly, instead, see
        :class:`urllib3.connectionpool.ProxyManager`"

    :param _proxy_headers:
        A dictionary with proxy headers, should not be used directly,
        instead, see :class:`urllib3.connectionpool.ProxyManager`"
    �httpNFrc
Ks�tj|||�tj||�||_t|t�sMtj|�}n||_|j|�|_	||_
||_|	p�i|_x$t
|�D]}|j	jd�q�Wd|_d|_tjdkr�|
jdd�n|
|_dS)Nr���source_address)r3r4)r!r(r�strict�
isinstancer �
from_floatrr0�pool�block�proxy�
proxy_headers�xrange�put�num_connections�num_requests�sys�version_info�pop�conn_kw)r%r#r$r6r�maxsizer:�headers�_proxy�_proxy_headersrD�_r&r&r'r(�s"						zHTTPConnectionPool.__init__c
Cs�|jd7_tjd|j|jf�|jd|jd|jd|jjd|j|j	�}|j
dk	r�d|_n|S)	z9
        Return a fresh :class:`HTTPConnection`.
        rz%Starting new HTTP connection (%d): %sr#r$rr6Nr)r?�log�infor#�
ConnectionClsr$r�connect_timeoutr6rDr;�tcp_nodelay)r%�connr&r&r'�	_new_conn�s	zHTTPConnectionPool._new_conncCs�d}y"|jjd|jd|�}WnMtk
rKt|d��Yn-tk
rw|jrst|d��nYnX|r�t|�r�tj	d|j
�|j�n|p�|j�S)a�
        Get a connection. Will return a pooled connection if one is available.

        If no connections are available and :prop:`.block` is ``False``, then a
        fresh connection is returned.

        :param timeout:
            Seconds to wait before giving up and raising
            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
            :prop:`.block` is ``True``.
        Nr:rzPool is closed.z>Pool reached maximum size and no more connections are allowed.z Resetting dropped connection: %s)
r9�getr:�AttributeErrorrrrrrJrKr#�closerP)r%rrOr&r&r'�	_get_conn�s"

	
zHTTPConnectionPool._get_conncCsoy|jj|dd�dSWn7tk
r2Yn&tk
rWtjd|j�YnX|rk|j�ndS)a�
        Put a connection back into the pool.

        :param conn:
            Connection object for the current host and port as returned by
            :meth:`._new_conn` or :meth:`._get_conn`.

        If the pool is already full, the connection is closed and discarded
        because we exceeded maxsize. If connections are discarded frequently,
        then maxsize should be increased.

        If the pool is closed, then the connection will be closed and discarded.
        r:FNz2Connection pool is full, discarding connection: %s)r9r>rRrrJ�warningr#rS)r%rOr&r&r'�	_put_conn�s

zHTTPConnectionPool._put_conncCsC|tkr|jj�St|t�r2|j�Stj|�SdS)z< Helper that always returns a :class:`urllib3.util.Timeout` N)�_Defaultr�cloner7r r8)r%rr&r&r'�_get_timeout�s


zHTTPConnectionPool._get_timeoutcKsH|jd7_|j|�}y-|j�|j|_|j|||�Wn1tk
r~t|d|j|jf��YnX|j	}t
|d�r�|dkr�t||d|��n|tj
kr�|jjtj��q�|jj|�ny;y|jdd�}Wntk
r0|j�}YnXWn�tk
r\t||d|��Yn�tk
r�}	zAdt|	�ks�d	t|	�kr�t||d
��n�WYdd}	~	XnPtk
r}	z0|	jtkr�t||d|��n�WYdd}	~	XnXt|dd
�}
tjd|||
|j|jf�|S)a
        Perform a request on a given urllib connection object taken from our
        pool.

        :param conn:
            a connection from one of our connection pools

        :param timeout:
            Socket timeout in seconds for the request. This can be a
            float or integer, which will set the same timeout value for
            the socket connect and the socket read, or an instance of
            :class:`urllib3.util.Timeout`, which gives you more fine-grained
            control over your timeouts.
        rz0Connection to %s timed out. (connect timeout=%s)�sockrz!Read timed out. (read timeout=%s)�	bufferingTz	timed outzdid not complete (read)zRead timed out.N�
_http_vsn_strzHTTP/?z"%s %s %s" %s %s)r@rY�
start_connectrMr�request�
SocketTimeoutr
r#�read_timeout�hasattrrr �DEFAULT_TIMEOUTrZ�
settimeout�socket�getdefaulttimeout�getresponse�	TypeErrorr�str�SocketError�errno�_blocking_errnos�getattrrJ�debug�status�length)r%rO�method�urlr�httplib_request_kw�timeout_objr`�httplib_response�e�http_versionr&r&r'�
_make_request
sV

	

z HTTPConnectionPool._make_requestcCs\|jd}|_y0x)|jdd�}|r|j�qqWWntk
rWYnXdS)zD
        Close all pooled connections and disable the pool.
        Nr:F)r9rQrSr)r%�old_poolrOr&r&r'rSas
zHTTPConnectionPool.closecCs�|jd�rdSt|�\}}}|jrJ|rJtj|�}n(|jrr|tj|�krrd}n|||f|j|j|jfkS)zj
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        �/TN)�
startswithrr$rrQr/r#)r%rqr/r#r$r&r&r'�is_same_hostqs	zHTTPConnectionPool.is_same_host�Tc#Ks]|dkr|j}n|dkrB|dk	rBt||��n|
dkrc|jdd�}
n|r�|j|�r�t|||d��nd}|jdkr�|j�}|j|j�nd}
z�yh|j	d|	�}|j
|||d|d	|d
|�}|
o|}tj|d|d||�}Wn!t
k
rZt|d
��Ynttfk
r�}zd}
t|��WYdd}~Xn�tttfk
rZ}z�|r�|j�d}n|sBt|t�r��nt|t�r|jrtd|��n|dkr-td|��nt|||��n|}
WYdd}~XnXWd|
ru|j|�nX|s�tjd||
|f�|j|||||d||d|d|	d|
|�S|o�|j�}|rY|dk	rY|jdkr
d}ntj d||f�|j|||||d||d|d|	d|
|�S|S)a�
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param body:
            Data to send in the request body (useful for creating
            POST requests, see HTTPConnectionPool.post_url for
            more convenience).

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Number of retries to allow before raising a MaxRetryError exception.
            If `False`, then retries are disabled and any exception is raised
            immediately.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When False, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param \**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        NrF�preload_contentTrr2r�bodyrFr9�
connectionz"No pool connections are available.zCannot connect to proxy.zConnection failed.zARetrying (%d attempts remain) after connection broken by '%r': %s�pool_timeout�release_conni/�GETzRedirecting %s -> %s)!rFrrQr{rr/�copy�updater<rTrwr�from_httplibrrrrrrrrirSr7r;rr	rVrJrU�urlopen�get_redirect_locationrnrK)r%rprqr~rF�retries�redirect�assert_same_hostrr�r��response_kwrO�errrt�
response_conn�responseru�redirect_locationr&r&r'r��sxH



			
	
zHTTPConnectionPool.urlopen)r*r,r-r.r/rrLr rbr(rPrTrVrYrWrwrSr{r�r&r&r&r'r1Us 3!W		r1c@sseZdZdZdZeZddddddddddddddddd�Zdd	�Zd
d�Z	dS)�HTTPSConnectionPoola�
    Same as :class:`.HTTPConnectionPool`, but HTTPS.

    When Python is compiled with the :mod:`ssl` module, then
    :class:`.VerifiedHTTPSConnection` is used, which *can* verify certificates,
    instead of :class:`.HTTPSConnection`.

    :class:`.VerifiedHTTPSConnection` uses one of ``assert_fingerprint``,
    ``assert_hostname`` and ``host`` in this order to verify connections.
    If ``assert_hostname`` is False, no verification is done.

    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs`` and
    ``ssl_version`` are only used if :mod:`ssl` is available and are fed into
    :meth:`urllib3.util.ssl_wrap_socket` to upgrade the connection socket
    into an SSL socket.
    �httpsNFrcKs�tjdkr"|jdd�ntj||||||||||	|�
|
|_||_||_|
|_||_	||_
||_||_dS)Nr3r4r5)r3r4)
rArBrCr1r(�key_file�	cert_file�	cert_reqs�ca_certs�ssl_version�assert_hostname�assert_fingerprintrD)r%r#r$r6rrEr:rFrGrHr�r�r�r�r�r�r�rDr&r&r'r(Ws								zHTTPSConnectionPool.__init__c
Cs�t|t�rj|jd|jd|jd|jd|jd|jd|j�|j	|_	|j
|_
n|jdk	r�y
|j}Wnt
k
r�|j}YnX||j|j|j�|j�n|S)z�
        Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
        and establish the tunnel if proxy is used.
        r�r�r�r�r�r�N)r7r�set_certr�r�r�r�r�r�r�rDr;�
set_tunnelrR�_set_tunnelr#r$r<�connect)r%rOr�r&r&r'�
_prepare_connns"				



z!HTTPSConnectionPool._prepare_conncCs|jd7_tjd|j|jf�|jsE|jtkrTtd��n|j}|j}|jdk	r�|jj}|jj}ni}t	j
s�|j|d<n|j|j
�|jd|d|d|jj|�}|jdk	rd	|_n|j|�S)
zB
        Return a fresh :class:`httplib.HTTPSConnection`.
        rz&Starting new HTTPS connection (%d): %szCCan't connect to HTTPS URL because the SSL module is not available.Nr6r#r$rr)r?rJrKr#rLrrr$r;r�PY3r6r�rDrrMrNr�)r%�actual_host�actual_port�extra_paramsrOr&r&r'rP�s(						zHTTPSConnectionPool._new_conn)
r*r,r-r.r/rrLr(r�rPr&r&r&r'r�Bs		r�cKsKt|�\}}}|dkr4t|d||�St|d||�SdS)a�
    Given a url, return an :class:`.ConnectionPool` instance of its host.

    This is a shortcut for not having to parse out the scheme, host, and port
    of the url before creating an :class:`.ConnectionPool` instance.

    :param url:
        Absolute URL string that must include the scheme. Port is optional.

    :param \**kw:
        Passes additional parameters to the constructor of the appropriate
        :class:`.ConnectionPool`. Useful for specifying things like
        timeout, maxsize, headers, etc.

    Example: ::

        >>> conn = connection_from_url('http://google.com/')
        >>> r = conn.request('GET', '/')
    r�r$N)rr�r1)rq�kwr/r#r$r&r&r'�connection_from_url�sr�)>rArj�loggingrdrrirr_�queuerrr�ImportError�QueuerI�
exceptionsrr	r
rrr
rrrrrZpackages.ssl_match_hostnamer�packagesrrrrrrrrrr^rr�r�utilrrr �movesr=�	getLoggerr*rJ�objectrWr!�set�EAGAIN�EWOULDBLOCKrkr1r�r�r&r&r&r'�<module>s2 
L
4	��lpython3.4/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/fields.cpython-34.pyc000064400000013563151735047540026410 0ustar00�
�ReX�@s]ddlZddlZddlmZddd�Zdd�ZGd	d
�d
e�ZdS)�N�)�sixzapplication/octet-streamcCs!|rtj|�dp|S|S)z�
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    r)�	mimetypes�
guess_type)�filename�default�r�G/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/fields.py�guess_content_type
s	r
cs�t�fdd�dD��s\d|�f}y|jd�Wntk
rTYq\X|Sntjsw�jd��ntjj�d��d|�f��S)a�
    Helper function to format and quote a single header parameter.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows RFC 2231, as
    suggested by RFC 2388 Section 4.4.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as a unicode string.
    c3s|]}|�kVqdS)Nr)�.0�ch)�valuerr	�	<genexpr>(sz&format_header_param.<locals>.<genexpr>z"\
z%s="%s"�asciizutf-8z%s*=%s)�any�encode�UnicodeEncodeErrorr�PY3�email�utils�encode_rfc2231)�namer
�resultr)r
r	�format_header_params

	rc@sseZdZdZdddd�Zedd��Zdd�Zd	d
�Zdd�Z	dddd
d�Z
dS)�RequestFieldaK
    A data container for request body parameters.

    :param name:
        The name of this request field.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field.
    :param headers:
        An optional dict-like object of headers to initially use for the field.
    NcCs@||_||_||_i|_|r<t|�|_ndS)N)�_name�	_filename�data�headers�dict)�selfrrrrrrr	�__init__Ds				zRequestField.__init__cCs�t|t�rNt|�dkr3|\}}}q`|\}}t|�}nd}d}|}|||d|�}|jd|�|S)a�
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from parameter
        of key/value strings AND key/filetuple. A filetuple is a (filename, data, MIME type)
        tuple where the MIME type is optional. For example: ::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        �Nr�content_type)�
isinstance�tuple�lenr
�make_multipart)�cls�	fieldnamer
rrr#�
request_paramrrr	�from_tuplesLszRequestField.from_tuplescCs
t||�S)a
        Overridable helper function to format a single header parameter.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        )r)r rr
rrr	�_render_partms	zRequestField._render_partcCspg}|}t|t�r*|j�}nx6|D].\}}|r1|j|j||��q1q1Wdj|�S)aO
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) typles or a :class:`dict` of (k, v) to format as
            `k1="v1"; k2="v2"; ...`.
        z; )r$r�items�appendr,�join)r �header_parts�parts�iterablerr
rrr	�
_render_partsxs zRequestField._render_partscCs�g}dddg}xD|D]<}|jj|d�r|jd||j|f�qqWxL|jj�D];\}}||krl|r�|jd||f�q�qlqlW|jd�dj|�S)z=
        Renders the headers for this request field.
        zContent-DispositionzContent-TypezContent-LocationFz%s: %sz
)r�getr.r-r/)r �lines�	sort_keys�sort_key�header_name�header_valuerrr	�render_headers�s
%!
zRequestField.render_headersc	Csr|p	d|jd<|jddjd|jd|jfd|jff�g�7<||jd<||jd<d	S)
a|
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        z	form-datazContent-Dispositionz; �rrzContent-TypezContent-LocationN)rr/r3rr)r �content_dispositionr#�content_locationrrr	r'�s
A
zRequestField.make_multipart)�__name__�
__module__�__qualname__�__doc__r!�classmethodr+r,r3r:r'rrrr	r7s!r)	�email.utilsrr�packagesrr
r�objectrrrrr	�<module>s
site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/_collections.cpython-34.pyc000064400000017624151735047540027542 0ustar00python3.4�
�Re��@s�ddlmZmZyddlmZWn%ek
rQGdd�d�ZYnXyddlmZWn"ek
r�ddlmZYnXddlm	Z	dd	gZ
e�ZGd
d�de�Z
Gdd	�d	e�ZdS)
�)�Mapping�MutableMapping)�RLockc@s(eZdZdd�Zdd�ZdS)rcCsdS)N�)�selfrr�M/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/_collections.py�	__enter__szRLock.__enter__cCsdS)Nr)r�exc_type�	exc_value�	tracebackrrr�__exit__szRLock.__exit__N)�__name__�
__module__�__qualname__rrrrrrrsr)�OrderedDict�)�
itervalues�RecentlyUsedContainer�HTTPHeaderDictc@s�eZdZdZeZdddd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dS)ra�
    Provides a thread-safe dict-like container which maintains up to
    ``maxsize`` keys while throwing away the least-recently-used keys beyond
    ``maxsize``.

    :param maxsize:
        Maximum number of recent elements to retain.

    :param dispose_func:
        Every time an item is evicted from the container,
        ``dispose_func(value)`` is called.  Callback which will get called
    �
NcCs1||_||_|j�|_t�|_dS)N)�_maxsize�dispose_func�ContainerCls�
_containerr�lock)r�maxsizerrrr�__init__0s		zRecentlyUsedContainer.__init__c
Cs7|j�(|jj|�}||j|<|SWdQXdS)N)rr�pop)r�key�itemrrr�__getitem__7s

z!RecentlyUsedContainer.__getitem__c
Cs�t}|j�]|jj|t�}||j|<t|j�|jkrh|jjdd�\}}nWdQX|jr�|tk	r�|j|�ndS)N�lastF)�_Nullrr�get�lenr�popitemr)rr�value�
evicted_value�_keyrrr�__setitem__>s

$z!RecentlyUsedContainer.__setitem__c	Cs?|j�|jj|�}WdQX|jr;|j|�ndS)N)rrrr)rrr&rrr�__delitem__Ms
	z!RecentlyUsedContainer.__delitem__c	Cs!|j�t|j�SWdQXdS)N)rr$r)rrrr�__len__Ts
zRecentlyUsedContainer.__len__cCstd��dS)Nz7Iteration over this class is unlikely to be threadsafe.)�NotImplementedError)rrrr�__iter__XszRecentlyUsedContainer.__iter__c	Cs`|j�'t|jj��}|jj�WdQX|jr\x|D]}|j|�qBWndS)N)r�listr�values�clearr)rr/r&rrrr0[s
	
zRecentlyUsedContainer.clearcCs!|j�|jj�SWdQXdS)N)rr�keys)rrrrr1fs
zRecentlyUsedContainer.keys)r
rr�__doc__rrrr r)r*r+r-r0r1rrrrr sc@s�eZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)raZ
    :param headers:
        An iterable of field-value pairs. Must not contain multiple field names
        when compared case-insensitively.

    :param kwargs:
        Additional field-value pairs to pass in to ``dict.update``.

    A ``dict`` like container for storing HTTP Headers.

    Field names are stored and compared case-insensitively in compliance with
    RFC 2616. Iteration provides the first case-sensitive key seen for each
    case-insensitive pair.

    Using ``__setitem__`` syntax overwrites fields that compare equal
    case-insensitively in order to maintain ``dict``'s api. For fields that
    compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
    in a loop.

    If multiple fields that are equal case-insensitively are passed to the
    constructor or ``.update``, the behavior is undefined and some will be
    lost.

    >>> headers = HTTPHeaderDict()
    >>> headers.add('Set-Cookie', 'foo=bar')
    >>> headers.add('set-cookie', 'baz=quxx')
    >>> headers['content-length'] = '7'
    >>> headers['SET-cookie']
    'foo=bar, baz=quxx'
    >>> headers['Content-Length']
    '7'

    If you want to access the raw headers with their original casing
    for debugging purposes you can access the private ``._data`` attribute
    which is a normal python ``dict`` that maps the case-insensitive key to a
    list of tuples stored as (case-sensitive-original-name, value). Using the
    structure from above as our example:

    >>> headers._data
    {'set-cookie': [('Set-Cookie', 'foo=bar'), ('set-cookie', 'baz=quxx')],
    'content-length': [('content-length', '7')]}
    NcKs2i|_|dkri}n|j||�dS)N)�_data�update)r�headers�kwargsrrrr�s		zHTTPHeaderDict.__init__cCs,|jj|j�g�j||f�dS)z�Adds a (name, value) pair, doesn't overwrite the value if it already
        exists.

        >>> headers = HTTPHeaderDict(foo='bar')
        >>> headers.add('Foo', 'baz')
        >>> headers['foo']
        'bar, baz'
        N)r3�
setdefault�lower�append)rrr&rrr�add�s	zHTTPHeaderDict.addcCs!||kr||jd�SgS)zmReturns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist.z, )�split)rrrrr�getlist�szHTTPHeaderDict.getlistcCsOt�}x?|jD]4}x+|j|D]\}}|j||�q'WqW|S)N)rr3r:)r�hr�rawkeyr&rrr�copy�s
	zHTTPHeaderDict.copycsat�t�sdSt���t�fdd��jD��t�fdd��jD��kS)NFc3s|]}|�|fVqdS)Nr)�.0�k1)rrr�	<genexpr>�sz(HTTPHeaderDict.__eq__.<locals>.<genexpr>c3s|]}|�|fVqdS)Nr)r@�k2)�otherrrrB�s)�
isinstancerr�dictr3)rrDr)rDrr�__eq__�s
zHTTPHeaderDict.__eq__cCs-|j|j�}djdd�|D��S)Nz, css|]}|dVqdS)rNr)r@r&rrrrB�sz-HTTPHeaderDict.__getitem__.<locals>.<genexpr>)r3r8�join)rrr/rrrr �szHTTPHeaderDict.__getitem__cCs ||fg|j|j�<dS)N)r3r8)rrr&rrrr)�szHTTPHeaderDict.__setitem__cCs|j|j�=dS)N)r3r8)rrrrrr*�szHTTPHeaderDict.__delitem__cCs
t|j�S)N)r$r3)rrrrr+�szHTTPHeaderDict.__len__ccs+x$t|j�D]}|ddVqWdS)Nr)rr3)rr5rrrr-�szHTTPHeaderDict.__iter__cCs d|jjt|j��fS)Nz%s(%r))�	__class__r
rF�items)rrrr�__repr__�szHTTPHeaderDict.__repr__)r
rrr2rr:r<r?rGr r)r*r+r-rKrrrrrks*N)�collectionsrr�	threadingr�ImportErrorrZpackages.ordered_dictZpackages.sixr�__all__�objectr"rrrrrr�<module>s

	Kpython3.4/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/request.cpython-34.pyc000064400000012536151735047540026631 0ustar00�
�Re��@slyddlmZWn"ek
r8ddlmZYnXddlmZdgZGdd�de�ZdS)�)�	urlencode�)�encode_multipart_formdata�RequestMethodsc@s�eZdZdZeddddg�Zddd�Zddd	dd
d�Zdddd
�Zddd�Z	ddd	ddd�Z
dS)ra�
    Convenience mixin for classes who implement a :meth:`urlopen` method, such
    as :class:`~urllib3.connectionpool.HTTPConnectionPool` and
    :class:`~urllib3.poolmanager.PoolManager`.

    Provides behavior for making common types of HTTP request methods and
    decides which type of request field encoding to use.

    Specifically,

    :meth:`.request_encode_url` is for sending requests whose fields are encoded
    in the URL (such as GET, HEAD, DELETE).

    :meth:`.request_encode_body` is for sending requests whose fields are
    encoded in the *body* of the request using multipart or www-form-urlencoded
    (such as for POST, PUT, PATCH).

    :meth:`.request` is for making any kind of request, it will look up the
    appropriate encoding format and use one of the above two methods to make
    the request.

    Initializer parameters:

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
    �DELETE�GET�HEAD�OPTIONSNcCs|p	i|_dS)N)�headers)�selfr
�r�H/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/request.py�__init__1szRequestMethods.__init__TcKstd��dS)NzMClasses extending RequestMethods must implement their own ``urlopen`` method.)�NotImplemented)r�method�url�bodyr
�encode_multipart�multipart_boundary�kwrrr
�urlopen4szRequestMethods.urlopencKs]|j�}||jkr:|j||d|d||�S|j||d|d||�SdS)a�
        Make a request using :meth:`urlopen` with the appropriate encoding of
        ``fields`` based on the ``method`` used.

        This is a convenience method that requires the least amount of manual
        effort. It can be used in most situations, while still having the option
        to drop down to more specific methods when necessary, such as
        :meth:`request_encode_url`, :meth:`request_encode_body`,
        or even the lowest level :meth:`urlopen`.
        �fieldsr
N)�upper�_encode_url_methods�request_encode_url�request_encode_body)rrrrr
�
urlopen_kwrrr
�request:szRequestMethods.requestcKs0|r|dt|�7}n|j|||�S)z�
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
        �?)rr)rrrrrrrr
rPsz!RequestMethods.request_encode_urlcKs�|r't|pid|�\}}	nt|p3i�d}}	|dkrX|j}ni|	d6}
|
j|�|j||d|d|
|�S)a�
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the body. This is useful for request methods like POST, PUT, PATCH, etc.

        When ``encode_multipart=True`` (default), then
        :meth:`urllib3.filepost.encode_multipart_formdata` is used to encode the
        payload with the appropriate content type. Otherwise
        :meth:`urllib.urlencode` is used with the
        'application/x-www-form-urlencoded' content type.

        Multipart encoding must be used when posting files, and it's reasonably
        safe to use it in other times too. However, it may break request signing,
        such as with OAuth.

        Supports an optional ``fields`` parameter of key/value strings AND
        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
        the MIME type is optional. For example: ::

            fields = {
                'foo': 'bar',
                'fakefile': ('foofile.txt', 'contents of foofile'),
                'realfile': ('barfile.txt', open('realfile').read()),
                'typedfile': ('bazfile.bin', open('bazfile').read(),
                              'image/jpeg'),
                'nonamefile': 'contents of nonamefile field',
            }

        When uploading a file, providing a filename (the first parameter of the
        tuple) is optional but recommended to best mimick behavior of browsers.

        Note that if ``headers`` are supplied, the 'Content-Type' header will be
        overwritten because it depends on the dynamic random boundary string
        which is used to compose the body of the request. The random boundary
        string can be explicitly set with the ``multipart_boundary`` parameter.
        �boundaryz!application/x-www-form-urlencodedNzContent-Typerr
)rrr
�updater)rrrrr
rrrr�content_type�headers_rrr
rYs&


z"RequestMethods.request_encode_body)�__name__�
__module__�__qualname__�__doc__�setrrrrrrrrrr
rs	N)	�urllib.parser�ImportError�urllib�filepostr�__all__�objectrrrrr
�<module>s
	python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/filepost.cpython-34.pyc000064400000005336151735047550026767 0ustar00�
�Re�	�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZejd�d	Z
d
d�Zdd
�Zdd�Zddd�ZdS)�N)�uuid4)�BytesIO�)�six)�b)�RequestFieldzutf-8�cCs
t�jS)zM
    Our embarassingly-simple replacement for mimetools.choose_boundary.
    )r�hex�r
r
�I/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/filepost.py�choose_boundarysrccsgt|t�r!tj|�}nt|�}x3|D]+}t|t�rQ|Vq4tj|�Vq4WdS)z�
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    N)�
isinstance�dictr�	iteritems�iterr�from_tuples)�fields�i�fieldr
r
r�iter_field_objectss
rcCs:t|t�r)dd�tj|�D�Sdd�|D�S)a-
    .. deprecated:: 1.6

    Iterate over fields.

    The addition of :class:`~urllib3.fields.RequestField` makes this function
    obsolete. Instead, use :func:`iter_field_objects`, which returns
    :class:`~urllib3.fields.RequestField` objects.

    Supports list of (k, v) tuples and dicts.
    css!|]\}}||fVqdS)Nr
)�.0�k�vr
r
r�	<genexpr><sziter_fields.<locals>.<genexpr>css!|]\}}||fVqdS)Nr
)rrrr
r
rr>s)r
rrr)rr
r
r�iter_fields/srcCst�}|dkr!t�}nx�t|�D]�}|jtd|��t|�j|j��|j}t|t	�r�t
|�}nt|tj�r�t|�j|�n
|j|�|jd�q.W|jtd|��t
d|�}|j
�|fS)aJ
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`mimetools.choose_boundary`.
    Nz--%s
s
z--%s--
z multipart/form-data; boundary=%s)rrr�writer�writer�render_headers�datar
�int�strr�	text_type�getvalue)r�boundary�bodyrr�content_typer
r
r�encode_multipart_formdataAs 		
r&)�codecs�	mimetypes�uuidr�ior�packagesrZpackages.sixrrr�lookuprrrrr&r
r
r
r�<module>spython3.4/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/response.cpython-34.pyc000064400000022157151735047550027000 0ustar00�
�Rek(�@s�ddlZddlZddlZddlmZddlmZddlmZ	m
Z
ddlmZej
e�ZGdd�de�Zd	d
�ZGdd�dej�ZdS)
�N�)�HTTPHeaderDict)�DecodeError)�string_types�binary_type)�is_fp_closedc@s4eZdZdd�Zdd�Zdd�ZdS)�DeflateDecodercCs(d|_t�|_tj�|_dS)NT)�
_first_tryr�_data�zlib�
decompressobj�_obj)�self�r�I/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/response.py�__init__s	zDeflateDecoder.__init__cCst|j|�S)N)�getattrr
)r�namerrr�__getattr__szDeflateDecoder.__getattr__cCs�|js|jj|�S|j|7_y|jj|�SWnUtjk
r�d|_tjtj�|_z|j|j�SWdd|_XYnXdS)NF)r	r
�
decompressr
r�errorr�	MAX_WBITS)r�datarrrrs		zDeflateDecoder.decompressN)�__name__�
__module__�__qualname__rrrrrrrrsrcCs'|dkr tjdtj�St�S)N�gzip�)rrrr)�moderrr�_get_decoder/src
@s0eZdZdZddgZdddddgZd	d
ddd
dddd
d
d
d
d�Zdd�Zdd�Ze	dd��Z
dd�Zd
d
ddd�Zd.d
dd�Z
edd��Zd d!�Zd
d"d#�Zd$d%�Ze	d&d'��Zd(d)�Zd*d+�Zd,d-�Zd
S)/�HTTPResponsea
    HTTP Response container.

    Backwards-compatible to httplib's HTTPResponse but the response ``body`` is
    loaded and decoded on-demand when the ``data`` property is accessed.

    Extra parameters for behaviour not present in httplib.HTTPResponse:

    :param preload_content:
        If True, the response's body will be preloaded during construction.

    :param decode_content:
        If True, attempts to decode specific content-encoding's based on headers
        (like 'gzip' and 'deflate') will be skipped and raw data will be used
        instead.

    :param original_response:
        When this HTTPResponse wrapper is generated from an httplib.HTTPResponse
        object, it's convenient to include the original for debug purposes. It's
        otherwise unused.
    r�deflatei-i.i/i3i4�NrTcCs�t�|_|r%|jj|�n||_||_||_||_||_d|_|rvt	|t
�rv|nd|_d|_|	|_
d|_|
|_||_t|d�r�||_n|r�|jr�|jd|�|_ndS)Nr�read�decode_content)r�headers�update�status�version�reason�strictr$�_decoder�
isinstance�
basestring�_body�_fp�_original_response�_fp_bytes_read�_pool�_connection�hasattrr#)r�bodyr%r'r(r)r*�preload_contentr$�original_response�pool�
connectionrrrrPs&						$					zHTTPResponse.__init__cCs&|j|jkr"|jjd�SdS)a
        Should we redirect and where to?

        :returns: Truthy redirect location string if we got a redirect status
            code and valid location. ``None`` if redirect status and no
            location. ``False`` if not a redirect status code.
        �locationF)r'�REDIRECT_STATUSESr%�get)rrrr�get_redirect_locationlsz"HTTPResponse.get_redirect_locationcCs8|js|jrdS|jj|j�d|_dS)N)r2r3�	_put_conn)rrrr�release_connyszHTTPResponse.release_conncCs-|jr|jS|jr)|jdd�SdS)N�
cache_contentT)r.r/r#)rrrrr�s		zHTTPResponse.datacCs|jS)z�
        Obtain the number of bytes pulled over the wire so far. May differ from
        the amount of content returned by :meth:``HTTPResponse.read`` if bytes
        are encoded on the wire (e.g, compressed).
        )r1)rrrr�tell�szHTTPResponse.tellFc	Cs�|jjdd�j�}|jdkrN||jkrNt|�|_qNn|dkrf|j}n|jdkrydSd}zD|dkr�|jj�}d}nAd}|jj|�}|dkr�|r�|jj	�d}n|j
t|�7_
y(|r#|jr#|jj|�}nWnAt
tjfk
rg}ztd||��WYdd}~XnX|r�|r�|jr�|jjt��}|||jj�7}n|r�||_n|SWd|jr�|jj�r�|j�nXdS)aP
        Similar to :meth:`httplib.HTTPResponse.read`, but with two additional
        parameters: ``decode_content`` and ``cache_content``.

        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the ``.data`` property to continue working
            after having ``.read()`` the file object. (Overridden if ``amt`` is
            set.)
        zcontent-encodingr"NFTrzEReceived response with content-encoding: %s, but failed to decode it.)r%r<�lowerr+�CONTENT_DECODERSrr$r/r#�closer1�lenr�IOErrorrrrr�flushr.r0�isclosedr?)	r�amtr$r@�content_encoding�
flush_decoderr�e�bufrrrr#�sF	
	zHTTPResponse.read�rccs@x9t|j�s;|jd|d|�}|r|VqqWdS)a_
        A generator wrapper for the read() method. A call will block until
        ``amt`` bytes have been read from the connection or until the
        connection is closed.

        :param amt:
            How much of the content to read. The generator will return up to
            much data per iteration, but may return less. This is particularly
            likely when using compressed data. However, the empty string will
            never be returned.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
        rIr$N)rr/r#)rrIr$rrrr�stream�szHTTPResponse.streamcKs�t�}x*|j�D]\}}|j||�qWt|dd�}|d|d|d|jd|jd|jd|d||�S)	a
        Given an :class:`httplib.HTTPResponse` instance ``r``, return a
        corresponding :class:`urllib3.response.HTTPResponse` object.

        Remaining parameters are passed to the HTTPResponse constructor, along
        with ``original_response=r``.
        r*rr5r%r'r(r)r7)r�
getheaders�addrr'r(r))�ResponseCls�r�response_kwr%�k�vr*rrr�from_httplib�s
				zHTTPResponse.from_httplibcCs|jS)N)r%)rrrrrPszHTTPResponse.getheaderscCs|jj||�S)N)r%r<)rr�defaultrrr�	getheaderszHTTPResponse.getheadercCs|js|jj�ndS)N)�closedr/rD)rrrrrDs	zHTTPResponse.closecCsV|jdkrdSt|jd�r/|jjSt|jd�rN|jj�SdSdS)NTrZrH)r/r4rZrH)rrrrrZs

zHTTPResponse.closedcCsM|jdkrtd��n+t|jd�r=|jj�Std��dS)Nz-HTTPResponse has no file to get a fileno from�filenozPThe file-like object  this HTTPResponse is wrapped around has no file descriptor)r/rFr4r[)rrrrr[&s

zHTTPResponse.filenocCs2|jdk	r.t|jd�r.|jj�SdS)NrG)r/r4rG)rrrrrG/s!zHTTPResponse.flushcCsdS)NTr)rrrr�readable3szHTTPResponse.readablei)rrr�__doc__rCr;rr=r?�propertyrrAr#rO�classmethodrWrPrYrDrZr[rGr\rrrrr 6s(	
	N	r )�loggingr�io�_collectionsr�
exceptionsrZpackages.sixrr-r�utilr�	getLoggerr�log�objectrr�IOBaser rrrr�<module>spython3.4/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/connection.cpython-34.pyc000064400000012176151735047550027301 0ustar00�
�Re��@s�ddlZddlZddlmZyddlmZmZWn(ek
rlddl	mZmZYnXGdd�de
�ZytdZeZ
Gdd�de�Zyddlm
ZWn"ek
r�ddl	m
ZYnXddlZejZWneefk
rYnXd	d
lmZd	dlmZd	dlmZd	d
lmZmZmZmZidd6dd6ZGdd�dee
�ZGdd�de�Z
Gdd�de
�Zer�e
Z eZ
ndS)�N)�timeout)�HTTPConnection�
HTTPExceptionc@seZdZdZdS)�DummyConnectionz-Used to detect a failed ConnectionCls import.N)�__name__�
__module__�__qualname__�__doc__�r
r
�K/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/connection.pyrsrc@seZdZdS)�BaseSSLErrorN)rrrr
r
r
rrsr)�HTTPSConnection�)�ConnectTimeoutError)�match_hostname)�six)�assert_fingerprint�resolve_cert_reqs�resolve_ssl_version�ssl_wrap_socket�P�httpi��httpsc@sVeZdZdZedZdZdd�Zdd�Zdd	�Z	d
d�Z
dS)
rz�
    Based on httplib.HTTPConnection but provides an extra constructor
    backwards-compatibility layer between older and newer Pythons.
    rrcOsgtjr|jdd�ntjdkr>|jdd�n|jd�|_tj|||�dS)N�strict���source_address)rr)	r�PY3�pop�sys�version_info�getr�_HTTPConnection�__init__)�self�args�kwr
r
rr#Ds	zHTTPConnection.__init__cCsfg}|jr"|j|j�ntj|j|jf|j|�}|jtjtj	|j
�|S)zq Establish a socket connection and set nodelay settings on it.

        :return: a new socket connection
        )r�append�socket�create_connection�host�portr�
setsockopt�IPPROTO_TCP�TCP_NODELAY�tcp_nodelay)r$�
extra_args�connr
r
r�	_new_connPs	zHTTPConnection._new_conncCs,||_t|dd�r(|j�ndS)N�_tunnel_host)�sock�getattr�_tunnel)r$r1r
r
r�
_prepare_conn`s	zHTTPConnection._prepare_conncCs|j�}|j|�dS)N)r2r7)r$r1r
r
r�connectiszHTTPConnection.connectN)rrrr	�port_by_scheme�default_portr/r#r2r7r8r
r
r
rr9s
	rc@sDeZdZedZddddejdd�Zdd�ZdS)r
rNc	KsAtj|||d|d||�||_||_d|_dS)Nrrr)rr#�key_file�	cert_file�	_protocol)r$r*r+r;r<rrr&r
r
rr#qs

		zHTTPSConnection.__init__cCs;|j�}|j|�tj||j|j�|_dS)N)r2r7�ssl�wrap_socketr;r<r4)r$r1r
r
rr8~s
zHTTPSConnection.connect)	rrrr9r:r(�_GLOBAL_DEFAULT_TIMEOUTr#r8r
r
r
rr
ns
	r
c@sXeZdZdZdZdZdZiZdddddddd�Zdd�Z	dS)�VerifiedHTTPSConnectionz[
    Based on httplib.HTTPSConnection but wraps the socket with
    SSL certification.
    NcCs:||_||_||_||_||_||_dS)N)r;r<�	cert_reqs�ca_certs�assert_hostnamer)r$r;r<rBrCrDrr
r
r�set_cert�s					z VerifiedHTTPSConnection.set_certcCs�y1tjd|j|jfd|j|j�}Wn1tk
rdt|d|j|jf��YnX|jtj	tj
|j�t|j
�}t|j�}|j}t|dd�r�||_|j�|j}nt||j|jd|d|jd|d|�|_|tjkr}|jrIt|jjd	d
�|j�q}|jdk	r}t|jj�|jps|�q}ndS)N�addressrz0Connection to %s timed out. (connect timeout=%s)r3rBrC�server_hostname�ssl_version�binary_formTF)r(r)r*r+r�conn_kw�
SocketTimeoutrr,r-r.r/rrBrrHr5r4r6r3rr;r<rCr>�	CERT_NONEr�getpeercertrDr)r$r4�resolved_cert_reqs�resolved_ssl_version�hostnamer
r
rr8�s:	

		
		
zVerifiedHTTPSConnection.connect)
rrrr	rBrCrHrJrEr8r
r
r
rrA�s	rA)!rr(rrK�http.clientrr"r�ImportError�httplib�objectrr>r
�
BaseExceptionr�_HTTPSConnection�SSLError�AttributeError�
exceptionsrZpackages.ssl_match_hostnamer�packagesr�utilrrrrr9rA�UnverifiedHTTPSConnectionr
r
r
r�<module>s@


"
5Epython3.4/site-packages/pip/_vendor/requests/packages/urllib3/__pycache__/exceptions.cpython-34.pyc000064400000012244151735047550027317 0ustar00�
�Re$
�@sjGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�dee�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�dee�Zd S)!c@seZdZdZdS)�	HTTPErrorz#Base exception used by this module.N)�__name__�
__module__�__qualname__�__doc__�rr�K/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/exceptions.pyr
src@s.eZdZdZdd�Zdd�ZdS)�	PoolErrorz/Base exception for errors caused within a pool.cCs'||_tj|d||f�dS)Nz%s: %s)�poolr�__init__)�selfr	�messagerrrr
s	zPoolError.__init__cCs
|jdfS)N)NN)�	__class__)rrrr�
__reduce__szPoolError.__reduce__N)rrrrr
rrrrrrsrc@s.eZdZdZdd�Zdd�ZdS)�RequestErrorz8Base exception for PoolErrors that have associated URLs.cCs ||_tj|||�dS)N)�urlrr
)rr	rrrrrr
s	zRequestError.__init__cCs|jd|jdffS)N)r
r)rrrrr szRequestError.__reduce__N)rrrrr
rrrrrrsrc@seZdZdZdS)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.N)rrrrrrrrr%src@seZdZdZdS)�
ProxyErrorz,Raised when the connection to a proxy fails.N)rrrrrrrrr*src@seZdZdZdS)�ConnectionErrorz&Raised when a normal connection fails.N)rrrrrrrrr/src@seZdZdZdS)�DecodeErrorz;Raised when automatic decoding based on Content-Type fails.N)rrrrrrrrr4src@s%eZdZdZddd�ZdS)�
MaxRetryErrorz6Raised when the maximum number of retries is exceeded.NcCsZ||_d|}|r6|dt|�|f7}n
|d7}tj||||�dS)Nz!Max retries exceeded with url: %sz (Caused by %s: %s)z (Caused by redirect))�reason�typerr
)rr	rrrrrrr
>s	

zMaxRetryError.__init__)rrrrr
rrrrr;src@s%eZdZdZddd�ZdS)�HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.�cCs-d|}tj||||�||_dS)Nz)Tried to open a foreign host with url: %s)rr
�retries)rr	rrrrrrr
Ms
zHostChangedError.__init__N)rrrrr
rrrrrJsrc@seZdZdZdS)�TimeoutStateErrorz3 Raised when passing an invalid state to a timeout N)rrrrrrrrrSsrc@seZdZdZdS)�TimeoutErrorz� Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    N)rrrrrrrrrXsrc@seZdZdZdS)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverN)rrrrrrrrrasrc@seZdZdZdS)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverN)rrrrrrrrrhsrc@seZdZdZdS)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.N)rrrrrrrrrmsrc@seZdZdZdS)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.N)rrrrrrrrr rsr c@s"eZdZdZdd�ZdS)�LocationParseErrorz=Raised when get_host or similar fails to parse the URL input.cCs'd|}tj||�||_dS)NzFailed to parse: %s)rr
�location)rr"rrrrr
zs
zLocationParseError.__init__N)rrrrr
rrrrr!wsr!N)�	Exceptionrrrrrrrrrrrrrrr �
ValueErrorr!rrrr�<module>
s		python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py000064400000024153151735047550022514 0ustar00# urllib3/response.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php


import logging
import zlib
import io

from ._collections import HTTPHeaderDict
from .exceptions import DecodeError
from .packages.six import string_types as basestring, binary_type
from .util import is_fp_closed


log = logging.getLogger(__name__)


class DeflateDecoder(object):

    def __init__(self):
        self._first_try = True
        self._data = binary_type()
        self._obj = zlib.decompressobj()

    def __getattr__(self, name):
        return getattr(self._obj, name)

    def decompress(self, data):
        if not self._first_try:
            return self._obj.decompress(data)

        self._data += data
        try:
            return self._obj.decompress(data)
        except zlib.error:
            self._first_try = False
            self._obj = zlib.decompressobj(-zlib.MAX_WBITS)
            try:
                return self.decompress(self._data)
            finally:
                self._data = None


def _get_decoder(mode):
    if mode == 'gzip':
        return zlib.decompressobj(16 + zlib.MAX_WBITS)

    return DeflateDecoder()


class HTTPResponse(io.IOBase):
    """
    HTTP Response container.

    Backwards-compatible to httplib's HTTPResponse but the response ``body`` is
    loaded and decoded on-demand when the ``data`` property is accessed.

    Extra parameters for behaviour not present in httplib.HTTPResponse:

    :param preload_content:
        If True, the response's body will be preloaded during construction.

    :param decode_content:
        If True, attempts to decode specific content-encoding's based on headers
        (like 'gzip' and 'deflate') will be skipped and raw data will be used
        instead.

    :param original_response:
        When this HTTPResponse wrapper is generated from an httplib.HTTPResponse
        object, it's convenient to include the original for debug purposes. It's
        otherwise unused.
    """

    CONTENT_DECODERS = ['gzip', 'deflate']
    REDIRECT_STATUSES = [301, 302, 303, 307, 308]

    def __init__(self, body='', headers=None, status=0, version=0, reason=None,
                 strict=0, preload_content=True, decode_content=True,
                 original_response=None, pool=None, connection=None):

        self.headers = HTTPHeaderDict()
        if headers:
            self.headers.update(headers)
        self.status = status
        self.version = version
        self.reason = reason
        self.strict = strict
        self.decode_content = decode_content

        self._decoder = None
        self._body = body if body and isinstance(body, basestring) else None
        self._fp = None
        self._original_response = original_response
        self._fp_bytes_read = 0

        self._pool = pool
        self._connection = connection

        if hasattr(body, 'read'):
            self._fp = body

        if preload_content and not self._body:
            self._body = self.read(decode_content=decode_content)

    def get_redirect_location(self):
        """
        Should we redirect and where to?

        :returns: Truthy redirect location string if we got a redirect status
            code and valid location. ``None`` if redirect status and no
            location. ``False`` if not a redirect status code.
        """
        if self.status in self.REDIRECT_STATUSES:
            return self.headers.get('location')

        return False

    def release_conn(self):
        if not self._pool or not self._connection:
            return

        self._pool._put_conn(self._connection)
        self._connection = None

    @property
    def data(self):
        # For backwords-compat with earlier urllib3 0.4 and earlier.
        if self._body:
            return self._body

        if self._fp:
            return self.read(cache_content=True)

    def tell(self):
        """
        Obtain the number of bytes pulled over the wire so far. May differ from
        the amount of content returned by :meth:``HTTPResponse.read`` if bytes
        are encoded on the wire (e.g, compressed).
        """
        return self._fp_bytes_read

    def read(self, amt=None, decode_content=None, cache_content=False):
        """
        Similar to :meth:`httplib.HTTPResponse.read`, but with two additional
        parameters: ``decode_content`` and ``cache_content``.

        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the ``.data`` property to continue working
            after having ``.read()`` the file object. (Overridden if ``amt`` is
            set.)
        """
        # Note: content-encoding value should be case-insensitive, per RFC 2616
        # Section 3.5
        content_encoding = self.headers.get('content-encoding', '').lower()
        if self._decoder is None:
            if content_encoding in self.CONTENT_DECODERS:
                self._decoder = _get_decoder(content_encoding)
        if decode_content is None:
            decode_content = self.decode_content

        if self._fp is None:
            return

        flush_decoder = False

        try:
            if amt is None:
                # cStringIO doesn't like amt=None
                data = self._fp.read()
                flush_decoder = True
            else:
                cache_content = False
                data = self._fp.read(amt)
                if amt != 0 and not data:  # Platform-specific: Buggy versions of Python.
                    # Close the connection when no data is returned
                    #
                    # This is redundant to what httplib/http.client _should_
                    # already do.  However, versions of python released before
                    # December 15, 2012 (http://bugs.python.org/issue16298) do not
                    # properly close the connection in all cases. There is no harm
                    # in redundantly calling close.
                    self._fp.close()
                    flush_decoder = True

            self._fp_bytes_read += len(data)

            try:
                if decode_content and self._decoder:
                    data = self._decoder.decompress(data)
            except (IOError, zlib.error) as e:
                raise DecodeError(
                    "Received response with content-encoding: %s, but "
                    "failed to decode it." % content_encoding,
                    e)

            if flush_decoder and decode_content and self._decoder:
                buf = self._decoder.decompress(binary_type())
                data += buf + self._decoder.flush()

            if cache_content:
                self._body = data

            return data

        finally:
            if self._original_response and self._original_response.isclosed():
                self.release_conn()

    def stream(self, amt=2**16, decode_content=None):
        """
        A generator wrapper for the read() method. A call will block until
        ``amt`` bytes have been read from the connection or until the
        connection is closed.

        :param amt:
            How much of the content to read. The generator will return up to
            much data per iteration, but may return less. This is particularly
            likely when using compressed data. However, the empty string will
            never be returned.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
        """
        while not is_fp_closed(self._fp):
            data = self.read(amt=amt, decode_content=decode_content)

            if data:
                yield data


    @classmethod
    def from_httplib(ResponseCls, r, **response_kw):
        """
        Given an :class:`httplib.HTTPResponse` instance ``r``, return a
        corresponding :class:`urllib3.response.HTTPResponse` object.

        Remaining parameters are passed to the HTTPResponse constructor, along
        with ``original_response=r``.
        """

        headers = HTTPHeaderDict()
        for k, v in r.getheaders():
            headers.add(k, v)

        # HTTPResponse objects in Python 3 don't have a .strict attribute
        strict = getattr(r, 'strict', 0)
        return ResponseCls(body=r,
                           headers=headers,
                           status=r.status,
                           version=r.version,
                           reason=r.reason,
                           strict=strict,
                           original_response=r,
                           **response_kw)

    # Backwards-compatibility methods for httplib.HTTPResponse
    def getheaders(self):
        return self.headers

    def getheader(self, name, default=None):
        return self.headers.get(name, default)

    # Overrides from io.IOBase
    def close(self):
        if not self.closed:
            self._fp.close()

    @property
    def closed(self):
        if self._fp is None:
            return True
        elif hasattr(self._fp, 'closed'):
            return self._fp.closed
        elif hasattr(self._fp, 'isclosed'):  # Python 2
            return self._fp.isclosed()
        else:
            return True

    def fileno(self):
        if self._fp is None:
            raise IOError("HTTPResponse has no file to get a fileno from")
        elif hasattr(self._fp, "fileno"):
            return self._fp.fileno()
        else:
            raise IOError("The file-like object  this HTTPResponse is wrapped "
                          "around has no file descriptor")

    def flush(self):
        if self._fp is not None and hasattr(self._fp, 'flush'):
            return self._fp.flush()

    def readable(self):
        return True
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/fields.py000064400000013530151735047550022121 0ustar00# urllib3/fields.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import email.utils
import mimetypes

from .packages import six


def guess_content_type(filename, default='application/octet-stream'):
    """
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    """
    if filename:
        return mimetypes.guess_type(filename)[0] or default
    return default


def format_header_param(name, value):
    """
    Helper function to format and quote a single header parameter.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows RFC 2231, as
    suggested by RFC 2388 Section 4.4.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as a unicode string.
    """
    if not any(ch in value for ch in '"\\\r\n'):
        result = '%s="%s"' % (name, value)
        try:
            result.encode('ascii')
        except UnicodeEncodeError:
            pass
        else:
            return result
    if not six.PY3:  # Python 2:
        value = value.encode('utf-8')
    value = email.utils.encode_rfc2231(value, 'utf-8')
    value = '%s*=%s' % (name, value)
    return value


class RequestField(object):
    """
    A data container for request body parameters.

    :param name:
        The name of this request field.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field.
    :param headers:
        An optional dict-like object of headers to initially use for the field.
    """
    def __init__(self, name, data, filename=None, headers=None):
        self._name = name
        self._filename = filename
        self.data = data
        self.headers = {}
        if headers:
            self.headers = dict(headers)

    @classmethod
    def from_tuples(cls, fieldname, value):
        """
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from parameter
        of key/value strings AND key/filetuple. A filetuple is a (filename, data, MIME type)
        tuple where the MIME type is optional. For example: ::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        """
        if isinstance(value, tuple):
            if len(value) == 3:
                filename, data, content_type = value
            else:
                filename, data = value
                content_type = guess_content_type(filename)
        else:
            filename = None
            content_type = None
            data = value

        request_param = cls(fieldname, data, filename=filename)
        request_param.make_multipart(content_type=content_type)

        return request_param

    def _render_part(self, name, value):
        """
        Overridable helper function to format a single header parameter.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        """
        return format_header_param(name, value)

    def _render_parts(self, header_parts):
        """
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) typles or a :class:`dict` of (k, v) to format as
            `k1="v1"; k2="v2"; ...`.
        """
        parts = []
        iterable = header_parts
        if isinstance(header_parts, dict):
            iterable = header_parts.items()

        for name, value in iterable:
            if value:
                parts.append(self._render_part(name, value))

        return '; '.join(parts)

    def render_headers(self):
        """
        Renders the headers for this request field.
        """
        lines = []

        sort_keys = ['Content-Disposition', 'Content-Type', 'Content-Location']
        for sort_key in sort_keys:
            if self.headers.get(sort_key, False):
                lines.append('%s: %s' % (sort_key, self.headers[sort_key]))

        for header_name, header_value in self.headers.items():
            if header_name not in sort_keys:
                if header_value:
                    lines.append('%s: %s' % (header_name, header_value))

        lines.append('\r\n')
        return '\r\n'.join(lines)

    def make_multipart(self, content_disposition=None, content_type=None, content_location=None):
        """
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        """
        self.headers['Content-Disposition'] = content_disposition or 'form-data'
        self.headers['Content-Disposition'] += '; '.join(['', self._render_parts((('name', self._name), ('filename', self._filename)))])
        self.headers['Content-Type'] = content_type
        self.headers['Content-Location'] = content_location
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py000064400000003245151735047550022414 0ustar00# urllib3/__init__.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

"""
urllib3 - Thread-safe connection pooling and re-using.
"""

__author__ = 'Andrey Petrov (andrey.petrov@shazow.net)'
__license__ = 'MIT'
__version__ = 'dev'


from .connectionpool import (
    HTTPConnectionPool,
    HTTPSConnectionPool,
    connection_from_url
)

from . import exceptions
from .filepost import encode_multipart_formdata
from .poolmanager import PoolManager, ProxyManager, proxy_from_url
from .response import HTTPResponse
from .util import make_headers, get_host, Timeout


# Set default logging handler to avoid "No handler found" warnings.
import logging
try:  # Python 2.7+
    from logging import NullHandler
except ImportError:
    class NullHandler(logging.Handler):
        def emit(self, record):
            pass

logging.getLogger(__name__).addHandler(NullHandler())

def add_stderr_logger(level=logging.DEBUG):
    """
    Helper for quickly adding a StreamHandler to the logger. Useful for
    debugging.

    Returns the handler after adding it.
    """
    # This method needs to be in this __init__.py to get the __name__ correct
    # even if urllib3 is vendored within another package.
    logger = logging.getLogger(__name__)
    handler = logging.StreamHandler()
    handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s'))
    logger.addHandler(handler)
    logger.setLevel(level)
    logger.debug('Added an stderr logging handler to logger: %s' % __name__)
    return handler

# ... Clean up.
del NullHandler
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py000064400000064430151735047550023711 0ustar00# urllib3/connectionpool.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import sys
import errno
import logging

from socket import error as SocketError, timeout as SocketTimeout
import socket

try: # Python 3
    from queue import LifoQueue, Empty, Full
except ImportError:
    from Queue import LifoQueue, Empty, Full
    import Queue as _  # Platform-specific: Windows


from .exceptions import (
    ClosedPoolError,
    ConnectionError,
    ConnectTimeoutError,
    EmptyPoolError,
    HostChangedError,
    LocationParseError,
    MaxRetryError,
    SSLError,
    TimeoutError,
    ReadTimeoutError,
    ProxyError,
)
from .packages.ssl_match_hostname import CertificateError
from .packages import six
from .connection import (
    port_by_scheme,
    DummyConnection,
    HTTPConnection, HTTPSConnection, VerifiedHTTPSConnection,
    HTTPException, BaseSSLError,
)
from .request import RequestMethods
from .response import HTTPResponse
from .util import (
    get_host,
    is_connection_dropped,
    Timeout,
)


xrange = six.moves.xrange

log = logging.getLogger(__name__)

_Default = object()

## Pool objects

class ConnectionPool(object):
    """
    Base class for all connection pools, such as
    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.
    """

    scheme = None
    QueueCls = LifoQueue

    def __init__(self, host, port=None):
        if host is None:
            raise LocationParseError(host)

        # httplib doesn't like it when we include brackets in ipv6 addresses
        host = host.strip('[]')

        self.host = host
        self.port = port

    def __str__(self):
        return '%s(host=%r, port=%r)' % (type(self).__name__,
                                         self.host, self.port)

# This is taken from http://hg.python.org/cpython/file/7aaba721ebc0/Lib/socket.py#l252
_blocking_errnos = set([errno.EAGAIN, errno.EWOULDBLOCK])

class HTTPConnectionPool(ConnectionPool, RequestMethods):
    """
    Thread-safe connection pool for one host.

    :param host:
        Host used for this HTTP Connection (e.g. "localhost"), passed into
        :class:`httplib.HTTPConnection`.

    :param port:
        Port used for this HTTP Connection (None is equivalent to 80), passed
        into :class:`httplib.HTTPConnection`.

    :param strict:
        Causes BadStatusLine to be raised if the status line can't be parsed
        as a valid HTTP/1.0 or 1.1 status line, passed into
        :class:`httplib.HTTPConnection`.

        .. note::
           Only works in Python 2. This parameter is ignored in Python 3.

    :param timeout:
        Socket timeout in seconds for each individual connection. This can
        be a float or integer, which sets the timeout for the HTTP request,
        or an instance of :class:`urllib3.util.Timeout` which gives you more
        fine-grained control over request timeouts. After the constructor has
        been parsed, this is always a `urllib3.util.Timeout` object.

    :param maxsize:
        Number of connections to save that can be reused. More than 1 is useful
        in multithreaded situations. If ``block`` is set to false, more
        connections will be created but they will not be saved once they've
        been used.

    :param block:
        If set to True, no more than ``maxsize`` connections will be used at
        a time. When no free connections are available, the call will block
        until a connection has been released. This is a useful side effect for
        particular multithreaded situations where one does not want to use more
        than maxsize connections per host to prevent flooding.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param _proxy:
        Parsed proxy URL, should not be used directly, instead, see
        :class:`urllib3.connectionpool.ProxyManager`"

    :param _proxy_headers:
        A dictionary with proxy headers, should not be used directly,
        instead, see :class:`urllib3.connectionpool.ProxyManager`"
    """

    scheme = 'http'
    ConnectionCls = HTTPConnection

    def __init__(self, host, port=None, strict=False,
                 timeout=Timeout.DEFAULT_TIMEOUT, maxsize=1, block=False,
                 headers=None, _proxy=None, _proxy_headers=None, **conn_kw):
        ConnectionPool.__init__(self, host, port)
        RequestMethods.__init__(self, headers)

        self.strict = strict

        # This is for backwards compatibility and can be removed once a timeout
        # can only be set to a Timeout object
        if not isinstance(timeout, Timeout):
            timeout = Timeout.from_float(timeout)

        self.timeout = timeout

        self.pool = self.QueueCls(maxsize)
        self.block = block

        self.proxy = _proxy
        self.proxy_headers = _proxy_headers or {}

        # Fill the queue up so that doing get() on it will block properly
        for _ in xrange(maxsize):
            self.pool.put(None)

        # These are mostly for testing and debugging purposes.
        self.num_connections = 0
        self.num_requests = 0

        if sys.version_info < (2, 7):  # Python 2.6 and older
            conn_kw.pop('source_address', None)
        self.conn_kw = conn_kw

    def _new_conn(self):
        """
        Return a fresh :class:`HTTPConnection`.
        """
        self.num_connections += 1
        log.info("Starting new HTTP connection (%d): %s" %
                 (self.num_connections, self.host))

        conn = self.ConnectionCls(host=self.host, port=self.port,
                                  timeout=self.timeout.connect_timeout,
                                  strict=self.strict, **self.conn_kw)
        if self.proxy is not None:
            # Enable Nagle's algorithm for proxies, to avoid packet
            # fragmentation.
            conn.tcp_nodelay = 0
        return conn

    def _get_conn(self, timeout=None):
        """
        Get a connection. Will return a pooled connection if one is available.

        If no connections are available and :prop:`.block` is ``False``, then a
        fresh connection is returned.

        :param timeout:
            Seconds to wait before giving up and raising
            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
            :prop:`.block` is ``True``.
        """
        conn = None
        try:
            conn = self.pool.get(block=self.block, timeout=timeout)

        except AttributeError: # self.pool is None
            raise ClosedPoolError(self, "Pool is closed.")

        except Empty:
            if self.block:
                raise EmptyPoolError(self,
                                     "Pool reached maximum size and no more "
                                     "connections are allowed.")
            pass  # Oh well, we'll create a new connection then

        # If this is a persistent connection, check if it got disconnected
        if conn and is_connection_dropped(conn):
            log.info("Resetting dropped connection: %s" % self.host)
            conn.close()

        return conn or self._new_conn()

    def _put_conn(self, conn):
        """
        Put a connection back into the pool.

        :param conn:
            Connection object for the current host and port as returned by
            :meth:`._new_conn` or :meth:`._get_conn`.

        If the pool is already full, the connection is closed and discarded
        because we exceeded maxsize. If connections are discarded frequently,
        then maxsize should be increased.

        If the pool is closed, then the connection will be closed and discarded.
        """
        try:
            self.pool.put(conn, block=False)
            return # Everything is dandy, done.
        except AttributeError:
            # self.pool is None.
            pass
        except Full:
            # This should never happen if self.block == True
            log.warning(
                "Connection pool is full, discarding connection: %s" %
                self.host)

        # Connection never got put back into the pool, close it.
        if conn:
            conn.close()

    def _get_timeout(self, timeout):
        """ Helper that always returns a :class:`urllib3.util.Timeout` """
        if timeout is _Default:
            return self.timeout.clone()

        if isinstance(timeout, Timeout):
            return timeout.clone()
        else:
            # User passed us an int/float. This is for backwards compatibility,
            # can be removed later
            return Timeout.from_float(timeout)

    def _make_request(self, conn, method, url, timeout=_Default,
                      **httplib_request_kw):
        """
        Perform a request on a given urllib connection object taken from our
        pool.

        :param conn:
            a connection from one of our connection pools

        :param timeout:
            Socket timeout in seconds for the request. This can be a
            float or integer, which will set the same timeout value for
            the socket connect and the socket read, or an instance of
            :class:`urllib3.util.Timeout`, which gives you more fine-grained
            control over your timeouts.
        """
        self.num_requests += 1

        timeout_obj = self._get_timeout(timeout)

        try:
            timeout_obj.start_connect()
            conn.timeout = timeout_obj.connect_timeout
            # conn.request() calls httplib.*.request, not the method in
            # urllib3.request. It also calls makefile (recv) on the socket.
            conn.request(method, url, **httplib_request_kw)
        except SocketTimeout:
            raise ConnectTimeoutError(
                self, "Connection to %s timed out. (connect timeout=%s)" %
                (self.host, timeout_obj.connect_timeout))

        # Reset the timeout for the recv() on the socket
        read_timeout = timeout_obj.read_timeout

        # App Engine doesn't have a sock attr
        if hasattr(conn, 'sock'):
            # In Python 3 socket.py will catch EAGAIN and return None when you
            # try and read into the file pointer created by http.client, which
            # instead raises a BadStatusLine exception. Instead of catching
            # the exception and assuming all BadStatusLine exceptions are read
            # timeouts, check for a zero timeout before making the request.
            if read_timeout == 0:
                raise ReadTimeoutError(
                    self, url,
                    "Read timed out. (read timeout=%s)" % read_timeout)
            if read_timeout is Timeout.DEFAULT_TIMEOUT:
                conn.sock.settimeout(socket.getdefaulttimeout())
            else: # None or a value
                conn.sock.settimeout(read_timeout)

        # Receive the response from the server
        try:
            try: # Python 2.7+, use buffering of HTTP responses
                httplib_response = conn.getresponse(buffering=True)
            except TypeError: # Python 2.6 and older
                httplib_response = conn.getresponse()
        except SocketTimeout:
            raise ReadTimeoutError(
                self, url, "Read timed out. (read timeout=%s)" % read_timeout)

        except BaseSSLError as e:
            # Catch possible read timeouts thrown as SSL errors. If not the
            # case, rethrow the original. We need to do this because of:
            # http://bugs.python.org/issue10272
            if 'timed out' in str(e) or \
               'did not complete (read)' in str(e):  # Python 2.6
                raise ReadTimeoutError(self, url, "Read timed out.")

            raise

        except SocketError as e: # Platform-specific: Python 2
            # See the above comment about EAGAIN in Python 3. In Python 2 we
            # have to specifically catch it and throw the timeout error
            if e.errno in _blocking_errnos:
                raise ReadTimeoutError(
                    self, url,
                    "Read timed out. (read timeout=%s)" % read_timeout)

            raise

        # AppEngine doesn't have a version attr.
        http_version = getattr(conn, '_http_vsn_str', 'HTTP/?')
        log.debug("\"%s %s %s\" %s %s" % (method, url, http_version,
                                          httplib_response.status,
                                          httplib_response.length))
        return httplib_response

    def close(self):
        """
        Close all pooled connections and disable the pool.
        """
        # Disable access to the pool
        old_pool, self.pool = self.pool, None

        try:
            while True:
                conn = old_pool.get(block=False)
                if conn:
                    conn.close()

        except Empty:
            pass # Done.

    def is_same_host(self, url):
        """
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        """
        if url.startswith('/'):
            return True

        # TODO: Add optional support for socket.gethostbyname checking.
        scheme, host, port = get_host(url)

        # Use explicit default port for comparison when none is given
        if self.port and not port:
            port = port_by_scheme.get(scheme)
        elif not self.port and port == port_by_scheme.get(scheme):
            port = None

        return (scheme, host, port) == (self.scheme, self.host, self.port)

    def urlopen(self, method, url, body=None, headers=None, retries=3,
                redirect=True, assert_same_host=True, timeout=_Default,
                pool_timeout=None, release_conn=None, **response_kw):
        """
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param body:
            Data to send in the request body (useful for creating
            POST requests, see HTTPConnectionPool.post_url for
            more convenience).

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Number of retries to allow before raising a MaxRetryError exception.
            If `False`, then retries are disabled and any exception is raised
            immediately.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When False, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param \**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        """
        if headers is None:
            headers = self.headers

        if retries < 0 and retries is not False:
            raise MaxRetryError(self, url)

        if release_conn is None:
            release_conn = response_kw.get('preload_content', True)

        # Check host
        if assert_same_host and not self.is_same_host(url):
            raise HostChangedError(self, url, retries - 1)

        conn = None

        # Merge the proxy headers. Only do this in HTTP. We have to copy the
        # headers dict so we can safely change it without those changes being
        # reflected in anyone else's copy.
        if self.scheme == 'http':
            headers = headers.copy()
            headers.update(self.proxy_headers)

        # Must keep the exception bound to a separate variable or else Python 3
        # complains about UnboundLocalError.
        err = None

        try:
            # Request a connection from the queue
            conn = self._get_conn(timeout=pool_timeout)

            # Make the request on the httplib connection object
            httplib_response = self._make_request(conn, method, url,
                                                  timeout=timeout,
                                                  body=body, headers=headers)

            # If we're going to release the connection in ``finally:``, then
            # the request doesn't need to know about the connection. Otherwise
            # it will also try to release it and we'll have a double-release
            # mess.
            response_conn = not release_conn and conn

            # Import httplib's response into our own wrapper object
            response = HTTPResponse.from_httplib(httplib_response,
                                                 pool=self,
                                                 connection=response_conn,
                                                 **response_kw)

            # else:
            #     The connection will be put back into the pool when
            #     ``response.release_conn()`` is called (implicitly by
            #     ``response.read()``)

        except Empty:
            # Timed out by queue.
            raise EmptyPoolError(self, "No pool connections are available.")

        except (BaseSSLError, CertificateError) as e:
            # Release connection unconditionally because there is no way to
            # close it externally in case of exception.
            release_conn = True
            raise SSLError(e)

        except (TimeoutError, HTTPException, SocketError) as e:
            if conn:
                # Discard the connection for these exceptions. It will be
                # be replaced during the next _get_conn() call.
                conn.close()
                conn = None

            if not retries:
                if isinstance(e, TimeoutError):
                    # TimeoutError is exempt from MaxRetryError-wrapping.
                    # FIXME: ... Not sure why. Add a reason here.
                    raise

                # Wrap unexpected exceptions with the most appropriate
                # module-level exception and re-raise.
                if isinstance(e, SocketError) and self.proxy:
                    raise ProxyError('Cannot connect to proxy.', e)

                if retries is False:
                    raise ConnectionError('Connection failed.', e)

                raise MaxRetryError(self, url, e)

            # Keep track of the error for the retry warning.
            err = e

        finally:
            if release_conn:
                # Put the connection back to be reused. If the connection is
                # expired then it will be None, which will get replaced with a
                # fresh connection during _get_conn.
                self._put_conn(conn)

        if not conn:
            # Try again
            log.warning("Retrying (%d attempts remain) after connection "
                        "broken by '%r': %s" % (retries, err, url))
            return self.urlopen(method, url, body, headers, retries - 1,
                                redirect, assert_same_host,
                                timeout=timeout, pool_timeout=pool_timeout,
                                release_conn=release_conn, **response_kw)

        # Handle redirect?
        redirect_location = redirect and response.get_redirect_location()
        if redirect_location and retries is not False:
            if response.status == 303:
                method = 'GET'
            log.info("Redirecting %s -> %s" % (url, redirect_location))
            return self.urlopen(method, redirect_location, body, headers,
                                retries - 1, redirect, assert_same_host,
                                timeout=timeout, pool_timeout=pool_timeout,
                                release_conn=release_conn, **response_kw)

        return response


class HTTPSConnectionPool(HTTPConnectionPool):
    """
    Same as :class:`.HTTPConnectionPool`, but HTTPS.

    When Python is compiled with the :mod:`ssl` module, then
    :class:`.VerifiedHTTPSConnection` is used, which *can* verify certificates,
    instead of :class:`.HTTPSConnection`.

    :class:`.VerifiedHTTPSConnection` uses one of ``assert_fingerprint``,
    ``assert_hostname`` and ``host`` in this order to verify connections.
    If ``assert_hostname`` is False, no verification is done.

    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs`` and
    ``ssl_version`` are only used if :mod:`ssl` is available and are fed into
    :meth:`urllib3.util.ssl_wrap_socket` to upgrade the connection socket
    into an SSL socket.
    """

    scheme = 'https'
    ConnectionCls = HTTPSConnection

    def __init__(self, host, port=None,
                 strict=False, timeout=None, maxsize=1,
                 block=False, headers=None,
                 _proxy=None, _proxy_headers=None,
                 key_file=None, cert_file=None, cert_reqs=None,
                 ca_certs=None, ssl_version=None,
                 assert_hostname=None, assert_fingerprint=None,
                 **conn_kw):

        if sys.version_info < (2, 7):  # Python 2.6 or older
            conn_kw.pop('source_address', None)

        HTTPConnectionPool.__init__(self, host, port, strict, timeout, maxsize,
                                    block, headers, _proxy, _proxy_headers, **conn_kw)
        self.key_file = key_file
        self.cert_file = cert_file
        self.cert_reqs = cert_reqs
        self.ca_certs = ca_certs
        self.ssl_version = ssl_version
        self.assert_hostname = assert_hostname
        self.assert_fingerprint = assert_fingerprint
        self.conn_kw = conn_kw

    def _prepare_conn(self, conn):
        """
        Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
        and establish the tunnel if proxy is used.
        """

        if isinstance(conn, VerifiedHTTPSConnection):
            conn.set_cert(key_file=self.key_file,
                          cert_file=self.cert_file,
                          cert_reqs=self.cert_reqs,
                          ca_certs=self.ca_certs,
                          assert_hostname=self.assert_hostname,
                          assert_fingerprint=self.assert_fingerprint)
            conn.ssl_version = self.ssl_version
            conn.conn_kw = self.conn_kw

        if self.proxy is not None:
            # Python 2.7+
            try:
                set_tunnel = conn.set_tunnel
            except AttributeError:  # Platform-specific: Python 2.6
                set_tunnel = conn._set_tunnel
            set_tunnel(self.host, self.port, self.proxy_headers)
            # Establish tunnel connection early, because otherwise httplib
            # would improperly set Host: header to proxy's IP:port.
            conn.connect()

        return conn

    def _new_conn(self):
        """
        Return a fresh :class:`httplib.HTTPSConnection`.
        """
        self.num_connections += 1
        log.info("Starting new HTTPS connection (%d): %s"
                 % (self.num_connections, self.host))

        if not self.ConnectionCls or self.ConnectionCls is DummyConnection:
            # Platform-specific: Python without ssl
            raise SSLError("Can't connect to HTTPS URL because the SSL "
                           "module is not available.")

        actual_host = self.host
        actual_port = self.port
        if self.proxy is not None:
            actual_host = self.proxy.host
            actual_port = self.proxy.port

        extra_params = {}
        if not six.PY3:  # Python 2
            extra_params['strict'] = self.strict
        extra_params.update(self.conn_kw)

        conn = self.ConnectionCls(host=actual_host, port=actual_port,
                                  timeout=self.timeout.connect_timeout,
                                  **extra_params)
        if self.proxy is not None:
            # Enable Nagle's algorithm for proxies, to avoid packet
            # fragmentation.
            conn.tcp_nodelay = 0

        return self._prepare_conn(conn)


def connection_from_url(url, **kw):
    """
    Given a url, return an :class:`.ConnectionPool` instance of its host.

    This is a shortcut for not having to parse out the scheme, host, and port
    of the url before creating an :class:`.ConnectionPool` instance.

    :param url:
        Absolute URL string that must include the scheme. Port is optional.

    :param \**kw:
        Passes additional parameters to the constructor of the appropriate
        :class:`.ConnectionPool`. Useful for specifying things like
        timeout, maxsize, headers, etc.

    Example: ::

        >>> conn = connection_from_url('http://google.com/')
        >>> r = conn.request('GET', '/')
    """
    scheme, host, port = get_host(url)
    if scheme == 'https':
        return HTTPSConnectionPool(host, port=port, **kw)
    else:
        return HTTPConnectionPool(host, port=port, **kw)
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/request.py000064400000013260151735047550022343 0ustar00# urllib3/request.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

try:
    from urllib.parse import urlencode
except ImportError:
    from urllib import urlencode

from .filepost import encode_multipart_formdata


__all__ = ['RequestMethods']


class RequestMethods(object):
    """
    Convenience mixin for classes who implement a :meth:`urlopen` method, such
    as :class:`~urllib3.connectionpool.HTTPConnectionPool` and
    :class:`~urllib3.poolmanager.PoolManager`.

    Provides behavior for making common types of HTTP request methods and
    decides which type of request field encoding to use.

    Specifically,

    :meth:`.request_encode_url` is for sending requests whose fields are encoded
    in the URL (such as GET, HEAD, DELETE).

    :meth:`.request_encode_body` is for sending requests whose fields are
    encoded in the *body* of the request using multipart or www-form-urlencoded
    (such as for POST, PUT, PATCH).

    :meth:`.request` is for making any kind of request, it will look up the
    appropriate encoding format and use one of the above two methods to make
    the request.

    Initializer parameters:

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
    """

    _encode_url_methods = set(['DELETE', 'GET', 'HEAD', 'OPTIONS'])

    def __init__(self, headers=None):
        self.headers = headers or {}

    def urlopen(self, method, url, body=None, headers=None,
                encode_multipart=True, multipart_boundary=None,
                **kw): # Abstract
        raise NotImplemented("Classes extending RequestMethods must implement "
                             "their own ``urlopen`` method.")

    def request(self, method, url, fields=None, headers=None, **urlopen_kw):
        """
        Make a request using :meth:`urlopen` with the appropriate encoding of
        ``fields`` based on the ``method`` used.

        This is a convenience method that requires the least amount of manual
        effort. It can be used in most situations, while still having the option
        to drop down to more specific methods when necessary, such as
        :meth:`request_encode_url`, :meth:`request_encode_body`,
        or even the lowest level :meth:`urlopen`.
        """
        method = method.upper()

        if method in self._encode_url_methods:
            return self.request_encode_url(method, url, fields=fields,
                                            headers=headers,
                                            **urlopen_kw)
        else:
            return self.request_encode_body(method, url, fields=fields,
                                             headers=headers,
                                             **urlopen_kw)

    def request_encode_url(self, method, url, fields=None, **urlopen_kw):
        """
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
        """
        if fields:
            url += '?' + urlencode(fields)
        return self.urlopen(method, url, **urlopen_kw)

    def request_encode_body(self, method, url, fields=None, headers=None,
                            encode_multipart=True, multipart_boundary=None,
                            **urlopen_kw):
        """
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the body. This is useful for request methods like POST, PUT, PATCH, etc.

        When ``encode_multipart=True`` (default), then
        :meth:`urllib3.filepost.encode_multipart_formdata` is used to encode the
        payload with the appropriate content type. Otherwise
        :meth:`urllib.urlencode` is used with the
        'application/x-www-form-urlencoded' content type.

        Multipart encoding must be used when posting files, and it's reasonably
        safe to use it in other times too. However, it may break request signing,
        such as with OAuth.

        Supports an optional ``fields`` parameter of key/value strings AND
        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
        the MIME type is optional. For example: ::

            fields = {
                'foo': 'bar',
                'fakefile': ('foofile.txt', 'contents of foofile'),
                'realfile': ('barfile.txt', open('realfile').read()),
                'typedfile': ('bazfile.bin', open('bazfile').read(),
                              'image/jpeg'),
                'nonamefile': 'contents of nonamefile field',
            }

        When uploading a file, providing a filename (the first parameter of the
        tuple) is optional but recommended to best mimick behavior of browsers.

        Note that if ``headers`` are supplied, the 'Content-Type' header will be
        overwritten because it depends on the dynamic random boundary string
        which is used to compose the body of the request. The random boundary
        string can be explicitly set with the ``multipart_boundary`` parameter.
        """
        if encode_multipart:
            body, content_type = encode_multipart_formdata(fields or {},
                                    boundary=multipart_boundary)
        else:
            body, content_type = (urlencode(fields or {}),
                                    'application/x-www-form-urlencoded')

        if headers is None:
            headers = self.headers

        headers_ = {'Content-Type': content_type}
        headers_.update(headers)

        return self.urlopen(method, url, body=body, headers=headers_,
                            **urlopen_kw)
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py000064400000010213151735047550022563 0ustar00from binascii import hexlify, unhexlify
from hashlib import md5, sha1

from ..exceptions import SSLError


try:  # Test for SSL features
    SSLContext = None
    HAS_SNI = False

    import ssl
    from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23
    from ssl import SSLContext  # Modern SSL?
    from ssl import HAS_SNI  # Has SNI?
except ImportError:
    pass


def assert_fingerprint(cert, fingerprint):
    """
    Checks if given fingerprint matches the supplied certificate.

    :param cert:
        Certificate as bytes object.
    :param fingerprint:
        Fingerprint as string of hexdigits, can be interspersed by colons.
    """

    # Maps the length of a digest to a possible hash function producing
    # this digest.
    hashfunc_map = {
        16: md5,
        20: sha1
    }

    fingerprint = fingerprint.replace(':', '').lower()

    digest_length, rest = divmod(len(fingerprint), 2)

    if rest or digest_length not in hashfunc_map:
        raise SSLError('Fingerprint is of invalid length.')

    # We need encode() here for py32; works on py2 and p33.
    fingerprint_bytes = unhexlify(fingerprint.encode())

    hashfunc = hashfunc_map[digest_length]

    cert_digest = hashfunc(cert).digest()

    if not cert_digest == fingerprint_bytes:
        raise SSLError('Fingerprints did not match. Expected "{0}", got "{1}".'
                       .format(hexlify(fingerprint_bytes),
                               hexlify(cert_digest)))


def resolve_cert_reqs(candidate):
    """
    Resolves the argument to a numeric constant, which can be passed to
    the wrap_socket function/method from the ssl module.
    Defaults to :data:`ssl.CERT_NONE`.
    If given a string it is assumed to be the name of the constant in the
    :mod:`ssl` module or its abbrevation.
    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
    If it's neither `None` nor a string we assume it is already the numeric
    constant which can directly be passed to wrap_socket.
    """
    if candidate is None:
        return CERT_NONE

    if isinstance(candidate, str):
        res = getattr(ssl, candidate, None)
        if res is None:
            res = getattr(ssl, 'CERT_' + candidate)
        return res

    return candidate


def resolve_ssl_version(candidate):
    """
    like resolve_cert_reqs
    """
    if candidate is None:
        return PROTOCOL_SSLv23

    if isinstance(candidate, str):
        res = getattr(ssl, candidate, None)
        if res is None:
            res = getattr(ssl, 'PROTOCOL_' + candidate)
        return res

    return candidate


if SSLContext is not None:  # Python 3.2+
    def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None,
                        ca_certs=None, server_hostname=None,
                        ssl_version=None):
        """
        All arguments except `server_hostname` have the same meaning as for
        :func:`ssl.wrap_socket`

        :param server_hostname:
            Hostname of the expected certificate
        """
        context = SSLContext(ssl_version)
        context.verify_mode = cert_reqs

        # Disable TLS compression to migitate CRIME attack (issue #309)
        OP_NO_COMPRESSION = 0x20000
        context.options |= OP_NO_COMPRESSION

        if ca_certs:
            try:
                context.load_verify_locations(ca_certs)
            # Py32 raises IOError
            # Py33 raises FileNotFoundError
            except Exception as e:  # Reraise as SSLError
                raise SSLError(e)
        if certfile:
            # FIXME: This block needs a test.
            context.load_cert_chain(certfile, keyfile)
        if HAS_SNI:  # Platform-specific: OpenSSL with enabled SNI
            return context.wrap_socket(sock, server_hostname=server_hostname)
        return context.wrap_socket(sock)

else:  # Python 3.1 and earlier
    def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None,
                        ca_certs=None, server_hostname=None,
                        ssl_version=None):
        return wrap_socket(sock, keyfile=keyfile, certfile=certfile,
                           ca_certs=ca_certs, cert_reqs=cert_reqs,
                           ssl_version=ssl_version)
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py000064400000002504151735047550023766 0ustar00from socket import error as SocketError
try:
    from select import poll, POLLIN
except ImportError:  # `poll` doesn't exist on OSX and other platforms
    poll = False
    try:
        from select import select
    except ImportError:  # `select` doesn't exist on AppEngine.
        select = False

def is_connection_dropped(conn):  # Platform-specific
    """
    Returns True if the connection is dropped and should be closed.

    :param conn:
        :class:`httplib.HTTPConnection` object.

    Note: For platforms like AppEngine, this will always return ``False`` to
    let the platform handle connection recycling transparently for us.
    """
    sock = getattr(conn, 'sock', False)
    if sock is False:  # Platform-specific: AppEngine
        return False
    if sock is None:  # Connection already closed (such as by httplib).
        return False

    if not poll:
        if not select:  # Platform-specific: AppEngine
            return False

        try:
            return select([sock], [], [], 0.0)[0]
        except SocketError:
            return True

    # This version is better on platforms that support it.
    p = poll()
    p.register(sock, POLLIN)
    for (fno, ev) in p.poll(0.0):
        if fno == sock.fileno():
            # Either data is buffered (bad), or the connection is dropped.
            return True



python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py000064400000010261151735047550022430 0ustar00from collections import namedtuple

from ..exceptions import LocationParseError


class Url(namedtuple('Url', ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'])):
    """
    Datastructure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`.
    """
    slots = ()

    def __new__(cls, scheme=None, auth=None, host=None, port=None, path=None, query=None, fragment=None):
        return super(Url, cls).__new__(cls, scheme, auth, host, port, path, query, fragment)

    @property
    def hostname(self):
        """For backwards-compatibility with urlparse. We're nice like that."""
        return self.host

    @property
    def request_uri(self):
        """Absolute path including the query string."""
        uri = self.path or '/'

        if self.query is not None:
            uri += '?' + self.query

        return uri

    @property
    def netloc(self):
        """Network location including host and port"""
        if self.port:
            return '%s:%d' % (self.host, self.port)
        return self.host


def split_first(s, delims):
    """
    Given a string and an iterable of delimiters, split on the first found
    delimiter. Return two split parts and the matched delimiter.

    If not found, then the first part is the full input string.

    Example: ::

        >>> split_first('foo/bar?baz', '?/=')
        ('foo', 'bar?baz', '/')
        >>> split_first('foo/bar?baz', '123')
        ('foo/bar?baz', '', None)

    Scales linearly with number of delims. Not ideal for large number of delims.
    """
    min_idx = None
    min_delim = None
    for d in delims:
        idx = s.find(d)
        if idx < 0:
            continue

        if min_idx is None or idx < min_idx:
            min_idx = idx
            min_delim = d

    if min_idx is None or min_idx < 0:
        return s, '', None

    return s[:min_idx], s[min_idx+1:], min_delim


def parse_url(url):
    """
    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.

    Partly backwards-compatible with :mod:`urlparse`.

    Example: ::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/', ...)
        >>> parse_url('google.com:80')
        Url(scheme=None, host='google.com', port=80, path=None, ...)
        >>> parse_url('/foo?bar')
        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    """

    # While this code has overlap with stdlib's urlparse, it is much
    # simplified for our needs and less annoying.
    # Additionally, this implementations does silly things to be optimal
    # on CPython.

    scheme = None
    auth = None
    host = None
    port = None
    path = None
    fragment = None
    query = None

    # Scheme
    if '://' in url:
        scheme, url = url.split('://', 1)

    # Find the earliest Authority Terminator
    # (http://tools.ietf.org/html/rfc3986#section-3.2)
    url, path_, delim = split_first(url, ['/', '?', '#'])

    if delim:
        # Reassemble the path
        path = delim + path_

    # Auth
    if '@' in url:
        # Last '@' denotes end of auth part
        auth, url = url.rsplit('@', 1)

    # IPv6
    if url and url[0] == '[':
        host, url = url.split(']', 1)
        host += ']'

    # Port
    if ':' in url:
        _host, port = url.split(':', 1)

        if not host:
            host = _host

        if port:
            # If given, ports must be integers.
            if not port.isdigit():
                raise LocationParseError(url)
            port = int(port)
        else:
            # Blank ports are cool, too. (rfc3986#section-3.2.3)
            port = None

    elif not host and url:
        host = url

    if not path:
        return Url(scheme, auth, host, port, path, query, fragment)

    # Fragment
    if '#' in path:
        path, fragment = path.split('#', 1)

    # Query
    if '?' in path:
        path, query = path.split('?', 1)

    return Url(scheme, auth, host, port, path, query, fragment)


def get_host(url):
    """
    Deprecated. Use :func:`.parse_url` instead.
    """
    p = parse_url(url)
    return p.scheme or 'http', p.hostname, p.port
site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/__init__.cpython-34.pyc000064400000001240151735047550027565 0ustar00python3.4�
�Ren�@s�ddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZddl
mZmZddlmZmZmZmZdS)�)�is_connection_dropped)�make_headers)�is_fp_closed)�
SSLContext�HAS_SNI�assert_fingerprint�resolve_cert_reqs�resolve_ssl_version�ssl_wrap_socket)�current_time�Timeout)�get_host�	parse_url�split_first�UrlN)�
connectionr�requestr�responser�ssl_rrrrr	r
�timeoutrr�urlr
rrr�rr�N/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/util/__init__.py�<module>s
.site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/timeout.cpython-34.pyc000064400000021021151735047560027514 0ustar00python3.4�
�Re$�@s[ddlmZddlZddlmZdd�Ze�ZGdd�de�ZdS)	�)�_GLOBAL_DEFAULT_TIMEOUTN�)�TimeoutStateErrorcCs
tj�S)zQ
    Retrieve the current time, this function is mocked out in unit testing.
    )�time�rr�M/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/util/timeout.py�current_timesrc@s�eZdZdZeZdeedd�Zdd�Ze	dd��Z
e	d	d
��Zdd�Zd
d�Z
dd�Zedd��Zedd��ZdS)�Timeouta
    Utility object for storing timeout values.

    Example usage:

    .. code-block:: python

        timeout = urllib3.util.Timeout(connect=2.0, read=7.0)
        pool = HTTPConnectionPool('www.google.com', 80, timeout=timeout)
        pool.request(...) # Etc, etc

    :param connect:
        The maximum amount of time to wait for a connection attempt to a server
        to succeed. Omitting the parameter will default the connect timeout to
        the system default, probably `the global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout for connection attempts.

    :type connect: integer, float, or None

    :param read:
        The maximum amount of time to wait between consecutive
        read operations for a response from the server. Omitting
        the parameter will default the read timeout to the system
        default, probably `the global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout.

    :type read: integer, float, or None

    :param total:
        This combines the connect and read timeouts into one; the read timeout
        will be set to the time leftover from the connect attempt. In the
        event that both a connect timeout and a total are specified, or a read
        timeout and a total are specified, the shorter timeout will be applied.

        Defaults to None.

    :type total: integer, float, or None

    .. note::

        Many factors can affect the total amount of time for urllib3 to return
        an HTTP response. Specifically, Python's DNS resolver does not obey the
        timeout specified on the socket. Other factors that can affect total
        request time include high CPU load, high swap, the program running at a
        low priority level, or other behaviors. The observed running time for
        urllib3 to return a response may be greater than the value passed to
        `total`.

        In addition, the read and total timeouts only measure the time between
        read operations on the socket connecting the client and the server,
        not the total amount of time for the request to return a complete
        response. For most requests, the timeout is raised because the server
        has not sent the first byte in the specified time. This is not always
        the case; if a server streams one byte every fifteen seconds, a timeout
        of 20 seconds will not ever trigger, even though the request will
        take several minutes to complete.

        If your goal is to cut off any request after a set amount of wall clock
        time, consider having a second "watcher" thread to cut off a slow
        request.
    NcCsL|j|d�|_|j|d�|_|j|d�|_d|_dS)N�connect�read�total)�_validate_timeout�_connect�_readr�_start_connect)�selfrr
rrrr�__init__WszTimeout.__init__cCs&dt|�j|j|j|jfS)Nz!%s(connect=%r, read=%r, total=%r))�type�__name__rrr)rrrr�__str__]szTimeout.__str__cCs�|tkr|jS|dks.||jkr2|Syt|�Wn.ttfk
rptd||f��YnXy)|dkr�td||f��nWn(tk
r�td||f��YnX|S)at Check that a timeout attribute is valid

        :param value: The timeout value to validate
        :param name: The name of the timeout attribute to validate. This is used
            for clear error messages
        :return: the value
        :raises ValueError: if the type is not an integer or a float, or if it
            is a numeric value less than zero
        Nz8Timeout value %s was %s, but it must be an int or float.rzXAttempted to set %s timeout to %s, but the timeout cannot be set to a value less than 0.)�_Default�DEFAULT_TIMEOUT�float�	TypeError�
ValueError)�cls�value�namerrrr
bs"
zTimeout._validate_timeoutcCstd|d|�S)a� Create a new Timeout from a legacy timeout value.

        The timeout value used by httplib.py sets the same timeout on the
        connect(), and recv() socket requests. This creates a :class:`Timeout`
        object that sets the individual timeouts to the ``timeout`` value passed
        to this function.

        :param timeout: The legacy timeout value
        :type timeout: integer, float, sentinel default object, or None
        :return: a Timeout object
        :rtype: :class:`Timeout`
        rr
)r	)r�timeoutrrr�
from_float�szTimeout.from_floatcCs"td|jd|jd|j�S)a Create a copy of the timeout object

        Timeout properties are stored per-pool but each request needs a fresh
        Timeout object to ensure each one has its own start/stop configured.

        :return: a copy of the timeout object
        :rtype: :class:`Timeout`
        r
rr)r	rrr)rrrr�clone�sz
Timeout.clonecCs1|jdk	rtd��nt�|_|jS)z� Start the timeout clock, used during a connect() attempt

        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to start a timer that has been started already.
        Nz'Timeout timer has already been started.)rrr)rrrr�
start_connect�szTimeout.start_connectcCs,|jdkrtd��nt�|jS)a Gets the time elapsed since the call to :meth:`start_connect`.

        :return: the elapsed time
        :rtype: float
        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to get duration for a timer that hasn't been started.
        Nz:Can't get connect duration for timer that has not started.)rrr)rrrr�get_connect_duration�szTimeout.get_connect_durationcCsQ|jdkr|jS|jdks7|j|jkr>|jSt|j|j�S)a% Get the value to use when setting a connection timeout.

        This will be a positive float or integer, the value None
        (never timeout), or the default system timeout.

        :return: the connect timeout
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        N)rrr�min)rrrr�connect_timeout�s

!zTimeout.connect_timeoutcCs�|jdk	r~|j|jk	r~|jdk	r~|j|jk	r~|jdkrX|jStdt|j|j�|j��S|jdk	r�|j|jk	r�td|j|j��S|jSdS)a� Get the value for the read timeout.

        This assumes some time has elapsed in the connection timeout and
        computes the read timeout appropriately.

        If self.total is set, the read timeout is dependent on the amount of
        time taken by the connect timeout. If the connection time has not been
        established, a :exc:`~urllib3.exceptions.TimeoutStateError` will be
        raised.

        :return: the value to use for the read timeout
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        :raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
            has not yet been called on this object.
        Nr)rrrr�maxr#r")rrrr�read_timeout�s
!zTimeout.read_timeout)r�
__module__�__qualname__�__doc__rrrrr�classmethodr
rr r!r"�propertyr$r&rrrrr	s?"
r	)	�socketrr�
exceptionsrr�objectrr	rrrr�<module>s
	python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/ssl_.cpython-34.pyc000064400000006546151735047560027064 0ustar00�
�Re��@sddlmZmZddlmZmZddlmZyXdZdZ	ddl
Z
ddl
mZmZm
Z
ddl
mZdd	l
m	Z	Wnek
r�YnXd
d�Zdd
�Zdd�Zedk	r�dddddddd�Zndddddddd�ZdS)�)�hexlify�	unhexlify)�md5�sha1�)�SSLErrorNF)�wrap_socket�	CERT_NONE�PROTOCOL_SSLv23)�
SSLContext)�HAS_SNIcCs�itd6td6}|jdd�j�}tt|�d�\}}|sY||krhtd��nt|j��}||}||�j	�}||ks�tdj
t|�t|����ndS)	z�
    Checks if given fingerprint matches the supplied certificate.

    :param cert:
        Certificate as bytes object.
    :param fingerprint:
        Fingerprint as string of hexdigits, can be interspersed by colons.
    ���:�rz!Fingerprint is of invalid length.z6Fingerprints did not match. Expected "{0}", got "{1}".N)rr�replace�lower�divmod�lenrr�encode�digest�formatr)�cert�fingerprint�hashfunc_map�
digest_length�rest�fingerprint_bytes�hashfunc�cert_digest�r �J/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/util/ssl_.py�assert_fingerprints

		r"cCs[|dkrtSt|t�rWtt|d�}|dkrSttd|�}n|S|S)a�
    Resolves the argument to a numeric constant, which can be passed to
    the wrap_socket function/method from the ssl module.
    Defaults to :data:`ssl.CERT_NONE`.
    If given a string it is assumed to be the name of the constant in the
    :mod:`ssl` module or its abbrevation.
    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
    If it's neither `None` nor a string we assume it is already the numeric
    constant which can directly be passed to wrap_socket.
    N�CERT_)r	�
isinstance�str�getattr�ssl)�	candidate�resr r r!�resolve_cert_reqs8sr*cCs[|dkrtSt|t�rWtt|d�}|dkrSttd|�}n|S|S)z 
    like resolve_cert_reqs
    N�	PROTOCOL_)r
r$r%r&r')r(r)r r r!�resolve_ssl_versionOsr,c
Cs�t|�}||_d}|j|O_|rxy|j|�Wqxtk
rt}	zt|	��WYdd}	~	XqxXn|r�|j||�ntr�|j|d|�S|j|�S)z�
        All arguments except `server_hostname` have the same meaning as for
        :func:`ssl.wrap_socket`

        :param server_hostname:
            Hostname of the expected certificate
        iN�server_hostname)	r�verify_mode�options�load_verify_locations�	Exceptionr�load_cert_chainrr)
�sock�keyfile�certfile�	cert_reqs�ca_certsr-�ssl_version�context�OP_NO_COMPRESSION�er r r!�ssl_wrap_socket`s
	"r<cCs(t|d|d|d|d|d|�S)Nr4r5r7r6r8)r)r3r4r5r6r7r-r8r r r!r<�s)�binasciirr�hashlibrr�
exceptionsrrrr'rr	r
�ImportErrorr"r*r,r<r r r r!�<module>s*
%		site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/request.cpython-34.pyc000064400000003474151735047560027532 0ustar00python3.4�
�Re��@sEddlmZddlmZdZddddddd�ZdS)�)�	b64encode�)�sixzgzip,deflateNcCs�i}|rRt|t�rn't|t�r?dj|�}nt}||d<n|re||d<n|rxd|d<n|r�dttj|��jd�|d<n|r�dttj|��jd�|d	<n|S)
a�
    Shortcuts for generating request headers.

    :param keep_alive:
        If ``True``, adds 'connection: keep-alive' header.

    :param accept_encoding:
        Can be a boolean, list, or string.
        ``True`` translates to 'gzip,deflate'.
        List will get joined by comma.
        String will be used as provided.

    :param user_agent:
        String representing the user-agent you want, such as
        "python-urllib3/0.6"

    :param basic_auth:
        Colon-separated username:password string for 'authorization: basic ...'
        auth header.

    :param proxy_basic_auth:
        Colon-separated username:password string for 'proxy-authorization: basic ...'
        auth header.

    Example: ::

        >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
        {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
        >>> make_headers(accept_encoding=True)
        {'accept-encoding': 'gzip,deflate'}
    �,zaccept-encodingz
user-agentz
keep-alive�
connectionzBasic zutf-8�
authorizationzproxy-authorization)	�
isinstance�str�list�join�ACCEPT_ENCODINGrr�b�decode)�
keep_alive�accept_encoding�
user_agent�
basic_auth�proxy_basic_auth�headers�r�M/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/util/request.py�make_headers	s&!


&&r)�base64r�packagesrrrrrrr�<module>s	site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/response.cpython-34.pyc000064400000000671151735047560027674 0ustar00python3.4�
�Reb�@sdd�ZdS)cCs#t|d�r|jdkS|jS)zt
    Checks whether a given file-like object is closed.

    :param obj:
        The file-like object to check.
    �fpN)�hasattrr�closed)�obj�r�N/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/util/response.py�is_fp_closeds
rN)rrrrr�<module>ssite-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/connection.cpython-34.pyc000064400000002135151735047570030173 0ustar00python3.4�
�ReD�@s�ddlmZyddlmZmZWnGek
rsdZyddlmZWnek
rndZYnXYnXdd�ZdS)�)�error)�poll�POLLINF)�selectcCs�t|dd�}|dkr"dS|dkr2dSts|tsBdSyt|gggd�dSWq|tk
rxdSYq|Xnt�}|j|t�x3|jd�D]"\}}||j�kr�dSq�WdS)a 
    Returns True if the connection is dropped and should be closed.

    :param conn:
        :class:`httplib.HTTPConnection` object.

    Note: For platforms like AppEngine, this will always return ``False`` to
    let the platform handle connection recycling transparently for us.
    �sockFNgrT)�getattrrr�SocketError�registerr�fileno)�connr�p�fno�ev�r�P/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/util/connection.py�is_connection_droppeds"

	rN)�socketrrrrr�ImportErrorrrrrr�<module>s

python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__pycache__/url.cpython-34.pyc000064400000007562151735047570026726 0ustar00�
�Re��@s|ddlmZddlmZGdd�deddddd	d
ddg��Zd
d�Zdd�Zdd�ZdS)�)�
namedtuple�)�LocationParseErrorc
syeZdZdZfZddddddd�fdd�Zedd��Zedd��Zed	d
��Z	�S)�Urlzg
    Datastructure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`.
    Nc	s+tt|�j||||||||�S)N)�superr�__new__)�cls�scheme�auth�host�port�path�query�fragment)�	__class__��I/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/util/url.pyr
szUrl.__new__cCs|jS)z@For backwards-compatibility with urlparse. We're nice like that.)r)�selfrrr�hostnameszUrl.hostnamecCs6|jpd}|jdk	r2|d|j7}n|S)z)Absolute path including the query string.�/N�?)r
r)r�urirrr�request_uriszUrl.request_uricCs$|jrd|j|jfS|jS)z(Network location including host and portz%s:%d)rr)rrrr�netlocs	z
Url.netloc)
�__name__�
__module__�__qualname__�__doc__�slotsr�propertyrrrrr)rrrs'
rr	r
rrr
rrcCs�d}d}xV|D]N}|j|�}|dkr:qn|dksR||kr|}|}qqW|dks}|dkr�|ddfS|d|�||dd�|fS)a�
    Given a string and an iterable of delimiters, split on the first found
    delimiter. Return two split parts and the matched delimiter.

    If not found, then the first part is the full input string.

    Example: ::

        >>> split_first('foo/bar?baz', '?/=')
        ('foo', 'bar?baz', '/')
        >>> split_first('foo/bar?baz', '123')
        ('foo/bar?baz', '', None)

    Scales linearly with number of delims. Not ideal for large number of delims.
    Nr��)�find)�s�delims�min_idx�	min_delim�d�idxrrr�split_first's


r)cCs�d}d}d}d}d}d}d}d|krQ|jdd�\}}nt|dddg�\}}}	|	r�|	|}nd|kr�|jdd�\}}n|r�|dd	kr�|jd
d�\}}|d
7}nd|krS|jdd�\}
}|s|
}n|rJ|j�s;t|��nt|�}qid}n|ri|ri|}n|s�t|||||||�Sd|kr�|jdd�\}}nd|kr�|jdd�\}}nt|||||||�S)a7
    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.

    Partly backwards-compatible with :mod:`urlparse`.

    Example: ::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/', ...)
        >>> parse_url('google.com:80')
        Url(scheme=None, host='google.com', port=80, path=None, ...)
        >>> parse_url('/foo?bar')
        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    Nz://r!rr�#�@r�[�]�:)�splitr)�rsplit�isdigitr�intr)�urlr	r
rrr
rr�path_�delim�_hostrrr�	parse_urlHsF!

		
	r7cCs(t|�}|jpd|j|jfS)z5
    Deprecated. Use :func:`.parse_url` instead.
    �http)r7r	rr)r3�prrr�get_host�sr:N)�collectionsr�
exceptionsrrr)r7r:rrrr�<module>s
4!!Upython3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py000064400000000542151735047570023467 0ustar00def is_fp_closed(obj):
    """
    Checks whether a given file-like object is closed.

    :param obj:
        The file-like object to check.
    """
    if hasattr(obj, 'fp'):
        # Object is a container for another file-like object that gets released
        # on exhaustion (e.g. HTTPResponse)
        return obj.fp is None

    return obj.closed
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py000064400000022024151735047570023316 0ustar00from socket import _GLOBAL_DEFAULT_TIMEOUT
import time

from ..exceptions import TimeoutStateError


def current_time():
    """
    Retrieve the current time, this function is mocked out in unit testing.
    """
    return time.time()


_Default = object()
# The default timeout to use for socket connections. This is the attribute used
# by httplib to define the default timeout


class Timeout(object):
    """
    Utility object for storing timeout values.

    Example usage:

    .. code-block:: python

        timeout = urllib3.util.Timeout(connect=2.0, read=7.0)
        pool = HTTPConnectionPool('www.google.com', 80, timeout=timeout)
        pool.request(...) # Etc, etc

    :param connect:
        The maximum amount of time to wait for a connection attempt to a server
        to succeed. Omitting the parameter will default the connect timeout to
        the system default, probably `the global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout for connection attempts.

    :type connect: integer, float, or None

    :param read:
        The maximum amount of time to wait between consecutive
        read operations for a response from the server. Omitting
        the parameter will default the read timeout to the system
        default, probably `the global default timeout in socket.py
        <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
        None will set an infinite timeout.

    :type read: integer, float, or None

    :param total:
        This combines the connect and read timeouts into one; the read timeout
        will be set to the time leftover from the connect attempt. In the
        event that both a connect timeout and a total are specified, or a read
        timeout and a total are specified, the shorter timeout will be applied.

        Defaults to None.

    :type total: integer, float, or None

    .. note::

        Many factors can affect the total amount of time for urllib3 to return
        an HTTP response. Specifically, Python's DNS resolver does not obey the
        timeout specified on the socket. Other factors that can affect total
        request time include high CPU load, high swap, the program running at a
        low priority level, or other behaviors. The observed running time for
        urllib3 to return a response may be greater than the value passed to
        `total`.

        In addition, the read and total timeouts only measure the time between
        read operations on the socket connecting the client and the server,
        not the total amount of time for the request to return a complete
        response. For most requests, the timeout is raised because the server
        has not sent the first byte in the specified time. This is not always
        the case; if a server streams one byte every fifteen seconds, a timeout
        of 20 seconds will not ever trigger, even though the request will
        take several minutes to complete.

        If your goal is to cut off any request after a set amount of wall clock
        time, consider having a second "watcher" thread to cut off a slow
        request.
    """

    #: A sentinel object representing the default timeout value
    DEFAULT_TIMEOUT = _GLOBAL_DEFAULT_TIMEOUT

    def __init__(self, total=None, connect=_Default, read=_Default):
        self._connect = self._validate_timeout(connect, 'connect')
        self._read = self._validate_timeout(read, 'read')
        self.total = self._validate_timeout(total, 'total')
        self._start_connect = None

    def __str__(self):
        return '%s(connect=%r, read=%r, total=%r)' % (
            type(self).__name__, self._connect, self._read, self.total)


    @classmethod
    def _validate_timeout(cls, value, name):
        """ Check that a timeout attribute is valid

        :param value: The timeout value to validate
        :param name: The name of the timeout attribute to validate. This is used
            for clear error messages
        :return: the value
        :raises ValueError: if the type is not an integer or a float, or if it
            is a numeric value less than zero
        """
        if value is _Default:
            return cls.DEFAULT_TIMEOUT

        if value is None or value is cls.DEFAULT_TIMEOUT:
            return value

        try:
            float(value)
        except (TypeError, ValueError):
            raise ValueError("Timeout value %s was %s, but it must be an "
                             "int or float." % (name, value))

        try:
            if value < 0:
                raise ValueError("Attempted to set %s timeout to %s, but the "
                                 "timeout cannot be set to a value less "
                                 "than 0." % (name, value))
        except TypeError: # Python 3
            raise ValueError("Timeout value %s was %s, but it must be an "
                             "int or float." % (name, value))

        return value

    @classmethod
    def from_float(cls, timeout):
        """ Create a new Timeout from a legacy timeout value.

        The timeout value used by httplib.py sets the same timeout on the
        connect(), and recv() socket requests. This creates a :class:`Timeout`
        object that sets the individual timeouts to the ``timeout`` value passed
        to this function.

        :param timeout: The legacy timeout value
        :type timeout: integer, float, sentinel default object, or None
        :return: a Timeout object
        :rtype: :class:`Timeout`
        """
        return Timeout(read=timeout, connect=timeout)

    def clone(self):
        """ Create a copy of the timeout object

        Timeout properties are stored per-pool but each request needs a fresh
        Timeout object to ensure each one has its own start/stop configured.

        :return: a copy of the timeout object
        :rtype: :class:`Timeout`
        """
        # We can't use copy.deepcopy because that will also create a new object
        # for _GLOBAL_DEFAULT_TIMEOUT, which socket.py uses as a sentinel to
        # detect the user default.
        return Timeout(connect=self._connect, read=self._read,
                       total=self.total)

    def start_connect(self):
        """ Start the timeout clock, used during a connect() attempt

        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to start a timer that has been started already.
        """
        if self._start_connect is not None:
            raise TimeoutStateError("Timeout timer has already been started.")
        self._start_connect = current_time()
        return self._start_connect

    def get_connect_duration(self):
        """ Gets the time elapsed since the call to :meth:`start_connect`.

        :return: the elapsed time
        :rtype: float
        :raises urllib3.exceptions.TimeoutStateError: if you attempt
            to get duration for a timer that hasn't been started.
        """
        if self._start_connect is None:
            raise TimeoutStateError("Can't get connect duration for timer "
                                    "that has not started.")
        return current_time() - self._start_connect

    @property
    def connect_timeout(self):
        """ Get the value to use when setting a connection timeout.

        This will be a positive float or integer, the value None
        (never timeout), or the default system timeout.

        :return: the connect timeout
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        """
        if self.total is None:
            return self._connect

        if self._connect is None or self._connect is self.DEFAULT_TIMEOUT:
            return self.total

        return min(self._connect, self.total)

    @property
    def read_timeout(self):
        """ Get the value for the read timeout.

        This assumes some time has elapsed in the connection timeout and
        computes the read timeout appropriately.

        If self.total is set, the read timeout is dependent on the amount of
        time taken by the connect timeout. If the connection time has not been
        established, a :exc:`~urllib3.exceptions.TimeoutStateError` will be
        raised.

        :return: the value to use for the read timeout
        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
        :raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
            has not yet been called on this object.
        """
        if (self.total is not None and
            self.total is not self.DEFAULT_TIMEOUT and
            self._read is not None and
            self._read is not self.DEFAULT_TIMEOUT):
            # in case the connect timeout has not yet been established.
            if self._start_connect is None:
                return self._read
            return max(0, min(self.total - self.get_connect_duration(),
                              self._read))
        elif self.total is not None and self.total is not self.DEFAULT_TIMEOUT:
            return max(0, self.total - self.get_connect_duration())
        else:
            return self._read
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py000064400000001156151735047570023372 0ustar00# urllib3/util/__init__.py
# Copyright 2008-2014 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

from .connection import is_connection_dropped
from .request import make_headers
from .response import is_fp_closed
from .ssl_ import (
    SSLContext,
    HAS_SNI,
    assert_fingerprint,
    resolve_cert_reqs,
    resolve_ssl_version,
    ssl_wrap_socket,
)
from .timeout import (
    current_time,
    Timeout,
)
from .url import (
    get_host,
    parse_url,
    split_first,
    Url,
)
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py000064400000003604151735047600023315 0ustar00from base64 import b64encode

from ..packages import six


ACCEPT_ENCODING = 'gzip,deflate'


def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
                 basic_auth=None, proxy_basic_auth=None):
    """
    Shortcuts for generating request headers.

    :param keep_alive:
        If ``True``, adds 'connection: keep-alive' header.

    :param accept_encoding:
        Can be a boolean, list, or string.
        ``True`` translates to 'gzip,deflate'.
        List will get joined by comma.
        String will be used as provided.

    :param user_agent:
        String representing the user-agent you want, such as
        "python-urllib3/0.6"

    :param basic_auth:
        Colon-separated username:password string for 'authorization: basic ...'
        auth header.

    :param proxy_basic_auth:
        Colon-separated username:password string for 'proxy-authorization: basic ...'
        auth header.

    Example: ::

        >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
        {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
        >>> make_headers(accept_encoding=True)
        {'accept-encoding': 'gzip,deflate'}
    """
    headers = {}
    if accept_encoding:
        if isinstance(accept_encoding, str):
            pass
        elif isinstance(accept_encoding, list):
            accept_encoding = ','.join(accept_encoding)
        else:
            accept_encoding = ACCEPT_ENCODING
        headers['accept-encoding'] = accept_encoding

    if user_agent:
        headers['user-agent'] = user_agent

    if keep_alive:
        headers['connection'] = 'keep-alive'

    if basic_auth:
        headers['authorization'] = 'Basic ' + \
            b64encode(six.b(basic_auth)).decode('utf-8')

    if proxy_basic_auth:
        headers['proxy-authorization'] = 'Basic ' + \
            b64encode(six.b(proxy_basic_auth)).decode('utf-8')

    return headers


python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py000064400000006444151735047600023036 0ustar00# urllib3/exceptions.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php


## Base Exceptions

class HTTPError(Exception):
    "Base exception used by this module."
    pass


class PoolError(HTTPError):
    "Base exception for errors caused within a pool."
    def __init__(self, pool, message):
        self.pool = pool
        HTTPError.__init__(self, "%s: %s" % (pool, message))

    def __reduce__(self):
        # For pickling purposes.
        return self.__class__, (None, None)


class RequestError(PoolError):
    "Base exception for PoolErrors that have associated URLs."
    def __init__(self, pool, url, message):
        self.url = url
        PoolError.__init__(self, pool, message)

    def __reduce__(self):
        # For pickling purposes.
        return self.__class__, (None, self.url, None)


class SSLError(HTTPError):
    "Raised when SSL certificate fails in an HTTPS connection."
    pass


class ProxyError(HTTPError):
    "Raised when the connection to a proxy fails."
    pass


class ConnectionError(HTTPError):
    "Raised when a normal connection fails."
    pass


class DecodeError(HTTPError):
    "Raised when automatic decoding based on Content-Type fails."
    pass


## Leaf Exceptions

class MaxRetryError(RequestError):
    "Raised when the maximum number of retries is exceeded."

    def __init__(self, pool, url, reason=None):
        self.reason = reason

        message = "Max retries exceeded with url: %s" % url
        if reason:
            message += " (Caused by %s: %s)" % (type(reason), reason)
        else:
            message += " (Caused by redirect)"

        RequestError.__init__(self, pool, url, message)


class HostChangedError(RequestError):
    "Raised when an existing pool gets a request for a foreign host."

    def __init__(self, pool, url, retries=3):
        message = "Tried to open a foreign host with url: %s" % url
        RequestError.__init__(self, pool, url, message)
        self.retries = retries


class TimeoutStateError(HTTPError):
    """ Raised when passing an invalid state to a timeout """
    pass


class TimeoutError(HTTPError):
    """ Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    """
    pass


class ReadTimeoutError(TimeoutError, RequestError):
    "Raised when a socket timeout occurs while receiving data from a server"
    pass


# This timeout error does not have a URL attached and needs to inherit from the
# base HTTPError
class ConnectTimeoutError(TimeoutError):
    "Raised when a socket timeout occurs while connecting to a server"
    pass


class EmptyPoolError(PoolError):
    "Raised when a pool runs out of connections and no more are allowed."
    pass


class ClosedPoolError(PoolError):
    "Raised when a request enters a pool after the pool has been closed."
    pass


class LocationParseError(ValueError, HTTPError):
    "Raised when get_host or similar fails to parse the URL input."

    def __init__(self, location):
        message = "Failed to parse: %s" % location
        HTTPError.__init__(self, message)

        self.location = location
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py000064400000021421151735047600023151 0ustar00# urllib3/poolmanager.py
# Copyright 2008-2014 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import logging

try:  # Python 3
    from urllib.parse import urljoin
except ImportError:
    from urlparse import urljoin

from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from .connectionpool import port_by_scheme
from .request import RequestMethods
from .util import parse_url


__all__ = ['PoolManager', 'ProxyManager', 'proxy_from_url']


pool_classes_by_scheme = {
    'http': HTTPConnectionPool,
    'https': HTTPSConnectionPool,
}

log = logging.getLogger(__name__)

SSL_KEYWORDS = ('key_file', 'cert_file', 'cert_reqs', 'ca_certs',
                'ssl_version')


class PoolManager(RequestMethods):
    """
    Allows for arbitrary requests while transparently keeping track of
    necessary connection pools for you.

    :param num_pools:
        Number of connection pools to cache before discarding the least
        recently used pool.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param \**connection_pool_kw:
        Additional parameters are used to create fresh
        :class:`urllib3.connectionpool.ConnectionPool` instances.

    Example: ::

        >>> manager = PoolManager(num_pools=2)
        >>> r = manager.request('GET', 'http://google.com/')
        >>> r = manager.request('GET', 'http://google.com/mail')
        >>> r = manager.request('GET', 'http://yahoo.com/')
        >>> len(manager.pools)
        2

    """

    proxy = None

    def __init__(self, num_pools=10, headers=None, **connection_pool_kw):
        RequestMethods.__init__(self, headers)
        self.connection_pool_kw = connection_pool_kw
        self.pools = RecentlyUsedContainer(num_pools,
                                           dispose_func=lambda p: p.close())

    def _new_pool(self, scheme, host, port):
        """
        Create a new :class:`ConnectionPool` based on host, port and scheme.

        This method is used to actually create the connection pools handed out
        by :meth:`connection_from_url` and companion methods. It is intended
        to be overridden for customization.
        """
        pool_cls = pool_classes_by_scheme[scheme]
        kwargs = self.connection_pool_kw
        if scheme == 'http':
            kwargs = self.connection_pool_kw.copy()
            for kw in SSL_KEYWORDS:
                kwargs.pop(kw, None)

        return pool_cls(host, port, **kwargs)

    def clear(self):
        """
        Empty our store of pools and direct them all to close.

        This will not affect in-flight connections, but they will not be
        re-used after completion.
        """
        self.pools.clear()

    def connection_from_host(self, host, port=None, scheme='http'):
        """
        Get a :class:`ConnectionPool` based on the host, port, and scheme.

        If ``port`` isn't given, it will be derived from the ``scheme`` using
        ``urllib3.connectionpool.port_by_scheme``.
        """

        scheme = scheme or 'http'

        port = port or port_by_scheme.get(scheme, 80)

        pool_key = (scheme, host, port)

        with self.pools.lock:
            # If the scheme, host, or port doesn't match existing open
            # connections, open a new ConnectionPool.
            pool = self.pools.get(pool_key)
            if pool:
                return pool

            # Make a fresh ConnectionPool of the desired type
            pool = self._new_pool(scheme, host, port)
            self.pools[pool_key] = pool
        return pool

    def connection_from_url(self, url):
        """
        Similar to :func:`urllib3.connectionpool.connection_from_url` but
        doesn't pass any additional parameters to the
        :class:`urllib3.connectionpool.ConnectionPool` constructor.

        Additional parameters are taken from the :class:`.PoolManager`
        constructor.
        """
        u = parse_url(url)
        return self.connection_from_host(u.host, port=u.port, scheme=u.scheme)

    def urlopen(self, method, url, redirect=True, **kw):
        """
        Same as :meth:`urllib3.connectionpool.HTTPConnectionPool.urlopen`
        with custom cross-host redirect logic and only sends the request-uri
        portion of the ``url``.

        The given ``url`` parameter must be absolute, such that an appropriate
        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
        """
        u = parse_url(url)
        conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)

        kw['assert_same_host'] = False
        kw['redirect'] = False
        if 'headers' not in kw:
            kw['headers'] = self.headers

        if self.proxy is not None and u.scheme == "http":
            response = conn.urlopen(method, url, **kw)
        else:
            response = conn.urlopen(method, u.request_uri, **kw)

        redirect_location = redirect and response.get_redirect_location()
        if not redirect_location:
            return response

        # Support relative URLs for redirecting.
        redirect_location = urljoin(url, redirect_location)

        # RFC 2616, Section 10.3.4
        if response.status == 303:
            method = 'GET'

        log.info("Redirecting %s -> %s" % (url, redirect_location))
        kw['retries'] = kw.get('retries', 3) - 1  # Persist retries countdown
        kw['redirect'] = redirect
        return self.urlopen(method, redirect_location, **kw)


class ProxyManager(PoolManager):
    """
    Behaves just like :class:`PoolManager`, but sends all requests through
    the defined proxy, using the CONNECT method for HTTPS URLs.

    :param proxy_url:
        The URL of the proxy to be used.

    :param proxy_headers:
        A dictionary contaning headers that will be sent to the proxy. In case
        of HTTP they are being sent with each request, while in the
        HTTPS/CONNECT case they are sent only once. Could be used for proxy
        authentication.

    Example:
        >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
        >>> r1 = proxy.request('GET', 'http://google.com/')
        >>> r2 = proxy.request('GET', 'http://httpbin.org/')
        >>> len(proxy.pools)
        1
        >>> r3 = proxy.request('GET', 'https://httpbin.org/')
        >>> r4 = proxy.request('GET', 'https://twitter.com/')
        >>> len(proxy.pools)
        3

    """

    def __init__(self, proxy_url, num_pools=10, headers=None,
                 proxy_headers=None, **connection_pool_kw):

        if isinstance(proxy_url, HTTPConnectionPool):
            proxy_url = '%s://%s:%i' % (proxy_url.scheme, proxy_url.host,
                                        proxy_url.port)
        proxy = parse_url(proxy_url)
        if not proxy.port:
            port = port_by_scheme.get(proxy.scheme, 80)
            proxy = proxy._replace(port=port)
        self.proxy = proxy
        self.proxy_headers = proxy_headers or {}
        assert self.proxy.scheme in ("http", "https"), \
            'Not supported proxy scheme %s' % self.proxy.scheme
        connection_pool_kw['_proxy'] = self.proxy
        connection_pool_kw['_proxy_headers'] = self.proxy_headers
        super(ProxyManager, self).__init__(
            num_pools, headers, **connection_pool_kw)

    def connection_from_host(self, host, port=None, scheme='http'):
        if scheme == "https":
            return super(ProxyManager, self).connection_from_host(
                host, port, scheme)

        return super(ProxyManager, self).connection_from_host(
            self.proxy.host, self.proxy.port, self.proxy.scheme)

    def _set_proxy_headers(self, url, headers=None):
        """
        Sets headers needed by proxies: specifically, the Accept and Host
        headers. Only sets headers not provided by the user.
        """
        headers_ = {'Accept': '*/*'}

        netloc = parse_url(url).netloc
        if netloc:
            headers_['Host'] = netloc

        if headers:
            headers_.update(headers)
        return headers_

    def urlopen(self, method, url, redirect=True, **kw):
        "Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute."
        u = parse_url(url)

        if u.scheme == "http":
            # For proxied HTTPS requests, httplib sets the necessary headers
            # on the CONNECT to the proxy. For HTTP, we'll definitely
            # need to set 'Host' at the very least.
            kw['headers'] = self._set_proxy_headers(url, kw.get('headers',
                                                                self.headers))

        return super(ProxyManager, self).urlopen(method, url, redirect, **kw)


def proxy_from_url(url, **kw):
    return ProxyManager(proxy_url=url, **kw)
site-packages/pip/_vendor/requests/packages/urllib3/packages/__pycache__/ordered_dict.cpython-34.pyc000064400000021304151735047600031255 0ustar00python3.4�
�Re�"�@s�yddlmZWn"ek
r8ddlmZYnXy ddlmZmZmZWnek
rmYnXGdd�de	�Z
dS)�)�	get_ident)�KeysView�
ValuesView�	ItemsViewc@sreZdZdZdd�Zejdd�Zejdd�Zdd	�Zd
d�Z	dd
�Z
ddd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�ZeZe�Zedd �Zd!d"d#�Zid$d%�Zd&d'�Zd(d)�Zed!d*d+��Zd,d-�Zd.d/�Zd0d1�Zd2d3�Z d4d5�Z!d!S)6�OrderedDictz)Dictionary that remembers insertion ordercOs�t|�dkr+tdt|���ny|jWnAtk
ryg|_}||dg|dd�<i|_YnX|j||�dS)z�Initialize an ordered dictionary.  Signature is the same as for
        regular dictionaries, but keyword arguments are not recommended
        because their insertion order is arbitrary.

        �z$expected at most 1 arguments, got %dN)�len�	TypeError�_OrderedDict__root�AttributeError�_OrderedDict__map�_OrderedDict__update)�self�args�kwds�root�r�V/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py�__init__s

zOrderedDict.__init__cCs\||krH|j}|d}|||g|d<|d<|j|<n||||�dS)z!od.__setitem__(i, y) <==> od[i]=yrrN)r
r)r�key�value�dict_setitemr�lastrrr�__setitem__-s
	
)zOrderedDict.__setitem__cCs@|||�|jj|�\}}}||d<||d<dS)z od.__delitem__(y) <==> del od[y]rrN)r�pop)rr�dict_delitem�	link_prev�	link_nextrrr�__delitem__7s

zOrderedDict.__delitem__ccs=|j}|d}x#||k	r8|dV|d}qWdS)zod.__iter__() <==> iter(od)r�N)r
)rr�currrrr�__iter__@s
	
	zOrderedDict.__iter__ccs=|j}|d}x#||k	r8|dV|d}qWdS)z#od.__reversed__() <==> reversed(od)rrN)r
)rrr rrr�__reversed__Hs
	
	zOrderedDict.__reversed__cCs�yZx$|jj�D]}|dd�=qW|j}||dg|dd�<|jj�Wntk
rnYnXtj|�dS)z.od.clear() -> None.  Remove all items from od.N)r�
itervaluesr
�clearr�dict)r�noderrrrr$Ps	
zOrderedDict.clearTcCs�|std��n|j}|rO|d}|d}||d<||d<n(|d}|d}||d<||d<|d}|j|=tj||�}||fS)z�od.popitem() -> (k, v), return and remove a (key, value) pair.
        Pairs are returned in LIFO order if last is true or FIFO order if false.

        zdictionary is emptyrrr)�KeyErrorr
rr%r)rrr�linkrrrrrrr�popitem\s 	









zOrderedDict.popitemcCs
t|�S)zod.keys() -> list of keys in od)�list)rrrr�keysuszOrderedDict.keyscs�fdd��D�S)z#od.values() -> list of values in odcsg|]}�|�qSrr)�.0r)rrr�
<listcomp>{s	z&OrderedDict.values.<locals>.<listcomp>r)rr)rr�valuesyszOrderedDict.valuescs�fdd��D�S)z.od.items() -> list of (key, value) pairs in odcs g|]}|�|f�qSrr)r,r)rrrr-s	z%OrderedDict.items.<locals>.<listcomp>r)rr)rr�items}szOrderedDict.itemscCs
t|�S)z0od.iterkeys() -> an iterator over the keys in od)�iter)rrrr�iterkeys�szOrderedDict.iterkeysccsx|D]}||VqWdS)z2od.itervalues -> an iterator over the values in odNr)r�krrrr#�s
zOrderedDict.itervaluesccs$x|D]}|||fVqWdS)z=od.iteritems -> an iterator over the (key, value) items in odNr)rr2rrr�	iteritems�s
zOrderedDict.iteritemscOs&t|�dkr.tdt|�f��n|sCtd��n|d}f}t|�dkrr|d}nt|t�r�xw|D]}||||<q�WnXt|d�r�xF|j�D]}||||<q�Wn!x|D]\}}|||<q�Wx$|j�D]\}}|||<qWdS)a�od.update(E, **F) -> None.  Update od from dict/iterable E and F.

        If E is a dict instance, does:           for k in E: od[k] = E[k]
        If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
        Or if E is an iterable of items, does:   for k, v in E: od[k] = v
        In either case, this is followed by:     for k, v in F.items(): od[k] = v

        rz8update() takes at most 2 positional arguments (%d given)z,update() takes at least 1 argument (0 given)rrr+N)rr	�
isinstancer%�hasattrr+r/)rrr�otherrrrrr�update�s&	


zOrderedDict.updatecCsC||kr!||}||=|S||jkr?t|��n|S)z�od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
        If key is not found, d is returned if given, otherwise KeyError is raised.

        )�_OrderedDict__markerr')rr�default�resultrrrr�s
zOrderedDict.popNcCs"||kr||S|||<|S)zDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in odr)rrr9rrr�
setdefault�s
zOrderedDict.setdefaultcCsst|�t�f}||kr%dSd||<z5|sId|jjfSd|jj|j�fSWd||=XdS)zod.__repr__() <==> repr(od)z...rz%s()z%s(%r)N)�id�
_get_ident�	__class__�__name__r/)rZ
_repr_runningZcall_keyrrr�__repr__�s
zOrderedDict.__repr__cs~�fdd��D�}t��j�}x'tt��D]}|j|d�q;W|rn�j|f|fS�j|ffS)z%Return state information for picklingcs g|]}|�|g�qSrr)r,r2)rrrr-�s	z*OrderedDict.__reduce__.<locals>.<listcomp>N)�vars�copyrrr>)rr/�	inst_dictr2r)rr�
__reduce__�szOrderedDict.__reduce__cCs
|j|�S)z!od.copy() -> a shallow copy of od)r>)rrrrrB�szOrderedDict.copycCs(|�}x|D]}|||<qW|S)z�OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
        and values equal to v (which defaults to None).

        r)�cls�iterabler�drrrr�fromkeys�s	
zOrderedDict.fromkeyscCsMt|t�r=t|�t|�ko<|j�|j�kStj||�S)z�od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
        while comparison to a regular mapping is order-insensitive.

        )r4rrr/r%�__eq__)rr6rrrrI�s.zOrderedDict.__eq__cCs||kS)Nr)rr6rrr�__ne__�szOrderedDict.__ne__cCs
t|�S)z@od.viewkeys() -> a set-like object providing a view on od's keys)r)rrrr�viewkeys�szOrderedDict.viewkeyscCs
t|�S)z<od.viewvalues() -> an object providing a view on od's values)r)rrrr�
viewvalues�szOrderedDict.viewvaluescCs
t|�S)zBod.viewitems() -> a set-like object providing a view on od's items)r)rrrr�	viewitemsszOrderedDict.viewitems)"r?�
__module__�__qualname__�__doc__rr%rrr!r"r$r)r+r.r/r1r#r3r7r
�objectr8rr;r@rDrB�classmethodrHrIrJrKrLrMrrrrrs:
		



	rN)�threadrr=�ImportError�dummy_thread�_abcollrrrr%rrrrr�<module>s
 
site-packages/pip/_vendor/requests/packages/urllib3/packages/__pycache__/__init__.cpython-34.pyc000064400000000417151735047600030367 0ustar00python3.4�
�ReJ�@s$ddlmZddlmZdS)�)�absolute_import�)�ssl_match_hostnameN)�
__future__r�r�rr�R/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/packages/__init__.py�<module>ssite-packages/pip/_vendor/requests/packages/urllib3/packages/__pycache__/six.cpython-34.pyc000064400000025411151735047610027435 0ustar00python3.4�
�Rel-�2@s�dZddlZddlZddlZdZdZejddkZer�efZ	e
fZefZ
eZeZejZn�efZ	e
efZeejfZ
eZeZejjd�r�e
d��ZnWGd	d
�d
e�Zyee��Wnek
re
d��ZYnXe
d��Z[dd
�Zdd�ZGdd�de�ZGdd�de�Z Gdd�de�Z!Gdd�dej"�Z#e!dddd�e!ddddd�e!dd dd!d�e!d"ddd#d"�e!d$d d%d&�e!d'd d(�e!ddd�e!d)d dd)d*�e!d+ddd,d+�e dd �e d-d.�e d/d0�e d1d2d3�e d4d5d6�e d7d8d9�e d:d;d<�e d=d>d?�e d@d@dA�e dBdBdA�e dCdCdA�e dDdDdE�e dFdG�e dHdI�e dJdK�e dLdM�e dNdOdP�e dQdRdS�e dTdUdV�e dWdXdY�e dZd[d\�e d]d^d_�e d`dadb�e dcddde�e dfdgdh�e didjdS�e dkdldm�e dndodp�e dqdrdY�e dsdtdu�e dvdw�g(Z$x!e$D]Z%e&e#e%j'e%�qW[%e#dx�Z(ej)e*dy<dzd{�Z+d|d}�Z,er�d~Z-dZ.d�Z/d�Z0d�Z1d�Z2d�Z3n*d�Z-d�Z.d�Z/d�Z0d�Z1d�Z2d�Z3y
e4Z5Wne6k
r�d�d��Z5YnXe5Z4erd�d��Z7eZ8d�d��Z9n(d�d��Z7Gd�d��d�e�Z8e9Z9ee7d��ej:e-�Z;ej:e.�Z<ej:e/�Z=ej:e0�Z>d�d��Z?d�d��Z@d�d��ZAer!d�d��ZBd�d��ZCejddkr�d�d��ZDnejEd�dd��ZDddlFZFeFjGZGeFjHZHn7d�d��ZBd�d��ZCeIZDddlGZGeGjGZGZHeeBd��eeCd��er�ddlJZJeKeJd��ZLdd�d��ZMeKeJd��ZN[Jn(ddd�d��ZLeLd��d�d��ZNeeMd��ed�d��ZOdS)�z6Utilities for writing code that runs on Python 2 and 3�Nz'Benjamin Peterson <benjamin@python.org>z1.2.0��java��c@seZdZdd�ZdS)�XcCsdS)Nrrl�)�selfrr�M/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/packages/six.py�__len__6sz	X.__len__N)�__name__�
__module__�__qualname__r
rrrr	r5sr�?cCs
||_dS)z Add documentation to a function.N)�__doc__)�func�docrrr	�_add_docCsrcCst|�tj|S)z7Import module, returning the module after the last dot.)�
__import__�sys�modules)�namerrr	�_import_moduleHs
rc@s(eZdZdd�Zdd�ZdS)�
_LazyDescrcCs
||_dS)N)r)rrrrr	�__init__Psz_LazyDescr.__init__cCs3|j�}t||j|�t||j�|S)N)�_resolve�setattrr�delattr)r�obj�tp�resultrrr	�__get__Ssz_LazyDescr.__get__N)rrr
rr rrrr	rNsrcs1eZdZd�fdd�Zdd�Z�S)�MovedModuleNcsJtt|�j|�tr=|dkr1|}n||_n	||_dS)N)�superr!r�PY3�mod)rr�old�new)�	__class__rr	r]s	zMovedModule.__init__cCs
t|j�S)N)rr$)rrrr	rfszMovedModule._resolve)rrr
rrrr)r'r	r![s	r!cs4eZdZdd�fdd�Zdd�Z�S)�MovedAttributeNcs�tt|�j|�trp|dkr1|}n||_|dkrd|dkr[|}qd|}n||_n'||_|dkr�|}n||_dS)N)r"r(rr#r$�attr)rr�old_mod�new_mod�old_attr�new_attr)r'rr	rls						zMovedAttribute.__init__cCst|j�}t||j�S)N)rr$�getattrr))r�modulerrr	r~szMovedAttribute._resolve)rrr
rrrr)r'r	r(jsr(c@seZdZdZdS)�_MovedItemszLazy loading of moved objectsN)rrr
rrrrr	r0�sr0�	cStringIO�io�StringIO�filter�	itertools�builtins�ifilter�input�__builtin__�	raw_input�map�imap�
reload_module�imp�reload�reduce�	functools�xrange�range�zip�izip�configparser�ConfigParser�copyreg�copy_reg�http_cookiejar�	cookielibzhttp.cookiejar�http_cookies�Cookiezhttp.cookies�
html_entities�htmlentitydefsz
html.entities�html_parser�
HTMLParserzhtml.parser�http_client�httplibzhttp.client�BaseHTTPServerzhttp.server�
CGIHTTPServer�SimpleHTTPServer�cPickle�pickle�queue�Queue�reprlib�repr�socketserver�SocketServer�tkinter�Tkinter�tkinter_dialog�Dialogztkinter.dialog�tkinter_filedialog�
FileDialogztkinter.filedialog�tkinter_scrolledtext�ScrolledTextztkinter.scrolledtext�tkinter_simpledialog�SimpleDialogztkinter.simpledialog�tkinter_tix�Tixztkinter.tix�tkinter_constants�Tkconstantsztkinter.constants�tkinter_dnd�Tkdndztkinter.dnd�tkinter_colorchooser�tkColorChooserztkinter.colorchooser�tkinter_commondialog�tkCommonDialogztkinter.commondialog�tkinter_tkfiledialog�tkFileDialog�tkinter_font�tkFontztkinter.font�tkinter_messagebox�tkMessageBoxztkinter.messagebox�tkinter_tksimpledialog�tkSimpleDialog�urllib_robotparser�robotparserzurllib.robotparser�winreg�_winreg�movesz.movescCstt|j|�dS)zAdd an item to six.moves.N)rr0r)�moverrr	�add_move�sr�cCs`ytt|�WnHtk
r[ytj|=Wn%tk
rVtd|f��YnXYnXdS)zRemove item from six.moves.zno such move, %rN)rr0�AttributeErrorr�__dict__�KeyError)rrrr	�remove_move�s

r��__func__�__self__�__code__�__defaults__�keys�values�items�im_funcZim_selfZ	func_codeZ
func_defaults�iterkeys�
itervalues�	iteritemscCs
|j�S)N)�next)�itrrr	�advance_iterator�sr�cCs|S)Nr)�unboundrrr	�get_unbound_function�sr�cCs tdd�t|�jD��S)Ncss|]}d|jkVqdS)�__call__N)r�)�.0�klassrrr	�	<genexpr>�szcallable.<locals>.<genexpr>)�any�type�__mro__)rrrr	�callable�sr�cCs|jS)N)r�)r�rrr	r��sc@seZdZdd�ZdS)�IteratorcCst|�j|�S)N)r��__next__)rrrr	r��sz
Iterator.nextN)rrr
r�rrrr	r��sr�z3Get the function out of a possibly unbound functioncCstt|t���S)z1Return an iterator over the keys of a dictionary.)�iterr.�	_iterkeys)�drrr	r�scCstt|t���S)z3Return an iterator over the values of a dictionary.)r�r.�_itervalues)r�rrr	r�scCstt|t���S)z?Return an iterator over the (key, value) pairs of a dictionary.)r�r.�
_iteritems)r�rrr	r�scCs
|jd�S)Nzlatin-1)�encode)�srrr	�bsr�cCs|S)Nr)r�rrr	�usr�cCs
t|f�S)N)�bytes)�irrr	�int2bytesr��to_bytes�bigcCs|S)Nr)r�rrr	r�#scCs
t|d�S)NZunicode_escape)�unicode)r�rrr	r�%szByte literalzText literal�execcCs+|j|k	r!|j|��n|�dS)N)�
__traceback__�with_traceback)r�value�tbrrr	�reraise3sr��printcCse|dkrBtjd�}|j}|dkr<|j}n~n|dkrW|}ntd�dS)zExecute code in a namespace.Nrzexec code in globs, locs)r�	_getframe�	f_globals�f_localsr�)�code�globs�locs�framerrr	�exec_=s		r�z9def reraise(tp, value, tb=None):
    raise tp, value, tb
c
s�|jdtj���dkr%dS�fdd�}d}|jdd�}|dk	r�t|t�rsd}q�t|t�s�td��q�n|jd	d�}|dk	r�t|t�r�d}q�t|t�s�td
��q�n|rtd��n|s3x*|D]}t|t�r
d}Pq
q
Wn|rTtd�}td
�}nd}d
}|dkru|}n|dkr�|}nx7t|�D])\}	}|	r�||�n||�q�W||�dS)zThe new-style print function.�fileNcs/t|t�st|�}n�j|�dS)N)�
isinstance�
basestring�str�write)�data)�fprr	r�Tszprint_.<locals>.writeF�sepTzsep must be None or a string�endzend must be None or a stringz$invalid keyword arguments to print()�
� )�popr�stdoutr�r�r��	TypeError�	enumerate)
�args�kwargsr�Zwant_unicoder�r��arg�newline�spacer�r)r�r	�print_OsL		
		
r�zReraise an exception.cCs|d|fi�S)z%Create a base class with a metaclass.�NewBaser)�meta�baserrr	�with_metaclasssr�li���li���ll����)Pr�operatorr�types�
__author__�__version__�version_infor#r��string_types�int�
integer_typesr��class_types�	text_typer��binary_type�maxsize�MAXSIZEr��longZ	ClassTyper��platform�
startswith�objectr�len�
OverflowErrorrrrr!r(�
ModuleTyper0�_moved_attributesr)rrrrrr�r��
_meth_func�
_meth_self�
_func_code�_func_defaultsr�r�r�r�r��	NameErrorr�r�r��
attrgetter�get_method_function�get_method_self�get_function_code�get_function_defaultsr�r�r�r�r�r��methodcallerr2r3�BytesIO�chrr6r.r�r�r�r�rrrr	�<module>s$				

			
	

	



-
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py000064400000026554151735047610023243 0ustar00"""Utilities for writing code that runs on Python 2 and 3"""

#Copyright (c) 2010-2011 Benjamin Peterson

#Permission is hereby granted, free of charge, to any person obtaining a copy of
#this software and associated documentation files (the "Software"), to deal in
#the Software without restriction, including without limitation the rights to
#use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
#the Software, and to permit persons to whom the Software is furnished to do so,
#subject to the following conditions:

#The above copyright notice and this permission notice shall be included in all
#copies or substantial portions of the Software.

#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
#FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
#COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
#IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import operator
import sys
import types

__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.2.0"  # Revision 41c74fef2ded


# True if we are running on Python 3.
PY3 = sys.version_info[0] == 3

if PY3:
    string_types = str,
    integer_types = int,
    class_types = type,
    text_type = str
    binary_type = bytes

    MAXSIZE = sys.maxsize
else:
    string_types = basestring,
    integer_types = (int, long)
    class_types = (type, types.ClassType)
    text_type = unicode
    binary_type = str

    if sys.platform.startswith("java"):
        # Jython always uses 32 bits.
        MAXSIZE = int((1 << 31) - 1)
    else:
        # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
        class X(object):
            def __len__(self):
                return 1 << 31
        try:
            len(X())
        except OverflowError:
            # 32-bit
            MAXSIZE = int((1 << 31) - 1)
        else:
            # 64-bit
            MAXSIZE = int((1 << 63) - 1)
            del X


def _add_doc(func, doc):
    """Add documentation to a function."""
    func.__doc__ = doc


def _import_module(name):
    """Import module, returning the module after the last dot."""
    __import__(name)
    return sys.modules[name]


class _LazyDescr(object):

    def __init__(self, name):
        self.name = name

    def __get__(self, obj, tp):
        result = self._resolve()
        setattr(obj, self.name, result)
        # This is a bit ugly, but it avoids running this again.
        delattr(tp, self.name)
        return result


class MovedModule(_LazyDescr):

    def __init__(self, name, old, new=None):
        super(MovedModule, self).__init__(name)
        if PY3:
            if new is None:
                new = name
            self.mod = new
        else:
            self.mod = old

    def _resolve(self):
        return _import_module(self.mod)


class MovedAttribute(_LazyDescr):

    def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
        super(MovedAttribute, self).__init__(name)
        if PY3:
            if new_mod is None:
                new_mod = name
            self.mod = new_mod
            if new_attr is None:
                if old_attr is None:
                    new_attr = name
                else:
                    new_attr = old_attr
            self.attr = new_attr
        else:
            self.mod = old_mod
            if old_attr is None:
                old_attr = name
            self.attr = old_attr

    def _resolve(self):
        module = _import_module(self.mod)
        return getattr(module, self.attr)



class _MovedItems(types.ModuleType):
    """Lazy loading of moved objects"""


_moved_attributes = [
    MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
    MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
    MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
    MovedAttribute("map", "itertools", "builtins", "imap", "map"),
    MovedAttribute("reload_module", "__builtin__", "imp", "reload"),
    MovedAttribute("reduce", "__builtin__", "functools"),
    MovedAttribute("StringIO", "StringIO", "io"),
    MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
    MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),

    MovedModule("builtins", "__builtin__"),
    MovedModule("configparser", "ConfigParser"),
    MovedModule("copyreg", "copy_reg"),
    MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
    MovedModule("http_cookies", "Cookie", "http.cookies"),
    MovedModule("html_entities", "htmlentitydefs", "html.entities"),
    MovedModule("html_parser", "HTMLParser", "html.parser"),
    MovedModule("http_client", "httplib", "http.client"),
    MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
    MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
    MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
    MovedModule("cPickle", "cPickle", "pickle"),
    MovedModule("queue", "Queue"),
    MovedModule("reprlib", "repr"),
    MovedModule("socketserver", "SocketServer"),
    MovedModule("tkinter", "Tkinter"),
    MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
    MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
    MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
    MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
    MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
    MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
    MovedModule("tkinter_colorchooser", "tkColorChooser",
                "tkinter.colorchooser"),
    MovedModule("tkinter_commondialog", "tkCommonDialog",
                "tkinter.commondialog"),
    MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
    MovedModule("tkinter_font", "tkFont", "tkinter.font"),
    MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
    MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
                "tkinter.simpledialog"),
    MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
    MovedModule("winreg", "_winreg"),
]
for attr in _moved_attributes:
    setattr(_MovedItems, attr.name, attr)
del attr

moves = sys.modules[__name__ + ".moves"] = _MovedItems("moves")


def add_move(move):
    """Add an item to six.moves."""
    setattr(_MovedItems, move.name, move)


def remove_move(name):
    """Remove item from six.moves."""
    try:
        delattr(_MovedItems, name)
    except AttributeError:
        try:
            del moves.__dict__[name]
        except KeyError:
            raise AttributeError("no such move, %r" % (name,))


if PY3:
    _meth_func = "__func__"
    _meth_self = "__self__"

    _func_code = "__code__"
    _func_defaults = "__defaults__"

    _iterkeys = "keys"
    _itervalues = "values"
    _iteritems = "items"
else:
    _meth_func = "im_func"
    _meth_self = "im_self"

    _func_code = "func_code"
    _func_defaults = "func_defaults"

    _iterkeys = "iterkeys"
    _itervalues = "itervalues"
    _iteritems = "iteritems"


try:
    advance_iterator = next
except NameError:
    def advance_iterator(it):
        return it.next()
next = advance_iterator


if PY3:
    def get_unbound_function(unbound):
        return unbound

    Iterator = object

    def callable(obj):
        return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
else:
    def get_unbound_function(unbound):
        return unbound.im_func

    class Iterator(object):

        def next(self):
            return type(self).__next__(self)

    callable = callable
_add_doc(get_unbound_function,
         """Get the function out of a possibly unbound function""")


get_method_function = operator.attrgetter(_meth_func)
get_method_self = operator.attrgetter(_meth_self)
get_function_code = operator.attrgetter(_func_code)
get_function_defaults = operator.attrgetter(_func_defaults)


def iterkeys(d):
    """Return an iterator over the keys of a dictionary."""
    return iter(getattr(d, _iterkeys)())

def itervalues(d):
    """Return an iterator over the values of a dictionary."""
    return iter(getattr(d, _itervalues)())

def iteritems(d):
    """Return an iterator over the (key, value) pairs of a dictionary."""
    return iter(getattr(d, _iteritems)())


if PY3:
    def b(s):
        return s.encode("latin-1")
    def u(s):
        return s
    if sys.version_info[1] <= 1:
        def int2byte(i):
            return bytes((i,))
    else:
        # This is about 2x faster than the implementation above on 3.2+
        int2byte = operator.methodcaller("to_bytes", 1, "big")
    import io
    StringIO = io.StringIO
    BytesIO = io.BytesIO
else:
    def b(s):
        return s
    def u(s):
        return unicode(s, "unicode_escape")
    int2byte = chr
    import StringIO
    StringIO = BytesIO = StringIO.StringIO
_add_doc(b, """Byte literal""")
_add_doc(u, """Text literal""")


if PY3:
    import builtins
    exec_ = getattr(builtins, "exec")


    def reraise(tp, value, tb=None):
        if value.__traceback__ is not tb:
            raise value.with_traceback(tb)
        raise value


    print_ = getattr(builtins, "print")
    del builtins

else:
    def exec_(code, globs=None, locs=None):
        """Execute code in a namespace."""
        if globs is None:
            frame = sys._getframe(1)
            globs = frame.f_globals
            if locs is None:
                locs = frame.f_locals
            del frame
        elif locs is None:
            locs = globs
        exec("""exec code in globs, locs""")


    exec_("""def reraise(tp, value, tb=None):
    raise tp, value, tb
""")


    def print_(*args, **kwargs):
        """The new-style print function."""
        fp = kwargs.pop("file", sys.stdout)
        if fp is None:
            return
        def write(data):
            if not isinstance(data, basestring):
                data = str(data)
            fp.write(data)
        want_unicode = False
        sep = kwargs.pop("sep", None)
        if sep is not None:
            if isinstance(sep, unicode):
                want_unicode = True
            elif not isinstance(sep, str):
                raise TypeError("sep must be None or a string")
        end = kwargs.pop("end", None)
        if end is not None:
            if isinstance(end, unicode):
                want_unicode = True
            elif not isinstance(end, str):
                raise TypeError("end must be None or a string")
        if kwargs:
            raise TypeError("invalid keyword arguments to print()")
        if not want_unicode:
            for arg in args:
                if isinstance(arg, unicode):
                    want_unicode = True
                    break
        if want_unicode:
            newline = unicode("\n")
            space = unicode(" ")
        else:
            newline = "\n"
            space = " "
        if sep is None:
            sep = space
        if end is None:
            end = newline
        for i, arg in enumerate(args):
            if i:
                write(sep)
            write(arg)
        write(end)

_add_doc(reraise, """Reraise an exception.""")


def with_metaclass(meta, base=object):
    """Create a base class with a metaclass."""
    return meta("NewBase", (base,), {})
_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/__init__.cpython-34.pyc000064400000000755151735047610034250 0ustar00python3.4/site-packages/pip�
�Re��@s~yddlmZmZWnWek
rsyddlmZmZWn(ek
rnddlmZmZYnXYnXdZdS)�)�CertificateError�match_hostname�rrN)zCertificateErrorzmatch_hostname)�sslrr�ImportErrorZbackports.ssl_match_hostname�_implementation�__all__�r	r	�e/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py�<module>s

 requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/_implementation.cpython-34.pyc000064400000004702151735047610035671 0ustar00python3.4/site-packages/pip/_vendor�
�Re��@sMdZddlZdZGdd�de�Zddd�Zd	d
�ZdS)zJThe match_hostname() function from Python 3.3.3, essential when using SSL.�Nz3.4.0.2c@seZdZdS)�CertificateErrorN)�__name__�
__module__�__qualname__�rr�l/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyr
sr�c
CsXg}|sdS|jd�}|d}|dd�}|jd�}||krmtdt|���n|s�|j�|j�kS|dkr�|jd�nY|jd	�s�|jd	�r�|jtj|��n"|jtj|�j	d
d��x$|D]}|jtj|��qWtj
dd
j|�dtj�}	|	j
|�S)zhMatching according to RFC 6125, section 6.4.3

    http://tools.ietf.org/html/rfc6125#section-6.4.3
    F�.rrN�*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)�split�countr�repr�lower�append�
startswith�re�escape�replace�compile�join�
IGNORECASE�match)
�dn�hostname�
max_wildcards�pats�parts�leftmost�	remainder�	wildcards�frag�patrrr�_dnsname_matchs*
"
&r"cCs[|std��ng}|jdf�}xC|D];\}}|dkr4t||�r_dS|j|�q4q4W|s�xc|jdf�D]L}xC|D];\}}|dkr�t||�r�dS|j|�q�q�Wq�Wnt|�dkrtd|d	jtt|��f��n;t|�dkrKtd
||df��ntd��dS)
a)Verify that *cert* (in decoded format as returned by
    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
    rules are followed, but IP addresses are not accepted for *hostname*.

    CertificateError is raised on failure. On success, the function
    returns nothing.
    zempty or no certificate�subjectAltName�DNSN�subject�
commonNamerz&hostname %r doesn't match either of %sz, zhostname %r doesn't match %rrz=no appropriate commonName or subjectAltName fields were found)	�
ValueError�getr"r�lenrr�mapr
)�certr�dnsnames�san�key�value�subrrr�match_hostnameCs.%r1)�__doc__r�__version__r'rr"r1rrrr�<module>s
5site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py000064400000000714151735047620027762 0ustar00python3.4try:
    # Python 3.2+
    from ssl import CertificateError, match_hostname
except ImportError:
    try:
        # Backport of the function from a pypi module
        from backports.ssl_match_hostname import CertificateError, match_hostname
    except ImportError:
        # Our vendored copy
        from ._implementation import CertificateError, match_hostname

# Not needed, but documenting what we provide.
__all__ = ('CertificateError', 'match_hostname')
site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py000064400000007302151735047620031407 0ustar00python3.4"""The match_hostname() function from Python 3.3.3, essential when using SSL."""

# Note: This file is under the PSF license as the code comes from the python
# stdlib.   http://docs.python.org/3/license.html

import re

__version__ = '3.4.0.2'

class CertificateError(ValueError):
    pass


def _dnsname_match(dn, hostname, max_wildcards=1):
    """Matching according to RFC 6125, section 6.4.3

    http://tools.ietf.org/html/rfc6125#section-6.4.3
    """
    pats = []
    if not dn:
        return False

    # Ported from python3-syntax:
    # leftmost, *remainder = dn.split(r'.')
    parts = dn.split(r'.')
    leftmost = parts[0]
    remainder = parts[1:]

    wildcards = leftmost.count('*')
    if wildcards > max_wildcards:
        # Issue #17980: avoid denials of service by refusing more
        # than one wildcard per fragment.  A survey of established
        # policy among SSL implementations showed it to be a
        # reasonable choice.
        raise CertificateError(
            "too many wildcards in certificate DNS name: " + repr(dn))

    # speed up common case w/o wildcards
    if not wildcards:
        return dn.lower() == hostname.lower()

    # RFC 6125, section 6.4.3, subitem 1.
    # The client SHOULD NOT attempt to match a presented identifier in which
    # the wildcard character comprises a label other than the left-most label.
    if leftmost == '*':
        # When '*' is a fragment by itself, it matches a non-empty dotless
        # fragment.
        pats.append('[^.]+')
    elif leftmost.startswith('xn--') or hostname.startswith('xn--'):
        # RFC 6125, section 6.4.3, subitem 3.
        # The client SHOULD NOT attempt to match a presented identifier
        # where the wildcard character is embedded within an A-label or
        # U-label of an internationalized domain name.
        pats.append(re.escape(leftmost))
    else:
        # Otherwise, '*' matches any dotless string, e.g. www*
        pats.append(re.escape(leftmost).replace(r'\*', '[^.]*'))

    # add the remaining fragments, ignore any wildcards
    for frag in remainder:
        pats.append(re.escape(frag))

    pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)
    return pat.match(hostname)


def match_hostname(cert, hostname):
    """Verify that *cert* (in decoded format as returned by
    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
    rules are followed, but IP addresses are not accepted for *hostname*.

    CertificateError is raised on failure. On success, the function
    returns nothing.
    """
    if not cert:
        raise ValueError("empty or no certificate")
    dnsnames = []
    san = cert.get('subjectAltName', ())
    for key, value in san:
        if key == 'DNS':
            if _dnsname_match(value, hostname):
                return
            dnsnames.append(value)
    if not dnsnames:
        # The subject is only checked when there is no dNSName entry
        # in subjectAltName
        for sub in cert.get('subject', ()):
            for key, value in sub:
                # XXX according to RFC 2818, the most specific Common Name
                # must be used.
                if key == 'commonName':
                    if _dnsname_match(value, hostname):
                        return
                    dnsnames.append(value)
    if len(dnsnames) > 1:
        raise CertificateError("hostname %r "
            "doesn't match either of %s"
            % (hostname, ', '.join(map(repr, dnsnames))))
    elif len(dnsnames) == 1:
        raise CertificateError("hostname %r "
            "doesn't match %r"
            % (hostname, dnsnames[0]))
    else:
        raise CertificateError("no appropriate commonName or "
            "subjectAltName fields were found")
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py000064400000000112151735047630024157 0ustar00from __future__ import absolute_import

from . import ssl_match_hostname

python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py000064400000021350151735047630025056 0ustar00# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
# Copyright 2009 Raymond Hettinger, released under the MIT License.
# http://code.activestate.com/recipes/576693/

try:
    from thread import get_ident as _get_ident
except ImportError:
    from dummy_thread import get_ident as _get_ident

try:
    from _abcoll import KeysView, ValuesView, ItemsView
except ImportError:
    pass


class OrderedDict(dict):
    'Dictionary that remembers insertion order'
    # An inherited dict maps keys to values.
    # The inherited dict provides __getitem__, __len__, __contains__, and get.
    # The remaining methods are order-aware.
    # Big-O running times for all methods are the same as for regular dictionaries.

    # The internal self.__map dictionary maps keys to links in a doubly linked list.
    # The circular doubly linked list starts and ends with a sentinel element.
    # The sentinel element never gets deleted (this simplifies the algorithm).
    # Each link is stored as a list of length three:  [PREV, NEXT, KEY].

    def __init__(self, *args, **kwds):
        '''Initialize an ordered dictionary.  Signature is the same as for
        regular dictionaries, but keyword arguments are not recommended
        because their insertion order is arbitrary.

        '''
        if len(args) > 1:
            raise TypeError('expected at most 1 arguments, got %d' % len(args))
        try:
            self.__root
        except AttributeError:
            self.__root = root = []                     # sentinel node
            root[:] = [root, root, None]
            self.__map = {}
        self.__update(*args, **kwds)

    def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
        'od.__setitem__(i, y) <==> od[i]=y'
        # Setting a new item creates a new link which goes at the end of the linked
        # list, and the inherited dictionary is updated with the new key/value pair.
        if key not in self:
            root = self.__root
            last = root[0]
            last[1] = root[0] = self.__map[key] = [last, root, key]
        dict_setitem(self, key, value)

    def __delitem__(self, key, dict_delitem=dict.__delitem__):
        'od.__delitem__(y) <==> del od[y]'
        # Deleting an existing item uses self.__map to find the link which is
        # then removed by updating the links in the predecessor and successor nodes.
        dict_delitem(self, key)
        link_prev, link_next, key = self.__map.pop(key)
        link_prev[1] = link_next
        link_next[0] = link_prev

    def __iter__(self):
        'od.__iter__() <==> iter(od)'
        root = self.__root
        curr = root[1]
        while curr is not root:
            yield curr[2]
            curr = curr[1]

    def __reversed__(self):
        'od.__reversed__() <==> reversed(od)'
        root = self.__root
        curr = root[0]
        while curr is not root:
            yield curr[2]
            curr = curr[0]

    def clear(self):
        'od.clear() -> None.  Remove all items from od.'
        try:
            for node in self.__map.itervalues():
                del node[:]
            root = self.__root
            root[:] = [root, root, None]
            self.__map.clear()
        except AttributeError:
            pass
        dict.clear(self)

    def popitem(self, last=True):
        '''od.popitem() -> (k, v), return and remove a (key, value) pair.
        Pairs are returned in LIFO order if last is true or FIFO order if false.

        '''
        if not self:
            raise KeyError('dictionary is empty')
        root = self.__root
        if last:
            link = root[0]
            link_prev = link[0]
            link_prev[1] = root
            root[0] = link_prev
        else:
            link = root[1]
            link_next = link[1]
            root[1] = link_next
            link_next[0] = root
        key = link[2]
        del self.__map[key]
        value = dict.pop(self, key)
        return key, value

    # -- the following methods do not depend on the internal structure --

    def keys(self):
        'od.keys() -> list of keys in od'
        return list(self)

    def values(self):
        'od.values() -> list of values in od'
        return [self[key] for key in self]

    def items(self):
        'od.items() -> list of (key, value) pairs in od'
        return [(key, self[key]) for key in self]

    def iterkeys(self):
        'od.iterkeys() -> an iterator over the keys in od'
        return iter(self)

    def itervalues(self):
        'od.itervalues -> an iterator over the values in od'
        for k in self:
            yield self[k]

    def iteritems(self):
        'od.iteritems -> an iterator over the (key, value) items in od'
        for k in self:
            yield (k, self[k])

    def update(*args, **kwds):
        '''od.update(E, **F) -> None.  Update od from dict/iterable E and F.

        If E is a dict instance, does:           for k in E: od[k] = E[k]
        If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
        Or if E is an iterable of items, does:   for k, v in E: od[k] = v
        In either case, this is followed by:     for k, v in F.items(): od[k] = v

        '''
        if len(args) > 2:
            raise TypeError('update() takes at most 2 positional '
                            'arguments (%d given)' % (len(args),))
        elif not args:
            raise TypeError('update() takes at least 1 argument (0 given)')
        self = args[0]
        # Make progressively weaker assumptions about "other"
        other = ()
        if len(args) == 2:
            other = args[1]
        if isinstance(other, dict):
            for key in other:
                self[key] = other[key]
        elif hasattr(other, 'keys'):
            for key in other.keys():
                self[key] = other[key]
        else:
            for key, value in other:
                self[key] = value
        for key, value in kwds.items():
            self[key] = value

    __update = update  # let subclasses override update without breaking __init__

    __marker = object()

    def pop(self, key, default=__marker):
        '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
        If key is not found, d is returned if given, otherwise KeyError is raised.

        '''
        if key in self:
            result = self[key]
            del self[key]
            return result
        if default is self.__marker:
            raise KeyError(key)
        return default

    def setdefault(self, key, default=None):
        'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
        if key in self:
            return self[key]
        self[key] = default
        return default

    def __repr__(self, _repr_running={}):
        'od.__repr__() <==> repr(od)'
        call_key = id(self), _get_ident()
        if call_key in _repr_running:
            return '...'
        _repr_running[call_key] = 1
        try:
            if not self:
                return '%s()' % (self.__class__.__name__,)
            return '%s(%r)' % (self.__class__.__name__, self.items())
        finally:
            del _repr_running[call_key]

    def __reduce__(self):
        'Return state information for pickling'
        items = [[k, self[k]] for k in self]
        inst_dict = vars(self).copy()
        for k in vars(OrderedDict()):
            inst_dict.pop(k, None)
        if inst_dict:
            return (self.__class__, (items,), inst_dict)
        return self.__class__, (items,)

    def copy(self):
        'od.copy() -> a shallow copy of od'
        return self.__class__(self)

    @classmethod
    def fromkeys(cls, iterable, value=None):
        '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
        and values equal to v (which defaults to None).

        '''
        d = cls()
        for key in iterable:
            d[key] = value
        return d

    def __eq__(self, other):
        '''od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
        while comparison to a regular mapping is order-insensitive.

        '''
        if isinstance(other, OrderedDict):
            return len(self)==len(other) and self.items() == other.items()
        return dict.__eq__(self, other)

    def __ne__(self, other):
        return not self == other

    # -- the following methods are only used in Python 2.7 --

    def viewkeys(self):
        "od.viewkeys() -> a set-like object providing a view on od's keys"
        return KeysView(self)

    def viewvalues(self):
        "od.viewvalues() -> an object providing a view on od's values"
        return ValuesView(self)

    def viewitems(self):
        "od.viewitems() -> a set-like object providing a view on od's items"
        return ItemsView(self)
python3.4/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py000064400000004720151735047640022501 0ustar00# urllib3/filepost.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

import codecs
import mimetypes

from uuid import uuid4
from io import BytesIO

from .packages import six
from .packages.six import b
from .fields import RequestField

writer = codecs.lookup('utf-8')[3]


def choose_boundary():
    """
    Our embarassingly-simple replacement for mimetools.choose_boundary.
    """
    return uuid4().hex


def iter_field_objects(fields):
    """
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    """
    if isinstance(fields, dict):
        i = six.iteritems(fields)
    else:
        i = iter(fields)

    for field in i:
      if isinstance(field, RequestField):
        yield field
      else:
        yield RequestField.from_tuples(*field)


def iter_fields(fields):
    """
    .. deprecated:: 1.6

    Iterate over fields.

    The addition of :class:`~urllib3.fields.RequestField` makes this function
    obsolete. Instead, use :func:`iter_field_objects`, which returns
    :class:`~urllib3.fields.RequestField` objects.

    Supports list of (k, v) tuples and dicts.
    """
    if isinstance(fields, dict):
        return ((k, v) for k, v in six.iteritems(fields))

    return ((k, v) for k, v in fields)


def encode_multipart_formdata(fields, boundary=None):
    """
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`mimetools.choose_boundary`.
    """
    body = BytesIO()
    if boundary is None:
        boundary = choose_boundary()

    for field in iter_field_objects(fields):
        body.write(b('--%s\r\n' % (boundary)))

        writer(body).write(field.render_headers())
        data = field.data

        if isinstance(data, int):
            data = str(data)  # Backwards compatibility

        if isinstance(data, six.text_type):
            writer(body).write(data)
        else:
            body.write(data)

        body.write(b'\r\n')

    body.write(b('--%s--\r\n' % (boundary)))

    content_type = str('multipart/form-data; boundary=%s' % boundary)

    return body.getvalue(), content_type
python3.4/site-packages/pip/_vendor/requests/packages/__init__.py000064400000000076151735047640021037 0ustar00from __future__ import absolute_import

from . import urllib3
python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py000064400000003221151735047650023020 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import GB2312DistributionAnalysis
from .mbcssm import GB2312SMModel

class GB2312Prober(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(GB2312SMModel)
        self._mDistributionAnalyzer = GB2312DistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "GB2312"
python3.4/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py000064400000030524151735047650023674 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# Character Mapping Table:
Latin7_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 82,100,104, 94, 98,101,116,102,111,187,117, 92, 88,113, 85,  # 40
 79,118,105, 83, 67,114,119, 95, 99,109,188,253,253,253,253,253,  # 50
253, 72, 70, 80, 81, 60, 96, 93, 89, 68,120, 97, 77, 86, 69, 55,  # 60
 78,115, 65, 66, 58, 76,106,103, 87,107,112,253,253,253,253,253,  # 70
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 80
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 90
253,233, 90,253,253,253,253,253,253,253,253,253,253, 74,253,253,  # a0
253,253,253,253,247,248, 61, 36, 46, 71, 73,253, 54,253,108,123,  # b0
110, 31, 51, 43, 41, 34, 91, 40, 52, 47, 44, 53, 38, 49, 59, 39,  # c0
 35, 48,250, 37, 33, 45, 56, 50, 84, 57,120,121, 17, 18, 22, 15,  # d0
124,  1, 29, 20, 21,  3, 32, 13, 25,  5, 11, 16, 10,  6, 30,  4,  # e0
  9,  8, 14,  7,  2, 12, 28, 23, 42, 24, 64, 75, 19, 26, 27,253,  # f0
)

win1253_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 82,100,104, 94, 98,101,116,102,111,187,117, 92, 88,113, 85,  # 40
 79,118,105, 83, 67,114,119, 95, 99,109,188,253,253,253,253,253,  # 50
253, 72, 70, 80, 81, 60, 96, 93, 89, 68,120, 97, 77, 86, 69, 55,  # 60
 78,115, 65, 66, 58, 76,106,103, 87,107,112,253,253,253,253,253,  # 70
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 80
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 90
253,233, 61,253,253,253,253,253,253,253,253,253,253, 74,253,253,  # a0
253,253,253,253,247,253,253, 36, 46, 71, 73,253, 54,253,108,123,  # b0
110, 31, 51, 43, 41, 34, 91, 40, 52, 47, 44, 53, 38, 49, 59, 39,  # c0
 35, 48,250, 37, 33, 45, 56, 50, 84, 57,120,121, 17, 18, 22, 15,  # d0
124,  1, 29, 20, 21,  3, 32, 13, 25,  5, 11, 16, 10,  6, 30,  4,  # e0
  9,  8, 14,  7,  2, 12, 28, 23, 42, 24, 64, 75, 19, 26, 27,253,  # f0
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 98.2851%
# first 1024 sequences:1.7001%
# rest  sequences:     0.0359%
# negative sequences:  0.0148%
GreekLangModel = (
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,2,2,3,3,3,3,3,3,3,3,1,3,3,3,0,2,2,3,3,0,3,0,3,2,0,3,3,3,0,
3,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,0,3,3,0,3,2,3,3,0,3,2,3,3,3,0,0,3,0,3,0,3,3,2,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
0,2,3,2,2,3,3,3,3,3,3,3,3,0,3,3,3,3,0,2,3,3,0,3,3,3,3,2,3,3,3,0,
2,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,0,2,1,3,3,3,3,2,3,3,2,3,3,2,0,
0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,0,3,3,3,3,3,3,0,3,3,0,3,3,3,3,3,3,3,3,3,3,0,3,2,3,3,0,
2,0,1,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,2,3,0,0,0,0,3,3,0,3,1,3,3,3,0,3,3,0,3,3,3,3,0,0,0,0,
2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,0,3,0,3,3,3,3,3,0,3,2,2,2,3,0,2,3,3,3,3,3,2,3,3,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,3,2,2,2,3,3,3,3,0,3,1,3,3,3,3,2,3,3,3,3,3,3,3,2,2,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,2,0,3,0,0,0,3,3,2,3,3,3,3,3,0,0,3,2,3,0,2,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,3,0,0,3,3,0,2,3,0,3,0,3,3,3,0,0,3,0,3,0,2,2,3,3,0,0,
0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,2,0,3,2,3,3,3,3,0,3,3,3,3,3,0,3,3,2,3,2,3,3,2,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,2,3,2,3,3,3,3,3,3,0,2,3,2,3,2,2,2,3,2,3,3,2,3,0,2,2,2,3,0,
2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,0,0,0,3,3,3,2,3,3,0,0,3,0,3,0,0,0,3,2,0,3,0,3,0,0,2,0,2,0,
0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,0,3,3,3,3,3,3,0,3,3,0,3,0,0,0,3,3,0,3,3,3,0,0,1,2,3,0,
3,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,2,0,0,3,2,2,3,3,0,3,3,3,3,3,2,1,3,0,3,2,3,3,2,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,3,0,2,3,3,3,3,3,3,0,0,3,0,3,0,0,0,3,3,0,3,2,3,0,0,3,3,3,0,
3,0,0,0,2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,0,3,3,3,3,3,3,0,0,3,0,3,0,0,0,3,2,0,3,2,3,0,0,3,2,3,0,
2,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,1,2,2,3,3,3,3,3,3,0,2,3,0,3,0,0,0,3,3,0,3,0,2,0,0,2,3,1,0,
2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,3,0,3,0,3,3,2,3,0,3,3,3,3,3,3,0,3,3,3,0,2,3,0,0,3,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,0,0,3,0,0,0,3,3,0,3,0,2,3,3,0,0,3,0,3,0,3,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,0,0,0,3,3,3,3,3,3,0,0,3,0,2,0,0,0,3,3,0,3,0,3,0,0,2,0,2,0,
0,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,3,0,3,0,2,0,3,2,0,3,2,3,2,3,0,0,3,2,3,2,3,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,0,0,2,3,3,3,3,3,0,0,0,3,0,2,1,0,0,3,2,2,2,0,3,0,0,2,2,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,2,0,3,0,3,0,3,3,0,2,1,2,3,3,0,0,3,0,3,0,3,3,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,3,3,3,0,3,3,3,3,3,3,0,2,3,0,3,0,0,0,2,1,0,2,2,3,0,0,2,2,2,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,0,0,2,3,3,3,2,3,0,0,1,3,0,2,0,0,0,0,3,0,1,0,2,0,0,1,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,3,1,0,3,0,0,0,3,2,0,3,2,3,3,3,0,0,3,0,3,2,2,2,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,3,3,3,0,0,3,0,0,0,0,2,0,2,3,3,2,2,2,2,3,0,2,0,2,2,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,3,3,3,2,0,0,0,0,0,0,2,3,0,2,0,2,3,2,0,0,3,0,3,0,3,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,3,2,3,3,2,2,3,0,2,0,3,0,0,0,2,0,0,0,0,1,2,0,2,0,2,0,
0,2,0,2,0,2,2,0,0,1,0,2,2,2,0,2,2,2,0,2,2,2,0,0,2,0,0,1,0,0,0,0,
0,2,0,3,3,2,0,0,0,0,0,0,1,3,0,2,0,2,2,2,0,0,2,0,3,0,0,2,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,0,2,3,2,0,2,2,0,2,0,2,2,0,2,0,2,2,2,0,0,0,0,0,0,2,3,0,0,0,2,
0,1,2,0,0,0,0,2,2,0,0,0,2,1,0,2,2,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,
0,0,2,1,0,2,3,2,2,3,2,3,2,0,0,3,3,3,0,0,3,2,0,0,0,1,1,0,2,0,2,2,
0,2,0,2,0,2,2,0,0,2,0,2,2,2,0,2,2,2,2,0,0,2,0,0,0,2,0,1,0,0,0,0,
0,3,0,3,3,2,2,0,3,0,0,0,2,2,0,2,2,2,1,2,0,0,1,2,2,0,0,3,0,0,0,2,
0,1,2,0,0,0,1,2,0,0,0,0,0,0,0,2,2,0,1,0,0,2,0,0,0,2,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,3,3,2,2,0,0,0,2,0,2,3,3,0,2,0,0,0,0,0,0,2,2,2,0,2,2,0,2,0,2,
0,2,2,0,0,2,2,2,2,1,0,0,2,2,0,2,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,
0,2,0,3,2,3,0,0,0,3,0,0,2,2,0,2,0,2,2,2,0,0,2,0,0,0,0,0,0,0,0,2,
0,0,2,2,0,0,2,2,2,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,2,0,0,3,2,0,2,2,2,2,2,0,0,0,2,0,0,0,0,2,0,1,0,0,2,0,1,0,0,0,
0,2,2,2,0,2,2,0,1,2,0,2,2,2,0,2,2,2,2,1,2,2,0,0,2,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,2,0,2,0,2,2,0,0,0,0,1,2,1,0,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,3,2,3,0,0,2,0,0,0,2,2,0,2,0,0,0,1,0,0,2,0,2,0,2,2,0,0,0,0,
0,0,2,0,0,0,0,2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,
0,2,2,3,2,2,0,0,0,0,0,0,1,3,0,2,0,2,2,0,0,0,1,0,2,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,0,2,0,3,2,0,2,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,2,0,0,0,0,1,1,0,0,2,1,2,0,2,2,0,1,0,0,1,0,0,0,2,0,0,0,0,0,0,
0,3,0,2,2,2,0,0,2,0,0,0,2,0,0,0,2,3,0,2,0,0,0,0,0,0,2,2,0,0,0,2,
0,1,2,0,0,0,1,2,2,1,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,1,2,0,2,2,0,2,0,0,2,0,0,0,0,1,2,1,0,2,1,0,0,0,0,0,0,0,0,0,0,
0,0,2,0,0,0,3,1,2,2,0,2,0,0,0,0,2,0,0,0,2,0,0,3,0,0,0,0,2,2,2,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,1,0,2,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,2,
0,2,2,0,0,2,2,2,2,2,0,1,2,0,0,0,2,2,0,1,0,2,0,0,2,2,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,3,0,0,2,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,2,
0,1,2,0,0,0,0,2,2,1,0,1,0,1,0,2,2,2,1,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,2,0,1,2,0,0,0,0,0,0,0,0,0,0,2,0,0,2,2,0,0,0,0,1,0,0,0,0,0,0,2,
0,2,2,0,0,0,0,2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,
0,2,2,2,2,0,0,0,3,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,1,
0,0,2,0,0,0,0,1,2,0,0,0,0,0,0,2,2,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,2,0,2,2,2,0,0,2,0,0,0,0,0,0,0,2,2,2,0,0,0,2,0,0,0,0,0,0,0,0,2,
0,0,1,0,0,0,0,2,1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,3,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,2,
0,0,2,0,0,0,0,2,2,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2,0,2,2,1,0,0,0,0,0,0,2,0,0,2,0,2,2,2,0,0,0,0,0,0,2,0,0,0,0,2,
0,0,2,0,0,2,0,2,2,0,0,0,0,2,0,2,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,
0,0,3,0,0,0,2,2,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,
0,2,2,2,2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,
0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,2,0,0,0,2,0,0,0,0,0,1,0,0,0,0,2,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,2,0,0,0,
0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,2,0,2,0,0,0,
0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,2,0,0,0,1,2,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
)

Latin7GreekModel = {
  'charToOrderMap': Latin7_CharToOrderMap,
  'precedenceMatrix': GreekLangModel,
  'mTypicalPositiveRatio': 0.982851,
  'keepEnglishLetter': False,
  'charsetName': "ISO-8859-7"
}

Win1253GreekModel = {
  'charToOrderMap': win1253_CharToOrderMap,
  'precedenceMatrix': GreekLangModel,
  'mTypicalPositiveRatio': 0.982851,
  'keepEnglishLetter': False,
  'charsetName': "windows-1253"
}

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/compat.py000064400000002205151735047660022173 0ustar00######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
#   Ian Cordasco - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys


if sys.version_info < (3, 0):
    base_str = (str, unicode)
else:
    base_str = (bytes, str)


def wrap_ord(a):
    if sys.version_info < (3, 0) and isinstance(a, base_str):
        return ord(a)
    else:
        return a
python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py000064400000030370151735047660024553 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# Character Mapping Table:
Latin2_HungarianCharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 28, 40, 54, 45, 32, 50, 49, 38, 39, 53, 36, 41, 34, 35, 47,
 46, 71, 43, 33, 37, 57, 48, 64, 68, 55, 52,253,253,253,253,253,
253,  2, 18, 26, 17,  1, 27, 12, 20,  9, 22,  7,  6, 13,  4,  8,
 23, 67, 10,  5,  3, 21, 19, 65, 62, 16, 11,253,253,253,253,253,
159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,
175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,
191,192,193,194,195,196,197, 75,198,199,200,201,202,203,204,205,
 79,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,
221, 51, 81,222, 78,223,224,225,226, 44,227,228,229, 61,230,231,
232,233,234, 58,235, 66, 59,236,237,238, 60, 69, 63,239,240,241,
 82, 14, 74,242, 70, 80,243, 72,244, 15, 83, 77, 84, 30, 76, 85,
245,246,247, 25, 73, 42, 24,248,249,250, 31, 56, 29,251,252,253,
)

win1250HungarianCharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 28, 40, 54, 45, 32, 50, 49, 38, 39, 53, 36, 41, 34, 35, 47,
 46, 72, 43, 33, 37, 57, 48, 64, 68, 55, 52,253,253,253,253,253,
253,  2, 18, 26, 17,  1, 27, 12, 20,  9, 22,  7,  6, 13,  4,  8,
 23, 67, 10,  5,  3, 21, 19, 65, 62, 16, 11,253,253,253,253,253,
161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,
177,178,179,180, 78,181, 69,182,183,184,185,186,187,188,189,190,
191,192,193,194,195,196,197, 76,198,199,200,201,202,203,204,205,
 81,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,
221, 51, 83,222, 80,223,224,225,226, 44,227,228,229, 61,230,231,
232,233,234, 58,235, 66, 59,236,237,238, 60, 70, 63,239,240,241,
 84, 14, 75,242, 71, 82,243, 73,244, 15, 85, 79, 86, 30, 77, 87,
245,246,247, 25, 74, 42, 24,248,249,250, 31, 56, 29,251,252,253,
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 94.7368%
# first 1024 sequences:5.2623%
# rest  sequences:     0.8894%
# negative sequences:  0.0009%
HungarianLangModel = (
0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,2,3,3,1,1,2,2,2,2,2,1,2,
3,2,2,3,3,3,3,3,2,3,3,3,3,3,3,1,2,3,3,3,3,2,3,3,1,1,3,3,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
3,2,1,3,3,3,3,3,2,3,3,3,3,3,1,1,2,3,3,3,3,3,3,3,1,1,3,2,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,1,1,2,3,3,3,1,3,3,3,3,3,1,3,3,2,2,0,3,2,3,
0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,3,2,3,3,2,3,3,3,3,3,2,3,3,2,2,3,2,3,2,0,3,2,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,
3,3,3,3,3,3,2,3,3,3,3,3,2,3,3,3,1,2,3,2,2,3,1,2,3,3,2,2,0,3,3,3,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,3,2,3,3,3,3,2,3,3,3,3,0,2,3,2,
0,0,0,1,1,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,1,1,1,3,3,2,1,3,2,2,3,2,1,3,2,2,1,0,3,3,1,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,2,2,3,3,3,3,3,1,2,3,3,3,3,1,2,1,3,3,3,3,2,2,3,1,1,3,2,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,2,1,3,3,3,3,3,2,2,1,3,3,3,0,1,1,2,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,2,3,3,3,2,0,3,2,3,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1,0,
3,3,3,3,3,3,2,3,3,3,2,3,2,3,3,3,1,3,2,2,2,3,1,1,3,3,1,1,0,3,3,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,2,3,3,3,2,3,2,3,3,3,2,3,3,3,3,3,1,2,3,2,2,0,2,2,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,2,2,2,3,1,3,3,2,2,1,3,3,3,1,1,3,1,2,3,2,3,2,2,2,1,0,2,2,2,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,
3,1,1,3,3,3,3,3,1,2,3,3,3,3,1,2,1,3,3,3,2,2,3,2,1,0,3,2,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,3,3,3,3,3,1,2,3,3,3,3,1,1,0,3,3,3,3,0,2,3,0,0,2,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,2,3,3,2,2,2,2,3,3,0,1,2,3,2,3,2,2,3,2,1,2,0,2,2,2,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,
3,3,3,3,3,3,1,2,3,3,3,2,1,2,3,3,2,2,2,3,2,3,3,1,3,3,1,1,0,2,3,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,1,2,2,2,2,3,3,3,1,1,1,3,3,1,1,3,1,1,3,2,1,2,3,1,1,0,2,2,2,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,2,1,2,1,1,3,3,1,1,1,1,3,3,1,1,2,2,1,2,1,1,2,2,1,1,0,2,2,1,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,1,1,2,1,1,3,3,1,0,1,1,3,3,2,0,1,1,2,3,1,0,2,2,1,0,0,1,3,2,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,2,1,3,3,3,3,3,1,2,3,2,3,3,2,1,1,3,2,3,2,1,2,2,0,1,2,1,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,2,2,2,2,3,1,2,2,1,1,3,3,0,3,2,1,2,3,2,1,3,3,1,1,0,2,1,3,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,3,3,2,2,2,3,2,3,3,3,2,1,1,3,3,1,1,1,2,2,3,2,3,2,2,2,1,0,2,2,1,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
1,0,0,3,3,3,3,3,0,0,3,3,2,3,0,0,0,2,3,3,1,0,1,2,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,2,3,3,3,3,3,1,2,3,3,2,2,1,1,0,3,3,2,2,1,2,2,1,0,2,2,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,2,2,1,3,1,2,3,3,2,2,1,1,2,2,1,1,1,1,3,2,1,1,1,1,2,1,0,1,2,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
2,3,3,1,1,1,1,1,3,3,3,0,1,1,3,3,1,1,1,1,1,2,2,0,3,1,1,2,0,2,1,1,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
3,1,0,1,2,1,2,2,0,1,2,3,1,2,0,0,0,2,1,1,1,1,1,2,0,0,1,1,0,0,0,0,
1,2,1,2,2,2,1,2,1,2,0,2,0,2,2,1,1,2,1,1,2,1,1,1,0,1,0,0,0,1,1,0,
1,1,1,2,3,2,3,3,0,1,2,2,3,1,0,1,0,2,1,2,2,0,1,1,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,3,3,2,2,1,0,0,3,2,3,2,0,0,0,1,1,3,0,0,1,1,0,0,2,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,2,2,3,3,1,0,1,3,2,3,1,1,1,0,1,1,1,1,1,3,1,0,0,2,2,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,1,2,2,2,1,0,1,2,3,3,2,0,0,0,2,1,1,1,2,1,1,1,0,1,1,1,0,0,0,
1,2,2,2,2,2,1,1,1,2,0,2,1,1,1,1,1,2,1,1,1,1,1,1,0,1,1,1,0,0,1,1,
3,2,2,1,0,0,1,1,2,2,0,3,0,1,2,1,1,0,0,1,1,1,0,1,1,1,1,0,2,1,1,1,
2,2,1,1,1,2,1,2,1,1,1,1,1,1,1,2,1,1,1,2,3,1,1,1,1,1,1,1,1,1,0,1,
2,3,3,0,1,0,0,0,3,3,1,0,0,1,2,2,1,0,0,0,0,2,0,0,1,1,1,0,2,1,1,1,
2,1,1,1,1,1,1,2,1,1,0,1,1,0,1,1,1,0,1,2,1,1,0,1,1,1,1,1,1,1,0,1,
2,3,3,0,1,0,0,0,2,2,0,0,0,0,1,2,2,0,0,0,0,1,0,0,1,1,0,0,2,0,1,0,
2,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,0,1,1,1,1,1,0,1,
3,2,2,0,1,0,1,0,2,3,2,0,0,1,2,2,1,0,0,1,1,1,0,0,2,1,0,1,2,2,1,1,
2,1,1,1,1,1,1,2,1,1,1,1,1,1,0,2,1,0,1,1,0,1,1,1,0,1,1,2,1,1,0,1,
2,2,2,0,0,1,0,0,2,2,1,1,0,0,2,1,1,0,0,0,1,2,0,0,2,1,0,0,2,1,1,1,
2,1,1,1,1,2,1,2,1,1,1,2,2,1,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1,0,1,
1,2,3,0,0,0,1,0,3,2,1,0,0,1,2,1,1,0,0,0,0,2,1,0,1,1,0,0,2,1,2,1,
1,1,0,0,0,1,0,1,1,1,1,1,2,0,0,1,0,0,0,2,0,0,1,1,1,1,1,1,1,1,0,1,
3,0,0,2,1,2,2,1,0,0,2,1,2,2,0,0,0,2,1,1,1,0,1,1,0,0,1,1,2,0,0,0,
1,2,1,2,2,1,1,2,1,2,0,1,1,1,1,1,1,1,1,1,2,1,1,0,0,1,1,1,1,0,0,1,
1,3,2,0,0,0,1,0,2,2,2,0,0,0,2,2,1,0,0,0,0,3,1,1,1,1,0,0,2,1,1,1,
2,1,0,1,1,1,0,1,1,1,1,1,1,1,0,2,1,0,0,1,0,1,1,0,1,1,1,1,1,1,0,1,
2,3,2,0,0,0,1,0,2,2,0,0,0,0,2,1,1,0,0,0,0,2,1,0,1,1,0,0,2,1,1,0,
2,1,1,1,1,2,1,2,1,2,0,1,1,1,0,2,1,1,1,2,1,1,1,1,0,1,1,1,1,1,0,1,
3,1,1,2,2,2,3,2,1,1,2,2,1,1,0,1,0,2,2,1,1,1,1,1,0,0,1,1,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,0,0,0,0,0,2,2,0,0,0,0,2,2,1,0,0,0,1,1,0,0,1,2,0,0,2,1,1,1,
2,2,1,1,1,2,1,2,1,1,0,1,1,1,1,2,1,1,1,2,1,1,1,1,0,1,2,1,1,1,0,1,
1,0,0,1,2,3,2,1,0,0,2,0,1,1,0,0,0,1,1,1,1,0,1,1,0,0,1,0,0,0,0,0,
1,2,1,2,1,2,1,1,1,2,0,2,1,1,1,0,1,2,0,0,1,1,1,0,0,0,0,0,0,0,0,0,
2,3,2,0,0,0,0,0,1,1,2,1,0,0,1,1,1,0,0,0,0,2,0,0,1,1,0,0,2,1,1,1,
2,1,1,1,1,1,1,2,1,0,1,1,1,1,0,2,1,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,
1,2,2,0,1,1,1,0,2,2,2,0,0,0,3,2,1,0,0,0,1,1,0,0,1,1,0,1,1,1,0,0,
1,1,0,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,0,0,1,1,1,0,1,0,1,
2,1,0,2,1,1,2,2,1,1,2,1,1,1,0,0,0,1,1,0,1,1,1,1,0,0,1,1,1,0,0,0,
1,2,2,2,2,2,1,1,1,2,0,2,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,1,0,
1,2,3,0,0,0,1,0,2,2,0,0,0,0,2,2,0,0,0,0,0,1,0,0,1,0,0,0,2,0,1,0,
2,1,1,1,1,1,0,2,0,0,0,1,2,1,1,1,1,0,1,2,0,1,0,1,0,1,1,1,0,1,0,1,
2,2,2,0,0,0,1,0,2,1,2,0,0,0,1,1,2,0,0,0,0,1,0,0,1,1,0,0,2,1,0,1,
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,1,1,1,1,1,0,1,
1,2,2,0,0,0,1,0,2,2,2,0,0,0,1,1,0,0,0,0,0,1,1,0,2,0,0,1,1,1,0,1,
1,0,1,1,1,1,1,1,0,1,1,1,1,0,0,1,0,0,1,1,0,1,0,1,1,1,1,1,0,0,0,1,
1,0,0,1,0,1,2,1,0,0,1,1,1,2,0,0,0,1,1,0,1,0,1,1,0,0,1,0,0,0,0,0,
0,2,1,2,1,1,1,1,1,2,0,2,0,1,1,0,1,2,1,0,1,1,1,0,0,0,0,0,0,1,0,0,
2,1,1,0,1,2,0,0,1,1,1,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,2,1,0,1,
2,2,1,1,1,1,1,2,1,1,0,1,1,1,1,2,1,1,1,2,1,1,0,1,0,1,1,1,1,1,0,1,
1,2,2,0,0,0,0,0,1,1,0,0,0,0,2,1,0,0,0,0,0,2,0,0,2,2,0,0,2,0,0,1,
2,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,
1,1,2,0,0,3,1,0,2,1,1,1,0,0,1,1,1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,0,
1,2,1,0,1,1,1,2,1,1,0,1,1,1,1,1,0,0,0,1,1,1,1,1,0,1,0,0,0,1,0,0,
2,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,2,0,0,0,
2,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,2,1,1,0,0,1,1,1,1,1,0,1,
2,1,1,1,2,1,1,1,0,1,1,2,1,0,0,0,0,1,1,1,1,0,1,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,1,1,1,1,1,0,0,1,1,2,1,0,0,0,1,1,0,0,0,1,1,0,0,1,0,1,0,0,0,
1,2,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,
2,0,0,0,1,1,1,1,0,0,1,1,0,0,0,0,0,1,1,1,2,0,0,1,0,0,1,0,1,0,0,0,
0,1,1,1,1,1,1,1,1,2,0,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,
1,0,0,1,1,1,1,1,0,0,2,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,
0,1,1,1,1,1,1,0,1,1,0,1,0,1,1,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,
1,0,0,1,1,1,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,0,0,1,1,0,1,0,1,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,1,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,0,1,0,0,1,1,0,1,0,1,1,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,
2,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,0,1,0,0,1,0,1,0,1,1,1,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,1,0,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
)

Latin2HungarianModel = {
  'charToOrderMap': Latin2_HungarianCharToOrderMap,
  'precedenceMatrix': HungarianLangModel,
  'mTypicalPositiveRatio': 0.947368,
  'keepEnglishLetter': True,
  'charsetName': "ISO-8859-2"
}

Win1250HungarianModel = {
  'charToOrderMap': win1250HungarianCharToOrderMap,
  'precedenceMatrix': HungarianLangModel,
  'mTypicalPositiveRatio': 0.947368,
  'keepEnglishLetter': True,
  'charsetName': "windows-1250"
}

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py000064400000046230151735047670022203 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .constants import eStart, eError, eItsMe

# BIG5

BIG5_cls = (
    1,1,1,1,1,1,1,1,  # 00 - 07    #allow 0x00 as legal value
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    1,1,1,1,1,1,1,1,  # 30 - 37
    1,1,1,1,1,1,1,1,  # 38 - 3f
    2,2,2,2,2,2,2,2,  # 40 - 47
    2,2,2,2,2,2,2,2,  # 48 - 4f
    2,2,2,2,2,2,2,2,  # 50 - 57
    2,2,2,2,2,2,2,2,  # 58 - 5f
    2,2,2,2,2,2,2,2,  # 60 - 67
    2,2,2,2,2,2,2,2,  # 68 - 6f
    2,2,2,2,2,2,2,2,  # 70 - 77
    2,2,2,2,2,2,2,1,  # 78 - 7f
    4,4,4,4,4,4,4,4,  # 80 - 87
    4,4,4,4,4,4,4,4,  # 88 - 8f
    4,4,4,4,4,4,4,4,  # 90 - 97
    4,4,4,4,4,4,4,4,  # 98 - 9f
    4,3,3,3,3,3,3,3,  # a0 - a7
    3,3,3,3,3,3,3,3,  # a8 - af
    3,3,3,3,3,3,3,3,  # b0 - b7
    3,3,3,3,3,3,3,3,  # b8 - bf
    3,3,3,3,3,3,3,3,  # c0 - c7
    3,3,3,3,3,3,3,3,  # c8 - cf
    3,3,3,3,3,3,3,3,  # d0 - d7
    3,3,3,3,3,3,3,3,  # d8 - df
    3,3,3,3,3,3,3,3,  # e0 - e7
    3,3,3,3,3,3,3,3,  # e8 - ef
    3,3,3,3,3,3,3,3,  # f0 - f7
    3,3,3,3,3,3,3,0  # f8 - ff
)

BIG5_st = (
    eError,eStart,eStart,     3,eError,eError,eError,eError,#00-07
    eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,#08-0f
    eError,eStart,eStart,eStart,eStart,eStart,eStart,eStart#10-17
)

Big5CharLenTable = (0, 1, 1, 2, 0)

Big5SMModel = {'classTable': BIG5_cls,
               'classFactor': 5,
               'stateTable': BIG5_st,
               'charLenTable': Big5CharLenTable,
               'name': 'Big5'}

# CP949

CP949_cls  = (
    1,1,1,1,1,1,1,1, 1,1,1,1,1,1,0,0,  # 00 - 0f
    1,1,1,1,1,1,1,1, 1,1,1,0,1,1,1,1,  # 10 - 1f
    1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,  # 20 - 2f
    1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,  # 30 - 3f
    1,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,  # 40 - 4f
    4,4,5,5,5,5,5,5, 5,5,5,1,1,1,1,1,  # 50 - 5f
    1,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,  # 60 - 6f
    5,5,5,5,5,5,5,5, 5,5,5,1,1,1,1,1,  # 70 - 7f
    0,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,  # 80 - 8f
    6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,  # 90 - 9f
    6,7,7,7,7,7,7,7, 7,7,7,7,7,8,8,8,  # a0 - af
    7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,  # b0 - bf
    7,7,7,7,7,7,9,2, 2,3,2,2,2,2,2,2,  # c0 - cf
    2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,  # d0 - df
    2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,  # e0 - ef
    2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,0,  # f0 - ff
)

CP949_st = (
#cls=    0      1      2      3      4      5      6      7      8      9  # previous state =
    eError,eStart,     3,eError,eStart,eStart,     4,     5,eError,     6, # eStart
    eError,eError,eError,eError,eError,eError,eError,eError,eError,eError, # eError
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe, # eItsMe
    eError,eError,eStart,eStart,eError,eError,eError,eStart,eStart,eStart, # 3
    eError,eError,eStart,eStart,eStart,eStart,eStart,eStart,eStart,eStart, # 4
    eError,eStart,eStart,eStart,eStart,eStart,eStart,eStart,eStart,eStart, # 5
    eError,eStart,eStart,eStart,eStart,eError,eError,eStart,eStart,eStart, # 6
)

CP949CharLenTable = (0, 1, 2, 0, 1, 1, 2, 2, 0, 2)

CP949SMModel = {'classTable': CP949_cls,
                'classFactor': 10,
                'stateTable': CP949_st,
                'charLenTable': CP949CharLenTable,
                'name': 'CP949'}

# EUC-JP

EUCJP_cls = (
    4,4,4,4,4,4,4,4,  # 00 - 07
    4,4,4,4,4,4,5,5,  # 08 - 0f
    4,4,4,4,4,4,4,4,  # 10 - 17
    4,4,4,5,4,4,4,4,  # 18 - 1f
    4,4,4,4,4,4,4,4,  # 20 - 27
    4,4,4,4,4,4,4,4,  # 28 - 2f
    4,4,4,4,4,4,4,4,  # 30 - 37
    4,4,4,4,4,4,4,4,  # 38 - 3f
    4,4,4,4,4,4,4,4,  # 40 - 47
    4,4,4,4,4,4,4,4,  # 48 - 4f
    4,4,4,4,4,4,4,4,  # 50 - 57
    4,4,4,4,4,4,4,4,  # 58 - 5f
    4,4,4,4,4,4,4,4,  # 60 - 67
    4,4,4,4,4,4,4,4,  # 68 - 6f
    4,4,4,4,4,4,4,4,  # 70 - 77
    4,4,4,4,4,4,4,4,  # 78 - 7f
    5,5,5,5,5,5,5,5,  # 80 - 87
    5,5,5,5,5,5,1,3,  # 88 - 8f
    5,5,5,5,5,5,5,5,  # 90 - 97
    5,5,5,5,5,5,5,5,  # 98 - 9f
    5,2,2,2,2,2,2,2,  # a0 - a7
    2,2,2,2,2,2,2,2,  # a8 - af
    2,2,2,2,2,2,2,2,  # b0 - b7
    2,2,2,2,2,2,2,2,  # b8 - bf
    2,2,2,2,2,2,2,2,  # c0 - c7
    2,2,2,2,2,2,2,2,  # c8 - cf
    2,2,2,2,2,2,2,2,  # d0 - d7
    2,2,2,2,2,2,2,2,  # d8 - df
    0,0,0,0,0,0,0,0,  # e0 - e7
    0,0,0,0,0,0,0,0,  # e8 - ef
    0,0,0,0,0,0,0,0,  # f0 - f7
    0,0,0,0,0,0,0,5  # f8 - ff
)

EUCJP_st = (
          3,     4,     3,     5,eStart,eError,eError,eError,#00-07
     eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,#08-0f
     eItsMe,eItsMe,eStart,eError,eStart,eError,eError,eError,#10-17
     eError,eError,eStart,eError,eError,eError,     3,eError,#18-1f
          3,eError,eError,eError,eStart,eStart,eStart,eStart#20-27
)

EUCJPCharLenTable = (2, 2, 2, 3, 1, 0)

EUCJPSMModel = {'classTable': EUCJP_cls,
                'classFactor': 6,
                'stateTable': EUCJP_st,
                'charLenTable': EUCJPCharLenTable,
                'name': 'EUC-JP'}

# EUC-KR

EUCKR_cls  = (
    1,1,1,1,1,1,1,1,  # 00 - 07
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    1,1,1,1,1,1,1,1,  # 30 - 37
    1,1,1,1,1,1,1,1,  # 38 - 3f
    1,1,1,1,1,1,1,1,  # 40 - 47
    1,1,1,1,1,1,1,1,  # 48 - 4f
    1,1,1,1,1,1,1,1,  # 50 - 57
    1,1,1,1,1,1,1,1,  # 58 - 5f
    1,1,1,1,1,1,1,1,  # 60 - 67
    1,1,1,1,1,1,1,1,  # 68 - 6f
    1,1,1,1,1,1,1,1,  # 70 - 77
    1,1,1,1,1,1,1,1,  # 78 - 7f
    0,0,0,0,0,0,0,0,  # 80 - 87
    0,0,0,0,0,0,0,0,  # 88 - 8f
    0,0,0,0,0,0,0,0,  # 90 - 97
    0,0,0,0,0,0,0,0,  # 98 - 9f
    0,2,2,2,2,2,2,2,  # a0 - a7
    2,2,2,2,2,3,3,3,  # a8 - af
    2,2,2,2,2,2,2,2,  # b0 - b7
    2,2,2,2,2,2,2,2,  # b8 - bf
    2,2,2,2,2,2,2,2,  # c0 - c7
    2,3,2,2,2,2,2,2,  # c8 - cf
    2,2,2,2,2,2,2,2,  # d0 - d7
    2,2,2,2,2,2,2,2,  # d8 - df
    2,2,2,2,2,2,2,2,  # e0 - e7
    2,2,2,2,2,2,2,2,  # e8 - ef
    2,2,2,2,2,2,2,2,  # f0 - f7
    2,2,2,2,2,2,2,0   # f8 - ff
)

EUCKR_st = (
    eError,eStart,     3,eError,eError,eError,eError,eError,#00-07
    eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,eStart #08-0f
)

EUCKRCharLenTable = (0, 1, 2, 0)

EUCKRSMModel = {'classTable': EUCKR_cls,
                'classFactor': 4,
                'stateTable': EUCKR_st,
                'charLenTable': EUCKRCharLenTable,
                'name': 'EUC-KR'}

# EUC-TW

EUCTW_cls = (
    2,2,2,2,2,2,2,2,  # 00 - 07
    2,2,2,2,2,2,0,0,  # 08 - 0f
    2,2,2,2,2,2,2,2,  # 10 - 17
    2,2,2,0,2,2,2,2,  # 18 - 1f
    2,2,2,2,2,2,2,2,  # 20 - 27
    2,2,2,2,2,2,2,2,  # 28 - 2f
    2,2,2,2,2,2,2,2,  # 30 - 37
    2,2,2,2,2,2,2,2,  # 38 - 3f
    2,2,2,2,2,2,2,2,  # 40 - 47
    2,2,2,2,2,2,2,2,  # 48 - 4f
    2,2,2,2,2,2,2,2,  # 50 - 57
    2,2,2,2,2,2,2,2,  # 58 - 5f
    2,2,2,2,2,2,2,2,  # 60 - 67
    2,2,2,2,2,2,2,2,  # 68 - 6f
    2,2,2,2,2,2,2,2,  # 70 - 77
    2,2,2,2,2,2,2,2,  # 78 - 7f
    0,0,0,0,0,0,0,0,  # 80 - 87
    0,0,0,0,0,0,6,0,  # 88 - 8f
    0,0,0,0,0,0,0,0,  # 90 - 97
    0,0,0,0,0,0,0,0,  # 98 - 9f
    0,3,4,4,4,4,4,4,  # a0 - a7
    5,5,1,1,1,1,1,1,  # a8 - af
    1,1,1,1,1,1,1,1,  # b0 - b7
    1,1,1,1,1,1,1,1,  # b8 - bf
    1,1,3,1,3,3,3,3,  # c0 - c7
    3,3,3,3,3,3,3,3,  # c8 - cf
    3,3,3,3,3,3,3,3,  # d0 - d7
    3,3,3,3,3,3,3,3,  # d8 - df
    3,3,3,3,3,3,3,3,  # e0 - e7
    3,3,3,3,3,3,3,3,  # e8 - ef
    3,3,3,3,3,3,3,3,  # f0 - f7
    3,3,3,3,3,3,3,0   # f8 - ff
)

EUCTW_st = (
    eError,eError,eStart,     3,     3,     3,     4,eError,#00-07
    eError,eError,eError,eError,eError,eError,eItsMe,eItsMe,#08-0f
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eStart,eError,#10-17
    eStart,eStart,eStart,eError,eError,eError,eError,eError,#18-1f
         5,eError,eError,eError,eStart,eError,eStart,eStart,#20-27
    eStart,eError,eStart,eStart,eStart,eStart,eStart,eStart #28-2f
)

EUCTWCharLenTable = (0, 0, 1, 2, 2, 2, 3)

EUCTWSMModel = {'classTable': EUCTW_cls,
                'classFactor': 7,
                'stateTable': EUCTW_st,
                'charLenTable': EUCTWCharLenTable,
                'name': 'x-euc-tw'}

# GB2312

GB2312_cls = (
    1,1,1,1,1,1,1,1,  # 00 - 07
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    3,3,3,3,3,3,3,3,  # 30 - 37
    3,3,1,1,1,1,1,1,  # 38 - 3f
    2,2,2,2,2,2,2,2,  # 40 - 47
    2,2,2,2,2,2,2,2,  # 48 - 4f
    2,2,2,2,2,2,2,2,  # 50 - 57
    2,2,2,2,2,2,2,2,  # 58 - 5f
    2,2,2,2,2,2,2,2,  # 60 - 67
    2,2,2,2,2,2,2,2,  # 68 - 6f
    2,2,2,2,2,2,2,2,  # 70 - 77
    2,2,2,2,2,2,2,4,  # 78 - 7f
    5,6,6,6,6,6,6,6,  # 80 - 87
    6,6,6,6,6,6,6,6,  # 88 - 8f
    6,6,6,6,6,6,6,6,  # 90 - 97
    6,6,6,6,6,6,6,6,  # 98 - 9f
    6,6,6,6,6,6,6,6,  # a0 - a7
    6,6,6,6,6,6,6,6,  # a8 - af
    6,6,6,6,6,6,6,6,  # b0 - b7
    6,6,6,6,6,6,6,6,  # b8 - bf
    6,6,6,6,6,6,6,6,  # c0 - c7
    6,6,6,6,6,6,6,6,  # c8 - cf
    6,6,6,6,6,6,6,6,  # d0 - d7
    6,6,6,6,6,6,6,6,  # d8 - df
    6,6,6,6,6,6,6,6,  # e0 - e7
    6,6,6,6,6,6,6,6,  # e8 - ef
    6,6,6,6,6,6,6,6,  # f0 - f7
    6,6,6,6,6,6,6,0   # f8 - ff
)

GB2312_st = (
    eError,eStart,eStart,eStart,eStart,eStart,     3,eError,#00-07
    eError,eError,eError,eError,eError,eError,eItsMe,eItsMe,#08-0f
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,#10-17
         4,eError,eStart,eStart,eError,eError,eError,eError,#18-1f
    eError,eError,     5,eError,eError,eError,eItsMe,eError,#20-27
    eError,eError,eStart,eStart,eStart,eStart,eStart,eStart #28-2f
)

# To be accurate, the length of class 6 can be either 2 or 4.
# But it is not necessary to discriminate between the two since
# it is used for frequency analysis only, and we are validing
# each code range there as well. So it is safe to set it to be
# 2 here.
GB2312CharLenTable = (0, 1, 1, 1, 1, 1, 2)

GB2312SMModel = {'classTable': GB2312_cls,
                  'classFactor': 7,
                  'stateTable': GB2312_st,
                  'charLenTable': GB2312CharLenTable,
                  'name': 'GB2312'}

# Shift_JIS

SJIS_cls = (
    1,1,1,1,1,1,1,1,  # 00 - 07
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    1,1,1,1,1,1,1,1,  # 30 - 37
    1,1,1,1,1,1,1,1,  # 38 - 3f
    2,2,2,2,2,2,2,2,  # 40 - 47
    2,2,2,2,2,2,2,2,  # 48 - 4f
    2,2,2,2,2,2,2,2,  # 50 - 57
    2,2,2,2,2,2,2,2,  # 58 - 5f
    2,2,2,2,2,2,2,2,  # 60 - 67
    2,2,2,2,2,2,2,2,  # 68 - 6f
    2,2,2,2,2,2,2,2,  # 70 - 77
    2,2,2,2,2,2,2,1,  # 78 - 7f
    3,3,3,3,3,3,3,3,  # 80 - 87
    3,3,3,3,3,3,3,3,  # 88 - 8f
    3,3,3,3,3,3,3,3,  # 90 - 97
    3,3,3,3,3,3,3,3,  # 98 - 9f
    #0xa0 is illegal in sjis encoding, but some pages does
    #contain such byte. We need to be more error forgiven.
    2,2,2,2,2,2,2,2,  # a0 - a7
    2,2,2,2,2,2,2,2,  # a8 - af
    2,2,2,2,2,2,2,2,  # b0 - b7
    2,2,2,2,2,2,2,2,  # b8 - bf
    2,2,2,2,2,2,2,2,  # c0 - c7
    2,2,2,2,2,2,2,2,  # c8 - cf
    2,2,2,2,2,2,2,2,  # d0 - d7
    2,2,2,2,2,2,2,2,  # d8 - df
    3,3,3,3,3,3,3,3,  # e0 - e7
    3,3,3,3,3,4,4,4,  # e8 - ef
    4,4,4,4,4,4,4,4,  # f0 - f7
    4,4,4,4,4,0,0,0   # f8 - ff
)


SJIS_st = (
    eError,eStart,eStart,     3,eError,eError,eError,eError,#00-07
    eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,#08-0f
    eItsMe,eItsMe,eError,eError,eStart,eStart,eStart,eStart #10-17
)

SJISCharLenTable = (0, 1, 1, 2, 0, 0)

SJISSMModel = {'classTable': SJIS_cls,
               'classFactor': 6,
               'stateTable': SJIS_st,
               'charLenTable': SJISCharLenTable,
               'name': 'Shift_JIS'}

# UCS2-BE

UCS2BE_cls = (
    0,0,0,0,0,0,0,0,  # 00 - 07
    0,0,1,0,0,2,0,0,  # 08 - 0f
    0,0,0,0,0,0,0,0,  # 10 - 17
    0,0,0,3,0,0,0,0,  # 18 - 1f
    0,0,0,0,0,0,0,0,  # 20 - 27
    0,3,3,3,3,3,0,0,  # 28 - 2f
    0,0,0,0,0,0,0,0,  # 30 - 37
    0,0,0,0,0,0,0,0,  # 38 - 3f
    0,0,0,0,0,0,0,0,  # 40 - 47
    0,0,0,0,0,0,0,0,  # 48 - 4f
    0,0,0,0,0,0,0,0,  # 50 - 57
    0,0,0,0,0,0,0,0,  # 58 - 5f
    0,0,0,0,0,0,0,0,  # 60 - 67
    0,0,0,0,0,0,0,0,  # 68 - 6f
    0,0,0,0,0,0,0,0,  # 70 - 77
    0,0,0,0,0,0,0,0,  # 78 - 7f
    0,0,0,0,0,0,0,0,  # 80 - 87
    0,0,0,0,0,0,0,0,  # 88 - 8f
    0,0,0,0,0,0,0,0,  # 90 - 97
    0,0,0,0,0,0,0,0,  # 98 - 9f
    0,0,0,0,0,0,0,0,  # a0 - a7
    0,0,0,0,0,0,0,0,  # a8 - af
    0,0,0,0,0,0,0,0,  # b0 - b7
    0,0,0,0,0,0,0,0,  # b8 - bf
    0,0,0,0,0,0,0,0,  # c0 - c7
    0,0,0,0,0,0,0,0,  # c8 - cf
    0,0,0,0,0,0,0,0,  # d0 - d7
    0,0,0,0,0,0,0,0,  # d8 - df
    0,0,0,0,0,0,0,0,  # e0 - e7
    0,0,0,0,0,0,0,0,  # e8 - ef
    0,0,0,0,0,0,0,0,  # f0 - f7
    0,0,0,0,0,0,4,5   # f8 - ff
)

UCS2BE_st  = (
          5,     7,     7,eError,     4,     3,eError,eError,#00-07
     eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,#08-0f
     eItsMe,eItsMe,     6,     6,     6,     6,eError,eError,#10-17
          6,     6,     6,     6,     6,eItsMe,     6,     6,#18-1f
          6,     6,     6,     6,     5,     7,     7,eError,#20-27
          5,     8,     6,     6,eError,     6,     6,     6,#28-2f
          6,     6,     6,     6,eError,eError,eStart,eStart #30-37
)

UCS2BECharLenTable = (2, 2, 2, 0, 2, 2)

UCS2BESMModel = {'classTable': UCS2BE_cls,
                 'classFactor': 6,
                 'stateTable': UCS2BE_st,
                 'charLenTable': UCS2BECharLenTable,
                 'name': 'UTF-16BE'}

# UCS2-LE

UCS2LE_cls = (
    0,0,0,0,0,0,0,0,  # 00 - 07
    0,0,1,0,0,2,0,0,  # 08 - 0f
    0,0,0,0,0,0,0,0,  # 10 - 17
    0,0,0,3,0,0,0,0,  # 18 - 1f
    0,0,0,0,0,0,0,0,  # 20 - 27
    0,3,3,3,3,3,0,0,  # 28 - 2f
    0,0,0,0,0,0,0,0,  # 30 - 37
    0,0,0,0,0,0,0,0,  # 38 - 3f
    0,0,0,0,0,0,0,0,  # 40 - 47
    0,0,0,0,0,0,0,0,  # 48 - 4f
    0,0,0,0,0,0,0,0,  # 50 - 57
    0,0,0,0,0,0,0,0,  # 58 - 5f
    0,0,0,0,0,0,0,0,  # 60 - 67
    0,0,0,0,0,0,0,0,  # 68 - 6f
    0,0,0,0,0,0,0,0,  # 70 - 77
    0,0,0,0,0,0,0,0,  # 78 - 7f
    0,0,0,0,0,0,0,0,  # 80 - 87
    0,0,0,0,0,0,0,0,  # 88 - 8f
    0,0,0,0,0,0,0,0,  # 90 - 97
    0,0,0,0,0,0,0,0,  # 98 - 9f
    0,0,0,0,0,0,0,0,  # a0 - a7
    0,0,0,0,0,0,0,0,  # a8 - af
    0,0,0,0,0,0,0,0,  # b0 - b7
    0,0,0,0,0,0,0,0,  # b8 - bf
    0,0,0,0,0,0,0,0,  # c0 - c7
    0,0,0,0,0,0,0,0,  # c8 - cf
    0,0,0,0,0,0,0,0,  # d0 - d7
    0,0,0,0,0,0,0,0,  # d8 - df
    0,0,0,0,0,0,0,0,  # e0 - e7
    0,0,0,0,0,0,0,0,  # e8 - ef
    0,0,0,0,0,0,0,0,  # f0 - f7
    0,0,0,0,0,0,4,5   # f8 - ff
)

UCS2LE_st = (
          6,     6,     7,     6,     4,     3,eError,eError,#00-07
     eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,#08-0f
     eItsMe,eItsMe,     5,     5,     5,eError,eItsMe,eError,#10-17
          5,     5,     5,eError,     5,eError,     6,     6,#18-1f
          7,     6,     8,     8,     5,     5,     5,eError,#20-27
          5,     5,     5,eError,eError,eError,     5,     5,#28-2f
          5,     5,     5,eError,     5,eError,eStart,eStart #30-37
)

UCS2LECharLenTable = (2, 2, 2, 2, 2, 2)

UCS2LESMModel = {'classTable': UCS2LE_cls,
                 'classFactor': 6,
                 'stateTable': UCS2LE_st,
                 'charLenTable': UCS2LECharLenTable,
                 'name': 'UTF-16LE'}

# UTF-8

UTF8_cls = (
    1,1,1,1,1,1,1,1,  # 00 - 07  #allow 0x00 as a legal value
    1,1,1,1,1,1,0,0,  # 08 - 0f
    1,1,1,1,1,1,1,1,  # 10 - 17
    1,1,1,0,1,1,1,1,  # 18 - 1f
    1,1,1,1,1,1,1,1,  # 20 - 27
    1,1,1,1,1,1,1,1,  # 28 - 2f
    1,1,1,1,1,1,1,1,  # 30 - 37
    1,1,1,1,1,1,1,1,  # 38 - 3f
    1,1,1,1,1,1,1,1,  # 40 - 47
    1,1,1,1,1,1,1,1,  # 48 - 4f
    1,1,1,1,1,1,1,1,  # 50 - 57
    1,1,1,1,1,1,1,1,  # 58 - 5f
    1,1,1,1,1,1,1,1,  # 60 - 67
    1,1,1,1,1,1,1,1,  # 68 - 6f
    1,1,1,1,1,1,1,1,  # 70 - 77
    1,1,1,1,1,1,1,1,  # 78 - 7f
    2,2,2,2,3,3,3,3,  # 80 - 87
    4,4,4,4,4,4,4,4,  # 88 - 8f
    4,4,4,4,4,4,4,4,  # 90 - 97
    4,4,4,4,4,4,4,4,  # 98 - 9f
    5,5,5,5,5,5,5,5,  # a0 - a7
    5,5,5,5,5,5,5,5,  # a8 - af
    5,5,5,5,5,5,5,5,  # b0 - b7
    5,5,5,5,5,5,5,5,  # b8 - bf
    0,0,6,6,6,6,6,6,  # c0 - c7
    6,6,6,6,6,6,6,6,  # c8 - cf
    6,6,6,6,6,6,6,6,  # d0 - d7
    6,6,6,6,6,6,6,6,  # d8 - df
    7,8,8,8,8,8,8,8,  # e0 - e7
    8,8,8,8,8,9,8,8,  # e8 - ef
    10,11,11,11,11,11,11,11,  # f0 - f7
    12,13,13,13,14,15,0,0    # f8 - ff
)

UTF8_st = (
    eError,eStart,eError,eError,eError,eError,     12,   10,#00-07
         9,     11,     8,     7,     6,     5,     4,    3,#08-0f
    eError,eError,eError,eError,eError,eError,eError,eError,#10-17
    eError,eError,eError,eError,eError,eError,eError,eError,#18-1f
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,#20-27
    eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,#28-2f
    eError,eError,     5,     5,     5,     5,eError,eError,#30-37
    eError,eError,eError,eError,eError,eError,eError,eError,#38-3f
    eError,eError,eError,     5,     5,     5,eError,eError,#40-47
    eError,eError,eError,eError,eError,eError,eError,eError,#48-4f
    eError,eError,     7,     7,     7,     7,eError,eError,#50-57
    eError,eError,eError,eError,eError,eError,eError,eError,#58-5f
    eError,eError,eError,eError,     7,     7,eError,eError,#60-67
    eError,eError,eError,eError,eError,eError,eError,eError,#68-6f
    eError,eError,     9,     9,     9,     9,eError,eError,#70-77
    eError,eError,eError,eError,eError,eError,eError,eError,#78-7f
    eError,eError,eError,eError,eError,     9,eError,eError,#80-87
    eError,eError,eError,eError,eError,eError,eError,eError,#88-8f
    eError,eError,    12,    12,    12,    12,eError,eError,#90-97
    eError,eError,eError,eError,eError,eError,eError,eError,#98-9f
    eError,eError,eError,eError,eError,    12,eError,eError,#a0-a7
    eError,eError,eError,eError,eError,eError,eError,eError,#a8-af
    eError,eError,    12,    12,    12,eError,eError,eError,#b0-b7
    eError,eError,eError,eError,eError,eError,eError,eError,#b8-bf
    eError,eError,eStart,eStart,eStart,eStart,eError,eError,#c0-c7
    eError,eError,eError,eError,eError,eError,eError,eError #c8-cf
)

UTF8CharLenTable = (0, 1, 0, 0, 0, 0, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6)

UTF8SMModel = {'classTable': UTF8_cls,
               'classFactor': 16,
               'stateTable': UTF8_st,
               'charLenTable': UTF8CharLenTable,
               'name': 'UTF-8'}

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py000064400000026013151735047670023524 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# The following result for thai was collected from a limited sample (1M).

# Character Mapping Table:
TIS620CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,182,106,107,100,183,184,185,101, 94,186,187,108,109,110,111,  # 40
188,189,190, 89, 95,112,113,191,192,193,194,253,253,253,253,253,  # 50
253, 64, 72, 73,114, 74,115,116,102, 81,201,117, 90,103, 78, 82,  # 60
 96,202, 91, 79, 84,104,105, 97, 98, 92,203,253,253,253,253,253,  # 70
209,210,211,212,213, 88,214,215,216,217,218,219,220,118,221,222,
223,224, 99, 85, 83,225,226,227,228,229,230,231,232,233,234,235,
236,  5, 30,237, 24,238, 75,  8, 26, 52, 34, 51,119, 47, 58, 57,
 49, 53, 55, 43, 20, 19, 44, 14, 48,  3, 17, 25, 39, 62, 31, 54,
 45,  9, 16,  2, 61, 15,239, 12, 42, 46, 18, 21, 76,  4, 66, 63,
 22, 10,  1, 36, 23, 13, 40, 27, 32, 35, 86,240,241,242,243,244,
 11, 28, 41, 29, 33,245, 50, 37,  6,  7, 67, 77, 38, 93,246,247,
 68, 56, 59, 65, 69, 60, 70, 80, 71, 87,248,249,250,251,252,253,
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 92.6386%
# first 1024 sequences:7.3177%
# rest  sequences:     1.0230%
# negative sequences:  0.0436%
ThaiLangModel = (
0,1,3,3,3,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,0,0,3,3,3,0,3,3,3,3,
0,3,3,0,0,0,1,3,0,3,3,2,3,3,0,1,2,3,3,3,3,0,2,0,2,0,0,3,2,1,2,2,
3,0,3,3,2,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,3,0,3,2,3,0,2,2,2,3,
0,2,3,0,0,0,0,1,0,1,2,3,1,1,3,2,2,0,1,1,0,0,1,0,0,0,0,0,0,0,1,1,
3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,3,3,2,3,2,3,3,2,2,2,
3,1,2,3,0,3,3,2,2,1,2,3,3,1,2,0,1,3,0,1,0,0,1,0,0,0,0,0,0,0,1,1,
3,3,2,2,3,3,3,3,1,2,3,3,3,3,3,2,2,2,2,3,3,2,2,3,3,2,2,3,2,3,2,2,
3,3,1,2,3,1,2,2,3,3,1,0,2,1,0,0,3,1,2,1,0,0,1,0,0,0,0,0,0,1,0,1,
3,3,3,3,3,3,2,2,3,3,3,3,2,3,2,2,3,3,2,2,3,2,2,2,2,1,1,3,1,2,1,1,
3,2,1,0,2,1,0,1,0,1,1,0,1,1,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,
3,3,3,2,3,2,3,3,2,2,3,2,3,3,2,3,1,1,2,3,2,2,2,3,2,2,2,2,2,1,2,1,
2,2,1,1,3,3,2,1,0,1,2,2,0,1,3,0,0,0,1,1,0,0,0,0,0,2,3,0,0,2,1,1,
3,3,2,3,3,2,0,0,3,3,0,3,3,0,2,2,3,1,2,2,1,1,1,0,2,2,2,0,2,2,1,1,
0,2,1,0,2,0,0,2,0,1,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,2,3,3,2,0,0,3,3,0,2,3,0,2,1,2,2,2,2,1,2,0,0,2,2,2,0,2,2,1,1,
0,2,1,0,2,0,0,2,0,1,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,
3,3,2,3,2,3,2,0,2,2,1,3,2,1,3,2,1,2,3,2,2,3,0,2,3,2,2,1,2,2,2,2,
1,2,2,0,0,0,0,2,0,1,2,0,1,1,1,0,1,0,3,1,1,0,0,0,0,0,0,0,0,0,1,0,
3,3,2,3,3,2,3,2,2,2,3,2,2,3,2,2,1,2,3,2,2,3,1,3,2,2,2,3,2,2,2,3,
3,2,1,3,0,1,1,1,0,2,1,1,1,1,1,0,1,0,1,1,0,0,0,0,0,0,0,0,0,2,0,0,
1,0,0,3,0,3,3,3,3,3,0,0,3,0,2,2,3,3,3,3,3,0,0,0,1,1,3,0,0,0,0,2,
0,0,1,0,0,0,0,0,0,0,2,3,0,0,0,3,0,2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,
2,0,3,3,3,3,0,0,2,3,0,0,3,0,3,3,2,3,3,3,3,3,0,0,3,3,3,0,0,0,3,3,
0,0,3,0,0,0,0,2,0,0,2,1,1,3,0,0,1,0,0,2,3,0,1,0,0,0,0,0,0,0,1,0,
3,3,3,3,2,3,3,3,3,3,3,3,1,2,1,3,3,2,2,1,2,2,2,3,1,1,2,0,2,1,2,1,
2,2,1,0,0,0,1,1,0,1,0,1,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,
3,0,2,1,2,3,3,3,0,2,0,2,2,0,2,1,3,2,2,1,2,1,0,0,2,2,1,0,2,1,2,2,
0,1,1,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,2,1,3,3,1,1,3,0,2,3,1,1,3,2,1,1,2,0,2,2,3,2,1,1,1,1,1,2,
3,0,0,1,3,1,2,1,2,0,3,0,0,0,1,0,3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
3,3,1,1,3,2,3,3,3,1,3,2,1,3,2,1,3,2,2,2,2,1,3,3,1,2,1,3,1,2,3,0,
2,1,1,3,2,2,2,1,2,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,
3,3,2,3,2,3,3,2,3,2,3,2,3,3,2,1,0,3,2,2,2,1,2,2,2,1,2,2,1,2,1,1,
2,2,2,3,0,1,3,1,1,1,1,0,1,1,0,2,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,2,3,2,2,1,1,3,2,3,2,3,2,0,3,2,2,1,2,0,2,2,2,1,2,2,2,2,1,
3,2,1,2,2,1,0,2,0,1,0,0,1,1,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,2,3,1,2,3,3,2,2,3,0,1,1,2,0,3,3,2,2,3,0,1,1,3,0,0,0,0,
3,1,0,3,3,0,2,0,2,1,0,0,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,2,3,2,3,3,0,1,3,1,1,2,1,2,1,1,3,1,1,0,2,3,1,1,1,1,1,1,1,1,
3,1,1,2,2,2,2,1,1,1,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,2,2,1,1,2,1,3,3,2,3,2,2,3,2,2,3,1,2,2,1,2,0,3,2,1,2,2,2,2,2,1,
3,2,1,2,2,2,1,1,1,1,0,0,1,1,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,1,3,3,0,2,1,0,3,2,0,0,3,1,0,1,1,0,1,0,0,0,0,0,1,
1,0,0,1,0,3,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,2,2,2,3,0,0,1,3,0,3,2,0,3,2,2,3,3,3,3,3,1,0,2,2,2,0,2,2,1,2,
0,2,3,0,0,0,0,1,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,0,2,3,1,3,3,2,3,3,0,3,3,0,3,2,2,3,2,3,3,3,0,0,2,2,3,0,1,1,1,3,
0,0,3,0,0,0,2,2,0,1,3,0,1,2,2,2,3,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
3,2,3,3,2,0,3,3,2,2,3,1,3,2,1,3,2,0,1,2,2,0,2,3,2,1,0,3,0,0,0,0,
3,0,0,2,3,1,3,0,0,3,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,3,2,2,2,1,2,0,1,3,1,1,3,1,3,0,0,2,1,1,1,1,2,1,1,1,0,2,1,0,1,
1,2,0,0,0,3,1,1,0,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,0,3,1,0,0,0,1,0,
3,3,3,3,2,2,2,2,2,1,3,1,1,1,2,0,1,1,2,1,2,1,3,2,0,0,3,1,1,1,1,1,
3,1,0,2,3,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,2,3,0,3,3,0,2,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,2,3,1,3,0,0,1,2,0,0,2,0,3,3,2,3,3,3,2,3,0,0,2,2,2,0,0,0,2,2,
0,0,1,0,0,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
0,0,0,3,0,2,0,0,0,0,0,0,0,0,0,0,1,2,3,1,3,3,0,0,1,0,3,0,0,0,0,0,
0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,1,2,3,1,2,3,1,0,3,0,2,2,1,0,2,1,1,2,0,1,0,0,1,1,1,1,0,1,0,0,
1,0,0,0,0,1,1,0,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,2,1,0,1,1,1,3,1,2,2,2,2,2,2,1,1,1,1,0,3,1,0,1,3,1,1,1,1,
1,1,0,2,0,1,3,1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,1,
3,0,2,2,1,3,3,2,3,3,0,1,1,0,2,2,1,2,1,3,3,1,0,0,3,2,0,0,0,0,2,1,
0,1,0,0,0,0,1,2,0,1,1,3,1,1,2,2,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,3,0,0,1,0,0,0,3,0,0,3,0,3,1,0,1,1,1,3,2,0,0,0,3,0,0,0,0,2,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,1,3,2,1,3,3,1,2,2,0,1,2,1,0,1,2,0,0,0,0,0,3,0,0,0,3,0,0,0,0,
3,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,1,2,0,3,3,3,2,2,0,1,1,0,1,3,0,0,0,2,2,0,0,0,0,3,1,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,2,3,1,2,0,0,2,1,0,3,1,0,1,2,0,1,1,1,1,3,0,0,3,1,1,0,2,2,1,1,
0,2,0,0,0,0,0,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,3,1,2,0,0,2,2,0,1,2,0,1,0,1,3,1,2,1,0,0,0,2,0,3,0,0,0,1,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,1,1,2,2,0,0,0,2,0,2,1,0,1,1,0,1,1,1,2,1,0,0,1,1,1,0,2,1,1,1,
0,1,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,
0,0,0,2,0,1,3,1,1,1,1,0,0,0,0,3,2,0,1,0,0,0,1,2,0,0,0,1,0,0,0,0,
0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,3,3,3,3,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,2,3,2,2,0,0,0,1,0,0,0,0,2,3,2,1,2,2,3,0,0,0,2,3,1,0,0,0,1,1,
0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,
3,3,2,2,0,1,0,0,0,0,2,0,2,0,1,0,0,0,1,1,0,0,0,2,1,0,1,0,1,1,0,0,
0,1,0,2,0,0,1,0,3,0,1,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,1,0,0,1,0,0,0,0,0,1,1,2,0,0,0,0,1,0,0,1,3,1,0,0,0,0,1,1,0,0,
0,1,0,0,0,0,3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,
3,3,1,1,1,1,2,3,0,0,2,1,1,1,1,1,0,2,1,1,0,0,0,2,1,0,1,2,1,1,0,1,
2,1,0,3,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,3,1,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,
0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,2,0,0,0,0,0,0,1,2,1,0,1,1,0,2,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2,0,0,0,1,3,0,1,0,0,0,2,0,0,0,0,0,0,0,1,2,0,0,0,0,0,
3,3,0,0,1,1,2,0,0,1,2,1,0,1,1,1,0,1,1,0,0,2,1,1,0,1,0,0,1,1,1,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,1,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,0,0,1,1,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,1,2,0,1,2,0,0,1,1,0,2,0,1,0,0,1,0,0,0,0,1,0,0,0,2,0,0,0,0,
1,0,0,1,0,1,1,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,1,1,0,1,1,0,2,1,3,0,0,0,0,1,1,0,0,0,0,0,0,0,3,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,1,0,1,0,0,2,0,0,2,0,0,1,1,2,0,0,1,1,0,0,0,1,0,0,0,1,1,0,0,0,
1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,1,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,3,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,
1,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,0,0,2,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
)

TIS620ThaiModel = {
  'charToOrderMap': TIS620CharToOrderMap,
  'precedenceMatrix': ThaiLangModel,
  'mTypicalPositiveRatio': 0.926386,
  'keepEnglishLetter': False,
  'charsetName': "TIS-620"
}

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py000064400000007136151735047700023233 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys
from . import constants
from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import EUCJPDistributionAnalysis
from .jpcntx import EUCJPContextAnalysis
from .mbcssm import EUCJPSMModel


class EUCJPProber(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(EUCJPSMModel)
        self._mDistributionAnalyzer = EUCJPDistributionAnalysis()
        self._mContextAnalyzer = EUCJPContextAnalysis()
        self.reset()

    def reset(self):
        MultiByteCharSetProber.reset(self)
        self._mContextAnalyzer.reset()

    def get_charset_name(self):
        return "EUC-JP"

    def feed(self, aBuf):
        aLen = len(aBuf)
        for i in range(0, aLen):
            # PY3K: aBuf is a byte array, so aBuf[i] is an int, not a byte
            codingState = self._mCodingSM.next_state(aBuf[i])
            if codingState == constants.eError:
                if constants._debug:
                    sys.stderr.write(self.get_charset_name()
                                     + ' prober hit error at byte ' + str(i)
                                     + '\n')
                self._mState = constants.eNotMe
                break
            elif codingState == constants.eItsMe:
                self._mState = constants.eFoundIt
                break
            elif codingState == constants.eStart:
                charLen = self._mCodingSM.get_current_charlen()
                if i == 0:
                    self._mLastChar[1] = aBuf[0]
                    self._mContextAnalyzer.feed(self._mLastChar, charLen)
                    self._mDistributionAnalyzer.feed(self._mLastChar, charLen)
                else:
                    self._mContextAnalyzer.feed(aBuf[i - 1:i + 1], charLen)
                    self._mDistributionAnalyzer.feed(aBuf[i - 1:i + 1],
                                                     charLen)

        self._mLastChar[0] = aBuf[aLen - 1]

        if self.get_state() == constants.eDetecting:
            if (self._mContextAnalyzer.got_enough_data() and
               (self.get_confidence() > constants.SHORTCUT_THRESHOLD)):
                self._mState = constants.eFoundIt

        return self.get_state()

    def get_confidence(self):
        contxtCf = self._mContextAnalyzer.get_confidence()
        distribCf = self._mDistributionAnalyzer.get_confidence()
        return max(contxtCf, distribCf)
python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py000064400000241242151735047700022415 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Big5 frequency table
# by Taiwan's Mandarin Promotion Council
# <http://www.edu.tw:81/mandr/>
#
# 128  --> 0.42261
# 256  --> 0.57851
# 512  --> 0.74851
# 1024 --> 0.89384
# 2048 --> 0.97583
#
# Ideal Distribution Ratio = 0.74851/(1-0.74851) =2.98
# Random Distribution Ration = 512/(5401-512)=0.105
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR

BIG5_TYPICAL_DISTRIBUTION_RATIO = 0.75

#Char to FreqOrder table
BIG5_TABLE_SIZE = 5376

Big5CharToFreqOrder = (
   1,1801,1506, 255,1431, 198,   9,  82,   6,5008, 177, 202,3681,1256,2821, 110, #   16
3814,  33,3274, 261,  76,  44,2114,  16,2946,2187,1176, 659,3971,  26,3451,2653, #   32
1198,3972,3350,4202, 410,2215, 302, 590, 361,1964,   8, 204,  58,4510,5009,1932, #   48
  63,5010,5011, 317,1614,  75, 222, 159,4203,2417,1480,5012,3555,3091, 224,2822, #   64
3682,   3,  10,3973,1471,  29,2787,1135,2866,1940, 873, 130,3275,1123, 312,5013, #   80
4511,2052, 507, 252, 682,5014, 142,1915, 124, 206,2947,  34,3556,3204,  64, 604, #   96
5015,2501,1977,1978, 155,1991, 645, 641,1606,5016,3452, 337,  72, 406,5017,  80, #  112
 630, 238,3205,1509, 263, 939,1092,2654, 756,1440,1094,3453, 449,  69,2987, 591, #  128
 179,2096, 471, 115,2035,1844,  60,  50,2988, 134, 806,1869, 734,2036,3454, 180, #  144
 995,1607, 156, 537,2907, 688,5018, 319,1305, 779,2145, 514,2379, 298,4512, 359, #  160
2502,  90,2716,1338, 663,  11, 906,1099,2553,  20,2441, 182, 532,1716,5019, 732, #  176
1376,4204,1311,1420,3206,  25,2317,1056, 113, 399, 382,1950, 242,3455,2474, 529, #  192
3276, 475,1447,3683,5020, 117,  21, 656, 810,1297,2300,2334,3557,5021, 126,4205, #  208
 706, 456, 150, 613,4513,  71,1118,2037,4206, 145,3092,  85, 835, 486,2115,1246, #  224
1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,5022,2128,2359, 347,3815, 221, #  240
3558,3135,5023,1956,1153,4207,  83, 296,1199,3093, 192, 624,  93,5024, 822,1898, #  256
2823,3136, 795,2065, 991,1554,1542,1592,  27,  43,2867, 859, 139,1456, 860,4514, #  272
 437, 712,3974, 164,2397,3137, 695, 211,3037,2097, 195,3975,1608,3559,3560,3684, #  288
3976, 234, 811,2989,2098,3977,2233,1441,3561,1615,2380, 668,2077,1638, 305, 228, #  304
1664,4515, 467, 415,5025, 262,2099,1593, 239, 108, 300, 200,1033, 512,1247,2078, #  320
5026,5027,2176,3207,3685,2682, 593, 845,1062,3277,  88,1723,2038,3978,1951, 212, #  336
 266, 152, 149, 468,1899,4208,4516,  77, 187,5028,3038,  37,   5,2990,5029,3979, #  352
5030,5031,  39,2524,4517,2908,3208,2079,  55, 148,  74,4518, 545, 483,1474,1029, #  368
1665, 217,1870,1531,3138,1104,2655,4209,  24, 172,3562, 900,3980,3563,3564,4519, #  384
  32,1408,2824,1312, 329, 487,2360,2251,2717, 784,2683,   4,3039,3351,1427,1789, #  400
 188, 109, 499,5032,3686,1717,1790, 888,1217,3040,4520,5033,3565,5034,3352,1520, #  416
3687,3981, 196,1034, 775,5035,5036, 929,1816, 249, 439,  38,5037,1063,5038, 794, #  432
3982,1435,2301,  46, 178,3278,2066,5039,2381,5040, 214,1709,4521, 804,  35, 707, #  448
 324,3688,1601,2554, 140, 459,4210,5041,5042,1365, 839, 272, 978,2262,2580,3456, #  464
2129,1363,3689,1423, 697, 100,3094,  48,  70,1231, 495,3139,2196,5043,1294,5044, #  480
2080, 462, 586,1042,3279, 853, 256, 988, 185,2382,3457,1698, 434,1084,5045,3458, #  496
 314,2625,2788,4522,2335,2336, 569,2285, 637,1817,2525, 757,1162,1879,1616,3459, #  512
 287,1577,2116, 768,4523,1671,2868,3566,2526,1321,3816, 909,2418,5046,4211, 933, #  528
3817,4212,2053,2361,1222,4524, 765,2419,1322, 786,4525,5047,1920,1462,1677,2909, #  544
1699,5048,4526,1424,2442,3140,3690,2600,3353,1775,1941,3460,3983,4213, 309,1369, #  560
1130,2825, 364,2234,1653,1299,3984,3567,3985,3986,2656, 525,1085,3041, 902,2001, #  576
1475, 964,4527, 421,1845,1415,1057,2286, 940,1364,3141, 376,4528,4529,1381,   7, #  592
2527, 983,2383, 336,1710,2684,1846, 321,3461, 559,1131,3042,2752,1809,1132,1313, #  608
 265,1481,1858,5049, 352,1203,2826,3280, 167,1089, 420,2827, 776, 792,1724,3568, #  624
4214,2443,3281,5050,4215,5051, 446, 229, 333,2753, 901,3818,1200,1557,4530,2657, #  640
1921, 395,2754,2685,3819,4216,1836, 125, 916,3209,2626,4531,5052,5053,3820,5054, #  656
5055,5056,4532,3142,3691,1133,2555,1757,3462,1510,2318,1409,3569,5057,2146, 438, #  672
2601,2910,2384,3354,1068, 958,3043, 461, 311,2869,2686,4217,1916,3210,4218,1979, #  688
 383, 750,2755,2627,4219, 274, 539, 385,1278,1442,5058,1154,1965, 384, 561, 210, #  704
  98,1295,2556,3570,5059,1711,2420,1482,3463,3987,2911,1257, 129,5060,3821, 642, #  720
 523,2789,2790,2658,5061, 141,2235,1333,  68, 176, 441, 876, 907,4220, 603,2602, #  736
 710, 171,3464, 404, 549,  18,3143,2398,1410,3692,1666,5062,3571,4533,2912,4534, #  752
5063,2991, 368,5064, 146, 366,  99, 871,3693,1543, 748, 807,1586,1185,  22,2263, #  768
 379,3822,3211,5065,3212, 505,1942,2628,1992,1382,2319,5066, 380,2362, 218, 702, #  784
1818,1248,3465,3044,3572,3355,3282,5067,2992,3694, 930,3283,3823,5068,  59,5069, #  800
 585, 601,4221, 497,3466,1112,1314,4535,1802,5070,1223,1472,2177,5071, 749,1837, #  816
 690,1900,3824,1773,3988,1476, 429,1043,1791,2236,2117, 917,4222, 447,1086,1629, #  832
5072, 556,5073,5074,2021,1654, 844,1090, 105, 550, 966,1758,2828,1008,1783, 686, #  848
1095,5075,2287, 793,1602,5076,3573,2603,4536,4223,2948,2302,4537,3825, 980,2503, #  864
 544, 353, 527,4538, 908,2687,2913,5077, 381,2629,1943,1348,5078,1341,1252, 560, #  880
3095,5079,3467,2870,5080,2054, 973, 886,2081, 143,4539,5081,5082, 157,3989, 496, #  896
4224,  57, 840, 540,2039,4540,4541,3468,2118,1445, 970,2264,1748,1966,2082,4225, #  912
3144,1234,1776,3284,2829,3695, 773,1206,2130,1066,2040,1326,3990,1738,1725,4226, #  928
 279,3145,  51,1544,2604, 423,1578,2131,2067, 173,4542,1880,5083,5084,1583, 264, #  944
 610,3696,4543,2444, 280, 154,5085,5086,5087,1739, 338,1282,3096, 693,2871,1411, #  960
1074,3826,2445,5088,4544,5089,5090,1240, 952,2399,5091,2914,1538,2688, 685,1483, #  976
4227,2475,1436, 953,4228,2055,4545, 671,2400,  79,4229,2446,3285, 608, 567,2689, #  992
3469,4230,4231,1691, 393,1261,1792,2401,5092,4546,5093,5094,5095,5096,1383,1672, # 1008
3827,3213,1464, 522,1119, 661,1150, 216, 675,4547,3991,1432,3574, 609,4548,2690, # 1024
2402,5097,5098,5099,4232,3045,   0,5100,2476, 315, 231,2447, 301,3356,4549,2385, # 1040
5101, 233,4233,3697,1819,4550,4551,5102,  96,1777,1315,2083,5103, 257,5104,1810, # 1056
3698,2718,1139,1820,4234,2022,1124,2164,2791,1778,2659,5105,3097, 363,1655,3214, # 1072
5106,2993,5107,5108,5109,3992,1567,3993, 718, 103,3215, 849,1443, 341,3357,2949, # 1088
1484,5110,1712, 127,  67, 339,4235,2403, 679,1412, 821,5111,5112, 834, 738, 351, # 1104
2994,2147, 846, 235,1497,1881, 418,1993,3828,2719, 186,1100,2148,2756,3575,1545, # 1120
1355,2950,2872,1377, 583,3994,4236,2581,2995,5113,1298,3699,1078,2557,3700,2363, # 1136
  78,3829,3830, 267,1289,2100,2002,1594,4237, 348, 369,1274,2197,2178,1838,4552, # 1152
1821,2830,3701,2757,2288,2003,4553,2951,2758, 144,3358, 882,4554,3995,2759,3470, # 1168
4555,2915,5114,4238,1726, 320,5115,3996,3046, 788,2996,5116,2831,1774,1327,2873, # 1184
3997,2832,5117,1306,4556,2004,1700,3831,3576,2364,2660, 787,2023, 506, 824,3702, # 1200
 534, 323,4557,1044,3359,2024,1901, 946,3471,5118,1779,1500,1678,5119,1882,4558, # 1216
 165, 243,4559,3703,2528, 123, 683,4239, 764,4560,  36,3998,1793, 589,2916, 816, # 1232
 626,1667,3047,2237,1639,1555,1622,3832,3999,5120,4000,2874,1370,1228,1933, 891, # 1248
2084,2917, 304,4240,5121, 292,2997,2720,3577, 691,2101,4241,1115,4561, 118, 662, # 1264
5122, 611,1156, 854,2386,1316,2875,   2, 386, 515,2918,5123,5124,3286, 868,2238, # 1280
1486, 855,2661, 785,2216,3048,5125,1040,3216,3578,5126,3146, 448,5127,1525,5128, # 1296
2165,4562,5129,3833,5130,4242,2833,3579,3147, 503, 818,4001,3148,1568, 814, 676, # 1312
1444, 306,1749,5131,3834,1416,1030, 197,1428, 805,2834,1501,4563,5132,5133,5134, # 1328
1994,5135,4564,5136,5137,2198,  13,2792,3704,2998,3149,1229,1917,5138,3835,2132, # 1344
5139,4243,4565,2404,3580,5140,2217,1511,1727,1120,5141,5142, 646,3836,2448, 307, # 1360
5143,5144,1595,3217,5145,5146,5147,3705,1113,1356,4002,1465,2529,2530,5148, 519, # 1376
5149, 128,2133,  92,2289,1980,5150,4003,1512, 342,3150,2199,5151,2793,2218,1981, # 1392
3360,4244, 290,1656,1317, 789, 827,2365,5152,3837,4566, 562, 581,4004,5153, 401, # 1408
4567,2252,  94,4568,5154,1399,2794,5155,1463,2025,4569,3218,1944,5156, 828,1105, # 1424
4245,1262,1394,5157,4246, 605,4570,5158,1784,2876,5159,2835, 819,2102, 578,2200, # 1440
2952,5160,1502, 436,3287,4247,3288,2836,4005,2919,3472,3473,5161,2721,2320,5162, # 1456
5163,2337,2068,  23,4571, 193, 826,3838,2103, 699,1630,4248,3098, 390,1794,1064, # 1472
3581,5164,1579,3099,3100,1400,5165,4249,1839,1640,2877,5166,4572,4573, 137,4250, # 1488
 598,3101,1967, 780, 104, 974,2953,5167, 278, 899, 253, 402, 572, 504, 493,1339, # 1504
5168,4006,1275,4574,2582,2558,5169,3706,3049,3102,2253, 565,1334,2722, 863,  41, # 1520
5170,5171,4575,5172,1657,2338,  19, 463,2760,4251, 606,5173,2999,3289,1087,2085, # 1536
1323,2662,3000,5174,1631,1623,1750,4252,2691,5175,2878, 791,2723,2663,2339, 232, # 1552
2421,5176,3001,1498,5177,2664,2630, 755,1366,3707,3290,3151,2026,1609, 119,1918, # 1568
3474, 862,1026,4253,5178,4007,3839,4576,4008,4577,2265,1952,2477,5179,1125, 817, # 1584
4254,4255,4009,1513,1766,2041,1487,4256,3050,3291,2837,3840,3152,5180,5181,1507, # 1600
5182,2692, 733,  40,1632,1106,2879, 345,4257, 841,2531, 230,4578,3002,1847,3292, # 1616
3475,5183,1263, 986,3476,5184, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562, # 1632
4010,4011,2954, 967,2761,2665,1349, 592,2134,1692,3361,3003,1995,4258,1679,4012, # 1648
1902,2188,5185, 739,3708,2724,1296,1290,5186,4259,2201,2202,1922,1563,2605,2559, # 1664
1871,2762,3004,5187, 435,5188, 343,1108, 596,  17,1751,4579,2239,3477,3709,5189, # 1680
4580, 294,3582,2955,1693, 477, 979, 281,2042,3583, 643,2043,3710,2631,2795,2266, # 1696
1031,2340,2135,2303,3584,4581, 367,1249,2560,5190,3585,5191,4582,1283,3362,2005, # 1712
 240,1762,3363,4583,4584, 836,1069,3153, 474,5192,2149,2532, 268,3586,5193,3219, # 1728
1521,1284,5194,1658,1546,4260,5195,3587,3588,5196,4261,3364,2693,1685,4262, 961, # 1744
1673,2632, 190,2006,2203,3841,4585,4586,5197, 570,2504,3711,1490,5198,4587,2633, # 1760
3293,1957,4588, 584,1514, 396,1045,1945,5199,4589,1968,2449,5200,5201,4590,4013, # 1776
 619,5202,3154,3294, 215,2007,2796,2561,3220,4591,3221,4592, 763,4263,3842,4593, # 1792
5203,5204,1958,1767,2956,3365,3712,1174, 452,1477,4594,3366,3155,5205,2838,1253, # 1808
2387,2189,1091,2290,4264, 492,5206, 638,1169,1825,2136,1752,4014, 648, 926,1021, # 1824
1324,4595, 520,4596, 997, 847,1007, 892,4597,3843,2267,1872,3713,2405,1785,4598, # 1840
1953,2957,3103,3222,1728,4265,2044,3714,4599,2008,1701,3156,1551,  30,2268,4266, # 1856
5207,2027,4600,3589,5208, 501,5209,4267, 594,3478,2166,1822,3590,3479,3591,3223, # 1872
 829,2839,4268,5210,1680,3157,1225,4269,5211,3295,4601,4270,3158,2341,5212,4602, # 1888
4271,5213,4015,4016,5214,1848,2388,2606,3367,5215,4603, 374,4017, 652,4272,4273, # 1904
 375,1140, 798,5216,5217,5218,2366,4604,2269, 546,1659, 138,3051,2450,4605,5219, # 1920
2254, 612,1849, 910, 796,3844,1740,1371, 825,3845,3846,5220,2920,2562,5221, 692, # 1936
 444,3052,2634, 801,4606,4274,5222,1491, 244,1053,3053,4275,4276, 340,5223,4018, # 1952
1041,3005, 293,1168,  87,1357,5224,1539, 959,5225,2240, 721, 694,4277,3847, 219, # 1968
1478, 644,1417,3368,2666,1413,1401,1335,1389,4019,5226,5227,3006,2367,3159,1826, # 1984
 730,1515, 184,2840,  66,4607,5228,1660,2958, 246,3369, 378,1457, 226,3480, 975, # 2000
4020,2959,1264,3592, 674, 696,5229, 163,5230,1141,2422,2167, 713,3593,3370,4608, # 2016
4021,5231,5232,1186,  15,5233,1079,1070,5234,1522,3224,3594, 276,1050,2725, 758, # 2032
1126, 653,2960,3296,5235,2342, 889,3595,4022,3104,3007, 903,1250,4609,4023,3481, # 2048
3596,1342,1681,1718, 766,3297, 286,  89,2961,3715,5236,1713,5237,2607,3371,3008, # 2064
5238,2962,2219,3225,2880,5239,4610,2505,2533, 181, 387,1075,4024, 731,2190,3372, # 2080
5240,3298, 310, 313,3482,2304, 770,4278,  54,3054, 189,4611,3105,3848,4025,5241, # 2096
1230,1617,1850, 355,3597,4279,4612,3373, 111,4280,3716,1350,3160,3483,3055,4281, # 2112
2150,3299,3598,5242,2797,4026,4027,3009, 722,2009,5243,1071, 247,1207,2343,2478, # 2128
1378,4613,2010, 864,1437,1214,4614, 373,3849,1142,2220, 667,4615, 442,2763,2563, # 2144
3850,4028,1969,4282,3300,1840, 837, 170,1107, 934,1336,1883,5244,5245,2119,4283, # 2160
2841, 743,1569,5246,4616,4284, 582,2389,1418,3484,5247,1803,5248, 357,1395,1729, # 2176
3717,3301,2423,1564,2241,5249,3106,3851,1633,4617,1114,2086,4285,1532,5250, 482, # 2192
2451,4618,5251,5252,1492, 833,1466,5253,2726,3599,1641,2842,5254,1526,1272,3718, # 2208
4286,1686,1795, 416,2564,1903,1954,1804,5255,3852,2798,3853,1159,2321,5256,2881, # 2224
4619,1610,1584,3056,2424,2764, 443,3302,1163,3161,5257,5258,4029,5259,4287,2506, # 2240
3057,4620,4030,3162,2104,1647,3600,2011,1873,4288,5260,4289, 431,3485,5261, 250, # 2256
  97,  81,4290,5262,1648,1851,1558, 160, 848,5263, 866, 740,1694,5264,2204,2843, # 2272
3226,4291,4621,3719,1687, 950,2479, 426, 469,3227,3720,3721,4031,5265,5266,1188, # 2288
 424,1996, 861,3601,4292,3854,2205,2694, 168,1235,3602,4293,5267,2087,1674,4622, # 2304
3374,3303, 220,2565,1009,5268,3855, 670,3010, 332,1208, 717,5269,5270,3603,2452, # 2320
4032,3375,5271, 513,5272,1209,2882,3376,3163,4623,1080,5273,5274,5275,5276,2534, # 2336
3722,3604, 815,1587,4033,4034,5277,3605,3486,3856,1254,4624,1328,3058,1390,4035, # 2352
1741,4036,3857,4037,5278, 236,3858,2453,3304,5279,5280,3723,3859,1273,3860,4625, # 2368
5281, 308,5282,4626, 245,4627,1852,2480,1307,2583, 430, 715,2137,2454,5283, 270, # 2384
 199,2883,4038,5284,3606,2727,1753, 761,1754, 725,1661,1841,4628,3487,3724,5285, # 2400
5286, 587,  14,3305, 227,2608, 326, 480,2270, 943,2765,3607, 291, 650,1884,5287, # 2416
1702,1226, 102,1547,  62,3488, 904,4629,3489,1164,4294,5288,5289,1224,1548,2766, # 2432
 391, 498,1493,5290,1386,1419,5291,2056,1177,4630, 813, 880,1081,2368, 566,1145, # 2448
4631,2291,1001,1035,2566,2609,2242, 394,1286,5292,5293,2069,5294,  86,1494,1730, # 2464
4039, 491,1588, 745, 897,2963, 843,3377,4040,2767,2884,3306,1768, 998,2221,2070, # 2480
 397,1827,1195,1970,3725,3011,3378, 284,5295,3861,2507,2138,2120,1904,5296,4041, # 2496
2151,4042,4295,1036,3490,1905, 114,2567,4296, 209,1527,5297,5298,2964,2844,2635, # 2512
2390,2728,3164, 812,2568,5299,3307,5300,1559, 737,1885,3726,1210, 885,  28,2695, # 2528
3608,3862,5301,4297,1004,1780,4632,5302, 346,1982,2222,2696,4633,3863,1742, 797, # 2544
1642,4043,1934,1072,1384,2152, 896,4044,3308,3727,3228,2885,3609,5303,2569,1959, # 2560
4634,2455,1786,5304,5305,5306,4045,4298,1005,1308,3728,4299,2729,4635,4636,1528, # 2576
2610, 161,1178,4300,1983, 987,4637,1101,4301, 631,4046,1157,3229,2425,1343,1241, # 2592
1016,2243,2570, 372, 877,2344,2508,1160, 555,1935, 911,4047,5307, 466,1170, 169, # 2608
1051,2921,2697,3729,2481,3012,1182,2012,2571,1251,2636,5308, 992,2345,3491,1540, # 2624
2730,1201,2071,2406,1997,2482,5309,4638, 528,1923,2191,1503,1874,1570,2369,3379, # 2640
3309,5310, 557,1073,5311,1828,3492,2088,2271,3165,3059,3107, 767,3108,2799,4639, # 2656
1006,4302,4640,2346,1267,2179,3730,3230, 778,4048,3231,2731,1597,2667,5312,4641, # 2672
5313,3493,5314,5315,5316,3310,2698,1433,3311, 131,  95,1504,4049, 723,4303,3166, # 2688
1842,3610,2768,2192,4050,2028,2105,3731,5317,3013,4051,1218,5318,3380,3232,4052, # 2704
4304,2584, 248,1634,3864, 912,5319,2845,3732,3060,3865, 654,  53,5320,3014,5321, # 2720
1688,4642, 777,3494,1032,4053,1425,5322, 191, 820,2121,2846, 971,4643, 931,3233, # 2736
 135, 664, 783,3866,1998, 772,2922,1936,4054,3867,4644,2923,3234, 282,2732, 640, # 2752
1372,3495,1127, 922, 325,3381,5323,5324, 711,2045,5325,5326,4055,2223,2800,1937, # 2768
4056,3382,2224,2255,3868,2305,5327,4645,3869,1258,3312,4057,3235,2139,2965,4058, # 2784
4059,5328,2225, 258,3236,4646, 101,1227,5329,3313,1755,5330,1391,3314,5331,2924, # 2800
2057, 893,5332,5333,5334,1402,4305,2347,5335,5336,3237,3611,5337,5338, 878,1325, # 2816
1781,2801,4647, 259,1385,2585, 744,1183,2272,4648,5339,4060,2509,5340, 684,1024, # 2832
4306,5341, 472,3612,3496,1165,3315,4061,4062, 322,2153, 881, 455,1695,1152,1340, # 2848
 660, 554,2154,4649,1058,4650,4307, 830,1065,3383,4063,4651,1924,5342,1703,1919, # 2864
5343, 932,2273, 122,5344,4652, 947, 677,5345,3870,2637, 297,1906,1925,2274,4653, # 2880
2322,3316,5346,5347,4308,5348,4309,  84,4310, 112, 989,5349, 547,1059,4064, 701, # 2896
3613,1019,5350,4311,5351,3497, 942, 639, 457,2306,2456, 993,2966, 407, 851, 494, # 2912
4654,3384, 927,5352,1237,5353,2426,3385, 573,4312, 680, 921,2925,1279,1875, 285, # 2928
 790,1448,1984, 719,2168,5354,5355,4655,4065,4066,1649,5356,1541, 563,5357,1077, # 2944
5358,3386,3061,3498, 511,3015,4067,4068,3733,4069,1268,2572,3387,3238,4656,4657, # 2960
5359, 535,1048,1276,1189,2926,2029,3167,1438,1373,2847,2967,1134,2013,5360,4313, # 2976
1238,2586,3109,1259,5361, 700,5362,2968,3168,3734,4314,5363,4315,1146,1876,1907, # 2992
4658,2611,4070, 781,2427, 132,1589, 203, 147, 273,2802,2407, 898,1787,2155,4071, # 3008
4072,5364,3871,2803,5365,5366,4659,4660,5367,3239,5368,1635,3872, 965,5369,1805, # 3024
2699,1516,3614,1121,1082,1329,3317,4073,1449,3873,  65,1128,2848,2927,2769,1590, # 3040
3874,5370,5371,  12,2668,  45, 976,2587,3169,4661, 517,2535,1013,1037,3240,5372, # 3056
3875,2849,5373,3876,5374,3499,5375,2612, 614,1999,2323,3877,3110,2733,2638,5376, # 3072
2588,4316, 599,1269,5377,1811,3735,5378,2700,3111, 759,1060, 489,1806,3388,3318, # 3088
1358,5379,5380,2391,1387,1215,2639,2256, 490,5381,5382,4317,1759,2392,2348,5383, # 3104
4662,3878,1908,4074,2640,1807,3241,4663,3500,3319,2770,2349, 874,5384,5385,3501, # 3120
3736,1859,  91,2928,3737,3062,3879,4664,5386,3170,4075,2669,5387,3502,1202,1403, # 3136
3880,2969,2536,1517,2510,4665,3503,2511,5388,4666,5389,2701,1886,1495,1731,4076, # 3152
2370,4667,5390,2030,5391,5392,4077,2702,1216, 237,2589,4318,2324,4078,3881,4668, # 3168
4669,2703,3615,3504, 445,4670,5393,5394,5395,5396,2771,  61,4079,3738,1823,4080, # 3184
5397, 687,2046, 935, 925, 405,2670, 703,1096,1860,2734,4671,4081,1877,1367,2704, # 3200
3389, 918,2106,1782,2483, 334,3320,1611,1093,4672, 564,3171,3505,3739,3390, 945, # 3216
2641,2058,4673,5398,1926, 872,4319,5399,3506,2705,3112, 349,4320,3740,4082,4674, # 3232
3882,4321,3741,2156,4083,4675,4676,4322,4677,2408,2047, 782,4084, 400, 251,4323, # 3248
1624,5400,5401, 277,3742, 299,1265, 476,1191,3883,2122,4324,4325,1109, 205,5402, # 3264
2590,1000,2157,3616,1861,5403,5404,5405,4678,5406,4679,2573, 107,2484,2158,4085, # 3280
3507,3172,5407,1533, 541,1301, 158, 753,4326,2886,3617,5408,1696, 370,1088,4327, # 3296
4680,3618, 579, 327, 440, 162,2244, 269,1938,1374,3508, 968,3063,  56,1396,3113, # 3312
2107,3321,3391,5409,1927,2159,4681,3016,5410,3619,5411,5412,3743,4682,2485,5413, # 3328
2804,5414,1650,4683,5415,2613,5416,5417,4086,2671,3392,1149,3393,4087,3884,4088, # 3344
5418,1076,  49,5419, 951,3242,3322,3323, 450,2850, 920,5420,1812,2805,2371,4328, # 3360
1909,1138,2372,3885,3509,5421,3243,4684,1910,1147,1518,2428,4685,3886,5422,4686, # 3376
2393,2614, 260,1796,3244,5423,5424,3887,3324, 708,5425,3620,1704,5426,3621,1351, # 3392
1618,3394,3017,1887, 944,4329,3395,4330,3064,3396,4331,5427,3744, 422, 413,1714, # 3408
3325, 500,2059,2350,4332,2486,5428,1344,1911, 954,5429,1668,5430,5431,4089,2409, # 3424
4333,3622,3888,4334,5432,2307,1318,2512,3114, 133,3115,2887,4687, 629,  31,2851, # 3440
2706,3889,4688, 850, 949,4689,4090,2970,1732,2089,4335,1496,1853,5433,4091, 620, # 3456
3245, 981,1242,3745,3397,1619,3746,1643,3326,2140,2457,1971,1719,3510,2169,5434, # 3472
3246,5435,5436,3398,1829,5437,1277,4690,1565,2048,5438,1636,3623,3116,5439, 869, # 3488
2852, 655,3890,3891,3117,4092,3018,3892,1310,3624,4691,5440,5441,5442,1733, 558, # 3504
4692,3747, 335,1549,3065,1756,4336,3748,1946,3511,1830,1291,1192, 470,2735,2108, # 3520
2806, 913,1054,4093,5443,1027,5444,3066,4094,4693, 982,2672,3399,3173,3512,3247, # 3536
3248,1947,2807,5445, 571,4694,5446,1831,5447,3625,2591,1523,2429,5448,2090, 984, # 3552
4695,3749,1960,5449,3750, 852, 923,2808,3513,3751, 969,1519, 999,2049,2325,1705, # 3568
5450,3118, 615,1662, 151, 597,4095,2410,2326,1049, 275,4696,3752,4337, 568,3753, # 3584
3626,2487,4338,3754,5451,2430,2275, 409,3249,5452,1566,2888,3514,1002, 769,2853, # 3600
 194,2091,3174,3755,2226,3327,4339, 628,1505,5453,5454,1763,2180,3019,4096, 521, # 3616
1161,2592,1788,2206,2411,4697,4097,1625,4340,4341, 412,  42,3119, 464,5455,2642, # 3632
4698,3400,1760,1571,2889,3515,2537,1219,2207,3893,2643,2141,2373,4699,4700,3328, # 3648
1651,3401,3627,5456,5457,3628,2488,3516,5458,3756,5459,5460,2276,2092, 460,5461, # 3664
4701,5462,3020, 962, 588,3629, 289,3250,2644,1116,  52,5463,3067,1797,5464,5465, # 3680
5466,1467,5467,1598,1143,3757,4342,1985,1734,1067,4702,1280,3402, 465,4703,1572, # 3696
 510,5468,1928,2245,1813,1644,3630,5469,4704,3758,5470,5471,2673,1573,1534,5472, # 3712
5473, 536,1808,1761,3517,3894,3175,2645,5474,5475,5476,4705,3518,2929,1912,2809, # 3728
5477,3329,1122, 377,3251,5478, 360,5479,5480,4343,1529, 551,5481,2060,3759,1769, # 3744
2431,5482,2930,4344,3330,3120,2327,2109,2031,4706,1404, 136,1468,1479, 672,1171, # 3760
3252,2308, 271,3176,5483,2772,5484,2050, 678,2736, 865,1948,4707,5485,2014,4098, # 3776
2971,5486,2737,2227,1397,3068,3760,4708,4709,1735,2931,3403,3631,5487,3895, 509, # 3792
2854,2458,2890,3896,5488,5489,3177,3178,4710,4345,2538,4711,2309,1166,1010, 552, # 3808
 681,1888,5490,5491,2972,2973,4099,1287,1596,1862,3179, 358, 453, 736, 175, 478, # 3824
1117, 905,1167,1097,5492,1854,1530,5493,1706,5494,2181,3519,2292,3761,3520,3632, # 3840
4346,2093,4347,5495,3404,1193,2489,4348,1458,2193,2208,1863,1889,1421,3331,2932, # 3856
3069,2182,3521, 595,2123,5496,4100,5497,5498,4349,1707,2646, 223,3762,1359, 751, # 3872
3121, 183,3522,5499,2810,3021, 419,2374, 633, 704,3897,2394, 241,5500,5501,5502, # 3888
 838,3022,3763,2277,2773,2459,3898,1939,2051,4101,1309,3122,2246,1181,5503,1136, # 3904
2209,3899,2375,1446,4350,2310,4712,5504,5505,4351,1055,2615, 484,3764,5506,4102, # 3920
 625,4352,2278,3405,1499,4353,4103,5507,4104,4354,3253,2279,2280,3523,5508,5509, # 3936
2774, 808,2616,3765,3406,4105,4355,3123,2539, 526,3407,3900,4356, 955,5510,1620, # 3952
4357,2647,2432,5511,1429,3766,1669,1832, 994, 928,5512,3633,1260,5513,5514,5515, # 3968
1949,2293, 741,2933,1626,4358,2738,2460, 867,1184, 362,3408,1392,5516,5517,4106, # 3984
4359,1770,1736,3254,2934,4713,4714,1929,2707,1459,1158,5518,3070,3409,2891,1292, # 4000
1930,2513,2855,3767,1986,1187,2072,2015,2617,4360,5519,2574,2514,2170,3768,2490, # 4016
3332,5520,3769,4715,5521,5522, 666,1003,3023,1022,3634,4361,5523,4716,1814,2257, # 4032
 574,3901,1603, 295,1535, 705,3902,4362, 283, 858, 417,5524,5525,3255,4717,4718, # 4048
3071,1220,1890,1046,2281,2461,4107,1393,1599, 689,2575, 388,4363,5526,2491, 802, # 4064
5527,2811,3903,2061,1405,2258,5528,4719,3904,2110,1052,1345,3256,1585,5529, 809, # 4080
5530,5531,5532, 575,2739,3524, 956,1552,1469,1144,2328,5533,2329,1560,2462,3635, # 4096
3257,4108, 616,2210,4364,3180,2183,2294,5534,1833,5535,3525,4720,5536,1319,3770, # 4112
3771,1211,3636,1023,3258,1293,2812,5537,5538,5539,3905, 607,2311,3906, 762,2892, # 4128
1439,4365,1360,4721,1485,3072,5540,4722,1038,4366,1450,2062,2648,4367,1379,4723, # 4144
2593,5541,5542,4368,1352,1414,2330,2935,1172,5543,5544,3907,3908,4724,1798,1451, # 4160
5545,5546,5547,5548,2936,4109,4110,2492,2351, 411,4111,4112,3637,3333,3124,4725, # 4176
1561,2674,1452,4113,1375,5549,5550,  47,2974, 316,5551,1406,1591,2937,3181,5552, # 4192
1025,2142,3125,3182, 354,2740, 884,2228,4369,2412, 508,3772, 726,3638, 996,2433, # 4208
3639, 729,5553, 392,2194,1453,4114,4726,3773,5554,5555,2463,3640,2618,1675,2813, # 4224
 919,2352,2975,2353,1270,4727,4115,  73,5556,5557, 647,5558,3259,2856,2259,1550, # 4240
1346,3024,5559,1332, 883,3526,5560,5561,5562,5563,3334,2775,5564,1212, 831,1347, # 4256
4370,4728,2331,3909,1864,3073, 720,3910,4729,4730,3911,5565,4371,5566,5567,4731, # 4272
5568,5569,1799,4732,3774,2619,4733,3641,1645,2376,4734,5570,2938, 669,2211,2675, # 4288
2434,5571,2893,5572,5573,1028,3260,5574,4372,2413,5575,2260,1353,5576,5577,4735, # 4304
3183, 518,5578,4116,5579,4373,1961,5580,2143,4374,5581,5582,3025,2354,2355,3912, # 4320
 516,1834,1454,4117,2708,4375,4736,2229,2620,1972,1129,3642,5583,2776,5584,2976, # 4336
1422, 577,1470,3026,1524,3410,5585,5586, 432,4376,3074,3527,5587,2594,1455,2515, # 4352
2230,1973,1175,5588,1020,2741,4118,3528,4737,5589,2742,5590,1743,1361,3075,3529, # 4368
2649,4119,4377,4738,2295, 895, 924,4378,2171, 331,2247,3076, 166,1627,3077,1098, # 4384
5591,1232,2894,2231,3411,4739, 657, 403,1196,2377, 542,3775,3412,1600,4379,3530, # 4400
5592,4740,2777,3261, 576, 530,1362,4741,4742,2540,2676,3776,4120,5593, 842,3913, # 4416
5594,2814,2032,1014,4121, 213,2709,3413, 665, 621,4380,5595,3777,2939,2435,5596, # 4432
2436,3335,3643,3414,4743,4381,2541,4382,4744,3644,1682,4383,3531,1380,5597, 724, # 4448
2282, 600,1670,5598,1337,1233,4745,3126,2248,5599,1621,4746,5600, 651,4384,5601, # 4464
1612,4385,2621,5602,2857,5603,2743,2312,3078,5604, 716,2464,3079, 174,1255,2710, # 4480
4122,3645, 548,1320,1398, 728,4123,1574,5605,1891,1197,3080,4124,5606,3081,3082, # 4496
3778,3646,3779, 747,5607, 635,4386,4747,5608,5609,5610,4387,5611,5612,4748,5613, # 4512
3415,4749,2437, 451,5614,3780,2542,2073,4388,2744,4389,4125,5615,1764,4750,5616, # 4528
4390, 350,4751,2283,2395,2493,5617,4391,4126,2249,1434,4127, 488,4752, 458,4392, # 4544
4128,3781, 771,1330,2396,3914,2576,3184,2160,2414,1553,2677,3185,4393,5618,2494, # 4560
2895,2622,1720,2711,4394,3416,4753,5619,2543,4395,5620,3262,4396,2778,5621,2016, # 4576
2745,5622,1155,1017,3782,3915,5623,3336,2313, 201,1865,4397,1430,5624,4129,5625, # 4592
5626,5627,5628,5629,4398,1604,5630, 414,1866, 371,2595,4754,4755,3532,2017,3127, # 4608
4756,1708, 960,4399, 887, 389,2172,1536,1663,1721,5631,2232,4130,2356,2940,1580, # 4624
5632,5633,1744,4757,2544,4758,4759,5634,4760,5635,2074,5636,4761,3647,3417,2896, # 4640
4400,5637,4401,2650,3418,2815, 673,2712,2465, 709,3533,4131,3648,4402,5638,1148, # 4656
 502, 634,5639,5640,1204,4762,3649,1575,4763,2623,3783,5641,3784,3128, 948,3263, # 4672
 121,1745,3916,1110,5642,4403,3083,2516,3027,4132,3785,1151,1771,3917,1488,4133, # 4688
1987,5643,2438,3534,5644,5645,2094,5646,4404,3918,1213,1407,2816, 531,2746,2545, # 4704
3264,1011,1537,4764,2779,4405,3129,1061,5647,3786,3787,1867,2897,5648,2018, 120, # 4720
4406,4407,2063,3650,3265,2314,3919,2678,3419,1955,4765,4134,5649,3535,1047,2713, # 4736
1266,5650,1368,4766,2858, 649,3420,3920,2546,2747,1102,2859,2679,5651,5652,2000, # 4752
5653,1111,3651,2977,5654,2495,3921,3652,2817,1855,3421,3788,5655,5656,3422,2415, # 4768
2898,3337,3266,3653,5657,2577,5658,3654,2818,4135,1460, 856,5659,3655,5660,2899, # 4784
2978,5661,2900,3922,5662,4408, 632,2517, 875,3923,1697,3924,2296,5663,5664,4767, # 4800
3028,1239, 580,4768,4409,5665, 914, 936,2075,1190,4136,1039,2124,5666,5667,5668, # 4816
5669,3423,1473,5670,1354,4410,3925,4769,2173,3084,4137, 915,3338,4411,4412,3339, # 4832
1605,1835,5671,2748, 398,3656,4413,3926,4138, 328,1913,2860,4139,3927,1331,4414, # 4848
3029, 937,4415,5672,3657,4140,4141,3424,2161,4770,3425, 524, 742, 538,3085,1012, # 4864
5673,5674,3928,2466,5675, 658,1103, 225,3929,5676,5677,4771,5678,4772,5679,3267, # 4880
1243,5680,4142, 963,2250,4773,5681,2714,3658,3186,5682,5683,2596,2332,5684,4774, # 4896
5685,5686,5687,3536, 957,3426,2547,2033,1931,2941,2467, 870,2019,3659,1746,2780, # 4912
2781,2439,2468,5688,3930,5689,3789,3130,3790,3537,3427,3791,5690,1179,3086,5691, # 4928
3187,2378,4416,3792,2548,3188,3131,2749,4143,5692,3428,1556,2549,2297, 977,2901, # 4944
2034,4144,1205,3429,5693,1765,3430,3189,2125,1271, 714,1689,4775,3538,5694,2333, # 4960
3931, 533,4417,3660,2184, 617,5695,2469,3340,3539,2315,5696,5697,3190,5698,5699, # 4976
3932,1988, 618, 427,2651,3540,3431,5700,5701,1244,1690,5702,2819,4418,4776,5703, # 4992
3541,4777,5704,2284,1576, 473,3661,4419,3432, 972,5705,3662,5706,3087,5707,5708, # 5008
4778,4779,5709,3793,4145,4146,5710, 153,4780, 356,5711,1892,2902,4420,2144, 408, # 5024
 803,2357,5712,3933,5713,4421,1646,2578,2518,4781,4782,3934,5714,3935,4422,5715, # 5040
2416,3433, 752,5716,5717,1962,3341,2979,5718, 746,3030,2470,4783,4423,3794, 698, # 5056
4784,1893,4424,3663,2550,4785,3664,3936,5719,3191,3434,5720,1824,1302,4147,2715, # 5072
3937,1974,4425,5721,4426,3192, 823,1303,1288,1236,2861,3542,4148,3435, 774,3938, # 5088
5722,1581,4786,1304,2862,3939,4787,5723,2440,2162,1083,3268,4427,4149,4428, 344, # 5104
1173, 288,2316, 454,1683,5724,5725,1461,4788,4150,2597,5726,5727,4789, 985, 894, # 5120
5728,3436,3193,5729,1914,2942,3795,1989,5730,2111,1975,5731,4151,5732,2579,1194, # 5136
 425,5733,4790,3194,1245,3796,4429,5734,5735,2863,5736, 636,4791,1856,3940, 760, # 5152
1800,5737,4430,2212,1508,4792,4152,1894,1684,2298,5738,5739,4793,4431,4432,2213, # 5168
 479,5740,5741, 832,5742,4153,2496,5743,2980,2497,3797, 990,3132, 627,1815,2652, # 5184
4433,1582,4434,2126,2112,3543,4794,5744, 799,4435,3195,5745,4795,2113,1737,3031, # 5200
1018, 543, 754,4436,3342,1676,4796,4797,4154,4798,1489,5746,3544,5747,2624,2903, # 5216
4155,5748,5749,2981,5750,5751,5752,5753,3196,4799,4800,2185,1722,5754,3269,3270, # 5232
1843,3665,1715, 481, 365,1976,1857,5755,5756,1963,2498,4801,5757,2127,3666,3271, # 5248
 433,1895,2064,2076,5758, 602,2750,5759,5760,5761,5762,5763,3032,1628,3437,5764, # 5264
3197,4802,4156,2904,4803,2519,5765,2551,2782,5766,5767,5768,3343,4804,2905,5769, # 5280
4805,5770,2864,4806,4807,1221,2982,4157,2520,5771,5772,5773,1868,1990,5774,5775, # 5296
5776,1896,5777,5778,4808,1897,4158, 318,5779,2095,4159,4437,5780,5781, 485,5782, # 5312
 938,3941, 553,2680, 116,5783,3942,3667,5784,3545,2681,2783,3438,3344,2820,5785, # 5328
3668,2943,4160,1747,2944,2983,5786,5787, 207,5788,4809,5789,4810,2521,5790,3033, # 5344
 890,3669,3943,5791,1878,3798,3439,5792,2186,2358,3440,1652,5793,5794,5795, 941, # 5360
2299, 208,3546,4161,2020, 330,4438,3944,2906,2499,3799,4439,4811,5796,5797,5798, # 5376  #last 512
#Everything below is of no interest for detection purpose
2522,1613,4812,5799,3345,3945,2523,5800,4162,5801,1637,4163,2471,4813,3946,5802, # 5392
2500,3034,3800,5803,5804,2195,4814,5805,2163,5806,5807,5808,5809,5810,5811,5812, # 5408
5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828, # 5424
5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844, # 5440
5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856,5857,5858,5859,5860, # 5456
5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872,5873,5874,5875,5876, # 5472
5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888,5889,5890,5891,5892, # 5488
5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,5906,5907,5908, # 5504
5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,5921,5922,5923,5924, # 5520
5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936,5937,5938,5939,5940, # 5536
5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952,5953,5954,5955,5956, # 5552
5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968,5969,5970,5971,5972, # 5568
5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984,5985,5986,5987,5988, # 5584
5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000,6001,6002,6003,6004, # 5600
6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020, # 5616
6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036, # 5632
6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052, # 5648
6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068, # 5664
6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084, # 5680
6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100, # 5696
6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116, # 5712
6117,6118,6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,6132, # 5728
6133,6134,6135,6136,6137,6138,6139,6140,6141,6142,6143,6144,6145,6146,6147,6148, # 5744
6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,6164, # 5760
6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179,6180, # 5776
6181,6182,6183,6184,6185,6186,6187,6188,6189,6190,6191,6192,6193,6194,6195,6196, # 5792
6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212, # 5808
6213,6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,3670,6224,6225,6226,6227, # 5824
6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,6242,6243, # 5840
6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,6254,6255,6256,6257,6258,6259, # 5856
6260,6261,6262,6263,6264,6265,6266,6267,6268,6269,6270,6271,6272,6273,6274,6275, # 5872
6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,4815,6286,6287,6288,6289,6290, # 5888
6291,6292,4816,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,6303,6304,6305, # 5904
6306,6307,6308,6309,6310,6311,4817,4818,6312,6313,6314,6315,6316,6317,6318,4819, # 5920
6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,6334, # 5936
6335,6336,6337,4820,6338,6339,6340,6341,6342,6343,6344,6345,6346,6347,6348,6349, # 5952
6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,6364,6365, # 5968
6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,6380,6381, # 5984
6382,6383,6384,6385,6386,6387,6388,6389,6390,6391,6392,6393,6394,6395,6396,6397, # 6000
6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,3441,6411,6412, # 6016
6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,4440,6426,6427, # 6032
6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443, # 6048
6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,4821,6455,6456,6457,6458, # 6064
6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474, # 6080
6475,6476,6477,3947,3948,6478,6479,6480,6481,3272,4441,6482,6483,6484,6485,4442, # 6096
6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,4822,6497,6498,6499,6500, # 6112
6501,6502,6503,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516, # 6128
6517,6518,6519,6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532, # 6144
6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548, # 6160
6549,6550,6551,6552,6553,6554,6555,6556,2784,6557,4823,6558,6559,6560,6561,6562, # 6176
6563,6564,6565,6566,6567,6568,6569,3949,6570,6571,6572,4824,6573,6574,6575,6576, # 6192
6577,6578,6579,6580,6581,6582,6583,4825,6584,6585,6586,3950,2785,6587,6588,6589, # 6208
6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605, # 6224
6606,6607,6608,6609,6610,6611,6612,4826,6613,6614,6615,4827,6616,6617,6618,6619, # 6240
6620,6621,6622,6623,6624,6625,4164,6626,6627,6628,6629,6630,6631,6632,6633,6634, # 6256
3547,6635,4828,6636,6637,6638,6639,6640,6641,6642,3951,2984,6643,6644,6645,6646, # 6272
6647,6648,6649,4165,6650,4829,6651,6652,4830,6653,6654,6655,6656,6657,6658,6659, # 6288
6660,6661,6662,4831,6663,6664,6665,6666,6667,6668,6669,6670,6671,4166,6672,4832, # 6304
3952,6673,6674,6675,6676,4833,6677,6678,6679,4167,6680,6681,6682,3198,6683,6684, # 6320
6685,6686,6687,6688,6689,6690,6691,6692,6693,6694,6695,6696,6697,4834,6698,6699, # 6336
6700,6701,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6712,6713,6714,6715, # 6352
6716,6717,6718,6719,6720,6721,6722,6723,6724,6725,6726,6727,6728,6729,6730,6731, # 6368
6732,6733,6734,4443,6735,6736,6737,6738,6739,6740,6741,6742,6743,6744,6745,4444, # 6384
6746,6747,6748,6749,6750,6751,6752,6753,6754,6755,6756,6757,6758,6759,6760,6761, # 6400
6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777, # 6416
6778,6779,6780,6781,4168,6782,6783,3442,6784,6785,6786,6787,6788,6789,6790,6791, # 6432
4169,6792,6793,6794,6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806, # 6448
6807,6808,6809,6810,6811,4835,6812,6813,6814,4445,6815,6816,4446,6817,6818,6819, # 6464
6820,6821,6822,6823,6824,6825,6826,6827,6828,6829,6830,6831,6832,6833,6834,6835, # 6480
3548,6836,6837,6838,6839,6840,6841,6842,6843,6844,6845,6846,4836,6847,6848,6849, # 6496
6850,6851,6852,6853,6854,3953,6855,6856,6857,6858,6859,6860,6861,6862,6863,6864, # 6512
6865,6866,6867,6868,6869,6870,6871,6872,6873,6874,6875,6876,6877,3199,6878,6879, # 6528
6880,6881,6882,4447,6883,6884,6885,6886,6887,6888,6889,6890,6891,6892,6893,6894, # 6544
6895,6896,6897,6898,6899,6900,6901,6902,6903,6904,4170,6905,6906,6907,6908,6909, # 6560
6910,6911,6912,6913,6914,6915,6916,6917,6918,6919,6920,6921,6922,6923,6924,6925, # 6576
6926,6927,4837,6928,6929,6930,6931,6932,6933,6934,6935,6936,3346,6937,6938,4838, # 6592
6939,6940,6941,4448,6942,6943,6944,6945,6946,4449,6947,6948,6949,6950,6951,6952, # 6608
6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6964,6965,6966,6967,6968, # 6624
6969,6970,6971,6972,6973,6974,6975,6976,6977,6978,6979,6980,6981,6982,6983,6984, # 6640
6985,6986,6987,6988,6989,6990,6991,6992,6993,6994,3671,6995,6996,6997,6998,4839, # 6656
6999,7000,7001,7002,3549,7003,7004,7005,7006,7007,7008,7009,7010,7011,7012,7013, # 6672
7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,7028,7029, # 6688
7030,4840,7031,7032,7033,7034,7035,7036,7037,7038,4841,7039,7040,7041,7042,7043, # 6704
7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,7059, # 6720
7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,2985,7071,7072,7073,7074, # 6736
7075,7076,7077,7078,7079,7080,4842,7081,7082,7083,7084,7085,7086,7087,7088,7089, # 6752
7090,7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105, # 6768
7106,7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,4450,7119,7120, # 6784
7121,7122,7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136, # 6800
7137,7138,7139,7140,7141,7142,7143,4843,7144,7145,7146,7147,7148,7149,7150,7151, # 6816
7152,7153,7154,7155,7156,7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167, # 6832
7168,7169,7170,7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183, # 6848
7184,7185,7186,7187,7188,4171,4172,7189,7190,7191,7192,7193,7194,7195,7196,7197, # 6864
7198,7199,7200,7201,7202,7203,7204,7205,7206,7207,7208,7209,7210,7211,7212,7213, # 6880
7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229, # 6896
7230,7231,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245, # 6912
7246,7247,7248,7249,7250,7251,7252,7253,7254,7255,7256,7257,7258,7259,7260,7261, # 6928
7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277, # 6944
7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293, # 6960
7294,7295,7296,4844,7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308, # 6976
7309,7310,7311,7312,7313,7314,7315,7316,4451,7317,7318,7319,7320,7321,7322,7323, # 6992
7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339, # 7008
7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,4173,7354, # 7024
7355,4845,7356,7357,7358,7359,7360,7361,7362,7363,7364,7365,7366,7367,7368,7369, # 7040
7370,7371,7372,7373,7374,7375,7376,7377,7378,7379,7380,7381,7382,7383,7384,7385, # 7056
7386,7387,7388,4846,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400, # 7072
7401,7402,7403,7404,7405,3672,7406,7407,7408,7409,7410,7411,7412,7413,7414,7415, # 7088
7416,7417,7418,7419,7420,7421,7422,7423,7424,7425,7426,7427,7428,7429,7430,7431, # 7104
7432,7433,7434,7435,7436,7437,7438,7439,7440,7441,7442,7443,7444,7445,7446,7447, # 7120
7448,7449,7450,7451,7452,7453,4452,7454,3200,7455,7456,7457,7458,7459,7460,7461, # 7136
7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,7472,7473,7474,4847,7475,7476, # 7152
7477,3133,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,7488,7489,7490,7491, # 7168
7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,3347,7503,7504,7505,7506, # 7184
7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,4848, # 7200
7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537, # 7216
7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,3801,4849,7550,7551, # 7232
7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567, # 7248
7568,7569,3035,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582, # 7264
7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598, # 7280
7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614, # 7296
7615,7616,4850,7617,7618,3802,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628, # 7312
7629,7630,7631,7632,4851,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643, # 7328
7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659, # 7344
7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,4453,7671,7672,7673,7674, # 7360
7675,7676,7677,7678,7679,7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690, # 7376
7691,7692,7693,7694,7695,7696,7697,3443,7698,7699,7700,7701,7702,4454,7703,7704, # 7392
7705,7706,7707,7708,7709,7710,7711,7712,7713,2472,7714,7715,7716,7717,7718,7719, # 7408
7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731,3954,7732,7733,7734, # 7424
7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7750, # 7440
3134,7751,7752,4852,7753,7754,7755,4853,7756,7757,7758,7759,7760,4174,7761,7762, # 7456
7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,7777,7778, # 7472
7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794, # 7488
7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,4854,7806,7807,7808,7809, # 7504
7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825, # 7520
4855,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840, # 7536
7841,7842,7843,7844,7845,7846,7847,3955,7848,7849,7850,7851,7852,7853,7854,7855, # 7552
7856,7857,7858,7859,7860,3444,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870, # 7568
7871,7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886, # 7584
7887,7888,7889,7890,7891,4175,7892,7893,7894,7895,7896,4856,4857,7897,7898,7899, # 7600
7900,2598,7901,7902,7903,7904,7905,7906,7907,7908,4455,7909,7910,7911,7912,7913, # 7616
7914,3201,7915,7916,7917,7918,7919,7920,7921,4858,7922,7923,7924,7925,7926,7927, # 7632
7928,7929,7930,7931,7932,7933,7934,7935,7936,7937,7938,7939,7940,7941,7942,7943, # 7648
7944,7945,7946,7947,7948,7949,7950,7951,7952,7953,7954,7955,7956,7957,7958,7959, # 7664
7960,7961,7962,7963,7964,7965,7966,7967,7968,7969,7970,7971,7972,7973,7974,7975, # 7680
7976,7977,7978,7979,7980,7981,4859,7982,7983,7984,7985,7986,7987,7988,7989,7990, # 7696
7991,7992,7993,7994,7995,7996,4860,7997,7998,7999,8000,8001,8002,8003,8004,8005, # 7712
8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,8016,4176,8017,8018,8019,8020, # 7728
8021,8022,8023,4861,8024,8025,8026,8027,8028,8029,8030,8031,8032,8033,8034,8035, # 7744
8036,4862,4456,8037,8038,8039,8040,4863,8041,8042,8043,8044,8045,8046,8047,8048, # 7760
8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063,8064, # 7776
8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080, # 7792
8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8096, # 7808
8097,8098,8099,4864,4177,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110, # 7824
8111,8112,8113,8114,8115,8116,8117,8118,8119,8120,4178,8121,8122,8123,8124,8125, # 7840
8126,8127,8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141, # 7856
8142,8143,8144,8145,4865,4866,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155, # 7872
8156,8157,8158,8159,8160,8161,8162,8163,8164,8165,4179,8166,8167,8168,8169,8170, # 7888
8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181,4457,8182,8183,8184,8185, # 7904
8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201, # 7920
8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215,8216,8217, # 7936
8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229,8230,8231,8232,8233, # 7952
8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249, # 7968
8250,8251,8252,8253,8254,8255,8256,3445,8257,8258,8259,8260,8261,8262,4458,8263, # 7984
8264,8265,8266,8267,8268,8269,8270,8271,8272,4459,8273,8274,8275,8276,3550,8277, # 8000
8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,4460,8290,8291,8292, # 8016
8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,4867, # 8032
8308,8309,8310,8311,8312,3551,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322, # 8048
8323,8324,8325,8326,4868,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337, # 8064
8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353, # 8080
8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,4869,4461,8364,8365,8366,8367, # 8096
8368,8369,8370,4870,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382, # 8112
8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398, # 8128
8399,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,4871,8411,8412,8413, # 8144
8414,8415,8416,8417,8418,8419,8420,8421,8422,4462,8423,8424,8425,8426,8427,8428, # 8160
8429,8430,8431,8432,8433,2986,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443, # 8176
8444,8445,8446,8447,8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459, # 8192
8460,8461,8462,8463,8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475, # 8208
8476,8477,8478,4180,8479,8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490, # 8224
8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506, # 8240
8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522, # 8256
8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538, # 8272
8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554, # 8288
8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,4872,8565,8566,8567,8568,8569, # 8304
8570,8571,8572,8573,4873,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584, # 8320
8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597,8598,8599,8600, # 8336
8601,8602,8603,8604,8605,3803,8606,8607,8608,8609,8610,8611,8612,8613,4874,3804, # 8352
8614,8615,8616,8617,8618,8619,8620,8621,3956,8622,8623,8624,8625,8626,8627,8628, # 8368
8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,2865,8639,8640,8641,8642,8643, # 8384
8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,4463,8657,8658, # 8400
8659,4875,4876,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672, # 8416
8673,8674,8675,8676,8677,8678,8679,8680,8681,4464,8682,8683,8684,8685,8686,8687, # 8432
8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703, # 8448
8704,8705,8706,8707,8708,8709,2261,8710,8711,8712,8713,8714,8715,8716,8717,8718, # 8464
8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,4181, # 8480
8734,8735,8736,8737,8738,8739,8740,8741,8742,8743,8744,8745,8746,8747,8748,8749, # 8496
8750,8751,8752,8753,8754,8755,8756,8757,8758,8759,8760,8761,8762,8763,4877,8764, # 8512
8765,8766,8767,8768,8769,8770,8771,8772,8773,8774,8775,8776,8777,8778,8779,8780, # 8528
8781,8782,8783,8784,8785,8786,8787,8788,4878,8789,4879,8790,8791,8792,4880,8793, # 8544
8794,8795,8796,8797,8798,8799,8800,8801,4881,8802,8803,8804,8805,8806,8807,8808, # 8560
8809,8810,8811,8812,8813,8814,8815,3957,8816,8817,8818,8819,8820,8821,8822,8823, # 8576
8824,8825,8826,8827,8828,8829,8830,8831,8832,8833,8834,8835,8836,8837,8838,8839, # 8592
8840,8841,8842,8843,8844,8845,8846,8847,4882,8848,8849,8850,8851,8852,8853,8854, # 8608
8855,8856,8857,8858,8859,8860,8861,8862,8863,8864,8865,8866,8867,8868,8869,8870, # 8624
8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,8884,3202,8885, # 8640
8886,8887,8888,8889,8890,8891,8892,8893,8894,8895,8896,8897,8898,8899,8900,8901, # 8656
8902,8903,8904,8905,8906,8907,8908,8909,8910,8911,8912,8913,8914,8915,8916,8917, # 8672
8918,8919,8920,8921,8922,8923,8924,4465,8925,8926,8927,8928,8929,8930,8931,8932, # 8688
4883,8933,8934,8935,8936,8937,8938,8939,8940,8941,8942,8943,2214,8944,8945,8946, # 8704
8947,8948,8949,8950,8951,8952,8953,8954,8955,8956,8957,8958,8959,8960,8961,8962, # 8720
8963,8964,8965,4884,8966,8967,8968,8969,8970,8971,8972,8973,8974,8975,8976,8977, # 8736
8978,8979,8980,8981,8982,8983,8984,8985,8986,8987,8988,8989,8990,8991,8992,4885, # 8752
8993,8994,8995,8996,8997,8998,8999,9000,9001,9002,9003,9004,9005,9006,9007,9008, # 8768
9009,9010,9011,9012,9013,9014,9015,9016,9017,9018,9019,9020,9021,4182,9022,9023, # 8784
9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9035,9036,9037,9038,9039, # 8800
9040,9041,9042,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055, # 8816
9056,9057,9058,9059,9060,9061,9062,9063,4886,9064,9065,9066,9067,9068,9069,4887, # 8832
9070,9071,9072,9073,9074,9075,9076,9077,9078,9079,9080,9081,9082,9083,9084,9085, # 8848
9086,9087,9088,9089,9090,9091,9092,9093,9094,9095,9096,9097,9098,9099,9100,9101, # 8864
9102,9103,9104,9105,9106,9107,9108,9109,9110,9111,9112,9113,9114,9115,9116,9117, # 8880
9118,9119,9120,9121,9122,9123,9124,9125,9126,9127,9128,9129,9130,9131,9132,9133, # 8896
9134,9135,9136,9137,9138,9139,9140,9141,3958,9142,9143,9144,9145,9146,9147,9148, # 8912
9149,9150,9151,4888,9152,9153,9154,9155,9156,9157,9158,9159,9160,9161,9162,9163, # 8928
9164,9165,9166,9167,9168,9169,9170,9171,9172,9173,9174,9175,4889,9176,9177,9178, # 8944
9179,9180,9181,9182,9183,9184,9185,9186,9187,9188,9189,9190,9191,9192,9193,9194, # 8960
9195,9196,9197,9198,9199,9200,9201,9202,9203,4890,9204,9205,9206,9207,9208,9209, # 8976
9210,9211,9212,9213,9214,9215,9216,9217,9218,9219,9220,9221,9222,4466,9223,9224, # 8992
9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240, # 9008
9241,9242,9243,9244,9245,4891,9246,9247,9248,9249,9250,9251,9252,9253,9254,9255, # 9024
9256,9257,4892,9258,9259,9260,9261,4893,4894,9262,9263,9264,9265,9266,9267,9268, # 9040
9269,9270,9271,9272,9273,4467,9274,9275,9276,9277,9278,9279,9280,9281,9282,9283, # 9056
9284,9285,3673,9286,9287,9288,9289,9290,9291,9292,9293,9294,9295,9296,9297,9298, # 9072
9299,9300,9301,9302,9303,9304,9305,9306,9307,9308,9309,9310,9311,9312,9313,9314, # 9088
9315,9316,9317,9318,9319,9320,9321,9322,4895,9323,9324,9325,9326,9327,9328,9329, # 9104
9330,9331,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345, # 9120
9346,9347,4468,9348,9349,9350,9351,9352,9353,9354,9355,9356,9357,9358,9359,9360, # 9136
9361,9362,9363,9364,9365,9366,9367,9368,9369,9370,9371,9372,9373,4896,9374,4469, # 9152
9375,9376,9377,9378,9379,4897,9380,9381,9382,9383,9384,9385,9386,9387,9388,9389, # 9168
9390,9391,9392,9393,9394,9395,9396,9397,9398,9399,9400,9401,9402,9403,9404,9405, # 9184
9406,4470,9407,2751,9408,9409,3674,3552,9410,9411,9412,9413,9414,9415,9416,9417, # 9200
9418,9419,9420,9421,4898,9422,9423,9424,9425,9426,9427,9428,9429,3959,9430,9431, # 9216
9432,9433,9434,9435,9436,4471,9437,9438,9439,9440,9441,9442,9443,9444,9445,9446, # 9232
9447,9448,9449,9450,3348,9451,9452,9453,9454,9455,9456,9457,9458,9459,9460,9461, # 9248
9462,9463,9464,9465,9466,9467,9468,9469,9470,9471,9472,4899,9473,9474,9475,9476, # 9264
9477,4900,9478,9479,9480,9481,9482,9483,9484,9485,9486,9487,9488,3349,9489,9490, # 9280
9491,9492,9493,9494,9495,9496,9497,9498,9499,9500,9501,9502,9503,9504,9505,9506, # 9296
9507,9508,9509,9510,9511,9512,9513,9514,9515,9516,9517,9518,9519,9520,4901,9521, # 9312
9522,9523,9524,9525,9526,4902,9527,9528,9529,9530,9531,9532,9533,9534,9535,9536, # 9328
9537,9538,9539,9540,9541,9542,9543,9544,9545,9546,9547,9548,9549,9550,9551,9552, # 9344
9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568, # 9360
9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9581,9582,9583,9584, # 9376
3805,9585,9586,9587,9588,9589,9590,9591,9592,9593,9594,9595,9596,9597,9598,9599, # 9392
9600,9601,9602,4903,9603,9604,9605,9606,9607,4904,9608,9609,9610,9611,9612,9613, # 9408
9614,4905,9615,9616,9617,9618,9619,9620,9621,9622,9623,9624,9625,9626,9627,9628, # 9424
9629,9630,9631,9632,4906,9633,9634,9635,9636,9637,9638,9639,9640,9641,9642,9643, # 9440
4907,9644,9645,9646,9647,9648,9649,9650,9651,9652,9653,9654,9655,9656,9657,9658, # 9456
9659,9660,9661,9662,9663,9664,9665,9666,9667,9668,9669,9670,9671,9672,4183,9673, # 9472
9674,9675,9676,9677,4908,9678,9679,9680,9681,4909,9682,9683,9684,9685,9686,9687, # 9488
9688,9689,9690,4910,9691,9692,9693,3675,9694,9695,9696,2945,9697,9698,9699,9700, # 9504
9701,9702,9703,9704,9705,4911,9706,9707,9708,9709,9710,9711,9712,9713,9714,9715, # 9520
9716,9717,9718,9719,9720,9721,9722,9723,9724,9725,9726,9727,9728,9729,9730,9731, # 9536
9732,9733,9734,9735,4912,9736,9737,9738,9739,9740,4913,9741,9742,9743,9744,9745, # 9552
9746,9747,9748,9749,9750,9751,9752,9753,9754,9755,9756,9757,9758,4914,9759,9760, # 9568
9761,9762,9763,9764,9765,9766,9767,9768,9769,9770,9771,9772,9773,9774,9775,9776, # 9584
9777,9778,9779,9780,9781,9782,4915,9783,9784,9785,9786,9787,9788,9789,9790,9791, # 9600
9792,9793,4916,9794,9795,9796,9797,9798,9799,9800,9801,9802,9803,9804,9805,9806, # 9616
9807,9808,9809,9810,9811,9812,9813,9814,9815,9816,9817,9818,9819,9820,9821,9822, # 9632
9823,9824,9825,9826,9827,9828,9829,9830,9831,9832,9833,9834,9835,9836,9837,9838, # 9648
9839,9840,9841,9842,9843,9844,9845,9846,9847,9848,9849,9850,9851,9852,9853,9854, # 9664
9855,9856,9857,9858,9859,9860,9861,9862,9863,9864,9865,9866,9867,9868,4917,9869, # 9680
9870,9871,9872,9873,9874,9875,9876,9877,9878,9879,9880,9881,9882,9883,9884,9885, # 9696
9886,9887,9888,9889,9890,9891,9892,4472,9893,9894,9895,9896,9897,3806,9898,9899, # 9712
9900,9901,9902,9903,9904,9905,9906,9907,9908,9909,9910,9911,9912,9913,9914,4918, # 9728
9915,9916,9917,4919,9918,9919,9920,9921,4184,9922,9923,9924,9925,9926,9927,9928, # 9744
9929,9930,9931,9932,9933,9934,9935,9936,9937,9938,9939,9940,9941,9942,9943,9944, # 9760
9945,9946,4920,9947,9948,9949,9950,9951,9952,9953,9954,9955,4185,9956,9957,9958, # 9776
9959,9960,9961,9962,9963,9964,9965,4921,9966,9967,9968,4473,9969,9970,9971,9972, # 9792
9973,9974,9975,9976,9977,4474,9978,9979,9980,9981,9982,9983,9984,9985,9986,9987, # 9808
9988,9989,9990,9991,9992,9993,9994,9995,9996,9997,9998,9999,10000,10001,10002,10003, # 9824
10004,10005,10006,10007,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019, # 9840
10020,10021,4922,10022,4923,10023,10024,10025,10026,10027,10028,10029,10030,10031,10032,10033, # 9856
10034,10035,10036,10037,10038,10039,10040,10041,10042,10043,10044,10045,10046,10047,10048,4924, # 9872
10049,10050,10051,10052,10053,10054,10055,10056,10057,10058,10059,10060,10061,10062,10063,10064, # 9888
10065,10066,10067,10068,10069,10070,10071,10072,10073,10074,10075,10076,10077,10078,10079,10080, # 9904
10081,10082,10083,10084,10085,10086,10087,4475,10088,10089,10090,10091,10092,10093,10094,10095, # 9920
10096,10097,4476,10098,10099,10100,10101,10102,10103,10104,10105,10106,10107,10108,10109,10110, # 9936
10111,2174,10112,10113,10114,10115,10116,10117,10118,10119,10120,10121,10122,10123,10124,10125, # 9952
10126,10127,10128,10129,10130,10131,10132,10133,10134,10135,10136,10137,10138,10139,10140,3807, # 9968
4186,4925,10141,10142,10143,10144,10145,10146,10147,4477,4187,10148,10149,10150,10151,10152, # 9984
10153,4188,10154,10155,10156,10157,10158,10159,10160,10161,4926,10162,10163,10164,10165,10166, #10000
10167,10168,10169,10170,10171,10172,10173,10174,10175,10176,10177,10178,10179,10180,10181,10182, #10016
10183,10184,10185,10186,10187,10188,10189,10190,10191,10192,3203,10193,10194,10195,10196,10197, #10032
10198,10199,10200,4478,10201,10202,10203,10204,4479,10205,10206,10207,10208,10209,10210,10211, #10048
10212,10213,10214,10215,10216,10217,10218,10219,10220,10221,10222,10223,10224,10225,10226,10227, #10064
10228,10229,10230,10231,10232,10233,10234,4927,10235,10236,10237,10238,10239,10240,10241,10242, #10080
10243,10244,10245,10246,10247,10248,10249,10250,10251,10252,10253,10254,10255,10256,10257,10258, #10096
10259,10260,10261,10262,10263,10264,10265,10266,10267,10268,10269,10270,10271,10272,10273,4480, #10112
4928,4929,10274,10275,10276,10277,10278,10279,10280,10281,10282,10283,10284,10285,10286,10287, #10128
10288,10289,10290,10291,10292,10293,10294,10295,10296,10297,10298,10299,10300,10301,10302,10303, #10144
10304,10305,10306,10307,10308,10309,10310,10311,10312,10313,10314,10315,10316,10317,10318,10319, #10160
10320,10321,10322,10323,10324,10325,10326,10327,10328,10329,10330,10331,10332,10333,10334,4930, #10176
10335,10336,10337,10338,10339,10340,10341,10342,4931,10343,10344,10345,10346,10347,10348,10349, #10192
10350,10351,10352,10353,10354,10355,3088,10356,2786,10357,10358,10359,10360,4189,10361,10362, #10208
10363,10364,10365,10366,10367,10368,10369,10370,10371,10372,10373,10374,10375,4932,10376,10377, #10224
10378,10379,10380,10381,10382,10383,10384,10385,10386,10387,10388,10389,10390,10391,10392,4933, #10240
10393,10394,10395,4934,10396,10397,10398,10399,10400,10401,10402,10403,10404,10405,10406,10407, #10256
10408,10409,10410,10411,10412,3446,10413,10414,10415,10416,10417,10418,10419,10420,10421,10422, #10272
10423,4935,10424,10425,10426,10427,10428,10429,10430,4936,10431,10432,10433,10434,10435,10436, #10288
10437,10438,10439,10440,10441,10442,10443,4937,10444,10445,10446,10447,4481,10448,10449,10450, #10304
10451,10452,10453,10454,10455,10456,10457,10458,10459,10460,10461,10462,10463,10464,10465,10466, #10320
10467,10468,10469,10470,10471,10472,10473,10474,10475,10476,10477,10478,10479,10480,10481,10482, #10336
10483,10484,10485,10486,10487,10488,10489,10490,10491,10492,10493,10494,10495,10496,10497,10498, #10352
10499,10500,10501,10502,10503,10504,10505,4938,10506,10507,10508,10509,10510,2552,10511,10512, #10368
10513,10514,10515,10516,3447,10517,10518,10519,10520,10521,10522,10523,10524,10525,10526,10527, #10384
10528,10529,10530,10531,10532,10533,10534,10535,10536,10537,10538,10539,10540,10541,10542,10543, #10400
4482,10544,4939,10545,10546,10547,10548,10549,10550,10551,10552,10553,10554,10555,10556,10557, #10416
10558,10559,10560,10561,10562,10563,10564,10565,10566,10567,3676,4483,10568,10569,10570,10571, #10432
10572,3448,10573,10574,10575,10576,10577,10578,10579,10580,10581,10582,10583,10584,10585,10586, #10448
10587,10588,10589,10590,10591,10592,10593,10594,10595,10596,10597,10598,10599,10600,10601,10602, #10464
10603,10604,10605,10606,10607,10608,10609,10610,10611,10612,10613,10614,10615,10616,10617,10618, #10480
10619,10620,10621,10622,10623,10624,10625,10626,10627,4484,10628,10629,10630,10631,10632,4940, #10496
10633,10634,10635,10636,10637,10638,10639,10640,10641,10642,10643,10644,10645,10646,10647,10648, #10512
10649,10650,10651,10652,10653,10654,10655,10656,4941,10657,10658,10659,2599,10660,10661,10662, #10528
10663,10664,10665,10666,3089,10667,10668,10669,10670,10671,10672,10673,10674,10675,10676,10677, #10544
10678,10679,10680,4942,10681,10682,10683,10684,10685,10686,10687,10688,10689,10690,10691,10692, #10560
10693,10694,10695,10696,10697,4485,10698,10699,10700,10701,10702,10703,10704,4943,10705,3677, #10576
10706,10707,10708,10709,10710,10711,10712,4944,10713,10714,10715,10716,10717,10718,10719,10720, #10592
10721,10722,10723,10724,10725,10726,10727,10728,4945,10729,10730,10731,10732,10733,10734,10735, #10608
10736,10737,10738,10739,10740,10741,10742,10743,10744,10745,10746,10747,10748,10749,10750,10751, #10624
10752,10753,10754,10755,10756,10757,10758,10759,10760,10761,4946,10762,10763,10764,10765,10766, #10640
10767,4947,4948,10768,10769,10770,10771,10772,10773,10774,10775,10776,10777,10778,10779,10780, #10656
10781,10782,10783,10784,10785,10786,10787,10788,10789,10790,10791,10792,10793,10794,10795,10796, #10672
10797,10798,10799,10800,10801,10802,10803,10804,10805,10806,10807,10808,10809,10810,10811,10812, #10688
10813,10814,10815,10816,10817,10818,10819,10820,10821,10822,10823,10824,10825,10826,10827,10828, #10704
10829,10830,10831,10832,10833,10834,10835,10836,10837,10838,10839,10840,10841,10842,10843,10844, #10720
10845,10846,10847,10848,10849,10850,10851,10852,10853,10854,10855,10856,10857,10858,10859,10860, #10736
10861,10862,10863,10864,10865,10866,10867,10868,10869,10870,10871,10872,10873,10874,10875,10876, #10752
10877,10878,4486,10879,10880,10881,10882,10883,10884,10885,4949,10886,10887,10888,10889,10890, #10768
10891,10892,10893,10894,10895,10896,10897,10898,10899,10900,10901,10902,10903,10904,10905,10906, #10784
10907,10908,10909,10910,10911,10912,10913,10914,10915,10916,10917,10918,10919,4487,10920,10921, #10800
10922,10923,10924,10925,10926,10927,10928,10929,10930,10931,10932,4950,10933,10934,10935,10936, #10816
10937,10938,10939,10940,10941,10942,10943,10944,10945,10946,10947,10948,10949,4488,10950,10951, #10832
10952,10953,10954,10955,10956,10957,10958,10959,4190,10960,10961,10962,10963,10964,10965,10966, #10848
10967,10968,10969,10970,10971,10972,10973,10974,10975,10976,10977,10978,10979,10980,10981,10982, #10864
10983,10984,10985,10986,10987,10988,10989,10990,10991,10992,10993,10994,10995,10996,10997,10998, #10880
10999,11000,11001,11002,11003,11004,11005,11006,3960,11007,11008,11009,11010,11011,11012,11013, #10896
11014,11015,11016,11017,11018,11019,11020,11021,11022,11023,11024,11025,11026,11027,11028,11029, #10912
11030,11031,11032,4951,11033,11034,11035,11036,11037,11038,11039,11040,11041,11042,11043,11044, #10928
11045,11046,11047,4489,11048,11049,11050,11051,4952,11052,11053,11054,11055,11056,11057,11058, #10944
4953,11059,11060,11061,11062,11063,11064,11065,11066,11067,11068,11069,11070,11071,4954,11072, #10960
11073,11074,11075,11076,11077,11078,11079,11080,11081,11082,11083,11084,11085,11086,11087,11088, #10976
11089,11090,11091,11092,11093,11094,11095,11096,11097,11098,11099,11100,11101,11102,11103,11104, #10992
11105,11106,11107,11108,11109,11110,11111,11112,11113,11114,11115,3808,11116,11117,11118,11119, #11008
11120,11121,11122,11123,11124,11125,11126,11127,11128,11129,11130,11131,11132,11133,11134,4955, #11024
11135,11136,11137,11138,11139,11140,11141,11142,11143,11144,11145,11146,11147,11148,11149,11150, #11040
11151,11152,11153,11154,11155,11156,11157,11158,11159,11160,11161,4956,11162,11163,11164,11165, #11056
11166,11167,11168,11169,11170,11171,11172,11173,11174,11175,11176,11177,11178,11179,11180,4957, #11072
11181,11182,11183,11184,11185,11186,4958,11187,11188,11189,11190,11191,11192,11193,11194,11195, #11088
11196,11197,11198,11199,11200,3678,11201,11202,11203,11204,11205,11206,4191,11207,11208,11209, #11104
11210,11211,11212,11213,11214,11215,11216,11217,11218,11219,11220,11221,11222,11223,11224,11225, #11120
11226,11227,11228,11229,11230,11231,11232,11233,11234,11235,11236,11237,11238,11239,11240,11241, #11136
11242,11243,11244,11245,11246,11247,11248,11249,11250,11251,4959,11252,11253,11254,11255,11256, #11152
11257,11258,11259,11260,11261,11262,11263,11264,11265,11266,11267,11268,11269,11270,11271,11272, #11168
11273,11274,11275,11276,11277,11278,11279,11280,11281,11282,11283,11284,11285,11286,11287,11288, #11184
11289,11290,11291,11292,11293,11294,11295,11296,11297,11298,11299,11300,11301,11302,11303,11304, #11200
11305,11306,11307,11308,11309,11310,11311,11312,11313,11314,3679,11315,11316,11317,11318,4490, #11216
11319,11320,11321,11322,11323,11324,11325,11326,11327,11328,11329,11330,11331,11332,11333,11334, #11232
11335,11336,11337,11338,11339,11340,11341,11342,11343,11344,11345,11346,11347,4960,11348,11349, #11248
11350,11351,11352,11353,11354,11355,11356,11357,11358,11359,11360,11361,11362,11363,11364,11365, #11264
11366,11367,11368,11369,11370,11371,11372,11373,11374,11375,11376,11377,3961,4961,11378,11379, #11280
11380,11381,11382,11383,11384,11385,11386,11387,11388,11389,11390,11391,11392,11393,11394,11395, #11296
11396,11397,4192,11398,11399,11400,11401,11402,11403,11404,11405,11406,11407,11408,11409,11410, #11312
11411,4962,11412,11413,11414,11415,11416,11417,11418,11419,11420,11421,11422,11423,11424,11425, #11328
11426,11427,11428,11429,11430,11431,11432,11433,11434,11435,11436,11437,11438,11439,11440,11441, #11344
11442,11443,11444,11445,11446,11447,11448,11449,11450,11451,11452,11453,11454,11455,11456,11457, #11360
11458,11459,11460,11461,11462,11463,11464,11465,11466,11467,11468,11469,4963,11470,11471,4491, #11376
11472,11473,11474,11475,4964,11476,11477,11478,11479,11480,11481,11482,11483,11484,11485,11486, #11392
11487,11488,11489,11490,11491,11492,4965,11493,11494,11495,11496,11497,11498,11499,11500,11501, #11408
11502,11503,11504,11505,11506,11507,11508,11509,11510,11511,11512,11513,11514,11515,11516,11517, #11424
11518,11519,11520,11521,11522,11523,11524,11525,11526,11527,11528,11529,3962,11530,11531,11532, #11440
11533,11534,11535,11536,11537,11538,11539,11540,11541,11542,11543,11544,11545,11546,11547,11548, #11456
11549,11550,11551,11552,11553,11554,11555,11556,11557,11558,11559,11560,11561,11562,11563,11564, #11472
4193,4194,11565,11566,11567,11568,11569,11570,11571,11572,11573,11574,11575,11576,11577,11578, #11488
11579,11580,11581,11582,11583,11584,11585,11586,11587,11588,11589,11590,11591,4966,4195,11592, #11504
11593,11594,11595,11596,11597,11598,11599,11600,11601,11602,11603,11604,3090,11605,11606,11607, #11520
11608,11609,11610,4967,11611,11612,11613,11614,11615,11616,11617,11618,11619,11620,11621,11622, #11536
11623,11624,11625,11626,11627,11628,11629,11630,11631,11632,11633,11634,11635,11636,11637,11638, #11552
11639,11640,11641,11642,11643,11644,11645,11646,11647,11648,11649,11650,11651,11652,11653,11654, #11568
11655,11656,11657,11658,11659,11660,11661,11662,11663,11664,11665,11666,11667,11668,11669,11670, #11584
11671,11672,11673,11674,4968,11675,11676,11677,11678,11679,11680,11681,11682,11683,11684,11685, #11600
11686,11687,11688,11689,11690,11691,11692,11693,3809,11694,11695,11696,11697,11698,11699,11700, #11616
11701,11702,11703,11704,11705,11706,11707,11708,11709,11710,11711,11712,11713,11714,11715,11716, #11632
11717,11718,3553,11719,11720,11721,11722,11723,11724,11725,11726,11727,11728,11729,11730,4969, #11648
11731,11732,11733,11734,11735,11736,11737,11738,11739,11740,4492,11741,11742,11743,11744,11745, #11664
11746,11747,11748,11749,11750,11751,11752,4970,11753,11754,11755,11756,11757,11758,11759,11760, #11680
11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,11776, #11696
11777,11778,11779,11780,11781,11782,11783,11784,11785,11786,11787,11788,11789,11790,4971,11791, #11712
11792,11793,11794,11795,11796,11797,4972,11798,11799,11800,11801,11802,11803,11804,11805,11806, #11728
11807,11808,11809,11810,4973,11811,11812,11813,11814,11815,11816,11817,11818,11819,11820,11821, #11744
11822,11823,11824,11825,11826,11827,11828,11829,11830,11831,11832,11833,11834,3680,3810,11835, #11760
11836,4974,11837,11838,11839,11840,11841,11842,11843,11844,11845,11846,11847,11848,11849,11850, #11776
11851,11852,11853,11854,11855,11856,11857,11858,11859,11860,11861,11862,11863,11864,11865,11866, #11792
11867,11868,11869,11870,11871,11872,11873,11874,11875,11876,11877,11878,11879,11880,11881,11882, #11808
11883,11884,4493,11885,11886,11887,11888,11889,11890,11891,11892,11893,11894,11895,11896,11897, #11824
11898,11899,11900,11901,11902,11903,11904,11905,11906,11907,11908,11909,11910,11911,11912,11913, #11840
11914,11915,4975,11916,11917,11918,11919,11920,11921,11922,11923,11924,11925,11926,11927,11928, #11856
11929,11930,11931,11932,11933,11934,11935,11936,11937,11938,11939,11940,11941,11942,11943,11944, #11872
11945,11946,11947,11948,11949,4976,11950,11951,11952,11953,11954,11955,11956,11957,11958,11959, #11888
11960,11961,11962,11963,11964,11965,11966,11967,11968,11969,11970,11971,11972,11973,11974,11975, #11904
11976,11977,11978,11979,11980,11981,11982,11983,11984,11985,11986,11987,4196,11988,11989,11990, #11920
11991,11992,4977,11993,11994,11995,11996,11997,11998,11999,12000,12001,12002,12003,12004,12005, #11936
12006,12007,12008,12009,12010,12011,12012,12013,12014,12015,12016,12017,12018,12019,12020,12021, #11952
12022,12023,12024,12025,12026,12027,12028,12029,12030,12031,12032,12033,12034,12035,12036,12037, #11968
12038,12039,12040,12041,12042,12043,12044,12045,12046,12047,12048,12049,12050,12051,12052,12053, #11984
12054,12055,12056,12057,12058,12059,12060,12061,4978,12062,12063,12064,12065,12066,12067,12068, #12000
12069,12070,12071,12072,12073,12074,12075,12076,12077,12078,12079,12080,12081,12082,12083,12084, #12016
12085,12086,12087,12088,12089,12090,12091,12092,12093,12094,12095,12096,12097,12098,12099,12100, #12032
12101,12102,12103,12104,12105,12106,12107,12108,12109,12110,12111,12112,12113,12114,12115,12116, #12048
12117,12118,12119,12120,12121,12122,12123,4979,12124,12125,12126,12127,12128,4197,12129,12130, #12064
12131,12132,12133,12134,12135,12136,12137,12138,12139,12140,12141,12142,12143,12144,12145,12146, #12080
12147,12148,12149,12150,12151,12152,12153,12154,4980,12155,12156,12157,12158,12159,12160,4494, #12096
12161,12162,12163,12164,3811,12165,12166,12167,12168,12169,4495,12170,12171,4496,12172,12173, #12112
12174,12175,12176,3812,12177,12178,12179,12180,12181,12182,12183,12184,12185,12186,12187,12188, #12128
12189,12190,12191,12192,12193,12194,12195,12196,12197,12198,12199,12200,12201,12202,12203,12204, #12144
12205,12206,12207,12208,12209,12210,12211,12212,12213,12214,12215,12216,12217,12218,12219,12220, #12160
12221,4981,12222,12223,12224,12225,12226,12227,12228,12229,12230,12231,12232,12233,12234,12235, #12176
4982,12236,12237,12238,12239,12240,12241,12242,12243,12244,12245,4983,12246,12247,12248,12249, #12192
4984,12250,12251,12252,12253,12254,12255,12256,12257,12258,12259,12260,12261,12262,12263,12264, #12208
4985,12265,4497,12266,12267,12268,12269,12270,12271,12272,12273,12274,12275,12276,12277,12278, #12224
12279,12280,12281,12282,12283,12284,12285,12286,12287,4986,12288,12289,12290,12291,12292,12293, #12240
12294,12295,12296,2473,12297,12298,12299,12300,12301,12302,12303,12304,12305,12306,12307,12308, #12256
12309,12310,12311,12312,12313,12314,12315,12316,12317,12318,12319,3963,12320,12321,12322,12323, #12272
12324,12325,12326,12327,12328,12329,12330,12331,12332,4987,12333,12334,12335,12336,12337,12338, #12288
12339,12340,12341,12342,12343,12344,12345,12346,12347,12348,12349,12350,12351,12352,12353,12354, #12304
12355,12356,12357,12358,12359,3964,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369, #12320
12370,3965,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384, #12336
12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400, #12352
12401,12402,12403,12404,12405,12406,12407,12408,4988,12409,12410,12411,12412,12413,12414,12415, #12368
12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431, #12384
12432,12433,12434,12435,12436,12437,12438,3554,12439,12440,12441,12442,12443,12444,12445,12446, #12400
12447,12448,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462, #12416
12463,12464,4989,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477, #12432
12478,12479,12480,4990,12481,12482,12483,12484,12485,12486,12487,12488,12489,4498,12490,12491, #12448
12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507, #12464
12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523, #12480
12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,12535,12536,12537,12538,12539, #12496
12540,12541,12542,12543,12544,12545,12546,12547,12548,12549,12550,12551,4991,12552,12553,12554, #12512
12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570, #12528
12571,12572,12573,12574,12575,12576,12577,12578,3036,12579,12580,12581,12582,12583,3966,12584, #12544
12585,12586,12587,12588,12589,12590,12591,12592,12593,12594,12595,12596,12597,12598,12599,12600, #12560
12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616, #12576
12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632, #12592
12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,4499,12647, #12608
12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663, #12624
12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679, #12640
12680,12681,12682,12683,12684,12685,12686,12687,12688,12689,12690,12691,12692,12693,12694,12695, #12656
12696,12697,12698,4992,12699,12700,12701,12702,12703,12704,12705,12706,12707,12708,12709,12710, #12672
12711,12712,12713,12714,12715,12716,12717,12718,12719,12720,12721,12722,12723,12724,12725,12726, #12688
12727,12728,12729,12730,12731,12732,12733,12734,12735,12736,12737,12738,12739,12740,12741,12742, #12704
12743,12744,12745,12746,12747,12748,12749,12750,12751,12752,12753,12754,12755,12756,12757,12758, #12720
12759,12760,12761,12762,12763,12764,12765,12766,12767,12768,12769,12770,12771,12772,12773,12774, #12736
12775,12776,12777,12778,4993,2175,12779,12780,12781,12782,12783,12784,12785,12786,4500,12787, #12752
12788,12789,12790,12791,12792,12793,12794,12795,12796,12797,12798,12799,12800,12801,12802,12803, #12768
12804,12805,12806,12807,12808,12809,12810,12811,12812,12813,12814,12815,12816,12817,12818,12819, #12784
12820,12821,12822,12823,12824,12825,12826,4198,3967,12827,12828,12829,12830,12831,12832,12833, #12800
12834,12835,12836,12837,12838,12839,12840,12841,12842,12843,12844,12845,12846,12847,12848,12849, #12816
12850,12851,12852,12853,12854,12855,12856,12857,12858,12859,12860,12861,4199,12862,12863,12864, #12832
12865,12866,12867,12868,12869,12870,12871,12872,12873,12874,12875,12876,12877,12878,12879,12880, #12848
12881,12882,12883,12884,12885,12886,12887,4501,12888,12889,12890,12891,12892,12893,12894,12895, #12864
12896,12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911, #12880
12912,4994,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,12923,12924,12925,12926, #12896
12927,12928,12929,12930,12931,12932,12933,12934,12935,12936,12937,12938,12939,12940,12941,12942, #12912
12943,12944,12945,12946,12947,12948,12949,12950,12951,12952,12953,12954,12955,12956,1772,12957, #12928
12958,12959,12960,12961,12962,12963,12964,12965,12966,12967,12968,12969,12970,12971,12972,12973, #12944
12974,12975,12976,12977,12978,12979,12980,12981,12982,12983,12984,12985,12986,12987,12988,12989, #12960
12990,12991,12992,12993,12994,12995,12996,12997,4502,12998,4503,12999,13000,13001,13002,13003, #12976
4504,13004,13005,13006,13007,13008,13009,13010,13011,13012,13013,13014,13015,13016,13017,13018, #12992
13019,13020,13021,13022,13023,13024,13025,13026,13027,13028,13029,3449,13030,13031,13032,13033, #13008
13034,13035,13036,13037,13038,13039,13040,13041,13042,13043,13044,13045,13046,13047,13048,13049, #13024
13050,13051,13052,13053,13054,13055,13056,13057,13058,13059,13060,13061,13062,13063,13064,13065, #13040
13066,13067,13068,13069,13070,13071,13072,13073,13074,13075,13076,13077,13078,13079,13080,13081, #13056
13082,13083,13084,13085,13086,13087,13088,13089,13090,13091,13092,13093,13094,13095,13096,13097, #13072
13098,13099,13100,13101,13102,13103,13104,13105,13106,13107,13108,13109,13110,13111,13112,13113, #13088
13114,13115,13116,13117,13118,3968,13119,4995,13120,13121,13122,13123,13124,13125,13126,13127, #13104
4505,13128,13129,13130,13131,13132,13133,13134,4996,4506,13135,13136,13137,13138,13139,4997, #13120
13140,13141,13142,13143,13144,13145,13146,13147,13148,13149,13150,13151,13152,13153,13154,13155, #13136
13156,13157,13158,13159,4998,13160,13161,13162,13163,13164,13165,13166,13167,13168,13169,13170, #13152
13171,13172,13173,13174,13175,13176,4999,13177,13178,13179,13180,13181,13182,13183,13184,13185, #13168
13186,13187,13188,13189,13190,13191,13192,13193,13194,13195,13196,13197,13198,13199,13200,13201, #13184
13202,13203,13204,13205,13206,5000,13207,13208,13209,13210,13211,13212,13213,13214,13215,13216, #13200
13217,13218,13219,13220,13221,13222,13223,13224,13225,13226,13227,4200,5001,13228,13229,13230, #13216
13231,13232,13233,13234,13235,13236,13237,13238,13239,13240,3969,13241,13242,13243,13244,3970, #13232
13245,13246,13247,13248,13249,13250,13251,13252,13253,13254,13255,13256,13257,13258,13259,13260, #13248
13261,13262,13263,13264,13265,13266,13267,13268,3450,13269,13270,13271,13272,13273,13274,13275, #13264
13276,5002,13277,13278,13279,13280,13281,13282,13283,13284,13285,13286,13287,13288,13289,13290, #13280
13291,13292,13293,13294,13295,13296,13297,13298,13299,13300,13301,13302,3813,13303,13304,13305, #13296
13306,13307,13308,13309,13310,13311,13312,13313,13314,13315,13316,13317,13318,13319,13320,13321, #13312
13322,13323,13324,13325,13326,13327,13328,4507,13329,13330,13331,13332,13333,13334,13335,13336, #13328
13337,13338,13339,13340,13341,5003,13342,13343,13344,13345,13346,13347,13348,13349,13350,13351, #13344
13352,13353,13354,13355,13356,13357,13358,13359,13360,13361,13362,13363,13364,13365,13366,13367, #13360
5004,13368,13369,13370,13371,13372,13373,13374,13375,13376,13377,13378,13379,13380,13381,13382, #13376
13383,13384,13385,13386,13387,13388,13389,13390,13391,13392,13393,13394,13395,13396,13397,13398, #13392
13399,13400,13401,13402,13403,13404,13405,13406,13407,13408,13409,13410,13411,13412,13413,13414, #13408
13415,13416,13417,13418,13419,13420,13421,13422,13423,13424,13425,13426,13427,13428,13429,13430, #13424
13431,13432,4508,13433,13434,13435,4201,13436,13437,13438,13439,13440,13441,13442,13443,13444, #13440
13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,5005,13458,13459, #13456
13460,13461,13462,13463,13464,13465,13466,13467,13468,13469,13470,4509,13471,13472,13473,13474, #13472
13475,13476,13477,13478,13479,13480,13481,13482,13483,13484,13485,13486,13487,13488,13489,13490, #13488
13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13502,13503,13504,13505,13506, #13504
13507,13508,13509,13510,13511,13512,13513,13514,13515,13516,13517,13518,13519,13520,13521,13522, #13520
13523,13524,13525,13526,13527,13528,13529,13530,13531,13532,13533,13534,13535,13536,13537,13538, #13536
13539,13540,13541,13542,13543,13544,13545,13546,13547,13548,13549,13550,13551,13552,13553,13554, #13552
13555,13556,13557,13558,13559,13560,13561,13562,13563,13564,13565,13566,13567,13568,13569,13570, #13568
13571,13572,13573,13574,13575,13576,13577,13578,13579,13580,13581,13582,13583,13584,13585,13586, #13584
13587,13588,13589,13590,13591,13592,13593,13594,13595,13596,13597,13598,13599,13600,13601,13602, #13600
13603,13604,13605,13606,13607,13608,13609,13610,13611,13612,13613,13614,13615,13616,13617,13618, #13616
13619,13620,13621,13622,13623,13624,13625,13626,13627,13628,13629,13630,13631,13632,13633,13634, #13632
13635,13636,13637,13638,13639,13640,13641,13642,5006,13643,13644,13645,13646,13647,13648,13649, #13648
13650,13651,5007,13652,13653,13654,13655,13656,13657,13658,13659,13660,13661,13662,13663,13664, #13664
13665,13666,13667,13668,13669,13670,13671,13672,13673,13674,13675,13676,13677,13678,13679,13680, #13680
13681,13682,13683,13684,13685,13686,13687,13688,13689,13690,13691,13692,13693,13694,13695,13696, #13696
13697,13698,13699,13700,13701,13702,13703,13704,13705,13706,13707,13708,13709,13710,13711,13712, #13712
13713,13714,13715,13716,13717,13718,13719,13720,13721,13722,13723,13724,13725,13726,13727,13728, #13728
13729,13730,13731,13732,13733,13734,13735,13736,13737,13738,13739,13740,13741,13742,13743,13744, #13744
13745,13746,13747,13748,13749,13750,13751,13752,13753,13754,13755,13756,13757,13758,13759,13760, #13760
13761,13762,13763,13764,13765,13766,13767,13768,13769,13770,13771,13772,13773,13774,3273,13775, #13776
13776,13777,13778,13779,13780,13781,13782,13783,13784,13785,13786,13787,13788,13789,13790,13791, #13792
13792,13793,13794,13795,13796,13797,13798,13799,13800,13801,13802,13803,13804,13805,13806,13807, #13808
13808,13809,13810,13811,13812,13813,13814,13815,13816,13817,13818,13819,13820,13821,13822,13823, #13824
13824,13825,13826,13827,13828,13829,13830,13831,13832,13833,13834,13835,13836,13837,13838,13839, #13840
13840,13841,13842,13843,13844,13845,13846,13847,13848,13849,13850,13851,13852,13853,13854,13855, #13856
13856,13857,13858,13859,13860,13861,13862,13863,13864,13865,13866,13867,13868,13869,13870,13871, #13872
13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,13884,13885,13886,13887, #13888
13888,13889,13890,13891,13892,13893,13894,13895,13896,13897,13898,13899,13900,13901,13902,13903, #13904
13904,13905,13906,13907,13908,13909,13910,13911,13912,13913,13914,13915,13916,13917,13918,13919, #13920
13920,13921,13922,13923,13924,13925,13926,13927,13928,13929,13930,13931,13932,13933,13934,13935, #13936
13936,13937,13938,13939,13940,13941,13942,13943,13944,13945,13946,13947,13948,13949,13950,13951, #13952
13952,13953,13954,13955,13956,13957,13958,13959,13960,13961,13962,13963,13964,13965,13966,13967, #13968
13968,13969,13970,13971,13972) #13973

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/euckrprober.cpython-34.pyc000064400000001701151735047710027511 0ustar00�
�Re��@sZddlmZddlmZddlmZddlmZGdd�de�ZdS)�)�MultiByteCharSetProber)�CodingStateMachine)�EUCKRDistributionAnalysis)�EUCKRSMModelc@s(eZdZdd�Zdd�ZdS)�EUCKRProbercCs6tj|�tt�|_t�|_|j�dS)N)r�__init__rrZ
_mCodingSMrZ_mDistributionAnalyzer�reset)�self�r
�L/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/euckrprober.pyr#s
zEUCKRProber.__init__cCsdS)NzEUC-KRr
)r	r
r
r�get_charset_name)szEUCKRProber.get_charset_nameN)�__name__�
__module__�__qualname__rrr
r
r
rr"srN)	ZmbcharsetproberrZcodingstatemachinerZchardistributionrZmbcssmrrr
r
r
r�<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/langcyrillicmodel.cpython-34.pyc000064400000073444151735047710030621 0ustar00python3.4�
�Re=E�@s$d�Zd�Zd�Zd�Zd�Zd�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Z	ied�6ed�6d�d�6d�d�6d�d�6Z
ied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zd�S)�����������������J��K�������������G��B��A��L��@���M�H��E�C��N�I���O������������������������������������������������������������������������D��������������������������������������������������
��'������������	�����
��������6�;�%�,�:�)�0�5�.�7�*�<�$�1�&��"�#�+�-� �(�4�8�!�=�>�3�9�/�?�2�F�ZcharToOrderMapZprecedenceMatrixgl���P@�?ZmTypicalPositiveRatioFZkeepEnglishLetterzKOI8-RZcharsetNamezwindows-1251z
ISO-8859-5ZMacCyrillicZIBM866ZIBM855N(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrrrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqr\rrrsrtrurvrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxryr�r~r{r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r}rrzr�r�r�r�r�r�r�rwr�(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r]r^r_r`rarbrcrdrerfrgrhrir�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxryr�r~r{r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r}rrzr�r�r�r�r�r�r�rwr�rjr\rkrlrmrnrorprqrrrsrtrurvrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrr\r�rxryr�r~r{r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r}rrzr�r�r�r�r�r�r�rwr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr9r:r;r<r\r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrwr�r�r�rxr�ryr�rzr�r{r�r|r�r}r�r~r�rTrUrVrWrXrYrZrr�r�r�r[r]r^r_r�r�r`rarbrcrdrerfr�r�rgrhrirjrkrlrmrnr�r�r�r�r�r�r�r�r�rorprqrrr�r�rsr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rtrur�r�r�r�r�r�r�r�r�r�r�r�rvrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxryr�r~r{r|r�r�r�r�r�r�r�r�r�r�r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r]r^r_r`rarbrcrdrerfrgrhrir�r�r�r�r}rrzr�r�r�r�r�r�r�rwr�rjr\rkrlrmrnrorprqrrrsrtrurvrr(r�rxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxr�r�rxrxrxrxr�rxrxrxr|rxr|rxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxr�rxr|r|r|r|r|r�r�r|rxrxrxr|rxrxrxrxrxrxrxrxrxrxr|rxrxr�r�rxrxrxrxrxrxrxrxrxr|rxr|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxr|r|rxrxrxrxrxrxrxrxrxr|rxrxr�r�rxrxrxrxrxrxrxrxr|rxrxr�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr|rxr|rxrxrxrxrxrxrxrxrxrxrxrxrxr�r�rxrxrxrxrxrxrxrxrxrxrxr|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxrxrxrxrxrxrxrxrxr|rxrxr�r�rxrxrxrxrxrxrxrxrxrxrxr|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxrxrxr|r|r|rxr�rxrxr�rxrxrxrxr|r|rxr�r|r|r|rxrxr|r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxr|rxrxrxrxrxr|r|rxr|rxrxrxr|r�r|r|r�r�r|r|r|r|r|r|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxrxr|r|r|rxr�r|r|rxrxr|r�r|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxr|rxrxr�r|rxr|r|rxr|rxrxrxrxr|r|rxr�rxr|r|rxr�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxrxrxr|r|rxrxrxrxrxr|rxrxrxrxr|r|r|r�rxrxrxr|r|r|r|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxrxrxrxrxr|rxr|rxrxrxrxrxrxr|rxr|r|r�r�rxr|r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxrxrxrxrxrxr|r�r�rxr�r�r�r�r�r|r�r�r�r|r|r|r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxr|rxrxr|r|r|r|r�rxr|rxr|rxr|r�r|r|r�r�r�r|r�r|r�r|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxrxrxrxrxrxrxr|r|rxr|rxrxrxr|r|r|r|r�r|r|r|r|rxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�rxr|rxr|r|rxrxrxrxrxrxrxrxrxr�rxr|r�r�rxrxrxrxr|rxrxrxrxr|rxr|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxrxrxrxrxr|r|rxrxr�r|r�r�rxr|rxr|rxr�r�r�r|r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr�rxr�r|rxrxrxrxr|rxrxrxrxr�r|r|r�r�r|rxr|r|r|rxr|rxr|r|rxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr|rxr�r|rxr|rxr�r�r|rxrxr|r�r|rxr�r�r|rxr|r|r�r�rxr�rxr|r|r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr�rxr�r|rxrxrxrxrxrxrxrxr|r�rxr|r�r�r|r|rxrxrxr|rxrxr�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxr|r|rxrxr|r|r|rxrxr�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxr|r|rxrxrxrxrxrxrxr�rxr|rxrxr|rxr|r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�rxrxrxrxrxrxr|rxrxrxr|r|r|r|rxr�rxr|rxr�r�r|r�r�r|r|r|r|r�rxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r|r|rxrxrxrxrxr�r|r|r�rxr�r�rxr�r�rxr�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr|r|r�r�rxrxrxr|r|r�r|r|rxr�r�r|r�r�r|r|r�rxr�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr|rxrxrxrxr�r|r|r|r�r|r�rxrxr�r�r|r�r|r�r|r|r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxrxrxrxrxr|r�rxr|r|rxr|r�rxr|r�rxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxr|rxrxrxr|r|r|rxrxr�r|r�r|r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr�r�r|r�r|rxrxr|r|r�r|r|rxr�r|r�r�r�r|r|rxr|r�r|r|r|r|r|rxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxrxrxr�r�r�r�r�r|r|r�r�rxr�r�r�rxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�rxrxrxr|r�r�r�r|r�r�r�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r|rxr|r|r|r�r|r|r|r�r|r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxrxrxrxr�r�r�r�r�r�r�r�r�rxr�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|rxr|r|r|rxr�r|r|r|r|r|r|r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxrxr|r|r|r|rxr|r|r�r�r|r|r|r|r�r�rxr�r|r�r|r�r�r�r�r�r�r�r|r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�rxr|r|r|r|r�r|r�r|r�r|r�r�r�r|r�r|r|r�r�r|r|r�r�r�r�r|r�r�r�r�r�r�r�r�r�r|r�r�r�r|r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr|r|r|r�r�r�r|rxr�r�r�r�r|r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxr|rxr|r�r|r|r|r|r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr�r�r�r�r|r|r|rxr|r|r|r|r|r|r|r�r�r�r|r�r|r�r�r�r|r|r�r�r�r�r|r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxr|rxrxr|r�r�r�r�r�r�r�r�r|r�r�r�rxr�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxrxrxrxr�r|r|r|r|r�r�r�r�r|r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxrxrxr|r�r�r�r�r|r|r�r�r�r|r�r�r�rxr�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr|rxr|r�r�r�r|r|r|r�r�r�r|r�r�r�r�r�r�r�r�r�rxr�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr�r|r�r�r|r|r|r|r|r|r�r|r|r�r�r�r�r�r|r|r|r�r�r�r�r|r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxrxr|r|r�r�r�r|r|r�r�r�r�r|r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxr|rxr|r�r�r�r�r�r�r�r�r�r|r�r|r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r|r�r�r�r�r|r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rxr|r|r|r�r�r�r|r|r�r�r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rxr�r|r|r|r|r|r|r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r|r�r�r�r�rxr|r�r|r�r|r|r�r�r�r�r�r|r�r�r�r|r�r�r�r�r�r|r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|r|r|r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r|r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r|r|r|r�rxr�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|rxr|r|r�r�r�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|r�r�r|r�r|r|r|r|r|r�r|r|r�r�r�r�r�r�r|r|r|r�r|r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|r|r|r�r�r�r|r|r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|r|r|r�r�r�r|r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|r|r|r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|r|r�r�r|r�r|r�r�r�r�r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)
ZKOI8R_CharToOrderMapZwin1251_CharToOrderMapZlatin5_CharToOrderMapZmacCyrillic_CharToOrderMapZIBM855_CharToOrderMapZIBM866_CharToOrderMapZRussianLangModelZ
Koi8rModelZWin1251CyrillicModelZLatin5CyrillicModelZMacCyrillicModelZIbm866ModelZIbm855Model�r�r��R/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py�<module>s





python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/chardetect.cpython-34.pyc000064400000002471151735047720027302 0ustar00�
�Reu�@sqdZddlmZddlmZmZddlmZddd�Zdd	�Z	e
d
krme	�ndS)a
Script which takes one or more file paths and reports on their detected
encodings

Example::

    % chardetect somefile someotherfile
    somefile: windows-1252 with confidence 0.5
    someotherfile: ascii with confidence 1.0

If no paths are provided, it takes its input from stdin.

�)�open)�argv�stdin)�UniversalDetectorrcCsit�}x|D]}|j|�qW|j�|j}|dr]d||d|dfSd|SdS)z;Return a string describing the probable encoding of a file.�encodingz%s: %s with confidence %s�
confidencez
%s: no resultN)r�feed�close�result)�file�name�u�liner
�r�K/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/chardetect.py�description_ofs	

	
rcCsott�dkr%ttt��nFxCtdd�D]1}t|d��}tt||��WdQXq6WdS)N��rb)�lenr�printrrr)�path�frrr�main$s
r�__main__N)�__doc__�ior�sysrr�chardet.universaldetectorrrr�__name__rrrr�<module>s	site-packages/pip/_vendor/requests/packages/chardet/__pycache__/langbulgarianmodel.cpython-34.pyc000064400000060426151735047720030750 0ustar00python3.4�
�Re�1�@shd�Zd�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zd�S)������M�Z�c�d�H�m�k�e�O��Q�f�L�^�R�n��l�[�J�w�T�`�o��s�A�E�F�B�?�D�p�g�\���h�_�V�W�G�t���U�]�a�q�����������������������������������������������������������������������i�������������-������ �#�+�%�,�7�/�(�;�!�.�&�$�)��'��"�3�0�1�5�2�6�9�=���C���<�8���	���������
����
������������K�4���*��>�������:��b�������x�N�@�S�y�u�X�z�Y�j�I�P�v�r�ZcharToOrderMapZprecedenceMatrixg! _B�?ZmTypicalPositiveRatioFZkeepEnglishLetterz
ISO-8859-5ZcharsetNamezwindows-1251N(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr(r/r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr>r?r@rArBrCrDrEr�rFrGrHrIrJrKrLrMr�r�r�r�r�r�rWrNrOrPrQrRrSrTrUr�rVrXrYrZr�r�r�r[r\r]r_r`r^r|r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r�r}rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�(r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)ZLatin5_BulgarianCharToOrderMapZwin1251BulgarianCharToOrderMapZBulgarianLangModelZLatin5BulgarianModelZWin1251BulgarianModel�r�r��S/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py�<module>&sV

site-packages/pip/_vendor/requests/packages/chardet/__pycache__/langgreekmodel.cpython-34.pyc000064400000057735151735047720030112 0ustar00python3.4�
�ReT1�@shd�Zd�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zd�S)������R�d�h�^�b�e�t�f�o��u�\�X�q�U�O�v�i�S�C�r�w�_�c�m��H�F�P�Q�<�`�]�Y�D�x�a�M�V�E�7�N�s�A�B�:�L�j�g�W�k�p���Z�J���=�$�.�G�I�6�l�{�n��3�+�)�"�[�(�4�/�,�5�&�1�;�'�#�0��%�!�-�8�2�T�9�y�����|������ �
�����
����	��������*��@�K����ZcharToOrderMapZprecedenceMatrixg���s�?ZmTypicalPositiveRatioFZkeepEnglishLetterz
ISO-8859-7ZcharsetNamezwindows-1253N(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr9r:rrrrrrrrrrr;rrrrrrr<r=r>r?r@rArBrrCrrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r(r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr9r>rrrrrrrrrrr;rrrrrrr<rrr?r@rArBrrCrrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r(r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r(r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjryryrjrjrjrjrjrjrjrjrfrjrjrjr�ryryrjrjr�rjr�rjryr�rjrjrjr�rjr�r�r�ryr�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjrjr�rjrjr�rjryrjrjr�rjryrjrjrjr�r�rjr�rjr�rjrjryr�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�ryrjryryrjrjrjrjrjrjrjrjr�rjrjrjrjr�ryrjrjr�rjrjrjrjryrjrjrjr�ryr�r�r�ryr�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryrjrjryrjrjrjrjrjrjrjrjrjrjrjrjr�ryrfrjrjrjrjryrjrjryrjrjryr�r�r�r�r�ryr�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjr�rjrjrjrjrjrjr�rjrjr�rjrjrjrjrjrjrjrjrjrjr�rjryrjrjr�ryr�rfr�ryr�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�rfr�r�r�r�r�r�r�r�r�rjrjrjrjrjryrjr�r�r�r�rjrjr�rjrfrjrjrjr�rjrjr�rjrjrjrjr�r�r�r�ryr�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjrjr�rjr�rjrjrjrjrjr�rjryryryrjr�ryrjrjrjrjrjryrjrjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjrjrjryryryrjrjrjrjr�rjrfrjrjrjrjryrjrjrjrjrjrjrjryryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjrjryr�rjr�r�r�rjrjryrjrjrjrjrjr�r�rjryrjr�ryrjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�rjrjrjrjr�r�rjrjr�ryrjr�rjr�rjrjrjr�r�rjr�rjr�ryryrjrjr�r�r�r�rfr�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjrjryr�rjryrjrjrjrjr�rjrjrjrjrjr�rjrjryrjryrjrjryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjryrjryrjrjrjrjrjrjr�ryrjryrjryryryrjryrjrjryrjr�ryryryrjr�ryr�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�r�r�rjrjrjryrjrjr�r�rjr�rjr�r�r�rjryr�rjr�rjr�r�ryr�ryr�r�r�r�r�ryr�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjr�rjrjrjrjrjrjr�rjrjr�rjr�r�r�rjrjr�rjrjrjr�r�rfryrjr�rjr�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjrjryr�r�rjryryrjrjr�rjrjrjrjrjryrfrjr�rjryrjrjryrfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjr�ryrjrjrjrjrjrjr�r�rjr�rjr�r�r�rjrjr�rjryrjr�r�rjrjrjr�rjr�r�r�ryr�r�r�r�r�rjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjr�rjrjrjrjrjrjr�r�rjr�rjr�r�r�rjryr�rjryrjr�r�rjryrjr�ryr�r�r�r�r�r�r�r�r�rjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrfryryrjrjrjrjrjrjr�ryrjr�rjr�r�r�rjrjr�rjr�ryr�r�ryrjrfr�ryr�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�rjrjrjrjr�rjr�rjrjryrjr�rjrjrjrjrjrjr�rjrjrjr�ryrjr�r�rjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�rjrjrjr�r�rjr�r�r�rjrjr�rjr�ryrjrjr�r�rjr�rjr�rjrjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�r�r�rjrjrjrjrjrjr�r�rjr�ryr�r�r�rjrjr�rjr�rjr�r�ryr�ryr�r�r�r�r�rfr�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjrjrjr�rjr�ryr�rjryr�rjryrjryrjr�r�rjryrjryrjrjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�r�ryrjrjrjrjrjr�r�r�rjr�ryrfr�r�rjryryryr�rjr�r�ryryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�rjrjrjryr�rjr�rjr�rjrjr�ryrfryrjrjr�r�rjr�rjr�rjrjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryrjrjrjr�rjrjrjrjrjrjr�ryrjr�rjr�r�r�ryrfr�ryryrjr�r�ryryryr�r�r�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�r�ryrjrjrjryrjr�r�rfrjr�ryr�r�r�r�rjr�rfr�ryr�r�rfrfrfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjrjrfr�rjr�r�r�rjryr�rjryrjrjrjr�r�rjr�rjryryryrfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�rjrjrjr�r�rjr�r�r�r�ryr�ryrjrjryryryryrjr�ryr�ryryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjrjrjrjryr�r�r�r�r�r�ryrjr�ryr�ryrjryr�r�rjr�rjr�rjrfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjryrjrjryryrjr�ryr�rjr�r�r�ryr�r�r�r�rfryr�ryr�ryr�r�ryr�ryr�ryryr�r�rfr�ryryryr�ryryryr�ryryryr�r�ryr�r�rfr�r�r�r�r�ryr�rjrjryr�r�r�r�r�r�rfrjr�ryr�ryryryr�r�ryr�rjr�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�ryrjryr�ryryr�ryr�ryryr�ryr�ryryryr�r�r�r�r�r�ryrjr�r�r�ryr�rfryr�r�r�r�ryryr�r�r�ryrfr�ryryr�r�r�r�r�r�rfr�ryr�r�r�r�r�r�r�r�ryrfr�ryrjryryrjryrjryr�r�rjrjrjr�r�rjryr�r�r�rfrfr�ryr�ryryr�ryr�ryr�ryryr�r�ryr�ryryryr�ryryryryr�r�ryr�r�r�ryr�rfr�r�r�r�r�rjr�rjrjryryr�rjr�r�r�ryryr�ryryryrfryr�r�rfryryr�r�rjr�r�r�ryr�rfryr�r�r�rfryr�r�r�r�r�r�r�ryryr�rfr�r�ryr�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryrjrjryryr�r�r�ryr�ryrjrjr�ryr�r�r�r�r�r�ryryryr�ryryr�ryr�ryr�ryryr�r�ryryryryrfr�r�ryryr�ryr�r�ryr�r�r�r�r�r�ryr�r�r�r�r�r�r�ryr�rjryrjr�r�r�rjr�r�ryryr�ryr�ryryryr�r�ryr�r�r�r�r�r�r�r�ryr�r�ryryr�r�ryryryr�r�r�r�r�r�ryr�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�r�rjryr�ryryryryryr�r�r�ryr�r�r�r�ryr�rfr�r�ryr�rfr�r�r�r�ryryryr�ryryr�rfryr�ryryryr�ryryryryrfryryr�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�rfr�r�r�r�r�r�r�r�r�ryr�ryr�ryryr�r�r�r�rfryrfr�r�ryryr�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�rjryrjr�r�ryr�r�r�ryryr�ryr�r�r�rfr�r�ryr�ryr�ryryr�r�r�r�r�r�ryr�r�r�r�ryryr�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�ryryrjryryr�r�r�r�r�r�rfrjr�ryr�ryryr�r�r�rfr�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�ryr�rjryr�ryr�r�r�r�r�r�ryryr�r�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�ryr�r�r�r�rfrfr�r�ryrfryr�ryryr�rfr�r�rfr�r�r�ryr�r�r�r�r�r�r�rjr�ryryryr�r�ryr�r�r�ryr�r�r�ryrjr�ryr�r�r�r�r�r�ryryr�r�r�ryr�rfryr�r�r�rfryryrfr�r�r�ryr�r�ryr�r�r�r�r�r�r�r�rfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rjr�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryrfryr�ryryr�ryr�r�ryr�r�r�r�rfryrfr�ryrfr�r�r�r�r�r�r�r�r�r�r�r�ryr�r�r�rjrfryryr�ryr�r�r�r�ryr�r�r�ryr�r�rjr�r�r�r�ryryryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryrfr�ryr�rfryr�r�r�r�r�r�r�r�r�r�r�r�r�ryr�r�rfr�r�r�r�r�r�ryr�ryryr�r�ryryryryryr�rfryr�r�r�ryryr�rfr�ryr�r�ryryr�r�r�r�r�r�r�r�r�r�rfr�r�r�r�r�r�r�rjr�r�ryr�r�r�r�r�r�r�r�ryr�ryr�r�r�r�ryr�rfryr�r�r�r�ryryrfr�rfr�rfr�ryryryrfr�r�r�r�r�r�rfr�r�r�r�r�r�r�ryr�rfryr�r�r�r�r�r�r�r�r�r�ryr�r�ryryr�r�r�r�rfr�r�r�r�r�r�ryr�ryryr�r�r�r�ryryr�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�ryr�r�ryr�r�r�r�ryryryryr�r�r�rjr�r�r�r�r�r�r�r�ryr�r�r�r�r�r�ryr�r�r�r�r�r�rfr�r�ryr�r�r�r�rfryr�r�r�r�r�r�ryryrfrfr�r�r�r�r�r�rfr�r�r�r�r�r�r�ryr�ryryryr�r�ryr�r�r�r�r�r�r�ryryryr�r�r�ryr�r�r�r�r�r�r�r�ryr�r�rfr�r�r�r�ryrfr�r�r�r�r�r�rfr�r�r�r�r�rfr�r�r�r�r�r�r�r�r�r�r�rjr�ryr�r�r�r�r�r�r�r�ryr�r�r�r�r�ryr�r�r�r�r�r�r�ryr�r�r�r�ryr�r�ryr�r�r�r�ryryr�r�r�r�rfr�r�rfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�ryryrfr�r�r�r�r�r�ryr�r�ryr�ryryryr�r�r�r�r�r�ryr�r�r�r�ryr�r�ryr�r�ryr�ryryr�r�r�r�ryr�ryr�r�r�r�r�ryr�r�r�ryr�r�r�r�r�r�r�r�rjr�r�r�ryryr�ryryr�r�r�r�r�ryr�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�r�r�r�rfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�r�ryr�r�r�r�r�r�ryryryryryr�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�rfrfr�r�r�rfr�r�r�r�r�r�r�ryrfr�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ryryr�r�r�r�r�ryr�r�r�r�r�r�r�r�rfr�r�r�r�r�r�r�r�r�ryr�r�r�ryr�r�r�r�r�rfr�r�r�r�ryryr�r�r�rfr�r�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�r�r�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�rfr�ryr�r�r�r�ryr�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�r�r�rfrfr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�r�r�r�r�r�r�r�r�r�r�r�rfr�r�r�r�rfr�r�ryr�ryr�r�r�r�r�r�r�r�r�r�r�ryrfr�r�r�r�r�r�ryr�r�r�rfryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)ZLatin7_CharToOrderMapZwin1253_CharToOrderMapZGreekLangModelZLatin7GreekModelZWin1253GreekModel�r�r��O/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/langgreekmodel.py�<module>#sV

site-packages/pip/_vendor/requests/packages/chardet/__pycache__/langhungarianmodel.cpython-34.pyc000064400000060407151735047730030760 0ustar00python3.4�
�Re�0�@shd�Zd�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zied�6ed�6d�d�6d�d�6d�d�6Zd�S)�������(�6�-� �2�1�&�'�5�$�)�"�#�/�.�G�+�!�%�9�0�@�D�7�4���������	����
����C�
�����A�>����������������������������������������������K�����������������O���������������������������������3�Q���N���������,�������=�����������:���B�;�������<�E�?�������R��J���F�P���H����S�M�T��L�U�����I�*������8���V�W�ZcharToOrderMapZprecedenceMatrixg��(��P�?ZmTypicalPositiveRatioTZkeepEnglishLetterz
ISO-8859-2ZcharsetNamezwindows-1250N(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrr�rrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNr}rOr�rPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r�rarbrcrdrerfrgrhr{rjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr�r|r�r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r`r�rr�r�r�r�r�r�rir�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr(r�r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r#r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2rr2r2r2r2r2r2r2r2rrr2r2r#r#rrrrrr#rr2rrr2r2r2r2r2rr2r2r2r2r2r2r#rr2r2r2r2rr2r2r#r#r2r2r�r#r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r2rr#r2r2r2r2r2rr2r2r2r2r2r#r#rr2r2r2r2r2r2r2r#r#r2rr�r#r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r2r2r2r2r2r2r2r2r2r2r2r#r#rr2r2r2r#r2r2r2r2r2r#r2r2rrr�r2rr2r�r�r�r�r�r�r�r�r�r�r2r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r2r2r2r2r2r2rr2r2r2rr2r2rr2r2r2r2r2rr2r2rrr2rr2rr�r2rrr�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r#r�r2r2r2r2r2r2rr2r2r2r2r2rr2r2r2r#rr2rrr2r#rr2r2rrr�r2r2r2r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r2r2r2r2r2r2r2r2r2rrr2r2r2r2r2r2rr2r2r2r2rr2r2r2r2r�rr2rr�r�r�r#r#r�r�r�r�r�r2r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r2r2r2r2r2r2r2r2r2r2r#r#r#r2r2rr#r2rrr2rr#r2rrr#r�r2r2r#r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2rrr2r2r2r2r2r#rr2r2r2r2r#rr#r2r2r2r2rrr2r#r#r2rr�r#r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r2r2r2r2r2r2r2r2rrr2r2r2r2r2rr#r2r2r2r2r2rrr#r2r2r2r�r#r#rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r#r�r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2r2rr2r2r2rr2r2rr2r2r2rr�r2rr2r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r#r�r2r2r2r2r2r2rr2r2r2rr2rr2r2r2r#r2rrrr2r#r#r2r2r#r#r�r2r2rr�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r2r2r2r2r2r2rr2r2r2rr2rr2r2r2rr2r2r2r2r2r#rr2rrr�rrrr�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r2r2rrrr2r#r2r2rrr#r2r2r2r#r#r2r#rr2rr2rrrr#r�rrrr�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r2r#r#r2r2r2r2r2r#rr2r2r2r2r#rr#r2r2r2rrr2rr#r�r2rr�r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r2r#r#r2r2r2r2r2r#rr2r2r2r2r#r#r�r2r2r2r2r�rr2r�r�rr#r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r2r2r2r2r2r2rrr2r2rrrrr2r2r�r#rr2rr2rrr2rr#rr�rrrr�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r2r2r2r2r2r2r#rr2r2r2rr#rr2r2rrrr2rr2r2r#r2r2r#r#r�rr2rr�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r2r2r#rrrrr2r2r2r#r#r#r2r2r#r#r2r#r#r2rr#rr2r#r#r�rrrr�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r2r2rr#rr#r#r2r2r#r#r#r#r2r2r#r#rrr#rr#r#rrr#r#r�rrr#r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r2r2r#r#rr#r#r2r2r#r�r#r#r2r2rr�r#r#rr2r#r�rrr#r�r�r#r2rr�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2rr#r2r2r2r2r2r#rr2rr2r2rr#r#r2rr2rr#rrr�r#rr#r�r�r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r2r2r2r2rrrrr2r#rrr#r#r2r2r�r2rr#rr2rr#r2r2r#r#r�rr#r2r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r2r2rrrr2rr2r2r2rr#r#r2r2r#r#r#rrr2rr2rrrr#r�rrr#r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r#r�r�r2r2r2r2r2r�r�r2r2rr2r�r�r�rr2r2r#r�r#rr�r�r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r2r#rr2r2r2r2r2r#rr2r2rrr#r#r�r2r2rrr#rrr#r�rrr�r#r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r2r2rrr#r2r#rr2r2rrr#r#rrr#r#r#r#r2rr#r#r#r#rr#r�r#rr#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r#r�r�r�r�r�r�r�r�r�rr2r2r#r#r#r#r#r2r2r2r�r#r#r2r2r#r#r#r#r#rrr�r2r#r#rr�rr#r#r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r�r2r#r�r#rr#rrr�r#rr2r#rr�r�r�rr#r#r#r#r#rr�r�r#r#r�r�r�r�r#rr#rrrr#rr#rr�rr�rrr#r#rr#r#rr#r#r#r�r#r�r�r�r#r#r�r#r#r#rr2rr2r2r�r#rrr2r#r�r#r�rr#rrr�r#r#r�r�r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r2r2rrr#r�r�r2rr2rr�r�r�r#r#r2r�r�r#r#r�r�rr#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r2r#r#rrr2r2r#r�r#r2rr2r#r#r#r�r#r#r#r#r#r2r#r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r2r#r#r#rrrr#r�r#rr2r2rr�r�r�rr#r#r#rr#r#r#r�r#r#r#r�r�r�r#rrrrrr#r#r#rr�rr#r#r#r#r#rr#r#r#r#r#r#r�r#r#r#r�r�r#r#r2rrr#r�r�r#r#rrr�r2r�r#rr#r#r�r�r#r#r#r�r#r#r#r#r�rr#r#r#rrr#r#r#rr#rr#r#r#r#r#r#r#rr#r#r#rr2r#r#r#r#r#r#r#r#r#r�r#rr2r2r�r#r�r�r�r2r2r#r�r�r#rrr#r�r�r�r�rr�r�r#r#r#r�rr#r#r#rr#r#r#r#r#r#rr#r#r�r#r#r�r#r#r#r�r#rr#r#r�r#r#r#r#r#r#r#r�r#rr2r2r�r#r�r�r�rrr�r�r�r�r#rrr�r�r�r�r#r�r�r#r#r�r�rr�r#r�rr#r#r#r#rr#r#r#r#r#r#r#rr#r#r#r#r#r#r#r#r#rr�r#r#r#r#r#r�r#r2rrr�r#r�r#r�rr2rr�r�r#rrr#r�r�r#r#r#r�r�rr#r�r#rrr#r#rr#r#r#r#r#r#rr#r#r#r#r#r#r�rr#r�r#r#r�r#r#r#r�r#r#rr#r#r�r#rrrr�r�r#r�r�rrr#r#r�r�rr#r#r�r�r�r#rr�r�rr#r�r�rr#r#r#rr#r#r#r#rr#rr#r#r#rrr#r#rr#r#r#rr#r#r#r#r#r#r#r#r#r#r�r#r#rr2r�r�r�r#r�r2rr#r�r�r#rr#r#r�r�r�r�rr#r�r#r#r�r�rr#rr#r#r#r�r�r�r#r�r#r#r#r#r#rr�r�r#r�r�r�rr�r�r#r#r#r#r#r#r#r#r�r#r2r�r�rr#rrr#r�r�rr#rrr�r�r�rr#r#r#r�r#r#r�r�r#r#rr�r�r�r#rr#rrr#r#rr#rr�r#r#r#r#r#r#r#r#r#rr#r#r�r�r#r#r#r#r�r�r#r#r2rr�r�r�r#r�rrrr�r�r�rrr#r�r�r�r�r2r#r#r#r#r�r�rr#r#r#rr#r�r#r#r#r�r#r#r#r#r#r#r#r�rr#r�r�r#r�r#r#r�r#r#r#r#r#r#r�r#rr2rr�r�r�r#r�rrr�r�r�r�rr#r#r�r�r�r�rr#r�r#r#r�r�rr#r#r�rr#r#r#r#rr#rr#rr�r#r#r#r�rr#r#r#rr#r#r#r#r�r#r#r#r#r#r�r#r2r#r#rrrr2rr#r#rrr#r#r�r#r�rrr#r#r#r#r#r�r�r#r#r�r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr�r�r�r�r�rrr�r�r�r�rrr#r�r�r�r#r#r�r�r#rr�r�rr#r#r#rrr#r#r#rr#rr#r#r�r#r#r#r#rr#r#r#rr#r#r#r#r�r#rr#r#r#r�r#r#r�r�r#rr2rr#r�r�rr�r#r#r�r�r�r#r#r#r#r�r#r#r�r�r#r�r�r�r�r�r#rr#rr#rr#r#r#rr�rr#r#r#r�r#rr�r�r#r#r#r�r�r�r�r�r�r�r�r�rr2rr�r�r�r�r�r#r#rr#r�r�r#r#r#r�r�r�r�rr�r�r#r#r�r�rr#r#r#rr#r#r#r#r#r#rr#r�r#r#r#r#r�rr#r#r#r#r#r#r�r#r�r#r#r#r#r#r�r#r#rrr�r#r#r#r�rrrr�r�r�r2rr#r�r�r�r#r#r�r�r#r#r�r#r#r#r�r�r#r#r�r#r#r#r#r#r#r#r#rr#r#r#r#r#r#r#rr#r#r#r�r�r#r#r#r�r#r�r#rr#r�rr#r#rrr#r#rr#r#r#r�r�r�r#r#r�r#r#r#r#r�r�r#r#r#r�r�r�r#rrrrrr#r#r#rr�rr#r#r#r#r#r#r#r#r#r#r#r#r�r#r#r�r�r�r#r�r#rr2r�r�r�r#r�rrr�r�r�r�rrr�r�r�r�r�r#r�r�r#r�r�r�rr�r#r�rr#r#r#r#r#r�rr�r�r�r#rr#r#r#r#r�r#rr�r#r�r#r�r#r#r#r�r#r�r#rrrr�r�r�r#r�rr#rr�r�r�r#r#rr�r�r�r�r#r�r�r#r#r�r�rr#r�r#rr#r#r#r#r#r#r#r#r#r#r#r#r#r#r#r#r#r#r#r#r#r#rr�r#r#r#r#r#r�r#r#rrr�r�r�r#r�rrrr�r�r�r#r#r�r�r�r�r�r#r#r�rr�r�r#r#r#r�r#r#r�r#r#r#r#r#r#r�r#r#r#r#r�r�r#r�r�r#r#r�r#r�r#r#r#r#r#r�r�r�r#r#r�r�r#r�r#rr#r�r�r#r#r#rr�r�r�r#r#r�r#r�r#r#r�r�r#r�r�r�r�r�r�rr#rr#r#r#r#r#rr�rr�r#r#r�r#rr#r�r#r#r#r�r�r�r�r�r�r#r�r�rr#r#r�r#rr�r�r#r#r#r�r�r�r#r#r�r�r�r�r�r#r�r�r#r�r�r�rr#r�r#rrr#r#r#r#r#rr#r#r�r#r#r#r#rr#r#r#rr#r#r�r#r�r#r#r#r#r#r�r#r#rrr�r�r�r�r�r#r#r�r�r�r�rr#r�r�r�r�r�rr�r�rrr�r�rr�r�r#rr#r#r#r#r#r#r#r�r#r#r�r#r#r�r#r�r�r�r#r#r#r#r�r�r#r#r#r#r�r�r#r#r#rr�r�r2r#r�rr#r#r#r�r�r#r#r#r�r�r�r#r#r�r�r�r#r�r�r#r�r#r�r#rr#r�r#r#r#rr#r#r�r#r#r#r#r#r�r�r�r#r#r#r#r#r�r#r�r�r�r#r�r�rr#r#r�r�r�r�r�r#r�r�r�r�r�r�r�r�r#r�r#r�r�r�r#r�r�r�r�rr�r�r�rr#r#r#r#r#r#r#r#r#r�r#r#r#r#r#r#r#r#r#rr#r#r�r�r#r#r#r#r#r�r#rr#r#r#rr#r#r#r�r#r#rr#r�r�r�r�r#r#r#r#r�r#r�r�r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r#r�r#r#r#r#r#r�r�r#r#rr#r�r�r�r#r#r�r�r�r#r#r�r�r#r�r#r�r�r�r#rr#r#r#r#r#r#r#r#r�r#r�r#r#r#r#r#r#r�r#r#r#r�r�r�r�r�r�r#r�r�rr�r�r�r#r#r#r#r�r�r#r#r�r�r�r�r�r#r#r#rr�r�r#r�r�r#r�r#r�r�r�r�r#r#r#r#r#r#r#r#rr�r#r#r#r#r�r#r#r#r�r#r#r#r�r�r�r�r�r�r�r�r�r#r�r�r#r#r#r#r#r�r�rr#r�r#r�r�r�r#r�r#r�r�r�r�r�r�r#r�r�r�r�r�r�r#r#r#r#r#r#r�r#r#r�r#r�r#r#r�r#r#r�r�r#r#r#r�r�r�r�r�r�r�r�r�r#r�r�r#r#r#r�r�r�r�r#r�rr�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r#r#r#r#r#r�r�r#r#r�r#r�r#r�r�r#r#r#r�r#r#r#r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r�r�r�r#r#rr#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r#r#r�r#r�r�r#r#r�r#r�r#r#r�r#r#r#r�r#r#r#r�r�r�r�r�r�r�r�r�rr#r#r#r#r#r#r#r#r#r#r�r�r#r#r#r�r�r#r�r�r#r�r#r�r#r#r#r�r�r#r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r�r�r#r#r#r#r�r�r�r#r#r#r�r�r�r�r#r#r#r�r�r�r�r�r�r�r�r�r�r�r�r�r#r#r#r#r#r#r�r#r#r�r#r�r#r�r�r#r#r�r�r#r#r�r�r�r�r�r�r�r�r�r�)ZLatin2_HungarianCharToOrderMapZwin1250HungarianCharToOrderMapZHungarianLangModelZLatin2HungarianModelZWin1250HungarianModel�r�r��S/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/langhungarianmodel.py�<module>#sV

python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/escprober.cpython-34.pyc000064400000004021151735047730027152 0ustar00�
�Res�@s|ddlmZddlmZmZmZmZddlmZddl	m
Z
ddlmZGdd�de�Z
dS)	�)�	constants)�	HZSMModel�ISO2022CNSMModel�ISO2022JPSMModel�ISO2022KRSMModel)�
CharSetProber)�CodingStateMachine)�wrap_ordc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�EscCharSetProbercCsHtj|�tt�tt�tt�tt�g|_|j�dS)N)	r�__init__rrrrr�
_mCodingSM�reset)�self�r�J/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/escprober.pyr%s
			zEscCharSetProber.__init__cCs_tj|�x0|jD]%}|s)qnd|_|j�qWt|j�|_d|_dS)NT)rr
r�active�len�
_mActiveSM�_mDetectedCharset)r�codingSMrrrr
/s
	zEscCharSetProber.resetcCs|jS)N)r)rrrr�get_charset_name9sz!EscCharSetProber.get_charset_namecCs|jr
dSdSdS)Ng�G�z��?g)r)rrrr�get_confidence<s	zEscCharSetProber.get_confidencecCs�x�|D]�}x�|jD]�}|s)qn|js8qn|jt|��}|tjkr�d|_|jd8_|jdkr�tj|_|j	�Sq|tj
krtj|_|j�|_
|j	�SqWqW|j	�S)NFr�)rrZ
next_stater	rZeErrorrZeNotMeZ_mStateZ	get_stateZeItsMeZeFoundItZget_coding_state_machiner)r�aBuf�crZcodingStaterrr�feedBs$
		
zEscCharSetProber.feedN)�__name__�
__module__�__qualname__rr
rrrrrrrr
$s


r
N)�rZescsmrrrrZ
charsetproberrZcodingstatemachiner�compatr	r
rrrr�<module>s
"site-packages/pip/_vendor/requests/packages/chardet/__pycache__/mbcharsetprober.cpython-34.pyc000064400000004115151735047730030275 0ustar00python3.4�
�Re��@sFddlZddlmZddlmZGdd�de�ZdS)�N�)�	constants)�
CharSetProberc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�MultiByteCharSetProbercCs2tj|�d|_d|_ddg|_dS)Nr)r�__init__�_mDistributionAnalyzer�
_mCodingSM�
_mLastChar)�self�r�P/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyr$s
		zMultiByteCharSetProber.__init__cCsRtj|�|jr&|jj�n|jr?|jj�nddg|_dS)Nr)r�resetrrr	)r
rrrr
*s
		zMultiByteCharSetProber.resetcCsdS)Nr)r
rrr�get_charset_name2sz'MultiByteCharSetProber.get_charset_namecCs�t|�}xtd|�D]
}|jj||�}|tjkr�tjr{tjj	|j
�dt|�d�ntj|_
Pq|tjkr�tj|_
Pq|tjkr|jj�}|dkr�|d|jd<|jj|j|�q&|jj||d|d�|�qqW||d|jd<|j�tjkr�|jj�r�|j�tjkr�tj|_
q�n|j�S)Nrz prober hit error at byte �
r)�len�rangerZ
next_staterZeError�_debug�sys�stderr�writer�strZeNotMeZ_mStateZeItsMeZeFoundItZeStartZget_current_charlenr	r�feedZ	get_stateZ
eDetectingZgot_enough_data�get_confidenceZSHORTCUT_THRESHOLD)r
�aBufZaLen�iZcodingStateZcharLenrrrr5s2		"zMultiByteCharSetProber.feedcCs
|jj�S)N)rr)r
rrrrUsz%MultiByteCharSetProber.get_confidenceN)�__name__�
__module__�__qualname__rr
rrrrrrrr#s
 r)r�rZ
charsetproberrrrrrr�<module>spython3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/sjisprober.cpython-34.pyc000064400000004622151735047730027357 0ustar00�
�Re��@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZGd	d
�d
e�Z
dS)�N�)�MultiByteCharSetProber)�CodingStateMachine)�SJISDistributionAnalysis)�SJISContextAnalysis)�SJISSMModel)�	constantsc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�
SJISProbercCsBtj|�tt�|_t�|_t�|_|j	�dS)N)
r�__init__rr�
_mCodingSMr�_mDistributionAnalyzerr�_mContextAnalyzer�reset)�self�r�K/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/sjisprober.pyr
&s

zSJISProber.__init__cCstj|�|jj�dS)N)rrr
)rrrrr-s
zSJISProber.resetcCsdS)NZ	SHIFT_JISr)rrrr�get_charset_name1szSJISProber.get_charset_namecCs�t|�}xltd|�D][}|jj||�}|tjkr�tjr{tjj	|j
�dt|�d�ntj|_
Pq|tjkr�tj|_
Pq|tjkr|jj�}|dkr"|d|jd<|jj|jd|d�|�|jj|j|�qw|jj||d||d|�|�|jj||d|d�|�qqW||d|jd<|j�tjkr�|jj�r�|j�tjkr�tj|_
q�n|j�S)Nrz prober hit error at byte �
r��)�len�rangerZ
next_staterZeError�_debug�sys�stderr�writer�strZeNotMeZ_mStateZeItsMeZeFoundItZeStartZget_current_charlenZ
_mLastCharr
�feedrZ	get_stateZ
eDetectingZgot_enough_data�get_confidenceZSHORTCUT_THRESHOLD)r�aBufZaLen�iZcodingStateZcharLenrrrr4s:		"zSJISProber.feedcCs+|jj�}|jj�}t||�S)N)r
rr�max)rZcontxtCfZ	distribCfrrrrXszSJISProber.get_confidenceN)�__name__�
__module__�__qualname__r
rrrrrrrrr	%s
$r	)rZmbcharsetproberrZcodingstatemachinerZchardistributionrZjpcntxrZmbcssmr�rr	rrrr�<module>spython3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/big5freq.cpython-34.pyc000064400000336174151735047740026714 0ustar00�
�Re�B��6@sգdZdZdddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d	d	d	d	d	d	d	d	d	d		d
	d	d	d
	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d	d 	d!	d"	d#	d$	d%	d&	d'	d(	d)	d*	d+	d,	d-	d.	d/	d0	d1	d2	d3	d4	d5	d6	d7	d8	d9	d:	d;	d<	d=	d>	d?	d@	dA	dB	dC	dD	dE	dF	dG	dH	dI	dJ	dK	dL	dM	dN	dO	dP	dQ	dR	dS	dT	dU	dV	dW	dX	dY	dZ	d[	d\	d]	d^	d_	d`	da	db	dc	dd	de	df	dg	dh	di	dj	dk	dl	dm	dn	do	dp	dq	dr	ds	dt	du	dv	dw	dx	dy	dz	d{	d|	d}	d~	d	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d�	d
d
d
d
d
d
d
d
d
d	
d

d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d 
d!
d"
d#
d$
d%
d&
d'
d(
d)
d*
d+
d,
d-
d.
d/
d0
d1
d2
d3
d4
d5
d6
d7
d8
d9
d:
d;
d<
d=
d>
d?
d@
dA
dB
dC
dD
dE
dF
dG
dH
dI
dJ
dK
dL
dM
dN
dO
dP
dQ
dR
dS
dT
dU
dV
dW
dX
dY
dZ
d[
d\
d]
d^
d_
d`
da
db
dc
dd
de
df
dg
dh
di
dj
dk
dl
dm
dn
do
dp
dq
dr
ds
dt
du
dv
dw
dx
dy
dz
d{
d|
d}
d~
d
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�ddddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d
d
d
d
d
d
d
d
d
d	
d

d
d
d

d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d 
d!
d"
d#
d$
d%
d&
d'
d(
d)
d*
d+
d,
d-
d.
d/
d0
d1
d2
d3
d4
d5
d6
d7
d8
d9
d:
d;
d<
d=
d>
d?
d@
dA
dB
dC
dD
dE
dF
dG
dH
dI
dJ
dK
dL
dM
dN
dO
dP
dQ
dR
dS
dT
dU
dV
dW
dX
dY
dZ
d[
d\
d]
d^
d_
d`
da
db
dc
dd
de
df
dg
dh
di
dj
dk
dl
dm
dn
do
dp
dq
dr
ds
dt
du
dv
dw
dx
dy
dz
d{
d|
d}
d~
d
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
d�
dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d d d d d d d d d d	 d
 d d d
 d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; d< d= d> d? d@ dA dB dC dD dE dF dG dH dI dJ dK dL dM dN dO dP dQ dR dS dT dU dV dW dX dY dZ d[ d\ d] d^ d_ d` da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz d{ d| d} d~ d d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d!d!d!d!d!d!d!d!d!d	!d
!d!d!d
!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d !d!!d"!d#!d$!d%!d&!d'!d(!d)!d*!d+!d,!d-!d.!d/!d0!d1!d2!d3!d4!d5!d6!d7!d8!d9!d:!d;!d<!d=!d>!d?!d@!dA!dB!dC!dD!dE!dF!dG!dH!dI!dJ!dK!dL!dM!dN!dO!dP!dQ!dR!dS!dT!dU!dV!dW!dX!dY!dZ!d[!d\!d]!d^!d_!d`!da!db!dc!dd!de!df!dg!dh!di!dj!dk!dl!dm!dn!do!dp!dq!dr!ds!dt!du!dv!dw!dx!dy!dz!d{!d|!d}!d~!d!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d�!d"d"d"d"d"d"d"d"d"d	"d
"d"d"d
"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d"d "d!"d""d#"d$"d%"d&"d'"d("d)"d*"d+"d,"d-"d."d/"d0"d1"d2"d3"d4"d5"d6"d7"d8"d9"d:"d;"d<"d="d>"d?"d@"dA"dB"dC"dD"dE"dF"dG"dH"dI"dJ"dK"dL"dM"dN"dO"dP"dQ"dR"dS"dT"dU"dV"dW"dX"dY"dZ"d["d\"d]"d^"d_"d`"da"db"dc"dd"de"df"dg"dh"di"dj"dk"dl"dm"dn"do"dp"dq"dr"ds"dt"du"dv"dw"dx"dy"dz"d{"d|"d}"d~"d"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d�"d#d#d#d#d#d#d#d#d#d	#d
#d#d#d
#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d#d #d!#d"#d##d$#d%#d&#d'#d(#d)#d*#d+#d,#d-#d.#d/#d0#d1#d2#d3#d4#d5#d6#d7#d8#d9#d:#d;#d<#d=#d>#d?#d@#dA#dB#dC#dD#dE#dF#dG#dH#dI#dJ#dK#dL#dM#dN#dO#dP#dQ#dR#dS#dT#dU#dV#dW#dX#dY#dZ#d[#d\#d]#d^#d_#d`#da#db#dc#dd#de#df#dg#dh#di#dj#dk#dl#dm#dn#do#dp#dq#dr#ds#dt#du#dv#dw#dx#dy#dz#d{#d|#d}#d~#d#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d�#d$d$d$d$d$d$d$d$d$d	$d
$d$d$d
$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d$d $d!$d"$d#$d$$d%$d&$d'$d($d)$d*$d+$d,$d-$d.$d/$d0$d1$d2$d3$d4$d5$d6$d7$d8$d9$d:$d;$d<$d=$d>$d?$d@$dA$dB$dC$dD$dE$dF$dG$dH$dI$dJ$dK$dL$dM$dN$dO$dP$dQ$dR$dS$dT$dU$dV$dW$dX$dY$dZ$d[$d\$d]$d^$d_$d`$da$db$dc$dd$de$df$dg$dh$di$dj$dk$dl$dm$dn$do$dp$dq$dr$ds$dt$du$dv$dw$dx$dy$dz$d{$d|$d}$d~$d$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d�$d%d%d%d%d%d%d%d%d%d	%d
%d%d%d
%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d %d!%d"%d#%d$%d%%d&%d'%d(%d)%d*%d+%d,%d-%d.%d/%d0%d1%d2%d3%d4%d5%d6%d7%d8%d9%d:%d;%d<%d=%d>%d?%d@%dA%dB%dC%dD%dE%dF%dG%dH%dI%dJ%dK%dL%dM%dN%dO%dP%dQ%dR%dS%dT%dU%dV%dW%dX%dY%dZ%d[%d\%d]%d^%d_%d`%da%db%dc%dd%de%df%dg%dh%di%dj%dk%dl%dm%dn%do%dp%dq%dr%ds%dt%du%dv%dw%dx%dy%dz%d{%d|%d}%d~%d%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d�%d&d&d&d&d&d&d&d&d&d	&d
&d&d&d
&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d&d &d!&d"&d#&d$&d%&d&&d'&d(&d)&d*&d+&d,&d-&d.&d/&d0&d1&d2&d3&d4&d5&d6&d7&d8&d9&d:&d;&d<&d=&d>&d?&d@&dA&dB&dC&dD&dE&dF&dG&dH&dI&dJ&dK&dL&dM&dN&dO&dP&dQ&dR&dS&dT&dU&dV&dW&dX&dY&dZ&d[&d\&d]&d^&d_&d`&da&db&dc&dd&de&df&dg&dh&di&dj&dk&dl&dm&dn&do&dp&dq&dr&ds&dt&du&dv&dw&dx&dy&dz&d{&d|&d}&d~&d&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d�&d'd'd'd'd'd'd'd'd'd	'd
'd'd'd
'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd'd 'd!'d"'d#'d$'d%'d&'d''d('d)'d*'d+'d,'d-'d.'d/'d0'd1'd2'd3'd4'd5'd6'd7'd8'd9'd:'d;'d<'d='d>'d?'d@'dA'dB'dC'dD'dE'dF'dG'dH'dI'dJ'dK'dL'dM'dN'dO'dP'dQ'dR'dS'dT'dU'dV'dW'dX'dY'dZ'd['d\'d]'d^'d_'d`'da'db'dc'dd'de'df'dg'dh'di'dj'dk'dl'dm'dn'do'dp'dq'dr'ds'dt'du'dv'dw'dx'dy'dz'd{'d|'d}'d~'d'd�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d�'d(d(d(d(d(d(d(d(d(d	(d
(d(d(d
(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d (d!(d"(d#(d$(d%(d&(d'(d((d)(d*(d+(d,(d-(d.(d/(d0(d1(d2(d3(d4(d5(d6(d7(d8(d9(d:(d;(d<(d=(d>(d?(d@(dA(dB(dC(dD(dE(dF(dG(dH(dI(dJ(dK(dL(dM(dN(dO(dP(dQ(dR(dS(dT(dU(dV(dW(dX(dY(dZ(d[(d\(d](d^(d_(d`(da(db(dc(dd(de(df(dg(dh(di(dj(dk(dl(dm(dn(do(dp(dq(dr(ds(dt(du(dv(dw(dx(dy(dz(d{(d|(d}(d~(d(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d�(d)d)d)d)d)d)d)d)d)d	)d
)d)d)d
)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d)d )d!)d")d#)d$)d%)d&)d')d()d))d*)d+)d,)d-)d.)d/)d0)d1)d2)d3)d4)d5)d6)d7)d8)d9)d:)d;)d<)d=)d>)d?)d@)dA)dB)dC)dD)dE)dF)dG)dH)dI)dJ)dK)dL)dM)dN)dO)dP)dQ)dR)dS)dT)dU)dV)dW)dX)dY)dZ)d[)d\)d])d^)d_)d`)da)db)dc)dd)de)df)dg)dh)di)dj)dk)dl)dm)dn)do)dp)dq)dr)ds)dt)du)dv)dw)dx)dy)dz)d{)d|)d})d~)d)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d�)d*d*d*d*d*d*d*d*d*d	*d
*d*d*d
*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d *d!*d"*d#*d$*d%*d&*d'*d(*d)*d**d+*d,*d-*d.*d/*d0*d1*d2*d3*d4*d5*d6*d7*d8*d9*d:*d;*d<*d=*d>*d?*d@*dA*dB*dC*dD*dE*dF*dG*dH*dI*dJ*dK*dL*dM*dN*dO*dP*dQ*dR*dS*dT*dU*dV*dW*dX*dY*dZ*d[*d\*d]*d^*d_*d`*da*db*dc*dd*de*df*dg*dh*di*dj*dk*dl*dm*dn*do*dp*dq*dr*ds*dt*du*dv*dw*dx*dy*dz*d{*d|*d}*d~*d*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d�*d+d+d+d+d+d+d+d+d+d	+d
+d+d+d
+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d +d!+d"+d#+d$+d%+d&+d'+d(+d)+d*+d++d,+d-+d.+d/+d0+d1+d2+d3+d4+d5+d6+d7+d8+d9+d:+d;+d<+d=+d>+d?+d@+dA+dB+dC+dD+dE+dF+dG+dH+dI+dJ+dK+dL+dM+dN+dO+dP+dQ+dR+dS+dT+dU+dV+dW+dX+dY+dZ+d[+d\+d]+d^+d_+d`+da+db+dc+dd+de+df+dg+dh+di+dj+dk+dl+dm+dn+do+dp+dq+dr+ds+dt+du+dv+dw+dx+dy+dz+d{+d|+d}+d~+d+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d�+d,d,d,d,d,d,d,d,d,d	,d
,d,d,d
,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d ,d!,d",d#,d$,d%,d&,d',d(,d),d*,d+,d,,d-,d.,d/,d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,d:,d;,d<,d=,d>,d?,d@,dA,dB,dC,dD,dE,dF,dG,dH,dI,dJ,dK,dL,dM,dN,dO,dP,dQ,dR,dS,dT,dU,dV,dW,dX,dY,dZ,d[,d\,d],d^,d_,d`,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,do,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,d{,d|,d},d~,d,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d�,d-d-d-d-d-d-d-d-d-d	-d
-d-d-d
-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d-d -d!-d"-d#-d$-d%-d&-d'-d(-d)-d*-d+-d,-d--d.-d/-d0-d1-d2-d3-d4-d5-d6-d7-d8-d9-d:-d;-d<-d=-d>-d?-d@-dA-dB-dC-dD-dE-dF-dG-dH-dI-dJ-dK-dL-dM-dN-dO-dP-dQ-dR-dS-dT-dU-dV-dW-dX-dY-dZ-d[-d\-d]-d^-d_-d`-da-db-dc-dd-de-df-dg-dh-di-dj-dk-dl-dm-dn-do-dp-dq-dr-ds-dt-du-dv-dw-dx-dy-dz-d{-d|-d}-d~-d-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d�-d.d.d.d.d.d.d.d.d.d	.d
.d.d.d
.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d .d!.d".d#.d$.d%.d&.d'.d(.d).d*.d+.d,.d-.d..d/.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.d:.d;.d<.d=.d>.d?.d@.dA.dB.dC.dD.dE.dF.dG.dH.dI.dJ.dK.dL.dM.dN.dO.dP.dQ.dR.dS.dT.dU.dV.dW.dX.dY.dZ.d[.d\.d].d^.d_.d`.da.db.dc.dd.de.df.dg.dh.di.dj.dk.dl.dm.dn.do.dp.dq.dr.ds.dt.du.dv.dw.dx.dy.dz.d{.d|.d}.d~.d.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d�.d/d/d/d/d/d/d/d/d/d	/d
/d/d/d
/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d/d /d!/d"/d#/d$/d%/d&/d'/d(/d)/d*/d+/d,/d-/d./d//d0/d1/d2/d3/d4/d5/d6/d7/d8/d9/d:/d;/d</d=/d>/d?/d@/dA/dB/dC/dD/dE/dF/dG/dH/dI/dJ/dK/dL/dM/dN/dO/dP/dQ/dR/dS/dT/dU/dV/dW/dX/dY/dZ/d[/d\/d]/d^/d_/d`/da/db/dc/dd/de/df/dg/dh/di/dj/dk/dl/dm/dn/do/dp/dq/dr/ds/dt/du/dv/dw/dx/dy/dz/d{/d|/d}/d~/d/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d�/d0d0d0d0d0d0d0d0d0d	0d
0d0d0d
0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d 0d!0d"0d#0d$0d%0d&0d'0d(0d)0d*0d+0d,0d-0d.0d/0d00d10d20d30d40d50d60d70d80d90d:0d;0d<0d=0d>0d?0d@0dA0dB0dC0dD0dE0dF0dG0dH0dI0dJ0dK0dL0dM0dN0dO0dP0dQ0dR0dS0dT0dU0dV0dW0dX0dY0dZ0d[0d\0d]0d^0d_0d`0da0db0dc0dd0de0df0dg0dh0di0dj0dk0dl0dm0dn0do0dp0dq0dr0ds0dt0du0dv0dw0dx0dy0dz0d{0d|0d}0d~0d0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d�0d1d1d1d1d1d1d1d1d1d	1d
1d1d1d
1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d 1d!1d"1d#1d$1d%1d&1d'1d(1d)1d*1d+1d,1d-1d.1d/1d01d11d21d31d41d51d61d71d81d91d:1d;1d<1d=1d>1d?1d@1dA1dB1dC1dD1dE1dF1dG1dH1dI1dJ1dK1dL1dM1dN1dO1dP1dQ1dR1dS1dT1dU1dV1dW1dX1dY1dZ1d[1d\1d]1d^1d_1d`1da1db1dc1dd1de1df1dg1dh1di1dj1dk1dl1dm1dn1do1dp1dq1dr1ds1dt1du1dv1dw1dx1dy1dz1d{1d|1d}1d~1d1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d�1d2d2d2d2d2d2d2d2d2d	2d
2d2d2d
2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d 2d!2d"2d#2d$2d%2d&2d'2d(2d)2d*2d+2d,2d-2d.2d/2d02d12d22d32d42d52d62d72d82d92d:2d;2d<2d=2d>2d?2d@2dA2dB2dC2dD2dE2dF2dG2dH2dI2dJ2dK2dL2dM2dN2dO2dP2dQ2dR2dS2dT2dU2dV2dW2dX2dY2dZ2d[2d\2d]2d^2d_2d`2da2db2dc2dd2de2df2dg2dh2di2dj2dk2dl2dm2dn2do2dp2dq2dr2ds2dt2du2dv2dw2dx2dy2dz2d{2d|2d}2d~2d2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d�2d3d3d3d3d3d3d3d3d3d	3d
3d3d3d
3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d 3d!3d"3d#3d$3d%3d&3d'3d(3d)3d*3d+3d,3d-3d.3d/3d03d13d23d33d43d53d63d73d83d93d:3d;3d<3d=3d>3d?3d@3dA3dB3dC3dD3dE3dF3dG3dH3dI3dJ3dK3dL3dM3dN3dO3dP3dQ3dR3dS3dT3dU3dV3dW3dX3dY3dZ3d[3d\3d]3d^3d_3d`3da3db3dc3dd3de3df3dg3dh3di3dj3dk3dl3dm3dn3do3dp3dq3dr3ds3dt3du3dv3dw3dx3dy3dz3d{3d|3d}3d~3d3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d�3d4d4d4d4d4d4d4d4d4d	4d
4d4d4d
4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d 4d!4d"4d#4d$4d%4d&4d'4d(4d)4d*4d+4d,4d-4d.4d/4d04d14d24d34d44d54d64d74d84d94d:4d;4d<4d=4d>4d?4d@4dA4dB4dC4dD4dE4dF4dG4dH4dI4dJ4dK4dL4dM4dN4dO4dP4dQ4dR4dS4dT4dU4dV4dW4dX4dY4dZ4d[4d\4d]4d^4d_4d`4da4db4dc4dd4de4df4dg4dh4di4dj4dk4dl4dm4dn4do4dp4dq4dr4ds4dt4du4dv4dw4dx4dy4dz4d{4d|4d}4d~4d4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d�4d5d5d5d5d5d5d5d5d5d	5d
5d5d5d
5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d 5d!5d"5d#5d$5d%5d&5d'5d(5d)5d*5d+5d,5d-5d.5d/5d05d15d25d35d45d55d65d75d85d95d:5d;5d<5d=5d>5d?5d@5dA5dB5dC5dD5dE5dF5dG5dH5dI5dJ5dK5dL5dM5dN5dO5dP5dQ5dR5dS5dT5dU5dV5dW5dX5dY5dZ5d[5d\5d]5d^5d_5d`5da5db5dc5dd5de5df5dg5dh5di5dj5dk5dl5dm5dn5do5dp5dq5dr5ds5dt5du5dv5dw5dx5dy5dz5d{5d|5d}5d~5d5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d�5d6d6d6d6d6d6d6d6d6d	6d
6d6d6d
6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d 6d!6d"6d#6d$6d%6d&6d'6d(6d)6d*6d+6d,6d-6d.6d/6d06d16d26d36d46d56d66d76d86d96d:6d;6d<6d=6d>6d?6d@6dA6dB6dC6dD6dE6dF6dG6dH6dI6dJ6dK6dL6dM6dN6dO6dP6dQ6dR6dS6dT6dU6dV6dW6dX6dY6dZ6d[6d\6d]6d^6d_6d`6da6db6dc6dd6de6df6dg6dh6di6dj6dk6dl6dm6dn6do6dp6dq6dr6ds6dt6du6dv6dw6dx6dy6dz6d{6d|6d}6d~6d6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6d�6f�6Zd�6S(�6g�?i�i	i��i����	�R�i����iai�i�ni��!i�i�L�,iB�i�i�i�i�i��i{
i]
i�i�i
iji�i�i.iNiii�����:i�i�i��?i�i�i=iN�K���ikiq	i�i�i�
i��iib��
i�i��i�
ioi2i�ii�i�ici8i�i�ii��i�i��i{�|��i��"i�
i��@i\i�i�	i�i��i�i�i�iFi�i|
iQ�Hi�i��Piv��i�i�ii�iDi^
i�i�iFi}
i��Ei�iO�i0i��si�i4�<�2i��i&iMi�i�i~
�i�iG�ii[i�i�i?iiiaiiK	i*i�igi�	�Zi�
i:i��i�iKi�	�i�	�ii�i�i�i`ilii�i��i
	i �qi�i~i���i
i�	ii�i�i�ici��u�i�i*ii�i	i�
i��~imi�i��iei��Gi^i�in�i�UiCi�iCi�i�i�i�ii�i �jioi/ii�iPi7	i[i���i�
i?i�i�i�io�Si(i�i�ip�]i�i6ijii@iii�iii8��+i3i[�i�i\i�i�i�i��i]	iAi���i�i1��i�iHi�
i�
idi���i+i�i2i�i�i�i�
iOiL	i�iifi1��i�i�i�i�i�ii3i9���li,��i	ii�ii�i�i�i�ieiz
iQiMi&i��Xi�i�i�i���i
��i�ikipi��M�i�i��%�i�i�i�i�i��'i�	i�i\i�i�7��Ji�i!i�i�ii���iNi�iBiPi_
iq��i�
i�i�i�
i�
i�� i�ii iIi�i8	i�i�
ii{
�i�i
i�i���mi�i�ifi�i�ixi�i�i�i�i�
i�i
i�igi���i
ii�i�i�i�i��&i�i'i�ii�i�i��.�i�ii�iM	i���i�i�i$�#i�iDihiAi�	�i�iri�i�iUiGii�i�i
i�
iQiSiii�i��di�0�Fi�i�iCi�i�ii�i i�iJii�iU�i��iN	i�
i�i�i<i�i�
i:iA
i�
i�i	i 	i9i�i}ii�	i�i�iWiPi�
ii)iDii�i�i4i�
i�	i)i�i�ir	i�isi�i�itii9	i�i�i�is	i*ii�i�i�i�i�i]i�i�i�i�i�	iDiji(
i
i�i�i�
i�iui5iYiji	ili�iuii�i�
i�i�i`
i
i=i�i�i�i�i�i�i�i5i�i!i�i�iTiEixi�i�ie�i�	i�iO	iPi�i|
i6iAi�
i/iki�i�
iili!i	i�iBi�i`i�i
i��iAi�iiii�i�
ivi�	i�i�iwi�i���iMi�
i�i�i�ii�ia
i�i�i�
i}
i�ixi,�}i�i�iB
i�i�i�i�i�i�i�i�iFikimi�	i�i�
i�i	i�i�
i�ibi�i)
i^iP	i
i,i�i�i�i7i5i~
iyi|i�izi�ii�i�
iC
i{iii�i�i�i�i�i�i�i1���bii�	i�
i�i�it	i�i�
i�i_i��i�i�i�ii�
i�
ib
i��i�i5�D�i�ili�i|i[i*
i��i�
i�i%�iGi^	i�ili�i�i�
i�i`i�i�i�ipi��in�cigimii�i'i2i��i�i{i�i�i�i�i�i�iD
i�ifi	i�i|i:	��i�ii�i�
i�i�
i
i�i�i�ini�i�i�i��;i�iIiYi}i�i�
iXi"i�i
i�i�i�i�i�i�i-i�ili�i�i�i�i�ii�i�iEi�i~i�i>i]i�i,i�i�i�iviLiB�ii&i�i�ii�i�i�iGi�i�iiBi�i�
i+
i�ii�i�i�i�i�i�	i iaii�i�i
iai�i}iE
i�iDi�i=i�i0ii�i�
i6i�ii�ivi!�i�i�i��i�i�i��9iHii�i�i�i�
iFi�i�i�i�i�i"i�iHi�i�i�i
ioii�iRi*i�i.i�i�i�i�iiI�3ii,
i�i*iSi�i�iXi�i�i/iibipi�i�	i�i�i�i�i�iRiii�i7i�i2i�i�	i�i�i�i�i�i�i_	i�ibii�
i�i�i�i�	i�i�i�ii�i�i`	�Oi�i�	i�i`i7i�
i�
i�i�i�i�i�iia	i�i�i�i�i�i�igi�i�i�i�i
i_i�i~��i�i�i�i�i�
iai�i�
ib	i�i�i�i�i��i�i�	i;��i�	i-i
i�iQ	i���i�iqii�i�i��`i�i#i#i�ii�iiri�
isii�i�iditi�
i�ic
i�iikiwi�i�i�i�i�i�i�ii�i��gi�iQi�iUi
i�i�i�i���CiSi�ic	i�i�i5i�i�iBi�i_i�iciN��i�iYi�i�i�i�
�iLidi�
i�
i	iKi�i8iaiGi�i�i
i�i�iisi6i�	iti;	�Ni�i�ii	i4i�i:i�i\iqi�i�i�i.i�iiiui�
i�i�i�i�i�
�i
iri�i�i�
i�
i�ici�i�i�i@i�i�i�ii�i�ii�i/i9i�ii�ii�i�i�i�i�
i<	id
ii�i�i8iviiCi�ii
i�imi�i�
i�i�i�i�i�iZi����i�iwi�	�{i�i�i�i��$i�iiMidi0iri�i�i�igiiVi�i�ii�i:iZi�i�i{i$iei0i�ii$i�i�
i�
i�i5i�i[i��vi�iici�iViR	i$i;�i�iifiii�idi�i�iWie
ii�i�iii�i�
iiJi�ii�iiui�i	i�i
i�ii�
iKi�i2i�iLi i.i�i�i2i�ii�i�i��i�i%ii�i�ii
ii�ii�iii��
i�
ixi�iMi�i}ii�iTii�i�id	i�
ii�i�i�i`iii�i�i�	i3iii;i�iiiiyiYiLi�i�i�	i�	iii�iU�\i�i�ii�i�iViNi�ii�
i�i�i 
i�i"ixi%ii;i=	i i�i�i2iEi�i!i�i�i��^i�i"iwi�
i#i�i�i�i�i�i$i<iQi�i�iri%i�i]i�i&i�i<i'ii3i6iBi�i�i(i�i�i�i�i�ii�igi�
i�
i)i�
i	i*i+i!	i�i��i:i�i7i�i^i�ii�ii(i�
i,i+iiixi-i�i/ihi=i.i�i��i�iVii�i�hi�i�i/ii��i�i<i�i�i;i0i�i�i�i
i�	i1izi�ii�i5i6i�
i_�)i2i3i�i4iyi"	�i�i�
i�i^i5i�i�i?i%i+if
i�i6i_iWi�i�i�
i7i>ii�
ig
i#	��iu	i8i�i�i9ih
iF
i�iVi{i�iOi�iI�wi~i�
i^ii�i:i�i�i�i�i�i�i�i�	i;iei1i�i�i�i�i�i�i�i�i�i�iiiPi<i=i�i>i�
i��(i`iRi?iYi�iIi�	��i�i�i7i�i�
i?i�i�i�
i@i�io�iqiYinii�ilii�i�i�i�i�
ii
iEiPiVi�i!
i�i�i�i�i�ini�iAi�i|i�
ii
iBi�i�i�i�ii-
i�	iOi�
i�iCi�iDiWiTiT�i�i�i�i�
i}iEi�i&i�
i�i�i�i�ii�i�
i�i�i~iG
i�
i�ii$	iWi�ii�ioi�i
iFiiGi�ii"
i���i�i#
i�i�iDi-iQi�iHiei�	iiiIi�i�iiJizi
i�iKiiiLi�i$
i�
i�i�i�i�iH
�i�i�ii�i�iMi:i�	ii�iNi�iI
i�i�i�iHi�i�ii�iOi�i�i�	iPiQi�i�ikiRiRi���i�i�
i
i�i�i�i�i�i�ii�iSiTi�i�i�i%
i�i�i�i�i�i&
iSiUii�iS	i�iCi�i�i�iVi~i�i!iXi�i�i�i�i�i,i�ii�i�iOi�i|i�ii�iPi�ie	i�i�i�i�ii�i�i�i�i�i�i�i�iTi�i�i�iWi�i�iiXi�iYi�iRi�
iviii�
ii�i=ii�iZi�iUi�i�i[i�i�i�iVi%	i\i�i�i]i�i�i^i8iT	i.
i'
i_i�ivi�i�i�i�iwitii`iaibi>	i�i�i"i{�i�i�	i�ici�idi9i�iii�i[i9iiidihi
iei�i�i�iJ
i!i�i�ifi���ii�i�i�iTigi�ii�i%i��WiMihii�iii�i�i�i�i��i�i�i�i(
ij
i�iyi7imi�ijiki�i?	iWi"i�i��i�Bi�ili|i��i)
izi���i�
i�i�i�i�ii�i�im�iniuiv	iwi�i	i*
ii�ioipi��iqi7i.iri�i�i
iii�
i�ifi�i�i�isi&	iyii�i i�i�i�ii�i�
ii>i�i�i�i�i�Yi�i�iti�iui/
i+
i�ivi�i�i�i@iwii�	i�	�i�i3i�i�i�i,
ixi�i6i9i�
i	ii��6i��ii!ii�iyi�iQi:ici
i�ii-
�oi�i�iFiXi�
i�i�ifi�iizi�
i�i�i�i�i�i{i/�i�i'	i�	ibii�i`i�i�iiui	ivi�i�ii�i�
i
i
i�i�i�i�i0iE�iSi�i8i[i|i}iGi�ii�i!i~ii�iFiU	i�i�
iii�ieisi�i�i�iw	ii�i�i"iiai	iZi&i�i�i�i�i�	i
i�i�i�iAi�i�i�
iiiii�i�i�i�i�i�ii�i
ioi�ii�ii�
i
i�i	i�iAiiJi0i�ix	i�
i�i�i�iYi�i�i�i�i�i�	i�ii�iZi8ioii�iQi�i�i�i�i�
i���a�Qi�i�ipi;i�iPi�ibi�i�i�i�ii�i�i
i�i�i�i�	i�i�i�i�i�i�i�i�i�i�i�i]ii�ii�i�
�i�ii�i�i'i�ii.
i���i
i�i�ii�i�iLi�i�i�i�ii�	i�i/
i�ii�i�iBi0
i[ii8i�i�i�i�i�	i�ii/i3i�i�i�ii�
ii�ii0i�ini�i�i�ii�i���ii�	i�i�i�i�ii�iii�i4i�i�ii<i�	ii
i�i�iYi�	i�i��iCi�i�ii�
i�i�i�i�i}i1ii�
i�i�i�iK�i���i0
iFi�i�i�i�
ii#i�i\i�i�i��fi�>i�
i�ii�
i�i�i�i�i�ii�
i�i�i�i�iji�i�ii�ii-ipi9i@	i6iyii�i�ii
i1
i�i�ii�i�ii��Vi�i�i�i�i4i�i�i�iKi1
i�i�
iDi�i�i�i�ii�i#i�i�i�i�i2
ii�ii�	iZiHipi�i�igi�i�ii�
iq�ri
i���i�i�i�i�iiK
iV	i�
i\i,i
i�i�i�ii�i]i�i�iu�i�
iii�i�i�i�ii�iZi�i�i�
iii�iiji�i�i0ihihi�i�i�i�i�iEii�i	
i�ii�	i�i�i�i�i�i�i�ii�i�i�
iii�i2
�i�i�i�i�iiMi�iwi�i�i�iy	i?i�i�i�i

itimi(	i�	i�i+i�i�i�i�i�i��iiii�
i�i�	i�i�i�i
i�iL
i�i�i)	i�
ii�
i�iif	i�i�	i�iii�i�i�iRi"iA	i3
i�i�i-i1i�i$i�
i(i�i]i�i#i�i$i�
ii�i�i i*	i�i�i�i�i
i�i�i�
i=ik
i�i!i�i�
i�i�i�i�i�
i�i���_i�i�i�i�i^i2ii�
i�i�i�i9i�i�i�i�i�i�i4
i�i�i�i
�ibii�i�ii�i�ii��5i�i�i�i�i"i	i�
ii�i�i��i4iIii�i#i�i��i�iii�iiji�i�ii$iki�ii�
i�i\i�
igi�iEi5
i�i�i�i�i�i�i�i�i�
i�i�i6
i�i�ii	i�i%ii�i�i�i�i[i�i�i�i�i�ii�i&�ei�i�i�i�i�ioi�i�ili	i}i�i�i�izi�i+	i�i�i�ii�i�ini-i�i�
i'iiii
i�i�i�i(i�i�i�	i�i�ii�i�i�ii�
i�i�i�i�iBiiiqi�i�i�i<i�i*iji)i"i*i�i>i)i7
i�i+i�i�i�ii�i�i��zi�i,i�i�i�iiM
i)iri�i�i-i	i�i�i�i�i�i��Ti��pi�i�i#i#i�i�ii�i�i�i�i�
i�ii�i	i�	i�i�i�iSi�i.i8
i�i�i�i�iz	i9
i=i�i�i�imi�iSiii�i�i�ixi�i�i/i�i�iqi�ii3i�i5i�i:
i�i�
i�i�i�i�i�i�i�i
i;
i�i0i1i�iii�i�ini�i_i�i]ii�ini�i�i�i�i
i%i�i�i�i�i�i`i�i�i�i�iziTisi2i3
i�i
i{	�i5���ii�
ig	i�i�iki�i�i�ii�
i�i�i3i4i�i�i�ici i�i�i
i�
i�iiai:i1i�i�i�i!�Aihi ioi�
i6i"i�i��il
�-i�i
iai5ii�	i�i
i�i�i#i!i�i$i�i�
i�i4
ifi�i	i%i&i�
iN
i
i�iWi�iii�ii�
i'i�i$i�ii<
i�iNiiiW	iki�iO
i�i�iii�i�iX	i,	ii6i&iti�iP
ii�i7i�
i�i�
i-	ijii	i�
i�iC�[ipi�i�i'i8i
ibi�im
ii�
i�i{i(i�i�	i�i�	i9i�
i�	ii:i
i�
i^i�i�i�iB	i;ii�iii�i�
i���i
i�i	i�i)i<i=i�
ii�
i�i>iiiii�
�=i�i�ii�ii�i�i�i�i�in
i�iHiDi�
i?i�iUiWi�
i=
i�i:i�i�	iNi�iKiEi@i4ici�
i�i>
i�iQ
i
iAii�ihi�ii�
i�
i(i]i�i�i�iBi*i�i�ili�iCiDi�iEih	i�ii�i��i�iXiiii�i+i�i�i�i+iJi�i�iU��ii
i�imi iEiiiiFiiGi
�ki�	ini�i�
idii�ii�i�i�iFi!i i�iri@i�iHi"iCiGi��i�i
i�i^i�
i�i��8iti)i;i�i?
i!i�ioiIi�i"i#i#i$i�iJi�	i%i�
i&iriKi'i5
i(i)i�io
i@
i}iA
i�i,i�i*i4�1i+i�i�i�i�i�i"i�i,ii�
iC	i�iuiriD	i-i�
i-i�iLivi{i�i|	iMi.i.iNiY	i6
iii�i/i0i/i�i�i1i$i�i2i%iGiRiB
i�i_i�i�iC
i�i�iD
i�i3i�i�i�i�i�i�ii.	i�i�	i4i@iwi�i5i�i6i7i�ii	i�i&i0i�i8i	i&i�	i*�i+iGiOiu�i#i�
i1iPiRi�iQi�i�i�i)i�i�i=i9i�ili�i�i�i�iE
iSi�iki�i\i�	i�i�i�
iyi:i�i;i<iF
i%i=i�iRiii>idi'i,i?iei$i�i2i3i-i�i�i4ii(iSi@iAiBi�i.iTi�iOi
i�i�i�i�i�i�
i&ii�i�i�
i<i�
i�ii�iCiiDi�i�iUi�ip
iG
iei�
i�i�i�i�
iEi;iViFi'iGi)i
i�i}	iHi*i�iWi�i�iIi�iTi�i�
i�
i�i�i�i�ii	i�iJi.igi~�iUi�ij	i	iiiXi�i�i8i�i*i�	i�i�iKi~	i�i�i�iLiiHi�
i�ii%��i+ifi�i�i�i�iti�iMiNi�i�i�ii	i�i 
i�i�ik	iYiiYi�i�i��*i/i�iOiR
iZiH
i�i#iIi�
i�	i�i�i5iS
i]iE	i[i\i
isiI
i+iPiQi,i�	i�
iRi�iSiTi�i,i�iUi]iVi�i�iLi-i!i�iT
i\�4iWi�iiXiYiZi�i[i>iwi�i�i�i�i+i^iiJ
i�i_i$i�i\i�i�iili.i]i`i�i^i_iq
i%i�i`iaiii�i�
i6igiU
ibicidiai�
iqixi�
iei
ibiyi�ifihigihi�i�i'iiii�i�i	ijiri�i
i0i	i=i�ibi|�i�i�i�i�i�i	iihiki�
ilii�i�
iai�icimi�ii�ini�
i�iui�i�idiei�isiK
i/ioi7i�i&i�	iJi8ipiqiiijifi�i�	igi	i�i�i(i�i`irisi�i�iii<iFikifi�i��i�i]i�i�iIiti>i�iui�ivi�i�
i�i�i�
i0i�i-i�iwiL
i�i�	i�i�i�i�iGiai�i
iti�i�i�
iSiKixiiyizi�i�iV
��i�iOi�i1�i�
i{i�
i�i�iF	iyi�i9iZ	��i|i}i~iFi�i�i�i�
i�	i:i�iiii2i�i�iipi�i;iG	i�i�i	ihi�i�i�ii7
i�i�i�iiqii�iM
i�iii�iii�i�i�i�
i�i�i�
i(i8
i�iN
i	ii3i�	iiO
i<ii�i�iTiiW
i�	i�i�i�i�i(i�i�i�i1i�i�i�i�i�i�i�iuiZii�
i�	ici�ijiP
ipi�i�i
ii�i�i�iviiiji�i�
i�i�i�i�iQ
iKii�i�	i'i�i�i�ii�i9
ii�i
i�	izi�i�	i
i�i�iki�i�i�i�i�i�i2i	i�ilii�i>i=iCi'i�i�i>i
iiZi�i�i�i�imini�i�ibii�i�	iiqi?i�i
i�ii�i�	i"i�i�
i?i
i}i�i�ioi@i>iiAi�i1i�i)i�i�i�i?i�
i�
i�ii�ixi	i�i	ii�	i3i�iihi�iili�i�i�i)i�i�
ipi�i'i�i�i�i4i�i�i
i�
i�i�i�iAi_i	iBi�iLi�i
iPiqi�ii�iriii�iiX
iicisi!
i�i�iiHi�i	iwi�i�i�iCiDitii�i�i�i�i�ixi
ii�	i/	i�iii5i
i4iuiir
i�ii_i�i��/i�i<i�i~i7iyimi�ii^i5inibi�
iti�iil	i�i�i�i6i�i�	i7i�i�i�i�i�iivi�i�i�i�	i8i:
i�i�
i�i0	i�i1	i�iwi�Ii�i�i�i�i�i(i�iiBi�i�i4isi�
i�i�i�i�i
i�
i�i�i?iCiixi	iEiHii�iFiyiziGi�ii�i�i{i�i�ii|i�i;
i}i9imiH	i~i�izi�i�is
i�	i�iMi�i�ii�i�iim	i�i�iIi�i�iioii�ii�ii�i�i_ii�i�i�i2	i3	iHii*i�ii�
ii�i�i<
i�iii:i�i�
i�i�i�iAi�i�i�iR
i�i�i�iii�
i�i"
i�i�	i�i�i�i�i�i�
ii�
i�i�i�
i�i�iQii�
iY
iii�i�ii�ii{iKi�i�i[iiJi�i�iNi�iS
i�i�i�i�iI	ii�iT
i@ii�
i�i�i�
i�i@iiRi�i�i�	it
i�ii�iJiIi�i�
i�i�i��i�
iU
i�imii�i�i{i�	i�i�	i
i;iV
i�ii�	ii�i<i�ii�
idi�i�i�iXi�i�i9i�i�i6i�i�iUi�i�i�i i�iLi!i=
i�i)i�i�
i	ii�i�i�	i�i�i�
ii=i$i(ivi�ii&i�ici�iii�i	i
i�i>i�i�i�i{i"i�i�i�i�i#i�i�i�i�iW
i�i�	i�i�i�i�	ii$i�
i%ii�i�i�i�i&i^i�i�i[	i�	i�i'ii�i�ii�i�i�i(i i�ii2i\	iJi
ipipin	iiu
iqi)i�i�	iOi>
i�i�
i*iX
i�i�i�	i+i�i�i,i�
i�i�i�
i�i�i�i�iKi�i
i		��iIi-i�i�i!i�i�i�i�i�i.iDi�i�iJisi#
i�i�i�
i�i7i�i�i�i/iwi�i|iii�i�i�i"i4	i|i,iii�i�i�	i�i�ii�iiii�i?iY
iPi0ii1iZ
iZ
i�
i�i�
i�	i�i�
i#i@i2ii|i�iziii�i�iAi'i�i?
i�i	i�i8i�i��yi�iLiVi
i3ii�	i�i$i�ii�iMi�i%i�ii�	i�
ii
i.ii4iNi�iiii�
i�	i�i�ii�i�
i5i9i%ii�i�iKiQii��xi6i7iiBi�i
	iOiv
i[
i�i�i&ii�
ii�
i�iiXi�i*i�i\
iPi�	i�
iNi+iw
iii�iiWiCi�ii�	iQiDii?i]
i�iii^
io	iRi	
i�iEii
iiFii'i�iXiiGiiSi�iiTiRii8ixi�	ikiSi�iTi�ii i�i�i�iDi�i9i!i�i�ii�i(iiLi"i#i$i%i_
i�i&iJi:iUi�i}ii)i�i

i;i<i
iEi+i'i�
i�iHi=iVi*iHiyi,i+iWi3i>i�i�i?i(iIi,i-i`
iqi�ia
ii�ii
i�i)i*iXi�	i+i�iO��iYi,i-i�i.i�i/i�i�i0i.i�i�i�i1i�
iJiri2i3i$
i	i4i�i5i6i7i�
i�ib
i�	i�i�i}i�	ifi�iKi�i�
i�
i�	i�	i8iZi9i�i:i�i�
ic
i�i:i�ii;isiJ	i@i�i�	iti;i�
i/i<id
ii�	i�i�iUi�i0i�ie
i=i�if
iuiMi�i�i�i�i�
i>i	i[iiAiLi�iii?i�	i
i�
i	i@iAiviBiCi\i�iji�i[
i�
ig
iDiEi�i�iFiiBi�iGi�
i�iHi�i(i�iMiCih
i�iIiNiJiiKiLi�i�iMi�i1i2iN�i�idiOidiViDi`i�i#i5	iPi]iQiEini
i�	i�i�i^iRi_iFiSip	ii
i�iTiUi�i

i�iVi�i�i�	i�iGi�i�i�ieiHiOi�	i�iPi`iWiwij
iXi ii3i�
iai�iIiYiJixi7iii�i-i�
i4ik
iibiZi-i�ii.ici�i[i�	iri;i�iKi5iLiXi�i i	i�i�i\i]i�i�i6i%
i^i_i�i�i~i`il
iyiaizi~i�i�ibi?i�ici7idi
i�i�iei�izi�i�iMifigi/ihi|i�i@idi�iiiiNi�i�i�i8ifi�i�ijiki�iOiPi�i�ilimi@ini9i�	ioi�i�	i�i�i<isii\
iQi.iRiNi@i�
i�ipiiSi{iqi�iAi�i�i�ii�iTi
i�i�i�i:i�i�iri�
isi@
iWi;itiui�iviwixiyi|i�i�i�i�izi�i�i3iQi�i�imi�iAi{i|i�i�	i�i}iOiRi�i�igiii~iZi�
ii�i�i�i�i�i\im
i�i}i�i<iXi�i�	i�i�	i�
i�i�i�i
i�iYi�i�i�i0i�i�i�i�i=i�	i�i�i�iLi�i�i�i�ihi�i�i�iii>i>i�i/i?iUi�i�i�i�i�iei)ix
�ti�ifiSi�i�
iy
i�
in
i
ii�iTii@i�i�i�i�i���i�i�i�i�i�	i�i�iziUigi�iVi�io
i�i�i6	ip
iti�i�i�i�i���i�
iAi�iJiVihiZi�	i�iWi�i�i�i�i�	iMi�i�i
iii�	i�iBi�ieiCi�	i�iji�i�	i�i�i�i�i�i�i�isi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiViPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iq
iii
iiiiiiiiiiiiiXiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i�i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMikiliNiOiPiQi�iYiRiSiTiUiZiViWiXiYiZi[i\i]i^i_i`i�iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�imi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ini�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iDi�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�i�i�i�ioi�i�i�i�i�i�i�i�iEi�i�i�i�i�i�i�i�iiiiiiii�iii	i
iii
iiiFii�ipiiiii�iiiiGiiii~iiiiii i!i"i#i$i%i&i'i(i)i�i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNi[iOiPiQiRiSiTiUiViWiXiYi\iZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}iHi~iir
i�i�i�i�i�i�i�i�iIi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i]i�i�i^i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iqi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ii�i�i�i�i�i_i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iJi�i�i�i�i�i�i�iiiiiiiiii	i
iii
iii�iiiiiiiiii
iii�iiii`iii i!i"iai#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiWiSiTiUiVi�iWiXiYiZi�
i[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuivi�iwixiyizi{i|i}i~i�ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ibi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiKiLiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ici�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iMi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iXi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiidii�ii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i�i3i4i5i=i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNi
iOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iai�ibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i�i�i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iei�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiis
iiiiiifiiiiiiiiii i!i�	i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3iri4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFi>iGiHi�iIiJiKi�iLiMiNiOiPiNiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizi{i|i}i�i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�isi�i�i�i�i�i�i�i�i�i�i�i�i�it
i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iOi�i�i�i�i�i�i�i�i�i�i�i&
i�i�i�i�i�i�i�i�igi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i�i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i�i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiPiQiRiSiTiUiViWi�iXiYiZi[i\i]i^i_i`iaibicidi�ihieifigihi�iiijikiliminioipiqirisitiuiviwixiyizi{i|i}i~ii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiQi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iRi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iii�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iSi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iii�i�i�i�i�i�i�i�i�i�i i i i i i i i i i	 i
 i i i
 i i i i i i i i i i i i i i i i i i i  i! i" i# i$ i% i& i' i( i) i* i+ i, i- i. i/ i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i: i; i< i= i> i? i@ iu
iA iB iC iD iE iF ijiG iH iI iJ iK iL iM iN iO iP ikiQ iR iS iT i�
iU iV iW iX iY iZ i[ i\ i] i^ i_ i` ia ilib ic id ie if ig ih ii ij ik il im in io ip iq ir is iit iu iv iw ix i�
iy iz i{ i| i} i~ i i� i� i� i� i� i� i� ii� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� iimi� i� i� i� i� i� i� ii� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� i� ii� i� i� i� i� i� i� i� i� i� i� i� ini� i� i� i� i� i� i� i� i� i� i� i�i� i� i� i� i� i� i� i� i� i� i� i� i� i� i!i!i!i!i!i!i!i!i!i	!i
!i!i!i
!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!iTi!i !i!!i"!i#!i$!i%!i&!i'!i(!i)!i*!i+!i,!i-!i.!i/!i0!i1!i2!i3!i4!i5!i6!i7!i8!i9!i:!i;!i<!i=!i>!i?!i@!iA!iB!iC!iD!iE!iF!iG!iH!iI!iJ!iK!iL!iM!iN!iO!iP!iQ!iR!iS!iT!iU!iV!iW!iX!iY!iZ!i[!i\!i]!i^!i_!i`!ia!ib!ic!id!ie!if!ig!ih!ii!ij!ik!il!im!in!io!ip!iq!ir!is!it!iiu!iv!iw!ix!iy!iz!i{!i|!i}!i	i~!i!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�i�!i�!i�!i�!i�!i�!i�!i�!i
i�i�!i�!i�!i�!i�!i�!i�!i�!iti�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i1i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!ioi�!i�!i�!iii�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!ipi�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i�!i"i"i"i"i"i"i�i"i"i"i	"i
"i"i"i
"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"iUi"i"i "i!"i""i#"i$"i%"i&"i'"i("i)"i*"i+"i,"i-"i."i/"i0"i1"i2"i3"i4"i5"i6"i7"i8"i9"i:"i;"i
i<"i="i>"i?"i@"iA"iB"iC"iD"iE"iF"iG"iH"iI"iJ"iK"iL"iM"iN"iO"iP"iQ"iR"iS"iT"iiU"iiV"iW"iX"iiY"iZ"i["i\"i]"i^"i_"i`"ia"iib"ic"id"ie"if"ig"ih"ii"ij"ik"il"im"in"io"iuip"iq"ir"is"it"iu"iv"iw"ix"iy"iz"i{"i|"i}"i~"i"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"ii�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"iqi�"i�"i�"i�"i�"i�"i�"i�"ii�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i�"i#i#i#i#i#i#ii#i#i#i	#i
#i#i#i
#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i#i #ii!#i"#i##i$#i%#i&#i'#i(#i)#i*#i+#i,#i-#i.#i/#i0#i1#i2#i3#i4#i5#i6#i7#i8#i9#i:#i;#i<#i=#iVi>#i?#i@#iA#iB#iC#iD#iE#iF#iG#iH#iI#iJ#iK#iL#iM#iN#iO#iP#iQ#iR#iS#iT#iU#iV#iW#iX#iY#iZ#i[#i\#i]#i^#i_#i`#ia#ib#ic#id#ie#if#ig#iih#ii#ij#ik#il#im#iin#io#ip#iq#ir#is#it#iu#iv#iw#ix#iy#iz#i{#i|#i}#i~#i#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#ivi�#i�#i�#i�#i�#i�#i�#i�#i�#i�#ii�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#ii�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#ii�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i�#i$i$i$i$i$i$i$iri$i$i	$i
$i$i$i
$i$i$i$i$i$i$i$i$i$i$i$i$i$i$i$i$ii$i$i $i!$i"$i#$i$$i%$i&$i'$i($i)$ii*$i+$i,$i-$iii.$i/$i0$i1$i2$i3$i4$i5$i6$i7$i8$i9$isi:$i;$i<$i=$i>$i?$i@$iA$iB$iC$iD$iE$iYiF$iG$iH$iI$iJ$iK$iL$iM$iN$iO$iP$iQ$iR$iS$iT$iU$iV$iW$iX$iY$iZ$i[$i\$i]$i^$i_$i`$ia$ib$ic$id$ie$if$ig$ih$ii$ij$iik$il$im$in$io$ip$iq$ir$is$it$iu$iv$iw$ix$iy$iz$i{$i|$i}$i~$i$i�$i�$i�$i�$iti�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i i�$iui�$i�$i�$i�$i�$i!i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$ivi�$i�
i�$i�$iZi�
i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i"i�$i�$i�$i�$i�$i�$i�$i�$iwi�$i�$i�$i�$i�$i�$i�$iwi�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i
i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i�$i%i#i%i%i%i%i%i$i%i%i%i	%i
%i%i%i
%i%i%i%i
i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i %i!%i"%i#%i$%i%%i&%i'%i(%i)%i*%i+%i,%i-%i.%i/%i0%i%i1%i2%i3%i4%i5%i6%i&i7%i8%i9%i:%i;%i<%i=%i>%i?%i@%iA%iB%iC%iD%iE%iF%iG%iH%iI%iJ%iK%iL%iM%iN%iO%iP%iQ%iR%iS%iT%iU%iV%iW%iX%iY%iZ%i[%i\%i]%i^%i_%i`%ia%ib%ic%id%ie%if%ig%ih%ii%ij%ik%il%im%in%io%ip%i�iq%ir%is%it%iu%iv%iw%ix%iy%iz%i{%i|%i}%i~%i%i�%i�%i�%i'i�%i�%i�%i�%i�%i(i�%i�%i�%i�%i�%i�%i�%i)i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i*i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i+i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%iWi�%i�%i�%i�%i�%i,i�%i�%i�%i�%i-i�%i�%i�%i�%i�%i�%i�%i�%i�%i.i�%i�%i�%i[i�%i�%i�%i�i�%i�%i�%i�%i�%i�%i�%i�%i�%i/i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i�%i&i&i&i&i&i&i&i&i0i&i	&i
&i&i&i1i
&i&i&i&i&i&i&i&i&i&i&i&i&i&i&i&i&i&i2i&i &i!&i"&i#&i$&i%&i&&i'&i(&i)&i*&i+&i,&i-&i.&i/&i0&i1&i2&i3&i4&i5&i6&i3i7&i8&i9&i:&i;&i<&i=&i>&i?&i@&iA&i4iB&iC&iD&iE&iF&iG&iH&iI&iJ&iK&iL&iM&iN&iO&iP&iQ&iR&iS&iT&iU&iV&iW&iX&iY&iZ&i[&i\&i]&i^&i_&i`&ia&ib&ic&id&ie&if&ig&ih&ii&ij&ik&il&im&in&io&ip&iq&ir&is&it&iu&iv&iw&ix&iy&iz&i{&i|&i}&i~&i&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i5i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&ixi�&i�&i�&i�&i�&i�i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i6i�&i�&i�&i7i�&i�&i�&i�&iXi�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i8i�&i�&i�&i�&i�&i�&i�&i�&i�&iYi�&i�&i�&i�&i�&i�&i�&i�&i�&i�&i9i�&i�&i�&iyi�&i�&i�&i�&i�&i�&i�&i�&i�&izi�&i�&i�&i�&i�&i�&i'i'i'i'i'i'i'i'i'i	'i
'i'i'i
'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i'i 'i!'i"'i#'i$'i%'i:i&'i;i''i('i)'i*'i+'i,'i-'i.'i/'i0'i1'i2'i3'i4'i5'i6'i7'i8'i9'i:'i;'i<'i='i>'i?'i@'i<iA'iB'iC'iD'iE'iF'iG'iH'iI'iJ'iK'iL'iM'iN'iO'iP'iQ'iR'iS'iT'iU'iV'iW'iX'iY'iZ'i['i\'i]'i^'i_'i`'ia'ib'ic'id'ie'if'ig'i{ih'ii'ij'ik'il'im'in'io'ip'iq'i|ir'is'it'iu'iv'iw'ix'iy'iz'i{'i|'i}'i~'i'i~i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�iZi=i�'i�'i�'i�'i�'i�'i�'i}i[i�'i�'i�'i�'i�'i�'i\i�'i�'i�'i�'i�'i�'i�'i�'i>i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�i�'i�'i�'i�'i�'i�'i�'i�'i~i�'i�'i�'i�'ii�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i�'i?i�'i�'i�'i�'i�'i(i(i(i(i(i(i(i(i(i	(i
(i(i(i
(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i (i!(i�i@iAi"(i#(i$(i%(i&(i'(i((i)(i*(i+(i,(i-(i.(i/(i0(i1(i2(i3(i4(i5(i6(i7(i8(i9(i:(i;(i<(i=(i>(i?(i@(iA(iB(iC(iD(iE(iF(iG(iH(iI(iJ(iK(iL(iM(iN(iO(iP(iQ(iR(iS(iT(iU(iV(iW(iX(iY(iZ(i[(i\(i](i^(iBi_(i`(ia(ib(ic(id(ie(if(iCig(ih(ii(ij(ik(il(im(in(io(ip(iq(ir(is(iit(i�
iu(iv(iw(ix(i]iy(iz(i{(i|(i}(i~(i(i�(i�(i�(i�(i�(i�(i�(i�(iDi�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(iEi�(i�(i�(iFi�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(iv
i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(iGi�(i�(i�(i�(i�(i�(i�(iHi�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(iIi�(i�(i�(i�(i�i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i�(i)i)i)i)i)i)i)i)i)i	)iJi
)i)i)i
)i)i�	i)i)i)i)i)i)iw
i)i)i)i)i)i)i)i)i)i)i)i )i!)i")i#)i$)i%)i&)i')i()i))i*)i+)i,)i-)i.)i/)i�i0)iKi1)i2)i3)i4)i5)i6)i7)i8)i9)i:)i;)i<)i=)i>)i?)i@)iA)iB)iC)iD)iE)iF)iG)i\i�iH)iI)iJ)iK)iL)ix
iM)iN)iO)iP)iQ)iR)iS)iT)iU)iV)iW)iX)iY)iZ)i[)i\)i])i^)i_)i`)ia)ib)ic)id)ie)if)ig)ih)ii)ij)ik)il)im)in)io)ip)iq)ir)is)it)iu)iv)iw)ix)iy)iz)i{)i|)i})i~)i)i�)i�)i�)i�)i�i�)i�)i�)i�)i�)iLi�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)iMi�)i�)i�)i'
i�)i�)i�)i�)i�)i�)i�)ii�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)iNi�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�i�)i�)i�)i�)i�)i�)i�)iOi�)i]i�)i�)i�)i�)i�)i�)i�)iPi�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)iQi�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i�)i*i*i*i*i*i*i*i*i*i	*iRi
*i*i*i
*i*i*iSiTi*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i *i!*i"*i#*i$*i%*i&*i'*i(*i)*i**i+*i,*i-*i.*i/*i0*i1*i2*i3*i4*i5*i6*i7*i8*i9*i:*i;*i<*i=*i>*i?*i@*iA*iB*iC*iD*iE*iF*iG*iH*iI*iJ*iK*iL*iM*iN*iO*iP*iQ*iR*iS*iT*iU*iV*iW*iX*iY*iZ*i[*i\*i]*i^*i_*i`*ia*ib*ic*id*ie*if*ig*ih*ii*ij*ik*il*im*in*io*ip*iq*ir*is*it*iu*iv*iw*ix*iy*iz*i{*i|*i}*i~*i�i*i�*i�*i�*i�*i�*i�*iUi�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*iVi�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i^i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*i�*ixi�*i+i+i+i+i+i+i+i+i+i	+i
+i+i+i
+i+i+i+i+i+i+i+i+i+i+i+iWi+i+i+i+i+i+i+i +i!+i"+i#+i$+i%+i&+i'+i�i(+i)+i*+i++iXi,+i-+i.+i/+i0+i1+i2+iYi3+i4+i5+i6+i7+i8+i9+i:+i;+i<+i=+i>+i?+iZi@+iA+iB+iC+iD+iE+iF+iG+iH+iI+iJ+iK+iL+iM+iN+iO+iP+iQ+iR+iS+iT+iU+iV+iW+iX+iY+iZ+i[+i\+i]+i^+i_+i`+ia+ib+ic+id+ie+if+ig+ih+ii+ij+ik+i�il+im+in+io+ip+iq+ir+is+it+iu+iv+iw+ix+iy+iz+i{+i|+i}+i~+i[i+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i\i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i]i�+i�+i�+i�+i�+i�+i^i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i^i�+i�+i�+i�+i�+i�+i_i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i_i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i�+i,i,i,i,i,i,i,i,i,i	,i
,i,i,i
,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i ,i!,i",i#,i$,i%,i&,i',i(,i),i*,i+,i,,i-,i.,i/,i0,i1,i2,i_i3,i4,i5,i6,i�i7,i8,i9,i:,i;,i<,i=,i>,i?,i@,iA,iB,iC,iD,iE,iF,iG,iH,iI,iJ,iK,iL,iM,iN,iO,iP,iQ,iR,iS,i`iT,iU,iV,iW,iX,iY,iZ,i[,i\,i],i^,i_,i`,ia,ib,ic,id,ie,if,ig,ih,ii,ij,ik,il,im,in,io,ip,iq,iyiair,is,it,iu,iv,iw,ix,iy,iz,i{,i|,i},i~,i,i�,i�,i�,i�,i�,i�,i`i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,ibi�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,ici�,i�,i�i�,i�,i�,i�,idi�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,iei�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i�,i-i-i-i-i-i-i-i-i-i	-izi
-i-i-i
-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i -i!-i"-i#-i$-i%-i&-i'-i(-i)-i*-i+-i,-iaibi--i.-i/-i0-i1-i2-i3-i4-i5-i6-i7-i8-i9-i:-i;-i<-i=-i>-i?-i@-iA-iB-iC-iD-iE-iF-iG-ificiH-iI-iJ-iK-iL-iM-iN-iO-iP-iQ-iR-iS-iT-iiU-iV-iW-iX-iY-iZ-igi[-i\-i]-i^-i_-i`-ia-ib-ic-id-ie-if-ig-ih-ii-ij-ik-il-im-in-io-ip-iq-ir-is-it-iu-iv-iw-ix-iy-iz-i{-i|-i}-i~-i-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-ihi�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�
i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-iii�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-iji�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i�-i.i.i.i.i.i.i.i.i.i	.i
.i.i.i
.i.iki.i.i.i.i.i.i.ili.i.i.i.i.i.i.i.i.i.i .i!.i".imi#.i$.i%.i&.i'.i(.i).i*.i+.i,.i-.i..i/.i0.i1.i2.i3.i4.i5.i6.i7.i8.i9.i:.i`i�i;.i<.ini=.i>.i?.i@.iA.iB.iC.iD.iE.iF.iG.iH.iI.iJ.iK.iL.iM.iN.iO.iP.iQ.iR.iS.iT.iU.iV.iW.iX.iY.iZ.i[.i\.i].i^.i_.i`.ia.ib.ic.id.ie.if.ig.ih.ii.ij.ik.il.i�im.in.io.ip.iq.ir.is.it.iu.iv.iw.ix.iy.iz.i{.i|.i}.i~.i.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.ioi�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.ipi�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.idi�.i�.i�.i�.i�.iqi�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i�.i/i/i/i/i/i/i/i/i/i	/i
/i/i/i
/i/i/i/i/i/i/i/i/i/i/i/i/i/i/i/i/iri/i/i /i!/i"/i#/i$/i%/i&/i'/i(/i)/i*/i+/i,/i-/i./i//i0/i1/i2/i3/i4/i5/i6/i7/i8/i9/i:/i;/i</i=/i>/i?/i@/iA/iB/iC/iD/iE/iF/iG/iH/iI/iJ/iK/iL/iM/iN/iO/iP/iQ/iR/iS/iT/iU/iV/iW/iX/iY/iZ/i[/isi\/i]/i^/i_/i`/ieia/ib/ic/id/ie/if/ig/ih/ii/ij/ik/il/im/in/io/ip/iq/ir/is/it/iu/iv/iw/ix/iy/iz/iti{/i|/i}/i~/i/i�/i�i�/i�/i�/i�/i�i�/i�/i�/i�/i�/i�i�/i�/i�i�/i�/i�/i�/i�/i�i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/iui�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/ivi�/i�/i�/i�/i�/i�/i�/i�/i�/i�/iwi�/i�/i�/i�/ixi�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/iyi�/i�i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/i�/izi0i0i0i0i0i0i0i0i0i�	i	0i
0i0i0i
0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i0i{i 0i!0i"0i#0i$0i%0i&0i'0i(0i)0i*0i+0i,0i{i-0i.0i/0i00i10i20i30i40i50i60i70i80i90i:0i;0i<0i=0i>0i?0i@0iA0iB0iC0iD0iE0iF0iG0i|iH0iI0iJ0iK0iL0iM0iN0iO0iP0iQ0iR0i}iS0iT0iU0iV0iW0iX0iY0iZ0i[0i\0i]0i^0i_0i`0ia0ib0ic0id0ie0if0ig0ih0ii0ij0ik0il0im0in0io0ip0iq0ir0is0it0iu0iv0iw0ix0i|iy0iz0i{0i|0i}0i~0i0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�
i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i}i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i~i�0i�0i�0i�0i�0i�0i�0i�0i�0i�i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i�0i1i1i1i1i1i1i1i1ii1i	1i
1i1i1i
1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i1i 1i!1i"1i�i#1i$1i%1i&1i'1i~i(1i)1i*1i+1i,1i-1i.1i/1i01i11i21i31i41i51i61i71i81i91i:1i;1i<1i=1i>1i?1i@1iA1iB1iC1iD1iE1iF1iG1iH1iI1iJ1iK1iL1iM1iN1iO1iP1iQ1iR1iS1iT1iU1iV1iW1iX1iY1iZ1i[1i\1i]1i^1i_1i`1ia1ib1ic1id1ie1if1i�ig1ih1ii1ij1ik1il1im1in1io1ip1iq1ir1is1it1iu1iv1iw1ix1iy1iz1i{1i|1i}1i~1i1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�ii�1i�1i�1i�1i�1i�1i�1i�1i�i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i�1i2i2i2i2i2i2i2i2i2i	2i
2i2i2i
2i2i2i2i2i2i2i2i2i2i2i2i2i2ifii2i2i2i2i2i 2i!2i"2i#2i$2i%2i&2i'2i(2i)2i*2i+2i,2i-2i.2i/2i02i12i22i32i42i52i62i72i82i92i:2i;2i<2i=2igi>2i?2i@2iA2iB2iC2iD2iE2iF2iG2iH2iI2iJ2iK2iL2iM2iN2iO2iP2iQ2iR2iS2iT2iU2iV2iW2i�iX2iY2iZ2i[2i\2i]2i^2i_2i`2ia2ib2ic2id2ie2if2ig2ih2ii2ij2ik2il2im2in2io2ip2i�iq2ir2is2it2iu2iv2iw2ix2iy2iz2i{2i|2i}2i~2i2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�i�2i�i�2i�2i�2i�2i�2i�i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2iy
i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i�2i3i3i3i3i3i3i3i3i3i	3i
3i3i3i
3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i3i 3i!3i"3i#3i$3i%3i&3i'3i(3i)3i*3i+3i,3i-3i.3i/3i03i13i23i33i43i53i63i73i83i93i:3i;3i<3i=3i>3i�i?3i�i@3iA3iB3iC3iD3iE3iF3iG3i�iH3iI3iJ3iK3iL3iM3iN3i�i�iO3iP3iQ3iR3iS3i�iT3iU3iV3iW3iX3iY3iZ3i[3i\3i]3i^3i_3i`3ia3ib3ic3id3ie3if3ig3i�ih3ii3ij3ik3il3im3in3io3ip3iq3ir3is3it3iu3iv3iw3ix3i�iy3iz3i{3i|3i}3i~3i3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3ihi�i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�i�3i�3i�3i�3i�i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3iz
i�3i�3i�3i�3i�3i�3i�3i�3i�i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�3i�i�3i�3i�3i�3i�3i�3i�3i�3i�3i4i4i4i4i4i4i4i4i4i	4i
4i4i4i
4i4i4i4i�i4i4i4i4i4i4i4i4i4i4i4i4i4i�i4i4i 4i!4i"4i#4i$4i%4i&4i'4i(4i)4i*4i+4i,4i-4i.4i/4i04i14i24i34i44i54i64i74i�i84i94i:4i;4i<4i=4i>4i?4i@4iA4iB4iC4iD4iE4iF4iG4iH4iI4iJ4iK4iL4iM4iN4iO4iP4iQ4iR4iS4iT4iU4iV4iW4iX4iY4iZ4i[4i\4i]4i^4i_4i`4ia4ib4ic4id4ie4if4ig4ih4ii4ij4ik4il4im4in4io4ip4iq4ir4is4it4iu4iv4iw4ix4i�iy4iz4i{4iii|4i}4i~4i4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i�4i5i5i5i5i5i5i5i5i5i	5i
5i5i5i
5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i5i 5i!5i"5i#5i$5i%5i&5i'5i(5i)5i*5i+5i,5i-5i.5i/5i05i15i25i35i45i55i65i75i85i95i:5i;5i<5i=5i>5i?5i@5iA5iB5iC5iD5iE5iF5iG5iH5iI5iJ5i�iK5iL5iM5iN5iO5iP5iQ5iR5iS5i�iT5iU5iV5iW5iX5iY5iZ5i[5i\5i]5i^5i_5i`5ia5ib5ic5id5ie5if5ig5ih5ii5ij5ik5il5im5in5io5ip5iq5ir5is5it5iu5iv5iw5ix5iy5iz5i{5i|5i}5i~5i5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i�5i6i6i6i6i6i6i6i6i6i	6i
6i6i6i
6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i6i 6i!6i"6i#6i$6i%6i&6i'6i(6i)6i*6i+6i,6i-6i.6i/6i06i16i26i36i46i56i66i76i86i96i:6i;6i<6i=6i>6i?6i@6iA6iB6iC6iD6iE6iF6iG6iH6iI6iJ6iK6iL6iM6iN6iO6iP6iQ6iR6iS6iT6iU6iV6iW6iX6iY6iZ6i[6i\6i]6i^6i_6i`6ia6ib6ic6id6ie6if6ig6ih6ii6ij6ik6il6im6in6io6ip6iq6ir6is6it6iu6iv6iw6ix6iy6iz6i{6i|6i}6i~6i6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6i�6N)ZBIG5_TYPICAL_DISTRIBUTION_RATIOZBIG5_TABLE_SIZEZBig5CharToFreqOrder�rr�I/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/big5freq.py�<module>+s�000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/escsm.cpython-34.pyc000064400000016060151735047740026307 0ustar00�
�Re��@s�ddlmZmZmZdZeedeeeeeeeeeeeeeeeeeeededededddededddededeeeeeeef0ZdZied6dd	6ed
6ed6dd
6ZdZedeeeeeeeeeeeeeeeeeeeeeeeeeeeedeeeeeeeeeddeeeeeeeeeeeeeeeeeeeeeef@Z	dZ
ied6dd	6e	d
6e
d6dd
6ZdZedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedeeedeeeeedeeeeeeeeeeeeeeeeeeeeeeeeeeeefHZ
dZied6dd	6e
d
6ed6dd
6ZdZedeeeeeeeeeeeeeeeeeeedeeeeeedeeeeeeeeeeef(ZdZied6dd	6ed
6ed6dd
6ZdS)�)�eStart�eError�eItsMe������Z
classTableZclassFactorZ
stateTableZcharLenTablez
HZ-GB-2312�name�	zISO-2022-CN���
zISO-2022-JPzISO-2022-KRN(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)	rrrrrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrr	rrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)
rrrrrrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrrr)�	constantsrrrZHZ_clsZHZ_stZHZCharLenTableZ	HZSMModelZ
ISO2022CN_clsZISO2022CN_stZISO2022CNCharLenTableZISO2022CNSMModelZ
ISO2022JP_clsZISO2022JP_stZISO2022JPCharLenTableZISO2022JPSMModelZ
ISO2022KR_clsZISO2022KR_stZISO2022KRCharLenTableZISO2022KRSMModel�rr�F/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/escsm.py�<module>sh






python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/__init__.cpython-34.pyc000064400000001265151735047740026735 0ustar00�
�Re�@s&dZddlmZdd�ZdS)z2.2.1�)�version_infocCs�tdkrt|t�s7tdkrFt|t�rFtd��nddlm}|j�}|j�|j	|�|j
�|jS)N�rz-Expected a bytes object, not a unicode object�)�universaldetector)rr)rr)r�
isinstance�unicode�bytes�
ValueError�r�UniversalDetector�reset�feed�close�result)�aBufr�u�r�I/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/__init__.py�detects


rN)�__version__�sysrrrrrr�<module>spython3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/euctwprober.cpython-34.pyc000064400000001701151735047740027532 0ustar00�
�Re��@sZddlmZddlmZddlmZddlmZGdd�de�ZdS)�)�MultiByteCharSetProber)�CodingStateMachine)�EUCTWDistributionAnalysis)�EUCTWSMModelc@s(eZdZdd�Zdd�ZdS)�EUCTWProbercCs6tj|�tt�|_t�|_|j�dS)N)r�__init__rrZ
_mCodingSMrZ_mDistributionAnalyzer�reset)�self�r
�L/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/euctwprober.pyr"s
zEUCTWProber.__init__cCsdS)NzEUC-TWr
)r	r
r
r�get_charset_name(szEUCTWProber.get_charset_nameN)�__name__�
__module__�__qualname__rrr
r
r
rr!srN)	ZmbcharsetproberrZcodingstatemachinerZchardistributionrZmbcssmrrr
r
r
r�<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/sbcharsetprober.cpython-34.pyc000064400000005602151735047750030307 0ustar00python3.4�
�Re��@s�ddlZddlmZddlmZddlmZdZdZdZ	d	Z
d
ZdZedZ
Gdd
�d
e�ZdS)�N�)�	constants)�
CharSetProber)�wrap_ord�@igffffff�?g�������?��c@sReZdZdddd�Zdd�Zdd�Zd	d
�Zdd�ZdS)
�SingleByteCharSetProberFNcCs6tj|�||_||_||_|j�dS)N)r�__init__�_mModel�
_mReversed�_mNameProber�reset)�self�model�reversedZ
nameProber�r�P/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyr
-s

			z SingleByteCharSetProber.__init__cCsEtj|�d|_dgt|_d|_d|_d|_dS)N�r)rr�_mLastOrder�NUMBER_OF_SEQ_CAT�
_mSeqCounters�_mTotalSeqs�_mTotalChar�
_mFreqChar)rrrrr6s
			zSingleByteCharSetProber.resetcCs%|jr|jj�S|jdSdS)N�charsetName)r
�get_charset_namer)rrrrr@s	
z(SingleByteCharSetProber.get_charset_namecCs�|jds|j|�}nt|�}|s;|j�Sx�|D]�}|jdt|�}|tkr}|jd7_n|tkr|jd7_|j	tkr|j
d7_
|js�|j	t|}|jd|}n"|t|j	}|jd|}|j|d7<qn||_	qBW|j�t
jkr�|j
tkr�|j�}|tkr�t
jr�tjjd|jd|f�nt
j|_q�|tkr�t
jr�tjjd|jd|tf�nt
j|_q�q�n|j�S)NZkeepEnglishLetterZcharToOrderMaprZprecedenceMatrixz$%s confidence = %s, we have awinner
rz9%s confidence = %s, below negativeshortcut threshhold %s
)rZfilter_without_english_letters�lenZ	get_stater�SYMBOL_CAT_ORDERr�SAMPLE_SIZErrrrrrZ
eDetecting�SB_ENOUGH_REL_THRESHOLD�get_confidence�POSITIVE_SHORTCUT_THRESHOLD�_debug�sys�stderr�writeZeFoundItZ_mState�NEGATIVE_SHORTCUT_THRESHOLDZeNotMe)r�aBufZaLen�c�order�irZcfrrr�feedFsF


	
		
zSingleByteCharSetProber.feedcCshd}|jdkrdd|jt|j|jd}||j|j}|dkrdd}qdn|S)Ng{�G�z�?rg�?ZmTypicalPositiveRatiog�G�z��?)rr�POSITIVE_CATrrr)r�rrrrr!ps#z&SingleByteCharSetProber.get_confidence)�__name__�
__module__�__qualname__r
rrr,r!rrrrr	,s
	
*r	)r$�rZ
charsetproberr�compatrrr r"r'rrr-r	rrrr�<module>s
python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/eucjpprober.cpython-34.pyc000064400000004565151735047750027525 0ustar00�
�Re^�@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZGd	d
�d
e�Z
dS)�N�)�	constants)�MultiByteCharSetProber)�CodingStateMachine)�EUCJPDistributionAnalysis)�EUCJPContextAnalysis)�EUCJPSMModelc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�EUCJPProbercCsBtj|�tt�|_t�|_t�|_|j	�dS)N)
r�__init__rr�
_mCodingSMr�_mDistributionAnalyzerr�_mContextAnalyzer�reset)�self�r�L/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/eucjpprober.pyr
&s

zEUCJPProber.__init__cCstj|�|jj�dS)N)rrr
)rrrrr-s
zEUCJPProber.resetcCsdS)NzEUC-JPr)rrrr�get_charset_name1szEUCJPProber.get_charset_namecCs�t|�}xVtd|�D]E}|jj||�}|tjkr�tjr{tjj	|j
�dt|�d�ntj|_
Pq|tjkr�tj|_
Pq|tjkr|jj�}|dkr|d|jd<|jj|j|�|jj|j|�qa|jj||d|d�|�|jj||d|d�|�qqW||d|jd<|j�tjkr�|jj�r�|j�tjkr�tj|_
q�n|j�S)Nrz prober hit error at byte �
r)�len�rangerZ
next_staterZeError�_debug�sys�stderr�writer�strZeNotMeZ_mStateZeItsMeZeFoundItZeStartZget_current_charlenZ
_mLastCharr
�feedrZ	get_stateZ
eDetectingZgot_enough_data�get_confidenceZSHORTCUT_THRESHOLD)r�aBufZaLen�iZcodingStateZcharLenrrrr4s6		"%zEUCJPProber.feedcCs+|jj�}|jj�}t||�S)N)r
rr�max)rZcontxtCfZ	distribCfrrrrWszEUCJPProber.get_confidenceN)�__name__�
__module__�__qualname__r
rrrrrrrrr	%s
#r	)r�rZmbcharsetproberrZcodingstatemachinerZchardistributionrZjpcntxrZmbcssmrr	rrrr�<module>spython3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/euctwfreq.cpython-34.pyc000064400000167371151735047750027217 0ustar00�
�Re8���@sdZdZd�Zd�S(�g�?����������	�R���������
�n��!���L�,�A��s������L
�S
���������.�N�i�����:�����?���=�N�K������l	����
����
� ��
�����
�o�$��i���c�8����������z�|���t�"�
�e�@�\��	��������F��M
�Q�H���P�v���f�����D�T
����F�N
��E��O��/���s���3�<�2���&�L�����O
����G���M���?���`��F	�*���g�	�Z�
�:����K��	��	�������`�����g��	� �q��~����P
�	������!��u���*���	�
��~��������e���G�^�������U�C���B��������� �j�o�/���O�2	�[����
�&������S�(����p�]��6�i�
�'�������8��+�%�[���\��������X	�(������0��� �H�
�
�"�!���+��1�"���
�O�G	���f�1�����������2�9���l�,���	�������}�h�#�q
�Q�M�&��X���#����
�����j�����M�����%����$���'��	���N�i��7��J���!���������M��)�P�U
�����
��%�
�
��� ��
� �I���3	���
��r
���������m����$���x�������
������%�&���
��������&��'���'���.�����H	�������$�#���D�&�A��	��������U�G������
�Q
�P�S�'���d��0�F�����*��������J���U�����I	�R
���<��S
�:�7
��
���	�	�9���}���	���V�P�T
��)�C�����&�
��	�)���m	��������4	������n	�*��������O������	�+�(�
������U
�(���5�Y�j�
�l��u��)�
�*�+�V
�
�=�������������4��!����T�,�x�����e���	���J	�P��s
�5�A�V
�/�k���
��l�!�	���A��`��
���A��
����
���	���������M�
�������W
���
�t
����+�}��j�8
�����������-�)�m��	���W
���		��
��a��
�P�K	��,������7�'�u
���{�k�������
�9
������������1���b���	�
����o	���X
�,�Q����������
��
�X
�����5�D���l����[� 
����Y
��%��.�Y	��*����
���R������p����n�c�g�+����'�2�����{��l���m���:
���f�
	���|�5	�������Z
���
������,������;���I�Y�����[
�X�"���	������~�����,��k����-�������D�����>�]���,�������v�L�B�i�&�����
�����G������B���
�!
�����u�������	� �a�����v
�S���}�;
��D���=���0����\
�(������v� ���������.�����9�H�������]
�E���������!���/�������-���Q�*��.�/�������0�3��"
��*�R�����W�����/��b�.���	�����������R����)��2��	������������Z	���T��w
������	��������[	�O��	��`�7�x
�^
��������\	�������������g���n��
�_��~������0��
�a���y
�]	�������������	�;���	�-����L	������/��������`���#�"�������0�
�s�����d�s��
���Y
����k�w�o����������1��2���g�p�Q��U��v������C�S��^	���5���B���_��b�N�����X�����
��L�c�
�
�	�K�w�*�a�G�3��
����1�6�	�2�6	�N����	�3���:��\�q����-�����3�
�������x�
���r���4�
�_
��U����@��5���������/�+�6���������
�7	�Z
�����8�4��C������l��`
��������Y������5��	�{�����$�7��M�V�0�r�����g��V��8��9�,�Z����{�#�W�0���$��
��
��4��[��v���c��V�M	�$�-����X����d����W�[
�������q��
��1�����t����	����
�2��2�:�3� �.���2���
�������%�������
��������
��
�6��4���|���S����_	��
������`�����	�3���;�r����7�Y�L�;���	��	�����T�\�����<���V�5����
�����"�x�%��;�8	� ���2�E�=�!�����^��w��
�"�����s��#�<�Q����r�$��]��%��.�&��3�5�B��y�'��������>�Y�a
�b
�(�
�	�)�*�	�����:��6��^�����(��
�+�+���x�,�	�.�h�/�-����
�V����h���z�.�����<����;�/�?���
�	�0�8������5�6�
�_�)�1�2�	�3�y�	����
��^�4���?�$�+�\
��5�_�W����z
�6�0��
�]
�	���p	�7����8�^
�<
���V�9��6���I�w�}�c
�^��
�9�@��
�A�����	�:�e�1���B��������������7�;�<���=�{
���(�`�R�1�Y��I��	�����6��d
�>�����e
�?���o��q�Y�n���l��C�D�{���
�_
�E�P�U��������E�m��@���:�
��
�A������#
�	�N�
��B��C�W�T�T����
��f
�;�D��&��
�|���������
���<�=
��
����	�V���
��o���	�E��
�F�������������D�-�8���G�d��	���
�H�t����I�z�
��J��
��
�K���|
�����>
��������L�:�	�=���M��?
����H������N���	�O�P��F�k�Q�9�������
�	�u��v������R�S����}�
�>�������
�:�T�	���N	��C������U�~�� �W���G����,������O���|�����O�?�V�`	�� ��~��w����@�!����;������W���"��
�X��Y��R�g
�u���
�h
��
�x�=�
��Z��<����[��#��=� 	�\�$��]�H�I�^�7�O	�$
�
�_�%�v�J�� �!�w�t��`�a�b�9	�&���"�{����	�'�c���d�8������[�9���d�Z�	�e�����@
�!�(�"�f��������#�$�T�g�K���%��W�M�h���i�����%��������
�`
��y�7�m�L�j�k��:	�>�!�������B�)�l�|���
�z����i
���M�����
���m��n�u�q	�v����
�
�*�N�o�p���q�7�.�r���y��
���
��f����s�!	�y��
�O�	�����+�P�j
��
�>������Y��A�t��u�%
�
��v���z�2�w�,��	��	���3�Q����
�x��6�9�k
���&�6����-�
��R�y���Q�9�c��
�'�.�
�o�(�B�F�?�l
���)�e����
�z��
�S�T������{�/���"	�	�b�/���`���0�u��v���1��
�	��U��*���/�E��S��8�Z�|�}�F�+����!�~�2�,�F�P	��m
��
��e�s��C���r	������a�3�Z�%�-�����	�4�����A���
��
�i�
����D�.����	�n������
���	��3�5�J�0���s	��
�����@���V��/��	���6�W�A�7�o��
���P�0��1��n
���a�Q�2��p�:���P��b�������{�3�7�E���	����|�F�G�X�������]��
�4���}
�����
�5��&��8�	
�����	�������L�������
�	�Y�

�����4�
�B�9�8������	�H��
�/�3�Z�[���
�o
����:�0���n�\���]���^������	�����I������;��4��<��=�;�	��
����X�	�����5�_���
�
��������}�0�>�p
�J���K������&
�F�������
��
�#��[�����f��>�q
��?�r
��6�������
�������j�����@�-�p�9�;	�6�y�A������	�'
��������V�����`���4�����K�
�a��
�6����������"���K��

������	�Y�G�o��b�f�c�7��s
�p�r�	�8��������A
�Q	�
�C�,�
��������\�L��u��~
��
����9�����B��Z���
�C������j�d��0�h�g��e���M�}�7��
��
��D�	�����f�:����N�;�
�E�F��(
���<����G�M�=�w�g��~�t	�?�����
�t�m�#	��	��+���h�������[�
�O�	�����
���B
����$	�t
��
���a	���	��H������Q�"�<	�
����-�1��#�u
�'���D�����
��
�I���>�J�%	����P��
�i��
�=�a
��K��v
���������
�����_���j���?�E�1��
��
��k���8�Q����l�����
��m�@�
��b�������R������5�������L�	�w
��n�����4�H����M�����������\��o���N�]���
��\�x
�g��E�
������������p���
��q�
���������O�������r��Z��s�t������P�e�����������o�����^��}�������z�A�&	�������
�����n�-����
�Q��i�
������R���u��	�����B������
�y
����v�w�B�h�q�����<��*�i�S�"�T�C�>�)�
�x�U�����~������z���V�������C
�)�q����W�
	�������D���E�T�F�p�����#�#�y���
����G���z
������	�����S���X�
��������u	�
�=�H���_��R�������w�����Y�z�{�q����3���5���
���{
���|�}�S�~���
�
��Z�[�������`���F��]���n�����I���
����������G�T�J���K�z�S�r�\�)
��
�v	��5������
�b	���j��������
���]�^����c�������
����
�a�:�1�������A�h��a��
�6������b
�-���
�H�_���	��
����������|
��*
�f���	����
�D
��
�L�W����U��
���$���
�
���N���R	�k��E
�������M���S	�'	��`���s��F
���a�}
����
�(	�j��	�~
�V�B�[�b�W�����b�
�I��c
��
��{�����	����	�c�
��	��d�
�
�]������=	�e�������
����
�N�	����f�g�
��
�
��h������
�=��X���������d
��H�C�
�i��T�W�
�
��9��	�N���K�E�j�4�J�
�Y�
��G
�	�k���h�O��
�
��]�P�Z��l���Q�[�k��m�n�R�o�c	������S�X����\�+��������I�T�U�U����
���l��
�D����p��q�
�k�	�m��
�K��������V�8��
� ��r�@�W�r��
�C�G����
��^�
�����8�t��:���
�!��n�s��"��
�#�$�]�t�	�%��
�&�r�u�'�+
�(�)��e
�
�}�
�����*�4�1�+�����������,���
�>	�X�t�r�?	���
�-��v�u�{���w	�w���.�x�T	�,
����/�0�������1��
��2��
�G�R�
��^��Y�
�Z���
�[�3�^��������
�)	�\�	�4�@�v��5��6�7��d	�]��
���^�8��&��	����9�y�u���
���z�R��{�����(�_���<�9��l������_� 
�S�`�k���[�	���
�x�:��;�<�!
�$�=��|���>�d��
��?�e��������������
�}�@�A�B���.�~�a�O�
�����`�b��
�%�����
�;��
����C��D�������f
�"
�L�
�����
�E�;��F�&�G��
�
���x	�H�)����c��I�d�T���
�
�e��������	��J��g�~��U��e	�	����f�a�8�g��
�	�b�h�K�y	�����L��:�
�������*�M�i����c�t���M�N������	��
���f	���Y�d�e��*����O�H
��#
���#�;�
��	������I
�\�@	�����s�$
��
�P�Q�
�	�
�R�j�S�T���+���U��V����L�
�!��J
�\�4�W����X�Y�Z��[�>�w�k�f����+���%
����$��\����l�
�]��l�^�_�g
�%��`�a�g�����
���N�K
�b�c�d��
�c�w��
�e���b�y��f�h�g�h�h��'�i��m���z	�j�d�i����	�<����|����������O�k��
�l���
�a���m�����n�
��u���n�����e�&
�
�o�����	�<���p�q�P�Q��j��	��	����(��_�r�s�����<�E�R�f��������]���I�t�=��u��v��
���o�
�
�k�,�l�w�'
��	�m����F�`����f����
�S�J�x��y�z�n��L
���p�O�����
�{��
���A	�y����U	���|�}�~�F��q����
�	������������p����B	��o�	����p��-
���r���q�q���(
���r����s������
����
�(�.
�s�)
��t���	��*
���u���T�v�M
�{	���t��'�����
�����������g�Z�w�
�	�c��j�+
�p����x������h����
������,
�=����	��u������/
�y��
��	�y�v�	����w���������
�z������>���C�'�����{��Z�����������a����	��q�?��
��|��	�"���
����}�������=��A��1��)����?�
�
����x�	��	��	�
���h��S�����(��
���'�x�y��
���
��
������_�	����>��}�P���������~��
�N
��c��
����H��	�i��������������j���	�*	����
������h
���_���/��<��~�7�k�T���]��U�b�
�t���g	��z���
���|	����������{���	��0
���
��+	��,	����I����������B���4�s�
��������
���?�C���	��G��������������������|�1
���m�C	�����l���i
�}	���?����������h	�����I������V�����������^�������-	�.	���)���
����2
��i�����
�����A�����-
���������
���
���	�������
��
����
�����Q���
�O
���������z�K������[���J�����@��.
�����D	��}�/
�@��
�����
��@��R�����	�j
�~����J�����
�������
�0
��m�����m�~	���	����1
�����	������
�d�������X����9���������U��������L��3
������
�	�������	������
���$�(�v����&���b����������������{�����������������2
��	�������	���
����������^����V	�	�����������������2�W	��
�W�o�i	��k
�X���	�A�4
��
��3
����	������
����
���������	���H�����������D���I�s�
���
��� �����w��{�������/	�n�,������	��	���
�����
��4
�B����P
�5
��
��
�	���
��	���|��z�����
�'��5
����!���y����V�����	��������������	�
���-�������
��
��	�������
��"�%����J�C����x������	��l
�6
�����
��
����X����7
���	�
�N��m
����� �W���!�	��
��
�>�8
��"�#�9
�j	�D�����$�	
�%��
���X�&��'�E��(�F��)��x��	�k������*�+������D���,�������K�-�.�/�:
��0�J���1�|����������E�*�2�
�������H�x�����3������3������;
�p���<
��������4�5�	�	�6��O���
�7�8���9���:����;���������<�
��Y�=�>�
�	�?���@�A�B�
����=
��	����o�	�f�������
��
�	�	�C��D��#��
�>
��E���F�Z�E	����	�[�$�
���G�?
���	�����G������@
�H���A
�\�L�������
�I�	������i�J�	���
�	�K�L�]�M�N�
���j��Q
�
�B
�O�P����Q�
����R�
�S�T���(�����C
���U��V��W�X�����Y������Z����d�[�c�H��_��#�0	�\��]��n�

��	������^���_�k	�D
���`�a���b�����	�c������d����	�����d�^�E
�e�����
����f��_�7����� �
���F
���g�-����!����h�	�q�;������X�� �	����i�j������
�k�l�����~�m�G
�`�n�y�p����o�>��p���q�
���r���a�����s�t�"�u�|���?����v���������e���w�x�y������z�{�@�|���	�}��	����%�s��R
��.���M�?�
���~����b����@������������������������
��6
�I����������c����������2�����m��@����	����N����f����Z�
��������\�H
��d�����J����	���	��
��������K�����#�����������	����K������g�����h���>��.������������)�n
�t����
�o
��
�I
���
���q�����r��������p
����	����z����U��J
���1	�K
�t��������
�����J����L�	���������	�M��������	�����e���	�����	���������r��������������������������������������������������������������������������������������������������������������������� � � � � � � � � �	 �
 � � �
 � � � � � � � � � � � � � � � � � � �  �! �" �# �$ �% �& �' �( �) �* �+ �, �- �. �/ �0 �1 �2 �3 �4 �5 �6 �7 �8 �9 �: �; �< �= �> �? �@ �A �B �C �D �E �F �G �H �I �J �K �L �M �N �O �P �Q �R �S �T �U �V �W �X �Y �Z �[ �\ �] �^ �_ �` �a �b �c �d �e �f �g �h �i �j �k �l �m �n �o �p �q �r �s �t �u �v �w �x �y �z �{ �| �} �~ � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � � � � � � � �!�!�!�!�!�!�!�!�!�	!�
!�!�!�
!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!� !�!!�"!�#!�$!�%!�&!�'!�(!�)!�*!�+!�,!�-!�.!�/!�0!�1!�2!�3!�4!�5!�6!�7!�8!�9!�:!�;!�<!�=!�>!�?!�@!�A!�B!�C!�D!�E!�F!�G!�H!�I!�J!�K!�L!�M!�N!�O!�P!�Q!�R!�S!�T!�U!�V!�W!�X!�Y!�Z!�[!�\!�]!�^!�_!�`!�a!�b!�c!�d!�e!�f!�g!�h!�i!�j!�k!�l!�m!�n!�o!�p!�q!�r!�s!�t!�u!�v!�w!�x!�y!�z!�{!�|!�}!�~!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!�!�!�!�!�!�!�!�!�!�!�!�"�"�"�"�"�"�"�"�"�	"�
"�"�"�
"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"� "�!"�""�#"�$"�%"N(�rrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r	r	r	r	r	r	r	r	r	r		r
	r	r	r
	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r 	r!	r"	r#	r$	r%	r&	r'	r(	r)	r*	r+	r,	r-	r.	r/	r0	r1	r2	r3	r4	r5	r6	r7	r8	r9	r:	r;	r<	r=	r>	r?	r@	rA	rB	rC	rD	rE	rF	rG	rH	rI	rJ	rK	rL	rM	rN	rO	rP	rQ	rR	rS	rT	rU	rV	rW	rX	rY	rZ	r[	r\	r]	r^	r_	r`	ra	rb	rc	rd	re	rf	rg	rh	ri	rj	rk	rl	rm	rn	ro	rp	rq	rr	rs	rt	ru	rv	rw	rx	ry	rz	r{	r|	r}	r~	r	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r
r
r
r
r
r
r
r
r
r	
r

r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r 
r!
r"
r#
r$
r%
r&
r'
r(
r)
r*
r+
r,
r-
r.
r/
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r:
r;
r<
r=
r>
r?
r@
rA
rB
rC
rD
rE
rF
rG
rH
rI
rJ
rK
rL
rM
rN
rO
rP
rQ
rR
rS
rT
rU
rV
rW
rX
rY
rZ
r[
r\
r]
r^
r_
r`
ra
rb
rc
rd
re
rf
rg
rh
ri
rj
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv
rw
rx
ry
rz
r{
r|
r}
r~
r
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r
r
r
r
r
r
r
r
r
r	
r

r
r
r

r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r 
r!
r"
r#
r$
r%
r&
r'
r(
r)
r*
r+
r,
r-
r.
r/
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r:
r;
r<
r=
r>
r?
r@
rA
rB
rC
rD
rE
rF
rG
rH
rI
rJ
rK
rL
rM
rN
rO
rP
rQ
rR
rS
rT
rU
rV
rW
rX
rY
rZ
r[
r\
r]
r^
r_
r`
ra
rb
rc
rd
re
rf
rg
rh
ri
rj
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv
rw
rx
ry
rz
r{
r|
r}
r~
r
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�)Z EUCTW_TYPICAL_DISTRIBUTION_RATIOZEUCTW_TABLE_SIZEZEUCTWCharToFreqOrder�r�r��J/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/euctwfreq.py�<module>,s�site-packages/pip/_vendor/requests/packages/chardet/__pycache__/langthaimodel.cpython-34.pyc000064400000055474151735047750027743 0ustar00python3.4�
�Re,�@s9d�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zd�S)�������j�k�d����e�^���l�m�n�o����Y�_�p�q������@�H�I�r�J�s�t�f�Q���u�Z�g�N�R�`���[�O�T�h�i�a�b�\�������������X���������������v���������c�U�S��������������������������������K���4�"�3�w�/�:�9�1�5�7�+���,��0����'�>��6�-�	���=�����*�.���L��B�?��
��$��
�(�� �#�V�������������)��!��2�%���C�M�&�]���D�8�;�A�E�<�F�P�G�W�����ZcharToOrderMapZprecedenceMatrixg��@��?ZmTypicalPositiveRatioFZkeepEnglishLetterzTIS-620ZcharsetNameN(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr(r�r�rrrrrrrrr�r�rrrrr�rrrrr�rrrrrrrrrrrrrrrrr�r�rrrrrrr�rrrrrrrrr�rrrrr�r�r�r�rrr�rrrrr|rrrrr�r�r|rrrrrrrrr�r|r�r|r�r�rrr|r�r|r|rrr�rrrrr|rrr�r�rrrrr�rrrrr�rrrrrrrrrrrrrrrrrrr�rrr|rrr�r|r|r|rrr�r|rrr�r�r�r�r�r�r�r|rrr�r�rrr|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr|rrrrrrrrrrrrrrrrrrrrrrr|r|r|r|r|r|r|rrrrr|rrr|rrrrr|r|r|rrr�r|rrr�rrrrr|r|r�r|rrrrr�r|r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr|r|rrrrrrrrr�r|rrrrrrrrrrr|r|r|r|rrrrr|r|rrrrr|r|rrr|rrr|r|rrrrr�r|rrr�r|r|rrrrr�r�r|r�r�r�rrr�r|r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrrrrr|r|rrrrrrrrr|rrr|r|rrrrr|r|rrr|r|r|r|r�r�rrr�r|r�r�rrr|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr|rrr|rrrrr|r|rrr|rrrrr|rrr�r�r|rrr|r|r|rrr|r|r|r|r|r�r|r�r|r|r�r�rrrrr|r�r�r�r|r|r�r�rrr�r�r�r�r�r�r�r�r�r�r|rrr�r�r|r�r�rrrrr|rrrrr|r�r�rrrrr�rrrrr�r|r|rrr�r|r|r�r�r�r�r|r|r|r�r|r|r�r�r�r|r�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr|rrrrr|r�r�rrrrr�r|rrr�r|r�r|r|r|r|r�r|r�r�r|r|r|r�r|r|r�r�r�r|r�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr|rrr|rrr|r�r|r|r�rrr|r�rrr|r�r|rrr|r|rrr�r|rrr|r|r�r|r|r|r|r�r|r|r�r�r�r�r|r�r�r|r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr|rrrrr|rrr|r|r|rrr|r|rrr|r|r�r|rrr|r|rrr�rrr|r|r|rrr|r|r|rrrrr|r�rrr�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�rrr�rrrrrrrrrrr�r�rrr�r|r|rrrrrrrrrrr�r�r�r�r�rrr�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r|rrr�r�r�rrr�r|r�r�r�r�r�rrr�r�r�r�r�r�r�r�r|r�rrrrrrrrr�r�r|rrr�r�rrr�rrrrr|rrrrrrrrrrr�r�rrrrrrr�r�r�rrrrr�r�rrr�r�r�r�r|r�r�r|r�r�rrr�r�r�r�r�r|rrr�r�r�r�r�r�r�r�r�r�r�rrrrrrrrr|rrrrrrrrrrrrrrr�r|r�rrrrr|r|r�r|r|r|rrr�r�r|r�r|r�r|r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r|r�r|rrrrrrr�r|r�r|r|r�r|r�rrr|r|r�r|r�r�r�r|r|r�r�r|r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrr|r�rrrrr�r�rrr�r|rrr�r�rrr|r�r�r|r�r|r|rrr|r�r�r�r�r�r|rrr�r�r�rrr�r|r�r|r�rrr�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�r�rrr|rrrrrrr�rrr|r�rrr|r�rrr|r|r|r|r�rrrrr�r|r�rrr�r|rrr�r|r�r�rrr|r|r|r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rrrrr|rrr|rrrrr|rrr|rrr|rrrrr|r�r�rrr|r|r|r�r|r|r|r�r|r|r�r|r�r�r|r|r|rrr�r�rrr�r�r�r�r�r�r�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrr|rrr|r|r�r�rrr|rrr|rrr|r�rrr|r|r�r|r�r|r|r|r�r|r|r|r|r�rrr|r�r|r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrrr|rrr�r|rrrrr|r|rrr�r�r�r|r�rrrrr|r|rrr�r�r�rrr�r�r�r�rrr�r�rrrrr�r|r�r|r�r�r�rrr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr|rrr|rrrrr�r�rrr�r�r|r�r|r�r�rrr�r�r�r|rrr�r�r�r�r�r�r�r�rrr�r�r|r|r|r|r�r�r�r�r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr|r|r�r�r|r�rrrrr|rrr|r|rrr|r|rrr�r|r|r�r|r�rrr|r�r|r|r|r|r|r�rrr|r�r|r|r|r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrrrrrrrrr�rrrrr�r|r�r�rrr|r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r|r|r|rrr�r�r�rrr�rrr|r�rrr|r|rrrrrrrrrrr�r�r|r|r|r�r|r|r�r|r�r|rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r|rrr�rrrrr|rrrrr�rrrrr�rrr|r|rrr|rrrrrrr�r�r|r|rrr�r�r�r�rrr�r�rrr�r�r�r|r|r�r�rrr�r�r|r|r|rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr|rrrrr|r�rrrrr|r|rrr�rrr|r�rrr|r�r�r|r|r�r|rrr|r�r�rrr�r�r�r�rrr�r�r|rrr�rrr�r�rrr�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�rrr|r|r|r�r|r�r�rrr�r�rrr�rrr�r�r|r�r�r�r�r|r�r�r�r�r|r�r�r�r�r|r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�rrrrrrrrr|r|r|r|r|r�rrr�r�r�r|r�r�r�r|r�r|r�rrr|r�r�rrr�r�r�r�r�rrr�r�r|rrr�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rrr�rrrrr�r|r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rrr�rrr�r�r�r|r�r�r|r�rrrrr|rrrrrrr|rrr�r�r|r|r|r�r�r�r|r|r�r�r�r�r�r�r�rrr�r�r�r�r|r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�rrr�r|r�r�r�r�r�r�r�r�r�r�r�r|rrr�rrrrr�r�r�r�rrr�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�r|rrr�r|rrr�r�rrr�r|r|r�r�r|r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrr|r�r�r�r�r�rrr�r|r|r|r|r|r|r�r�r�r�r�rrr�r�r�rrr�r�r�r�r�r�r�r|r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�rrr�r|r|r�rrrrr|rrrrr�r�r�r�r|r|r�r|r�rrrrr�r�r�rrr|r�r�r�r�r|r�r�r�r�r�r�r�r�r|r�r�r�rrr�r�r|r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�rrr�r�rrr�rrr�r�r�r�r�rrr|r�r�r�rrr�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�rrrrr�rrr|r�rrrrr�r|r|r�r�r|r�r�r�r|r�r�r�r�r�rrr�r�r�rrr�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r|r�rrrrrrr|r|r�r�r�r�r�rrr�r�r�r|r|r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r|rrr�r|r�r�r|r�r�rrr�r�r�r|r�r�r�r�r�rrr�r�rrr�r�r�r|r|r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�rrr�r|r�r�r|r|r�r�r|r�r�r�r�rrr�r|r�r�r�r�r|r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r|r|r�r�r�r|r�r|r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�rrr�r�r�r�r�r�r�r�rrr|r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rrr|r|r�r�r�r�r�r�r�r�r|rrr|r�r|r|rrr�r�r�r|rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr|r|r�r�r�r�r�r�r|r�r|r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�rrr�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�rrr�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�rrrrr�r�r�r�r|rrr�r�r|r�r�r�r�r�r�r|r�r�r�r�r�r|r�r�r�r|r�r�r�r�r|r�r�rrr�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�rrr�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr|r�r�r�r�r�r�r�r|r�r�r�r�r�r|r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�rrr�r�r�r�r�r|r�r�r�r�r�r�r�r�r|r�r�r�r�r�rrrrr�r�r�r�r|r�r�r�r|r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r|r|r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r|r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|rrr�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r|r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r|r�r�r|r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r|r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)ZTIS620CharToOrderMapZ
ThaiLangModelZTIS620ThaiModel�r�r��N/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/langthaimodel.py�<module>%s*
python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/constants.cpython-34.pyc000064400000000502151735047750027204 0ustar00�
�Re7�@s4dZdZdZdZdZdZdZdZdS)���gffffff�?N)�_debugZ
eDetectingZeFoundItZeNotMeZeStartZeErrorZeItsMeZSHORTCUT_THRESHOLD�rr�J/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/constants.py�<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/langhebrewmodel.cpython-34.pyc000064400000055512151735047760030264 0ustar00python3.4�
�Re6,�@s9d�Zd�Zied�6ed�6d�d�6d�d�6d�d�6Zd�S)������E�[�O�P�\�Y�a�Z�D�o�p�R�I�_�U�N�y�V�G�C�f�k�T�r�g�s�2�J�<�=�*�L�F�@�5�i�]�8�A�6�1�B�n�3�+�,�?�Q�M�b�K�l�|���������(�:���������������������S�4�/�.�H� �^���q���m���������"�t���v�d�����u�w�h�}�����W�c���j�z�{���7�����e�����x���0�'�9����;�)�X�!�%�$���#���>����~�����&�-��������������������	������������������
�������
����`�ZcharToOrderMapZprecedenceMatrixgC��|�?ZmTypicalPositiveRatioFZkeepEnglishLetterzwindows-1255ZcharsetNameN(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrrrrr9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r(r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)Zwin1255_CharToOrderMapZHebrewLangModelZWin1255HebrewModel�r�r��P/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/langhebrewmodel.py�<module>&s*
python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/jpcntx.cpython-34.pyc000064400000057355151735047760026521 0ustar00�
�Re�J��@s,RddlmZdZdZdZdZdZdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddddddd	ddddddd	dddd	ddddddddddddddddddddddddddd	d	d	d	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	dd	ddddd	dddd	dd	dd	dddddddddddd	dddd	d	dd	d	d	dd	d	ddd	d	ddddddddddddddd	dddd	dddddd	ddd	dd	ddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddd	dddddddd	dddd	dddddddddd	dddddd	d	dd	d	ddd	dddddddddddddddd	dddd	dddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	dddd	dddddd	dddddddddddddd	ddddddddddddd	ddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd	dddddddddfSddddddddddd	dddddd	dddddd	dddddddddddd	ddddd	dd	d	ddd	dddddddddddddddddddd	ddddddd	d	dd	dddddd	dfSdd	dd	ddddddddddddddddddddddddddddddd	dddd	ddd	ddddddddddddddddddddddddddddddd	ddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	dddd	d	ddddddddddddddddddd	ddddddddddddd	ddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddd	dddd	dd	dd	dd	dddd	d	dddddddddddddddddddddddddd	ddd	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	d	dddddddddddddddddddddddddddddddddddd	d	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddd	ddddddddddddd	dddddddddddddddddddd	d	ddd	ddd	dddddddddddddddddddddddddddddd	d	dddddd	fSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	ddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddddddddddd	ddd	ddddddd	fSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	ddddddd	dddd	dddddddddddddddd	ddddddd	dddd	dddddddddddddddddddd	ddddddddd	ddddd	dddddddfSddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd	ddddddddddddddddfSddddddddddd	d	dddddddddddddddddddddddddddddddddd	ddddddddddd	dddddddddddddddddd	d	dddddddfSddddddddddddddddddddddddddddddddddddddd	dddd	ddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddd	ddddddddddddddddddddddddddddddddddddd	dddddddd	fSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddd	ddddddddddddd	dddd	ddddddddddddddddddddddd	dddddddddddddddddddddddddddddd	ddddddd	fSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	ddddddd	d	ddd	dddd	dddd	ddddddddd	d	ddddddd	dddddd	d	dddddddddddddddddd	d	dddddd	d	d	d	ddddddddfSddddddddddd	dddddd	dddd	dddddddddddddd	ddddd	ddddddddddddddddddddddddddddddddddddd	ddddddfSddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd	dddd	ddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	dd	dddddddddddddddddddddddddddddddddddddddddddfSdddd	ddddddd	dddddd	ddddddddddddddddddddd	dddddddd	dddddddddddddddd	dddd	dddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdd	dd	dddddd	ddd	dd	dddddddd	ddddddddddddddddddddddd	d	dddddddddddddddd	ddd	ddddddddd	ddddddddfSdd	dd	ddddddddd	dddddddddd	dd	ddddddddddddddddd	dddd	d	ddddddddddddddddddd	dddddddddddddddddfSdddd	dd	ddddd	d	d	dddddd	dddd	dd	dddddddddddddd	ddd	d	ddd	d	ddddddddddddddddddd	dddddddddddddddd	d	fSdddddd	ddddddddddddd	ddddddddddddddddddddddddddd	dddddddddddddddddddd	dddddddddddddddddfSdddd	ddddddd	d	ddd	dd	dd	dd	dd	dddddddd	dddd	dddddd	ddddd	dddddddddddddddddddd	ddddddd	d	d	dddddddd	fSdd	dddddddd	ddddddddddddd	dd	ddddddddddd	dddddd	ddddd	ddddddddddddddddddd	dddddd	dddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdd	dddd	ddddd	d	ddddddd	dddddddddddd	d	ddddddd	d	dd	d	dddd	dddddddddddddddd	ddd	dddddd	dddddddddd	dfSdd	dd	ddddddddddddddd	ddddddd	ddd	dddddddddddd	d	dddddddddddddddddddd	dddddddddddddddddddddfSddddddddddd	ddddddddddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddfSddddddddddddd	ddddddddddddddddddddddddd	dddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddd	d	ddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	dd	ddddddddddddddddd	dd	d	d	dddd	d	ddd	dddd	ddddddddddddddddddddddd	dddddddddddd	dd	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd	dddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddd	ddddddd	ddddd	ddd	ddddddddddddddddddddddddddddd	ddddddddfSdd	dddd	ddddddddddddddddd	dddddddddddd	ddddddd	dddd	dddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddddddddddddddd	ddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddd	dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddd	dd	ddddddddd	dddddddddddddddddddd	ddddddddddddddddddddddddddddddddddddddd	dddddddddfSdddd	ddddddd	dddddddddddd	ddd	ddddddddddddd	ddd	d	ddd	d	d	dddddddddddddddddddddddddddd	ddddddd	fSddddddddddddddddddddddd	dddddddddddddddd	d	ddd	ddd	dddddddddddddddd	dddd	dddddddddddddddddfSdddd	ddddddd	d	ddddddd	dddddddddddd	d	ddddddd	d	dd	d	ddd	d	dddddddddd	ddddddddd	dddddd	dddddddddddfSddddddddddd	d	ddddddddddddddddddd	ddddddd	d	dd	d	d	ddd	d	d	dddddddddddddd	ddddddddddd	dd	ddddddd	dfSdddddd	dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddd	dddddddddddddddd	ddddddddddddddd	dddddddddddddddddddddddddddddddddd	dddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfSddddddddddddddddddddddd	dd	ddddddddddddddddddddddddddddddddddddddddd	dddddddddddddddddfSddddddddddd	d	dddddddddddddddddddd	ddddddd	d	d	d	dddd	d	ddddddddddddddddddddddddddddddddddddfSfSZGd
d�d�ZGdd
�d
e�Z	Gdd�de�Z
dS)�)�wrap_ord��di������c@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�JapaneseContextAnalysiscCs|j�dS)N)�reset)�self�r
�G/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/jpcntx.py�__init__|sz JapaneseContextAnalysis.__init__cCs8d|_dgt|_d|_d|_d|_dS)NrrF���)�
_mTotalRel�NUM_OF_CATEGORY�_mRelSample�_mNeedToSkipCharNum�_mLastCharOrder�_mDone)rr
r
rrs
			zJapaneseContextAnalysis.resetcCs�|jr
dS|j}x�||kr�|j|||d��\}}||7}||krw|||_d|_q|dkr�|jdkr�|jd7_|jtkr�d|_Pn|jt|j|d7<n||_qWdS)NrrTrrr)rr�	get_orderrr�MAX_REL_THRESHOLDr�jp2CharContext)r�aBufZaLen�i�order�charLenr
r
r�feed�s 			#

	zJapaneseContextAnalysis.feedcCs
|jtkS)N)r�ENOUGH_REL_THRESHOLD)rr
r
r�got_enough_data�sz'JapaneseContextAnalysis.got_enough_datacCs0|jtkr(|j|jd|jStSdS)Nr)r�MINIMUM_DATA_THRESHOLDr�	DONT_KNOW)rr
r
r�get_confidence�sz&JapaneseContextAnalysis.get_confidencecCsdS)Nrr)rrr
)rrr
r
rr�sz!JapaneseContextAnalysis.get_orderN)	�__name__�
__module__�__qualname__rrrr r#rr
r
r
rr
{sr
c@seZdZdd�ZdS)�SJISContextAnalysiscCs�|s
dSt|d�}d|ko1dknsRd|koMdknr[d}nd}t|�dkr�t|d�}|dkr�d|ko�d	knr�|d|fSnd|fS)
Nrr�����r����r)rrr)r�len)rr�
first_charr�second_charr
r
rr�s8	(zSJISContextAnalysis.get_orderN)r$r%r&rr
r
r
rr'�sr'c@seZdZdd�ZdS)�EUCJPContextAnalysiscCs�|s
dSt|d�}|dksBd|ko=dknrKd}n|dkr`d}nd}t|�dkr�t|d�}|d	kr�d|ko�d
knr�|d|fSnd
|fS)Nrr���r�r���r)rrr)rr.)rrr/rr0r
r
rr�s(		(zEUCJPContextAnalysis.get_orderN)r$r%r&rr
r
r
rr1�sr1N)�compatrrr"rrr!rr
r'r1r
r
r
r�<module>s������������������������������������������������������������������������������������8site-packages/pip/_vendor/requests/packages/chardet/__pycache__/mbcsgroupprober.cpython-34.pyc000064400000002102151735047760030323 0ustar00python3.4�
�Re��@s�ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZGd
d�de�ZdS)
�)�CharSetGroupProber)�
UTF8Prober)�
SJISProber)�EUCJPProber)�GB2312Prober)�EUCKRProber)�CP949Prober)�
Big5Prober)�EUCTWProberc@seZdZdd�ZdS)�MBCSGroupProbercCsTtj|�t�t�t�t�t�t�t�t	�g|_
|j�dS)N)r�__init__rrrrrrr	r
Z	_mProbers�reset)�self�r�P/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/mbcsgroupprober.pyr*s
zMBCSGroupProber.__init__N)�__name__�
__module__�__qualname__rrrrrr)srN)ZcharsetgroupproberrZ
utf8proberrZ
sjisproberrZeucjpproberrZgb2312proberrZeuckrproberrZcp949proberrZ
big5proberr	Zeuctwproberr
rrrrr�<module>spython3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/gb2312freq.cpython-34.pyc000064400000206273151735047760026764 0ustar00�
�Re���p@sdZdZdrZdqS(sg�������?������<	�T���	�Q��
�
�����<�w��9	���	������Z����q���
�W
�y���e�o���v
����������L�B��Q
�����Q����E��f����������d�(�y���,�	���
�E�e��
�W�R����|	�R
��
���
�X
��
�j�E���+�P��������;���m���l���������e�H������^�k�6���"�F���
��
�
�^	���
������?�`�u�$�1��
����� �U���1����g�l����		��G���2���q	�� �P��L	�������y	����
���M���k��4	�������
�	�@	�`��5�����N
��7�3��n��u�G�&�b�h�0��M�N���	�
�Y	��
���	�
���
�&��
�Q�
�7�^�h����J��P�����r���������T	�-�G�,�u���	���$���<�B��$�>����x�L�W����n�
���T���Z���
��	�{���	����
�?�
�0�b�;�D�������C�S��U�>	�|�g����	��
�K���

�����%
�5
������l��h�
����?��� �U�����	��*�<
��
���
��
������
���
�!	�X
���	��Q�g������	���r�
����q��
���z
���	�3�������
�
�]�c�z���7���_���C��&�a�H�|
�l�
��=���I�P��
���~
�8�`��w	���
�T��
�������
�������[�q����	�g��|�C�	����N�I����5�
�(���/�H�K
�
�����9��I���|�������
���W�����^�~�����	��=�X��3�
�I����
������3�r������o������{��i�C���!�H��	������f��=
��1�[���|�D��%��t���
�� ��.����y��T���9
��
��#���J���n�����
���>�B�"����a�����M�K����W���	�	�!
�r	�F�+	��
�
����x
�H�J��������2�K���R
�$��9�
�t
���
����������������%�~��
�`	�������'�v������|��'���n
�*�����F��%��)�~��
���J�&���
�!�D���w��[���	���	�'	�	���k���	�
��
�����������h
�B�_��?��g�h���'��������������5�]�������������1	��)�a	�������;	����_����Q�/�u
��
�
�j�[���}��
�����	����Q�^
��G��z������V�O���������m�u�	�6�����-�$���R���}	�
�p�r�]
�
�D�������i������1�n������t�Y�G	���/�|�t�0�
������\��
�����v�����c����
�~�A�"��"	�!�8�C�8	���	�j�
�1��l�>��
��]
��
�~��L�(����K�d��v�D������%��	������	�,��2���
���j�-�.���m�K�����o�	�;�	����d�@�a�	�M	�1
�L�@�2��w��t�Q�
�/�� ���~�����
�/����
�_	�#���O��O�G���k�[�O�o����-
�
���	�!���I������{�r��.�h�
��T
����'�L
�a��
�@��������
�T�/
���������M���i
�l�����
�{�8�#�
����9��S�R�	�w��Z��0
�E�g�g���
���L�����p����S�
�������	�@��I	�L�;
�O�q����)	��:�F��5�J�d�A
���
�)
�E�L�Y�����
�m	������������c��R��!����
���(����]�I���
��	���e����������`�������
��[��C
�(�P�,��}�O	�'�L�\
�
������Z����s�'�	�U�������N
�����
���M��������������i���g�'����	���
��P�0�s	�i��p	�	�n������\�
���
�!�h����m�(�&�
�C��B�)�5	�������
�����>�������	���{�N�����E�3��J�#��c��
��$
���5��x��]�����k����������P
��
���r���L��z�d���#�
����[�S��h��G�����
�U�+��	�y��w�"��V�2
�&�z��	��	��J
�P	��	�������%	�Z�$�o�T�K�1�
��`�V����d�����+����A��������$��	�_�3�\���������b��f������
�A�n���x��F�
�O�[����(���
�#�7�2	�x��f	��	��
�!�6�{
����Y����+����� ������	�	�K�e����
�T�$����h��	�R���"���Z� 
�_��@���a�����3
�
�k�)�j����e��
�A�^���
�W	����h�:
�z
�)
��|�������8�j����
���3�	�
�z���p�y����2�o�D	�=���.��9�a�f��*�_��	�*����
�
���-��
�}��
�����*	�
�t��t�6
�q�������������S� 	���!�)��y�
�����j	��	���V�I���g
���L�����p�D�����%���M����$������E	�"�U	��e
�	�|��	�Q�������
�1
�������$� �]�4�&���z����`���w�
�����
�)�%
�&�����*���8�2�>
�S�
����1�#���
���#�	�
�������F
���,	�>�+�
���Z�3�q���
�$��
�V��	�;���N���m�K�W����5�
�	�R�4���I��D�������
���
������%�K�|���
������9��n	�����
�-�3�2
�p���?
��~��������C��[��
������3	�>���l�
�`�x	�������#
����0������	�L
���Q���R��?�(�m��`
���3����&
�
���s�D��0	�b	�f�@�	����
��=��
�<�������
���6����s������S�����
�8�Z
�����������
����
�����N��	��
�L�
�J	����	�b��g����[
������~��	�	����f�����
��`�4�=	�����l�?	��c�����i����������w����%���d	�^�+������Z��F�I
��t���	�/��	���y�*
�s�&�+����)����	����
��e	�����Q�]	��	�_�7	��0�c�u����L�k�
������#����������?�����
�n�
������	�����	�H��Y��u	���
�	��J���_�_�&���������Z�%��	�s���S����V���������1�'����F�\�
�|�	�W�����|��S�W��	�*�	�R�l�P�#���-�q
����	���4�������a�����@
���X�i�%����8
�3�,��}������d�x��	���#	��6��
��
�.���A��
���r
��
��R�d����+
������
�{�{�H�	�
���������c�	�
�����,��I
���c������=��J�.�,�>����L�e�]��
�C�����*�;�
�� ��p�
����R���9�
�
��
����?�:�	�����Q�'�s���w�[��
��-�
�)����M�������]�}�6�@�
��U����/���s
�	���k	�?���,
�=
�1�M����/�S
�d�����o
�6	�k�u����W�{��x�W���������x�^����[	�+�7�:���U���!����
�.�H�T���Y����	��@�"�C�s�	��	��G
�b��7�~�.
�U��q�	�����{�����Y�/�
����A�
���*�:�8�'��������A�_�0�������i��K��
���t�*����
�������	��
����D�����>����v��

��
�'��V�����
����k���\�����!����*�U
�������z��\�f
����	�
�����������������B	������{��=�
���&�
���V��	��"�!��
�	�����
�(	�=��
��
���9����4�a�����-�Q	��
���
�m�������C���7�}�q�D�4���u���	�����v���F	���u�a
��H�o��
�
	�l�K�A	�����	�z�4�	�!
�H
��	���5��j���`��
�B�:�O�a���#�����d���(�
�&
��^�m�g
�E
��o	���(�G�$�@�
�I���A���`�X��7���/��$�����h�����	�U�"�T�������m����!�������� ��M�	������	�2�q����9����������/�������p�@�X	��j��i
�^
�b��
���n��v������o�o���v�����0���9���$	���f�S�z�
��D�{���X�����V�3�Y�
����
�A�������q�U�
�:	��2�j����{	��	�F��
�	��	������c�i�R	�;�k�h�����
��Y�O�x��z�Z�<�v	��
�
�
���I���4
�M��������b��������C����
����O��8������	�.�]��V�c
��	����
�H	��T����	��>
�
���3�����,����f����l�T�W�H�.�'�>�p�����"��	�J���
��
�v�2����	�x�	�2���g� �4����
�
���{
�z	���	�
����	��������?�����	�J������
�	�8���E�j
�\��8�8
�� ����`��>�b�S����������0�����E����d����1�����n�@������T��	�����Q���C���K�;�k���������_�\	�e��w�������M��.	�r�a����
����
����g���'�
����	�T���4�o���	�X�y��x���	��
�
�U
�^�:�������"�#�������	������N�U���p��"
�-��	���:���
���	������	���W�
�G
�L��
�G�w�o�����M�r�����Q
���I�N�%�
�X����7
��
�a�����	�'
�i�h��}�N�y�?�t���D������l����	����e�J�s�2�*�y�����������q����5�}�s�$�����5
�B������#�d�s�}���~����b
��O
�/	�]����	�]�2����f�7���O�

�R��#
�	�[��E���f
�S
�	�d�F����C	�V
�>��	���B���	�1�6�m����	��������p
�����
��<�z�
�|
�X����s�e�]�����
��
��O���+��	�������:�	�A���������(
�
�m��4�P��	�n��
�o�o���m��y���8�	���<����<�c	�C�����&�w�
��	�$� 
�9�&����)�`�������G�b�E��:�Q�o�F�
�����	�
�F�|�;�
���3�4�%���:�	�c��p�6
�\�C��0�9
��������~	���"�h������	�)��	��
���*
���
�
�%��	�����
�.����9�	�����
���	��"�!��,
��g	�J�g�F
������
���;�i	�Z�E�^�A
���l�5�������4�'
���k�	��	�2���
��	�X�7���
�{���B�x�=�e�(�������'��������������D
�i�k�������-�,��
�e�7
������������n�}
�p�7�j��	��9���
�������0�P�����������O
�
���	���U�
����<
����
�J���t�N���)��.����*��A���r
�]�)������G��_
�p�k
���
	�%�
����
���>�b�_�^�?��:�Y�D�%����
�������Y��
��������l
�A���	��
�	�D�B�	�
���	�@
�(�v
������g��
�	�}�v����
����������������� �-�~��y�%�	��
�_���������j�M���G�+�	������	������3
�;�
�G�)��
���������
�
��,�I�	�����X�A�\������P�v���	�V��=�
�
�6�<���X��
�	��8�-	�Y
���������c�����9�	�-
�u���	��
�R�
���6���	��h	�}��?
�w
�����	�a�(���1��
���>�������]��
�X�r�P�0�,��+�j��`������.���
��&	�W�B
���|�7�U���	��W��Y��
���w
�
��������u���b��q
����b������=�$
��N�J����U�����	���i�K�,���4�r�{����H��p�5���=��	���E�9��;��<��5��
��i��\����p������r��N����^�����K����*��{�+
�	��*�8����	������j
��@�l	�6���2�8���	������'������B
����\�����S�V	��~���������
��V��
�z���^�	����_
�}
�G�q��I�����8�t�h�S	��}�R�	�9��S�n
�P��B�����s���X�}�f����������������n�I�^��T���x���r����_��b��O�P�Q�R�S��T�<�V
��Y���
������1�U�L�V�4����U�E���M�3�f��������F��������B�G�����������������
�?�
��V�&�H�W�W�X����@���s�:��X�Y�Z��t��.
�K�[�����r���Y������'���(�4���������
����5�������	��Z�B�I�	
�&���
�?��0��[��	��a��Y
���i���\�����L�@�����W�������}����M�]���1�����J�^�;��K�t�� ����u�����_��`�T��s���
�a��������
�N�\�b��A�c�t���������������a�U�
��
����r���B�O�����z������D�������d�C��
��������������D�4
�
�]�����j������e�L������f��^�g�u�C�~
�h����b���2������i����(����N���M�X���Z�j�����5�_�����u��������������<�=�M��
�k���e�:�`�E�v��l������`
����)�m�n�N�F���
�;��o�)���V�a��c�	�G�����o����s���p�O����q�w�~�r����b���*���V���P������H�c��f�����(���I�s���t�u��d�Q�e�W�	��������
�k���+������N��v�����J�
�
�9�����R�S��f���g��p����w���A�K���h�Z
���i���b�x���
�������j�y��<�����!��+�s
��������j�l����,��R���z�{��T�C�D�c��
����
�k����m�:
�	�D�
��+�L�|��-�E�������t�l��M�N���	�������U�����O��}�*�~��B��P���[�u�Q���������	��5�O�l�R��=����V�5���������S��T���X���Y����m���P����n�����E��U����q���v�W��m�o�������p�g�"
�.�����q����&��P�r���e
����������'�,�s�t���d��������Y������+���Q�����u��
����X���e����3����F��
�����r���������
�u� �V�
�(�����Y�w���������Z�o
�n�6���
�v����.�������f����������������J�=��w��x��������c����f����G�����������o�Z��[�p����
�����P���[�d�4������5����6��������7������!����H�8���-���������g�h������\��������q�����,���h��� �]�i�	�x��y���[���	�
����	�W�����N	��6����)�|�R��t	���>�����Z����j��f�^����������>�/���*�
��
�����v���
�-��y�C�]�
��E�D��X�k�
�����<�Z������F��������
�����
�����������
���z�����Y��!�{������A�Z���S������%�_���������|�[���\�}����X��I����0�����?�R��1���@���]�~�z�k��T�C
�2��6��^������
����e���������r�x������_�!����`�`�	����
����F�
�����������������[����������^�������
�f����h
�_�k
����+�"���#�h�����~����������J�$�����%���&�'�Q�����'�����c��\���d�}�\��.���K��
���
���������t
�����b���s�������n��������������������"����
�G�N�U�
�����J
���v���
��#�]�V������
�������������/
�v�j�/������+����������3��E���
�����������a�,���.�����
�w��
�\�A����B����(
���v����t�/���$�H����S����������)������������
���#���������b���������]�O��
��a��%��������(��
���������������^���D
������u
�����c�d��
����L���4�:����������������
���c�W
�R�����?������� �H�?����=���������������
�V��������������i�����/�)��E�b���x��l�������e�����W������*�c��H
�9�������
��������y�d�,�m��e�����j�������`���+��f�������� ������g����n���!�6�I���
��
��:�"�������f�������a����g����q��
���N��C��0���0���-��
������
�i�M
�~��$����a��������T
�h���b
������#�c
�
���&���"��������/����M
���:�-�$�F���u�����F�v��K��������:����%�l
������������o�����X���)�����&�'���{������������p�����i�,�������5������O�Y���j��
�����k�6�-�M�<��	�������@���h�@��x
���(����y��� ���������"�.���/�0�.���������l���m
�7���g�N���O��1����
�)����������!� �q�����*�P������
�P��\���r������������Q�����w�z��G��"����������
�������
�i����+�s�t���%�z�i���E
�y
�#�����j�����J�a
��������k��.�$�`�����%����D���������l��G���K����Z�����,�1���6�������m�����&���'���s�n����E������(�[���/�����������l�o���8�����������t���>���p��w���O�����7������)�����-��.� ����
�
�����	�����W����2���!�/�k�m
������q�3���*�+�
�0�����q��S��&���r�x��
�1�
��m�,�4�X��s�������-�����"��;����*�\��2�8�R�y���3����n����������4��	�����u�����;���
��e������5��n�
���d
���y
�.��������o������6�7����K
�;�����Q���(��
������t�������;��F�H�/�����������v����S�8�T�9��������/�]�:��"�u����	�0�9�#�
��
�<���
��;��������U�$��
����<�1���Q�%�[
���=�[�����7�����>��2���Y�����+��p�?���:��
���@�^����q��A�����V�5������
�L�2��3���
����r����	����3�
������������4�w����������4�6�B�����|�S�����P
�&��
�
�x�v��������'���?�0����������C��5�
���w��=��6���7���
�>�0����� ���!�8�s��p
�������������(�
����"��#��)����$���D����*���%����+������f��E��x�����������_���k����F�
��l�7�`�M�G�y�&��H�'���9���:�;�A�x��;��I�g��<�J�����(���K���^�L�M��,�8�����y�z��5�<��z��}��_�)�N�?�=���a�<�O�����*����F�W�<����>���������P�����+���{���
�� ��,������I���!�e�"�-�	�����Q�9�#�R����|��S��.�m���$�/��������
�%���T�����U��V����,�?��m�@����6�-�W��X�.�&�`�:�/�0�A�H�1�0�\
�2�z�7����}���B�@��
�1�
������C�'�b�3��(�
�A��)�2�4�;�t�~�3����B����N�u��Y���*�Z��a��{�X���[�+�c�� ��\���;
�,�-�T�U�����v���5�	�6���D�
�]�{���7��
�y����8��b�.����9�:�|�<�/�~��;����h��0���1�2��
�����3�4���m�<�^��{���_����E�F���`�5���a���Z�|�Y��i��	
�w�=�b�G�����4���
����I������Z�=�>�>��c��
���d�������x�5����?�6�H���I�@�1�_�
��J��A�7��K����e�f�g��=�
���0
��h�@�B��8�[�9�C�n�:�D�i�������;�j�����y�}�<�z�E�k�l����{���=�>�����|�L���2�?�J�����m���|�M�n�}�}�@��F�����~�B�>���d�-����o�p��������c�G��d�����q���\�e�G�O�A�H�B�6��
�=���N���I�O���7�~�J�K���C�~�r�L������M�o�8�?�����N���s��=�����t���C����@�u��K	������9����O��P����Q����������� �r�Y�����v��?���R�w�S�T��`�U�D�V�x���E��P�W��X���!�Y�����$��\��1�����������"�Q�Z����7����A�y��������d
���[���B�z���\�
��
�������V���{��f�]�|�^�}���B��������:�_����;�����`�<�p��F��P���a��b�G��-�c�]��d������g�H���I����e����u�������q�J�f��g�j�K�~�h���^���#��������i�H�L���j��R��S����M����
�!�T�������k�w�����n�����l�#�>����Z	���H���#������N�m�����������n��oN(prrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r	r	r	r	r	r	r	r	r	r		r
	r	r	r
	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r 	r!	r"	r#	r$	r%	r&	r'	r(	r)	r*	r+	r,	r-	r.	r/	r0	r1	r2	r3	r4	r5	r6	r7	r8	r9	r:	r;	r<	r=	r>	r?	r@	rA	rB	rC	rD	rE	rF	rG	rH	rI	rJ	rK	rL	rM	rN	rO	rP	rQ	rR	rS	rT	rU	rV	rW	rX	rY	rZ	r[	r\	r]	r^	r_	r`	ra	rb	rc	rd	re	rf	rg	rh	ri	rj	rk	rl	rm	rn	ro	rp	rq	rr	rs	rt	ru	rv	rw	rx	ry	rz	r{	r|	r}	r~	r	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r
r
r
r
r
r
r
r
r
r	
r

r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r 
r!
r"
r#
r$
r%
r&
r'
r(
r)
r*
r+
r,
r-
r.
r/
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r:
r;
r<
r=
r>
r?
r@
rA
rB
rC
rD
rE
rF
rG
rH
rI
rJ
rK
rL
rM
rN
rO
rP
rQ
rR
rS
rT
rU
rV
rW
rX
rY
rZ
r[
r\
r]
r^
r_
r`
ra
rb
rc
rd
re
rf
rg
rh
ri
rj
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv
rw
rx
ry
rz
r{
r|
r}
r~
r
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r
r
r
r
r
r
r
r
r
r	
r

r
r
r

r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r 
r!
r"
r#
r$
r%
r&
r'
r(
r)
r*
r+
r,
r-
r.
r/
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r:
r;
r<
r=
r>
r?
r@
rA
rB
rC
rD
rE
rF
rG
rH
rI
rJ
rK
rL
rM
rN
rO
rP
rQ
rR
rS
rT
rU
rV
rW
rX
rY
rZ
r[
r\
r]
r^
r_
r`
ra
rb
rc
rd
re
rf
rg
rh
ri
rj
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv
rw
rx
ry
rz
r{
r|
r}
r~
r
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorp)Z!GB2312_TYPICAL_DISTRIBUTION_RATIOZGB2312_TABLE_SIZEZGB2312CharToFreqOrder�rqrq�K/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/gb2312freq.py�<module>*sPsite-packages/pip/_vendor/requests/packages/chardet/__pycache__/universaldetector.cpython-34.pyc000064400000007217151735047770030667 0ustar00python3.4�
�Re��@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlZdZ
dZdZd	ZGd
d�d�ZdS)�)�	constants�N)�Latin1Prober)�MBCSGroupProber)�SBCSGroupProber)�EscCharSetProberg�������?�c@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�UniversalDetectorcCsDtjd�|_tjd�|_d|_g|_|j�dS)Ns[�-�]s(|~{))�re�compile�_highBitDetector�_escDetector�_mEscCharSetProber�_mCharSetProbers�reset)�self�r�R/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/universaldetector.py�__init__-s
		zUniversalDetector.__init__cCsidd6dd6|_d|_d|_d|_t|_d|_|jr]|jj�nx|j	D]}|j�qgWdS)N�encodingg�
confidenceFT�)
�result�doneZ_mStart�	_mGotData�
ePureAscii�_mInputState�
_mLastCharrrr)r�proberrrrr4s						zUniversalDetector.resetcCsN|jr
dSt|�}|s#dS|js�|dd�tjkr_idd6dd6|_q�|dd�tjkr�idd6dd6|_q�|dd�tjkr�idd6dd6|_q�|dd�d	kr�id
d6dd6|_q�|dd�dkr%idd6dd6|_q�|dd
�tjkrXidd6dd6|_q�|dd
�tj	kr�idd6dd6|_q�nd|_|jdr�|jddkr�d|_dS|j
tkr(|jj
|�r�t|_
q(|j
tkr(|jj
|j|�r(t|_
q(n|dd�|_|j
tkr�|jsbt�|_n|jj|�tjkrJi|jj�d6|jj�d6|_d|_qJn�|j
tkrJ|js�t�t�t�g|_nx\|jD]N}|j|�tjkr�i|j�d6|j�d6|_d|_Pq�q�WndS)N�zUTF-8rg�?r�zUTF-32LEzUTF-32BEs��zX-ISO-10646-UCS-4-3412s��zX-ISO-10646-UCS-4-2143rzUTF-16LEzUTF-16BETgr���)r�lenr�codecs�BOMr�BOM_UTF32_LE�BOM_UTF32_BE�BOM_LE�BOM_BErrr�search�	eHighbyter
r�	eEscAsciirr�feedrZeFoundIt�get_charset_name�get_confidencerrrr)r�aBufZaLenrrrrr,@sh			 				zUniversalDetector.feedcCs�|jr
dS|js6tjr2tjjd�ndSd|_|jtkrlidd6dd6|_	|j	S|jt
krd}d}d}xD|jD]9}|s�q�n|j�}||kr�|}|}q�q�W|r|t
kri|j�d6|j�d6|_	|j	Sntjr|tjjd�xM|jd	jD]8}|sOq=ntjjd
|j�|j�f�q=WndS)Nzno data received!
T�asciirg�?rgz"no probers hit minimum threshhold
rz%s confidence = %s
)rrr�_debug�sys�stderr�writerrrr*rr.�MINIMUM_THRESHOLDr-ZmProbers)rZproberConfidenceZmaxProberConfidenceZ	maxProberrrrr�close�sB				

		zUniversalDetector.closeN)�__name__�
__module__�__qualname__rrr,r6rrrrr	,sFr	)�rr2r#Zlatin1proberrZmbcsgroupproberrZsbcsgroupproberrZ	escproberrr
r5rr+r*r	rrrr�<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/sbcsgroupprober.cpython-34.pyc000064400000003267151735047770030347 0ustar00python3.4�
�Re��@s�ddlmZddlmZddlmZmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZmZddlmZmZddlmZddlmZdd	lmZGd
d�de�ZdS)
�)�CharSetGroupProber)�SingleByteCharSetProber)�Win1251CyrillicModel�
Koi8rModel�Latin5CyrillicModel�MacCyrillicModel�Ibm866Model�Ibm855Model)�Latin7GreekModel�Win1253GreekModel)�Latin5BulgarianModel�Win1251BulgarianModel)�Latin2HungarianModel�Win1250HungarianModel)�TIS620ThaiModel)�Win1255HebrewModel)�HebrewProberc@seZdZdd�ZdS)�SBCSGroupProbercCs�tj|�tt�tt�tt�tt�tt�tt�tt	�tt
�tt�tt�tt
�tt�tt�g
|_t�}ttd|�}ttd|�}|j||�|jj|||g�|j�dS)NFT)r�__init__rrrrrrr	r
rrr
rrrZ	_mProbersrrZset_model_probers�extend�reset)�selfZhebrewProberZlogicalHebrewProberZvisualHebrewProber�r�P/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/sbcsgroupprober.pyr+s.
															
zSBCSGroupProber.__init__N)�__name__�
__module__�__qualname__rrrrrr*srN)ZcharsetgroupproberrZsbcharsetproberrZlangcyrillicmodelrrrrrr	Zlanggreekmodelr
rZlangbulgarianmodelrr
ZlanghungarianmodelrrZ
langthaimodelrZlanghebrewmodelrZhebrewproberrrrrrr�<module>s.python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/mbcssm.cpython-34.pyc000064400000042071151735047770026465 0ustar00�
�Re�L�@sX	ddlmZmZmZd"ZeeedeeeeeeeeeeeeeeeeeeeefZd#Zied6dd6ed	6ed
6dd6Zd$Zeedeeedded
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefFZ	d%Z
ied6dd6e	d	6e
d
6dd6Zd&Zddddeeeeeeeeeeeeeeeeeeeeeeeeeededeeeeeeef(Z
d'Zied6d
d6e
d	6ed
6dd6Zd(ZeedeeeeeeeeeeeeefZd)Zied6dd6ed	6ed
6dd6Zd*Zeeeddddeeeeeeeeeeeeeeeeeeeeeeeeedeeeeeeeeeeeeeeef0Zd+Zied6dd6ed	6ed
6dd6Zd,Zeeeeeedeeeeeeeeeeeeeeeeedeeeeeeeeedeeeeeeeeeeeeef0Zd-Zied6dd6ed	6ed
6dd6Zd.ZeeedeeeeeeeeeeeeeeeeeeeefZd/Zied6d
d6ed	6ed
6dd6Zd0Z dddeddeeeeeeeeeeeed
d
d
d
eed
d
d
d
d
ed
d
d
d
d
d
dddeddd
d
ed
d
d
d
d
d
d
eeeef8Z!d1Z"ie d6d
d6e!d	6e"d
6dd6Z#d2Z$d
d
dd
ddeeeeeeeeeeeedddeeedddeded
d
dd
dddddedddeeedddddedeeef8Z%d3Z&ie$d6d
d6e%d	6e&d
6dd6Z'd4Z(eeeeeeddddddd
dddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeddddeeeeeeeeeeeeedddeeeeeeeeeeeeddddeeeeeeeeeeeeeeddeeeeeeeeeeeeddddeeeeeeeeeeeeeeedeeeeeeeeeeeeddddeeeeeeeeeeeeeeedeeeeeeeeeeeedddeeeeeeeeeeeeeeeeeeeeeeeeeeef�Z)d5Z*ie(d6dd6e)d	6e*d
6d d6Z+d!S)6�)�eStart�eError�eItsMe����Z
classTable�ZclassFactorZ
stateTableZcharLenTableZBig5�name����	�
ZCP949zEUC-JPzEUC-KRzx-euc-twZGB2312Z	Shift_JISzUTF-16BEzUTF-16LE���
���zUTF-8N(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	r	r	r	r	r	rrrrrrr	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
r
r
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)
rrrrrrrrrr(rrrrrrrrrrrrrrr	r	rrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	r	r	r	r	r	r	r	r	r	r	rrr	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	)rrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)rrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	)rrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	)rrrrrr(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
r
r
r
r
r
r
r
r
r
r
r
rr
r
rrrrrrrrrrrrrrrr)rrrrrrrrrrrrr	r	rr),�	constantsrrrZBIG5_clsZBIG5_stZBig5CharLenTableZBig5SMModelZ	CP949_clsZCP949_stZCP949CharLenTableZCP949SMModelZ	EUCJP_clsZEUCJP_stZEUCJPCharLenTableZEUCJPSMModelZ	EUCKR_clsZEUCKR_stZEUCKRCharLenTableZEUCKRSMModelZ	EUCTW_clsZEUCTW_stZEUCTWCharLenTableZEUCTWSMModelZ
GB2312_clsZ	GB2312_stZGB2312CharLenTableZ
GB2312SMModelZSJIS_clsZSJIS_stZSJISCharLenTableZSJISSMModelZ
UCS2BE_clsZ	UCS2BE_stZUCS2BECharLenTableZ
UCS2BESMModelZ
UCS2LE_clsZ	UCS2LE_stZUCS2LECharLenTableZ
UCS2LESMModelZUTF8_clsZUTF8_stZUTF8CharLenTableZUTF8SMModel�rr�G/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/mbcssm.py�<module>sh

$
















python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/compat.cpython-34.pyc000064400000000745151735047770026466 0ustar00�
�Re��@sFddlZejdkr*eefZneefZdd�ZdS)�N�cCs0tjdkr(t|t�r(t|�S|SdS)Nrr)rr)�sys�version_info�
isinstance�base_str�ord)�a�r	�G/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/compat.py�wrap_ords
r)rr)rr�str�unicoder�bytesrr	r	r	r
�<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/hebrewprober.cpython-34.pyc000064400000005610151735047770027606 0ustar00python3.4�
�Re/4�@s�ddlmZddlmZmZddlmZdZdZdZ	dZ
dZd	Zd
Z
dZdZd
ZdZdZdZdZGdd�de�ZdS)�)�
CharSetProber)�eNotMe�
eDetecting)�wrap_ord�������������������g{�G�z�?z
ISO-8859-8zwindows-1255c@speZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�HebrewProbercCs-tj|�d|_d|_|j�dS)N)r�__init__�_mLogicalProber�_mVisualProber�reset)�self�r�M/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/hebrewprober.pyr�s
		zHebrewProber.__init__cCs(d|_d|_d|_d|_dS)N�� )�_mFinalCharLogicalScore�_mFinalCharVisualScore�_mPrev�_mBeforePrev)rrrrr�s			zHebrewProber.resetcCs||_||_dS)N)rr)rZ
logicalProberZvisualProberrrr�set_model_probers�s	zHebrewProber.set_model_proberscCst|�tttttgkS)N)r�	FINAL_KAF�	FINAL_MEM�	FINAL_NUN�FINAL_PE�FINAL_TSADI)r�crrr�is_final�szHebrewProber.is_finalcCst|�ttttgkS)N)r�
NORMAL_KAF�
NORMAL_MEM�
NORMAL_NUN�	NORMAL_PE)rr%rrr�is_non_final�szHebrewProber.is_non_finalcCs�|j�tkrtS|j|�}x�|D]�}|dkr�|jdkr�|j|j�rq|jd7_q�|j|j�r�|jd7_q�q�n?|jdkr�|j|j�r�|dkr�|jd7_n|j|_||_q,Wt	S)Nrr)
�	get_staterZfilter_high_bit_onlyrr&rrr+rr)r�aBuf�currrr�feed�s 

zHebrewProber.feedcCs�|j|j}|tkr tS|tkr1tS|jj�|jj�}|tkr]tS|tkrntS|dkr~tStS)Ng)	rr�MIN_FINAL_CHAR_DISTANCE�LOGICAL_HEBREW_NAME�VISUAL_HEBREW_NAMErZget_confidencer�MIN_MODEL_DISTANCE)rZfinalsubZmodelsubrrr�get_charset_name�s

zHebrewProber.get_charset_namecCs2|jj�tkr.|jj�tkr.tStS)N)rr,rrr)rrrrr,szHebrewProber.get_stateN)�__name__�
__module__�__qualname__rrrr&r+r/r4r,rrrrr�s

;rN)Z
charsetproberr�	constantsrr�compatrr r'r!r(r"r)r#r*r$ZNORMAL_TSADIr0r3r2r1rrrrr�<module>s"dsite-packages/pip/_vendor/requests/packages/chardet/__pycache__/charsetprober.cpython-34.pyc000064400000003402151735047770027760 0ustar00python3.4�
�Ren�@s3ddlmZddlZGdd�d�ZdS)�)�	constants�Nc@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�
CharSetProbercCsdS)N�)�selfrr�N/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/charsetprober.py�__init__"szCharSetProber.__init__cCstj|_dS)N)rZ
eDetecting�_mState)rrrr�reset%szCharSetProber.resetcCsdS)Nr)rrrr�get_charset_name(szCharSetProber.get_charset_namecCsdS)Nr)r�aBufrrr�feed+szCharSetProber.feedcCs|jS)N)r	)rrrr�	get_state.szCharSetProber.get_statecCsdS)Ngr)rrrr�get_confidence1szCharSetProber.get_confidencecCstjdd|�}|S)Ns([-])+� )�re�sub)rrrrr�filter_high_bit_only4sz"CharSetProber.filter_high_bit_onlycCstjdd|�}|S)Ns([A-Za-z])+r)rr)rrrrr�filter_without_english_letters8sz,CharSetProber.filter_without_english_letterscCs|S)Nr)rrrrr�filter_with_english_letters<sz)CharSetProber.filter_with_english_lettersN)�__name__�
__module__�__qualname__rr
rr
rrrrrrrrrr!sr)�rrrrrrr�<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/chardistribution.cpython-34.pyc000064400000014666151735047770030510 0ustar00python3.4�
�Re
$�@sOddlmZmZmZddlmZmZmZddlm	Z	m
Z
mZddlm
Z
mZmZddlmZmZmZddlmZdZdZd	Zd
ZGdd�d�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Z dS)�)�EUCTWCharToFreqOrder�EUCTW_TABLE_SIZE� EUCTW_TYPICAL_DISTRIBUTION_RATIO)�EUCKRCharToFreqOrder�EUCKR_TABLE_SIZE� EUCKR_TYPICAL_DISTRIBUTION_RATIO)�GB2312CharToFreqOrder�GB2312_TABLE_SIZE�!GB2312_TYPICAL_DISTRIBUTION_RATIO)�Big5CharToFreqOrder�BIG5_TABLE_SIZE�BIG5_TYPICAL_DISTRIBUTION_RATIO)�JISCharToFreqOrder�JIS_TABLE_SIZE�JIS_TYPICAL_DISTRIBUTION_RATIO)�wrap_ordig�G�z��?g{�G�z�?�c@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�CharDistributionAnalysiscCs)d|_d|_d|_|j�dS)N)�_mCharToFreqOrder�_mTableSize�_mTypicalDistributionRatio�reset)�self�r�Q/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/chardistribution.py�__init__/s			z!CharDistributionAnalysis.__init__cCsd|_d|_d|_dS)zreset analyser, clear any stateF�N)Z_mDone�_mTotalChars�_mFreqChars)rrrrr;s		zCharDistributionAnalysis.resetcCs}|dkr|j|�}nd}|dkry|jd7_||jkryd|j|krv|jd7_qvqyndS)z"feed a character with known length�rriN���)�	get_orderrrrr)r�aBufZaCharLen�orderrrr�feedDszCharDistributionAnalysis.feedcCsi|jdks|jtkr"tS|j|jkre|j|j|j|j}|tkre|SntS)z(return confidence based on existing datar)rr�MINIMUM_DATA_THRESHOLD�SURE_NOr�SURE_YES)r�rrrr�get_confidenceRsz'CharDistributionAnalysis.get_confidencecCs
|jtkS)N)r�ENOUGH_DATA_THRESHOLD)rrrr�got_enough_databsz(CharDistributionAnalysis.got_enough_datacCsdS)Nrr r)rr"rrrr!gsz"CharDistributionAnalysis.get_orderN)	�__name__�
__module__�__qualname__rrr$r)r+r!rrrrr.s	rc@s(eZdZdd�Zdd�ZdS)�EUCTWDistributionAnalysiscCs,tj|�t|_t|_t|_dS)N)rrrrrrrr)rrrrrps
		z"EUCTWDistributionAnalysis.__init__cCsBt|d�}|dkr:d|dt|d�dSdSdS)Nr���^r�r )r)rr"�
first_charrrrr!vsz#EUCTWDistributionAnalysis.get_orderN)r,r-r.rr!rrrrr/osr/c@s(eZdZdd�Zdd�ZdS)�EUCKRDistributionAnalysiscCs,tj|�t|_t|_t|_dS)N)rrrrrrrr)rrrrr�s
		z"EUCKRDistributionAnalysis.__init__cCsBt|d�}|dkr:d|dt|d�dSdSdS)Nr�r1rr2r )r)rr"r3rrrr!�sz#EUCKRDistributionAnalysis.get_orderN)r,r-r.rr!rrrrr4�sr4c@s(eZdZdd�Zdd�ZdS)�GB2312DistributionAnalysiscCs,tj|�t|_t|_t|_dS)N)rrrrr	rr
r)rrrrr�s
		z#GB2312DistributionAnalysis.__init__cCsUt|d�t|d�}}|dkrM|dkrMd|d|dSdSdS)Nrrr5r2r1r )r)rr"r3�second_charrrrr!�s!z$GB2312DistributionAnalysis.get_orderN)r,r-r.rr!rrrrr6�sr6c@s(eZdZdd�Zdd�ZdS)�Big5DistributionAnalysiscCs,tj|�t|_t|_t|_dS)N)rrrrrrr
r)rrrrr�s
		z!Big5DistributionAnalysis.__init__cCspt|d�t|d�}}|dkrh|dkrQd|d|ddSd|d|dSndSdS)	Nrr�r2��?�@r )r)rr"r3r7rrrr!�s!z"Big5DistributionAnalysis.get_orderN)r,r-r.rr!rrrrr8�sr8c@s(eZdZdd�Zdd�ZdS)�SJISDistributionAnalysiscCs,tj|�t|_t|_t|_dS)N)rrrrrrrr)rrrrr�s
		z!SJISDistributionAnalysis.__init__cCs�t|d�t|d�}}|dkrJ|dkrJd|d}n1|dkrw|dkrwd|dd}ndS||d	}|d
kr�d}n|S)
Nrr��������r<�r r )r)rr"r3r7r#rrrr!�s!	z"SJISDistributionAnalysis.get_orderN)r,r-r.rr!rrrrr=�sr=c@s(eZdZdd�Zdd�ZdS)�EUCJPDistributionAnalysiscCs,tj|�t|_t|_t|_dS)N)rrrrrrrr)rrrrr�s
		z"EUCJPDistributionAnalysis.__init__cCsBt|d�}|dkr:d|dt|d�dSdSdS)Nr�r1r2rr )r)rr"�charrrrr!�sz#EUCJPDistributionAnalysis.get_orderN)r,r-r.rr!rrrrrE�srEN)!Z	euctwfreqrrrZ	euckrfreqrrrZ
gb2312freqrr	r
Zbig5freqrrr
Zjisfreqrrr�compatrr*r'r&r%rr/r4r6r8r=rErrrr�<module>s Asite-packages/pip/_vendor/requests/packages/chardet/__pycache__/latin1prober.cpython-34.pyc000064400000006103151735047770027520 0ustar00python3.4�
�Rey�@s�ddlmZddlmZddlmZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	e	eeeeeee
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
e
e
e
e
e
eee
e
e
e
e
e
e
e
eee
e
e
e
e
ee
e
e
e
e
eeefZdZGdd
�d
e�ZdS)�)�
CharSetProber)�eNotMe)�wrap_ord��������c@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�Latin1ProbercCstj|�|j�dS)N)r�__init__�reset)�self�r�M/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/latin1prober.pyrbs
zLatin1Prober.__init__cCs*t|_dgt|_tj|�dS)Nr)�OTH�_mLastCharClass�FREQ_CAT_NUM�
_mFreqCounterrr)rrrrrfs	zLatin1Prober.resetcCsdS)Nzwindows-1252r)rrrr�get_charset_namekszLatin1Prober.get_charset_namecCs�|j|�}xf|D]^}tt|�}t|jt|}|dkrZt|_Pn|j|d7<||_qW|j	�S)Nrr)
Zfilter_with_english_letters�Latin1_CharToClassr�Latin1ClassModelr�	CLASS_NUMrZ_mStater�	get_state)r�aBuf�cZ	charClass�freqrrr�feedns

	
zLatin1Prober.feedcCs�|j�tkrdSt|j�}|dkr:d}n$|jd||jdd|}|dkrsd}n|d}|S)Ng{�G�z�?grrg4@g�?)rr�sumr)r�total�
confidencerrr�get_confidence|s		
zLatin1Prober.get_confidenceN)�__name__�
__module__�__qualname__rrrrr#rrrrr
as
r
N)@rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr)Z
charsetproberr�	constantsr�compatrrZUDFrZASCZASSZACVZACOZASVZASOrrrr
rrrr�<module>sj	python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/utf8prober.cpython-34.pyc000064400000003542151735047770027301 0ustar00�
�Re\
�@s`ddlmZddlmZddlmZddlmZdZGdd�de�Z	dS)	�)�	constants)�
CharSetProber)�CodingStateMachine)�UTF8SMModelg�?c@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�
UTF8ProbercCs*tj|�tt�|_|j�dS)N)r�__init__rr�
_mCodingSM�reset)�self�r�K/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/utf8prober.pyr%s
zUTF8Prober.__init__cCs'tj|�|jj�d|_dS)N�)rr	r�
_mNumOfMBChar)r
rrrr	*s

zUTF8Prober.resetcCsdS)Nzutf-8r)r
rrr�get_charset_name/szUTF8Prober.get_charset_namecCs�x�|D]�}|jj|�}|tjkr>tj|_Pq|tjkr]tj|_Pq|tjkr|jj	�dkr�|j
d7_
q�qqW|j�tjkr�|j
�tjkr�tj|_q�n|j�S)N�r)rZ
next_staterZeErrorZeNotMeZ_mStateZeItsMeZeFoundItZeStartZget_current_charlenrZ	get_stateZ
eDetecting�get_confidenceZSHORTCUT_THRESHOLD)r
�aBuf�cZcodingStaterrr�feed2s
zUTF8Prober.feedcCsLd}|jdkrDx$td|j�D]}|t}q(Wd|S|SdS)Ng�G�z��?�r
g�?)r�range�
ONE_CHAR_PROB)r
Zunlike�irrrrEszUTF8Prober.get_confidenceN)�__name__�
__module__�__qualname__rr	rrrrrrrr$s
rN)
�rZ
charsetproberrZcodingstatemachinerZmbcssmrrrrrrr�<module>s
python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/euckrfreq.cpython-34.pyc000064400000255313151735047770027175 0ustar00�
�Re���&"@sdZdZd("Zd'"S()"g@�0	�
��x�t�����H�a�������+��W�u��h��]�������������v�w�������m�F�!�p�������������x���/������������9�����t���-�y��K������������O��n������������0����<�4�{����������i���r����������������������X�X���������Y���&��P�������������^��������������9�������������Q���"��t������]�{�7����{��;��u���z�/��|�������7���.��������������{����#�|�}��~��t�8��_�	�
���
�!����_���������*��u��`�"���|�������a�������?��R�!� �/���!�"�=���#��$�%�&�'�(�)�,���'�b�$�*��+��-���,�������&�U����#���-�.�'���f�/�s��0�������� ��9�e�[�1����Z���:�����2�3���G����y�4�����5�6�7�,�w����s�8����9�:���~�;��<�;�}�=�>�?�o�)����@��A�B����2�Y�C�D��<�E�F�G�H�I�%�J�K�L�M�N�O��`�>�P��=�Q��R��S�T�;�������U��V�W�X�4�Y���Z�[��\�]���^���_�"�P���`�;��~�H�a��v��z�?����b���<�c�d�d�e�f�c�0��d��g�y���h�i�s�0�j�=�k��l�����<�b���U������I�m�n�o��p�q�r�s�t�u�������6�v�w��*��]�x�y���z�Z��-�:��b�
�{�|��&�'����5����>�}�~�w��g����6��%���(��v����w������E������������f���V��7�����B��N��[��'���������S�������e���x������������������������?�����q��f��(�)����~���\���������)��������������$����������l�����~�����C�����@��������2����K��z�V��������Q�r�f������ �h�+�3��1�������g�(����z��������������������A��<�j���M�g��2�������������������V�h����J�����0����b�������������Y���������a�!�*����������K�D�8��R��B��@����������y����������X�:����#������i���G����k����=��������!������J�����=����}����j�����������������������E����������j�O�4�����������������	�v�]��C���������o�����
����l�c�A������������T����k����������3�*��q�����>��������+������;��p��x�������������	��
����
������l�������)������m�8���D��������������7�L�B���D�������t���� �!�
�"�#�$�%�R�&�'�(�)�*��+�,��,�-�.�m���
�^�/�c��E�����a�m�0�E�1�2�3����4�T�����5������6�7��n���o�8�9�F����:�G�;�<�=�>�?�@�A�B�C�D�E�$�F�G�����%���p�H�I�J�K�L�����������M�N�O�P�Q�R���S�/�T��U�����V��I�H��������W��X��q�Y�Z�[�\���r��s�]�^�_�`��v�L�a����.��b�F�>�����j�c�Z����B�6��`�d�e����|��f���5�g��h��i�H��j����k��l���1�m�n�o�p�q�r�C�s�t�u�v�w���x�y�z�{���|�}�~���������O��������������E���q���I��\��-���S����
��e�����l��M���Q��P���^��
�-�F���������������������
�.���t�����J���������g�������������������������������������u�����9�	������	���$���������5�%��k�L����������������A��������������R��u���������)�����:��������������"�$�v�����c�Z�����������*�W��K���L���+���������������	�B�����?���������������M�[�5�������n����������C���'���������������
�������	��������������F�T�/����������8��u������K���(�M���i��������������T��?���������e� �(��������%�0����O��	�8�	�	�	�	�	�����	�	�	����#����		����V�
���P�� �M�W���
	��	��|�	�
	�S������������	�	�����	�	�	�	�	�	���	�	��9�D���������	�3����	�	�	�{�	����	�	�	�� 	�������!	�k�������N���Y���"	�#	�$	�%	�&	�'	�(	�]�)	�*	�+	�,	�-	�.	��/	�����>�����1	������\��2	��3	�����4	�5	�6	�w�7	��8	��3�����9	�:	�L�����;	���<	���������������=	��J�>	�?	�@	���A	���B	�C	�D	���E	�����F	�G	�H	�I	������������J	�K	����L	�M	�N	��I�O	�P	���Q	�R	�S	��T	���U	�V	�W	�X	���Y	�Z	�[	�\	�]	����^	�_	�`	�a	����b	�c	�d	�e	����f	�g	�U���x� �h	����i	�j	�����4�&�������!�����S�y������"�
���#�k	���l	�m	�n	�����p�Q��.�o	�U��O���p	���q	�r	�s	�x�t	��u	�v	�w	���$�x	��y	���`�z	�{	�|	�}	���~	�	�	�	�	�	�	�	���C�������%�y���o�	���	�	�	�	�	�	��	�	�	�	����	����	�	��@����	�G�	������2��������	�	�	�	�N�	���������	�	�	�	�	�r�	���z�n�����P�	�#�	�&�Q�	���m�	�c����	�'�	�w�	�	���(�l�@�������)���*�	�	�	�	���	�	�	�	���	����	�	�	�H��	�	��	���	�	�	���	�	�r�	���A�	�������	�}�,���:�����
��I�	�N��1�	�W������������	�+��	��	�1���b����	�q��	�,��	���e����_��d��	��	��	��	��	��	����2�����	���	��	��	��	���	���	��	��-��	�����	��	��	��	��	��	����	��	��	��	��	��	���	����	��	����7��	����	���	��	��	��	��	��	��	������������,�G�������	��^��	��	�.��	��g���	����	�	�	���	�����_��	�	�	���h�h��{�	�|����3�	�	�	�����	�
�
�\�����
�
�
�
�
�
�
��	
�

�
�
����
�j�
�i��4��
�
�
�
�
�
���
�
�
�
��6�d���/�
�
����o�
��R������	�&�
�k�n�z��������
��
����X��d��S��}�
�}����~������� 
�!
�N�"
����������#
���s�$
�%
�&
�f�D��1�'
���(
�@�)
�^�����*
���+
�,
�-
�.
�/
�J�+�0
�1
�2
���T��3
�4
�5
�6
���7
�A�.�����8
�9
��"�:
�;
���<
�=
�>
���0�?
��@
��A
�B
��C
�D
�E
�F
�G
���_�[�H
�I
���`�a�J
�����K
�L
�M
�N
��O
��i����P
�Q
�R
�S
�T
�U
�V
�W
�X
�Y
�Z
�[
�\
�]
�^
�_
�`
�a
�b
�c
�d
�e
�f
�g
�h
�i
�j
�k
�l
�m
�n
�o
�p
�q
�r
�s
�t
�u
�v
�w
�x
�y
�z
�{
�|
�}
�~
�
�
�
�
�
�
�
�
�
�
�
�
�
��p�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
��
�
�
�
�
�
�
��
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
��
�	��
��
��
��
��
��
��
��
��
��
��
��
�
��
���
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
���
��
��
�U��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
�
�
�
�
�
�
�
�
�1�
�
�
����������	�
���
������������������� �!�"�#�$�%�&�'�(�
�)�*�+�,��-�.��/�0�1�2�3�4�5�6�7�8�9�:�V�2�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�3�s�t�u�v�w�x�y�z�{�|�}�~�������������������������������������������������������������������������������������������4��������������������������������������������������������������������������������������������������������������	�
�����
������������������� �!�"�#�$��%�&�'�(�)��*�+�,�-�W�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�5�i�j�k�l�m�n�o�p�q�r�s�t�u��v�w�6�x�y�z�{�|�}�~���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
�
�
�
�
�
�
�
�
�	
�

�
�
�

�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
� 
�!
�"
�#
�$
�7�%
�&
�'
�(
�)
�*
�+
�,
�-
�.
�/
�0
�1
�2
�3
�4
�5
�6
�7
�8
�9
�:
�;
�8�<
�=
�>
�?
�@
�A
�B
�C
�D
�E
�F
�G
�H
�I
�J
�K
�L
�M
�N
�O
�P
�Q
�R
�S
�T
�U
�V
�9�W
�X
�Y
�Z
�[
�:�\
�]
�^
���_
�`
�a
�b
�c
�d
�e
�f
�g
���h
�i
�j
�;�k
�l
�m
�n
�o
��p
�q
�r
�s
�t
�u
�v
�w
�x
�y
�z
�{
�|
�}
�~
���
�
�
�
�
���
� �!�
�
�
�"�
�
�
�
�
�#�
�
�
�
�
�$�
�
�
�
�
�
�
�
�
�
�
�
�
�<�
�
�
�
�
�
��
�
�
�
�
�
�%�
�=�
�
�
�
�
�
�
�
�
�
�
�
�>�
�
�
�
�
�&�?�
�
�
�'�
�(�
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
��
�
�
�
�
�
�
�
�
�)�
�
�*�
����������	�
���
��������+������������ �!�"�#�$�%�&�'�(�)�*�+�,�-�,�.�/�-�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�.�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t��u�v�w�x���y�z�{�|�/���}�~�������0������������������������������@������������1�����������2��������������A�����������������������������������B�3�����4�������������������C�����������5���������������������6�����7�D�������������8���9�������������E�����	�
���
������:������������;��� �!�<�"�#�$�%�&�'�(�)�*�+�,�-�.�=�/�0�1�2�3�4�5�6�7�>�8�9�:�?�@�;�F�<�G�=�>�H�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T���U�V�W�X�Y�Z�[��\�A�]�^�_�`�a�b�c�d�e�f�g�B�h�i�j�k�l�C�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�D�~������������I���������������J���������������������������������K�������������������������E�����������������������������������������F���������G������������������������������H����������������I������������������	�
�����
��������������������J� �!�"�#�$�%�&�'�(�)�L�*�+�,�-�.�/�0�K�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�L�|�}�~������M��M����������������N�����������������������������N������������������O���������������������������������������������������������������������������������������������P���������������������������������Q�	�
���
�R������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�S�A�B�C�D�E�F�G�H�I�X�J�K�L�M�N�T�O�P�Q�R�S�T�U�V�W�X�Y�Z�����[�\�]�^�_�`�a�b�c�d�e�f�g�O�h�i�j�k�l�m�n�o�p�q�U�r�s�t�u�v�w�x�y�z�{�|�}�~������������������������������������������V����W���������������P�����������������������������������������������������������������X�����������Y�����������������Z�����������������������[����������������������\��	�
���
������������������� �!�"�#�$�%�&�'�(�)�Q�*�+�,�-�.�/�0�1�2�3�4�5�R�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�]�K�L�M�N�O�^�P�Q�R�S��T�U�V�Y�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g��h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~��_��`���������a�������������S���������������b�����������c������������d�����������������������e�������f�������������������g�������������������������������5�����������������������������������������������������������	�
���
�������h���i����������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�j�0�1�2�T�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�k�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�l�u�v�w�x�m�y�z�n�{�|�}�~����������������o��p�������6�����������������U������������q�������V�����������r�������������������������������������������s�����������������������������������������������������������������t���������W�����������	�u�
���
�����������������X��v��Y� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�Z�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�w�O�P�Q�R�x�S�T�U�V�[�W�\�X�Y�Z�[�]�\�]�^�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~��y�����z��������_����������������������������{������������������|������������������������������`����������������������������������������������}���������������������������������������������������������������	�
���
��������������������� �!�"�#�$�~�%�&�'�(��)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>��?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f��g�h�i�j�k�l�m��n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~�����������������������������������������������a������������������������Z���������������������������������������������b���������������������������������������������c���������������������������d�������	�
���
�����e� ���������������� �!�"�#�$��%��&�'�(�)�*�+�,�-�.��/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B��C�D�E�F�G�H�I��J�K�L�M�N��O�P�Q�R�f�S�T�U�V�W�X�Y�Z�[�\�]��^�_���`�a�b�c�d�e�f�g�h��i�j�k�l�m�n�o�p��q�r�s�t�u�v�w�g�x�y�z�{�|�}�~��������������������������������h��������������������[�\�������������������������������������������������������������������������������������������������������������������������������������������������������	�
���
�������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/��0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@���A��B�C�D�E�F�G�H�I��J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�i�^�j�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	�
���
������������������� �!�"�#�$�%�&�'�(�)��*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K��L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m��n�o�p�q�r�s�t�u�v�w��x�y�z�{�|�}�~�������������������������������������������������������������������������������������k�������������������������������������������������������������������������������������������������������������	�
���
��������������������� �!�"�#�$�%�&��'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g���h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~��������������������������������������������������������������������������������������������������������������������������������������������������������������l�������������������������������������	�
���
�������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�m�F�G�H�I�J�K�L�M�N�O�P�n��Q�R�S�T�U�V��W�X�Y�Z�o�[�\�]�^�_�`�a�b�c�d�e�p�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|��}�~��������������������������������������������������������q������������������������������������������������������������������������������������������������������������������������������������������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>��?�@�A�B�C�D�E�F�G�H�I�J�K�L�r�M�N�O�P�Q�R�S�T�U�V�W�X��Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t��u�v�w�x�y�z�{�|�}�~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	�
���
������������������� �!�"�#�$�%�&�'�s�(�)�*�+�,�-��.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� � � � � � � � � �	 �
 � � �
 � � � � � � � � � � � � � � � � � � �  �! �" �# �$ �% �& �' �( �) �* �+ �, �- �. �/ �0 �1 �2 �3 �4 �5 �6 �7 �8 �9 �: �; �< �= �> �? �@ �A �B �C �D �E �F �G �H �I �J �K �L �M �N �O �P �Q �R �S �T �U �V �W �X �Y �Z �[ �\ �] �^ �_ �` �a �b �c �d �e �f �g �h �i �j �k �l �m �n �o �p �q �r �s �t �u �v �w �x �y �z �{ �| �} �~ � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � � � � � � � �!�!�!�!�!�!�!�!�!�	!�
!�!�!�
!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!� !�!!�"!�#!�$!�%!�&!�'!�(!�)!�*!�+!�,!�-!�.!�/!�0!�1!�2!�3!�4!�5!�6!�7!�8!�9!�:!�;!�<!�=!�>!�?!�@!�A!�B!�C!�D!�E!�F!�G!�H!�I!�J!�K!�L!�M!�N!�O!�P!�Q!�R!�S!�T!�U!�V!�W!�X!�Y!�Z!�[!�\!�]!�^!�_!�`!�a!�b!�c!�d!�e!�f!�g!�h!�i!�j!�k!�l!�m!�n!�o!�p!�q!�r!�s!�t!�u!�v!�w!�x!�y!�z!�{!�|!�}!�~!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!��!�!�!�!�!�!�!�!�!�!�!�!�"�"�"�"�"�"�"�"�"�	"�
"�"�"�
"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"� "�!"�""�#"�$"�%"N(&"rrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxrryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r	r	r	r	r	r	r	r	r	r		r
	r	r	r
	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r 	r!	r"	r#	r$	r%	r&	r'	r(	r)	r*	r+	r,	r-	r.	r/	r0	r1	r2	r3	r4	r5	r6	r7	r8	r9	r:	r;	r<	r=	r>	r?	r@	rA	rB	rC	rD	rE	rF	rG	rH	rI	rJ	rK	rL	rM	rN	rO	rP	rQ	rR	rS	rT	rU	rV	rW	rX	rY	rZ	r[	r\	r]	r^	r_	r`	ra	rb	rc	rd	re	rf	rg	rh	ri	rj	rk	rl	rm	rn	ro	rp	rq	rr	rs	rt	ru	rv	rw	rx	ry	rz	r{	r|	r}	r~	r	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r
r
r
r
r
r
r
r
r
r	
r

r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r 
r!
r"
r#
r$
r%
r&
r'
r(
r)
r*
r+
r,
r-
r.
r/
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r:
r;
r<
r=
r>
r?
r@
rA
rB
rC
rD
rE
rF
rG
rH
rI
rJ
rK
rL
rM
rN
rO
rP
rQ
rR
rS
rT
rU
rV
rW
rX
rY
rZ
r[
r\
r]
r^
r_
r`
ra
rb
rc
rd
re
rf
rg
rh
ri
rj
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv
rw
rx
ry
rz
r{
r|
r}
r~
r
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r
r
r
r
r
r
r
r
r
r	
r

r
r
r

r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r 
r!
r"
r#
r$
r%
r&
r'
r(
r)
r*
r+
r,
r-
r.
r/
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r:
r;
r<
r=
r>
r?
r@
rA
rB
rC
rD
rE
rF
rG
rH
rI
rJ
rK
rL
rM
rN
rO
rP
rQ
rR
rS
rT
rU
rV
rW
rX
rY
rZ
r[
r\
r]
r^
r_
r`
ra
rb
rc
rd
re
rf
rg
rh
ri
rj
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv
rw
rx
ry
rz
r{
r|
r}
r~
r
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r r r r r r r r r r	 r
 r r r
 r r r r r r r r r r r r r r r r r r r  r! r" r# r$ r% r& r' r( r) r* r+ r, r- r. r/ r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r: r; r< r= r> r? r@ rA rB rC rD rE rF rG rH rI rJ rK rL rM rN rO rP rQ rR rS rT rU rV rW rX rY rZ r[ r\ r] r^ r_ r` ra rb rc rd re rf rg rh ri rj rk rl rm rn ro rp rq rr rs rt ru rv rw rx ry rz r{ r| r} r~ r r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r� r!r!r!r!r!r!r!r!r!r	!r
!r!r!r
!r!r!r!r!r!r!r!r!r!r!r!r!r!r!r!r!r!r!r !r!!r"!r#!r$!r%!r&!r'!r(!r)!r*!r+!r,!r-!r.!r/!r0!r1!r2!r3!r4!r5!r6!r7!r8!r9!r:!r;!r<!r=!r>!r?!r@!rA!rB!rC!rD!rE!rF!rG!rH!rI!rJ!rK!rL!rM!rN!rO!rP!rQ!rR!rS!rT!rU!rV!rW!rX!rY!rZ!r[!r\!r]!r^!r_!r`!ra!rb!rc!rd!re!rf!rg!rh!ri!rj!rk!rl!rm!rn!ro!rp!rq!rr!rs!rt!ru!rv!rw!rx!ry!rz!r{!r|!r}!r~!r!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r�!r"r"r"r"r"r"r"r"r"r	"r
"r"r"r
"r"r"r"r"r"r"r"r"r"r"r"r"r"r"r"r"r"r"r "r!"r""r#"r$"r%"r&")Z EUCKR_TYPICAL_DISTRIBUTION_RATIOZEUCKR_TABLE_SIZEZEUCKRCharToFreqOrder�r'"r'"�J/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/euckrfreq.py�<module>)sHsite-packages/pip/_vendor/requests/packages/chardet/__pycache__/codingstatemachine.cpython-34.pyc000064400000002765151735047770030761 0ustar00python3.4�
�Re	�@s7ddlmZddlmZGdd�d�ZdS)�)�eStart)�wrap_ordc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�CodingStateMachinecCs)||_d|_d|_|j�dS)N�)�_mModel�_mCurrentBytePos�_mCurrentCharLen�reset)�selfZsm�r�S/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/codingstatemachine.py�__init__!s			zCodingStateMachine.__init__cCs
t|_dS)N)r�_mCurrentState)r
rrrr	'szCodingStateMachine.resetcCs�|jdt|�}|jtkrFd|_|jd||_n|j|jd|}|jd||_|jd7_|jS)NZ
classTablerZcharLenTableZclassFactorZ
stateTabler)rrrrrr)r
�cZbyteClsZ
curr_staterrr�
next_state*s	zCodingStateMachine.next_statecCs|jS)N)r)r
rrr�get_current_charlen9sz&CodingStateMachine.get_current_charlencCs|jdS)N�name)r)r
rrr�get_coding_state_machine<sz+CodingStateMachine.get_coding_state_machineN)�__name__�
__module__�__qualname__r
r	rrrrrrrr s
rN)�	constantsr�compatrrrrrr�<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/charsetgroupprober.cpython-34.pyc000064400000004237151735047770031044 0ustar00python3.4�
�Re��@sFddlmZddlZddlmZGdd�de�ZdS)�)�	constants�N)�
CharSetProberc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�CharSetGroupProbercCs,tj|�d|_g|_d|_dS)Nr)r�__init__�_mActiveNum�	_mProbers�_mBestGuessProber)�self�r�S/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyr"s
		zCharSetGroupProber.__init__cCsbtj|�d|_x<|jD]1}|r |j�d|_|jd7_q q Wd|_dS)NrTr)r�resetrr�activer	)r
�proberrrrr
(s
	
	zCharSetGroupProber.resetcCs0|js#|j�|js#dSn|jj�S)N)r	�get_confidence�get_charset_name)r
rrrr2s
	
	z#CharSetGroupProber.get_charset_namecCs�x�|jD]�}|sq
n|js+q
n|j|�}|sFq
n|tjkrh||_|j�S|tjkr
d|_|jd8_|jdkr�tj|_	|j�Sq
q
W|j�S)NFrr)
rr�feedr�eFoundItr	�	get_state�eNotMerZ_mState)r
�aBufr�strrrr:s$		
	zCharSetGroupProber.feedcCs�|j�}|tjkrdS|tjkr2dSd}d|_x�|jD]�}|s]qKn|js�tjrKtj	j
|j�d�qKqKn|j�}tjr�tj	j
d|j�|f�n||krK|}||_qKqKW|js�dS|S)Ng�G�z��?g{�G�z�?gz not active
z%s confidence = %s
)
rrrrr	rr�_debug�sys�stderr�writerr)r
rZbestConfrZcfrrrrNs2					z!CharSetGroupProber.get_confidenceN)�__name__�
__module__�__qualname__rr
rrrrrrrr!s

r)�rrZ
charsetproberrrrrrr�<module>spython3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/jisfreq.cpython-34.pyc000064400000244053151735047770026650 0ustar00�
�ReӸ�P @sdZdZdR ZdQ S(S g@��(������'�O��}�������]�
�
���
���������������X�}�����k��g
�
��k������������%�&�0�1�,�-�������������<���p�������������g������W�X�����h
�"�������
�	��\����
�/
�����������0
��
�h�����������������������������������������������������������������������������	�
���
������������������� ��!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7��V�j�4����B���8�9�:�;�<�=�>�v�����S��e��f���d	�+����a�w�����I���~���
��?�@�A�B�C�D�
��-���i���
��E�^�.���3��i
�F�/�Y�������j��
��G�H�I�J�q��1
��Y��k�/��2���#�����*�������[��\�5��!�!�	�%�@�l��'�A����4�
�������<����-���7�S����~�K�=��E��;���7�7�8�m�&���
��O�K�=�~�d���L�M�N�O�P�Q�R�S�T�U�V�Y�>�J�"�p	�p������T�_���.�X���L�j�e��9�P� �l�y�����D�����)�h���F�?��+���g�c����B�]�N����8�j�:�5���7���R�4�G�d�����n��h�t�6�3�$�W�C���:
�x����*�V	��W�X�Y�Z�[�\�]�^�_�`��a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�
�u�v�w�x�y�z�{�|�������l�}��~���	��
�����
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������k���
�>��
��
�	��
	�j
�����Z�[�\�]������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~����������������������������������������������������������������������������������������������������������������������������������������
����������2
�����{�T���a
�
�^�����|��=��m�k
�����	�V�y�	��
�q	�����
�	������!��	��������C�O�3��������r	���n���+�����
�p�q���;
�A������C�0��n�
����T�C�o�
��
�#	���~��P����������	���	��$	�z�����&���������������_���U���
�s	��	����I����������3
����$�W�1�5�P��	����������X����l
����H��	�������
�
�W���~�p��$����@�L����	�����u���J�I	�W	����_���	�<�����]�D�������h���������f�-��}�t	���	�������,���
�b����X���F��{�`����+�3�q��m��4
�������B�l�X	�
��%
���%	�2�u��	��	��J��|�r��@����������
���	�L
�������b
�J	��c�����������4	�R��m
�T��������������e	����?�
������-�	��*�E����+����&	�	����/�����.�s�[���+��
��
�B�c
��������	�)��,���u	��	��9�&
�������v	���Y���3��
�����D�����d���|�(�y������<�8��	�i����d
�5
�B��n���������|��	�!���)�@�n
�m��	�0�a�����	�z�'�����	�W���[�v�����	����	�o
���	��
���'
���"���9������J���h����e
���\�����p
�@��Q�9������	����w	�i�E��J�I��	��������f����
���1�����
����'	�r�
������
���c��	�q��x����
�2�������	�*���b�F��v���d�
����!�R����Q����P����������(	����_��`���f
��6
���A����a�����u�T��2��������^�C����
��[����
�v�%������n�!�F��Z�^������d������x	���]���B��c��
�����P�q�	��H�Y	����(
���
���g�}�K�	����4���W�����C�g
�-�d���k��4�}��q
�~�+�	����h�@	�	��@�A	�D�:���e��
���q�w�����������d���Z��*�M
�[����s�Z�
����>��'�-����
�����)	�������t�F�7
���t�#��������Y���f�k�b�1���
��6�o�c��q��	������
�u��:�����N
���U�=��	�v���l�N������]��;������
����l�L�	�}�������B	��8
�Q���#�`�T���	�x��r��	���������	���3�n���������{���@��������9
����5�h
�d�Z	����i������s�-�r
�������[���0������.�S�	�R�O
�������;��4�y	�
�;��z	��p��� ����:
�(�|�
��"����������O��e����
�C	�t�)
��6�K����8��P
��h���������3�$�����*
�=�b�e���
�4�����	�.�7��\����j����������/������=���^���5	����	�\�������9�#�+�
�s
�,��7���Y�����
�M���+
�i
�Q���6	���������y���s�#�{	��
�U�f�<����v����)��
�������m�<���	�����g��	�l��� �D	�b�u��
��D�B����
�[	���8����>�����������]���D�������6�Z���	�5���
��
�<�m��
�,�	��u�^�	����g����I���g����\�:�
�M�t�	���E��o��������E�R�����E�j
���g�W���K�	�C��=���]�$�!��	�����`�K�v���0�i��^����3���"��������a�k
��;
�w��������
�y�������P���	�w�����t
�����������J�a���]�������	�����L�h�������
�u
�j���#�C����	�a���!�s�|	��	�Y��
����h�O�5���z�i�
�S���L���.��&��	�<
�7���s�A���M��
��s���*�,
�%�
��	��k���&�f���O�j�"��(�-��[�������-�=��}	���M�S���������������
�
��
��~	��J�t�k�v�e�y�����<
���f��M�k��
���o�������w�v
�l���]���.��
������/�f	�q�$�g��G���n��>�6�=
�������N��	�x��e�*	��h������$�����o�b�,�����t����	�����
�V���
�i������w
���p�H���V��i�<�Z�	�8�r�w��&������/�������>��>
�E	�x���&�e���w�	����5�����
��\����S�i������2������+�'���%����x
�O��
�Q
���������_�H������g����y
��
�0�&�+	������l
�'��'�z��	�	��_����������?
��
����	��z
���m
�|�
��	�g	�0���� ��*���
�`�w���
�#���c�)�����R
�������T����r��V�����_�����r����
�`�x���
���f���n
�=
�*�A���	�(���x��S
��{�T
��9���M��r����;��(��%��[�a�b���D����-
�\	�����o
�E�m�)���!���c��,	�1��]	����>�I����	�T���������y��k�z�x���N�	�����	�5����"���H�<�d��
���h	��	��
�p
���:�L�1�����
���>
���q
�?�Z�M�I���B�K	�D��#�
�
�Y�>������`�������������� ����c���������T��a��2�y�/���"�U
�����b����/���	����
�{�
��j����5�*�������a�x����	��F������7����	�?��w���������+��8����
�N��
����,���n��
���o�s�_�?���	�����	����?�0��	�	��y�3�f��=���l��	��v�]��	�	�����z��
��y�j��u����p���j���	
�i�z����r
������������F��'��	�{
�n��x�u�$����M�����k��p��
�^	�q�
�`�|��	��

�|
�	��
���	�
�����	�G���-���Z�1�Y���-	�	�e����[�C����e��.�-�����	���
�
�7	�b�l�	������{���.�	����z���
�
��?
����9��
�����}��
�a��	�
�Q�	�d�;�V
���/�^�D���?�m��
��
�9�I�
�����
�����
�{�}� ������&���~���X���}
��
���9����:��"�\����
�_	���8�W�~
�^�%�P�s��w����8	��L����.
�����
����N�����P��S������:�R�'�0�b���
�������z��	�����K�������
�r��q�
�����n�L	�����������X�@
���g�i���4��:����r�	��Q��
��	�;�'��>���b�m���w�����s
�����A
��t
�9	�����	�o�^���2��c��������r����!��t��1�{���������s��������x��v�a�p����
���L�O���U��.����)�.	��E�	�"��y��	������(�
���q�E�6�
��
�2�u�6������.��i	����V���s��
���G�G�j�t��W��	���`����u����
���{�Q��	�O�C���
���J�	�	�	�$������/	����_�����j	�R��7���/
��3�D�u
�6�X�4��������>����0
�`�`	�
������U��� �
�r���)���5���H��� 
���~�r��
������	���]����������@
����
�a���v����/�!�6������7�w��	�3�c�8�x����B
�����M	���F	��g����(��
�:	����H���
�f����"��
�~������
�y������ �!�N��
�4�A
���d�e����z������������0	�����������{������
��f�(�l���G�	����^�B
�m�F�|��U����2�R�����#���
����F����U����1���c�k��N	�S�	�����
����$�O	���Y����
���G����W
�	�C
�?����~����U�F�����������
�C
�	�����e�
������/�Q�_�v
�;���P�)���G�m�	���G�,�I�z�_�	���	�9�n��
�A�	�
�X
���#�V�)�<�%��}���H�w
�5��p�.�����m�����
�#�h�|�b����@�(�^�z����A��
� ��"��g��|���������6��X���,�����		����$�#�I�k	�����:�	��Q��o�h�V�$�
���t����Y
�,����
��D
���	�~��
�
���%��� ��������
� �7�/�
	������	�E�V����
�E
�u��&�������	���o���Z��i���	�����!���n�8���'����������	��G��R�2����:��,����Z
�l��(�X�P	�?���	�o��������W�*����;�8��&�)����
�o������H�_���0���x
��0��;	��
���X��	�����1��Z�*�%��	���|�d�`���S�j�}�\�����G	���	�f�q�%�B��1
�p��"�������|������	���l	�2
��
��
���@�h��;����	��	���&�����}��%�����?��	���a	�y
��
����	��=�1��<��{�#��������
�A��
��t���	��>�
�K�3
���=����\�����'�A�+�g���b	�K�������
���
���4
��*��m	�	��
�o�N��0�(�i��$�4� �{����Q	����U�����,�`���	����
�j�)� ���-�6���	�F
�2�)��
�*��Y�Z�J��H�����.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�s�^�_��`�a�b�c�d�?�e�f�@�g�h�%�i�j��k�k�	�5
�A�
��l�m�n�o�B�p�q�r��
�1	��C�D�t��
�s�&�E�F�t���u��
��
�v�w�x�����'�G�y�z�	��{�H��|�}��~��
�(�I��)����
���!
���J���K���L���*��M���������N������
���+�O�,��-��.���
������G
��������������P���������	�/��Q��������R�������
������S��H
�T��U������������
��V�
��W�X��������Y��0���Z����������[�\�]�����^�����_�����`���a�b�?���c���d������e��1����	�f�u�����g�����
���2���[
���@������I
���h�"
�+�A�
���i�,�j�k�z
�-�l���.��/����������������3��m���������n�D
������R	�������o�
�p�J
���l�
�4�2���
���
���	�B�
�����
���q�r�K
������
�����
���5�E
�	
�I���

�6�	�
����v�����7�s�8�	�
�L
�w�����9���t���������:��u����;������
�� �������<�����K�	�
�	�x�v���
��!�=���>��������	����?���@���������w� ��!�"�"��#�$�0�%�&��'�(�)�*�1�+��,�-�
�.�<	�#�
�/�$��
�0��1�x�2�3��y�4�y�5�%�&�
�

�z�6�C�7�z�8���L��B�'�A�
���B��(��{�|�)��C�*��9�
�
��:�;�<��
�}�~�=�D��>��?�@�A�B�����C�D�D�c	��E�F��
��G��H�I�J�K�L�M�N�{�O��+�P�3�Q��
�R�	�E�S�T�U�V���W�X�Y�2�Z�[�\�]�^�_�`���a�b��c�d�m�E�F�e�f��g�h��i�j�k�J�l�m�n�o�p�q�r�s�t�u�v�w�
�G�x�y�z��,��-��.�
�M��{������|��H�}��~��/�n�I����0�J��K���#
�����3���������������1�����2�M
��3����L������4�����
���
�M���4����5����
�
�6������������
����7���N��O�
�P�|���Q���	�K��
���
��8����}��
��	�����N
�9��L�R��:���;���F���{
��S����<���=������
���
����T���������>���O
�5������~���?�������
��
�@�@����
����A����o���G�����������
�����6�	���������
��U��
���������������������
��B�C���7�
����V���N�������D����������
���W������X�
���E�F����Y��
�����4�����G�����H�n	��	�p���Z�S	������[���c�I����������
�����8���
�
�9���H���
�\�:����
����J�����
��]�������
������
���������	�
���
�����
����
������I��������P
����������K������ �!�^�"�#�
�$�
�%�L�&�'�(�)�*�+��,�-��
�.�J�/�0�Q
��1�M�2�3�4��	���5�6�7�
�8�9�:��;�;�N�O�<��
�=�P�Q�>�?�@�A��B���C�D�<��R�E�F���
�G�H�I�J�K�
��
�S�L�M���
�N�O�P�Q�T�
�R�R
��S�T��U�V��S
�_�W�X�Y�Z�[��\��]�^�_�`�a�b�c��d��e���f�
��g�h�i�U�j�k�l�m�=�n�o�
�`�p��q�r�~�s���t�u�v�a��V��
��W�w��x�y��z���
��{�|�}�
�~�M���b�����X�������������������
���
����c�����d�������� ��
����Y��Z�e�[������T
��+��������������>����������
����\��f���]���g���������	���U
�
��������
�^���_������	�`��a���� ����������h�i�j�����b��
�!���������c���[����
�����
�����
��
�V
�k�d���l�����"�#���������������e�?���������������f���5��������������m�������@�n�g���������$�����o���W
�������p�q���r�
���
��
��
�\
���
��������h�������������s�������������t������
��
��������A�B��!��
���
����������
�����i���C��u�D�6��j��	�	�
���
����
��������k�E��	�
����	������K���
����l��%�m�
�F��������F
�v��n���w��L�x�o�����y���"����p������ �z���q�!�"�
�#���r�$�%�N�&�'���(�{���7�)�*�+�,�s�-�
�.�/�0������1�
��
�2���3�4�t����
�5�����6���&������7�q�'�����8�9���:�|�;�<�=�>�?�@���A�B�C�D�E�F��G�H�I�
�
�J�
�X
�K�L�M�N�O�P�Q�R�S�T�U��V�W��X�Y��Z�[�}�\�]��
��^��
�_�6
��
�`�a��G�H���
�
�(�~��)��*�I�
�
��b�M�c�u��	�
����d�e�f�=	��v�g�h��i�j��}�k�l�m�w�n��
�x�o�p�q�r��s�
������t�u��+���v�y���w��	��,�x���y��O��z����Y
�
��9�z�{���$
����{����7
��
���J�Z
����
�|�}�~�
�8���|����}������������	��������~����K��
�������L����-���	��������������������
���]
����.�����������	������N�����P�
��r���������M����������	�����O��������N������O������������
����	��������
���������
� 	�����[
���
��������������P���������������
���������/������������������������������������������������������������������0���Q�������������s�����G
�1���
������������������R��
������� � 
�\
����|
��������	�����
����P�2�Q���
�����������	��������� ��!���"��
���#���!�
��$�� �!���"�!
�#�$��%�&�%��&�'�	�'�(�(�)�)�#�*�+�
�,�
�*�-���S�+�.���2	�3�H	���/�0�1�2�3��4�,���}
�5�
�-�H
�R�.�6�!	�7�/�8�9�:�0�1�����;��<�=�>�?�@�A�B�2���C�D�E�~
�F�3�G�Q��H��I��	�J��"
��K�L�M�4�N�O��#
�P�Q�R�S���T�U�5�V�W����6�7��4�8�"�
�9�X�Y�Z�:�[�;�$
�����\��
�]�^�<�_��5����`�a�b�c�d�e���f��g���=���h�����i�j�
�k�l�m����>�n�#�6�o�p�?�q��r�s�T�t�u����v�
��@�A��w����x��y�z�{�U�|�}�B�C�D�3	�E�~�I
�����������F�������
���G��H������������
�������
�������I�������J�K����������L���M����
��
���N�������
��T	�������O����P�������Q�����7��8���9�������:��������������R������;��S��
���T���������U�
�V���W�����	�X��Y�S���Z�[���	������
��������V�\�W���U	�
�����"	������������]���������^������������_�������`�$�a������b�]
����c���d�A���e�������f�����^
��<��������$����������^
�_
�g�������%�����=���>�������%�	�?������t����@�X�`
������h������������Y�%
���&�	�Z���T���
�	�a
���
��9���i�����R����������u����j�k���
�l����������m�A��:����������B��n�����[��
������ ��\�!�o�"�p����
�J
�q�]����#�$�%�&�C��r�'�(�)�*�s�t�+�,���-�.�/�^�u�0�	�1�����2�D�o	�v�3��4�w�_
�5�6�
���&�;�7�8��9���x�:�;��<�_�&
�`���
��
�'
�����=���S�>�?�U�	�������y�z�'��
�(
��������@�E��
�A�`
��V���{��W�X�B�(�|�}���~����'�C�D����E�F��G�H�I�J��K�b
����L�a�����F�M�����N�O���P��Q���������R�S�
���T���U�)
���V���	�W�X��)��8
�Y�Z�[�\�]�^��G���
�_�`����a�b�c�d���e���b������f�g�h�i��j�k�����l�m�n�����Y�o�p���q�Z�r�s���t�u�v�w�x�y��z���{�|�}�~�����������������������������<�����T����H���������������v����������������I����
������������������������[����J���
������������
���������U�
�c�����
�����������������������������������������K����������������������c
�����������������L�������������d
������9
����������V�������������������������������������������
���������������d��
������	�����1���
�*���M��p����������	�����������������>	������	�����
�N������O�*
����(��
����������
��	�
��+
��
�=����P����������������������������:������;�,
���������������������-
������ �����!�"�#��$�%�&�'���(�)�*��+���e
�,�-�.�/�Q�0�����1�2�3�4�5�6�7���8�9�:�;�R�e�<�=�>�?�K
��@���A�B�
�C�D�E�F�S�G�H�I�J�K���W�L�M�N�O�P�T�Q����R�S�����T��U�V���U�W�X�Y�Z�[�\�]�^�_�`��a������b�����c�d���e�f��g��h�i�f
�?	�j�\�������k�l������m�.
�+�n�o�p�q�r�s�t�
��u�v�f�,�����w�x���y�z���������{�|���}�~����
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������V���������������������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o�p�q�r�s�t�u�v�w�x�y�z�{�|�}�~������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� � � � � � � � � �	 �
 � � �
 � � � � � � � � � � � � � � � � � � �  �! �" �# �$ �% �& �' �( �) �* �+ �, �- �. �/ �0 �1 �2 �3 �4 �5 �6 �7 �8 �9 �: �; �< �= �> �? �@ �A �B �C �D �E �F �G �H �I �J �K �L �M �N �O N(P rrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r	r	r	r	r	r	r	r	r	r		r
	r	r	r
	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r	r 	r!	r"	r#	r$	r%	r&	r'	r(	r)	r*	r+	r,	r-	r.	r/	r0	r1	r2	r3	r4	r5	r6	r7	r8	r9	r:	r;	r<	r=	r>	r?	r@	rA	rB	rC	rD	rE	rF	rG	rH	rI	rJ	rK	rL	rM	rN	rO	rP	rQ	rR	rS	rT	rU	rV	rW	rX	rY	rZ	r[	r\	r]	r^	r_	r`	ra	rb	rc	rd	re	rf	rg	rh	ri	rj	rk	rl	rm	rn	ro	rp	rq	rr	rs	rt	ru	rv	rw	rx	ry	rz	r{	r|	r}	r~	r	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r
r
r
r
r
r
r
r
r
r	
r

r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r 
r!
r"
r#
r$
r%
r&
r'
r(
r)
r*
r+
r,
r-
r.
r/
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r:
r;
r<
r=
r>
r?
r@
rA
rB
rC
rD
rE
rF
rG
rH
rI
rJ
rK
rL
rM
rN
rO
rP
rQ
rR
rS
rT
rU
rV
rW
rX
rY
rZ
r[
r\
r]
r^
r_
r`
ra
rb
rc
rd
re
rf
rg
rh
ri
rj
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv
rw
rx
ry
rz
r{
r|
r}
r~
r
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r
r
r
r
r
r
r
r
r
r	
r

r
r
r

r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r 
r!
r"
r#
r$
r%
r&
r'
r(
r)
r*
r+
r,
r-
r.
r/
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r:
r;
r<
r=
r>
r?
r@
rA
rB
rC
rD
rE
rF
rG
rH
rI
rJ
rK
rL
rM
rN
rO
rP
rQ
rR
rS
rT
rU
rV
rW
rX
rY
rZ
r[
r\
r]
r^
r_
r`
ra
rb
rc
rd
re
rf
rg
rh
ri
rj
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv
rw
rx
ry
rz
r{
r|
r}
r~
r
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
r�
rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|rr}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r r r r r r r r r r	 r
 r r r
 r r r r r r r r r r r r r r r r r r r  r! r" r# r$ r% r& r' r( r) r* r+ r, r- r. r/ r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r: r; r< r= r> r? r@ rA rB rC rD rE rF rG rH rI rJ rK rL rM rN rO rP )ZJIS_TYPICAL_DISTRIBUTION_RATIOZJIS_TABLE_SIZEZJISCharToFreqOrder�rQ rQ �H/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/jisfreq.py�<module>,spython3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/cp949prober.cpython-34.pyc000064400000001700151735047770027255 0ustar00�
�Re��@sZddlmZddlmZddlmZddlmZGdd�de�ZdS)�)�MultiByteCharSetProber)�CodingStateMachine)�EUCKRDistributionAnalysis)�CP949SMModelc@s(eZdZdd�Zdd�ZdS)�CP949ProbercCs6tj|�tt�|_t�|_|j�dS)N)r�__init__rrZ
_mCodingSMrZ_mDistributionAnalyzer�reset)�self�r
�L/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/cp949prober.pyr#s
zCP949Prober.__init__cCsdS)NZCP949r
)r	r
r
r�get_charset_name+szCP949Prober.get_charset_nameN)�__name__�
__module__�__qualname__rrr
r
r
rr"srN)	ZmbcharsetproberrZcodingstatemachinerZchardistributionrZmbcssmrrr
r
r
r�<module>ssite-packages/pip/_vendor/requests/packages/chardet/__pycache__/gb2312prober.cpython-34.pyc000064400000001707151735047770027235 0ustar00python3.4�
�Re��@sZddlmZddlmZddlmZddlmZGdd�de�ZdS)�)�MultiByteCharSetProber)�CodingStateMachine)�GB2312DistributionAnalysis)�
GB2312SMModelc@s(eZdZdd�Zdd�ZdS)�GB2312ProbercCs6tj|�tt�|_t�|_|j�dS)N)r�__init__rrZ
_mCodingSMrZ_mDistributionAnalyzer�reset)�self�r
�M/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/gb2312prober.pyr"s
zGB2312Prober.__init__cCsdS)NZGB2312r
)r	r
r
r�get_charset_name(szGB2312Prober.get_charset_nameN)�__name__�
__module__�__qualname__rrr
r
r
rr!srN)	ZmbcharsetproberrZcodingstatemachinerZchardistributionrZmbcssmrrr
r
r
r�<module>spython3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/big5prober.cpython-34.pyc000064400000001671151735047770027242 0ustar00�
�Re��@sZddlmZddlmZddlmZddlmZGdd�de�ZdS)�)�MultiByteCharSetProber)�CodingStateMachine)�Big5DistributionAnalysis)�Big5SMModelc@s(eZdZdd�Zdd�ZdS)�
Big5ProbercCs6tj|�tt�|_t�|_|j�dS)N)r�__init__rrZ
_mCodingSMrZ_mDistributionAnalyzer�reset)�self�r
�K/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/big5prober.pyr#s
zBig5Prober.__init__cCsdS)NZBig5r
)r	r
r
r�get_charset_name)szBig5Prober.get_charset_nameN)�__name__�
__module__�__qualname__rrr
r
r
rr"srN)	ZmbcharsetproberrZcodingstatemachinerZchardistributionrZmbcssmrrr
r
r
r�<module>spython3.4/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py000064400000012171151735047770023317 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .constants import eNotMe
from .compat import wrap_ord

FREQ_CAT_NUM = 4

UDF = 0  # undefined
OTH = 1  # other
ASC = 2  # ascii capital letter
ASS = 3  # ascii small letter
ACV = 4  # accent capital vowel
ACO = 5  # accent capital other
ASV = 6  # accent small vowel
ASO = 7  # accent small other
CLASS_NUM = 8  # total classes

Latin1_CharToClass = (
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 00 - 07
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 08 - 0F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 10 - 17
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 18 - 1F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 20 - 27
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 28 - 2F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 30 - 37
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 38 - 3F
    OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 40 - 47
    ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 48 - 4F
    ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   # 50 - 57
    ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH,   # 58 - 5F
    OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 60 - 67
    ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 68 - 6F
    ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   # 70 - 77
    ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH,   # 78 - 7F
    OTH, UDF, OTH, ASO, OTH, OTH, OTH, OTH,   # 80 - 87
    OTH, OTH, ACO, OTH, ACO, UDF, ACO, UDF,   # 88 - 8F
    UDF, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # 90 - 97
    OTH, OTH, ASO, OTH, ASO, UDF, ASO, ACO,   # 98 - 9F
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # A0 - A7
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # A8 - AF
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # B0 - B7
    OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   # B8 - BF
    ACV, ACV, ACV, ACV, ACV, ACV, ACO, ACO,   # C0 - C7
    ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV,   # C8 - CF
    ACO, ACO, ACV, ACV, ACV, ACV, ACV, OTH,   # D0 - D7
    ACV, ACV, ACV, ACV, ACV, ACO, ACO, ACO,   # D8 - DF
    ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASO,   # E0 - E7
    ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV,   # E8 - EF
    ASO, ASO, ASV, ASV, ASV, ASV, ASV, OTH,   # F0 - F7
    ASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO,   # F8 - FF
)

# 0 : illegal
# 1 : very unlikely
# 2 : normal
# 3 : very likely
Latin1ClassModel = (
    # UDF OTH ASC ASS ACV ACO ASV ASO
    0,  0,  0,  0,  0,  0,  0,  0,  # UDF
    0,  3,  3,  3,  3,  3,  3,  3,  # OTH
    0,  3,  3,  3,  3,  3,  3,  3,  # ASC
    0,  3,  3,  3,  1,  1,  3,  3,  # ASS
    0,  3,  3,  3,  1,  2,  1,  2,  # ACV
    0,  3,  3,  3,  3,  3,  3,  3,  # ACO
    0,  3,  1,  3,  1,  1,  1,  3,  # ASV
    0,  3,  1,  3,  1,  1,  3,  3,  # ASO
)


class Latin1Prober(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self.reset()

    def reset(self):
        self._mLastCharClass = OTH
        self._mFreqCounter = [0] * FREQ_CAT_NUM
        CharSetProber.reset(self)

    def get_charset_name(self):
        return "windows-1252"

    def feed(self, aBuf):
        aBuf = self.filter_with_english_letters(aBuf)
        for c in aBuf:
            charClass = Latin1_CharToClass[wrap_ord(c)]
            freq = Latin1ClassModel[(self._mLastCharClass * CLASS_NUM)
                                    + charClass]
            if freq == 0:
                self._mState = eNotMe
                break
            self._mFreqCounter[freq] += 1
            self._mLastCharClass = charClass

        return self.get_state()

    def get_confidence(self):
        if self.get_state() == eNotMe:
            return 0.01

        total = sum(self._mFreqCounter)
        if total < 0.01:
            confidence = 0.0
        else:
            confidence = ((self._mFreqCounter[3] / total)
                          - (self._mFreqCounter[1] * 20.0 / total))
        if confidence < 0.0:
            confidence = 0.0
        # lower the confidence of latin1 so that other more accurate
        # detector can take priority.
        confidence = confidence * 0.5
        return confidence
python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py000064400000022012151735047770024265 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .euctwfreq import (EUCTWCharToFreqOrder, EUCTW_TABLE_SIZE,
                        EUCTW_TYPICAL_DISTRIBUTION_RATIO)
from .euckrfreq import (EUCKRCharToFreqOrder, EUCKR_TABLE_SIZE,
                        EUCKR_TYPICAL_DISTRIBUTION_RATIO)
from .gb2312freq import (GB2312CharToFreqOrder, GB2312_TABLE_SIZE,
                         GB2312_TYPICAL_DISTRIBUTION_RATIO)
from .big5freq import (Big5CharToFreqOrder, BIG5_TABLE_SIZE,
                       BIG5_TYPICAL_DISTRIBUTION_RATIO)
from .jisfreq import (JISCharToFreqOrder, JIS_TABLE_SIZE,
                      JIS_TYPICAL_DISTRIBUTION_RATIO)
from .compat import wrap_ord

ENOUGH_DATA_THRESHOLD = 1024
SURE_YES = 0.99
SURE_NO = 0.01
MINIMUM_DATA_THRESHOLD = 3


class CharDistributionAnalysis:
    def __init__(self):
        # Mapping table to get frequency order from char order (get from
        # GetOrder())
        self._mCharToFreqOrder = None
        self._mTableSize = None  # Size of above table
        # This is a constant value which varies from language to language,
        # used in calculating confidence.  See
        # http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html
        # for further detail.
        self._mTypicalDistributionRatio = None
        self.reset()

    def reset(self):
        """reset analyser, clear any state"""
        # If this flag is set to True, detection is done and conclusion has
        # been made
        self._mDone = False
        self._mTotalChars = 0  # Total characters encountered
        # The number of characters whose frequency order is less than 512
        self._mFreqChars = 0

    def feed(self, aBuf, aCharLen):
        """feed a character with known length"""
        if aCharLen == 2:
            # we only care about 2-bytes character in our distribution analysis
            order = self.get_order(aBuf)
        else:
            order = -1
        if order >= 0:
            self._mTotalChars += 1
            # order is valid
            if order < self._mTableSize:
                if 512 > self._mCharToFreqOrder[order]:
                    self._mFreqChars += 1

    def get_confidence(self):
        """return confidence based on existing data"""
        # if we didn't receive any character in our consideration range,
        # return negative answer
        if self._mTotalChars <= 0 or self._mFreqChars <= MINIMUM_DATA_THRESHOLD:
            return SURE_NO

        if self._mTotalChars != self._mFreqChars:
            r = (self._mFreqChars / ((self._mTotalChars - self._mFreqChars)
                 * self._mTypicalDistributionRatio))
            if r < SURE_YES:
                return r

        # normalize confidence (we don't want to be 100% sure)
        return SURE_YES

    def got_enough_data(self):
        # It is not necessary to receive all data to draw conclusion.
        # For charset detection, certain amount of data is enough
        return self._mTotalChars > ENOUGH_DATA_THRESHOLD

    def get_order(self, aBuf):
        # We do not handle characters based on the original encoding string,
        # but convert this encoding string to a number, here called order.
        # This allows multiple encodings of a language to share one frequency
        # table.
        return -1


class EUCTWDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = EUCTWCharToFreqOrder
        self._mTableSize = EUCTW_TABLE_SIZE
        self._mTypicalDistributionRatio = EUCTW_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for euc-TW encoding, we are interested
        #   first  byte range: 0xc4 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char = wrap_ord(aBuf[0])
        if first_char >= 0xC4:
            return 94 * (first_char - 0xC4) + wrap_ord(aBuf[1]) - 0xA1
        else:
            return -1


class EUCKRDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = EUCKRCharToFreqOrder
        self._mTableSize = EUCKR_TABLE_SIZE
        self._mTypicalDistributionRatio = EUCKR_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for euc-KR encoding, we are interested
        #   first  byte range: 0xb0 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char = wrap_ord(aBuf[0])
        if first_char >= 0xB0:
            return 94 * (first_char - 0xB0) + wrap_ord(aBuf[1]) - 0xA1
        else:
            return -1


class GB2312DistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = GB2312CharToFreqOrder
        self._mTableSize = GB2312_TABLE_SIZE
        self._mTypicalDistributionRatio = GB2312_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for GB2312 encoding, we are interested
        #  first  byte range: 0xb0 -- 0xfe
        #  second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
        if (first_char >= 0xB0) and (second_char >= 0xA1):
            return 94 * (first_char - 0xB0) + second_char - 0xA1
        else:
            return -1


class Big5DistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = Big5CharToFreqOrder
        self._mTableSize = BIG5_TABLE_SIZE
        self._mTypicalDistributionRatio = BIG5_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for big5 encoding, we are interested
        #   first  byte range: 0xa4 -- 0xfe
        #   second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
        if first_char >= 0xA4:
            if second_char >= 0xA1:
                return 157 * (first_char - 0xA4) + second_char - 0xA1 + 63
            else:
                return 157 * (first_char - 0xA4) + second_char - 0x40
        else:
            return -1


class SJISDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = JISCharToFreqOrder
        self._mTableSize = JIS_TABLE_SIZE
        self._mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for sjis encoding, we are interested
        #   first  byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe
        #   second byte range: 0x40 -- 0x7e,  0x81 -- oxfe
        # no validation needed here. State machine has done that
        first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
        if (first_char >= 0x81) and (first_char <= 0x9F):
            order = 188 * (first_char - 0x81)
        elif (first_char >= 0xE0) and (first_char <= 0xEF):
            order = 188 * (first_char - 0xE0 + 31)
        else:
            return -1
        order = order + second_char - 0x40
        if second_char > 0x7F:
            order = -1
        return order


class EUCJPDistributionAnalysis(CharDistributionAnalysis):
    def __init__(self):
        CharDistributionAnalysis.__init__(self)
        self._mCharToFreqOrder = JISCharToFreqOrder
        self._mTableSize = JIS_TABLE_SIZE
        self._mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO

    def get_order(self, aBuf):
        # for euc-JP encoding, we are interested
        #   first  byte range: 0xa0 -- 0xfe
        #   second byte range: 0xa1 -- 0xfe
        # no validation needed here. State machine has done that
        char = wrap_ord(aBuf[0])
        if char >= 0xA0:
            return 94 * (char - 0xA1) + wrap_ord(aBuf[1]) - 0xa1
        else:
            return -1
python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py000064400000002467151735047770022740 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

_debug = 0

eDetecting = 0
eFoundIt = 1
eNotMe = 2

eStart = 0
eError = 1
eItsMe = 2

SHORTCUT_THRESHOLD = 0.95
python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py000064400000002165151735047770023025 0ustar00#!/usr/bin/env python
"""
Script which takes one or more file paths and reports on their detected
encodings

Example::

    % chardetect somefile someotherfile
    somefile: windows-1252 with confidence 0.5
    someotherfile: ascii with confidence 1.0

If no paths are provided, it takes its input from stdin.

"""
from io import open
from sys import argv, stdin

from chardet.universaldetector import UniversalDetector


def description_of(file, name='stdin'):
    """Return a string describing the probable encoding of a file."""
    u = UniversalDetector()
    for line in file:
        u.feed(line)
    u.close()
    result = u.result
    if result['encoding']:
        return '%s: %s with confidence %s' % (name,
                                              result['encoding'],
                                              result['confidence'])
    else:
        return '%s: no result' % name


def main():
    if len(argv) <= 1:
        print(description_of(stdin))
    else:
        for path in argv[1:]:
            with open(path, 'rb') as f:
                print(description_of(f, path))


if __name__ == '__main__':
    main()
python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py000064400000003657151735047770024141 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#   Proofpoint, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetgroupprober import CharSetGroupProber
from .utf8prober import UTF8Prober
from .sjisprober import SJISProber
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
from .euctwprober import EUCTWProber


class MBCSGroupProber(CharSetGroupProber):
    def __init__(self):
        CharSetGroupProber.__init__(self)
        self._mProbers = [
            UTF8Prober(),
            SJISProber(),
            EUCJPProber(),
            GB2312Prober(),
            EUCKRProber(),
            CP949Prober(),
            Big5Prober(),
            EUCTWProber()
        ]
        self.reset()
python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py000064400000007317151735047770024643 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
# 
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
# 
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
import sys
from .charsetprober import CharSetProber


class CharSetGroupProber(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mActiveNum = 0
        self._mProbers = []
        self._mBestGuessProber = None

    def reset(self):
        CharSetProber.reset(self)
        self._mActiveNum = 0
        for prober in self._mProbers:
            if prober:
                prober.reset()
                prober.active = True
                self._mActiveNum += 1
        self._mBestGuessProber = None

    def get_charset_name(self):
        if not self._mBestGuessProber:
            self.get_confidence()
            if not self._mBestGuessProber:
                return None
#                self._mBestGuessProber = self._mProbers[0]
        return self._mBestGuessProber.get_charset_name()

    def feed(self, aBuf):
        for prober in self._mProbers:
            if not prober:
                continue
            if not prober.active:
                continue
            st = prober.feed(aBuf)
            if not st:
                continue
            if st == constants.eFoundIt:
                self._mBestGuessProber = prober
                return self.get_state()
            elif st == constants.eNotMe:
                prober.active = False
                self._mActiveNum -= 1
                if self._mActiveNum <= 0:
                    self._mState = constants.eNotMe
                    return self.get_state()
        return self.get_state()

    def get_confidence(self):
        st = self.get_state()
        if st == constants.eFoundIt:
            return 0.99
        elif st == constants.eNotMe:
            return 0.01
        bestConf = 0.0
        self._mBestGuessProber = None
        for prober in self._mProbers:
            if not prober:
                continue
            if not prober.active:
                if constants._debug:
                    sys.stderr.write(prober.get_charset_name()
                                     + ' not active\n')
                continue
            cf = prober.get_confidence()
            if constants._debug:
                sys.stderr.write('%s confidence = %s\n' %
                                 (prober.get_charset_name(), cf))
            if bestConf < cf:
                bestConf = cf
                self._mBestGuessProber = prober
        if not self._mBestGuessProber:
            return 0.0
        return bestConf
#        else:
#            self._mBestGuessProber = self._mProbers[0]
#            return self._mBestGuessProber.get_confidence()
python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py000064400000104070151735047770022722 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# EUCTW frequency table
# Converted from big5 work
# by Taiwan's Mandarin Promotion Council
# <http:#www.edu.tw:81/mandr/>

# 128  --> 0.42261
# 256  --> 0.57851
# 512  --> 0.74851
# 1024 --> 0.89384
# 2048 --> 0.97583
#
# Idea Distribution Ratio = 0.74851/(1-0.74851) =2.98
# Random Distribution Ration = 512/(5401-512)=0.105
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR

EUCTW_TYPICAL_DISTRIBUTION_RATIO = 0.75

# Char to FreqOrder table ,
EUCTW_TABLE_SIZE = 8102

EUCTWCharToFreqOrder = (
   1,1800,1506, 255,1431, 198,   9,  82,   6,7310, 177, 202,3615,1256,2808, 110, # 2742
3735,  33,3241, 261,  76,  44,2113,  16,2931,2184,1176, 659,3868,  26,3404,2643, # 2758
1198,3869,3313,4060, 410,2211, 302, 590, 361,1963,   8, 204,  58,4296,7311,1931, # 2774
  63,7312,7313, 317,1614,  75, 222, 159,4061,2412,1480,7314,3500,3068, 224,2809, # 2790
3616,   3,  10,3870,1471,  29,2774,1135,2852,1939, 873, 130,3242,1123, 312,7315, # 2806
4297,2051, 507, 252, 682,7316, 142,1914, 124, 206,2932,  34,3501,3173,  64, 604, # 2822
7317,2494,1976,1977, 155,1990, 645, 641,1606,7318,3405, 337,  72, 406,7319,  80, # 2838
 630, 238,3174,1509, 263, 939,1092,2644, 756,1440,1094,3406, 449,  69,2969, 591, # 2854
 179,2095, 471, 115,2034,1843,  60,  50,2970, 134, 806,1868, 734,2035,3407, 180, # 2870
 995,1607, 156, 537,2893, 688,7320, 319,1305, 779,2144, 514,2374, 298,4298, 359, # 2886
2495,  90,2707,1338, 663,  11, 906,1099,2545,  20,2436, 182, 532,1716,7321, 732, # 2902
1376,4062,1311,1420,3175,  25,2312,1056, 113, 399, 382,1949, 242,3408,2467, 529, # 2918
3243, 475,1447,3617,7322, 117,  21, 656, 810,1297,2295,2329,3502,7323, 126,4063, # 2934
 706, 456, 150, 613,4299,  71,1118,2036,4064, 145,3069,  85, 835, 486,2114,1246, # 2950
1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,7324,2127,2354, 347,3736, 221, # 2966
3503,3110,7325,1955,1153,4065,  83, 296,1199,3070, 192, 624,  93,7326, 822,1897, # 2982
2810,3111, 795,2064, 991,1554,1542,1592,  27,  43,2853, 859, 139,1456, 860,4300, # 2998
 437, 712,3871, 164,2392,3112, 695, 211,3017,2096, 195,3872,1608,3504,3505,3618, # 3014
3873, 234, 811,2971,2097,3874,2229,1441,3506,1615,2375, 668,2076,1638, 305, 228, # 3030
1664,4301, 467, 415,7327, 262,2098,1593, 239, 108, 300, 200,1033, 512,1247,2077, # 3046
7328,7329,2173,3176,3619,2673, 593, 845,1062,3244,  88,1723,2037,3875,1950, 212, # 3062
 266, 152, 149, 468,1898,4066,4302,  77, 187,7330,3018,  37,   5,2972,7331,3876, # 3078
7332,7333,  39,2517,4303,2894,3177,2078,  55, 148,  74,4304, 545, 483,1474,1029, # 3094
1665, 217,1869,1531,3113,1104,2645,4067,  24, 172,3507, 900,3877,3508,3509,4305, # 3110
  32,1408,2811,1312, 329, 487,2355,2247,2708, 784,2674,   4,3019,3314,1427,1788, # 3126
 188, 109, 499,7334,3620,1717,1789, 888,1217,3020,4306,7335,3510,7336,3315,1520, # 3142
3621,3878, 196,1034, 775,7337,7338, 929,1815, 249, 439,  38,7339,1063,7340, 794, # 3158
3879,1435,2296,  46, 178,3245,2065,7341,2376,7342, 214,1709,4307, 804,  35, 707, # 3174
 324,3622,1601,2546, 140, 459,4068,7343,7344,1365, 839, 272, 978,2257,2572,3409, # 3190
2128,1363,3623,1423, 697, 100,3071,  48,  70,1231, 495,3114,2193,7345,1294,7346, # 3206
2079, 462, 586,1042,3246, 853, 256, 988, 185,2377,3410,1698, 434,1084,7347,3411, # 3222
 314,2615,2775,4308,2330,2331, 569,2280, 637,1816,2518, 757,1162,1878,1616,3412, # 3238
 287,1577,2115, 768,4309,1671,2854,3511,2519,1321,3737, 909,2413,7348,4069, 933, # 3254
3738,7349,2052,2356,1222,4310, 765,2414,1322, 786,4311,7350,1919,1462,1677,2895, # 3270
1699,7351,4312,1424,2437,3115,3624,2590,3316,1774,1940,3413,3880,4070, 309,1369, # 3286
1130,2812, 364,2230,1653,1299,3881,3512,3882,3883,2646, 525,1085,3021, 902,2000, # 3302
1475, 964,4313, 421,1844,1415,1057,2281, 940,1364,3116, 376,4314,4315,1381,   7, # 3318
2520, 983,2378, 336,1710,2675,1845, 321,3414, 559,1131,3022,2742,1808,1132,1313, # 3334
 265,1481,1857,7352, 352,1203,2813,3247, 167,1089, 420,2814, 776, 792,1724,3513, # 3350
4071,2438,3248,7353,4072,7354, 446, 229, 333,2743, 901,3739,1200,1557,4316,2647, # 3366
1920, 395,2744,2676,3740,4073,1835, 125, 916,3178,2616,4317,7355,7356,3741,7357, # 3382
7358,7359,4318,3117,3625,1133,2547,1757,3415,1510,2313,1409,3514,7360,2145, 438, # 3398
2591,2896,2379,3317,1068, 958,3023, 461, 311,2855,2677,4074,1915,3179,4075,1978, # 3414
 383, 750,2745,2617,4076, 274, 539, 385,1278,1442,7361,1154,1964, 384, 561, 210, # 3430
  98,1295,2548,3515,7362,1711,2415,1482,3416,3884,2897,1257, 129,7363,3742, 642, # 3446
 523,2776,2777,2648,7364, 141,2231,1333,  68, 176, 441, 876, 907,4077, 603,2592, # 3462
 710, 171,3417, 404, 549,  18,3118,2393,1410,3626,1666,7365,3516,4319,2898,4320, # 3478
7366,2973, 368,7367, 146, 366,  99, 871,3627,1543, 748, 807,1586,1185,  22,2258, # 3494
 379,3743,3180,7368,3181, 505,1941,2618,1991,1382,2314,7369, 380,2357, 218, 702, # 3510
1817,1248,3418,3024,3517,3318,3249,7370,2974,3628, 930,3250,3744,7371,  59,7372, # 3526
 585, 601,4078, 497,3419,1112,1314,4321,1801,7373,1223,1472,2174,7374, 749,1836, # 3542
 690,1899,3745,1772,3885,1476, 429,1043,1790,2232,2116, 917,4079, 447,1086,1629, # 3558
7375, 556,7376,7377,2020,1654, 844,1090, 105, 550, 966,1758,2815,1008,1782, 686, # 3574
1095,7378,2282, 793,1602,7379,3518,2593,4322,4080,2933,2297,4323,3746, 980,2496, # 3590
 544, 353, 527,4324, 908,2678,2899,7380, 381,2619,1942,1348,7381,1341,1252, 560, # 3606
3072,7382,3420,2856,7383,2053, 973, 886,2080, 143,4325,7384,7385, 157,3886, 496, # 3622
4081,  57, 840, 540,2038,4326,4327,3421,2117,1445, 970,2259,1748,1965,2081,4082, # 3638
3119,1234,1775,3251,2816,3629, 773,1206,2129,1066,2039,1326,3887,1738,1725,4083, # 3654
 279,3120,  51,1544,2594, 423,1578,2130,2066, 173,4328,1879,7386,7387,1583, 264, # 3670
 610,3630,4329,2439, 280, 154,7388,7389,7390,1739, 338,1282,3073, 693,2857,1411, # 3686
1074,3747,2440,7391,4330,7392,7393,1240, 952,2394,7394,2900,1538,2679, 685,1483, # 3702
4084,2468,1436, 953,4085,2054,4331, 671,2395,  79,4086,2441,3252, 608, 567,2680, # 3718
3422,4087,4088,1691, 393,1261,1791,2396,7395,4332,7396,7397,7398,7399,1383,1672, # 3734
3748,3182,1464, 522,1119, 661,1150, 216, 675,4333,3888,1432,3519, 609,4334,2681, # 3750
2397,7400,7401,7402,4089,3025,   0,7403,2469, 315, 231,2442, 301,3319,4335,2380, # 3766
7404, 233,4090,3631,1818,4336,4337,7405,  96,1776,1315,2082,7406, 257,7407,1809, # 3782
3632,2709,1139,1819,4091,2021,1124,2163,2778,1777,2649,7408,3074, 363,1655,3183, # 3798
7409,2975,7410,7411,7412,3889,1567,3890, 718, 103,3184, 849,1443, 341,3320,2934, # 3814
1484,7413,1712, 127,  67, 339,4092,2398, 679,1412, 821,7414,7415, 834, 738, 351, # 3830
2976,2146, 846, 235,1497,1880, 418,1992,3749,2710, 186,1100,2147,2746,3520,1545, # 3846
1355,2935,2858,1377, 583,3891,4093,2573,2977,7416,1298,3633,1078,2549,3634,2358, # 3862
  78,3750,3751, 267,1289,2099,2001,1594,4094, 348, 369,1274,2194,2175,1837,4338, # 3878
1820,2817,3635,2747,2283,2002,4339,2936,2748, 144,3321, 882,4340,3892,2749,3423, # 3894
4341,2901,7417,4095,1726, 320,7418,3893,3026, 788,2978,7419,2818,1773,1327,2859, # 3910
3894,2819,7420,1306,4342,2003,1700,3752,3521,2359,2650, 787,2022, 506, 824,3636, # 3926
 534, 323,4343,1044,3322,2023,1900, 946,3424,7421,1778,1500,1678,7422,1881,4344, # 3942
 165, 243,4345,3637,2521, 123, 683,4096, 764,4346,  36,3895,1792, 589,2902, 816, # 3958
 626,1667,3027,2233,1639,1555,1622,3753,3896,7423,3897,2860,1370,1228,1932, 891, # 3974
2083,2903, 304,4097,7424, 292,2979,2711,3522, 691,2100,4098,1115,4347, 118, 662, # 3990
7425, 611,1156, 854,2381,1316,2861,   2, 386, 515,2904,7426,7427,3253, 868,2234, # 4006
1486, 855,2651, 785,2212,3028,7428,1040,3185,3523,7429,3121, 448,7430,1525,7431, # 4022
2164,4348,7432,3754,7433,4099,2820,3524,3122, 503, 818,3898,3123,1568, 814, 676, # 4038
1444, 306,1749,7434,3755,1416,1030, 197,1428, 805,2821,1501,4349,7435,7436,7437, # 4054
1993,7438,4350,7439,7440,2195,  13,2779,3638,2980,3124,1229,1916,7441,3756,2131, # 4070
7442,4100,4351,2399,3525,7443,2213,1511,1727,1120,7444,7445, 646,3757,2443, 307, # 4086
7446,7447,1595,3186,7448,7449,7450,3639,1113,1356,3899,1465,2522,2523,7451, 519, # 4102
7452, 128,2132,  92,2284,1979,7453,3900,1512, 342,3125,2196,7454,2780,2214,1980, # 4118
3323,7455, 290,1656,1317, 789, 827,2360,7456,3758,4352, 562, 581,3901,7457, 401, # 4134
4353,2248,  94,4354,1399,2781,7458,1463,2024,4355,3187,1943,7459, 828,1105,4101, # 4150
1262,1394,7460,4102, 605,4356,7461,1783,2862,7462,2822, 819,2101, 578,2197,2937, # 4166
7463,1502, 436,3254,4103,3255,2823,3902,2905,3425,3426,7464,2712,2315,7465,7466, # 4182
2332,2067,  23,4357, 193, 826,3759,2102, 699,1630,4104,3075, 390,1793,1064,3526, # 4198
7467,1579,3076,3077,1400,7468,4105,1838,1640,2863,7469,4358,4359, 137,4106, 598, # 4214
3078,1966, 780, 104, 974,2938,7470, 278, 899, 253, 402, 572, 504, 493,1339,7471, # 4230
3903,1275,4360,2574,2550,7472,3640,3029,3079,2249, 565,1334,2713, 863,  41,7473, # 4246
7474,4361,7475,1657,2333,  19, 463,2750,4107, 606,7476,2981,3256,1087,2084,1323, # 4262
2652,2982,7477,1631,1623,1750,4108,2682,7478,2864, 791,2714,2653,2334, 232,2416, # 4278
7479,2983,1498,7480,2654,2620, 755,1366,3641,3257,3126,2025,1609, 119,1917,3427, # 4294
 862,1026,4109,7481,3904,3760,4362,3905,4363,2260,1951,2470,7482,1125, 817,4110, # 4310
4111,3906,1513,1766,2040,1487,4112,3030,3258,2824,3761,3127,7483,7484,1507,7485, # 4326
2683, 733,  40,1632,1106,2865, 345,4113, 841,2524, 230,4364,2984,1846,3259,3428, # 4342
7486,1263, 986,3429,7487, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562,3907, # 4358
3908,2939, 967,2751,2655,1349, 592,2133,1692,3324,2985,1994,4114,1679,3909,1901, # 4374
2185,7488, 739,3642,2715,1296,1290,7489,4115,2198,2199,1921,1563,2595,2551,1870, # 4390
2752,2986,7490, 435,7491, 343,1108, 596,  17,1751,4365,2235,3430,3643,7492,4366, # 4406
 294,3527,2940,1693, 477, 979, 281,2041,3528, 643,2042,3644,2621,2782,2261,1031, # 4422
2335,2134,2298,3529,4367, 367,1249,2552,7493,3530,7494,4368,1283,3325,2004, 240, # 4438
1762,3326,4369,4370, 836,1069,3128, 474,7495,2148,2525, 268,3531,7496,3188,1521, # 4454
1284,7497,1658,1546,4116,7498,3532,3533,7499,4117,3327,2684,1685,4118, 961,1673, # 4470
2622, 190,2005,2200,3762,4371,4372,7500, 570,2497,3645,1490,7501,4373,2623,3260, # 4486
1956,4374, 584,1514, 396,1045,1944,7502,4375,1967,2444,7503,7504,4376,3910, 619, # 4502
7505,3129,3261, 215,2006,2783,2553,3189,4377,3190,4378, 763,4119,3763,4379,7506, # 4518
7507,1957,1767,2941,3328,3646,1174, 452,1477,4380,3329,3130,7508,2825,1253,2382, # 4534
2186,1091,2285,4120, 492,7509, 638,1169,1824,2135,1752,3911, 648, 926,1021,1324, # 4550
4381, 520,4382, 997, 847,1007, 892,4383,3764,2262,1871,3647,7510,2400,1784,4384, # 4566
1952,2942,3080,3191,1728,4121,2043,3648,4385,2007,1701,3131,1551,  30,2263,4122, # 4582
7511,2026,4386,3534,7512, 501,7513,4123, 594,3431,2165,1821,3535,3432,3536,3192, # 4598
 829,2826,4124,7514,1680,3132,1225,4125,7515,3262,4387,4126,3133,2336,7516,4388, # 4614
4127,7517,3912,3913,7518,1847,2383,2596,3330,7519,4389, 374,3914, 652,4128,4129, # 4630
 375,1140, 798,7520,7521,7522,2361,4390,2264, 546,1659, 138,3031,2445,4391,7523, # 4646
2250, 612,1848, 910, 796,3765,1740,1371, 825,3766,3767,7524,2906,2554,7525, 692, # 4662
 444,3032,2624, 801,4392,4130,7526,1491, 244,1053,3033,4131,4132, 340,7527,3915, # 4678
1041,2987, 293,1168,  87,1357,7528,1539, 959,7529,2236, 721, 694,4133,3768, 219, # 4694
1478, 644,1417,3331,2656,1413,1401,1335,1389,3916,7530,7531,2988,2362,3134,1825, # 4710
 730,1515, 184,2827,  66,4393,7532,1660,2943, 246,3332, 378,1457, 226,3433, 975, # 4726
3917,2944,1264,3537, 674, 696,7533, 163,7534,1141,2417,2166, 713,3538,3333,4394, # 4742
3918,7535,7536,1186,  15,7537,1079,1070,7538,1522,3193,3539, 276,1050,2716, 758, # 4758
1126, 653,2945,3263,7539,2337, 889,3540,3919,3081,2989, 903,1250,4395,3920,3434, # 4774
3541,1342,1681,1718, 766,3264, 286,  89,2946,3649,7540,1713,7541,2597,3334,2990, # 4790
7542,2947,2215,3194,2866,7543,4396,2498,2526, 181, 387,1075,3921, 731,2187,3335, # 4806
7544,3265, 310, 313,3435,2299, 770,4134,  54,3034, 189,4397,3082,3769,3922,7545, # 4822
1230,1617,1849, 355,3542,4135,4398,3336, 111,4136,3650,1350,3135,3436,3035,4137, # 4838
2149,3266,3543,7546,2784,3923,3924,2991, 722,2008,7547,1071, 247,1207,2338,2471, # 4854
1378,4399,2009, 864,1437,1214,4400, 373,3770,1142,2216, 667,4401, 442,2753,2555, # 4870
3771,3925,1968,4138,3267,1839, 837, 170,1107, 934,1336,1882,7548,7549,2118,4139, # 4886
2828, 743,1569,7550,4402,4140, 582,2384,1418,3437,7551,1802,7552, 357,1395,1729, # 4902
3651,3268,2418,1564,2237,7553,3083,3772,1633,4403,1114,2085,4141,1532,7554, 482, # 4918
2446,4404,7555,7556,1492, 833,1466,7557,2717,3544,1641,2829,7558,1526,1272,3652, # 4934
4142,1686,1794, 416,2556,1902,1953,1803,7559,3773,2785,3774,1159,2316,7560,2867, # 4950
4405,1610,1584,3036,2419,2754, 443,3269,1163,3136,7561,7562,3926,7563,4143,2499, # 4966
3037,4406,3927,3137,2103,1647,3545,2010,1872,4144,7564,4145, 431,3438,7565, 250, # 4982
  97,  81,4146,7566,1648,1850,1558, 160, 848,7567, 866, 740,1694,7568,2201,2830, # 4998
3195,4147,4407,3653,1687, 950,2472, 426, 469,3196,3654,3655,3928,7569,7570,1188, # 5014
 424,1995, 861,3546,4148,3775,2202,2685, 168,1235,3547,4149,7571,2086,1674,4408, # 5030
3337,3270, 220,2557,1009,7572,3776, 670,2992, 332,1208, 717,7573,7574,3548,2447, # 5046
3929,3338,7575, 513,7576,1209,2868,3339,3138,4409,1080,7577,7578,7579,7580,2527, # 5062
3656,3549, 815,1587,3930,3931,7581,3550,3439,3777,1254,4410,1328,3038,1390,3932, # 5078
1741,3933,3778,3934,7582, 236,3779,2448,3271,7583,7584,3657,3780,1273,3781,4411, # 5094
7585, 308,7586,4412, 245,4413,1851,2473,1307,2575, 430, 715,2136,2449,7587, 270, # 5110
 199,2869,3935,7588,3551,2718,1753, 761,1754, 725,1661,1840,4414,3440,3658,7589, # 5126
7590, 587,  14,3272, 227,2598, 326, 480,2265, 943,2755,3552, 291, 650,1883,7591, # 5142
1702,1226, 102,1547,  62,3441, 904,4415,3442,1164,4150,7592,7593,1224,1548,2756, # 5158
 391, 498,1493,7594,1386,1419,7595,2055,1177,4416, 813, 880,1081,2363, 566,1145, # 5174
4417,2286,1001,1035,2558,2599,2238, 394,1286,7596,7597,2068,7598,  86,1494,1730, # 5190
3936, 491,1588, 745, 897,2948, 843,3340,3937,2757,2870,3273,1768, 998,2217,2069, # 5206
 397,1826,1195,1969,3659,2993,3341, 284,7599,3782,2500,2137,2119,1903,7600,3938, # 5222
2150,3939,4151,1036,3443,1904, 114,2559,4152, 209,1527,7601,7602,2949,2831,2625, # 5238
2385,2719,3139, 812,2560,7603,3274,7604,1559, 737,1884,3660,1210, 885,  28,2686, # 5254
3553,3783,7605,4153,1004,1779,4418,7606, 346,1981,2218,2687,4419,3784,1742, 797, # 5270
1642,3940,1933,1072,1384,2151, 896,3941,3275,3661,3197,2871,3554,7607,2561,1958, # 5286
4420,2450,1785,7608,7609,7610,3942,4154,1005,1308,3662,4155,2720,4421,4422,1528, # 5302
2600, 161,1178,4156,1982, 987,4423,1101,4157, 631,3943,1157,3198,2420,1343,1241, # 5318
1016,2239,2562, 372, 877,2339,2501,1160, 555,1934, 911,3944,7611, 466,1170, 169, # 5334
1051,2907,2688,3663,2474,2994,1182,2011,2563,1251,2626,7612, 992,2340,3444,1540, # 5350
2721,1201,2070,2401,1996,2475,7613,4424, 528,1922,2188,1503,1873,1570,2364,3342, # 5366
3276,7614, 557,1073,7615,1827,3445,2087,2266,3140,3039,3084, 767,3085,2786,4425, # 5382
1006,4158,4426,2341,1267,2176,3664,3199, 778,3945,3200,2722,1597,2657,7616,4427, # 5398
7617,3446,7618,7619,7620,3277,2689,1433,3278, 131,  95,1504,3946, 723,4159,3141, # 5414
1841,3555,2758,2189,3947,2027,2104,3665,7621,2995,3948,1218,7622,3343,3201,3949, # 5430
4160,2576, 248,1634,3785, 912,7623,2832,3666,3040,3786, 654,  53,7624,2996,7625, # 5446
1688,4428, 777,3447,1032,3950,1425,7626, 191, 820,2120,2833, 971,4429, 931,3202, # 5462
 135, 664, 783,3787,1997, 772,2908,1935,3951,3788,4430,2909,3203, 282,2723, 640, # 5478
1372,3448,1127, 922, 325,3344,7627,7628, 711,2044,7629,7630,3952,2219,2787,1936, # 5494
3953,3345,2220,2251,3789,2300,7631,4431,3790,1258,3279,3954,3204,2138,2950,3955, # 5510
3956,7632,2221, 258,3205,4432, 101,1227,7633,3280,1755,7634,1391,3281,7635,2910, # 5526
2056, 893,7636,7637,7638,1402,4161,2342,7639,7640,3206,3556,7641,7642, 878,1325, # 5542
1780,2788,4433, 259,1385,2577, 744,1183,2267,4434,7643,3957,2502,7644, 684,1024, # 5558
4162,7645, 472,3557,3449,1165,3282,3958,3959, 322,2152, 881, 455,1695,1152,1340, # 5574
 660, 554,2153,4435,1058,4436,4163, 830,1065,3346,3960,4437,1923,7646,1703,1918, # 5590
7647, 932,2268, 122,7648,4438, 947, 677,7649,3791,2627, 297,1905,1924,2269,4439, # 5606
2317,3283,7650,7651,4164,7652,4165,  84,4166, 112, 989,7653, 547,1059,3961, 701, # 5622
3558,1019,7654,4167,7655,3450, 942, 639, 457,2301,2451, 993,2951, 407, 851, 494, # 5638
4440,3347, 927,7656,1237,7657,2421,3348, 573,4168, 680, 921,2911,1279,1874, 285, # 5654
 790,1448,1983, 719,2167,7658,7659,4441,3962,3963,1649,7660,1541, 563,7661,1077, # 5670
7662,3349,3041,3451, 511,2997,3964,3965,3667,3966,1268,2564,3350,3207,4442,4443, # 5686
7663, 535,1048,1276,1189,2912,2028,3142,1438,1373,2834,2952,1134,2012,7664,4169, # 5702
1238,2578,3086,1259,7665, 700,7666,2953,3143,3668,4170,7667,4171,1146,1875,1906, # 5718
4444,2601,3967, 781,2422, 132,1589, 203, 147, 273,2789,2402, 898,1786,2154,3968, # 5734
3969,7668,3792,2790,7669,7670,4445,4446,7671,3208,7672,1635,3793, 965,7673,1804, # 5750
2690,1516,3559,1121,1082,1329,3284,3970,1449,3794,  65,1128,2835,2913,2759,1590, # 5766
3795,7674,7675,  12,2658,  45, 976,2579,3144,4447, 517,2528,1013,1037,3209,7676, # 5782
3796,2836,7677,3797,7678,3452,7679,2602, 614,1998,2318,3798,3087,2724,2628,7680, # 5798
2580,4172, 599,1269,7681,1810,3669,7682,2691,3088, 759,1060, 489,1805,3351,3285, # 5814
1358,7683,7684,2386,1387,1215,2629,2252, 490,7685,7686,4173,1759,2387,2343,7687, # 5830
4448,3799,1907,3971,2630,1806,3210,4449,3453,3286,2760,2344, 874,7688,7689,3454, # 5846
3670,1858,  91,2914,3671,3042,3800,4450,7690,3145,3972,2659,7691,3455,1202,1403, # 5862
3801,2954,2529,1517,2503,4451,3456,2504,7692,4452,7693,2692,1885,1495,1731,3973, # 5878
2365,4453,7694,2029,7695,7696,3974,2693,1216, 237,2581,4174,2319,3975,3802,4454, # 5894
4455,2694,3560,3457, 445,4456,7697,7698,7699,7700,2761,  61,3976,3672,1822,3977, # 5910
7701, 687,2045, 935, 925, 405,2660, 703,1096,1859,2725,4457,3978,1876,1367,2695, # 5926
3352, 918,2105,1781,2476, 334,3287,1611,1093,4458, 564,3146,3458,3673,3353, 945, # 5942
2631,2057,4459,7702,1925, 872,4175,7703,3459,2696,3089, 349,4176,3674,3979,4460, # 5958
3803,4177,3675,2155,3980,4461,4462,4178,4463,2403,2046, 782,3981, 400, 251,4179, # 5974
1624,7704,7705, 277,3676, 299,1265, 476,1191,3804,2121,4180,4181,1109, 205,7706, # 5990
2582,1000,2156,3561,1860,7707,7708,7709,4464,7710,4465,2565, 107,2477,2157,3982, # 6006
3460,3147,7711,1533, 541,1301, 158, 753,4182,2872,3562,7712,1696, 370,1088,4183, # 6022
4466,3563, 579, 327, 440, 162,2240, 269,1937,1374,3461, 968,3043,  56,1396,3090, # 6038
2106,3288,3354,7713,1926,2158,4467,2998,7714,3564,7715,7716,3677,4468,2478,7717, # 6054
2791,7718,1650,4469,7719,2603,7720,7721,3983,2661,3355,1149,3356,3984,3805,3985, # 6070
7722,1076,  49,7723, 951,3211,3289,3290, 450,2837, 920,7724,1811,2792,2366,4184, # 6086
1908,1138,2367,3806,3462,7725,3212,4470,1909,1147,1518,2423,4471,3807,7726,4472, # 6102
2388,2604, 260,1795,3213,7727,7728,3808,3291, 708,7729,3565,1704,7730,3566,1351, # 6118
1618,3357,2999,1886, 944,4185,3358,4186,3044,3359,4187,7731,3678, 422, 413,1714, # 6134
3292, 500,2058,2345,4188,2479,7732,1344,1910, 954,7733,1668,7734,7735,3986,2404, # 6150
4189,3567,3809,4190,7736,2302,1318,2505,3091, 133,3092,2873,4473, 629,  31,2838, # 6166
2697,3810,4474, 850, 949,4475,3987,2955,1732,2088,4191,1496,1852,7737,3988, 620, # 6182
3214, 981,1242,3679,3360,1619,3680,1643,3293,2139,2452,1970,1719,3463,2168,7738, # 6198
3215,7739,7740,3361,1828,7741,1277,4476,1565,2047,7742,1636,3568,3093,7743, 869, # 6214
2839, 655,3811,3812,3094,3989,3000,3813,1310,3569,4477,7744,7745,7746,1733, 558, # 6230
4478,3681, 335,1549,3045,1756,4192,3682,1945,3464,1829,1291,1192, 470,2726,2107, # 6246
2793, 913,1054,3990,7747,1027,7748,3046,3991,4479, 982,2662,3362,3148,3465,3216, # 6262
3217,1946,2794,7749, 571,4480,7750,1830,7751,3570,2583,1523,2424,7752,2089, 984, # 6278
4481,3683,1959,7753,3684, 852, 923,2795,3466,3685, 969,1519, 999,2048,2320,1705, # 6294
7754,3095, 615,1662, 151, 597,3992,2405,2321,1049, 275,4482,3686,4193, 568,3687, # 6310
3571,2480,4194,3688,7755,2425,2270, 409,3218,7756,1566,2874,3467,1002, 769,2840, # 6326
 194,2090,3149,3689,2222,3294,4195, 628,1505,7757,7758,1763,2177,3001,3993, 521, # 6342
1161,2584,1787,2203,2406,4483,3994,1625,4196,4197, 412,  42,3096, 464,7759,2632, # 6358
4484,3363,1760,1571,2875,3468,2530,1219,2204,3814,2633,2140,2368,4485,4486,3295, # 6374
1651,3364,3572,7760,7761,3573,2481,3469,7762,3690,7763,7764,2271,2091, 460,7765, # 6390
4487,7766,3002, 962, 588,3574, 289,3219,2634,1116,  52,7767,3047,1796,7768,7769, # 6406
7770,1467,7771,1598,1143,3691,4198,1984,1734,1067,4488,1280,3365, 465,4489,1572, # 6422
 510,7772,1927,2241,1812,1644,3575,7773,4490,3692,7774,7775,2663,1573,1534,7776, # 6438
7777,4199, 536,1807,1761,3470,3815,3150,2635,7778,7779,7780,4491,3471,2915,1911, # 6454
2796,7781,3296,1122, 377,3220,7782, 360,7783,7784,4200,1529, 551,7785,2059,3693, # 6470
1769,2426,7786,2916,4201,3297,3097,2322,2108,2030,4492,1404, 136,1468,1479, 672, # 6486
1171,3221,2303, 271,3151,7787,2762,7788,2049, 678,2727, 865,1947,4493,7789,2013, # 6502
3995,2956,7790,2728,2223,1397,3048,3694,4494,4495,1735,2917,3366,3576,7791,3816, # 6518
 509,2841,2453,2876,3817,7792,7793,3152,3153,4496,4202,2531,4497,2304,1166,1010, # 6534
 552, 681,1887,7794,7795,2957,2958,3996,1287,1596,1861,3154, 358, 453, 736, 175, # 6550
 478,1117, 905,1167,1097,7796,1853,1530,7797,1706,7798,2178,3472,2287,3695,3473, # 6566
3577,4203,2092,4204,7799,3367,1193,2482,4205,1458,2190,2205,1862,1888,1421,3298, # 6582
2918,3049,2179,3474, 595,2122,7800,3997,7801,7802,4206,1707,2636, 223,3696,1359, # 6598
 751,3098, 183,3475,7803,2797,3003, 419,2369, 633, 704,3818,2389, 241,7804,7805, # 6614
7806, 838,3004,3697,2272,2763,2454,3819,1938,2050,3998,1309,3099,2242,1181,7807, # 6630
1136,2206,3820,2370,1446,4207,2305,4498,7808,7809,4208,1055,2605, 484,3698,7810, # 6646
3999, 625,4209,2273,3368,1499,4210,4000,7811,4001,4211,3222,2274,2275,3476,7812, # 6662
7813,2764, 808,2606,3699,3369,4002,4212,3100,2532, 526,3370,3821,4213, 955,7814, # 6678
1620,4214,2637,2427,7815,1429,3700,1669,1831, 994, 928,7816,3578,1260,7817,7818, # 6694
7819,1948,2288, 741,2919,1626,4215,2729,2455, 867,1184, 362,3371,1392,7820,7821, # 6710
4003,4216,1770,1736,3223,2920,4499,4500,1928,2698,1459,1158,7822,3050,3372,2877, # 6726
1292,1929,2506,2842,3701,1985,1187,2071,2014,2607,4217,7823,2566,2507,2169,3702, # 6742
2483,3299,7824,3703,4501,7825,7826, 666,1003,3005,1022,3579,4218,7827,4502,1813, # 6758
2253, 574,3822,1603, 295,1535, 705,3823,4219, 283, 858, 417,7828,7829,3224,4503, # 6774
4504,3051,1220,1889,1046,2276,2456,4004,1393,1599, 689,2567, 388,4220,7830,2484, # 6790
 802,7831,2798,3824,2060,1405,2254,7832,4505,3825,2109,1052,1345,3225,1585,7833, # 6806
 809,7834,7835,7836, 575,2730,3477, 956,1552,1469,1144,2323,7837,2324,1560,2457, # 6822
3580,3226,4005, 616,2207,3155,2180,2289,7838,1832,7839,3478,4506,7840,1319,3704, # 6838
3705,1211,3581,1023,3227,1293,2799,7841,7842,7843,3826, 607,2306,3827, 762,2878, # 6854
1439,4221,1360,7844,1485,3052,7845,4507,1038,4222,1450,2061,2638,4223,1379,4508, # 6870
2585,7846,7847,4224,1352,1414,2325,2921,1172,7848,7849,3828,3829,7850,1797,1451, # 6886
7851,7852,7853,7854,2922,4006,4007,2485,2346, 411,4008,4009,3582,3300,3101,4509, # 6902
1561,2664,1452,4010,1375,7855,7856,  47,2959, 316,7857,1406,1591,2923,3156,7858, # 6918
1025,2141,3102,3157, 354,2731, 884,2224,4225,2407, 508,3706, 726,3583, 996,2428, # 6934
3584, 729,7859, 392,2191,1453,4011,4510,3707,7860,7861,2458,3585,2608,1675,2800, # 6950
 919,2347,2960,2348,1270,4511,4012,  73,7862,7863, 647,7864,3228,2843,2255,1550, # 6966
1346,3006,7865,1332, 883,3479,7866,7867,7868,7869,3301,2765,7870,1212, 831,1347, # 6982
4226,4512,2326,3830,1863,3053, 720,3831,4513,4514,3832,7871,4227,7872,7873,4515, # 6998
7874,7875,1798,4516,3708,2609,4517,3586,1645,2371,7876,7877,2924, 669,2208,2665, # 7014
2429,7878,2879,7879,7880,1028,3229,7881,4228,2408,7882,2256,1353,7883,7884,4518, # 7030
3158, 518,7885,4013,7886,4229,1960,7887,2142,4230,7888,7889,3007,2349,2350,3833, # 7046
 516,1833,1454,4014,2699,4231,4519,2225,2610,1971,1129,3587,7890,2766,7891,2961, # 7062
1422, 577,1470,3008,1524,3373,7892,7893, 432,4232,3054,3480,7894,2586,1455,2508, # 7078
2226,1972,1175,7895,1020,2732,4015,3481,4520,7896,2733,7897,1743,1361,3055,3482, # 7094
2639,4016,4233,4521,2290, 895, 924,4234,2170, 331,2243,3056, 166,1627,3057,1098, # 7110
7898,1232,2880,2227,3374,4522, 657, 403,1196,2372, 542,3709,3375,1600,4235,3483, # 7126
7899,4523,2767,3230, 576, 530,1362,7900,4524,2533,2666,3710,4017,7901, 842,3834, # 7142
7902,2801,2031,1014,4018, 213,2700,3376, 665, 621,4236,7903,3711,2925,2430,7904, # 7158
2431,3302,3588,3377,7905,4237,2534,4238,4525,3589,1682,4239,3484,1380,7906, 724, # 7174
2277, 600,1670,7907,1337,1233,4526,3103,2244,7908,1621,4527,7909, 651,4240,7910, # 7190
1612,4241,2611,7911,2844,7912,2734,2307,3058,7913, 716,2459,3059, 174,1255,2701, # 7206
4019,3590, 548,1320,1398, 728,4020,1574,7914,1890,1197,3060,4021,7915,3061,3062, # 7222
3712,3591,3713, 747,7916, 635,4242,4528,7917,7918,7919,4243,7920,7921,4529,7922, # 7238
3378,4530,2432, 451,7923,3714,2535,2072,4244,2735,4245,4022,7924,1764,4531,7925, # 7254
4246, 350,7926,2278,2390,2486,7927,4247,4023,2245,1434,4024, 488,4532, 458,4248, # 7270
4025,3715, 771,1330,2391,3835,2568,3159,2159,2409,1553,2667,3160,4249,7928,2487, # 7286
2881,2612,1720,2702,4250,3379,4533,7929,2536,4251,7930,3231,4252,2768,7931,2015, # 7302
2736,7932,1155,1017,3716,3836,7933,3303,2308, 201,1864,4253,1430,7934,4026,7935, # 7318
7936,7937,7938,7939,4254,1604,7940, 414,1865, 371,2587,4534,4535,3485,2016,3104, # 7334
4536,1708, 960,4255, 887, 389,2171,1536,1663,1721,7941,2228,4027,2351,2926,1580, # 7350
7942,7943,7944,1744,7945,2537,4537,4538,7946,4539,7947,2073,7948,7949,3592,3380, # 7366
2882,4256,7950,4257,2640,3381,2802, 673,2703,2460, 709,3486,4028,3593,4258,7951, # 7382
1148, 502, 634,7952,7953,1204,4540,3594,1575,4541,2613,3717,7954,3718,3105, 948, # 7398
3232, 121,1745,3837,1110,7955,4259,3063,2509,3009,4029,3719,1151,1771,3838,1488, # 7414
4030,1986,7956,2433,3487,7957,7958,2093,7959,4260,3839,1213,1407,2803, 531,2737, # 7430
2538,3233,1011,1537,7960,2769,4261,3106,1061,7961,3720,3721,1866,2883,7962,2017, # 7446
 120,4262,4263,2062,3595,3234,2309,3840,2668,3382,1954,4542,7963,7964,3488,1047, # 7462
2704,1266,7965,1368,4543,2845, 649,3383,3841,2539,2738,1102,2846,2669,7966,7967, # 7478
1999,7968,1111,3596,2962,7969,2488,3842,3597,2804,1854,3384,3722,7970,7971,3385, # 7494
2410,2884,3304,3235,3598,7972,2569,7973,3599,2805,4031,1460, 856,7974,3600,7975, # 7510
2885,2963,7976,2886,3843,7977,4264, 632,2510, 875,3844,1697,3845,2291,7978,7979, # 7526
4544,3010,1239, 580,4545,4265,7980, 914, 936,2074,1190,4032,1039,2123,7981,7982, # 7542
7983,3386,1473,7984,1354,4266,3846,7985,2172,3064,4033, 915,3305,4267,4268,3306, # 7558
1605,1834,7986,2739, 398,3601,4269,3847,4034, 328,1912,2847,4035,3848,1331,4270, # 7574
3011, 937,4271,7987,3602,4036,4037,3387,2160,4546,3388, 524, 742, 538,3065,1012, # 7590
7988,7989,3849,2461,7990, 658,1103, 225,3850,7991,7992,4547,7993,4548,7994,3236, # 7606
1243,7995,4038, 963,2246,4549,7996,2705,3603,3161,7997,7998,2588,2327,7999,4550, # 7622
8000,8001,8002,3489,3307, 957,3389,2540,2032,1930,2927,2462, 870,2018,3604,1746, # 7638
2770,2771,2434,2463,8003,3851,8004,3723,3107,3724,3490,3390,3725,8005,1179,3066, # 7654
8006,3162,2373,4272,3726,2541,3163,3108,2740,4039,8007,3391,1556,2542,2292, 977, # 7670
2887,2033,4040,1205,3392,8008,1765,3393,3164,2124,1271,1689, 714,4551,3491,8009, # 7686
2328,3852, 533,4273,3605,2181, 617,8010,2464,3308,3492,2310,8011,8012,3165,8013, # 7702
8014,3853,1987, 618, 427,2641,3493,3394,8015,8016,1244,1690,8017,2806,4274,4552, # 7718
8018,3494,8019,8020,2279,1576, 473,3606,4275,3395, 972,8021,3607,8022,3067,8023, # 7734
8024,4553,4554,8025,3727,4041,4042,8026, 153,4555, 356,8027,1891,2888,4276,2143, # 7750
 408, 803,2352,8028,3854,8029,4277,1646,2570,2511,4556,4557,3855,8030,3856,4278, # 7766
8031,2411,3396, 752,8032,8033,1961,2964,8034, 746,3012,2465,8035,4279,3728, 698, # 7782
4558,1892,4280,3608,2543,4559,3609,3857,8036,3166,3397,8037,1823,1302,4043,2706, # 7798
3858,1973,4281,8038,4282,3167, 823,1303,1288,1236,2848,3495,4044,3398, 774,3859, # 7814
8039,1581,4560,1304,2849,3860,4561,8040,2435,2161,1083,3237,4283,4045,4284, 344, # 7830
1173, 288,2311, 454,1683,8041,8042,1461,4562,4046,2589,8043,8044,4563, 985, 894, # 7846
8045,3399,3168,8046,1913,2928,3729,1988,8047,2110,1974,8048,4047,8049,2571,1194, # 7862
 425,8050,4564,3169,1245,3730,4285,8051,8052,2850,8053, 636,4565,1855,3861, 760, # 7878
1799,8054,4286,2209,1508,4566,4048,1893,1684,2293,8055,8056,8057,4287,4288,2210, # 7894
 479,8058,8059, 832,8060,4049,2489,8061,2965,2490,3731, 990,3109, 627,1814,2642, # 7910
4289,1582,4290,2125,2111,3496,4567,8062, 799,4291,3170,8063,4568,2112,1737,3013, # 7926
1018, 543, 754,4292,3309,1676,4569,4570,4050,8064,1489,8065,3497,8066,2614,2889, # 7942
4051,8067,8068,2966,8069,8070,8071,8072,3171,4571,4572,2182,1722,8073,3238,3239, # 7958
1842,3610,1715, 481, 365,1975,1856,8074,8075,1962,2491,4573,8076,2126,3611,3240, # 7974
 433,1894,2063,2075,8077, 602,2741,8078,8079,8080,8081,8082,3014,1628,3400,8083, # 7990
3172,4574,4052,2890,4575,2512,8084,2544,2772,8085,8086,8087,3310,4576,2891,8088, # 8006
4577,8089,2851,4578,4579,1221,2967,4053,2513,8090,8091,8092,1867,1989,8093,8094, # 8022
8095,1895,8096,8097,4580,1896,4054, 318,8098,2094,4055,4293,8099,8100, 485,8101, # 8038
 938,3862, 553,2670, 116,8102,3863,3612,8103,3498,2671,2773,3401,3311,2807,8104, # 8054
3613,2929,4056,1747,2930,2968,8105,8106, 207,8107,8108,2672,4581,2514,8109,3015, # 8070
 890,3614,3864,8110,1877,3732,3402,8111,2183,2353,3403,1652,8112,8113,8114, 941, # 8086
2294, 208,3499,4057,2019, 330,4294,3865,2892,2492,3733,4295,8115,8116,8117,8118, # 8102
#Everything below is of no interest for detection purpose
2515,1613,4582,8119,3312,3866,2516,8120,4058,8121,1637,4059,2466,4583,3867,8122, # 8118
2493,3016,3734,8123,8124,2192,8125,8126,2162,8127,8128,8129,8130,8131,8132,8133, # 8134
8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,8144,8145,8146,8147,8148,8149, # 8150
8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,8160,8161,8162,8163,8164,8165, # 8166
8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181, # 8182
8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197, # 8198
8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213, # 8214
8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229, # 8230
8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245, # 8246
8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261, # 8262
8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277, # 8278
8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,8290,8291,8292,8293, # 8294
8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309, # 8310
8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322,8323,8324,8325, # 8326
8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337,8338,8339,8340,8341, # 8342
8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353,8354,8355,8356,8357, # 8358
8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370,8371,8372,8373, # 8374
8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8386,8387,8388,8389, # 8390
8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400,8401,8402,8403,8404,8405, # 8406
8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,8416,8417,8418,8419,8420,8421, # 8422
8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,8433,8434,8435,8436,8437, # 8438
8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,8448,8449,8450,8451,8452,8453, # 8454
8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8468,8469, # 8470
8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480,8481,8482,8483,8484,8485, # 8486
8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501, # 8502
8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517, # 8518
8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533, # 8534
8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549, # 8550
8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565, # 8566
8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581, # 8582
8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597, # 8598
8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612,8613, # 8614
8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,8624,8625,8626,8627,8628,8629, # 8630
8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644,8645, # 8646
8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660,8661, # 8662
8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673,8674,8675,8676,8677, # 8678
8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693, # 8694
8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709, # 8710
8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725, # 8726
8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740,8741) # 8742

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py000064400000042475151735047770024424 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# KOI8-R language model
# Character Mapping Table:
KOI8R_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,  # 80
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,  # 90
223,224,225, 68,226,227,228,229,230,231,232,233,234,235,236,237,  # a0
238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,  # b0
 27,  3, 21, 28, 13,  2, 39, 19, 26,  4, 23, 11,  8, 12,  5,  1,  # c0
 15, 16,  9,  7,  6, 14, 24, 10, 17, 18, 20, 25, 30, 29, 22, 54,  # d0
 59, 37, 44, 58, 41, 48, 53, 46, 55, 42, 60, 36, 49, 38, 31, 34,  # e0
 35, 43, 45, 32, 40, 52, 56, 33, 61, 62, 51, 57, 47, 63, 50, 70,  # f0
)

win1251_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
239,240,241,242,243,244,245,246, 68,247,248,249,250,251,252,253,
 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
)

latin5_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
)

macCyrillic_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
239,240,241,242,243,244,245,246,247,248,249,250,251,252, 68, 16,
  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27,255,
)

IBM855_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
191,192,193,194, 68,195,196,197,198,199,200,201,202,203,204,205,
206,207,208,209,210,211,212,213,214,215,216,217, 27, 59, 54, 70,
  3, 37, 21, 44, 28, 58, 13, 41,  2, 48, 39, 53, 19, 46,218,219,
220,221,222,223,224, 26, 55,  4, 42,225,226,227,228, 23, 60,229,
230,231,232,233,234,235, 11, 36,236,237,238,239,240,241,242,243,
  8, 49, 12, 38,  5, 31,  1, 34, 15,244,245,246,247, 35, 16,248,
 43,  9, 45,  7, 32,  6, 40, 14, 52, 24, 56, 10, 33, 17, 61,249,
250, 18, 62, 20, 51, 25, 57, 30, 47, 29, 63, 22, 50,251,252,255,
)

IBM866_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  # 40
155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  # 50
253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  # 60
 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  # 70
 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,
 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,
  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,
191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,
  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,
239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 97.6601%
# first 1024 sequences: 2.3389%
# rest  sequences:      0.1237%
# negative sequences:   0.0009%
RussianLangModel = (
0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,1,3,3,3,2,3,2,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,2,2,2,0,0,2,
3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,2,3,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,2,2,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,2,3,3,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,
0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,
0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,2,2,2,3,1,3,3,1,3,3,3,3,2,2,3,0,2,2,2,3,3,2,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,3,3,3,2,2,3,2,3,3,3,2,1,2,2,0,1,2,2,2,2,2,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,3,0,2,2,3,3,2,1,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,1,2,3,2,2,3,2,3,3,3,3,2,2,3,0,3,2,2,3,1,1,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,2,3,3,3,3,2,2,2,0,3,3,3,2,2,2,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,3,3,3,2,3,2,2,0,1,3,2,1,2,2,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,2,1,1,3,0,1,1,1,1,2,1,1,0,2,2,2,1,2,0,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,2,2,2,2,1,3,2,3,2,3,2,1,2,2,0,1,1,2,1,2,1,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,2,3,3,3,2,2,2,2,0,2,2,2,2,3,1,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
3,2,3,2,2,3,3,3,3,3,3,3,3,3,1,3,2,0,0,3,3,3,3,2,3,3,3,3,2,3,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,3,2,2,3,3,0,2,1,0,3,2,3,2,3,0,0,1,2,0,0,1,0,1,2,1,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,3,0,2,3,3,3,3,2,3,3,3,3,1,2,2,0,0,2,3,2,2,2,3,2,3,2,2,3,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,3,0,2,3,2,3,0,1,2,3,3,2,0,2,3,0,0,2,3,2,2,0,1,3,1,3,2,2,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,3,0,2,3,3,3,3,3,3,3,3,2,1,3,2,0,0,2,2,3,3,3,2,3,3,0,2,2,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,2,3,3,2,2,2,3,3,0,0,1,1,1,1,1,2,0,0,1,1,1,1,0,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,2,3,3,3,3,3,3,3,0,3,2,3,3,2,3,2,0,2,1,0,1,1,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,2,3,3,3,2,2,2,2,3,1,3,2,3,1,1,2,1,0,2,2,2,2,1,3,1,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
2,2,3,3,3,3,3,1,2,2,1,3,1,0,3,0,0,3,0,0,0,1,1,0,1,2,1,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,2,1,1,3,3,3,2,2,1,2,2,3,1,1,2,0,0,2,2,1,3,0,0,2,1,1,2,1,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,3,3,3,3,1,2,2,2,1,2,1,3,3,1,1,2,1,2,1,2,2,0,2,0,0,1,1,0,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,3,2,1,3,2,2,3,2,0,3,2,0,3,0,1,0,1,1,0,0,1,1,1,1,0,1,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,2,3,3,3,2,2,2,3,3,1,2,1,2,1,0,1,0,1,1,0,1,0,0,2,1,1,1,0,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
3,1,1,2,1,2,3,3,2,2,1,2,2,3,0,2,1,0,0,2,2,3,2,1,2,2,2,2,2,3,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,1,1,0,1,1,2,2,1,1,3,0,0,1,3,1,1,1,0,0,0,1,0,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,3,3,3,2,0,0,0,2,1,0,1,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,1,0,0,2,3,2,2,2,1,2,2,2,1,2,1,0,0,1,1,1,0,2,0,1,1,1,0,0,1,1,
1,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,0,0,0,0,1,0,0,0,0,3,0,1,2,1,0,0,0,0,0,0,0,1,1,0,0,1,1,
1,0,1,0,1,2,0,0,1,1,2,1,0,1,1,1,1,0,1,1,1,1,0,1,0,0,1,0,0,1,1,0,
2,2,3,2,2,2,3,1,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,0,1,0,1,1,1,0,2,1,
1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,0,1,1,0,
3,3,3,2,2,2,2,3,2,2,1,1,2,2,2,2,1,1,3,1,2,1,2,0,0,1,1,0,1,0,2,1,
1,1,1,1,1,2,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,0,1,0,0,1,0,0,0,1,1,0,
2,0,0,1,0,3,2,2,2,2,1,2,1,2,1,2,0,0,0,2,1,2,2,1,1,2,2,0,1,1,0,2,
1,1,1,1,1,0,1,1,1,2,1,1,1,2,1,0,1,2,1,1,1,1,0,1,1,1,0,0,1,0,0,1,
1,3,2,2,2,1,1,1,2,3,0,0,0,0,2,0,2,2,1,0,0,0,0,0,0,1,0,0,0,0,1,1,
1,0,1,1,0,1,0,1,1,0,1,1,0,2,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,
2,3,2,3,2,1,2,2,2,2,1,0,0,0,2,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,2,1,
1,1,2,1,0,2,0,0,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,
3,0,0,1,0,2,2,2,3,2,2,2,2,2,2,2,0,0,0,2,1,2,1,1,1,2,2,0,0,0,1,2,
1,1,1,1,1,0,1,2,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,
2,3,2,3,3,2,0,1,1,1,0,0,1,0,2,0,1,1,3,1,0,0,0,0,0,0,0,1,0,0,2,1,
1,1,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,0,1,0,
2,3,3,3,3,1,2,2,2,2,0,1,1,0,2,1,1,1,2,1,0,1,1,0,0,1,0,1,0,0,2,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,2,0,0,1,1,2,2,1,0,0,2,0,1,1,3,0,0,1,0,0,0,0,0,1,0,1,2,1,
1,1,2,0,1,1,1,0,1,0,1,1,0,1,0,1,1,1,1,0,1,0,0,0,0,0,0,1,0,1,1,0,
1,3,2,3,2,1,0,0,2,2,2,0,1,0,2,0,1,1,1,0,1,0,0,0,3,0,1,1,0,0,2,1,
1,1,1,0,1,1,0,0,0,0,1,1,0,1,0,0,2,1,1,0,1,0,0,0,1,0,1,0,0,1,1,0,
3,1,2,1,1,2,2,2,2,2,2,1,2,2,1,1,0,0,0,2,2,2,0,0,0,1,2,1,0,1,0,1,
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,2,1,1,1,0,1,0,1,1,0,1,1,1,0,0,1,
3,0,0,0,0,2,0,1,1,1,1,1,1,1,0,1,0,0,0,1,1,1,0,1,0,1,1,0,0,1,0,1,
1,1,0,0,1,0,0,0,1,0,1,1,0,0,1,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,
1,3,3,2,2,0,0,0,2,2,0,0,0,1,2,0,1,1,2,0,0,0,0,0,0,0,0,1,0,0,2,1,
0,1,1,0,0,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,
2,3,2,3,2,0,0,0,0,1,1,0,0,0,2,0,2,0,2,0,0,0,0,0,1,0,0,1,0,0,1,1,
1,1,2,0,1,2,1,0,1,1,2,1,1,1,1,1,2,1,1,0,1,0,0,1,1,1,1,1,0,1,1,0,
1,3,2,2,2,1,0,0,2,2,1,0,1,2,2,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,1,
0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,0,2,3,1,2,2,2,2,2,2,1,1,0,0,0,1,0,1,0,2,1,1,1,0,0,0,0,1,
1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
2,0,2,0,0,1,0,3,2,1,2,1,2,2,0,1,0,0,0,2,1,0,0,2,1,1,1,1,0,2,0,2,
2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,0,1,1,1,1,0,0,0,1,1,1,1,0,1,0,0,1,
1,2,2,2,2,1,0,0,1,0,0,0,0,0,2,0,1,1,1,1,0,0,0,0,1,0,1,2,0,0,2,0,
1,0,1,1,1,2,1,0,1,0,1,1,0,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,1,1,0,
2,1,2,2,2,0,3,0,1,1,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,1,1,1,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,
1,2,2,3,2,2,0,0,1,1,2,0,1,2,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,
0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,
2,2,1,1,2,1,2,2,2,2,2,1,2,2,0,1,0,0,0,1,2,2,2,1,2,1,1,1,1,1,2,1,
1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,1,1,1,0,0,0,0,1,1,1,0,1,1,0,0,1,
1,2,2,2,2,0,1,0,2,2,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
0,0,1,0,0,1,0,0,0,0,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,2,0,0,0,2,2,2,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,2,0,0,0,0,1,0,0,1,1,2,0,0,0,0,1,0,1,0,0,1,0,0,2,0,0,0,1,
0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,1,1,2,0,2,1,1,1,1,0,2,2,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,
0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
1,0,2,1,2,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,
1,0,0,0,0,2,0,1,2,1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,
0,0,0,0,0,1,0,0,1,1,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,
2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,1,0,1,0,1,0,0,1,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,0,1,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0,0,0,
0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
)

Koi8rModel = {
  'charToOrderMap': KOI8R_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "KOI8-R"
}

Win1251CyrillicModel = {
  'charToOrderMap': win1251_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "windows-1251"
}

Latin5CyrillicModel = {
  'charToOrderMap': latin5_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "ISO-8859-5"
}

MacCyrillicModel = {
  'charToOrderMap': macCyrillic_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "MacCyrillic"
};

Ibm866Model = {
  'charToOrderMap': IBM866_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "IBM866"
}

Ibm855Model = {
  'charToOrderMap': IBM855_CharToOrderMap,
  'precedenceMatrix': RussianLangModel,
  'mTypicalPositiveRatio': 0.976601,
  'keepEnglishLetter': False,
  'charsetName': "IBM855"
}

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py000064400000006333151735047770024141 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetgroupprober import CharSetGroupProber
from .sbcharsetprober import SingleByteCharSetProber
from .langcyrillicmodel import (Win1251CyrillicModel, Koi8rModel,
                                Latin5CyrillicModel, MacCyrillicModel,
                                Ibm866Model, Ibm855Model)
from .langgreekmodel import Latin7GreekModel, Win1253GreekModel
from .langbulgarianmodel import Latin5BulgarianModel, Win1251BulgarianModel
from .langhungarianmodel import Latin2HungarianModel, Win1250HungarianModel
from .langthaimodel import TIS620ThaiModel
from .langhebrewmodel import Win1255HebrewModel
from .hebrewprober import HebrewProber


class SBCSGroupProber(CharSetGroupProber):
    def __init__(self):
        CharSetGroupProber.__init__(self)
        self._mProbers = [
            SingleByteCharSetProber(Win1251CyrillicModel),
            SingleByteCharSetProber(Koi8rModel),
            SingleByteCharSetProber(Latin5CyrillicModel),
            SingleByteCharSetProber(MacCyrillicModel),
            SingleByteCharSetProber(Ibm866Model),
            SingleByteCharSetProber(Ibm855Model),
            SingleByteCharSetProber(Latin7GreekModel),
            SingleByteCharSetProber(Win1253GreekModel),
            SingleByteCharSetProber(Latin5BulgarianModel),
            SingleByteCharSetProber(Win1251BulgarianModel),
            SingleByteCharSetProber(Latin2HungarianModel),
            SingleByteCharSetProber(Win1250HungarianModel),
            SingleByteCharSetProber(TIS620ThaiModel),
        ]
        hebrewProber = HebrewProber()
        logicalHebrewProber = SingleByteCharSetProber(Win1255HebrewModel,
                                                      False, hebrewProber)
        visualHebrewProber = SingleByteCharSetProber(Win1255HebrewModel, True,
                                                     hebrewProber)
        hebrewProber.set_model_probers(logicalHebrewProber, visualHebrewProber)
        self._mProbers.extend([hebrewProber, logicalHebrewProber,
                               visualHebrewProber])

        self.reset()
python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py000064400000045240151735047770022226 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .compat import wrap_ord

NUM_OF_CATEGORY = 6
DONT_KNOW = -1
ENOUGH_REL_THRESHOLD = 100
MAX_REL_THRESHOLD = 1000
MINIMUM_DATA_THRESHOLD = 4

# This is hiragana 2-char sequence table, the number in each cell represents its frequency category
jp2CharContext = (
(0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1),
(2,4,0,4,0,3,0,4,0,3,4,4,4,2,4,3,3,4,3,2,3,3,4,2,3,3,3,2,4,1,4,3,3,1,5,4,3,4,3,4,3,5,3,0,3,5,4,2,0,3,1,0,3,3,0,3,3,0,1,1,0,4,3,0,3,3,0,4,0,2,0,3,5,5,5,5,4,0,4,1,0,3,4),
(0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2),
(0,4,0,5,0,5,0,4,0,4,5,4,4,3,5,3,5,1,5,3,4,3,4,4,3,4,3,3,4,3,5,4,4,3,5,5,3,5,5,5,3,5,5,3,4,5,5,3,1,3,2,0,3,4,0,4,2,0,4,2,1,5,3,2,3,5,0,4,0,2,0,5,4,4,5,4,5,0,4,0,0,4,4),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,3,0,4,0,3,0,3,0,4,5,4,3,3,3,3,4,3,5,4,4,3,5,4,4,3,4,3,4,4,4,4,5,3,4,4,3,4,5,5,4,5,5,1,4,5,4,3,0,3,3,1,3,3,0,4,4,0,3,3,1,5,3,3,3,5,0,4,0,3,0,4,4,3,4,3,3,0,4,1,1,3,4),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,4,0,3,0,3,0,4,0,3,4,4,3,2,2,1,2,1,3,1,3,3,3,3,3,4,3,1,3,3,5,3,3,0,4,3,0,5,4,3,3,5,4,4,3,4,4,5,0,1,2,0,1,2,0,2,2,0,1,0,0,5,2,2,1,4,0,3,0,1,0,4,4,3,5,4,3,0,2,1,0,4,3),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,3,0,5,0,4,0,2,1,4,4,2,4,1,4,2,4,2,4,3,3,3,4,3,3,3,3,1,4,2,3,3,3,1,4,4,1,1,1,4,3,3,2,0,2,4,3,2,0,3,3,0,3,1,1,0,0,0,3,3,0,4,2,2,3,4,0,4,0,3,0,4,4,5,3,4,4,0,3,0,0,1,4),
(1,4,0,4,0,4,0,4,0,3,5,4,4,3,4,3,5,4,3,3,4,3,5,4,4,4,4,3,4,2,4,3,3,1,5,4,3,2,4,5,4,5,5,4,4,5,4,4,0,3,2,2,3,3,0,4,3,1,3,2,1,4,3,3,4,5,0,3,0,2,0,4,5,5,4,5,4,0,4,0,0,5,4),
(0,5,0,5,0,4,0,3,0,4,4,3,4,3,3,3,4,0,4,4,4,3,4,3,4,3,3,1,4,2,4,3,4,0,5,4,1,4,5,4,4,5,3,2,4,3,4,3,2,4,1,3,3,3,2,3,2,0,4,3,3,4,3,3,3,4,0,4,0,3,0,4,5,4,4,4,3,0,4,1,0,1,3),
(0,3,1,4,0,3,0,2,0,3,4,4,3,1,4,2,3,3,4,3,4,3,4,3,4,4,3,2,3,1,5,4,4,1,4,4,3,5,4,4,3,5,5,4,3,4,4,3,1,2,3,1,2,2,0,3,2,0,3,1,0,5,3,3,3,4,3,3,3,3,4,4,4,4,5,4,2,0,3,3,2,4,3),
(0,2,0,3,0,1,0,1,0,0,3,2,0,0,2,0,1,0,2,1,3,3,3,1,2,3,1,0,1,0,4,2,1,1,3,3,0,4,3,3,1,4,3,3,0,3,3,2,0,0,0,0,1,0,0,2,0,0,0,0,0,4,1,0,2,3,2,2,2,1,3,3,3,4,4,3,2,0,3,1,0,3,3),
(0,4,0,4,0,3,0,3,0,4,4,4,3,3,3,3,3,3,4,3,4,2,4,3,4,3,3,2,4,3,4,5,4,1,4,5,3,5,4,5,3,5,4,0,3,5,5,3,1,3,3,2,2,3,0,3,4,1,3,3,2,4,3,3,3,4,0,4,0,3,0,4,5,4,4,5,3,0,4,1,0,3,4),
(0,2,0,3,0,3,0,0,0,2,2,2,1,0,1,0,0,0,3,0,3,0,3,0,1,3,1,0,3,1,3,3,3,1,3,3,3,0,1,3,1,3,4,0,0,3,1,1,0,3,2,0,0,0,0,1,3,0,1,0,0,3,3,2,0,3,0,0,0,0,0,3,4,3,4,3,3,0,3,0,0,2,3),
(2,3,0,3,0,2,0,1,0,3,3,4,3,1,3,1,1,1,3,1,4,3,4,3,3,3,0,0,3,1,5,4,3,1,4,3,2,5,5,4,4,4,4,3,3,4,4,4,0,2,1,1,3,2,0,1,2,0,0,1,0,4,1,3,3,3,0,3,0,1,0,4,4,4,5,5,3,0,2,0,0,4,4),
(0,2,0,1,0,3,1,3,0,2,3,3,3,0,3,1,0,0,3,0,3,2,3,1,3,2,1,1,0,0,4,2,1,0,2,3,1,4,3,2,0,4,4,3,1,3,1,3,0,1,0,0,1,0,0,0,1,0,0,0,0,4,1,1,1,2,0,3,0,0,0,3,4,2,4,3,2,0,1,0,0,3,3),
(0,1,0,4,0,5,0,4,0,2,4,4,2,3,3,2,3,3,5,3,3,3,4,3,4,2,3,0,4,3,3,3,4,1,4,3,2,1,5,5,3,4,5,1,3,5,4,2,0,3,3,0,1,3,0,4,2,0,1,3,1,4,3,3,3,3,0,3,0,1,0,3,4,4,4,5,5,0,3,0,1,4,5),
(0,2,0,3,0,3,0,0,0,2,3,1,3,0,4,0,1,1,3,0,3,4,3,2,3,1,0,3,3,2,3,1,3,0,2,3,0,2,1,4,1,2,2,0,0,3,3,0,0,2,0,0,0,1,0,0,0,0,2,2,0,3,2,1,3,3,0,2,0,2,0,0,3,3,1,2,4,0,3,0,2,2,3),
(2,4,0,5,0,4,0,4,0,2,4,4,4,3,4,3,3,3,1,2,4,3,4,3,4,4,5,0,3,3,3,3,2,0,4,3,1,4,3,4,1,4,4,3,3,4,4,3,1,2,3,0,4,2,0,4,1,0,3,3,0,4,3,3,3,4,0,4,0,2,0,3,5,3,4,5,2,0,3,0,0,4,5),
(0,3,0,4,0,1,0,1,0,1,3,2,2,1,3,0,3,0,2,0,2,0,3,0,2,0,0,0,1,0,1,1,0,0,3,1,0,0,0,4,0,3,1,0,2,1,3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,4,2,2,3,1,0,3,0,0,0,1,4,4,4,3,0,0,4,0,0,1,4),
(1,4,1,5,0,3,0,3,0,4,5,4,4,3,5,3,3,4,4,3,4,1,3,3,3,3,2,1,4,1,5,4,3,1,4,4,3,5,4,4,3,5,4,3,3,4,4,4,0,3,3,1,2,3,0,3,1,0,3,3,0,5,4,4,4,4,4,4,3,3,5,4,4,3,3,5,4,0,3,2,0,4,4),
(0,2,0,3,0,1,0,0,0,1,3,3,3,2,4,1,3,0,3,1,3,0,2,2,1,1,0,0,2,0,4,3,1,0,4,3,0,4,4,4,1,4,3,1,1,3,3,1,0,2,0,0,1,3,0,0,0,0,2,0,0,4,3,2,4,3,5,4,3,3,3,4,3,3,4,3,3,0,2,1,0,3,3),
(0,2,0,4,0,3,0,2,0,2,5,5,3,4,4,4,4,1,4,3,3,0,4,3,4,3,1,3,3,2,4,3,0,3,4,3,0,3,4,4,2,4,4,0,4,5,3,3,2,2,1,1,1,2,0,1,5,0,3,3,2,4,3,3,3,4,0,3,0,2,0,4,4,3,5,5,0,0,3,0,2,3,3),
(0,3,0,4,0,3,0,1,0,3,4,3,3,1,3,3,3,0,3,1,3,0,4,3,3,1,1,0,3,0,3,3,0,0,4,4,0,1,5,4,3,3,5,0,3,3,4,3,0,2,0,1,1,1,0,1,3,0,1,2,1,3,3,2,3,3,0,3,0,1,0,1,3,3,4,4,1,0,1,2,2,1,3),
(0,1,0,4,0,4,0,3,0,1,3,3,3,2,3,1,1,0,3,0,3,3,4,3,2,4,2,0,1,0,4,3,2,0,4,3,0,5,3,3,2,4,4,4,3,3,3,4,0,1,3,0,0,1,0,0,1,0,0,0,0,4,2,3,3,3,0,3,0,0,0,4,4,4,5,3,2,0,3,3,0,3,5),
(0,2,0,3,0,0,0,3,0,1,3,0,2,0,0,0,1,0,3,1,1,3,3,0,0,3,0,0,3,0,2,3,1,0,3,1,0,3,3,2,0,4,2,2,0,2,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,1,2,0,1,0,1,0,0,0,1,3,1,2,0,0,0,1,0,0,1,4),
(0,3,0,3,0,5,0,1,0,2,4,3,1,3,3,2,1,1,5,2,1,0,5,1,2,0,0,0,3,3,2,2,3,2,4,3,0,0,3,3,1,3,3,0,2,5,3,4,0,3,3,0,1,2,0,2,2,0,3,2,0,2,2,3,3,3,0,2,0,1,0,3,4,4,2,5,4,0,3,0,0,3,5),
(0,3,0,3,0,3,0,1,0,3,3,3,3,0,3,0,2,0,2,1,1,0,2,0,1,0,0,0,2,1,0,0,1,0,3,2,0,0,3,3,1,2,3,1,0,3,3,0,0,1,0,0,0,0,0,2,0,0,0,0,0,2,3,1,2,3,0,3,0,1,0,3,2,1,0,4,3,0,1,1,0,3,3),
(0,4,0,5,0,3,0,3,0,4,5,5,4,3,5,3,4,3,5,3,3,2,5,3,4,4,4,3,4,3,4,5,5,3,4,4,3,4,4,5,4,4,4,3,4,5,5,4,2,3,4,2,3,4,0,3,3,1,4,3,2,4,3,3,5,5,0,3,0,3,0,5,5,5,5,4,4,0,4,0,1,4,4),
(0,4,0,4,0,3,0,3,0,3,5,4,4,2,3,2,5,1,3,2,5,1,4,2,3,2,3,3,4,3,3,3,3,2,5,4,1,3,3,5,3,4,4,0,4,4,3,1,1,3,1,0,2,3,0,2,3,0,3,0,0,4,3,1,3,4,0,3,0,2,0,4,4,4,3,4,5,0,4,0,0,3,4),
(0,3,0,3,0,3,1,2,0,3,4,4,3,3,3,0,2,2,4,3,3,1,3,3,3,1,1,0,3,1,4,3,2,3,4,4,2,4,4,4,3,4,4,3,2,4,4,3,1,3,3,1,3,3,0,4,1,0,2,2,1,4,3,2,3,3,5,4,3,3,5,4,4,3,3,0,4,0,3,2,2,4,4),
(0,2,0,1,0,0,0,0,0,1,2,1,3,0,0,0,0,0,2,0,1,2,1,0,0,1,0,0,0,0,3,0,0,1,0,1,1,3,1,0,0,0,1,1,0,1,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,1,2,2,0,3,4,0,0,0,1,1,0,0,1,0,0,0,0,0,1,1),
(0,1,0,0,0,1,0,0,0,0,4,0,4,1,4,0,3,0,4,0,3,0,4,0,3,0,3,0,4,1,5,1,4,0,0,3,0,5,0,5,2,0,1,0,0,0,2,1,4,0,1,3,0,0,3,0,0,3,1,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0),
(1,4,0,5,0,3,0,2,0,3,5,4,4,3,4,3,5,3,4,3,3,0,4,3,3,3,3,3,3,2,4,4,3,1,3,4,4,5,4,4,3,4,4,1,3,5,4,3,3,3,1,2,2,3,3,1,3,1,3,3,3,5,3,3,4,5,0,3,0,3,0,3,4,3,4,4,3,0,3,0,2,4,3),
(0,1,0,4,0,0,0,0,0,1,4,0,4,1,4,2,4,0,3,0,1,0,1,0,0,0,0,0,2,0,3,1,1,1,0,3,0,0,0,1,2,1,0,0,1,1,1,1,0,1,0,0,0,1,0,0,3,0,0,0,0,3,2,0,2,2,0,1,0,0,0,2,3,2,3,3,0,0,0,0,2,1,0),
(0,5,1,5,0,3,0,3,0,5,4,4,5,1,5,3,3,0,4,3,4,3,5,3,4,3,3,2,4,3,4,3,3,0,3,3,1,4,4,3,4,4,4,3,4,5,5,3,2,3,1,1,3,3,1,3,1,1,3,3,2,4,5,3,3,5,0,4,0,3,0,4,4,3,5,3,3,0,3,4,0,4,3),
(0,5,0,5,0,3,0,2,0,4,4,3,5,2,4,3,3,3,4,4,4,3,5,3,5,3,3,1,4,0,4,3,3,0,3,3,0,4,4,4,4,5,4,3,3,5,5,3,2,3,1,2,3,2,0,1,0,0,3,2,2,4,4,3,1,5,0,4,0,3,0,4,3,1,3,2,1,0,3,3,0,3,3),
(0,4,0,5,0,5,0,4,0,4,5,5,5,3,4,3,3,2,5,4,4,3,5,3,5,3,4,0,4,3,4,4,3,2,4,4,3,4,5,4,4,5,5,0,3,5,5,4,1,3,3,2,3,3,1,3,1,0,4,3,1,4,4,3,4,5,0,4,0,2,0,4,3,4,4,3,3,0,4,0,0,5,5),
(0,4,0,4,0,5,0,1,1,3,3,4,4,3,4,1,3,0,5,1,3,0,3,1,3,1,1,0,3,0,3,3,4,0,4,3,0,4,4,4,3,4,4,0,3,5,4,1,0,3,0,0,2,3,0,3,1,0,3,1,0,3,2,1,3,5,0,3,0,1,0,3,2,3,3,4,4,0,2,2,0,4,4),
(2,4,0,5,0,4,0,3,0,4,5,5,4,3,5,3,5,3,5,3,5,2,5,3,4,3,3,4,3,4,5,3,2,1,5,4,3,2,3,4,5,3,4,1,2,5,4,3,0,3,3,0,3,2,0,2,3,0,4,1,0,3,4,3,3,5,0,3,0,1,0,4,5,5,5,4,3,0,4,2,0,3,5),
(0,5,0,4,0,4,0,2,0,5,4,3,4,3,4,3,3,3,4,3,4,2,5,3,5,3,4,1,4,3,4,4,4,0,3,5,0,4,4,4,4,5,3,1,3,4,5,3,3,3,3,3,3,3,0,2,2,0,3,3,2,4,3,3,3,5,3,4,1,3,3,5,3,2,0,0,0,0,4,3,1,3,3),
(0,1,0,3,0,3,0,1,0,1,3,3,3,2,3,3,3,0,3,0,0,0,3,1,3,0,0,0,2,2,2,3,0,0,3,2,0,1,2,4,1,3,3,0,0,3,3,3,0,1,0,0,2,1,0,0,3,0,3,1,0,3,0,0,1,3,0,2,0,1,0,3,3,1,3,3,0,0,1,1,0,3,3),
(0,2,0,3,0,2,1,4,0,2,2,3,1,1,3,1,1,0,2,0,3,1,2,3,1,3,0,0,1,0,4,3,2,3,3,3,1,4,2,3,3,3,3,1,0,3,1,4,0,1,1,0,1,2,0,1,1,0,1,1,0,3,1,3,2,2,0,1,0,0,0,2,3,3,3,1,0,0,0,0,0,2,3),
(0,5,0,4,0,5,0,2,0,4,5,5,3,3,4,3,3,1,5,4,4,2,4,4,4,3,4,2,4,3,5,5,4,3,3,4,3,3,5,5,4,5,5,1,3,4,5,3,1,4,3,1,3,3,0,3,3,1,4,3,1,4,5,3,3,5,0,4,0,3,0,5,3,3,1,4,3,0,4,0,1,5,3),
(0,5,0,5,0,4,0,2,0,4,4,3,4,3,3,3,3,3,5,4,4,4,4,4,4,5,3,3,5,2,4,4,4,3,4,4,3,3,4,4,5,5,3,3,4,3,4,3,3,4,3,3,3,3,1,2,2,1,4,3,3,5,4,4,3,4,0,4,0,3,0,4,4,4,4,4,1,0,4,2,0,2,4),
(0,4,0,4,0,3,0,1,0,3,5,2,3,0,3,0,2,1,4,2,3,3,4,1,4,3,3,2,4,1,3,3,3,0,3,3,0,0,3,3,3,5,3,3,3,3,3,2,0,2,0,0,2,0,0,2,0,0,1,0,0,3,1,2,2,3,0,3,0,2,0,4,4,3,3,4,1,0,3,0,0,2,4),
(0,0,0,4,0,0,0,0,0,0,1,0,1,0,2,0,0,0,0,0,1,0,2,0,1,0,0,0,0,0,3,1,3,0,3,2,0,0,0,1,0,3,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,0,2,0,0,0,0,0,0,2),
(0,2,1,3,0,2,0,2,0,3,3,3,3,1,3,1,3,3,3,3,3,3,4,2,2,1,2,1,4,0,4,3,1,3,3,3,2,4,3,5,4,3,3,3,3,3,3,3,0,1,3,0,2,0,0,1,0,0,1,0,0,4,2,0,2,3,0,3,3,0,3,3,4,2,3,1,4,0,1,2,0,2,3),
(0,3,0,3,0,1,0,3,0,2,3,3,3,0,3,1,2,0,3,3,2,3,3,2,3,2,3,1,3,0,4,3,2,0,3,3,1,4,3,3,2,3,4,3,1,3,3,1,1,0,1,1,0,1,0,1,0,1,0,0,0,4,1,1,0,3,0,3,1,0,2,3,3,3,3,3,1,0,0,2,0,3,3),
(0,0,0,0,0,0,0,0,0,0,3,0,2,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,3,0,3,0,3,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,2,0,2,3,0,0,0,0,0,0,0,0,3),
(0,2,0,3,1,3,0,3,0,2,3,3,3,1,3,1,3,1,3,1,3,3,3,1,3,0,2,3,1,1,4,3,3,2,3,3,1,2,2,4,1,3,3,0,1,4,2,3,0,1,3,0,3,0,0,1,3,0,2,0,0,3,3,2,1,3,0,3,0,2,0,3,4,4,4,3,1,0,3,0,0,3,3),
(0,2,0,1,0,2,0,0,0,1,3,2,2,1,3,0,1,1,3,0,3,2,3,1,2,0,2,0,1,1,3,3,3,0,3,3,1,1,2,3,2,3,3,1,2,3,2,0,0,1,0,0,0,0,0,0,3,0,1,0,0,2,1,2,1,3,0,3,0,0,0,3,4,4,4,3,2,0,2,0,0,2,4),
(0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,2,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,3,1,0,0,0,0,0,0,0,3),
(0,3,0,3,0,2,0,3,0,3,3,3,2,3,2,2,2,0,3,1,3,3,3,2,3,3,0,0,3,0,3,2,2,0,2,3,1,4,3,4,3,3,2,3,1,5,4,4,0,3,1,2,1,3,0,3,1,1,2,0,2,3,1,3,1,3,0,3,0,1,0,3,3,4,4,2,1,0,2,1,0,2,4),
(0,1,0,3,0,1,0,2,0,1,4,2,5,1,4,0,2,0,2,1,3,1,4,0,2,1,0,0,2,1,4,1,1,0,3,3,0,5,1,3,2,3,3,1,0,3,2,3,0,1,0,0,0,0,0,0,1,0,0,0,0,4,0,1,0,3,0,2,0,1,0,3,3,3,4,3,3,0,0,0,0,2,3),
(0,0,0,1,0,0,0,0,0,0,2,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,1,0,0,0,0,0,3),
(0,1,0,3,0,4,0,3,0,2,4,3,1,0,3,2,2,1,3,1,2,2,3,1,1,1,2,1,3,0,1,2,0,1,3,2,1,3,0,5,5,1,0,0,1,3,2,1,0,3,0,0,1,0,0,0,0,0,3,4,0,1,1,1,3,2,0,2,0,1,0,2,3,3,1,2,3,0,1,0,1,0,4),
(0,0,0,1,0,3,0,3,0,2,2,1,0,0,4,0,3,0,3,1,3,0,3,0,3,0,1,0,3,0,3,1,3,0,3,3,0,0,1,2,1,1,1,0,1,2,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,2,2,1,2,0,0,2,0,0,0,0,2,3,3,3,3,0,0,0,0,1,4),
(0,0,0,3,0,3,0,0,0,0,3,1,1,0,3,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,3,0,2,0,2,3,0,0,2,2,3,1,2,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,2,0,0,0,0,2,3),
(2,4,0,5,0,5,0,4,0,3,4,3,3,3,4,3,3,3,4,3,4,4,5,4,5,5,5,2,3,0,5,5,4,1,5,4,3,1,5,4,3,4,4,3,3,4,3,3,0,3,2,0,2,3,0,3,0,0,3,3,0,5,3,2,3,3,0,3,0,3,0,3,4,5,4,5,3,0,4,3,0,3,4),
(0,3,0,3,0,3,0,3,0,3,3,4,3,2,3,2,3,0,4,3,3,3,3,3,3,3,3,0,3,2,4,3,3,1,3,4,3,4,4,4,3,4,4,3,2,4,4,1,0,2,0,0,1,1,0,2,0,0,3,1,0,5,3,2,1,3,0,3,0,1,2,4,3,2,4,3,3,0,3,2,0,4,4),
(0,3,0,3,0,1,0,0,0,1,4,3,3,2,3,1,3,1,4,2,3,2,4,2,3,4,3,0,2,2,3,3,3,0,3,3,3,0,3,4,1,3,3,0,3,4,3,3,0,1,1,0,1,0,0,0,4,0,3,0,0,3,1,2,1,3,0,4,0,1,0,4,3,3,4,3,3,0,2,0,0,3,3),
(0,3,0,4,0,1,0,3,0,3,4,3,3,0,3,3,3,1,3,1,3,3,4,3,3,3,0,0,3,1,5,3,3,1,3,3,2,5,4,3,3,4,5,3,2,5,3,4,0,1,0,0,0,0,0,2,0,0,1,1,0,4,2,2,1,3,0,3,0,2,0,4,4,3,5,3,2,0,1,1,0,3,4),
(0,5,0,4,0,5,0,2,0,4,4,3,3,2,3,3,3,1,4,3,4,1,5,3,4,3,4,0,4,2,4,3,4,1,5,4,0,4,4,4,4,5,4,1,3,5,4,2,1,4,1,1,3,2,0,3,1,0,3,2,1,4,3,3,3,4,0,4,0,3,0,4,4,4,3,3,3,0,4,2,0,3,4),
(1,4,0,4,0,3,0,1,0,3,3,3,1,1,3,3,2,2,3,3,1,0,3,2,2,1,2,0,3,1,2,1,2,0,3,2,0,2,2,3,3,4,3,0,3,3,1,2,0,1,1,3,1,2,0,0,3,0,1,1,0,3,2,2,3,3,0,3,0,0,0,2,3,3,4,3,3,0,1,0,0,1,4),
(0,4,0,4,0,4,0,0,0,3,4,4,3,1,4,2,3,2,3,3,3,1,4,3,4,0,3,0,4,2,3,3,2,2,5,4,2,1,3,4,3,4,3,1,3,3,4,2,0,2,1,0,3,3,0,0,2,0,3,1,0,4,4,3,4,3,0,4,0,1,0,2,4,4,4,4,4,0,3,2,0,3,3),
(0,0,0,1,0,4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,3,2,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,2),
(0,2,0,3,0,4,0,4,0,1,3,3,3,0,4,0,2,1,2,1,1,1,2,0,3,1,1,0,1,0,3,1,0,0,3,3,2,0,1,1,0,0,0,0,0,1,0,2,0,2,2,0,3,1,0,0,1,0,1,1,0,1,2,0,3,0,0,0,0,1,0,0,3,3,4,3,1,0,1,0,3,0,2),
(0,0,0,3,0,5,0,0,0,0,1,0,2,0,3,1,0,1,3,0,0,0,2,0,0,0,1,0,0,0,1,1,0,0,4,0,0,0,2,3,0,1,4,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,3,0,0,0,0,0,3),
(0,2,0,5,0,5,0,1,0,2,4,3,3,2,5,1,3,2,3,3,3,0,4,1,2,0,3,0,4,0,2,2,1,1,5,3,0,0,1,4,2,3,2,0,3,3,3,2,0,2,4,1,1,2,0,1,1,0,3,1,0,1,3,1,2,3,0,2,0,0,0,1,3,5,4,4,4,0,3,0,0,1,3),
(0,4,0,5,0,4,0,4,0,4,5,4,3,3,4,3,3,3,4,3,4,4,5,3,4,5,4,2,4,2,3,4,3,1,4,4,1,3,5,4,4,5,5,4,4,5,5,5,2,3,3,1,4,3,1,3,3,0,3,3,1,4,3,4,4,4,0,3,0,4,0,3,3,4,4,5,0,0,4,3,0,4,5),
(0,4,0,4,0,3,0,3,0,3,4,4,4,3,3,2,4,3,4,3,4,3,5,3,4,3,2,1,4,2,4,4,3,1,3,4,2,4,5,5,3,4,5,4,1,5,4,3,0,3,2,2,3,2,1,3,1,0,3,3,3,5,3,3,3,5,4,4,2,3,3,4,3,3,3,2,1,0,3,2,1,4,3),
(0,4,0,5,0,4,0,3,0,3,5,5,3,2,4,3,4,0,5,4,4,1,4,4,4,3,3,3,4,3,5,5,2,3,3,4,1,2,5,5,3,5,5,2,3,5,5,4,0,3,2,0,3,3,1,1,5,1,4,1,0,4,3,2,3,5,0,4,0,3,0,5,4,3,4,3,0,0,4,1,0,4,4),
(1,3,0,4,0,2,0,2,0,2,5,5,3,3,3,3,3,0,4,2,3,4,4,4,3,4,0,0,3,4,5,4,3,3,3,3,2,5,5,4,5,5,5,4,3,5,5,5,1,3,1,0,1,0,0,3,2,0,4,2,0,5,2,3,2,4,1,3,0,3,0,4,5,4,5,4,3,0,4,2,0,5,4),
(0,3,0,4,0,5,0,3,0,3,4,4,3,2,3,2,3,3,3,3,3,2,4,3,3,2,2,0,3,3,3,3,3,1,3,3,3,0,4,4,3,4,4,1,1,4,4,2,0,3,1,0,1,1,0,4,1,0,2,3,1,3,3,1,3,4,0,3,0,1,0,3,1,3,0,0,1,0,2,0,0,4,4),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,3,0,3,0,2,0,3,0,1,5,4,3,3,3,1,4,2,1,2,3,4,4,2,4,4,5,0,3,1,4,3,4,0,4,3,3,3,2,3,2,5,3,4,3,2,2,3,0,0,3,0,2,1,0,1,2,0,0,0,0,2,1,1,3,1,0,2,0,4,0,3,4,4,4,5,2,0,2,0,0,1,3),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,0,0,1,1,0,0,0,4,2,1,1,0,1,0,3,2,0,0,3,1,1,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,1,0,0,0,2,0,0,0,1,4,0,4,2,1,0,0,0,0,0,1),
(0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,3,1,0,0,0,2,0,2,1,0,0,1,2,1,0,1,1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,1,3,1,0,0,0,0,0,1,0,0,2,1,0,0,0,0,0,0,0,0,2),
(0,4,0,4,0,4,0,3,0,4,4,3,4,2,4,3,2,0,4,4,4,3,5,3,5,3,3,2,4,2,4,3,4,3,1,4,0,2,3,4,4,4,3,3,3,4,4,4,3,4,1,3,4,3,2,1,2,1,3,3,3,4,4,3,3,5,0,4,0,3,0,4,3,3,3,2,1,0,3,0,0,3,3),
(0,4,0,3,0,3,0,3,0,3,5,5,3,3,3,3,4,3,4,3,3,3,4,4,4,3,3,3,3,4,3,5,3,3,1,3,2,4,5,5,5,5,4,3,4,5,5,3,2,2,3,3,3,3,2,3,3,1,2,3,2,4,3,3,3,4,0,4,0,2,0,4,3,2,2,1,2,0,3,0,0,4,1),
)

class JapaneseContextAnalysis:
    def __init__(self):
        self.reset()

    def reset(self):
        self._mTotalRel = 0  # total sequence received
        # category counters, each interger counts sequence in its category
        self._mRelSample = [0] * NUM_OF_CATEGORY
        # if last byte in current buffer is not the last byte of a character,
        # we need to know how many bytes to skip in next buffer
        self._mNeedToSkipCharNum = 0
        self._mLastCharOrder = -1  # The order of previous char
        # If this flag is set to True, detection is done and conclusion has
        # been made
        self._mDone = False

    def feed(self, aBuf, aLen):
        if self._mDone:
            return

        # The buffer we got is byte oriented, and a character may span in more than one
        # buffers. In case the last one or two byte in last buffer is not
        # complete, we record how many byte needed to complete that character
        # and skip these bytes here.  We can choose to record those bytes as
        # well and analyse the character once it is complete, but since a
        # character will not make much difference, by simply skipping
        # this character will simply our logic and improve performance.
        i = self._mNeedToSkipCharNum
        while i < aLen:
            order, charLen = self.get_order(aBuf[i:i + 2])
            i += charLen
            if i > aLen:
                self._mNeedToSkipCharNum = i - aLen
                self._mLastCharOrder = -1
            else:
                if (order != -1) and (self._mLastCharOrder != -1):
                    self._mTotalRel += 1
                    if self._mTotalRel > MAX_REL_THRESHOLD:
                        self._mDone = True
                        break
                    self._mRelSample[jp2CharContext[self._mLastCharOrder][order]] += 1
                self._mLastCharOrder = order

    def got_enough_data(self):
        return self._mTotalRel > ENOUGH_REL_THRESHOLD

    def get_confidence(self):
        # This is just one way to calculate confidence. It works well for me.
        if self._mTotalRel > MINIMUM_DATA_THRESHOLD:
            return (self._mTotalRel - self._mRelSample[0]) / self._mTotalRel
        else:
            return DONT_KNOW

    def get_order(self, aBuf):
        return -1, 1

class SJISContextAnalysis(JapaneseContextAnalysis):
    def get_order(self, aBuf):
        if not aBuf:
            return -1, 1
        # find out current char's byte length
        first_char = wrap_ord(aBuf[0])
        if ((0x81 <= first_char <= 0x9F) or (0xE0 <= first_char <= 0xFC)):
            charLen = 2
        else:
            charLen = 1

        # return its order if it is hiragana
        if len(aBuf) > 1:
            second_char = wrap_ord(aBuf[1])
            if (first_char == 202) and (0x9F <= second_char <= 0xF1):
                return second_char - 0x9F, charLen

        return -1, charLen

class EUCJPContextAnalysis(JapaneseContextAnalysis):
    def get_order(self, aBuf):
        if not aBuf:
            return -1, 1
        # find out current char's byte length
        first_char = wrap_ord(aBuf[0])
        if (first_char == 0x8E) or (0xA1 <= first_char <= 0xFE):
            charLen = 2
        elif first_char == 0x8F:
            charLen = 3
        else:
            charLen = 1

        # return its order if it is hiragana
        if len(aBuf) > 1:
            second_char = wrap_ord(aBuf[1])
            if (first_char == 0xA4) and (0xA1 <= second_char <= 0xF3):
                return second_char - 0xA1, charLen

        return -1, charLen

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/__init__.py000064400000002417151735047770022456 0ustar00######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

__version__ = "2.2.1"
from sys import version_info


def detect(aBuf):
    if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or
            (version_info >= (3, 0) and not isinstance(aBuf, bytes))):
        raise ValueError('Expected a bytes object, not a unicode object')

    from . import universaldetector
    u = universaldetector.UniversalDetector()
    u.reset()
    u.feed(aBuf)
    u.close()
    return u.result
python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py000064400000131632151735047770022710 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Sampling from about 20M text materials include literature and computer technology

# 128  --> 0.79
# 256  --> 0.92
# 512  --> 0.986
# 1024 --> 0.99944
# 2048 --> 0.99999
#
# Idea Distribution Ratio = 0.98653 / (1-0.98653) = 73.24
# Random Distribution Ration = 512 / (2350-512) = 0.279.
# 
# Typical Distribution Ratio  

EUCKR_TYPICAL_DISTRIBUTION_RATIO = 6.0

EUCKR_TABLE_SIZE = 2352

# Char to FreqOrder table , 
EUCKRCharToFreqOrder = ( \
  13, 130, 120,1396, 481,1719,1720, 328, 609, 212,1721, 707, 400, 299,1722,  87,
1397,1723, 104, 536,1117,1203,1724,1267, 685,1268, 508,1725,1726,1727,1728,1398,
1399,1729,1730,1731, 141, 621, 326,1057, 368,1732, 267, 488,  20,1733,1269,1734,
 945,1400,1735,  47, 904,1270,1736,1737, 773, 248,1738, 409, 313, 786, 429,1739,
 116, 987, 813,1401, 683,  75,1204, 145,1740,1741,1742,1743,  16, 847, 667, 622,
 708,1744,1745,1746, 966, 787, 304, 129,1747,  60, 820, 123, 676,1748,1749,1750,
1751, 617,1752, 626,1753,1754,1755,1756, 653,1757,1758,1759,1760,1761,1762, 856,
 344,1763,1764,1765,1766,  89, 401, 418, 806, 905, 848,1767,1768,1769, 946,1205,
 709,1770,1118,1771, 241,1772,1773,1774,1271,1775, 569,1776, 999,1777,1778,1779,
1780, 337, 751,1058,  28, 628, 254,1781, 177, 906, 270, 349, 891,1079,1782,  19,
1783, 379,1784, 315,1785, 629, 754,1402, 559,1786, 636, 203,1206,1787, 710, 567,
1788, 935, 814,1789,1790,1207, 766, 528,1791,1792,1208,1793,1794,1795,1796,1797,
1403,1798,1799, 533,1059,1404,1405,1156,1406, 936, 884,1080,1800, 351,1801,1802,
1803,1804,1805, 801,1806,1807,1808,1119,1809,1157, 714, 474,1407,1810, 298, 899,
 885,1811,1120, 802,1158,1812, 892,1813,1814,1408, 659,1815,1816,1121,1817,1818,
1819,1820,1821,1822, 319,1823, 594, 545,1824, 815, 937,1209,1825,1826, 573,1409,
1022,1827,1210,1828,1829,1830,1831,1832,1833, 556, 722, 807,1122,1060,1834, 697,
1835, 900, 557, 715,1836,1410, 540,1411, 752,1159, 294, 597,1211, 976, 803, 770,
1412,1837,1838,  39, 794,1413, 358,1839, 371, 925,1840, 453, 661, 788, 531, 723,
 544,1023,1081, 869,  91,1841, 392, 430, 790, 602,1414, 677,1082, 457,1415,1416,
1842,1843, 475, 327,1024,1417, 795, 121,1844, 733, 403,1418,1845,1846,1847, 300,
 119, 711,1212, 627,1848,1272, 207,1849,1850, 796,1213, 382,1851, 519,1852,1083,
 893,1853,1854,1855, 367, 809, 487, 671,1856, 663,1857,1858, 956, 471, 306, 857,
1859,1860,1160,1084,1861,1862,1863,1864,1865,1061,1866,1867,1868,1869,1870,1871,
 282,  96, 574,1872, 502,1085,1873,1214,1874, 907,1875,1876, 827, 977,1419,1420,
1421, 268,1877,1422,1878,1879,1880, 308,1881,   2, 537,1882,1883,1215,1884,1885,
 127, 791,1886,1273,1423,1887,  34, 336, 404, 643,1888, 571, 654, 894, 840,1889,
   0, 886,1274, 122, 575, 260, 908, 938,1890,1275, 410, 316,1891,1892, 100,1893,
1894,1123,  48,1161,1124,1025,1895, 633, 901,1276,1896,1897, 115, 816,1898, 317,
1899, 694,1900, 909, 734,1424, 572, 866,1425, 691,  85, 524,1010, 543, 394, 841,
1901,1902,1903,1026,1904,1905,1906,1907,1908,1909,  30, 451, 651, 988, 310,1910,
1911,1426, 810,1216,  93,1912,1913,1277,1217,1914, 858, 759,  45,  58, 181, 610,
 269,1915,1916, 131,1062, 551, 443,1000, 821,1427, 957, 895,1086,1917,1918, 375,
1919, 359,1920, 687,1921, 822,1922, 293,1923,1924,  40, 662, 118, 692,  29, 939,
 887, 640, 482, 174,1925,  69,1162, 728,1428, 910,1926,1278,1218,1279, 386, 870,
 217, 854,1163, 823,1927,1928,1929,1930, 834,1931,  78,1932, 859,1933,1063,1934,
1935,1936,1937, 438,1164, 208, 595,1938,1939,1940,1941,1219,1125,1942, 280, 888,
1429,1430,1220,1431,1943,1944,1945,1946,1947,1280, 150, 510,1432,1948,1949,1950,
1951,1952,1953,1954,1011,1087,1955,1433,1043,1956, 881,1957, 614, 958,1064,1065,
1221,1958, 638,1001, 860, 967, 896,1434, 989, 492, 553,1281,1165,1959,1282,1002,
1283,1222,1960,1961,1962,1963,  36, 383, 228, 753, 247, 454,1964, 876, 678,1965,
1966,1284, 126, 464, 490, 835, 136, 672, 529, 940,1088,1435, 473,1967,1968, 467,
  50, 390, 227, 587, 279, 378, 598, 792, 968, 240, 151, 160, 849, 882,1126,1285,
 639,1044, 133, 140, 288, 360, 811, 563,1027, 561, 142, 523,1969,1970,1971,   7,
 103, 296, 439, 407, 506, 634, 990,1972,1973,1974,1975, 645,1976,1977,1978,1979,
1980,1981, 236,1982,1436,1983,1984,1089, 192, 828, 618, 518,1166, 333,1127,1985,
 818,1223,1986,1987,1988,1989,1990,1991,1992,1993, 342,1128,1286, 746, 842,1994,
1995, 560, 223,1287,  98,   8, 189, 650, 978,1288,1996,1437,1997,  17, 345, 250,
 423, 277, 234, 512, 226,  97, 289,  42, 167,1998, 201,1999,2000, 843, 836, 824,
 532, 338, 783,1090, 182, 576, 436,1438,1439, 527, 500,2001, 947, 889,2002,2003,
2004,2005, 262, 600, 314, 447,2006, 547,2007, 693, 738,1129,2008,  71,1440, 745,
 619, 688,2009, 829,2010,2011, 147,2012,  33, 948,2013,2014,  74, 224,2015,  61,
 191, 918, 399, 637,2016,1028,1130, 257, 902,2017,2018,2019,2020,2021,2022,2023,
2024,2025,2026, 837,2027,2028,2029,2030, 179, 874, 591,  52, 724, 246,2031,2032,
2033,2034,1167, 969,2035,1289, 630, 605, 911,1091,1168,2036,2037,2038,1441, 912,
2039, 623,2040,2041, 253,1169,1290,2042,1442, 146, 620, 611, 577, 433,2043,1224,
 719,1170, 959, 440, 437, 534,  84, 388, 480,1131, 159, 220, 198, 679,2044,1012,
 819,1066,1443, 113,1225, 194, 318,1003,1029,2045,2046,2047,2048,1067,2049,2050,
2051,2052,2053,  59, 913, 112,2054, 632,2055, 455, 144, 739,1291,2056, 273, 681,
 499,2057, 448,2058,2059, 760,2060,2061, 970, 384, 169, 245,1132,2062,2063, 414,
1444,2064,2065,  41, 235,2066, 157, 252, 877, 568, 919, 789, 580,2067, 725,2068,
2069,1292,2070,2071,1445,2072,1446,2073,2074,  55, 588,  66,1447, 271,1092,2075,
1226,2076, 960,1013, 372,2077,2078,2079,2080,2081,1293,2082,2083,2084,2085, 850,
2086,2087,2088,2089,2090, 186,2091,1068, 180,2092,2093,2094, 109,1227, 522, 606,
2095, 867,1448,1093, 991,1171, 926, 353,1133,2096, 581,2097,2098,2099,1294,1449,
1450,2100, 596,1172,1014,1228,2101,1451,1295,1173,1229,2102,2103,1296,1134,1452,
 949,1135,2104,2105,1094,1453,1454,1455,2106,1095,2107,2108,2109,2110,2111,2112,
2113,2114,2115,2116,2117, 804,2118,2119,1230,1231, 805,1456, 405,1136,2120,2121,
2122,2123,2124, 720, 701,1297, 992,1457, 927,1004,2125,2126,2127,2128,2129,2130,
  22, 417,2131, 303,2132, 385,2133, 971, 520, 513,2134,1174,  73,1096, 231, 274,
 962,1458, 673,2135,1459,2136, 152,1137,2137,2138,2139,2140,1005,1138,1460,1139,
2141,2142,2143,2144,  11, 374, 844,2145, 154,1232,  46,1461,2146, 838, 830, 721,
1233, 106,2147,  90, 428, 462, 578, 566,1175, 352,2148,2149, 538,1234, 124,1298,
2150,1462, 761, 565,2151, 686,2152, 649,2153,  72, 173,2154, 460, 415,2155,1463,
2156,1235, 305,2157,2158,2159,2160,2161,2162, 579,2163,2164,2165,2166,2167, 747,
2168,2169,2170,2171,1464, 669,2172,2173,2174,2175,2176,1465,2177,  23, 530, 285,
2178, 335, 729,2179, 397,2180,2181,2182,1030,2183,2184, 698,2185,2186, 325,2187,
2188, 369,2189, 799,1097,1015, 348,2190,1069, 680,2191, 851,1466,2192,2193,  10,
2194, 613, 424,2195, 979, 108, 449, 589,  27, 172,  81,1031,  80, 774, 281, 350,
1032, 525, 301, 582,1176,2196, 674,1045,2197,2198,1467, 730, 762,2199,2200,2201,
2202,1468,2203, 993,2204,2205, 266,1070, 963,1140,2206,2207,2208, 664,1098, 972,
2209,2210,2211,1177,1469,1470, 871,2212,2213,2214,2215,2216,1471,2217,2218,2219,
2220,2221,2222,2223,2224,2225,2226,2227,1472,1236,2228,2229,2230,2231,2232,2233,
2234,2235,1299,2236,2237, 200,2238, 477, 373,2239,2240, 731, 825, 777,2241,2242,
2243, 521, 486, 548,2244,2245,2246,1473,1300,  53, 549, 137, 875,  76, 158,2247,
1301,1474, 469, 396,1016, 278, 712,2248, 321, 442, 503, 767, 744, 941,1237,1178,
1475,2249,  82, 178,1141,1179, 973,2250,1302,2251, 297,2252,2253, 570,2254,2255,
2256,  18, 450, 206,2257, 290, 292,1142,2258, 511, 162,  99, 346, 164, 735,2259,
1476,1477,   4, 554, 343, 798,1099,2260,1100,2261,  43, 171,1303, 139, 215,2262,
2263, 717, 775,2264,1033, 322, 216,2265, 831,2266, 149,2267,1304,2268,2269, 702,
1238, 135, 845, 347, 309,2270, 484,2271, 878, 655, 238,1006,1478,2272,  67,2273,
 295,2274,2275, 461,2276, 478, 942, 412,2277,1034,2278,2279,2280, 265,2281, 541,
2282,2283,2284,2285,2286,  70, 852,1071,2287,2288,2289,2290,  21,  56, 509, 117,
 432,2291,2292, 331, 980, 552,1101, 148, 284, 105, 393,1180,1239, 755,2293, 187,
2294,1046,1479,2295, 340,2296,  63,1047, 230,2297,2298,1305, 763,1306, 101, 800,
 808, 494,2299,2300,2301, 903,2302,  37,1072,  14,   5,2303,  79, 675,2304, 312,
2305,2306,2307,2308,2309,1480,   6,1307,2310,2311,2312,   1, 470,  35,  24, 229,
2313, 695, 210,  86, 778,  15, 784, 592, 779,  32,  77, 855, 964,2314, 259,2315,
 501, 380,2316,2317,  83, 981, 153, 689,1308,1481,1482,1483,2318,2319, 716,1484,
2320,2321,2322,2323,2324,2325,1485,2326,2327, 128,  57,  68, 261,1048, 211, 170,
1240,  31,2328,  51, 435, 742,2329,2330,2331, 635,2332, 264, 456,2333,2334,2335,
 425,2336,1486, 143, 507, 263, 943,2337, 363, 920,1487, 256,1488,1102, 243, 601,
1489,2338,2339,2340,2341,2342,2343,2344, 861,2345,2346,2347,2348,2349,2350, 395,
2351,1490,1491,  62, 535, 166, 225,2352,2353, 668, 419,1241, 138, 604, 928,2354,
1181,2355,1492,1493,2356,2357,2358,1143,2359, 696,2360, 387, 307,1309, 682, 476,
2361,2362, 332,  12, 222, 156,2363, 232,2364, 641, 276, 656, 517,1494,1495,1035,
 416, 736,1496,2365,1017, 586,2366,2367,2368,1497,2369, 242,2370,2371,2372,1498,
2373, 965, 713,2374,2375,2376,2377, 740, 982,1499, 944,1500,1007,2378,2379,1310,
1501,2380,2381,2382, 785, 329,2383,2384,1502,2385,2386,2387, 932,2388,1503,2389,
2390,2391,2392,1242,2393,2394,2395,2396,2397, 994, 950,2398,2399,2400,2401,1504,
1311,2402,2403,2404,2405,1049, 749,2406,2407, 853, 718,1144,1312,2408,1182,1505,
2409,2410, 255, 516, 479, 564, 550, 214,1506,1507,1313, 413, 239, 444, 339,1145,
1036,1508,1509,1314,1037,1510,1315,2411,1511,2412,2413,2414, 176, 703, 497, 624,
 593, 921, 302,2415, 341, 165,1103,1512,2416,1513,2417,2418,2419, 376,2420, 700,
2421,2422,2423, 258, 768,1316,2424,1183,2425, 995, 608,2426,2427,2428,2429, 221,
2430,2431,2432,2433,2434,2435,2436,2437, 195, 323, 726, 188, 897, 983,1317, 377,
 644,1050, 879,2438, 452,2439,2440,2441,2442,2443,2444, 914,2445,2446,2447,2448,
 915, 489,2449,1514,1184,2450,2451, 515,  64, 427, 495,2452, 583,2453, 483, 485,
1038, 562, 213,1515, 748, 666,2454,2455,2456,2457, 334,2458, 780, 996,1008, 705,
1243,2459,2460,2461,2462,2463, 114,2464, 493,1146, 366, 163,1516, 961,1104,2465,
 291,2466,1318,1105,2467,1517, 365,2468, 355, 951,1244,2469,1319,2470, 631,2471,
2472, 218,1320, 364, 320, 756,1518,1519,1321,1520,1322,2473,2474,2475,2476, 997,
2477,2478,2479,2480, 665,1185,2481, 916,1521,2482,2483,2484, 584, 684,2485,2486,
 797,2487,1051,1186,2488,2489,2490,1522,2491,2492, 370,2493,1039,1187,  65,2494,
 434, 205, 463,1188,2495, 125, 812, 391, 402, 826, 699, 286, 398, 155, 781, 771,
 585,2496, 590, 505,1073,2497, 599, 244, 219, 917,1018, 952, 646,1523,2498,1323,
2499,2500,  49, 984, 354, 741,2501, 625,2502,1324,2503,1019, 190, 357, 757, 491,
  95, 782, 868,2504,2505,2506,2507,2508,2509, 134,1524,1074, 422,1525, 898,2510,
 161,2511,2512,2513,2514, 769,2515,1526,2516,2517, 411,1325,2518, 472,1527,2519,
2520,2521,2522,2523,2524, 985,2525,2526,2527,2528,2529,2530, 764,2531,1245,2532,
2533,  25, 204, 311,2534, 496,2535,1052,2536,2537,2538,2539,2540,2541,2542, 199,
 704, 504, 468, 758, 657,1528, 196,  44, 839,1246, 272, 750,2543, 765, 862,2544,
2545,1326,2546, 132, 615, 933,2547, 732,2548,2549,2550,1189,1529,2551, 283,1247,
1053, 607, 929,2552,2553,2554, 930, 183, 872, 616,1040,1147,2555,1148,1020, 441,
 249,1075,2556,2557,2558, 466, 743,2559,2560,2561,  92, 514, 426, 420, 526,2562,
2563,2564,2565,2566,2567,2568, 185,2569,2570,2571,2572, 776,1530, 658,2573, 362,
2574, 361, 922,1076, 793,2575,2576,2577,2578,2579,2580,1531, 251,2581,2582,2583,
2584,1532,  54, 612, 237,1327,2585,2586, 275, 408, 647, 111,2587,1533,1106, 465,
   3, 458,   9,  38,2588, 107, 110, 890, 209,  26, 737, 498,2589,1534,2590, 431,
 202,  88,1535, 356, 287,1107, 660,1149,2591, 381,1536, 986,1150, 445,1248,1151,
 974,2592,2593, 846,2594, 446, 953, 184,1249,1250, 727,2595, 923, 193, 883,2596,
2597,2598, 102, 324, 539, 817,2599, 421,1041,2600, 832,2601,  94, 175, 197, 406,
2602, 459,2603,2604,2605,2606,2607, 330, 555,2608,2609,2610, 706,1108, 389,2611,
2612,2613,2614, 233,2615, 833, 558, 931, 954,1251,2616,2617,1537, 546,2618,2619,
1009,2620,2621,2622,1538, 690,1328,2623, 955,2624,1539,2625,2626, 772,2627,2628,
2629,2630,2631, 924, 648, 863, 603,2632,2633, 934,1540, 864, 865,2634, 642,1042,
 670,1190,2635,2636,2637,2638, 168,2639, 652, 873, 542,1054,1541,2640,2641,2642,  # 512, 256
#Everything below is of no interest for detection purpose
2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,
2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,
2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,
2691,2692,2693,2694,2695,2696,2697,2698,2699,1542, 880,2700,2701,2702,2703,2704,
2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,
2721,2722,2723,2724,2725,1543,2726,2727,2728,2729,2730,2731,2732,1544,2733,2734,
2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,
2751,2752,2753,2754,1545,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,
2766,1546,2767,1547,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,
2780,2781,2782,2783,2784,2785,2786,1548,2787,2788,2789,1109,2790,2791,2792,2793,
2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,
2810,2811,2812,1329,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,
2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,
2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,
1549,2857,2858,2859,2860,1550,2861,2862,1551,2863,2864,2865,2866,2867,2868,2869,
2870,2871,2872,2873,2874,1110,1330,2875,2876,2877,2878,2879,2880,2881,2882,2883,
2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,
2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,
2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,1331,
2931,2932,2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,1552,2944,2945,
2946,2947,2948,2949,2950,2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,
2962,2963,2964,1252,2965,2966,2967,2968,2969,2970,2971,2972,2973,2974,2975,2976,
2977,2978,2979,2980,2981,2982,2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,
2993,2994,2995,2996,2997,2998,2999,3000,3001,3002,3003,3004,3005,3006,3007,3008,
3009,3010,3011,3012,1553,3013,3014,3015,3016,3017,1554,3018,1332,3019,3020,3021,
3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,
3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,1555,3051,3052,
3053,1556,1557,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,
3067,1558,3068,3069,3070,3071,3072,3073,3074,3075,3076,1559,3077,3078,3079,3080,
3081,3082,3083,1253,3084,3085,3086,3087,3088,3089,3090,3091,3092,3093,3094,3095,
3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,1152,3109,3110,
3111,3112,3113,1560,3114,3115,3116,3117,1111,3118,3119,3120,3121,3122,3123,3124,
3125,3126,3127,3128,3129,3130,3131,3132,3133,3134,3135,3136,3137,3138,3139,3140,
3141,3142,3143,3144,3145,3146,3147,3148,3149,3150,3151,3152,3153,3154,3155,3156,
3157,3158,3159,3160,3161,3162,3163,3164,3165,3166,3167,3168,3169,3170,3171,3172,
3173,3174,3175,3176,1333,3177,3178,3179,3180,3181,3182,3183,3184,3185,3186,3187,
3188,3189,1561,3190,3191,1334,3192,3193,3194,3195,3196,3197,3198,3199,3200,3201,
3202,3203,3204,3205,3206,3207,3208,3209,3210,3211,3212,3213,3214,3215,3216,3217,
3218,3219,3220,3221,3222,3223,3224,3225,3226,3227,3228,3229,3230,3231,3232,3233,
3234,1562,3235,3236,3237,3238,3239,3240,3241,3242,3243,3244,3245,3246,3247,3248,
3249,3250,3251,3252,3253,3254,3255,3256,3257,3258,3259,3260,3261,3262,3263,3264,
3265,3266,3267,3268,3269,3270,3271,3272,3273,3274,3275,3276,3277,1563,3278,3279,
3280,3281,3282,3283,3284,3285,3286,3287,3288,3289,3290,3291,3292,3293,3294,3295,
3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,
3312,3313,3314,3315,3316,3317,3318,3319,3320,3321,3322,3323,3324,3325,3326,3327,
3328,3329,3330,3331,3332,3333,3334,3335,3336,3337,3338,3339,3340,3341,3342,3343,
3344,3345,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,
3360,3361,3362,3363,3364,1335,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,
3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3387,1336,3388,3389,
3390,3391,3392,3393,3394,3395,3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,
3406,3407,3408,3409,3410,3411,3412,3413,3414,1337,3415,3416,3417,3418,3419,1338,
3420,3421,3422,1564,1565,3423,3424,3425,3426,3427,3428,3429,3430,3431,1254,3432,
3433,3434,1339,3435,3436,3437,3438,3439,1566,3440,3441,3442,3443,3444,3445,3446,
3447,3448,3449,3450,3451,3452,3453,3454,1255,3455,3456,3457,3458,3459,1567,1191,
3460,1568,1569,3461,3462,3463,1570,3464,3465,3466,3467,3468,1571,3469,3470,3471,
3472,3473,1572,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,
1340,3487,3488,3489,3490,3491,3492,1021,3493,3494,3495,3496,3497,3498,1573,3499,
1341,3500,3501,3502,3503,3504,3505,3506,3507,3508,3509,3510,3511,1342,3512,3513,
3514,3515,3516,1574,1343,3517,3518,3519,1575,3520,1576,3521,3522,3523,3524,3525,
3526,3527,3528,3529,3530,3531,3532,3533,3534,3535,3536,3537,3538,3539,3540,3541,
3542,3543,3544,3545,3546,3547,3548,3549,3550,3551,3552,3553,3554,3555,3556,3557,
3558,3559,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3571,3572,3573,
3574,3575,3576,3577,3578,3579,3580,1577,3581,3582,1578,3583,3584,3585,3586,3587,
3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,
3604,1579,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,
3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,1580,3630,3631,1581,3632,
3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,3643,3644,3645,3646,3647,3648,
3649,3650,3651,3652,3653,3654,3655,3656,1582,3657,3658,3659,3660,3661,3662,3663,
3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,3676,3677,3678,3679,
3680,3681,3682,3683,3684,3685,3686,3687,3688,3689,3690,3691,3692,3693,3694,3695,
3696,3697,3698,3699,3700,1192,3701,3702,3703,3704,1256,3705,3706,3707,3708,1583,
1257,3709,3710,3711,3712,3713,3714,3715,3716,1584,3717,3718,3719,3720,3721,3722,
3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,
3739,3740,3741,3742,3743,3744,3745,1344,3746,3747,3748,3749,3750,3751,3752,3753,
3754,3755,3756,1585,3757,3758,3759,3760,3761,3762,3763,3764,3765,3766,1586,3767,
3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778,1345,3779,3780,3781,3782,
3783,3784,3785,3786,3787,3788,3789,3790,3791,3792,3793,3794,3795,1346,1587,3796,
3797,1588,3798,3799,3800,3801,3802,3803,3804,3805,3806,1347,3807,3808,3809,3810,
3811,1589,3812,3813,3814,3815,3816,3817,3818,3819,3820,3821,1590,3822,3823,1591,
1348,3824,3825,3826,3827,3828,3829,3830,1592,3831,3832,1593,3833,3834,3835,3836,
3837,3838,3839,3840,3841,3842,3843,3844,1349,3845,3846,3847,3848,3849,3850,3851,
3852,3853,3854,3855,3856,3857,3858,1594,3859,3860,3861,3862,3863,3864,3865,3866,
3867,3868,3869,1595,3870,3871,3872,3873,1596,3874,3875,3876,3877,3878,3879,3880,
3881,3882,3883,3884,3885,3886,1597,3887,3888,3889,3890,3891,3892,3893,3894,3895,
1598,3896,3897,3898,1599,1600,3899,1350,3900,1351,3901,3902,1352,3903,3904,3905,
3906,3907,3908,3909,3910,3911,3912,3913,3914,3915,3916,3917,3918,3919,3920,3921,
3922,3923,3924,1258,3925,3926,3927,3928,3929,3930,3931,1193,3932,1601,3933,3934,
3935,3936,3937,3938,3939,3940,3941,3942,3943,1602,3944,3945,3946,3947,3948,1603,
3949,3950,3951,3952,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,
3965,1604,3966,3967,3968,3969,3970,3971,3972,3973,3974,3975,3976,3977,1353,3978,
3979,3980,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,1354,3992,3993,
3994,3995,3996,3997,3998,3999,4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,
4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,1355,4024,
4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,
1605,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,
4056,4057,4058,4059,4060,1606,4061,4062,4063,4064,1607,4065,4066,4067,4068,4069,
4070,4071,4072,4073,4074,4075,4076,1194,4077,4078,1608,4079,4080,4081,4082,4083,
4084,4085,4086,4087,1609,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,
4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,1259,4109,4110,4111,4112,4113,
4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,1195,4125,4126,4127,1610,
4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,1356,4138,4139,4140,4141,4142,
4143,4144,1611,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,
4158,4159,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4170,4171,4172,4173,
4174,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4189,
4190,4191,4192,4193,4194,4195,4196,4197,4198,4199,4200,4201,4202,4203,4204,4205,
4206,4207,4208,4209,4210,4211,4212,4213,4214,4215,4216,4217,4218,4219,1612,4220,
4221,4222,4223,4224,4225,4226,4227,1357,4228,1613,4229,4230,4231,4232,4233,4234,
4235,4236,4237,4238,4239,4240,4241,4242,4243,1614,4244,4245,4246,4247,4248,4249,
4250,4251,4252,4253,4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,
4266,4267,4268,4269,4270,1196,1358,4271,4272,4273,4274,4275,4276,4277,4278,4279,
4280,4281,4282,4283,4284,4285,4286,4287,1615,4288,4289,4290,4291,4292,4293,4294,
4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307,4308,4309,4310,
4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,
4327,4328,4329,4330,4331,4332,4333,4334,1616,4335,4336,4337,4338,4339,4340,4341,
4342,4343,4344,4345,4346,4347,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,
4358,4359,4360,1617,4361,4362,4363,4364,4365,1618,4366,4367,4368,4369,4370,4371,
4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,
4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,
4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,1619,4417,4418,
4419,4420,4421,4422,4423,4424,4425,1112,4426,4427,4428,4429,4430,1620,4431,4432,
4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,1260,1261,4443,4444,4445,4446,
4447,4448,4449,4450,4451,4452,4453,4454,4455,1359,4456,4457,4458,4459,4460,4461,
4462,4463,4464,4465,1621,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,
4477,4478,4479,4480,4481,4482,4483,4484,4485,4486,4487,4488,4489,1055,4490,4491,
4492,4493,4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,
4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,1622,4519,4520,4521,1623,
4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,1360,4536,
4537,4538,4539,4540,4541,4542,4543, 975,4544,4545,4546,4547,4548,4549,4550,4551,
4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,
4568,4569,4570,4571,1624,4572,4573,4574,4575,4576,1625,4577,4578,4579,4580,4581,
4582,4583,4584,1626,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,1627,
4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,
4612,4613,4614,4615,1628,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,
4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,
4643,4644,4645,4646,4647,4648,4649,1361,4650,4651,4652,4653,4654,4655,4656,4657,
4658,4659,4660,4661,1362,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,
4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,1629,4683,4684,4685,4686,4687,
1630,4688,4689,4690,4691,1153,4692,4693,4694,1113,4695,4696,4697,4698,4699,4700,
4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,1197,4712,4713,4714,4715,
4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,
4732,4733,4734,4735,1631,4736,1632,4737,4738,4739,4740,4741,4742,4743,4744,1633,
4745,4746,4747,4748,4749,1262,4750,4751,4752,4753,4754,1363,4755,4756,4757,4758,
4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,1634,4769,4770,4771,4772,4773,
4774,4775,4776,4777,4778,1635,4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,
4789,1636,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4801,4802,4803,
4804,4805,4806,1637,4807,4808,4809,1638,4810,4811,4812,4813,4814,4815,4816,4817,
4818,1639,4819,4820,4821,4822,4823,4824,4825,4826,4827,4828,4829,4830,4831,4832,
4833,1077,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,
4848,4849,4850,4851,4852,4853,4854,4855,4856,4857,4858,4859,4860,4861,4862,4863,
4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874,4875,4876,4877,4878,4879,
4880,4881,4882,4883,1640,4884,4885,1641,4886,4887,4888,4889,4890,4891,4892,4893,
4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,
4910,4911,1642,4912,4913,4914,1364,4915,4916,4917,4918,4919,4920,4921,4922,4923,
4924,4925,4926,4927,4928,4929,4930,4931,1643,4932,4933,4934,4935,4936,4937,4938,
4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953,4954,
4955,4956,4957,4958,4959,4960,4961,4962,4963,4964,4965,4966,4967,4968,4969,4970,
4971,4972,4973,4974,4975,4976,4977,4978,4979,4980,1644,4981,4982,4983,4984,1645,
4985,4986,1646,4987,4988,4989,4990,4991,4992,4993,4994,4995,4996,4997,4998,4999,
5000,5001,5002,5003,5004,5005,1647,5006,1648,5007,5008,5009,5010,5011,5012,1078,
5013,5014,5015,5016,5017,5018,5019,5020,5021,5022,5023,5024,5025,5026,5027,5028,
1365,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039,1649,5040,5041,5042,
5043,5044,5045,1366,5046,5047,5048,5049,5050,5051,5052,5053,5054,5055,1650,5056,
5057,5058,5059,5060,5061,5062,5063,5064,5065,5066,5067,5068,5069,5070,5071,5072,
5073,5074,5075,5076,5077,1651,5078,5079,5080,5081,5082,5083,5084,5085,5086,5087,
5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102,5103,
5104,5105,5106,5107,5108,5109,5110,1652,5111,5112,5113,5114,5115,5116,5117,5118,
1367,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,1653,5130,5131,5132,
5133,5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,
5149,1368,5150,1654,5151,1369,5152,5153,5154,5155,5156,5157,5158,5159,5160,5161,
5162,5163,5164,5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,5176,5177,
5178,1370,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5189,5190,5191,5192,
5193,5194,5195,5196,5197,5198,1655,5199,5200,5201,5202,1656,5203,5204,5205,5206,
1371,5207,1372,5208,5209,5210,5211,1373,5212,5213,1374,5214,5215,5216,5217,5218,
5219,5220,5221,5222,5223,5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,
5235,5236,5237,5238,5239,5240,5241,5242,5243,5244,5245,5246,5247,1657,5248,5249,
5250,5251,1658,1263,5252,5253,5254,5255,5256,1375,5257,5258,5259,5260,5261,5262,
5263,5264,5265,5266,5267,5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,
5279,5280,5281,5282,5283,1659,5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,
5294,5295,5296,5297,5298,5299,5300,1660,5301,5302,5303,5304,5305,5306,5307,5308,
5309,5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,5320,5321,1376,5322,5323,
5324,5325,5326,5327,5328,5329,5330,5331,5332,5333,1198,5334,5335,5336,5337,5338,
5339,5340,5341,5342,5343,1661,5344,5345,5346,5347,5348,5349,5350,5351,5352,5353,
5354,5355,5356,5357,5358,5359,5360,5361,5362,5363,5364,5365,5366,5367,5368,5369,
5370,5371,5372,5373,5374,5375,5376,5377,5378,5379,5380,5381,5382,5383,5384,5385,
5386,5387,5388,5389,5390,5391,5392,5393,5394,5395,5396,5397,5398,1264,5399,5400,
5401,5402,5403,5404,5405,5406,5407,5408,5409,5410,5411,5412,1662,5413,5414,5415,
5416,1663,5417,5418,5419,5420,5421,5422,5423,5424,5425,5426,5427,5428,5429,5430,
5431,5432,5433,5434,5435,5436,5437,5438,1664,5439,5440,5441,5442,5443,5444,5445,
5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456,5457,5458,5459,5460,5461,
5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472,5473,5474,5475,5476,5477,
5478,1154,5479,5480,5481,5482,5483,5484,5485,1665,5486,5487,5488,5489,5490,5491,
5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504,5505,5506,5507,
5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520,5521,5522,5523,
5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537,5538,5539,
5540,5541,5542,5543,5544,5545,5546,5547,5548,1377,5549,5550,5551,5552,5553,5554,
5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568,5569,5570,
1114,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584,5585,
5586,5587,5588,5589,5590,5591,5592,1378,5593,5594,5595,5596,5597,5598,5599,5600,
5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,1379,5615,
5616,5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,
5632,5633,5634,1380,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,
5647,5648,5649,1381,1056,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,
1666,5661,5662,5663,5664,5665,5666,5667,5668,1667,5669,1668,5670,5671,5672,5673,
5674,5675,5676,5677,5678,1155,5679,5680,5681,5682,5683,5684,5685,5686,5687,5688,
5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,1669,5699,5700,5701,5702,5703,
5704,5705,1670,5706,5707,5708,5709,5710,1671,5711,5712,5713,5714,1382,5715,5716,
5717,5718,5719,5720,5721,5722,5723,5724,5725,1672,5726,5727,1673,1674,5728,5729,
5730,5731,5732,5733,5734,5735,5736,1675,5737,5738,5739,5740,5741,5742,5743,5744,
1676,5745,5746,5747,5748,5749,5750,5751,1383,5752,5753,5754,5755,5756,5757,5758,
5759,5760,5761,5762,5763,5764,5765,5766,5767,5768,1677,5769,5770,5771,5772,5773,
1678,5774,5775,5776, 998,5777,5778,5779,5780,5781,5782,5783,5784,5785,1384,5786,
5787,5788,5789,5790,5791,5792,5793,5794,5795,5796,5797,5798,5799,5800,1679,5801,
5802,5803,1115,1116,5804,5805,5806,5807,5808,5809,5810,5811,5812,5813,5814,5815,
5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828,5829,5830,5831,
5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844,5845,5846,5847,
5848,5849,5850,5851,5852,5853,5854,5855,1680,5856,5857,5858,5859,5860,5861,5862,
5863,5864,1681,5865,5866,5867,1682,5868,5869,5870,5871,5872,5873,5874,5875,5876,
5877,5878,5879,1683,5880,1684,5881,5882,5883,5884,1685,5885,5886,5887,5888,5889,
5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,
5906,5907,1686,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,
5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,1687,
5936,5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,
5952,1688,1689,5953,1199,5954,5955,5956,5957,5958,5959,5960,5961,1690,5962,5963,
5964,5965,5966,5967,5968,5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,
5980,5981,1385,5982,1386,5983,5984,5985,5986,5987,5988,5989,5990,5991,5992,5993,
5994,5995,5996,5997,5998,5999,6000,6001,6002,6003,6004,6005,6006,6007,6008,6009,
6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,
6026,6027,1265,6028,6029,1691,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,
6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052,6053,6054,6055,
6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068,6069,6070,6071,
6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084,1692,6085,6086,
6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100,6101,6102,
6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116,6117,6118,
6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,1693,6132,6133,
6134,6135,6136,1694,6137,6138,6139,6140,6141,1695,6142,6143,6144,6145,6146,6147,
6148,6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,
6164,6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179,
6180,6181,6182,6183,6184,6185,1696,6186,6187,6188,6189,6190,6191,6192,6193,6194,
6195,6196,6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,
6211,6212,6213,6214,6215,6216,6217,6218,6219,1697,6220,6221,6222,6223,6224,6225,
6226,6227,6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,
6242,6243,6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,1698,6254,6255,6256,
6257,6258,6259,6260,6261,6262,6263,1200,6264,6265,6266,6267,6268,6269,6270,6271,  #1024
6272,6273,6274,6275,6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,6286,6287,
6288,6289,6290,6291,6292,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,1699,
6303,6304,1700,6305,6306,6307,6308,6309,6310,6311,6312,6313,6314,6315,6316,6317,
6318,6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,
6334,6335,6336,6337,6338,6339,1701,6340,6341,6342,6343,6344,1387,6345,6346,6347,
6348,6349,6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,
6364,6365,6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,
6380,6381,6382,6383,6384,6385,6386,6387,6388,6389,6390,6391,6392,6393,6394,6395,
6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,
6412,6413,1702,6414,6415,6416,6417,6418,6419,6420,6421,6422,1703,6423,6424,6425,
6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,1704,6439,6440,
6441,6442,6443,6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,
6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,
6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488,
6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,1266,
6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516,6517,6518,6519,
6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532,6533,6534,6535,
6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548,6549,6550,6551,
1705,1706,6552,6553,6554,6555,6556,6557,6558,6559,6560,6561,6562,6563,6564,6565,
6566,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,
6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,
6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610,6611,6612,6613,
6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,
6630,6631,6632,6633,6634,6635,6636,6637,1388,6638,6639,6640,6641,6642,6643,6644,
1707,6645,6646,6647,6648,6649,6650,6651,6652,6653,6654,6655,6656,6657,6658,6659,
6660,6661,6662,6663,1708,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,
1201,6675,6676,6677,6678,6679,6680,6681,6682,6683,6684,6685,6686,6687,6688,6689,
6690,6691,6692,6693,6694,6695,6696,6697,6698,6699,6700,6701,6702,6703,6704,6705,
6706,6707,6708,6709,6710,6711,6712,6713,6714,6715,6716,6717,6718,6719,6720,6721,
6722,6723,6724,6725,1389,6726,6727,6728,6729,6730,6731,6732,6733,6734,6735,6736,
1390,1709,6737,6738,6739,6740,6741,6742,1710,6743,6744,6745,6746,1391,6747,6748,
6749,6750,6751,6752,6753,6754,6755,6756,6757,1392,6758,6759,6760,6761,6762,6763,
6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777,6778,6779,
6780,1202,6781,6782,6783,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6794,
6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,1711,
6810,6811,6812,6813,6814,6815,6816,6817,6818,6819,6820,6821,6822,6823,6824,6825,
6826,6827,6828,6829,6830,6831,6832,6833,6834,6835,6836,1393,6837,6838,6839,6840,
6841,6842,6843,6844,6845,6846,6847,6848,6849,6850,6851,6852,6853,6854,6855,6856,
6857,6858,6859,6860,6861,6862,6863,6864,6865,6866,6867,6868,6869,6870,6871,6872,
6873,6874,6875,6876,6877,6878,6879,6880,6881,6882,6883,6884,6885,6886,6887,6888,
6889,6890,6891,6892,6893,6894,6895,6896,6897,6898,6899,6900,6901,6902,1712,6903,
6904,6905,6906,6907,6908,6909,6910,1713,6911,6912,6913,6914,6915,6916,6917,6918,
6919,6920,6921,6922,6923,6924,6925,6926,6927,6928,6929,6930,6931,6932,6933,6934,
6935,6936,6937,6938,6939,6940,6941,6942,6943,6944,6945,6946,6947,6948,6949,6950,
6951,6952,6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6964,6965,6966,
6967,6968,6969,6970,6971,6972,6973,6974,1714,6975,6976,6977,6978,6979,6980,6981,
6982,6983,6984,6985,6986,6987,6988,1394,6989,6990,6991,6992,6993,6994,6995,6996,
6997,6998,6999,7000,1715,7001,7002,7003,7004,7005,7006,7007,7008,7009,7010,7011,
7012,7013,7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,
7028,1716,7029,7030,7031,7032,7033,7034,7035,7036,7037,7038,7039,7040,7041,7042,
7043,7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,
7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7071,7072,7073,7074,
7075,7076,7077,7078,7079,7080,7081,7082,7083,7084,7085,7086,7087,7088,7089,7090,
7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105,7106,
7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,7119,7120,7121,7122,
7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136,7137,7138,
7139,7140,7141,7142,7143,7144,7145,7146,7147,7148,7149,7150,7151,7152,7153,7154,
7155,7156,7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167,7168,7169,7170,
7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183,7184,7185,7186,
7187,7188,7189,7190,7191,7192,7193,7194,7195,7196,7197,7198,7199,7200,7201,7202,
7203,7204,7205,7206,7207,1395,7208,7209,7210,7211,7212,7213,1717,7214,7215,7216,
7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229,7230,7231,7232,
7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245,7246,7247,7248,
7249,7250,7251,7252,7253,7254,7255,7256,7257,7258,7259,7260,7261,7262,7263,7264,
7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277,7278,7279,7280,
7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7294,7295,7296,
7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308,7309,7310,7311,7312,
7313,1718,7314,7315,7316,7317,7318,7319,7320,7321,7322,7323,7324,7325,7326,7327,
7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342,7343,
7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7355,7356,7357,7358,7359,
7360,7361,7362,7363,7364,7365,7366,7367,7368,7369,7370,7371,7372,7373,7374,7375,
7376,7377,7378,7379,7380,7381,7382,7383,7384,7385,7386,7387,7388,7389,7390,7391,
7392,7393,7394,7395,7396,7397,7398,7399,7400,7401,7402,7403,7404,7405,7406,7407,
7408,7409,7410,7411,7412,7413,7414,7415,7416,7417,7418,7419,7420,7421,7422,7423,
7424,7425,7426,7427,7428,7429,7430,7431,7432,7433,7434,7435,7436,7437,7438,7439,
7440,7441,7442,7443,7444,7445,7446,7447,7448,7449,7450,7451,7452,7453,7454,7455,
7456,7457,7458,7459,7460,7461,7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,
7472,7473,7474,7475,7476,7477,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,
7488,7489,7490,7491,7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,7503,
7504,7505,7506,7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,
7520,7521,7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,
7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,
7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567,
7568,7569,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582,7583,
7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,
7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,
7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,
7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,
7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659,7660,7661,7662,7663,
7664,7665,7666,7667,7668,7669,7670,7671,7672,7673,7674,7675,7676,7677,7678,7679,
7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690,7691,7692,7693,7694,7695,
7696,7697,7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,
7712,7713,7714,7715,7716,7717,7718,7719,7720,7721,7722,7723,7724,7725,7726,7727,
7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742,7743,
7744,7745,7746,7747,7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7759,
7760,7761,7762,7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,
7776,7777,7778,7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,
7792,7793,7794,7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,7806,7807,
7808,7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,
7824,7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,
7840,7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,
7856,7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,
7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,
7888,7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,
7904,7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,
7920,7921,7922,7923,7924,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935,
7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951,
7952,7953,7954,7955,7956,7957,7958,7959,7960,7961,7962,7963,7964,7965,7966,7967,
7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983,
7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999,
8000,8001,8002,8003,8004,8005,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,
8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031,
8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,
8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063,
8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,
8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,
8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,
8112,8113,8114,8115,8116,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127,
8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,
8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,
8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,
8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,
8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,
8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,
8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,
8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,
8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,
8272,8273,8274,8275,8276,8277,8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,
8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,
8304,8305,8306,8307,8308,8309,8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,
8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,
8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,
8352,8353,8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,
8368,8369,8370,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,
8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,
8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,
8416,8417,8418,8419,8420,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,
8432,8433,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,
8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,
8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,
8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,
8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,
8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,
8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,
8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,
8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,
8576,8577,8578,8579,8580,8581,8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,
8592,8593,8594,8595,8596,8597,8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,
8608,8609,8610,8611,8612,8613,8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,
8624,8625,8626,8627,8628,8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,
8640,8641,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,
8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,
8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,
8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,
8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,
8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,
8736,8737,8738,8739,8740,8741)

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py000064400000017237151735047770022037 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .constants import eStart, eError, eItsMe

HZ_cls = (
1,0,0,0,0,0,0,0,  # 00 - 07
0,0,0,0,0,0,0,0,  # 08 - 0f
0,0,0,0,0,0,0,0,  # 10 - 17
0,0,0,1,0,0,0,0,  # 18 - 1f
0,0,0,0,0,0,0,0,  # 20 - 27
0,0,0,0,0,0,0,0,  # 28 - 2f
0,0,0,0,0,0,0,0,  # 30 - 37
0,0,0,0,0,0,0,0,  # 38 - 3f
0,0,0,0,0,0,0,0,  # 40 - 47
0,0,0,0,0,0,0,0,  # 48 - 4f
0,0,0,0,0,0,0,0,  # 50 - 57
0,0,0,0,0,0,0,0,  # 58 - 5f
0,0,0,0,0,0,0,0,  # 60 - 67
0,0,0,0,0,0,0,0,  # 68 - 6f
0,0,0,0,0,0,0,0,  # 70 - 77
0,0,0,4,0,5,2,0,  # 78 - 7f
1,1,1,1,1,1,1,1,  # 80 - 87
1,1,1,1,1,1,1,1,  # 88 - 8f
1,1,1,1,1,1,1,1,  # 90 - 97
1,1,1,1,1,1,1,1,  # 98 - 9f
1,1,1,1,1,1,1,1,  # a0 - a7
1,1,1,1,1,1,1,1,  # a8 - af
1,1,1,1,1,1,1,1,  # b0 - b7
1,1,1,1,1,1,1,1,  # b8 - bf
1,1,1,1,1,1,1,1,  # c0 - c7
1,1,1,1,1,1,1,1,  # c8 - cf
1,1,1,1,1,1,1,1,  # d0 - d7
1,1,1,1,1,1,1,1,  # d8 - df
1,1,1,1,1,1,1,1,  # e0 - e7
1,1,1,1,1,1,1,1,  # e8 - ef
1,1,1,1,1,1,1,1,  # f0 - f7
1,1,1,1,1,1,1,1,  # f8 - ff
)

HZ_st = (
eStart,eError,     3,eStart,eStart,eStart,eError,eError,# 00-07
eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,# 08-0f
eItsMe,eItsMe,eError,eError,eStart,eStart,     4,eError,# 10-17
     5,eError,     6,eError,     5,     5,     4,eError,# 18-1f
     4,eError,     4,     4,     4,eError,     4,eError,# 20-27
     4,eItsMe,eStart,eStart,eStart,eStart,eStart,eStart,# 28-2f
)

HZCharLenTable = (0, 0, 0, 0, 0, 0)

HZSMModel = {'classTable': HZ_cls,
             'classFactor': 6,
             'stateTable': HZ_st,
             'charLenTable': HZCharLenTable,
             'name': "HZ-GB-2312"}

ISO2022CN_cls = (
2,0,0,0,0,0,0,0,  # 00 - 07
0,0,0,0,0,0,0,0,  # 08 - 0f
0,0,0,0,0,0,0,0,  # 10 - 17
0,0,0,1,0,0,0,0,  # 18 - 1f
0,0,0,0,0,0,0,0,  # 20 - 27
0,3,0,0,0,0,0,0,  # 28 - 2f
0,0,0,0,0,0,0,0,  # 30 - 37
0,0,0,0,0,0,0,0,  # 38 - 3f
0,0,0,4,0,0,0,0,  # 40 - 47
0,0,0,0,0,0,0,0,  # 48 - 4f
0,0,0,0,0,0,0,0,  # 50 - 57
0,0,0,0,0,0,0,0,  # 58 - 5f
0,0,0,0,0,0,0,0,  # 60 - 67
0,0,0,0,0,0,0,0,  # 68 - 6f
0,0,0,0,0,0,0,0,  # 70 - 77
0,0,0,0,0,0,0,0,  # 78 - 7f
2,2,2,2,2,2,2,2,  # 80 - 87
2,2,2,2,2,2,2,2,  # 88 - 8f
2,2,2,2,2,2,2,2,  # 90 - 97
2,2,2,2,2,2,2,2,  # 98 - 9f
2,2,2,2,2,2,2,2,  # a0 - a7
2,2,2,2,2,2,2,2,  # a8 - af
2,2,2,2,2,2,2,2,  # b0 - b7
2,2,2,2,2,2,2,2,  # b8 - bf
2,2,2,2,2,2,2,2,  # c0 - c7
2,2,2,2,2,2,2,2,  # c8 - cf
2,2,2,2,2,2,2,2,  # d0 - d7
2,2,2,2,2,2,2,2,  # d8 - df
2,2,2,2,2,2,2,2,  # e0 - e7
2,2,2,2,2,2,2,2,  # e8 - ef
2,2,2,2,2,2,2,2,  # f0 - f7
2,2,2,2,2,2,2,2,  # f8 - ff
)

ISO2022CN_st = (
eStart,     3,eError,eStart,eStart,eStart,eStart,eStart,# 00-07
eStart,eError,eError,eError,eError,eError,eError,eError,# 08-0f
eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,# 10-17
eItsMe,eItsMe,eItsMe,eError,eError,eError,     4,eError,# 18-1f
eError,eError,eError,eItsMe,eError,eError,eError,eError,# 20-27
     5,     6,eError,eError,eError,eError,eError,eError,# 28-2f
eError,eError,eError,eItsMe,eError,eError,eError,eError,# 30-37
eError,eError,eError,eError,eError,eItsMe,eError,eStart,# 38-3f
)

ISO2022CNCharLenTable = (0, 0, 0, 0, 0, 0, 0, 0, 0)

ISO2022CNSMModel = {'classTable': ISO2022CN_cls,
                    'classFactor': 9,
                    'stateTable': ISO2022CN_st,
                    'charLenTable': ISO2022CNCharLenTable,
                    'name': "ISO-2022-CN"}

ISO2022JP_cls = (
2,0,0,0,0,0,0,0,  # 00 - 07
0,0,0,0,0,0,2,2,  # 08 - 0f
0,0,0,0,0,0,0,0,  # 10 - 17
0,0,0,1,0,0,0,0,  # 18 - 1f
0,0,0,0,7,0,0,0,  # 20 - 27
3,0,0,0,0,0,0,0,  # 28 - 2f
0,0,0,0,0,0,0,0,  # 30 - 37
0,0,0,0,0,0,0,0,  # 38 - 3f
6,0,4,0,8,0,0,0,  # 40 - 47
0,9,5,0,0,0,0,0,  # 48 - 4f
0,0,0,0,0,0,0,0,  # 50 - 57
0,0,0,0,0,0,0,0,  # 58 - 5f
0,0,0,0,0,0,0,0,  # 60 - 67
0,0,0,0,0,0,0,0,  # 68 - 6f
0,0,0,0,0,0,0,0,  # 70 - 77
0,0,0,0,0,0,0,0,  # 78 - 7f
2,2,2,2,2,2,2,2,  # 80 - 87
2,2,2,2,2,2,2,2,  # 88 - 8f
2,2,2,2,2,2,2,2,  # 90 - 97
2,2,2,2,2,2,2,2,  # 98 - 9f
2,2,2,2,2,2,2,2,  # a0 - a7
2,2,2,2,2,2,2,2,  # a8 - af
2,2,2,2,2,2,2,2,  # b0 - b7
2,2,2,2,2,2,2,2,  # b8 - bf
2,2,2,2,2,2,2,2,  # c0 - c7
2,2,2,2,2,2,2,2,  # c8 - cf
2,2,2,2,2,2,2,2,  # d0 - d7
2,2,2,2,2,2,2,2,  # d8 - df
2,2,2,2,2,2,2,2,  # e0 - e7
2,2,2,2,2,2,2,2,  # e8 - ef
2,2,2,2,2,2,2,2,  # f0 - f7
2,2,2,2,2,2,2,2,  # f8 - ff
)

ISO2022JP_st = (
eStart,     3,eError,eStart,eStart,eStart,eStart,eStart,# 00-07
eStart,eStart,eError,eError,eError,eError,eError,eError,# 08-0f
eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,# 10-17
eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,# 18-1f
eError,     5,eError,eError,eError,     4,eError,eError,# 20-27
eError,eError,eError,     6,eItsMe,eError,eItsMe,eError,# 28-2f
eError,eError,eError,eError,eError,eError,eItsMe,eItsMe,# 30-37
eError,eError,eError,eItsMe,eError,eError,eError,eError,# 38-3f
eError,eError,eError,eError,eItsMe,eError,eStart,eStart,# 40-47
)

ISO2022JPCharLenTable = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

ISO2022JPSMModel = {'classTable': ISO2022JP_cls,
                    'classFactor': 10,
                    'stateTable': ISO2022JP_st,
                    'charLenTable': ISO2022JPCharLenTable,
                    'name': "ISO-2022-JP"}

ISO2022KR_cls = (
2,0,0,0,0,0,0,0,  # 00 - 07
0,0,0,0,0,0,0,0,  # 08 - 0f
0,0,0,0,0,0,0,0,  # 10 - 17
0,0,0,1,0,0,0,0,  # 18 - 1f
0,0,0,0,3,0,0,0,  # 20 - 27
0,4,0,0,0,0,0,0,  # 28 - 2f
0,0,0,0,0,0,0,0,  # 30 - 37
0,0,0,0,0,0,0,0,  # 38 - 3f
0,0,0,5,0,0,0,0,  # 40 - 47
0,0,0,0,0,0,0,0,  # 48 - 4f
0,0,0,0,0,0,0,0,  # 50 - 57
0,0,0,0,0,0,0,0,  # 58 - 5f
0,0,0,0,0,0,0,0,  # 60 - 67
0,0,0,0,0,0,0,0,  # 68 - 6f
0,0,0,0,0,0,0,0,  # 70 - 77
0,0,0,0,0,0,0,0,  # 78 - 7f
2,2,2,2,2,2,2,2,  # 80 - 87
2,2,2,2,2,2,2,2,  # 88 - 8f
2,2,2,2,2,2,2,2,  # 90 - 97
2,2,2,2,2,2,2,2,  # 98 - 9f
2,2,2,2,2,2,2,2,  # a0 - a7
2,2,2,2,2,2,2,2,  # a8 - af
2,2,2,2,2,2,2,2,  # b0 - b7
2,2,2,2,2,2,2,2,  # b8 - bf
2,2,2,2,2,2,2,2,  # c0 - c7
2,2,2,2,2,2,2,2,  # c8 - cf
2,2,2,2,2,2,2,2,  # d0 - d7
2,2,2,2,2,2,2,2,  # d8 - df
2,2,2,2,2,2,2,2,  # e0 - e7
2,2,2,2,2,2,2,2,  # e8 - ef
2,2,2,2,2,2,2,2,  # f0 - f7
2,2,2,2,2,2,2,2,  # f8 - ff
)

ISO2022KR_st = (
eStart,     3,eError,eStart,eStart,eStart,eError,eError,# 00-07
eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,# 08-0f
eItsMe,eItsMe,eError,eError,eError,     4,eError,eError,# 10-17
eError,eError,eError,eError,     5,eError,eError,eError,# 18-1f
eError,eError,eError,eItsMe,eStart,eStart,eStart,eStart,# 20-27
)

ISO2022KRCharLenTable = (0, 0, 0, 0, 0, 0)

ISO2022KRSMModel = {'classTable': ISO2022KR_cls,
                    'classFactor': 6,
                    'stateTable': ISO2022KR_st,
                    'charLenTable': ISO2022KRCharLenTable,
                    'name': "ISO-2022-KR"}

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py000064400000030760151735047770024550 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# Character Mapping Table:
# this table is modified base on win1251BulgarianCharToOrderMap, so
# only number <64 is sure valid

Latin5_BulgarianCharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 77, 90, 99,100, 72,109,107,101, 79,185, 81,102, 76, 94, 82,  # 40
110,186,108, 91, 74,119, 84, 96,111,187,115,253,253,253,253,253,  # 50
253, 65, 69, 70, 66, 63, 68,112,103, 92,194,104, 95, 86, 87, 71,  # 60
116,195, 85, 93, 97,113,196,197,198,199,200,253,253,253,253,253,  # 70
194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,  # 80
210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,  # 90
 81,226,227,228,229,230,105,231,232,233,234,235,236, 45,237,238,  # a0
 31, 32, 35, 43, 37, 44, 55, 47, 40, 59, 33, 46, 38, 36, 41, 30,  # b0
 39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,239, 67,240, 60, 56,  # c0
  1, 18,  9, 20, 11,  3, 23, 15,  2, 26, 12, 10, 14,  6,  4, 13,  # d0
  7,  8,  5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,241, 42, 16,  # e0
 62,242,243,244, 58,245, 98,246,247,248,249,250,251, 91,252,253,  # f0
)

win1251BulgarianCharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 77, 90, 99,100, 72,109,107,101, 79,185, 81,102, 76, 94, 82,  # 40
110,186,108, 91, 74,119, 84, 96,111,187,115,253,253,253,253,253,  # 50
253, 65, 69, 70, 66, 63, 68,112,103, 92,194,104, 95, 86, 87, 71,  # 60
116,195, 85, 93, 97,113,196,197,198,199,200,253,253,253,253,253,  # 70
206,207,208,209,210,211,212,213,120,214,215,216,217,218,219,220,  # 80
221, 78, 64, 83,121, 98,117,105,222,223,224,225,226,227,228,229,  # 90
 88,230,231,232,233,122, 89,106,234,235,236,237,238, 45,239,240,  # a0
 73, 80,118,114,241,242,243,244,245, 62, 58,246,247,248,249,250,  # b0
 31, 32, 35, 43, 37, 44, 55, 47, 40, 59, 33, 46, 38, 36, 41, 30,  # c0
 39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,251, 67,252, 60, 56,  # d0
  1, 18,  9, 20, 11,  3, 23, 15,  2, 26, 12, 10, 14,  6,  4, 13,  # e0
  7,  8,  5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,253, 42, 16,  # f0
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 96.9392%
# first 1024 sequences:3.0618%
# rest  sequences:     0.2992%
# negative sequences:  0.0020%
BulgarianLangModel = (
0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,2,2,1,2,2,
3,1,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,3,3,3,0,3,0,1,
0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,3,3,3,3,3,0,3,1,0,
0,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,2,3,3,3,3,3,3,3,3,0,3,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,1,3,2,3,3,3,3,3,3,3,3,0,3,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,1,3,3,3,3,2,2,2,1,1,2,0,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,2,3,2,2,3,3,1,1,2,3,3,2,3,3,3,3,2,1,2,0,2,0,3,0,0,
0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,1,3,3,3,3,3,2,3,2,3,3,3,3,3,2,3,3,1,3,0,3,0,2,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,1,3,3,2,3,3,3,1,3,3,2,3,2,2,2,0,0,2,0,2,0,2,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,3,3,1,2,2,3,2,1,1,2,0,2,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,2,3,3,1,2,3,2,2,2,3,3,3,3,3,2,2,3,1,2,0,2,1,2,0,0,
0,0,0,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,1,3,3,3,3,3,2,3,3,3,2,3,3,2,3,2,2,2,3,1,2,0,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,3,3,3,1,1,1,2,2,1,3,1,3,2,2,3,0,0,1,0,1,0,1,0,0,
0,0,0,1,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,2,2,3,2,2,3,1,2,1,1,1,2,3,1,3,1,2,2,0,1,1,1,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,1,3,2,2,3,3,1,2,3,1,1,3,3,3,3,1,2,2,1,1,1,0,2,0,2,0,1,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,2,2,3,3,3,2,2,1,1,2,0,2,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,0,1,2,1,3,3,2,3,3,3,3,3,2,3,2,1,0,3,1,2,1,2,1,2,3,2,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,2,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,1,3,3,2,3,3,2,2,2,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,0,3,3,3,3,3,2,1,1,2,1,3,3,0,3,1,1,1,1,3,2,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,1,1,3,1,3,3,2,3,2,2,2,3,0,2,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,2,3,3,2,2,3,2,1,1,1,1,1,3,1,3,1,1,0,0,0,1,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,2,3,2,0,3,2,0,3,0,2,0,0,2,1,3,1,0,0,1,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,2,1,1,1,1,2,1,1,2,1,1,1,2,2,1,2,1,1,1,0,1,1,0,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,2,1,3,1,1,2,1,3,2,1,1,0,1,2,3,2,1,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,3,3,3,2,2,1,0,1,0,0,1,0,0,0,2,1,0,3,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,2,3,2,3,3,1,3,2,1,1,1,2,1,1,2,1,3,0,1,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,2,2,3,3,2,3,2,2,2,3,1,2,2,1,1,2,1,1,2,2,0,1,1,0,1,0,2,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,2,1,3,1,0,2,2,1,3,2,1,0,0,2,0,2,0,1,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,
3,3,3,3,3,3,1,2,0,2,3,1,2,3,2,0,1,3,1,2,1,1,1,0,0,1,0,0,2,2,2,3,
2,2,2,2,1,2,1,1,2,2,1,1,2,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,1,1,0,1,
3,3,3,3,3,2,1,2,2,1,2,0,2,0,1,0,1,2,1,2,1,1,0,0,0,1,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,
3,3,2,3,3,1,1,3,1,0,3,2,1,0,0,0,1,2,0,2,0,1,0,0,0,1,0,1,2,1,2,2,
1,1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,1,0,1,2,1,1,1,0,0,0,0,0,1,1,0,0,
3,1,0,1,0,2,3,2,2,2,3,2,2,2,2,2,1,0,2,1,2,1,1,1,0,1,2,1,2,2,2,1,
1,1,2,2,2,2,1,2,1,1,0,1,2,1,2,2,2,1,1,1,0,1,1,1,1,2,0,1,0,0,0,0,
2,3,2,3,3,0,0,2,1,0,2,1,0,0,0,0,2,3,0,2,0,0,0,0,0,1,0,0,2,0,1,2,
2,1,2,1,2,2,1,1,1,2,1,1,1,0,1,2,2,1,1,1,1,1,0,1,1,1,0,0,1,2,0,0,
3,3,2,2,3,0,2,3,1,1,2,0,0,0,1,0,0,2,0,2,0,0,0,1,0,1,0,1,2,0,2,2,
1,1,1,1,2,1,0,1,2,2,2,1,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,1,0,0,
2,3,2,3,3,0,0,3,0,1,1,0,1,0,0,0,2,2,1,2,0,0,0,0,0,0,0,0,2,0,1,2,
2,2,1,1,1,1,1,2,2,2,1,0,2,0,1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,
3,3,3,3,2,2,2,2,2,0,2,1,1,1,1,2,1,2,1,1,0,2,0,1,0,1,0,0,2,0,1,2,
1,1,1,1,1,1,1,2,2,1,1,0,2,0,1,0,2,0,0,1,1,1,0,0,2,0,0,0,1,1,0,0,
2,3,3,3,3,1,0,0,0,0,0,0,0,0,0,0,2,0,0,1,1,0,0,0,0,0,0,1,2,0,1,2,
2,2,2,1,1,2,1,1,2,2,2,1,2,0,1,1,1,1,1,1,0,1,1,1,1,0,0,1,1,1,0,0,
2,3,3,3,3,0,2,2,0,2,1,0,0,0,1,1,1,2,0,2,0,0,0,3,0,0,0,0,2,0,2,2,
1,1,1,2,1,2,1,1,2,2,2,1,2,0,1,1,1,0,1,1,1,1,0,2,1,0,0,0,1,1,0,0,
2,3,3,3,3,0,2,1,0,0,2,0,0,0,0,0,1,2,0,2,0,0,0,0,0,0,0,0,2,0,1,2,
1,1,1,2,1,1,1,1,2,2,2,0,1,0,1,1,1,0,0,1,1,1,0,0,1,0,0,0,0,1,0,0,
3,3,2,2,3,0,1,0,1,0,0,0,0,0,0,0,1,1,0,3,0,0,0,0,0,0,0,0,1,0,2,2,
1,1,1,1,1,2,1,1,2,2,1,2,2,1,0,1,1,1,1,1,0,1,0,0,1,0,0,0,1,1,0,0,
3,1,0,1,0,2,2,2,2,3,2,1,1,1,2,3,0,0,1,0,2,1,1,0,1,1,1,1,2,1,1,1,
1,2,2,1,2,1,2,2,1,1,0,1,2,1,2,2,1,1,1,0,0,1,1,1,2,1,0,1,0,0,0,0,
2,1,0,1,0,3,1,2,2,2,2,1,2,2,1,1,1,0,2,1,2,2,1,1,2,1,1,0,2,1,1,1,
1,2,2,2,2,2,2,2,1,2,0,1,1,0,2,1,1,1,1,1,0,0,1,1,1,1,0,1,0,0,0,0,
2,1,1,1,1,2,2,2,2,1,2,2,2,1,2,2,1,1,2,1,2,3,2,2,1,1,1,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,3,2,0,1,2,0,1,2,1,1,0,1,0,1,2,1,2,0,0,0,1,1,0,0,0,1,0,0,2,
1,1,0,0,1,1,0,1,1,1,1,0,2,0,1,1,1,0,0,1,1,0,0,0,0,1,0,0,0,1,0,0,
2,0,0,0,0,1,2,2,2,2,2,2,2,1,2,1,1,1,1,1,1,1,0,1,1,1,1,1,2,1,1,1,
1,2,2,2,2,1,1,2,1,2,1,1,1,0,2,1,2,1,1,1,0,2,1,1,1,1,0,1,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,
1,1,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,3,2,0,0,0,0,1,0,0,0,0,0,0,1,1,0,2,0,0,0,0,0,0,0,0,1,0,1,2,
1,1,1,1,1,1,0,0,2,2,2,2,2,0,1,1,0,1,1,1,1,1,0,0,1,0,0,0,1,1,0,1,
2,3,1,2,1,0,1,1,0,2,2,2,0,0,1,0,0,1,1,1,1,0,0,0,0,0,0,0,1,0,1,2,
1,1,1,1,2,1,1,1,1,1,1,1,1,0,1,1,0,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,
2,2,2,2,2,0,0,2,0,0,2,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,2,0,2,2,
1,1,1,1,1,0,0,1,2,1,1,0,1,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,2,0,0,2,0,1,1,0,0,0,1,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,0,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,3,2,0,0,1,0,0,1,0,0,0,0,0,0,1,0,2,0,0,0,1,0,0,0,0,0,0,0,2,
1,1,0,0,1,0,0,0,1,1,0,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
2,1,2,2,2,1,2,1,2,2,1,1,2,1,1,1,0,1,1,1,1,2,0,1,0,1,1,1,1,0,1,1,
1,1,2,1,1,1,1,1,1,0,0,1,2,1,1,1,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,
1,0,0,1,3,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,1,0,0,1,0,2,0,0,0,0,0,1,1,1,0,1,0,0,0,0,0,0,0,0,2,0,0,1,
0,2,0,1,0,0,1,1,2,0,1,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
1,2,2,2,2,0,1,1,0,2,1,0,1,1,1,0,0,1,0,2,0,1,0,0,0,0,0,0,0,0,0,1,
0,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,2,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,
0,1,0,1,1,1,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
2,0,1,0,0,1,2,1,1,1,1,1,1,2,2,1,0,0,1,0,1,0,0,0,0,1,1,1,1,0,0,0,
1,1,2,1,1,1,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,1,2,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,1,1,0,1,1,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,
1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,2,0,0,2,0,1,0,0,1,0,0,1,
1,1,0,0,1,1,0,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,
1,1,1,1,1,1,1,2,0,0,0,0,0,0,2,1,0,1,1,0,0,1,1,1,0,1,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
)

Latin5BulgarianModel = {
  'charToOrderMap': Latin5_BulgarianCharToOrderMap,
  'precedenceMatrix': BulgarianLangModel,
  'mTypicalPositiveRatio': 0.969392,
  'keepEnglishLetter': False,
  'charsetName': "ISO-8859-5"
}

Win1251BulgarianModel = {
  'charToOrderMap': win1251BulgarianCharToOrderMap,
  'precedenceMatrix': BulgarianLangModel,
  'mTypicalPositiveRatio': 0.969392,
  'keepEnglishLetter': False,
  'charsetName': "windows-1251"
}


# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py000064400000004416151735047770024551 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .constants import eStart
from .compat import wrap_ord


class CodingStateMachine:
    def __init__(self, sm):
        self._mModel = sm
        self._mCurrentBytePos = 0
        self._mCurrentCharLen = 0
        self.reset()

    def reset(self):
        self._mCurrentState = eStart

    def next_state(self, c):
        # for each byte we get its class
        # if it is first byte, we also get byte length
        # PY3K: aBuf is a byte stream, so c is an int, not a byte
        byteCls = self._mModel['classTable'][wrap_ord(c)]
        if self._mCurrentState == eStart:
            self._mCurrentBytePos = 0
            self._mCurrentCharLen = self._mModel['charLenTable'][byteCls]
        # from byte's class and stateTable, we get its next state
        curr_state = (self._mCurrentState * self._mModel['classFactor']
                      + byteCls)
        self._mCurrentState = self._mModel['stateTable'][curr_state]
        self._mCurrentBytePos += 1
        return self._mCurrentState

    def get_current_charlen(self):
        return self._mCurrentCharLen

    def get_coding_state_machine(self):
        return self._mModel['name']
python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py000064400000003213151735047770023235 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import EUCKRDistributionAnalysis
from .mbcssm import EUCKRSMModel


class EUCKRProber(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(EUCKRSMModel)
        self._mDistributionAnalyzer = EUCKRDistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "EUC-KR"
python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py000064400000006304151735047770024100 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#   Proofpoint, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys
from . import constants
from .charsetprober import CharSetProber


class MultiByteCharSetProber(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mDistributionAnalyzer = None
        self._mCodingSM = None
        self._mLastChar = [0, 0]

    def reset(self):
        CharSetProber.reset(self)
        if self._mCodingSM:
            self._mCodingSM.reset()
        if self._mDistributionAnalyzer:
            self._mDistributionAnalyzer.reset()
        self._mLastChar = [0, 0]

    def get_charset_name(self):
        pass

    def feed(self, aBuf):
        aLen = len(aBuf)
        for i in range(0, aLen):
            codingState = self._mCodingSM.next_state(aBuf[i])
            if codingState == constants.eError:
                if constants._debug:
                    sys.stderr.write(self.get_charset_name()
                                     + ' prober hit error at byte ' + str(i)
                                     + '\n')
                self._mState = constants.eNotMe
                break
            elif codingState == constants.eItsMe:
                self._mState = constants.eFoundIt
                break
            elif codingState == constants.eStart:
                charLen = self._mCodingSM.get_current_charlen()
                if i == 0:
                    self._mLastChar[1] = aBuf[0]
                    self._mDistributionAnalyzer.feed(self._mLastChar, charLen)
                else:
                    self._mDistributionAnalyzer.feed(aBuf[i - 1:i + 1],
                                                     charLen)

        self._mLastChar[0] = aBuf[aLen - 1]

        if self.get_state() == constants.eDetecting:
            if (self._mDistributionAnalyzer.got_enough_data() and
                    (self.get_confidence() > constants.SHORTCUT_THRESHOLD)):
                self._mState = constants.eFoundIt

        return self.get_state()

    def get_confidence(self):
        return self._mDistributionAnalyzer.get_confidence()
python3.4/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py000064400000134323151735047770022364 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# Sampling from about 20M text materials include literature and computer technology
#
# Japanese frequency table, applied to both S-JIS and EUC-JP
# They are sorted in order.

# 128  --> 0.77094
# 256  --> 0.85710
# 512  --> 0.92635
# 1024 --> 0.97130
# 2048 --> 0.99431
#
# Ideal Distribution Ratio = 0.92635 / (1-0.92635) = 12.58
# Random Distribution Ration = 512 / (2965+62+83+86-512) = 0.191
#
# Typical Distribution Ratio, 25% of IDR

JIS_TYPICAL_DISTRIBUTION_RATIO = 3.0

# Char to FreqOrder table ,
JIS_TABLE_SIZE = 4368

JISCharToFreqOrder = (
  40,   1,   6, 182, 152, 180, 295,2127, 285, 381,3295,4304,3068,4606,3165,3510, #   16
3511,1822,2785,4607,1193,2226,5070,4608, 171,2996,1247,  18, 179,5071, 856,1661, #   32
1262,5072, 619, 127,3431,3512,3230,1899,1700, 232, 228,1294,1298, 284, 283,2041, #   48
2042,1061,1062,  48,  49,  44,  45, 433, 434,1040,1041, 996, 787,2997,1255,4305, #   64
2108,4609,1684,1648,5073,5074,5075,5076,5077,5078,3687,5079,4610,5080,3927,3928, #   80
5081,3296,3432, 290,2285,1471,2187,5082,2580,2825,1303,2140,1739,1445,2691,3375, #   96
1691,3297,4306,4307,4611, 452,3376,1182,2713,3688,3069,4308,5083,5084,5085,5086, #  112
5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102, #  128
5103,5104,5105,5106,5107,5108,5109,5110,5111,5112,4097,5113,5114,5115,5116,5117, #  144
5118,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,5130,5131,5132,5133, #  160
5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,5149, #  176
5150,5151,5152,4612,5153,5154,5155,5156,5157,5158,5159,5160,5161,5162,5163,5164, #  192
5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,1472, 598, 618, 820,1205, #  208
1309,1412,1858,1307,1692,5176,5177,5178,5179,5180,5181,5182,1142,1452,1234,1172, #  224
1875,2043,2149,1793,1382,2973, 925,2404,1067,1241, 960,1377,2935,1491, 919,1217, #  240
1865,2030,1406,1499,2749,4098,5183,5184,5185,5186,5187,5188,2561,4099,3117,1804, #  256
2049,3689,4309,3513,1663,5189,3166,3118,3298,1587,1561,3433,5190,3119,1625,2998, #  272
3299,4613,1766,3690,2786,4614,5191,5192,5193,5194,2161,  26,3377,   2,3929,  20, #  288
3691,  47,4100,  50,  17,  16,  35, 268,  27, 243,  42, 155,  24, 154,  29, 184, #  304
   4,  91,  14,  92,  53, 396,  33, 289,   9,  37,  64, 620,  21,  39, 321,   5, #  320
  12,  11,  52,  13,   3, 208, 138,   0,   7,  60, 526, 141, 151,1069, 181, 275, #  336
1591,  83, 132,1475, 126, 331, 829,  15,  69, 160,  59,  22, 157,  55,1079, 312, #  352
 109,  38,  23,  25,  10,  19,  79,5195,  61, 382,1124,   8,  30,5196,5197,5198, #  368
5199,5200,5201,5202,5203,5204,5205,5206,  89,  62,  74,  34,2416, 112, 139, 196, #  384
 271, 149,  84, 607, 131, 765,  46,  88, 153, 683,  76, 874, 101, 258,  57,  80, #  400
  32, 364, 121,1508, 169,1547,  68, 235, 145,2999,  41, 360,3027,  70,  63,  31, #  416
  43, 259, 262,1383,  99, 533, 194,  66,  93, 846, 217, 192,  56, 106,  58, 565, #  432
 280, 272, 311, 256, 146,  82, 308,  71, 100, 128, 214, 655, 110, 261, 104,1140, #  448
  54,  51,  36,  87,  67,3070, 185,2618,2936,2020,  28,1066,2390,2059,5207,5208, #  464
5209,5210,5211,5212,5213,5214,5215,5216,4615,5217,5218,5219,5220,5221,5222,5223, #  480
5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,5235,5236,3514,5237,5238, #  496
5239,5240,5241,5242,5243,5244,2297,2031,4616,4310,3692,5245,3071,5246,3598,5247, #  512
4617,3231,3515,5248,4101,4311,4618,3808,4312,4102,5249,4103,4104,3599,5250,5251, #  528
5252,5253,5254,5255,5256,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267, #  544
5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283, #  560
5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299, #  576
5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315, #  592
5316,5317,5318,5319,5320,5321,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331, #  608
5332,5333,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,5344,5345,5346,5347, #  624
5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363, #  640
5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379, #  656
5380,5381, 363, 642,2787,2878,2788,2789,2316,3232,2317,3434,2011, 165,1942,3930, #  672
3931,3932,3933,5382,4619,5383,4620,5384,5385,5386,5387,5388,5389,5390,5391,5392, #  688
5393,5394,5395,5396,5397,5398,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408, #  704
5409,5410,5411,5412,5413,5414,5415,5416,5417,5418,5419,5420,5421,5422,5423,5424, #  720
5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,5439,5440, #  736
5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456, #  752
5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472, #  768
5473,5474,5475,5476,5477,5478,5479,5480,5481,5482,5483,5484,5485,5486,5487,5488, #  784
5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504, #  800
5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520, #  816
5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536, #  832
5537,5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,5549,5550,5551,5552, #  848
5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568, #  864
5569,5570,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584, #  880
5585,5586,5587,5588,5589,5590,5591,5592,5593,5594,5595,5596,5597,5598,5599,5600, #  896
5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,5615,5616, #  912
5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632, #  928
5633,5634,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648, #  944
5649,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,5661,5662,5663,5664, #  960
5665,5666,5667,5668,5669,5670,5671,5672,5673,5674,5675,5676,5677,5678,5679,5680, #  976
5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696, #  992
5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712, # 1008
5713,5714,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724,5725,5726,5727,5728, # 1024
5729,5730,5731,5732,5733,5734,5735,5736,5737,5738,5739,5740,5741,5742,5743,5744, # 1040
5745,5746,5747,5748,5749,5750,5751,5752,5753,5754,5755,5756,5757,5758,5759,5760, # 1056
5761,5762,5763,5764,5765,5766,5767,5768,5769,5770,5771,5772,5773,5774,5775,5776, # 1072
5777,5778,5779,5780,5781,5782,5783,5784,5785,5786,5787,5788,5789,5790,5791,5792, # 1088
5793,5794,5795,5796,5797,5798,5799,5800,5801,5802,5803,5804,5805,5806,5807,5808, # 1104
5809,5810,5811,5812,5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824, # 1120
5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840, # 1136
5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856, # 1152
5857,5858,5859,5860,5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872, # 1168
5873,5874,5875,5876,5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888, # 1184
5889,5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904, # 1200
5905,5906,5907,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920, # 1216
5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936, # 1232
5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952, # 1248
5953,5954,5955,5956,5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968, # 1264
5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984, # 1280
5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000, # 1296
6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016, # 1312
6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032, # 1328
6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048, # 1344
6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064, # 1360
6065,6066,6067,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080, # 1376
6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096, # 1392
6097,6098,6099,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112, # 1408
6113,6114,2044,2060,4621, 997,1235, 473,1186,4622, 920,3378,6115,6116, 379,1108, # 1424
4313,2657,2735,3934,6117,3809, 636,3233, 573,1026,3693,3435,2974,3300,2298,4105, # 1440
 854,2937,2463, 393,2581,2417, 539, 752,1280,2750,2480, 140,1161, 440, 708,1569, # 1456
 665,2497,1746,1291,1523,3000, 164,1603, 847,1331, 537,1997, 486, 508,1693,2418, # 1472
1970,2227, 878,1220, 299,1030, 969, 652,2751, 624,1137,3301,2619,  65,3302,2045, # 1488
1761,1859,3120,1930,3694,3516, 663,1767, 852, 835,3695, 269, 767,2826,2339,1305, # 1504
 896,1150, 770,1616,6118, 506,1502,2075,1012,2519, 775,2520,2975,2340,2938,4314, # 1520
3028,2086,1224,1943,2286,6119,3072,4315,2240,1273,1987,3935,1557, 175, 597, 985, # 1536
3517,2419,2521,1416,3029, 585, 938,1931,1007,1052,1932,1685,6120,3379,4316,4623, # 1552
 804, 599,3121,1333,2128,2539,1159,1554,2032,3810, 687,2033,2904, 952, 675,1467, # 1568
3436,6121,2241,1096,1786,2440,1543,1924, 980,1813,2228, 781,2692,1879, 728,1918, # 1584
3696,4624, 548,1950,4625,1809,1088,1356,3303,2522,1944, 502, 972, 373, 513,2827, # 1600
 586,2377,2391,1003,1976,1631,6122,2464,1084, 648,1776,4626,2141, 324, 962,2012, # 1616
2177,2076,1384, 742,2178,1448,1173,1810, 222, 102, 301, 445, 125,2420, 662,2498, # 1632
 277, 200,1476,1165,1068, 224,2562,1378,1446, 450,1880, 659, 791, 582,4627,2939, # 1648
3936,1516,1274, 555,2099,3697,1020,1389,1526,3380,1762,1723,1787,2229, 412,2114, # 1664
1900,2392,3518, 512,2597, 427,1925,2341,3122,1653,1686,2465,2499, 697, 330, 273, # 1680
 380,2162, 951, 832, 780, 991,1301,3073, 965,2270,3519, 668,2523,2636,1286, 535, # 1696
1407, 518, 671, 957,2658,2378, 267, 611,2197,3030,6123, 248,2299, 967,1799,2356, # 1712
 850,1418,3437,1876,1256,1480,2828,1718,6124,6125,1755,1664,2405,6126,4628,2879, # 1728
2829, 499,2179, 676,4629, 557,2329,2214,2090, 325,3234, 464, 811,3001, 992,2342, # 1744
2481,1232,1469, 303,2242, 466,1070,2163, 603,1777,2091,4630,2752,4631,2714, 322, # 1760
2659,1964,1768, 481,2188,1463,2330,2857,3600,2092,3031,2421,4632,2318,2070,1849, # 1776
2598,4633,1302,2254,1668,1701,2422,3811,2905,3032,3123,2046,4106,1763,1694,4634, # 1792
1604, 943,1724,1454, 917, 868,2215,1169,2940, 552,1145,1800,1228,1823,1955, 316, # 1808
1080,2510, 361,1807,2830,4107,2660,3381,1346,1423,1134,4108,6127, 541,1263,1229, # 1824
1148,2540, 545, 465,1833,2880,3438,1901,3074,2482, 816,3937, 713,1788,2500, 122, # 1840
1575, 195,1451,2501,1111,6128, 859, 374,1225,2243,2483,4317, 390,1033,3439,3075, # 1856
2524,1687, 266, 793,1440,2599, 946, 779, 802, 507, 897,1081, 528,2189,1292, 711, # 1872
1866,1725,1167,1640, 753, 398,2661,1053, 246, 348,4318, 137,1024,3440,1600,2077, # 1888
2129, 825,4319, 698, 238, 521, 187,2300,1157,2423,1641,1605,1464,1610,1097,2541, # 1904
1260,1436, 759,2255,1814,2150, 705,3235, 409,2563,3304, 561,3033,2005,2564, 726, # 1920
1956,2343,3698,4109, 949,3812,3813,3520,1669, 653,1379,2525, 881,2198, 632,2256, # 1936
1027, 778,1074, 733,1957, 514,1481,2466, 554,2180, 702,3938,1606,1017,1398,6129, # 1952
1380,3521, 921, 993,1313, 594, 449,1489,1617,1166, 768,1426,1360, 495,1794,3601, # 1968
1177,3602,1170,4320,2344, 476, 425,3167,4635,3168,1424, 401,2662,1171,3382,1998, # 1984
1089,4110, 477,3169, 474,6130,1909, 596,2831,1842, 494, 693,1051,1028,1207,3076, # 2000
 606,2115, 727,2790,1473,1115, 743,3522, 630, 805,1532,4321,2021, 366,1057, 838, # 2016
 684,1114,2142,4322,2050,1492,1892,1808,2271,3814,2424,1971,1447,1373,3305,1090, # 2032
1536,3939,3523,3306,1455,2199, 336, 369,2331,1035, 584,2393, 902, 718,2600,6131, # 2048
2753, 463,2151,1149,1611,2467, 715,1308,3124,1268, 343,1413,3236,1517,1347,2663, # 2064
2093,3940,2022,1131,1553,2100,2941,1427,3441,2942,1323,2484,6132,1980, 872,2368, # 2080
2441,2943, 320,2369,2116,1082, 679,1933,3941,2791,3815, 625,1143,2023, 422,2200, # 2096
3816,6133, 730,1695, 356,2257,1626,2301,2858,2637,1627,1778, 937, 883,2906,2693, # 2112
3002,1769,1086, 400,1063,1325,3307,2792,4111,3077, 456,2345,1046, 747,6134,1524, # 2128
 884,1094,3383,1474,2164,1059, 974,1688,2181,2258,1047, 345,1665,1187, 358, 875, # 2144
3170, 305, 660,3524,2190,1334,1135,3171,1540,1649,2542,1527, 927, 968,2793, 885, # 2160
1972,1850, 482, 500,2638,1218,1109,1085,2543,1654,2034, 876,  78,2287,1482,1277, # 2176
 861,1675,1083,1779, 724,2754, 454, 397,1132,1612,2332, 893, 672,1237, 257,2259, # 2192
2370, 135,3384, 337,2244, 547, 352, 340, 709,2485,1400, 788,1138,2511, 540, 772, # 2208
1682,2260,2272,2544,2013,1843,1902,4636,1999,1562,2288,4637,2201,1403,1533, 407, # 2224
 576,3308,1254,2071, 978,3385, 170, 136,1201,3125,2664,3172,2394, 213, 912, 873, # 2240
3603,1713,2202, 699,3604,3699, 813,3442, 493, 531,1054, 468,2907,1483, 304, 281, # 2256
4112,1726,1252,2094, 339,2319,2130,2639, 756,1563,2944, 748, 571,2976,1588,2425, # 2272
2715,1851,1460,2426,1528,1392,1973,3237, 288,3309, 685,3386, 296, 892,2716,2216, # 2288
1570,2245, 722,1747,2217, 905,3238,1103,6135,1893,1441,1965, 251,1805,2371,3700, # 2304
2601,1919,1078,  75,2182,1509,1592,1270,2640,4638,2152,6136,3310,3817, 524, 706, # 2320
1075, 292,3818,1756,2602, 317,  98,3173,3605,3525,1844,2218,3819,2502, 814, 567, # 2336
 385,2908,1534,6137, 534,1642,3239, 797,6138,1670,1529, 953,4323, 188,1071, 538, # 2352
 178, 729,3240,2109,1226,1374,2000,2357,2977, 731,2468,1116,2014,2051,6139,1261, # 2368
1593, 803,2859,2736,3443, 556, 682, 823,1541,6140,1369,2289,1706,2794, 845, 462, # 2384
2603,2665,1361, 387, 162,2358,1740, 739,1770,1720,1304,1401,3241,1049, 627,1571, # 2400
2427,3526,1877,3942,1852,1500, 431,1910,1503, 677, 297,2795, 286,1433,1038,1198, # 2416
2290,1133,1596,4113,4639,2469,1510,1484,3943,6141,2442, 108, 712,4640,2372, 866, # 2432
3701,2755,3242,1348, 834,1945,1408,3527,2395,3243,1811, 824, 994,1179,2110,1548, # 2448
1453, 790,3003, 690,4324,4325,2832,2909,3820,1860,3821, 225,1748, 310, 346,1780, # 2464
2470, 821,1993,2717,2796, 828, 877,3528,2860,2471,1702,2165,2910,2486,1789, 453, # 2480
 359,2291,1676,  73,1164,1461,1127,3311, 421, 604, 314,1037, 589, 116,2487, 737, # 2496
 837,1180, 111, 244, 735,6142,2261,1861,1362, 986, 523, 418, 581,2666,3822, 103, # 2512
 855, 503,1414,1867,2488,1091, 657,1597, 979, 605,1316,4641,1021,2443,2078,2001, # 2528
1209,  96, 587,2166,1032, 260,1072,2153, 173,  94, 226,3244, 819,2006,4642,4114, # 2544
2203, 231,1744, 782,  97,2667, 786,3387, 887, 391, 442,2219,4326,1425,6143,2694, # 2560
 633,1544,1202, 483,2015, 592,2052,1958,2472,1655, 419, 129,4327,3444,3312,1714, # 2576
1257,3078,4328,1518,1098, 865,1310,1019,1885,1512,1734, 469,2444, 148, 773, 436, # 2592
1815,1868,1128,1055,4329,1245,2756,3445,2154,1934,1039,4643, 579,1238, 932,2320, # 2608
 353, 205, 801, 115,2428, 944,2321,1881, 399,2565,1211, 678, 766,3944, 335,2101, # 2624
1459,1781,1402,3945,2737,2131,1010, 844, 981,1326,1013, 550,1816,1545,2620,1335, # 2640
1008, 371,2881, 936,1419,1613,3529,1456,1395,2273,1834,2604,1317,2738,2503, 416, # 2656
1643,4330, 806,1126, 229, 591,3946,1314,1981,1576,1837,1666, 347,1790, 977,3313, # 2672
 764,2861,1853, 688,2429,1920,1462,  77, 595, 415,2002,3034, 798,1192,4115,6144, # 2688
2978,4331,3035,2695,2582,2072,2566, 430,2430,1727, 842,1396,3947,3702, 613, 377, # 2704
 278, 236,1417,3388,3314,3174, 757,1869, 107,3530,6145,1194, 623,2262, 207,1253, # 2720
2167,3446,3948, 492,1117,1935, 536,1838,2757,1246,4332, 696,2095,2406,1393,1572, # 2736
3175,1782, 583, 190, 253,1390,2230, 830,3126,3389, 934,3245,1703,1749,2979,1870, # 2752
2545,1656,2204, 869,2346,4116,3176,1817, 496,1764,4644, 942,1504, 404,1903,1122, # 2768
1580,3606,2945,1022, 515, 372,1735, 955,2431,3036,6146,2797,1110,2302,2798, 617, # 2784
6147, 441, 762,1771,3447,3607,3608,1904, 840,3037,  86, 939,1385, 572,1370,2445, # 2800
1336, 114,3703, 898, 294, 203,3315, 703,1583,2274, 429, 961,4333,1854,1951,3390, # 2816
2373,3704,4334,1318,1381, 966,1911,2322,1006,1155, 309, 989, 458,2718,1795,1372, # 2832
1203, 252,1689,1363,3177, 517,1936, 168,1490, 562, 193,3823,1042,4117,1835, 551, # 2848
 470,4645, 395, 489,3448,1871,1465,2583,2641, 417,1493, 279,1295, 511,1236,1119, # 2864
  72,1231,1982,1812,3004, 871,1564, 984,3449,1667,2696,2096,4646,2347,2833,1673, # 2880
3609, 695,3246,2668, 807,1183,4647, 890, 388,2333,1801,1457,2911,1765,1477,1031, # 2896
3316,3317,1278,3391,2799,2292,2526, 163,3450,4335,2669,1404,1802,6148,2323,2407, # 2912
1584,1728,1494,1824,1269, 298, 909,3318,1034,1632, 375, 776,1683,2061, 291, 210, # 2928
1123, 809,1249,1002,2642,3038, 206,1011,2132, 144, 975, 882,1565, 342, 667, 754, # 2944
1442,2143,1299,2303,2062, 447, 626,2205,1221,2739,2912,1144,1214,2206,2584, 760, # 2960
1715, 614, 950,1281,2670,2621, 810, 577,1287,2546,4648, 242,2168, 250,2643, 691, # 2976
 123,2644, 647, 313,1029, 689,1357,2946,1650, 216, 771,1339,1306, 808,2063, 549, # 2992
 913,1371,2913,2914,6149,1466,1092,1174,1196,1311,2605,2396,1783,1796,3079, 406, # 3008
2671,2117,3949,4649, 487,1825,2220,6150,2915, 448,2348,1073,6151,2397,1707, 130, # 3024
 900,1598, 329, 176,1959,2527,1620,6152,2275,4336,3319,1983,2191,3705,3610,2155, # 3040
3706,1912,1513,1614,6153,1988, 646, 392,2304,1589,3320,3039,1826,1239,1352,1340, # 3056
2916, 505,2567,1709,1437,2408,2547, 906,6154,2672, 384,1458,1594,1100,1329, 710, # 3072
 423,3531,2064,2231,2622,1989,2673,1087,1882, 333, 841,3005,1296,2882,2379, 580, # 3088
1937,1827,1293,2585, 601, 574, 249,1772,4118,2079,1120, 645, 901,1176,1690, 795, # 3104
2207, 478,1434, 516,1190,1530, 761,2080, 930,1264, 355, 435,1552, 644,1791, 987, # 3120
 220,1364,1163,1121,1538, 306,2169,1327,1222, 546,2645, 218, 241, 610,1704,3321, # 3136
1984,1839,1966,2528, 451,6155,2586,3707,2568, 907,3178, 254,2947, 186,1845,4650, # 3152
 745, 432,1757, 428,1633, 888,2246,2221,2489,3611,2118,1258,1265, 956,3127,1784, # 3168
4337,2490, 319, 510, 119, 457,3612, 274,2035,2007,4651,1409,3128, 970,2758, 590, # 3184
2800, 661,2247,4652,2008,3950,1420,1549,3080,3322,3951,1651,1375,2111, 485,2491, # 3200
1429,1156,6156,2548,2183,1495, 831,1840,2529,2446, 501,1657, 307,1894,3247,1341, # 3216
 666, 899,2156,1539,2549,1559, 886, 349,2208,3081,2305,1736,3824,2170,2759,1014, # 3232
1913,1386, 542,1397,2948, 490, 368, 716, 362, 159, 282,2569,1129,1658,1288,1750, # 3248
2674, 276, 649,2016, 751,1496, 658,1818,1284,1862,2209,2087,2512,3451, 622,2834, # 3264
 376, 117,1060,2053,1208,1721,1101,1443, 247,1250,3179,1792,3952,2760,2398,3953, # 3280
6157,2144,3708, 446,2432,1151,2570,3452,2447,2761,2835,1210,2448,3082, 424,2222, # 3296
1251,2449,2119,2836, 504,1581,4338, 602, 817, 857,3825,2349,2306, 357,3826,1470, # 3312
1883,2883, 255, 958, 929,2917,3248, 302,4653,1050,1271,1751,2307,1952,1430,2697, # 3328
2719,2359, 354,3180, 777, 158,2036,4339,1659,4340,4654,2308,2949,2248,1146,2232, # 3344
3532,2720,1696,2623,3827,6158,3129,1550,2698,1485,1297,1428, 637, 931,2721,2145, # 3360
 914,2550,2587,  81,2450, 612, 827,2646,1242,4655,1118,2884, 472,1855,3181,3533, # 3376
3534, 569,1353,2699,1244,1758,2588,4119,2009,2762,2171,3709,1312,1531,6159,1152, # 3392
1938, 134,1830, 471,3710,2276,1112,1535,3323,3453,3535, 982,1337,2950, 488, 826, # 3408
 674,1058,1628,4120,2017, 522,2399, 211, 568,1367,3454, 350, 293,1872,1139,3249, # 3424
1399,1946,3006,1300,2360,3324, 588, 736,6160,2606, 744, 669,3536,3828,6161,1358, # 3440
 199, 723, 848, 933, 851,1939,1505,1514,1338,1618,1831,4656,1634,3613, 443,2740, # 3456
3829, 717,1947, 491,1914,6162,2551,1542,4121,1025,6163,1099,1223, 198,3040,2722, # 3472
 370, 410,1905,2589, 998,1248,3182,2380, 519,1449,4122,1710, 947, 928,1153,4341, # 3488
2277, 344,2624,1511, 615, 105, 161,1212,1076,1960,3130,2054,1926,1175,1906,2473, # 3504
 414,1873,2801,6164,2309, 315,1319,3325, 318,2018,2146,2157, 963, 631, 223,4342, # 3520
4343,2675, 479,3711,1197,2625,3712,2676,2361,6165,4344,4123,6166,2451,3183,1886, # 3536
2184,1674,1330,1711,1635,1506, 799, 219,3250,3083,3954,1677,3713,3326,2081,3614, # 3552
1652,2073,4657,1147,3041,1752, 643,1961, 147,1974,3955,6167,1716,2037, 918,3007, # 3568
1994, 120,1537, 118, 609,3184,4345, 740,3455,1219, 332,1615,3830,6168,1621,2980, # 3584
1582, 783, 212, 553,2350,3714,1349,2433,2082,4124, 889,6169,2310,1275,1410, 973, # 3600
 166,1320,3456,1797,1215,3185,2885,1846,2590,2763,4658, 629, 822,3008, 763, 940, # 3616
1990,2862, 439,2409,1566,1240,1622, 926,1282,1907,2764, 654,2210,1607, 327,1130, # 3632
3956,1678,1623,6170,2434,2192, 686, 608,3831,3715, 903,3957,3042,6171,2741,1522, # 3648
1915,1105,1555,2552,1359, 323,3251,4346,3457, 738,1354,2553,2311,2334,1828,2003, # 3664
3832,1753,2351,1227,6172,1887,4125,1478,6173,2410,1874,1712,1847, 520,1204,2607, # 3680
 264,4659, 836,2677,2102, 600,4660,3833,2278,3084,6174,4347,3615,1342, 640, 532, # 3696
 543,2608,1888,2400,2591,1009,4348,1497, 341,1737,3616,2723,1394, 529,3252,1321, # 3712
 983,4661,1515,2120, 971,2592, 924, 287,1662,3186,4349,2700,4350,1519, 908,1948, # 3728
2452, 156, 796,1629,1486,2223,2055, 694,4126,1259,1036,3392,1213,2249,2742,1889, # 3744
1230,3958,1015, 910, 408, 559,3617,4662, 746, 725, 935,4663,3959,3009,1289, 563, # 3760
 867,4664,3960,1567,2981,2038,2626, 988,2263,2381,4351, 143,2374, 704,1895,6175, # 3776
1188,3716,2088, 673,3085,2362,4352, 484,1608,1921,2765,2918, 215, 904,3618,3537, # 3792
 894, 509, 976,3043,2701,3961,4353,2837,2982, 498,6176,6177,1102,3538,1332,3393, # 3808
1487,1636,1637, 233, 245,3962, 383, 650, 995,3044, 460,1520,1206,2352, 749,3327, # 3824
 530, 700, 389,1438,1560,1773,3963,2264, 719,2951,2724,3834, 870,1832,1644,1000, # 3840
 839,2474,3717, 197,1630,3394, 365,2886,3964,1285,2133, 734, 922, 818,1106, 732, # 3856
 480,2083,1774,3458, 923,2279,1350, 221,3086,  85,2233,2234,3835,1585,3010,2147, # 3872
1387,1705,2382,1619,2475, 133, 239,2802,1991,1016,2084,2383, 411,2838,1113, 651, # 3888
1985,1160,3328, 990,1863,3087,1048,1276,2647, 265,2627,1599,3253,2056, 150, 638, # 3904
2019, 656, 853, 326,1479, 680,1439,4354,1001,1759, 413,3459,3395,2492,1431, 459, # 3920
4355,1125,3329,2265,1953,1450,2065,2863, 849, 351,2678,3131,3254,3255,1104,1577, # 3936
 227,1351,1645,2453,2193,1421,2887, 812,2121, 634,  95,2435, 201,2312,4665,1646, # 3952
1671,2743,1601,2554,2702,2648,2280,1315,1366,2089,3132,1573,3718,3965,1729,1189, # 3968
 328,2679,1077,1940,1136, 558,1283, 964,1195, 621,2074,1199,1743,3460,3619,1896, # 3984
1916,1890,3836,2952,1154,2112,1064, 862, 378,3011,2066,2113,2803,1568,2839,6178, # 4000
3088,2919,1941,1660,2004,1992,2194, 142, 707,1590,1708,1624,1922,1023,1836,1233, # 4016
1004,2313, 789, 741,3620,6179,1609,2411,1200,4127,3719,3720,4666,2057,3721, 593, # 4032
2840, 367,2920,1878,6180,3461,1521, 628,1168, 692,2211,2649, 300, 720,2067,2571, # 4048
2953,3396, 959,2504,3966,3539,3462,1977, 701,6181, 954,1043, 800, 681, 183,3722, # 4064
1803,1730,3540,4128,2103, 815,2314, 174, 467, 230,2454,1093,2134, 755,3541,3397, # 4080
1141,1162,6182,1738,2039, 270,3256,2513,1005,1647,2185,3837, 858,1679,1897,1719, # 4096
2954,2324,1806, 402, 670, 167,4129,1498,2158,2104, 750,6183, 915, 189,1680,1551, # 4112
 455,4356,1501,2455, 405,1095,2955, 338,1586,1266,1819, 570, 641,1324, 237,1556, # 4128
2650,1388,3723,6184,1368,2384,1343,1978,3089,2436, 879,3724, 792,1191, 758,3012, # 4144
1411,2135,1322,4357, 240,4667,1848,3725,1574,6185, 420,3045,1546,1391, 714,4358, # 4160
1967, 941,1864, 863, 664, 426, 560,1731,2680,1785,2864,1949,2363, 403,3330,1415, # 4176
1279,2136,1697,2335, 204, 721,2097,3838,  90,6186,2085,2505, 191,3967, 124,2148, # 4192
1376,1798,1178,1107,1898,1405, 860,4359,1243,1272,2375,2983,1558,2456,1638, 113, # 4208
3621, 578,1923,2609, 880, 386,4130, 784,2186,2266,1422,2956,2172,1722, 497, 263, # 4224
2514,1267,2412,2610, 177,2703,3542, 774,1927,1344, 616,1432,1595,1018, 172,4360, # 4240
2325, 911,4361, 438,1468,3622, 794,3968,2024,2173,1681,1829,2957, 945, 895,3090, # 4256
 575,2212,2476, 475,2401,2681, 785,2744,1745,2293,2555,1975,3133,2865, 394,4668, # 4272
3839, 635,4131, 639, 202,1507,2195,2766,1345,1435,2572,3726,1908,1184,1181,2457, # 4288
3727,3134,4362, 843,2611, 437, 916,4669, 234, 769,1884,3046,3047,3623, 833,6187, # 4304
1639,2250,2402,1355,1185,2010,2047, 999, 525,1732,1290,1488,2612, 948,1578,3728, # 4320
2413,2477,1216,2725,2159, 334,3840,1328,3624,2921,1525,4132, 564,1056, 891,4363, # 4336
1444,1698,2385,2251,3729,1365,2281,2235,1717,6188, 864,3841,2515, 444, 527,2767, # 4352
2922,3625, 544, 461,6189, 566, 209,2437,3398,2098,1065,2068,3331,3626,3257,2137, # 4368  #last 512
#Everything below is of no interest for detection purpose
2138,2122,3730,2888,1995,1820,1044,6190,6191,6192,6193,6194,6195,6196,6197,6198, # 4384
6199,6200,6201,6202,6203,6204,6205,4670,6206,6207,6208,6209,6210,6211,6212,6213, # 4400
6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,6224,6225,6226,6227,6228,6229, # 4416
6230,6231,6232,6233,6234,6235,6236,6237,3187,6238,6239,3969,6240,6241,6242,6243, # 4432
6244,4671,6245,6246,4672,6247,6248,4133,6249,6250,4364,6251,2923,2556,2613,4673, # 4448
4365,3970,6252,6253,6254,6255,4674,6256,6257,6258,2768,2353,4366,4675,4676,3188, # 4464
4367,3463,6259,4134,4677,4678,6260,2267,6261,3842,3332,4368,3543,6262,6263,6264, # 4480
3013,1954,1928,4135,4679,6265,6266,2478,3091,6267,4680,4369,6268,6269,1699,6270, # 4496
3544,4136,4681,6271,4137,6272,4370,2804,6273,6274,2593,3971,3972,4682,6275,2236, # 4512
4683,6276,6277,4684,6278,6279,4138,3973,4685,6280,6281,3258,6282,6283,6284,6285, # 4528
3974,4686,2841,3975,6286,6287,3545,6288,6289,4139,4687,4140,6290,4141,6291,4142, # 4544
6292,6293,3333,6294,6295,6296,4371,6297,3399,6298,6299,4372,3976,6300,6301,6302, # 4560
4373,6303,6304,3843,3731,6305,4688,4374,6306,6307,3259,2294,6308,3732,2530,4143, # 4576
6309,4689,6310,6311,6312,3048,6313,6314,4690,3733,2237,6315,6316,2282,3334,6317, # 4592
6318,3844,6319,6320,4691,6321,3400,4692,6322,4693,6323,3049,6324,4375,6325,3977, # 4608
6326,6327,6328,3546,6329,4694,3335,6330,4695,4696,6331,6332,6333,6334,4376,3978, # 4624
6335,4697,3979,4144,6336,3980,4698,6337,6338,6339,6340,6341,4699,4700,4701,6342, # 4640
6343,4702,6344,6345,4703,6346,6347,4704,6348,4705,4706,3135,6349,4707,6350,4708, # 4656
6351,4377,6352,4709,3734,4145,6353,2506,4710,3189,6354,3050,4711,3981,6355,3547, # 4672
3014,4146,4378,3735,2651,3845,3260,3136,2224,1986,6356,3401,6357,4712,2594,3627, # 4688
3137,2573,3736,3982,4713,3628,4714,4715,2682,3629,4716,6358,3630,4379,3631,6359, # 4704
6360,6361,3983,6362,6363,6364,6365,4147,3846,4717,6366,6367,3737,2842,6368,4718, # 4720
2628,6369,3261,6370,2386,6371,6372,3738,3984,4719,3464,4720,3402,6373,2924,3336, # 4736
4148,2866,6374,2805,3262,4380,2704,2069,2531,3138,2806,2984,6375,2769,6376,4721, # 4752
4722,3403,6377,6378,3548,6379,6380,2705,3092,1979,4149,2629,3337,2889,6381,3338, # 4768
4150,2557,3339,4381,6382,3190,3263,3739,6383,4151,4723,4152,2558,2574,3404,3191, # 4784
6384,6385,4153,6386,4724,4382,6387,6388,4383,6389,6390,4154,6391,4725,3985,6392, # 4800
3847,4155,6393,6394,6395,6396,6397,3465,6398,4384,6399,6400,6401,6402,6403,6404, # 4816
4156,6405,6406,6407,6408,2123,6409,6410,2326,3192,4726,6411,6412,6413,6414,4385, # 4832
4157,6415,6416,4158,6417,3093,3848,6418,3986,6419,6420,3849,6421,6422,6423,4159, # 4848
6424,6425,4160,6426,3740,6427,6428,6429,6430,3987,6431,4727,6432,2238,6433,6434, # 4864
4386,3988,6435,6436,3632,6437,6438,2843,6439,6440,6441,6442,3633,6443,2958,6444, # 4880
6445,3466,6446,2364,4387,3850,6447,4388,2959,3340,6448,3851,6449,4728,6450,6451, # 4896
3264,4729,6452,3193,6453,4389,4390,2706,3341,4730,6454,3139,6455,3194,6456,3051, # 4912
2124,3852,1602,4391,4161,3853,1158,3854,4162,3989,4392,3990,4731,4732,4393,2040, # 4928
4163,4394,3265,6457,2807,3467,3855,6458,6459,6460,3991,3468,4733,4734,6461,3140, # 4944
2960,6462,4735,6463,6464,6465,6466,4736,4737,4738,4739,6467,6468,4164,2403,3856, # 4960
6469,6470,2770,2844,6471,4740,6472,6473,6474,6475,6476,6477,6478,3195,6479,4741, # 4976
4395,6480,2867,6481,4742,2808,6482,2493,4165,6483,6484,6485,6486,2295,4743,6487, # 4992
6488,6489,3634,6490,6491,6492,6493,6494,6495,6496,2985,4744,6497,6498,4745,6499, # 5008
6500,2925,3141,4166,6501,6502,4746,6503,6504,4747,6505,6506,6507,2890,6508,6509, # 5024
6510,6511,6512,6513,6514,6515,6516,6517,6518,6519,3469,4167,6520,6521,6522,4748, # 5040
4396,3741,4397,4749,4398,3342,2125,4750,6523,4751,4752,4753,3052,6524,2961,4168, # 5056
6525,4754,6526,4755,4399,2926,4169,6527,3857,6528,4400,4170,6529,4171,6530,6531, # 5072
2595,6532,6533,6534,6535,3635,6536,6537,6538,6539,6540,6541,6542,4756,6543,6544, # 5088
6545,6546,6547,6548,4401,6549,6550,6551,6552,4402,3405,4757,4403,6553,6554,6555, # 5104
4172,3742,6556,6557,6558,3992,3636,6559,6560,3053,2726,6561,3549,4173,3054,4404, # 5120
6562,6563,3993,4405,3266,3550,2809,4406,6564,6565,6566,4758,4759,6567,3743,6568, # 5136
4760,3744,4761,3470,6569,6570,6571,4407,6572,3745,4174,6573,4175,2810,4176,3196, # 5152
4762,6574,4177,6575,6576,2494,2891,3551,6577,6578,3471,6579,4408,6580,3015,3197, # 5168
6581,3343,2532,3994,3858,6582,3094,3406,4409,6583,2892,4178,4763,4410,3016,4411, # 5184
6584,3995,3142,3017,2683,6585,4179,6586,6587,4764,4412,6588,6589,4413,6590,2986, # 5200
6591,2962,3552,6592,2963,3472,6593,6594,4180,4765,6595,6596,2225,3267,4414,6597, # 5216
3407,3637,4766,6598,6599,3198,6600,4415,6601,3859,3199,6602,3473,4767,2811,4416, # 5232
1856,3268,3200,2575,3996,3997,3201,4417,6603,3095,2927,6604,3143,6605,2268,6606, # 5248
3998,3860,3096,2771,6607,6608,3638,2495,4768,6609,3861,6610,3269,2745,4769,4181, # 5264
3553,6611,2845,3270,6612,6613,6614,3862,6615,6616,4770,4771,6617,3474,3999,4418, # 5280
4419,6618,3639,3344,6619,4772,4182,6620,2126,6621,6622,6623,4420,4773,6624,3018, # 5296
6625,4774,3554,6626,4183,2025,3746,6627,4184,2707,6628,4421,4422,3097,1775,4185, # 5312
3555,6629,6630,2868,6631,6632,4423,6633,6634,4424,2414,2533,2928,6635,4186,2387, # 5328
6636,4775,6637,4187,6638,1891,4425,3202,3203,6639,6640,4776,6641,3345,6642,6643, # 5344
3640,6644,3475,3346,3641,4000,6645,3144,6646,3098,2812,4188,3642,3204,6647,3863, # 5360
3476,6648,3864,6649,4426,4001,6650,6651,6652,2576,6653,4189,4777,6654,6655,6656, # 5376
2846,6657,3477,3205,4002,6658,4003,6659,3347,2252,6660,6661,6662,4778,6663,6664, # 5392
6665,6666,6667,6668,6669,4779,4780,2048,6670,3478,3099,6671,3556,3747,4004,6672, # 5408
6673,6674,3145,4005,3748,6675,6676,6677,6678,6679,3408,6680,6681,6682,6683,3206, # 5424
3207,6684,6685,4781,4427,6686,4782,4783,4784,6687,6688,6689,4190,6690,6691,3479, # 5440
6692,2746,6693,4428,6694,6695,6696,6697,6698,6699,4785,6700,6701,3208,2727,6702, # 5456
3146,6703,6704,3409,2196,6705,4429,6706,6707,6708,2534,1996,6709,6710,6711,2747, # 5472
6712,6713,6714,4786,3643,6715,4430,4431,6716,3557,6717,4432,4433,6718,6719,6720, # 5488
6721,3749,6722,4006,4787,6723,6724,3644,4788,4434,6725,6726,4789,2772,6727,6728, # 5504
6729,6730,6731,2708,3865,2813,4435,6732,6733,4790,4791,3480,6734,6735,6736,6737, # 5520
4436,3348,6738,3410,4007,6739,6740,4008,6741,6742,4792,3411,4191,6743,6744,6745, # 5536
6746,6747,3866,6748,3750,6749,6750,6751,6752,6753,6754,6755,3867,6756,4009,6757, # 5552
4793,4794,6758,2814,2987,6759,6760,6761,4437,6762,6763,6764,6765,3645,6766,6767, # 5568
3481,4192,6768,3751,6769,6770,2174,6771,3868,3752,6772,6773,6774,4193,4795,4438, # 5584
3558,4796,4439,6775,4797,6776,6777,4798,6778,4799,3559,4800,6779,6780,6781,3482, # 5600
6782,2893,6783,6784,4194,4801,4010,6785,6786,4440,6787,4011,6788,6789,6790,6791, # 5616
6792,6793,4802,6794,6795,6796,4012,6797,6798,6799,6800,3349,4803,3483,6801,4804, # 5632
4195,6802,4013,6803,6804,4196,6805,4014,4015,6806,2847,3271,2848,6807,3484,6808, # 5648
6809,6810,4441,6811,4442,4197,4443,3272,4805,6812,3412,4016,1579,6813,6814,4017, # 5664
6815,3869,6816,2964,6817,4806,6818,6819,4018,3646,6820,6821,4807,4019,4020,6822, # 5680
6823,3560,6824,6825,4021,4444,6826,4198,6827,6828,4445,6829,6830,4199,4808,6831, # 5696
6832,6833,3870,3019,2458,6834,3753,3413,3350,6835,4809,3871,4810,3561,4446,6836, # 5712
6837,4447,4811,4812,6838,2459,4448,6839,4449,6840,6841,4022,3872,6842,4813,4814, # 5728
6843,6844,4815,4200,4201,4202,6845,4023,6846,6847,4450,3562,3873,6848,6849,4816, # 5744
4817,6850,4451,4818,2139,6851,3563,6852,6853,3351,6854,6855,3352,4024,2709,3414, # 5760
4203,4452,6856,4204,6857,6858,3874,3875,6859,6860,4819,6861,6862,6863,6864,4453, # 5776
3647,6865,6866,4820,6867,6868,6869,6870,4454,6871,2869,6872,6873,4821,6874,3754, # 5792
6875,4822,4205,6876,6877,6878,3648,4206,4455,6879,4823,6880,4824,3876,6881,3055, # 5808
4207,6882,3415,6883,6884,6885,4208,4209,6886,4210,3353,6887,3354,3564,3209,3485, # 5824
2652,6888,2728,6889,3210,3755,6890,4025,4456,6891,4825,6892,6893,6894,6895,4211, # 5840
6896,6897,6898,4826,6899,6900,4212,6901,4827,6902,2773,3565,6903,4828,6904,6905, # 5856
6906,6907,3649,3650,6908,2849,3566,6909,3567,3100,6910,6911,6912,6913,6914,6915, # 5872
4026,6916,3355,4829,3056,4457,3756,6917,3651,6918,4213,3652,2870,6919,4458,6920, # 5888
2438,6921,6922,3757,2774,4830,6923,3356,4831,4832,6924,4833,4459,3653,2507,6925, # 5904
4834,2535,6926,6927,3273,4027,3147,6928,3568,6929,6930,6931,4460,6932,3877,4461, # 5920
2729,3654,6933,6934,6935,6936,2175,4835,2630,4214,4028,4462,4836,4215,6937,3148, # 5936
4216,4463,4837,4838,4217,6938,6939,2850,4839,6940,4464,6941,6942,6943,4840,6944, # 5952
4218,3274,4465,6945,6946,2710,6947,4841,4466,6948,6949,2894,6950,6951,4842,6952, # 5968
4219,3057,2871,6953,6954,6955,6956,4467,6957,2711,6958,6959,6960,3275,3101,4843, # 5984
6961,3357,3569,6962,4844,6963,6964,4468,4845,3570,6965,3102,4846,3758,6966,4847, # 6000
3878,4848,4849,4029,6967,2929,3879,4850,4851,6968,6969,1733,6970,4220,6971,6972, # 6016
6973,6974,6975,6976,4852,6977,6978,6979,6980,6981,6982,3759,6983,6984,6985,3486, # 6032
3487,6986,3488,3416,6987,6988,6989,6990,6991,6992,6993,6994,6995,6996,6997,4853, # 6048
6998,6999,4030,7000,7001,3211,7002,7003,4221,7004,7005,3571,4031,7006,3572,7007, # 6064
2614,4854,2577,7008,7009,2965,3655,3656,4855,2775,3489,3880,4222,4856,3881,4032, # 6080
3882,3657,2730,3490,4857,7010,3149,7011,4469,4858,2496,3491,4859,2283,7012,7013, # 6096
7014,2365,4860,4470,7015,7016,3760,7017,7018,4223,1917,7019,7020,7021,4471,7022, # 6112
2776,4472,7023,7024,7025,7026,4033,7027,3573,4224,4861,4034,4862,7028,7029,1929, # 6128
3883,4035,7030,4473,3058,7031,2536,3761,3884,7032,4036,7033,2966,2895,1968,4474, # 6144
3276,4225,3417,3492,4226,2105,7034,7035,1754,2596,3762,4227,4863,4475,3763,4864, # 6160
3764,2615,2777,3103,3765,3658,3418,4865,2296,3766,2815,7036,7037,7038,3574,2872, # 6176
3277,4476,7039,4037,4477,7040,7041,4038,7042,7043,7044,7045,7046,7047,2537,7048, # 6192
7049,7050,7051,7052,7053,7054,4478,7055,7056,3767,3659,4228,3575,7057,7058,4229, # 6208
7059,7060,7061,3660,7062,3212,7063,3885,4039,2460,7064,7065,7066,7067,7068,7069, # 6224
7070,7071,7072,7073,7074,4866,3768,4867,7075,7076,7077,7078,4868,3358,3278,2653, # 6240
7079,7080,4479,3886,7081,7082,4869,7083,7084,7085,7086,7087,7088,2538,7089,7090, # 6256
7091,4040,3150,3769,4870,4041,2896,3359,4230,2930,7092,3279,7093,2967,4480,3213, # 6272
4481,3661,7094,7095,7096,7097,7098,7099,7100,7101,7102,2461,3770,7103,7104,4231, # 6288
3151,7105,7106,7107,4042,3662,7108,7109,4871,3663,4872,4043,3059,7110,7111,7112, # 6304
3493,2988,7113,4873,7114,7115,7116,3771,4874,7117,7118,4232,4875,7119,3576,2336, # 6320
4876,7120,4233,3419,4044,4877,4878,4482,4483,4879,4484,4234,7121,3772,4880,1045, # 6336
3280,3664,4881,4882,7122,7123,7124,7125,4883,7126,2778,7127,4485,4486,7128,4884, # 6352
3214,3887,7129,7130,3215,7131,4885,4045,7132,7133,4046,7134,7135,7136,7137,7138, # 6368
7139,7140,7141,7142,7143,4235,7144,4886,7145,7146,7147,4887,7148,7149,7150,4487, # 6384
4047,4488,7151,7152,4888,4048,2989,3888,7153,3665,7154,4049,7155,7156,7157,7158, # 6400
7159,7160,2931,4889,4890,4489,7161,2631,3889,4236,2779,7162,7163,4891,7164,3060, # 6416
7165,1672,4892,7166,4893,4237,3281,4894,7167,7168,3666,7169,3494,7170,7171,4050, # 6432
7172,7173,3104,3360,3420,4490,4051,2684,4052,7174,4053,7175,7176,7177,2253,4054, # 6448
7178,7179,4895,7180,3152,3890,3153,4491,3216,7181,7182,7183,2968,4238,4492,4055, # 6464
7184,2990,7185,2479,7186,7187,4493,7188,7189,7190,7191,7192,4896,7193,4897,2969, # 6480
4494,4898,7194,3495,7195,7196,4899,4495,7197,3105,2731,7198,4900,7199,7200,7201, # 6496
4056,7202,3361,7203,7204,4496,4901,4902,7205,4497,7206,7207,2315,4903,7208,4904, # 6512
7209,4905,2851,7210,7211,3577,7212,3578,4906,7213,4057,3667,4907,7214,4058,2354, # 6528
3891,2376,3217,3773,7215,7216,7217,7218,7219,4498,7220,4908,3282,2685,7221,3496, # 6544
4909,2632,3154,4910,7222,2337,7223,4911,7224,7225,7226,4912,4913,3283,4239,4499, # 6560
7227,2816,7228,7229,7230,7231,7232,7233,7234,4914,4500,4501,7235,7236,7237,2686, # 6576
7238,4915,7239,2897,4502,7240,4503,7241,2516,7242,4504,3362,3218,7243,7244,7245, # 6592
4916,7246,7247,4505,3363,7248,7249,7250,7251,3774,4506,7252,7253,4917,7254,7255, # 6608
3284,2991,4918,4919,3219,3892,4920,3106,3497,4921,7256,7257,7258,4922,7259,4923, # 6624
3364,4507,4508,4059,7260,4240,3498,7261,7262,4924,7263,2992,3893,4060,3220,7264, # 6640
7265,7266,7267,7268,7269,4509,3775,7270,2817,7271,4061,4925,4510,3776,7272,4241, # 6656
4511,3285,7273,7274,3499,7275,7276,7277,4062,4512,4926,7278,3107,3894,7279,7280, # 6672
4927,7281,4513,7282,7283,3668,7284,7285,4242,4514,4243,7286,2058,4515,4928,4929, # 6688
4516,7287,3286,4244,7288,4517,7289,7290,7291,3669,7292,7293,4930,4931,4932,2355, # 6704
4933,7294,2633,4518,7295,4245,7296,7297,4519,7298,7299,4520,4521,4934,7300,4246, # 6720
4522,7301,7302,7303,3579,7304,4247,4935,7305,4936,7306,7307,7308,7309,3777,7310, # 6736
4523,7311,7312,7313,4248,3580,7314,4524,3778,4249,7315,3581,7316,3287,7317,3221, # 6752
7318,4937,7319,7320,7321,7322,7323,7324,4938,4939,7325,4525,7326,7327,7328,4063, # 6768
7329,7330,4940,7331,7332,4941,7333,4526,7334,3500,2780,1741,4942,2026,1742,7335, # 6784
7336,3582,4527,2388,7337,7338,7339,4528,7340,4250,4943,7341,7342,7343,4944,7344, # 6800
7345,7346,3020,7347,4945,7348,7349,7350,7351,3895,7352,3896,4064,3897,7353,7354, # 6816
7355,4251,7356,7357,3898,7358,3779,7359,3780,3288,7360,7361,4529,7362,4946,4530, # 6832
2027,7363,3899,4531,4947,3222,3583,7364,4948,7365,7366,7367,7368,4949,3501,4950, # 6848
3781,4951,4532,7369,2517,4952,4252,4953,3155,7370,4954,4955,4253,2518,4533,7371, # 6864
7372,2712,4254,7373,7374,7375,3670,4956,3671,7376,2389,3502,4065,7377,2338,7378, # 6880
7379,7380,7381,3061,7382,4957,7383,7384,7385,7386,4958,4534,7387,7388,2993,7389, # 6896
3062,7390,4959,7391,7392,7393,4960,3108,4961,7394,4535,7395,4962,3421,4536,7396, # 6912
4963,7397,4964,1857,7398,4965,7399,7400,2176,3584,4966,7401,7402,3422,4537,3900, # 6928
3585,7403,3782,7404,2852,7405,7406,7407,4538,3783,2654,3423,4967,4539,7408,3784, # 6944
3586,2853,4540,4541,7409,3901,7410,3902,7411,7412,3785,3109,2327,3903,7413,7414, # 6960
2970,4066,2932,7415,7416,7417,3904,3672,3424,7418,4542,4543,4544,7419,4968,7420, # 6976
7421,4255,7422,7423,7424,7425,7426,4067,7427,3673,3365,4545,7428,3110,2559,3674, # 6992
7429,7430,3156,7431,7432,3503,7433,3425,4546,7434,3063,2873,7435,3223,4969,4547, # 7008
4548,2898,4256,4068,7436,4069,3587,3786,2933,3787,4257,4970,4971,3788,7437,4972, # 7024
3064,7438,4549,7439,7440,7441,7442,7443,4973,3905,7444,2874,7445,7446,7447,7448, # 7040
3021,7449,4550,3906,3588,4974,7450,7451,3789,3675,7452,2578,7453,4070,7454,7455, # 7056
7456,4258,3676,7457,4975,7458,4976,4259,3790,3504,2634,4977,3677,4551,4260,7459, # 7072
7460,7461,7462,3907,4261,4978,7463,7464,7465,7466,4979,4980,7467,7468,2213,4262, # 7088
7469,7470,7471,3678,4981,7472,2439,7473,4263,3224,3289,7474,3908,2415,4982,7475, # 7104
4264,7476,4983,2655,7477,7478,2732,4552,2854,2875,7479,7480,4265,7481,4553,4984, # 7120
7482,7483,4266,7484,3679,3366,3680,2818,2781,2782,3367,3589,4554,3065,7485,4071, # 7136
2899,7486,7487,3157,2462,4072,4555,4073,4985,4986,3111,4267,2687,3368,4556,4074, # 7152
3791,4268,7488,3909,2783,7489,2656,1962,3158,4557,4987,1963,3159,3160,7490,3112, # 7168
4988,4989,3022,4990,4991,3792,2855,7491,7492,2971,4558,7493,7494,4992,7495,7496, # 7184
7497,7498,4993,7499,3426,4559,4994,7500,3681,4560,4269,4270,3910,7501,4075,4995, # 7200
4271,7502,7503,4076,7504,4996,7505,3225,4997,4272,4077,2819,3023,7506,7507,2733, # 7216
4561,7508,4562,7509,3369,3793,7510,3590,2508,7511,7512,4273,3113,2994,2616,7513, # 7232
7514,7515,7516,7517,7518,2820,3911,4078,2748,7519,7520,4563,4998,7521,7522,7523, # 7248
7524,4999,4274,7525,4564,3682,2239,4079,4565,7526,7527,7528,7529,5000,7530,7531, # 7264
5001,4275,3794,7532,7533,7534,3066,5002,4566,3161,7535,7536,4080,7537,3162,7538, # 7280
7539,4567,7540,7541,7542,7543,7544,7545,5003,7546,4568,7547,7548,7549,7550,7551, # 7296
7552,7553,7554,7555,7556,5004,7557,7558,7559,5005,7560,3795,7561,4569,7562,7563, # 7312
7564,2821,3796,4276,4277,4081,7565,2876,7566,5006,7567,7568,2900,7569,3797,3912, # 7328
7570,7571,7572,4278,7573,7574,7575,5007,7576,7577,5008,7578,7579,4279,2934,7580, # 7344
7581,5009,7582,4570,7583,4280,7584,7585,7586,4571,4572,3913,7587,4573,3505,7588, # 7360
5010,7589,7590,7591,7592,3798,4574,7593,7594,5011,7595,4281,7596,7597,7598,4282, # 7376
5012,7599,7600,5013,3163,7601,5014,7602,3914,7603,7604,2734,4575,4576,4577,7605, # 7392
7606,7607,7608,7609,3506,5015,4578,7610,4082,7611,2822,2901,2579,3683,3024,4579, # 7408
3507,7612,4580,7613,3226,3799,5016,7614,7615,7616,7617,7618,7619,7620,2995,3290, # 7424
7621,4083,7622,5017,7623,7624,7625,7626,7627,4581,3915,7628,3291,7629,5018,7630, # 7440
7631,7632,7633,4084,7634,7635,3427,3800,7636,7637,4582,7638,5019,4583,5020,7639, # 7456
3916,7640,3801,5021,4584,4283,7641,7642,3428,3591,2269,7643,2617,7644,4585,3592, # 7472
7645,4586,2902,7646,7647,3227,5022,7648,4587,7649,4284,7650,7651,7652,4588,2284, # 7488
7653,5023,7654,7655,7656,4589,5024,3802,7657,7658,5025,3508,4590,7659,7660,7661, # 7504
1969,5026,7662,7663,3684,1821,2688,7664,2028,2509,4285,7665,2823,1841,7666,2689, # 7520
3114,7667,3917,4085,2160,5027,5028,2972,7668,5029,7669,7670,7671,3593,4086,7672, # 7536
4591,4087,5030,3803,7673,7674,7675,7676,7677,7678,7679,4286,2366,4592,4593,3067, # 7552
2328,7680,7681,4594,3594,3918,2029,4287,7682,5031,3919,3370,4288,4595,2856,7683, # 7568
3509,7684,7685,5032,5033,7686,7687,3804,2784,7688,7689,7690,7691,3371,7692,7693, # 7584
2877,5034,7694,7695,3920,4289,4088,7696,7697,7698,5035,7699,5036,4290,5037,5038, # 7600
5039,7700,7701,7702,5040,5041,3228,7703,1760,7704,5042,3229,4596,2106,4089,7705, # 7616
4597,2824,5043,2107,3372,7706,4291,4090,5044,7707,4091,7708,5045,3025,3805,4598, # 7632
4292,4293,4294,3373,7709,4599,7710,5046,7711,7712,5047,5048,3806,7713,7714,7715, # 7648
5049,7716,7717,7718,7719,4600,5050,7720,7721,7722,5051,7723,4295,3429,7724,7725, # 7664
7726,7727,3921,7728,3292,5052,4092,7729,7730,7731,7732,7733,7734,7735,5053,5054, # 7680
7736,7737,7738,7739,3922,3685,7740,7741,7742,7743,2635,5055,7744,5056,4601,7745, # 7696
7746,2560,7747,7748,7749,7750,3923,7751,7752,7753,7754,7755,4296,2903,7756,7757, # 7712
7758,7759,7760,3924,7761,5057,4297,7762,7763,5058,4298,7764,4093,7765,7766,5059, # 7728
3925,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,3595,7777,4299,5060,4094, # 7744
7778,3293,5061,7779,7780,4300,7781,7782,4602,7783,3596,7784,7785,3430,2367,7786, # 7760
3164,5062,5063,4301,7787,7788,4095,5064,5065,7789,3374,3115,7790,7791,7792,7793, # 7776
7794,7795,7796,3597,4603,7797,7798,3686,3116,3807,5066,7799,7800,5067,7801,7802, # 7792
4604,4302,5068,4303,4096,7803,7804,3294,7805,7806,5069,4605,2690,7807,3026,7808, # 7808
7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824, # 7824
7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840, # 7840
7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856, # 7856
7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872, # 7872
7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,7888, # 7888
7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,7904, # 7904
7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,7920, # 7920
7921,7922,7923,7924,3926,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935, # 7936
7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951, # 7952
7952,7953,7954,7955,7956,7957,7958,7959,7960,7961,7962,7963,7964,7965,7966,7967, # 7968
7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983, # 7984
7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999, # 8000
8000,8001,8002,8003,8004,8005,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015, # 8016
8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031, # 8032
8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047, # 8048
8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063, # 8064
8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079, # 8080
8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095, # 8096
8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111, # 8112
8112,8113,8114,8115,8116,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127, # 8128
8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143, # 8144
8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159, # 8160
8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175, # 8176
8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191, # 8192
8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207, # 8208
8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223, # 8224
8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239, # 8240
8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255, # 8256
8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271) # 8272

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py000064400000026066151735047770024064 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
#          Simon Montagu
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#   Shoshannah Forbes - original C code (?)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# 255: Control characters that usually does not exist in any text
# 254: Carriage/Return
# 253: symbol (punctuation) that does not belong to word
# 252: 0 - 9

# Windows-1255 language model
# Character Mapping Table:
win1255_CharToOrderMap = (
255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  # 00
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  # 10
253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  # 20
252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  # 30
253, 69, 91, 79, 80, 92, 89, 97, 90, 68,111,112, 82, 73, 95, 85,  # 40
 78,121, 86, 71, 67,102,107, 84,114,103,115,253,253,253,253,253,  # 50
253, 50, 74, 60, 61, 42, 76, 70, 64, 53,105, 93, 56, 65, 54, 49,  # 60
 66,110, 51, 43, 44, 63, 81, 77, 98, 75,108,253,253,253,253,253,  # 70
124,202,203,204,205, 40, 58,206,207,208,209,210,211,212,213,214,
215, 83, 52, 47, 46, 72, 32, 94,216,113,217,109,218,219,220,221,
 34,116,222,118,100,223,224,117,119,104,125,225,226, 87, 99,227,
106,122,123,228, 55,229,230,101,231,232,120,233, 48, 39, 57,234,
 30, 59, 41, 88, 33, 37, 36, 31, 29, 35,235, 62, 28,236,126,237,
238, 38, 45,239,240,241,242,243,127,244,245,246,247,248,249,250,
  9,  8, 20, 16,  3,  2, 24, 14, 22,  1, 25, 15,  4, 11,  6, 23,
 12, 19, 13, 26, 18, 27, 21, 17,  7, 10,  5,251,252,128, 96,253,
)

# Model Table:
# total sequences: 100%
# first 512 sequences: 98.4004%
# first 1024 sequences: 1.5981%
# rest  sequences:      0.087%
# negative sequences:   0.0015%
HebrewLangModel = (
0,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,3,2,1,2,0,1,0,0,
3,0,3,1,0,0,1,3,2,0,1,1,2,0,2,2,2,1,1,1,1,2,1,1,1,2,0,0,2,2,0,1,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,
1,2,1,2,1,2,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,
1,2,1,3,1,1,0,0,2,0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,0,1,2,2,1,3,
1,2,1,1,2,2,0,0,2,2,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,1,0,1,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,2,2,2,3,2,
1,2,1,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,3,2,2,3,2,2,2,1,2,2,2,2,
1,2,1,1,2,2,0,1,2,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,2,2,2,2,2,
0,2,0,2,2,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,0,2,2,2,
0,2,1,2,2,2,0,0,2,1,0,0,0,0,1,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,1,2,3,2,2,2,
1,2,1,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,
3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,1,0,2,0,2,
0,2,1,2,2,2,0,0,1,2,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,2,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,2,2,3,2,1,2,1,1,1,
0,1,1,1,1,1,3,0,1,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,0,1,0,0,1,0,0,0,0,
0,0,1,0,0,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,
0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,2,3,3,3,2,1,2,3,3,2,3,3,3,3,2,3,2,1,2,0,2,1,2,
0,2,0,2,2,2,0,0,1,2,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,
3,3,3,3,3,3,3,3,3,2,3,3,3,1,2,2,3,3,2,3,2,3,2,2,3,1,2,2,0,2,2,2,
0,2,1,2,2,2,0,0,1,2,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,2,2,2,3,3,3,3,1,3,2,2,2,
0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,2,3,2,2,2,1,2,2,0,2,2,2,2,
0,2,0,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,1,3,2,3,3,2,3,3,2,2,1,2,2,2,2,2,2,
0,2,1,2,1,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,2,3,2,3,3,2,3,3,3,3,2,3,2,3,3,3,3,3,2,2,2,2,2,2,2,1,
0,2,0,1,2,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,3,3,3,2,1,2,3,3,3,3,3,3,3,2,3,2,3,2,1,2,3,0,2,1,2,2,
0,2,1,1,2,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,
3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,1,3,1,2,2,2,1,2,3,3,1,2,1,2,2,2,2,
0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,
3,3,3,3,3,3,3,3,3,3,0,2,3,3,3,1,3,3,3,1,2,2,2,2,1,1,2,2,2,2,2,2,
0,2,0,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,3,3,3,3,3,2,3,3,3,2,2,3,3,3,2,1,2,3,2,3,2,2,2,2,1,2,1,1,1,2,2,
0,2,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,
1,0,1,0,0,0,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,3,3,3,3,2,3,3,2,3,1,2,2,2,2,3,2,3,1,1,2,2,1,2,2,1,1,0,2,2,2,2,
0,1,0,1,2,2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
3,0,0,1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,1,0,1,0,1,1,0,1,1,0,0,0,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
3,2,2,1,2,2,2,2,2,2,2,1,2,2,1,2,2,1,1,1,1,1,1,1,1,2,1,1,0,3,3,3,
0,3,0,2,2,2,2,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,1,2,2,2,1,1,1,2,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,0,2,2,0,0,0,0,0,0,
0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,3,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,1,0,2,1,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,3,1,1,2,2,2,2,2,1,2,2,2,1,1,2,2,2,2,2,2,2,1,2,2,1,0,1,1,1,1,0,
0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,2,1,1,1,1,2,1,1,2,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,
0,0,2,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,0,0,
2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,1,2,1,2,1,1,1,1,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,2,1,2,2,2,2,2,2,2,2,2,2,1,2,1,2,1,1,2,1,1,1,2,1,2,1,2,0,1,0,1,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,3,1,2,2,2,1,2,2,2,2,2,2,2,2,1,2,1,1,1,1,1,1,2,1,2,1,1,0,1,0,1,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,
0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
3,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,1,1,1,1,1,1,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,2,0,1,1,1,0,1,0,0,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,
0,1,1,1,2,1,2,2,2,0,2,0,2,0,1,1,2,1,1,1,1,2,1,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,1,0,0,0,0,0,1,0,1,2,2,0,1,0,0,1,1,2,2,1,2,0,2,0,0,0,1,2,0,1,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,2,0,2,1,2,0,2,0,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,1,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,1,0,2,1,1,0,1,0,0,1,1,1,2,2,0,0,1,0,0,0,1,0,0,1,
1,1,2,1,0,1,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,2,2,1,
0,2,0,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,0,0,1,0,1,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,2,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,1,1,0,1,0,0,0,1,1,0,1,
2,0,1,0,1,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,0,0,1,1,2,1,1,2,0,1,0,0,0,1,1,0,1,
1,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,0,0,2,1,1,2,0,2,0,0,0,1,1,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,2,1,1,0,1,0,0,2,2,1,2,1,1,0,1,0,0,0,1,1,0,1,
2,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,2,2,0,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,1,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,2,2,0,0,0,0,2,1,1,1,0,2,1,1,0,0,0,2,1,0,1,
1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,1,1,0,2,1,1,0,1,0,0,0,1,1,0,1,
2,2,1,1,1,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,2,1,1,0,1,0,0,1,1,0,1,2,1,0,2,0,0,0,1,1,0,1,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,
0,1,0,0,2,0,2,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,1,1,1,0,1,0,0,1,0,0,0,1,0,0,1,
1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,1,0,1,1,0,0,1,0,0,2,1,1,1,1,1,0,1,0,0,0,0,1,0,1,
0,1,1,1,2,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0,
)

Win1255HebrewModel = {
  'charToOrderMap': win1255_CharToOrderMap,
  'precedenceMatrix': HebrewLangModel,
  'mTypicalPositiveRatio': 0.984004,
  'keepEnglishLetter': False,
  'charsetName': "windows-1255"
}

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py000064400000106253151735047770022500 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

# GB2312 most frequently used character table
#
# Char to FreqOrder table , from hz6763

# 512  --> 0.79  -- 0.79
# 1024 --> 0.92  -- 0.13
# 2048 --> 0.98  -- 0.06
# 6768 --> 1.00  -- 0.02
#
# Ideal Distribution Ratio = 0.79135/(1-0.79135) = 3.79
# Random Distribution Ration = 512 / (3755 - 512) = 0.157
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher that RDR

GB2312_TYPICAL_DISTRIBUTION_RATIO = 0.9

GB2312_TABLE_SIZE = 3760

GB2312CharToFreqOrder = (
1671, 749,1443,2364,3924,3807,2330,3921,1704,3463,2691,1511,1515, 572,3191,2205,
2361, 224,2558, 479,1711, 963,3162, 440,4060,1905,2966,2947,3580,2647,3961,3842,
2204, 869,4207, 970,2678,5626,2944,2956,1479,4048, 514,3595, 588,1346,2820,3409,
 249,4088,1746,1873,2047,1774, 581,1813, 358,1174,3590,1014,1561,4844,2245, 670,
1636,3112, 889,1286, 953, 556,2327,3060,1290,3141, 613, 185,3477,1367, 850,3820,
1715,2428,2642,2303,2732,3041,2562,2648,3566,3946,1349, 388,3098,2091,1360,3585,
 152,1687,1539, 738,1559,  59,1232,2925,2267,1388,1249,1741,1679,2960, 151,1566,
1125,1352,4271, 924,4296, 385,3166,4459, 310,1245,2850,  70,3285,2729,3534,3575,
2398,3298,3466,1960,2265, 217,3647, 864,1909,2084,4401,2773,1010,3269,5152, 853,
3051,3121,1244,4251,1895, 364,1499,1540,2313,1180,3655,2268, 562, 715,2417,3061,
 544, 336,3768,2380,1752,4075, 950, 280,2425,4382, 183,2759,3272, 333,4297,2155,
1688,2356,1444,1039,4540, 736,1177,3349,2443,2368,2144,2225, 565, 196,1482,3406,
 927,1335,4147, 692, 878,1311,1653,3911,3622,1378,4200,1840,2969,3149,2126,1816,
2534,1546,2393,2760, 737,2494,  13, 447, 245,2747,  38,2765,2129,2589,1079, 606,
 360, 471,3755,2890, 404, 848, 699,1785,1236, 370,2221,1023,3746,2074,2026,2023,
2388,1581,2119, 812,1141,3091,2536,1519, 804,2053, 406,1596,1090, 784, 548,4414,
1806,2264,2936,1100, 343,4114,5096, 622,3358, 743,3668,1510,1626,5020,3567,2513,
3195,4115,5627,2489,2991,  24,2065,2697,1087,2719,  48,1634, 315,  68, 985,2052,
 198,2239,1347,1107,1439, 597,2366,2172, 871,3307, 919,2487,2790,1867, 236,2570,
1413,3794, 906,3365,3381,1701,1982,1818,1524,2924,1205, 616,2586,2072,2004, 575,
 253,3099,  32,1365,1182, 197,1714,2454,1201, 554,3388,3224,2748, 756,2587, 250,
2567,1507,1517,3529,1922,2761,2337,3416,1961,1677,2452,2238,3153, 615, 911,1506,
1474,2495,1265,1906,2749,3756,3280,2161, 898,2714,1759,3450,2243,2444, 563,  26,
3286,2266,3769,3344,2707,3677, 611,1402, 531,1028,2871,4548,1375, 261,2948, 835,
1190,4134, 353, 840,2684,1900,3082,1435,2109,1207,1674, 329,1872,2781,4055,2686,
2104, 608,3318,2423,2957,2768,1108,3739,3512,3271,3985,2203,1771,3520,1418,2054,
1681,1153, 225,1627,2929, 162,2050,2511,3687,1954, 124,1859,2431,1684,3032,2894,
 585,4805,3969,2869,2704,2088,2032,2095,3656,2635,4362,2209, 256, 518,2042,2105,
3777,3657, 643,2298,1148,1779, 190, 989,3544, 414,  11,2135,2063,2979,1471, 403,
3678, 126, 770,1563, 671,2499,3216,2877, 600,1179, 307,2805,4937,1268,1297,2694,
 252,4032,1448,1494,1331,1394, 127,2256, 222,1647,1035,1481,3056,1915,1048, 873,
3651, 210,  33,1608,2516, 200,1520, 415, 102,   0,3389,1287, 817,  91,3299,2940,
 836,1814, 549,2197,1396,1669,2987,3582,2297,2848,4528,1070, 687,  20,1819, 121,
1552,1364,1461,1968,2617,3540,2824,2083, 177, 948,4938,2291, 110,4549,2066, 648,
3359,1755,2110,2114,4642,4845,1693,3937,3308,1257,1869,2123, 208,1804,3159,2992,
2531,2549,3361,2418,1350,2347,2800,2568,1291,2036,2680,  72, 842,1990, 212,1233,
1154,1586,  75,2027,3410,4900,1823,1337,2710,2676, 728,2810,1522,3026,4995, 157,
 755,1050,4022, 710, 785,1936,2194,2085,1406,2777,2400, 150,1250,4049,1206, 807,
1910, 534, 529,3309,1721,1660, 274,  39,2827, 661,2670,1578, 925,3248,3815,1094,
4278,4901,4252,  41,1150,3747,2572,2227,4501,3658,4902,3813,3357,3617,2884,2258,
 887, 538,4187,3199,1294,2439,3042,2329,2343,2497,1255, 107, 543,1527, 521,3478,
3568, 194,5062,  15, 961,3870,1241,1192,2664,  66,5215,3260,2111,1295,1127,2152,
3805,4135, 901,1164,1976, 398,1278, 530,1460, 748, 904,1054,1966,1426,  53,2909,
 509, 523,2279,1534, 536,1019, 239,1685, 460,2353, 673,1065,2401,3600,4298,2272,
1272,2363, 284,1753,3679,4064,1695,  81, 815,2677,2757,2731,1386, 859, 500,4221,
2190,2566, 757,1006,2519,2068,1166,1455, 337,2654,3203,1863,1682,1914,3025,1252,
1409,1366, 847, 714,2834,2038,3209, 964,2970,1901, 885,2553,1078,1756,3049, 301,
1572,3326, 688,2130,1996,2429,1805,1648,2930,3421,2750,3652,3088, 262,1158,1254,
 389,1641,1812, 526,1719, 923,2073,1073,1902, 468, 489,4625,1140, 857,2375,3070,
3319,2863, 380, 116,1328,2693,1161,2244, 273,1212,1884,2769,3011,1775,1142, 461,
3066,1200,2147,2212, 790, 702,2695,4222,1601,1058, 434,2338,5153,3640,  67,2360,
4099,2502, 618,3472,1329, 416,1132, 830,2782,1807,2653,3211,3510,1662, 192,2124,
 296,3979,1739,1611,3684,  23, 118, 324, 446,1239,1225, 293,2520,3814,3795,2535,
3116,  17,1074, 467,2692,2201, 387,2922,  45,1326,3055,1645,3659,2817, 958, 243,
1903,2320,1339,2825,1784,3289, 356, 576, 865,2315,2381,3377,3916,1088,3122,1713,
1655, 935, 628,4689,1034,1327, 441, 800, 720, 894,1979,2183,1528,5289,2702,1071,
4046,3572,2399,1571,3281,  79, 761,1103, 327, 134, 758,1899,1371,1615, 879, 442,
 215,2605,2579, 173,2048,2485,1057,2975,3317,1097,2253,3801,4263,1403,1650,2946,
 814,4968,3487,1548,2644,1567,1285,   2, 295,2636,  97, 946,3576, 832, 141,4257,
3273, 760,3821,3521,3156,2607, 949,1024,1733,1516,1803,1920,2125,2283,2665,3180,
1501,2064,3560,2171,1592, 803,3518,1416, 732,3897,4258,1363,1362,2458, 119,1427,
 602,1525,2608,1605,1639,3175, 694,3064,  10, 465,  76,2000,4846,4208, 444,3781,
1619,3353,2206,1273,3796, 740,2483, 320,1723,2377,3660,2619,1359,1137,1762,1724,
2345,2842,1850,1862, 912, 821,1866, 612,2625,1735,2573,3369,1093, 844,  89, 937,
 930,1424,3564,2413,2972,1004,3046,3019,2011, 711,3171,1452,4178, 428, 801,1943,
 432, 445,2811, 206,4136,1472, 730, 349,  73, 397,2802,2547, 998,1637,1167, 789,
 396,3217, 154,1218, 716,1120,1780,2819,4826,1931,3334,3762,2139,1215,2627, 552,
3664,3628,3232,1405,2383,3111,1356,2652,3577,3320,3101,1703, 640,1045,1370,1246,
4996, 371,1575,2436,1621,2210, 984,4033,1734,2638,  16,4529, 663,2755,3255,1451,
3917,2257,1253,1955,2234,1263,2951, 214,1229, 617, 485, 359,1831,1969, 473,2310,
 750,2058, 165,  80,2864,2419, 361,4344,2416,2479,1134, 796,3726,1266,2943, 860,
2715, 938, 390,2734,1313,1384, 248, 202, 877,1064,2854, 522,3907, 279,1602, 297,
2357, 395,3740, 137,2075, 944,4089,2584,1267,3802,  62,1533,2285, 178, 176, 780,
2440, 201,3707, 590, 478,1560,4354,2117,1075,  30,  74,4643,4004,1635,1441,2745,
 776,2596, 238,1077,1692,1912,2844, 605, 499,1742,3947, 241,3053, 980,1749, 936,
2640,4511,2582, 515,1543,2162,5322,2892,2993, 890,2148,1924, 665,1827,3581,1032,
 968,3163, 339,1044,1896, 270, 583,1791,1720,4367,1194,3488,3669,  43,2523,1657,
 163,2167, 290,1209,1622,3378, 550, 634,2508,2510, 695,2634,2384,2512,1476,1414,
 220,1469,2341,2138,2852,3183,2900,4939,2865,3502,1211,3680, 854,3227,1299,2976,
3172, 186,2998,1459, 443,1067,3251,1495, 321,1932,3054, 909, 753,1410,1828, 436,
2441,1119,1587,3164,2186,1258, 227, 231,1425,1890,3200,3942, 247, 959, 725,5254,
2741, 577,2158,2079, 929, 120, 174, 838,2813, 591,1115, 417,2024,  40,3240,1536,
1037, 291,4151,2354, 632,1298,2406,2500,3535,1825,1846,3451, 205,1171, 345,4238,
  18,1163, 811, 685,2208,1217, 425,1312,1508,1175,4308,2552,1033, 587,1381,3059,
2984,3482, 340,1316,4023,3972, 792,3176, 519, 777,4690, 918, 933,4130,2981,3741,
  90,3360,2911,2200,5184,4550, 609,3079,2030, 272,3379,2736, 363,3881,1130,1447,
 286, 779, 357,1169,3350,3137,1630,1220,2687,2391, 747,1277,3688,2618,2682,2601,
1156,3196,5290,4034,3102,1689,3596,3128, 874, 219,2783, 798, 508,1843,2461, 269,
1658,1776,1392,1913,2983,3287,2866,2159,2372, 829,4076,  46,4253,2873,1889,1894,
 915,1834,1631,2181,2318, 298, 664,2818,3555,2735, 954,3228,3117, 527,3511,2173,
 681,2712,3033,2247,2346,3467,1652, 155,2164,3382, 113,1994, 450, 899, 494, 994,
1237,2958,1875,2336,1926,3727, 545,1577,1550, 633,3473, 204,1305,3072,2410,1956,
2471, 707,2134, 841,2195,2196,2663,3843,1026,4940, 990,3252,4997, 368,1092, 437,
3212,3258,1933,1829, 675,2977,2893, 412, 943,3723,4644,3294,3283,2230,2373,5154,
2389,2241,2661,2323,1404,2524, 593, 787, 677,3008,1275,2059, 438,2709,2609,2240,
2269,2246,1446,  36,1568,1373,3892,1574,2301,1456,3962, 693,2276,5216,2035,1143,
2720,1919,1797,1811,2763,4137,2597,1830,1699,1488,1198,2090, 424,1694, 312,3634,
3390,4179,3335,2252,1214, 561,1059,3243,2295,2561, 975,5155,2321,2751,3772, 472,
1537,3282,3398,1047,2077,2348,2878,1323,3340,3076, 690,2906,  51, 369, 170,3541,
1060,2187,2688,3670,2541,1083,1683, 928,3918, 459, 109,4427, 599,3744,4286, 143,
2101,2730,2490,  82,1588,3036,2121, 281,1860, 477,4035,1238,2812,3020,2716,3312,
1530,2188,2055,1317, 843, 636,1808,1173,3495, 649, 181,1002, 147,3641,1159,2414,
3750,2289,2795, 813,3123,2610,1136,4368,   5,3391,4541,2174, 420, 429,1728, 754,
1228,2115,2219, 347,2223,2733, 735,1518,3003,2355,3134,1764,3948,3329,1888,2424,
1001,1234,1972,3321,3363,1672,1021,1450,1584, 226, 765, 655,2526,3404,3244,2302,
3665, 731, 594,2184, 319,1576, 621, 658,2656,4299,2099,3864,1279,2071,2598,2739,
 795,3086,3699,3908,1707,2352,2402,1382,3136,2475,1465,4847,3496,3865,1085,3004,
2591,1084, 213,2287,1963,3565,2250, 822, 793,4574,3187,1772,1789,3050, 595,1484,
1959,2770,1080,2650, 456, 422,2996, 940,3322,4328,4345,3092,2742, 965,2784, 739,
4124, 952,1358,2498,2949,2565, 332,2698,2378, 660,2260,2473,4194,3856,2919, 535,
1260,2651,1208,1428,1300,1949,1303,2942, 433,2455,2450,1251,1946, 614,1269, 641,
1306,1810,2737,3078,2912, 564,2365,1419,1415,1497,4460,2367,2185,1379,3005,1307,
3218,2175,1897,3063, 682,1157,4040,4005,1712,1160,1941,1399, 394, 402,2952,1573,
1151,2986,2404, 862, 299,2033,1489,3006, 346, 171,2886,3401,1726,2932, 168,2533,
  47,2507,1030,3735,1145,3370,1395,1318,1579,3609,4560,2857,4116,1457,2529,1965,
 504,1036,2690,2988,2405, 745,5871, 849,2397,2056,3081, 863,2359,3857,2096,  99,
1397,1769,2300,4428,1643,3455,1978,1757,3718,1440,  35,4879,3742,1296,4228,2280,
 160,5063,1599,2013, 166, 520,3479,1646,3345,3012, 490,1937,1545,1264,2182,2505,
1096,1188,1369,1436,2421,1667,2792,2460,1270,2122, 727,3167,2143, 806,1706,1012,
1800,3037, 960,2218,1882, 805, 139,2456,1139,1521, 851,1052,3093,3089, 342,2039,
 744,5097,1468,1502,1585,2087, 223, 939, 326,2140,2577, 892,2481,1623,4077, 982,
3708, 135,2131,  87,2503,3114,2326,1106, 876,1616, 547,2997,2831,2093,3441,4530,
4314,   9,3256,4229,4148, 659,1462,1986,1710,2046,2913,2231,4090,4880,5255,3392,
3274,1368,3689,4645,1477, 705,3384,3635,1068,1529,2941,1458,3782,1509, 100,1656,
2548, 718,2339, 408,1590,2780,3548,1838,4117,3719,1345,3530, 717,3442,2778,3220,
2898,1892,4590,3614,3371,2043,1998,1224,3483, 891, 635, 584,2559,3355, 733,1766,
1729,1172,3789,1891,2307, 781,2982,2271,1957,1580,5773,2633,2005,4195,3097,1535,
3213,1189,1934,5693,3262, 586,3118,1324,1598, 517,1564,2217,1868,1893,4445,3728,
2703,3139,1526,1787,1992,3882,2875,1549,1199,1056,2224,1904,2711,5098,4287, 338,
1993,3129,3489,2689,1809,2815,1997, 957,1855,3898,2550,3275,3057,1105,1319, 627,
1505,1911,1883,3526, 698,3629,3456,1833,1431, 746,  77,1261,2017,2296,1977,1885,
 125,1334,1600, 525,1798,1109,2222,1470,1945, 559,2236,1186,3443,2476,1929,1411,
2411,3135,1777,3372,2621,1841,1613,3229, 668,1430,1839,2643,2916, 195,1989,2671,
2358,1387, 629,3205,2293,5256,4439, 123,1310, 888,1879,4300,3021,3605,1003,1162,
3192,2910,2010, 140,2395,2859,  55,1082,2012,2901, 662, 419,2081,1438, 680,2774,
4654,3912,1620,1731,1625,5035,4065,2328, 512,1344, 802,5443,2163,2311,2537, 524,
3399,  98,1155,2103,1918,2606,3925,2816,1393,2465,1504,3773,2177,3963,1478,4346,
 180,1113,4655,3461,2028,1698, 833,2696,1235,1322,1594,4408,3623,3013,3225,2040,
3022, 541,2881, 607,3632,2029,1665,1219, 639,1385,1686,1099,2803,3231,1938,3188,
2858, 427, 676,2772,1168,2025, 454,3253,2486,3556, 230,1950, 580, 791,1991,1280,
1086,1974,2034, 630, 257,3338,2788,4903,1017,  86,4790, 966,2789,1995,1696,1131,
 259,3095,4188,1308, 179,1463,5257, 289,4107,1248,  42,3413,1725,2288, 896,1947,
 774,4474,4254, 604,3430,4264, 392,2514,2588, 452, 237,1408,3018, 988,4531,1970,
3034,3310, 540,2370,1562,1288,2990, 502,4765,1147,   4,1853,2708, 207, 294,2814,
4078,2902,2509, 684,  34,3105,3532,2551, 644, 709,2801,2344, 573,1727,3573,3557,
2021,1081,3100,4315,2100,3681, 199,2263,1837,2385, 146,3484,1195,2776,3949, 997,
1939,3973,1008,1091,1202,1962,1847,1149,4209,5444,1076, 493, 117,5400,2521, 972,
1490,2934,1796,4542,2374,1512,2933,2657, 413,2888,1135,2762,2314,2156,1355,2369,
 766,2007,2527,2170,3124,2491,2593,2632,4757,2437, 234,3125,3591,1898,1750,1376,
1942,3468,3138, 570,2127,2145,3276,4131, 962, 132,1445,4196,  19, 941,3624,3480,
3366,1973,1374,4461,3431,2629, 283,2415,2275, 808,2887,3620,2112,2563,1353,3610,
 955,1089,3103,1053,  96,  88,4097, 823,3808,1583, 399, 292,4091,3313, 421,1128,
 642,4006, 903,2539,1877,2082, 596,  29,4066,1790, 722,2157, 130, 995,1569, 769,
1485, 464, 513,2213, 288,1923,1101,2453,4316, 133, 486,2445,  50, 625, 487,2207,
  57, 423, 481,2962, 159,3729,1558, 491, 303, 482, 501, 240,2837, 112,3648,2392,
1783, 362,   8,3433,3422, 610,2793,3277,1390,1284,1654,  21,3823, 734, 367, 623,
 193, 287, 374,1009,1483, 816, 476, 313,2255,2340,1262,2150,2899,1146,2581, 782,
2116,1659,2018,1880, 255,3586,3314,1110,2867,2137,2564, 986,2767,5185,2006, 650,
 158, 926, 762, 881,3157,2717,2362,3587, 306,3690,3245,1542,3077,2427,1691,2478,
2118,2985,3490,2438, 539,2305, 983, 129,1754, 355,4201,2386, 827,2923, 104,1773,
2838,2771, 411,2905,3919, 376, 767, 122,1114, 828,2422,1817,3506, 266,3460,1007,
1609,4998, 945,2612,4429,2274, 726,1247,1964,2914,2199,2070,4002,4108, 657,3323,
1422, 579, 455,2764,4737,1222,2895,1670, 824,1223,1487,2525, 558, 861,3080, 598,
2659,2515,1967, 752,2583,2376,2214,4180, 977, 704,2464,4999,2622,4109,1210,2961,
 819,1541, 142,2284,  44, 418, 457,1126,3730,4347,4626,1644,1876,3671,1864, 302,
1063,5694, 624, 723,1984,3745,1314,1676,2488,1610,1449,3558,3569,2166,2098, 409,
1011,2325,3704,2306, 818,1732,1383,1824,1844,3757, 999,2705,3497,1216,1423,2683,
2426,2954,2501,2726,2229,1475,2554,5064,1971,1794,1666,2014,1343, 783, 724, 191,
2434,1354,2220,5065,1763,2752,2472,4152, 131, 175,2885,3434,  92,1466,4920,2616,
3871,3872,3866, 128,1551,1632, 669,1854,3682,4691,4125,1230, 188,2973,3290,1302,
1213, 560,3266, 917, 763,3909,3249,1760, 868,1958, 764,1782,2097, 145,2277,3774,
4462,  64,1491,3062, 971,2132,3606,2442, 221,1226,1617, 218, 323,1185,3207,3147,
 571, 619,1473,1005,1744,2281, 449,1887,2396,3685, 275, 375,3816,1743,3844,3731,
 845,1983,2350,4210,1377, 773, 967,3499,3052,3743,2725,4007,1697,1022,3943,1464,
3264,2855,2722,1952,1029,2839,2467,  84,4383,2215, 820,1391,2015,2448,3672, 377,
1948,2168, 797,2545,3536,2578,2645,  94,2874,1678, 405,1259,3071, 771, 546,1315,
 470,1243,3083, 895,2468, 981, 969,2037, 846,4181, 653,1276,2928,  14,2594, 557,
3007,2474, 156, 902,1338,1740,2574, 537,2518, 973,2282,2216,2433,1928, 138,2903,
1293,2631,1612, 646,3457, 839,2935, 111, 496,2191,2847, 589,3186, 149,3994,2060,
4031,2641,4067,3145,1870,  37,3597,2136,1025,2051,3009,3383,3549,1121,1016,3261,
1301, 251,2446,2599,2153, 872,3246, 637, 334,3705, 831, 884, 921,3065,3140,4092,
2198,1944, 246,2964, 108,2045,1152,1921,2308,1031, 203,3173,4170,1907,3890, 810,
1401,2003,1690, 506, 647,1242,2828,1761,1649,3208,2249,1589,3709,2931,5156,1708,
 498, 666,2613, 834,3817,1231, 184,2851,1124, 883,3197,2261,3710,1765,1553,2658,
1178,2639,2351,  93,1193, 942,2538,2141,4402, 235,1821, 870,1591,2192,1709,1871,
3341,1618,4126,2595,2334, 603, 651,  69, 701, 268,2662,3411,2555,1380,1606, 503,
 448, 254,2371,2646, 574,1187,2309,1770, 322,2235,1292,1801, 305, 566,1133, 229,
2067,2057, 706, 167, 483,2002,2672,3295,1820,3561,3067, 316, 378,2746,3452,1112,
 136,1981, 507,1651,2917,1117, 285,4591, 182,2580,3522,1304, 335,3303,1835,2504,
1795,1792,2248, 674,1018,2106,2449,1857,2292,2845, 976,3047,1781,2600,2727,1389,
1281,  52,3152, 153, 265,3950, 672,3485,3951,4463, 430,1183, 365, 278,2169,  27,
1407,1336,2304, 209,1340,1730,2202,1852,2403,2883, 979,1737,1062, 631,2829,2542,
3876,2592, 825,2086,2226,3048,3625, 352,1417,3724, 542, 991, 431,1351,3938,1861,
2294, 826,1361,2927,3142,3503,1738, 463,2462,2723, 582,1916,1595,2808, 400,3845,
3891,2868,3621,2254,  58,2492,1123, 910,2160,2614,1372,1603,1196,1072,3385,1700,
3267,1980, 696, 480,2430, 920, 799,1570,2920,1951,2041,4047,2540,1321,4223,2469,
3562,2228,1271,2602, 401,2833,3351,2575,5157, 907,2312,1256, 410, 263,3507,1582,
 996, 678,1849,2316,1480, 908,3545,2237, 703,2322, 667,1826,2849,1531,2604,2999,
2407,3146,2151,2630,1786,3711, 469,3542, 497,3899,2409, 858, 837,4446,3393,1274,
 786, 620,1845,2001,3311, 484, 308,3367,1204,1815,3691,2332,1532,2557,1842,2020,
2724,1927,2333,4440, 567,  22,1673,2728,4475,1987,1858,1144,1597, 101,1832,3601,
  12, 974,3783,4391, 951,1412,   1,3720, 453,4608,4041, 528,1041,1027,3230,2628,
1129, 875,1051,3291,1203,2262,1069,2860,2799,2149,2615,3278, 144,1758,3040,  31,
 475,1680, 366,2685,3184, 311,1642,4008,2466,5036,1593,1493,2809, 216,1420,1668,
 233, 304,2128,3284, 232,1429,1768,1040,2008,3407,2740,2967,2543, 242,2133, 778,
1565,2022,2620, 505,2189,2756,1098,2273, 372,1614, 708, 553,2846,2094,2278, 169,
3626,2835,4161, 228,2674,3165, 809,1454,1309, 466,1705,1095, 900,3423, 880,2667,
3751,5258,2317,3109,2571,4317,2766,1503,1342, 866,4447,1118,  63,2076, 314,1881,
1348,1061, 172, 978,3515,1747, 532, 511,3970,   6, 601, 905,2699,3300,1751, 276,
1467,3725,2668,  65,4239,2544,2779,2556,1604, 578,2451,1802, 992,2331,2624,1320,
3446, 713,1513,1013, 103,2786,2447,1661, 886,1702, 916, 654,3574,2031,1556, 751,
2178,2821,2179,1498,1538,2176, 271, 914,2251,2080,1325, 638,1953,2937,3877,2432,
2754,  95,3265,1716, 260,1227,4083, 775, 106,1357,3254, 426,1607, 555,2480, 772,
1985, 244,2546, 474, 495,1046,2611,1851,2061,  71,2089,1675,2590, 742,3758,2843,
3222,1433, 267,2180,2576,2826,2233,2092,3913,2435, 956,1745,3075, 856,2113,1116,
 451,   3,1988,2896,1398, 993,2463,1878,2049,1341,2718,2721,2870,2108, 712,2904,
4363,2753,2324, 277,2872,2349,2649, 384, 987, 435, 691,3000, 922, 164,3939, 652,
1500,1184,4153,2482,3373,2165,4848,2335,3775,3508,3154,2806,2830,1554,2102,1664,
2530,1434,2408, 893,1547,2623,3447,2832,2242,2532,3169,2856,3223,2078,  49,3770,
3469, 462, 318, 656,2259,3250,3069, 679,1629,2758, 344,1138,1104,3120,1836,1283,
3115,2154,1437,4448, 934, 759,1999, 794,2862,1038, 533,2560,1722,2342, 855,2626,
1197,1663,4476,3127,  85,4240,2528,  25,1111,1181,3673, 407,3470,4561,2679,2713,
 768,1925,2841,3986,1544,1165, 932, 373,1240,2146,1930,2673, 721,4766, 354,4333,
 391,2963, 187,  61,3364,1442,1102, 330,1940,1767, 341,3809,4118, 393,2496,2062,
2211, 105, 331, 300, 439, 913,1332, 626, 379,3304,1557, 328, 689,3952, 309,1555,
 931, 317,2517,3027, 325, 569, 686,2107,3084,  60,1042,1333,2794, 264,3177,4014,
1628, 258,3712,   7,4464,1176,1043,1778, 683, 114,1975,  78,1492, 383,1886, 510,
 386, 645,5291,2891,2069,3305,4138,3867,2939,2603,2493,1935,1066,1848,3588,1015,
1282,1289,4609, 697,1453,3044,2666,3611,1856,2412,  54, 719,1330, 568,3778,2459,
1748, 788, 492, 551,1191,1000, 488,3394,3763, 282,1799, 348,2016,1523,3155,2390,
1049, 382,2019,1788,1170, 729,2968,3523, 897,3926,2785,2938,3292, 350,2319,3238,
1718,1717,2655,3453,3143,4465, 161,2889,2980,2009,1421,  56,1908,1640,2387,2232,
1917,1874,2477,4921, 148,  83,3438, 592,4245,2882,1822,1055, 741, 115,1496,1624,
 381,1638,4592,1020, 516,3214, 458, 947,4575,1432, 211,1514,2926,1865,2142, 189,
 852,1221,1400,1486, 882,2299,4036, 351,  28,1122, 700,6479,6480,6481,6482,6483,  # last 512
#Everything below is of no interest for detection purpose
5508,6484,3900,3414,3974,4441,4024,3537,4037,5628,5099,3633,6485,3148,6486,3636,
5509,3257,5510,5973,5445,5872,4941,4403,3174,4627,5873,6276,2286,4230,5446,5874,
5122,6102,6103,4162,5447,5123,5323,4849,6277,3980,3851,5066,4246,5774,5067,6278,
3001,2807,5695,3346,5775,5974,5158,5448,6487,5975,5976,5776,3598,6279,5696,4806,
4211,4154,6280,6488,6489,6490,6281,4212,5037,3374,4171,6491,4562,4807,4722,4827,
5977,6104,4532,4079,5159,5324,5160,4404,3858,5359,5875,3975,4288,4610,3486,4512,
5325,3893,5360,6282,6283,5560,2522,4231,5978,5186,5449,2569,3878,6284,5401,3578,
4415,6285,4656,5124,5979,2506,4247,4449,3219,3417,4334,4969,4329,6492,4576,4828,
4172,4416,4829,5402,6286,3927,3852,5361,4369,4830,4477,4867,5876,4173,6493,6105,
4657,6287,6106,5877,5450,6494,4155,4868,5451,3700,5629,4384,6288,6289,5878,3189,
4881,6107,6290,6495,4513,6496,4692,4515,4723,5100,3356,6497,6291,3810,4080,5561,
3570,4430,5980,6498,4355,5697,6499,4724,6108,6109,3764,4050,5038,5879,4093,3226,
6292,5068,5217,4693,3342,5630,3504,4831,4377,4466,4309,5698,4431,5777,6293,5778,
4272,3706,6110,5326,3752,4676,5327,4273,5403,4767,5631,6500,5699,5880,3475,5039,
6294,5562,5125,4348,4301,4482,4068,5126,4593,5700,3380,3462,5981,5563,3824,5404,
4970,5511,3825,4738,6295,6501,5452,4516,6111,5881,5564,6502,6296,5982,6503,4213,
4163,3454,6504,6112,4009,4450,6113,4658,6297,6114,3035,6505,6115,3995,4904,4739,
4563,4942,4110,5040,3661,3928,5362,3674,6506,5292,3612,4791,5565,4149,5983,5328,
5259,5021,4725,4577,4564,4517,4364,6298,5405,4578,5260,4594,4156,4157,5453,3592,
3491,6507,5127,5512,4709,4922,5984,5701,4726,4289,6508,4015,6116,5128,4628,3424,
4241,5779,6299,4905,6509,6510,5454,5702,5780,6300,4365,4923,3971,6511,5161,3270,
3158,5985,4100, 867,5129,5703,6117,5363,3695,3301,5513,4467,6118,6512,5455,4232,
4242,4629,6513,3959,4478,6514,5514,5329,5986,4850,5162,5566,3846,4694,6119,5456,
4869,5781,3779,6301,5704,5987,5515,4710,6302,5882,6120,4392,5364,5705,6515,6121,
6516,6517,3736,5988,5457,5989,4695,2457,5883,4551,5782,6303,6304,6305,5130,4971,
6122,5163,6123,4870,3263,5365,3150,4871,6518,6306,5783,5069,5706,3513,3498,4409,
5330,5632,5366,5458,5459,3991,5990,4502,3324,5991,5784,3696,4518,5633,4119,6519,
4630,5634,4417,5707,4832,5992,3418,6124,5993,5567,4768,5218,6520,4595,3458,5367,
6125,5635,6126,4202,6521,4740,4924,6307,3981,4069,4385,6308,3883,2675,4051,3834,
4302,4483,5568,5994,4972,4101,5368,6309,5164,5884,3922,6127,6522,6523,5261,5460,
5187,4164,5219,3538,5516,4111,3524,5995,6310,6311,5369,3181,3386,2484,5188,3464,
5569,3627,5708,6524,5406,5165,4677,4492,6312,4872,4851,5885,4468,5996,6313,5709,
5710,6128,2470,5886,6314,5293,4882,5785,3325,5461,5101,6129,5711,5786,6525,4906,
6526,6527,4418,5887,5712,4808,2907,3701,5713,5888,6528,3765,5636,5331,6529,6530,
3593,5889,3637,4943,3692,5714,5787,4925,6315,6130,5462,4405,6131,6132,6316,5262,
6531,6532,5715,3859,5716,5070,4696,5102,3929,5788,3987,4792,5997,6533,6534,3920,
4809,5000,5998,6535,2974,5370,6317,5189,5263,5717,3826,6536,3953,5001,4883,3190,
5463,5890,4973,5999,4741,6133,6134,3607,5570,6000,4711,3362,3630,4552,5041,6318,
6001,2950,2953,5637,4646,5371,4944,6002,2044,4120,3429,6319,6537,5103,4833,6538,
6539,4884,4647,3884,6003,6004,4758,3835,5220,5789,4565,5407,6540,6135,5294,4697,
4852,6320,6321,3206,4907,6541,6322,4945,6542,6136,6543,6323,6005,4631,3519,6544,
5891,6545,5464,3784,5221,6546,5571,4659,6547,6324,6137,5190,6548,3853,6549,4016,
4834,3954,6138,5332,3827,4017,3210,3546,4469,5408,5718,3505,4648,5790,5131,5638,
5791,5465,4727,4318,6325,6326,5792,4553,4010,4698,3439,4974,3638,4335,3085,6006,
5104,5042,5166,5892,5572,6327,4356,4519,5222,5573,5333,5793,5043,6550,5639,5071,
4503,6328,6139,6551,6140,3914,3901,5372,6007,5640,4728,4793,3976,3836,4885,6552,
4127,6553,4451,4102,5002,6554,3686,5105,6555,5191,5072,5295,4611,5794,5296,6556,
5893,5264,5894,4975,5466,5265,4699,4976,4370,4056,3492,5044,4886,6557,5795,4432,
4769,4357,5467,3940,4660,4290,6141,4484,4770,4661,3992,6329,4025,4662,5022,4632,
4835,4070,5297,4663,4596,5574,5132,5409,5895,6142,4504,5192,4664,5796,5896,3885,
5575,5797,5023,4810,5798,3732,5223,4712,5298,4084,5334,5468,6143,4052,4053,4336,
4977,4794,6558,5335,4908,5576,5224,4233,5024,4128,5469,5225,4873,6008,5045,4729,
4742,4633,3675,4597,6559,5897,5133,5577,5003,5641,5719,6330,6560,3017,2382,3854,
4406,4811,6331,4393,3964,4946,6561,2420,3722,6562,4926,4378,3247,1736,4442,6332,
5134,6333,5226,3996,2918,5470,4319,4003,4598,4743,4744,4485,3785,3902,5167,5004,
5373,4394,5898,6144,4874,1793,3997,6334,4085,4214,5106,5642,4909,5799,6009,4419,
4189,3330,5899,4165,4420,5299,5720,5227,3347,6145,4081,6335,2876,3930,6146,3293,
3786,3910,3998,5900,5300,5578,2840,6563,5901,5579,6147,3531,5374,6564,6565,5580,
4759,5375,6566,6148,3559,5643,6336,6010,5517,6337,6338,5721,5902,3873,6011,6339,
6567,5518,3868,3649,5722,6568,4771,4947,6569,6149,4812,6570,2853,5471,6340,6341,
5644,4795,6342,6012,5723,6343,5724,6013,4349,6344,3160,6150,5193,4599,4514,4493,
5168,4320,6345,4927,3666,4745,5169,5903,5005,4928,6346,5725,6014,4730,4203,5046,
4948,3395,5170,6015,4150,6016,5726,5519,6347,5047,3550,6151,6348,4197,4310,5904,
6571,5581,2965,6152,4978,3960,4291,5135,6572,5301,5727,4129,4026,5905,4853,5728,
5472,6153,6349,4533,2700,4505,5336,4678,3583,5073,2994,4486,3043,4554,5520,6350,
6017,5800,4487,6351,3931,4103,5376,6352,4011,4321,4311,4190,5136,6018,3988,3233,
4350,5906,5645,4198,6573,5107,3432,4191,3435,5582,6574,4139,5410,6353,5411,3944,
5583,5074,3198,6575,6354,4358,6576,5302,4600,5584,5194,5412,6577,6578,5585,5413,
5303,4248,5414,3879,4433,6579,4479,5025,4854,5415,6355,4760,4772,3683,2978,4700,
3797,4452,3965,3932,3721,4910,5801,6580,5195,3551,5907,3221,3471,3029,6019,3999,
5908,5909,5266,5267,3444,3023,3828,3170,4796,5646,4979,4259,6356,5647,5337,3694,
6357,5648,5338,4520,4322,5802,3031,3759,4071,6020,5586,4836,4386,5048,6581,3571,
4679,4174,4949,6154,4813,3787,3402,3822,3958,3215,3552,5268,4387,3933,4950,4359,
6021,5910,5075,3579,6358,4234,4566,5521,6359,3613,5049,6022,5911,3375,3702,3178,
4911,5339,4521,6582,6583,4395,3087,3811,5377,6023,6360,6155,4027,5171,5649,4421,
4249,2804,6584,2270,6585,4000,4235,3045,6156,5137,5729,4140,4312,3886,6361,4330,
6157,4215,6158,3500,3676,4929,4331,3713,4930,5912,4265,3776,3368,5587,4470,4855,
3038,4980,3631,6159,6160,4132,4680,6161,6362,3923,4379,5588,4255,6586,4121,6587,
6363,4649,6364,3288,4773,4774,6162,6024,6365,3543,6588,4274,3107,3737,5050,5803,
4797,4522,5589,5051,5730,3714,4887,5378,4001,4523,6163,5026,5522,4701,4175,2791,
3760,6589,5473,4224,4133,3847,4814,4815,4775,3259,5416,6590,2738,6164,6025,5304,
3733,5076,5650,4816,5590,6591,6165,6592,3934,5269,6593,3396,5340,6594,5804,3445,
3602,4042,4488,5731,5732,3525,5591,4601,5196,6166,6026,5172,3642,4612,3202,4506,
4798,6366,3818,5108,4303,5138,5139,4776,3332,4304,2915,3415,4434,5077,5109,4856,
2879,5305,4817,6595,5913,3104,3144,3903,4634,5341,3133,5110,5651,5805,6167,4057,
5592,2945,4371,5593,6596,3474,4182,6367,6597,6168,4507,4279,6598,2822,6599,4777,
4713,5594,3829,6169,3887,5417,6170,3653,5474,6368,4216,2971,5228,3790,4579,6369,
5733,6600,6601,4951,4746,4555,6602,5418,5475,6027,3400,4665,5806,6171,4799,6028,
5052,6172,3343,4800,4747,5006,6370,4556,4217,5476,4396,5229,5379,5477,3839,5914,
5652,5807,4714,3068,4635,5808,6173,5342,4192,5078,5419,5523,5734,6174,4557,6175,
4602,6371,6176,6603,5809,6372,5735,4260,3869,5111,5230,6029,5112,6177,3126,4681,
5524,5915,2706,3563,4748,3130,6178,4018,5525,6604,6605,5478,4012,4837,6606,4534,
4193,5810,4857,3615,5479,6030,4082,3697,3539,4086,5270,3662,4508,4931,5916,4912,
5811,5027,3888,6607,4397,3527,3302,3798,2775,2921,2637,3966,4122,4388,4028,4054,
1633,4858,5079,3024,5007,3982,3412,5736,6608,3426,3236,5595,3030,6179,3427,3336,
3279,3110,6373,3874,3039,5080,5917,5140,4489,3119,6374,5812,3405,4494,6031,4666,
4141,6180,4166,6032,5813,4981,6609,5081,4422,4982,4112,3915,5653,3296,3983,6375,
4266,4410,5654,6610,6181,3436,5082,6611,5380,6033,3819,5596,4535,5231,5306,5113,
6612,4952,5918,4275,3113,6613,6376,6182,6183,5814,3073,4731,4838,5008,3831,6614,
4888,3090,3848,4280,5526,5232,3014,5655,5009,5737,5420,5527,6615,5815,5343,5173,
5381,4818,6616,3151,4953,6617,5738,2796,3204,4360,2989,4281,5739,5174,5421,5197,
3132,5141,3849,5142,5528,5083,3799,3904,4839,5480,2880,4495,3448,6377,6184,5271,
5919,3771,3193,6034,6035,5920,5010,6036,5597,6037,6378,6038,3106,5422,6618,5423,
5424,4142,6619,4889,5084,4890,4313,5740,6620,3437,5175,5307,5816,4199,5198,5529,
5817,5199,5656,4913,5028,5344,3850,6185,2955,5272,5011,5818,4567,4580,5029,5921,
3616,5233,6621,6622,6186,4176,6039,6379,6380,3352,5200,5273,2908,5598,5234,3837,
5308,6623,6624,5819,4496,4323,5309,5201,6625,6626,4983,3194,3838,4167,5530,5922,
5274,6381,6382,3860,3861,5599,3333,4292,4509,6383,3553,5481,5820,5531,4778,6187,
3955,3956,4324,4389,4218,3945,4325,3397,2681,5923,4779,5085,4019,5482,4891,5382,
5383,6040,4682,3425,5275,4094,6627,5310,3015,5483,5657,4398,5924,3168,4819,6628,
5925,6629,5532,4932,4613,6041,6630,4636,6384,4780,4204,5658,4423,5821,3989,4683,
5822,6385,4954,6631,5345,6188,5425,5012,5384,3894,6386,4490,4104,6632,5741,5053,
6633,5823,5926,5659,5660,5927,6634,5235,5742,5824,4840,4933,4820,6387,4859,5928,
4955,6388,4143,3584,5825,5346,5013,6635,5661,6389,5014,5484,5743,4337,5176,5662,
6390,2836,6391,3268,6392,6636,6042,5236,6637,4158,6638,5744,5663,4471,5347,3663,
4123,5143,4293,3895,6639,6640,5311,5929,5826,3800,6189,6393,6190,5664,5348,3554,
3594,4749,4603,6641,5385,4801,6043,5827,4183,6642,5312,5426,4761,6394,5665,6191,
4715,2669,6643,6644,5533,3185,5427,5086,5930,5931,5386,6192,6044,6645,4781,4013,
5745,4282,4435,5534,4390,4267,6045,5746,4984,6046,2743,6193,3501,4087,5485,5932,
5428,4184,4095,5747,4061,5054,3058,3862,5933,5600,6646,5144,3618,6395,3131,5055,
5313,6396,4650,4956,3855,6194,3896,5202,4985,4029,4225,6195,6647,5828,5486,5829,
3589,3002,6648,6397,4782,5276,6649,6196,6650,4105,3803,4043,5237,5830,6398,4096,
3643,6399,3528,6651,4453,3315,4637,6652,3984,6197,5535,3182,3339,6653,3096,2660,
6400,6654,3449,5934,4250,4236,6047,6401,5831,6655,5487,3753,4062,5832,6198,6199,
6656,3766,6657,3403,4667,6048,6658,4338,2897,5833,3880,2797,3780,4326,6659,5748,
5015,6660,5387,4351,5601,4411,6661,3654,4424,5935,4339,4072,5277,4568,5536,6402,
6662,5238,6663,5349,5203,6200,5204,6201,5145,4536,5016,5056,4762,5834,4399,4957,
6202,6403,5666,5749,6664,4340,6665,5936,5177,5667,6666,6667,3459,4668,6404,6668,
6669,4543,6203,6670,4276,6405,4480,5537,6671,4614,5205,5668,6672,3348,2193,4763,
6406,6204,5937,5602,4177,5669,3419,6673,4020,6205,4443,4569,5388,3715,3639,6407,
6049,4058,6206,6674,5938,4544,6050,4185,4294,4841,4651,4615,5488,6207,6408,6051,
5178,3241,3509,5835,6208,4958,5836,4341,5489,5278,6209,2823,5538,5350,5206,5429,
6675,4638,4875,4073,3516,4684,4914,4860,5939,5603,5389,6052,5057,3237,5490,3791,
6676,6409,6677,4821,4915,4106,5351,5058,4243,5539,4244,5604,4842,4916,5239,3028,
3716,5837,5114,5605,5390,5940,5430,6210,4332,6678,5540,4732,3667,3840,6053,4305,
3408,5670,5541,6410,2744,5240,5750,6679,3234,5606,6680,5607,5671,3608,4283,4159,
4400,5352,4783,6681,6411,6682,4491,4802,6211,6412,5941,6413,6414,5542,5751,6683,
4669,3734,5942,6684,6415,5943,5059,3328,4670,4144,4268,6685,6686,6687,6688,4372,
3603,6689,5944,5491,4373,3440,6416,5543,4784,4822,5608,3792,4616,5838,5672,3514,
5391,6417,4892,6690,4639,6691,6054,5673,5839,6055,6692,6056,5392,6212,4038,5544,
5674,4497,6057,6693,5840,4284,5675,4021,4545,5609,6418,4454,6419,6213,4113,4472,
5314,3738,5087,5279,4074,5610,4959,4063,3179,4750,6058,6420,6214,3476,4498,4716,
5431,4960,4685,6215,5241,6694,6421,6216,6695,5841,5945,6422,3748,5946,5179,3905,
5752,5545,5947,4374,6217,4455,6423,4412,6218,4803,5353,6696,3832,5280,6219,4327,
4702,6220,6221,6059,4652,5432,6424,3749,4751,6425,5753,4986,5393,4917,5948,5030,
5754,4861,4733,6426,4703,6697,6222,4671,5949,4546,4961,5180,6223,5031,3316,5281,
6698,4862,4295,4934,5207,3644,6427,5842,5950,6428,6429,4570,5843,5282,6430,6224,
5088,3239,6060,6699,5844,5755,6061,6431,2701,5546,6432,5115,5676,4039,3993,3327,
4752,4425,5315,6433,3941,6434,5677,4617,4604,3074,4581,6225,5433,6435,6226,6062,
4823,5756,5116,6227,3717,5678,4717,5845,6436,5679,5846,6063,5847,6064,3977,3354,
6437,3863,5117,6228,5547,5394,4499,4524,6229,4605,6230,4306,4500,6700,5951,6065,
3693,5952,5089,4366,4918,6701,6231,5548,6232,6702,6438,4704,5434,6703,6704,5953,
4168,6705,5680,3420,6706,5242,4407,6066,3812,5757,5090,5954,4672,4525,3481,5681,
4618,5395,5354,5316,5955,6439,4962,6707,4526,6440,3465,4673,6067,6441,5682,6708,
5435,5492,5758,5683,4619,4571,4674,4804,4893,4686,5493,4753,6233,6068,4269,6442,
6234,5032,4705,5146,5243,5208,5848,6235,6443,4963,5033,4640,4226,6236,5849,3387,
6444,6445,4436,4437,5850,4843,5494,4785,4894,6709,4361,6710,5091,5956,3331,6237,
4987,5549,6069,6711,4342,3517,4473,5317,6070,6712,6071,4706,6446,5017,5355,6713,
6714,4988,5436,6447,4734,5759,6715,4735,4547,4456,4754,6448,5851,6449,6450,3547,
5852,5318,6451,6452,5092,4205,6716,6238,4620,4219,5611,6239,6072,4481,5760,5957,
5958,4059,6240,6453,4227,4537,6241,5761,4030,4186,5244,5209,3761,4457,4876,3337,
5495,5181,6242,5959,5319,5612,5684,5853,3493,5854,6073,4169,5613,5147,4895,6074,
5210,6717,5182,6718,3830,6243,2798,3841,6075,6244,5855,5614,3604,4606,5496,5685,
5118,5356,6719,6454,5960,5357,5961,6720,4145,3935,4621,5119,5962,4261,6721,6455,
4786,5963,4375,4582,6245,6246,6247,6076,5437,4877,5856,3376,4380,6248,4160,6722,
5148,6456,5211,6457,6723,4718,6458,6724,6249,5358,4044,3297,6459,6250,5857,5615,
5497,5245,6460,5498,6725,6251,6252,5550,3793,5499,2959,5396,6461,6462,4572,5093,
5500,5964,3806,4146,6463,4426,5762,5858,6077,6253,4755,3967,4220,5965,6254,4989,
5501,6464,4352,6726,6078,4764,2290,5246,3906,5438,5283,3767,4964,2861,5763,5094,
6255,6256,4622,5616,5859,5860,4707,6727,4285,4708,4824,5617,6257,5551,4787,5212,
4965,4935,4687,6465,6728,6466,5686,6079,3494,4413,2995,5247,5966,5618,6729,5967,
5764,5765,5687,5502,6730,6731,6080,5397,6467,4990,6258,6732,4538,5060,5619,6733,
4719,5688,5439,5018,5149,5284,5503,6734,6081,4607,6259,5120,3645,5861,4583,6260,
4584,4675,5620,4098,5440,6261,4863,2379,3306,4585,5552,5689,4586,5285,6735,4864,
6736,5286,6082,6737,4623,3010,4788,4381,4558,5621,4587,4896,3698,3161,5248,4353,
4045,6262,3754,5183,4588,6738,6263,6739,6740,5622,3936,6741,6468,6742,6264,5095,
6469,4991,5968,6743,4992,6744,6083,4897,6745,4256,5766,4307,3108,3968,4444,5287,
3889,4343,6084,4510,6085,4559,6086,4898,5969,6746,5623,5061,4919,5249,5250,5504,
5441,6265,5320,4878,3242,5862,5251,3428,6087,6747,4237,5624,5442,6266,5553,4539,
6748,2585,3533,5398,4262,6088,5150,4736,4438,6089,6267,5505,4966,6749,6268,6750,
6269,5288,5554,3650,6090,6091,4624,6092,5690,6751,5863,4270,5691,4277,5555,5864,
6752,5692,4720,4865,6470,5151,4688,4825,6753,3094,6754,6471,3235,4653,6755,5213,
5399,6756,3201,4589,5865,4967,6472,5866,6473,5019,3016,6757,5321,4756,3957,4573,
6093,4993,5767,4721,6474,6758,5625,6759,4458,6475,6270,6760,5556,4994,5214,5252,
6271,3875,5768,6094,5034,5506,4376,5769,6761,2120,6476,5253,5770,6762,5771,5970,
3990,5971,5557,5558,5772,6477,6095,2787,4641,5972,5121,6096,6097,6272,6763,3703,
5867,5507,6273,4206,6274,4789,6098,6764,3619,3646,3833,3804,2394,3788,4936,3978,
4866,4899,6099,6100,5559,6478,6765,3599,5868,6101,5869,5870,6275,6766,4527,6767)

# flake8: noqa
python3.4/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py000064400000003366151735047770023005 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import EUCKRDistributionAnalysis
from .mbcssm import CP949SMModel


class CP949Prober(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(CP949SMModel)
        # NOTE: CP949 is a superset of EUC-KR, so the distribution should be
        #       not different.
        self._mDistributionAnalyzer = EUCKRDistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "CP949"
python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py000064400000011271151735047770024105 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys
from . import constants
from .charsetprober import CharSetProber
from .compat import wrap_ord

SAMPLE_SIZE = 64
SB_ENOUGH_REL_THRESHOLD = 1024
POSITIVE_SHORTCUT_THRESHOLD = 0.95
NEGATIVE_SHORTCUT_THRESHOLD = 0.05
SYMBOL_CAT_ORDER = 250
NUMBER_OF_SEQ_CAT = 4
POSITIVE_CAT = NUMBER_OF_SEQ_CAT - 1
#NEGATIVE_CAT = 0


class SingleByteCharSetProber(CharSetProber):
    def __init__(self, model, reversed=False, nameProber=None):
        CharSetProber.__init__(self)
        self._mModel = model
        # TRUE if we need to reverse every pair in the model lookup
        self._mReversed = reversed
        # Optional auxiliary prober for name decision
        self._mNameProber = nameProber
        self.reset()

    def reset(self):
        CharSetProber.reset(self)
        # char order of last character
        self._mLastOrder = 255
        self._mSeqCounters = [0] * NUMBER_OF_SEQ_CAT
        self._mTotalSeqs = 0
        self._mTotalChar = 0
        # characters that fall in our sampling range
        self._mFreqChar = 0

    def get_charset_name(self):
        if self._mNameProber:
            return self._mNameProber.get_charset_name()
        else:
            return self._mModel['charsetName']

    def feed(self, aBuf):
        if not self._mModel['keepEnglishLetter']:
            aBuf = self.filter_without_english_letters(aBuf)
        aLen = len(aBuf)
        if not aLen:
            return self.get_state()
        for c in aBuf:
            order = self._mModel['charToOrderMap'][wrap_ord(c)]
            if order < SYMBOL_CAT_ORDER:
                self._mTotalChar += 1
            if order < SAMPLE_SIZE:
                self._mFreqChar += 1
                if self._mLastOrder < SAMPLE_SIZE:
                    self._mTotalSeqs += 1
                    if not self._mReversed:
                        i = (self._mLastOrder * SAMPLE_SIZE) + order
                        model = self._mModel['precedenceMatrix'][i]
                    else:  # reverse the order of the letters in the lookup
                        i = (order * SAMPLE_SIZE) + self._mLastOrder
                        model = self._mModel['precedenceMatrix'][i]
                    self._mSeqCounters[model] += 1
            self._mLastOrder = order

        if self.get_state() == constants.eDetecting:
            if self._mTotalSeqs > SB_ENOUGH_REL_THRESHOLD:
                cf = self.get_confidence()
                if cf > POSITIVE_SHORTCUT_THRESHOLD:
                    if constants._debug:
                        sys.stderr.write('%s confidence = %s, we have a'
                                         'winner\n' %
                                         (self._mModel['charsetName'], cf))
                    self._mState = constants.eFoundIt
                elif cf < NEGATIVE_SHORTCUT_THRESHOLD:
                    if constants._debug:
                        sys.stderr.write('%s confidence = %s, below negative'
                                         'shortcut threshhold %s\n' %
                                         (self._mModel['charsetName'], cf,
                                          NEGATIVE_SHORTCUT_THRESHOLD))
                    self._mState = constants.eNotMe

        return self.get_state()

    def get_confidence(self):
        r = 0.01
        if self._mTotalSeqs > 0:
            r = ((1.0 * self._mSeqCounters[POSITIVE_CAT]) / self._mTotalSeqs
                 / self._mModel['mTypicalPositiveRatio'])
            r = r * self._mFreqChar / self._mTotalChar
            if r >= 1.0:
                r = 0.99
        return r
python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py000064400000007226151735047770023104 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys
from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import SJISDistributionAnalysis
from .jpcntx import SJISContextAnalysis
from .mbcssm import SJISSMModel
from . import constants


class SJISProber(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(SJISSMModel)
        self._mDistributionAnalyzer = SJISDistributionAnalysis()
        self._mContextAnalyzer = SJISContextAnalysis()
        self.reset()

    def reset(self):
        MultiByteCharSetProber.reset(self)
        self._mContextAnalyzer.reset()

    def get_charset_name(self):
        return "SHIFT_JIS"

    def feed(self, aBuf):
        aLen = len(aBuf)
        for i in range(0, aLen):
            codingState = self._mCodingSM.next_state(aBuf[i])
            if codingState == constants.eError:
                if constants._debug:
                    sys.stderr.write(self.get_charset_name()
                                     + ' prober hit error at byte ' + str(i)
                                     + '\n')
                self._mState = constants.eNotMe
                break
            elif codingState == constants.eItsMe:
                self._mState = constants.eFoundIt
                break
            elif codingState == constants.eStart:
                charLen = self._mCodingSM.get_current_charlen()
                if i == 0:
                    self._mLastChar[1] = aBuf[0]
                    self._mContextAnalyzer.feed(self._mLastChar[2 - charLen:],
                                                charLen)
                    self._mDistributionAnalyzer.feed(self._mLastChar, charLen)
                else:
                    self._mContextAnalyzer.feed(aBuf[i + 1 - charLen:i + 3
                                                     - charLen], charLen)
                    self._mDistributionAnalyzer.feed(aBuf[i - 1:i + 1],
                                                     charLen)

        self._mLastChar[0] = aBuf[aLen - 1]

        if self.get_state() == constants.eDetecting:
            if (self._mContextAnalyzer.got_enough_data() and
               (self.get_confidence() > constants.SHORTCUT_THRESHOLD)):
                self._mState = constants.eFoundIt

        return self.get_state()

    def get_confidence(self):
        contxtCf = self._mContextAnalyzer.get_confidence()
        distribCf = self._mDistributionAnalyzer.get_confidence()
        return max(contxtCf, distribCf)
python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py000064400000006163151735047770022705 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
from .escsm import (HZSMModel, ISO2022CNSMModel, ISO2022JPSMModel,
                    ISO2022KRSMModel)
from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .compat import wrap_ord


class EscCharSetProber(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mCodingSM = [
            CodingStateMachine(HZSMModel),
            CodingStateMachine(ISO2022CNSMModel),
            CodingStateMachine(ISO2022JPSMModel),
            CodingStateMachine(ISO2022KRSMModel)
        ]
        self.reset()

    def reset(self):
        CharSetProber.reset(self)
        for codingSM in self._mCodingSM:
            if not codingSM:
                continue
            codingSM.active = True
            codingSM.reset()
        self._mActiveSM = len(self._mCodingSM)
        self._mDetectedCharset = None

    def get_charset_name(self):
        return self._mDetectedCharset

    def get_confidence(self):
        if self._mDetectedCharset:
            return 0.99
        else:
            return 0.00

    def feed(self, aBuf):
        for c in aBuf:
            # PY3K: aBuf is a byte array, so c is an int, not a byte
            for codingSM in self._mCodingSM:
                if not codingSM:
                    continue
                if not codingSM.active:
                    continue
                codingState = codingSM.next_state(wrap_ord(c))
                if codingState == constants.eError:
                    codingSM.active = False
                    self._mActiveSM -= 1
                    if self._mActiveSM <= 0:
                        self._mState = constants.eNotMe
                        return self.get_state()
                elif codingState == constants.eItsMe:
                    self._mState = constants.eFoundIt
                    self._mDetectedCharset = codingSM.get_coding_state_machine()  # nopep8
                    return self.get_state()

        return self.get_state()
python3.4/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py000064400000032057151735047770023410 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
#          Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .constants import eNotMe, eDetecting
from .compat import wrap_ord

# This prober doesn't actually recognize a language or a charset.
# It is a helper prober for the use of the Hebrew model probers

### General ideas of the Hebrew charset recognition ###
#
# Four main charsets exist in Hebrew:
# "ISO-8859-8" - Visual Hebrew
# "windows-1255" - Logical Hebrew
# "ISO-8859-8-I" - Logical Hebrew
# "x-mac-hebrew" - ?? Logical Hebrew ??
#
# Both "ISO" charsets use a completely identical set of code points, whereas
# "windows-1255" and "x-mac-hebrew" are two different proper supersets of
# these code points. windows-1255 defines additional characters in the range
# 0x80-0x9F as some misc punctuation marks as well as some Hebrew-specific
# diacritics and additional 'Yiddish' ligature letters in the range 0xc0-0xd6.
# x-mac-hebrew defines similar additional code points but with a different
# mapping.
#
# As far as an average Hebrew text with no diacritics is concerned, all four
# charsets are identical with respect to code points. Meaning that for the
# main Hebrew alphabet, all four map the same values to all 27 Hebrew letters
# (including final letters).
#
# The dominant difference between these charsets is their directionality.
# "Visual" directionality means that the text is ordered as if the renderer is
# not aware of a BIDI rendering algorithm. The renderer sees the text and
# draws it from left to right. The text itself when ordered naturally is read
# backwards. A buffer of Visual Hebrew generally looks like so:
# "[last word of first line spelled backwards] [whole line ordered backwards
# and spelled backwards] [first word of first line spelled backwards]
# [end of line] [last word of second line] ... etc' "
# adding punctuation marks, numbers and English text to visual text is
# naturally also "visual" and from left to right.
#
# "Logical" directionality means the text is ordered "naturally" according to
# the order it is read. It is the responsibility of the renderer to display
# the text from right to left. A BIDI algorithm is used to place general
# punctuation marks, numbers and English text in the text.
#
# Texts in x-mac-hebrew are almost impossible to find on the Internet. From
# what little evidence I could find, it seems that its general directionality
# is Logical.
#
# To sum up all of the above, the Hebrew probing mechanism knows about two
# charsets:
# Visual Hebrew - "ISO-8859-8" - backwards text - Words and sentences are
#    backwards while line order is natural. For charset recognition purposes
#    the line order is unimportant (In fact, for this implementation, even
#    word order is unimportant).
# Logical Hebrew - "windows-1255" - normal, naturally ordered text.
#
# "ISO-8859-8-I" is a subset of windows-1255 and doesn't need to be
#    specifically identified.
# "x-mac-hebrew" is also identified as windows-1255. A text in x-mac-hebrew
#    that contain special punctuation marks or diacritics is displayed with
#    some unconverted characters showing as question marks. This problem might
#    be corrected using another model prober for x-mac-hebrew. Due to the fact
#    that x-mac-hebrew texts are so rare, writing another model prober isn't
#    worth the effort and performance hit.
#
#### The Prober ####
#
# The prober is divided between two SBCharSetProbers and a HebrewProber,
# all of which are managed, created, fed data, inquired and deleted by the
# SBCSGroupProber. The two SBCharSetProbers identify that the text is in
# fact some kind of Hebrew, Logical or Visual. The final decision about which
# one is it is made by the HebrewProber by combining final-letter scores
# with the scores of the two SBCharSetProbers to produce a final answer.
#
# The SBCSGroupProber is responsible for stripping the original text of HTML
# tags, English characters, numbers, low-ASCII punctuation characters, spaces
# and new lines. It reduces any sequence of such characters to a single space.
# The buffer fed to each prober in the SBCS group prober is pure text in
# high-ASCII.
# The two SBCharSetProbers (model probers) share the same language model:
# Win1255Model.
# The first SBCharSetProber uses the model normally as any other
# SBCharSetProber does, to recognize windows-1255, upon which this model was
# built. The second SBCharSetProber is told to make the pair-of-letter
# lookup in the language model backwards. This in practice exactly simulates
# a visual Hebrew model using the windows-1255 logical Hebrew model.
#
# The HebrewProber is not using any language model. All it does is look for
# final-letter evidence suggesting the text is either logical Hebrew or visual
# Hebrew. Disjointed from the model probers, the results of the HebrewProber
# alone are meaningless. HebrewProber always returns 0.00 as confidence
# since it never identifies a charset by itself. Instead, the pointer to the
# HebrewProber is passed to the model probers as a helper "Name Prober".
# When the Group prober receives a positive identification from any prober,
# it asks for the name of the charset identified. If the prober queried is a
# Hebrew model prober, the model prober forwards the call to the
# HebrewProber to make the final decision. In the HebrewProber, the
# decision is made according to the final-letters scores maintained and Both
# model probers scores. The answer is returned in the form of the name of the
# charset identified, either "windows-1255" or "ISO-8859-8".

# windows-1255 / ISO-8859-8 code points of interest
FINAL_KAF = 0xea
NORMAL_KAF = 0xeb
FINAL_MEM = 0xed
NORMAL_MEM = 0xee
FINAL_NUN = 0xef
NORMAL_NUN = 0xf0
FINAL_PE = 0xf3
NORMAL_PE = 0xf4
FINAL_TSADI = 0xf5
NORMAL_TSADI = 0xf6

# Minimum Visual vs Logical final letter score difference.
# If the difference is below this, don't rely solely on the final letter score
# distance.
MIN_FINAL_CHAR_DISTANCE = 5

# Minimum Visual vs Logical model score difference.
# If the difference is below this, don't rely at all on the model score
# distance.
MIN_MODEL_DISTANCE = 0.01

VISUAL_HEBREW_NAME = "ISO-8859-8"
LOGICAL_HEBREW_NAME = "windows-1255"


class HebrewProber(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mLogicalProber = None
        self._mVisualProber = None
        self.reset()

    def reset(self):
        self._mFinalCharLogicalScore = 0
        self._mFinalCharVisualScore = 0
        # The two last characters seen in the previous buffer,
        # mPrev and mBeforePrev are initialized to space in order to simulate
        # a word delimiter at the beginning of the data
        self._mPrev = ' '
        self._mBeforePrev = ' '
        # These probers are owned by the group prober.

    def set_model_probers(self, logicalProber, visualProber):
        self._mLogicalProber = logicalProber
        self._mVisualProber = visualProber

    def is_final(self, c):
        return wrap_ord(c) in [FINAL_KAF, FINAL_MEM, FINAL_NUN, FINAL_PE,
                               FINAL_TSADI]

    def is_non_final(self, c):
        # The normal Tsadi is not a good Non-Final letter due to words like
        # 'lechotet' (to chat) containing an apostrophe after the tsadi. This
        # apostrophe is converted to a space in FilterWithoutEnglishLetters
        # causing the Non-Final tsadi to appear at an end of a word even
        # though this is not the case in the original text.
        # The letters Pe and Kaf rarely display a related behavior of not being
        # a good Non-Final letter. Words like 'Pop', 'Winamp' and 'Mubarak'
        # for example legally end with a Non-Final Pe or Kaf. However, the
        # benefit of these letters as Non-Final letters outweighs the damage
        # since these words are quite rare.
        return wrap_ord(c) in [NORMAL_KAF, NORMAL_MEM, NORMAL_NUN, NORMAL_PE]

    def feed(self, aBuf):
        # Final letter analysis for logical-visual decision.
        # Look for evidence that the received buffer is either logical Hebrew
        # or visual Hebrew.
        # The following cases are checked:
        # 1) A word longer than 1 letter, ending with a final letter. This is
        #    an indication that the text is laid out "naturally" since the
        #    final letter really appears at the end. +1 for logical score.
        # 2) A word longer than 1 letter, ending with a Non-Final letter. In
        #    normal Hebrew, words ending with Kaf, Mem, Nun, Pe or Tsadi,
        #    should not end with the Non-Final form of that letter. Exceptions
        #    to this rule are mentioned above in isNonFinal(). This is an
        #    indication that the text is laid out backwards. +1 for visual
        #    score
        # 3) A word longer than 1 letter, starting with a final letter. Final
        #    letters should not appear at the beginning of a word. This is an
        #    indication that the text is laid out backwards. +1 for visual
        #    score.
        #
        # The visual score and logical score are accumulated throughout the
        # text and are finally checked against each other in GetCharSetName().
        # No checking for final letters in the middle of words is done since
        # that case is not an indication for either Logical or Visual text.
        #
        # We automatically filter out all 7-bit characters (replace them with
        # spaces) so the word boundary detection works properly. [MAP]

        if self.get_state() == eNotMe:
            # Both model probers say it's not them. No reason to continue.
            return eNotMe

        aBuf = self.filter_high_bit_only(aBuf)

        for cur in aBuf:
            if cur == ' ':
                # We stand on a space - a word just ended
                if self._mBeforePrev != ' ':
                    # next-to-last char was not a space so self._mPrev is not a
                    # 1 letter word
                    if self.is_final(self._mPrev):
                        # case (1) [-2:not space][-1:final letter][cur:space]
                        self._mFinalCharLogicalScore += 1
                    elif self.is_non_final(self._mPrev):
                        # case (2) [-2:not space][-1:Non-Final letter][
                        #  cur:space]
                        self._mFinalCharVisualScore += 1
            else:
                # Not standing on a space
                if ((self._mBeforePrev == ' ') and
                        (self.is_final(self._mPrev)) and (cur != ' ')):
                    # case (3) [-2:space][-1:final letter][cur:not space]
                    self._mFinalCharVisualScore += 1
            self._mBeforePrev = self._mPrev
            self._mPrev = cur

        # Forever detecting, till the end or until both model probers return
        # eNotMe (handled above)
        return eDetecting

    def get_charset_name(self):
        # Make the decision: is it Logical or Visual?
        # If the final letter score distance is dominant enough, rely on it.
        finalsub = self._mFinalCharLogicalScore - self._mFinalCharVisualScore
        if finalsub >= MIN_FINAL_CHAR_DISTANCE:
            return LOGICAL_HEBREW_NAME
        if finalsub <= -MIN_FINAL_CHAR_DISTANCE:
            return VISUAL_HEBREW_NAME

        # It's not dominant enough, try to rely on the model scores instead.
        modelsub = (self._mLogicalProber.get_confidence()
                    - self._mVisualProber.get_confidence())
        if modelsub > MIN_MODEL_DISTANCE:
            return LOGICAL_HEBREW_NAME
        if modelsub < -MIN_MODEL_DISTANCE:
            return VISUAL_HEBREW_NAME

        # Still no good, back to final letter distance, maybe it'll save the
        # day.
        if finalsub < 0.0:
            return VISUAL_HEBREW_NAME

        # (finalsub > 0 - Logical) or (don't know what to do) default to
        # Logical.
        return LOGICAL_HEBREW_NAME

    def get_state(self):
        # Remain active as long as any of the model probers are active.
        if (self._mLogicalProber.get_state() == eNotMe) and \
           (self._mVisualProber.get_state() == eNotMe):
            return eNotMe
        return eDetecting
python3.4/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py000064400000005134151735047770023016 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8SMModel

ONE_CHAR_PROB = 0.5


class UTF8Prober(CharSetProber):
    def __init__(self):
        CharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(UTF8SMModel)
        self.reset()

    def reset(self):
        CharSetProber.reset(self)
        self._mCodingSM.reset()
        self._mNumOfMBChar = 0

    def get_charset_name(self):
        return "utf-8"

    def feed(self, aBuf):
        for c in aBuf:
            codingState = self._mCodingSM.next_state(c)
            if codingState == constants.eError:
                self._mState = constants.eNotMe
                break
            elif codingState == constants.eItsMe:
                self._mState = constants.eFoundIt
                break
            elif codingState == constants.eStart:
                if self._mCodingSM.get_current_charlen() >= 2:
                    self._mNumOfMBChar += 1

        if self.get_state() == constants.eDetecting:
            if self.get_confidence() > constants.SHORTCUT_THRESHOLD:
                self._mState = constants.eFoundIt

        return self.get_state()

    def get_confidence(self):
        unlike = 0.99
        if self._mNumOfMBChar < 6:
            for i in range(0, self._mNumOfMBChar):
                unlike = unlike * ONE_CHAR_PROB
            return 1.0 - unlike
        else:
            return unlike
python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py000064400000003214151735047770023254 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import EUCTWDistributionAnalysis
from .mbcssm import EUCTWSMModel

class EUCTWProber(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(EUCTWSMModel)
        self._mDistributionAnalyzer = EUCTWDistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "EUC-TW"
python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py000064400000015257151735047770024467 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
import sys
import codecs
from .latin1prober import Latin1Prober  # windows-1252
from .mbcsgroupprober import MBCSGroupProber  # multi-byte character sets
from .sbcsgroupprober import SBCSGroupProber  # single-byte character sets
from .escprober import EscCharSetProber  # ISO-2122, etc.
import re

MINIMUM_THRESHOLD = 0.20
ePureAscii = 0
eEscAscii = 1
eHighbyte = 2


class UniversalDetector:
    def __init__(self):
        self._highBitDetector = re.compile(b'[\x80-\xFF]')
        self._escDetector = re.compile(b'(\033|~{)')
        self._mEscCharSetProber = None
        self._mCharSetProbers = []
        self.reset()

    def reset(self):
        self.result = {'encoding': None, 'confidence': 0.0}
        self.done = False
        self._mStart = True
        self._mGotData = False
        self._mInputState = ePureAscii
        self._mLastChar = b''
        if self._mEscCharSetProber:
            self._mEscCharSetProber.reset()
        for prober in self._mCharSetProbers:
            prober.reset()

    def feed(self, aBuf):
        if self.done:
            return

        aLen = len(aBuf)
        if not aLen:
            return

        if not self._mGotData:
            # If the data starts with BOM, we know it is UTF
            if aBuf[:3] == codecs.BOM:
                # EF BB BF  UTF-8 with BOM
                self.result = {'encoding': "UTF-8", 'confidence': 1.0}
            elif aBuf[:4] == codecs.BOM_UTF32_LE:
                # FF FE 00 00  UTF-32, little-endian BOM
                self.result = {'encoding': "UTF-32LE", 'confidence': 1.0}
            elif aBuf[:4] == codecs.BOM_UTF32_BE:
                # 00 00 FE FF  UTF-32, big-endian BOM
                self.result = {'encoding': "UTF-32BE", 'confidence': 1.0}
            elif aBuf[:4] == b'\xFE\xFF\x00\x00':
                # FE FF 00 00  UCS-4, unusual octet order BOM (3412)
                self.result = {
                    'encoding': "X-ISO-10646-UCS-4-3412",
                    'confidence': 1.0
                }
            elif aBuf[:4] == b'\x00\x00\xFF\xFE':
                # 00 00 FF FE  UCS-4, unusual octet order BOM (2143)
                self.result = {
                    'encoding': "X-ISO-10646-UCS-4-2143",
                    'confidence': 1.0
                }
            elif aBuf[:2] == codecs.BOM_LE:
                # FF FE  UTF-16, little endian BOM
                self.result = {'encoding': "UTF-16LE", 'confidence': 1.0}
            elif aBuf[:2] == codecs.BOM_BE:
                # FE FF  UTF-16, big endian BOM
                self.result = {'encoding': "UTF-16BE", 'confidence': 1.0}

        self._mGotData = True
        if self.result['encoding'] and (self.result['confidence'] > 0.0):
            self.done = True
            return

        if self._mInputState == ePureAscii:
            if self._highBitDetector.search(aBuf):
                self._mInputState = eHighbyte
            elif ((self._mInputState == ePureAscii) and
                    self._escDetector.search(self._mLastChar + aBuf)):
                self._mInputState = eEscAscii

        self._mLastChar = aBuf[-1:]

        if self._mInputState == eEscAscii:
            if not self._mEscCharSetProber:
                self._mEscCharSetProber = EscCharSetProber()
            if self._mEscCharSetProber.feed(aBuf) == constants.eFoundIt:
                self.result = {'encoding': self._mEscCharSetProber.get_charset_name(),
                               'confidence': self._mEscCharSetProber.get_confidence()}
                self.done = True
        elif self._mInputState == eHighbyte:
            if not self._mCharSetProbers:
                self._mCharSetProbers = [MBCSGroupProber(), SBCSGroupProber(),
                                         Latin1Prober()]
            for prober in self._mCharSetProbers:
                if prober.feed(aBuf) == constants.eFoundIt:
                    self.result = {'encoding': prober.get_charset_name(),
                                   'confidence': prober.get_confidence()}
                    self.done = True
                    break

    def close(self):
        if self.done:
            return
        if not self._mGotData:
            if constants._debug:
                sys.stderr.write('no data received!\n')
            return
        self.done = True

        if self._mInputState == ePureAscii:
            self.result = {'encoding': 'ascii', 'confidence': 1.0}
            return self.result

        if self._mInputState == eHighbyte:
            proberConfidence = None
            maxProberConfidence = 0.0
            maxProber = None
            for prober in self._mCharSetProbers:
                if not prober:
                    continue
                proberConfidence = prober.get_confidence()
                if proberConfidence > maxProberConfidence:
                    maxProberConfidence = proberConfidence
                    maxProber = prober
            if maxProber and (maxProberConfidence > MINIMUM_THRESHOLD):
                self.result = {'encoding': maxProber.get_charset_name(),
                               'confidence': maxProber.get_confidence()}
                return self.result

        if constants._debug:
            sys.stderr.write('no probers hit minimum threshhold\n')
            for prober in self._mCharSetProbers[0].mProbers:
                if not prober:
                    continue
                sys.stderr.write('%s confidence = %s\n' %
                                 (prober.get_charset_name(),
                                  prober.get_confidence()))
python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py000064400000003556151735047770023567 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#   Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from . import constants
import re


class CharSetProber:
    def __init__(self):
        pass

    def reset(self):
        self._mState = constants.eDetecting

    def get_charset_name(self):
        return None

    def feed(self, aBuf):
        pass

    def get_state(self):
        return self._mState

    def get_confidence(self):
        return 0.0

    def filter_high_bit_only(self, aBuf):
        aBuf = re.sub(b'([\x00-\x7F])+', b' ', aBuf)
        return aBuf

    def filter_without_english_letters(self, aBuf):
        aBuf = re.sub(b'([A-Za-z])+', b' ', aBuf)
        return aBuf

    def filter_with_english_letters(self, aBuf):
        # TODO
        return aBuf
python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py000064400000003224151735047770022754 0ustar00######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import Big5DistributionAnalysis
from .mbcssm import Big5SMModel


class Big5Prober(MultiByteCharSetProber):
    def __init__(self):
        MultiByteCharSetProber.__init__(self)
        self._mCodingSM = CodingStateMachine(Big5SMModel)
        self._mDistributionAnalyzer = Big5DistributionAnalysis()
        self.reset()

    def get_charset_name(self):
        return "Big5"
python3.4/site-packages/pip/_vendor/requests/utils.py000064400000047005151735047770016671 0ustar00# -*- coding: utf-8 -*-

"""
requests.utils
~~~~~~~~~~~~~~

This module provides utility functions that are used within Requests
that are also useful for external consumption.

"""

import cgi
import codecs
import collections
import io
import os
import platform
import re
import sys
import socket
import struct

from . import __version__
from . import certs
from .compat import parse_http_list as _parse_list_header
from .compat import (quote, urlparse, bytes, str, OrderedDict, unquote, is_py2,
                     builtin_str, getproxies, proxy_bypass, urlunparse)
from .cookies import RequestsCookieJar, cookiejar_from_dict
from .structures import CaseInsensitiveDict
from .exceptions import InvalidURL

_hush_pyflakes = (RequestsCookieJar,)

NETRC_FILES = ('.netrc', '_netrc')

DEFAULT_CA_BUNDLE_PATH = certs.where()


def dict_to_sequence(d):
    """Returns an internal sequence dictionary update."""

    if hasattr(d, 'items'):
        d = d.items()

    return d


def super_len(o):
    if hasattr(o, '__len__'):
        return len(o)

    if hasattr(o, 'len'):
        return o.len

    if hasattr(o, 'fileno'):
        try:
            fileno = o.fileno()
        except io.UnsupportedOperation:
            pass
        else:
            return os.fstat(fileno).st_size

    if hasattr(o, 'getvalue'):
        # e.g. BytesIO, cStringIO.StringIO
        return len(o.getvalue())


def get_netrc_auth(url):
    """Returns the Requests tuple auth for a given url from netrc."""

    try:
        from netrc import netrc, NetrcParseError

        netrc_path = None

        for f in NETRC_FILES:
            try:
                loc = os.path.expanduser('~/{0}'.format(f))
            except KeyError:
                # os.path.expanduser can fail when $HOME is undefined and
                # getpwuid fails. See http://bugs.python.org/issue20164 &
                # https://github.com/kennethreitz/requests/issues/1846
                return

            if os.path.exists(loc):
                netrc_path = loc
                break

        # Abort early if there isn't one.
        if netrc_path is None:
            return

        ri = urlparse(url)

        # Strip port numbers from netloc
        host = ri.netloc.split(':')[0]

        try:
            _netrc = netrc(netrc_path).authenticators(host)
            if _netrc:
                # Return with login / password
                login_i = (0 if _netrc[0] else 1)
                return (_netrc[login_i], _netrc[2])
        except (NetrcParseError, IOError):
            # If there was a parsing error or a permissions issue reading the file,
            # we'll just skip netrc auth
            pass

    # AppEngine hackiness.
    except (ImportError, AttributeError):
        pass


def guess_filename(obj):
    """Tries to guess the filename of the given object."""
    name = getattr(obj, 'name', None)
    if name and name[0] != '<' and name[-1] != '>':
        return os.path.basename(name)


def from_key_val_list(value):
    """Take an object and test to see if it can be represented as a
    dictionary. Unless it can not be represented as such, return an
    OrderedDict, e.g.,

    ::

        >>> from_key_val_list([('key', 'val')])
        OrderedDict([('key', 'val')])
        >>> from_key_val_list('string')
        ValueError: need more than 1 value to unpack
        >>> from_key_val_list({'key': 'val'})
        OrderedDict([('key', 'val')])
    """
    if value is None:
        return None

    if isinstance(value, (str, bytes, bool, int)):
        raise ValueError('cannot encode objects that are not 2-tuples')

    return OrderedDict(value)


def to_key_val_list(value):
    """Take an object and test to see if it can be represented as a
    dictionary. If it can be, return a list of tuples, e.g.,

    ::

        >>> to_key_val_list([('key', 'val')])
        [('key', 'val')]
        >>> to_key_val_list({'key': 'val'})
        [('key', 'val')]
        >>> to_key_val_list('string')
        ValueError: cannot encode objects that are not 2-tuples.
    """
    if value is None:
        return None

    if isinstance(value, (str, bytes, bool, int)):
        raise ValueError('cannot encode objects that are not 2-tuples')

    if isinstance(value, collections.Mapping):
        value = value.items()

    return list(value)


# From mitsuhiko/werkzeug (used with permission).
def parse_list_header(value):
    """Parse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Quotes are removed automatically after parsing.

    It basically works like :func:`parse_set_header` just that items
    may appear multiple times and case sensitivity is preserved.

    The return value is a standard :class:`list`:

    >>> parse_list_header('token, "quoted value"')
    ['token', 'quoted value']

    To create a header from the :class:`list` again, use the
    :func:`dump_header` function.

    :param value: a string with a list header.
    :return: :class:`list`
    """
    result = []
    for item in _parse_list_header(value):
        if item[:1] == item[-1:] == '"':
            item = unquote_header_value(item[1:-1])
        result.append(item)
    return result


# From mitsuhiko/werkzeug (used with permission).
def parse_dict_header(value):
    """Parse lists of key, value pairs as described by RFC 2068 Section 2 and
    convert them into a python dict:

    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
    >>> type(d) is dict
    True
    >>> sorted(d.items())
    [('bar', 'as well'), ('foo', 'is a fish')]

    If there is no value for a key it will be `None`:

    >>> parse_dict_header('key_without_value')
    {'key_without_value': None}

    To create a header from the :class:`dict` again, use the
    :func:`dump_header` function.

    :param value: a string with a dict header.
    :return: :class:`dict`
    """
    result = {}
    for item in _parse_list_header(value):
        if '=' not in item:
            result[item] = None
            continue
        name, value = item.split('=', 1)
        if value[:1] == value[-1:] == '"':
            value = unquote_header_value(value[1:-1])
        result[name] = value
    return result


# From mitsuhiko/werkzeug (used with permission).
def unquote_header_value(value, is_filename=False):
    r"""Unquotes a header value.  (Reversal of :func:`quote_header_value`).
    This does not use the real unquoting but what browsers are actually
    using for quoting.

    :param value: the header value to unquote.
    """
    if value and value[0] == value[-1] == '"':
        # this is not the real unquoting, but fixing this so that the
        # RFC is met will result in bugs with internet explorer and
        # probably some other browsers as well.  IE for example is
        # uploading files with "C:\foo\bar.txt" as filename
        value = value[1:-1]

        # if this is a filename and the starting characters look like
        # a UNC path, then just return the value without quotes.  Using the
        # replace sequence below on a UNC path has the effect of turning
        # the leading double slash into a single slash and then
        # _fix_ie_filename() doesn't work correctly.  See #458.
        if not is_filename or value[:2] != '\\\\':
            return value.replace('\\\\', '\\').replace('\\"', '"')
    return value


def dict_from_cookiejar(cj):
    """Returns a key/value dictionary from a CookieJar.

    :param cj: CookieJar object to extract cookies from.
    """

    cookie_dict = {}

    for cookie in cj:
        cookie_dict[cookie.name] = cookie.value

    return cookie_dict


def add_dict_to_cookiejar(cj, cookie_dict):
    """Returns a CookieJar from a key/value dictionary.

    :param cj: CookieJar to insert cookies into.
    :param cookie_dict: Dict of key/values to insert into CookieJar.
    """

    cj2 = cookiejar_from_dict(cookie_dict)
    cj.update(cj2)
    return cj


def get_encodings_from_content(content):
    """Returns encodings from given content string.

    :param content: bytestring to extract encodings from.
    """

    charset_re = re.compile(r'<meta.*?charset=["\']*(.+?)["\'>]', flags=re.I)
    pragma_re = re.compile(r'<meta.*?content=["\']*;?charset=(.+?)["\'>]', flags=re.I)
    xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]')

    return (charset_re.findall(content) +
            pragma_re.findall(content) +
            xml_re.findall(content))


def get_encoding_from_headers(headers):
    """Returns encodings from given HTTP Header Dict.

    :param headers: dictionary to extract encoding from.
    """

    content_type = headers.get('content-type')

    if not content_type:
        return None

    content_type, params = cgi.parse_header(content_type)

    if 'charset' in params:
        return params['charset'].strip("'\"")

    if 'text' in content_type:
        return 'ISO-8859-1'


def stream_decode_response_unicode(iterator, r):
    """Stream decodes a iterator."""

    if r.encoding is None:
        for item in iterator:
            yield item
        return

    decoder = codecs.getincrementaldecoder(r.encoding)(errors='replace')
    for chunk in iterator:
        rv = decoder.decode(chunk)
        if rv:
            yield rv
    rv = decoder.decode(b'', final=True)
    if rv:
        yield rv


def iter_slices(string, slice_length):
    """Iterate over slices of a string."""
    pos = 0
    while pos < len(string):
        yield string[pos:pos + slice_length]
        pos += slice_length


def get_unicode_from_response(r):
    """Returns the requested content back in unicode.

    :param r: Response object to get unicode content from.

    Tried:

    1. charset from content-type

    2. every encodings from ``<meta ... charset=XXX>``

    3. fall back and replace all unicode characters

    """

    tried_encodings = []

    # Try charset from content-type
    encoding = get_encoding_from_headers(r.headers)

    if encoding:
        try:
            return str(r.content, encoding)
        except UnicodeError:
            tried_encodings.append(encoding)

    # Fall back:
    try:
        return str(r.content, encoding, errors='replace')
    except TypeError:
        return r.content


# The unreserved URI characters (RFC 3986)
UNRESERVED_SET = frozenset(
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
    + "0123456789-._~")


def unquote_unreserved(uri):
    """Un-escape any percent-escape sequences in a URI that are unreserved
    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
    """
    parts = uri.split('%')
    for i in range(1, len(parts)):
        h = parts[i][0:2]
        if len(h) == 2 and h.isalnum():
            try:
                c = chr(int(h, 16))
            except ValueError:
                raise InvalidURL("Invalid percent-escape sequence: '%s'" % h)

            if c in UNRESERVED_SET:
                parts[i] = c + parts[i][2:]
            else:
                parts[i] = '%' + parts[i]
        else:
            parts[i] = '%' + parts[i]
    return ''.join(parts)


def requote_uri(uri):
    """Re-quote the given URI.

    This function passes the given URI through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.
    """
    # Unquote only the unreserved characters
    # Then quote only illegal characters (do not quote reserved, unreserved,
    # or '%')
    return quote(unquote_unreserved(uri), safe="!#$%&'()*+,/:;=?@[]~")


def address_in_network(ip, net):
    """
    This function allows you to check if on IP belongs to a network subnet
    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
    """
    ipaddr = struct.unpack('=L', socket.inet_aton(ip))[0]
    netaddr, bits = net.split('/')
    netmask = struct.unpack('=L', socket.inet_aton(dotted_netmask(int(bits))))[0]
    network = struct.unpack('=L', socket.inet_aton(netaddr))[0] & netmask
    return (ipaddr & netmask) == (network & netmask)


def dotted_netmask(mask):
    """
    Converts mask from /xx format to xxx.xxx.xxx.xxx
    Example: if mask is 24 function returns 255.255.255.0
    """
    bits = 0xffffffff ^ (1 << 32 - mask) - 1
    return socket.inet_ntoa(struct.pack('>I', bits))


def is_ipv4_address(string_ip):
    try:
        socket.inet_aton(string_ip)
    except socket.error:
        return False
    return True


def is_valid_cidr(string_network):
    """Very simple check of the cidr format in no_proxy variable"""
    if string_network.count('/') == 1:
        try:
            mask = int(string_network.split('/')[1])
        except ValueError:
            return False

        if mask < 1 or mask > 32:
            return False

        try:
            socket.inet_aton(string_network.split('/')[0])
        except socket.error:
            return False
    else:
        return False
    return True


def should_bypass_proxies(url):
    """
    Returns whether we should bypass proxies or not.
    """
    get_proxy = lambda k: os.environ.get(k) or os.environ.get(k.upper())

    # First check whether no_proxy is defined. If it is, check that the URL
    # we're getting isn't in the no_proxy list.
    no_proxy = get_proxy('no_proxy')
    netloc = urlparse(url).netloc

    if no_proxy:
        # We need to check whether we match here. We need to see if we match
        # the end of the netloc, both with and without the port.
        no_proxy = no_proxy.replace(' ', '').split(',')

        ip = netloc.split(':')[0]
        if is_ipv4_address(ip):
            for proxy_ip in no_proxy:
                if is_valid_cidr(proxy_ip):
                    if address_in_network(ip, proxy_ip):
                        return True
        else:
            for host in no_proxy:
                if netloc.endswith(host) or netloc.split(':')[0].endswith(host):
                    # The URL does match something in no_proxy, so we don't want
                    # to apply the proxies on this URL.
                    return True

    # If the system proxy settings indicate that this URL should be bypassed,
    # don't proxy.
    # The proxy_bypass function is incredibly buggy on OS X in early versions
    # of Python 2.6, so allow this call to fail. Only catch the specific
    # exceptions we've seen, though: this call failing in other ways can reveal
    # legitimate problems.
    try:
        bypass = proxy_bypass(netloc)
    except (TypeError, socket.gaierror):
        bypass = False

    if bypass:
        return True

    return False

def get_environ_proxies(url):
    """Return a dict of environment proxies."""
    if should_bypass_proxies(url):
        return {}
    else:
        return getproxies()


def default_user_agent(name="python-requests"):
    """Return a string representing the default user agent."""
    _implementation = platform.python_implementation()

    if _implementation == 'CPython':
        _implementation_version = platform.python_version()
    elif _implementation == 'PyPy':
        _implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                                sys.pypy_version_info.minor,
                                                sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            _implementation_version = ''.join([_implementation_version, sys.pypy_version_info.releaselevel])
    elif _implementation == 'Jython':
        _implementation_version = platform.python_version()  # Complete Guess
    elif _implementation == 'IronPython':
        _implementation_version = platform.python_version()  # Complete Guess
    else:
        _implementation_version = 'Unknown'

    try:
        p_system = platform.system()
        p_release = platform.release()
    except IOError:
        p_system = 'Unknown'
        p_release = 'Unknown'

    return " ".join(['%s/%s' % (name, __version__),
                     '%s/%s' % (_implementation, _implementation_version),
                     '%s/%s' % (p_system, p_release)])


def default_headers():
    return CaseInsensitiveDict({
        'User-Agent': default_user_agent(),
        'Accept-Encoding': ', '.join(('gzip', 'deflate')),
        'Accept': '*/*'
    })


def parse_header_links(value):
    """Return a dict of parsed link headers proxies.

    i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

    """

    links = []

    replace_chars = " '\""

    for val in value.split(","):
        try:
            url, params = val.split(";", 1)
        except ValueError:
            url, params = val, ''

        link = {}

        link["url"] = url.strip("<> '\"")

        for param in params.split(";"):
            try:
                key, value = param.split("=")
            except ValueError:
                break

            link[key.strip(replace_chars)] = value.strip(replace_chars)

        links.append(link)

    return links


# Null bytes; no need to recreate these on each call to guess_json_utf
_null = '\x00'.encode('ascii')  # encoding to ASCII for Python 3
_null2 = _null * 2
_null3 = _null * 3


def guess_json_utf(data):
    # JSON always starts with two ASCII characters, so detection is as
    # easy as counting the nulls and from their location and count
    # determine the encoding. Also detect a BOM, if present.
    sample = data[:4]
    if sample in (codecs.BOM_UTF32_LE, codecs.BOM32_BE):
        return 'utf-32'     # BOM included
    if sample[:3] == codecs.BOM_UTF8:
        return 'utf-8-sig'  # BOM included, MS style (discouraged)
    if sample[:2] in (codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE):
        return 'utf-16'     # BOM included
    nullcount = sample.count(_null)
    if nullcount == 0:
        return 'utf-8'
    if nullcount == 2:
        if sample[::2] == _null2:   # 1st and 3rd are null
            return 'utf-16-be'
        if sample[1::2] == _null2:  # 2nd and 4th are null
            return 'utf-16-le'
        # Did not detect 2 valid UTF-16 ascii-range characters
    if nullcount == 3:
        if sample[:3] == _null3:
            return 'utf-32-be'
        if sample[1:] == _null3:
            return 'utf-32-le'
        # Did not detect a valid UTF-32 ascii-range character
    return None


def prepend_scheme_if_needed(url, new_scheme):
    '''Given a URL that may or may not have a scheme, prepend the given scheme.
    Does not replace a present scheme with the one provided as an argument.'''
    scheme, netloc, path, params, query, fragment = urlparse(url, new_scheme)

    # urlparse is a finicky beast, and sometimes decides that there isn't a
    # netloc present. Assume that it's being over-cautious, and switch netloc
    # and path if urlparse decided there was no netloc.
    if not netloc:
        netloc, path = path, netloc

    return urlunparse((scheme, netloc, path, params, query, fragment))


def get_auth_from_url(url):
    """Given a url with authentication components, extract them into a tuple of
    username,password."""
    parsed = urlparse(url)

    try:
        auth = (unquote(parsed.username), unquote(parsed.password))
    except (AttributeError, TypeError):
        auth = ('', '')

    return auth


def to_native_string(string, encoding='ascii'):
    """
    Given a string object, regardless of type, returns a representation of that
    string in the native string type, encoding and decoding where necessary.
    This assumes ASCII unless told otherwise.
    """
    out = None

    if isinstance(string, builtin_str):
        out = string
    else:
        if is_py2:
            out = string.encode(encoding)
        else:
            out = string.decode(encoding)

    return out
python3.4/site-packages/pip/_vendor/__init__.py000064400000000412151735047770015404 0ustar00"""
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.

Files inside of pip._vendor should be considered immutable and should only be
updated to versions from upstream.
"""
from __future__ import absolute_import
python3.4/site-packages/pip/_vendor/re-vendor.py000064400000001405151735047770015551 0ustar00import os
import sys
import pip
import glob
import shutil

here = os.path.abspath(os.path.dirname(__file__))

def usage():
    print("Usage: re-vendor.py [clean|vendor]")
    sys.exit(1)

def clean():
    for fn in os.listdir(here):
        dirname = os.path.join(here, fn)
        if os.path.isdir(dirname):
            shutil.rmtree(dirname)
    # six is a single file, not a package
    os.unlink(os.path.join(here, 'six.py'))

def vendor():
    pip.main(['install', '-t', here, '-r', 'vendor.txt'])
    for dirname in glob.glob('*.egg-info'):
        shutil.rmtree(dirname)

if __name__ == '__main__':
    if len(sys.argv) != 2:
        usage()
    if sys.argv[1] == 'clean':
        clean()
    elif sys.argv[1] == 'vendor':
        vendor()
    else:
        usage()
python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py000064400000015010151735047770017622 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys

from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll


winterm = None
if windll is not None:
    winterm = WinTerm()


def is_a_tty(stream):
    return hasattr(stream, 'isatty') and stream.isatty()


class StreamWrapper(object):
    '''
    Wraps a stream (such as stdout), acting as a transparent proxy for all
    attribute access apart from method 'write()', which is delegated to our
    Converter instance.
    '''
    def __init__(self, wrapped, converter):
        # double-underscore everything to prevent clashes with names of
        # attributes on the wrapped stream object.
        self.__wrapped = wrapped
        self.__convertor = converter

    def __getattr__(self, name):
        return getattr(self.__wrapped, name)

    def write(self, text):
        self.__convertor.write(text)


class AnsiToWin32(object):
    '''
    Implements a 'write()' method which, on Windows, will strip ANSI character
    sequences from the text, and if outputting to a tty, will convert them into
    win32 function calls.
    '''
    ANSI_RE = re.compile('\033\[((?:\d|;)*)([a-zA-Z])')

    def __init__(self, wrapped, convert=None, strip=None, autoreset=False):
        # The wrapped stream (normally sys.stdout or sys.stderr)
        self.wrapped = wrapped

        # should we reset colors to defaults after every .write()
        self.autoreset = autoreset

        # create the proxy wrapping our output stream
        self.stream = StreamWrapper(wrapped, self)

        on_windows = sys.platform.startswith('win')

        # should we strip ANSI sequences from our output?
        if strip is None:
            strip = on_windows
        self.strip = strip

        # should we should convert ANSI sequences into win32 calls?
        if convert is None:
            convert = on_windows and is_a_tty(wrapped)
        self.convert = convert

        # dict of ansi codes to win32 functions and parameters
        self.win32_calls = self.get_win32_calls()

        # are we wrapping stderr?
        self.on_stderr = self.wrapped is sys.stderr


    def should_wrap(self):
        '''
        True if this class is actually needed. If false, then the output
        stream will not be affected, nor will win32 calls be issued, so
        wrapping stdout is not actually required. This will generally be
        False on non-Windows platforms, unless optional functionality like
        autoreset has been requested using kwargs to init()
        '''
        return self.convert or self.strip or self.autoreset


    def get_win32_calls(self):
        if self.convert and winterm:
            return {
                AnsiStyle.RESET_ALL: (winterm.reset_all, ),
                AnsiStyle.BRIGHT: (winterm.style, WinStyle.BRIGHT),
                AnsiStyle.DIM: (winterm.style, WinStyle.NORMAL),
                AnsiStyle.NORMAL: (winterm.style, WinStyle.NORMAL),
                AnsiFore.BLACK: (winterm.fore, WinColor.BLACK),
                AnsiFore.RED: (winterm.fore, WinColor.RED),
                AnsiFore.GREEN: (winterm.fore, WinColor.GREEN),
                AnsiFore.YELLOW: (winterm.fore, WinColor.YELLOW),
                AnsiFore.BLUE: (winterm.fore, WinColor.BLUE),
                AnsiFore.MAGENTA: (winterm.fore, WinColor.MAGENTA),
                AnsiFore.CYAN: (winterm.fore, WinColor.CYAN),
                AnsiFore.WHITE: (winterm.fore, WinColor.GREY),
                AnsiFore.RESET: (winterm.fore, ),
                AnsiBack.BLACK: (winterm.back, WinColor.BLACK),
                AnsiBack.RED: (winterm.back, WinColor.RED),
                AnsiBack.GREEN: (winterm.back, WinColor.GREEN),
                AnsiBack.YELLOW: (winterm.back, WinColor.YELLOW),
                AnsiBack.BLUE: (winterm.back, WinColor.BLUE),
                AnsiBack.MAGENTA: (winterm.back, WinColor.MAGENTA),
                AnsiBack.CYAN: (winterm.back, WinColor.CYAN),
                AnsiBack.WHITE: (winterm.back, WinColor.GREY),
                AnsiBack.RESET: (winterm.back, ),
            }


    def write(self, text):
        if self.strip or self.convert:
            self.write_and_convert(text)
        else:
            self.wrapped.write(text)
            self.wrapped.flush()
        if self.autoreset:
            self.reset_all()


    def reset_all(self):
        if self.convert:
            self.call_win32('m', (0,))
        elif not self.wrapped.closed and is_a_tty(self.wrapped):
            self.wrapped.write(Style.RESET_ALL)


    def write_and_convert(self, text):
        '''
        Write the given text to our wrapped stream, stripping any ANSI
        sequences from the text, and optionally converting them into win32
        calls.
        '''
        cursor = 0
        for match in self.ANSI_RE.finditer(text):
            start, end = match.span()
            self.write_plain_text(text, cursor, start)
            self.convert_ansi(*match.groups())
            cursor = end
        self.write_plain_text(text, cursor, len(text))


    def write_plain_text(self, text, start, end):
        if start < end:
            self.wrapped.write(text[start:end])
            self.wrapped.flush()


    def convert_ansi(self, paramstring, command):
        if self.convert:
            params = self.extract_params(paramstring)
            self.call_win32(command, params)


    def extract_params(self, paramstring):
        def split(paramstring):
            for p in paramstring.split(';'):
                if p != '':
                    yield int(p)
        return tuple(split(paramstring))


    def call_win32(self, command, params):
        if params == []:
            params = [0]
        if command == 'm':
            for param in params:
                if param in self.win32_calls:
                    func_args = self.win32_calls[param]
                    func = func_args[0]
                    args = func_args[1:]
                    kwargs = dict(on_stderr=self.on_stderr)
                    func(*args, **kwargs)
        elif command in ('H', 'f'): # set cursor position
            func = winterm.set_cursor_position
            func(params, on_stderr=self.on_stderr)
        elif command in ('J'):
            func = winterm.erase_data
            func(params, on_stderr=self.on_stderr)
        elif command == 'A':
            if params == () or params == None:
                num_rows = 1
            else:
                num_rows = params[0]
            func = winterm.cursor_up
            func(num_rows, on_stderr=self.on_stderr)

python3.4/site-packages/pip/_vendor/colorama/__pycache__/ansi.cpython-34.pyc000064400000003342151735047770022663 0ustar00�
�Re�@s�dZdZdd�ZGdd�de�ZGdd�d�ZGdd	�d	�ZGd
d�d�Zee�Zee�Z	ee�Z
dS)
z�
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
zCstt|�dS)N�m)�CSI�str)�code�r�4/tmp/pip-ztkk0jow-build/pip/_vendor/colorama/ansi.py�
code_to_chars	src@seZdZdd�ZdS)�	AnsiCodescCsRxKt|�D]=}|jd�s
t||�}t||t|��q
q
WdS)N�_)�dir�
startswith�getattr�setattrr)�self�codes�name�valuerrr�__init__
szAnsiCodes.__init__N)�__name__�
__module__�__qualname__rrrrrrsrc@sFeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
S)�AnsiFore��� �!�"�#�$�%�'N)rrr�BLACK�RED�GREEN�YELLOW�BLUE�MAGENTA�CYAN�WHITE�RESETrrrrrsrc@sFeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
S)�AnsiBack�(�)�*�+�,�-�.�/�1N)rrrr r!r"r#r$r%r&r'r(rrrrr)sr)c@s(eZdZdZdZdZdZdS)�	AnsiStyle����N)rrr�BRIGHT�DIM�NORMAL�	RESET_ALLrrrrr3)sr3N)�__doc__rr�objectrrr)r3�Fore�Back�Stylerrrr�<module>spython3.4/site-packages/pip/_vendor/colorama/__pycache__/winterm.cpython-34.pyc000064400000007506151735047770023424 0ustar00�
�Ren�@sVddlmZGdd�de�ZGdd�de�ZGdd�de�ZdS)	�)�win32c@s@eZdZdZdZdZdZdZdZdZ	dZ
d	S)
�WinColor�r������N)�__name__�
__module__�__qualname__�BLACK�BLUE�GREEN�CYAN�RED�MAGENTA�YELLOW�GREY�rr�7/tmp/pip-ztkk0jow-build/pip/_vendor/colorama/winterm.pyrsrc@seZdZdZdZdS)�WinStyler�N)rrr
�NORMAL�BRIGHTrrrrrsrc@s�eZdZdd�Zdd�Zdd�Zddd	�Zdd
dd�Zdd
d
d�Zdd
dd�Z	dd
dd�Z
dd�Zdd
dd�Zdd
dd�Z
dd
dd�ZdS)�WinTermcCsPtjtj�j|_|j|j�|j|_|j|_	|j
|_dS)N)r�GetConsoleScreenBufferInfo�STDOUT�wAttributes�_default�	set_attrs�_fore�
_default_fore�_back�
_default_back�_style�_default_style)�selfrrr�__init__s
zWinTerm.__init__cCs|j|jd|jS)N�)r"r$r&)r(rrr�	get_attrsszWinTerm.get_attrscCs2|d@|_|d?d@|_|tj@|_dS)Nr
r)r"r$rrr&)r(�valuerrrr!"s
zWinTerm.set_attrsNcCs'|j|j�|jd|j�dS)N�attrs)r!r �set_console)r(�	on_stderrrrr�	reset_all'szWinTerm.reset_allFcCs5|dkr|j}n||_|jd|�dS)Nr/)r#r"r.)r(�forer/rrrr1+s	zWinTerm.forecCs5|dkr|j}n||_|jd|�dS)Nr/)r%r$r.)r(�backr/rrrr21s	zWinTerm.backcCs5|dkr|j}n||_|jd|�dS)Nr/)r'r&r.)r(�styler/rrrr37s	z
WinTerm.stylecCsJ|dkr|j�}ntj}|r6tj}ntj||�dS)N)r+rr�STDERR�SetConsoleTextAttribute)r(r-r/�handlerrrr.=s	zWinTerm.set_consolecCs4tj|�j}|jd7_|jd7_|S)Nr)rr�dwCursorPosition�X�Y)r(r6�positionrrr�get_positionEszWinTerm.get_positioncCs?|dkrdStj}|r+tj}ntj||�dS)N)rrr4�SetConsoleCursorPosition)r(r:r/r6rrr�set_cursor_positionMs	zWinTerm.set_cursor_positionrcCsd|dkrdStj}|r+tj}n|j|�}|j||jf}|j||�dS)Nr)rrr4r;r9r8r=)r(�num_rowsr/r6r:�adjusted_positionrrr�	cursor_upWs	zWinTerm.cursor_upcCs�|ddkrdStj}|r/tj}ntjdd�}tj|�}|jj|jj}tj|d||�tj	||j
�||�tj||j|jf�dS)Nrr� )r)rrr4�COORDr�dwSizer8r9�FillConsoleOutputCharacter�FillConsoleOutputAttributer+r<)r(�moder/r6�coord_screen�csbi�dw_con_sizerrr�
erase_dataas	zWinTerm.erase_data)rrr
r)r+r!r0r1r2r3r.r;r=r@rJrrrrrs

rN)�r�objectrrrrrrr�<module>spython3.4/site-packages/pip/_vendor/colorama/__pycache__/__init__.cpython-34.pyc000064400000000563151735047770023472 0ustar00�
�Re��@sRddlmZmZmZddlmZmZmZddlm	Z	dZ
dS)�)�init�deinit�reinit)�Fore�Back�Style)�AnsiToWin32z0.3.1N)�
initialiserrr�ansirrr�ansitowin32r�__version__�r
r
�8/tmp/pip-ztkk0jow-build/pip/_vendor/colorama/__init__.py�<module>spython3.4/site-packages/pip/_vendor/colorama/__pycache__/ansitowin32.cpython-34.pyc000064400000014074151735047770024115 0ustar00�
�Re�@s�ddlZddlZddlmZmZmZmZddlmZm	Z	m
Z
ddlmZdZedk	r�e�Zndd�Z
Gdd	�d	e�ZGd
d�de�ZdS)�N�)�AnsiFore�AnsiBack�	AnsiStyle�Style)�WinTerm�WinColor�WinStyle)�windllcCst|d�o|j�S)N�isatty)�hasattrr)�stream�r�;/tmp/pip-ztkk0jow-build/pip/_vendor/colorama/ansitowin32.py�is_a_ttysrc@s:eZdZdZdd�Zdd�Zdd�ZdS)	�
StreamWrapperz�
    Wraps a stream (such as stdout), acting as a transparent proxy for all
    attribute access apart from method 'write()', which is delegated to our
    Converter instance.
    cCs||_||_dS)N)�_StreamWrapper__wrapped�_StreamWrapper__convertor)�self�wrapped�	converterrrr�__init__s	zStreamWrapper.__init__cCst|j|�S)N)�getattrr)r�namerrr�__getattr__szStreamWrapper.__getattr__cCs|jj|�dS)N)r�write)r�textrrrr"szStreamWrapper.writeN)�__name__�
__module__�__qualname__�__doc__rrrrrrrrsrc@s�eZdZdZejd�Zddddd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�AnsiToWin32z�
    Implements a 'write()' method which, on Windows, will strip ANSI character
    sequences from the text, and if outputting to a tty, will convert them into
    win32 function calls.
    z\[((?:\d|;)*)([a-zA-Z])NFcCs�||_||_t||�|_tjjd�}|dkrK|}n||_|dkru|oot|�}n||_	|j
�|_|jtjk|_
dS)N�win)r�	autoresetrr
�sys�platform�
startswith�stripr�convert�get_win32_calls�win32_calls�stderr�	on_stderr)rrr(r'r#�
on_windowsrrrr.s					zAnsiToWin32.__init__cCs|jp|jp|jS)aj
        True if this class is actually needed. If false, then the output
        stream will not be affected, nor will win32 calls be issued, so
        wrapping stdout is not actually required. This will generally be
        False on non-Windows platforms, unless optional functionality like
        autoreset has been requested using kwargs to init()
        )r(r'r#)rrrr�should_wrapKszAnsiToWin32.should_wrapcCs�|jr�tr�itjftj6tjtjftj6tjtjftj	6tjtjftj6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
tjft
j6tj
ft
j6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjtjftj6tjftj6SdS)N)r(�winterm�	reset_allr�	RESET_ALL�styler	�BRIGHT�NORMAL�DIM�forer�BLACKr�RED�GREEN�YELLOW�BLUE�MAGENTA�CYAN�GREY�WHITE�RESET�backr)rrrrr)Vs0zAnsiToWin32.get_win32_callscCsY|js|jr"|j|�n|jj|�|jj�|jrU|j�ndS)N)r'r(�write_and_convertrr�flushr#r0)rrrrrrrs
	zAnsiToWin32.writecCsR|jr|jdd�n2|jjrNt|j�rN|jjtj�ndS)N�mr)r)r(�
call_win32r�closedrrrr1)rrrrr0|s	zAnsiToWin32.reset_allcCs~d}xX|jj|�D]D}|j�\}}|j|||�|j|j��|}qW|j||t|��dS)z�
        Write the given text to our wrapped stream, stripping any ANSI
        sequences from the text, and optionally converting them into win32
        calls.
        rN)�ANSI_RE�finditer�span�write_plain_text�convert_ansi�groups�len)rr�cursor�match�start�endrrrrB�s
zAnsiToWin32.write_and_convertcCs:||kr6|jj|||��|jj�ndS)N)rrrC)rrrPrQrrrrJ�szAnsiToWin32.write_plain_textcCs/|jr+|j|�}|j||�ndS)N)r(�extract_paramsrE)r�paramstring�command�paramsrrrrK�s	zAnsiToWin32.convert_ansicCsdd�}t||��S)Ncss8x1|jd�D] }|dkrt|�VqqWdS)N�;�)�split�int)rS�prrrrX�sz)AnsiToWin32.extract_params.<locals>.split)�tuple)rrSrXrrrrR�szAnsiToWin32.extract_paramsc	Cs@|gkrdg}n|dkr�x|D]^}||jkr+|j|}|d}|dd�}td|j�}|||�q+q+Wn�|d	kr�tj}||d|j�n�|dkr�tj}||d|j�nV|dkr<|fks
|dkrd}n
|d}tj}||d|j�ndS)
NrrDrr,�H�f�J�A)r\r])r*�dictr,r/�set_cursor_position�
erase_data�	cursor_up)	rrTrU�param�	func_args�func�args�kwargs�num_rowsrrrrE�s,


			
	zAnsiToWin32.call_win32)rrrr �re�compilerGrr.r)rr0rBrJrKrRrErrrrr!&s
r!)rjr$�ansirrrrr/rrr	�win32r
r�objectrr!rrrr�<module>s"python3.4/site-packages/pip/_vendor/colorama/__pycache__/win32.cpython-34.pyc000064400000006663151735047770022704 0ustar00�
�Re/�@s]dZdZddlZddlmZy#eej�ZddlmZWn*eefk
rwdZdd�Z	Yn�Xddlm
Z
mZmZm
Z
mZmZmZGd	d
�d
e�ZejjZejge_eje_ejjZejee�ge_eje_ejj	Zejejge_eje_ejjZejej ge_eje_ejj!Z"ejeejej eej�ge"_eje"_ejj#Z$ejejejej eej�ge$_eje$_iee�e6ee�e6Z%edd�Zd
d�Z	dd�Zdd�Z&dd�Z#dS)���N)�
LibraryLoader)�wintypescGsdS)N�)�_rr�5/tmp/pip-ztkk0jow-build/pip/_vendor/colorama/win32.py�<lambda>sr	)�byref�	Structure�c_char�c_short�c_uint32�c_ushort�POINTERc@sdeZdZdZdejfdejfdejfdejfdejfgZdd�Z	d	S)
�CONSOLE_SCREEN_BUFFER_INFOzstruct in wincon.h.�dwSize�dwCursorPosition�wAttributes�srWindow�dwMaximumWindowSizecCshd|jj|jj|jj|jj|j|jj|jj|jj|jj	|j
j|j
jfS)Nz"(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d))r�Y�Xrrr�Top�LeftZBottomZRightr)�selfrrr�__str__s$z"CONSOLE_SCREEN_BUFFER_INFO.__str__N)
�__name__�
__module__�__qualname__�__doc__r�_COORD�WORDZ
SMALL_RECT�_fields_rrrrrrsrcCs,t|}t�}t|t|��}|S)N)�handlesr�_GetConsoleScreenBufferInfor
)�	stream_id�handle�csbi�successrrr�GetConsoleScreenBufferInfo[s

	r*cCst|}t||�S)N)r$�_SetConsoleTextAttribute)r&�attrsr'rrr�SetConsoleTextAttributebs
r-cCs�tj|�}|jdks-|jdkr1dStj|jd|jd�}tt�j}|j|j7_|j|j7_t	|}t
||�S)Nr�)rr!rrr*�STDOUTrrrr$�_SetConsoleCursorPosition)r&�position�adjusted_position�srr'rrr�SetConsoleCursorPositionfs 
r4cCsYt|}t|�}tj|�}tjd�}t||||t|��}|jS)Nr)r$rr�DWORD�_FillConsoleOutputCharacterAr
�value)r&�char�length�startr'�num_writtenr)rrr�FillConsoleOutputCharacterws
r<cCsSt|}tj|�}tj|�}tjd�}t||||t|��S)za FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )r)r$rr"r5�_FillConsoleOutputAttributer
)r&�attrr9r:r'�	attributer;rrr�FillConsoleOutputAttribute�s
r@i����i�)'r/�STDERR�ctypesr�WinDLL�windllr�AttributeError�ImportErrorr-r
rrr
rrrr�kernel32ZGetStdHandleZ
_GetStdHandler5�argtypes�HANDLE�restyper*r%ZBOOLr+r"r4r0r!ZFillConsoleOutputCharacterAr6r@r=r$r<rrrr�<module>s`4

python3.4/site-packages/pip/_vendor/colorama/__pycache__/initialise.cpython-34.pyc000064400000002654151735047770024070 0ustar00�
�Re�@s�ddlZddlZddlmZejZejZejaeja	da
dd�Zdddddd	�Zd
d�Z
dd
�Zdd�ZdS)�N�)�AnsiToWin32FcCstt�j�dS)N)r�orig_stdout�	reset_all�rr�:/tmp/pip-ztkk0jow-build/pip/_vendor/colorama/initialise.pyrsrTcCs�|r+t|||g�r+td��ntt||||�t_att||||�t_a	t
s�tjt
�da
ndS)Nz,wrap=False conflicts with any other arg=TrueT)�any�
ValueError�wrap_streamr�sys�stdout�wrapped_stdout�orig_stderr�stderr�wrapped_stderr�atexit_done�atexit�registerr)�	autoreset�convert�strip�wraprrr�inits
rcCstt_tt_dS)N)rrrrrrrrr�deinit&s	rcCstt_tt_dS)N)r
rrrrrrr�reinit+s	rcCsC|r?t|d|d|d|�}|j�r?|j}q?n|S)Nrrr)r�should_wrap�stream)rrrrr�wrapperrrrr
0s	r
)rr�ansitowin32rrrrrr
rrrrrrr
rrrr�<module>s				python3.4/site-packages/pip/_vendor/colorama/win32.py000064400000011457151735047770016417 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.

# from winbase.h
STDOUT = -11
STDERR = -12

import ctypes
from ctypes import LibraryLoader

try:
    windll = LibraryLoader(ctypes.WinDLL)
    from ctypes import wintypes
except (AttributeError, ImportError):
    windll = None
    SetConsoleTextAttribute = lambda *_: None
else:
    from ctypes import (
        byref, Structure, c_char, c_short, c_uint32, c_ushort, POINTER
    )

    class CONSOLE_SCREEN_BUFFER_INFO(Structure):
        """struct in wincon.h."""
        _fields_ = [
            ("dwSize", wintypes._COORD),
            ("dwCursorPosition", wintypes._COORD),
            ("wAttributes", wintypes.WORD),
            ("srWindow", wintypes.SMALL_RECT),
            ("dwMaximumWindowSize", wintypes._COORD),
        ]
        def __str__(self):
            return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % (
                self.dwSize.Y, self.dwSize.X
                , self.dwCursorPosition.Y, self.dwCursorPosition.X
                , self.wAttributes
                , self.srWindow.Top, self.srWindow.Left, self.srWindow.Bottom, self.srWindow.Right
                , self.dwMaximumWindowSize.Y, self.dwMaximumWindowSize.X
            )

    _GetStdHandle = windll.kernel32.GetStdHandle
    _GetStdHandle.argtypes = [
        wintypes.DWORD,
    ]
    _GetStdHandle.restype = wintypes.HANDLE

    _GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo
    _GetConsoleScreenBufferInfo.argtypes = [
        wintypes.HANDLE,
        POINTER(CONSOLE_SCREEN_BUFFER_INFO),
    ]
    _GetConsoleScreenBufferInfo.restype = wintypes.BOOL

    _SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute
    _SetConsoleTextAttribute.argtypes = [
        wintypes.HANDLE,
        wintypes.WORD,
    ]
    _SetConsoleTextAttribute.restype = wintypes.BOOL

    _SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition
    _SetConsoleCursorPosition.argtypes = [
        wintypes.HANDLE,
        wintypes._COORD,
    ]
    _SetConsoleCursorPosition.restype = wintypes.BOOL

    _FillConsoleOutputCharacterA = windll.kernel32.FillConsoleOutputCharacterA
    _FillConsoleOutputCharacterA.argtypes = [
        wintypes.HANDLE,
        c_char,
        wintypes.DWORD,
        wintypes._COORD,
        POINTER(wintypes.DWORD),
    ]
    _FillConsoleOutputCharacterA.restype = wintypes.BOOL

    _FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute
    _FillConsoleOutputAttribute.argtypes = [
        wintypes.HANDLE,
        wintypes.WORD,
        wintypes.DWORD,
        wintypes._COORD,
        POINTER(wintypes.DWORD),
    ]
    _FillConsoleOutputAttribute.restype = wintypes.BOOL

    handles = {
        STDOUT: _GetStdHandle(STDOUT),
        STDERR: _GetStdHandle(STDERR),
    }

    def GetConsoleScreenBufferInfo(stream_id=STDOUT):
        handle = handles[stream_id]
        csbi = CONSOLE_SCREEN_BUFFER_INFO()
        success = _GetConsoleScreenBufferInfo(
            handle, byref(csbi))
        return csbi

    def SetConsoleTextAttribute(stream_id, attrs):
        handle = handles[stream_id]
        return _SetConsoleTextAttribute(handle, attrs)

    def SetConsoleCursorPosition(stream_id, position):
        position = wintypes._COORD(*position)
        # If the position is out of range, do nothing.
        if position.Y <= 0 or position.X <= 0:
            return
        # Adjust for Windows' SetConsoleCursorPosition:
        #    1. being 0-based, while ANSI is 1-based.
        #    2. expecting (x,y), while ANSI uses (y,x).
        adjusted_position = wintypes._COORD(position.Y - 1, position.X - 1)
        # Adjust for viewport's scroll position
        sr = GetConsoleScreenBufferInfo(STDOUT).srWindow
        adjusted_position.Y += sr.Top
        adjusted_position.X += sr.Left
        # Resume normal processing
        handle = handles[stream_id]
        return _SetConsoleCursorPosition(handle, adjusted_position)

    def FillConsoleOutputCharacter(stream_id, char, length, start):
        handle = handles[stream_id]
        char = c_char(char)
        length = wintypes.DWORD(length)
        num_written = wintypes.DWORD(0)
        # Note that this is hard-coded for ANSI (vs wide) bytes.
        success = _FillConsoleOutputCharacterA(
            handle, char, length, start, byref(num_written))
        return num_written.value

    def FillConsoleOutputAttribute(stream_id, attr, length, start):
        ''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )'''
        handle = handles[stream_id]
        attribute = wintypes.WORD(attr)
        length = wintypes.DWORD(length)
        num_written = wintypes.DWORD(0)
        # Note that this is hard-coded for ANSI (vs wide) bytes.
        return _FillConsoleOutputAttribute(
            handle, attribute, length, start, byref(num_written))
python3.4/site-packages/pip/_vendor/colorama/initialise.py000064400000002421151735047770017576 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import atexit
import sys

from .ansitowin32 import AnsiToWin32


orig_stdout = sys.stdout
orig_stderr = sys.stderr

wrapped_stdout = sys.stdout
wrapped_stderr = sys.stderr

atexit_done = False


def reset_all():
    AnsiToWin32(orig_stdout).reset_all()


def init(autoreset=False, convert=None, strip=None, wrap=True):

    if not wrap and any([autoreset, convert, strip]):
        raise ValueError('wrap=False conflicts with any other arg=True')

    global wrapped_stdout, wrapped_stderr
    sys.stdout = wrapped_stdout = \
        wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
    sys.stderr = wrapped_stderr = \
        wrap_stream(orig_stderr, convert, strip, autoreset, wrap)

    global atexit_done
    if not atexit_done:
        atexit.register(reset_all)
        atexit_done = True


def deinit():
    sys.stdout = orig_stdout
    sys.stderr = orig_stderr


def reinit():
    sys.stdout = wrapped_stdout
    sys.stderr = wrapped_stdout


def wrap_stream(stream, convert, strip, autoreset, wrap):
    if wrap:
        wrapper = AnsiToWin32(stream,
            convert=convert, strip=strip, autoreset=autoreset)
        if wrapper.should_wrap():
            stream = wrapper.stream
    return stream


python3.4/site-packages/pip/_vendor/colorama/__init__.py000064400000000331151735047770017201 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from .initialise import init, deinit, reinit
from .ansi import Fore, Back, Style
from .ansitowin32 import AnsiToWin32

__version__ = '0.3.1'

python3.4/site-packages/pip/_vendor/colorama/winterm.py000064400000010156151735047770017135 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32


# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4
    MAGENTA = 5
    YELLOW  = 6
    GREY    = 7

# from wincon.h
class WinStyle(object):
    NORMAL = 0x00 # dim text, dim background
    BRIGHT = 0x08 # bright text, dim background


class WinTerm(object):

    def __init__(self):
        self._default = win32.GetConsoleScreenBufferInfo(win32.STDOUT).wAttributes
        self.set_attrs(self._default)
        self._default_fore = self._fore
        self._default_back = self._back
        self._default_style = self._style

    def get_attrs(self):
        return self._fore + self._back * 16 + self._style

    def set_attrs(self, value):
        self._fore = value & 7
        self._back = (value >> 4) & 7
        self._style = value & WinStyle.BRIGHT

    def reset_all(self, on_stderr=None):
        self.set_attrs(self._default)
        self.set_console(attrs=self._default)

    def fore(self, fore=None, on_stderr=False):
        if fore is None:
            fore = self._default_fore
        self._fore = fore
        self.set_console(on_stderr=on_stderr)

    def back(self, back=None, on_stderr=False):
        if back is None:
            back = self._default_back
        self._back = back
        self.set_console(on_stderr=on_stderr)

    def style(self, style=None, on_stderr=False):
        if style is None:
            style = self._default_style
        self._style = style
        self.set_console(on_stderr=on_stderr)

    def set_console(self, attrs=None, on_stderr=False):
        if attrs is None:
            attrs = self.get_attrs()
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        win32.SetConsoleTextAttribute(handle, attrs)

    def get_position(self, handle):
        position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition
        # Because Windows coordinates are 0-based,
        # and win32.SetConsoleCursorPosition expects 1-based.
        position.X += 1
        position.Y += 1
        return position
    
    def set_cursor_position(self, position=None, on_stderr=False):
        if position is None:
            #I'm not currently tracking the position, so there is no default.
            #position = self.get_position()
            return
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        win32.SetConsoleCursorPosition(handle, position)

    def cursor_up(self, num_rows=0, on_stderr=False):
        if num_rows == 0:
            return
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        position = self.get_position(handle)
        adjusted_position = (position.Y - num_rows, position.X)
        self.set_cursor_position(adjusted_position, on_stderr)

    def erase_data(self, mode=0, on_stderr=False):
        # 0 (or None) should clear from the cursor to the end of the screen.
        # 1 should clear from the cursor to the beginning of the screen.
        # 2 should clear the entire screen. (And maybe move cursor to (1,1)?)
        #
        # At the moment, I only support mode 2. From looking at the API, it
        #    should be possible to calculate a different number of bytes to clear,
        #    and to do so relative to the cursor position.
        if mode[0] not in (2,):
            return
        handle = win32.STDOUT
        if on_stderr:
            handle = win32.STDERR
        # here's where we'll home the cursor
        coord_screen = win32.COORD(0,0)
        csbi = win32.GetConsoleScreenBufferInfo(handle)
        # get the number of character cells in the current buffer
        dw_con_size = csbi.dwSize.X * csbi.dwSize.Y
        # fill the entire screen with blanks
        win32.FillConsoleOutputCharacter(handle, ' ', dw_con_size, coord_screen)
        # now set the buffer's attributes accordingly
        win32.FillConsoleOutputAttribute(handle, self.get_attrs(), dw_con_size, coord_screen );
        # put the cursor at (0, 0)
        win32.SetConsoleCursorPosition(handle, (coord_screen.X, coord_screen.Y))
python3.4/site-packages/pip/_vendor/colorama/ansi.py000064400000002017151735047770016377 0ustar00# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
'''
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
'''

CSI = '\033['

def code_to_chars(code):
    return CSI + str(code) + 'm'

class AnsiCodes(object):
    def __init__(self, codes):
        for name in dir(codes):
            if not name.startswith('_'):
                value = getattr(codes, name)
                setattr(self, name, code_to_chars(value))

class AnsiFore:
    BLACK   = 30
    RED     = 31
    GREEN   = 32
    YELLOW  = 33
    BLUE    = 34
    MAGENTA = 35
    CYAN    = 36
    WHITE   = 37
    RESET   = 39

class AnsiBack:
    BLACK   = 40
    RED     = 41
    GREEN   = 42
    YELLOW  = 43
    BLUE    = 44
    MAGENTA = 45
    CYAN    = 46
    WHITE   = 47
    RESET   = 49

class AnsiStyle:
    BRIGHT    = 1
    DIM       = 2
    NORMAL    = 22
    RESET_ALL = 0

Fore = AnsiCodes( AnsiFore )
Back = AnsiCodes( AnsiBack )
Style = AnsiCodes( AnsiStyle )

python3.4/site-packages/pip/_vendor/pkg_resources.py000064400000303271151735047770016531 0ustar00"""
Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
"""

import sys
import os
import time
import re
import imp
import zipfile
import zipimport
import warnings
import stat
import functools
import pkgutil
import token
import symbol
import operator
import platform
from pkgutil import get_importer

try:
    from urlparse import urlparse, urlunparse
except ImportError:
    from urllib.parse import urlparse, urlunparse

try:
    frozenset
except NameError:
    from sets import ImmutableSet as frozenset
try:
    basestring
    next = lambda o: o.next()
    from cStringIO import StringIO as BytesIO
except NameError:
    basestring = str
    from io import BytesIO
    def execfile(fn, globs=None, locs=None):
        if globs is None:
            globs = globals()
        if locs is None:
            locs = globs
        exec(compile(open(fn).read(), fn, 'exec'), globs, locs)

# capture these to bypass sandboxing
from os import utime
try:
    from os import mkdir, rename, unlink
    WRITE_SUPPORT = True
except ImportError:
    # no write support, probably under GAE
    WRITE_SUPPORT = False

from os import open as os_open
from os.path import isdir, split

# Avoid try/except due to potential problems with delayed import mechanisms.
if sys.version_info >= (3, 3) and sys.implementation.name == "cpython":
    import importlib._bootstrap as importlib_bootstrap
else:
    importlib_bootstrap = None

try:
    import parser
except ImportError:
    pass

def _bypass_ensure_directory(name, mode=0x1FF):  # 0777
    # Sandbox-bypassing version of ensure_directory()
    if not WRITE_SUPPORT:
        raise IOError('"os.mkdir" not supported on this platform.')
    dirname, filename = split(name)
    if dirname and filename and not isdir(dirname):
        _bypass_ensure_directory(dirname)
        mkdir(dirname, mode)


_state_vars = {}

def _declare_state(vartype, **kw):
    globals().update(kw)
    _state_vars.update(dict.fromkeys(kw, vartype))

def __getstate__():
    state = {}
    g = globals()
    for k, v in _state_vars.items():
        state[k] = g['_sget_'+v](g[k])
    return state

def __setstate__(state):
    g = globals()
    for k, v in state.items():
        g['_sset_'+_state_vars[k]](k, g[k], v)
    return state

def _sget_dict(val):
    return val.copy()

def _sset_dict(key, ob, state):
    ob.clear()
    ob.update(state)

def _sget_object(val):
    return val.__getstate__()

def _sset_object(key, ob, state):
    ob.__setstate__(state)

_sget_none = _sset_none = lambda *args: None


def get_supported_platform():
    """Return this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    """
    plat = get_build_platform()
    m = macosVersionString.match(plat)
    if m is not None and sys.platform == "darwin":
        try:
            plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3))
        except ValueError:
            pass    # not Mac OS X
    return plat

__all__ = [
    # Basic resource access and distribution/entry point discovery
    'require', 'run_script', 'get_provider',  'get_distribution',
    'load_entry_point', 'get_entry_map', 'get_entry_info', 'iter_entry_points',
    'resource_string', 'resource_stream', 'resource_filename',
    'resource_listdir', 'resource_exists', 'resource_isdir',

    # Environmental control
    'declare_namespace', 'working_set', 'add_activation_listener',
    'find_distributions', 'set_extraction_path', 'cleanup_resources',
    'get_default_cache',

    # Primary implementation classes
    'Environment', 'WorkingSet', 'ResourceManager',
    'Distribution', 'Requirement', 'EntryPoint',

    # Exceptions
    'ResolutionError','VersionConflict','DistributionNotFound','UnknownExtra',
    'ExtractionError',

    # Parsing functions and string utilities
    'parse_requirements', 'parse_version', 'safe_name', 'safe_version',
    'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections',
    'safe_extra', 'to_filename', 'invalid_marker', 'evaluate_marker',

    # filesystem utilities
    'ensure_directory', 'normalize_path',

    # Distribution "precedence" constants
    'EGG_DIST', 'BINARY_DIST', 'SOURCE_DIST', 'CHECKOUT_DIST', 'DEVELOP_DIST',

    # "Provider" interfaces, implementations, and registration/lookup APIs
    'IMetadataProvider', 'IResourceProvider', 'FileMetadata',
    'PathMetadata', 'EggMetadata', 'EmptyProvider', 'empty_provider',
    'NullProvider', 'EggProvider', 'DefaultProvider', 'ZipProvider',
    'register_finder', 'register_namespace_handler', 'register_loader_type',
    'fixup_namespace_packages', 'get_importer',

    # Deprecated/backward compatibility only
    'run_main', 'AvailableDistributions',
]

class ResolutionError(Exception):
    """Abstract base for dependency resolution errors"""
    def __repr__(self):
        return self.__class__.__name__+repr(self.args)

class VersionConflict(ResolutionError):
    """An already-installed version conflicts with the requested version"""

class DistributionNotFound(ResolutionError):
    """A requested distribution was not found"""

class UnknownExtra(ResolutionError):
    """Distribution doesn't have an "extra feature" of the given name"""
_provider_factories = {}

PY_MAJOR = sys.version[:3]
EGG_DIST = 3
BINARY_DIST = 2
SOURCE_DIST = 1
CHECKOUT_DIST = 0
DEVELOP_DIST = -1

def register_loader_type(loader_type, provider_factory):
    """Register `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    """
    _provider_factories[loader_type] = provider_factory

def get_provider(moduleOrReq):
    """Return an IResourceProvider for the named module or requirement"""
    if isinstance(moduleOrReq,Requirement):
        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
    try:
        module = sys.modules[moduleOrReq]
    except KeyError:
        __import__(moduleOrReq)
        module = sys.modules[moduleOrReq]
    loader = getattr(module, '__loader__', None)
    return _find_adapter(_provider_factories, loader)(module)

def _macosx_vers(_cache=[]):
    if not _cache:
        import platform
        version = platform.mac_ver()[0]
        # fallback for MacPorts
        if version == '':
            import plistlib
            plist = '/System/Library/CoreServices/SystemVersion.plist'
            if os.path.exists(plist):
                if hasattr(plistlib, 'readPlist'):
                    plist_content = plistlib.readPlist(plist)
                    if 'ProductVersion' in plist_content:
                        version = plist_content['ProductVersion']

        _cache.append(version.split('.'))
    return _cache[0]

def _macosx_arch(machine):
    return {'PowerPC':'ppc', 'Power_Macintosh':'ppc'}.get(machine,machine)

def get_build_platform():
    """Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    """
    try:
        # Python 2.7 or >=3.2
        from sysconfig import get_platform
    except ImportError:
        from distutils.util import get_platform

    plat = get_platform()
    if sys.platform == "darwin" and not plat.startswith('macosx-'):
        try:
            version = _macosx_vers()
            machine = os.uname()[4].replace(" ", "_")
            return "macosx-%d.%d-%s" % (int(version[0]), int(version[1]),
                _macosx_arch(machine))
        except ValueError:
            # if someone is running a non-Mac darwin system, this will fall
            # through to the default implementation
            pass
    return plat

macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
get_platform = get_build_platform   # XXX backward compat


def compatible_platforms(provided,required):
    """Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    """
    if provided is None or required is None or provided==required:
        return True     # easy case

    # Mac OS X special cases
    reqMac = macosVersionString.match(required)
    if reqMac:
        provMac = macosVersionString.match(provided)

        # is this a Mac package?
        if not provMac:
            # this is backwards compatibility for packages built before
            # setuptools 0.6. All packages built after this point will
            # use the new macosx designation.
            provDarwin = darwinVersionString.match(provided)
            if provDarwin:
                dversion = int(provDarwin.group(1))
                macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2))
                if dversion == 7 and macosversion >= "10.3" or \
                        dversion == 8 and macosversion >= "10.4":

                    #import warnings
                    #warnings.warn("Mac eggs should be rebuilt to "
                    #    "use the macosx designation instead of darwin.",
                    #    category=DeprecationWarning)
                    return True
            return False    # egg isn't macosx or legacy darwin

        # are they the same major version and machine type?
        if provMac.group(1) != reqMac.group(1) or \
                provMac.group(3) != reqMac.group(3):
            return False

        # is the required OS major update >= the provided one?
        if int(provMac.group(2)) > int(reqMac.group(2)):
            return False

        return True

    # XXX Linux and other platforms' special cases should go here
    return False


def run_script(dist_spec, script_name):
    """Locate distribution `dist_spec` and run its `script_name` script"""
    ns = sys._getframe(1).f_globals
    name = ns['__name__']
    ns.clear()
    ns['__name__'] = name
    require(dist_spec)[0].run_script(script_name, ns)

run_main = run_script   # backward compatibility

def get_distribution(dist):
    """Return a current distribution object for a Requirement or string"""
    if isinstance(dist,basestring): dist = Requirement.parse(dist)
    if isinstance(dist,Requirement): dist = get_provider(dist)
    if not isinstance(dist,Distribution):
        raise TypeError("Expected string, Requirement, or Distribution", dist)
    return dist

def load_entry_point(dist, group, name):
    """Return `name` entry point of `group` for `dist` or raise ImportError"""
    return get_distribution(dist).load_entry_point(group, name)

def get_entry_map(dist, group=None):
    """Return the entry point map for `group`, or the full entry map"""
    return get_distribution(dist).get_entry_map(group)

def get_entry_info(dist, group, name):
    """Return the EntryPoint object for `group`+`name`, or ``None``"""
    return get_distribution(dist).get_entry_info(group, name)


class IMetadataProvider:

    def has_metadata(name):
        """Does the package's distribution contain the named metadata?"""

    def get_metadata(name):
        """The named metadata resource as a string"""

    def get_metadata_lines(name):
        """Yield named metadata resource as list of non-blank non-comment lines

       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted."""

    def metadata_isdir(name):
        """Is the named metadata a directory?  (like ``os.path.isdir()``)"""

    def metadata_listdir(name):
        """List of metadata names in the directory (like ``os.listdir()``)"""

    def run_script(script_name, namespace):
        """Execute the named script in the supplied namespace dictionary"""


class IResourceProvider(IMetadataProvider):
    """An object that provides access to package resources"""

    def get_resource_filename(manager, resource_name):
        """Return a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_stream(manager, resource_name):
        """Return a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_string(manager, resource_name):
        """Return a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``"""

    def has_resource(resource_name):
        """Does the package contain the named resource?"""

    def resource_isdir(resource_name):
        """Is the named resource a directory?  (like ``os.path.isdir()``)"""

    def resource_listdir(resource_name):
        """List of resource names in the directory (like ``os.listdir()``)"""


class WorkingSet(object):
    """A collection of active distributions on sys.path (or a similar list)"""

    def __init__(self, entries=None):
        """Create working set from list of path entries (default=sys.path)"""
        self.entries = []
        self.entry_keys = {}
        self.by_key = {}
        self.callbacks = []

        if entries is None:
            entries = sys.path

        for entry in entries:
            self.add_entry(entry)

    @classmethod
    def _build_master(cls):
        """
        Prepare the master working set.
        """
        ws = cls()
        try:
            from __main__ import __requires__
        except ImportError:
            # The main program does not list any requirements
            return ws

        # ensure the requirements are met
        try:
            ws.require(__requires__)
        except VersionConflict:
            return cls._build_from_requirements(__requires__)

        return ws

    @classmethod
    def _build_from_requirements(cls, req_spec):
        """
        Build a working set from a requirement spec. Rewrites sys.path.
        """
        # try it without defaults already on sys.path
        # by starting with an empty path
        ws = cls([])
        reqs = parse_requirements(req_spec)
        dists = ws.resolve(reqs, Environment())
        for dist in dists:
            ws.add(dist)

        # add any missing entries from sys.path
        for entry in sys.path:
            if entry not in ws.entries:
                ws.add_entry(entry)

        # then copy back to sys.path
        sys.path[:] = ws.entries
        return ws

    def add_entry(self, entry):
        """Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        """
        self.entry_keys.setdefault(entry, [])
        self.entries.append(entry)
        for dist in find_distributions(entry, True):
            self.add(dist, entry, False)

    def __contains__(self,dist):
        """True if `dist` is the active distribution for its project"""
        return self.by_key.get(dist.key) == dist

    def find(self, req):
        """Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        """
        dist = self.by_key.get(req.key)
        if dist is not None and dist not in req:
            raise VersionConflict(dist,req)     # XXX add more info
        else:
            return dist

    def iter_entry_points(self, group, name=None):
        """Yield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        """
        for dist in self:
            entries = dist.get_entry_map(group)
            if name is None:
                for ep in entries.values():
                    yield ep
            elif name in entries:
                yield entries[name]

    def run_script(self, requires, script_name):
        """Locate distribution for `requires` and run `script_name` script"""
        ns = sys._getframe(1).f_globals
        name = ns['__name__']
        ns.clear()
        ns['__name__'] = name
        self.require(requires)[0].run_script(script_name, ns)

    def __iter__(self):
        """Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        """
        seen = {}
        for item in self.entries:
            if item not in self.entry_keys:
                # workaround a cache issue
                continue

            for key in self.entry_keys[item]:
                if key not in seen:
                    seen[key]=1
                    yield self.by_key[key]

    def add(self, dist, entry=None, insert=True, replace=False):
        """Add `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        """
        if insert:
            dist.insert_on(self.entries, entry)

        if entry is None:
            entry = dist.location
        keys = self.entry_keys.setdefault(entry,[])
        keys2 = self.entry_keys.setdefault(dist.location,[])
        if not replace and dist.key in self.by_key:
            return      # ignore hidden distros

        self.by_key[dist.key] = dist
        if dist.key not in keys:
            keys.append(dist.key)
        if dist.key not in keys2:
            keys2.append(dist.key)
        self._added_new(dist)

    def resolve(self, requirements, env=None, installer=None,
            replace_conflicting=False):
        """List all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.

        Unless `replace_conflicting=True`, raises a VersionConflict exception if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
        """

        requirements = list(requirements)[::-1]  # set up the stack
        processed = {}  # set of processed requirements
        best = {}  # key -> dist
        to_activate = []

        while requirements:
            req = requirements.pop(0)   # process dependencies breadth-first
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(req, ws, installer)
                    if dist is None:
                        #msg = ("The '%s' distribution was not found on this "
                        #       "system, and is required by this application.")
                        #raise DistributionNotFound(msg % req)

                        # unfortunately, zc.buildout uses a str(err)
                        # to get the name of the distribution here..
                        raise DistributionNotFound(req)
                to_activate.append(dist)
            if dist not in req:
                # Oops, the "best" so far conflicts with a dependency
                raise VersionConflict(dist,req) # XXX put more info here
            requirements.extend(dist.requires(req.extras)[::-1])
            processed[req] = True

        return to_activate    # return list of distros to activate

    def find_plugins(self, plugin_env, full_env=None, installer=None,
            fallback=True):
        """Find all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            map(working_set.add, distributions)  # add plugins+libs to sys.path
            print 'Could not load', errors        # display errors

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        """

        plugin_projects = list(plugin_env)
        plugin_projects.sort()  # scan project names in alphabetic order

        error_info = {}
        distributions = {}

        if full_env is None:
            env = Environment(self.entries)
            env += plugin_env
        else:
            env = full_env + plugin_env

        shadow_set = self.__class__([])
        list(map(shadow_set.add, self))   # put all our entries in shadow_set

        for project_name in plugin_projects:

            for dist in plugin_env[project_name]:

                req = [dist.as_requirement()]

                try:
                    resolvees = shadow_set.resolve(req, env, installer)

                except ResolutionError:
                    v = sys.exc_info()[1]
                    error_info[dist] = v    # save error info
                    if fallback:
                        continue    # try the next older version of project
                    else:
                        break       # give up on this project, keep going

                else:
                    list(map(shadow_set.add, resolvees))
                    distributions.update(dict.fromkeys(resolvees))

                    # success, no need to try any more versions of this project
                    break

        distributions = list(distributions)
        distributions.sort()

        return distributions, error_info

    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
        needed = self.resolve(parse_requirements(requirements))

        for dist in needed:
            self.add(dist)

        return needed

    def subscribe(self, callback):
        """Invoke `callback` for all distributions (including existing ones)"""
        if callback in self.callbacks:
            return
        self.callbacks.append(callback)
        for dist in self:
            callback(dist)

    def _added_new(self, dist):
        for callback in self.callbacks:
            callback(dist)

    def __getstate__(self):
        return (
            self.entries[:], self.entry_keys.copy(), self.by_key.copy(),
            self.callbacks[:]
        )

    def __setstate__(self, e_k_b_c):
        entries, keys, by_key, callbacks = e_k_b_c
        self.entries = entries[:]
        self.entry_keys = keys.copy()
        self.by_key = by_key.copy()
        self.callbacks = callbacks[:]


class Environment(object):
    """Searchable snapshot of distributions on a search path"""

    def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
        """Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.3'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        """
        self._distmap = {}
        self._cache = {}
        self.platform = platform
        self.python = python
        self.scan(search_path)

    def can_add(self, dist):
        """Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        """
        return (self.python is None or dist.py_version is None
            or dist.py_version==self.python) \
            and compatible_platforms(dist.platform,self.platform)

    def remove(self, dist):
        """Remove `dist` from the environment"""
        self._distmap[dist.key].remove(dist)

    def scan(self, search_path=None):
        """Scan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        """
        if search_path is None:
            search_path = sys.path

        for item in search_path:
            for dist in find_distributions(item):
                self.add(dist)

    def __getitem__(self,project_name):
        """Return a newest-to-oldest list of distributions for `project_name`
        """
        try:
            return self._cache[project_name]
        except KeyError:
            project_name = project_name.lower()
            if project_name not in self._distmap:
                return []

        if project_name not in self._cache:
            dists = self._cache[project_name] = self._distmap[project_name]
            _sort_dists(dists)

        return self._cache[project_name]

    def add(self,dist):
        """Add `dist` if we ``can_add()`` it and it isn't already added"""
        if self.can_add(dist) and dist.has_version():
            dists = self._distmap.setdefault(dist.key,[])
            if dist not in dists:
                dists.append(dist)
                if dist.key in self._cache:
                    _sort_dists(self._cache[dist.key])

    def best_match(self, req, working_set, installer=None):
        """Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        """
        dist = working_set.find(req)
        if dist is not None:
            return dist
        for dist in self[req.key]:
            if dist in req:
                return dist
        return self.obtain(req, installer) # try and download/install

    def obtain(self, requirement, installer=None):
        """Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument."""
        if installer is not None:
            return installer(requirement)

    def __iter__(self):
        """Yield the unique project names of the available distributions"""
        for key in self._distmap.keys():
            if self[key]: yield key

    def __iadd__(self, other):
        """In-place addition of a distribution or environment"""
        if isinstance(other,Distribution):
            self.add(other)
        elif isinstance(other,Environment):
            for project in other:
                for dist in other[project]:
                    self.add(dist)
        else:
            raise TypeError("Can't add %r to environment" % (other,))
        return self

    def __add__(self, other):
        """Add an environment or distribution to an environment"""
        new = self.__class__([], platform=None, python=None)
        for env in self, other:
            new += env
        return new


AvailableDistributions = Environment    # XXX backward compatibility


class ExtractionError(RuntimeError):
    """An error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    """


class ResourceManager:
    """Manage resource extraction and packages"""
    extraction_path = None

    def __init__(self):
        self.cached_files = {}

    def resource_exists(self, package_or_requirement, resource_name):
        """Does the named resource exist?"""
        return get_provider(package_or_requirement).has_resource(resource_name)

    def resource_isdir(self, package_or_requirement, resource_name):
        """Is the named resource an existing directory?"""
        return get_provider(package_or_requirement).resource_isdir(
            resource_name
        )

    def resource_filename(self, package_or_requirement, resource_name):
        """Return a true filesystem path for specified resource"""
        return get_provider(package_or_requirement).get_resource_filename(
            self, resource_name
        )

    def resource_stream(self, package_or_requirement, resource_name):
        """Return a readable file-like object for specified resource"""
        return get_provider(package_or_requirement).get_resource_stream(
            self, resource_name
        )

    def resource_string(self, package_or_requirement, resource_name):
        """Return specified resource as a string"""
        return get_provider(package_or_requirement).get_resource_string(
            self, resource_name
        )

    def resource_listdir(self, package_or_requirement, resource_name):
        """List the contents of the named resource directory"""
        return get_provider(package_or_requirement).resource_listdir(
            resource_name
        )

    def extraction_error(self):
        """Give an error message for problems extracting file(s)"""

        old_exc = sys.exc_info()[1]
        cache_path = self.extraction_path or get_default_cache()

        err = ExtractionError("""Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  %s

The Python egg cache directory is currently set to:

  %s

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
""" % (old_exc, cache_path)
        )
        err.manager = self
        err.cache_path = cache_path
        err.original_error = old_exc
        raise err

    def get_cache_path(self, archive_name, names=()):
        """Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        """
        extract_path = self.extraction_path or get_default_cache()
        target_path = os.path.join(extract_path, archive_name+'-tmp', *names)
        try:
            _bypass_ensure_directory(target_path)
        except:
            self.extraction_error()

        self._warn_unsafe_extraction_path(extract_path)

        self.cached_files[target_path] = 1
        return target_path

    @staticmethod
    def _warn_unsafe_extraction_path(path):
        """
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        """
        if os.name == 'nt' and not path.startswith(os.environ['windir']):
            # On Windows, permissions are generally restrictive by default
            #  and temp directories are not writable by other users, so
            #  bypass the warning.
            return
        mode = os.stat(path).st_mode
        if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
            msg = ("%s is writable by group/others and vulnerable to attack "
                "when "
                "used with get_resource_filename. Consider a more secure "
                "location (set with .set_extraction_path or the "
                "PYTHON_EGG_CACHE environment variable)." % path)
            warnings.warn(msg, UserWarning)

    def postprocess(self, tempname, filename):
        """Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        """

        if os.name == 'posix':
            # Make the resource executable
            mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777
            os.chmod(tempname, mode)

    def set_extraction_path(self, path):
        """Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        """
        if self.cached_files:
            raise ValueError(
                "Can't change extraction path, files already extracted"
            )

        self.extraction_path = path

    def cleanup_resources(self, force=False):
        """
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        """
        # XXX

def get_default_cache():
    """Determine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    """
    try:
        return os.environ['PYTHON_EGG_CACHE']
    except KeyError:
        pass

    if os.name!='nt':
        return os.path.expanduser('~/.python-eggs')

    app_data = 'Application Data'   # XXX this may be locale-specific!
    app_homes = [
        (('APPDATA',), None),       # best option, should be locale-safe
        (('USERPROFILE',), app_data),
        (('HOMEDRIVE','HOMEPATH'), app_data),
        (('HOMEPATH',), app_data),
        (('HOME',), None),
        (('WINDIR',), app_data),    # 95/98/ME
    ]

    for keys, subdir in app_homes:
        dirname = ''
        for key in keys:
            if key in os.environ:
                dirname = os.path.join(dirname, os.environ[key])
            else:
                break
        else:
            if subdir:
                dirname = os.path.join(dirname,subdir)
            return os.path.join(dirname, 'Python-Eggs')
    else:
        raise RuntimeError(
            "Please set the PYTHON_EGG_CACHE enviroment variable"
        )

def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    """
    version = version.replace(' ','.')
    return re.sub('[^A-Za-z0-9.]+', '-', version)


def safe_extra(extra):
    """Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    """
    return re.sub('[^A-Za-z0-9.]+', '_', extra).lower()


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-','_')


class MarkerEvaluation(object):
    values = {
        'os_name': lambda: os.name,
        'sys_platform': lambda: sys.platform,
        'python_full_version': lambda: sys.version.split()[0],
        'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]),
        'platform_version': platform.version,
        'platform_machine': platform.machine,
        'python_implementation': platform.python_implementation,
    }

    @classmethod
    def is_invalid_marker(cls, text):
        """
        Validate text as a PEP 426 environment marker; return an exception
        if invalid or False otherwise.
        """
        try:
            cls.evaluate_marker(text)
        except SyntaxError:
            return cls.normalize_exception(sys.exc_info()[1])
        return False

    @staticmethod
    def normalize_exception(exc):
        """
        Given a SyntaxError from a marker evaluation, normalize the error message:
         - Remove indications of filename and line number.
         - Replace platform-specific error messages with standard error messages.
        """
        subs = {
            'unexpected EOF while parsing': 'invalid syntax',
            'parenthesis is never closed': 'invalid syntax',
        }
        exc.filename = None
        exc.lineno = None
        exc.msg = subs.get(exc.msg, exc.msg)
        return exc

    @classmethod
    def and_test(cls, nodelist):
        # MUST NOT short-circuit evaluation, or invalid syntax can be skipped!
        return functools.reduce(operator.and_, [cls.interpret(nodelist[i]) for i in range(1,len(nodelist),2)])

    @classmethod
    def test(cls, nodelist):
        # MUST NOT short-circuit evaluation, or invalid syntax can be skipped!
        return functools.reduce(operator.or_, [cls.interpret(nodelist[i]) for i in range(1,len(nodelist),2)])

    @classmethod
    def atom(cls, nodelist):
        t = nodelist[1][0]
        if t == token.LPAR:
            if nodelist[2][0] == token.RPAR:
                raise SyntaxError("Empty parentheses")
            return cls.interpret(nodelist[2])
        raise SyntaxError("Language feature not supported in environment markers")

    @classmethod
    def comparison(cls, nodelist):
        if len(nodelist)>4:
            raise SyntaxError("Chained comparison not allowed in environment markers")
        comp = nodelist[2][1]
        cop = comp[1]
        if comp[0] == token.NAME:
            if len(nodelist[2]) == 3:
                if cop == 'not':
                    cop = 'not in'
                else:
                    cop = 'is not'
        try:
            cop = cls.get_op(cop)
        except KeyError:
            raise SyntaxError(repr(cop)+" operator not allowed in environment markers")
        return cop(cls.evaluate(nodelist[1]), cls.evaluate(nodelist[3]))

    @classmethod
    def get_op(cls, op):
        ops = {
            symbol.test: cls.test,
            symbol.and_test: cls.and_test,
            symbol.atom: cls.atom,
            symbol.comparison: cls.comparison,
            'not in': lambda x, y: x not in y,
            'in': lambda x, y: x in y,
            '==': operator.eq,
            '!=': operator.ne,
        }
        if hasattr(symbol, 'or_test'):
            ops[symbol.or_test] = cls.test
        return ops[op]

    @classmethod
    def evaluate_marker(cls, text, extra=None):
        """
        Evaluate a PEP 426 environment marker on CPython 2.4+.
        Return a boolean indicating the marker result in this environment.
        Raise SyntaxError if marker is invalid.

        This implementation uses the 'parser' module, which is not implemented on
        Jython and has been superseded by the 'ast' module in Python 2.6 and
        later.
        """
        return cls.interpret(parser.expr(text).totuple(1)[1])

    @classmethod
    def _markerlib_evaluate(cls, text):
        """
        Evaluate a PEP 426 environment marker using markerlib.
        Return a boolean indicating the marker result in this environment.
        Raise SyntaxError if marker is invalid.
        """
        from pip._vendor import _markerlib
        # markerlib implements Metadata 1.2 (PEP 345) environment markers.
        # Translate the variables to Metadata 2.0 (PEP 426).
        env = _markerlib.default_environment()
        for key in env.keys():
            new_key = key.replace('.', '_')
            env[new_key] = env.pop(key)
        try:
            result = _markerlib.interpret(text, env)
        except NameError:
            e = sys.exc_info()[1]
            raise SyntaxError(e.args[0])
        return result

    if 'parser' not in globals():
        # Fall back to less-complete _markerlib implementation if 'parser' module
        # is not available.
        evaluate_marker = _markerlib_evaluate

    @classmethod
    def interpret(cls, nodelist):
        while len(nodelist)==2: nodelist = nodelist[1]
        try:
            op = cls.get_op(nodelist[0])
        except KeyError:
            raise SyntaxError("Comparison or logical expression expected")
        return op(nodelist)

    @classmethod
    def evaluate(cls, nodelist):
        while len(nodelist)==2: nodelist = nodelist[1]
        kind = nodelist[0]
        name = nodelist[1]
        if kind==token.NAME:
            try:
                op = cls.values[name]
            except KeyError:
                raise SyntaxError("Unknown name %r" % name)
            return op()
        if kind==token.STRING:
            s = nodelist[1]
            if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \
                    or '\\' in s:
                raise SyntaxError(
                    "Only plain strings allowed in environment markers")
            return s[1:-1]
        raise SyntaxError("Language feature not supported in environment markers")

invalid_marker = MarkerEvaluation.is_invalid_marker
evaluate_marker = MarkerEvaluation.evaluate_marker

class NullProvider:
    """Try to implement resources and metadata for arbitrary PEP 302 loaders"""

    egg_name = None
    egg_info = None
    loader = None

    def __init__(self, module):
        self.loader = getattr(module, '__loader__', None)
        self.module_path = os.path.dirname(getattr(module, '__file__', ''))

    def get_resource_filename(self, manager, resource_name):
        return self._fn(self.module_path, resource_name)

    def get_resource_stream(self, manager, resource_name):
        return BytesIO(self.get_resource_string(manager, resource_name))

    def get_resource_string(self, manager, resource_name):
        return self._get(self._fn(self.module_path, resource_name))

    def has_resource(self, resource_name):
        return self._has(self._fn(self.module_path, resource_name))

    def has_metadata(self, name):
        return self.egg_info and self._has(self._fn(self.egg_info,name))

    if sys.version_info <= (3,):
        def get_metadata(self, name):
            if not self.egg_info:
                return ""
            return self._get(self._fn(self.egg_info,name))
    else:
        def get_metadata(self, name):
            if not self.egg_info:
                return ""
            return self._get(self._fn(self.egg_info,name)).decode("utf-8")

    def get_metadata_lines(self, name):
        return yield_lines(self.get_metadata(name))

    def resource_isdir(self,resource_name):
        return self._isdir(self._fn(self.module_path, resource_name))

    def metadata_isdir(self,name):
        return self.egg_info and self._isdir(self._fn(self.egg_info,name))

    def resource_listdir(self,resource_name):
        return self._listdir(self._fn(self.module_path,resource_name))

    def metadata_listdir(self,name):
        if self.egg_info:
            return self._listdir(self._fn(self.egg_info,name))
        return []

    def run_script(self,script_name,namespace):
        script = 'scripts/'+script_name
        if not self.has_metadata(script):
            raise ResolutionError("No script named %r" % script_name)
        script_text = self.get_metadata(script).replace('\r\n','\n')
        script_text = script_text.replace('\r','\n')
        script_filename = self._fn(self.egg_info,script)
        namespace['__file__'] = script_filename
        if os.path.exists(script_filename):
            execfile(script_filename, namespace, namespace)
        else:
            from linecache import cache
            cache[script_filename] = (
                len(script_text), 0, script_text.split('\n'), script_filename
            )
            script_code = compile(script_text,script_filename,'exec')
            exec(script_code, namespace, namespace)

    def _has(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _isdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _listdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _fn(self, base, resource_name):
        if resource_name:
            return os.path.join(base, *resource_name.split('/'))
        return base

    def _get(self, path):
        if hasattr(self.loader, 'get_data'):
            return self.loader.get_data(path)
        raise NotImplementedError(
            "Can't perform this operation for loaders without 'get_data()'"
        )

register_loader_type(object, NullProvider)


class EggProvider(NullProvider):
    """Provider based on a virtual filesystem"""

    def __init__(self,module):
        NullProvider.__init__(self,module)
        self._setup_prefix()

    def _setup_prefix(self):
        # we assume here that our metadata may be nested inside a "basket"
        # of multiple eggs; that's why we use module_path instead of .archive
        path = self.module_path
        old = None
        while path!=old:
            if path.lower().endswith('.egg'):
                self.egg_name = os.path.basename(path)
                self.egg_info = os.path.join(path, 'EGG-INFO')
                self.egg_root = path
                break
            old = path
            path, base = os.path.split(path)

class DefaultProvider(EggProvider):
    """Provides access to package resources in the filesystem"""

    def _has(self, path):
        return os.path.exists(path)

    def _isdir(self,path):
        return os.path.isdir(path)

    def _listdir(self,path):
        return os.listdir(path)

    def get_resource_stream(self, manager, resource_name):
        return open(self._fn(self.module_path, resource_name), 'rb')

    def _get(self, path):
        stream = open(path, 'rb')
        try:
            return stream.read()
        finally:
            stream.close()

register_loader_type(type(None), DefaultProvider)

if importlib_bootstrap is not None:
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)


class EmptyProvider(NullProvider):
    """Provider that returns nothing for all requests"""

    _isdir = _has = lambda self,path: False
    _get = lambda self,path: ''
    _listdir = lambda self,path: []
    module_path = None

    def __init__(self):
        pass

empty_provider = EmptyProvider()


def build_zipmanifest(path):
    """
    This builds a similar dictionary to the zipimport directory
    caches.  However instead of tuples, ZipInfo objects are stored.

    The translation of the tuple is as follows:
      * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep
              on pypy it is the same (one reason why distribute did work
              in some cases on pypy and win32).
      * [1] - zipinfo.compress_type
      * [2] - zipinfo.compress_size
      * [3] - zipinfo.file_size
      * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
              len(ascii encoding of filename) otherwise
      * [5] - (zipinfo.date_time[0] - 1980) << 9 |
               zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
      * [6] - (zipinfo.date_time[3] - 1980) << 11 |
               zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
      * [7] - zipinfo.CRC
    """
    zipinfo = dict()
    zfile = zipfile.ZipFile(path)
    #Got ZipFile has not __exit__ on python 3.1
    try:
        for zitem in zfile.namelist():
            zpath = zitem.replace('/', os.sep)
            zipinfo[zpath] = zfile.getinfo(zitem)
            assert zipinfo[zpath] is not None
    finally:
        zfile.close()
    return zipinfo


class ZipProvider(EggProvider):
    """Resource support for zips and eggs"""

    eagers = None

    def __init__(self, module):
        EggProvider.__init__(self,module)
        self.zipinfo = build_zipmanifest(self.loader.archive)
        self.zip_pre = self.loader.archive+os.sep

    def _zipinfo_name(self, fspath):
        # Convert a virtual filename (full path to file) into a zipfile subpath
        # usable with the zipimport directory cache for our target archive
        if fspath.startswith(self.zip_pre):
            return fspath[len(self.zip_pre):]
        raise AssertionError(
            "%s is not a subpath of %s" % (fspath,self.zip_pre)
        )

    def _parts(self,zip_path):
        # Convert a zipfile subpath into an egg-relative path part list
        fspath = self.zip_pre+zip_path  # pseudo-fs path
        if fspath.startswith(self.egg_root+os.sep):
            return fspath[len(self.egg_root)+1:].split(os.sep)
        raise AssertionError(
            "%s is not a subpath of %s" % (fspath,self.egg_root)
        )

    def get_resource_filename(self, manager, resource_name):
        if not self.egg_name:
            raise NotImplementedError(
                "resource_filename() only supported for .egg, not .zip"
            )
        # no need to lock for extraction, since we use temp names
        zip_path = self._resource_to_zip(resource_name)
        eagers = self._get_eager_resources()
        if '/'.join(self._parts(zip_path)) in eagers:
            for name in eagers:
                self._extract_resource(manager, self._eager_to_zip(name))
        return self._extract_resource(manager, zip_path)

    @staticmethod
    def _get_date_and_size(zip_stat):
        size = zip_stat.file_size
        date_time = zip_stat.date_time + (0, 0, -1)  # ymdhms+wday, yday, dst
        #1980 offset already done
        timestamp = time.mktime(date_time)
        return timestamp, size

    def _extract_resource(self, manager, zip_path):

        if zip_path in self._index():
            for name in self._index()[zip_path]:
                last = self._extract_resource(
                    manager, os.path.join(zip_path, name)
                )
            return os.path.dirname(last)  # return the extracted directory name

        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])

        if not WRITE_SUPPORT:
            raise IOError('"os.rename" and "os.unlink" are not supported '
                          'on this platform')
        try:

            real_path = manager.get_cache_path(
                self.egg_name, self._parts(zip_path)
            )

            if self._is_current(real_path, zip_path):
                return real_path

            outf, tmpnam = _mkstemp(".$extract", dir=os.path.dirname(real_path))
            os.write(outf, self.loader.get_data(zip_path))
            os.close(outf)
            utime(tmpnam, (timestamp,timestamp))
            manager.postprocess(tmpnam, real_path)

            try:
                rename(tmpnam, real_path)

            except os.error:
                if os.path.isfile(real_path):
                    if self._is_current(real_path, zip_path):
                        # the file became current since it was checked above,
                        #  so proceed.
                        return real_path
                    elif os.name=='nt':     # Windows, del old file and retry
                        unlink(real_path)
                        rename(tmpnam, real_path)
                        return real_path
                raise

        except os.error:
            manager.extraction_error()  # report a user-friendly error

        return real_path

    def _is_current(self, file_path, zip_path):
        """
        Return True if the file_path is current for this zip_path
        """
        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
        if not os.path.isfile(file_path):
            return False
        stat = os.stat(file_path)
        if stat.st_size!=size or stat.st_mtime!=timestamp:
            return False
        # check that the contents match
        zip_contents = self.loader.get_data(zip_path)
        f = open(file_path, 'rb')
        file_contents = f.read()
        f.close()
        return zip_contents == file_contents

    def _get_eager_resources(self):
        if self.eagers is None:
            eagers = []
            for name in ('native_libs.txt', 'eager_resources.txt'):
                if self.has_metadata(name):
                    eagers.extend(self.get_metadata_lines(name))
            self.eagers = eagers
        return self.eagers

    def _index(self):
        try:
            return self._dirindex
        except AttributeError:
            ind = {}
            for path in self.zipinfo:
                parts = path.split(os.sep)
                while parts:
                    parent = os.sep.join(parts[:-1])
                    if parent in ind:
                        ind[parent].append(parts[-1])
                        break
                    else:
                        ind[parent] = [parts.pop()]
            self._dirindex = ind
            return ind

    def _has(self, fspath):
        zip_path = self._zipinfo_name(fspath)
        return zip_path in self.zipinfo or zip_path in self._index()

    def _isdir(self,fspath):
        return self._zipinfo_name(fspath) in self._index()

    def _listdir(self,fspath):
        return list(self._index().get(self._zipinfo_name(fspath), ()))

    def _eager_to_zip(self,resource_name):
        return self._zipinfo_name(self._fn(self.egg_root,resource_name))

    def _resource_to_zip(self,resource_name):
        return self._zipinfo_name(self._fn(self.module_path,resource_name))

register_loader_type(zipimport.zipimporter, ZipProvider)


class FileMetadata(EmptyProvider):
    """Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    """

    def __init__(self,path):
        self.path = path

    def has_metadata(self,name):
        return name=='PKG-INFO'

    def get_metadata(self,name):
        if name=='PKG-INFO':
            f = open(self.path,'rU')
            metadata = f.read()
            f.close()
            return metadata
        raise KeyError("No metadata except PKG-INFO is available")

    def get_metadata_lines(self,name):
        return yield_lines(self.get_metadata(name))


class PathMetadata(DefaultProvider):
    """Metadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir,project_name=dist_name,metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    """

    def __init__(self, path, egg_info):
        self.module_path = path
        self.egg_info = egg_info


class EggMetadata(ZipProvider):
    """Metadata provider for .egg files"""

    def __init__(self, importer):
        """Create a metadata provider from a zipimporter"""

        self.zipinfo = build_zipmanifest(importer.archive)
        self.zip_pre = importer.archive+os.sep
        self.loader = importer
        if importer.prefix:
            self.module_path = os.path.join(importer.archive, importer.prefix)
        else:
            self.module_path = importer.archive
        self._setup_prefix()

_declare_state('dict', _distribution_finders = {})

def register_finder(importer_type, distribution_finder):
    """Register `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example."""
    _distribution_finders[importer_type] = distribution_finder


def find_distributions(path_item, only=False):
    """Yield distributions accessible via `path_item`"""
    importer = get_importer(path_item)
    finder = _find_adapter(_distribution_finders, importer)
    return finder(importer, path_item, only)

def find_eggs_in_zip(importer, path_item, only=False):
    """
    Find eggs in zip files; possibly multiple nested eggs.
    """
    if importer.archive.endswith('.whl'):
        # wheels are not supported with this finder
        # they don't have PKG-INFO metadata, and won't ever contain eggs
        return
    metadata = EggMetadata(importer)
    if metadata.has_metadata('PKG-INFO'):
        yield Distribution.from_filename(path_item, metadata=metadata)
    if only:
        return  # don't yield nested distros
    for subitem in metadata.resource_listdir('/'):
        if subitem.endswith('.egg'):
            subpath = os.path.join(path_item, subitem)
            for dist in find_eggs_in_zip(zipimport.zipimporter(subpath), subpath):
                yield dist

register_finder(zipimport.zipimporter, find_eggs_in_zip)

def find_nothing(importer, path_item, only=False):
    return ()
register_finder(object,find_nothing)

def find_on_path(importer, path_item, only=False):
    """Yield distributions accessible on a sys.path directory"""
    path_item = _normalize_cached(path_item)

    if os.path.isdir(path_item) and os.access(path_item, os.R_OK):
        if path_item.lower().endswith('.egg'):
            # unpacked egg
            yield Distribution.from_filename(
                path_item, metadata=PathMetadata(
                    path_item, os.path.join(path_item,'EGG-INFO')
                )
            )
        else:
            # scan for .egg and .egg-info in directory
            for entry in os.listdir(path_item):
                lower = entry.lower()
                if lower.endswith('.egg-info') or lower.endswith('.dist-info'):
                    fullpath = os.path.join(path_item, entry)
                    if os.path.isdir(fullpath):
                        # egg-info directory, allow getting metadata
                        metadata = PathMetadata(path_item, fullpath)
                    else:
                        metadata = FileMetadata(fullpath)
                    yield Distribution.from_location(
                        path_item,entry,metadata,precedence=DEVELOP_DIST
                    )
                elif not only and lower.endswith('.egg'):
                    for dist in find_distributions(os.path.join(path_item, entry)):
                        yield dist
                elif not only and lower.endswith('.egg-link'):
                    entry_file = open(os.path.join(path_item, entry))
                    try:
                        entry_lines = entry_file.readlines()
                    finally:
                        entry_file.close()
                    for line in entry_lines:
                        if not line.strip(): continue
                        for item in find_distributions(os.path.join(path_item,line.rstrip())):
                            yield item
                        break
register_finder(pkgutil.ImpImporter,find_on_path)

if importlib_bootstrap is not None:
    register_finder(importlib_bootstrap.FileFinder, find_on_path)

_declare_state('dict', _namespace_handlers={})
_declare_state('dict', _namespace_packages={})


def register_namespace_handler(importer_type, namespace_handler):
    """Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer,path_entry,moduleName,module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    """
    _namespace_handlers[importer_type] = namespace_handler

def _handle_ns(packageName, path_item):
    """Ensure that named package includes a subpath of path_item (if needed)"""

    importer = get_importer(path_item)
    if importer is None:
        return None
    loader = importer.find_module(packageName)
    if loader is None:
        return None
    module = sys.modules.get(packageName)
    if module is None:
        module = sys.modules[packageName] = imp.new_module(packageName)
        module.__path__ = []
        _set_parent_ns(packageName)
    elif not hasattr(module,'__path__'):
        raise TypeError("Not a package:", packageName)
    handler = _find_adapter(_namespace_handlers, importer)
    subpath = handler(importer, path_item, packageName, module)
    if subpath is not None:
        path = module.__path__
        path.append(subpath)
        loader.load_module(packageName)
        for path_item in path:
            if path_item not in module.__path__:
                module.__path__.append(path_item)
    return subpath

def declare_namespace(packageName):
    """Declare that package 'packageName' is a namespace package"""

    imp.acquire_lock()
    try:
        if packageName in _namespace_packages:
            return

        path, parent = sys.path, None
        if '.' in packageName:
            parent = '.'.join(packageName.split('.')[:-1])
            declare_namespace(parent)
            if parent not in _namespace_packages:
                __import__(parent)
            try:
                path = sys.modules[parent].__path__
            except AttributeError:
                raise TypeError("Not a package:", parent)

        # Track what packages are namespaces, so when new path items are added,
        # they can be updated
        _namespace_packages.setdefault(parent,[]).append(packageName)
        _namespace_packages.setdefault(packageName,[])

        for path_item in path:
            # Ensure all the parent's path items are reflected in the child,
            # if they apply
            _handle_ns(packageName, path_item)

    finally:
        imp.release_lock()

def fixup_namespace_packages(path_item, parent=None):
    """Ensure that previously-declared namespace packages include path_item"""
    imp.acquire_lock()
    try:
        for package in _namespace_packages.get(parent,()):
            subpath = _handle_ns(package, path_item)
            if subpath: fixup_namespace_packages(subpath,package)
    finally:
        imp.release_lock()

def file_ns_handler(importer, path_item, packageName, module):
    """Compute an ns-package subpath for a filesystem or zipfile importer"""

    subpath = os.path.join(path_item, packageName.split('.')[-1])
    normalized = _normalize_cached(subpath)
    for item in module.__path__:
        if _normalize_cached(item)==normalized:
            break
    else:
        # Only return the path if it's not already there
        return subpath

register_namespace_handler(pkgutil.ImpImporter,file_ns_handler)
register_namespace_handler(zipimport.zipimporter,file_ns_handler)

if importlib_bootstrap is not None:
    register_namespace_handler(importlib_bootstrap.FileFinder, file_ns_handler)


def null_ns_handler(importer, path_item, packageName, module):
    return None

register_namespace_handler(object,null_ns_handler)


def normalize_path(filename):
    """Normalize a file/dir name for comparison purposes"""
    return os.path.normcase(os.path.realpath(filename))

def _normalize_cached(filename,_cache={}):
    try:
        return _cache[filename]
    except KeyError:
        _cache[filename] = result = normalize_path(filename)
        return result

def _set_parent_ns(packageName):
    parts = packageName.split('.')
    name = parts.pop()
    if parts:
        parent = '.'.join(parts)
        setattr(sys.modules[parent], name, sys.modules[packageName])


def yield_lines(strs):
    """Yield non-empty/non-comment lines of a ``basestring`` or sequence"""
    if isinstance(strs,basestring):
        for s in strs.splitlines():
            s = s.strip()
            if s and not s.startswith('#'):     # skip blank lines/comments
                yield s
    else:
        for ss in strs:
            for s in yield_lines(ss):
                yield s

LINE_END = re.compile(r"\s*(#.*)?$").match         # whitespace and comment
CONTINUE = re.compile(r"\s*\\\s*(#.*)?$").match    # line continuation
DISTRO = re.compile(r"\s*((\w|[-.])+)").match    # Distribution or extra
VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match  # ver. info
COMMA = re.compile(r"\s*,").match               # comma between items
OBRACKET = re.compile(r"\s*\[").match
CBRACKET = re.compile(r"\s*\]").match
MODULE = re.compile(r"\w+(\.\w+)*$").match
EGG_NAME = re.compile(
    r"(?P<name>[^-]+)"
    r"( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?",
    re.VERBOSE | re.IGNORECASE
).match

component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE)
replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'}.get

def _parse_version_parts(s):
    for part in component_re.split(s):
        part = replace(part,part)
        if not part or part=='.':
            continue
        if part[:1] in '0123456789':
            yield part.zfill(8)    # pad for numeric comparison
        else:
            yield '*'+part

    yield '*final'  # ensure that alpha/beta/candidate are before final

def parse_version(s):
    """Convert a version string to a chronologically-sortable key

    This is a rough cross between distutils' StrictVersion and LooseVersion;
    if you give it versions that would work with StrictVersion, then it behaves
    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    *possible* to create pathological version coding schemes that will fool
    this parser, but they should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    than any other pre-release tag.
    """
    parts = []
    for part in _parse_version_parts(s.lower()):
        if part.startswith('*'):
            if part<'*final':   # remove '-' before a prerelease tag
                while parts and parts[-1]=='*final-': parts.pop()
            # remove trailing zeros from each series of numeric parts
            while parts and parts[-1]=='00000000':
                parts.pop()
        parts.append(part)
    return tuple(parts)
class EntryPoint(object):
    """Object representing an advertised importable object"""

    def __init__(self, name, module_name, attrs=(), extras=(), dist=None):
        if not MODULE(module_name):
            raise ValueError("Invalid module name", module_name)
        self.name = name
        self.module_name = module_name
        self.attrs = tuple(attrs)
        self.extras = Requirement.parse(("x[%s]" % ','.join(extras))).extras
        self.dist = dist

    def __str__(self):
        s = "%s = %s" % (self.name, self.module_name)
        if self.attrs:
            s += ':' + '.'.join(self.attrs)
        if self.extras:
            s += ' [%s]' % ','.join(self.extras)
        return s

    def __repr__(self):
        return "EntryPoint.parse(%r)" % str(self)

    def load(self, require=True, env=None, installer=None):
        if require: self.require(env, installer)
        entry = __import__(self.module_name, globals(),globals(), ['__name__'])
        for attr in self.attrs:
            try:
                entry = getattr(entry,attr)
            except AttributeError:
                raise ImportError("%r has no %r attribute" % (entry,attr))
        return entry

    def require(self, env=None, installer=None):
        if self.extras and not self.dist:
            raise UnknownExtra("Can't require() without a distribution", self)
        list(map(working_set.add,
            working_set.resolve(self.dist.requires(self.extras),env,installer)))

    @classmethod
    def parse(cls, src, dist=None):
        """Parse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        """
        try:
            attrs = extras = ()
            name,value = src.split('=',1)
            if '[' in value:
                value,extras = value.split('[',1)
                req = Requirement.parse("x["+extras)
                if req.specs: raise ValueError
                extras = req.extras
            if ':' in value:
                value,attrs = value.split(':',1)
                if not MODULE(attrs.rstrip()):
                    raise ValueError
                attrs = attrs.rstrip().split('.')
        except ValueError:
            raise ValueError(
                "EntryPoint must be in 'name=module:attrs [extras]' format",
                src
            )
        else:
            return cls(name.strip(), value.strip(), attrs, extras, dist)

    @classmethod
    def parse_group(cls, group, lines, dist=None):
        """Parse an entry point group"""
        if not MODULE(group):
            raise ValueError("Invalid group name", group)
        this = {}
        for line in yield_lines(lines):
            ep = cls.parse(line, dist)
            if ep.name in this:
                raise ValueError("Duplicate entry point", group, ep.name)
            this[ep.name]=ep
        return this

    @classmethod
    def parse_map(cls, data, dist=None):
        """Parse a map of entry point groups"""
        if isinstance(data,dict):
            data = data.items()
        else:
            data = split_sections(data)
        maps = {}
        for group, lines in data:
            if group is None:
                if not lines:
                    continue
                raise ValueError("Entry points must be listed in groups")
            group = group.strip()
            if group in maps:
                raise ValueError("Duplicate group name", group)
            maps[group] = cls.parse_group(group, lines, dist)
        return maps


def _remove_md5_fragment(location):
    if not location:
        return ''
    parsed = urlparse(location)
    if parsed[-1].startswith('md5='):
        return urlunparse(parsed[:-1] + ('',))
    return location


class Distribution(object):
    """Wrap an actual or potential sys.path entry w/metadata"""
    PKG_INFO = 'PKG-INFO'

    def __init__(self, location=None, metadata=None, project_name=None,
            version=None, py_version=PY_MAJOR, platform=None,
            precedence=EGG_DIST):
        self.project_name = safe_name(project_name or 'Unknown')
        if version is not None:
            self._version = safe_version(version)
        self.py_version = py_version
        self.platform = platform
        self.location = location
        self.precedence = precedence
        self._provider = metadata or empty_provider

    @classmethod
    def from_location(cls,location,basename,metadata=None,**kw):
        project_name, version, py_version, platform = [None]*4
        basename, ext = os.path.splitext(basename)
        if ext.lower() in _distributionImpl:
            # .dist-info gets much metadata differently
            match = EGG_NAME(basename)
            if match:
                project_name, version, py_version, platform = match.group(
                    'name','ver','pyver','plat'
                )
            cls = _distributionImpl[ext.lower()]
        return cls(
            location, metadata, project_name=project_name, version=version,
            py_version=py_version, platform=platform, **kw
        )

    hashcmp = property(
        lambda self: (
            getattr(self,'parsed_version',()),
            self.precedence,
            self.key,
            _remove_md5_fragment(self.location),
            self.py_version,
            self.platform
        )
    )
    def __hash__(self): return hash(self.hashcmp)
    def __lt__(self, other):
        return self.hashcmp < other.hashcmp
    def __le__(self, other):
        return self.hashcmp <= other.hashcmp
    def __gt__(self, other):
        return self.hashcmp > other.hashcmp
    def __ge__(self, other):
        return self.hashcmp >= other.hashcmp
    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            # It's not a Distribution, so they are not equal
            return False
        return self.hashcmp == other.hashcmp
    def __ne__(self, other):
        return not self == other

    # These properties have to be lazy so that we don't have to load any
    # metadata until/unless it's actually needed.  (i.e., some distributions
    # may not know their name or version without loading PKG-INFO)

    @property
    def key(self):
        try:
            return self._key
        except AttributeError:
            self._key = key = self.project_name.lower()
            return key

    @property
    def parsed_version(self):
        try:
            return self._parsed_version
        except AttributeError:
            self._parsed_version = pv = parse_version(self.version)
            return pv

    @property
    def version(self):
        try:
            return self._version
        except AttributeError:
            for line in self._get_metadata(self.PKG_INFO):
                if line.lower().startswith('version:'):
                    self._version = safe_version(line.split(':',1)[1].strip())
                    return self._version
            else:
                raise ValueError(
                    "Missing 'Version:' header and/or %s file" % self.PKG_INFO, self
                )

    @property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            dm = self.__dep_map = {None: []}
            for name in 'requires.txt', 'depends.txt':
                for extra,reqs in split_sections(self._get_metadata(name)):
                    if extra:
                        if ':' in extra:
                            extra, marker = extra.split(':',1)
                            if invalid_marker(marker):
                                reqs=[] # XXX warn
                            elif not evaluate_marker(marker):
                                reqs=[]
                        extra = safe_extra(extra) or None
                    dm.setdefault(extra,[]).extend(parse_requirements(reqs))
            return dm

    def requires(self,extras=()):
        """List of Requirements needed for this distro if `extras` are used"""
        dm = self._dep_map
        deps = []
        deps.extend(dm.get(None,()))
        for ext in extras:
            try:
                deps.extend(dm[safe_extra(ext)])
            except KeyError:
                raise UnknownExtra(
                    "%s has no such extra feature %r" % (self, ext)
                )
        return deps

    def _get_metadata(self,name):
        if self.has_metadata(name):
            for line in self.get_metadata_lines(name):
                yield line

    def activate(self,path=None):
        """Ensure distribution is importable on `path` (default=sys.path)"""
        if path is None: path = sys.path
        self.insert_on(path)
        if path is sys.path:
            fixup_namespace_packages(self.location)
            for pkg in self._get_metadata('namespace_packages.txt'):
                if pkg in sys.modules:
                    declare_namespace(pkg)

    def egg_name(self):
        """Return what this distribution's standard .egg filename should be"""
        filename = "%s-%s-py%s" % (
            to_filename(self.project_name), to_filename(self.version),
            self.py_version or PY_MAJOR
        )

        if self.platform:
            filename += '-'+self.platform
        return filename

    def __repr__(self):
        if self.location:
            return "%s (%s)" % (self,self.location)
        else:
            return str(self)

    def __str__(self):
        try: version = getattr(self,'version',None)
        except ValueError: version = None
        version = version or "[unknown version]"
        return "%s %s" % (self.project_name,version)

    def __getattr__(self,attr):
        """Delegate all unrecognized public attributes to .metadata provider"""
        if attr.startswith('_'):
            raise AttributeError(attr)
        return getattr(self._provider, attr)

    @classmethod
    def from_filename(cls,filename,metadata=None, **kw):
        return cls.from_location(
            _normalize_cached(filename), os.path.basename(filename), metadata,
            **kw
        )

    def as_requirement(self):
        """Return a ``Requirement`` that matches this distribution exactly"""
        return Requirement.parse('%s==%s' % (self.project_name, self.version))

    def load_entry_point(self, group, name):
        """Return the `name` entry point of `group` or raise ImportError"""
        ep = self.get_entry_info(group,name)
        if ep is None:
            raise ImportError("Entry point %r not found" % ((group,name),))
        return ep.load()

    def get_entry_map(self, group=None):
        """Return the entry point map for `group`, or the full entry map"""
        try:
            ep_map = self._ep_map
        except AttributeError:
            ep_map = self._ep_map = EntryPoint.parse_map(
                self._get_metadata('entry_points.txt'), self
            )
        if group is not None:
            return ep_map.get(group,{})
        return ep_map

    def get_entry_info(self, group, name):
        """Return the EntryPoint object for `group`+`name`, or ``None``"""
        return self.get_entry_map(group).get(name)

    def insert_on(self, path, loc = None):
        """Insert self.location in path before its nearest parent directory"""

        loc = loc or self.location
        if not loc:
            return

        nloc = _normalize_cached(loc)
        bdir = os.path.dirname(nloc)
        npath= [(p and _normalize_cached(p) or p) for p in path]

        for p, item in enumerate(npath):
            if item==nloc:
                break
            elif item==bdir and self.precedence==EGG_DIST:
                # if it's an .egg, give it precedence over its directory
                if path is sys.path:
                    self.check_version_conflict()
                path.insert(p, loc)
                npath.insert(p, nloc)
                break
        else:
            if path is sys.path:
                self.check_version_conflict()
            path.append(loc)
            return

        # p is the spot where we found or inserted loc; now remove duplicates
        while 1:
            try:
                np = npath.index(nloc, p+1)
            except ValueError:
                break
            else:
                del npath[np], path[np]
                p = np  # ha!

        return

    def check_version_conflict(self):
        if self.key=='setuptools':
            return      # ignore the inevitable setuptools self-conflicts  :(

        nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
        loc = normalize_path(self.location)
        for modname in self._get_metadata('top_level.txt'):
            if (modname not in sys.modules or modname in nsp
                    or modname in _namespace_packages):
                continue
            if modname in ('pkg_resources', 'setuptools', 'site'):
                continue
            fn = getattr(sys.modules[modname], '__file__', None)
            if fn and (normalize_path(fn).startswith(loc) or
                       fn.startswith(self.location)):
                continue
            issue_warning(
                "Module %s was already imported from %s, but %s is being added"
                " to sys.path" % (modname, fn, self.location),
            )

    def has_version(self):
        try:
            self.version
        except ValueError:
            issue_warning("Unbuilt egg for "+repr(self))
            return False
        return True

    def clone(self,**kw):
        """Copy this distribution, substituting in any changed keyword args"""
        for attr in (
            'project_name', 'version', 'py_version', 'platform', 'location',
            'precedence'
        ):
            kw.setdefault(attr, getattr(self,attr,None))
        kw.setdefault('metadata', self._provider)
        return self.__class__(**kw)

    @property
    def extras(self):
        return [dep for dep in self._dep_map if dep]


class DistInfoDistribution(Distribution):
    """Wrap an actual or potential sys.path entry w/metadata, .dist-info style"""
    PKG_INFO = 'METADATA'
    EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])")

    @property
    def _parsed_pkg_info(self):
        """Parse and cache metadata"""
        try:
            return self._pkg_info
        except AttributeError:
            from email.parser import Parser
            self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO))
            return self._pkg_info

    @property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._compute_dependencies()
            return self.__dep_map

    def _preparse_requirement(self, requires_dist):
        """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz')
        Split environment marker, add == prefix to version specifiers as
        necessary, and remove parenthesis.
        """
        parts = requires_dist.split(';', 1) + ['']
        distvers = parts[0].strip()
        mark = parts[1].strip()
        distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers)
        distvers = distvers.replace('(', '').replace(')', '')
        return (distvers, mark)

    def _compute_dependencies(self):
        """Recompute this distribution's dependencies."""
        from pip._vendor._markerlib import compile as compile_marker
        dm = self.__dep_map = {None: []}

        reqs = []
        # Including any condition expressions
        for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
            distvers, mark = self._preparse_requirement(req)
            parsed = next(parse_requirements(distvers))
            parsed.marker_fn = compile_marker(mark)
            reqs.append(parsed)

        def reqs_for_extra(extra):
            for req in reqs:
                if req.marker_fn(override={'extra':extra}):
                    yield req

        common = frozenset(reqs_for_extra(None))
        dm[None].extend(common)

        for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
            extra = safe_extra(extra.strip())
            dm[extra] = list(frozenset(reqs_for_extra(extra)) - common)

        return dm


_distributionImpl = {
    '.egg': Distribution,
    '.egg-info': Distribution,
    '.dist-info': DistInfoDistribution,
    }


def issue_warning(*args,**kw):
    level = 1
    g = globals()
    try:
        # find the first stack frame that is *not* code in
        # the pkg_resources module, to use for the warning
        while sys._getframe(level).f_globals is g:
            level += 1
    except ValueError:
        pass
    from warnings import warn
    warn(stacklevel = level+1, *args, **kw)


def parse_requirements(strs):
    """Yield ``Requirement`` objects for each specification in `strs`

    `strs` must be an instance of ``basestring``, or a (possibly-nested)
    iterable thereof.
    """
    # create a steppable iterator, so we can handle \-continuations
    lines = iter(yield_lines(strs))

    def scan_list(ITEM,TERMINATOR,line,p,groups,item_name):

        items = []

        while not TERMINATOR(line,p):
            if CONTINUE(line,p):
                try:
                    line = next(lines)
                    p = 0
                except StopIteration:
                    raise ValueError(
                        "\\ must not appear on the last nonblank line"
                    )

            match = ITEM(line,p)
            if not match:
                raise ValueError("Expected "+item_name+" in",line,"at",line[p:])

            items.append(match.group(*groups))
            p = match.end()

            match = COMMA(line,p)
            if match:
                p = match.end() # skip the comma
            elif not TERMINATOR(line,p):
                raise ValueError(
                    "Expected ',' or end-of-list in",line,"at",line[p:]
                )

        match = TERMINATOR(line,p)
        if match: p = match.end()   # skip the terminator, if any
        return line, p, items

    for line in lines:
        match = DISTRO(line)
        if not match:
            raise ValueError("Missing distribution spec", line)
        project_name = match.group(1)
        p = match.end()
        extras = []

        match = OBRACKET(line,p)
        if match:
            p = match.end()
            line, p, extras = scan_list(
                DISTRO, CBRACKET, line, p, (1,), "'extra' name"
            )

        line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
        specs = [(op,safe_version(val)) for op,val in specs]
        yield Requirement(project_name, specs, extras)


def _sort_dists(dists):
    tmp = [(dist.hashcmp,dist) for dist in dists]
    tmp.sort()
    dists[::-1] = [d for hc,d in tmp]


class Requirement:
    def __init__(self, project_name, specs, extras):
        """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
        self.unsafe_name, project_name = project_name, safe_name(project_name)
        self.project_name, self.key = project_name, project_name.lower()
        index = [(parse_version(v),state_machine[op],op,v) for op,v in specs]
        index.sort()
        self.specs = [(op,ver) for parsed,trans,op,ver in index]
        self.index, self.extras = index, tuple(map(safe_extra,extras))
        self.hashCmp = (
            self.key, tuple([(op,parsed) for parsed,trans,op,ver in index]),
            frozenset(self.extras)
        )
        self.__hash = hash(self.hashCmp)

    def __str__(self):
        specs = ','.join([''.join(s) for s in self.specs])
        extras = ','.join(self.extras)
        if extras: extras = '[%s]' % extras
        return '%s%s%s' % (self.project_name, extras, specs)

    def __eq__(self,other):
        return isinstance(other,Requirement) and self.hashCmp==other.hashCmp

    def __contains__(self,item):
        if isinstance(item,Distribution):
            if item.key != self.key: return False
            if self.index: item = item.parsed_version  # only get if we need it
        elif isinstance(item,basestring):
            item = parse_version(item)
        last = None
        compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1
        for parsed,trans,op,ver in self.index:
            action = trans[compare(item,parsed)] # Indexing: 0, 1, -1
            if action=='F':
                return False
            elif action=='T':
                return True
            elif action=='+':
                last = True
            elif action=='-' or last is None:   last = False
        if last is None: last = True    # no rules encountered
        return last

    def __hash__(self):
        return self.__hash

    def __repr__(self): return "Requirement.parse(%r)" % str(self)

    @staticmethod
    def parse(s):
        reqs = list(parse_requirements(s))
        if reqs:
            if len(reqs)==1:
                return reqs[0]
            raise ValueError("Expected only one requirement", s)
        raise ValueError("No requirements found", s)

state_machine = {
    #       =><
    '<': '--T',
    '<=': 'T-T',
    '>': 'F+F',
    '>=': 'T+F',
    '==': 'T..',
    '!=': 'F++',
}


def _get_mro(cls):
    """Get an mro for a type or classic class"""
    if not isinstance(cls,type):
        class cls(cls,object): pass
        return cls.__mro__[1:]
    return cls.__mro__

def _find_adapter(registry, ob):
    """Return an adapter factory for `ob` from `registry`"""
    for t in _get_mro(getattr(ob, '__class__', type(ob))):
        if t in registry:
            return registry[t]


def ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    if not os.path.isdir(dirname):
        os.makedirs(dirname)

def split_sections(s):
    """Split a string or iterable thereof into (section,content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    """
    section = None
    content = []
    for line in yield_lines(s):
        if line.startswith("["):
            if line.endswith("]"):
                if section or content:
                    yield section, content
                section = line[1:-1].strip()
                content = []
            else:
                raise ValueError("Invalid section heading", line)
        else:
            content.append(line)

    # wrap up last segment
    yield section, content

def _mkstemp(*args,**kw):
    from tempfile import mkstemp
    old_open = os.open
    try:
        os.open = os_open   # temporarily bypass sandboxing
        return mkstemp(*args,**kw)
    finally:
        os.open = old_open  # and then put it back


# Set up global resource manager (deliberately not state-saved)
_manager = ResourceManager()
def _initialize(g):
    for name in dir(_manager):
        if not name.startswith('_'):
            g[name] = getattr(_manager, name)
_initialize(globals())

# Prepare the master working set and make the ``require()`` API available
working_set = WorkingSet._build_master()
_declare_state('object', working_set=working_set)

require = working_set.require
iter_entry_points = working_set.iter_entry_points
add_activation_listener = working_set.subscribe
run_script = working_set.run_script
run_main = run_script   # backward compatibility
# Activate all distributions already on sys.path, and ensure that
# all distributions added to the working set in the future (e.g. by
# calling ``require()``) will get activated as well.
add_activation_listener(lambda dist: dist.activate())
working_set.entries=[]
list(map(working_set.add_entry,sys.path)) # match order
python3.4/site-packages/pip/commands/list.py000064400000015236151735047770014777 0ustar00from pip.basecommand import Command
from pip.exceptions import DistributionNotFound, BestVersionAlreadyInstalled
from pip.index import PackageFinder
from pip.log import logger
from pip.req import InstallRequirement
from pip.util import get_installed_distributions, dist_is_editable
from pip.cmdoptions import make_option_group, index_group


class ListCommand(Command):
    """List installed packages, including editables."""
    name = 'list'
    usage = """
      %prog [options]"""
    summary = 'List installed packages.'

    # distributions to skip (python itself is reported by pkg_resources.working_set)
    skip = ['python']

    def __init__(self, *args, **kw):
        super(ListCommand, self).__init__(*args, **kw)

        cmd_opts = self.cmd_opts

        cmd_opts.add_option(
            '-o', '--outdated',
            action='store_true',
            default=False,
            help='List outdated packages (excluding editables)')
        cmd_opts.add_option(
            '-u', '--uptodate',
            action='store_true',
            default=False,
            help='List uptodate packages (excluding editables)')
        cmd_opts.add_option(
            '-e', '--editable',
            action='store_true',
            default=False,
            help='List editable projects.')
        cmd_opts.add_option(
            '-l', '--local',
            action='store_true',
            default=False,
            help='If in a virtualenv that has global access, do not list globally-installed packages.')

        cmd_opts.add_option(
            '--pre',
            action='store_true',
            default=False,
            help="Include pre-release and development versions. By default, pip only finds stable versions.")

        index_opts = make_option_group(index_group, self.parser)

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, cmd_opts)

    def _build_package_finder(self, options, index_urls, session):
        """
        Create a package finder appropriate to this list command.
        """
        return PackageFinder(find_links=options.find_links,
                             index_urls=index_urls,
                             allow_external=options.allow_external,
                             allow_unverified=options.allow_unverified,
                             allow_all_external=options.allow_all_external,
                             allow_all_prereleases=options.pre,
                             process_dependency_links=
                                options.process_dependency_links,
                             session=session,
                        )

    def run(self, options, args):
        if options.outdated:
            self.run_outdated(options)
        elif options.uptodate:
            self.run_uptodate(options)
        elif options.editable:
            self.run_editables(options)
        else:
            self.run_listing(options)

    def run_outdated(self, options):
        for dist, remote_version_raw, remote_version_parsed in self.find_packages_latests_versions(options):
            if remote_version_parsed > dist.parsed_version:
                logger.notify('%s (Current: %s Latest: %s)' % (dist.project_name,
                    dist.version, remote_version_raw))

    def find_packages_latests_versions(self, options):
        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index:
            logger.notify('Ignoring indexes: %s' % ','.join(index_urls))
            index_urls = []

        if options.use_mirrors:
            logger.deprecated("1.7",
                        "--use-mirrors has been deprecated and will be removed"
                        " in the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")

        if options.mirrors:
            logger.deprecated("1.7",
                        "--mirrors has been deprecated and will be removed in "
                        " the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")
            index_urls += options.mirrors

        dependency_links = []
        for dist in get_installed_distributions(local_only=options.local, skip=self.skip):
            if dist.has_metadata('dependency_links.txt'):
                dependency_links.extend(
                    dist.get_metadata_lines('dependency_links.txt'),
                )

        session = self._build_session(options)

        finder = self._build_package_finder(options, index_urls, session)
        finder.add_dependency_links(dependency_links)

        installed_packages = get_installed_distributions(local_only=options.local, include_editables=False, skip=self.skip)
        for dist in installed_packages:
            req = InstallRequirement.from_line(dist.key, None)
            try:
                link = finder.find_requirement(req, True)

                # If link is None, means installed version is most up-to-date
                if link is None:
                    continue
            except DistributionNotFound:
                continue
            except BestVersionAlreadyInstalled:
                remote_version = req.installed_version
            else:
                # It might be a good idea that link or finder had a public method
                # that returned version
                remote_version = finder._link_package_versions(link, req.name)[0]
                remote_version_raw = remote_version[2]
                remote_version_parsed = remote_version[0]
            yield dist, remote_version_raw, remote_version_parsed

    def run_listing(self, options):
        installed_packages = get_installed_distributions(local_only=options.local, skip=self.skip)
        self.output_package_listing(installed_packages)

    def run_editables(self, options):
        installed_packages = get_installed_distributions(local_only=options.local, editables_only=True)
        self.output_package_listing(installed_packages)

    def output_package_listing(self, installed_packages):
        installed_packages = sorted(installed_packages, key=lambda dist: dist.project_name.lower())
        for dist in installed_packages:
            if dist_is_editable(dist):
                line = '%s (%s, %s)' % (dist.project_name, dist.version, dist.location)
            else:
                line = '%s (%s)' % (dist.project_name, dist.version)
            logger.notify(line)

    def run_uptodate(self, options):
        uptodate = []
        for dist, remote_version_raw, remote_version_parsed in self.find_packages_latests_versions(options):
            if dist.parsed_version == remote_version_parsed:
                uptodate.append(dist)
        self.output_package_listing(uptodate)
python3.4/site-packages/pip/commands/__pycache__/bundle.cpython-34.pyc000064400000003633151735047770021555 0ustar00�
�Re��@s�ddlZddlmZmZddlmZmZddlmZddl	m
Z
ddlmZGdd�de�Z
dS)	�N)�build_prefix�
src_prefix)�display_path�
backup_dir)�logger)�InstallationError)�InstallCommandcsReZdZdZdZdZdZdZ�fdd�Z�fdd	�Z	�S)
�
BundleCommandz9Create pybundles (archives containing multiple packages).�bundlez:
      %prog [options] <bundle name>.pybundle <package>...zDEPRECATED. Create pybundles.Tcs�tt|�j||�|jjd�}ttd�|_|jjd�}ttd�|_|jj	i|j|j
6|j|j
6�dS)Nz--buildz-bundlez--src)�superr	�__init__�parser�
get_optionrr�defaultr�set_defaults�dest)�self�args�kw�	build_opt�src_opt)�	__class__��./tmp/pip-ztkk0jow-build/pip/commands/bundle.pyrs
zBundleCommand.__init__cs�tjdd�|s%td��nd|_tjdt|j�t|j�f�|jd�|_	t
t|�j||�}|S)Nz1.6z�DEPRECATION: 'pip bundle' and support for installing from *.pybundle files is deprecated. See https://github.com/pypa/pip/pull/1046zYou must give a bundle filenameTzBPutting temporary build files in %s and source/develop files in %sr)
r�
deprecatedr�ignore_installed�notifyr�	build_dir�src_dir�pop�bundle_filenamerr	�run)r�optionsr�requirement_set)rrrr!s		 zBundleCommand.run)
�__name__�
__module__�__qualname__�__doc__�name�usage�summaryr
rr!rr)rrr		sr	)�textwrap�
pip.locationsrr�pip.utilrr�pip.logr�pip.exceptionsr�pip.commands.installrr	rrrr�<module>spython3.4/site-packages/pip/commands/__pycache__/search.cpython-34.pyc000064400000011435151735047770021550 0ustar00�
�Re��@sddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZm
Z
mZddlmZddlmZddlmZdd	lmZmZGd
d�de�Zdd
�Zdddd�Zdd�Zdd�ZdS)�N)�Command�SUCCESS)�get_terminal_size)�logger)�	xmlrpclib�reduce�cmp)�CommandError)�NO_MATCHES_FOUND)�
pkg_resources)�
StrictVersion�LooseVersioncsReZdZdZdZdZdZ�fdd�Zdd�Zd	d
�Z	�S)�
SearchCommandz@Search for PyPI packages whose name or summary contains <query>.�searchz
      %prog [options] <query>zSearch PyPI for packages.c
s[tt|�j||�|jjddddddddd	�|jjd
|j�dS)Nz--index�dest�index�metavar�URL�defaultzhttps://pypi.python.org/pypi�helpz3Base URL of Python Package Index (default %default)r)�superr�__init__�cmd_opts�
add_option�parser�insert_option_group)�self�args�kw)�	__class__��./tmp/pip-ztkk0jow-build/pip/commands/search.pyrs	zSearchCommand.__init__cCs�|std��n|}|j}|j||�}t|�}d}tjj�rgt�d}nt|d|�|r�t	St
S)Nz)Missing required argument (search query).r�terminal_width)r	rr�transform_hits�sys�stdout�isattyr�
print_resultsrr
)r�optionsr�query�	index_url�	pypi_hits�hitsr"r r r!�run"s	zSearchCommand.runcCs3tj|�}|ji|d6|d6d�}|S)N�name�summary�or)r�ServerProxyr)rr)r*�pypir,r r r!r4s zSearchCommand.search)
�__name__�
__module__�__qualname__�__doc__r.�usager/rr-rr r )rr!rsrcCsi}x�|D]�}|d}|d}|d}|d}|dkrPd}n||j�kr�i|d6|d6|gd6|d6||<q
||dj|�|t||d�kr
|||d<|||d<q
q
Wt|j�d	d
d�dd
�}|S)z�
    The list from pypi is really a list of versions. We want a list of
    packages with the list of versions stored inline. This converts the
    list from pypi into one we can use.
    r.r/�version�_pypi_orderingNr�versions�score�keycSs|dS)Nr;r )�xr r r!�<lambda>Tsz transform_hits.<locals>.<lambda>�reverseT)�keys�append�highest_version�sorted�values)r,�packages�hitr.r/r8r;�package_listr r r!r#:s 




	,$r#�c
Csgdd�tjD�}xJ|D]B}|d}|dp:d}|dk	r�tj|||d�}dd|d	j|�}nd
|j|�|f}y�tj|�||krItj|�}tj	d7_	z_t
|d�}	|j|	kr
tjd
|j�n%tjd|j�tjd|	�Wdtj	d8_	XnWqtk
r^YqXqWdS)NcSsg|]}|j�qSr )�project_name)�.0�pr r r!�
<listcomp>Ys	z!print_results.<locals>.<listcomp>r.r/���
� �z%s - %s�r:zINSTALLED: %s (latest)z
INSTALLED: %sz
LATEST:    %s)
r�working_set�textwrap�wrap�join�ljustr�notify�get_distribution�indentrBr8�UnicodeEncodeError)
r,�name_column_widthr"�installed_packagesrFr.r/�line�dist�latestr r r!r'Xs,



r'cCs�ytt|�t|��SWntk
r1YnXytt|�t|��SWnKtk
r�tdd�t|�jD�dd�t|�jD��SYnXdS)NcSsg|]}t|��qSr )�str)rJ�vr r r!rLs	z$compare_versions.<locals>.<listcomp>cSsg|]}t|��qSr )ra)rJrbr r r!rL�s	)rr�
ValueErrorr
�	TypeErrorr8)�version1�version2r r r!�compare_versionsts

rgcCstdd�|�S)NcSst||�dkr|p|S)N�)rg)�v1�v2r r r!r>�sz!highest_version.<locals>.<lambda>)r)r:r r r!rB�srB)r$rT�pip.download�pip�pip.basecommandrr�pip.utilr�pip.logrZpip.backwardcompatrrr�pip.exceptionsr	�pip.status_codesr
�pip._vendorr�distutils.versionrr
rr#r'rgrBr r r r!�<module>s*python3.4/site-packages/pip/commands/__pycache__/show.cpython-34.pyc000064400000006060151735047770021261 0ustar00�
�Re�
�@snddlZddlmZddlmZddlmZGdd�de�Zdd�Zd	d
�Z	dS)�N)�Command)�logger)�
pkg_resourcescsFeZdZdZdZdZdZ�fdd�Zdd�Z�S)	�ShowCommandz6Show information about one or more installed packages.�showz$
      %prog [options] <package> ...z*Show information about installed packages.cs^tt|�j||�|jjddddddddd	d
�|jjd|j�dS)Nz-fz--files�dest�files�action�
store_true�defaultF�helpz7Show the full list of installed files for each package.r)�superr�__init__�cmd_opts�
add_option�parser�insert_option_group)�self�args�kw)�	__class__��,/tmp/pip-ztkk0jow-build/pip/commands/show.pyrs		zShowCommand.__init__cCs=|stjd�dS|}t|�}t||j�dS)Nz.ERROR: Please provide a package name or names.)r�warn�search_packages_info�
print_resultsr)r�optionsr�query�resultsrrr�runs
zShowCommand.run)	�__name__�
__module__�__qualname__�__doc__�name�usage�summaryrrrr)rrrsrccs�tdd�tjD��}x�|D]�}|j�}||kr#||}i|jd6|jd6|jd6dd�|j�D�d6}tj	j
|j|j�dd	�}tj	j|�r�||d
<n|Vq#q#WdS)z�
    Gather details from installed distributions. Print distribution name,
    version, location, and installed files. Installed files requires a
    pip generated 'installed-files.txt' in the distributions '.egg-info'
    directory.
    cSs%g|]}|jj�|f�qSr)�project_name�lower)�.0�prrr�
<listcomp>,s	z(search_packages_info.<locals>.<listcomp>r$�version�locationcSsg|]}|j�qSr)r')r)�deprrrr+5s	�requiresz	.egg-infozinstalled-files.txtrN)
�dictr�working_setr(r'r,r-r/�os�path�join�egg_name�isfile)r�installed_packagesr$�normalized_name�dist�package�filelistrrrr$s$




	
	
rcCs�x�|D]�}tjd�tjd|d�tjd|d�tjd|d�tjdd	j|d
��|rtjd�d|kr�x?t|d�D]}tjd
|j��q�Wq�tjd�qqWdS)zD
    Print the informations from installed distributions found.
    z---zName: %sr$zVersion: %sr,zLocation: %sr-zRequires: %sz, r/zFiles:rz  %sz!Cannot locate installed-files.txtN)r�notifyr4�open�strip)�
distributions�list_all_filesr9�linerrrr@s


r)
r2�pip.basecommandr�pip.logr�pip._vendorrrrrrrrr�<module>spython3.4/site-packages/pip/commands/__pycache__/freeze.cpython-34.pyc000064400000007575151735047770021575 0ustar00�
�Re8�@s�ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZGdd�de�Z
dS)	�N)�InstallRequirement)�logger)�Command)�get_installed_distributions)�
pkg_resourcescsReZdZdZdZdZdZ�fdd�Zdd�Zdd	�Z	�S)
�
FreezeCommandz1Output installed packages in requirements format.�freezez
      %prog [options]c
s�tt|�j||�|jjdddddddddd	d
d�|jjdd
dddddgddd
d�|jjddddddddd
d�|jjd|j�dS)Nz-rz
--requirement�dest�requirement�action�store�default�metavar�file�helpzVUse the order in the given requirements file and it's comments when generating output.z-fz--find-links�
find_links�append�URLz<URL for finding packages, which will be added to the output.z-lz--local�local�
store_trueFzUIf in a virtualenv that has global access, do not output globally-installed packages.r)�superr�__init__�cmd_opts�
add_option�parser�insert_option_group)�self�args�kw)�	__class__��./tmp/pip-ztkk0jow-build/pip/commands/freeze.pyrs,						zFreezeCommand.__init__cCstj�dS)N)r�move_stdout_to_stderr)rr r r!�
setup_logging-szFreezeCommand.setup_loggingcCs�|j}|jpg}|j}d}d}|j}|rNtj|�}ng}	tj}
x9tj	D].}|j
d�rg|	j|jd��qgqgWx*|D]"}d|kr�|	j
|�q�q�Wx|D]}|
jd|�q�Wi}
x?td|�D].}tjj||	d|�}||
|j<q�W|rrt|�}x|D]}|j�sq|j�jd�r�|
j|�qIn|r�|j|�r�|
j|�qIn/|jd�s�|jd	�r2|jd�r�|d
d�j�}n%|td	�d�j�jd�}tj|d|j�}n�|jd
�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�r�|
j|�qIntj|�}|jstjd|j��tjd�qIn|j|
kr:tj d|j��qIn|
jt!|
|j��|
|j=qIW|
jd�nx9t"|
j#�ddd��D]}|
jt!|��q�WdS)NFzdependency_links.txtz#egg=z-f %s
�
local_only�	find_tags�#z-ez
--editable��=�default_vcsz-rz
--requirementz-Zz--always-unzipz-fz-iz--extra-index-urlz--find-linksz--index-urlz>Skipping line because it's not clear what it would install: %sz9  (add #egg=PackageName to the URL to avoid this warning)z?Requirement file contains %s, but that package is not installedz:## The following requirements were added by pip --freeze:
�keycSs|jS)N)�name)�xr r r!�<lambda>qsz#FreezeCommand.run.<locals>.<lambda>)$r
rr�skip_requirements_regex�re�compile�sys�stdoutr�working_set�has_metadata�extend�get_metadata_linesr�writer�pip�FrozenRequirement�	from_distr+�open�strip�
startswith�search�len�lstripr�
from_editabler)�	from_liner�notify�warn�str�sorted�values)r�optionsrr
rr$r%�
skip_match�
skip_regex�dependency_links�f�dist�link�
installations�req�req_f�line�line_req�installationr r r!�run0sv				


"

%
		
	%zFreezeCommand.run)
�__name__�
__module__�__qualname__�__doc__r+�usage�summaryrr#rUr r )rr!rsr)r/r1r8�pip.reqr�pip.logr�pip.basecommandr�pip.utilr�pip._vendorrrr r r r!�<module>spython3.4/site-packages/pip/commands/__pycache__/unzip.cpython-34.pyc000064400000000727151735047770021452 0ustar00�
�Re��@s*ddlmZGdd�de�ZdS)�)�
ZipCommandc@s"eZdZdZdZdZdS)�UnzipCommandzUnzip individual packages.�unzipz&DEPRECATED. Unzip individual packages.N)�__name__�
__module__�__qualname__�__doc__�name�summary�rr�-/tmp/pip-ztkk0jow-build/pip/commands/unzip.pyrsrN)�pip.commands.ziprrrrrr�<module>spython3.4/site-packages/pip/commands/__pycache__/__init__.cpython-34.pyc000064400000004211151735047770022034 0ustar00�
�Re��@s�dZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZdd
lmZddlmZddlmZdd
lmZieej6eej6eej6eej6eej6eej6eej6eej6eej6eej6e
e
j6eej6Zeeee
eeeeeeegZdddd�Zdd�Zdd�ZdS)z%
Package containing all pip commands
�)�
BundleCommand)�CompletionCommand)�
FreezeCommand)�HelpCommand)�ListCommand)�
SearchCommand)�ShowCommand)�InstallCommand)�UninstallCommand)�UnzipCommand)�
ZipCommand)�WheelCommandTccsb|rttt�}ntj�}x7|D]/\}}|rL|jrLq+n||jfVq+WdS)z5Yields sorted (command name, command summary) tuples.N)�_sort_commands�commands�commands_order�items�hidden�summary)�
ignore_hidden�ordered�cmditems�name�
command_class�r�0/tmp/pip-ztkk0jow-build/pip/commands/__init__.py�
get_summaries3srcCsBddlm}||tj��}|r8|d}nd}|S)zCommand name auto-correct.r)�get_close_matchesF)�difflibrr�keys)rr�close_commands�guessrrr�get_similar_commandsBs
r!cs(�fdd�}t|j�d|�S)Ncs2y�j|d�SWntk
r-dSYnXdS)N��)�index�
ValueError)�key)�orderrr�keyfnQs
z_sort_commands.<locals>.keyfnr&)�sortedr)�cmddictr'r(r)r'rrPsrN)�__doc__�pip.commands.bundler�pip.commands.completionr�pip.commands.freezer�pip.commands.helpr�pip.commands.listr�pip.commands.searchr�pip.commands.showr�pip.commands.installr	�pip.commands.uninstallr
�pip.commands.unzipr�pip.commands.zipr�pip.commands.wheelr
rrrrr!rrrrr�<module>sN











	python3.4/site-packages/pip/commands/__pycache__/install.cpython-34.pyc000064400000022665151735047770021760 0ustar00�
�Re�5�@s�ddlZddlZddlZddlZddlmZmZmZddlm	Z	ddl
mZmZm
Z
mZddlmZddlmZddlmZmZmZddlmZdd	lmZGd
d�de�ZdS)�N)�InstallRequirement�RequirementSet�parse_requirements)�logger)�
src_prefix�virtualenv_no_global�distutils_scheme�build_prefix)�Command)�
PackageFinder)�InstallationError�CommandError�PreviousBuildDirError)�
cmdoptions)�BuildDirectorycsXeZdZdZdZdZdZdZ�fdd�Zdd	�Z	d
d�Z
�S)�InstallCommandaI
    Install packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    �installz�
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...zInstall packages.Fc
shtt|�j||�|j}|jdddddddgdd	d
d�|jtjj��|jtjj��|jdd
ddddddd
d�|jddddddddddd
d�|jtj	j��|jdddddddddt
d
d�|jdddddd d
d!�|jd"dd#dd d
d$�|jd%d&dd'dd d
d(�|jtjj��|jd)dd*dd d
d+�|jd,dd-dd d
d.�|jtjj��|jtj
j��|jd/dd0dd d
d1�|jd2dd3dd d
d4�|jd5dd6ddddd
d7�|jd8dd9dd:ddd
d;�|jd<dd dd=dd>d
d?�|jd@ddAdd=d
dB�|jtjj��|jtjj��|jdCdd ddDd
dE�|jtjj��tjtj|j�}|jjdF|�|jjdF|�dS)GNz-ez
--editable�dest�	editables�action�append�default�metavarzpath/url�helpzkInstall a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.z-tz--target�
target_dir�dirzInstall packages into <dir>.z-dz
--downloadz--download-dirz--download-directory�download_dirz`Download packages into <dir> instead of installing them, regardless of what's already installed.z--srcz--sourcez--source-dirz--source-directory�src_dirz�Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".z-Uz	--upgrade�upgrade�
store_truez�Upgrade all packages to the newest available version. This process is recursive regardless of whether a dependency is already satisfied.z--force-reinstall�force_reinstallzKWhen upgrading, reinstall all packages even if they are already up-to-date.z-Iz--ignore-installed�ignore_installedz5Ignore the installed packages (reinstalling instead).z--no-install�
no_installzNDEPRECATED. Download and unpack all packages, but don't actually install them.z
--no-download�no_downloadzDEPRECATED. Don't download any packages, just install the ones already downloaded (completes an install run with --no-install).z--user�
use_user_sitezInstall using the user scheme.z--egg�as_eggz�Install packages as eggs, not 'flat', like pip normally does. This option is not about installing *from* eggs. (WARNING: Because this option overrides pip's normal install logic, requirements files may not behave as expected.)z--root�	root_pathz=Install everything relative to this alternate root directory.z--strip-file-prefix�strip_file_prefix�prefixz5Strip given prefix from script paths in wheel RECORD.z	--compile�compileTzCompile py files to pycz--no-compile�store_falsezDo not compile py files to pycz--preFzYInclude pre-release and development versions. By default, pip only finds stable versions.r)�superr�__init__�cmd_opts�
add_optionr�requirements�make�	build_dir�download_cacher�no_deps�install_options�global_options�	use_wheel�no_use_wheel�no_clean�make_option_group�index_group�parser�insert_option_group)�self�args�kwr-�
index_opts)�	__class__��//tmp/pip-ztkk0jow-build/pip/commands/install.pyr,(s�					zInstallCommand.__init__cCsRtd|jd|d|jd|jd|jd|jd|jd|jd	|�	S)
z�
        Create a package finder appropriate to this install command.
        This method is meant to be overridden by subclasses, not
        called directly.
        �
find_links�
index_urlsr6�allow_external�allow_unverified�allow_all_external�allow_all_prereleases�process_dependency_links�session)rrDr6rFrGrH�prerJ)r=�optionsrErKrBrBrC�_build_package_finder�s						z$InstallCommand._build_package_finderc"Cs|js$|js$|js$|jr7tjdd�n|jrUd|_d|_n|jdkr�|jsv|jr�t|_n|jr�t	j
j|j�|_nt	j
j|j�|_|j
p�g}|jr�t�r�td��n|jd�nd}|jr�d|_tj�}t	j
j|j�|_t	j
j|j�rtt	j
j|j�rttd��n|jd|�n|jp�g}|jg|j}|jr�tjdd	j|��g}n|jr�tjdd
�n|jrtjdd�||j7}n|j |�}|j!|||�}|jpN|j}	t"|jd|	��}
t#d
|
d|jd|jd|j$d|j%d|j&d|jd|j'd|j(d|jd|d|d|j)�
}x'|D]}|j*t+j,|d��q�Wx0|j-D]%}|j*t+j.|d|j/��qWxG|j0D]<}
x3t1|
d|d|d|�D]}|j*|�qkWqFW|j2s�i|j3d6}|j4r�dt5|dd j|j4��}n
d!|}tj6|�dSzEy |js|j7|d"|j8d#|j8�n
|j9�|jr�|j8r�|j:||d$|j;d%|j<�d jd&d'�|j=D��}|r
tjd(|�q
nu|j8s�d jd)d'�|j>D��}|r
tjd*|�q
n0|j8r
|j?|j@�tjd+|j@�nWntAk
r+d|_�YnXWd|jrc|jsM|jrc|jBd#|j8�nXWdQX|jrt	j
j|j�s�t	jC|j�ntDd,d-|�d.}xHt	jE|�D]7}tFjGt	j
j||�t	j
j|j|��q�WtFjH|�n|S)/Nz1.7z~DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated.  See https://github.com/pypa/pip/issues/906.TzZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z--userz=Target path exists but is not a directory, will not continue.z--home=zIgnoring indexes: %s�,z�--use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.z�--mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.�deleter1rrr2rr%r!�ignore_dependenciesr r$rrK�	pycompile�default_vcs�finderrM�namez^You must give at least one requirement to %(name)s (maybe you meant "pip %(name)s %(links)s"?)�links� zLYou must give at least one requirement to %(name)s (see "pip help %(name)s")�force_root_egg_info�bundle�rootr'cSsg|]}|j�qSrB)rU)�.0�reqrBrBrC�
<listcomp>4s	z&InstallCommand.run.<locals>.<listcomp>zSuccessfully installed %scSsg|]}|j�qSrB)rU)r[r\rBrBrCr]9s	zSuccessfully downloaded %szCreated bundle in %s��home�purelib)Ir"r#r1r8r�
deprecatedrr!r	�os�path�abspathrr4r$rrrr�tempfile�mkdtemp�exists�isdirr
r5�	index_url�extra_index_urls�no_index�notify�join�use_mirrors�mirrors�_build_sessionrNrrr2rr%rQr r)�add_requirementr�	from_liner�
from_editablerSr/r�has_requirementsrUrD�dict�warn�
prepare_filesrY�locate_filesrr&r'�successfully_installed�successfully_downloaded�
create_bundle�bundle_filenamer�
cleanup_files�makedirsr�listdir�shutil�move�rmtree)r=rMr>r4�temp_target_dirr5rErKrT�build_deleter1�requirement_setrU�filenamer\�opts�msg�	installed�
downloaded�lib_dir�itemrBrBrC�run�s�											+				
											
%		"
	"
	
		
		zInstallCommand.run)�__name__�
__module__�__qualname__�__doc__rU�usage�summaryrYr,rNr�rBrB)rArCrs�r)rb�sysrer��pip.reqrrr�pip.logr�
pip.locationsrrrr	�pip.basecommandr
�	pip.indexr�pip.exceptionsrr
r�pipr�pip.utilrrrBrBrBrC�<module>s"python3.4/site-packages/pip/commands/__pycache__/uninstall.cpython-34.pyc000064400000004465151735047770022321 0ustar00�
�Re��@sVddlmZmZmZddlmZddlmZGdd�de�ZdS)�)�InstallRequirement�RequirementSet�parse_requirements)�Command)�InstallationErrorcsFeZdZdZdZdZdZ�fdd�Zdd�Z�S)	�UninstallCommandaB
    Uninstall packages.

    pip is able to uninstall most installed packages. Known exceptions are:

    - Pure distutils packages installed with ``python setup.py install``, which
      leave behind no metadata to determine what files were installed.
    - Script wrappers installed by ``python setup.py develop``.
    �	uninstallzU
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ...zUninstall packages.c
s�tt|�j||�|jjdddddddgdd	d
d�|jjdd
ddddd
d�|jjd|j�dS)Nz-rz
--requirement�dest�requirements�action�append�default�metavar�file�helpzjUninstall all the packages listed in the given requirements file.  This option can be used multiple times.z-yz--yes�yes�
store_truez2Don't ask for confirmation of uninstall deletions.r)�superr�__init__�cmd_opts�
add_option�parser�insert_option_group)�self�args�kw)�	__class__��1/tmp/pip-ztkk0jow-build/pip/commands/uninstall.pyrs				zUninstallCommand.__init__c	Cs�|j|�}tddddddd|�}x$|D]}|jtj|��q7WxA|jD]6}x-t|d|d|�D]}|j|�q�WqaW|js�tdt	d|j
���n|jd|j�dS)	N�	build_dir�src_dir�download_dir�session�optionszLYou must give at least one requirement to %(name)s (see "pip help %(name)s")�name�auto_confirm)
�_build_sessionr�add_requirementr�	from_liner
r�has_requirementsr�dictr$rr)rr#rr"�requirement_setr$�filename�reqrrr�run(s"	
	zUninstallCommand.run)	�__name__�
__module__�__qualname__�__doc__r$�usage�summaryrr.rr)rrrs	rN)	�pip.reqrrr�pip.basecommandr�pip.exceptionsrrrrrr�<module>spython3.4/site-packages/pip/commands/__pycache__/list.cpython-34.pyc000064400000013127151735047770021256 0ustar00�
�Re��@s�ddlmZddlmZmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZGdd	�d	e�Zd
S)�)�Command)�DistributionNotFound�BestVersionAlreadyInstalled)�
PackageFinder)�logger)�InstallRequirement)�get_installed_distributions�dist_is_editable)�make_option_group�index_groupcs�eZdZdZdZdZdZdgZ�fdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�Zdd�Z�S)�ListCommandz-List installed packages, including editables.�listz
      %prog [options]zList installed packages.�pythonc	stt|�j||�|j}|jdddddddd�|jd	d
dddddd�|jdd
dddddd�|jdddddddd�|jddddddd�tt|j�}|jjd|�|jjd|�dS)Nz-oz
--outdated�action�
store_true�defaultF�helpz,List outdated packages (excluding editables)z-uz
--uptodatez,List uptodate packages (excluding editables)z-ez
--editablezList editable projects.z-lz--localzSIf in a virtualenv that has global access, do not list globally-installed packages.z--prezYInclude pre-release and development versions. By default, pip only finds stable versions.r)	�superr�__init__�cmd_opts�
add_optionr
r�parser�insert_option_group)�self�args�kwr�
index_opts)�	__class__��,/tmp/pip-ztkk0jow-build/pip/commands/list.pyrs<					zListCommand.__init__cCsItd|jd|d|jd|jd|jd|jd|jd|�S)	zK
        Create a package finder appropriate to this list command.
        �
find_links�
index_urls�allow_external�allow_unverified�allow_all_external�allow_all_prereleases�process_dependency_links�session)rr r"r#r$�prer&)r�optionsr!r'rrr�_build_package_finder9s					z!ListCommand._build_package_findercCs\|jr|j|�n?|jr2|j|�n&|jrK|j|�n
|j|�dS)N)�outdated�run_outdated�uptodate�run_uptodate�editable�
run_editables�run_listing)rr)rrrr�runHs			zListCommand.runcCsYxR|j|�D]A\}}}||jkrtjd|j|j|f�qqWdS)Nz%s (Current: %s Latest: %s))�find_packages_latests_versions�parsed_versionr�notify�project_name�version)rr)�dist�remote_version_raw�remote_version_parsedrrrr,RszListCommand.run_outdatedc
cs�|jg|j}|jr?tjddj|��g}n|jr[tjdd�n|jr�tjdd�||j7}ng}xKt	d|j
d|j�D].}|jd�r�|j
|jd��q�q�W|j|�}|j|||�}|j|�t	d|j
d	d
d|j�}x�|D]�}tj|jd�}y(|j|d�}	|	dkrsw1nWn/tk
r�w1YnHtk
r�|j}
Yn.X|j|	|j�d}
|
d
}|
d}|||fVq1WdS)NzIgnoring indexes: %s�,z1.7z�--use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.z�--mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.�
local_only�skipzdependency_links.txt�include_editablesFTr�)�	index_url�extra_index_urls�no_indexrr5�join�use_mirrors�
deprecated�mirrorsr�localr=�has_metadata�extend�get_metadata_lines�_build_sessionr*�add_dependency_linksr�	from_line�key�find_requirementrr�installed_version�_link_package_versions�name)
rr)r!�dependency_linksr8r'�finder�installed_packages�req�link�remote_versionr9r:rrrr3XsD				
		"
!





z*ListCommand.find_packages_latests_versionscCs,td|jd|j�}|j|�dS)Nr<r=)rrGr=�output_package_listing)rr)rUrrrr1�szListCommand.run_listingcCs)td|jdd�}|j|�dS)Nr<�editables_onlyT)rrGrY)rr)rUrrrr0�szListCommand.run_editablescCs{t|ddd��}x\|D]T}t|�rPd|j|j|jf}nd|j|jf}tj|�qWdS)NrNcSs
|jj�S)N)r6�lower)r8rrr�<lambda>�sz4ListCommand.output_package_listing.<locals>.<lambda>z%s (%s, %s)z%s (%s))�sortedr	r6r7�locationrr5)rrUr8�linerrrrY�s
z"ListCommand.output_package_listingcCsYg}x?|j|�D].\}}}|j|kr|j|�qqW|j|�dS)N)r3r4�appendrY)rr)r-r8r9r:rrrr.�s
zListCommand.run_uptodate)�__name__�
__module__�__qualname__�__doc__rR�usage�summaryr=rr*r2r,r3r1r0rYr.rr)rrr
s	%
4	rN)�pip.basecommandr�pip.exceptionsrr�	pip.indexr�pip.logr�pip.reqr�pip.utilrr	Zpip.cmdoptionsr
rrrrrr�<module>spython3.4/site-packages/pip/commands/__pycache__/help.cpython-34.pyc000064400000002105151735047770021225 0ustar00�
�Re��@s@ddlmZmZddlmZGdd�de�ZdS)�)�Command�SUCCESS)�CommandErrorc@s4eZdZdZdZdZdZdd�ZdS)�HelpCommandzShow help for commands�helpz
      %prog <command>zShow help for commands.c	Cs�ddlm}m}y|d}Wntk
r<tSYnX||kr�||�}d|g}|r||jd|�ntdj|���n||�}|jj	�tS)Nr)�commands�get_similar_commandszunknown command "%s"zmaybe you meant "%s"z - )
�pip.commandsrr�
IndexErrorr�appendr�join�parser�
print_help)	�self�options�argsrr�cmd_name�guess�msg�command�r�,/tmp/pip-ztkk0jow-build/pip/commands/help.py�runs
	


zHelpCommand.runN)�__name__�
__module__�__qualname__�__doc__�name�usage�summaryrrrrrrs
rN)�pip.basecommandrr�pip.exceptionsrrrrrr�<module>spython3.4/site-packages/pip/commands/__pycache__/zip.cpython-34.pyc000064400000025673151735047770021116 0ustar00�
�Re�9�@s�ddlZddlZddlZddlZddlZddlZddlmZmZm	Z	ddl
mZddlm
Z
ddlmZGdd�de�ZdS)�N)�display_path�
backup_dir�rmtree)�logger)�InstallationError)�Commandcs�eZdZdZdZdZdZ�fdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Z�S)�
ZipCommandzZip individual packages.�zipz#
     %prog [options] <package> ...z$DEPRECATED. Zip individual packages.c
s9tt|�j||�|jdkrM|jjddddddd�n(|jjd	dd
dddddd
�|jjddddddd�|jjdddddddd�|jjddddddd�|jjddddddd�|jjdddddd�|jjd|j�dS) Nr	z--unzip�action�
store_true�dest�unzip�helpz"Unzip (rather than zip) a package.z--zip�store_false�defaultTz"Zip (rather than unzip) a package.z--no-pyc�no_pyczEDo not include .pyc files in zip files (useful on Google App Engine).z-lz--list�listz2List the packages available, and their zip status.z--sort-files�
sort_fileszDWith --list, sort packages according to how many files they contain.z--path�append�pathsz?Restrict operations to the given paths (may include wildcards).z-nz
--simulatez0Do not actually perform the zip/unzip operation.r)�superr�__init__�name�cmd_opts�
add_option�parser�insert_option_group)�self�args�kw)�	__class__��+/tmp/pip-ztkk0jow-build/pip/commands/zip.pyrsL	
								zZipCommand.__init__cCsp|jstjSg}t�}x�tjD]�}tjjtjj|��}x�|jD]�}tjjtjj|��}d|kr�tjt	j
|d�|�r�|j|�|j|�Pq�qW|j
|�rW|j|�|j|�PqWqWWtjd|dj|j�f�q)WxJ|jD]?}||kr)d|kr)|j|�tjd|�q)q)W|S)z:All the entries of sys.path, possibly restricted by --path�*z,Skipping path %s because it doesn't match %sz, zDAdding path %s because it doesn't match anything already on sys.path)�select_paths�sys�path�set�os�normcase�abspath�re�search�fnmatch�	translater�add�
startswithr�debug�join)r�result�	match_anyr&�matchr!r!r"r>s2		



	
	zZipCommand.pathscCsVtjdd�|j|_|j|_|jrA|j||�S|sVtd��ng}x�|D]�}|j|�\}}|jr�t	j
j|�r�td||f��n6|jr�t	j
j|�r�td||f��n|j||f�qcWd}xJ|D]B\}}|jr6|j
||�}q|j|||j�}qW|S)Nz1.7z_DEPRECATION: 'pip zip' and 'pip unzip` are deprecated, and will be removed in a future release.z2You must give at least one package to zip or unzipz;The module %s (in %s) is not a zip file; cannot be unzippedz:The module %s (in %s) is not a directory; cannot be zipped)r�
deprecatedrr$�simulaterr�find_packager
r(r&�isdirr�
unzip_package�zip_packager)r�optionsr�packages�arg�module_name�filename�last_statusr!r!r"�run\s4	
	zZipCommand.runcCs�tjj|�}tjj|�rPtj|�rPtd|||f��ntjj|�}||j�kr�tj	dt
|�t
|�t
|�f�ntjd|t
|�f�|jr�tjd�dStj
d7_
z�tj|�}g}x|j�D]}|j}|j|tjj�r�|j|�}	tjj||�}
tjjtjj|
��s�tjtjj|
��n|	r�|
jtjj�r�tjj|
�s�tj|
�q�qt|
d�}|j|	�|j�q|j||j|�f�qW|j�|sbtjdt
|��tj|�|j|�n`tjd|t
|�f�tj|d	�}x$|D]\}}	|j||	�q�W|j�Wdtj
d8_
XdS)
Nz3Module %s (in %s) isn't located in a zip file in %sz/Unpacking %s into %s, but %s is not on sys.pathzUnzipping %s (in %s)z3Skipping remaining operations because of --simulate��wbzRemoving now-empty zip file %sz(Removing entries in %s/ from zip file %s�w) r(r&�dirname�isfile�zipfile�
is_zipfilerrr�warnr�notifyr7�indent�ZipFile�infolistr@r0�sep�readr2�exists�makedirs�endswith�open�write�closer�info�unlink�remove_filename_from_pth�writestr)rr?r@�zip_filename�package_pathr	�to_saverWr�contentr�fr!r!r"r:{sX"	
	

 

zZipCommand.unzip_packagecCsN|}tjd|t|�f�tjd7_|jd�rJ|}n
|d}z�||kr�t|�}tjd||f�|js�tj||�q�nyvtj	dt|��|js�t
j|d�}|j|dd	�x�t
j|�D]�\}}}	|r)d
d�|	D�}	nx�|df|	d
fgD]�\}
}x�|
D]}t
jj||�}
t
jj||t|�d�jt
jj�|�}|r�|j|dd	�qU|j|
|�qUWqBWq�W|j�ntj	dt|��|jst|�nWn�YnX|j|�Wdtjd8_XdS)NzZip %s (in %s)rCz.eggz.zipzMoving %s aside to %szCreating zip file in %srE�/�cSs+g|]!}|j�jd�s|�qS)z.pyc)�lowerrS)�.0r_r!r!r"�
<listcomp>�s	z*ZipCommand.zip_package.<locals>.<listcomp>TFzRemoving old directory %s)rrKrrLrSrr7�shutil�moverWrHrMrZr(�walkr&r2�len�lstriprOrUrVr�add_filename_to_pth)rr?r@r�
orig_filename�
dest_filenamer	�dirpath�dirnames�	filenames�fns�is_dir�fn�fullrr!r!r"r;�sF	
		%
7
	zZipCommand.zip_packagecsx�|j�D]�}t|d�}|j�}|j��fdd�|D�}||kr
tjdt��t|�f�dd�|D�s�tjdt|��|js�tj	|�q�n2|js�t|d�}|j
|�|j�ndSq
Wtjdt���dS)	N�rcs(g|]}|j��kr|�qSr!)�strip)rc�l)r@r!r"rd�s	z7ZipCommand.remove_filename_from_pth.<locals>.<listcomp>z*Removing reference to %s from .pth file %scSsg|]}|r|�qSr!r!)rc�liner!r!r"rd�s	z %s file would be empty: deletingrDz.Cannot find a reference to %s in any .pth file)�	pth_filesrT�	readlinesrVrrWrr7r(rX�
writelinesrJ)rr@�pthr_�lines�	new_linesr!)r@r"rY�s$
			

z#ZipCommand.remove_filename_from_pthcCs�tjj|�}|d}||j�krHtjdt|��n|js�tjj|�r�t	|�}|j
�}|j�|r�|djd�r�|dd7<n|j
|d�n
|dg}t	|d�}|j|�|j�ndS)Nz.pthz.Adding .pth file %s, but it is not on sys.path��
rD���r�)r(r&rFrrrJrr7rQrTryrVrSrrz)rr@r&rr_r|r!r!r"rj�s 
	


zZipCommand.add_filename_to_pthccs�x�|j�D]r}tjj|�s
tjj|�r?q
nx=tj|�D],}|jd�rOtjj||�VqOqOWq
WdS)Nz.pth)rr(r&rQr9�listdirrSr2)rr&r@r!r!r"rxs&zZipCommand.pth_filescCs�x�|j�D]�}tjj||�}tjj|�rD||fStjj|�r
tj|�r
tj|d�}y |j	tjj|d��Wnt
k
r�YnX|j�||fS|j�q
q
Wtd|��dS)Nrtz__init__.pyz!No package with the name %s found)
rr(r&r2rQr9rHrIrMrP�KeyErrorrVr)r�packager&rsr	r!r!r"r8s
" 


zZipCommand.find_packagecCsD|rtd��nx(t|j��D]}tjj|�sFq(ntjj|jtjj��}tjj	|�r�t
j|�r�tjj|�|j�kr(t
jdt|��q(q(n|dkr|dkr|jdd�jd�rq(nt
jdt|��t
jd	7_g}g}z�x�ttj|��D]�}tjj|�d
j�}|dkrqKn|dkr�t
jdt|��qKntjj||�}	tjj|	�r�|j||j|	�f�qKt
j|	�r
|j|�qKt
jdt|��qKW|r�t
jd�t
jd	7_z"x|D]}t
j|�qTWWdt
jd	8_Xn
t
jd�|r|jr�|jddd��nt
jd�t
jd	7_z2x+|D]#\}}
t
jd||
f�q�WWdt
jd	8_Xn
t
jd�Wdt
jd	8_Xq(WdS)Nz'You cannot give an argument with --listzZipped egg: %sz
site-packagesz
dist-packages�\r`z
lib/pythonzIn %s:rCr~�.pth�	.egg-info�	.egg-linkz.pyz Not displaying %s: not a packagezUnknown file: %szZipped packages:zNo zipped packages.�keycSs	|dS)Nr~r!)�xr!r!r"�<lambda>Lsz!ZipCommand.list.<locals>.<lambda>zUnzipped packages:z%s  (%i files)zNo unzipped packages.)r�r�r�)r�sortedrr(r&rQ�basename�rstriprOrGrHrIrFrrKr�replacerSrLr��splitextrbrWr2r9r�
count_packager�sort)rr<rr&r��zipped�unzippedr@�extrs�countr!r!r"rsf!!


	
zZipCommand.listcCsPd}xCtj|�D]2\}}}dd�|D�}|t|�7}qW|S)NrcSs+g|]!}|j�jd�s|�qS)z.pyc)rbrS)rcr_r!r!r"rd\s	z,ZipCommand.count_package.<locals>.<listcomp>)r(rgrh)rr&�totalrmrnror!r!r"r�Ys
zZipCommand.count_package)�__name__�
__module__�__qualname__�__doc__r�usage�summaryrrrBr:r;rYrjrxr8rr�r!r!)r r"r
s*3,;r)r%r+r-r(rerH�pip.utilrrr�pip.logr�pip.exceptionsr�pip.basecommandrrr!r!r!r"�<module>spython3.4/site-packages/pip/commands/__pycache__/wheel.cpython-34.pyc000064400000012767151735047770021420 0ustar00�
�Re"�@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZddl
mZmZmZddlmZmZdd	lmZdd
lmZejjeej�d�ZGdd
�d
e�ZdS)�)�absolute_importN)�Command)�
PackageFinder)�logger)�CommandError�PreviousBuildDirError)�InstallRequirement�RequirementSet�parse_requirements)�BuildDirectory�normalize_path)�WheelBuilder)�
cmdoptionsZ
wheelhousecsFeZdZdZdZdZdZ�fdd�Zdd�Z�S)	�WheelCommanda�
    Build Wheel archives for your requirements and dependencies.

    Wheel is a built-package format, and offers the advantage of not recompiling your software during every install.
    For more details, see the wheel docs: http://wheel.readthedocs.org/en/latest.

    Requirements: setuptools>=0.8, and wheel.

    'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels.

    �wheelz�
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] <vcs project url> ...
      %prog [options] <local project path> ...
      %prog [options] <archive url/path> ...z$Build wheels from your requirements.cs�tt|�j||�|j}|jdddddddtdd	�|jtjj��|jtj	j��|jd
ddddd
ddd�|jtj
j��|jtjj��|jtjj��|jtj
j��|jdddd
ddddd�|jdd
ddddd�|jtjj��tjtj|j�}|jjd|�|jjd|�dS)Nz-wz--wheel-dir�dest�	wheel_dir�metavar�dir�default�helpzABuild wheels into <dir>, where the default is '<cwd>/wheelhouse'.z--build-option�
build_options�options�action�appendz9Extra arguments to be supplied to 'setup.py bdist_wheel'.z--global-option�global_optionszZExtra global options to be supplied to the setup.py call before the 'bdist_wheel' command.z--pre�
store_trueFzYInclude pre-release and development versions. By default, pip only finds stable versions.r)�superr�__init__�cmd_opts�
add_option�DEFAULT_WHEEL_DIRr�	use_wheel�make�no_use_wheel�requirements�download_cache�no_deps�	build_dir�no_clean�make_option_group�index_group�parser�insert_option_group)�self�args�kwr�
index_opts)�	__class__��-/tmp/pip-ztkk0jow-build/pip/commands/wheel.pyr(sF		zWheelCommand.__init__c+Csuyddl}Wntk
r0td��YnXyddl}Wntk
ratd��YnXt|d�s�td��n|jg|j}|jr�tj	ddj
|��g}n|jr�tjdd�n|j
rtjdd	�||j
7}n|jr(tjj|j�|_n|j|�}td
|jd|d|jd
|jd|jd|jd|jd|jd|�	}|jp�|j}t|jd|���}	td|	ddddd|jd|jddd|d|j �}
tjj!|j �s tj"|j �nx'|D]}|
j#t$j%|d��q'Wxj|j&D]_}xVt'|d|d|d|�D]6}
|
j(r�tj	d|
j)�qyn|
j#|
�qyWqTW|
j*s�i|j+d6}d |}tj,|�dSzfyAt-|
||j d!|j.pgd"|j/pg�}|j0�Wnt1k
rOd|_�YnXWd|jsj|
j2�nXWdQXdS)#NrzN'pip wheel' requires the 'wheel' package. To fix this, run:  pip install wheelzp'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptools�DistInfoDistributionzIgnoring indexes: %s�,z1.7z�--use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.z�--mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.�
find_links�
index_urlsr"�allow_external�allow_unverified�allow_all_external�allow_all_prereleases�process_dependency_links�session�deleter(�src_dir�download_dirr&�ignore_dependencies�ignore_installedT�wheel_download_dir�finderrzignoring %s�namezLYou must give at least one requirement to %(name)s (see "pip help %(name)s")rr)3�wheel.bdist_wheel�ImportErrorr�
pkg_resources�hasattr�	index_url�extra_index_urls�no_indexr�notify�join�use_mirrors�
deprecated�mirrorsr(�os�path�abspath�_build_sessionrr7r"r9r:r;�prer=r)rr	r&rBr�exists�makedirs�add_requirementr�	from_liner%r
�editable�url�has_requirementsrF�errorr
rr�buildr�
cleanup_files)r.rr/rrIr8r>rE�build_deleter(�requirement_setrF�filename�req�opts�msg�wbr3r3r4�runUs�

				
												

		
	
		zWheelCommand.run)	�__name__�
__module__�__qualname__�__doc__rF�usage�summaryrrir3r3)r2r4rs-r)�
__future__rrS�sys�pip.basecommandr�	pip.indexr�pip.logr�pip.exceptionsrr�pip.reqrr	r
�pip.utilrr�	pip.wheelr
�piprrTrO�curdirr!rr3r3r3r4�<module>spython3.4/site-packages/pip/commands/__pycache__/completion.cpython-34.pyc000064400000004310151735047770022446 0ustar00�
�Re.�@sPddlZddlmZdZidd6dd6ZGdd	�d	e�ZdS)
�N)�CommandzJ
# pip %(shell)s completion start%(script)s# pip %(shell)s completion end
z�
_pip_completion()
{
    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
                   COMP_CWORD=$COMP_CWORD \
                   PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
�bashz�
function _pip_completion {
  local words cword
  read -Ac words
  read -cn cword
  reply=( $( COMP_WORDS="$words[*]" \
             COMP_CWORD=$(( cword-1 )) \
             PIP_AUTO_COMPLETE=1 $words[1] ) )
}
compctl -K _pip_completion pip
�zshcsFeZdZdZdZdZdZ�fdd�Zdd�Z�S)	�CompletionCommandz3A helper command to be used for command completion.�
completionz2A helper command to be used for command completionTcsstt|�j||�|jjddddddddd	d
�|jjdddddd
ddd	d�dS)Nz--bashz-b�action�store_const�constr�dest�shell�helpzEmit completion code for bashz--zshz-zrzEmit completion code for zsh)�superr�__init__�parser�
add_option)�self�args�kw)�	__class__��2/tmp/pip-ztkk0jow-build/pip/commands/completion.pyr$s				zCompletionCommand.__init__cCs�tj�}dd�t|�D�}|j|krktj|jd�}tti|d6|jd6�ntjj	ddj
|��dS)	z-Prints the completion code of the given shellcSsg|]}d|�qS)z--r)�.0rrrr�
<listcomp>6s	z)CompletionCommand.run.<locals>.<listcomp>��scriptrzERROR: You must pass %s
z or N)�COMPLETION_SCRIPTS�keys�sortedr�get�print�BASE_COMPLETION�sys�stderr�write�join)r�optionsr�shells�
shell_optionsrrrr�run3s"zCompletionCommand.run)	�__name__�
__module__�__qualname__�__doc__�name�summary�hiddenrr(rr)rrrsr)r!�pip.basecommandrr rrrrrr�<module>s	

python3.4/site-packages/pip/commands/completion.py000064400000003456151735047770016176 0ustar00import sys
from pip.basecommand import Command

BASE_COMPLETION = """
# pip %(shell)s completion start%(script)s# pip %(shell)s completion end
"""

COMPLETION_SCRIPTS = {
    'bash': """
_pip_completion()
{
    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\
                   COMP_CWORD=$COMP_CWORD \\
                   PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
""", 'zsh': """
function _pip_completion {
  local words cword
  read -Ac words
  read -cn cword
  reply=( $( COMP_WORDS="$words[*]" \\
             COMP_CWORD=$(( cword-1 )) \\
             PIP_AUTO_COMPLETE=1 $words[1] ) )
}
compctl -K _pip_completion pip
"""}


class CompletionCommand(Command):
    """A helper command to be used for command completion."""
    name = 'completion'
    summary = 'A helper command to be used for command completion'
    hidden = True

    def __init__(self, *args, **kw):
        super(CompletionCommand, self).__init__(*args, **kw)
        self.parser.add_option(
            '--bash', '-b',
            action='store_const',
            const='bash',
            dest='shell',
            help='Emit completion code for bash')
        self.parser.add_option(
            '--zsh', '-z',
            action='store_const',
            const='zsh',
            dest='shell',
            help='Emit completion code for zsh')

    def run(self, options, args):
        """Prints the completion code of the given shell"""
        shells = COMPLETION_SCRIPTS.keys()
        shell_options = ['--' + shell for shell in sorted(shells)]
        if options.shell in shells:
            script = COMPLETION_SCRIPTS.get(options.shell, '')
            print(BASE_COMPLETION % {'script': script, 'shell': options.shell})
        else:
            sys.stderr.write('ERROR: You must pass %s\n' % ' or '.join(shell_options))
python3.4/site-packages/pip/commands/zip.py000064400000034745151735047770014634 0ustar00import sys
import re
import fnmatch
import os
import shutil
import zipfile
from pip.util import display_path, backup_dir, rmtree
from pip.log import logger
from pip.exceptions import InstallationError
from pip.basecommand import Command


class ZipCommand(Command):
    """Zip individual packages."""
    name = 'zip'
    usage = """
     %prog [options] <package> ..."""
    summary = 'DEPRECATED. Zip individual packages.'

    def __init__(self, *args, **kw):
        super(ZipCommand, self).__init__(*args, **kw)
        if self.name == 'zip':
            self.cmd_opts.add_option(
                '--unzip',
                action='store_true',
                dest='unzip',
                help='Unzip (rather than zip) a package.')
        else:
            self.cmd_opts.add_option(
                '--zip',
                action='store_false',
                dest='unzip',
                default=True,
                help='Zip (rather than unzip) a package.')
        self.cmd_opts.add_option(
            '--no-pyc',
            action='store_true',
            dest='no_pyc',
            help='Do not include .pyc files in zip files (useful on Google App Engine).')
        self.cmd_opts.add_option(
            '-l', '--list',
            action='store_true',
            dest='list',
            help='List the packages available, and their zip status.')
        self.cmd_opts.add_option(
            '--sort-files',
            action='store_true',
            dest='sort_files',
            help='With --list, sort packages according to how many files they contain.')
        self.cmd_opts.add_option(
            '--path',
            action='append',
            dest='paths',
            help='Restrict operations to the given paths (may include wildcards).')
        self.cmd_opts.add_option(
            '-n', '--simulate',
            action='store_true',
            help='Do not actually perform the zip/unzip operation.')

        self.parser.insert_option_group(0, self.cmd_opts)

    def paths(self):
        """All the entries of sys.path, possibly restricted by --path"""
        if not self.select_paths:
            return sys.path
        result = []
        match_any = set()
        for path in sys.path:
            path = os.path.normcase(os.path.abspath(path))
            for match in self.select_paths:
                match = os.path.normcase(os.path.abspath(match))
                if '*' in match:
                    if re.search(fnmatch.translate(match + '*'), path):
                        result.append(path)
                        match_any.add(match)
                        break
                else:
                    if path.startswith(match):
                        result.append(path)
                        match_any.add(match)
                        break
            else:
                logger.debug("Skipping path %s because it doesn't match %s"
                             % (path, ', '.join(self.select_paths)))
        for match in self.select_paths:
            if match not in match_any and '*' not in match:
                result.append(match)
                logger.debug("Adding path %s because it doesn't match "
                             "anything already on sys.path" % match)
        return result

    def run(self, options, args):

        logger.deprecated('1.7', "DEPRECATION: 'pip zip' and 'pip unzip` are deprecated, and will be removed in a future release.")

        self.select_paths = options.paths
        self.simulate = options.simulate
        if options.list:
            return self.list(options, args)
        if not args:
            raise InstallationError(
                'You must give at least one package to zip or unzip')
        packages = []
        for arg in args:
            module_name, filename = self.find_package(arg)
            if options.unzip and os.path.isdir(filename):
                raise InstallationError(
                    'The module %s (in %s) is not a zip file; cannot be unzipped'
                    % (module_name, filename))
            elif not options.unzip and not os.path.isdir(filename):
                raise InstallationError(
                    'The module %s (in %s) is not a directory; cannot be zipped'
                    % (module_name, filename))
            packages.append((module_name, filename))
        last_status = None
        for module_name, filename in packages:
            if options.unzip:
                last_status = self.unzip_package(module_name, filename)
            else:
                last_status = self.zip_package(module_name, filename, options.no_pyc)
        return last_status

    def unzip_package(self, module_name, filename):
        zip_filename = os.path.dirname(filename)
        if not os.path.isfile(zip_filename) and zipfile.is_zipfile(zip_filename):
            raise InstallationError(
                'Module %s (in %s) isn\'t located in a zip file in %s'
                % (module_name, filename, zip_filename))
        package_path = os.path.dirname(zip_filename)
        if not package_path in self.paths():
            logger.warn(
                'Unpacking %s into %s, but %s is not on sys.path'
                % (display_path(zip_filename), display_path(package_path),
                   display_path(package_path)))
        logger.notify('Unzipping %s (in %s)' % (module_name, display_path(zip_filename)))
        if self.simulate:
            logger.notify('Skipping remaining operations because of --simulate')
            return
        logger.indent += 2
        try:
            ## FIXME: this should be undoable:
            zip = zipfile.ZipFile(zip_filename)
            to_save = []
            for info in zip.infolist():
                name = info.filename
                if name.startswith(module_name + os.path.sep):
                    content = zip.read(name)
                    dest = os.path.join(package_path, name)
                    if not os.path.exists(os.path.dirname(dest)):
                        os.makedirs(os.path.dirname(dest))
                    if not content and dest.endswith(os.path.sep):
                        if not os.path.exists(dest):
                            os.makedirs(dest)
                    else:
                        f = open(dest, 'wb')
                        f.write(content)
                        f.close()
                else:
                    to_save.append((name, zip.read(name)))
            zip.close()
            if not to_save:
                logger.info('Removing now-empty zip file %s' % display_path(zip_filename))
                os.unlink(zip_filename)
                self.remove_filename_from_pth(zip_filename)
            else:
                logger.info('Removing entries in %s/ from zip file %s' % (module_name, display_path(zip_filename)))
                zip = zipfile.ZipFile(zip_filename, 'w')
                for name, content in to_save:
                    zip.writestr(name, content)
                zip.close()
        finally:
            logger.indent -= 2

    def zip_package(self, module_name, filename, no_pyc):
        orig_filename = filename
        logger.notify('Zip %s (in %s)' % (module_name, display_path(filename)))
        logger.indent += 2
        if filename.endswith('.egg'):
            dest_filename = filename
        else:
            dest_filename = filename + '.zip'
        try:
            ## FIXME: I think this needs to be undoable:
            if filename == dest_filename:
                filename = backup_dir(orig_filename)
                logger.notify('Moving %s aside to %s' % (orig_filename, filename))
                if not self.simulate:
                    shutil.move(orig_filename, filename)
            try:
                logger.info('Creating zip file in %s' % display_path(dest_filename))
                if not self.simulate:
                    zip = zipfile.ZipFile(dest_filename, 'w')
                    zip.writestr(module_name + '/', '')
                    for dirpath, dirnames, filenames in os.walk(filename):
                        if no_pyc:
                            filenames = [f for f in filenames
                                         if not f.lower().endswith('.pyc')]
                        for fns, is_dir in [(dirnames, True), (filenames, False)]:
                            for fn in fns:
                                full = os.path.join(dirpath, fn)
                                dest = os.path.join(module_name, dirpath[len(filename):].lstrip(os.path.sep), fn)
                                if is_dir:
                                    zip.writestr(dest + '/', '')
                                else:
                                    zip.write(full, dest)
                    zip.close()
                logger.info('Removing old directory %s' % display_path(filename))
                if not self.simulate:
                    rmtree(filename)
            except:
                ## FIXME: need to do an undo here
                raise
            ## FIXME: should also be undone:
            self.add_filename_to_pth(dest_filename)
        finally:
            logger.indent -= 2

    def remove_filename_from_pth(self, filename):
        for pth in self.pth_files():
            f = open(pth, 'r')
            lines = f.readlines()
            f.close()
            new_lines = [
                l for l in lines if l.strip() != filename]
            if lines != new_lines:
                logger.info('Removing reference to %s from .pth file %s'
                            % (display_path(filename), display_path(pth)))
                if not [line for line in new_lines if line]:
                    logger.info('%s file would be empty: deleting' % display_path(pth))
                    if not self.simulate:
                        os.unlink(pth)
                else:
                    if not self.simulate:
                        f = open(pth, 'wb')
                        f.writelines(new_lines)
                        f.close()
                return
        logger.warn('Cannot find a reference to %s in any .pth file' % display_path(filename))

    def add_filename_to_pth(self, filename):
        path = os.path.dirname(filename)
        dest = filename + '.pth'
        if path not in self.paths():
            logger.warn('Adding .pth file %s, but it is not on sys.path' % display_path(dest))
        if not self.simulate:
            if os.path.exists(dest):
                f = open(dest)
                lines = f.readlines()
                f.close()
                if lines and not lines[-1].endswith('\n'):
                    lines[-1] += '\n'
                lines.append(filename + '\n')
            else:
                lines = [filename + '\n']
            f = open(dest, 'wb')
            f.writelines(lines)
            f.close()

    def pth_files(self):
        for path in self.paths():
            if not os.path.exists(path) or not os.path.isdir(path):
                continue
            for filename in os.listdir(path):
                if filename.endswith('.pth'):
                    yield os.path.join(path, filename)

    def find_package(self, package):
        for path in self.paths():
            full = os.path.join(path, package)
            if os.path.exists(full):
                return package, full
            if not os.path.isdir(path) and zipfile.is_zipfile(path):
                zip = zipfile.ZipFile(path, 'r')
                try:
                    zip.read(os.path.join(package, '__init__.py'))
                except KeyError:
                    pass
                else:
                    zip.close()
                    return package, full
                zip.close()
        ## FIXME: need special error for package.py case:
        raise InstallationError(
            'No package with the name %s found' % package)

    def list(self, options, args):
        if args:
            raise InstallationError(
                'You cannot give an argument with --list')
        for path in sorted(self.paths()):
            if not os.path.exists(path):
                continue
            basename = os.path.basename(path.rstrip(os.path.sep))
            if os.path.isfile(path) and zipfile.is_zipfile(path):
                if os.path.dirname(path) not in self.paths():
                    logger.notify('Zipped egg: %s' % display_path(path))
                continue
            if (basename != 'site-packages' and basename != 'dist-packages'
                and not path.replace('\\', '/').endswith('lib/python')):
                continue
            logger.notify('In %s:' % display_path(path))
            logger.indent += 2
            zipped = []
            unzipped = []
            try:
                for filename in sorted(os.listdir(path)):
                    ext = os.path.splitext(filename)[1].lower()
                    if ext in ('.pth', '.egg-info', '.egg-link'):
                        continue
                    if ext == '.py':
                        logger.info('Not displaying %s: not a package' % display_path(filename))
                        continue
                    full = os.path.join(path, filename)
                    if os.path.isdir(full):
                        unzipped.append((filename, self.count_package(full)))
                    elif zipfile.is_zipfile(full):
                        zipped.append(filename)
                    else:
                        logger.info('Unknown file: %s' % display_path(filename))
                if zipped:
                    logger.notify('Zipped packages:')
                    logger.indent += 2
                    try:
                        for filename in zipped:
                            logger.notify(filename)
                    finally:
                        logger.indent -= 2
                else:
                    logger.notify('No zipped packages.')
                if unzipped:
                    if options.sort_files:
                        unzipped.sort(key=lambda x: -x[1])
                    logger.notify('Unzipped packages:')
                    logger.indent += 2
                    try:
                        for filename, count in unzipped:
                            logger.notify('%s  (%i files)' % (filename, count))
                    finally:
                        logger.indent -= 2
                else:
                    logger.notify('No unzipped packages.')
            finally:
                logger.indent -= 2

    def count_package(self, path):
        total = 0
        for dirpath, dirnames, filenames in os.walk(path):
            filenames = [f for f in filenames
                         if not f.lower().endswith('.pyc')]
            total += len(filenames)
        return total
python3.4/site-packages/pip/commands/freeze.py000064400000011070151735047770015274 0ustar00import re
import sys
import pip

from pip.req import InstallRequirement
from pip.log import logger
from pip.basecommand import Command
from pip.util import get_installed_distributions
from pip._vendor import pkg_resources


class FreezeCommand(Command):
    """Output installed packages in requirements format."""
    name = 'freeze'
    usage = """
      %prog [options]"""
    summary = 'Output installed packages in requirements format.'

    def __init__(self, *args, **kw):
        super(FreezeCommand, self).__init__(*args, **kw)

        self.cmd_opts.add_option(
            '-r', '--requirement',
            dest='requirement',
            action='store',
            default=None,
            metavar='file',
            help="Use the order in the given requirements file and it's comments when generating output.")
        self.cmd_opts.add_option(
            '-f', '--find-links',
            dest='find_links',
            action='append',
            default=[],
            metavar='URL',
            help='URL for finding packages, which will be added to the output.')
        self.cmd_opts.add_option(
            '-l', '--local',
            dest='local',
            action='store_true',
            default=False,
            help='If in a virtualenv that has global access, do not output globally-installed packages.')

        self.parser.insert_option_group(0, self.cmd_opts)

    def setup_logging(self):
        logger.move_stdout_to_stderr()

    def run(self, options, args):
        requirement = options.requirement
        find_links = options.find_links or []
        local_only = options.local
        ## FIXME: Obviously this should be settable:
        find_tags = False
        skip_match = None

        skip_regex = options.skip_requirements_regex
        if skip_regex:
            skip_match = re.compile(skip_regex)

        dependency_links = []

        f = sys.stdout

        for dist in pkg_resources.working_set:
            if dist.has_metadata('dependency_links.txt'):
                dependency_links.extend(dist.get_metadata_lines('dependency_links.txt'))
        for link in find_links:
            if '#egg=' in link:
                dependency_links.append(link)
        for link in find_links:
            f.write('-f %s\n' % link)
        installations = {}
        for dist in get_installed_distributions(local_only=local_only):
            req = pip.FrozenRequirement.from_dist(dist, dependency_links, find_tags=find_tags)
            installations[req.name] = req
        if requirement:
            req_f = open(requirement)
            for line in req_f:
                if not line.strip() or line.strip().startswith('#'):
                    f.write(line)
                    continue
                if skip_match and skip_match.search(line):
                    f.write(line)
                    continue
                elif line.startswith('-e') or line.startswith('--editable'):
                    if line.startswith('-e'):
                        line = line[2:].strip()
                    else:
                        line = line[len('--editable'):].strip().lstrip('=')
                    line_req = InstallRequirement.from_editable(line, default_vcs=options.default_vcs)
                elif (line.startswith('-r') or line.startswith('--requirement')
                      or line.startswith('-Z') or line.startswith('--always-unzip')
                      or line.startswith('-f') or line.startswith('-i')
                      or line.startswith('--extra-index-url')
                      or line.startswith('--find-links')
                      or line.startswith('--index-url')):
                    f.write(line)
                    continue
                else:
                    line_req = InstallRequirement.from_line(line)
                if not line_req.name:
                    logger.notify("Skipping line because it's not clear what it would install: %s"
                                  % line.strip())
                    logger.notify("  (add #egg=PackageName to the URL to avoid this warning)")
                    continue
                if line_req.name not in installations:
                    logger.warn("Requirement file contains %s, but that package is not installed"
                                % line.strip())
                    continue
                f.write(str(installations[line_req.name]))
                del installations[line_req.name]
            f.write('## The following requirements were added by pip --freeze:\n')
        for installation in sorted(installations.values(), key=lambda x: x.name):
            f.write(str(installation))
python3.4/site-packages/pip/commands/wheel.py000064400000017042151735047770015125 0ustar00# -*- coding: utf-8 -*-
from __future__ import absolute_import

import os
import sys
from pip.basecommand import Command
from pip.index import PackageFinder
from pip.log import logger
from pip.exceptions import CommandError, PreviousBuildDirError
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.util import BuildDirectory, normalize_path
from pip.wheel import WheelBuilder
from pip import cmdoptions

DEFAULT_WHEEL_DIR = os.path.join(normalize_path(os.curdir), 'wheelhouse')

class WheelCommand(Command):
    """
    Build Wheel archives for your requirements and dependencies.

    Wheel is a built-package format, and offers the advantage of not recompiling your software during every install.
    For more details, see the wheel docs: http://wheel.readthedocs.org/en/latest.

    Requirements: setuptools>=0.8, and wheel.

    'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels.

    """

    name = 'wheel'
    usage = """
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] <vcs project url> ...
      %prog [options] <local project path> ...
      %prog [options] <archive url/path> ..."""

    summary = 'Build wheels from your requirements.'

    def __init__(self, *args, **kw):
        super(WheelCommand, self).__init__(*args, **kw)

        cmd_opts = self.cmd_opts

        cmd_opts.add_option(
            '-w', '--wheel-dir',
            dest='wheel_dir',
            metavar='dir',
            default=DEFAULT_WHEEL_DIR,
            help="Build wheels into <dir>, where the default is '<cwd>/wheelhouse'.")
        cmd_opts.add_option(cmdoptions.use_wheel.make())
        cmd_opts.add_option(cmdoptions.no_use_wheel.make())
        cmd_opts.add_option(
            '--build-option',
            dest='build_options',
            metavar='options',
            action='append',
            help="Extra arguments to be supplied to 'setup.py bdist_wheel'.")
        cmd_opts.add_option(cmdoptions.requirements.make())
        cmd_opts.add_option(cmdoptions.download_cache.make())
        cmd_opts.add_option(cmdoptions.no_deps.make())
        cmd_opts.add_option(cmdoptions.build_dir.make())

        cmd_opts.add_option(
            '--global-option',
            dest='global_options',
            action='append',
            metavar='options',
            help="Extra global options to be supplied to the setup.py "
            "call before the 'bdist_wheel' command.")

        cmd_opts.add_option(
            '--pre',
            action='store_true',
            default=False,
            help="Include pre-release and development versions. By default, pip only finds stable versions.")

        cmd_opts.add_option(cmdoptions.no_clean.make())

        index_opts = cmdoptions.make_option_group(cmdoptions.index_group, self.parser)

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, cmd_opts)

    def run(self, options, args):

        # confirm requirements
        try:
            import wheel.bdist_wheel
        except ImportError:
            raise CommandError("'pip wheel' requires the 'wheel' package. To fix this, run:  pip install wheel")

        try:
            import pkg_resources
        except ImportError:
            raise CommandError(
                "'pip wheel' requires setuptools >= 0.8 for dist-info support."
                " To fix this, run: pip install --upgrade setuptools"
            )
        else:
            if not hasattr(pkg_resources, 'DistInfoDistribution'):
                raise CommandError(
                    "'pip wheel' requires setuptools >= 0.8 for dist-info "
                    "support. To fix this, run: pip install --upgrade "
                    "setuptools"
                )

        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index:
            logger.notify('Ignoring indexes: %s' % ','.join(index_urls))
            index_urls = []

        if options.use_mirrors:
            logger.deprecated("1.7",
                        "--use-mirrors has been deprecated and will be removed"
                        " in the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")

        if options.mirrors:
            logger.deprecated("1.7",
                        "--mirrors has been deprecated and will be removed in "
                        " the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")
            index_urls += options.mirrors

        if options.build_dir:
            options.build_dir = os.path.abspath(options.build_dir)

        session = self._build_session(options)

        finder = PackageFinder(find_links=options.find_links,
                               index_urls=index_urls,
                               use_wheel=options.use_wheel,
                               allow_external=options.allow_external,
                               allow_unverified=options.allow_unverified,
                               allow_all_external=options.allow_all_external,
                               allow_all_prereleases=options.pre,
                               process_dependency_links=
                                options.process_dependency_links,
                               session=session,
                            )

        build_delete = (not (options.no_clean or options.build_dir))
        with BuildDirectory(options.build_dir, delete=build_delete) as build_dir:
            requirement_set = RequirementSet(
                build_dir=build_dir,
                src_dir=None,
                download_dir=None,
                download_cache=options.download_cache,
                ignore_dependencies=options.ignore_dependencies,
                ignore_installed=True,
                session=session,
                wheel_download_dir=options.wheel_dir
            )

            # make the wheelhouse
            if not os.path.exists(options.wheel_dir):
                os.makedirs(options.wheel_dir)

            #parse args and/or requirements files
            for name in args:
                requirement_set.add_requirement(
                    InstallRequirement.from_line(name, None))

            for filename in options.requirements:
                for req in parse_requirements(
                    filename,
                    finder=finder,
                    options=options,
                    session=session):
                    if req.editable:
                        logger.notify("ignoring %s" % req.url)
                        continue
                    requirement_set.add_requirement(req)

            #fail if no requirements
            if not requirement_set.has_requirements:
                opts = {'name': self.name}
                msg = ('You must give at least one requirement '
                       'to %(name)s (see "pip help %(name)s")' % opts)
                logger.error(msg)
                return

            try:
                #build wheels
                wb = WheelBuilder(
                    requirement_set,
                    finder,
                    options.wheel_dir,
                    build_options = options.build_options or [],
                    global_options = options.global_options or []
                    )
                wb.build()
            except PreviousBuildDirError:
                options.no_clean = True
                raise
            finally:
                if not options.no_clean:
                    requirement_set.cleanup_files()
python3.4/site-packages/pip/commands/__init__.py000064400000004274151735047770015563 0ustar00"""
Package containing all pip commands
"""


from pip.commands.bundle import BundleCommand
from pip.commands.completion import CompletionCommand
from pip.commands.freeze import FreezeCommand
from pip.commands.help import HelpCommand
from pip.commands.list import ListCommand
from pip.commands.search import SearchCommand
from pip.commands.show import ShowCommand
from pip.commands.install import InstallCommand
from pip.commands.uninstall import UninstallCommand
from pip.commands.unzip import UnzipCommand
from pip.commands.zip import ZipCommand
from pip.commands.wheel import WheelCommand


commands = {
    BundleCommand.name: BundleCommand,
    CompletionCommand.name: CompletionCommand,
    FreezeCommand.name: FreezeCommand,
    HelpCommand.name: HelpCommand,
    SearchCommand.name: SearchCommand,
    ShowCommand.name: ShowCommand,
    InstallCommand.name: InstallCommand,
    UninstallCommand.name: UninstallCommand,
    UnzipCommand.name: UnzipCommand,
    ZipCommand.name: ZipCommand,
    ListCommand.name: ListCommand,
    WheelCommand.name: WheelCommand,
}


commands_order = [
    InstallCommand,
    UninstallCommand,
    FreezeCommand,
    ListCommand,
    ShowCommand,
    SearchCommand,
    WheelCommand,
    ZipCommand,
    UnzipCommand,
    BundleCommand,
    HelpCommand,
]


def get_summaries(ignore_hidden=True, ordered=True):
    """Yields sorted (command name, command summary) tuples."""

    if ordered:
        cmditems = _sort_commands(commands, commands_order)
    else:
        cmditems = commands.items()

    for name, command_class in cmditems:
        if ignore_hidden and command_class.hidden:
            continue

        yield (name, command_class.summary)


def get_similar_commands(name):
    """Command name auto-correct."""
    from difflib import get_close_matches

    close_commands = get_close_matches(name, commands.keys())

    if close_commands:
        guess = close_commands[0]
    else:
        guess = False

    return guess


def _sort_commands(cmddict, order):
    def keyfn(key):
        try:
            return order.index(key[1])
        except ValueError:
            # unordered items should come last
            return 0xff

    return sorted(cmddict.items(), key=keyfn)
python3.4/site-packages/pip/commands/show.py000064400000005317151735047770015003 0ustar00import os

from pip.basecommand import Command
from pip.log import logger
from pip._vendor import pkg_resources


class ShowCommand(Command):
    """Show information about one or more installed packages."""
    name = 'show'
    usage = """
      %prog [options] <package> ..."""
    summary = 'Show information about installed packages.'

    def __init__(self, *args, **kw):
        super(ShowCommand, self).__init__(*args, **kw)
        self.cmd_opts.add_option(
            '-f', '--files',
            dest='files',
            action='store_true',
            default=False,
            help='Show the full list of installed files for each package.')

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options, args):
        if not args:
            logger.warn('ERROR: Please provide a package name or names.')
            return
        query = args

        results = search_packages_info(query)
        print_results(results, options.files)


def search_packages_info(query):
    """
    Gather details from installed distributions. Print distribution name,
    version, location, and installed files. Installed files requires a
    pip generated 'installed-files.txt' in the distributions '.egg-info'
    directory.
    """
    installed_packages = dict(
        [(p.project_name.lower(), p) for p in pkg_resources.working_set])
    for name in query:
        normalized_name = name.lower()
        if normalized_name in installed_packages:
            dist = installed_packages[normalized_name]
            package = {
                'name': dist.project_name,
                'version': dist.version,
                'location': dist.location,
                'requires': [dep.project_name for dep in dist.requires()],
            }
            filelist = os.path.join(
                       dist.location,
                       dist.egg_name() + '.egg-info',
                       'installed-files.txt')
            if os.path.isfile(filelist):
                package['files'] = filelist
            yield package


def print_results(distributions, list_all_files):
    """
    Print the informations from installed distributions found.
    """
    for dist in distributions:
        logger.notify("---")
        logger.notify("Name: %s" % dist['name'])
        logger.notify("Version: %s" % dist['version'])
        logger.notify("Location: %s" % dist['location'])
        logger.notify("Requires: %s" % ', '.join(dist['requires']))
        if list_all_files:
            logger.notify("Files:")
            if 'files' in dist:
                for line in open(dist['files']):
                    logger.notify("  %s" % line.strip())
            else:
                logger.notify("Cannot locate installed-files.txt")
python3.4/site-packages/pip/commands/uninstall.py000064400000004233151735047770016030 0ustar00from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.basecommand import Command
from pip.exceptions import InstallationError


class UninstallCommand(Command):
    """
    Uninstall packages.

    pip is able to uninstall most installed packages. Known exceptions are:

    - Pure distutils packages installed with ``python setup.py install``, which
      leave behind no metadata to determine what files were installed.
    - Script wrappers installed by ``python setup.py develop``.
    """
    name = 'uninstall'
    usage = """
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ..."""
    summary = 'Uninstall packages.'

    def __init__(self, *args, **kw):
        super(UninstallCommand, self).__init__(*args, **kw)
        self.cmd_opts.add_option(
            '-r', '--requirement',
            dest='requirements',
            action='append',
            default=[],
            metavar='file',
            help='Uninstall all the packages listed in the given requirements file.  '
            'This option can be used multiple times.')
        self.cmd_opts.add_option(
            '-y', '--yes',
            dest='yes',
            action='store_true',
            help="Don't ask for confirmation of uninstall deletions.")

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options, args):
        session = self._build_session(options)

        requirement_set = RequirementSet(
            build_dir=None,
            src_dir=None,
            download_dir=None,
            session=session,
        )
        for name in args:
            requirement_set.add_requirement(
                InstallRequirement.from_line(name))
        for filename in options.requirements:
            for req in parse_requirements(filename,
                    options=options, session=session):
                requirement_set.add_requirement(req)
        if not requirement_set.has_requirements:
            raise InstallationError('You must give at least one requirement '
                'to %(name)s (see "pip help %(name)s")' % dict(name=self.name))
        requirement_set.uninstall(auto_confirm=options.yes)
python3.4/site-packages/pip/commands/help.py000064400000001637151735050000014730 0ustar00from pip.basecommand import Command, SUCCESS
from pip.exceptions import CommandError


class HelpCommand(Command):
    """Show help for commands"""
    name = 'help'
    usage = """
      %prog <command>"""
    summary = 'Show help for commands.'

    def run(self, options, args):
        from pip.commands import commands, get_similar_commands

        try:
            # 'pip help' with no args is handled by pip.__init__.parseopt()
            cmd_name = args[0]  # the command we need help for
        except IndexError:
            return SUCCESS

        if cmd_name not in commands:
            guess = get_similar_commands(cmd_name)

            msg = ['unknown command "%s"' % cmd_name]
            if guess:
                msg.append('maybe you meant "%s"' % guess)

            raise CommandError(' - '.join(msg))

        command = commands[cmd_name]()
        command.parser.print_help()

        return SUCCESS
python3.4/site-packages/pip/commands/bundle.py000064400000003373151735050000015250 0ustar00import textwrap
from pip.locations import build_prefix, src_prefix
from pip.util import display_path, backup_dir
from pip.log import logger
from pip.exceptions import InstallationError
from pip.commands.install import InstallCommand


class BundleCommand(InstallCommand):
    """Create pybundles (archives containing multiple packages)."""
    name = 'bundle'
    usage = """
      %prog [options] <bundle name>.pybundle <package>..."""
    summary = 'DEPRECATED. Create pybundles.'
    bundle = True

    def __init__(self, *args, **kw):
        super(BundleCommand, self).__init__(*args, **kw)
        # bundle uses different default source and build dirs
        build_opt = self.parser.get_option("--build")
        build_opt.default = backup_dir(build_prefix, '-bundle')
        src_opt = self.parser.get_option("--src")
        src_opt.default = backup_dir(src_prefix, '-bundle')
        self.parser.set_defaults(**{
                src_opt.dest: src_opt.default,
                build_opt.dest: build_opt.default,
                })

    def run(self, options, args):

        logger.deprecated('1.6', "DEPRECATION: 'pip bundle' and support for installing from *.pybundle files is deprecated. "
                    "See https://github.com/pypa/pip/pull/1046")

        if not args:
            raise InstallationError('You must give a bundle filename')
        # We have to get everything when creating a bundle:
        options.ignore_installed = True
        logger.notify('Putting temporary build files in %s and source/develop files in %s'
                      % (display_path(options.build_dir), display_path(options.src_dir)))
        self.bundle_filename = args.pop(0)
        requirement_set = super(BundleCommand, self).run(options, args)
        return requirement_set
python3.4/site-packages/pip/commands/search.py000064400000011200151735050000015230 0ustar00import sys
import textwrap

import pip.download

from pip.basecommand import Command, SUCCESS
from pip.util import get_terminal_size
from pip.log import logger
from pip.backwardcompat import xmlrpclib, reduce, cmp
from pip.exceptions import CommandError
from pip.status_codes import NO_MATCHES_FOUND
from pip._vendor import pkg_resources
from distutils.version import StrictVersion, LooseVersion


class SearchCommand(Command):
    """Search for PyPI packages whose name or summary contains <query>."""
    name = 'search'
    usage = """
      %prog [options] <query>"""
    summary = 'Search PyPI for packages.'

    def __init__(self, *args, **kw):
        super(SearchCommand, self).__init__(*args, **kw)
        self.cmd_opts.add_option(
            '--index',
            dest='index',
            metavar='URL',
            default='https://pypi.python.org/pypi',
            help='Base URL of Python Package Index (default %default)')

        self.parser.insert_option_group(0, self.cmd_opts)

    def run(self, options, args):
        if not args:
            raise CommandError('Missing required argument (search query).')
        query = args
        index_url = options.index

        pypi_hits = self.search(query, index_url)
        hits = transform_hits(pypi_hits)

        terminal_width = None
        if sys.stdout.isatty():
            terminal_width = get_terminal_size()[0]

        print_results(hits, terminal_width=terminal_width)
        if pypi_hits:
            return SUCCESS
        return NO_MATCHES_FOUND

    def search(self, query, index_url):
        pypi = xmlrpclib.ServerProxy(index_url)
        hits = pypi.search({'name': query, 'summary': query}, 'or')
        return hits


def transform_hits(hits):
    """
    The list from pypi is really a list of versions. We want a list of
    packages with the list of versions stored inline. This converts the
    list from pypi into one we can use.
    """
    packages = {}
    for hit in hits:
        name = hit['name']
        summary = hit['summary']
        version = hit['version']
        score = hit['_pypi_ordering']
        if score is None:
            score = 0

        if name not in packages.keys():
            packages[name] = {'name': name, 'summary': summary, 'versions': [version], 'score': score}
        else:
            packages[name]['versions'].append(version)

            # if this is the highest version, replace summary and score
            if version == highest_version(packages[name]['versions']):
                packages[name]['summary'] = summary
                packages[name]['score'] = score

    # each record has a unique name now, so we will convert the dict into a list sorted by score
    package_list = sorted(packages.values(), key=lambda x: x['score'], reverse=True)
    return package_list


def print_results(hits, name_column_width=25, terminal_width=None):
    installed_packages = [p.project_name for p in pkg_resources.working_set]
    for hit in hits:
        name = hit['name']
        summary = hit['summary'] or ''
        if terminal_width is not None:
            # wrap and indent summary to fit terminal
            summary = textwrap.wrap(summary, terminal_width - name_column_width - 5)
            summary = ('\n' + ' ' * (name_column_width + 3)).join(summary)
        line = '%s - %s' % (name.ljust(name_column_width), summary)
        try:
            logger.notify(line)
            if name in installed_packages:
                dist = pkg_resources.get_distribution(name)
                logger.indent += 2
                try:
                    latest = highest_version(hit['versions'])
                    if dist.version == latest:
                        logger.notify('INSTALLED: %s (latest)' % dist.version)
                    else:
                        logger.notify('INSTALLED: %s' % dist.version)
                        logger.notify('LATEST:    %s' % latest)
                finally:
                    logger.indent -= 2
        except UnicodeEncodeError:
            pass


def compare_versions(version1, version2):
    try:
        return cmp(StrictVersion(version1), StrictVersion(version2))
    # in case of abnormal version number, fall back to LooseVersion
    except ValueError:
        pass
    try:
        return cmp(LooseVersion(version1), LooseVersion(version2))
    except TypeError:
    # certain LooseVersion comparions raise due to unorderable types,
    # fallback to string comparison
        return cmp([str(v) for v in LooseVersion(version1).version],
                   [str(v) for v in LooseVersion(version2).version])


def highest_version(versions):
    return reduce((lambda v1, v2: compare_versions(v1, v2) == 1 and v1 or v2), versions)
python3.4/site-packages/pip/commands/unzip.py000064400000000271151735050000015136 0ustar00from pip.commands.zip import ZipCommand


class UnzipCommand(ZipCommand):
    """Unzip individual packages."""
    name = 'unzip'
    summary = 'DEPRECATED. Unzip individual packages.'
python3.4/site-packages/pip/commands/install.py000064400000032724151735050000015447 0ustar00import os
import sys
import tempfile
import shutil
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.log import logger
from pip.locations import (src_prefix, virtualenv_no_global, distutils_scheme,
                           build_prefix)
from pip.basecommand import Command
from pip.index import PackageFinder
from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError
from pip import cmdoptions
from pip.util import BuildDirectory


class InstallCommand(Command):
    """
    Install packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    """
    name = 'install'

    usage = """
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ..."""

    summary = 'Install packages.'
    bundle = False

    def __init__(self, *args, **kw):
        super(InstallCommand, self).__init__(*args, **kw)

        cmd_opts = self.cmd_opts

        cmd_opts.add_option(
            '-e', '--editable',
            dest='editables',
            action='append',
            default=[],
            metavar='path/url',
            help='Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.')

        cmd_opts.add_option(cmdoptions.requirements.make())
        cmd_opts.add_option(cmdoptions.build_dir.make())

        cmd_opts.add_option(
            '-t', '--target',
            dest='target_dir',
            metavar='dir',
            default=None,
            help='Install packages into <dir>.')

        cmd_opts.add_option(
            '-d', '--download', '--download-dir', '--download-directory',
            dest='download_dir',
            metavar='dir',
            default=None,
            help="Download packages into <dir> instead of installing them, regardless of what's already installed.")

        cmd_opts.add_option(cmdoptions.download_cache.make())

        cmd_opts.add_option(
            '--src', '--source', '--source-dir', '--source-directory',
            dest='src_dir',
            metavar='dir',
            default=src_prefix,
            help='Directory to check out editable projects into. '
            'The default in a virtualenv is "<venv path>/src". '
            'The default for global installs is "<current dir>/src".')

        cmd_opts.add_option(
            '-U', '--upgrade',
            dest='upgrade',
            action='store_true',
            help='Upgrade all packages to the newest available version. '
            'This process is recursive regardless of whether a dependency is already satisfied.')

        cmd_opts.add_option(
            '--force-reinstall',
            dest='force_reinstall',
            action='store_true',
            help='When upgrading, reinstall all packages even if they are '
                 'already up-to-date.')

        cmd_opts.add_option(
            '-I', '--ignore-installed',
            dest='ignore_installed',
            action='store_true',
            help='Ignore the installed packages (reinstalling instead).')

        cmd_opts.add_option(cmdoptions.no_deps.make())

        cmd_opts.add_option(
            '--no-install',
            dest='no_install',
            action='store_true',
            help="DEPRECATED. Download and unpack all packages, but don't actually install them.")

        cmd_opts.add_option(
            '--no-download',
            dest='no_download',
            action="store_true",
            help="DEPRECATED. Don't download any packages, just install the ones already downloaded "
            "(completes an install run with --no-install).")

        cmd_opts.add_option(cmdoptions.install_options.make())
        cmd_opts.add_option(cmdoptions.global_options.make())

        cmd_opts.add_option(
            '--user',
            dest='use_user_site',
            action='store_true',
            help='Install using the user scheme.')

        cmd_opts.add_option(
            '--egg',
            dest='as_egg',
            action='store_true',
            help="Install packages as eggs, not 'flat', like pip normally does. This option is not about installing *from* eggs. (WARNING: Because this option overrides pip's normal install logic, requirements files may not behave as expected.)")

        cmd_opts.add_option(
            '--root',
            dest='root_path',
            metavar='dir',
            default=None,
            help="Install everything relative to this alternate root directory.")

        cmd_opts.add_option(
            '--strip-file-prefix',
            dest='strip_file_prefix',
            metavar='prefix',
            default=None,
            help="Strip given prefix from script paths in wheel RECORD."
        )

        cmd_opts.add_option(
            "--compile",
            action="store_true",
            dest="compile",
            default=True,
            help="Compile py files to pyc",
        )

        cmd_opts.add_option(
            "--no-compile",
            action="store_false",
            dest="compile",
            help="Do not compile py files to pyc",
        )

        cmd_opts.add_option(cmdoptions.use_wheel.make())
        cmd_opts.add_option(cmdoptions.no_use_wheel.make())

        cmd_opts.add_option(
            '--pre',
            action='store_true',
            default=False,
            help="Include pre-release and development versions. By default, pip only finds stable versions.")

        cmd_opts.add_option(cmdoptions.no_clean.make())

        index_opts = cmdoptions.make_option_group(cmdoptions.index_group, self.parser)

        self.parser.insert_option_group(0, index_opts)
        self.parser.insert_option_group(0, cmd_opts)

    def _build_package_finder(self, options, index_urls, session):
        """
        Create a package finder appropriate to this install command.
        This method is meant to be overridden by subclasses, not
        called directly.
        """
        return PackageFinder(find_links=options.find_links,
                             index_urls=index_urls,
                             use_wheel=options.use_wheel,
                             allow_external=options.allow_external,
                             allow_unverified=options.allow_unverified,
                             allow_all_external=options.allow_all_external,
                             allow_all_prereleases=options.pre,
                             process_dependency_links=
                                options.process_dependency_links,
                             session=session,
                            )

    def run(self, options, args):

        if (
            options.no_install or
            options.no_download or
            options.build_dir or
            options.no_clean
        ):
            logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, '
                              'and --no-clean are deprecated.  See https://github.com/pypa/pip/issues/906.')

        if options.download_dir:
            options.no_install = True
            options.ignore_installed = True

        # If we have --no-install or --no-download and no --build we use the
        # legacy static build dir
        if (options.build_dir is None
                and (options.no_install or options.no_download)):
            options.build_dir = build_prefix

        if options.build_dir:
            options.build_dir = os.path.abspath(options.build_dir)

        options.src_dir = os.path.abspath(options.src_dir)
        install_options = options.install_options or []
        if options.use_user_site:
            if virtualenv_no_global():
                raise InstallationError("Can not perform a '--user' install. User site-packages are not visible in this virtualenv.")
            install_options.append('--user')

        temp_target_dir = None
        if options.target_dir:
            options.ignore_installed = True
            temp_target_dir = tempfile.mkdtemp()
            options.target_dir = os.path.abspath(options.target_dir)
            if os.path.exists(options.target_dir) and not os.path.isdir(options.target_dir):
                raise CommandError("Target path exists but is not a directory, will not continue.")
            install_options.append('--home=' + temp_target_dir)

        global_options = options.global_options or []
        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index:
            logger.notify('Ignoring indexes: %s' % ','.join(index_urls))
            index_urls = []

        if options.use_mirrors:
            logger.deprecated("1.7",
                        "--use-mirrors has been deprecated and will be removed"
                        " in the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")

        if options.mirrors:
            logger.deprecated("1.7",
                        "--mirrors has been deprecated and will be removed in "
                        " the future. Explicit uses of --index-url and/or "
                        "--extra-index-url is suggested.")
            index_urls += options.mirrors

        session = self._build_session(options)

        finder = self._build_package_finder(options, index_urls, session)

        build_delete = (not (options.no_clean or options.build_dir))
        with BuildDirectory(options.build_dir, delete=build_delete) as build_dir:
            requirement_set = RequirementSet(
                build_dir=build_dir,
                src_dir=options.src_dir,
                download_dir=options.download_dir,
                download_cache=options.download_cache,
                upgrade=options.upgrade,
                as_egg=options.as_egg,
                ignore_installed=options.ignore_installed,
                ignore_dependencies=options.ignore_dependencies,
                force_reinstall=options.force_reinstall,
                use_user_site=options.use_user_site,
                target_dir=temp_target_dir,
                session=session,
                pycompile=options.compile,
            )
            for name in args:
                requirement_set.add_requirement(
                    InstallRequirement.from_line(name, None))
            for name in options.editables:
                requirement_set.add_requirement(
                    InstallRequirement.from_editable(name, default_vcs=options.default_vcs))
            for filename in options.requirements:
                for req in parse_requirements(filename, finder=finder, options=options, session=session):
                    requirement_set.add_requirement(req)
            if not requirement_set.has_requirements:
                opts = {'name': self.name}
                if options.find_links:
                    msg = ('You must give at least one requirement to %(name)s '
                           '(maybe you meant "pip %(name)s %(links)s"?)' %
                           dict(opts, links=' '.join(options.find_links)))
                else:
                    msg = ('You must give at least one requirement '
                           'to %(name)s (see "pip help %(name)s")' % opts)
                logger.warn(msg)
                return

            try:
                if not options.no_download:
                    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
                else:
                    requirement_set.locate_files()

                if not options.no_install and not self.bundle:
                    requirement_set.install(
                        install_options,
                        global_options,
                        root=options.root_path,
                        strip_file_prefix=options.strip_file_prefix)
                    installed = ' '.join([req.name for req in
                                          requirement_set.successfully_installed])
                    if installed:
                        logger.notify('Successfully installed %s' % installed)
                elif not self.bundle:
                    downloaded = ' '.join([req.name for req in
                                           requirement_set.successfully_downloaded])
                    if downloaded:
                        logger.notify('Successfully downloaded %s' % downloaded)
                elif self.bundle:
                    requirement_set.create_bundle(self.bundle_filename)
                    logger.notify('Created bundle in %s' % self.bundle_filename)
            except PreviousBuildDirError:
                options.no_clean = True
                raise
            finally:
                # Clean up
                if (not options.no_clean) and ((not options.no_install) or options.download_dir):
                    requirement_set.cleanup_files(bundle=self.bundle)

        if options.target_dir:
            if not os.path.exists(options.target_dir):
                os.makedirs(options.target_dir)
            lib_dir = distutils_scheme('', home=temp_target_dir)['purelib']
            for item in os.listdir(lib_dir):
                shutil.move(
                    os.path.join(lib_dir, item),
                    os.path.join(options.target_dir, item)
                    )
            shutil.rmtree(temp_target_dir)
        return requirement_set
python3.4/site-packages/pip/log.py000064400000022357151735050000012762 0ustar00"""Logging
"""

import sys
import os
import logging

from pip import backwardcompat
from pip._vendor import colorama, pkg_resources


def _color_wrap(*colors):
    def wrapped(inp):
        return "".join(list(colors) + [inp, colorama.Style.RESET_ALL])
    return wrapped


def should_color(consumer, environ, std=(sys.stdout, sys.stderr)):
    real_consumer = (consumer if not isinstance(consumer, colorama.AnsiToWin32)
                        else consumer.wrapped)

    # If consumer isn't stdout or stderr we shouldn't colorize it
    if real_consumer not in std:
        return False

    # If consumer is a tty we should color it
    if hasattr(real_consumer, "isatty") and real_consumer.isatty():
        return True

    # If we have an ASNI term we should color it
    if environ.get("TERM") == "ANSI":
        return True

    # If anything else we should not color it
    return False


def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))


class Logger(object):
    """
    Logging object for use in command-line script.  Allows ranges of
    levels, to avoid some redundancy of displayed information.
    """
    VERBOSE_DEBUG = logging.DEBUG - 1
    DEBUG = logging.DEBUG
    INFO = logging.INFO
    NOTIFY = (logging.INFO + logging.WARN) / 2
    WARN = WARNING = logging.WARN
    ERROR = logging.ERROR
    FATAL = logging.FATAL

    LEVELS = [VERBOSE_DEBUG, DEBUG, INFO, NOTIFY, WARN, ERROR, FATAL]

    COLORS = {
        WARN: _color_wrap(colorama.Fore.YELLOW),
        ERROR: _color_wrap(colorama.Fore.RED),
        FATAL: _color_wrap(colorama.Fore.RED),
    }

    def __init__(self):
        self.consumers = []
        self.indent = 0
        self.explicit_levels = False
        self.in_progress = None
        self.in_progress_hanging = False

    def add_consumers(self, *consumers):
        if sys.platform.startswith("win"):
            for level, consumer in consumers:
                if hasattr(consumer, "write"):
                    self.consumers.append(
                        (level, colorama.AnsiToWin32(consumer)),
                    )
                else:
                    self.consumers.append((level, consumer))
        else:
            self.consumers.extend(consumers)

    def debug(self, msg, *args, **kw):
        self.log(self.DEBUG, msg, *args, **kw)

    def info(self, msg, *args, **kw):
        self.log(self.INFO, msg, *args, **kw)

    def notify(self, msg, *args, **kw):
        self.log(self.NOTIFY, msg, *args, **kw)

    def warn(self, msg, *args, **kw):
        self.log(self.WARN, msg, *args, **kw)

    def error(self, msg, *args, **kw):
        self.log(self.ERROR, msg, *args, **kw)

    def fatal(self, msg, *args, **kw):
        self.log(self.FATAL, msg, *args, **kw)

    def deprecated(self, removal_version, msg, *args, **kwargs):
        """
        Logs deprecation message which is log level WARN if the
        ``removal_version`` is > 1 minor release away and log level ERROR
        otherwise.

        removal_version should be the version that the deprecated feature is
        expected to be removed in, so something that will not exist in
        version 1.7, but will in 1.6 would have a removal_version of 1.7.
        """
        from pip import __version__

        if should_warn(__version__, removal_version):
            self.warn(msg, *args, **kwargs)
        else:
            self.error(msg, *args, **kwargs)

    def log(self, level, msg, *args, **kw):
        if args:
            if kw:
                raise TypeError(
                    "You may give positional or keyword arguments, not both")
        args = args or kw

        # render
        if args:
            rendered = msg % args
        else:
            rendered = msg
        rendered = ' ' * self.indent + rendered
        if self.explicit_levels:
            ## FIXME: should this be a name, not a level number?
            rendered = '%02i %s' % (level, rendered)

        for consumer_level, consumer in self.consumers:
            if self.level_matches(level, consumer_level):
                if (self.in_progress_hanging
                    and consumer in (sys.stdout, sys.stderr)):
                    self.in_progress_hanging = False
                    sys.stdout.write('\n')
                    sys.stdout.flush()
                if hasattr(consumer, 'write'):
                    write_content = rendered + '\n'
                    if should_color(consumer, os.environ):
                        # We are printing to stdout or stderr and it supports
                        #   colors so render our text colored
                        colorizer = self.COLORS.get(level, lambda x: x)
                        write_content = colorizer(write_content)

                    consumer.write(write_content)
                    if hasattr(consumer, 'flush'):
                        consumer.flush()
                else:
                    consumer(rendered)

    def _show_progress(self):
        """Should we display download progress?"""
        return (self.stdout_level_matches(self.NOTIFY) and sys.stdout.isatty())

    def start_progress(self, msg):
        assert not self.in_progress, (
            "Tried to start_progress(%r) while in_progress %r"
            % (msg, self.in_progress))
        if self._show_progress():
            sys.stdout.write(' ' * self.indent + msg)
            sys.stdout.flush()
            self.in_progress_hanging = True
        else:
            self.in_progress_hanging = False
        self.in_progress = msg
        self.last_message = None

    def end_progress(self, msg='done.'):
        assert self.in_progress, (
            "Tried to end_progress without start_progress")
        if self._show_progress():
            if not self.in_progress_hanging:
                # Some message has been printed out since start_progress
                sys.stdout.write('...' + self.in_progress + msg + '\n')
                sys.stdout.flush()
            else:
                # These erase any messages shown with show_progress (besides .'s)
                logger.show_progress('')
                logger.show_progress('')
                sys.stdout.write(msg + '\n')
                sys.stdout.flush()
        self.in_progress = None
        self.in_progress_hanging = False

    def show_progress(self, message=None):
        """If we are in a progress scope, and no log messages have been
        shown, write out another '.'"""
        if self.in_progress_hanging:
            if message is None:
                sys.stdout.write('.')
                sys.stdout.flush()
            else:
                if self.last_message:
                    padding = ' ' * max(0, len(self.last_message) - len(message))
                else:
                    padding = ''
                sys.stdout.write('\r%s%s%s%s' %
                                (' ' * self.indent, self.in_progress, message, padding))
                sys.stdout.flush()
                self.last_message = message

    def stdout_level_matches(self, level):
        """Returns true if a message at this level will go to stdout"""
        return self.level_matches(level, self._stdout_level())

    def _stdout_level(self):
        """Returns the level that stdout runs at"""
        for level, consumer in self.consumers:
            if consumer is sys.stdout:
                return level
        return self.FATAL

    def level_matches(self, level, consumer_level):
        """
        >>> l = Logger()
        >>> l.level_matches(3, 4)
        False
        >>> l.level_matches(3, 2)
        True
        >>> l.level_matches(slice(None, 3), 3)
        False
        >>> l.level_matches(slice(None, 3), 2)
        True
        >>> l.level_matches(slice(1, 3), 1)
        True
        >>> l.level_matches(slice(2, 3), 1)
        False
        """
        if isinstance(level, slice):
            start, stop = level.start, level.stop
            if start is not None and start > consumer_level:
                return False
            if stop is not None or stop <= consumer_level:
                return False
            return True
        else:
            return level >= consumer_level

    @classmethod
    def level_for_integer(cls, level):
        levels = cls.LEVELS
        if level < 0:
            return levels[0]
        if level >= len(levels):
            return levels[-1]
        return levels[level]

    def move_stdout_to_stderr(self):
        to_remove = []
        to_add = []
        for consumer_level, consumer in self.consumers:
            if consumer == sys.stdout:
                to_remove.append((consumer_level, consumer))
                to_add.append((consumer_level, sys.stderr))
        for item in to_remove:
            self.consumers.remove(item)
        self.consumers.extend(to_add)

logger = Logger()
python3.4/site-packages/pip/cmdoptions.py000064400000022162151735050000014352 0ustar00"""
shared options and groups

The principle here is to define options once, but *not* instantiate them globally.
One reason being that options with action='append' can carry state between parses.
pip parse's general options twice internally, and shouldn't pass on state.
To be consistent, all options will follow this design.

"""
import copy
from optparse import OptionGroup, SUPPRESS_HELP, Option
from pip.locations import default_log_file


def make_option_group(group, parser):
    """
    Return an OptionGroup object
    group  -- assumed to be dict with 'name' and 'options' keys
    parser -- an optparse Parser
    """
    option_group = OptionGroup(parser, group['name'])
    for option in group['options']:
        option_group.add_option(option.make())
    return option_group

class OptionMaker(object):
    """Class that stores the args/kwargs that would be used to make an Option,
    for making them later, and uses deepcopy's to reset state."""
    def __init__(self, *args, **kwargs):
        self.args = args
        self.kwargs = kwargs
    def make(self):
        args_copy = copy.deepcopy(self.args)
        kwargs_copy = copy.deepcopy(self.kwargs)
        return Option(*args_copy, **kwargs_copy)

###########
# options #
###########

help_ = OptionMaker(
    '-h', '--help',
    dest='help',
    action='help',
    help='Show help.')

require_virtualenv = OptionMaker(
    # Run only if inside a virtualenv, bail if not.
    '--require-virtualenv', '--require-venv',
    dest='require_venv',
    action='store_true',
    default=False,
    help=SUPPRESS_HELP)

verbose = OptionMaker(
    '-v', '--verbose',
    dest='verbose',
    action='count',
    default=0,
    help='Give more output. Option is additive, and can be used up to 3 times.')

version = OptionMaker(
    '-V', '--version',
    dest='version',
    action='store_true',
    help='Show version and exit.')

quiet = OptionMaker(
    '-q', '--quiet',
    dest='quiet',
    action='count',
    default=0,
    help='Give less output.')

log = OptionMaker(
    '--log',
    dest='log',
    metavar='path',
    help='Path to a verbose appending log. This log is inactive by default.')

log_explicit_levels = OptionMaker(
    # Writes the log levels explicitely to the log'
    '--log-explicit-levels',
    dest='log_explicit_levels',
    action='store_true',
    default=False,
    help=SUPPRESS_HELP)

log_file = OptionMaker(
    # The default log file
    '--log-file', '--local-log',
    dest='log_file',
    metavar='path',
    default=default_log_file,
    help='Path to a verbose non-appending log, that only logs failures. This log is active by default at %default.')

no_input = OptionMaker(
    # Don't ask for input
    '--no-input',
    dest='no_input',
    action='store_true',
    default=False,
    help=SUPPRESS_HELP)

proxy = OptionMaker(
    '--proxy',
    dest='proxy',
    type='str',
    default='',
    help="Specify a proxy in the form [user:passwd@]proxy.server:port.")

timeout = OptionMaker(
    '--timeout', '--default-timeout',
    metavar='sec',
    dest='timeout',
    type='float',
    default=15,
    help='Set the socket timeout (default %default seconds).')

default_vcs = OptionMaker(
    # The default version control system for editables, e.g. 'svn'
    '--default-vcs',
    dest='default_vcs',
    type='str',
    default='',
    help=SUPPRESS_HELP)

skip_requirements_regex = OptionMaker(
    # A regex to be used to skip requirements
    '--skip-requirements-regex',
    dest='skip_requirements_regex',
    type='str',
    default='',
    help=SUPPRESS_HELP)

exists_action = OptionMaker(
    # Option when path already exist
    '--exists-action',
    dest='exists_action',
    type='choice',
    choices=['s', 'i', 'w', 'b'],
    default=[],
    action='append',
    metavar='action',
    help="Default action when a path already exists: "
    "(s)witch, (i)gnore, (w)ipe, (b)ackup.")

cert = OptionMaker(
    '--cert',
    dest='cert',
    type='str',
    default='',
    metavar='path',
    help = "Path to alternate CA bundle.")

index_url = OptionMaker(
    '-i', '--index-url', '--pypi-url',
    dest='index_url',
    metavar='URL',
    default='https://pypi.python.org/simple/',
    help='Base URL of Python Package Index (default %default).')

extra_index_url = OptionMaker(
    '--extra-index-url',
    dest='extra_index_urls',
    metavar='URL',
    action='append',
    default=[],
    help='Extra URLs of package indexes to use in addition to --index-url.')

no_index = OptionMaker(
    '--no-index',
    dest='no_index',
    action='store_true',
    default=False,
    help='Ignore package index (only looking at --find-links URLs instead).')

find_links =  OptionMaker(
    '-f', '--find-links',
    dest='find_links',
    action='append',
    default=[],
    metavar='url',
    help="If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.")

# TODO: Remove after 1.6
use_mirrors = OptionMaker(
    '-M', '--use-mirrors',
    dest='use_mirrors',
    action='store_true',
    default=False,
    help=SUPPRESS_HELP)

# TODO: Remove after 1.6
mirrors = OptionMaker(
    '--mirrors',
    dest='mirrors',
    metavar='URL',
    action='append',
    default=[],
    help=SUPPRESS_HELP)

allow_external = OptionMaker(
    "--allow-external",
    dest="allow_external",
    action="append",
    default=[],
    metavar="PACKAGE",
    help="Allow the installation of externally hosted files",
)

allow_all_external = OptionMaker(
    "--allow-all-external",
    dest="allow_all_external",
    action="store_true",
    default=False,
    help="Allow the installation of all externally hosted files",
)

# Remove after 1.7
no_allow_external = OptionMaker(
    "--no-allow-external",
    dest="allow_all_external",
    action="store_false",
    default=False,
    help=SUPPRESS_HELP,
)

# Remove --allow-insecure after 1.7
allow_unsafe = OptionMaker(
    "--allow-unverified", "--allow-insecure",
    dest="allow_unverified",
    action="append",
    default=[],
    metavar="PACKAGE",
    help="Allow the installation of insecure and unverifiable files",
)

# Remove after 1.7
no_allow_unsafe = OptionMaker(
    "--no-allow-insecure",
    dest="allow_all_insecure",
    action="store_false",
    default=False,
    help=SUPPRESS_HELP
)

# Remove after 1.5
process_dependency_links = OptionMaker(
    "--process-dependency-links",
    dest="process_dependency_links",
    action="store_true",
    default=False,
    help="Enable the processing of dependency links.",
)

requirements = OptionMaker(
    '-r', '--requirement',
    dest='requirements',
    action='append',
    default=[],
    metavar='file',
    help='Install from the given requirements file. '
    'This option can be used multiple times.')

use_wheel = OptionMaker(
    '--use-wheel',
    dest='use_wheel',
    action='store_true',
    help=SUPPRESS_HELP,
)

no_use_wheel = OptionMaker(
    '--no-use-wheel',
    dest='use_wheel',
    action='store_false',
    default=True,
    help=('Do not Find and prefer wheel archives when searching indexes and '
          'find-links locations.'),
)

download_cache = OptionMaker(
    '--download-cache',
    dest='download_cache',
    metavar='dir',
    default=None,
    help='Cache downloaded packages in <dir>.')

no_deps = OptionMaker(
    '--no-deps', '--no-dependencies',
    dest='ignore_dependencies',
    action='store_true',
    default=False,
    help="Don't install package dependencies.")

build_dir = OptionMaker(
    '-b', '--build', '--build-dir', '--build-directory',
    dest='build_dir',
    metavar='dir',
    help='Directory to unpack packages into and build in.',
)

install_options = OptionMaker(
    '--install-option',
    dest='install_options',
    action='append',
    metavar='options',
    help="Extra arguments to be supplied to the setup.py install "
    "command (use like --install-option=\"--install-scripts=/usr/local/bin\"). "
    "Use multiple --install-option options to pass multiple options to setup.py install. "
    "If you are using an option with a directory path, be sure to use absolute path.")

global_options = OptionMaker(
    '--global-option',
    dest='global_options',
    action='append',
    metavar='options',
    help="Extra global options to be supplied to the setup.py "
    "call before the install command.")

no_clean = OptionMaker(
    '--no-clean',
    action='store_true',
    default=False,
    help="Don't clean up build directories.")


##########
# groups #
##########

general_group = {
    'name': 'General Options',
    'options': [
        help_,
        require_virtualenv,
        verbose,
        version,
        quiet,
        log_file,
        log,
        log_explicit_levels,
        no_input,
        proxy,
        timeout,
        default_vcs,
        skip_requirements_regex,
        exists_action,
        cert,
        ]
    }

index_group = {
    'name': 'Package Index Options',
    'options': [
        index_url,
        extra_index_url,
        no_index,
        find_links,
        use_mirrors,
        mirrors,
        allow_external,
        allow_all_external,
        no_allow_external,
        allow_unsafe,
        no_allow_unsafe,
        process_dependency_links,
        ]
    }
python3.4/site-packages/pip/wheel.py000064400000050500151735050000013274 0ustar00"""
Support for installing and building the "wheel" binary package format.
"""
from __future__ import with_statement

import compileall
import csv
import functools
import hashlib
import os
import re
import shutil
import sys

from base64 import urlsafe_b64encode
from email.parser import Parser

from pip.backwardcompat import ConfigParser, StringIO
from pip.exceptions import InvalidWheelFilename, UnsupportedWheel
from pip.locations import distutils_scheme
from pip.log import logger
from pip import pep425tags
from pip.util import call_subprocess, normalize_path, make_path_relative
from pip._vendor import pkg_resources
from pip._vendor.distlib.scripts import ScriptMaker
from pip._vendor import pkg_resources


wheel_ext = '.whl'

VERSION_COMPATIBLE = (1, 0)


def rehash(path, algo='sha256', blocksize=1<<20):
    """Return (hash, length) for path using hashlib.new(algo)"""
    h = hashlib.new(algo)
    length = 0
    with open(path, 'rb') as f:
        block = f.read(blocksize)
        while block:
            length += len(block)
            h.update(block)
            block = f.read(blocksize)
    digest = 'sha256='+urlsafe_b64encode(h.digest()).decode('latin1').rstrip('=')
    return (digest, length)

try:
    unicode
    def binary(s):
        if isinstance(s, unicode):
            return s.encode('ascii')
        return s
except NameError:
    def binary(s):
        if isinstance(s, str):
            return s.encode('ascii')

def open_for_csv(name, mode):
    if sys.version_info[0] < 3:
        nl = {}
        bin = 'b'
    else:
        nl = { 'newline': '' }
        bin = ''
    return open(name, mode + bin, **nl)

def fix_script(path):
    """Replace #!python with #!/path/to/python
    Return True if file was changed."""
    # XXX RECORD hashes will need to be updated
    if os.path.isfile(path):
        script = open(path, 'rb')
        try:
            firstline = script.readline()
            if not firstline.startswith(binary('#!python')):
                return False
            exename = sys.executable.encode(sys.getfilesystemencoding())
            firstline = binary('#!') + exename + binary(os.linesep)
            rest = script.read()
        finally:
            script.close()
        script = open(path, 'wb')
        try:
            script.write(firstline)
            script.write(rest)
        finally:
            script.close()
        return True

dist_info_re = re.compile(r"""^(?P<namever>(?P<name>.+?)(-(?P<ver>\d.+?))?)
                                \.dist-info$""", re.VERBOSE)

def root_is_purelib(name, wheeldir):
    """
    Return True if the extracted wheel in wheeldir should go into purelib.
    """
    name_folded = name.replace("-", "_")
    for item in os.listdir(wheeldir):
        match = dist_info_re.match(item)
        if match and match.group('name') == name_folded:
            with open(os.path.join(wheeldir, item, 'WHEEL')) as wheel:
                for line in wheel:
                    line = line.lower().rstrip()
                    if line == "root-is-purelib: true":
                        return True
    return False


def get_entrypoints(filename):
    if not os.path.exists(filename):
        return {}, {}

    # This is done because you can pass a string to entry_points wrappers which
    # means that they may or may not be valid INI files. The attempt here is to
    # strip leading and trailing whitespace in order to make them valid INI
    # files.
    with open(filename) as fp:
        data = StringIO()
        for line in fp:
            data.write(line.strip())
            data.write("\n")
        data.seek(0)

    cp = ConfigParser.RawConfigParser()
    cp.readfp(data)

    console = {}
    gui = {}
    if cp.has_section('console_scripts'):
        console = dict(cp.items('console_scripts'))
    if cp.has_section('gui_scripts'):
        gui = dict(cp.items('gui_scripts'))
    return console, gui


def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
                     pycompile=True, scheme=None, strip_file_prefix=None):
    """Install a wheel"""

    if not scheme:
        scheme = distutils_scheme(name, user=user, home=home, root=root)

    if root_is_purelib(name, wheeldir):
        lib_dir = scheme['purelib']
    else:
        lib_dir = scheme['platlib']

    info_dir = []
    data_dirs = []
    source = wheeldir.rstrip(os.path.sep) + os.path.sep

    # Record details of the files moved
    #   installed = files copied from the wheel to the destination
    #   changed = files changed while installing (scripts #! line typically)
    #   generated = files newly generated during the install (script wrappers)
    installed = {}
    changed = set()
    generated = []

    # Compile all of the pyc files that we're going to be installing
    if pycompile:
        compileall.compile_dir(source, force=True, quiet=True)

    def normpath(src, p):
        return make_path_relative(src, p).replace(os.path.sep, '/')

    def record_installed(srcfile, destfile, modified=False):
        """Map archive RECORD paths to installation RECORD paths."""
        oldpath = normpath(srcfile, wheeldir)
        newpath = normpath(destfile, lib_dir)
        installed[oldpath] = newpath
        if modified:
            changed.add(destfile)

    def clobber(source, dest, is_base, fixer=None, filter=None):
        if not os.path.exists(dest): # common for the 'include' path
            os.makedirs(dest)

        for dir, subdirs, files in os.walk(source):
            basedir = dir[len(source):].lstrip(os.path.sep)
            destdir = os.path.join(dest, basedir)
            if is_base and basedir.split(os.path.sep, 1)[0].endswith('.data'):
                continue
            for s in subdirs:
                destsubdir = os.path.join(dest, basedir, s)
                if is_base and basedir == '' and destsubdir.endswith('.data'):
                    data_dirs.append(s)
                    continue
                elif (is_base
                    and s.endswith('.dist-info')
                    # is self.req.project_name case preserving?
                    and s.lower().startswith(req.project_name.replace('-', '_').lower())):
                    assert not info_dir, 'Multiple .dist-info directories'
                    info_dir.append(destsubdir)
            for f in files:
                # Skip unwanted files
                if filter and filter(f):
                    continue
                srcfile = os.path.join(dir, f)
                destfile = os.path.join(dest, basedir, f)
                # directory creation is lazy and after the file filtering above
                # to ensure we don't install empty dirs; empty dirs can't be
                # uninstalled.
                if not os.path.exists(destdir):
                    os.makedirs(destdir)
                # use copy2 (not move) to be extra sure we're not moving
                # directories over; copy2 fails for directories.  this would
                # fail tests (not during released/user execution)
                shutil.copy2(srcfile, destfile)
                changed = False
                if fixer:
                    changed = fixer(destfile)
                record_installed(srcfile, destfile, changed)

    clobber(source, lib_dir, True)

    assert info_dir, "%s .dist-info directory not found" % req

    # Get the defined entry points
    ep_file = os.path.join(info_dir[0], 'entry_points.txt')
    console, gui = get_entrypoints(ep_file)

    def is_entrypoint_wrapper(name):
        # EP, EP.exe and EP-script.py are scripts generated for
        # entry point EP by setuptools
        if name.lower().endswith('.exe'):
            matchname = name[:-4]
        elif name.lower().endswith('-script.py'):
            matchname = name[:-10]
        elif name.lower().endswith(".pya"):
            matchname = name[:-4]
        else:
            matchname = name
        # Ignore setuptools-generated scripts
        return (matchname in console or matchname in gui)

    for datadir in data_dirs:
        fixer = None
        filter = None
        for subdir in os.listdir(os.path.join(wheeldir, datadir)):
            fixer = None
            if subdir == 'scripts':
                fixer = fix_script
                filter = is_entrypoint_wrapper
            source = os.path.join(wheeldir, datadir, subdir)
            dest = scheme[subdir]
            clobber(source, dest, False, fixer=fixer, filter=filter)

    maker = ScriptMaker(None, scheme['scripts'])

    # Ensure we don't generate any variants for scripts because this is almost
    # never what somebody wants.
    # See https://bitbucket.org/pypa/distlib/issue/35/
    maker.variants = set(('', ))

    # This is required because otherwise distlib creates scripts that are not
    # executable.
    # See https://bitbucket.org/pypa/distlib/issue/32/
    maker.set_mode = True

    # Simplify the script and fix the fact that the default script swallows
    # every single stack trace.
    # See https://bitbucket.org/pypa/distlib/issue/34/
    # See https://bitbucket.org/pypa/distlib/issue/33/
    def _get_script_text(entry):
        return maker.script_template % {
            "module": entry.prefix,
            "import_name": entry.suffix.split(".")[0],
            "func": entry.suffix,
        }

    maker._get_script_text = _get_script_text
    maker.script_template = """# -*- coding: utf-8 -*-
import re
import sys

from %(module)s import %(import_name)s

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
"""

    # Special case pip and setuptools to generate versioned wrappers
    #
    # The issue is that some projects (specifically, pip and setuptools) use
    # code in setup.py to create "versioned" entry points - pip2.7 on Python
    # 2.7, pip3.3 on Python 3.3, etc. But these entry points are baked into
    # the wheel metadata at build time, and so if the wheel is installed with
    # a *different* version of Python the entry points will be wrong. The
    # correct fix for this is to enhance the metadata to be able to describe
    # such versioned entry points, but that won't happen till Metadata 2.0 is
    # available.
    # In the meantime, projects using versioned entry points will either have
    # incorrect versioned entry points, or they will not be able to distribute
    # "universal" wheels (i.e., they will need a wheel per Python version).
    #
    # Because setuptools and pip are bundled with _ensurepip and virtualenv,
    # we need to use universal wheels. So, as a stopgap until Metadata 2.0, we
    # override the versioned entry points in the wheel and generate the
    # correct ones. This code is purely a short-term measure until Metadat 2.0
    # is available.
    #
    # To add the level of hack in this section of code, in order to support
    # ensurepip this code will look for an ``ENSUREPIP_OPTIONS`` environment
    # variable which will control which version scripts get installed.
    #
    # ENSUREPIP_OPTIONS=altinstall
    #   - Only pipX.Y and easy_install-X.Y will be generated and installed
    # ENSUREPIP_OPTIONS=install
    #   - pipX.Y, pipX, easy_install-X.Y will be generated and installed. Note
    #     that this option is technically if ENSUREPIP_OPTIONS is set and is
    #     not altinstall
    # DEFAULT
    #   - The default behavior is to install pip, pipX, pipX.Y, easy_install
    #     and easy_install-X.Y.
    pip_script = console.pop('pip', None)
    if pip_script:
        if "ENSUREPIP_OPTIONS" not in os.environ:
            spec = 'pip = ' + pip_script
            generated.extend(maker.make(spec))

        if os.environ.get("ENSUREPIP_OPTIONS", "") != "altinstall":
            spec = 'pip%s = %s' % (sys.version[:1], pip_script)
            generated.extend(maker.make(spec))

        spec = 'pip%s = %s' % (sys.version[:3], pip_script)
        generated.extend(maker.make(spec))
        # Delete any other versioned pip entry points
        pip_ep = [k for k in console if re.match(r'pip(\d(\.\d)?)?$', k)]
        for k in pip_ep:
            del console[k]
    easy_install_script = console.pop('easy_install', None)
    if easy_install_script:
        if "ENSUREPIP_OPTIONS" not in os.environ:
            spec = 'easy_install = ' + easy_install_script
            generated.extend(maker.make(spec))

        spec = 'easy_install-%s = %s' % (sys.version[:3], easy_install_script)
        generated.extend(maker.make(spec))
        # Delete any other versioned easy_install entry points
        easy_install_ep = [k for k in console
                if re.match(r'easy_install(-\d\.\d)?$', k)]
        for k in easy_install_ep:
            del console[k]

    # Generate the console and GUI entry points specified in the wheel
    if len(console) > 0:
        generated.extend(maker.make_multiple(['%s = %s' % kv for kv in console.items()]))
    if len(gui) > 0:
        generated.extend(maker.make_multiple(['%s = %s' % kv for kv in gui.items()], {'gui': True}))

    record = os.path.join(info_dir[0], 'RECORD')
    temp_record = os.path.join(info_dir[0], 'RECORD.pip')
    with open_for_csv(record, 'r') as record_in:
        with open_for_csv(temp_record, 'w+') as record_out:
            reader = csv.reader(record_in)
            writer = csv.writer(record_out)
            for row in reader:
                row[0] = installed.pop(row[0], row[0])
                if row[0] in changed:
                    row[1], row[2] = rehash(row[0])
                writer.writerow(row)
            for f in generated:
                h, l = rehash(f)
                if strip_file_prefix and f.startswith(strip_file_prefix):
                    f = os.path.join(os.sep, os.path.relpath(f, strip_file_prefix))
                writer.writerow((f, h, l))
            for f in installed:
                writer.writerow((installed[f], '', ''))
    shutil.move(temp_record, record)

def _unique(fn):
    @functools.wraps(fn)
    def unique(*args, **kw):
        seen = set()
        for item in fn(*args, **kw):
            if item not in seen:
                seen.add(item)
                yield item
    return unique

# TODO: this goes somewhere besides the wheel module
@_unique
def uninstallation_paths(dist):
    """
    Yield all the uninstallation paths for dist based on RECORD-without-.pyc

    Yield paths to all the files in RECORD. For each .py file in RECORD, add
    the .pyc in the same directory.

    UninstallPathSet.add() takes care of the __pycache__ .pyc.
    """
    from pip.req import FakeFile # circular import
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
    for row in r:
        path = os.path.join(dist.location, row[0])
        yield path
        if path.endswith('.py'):
            dn, fn = os.path.split(path)
            base = fn[:-3]
            path = os.path.join(dn, base+'.pyc')
            yield path


def wheel_version(source_dir):
    """
    Return the Wheel-Version of an extracted wheel, if possible.

    Otherwise, return False if we couldn't parse / extract it.
    """
    try:
        dist = [d for d in pkg_resources.find_on_path(None, source_dir)][0]

        wheel_data = dist.get_metadata('WHEEL')
        wheel_data = Parser().parsestr(wheel_data)

        version = wheel_data['Wheel-Version'].strip()
        version = tuple(map(int, version.split('.')))
        return version
    except:
        return False


def check_compatibility(version, name):
    """
    Raises errors or warns if called with an incompatible Wheel-Version.

    Pip should refuse to install a Wheel-Version that's a major series
    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
    installing a version only minor version ahead (e.g 1.2 > 1.1).

    version: a 2-tuple representing a Wheel-Version (Major, Minor)
    name: name of wheel or package to raise exception about

    :raises UnsupportedWheel: when an incompatible Wheel-Version is given
    """
    if not version:
        raise UnsupportedWheel(
            "%s is in an unsupported or invalid wheel" % name
        )
    if version[0] > VERSION_COMPATIBLE[0]:
        raise UnsupportedWheel(
            "%s's Wheel-Version (%s) is not compatible with this version "
            "of pip" % (name, '.'.join(map(str, version)))
        )
    elif version > VERSION_COMPATIBLE:
        logger.warn('Installing from a newer Wheel-Version (%s)'
                    % '.'.join(map(str, version)))


class Wheel(object):
    """A wheel file"""

    # TODO: maybe move the install code into this class

    wheel_file_re = re.compile(
                r"""^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))
                ((-(?P<build>\d.*?))?-(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)
                \.whl|\.dist-info)$""",
                re.VERBOSE)

    def __init__(self, filename):
        """
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        """
        wheel_info = self.wheel_file_re.match(filename)
        if not wheel_info:
            raise InvalidWheelFilename("%s is not a valid wheel filename." % filename)
        self.filename = filename
        self.name = wheel_info.group('name').replace('_', '-')
        # we'll assume "_" means "-" due to wheel naming scheme
        # (https://github.com/pypa/pip/issues/1150)
        self.version = wheel_info.group('ver').replace('_', '-')
        self.pyversions = wheel_info.group('pyver').split('.')
        self.abis = wheel_info.group('abi').split('.')
        self.plats = wheel_info.group('plat').split('.')

        # All the tag combinations from this file
        self.file_tags = set((x, y, z) for x in self.pyversions for y
                            in self.abis for z in self.plats)

    def support_index_min(self, tags=None):
        """
        Return the lowest index that one of the wheel's file_tag combinations
        achieves in the supported_tags list e.g. if there are 8 supported tags,
        and one of the file tags is first in the list, then return 0.  Returns
        None is the wheel is not supported.
        """
        if tags is None: # for mock
            tags = pep425tags.supported_tags
        indexes = [tags.index(c) for c in self.file_tags if c in tags]
        return min(indexes) if indexes else None

    def supported(self, tags=None):
        """Is this wheel supported on this system?"""
        if tags is None: # for mock
            tags = pep425tags.supported_tags
        return bool(set(tags).intersection(self.file_tags))


class WheelBuilder(object):
    """Build wheels from a RequirementSet."""

    def __init__(self, requirement_set, finder, wheel_dir, build_options=[], global_options=[]):
        self.requirement_set = requirement_set
        self.finder = finder
        self.wheel_dir = normalize_path(wheel_dir)
        self.build_options = build_options
        self.global_options = global_options

    def _build_one(self, req):
        """Build one wheel."""

        base_args = [
            sys.executable, '-c',
            "import setuptools;__file__=%r;"\
            "exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))" % req.setup_py] + \
            list(self.global_options)

        logger.notify('Running setup.py bdist_wheel for %s' % req.name)
        logger.notify('Destination directory: %s' % self.wheel_dir)
        wheel_args = base_args + ['bdist_wheel', '-d', self.wheel_dir] + self.build_options
        try:
            call_subprocess(wheel_args, cwd=req.source_dir, show_stdout=False)
            return True
        except:
            logger.error('Failed building wheel for %s' % req.name)
            return False

    def build(self):
        """Build wheels."""

        #unpack and constructs req set
        self.requirement_set.prepare_files(self.finder)

        reqset = self.requirement_set.requirements.values()

        buildset = [req for req in reqset if not req.is_wheel]

        if not buildset:
            return

        #build the wheels
        logger.notify(
            'Building wheels for collected packages: %s' %
            ','.join([req.name for req in buildset])
        )
        logger.indent += 2
        build_success, build_failure = [], []
        for req in buildset:
            if self._build_one(req):
                build_success.append(req)
            else:
                build_failure.append(req)
        logger.indent -= 2

        #notify sucess/failure
        if build_success:
            logger.notify('Successfully built %s' % ' '.join([req.name for req in build_success]))
        if build_failure:
            logger.notify('Failed to build %s' % ' '.join([req.name for req in build_failure]))
python3.4/site-packages/pip/baseparser.py000064400000017742151735050000014332 0ustar00"""Base option parser setup"""

import sys
import optparse
import os
import textwrap
from distutils.util import strtobool

from pip.backwardcompat import ConfigParser, string_types
from pip.locations import default_config_file
from pip.util import get_terminal_size, get_prog
from pip._vendor import pkg_resources


class PrettyHelpFormatter(optparse.IndentedHelpFormatter):
    """A prettier/less verbose help formatter for optparse."""

    def __init__(self, *args, **kwargs):
        # help position must be aligned with __init__.parseopts.description
        kwargs['max_help_position'] = 30
        kwargs['indent_increment'] = 1
        kwargs['width'] = get_terminal_size()[0] - 2
        optparse.IndentedHelpFormatter.__init__(self, *args, **kwargs)

    def format_option_strings(self, option):
        return self._format_option_strings(option, ' <%s>', ', ')

    def _format_option_strings(self, option, mvarfmt=' <%s>', optsep=', '):
        """
        Return a comma-separated list of option strings and metavars.

        :param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
        :param mvarfmt: metavar format string - evaluated as mvarfmt % metavar
        :param optsep:  separator
        """
        opts = []

        if option._short_opts:
            opts.append(option._short_opts[0])
        if option._long_opts:
            opts.append(option._long_opts[0])
        if len(opts) > 1:
            opts.insert(1, optsep)

        if option.takes_value():
            metavar = option.metavar or option.dest.lower()
            opts.append(mvarfmt % metavar.lower())

        return ''.join(opts)

    def format_heading(self, heading):
        if heading == 'Options':
            return ''
        return heading + ':\n'

    def format_usage(self, usage):
        """
        Ensure there is only one newline between usage and the first heading
        if there is no description.
        """
        msg = '\nUsage: %s\n' % self.indent_lines(textwrap.dedent(usage), "  ")
        return msg

    def format_description(self, description):
        # leave full control over description to us
        if description:
            if hasattr(self.parser, 'main'):
                label = 'Commands'
            else:
                label = 'Description'
            #some doc strings have inital newlines, some don't
            description = description.lstrip('\n')
            #some doc strings have final newlines and spaces, some don't
            description = description.rstrip()
            #dedent, then reindent
            description = self.indent_lines(textwrap.dedent(description), "  ")
            description = '%s:\n%s\n' % (label, description)
            return description
        else:
            return ''

    def format_epilog(self, epilog):
        # leave full control over epilog to us
        if epilog:
            return epilog
        else:
            return ''

    def indent_lines(self, text, indent):
        new_lines = [indent + line for line in text.split('\n')]
        return "\n".join(new_lines)


class UpdatingDefaultsHelpFormatter(PrettyHelpFormatter):
    """Custom help formatter for use in ConfigOptionParser that updates
    the defaults before expanding them, allowing them to show up correctly
    in the help listing"""

    def expand_default(self, option):
        if self.parser is not None:
            self.parser.update_defaults(self.parser.defaults)
        return optparse.IndentedHelpFormatter.expand_default(self, option)


class CustomOptionParser(optparse.OptionParser):
    def insert_option_group(self, idx, *args, **kwargs):
        """Insert an OptionGroup at a given position."""
        group = self.add_option_group(*args, **kwargs)

        self.option_groups.pop()
        self.option_groups.insert(idx, group)

        return group

    @property
    def option_list_all(self):
        """Get a list of all options, including those in option groups."""
        res = self.option_list[:]
        for i in self.option_groups:
            res.extend(i.option_list)

        return res


class ConfigOptionParser(CustomOptionParser):
    """Custom option parser which updates its defaults by checking the
    configuration files and environmental variables"""

    def __init__(self, *args, **kwargs):
        self.config = ConfigParser.RawConfigParser()
        self.name = kwargs.pop('name')
        self.files = self.get_config_files()
        if self.files:
            self.config.read(self.files)
        assert self.name
        optparse.OptionParser.__init__(self, *args, **kwargs)

    def get_config_files(self):
        config_file = os.environ.get('PIP_CONFIG_FILE', False)
        if config_file == os.devnull:
            return []
        if config_file and os.path.exists(config_file):
            return [config_file]
        return [default_config_file]

    def check_default(self, option, key, val):
        try:
            return option.check_value(key, val)
        except optparse.OptionValueError:
            e = sys.exc_info()[1]
            print("An error occurred during configuration: %s" % e)
            sys.exit(3)

    def update_defaults(self, defaults):
        """Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists)."""
        # Then go and look for the other sources of configuration:
        config = {}
        # 1. config files
        for section in ('global', self.name):
            config.update(self.normalize_keys(self.get_config_section(section)))
        # 2. environmental variables
        config.update(self.normalize_keys(self.get_environ_vars()))
        # Then set the options with those values
        for key, val in config.items():
            option = self.get_option(key)
            if option is not None:
                # ignore empty values
                if not val:
                    continue
                if option.action in ('store_true', 'store_false', 'count'):
                    val = strtobool(val)
                if option.action == 'append':
                    val = val.split()
                    val = [self.check_default(option, key, v) for v in val]
                else:
                    val = self.check_default(option, key, val)

                defaults[option.dest] = val
        return defaults

    def normalize_keys(self, items):
        """Return a config dictionary with normalized keys regardless of
        whether the keys were specified in environment variables or in config
        files"""
        normalized = {}
        for key, val in items:
            key = key.replace('_', '-')
            if not key.startswith('--'):
                key = '--%s' % key  # only prefer long opts
            normalized[key] = val
        return normalized

    def get_config_section(self, name):
        """Get a section of a configuration"""
        if self.config.has_section(name):
            return self.config.items(name)
        return []

    def get_environ_vars(self, prefix='PIP_'):
        """Returns a generator with all environmental vars with prefix PIP_"""
        for key, val in os.environ.items():
            if key.startswith(prefix):
                yield (key.replace(prefix, '').lower(), val)

    def get_default_values(self):
        """Overridding to make updating the defaults after instantiation of
        the option parser possible, update_defaults() does the dirty work."""
        if not self.process_default_values:
            # Old, pre-Optik 1.5 behaviour.
            return optparse.Values(self.defaults)

        defaults = self.update_defaults(self.defaults.copy())  # ours
        for option in self._get_all_options():
            default = defaults.get(option.dest)
            if isinstance(default, string_types):
                opt_str = option.get_opt_string()
                defaults[option.dest] = option.check_value(opt_str, default)
        return optparse.Values(defaults)

    def error(self, msg):
        self.print_usage(sys.stderr)
        self.exit(2, "%s\n" % msg)
python3.4/site-packages/pip/__init__.py000064400000022324151735050000013732 0ustar00import os
import optparse

import sys
import re

from pip.exceptions import InstallationError, CommandError, PipError
from pip.log import logger
from pip.util import get_installed_distributions, get_prog
from pip.vcs import git, mercurial, subversion, bazaar  # noqa
from pip.baseparser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.commands import commands, get_summaries, get_similar_commands

# This fixes a peculiarity when importing via __import__ - as we are
# initialising the pip module, "from pip import cmdoptions" is recursive
# and appears not to work properly in that situation.
import pip.cmdoptions
cmdoptions = pip.cmdoptions

# The version as used in the setup.py and the docs conf.py
__version__ = "1.5.6"


def autocomplete():
    """Command and option completion for the main option parser (and options)
    and its subcommands (and options).

    Enable by sourcing one of the completion shell scripts (bash or zsh).
    """
    # Don't complete if user hasn't sourced bash_completion file.
    if 'PIP_AUTO_COMPLETE' not in os.environ:
        return
    cwords = os.environ['COMP_WORDS'].split()[1:]
    cword = int(os.environ['COMP_CWORD'])
    try:
        current = cwords[cword - 1]
    except IndexError:
        current = ''

    subcommands = [cmd for cmd, summary in get_summaries()]
    options = []
    # subcommand
    try:
        subcommand_name = [w for w in cwords if w in subcommands][0]
    except IndexError:
        subcommand_name = None

    parser = create_main_parser()
    # subcommand options
    if subcommand_name:
        # special case: 'help' subcommand has no options
        if subcommand_name == 'help':
            sys.exit(1)
        # special case: list locally installed dists for uninstall command
        if subcommand_name == 'uninstall' and not current.startswith('-'):
            installed = []
            lc = current.lower()
            for dist in get_installed_distributions(local_only=True):
                if dist.key.startswith(lc) and dist.key not in cwords[1:]:
                    installed.append(dist.key)
            # if there are no dists installed, fall back to option completion
            if installed:
                for dist in installed:
                    print(dist)
                sys.exit(1)

        subcommand = commands[subcommand_name]()
        options += [(opt.get_opt_string(), opt.nargs)
                    for opt in subcommand.parser.option_list_all
                    if opt.help != optparse.SUPPRESS_HELP]

        # filter out previously specified options from available options
        prev_opts = [x.split('=')[0] for x in cwords[1:cword - 1]]
        options = [(x, v) for (x, v) in options if x not in prev_opts]
        # filter options by current input
        options = [(k, v) for k, v in options if k.startswith(current)]
        for option in options:
            opt_label = option[0]
            # append '=' to options which require args
            if option[1]:
                opt_label += '='
            print(opt_label)
    else:
        # show main parser options only when necessary
        if current.startswith('-') or current.startswith('--'):
            opts = [i.option_list for i in parser.option_groups]
            opts.append(parser.option_list)
            opts = (o for it in opts for o in it)

            subcommands += [i.get_opt_string() for i in opts
                            if i.help != optparse.SUPPRESS_HELP]

        print(' '.join([x for x in subcommands if x.startswith(current)]))
    sys.exit(1)


def create_main_parser():
    parser_kw = {
        'usage': '\n%prog <command> [options]',
        'add_help_option': False,
        'formatter': UpdatingDefaultsHelpFormatter(),
        'name': 'global',
        'prog': get_prog(),
    }

    parser = ConfigOptionParser(**parser_kw)
    parser.disable_interspersed_args()

    pip_pkg_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    parser.version = 'pip %s from %s (python %s)' % (
        __version__,  pip_pkg_dir, sys.version[:3])

    # add the general options
    gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, parser)
    parser.add_option_group(gen_opts)

    parser.main = True # so the help formatter knows

    # create command listing for description
    command_summaries = get_summaries()
    description = [''] + ['%-27s %s' % (i, j) for i, j in command_summaries]
    parser.description = '\n'.join(description)

    return parser


def parseopts(args):
    parser = create_main_parser()

    # Note: parser calls disable_interspersed_args(), so the result of this call
    # is to split the initial args into the general options before the
    # subcommand and everything else.
    # For example:
    #  args: ['--timeout=5', 'install', '--user', 'INITools']
    #  general_options: ['--timeout==5']
    #  args_else: ['install', '--user', 'INITools']
    general_options, args_else = parser.parse_args(args)

    # --version
    if general_options.version:
        sys.stdout.write(parser.version)
        sys.stdout.write(os.linesep)
        sys.exit()

    # pip || pip help -> print_help()
    if not args_else or (args_else[0] == 'help' and len(args_else) == 1):
        parser.print_help()
        sys.exit()

    # the subcommand name
    cmd_name = args_else[0].lower()

    #all the args without the subcommand
    cmd_args = args[:]
    cmd_args.remove(args_else[0].lower())

    if cmd_name not in commands:
        guess = get_similar_commands(cmd_name)

        msg = ['unknown command "%s"' % cmd_name]
        if guess:
            msg.append('maybe you meant "%s"' % guess)

        raise CommandError(' - '.join(msg))

    return cmd_name, cmd_args


def main(initial_args=None):
    if initial_args is None:
        initial_args = sys.argv[1:]

    autocomplete()

    try:
        cmd_name, cmd_args = parseopts(initial_args)
    except PipError:
        e = sys.exc_info()[1]
        sys.stderr.write("ERROR: %s" % e)
        sys.stderr.write(os.linesep)
        sys.exit(1)

    command = commands[cmd_name]()
    return command.main(cmd_args)


def bootstrap():
    """
    Bootstrapping function to be called from install-pip.py script.
    """
    pkgs = ['pip']
    try:
        import setuptools
    except ImportError:
        pkgs.append('setuptools')
    return main(['install', '--upgrade'] + pkgs + sys.argv[1:])

############################################################
## Writing freeze files


class FrozenRequirement(object):

    def __init__(self, name, req, editable, comments=()):
        self.name = name
        self.req = req
        self.editable = editable
        self.comments = comments

    _rev_re = re.compile(r'-r(\d+)$')
    _date_re = re.compile(r'-(20\d\d\d\d\d\d)$')

    @classmethod
    def from_dist(cls, dist, dependency_links, find_tags=False):
        location = os.path.normcase(os.path.abspath(dist.location))
        comments = []
        from pip.vcs import vcs, get_src_requirement
        if vcs.get_backend_name(location):
            editable = True
            try:
                req = get_src_requirement(dist, location, find_tags)
            except InstallationError:
                ex = sys.exc_info()[1]
                logger.warn("Error when trying to get requirement for VCS system %s, falling back to uneditable format" % ex)
                req = None
            if req is None:
                logger.warn('Could not determine repository location of %s' % location)
                comments.append('## !! Could not determine repository location')
                req = dist.as_requirement()
                editable = False
        else:
            editable = False
            req = dist.as_requirement()
            specs = req.specs
            assert len(specs) == 1 and specs[0][0] == '=='
            version = specs[0][1]
            ver_match = cls._rev_re.search(version)
            date_match = cls._date_re.search(version)
            if ver_match or date_match:
                svn_backend = vcs.get_backend('svn')
                if svn_backend:
                    svn_location = svn_backend(
                        ).get_location(dist, dependency_links)
                if not svn_location:
                    logger.warn(
                        'Warning: cannot find svn location for %s' % req)
                    comments.append('## FIXME: could not find svn URL in dependency_links for this package:')
                else:
                    comments.append('# Installing as editable to satisfy requirement %s:' % req)
                    if ver_match:
                        rev = ver_match.group(1)
                    else:
                        rev = '{%s}' % date_match.group(1)
                    editable = True
                    req = '%s@%s#egg=%s' % (svn_location, rev, cls.egg_name(dist))
        return cls(dist.project_name, req, editable, comments)

    @staticmethod
    def egg_name(dist):
        name = dist.egg_name()
        match = re.search(r'-py\d\.\d$', name)
        if match:
            name = name[:match.start()]
        return name

    def __str__(self):
        req = self.req
        if self.editable:
            req = '-e %s' % req
        return '\n'.join(list(self.comments) + [str(req)]) + '\n'


if __name__ == '__main__':
    exit = main()
    if exit:
        sys.exit(exit)
python3.4/site-packages/pip/locations.py000064400000014072151735050000014167 0ustar00"""Locations where we look for configs, install stuff, etc"""

import sys
import site
import os
import tempfile
from distutils.command.install import install, SCHEME_KEYS
import getpass
from pip.backwardcompat import get_python_lib, get_path_uid, user_site
import pip.exceptions


DELETE_MARKER_MESSAGE = '''\
This file is placed here by pip to indicate the source was put
here by pip.

Once this package is successfully installed this source code will be
deleted (unless you remove this file).
'''
PIP_DELETE_MARKER_FILENAME = 'pip-delete-this-directory.txt'

def write_delete_marker_file(directory):
    """
    Write the pip delete marker file into this directory.
    """
    filepath = os.path.join(directory, PIP_DELETE_MARKER_FILENAME)
    marker_fp = open(filepath, 'w')
    marker_fp.write(DELETE_MARKER_MESSAGE)
    marker_fp.close()


def running_under_virtualenv():
    """
    Return True if we're running inside a virtualenv, False otherwise.

    """
    if hasattr(sys, 'real_prefix'):
        return True
    elif sys.prefix != getattr(sys, "base_prefix", sys.prefix):
        return True

    return False


def virtualenv_no_global():
    """
    Return True if in a venv and no system site packages.
    """
    #this mirrors the logic in virtualenv.py for locating the no-global-site-packages.txt file
    site_mod_dir = os.path.dirname(os.path.abspath(site.__file__))
    no_global_file = os.path.join(site_mod_dir, 'no-global-site-packages.txt')
    if running_under_virtualenv() and os.path.isfile(no_global_file):
        return True

def __get_username():
    """ Returns the effective username of the current process. """
    if sys.platform == 'win32':
        return getpass.getuser()
    import pwd
    return pwd.getpwuid(os.geteuid()).pw_name

def _get_build_prefix():
    """ Returns a safe build_prefix """
    path = os.path.join(tempfile.gettempdir(), 'pip_build_%s' %
        __get_username())
    if sys.platform == 'win32':
        """ on windows(tested on 7) temp dirs are isolated """
        return path
    try:
        os.mkdir(path)
        write_delete_marker_file(path)
    except OSError:
        file_uid = None
        try:
            # raises OSError for symlinks
            # https://github.com/pypa/pip/pull/935#discussion_r5307003
            file_uid = get_path_uid(path)
        except OSError:
            file_uid = None

        if file_uid != os.geteuid():
            msg = "The temporary folder for building (%s) is either not owned by you, or is a symlink." \
                % path
            print (msg)
            print("pip will not work until the temporary folder is " + \
                 "either deleted or is a real directory owned by your user account.")
            raise pip.exceptions.InstallationError(msg)
    return path

if running_under_virtualenv():
    build_prefix = os.path.join(sys.prefix, 'build')
    src_prefix = os.path.join(sys.prefix, 'src')
else:
    # Note: intentionally NOT using mkdtemp
    # See https://github.com/pypa/pip/issues/906 for plan to move to mkdtemp
    build_prefix = _get_build_prefix()

    ## FIXME: keep src in cwd for now (it is not a temporary folder)
    try:
        src_prefix = os.path.join(os.getcwd(), 'src')
    except OSError:
        # In case the current working directory has been renamed or deleted
        sys.exit("The folder you are executing pip from can no longer be found.")

# under Mac OS X + virtualenv sys.prefix is not properly resolved
# it is something like /path/to/python/bin/..
# Note: using realpath due to tmp dirs on OSX being symlinks
build_prefix = os.path.abspath(os.path.realpath(build_prefix))
src_prefix = os.path.abspath(src_prefix)

# FIXME doesn't account for venv linked to global site-packages

site_packages = get_python_lib()
user_dir = os.path.expanduser('~')
if sys.platform == 'win32':
    bin_py = os.path.join(sys.prefix, 'Scripts')
    bin_user = os.path.join(user_site, 'Scripts') if user_site else None
    # buildout uses 'bin' on Windows too?
    if not os.path.exists(bin_py):
        bin_py = os.path.join(sys.prefix, 'bin')
        bin_user = os.path.join(user_site, 'bin') if user_site else None
    default_storage_dir = os.path.join(user_dir, 'pip')
    default_config_file = os.path.join(default_storage_dir, 'pip.ini')
    default_log_file = os.path.join(default_storage_dir, 'pip.log')
else:
    bin_py = os.path.join(sys.prefix, 'bin')
    bin_user = os.path.join(user_site, 'bin') if user_site else None
    default_storage_dir = os.path.join(user_dir, '.pip')
    default_config_file = os.path.join(default_storage_dir, 'pip.conf')
    default_log_file = os.path.join(default_storage_dir, 'pip.log')

    # Forcing to use /usr/local/bin for standard Mac OS X framework installs
    # Also log to ~/Library/Logs/ for use with the Console.app log viewer
    if sys.platform[:6] == 'darwin' and sys.prefix[:16] == '/System/Library/':
        bin_py = '/usr/local/bin'
        default_log_file = os.path.join(user_dir, 'Library/Logs/pip.log')


def distutils_scheme(dist_name, user=False, home=None, root=None):
    """
    Return a distutils install scheme
    """
    from distutils.dist import Distribution

    scheme = {}
    d = Distribution({'name': dist_name})
    d.parse_config_files()
    i = d.get_command_obj('install', create=True)
    # NOTE: setting user or home has the side-effect of creating the home dir or
    # user base for installations during finalize_options()
    # ideally, we'd prefer a scheme class that has no side-effects.
    i.user = user or i.user
    i.home = home or i.home
    i.root = root or i.root
    i.finalize_options()
    for key in SCHEME_KEYS:
        scheme[key] = getattr(i, 'install_'+key)

    if running_under_virtualenv():
        scheme['headers'] = os.path.join(sys.prefix,
                                    'include',
                                    'site',
                                    'python' + sys.version[:3],
                                    dist_name)

        if root is not None:
            scheme["headers"] = os.path.join(
                root,
                os.path.abspath(scheme["headers"])[1:],
            )

    return scheme
python3.4/site-packages/pip/exceptions.py000064400000002076151735050000014356 0ustar00"""Exceptions used throughout package"""


class PipError(Exception):
    """Base pip exception"""


class InstallationError(PipError):
    """General exception during installation"""


class UninstallationError(PipError):
    """General exception during uninstallation"""


class DistributionNotFound(InstallationError):
    """Raised when a distribution cannot be found to satisfy a requirement"""


class BestVersionAlreadyInstalled(PipError):
    """Raised when the most up-to-date version of a package is already
    installed.  """


class BadCommand(PipError):
    """Raised when virtualenv or a command is not found"""


class CommandError(PipError):
    """Raised when there is an error in command-line arguments"""


class PreviousBuildDirError(PipError):
    """Raised when there's a previous conflicting build directory"""


class HashMismatch(InstallationError):
    """Distribution file hash values don't match."""


class InvalidWheelFilename(InstallationError):
    """Invalid wheel filename."""


class UnsupportedWheel(InstallationError):
    """Unsupported wheel."""
python3.4/site-packages/pip/util.py000064400000061044151735050000013152 0ustar00import sys
import shutil
import os
import stat
import re
import posixpath
import zipfile
import tarfile
import subprocess
import textwrap
import tempfile

from pip.exceptions import InstallationError, BadCommand, PipError
from pip.backwardcompat import(WindowsError, string_types, raw_input,
                                console_to_str, user_site, PermissionError)
from pip.locations import site_packages, running_under_virtualenv, virtualenv_no_global
from pip.log import logger
from pip._vendor import pkg_resources
from pip._vendor.distlib import version

__all__ = ['rmtree', 'display_path', 'backup_dir',
           'find_command', 'ask', 'Inf',
           'normalize_name', 'splitext',
           'format_size', 'is_installable_dir',
           'is_svn_page', 'file_contents',
           'split_leading_dir', 'has_leading_dir',
           'make_path_relative', 'normalize_path',
           'renames', 'get_terminal_size', 'get_prog',
           'unzip_file', 'untar_file', 'create_download_cache_folder',
           'cache_download', 'unpack_file', 'call_subprocess']


def get_prog():
    try:
        if os.path.basename(sys.argv[0]) in ('__main__.py', '-c'):
            return "%s -m pip" % sys.executable
    except (AttributeError, TypeError, IndexError):
        pass
    return 'pip'


def rmtree(dir, ignore_errors=False):
    shutil.rmtree(dir, ignore_errors=ignore_errors,
                  onerror=rmtree_errorhandler)


def rmtree_errorhandler(func, path, exc_info):
    """On Windows, the files in .svn are read-only, so when rmtree() tries to
    remove them, an exception is thrown.  We catch that here, remove the
    read-only attribute, and hopefully continue without problems."""
    exctype, value = exc_info[:2]
    if not ((exctype is WindowsError and value.args[0] == 5) or #others
            (exctype is OSError and value.args[0] == 13) or #python2.4
            (exctype is PermissionError and value.args[3] == 5) #python3.3
            ):
        raise
    # file type should currently be read only
    if ((os.stat(path).st_mode & stat.S_IREAD) != stat.S_IREAD):
        raise
    # convert to read/write
    os.chmod(path, stat.S_IWRITE)
    # use the original function to repeat the operation
    func(path)


def display_path(path):
    """Gives the display value for a given path, making it relative to cwd
    if possible."""
    path = os.path.normcase(os.path.abspath(path))
    if path.startswith(os.getcwd() + os.path.sep):
        path = '.' + path[len(os.getcwd()):]
    return path


def backup_dir(dir, ext='.bak'):
    """Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)"""
    n = 1
    extension = ext
    while os.path.exists(dir + extension):
        n += 1
        extension = ext + str(n)
    return dir + extension


def find_command(cmd, paths=None, pathext=None):
    """Searches the PATH for the given command and returns its path"""
    if paths is None:
        paths = os.environ.get('PATH', '').split(os.pathsep)
    if isinstance(paths, string_types):
        paths = [paths]
    # check if there are funny path extensions for executables, e.g. Windows
    if pathext is None:
        pathext = get_pathext()
    pathext = [ext for ext in pathext.lower().split(os.pathsep) if len(ext)]
    # don't use extensions if the command ends with one of them
    if os.path.splitext(cmd)[1].lower() in pathext:
        pathext = ['']
    # check if we find the command on PATH
    for path in paths:
        # try without extension first
        cmd_path = os.path.join(path, cmd)
        for ext in pathext:
            # then including the extension
            cmd_path_ext = cmd_path + ext
            if os.path.isfile(cmd_path_ext):
                return cmd_path_ext
        if os.path.isfile(cmd_path):
            return cmd_path
    raise BadCommand('Cannot find command %r' % cmd)


def get_pathext(default_pathext=None):
    """Returns the path extensions from environment or a default"""
    if default_pathext is None:
        default_pathext = os.pathsep.join(['.COM', '.EXE', '.BAT', '.CMD'])
    pathext = os.environ.get('PATHEXT', default_pathext)
    return pathext


def ask_path_exists(message, options):
    for action in os.environ.get('PIP_EXISTS_ACTION', '').split():
        if action in options:
            return action
    return ask(message, options)


def ask(message, options):
    """Ask the message interactively, with the given possible responses"""
    while 1:
        if os.environ.get('PIP_NO_INPUT'):
            raise Exception('No input was expected ($PIP_NO_INPUT set); question: %s' % message)
        response = raw_input(message)
        response = response.strip().lower()
        if response not in options:
            print('Your response (%r) was not one of the expected responses: %s' % (
                response, ', '.join(options)))
        else:
            return response


class _Inf(object):
    """I am bigger than everything!"""

    def __eq__(self, other):
        if self is other:
            return True
        else:
            return False

    def __ne__(self, other):
        return not self.__eq__(other)

    def __lt__(self, other):
        return False

    def __le__(self, other):
        return False

    def __gt__(self, other):
        return True

    def __ge__(self, other):
        return True

    def __repr__(self):
        return 'Inf'


Inf = _Inf() #this object is not currently used as a sortable in our code
del _Inf


_normalize_re = re.compile(r'[^a-z]', re.I)


def normalize_name(name):
    return _normalize_re.sub('-', name.lower())


def format_size(bytes):
    if bytes > 1000*1000:
        return '%.1fMB' % (bytes/1000.0/1000)
    elif bytes > 10*1000:
        return '%ikB' % (bytes/1000)
    elif bytes > 1000:
        return '%.1fkB' % (bytes/1000.0)
    else:
        return '%ibytes' % bytes


def is_installable_dir(path):
    """Return True if `path` is a directory containing a setup.py file."""
    if not os.path.isdir(path):
        return False
    setup_py = os.path.join(path, 'setup.py')
    if os.path.isfile(setup_py):
        return True
    return False


def is_svn_page(html):
    """Returns true if the page appears to be the index page of an svn repository"""
    return (re.search(r'<title>[^<]*Revision \d+:', html)
            and re.search(r'Powered by (?:<a[^>]*?>)?Subversion', html, re.I))


def file_contents(filename):
    fp = open(filename, 'rb')
    try:
        return fp.read().decode('utf-8')
    finally:
        fp.close()


def split_leading_dir(path):
    path = str(path)
    path = path.lstrip('/').lstrip('\\')
    if '/' in path and (('\\' in path and path.find('/') < path.find('\\'))
                        or '\\' not in path):
        return path.split('/', 1)
    elif '\\' in path:
        return path.split('\\', 1)
    else:
        return path, ''


def has_leading_dir(paths):
    """Returns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)"""
    common_prefix = None
    for path in paths:
        prefix, rest = split_leading_dir(path)
        if not prefix:
            return False
        elif common_prefix is None:
            common_prefix = prefix
        elif prefix != common_prefix:
            return False
    return True


def make_path_relative(path, rel_to):
    """
    Make a filename relative, where the filename path, and it is
    relative to rel_to

        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/usr/share/another-place/src/Directory')
        '../../../something/a-file.pth'
        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/home/user/src/Directory')
        '../../../usr/share/something/a-file.pth'
        >>> make_relative_path('/usr/share/a-file.pth', '/usr/share/')
        'a-file.pth'
    """
    path_filename = os.path.basename(path)
    path = os.path.dirname(path)
    path = os.path.normpath(os.path.abspath(path))
    rel_to = os.path.normpath(os.path.abspath(rel_to))
    path_parts = path.strip(os.path.sep).split(os.path.sep)
    rel_to_parts = rel_to.strip(os.path.sep).split(os.path.sep)
    while path_parts and rel_to_parts and path_parts[0] == rel_to_parts[0]:
        path_parts.pop(0)
        rel_to_parts.pop(0)
    full_parts = ['..']*len(rel_to_parts) + path_parts + [path_filename]
    if full_parts == ['']:
        return '.' + os.path.sep
    return os.path.sep.join(full_parts)


def normalize_path(path):
    """
    Convert a path to its canonical, case-normalized, absolute version.

    """
    return os.path.normcase(os.path.realpath(os.path.expanduser(path)))


def splitext(path):
    """Like os.path.splitext, but take off .tar too"""
    base, ext = posixpath.splitext(path)
    if base.lower().endswith('.tar'):
        ext = base[-4:] + ext
        base = base[:-4]
    return base, ext


def renames(old, new):
    """Like os.renames(), but handles renaming across devices."""
    # Implementation borrowed from os.renames().
    head, tail = os.path.split(new)
    if head and tail and not os.path.exists(head):
        os.makedirs(head)

    shutil.move(old, new)

    head, tail = os.path.split(old)
    if head and tail:
        try:
            os.removedirs(head)
        except OSError:
            pass


def is_local(path):
    """
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    """
    if not running_under_virtualenv():
        return True
    return normalize_path(path).startswith(normalize_path(sys.prefix))


def dist_is_local(dist):
    """
    Return True if given Distribution object is installed locally
    (i.e. within current virtualenv).

    Always True if we're not in a virtualenv.

    """
    return is_local(dist_location(dist))


def dist_in_usersite(dist):
    """
    Return True if given Distribution is installed in user site.
    """
    if user_site:
        return normalize_path(dist_location(dist)).startswith(normalize_path(user_site))
    else:
        return False

def dist_in_site_packages(dist):
    """
    Return True if given Distribution is installed in distutils.sysconfig.get_python_lib().
    """
    return normalize_path(dist_location(dist)).startswith(normalize_path(site_packages))


def dist_is_editable(dist):
    """Is distribution an editable install?"""
    #TODO: factor out determining editableness out of FrozenRequirement
    from pip import FrozenRequirement
    req = FrozenRequirement.from_dist(dist, [])
    return req.editable

def get_installed_distributions(local_only=True,
                                skip=('setuptools', 'pip', 'python', 'distribute'),
                                include_editables=True,
                                editables_only=False):
    """
    Return a list of installed Distribution objects.

    If ``local_only`` is True (default), only return installations
    local to the current virtualenv, if in a virtualenv.

    ``skip`` argument is an iterable of lower-case project names to
    ignore; defaults to ('setuptools', 'pip', 'python'). [FIXME also
    skip virtualenv?]

    If ``editables`` is False, don't report editables.

    If ``editables_only`` is True , only report editables.

    """
    if local_only:
        local_test = dist_is_local
    else:
        local_test = lambda d: True

    if include_editables:
        editable_test = lambda d: True
    else:
        editable_test = lambda d: not dist_is_editable(d)

    if editables_only:
        editables_only_test = lambda d: dist_is_editable(d)
    else:
        editables_only_test = lambda d: True

    return [d for d in pkg_resources.working_set
            if local_test(d)
            and d.key not in skip
            and editable_test(d)
            and editables_only_test(d)
            ]


def egg_link_path(dist):
    """
    Return the path for the .egg-link file if it exists, otherwise, None.

    There's 3 scenarios:
    1) not in a virtualenv
       try to find in site.USER_SITE, then site_packages
    2) in a no-global virtualenv
       try to find in site_packages
    3) in a yes-global virtualenv
       try to find in site_packages, then site.USER_SITE  (don't look in global location)

    For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations.
    This method will just return the first one found.
    """
    sites = []
    if running_under_virtualenv():
        if virtualenv_no_global():
            sites.append(site_packages)
        else:
            sites.append(site_packages)
            if user_site:
                sites.append(user_site)
    else:
        if user_site:
            sites.append(user_site)
        sites.append(site_packages)

    for site in sites:
        egglink = os.path.join(site, dist.project_name) + '.egg-link'
        if os.path.isfile(egglink):
            return egglink


def dist_location(dist):
    """
    Get the site-packages location of this distribution. Generally
    this is dist.location, except in the case of develop-installed
    packages, where dist.location is the source code location, and we
    want to know where the egg-link file is.

    """
    egg_link = egg_link_path(dist)
    if egg_link:
        return egg_link
    return dist.location


def get_terminal_size():
    """Returns a tuple (x, y) representing the width(x) and the height(x)
    in characters of the terminal window."""
    def ioctl_GWINSZ(fd):
        try:
            import fcntl
            import termios
            import struct
            cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ,
        '1234'))
        except:
            return None
        if cr == (0, 0):
            return None
        if cr == (0, 0):
            return None
        return cr
    cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2)
    if not cr:
        try:
            fd = os.open(os.ctermid(), os.O_RDONLY)
            cr = ioctl_GWINSZ(fd)
            os.close(fd)
        except:
            pass
    if not cr:
        cr = (os.environ.get('LINES', 25), os.environ.get('COLUMNS', 80))
    return int(cr[1]), int(cr[0])


def current_umask():
    """Get the current umask which involves having to set it temporarily."""
    mask = os.umask(0)
    os.umask(mask)
    return mask


def unzip_file(filename, location, flatten=True):
    """
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    """
    if not os.path.exists(location):
        os.makedirs(location)
    zipfp = open(filename, 'rb')
    try:
        zip = zipfile.ZipFile(zipfp)
        leading = has_leading_dir(zip.namelist()) and flatten
        for info in zip.infolist():
            name = info.filename
            data = zip.read(name)
            fn = name
            if leading:
                fn = split_leading_dir(name)[1]
            fn = os.path.join(location, fn)
            dir = os.path.dirname(fn)
            if not os.path.exists(dir):
                os.makedirs(dir)
            if fn.endswith('/') or fn.endswith('\\'):
                # A directory
                if not os.path.exists(fn):
                    os.makedirs(fn)
            else:
                fp = open(fn, 'wb')
                try:
                    fp.write(data)
                finally:
                    fp.close()
                    mode = info.external_attr >> 16
                    # if mode and regular file and any execute permissions for user/group/world?
                    if mode and stat.S_ISREG(mode) and  mode & 0o111:
                        # make dest file have execute for user/group/world (chmod +x)
                        # no-op on windows per python docs
                        os.chmod(fn, (0o777-current_umask() | 0o111))
    finally:
        zipfp.close()


def untar_file(filename, location):
    """
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    """
    if not os.path.exists(location):
        os.makedirs(location)
    if filename.lower().endswith('.gz') or filename.lower().endswith('.tgz'):
        mode = 'r:gz'
    elif filename.lower().endswith('.bz2') or filename.lower().endswith('.tbz'):
        mode = 'r:bz2'
    elif filename.lower().endswith('.tar'):
        mode = 'r'
    else:
        logger.warn('Cannot determine compression type for file %s' % filename)
        mode = 'r:*'
    tar = tarfile.open(filename, mode)
    try:
        # note: python<=2.5 doesnt seem to know about pax headers, filter them
        leading = has_leading_dir([
            member.name for member in tar.getmembers()
            if member.name != 'pax_global_header'
        ])
        for member in tar.getmembers():
            fn = member.name
            if fn == 'pax_global_header':
                continue
            if leading:
                fn = split_leading_dir(fn)[1]
            path = os.path.join(location, fn)
            if member.isdir():
                if not os.path.exists(path):
                    os.makedirs(path)
            elif member.issym():
                try:
                    tar._extract_member(member, path)
                except:
                    e = sys.exc_info()[1]
                    # Some corrupt tar files seem to produce this
                    # (specifically bad symlinks)
                    logger.warn(
                        'In the tar file %s the member %s is invalid: %s'
                        % (filename, member.name, e))
                    continue
            else:
                try:
                    fp = tar.extractfile(member)
                except (KeyError, AttributeError):
                    e = sys.exc_info()[1]
                    # Some corrupt tar files seem to produce this
                    # (specifically bad symlinks)
                    logger.warn(
                        'In the tar file %s the member %s is invalid: %s'
                        % (filename, member.name, e))
                    continue
                if not os.path.exists(os.path.dirname(path)):
                    os.makedirs(os.path.dirname(path))
                destfp = open(path, 'wb')
                try:
                    shutil.copyfileobj(fp, destfp)
                finally:
                    destfp.close()
                fp.close()
                # member have any execute permissions for user/group/world?
                if member.mode & 0o111:
                    # make dest file have execute for user/group/world
                    # no-op on windows per python docs
                    os.chmod(path, (0o777-current_umask() | 0o111))
    finally:
        tar.close()


def create_download_cache_folder(folder):
    logger.indent -= 2
    logger.notify('Creating supposed download cache at %s' % folder)
    logger.indent += 2
    os.makedirs(folder)


def cache_download(target_file, temp_location, content_type):
    logger.notify('Storing download in cache at %s' % display_path(target_file))
    shutil.copyfile(temp_location, target_file)
    fp = open(target_file+'.content-type', 'w')
    fp.write(content_type)
    fp.close()


def unpack_file(filename, location, content_type, link):
    filename = os.path.realpath(filename)
    if (content_type == 'application/zip'
        or filename.endswith('.zip')
        or filename.endswith('.pybundle')
        or filename.endswith('.whl')
        or zipfile.is_zipfile(filename)):
        unzip_file(filename, location, flatten=not filename.endswith(('.pybundle', '.whl')))
    elif (content_type == 'application/x-gzip'
          or tarfile.is_tarfile(filename)
          or splitext(filename)[1].lower() in ('.tar', '.tar.gz', '.tar.bz2', '.tgz', '.tbz')):
        untar_file(filename, location)
    elif (content_type and content_type.startswith('text/html')
          and is_svn_page(file_contents(filename))):
        # We don't really care about this
        from pip.vcs.subversion import Subversion
        Subversion('svn+' + link.url).unpack(location)
    else:
        ## FIXME: handle?
        ## FIXME: magic signatures?
        logger.fatal('Cannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive format'
                     % (filename, location, content_type))
        raise InstallationError('Cannot determine archive format of %s' % location)


def call_subprocess(cmd, show_stdout=True,
                    filter_stdout=None, cwd=None,
                    raise_on_returncode=True,
                    command_level=logger.DEBUG, command_desc=None,
                    extra_environ=None):
    if command_desc is None:
        cmd_parts = []
        for part in cmd:
            if ' ' in part or '\n' in part or '"' in part or "'" in part:
                part = '"%s"' % part.replace('"', '\\"')
            cmd_parts.append(part)
        command_desc = ' '.join(cmd_parts)
    if show_stdout:
        stdout = None
    else:
        stdout = subprocess.PIPE
    logger.log(command_level, "Running command %s" % command_desc)
    env = os.environ.copy()
    if extra_environ:
        env.update(extra_environ)
    try:
        proc = subprocess.Popen(
            cmd, stderr=subprocess.STDOUT, stdin=None, stdout=stdout,
            cwd=cwd, env=env)
    except Exception:
        e = sys.exc_info()[1]
        logger.fatal(
            "Error %s while executing command %s" % (e, command_desc))
        raise
    all_output = []
    if stdout is not None:
        stdout = proc.stdout
        while 1:
            line = console_to_str(stdout.readline())
            if not line:
                break
            line = line.rstrip()
            all_output.append(line + '\n')
            if filter_stdout:
                level = filter_stdout(line)
                if isinstance(level, tuple):
                    level, line = level
                logger.log(level, line)
                if not logger.stdout_level_matches(level):
                    logger.show_progress()
            else:
                logger.info(line)
    else:
        returned_stdout, returned_stderr = proc.communicate()
        all_output = [returned_stdout or '']
    proc.wait()
    if proc.returncode:
        if raise_on_returncode:
            if all_output:
                logger.notify('Complete output from command %s:' % command_desc)
                logger.notify('\n'.join(all_output) + '\n----------------------------------------')
            raise InstallationError(
                "Command %s failed with error code %s in %s"
                % (command_desc, proc.returncode, cwd))
        else:
            logger.warn(
                "Command %s had error code %s in %s"
                % (command_desc, proc.returncode, cwd))
    if stdout is not None:
        return ''.join(all_output)


def is_prerelease(vers):
    """
    Attempt to determine if this is a pre-release using PEP386/PEP426 rules.

    Will return True if it is a pre-release and False if not. Versions are
    assumed to be a pre-release if they cannot be parsed.
    """
    normalized = version._suggest_normalized_version(vers)

    if normalized is None:
        # Cannot normalize, assume it is a pre-release
        return True

    parsed = version._normalized_key(normalized)
    return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])


class BuildDirectory(object):

    def __init__(self, name=None, delete=None):
        # If we were not given an explicit directory, and we were not given an
        # explicit delete option, then we'll default to deleting.
        if name is None and delete is None:
            delete = True

        if name is None:
            name = tempfile.mkdtemp(prefix="pip-build-")
            # If we were not given an explicit directory, and we were not given
            # an explicit delete option, then we'll default to deleting.
            if delete is None:
                delete = True

        self.name = name
        self.delete = delete

    def __repr__(self):
        return "<{} {!r}>".format(self.__class__.__name__, self.name)

    def __enter__(self):
        return self.name

    def __exit__(self, exc, value, tb):
        self.cleanup()

    def cleanup(self):
        if self.delete:
            rmtree(self.name)
python3.4/site-packages/pip/vcs/bazaar.py000064400000011517151735050000014230 0ustar00import os
import tempfile
import re
from pip.backwardcompat import urlparse
from pip.log import logger
from pip.util import rmtree, display_path, call_subprocess
from pip.vcs import vcs, VersionControl
from pip.download import path_to_url


class Bazaar(VersionControl):
    name = 'bzr'
    dirname = '.bzr'
    repo_name = 'branch'
    bundle_file = 'bzr-branch.txt'
    schemes = ('bzr', 'bzr+http', 'bzr+https', 'bzr+ssh', 'bzr+sftp', 'bzr+ftp', 'bzr+lp')
    guide = ('# This was a Bazaar branch; to make it a branch again run:\n'
             'bzr branch -r %(rev)s %(url)s .\n')

    def __init__(self, url=None, *args, **kwargs):
        super(Bazaar, self).__init__(url, *args, **kwargs)
        # Python >= 2.7.4, 3.3 doesn't have uses_fragment or non_hierarchical
        # Register lp but do not expose as a scheme to support bzr+lp.
        if getattr(urlparse, 'uses_fragment', None):
            urlparse.uses_fragment.extend(['lp'])
            urlparse.non_hierarchical.extend(['lp'])

    def parse_vcs_bundle_file(self, content):
        url = rev = None
        for line in content.splitlines():
            if not line.strip() or line.strip().startswith('#'):
                continue
            match = re.search(r'^bzr\s*branch\s*-r\s*(\d*)', line)
            if match:
                rev = match.group(1).strip()
            url = line[match.end():].strip().split(None, 1)[0]
            if url and rev:
                return url, rev
        return None, None

    def export(self, location):
        """Export the Bazaar repository at the url to the destination location"""
        temp_dir = tempfile.mkdtemp('-export', 'pip-')
        self.unpack(temp_dir)
        if os.path.exists(location):
            # Remove the location to make sure Bazaar can export it correctly
            rmtree(location)
        try:
            call_subprocess([self.cmd, 'export', location], cwd=temp_dir,
                            filter_stdout=self._filter, show_stdout=False)
        finally:
            rmtree(temp_dir)

    def switch(self, dest, url, rev_options):
        call_subprocess([self.cmd, 'switch', url], cwd=dest)

    def update(self, dest, rev_options):
        call_subprocess(
            [self.cmd, 'pull', '-q'] + rev_options, cwd=dest)

    def obtain(self, dest):
        url, rev = self.get_url_rev()
        if rev:
            rev_options = ['-r', rev]
            rev_display = ' (to revision %s)' % rev
        else:
            rev_options = []
            rev_display = ''
        if self.check_destination(dest, url, rev_options, rev_display):
            logger.notify('Checking out %s%s to %s'
                          % (url, rev_display, display_path(dest)))
            call_subprocess(
                [self.cmd, 'branch', '-q'] + rev_options + [url, dest])

    def get_url_rev(self):
        # hotfix the URL scheme after removing bzr+ from bzr+ssh:// readd it
        url, rev = super(Bazaar, self).get_url_rev()
        if url.startswith('ssh://'):
            url = 'bzr+' + url
        return url, rev

    def get_url(self, location):
        urls = call_subprocess(
            [self.cmd, 'info'], show_stdout=False, cwd=location)
        for line in urls.splitlines():
            line = line.strip()
            for x in ('checkout of branch: ',
                      'parent branch: '):
                if line.startswith(x):
                    repo = line.split(x)[1]
                    if self._is_local_repository(repo):
                        return path_to_url(repo)
                    return repo
        return None

    def get_revision(self, location):
        revision = call_subprocess(
            [self.cmd, 'revno'], show_stdout=False, cwd=location)
        return revision.splitlines()[-1]

    def get_tag_revs(self, location):
        tags = call_subprocess(
            [self.cmd, 'tags'], show_stdout=False, cwd=location)
        tag_revs = []
        for line in tags.splitlines():
            tags_match = re.search(r'([.\w-]+)\s*(.*)$', line)
            if tags_match:
                tag = tags_match.group(1)
                rev = tags_match.group(2)
                tag_revs.append((rev.strip(), tag.strip()))
        return dict(tag_revs)

    def get_src_requirement(self, dist, location, find_tags):
        repo = self.get_url(location)
        if not repo.lower().startswith('bzr:'):
            repo = 'bzr+' + repo
        egg_project_name = dist.egg_name().split('-', 1)[0]
        if not repo:
            return None
        current_rev = self.get_revision(location)
        tag_revs = self.get_tag_revs(location)

        if current_rev in tag_revs:
            # It's a tag
            full_egg_name = '%s-%s' % (egg_project_name, tag_revs[current_rev])
        else:
            full_egg_name = '%s-dev_r%s' % (dist.egg_name(), current_rev)
        return '%s@%s#egg=%s' % (repo, current_rev, full_egg_name)


vcs.register(Bazaar)
python3.4/site-packages/pip/vcs/__pycache__/bazaar.cpython-34.pyc000064400000011500151735050000020502 0ustar00�
�ReO�@s�ddlZddlZddlZddlmZddlmZddlmZm	Z	m
Z
ddlmZm
Z
ddlmZGdd�de
�Zeje�dS)	�N)�urlparse)�logger)�rmtree�display_path�call_subprocess)�vcs�VersionControl)�path_to_urlcs�eZdZdZdZdZdZd#ZdZd�fd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Z�fdd�Zdd�Zdd�Zdd �Zd!d"�Z�S)$�Bazaar�bzrz.bzr�branchzbzr-branch.txt�bzr+http�	bzr+https�bzr+ssh�bzr+sftp�bzr+ftp�bzr+lpz[# This was a Bazaar branch; to make it a branch again run:
bzr branch -r %(rev)s %(url)s .
Ncs[tt|�j|||�ttdd�rWtjjdg�tjjdg�ndS)N�
uses_fragment�lp)�superr
�__init__�getattrrr�extend�non_hierarchical)�self�url�args�kwargs)�	__class__��)/tmp/pip-ztkk0jow-build/pip/vcs/bazaar.pyrszBazaar.__init__cCs�d}}x�|j�D]�}|j�s|j�jd�rEqntjd|�}|ru|jd�j�}n||j�d�j�jdd�d}|r|r||fSqWdS)N�#z^bzr\s*branch\s*-r\s*(\d*)�r)NN)�
splitlines�strip�
startswith�re�search�group�end�split)r�contentr�rev�line�matchrrr �parse_vcs_bundle_files
",zBazaar.parse_vcs_bundle_filecCstjdd�}|j|�tjj|�r>t|�nz/t|jd|gd|d|j	dd�Wdt|�XdS)	zCExport the Bazaar repository at the url to the destination locationz-exportzpip-�export�cwd�
filter_stdout�show_stdoutFN)
�tempfile�mkdtemp�unpack�os�path�existsrr�cmd�_filter)r�location�temp_dirrrr r0)s

z
Bazaar.exportcCs t|jd|gd|�dS)N�switchr1)rr:)r�destr�rev_optionsrrr r>6sz
Bazaar.switchcCs$t|jddg|d|�dS)N�pullz-qr1)rr:)rr?r@rrr �update9sz
Bazaar.updatecCs�|j�\}}|r1d|g}d|}ng}d}|j||||�r�tjd||t|�f�t|jddg|||g�ndS)Nz-rz (to revision %s)�zChecking out %s%s to %srz-q)�get_url_rev�check_destinationr�notifyrrr:)rr?rr,r@�rev_displayrrr �obtain=s
	z
Bazaar.obtaincsAtt|�j�\}}|jd�r7d|}n||fS)Nzssh://zbzr+)rr
rDr%)rrr,)rrr rDKs
zBazaar.get_url_revcCs�t|jdgddd|�}xp|j�D]b}|j�}xMdD]E}|j|�rG|j|�d}|j|�r�t|�S|SqGWq.WdS)	N�infor3Fr1�checkout of branch: �parent branch: r")rJrK)rr:r#r$r%r*�_is_local_repositoryr	)rr<�urlsr-�x�reporrr �get_urlRs

zBazaar.get_urlcCs/t|jdgddd|�}|j�dS)N�revnor3Fr1r"���)rr:r#)rr<�revisionrrr �get_revision`szBazaar.get_revisioncCs�t|jdgddd|�}g}xl|j�D]^}tjd|�}|r4|jd�}|jd�}|j|j�|j�f�q4q4Wt|�S)N�tagsr3Fr1z([.\w-]+)\s*(.*)$r"�)	rr:r#r&r'r(�appendr$�dict)rr<rU�tag_revsr-�
tags_match�tagr,rrr �get_tag_revses&zBazaar.get_tag_revsc	Cs�|j|�}|j�jd�s1d|}n|j�jdd�d}|sWdS|j|�}|j|�}||kr�d|||f}nd|j�|f}d|||fS)	Nzbzr:zbzr+�-r"rz%s-%sz
%s-dev_r%sz%s@%s#egg=%s)rP�lowerr%�egg_namer*rTr\)	r�distr<�	find_tagsrO�egg_project_name�current_revrY�
full_egg_namerrr �get_src_requirementqs
zBazaar.get_src_requirement)zbzrr
rrrrr)�__name__�
__module__�__qualname__�name�dirname�	repo_name�bundle_file�schemes�guiderr/r0r>rBrHrDrPrTr\rerr)rr r
s"

r
)r7r4r&Zpip.backwardcompatr�pip.logr�pip.utilrrr�pip.vcsrr�pip.downloadr	r
�registerrrrr �<module>sxpython3.4/site-packages/pip/vcs/__pycache__/mercurial.cpython-34.pyc000064400000013032151735050000021227 0ustar00�
�Re��@s�ddlZddlZddlZddlZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZGdd	�d	e�Zeje�dS)
�N)�call_subprocess)�display_path�rmtree)�logger)�vcs�VersionControl)�path_to_url)�ConfigParserc@s�eZdZdZdZdZd!ZdZd	Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd S)"�	Mercurial�hgz.hg�clone�hg+http�hg+https�hg+ssh�hg+static-httpzhg-clone.txtzg# This was a Mercurial repo; to make it a repo again run:
hg init
hg pull %(url)s
hg update -r %(rev)s
cCs�d}}x�|j�D]�}|j�s|j�jd�rEqntjd|�}|ru|jd�j�}ntjd|�}|r�|jd�j�}n|r|r||fSqWdS)N�#zhg\s*pull\s*(.*)\s*�z^hg\s*update\s*-r\s*(.*)\s*)NN)�
splitlines�strip�
startswith�re�search�group)�self�content�url�rev�line�	url_match�	rev_match�r �,/tmp/pip-ztkk0jow-build/pip/vcs/mercurial.py�parse_vcs_bundle_files
"zMercurial.parse_vcs_bundle_filecCs`tjdd�}|j|�z/t|jd|gd|jddd|�Wdt|�XdS)	z?Export the Hg repository at the url to the destination locationz-exportzpip-�archive�
filter_stdout�show_stdoutF�cwdN)�tempfile�mkdtemp�unpackr�cmd�_filterr)r�location�temp_dirr r r!�export%s
zMercurial.exportcCs�tjj||jd�}tj�}yJ|j|�|jdd|�t|d�}|j	|�|j
�WnBttjfk
r�t
j�d}tjd||f�Yn!Xt|jddg|d	|�dS)
N�hgrc�paths�default�wrz/Could not switch Mercurial repository to %s: %s�updatez-qr&)�os�path�join�dirnamer	�SafeConfigParser�read�set�open�write�close�OSError�NoSectionError�sys�exc_infor�warnrr*)r�destr�rev_options�repo_config�config�config_file�er r r!�switch0s

zMercurial.switchcCs@t|jddgd|�t|jddg|d|�dS)N�pullz-qr&r3)rr*)rrCrDr r r!r3AszMercurial.updatecCs�|j�\}}|r.|g}d|}ng}d}|j||||�r�tjd||t|�f�t|jddd||g�t|jddg|d|�ndS)	Nz (to revision %s)�zCloning hg %s%s to %srz
--noupdatez-qr3r&)�get_url_rev�check_destinationr�notifyrrr*)rrCrrrD�rev_displayr r r!�obtainFs	
	zMercurial.obtaincCsRt|jddgddd|�j�}|j|�rHt|�}n|j�S)N�
showconfigz
paths.defaultr%Fr&)rr*r�_is_local_repositoryr)rr,rr r r!�get_urlTszMercurial.get_urlcCs�t|jdgddd|�}g}x{|j�D]m}tjd|�}|r4|jd�}|jd�}d|kr�|j|j�|j�f�q�q4q4Wt|�S)	N�tagsr%Fr&z([\w\d\.-]+)\s*([\d]+):.*$r��tip)	rr*rrrr�appendr�dict)rr,rT�tag_revsr�
tags_match�tagrr r r!�get_tag_revs\s)zMercurial.get_tag_revscCs�t|jdgddd|�}g}x{|j�D]m}tjd|�}|r4|jd�}|jd�}d|kr�|j|j�|j�f�q�q4q4Wt|�S)	N�branchesr%Fr&z([\w\d\.-]+)\s*([\d]+):.*$rrUr1)	rr*rrrrrWrrX)rr,r]�branch_revsr�branches_match�branchrr r r!�get_branch_revsis)zMercurial.get_branch_revscCs.t|jddgddd|�j�}|S)N�parentsz--template={rev}r%Fr&)rr*r)rr,�current_revisionr r r!�get_revisionvszMercurial.get_revisioncCs.t|jddgddd|�j�}|S)Nrbz--template={node}r%Fr&)rr*r)rr,�current_rev_hashr r r!�get_revision_hash|szMercurial.get_revision_hashcCs�|j|�}|j�jd�s1d|}n|j�jdd�d}|sWdS|j|�}|j|�}|j|�}|j|�}	||kr�d|||f}
n-||	kr�d||	|f}
n
d|}
d|||
fS)	Nzhg:zhg+�-rrz%s-%sz%s-devz%s@%s#egg=%s)	rS�lowerr�egg_name�splitrdrfr\ra)r�distr,�	find_tags�repo�egg_project_name�current_revrerYr^�
full_egg_namer r r!�get_src_requirement�s 

zMercurial.get_src_requirementN)zhgr
rrr)�__name__�
__module__�__qualname__�namer7�	repo_name�schemes�bundle_file�guider"r.rIr3rPrSr\rardrfrqr r r r!r

s"

r
)r4r'rr@�pip.utilrrr�pip.logr�pip.vcsrr�pip.downloadrZpip.backwardcompatr	r
�registerr r r r!�<module>s�python3.4/site-packages/pip/vcs/__pycache__/__init__.cpython-34.pyc000064400000022377151735050000021017 0ustar00�
�Re,"�@s�dZddlZddlZddlmZmZddlmZddlm	Z	m
Z
mZmZm
Z
ddgZGdd	�d	e�Ze�ZGd
d�de�Zdd�ZdS)
z)Handles all VCS (version control) support�N)�urlparse�urllib)�logger)�display_path�
backup_dir�find_command�rmtree�ask_path_exists�vcs�get_src_requirementcs�eZdZiZddddddgZ�fdd�Zd	d
�Zedd��Zed
d��Z	edd��Z
dd�Zdddd�Zdd�Z
dd�Zdd�Z�S)�
VcsSupport�ssh�git�hg�bzr�sftp�svncsRtjj|j�ttdd�r;tjj|j�ntt|�j�dS)N�
uses_fragment)	r�uses_netloc�extend�schemes�getattrr�superr�__init__)�self)�	__class__��+/tmp/pip-ztkk0jow-build/pip/vcs/__init__.pyrszVcsSupport.__init__cCs
|jj�S)N)�	_registry�__iter__)rrrrrszVcsSupport.__iter__cCst|jj��S)N)�listr�values)rrrr�backendsszVcsSupport.backendscCsdd�|jD�S)NcSsg|]}|j�qSr)�dirname)�.0�backendrrr�
<listcomp>$s	z'VcsSupport.dirnames.<locals>.<listcomp>)r")rrrr�dirnames"szVcsSupport.dirnamescCs.g}x!|jD]}|j|j�qW|S)N)r"rr)rrr%rrr�all_schemes&szVcsSupport.all_schemescCsPt|d�s'tjd|j�dS|j|jkrL||j|j<ndS)N�namezCannot register VCS %s)�hasattrr�warn�__name__r)r)r�clsrrr�register-s
zVcsSupport.registerNcCsR||jkr|j|=n2||jj�krA|j|j=n
tjd�dS)Nz0Cannot unregister because no class or name given)rr!r)rr+)rr-r)rrr�
unregister4s

zVcsSupport.unregistercCsOxH|jj�D]7}tjj||j�}tjj|�r|jSqWdS)z�
        Return the name of the version control backend if found at given
        location, e.g. vcs.get_backend_name('/path/to/vcs/checkout')
        N)rr!�os�path�joinr#�existsr))r�location�vc_typer1rrr�get_backend_name<s
zVcsSupport.get_backend_namecCs*|j�}||jkr&|j|SdS)N)�lowerr)rr)rrr�get_backendGszVcsSupport.get_backendcCs&|j|�}|r"|j|�SdS)N)r6r8)rr4r5rrr�get_backend_from_locationLs
z$VcsSupport.get_backend_from_location)r,�
__module__�__qualname__rrrr�propertyr"r'r(r.r/r6r8r9rr)rrrsrcs�eZdZdZdZd�fdd�Zdd�Zdd�Zed	d
��Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd d!�Z�S)"�VersionControl�Ncs/||_d|_tt|�j||�dS)N)�url�_cmdrr=r)rr?�args�kwargs)rrrrZs		zVersionControl.__init__cCs
tj|fS)N)r�INFO)r�linerrr�_filter_szVersionControl._filtercCs1tjj|�\}}|jtjj�p0|S)z~
           posix absolute paths start with os.path.sep,
           win32 ones ones start with drive (like c:\folder)
        )r0r1�
splitdrive�
startswith�sep)r�repo�drive�tailrrr�_is_local_repositorybsz#VersionControl._is_local_repositorycCsL|jdk	r|jSt|j�}tjd|j|f�||_|S)NzFound command %r at %r)r@rr)r�info)r�commandrrr�cmdjs	zVersionControl.cmdc	Cs�d}d|jks(t||j��|jjdd�d}tj|�\}}}}}d}d|kr�|jdd�\}}ntj||||df�}||fS)zm
        Returns the correct repository URL and revision by parsing the given
        repository URL
        zvSorry, '%s' is a malformed VCS url. The format is <vcs>+<protocol>://<url>, e.g. svn+http://myrepo/svn/MyApp#egg=MyApp�+�N�@r>)r?�AssertionError�splitr�urlsplit�rsplit�
urlunsplit)	r�
error_messager?�scheme�netlocr1�query�frag�revrrr�get_url_revss"zVersionControl.get_url_revcCsH|jd�j|j�s,td|��|j|�|j|�fS)zA
        Returns (url, revision), where both are strings
        �/zBad directory: %s)�rstrip�endswithr#rS�get_url�get_revision)rr4rrr�get_info�s,zVersionControl.get_infocCstj|�jd�S)za
        Normalize a URL for comparison by unquoting it and removing any trailing slash.
        r_)r�unquoter`)rr?rrr�
normalize_url�szVersionControl.normalize_urlcCs|j|�|j|�kS)zV
        Compare two repo URLs for identity, ignoring incidental differences.
        )rf)r�url1�url2rrr�compare_urls�szVersionControl.compare_urlscCs
t�dS)z�
        Takes the contents of the bundled text file that explains how to revert
        the stripped off version control data of the given package and returns
        the URL and revision of it.
        N)�NotImplementedError)r�contentrrr�parse_vcs_bundle_file�sz$VersionControl.parse_vcs_bundle_filecCs
t�dS)zx
        Called when installing or updating an editable package, takes the
        source path of the checkout.
        N)rj)r�destrrr�obtain�szVersionControl.obtaincCs
t�dS)zB
        Switch the repo at ``dest`` to point to ``URL``.
        N)�NotImplemented)rrmr?�rev_optionsrrr�switch�szVersionControl.switchcCs
t�dS)zO
        Update an already-existing repo to the given ``rev_options``.
        N)rj)rrmrprrr�update�szVersionControl.updatec
Cs@d}d}tjj|�r#d}tjjtjj||j��r�|j|�}|j||�r�tjd|j	j
�t|�|f�tjdt|�|j	|f�|j
||�q tjd|j|j	t|�|f�d}q#tjd||j|j	f�d}n|r<tjd
|j|f�td|d|d�}|dkr�tjd|j	t|�||f�|j|||�q<|dkr�q<|d	kr�tjdt|��t|�d}q<|d
kr<t|�}	tjdt|�|	f�tj||	�d}q<n|S)z�
        Prepare a location to receive a checkout/clone.

        Return True if the location is ready for (and requires) a
        checkout/clone, False otherwise.
        TFz)%s in %s exists, and has correct URL (%s)zUpdating %s %s%sz%s %s in %s exists with URL %s�%(s)witch, (i)gnore, (w)ipe, (b)ackup �s�i�w�bz0Directory %s already exists, and is not a %s %s.�(i)gnore, (w)ipe, (b)ackup z+The plan is to install the %s repository %szWhat to do?  %srrQzSwitching %s %s to %s%szDeleting %szBacking up %s to %s�rtrurvrw)rsry�rurvrw)rxrz)r0r1r3r2r#rbrirrM�	repo_name�titler�notifyrrr+r)r	rqrr�shutil�move)
rrmr?rp�rev_display�checkout�prompt�existing_url�response�dest_dirrrr�check_destination�sZ$							
	
		z VersionControl.check_destinationcCs0tjj|�rt|�n|j|�dS)N)r0r1r3rrn)rr4rrr�unpack�s
zVersionControl.unpackFcCs
t�dS)N)rj)r�distr4�	find_tagsrrrr�sz"VersionControl.get_src_requirement)r,r:r;r)r#rrErLr<rOr^rdrfrirlrnrqrrr�r�rrr)rrr=Vs"	:r=cCsFtj|�}|r+|�j|||�Stjd|�|j�S)Nztcannot determine version of editable source in %s (is not SVN checkout, Git clone, Mercurial clone or Bazaar branch))r
r9rrr+�as_requirement)r�r4r��version_controlrrrr�s
)�__doc__r0r~Zpip.backwardcompatrr�pip.logr�pip.utilrrrrr	�__all__�objectrr
r=rrrrr�<module>s(D	�python3.4/site-packages/pip/vcs/__pycache__/git.cpython-34.pyc000064400000015660151735050000020040 0ustar00�
�Re��@s�ddlZddlZddlZddlmZddlmZmZddlm	Z	m
Z
ddlmZddl
mZmZejZejZGdd�de
�Ze	je�dS)	�N)�call_subprocess)�display_path�rmtree)�vcs�VersionControl)�logger)�url2pathname�urlparsecs�eZdZdZdZdZd&Zd	Zd
Zd�fdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Z�fd"d#�Zd$d%�Z�S)'�Git�gitz.git�clone�git+http�	git+https�git+ssh�git+git�git+filez
git-clone.txtzs# This was a Git repo; to make it a repo again run:
git init
git remote add origin %(url)s -f
git checkout %(rev)s
Ncs�|r�t|�\}}}}}|jd�r�|dt|jd���}	|	t|�jdd�jd�}
t|||
||f�}|jd�d}|d|�t||d�||
||f�}q�ntt	|�j
|||�dS)N�file�/�\�+�)�urlsplit�endswith�len�lstripr�replace�
urlunsplit�find�superr
�__init__)�self�url�args�kwargs�scheme�netloc�path�query�fragment�initial_slashes�newpath�
after_plus)�	__class__��&/tmp/pip-ztkk0jow-build/pip/vcs/git.pyrs %9zGit.__init__cCs�d}}x�|j�D]�}|j�s|j�jd�rEqntjd|�}|ru|jd�j�}ntjd|�}|r�|jd�j�}n|r|r||fSqWdS)N�#z$git\s*remote\s*add\s*origin(.*)\s*-frz^git\s*checkout\s*-q\s*(.*)\s*)NN)�
splitlines�strip�
startswith�re�search�group)r �contentr!�rev�line�	url_match�	rev_matchr-r-r.�parse_vcs_bundle_file%s
"zGit.parse_vcs_bundle_filecCs�tjdd�}|j|�zT|jd�s>|d}nt|jdddd|gd|jd	d
d|�Wdt|�XdS)
z@Export the Git repository at the url to the destination locationz-exportzpip-rzcheckout-indexz-az-fz--prefix�
filter_stdout�show_stdoutF�cwdN)�tempfile�mkdtemp�unpackrr�cmd�_filterr)r �location�temp_dirr-r-r.�export4s

z
Git.exportcCs`|j|�}d|}||kr0||gS||krG||gStjd|�|SdS)z�Check the revision options before checkout to compensate that tags
        and branches may need origin/ as a prefix.
        Returns the SHA1 of the branch or tag if found.
        z	origin/%sz5Could not find a tag or branch '%s', assuming commit.N)�get_refsr�warn)r r7�dest�rev_options�	revisions�
origin_revr-r-r.�check_rev_optionsAs
zGit.check_rev_optionscCsPt|jdd|gd|�t|jddg|d|�|j|�dS)N�configzremote.origin.urlr>�checkoutz-q)rrB�update_submodules)r rIr!rJr-r-r.�switchSs
z
Git.switchcCsrt|jddgd|�|r>|j|d||�}nt|jdddg|d|�|j|�dS)N�fetchz-qr>r�resetz--hard)rrBrMrP)r rIrJr-r-r.�update[s
#z
Git.updatecCs|j�\}}|r.|g}d|}ndg}d}|j||||�r�tjd||t|�f�t|jdd||g�|j|�|r�|j|||�}|j	|�j
|d�s�t|jddg|d	|�q�q�ndS)
Nz (to %s)z
origin/master�zCloning %s%s to %srz-qrrOr>)�get_url_rev�check_destinationr�notifyrrrBrPrM�get_revisionr2)r rIr!r7rJ�rev_displayr-r-r.�obtaines	
	 
z
Git.obtaincCs.t|jddgddd|�}|j�S)NrNzremote.origin.urlr=Fr>)rrBr1)r rDr!r-r-r.�get_urlxszGit.get_urlcCs.t|jddgddd|�}|j�S)Nz	rev-parse�HEADr=Fr>)rrBr1)r rD�current_revr-r-r.rY~s!zGit.get_revisioncCs	t|jdgddd|�}i}x�|j�j�D]�}|jdd�\}}|j�}d}|jd�r�|td�d�}nP|jd	�r�|td	�d�}n(|jd
�r�|td
�d�}n|dk	r:|j�||<q:q:W|S)z=Return map of named refs (branches or tags) to commit hashes.zshow-refr=Fr>� rNz
refs/remotes/zrefs/heads/z
refs/tags/)rrBr1r0�splitr2r)r rD�output�rvr8�commit�ref�ref_namer-r-r.rG�s zGit.get_refsc
Cs�|j|�}|j�jd�s1d|}n|j�jdd�d}|sWdS|j|�}|j|�}tdd�|j�D��}||kr�d|||f}	n
d	|}	d
|||	fS)Nzgit:zgit+�-rrcss!|]\}}||fVqdS)Nr-)�.0rdrcr-r-r.�	<genexpr>�sz*Git.get_src_requirement.<locals>.<genexpr>z%s-%sz%s-devz%s@%s#egg=%s)	r\�lowerr2�egg_namer`rYrG�dict�items)
r �distrD�	find_tags�repo�egg_project_namer^�refs�names_by_commit�
full_egg_namer-r-r.�get_src_requirement�s

zGit.get_src_requirementcs�d|jkrld|jks$t�|jjdd�|_tt|�j�\}}|jdd�}ntt|�j�\}}||fS)a;
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes doesn't
        work with a ssh:// scheme (e.g. Github). But we need a scheme for
        parsing. Hence we remove it again afterwards and return it as a stub.
        z://zfile:zgit+z
git+ssh://zssh://rU)r!�AssertionErrorrrr
rV)r r!r7)r,r-r.rV�szGit.get_url_revcCsNtjjtjj|d��s%dSt|jdddddgd|�dS)Nz.gitmodules�	submodulerTz--initz--recursivez-qr>)�osr&�exists�joinrrB)r rDr-r-r.rP�s!zGit.update_submodules)zgitr
rrrr)�__name__�
__module__�__qualname__�name�dirname�	repo_name�schemes�bundle_file�guiderr;rFrMrQrTr[r\rYrGrtrVrPr-r-)r,r.r

s&

r
)r?r3�os.pathrw�pip.utilrrr�pip.vcsrr�pip.logrZpip.backwardcompatrr	rrr
�registerr-r-r-r.�<module>s		�python3.4/site-packages/pip/vcs/__pycache__/subversion.cpython-34.pyc000064400000021705151735050000021451 0ustar00�
�Re�)�@sddlZddlZddlmZddlmZddlmZmZm	Z	ddl
mZddlm
Z
mZejd�Zejd�Zejd	�Zejd
�Zejd�Zejd�ZGd
d�de�Zdd�Ze
je�dS)�N)�urlparse)�Link)�rmtree�display_path�call_subprocess)�logger)�vcs�VersionControlz
url="([^"]+)"zcommitted-rev="(\d+)"z	URL: (.+)zRevision: (.+)z\s*revision="(\d+)"z<url>(.*)</url>cs�eZdZdZdZdZd'ZdZd	Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Z�fdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%d&�Z�S)(�
Subversion�svnz.svn�checkout�svn+ssh�svn+http�	svn+https�svn+svnzsvn-checkout.txtzg# This was an svn checkout; to make it a checkout again run:
svn checkout --force -r %(rev)s %(url)s .
cCs|jd�j|j�s,td|��t|jd|gdddidd6�}tj|�}|s�tj	d	t
|��tjd
|�dS|jd�j
�}tj|�}|s�tj	d
t
|��tjd
|�|dfS||jd�fS)z/Returns (url, revision), where both are strings�/zBad directory: %s�info�show_stdoutF�
extra_environ�C�LANGz'Cannot determine URL of svn checkout %sz!Output that cannot be parsed: 
%sN�z,Cannot determine revision of svn checkout %s)NN)�rstrip�endswith�dirname�AssertionErrorr�cmd�_svn_url_re�searchr�warnrr�group�strip�_svn_revision_re)�self�location�output�match�url�r(�-/tmp/pip-ztkk0jow-build/pip/vcs/subversion.py�get_infos,(
zSubversion.get_infocCs�x�|j�D]�}|j�s
|j�jd�r;q
ntjd|�}|sWdS|jd�}||j�d�j�jdd�d}||fSWdS)N�#z
^-r\s*([^ ])?rr)NN)NN)�
splitlinesr!�
startswith�rerr �end�split)r#�content�liner&�rev�restr(r(r)�parse_vcs_bundle_file,s",z Subversion.parse_vcs_bundle_filecCs�|j�\}}t||�}tjd||f�tjd7_zStjj|�rit|�nt	|j
dg|||gd|jdd�Wdtjd8_XdS)z@Export the svn repository at the url to the destination locationz!Exporting svn repository %s to %s��export�
filter_stdoutrFN)�get_url_rev�get_rev_optionsr�notify�indent�os�path�existsrrr�_filter)r#r$r'r3�rev_optionsr(r(r)r78s
zSubversion.exportcCs%t|jdg|||g�dS)N�switch)rr)r#�destr'rAr(r(r)rBIszSubversion.switchcCs"t|jdg||g�dS)N�update)rr)r#rCrAr(r(r)rDMszSubversion.updatecCs�|j�\}}t||�}|r4d|}nd}|j||||�r�tjd||t|�f�t|jddg|||g�ndS)Nz (to revision %s)�zChecking out %s%s to %srz-q)r9r:�check_destinationrr;rrr)r#rCr'r3rA�rev_displayr(r(r)�obtainQs
	zSubversion.obtaincCs�x�|D]�}t|�j}|s(qnd|kr_dj|jd�dd��j�}n|}||jkr|jdd�dSqWdS)N�-rr+r���)r�egg_fragment�joinr0�lower�key)r#�dist�dependency_linksr'rKrNr(r(r)�get_location^s
+zSubversion.get_locationc
Cs�d}x�tj|�D]�\}}}|j|krJg|dd�<qn|j|j�tjj||jd�}tjj|�s�qn|j|�\}}||kr�|d}	n-|s�|j|	�r�g|dd�<qnt	||�}qW|S)zR
        Return the maximum revision for all files under a given location
        rN�entriesr)
r=�walkr�remover>rLr?�_get_svn_url_revr-�max)
r#r$�revision�base�dirs�files�
entries_fn�dirurl�localrev�base_urlr(r(r)�get_revisionls"
zSubversion.get_revisioncsAtt|�j�\}}|jd�r7d|}n||fS)Nzssh://zsvn+)�superr
r9r-)r#r'r3)�	__class__r(r)r9�s
zSubversion.get_url_revcCsx|}x^tjjtjj|d��sf|}tjj|�}||kr	tjd|�dSq	W|j|�dS)Nzsetup.pyzGCould not find setup.py for directory %s (tried all parent directories)r)r=r>r?rLrrrrU)r#r$�
orig_location�
last_locationr(r(r)�get_url�s$	zSubversion.get_urlc
Cs�ddlm}ttjj||jd��}|j�}|j�|j	d�st|j	d�st|j	d�r�t
ttj
|jd���}|dd=|dd}d	d
�|D�dg}n�|j	d�r7tj|�}|std|��n|jd
�}dd
�tj|�D�dg}n{yYt|jdd|gdd�}tj|�jd
�}dd
�tj|�D�}Wn|k
r�dg}}YnX|r�t|�}	nd}	||	fS)Nr)�InstallationErrorrR�8�9�10z

�cSs<g|]2}t|�dkr|drt|d��qS)�	)�len�int)�.0�dr(r(r)�
<listcomp>�s	z/Subversion._get_svn_url_rev.<locals>.<listcomp>z<?xmlzBadly formatted data: %rrcSs%g|]}t|jd���qS)r)rlr )rm�mr(r(r)ro�s	rz--xmlrFcSs%g|]}t|jd���qS)r)rlr )rmrpr(r(r)ro�s	)�pip.exceptionsre�openr=r>rLr�read�closer-�list�map�strr,r0�_svn_xml_url_rer�
ValueErrorr �_svn_rev_re�finditerrr�_svn_info_xml_url_re�_svn_info_xml_rev_rerV)
r#r$re�f�datar'�revsr&�xmlr3r(r(r)rU�s2!
-!&! 
zSubversion._get_svn_url_revcCs�t|jdd|gdd�}g}xV|j�D]H}|j�}t|d�}|djd�}|j||f�q4W|S)	N�lsz-vrFrrrrJ)rrr,r0rlr!�append)r#�svn_tag_url�stdout�resultsr2�partsr3�tagr(r(r)�get_tag_revs�szSubversion.get_tag_revscCsZd}d}xG|D]?\}}||kr|dksC||kr|}|}qqW|S)Nr()r#r3�tag_revs�best_match_rev�best_tagr��tag_revr(r(r)�find_tag_match�s
zSubversion.find_tag_matchFcCs�|j|�}|dkrdS|jd�}|j�jdd�d}|j|�}|ddkr�d||df}n�|ddkr�d|j�|d|f}n�|ddkrZd
|j�|f}|r{dj|dd��d}	|j|	�}
|j||
�}|rWtjd|�d|	|f}d||f}qWq{n!tj	d|�d
||f}d|||fS)NrrIrrr6�tagsr�z%s-%s�branches�branchz	%s-%s-r%s�trunkz
%s-dev_r%sz/tagsz2trunk checkout %s seems to be equivalent to tag %sz%s/%sz?svn URL does not fit normal structure (tags/branches/trunk): %szsvn+%s@%s#egg=%s���)ztagsztagrJr�)zbrancheszbranchrJrJrJ)
rdr0�egg_namer_rLr�r�rr;r)r#rOr$�	find_tags�repor��egg_project_namer3�
full_egg_name�tag_urlr�r&r(r(r)�get_src_requirement�s. zSubversion.get_src_requirement)zsvnr
rrr)�__name__�
__module__�__qualname__�namer�	repo_name�schemes�bundle_file�guider*r5r7rBrDrHrQr_r9rdrUr�r�r�r(r()rar)r
s(
!r
cCs�|rd|g}ng}tj|�}t|d�rO|j|j}}nl|d}d|kr�|jd�d}d|kr�|jdd�\}}q�|d}}nd	\}}|r�|d|g7}n|r�|d|g7}n|S)
Nz-r�usernamer�@r�:z
--usernamez
--password)NN)r�urlsplit�hasattrr��passwordr0)r'r3rA�rr�r��netloc�authr(r(r)r:�s$
r:)r=r.Zpip.backwardcompatr�	pip.indexr�pip.utilrrr�pip.logr�pip.vcsrr	�compilerxrzrr"r}r|r
r:�registerr(r(r(r)�<module>s�python3.4/site-packages/pip/vcs/__init__.py000064400000021054151735050000014524 0ustar00"""Handles all VCS (version control) support"""

import os
import shutil

from pip.backwardcompat import urlparse, urllib
from pip.log import logger
from pip.util import (display_path, backup_dir, find_command,
                      rmtree, ask_path_exists)


__all__ = ['vcs', 'get_src_requirement']


class VcsSupport(object):
    _registry = {}
    schemes = ['ssh', 'git', 'hg', 'bzr', 'sftp', 'svn']

    def __init__(self):
        # Register more schemes with urlparse for various version control systems
        urlparse.uses_netloc.extend(self.schemes)
        # Python >= 2.7.4, 3.3 doesn't have uses_fragment
        if getattr(urlparse, 'uses_fragment', None):
            urlparse.uses_fragment.extend(self.schemes)
        super(VcsSupport, self).__init__()

    def __iter__(self):
        return self._registry.__iter__()

    @property
    def backends(self):
        return list(self._registry.values())

    @property
    def dirnames(self):
        return [backend.dirname for backend in self.backends]

    @property
    def all_schemes(self):
        schemes = []
        for backend in self.backends:
            schemes.extend(backend.schemes)
        return schemes

    def register(self, cls):
        if not hasattr(cls, 'name'):
            logger.warn('Cannot register VCS %s' % cls.__name__)
            return
        if cls.name not in self._registry:
            self._registry[cls.name] = cls

    def unregister(self, cls=None, name=None):
        if name in self._registry:
            del self._registry[name]
        elif cls in self._registry.values():
            del self._registry[cls.name]
        else:
            logger.warn('Cannot unregister because no class or name given')

    def get_backend_name(self, location):
        """
        Return the name of the version control backend if found at given
        location, e.g. vcs.get_backend_name('/path/to/vcs/checkout')
        """
        for vc_type in self._registry.values():
            path = os.path.join(location, vc_type.dirname)
            if os.path.exists(path):
                return vc_type.name
        return None

    def get_backend(self, name):
        name = name.lower()
        if name in self._registry:
            return self._registry[name]

    def get_backend_from_location(self, location):
        vc_type = self.get_backend_name(location)
        if vc_type:
            return self.get_backend(vc_type)
        return None


vcs = VcsSupport()


class VersionControl(object):
    name = ''
    dirname = ''

    def __init__(self, url=None, *args, **kwargs):
        self.url = url
        self._cmd = None
        super(VersionControl, self).__init__(*args, **kwargs)

    def _filter(self, line):
        return (logger.INFO, line)

    def _is_local_repository(self, repo):
        """
           posix absolute paths start with os.path.sep,
           win32 ones ones start with drive (like c:\\folder)
        """
        drive, tail = os.path.splitdrive(repo)
        return repo.startswith(os.path.sep) or drive

    @property
    def cmd(self):
        if self._cmd is not None:
            return self._cmd
        command = find_command(self.name)
        logger.info('Found command %r at %r' % (self.name, command))
        self._cmd = command
        return command

    def get_url_rev(self):
        """
        Returns the correct repository URL and revision by parsing the given
        repository URL
        """
        error_message = (
           "Sorry, '%s' is a malformed VCS url. "
           "The format is <vcs>+<protocol>://<url>, "
           "e.g. svn+http://myrepo/svn/MyApp#egg=MyApp")
        assert '+' in self.url, error_message % self.url
        url = self.url.split('+', 1)[1]
        scheme, netloc, path, query, frag = urlparse.urlsplit(url)
        rev = None
        if '@' in path:
            path, rev = path.rsplit('@', 1)
        url = urlparse.urlunsplit((scheme, netloc, path, query, ''))
        return url, rev

    def get_info(self, location):
        """
        Returns (url, revision), where both are strings
        """
        assert not location.rstrip('/').endswith(self.dirname), 'Bad directory: %s' % location
        return self.get_url(location), self.get_revision(location)

    def normalize_url(self, url):
        """
        Normalize a URL for comparison by unquoting it and removing any trailing slash.
        """
        return urllib.unquote(url).rstrip('/')

    def compare_urls(self, url1, url2):
        """
        Compare two repo URLs for identity, ignoring incidental differences.
        """
        return (self.normalize_url(url1) == self.normalize_url(url2))

    def parse_vcs_bundle_file(self, content):
        """
        Takes the contents of the bundled text file that explains how to revert
        the stripped off version control data of the given package and returns
        the URL and revision of it.
        """
        raise NotImplementedError

    def obtain(self, dest):
        """
        Called when installing or updating an editable package, takes the
        source path of the checkout.
        """
        raise NotImplementedError

    def switch(self, dest, url, rev_options):
        """
        Switch the repo at ``dest`` to point to ``URL``.
        """
        raise NotImplemented

    def update(self, dest, rev_options):
        """
        Update an already-existing repo to the given ``rev_options``.
        """
        raise NotImplementedError

    def check_destination(self, dest, url, rev_options, rev_display):
        """
        Prepare a location to receive a checkout/clone.

        Return True if the location is ready for (and requires) a
        checkout/clone, False otherwise.
        """
        checkout = True
        prompt = False
        if os.path.exists(dest):
            checkout = False
            if os.path.exists(os.path.join(dest, self.dirname)):
                existing_url = self.get_url(dest)
                if self.compare_urls(existing_url, url):
                    logger.info('%s in %s exists, and has correct URL (%s)' %
                                (self.repo_name.title(), display_path(dest),
                                 url))
                    logger.notify('Updating %s %s%s' %
                                  (display_path(dest), self.repo_name,
                                   rev_display))
                    self.update(dest, rev_options)
                else:
                    logger.warn('%s %s in %s exists with URL %s' %
                                (self.name, self.repo_name,
                                 display_path(dest), existing_url))
                    prompt = ('(s)witch, (i)gnore, (w)ipe, (b)ackup ',
                              ('s', 'i', 'w', 'b'))
            else:
                logger.warn('Directory %s already exists, '
                            'and is not a %s %s.' %
                            (dest, self.name, self.repo_name))
                prompt = ('(i)gnore, (w)ipe, (b)ackup ', ('i', 'w', 'b'))
        if prompt:
            logger.warn('The plan is to install the %s repository %s' %
                        (self.name, url))
            response = ask_path_exists('What to do?  %s' % prompt[0],
                                       prompt[1])

            if response == 's':
                logger.notify('Switching %s %s to %s%s' %
                              (self.repo_name, display_path(dest), url,
                               rev_display))
                self.switch(dest, url, rev_options)
            elif response == 'i':
                # do nothing
                pass
            elif response == 'w':
                logger.warn('Deleting %s' % display_path(dest))
                rmtree(dest)
                checkout = True
            elif response == 'b':
                dest_dir = backup_dir(dest)
                logger.warn('Backing up %s to %s'
                            % (display_path(dest), dest_dir))
                shutil.move(dest, dest_dir)
                checkout = True
        return checkout

    def unpack(self, location):
        if os.path.exists(location):
            rmtree(location)
        self.obtain(location)

    def get_src_requirement(self, dist, location, find_tags=False):
        raise NotImplementedError


def get_src_requirement(dist, location, find_tags):
    version_control = vcs.get_backend_from_location(location)
    if version_control:
        return version_control().get_src_requirement(dist, location, find_tags)
    logger.warn('cannot determine version of editable source in %s (is not SVN checkout, Git clone, Mercurial clone or Bazaar branch)' % location)
    return dist.as_requirement()
python3.4/site-packages/pip/vcs/mercurial.py000064400000013274151735050000014755 0ustar00import os
import tempfile
import re
import sys
from pip.util import call_subprocess
from pip.util import display_path, rmtree
from pip.log import logger
from pip.vcs import vcs, VersionControl
from pip.download import path_to_url
from pip.backwardcompat import ConfigParser


class Mercurial(VersionControl):
    name = 'hg'
    dirname = '.hg'
    repo_name = 'clone'
    schemes = ('hg', 'hg+http', 'hg+https', 'hg+ssh', 'hg+static-http')
    bundle_file = 'hg-clone.txt'
    guide = ('# This was a Mercurial repo; to make it a repo again run:\n'
            'hg init\nhg pull %(url)s\nhg update -r %(rev)s\n')

    def parse_vcs_bundle_file(self, content):
        url = rev = None
        for line in content.splitlines():
            if not line.strip() or line.strip().startswith('#'):
                continue
            url_match = re.search(r'hg\s*pull\s*(.*)\s*', line)
            if url_match:
                url = url_match.group(1).strip()
            rev_match = re.search(r'^hg\s*update\s*-r\s*(.*)\s*', line)
            if rev_match:
                rev = rev_match.group(1).strip()
            if url and rev:
                return url, rev
        return None, None

    def export(self, location):
        """Export the Hg repository at the url to the destination location"""
        temp_dir = tempfile.mkdtemp('-export', 'pip-')
        self.unpack(temp_dir)
        try:
            call_subprocess(
                [self.cmd, 'archive', location],
                filter_stdout=self._filter, show_stdout=False, cwd=temp_dir)
        finally:
            rmtree(temp_dir)

    def switch(self, dest, url, rev_options):
        repo_config = os.path.join(dest, self.dirname, 'hgrc')
        config = ConfigParser.SafeConfigParser()
        try:
            config.read(repo_config)
            config.set('paths', 'default', url)
            config_file = open(repo_config, 'w')
            config.write(config_file)
            config_file.close()
        except (OSError, ConfigParser.NoSectionError):
            e = sys.exc_info()[1]
            logger.warn(
                'Could not switch Mercurial repository to %s: %s'
                % (url, e))
        else:
            call_subprocess([self.cmd, 'update', '-q'] + rev_options, cwd=dest)

    def update(self, dest, rev_options):
        call_subprocess([self.cmd, 'pull', '-q'], cwd=dest)
        call_subprocess(
            [self.cmd, 'update', '-q'] + rev_options, cwd=dest)

    def obtain(self, dest):
        url, rev = self.get_url_rev()
        if rev:
            rev_options = [rev]
            rev_display = ' (to revision %s)' % rev
        else:
            rev_options = []
            rev_display = ''
        if self.check_destination(dest, url, rev_options, rev_display):
            logger.notify('Cloning hg %s%s to %s'
                          % (url, rev_display, display_path(dest)))
            call_subprocess([self.cmd, 'clone', '--noupdate', '-q', url, dest])
            call_subprocess([self.cmd, 'update', '-q'] + rev_options, cwd=dest)

    def get_url(self, location):
        url = call_subprocess(
            [self.cmd, 'showconfig', 'paths.default'],
            show_stdout=False, cwd=location).strip()
        if self._is_local_repository(url):
            url = path_to_url(url)
        return url.strip()

    def get_tag_revs(self, location):
        tags = call_subprocess(
            [self.cmd, 'tags'], show_stdout=False, cwd=location)
        tag_revs = []
        for line in tags.splitlines():
            tags_match = re.search(r'([\w\d\.-]+)\s*([\d]+):.*$', line)
            if tags_match:
                tag = tags_match.group(1)
                rev = tags_match.group(2)
                if "tip" != tag:
                    tag_revs.append((rev.strip(), tag.strip()))
        return dict(tag_revs)

    def get_branch_revs(self, location):
        branches = call_subprocess(
            [self.cmd, 'branches'], show_stdout=False, cwd=location)
        branch_revs = []
        for line in branches.splitlines():
            branches_match = re.search(r'([\w\d\.-]+)\s*([\d]+):.*$', line)
            if branches_match:
                branch = branches_match.group(1)
                rev = branches_match.group(2)
                if "default" != branch:
                    branch_revs.append((rev.strip(), branch.strip()))
        return dict(branch_revs)

    def get_revision(self, location):
        current_revision = call_subprocess(
            [self.cmd, 'parents', '--template={rev}'],
            show_stdout=False, cwd=location).strip()
        return current_revision

    def get_revision_hash(self, location):
        current_rev_hash = call_subprocess(
            [self.cmd, 'parents', '--template={node}'],
            show_stdout=False, cwd=location).strip()
        return current_rev_hash

    def get_src_requirement(self, dist, location, find_tags):
        repo = self.get_url(location)
        if not repo.lower().startswith('hg:'):
            repo = 'hg+' + repo
        egg_project_name = dist.egg_name().split('-', 1)[0]
        if not repo:
            return None
        current_rev = self.get_revision(location)
        current_rev_hash = self.get_revision_hash(location)
        tag_revs = self.get_tag_revs(location)
        branch_revs = self.get_branch_revs(location)
        if current_rev in tag_revs:
            # It's a tag
            full_egg_name = '%s-%s' % (egg_project_name, tag_revs[current_rev])
        elif current_rev in branch_revs:
            # It's the tip of a branch
            full_egg_name = '%s-%s' % (egg_project_name, branch_revs[current_rev])
        else:
            full_egg_name = '%s-dev' % egg_project_name
        return '%s@%s#egg=%s' % (repo, current_rev_hash, full_egg_name)

vcs.register(Mercurial)
python3.4/site-packages/pip/vcs/git.py000064400000017332151735050000013554 0ustar00import tempfile
import re
import os.path
from pip.util import call_subprocess
from pip.util import display_path, rmtree
from pip.vcs import vcs, VersionControl
from pip.log import logger
from pip.backwardcompat import url2pathname, urlparse
urlsplit = urlparse.urlsplit
urlunsplit = urlparse.urlunsplit


class Git(VersionControl):
    name = 'git'
    dirname = '.git'
    repo_name = 'clone'
    schemes = ('git', 'git+http', 'git+https', 'git+ssh', 'git+git', 'git+file')
    bundle_file = 'git-clone.txt'
    guide = ('# This was a Git repo; to make it a repo again run:\n'
        'git init\ngit remote add origin %(url)s -f\ngit checkout %(rev)s\n')

    def __init__(self, url=None, *args, **kwargs):

        # Works around an apparent Git bug
        # (see http://article.gmane.org/gmane.comp.version-control.git/146500)
        if url:
            scheme, netloc, path, query, fragment = urlsplit(url)
            if scheme.endswith('file'):
                initial_slashes = path[:-len(path.lstrip('/'))]
                newpath = initial_slashes + url2pathname(path).replace('\\', '/').lstrip('/')
                url = urlunsplit((scheme, netloc, newpath, query, fragment))
                after_plus = scheme.find('+') + 1
                url = scheme[:after_plus] + urlunsplit((scheme[after_plus:], netloc, newpath, query, fragment))

        super(Git, self).__init__(url, *args, **kwargs)

    def parse_vcs_bundle_file(self, content):
        url = rev = None
        for line in content.splitlines():
            if not line.strip() or line.strip().startswith('#'):
                continue
            url_match = re.search(r'git\s*remote\s*add\s*origin(.*)\s*-f', line)
            if url_match:
                url = url_match.group(1).strip()
            rev_match = re.search(r'^git\s*checkout\s*-q\s*(.*)\s*', line)
            if rev_match:
                rev = rev_match.group(1).strip()
            if url and rev:
                return url, rev
        return None, None

    def export(self, location):
        """Export the Git repository at the url to the destination location"""
        temp_dir = tempfile.mkdtemp('-export', 'pip-')
        self.unpack(temp_dir)
        try:
            if not location.endswith('/'):
                location = location + '/'
            call_subprocess(
                [self.cmd, 'checkout-index', '-a', '-f', '--prefix', location],
                filter_stdout=self._filter, show_stdout=False, cwd=temp_dir)
        finally:
            rmtree(temp_dir)

    def check_rev_options(self, rev, dest, rev_options):
        """Check the revision options before checkout to compensate that tags
        and branches may need origin/ as a prefix.
        Returns the SHA1 of the branch or tag if found.
        """
        revisions = self.get_refs(dest)

        origin_rev = 'origin/%s' % rev
        if origin_rev in revisions:
            # remote branch
            return [revisions[origin_rev]]
        elif rev in revisions:
            # a local tag or branch name
            return [revisions[rev]]
        else:
            logger.warn("Could not find a tag or branch '%s', assuming commit." % rev)
            return rev_options

    def switch(self, dest, url, rev_options):
        call_subprocess(
            [self.cmd, 'config', 'remote.origin.url', url], cwd=dest)
        call_subprocess(
            [self.cmd, 'checkout', '-q'] + rev_options, cwd=dest)

        self.update_submodules(dest)

    def update(self, dest, rev_options):
        # First fetch changes from the default remote
        call_subprocess([self.cmd, 'fetch', '-q'], cwd=dest)
        # Then reset to wanted revision (maby even origin/master)
        if rev_options:
            rev_options = self.check_rev_options(rev_options[0], dest, rev_options)
        call_subprocess([self.cmd, 'reset', '--hard', '-q'] + rev_options, cwd=dest)
        #: update submodules
        self.update_submodules(dest)

    def obtain(self, dest):
        url, rev = self.get_url_rev()
        if rev:
            rev_options = [rev]
            rev_display = ' (to %s)' % rev
        else:
            rev_options = ['origin/master']
            rev_display = ''
        if self.check_destination(dest, url, rev_options, rev_display):
            logger.notify('Cloning %s%s to %s' % (url, rev_display, display_path(dest)))
            call_subprocess([self.cmd, 'clone', '-q', url, dest])
            #: repo may contain submodules
            self.update_submodules(dest)
            if rev:
                rev_options = self.check_rev_options(rev, dest, rev_options)
                # Only do a checkout if rev_options differs from HEAD
                if not self.get_revision(dest).startswith(rev_options[0]):
                    call_subprocess([self.cmd, 'checkout', '-q'] + rev_options, cwd=dest)

    def get_url(self, location):
        url = call_subprocess(
            [self.cmd, 'config', 'remote.origin.url'],
            show_stdout=False, cwd=location)
        return url.strip()

    def get_revision(self, location):
        current_rev = call_subprocess(
            [self.cmd, 'rev-parse', 'HEAD'], show_stdout=False, cwd=location)
        return current_rev.strip()

    def get_refs(self, location):
        """Return map of named refs (branches or tags) to commit hashes."""
        output = call_subprocess([self.cmd, 'show-ref'],
                                 show_stdout=False, cwd=location)
        rv = {}
        for line in output.strip().splitlines():
            commit, ref = line.split(' ', 1)
            ref = ref.strip()
            ref_name = None
            if ref.startswith('refs/remotes/'):
                ref_name = ref[len('refs/remotes/'):]
            elif ref.startswith('refs/heads/'):
                ref_name = ref[len('refs/heads/'):]
            elif ref.startswith('refs/tags/'):
                ref_name = ref[len('refs/tags/'):]
            if ref_name is not None:
                rv[ref_name] = commit.strip()
        return rv

    def get_src_requirement(self, dist, location, find_tags):
        repo = self.get_url(location)
        if not repo.lower().startswith('git:'):
            repo = 'git+' + repo
        egg_project_name = dist.egg_name().split('-', 1)[0]
        if not repo:
            return None
        current_rev = self.get_revision(location)
        refs = self.get_refs(location)
        # refs maps names to commit hashes; we need the inverse
        # if multiple names map to a single commit, this arbitrarily picks one
        names_by_commit = dict((commit, ref) for ref, commit in refs.items())

        if current_rev in names_by_commit:
            # It's a tag
            full_egg_name = '%s-%s' % (egg_project_name, names_by_commit[current_rev])
        else:
            full_egg_name = '%s-dev' % egg_project_name

        return '%s@%s#egg=%s' % (repo, current_rev, full_egg_name)

    def get_url_rev(self):
        """
        Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
        That's required because although they use SSH they sometimes doesn't
        work with a ssh:// scheme (e.g. Github). But we need a scheme for
        parsing. Hence we remove it again afterwards and return it as a stub.
        """
        if not '://' in self.url:
            assert not 'file:' in self.url
            self.url = self.url.replace('git+', 'git+ssh://')
            url, rev = super(Git, self).get_url_rev()
            url = url.replace('ssh://', '')
        else:
            url, rev = super(Git, self).get_url_rev()

        return url, rev

    def update_submodules(self, location):
        if not os.path.exists(os.path.join(location, '.gitmodules')):
            return
        call_subprocess([self.cmd, 'submodule', 'update', '--init', '--recursive', '-q'],
                        cwd=location)

vcs.register(Git)
python3.4/site-packages/pip/vcs/subversion.py000064400000024620151735050000015166 0ustar00import os
import re
from pip.backwardcompat import urlparse
from pip.index import Link
from pip.util import rmtree, display_path, call_subprocess
from pip.log import logger
from pip.vcs import vcs, VersionControl

_svn_xml_url_re = re.compile('url="([^"]+)"')
_svn_rev_re = re.compile('committed-rev="(\d+)"')
_svn_url_re = re.compile(r'URL: (.+)')
_svn_revision_re = re.compile(r'Revision: (.+)')
_svn_info_xml_rev_re = re.compile(r'\s*revision="(\d+)"')
_svn_info_xml_url_re = re.compile(r'<url>(.*)</url>')


class Subversion(VersionControl):
    name = 'svn'
    dirname = '.svn'
    repo_name = 'checkout'
    schemes = ('svn', 'svn+ssh', 'svn+http', 'svn+https', 'svn+svn')
    bundle_file = 'svn-checkout.txt'
    guide = ('# This was an svn checkout; to make it a checkout again run:\n'
            'svn checkout --force -r %(rev)s %(url)s .\n')

    def get_info(self, location):
        """Returns (url, revision), where both are strings"""
        assert not location.rstrip('/').endswith(self.dirname), 'Bad directory: %s' % location
        output = call_subprocess(
            [self.cmd, 'info', location], show_stdout=False, extra_environ={'LANG': 'C'})
        match = _svn_url_re.search(output)
        if not match:
            logger.warn('Cannot determine URL of svn checkout %s' % display_path(location))
            logger.info('Output that cannot be parsed: \n%s' % output)
            return None, None
        url = match.group(1).strip()
        match = _svn_revision_re.search(output)
        if not match:
            logger.warn('Cannot determine revision of svn checkout %s' % display_path(location))
            logger.info('Output that cannot be parsed: \n%s' % output)
            return url, None
        return url, match.group(1)

    def parse_vcs_bundle_file(self, content):
        for line in content.splitlines():
            if not line.strip() or line.strip().startswith('#'):
                continue
            match = re.search(r'^-r\s*([^ ])?', line)
            if not match:
                return None, None
            rev = match.group(1)
            rest = line[match.end():].strip().split(None, 1)[0]
            return rest, rev
        return None, None

    def export(self, location):
        """Export the svn repository at the url to the destination location"""
        url, rev = self.get_url_rev()
        rev_options = get_rev_options(url, rev)
        logger.notify('Exporting svn repository %s to %s' % (url, location))
        logger.indent += 2
        try:
            if os.path.exists(location):
                # Subversion doesn't like to check out over an existing directory
                # --force fixes this, but was only added in svn 1.5
                rmtree(location)
            call_subprocess(
                [self.cmd, 'export'] + rev_options + [url, location],
                filter_stdout=self._filter, show_stdout=False)
        finally:
            logger.indent -= 2

    def switch(self, dest, url, rev_options):
        call_subprocess(
            [self.cmd, 'switch'] + rev_options + [url, dest])

    def update(self, dest, rev_options):
        call_subprocess(
            [self.cmd, 'update'] + rev_options + [dest])

    def obtain(self, dest):
        url, rev = self.get_url_rev()
        rev_options = get_rev_options(url, rev)
        if rev:
            rev_display = ' (to revision %s)' % rev
        else:
            rev_display = ''
        if self.check_destination(dest, url, rev_options, rev_display):
            logger.notify('Checking out %s%s to %s'
                          % (url, rev_display, display_path(dest)))
            call_subprocess(
                [self.cmd, 'checkout', '-q'] + rev_options + [url, dest])

    def get_location(self, dist, dependency_links):
        for url in dependency_links:
            egg_fragment = Link(url).egg_fragment
            if not egg_fragment:
                continue
            if '-' in egg_fragment:
                ## FIXME: will this work when a package has - in the name?
                key = '-'.join(egg_fragment.split('-')[:-1]).lower()
            else:
                key = egg_fragment
            if key == dist.key:
                return url.split('#', 1)[0]
        return None

    def get_revision(self, location):
        """
        Return the maximum revision for all files under a given location
        """
        # Note: taken from setuptools.command.egg_info
        revision = 0

        for base, dirs, files in os.walk(location):
            if self.dirname not in dirs:
                dirs[:] = []
                continue    # no sense walking uncontrolled subdirs
            dirs.remove(self.dirname)
            entries_fn = os.path.join(base, self.dirname, 'entries')
            if not os.path.exists(entries_fn):
                ## FIXME: should we warn?
                continue

            dirurl, localrev = self._get_svn_url_rev(base)

            if base == location:
                base_url = dirurl + '/'   # save the root url
            elif not dirurl or not dirurl.startswith(base_url):
                dirs[:] = []
                continue    # not part of the same svn tree, skip it
            revision = max(revision, localrev)
        return revision

    def get_url_rev(self):
        # hotfix the URL scheme after removing svn+ from svn+ssh:// readd it
        url, rev = super(Subversion, self).get_url_rev()
        if url.startswith('ssh://'):
            url = 'svn+' + url
        return url, rev

    def get_url(self, location):
        # In cases where the source is in a subdirectory, not alongside setup.py
        # we have to look up in the location until we find a real setup.py
        orig_location = location
        while not os.path.exists(os.path.join(location, 'setup.py')):
            last_location = location
            location = os.path.dirname(location)
            if location == last_location:
                # We've traversed up to the root of the filesystem without finding setup.py
                logger.warn("Could not find setup.py for directory %s (tried all parent directories)"
                            % orig_location)
                return None

        return self._get_svn_url_rev(location)[0]

    def _get_svn_url_rev(self, location):
        from pip.exceptions import InstallationError

        f = open(os.path.join(location, self.dirname, 'entries'))
        data = f.read()
        f.close()
        if data.startswith('8') or data.startswith('9') or data.startswith('10'):
            data = list(map(str.splitlines, data.split('\n\x0c\n')))
            del data[0][0]  # get rid of the '8'
            url = data[0][3]
            revs = [int(d[9]) for d in data if len(d) > 9 and d[9]] + [0]
        elif data.startswith('<?xml'):
            match = _svn_xml_url_re.search(data)
            if not match:
                raise ValueError('Badly formatted data: %r' % data)
            url = match.group(1)    # get repository URL
            revs = [int(m.group(1)) for m in _svn_rev_re.finditer(data)] + [0]
        else:
            try:
                # subversion >= 1.7
                xml = call_subprocess([self.cmd, 'info', '--xml', location], show_stdout=False)
                url = _svn_info_xml_url_re.search(xml).group(1)
                revs = [int(m.group(1)) for m in _svn_info_xml_rev_re.finditer(xml)]
            except InstallationError:
                url, revs = None, []

        if revs:
            rev = max(revs)
        else:
            rev = 0

        return url, rev

    def get_tag_revs(self, svn_tag_url):
        stdout = call_subprocess(
            [self.cmd, 'ls', '-v', svn_tag_url], show_stdout=False)
        results = []
        for line in stdout.splitlines():
            parts = line.split()
            rev = int(parts[0])
            tag = parts[-1].strip('/')
            results.append((tag, rev))
        return results

    def find_tag_match(self, rev, tag_revs):
        best_match_rev = None
        best_tag = None
        for tag, tag_rev in tag_revs:
            if (tag_rev > rev and
                (best_match_rev is None or best_match_rev > tag_rev)):
                # FIXME: Is best_match > tag_rev really possible?
                # or is it a sign something is wacky?
                best_match_rev = tag_rev
                best_tag = tag
        return best_tag

    def get_src_requirement(self, dist, location, find_tags=False):
        repo = self.get_url(location)
        if repo is None:
            return None
        parts = repo.split('/')
        ## FIXME: why not project name?
        egg_project_name = dist.egg_name().split('-', 1)[0]
        rev = self.get_revision(location)
        if parts[-2] in ('tags', 'tag'):
            # It's a tag, perfect!
            full_egg_name = '%s-%s' % (egg_project_name, parts[-1])
        elif parts[-2] in ('branches', 'branch'):
            # It's a branch :(
            full_egg_name = '%s-%s-r%s' % (dist.egg_name(), parts[-1], rev)
        elif parts[-1] == 'trunk':
            # Trunk :-/
            full_egg_name = '%s-dev_r%s' % (dist.egg_name(), rev)
            if find_tags:
                tag_url = '/'.join(parts[:-1]) + '/tags'
                tag_revs = self.get_tag_revs(tag_url)
                match = self.find_tag_match(rev, tag_revs)
                if match:
                    logger.notify('trunk checkout %s seems to be equivalent to tag %s' % match)
                    repo = '%s/%s' % (tag_url, match)
                    full_egg_name = '%s-%s' % (egg_project_name, match)
        else:
            # Don't know what it is
            logger.warn('svn URL does not fit normal structure (tags/branches/trunk): %s' % repo)
            full_egg_name = '%s-dev_r%s' % (egg_project_name, rev)
        return 'svn+%s@%s#egg=%s' % (repo, rev, full_egg_name)


def get_rev_options(url, rev):
    if rev:
        rev_options = ['-r', rev]
    else:
        rev_options = []

    r = urlparse.urlsplit(url)
    if hasattr(r, 'username'):
        # >= Python-2.5
        username, password = r.username, r.password
    else:
        netloc = r[1]
        if '@' in netloc:
            auth = netloc.split('@')[0]
            if ':' in auth:
                username, password = auth.split(':', 1)
            else:
                username, password = auth, None
        else:
            username, password = None, None

    if username:
        rev_options += ['--username', username]
    if password:
        rev_options += ['--password', password]
    return rev_options


vcs.register(Subversion)
python3.4/site-packages/pip/pep425tags.py000064400000005631151735050000014073 0ustar00"""Generate and work with PEP 425 Compatibility Tags."""

import sys
import warnings

try:
    import sysconfig
except ImportError:  # pragma nocover
    # Python < 2.7
    import distutils.sysconfig as sysconfig
import distutils.util


def get_abbr_impl():
    """Return abbreviated implementation name."""
    if hasattr(sys, 'pypy_version_info'):
        pyimpl = 'pp'
    elif sys.platform.startswith('java'):
        pyimpl = 'jy'
    elif sys.platform == 'cli':
        pyimpl = 'ip'
    else:
        pyimpl = 'cp'
    return pyimpl


def get_impl_ver():
    """Return implementation version."""
    return ''.join(map(str, sys.version_info[:2]))


def get_platform():
    """Return our platform name 'win32', 'linux_x86_64'"""
    # XXX remove distutils dependency
    return distutils.util.get_platform().replace('.', '_').replace('-', '_')


def get_supported(versions=None, noarch=False):
    """Return a list of supported tags for each version specified in
    `versions`.

    :param versions: a list of string versions, of the form ["33", "32"],
        or None. The first version will be assumed to support our ABI.
    """
    supported = []

    # Versions must be given with respect to the preference
    if versions is None:
        versions = []
        major = sys.version_info[0]
        # Support all previous minor Python versions.
        for minor in range(sys.version_info[1], -1, -1):
            versions.append(''.join(map(str, (major, minor))))

    impl = get_abbr_impl()

    abis = []

    try:
        soabi = sysconfig.get_config_var('SOABI')
    except IOError as e: # Issue #1074
        warnings.warn("{0}".format(e), RuntimeWarning)
        soabi = None

    if soabi and soabi.startswith('cpython-'):
        abis[0:0] = ['cp' + soabi.split('-', 1)[-1]]

    abi3s = set()
    import imp
    for suffix in imp.get_suffixes():
        if suffix[0].startswith('.abi'):
            abi3s.add(suffix[0].split('.', 2)[1])

    abis.extend(sorted(list(abi3s)))

    abis.append('none')

    if not noarch:
        arch = get_platform()

        # Current version, current API (built specifically for our Python):
        for abi in abis:
            supported.append(('%s%s' % (impl, versions[0]), abi, arch))

    # No abi / arch, but requires our implementation:
    for i, version in enumerate(versions):
        supported.append(('%s%s' % (impl, version), 'none', 'any'))
        if i == 0:
            # Tagged specifically as being cross-version compatible
            # (with just the major version specified)
            supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any'))

    # No abi / arch, generic Python
    for i, version in enumerate(versions):
        supported.append(('py%s' % (version,), 'none', 'any'))
        if i == 0:
            supported.append(('py%s' % (version[0]), 'none', 'any'))

    return supported

supported_tags = get_supported()
supported_tags_noarch = get_supported(noarch=True)
python3.4/site-packages/setuptools/compat.py000064400000004774151735050000015120 0ustar00import sys
import itertools

if sys.version_info[0] < 3:
    PY3 = False

    basestring = basestring
    import __builtin__ as builtins
    import ConfigParser
    from StringIO import StringIO
    BytesIO = StringIO
    execfile = execfile
    func_code = lambda o: o.func_code
    func_globals = lambda o: o.func_globals
    im_func = lambda o: o.im_func
    from htmlentitydefs import name2codepoint
    import httplib
    from BaseHTTPServer import HTTPServer
    from SimpleHTTPServer import SimpleHTTPRequestHandler
    from BaseHTTPServer import BaseHTTPRequestHandler
    iteritems = lambda o: o.iteritems()
    long_type = long
    maxsize = sys.maxint
    next = lambda o: o.next()
    numeric_types = (int, long, float)
    unichr = unichr
    unicode = unicode
    bytes = str
    from urllib import url2pathname, splittag, pathname2url
    import urllib2
    from urllib2 import urlopen, HTTPError, URLError, unquote, splituser
    from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
    filterfalse = itertools.ifilterfalse

    exec("""def reraise(tp, value, tb=None):
    raise tp, value, tb""")
else:
    PY3 = True

    basestring = str
    import builtins
    import configparser as ConfigParser
    from io import StringIO, BytesIO
    func_code = lambda o: o.__code__
    func_globals = lambda o: o.__globals__
    im_func = lambda o: o.__func__
    from html.entities import name2codepoint
    import http.client as httplib
    from http.server import HTTPServer, SimpleHTTPRequestHandler
    from http.server import BaseHTTPRequestHandler
    iteritems = lambda o: o.items()
    long_type = int
    maxsize = sys.maxsize
    next = next
    numeric_types = (int, float)
    unichr = chr
    unicode = str
    bytes = bytes
    from urllib.error import HTTPError, URLError
    import urllib.request as urllib2
    from urllib.request import urlopen, url2pathname, pathname2url
    from urllib.parse import (
        urlparse, urlunparse, unquote, splituser, urljoin, urlsplit,
        urlunsplit, splittag,
    )
    filterfalse = itertools.filterfalse

    def execfile(fn, globs=None, locs=None):
        if globs is None:
            globs = globals()
        if locs is None:
            locs = globs
        f = open(fn, 'rb')
        try:
            source = f.read()
        finally:
            f.close()
        exec(compile(source, fn, 'exec'), globs, locs)

    def reraise(tp, value, tb=None):
        if value.__traceback__ is not tb:
            raise value.with_traceback(tb)
        raise value
python3.4/site-packages/setuptools/version.py000064400000000024151735050000015302 0ustar00__version__ = '2.0'
python3.4/site-packages/setuptools/command/build_py.py000064400000020370151735050000017050 0ustar00import os
import sys
import fnmatch
import textwrap
from distutils.command.build_py import build_py as _build_py
from distutils.util import convert_path
from glob import glob

try:
    from setuptools.lib2to3_ex import Mixin2to3
except ImportError:
    class Mixin2to3:
        def run_2to3(self, files, doctests=True):
            "do nothing"

class build_py(_build_py, Mixin2to3):
    """Enhanced 'build_py' command that includes data files with packages

    The data files are specified via a 'package_data' argument to 'setup()'.
    See 'setuptools.dist.Distribution' for more details.

    Also, this version of the 'build_py' command allows you to specify both
    'py_modules' and 'packages' in the same setup operation.
    """
    def finalize_options(self):
        _build_py.finalize_options(self)
        self.package_data = self.distribution.package_data
        self.exclude_package_data = self.distribution.exclude_package_data or {}
        if 'data_files' in self.__dict__: del self.__dict__['data_files']
        self.__updated_files = []
        self.__doctests_2to3 = []

    def run(self):
        """Build modules, packages, and copy data files to build directory"""
        if not self.py_modules and not self.packages:
            return

        if self.py_modules:
            self.build_modules()

        if self.packages:
            self.build_packages()
            self.build_package_data()

        self.run_2to3(self.__updated_files, False)
        self.run_2to3(self.__updated_files, True)
        self.run_2to3(self.__doctests_2to3, True)

        # Only compile actual .py files, using our base class' idea of what our
        # output files are.
        self.byte_compile(_build_py.get_outputs(self, include_bytecode=0))

    def __getattr__(self, attr):
        if attr=='data_files':  # lazily compute data files
            self.data_files = files = self._get_data_files()
            return files
        return _build_py.__getattr__(self,attr)

    def build_module(self, module, module_file, package):
        outfile, copied = _build_py.build_module(self, module, module_file, package)
        if copied:
            self.__updated_files.append(outfile)
        return outfile, copied

    def _get_data_files(self):
        """Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
        self.analyze_manifest()
        data = []
        for package in self.packages or ():
            # Locate package source directory
            src_dir = self.get_package_dir(package)

            # Compute package build directory
            build_dir = os.path.join(*([self.build_lib] + package.split('.')))

            # Length of path to strip from found files
            plen = len(src_dir)+1

            # Strip directory from globbed filenames
            filenames = [
                file[plen:] for file in self.find_data_files(package, src_dir)
                ]
            data.append((package, src_dir, build_dir, filenames))
        return data

    def find_data_files(self, package, src_dir):
        """Return filenames for package's data files in 'src_dir'"""
        globs = (self.package_data.get('', [])
                 + self.package_data.get(package, []))
        files = self.manifest_files.get(package, [])[:]
        for pattern in globs:
            # Each pattern has to be converted to a platform-specific path
            files.extend(glob(os.path.join(src_dir, convert_path(pattern))))
        return self.exclude_data_files(package, src_dir, files)

    def build_package_data(self):
        """Copy data files into build directory"""
        for package, src_dir, build_dir, filenames in self.data_files:
            for filename in filenames:
                target = os.path.join(build_dir, filename)
                self.mkpath(os.path.dirname(target))
                srcfile = os.path.join(src_dir, filename)
                outf, copied = self.copy_file(srcfile, target)
                srcfile = os.path.abspath(srcfile)
                if copied and srcfile in self.distribution.convert_2to3_doctests:
                    self.__doctests_2to3.append(outf)

    def analyze_manifest(self):
        self.manifest_files = mf = {}
        if not self.distribution.include_package_data:
            return
        src_dirs = {}
        for package in self.packages or ():
            # Locate package source directory
            src_dirs[assert_relative(self.get_package_dir(package))] = package

        self.run_command('egg_info')
        ei_cmd = self.get_finalized_command('egg_info')
        for path in ei_cmd.filelist.files:
            d,f = os.path.split(assert_relative(path))
            prev = None
            oldf = f
            while d and d!=prev and d not in src_dirs:
                prev = d
                d, df = os.path.split(d)
                f = os.path.join(df, f)
            if d in src_dirs:
                if path.endswith('.py') and f==oldf:
                    continue    # it's a module, not data
                mf.setdefault(src_dirs[d],[]).append(path)

    def get_data_files(self): pass  # kludge 2.4 for lazy computation

    if sys.version<"2.4":    # Python 2.4 already has this code
        def get_outputs(self, include_bytecode=1):
            """Return complete list of files copied to the build directory

            This includes both '.py' files and data files, as well as '.pyc'
            and '.pyo' files if 'include_bytecode' is true.  (This method is
            needed for the 'install_lib' command to do its job properly, and to
            generate a correct installation manifest.)
            """
            return _build_py.get_outputs(self, include_bytecode) + [
                os.path.join(build_dir, filename)
                for package, src_dir, build_dir,filenames in self.data_files
                for filename in filenames
                ]

    def check_package(self, package, package_dir):
        """Check namespace packages' __init__ for declare_namespace"""
        try:
            return self.packages_checked[package]
        except KeyError:
            pass

        init_py = _build_py.check_package(self, package, package_dir)
        self.packages_checked[package] = init_py

        if not init_py or not self.distribution.namespace_packages:
            return init_py

        for pkg in self.distribution.namespace_packages:
            if pkg==package or pkg.startswith(package+'.'):
                break
        else:
            return init_py

        f = open(init_py,'rbU')
        if 'declare_namespace'.encode() not in f.read():
            from distutils import log
            log.warn(
                "WARNING: %s is a namespace package, but its __init__.py does\n"
                "not declare_namespace(); setuptools 0.7 will REQUIRE this!\n"
                '(See the setuptools manual under "Namespace Packages" for '
                "details.)\n", package
            )
        f.close()
        return init_py

    def initialize_options(self):
        self.packages_checked={}
        _build_py.initialize_options(self)

    def get_package_dir(self, package):
        res = _build_py.get_package_dir(self, package)
        if self.distribution.src_root is not None:
            return os.path.join(self.distribution.src_root, res)
        return res

    def exclude_data_files(self, package, src_dir, files):
        """Filter filenames for package's data files in 'src_dir'"""
        globs = (self.exclude_package_data.get('', [])
                 + self.exclude_package_data.get(package, []))
        bad = []
        for pattern in globs:
            bad.extend(
                fnmatch.filter(
                    files, os.path.join(src_dir, convert_path(pattern))
                )
            )
        bad = dict.fromkeys(bad)
        seen = {}
        return [
            f for f in files if f not in bad
                and f not in seen and seen.setdefault(f,1)  # ditch dupes
        ]


def assert_relative(path):
    if not os.path.isabs(path):
        return path
    from distutils.errors import DistutilsSetupError
    msg = textwrap.dedent("""
        Error: setup script specifies an absolute path:

            %s

        setup() arguments must *always* be /-separated paths relative to the
        setup.py directory, *never* absolute paths.
        """).lstrip() % path
    raise DistutilsSetupError(msg)
python3.4/site-packages/setuptools/command/build_ext.py000064400000027116151735050000017225 0ustar00from distutils.command.build_ext import build_ext as _du_build_ext
try:
    # Attempt to use Pyrex for building extensions, if available
    from Pyrex.Distutils.build_ext import build_ext as _build_ext
except ImportError:
    _build_ext = _du_build_ext

import os, sys
from distutils.file_util import copy_file
from setuptools.extension import Library
from distutils.ccompiler import new_compiler
from distutils.sysconfig import customize_compiler
try:
    # Python 2.7 or >=3.2
    from sysconfig import _CONFIG_VARS
except ImportError:
    from distutils.sysconfig import get_config_var
    get_config_var("LDSHARED")  # make sure _config_vars is initialized
    del get_config_var
    from distutils.sysconfig import _config_vars as _CONFIG_VARS
from distutils import log
from distutils.errors import *

have_rtld = False
use_stubs = False
libtype = 'shared'

if sys.platform == "darwin":
    use_stubs = True
elif os.name != 'nt':
    try:
        from dl import RTLD_NOW
        have_rtld = True
        use_stubs = True
    except ImportError:
        pass

def if_dl(s):
    if have_rtld:
        return s
    return ''






class build_ext(_build_ext):
    def run(self):
        """Build extensions in build directory, then copy if --inplace"""
        old_inplace, self.inplace = self.inplace, 0
        _build_ext.run(self)
        self.inplace = old_inplace
        if old_inplace:
            self.copy_extensions_to_source()

    def copy_extensions_to_source(self):
        build_py = self.get_finalized_command('build_py')
        for ext in self.extensions:
            fullname = self.get_ext_fullname(ext.name)
            filename = self.get_ext_filename(fullname)
            modpath = fullname.split('.')
            package = '.'.join(modpath[:-1])
            package_dir = build_py.get_package_dir(package)
            dest_filename = os.path.join(package_dir,os.path.basename(filename))
            src_filename = os.path.join(self.build_lib,filename)

            # Always copy, even if source is older than destination, to ensure
            # that the right extensions for the current Python/platform are
            # used.
            copy_file(
                src_filename, dest_filename, verbose=self.verbose,
                dry_run=self.dry_run
            )
            if ext._needs_stub:
                self.write_stub(package_dir or os.curdir, ext, True)


    if _build_ext is not _du_build_ext and not hasattr(_build_ext,'pyrex_sources'):
        # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4
        def swig_sources(self, sources, *otherargs):
            # first do any Pyrex processing
            sources = _build_ext.swig_sources(self, sources) or sources
            # Then do any actual SWIG stuff on the remainder
            return _du_build_ext.swig_sources(self, sources, *otherargs)



    def get_ext_filename(self, fullname):
        filename = _build_ext.get_ext_filename(self,fullname)
        if fullname in self.ext_map:
            ext = self.ext_map[fullname]
            if isinstance(ext,Library):
                fn, ext = os.path.splitext(filename)
                return self.shlib_compiler.library_filename(fn,libtype)
            elif use_stubs and ext._links_to_dynamic:
                d,fn = os.path.split(filename)
                return os.path.join(d,'dl-'+fn)
        return filename

    def initialize_options(self):
        _build_ext.initialize_options(self)
        self.shlib_compiler = None
        self.shlibs = []
        self.ext_map = {}

    def finalize_options(self):
        _build_ext.finalize_options(self)
        self.extensions = self.extensions or []
        self.check_extensions_list(self.extensions)
        self.shlibs = [ext for ext in self.extensions
                        if isinstance(ext,Library)]
        if self.shlibs:
            self.setup_shlib_compiler()
        for ext in self.extensions:
            ext._full_name = self.get_ext_fullname(ext.name)
        for ext in self.extensions:
            fullname = ext._full_name
            self.ext_map[fullname] = ext

            # distutils 3.1 will also ask for module names
            # XXX what to do with conflicts?
            self.ext_map[fullname.split('.')[-1]] = ext

            ltd = ext._links_to_dynamic = \
                self.shlibs and self.links_to_dynamic(ext) or False
            ext._needs_stub = ltd and use_stubs and not isinstance(ext,Library)
            filename = ext._file_name = self.get_ext_filename(fullname)
            libdir = os.path.dirname(os.path.join(self.build_lib,filename))
            if ltd and libdir not in ext.library_dirs:
                ext.library_dirs.append(libdir)
            if ltd and use_stubs and os.curdir not in ext.runtime_library_dirs:
                ext.runtime_library_dirs.append(os.curdir)

    def setup_shlib_compiler(self):
        compiler = self.shlib_compiler = new_compiler(
            compiler=self.compiler, dry_run=self.dry_run, force=self.force
        )
        if sys.platform == "darwin":
            tmp = _CONFIG_VARS.copy()
            try:
                # XXX Help!  I don't have any idea whether these are right...
                _CONFIG_VARS['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup"
                _CONFIG_VARS['CCSHARED'] = " -dynamiclib"
                _CONFIG_VARS['SO'] = ".dylib"
                customize_compiler(compiler)
            finally:
                _CONFIG_VARS.clear()
                _CONFIG_VARS.update(tmp)
        else:
            customize_compiler(compiler)

        if self.include_dirs is not None:
            compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for (name,value) in self.define:
                compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                compiler.undefine_macro(macro)
        if self.libraries is not None:
            compiler.set_libraries(self.libraries)
        if self.library_dirs is not None:
            compiler.set_library_dirs(self.library_dirs)
        if self.rpath is not None:
            compiler.set_runtime_library_dirs(self.rpath)
        if self.link_objects is not None:
            compiler.set_link_objects(self.link_objects)

        # hack so distutils' build_extension() builds a library instead
        compiler.link_shared_object = link_shared_object.__get__(compiler)



    def get_export_symbols(self, ext):
        if isinstance(ext,Library):
            return ext.export_symbols
        return _build_ext.get_export_symbols(self,ext)

    def build_extension(self, ext):
        _compiler = self.compiler
        try:
            if isinstance(ext,Library):
                self.compiler = self.shlib_compiler
            _build_ext.build_extension(self,ext)
            if ext._needs_stub:
                self.write_stub(
                    self.get_finalized_command('build_py').build_lib, ext
                )
        finally:
            self.compiler = _compiler

    def links_to_dynamic(self, ext):
        """Return true if 'ext' links to a dynamic lib in the same package"""
        # XXX this should check to ensure the lib is actually being built
        # XXX as dynamic, and not just using a locally-found version or a
        # XXX static-compiled version
        libnames = dict.fromkeys([lib._full_name for lib in self.shlibs])
        pkg = '.'.join(ext._full_name.split('.')[:-1]+[''])
        for libname in ext.libraries:
            if pkg+libname in libnames: return True
        return False

    def get_outputs(self):
        outputs = _build_ext.get_outputs(self)
        optimize = self.get_finalized_command('build_py').optimize
        for ext in self.extensions:
            if ext._needs_stub:
                base = os.path.join(self.build_lib, *ext._full_name.split('.'))
                outputs.append(base+'.py')
                outputs.append(base+'.pyc')
                if optimize:
                    outputs.append(base+'.pyo')
        return outputs

    def write_stub(self, output_dir, ext, compile=False):
        log.info("writing stub loader for %s to %s",ext._full_name, output_dir)
        stub_file = os.path.join(output_dir, *ext._full_name.split('.'))+'.py'
        if compile and os.path.exists(stub_file):
            raise DistutilsError(stub_file+" already exists! Please delete.")
        if not self.dry_run:
            f = open(stub_file,'w')
            f.write('\n'.join([
                "def __bootstrap__():",
                "   global __bootstrap__, __file__, __loader__",
                "   import sys, os, pkg_resources, imp"+if_dl(", dl"),
                "   __file__ = pkg_resources.resource_filename(__name__,%r)"
                   % os.path.basename(ext._file_name),
                "   del __bootstrap__",
                "   if '__loader__' in globals():",
                "       del __loader__",
                if_dl("   old_flags = sys.getdlopenflags()"),
                "   old_dir = os.getcwd()",
                "   try:",
                "     os.chdir(os.path.dirname(__file__))",
                if_dl("     sys.setdlopenflags(dl.RTLD_NOW)"),
                "     imp.load_dynamic(__name__,__file__)",
                "   finally:",
                if_dl("     sys.setdlopenflags(old_flags)"),
                "     os.chdir(old_dir)",
                "__bootstrap__()",
                "" # terminal \n
            ]))
            f.close()
        if compile:
            from distutils.util import byte_compile
            byte_compile([stub_file], optimize=0,
                         force=True, dry_run=self.dry_run)
            optimize = self.get_finalized_command('install_lib').optimize
            if optimize > 0:
                byte_compile([stub_file], optimize=optimize,
                             force=True, dry_run=self.dry_run)
            if os.path.exists(stub_file) and not self.dry_run:
                os.unlink(stub_file)


if use_stubs or os.name=='nt':
    # Build shared libraries
    #
    def link_shared_object(self, objects, output_libname, output_dir=None,
        libraries=None, library_dirs=None, runtime_library_dirs=None,
        export_symbols=None, debug=0, extra_preargs=None,
        extra_postargs=None, build_temp=None, target_lang=None
    ):  self.link(
            self.SHARED_LIBRARY, objects, output_libname,
            output_dir, libraries, library_dirs, runtime_library_dirs,
            export_symbols, debug, extra_preargs, extra_postargs,
            build_temp, target_lang
        )
else:
    # Build static libraries everywhere else
    libtype = 'static'

    def link_shared_object(self, objects, output_libname, output_dir=None,
        libraries=None, library_dirs=None, runtime_library_dirs=None,
        export_symbols=None, debug=0, extra_preargs=None,
        extra_postargs=None, build_temp=None, target_lang=None
    ):
        # XXX we need to either disallow these attrs on Library instances,
        #     or warn/abort here if set, or something...
        #libraries=None, library_dirs=None, runtime_library_dirs=None,
        #export_symbols=None, extra_preargs=None, extra_postargs=None,
        #build_temp=None

        assert output_dir is None   # distutils build_ext doesn't pass this
        output_dir,filename = os.path.split(output_libname)
        basename, ext = os.path.splitext(filename)
        if self.library_filename("x").startswith('lib'):
            # strip 'lib' prefix; this is kludgy if some platform uses
            # a different prefix
            basename = basename[3:]

        self.create_static_lib(
            objects, basename, output_dir, debug, target_lang
        )


python3.4/site-packages/setuptools/command/register.py000064400000000425151735050000017064 0ustar00from distutils.command.register import register as _register

class register(_register):
    __doc__ = _register.__doc__

    def run(self):
        # Make sure that we are using valid current name/version info
        self.run_command('egg_info')
        _register.run(self)

python3.4/site-packages/setuptools/command/bdist_egg.py000064400000044436151735050000017201 0ustar00"""setuptools.command.bdist_egg

Build .egg distributions"""

# This module should be kept compatible with Python 2.3
import sys, os, marshal
from setuptools import Command
from distutils.dir_util import remove_tree, mkpath
try:
    # Python 2.7 or >=3.2
    from sysconfig import get_path, get_python_version
    def _get_purelib():
        return get_path("purelib")
except ImportError:
    from distutils.sysconfig import get_python_lib, get_python_version
    def _get_purelib():
        return get_python_lib(False)

from distutils import log
from distutils.errors import DistutilsSetupError
from pkg_resources import get_build_platform, Distribution, ensure_directory
from pkg_resources import EntryPoint
from types import CodeType
from setuptools.compat import basestring, next
from setuptools.extension import Library

def strip_module(filename):
    if '.' in filename:
        filename = os.path.splitext(filename)[0]
    if filename.endswith('module'):
        filename = filename[:-6]
    return filename

def write_stub(resource, pyfile):
    f = open(pyfile,'w')
    f.write('\n'.join([
        "def __bootstrap__():",
        "   global __bootstrap__, __loader__, __file__",
        "   import sys, pkg_resources, imp",
        "   __file__ = pkg_resources.resource_filename(__name__,%r)"
            % resource,
        "   __loader__ = None; del __bootstrap__, __loader__",
        "   imp.load_dynamic(__name__,__file__)",
        "__bootstrap__()",
        "" # terminal \n
    ]))
    f.close()

# stub __init__.py for packages distributed without one
NS_PKG_STUB = '__import__("pkg_resources").declare_namespace(__name__)'

class bdist_egg(Command):

    description = "create an \"egg\" distribution"

    user_options = [
        ('bdist-dir=', 'b',
            "temporary directory for creating the distribution"),
        ('plat-name=', 'p',
                     "platform name to embed in generated filenames "
                     "(default: %s)" % get_build_platform()),
        ('exclude-source-files', None,
                     "remove all .py files from the generated egg"),
        ('keep-temp', 'k',
                     "keep the pseudo-installation tree around after " +
                     "creating the distribution archive"),
        ('dist-dir=', 'd',
                     "directory to put final built distributions in"),
        ('skip-build', None,
                     "skip rebuilding everything (for testing/debugging)"),
    ]

    boolean_options = [
        'keep-temp', 'skip-build', 'exclude-source-files'
    ]

















    def initialize_options (self):
        self.bdist_dir = None
        self.plat_name = None
        self.keep_temp = 0
        self.dist_dir = None
        self.skip_build = 0
        self.egg_output = None
        self.exclude_source_files = None


    def finalize_options(self):
        ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info")
        self.egg_info = ei_cmd.egg_info

        if self.bdist_dir is None:
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'egg')

        if self.plat_name is None:
            self.plat_name = get_build_platform()

        self.set_undefined_options('bdist',('dist_dir', 'dist_dir'))

        if self.egg_output is None:

            # Compute filename of the output egg
            basename = Distribution(
                None, None, ei_cmd.egg_name, ei_cmd.egg_version,
                get_python_version(),
                self.distribution.has_ext_modules() and self.plat_name
            ).egg_name()

            self.egg_output = os.path.join(self.dist_dir, basename+'.egg')








    def do_install_data(self):
        # Hack for packages that install data to install's --install-lib
        self.get_finalized_command('install').install_lib = self.bdist_dir

        site_packages = os.path.normcase(os.path.realpath(_get_purelib()))
        old, self.distribution.data_files = self.distribution.data_files,[]

        for item in old:
            if isinstance(item,tuple) and len(item)==2:
                if os.path.isabs(item[0]):
                    realpath = os.path.realpath(item[0])
                    normalized = os.path.normcase(realpath)
                    if normalized==site_packages or normalized.startswith(
                        site_packages+os.sep
                    ):
                        item = realpath[len(site_packages)+1:], item[1]
                    # XXX else: raise ???
            self.distribution.data_files.append(item)

        try:
            log.info("installing package data to %s" % self.bdist_dir)
            self.call_command('install_data', force=0, root=None)
        finally:
            self.distribution.data_files = old


    def get_outputs(self):
        return [self.egg_output]


    def call_command(self,cmdname,**kw):
        """Invoke reinitialized command `cmdname` with keyword args"""
        for dirname in INSTALL_DIRECTORY_ATTRS:
            kw.setdefault(dirname,self.bdist_dir)
        kw.setdefault('skip_build',self.skip_build)
        kw.setdefault('dry_run', self.dry_run)
        cmd = self.reinitialize_command(cmdname, **kw)
        self.run_command(cmdname)
        return cmd


    def run(self):
        # Generate metadata first
        self.run_command("egg_info")
        # We run install_lib before install_data, because some data hacks
        # pull their data path from the install_lib command.
        log.info("installing library code to %s" % self.bdist_dir)
        instcmd = self.get_finalized_command('install')
        old_root = instcmd.root; instcmd.root = None
        if self.distribution.has_c_libraries() and not self.skip_build:
            self.run_command('build_clib')
        cmd = self.call_command('install_lib', warn_dir=0)
        instcmd.root = old_root

        all_outputs, ext_outputs = self.get_ext_outputs()
        self.stubs = []
        to_compile = []
        for (p,ext_name) in enumerate(ext_outputs):
            filename,ext = os.path.splitext(ext_name)
            pyfile = os.path.join(self.bdist_dir, strip_module(filename)+'.py')
            self.stubs.append(pyfile)
            log.info("creating stub loader for %s" % ext_name)
            if not self.dry_run:
                write_stub(os.path.basename(ext_name), pyfile)
            to_compile.append(pyfile)
            ext_outputs[p] = ext_name.replace(os.sep,'/')

        to_compile.extend(self.make_init_files())
        if to_compile:
            cmd.byte_compile(to_compile)
        if self.distribution.data_files:
            self.do_install_data()

        # Make the EGG-INFO directory
        archive_root = self.bdist_dir
        egg_info = os.path.join(archive_root,'EGG-INFO')
        self.mkpath(egg_info)
        if self.distribution.scripts:
            script_dir = os.path.join(egg_info, 'scripts')
            log.info("installing scripts to %s" % script_dir)
            self.call_command('install_scripts',install_dir=script_dir,no_ep=1)

        self.copy_metadata_to(egg_info)
        native_libs = os.path.join(egg_info, "native_libs.txt")
        if all_outputs:
            log.info("writing %s" % native_libs)
            if not self.dry_run:
                ensure_directory(native_libs)
                libs_file = open(native_libs, 'wt')
                libs_file.write('\n'.join(all_outputs))
                libs_file.write('\n')
                libs_file.close()
        elif os.path.isfile(native_libs):
            log.info("removing %s" % native_libs)
            if not self.dry_run:
                os.unlink(native_libs)

        write_safety_flag(
            os.path.join(archive_root,'EGG-INFO'), self.zip_safe()
        )

        if os.path.exists(os.path.join(self.egg_info,'depends.txt')):
            log.warn(
                "WARNING: 'depends.txt' will not be used by setuptools 0.6!\n"
                "Use the install_requires/extras_require setup() args instead."
            )

        if self.exclude_source_files:
            self.zap_pyfiles()

        # Make the archive
        make_zipfile(self.egg_output, archive_root, verbose=self.verbose,
                          dry_run=self.dry_run, mode=self.gen_header())
        if not self.keep_temp:
            remove_tree(self.bdist_dir, dry_run=self.dry_run)

        # Add to 'Distribution.dist_files' so that the "upload" command works
        getattr(self.distribution,'dist_files',[]).append(
            ('bdist_egg',get_python_version(),self.egg_output))




    def zap_pyfiles(self):
        log.info("Removing .py files from temporary directory")
        for base,dirs,files in walk_egg(self.bdist_dir):
            for name in files:
                if name.endswith('.py'):
                    path = os.path.join(base,name)
                    log.debug("Deleting %s", path)
                    os.unlink(path)

    def zip_safe(self):
        safe = getattr(self.distribution,'zip_safe',None)
        if safe is not None:
            return safe
        log.warn("zip_safe flag not set; analyzing archive contents...")
        return analyze_egg(self.bdist_dir, self.stubs)

    def make_init_files(self):
        """Create missing package __init__ files"""
        init_files = []
        for base,dirs,files in walk_egg(self.bdist_dir):
            if base==self.bdist_dir:
                # don't put an __init__ in the root
                continue
            for name in files:
                if name.endswith('.py'):
                    if '__init__.py' not in files:
                        pkg = base[len(self.bdist_dir)+1:].replace(os.sep,'.')
                        if self.distribution.has_contents_for(pkg):
                            log.warn("Creating missing __init__.py for %s",pkg)
                            filename = os.path.join(base,'__init__.py')
                            if not self.dry_run:
                                f = open(filename,'w'); f.write(NS_PKG_STUB)
                                f.close()
                            init_files.append(filename)
                    break
            else:
                # not a package, don't traverse to subdirectories
                dirs[:] = []

        return init_files

    def gen_header(self):
        epm = EntryPoint.parse_map(self.distribution.entry_points or '')
        ep = epm.get('setuptools.installation',{}).get('eggsecutable')
        if ep is None:
            return 'w'  # not an eggsecutable, do it the usual way.

        if not ep.attrs or ep.extras:
            raise DistutilsSetupError(
                "eggsecutable entry point (%r) cannot have 'extras' "
                "or refer to a module" % (ep,)
            )

        pyver = sys.version[:3]
        pkg = ep.module_name
        full = '.'.join(ep.attrs)
        base = ep.attrs[0]
        basename = os.path.basename(self.egg_output)

        header = (
            "#!/bin/sh\n"
            'if [ `basename $0` = "%(basename)s" ]\n'
            'then exec python%(pyver)s -c "'
            "import sys, os; sys.path.insert(0, os.path.abspath('$0')); "
            "from %(pkg)s import %(base)s; sys.exit(%(full)s())"
            '" "$@"\n'
            'else\n'
            '  echo $0 is not the correct name for this egg file.\n'
            '  echo Please rename it back to %(basename)s and try again.\n'
            '  exec false\n'
            'fi\n'

        ) % locals()

        if not self.dry_run:
            mkpath(os.path.dirname(self.egg_output), dry_run=self.dry_run)
            f = open(self.egg_output, 'w')
            f.write(header)
            f.close()
        return 'a'


    def copy_metadata_to(self, target_dir):
        "Copy metadata (egg info) to the target_dir"
        # normalize the path (so that a forward-slash in egg_info will
        # match using startswith below)
        norm_egg_info = os.path.normpath(self.egg_info)
        prefix = os.path.join(norm_egg_info,'')
        for path in self.ei_cmd.filelist.files:
            if path.startswith(prefix):
                target = os.path.join(target_dir, path[len(prefix):])
                ensure_directory(target)
                self.copy_file(path, target)

    def get_ext_outputs(self):
        """Get a list of relative paths to C extensions in the output distro"""

        all_outputs = []
        ext_outputs = []

        paths = {self.bdist_dir:''}
        for base, dirs, files in os.walk(self.bdist_dir):
            for filename in files:
                if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS:
                    all_outputs.append(paths[base]+filename)
            for filename in dirs:
                paths[os.path.join(base,filename)] = paths[base]+filename+'/'

        if self.distribution.has_ext_modules():
            build_cmd = self.get_finalized_command('build_ext')
            for ext in build_cmd.extensions:
                if isinstance(ext,Library):
                    continue
                fullname = build_cmd.get_ext_fullname(ext.name)
                filename = build_cmd.get_ext_filename(fullname)
                if not os.path.basename(filename).startswith('dl-'):
                    if os.path.exists(os.path.join(self.bdist_dir,filename)):
                        ext_outputs.append(filename)

        return all_outputs, ext_outputs


NATIVE_EXTENSIONS = dict.fromkeys('.dll .so .dylib .pyd'.split())




def walk_egg(egg_dir):
    """Walk an unpacked egg's contents, skipping the metadata directory"""
    walker = os.walk(egg_dir)
    base,dirs,files = next(walker)
    if 'EGG-INFO' in dirs:
        dirs.remove('EGG-INFO')
    yield base,dirs,files
    for bdf in walker:
        yield bdf

def analyze_egg(egg_dir, stubs):
    # check for existing flag in EGG-INFO
    for flag,fn in safety_flags.items():
        if os.path.exists(os.path.join(egg_dir,'EGG-INFO',fn)):
            return flag
    if not can_scan(): return False
    safe = True
    for base, dirs, files in walk_egg(egg_dir):
        for name in files:
            if name.endswith('.py') or name.endswith('.pyw'):
                continue
            elif name.endswith('.pyc') or name.endswith('.pyo'):
                # always scan, even if we already know we're not safe
                safe = scan_module(egg_dir, base, name, stubs) and safe
    return safe

def write_safety_flag(egg_dir, safe):
    # Write or remove zip safety flag file(s)
    for flag,fn in safety_flags.items():
        fn = os.path.join(egg_dir, fn)
        if os.path.exists(fn):
            if safe is None or bool(safe) != flag:
                os.unlink(fn)
        elif safe is not None and bool(safe)==flag:
            f=open(fn,'wt'); f.write('\n'); f.close()

safety_flags = {
    True: 'zip-safe',
    False: 'not-zip-safe',
}

def scan_module(egg_dir, base, name, stubs):
    """Check whether module possibly uses unsafe-for-zipfile stuff"""

    filename = os.path.join(base,name)
    if filename[:-1] in stubs:
        return True     # Extension module
    pkg = base[len(egg_dir)+1:].replace(os.sep,'.')
    module = pkg+(pkg and '.' or '')+os.path.splitext(name)[0]
    if sys.version_info < (3, 3):
        skip = 8   # skip magic & date
    else:
        skip = 12  # skip magic & date & file size
    f = open(filename,'rb'); f.read(skip)
    code = marshal.load(f); f.close()
    safe = True
    symbols = dict.fromkeys(iter_symbols(code))
    for bad in ['__file__', '__path__']:
        if bad in symbols:
            log.warn("%s: module references %s", module, bad)
            safe = False
    if 'inspect' in symbols:
        for bad in [
            'getsource', 'getabsfile', 'getsourcefile', 'getfile'
            'getsourcelines', 'findsource', 'getcomments', 'getframeinfo',
            'getinnerframes', 'getouterframes', 'stack', 'trace'
        ]:
            if bad in symbols:
                log.warn("%s: module MAY be using inspect.%s", module, bad)
                safe = False
    if '__name__' in symbols and '__main__' in symbols and '.' not in module:
        if sys.version[:3]=="2.4":  # -m works w/zipfiles in 2.5
            log.warn("%s: top-level module may be 'python -m' script", module)
            safe = False
    return safe

def iter_symbols(code):
    """Yield names and strings used by `code` and its nested code objects"""
    for name in code.co_names: yield name
    for const in code.co_consts:
        if isinstance(const,basestring):
            yield const
        elif isinstance(const,CodeType):
            for name in iter_symbols(const):
                yield name

def can_scan():
    if not sys.platform.startswith('java') and sys.platform != 'cli':
        # CPython, PyPy, etc.
        return True
    log.warn("Unable to analyze compiled code on this platform.")
    log.warn("Please ask the author to include a 'zip_safe'"
             " setting (either True or False) in the package's setup.py")


































# Attribute names of options for commands that might need to be convinced to
# install to the egg build directory

INSTALL_DIRECTORY_ATTRS = [
    'install_lib', 'install_dir', 'install_data', 'install_base'
]

def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None,
    mode='w'
):
    """Create a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    """
    import zipfile
    mkpath(os.path.dirname(zip_filename), dry_run=dry_run)
    log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir)

    def visit(z, dirname, names):
        for name in names:
            path = os.path.normpath(os.path.join(dirname, name))
            if os.path.isfile(path):
                p = path[len(base_dir)+1:]
                if not dry_run:
                    z.write(path, p)
                log.debug("adding '%s'" % p)

    if compress is None:
        compress = (sys.version>="2.4") # avoid 2.3 zipimport bug when 64 bits

    compression = [zipfile.ZIP_STORED, zipfile.ZIP_DEFLATED][bool(compress)]
    if not dry_run:
        z = zipfile.ZipFile(zip_filename, mode, compression=compression)
        for dirname, dirs, files in os.walk(base_dir):
            visit(z, dirname, files)
        z.close()
    else:
        for dirname, dirs, files in os.walk(base_dir):
            visit(None, dirname, files)
    return zip_filename
#
python3.4/site-packages/setuptools/command/__pycache__/build_py.cpython-34.pyc000064400000020255151735050000023334 0ustar00�
M�Re� �
@s�ddlZddlZddlZddlZddlmZddlmZddl	m	Z	yddl
mZWn%ek
r�Gdd�d�ZYnXGdd	�d	ee�Zd
d�Z
dS)�N)�build_py)�convert_path)�glob)�	Mixin2to3c@seZdZddd�ZdS)rTcCsdS)z
do nothingN�)�self�filesZdoctestsrr�6/tmp/pip-l4uy7dan-build/setuptools/command/build_py.py�run_2to3
szMixin2to3.run_2to3N)�__name__�
__module__�__qualname__r
rrrr	rsrc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Ze
jdkr�ddd�Zndd�Zdd�Zdd�Zdd�Zd S)!raXEnhanced 'build_py' command that includes data files with packages

    The data files are specified via a 'package_data' argument to 'setup()'.
    See 'setuptools.dist.Distribution' for more details.

    Also, this version of the 'build_py' command allows you to specify both
    'py_modules' and 'packages' in the same setup operation.
    cCsctj|�|jj|_|jjp+i|_d|jkrM|jd=ng|_g|_dS)N�
data_files)�	_build_py�finalize_options�distribution�package_data�exclude_package_data�__dict__�_build_py__updated_files�_build_py__doctests_2to3)rrrr	rs

	zbuild_py.finalize_optionscCs�|jr|jrdS|jr.|j�n|jrN|j�|j�n|j|jd�|j|jd�|j|jd�|jt	j
|dd��dS)z?Build modules, packages, and copy data files to build directoryNFT�include_bytecoder)�
py_modules�packagesZ
build_modulesZbuild_packages�build_package_datar
rr�byte_compiler�get_outputs)rrrr	�run!s	
	

zbuild_py.runcCs3|dkr#|j�|_}|Stj||�S)Nr)�_get_data_filesrr�__getattr__)r�attrrrrr	r5szbuild_py.__getattr__cCsAtj||||�\}}|r7|jj|�n||fS)N)r�build_moduler�append)r�moduleZmodule_file�package�outfile�copiedrrr	r!;szbuild_py.build_modulecs�|j�g}x�|jpfD]�}|j|�}tjj|jg|jd��}t|�d��fdd�|j	||�D�}|j
||||f�q W|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�.�cs g|]}|�d��qS)Nr)�.0�file)�plenrr	�
<listcomp>Qs	z,build_py._get_data_files.<locals>.<listcomp>)�analyze_manifestr�get_package_dir�os�path�join�	build_lib�split�len�find_data_filesr")r�datar$�src_dir�	build_dir�	filenamesr)r+r	rAs
%%zbuild_py._get_data_filescCs�|jjdg�|jj|g�}|jj|g�dd�}x6|D].}|jttjj|t|����qNW|j	|||�S)z6Return filenames for package's data files in 'src_dir'�N)
r�get�manifest_files�extendrr/r0r1r�exclude_data_files)rr$r7�globsr�patternrrr	r5Vs
,zbuild_py.find_data_filesc
Cs�x�|jD]�\}}}}x�|D]�}tjj||�}|jtjj|��tjj||�}|j||�\}}	tjj|�}|	r#||jj	kr#|j
j|�q#q#Wq
WdS)z$Copy data files into build directoryN)rr/r0r1�mkpath�dirname�	copy_file�abspathrZconvert_2to3_doctestsrr")
rr$r7r8r9�filename�target�srcfile�outfr&rrr	r`s
zbuild_py.build_package_datacCs\i|_}|jjsdSi}x0|jp2fD]}||t|j|��<q3W|jd�|jd�}x�|jj	D]�}t
jjt|��\}}d}|}	xU|r||kr||kr|}t
jj|�\}}
t
jj
|
|�}q�W||kr|jd�r4||	kr4qn|j||g�j|�qqWdS)N�egg_infoz.py)r<rZinclude_package_datar�assert_relativer.�run_command�get_finalized_command�filelistrr/r0r3r1�endswith�
setdefaultr")rZmfZsrc_dirsr$Zei_cmdr0�d�f�prevZoldfZdfrrr	r-ls(

!zbuild_py.analyze_manifestcCsdS)Nr)rrrr	�get_data_files�szbuild_py.get_data_filesz2.4r(cCs$tj||�dd�|jD�S)ajReturn complete list of files copied to the build directory

            This includes both '.py' files and data files, as well as '.pyc'
            and '.pyo' files if 'include_bytecode' is true.  (This method is
            needed for the 'install_lib' command to do its job properly, and to
            generate a correct installation manifest.)
            cSs>g|]4\}}}}|D]}tjj||��qqSr)r/r0r1)r)r$r7r8r9rErrr	r,�s	z(build_py.get_outputs.<locals>.<listcomp>)rrr)rrrrr	r�s	zbuild_py.get_outputscCs�y|j|SWntk
r#YnXtj|||�}||j|<|sZ|jjr^|Sx;|jjD])}||ks�|j|d�rkPqkqkW|St|d�}dj�|j	�kr�ddl
m}|jd|�n|j
�|S)z8Check namespace packages' __init__ for declare_namespacer'ZrbU�declare_namespacer)�logz�WARNING: %s is a namespace package, but its __init__.py does
not declare_namespace(); setuptools 0.7 will REQUIRE this!
(See the setuptools manual under "Namespace Packages" for details.)
)�packages_checked�KeyErrorr�
check_packagerZnamespace_packages�
startswith�open�encode�read�	distutilsrU�warn�close)rr$�package_dirZinit_py�pkgrQrUrrr	rX�s(



zbuild_py.check_packagecCsi|_tj|�dS)N)rVr�initialize_options)rrrr	rb�s	zbuild_py.initialize_optionscCsAtj||�}|jjdk	r=tjj|jj|�S|S)N)rr.rZsrc_rootr/r0r1)rr$�resrrr	r.�szbuild_py.get_package_dircs�|jjdg�|jj|g�}g�x<|D]4}�jtj|tjj|t|����q5Wt	j
���i���fdd�|D�S)z6Filter filenames for package's data files in 'src_dir'r:cs@g|]6}|�kr|�kr�j|d�r|�qS)r()rO)r)rQ)�bad�seenrr	r,�s	z/build_py.exclude_data_files.<locals>.<listcomp>)rr;r=�fnmatch�filterr/r0r1r�dict�fromkeys)rr$r7rr?r@r)rdrer	r>�s
&zbuild_py.exclude_data_filesN)rrr
�__doc__rrrr!rr5rr-rS�sys�versionrrXrbr.r>rrrr	rs 
rcCsOtjj|�s|Sddlm}tjd�j�|}||��dS)Nr)�DistutilsSetupErrorz�
        Error: setup script specifies an absolute path:

            %s

        setup() arguments must *always* be /-separated paths relative to the
        setup.py directory, *never* absolute paths.
        )r/r0�isabs�distutils.errorsrm�textwrap�dedent�lstrip)r0rm�msgrrr	rJ�srJ)r/rkrfrpZdistutils.command.build_pyrr�distutils.utilrrZsetuptools.lib2to3_exr�ImportErrorrJrrrr	�<module>s
�python3.4/site-packages/setuptools/command/__pycache__/build_ext.cpython-34.pyc000064400000022043151735050010023502 0ustar00�
M�ReN.�$@sddlmZyddlmZWnek
r>eZYnXddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZyddlmZWn?ek
r�ddlmZed	�[dd
lmZYnXddlmZddlTd
Zd
ZdZejdkr1dZnGejdkrxy ddlmZdZdZWqxek
rtYqxXndd�ZGdd�de�Zes�ejdkr�dddddddddddd�
Zn0dZdddddddddddd�
ZdS)�)�	build_extN)�	copy_file)�Library)�new_compiler)�customize_compiler)�_CONFIG_VARS)�get_config_var�LDSHARED)�_config_vars)�log)�*FZshared�darwinT�nt)�RTLD_NOWcCstr
|SdS)N�)�	have_rtld)�s�r�7/tmp/pip-l4uy7dan-build/setuptools/command/build_ext.py�if_dl&src@s�eZdZdd�Zdd�Zeek	rOeed�rOdd�Zndd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�Zdd�Zddd�ZdS)rcCs@|jd}|_tj|�||_|r<|j�ndS)z;Build extensions in build directory, then copy if --inplacerN)Zinplace�
_build_ext�run�copy_extensions_to_source)�selfZold_inplacerrrr1s

	z
build_ext.runc
Cs�|jd�}x�|jD]�}|j|j�}|j|�}|jd�}dj|dd��}|j|�}tj	j|tj	j
|��}tj	j|j|�}	t|	|d|j
d|j�|jr|j|p�tj|d�qqWdS)N�build_py�.��verbose�dry_runT���)�get_finalized_command�
extensions�get_ext_fullname�name�get_ext_filename�split�joinZget_package_dir�os�path�basename�	build_librrr�_needs_stub�
write_stub�curdir)
rr�ext�fullname�filenameZmodpath�package�package_dir�
dest_filenameZsrc_filenamerrrr9s!
	z#build_ext.copy_extensions_to_sourceZ
pyrex_sourcescGs+tj||�p|}tj|||�S)N)r�swig_sources�
_du_build_ext)r�sourcesZ	otherargsrrrr4Qszbuild_ext.swig_sourcescCs�tj||�}||jkr�|j|}t|t�rhtjj|�\}}|jj	|t
�Str�|jr�tjj
|�\}}tjj|d|�Sn|S)Nzdl-)rr$�ext_map�
isinstancerr'r(�splitext�shlib_compiler�library_filename�libtype�	use_stubs�_links_to_dynamicr%r&)rr/r0r.�fn�drrrr$Ys
zbuild_ext.get_ext_filenamecCs,tj|�d|_g|_i|_dS)N)r�initialize_optionsr:�shlibsr7)rrrrrAes
		zbuild_ext.initialize_optionscCs�tj|�|jpg|_|j|j�dd�|jD�|_|jr^|j�nx&|jD]}|j|j�|_qhWx|jD]}|j}||j	|<||j	|j
d�d<|jr�|j|�p�d}|_|ot
ot|t�|_|j|�}|_tjjtjj|j|��}|rm||jkrm|jj|�n|r�t
r�tj|jkr�|jjtj�q�q�WdS)NcSs%g|]}t|t�r|�qSr)r8r)�.0r.rrr�
<listcomp>os	z.build_ext.finalize_options.<locals>.<listcomp>rrFr)r�finalize_optionsr!Zcheck_extensions_listrB�setup_shlib_compilerr"r#�
_full_namer7r%�links_to_dynamicr>r=r8rr+r$�
_file_namer'r(�dirnamer&r*�library_dirs�appendr-�runtime_library_dirs)rr.r/Zltdr0ZlibdirrrrrEks(
	
	
%$zbuild_ext.finalize_optionscCs�td|jd|jd|j�}|_tjdkr�tj�}z,dtd<dtd<d	td
<t	|�Wdtj
�tj|�Xn
t	|�|jdk	r�|j
|j�n|jdk	r�x*|jD]\}}|j||�q�Wn|jdk	r+x!|jD]}|j|�qWn|jdk	rM|j|j�n|jdk	ro|j|j�n|jdk	r�|j|j�n|jdk	r�|j|j�ntj|�|_dS)N�compilerr�forcer
z0gcc -Wl,-x -dynamiclib -undefined dynamic_lookupr	z -dynamiclib�CCSHAREDz.dylib�SO)rrNrrOr:�sys�platformr�copyr�clear�update�include_dirsZset_include_dirsZdefineZdefine_macroZundefZundefine_macro�	librariesZ
set_librariesrKZset_library_dirsZrpathZset_runtime_library_dirsZlink_objectsZset_link_objects�link_shared_object�__get__)rrN�tmpr#�valueZmacrorrrrF�s:%




zbuild_ext.setup_shlib_compilercCs&t|t�r|jStj||�S)N)r8r�export_symbolsr�get_export_symbols)rr.rrrr^�szbuild_ext.get_export_symbolscCst|j}zZt|t�r*|j|_ntj||�|jrb|j|jd�j	|�nWd||_XdS)Nr)
rNr8rr:r�build_extensionr+r,r r*)rr.Z	_compilerrrrr_�s		zbuild_ext.build_extensioncCswtjdd�|jD��}dj|jjd�dd	�dg�}x%|jD]}|||krUdSqUWdS)
z?Return true if 'ext' links to a dynamic lib in the same packagecSsg|]}|j�qSr)rG)rC�librrrrD�s	z.build_ext.links_to_dynamic.<locals>.<listcomp>rNrrTFr)�dict�fromkeysrBr&rGr%rX)rr.Zlibnames�pkg�libnamerrrrH�s,zbuild_ext.links_to_dynamiccCs�tj|�}|jd�j}x}|jD]r}|jr+tjj|j	|j
jd��}|j|d�|j|d�|r�|j|d�q�q+q+W|S)Nrrz.pyz.pycz.pyo)
r�get_outputsr �optimizer!r+r'r(r&r*rGr%rL)r�outputsrfr.�baserrrre�s	$zbuild_ext.get_outputsFcCs�tjd|j|�tjj||jjd��d}|rftjj|�rft|d��n|j	st
|d�}|jdjddd	td
�dtjj
|j�dd
dtd�dddtd�ddtd�dddg��|j�n|r�ddlm}||gddddd|j	�|jd �j}|dkr�||gd|ddd|j	�ntjj|�r�|j	r�tj|�q�ndS)!Nz writing stub loader for %s to %srz.pyz already exists! Please delete.�w�
zdef __bootstrap__():z-   global __bootstrap__, __file__, __loader__z%   import sys, os, pkg_resources, impz, dlz:   __file__ = pkg_resources.resource_filename(__name__,%r)z   del __bootstrap__z    if '__loader__' in globals():z       del __loader__z#   old_flags = sys.getdlopenflags()z   old_dir = os.getcwd()z   try:z(     os.chdir(os.path.dirname(__file__))z$     sys.setdlopenflags(dl.RTLD_NOW)z(     imp.load_dynamic(__name__,__file__)z   finally:z"     sys.setdlopenflags(old_flags)z     os.chdir(old_dir)z__bootstrap__()rr)�byte_compilerfrOTr�install_lib)r�inforGr'r(r&r%�exists�DistutilsErrorr�open�writerr)rI�close�distutils.utilrkr rf�unlink)r�
output_dirr.�compileZ	stub_file�frkrfrrrr,�sJ%	
			

zbuild_ext.write_stubN)�__name__�
__module__�__qualname__rrrr5�hasattrr4r$rArErFr^r_rHrer,rrrrr0s)
rc

Cs8|j|j|||||||||	|
||�
dS)N)�linkZSHARED_LIBRARY)
r�objects�output_libnamerurXrKrMr]�debug�
extra_preargs�extra_postargs�
build_temp�target_langrrrrYs
rYZstaticc
Cs�|dkst�tjj|�\}}
tjj|
�\}}|jd�jd�rm|dd�}n|j|||||�dS)N�xr`�)�AssertionErrorr'r(r%r9r;�
startswithZcreate_static_lib)rr}r~rurXrKrMr]rr�r�r�r�r0r)r.rrrrYs) Zdistutils.command.build_extrr5ZPyrex.Distutils.build_extr�ImportErrorr'rR�distutils.file_utilrZsetuptools.extensionr�distutils.ccompilerr�distutils.sysconfigr�	sysconfigrrr
�	distutilsr�distutils.errorsrr=r<rSr#�dlrrrYrrrr�<module>sT



	


�					python3.4/site-packages/setuptools/command/__pycache__/setopt.cpython-34.pyc000064400000011506151735050010023043 0ustar00�
M�Re��@s�ddlZddlZddlmZddlmZddlmZddlTdddd	gZd
dd�Z	dd
d�Z
Gdd�de�ZGdd	�d	e�ZdS)�N)�Command)�convert_path)�log)�*�config_file�edit_config�option_base�setopt�localcCs�|dkrdS|dkr>tjjtjjtj�d�S|dkrtjdkr_dpbd}tjjtd	|��St	d
|��dS)z�Get the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    r
z	setup.cfg�globalz
distutils.cfg�user�posix�.�z~/%spydistutils.cfgz7config_file() type must be 'local', 'global', or 'user'N)
�os�path�join�dirname�	distutils�__file__�name�
expanduserr�
ValueError)�kind�dot�r�4/tmp/pip-l4uy7dan-build/setuptools/command/setopt.pyr
s	Fc
Cs�ddlm}tjd|�|j�}|j|g�x+|j�D]\}}|dkr�tjd||�|j|�qI|j	|�s�tjd||�|j
|�nx�|j�D]�\}}|dkr6tjd|||�|j||�|j|�sbtjd||�|j|�qbq�tjd	||||�|j
|||�q�WqIWtjd
|�|s�t|d�}	|j|	�|	j�ndS)aYEdit a configuration file to include `settings`

    `settings` is a dictionary of dictionaries or ``None`` values, keyed by
    command/section name.  A ``None`` value means to delete the entire section,
    while a dictionary lists settings to be changed or deleted in that section.
    A setting of ``None`` means to delete that setting.
    r)�ConfigParserzReading configuration from %sNzDeleting section [%s] from %szAdding new section [%s] to %szDeleting %s.%s from %sz#Deleting empty [%s] section from %szSetting %s.%s to %r in %sz
Writing %s�w)Zsetuptools.compatrr�debug�RawConfigParser�read�items�info�remove_section�has_section�add_section�
remove_option�options�set�open�write�close)
�filenameZsettings�dry_runr�opts�sectionr(�option�value�frrrr*s:	
	

c@sIeZdZdZdddgZddgZdd�Zd
d�ZdS)rz<Abstract base class for commands that mess with config files�
global-config�g�0save options to the site-wide distutils.cfg file�user-config�u�7save options to the current user's pydistutils.cfg file�	filename=r3�-configuration file to use (default=setup.cfg)cCsd|_d|_d|_dS)N)�
global_config�user_configr-)�selfrrr�initialize_optionscs		zoption_base.initialize_optionscCs�g}|jr%|jtd��n|jrD|jtd��n|jdk	rf|j|j�n|s�|jtd��nt|�dkr�td|��n|\|_dS)Nrrr
�z/Must specify only one configuration file option)r<�appendrr=r-�len�DistutilsOptionError)r>�	filenamesrrr�finalize_optionshs		zoption_base.finalize_optionsN)r4r5r6)r7r8r9)r:r3r;)�__name__�
__module__�__qualname__�__doc__�user_options�boolean_optionsr?rErrrrrSs	c@sieZdZdZdZddddgejZejdgZdd�Zdd�Z	dd�Z
dS)r	z#Save command-line options to a filez1set an option in setup.cfg or another config file�command=�c�command to set an option for�option=�o�
option to set�
set-value=�s�value of the option�remove�r�remove (unset) the valuecCs5tj|�d|_d|_d|_d|_dS)N)rr?�commandr1�	set_valuerU)r>rrrr?�s

			zsetopt.initialize_optionscCsftj|�|jdks+|jdkr:td��n|jdkrb|jrbtd��ndS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rrErXr1rCrYrU)r>rrrrE�s

zsetopt.finalize_optionscCs=t|jii|j|jjdd�6|j6|j�dS)N�-�_)rr-rYr1�replacerXr.)r>rrr�run�s	#z
setopt.runN)rLrMrN)rOrPrQ)rRrSrT)zremoverVrW)rFrGrHrI�descriptionrrJrKr?rEr]rrrrr	|s
)
rr�
setuptoolsr�distutils.utilrr�distutils.errors�__all__rrrr	rrrr�<module>s
 ))python3.4/site-packages/setuptools/command/__pycache__/__init__.cpython-34.pyc000064400000001274151735050010023265 0ustar00�
M�Re)�@s�dddddddddd	d
ddd
ddddddgZddlmZddlZddlmZdejkr�dejd<ejjd�n[[dS)�alias�	bdist_egg�	bdist_rpm�	build_ext�build_py�develop�easy_install�egg_info�install�install_lib�rotateZsaveopts�sdistZsetopt�test�install_egg_info�install_scripts�register�
bdist_wininstZupload_docs�)rN)�bdist�egg�Python .egg file)rr)	�__all__Zsetuptools.commandr�sysZdistutils.command.bdistrZformat_commandsZformat_command�append�rr�6/tmp/pip-l4uy7dan-build/setuptools/command/__init__.py�<module>s
python3.4/site-packages/setuptools/command/__pycache__/rotate.cpython-34.pyc000064400000005153151735050010023024 0ustar00�
M�Re�@s|ddlZddlZddlmZddlmZddlmZddlmZddl	TGdd�de�Z
dS)	�N)�Command)�
basestring)�convert_path)�log)�*c@sUeZdZdZdZdddgZgZdd
�Zdd�Zdd�Z	dS)�rotatezDelete older distributionsz2delete older distributions, keeping N newest files�match=�m�patterns to match (required)�	dist-dir=�d�%directory where the distributions are�keep=�k�(number of matching distributions to keepcCsd|_d|_d|_dS)N)�match�dist_dir�keep)�self�r�4/tmp/pip-l4uy7dan-build/setuptools/command/rotate.py�initialize_optionss		zrotate.initialize_optionscCs�|jdkrtd��n|jdkr<td��nyt|j�|_Wntk
rrtd��YnXt|jt�r�dd�|jjd�D�|_n|jdd	�dS)
NzQMust specify one or more (comma-separated) match patterns (e.g. '.zip' or '.egg')z$Must specify number of files to keepz--keep must be an integercSs"g|]}t|j���qSr)r�strip)�.0�prrr�
<listcomp>'s	z+rotate.finalize_options.<locals>.<listcomp>�,�bdistr)�dist_dirr)	r�DistutilsOptionErrorr�int�
ValueError�
isinstancer�split�set_undefined_options)rrrr�finalize_optionss
%zrotate.finalize_optionscCs�|jd�ddlm}x�|jD]�}|jj�d|}|tjj|j|��}dd�|D�}|j	�|j
�tjdt
|�|�||jd�}x=|D]5\}}tjd|�|js�tj|�q�q�Wq'WdS)	N�egg_infor)�globrcSs(g|]}tjj|�|f�qSr)�os�path�getmtime)r�frrrr1s	zrotate.run.<locals>.<listcomp>z%d file(s) matching %szDeleting %s)�run_commandr'r�distribution�get_namer(r)�joinr�sort�reverser�info�lenr�dry_run�unlink)rr'�pattern�files�tr+rrr�run+s


	z
rotate.runN)rr	r
)rrr
)rrr)
�__name__�
__module__�__qualname__�__doc__�description�user_options�boolean_optionsrr%r9rrrrrs	r)�	distutilsr(�
setuptoolsrZsetuptools.compatr�distutils.utilrr�distutils.errorsrrrrr�<module>s
python3.4/site-packages/setuptools/command/__pycache__/install.cpython-34.pyc000064400000006062151735050010023174 0ustar00�
M�Re��@s~ddlZddlZddlZddlmZddlmZGdd�de�Zdd�ejD�ej	e_dS)�N)�install)�DistutilsArgErrorc@s�eZdZdZejddgZejddgZddd	�fd
dd	�fgZee�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�ZdS)rz7Use easy_install to install the package, w/dependencies�old-and-unmanageableN�Try not to use this!�!single-version-externally-managed�5used by system package builders to create 'flat' eggs�install_egg_infocCsdS)NT�)�selfr	r	�5/tmp/pip-l4uy7dan-build/setuptools/command/install.py�<lambda>szinstall.<lambda>�install_scriptscCsdS)NTr	)r
r	r	rrscCs,tj|�d|_d|_d|_dS)N)�_install�initialize_options�old_and_unmanageable�!single_version_externally_managedZ
no_compile)r
r	r	rrs
		zinstall.initialize_optionscCsUtj|�|jr"d|_n/|jrQ|jrQ|jrQtd��qQndS)NTzAYou must specify --record or --root when building system packages)r�finalize_options�rootr�recordr)r
r	r	rrs
		zinstall.finalize_optionscCs5|js|jrtj|�Sd|_d|_dS)N�)rrr�handle_extra_path�	path_file�
extra_dirs)r
r	r	rr's
	zinstall.handle_extra_pathcCs�|js|jrtj|�Stjd�}|jjdd�}|jj	}|dksg|dkrwtj|�n
|j
�dS)N��__name__rzdistutils.dist�run_commands)rrr�run�sys�	_getframe�	f_globals�get�f_code�co_name�do_egg_install)r
ZcallerZ
caller_moduleZcaller_namer	r	rr2s
zinstall.runcCs�|jjd�}||jddd|jd|j�}|j�d|_|jjtjd��|j	d�|jj
d�jg}tj
r�|jd	tj
�n||_|j�dt_
dS)
N�easy_install�args�xrr�.z*.eggZ	bdist_eggr)�distribution�get_command_classrr�ensure_finalizedZalways_copy_fromZ
package_index�scan�glob�run_command�get_command_objZ
egg_output�
setuptoolsZbootstrap_install_from�insertr%r)r
r$�cmdr%r	r	rr#Ps$
	
		
zinstall.do_egg_install)rNr)rNr)r�
__module__�__qualname__�__doc__r�user_options�boolean_options�new_commands�dict�_ncrrrrr#r	r	r	rrs

rcCs)g|]}|dtjkr|�qS)r)rr9)�.0r1r	r	r�
<listcomp>js	r;)
r/rr,�distutils.command.installrr�distutils.errorsr�sub_commandsr7r	r	r	r�<module>s
$epython3.4/site-packages/setuptools/command/__pycache__/bdist_wininst.cpython-34.pyc000064400000003667151735050010024416 0ustar00�
M�Re��@sBddlmZddlZddlZGdd�de�ZdS)�)�
bdist_wininstNc@sneZdZdZZddd�Zdd�Zddd�Zd	d
�Ze	e
d�sjdd
�ZndS)rNcCshtj||||�|j|�}|jrL|j}dd|f|_nd}d||f|_dS)Nr�any)�_bdist_wininst�
create_exe�get_installer_filename�target_version�_bad_upload�_good_upload)�self�arcname�fullnameZbitmap�installer_nameZ	pyversion�r�;/tmp/pip-l4uy7dan-build/setuptools/command/bdist_wininst.pyrs		zbdist_wininst.create_execCsd|j|j}}t|jdg�}||krD|j|�n||kr`|j|�ndS)N�
dist_files)r	r�getattr�distribution�remove�append)r
Zgood�badrrrr�_fix_upload_namesszbdist_wininst._fix_upload_namesrcCs1|jj||�}|dkr-d|_n|S)N�install�install_lib)zinstallzinstall_lib)r�reinitialize_commandr)r
�command�reinit_subcommands�cmdrrrrs
	z"bdist_wininst.reinitialize_commandcCs5d|_ztj|�|j�Wdd|_XdS)NTF)Z_is_runningr�runr)r
rrrr!s
	
zbdist_wininst.runrcCsQ|jr1tjj|jd||jf�}ntjj|jd|�}|S)Nz%s.win32-py%s.exez%s.win32.exe)r�os�path�joinZdist_dir)r
rr
rrrr+s	
z$bdist_wininst.get_installer_filename)�__name__�
__module__�__qualname__r	rrrrr�hasattrrrrrrrrs
	r)Zdistutils.command.bdist_wininstrrr�sysrrrr�<module>spython3.4/site-packages/setuptools/command/__pycache__/easy_install.cpython-34.pyc000064400000163446151735050010024227 0ustar00�
M�Re�@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZddlmZmZddlZddlmZmZddlmZddlmZmZddlmZdd	lmZmZdd
l m!Z!m"Z"m#Z#m$Z$ddl%m&Z&m'Z'ddl(m)Z)dd
l*m+Z+ddl,m-Z-ddl,m.Z.ddl(m/Z/m0Z0ddl1m2Z2m3Z3m4Z4m5Z5m6Z6ddlm7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEejFjGdejHjIejJ��ZKddddddgZLdd�ZMdd�ZNejOdfkr�dd�ZPd d!�ZQnd"d�ZPd#d!�ZQGd$d�de�ZRd%d&�ZSd'd(�ZTd)d�ZUd*d�ZVd+d,�ZWGd-d�de=�ZXeKd.d/d0�ZYd1d2�ZZd3d4�Z[d5d6�Z\d7d8d9�Z]d:d;�Z^d<d=�Z_d>d?�Z`ydd@lmaZbWneck
r�dAdB�ZbYnXdCdD�ZadEdF�ZdGdGdH�dHee�ZfGdIdJ�dJef�ZgGdKdL�dLeg�ZhefjiZidMdN�ZjdOdP�Zkd.eZdQdR�ZldSdT�ZmdUdV�ZnddWd�ZodS)Xa
Easy Install
------------

A tool for doing automatic download/extract/build of distutils-based Python
packages.  For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.

__ https://pythonhosted.org/setuptools/easy_install.html

�N)�glob)�log�dir_util)�Command�_dont_write_bytecode)�	run_setup)�get_path�get_config_vars)�get_platform)�convert_path�
subst_vars)�DistutilsArgError�DistutilsOptionError�DistutilsError�DistutilsPlatformError)�INSTALL_SCHEMES�SCHEME_KEYS)�setopt)�unpack_archive)�PackageIndex)�
URL_SCHEME)�	bdist_egg�egg_info)�	iteritems�maxsize�
basestring�unicode�reraise)�yield_lines�normalize_path�resource_string�ensure_directory�get_distribution�find_distributions�Environment�Requirement�Distribution�PathMetadata�EggMetadata�
WorkingSet�DistributionNotFound�VersionConflict�DEVELOP_DISTZ__VENV_LAUNCHER__�samefile�easy_install�PthDistributions�extract_wininst_cfg�main�get_exe_prefixescCstjd�dkS)N�P�)�struct�calcsize�r7r7�:/tmp/pip-l4uy7dan-build/setuptools/command/easy_install.py�is_64bit@sr9cCs�tjj|�o!tjj|�}ttjd�o9|}|rUtjj||�Stjjtjj|��}tjjtjj|��}||kS)Nr-)�os�path�exists�hasattrr-�normpath�normcase)Zp1Zp2Z
both_existZuse_samefileZnorm_p1Znorm_p2r7r7r8r-Cs$�cCs|S)Nr7)�sr7r7r8�	_to_asciiMsrBcCs2yt|d�dSWntk
r-dSYnXdS)N�asciiTF)r�UnicodeError)rAr7r7r8�isasciiOs


rEcCs
|jd�S)NrC)�encode)rAr7r7r8rBVscCs2y|jd�dSWntk
r-dSYnXdS)NrCTF)rFrD)rAr7r7r8rEXs


c@s#eZdZdZdZdZd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZdd
dd
dd0d3d9d<g	Zej	r�d@ej
ZejdAdef�ejdA�nidd*6Z
eZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZdNdO�ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXdY�ZdZd[�Zd\d]�Zd^d_�Zd`da�Zdbdcdd�Z dbdedf�Z!dgdh�Z"ddidj�Z#dkdl�Z$dmdn�Z%dodp�Z&ddqdr�Z'dsfdtdu�Z(dvdw�Z)dxdy�Z*dzd{�Z+d|d}�Z,d~d�Z-d�d�d��Z.d�d��Z/d�d��Z0d�d��Z1d�d��Z2d�d��Z3d�d��Z4d�d��Z5d�d��Z6d�d��Z7d�d��Z8d�d��Z9e:d�e:d�d�d�d���Z;e:d�d�d�d��Z<d�d��Z=dS)�r.z'Manage a download/build/install processz Find/get/install Python packagesT�prefix=N�installation prefix�zip-ok�z�install package as a zipfile�
multi-version�m�%make apps have to require() a version�upgrade�U�1force upgrade (searches PyPI for latest versions)�install-dir=�d�install package to DIR�script-dir=rA�install scripts to DIR�exclude-scripts�x�Don't install scripts�always-copy�a�'Copy all needed packages to install dir�
index-url=�i� base URL of Python Package Index�find-links=�f�(additional URL(s) to search for packages�build-directory=�b�/download/extract/build in DIR; keep the results�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�record=�3filename in which to record list of installed files�always-unzip�Z�*don't install as a zipfile, no matter what�
site-dirs=�S�)list of directories where .pth files work�editable�e�+Install specified packages in editable form�no-deps�N�don't install dependencies�allow-hosts=�H�$pattern(s) that hostnames must match�local-snapshots-ok�l�(allow building eggs from local checkouts�version�"print version information and exit�
no-find-links�9Don't load find-links defined in packages being installedz!install in user site-package '%s'�usercCs�tjr3tjjt�}|jtj�|_n	d|_d|_	|_
d|_|_|_
d|_d|_d|_d|_d|_|_d|_|_|_d|_|_|_d|_|_|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%tjrQtj&|_'tj|_(nd|_'d|_(d|_)d|_*d|_+|_,d|_-i|_.d|_/d|_0|j1j2|_2|j1j3||j1j4d��dS)NrFr.)5�site�ENABLE_USER_SITEr:r;�abspath�__file__�
startswith�	USER_SITEr��zip_ok�local_snapshots_ok�install_dir�
script_dir�exclude_scripts�	index_url�
find_links�build_directory�args�optimize�recordrO�always_copy�
multi_versionrq�no_deps�allow_hosts�root�prefix�	no_reportr}�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_data�install_base�install_platbase�	USER_BASE�install_userbase�install_usersite�
no_find_links�
package_index�pth_file�always_copy_from�	site_dirs�installed_projects�sitepy_installed�_dry_run�distribution�verbose�_set_command_options�get_option_dict)�selfZwhereamir7r7r8�initialize_options�sL																									zeasy_install.initialize_optionscCs�x�|D]�}tjj|�s1tjj|�rtjd|�|js�tjj|�r|tjj|�r|t|�q�tj	|�q�qqWdS)NzDeleting %s)
r:r;r<�islinkr�info�dry_run�isdir�rmtree�unlink)r��blockers�filenamer7r7r8�delete_blockers�s
$	%
zeasy_install.delete_blockersc	Csx|jr-tdtd�j�tj�ntjj�d}tdd�\}}i|jj�d6|jj	�d6|jj
�d6|d	6|dd
�d6|d|dd
6|d6|d6|d6|d6ttdd�d6|_t
jr|j|jd<|j|jd<n|jr�t
jr�|j�|jdkrNtd��n|j|_|_tjdkr�|jd�q�|jtjd�n|j�|j�|jdddd�|jdkr�|j|_n|jdkr�d|_n|jdd/�|jdd0�|jrG|j rG|j |_|j!|_n|jdd1�t"t#tj$�}t%�|_&|j'dk	rd!d"�|j'jd#�D�}xq|D]f}tj$j(|�s�t)j*d$|�q�t#|�|kr�t+|d%��q�|j&j,t#|��q�Wn|j-s-|j.�n|j/p9d&|_/|j&dd�|_0xE|jt#|j�fD]+}||j0krn|j0j1d|�qnqnW|j2dk	r�d'd"�|j2jd#�D�}n	d(g}|j3dkr
|j4|j/d)|j0d*|�|_3nt5|j0tj$�|_6|j7dk	r_t8|j7t9�rh|j7j�|_7qhn	g|_7|j:r�|j3j;|j0tj$�n|js�|j3j<|j7�n|jdd2�t8|j=t>�s1y>t>|j=�|_=d|j=ko�dknst?�nWq1t?k
r-t+d,��Yq1Xn|j-rS|j@rStAd-��n|jBsktAd.��ng|_CdS)3Nz
setuptools %s�
setuptoolsrr��exec_prefix�	dist_name�dist_version�
dist_fullname�
py_versionr@�py_version_short��py_version_nodot�
sys_prefix�sys_exec_prefix�abiflags��userbase�usersitez$User base directory is not specified�posix�	unix_user�_userr�r�r�r�Fr�r��installr�cSs(g|]}tjj|j���qSr7)r:r;�
expanduser�strip)�.0rAr7r7r8�
<listcomp>s	z1easy_install.finalize_options.<locals>.<listcomp>�,z"%s (in --site-dirs) does not existz$ (in --site-dirs) is not on sys.pathzhttps://pypi.python.org/simplecSsg|]}|j��qSr7)r�)r�rAr7r7r8r�)s	�*�search_path�hostsr�z--optimize must be 0, 1, or 2z9Must specify a build directory (-b) when using --editablez:No urls, filenames, or requirements specified (see --help))�install_dirr�)r�z
script_dir)�recordr�)�optimizer�)Dr}�printr"�sys�exit�splitr	r��get_name�get_version�get_fullname�getattr�config_varsr�r�r�r�r��create_home_pathrr�r�r:�name�
select_scheme�expand_basedirs�expand_dirs�_expandr�r�r��set_undefined_optionsr�r��maprr;�
get_site_dirs�
all_site_dirsr�r�r�warnr�appendrq�check_site_dirr��shadow_path�insertr�r��create_indexr$�local_indexr��
isinstancerr�Zscan_egg_links�add_find_linksr��int�
ValueErrorr�r
r��outputs)	r�r�r�r�r>r�rS�	path_itemr�r7r7r8�finalize_options�s�	
	


		
	
"	!			

	zeasy_install.finalize_optionscCs�x�|D]y}t||�}|dk	rtjdksFtjdkr[tjj|�}nt||j�}t|||�qqWdS)Nr��nt)r�r:r�r;r�rr��setattr)r��attrs�attr�valr7r7r8�
_expand_attrsMs
zeasy_install._expand_attrscCs|jdddg�dS)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.r�r�r�N)r)r�r7r7r8r�Vszeasy_install.expand_basedirscCs#|jddddddg�dS)z+Calls `os.path.expanduser` on install dirs.r�r�r�r�r�r�N)r)r�r7r7r8r�[szeasy_install.expand_dirscCs|j|jjkr(tj|j�nz�x%|jD]}|j||j�q5W|jr�|j}|j	r�t
|j	�}x5tt
|��D]}|||d�||<q�Wnddlm
}|j|j|j|fd|j�n|j�Wdtj|jj�XdS)Nr)�	file_utilz'writing list of installed files to '%s')r�r�r�
set_verbosityr�r.r�r�r�r��len�range�	distutilsr�execute�
write_file�warn_deprecated_options)r��specr��root_len�counterrr7r7r8�runas$			zeasy_install.runc
CsGytj�}Wntjdt�}YnXtjj|jd|�S)z�Return a pseudo-tempname base in the install directory.
        This code is intentionally naive; if a malicious party can write to
        the target directory you're already in deep doodoo.
        rztest-easy-install-%s)r:�getpid�random�randintrr;�joinr�)r��pidr7r7r8�pseudo_tempnamews
zeasy_install.pseudo_tempnamecCsdS)Nr7)r�r7r7r8r�sz$easy_install.warn_deprecated_optionsc
Cs�t|j�}tjj|d�}||jk}|rS|jrS|j�}n�|j�d}tjj	|�}y:|r�tj
|�nt|d�j�tj
|�Wn"t
tfk
r�|j�YnX|r�|jr�t|j���n|r*|jdkr3t||j�|_q3n	d|_tjjdd�jtj�}|ttdd�|D��kr�d	|_n1|jr�tjj	|�r�d	|_d|_n||_dS)
z;Verify that self.install_dir is .pth-capable dir, if neededzeasy-install.pthz.write-test�wN�
PYTHONPATHr�cSsg|]}|r|�qSr7r7)r��_fr7r7r8r��s	z/easy_install.check_site_dir.<locals>.<listcomp>T)rr�r:r;rr�r��check_pth_processingrr<r��open�close�OSError�IOError�cant_write_to_targetr�no_default_version_msgr�r/�environ�getr��pathsepr�r�)r��instdirr�Zis_site_dirZtestfileZtest_existsrr7r7r8r��s6	!"	zeasy_install.check_site_dircCs_d}|tj�d|jf}tjj|j�sE|d7}n
|d7}t|��dS)Nacan't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    %s

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s
�z�
This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
aK
Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.
)r��exc_infor�r:r;r<r)r��template�msgr7r7r8r�s
z!easy_install.cant_write_to_targetcCs.|j}tjd|�|j�d}|d}tjj|�}y]|r^tj|�ntjj|�}tjj|�s�tj	|�nt
|d�}Wn"ttfk
r�|j
�YnHXz�|jd|f�|j�d}tj}tjdkrctjj|�\}}tjj|d�}	|j�d	krctjj|	�rc|	}qcnd
dlm}
|
|dd
dgd
�tjj|�r�tjd|�dSWd|r�|j�ntjj|�r�tj|�ntjj|�r
tj|�nX|js*tjd|�ndS)z@Empirically verify whether .pth files are supported in inst. dirz Checking .pth file support in %sz.pthz.okrz7import os; f = open(%r, 'w'); f.write('OK'); f.close()
Nr�zpythonw.exez
python.exer)�spawnz-Ez-c�passz-TEST PASSED: %s appears to support .pth filesTz+TEST FAILED: %s does NOT support .pth filesF)r�rr�rr:r;r<r��dirname�makedirsrrrr�writerr��
executabler�r�r�lower�distutils.spawnr%r�r�)r�r r�Zok_fileZ	ok_existsr'rar*�basenameZaltr%r7r7r8r�sP	

	$
	z!easy_install.check_pth_processingcCs�|jro|jd�roxS|jd�D]?}|jd|�rHq)n|j|||jd|��q)Wn|j|�dS)z=Write all the scripts for `dist`, unless scripts are excluded�scriptszscripts/N)r��metadata_isdir�metadata_listdir�install_script�get_metadata�install_wrapper_scripts)r��dist�script_namer7r7r8�install_egg_scriptssz easy_install.install_egg_scriptscCs|tjj|�rhxctj|�D]?\}}}x-|D]%}|jjtjj||��q8Wq"Wn|jj|�dS)N)r:r;r��walkr�r�r)r�r;�base�dirs�filesr�r7r7r8�
add_outputs

*zeasy_install.add_outputcCs#|jrtd|f��ndS)NzjInvalid argument %r: you can't use filenames or URLs with --editable (except via the --find-links option).)rqr
)r�r	r7r7r8�not_editables	zeasy_install.not_editablecCsW|js
dStjjtjj|j|j��rStd|j|jf��ndS)Nz2%r already exists in %s; can't do a checkout there)rqr:r;r<rr��keyr
)r�r	r7r7r8�check_editable$s	'zeasy_install.check_editableFc
Cs�tjdd�}d}|js.|j�nzYt|t�s�t|�r�|j|�|jj	||�}|j
d|||d�Stjj
|�r�|j|�|j
d|||d�St|�}n|j|�|jj|||j|j|j|j�}|dkrDd|}|jr5|d7}nt|��nB|jtkrm|j|||d�|S|j
||j||�SWdtjj
|�r�t|�nXdS)Nr�z
easy_install-Tz+Could not find suitable distribution for %rz2 (--always-copy skips system and development eggs)�Using)�tempfile�mkdtemprq�install_site_pyr�r%rr<r��download�install_itemr:r;r<�parse_requirement_argr>Zfetch_distributionrOr�r�r�
precedencer,�process_distribution�locationr�)r�r	�deps�tmpdirrCr4r$r7r7r8r..s:	



	
	
zeasy_install.easy_installcCs�|p|j}|p*tjj|�|k}|p@|jd�}|p||jdk	o|tjjt|��t|j�k}|r�|r�x4|j|jD]}|j	|kr�Pq�q�Wd}nt
jdtjj|��|r!|j
|||�}xP|D]}|j|||�qWn,|j|�g}|j||d|d�|dk	r}x!|D]}||kr`|Sq`WndS)Nz.eggTz
Processing %srr?)r�r:r;r'�endswithr�rr��project_namerHrr�r-�install_eggsrG�egg_distribution)r�r	rCrJrI�install_neededr4�distsr7r7r8rDWs.
	

zeasy_install.install_itemcCsUt|}xDtD]<}d|}t||�dkrt||||�qqWdS)z=Sets the install directories by applying the install schemes.�install_N)rrr�r�)r�r��schemer=�attrnamer7r7r8r�{s



zeasy_install.select_schemecGs6|j|�|jj|�|jj|�|j|�||j|j<tj|j	|||��|j
d�r�|jr�|jj|j
d��n|r�|jr�dS|dk	r�|j|jkr�tjd|�dS|dks�||kr0|j�}|p|}t|j|j|j�}ntjd|�y(tg�j|g|j|j�}Wnitk
r�tj�d}td|j��Yn5tk
r�tj�d}td|j��YnX|js�|jr"x9|D].}|j|jkr�|j|j��q�q�Wntjd|�dS)Nzdependency_links.txtzSkipping dependencies for %szProcessing dependencies for %sr!z'Could not find required distribution %sz7Installed distribution %s conflicts with requirement %sz'Finished processing dependencies for %s)�
update_pthr��addr�r6r�r=rr��installation_report�has_metadatar�r��get_metadata_linesr�r��as_requirementr%rL�specs�extrasr)�resolver.r*r�r"rr�r+r�)r��requirementr4rIr�ZdistreqZdistrosrrr7r7r8rG�sL


	


z!easy_install.process_distributioncCsA|jdk	r|jS|jd�r*dS|jd�s=dSdS)Nznot-zip-safeTzzip-safeF)r�rW)r�r4r7r7r8�should_unzip�szeasy_install.should_unzipcCstjj|j|j�}tjj|�rSd}tj||j|j|�|Stjj|�rn|}n�tjj	|�|kr�tj
|�ntj|�}t|�dkr�tjj||d�}tjj|�r�|}q�nt
|�tj||�|S)Nz<%r already exists in %s; build directory %s will not be keptr!r)r:r;rr�r=r<rr�r�r'r��listdirrr!�shutil�move)r�r	�
dist_filename�
setup_base�dstr$�contentsr7r7r8�
maybe_move�s"	
zeasy_install.maybe_movecCs4|js0x$t|�D]}|j|�qWndS)N)r��get_script_args�write_script)r�r4r�r7r7r8r3�s	z$easy_install.install_wrapper_scriptscs�t|j��}t||�}�fdd�}|rzd�|rZ�jdd��nt|�|��t�}n|j|t|�d�dS)z/Generate a legacy script wrapper and install itcs4td��}|jd�}|jdd�}|S)am
            There are a couple of template scripts in the package. This
            function loads one of them and prepares it for use.

            These templates use triple-quotes to escape variable
            substitutions so the scripts get the 2to3 treatment when build
            on Python 3. The templates cannot use triple-quotes naturally.
            r�zutf-8z"""r�)r �decode�replace)r�Z	raw_bytesZtemplate_strZclean_template)�
template_namer7r8�get_template�s	z1easy_install.install_script.<locals>.get_templatezscript template.pyz.pyz	 (dev).pyrdN)�strrY�is_python_scriptrj�get_script_header�localsrhrB)r�r4r5�script_textZdev_pathr	Z	is_scriptrlr7)rkr8r1�s	zeasy_install.install_script�tcs��j�fdd�|D��tjd|�j�tjj�j|�}�j|�t�}�j	s�t
|�tjj|�r�tj|�nt
|d|�}|j|�|j�t|d|�ndS)z1Write an executable file to the scripts directorycs(g|]}tjj�j|��qSr7)r:r;rr�)r�rX)r�r7r8r��s	z-easy_install.write_script.<locals>.<listcomp>zInstalling %s script to %sri�N)r�rr�r�r:r;rr;�
current_umaskr�r!r<r�rr)r�chmod)r�r5re�moder��target�maskrar7)r�r8rh�s
		


zeasy_install.write_scriptcCs�|j�jd�r(|j||�gS|j�jd�rP|j||�gS|}tjj|�r�|jd�r�t|||j�n'tjj	|�r�tjj
|�}n|j|�r�|jr�|dk	r�|j
|||�}ntjj|d�}tjj|�s�ttjj|dd��}|s[tdtjj
|���nt|�dkr�tdtjj
|���n|d	}n|jr�tj|j||��gS|j||�SdS)
Nz.eggz.exez.pyzsetup.pyr�z"Couldn't find a setup script in %sr!zMultiple setup scripts in %sr)r+rK�install_egg�install_exer:r;�isfiler�unpack_progressr�r�r�r�rfrr<rrrrqrr��report_editable�build_and_install)r�r	rbrJrc�setup_scriptZsetupsr7r7r8rMs4"
	zeasy_install.install_eggscCs[tjj|�r3t|tjj|d��}nttj|��}tj	|d|�S)NzEGG-INFO�metadata)
r:r;r�r'rr(�	zipimport�zipimporterr&�
from_filename)r��egg_pathrr7r7r8rN+s!zeasy_install.egg_distributioncCs�tjj|jtjj|��}tjj|�}|jsLt|�n|j|�}t	||�s�tjj
|�r�tjj|�r�tj
|d|j�n2tjj|�r�|jtj|fd|�nt|�tjj
|�r+|j|�rtjd}}q�tjd}}na|j|�rZ|j|�|jd}}n2|j|�r|tjd}}ntjd}}|j|||f|dtjj|�tjj|�f�n|j|�|j|�S)Nr�z	Removing ZMovingZCopyingZ
Extractingz	 %s to %s)r:r;rr�r-r�r�r!rNr-r�r�r�remove_treer<rr��uncache_zipdirr�r`ra�copytreer^�mkpath�unpack_and_compile�copy2r'r;)r�r�rJ�destinationr4rarMr7r7r8rx2s4$	
% 

)
zeasy_install.install_eggcs�t|�}|dkr+td|��ntdd|jdd�d|jdd�dt��}tjj||j�d�}|_	|d}tjj|d	�}tjj|d
�}t
|�t||�|_|j
||�tjj|�s}t|d�}	|	jd�xU|jd�D]D\}
}|
d
kr(|	jd|
jdd�j�|f�q(q(W|	j�ntjj|d��|j�fdd�t|�D��tj||d|jd|j�|j||�S)Nz(%s is not a valid distutils Windows .exerLrr�r}�platformz.eggz.tmpzEGG-INFOzPKG-INFOrzMetadata-Version: 1.0
�target_versionz%s: %s
�_�-r.cs)g|]}tjj�|d��qS)r)r:r;r)r�r�)r�r7r8r�ts	z,easy_install.install_exe.<locals>.<listcomp>r�r�)r0rr&rr
r:r;r�egg_namerHr!r'�	_provider�
exe_to_eggr<rr)�itemsrj�titlerr�rgr�make_zipfiler�r�rx)r�rbrJ�cfgr4r��egg_tmpZ	_egg_infoZpkg_infra�k�vr7)r�r8rySs8&


0
 zeasy_install.install_execs�t|��g�g�i������fdd�}t|�|�g}x��D]�}|j�jd�rY|jd�}|d}tj|d�d|d<tjj	�|�}�j
|�|j
|�tj||�qYqYW|j��tj
tjj	�d�tj�|��x�dD]�}	t�|	r-tjj	�d|	d
�}
tjj|
�s�t|
d�}|jdj	t�|	�d�|j�q�q-q-Wd
S)z;Extract a bdist_wininst to the directories an egg would usecsR|j�}x�D]\}}|j|�r||t|�d�}|jd�}tjj�|�}|j�}|jd�s�|jd�r�tj	|d
�|d<d�tjj
|d�d<�j|�nI|jd�r$|dkr$d�tjj
|d�d<�j|�n|SqW|jd�sNtj
d	|�ndS)N�/z.pydz.dllr!rz.pyzSCRIPTS/z.pthzWARNING: can't process %s���r�)r+r�rr�r:r;rrKr�strip_module�splitextr�rr�)�srcrdrA�old�new�parts�dl)r��native_libs�prefixes�
to_compile�	top_levelr7r8�process�s$z(easy_install.exe_to_egg.<locals>.processz.pydr�r!z.pyzEGG-INFOr�r�z.txtr�
Nr�r�r�)z	top_levelznative_libs)r2rr+rKr�rr�r:r;rr�Z
write_stub�byte_compileZwrite_safety_flagZanalyze_eggrpr<rr)r)r�rbr�r�Zstubs�resr��resourceZpyfiler�Ztxtrar7)r�r�r�r�r�r8r�}s4






!zeasy_install.exe_to_eggZ	Installedc	Cszd}|jrN|jrN|d7}|jtttj�krN|d7}qNn|j}|j}|j	}d}|t
�S)z9Helpful installation message for display to package usersz
%(what)s %(eggloc)s%(extras)sa�

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("%(name)s")  # latest installed version
    pkg_resources.require("%(name)s==%(version)s")  # this exact version
    pkg_resources.require("%(name)s>=%(version)s")  # this version or higher
z�

Note also that the installation directory must be on sys.path at runtime for
this to work.  (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)
r�)r�r�r�r�rr�r;rHrLr}rp)	r��reqr4�whatr$Zegglocr�r}r[r7r7r8rV�s

			z easy_install.installation_reportcCs&tjj|�}tj}dt�S)Na"
Extracted editable version of %(spec)s to %(dirname)s

If it uses setuptools in its setup script, you can activate it in
"development" mode by going to that directory and running::

    %(python)s setup.py develop

See the setuptools documentation for the "develop" command for more info.
)r:r;r'r�r*rp)r�r	r~r'�pythonr7r7r8r|�s		zeasy_install.report_editablecCs+tjjdt�tjjdt�t|�}|jdkrid|jd}|jdd|�n"|jdkr�|jdd�n|jr�|jdd	�nt	j
d
|t|�dd�dj|��yt
||�Wn<tk
r&tj�d}td|jdf��YnXdS)
Nzdistutils.command.bdist_eggzdistutils.command.egg_infor�r�r!rr�z-qz-nz
Running %s %s� zSetup script exited with %s)r��modules�
setdefaultrr�listr�r�r�rr�rrr�
SystemExitr"rr�)r�r~rcr�r�r7r7r8r�s"	*
zeasy_install.run_setupc	Csddg}tjdddtjj|��}z�|jtjj|��|j|�|j|||�t|g�}g}x?|D]7}x.||D]"}|j|j	|j
|��q�Wq�W|r�|jr�tj
d|�n|SWdt|�tj|j�XdS)Nrz
--dist-dirr�z
egg-dist-tmp-�dirz+No eggs found in %s (setup script problem?))r@rAr:r;r'�_set_fetcher_optionsr�rr$rxrHr�rr�r�rr�)	r�r~rcr�Zdist_dirZall_eggs�eggsr=r4r7r7r8r}�s$	

$	

zeasy_install.build_and_installc	Cs�|jjd�j�}d}i}xF|j�D]8\}}||krOq1n|d||jdd	�<q1Wtd|�}tjj|d
�}t	j
||�dS)
a
        When easy_install is about to run bdist_egg on a source dist, that
        source dist might have 'setup_requires' directives, requiring
        additional fetching. Ensure the fetcher options given to easy_install
        are available to that command as well.
        r.r�r�r�r�r�r!r�r�z	setup.cfgN)z
find_links�	site_dirsz	index_urlzoptimizer�zallow_hosts)r�r��copyr�rj�dictr:r;rrZedit_config)	r�r8Zei_optsZfetch_directivesZ
fetch_optionsr=r�ZsettingsZcfg_filenamer7r7r8r�s	z!easy_install._set_fetcher_optionscCs�|jdkrdSx~|j|jD]l}|jsE|j|jkr$tjd|�|jj|�|j|jkr�|jj|j�q�q$q$W|js|j|jjkr�tjd|�qtjd|�|jj	|�|j|jkr|jj
|j�qn|js�|jj�|jdkr�t
jj|jd�}t
jj|�rot
j|�nt|d�}|j|jj|j�d�|j�q�ndS)Nz&Removing %s from easy-install.pth filez4%s is already the active version in easy-install.pthz"Adding %s to easy-install.pth filer�zsetuptools.pth�wtr�)r�r=r�rHrr��remover��pathsrUr�r��saver:r;rr�r�r�rr)�
make_relativer)r�r4rSr�rar7r7r8rTs4	
	
 zeasy_install.update_pthcCstjd||�|S)NzUnpacking %s to %s)r�debug)r�r�rdr7r7r8r{@szeasy_install.unpack_progresscs�g�g����fdd�}t|||��j���js�x<�D]1}tj|�tjdBd@}t||�qQWndS)Ncs�|jd�r/|jd�r/�j|�n.|jd�sM|jd�r]�j|�n�j||��jr}|p�dS)Nz.pyz	EGG-INFO/z.dllz.so)rKr�r�r{r�)r�rd)r��to_chmodr�r7r8�pfIsz+easy_install.unpack_and_compile.<locals>.pfimi�)rr�r�r:�stat�ST_MODErt)r�r�r�r�rarur7)r�r�r�r8r�Es
	
zeasy_install.unpack_and_compilecCs�tr|jd�dSddlm}zetj|jd�||ddddd|j�|jr�||d|jddd|j�nWdtj|j�XdS)Nz%byte-compiling is disabled, skipping.r)r�r!r��forcer�)	rr��distutils.utilr�rrr�r�r�)r�r�r�r7r7r8r�Xs
	zeasy_install.byte_compilecCs&d}||jtjjdd�fS)Na�bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s

and your PYTHONPATH environment variable currently contains:

    %r

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.rr�)r�r:rr)r�r#r7r7r8rksz#easy_install.no_default_version_msgcCs?|jr
dStjj|jd�}tdd�}d}tjj|�r�tjd|j�t	|d�}|j
�}tjdkr�|j
�}n|j�|jd	�s�td
|��q�n||kr2tjd|�|jst|�t	|d�}|j|�|j�n|j|g�nd
|_dS)z8Make sure there's a site.py in the target dir, if neededNzsite.pyr�z
site-patch.pyr�zChecking existing site.py in %s�rbr@z
def __boot():z;%s is not a setuptools-generated site.py; please remove it.zCreating %s�wbT)r@)r�r:r;rr�r r<rr�r�readr��version_inforirr�rr�r�r!r)r�)r�Zsitepy�source�currentrar7r7r8rB�s2	
	


zeasy_install.install_site_pycCs�|js
dSttjjd��}xct|j�D]R\}}|j|�r5tjj|�r5|j	d|�tj
|d�q5q5WdS)zCreate directories under ~.N�~zos.makedirs('%s', 0700)i�)r�rr:r;r�rr�r�r��debug_printr()r��homer�r;r7r7r8r��s	"zeasy_install.create_home_pathr�r�z/$base/lib/python$py_version_short/site-packagesr�z	$base/binz$base/Lib/site-packagesz
$base/ScriptscGs |jd�j}|jr�|j�}|j|d<|jjtj|j�}xH|j	�D]7\}}t
||d�dkr\t|||�q\q\Wnddlm
}xo|D]g}t
||�}|dk	r�|||�}tjdkrtjj|�}nt|||�q�q�WdS)Nr�r8r)rr�)�get_finalized_commandr�r�r�rrr:r��DEFAULT_SCHEMEr�r�r�r�rr;r�)r�r�r�rRr�r�rr7r7r8r��s 	

zeasy_install._expand)rGNrH)rIrJrK)rLrMrN)zupgraderPrQ)rRrSrT)rUrArV)rWrXrY)rZr[r\)r]r^r_)r`rarb)rcrdre)rfrgrh)riNrj)rkrlrm)rnrorp)zeditablerrrs)rtrurv)rwrxry)rzr{r|)zversionNr~)rNr�)>�__name__�
__module__�__qualname__�__doc__�descriptionZcommand_consumes_arguments�user_options�boolean_optionsr�r�r�Zhelp_msgr��negative_optrr�r�r�r�rr�r�rrrr�rrr6r;r<r>r.rDr�rGr^rfr3r1rhrMrNrxryr�rVr|rr}r�rTr{r�r�rrBr�r�rr�r�r7r7r7r8r._s�		

3
�	*'0
)$	/	(!*2
$$
	c	Csdd�tjjdd�jtj�D�}tjg}tjtjkr_|jtj�nx8|D]0}|rftj	dkr�|jtj
j|dd��n�tjd	kr|j
tj
j|d
dtjdd�d�tj
j|d
d
�g�n%|j
|tj
j|d
d�g�tj	dkr�d|kr�tjjd�}|r�|jtj
j|ddtjdd�d��q�q�q�qfqfWtd�td�f}x*|D]"}||kr�|j|�q�q�Wtjr�|jtj�nttt|��}|S)NcSsg|]}|r|�qSr7r7)r�rr7r7r8r��s	z!get_site_dirs.<locals>.<listcomp>rr��os2emx�riscos�Libz
site-packagesr��libr�r@zsite-python�darwinzPython.framework�HOME�Library�Python�purelib�platlib)r�r�)r:rrr�rr�r�r�r�r�r;r�sep�extendr}rr�r�r�r�r�r)�sitedirsr�r�r�Z	lib_pathsZsite_libr7r7r8r��sF
"
	r�ccs^i}xQ|D]I}t|�}||kr1q
nd||<tjj|�sSq
ntj|�}||fVx�|D]�}|jd�s�qtn|dkr�qtnttjj||��}tt	|��}|j
�xw|D]o}|jd�s�t|j��}||krNd||<tjj|�s4q�n|tj|�fVqNq�q�WqtWq
WdS)zBYield sys.path directories that might contain "old-style" packagesr!z.pth�easy-install.pth�setuptools.pth�importN)r�r�)
rr:r;r�r_rKrrr�rrr��rstrip)�inputs�seenr'r:r�ra�lines�liner7r7r8�expand_pathss4





r�cCs�t|d�}z�tj|�}|dkr1dS|d|d|d}|dkr[dS|j|d�ddlm}m}ddl}|jd	|j	d��\}}}	|dkr�dS|j|d|�|j
idd
6dd6�}
y~|j	|�}tjdkr't
dg�}ntd�}|j|d�d}
|
jtj��}
|
j||
��Wn|jk
r�dSYnX|
jd�s�|
jd�r�dS|
SWd|j�XdS)znExtract configuration data from a bdist_wininst .exe

    Returns a ConfigParser.RawConfigParser, or None
    r�N�	���r)�StringIO�ConfigParserz<iii�zV4�{V4r�r}r�r�r!rZSetup)r�r�)r�r�)r�zipfile�_EndRecData�seek�setuptools.compatr�r�r5�unpackr��RawConfigParserr�r��bytes�chrr�ri�getfilesystemencoding�readfp�Error�has_sectionr)rbra�endrecZ	prependedr�r�r5�tagZcfglenZbmlenr��part�	null_byte�configr7r7r8r00s<$	 c
Cs�dddddg}tj|�}z}xv|j�D]h}|j}|jd�}t|�d	kr�|d
dkr�|djd
�r�|jddj|dd
��df�Pq�nt|�d
ks4|jd�r�q4n|jd�r�q4n|dj	�dkr4|j
|�}tjd kr7|j
�}nxbt|�D]Q}|j�jdd�}|jd�sD|jd|d|fdf�qDqDWq4q4WWd|j�Xdd�|D�}|j�|j�|S)!z4Get exe->egg path translations for a given .exe file�PURELIB/r��PLATLIB/pywin32_system32�PLATLIB/�SCRIPTS/�EGG-INFO/scripts/�DATA/lib/site-packagesr�r@r�zPKG-INFOr!z	.egg-inforNz	EGG-INFO/z.pthz
-nspkg.pth�PURELIB�PLATLIB�\r�z%s/%s/cSs(g|]\}}|j�|f�qSr7)r+)r�rX�yr7r7r8r�s	z$get_exe_prefixes.<locals>.<listcomp>)rr�)rr�)r	r�)r
r)rr�)r
r)r@)r��ZipFile�infolistr�r�rrKr�r�upperr�r�r�rirr�rjr�r�r�sort�reverse)Zexe_filenamer�rJr�r�r�re�pthr7r7r8r2_s<		")"3

cCs=ytj|�SWn%tk
r8td|f��YnXdS)Nz1Not a URL, existing file, or requirement spec: %r)r%�parser�r)r	r7r7r8rE�s

rEc@sgeZdZdZdZfdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dS)r/z)A .pth file with Distribution paths in itFcCs�||_ttt|��|_ttjj|j��|_|j	�t
j|gdd�x6t|j
�D]%}tt|jt|d���qoWdS)NT)r�r�r�rr�r:r;r'�basedir�_loadr$�__init__rr�rUr#)r�r�r�r;r7r7r8r�s	
zPthDistributions.__init__cCs�g|_d}tj|j�}tjj|j�r3t|jd�}x�|D]�}|j	d�rpd}qOn|j
�}|jj|�|j�sO|j�j	d�r�qOnt
tjj|j|��}|jd<tjj|�s�||kr|jj�d|_qOnd||<qOW|j�n|jrO|rOd|_nx.|jr|jdj�r|jj�qRWdS)	NF�rtr�T�#r!r�r�)r�r��fromkeysr�r:r;rzr�rr�r�r�r�rrrr<�pop�dirtyr)r�Z
saw_importr�rar�r;r7r7r8r�s2	
"&
	
 zPthDistributions._loadcCs�|js
dSdjt|j|j��}|r�tjd|j�d|}tj	j
|j�rvtj|j�nt|jd�}|j
|�|j�n;tj	j|j�r�tjd|j�tj|j�nd|_dS)z$Write changed .pth file back to diskNr�z	Saving %sz�import sys; sys.__plen = len(sys.path)
%s
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
r�zDeleting empty %sF)rrr�r�r�rr�r�r:r;r�r�rr)rr<)r��datarar7r7r8r��s 	

zPthDistributions.savecCsl|j|jkrX|j|jks9|jtj�krX|jj|j�d|_ntj||�dS)z"Add `dist` to the distribution mapTN)	rHr�r�r:�getcwdr�rr$rU)r�r4r7r7r8rU�szPthDistributions.addcCsIx2|j|jkr4|jj|j�d|_qWtj||�dS)z'Remove `dist` from the distribution mapTN)rHr�r�rr$)r�r4r7r7r8r��s
zPthDistributions.removecCs�tjjt|��\}}t|j�}|g}tjdkrKdpQtj}xut|�|kr�||jkr�|jtj	�|j
�|j|�Stjj|�\}}|j|�qWW|SdS)Nr�)r:r;r�rrr�altsepr�r��curdirrr)r�r;�npath�lastZbaselenr�r�r7r7r8r��s	

zPthDistributions.make_relativeN)r�r�r�r�rrrr�rUr�r�r7r7r7r8r/�s	
FcCs/ddlm}t|jt�s=tj|jj��}n|dj�d}|j	|�}d}|r�|j
d�p~d}|r�d|}q�n|r�d}nt|�}dt�}t
|�s|r|j�jd	�rd
|j�dd�}qqd
}nt||�}dt�}|S)z;Create a #! line, getting options (if any) from script_textr)�
first_line_rer�r�r!r�z
python.exez#!%(executable)s%(options)s
r�z -xN)Zdistutils.command.build_scriptsr&r��patternrm�re�compileri�
splitlines�match�group�nt_quote_argrprEr�r��fix_jython_executable)rqr*�wininstr&�firstr+�options�hdrr7r7r8ro�s,	
 	
rocCsz|tjkr8tjdkr8t|tj�||�Stj�\}}}t||d|dd||ff�dS)Nr�rr!z %s %s)	r:r�r�rtr��S_IWRITEr�r"r)�func�arg�exc�et�evr�r7r7r8�
auto_chmods

r9cCs1ddlm}t||�t|tj�dS)z?Ensure that the importer caches dont have stale info for `path`r)�_zip_directory_cacheN)r�r:�_uncacher��path_importer_cache)r;Zzdcr7r7r8r�s
r�cCsT||kr||=n:t|�}x+|D]#}t|�|kr)||=dSq)WdS)N)r)r;�cache�pr7r7r8r;#s

r;z<string>cCs;yt||d�Wnttfk
r2dSYnXdSdS)z%Is this string a valid Python script?�execFTN)r)�SyntaxError�	TypeError)�textr�r7r7r8�	is_python-s
	rCcCsRy)t|�}|jd�}|j�Wnttfk
rG|SYnX|dkS)zCDetermine if the specified executable is a .sh (contains a #! line)r�z#!)rr�rrr)r*�fp�magicr7r7r8�is_sh6s	rFcCsg}d}d}d|kp'd|k}|r@|jd�nx�|D]z}|dkrf|d7}qG|dkr�|jd|dd	�d}qG|r�|jd|�d}n|j|�qGW|r�|jd|�n|r|jd|�|jd�nd
j|�S)z@Quote a command line argument according to Windows parsing rulesFrr��	�"rr!r�z\"r�)r�r)r5�result�	needquote�nb�cr7r7r8r-?s,

		r-cCsb|jd�s|jd�r"dSt||�r5dS|jd�r^d|j�dj�kSdS)zMIs this text, as a whole, a Python script? (as opposed to shell/bat/etc.
    z.pyz.pywTz#!r�rF)rKrCr�r*r+)rqr�r7r7r8rn`srn)rtcGsdS)Nr7)r�r7r7r8�_chmodqsrMcCs`tjd||�yt||�Wn5tjk
r[tj�d}tjd|�YnXdS)Nzchanging mode of %s to %or!zchmod failed: %s)rr�rMr:�errorr�r")r;rurrr7r7r8rtssrtcCsntjjd�rjt|�rjddl}|jjjd�dkrI|S|r_tj	d�qjd|Sn|S)N�javarzos.name�Linuxz�WARNING: Unable to adapt shebang line for Jython, the following script is NOT executable
         see http://bugs.jython.org/issue1112 for more information.z/usr/bin/env %s)
r�r�r�rFrO�lang�System�getPropertyrr�)r*r1rOr7r7r8r.{s
r.c@sgeZdZdZejd�j�Zee	ddd��Z
edd��Zedd	��Zd
S)�ScriptWriterz`
    Encapsulates behavior around writing entry point scripts for console and
    gui apps.
    a6
        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
        __requires__ = %(spec)r
        import sys
        from pkg_resources import load_entry_point

        if __name__ == '__main__':
            sys.exit(
                load_entry_point(%(spec)r, %(group)r, %(name)r)()
            )
    Fc
cs�|j|�}t|j��}td||�}xvdD]n}|d}x[|j|�j�D]D\}	}
|jt�}x%|j||	||�D]}|Vq�Wq`Wq:WdS)zW
        Yield write_script() argument tuples for a distribution's entrypoints
        r��console�guiZ_scriptsN)zconsolezgui)	�
get_writerrmrYro�
get_entry_mapr�r#rp�_get_script_args)
�clsr4r*r/Z	gen_classr	�header�type_r,r��eprqr�r7r7r8rg�s

"
zScriptWriter.get_script_argscCs#|stjdkrtj�S|S)N�win32)r�r��WindowsScriptWriterrW)rZZ
force_windowsr7r7r8rW�s
zScriptWriter.get_writerccs|||fVdS)Nr7)rZr\r�r[rqr7r7r8rY�szScriptWriter._get_script_argsN)
r�r�r�r��textwrap�dedent�lstripr#�classmethod�sys_executablergrWrYr7r7r7r8rT�s
rTc@sFeZdZedd��Zedd��Zedd��ZdS)r_cCs2tdtd|�}tjjdd�}||S)z:
        Get a script writer suitable for Windows
        r*ZnaturalZSETUPTOOLS_LAUNCHER)r��WindowsExecutableLauncherWriterr:rr)rZZ
writer_lookup�launcherr7r7r8rW�s
	zWindowsScriptWriter.get_writerc#s�tdddd�|}|tjdj�jd�krRtjd|t�nddd	d
dddg}|j|�|j	||�}�fd
d�|D�}�|||d|fVdS)z For Windows, add a .py extensionrUz.pyarVz.pyw�PATHEXT�;zH%s not listed in PATHEXT; scripts will not be recognized as executables.z.pyz
-script.pyz.pycz.pyoz.execsg|]}�|�qSr7r7)r�rX)r�r7r8r��s	z8WindowsScriptWriter._get_script_args.<locals>.<listcomp>rrN)
r�r:rr+r��warningsr��UserWarningr��_adjust_header)rZr\r�r[rq�extr�r�r7)r�r8rY�s"	
z$WindowsScriptWriter._get_script_argscCs�d}d}|dkr(||}}ntjtj|�tj�}|jd|d|�}|dd
�jd�}tjd	kr�tj	j
|�r�|S|S)z�
        Make sure 'pythonw' is used for gui and and 'python' is used for
        console (regardless of what sys.executable is).
        zpythonw.exez
python.exerV�string�replr�r!rHr^r�)r(r)�escape�
IGNORECASE�subr�r�r�r:r;r<)r\Zorig_headerr'rnZ
pattern_obZ
new_headerZclean_headerr7r7r8rk�s"z"WindowsScriptWriter._adjust_headerN)r�r�r�rcrWrY�staticmethodrkr7r7r7r8r_�s

r_c@s"eZdZedd��ZdS)rec#s�|dkr$d}d}dg}nd}d}dddg}|j||�}�fd	d
�|D�}	�|||d|	fV�dt|�d
fVt�s��d}
|
t��dfVndS)zG
        For Windows, add a .py extension and an .exe launcher
        rVz-script.pywz.pyw�cliz
-script.pyz.pyz.pycz.pyocsg|]}�|�qSr7r7)r�rX)r�r7r8r��s	zDWindowsExecutableLauncherWriter._get_script_args.<locals>.<listcomp>rrz.exerdz
.exe.manifestN)rk�get_win_launcherr9�load_launcher_manifest)rZr\r�r[rqZ
launcher_typerlr�r2r�Zm_namer7)r�r8rY�s	
z0WindowsExecutableLauncherWriter._get_script_argsN)r�r�r�rcrYr7r7r7r8re�srecCstd|}tj�j�dkr7|jdd�}nt�rU|jdd�}n|jdd�}td|�S)z�
    Load the Windows launcher (executable) suitable for launching a script.

    `type` should be either 'cli' or 'gui'

    Returns the executable as a byte string.
    z%s.exeZarm�.z-arm.z-64.z-32.r�)r��machiner+rjr9r )�typeZlauncher_fnr7r7r8rt
s
	rtcCsHtjtd�}tjddkr0|t�S|jd�t�SdS)Nzlauncher manifest.xmlrr@zutf-8)�
pkg_resourcesr r�r�r��varsri)r��manifestr7r7r8rusrucCs~|rdd�}n|dkr0dd�}ng}ytj|�}Wn.tjk
ry|tj|tj��YnXx�|D]�}tjj||�}ytj|�j}Wntjk
r�d}YnXt	j
|�r�t|||�q�ytj|�Wq�tjk
r3|tj|tj��Yq�Xq�Wytj
|�Wn.tjk
ry|tj
|tj��YnXdS)z�Recursively delete a directory tree.

    This code is taken from the Python 2.4 version of 'shutil', because
    the 2.3 version doesn't really work right.
    cWsdS)Nr7)r�r7r7r8�onerror,szrmtree.<locals>.onerrorNcWs�dS)Nr7)r�r7r7r8r|/sr)r:r_rNr�r"r;r�lstat�st_moder��S_ISDIRr�r��rmdir)r;�
ignore_errorsr|�namesr��fullnamerur7r7r8r�%s2
"r�cCs tjd�}tj|�|S)N�)r:�umask)�tmpr7r7r8rsHs
rscCsMddl}tjj|jd�}|tjd<tjj|�t�dS)Nr)	r�r:r;r'�__path__r��argvr�r1)r�Zargv0r7r7r8�	bootstrapMs

r�cs�ddlm�ddlm�ddl�d��fdd����fdd��G��fd	d
�d
����dkr�tjdd��n�����fdd
��dS)Nr)�setup)r&zLusage: %(script)s [options] requirement_or_url ...
   or: %(script)s --help
cs�tdtjj|��S)N�script)r�r:r;r-)r5)�USAGEr7r8�	gen_usage_s	zmain.<locals>.gen_usagecs7�jj}z��j_|�SWd|�j_XdS)N)�corer�)raZ
old_gen_usage)rr�r7r8�
with_ei_usageds
zmain.<locals>.with_ei_usagecs+eZdZdZ��fdd�ZdS)z-main.<locals>.DistributionWithoutHelpCommandsr�cs#�����fdd��dS)Ncs�j����S)N)�
_show_helpr7)r&r��kwr�r7r8�<lambda>pszJmain.<locals>.DistributionWithoutHelpCommands._show_help.<locals>.<lambda>r7)r�r�r�)r&r�)r�r�r�r8r�osz8main.<locals>.DistributionWithoutHelpCommands._show_helpN)r�r�r��common_usager�r7)r&r�r7r8�DistributionWithoutHelpCommandslsr�r!cs6�ddddg�dtjdp)dd���S)N�script_argsz-qr.z-vr5r�	distclass)r�r�r7)r�r�r�r�r7r8r�uszmain.<locals>.<lambda>)r�r�Zsetuptools.distr&�distutils.corer�r�)r�r�r7)	r&r�r�r�rr�r�r�r�r8r1Us)pr�r�r:r�r`r@r�r(r�rr�r`rir�r5rrrrryr�rrZsetuptools.sandboxrZsetuptools.py31compatrr	r�r
rr�distutils.errorsr
rrr�distutils.command.installrrZsetuptools.commandrZsetuptools.archive_utilrZsetuptools.package_indexrrrrr�rrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,rrr;r>r*rd�__all__r9r-r�rBrEr.r�r�r0r2rEr/ror9r�r;rCrFr-rnrtrM�ImportErrorr.�objectrTr_rergrtrur�rsr�r1r7r7r7r8�<module>
s�"(d	����~.)/&j
		!

..	#python3.4/site-packages/setuptools/command/__pycache__/test.cpython-34.pyc000064400000011712151735050020022504 0ustar00�
M�Re,�@s�ddlmZddlmZddlZddlTddlmZddlmZm	Z	Gdd�de�Z
Gd	d
�d
e�ZdS)�)�Command)�DistutilsOptionErrorN)�*)�_namespace_packages)�
TestLoader�mainc@seZdZdd�ZdS)�ScanningLoadercCs,g}|jdkr1|jtj||��nt|d�rV|j|j��nt|d�rx�t|jd�D]�}|jd�r�|dkr�|jd|dd
�}n-t|j|d
�rx|jd|}nqx|j|j	|��qxWnt
|�dkr |j|�S|dSdS)aReturn a suite of all tests cases contained in the given module

        If the module is a package, load tests from all the modules in it.
        If the module has an ``additional_tests`` function, call it and add
        the return value to the tests.
        zsetuptools.tests.doctest�additional_tests�__path__�z.pyz__init__.py�.N�z/__init__.py�r���)�__name__�appendr�loadTestsFromModule�hasattrr	�resource_listdir�endswith�resource_existsZloadTestsFromName�lenZ
suiteClass)�self�module�tests�file�	submodule�r�2/tmp/pip-l4uy7dan-build/setuptools/command/test.pyr
s"
z"ScanningLoader.loadTestsFromModuleN)r�
__module__�__qualname__rrrrrrsrc@sdeZdZdZdZddgZd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dS)�testz.Command to run unit tests after in-place buildz#run unit tests after in-place build�test-module=�m�$Run 'test_suite' in specified module�test-suite=�s�1Test suite to run (e.g. 'some_module.test_suite')cCsd|_d|_d|_dS)N)�
test_suite�test_module�test_loader)rrrr�initialize_options7s		ztest.initialize_optionscCs�|jdkrC|jdkr0|jj|_q[|jd|_n|jr[td��n|jg|_|jr�|jjdd�n|jdkr�t|jdd�|_n|jdkr�d|_ndS)Nz.test_suitez1You may specify a module or a suite, but not bothrz	--verboser*z&setuptools.command.test:ScanningLoader)	r(r)�distributionr�	test_args�verbose�insertr*�getattr)rrrr�finalize_options=s		ztest.finalize_optionsc
Cs�tjdkr�t|jdd�r�|jddd�|jd�|jd�}t|j�}|jdd|�|jd�|jd	dd�|jd	�n-|jd�|jd	dd
�|jd	�|jd�}tj	dd�}tj
j�}z[tj	jdt|j
��tj�tdd��td
|j|jf�|�Wd|tj	dd�<tj
j�tj
j|�tj�XdS)Nr
�use_2to3F�build_pyZinplacer�egg_info�egg_base�	build_extrcSs
|j�S)N)�activate)�distrrr�<lambda>tsz/test.with_project_on_sys_path.<locals>.<lambda>z%s==%s)r
)�sys�version_infor0r,�reinitialize_command�run_command�get_finalized_command�normalize_path�	build_lib�path�modules�copyr/r5�working_set�__init__�add_activation_listener�require�egg_nameZegg_version�clear�update)r�funcZbpy_cmdZ
build_pathZei_cmdZold_pathZold_modulesrrr�with_project_on_sys_pathTs2$





ztest.with_project_on_sys_pathcCs�|jjr%|jj|jj�n|jjrJ|jj|jj�n|jr�dj|j�}|jr�|jd|�q�|jd|�|j	|j
�ndS)N� z skipping "unittest %s" (dry run)zrunning "unittest %s")r,Zinstall_requiresZfetch_build_eggsZ
tests_requirer(�joinr-�dry_run�announcerL�	run_tests)r�cmdrrr�run~s		ztest.runcCs2ddl}tjd
kr�t|jdd�r�|jdjd�d}|tkr�g}|tjkr{|j	|�n|d7}x0tjD]%}|j
|�r�|j	|�q�q�Wtttjj
|��q�ntjd|j�}|jdd�}|�}|jdd|jg|jd	|�dS)Nrr
r2Frrzx=rGZ
testLoader)r
���)�unittestr:r;r0r,r-�splitrrBr�
startswith�list�map�__delitem__�
EntryPoint�parser*�loadr�__file__)rrUrZdel_modules�nameZ	loader_ep�loader_classZcksrrrrQ�s$$
	ztest.run_testsN)r"r#r$)r%r&r')rrr �__doc__�description�user_optionsr+r1rLrSrQrrrrr!+s	*r!)�
setuptoolsr�distutils.errorsrr:�
pkg_resourcesrrUrrrr!rrrr�<module>s
#python3.4/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-34.pyc000064400000037256151735050020023467 0ustar00�
M�ReI�@sdZddlZddlZddlZddlmZddlmZmZy&ddl	m
Z
mZdd�ZWn4e
k
r�ddlmZmZd	d�ZYnXdd
lmZddlmZddlmZmZmZdd
lmZddlmZddlmZmZddlmZdd�Z dd�Z!dZ"Gdd�de�Z#e$j%dj&��Z'dd�Z(dd�Z)dd�Z*idd 6d!d"6Z+d#d$�Z,d%d&�Z-d'd(�Z.d)d*d+d,gZ/dddd-d.d/�Z0dS)0z6setuptools.command.bdist_egg

Build .egg distributions�N)�Command)�remove_tree�mkpath)�get_path�get_python_versioncCs
td�S)N�purelib)r�rr�7/tmp/pip-l4uy7dan-build/setuptools/command/bdist_egg.py�_get_purelibsr
)�get_python_librcCs
td�S)NF)rrrrr	r
s)�log)�DistutilsSetupError)�get_build_platform�Distribution�ensure_directory)�
EntryPoint)�CodeType)�
basestring�next)�LibrarycCsKd|kr%tjj|�d}n|jd�rG|dd�}n|S)N�.r�module�i����)�os�path�splitext�endswith)�filenamerrr	�strip_modules
rc
CsOt|d�}|jdjdddd|ddd	d
g��|j�dS)N�w�
zdef __bootstrap__():z-   global __bootstrap__, __loader__, __file__z!   import sys, pkg_resources, impz:   __file__ = pkg_resources.resource_filename(__name__,%r)z3   __loader__ = None; del __bootstrap__, __loader__z&   imp.load_dynamic(__name__,__file__)z__bootstrap__()�)�open�write�join�close)�resource�pyfile�frrr	�
write_stub"s
r)z7__import__("pkg_resources").declare_namespace(__name__)c@s�eZdZdZd,ddde�fd-ddd
dfd.d/gZdddgZdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zd d!�Z
d"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd	S)0�	bdist_eggzcreate an "egg" distribution�
bdist-dir=�b�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�exclude-source-filesN�+remove all .py files from the generated eggz	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�	dist-dir=�d�-directory to put final built distributions in�
skip-build�2skip rebuilding everything (for testing/debugging)cCsCd|_d|_d|_d|_d|_d|_d|_dS)Nr)�	bdist_dir�	plat_name�	keep_temp�dist_dir�
skip_build�
egg_output�exclude_source_files)�selfrrr	�initialize_options]s						zbdist_egg.initialize_optionscCs�|jd�}|_|j|_|jdkr^|jd�j}tjj|d�|_n|jdkr|t	�|_n|j
dd�|jdkr�tdd|j
|jt�|jj�o�|j�j
�}tjj|j|d�|_ndS)N�egg_info�bdist�eggr:z.egg)�dist_dirrC)�get_finalized_command�ei_cmdr@r7�
bdist_baserrr$r8r�set_undefined_optionsr<r�egg_nameZegg_versionr�distribution�has_ext_modulesr:)r>rErF�basenamerrr	�finalize_optionsgs!zbdist_egg.finalize_optionscCsf|j|jd�_tjjtjjt���}|jj	g}|j_	x�|D]�}t
|t�r
t|�dkr
tjj
|d�r
tjj|d�}tjj|�}||ks�|j|tj�r|t|�dd�|df}qq
n|jj	j|�qVWz1tjd|j�|jddddd�Wd||j_	XdS)	N�install�r�zinstalling package data to %s�install_data�force�root)r7rD�install_librr�normcase�realpathr
rI�
data_files�
isinstance�tuple�len�isabs�
startswith�sep�appendr�info�call_command)r>�
site_packages�old�itemrU�
normalizedrrr	�do_install_data�s !
!-zbdist_egg.do_install_datacCs
|jgS)N)r<)r>rrr	�get_outputs�szbdist_egg.get_outputscKsmx!tD]}|j||j�qW|jd|j�|jd|j�|j||�}|j|�|S)z8Invoke reinitialized command `cmdname` with keyword argsr;�dry_run)�INSTALL_DIRECTORY_ATTRS�
setdefaultr7r;rf�reinitialize_command�run_command)r>Zcmdname�kw�dirname�cmdrrr	r_�s

zbdist_egg.call_commandc	Cs�|jd�tjd|j�|jd�}|j}d|_|jj�rk|jrk|jd�n|j	ddd�}||_|j
�\}}g|_g}x�t|�D]�\}}t
jj|�\}	}
t
jj|jt|	�d�}|jj|�tjd	|�|jsCtt
jj|�|�n|j|�|jt
jd
�||<q�W|j|j��|r�|j|�n|jjr�|j�n|j}t
jj|d�}
|j|
�|jjr(t
jj|
d�}tjd
|�|j	dd|dd�n|j|
�t
jj|
d�}|r�tjd|�|js�t |�t!|d�}|j"dj|��|j"d�|j#�q�n?t
jj$|�r�tjd|�|js�t
j%|�q�nt&t
jj|d�|j'��t
jj(t
jj|j)d��rKtj*d�n|j+ra|j,�nt-|j.|d|j/d|jd|j0��|j1s�t2|jd|j�nt3|jdg�jdt4�|j.f�dS)Nr@zinstalling library code to %srM�
build_clibrS�warn_dirrz.pyzcreating stub loader for %s�/zEGG-INFO�scriptszinstalling scripts to %s�install_scripts�install_dirZno_eprOznative_libs.txtz
writing %s�wtr zremoving %szdepends.txtzxWARNING: 'depends.txt' will not be used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.�verboserf�mode�
dist_filesr*)5rjrr^r7rDrRrI�has_c_librariesr;r_�get_ext_outputs�stubs�	enumeraterrrr$rr]rfr)rK�replacer\�extend�make_init_files�byte_compilerVrdrrq�copy_metadata_torr"r#r%�isfile�unlink�write_safety_flag�zip_safe�existsr@�warnr=�zap_pyfiles�make_zipfiler<ru�
gen_headerr9r�getattrr)r>ZinstcmdZold_rootrm�all_outputs�ext_outputsZ
to_compiler.Zext_namer�extr'Zarchive_rootr@Z
script_dirZnative_libsZ	libs_filerrr	�run�sx
				"	

	

	

	$
	
	z
bdist_egg.runcCs�tjd�xut|j�D]d\}}}xR|D]J}|jd�r3tjj||�}tjd|�tj	|�q3q3WqWdS)Nz+Removing .py files from temporary directoryz.pyzDeleting %s)
rr^�walk_eggr7rrrr$�debugr�)r>�base�dirs�files�namerrrr	r�s

zbdist_egg.zap_pyfilescCsEt|jdd�}|dk	r%|Stjd�t|j|j�S)Nr�z4zip_safe flag not set; analyzing archive contents...)r�rIrr��analyze_eggr7rz)r>�saferrr	r�
s

zbdist_egg.zip_safec	Cs*g}xt|j�D]\}}}||jkr:qnx�|D]�}|jd�rAd|kr
|t|j�dd�jtjd�}|jj|�r
t	j
d|�tjj|d�}|j
s�t|d�}|jt�|j�n|j|�q
nPqAqAWg|dd�<qW|S)z%Create missing package __init__ filesz.pyz__init__.pyrONrz#Creating missing __init__.py for %sr)r�r7rrYr|rr\rIZhas_contents_forrr�rr$rfr"r#�NS_PKG_STUBr%r])	r>Z
init_filesr�r�r�r��pkgrr(rrr	r~s&
,	

zbdist_egg.make_init_filesc
Cs'tj|jjpd�}|jdi�jd�}|dkrFdS|jsY|jrotd|f��ntj	dd�}|j
}dj|j�}|jd}tj
j|j�}d	t�}|js#ttj
j|j�d
|j�t|jd�}	|	j|�|	j�ndS)Nr!zsetuptools.installationZeggsecutablerzGeggsecutable entry point (%r) cannot have 'extras' or refer to a module�rraH#!/bin/sh
if [ `basename $0` = "%(basename)s" ]
then exec python%(pyver)s -c "import sys, os; sys.path.insert(0, os.path.abspath('$0')); from %(pkg)s import %(base)s; sys.exit(%(full)s())" "$@"
else
  echo $0 is not the correct name for this egg file.
  echo Please rename it back to %(basename)s and try again.
  exec false
fi
rf�a)r�	parse_maprIZentry_points�get�attrs�extrasr
�sys�version�module_namer$rrrKr<�localsrfrrlr"r#r%)
r>Zepm�ep�pyverr��fullr�rK�headerr(rrr	r�*s*	

	"

zbdist_egg.gen_headercCs�tjj|j�}tjj|d�}xh|jjjD]W}|j|�r:tjj||t	|�d��}t
|�|j||�q:q:WdS)z*Copy metadata (egg info) to the target_dirr!N)rr�normpathr@r$rE�filelistr�r[rYr�	copy_file)r>�
target_dirZ
norm_egg_info�prefixr�targetrrr	r�Ss%
zbdist_egg.copy_metadata_tocCs�g}g}id|j6}x�tj|j�D]�\}}}xH|D]@}tjj|�dj�tkrE|j|||�qEqEWx3|D]+}|||d|tjj||�<q�Wq/W|j	j
�r�|jd�}x�|jD]�}	t
|	t�rq�n|j|	j�}
|j|
�}tjj|�jd�s�tjjtjj|j|��ry|j|�qyq�q�Wn||fS)zAGet a list of relative paths to C extensions in the output distror!rOrp�	build_extzdl-)r7r�walkrr�lower�NATIVE_EXTENSIONSr]r$rIrJrD�
extensionsrWrZget_ext_fullnamer�Zget_ext_filenamerKr[r�)r>r�r��pathsr�r�r�rZ	build_cmdr��fullnamerrr	ry_s("
"
-$zbdist_egg.get_ext_outputs)r+r,r-)r/Nr0)r2r3r4)r5Nr6)�__name__�
__module__�__qualname__�descriptionr�user_options�boolean_optionsr?rLrdrer_r�r�r�r~r�r�ryrrrr	r*4s8
	
R	)r*z.dll .so .dylib .pydccshtj|�}t|�\}}}d|kr@|jd�n|||fVx|D]}|VqUWdS)z@Walk an unpacked egg's contents, skipping the metadata directoryzEGG-INFON)rr�r�remove)�egg_dir�walkerr�r�r�Zbdfrrr	r��s
r�c	Cs�xBtj�D]4\}}tjjtjj|d|��r
|Sq
Wt�sRdSd}x�t|�D]�\}}}xn|D]f}|jd�s{|jd�r�q{q{|jd�s�|jd�r{t	||||�o�|}q{q{WqeW|S)NzEGG-INFOFTz.pyz.pywz.pycz.pyo)
�safety_flags�itemsrrr�r$�can_scanr�r�scan_module)	r�rz�flag�fnr�r�r�r�r�rrr	r��s$	
&r�cCs�x�tj�D]�\}}tjj||�}tjj|�rq|dks^t|�|kr�tj|�q�q
|dk	r
t|�|kr
t|d�}|j	d�|j
�q
q
WdS)Nrtr )r�r�rrr$r��boolr�r"r#r%)r�r�r�r�r(rrr	r��s
r�zzip-safeTznot-zip-safeFc
Cs�tjj||�}|dd �|kr/dS|t|�dd�jtjd�}||rgdpjdtjj|�d}tjd!kr�d}nd	}t	|d
�}|j
|�tj|�}	|j
�d}
tjt|	��}x<ddgD].}||kr�tjd
||�d}
q�q�Wd|kr�xZdddddddddddgD].}||krctjd||�d}
qcqcWnd|kr�d|kr�d|kr�tjdd�dkr�tjd|�d}
q�n|
S)"z;Check whether module possibly uses unsafe-for-zipfile stuffNrOTrr!rr����rb�__file__�__path__z%s: module references %sF�inspectZ	getsourceZ
getabsfileZ
getsourcefileZgetfilegetsourcelinesZ
findsourceZgetcommentsZgetframeinfoZgetinnerframesZgetouterframes�stack�tracez"%s: module MAY be using inspect.%sr��__main__z2.4z.%s: top-level module may be 'python -m' script���)r�r�)rrr$rYr|r\rr��version_infor"�read�marshal�loadr%�dict�fromkeys�iter_symbolsrr�r�)
r�r�r�rzrr�r�skipr(�coder�Zsymbols�badrrr	r��s>)*	


	$r�ccsvx|jD]}|Vq
WxV|jD]K}t|t�r@|Vq#t|t�r#xt|�D]}|Vq\Wq#q#WdS)zBYield names and strings used by `code` and its nested code objectsN)�co_names�	co_constsrWrrr�)r�r��constrrr	r��s	r�cCsDtjjd�r&tjdkr&dStjd�tjd�dS)N�java�cliTz1Unable to analyze compiled code on this platform.zfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.py)r��platformr[rr�rrrr	r��s"
r�rSrsrP�install_baserc
sddl}ttjj|�d��tjd|����fdd�}|dkrntjdk}n|j	|j
gt|�}�s�|j||d|�}	x0tj
��D]\}
}}||	|
|�q�W|	j�n3x0tj
��D]\}
}}|d|
|�q�W|S)	aqCreate a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    rNrfz#creating '%s' and adding '%s' to itcs�x�|D]�}tjjtjj||��}tjj|�r|t��dd�}�ss|j||�ntjd|�qqWdS)NrOzadding '%s')	rrr�r$r�rYr#rr�)�zrl�namesr�rr.)�base_dirrfrr	�visits
!zmake_zipfile.<locals>.visitz2.4�compression)�zipfilerrrrlrr^r�r��
ZIP_STORED�ZIP_DEFLATEDr��ZipFiler�r%)
�zip_filenamer�rurf�compressrvr�r�r�r�rlr�r�r)r�rfr	r�s		
r�)1�__doc__r�rr��
setuptoolsr�distutils.dir_utilrr�	sysconfigrrr
�ImportError�distutils.sysconfigr�	distutilsr�distutils.errorsr
�
pkg_resourcesrrrr�typesrZsetuptools.compatrrZsetuptools.extensionrrr)r�r*r�r��splitr�r�r�r�r�r�r�r�rgr�rrrr	�<module>sD$
�H


#
-	python3.4/site-packages/setuptools/command/__pycache__/register.cpython-34.pyc000064400000001053151735050020023346 0ustar00�
M�Re�@s*ddlmZGdd�de�ZdS)�)�registerc@s%eZdZejZdd�ZdS)rcCs|jd�tj|�dS)N�egg_info)�run_command�	_register�run)�self�r�6/tmp/pip-l4uy7dan-build/setuptools/command/register.pyrs
zregister.runN)�__name__�
__module__�__qualname__r�__doc__rrrrr	rs	rN)Zdistutils.command.registerrrrrrr	�<module>spython3.4/site-packages/setuptools/command/__pycache__/upload_docs.cpython-34.pyc000064400000013531151735050020024022 0ustar00�
M�Re��@sdZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZmZmZmZmZer�d	nd
Zddd
�ZGdd�de�ZdS)zpupload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
PyPI's pythonhosted.org).
�N)�standard_b64encode)�iter_entry_points)�log)�DistutilsOptionError)�upload)�httplib�urlparse�unicode�	iteritems�PY3�surrogateescape�strictzutf-8cCs#t|t�r|j|t�S|S)N)�
isinstancer	�encode�errors)�s�encoding�r�9/tmp/pip-l4uy7dan-build/setuptools/command/upload_docs.py�bsrc@s�eZdZdZdddejfddgZejZd
d�ZdefgZ	d
d�Z
dd�Zdd�Zdd�Z
dd�ZdS)�upload_docszUpload documentation to PyPIzrepository=�rzurl of repository [default: %s]�
show-responseN�&display full response text from server�upload-dir=�directory to uploadcCs1|jdkr-xtdd�D]}dSWndS)Nzdistutils.commands�build_sphinxT)�
upload_dirr)�self�eprrr�
has_sphinx0szupload_docs.has_sphinxrcCs#tj|�d|_d|_dS)N)r�initialize_optionsr�
target_dir)rrrrr!7s
	zupload_docs.initialize_optionscCs�tj|�|jdkrs|j�rF|jd�}|j|_q�|jd�}tjj	|j
d�|_n|jd�|j|_|jd|j�dS)Nr�buildZdocsrzUsing upload directory %s)
r�finalize_optionsrr �get_finalized_commandZbuilder_target_dirr"�os�path�join�
build_base�ensure_dirname�announce)rrr#rrrr$<s

zupload_docs.finalize_optionsc
Cs�tj|d�}z�|j|j�x�tj|j�D]�\}}}||jkrs|rstd|j��nxp|D]h}tjj||�}|t	|j�d�j
tjj�}tjj||�}	|j||	�qzWq8WWd|j
�XdS)N�wz'no files found in upload directory '%s')�zipfile�ZipFile�mkpathr"r&�walkrr'r(�len�lstrip�sep�write�close)
r�filename�zip_file�root�dirs�files�name�fullZrelative�destrrr�create_zipfileJs"
(zupload_docs.create_zipfilecCs�x!|j�D]}|j|�q
Wtj�}|jjj�}tjj	|d|�}z|j
|�|j|�Wdtj
|�XdS)Nz%s.zip)�get_sub_commands�run_command�tempfile�mkdtemp�distribution�metadata�get_namer&r'r(r>�upload_file�shutil�rmtree)r�cmd_nameZtmp_dirr;r7rrr�run[s
zupload_docs.runc
Cslt|d�}|j�}|j�|jj}idd6|j�d6tjj|�|fd6}t	|j
d|j�}t|�}t
r�|jd�}nd|}d	}t	d
�t	|�}	|	t	d�}
g}xt|�D]�\}}
d|}t|
t�r|
g}
nx�|
D]�}t|�tkrZ|d
|d7}|d}nt	|�}|j|	�|jt	|��|jt	d��|j|�|r#|d&d�t	d�kr#|jt	d��q#q#Wq�W|j|
�|jt	d��t	d�j|�}|jd|jtj�t|j�\}}}}}}|rk|rk|sqt�|dkr�tj|�}n.|dkr�tj|�}ntd|��d}y{|j�|j d|�d|}|j!d|�|j!dt"t#|���|j!d|�|j$�|j%|�WnBt&j'k
r�t(j)�d}|jt"|�tj*�dSYnX|j+�}|j,dkr�|jd|j,|j-ftj�nz|j,dkr|j.d �}|dkrd!|j�}n|jd"|tj�n#|jd#|j,|j-ftj*�|j/rht0d$d%|j�d$d%�ndS)'N�rbZ
doc_uploadz:actionr;�content�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--z*
Content-Disposition: form-data; name="%s"z; filename="%s"r�z

�
�
�zSubmitting documentation to %s�http�httpszunsupported schema �POSTz multipart/form-data; boundary=%szContent-typezContent-length�
Authorization��zServer response (%s): %si-ZLocationzhttps://pythonhosted.org/%s/zUpload successful. Visit %szUpload failed (%s): %s�-�K���)1�open�readr5rCrDrEr&r'�basenamer�username�passwordrr�decoder
r�list�type�tuple�appendr(r+�
repositoryr�INFOr�AssertionErrorr�HTTPConnection�HTTPSConnection�connect�
putrequest�	putheader�strr1�
endheaders�send�socket�error�sys�exc_info�ERROR�getresponse�status�reason�	getheader�
show_response�print)rr6�frL�meta�data�credentials�auth�boundaryZsep_boundaryZend_boundary�body�key�values�title�valueZschema�netloc�url�params�queryZ	fragments�conn�content_type�er�locationrrrrFis�







"

!


	



	zupload_docs.upload_file)rNr)rNr)�__name__�
__module__�__qualname__�descriptionr�DEFAULT_REPOSITORY�user_options�boolean_optionsr �sub_commandsr!r$r>rJrFrrrrr#s
		r)�__doc__r&rpr-rArrrG�base64r�
pkg_resourcesr�	distutilsr�distutils.errorsrZdistutils.command.uploadrZsetuptools.compatrrr	r
rrrrrrrr�<module>s(python3.4/site-packages/setuptools/command/__pycache__/egg_info.cpython-34.pyc000064400000033674151735050020023315 0ustar00�
M�Re�7�@s�dZddlZddlZddlZddlmZddlZddlmZddl	m
Z
ddlmZddlm
Z
ddlmZdd	lmZdd
lmZmZmZmZmZmZmZmZddl	mZGdd
�d
e�ZGdd�de�ZGdd�de
�Zdd�Zdd�Z dd�Z!dd�Z"dd�Z#dd�Z$ddd �Z%d!d"�Z&d#d$�Z'dS)%zUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contents�N)�Command)�log)�sdist)�
basestring)�	svn_utils)�convert_path)�FileList)�parse_requirements�	safe_name�
parse_version�safe_version�yield_lines�
EntryPoint�iter_entry_points�to_filename)�walk_revctrlc@s�eZdZdZd.d/d0d1d2d3gZddgZidd6dd6Zdd�Zdd�Zdd�Z	ddd�Z
dd�Zdd �Zd!d"�Z
d#d$�Zd%d&�Zed'd(��Zd)d*�Zd+d,�Zd-S)4�egg_infoz+create a distribution's .egg-info directory�	egg-base=�e�Ldirectory containing .egg-info directories (default: top of the source tree)�tag-svn-revision�r�,Add subversion revision ID to version number�tag-date�d�0Add date stamp (e.g. 20050528) to version number�
tag-build=�b�-Specify explicit tag to add to version number�no-svn-revision�R�*Don't add subversion revision ID [default]�no-date�D�"Don't include date stamp [default]cCsUd|_d|_d|_d|_d|_d|_d|_d|_d|_dS)NrF)	�egg_name�egg_version�egg_baser�	tag_build�tag_svn_revision�tag_date�broken_egg_info�vtags)�self�r.�6/tmp/pip-l4uy7dan-build/setuptools/command/egg_info.py�initialize_options)s								zegg_info.initialize_optionsc	CsKddlm}tdtddddd|j���}|||�dS)Nr)�edit_configrr)r*r()Zsetuptools.command.setoptr1�dict�tags)r-�filenamer1�valuesr.r.r/�save_version_info4szegg_info.save_version_infocCs�t|jj��|_|j�|_|j�|_y$tt	d|j|jf��Wn4t
k
r�tjj
d|j|jf��YnX|jdkr�|jj}|p�ijdtj�|_n|jd�t|j�d|_|jtjkr#tjj|j|j�|_nd|jkr?|j�n|j|jj_|jj}|dk	r�|j|jj�kr�|j|_t|j�|_ d|j_ndS)Nz%s==%sz2Invalid distribution name or version syntax: %s-%s�r'z	.egg-info�-)!r
�distribution�get_namer%r3r,�tagged_versionr&�listr	�
ValueError�	distutils�errors�DistutilsOptionErrorr'�package_dir�get�os�curdir�ensure_dirnamerr�path�join�check_broken_egg_info�metadata�versionZ
_patched_dist�key�lower�_versionr�_parsed_version)r-�dirs�pdr.r.r/�finalize_options?s2!
	!
!
$zegg_info.finalize_optionsFcCsl|r|j|||�nLtjj|�rh|dkrX|rXtjd||�dS|j|�ndS)a�Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        Nz$%s not set in setup(), but %s exists)�
write_filerCrF�existsr�warn�delete_file)r-�whatr4�data�forcer.r.r/�write_or_delete_filegs	
zegg_info.write_or_delete_filecCsjtjd||�tjdkr4|jd�}n|jsft|d�}|j|�|j�ndS)z�Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        zwriting %s to %s�zutf-8�wbN)rZ)	r�info�sys�version_info�encode�dry_run�open�write�close)r-rVr4rW�fr.r.r/rR{s	
zegg_info.write_filecCs-tjd|�|js)tj|�ndS)z8Delete `filename` (if not a dry run) after announcing itzdeleting %sN)rr\r`rC�unlink)r-r4r.r.r/rU�s	zegg_info.delete_filecCsE|jj�}|jr4|j|j�r4t|�St||j�S)N)r9�get_versionr,�endswithr)r-rJr.r.r/r;�s
zegg_info.tagged_versioncCs�|j|j�|jj}xNtd�D]@}|jd|�}|||jtjj	|j|j��q)Wtjj	|jd�}tjj
|�r�|j|�n|j�dS)Nzegg_info.writers�	installerznative_libs.txt)
�mkpathrr9Zfetch_build_eggr�load�namerCrFrGrSrU�find_sources)r-rh�ep�writer�nlr.r.r/�run�s,zegg_info.runcCs�d}|jr||j7}n|jrctjjd�sLtjjd�rc|d|j�7}n|jr�ddl}||jd�7}n|S)Nr7z.svnzPKG-INFOz-r%srz-%Y%m%d)	r(r)rCrFrS�get_svn_revisionr*�time�strftime)r-rJrrr.r.r/r3�s		$	z
egg_info.tagscCsttjjtj�j��S)N)�strrZSvnInforjrCrD�get_revisionr.r.r.r/rq�szegg_info.get_svn_revisioncCsJtjj|jd�}t|j�}||_|j�|j|_dS)z"Generate SOURCES.txt manifest filezSOURCES.txtN)	rCrFrGr�manifest_makerr9�manifestrp�filelist)r-Zmanifest_filename�mmr.r.r/rl�s
	
zegg_info.find_sourcescCs�|jd}|jtjkr:tjj|j|�}ntjj|�r�tjddddd||j	�|j	|_
||_	ndS)Nz	.egg-infor8�Nz�
Note: Your current .egg-info directory has a '-' in its name;
this will not work correctly with "setup.py develop".

Please rename %s to %s to correct this problem.
)r%r'rCrDrFrGrSrrTrr+)r-Zbeir.r.r/rH�s

zegg_info.check_broken_egg_infoN)rrr)rrr)rrr)rrr)rr r!)r"r#r$)�__name__�
__module__�__qualname__�description�user_options�boolean_options�negative_optr0r6rQrYrRrUr;rpr3�staticmethodrqrlrHr.r.r.r/rs0	

(rc@s"eZdZdZdd�ZdS)rz@File list that accepts only existing, platform-independent pathscCs	|jd�r"|dd�}nt|�}tjdkr�yDtjj|�smtjj|jd��r�|jj	|�nWqt
k
r�tjj|jd��r�|jj	|�ntjd|tj
��YqXn%tjj|�r|jj	|�ndS)N�
�rZzutf-8z!'%s' not %s encodable -- skipping���)rZ)rgrr]r^rCrFrSr_�files�append�UnicodeEncodeErrorrrT�getfilesystemencoding)r-�itemrFr.r.r/r��s-
zFileList.appendN)r{r|r}�__doc__r�r.r.r.r/r�src@sjeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)rvzMANIFEST.incCs(d|_d|_d|_d|_dS)Nr�)Zuse_defaultsZpruneZ
manifest_onlyZforce_manifest)r-r.r.r/r0�s			z!manifest_maker.initialize_optionscCsdS)Nr.)r-r.r.r/rQ�szmanifest_maker.finalize_optionscCs�t�|_tjj|j�s.|j�n|jj�|j�tjj|j	�rg|j
�n|j�|jj�|jj
�|j�dS)N)rrxrCrFrSrw�write_manifest�findall�add_defaults�templateZ
read_template�prune_file_list�sortZremove_duplicates)r-r.r.r/rp�s






zmanifest_maker.runcCs�tjd	krg}xX|jjD]J}y|jd�Wn#tk
r^tjd|�Yq"X|j|�q"W||j_n|jj}t	j
dkr�dd�|D�}n|jt|j
|fd|j
�dS)
z�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        rZzutf-8z$'%s' not UTF-8 encodable -- skipping�/cSs%g|]}|jtjd��qS)r�)�replacerC�sep)�.0rdr.r.r/�
<listcomp>s	z1manifest_maker.write_manifest.<locals>.<listcomp>zwriting manifest file '%s'N)rZ)r]r^rxr�r_r�rrTr�rCr��executerRrw)r-r��filer.r.r/r��s
zmanifest_maker.write_manifestcCs&|jd�s"tj||�ndS)Nzstandard file not found:)�
startswithrrT)r-�msgr.r.r/rTszmanifest_maker.warncCs�tj|�|jj|j�|jj|j�tt��}|r[|jj|�n"t	j
j|j�r}|j�n|j
d�}|jjdd|j�dS)Nr�*�prefix)rr�rxr�r�rwr<r�extendrCrFrSZ
read_manifest�get_finalized_commandZinclude_patternr)r-ZrcfilesZei_cmdr.r.r/r�s

zmanifest_maker.add_defaultscCs�|jd�}|jj�}|jjdd|j�|jjdd|�tjtj	�}|jj|d|dd�dS)N�buildr�z(RCS|CVS|\.svn)Zis_regexr�)
r�r9�get_fullnamerxZexclude_pattern�
build_base�re�escaperCr�)r-r��base_dirr�r.r.r/r�%szmanifest_maker.prune_file_listN)r{r|r}r�r0rQrpr�rTr�r�r.r.r.r/rv�s
rvcCsZdj|�}tjdkr0|jd�}nt|d�}|j|�|j�dS)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �
rZzutf-8r[N)rZ)rGr]r^r_rarbrc)r4�contentsrdr.r.r/rR.s
rRcCs�tjd|�|js�|jj}|j|j|_}|j|j|_}z|j	|j
�Wd|||_|_Xt|jdd�}ddlm
}|j|j
|�ndS)Nz
writing %sZzip_safer)�	bdist_egg)rr\r`r9rIr&rJr%rk�write_pkg_infor�getattrZsetuptools.commandr�Zwrite_safety_flag)�cmd�basenamer4rIZoldverZoldname�safer�r.r.r/r�9s	r�cCs&tjj|�r"tjd�ndS)NzsWARNING: 'depends.txt' is not used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.)rCrFrSrrT)r�r�r4r.r.r/�warn_depends_obsoleteJsr�cCs�|j}djt|jpf��g}xI|jp9ij�D]2\}}|jd|djt|��f�q@W|jd|dj|��dS)Nr�z	

[%s]
%s�requirementsr7)r9rGr
Zinstall_requiresZextras_require�itemsr�rY)r�r�r4�distrW�extra�reqsr.r.r/�write_requirementsRs
	!"*r�cCsItjdd�|jj�D��}|jd|dj|�d�dS)NcSs&g|]}|jdd�d�qS)�.r�r)�split)r��kr.r.r/r�\s	z(write_toplevel_names.<locals>.<listcomp>ztop-level namesr�)r2�fromkeysr9Ziter_distribution_namesrRrG)r�r�r4�pkgsr.r.r/�write_toplevel_namesYs	r�cCst|||d�dS)NT)�	write_arg)r�r�r4r.r.r/�
overwrite_argcsr�FcCsgtjj|�d}t|j|d�}|dk	rMdj|�d}n|j||||�dS)Nrr�)rCrF�splitextr�r9rGrY)r�r�r4rXZargname�valuer.r.r/r�fs
r�cCs�|jj}t|t�s'|dkr0|}n�|dk	r�g}xs|j�D]e\}}t|t�s�tj||�}djtt	|j
���}n|jd||f�qOWdj|�}n|jd||d�dS)Nr�z	[%s]
%s

r7zentry pointsT)
r9Zentry_points�
isinstancerr�r�parse_grouprG�maprtr5r�rY)r�r�r4rmrW�sectionr�r.r.r/�
write_entriesms	!r�cCsntjjd�rjtdd�}x9|D]1}tjd|�}|r(t|jd��Sq(W|j�ndS)NzPKG-INFO�rUzVersion:.*-r(\d+)\s*$r�r)	rCrFrSrar��match�int�grouprc)rd�liner�r.r.r/�get_pkg_info_revision}s

r�)(r�rCr�r]�
setuptoolsr�distutils.errorsr>rZsetuptools.command.sdistrZsetuptools.compatrr�distutils.utilr�distutils.filelistrZ	_FileList�
pkg_resourcesr	r
rrr
rrrrrrvrRr�r�r�r�r�r�r�r�r.r.r.r/�<module>s2:�J
python3.4/site-packages/setuptools/command/__pycache__/install_lib.cpython-34.pyc000064400000005347151735050020024030 0ustar00�
M�Re�	�@s6ddlmZddlZGdd�de�ZdS)�)�install_libNc@s^eZdZdZdd�Zdd�Zdd�Zddd	dd
d�Zdd
�ZdS)rz9Don't add compiled flags to filenames of non-Python filescCspg}xc|D][}|jd�s(q
n|jrE|j|d�n|jdkr
|j|d�q
q
W|S)Nz.py�cr�o)�endswith�compile�append�optimize)�selfZpy_filenamesZbytecode_filesZpy_file�r
�9/tmp/pip-l4uy7dan-build/setuptools/command/install_lib.py�_bytecode_filenamess
	zinstall_lib._bytecode_filenamescCs6|j�|j�}|dk	r2|j|�ndS)N)�build�install�byte_compile)r	�outfilesr
r
r�runs
zinstall_lib.runcCs�i}|jj}|r�|jd�jr�xy|D]n}|jd�}xV|r�tjj|j|�}x'dD]}d|tjj||�<qnW|j	�qIWq1Wn|S)Nr�.�__init__.py�__init__.pyc�__init__.pyo�)rrr)
�distributionZnamespace_packages�get_finalized_commandZ!single_version_externally_managed�split�os�path�join�install_dir�pop)r	�exclude�nsp�pkg�partsZpkgdir�fr
r
r�get_exclusionss
	
zinstall_lib.get_exclusionsrrc	s�|r|r|st�|j���s>tj|||�Sddlm}ddlm�g����fdd�}||||��S)Nr)�unpack_directory)�logcsP|�kr �jd|�dS�jd|tjj|���j|�|S)Nz/Skipping installation of %s (namespace package)Fzcopying %s -> %s)�warn�inforr�dirnamer)�src�dst)rr&rr
r�pf;s
z!install_lib.copy_tree.<locals>.pf)�AssertionErrorr$�_install_lib�	copy_treeZsetuptools.archive_utilr%�	distutilsr&)	r	�infile�outfile�
preserve_mode�preserve_times�preserve_symlinks�levelr%r,r
)rr&rrr/*s	zinstall_lib.copy_treecs<tj|�}|j���r8�fdd�|D�S|S)Ncs"g|]}|�kr|�qSr
r
)�.0r#)rr
r�
<listcomp>Ks	z+install_lib.get_outputs.<locals>.<listcomp>)r.�get_outputsr$)r	�outputsr
)rrr9Gs
zinstall_lib.get_outputsN)	�__name__�
__module__�__qualname__�__doc__rrr$r/r9r
r
r
rrsr)Zdistutils.command.install_librr.rr
r
r
r�<module>spython3.4/site-packages/setuptools/command/__pycache__/install_scripts.cpython-34.pyc000064400000004220151735050020024736 0ustar00�
M�Re�@sbddlmZddlmZmZmZddlZddlm	Z	Gdd�de�ZdS)�)�install_scripts)�Distribution�PathMetadata�ensure_directoryN)�logc@s=eZdZdZdd�Zdd�Zddd�Zd	S)
rz;Do normal script install, plus any egg_info wrapper scriptscCstj|�d|_dS)NF)�_install_scripts�initialize_options�no_ep)�self�r�=/tmp/pip-l4uy7dan-build/setuptools/command/install_scripts.pyr
s
z"install_scripts.initialize_optionsc	Csddlm}ddlm}|jd�|jjrItj|�n	g|_|j	r_dS|j
d�}t|jt
|j|j�|j|j�}|j
d�}t|d|�}t|j
d�dd	�}x'||||�D]}|j|�q�WdS)
Nr)�get_script_args)�sys_executable�egg_info�
build_scripts�
executable�
bdist_wininstZ_is_runningF)�setuptools.command.easy_installr
r�run_command�distribution�scriptsr�run�outfilesr	�get_finalized_commandrZegg_baserr�egg_nameZegg_version�getattr�write_script)	r
r
rZei_cmd�distZbs_cmdrZ
is_wininst�argsrrrrs$
		zinstall_scripts.run�tc
Gs�ddlm}m}tjd||j�tjj|j|�}|j	j
|�|�}|js�t|�t
|d|�}	|	j|�|	j�||d|�ndS)z1Write an executable file to the scripts directoryr)�chmod�
current_umaskzInstalling %s script to %s�wi�N)rr r!r�info�install_dir�os�path�joinr�append�dry_runr�open�write�close)
r
�script_name�contents�modeZignoredr r!�target�mask�frrrr(s		


zinstall_scripts.write_scriptN)�__name__�
__module__�__qualname__�__doc__rrrrrrrrsr)
Z!distutils.command.install_scriptsrr�
pkg_resourcesrrrr%�	distutilsrrrrr�<module>spython3.4/site-packages/setuptools/command/__pycache__/bdist_rpm.cpython-34.pyc000064400000004020151735050020023502 0ustar00�
M�Re��@sBddlmZddlZddlZGdd�de�ZdS)�)�	bdist_rpmNc@sUeZdZdd�Zejdkr9ddd�Zndd�Zd	d
�ZdS)rcCstj|�d|_dS)N)�
_bdist_rpm�initialize_optionsZno_egg)�self�r�7/tmp/pip-l4uy7dan-build/setuptools/command/bdist_rpm.pyrs
zbdist_rpm.initialize_optionsz2.5�cCs�tj||||�||jkr�|jd�r�t|jdg�jd|jd�radpqtjdd�t	j
j|t	j
j|��f�ndS)Nz.rpm�
dist_filesrz.src.rpm�any�)
r�	move_fileZdist_dir�endswith�getattr�distribution�append�sys�version�os�path�join�basename)r�src�dst�levelrrrrs%zbdist_rpm.move_filecCs|jd�tj|�dS)N�egg_info)�run_commandr�run)rrrrrs
z
bdist_rpm.runcs�|jj�}|jdd�}tj|�}d|�d|���fdd�|D�}|j|j��dd|�|S)N�-�_z%define version csFg|]<}|jdd�jdd�jdd�j����qS)zSource0: %{name}-%{version}.tarz)Source0: %{name}-%{unmangled_version}.tarzsetup.py install z5setup.py install --single-version-externally-managed z%setupz&%setup -n %{name}-%{unmangled_version})�replace)�.0�line)�line23�line24rr�
<listcomp>1s	
z-bdist_rpm._make_spec_file.<locals>.<listcomp>rz%define unmangled_version )r�get_versionrr�_make_spec_file�insert�index)rrZ
rpmversion�specr)r"r#rr&*s



!zbdist_rpm._make_spec_fileN)	�__name__�
__module__�__qualname__rrrrrr&rrrrr	s
	r)Zdistutils.command.bdist_rpmrrrrrrrr�<module>spython3.4/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-34.pyc000064400000007524151735050020025036 0ustar00�
M�Re��@stddlmZddlmZddlmZmZddlZddlZddl	Z	Gdd�de�Z
dS)�)�Command)�unpack_archive)�log�dir_utilNc@syeZdZdZdZdgZdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�ZdS)�install_egg_infoz.Install an .egg-info directory for the package�install-dir=�d�directory to install tocCs
d|_dS)N)�install_dir)�self�r�>/tmp/pip-l4uy7dan-build/setuptools/command/install_egg_info.py�initialize_optionssz#install_egg_info.initialize_optionscCs�|jdd�|jd�}tjdd|j|j�j�d}|j|_tj	j
|j|�|_|jg|_
dS)N�install_libr
�egg_infoz	.egg-info)�install_dirr)�set_undefined_options�get_finalized_command�
pkg_resources�Distribution�egg_nameZegg_versionr�source�os�path�joinr
�target�outputs)rZei_cmd�basenamerrr
�finalize_optionssz!install_egg_info.finalize_optionscCs�|jd�|j}tjj|j�r]tjj|j�r]tj|jd|j�n;tjj	|j�r�|j
tj|jfd|j�n|js�tj
|j�n|j
|jfd|j|jf�|j�dS)Nr�dry_runz	Removing zCopying %s to %s)�run_commandrrr�isdir�islinkr�remove_treer�exists�execute�unlinkr�ensure_directory�copytreer�install_namespaces)rrrrr
�runs
	+&	zinstall_egg_info.runcCs|jS)N)r)rrrr
�get_outputs*szinstall_egg_info.get_outputscs,�fdd�}t�j�j|�dS)Ncs[x1dD])}|j|�s,d||krdSqW�jj|�tjd||�|S)N�.svn/�CVS/�/zCopying %s to %s)r,r-)�
startswithr�appendr�debug)�src�dst�skip)rrr
�skimmer/s
z*install_egg_info.copytree.<locals>.skimmer)rrr)rr5r)rr
r(-s
zinstall_egg_info.copytreecCs|j�}|sdStjj|j�\}}|d7}|jj|�tjd|�|j	st
|d�}x|D]w}t|�}t|j
d��}d}d|kr�ddj|dd	��|d
f}n|jdt��qzW|j�ndS)Nz
-nspkg.pthz
Installing %sZwt�.�
z(; m and setattr(sys.modules[%r], %r, m)
�a7import sys,types,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault(%(pkg)r,types.ModuleType(%(pkg)r)); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)%(trailer)s���r9)�_get_all_ns_packagesrr�splitextrrr0r�infor�open�str�tuple�splitr�write�locals�close)r�nsp�filename�ext�f�pkg�pth�trailerrrr
r)Ss(
	
'z#install_egg_info.install_namespacescCsvi}xS|jjpgD]?}|jd�}x'|rWd|dj|�<|j�q1WqWt|�}|j�|S)Nr6r8)�distributionZnamespace_packagesr@r�pop�list�sort)rrDrHrrr
r:rs	
z%install_egg_info._get_all_ns_packagesN)rrr	)
�__name__�
__module__�__qualname__�__doc__�description�user_optionsrrr*r+r(r)r:rrrr
rs	
&r)�
setuptoolsrZsetuptools.archive_utilr�	distutilsrrr�shutilrrrrrr
�<module>s$python3.4/site-packages/setuptools/command/__pycache__/develop.cpython-34.pyc000064400000012026151735050020023162 0ustar00�
M�Re/�@s�ddlmZddlmZmZddlmZmZmZddl	m
Z
ddlmZm
Z
ddlZddlZddlZddlZGdd�de�ZdS)	�)�easy_install)�convert_path�
subst_vars)�Distribution�PathMetadata�normalize_path)�log)�DistutilsError�DistutilsOptionErrorNc@s�eZdZdZdZejddgZejdgZd	Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�ZdS)�developzSet up package for developmentz%install package in 'development mode'�	uninstall�u�Uninstall this source package�	egg-path=N�-Set the path to be used in the .egg-link fileFcCs7|jrd|_|j�n
|j�|j�dS)NT)rZ
multi_version�uninstall_link�install_for_developmentZwarn_deprecated_options)�self�r�5/tmp/pip-l4uy7dan-build/setuptools/command/develop.py�runs
		

zdevelop.runcCs5d|_d|_tj|�d|_d|_dS)N�.)r�egg_pathr�initialize_options�
setup_pathZalways_copy_from)rrrrrs
		
	zdevelop.initialize_optionscCs�|jd�}|jr7td|j|jf��n|jg|_tj|�|j�|j	�|j
jtjd��t
jj|j|jd�|_|j|_|jdkr�t
jj|j�|_nt|j�}tt
jj|j|j��|kr!td|��nt|t|t
jj|j��d|j�|_|jjt
jd�}|t
jkr�d|jd�d	}n||_tt
jj|j|j|��}|tt
j�kr�td
|tt
j���ndS)N�egg_infoz-Please rename %r to %r before using 'develop'z*.eggz	.egg-linkzA--egg-path must be a relative path from the install directory to �project_name�/z../�zGCan't get a consistent path to setup script from installation directory)�get_finalized_commandZbroken_egg_infor	r�egg_name�argsr�finalize_options�expand_basedirs�expand_dirsZ
package_index�scan�glob�os�path�join�install_dir�egg_link�egg_baser�abspathrr
rr�dist�replace�sep�curdir�countr)r�ei�target�prrrr"'s@	


"'
	$zdevelop.finalize_optionscCs�tjdkr�t|jdd�r�|jddd�|jd�|jd�}t|j�}|jdd|�|jd�|jd	dd�|jd	�|jd�}||_	||j
_t||j
�|j
_n-|jd�|jd	dd
�|jd	�|j�tjr=|jtj�dt_ntjd|j|j�|js�t|jd�}|j|j	d
|j�|j�n|jd|j
|j�dS)N�Zuse_2to3F�build_pyZinplacerrr,�	build_extrzCreating %s (link to %s)�w�
)r6)�sys�version_info�getattr�distribution�reinitialize_command�run_commandrr�	build_librr.�locationrr�	_providerZinstall_site_py�
setuptoolsZbootstrap_install_fromrr�infor+r,�dry_run�open�writer�closeZprocess_distribution�no_deps)rZbpy_cmdZ
build_pathZei_cmd�frrrrVs4$


	


		
zdevelop.install_for_developmentcCs�tjj|j�r�tjd|j|j�t|j�}dd�|D�}|j�||j	g|j	|j
gfkr�tjd|�dS|js�tj
|j�q�n|js�|j|j�n|jjr�tjd�ndS)NzRemoving %s (link to %s)cSsg|]}|j��qSr)�rstrip)�.0�linerrr�
<listcomp>�s	z*develop.uninstall_link.<locals>.<listcomp>z$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r'r(�existsr+rrEr,rGrIrr�warnrF�unlinkZ
update_pthr.r>�scripts)rZ
egg_link_file�contentsrrrr�s
$		zdevelop.uninstall_linkcCs�||jk	rtj||�S|j|�x|jjp>gD]k}tjjt	|��}tjj
|�}t|d�}|j�}|j
�|j||||�q?WdS)N�rU)r.r�install_egg_scriptsZinstall_wrapper_scriptsr>rSr'r(r-r�basenamerG�readrIZinstall_script)rr.�script_nameZscript_pathrK�script_textrrrrV�s

zdevelop.install_egg_scripts)z	uninstallr
r)rNr)�__name__�
__module__�__qualname__�__doc__�descriptionr�user_options�boolean_optionsZcommand_consumes_argumentsrrr"rrrVrrrrrs
	/.r)Zsetuptools.command.easy_installr�distutils.utilrr�
pkg_resourcesrrr�	distutilsr�distutils.errorsr	r
r'r;rDr&rrrrr�<module>s0python3.4/site-packages/setuptools/command/__pycache__/alias.cpython-34.pyc000064400000005216151735050020022620 0ustar00�
M�Re�	�@s�ddlZddlZddlmZddlmZddlmZddlTddlm	Z	m
Z
mZdd�ZGd	d
�d
e
�Z
dd�ZdS)
�N)�Command)�convert_path)�log)�*)�edit_config�option_base�config_filecCsJx$dD]}||krt|�SqW|j�|gkrFt|�S|S)z4Quote an argument for later parsing by shlex.split()�"�'�\�#)r	r
rr)�repr�split)�arg�c�r�3/tmp/pip-l4uy7dan-build/setuptools/command/alias.py�shquotes

rc@sfeZdZdZdZdZdgejZejdgZdd�Z	d	d
�Z
dd�Zd
S)�aliasz3Define a shortcut that invokes one or more commandsz0define a shortcut to invoke one or more commandsT�remove�r�remove (unset) the aliascCs#tj|�d|_d|_dS)N)r�initialize_options�argsr)�selfrrrrs
	zalias.initialize_optionscCs>tj|�|jr:t|j�dkr:td��ndS)N�zFMust specify exactly one argument (the alias name) when using --remove)r�finalize_optionsr�lenr�DistutilsOptionError)rrrrr"s
zalias.finalize_optionscCs"|jjd�}|jsZtd�td�x$|D]}tdt||��q6WdSt|j�dkr�|j\}|jr�d}q�||kr�tdt||��dStd|�dSn2|jd}djtt	|jdd���}t
|jii||6d6|j�dS)	N�aliaseszCommand Aliasesz---------------zsetup.py aliasrz No alias definition found for %rr� )
�distribution�get_option_dictr�print�format_aliasrr�join�maprr�filename�dry_run)rrr�commandrrr�run*s&	


		
%z	alias.runN)zremoverr)�__name__�
__module__�__qualname__�__doc__�descriptionZcommand_consumes_argumentsr�user_options�boolean_optionsrrr*rrrrrs
rcCs{||\}}|td�kr+d}n@|td�krFd}n%|td�krad}n
d|}||d|S)	N�globalz--global-config �userz--user-config �local�z
--filename=%rr )r)�namer�sourcer)rrrr$Es			
r$)�	distutils�os�
setuptoolsr�distutils.utilrr�distutils.errorsZsetuptools.command.setoptrrrrrr$rrrr�<module>s
	4python3.4/site-packages/setuptools/command/__pycache__/saveopts.cpython-34.pyc000064400000002007151735050020023366 0ustar00�
M�Re��@sXddlZddlZddlmZddlmZmZGdd�de�ZdS)�N)�Command)�edit_config�option_basec@s(eZdZdZdZdd�ZdS)�saveoptsz#Save command-line options to a filez7save supplied options to setup.cfg or other config filecCs�|j}i}xt|jD]i}|dkr1qnxN|j|�j�D]7\}\}}|dkrG||j|i�|<qGqGWqWt|j||j�dS)Nrzcommand line)�distribution�command_options�get_option_dict�items�
setdefaultr�filename�dry_run)�self�distZsettings�cmd�opt�src�val�r�6/tmp/pip-l4uy7dan-build/setuptools/command/saveopts.py�run
s	(!zsaveopts.runN)�__name__�
__module__�__qualname__�__doc__�descriptionrrrrrrsr)�	distutils�os�
setuptoolsrZsetuptools.command.setoptrrrrrrr�<module>spython3.4/site-packages/setuptools/command/__pycache__/sdist.cpython-34.pyc000064400000016104151735050020022653 0ustar00�
M�Re� �@s�ddlZddlZddlZddlmZddlZddlmZddlm	Z	ddl
mZddlm
Z
dZd
dd�ZGd
d�de�Zd
dd�Zedejdej��e
jgZGdd�de�ZdS)�N)�glob)�sdist)�convert_path)�log)�	svn_utils�README�
README.rst�
README.txt�ccs@x9tjd�D](}x|j�|�D]}|Vq)WqWdS)z%Find all files under revision controlzsetuptools.file_findersN)�
pkg_resources�iter_entry_points�load)�dirname�ep�item�r�3/tmp/pip-l4uy7dan-build/setuptools/command/sdist.py�walk_revctrlsrc@s:eZdZddd�Zdd�Zddd�ZdS)	�	re_finderNcCs%||_||_t|�|_dS)N)�pattern�postprocr�path)�selfrrrrrr�__init__s		zre_finder.__init__ccs�t|d�}z|j�}Wd|j�XxU|jj|�D]A}|jd�}|jrp|j|�}ntj||�Vq@WdS)N�rU�)	�open�read�closer�finditer�grouprr�joinpath)rr�filename�f�data�matchrrrr�_finders	zre_finder._finderr
ccs�tj||j�}tjj|�r�xh|j||�D]Q}tjj|�rZ|Vq:tjj|�r:x||�D]}|VqyWq:q:WndS)N)rr!r�os�isfiler&�isdir)rrrrrrr�__call__+szre_finder.__call__)�__name__�
__module__�__qualname__rr&r*rrrrrs
rccs1x*tD]"}x||�D]}|VqWqWdS)zPrimary svn_cvs entry pointN)�finders)r�finderrrrr�_default_revctrl7s
r0zCVS/Entriesz
^\w?/([^/]+)/c@s�eZdZdZd ddddfd!gZiZdd
�Zdd�Zej	d"kp�d#ej	koud$knp�d%ej	ko�d&knZ
e
r�eZndd�Zdd�Z
dd�Zdd�Zdd�ZdS)'rz=Smart sdist that finds anything supported by revision control�formats=N�6formats for source distribution (comma-separated list)z	keep-temp�kz1keep the distribution tree around after creating zarchive file(s)�	dist-dir=�d�Fdirectory to put the source distribution archive(s) in [default: dist]cCs|jd�|jd�}|j|_|jjtjj|jd��|j�x!|j	�D]}|j|�qaWddl
}d|jjkr�|j
�n|j�t|jdg�}x<|jD]1}dd|f}||kr�|j|�q�q�WdS)N�egg_infozSOURCES.txtr�check�
dist_filesrr
)�run_command�get_finalized_command�filelist�appendr'r�joinr7�check_readme�get_sub_commands�distutils.command�command�__all__Zcheck_metadataZmake_distribution�getattr�distributionZ
archive_files)rZei_cmd�cmd_name�	distutilsr9�filer$rrr�runUs 
"


z	sdist.runc	CsDytj|�Wn,tj�djjjdj��YnXdS)N��template)�_sdist�
read_template�sys�exc_info�tb_next�tb_frame�f_localsr)rrrrZ__read_template_hackns
!zsdist.__read_template_hackrJ��rr�cs`t|jjg}x�|D]�}t|t�r�|}d}x:|D]2}tjj|�rAd}|jj	|�PqAqAW|s�|j
ddj|��q�qtjj|�r�|jj	|�q|j
d|�qWddg}xH|D]@}tt
tjjt|���}|r�|jj|�q�q�W|jj�r�|jd�}|jj|j��|jjs�xC|jD]5\}	�}	}
|jj�fd	d
�|
D��qxWq�n|jj�r�|jd�}|jj|j��n|jj�r%|jd�}|jj|j��n|jj�r\|jd
�}
|jj|
j��ndS)Nrrz,standard file not found: should have one of z, zstandard file '%s' not foundz
test/test*.pyz	setup.cfg�build_pycs%g|]}tjj�|��qSr)r'rr>)�.0r")�src_dirrr�
<listcomp>�s	z&sdist.add_defaults.<locals>.<listcomp>�	build_ext�
build_clib�
build_scripts)�READMESrE�script_name�
isinstance�tupler'r�existsr<r=�warnr>�list�filterr(r�extend�has_pure_modulesr;Zget_source_filesZinclude_package_data�
data_files�has_ext_modules�has_c_libraries�has_scripts)rZ	standards�fnZaltsZgot_it�optionalr�filesrV�_�	filenamesrZr[r\r)rXr�add_defaults�sL

	
!zsdist.add_defaultscCsEx>tD]}tjj|�rdSqW|jddjt��dS)Nz,standard file not found: should have one of z, )r]r'rrarbr>)rr#rrrr?�s

zsdist.check_readmecCs�tj|||�tjj|d�}ttd�ritjj|�ritj|�|jd|�n|j	d�j
|�dS)Nz	setup.cfg�linkr7)rL�make_release_treer'rr>�hasattrra�unlink�	copy_filer;Zsave_version_info)r�base_dirrm�destrrrrr�s!
zsdist.make_release_treec
CsYtjj|j�sdSt|jd�}z|j�}Wd|j�X|dj�kS)NF�rbUz+# file GENERATED by distutils, do NOT edit
)r'rr(�manifestr�readliner�encode)r�fp�
first_linerrr�_manifest_is_not_generated�sz sdist._manifest_is_not_generatedcCs�tjd|j�t|jd�}x�|D]�}tjdkr�y|jd�}Wq�tk
r|tjd|�w,Yq�Xn|j	�}|j
d�s,|r�q,n|jj|�q,W|j
�dS)	z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'rxrTzUTF-8z"%r not UTF-8 decodable -- skipping�#N)rT)r�inforyrrN�version_info�decode�UnicodeDecodeErrorrb�strip�
startswithr<r=r)rry�linerrr�
read_manifest�s

zsdist.read_manifest)r1Nr2)r4r5r6)rJrSrJ)rTr)rTrrU)rTrJ)rTrJr)r+r,r-�__doc__�user_options�negative_optrIZ_sdist__read_template_hackrNr�Zhas_leaky_handlerMrpr?rrr~r�rrrrrEs*		5	
r)rrr	)r'�rerNrrZdistutils.command.sdistrrL�distutils.utilrrGr�
setuptoolsrr]r�objectrr0�compile�MZ
svn_finderr.rrrr�<module>s python3.4/site-packages/setuptools/command/bdist_rpm.py000064400000003751151735050020017232 0ustar00# This is just a kludge so that bdist_rpm doesn't guess wrong about the
# distribution name and version, if the egg_info command is going to alter
# them, another kludge to allow you to build old-style non-egg RPMs, and
# finally, a kludge to track .rpm files for uploading when run on Python <2.5.

from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm
import sys, os

class bdist_rpm(_bdist_rpm):

    def initialize_options(self):
        _bdist_rpm.initialize_options(self)
        self.no_egg = None

    if sys.version<"2.5":
        # Track for uploading any .rpm file(s) moved to self.dist_dir
        def move_file(self, src, dst, level=1):
            _bdist_rpm.move_file(self, src, dst, level)
            if dst==self.dist_dir and src.endswith('.rpm'):
                getattr(self.distribution,'dist_files',[]).append(
                    ('bdist_rpm',
                    src.endswith('.src.rpm') and 'any' or sys.version[:3],
                     os.path.join(dst, os.path.basename(src)))
                )

    def run(self):
        self.run_command('egg_info')    # ensure distro name is up-to-date
        _bdist_rpm.run(self)













    def _make_spec_file(self):
        version = self.distribution.get_version()
        rpmversion = version.replace('-','_')
        spec = _bdist_rpm._make_spec_file(self)
        line23 = '%define version '+version
        line24 = '%define version '+rpmversion
        spec  = [
            line.replace(
                "Source0: %{name}-%{version}.tar",
                "Source0: %{name}-%{unmangled_version}.tar"
            ).replace(
                "setup.py install ",
                "setup.py install --single-version-externally-managed "
            ).replace(
                "%setup",
                "%setup -n %{name}-%{unmangled_version}"
            ).replace(line23,line24)
            for line in spec
        ]
        spec.insert(spec.index(line24)+1, "%define unmangled_version "+version)
        return spec




















python3.4/site-packages/setuptools/command/test.py000064400000013454151735050020016227 0ustar00from setuptools import Command
from distutils.errors import DistutilsOptionError
import sys
from pkg_resources import *
from pkg_resources import _namespace_packages
from unittest import TestLoader, main

class ScanningLoader(TestLoader):

    def loadTestsFromModule(self, module):
        """Return a suite of all tests cases contained in the given module

        If the module is a package, load tests from all the modules in it.
        If the module has an ``additional_tests`` function, call it and add
        the return value to the tests.
        """
        tests = []
        if module.__name__!='setuptools.tests.doctest':  # ugh
            tests.append(TestLoader.loadTestsFromModule(self,module))

        if hasattr(module, "additional_tests"):
            tests.append(module.additional_tests())

        if hasattr(module, '__path__'):
            for file in resource_listdir(module.__name__, ''):
                if file.endswith('.py') and file!='__init__.py':
                    submodule = module.__name__+'.'+file[:-3]
                else:
                    if resource_exists(
                        module.__name__, file+'/__init__.py'
                    ):
                        submodule = module.__name__+'.'+file
                    else:
                        continue
                tests.append(self.loadTestsFromName(submodule))

        if len(tests)!=1:
            return self.suiteClass(tests)
        else:
            return tests[0] # don't create a nested suite for only one return


class test(Command):

    """Command to run unit tests after in-place build"""

    description = "run unit tests after in-place build"

    user_options = [
        ('test-module=','m', "Run 'test_suite' in specified module"),
        ('test-suite=','s',
            "Test suite to run (e.g. 'some_module.test_suite')"),
    ]

    def initialize_options(self):
        self.test_suite = None
        self.test_module = None
        self.test_loader = None


    def finalize_options(self):

        if self.test_suite is None:
            if self.test_module is None:
                self.test_suite = self.distribution.test_suite
            else:
                self.test_suite = self.test_module+".test_suite"
        elif self.test_module:
            raise DistutilsOptionError(
                "You may specify a module or a suite, but not both"
            )

        self.test_args = [self.test_suite]

        if self.verbose:
            self.test_args.insert(0,'--verbose')
        if self.test_loader is None:
            self.test_loader = getattr(self.distribution,'test_loader',None)
        if self.test_loader is None:
            self.test_loader = "setuptools.command.test:ScanningLoader"



    def with_project_on_sys_path(self, func):
        if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False):
            # If we run 2to3 we can not do this inplace:

            # Ensure metadata is up-to-date
            self.reinitialize_command('build_py', inplace=0)
            self.run_command('build_py')
            bpy_cmd = self.get_finalized_command("build_py")
            build_path = normalize_path(bpy_cmd.build_lib)

            # Build extensions
            self.reinitialize_command('egg_info', egg_base=build_path)
            self.run_command('egg_info')

            self.reinitialize_command('build_ext', inplace=0)
            self.run_command('build_ext')
        else:
            # Without 2to3 inplace works fine:
            self.run_command('egg_info')

            # Build extensions in-place
            self.reinitialize_command('build_ext', inplace=1)
            self.run_command('build_ext')

        ei_cmd = self.get_finalized_command("egg_info")

        old_path = sys.path[:]
        old_modules = sys.modules.copy()

        try:
            sys.path.insert(0, normalize_path(ei_cmd.egg_base))
            working_set.__init__()
            add_activation_listener(lambda dist: dist.activate())
            require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version))
            func()
        finally:
            sys.path[:] = old_path
            sys.modules.clear()
            sys.modules.update(old_modules)
            working_set.__init__()


    def run(self):
        if self.distribution.install_requires:
            self.distribution.fetch_build_eggs(self.distribution.install_requires)
        if self.distribution.tests_require:
            self.distribution.fetch_build_eggs(self.distribution.tests_require)

        if self.test_suite:
            cmd = ' '.join(self.test_args)
            if self.dry_run:
                self.announce('skipping "unittest %s" (dry run)' % cmd)
            else:
                self.announce('running "unittest %s"' % cmd)
                self.with_project_on_sys_path(self.run_tests)


    def run_tests(self):
        import unittest

        # Purge modules under test from sys.modules. The test loader will
        # re-import them from the build location. Required when 2to3 is used
        # with namespace packages.
        if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False):
            module = self.test_args[-1].split('.')[0]
            if module in _namespace_packages:
                del_modules = []
                if module in sys.modules:
                    del_modules.append(module)
                module += '.'
                for name in sys.modules:
                    if name.startswith(module):
                        del_modules.append(name)
                list(map(sys.modules.__delitem__, del_modules))

        loader_ep = EntryPoint.parse("x="+self.test_loader)
        loader_class = loader_ep.load(require=False)
        cks = loader_class()
        unittest.main(
            None, None, [unittest.__file__]+self.test_args,
            testLoader = cks
        )

































python3.4/site-packages/setuptools/command/easy_install.py000075500000216014151735050020017737 0ustar00#!/opt/alt/python34/bin/python3

"""
Easy Install
------------

A tool for doing automatic download/extract/build of distutils-based Python
packages.  For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.

__ https://pythonhosted.org/setuptools/easy_install.html

"""

import sys
import os
import zipimport
import shutil
import tempfile
import zipfile
import re
import stat
import random
import platform
import textwrap
import warnings
import site
import struct
from glob import glob
from distutils import log, dir_util

import pkg_resources
from setuptools import Command, _dont_write_bytecode
from setuptools.sandbox import run_setup
from setuptools.py31compat import get_path, get_config_vars

from distutils.util import get_platform
from distutils.util import convert_path, subst_vars
from distutils.errors import DistutilsArgError, DistutilsOptionError, \
    DistutilsError, DistutilsPlatformError
from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS
from setuptools.command import setopt
from setuptools.archive_util import unpack_archive
from setuptools.package_index import PackageIndex
from setuptools.package_index import URL_SCHEME
from setuptools.command import bdist_egg, egg_info
from setuptools.compat import (iteritems, maxsize, basestring, unicode,
                               reraise)
from pkg_resources import (
    yield_lines, normalize_path, resource_string, ensure_directory,
    get_distribution, find_distributions, Environment, Requirement,
    Distribution, PathMetadata, EggMetadata, WorkingSet, DistributionNotFound,
    VersionConflict, DEVELOP_DIST,
)

sys_executable = os.environ.get('__VENV_LAUNCHER__',
    os.path.normpath(sys.executable))

__all__ = [
    'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg',
    'main', 'get_exe_prefixes',
]

def is_64bit():
    return struct.calcsize("P") == 8

def samefile(p1, p2):
    both_exist = os.path.exists(p1) and os.path.exists(p2)
    use_samefile = hasattr(os.path, 'samefile') and both_exist
    if use_samefile:
        return os.path.samefile(p1, p2)
    norm_p1 = os.path.normpath(os.path.normcase(p1))
    norm_p2 = os.path.normpath(os.path.normcase(p2))
    return norm_p1 == norm_p2

if sys.version_info <= (3,):
    def _to_ascii(s):
        return s
    def isascii(s):
        try:
            unicode(s, 'ascii')
            return True
        except UnicodeError:
            return False
else:
    def _to_ascii(s):
        return s.encode('ascii')
    def isascii(s):
        try:
            s.encode('ascii')
            return True
        except UnicodeError:
            return False

class easy_install(Command):
    """Manage a download/build/install process"""
    description = "Find/get/install Python packages"
    command_consumes_arguments = True

    user_options = [
        ('prefix=', None, "installation prefix"),
        ("zip-ok", "z", "install package as a zipfile"),
        ("multi-version", "m", "make apps have to require() a version"),
        ("upgrade", "U", "force upgrade (searches PyPI for latest versions)"),
        ("install-dir=", "d", "install package to DIR"),
        ("script-dir=", "s", "install scripts to DIR"),
        ("exclude-scripts", "x", "Don't install scripts"),
        ("always-copy", "a", "Copy all needed packages to install dir"),
        ("index-url=", "i", "base URL of Python Package Index"),
        ("find-links=", "f", "additional URL(s) to search for packages"),
        ("build-directory=", "b",
            "download/extract/build in DIR; keep the results"),
        ('optimize=', 'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
        ('record=', None,
            "filename in which to record list of installed files"),
        ('always-unzip', 'Z', "don't install as a zipfile, no matter what"),
        ('site-dirs=','S',"list of directories where .pth files work"),
        ('editable', 'e', "Install specified packages in editable form"),
        ('no-deps', 'N', "don't install dependencies"),
        ('allow-hosts=', 'H', "pattern(s) that hostnames must match"),
        ('local-snapshots-ok', 'l',
            "allow building eggs from local checkouts"),
        ('version', None, "print version information and exit"),
        ('no-find-links', None,
            "Don't load find-links defined in packages being installed")
    ]
    boolean_options = [
        'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy',
        'editable',
        'no-deps', 'local-snapshots-ok', 'version'
    ]

    if site.ENABLE_USER_SITE:
        help_msg = "install in user site-package '%s'" % site.USER_SITE
        user_options.append(('user', None, help_msg))
        boolean_options.append('user')

    negative_opt = {'always-unzip': 'zip-ok'}
    create_index = PackageIndex

    def initialize_options(self):
        if site.ENABLE_USER_SITE:
            whereami = os.path.abspath(__file__)
            self.user = whereami.startswith(site.USER_SITE)
        else:
            self.user = 0

        self.zip_ok = self.local_snapshots_ok = None
        self.install_dir = self.script_dir = self.exclude_scripts = None
        self.index_url = None
        self.find_links = None
        self.build_directory = None
        self.args = None
        self.optimize = self.record = None
        self.upgrade = self.always_copy = self.multi_version = None
        self.editable = self.no_deps = self.allow_hosts = None
        self.root = self.prefix = self.no_report = None
        self.version = None
        self.install_purelib = None     # for pure module distributions
        self.install_platlib = None     # non-pure (dists w/ extensions)
        self.install_headers = None     # for C/C++ headers
        self.install_lib = None         # set to either purelib or platlib
        self.install_scripts = None
        self.install_data = None
        self.install_base = None
        self.install_platbase = None
        if site.ENABLE_USER_SITE:
            self.install_userbase = site.USER_BASE
            self.install_usersite = site.USER_SITE
        else:
            self.install_userbase = None
            self.install_usersite = None
        self.no_find_links = None

        # Options not specifiable via command line
        self.package_index = None
        self.pth_file = self.always_copy_from = None
        self.site_dirs = None
        self.installed_projects = {}
        self.sitepy_installed = False
        # Always read easy_install options, even if we are subclassed, or have
        # an independent instance created.  This ensures that defaults will
        # always come from the standard configuration file(s)' "easy_install"
        # section, even if this is a "develop" or "install" command, or some
        # other embedding.
        self._dry_run = None
        self.verbose = self.distribution.verbose
        self.distribution._set_command_options(
            self, self.distribution.get_option_dict('easy_install')
        )

    def delete_blockers(self, blockers):
        for filename in blockers:
            if os.path.exists(filename) or os.path.islink(filename):
                log.info("Deleting %s", filename)
                if not self.dry_run:
                    if os.path.isdir(filename) and not os.path.islink(filename):
                        rmtree(filename)
                    else:
                        os.unlink(filename)

    def finalize_options(self):
        if self.version:
            print('setuptools %s' % get_distribution('setuptools').version)
            sys.exit()

        py_version = sys.version.split()[0]
        prefix, exec_prefix = get_config_vars('prefix', 'exec_prefix')

        self.config_vars = {
            'dist_name': self.distribution.get_name(),
            'dist_version': self.distribution.get_version(),
            'dist_fullname': self.distribution.get_fullname(),
            'py_version': py_version,
            'py_version_short': py_version[0:3],
            'py_version_nodot': py_version[0] + py_version[2],
            'sys_prefix': prefix,
            'prefix': prefix,
            'sys_exec_prefix': exec_prefix,
            'exec_prefix': exec_prefix,
            # Only python 3.2+ has abiflags
            'abiflags': getattr(sys, 'abiflags', ''),
        }

        if site.ENABLE_USER_SITE:
            self.config_vars['userbase'] = self.install_userbase
            self.config_vars['usersite'] = self.install_usersite

        # fix the install_dir if "--user" was used
        #XXX: duplicate of the code in the setup command
        if self.user and site.ENABLE_USER_SITE:
            self.create_home_path()
            if self.install_userbase is None:
                raise DistutilsPlatformError(
                    "User base directory is not specified")
            self.install_base = self.install_platbase = self.install_userbase
            if os.name == 'posix':
                self.select_scheme("unix_user")
            else:
                self.select_scheme(os.name + "_user")

        self.expand_basedirs()
        self.expand_dirs()

        self._expand('install_dir','script_dir','build_directory','site_dirs')
        # If a non-default installation directory was specified, default the
        # script directory to match it.
        if self.script_dir is None:
            self.script_dir = self.install_dir

        if self.no_find_links is None:
            self.no_find_links = False

        # Let install_dir get set by install_lib command, which in turn
        # gets its info from the install command, and takes into account
        # --prefix and --home and all that other crud.
        self.set_undefined_options('install_lib',
            ('install_dir','install_dir')
        )
        # Likewise, set default script_dir from 'install_scripts.install_dir'
        self.set_undefined_options('install_scripts',
            ('install_dir', 'script_dir')
        )

        if self.user and self.install_purelib:
            self.install_dir = self.install_purelib
            self.script_dir = self.install_scripts
        # default --record from the install command
        self.set_undefined_options('install', ('record', 'record'))
        # Should this be moved to the if statement below? It's not used
        # elsewhere
        normpath = map(normalize_path, sys.path)
        self.all_site_dirs = get_site_dirs()
        if self.site_dirs is not None:
            site_dirs = [
                os.path.expanduser(s.strip()) for s in self.site_dirs.split(',')
            ]
            for d in site_dirs:
                if not os.path.isdir(d):
                    log.warn("%s (in --site-dirs) does not exist", d)
                elif normalize_path(d) not in normpath:
                    raise DistutilsOptionError(
                        d+" (in --site-dirs) is not on sys.path"
                    )
                else:
                    self.all_site_dirs.append(normalize_path(d))
        if not self.editable: self.check_site_dir()
        self.index_url = self.index_url or "https://pypi.python.org/simple"
        self.shadow_path = self.all_site_dirs[:]
        for path_item in self.install_dir, normalize_path(self.script_dir):
            if path_item not in self.shadow_path:
                self.shadow_path.insert(0, path_item)

        if self.allow_hosts is not None:
            hosts = [s.strip() for s in self.allow_hosts.split(',')]
        else:
            hosts = ['*']
        if self.package_index is None:
            self.package_index = self.create_index(
                self.index_url, search_path = self.shadow_path, hosts=hosts,
            )
        self.local_index = Environment(self.shadow_path+sys.path)

        if self.find_links is not None:
            if isinstance(self.find_links, basestring):
                self.find_links = self.find_links.split()
        else:
            self.find_links = []
        if self.local_snapshots_ok:
            self.package_index.scan_egg_links(self.shadow_path+sys.path)
        if not self.no_find_links:
            self.package_index.add_find_links(self.find_links)
        self.set_undefined_options('install_lib', ('optimize','optimize'))
        if not isinstance(self.optimize,int):
            try:
                self.optimize = int(self.optimize)
                if not (0 <= self.optimize <= 2): raise ValueError
            except ValueError:
                raise DistutilsOptionError("--optimize must be 0, 1, or 2")

        if self.editable and not self.build_directory:
            raise DistutilsArgError(
                "Must specify a build directory (-b) when using --editable"
            )
        if not self.args:
            raise DistutilsArgError(
                "No urls, filenames, or requirements specified (see --help)")

        self.outputs = []

    def _expand_attrs(self, attrs):
        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                if os.name == 'posix' or os.name == 'nt':
                    val = os.path.expanduser(val)
                val = subst_vars(val, self.config_vars)
                setattr(self, attr, val)

    def expand_basedirs(self):
        """Calls `os.path.expanduser` on install_base, install_platbase and
        root."""
        self._expand_attrs(['install_base', 'install_platbase', 'root'])

    def expand_dirs(self):
        """Calls `os.path.expanduser` on install dirs."""
        self._expand_attrs(['install_purelib', 'install_platlib',
                            'install_lib', 'install_headers',
                            'install_scripts', 'install_data',])

    def run(self):
        if self.verbose != self.distribution.verbose:
            log.set_verbosity(self.verbose)
        try:
            for spec in self.args:
                self.easy_install(spec, not self.no_deps)
            if self.record:
                outputs = self.outputs
                if self.root:               # strip any package prefix
                    root_len = len(self.root)
                    for counter in range(len(outputs)):
                        outputs[counter] = outputs[counter][root_len:]
                from distutils import file_util
                self.execute(
                    file_util.write_file, (self.record, outputs),
                    "writing list of installed files to '%s'" %
                    self.record
                )
            self.warn_deprecated_options()
        finally:
            log.set_verbosity(self.distribution.verbose)

    def pseudo_tempname(self):
        """Return a pseudo-tempname base in the install directory.
        This code is intentionally naive; if a malicious party can write to
        the target directory you're already in deep doodoo.
        """
        try:
            pid = os.getpid()
        except:
            pid = random.randint(0, maxsize)
        return os.path.join(self.install_dir, "test-easy-install-%s" % pid)

    def warn_deprecated_options(self):
        pass

    def check_site_dir(self):
        """Verify that self.install_dir is .pth-capable dir, if needed"""

        instdir = normalize_path(self.install_dir)
        pth_file = os.path.join(instdir,'easy-install.pth')

        # Is it a configured, PYTHONPATH, implicit, or explicit site dir?
        is_site_dir = instdir in self.all_site_dirs

        if not is_site_dir and not self.multi_version:
            # No?  Then directly test whether it does .pth file processing
            is_site_dir = self.check_pth_processing()
        else:
            # make sure we can write to target dir
            testfile = self.pseudo_tempname()+'.write-test'
            test_exists = os.path.exists(testfile)
            try:
                if test_exists: os.unlink(testfile)
                open(testfile,'w').close()
                os.unlink(testfile)
            except (OSError,IOError):
                self.cant_write_to_target()

        if not is_site_dir and not self.multi_version:
            # Can't install non-multi to non-site dir
            raise DistutilsError(self.no_default_version_msg())

        if is_site_dir:
            if self.pth_file is None:
                self.pth_file = PthDistributions(pth_file, self.all_site_dirs)
        else:
            self.pth_file = None

        PYTHONPATH = os.environ.get('PYTHONPATH','').split(os.pathsep)
        if instdir not in map(normalize_path, [_f for _f in PYTHONPATH if _f]):
            # only PYTHONPATH dirs need a site.py, so pretend it's there
            self.sitepy_installed = True
        elif self.multi_version and not os.path.exists(pth_file):
            self.sitepy_installed = True    # don't need site.py in this case
            self.pth_file = None            # and don't create a .pth file
        self.install_dir = instdir

    def cant_write_to_target(self):
        template = """can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    %s

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s
"""
        msg = template % (sys.exc_info()[1], self.install_dir,)

        if not os.path.exists(self.install_dir):
            msg += """
This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
"""
        else:
            msg += """
Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.
"""
        raise DistutilsError(msg)

    def check_pth_processing(self):
        """Empirically verify whether .pth files are supported in inst. dir"""
        instdir = self.install_dir
        log.info("Checking .pth file support in %s", instdir)
        pth_file = self.pseudo_tempname()+".pth"
        ok_file = pth_file+'.ok'
        ok_exists = os.path.exists(ok_file)
        try:
            if ok_exists: os.unlink(ok_file)
            dirname = os.path.dirname(ok_file)
            if not os.path.exists(dirname):
                os.makedirs(dirname)
            f = open(pth_file,'w')
        except (OSError,IOError):
            self.cant_write_to_target()
        else:
            try:
                f.write("import os; f = open(%r, 'w'); f.write('OK'); f.close()\n" % (ok_file,))
                f.close()
                f=None
                executable = sys.executable
                if os.name=='nt':
                    dirname,basename = os.path.split(executable)
                    alt = os.path.join(dirname,'pythonw.exe')
                    if basename.lower()=='python.exe' and os.path.exists(alt):
                        # use pythonw.exe to avoid opening a console window
                        executable = alt

                from distutils.spawn import spawn
                spawn([executable,'-E','-c','pass'],0)

                if os.path.exists(ok_file):
                    log.info(
                        "TEST PASSED: %s appears to support .pth files",
                        instdir
                    )
                    return True
            finally:
                if f:
                    f.close()
                if os.path.exists(ok_file):
                    os.unlink(ok_file)
                if os.path.exists(pth_file):
                    os.unlink(pth_file)
        if not self.multi_version:
            log.warn("TEST FAILED: %s does NOT support .pth files", instdir)
        return False

    def install_egg_scripts(self, dist):
        """Write all the scripts for `dist`, unless scripts are excluded"""
        if not self.exclude_scripts and dist.metadata_isdir('scripts'):
            for script_name in dist.metadata_listdir('scripts'):
                if dist.metadata_isdir('scripts/' + script_name):
                    # The "script" is a directory, likely a Python 3
                    # __pycache__ directory, so skip it.
                    continue
                self.install_script(
                    dist, script_name,
                    dist.get_metadata('scripts/'+script_name)
                )
        self.install_wrapper_scripts(dist)

    def add_output(self, path):
        if os.path.isdir(path):
            for base, dirs, files in os.walk(path):
                for filename in files:
                    self.outputs.append(os.path.join(base,filename))
        else:
            self.outputs.append(path)

    def not_editable(self, spec):
        if self.editable:
            raise DistutilsArgError(
                "Invalid argument %r: you can't use filenames or URLs "
                "with --editable (except via the --find-links option)."
                % (spec,)
            )

    def check_editable(self,spec):
        if not self.editable:
            return

        if os.path.exists(os.path.join(self.build_directory, spec.key)):
            raise DistutilsArgError(
                "%r already exists in %s; can't do a checkout there" %
                (spec.key, self.build_directory)
            )

    def easy_install(self, spec, deps=False):
        tmpdir = tempfile.mkdtemp(prefix="easy_install-")
        download = None
        if not self.editable: self.install_site_py()

        try:
            if not isinstance(spec,Requirement):
                if URL_SCHEME(spec):
                    # It's a url, download it to tmpdir and process
                    self.not_editable(spec)
                    download = self.package_index.download(spec, tmpdir)
                    return self.install_item(None, download, tmpdir, deps, True)

                elif os.path.exists(spec):
                    # Existing file or directory, just process it directly
                    self.not_editable(spec)
                    return self.install_item(None, spec, tmpdir, deps, True)
                else:
                    spec = parse_requirement_arg(spec)

            self.check_editable(spec)
            dist = self.package_index.fetch_distribution(
                spec, tmpdir, self.upgrade, self.editable, not self.always_copy,
                self.local_index
            )
            if dist is None:
                msg = "Could not find suitable distribution for %r" % spec
                if self.always_copy:
                    msg+=" (--always-copy skips system and development eggs)"
                raise DistutilsError(msg)
            elif dist.precedence==DEVELOP_DIST:
                # .egg-info dists don't need installing, just process deps
                self.process_distribution(spec, dist, deps, "Using")
                return dist
            else:
                return self.install_item(spec, dist.location, tmpdir, deps)

        finally:
            if os.path.exists(tmpdir):
                rmtree(tmpdir)

    def install_item(self, spec, download, tmpdir, deps, install_needed=False):

        # Installation is also needed if file in tmpdir or is not an egg
        install_needed = install_needed or self.always_copy
        install_needed = install_needed or os.path.dirname(download) == tmpdir
        install_needed = install_needed or not download.endswith('.egg')
        install_needed = install_needed or (
            self.always_copy_from is not None and
            os.path.dirname(normalize_path(download)) ==
            normalize_path(self.always_copy_from)
        )

        if spec and not install_needed:
            # at this point, we know it's a local .egg, we just don't know if
            # it's already installed.
            for dist in self.local_index[spec.project_name]:
                if dist.location==download:
                    break
            else:
                install_needed = True   # it's not in the local index

        log.info("Processing %s", os.path.basename(download))

        if install_needed:
            dists = self.install_eggs(spec, download, tmpdir)
            for dist in dists:
                self.process_distribution(spec, dist, deps)
        else:
            dists = [self.egg_distribution(download)]
            self.process_distribution(spec, dists[0], deps, "Using")

        if spec is not None:
            for dist in dists:
                if dist in spec:
                    return dist

    def select_scheme(self, name):
        """Sets the install directories by applying the install schemes."""
        # it's the caller's problem if they supply a bad name!
        scheme = INSTALL_SCHEMES[name]
        for key in SCHEME_KEYS:
            attrname = 'install_' + key
            if getattr(self, attrname) is None:
                setattr(self, attrname, scheme[key])

    def process_distribution(self, requirement, dist, deps=True, *info):
        self.update_pth(dist)
        self.package_index.add(dist)
        self.local_index.add(dist)
        self.install_egg_scripts(dist)
        self.installed_projects[dist.key] = dist
        log.info(self.installation_report(requirement, dist, *info))
        if (dist.has_metadata('dependency_links.txt') and
                not self.no_find_links):
            self.package_index.add_find_links(
                dist.get_metadata_lines('dependency_links.txt')
            )
        if not deps and not self.always_copy:
            return
        elif requirement is not None and dist.key != requirement.key:
            log.warn("Skipping dependencies for %s", dist)
            return  # XXX this is not the distribution we were looking for
        elif requirement is None or dist not in requirement:
            # if we wound up with a different version, resolve what we've got
            distreq = dist.as_requirement()
            requirement = requirement or distreq
            requirement = Requirement(
                distreq.project_name, distreq.specs, requirement.extras
            )
        log.info("Processing dependencies for %s", requirement)
        try:
            distros = WorkingSet([]).resolve(
                [requirement], self.local_index, self.easy_install
            )
        except DistributionNotFound:
            e = sys.exc_info()[1]
            raise DistutilsError(
                "Could not find required distribution %s" % e.args
            )
        except VersionConflict:
            e = sys.exc_info()[1]
            raise DistutilsError(
                "Installed distribution %s conflicts with requirement %s"
                % e.args
            )
        if self.always_copy or self.always_copy_from:
            # Force all the relevant distros to be copied or activated
            for dist in distros:
                if dist.key not in self.installed_projects:
                    self.easy_install(dist.as_requirement())
        log.info("Finished processing dependencies for %s", requirement)

    def should_unzip(self, dist):
        if self.zip_ok is not None:
            return not self.zip_ok
        if dist.has_metadata('not-zip-safe'):
            return True
        if not dist.has_metadata('zip-safe'):
            return True
        return False

    def maybe_move(self, spec, dist_filename, setup_base):
        dst = os.path.join(self.build_directory, spec.key)
        if os.path.exists(dst):
            msg = "%r already exists in %s; build directory %s will not be kept"
            log.warn(msg, spec.key, self.build_directory, setup_base)
            return setup_base
        if os.path.isdir(dist_filename):
            setup_base = dist_filename
        else:
            if os.path.dirname(dist_filename)==setup_base:
                os.unlink(dist_filename)   # get it out of the tmp dir
            contents = os.listdir(setup_base)
            if len(contents)==1:
                dist_filename = os.path.join(setup_base,contents[0])
                if os.path.isdir(dist_filename):
                    # if the only thing there is a directory, move it instead
                    setup_base = dist_filename
        ensure_directory(dst)
        shutil.move(setup_base, dst)
        return dst

    def install_wrapper_scripts(self, dist):
        if not self.exclude_scripts:
            for args in get_script_args(dist):
                self.write_script(*args)

    def install_script(self, dist, script_name, script_text, dev_path=None):
        """Generate a legacy script wrapper and install it"""
        spec = str(dist.as_requirement())
        is_script = is_python_script(script_text, script_name)

        def get_template(filename):
            """
            There are a couple of template scripts in the package. This
            function loads one of them and prepares it for use.

            These templates use triple-quotes to escape variable
            substitutions so the scripts get the 2to3 treatment when build
            on Python 3. The templates cannot use triple-quotes naturally.
            """
            raw_bytes = resource_string('setuptools', template_name)
            template_str = raw_bytes.decode('utf-8')
            clean_template = template_str.replace('"""', '')
            return clean_template

        if is_script:
            template_name = 'script template.py'
            if dev_path:
                template_name = template_name.replace('.py', ' (dev).py')
            script_text = (get_script_header(script_text) +
                get_template(template_name) % locals())
        self.write_script(script_name, _to_ascii(script_text), 'b')

    def write_script(self, script_name, contents, mode="t", blockers=()):
        """Write an executable file to the scripts directory"""
        self.delete_blockers(   # clean up old .py/.pyw w/o a script
            [os.path.join(self.script_dir,x) for x in blockers])
        log.info("Installing %s script to %s", script_name, self.script_dir)
        target = os.path.join(self.script_dir, script_name)
        self.add_output(target)

        mask = current_umask()
        if not self.dry_run:
            ensure_directory(target)
            if os.path.exists(target):
                os.unlink(target)
            f = open(target,"w"+mode)
            f.write(contents)
            f.close()
            chmod(target, 0x1FF-mask) # 0777

    def install_eggs(self, spec, dist_filename, tmpdir):
        # .egg dirs or files are already built, so just return them
        if dist_filename.lower().endswith('.egg'):
            return [self.install_egg(dist_filename, tmpdir)]
        elif dist_filename.lower().endswith('.exe'):
            return [self.install_exe(dist_filename, tmpdir)]

        # Anything else, try to extract and build
        setup_base = tmpdir
        if os.path.isfile(dist_filename) and not dist_filename.endswith('.py'):
            unpack_archive(dist_filename, tmpdir, self.unpack_progress)
        elif os.path.isdir(dist_filename):
            setup_base = os.path.abspath(dist_filename)

        if (setup_base.startswith(tmpdir)   # something we downloaded
                and self.build_directory and spec is not None):
            setup_base = self.maybe_move(spec, dist_filename, setup_base)

        # Find the setup.py file
        setup_script = os.path.join(setup_base, 'setup.py')

        if not os.path.exists(setup_script):
            setups = glob(os.path.join(setup_base, '*', 'setup.py'))
            if not setups:
                raise DistutilsError(
                    "Couldn't find a setup script in %s" % os.path.abspath(dist_filename)
                )
            if len(setups)>1:
                raise DistutilsError(
                    "Multiple setup scripts in %s" % os.path.abspath(dist_filename)
                )
            setup_script = setups[0]

        # Now run it, and return the result
        if self.editable:
            log.info(self.report_editable(spec, setup_script))
            return []
        else:
            return self.build_and_install(setup_script, setup_base)

    def egg_distribution(self, egg_path):
        if os.path.isdir(egg_path):
            metadata = PathMetadata(egg_path,os.path.join(egg_path,'EGG-INFO'))
        else:
            metadata = EggMetadata(zipimport.zipimporter(egg_path))
        return Distribution.from_filename(egg_path,metadata=metadata)

    def install_egg(self, egg_path, tmpdir):
        destination = os.path.join(self.install_dir,os.path.basename(egg_path))
        destination = os.path.abspath(destination)
        if not self.dry_run:
            ensure_directory(destination)

        dist = self.egg_distribution(egg_path)
        if not samefile(egg_path, destination):
            if os.path.isdir(destination) and not os.path.islink(destination):
                dir_util.remove_tree(destination, dry_run=self.dry_run)
            elif os.path.exists(destination):
                self.execute(os.unlink,(destination,),"Removing "+destination)
            uncache_zipdir(destination)
            if os.path.isdir(egg_path):
                if egg_path.startswith(tmpdir):
                    f,m = shutil.move, "Moving"
                else:
                    f,m = shutil.copytree, "Copying"
            elif self.should_unzip(dist):
                self.mkpath(destination)
                f,m = self.unpack_and_compile, "Extracting"
            elif egg_path.startswith(tmpdir):
                f,m = shutil.move, "Moving"
            else:
                f,m = shutil.copy2, "Copying"

            self.execute(f, (egg_path, destination),
                (m+" %s to %s") %
                (os.path.basename(egg_path),os.path.dirname(destination)))

        self.add_output(destination)
        return self.egg_distribution(destination)

    def install_exe(self, dist_filename, tmpdir):
        # See if it's valid, get data
        cfg = extract_wininst_cfg(dist_filename)
        if cfg is None:
            raise DistutilsError(
                "%s is not a valid distutils Windows .exe" % dist_filename
            )
        # Create a dummy distribution object until we build the real distro
        dist = Distribution(
            None,
            project_name=cfg.get('metadata','name'),
            version=cfg.get('metadata','version'), platform=get_platform(),
        )

        # Convert the .exe to an unpacked egg
        egg_path = dist.location = os.path.join(tmpdir, dist.egg_name()+'.egg')
        egg_tmp = egg_path + '.tmp'
        _egg_info = os.path.join(egg_tmp, 'EGG-INFO')
        pkg_inf = os.path.join(_egg_info, 'PKG-INFO')
        ensure_directory(pkg_inf)   # make sure EGG-INFO dir exists
        dist._provider = PathMetadata(egg_tmp, _egg_info)    # XXX
        self.exe_to_egg(dist_filename, egg_tmp)

        # Write EGG-INFO/PKG-INFO
        if not os.path.exists(pkg_inf):
            f = open(pkg_inf,'w')
            f.write('Metadata-Version: 1.0\n')
            for k,v in cfg.items('metadata'):
                if k != 'target_version':
                    f.write('%s: %s\n' % (k.replace('_','-').title(), v))
            f.close()
        script_dir = os.path.join(_egg_info,'scripts')
        self.delete_blockers(   # delete entry-point scripts to avoid duping
            [os.path.join(script_dir,args[0]) for args in get_script_args(dist)]
        )
        # Build .egg file from tmpdir
        bdist_egg.make_zipfile(
            egg_path, egg_tmp, verbose=self.verbose, dry_run=self.dry_run
        )
        # install the .egg
        return self.install_egg(egg_path, tmpdir)

    def exe_to_egg(self, dist_filename, egg_tmp):
        """Extract a bdist_wininst to the directories an egg would use"""
        # Check for .pth file and set up prefix translations
        prefixes = get_exe_prefixes(dist_filename)
        to_compile = []
        native_libs = []
        top_level = {}
        def process(src,dst):
            s = src.lower()
            for old,new in prefixes:
                if s.startswith(old):
                    src = new+src[len(old):]
                    parts = src.split('/')
                    dst = os.path.join(egg_tmp, *parts)
                    dl = dst.lower()
                    if dl.endswith('.pyd') or dl.endswith('.dll'):
                        parts[-1] = bdist_egg.strip_module(parts[-1])
                        top_level[os.path.splitext(parts[0])[0]] = 1
                        native_libs.append(src)
                    elif dl.endswith('.py') and old!='SCRIPTS/':
                        top_level[os.path.splitext(parts[0])[0]] = 1
                        to_compile.append(dst)
                    return dst
            if not src.endswith('.pth'):
                log.warn("WARNING: can't process %s", src)
            return None
        # extract, tracking .pyd/.dll->native_libs and .py -> to_compile
        unpack_archive(dist_filename, egg_tmp, process)
        stubs = []
        for res in native_libs:
            if res.lower().endswith('.pyd'):    # create stubs for .pyd's
                parts = res.split('/')
                resource = parts[-1]
                parts[-1] = bdist_egg.strip_module(parts[-1])+'.py'
                pyfile = os.path.join(egg_tmp, *parts)
                to_compile.append(pyfile)
                stubs.append(pyfile)
                bdist_egg.write_stub(resource, pyfile)
        self.byte_compile(to_compile)   # compile .py's
        bdist_egg.write_safety_flag(os.path.join(egg_tmp,'EGG-INFO'),
            bdist_egg.analyze_egg(egg_tmp, stubs))  # write zip-safety flag

        for name in 'top_level','native_libs':
            if locals()[name]:
                txt = os.path.join(egg_tmp, 'EGG-INFO', name+'.txt')
                if not os.path.exists(txt):
                    f = open(txt,'w')
                    f.write('\n'.join(locals()[name])+'\n')
                    f.close()

    def installation_report(self, req, dist, what="Installed"):
        """Helpful installation message for display to package users"""
        msg = "\n%(what)s %(eggloc)s%(extras)s"
        if self.multi_version and not self.no_report:
            msg += """

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("%(name)s")  # latest installed version
    pkg_resources.require("%(name)s==%(version)s")  # this exact version
    pkg_resources.require("%(name)s>=%(version)s")  # this version or higher
"""
            if self.install_dir not in map(normalize_path,sys.path):
                msg += """

Note also that the installation directory must be on sys.path at runtime for
this to work.  (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)
"""
        eggloc = dist.location
        name = dist.project_name
        version = dist.version
        extras = '' # TODO: self.report_extras(req, dist)
        return msg % locals()

    def report_editable(self, spec, setup_script):
        dirname = os.path.dirname(setup_script)
        python = sys.executable
        return """\nExtracted editable version of %(spec)s to %(dirname)s

If it uses setuptools in its setup script, you can activate it in
"development" mode by going to that directory and running::

    %(python)s setup.py develop

See the setuptools documentation for the "develop" command for more info.
""" % locals()

    def run_setup(self, setup_script, setup_base, args):
        sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg)
        sys.modules.setdefault('distutils.command.egg_info', egg_info)

        args = list(args)
        if self.verbose>2:
            v = 'v' * (self.verbose - 1)
            args.insert(0,'-'+v)
        elif self.verbose<2:
            args.insert(0,'-q')
        if self.dry_run:
            args.insert(0,'-n')
        log.info(
            "Running %s %s", setup_script[len(setup_base)+1:], ' '.join(args)
        )
        try:
            run_setup(setup_script, args)
        except SystemExit:
            v = sys.exc_info()[1]
            raise DistutilsError("Setup script exited with %s" % (v.args[0],))

    def build_and_install(self, setup_script, setup_base):
        args = ['bdist_egg', '--dist-dir']

        dist_dir = tempfile.mkdtemp(
            prefix='egg-dist-tmp-', dir=os.path.dirname(setup_script)
        )
        try:
            self._set_fetcher_options(os.path.dirname(setup_script))
            args.append(dist_dir)

            self.run_setup(setup_script, setup_base, args)
            all_eggs = Environment([dist_dir])
            eggs = []
            for key in all_eggs:
                for dist in all_eggs[key]:
                    eggs.append(self.install_egg(dist.location, setup_base))
            if not eggs and not self.dry_run:
                log.warn("No eggs found in %s (setup script problem?)",
                    dist_dir)
            return eggs
        finally:
            rmtree(dist_dir)
            log.set_verbosity(self.verbose) # restore our log verbosity

    def _set_fetcher_options(self, base):
        """
        When easy_install is about to run bdist_egg on a source dist, that
        source dist might have 'setup_requires' directives, requiring
        additional fetching. Ensure the fetcher options given to easy_install
        are available to that command as well.
        """
        # find the fetch options from easy_install and write them out
        #  to the setup.cfg file.
        ei_opts = self.distribution.get_option_dict('easy_install').copy()
        fetch_directives = (
            'find_links', 'site_dirs', 'index_url', 'optimize',
            'site_dirs', 'allow_hosts',
        )
        fetch_options = {}
        for key, val in ei_opts.items():
            if key not in fetch_directives: continue
            fetch_options[key.replace('_', '-')] = val[1]
        # create a settings dictionary suitable for `edit_config`
        settings = dict(easy_install=fetch_options)
        cfg_filename = os.path.join(base, 'setup.cfg')
        setopt.edit_config(cfg_filename, settings)

    def update_pth(self, dist):
        if self.pth_file is None:
            return

        for d in self.pth_file[dist.key]:    # drop old entries
            if self.multi_version or d.location != dist.location:
                log.info("Removing %s from easy-install.pth file", d)
                self.pth_file.remove(d)
                if d.location in self.shadow_path:
                    self.shadow_path.remove(d.location)

        if not self.multi_version:
            if dist.location in self.pth_file.paths:
                log.info(
                    "%s is already the active version in easy-install.pth",
                    dist
                )
            else:
                log.info("Adding %s to easy-install.pth file", dist)
                self.pth_file.add(dist) # add new entry
                if dist.location not in self.shadow_path:
                    self.shadow_path.append(dist.location)

        if not self.dry_run:

            self.pth_file.save()

            if dist.key=='setuptools':
                # Ensure that setuptools itself never becomes unavailable!
                # XXX should this check for latest version?
                filename = os.path.join(self.install_dir,'setuptools.pth')
                if os.path.islink(filename): os.unlink(filename)
                f = open(filename, 'wt')
                f.write(self.pth_file.make_relative(dist.location)+'\n')
                f.close()

    def unpack_progress(self, src, dst):
        # Progress filter for unpacking
        log.debug("Unpacking %s to %s", src, dst)
        return dst     # only unpack-and-compile skips files for dry run

    def unpack_and_compile(self, egg_path, destination):
        to_compile = []
        to_chmod = []

        def pf(src, dst):
            if dst.endswith('.py') and not src.startswith('EGG-INFO/'):
                to_compile.append(dst)
            elif dst.endswith('.dll') or dst.endswith('.so'):
                to_chmod.append(dst)
            self.unpack_progress(src,dst)
            return not self.dry_run and dst or None

        unpack_archive(egg_path, destination, pf)
        self.byte_compile(to_compile)
        if not self.dry_run:
            for f in to_chmod:
                mode = ((os.stat(f)[stat.ST_MODE]) | 0x16D) & 0xFED  # 0555, 07755
                chmod(f, mode)

    def byte_compile(self, to_compile):
        if _dont_write_bytecode:
            self.warn('byte-compiling is disabled, skipping.')
            return

        from distutils.util import byte_compile
        try:
            # try to make the byte compile messages quieter
            log.set_verbosity(self.verbose - 1)

            byte_compile(to_compile, optimize=0, force=1, dry_run=self.dry_run)
            if self.optimize:
                byte_compile(
                    to_compile, optimize=self.optimize, force=1,
                    dry_run=self.dry_run
                )
        finally:
            log.set_verbosity(self.verbose)     # restore original verbosity

    def no_default_version_msg(self):
        template = """bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s

and your PYTHONPATH environment variable currently contains:

    %r

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again."""
        return template % (self.install_dir, os.environ.get('PYTHONPATH',''))

    def install_site_py(self):
        """Make sure there's a site.py in the target dir, if needed"""

        if self.sitepy_installed:
            return  # already did it, or don't need to

        sitepy = os.path.join(self.install_dir, "site.py")
        source = resource_string("setuptools", "site-patch.py")
        current = ""

        if os.path.exists(sitepy):
            log.debug("Checking existing site.py in %s", self.install_dir)
            f = open(sitepy,'rb')
            current = f.read()
            # we want str, not bytes
            if sys.version_info >= (3,):
                current = current.decode()

            f.close()
            if not current.startswith('def __boot():'):
                raise DistutilsError(
                    "%s is not a setuptools-generated site.py; please"
                    " remove it." % sitepy
                )

        if current != source:
            log.info("Creating %s", sitepy)
            if not self.dry_run:
                ensure_directory(sitepy)
                f = open(sitepy,'wb')
                f.write(source)
                f.close()
            self.byte_compile([sitepy])

        self.sitepy_installed = True

    def create_home_path(self):
        """Create directories under ~."""
        if not self.user:
            return
        home = convert_path(os.path.expanduser("~"))
        for name, path in iteritems(self.config_vars):
            if path.startswith(home) and not os.path.isdir(path):
                self.debug_print("os.makedirs('%s', 0700)" % path)
                os.makedirs(path, 0x1C0)    # 0700

    INSTALL_SCHEMES = dict(
        posix = dict(
            install_dir = '$base/lib/python$py_version_short/site-packages',
            script_dir = '$base/bin',
        ),
    )

    DEFAULT_SCHEME = dict(
        install_dir = '$base/Lib/site-packages',
        script_dir = '$base/Scripts',
    )

    def _expand(self, *attrs):
        config_vars = self.get_finalized_command('install').config_vars

        if self.prefix:
            # Set default install_dir/scripts from --prefix
            config_vars = config_vars.copy()
            config_vars['base'] = self.prefix
            scheme = self.INSTALL_SCHEMES.get(os.name,self.DEFAULT_SCHEME)
            for attr,val in scheme.items():
                if getattr(self,attr,None) is None:
                    setattr(self,attr,val)

        from distutils.util import subst_vars
        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                val = subst_vars(val, config_vars)
                if os.name == 'posix':
                    val = os.path.expanduser(val)
                setattr(self, attr, val)

def get_site_dirs():
    # return a list of 'site' dirs
    sitedirs = [_f for _f in os.environ.get('PYTHONPATH',
                                            '').split(os.pathsep) if _f]
    prefixes = [sys.prefix]
    if sys.exec_prefix != sys.prefix:
        prefixes.append(sys.exec_prefix)
    for prefix in prefixes:
        if prefix:
            if sys.platform in ('os2emx', 'riscos'):
                sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
            elif os.sep == '/':
                sitedirs.extend([os.path.join(prefix,
                                         "lib",
                                         "python" + sys.version[:3],
                                         "site-packages"),
                            os.path.join(prefix, "lib", "site-python")])
            else:
                sitedirs.extend(
                    [prefix, os.path.join(prefix, "lib", "site-packages")]
                )
            if sys.platform == 'darwin':
                # for framework builds *only* we add the standard Apple
                # locations. Currently only per-user, but /Library and
                # /Network/Library could be added too
                if 'Python.framework' in prefix:
                    home = os.environ.get('HOME')
                    if home:
                        sitedirs.append(
                            os.path.join(home,
                                         'Library',
                                         'Python',
                                         sys.version[:3],
                                         'site-packages'))
    lib_paths = get_path('purelib'), get_path('platlib')
    for site_lib in lib_paths:
        if site_lib not in sitedirs: sitedirs.append(site_lib)

    if site.ENABLE_USER_SITE:
        sitedirs.append(site.USER_SITE)

    sitedirs = list(map(normalize_path, sitedirs))

    return sitedirs


def expand_paths(inputs):
    """Yield sys.path directories that might contain "old-style" packages"""

    seen = {}

    for dirname in inputs:
        dirname = normalize_path(dirname)
        if dirname in seen:
            continue

        seen[dirname] = 1
        if not os.path.isdir(dirname):
            continue

        files = os.listdir(dirname)
        yield dirname, files

        for name in files:
            if not name.endswith('.pth'):
                # We only care about the .pth files
                continue
            if name in ('easy-install.pth','setuptools.pth'):
                # Ignore .pth files that we control
                continue

            # Read the .pth file
            f = open(os.path.join(dirname,name))
            lines = list(yield_lines(f))
            f.close()

            # Yield existing non-dupe, non-import directory lines from it
            for line in lines:
                if not line.startswith("import"):
                    line = normalize_path(line.rstrip())
                    if line not in seen:
                        seen[line] = 1
                        if not os.path.isdir(line):
                            continue
                        yield line, os.listdir(line)


def extract_wininst_cfg(dist_filename):
    """Extract configuration data from a bdist_wininst .exe

    Returns a ConfigParser.RawConfigParser, or None
    """
    f = open(dist_filename,'rb')
    try:
        endrec = zipfile._EndRecData(f)
        if endrec is None:
            return None

        prepended = (endrec[9] - endrec[5]) - endrec[6]
        if prepended < 12:  # no wininst data here
            return None
        f.seek(prepended-12)

        from setuptools.compat import StringIO, ConfigParser
        import struct
        tag, cfglen, bmlen = struct.unpack("<iii",f.read(12))
        if tag not in (0x1234567A, 0x1234567B):
            return None     # not a valid tag

        f.seek(prepended-(12+cfglen))
        cfg = ConfigParser.RawConfigParser({'version':'','target_version':''})
        try:
            part = f.read(cfglen)
            # part is in bytes, but we need to read up to the first null
            #  byte.
            if sys.version_info >= (2,6):
                null_byte = bytes([0])
            else:
                null_byte = chr(0)
            config = part.split(null_byte, 1)[0]
            # Now the config is in bytes, but for RawConfigParser, it should
            #  be text, so decode it.
            config = config.decode(sys.getfilesystemencoding())
            cfg.readfp(StringIO(config))
        except ConfigParser.Error:
            return None
        if not cfg.has_section('metadata') or not cfg.has_section('Setup'):
            return None
        return cfg

    finally:
        f.close()


def get_exe_prefixes(exe_filename):
    """Get exe->egg path translations for a given .exe file"""

    prefixes = [
        ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''),
        ('PLATLIB/', ''),
        ('SCRIPTS/', 'EGG-INFO/scripts/'),
        ('DATA/lib/site-packages', ''),
    ]
    z = zipfile.ZipFile(exe_filename)
    try:
        for info in z.infolist():
            name = info.filename
            parts = name.split('/')
            if len(parts)==3 and parts[2]=='PKG-INFO':
                if parts[1].endswith('.egg-info'):
                    prefixes.insert(0,('/'.join(parts[:2]), 'EGG-INFO/'))
                    break
            if len(parts) != 2 or not name.endswith('.pth'):
                continue
            if name.endswith('-nspkg.pth'):
                continue
            if parts[0].upper() in ('PURELIB','PLATLIB'):
                contents = z.read(name)
                if sys.version_info >= (3,):
                    contents = contents.decode()
                for pth in yield_lines(contents):
                    pth = pth.strip().replace('\\','/')
                    if not pth.startswith('import'):
                        prefixes.append((('%s/%s/' % (parts[0],pth)), ''))
    finally:
        z.close()
    prefixes = [(x.lower(),y) for x, y in prefixes]
    prefixes.sort()
    prefixes.reverse()
    return prefixes


def parse_requirement_arg(spec):
    try:
        return Requirement.parse(spec)
    except ValueError:
        raise DistutilsError(
            "Not a URL, existing file, or requirement spec: %r" % (spec,)
        )

class PthDistributions(Environment):
    """A .pth file with Distribution paths in it"""

    dirty = False

    def __init__(self, filename, sitedirs=()):
        self.filename = filename
        self.sitedirs = list(map(normalize_path, sitedirs))
        self.basedir = normalize_path(os.path.dirname(self.filename))
        self._load()
        Environment.__init__(self, [], None, None)
        for path in yield_lines(self.paths):
            list(map(self.add, find_distributions(path, True)))

    def _load(self):
        self.paths = []
        saw_import = False
        seen = dict.fromkeys(self.sitedirs)
        if os.path.isfile(self.filename):
            f = open(self.filename,'rt')
            for line in f:
                if line.startswith('import'):
                    saw_import = True
                    continue
                path = line.rstrip()
                self.paths.append(path)
                if not path.strip() or path.strip().startswith('#'):
                    continue
                # skip non-existent paths, in case somebody deleted a package
                # manually, and duplicate paths as well
                path = self.paths[-1] = normalize_path(
                    os.path.join(self.basedir,path)
                )
                if not os.path.exists(path) or path in seen:
                    self.paths.pop()    # skip it
                    self.dirty = True   # we cleaned up, so we're dirty now :)
                    continue
                seen[path] = 1
            f.close()

        if self.paths and not saw_import:
            self.dirty = True   # ensure anything we touch has import wrappers
        while self.paths and not self.paths[-1].strip():
            self.paths.pop()

    def save(self):
        """Write changed .pth file back to disk"""
        if not self.dirty:
            return

        data = '\n'.join(map(self.make_relative,self.paths))
        if data:
            log.debug("Saving %s", self.filename)
            data = (
                "import sys; sys.__plen = len(sys.path)\n"
                "%s\n"
                "import sys; new=sys.path[sys.__plen:];"
                " del sys.path[sys.__plen:];"
                " p=getattr(sys,'__egginsert',0); sys.path[p:p]=new;"
                " sys.__egginsert = p+len(new)\n"
            ) % data

            if os.path.islink(self.filename):
                os.unlink(self.filename)
            f = open(self.filename,'wt')
            f.write(data)
            f.close()

        elif os.path.exists(self.filename):
            log.debug("Deleting empty %s", self.filename)
            os.unlink(self.filename)

        self.dirty = False

    def add(self, dist):
        """Add `dist` to the distribution map"""
        if (dist.location not in self.paths and (
                dist.location not in self.sitedirs or
                dist.location == os.getcwd() # account for '.' being in PYTHONPATH
                )):
            self.paths.append(dist.location)
            self.dirty = True
        Environment.add(self, dist)

    def remove(self, dist):
        """Remove `dist` from the distribution map"""
        while dist.location in self.paths:
            self.paths.remove(dist.location)
            self.dirty = True
        Environment.remove(self, dist)

    def make_relative(self,path):
        npath, last = os.path.split(normalize_path(path))
        baselen = len(self.basedir)
        parts = [last]
        sep = os.altsep=='/' and '/' or os.sep
        while len(npath)>=baselen:
            if npath==self.basedir:
                parts.append(os.curdir)
                parts.reverse()
                return sep.join(parts)
            npath, last = os.path.split(npath)
            parts.append(last)
        else:
            return path

def get_script_header(script_text, executable=sys_executable, wininst=False):
    """Create a #! line, getting options (if any) from script_text"""
    from distutils.command.build_scripts import first_line_re

    # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern.
    if not isinstance(first_line_re.pattern, str):
        first_line_re = re.compile(first_line_re.pattern.decode())

    first = (script_text+'\n').splitlines()[0]
    match = first_line_re.match(first)
    options = ''
    if match:
        options = match.group(1) or ''
        if options: options = ' '+options
    if wininst:
        executable = "python.exe"
    else:
        executable = nt_quote_arg(executable)
    hdr = "#!%(executable)s%(options)s\n" % locals()
    if not isascii(hdr):
        # Non-ascii path to sys.executable, use -x to prevent warnings
        if options:
            if options.strip().startswith('-'):
                options = ' -x'+options.strip()[1:]
            # else: punt, we can't do it, let the warning happen anyway
        else:
            options = ' -x'
    executable = fix_jython_executable(executable, options)
    hdr = "#!%(executable)s%(options)s\n" % locals()
    return hdr

def auto_chmod(func, arg, exc):
    if func is os.remove and os.name=='nt':
        chmod(arg, stat.S_IWRITE)
        return func(arg)
    et, ev, _ = sys.exc_info()
    reraise(et, (ev[0], ev[1] + (" %s %s" % (func,arg))))

def uncache_zipdir(path):
    """Ensure that the importer caches dont have stale info for `path`"""
    from zipimport import _zip_directory_cache as zdc
    _uncache(path, zdc)
    _uncache(path, sys.path_importer_cache)

def _uncache(path, cache):
    if path in cache:
        del cache[path]
    else:
        path = normalize_path(path)
        for p in cache:
            if normalize_path(p)==path:
                del cache[p]
                return

def is_python(text, filename='<string>'):
    "Is this string a valid Python script?"
    try:
        compile(text, filename, 'exec')
    except (SyntaxError, TypeError):
        return False
    else:
        return True

def is_sh(executable):
    """Determine if the specified executable is a .sh (contains a #! line)"""
    try:
        fp = open(executable)
        magic = fp.read(2)
        fp.close()
    except (OSError,IOError): return executable
    return magic == '#!'

def nt_quote_arg(arg):
    """Quote a command line argument according to Windows parsing rules"""

    result = []
    needquote = False
    nb = 0

    needquote = (" " in arg) or ("\t" in arg)
    if needquote:
        result.append('"')

    for c in arg:
        if c == '\\':
            nb += 1
        elif c == '"':
            # double preceding backslashes, then add a \"
            result.append('\\' * (nb*2) + '\\"')
            nb = 0
        else:
            if nb:
                result.append('\\' * nb)
                nb = 0
            result.append(c)

    if nb:
        result.append('\\' * nb)

    if needquote:
        result.append('\\' * nb)    # double the trailing backslashes
        result.append('"')

    return ''.join(result)

def is_python_script(script_text, filename):
    """Is this text, as a whole, a Python script? (as opposed to shell/bat/etc.
    """
    if filename.endswith('.py') or filename.endswith('.pyw'):
        return True     # extension says it's Python
    if is_python(script_text, filename):
        return True     # it's syntactically valid Python
    if script_text.startswith('#!'):
        # It begins with a '#!' line, so check if 'python' is in it somewhere
        return 'python' in script_text.splitlines()[0].lower()

    return False    # Not any Python I can recognize

try:
    from os import chmod as _chmod
except ImportError:
    # Jython compatibility
    def _chmod(*args): pass

def chmod(path, mode):
    log.debug("changing mode of %s to %o", path, mode)
    try:
        _chmod(path, mode)
    except os.error:
        e = sys.exc_info()[1]
        log.debug("chmod failed: %s", e)

def fix_jython_executable(executable, options):
    if sys.platform.startswith('java') and is_sh(executable):
        # Workaround for Jython is not needed on Linux systems.
        import java
        if java.lang.System.getProperty("os.name") == "Linux":
            return executable

        # Workaround Jython's sys.executable being a .sh (an invalid
        # shebang line interpreter)
        if options:
            # Can't apply the workaround, leave it broken
            log.warn(
                "WARNING: Unable to adapt shebang line for Jython,"
                " the following script is NOT executable\n"
                "         see http://bugs.jython.org/issue1112 for"
                " more information.")
        else:
            return '/usr/bin/env %s' % executable
    return executable


class ScriptWriter(object):
    """
    Encapsulates behavior around writing entry point scripts for console and
    gui apps.
    """

    template = textwrap.dedent("""
        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
        __requires__ = %(spec)r
        import sys
        from pkg_resources import load_entry_point

        if __name__ == '__main__':
            sys.exit(
                load_entry_point(%(spec)r, %(group)r, %(name)r)()
            )
    """).lstrip()

    @classmethod
    def get_script_args(cls, dist, executable=sys_executable, wininst=False):
        """
        Yield write_script() argument tuples for a distribution's entrypoints
        """
        gen_class = cls.get_writer(wininst)
        spec = str(dist.as_requirement())
        header = get_script_header("", executable, wininst)
        for type_ in 'console', 'gui':
            group = type_ + '_scripts'
            for name, ep in dist.get_entry_map(group).items():
                script_text = gen_class.template % locals()
                for res in gen_class._get_script_args(type_, name, header,
                        script_text):
                    yield res

    @classmethod
    def get_writer(cls, force_windows):
        if force_windows or sys.platform=='win32':
            return WindowsScriptWriter.get_writer()
        return cls

    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        # Simply write the stub with no extension.
        yield (name, header+script_text)


class WindowsScriptWriter(ScriptWriter):
    @classmethod
    def get_writer(cls):
        """
        Get a script writer suitable for Windows
        """
        writer_lookup = dict(
            executable=WindowsExecutableLauncherWriter,
            natural=cls,
        )
        # for compatibility, use the executable launcher by default
        launcher = os.environ.get('SETUPTOOLS_LAUNCHER', 'executable')
        return writer_lookup[launcher]

    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        "For Windows, add a .py extension"
        ext = dict(console='.pya', gui='.pyw')[type_]
        if ext not in os.environ['PATHEXT'].lower().split(';'):
            warnings.warn("%s not listed in PATHEXT; scripts will not be "
                "recognized as executables." % ext, UserWarning)
        old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe']
        old.remove(ext)
        header = cls._adjust_header(type_, header)
        blockers = [name+x for x in old]
        yield name+ext, header+script_text, 't', blockers

    @staticmethod
    def _adjust_header(type_, orig_header):
        """
        Make sure 'pythonw' is used for gui and and 'python' is used for
        console (regardless of what sys.executable is).
        """
        pattern = 'pythonw.exe'
        repl = 'python.exe'
        if type_ == 'gui':
            pattern, repl = repl, pattern
        pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE)
        new_header = pattern_ob.sub(string=orig_header, repl=repl)
        clean_header = new_header[2:-1].strip('"')
        if sys.platform == 'win32' and not os.path.exists(clean_header):
            # the adjusted version doesn't exist, so return the original
            return orig_header
        return new_header


class WindowsExecutableLauncherWriter(WindowsScriptWriter):
    @classmethod
    def _get_script_args(cls, type_, name, header, script_text):
        """
        For Windows, add a .py extension and an .exe launcher
        """
        if type_=='gui':
            launcher_type = 'gui'
            ext = '-script.pyw'
            old = ['.pyw']
        else:
            launcher_type = 'cli'
            ext = '-script.py'
            old = ['.py','.pyc','.pyo']
        hdr = cls._adjust_header(type_, header)
        blockers = [name+x for x in old]
        yield (name+ext, hdr+script_text, 't', blockers)
        yield (
            name+'.exe', get_win_launcher(launcher_type),
            'b' # write in binary mode
        )
        if not is_64bit():
            # install a manifest for the launcher to prevent Windows
            #  from detecting it as an installer (which it will for
            #  launchers like easy_install.exe). Consider only
            #  adding a manifest for launchers detected as installers.
            #  See Distribute #143 for details.
            m_name = name + '.exe.manifest'
            yield (m_name, load_launcher_manifest(name), 't')

# for backward-compatibility
get_script_args = ScriptWriter.get_script_args

def get_win_launcher(type):
    """
    Load the Windows launcher (executable) suitable for launching a script.

    `type` should be either 'cli' or 'gui'

    Returns the executable as a byte string.
    """
    launcher_fn = '%s.exe' % type
    if platform.machine().lower()=='arm':
        launcher_fn = launcher_fn.replace(".", "-arm.")
    if is_64bit():
        launcher_fn = launcher_fn.replace(".", "-64.")
    else:
        launcher_fn = launcher_fn.replace(".", "-32.")
    return resource_string('setuptools', launcher_fn)

def load_launcher_manifest(name):
    manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml')
    if sys.version_info[0] < 3:
        return manifest % vars()
    else:
        return manifest.decode('utf-8') % vars()

def rmtree(path, ignore_errors=False, onerror=auto_chmod):
    """Recursively delete a directory tree.

    This code is taken from the Python 2.4 version of 'shutil', because
    the 2.3 version doesn't really work right.
    """
    if ignore_errors:
        def onerror(*args):
            pass
    elif onerror is None:
        def onerror(*args):
            raise
    names = []
    try:
        names = os.listdir(path)
    except os.error:
        onerror(os.listdir, path, sys.exc_info())
    for name in names:
        fullname = os.path.join(path, name)
        try:
            mode = os.lstat(fullname).st_mode
        except os.error:
            mode = 0
        if stat.S_ISDIR(mode):
            rmtree(fullname, ignore_errors, onerror)
        else:
            try:
                os.remove(fullname)
            except os.error:
                onerror(os.remove, fullname, sys.exc_info())
    try:
        os.rmdir(path)
    except os.error:
        onerror(os.rmdir, path, sys.exc_info())

def current_umask():
    tmp = os.umask(0x12)    # 022
    os.umask(tmp)
    return tmp

def bootstrap():
    # This function is called when setuptools*.egg is run using /bin/sh
    import setuptools
    argv0 = os.path.dirname(setuptools.__path__[0])
    sys.argv[0] = argv0
    sys.argv.append(argv0)
    main()

def main(argv=None, **kw):
    from setuptools import setup
    from setuptools.dist import Distribution
    import distutils.core

    USAGE = """\
usage: %(script)s [options] requirement_or_url ...
   or: %(script)s --help
"""

    def gen_usage(script_name):
        return USAGE % dict(
            script=os.path.basename(script_name),
        )

    def with_ei_usage(f):
        old_gen_usage = distutils.core.gen_usage
        try:
            distutils.core.gen_usage = gen_usage
            return f()
        finally:
            distutils.core.gen_usage = old_gen_usage

    class DistributionWithoutHelpCommands(Distribution):
        common_usage = ""

        def _show_help(self,*args,**kw):
            with_ei_usage(lambda: Distribution._show_help(self,*args,**kw))

    if argv is None:
        argv = sys.argv[1:]

    with_ei_usage(lambda:
        setup(
            script_args = ['-q','easy_install', '-v']+argv,
            script_name = sys.argv[0] or 'easy_install',
            distclass=DistributionWithoutHelpCommands, **kw
        )
    )
python3.4/site-packages/setuptools/command/rotate.py000064400000004016151735050020016540 0ustar00import distutils, os
from setuptools import Command
from setuptools.compat import basestring
from distutils.util import convert_path
from distutils import log
from distutils.errors import *

class rotate(Command):
    """Delete older distributions"""

    description = "delete older distributions, keeping N newest files"
    user_options = [
        ('match=',    'm', "patterns to match (required)"),
        ('dist-dir=', 'd', "directory where the distributions are"),
        ('keep=',     'k', "number of matching distributions to keep"),
    ]

    boolean_options = []

    def initialize_options(self):
        self.match = None
        self.dist_dir = None
        self.keep = None

    def finalize_options(self):
        if self.match is None:
            raise DistutilsOptionError(
                "Must specify one or more (comma-separated) match patterns "
                "(e.g. '.zip' or '.egg')"
            )
        if self.keep is None:
            raise DistutilsOptionError("Must specify number of files to keep")           
        try:
            self.keep = int(self.keep)
        except ValueError:
            raise DistutilsOptionError("--keep must be an integer")
        if isinstance(self.match, basestring):
            self.match = [
                convert_path(p.strip()) for p in self.match.split(',')
            ]
        self.set_undefined_options('bdist',('dist_dir', 'dist_dir'))

    def run(self):
        self.run_command("egg_info")
        from glob import glob
        for pattern in self.match:
            pattern = self.distribution.get_name()+'*'+pattern
            files = glob(os.path.join(self.dist_dir,pattern))
            files = [(os.path.getmtime(f),f) for f in files]
            files.sort()
            files.reverse()

            log.info("%d file(s) matching %s", len(files), pattern)
            files = files[self.keep:]
            for (t,f) in files:
                log.info("Deleting %s", f)
                if not self.dry_run:
                    os.unlink(f)

























python3.4/site-packages/setuptools/command/install_lib.py000064400000004666151735050020017551 0ustar00from distutils.command.install_lib import install_lib as _install_lib
import os

class install_lib(_install_lib):
    """Don't add compiled flags to filenames of non-Python files"""

    def _bytecode_filenames (self, py_filenames):
        bytecode_files = []
        for py_file in py_filenames:
            if not py_file.endswith('.py'):
                continue
            if self.compile:
                bytecode_files.append(py_file + "c")
            if self.optimize > 0:
                bytecode_files.append(py_file + "o")

        return bytecode_files

    def run(self):
        self.build()
        outfiles = self.install()
        if outfiles is not None:
            # always compile, in case we have any extension stubs to deal with
            self.byte_compile(outfiles)

    def get_exclusions(self):
        exclude = {}
        nsp = self.distribution.namespace_packages

        if (nsp and self.get_finalized_command('install')
               .single_version_externally_managed
        ):
            for pkg in nsp:
                parts = pkg.split('.')
                while parts:
                    pkgdir = os.path.join(self.install_dir, *parts)
                    for f in '__init__.py', '__init__.pyc', '__init__.pyo':
                        exclude[os.path.join(pkgdir,f)] = 1
                    parts.pop()
        return exclude

    def copy_tree(
        self, infile, outfile,
        preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1
    ):
        assert preserve_mode and preserve_times and not preserve_symlinks
        exclude = self.get_exclusions()

        if not exclude:
            return _install_lib.copy_tree(self, infile, outfile)

        # Exclude namespace package __init__.py* files from the output

        from setuptools.archive_util import unpack_directory
        from distutils import log

        outfiles = []

        def pf(src, dst):
            if dst in exclude:
                log.warn("Skipping installation of %s (namespace package)",dst)
                return False

            log.info("copying %s -> %s", src, os.path.dirname(dst))
            outfiles.append(dst)
            return dst

        unpack_directory(infile, outfile, pf)
        return outfiles

    def get_outputs(self):
        outputs = _install_lib.get_outputs(self)
        exclude = self.get_exclusions()
        if exclude:
            return [f for f in outputs if f not in exclude]
        return outputs






python3.4/site-packages/setuptools/command/upload_docs.py000064400000015227151735050020017544 0ustar00# -*- coding: utf-8 -*-
"""upload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
PyPI's pythonhosted.org).
"""

import os
import socket
import zipfile
import tempfile
import sys
import shutil

from base64 import standard_b64encode
from pkg_resources import iter_entry_points

from distutils import log
from distutils.errors import DistutilsOptionError
from distutils.command.upload import upload

from setuptools.compat import httplib, urlparse, unicode, iteritems, PY3

errors = 'surrogateescape' if PY3 else 'strict'


# This is not just a replacement for byte literals
# but works as a general purpose encoder
def b(s, encoding='utf-8'):
    if isinstance(s, unicode):
        return s.encode(encoding, errors)
    return s


class upload_docs(upload):

    description = 'Upload documentation to PyPI'

    user_options = [
        ('repository=', 'r',
         "url of repository [default: %s]" % upload.DEFAULT_REPOSITORY),
        ('show-response', None,
         'display full response text from server'),
        ('upload-dir=', None, 'directory to upload'),
        ]
    boolean_options = upload.boolean_options

    def has_sphinx(self):
        if self.upload_dir is None:
            for ep in iter_entry_points('distutils.commands', 'build_sphinx'):
                return True

    sub_commands = [('build_sphinx', has_sphinx)]

    def initialize_options(self):
        upload.initialize_options(self)
        self.upload_dir = None
        self.target_dir = None

    def finalize_options(self):
        upload.finalize_options(self)
        if self.upload_dir is None:
            if self.has_sphinx():
                build_sphinx = self.get_finalized_command('build_sphinx')
                self.target_dir = build_sphinx.builder_target_dir
            else:
                build = self.get_finalized_command('build')
                self.target_dir = os.path.join(build.build_base, 'docs')
        else:
            self.ensure_dirname('upload_dir')
            self.target_dir = self.upload_dir
        self.announce('Using upload directory %s' % self.target_dir)

    def create_zipfile(self, filename):
        zip_file = zipfile.ZipFile(filename, "w")
        try:
            self.mkpath(self.target_dir)  # just in case
            for root, dirs, files in os.walk(self.target_dir):
                if root == self.target_dir and not files:
                    raise DistutilsOptionError(
                        "no files found in upload directory '%s'"
                        % self.target_dir)
                for name in files:
                    full = os.path.join(root, name)
                    relative = root[len(self.target_dir):].lstrip(os.path.sep)
                    dest = os.path.join(relative, name)
                    zip_file.write(full, dest)
        finally:
            zip_file.close()

    def run(self):
        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        tmp_dir = tempfile.mkdtemp()
        name = self.distribution.metadata.get_name()
        zip_file = os.path.join(tmp_dir, "%s.zip" % name)
        try:
            self.create_zipfile(zip_file)
            self.upload_file(zip_file)
        finally:
            shutil.rmtree(tmp_dir)

    def upload_file(self, filename):
        f = open(filename, 'rb')
        content = f.read()
        f.close()
        meta = self.distribution.metadata
        data = {
            ':action': 'doc_upload',
            'name': meta.get_name(),
            'content': (os.path.basename(filename), content),
        }
        # set up the authentication
        credentials = b(self.username + ':' + self.password)
        credentials = standard_b64encode(credentials)
        if PY3:
            credentials = credentials.decode('ascii')
        auth = "Basic " + credentials

        # Build up the MIME payload for the POST data
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = b('\n--') + b(boundary)
        end_boundary = sep_boundary + b('--')
        body = []
        for key, values in iteritems(data):
            title = '\nContent-Disposition: form-data; name="%s"' % key
            # handle multiple entries for the same name
            if isinstance(values, list):
                values = [values]
            for value in values:
                if type(value) is tuple:
                    title += '; filename="%s"' % value[0]
                    value = value[1]
                else:
                    value = b(value)
                body.append(sep_boundary)
                body.append(b(title))
                body.append(b("\n\n"))
                body.append(value)
                if value and value[-1:] == b('\r'):
                    body.append(b('\n'))  # write an extra newline (lurve Macs)
        body.append(end_boundary)
        body.append(b("\n"))
        body = b('').join(body)

        self.announce("Submitting documentation to %s" % (self.repository),
                      log.INFO)

        # build the Request
        # We can't use urllib2 since we need to send the Basic
        # auth right with the first request
        schema, netloc, url, params, query, fragments = \
            urlparse(self.repository)
        assert not params and not query and not fragments
        if schema == 'http':
            conn = httplib.HTTPConnection(netloc)
        elif schema == 'https':
            conn = httplib.HTTPSConnection(netloc)
        else:
            raise AssertionError("unsupported schema "+schema)

        data = ''
        try:
            conn.connect()
            conn.putrequest("POST", url)
            content_type = 'multipart/form-data; boundary=%s' % boundary
            conn.putheader('Content-type', content_type)
            conn.putheader('Content-length', str(len(body)))
            conn.putheader('Authorization', auth)
            conn.endheaders()
            conn.send(body)
        except socket.error:
            e = sys.exc_info()[1]
            self.announce(str(e), log.ERROR)
            return

        r = conn.getresponse()
        if r.status == 200:
            self.announce('Server response (%s): %s' % (r.status, r.reason),
                          log.INFO)
        elif r.status == 301:
            location = r.getheader('Location')
            if location is None:
                location = 'https://pythonhosted.org/%s/' % meta.get_name()
            self.announce('Upload successful. Visit %s' % location,
                          log.INFO)
        else:
            self.announce('Upload failed (%s): %s' % (r.status, r.reason),
                          log.ERROR)
        if self.show_response:
            print('-'*75, r.read(), '-'*75)
python3.4/site-packages/setuptools/command/install_scripts.py000064400000004024151735050020020456 0ustar00from distutils.command.install_scripts import install_scripts \
     as _install_scripts
from pkg_resources import Distribution, PathMetadata, ensure_directory
import os
from distutils import log

class install_scripts(_install_scripts):
    """Do normal script install, plus any egg_info wrapper scripts"""

    def initialize_options(self):
        _install_scripts.initialize_options(self)
        self.no_ep = False

    def run(self):
        from setuptools.command.easy_install import get_script_args
        from setuptools.command.easy_install import sys_executable

        self.run_command("egg_info")
        if self.distribution.scripts:
            _install_scripts.run(self)  # run first to set up self.outfiles
        else:
            self.outfiles = []
        if self.no_ep:
            # don't install entry point scripts into .egg file!
            return

        ei_cmd = self.get_finalized_command("egg_info")
        dist = Distribution(
            ei_cmd.egg_base, PathMetadata(ei_cmd.egg_base, ei_cmd.egg_info),
            ei_cmd.egg_name, ei_cmd.egg_version,
        )
        bs_cmd = self.get_finalized_command('build_scripts')
        executable = getattr(bs_cmd,'executable',sys_executable)
        is_wininst = getattr(
            self.get_finalized_command("bdist_wininst"), '_is_running', False
        )
        for args in get_script_args(dist, executable, is_wininst):
            self.write_script(*args)

    def write_script(self, script_name, contents, mode="t", *ignored):
        """Write an executable file to the scripts directory"""
        from setuptools.command.easy_install import chmod, current_umask
        log.info("Installing %s script to %s", script_name, self.install_dir)
        target = os.path.join(self.install_dir, script_name)
        self.outfiles.append(target)

        mask = current_umask()
        if not self.dry_run:
            ensure_directory(target)
            f = open(target,"w"+mode)
            f.write(contents)
            f.close()
            chmod(target, 0x1FF-mask)  # 0777

python3.4/site-packages/setuptools/command/alias.py000064400000004666151735050020016346 0ustar00import distutils, os
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import *
from setuptools.command.setopt import edit_config, option_base, config_file

def shquote(arg):
    """Quote an argument for later parsing by shlex.split()"""
    for c in '"', "'", "\\", "#":
        if c in arg: return repr(arg)
    if arg.split() != [arg]:
        return repr(arg)
    return arg        


class alias(option_base):
    """Define a shortcut that invokes one or more commands"""
    
    description = "define a shortcut to invoke one or more commands"
    command_consumes_arguments = True

    user_options = [
        ('remove',   'r', 'remove (unset) the alias'), 
    ] + option_base.user_options

    boolean_options = option_base.boolean_options + ['remove']

    def initialize_options(self):
        option_base.initialize_options(self)
        self.args = None
        self.remove = None

    def finalize_options(self):
        option_base.finalize_options(self)
        if self.remove and len(self.args) != 1:
            raise DistutilsOptionError(
                "Must specify exactly one argument (the alias name) when "
                "using --remove"
            )

    def run(self):
        aliases = self.distribution.get_option_dict('aliases')

        if not self.args:
            print("Command Aliases")
            print("---------------")
            for alias in aliases:
                print("setup.py alias", format_alias(alias, aliases))
            return

        elif len(self.args)==1:
            alias, = self.args
            if self.remove:
                command = None
            elif alias in aliases:
                print("setup.py alias", format_alias(alias, aliases))
                return
            else:
                print("No alias definition found for %r" % alias)
                return
        else:
            alias = self.args[0]
            command = ' '.join(map(shquote,self.args[1:]))

        edit_config(self.filename, {'aliases': {alias:command}}, self.dry_run)


def format_alias(name, aliases):
    source, command = aliases[name]
    if source == config_file('global'):
        source = '--global-config '
    elif source == config_file('user'):
        source = '--user-config '
    elif source == config_file('local'):
        source = ''
    else:
        source = '--filename=%r' % source
    return source+name+' '+command
            


python3.4/site-packages/setuptools/command/install_egg_info.py000064400000007371151735050020020554 0ustar00from setuptools import Command
from setuptools.archive_util import unpack_archive
from distutils import log, dir_util
import os, shutil, pkg_resources

class install_egg_info(Command):
    """Install an .egg-info directory for the package"""

    description = "Install an .egg-info directory for the package"

    user_options = [
        ('install-dir=', 'd', "directory to install to"),
    ]

    def initialize_options(self):
        self.install_dir = None

    def finalize_options(self):
        self.set_undefined_options('install_lib',('install_dir','install_dir'))
        ei_cmd = self.get_finalized_command("egg_info")
        basename = pkg_resources.Distribution(
            None, None, ei_cmd.egg_name, ei_cmd.egg_version
        ).egg_name()+'.egg-info'
        self.source = ei_cmd.egg_info
        self.target = os.path.join(self.install_dir, basename)
        self.outputs = [self.target]

    def run(self):
        self.run_command('egg_info')
        target = self.target
        if os.path.isdir(self.target) and not os.path.islink(self.target):
            dir_util.remove_tree(self.target, dry_run=self.dry_run)
        elif os.path.exists(self.target):
            self.execute(os.unlink,(self.target,),"Removing "+self.target)
        if not self.dry_run:
            pkg_resources.ensure_directory(self.target)
        self.execute(self.copytree, (),
            "Copying %s to %s" % (self.source, self.target)
        )
        self.install_namespaces()

    def get_outputs(self):
        return self.outputs

    def copytree(self):
        # Copy the .egg-info tree to site-packages
        def skimmer(src,dst):
            # filter out source-control directories; note that 'src' is always
            # a '/'-separated path, regardless of platform.  'dst' is a
            # platform-specific path.
            for skip in '.svn/','CVS/':
                if src.startswith(skip) or '/'+skip in src:
                    return None
            self.outputs.append(dst)
            log.debug("Copying %s to %s", src, dst)
            return dst
        unpack_archive(self.source, self.target, skimmer)

























    def install_namespaces(self):
        nsp = self._get_all_ns_packages()
        if not nsp: return
        filename,ext = os.path.splitext(self.target)
        filename += '-nspkg.pth'; self.outputs.append(filename)
        log.info("Installing %s",filename)
        if not self.dry_run:
            f = open(filename,'wt')
            for pkg in nsp:
                # ensure pkg is not a unicode string under Python 2.7
                pkg = str(pkg)
                pth = tuple(pkg.split('.'))
                trailer = '\n'
                if '.' in pkg:
                    trailer = (
                        "; m and setattr(sys.modules[%r], %r, m)\n"
                        % ('.'.join(pth[:-1]), pth[-1])
                    )
                f.write(
                    "import sys,types,os; "
                    "p = os.path.join(sys._getframe(1).f_locals['sitedir'], "
                        "*%(pth)r); "
                    "ie = os.path.exists(os.path.join(p,'__init__.py')); "
                    "m = not ie and "
                        "sys.modules.setdefault(%(pkg)r,types.ModuleType(%(pkg)r)); "
                    "mp = (m or []) and m.__dict__.setdefault('__path__',[]); "
                    "(p not in mp) and mp.append(p)%(trailer)s"
                    % locals()
                )
            f.close()

    def _get_all_ns_packages(self):
        nsp = {}
        for pkg in self.distribution.namespace_packages or []:
            pkg = pkg.split('.')
            while pkg:
                nsp['.'.join(pkg)] = 1
                pkg.pop()
        nsp=list(nsp)
        nsp.sort()  # set up shorter names first
        return nsp


python3.4/site-packages/setuptools/command/__init__.py000064400000001051151735050020016775 0ustar00__all__ = [
    'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop',
    'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
    'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts',
    'register', 'bdist_wininst', 'upload_docs',
]

from setuptools.command import install_scripts
import sys

from distutils.command.bdist import bdist

if 'egg' not in bdist.format_commands:
    bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
    bdist.format_commands.append('egg')

del bdist, sys
python3.4/site-packages/setuptools/command/saveopts.py000064400000001301151735050020017100 0ustar00import distutils, os
from setuptools import Command
from setuptools.command.setopt import edit_config, option_base

class saveopts(option_base):
    """Save command-line options to a file"""

    description = "save supplied options to setup.cfg or other config file"

    def run(self):
        dist = self.distribution
        settings = {}

        for cmd in dist.command_options:

            if cmd=='saveopts':
                continue    # don't save our own options!

            for opt,(src,val) in dist.get_option_dict(cmd).items():
                if src=="command line":
                    settings.setdefault(cmd,{})[opt] = val

        edit_config(self.filename, settings, self.dry_run)

python3.4/site-packages/setuptools/command/sdist.py000064400000020225151735050020016370 0ustar00import os
import re
import sys
from glob import glob

import pkg_resources
from distutils.command.sdist import sdist as _sdist
from distutils.util import convert_path
from distutils import log
from setuptools import svn_utils

READMES = ('README', 'README.rst', 'README.txt')


def walk_revctrl(dirname=''):
    """Find all files under revision control"""
    for ep in pkg_resources.iter_entry_points('setuptools.file_finders'):
        for item in ep.load()(dirname):
            yield item


#TODO will need test case
class re_finder(object):

    def __init__(self, path, pattern, postproc=None):
        self.pattern = pattern
        self.postproc = postproc
        self.path = convert_path(path)

    def _finder(self, dirname, filename):
        f = open(filename,'rU')
        try:
            data = f.read()
        finally:
            f.close()
        for match in self.pattern.finditer(data):
            path = match.group(1)
            if self.postproc:
                #postproc used to be used when the svn finder
                #was an re_finder for calling unescape
                path = self.postproc(path)
            yield svn_utils.joinpath(dirname,path)
    def __call__(self, dirname=''):
        path = svn_utils.joinpath(dirname, self.path)

        if os.path.isfile(path):
            for path in self._finder(dirname,path):
                if os.path.isfile(path):
                    yield path
                elif os.path.isdir(path):
                    for item in self(path):
                        yield item


def _default_revctrl(dirname=''):
    'Primary svn_cvs entry point'
    for finder in finders:
        for item in finder(dirname):
            yield item


finders = [
    re_finder('CVS/Entries', re.compile(r"^\w?/([^/]+)/", re.M)),
    svn_utils.svn_finder,
]



class sdist(_sdist):
    """Smart sdist that finds anything supported by revision control"""

    user_options = [
        ('formats=', None,
         "formats for source distribution (comma-separated list)"),
        ('keep-temp', 'k',
         "keep the distribution tree around after creating " +
         "archive file(s)"),
        ('dist-dir=', 'd',
         "directory to put the source distribution archive(s) in "
         "[default: dist]"),
        ]

    negative_opt = {}

    def run(self):
        self.run_command('egg_info')
        ei_cmd = self.get_finalized_command('egg_info')
        self.filelist = ei_cmd.filelist
        self.filelist.append(os.path.join(ei_cmd.egg_info,'SOURCES.txt'))
        self.check_readme()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        # Call check_metadata only if no 'check' command
        # (distutils <= 2.6)
        import distutils.command
        if 'check' not in distutils.command.__all__:
            self.check_metadata()

        self.make_distribution()

        dist_files = getattr(self.distribution,'dist_files',[])
        for file in self.archive_files:
            data = ('sdist', '', file)
            if data not in dist_files:
                dist_files.append(data)

    def __read_template_hack(self):
        # This grody hack closes the template file (MANIFEST.in) if an
        #  exception occurs during read_template.
        # Doing so prevents an error when easy_install attempts to delete the
        #  file.
        try:
            _sdist.read_template(self)
        except:
            sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
            raise
    # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle
    #  has been fixed, so only override the method if we're using an earlier
    #  Python.
    has_leaky_handle = (
        sys.version_info < (2,7,2)
        or (3,0) <= sys.version_info < (3,1,4)
        or (3,2) <= sys.version_info < (3,2,1)
    )
    if has_leaky_handle:
        read_template = __read_template_hack

    def add_defaults(self):
        standards = [READMES,
                     self.distribution.script_name]
        for fn in standards:
            if isinstance(fn, tuple):
                alts = fn
                got_it = 0
                for fn in alts:
                    if os.path.exists(fn):
                        got_it = 1
                        self.filelist.append(fn)
                        break

                if not got_it:
                    self.warn("standard file not found: should have one of " +
                              ', '.join(alts))
            else:
                if os.path.exists(fn):
                    self.filelist.append(fn)
                else:
                    self.warn("standard file '%s' not found" % fn)

        optional = ['test/test*.py', 'setup.cfg']
        for pattern in optional:
            files = list(filter(os.path.isfile, glob(pattern)))
            if files:
                self.filelist.extend(files)

        # getting python files
        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            self.filelist.extend(build_py.get_source_files())
            # This functionality is incompatible with include_package_data, and
            # will in fact create an infinite recursion if include_package_data
            # is True.  Use of include_package_data will imply that
            # distutils-style automatic handling of package_data is disabled
            if not self.distribution.include_package_data:
                for _, src_dir, _, filenames in build_py.data_files:
                    self.filelist.extend([os.path.join(src_dir, filename)
                                          for filename in filenames])

        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            self.filelist.extend(build_ext.get_source_files())

        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.filelist.extend(build_clib.get_source_files())

        if self.distribution.has_scripts():
            build_scripts = self.get_finalized_command('build_scripts')
            self.filelist.extend(build_scripts.get_source_files())

    def check_readme(self):
        for f in READMES:
            if os.path.exists(f):
                return
        else:
            self.warn(
                "standard file not found: should have one of " +', '.join(READMES)
            )

    def make_release_tree(self, base_dir, files):
        _sdist.make_release_tree(self, base_dir, files)

        # Save any egg_info command line options used to create this sdist
        dest = os.path.join(base_dir, 'setup.cfg')
        if hasattr(os,'link') and os.path.exists(dest):
            # unlink and re-copy, since it might be hard-linked, and
            # we don't want to change the source version
            os.unlink(dest)
            self.copy_file('setup.cfg', dest)

        self.get_finalized_command('egg_info').save_version_info(dest)

    def _manifest_is_not_generated(self):
        # check for special comment used in 2.7.1 and higher
        if not os.path.isfile(self.manifest):
            return False

        fp = open(self.manifest, 'rbU')
        try:
            first_line = fp.readline()
        finally:
            fp.close()
        return first_line != '# file GENERATED by distutils, do NOT edit\n'.encode()

    def read_manifest(self):
        """Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        """
        log.info("reading manifest file '%s'", self.manifest)
        manifest = open(self.manifest, 'rbU')
        for line in manifest:
            # The manifest must contain UTF-8. See #303.
            if sys.version_info >= (3,):
                try:
                    line = line.decode('UTF-8')
                except UnicodeDecodeError:
                    log.warn("%r not UTF-8 decodable -- skipping" % line)
                    continue
            # ignore comments and blank lines
            line = line.strip()
            if line.startswith('#') or not line:
                continue
            self.filelist.append(line)
        manifest.close()
python3.4/site-packages/setuptools/command/develop.py000064400000014457151735050020016712 0ustar00from setuptools.command.easy_install import easy_install
from distutils.util import convert_path, subst_vars
from pkg_resources import Distribution, PathMetadata, normalize_path
from distutils import log
from distutils.errors import DistutilsError, DistutilsOptionError
import os, sys, setuptools, glob

class develop(easy_install):
    """Set up package for development"""

    description = "install package in 'development mode'"

    user_options = easy_install.user_options + [
        ("uninstall", "u", "Uninstall this source package"),
        ("egg-path=", None, "Set the path to be used in the .egg-link file"),
    ]

    boolean_options = easy_install.boolean_options + ['uninstall']

    command_consumes_arguments = False  # override base

    def run(self):
        if self.uninstall:
            self.multi_version = True
            self.uninstall_link()
        else:
            self.install_for_development()
        self.warn_deprecated_options()

    def initialize_options(self):
        self.uninstall = None
        self.egg_path = None
        easy_install.initialize_options(self)
        self.setup_path = None
        self.always_copy_from = '.'   # always copy eggs installed in curdir



    def finalize_options(self):
        ei = self.get_finalized_command("egg_info")
        if ei.broken_egg_info:
            raise DistutilsError(
            "Please rename %r to %r before using 'develop'"
            % (ei.egg_info, ei.broken_egg_info)
            )
        self.args = [ei.egg_name]




        easy_install.finalize_options(self)
        self.expand_basedirs()
        self.expand_dirs()
        # pick up setup-dir .egg files only: no .egg-info
        self.package_index.scan(glob.glob('*.egg'))

        self.egg_link = os.path.join(self.install_dir, ei.egg_name+'.egg-link')
        self.egg_base = ei.egg_base
        if self.egg_path is None:
            self.egg_path = os.path.abspath(ei.egg_base)

        target = normalize_path(self.egg_base)
        if normalize_path(os.path.join(self.install_dir, self.egg_path)) != target:
            raise DistutilsOptionError(
                "--egg-path must be a relative path from the install"
                " directory to "+target
        )

        # Make a distribution for the package's source
        self.dist = Distribution(
            target,
            PathMetadata(target, os.path.abspath(ei.egg_info)),
            project_name = ei.egg_name
        )

        p = self.egg_base.replace(os.sep,'/')
        if p!= os.curdir:
            p = '../' * (p.count('/')+1)
        self.setup_path = p
        p = normalize_path(os.path.join(self.install_dir, self.egg_path, p))
        if  p != normalize_path(os.curdir):
            raise DistutilsOptionError(
                "Can't get a consistent path to setup script from"
                " installation directory", p, normalize_path(os.curdir))

    def install_for_development(self):
        if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False):
            # If we run 2to3 we can not do this inplace:

            # Ensure metadata is up-to-date
            self.reinitialize_command('build_py', inplace=0)
            self.run_command('build_py')
            bpy_cmd = self.get_finalized_command("build_py")
            build_path = normalize_path(bpy_cmd.build_lib)

            # Build extensions
            self.reinitialize_command('egg_info', egg_base=build_path)
            self.run_command('egg_info')

            self.reinitialize_command('build_ext', inplace=0)
            self.run_command('build_ext')
            
            # Fixup egg-link and easy-install.pth
            ei_cmd = self.get_finalized_command("egg_info")
            self.egg_path = build_path
            self.dist.location = build_path
            self.dist._provider = PathMetadata(build_path, ei_cmd.egg_info)    # XXX
        else:
            # Without 2to3 inplace works fine:
            self.run_command('egg_info')

            # Build extensions in-place
            self.reinitialize_command('build_ext', inplace=1)
            self.run_command('build_ext')
        
        self.install_site_py()  # ensure that target dir is site-safe
        if setuptools.bootstrap_install_from:
            self.easy_install(setuptools.bootstrap_install_from)
            setuptools.bootstrap_install_from = None

        # create an .egg-link in the installation dir, pointing to our egg
        log.info("Creating %s (link to %s)", self.egg_link, self.egg_base)
        if not self.dry_run:
            f = open(self.egg_link,"w")
            f.write(self.egg_path + "\n" + self.setup_path)
            f.close()
        # postprocess the installed distro, fixing up .pth, installing scripts,
        # and handling requirements
        self.process_distribution(None, self.dist, not self.no_deps)


    def uninstall_link(self):
        if os.path.exists(self.egg_link):
            log.info("Removing %s (link to %s)", self.egg_link, self.egg_base)
            egg_link_file = open(self.egg_link)
            contents = [line.rstrip() for line in egg_link_file]
            egg_link_file.close()
            if contents not in ([self.egg_path], [self.egg_path, self.setup_path]):
                log.warn("Link points to %s: uninstall aborted", contents)
                return
            if not self.dry_run:
                os.unlink(self.egg_link)
        if not self.dry_run:
            self.update_pth(self.dist)  # remove any .pth link to us
        if self.distribution.scripts:
            # XXX should also check for entry point scripts!
            log.warn("Note: you must uninstall or replace scripts manually!")

    def install_egg_scripts(self, dist):
        if dist is not self.dist:
            # Installing a dependency, so fall back to normal behavior
            return easy_install.install_egg_scripts(self,dist)

        # create wrapper scripts in the script dir, pointing to dist.scripts

        # new-style...
        self.install_wrapper_scripts(dist)

        # ...and old-style
        for script_name in self.distribution.scripts or []:
            script_path = os.path.abspath(convert_path(script_name))
            script_name = os.path.basename(script_path)
            f = open(script_path,'rU')
            script_text = f.read()
            f.close()
            self.install_script(dist, script_name, script_text, script_path)

python3.4/site-packages/setuptools/command/bdist_wininst.py000064400000004353151735050020020126 0ustar00from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst
import os, sys

class bdist_wininst(_bdist_wininst):
    _good_upload = _bad_upload = None

    def create_exe(self, arcname, fullname, bitmap=None):
        _bdist_wininst.create_exe(self, arcname, fullname, bitmap)
        installer_name = self.get_installer_filename(fullname) 
        if self.target_version:
            pyversion = self.target_version
            # fix 2.5+ bdist_wininst ignoring --target-version spec
            self._bad_upload = ('bdist_wininst', 'any', installer_name)
        else:
            pyversion = 'any'
        self._good_upload = ('bdist_wininst', pyversion, installer_name)
        
    def _fix_upload_names(self):
        good, bad = self._good_upload, self._bad_upload
        dist_files = getattr(self.distribution, 'dist_files', [])
        if bad in dist_files:
            dist_files.remove(bad)
        if good not in dist_files:
            dist_files.append(good)

    def reinitialize_command (self, command, reinit_subcommands=0):
        cmd = self.distribution.reinitialize_command(
            command, reinit_subcommands)
        if command in ('install', 'install_lib'):
            cmd.install_lib = None  # work around distutils bug
        return cmd

    def run(self):
        self._is_running = True
        try:
            _bdist_wininst.run(self)
            self._fix_upload_names()
        finally:
            self._is_running = False


    if not hasattr(_bdist_wininst, 'get_installer_filename'):
        def get_installer_filename(self, fullname):
            # Factored out to allow overriding in subclasses
            if self.target_version:
                # if we create an installer for a specific python version,
                # it's better to include this in the name
                installer_name = os.path.join(self.dist_dir,
                                              "%s.win32-py%s.exe" %
                                               (fullname, self.target_version))
            else:
                installer_name = os.path.join(self.dist_dir,
                                              "%s.win32.exe" % fullname)
            return installer_name
    # get_installer_filename()
    


























python3.4/site-packages/setuptools/command/setopt.py000064400000011714151735050020016563 0ustar00import distutils, os
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import *

__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']


def config_file(kind="local"):
    """Get the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    """
    if kind=='local':
        return 'setup.cfg'
    if kind=='global':
        return os.path.join(
            os.path.dirname(distutils.__file__),'distutils.cfg'
        )
    if kind=='user':
        dot = os.name=='posix' and '.' or ''
        return os.path.expanduser(convert_path("~/%spydistutils.cfg" % dot))
    raise ValueError(
        "config_file() type must be 'local', 'global', or 'user'", kind
    )















def edit_config(filename, settings, dry_run=False):
    """Edit a configuration file to include `settings`

    `settings` is a dictionary of dictionaries or ``None`` values, keyed by
    command/section name.  A ``None`` value means to delete the entire section,
    while a dictionary lists settings to be changed or deleted in that section.
    A setting of ``None`` means to delete that setting.
    """
    from setuptools.compat import ConfigParser
    log.debug("Reading configuration from %s", filename)
    opts = ConfigParser.RawConfigParser()
    opts.read([filename])
    for section, options in settings.items():
        if options is None:
            log.info("Deleting section [%s] from %s", section, filename)
            opts.remove_section(section)
        else:
            if not opts.has_section(section):
                log.debug("Adding new section [%s] to %s", section, filename)
                opts.add_section(section)
            for option,value in options.items():
                if value is None:
                    log.debug("Deleting %s.%s from %s",
                        section, option, filename
                    )
                    opts.remove_option(section,option)
                    if not opts.options(section):
                        log.info("Deleting empty [%s] section from %s",
                                  section, filename)
                        opts.remove_section(section)
                else:
                    log.debug(
                        "Setting %s.%s to %r in %s",
                        section, option, value, filename
                    )
                    opts.set(section,option,value)

    log.info("Writing %s", filename)
    if not dry_run:
        f = open(filename,'w'); opts.write(f); f.close()

class option_base(Command):
    """Abstract base class for commands that mess with config files"""
    
    user_options = [
        ('global-config', 'g',
                 "save options to the site-wide distutils.cfg file"),
        ('user-config', 'u',
                 "save options to the current user's pydistutils.cfg file"),
        ('filename=', 'f',
                 "configuration file to use (default=setup.cfg)"),
    ]

    boolean_options = [
        'global-config', 'user-config',
    ]    

    def initialize_options(self):
        self.global_config = None
        self.user_config   = None
        self.filename = None

    def finalize_options(self):
        filenames = []
        if self.global_config:
            filenames.append(config_file('global'))
        if self.user_config:
            filenames.append(config_file('user'))
        if self.filename is not None:
            filenames.append(self.filename)
        if not filenames:
            filenames.append(config_file('local'))
        if len(filenames)>1:
            raise DistutilsOptionError(
                "Must specify only one configuration file option",
                filenames
            )
        self.filename, = filenames    




class setopt(option_base):
    """Save command-line options to a file"""

    description = "set an option in setup.cfg or another config file"

    user_options = [
        ('command=', 'c', 'command to set an option for'),
        ('option=',  'o',  'option to set'),
        ('set-value=',   's', 'value of the option'),
        ('remove',   'r', 'remove (unset) the value'), 
    ] + option_base.user_options

    boolean_options = option_base.boolean_options + ['remove']

    def initialize_options(self):
        option_base.initialize_options(self)
        self.command = None
        self.option = None
        self.set_value = None
        self.remove = None

    def finalize_options(self):
        option_base.finalize_options(self)
        if self.command is None or self.option is None:
            raise DistutilsOptionError("Must specify --command *and* --option")
        if self.set_value is None and not self.remove:
            raise DistutilsOptionError("Must specify --set-value or --remove")

    def run(self):
        edit_config(
            self.filename, {
                self.command: {self.option.replace('-','_'):self.set_value}
            },
            self.dry_run
        )






python3.4/site-packages/setuptools/command/egg_info.py000064400000033760151735050020017027 0ustar00"""setuptools.command.egg_info

Create a distribution's .egg-info directory and contents"""

import os
import re
import sys

from setuptools import Command
import distutils.errors
from distutils import log
from setuptools.command.sdist import sdist
from setuptools.compat import basestring
from setuptools import svn_utils
from distutils.util import convert_path
from distutils.filelist import FileList as _FileList
from pkg_resources import (parse_requirements, safe_name, parse_version,
    safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
from setuptools.command.sdist import walk_revctrl


class egg_info(Command):
    description = "create a distribution's .egg-info directory"

    user_options = [
        ('egg-base=', 'e', "directory containing .egg-info directories"
                           " (default: top of the source tree)"),
        ('tag-svn-revision', 'r',
            "Add subversion revision ID to version number"),
        ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"),
        ('tag-build=', 'b', "Specify explicit tag to add to version number"),
        ('no-svn-revision', 'R',
            "Don't add subversion revision ID [default]"),
        ('no-date', 'D', "Don't include date stamp [default]"),
    ]

    boolean_options = ['tag-date', 'tag-svn-revision']
    negative_opt = {'no-svn-revision': 'tag-svn-revision',
                    'no-date': 'tag-date'}

    def initialize_options(self):
        self.egg_name = None
        self.egg_version = None
        self.egg_base = None
        self.egg_info = None
        self.tag_build = None
        self.tag_svn_revision = 0
        self.tag_date = 0
        self.broken_egg_info = False
        self.vtags = None

    def save_version_info(self, filename):
        from setuptools.command.setopt import edit_config
        values = dict(
            egg_info=dict(
                tag_svn_revision=0,
                tag_date=0,
                tag_build=self.tags(),
            )
        )
        edit_config(filename, values)

    def finalize_options(self):
        self.egg_name = safe_name(self.distribution.get_name())
        self.vtags = self.tags()
        self.egg_version = self.tagged_version()

        try:
            list(
                parse_requirements('%s==%s' % (self.egg_name,self.egg_version))
            )
        except ValueError:
            raise distutils.errors.DistutilsOptionError(
                "Invalid distribution name or version syntax: %s-%s" %
                (self.egg_name,self.egg_version)
            )

        if self.egg_base is None:
            dirs = self.distribution.package_dir
            self.egg_base = (dirs or {}).get('',os.curdir)

        self.ensure_dirname('egg_base')
        self.egg_info = to_filename(self.egg_name)+'.egg-info'
        if self.egg_base != os.curdir:
            self.egg_info = os.path.join(self.egg_base, self.egg_info)
        if '-' in self.egg_name: self.check_broken_egg_info()

        # Set package version for the benefit of dumber commands
        # (e.g. sdist, bdist_wininst, etc.)
        #
        self.distribution.metadata.version = self.egg_version

        # If we bootstrapped around the lack of a PKG-INFO, as might be the
        # case in a fresh checkout, make sure that any special tags get added
        # to the version info
        #
        pd = self.distribution._patched_dist
        if pd is not None and pd.key==self.egg_name.lower():
            pd._version = self.egg_version
            pd._parsed_version = parse_version(self.egg_version)
            self.distribution._patched_dist = None

    def write_or_delete_file(self, what, filename, data, force=False):
        """Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        """
        if data:
            self.write_file(what, filename, data)
        elif os.path.exists(filename):
            if data is None and not force:
                log.warn(
                    "%s not set in setup(), but %s exists", what, filename
                )
                return
            else:
                self.delete_file(filename)

    def write_file(self, what, filename, data):
        """Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        """
        log.info("writing %s to %s", what, filename)
        if sys.version_info >= (3,):
            data = data.encode("utf-8")
        if not self.dry_run:
            f = open(filename, 'wb')
            f.write(data)
            f.close()

    def delete_file(self, filename):
        """Delete `filename` (if not a dry run) after announcing it"""
        log.info("deleting %s", filename)
        if not self.dry_run:
            os.unlink(filename)

    def tagged_version(self):
        version = self.distribution.get_version()
        # egg_info may be called more than once for a distribution,
        # in which case the version string already contains all tags.
        if self.vtags and version.endswith(self.vtags):
            return safe_version(version)
        return safe_version(version + self.vtags)

    def run(self):
        self.mkpath(self.egg_info)
        installer = self.distribution.fetch_build_egg
        for ep in iter_entry_points('egg_info.writers'):
            writer = ep.load(installer=installer)
            writer(self, ep.name, os.path.join(self.egg_info,ep.name))

        # Get rid of native_libs.txt if it was put there by older bdist_egg
        nl = os.path.join(self.egg_info, "native_libs.txt")
        if os.path.exists(nl):
            self.delete_file(nl)

        self.find_sources()

    def tags(self):
        version = ''
        if self.tag_build:
            version+=self.tag_build
        if self.tag_svn_revision and (
            os.path.exists('.svn') or os.path.exists('PKG-INFO')
        ):  version += '-r%s' % self.get_svn_revision()
        if self.tag_date:
            import time
            version += time.strftime("-%Y%m%d")
        return version

    @staticmethod
    def get_svn_revision():
        return str(svn_utils.SvnInfo.load(os.curdir).get_revision())

    def find_sources(self):
        """Generate SOURCES.txt manifest file"""
        manifest_filename = os.path.join(self.egg_info,"SOURCES.txt")
        mm = manifest_maker(self.distribution)
        mm.manifest = manifest_filename
        mm.run()
        self.filelist = mm.filelist

    def check_broken_egg_info(self):
        bei = self.egg_name+'.egg-info'
        if self.egg_base != os.curdir:
            bei = os.path.join(self.egg_base, bei)
        if os.path.exists(bei):
            log.warn(
                "-"*78+'\n'
                "Note: Your current .egg-info directory has a '-' in its name;"
                '\nthis will not work correctly with "setup.py develop".\n\n'
                'Please rename %s to %s to correct this problem.\n'+'-'*78,
                bei, self.egg_info
            )
            self.broken_egg_info = self.egg_info
            self.egg_info = bei     # make it work for now

class FileList(_FileList):
    """File list that accepts only existing, platform-independent paths"""

    def append(self, item):
        if item.endswith('\r'):     # Fix older sdists built on Windows
            item = item[:-1]
        path = convert_path(item)

        if sys.version_info >= (3,):
            try:
                if os.path.exists(path) or os.path.exists(path.encode('utf-8')):
                    self.files.append(path)
            except UnicodeEncodeError:
                # Accept UTF-8 filenames even if LANG=C
                if os.path.exists(path.encode('utf-8')):
                    self.files.append(path)
                else:
                    log.warn("'%s' not %s encodable -- skipping", path,
                        sys.getfilesystemencoding())
        else:
            if os.path.exists(path):
                self.files.append(path)


class manifest_maker(sdist):

    template = "MANIFEST.in"

    def initialize_options(self):
        self.use_defaults = 1
        self.prune = 1
        self.manifest_only = 1
        self.force_manifest = 1

    def finalize_options(self):
        pass

    def run(self):
        self.filelist = FileList()
        if not os.path.exists(self.manifest):
            self.write_manifest()   # it must exist so it'll get in the list
        self.filelist.findall()
        self.add_defaults()
        if os.path.exists(self.template):
            self.read_template()
        self.prune_file_list()
        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest()

    def write_manifest(self):
        """Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        """
        # The manifest must be UTF-8 encodable. See #303.
        if sys.version_info >= (3,):
            files = []
            for file in self.filelist.files:
                try:
                    file.encode("utf-8")
                except UnicodeEncodeError:
                    log.warn("'%s' not UTF-8 encodable -- skipping" % file)
                else:
                    files.append(file)
            self.filelist.files = files

        files = self.filelist.files
        if os.sep!='/':
            files = [f.replace(os.sep,'/') for f in files]
        self.execute(write_file, (self.manifest, files),
                     "writing manifest file '%s'" % self.manifest)

    def warn(self, msg):    # suppress missing-file warnings from sdist
        if not msg.startswith("standard file not found:"):
            sdist.warn(self, msg)

    def add_defaults(self):
        sdist.add_defaults(self)
        self.filelist.append(self.template)
        self.filelist.append(self.manifest)
        rcfiles = list(walk_revctrl())
        if rcfiles:
            self.filelist.extend(rcfiles)
        elif os.path.exists(self.manifest):
            self.read_manifest()
        ei_cmd = self.get_finalized_command('egg_info')
        self.filelist.include_pattern("*", prefix=ei_cmd.egg_info)

    def prune_file_list(self):
        build = self.get_finalized_command('build')
        base_dir = self.distribution.get_fullname()
        self.filelist.exclude_pattern(None, prefix=build.build_base)
        self.filelist.exclude_pattern(None, prefix=base_dir)
        sep = re.escape(os.sep)
        self.filelist.exclude_pattern(sep+r'(RCS|CVS|\.svn)'+sep, is_regex=1)


def write_file(filename, contents):
    """Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    """
    contents = "\n".join(contents)
    if sys.version_info >= (3,):
        contents = contents.encode("utf-8")
    f = open(filename, "wb")        # always write POSIX-style manifest
    f.write(contents)
    f.close()

def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name
        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution,'zip_safe',None)
        from setuptools.command import bdist_egg
        bdist_egg.write_safety_flag(cmd.egg_info, safe)

def warn_depends_obsolete(cmd, basename, filename):
    if os.path.exists(filename):
        log.warn(
            "WARNING: 'depends.txt' is not used by setuptools 0.6!\n"
            "Use the install_requires/extras_require setup() args instead."
        )


def write_requirements(cmd, basename, filename):
    dist = cmd.distribution
    data = ['\n'.join(yield_lines(dist.install_requires or ()))]
    for extra,reqs in (dist.extras_require or {}).items():
        data.append('\n\n[%s]\n%s' % (extra, '\n'.join(yield_lines(reqs))))
    cmd.write_or_delete_file("requirements", filename, ''.join(data))

def write_toplevel_names(cmd, basename, filename):
    pkgs = dict.fromkeys(
        [
            k.split('.',1)[0]
            for k in cmd.distribution.iter_distribution_names()
        ]
    )
    cmd.write_file("top-level names", filename, '\n'.join(pkgs)+'\n')


def overwrite_arg(cmd, basename, filename):
    write_arg(cmd, basename, filename, True)

def write_arg(cmd, basename, filename, force=False):
    argname = os.path.splitext(basename)[0]
    value = getattr(cmd.distribution, argname, None)
    if value is not None:
        value = '\n'.join(value)+'\n'
    cmd.write_or_delete_file(argname, filename, value, force)

def write_entries(cmd, basename, filename):
    ep = cmd.distribution.entry_points

    if isinstance(ep,basestring) or ep is None:
        data = ep
    elif ep is not None:
        data = []
        for section, contents in ep.items():
            if not isinstance(contents,basestring):
                contents = EntryPoint.parse_group(section, contents)
                contents = '\n'.join(map(str,contents.values()))
            data.append('[%s]\n%s\n\n' % (section,contents))
        data = ''.join(data)

    cmd.write_or_delete_file('entry points', filename, data, True)

def get_pkg_info_revision():
    # See if we can get a -r### off of PKG-INFO, in case this is an sdist of
    # a subversion revision
    #
    if os.path.exists('PKG-INFO'):
        f = open('PKG-INFO','rU')
        for line in f:
            match = re.match(r"Version:.*-r(\d+)\s*$", line)
            if match:
                return int(match.group(1))
        f.close()
    return 0
python3.4/site-packages/setuptools/command/install.py000064400000007741151735050020016720 0ustar00import setuptools, sys, glob
from distutils.command.install import install as _install
from distutils.errors import DistutilsArgError

class install(_install):
    """Use easy_install to install the package, w/dependencies"""

    user_options = _install.user_options + [
        ('old-and-unmanageable', None, "Try not to use this!"),
        ('single-version-externally-managed', None,
            "used by system package builders to create 'flat' eggs"),
    ]
    boolean_options = _install.boolean_options + [
        'old-and-unmanageable', 'single-version-externally-managed',
    ]
    new_commands = [
        ('install_egg_info', lambda self: True),
        ('install_scripts',  lambda self: True),
    ]
    _nc = dict(new_commands)

    def initialize_options(self):
        _install.initialize_options(self)
        self.old_and_unmanageable = None
        self.single_version_externally_managed = None
        self.no_compile = None  # make DISTUTILS_DEBUG work right!

    def finalize_options(self):
        _install.finalize_options(self)
        if self.root:
            self.single_version_externally_managed = True
        elif self.single_version_externally_managed:
            if not self.root and not self.record:
                raise DistutilsArgError(
                    "You must specify --record or --root when building system"
                    " packages"
                )

    def handle_extra_path(self):
        if self.root or self.single_version_externally_managed:
            # explicit backward-compatibility mode, allow extra_path to work
            return _install.handle_extra_path(self)

        # Ignore extra_path when installing an egg (or being run by another
        # command without --root or --single-version-externally-managed
        self.path_file = None
        self.extra_dirs = ''


    def run(self):
        # Explicit request for old-style install?  Just do it
        if self.old_and_unmanageable or self.single_version_externally_managed:
            return _install.run(self)

        # Attempt to detect whether we were called from setup() or by another
        # command.  If we were called by setup(), our caller will be the
        # 'run_command' method in 'distutils.dist', and *its* caller will be
        # the 'run_commands' method.  If we were called any other way, our
        # immediate caller *might* be 'run_command', but it won't have been
        # called by 'run_commands'.  This is slightly kludgy, but seems to
        # work.
        #
        caller = sys._getframe(2)
        caller_module = caller.f_globals.get('__name__','')
        caller_name = caller.f_code.co_name

        if caller_module != 'distutils.dist' or caller_name!='run_commands':
            # We weren't called from the command line or setup(), so we
            # should run in backward-compatibility mode to support bdist_*
            # commands.
            _install.run(self)
        else:
            self.do_egg_install()






    def do_egg_install(self):

        easy_install = self.distribution.get_command_class('easy_install')

        cmd = easy_install(
            self.distribution, args="x", root=self.root, record=self.record,
        )
        cmd.ensure_finalized()  # finalize before bdist_egg munges install cmd
        cmd.always_copy_from = '.'  # make sure local-dir eggs get installed

        # pick up setup-dir .egg files only: no .egg-info
        cmd.package_index.scan(glob.glob('*.egg'))

        self.run_command('bdist_egg')
        args = [self.distribution.get_command_obj('bdist_egg').egg_output]

        if setuptools.bootstrap_install_from:
            # Bootstrap self-installation of setuptools
            args.insert(0, setuptools.bootstrap_install_from)

        cmd.args = args
        cmd.run()
        setuptools.bootstrap_install_from = None

# XXX Python 3.1 doesn't see _nc if this is inside the class
install.sub_commands = [
        cmd for cmd in _install.sub_commands if cmd[0] not in install._nc
    ] + install.new_commands
















#
python3.4/site-packages/setuptools/__pycache__/py31compat.cpython-34.pyc000064400000001074151735050020022107 0ustar00�
M�Re��@saddgZyddlmZmZWn4ek
r\ddlmZmZdd�ZYnXdS)�get_config_vars�get_path�)rr)r�get_python_libcCs+|dkrtd��nt|dk�S)N�platlib�purelibzName must be purelib or platlib)zplatlibzpurelib)�
ValueErrorr)�name�r	�0/tmp/pip-l4uy7dan-build/setuptools/py31compat.pyrsN)�__all__�	sysconfigrr�ImportError�distutils.sysconfigrr	r	r	r
�<module>s

python3.4/site-packages/setuptools/__pycache__/sandbox.cpython-34.pyc000064400000026465151735050020021560 0ustar00�
M�Re
'�@s�ddlZddlZddlZddlZddlZddlZddlZddlZejdkr�ddl	j
jjj
ZnejejZy
eZWnek
r�dZYnXeZddlmZddlmZddlmZmZdddd	gZd
d	�ZGdd�d�Zeed�rJejgZngZy'dd
l m!Z!ej"e!��[!Wne#k
r�YnXGdd�de�Z$ej%ej&dd�dj'�D��Z(Gdd�de�Z)dS)�N�java)�DistutilsError)�working_set)�builtins�execfile�AbstractSandbox�DirectorySandbox�SandboxViolation�	run_setupcstj�}tjdd�}tjdd�}tjjtjj���}tjj|d�}tjj|�s�tj	|�nt
j}tjj
��tj�}z�|t
_tj|�yv�gt|�tjdd�<tjjd|�tj�tjjdd��t|�j�fdd��Wn>tk
rztj�d}	|	jrv|	jdrv�nYnXWdtj|�tjj���fdd	�tjD�}
tttjj|
��tj|�|tjdd�<|tjdd�<|t
_XdS)
z8Run a distutils setup script, sandboxed in its directoryN�temprcSs
|j�S)N)�activate)�dist�r�-/tmp/pip-l4uy7dan-build/setuptools/sandbox.py�<lambda>0szrun_setup.<locals>.<lambda>cstdi�d6dd6�S)Nzsetup.py�__file__�__main__�__name__)rr)�setup_scriptrrr2s�cs2g|](}|�kr|jd�r|�qS)z
encodings.)�
startswith)�.0Zmod_name)�save_modulesrr�
<listcomp>As	zrun_setup.<locals>.<listcomp>) �os�getcwd�sys�argv�path�abspath�dirname�join�isdir�makedirs�tempfile�tempdir�modules�copy�
pkg_resources�__getstate__�chdir�list�insertr�__init__�	callbacks�appendr�run�
SystemExit�exc_info�args�__setstate__�update�map�__delitem__)rr3Zold_dir�	save_argvZ	save_pathZ	setup_dir�temp_dirZsave_tmpZpr_state�vZdel_modulesr)rrrr
s@		
 



c@s�eZdZdZdZdd�Zdd�Zdd�Zd	d
�Zx<ddd
gD]+Z	e
ee	�rXee	�e�e	<qXqXWddd�Z
er�e
de�Zne
de�Zxlddddddddddddddd d!d"d#d$gD]+Z	e
ee	�r�e
e	�e�e	<q�q�Wd%d&�Zx9d'd(gD]+Z	e
ee	�rEee	�e�e	<qEqEWd)d*�Zx9d+d,gD]+Z	e
ee	�r�ee	�e�e	<q�q�Wd-d.�Zd/d0�Zd1d2�Zd3d4�ZdS)5rzDWrap 'os' module and 'open()' builtin for virtualizing setup scriptsFcs&�fdd�tt�D��_dS)Ncs5g|]+}|jd�rt�|�r|�qS)�_)r�hasattr)r�name)�selfrrrTs	z,AbstractSandbox.__init__.<locals>.<listcomp>)�dir�_os�_attrs)r>r)r>rr-RszAbstractSandbox.__init__cCs1x*|jD]}tt|t||��q
WdS)N)rA�setattrr�getattr)r>�sourcer=rrr�_copyXszAbstractSandbox._copycCs{zB|j|�tr%|jt_n|jt_d|_|�SWdd|_tr`tt_ntt_|jt�XdS)zRun 'func' under os sandboxingTNF)rE�_filer�file�_open�open�_activer@)r>�funcrrrr0\s
			zAbstractSandbox.runcs(tt�����fdd�}|S)Ncs@|jr-|j�||||�\}}n�||||�S)N)rJ�_remap_pair)r>�src�dstr3�kw)r=�originalrr�wrapns	$z3AbstractSandbox._mk_dual_path_wrapper.<locals>.wrap)rCr@)r=rQr)r=rPr�_mk_dual_path_wrapperlsz%AbstractSandbox._mk_dual_path_wrapper�rename�link�symlinkNcs.�ptt�����fdd�}|S)Ncs4|jr$|j�|||�}n�|||�S)N)rJ�_remap_input)r>rr3rO)r=rPrrrQys	z5AbstractSandbox._mk_single_path_wrapper.<locals>.wrap)rCr@)r=rPrQr)r=rPr�_mk_single_path_wrapperwsz'AbstractSandbox._mk_single_path_wrapperrGrI�stat�listdirr*�chmod�chown�mkdir�remove�unlink�rmdir�utime�lchown�chroot�lstatZ	startfile�mkfifo�mknod�pathconf�accesscs(tt�����fdd�}|S)NcsM|jr=|j�|||�}|j��|||��S�|||�S)N)rJrV�
_remap_output)r>rr3rO)r=rPrrrQ�s	z4AbstractSandbox._mk_single_with_return.<locals>.wrap)rCr@)r=rQr)r=rPr�_mk_single_with_return�sz&AbstractSandbox._mk_single_with_return�readlink�tempnamcs(tt�����fdd�}|S)Ncs,�||�}|jr(|j�|�S|S)N)rJrh)r>r3rO�retval)r=rPrrrQ�s	z'AbstractSandbox._mk_query.<locals>.wrap)rCr@)r=rQr)r=rPr�	_mk_query�szAbstractSandbox._mk_queryr�tmpnamcCs|S)z=Called to remap or validate any path, whether input or outputr)r>rrrr�_validate_path�szAbstractSandbox._validate_pathcOs
|j|�S)zCalled for path inputs)ro)r>�	operationrr3rOrrrrV�szAbstractSandbox._remap_inputcCs
|j|�S)zCalled for path outputs)ro)r>rprrrrrh�szAbstractSandbox._remap_outputcOs6|j|d|||�|j|d|||�fS)z?Called for path pairs like rename, link, and symlink operationsz-fromz-to)rV)r>rprMrNr3rOrrrrL�szAbstractSandbox._remap_pair)r�
__module__�__qualname__�__doc__rJr-rEr0rRr=r<r@�localsrWrFrHrirmrorVrhrLrrrrrMs>		�devnull)�GetGeneratePathc@s�eZdZdZejdddddddd	d
ddd
dg
�ZdgZedd�Z	dd�Z
er�ddd�Znddd�Zdd�Z
dd�Zdd�Zdd �Zd!d"�Zd#d$d%�Zd&S)'rz<Restrict operations to a single subdirectory - pseudo-chrootrIrZr[r\r]r^r_r`rarbrdrerkz.*lib2to3.*\.pickle$cCsctjjtjj|��|_tjj|jd�|_dd�|D�|_tj	|�dS)N�cSs.g|]$}tjjtjj|���qSr)rr�normcase�realpath)rrrrrr�s	z-DirectorySandbox.__init__.<locals>.<listcomp>)
rrrxry�_sandboxr!�_prefix�_exceptionsrr-)r>Zsandbox�
exceptionsrrrr-�s
!	
zDirectorySandbox.__init__cOst|||��dS)N)r	)r>rpr3rOrrr�
_violation�szDirectorySandbox._violation�rcOsK|dkr8|j|�r8|jd||||�nt||||�S)Nr�rt�rb�rU�UrG)rzrtzrbzrUr�)�_okr~rF)r>r�moder3rOrrrrF�szDirectorySandbox._filecOsK|dkr8|j|�r8|jd||||�nt||||�S)Nrr�r�r�r�rI)rzrtzrbzrUr�)r�r~rH)r>rr�r3rOrrrrH�szDirectorySandbox._opencCs|jd�dS)Nrn)r~)r>rrrrn�szDirectorySandbox.tmpnamcCss|j}zYd|_tjjtjj|��}|j|�p`||jkp`|j|j�SWd||_XdS)NF)	rJrrrxry�	_exemptedrzrr{)r>rZactiveryrrrr��s		zDirectorySandbox._okcsT�fdd�|jD�}�fdd�|jD�}tj||�}t|�S)Nc3s|]}�j|�VqdS)N)r)r�	exception)�filepathrr�	<genexpr>�sz-DirectorySandbox._exempted.<locals>.<genexpr>c3s!|]}tj|��VqdS)N)�re�match)r�pattern)r�rrr��s)r|�_exception_patterns�	itertools�chain�any)r>r�Z
start_matchesZpattern_matchesZ
candidatesr)r�rr��s

zDirectorySandbox._exemptedcOsH||jkrD|j|�rD|j|tjj|�||�n|S)zCalled for path inputs)�	write_opsr�r~rrry)r>rprr3rOrrrrVs%zDirectorySandbox._remap_inputcOsF|j|�s |j|�r<|j|||||�n||fS)z?Called for path pairs like rename, link, and symlink operations)r�r~)r>rprMrNr3rOrrrrL	s zDirectorySandbox._remap_pairi�cOsR|t@r9|j|�r9|jd|||||�ntj|||||�S)zCalled for low-level os.open()zos.open)�WRITE_FLAGSr�r~r@rI)r>rG�flagsr�r3rOrrrrIszDirectorySandbox.openN)rrqrrrs�dict�fromkeysr�r��_EXCEPTIONSr-r~rFrHrnr�r�rVrLrIrrrrr�s 		
cCs"g|]}tt|d��qS)r)rCr@)r�arrrrs	rz4O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARYc@s"eZdZdZdd�ZdS)r	zEA setup script attempted to modify the filesystem outside the sandboxcCsd|jS)Na�SandboxViolation: %s%r %s

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.)r3)r>rrr�__str__s	zSandboxViolation.__str__N)rrqrrrsr�rrrrr	s)*rrr$�operator�	functoolsr�r�r(r=Z$org.python.modules.posix.PosixModule�pythonr&�posixZPosixModuler@rGrF�	NameErrorrIrH�distutils.errorsrrZsetuptools.compatrr�__all__r
rr<rur�Zwin32com.client.gencachervr/�ImportErrorr�reduce�or_�splitr�r	rrrr�<module>sF

0h
Spython3.4/site-packages/setuptools/__pycache__/lib2to3_ex.cpython-34.pyc000064400000004774151735050020022073 0ustar00�
M�Re��@sxdZddlmZddlmZddlmZmZddl	Z	Gdd�de�Z
Gdd	�d	e�ZdS)
zy
Customized Mixin2to3 support:

 - adds support for converting doctests


This module raises an ImportError on Python 2.
�)�	Mixin2to3)�log)�RefactoringTool�get_fixers_from_packageNc@s4eZdZdd�Zdd�Zdd�ZdS)�DistutilsRefactoringToolcOstj||�dS)N)r�error)�self�msg�args�kw�r�0/tmp/pip-l4uy7dan-build/setuptools/lib2to3_ex.py�	log_errorsz"DistutilsRefactoringTool.log_errorcGstj||�dS)N)r�info)rr	r
rrr
�log_messagesz$DistutilsRefactoringTool.log_messagecGstj||�dS)N)r�debug)rr	r
rrr
�	log_debugsz"DistutilsRefactoringTool.log_debugN)�__name__�
__module__�__qualname__rrrrrrr
rsrc@s7eZdZddd�Zdd�Zdd�ZdS)	rFcCs�|jjdk	rdS|s dStjddj|��|j�|j�|r�tjr�t	|j
�}|j|dddd�q�ntj
||�dS)NTzFixing � �writeZ
doctests_only)�distributionZuse_2to3rr�join�_Mixin2to3__build_fixer_names�_Mixin2to3__exclude_fixers�
setuptoolsZrun_2to3_on_doctestsr�fixer_names�refactor�
_Mixin2to3�run_2to3)r�filesZdoctests�rrrr
r s

	zMixin2to3.run_2to3cCs�|jr
dSg|_x'tjD]}|jjt|��q W|jjdk	r�x-|jjD]}|jjt|��q_WndS)N)rrZlib2to3_fixer_packages�extendrrZuse_2to3_fixers)r�prrr
Z__build_fixer_names+s		zMixin2to3.__build_fixer_namescCsqt|dg�}|jjdk	r:|j|jj�nx0|D](}||jkrA|jj|�qAqAWdS)NZexclude_fixers)�getattrrZuse_2to3_exclude_fixersr#r�remove)rZexcluded_fixersZ
fixer_namerrr
Z__exclude_fixers4s
zMixin2to3.__exclude_fixersN)rrrr rrrrrr
rs	r)�__doc__�distutils.utilrr�	distutilsr�lib2to3.refactorrrrrrrrr
�<module>s
python3.4/site-packages/setuptools/__pycache__/dist.cpython-34.pyc000064400000073665151735050020021071 0ustar00�
M�Re$�@s�dgZddlZddlZddlZddlZddlZddlZddlZddlm	Z
ddlmZm
Z
mZddlmZddlmZmZddlZdd�Zee
�Z
eefZd	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�Z dd�Z!dd�Z"Gdd�de
�Z	x)ej#ej$ej%fD]Z&e	e&_	q�WGdd�d�Z'dS) �Distribution�N)r)�DistutilsOptionError�DistutilsPlatformError�DistutilsSetupError)�Require)�
numeric_types�
basestringcCsNx"|jjd�r$|j\}qW|jjd�sJtd|��n|S)z�Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
    �
setuptools�	distutilsz(distutils has already been patched by %r)�
__module__�
startswith�	__bases__�AssertionError)�cls�r�*/tmp/pip-l4uy7dan-build/setuptools/dist.py�_get_unpatchedsrcCsey*tjjd|�}|js)t�Wn4ttttfk
r`td||f��YnXdS)Nzx=z4%r must be importable 'module:attrs' string (got %r))	�
pkg_resources�
EntryPoint�parse�extrasr�	TypeError�
ValueError�AttributeErrorr)�dist�attr�value�eprrr�check_importable$srcCsZydj|�|kst�Wn4ttttfk
rUtd||f��YnXdS)z*Verify that value is a string list or None�z%%r must be a list of strings (got %r)N)�joinrrrrr)rrrrrr�assert_string_list/s
r!cCs�t|||�x�|D]�}|j|�sCtdd|��nd|krdj|jd�dd��}||kr�tjjd||�q�qqWdS)z(Verify that namespace packages are validz1Distribution contains no modules or packages for znamespace package %r�.N�z^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.py���)r!�has_contents_forrr �splitr
�log�warn)rrr�nsp�parentrrr�	check_nsp7s
"	r+c
Cs�y}xv|j�D]h\}}d|kre|jdd�\}}tj|�retd|��qenttj|��qWWn'ttt	fk
r�td��YnXdS)z+Verify that extras_require mapping is valid�:r#zInvalid environment marker: z�'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.N)
�itemsr&r�invalid_markerr�list�parse_requirementsrrr)rrr�k�v�mrrr�check_extrasHsr4cCs/t|�|kr+td||f��ndS)z)Verify that value is True, False, 0, or 1z#%r must be a boolean value (got %r)N)�boolr)rrrrrr�assert_boolXsr6cCsIyttj|��Wn+ttfk
rDtd|f��YnXdS)z9Verify that install_requires is a valid requirements listz^%r must be a string or list of strings containing valid project/version requirement specifiersN)r/rr0rrr)rrrrrr�check_requirements^sr7cCsIytjj|�Wn.tk
rDtj�d}t|��YnXdS)z)Verify that entry_points map is parseabler#N)rr�	parse_mapr�sys�exc_infor)rrr�errr�check_entry_pointsgs

r<cCs"t|t�std��ndS)Nztest_suite must be a string)�
isinstancerr)rrrrrr�check_test_suiteosr>cCs~t|t�rjxX|j�D]C\}}t|t�s;Pnyt|�Wqtk
r^PYqXqWdSnt|d��dS)z@Verify that value is a dictionary of package names to glob listsNzI must be a dictionary mapping package names to lists of wildcard patterns)r=�dictr-�str�iterrr)rrrr1r2rrr�check_package_datass

rBcCs=x6|D].}tjd|�stjjd|�qqWdS)Nz\w+(\.\w+)*zZWARNING: %r not a valid package name; please use only.-separated package names in setup.py)�re�matchr
r'r()rrr�pkgnamerrr�check_packages�s

	rFc@sKeZdZdZdZdd�Zddd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�ZdS)5ra�Distribution with support for features, tests, and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'features' **deprecated** -- a dictionary mapping option names to
        'setuptools.Feature'
        objects.  Features are a portion of the distribution that can be
        included or excluded based on user options, inter-feature dependencies,
        and availability on the current system.  Excluded features are omitted
        from all setup commands, including source and binary distributions, so
        you can create multiple distributions from the same source tree.
        Feature names should be valid Python identifiers, except that they may
        contain the '-' (minus) sign.  Features can be included or excluded
        via the command line options '--with-X' and '--without-X', where 'X' is
        the name of the feature.  Whether a feature is included by default, and
        whether you are allowed to control this from the command line, is
        determined by the Feature object.  See the 'Feature' class for more
        information.

     'test_suite' -- the name of a test suite to run for the 'test' command.
        If the user runs 'python setup.py test', the package will be installed,
        and the named test suite will be run.  The format is the same as
        would be used on a 'unittest.py' command line.  That is, it is the
        dotted name of an object to import and call to generate a test suite.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.  They are used by the feature subsystem to configure the
    distribution for the included and excluded features.
    NcCs�|sd|ksd|kr#dStjt|d��j�}tjjj|�}|dk	r�|jd�r�tjt|d��|_	||_
ndS)N�name�versionzPKG-INFO)r�	safe_namer@�lower�working_set�by_key�get�has_metadata�safe_version�_version�
_patched_dist)�self�attrs�keyrrrr�patch_missing_pkg_info�sz#Distribution.patch_missing_pkg_infocCs}t|d�}|s!i|_n|p*i}d|ksEd|krRtj�ng|_i|_g|_|o�|jdd�|_|j	|�|dk	r�|jdg�|_
t|d|j
�n|r�d|kr�|j|jd��nx?t
jd�D].}t||j�st||jd�qqWtj||�t|jjt�ryt|jj�|j_ndS)N�package_data�features�require_features�src_root�dependency_linksZsetup_requireszdistutils.setup_keywords)�hasattrrV�Feature�warn_deprecatedrXrW�
dist_files�poprYrUrZr!�fetch_build_eggsr�iter_entry_pointsrG�setattr�
_Distribution�__init__r=�metadatarHrr@)rRrSZhave_package_dataZ_attrs_dictrrrrrd�s,
			
zDistribution.__init__cCs)tj|�}|jr%|j�n|S)z3Process features after parsing command line options)rc�parse_command_linerW�_finalize_features)rR�resultrrrrf�s	
zDistribution.parse_command_linecCsd|jdd�S)z;Convert feature name to corresponding option attribute nameZwith_�-�_)�replace)rRrGrrr�_feature_attrname�szDistribution._feature_attrnamecCsPddlm}m}x3|j||�d|j�D]}|j|�q5WdS)zResolve pre-setup requirementsr)rKr0�	installerN)rrKr0�resolve�fetch_build_egg�add)rR�requiresrKr0rrrrr`s	zDistribution.fetch_build_eggscCs�tj|�|jr#|j�nxgtjd�D]V}t||jd�}|dk	r3|jd|j	�|j
�||j|�q3q3Wt|dd�r�dd�|jD�|_n	g|_dS)Nzdistutils.setup_keywordsrm�convert_2to3_doctestscSs"g|]}tjj|��qSr)�os�path�abspath)�.0�prrr�
<listcomp>s	z1Distribution.finalize_options.<locals>.<listcomp>)rc�finalize_optionsrW�_set_global_opts_from_featuresrra�getattrrG�requirero�loadrr)rRrrrrrrys
	
 zDistribution.finalize_optionsc	Csgy|j}g|j_Wn>tk
rYddlm}|jidgd6�}|j�|jd�}d}x*|j	�D]}||kr~||=q~q~W|j
r�|j
d
d
�}d|kr�|ddj�|}nd|f|d<n||d
dgdtj
dddddd
dddddddddd�
}|j�||_YnX|j|�S)z Fetch an egg needed for buildingr)�easy_installr~�script_args�
find_links�	site_dirs�	index_url�optimize�allow_hostsNr#�setup�args�x�install_dirZexclude_scriptsTZalways_copyFZbuild_directory�editable�upgradeZ
multi_versionZ	no_report�user)z
find_linksr�z	index_urlzoptimizer�r�)Z_egg_fetcherZ
package_indexZto_scanrZsetuptools.command.easy_installr~�	__class__�parse_config_files�get_option_dict�keysrZr&rs�curdir�ensure_finalized)	rR�req�cmdr~r�optsZkeeprT�linksrrrros2	

	
zDistribution.fetch_build_eggcCsg}|jj�}x�|jj�D]�\}}|j|d�|j|�|jr%|j}d}d}|j�s�||}}n|j	d|dd||f�|j	d|dd||f�d||d|<q%q%W||j
|_
|_||_|_dS)z;Add --with-X/--without-X options based on optional featuresNz
 (default)rzwith-zinclude zwithout-zexclude )
�negative_opt�copyrWr-�_set_feature�validate�optional�description�include_by_default�append�global_optionsZfeature_optionsZfeature_negopt)rRZgo�norG�feature�descrZincdefZexcdefrrrrz;s 
		""z+Distribution._set_global_opts_from_featurescCs�xj|jj�D]Y\}}|j|�}|sI|dkr|j�r|j|�|j|d�qqWxL|jj�D];\}}|j|�s}|j|�|j|d�q}q}WdS)z9Add/remove features and resolve dependencies between themNr#r)rWr-�feature_is_includedr��
include_inr��exclude_from)rRrGr�ZenabledrrrrgSs

zDistribution._finalize_featurescCsv||jkr|j|SxUtjd|�D]1}|jd|j�|j�|j|<}|SWtj||�SdS)z(Pluggable version of get_command_class()zdistutils.commandsrmN)�cmdclassrrar|ror}rc�get_command_class)rR�commandrr�rrrr�dszDistribution.get_command_classcCs[xKtjd�D]:}|j|jkr|jd�}||j|j<qqWtj|�S)Nzdistutils.commandsF)rrarGr�r}rc�print_commands)rRrr�rrrr�ps
zDistribution.print_commandscCst||j|�|�dS)zSet feature's inclusion statusN)rbrl)rRrG�statusrrrr�wszDistribution._set_featurecCst||j|��S)zAReturn 1 if feature is included, 0 if excluded, 'None' if unknown)r{rl)rRrGrrrr�{sz Distribution.feature_is_includedcCs`|j|�dkr8|j|j}t|d��n|j|j|�|j|d�dS)z)Request inclusion of feature named 'name'rz2 is required, but was excluded or is not availabler#N)r�rWr�rr�r�)rRrGr�rrr�include_featureszDistribution.include_featurecKsZxS|j�D]E\}}t|d|d�}|rB||�q
|j||�q
WdS)a�Add items to distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        Z	_include_N)r-r{�
_include_misc)rRrSr1r2�includerrrr��s

zDistribution.includecs��d�|jr8��fdd�|jD�|_n|jrf��fdd�|jD�|_n|jr���fdd�|jD�|_ndS)z9Remove packages, modules, and extensions in named packager"cs2g|](}|�kr|j��r|�qSr)r)rvrw)�package�pfxrrrx�s	z0Distribution.exclude_package.<locals>.<listcomp>cs2g|](}|�kr|j��r|�qSr)r)rvrw)r�r�rrrx�s	cs8g|].}|j�kr|jj��r|�qSr)rGr)rvrw)r�r�rrrx�s	N)�packages�
py_modules�ext_modules)rRr�r)r�r�r�exclude_package�s
	%	%	zDistribution.exclude_packagecCsD|d}x3|j�D]%}||ks8|j|�rdSqWdS)z<Return true if 'exclude_package(package)' would do somethingr"TN)�iter_distribution_namesr)rRr�r�rwrrrr%�s
zDistribution.has_contents_forcs�t�t�s(td|�f��nyt||�}Wn"tk
r_td|��YnX|dk	r�t|t�r�t|d��n,|r�t||�fdd�|D��ndS)zAHandle 'exclude()' for list/tuple attrs without a special handlerz(%s: setting must be a list or tuple (%r)z %s: No such distribution settingNz4: this setting cannot be changed via include/excludecs"g|]}|�kr|�qSrr)rv�item)rrrrx�s	z.Distribution._exclude_misc.<locals>.<listcomp>)r=�sequencerr{rrb)rRrGr�oldr)rr�
_exclude_misc�s
zDistribution._exclude_misccs�t|t�s(td||f��nyt||��Wn"tk
r_td|��YnX�dkrt|||�nIt�t�s�t|d��n't||��fdd�|D��dS)zAHandle 'include()' for list/tuple attrs without a special handlerz%s: setting must be a list (%r)z %s: No such distribution settingNz4: this setting cannot be changed via include/excludecs"g|]}|�kr|�qSrr)rvr�)r�rrrx�s	z.Distribution._include_misc.<locals>.<listcomp>)r=r�rr{rrb)rRrGrr)r�rr��s
zDistribution._include_misccKsZxS|j�D]E\}}t|d|d�}|rB||�q
|j||�q
WdS)aRemove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        Z	_exclude_N)r-r{r�)rRrSr1r2�excluderrrr��s

zDistribution.excludecCs?t|t�s%td|f��ntt|j|��dS)Nz.packages: setting must be a list or tuple (%r))r=r�rr/�mapr�)rRr�rrr�_exclude_packages�szDistribution._exclude_packagesc
Cs�|jj|_|jj|_|d}|jd�}xY||kr�||\}}||=ddl}|j|d�|dd�<|d}q:Wtj|||�}|j|�}	t	|	dd�r�d|f|j|�d<|dk	r�gSn|S)Nr�aliasesTr#Zcommand_consumes_argumentszcommand liner�)
r�r�r�r��shlexr&rc�_parse_command_optsr�r{)
rR�parserr�r�r��src�aliasr��nargs�	cmd_classrrrr�s"
z Distribution._parse_command_optscCs'i}x|jj�D]	\}}x�|j�D]�\}\}}|dkrSq/n|jdd�}|dkr�|j|�}|jj�}|jt|di��xZ|j�D](\}	}
|
|kr�|	}d}Pq�q�Wtd��n|dkrd}n||j	|i�|<q/WqW|S)	ahReturn a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        zcommand linerjrirr�NzShouldn't be able to get herer#)
�command_optionsr-rk�get_command_objr�r��updater{r�
setdefault)rR�dr�r��optr��valZcmdobj�neg_opt�neg�posrrr�get_cmdline_options s(
	z Distribution.get_cmdline_optionsccs�x|jpfD]}|VqWx|jp.fD]}|Vq/Wxe|jpMfD]T}t|t�rr|\}}n	|j}|jd�r�|dd�}n|VqNWdS)z@Yield all packages, modules, and extension names in distribution�moduleN�i����)r�r�r�r=�tuplerG�endswith)rR�pkgr��extrGZ	buildinforrrr�Hs			z$Distribution.iter_distribution_namescCs6ddl}|jdks$|jr4tj||�Sddl}t|j|j�setj||�S|jj	j
�d	kr�tj||�S|jj	}|jj}|jdkr�dp�d}|jj
}|j|jj�d|||�|_ztj||�SWd|j|jj�||||�|_XdS)
z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        rN��utf-8�utf8�win32�
)r�)r�zutf8)r9�version_info�
help_commandsrc�handle_display_options�ior=�stdout�
TextIOWrapper�encodingrJ�errors�platform�line_buffering�detach)rR�option_orderr9r�r�r��newliner�rrrr�Zs$!z#Distribution.handle_display_options)�__name__r�__qualname__�__doc__rQrUrdrfrlr`ryrorzrgr�r�r�r�r�r�r�r%r�r�r�r�r�r�r�r�rrrrr�s6B
 	(c@sseZdZdZedd��Zdddffdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)r\a�
    **deprecated** -- The `Feature` facility was never completely implemented
    or supported, `has reported issues
    <https://bitbucket.org/pypa/setuptools/issue/58>`_ and will be removed in
    a future version.

    A subset of the distribution that can be excluded if unneeded/wanted

    Features are created using these keyword arguments:

      'description' -- a short, human readable description of the feature, to
         be used in error messages, and option help messages.

      'standard' -- if true, the feature is included by default if it is
         available on the current system.  Otherwise, the feature is only
         included if requested via a command line '--with-X' option, or if
         another included feature requires it.  The default setting is 'False'.

      'available' -- if true, the feature is available for installation on the
         current system.  The default setting is 'True'.

      'optional' -- if true, the feature's inclusion can be controlled from the
         command line, using the '--with-X' or '--without-X' options.  If
         false, the feature's inclusion status is determined automatically,
         based on 'availabile', 'standard', and whether any other feature
         requires it.  The default setting is 'True'.

      'require_features' -- a string or sequence of strings naming features
         that should also be included if this feature is included.  Defaults to
         empty list.  May also contain 'Require' objects that should be
         added/removed from the distribution.

      'remove' -- a string or list of strings naming packages to be removed
         from the distribution if this feature is *not* included.  If the
         feature *is* included, this argument is ignored.  This argument exists
         to support removing features that "crosscut" a distribution, such as
         defining a 'tests' feature that removes all the 'tests' subpackages
         provided by other features.  The default for this argument is an empty
         list.  (Note: the named package(s) or modules must exist in the base
         distribution when the 'setup()' function is initially called.)

      other keywords -- any other keyword arguments are saved, and passed to
         the distribution's 'include()' and 'exclude()' methods when the
         feature is included or excluded, respectively.  So, for example, you
         could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be
         added or removed from the distribution as appropriate.

    A feature must include at least one 'requires', 'remove', or other
    keyword argument.  Otherwise, it can't affect the distribution in any way.
    Note also that you can subclass 'Feature' to create your own specialized
    feature types that modify the distribution in other ways when included or
    excluded.  See the docstrings for the various methods here for more detail.
    Aside from the methods, the only feature attributes that distributions look
    at are 'description' and 'optional'.
    cCstjdtdd�dS)NzmFeatures are deprecated and will be removed in a future version. See http://bitbucket.org/pypa/setuptools/65.�
stacklevelr�)�warningsr(�DeprecationWarningrrrrr]�szFeature.warn_deprecatedFTc	Ks�|j�||_||_||_||_t|ttf�rO|f}ndd�|D�|_dd�|D�}|r�||d<nt|t�r�|f}n||_	||_
|r�|r�|r�td��ndS)NcSs%g|]}t|t�r|�qSr)r=r@)rv�rrrrrx�s	z$Feature.__init__.<locals>.<listcomp>cSs%g|]}t|t�s|�qSr)r=r@)rvr�rrrrx�s	rXzgFeature %s: must define 'require_features', 'remove', or at least one of 'packages', 'py_modules', etc.)r]r��standard�	availabler�r=r@rrX�removerr)	rRr�r�r�r�rXr�rZerrrrrd�s$
				
		zFeature.__init__cCs|jo|jS)z+Should this feature be included by default?)r�r�)rRrrrr��szFeature.include_by_defaultcCsT|jst|jd��n|j|j�x|jD]}|j|�q9WdS)aEnsure feature and its requirements are included in distribution

        You may override this in a subclass to perform additional operations on
        the distribution.  Note that this method may be called more than once
        per feature, and so should be idempotent.

        z2 is required,but is not available on this platformN)r�rr�r�rrXr�)rRr�frrrr��s
	zFeature.include_incCsA|j|j�|jr=x!|jD]}|j|�q#WndS)a2Ensure feature is excluded from distribution

        You may override this in a subclass to perform additional operations on
        the distribution.  This method will be called at most once per
        feature, and only after all included features have been asked to
        include themselves.
        N)r�rr�r�)rRrr�rrrr��s
	zFeature.exclude_fromcCsFx?|jD]4}|j|�s
td|j||f��q
q
WdS)a�Verify that feature makes sense in context of distribution

        This method is called by the distribution just before it parses its
        command line.  It checks to ensure that the 'remove' attribute, if any,
        contains only valid package/module names that are present in the base
        distribution when 'setup()' is called.  You may override it in a
        subclass to perform any other required validation of the feature
        against a target distribution.
        zg%s wants to be able to remove %s, but the distribution doesn't contain any packages or modules under %sN)r�r%rr�)rRrr�rrrr�
s
zFeature.validateN)r�rr�r��staticmethodr]rdr�r�r�r�rrrrr\�s7	r\)(�__all__rCrsr9r�Z
distutils.logr
�distutils.core�
distutils.cmdrrc�distutils.errorsrrrZsetuptools.dependsrZsetuptools.compatrrrrr�r/r�rr!r+r4r6r7r<r>rBrFr�corer�r�r\rrrr�<module>s<			��
python3.4/site-packages/setuptools/__pycache__/__init__.cpython-34.pyc000064400000007136151735050020021653 0ustar00�
M�Re��@sldZddlZddlZddlZddlZddlmZddlm	Z	ddl
Zddlm
Z
ddlmZmZmZddlmZdd	d
ddd
dgZejjZdZdZdgZdfdd�ZejjZee�ZGdd�de�Zeej_ejdd�Zeej_e ede!ej"j#d���Z$dS)z@Extensions to the 'distutils' for large or complex distributions�N)�Command)�convert_path)�	Extension)�Distribution�Feature�_get_unpatched)�Require�setuprrrrr�
find_packagesTz
lib2to3.fixes�.cs.g}t|�dfg}x�|r�|jd�\}}x�tj|�D]�}tjj||�}d|ko�tjj|�o�tjjtjj|d��}|rI|j||�|j|||df�qIqIWqWxGt	|�dgD]2�ddl
m���fdd�|D�}q�W|S)	a�Return a list all Python packages found within directory 'where'

    'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it
    will be converted to the appropriate local path syntax.  'exclude' is a
    sequence of package names to exclude; '*' can be used as a wildcard in the
    names, such that 'foo.*' will exclude all subpackages of 'foo' (but not
    'foo' itself).
    �rrz__init__.pyZez_setup)�fnmatchcasecs%g|]}�|��s|�qS�r)�.0�item)r
�patr�./tmp/pip-l4uy7dan-build/setuptools/__init__.py�
<listcomp>7s	z!find_packages.<locals>.<listcomp>)r�pop�os�listdir�path�join�isdir�isfile�append�list�fnmatchr
)�where�exclude�out�stack�prefix�name�fnZlooks_like_packager)r
rrr
s 		!& c@s:eZdZejZdZdd�Zddd�ZdS)rFcKsAtj||�x*|j�D]\}}t|||�qWdS)N)�_Command�__init__�items�setattr)�self�dist�kw�k�vrrrr&CszCommand.__init__rcKsFtj|||�}x*|j�D]\}}t|||�q"W|S)N)r%�reinitialize_commandr'r()r)�command�reinit_subcommandsr+�cmdr,r-rrrr.IszCommand.reinitialize_commandN)�__name__�
__module__�__qualname__r%�__doc__Zcommand_consumes_argumentsr&r.rrrrr>s	cs�g}x�tj|�D]�\�}}�tjksM�jtjtj�r`�dd��n�r��fdd�|D�}n|jttjj|��qW|S)z^Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    �Ncs%g|]}tjj�|��qSr)rrr)r�f)�baserrrZs	zfindall.<locals>.<listcomp>)	r�walk�curdir�
startswith�sep�extend�filterrr)�dirZ	all_files�dirs�filesr)r8r�findallQs( rB�dont_write_bytecodeZPYTHONDONTWRITEBYTECODE)%r5r�sys�distutils.core�	distutils�distutils.filelistrr%�distutils.utilrZsetuptools.version�
setuptoolsZsetuptools.extensionrZsetuptools.distrrrZsetuptools.dependsr�__all__�version�__version__Zbootstrap_install_fromZrun_2to3_on_doctestsZlib2to3_fixer_packagesr
�corer	r:rB�filelist�getattr�bool�environ�getZ_dont_write_bytecoderrrr�<module>s2		
	python3.4/site-packages/setuptools/__pycache__/script template (dev).cpython-34.pyc000064400000000660151735050020024067 0ustar00�
M�Re7�@swdZddlZddlmZed�[dZejdkrQee�n"eee	e�j
�ed��dS)z%(spec)r�N)�requirez%(dev_path)r��exec)rr)�__requires__�sys�
pkg_resourcesr�__file__�version_info�execfiler�compile�open�read�rr�;/tmp/pip-l4uy7dan-build/setuptools/script template (dev).py�<module>s

python3.4/site-packages/setuptools/__pycache__/ssl_support.cpython-34.pyc000064400000014703151735050020022507 0ustar00�
M�Re��@scddlZddlZddlZddlZddlZddlmZmZddlmZyddl	Z	Wne
k
r�dZ	YnXdddddgZd	j�j
�ZeZZxpd
ddgfd
ddgffD]J\ZZx;eD]3Zyedeef�Wq�e
k
r(Yq�Xq�Wq�We	dk	oLeeefkZyddl	mZmZWnWe
k
r�y$ddlmZddlmZWne
k
r�dZdZYnXYnXes�Gdd�de�Znesddd�Zdd�ZnGdd�de�ZGdd�de�Zddd�Zdadd �Z d!d�Z!dS)"�N)�ResolutionError�ExtractionError)�urllib2�VerifyingHTTPSHandler�find_ca_bundle�is_available�
cert_paths�
opener_forz�
/etc/pki/tls/certs/ca-bundle.crt
/etc/ssl/certs/ca-certificates.crt
/usr/share/ssl/certs/ca-bundle.crt
/usr/local/share/certs/ca-root.crt
/etc/ssl/cert.pem
/System/Library/OpenSSL/certs/cert.pem
�HTTPSHandlerrzurllib.request�HTTPSConnection�httplibzhttp.clientzfrom %s import %s)�CertificateError�match_hostname)r
)rc@seZdZdS)r
N)�__name__�
__module__�__qualname__�rr�1/tmp/pip-l4uy7dan-build/setuptools/ssl_support.pyr
8sr
�c
CsXg}|sdS|jd�}|d}|dd�}|jd�}||krmtdt|���n|s�|j�|j�kS|dkr�|jd�nY|jd	�s�|jd	�r�|jtj|��n"|jtj|�j	d
d��x$|D]}|jtj|��qWtj
dd
j|�dtj�}	|	j
|�S)zpMatching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        F�.rrN�*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)�split�countr
�repr�lower�append�
startswith�re�escape�replace�compile�join�
IGNORECASE�match)
�dn�hostname�
max_wildcards�pats�parts�leftmost�	remainder�	wildcards�frag�patrrr�_dnsname_match<s*
"
&r.cCs[|std��ng}|jdf�}xC|D];\}}|dkr4t||�r_dS|j|�q4q4W|s�xc|jdf�D]L}xC|D];\}}|dkr�t||�r�dS|j|�q�q�Wq�Wnt|�dkrtd|d	jtt|��f��n;t|�dkrKtd
||df��ntd��dS)
a=Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
        rules are followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        zempty or no certificate�subjectAltName�DNSN�subject�
commonNamerz&hostname %r doesn't match either of %sz, zhostname %r doesn't match %rrz=no appropriate commonName or subjectAltName fields were found)	�
ValueError�getr.r�lenr
r!�mapr)�certr%�dnsnames�san�key�value�subrrrrps.%rc@s.eZdZdZdd�Zdd�ZdS)rz=Simple verifying handler: no auth, subclasses, timeouts, etc.cCs||_tj|�dS)N)�	ca_bundler
�__init__)�selfr=rrrr>�s	zVerifyingHTTPSHandler.__init__cs�j�fdd�|�S)Ncst|�j|�S)N)�VerifyingHTTPSConnr=)�host�kw)r?rr�<lambda>�sz2VerifyingHTTPSHandler.https_open.<locals>.<lambda>)�do_open)r?�reqr)r?r�
https_open�sz VerifyingHTTPSHandler.https_openN)rrr�__doc__r>rFrrrrr�sc@s.eZdZdZdd�Zdd�ZdS)r@z@Simple verifying connection: no auth, subclasses, timeouts, etc.cKs tj|||�||_dS)N)rr>r=)r?rAr=rBrrrr>�szVerifyingHTTPSConn.__init__cCs�tj|j|jft|dd��}t|d�rat|dd�ra||_|j�ntj	|dtj
d|j�|_yt|jj
�|j�Wn5tk
r�|jjtj�|jj��YnXdS)N�source_address�_tunnel�_tunnel_host�	cert_reqs�ca_certs)�socket�create_connectionrA�port�getattr�hasattr�sockrI�ssl�wrap_socket�
CERT_REQUIREDr=r�getpeercertr
�shutdown�	SHUT_RDWR�close)r?rRrrr�connect�s$!	


zVerifyingHTTPSConn.connectN)rrrrGr>rZrrrrr@�sr@cCstjt|pt���jS)z@Get a urlopen() replacement that uses ca_bundle for verification)r�build_openerrr�open)r=rrrr	�scsxtdk	rtjSyddlm�Wntk
r?dSYnXG�fdd�d��}|dddg�atjS)Nr)�CertFilecs(eZdZff�fdd�ZdS)z$get_win_certfile.<locals>.MyCertFilecsL�j|�x|D]}|j|�qW|j|�tj|j�dS)N)r>ZaddstoreZaddcerts�atexit�registerrY)r?�stores�certs�store)r]rrr>�s



z-get_win_certfile.<locals>.MyCertFile.__init__N)rrrr>r)r]rr�
MyCertFile�srcr`�CA�ROOT)�	_wincerts�nameZwincertstorer]�ImportError)rcr)r]r�get_win_certfile�s
	ric
Cswtjdkrt�Sx$tD]}tjj|�r|SqWytjdd�SWntt	t
fk
rrdSYnXdS)z*Return an existing CA bundle path, or None�ntZcertifiz
cacert.pemN)�osrgrir�path�isfile�
pkg_resources�resource_filenamerhrr)Z	cert_pathrrrr�s
)"rkrMr^rrnrrZsetuptools.compatrrSrh�__all__�striprr�objectr
r�what�where�module�execrr
rZbackports.ssl_match_hostnamer3r.rr@r	rfrirrrrr�<module>sV
	






4)
python3.4/site-packages/setuptools/__pycache__/archive_util.cpython-34.pyc000064400000012536151735050020022572 0ustar00�
M�Re��@s�dZdddddddgZdd	lZdd	lZdd	lZdd	lZdd	lZdd
lmZddl	m
Z
Gdd�de
�Zd
d�Zed	dd�Z
edd�Zedd�Zedd�ZeeefZd	S)z/Utilities for extracting common archive formats�unpack_archive�unpack_zipfile�unpack_tarfile�default_filter�UnrecognizedFormat�extraction_drivers�unpack_directory�N)�ensure_directory)�DistutilsErrorc@seZdZdZdS)rz#Couldn't recognize the archive typeN)�__name__�
__module__�__qualname__�__doc__�rr�2/tmp/pip-l4uy7dan-build/setuptools/archive_util.pyr
scCs|S)z@The default progress/filter callback; returns True for all filesr)�src�dstrrrrscCs[xT|ptD]6}y||||�Wntk
r>w
Yq
XdSq
Wtd|��dS)a�Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

    `progress_filter` is a function taking two arguments: a source path
    internal to the archive ('/'-separated), and a filesystem path where it
    will be extracted.  The callback must return the desired extract path
    (which may be the same as the one passed in), or else ``None`` to skip
    that file or directory.  The callback can thus be used to report on the
    progress of the extraction, as well as to filter the items extracted or
    alter their extraction paths.

    `drivers`, if supplied, must be a non-empty sequence of functions with the
    same signature as this function (minus the `drivers` argument), that raise
    ``UnrecognizedFormat`` if they do not support extracting the designated
    archive type.  The `drivers` are tried in sequence until one is found that
    does not raise an error, or until all are exhausted (in which case
    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
    drivers, the module's ``extraction_drivers`` constant will be used, which
    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
    order.
    Nz!Not a recognized archive type: %s)rr)�filename�extract_dir�progress_filterZdriversZdriverrrrr*s
c
CsGtjj|�s(td|f��nid|f|6}xtj|�D]�\}}}||\}}xD|D]<}	||	dtjj||	�f|tjj||	�<qqWx�|D]�}
||
}tjj||
�}|||
|�}|s�q�nt|�tjj||
�}
tj|
|�tj	|
|�q�WqKWdS)z�"Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    z%s is not a directory��/N)
�os�path�isdirr�walk�joinr	�shutil�copyfile�copystat)
rrr�paths�base�dirs�filesrr�d�f�name�targetrrrrSs"
:


c
Cs\tj|�s%td|f��ntj|�}zx|j�D]}|j}|jd�sDd|jd�kr}qDntj	j
||jd��}|||�}|s�qDn|jd�r�t|�nMt|�|j
|j�}t|d�}z|j|�Wd|j�~X|jd?}	|	rDtj||	�qDqDWWd|j�XdS)z�Unpack zip `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    z%s is not a zip filerz..�wbN�)�zipfile�
is_zipfiler�ZipFile�infolistr�
startswith�splitrrr�endswithr	�read�open�write�close�
external_attr�chmod)
rrr�z�infor&r'�datar%Zunix_attributesrrrr|s2	$



c	Cs�ytj|�}Wn(tjk
r=td|f��YnXz�dd�|_xl|D]d}|j}|jd�rWd|jd�krWtj	j
||jd��}x||dk	r'|j�s�|j�r'|j
}|j�rtj
tj|j�|�}tj|�}n|j|�}q�W|dk	r�|j�sL|j�r�|||�}|r�|jtj�r�|dd	�}ny|j||�Wq�tjk
r�Yq�Xq�q�qWqWWdSWd|j�XdS)
z�Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    z/%s is not a compressed or uncompressed tar filecWsdS)Nr)�argsrrr�<lambda>�sz unpack_tarfile.<locals>.<lambda>rz..N�T���)�tarfiler2�TarErrorr�chownr&r.r/rrr�islnk�issym�linkname�	posixpath�dirname�normpath�
_getmember�isfilerr0�sep�_extract_member�ExtractErrorr4)	rrr�tarobj�memberr&Z
prelim_dst�linkpathZ	final_dstrrrr�s8
	%'	$)r�__all__r*r>rrrD�
pkg_resourcesr	�distutils.errorsr
rrrrrrrrrrr�<module>s<(),*python3.4/site-packages/setuptools/__pycache__/py27compat.cpython-34.pyc000064400000001105151735050020022107 0ustar00�
M�Re2�@s@dZddlZdd�Zejdkr<dd�ZndS)z2
Compatibility Support for Python 2.7 and earlier
�NcCs
|j|�S)zB
	Given an HTTPMessage, return all headers matching a given key.
	)�get_all)�message�key�r�0/tmp/pip-l4uy7dan-build/setuptools/py27compat.py�get_all_headerssr�cCs
|j|�S)N)�
getheaders)rrrrrrs)r)�__doc__�sysr�version_inforrrr�<module>spython3.4/site-packages/setuptools/__pycache__/script template.cpython-34.pyc000064400000000364151735050020023210 0ustar00�
M�Re��@s&dZddlZejdd�dS)z%(spec)r�Nz%(script_name)r)�__requires__�
pkg_resources�
run_script�rr�5/tmp/pip-l4uy7dan-build/setuptools/script template.py�<module>spython3.4/site-packages/setuptools/__pycache__/version.cpython-34.pyc000064400000000225151735050020021571 0ustar00�
M�Re�@s
dZdS)z2.0N)�__version__�rr�-/tmp/pip-l4uy7dan-build/setuptools/version.py�<module>spython3.4/site-packages/setuptools/__pycache__/compat.cpython-34.pyc000064400000006261151735050020021375 0ustar00�
M�Re�	�@s<ddlZddlZejddkr�dZeZddlZddlZddlmZeZ	e
Z
dd�Zdd�Zdd�Z
dd	lmZddlZdd
lmZddlmZddlmZd
d�ZeZejZdd�ZeeefZeZe Z e!Z"ddl#m$Z$m%Z%m&Z&ddl'Z'ddl'm(Z(m)Z)m*Z*m+Z+m,Z,ddl-m-Z-m.Z.m/Z/m0Z0m1Z1ej2Z3e4d�n�dZe!ZddlZddl5Zddl6mZm	Z	dd�Zdd�Zdd�Z
dd	l7mZddl8j9Zddl:mZmZddl:mZdd�ZeZejZeZeefZe;Ze!Z e"Z"ddl<m)Z)m*Z*ddl=j>Z'ddl=m(Z(m$Z$m&Z&ddl?m-Z-m.Z.m+Z+m,Z,m/Z/m0Z0m1Z1m%Z%ej3Z3dddd�Z
ddd �Z@dS)!�N�F)�StringIOcCs|jS)N)�	func_code)�o�r�,/tmp/pip-l4uy7dan-build/setuptools/compat.py�<lambda>
srcCs|jS)N)�func_globals)rrrrrscCs|jS)N)�im_func)rrrrrs)�name2codepoint)�
HTTPServer)�SimpleHTTPRequestHandler)�BaseHTTPRequestHandlercCs
|j�S)N)�	iteritems)rrrrrscCs
|j�S)N)�next)rrrrrs)�url2pathname�splittag�pathname2url)�urlopen�	HTTPError�URLError�unquote�	splituser)�urlparse�
urlunparse�urljoin�urlsplit�
urlunsplitz8def reraise(tp, value, tb=None):
    raise tp, value, tbT)r�BytesIOcCs|jS)N)�__code__)rrrrr,scCs|jS)N)�__globals__)rrrrr-scCs|jS)N)�__func__)rrrrr.s)rr
cCs
|j�S)N)�items)rrrrr3s)rr)rrr)rrrrrrrrc
Csz|dkrt�}n|dkr-|}nt|d�}z|j�}Wd|j�Xtt||d�||�dS)N�rb�exec)�globals�open�read�closer$�compile)�fn�globs�locs�f�sourcerrr�execfileDs	r/cCs+|j|k	r!|j|��n|�dS)N)�
__traceback__�with_traceback)�tp�value�tbrrr�reraisePsr5)A�sys�	itertools�version_info�PY3�
basestring�__builtin__�builtins�ConfigParserrrr/rr	r
�htmlentitydefsr�httplib�BaseHTTPServerr�SimpleHTTPServerr
rr�longZ	long_typeZmaxint�maxsizer�int�float�
numeric_types�unichr�unicode�str�bytes�urllibrrr�urllib2rrrrrrrrrr�ifilterfalse�filterfalser$�configparser�io�
html.entities�http.client�clientZhttp.server�chr�urllib.error�urllib.request�request�urllib.parser5rrrr�<module>sv	((	
	:	python3.4/site-packages/setuptools/__pycache__/package_index.cpython-34.pyc000064400000103327151735050020022675 0ustar00�
M�Re
��@s�dZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZddlmZddlmZddlmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-dd	lm.Z.dd
l/m0Z0ddl1m2Z2ddl3m4Z4ej5d
�Z6ej5dej7�Z8ej5d�Z9ej5dej7�j:Z;dj<�Z=ddddgZ>dZ?dd�Z@dd�ZAddd�ZBddd�ZCddd�ZDdeddd�ZEdd d!�ZFd"d#�ZGej5d$ej7�ZHeGd%d&��ZId'ejJdd(�ed)�djJfZKGd*d+�d+eL�ZMGd,d-�d-eM�ZNGd.d�de�ZOej5d/�jPZQd0d1�ZRd2d3�ZSd4d5�ZTdd6d7�ZUd8d9�ZVGd:d;�d;eL�ZWGd<d=�d=e-j-�ZXejYd>d?�ZZeUe?�eZ�ZZd@dA�Z[dBdC�Z\dS)Dz#PyPI and direct package downloading�N)�wraps)
�
CHECKOUT_DIST�Distribution�BINARY_DIST�normalize_path�SOURCE_DIST�require�Environment�find_distributions�	safe_name�safe_version�to_filename�Requirement�DEVELOP_DIST)�ssl_support)�log)�DistutilsError)�urllib2�httplib�StringIO�	HTTPError�urlparse�
urlunparse�unquote�	splituser�url2pathname�name2codepoint�unichr�urljoin�urlsplit�
urlunsplit�ConfigParser)�filterfalse)�	translate)�strip_fragment)�get_all_headersz^egg=([-A-Za-z0-9_.]+)$zhref\s*=\s*['"]?([^'"> ]+)z�<a href="([^"#]+)">([^<]+)</a>
\s+\(<a (?:title="MD5 hash"
\s+)href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\)z([-+.a-z0-9]{2,}):z.tar.gz .tar.bz2 .tar .zip .tgz�PackageIndex�distros_for_url�parse_bdist_wininst�interpret_distro_name�cCs|j�}d\}}}|jd�r�|jd�rR|dd�}d}q�|jdd�r�|dd�}|dd�}d}q�|jd
�r�|dd�}d}q�|jd
d�r�|dd�}|dd�}d}q�n|||fS)z=Return (base,pyversion) or (None,None) for possible .exe nameNz.exez
.win32.exe�
�win32z	.win32-py���z.win-amd64.exe�z	win-amd64z
.win-amd64-py�)NNNi����i�i�������i�i�i��i����r2i��)�lower�endswith�
startswith)�namer3�base�py_ver�plat�r:�3/tmp/pip-l4uy7dan-build/setuptools/package_index.pyr(.s$			cCs�t|�\}}}}}}t|jd�d�}|dkrk|dkrkt|jd�d�}nd|kr�|jdd�\}}n||fS)	N�/�zsourceforge.net�download��#������)rr�split)�url�scheme�server�path�
parameters�query�fragmentr7r:r:r;�egg_info_for_urlFsrKccs�t|�\}}xt|||�D]}|Vq%W|r�tj|�}|r�x1t||jd�|dt�D]}|VqqWq�ndS)zEYield egg or source distribution objects that might be found at a URLr=�
precedenceN)rK�distros_for_location�EGG_FRAGMENT�matchr)�groupr)rD�metadatar7rJ�distrOr:r:r;r'Ns	"cCs�|jd�r"|dd�}n|jd�rSd|krStj|||�gS|jd�r�t|�\}}}|dk	r�t||||t|�SnxDtD]<}|j|�r�|dt|��}t|||�Sq�WgS)z:Yield egg or source distribution objects based on basenamez.egg.zipNr/z.egg�-z.exer2)r4r�
from_locationr(r)r�
EXTENSIONS�len)�location�basenamerQZwin_baser8�platform�extr:r:r;rMZs
rMcCs"tt|�tjj|�|�S)zEYield possible egg or source distribution objects based on a filename)rMr�osrGrX)�filenamerQr:r:r;�distros_for_filenameosr]c	cs�|jd�}|sdxLt|dd��D]1\}}t|�dkr,|jd�r,dSq,Wnxmtdt|�d�D]R}t||dj|d|��dj||d��d|d|d	|�Vq~WdS)
z�Generate alternative interpretations of a source distro name

    Note: if `location` is a filesystem filename, you should call
    ``pkg_resources.normalize_path()`` on it before passing it to this
    routine!
    rSr?N�zpy2.r=�
py_versionrLrY)rC�	enumeraterVr5�ranger�join)	rWrXrQr_rLrY�parts�i�pr:r:r;r)vs#! 5ccs�t�}|j}|dkrMxgt|j|�D]}||�|Vq1Wn;x8|D]0}||�}||krT||�|VqTqTWdS)zHList unique elements, preserving order. Remember all elements ever seen.N)�set�addr"�__contains__)�iterable�key�seenZseen_add�element�kr:r:r;�unique_everseen�s		


rncs"t���fdd��}|S)zs
    Wrap a function returning an iterable such that the resulting iterable
    only ever yields unique items.
    cst�||��S)N)rn)�args�kwargs)�funcr:r;�wrapper�szunique_values.<locals>.wrapper)r)rqrrr:)rqr;�
unique_values�srsz(<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>ccsx�tj|�D]�}|j�\}}tttj|j�jd���}d|ksgd|krx7t	j|�D]#}t
|t|jd���VqwWqqWxddD]\}|j
|�}|d	kr�t	j||�}|rt
|t|jd���Vqq�q�WdS)
zEFind rel="homepage" and rel="download" links in `page`, yielding URLs�,Zhomepager>r=�
<th>Home Page�<th>Download URLN)rurvrA)�REL�finditer�groupsrf�map�str�stripr3rC�HREFr�
htmldecoderP�find�search)rD�pagerO�tag�rel�rels�posr:r:r;�find_external_links�s'(
r�zPython-urllib/%s setuptools/%s��
setuptoolsc@s:eZdZdZdd�Zdd�Zdd�ZdS)	�ContentCheckerzP
    A null content checker that defines the interface for checking content
    cCsdS)z3
        Feed a block of data to the hash.
        Nr:)�self�blockr:r:r;�feed�szContentChecker.feedcCsdS)zC
        Check the hash. Return False if validation fails.
        Tr:)r�r:r:r;�is_valid�szContentChecker.is_validcCsdS)zu
        Call reporter with information about the checker (hash name)
        substituted into the template.
        Nr:)r��reporter�templater:r:r;�report�szContentChecker.reportN)�__name__�
__module__�__qualname__�__doc__r�r�r�r:r:r:r;r��sr�c@saeZdZejd�Zdd�Zedd��Zdd�Z	dd	�Z
d
d�ZdS)
�HashCheckerzK(?P<hash_name>sha1|sha224|sha384|sha256|sha512|md5)=(?P<expected>[a-f0-9]+)cCs(||_tj|�|_||_dS)N)�	hash_name�hashlib�new�hash�expected)r�r�r�r:r:r;�__init__�s	zHashChecker.__init__cCsLt|�d}|st�S|jj|�}|s<t�S||j��S)z5Construct a (possibly null) ContentChecker from a URLr=rA)rr��patternr��	groupdict)�clsrDrJrOr:r:r;�from_url�szHashChecker.from_urlcCs|jj|�dS)N)r��update)r�r�r:r:r;r��szHashChecker.feedcCs|jj�|jkS)N)r��	hexdigestr�)r�r:r:r;r��szHashChecker.is_validcCs||j}||�S)N)r�)r�r�r��msgr:r:r;r�s
zHashChecker.reportN)r�r�r��re�compiler�r��classmethodr�r�r�r�r:r:r:r;r��s	r�cs�eZdZdZddJdddd�Zdd	d
�Zddd�Zdd
d�Zdd�Zdd�Z	dd�Z
dd�Zddd�Zdd�Z
d�fdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zddddd'd(�Zddd)d*�Zd+d,�Zd-Zd.d/�Zd0d1�Zdd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Ze dd>d?��Z!d@dA�Z"dBdC�Z#dDdE�Z$dFdG�Z%dHdI�Z&�S)Kr&z;A distribution index that scans web pages for download URLszhttps://pypi.python.org/simple�*NTcOs�tj|||�|dd|jd��|_i|_i|_i|_tjdj	t
t|���j|_
g|_|r�tjr�|s�tj�r�tj|�|_ntj|_dS)Nr<�|)r	r�r4�	index_url�scanned_urls�fetched_urls�
package_pagesr�r�rbrzr#rO�allows�to_scanrZis_availableZfind_ca_bundleZ
opener_for�openerr�urlopen)r�r�ZhostsZ	ca_bundleZ
verify_sslro�kwr:r:r;r�	s!			'	!zPackageIndex.__init__Fc
CsU||jkr|rdSd|j|<t|�sD|j|�dStt|��}|r�|j|�sodS|jd|�n|s�|s�||jkr�tt|j	|��dS|j|�s�d|j|<dS|j
d|�d|j|<|j|d|�}|dkrdSd|j|j<d|j
jdd�j�krZ|j�dS|j}|j�}t|t�s�t|t�r�d	}n|j
jd
�p�d	}|j|d�}n|j�xBtj|�D]1}t|t|jd���}	|j|	�q�W|j|j�rQt|d
d�dkrQ|j ||�}ndS)z<Evaluate a URL as a possible download, and maybe retrieve itNTzFound link: %sz
Reading %sz<Download error on %s: %%s -- Some packages may not be found!�htmlzcontent-type�zlatin-1�charset�ignorer=�codei�)!r��
URL_SCHEME�process_filename�listr'�url_ok�debugr�rzrg�info�open_urlrD�headers�getr3�close�read�
isinstancer{r�	get_param�decoder}rxrr~rP�process_urlr5r��getattr�
process_index)
r�rD�retrieve�dists�fr7r�r�rO�linkr:r:r;r�sN



!
		
*zPackageIndex.process_urlcCs�tjj|�s&|jd|�dStjj|�r�|r�tjj|�}x9tj|�D]%}|jtjj||�d�qaWnt	|�}|r�|j
d|�tt|j
|��ndS)Nz
Not found: %sTz	Found: %s)r[rG�exists�warn�isdir�realpath�listdirr�rbr]r�r�rzrg)r��fn�nestedrG�itemr�r:r:r;r�Hs&zPackageIndex.process_filenamecCs}t|�}|r-|jd�j�dksF|jt|�d�rJdSd}|rit||��n|j||�dS)Nr=�fileTzN
Note: Bypassing %s (disallowed host; see http://bit.ly/1dg9ijs for details).
)r�rPr3r�rrr�)r�rD�fatal�sr�r:r:r;r�Xs:zPackageIndex.url_okcCsfx_|D]W}tjj|�rx<tj|�D](}|jd�r/|j||�q/q/WqqWdS)Nz	.egg-link)r[rGr�r�r4�
scan_egg_link)r��search_pathr��entryr:r:r;�scan_egg_linkscs

zPackageIndex.scan_egg_linkscCs�dd�ttjttjj||���D�}t|�dkr�xXttjj||d��D]4}tjj||�|_	t
|_|j|�qfWndS)NcSsg|]}|r|�qSr:r:)�.0Z_fr:r:r;�
<listcomp>ks	z.PackageIndex.scan_egg_link.<locals>.<listcomp>r?r)
rzr{r|�openr[rGrbrVr
rWrrLrg)r�rGr��linesrRr:r:r;r�js"&	zPackageIndex.scan_egg_linkc

s�fdd�}xRtj|�D]A}y&|t|t|jd����Wq"tk
rbYq"Xq"W||�\}}|rxyt||�D]h}t|�\}}	|jd�r�|	r�|r�|d||f7}q��j	|�n�j
|�q�Wtjdd�|�SdSd	S)
z#Process the contents of a PyPI pagecs�|j�j�r�ttt|t�j�d�jd���}t|�dkr�d|dkr�t|d�}t|d�}d�j	j
|j�i�|<t|�t|�fSndS)Nr<r?r@r=rT)NN)
r5r�r�rzrrVrCrrr��
setdefaultr3r
)r�rc�pkg�ver)r�r:r;�scanus+"z(PackageIndex.process_index.<locals>.scanr=z.pyz
#egg=%s-%scSsd|jddd�S)Nz<a href="%s#md5=%s">%s</a>r=r�r?)rP)�mr:r:r;�<lambda>�sz,PackageIndex.process_index.<locals>.<lambda>r�N)
r}rxrr~rP�
ValueErrorr�rKr4�need_version_info�scan_url�PYPI_MD5�sub)
r�rDr�r�rOr�r��new_urlr7�fragr:)r�r;r�ss$&
	zPackageIndex.process_indexcCs|jd|�dS)NzPPage at %s links to .py file(s) without version info; an index scan is required.)�scan_all)r�rDr:r:r;r��szPackageIndex.need_version_infocGsO|j|jkr;|r+|j||�n|jd�n|j|j�dS)Nz6Scanning index of all packages (this may take a while))r�r�r�r�r�)r�r�ror:r:r;r��s
zPackageIndex.scan_allcCs�|j|j|jd�|jj|j�sN|j|j|jd�n|jj|j�ss|j|�nx3t|jj|jf��D]}|j|�q�WdS)Nr<)	r�r��unsafe_namer�r�rj�project_name�not_found_in_indexr�)r��requirementrDr:r:r;�
find_packages�s%zPackageIndex.find_packagescsk|j�|j|�x8||jD])}||kr;|S|jd||�q%Wtt|�j||�S)Nz%s does not match %s)�prescanr�rjr��superr&�obtain)r�r��	installerrR)�	__class__r:r;r��s

zPackageIndex.obtaincCsi|j|jd|�|j�se|j�tj|�td|jjtj	j
|�f��ndS)z-
        checker is a ContentChecker
        zValidating %%s checksum for %sz7%s validation failed for %s; possible download problem?N)r�r�r�r�r[�unlinkrr�r6rGrX)r��checkerr\�tfpr:r:r;�
check_hash�s

zPackageIndex.check_hashcCsrxk|D]c}|jdksJt|�sJ|jd�sJtt|��rZ|j|�q|jj|�qWdS)z;Add `urls` to the list that will be prescanned for searchesNzfile:)r�r�r5r�r'r��append)r��urlsrDr:r:r;�add_find_links�s

zPackageIndex.add_find_linkscCs2|jr%tt|j|j��nd|_dS)z7Scan urls scheduled for prescanning (e.g. --find-links)N)r�r�rzr�)r�r:r:r;r��s	zPackageIndex.prescancCsN||jr |jd}}n|jd}}|||j�|j�dS)Nz#Couldn't retrieve index page for %rz3Couldn't find index page for %r (maybe misspelled?))rjr�r�r�r�)r�r��methr�r:r:r;r��s

zPackageIndex.not_found_in_indexcCs�t|t�s�t|�}|r||j|jd�||�}t|�\}}|jd�rx|j|||�}n|Stj	j
|�r�|Sytj|�}Wq�tk
r�t
d|f��Yq�Xnt|j||�dd�S)aLocate and/or download `spec` to `tmpdir`, returning a local path

        `spec` may be a ``Requirement`` object, or a string containing a URL,
        an existing local filename, or a project/version requirement spec
        (i.e. the string form of a ``Requirement`` object).  If it is the URL
        of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
        that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
        automatically created alongside the downloaded file.

        If `spec` is a ``Requirement`` object or a string containing a
        project/version requirement spec, this method returns the location of
        a matching distribution (possibly after downloading it to `tmpdir`).
        If `spec` is a locally existing file or directory name, it is simply
        returned unchanged.  If `spec` is a URL, it is downloaded to a subpath
        of `tmpdir`, and the local filename is returned.  Various errors may be
        raised if a problem occurs during downloading.
        r=z.pyz1Not a URL, existing file, or requirement spec: %rrWN)r�rr��
_download_urlrPrKr4�	gen_setupr[rGr��parser�rr��fetch_distribution)r��spec�tmpdirrE�foundr7rJr:r:r;r>�s"
zPackageIndex.downloadc	sN�jd|�i�d}d����fdd�}|rf�j��j|�||�}n|dk	r�|p�|||�}n|dkr��jdk	r��j�||�}n|dkr�|r��j|�||�}n|dkr�jd�rdpd|�n/�jd|�|jd	�j|j|��SdS)
a|Obtain a distribution suitable for fulfilling `requirement`

        `requirement` must be a ``pkg_resources.Requirement`` instance.
        If necessary, or if the `force_scan` flag is set, the requirement is
        searched for in the (online) package index as well as the locally
        installed packages.  If a distribution matching `requirement` is found,
        the returned distribution's ``location`` is the value you would have
        gotten from calling the ``download()`` method with the matching
        distribution's URL or filename.  If no matching distribution is found,
        ``None`` is returned.

        If the `source` flag is set, only source distributions and source
        checkout links will be considered.  Unless the `develop_ok` flag is
        set, development and system eggs (i.e., those using the ``.egg-info``
        format) will be ignored.
        zSearching for %sNcs�|dkr�}nx�||jD]q}|jtkrn�rn|�kr#�jd|�d�|<q#q#n||kr#|jtks��r#|Sq#WdS)Nz&Skipping development or system egg: %sr=)rjrLrr�r)�req�envrR)�
develop_okr��skipped�sourcer:r;r1s	
"z-PackageIndex.fetch_distribution.<locals>.findz2No local packages or download links found for %s%sza source distribution of r�zBest match: %srW)r�r�r�r�r��cloner>rW)	r�r�r�
force_scanr	rZlocal_indexrRrr:)rr�rr	r;rs.




zPackageIndex.fetch_distributioncCs/|j||||�}|dk	r+|jSdS)a3Obtain a file suitable for fulfilling `requirement`

        DEPRECATED; use the ``fetch_distribution()`` method now instead.  For
        backward compatibility, this routine is identical but returns the
        ``location`` of the downloaded distribution instead of a distribution
        object.
        N)rrW)r�r�rrr	rRr:r:r;�fetch[szPackageIndex.fetchc
Csbtj|�}|r=dd�t||jd�d�D�p@g}t|�dkr3tjj|�}tjj|�|kr�tjj	||�}ddl
m}|||�s�tj
||�|}q�nttjj	|d�d�}	|	jd|dj|djtjj|�df�|	j�|S|rRtd	||f��ntd
��dS)NcSsg|]}|jr|�qSr:)�version)r��dr:r:r;r�ks	z*PackageIndex.gen_setup.<locals>.<listcomp>r=r)�samefilezsetup.py�wzIfrom setuptools import setup
setup(name=%r, version=%r, py_modules=[%r])
z�Can't unambiguously interpret project/version identifier %r; any dashes in the name or version should be escaped using underscores. %rzpCan't process plain .py files without an '#egg=name-version' suffix to enable automatic setup script generation.)rNrOr)rPrVr[rGrX�dirnamerbZsetuptools.command.easy_installr�shutil�copy2r��writer�r
�splitextr�r)
r�r\rJrrOr�rX�dstrr�r:r:r;r�hs4	
zPackageIndex.gen_setupi c
Cs�|jd|�d\}}}zItj|�}|jt|��}t|t�rwtd||j|j	f��n|j�}d}|j
}	d	}
d|kr�t|d�}tt
t|��}
|j||||	|
�nt|d�}xZ|j|	�}|rK|j|�|j|�|d7}|j||||	|
�q�Pq�W|j|||�|SWd|r~|j�n|r�|j�nXdS)
NzDownloading %szCan't download %s: %s %srr=zcontent-lengthzContent-Length�wb)NNNrA)r�r�r�r�r$r�rrr�r��dl_blocksizer%�maxrz�int�
reporthookr�r�r�rr�r�)
r�rDr\�fpr�r�r�r��blocknum�bs�sizeZsizesr�r:r:r;�_download_to�s>	



zPackageIndex._download_tocCsdS)Nr:)r�rDr\rZblksizerr:r:r;r�szPackageIndex.reporthookcCs�|jd�rt|�Syt||j�SWn�ttjfk
r�tj�d}dj	dd�|j
D��}|r�|j||�ntd||f��Yn.t
jk
r�tj�d}|SYnt
jk
r)tj�d}|r|j||j�ntd||jf��Yn�tjk
r�tj�d}|re|j||j�ntd||jf��YnTtjk
r�tj�d}|r�|j||�ntd||f��YnXdS)	Nzfile:r=� cSsg|]}t|��qSr:)r{)r��argr:r:r;r��s	z)PackageIndex.open_url.<locals>.<listcomp>z%s %szDownload error for %s: %sz;%s returned a bad status line. The server might be down, %s)r5�
local_open�open_with_authr�r�r�
InvalidURL�sys�exc_inforbror�rrr�URLError�reason�
BadStatusLine�line�
HTTPException)r�rD�warning�vr�r:r:r;r��s@
zPackageIndex.open_urlcCsBt|�\}}|rLx7d|krH|jdd�jdd�}qWnd}|jd�rt|dd�}ntjj||�}|dks�|jd	�r�|j||�S|d
ks�|jd�r�|j||�S|jd�r�|j	||�S|d
krt
t|�d�S|j|d�|j
||�SdS)Nz..�.�\�_Z__downloaded__z.egg.zipr/�svnzsvn+�gitzgit+zhg+r�r?Tr2)rK�replacer4r[rGrbr5�
_download_svn�
_download_git�_download_hgrrr��_attempt_download)r�rErDrr6rJr\r:r:r;r��s$%zPackageIndex._download_urlcCs|j|d�dS)NT)r�)r�rDr:r:r;r��szPackageIndex.scan_urlcCsK|j||�}d|jdd�j�krC|j|||�S|SdS)Nr�zcontent-typer�)r r�r3�_download_html)r�rDr\r�r:r:r;r8szPackageIndex._attempt_downloadcCs�t|�}xW|D]O}|j�rtjd|�r^|j�tj|�|j||�SPqqW|j�tj|�td|��dS)Nz <title>([^- ]+ - )?Revision \d+:zUnexpected HTML page found at )	r�r|r�r�r�r[r�r5r)r�rDr�r\r�r+r:r:r;r9	s




zPackageIndex._download_htmlcCs`|jdd�d}d}|j�jd�r/d|kr/t|�\}}}}}}	|r/|jd�r/d|d	d�kr/|d	d�jdd�\}}t|�\}
}|
r,d
|
kr�|
jd
d�\}}
d||
f}n
d|
}|}t||||||	f�}q,q/n|jd
||�tjd|||f�|S)Nr@r=rr�zsvn:�@z//r<r?�:z --username=%s --password=%sz --username=z'Doing subversion checkout from %s to %szsvn checkout%s -q %s %s)	rCr3r5rrrr�r[�system)r�rDr\�credsrE�netlocrGre�qr��auth�host�user�pwr:r:r;r5s"!,"
'zPackageIndex._download_svncCs�t|�\}}}}}|jdd�d}|jdd�d}d}d|krt|jdd�\}}nt||||df�}||fS)N�+r=r@rr:r�rA)rrC�rsplitr )rD�
pop_prefixrEr>rGrIr��revr:r:r;�_vcs_split_rev_from_url,sz$PackageIndex._vcs_split_rev_from_urlcCs�|jdd�d}|j|dd�\}}|jd||�tjd||f�|dk	r�|jd|�tjd	||f�n|S)
Nr@r=rrFTzDoing git clone from %s to %szgit clone --quiet %s %szChecking out %sz"(cd %s && git checkout --quiet %s))rCrHr�r[r<)r�rDr\rGr:r:r;r6>s	zPackageIndex._download_gitcCs�|jdd�d}|j|dd�\}}|jd||�tjd||f�|dk	r�|jd|�tjd	||f�n|S)
Nr@r=rrFTzDoing hg clone from %s to %szhg clone --quiet %s %szUpdating to %sz(cd %s && hg up -C -r %s >&-))rCrHr�r[r<)r�rDr\rGr:r:r;r7Ns	zPackageIndex._download_hgcGstj||�dS)N)rr�)r�r�ror:r:r;r�^szPackageIndex.debugcGstj||�dS)N)rr�)r�r�ror:r:r;r�aszPackageIndex.infocGstj||�dS)N)rr�)r�r�ror:r:r;r�dszPackageIndex.warn)r�)'r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r>rrr�rr rr�r�r�r8r9r5�staticmethodrHr6r7r�r�r�r:r:)r�r;r&sL
0	*		)A
*$(z!&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?cCs3t|t�s|S|dkr)t|�St|�S)N�)r�rr�chr)�cr:r:r;�uchrks

rMcCs�|jd�}|jd�r:t|dd�d�}nC|jd�rbt|dd��}ntj||jd��}t|�S)Nr=z#xr?r-r@r)rPr5rrr�rM)rO�whatr:r:r;�
decode_entityqsrOcCs
tt|�S)z'Decode HTML entities in the given text.)�
entity_subrO)�textr:r:r;r~{sr~cs�fdd�}|S)Ncs��fdd�}|S)Ncs?tj�}tj��z�||�SWdtj|�XdS)N)�socket�getdefaulttimeout�setdefaulttimeout)rorpZold_timeout)rq�timeoutr:r;�_socket_timeout�s

z@socket_timeout.<locals>._socket_timeout.<locals>._socket_timeoutr:)rqrV)rU)rqr;rV�sz'socket_timeout.<locals>._socket_timeoutr:)rUrVr:)rUr;�socket_timeouts	rWcCsCt|�}|j�}tj|�}|j�}|jdd�S)aq
    A function compatible with Python 2.3-3.3 that will encode
    auth from a URL suitable for an HTTP header.
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
    �
r�)r�encode�base64�encodestringr�r4)r@Zauth_sZ
auth_bytesZ
encoded_bytes�encodedr:r:r;�_encode_auth�s
r]c@s:eZdZdZdd�Zdd�Zdd�ZdS)	�
Credentialz:
    A username/password pair. Use like a namedtuple.
    cCs||_||_dS)N)�username�password)r�r_r`r:r:r;r��s	zCredential.__init__ccs|jV|jVdS)N)r_r`)r�r:r:r;�__iter__�szCredential.__iter__cCsdt|�S)Nz%(username)s:%(password)s)�vars)r�r:r:r;�__str__�szCredential.__str__N)r�r�r�r�r�rarcr:r:r:r;r^�sr^c@sFeZdZdd�Zedd��Zdd�Zdd�Zd	S)
�
PyPIConfigcCsutjdddgd�}tjj||�tjjtjjd�d�}tjj|�rq|j	|�ndS)z%
        Load from ~/.pypirc
        r_r`�
repositoryr��~z.pypircN)
�dict�fromkeysr!r�r[rGrb�
expanduserr�r�)r��defaults�rcr:r:r;r��s
!zPyPIConfig.__init__cs5�fdd��j�D�}tt�j|��S)Ncs.g|]$}�j|d�j�r|�qS)re)r�r|)r��section)r�r:r;r��s	z2PyPIConfig.creds_by_repository.<locals>.<listcomp>)�sectionsrgrz�_get_repo_cred)r�Zsections_with_repositoriesr:)r�r;�creds_by_repository�szPyPIConfig.creds_by_repositorycCsO|j|d�j�}|t|j|d�j�|j|d�j��fS)Nrer_r`)r�r|r^)r�rl�repor:r:r;rn�szPyPIConfig._get_repo_credcCs7x0|jj�D]\}}|j|�r|SqWdS)z�
        If the URL indicated appears to be a repository defined in this
        config, return the credential for that repository.
        N)ro�itemsr5)r�rDre�credr:r:r;�find_credential�szPyPIConfig.find_credentialN)r�r�r�r��propertyrornrsr:r:r:r;rd�s	rdcCs�t|�\}}}}}}|jd�r?tjd��n|d
kr`t|�\}}	nd}|s�t�j|�}
|
r�t|
�}|
j|f}t	j
d|�q�n|rdt|�}t||	||||f�}t
j|�}
|
jd|�nt
j|�}
|
jd	t�||
�}|r�t|j�\}}}}}}||kr�||	kr�t||||||f�|_q�n|S)z4Open a urllib2 request, handling HTTP authenticationr;znonnumeric port: ''�http�httpsNz*Authenticating as %s for %s (from .pypirc)zBasic �
Authorizationz
User-Agent)zhttpzhttps)rr4rr%rrdrsr{r_rr�r]rr�Request�
add_header�
user_agentrD)rDr�rEr>rG�paramsrIr�r@rArrr�r��requestr�s2�h2Zpath2Zparam2Zquery2Zfrag2r:r:r;r$�s2!'r$cCs|S)Nr:)rDr:r:r;�
fix_sf_urlsrcCsut|�\}}}}}}t|�}tjj|�rItj|�S|jd�r=tjj|�r=g}x�tj	|�D]�}	|	dkr�t
tjj||	�d�}
|
j�}|
j
�Pn.tjjtjj||	��r�|	d7}	n|jd|	|	f�q�Wd|ddj|�}d\}}
nd\}}
}id
d6}t|||
|t|��S)z7Read a local path, with special support for directoriesr<z
index.html�rz<a href=%r>%s</a>z<html><head><title>%s</title>z</head><body>%s</body></html>rX���OK��Path not found�	Not foundz	text/htmlzcontent-type)r�zOK)r�r�r�)rrr[rG�isfilerr�r4r�r�r�rbr�r�r�rr)rDrErFrG�paramrIr�r\�filesr�r�body�status�messager�r:r:r;r#s*
!
!

r#)]r�r&r[r�rrRrZr��	functoolsr�
pkg_resourcesrrrrrrr	r
rrr
rrr�r�	distutilsr�distutils.errorsrZsetuptools.compatrrrrrrrrrrrrrr r!r"�fnmatchr#Zsetuptools.py26compatr$Zsetuptools.py27compatr%r�rN�Ir}r�rOr�rCrU�__all__Z_SOCKET_TIMEOUTr(rKr'rMr]r)rnrsrwr�r
rz�objectr�r�r&r�rPrMrOr~rWr]r^rdr�r$rr#r:r:r:r;�<module>spXd			"
'!��e
'+python3.4/site-packages/setuptools/__pycache__/py26compat.cpython-34.pyc000064400000001361151735050020022112 0ustar00�
M�Re��@sPdZddlZddlmZdd�Zejd
krLdd	�ZndS)z2
Compatibility Support for Python 2.6 and earlier
�N)�splittagcCst|�\}}|S)z�
	In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
	later was patched to disregard the fragment when making URL requests.
	Do the same for Python 2.6 and earlier.
	)r)�url�fragment�r�0/tmp/pip-l4uy7dan-build/setuptools/py26compat.py�strip_fragment	sr��cCs|S)Nr)�xrrr�<lambda>sr)rr	)�__doc__�sysZsetuptools.compatrr�version_inforrrr�<module>s
	python3.4/site-packages/setuptools/__pycache__/svn_utils.cpython-34.pyc000064400000043760151735050020022145 0ustar00�
M�Re�E�@siddlZddlZddlZddlmZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZyddlZWn!ek
r�ddljZYnXddlmZmZeedddd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Ze�Zddd�Z dd�Z!ddd�Z"dd�Z#dd�Z$Gdd�de%�Z&Gdd �d e&�Z'Gd!d"�d"e'�Z(Gd#d$�d$e&�Z)dd%d&�Z*Gd'd(�d(e%�Z+Gd)d*�d*e+�Z,Gd+d,�d,e+�Z-e.d-krex(e*ej/d.�D]Z0e1e0�qNWndS)/�N)�log)�unicode)�unescape)�Popen�PIPEcCspy;t|d|d|dtjdk�}|j�|}Wntk
rSdSYnXt||�}|j|fS)N�stdout�stderr�shell�win32��)rr)�_Popen�sys�platform�communicate�OSError�decode_as_string�
returncode)�argsrr�encoding�stream�proc�data�r�//tmp/pip-l4uy7dan-build/setuptools/svn_utils.py�_run_commands
	rcCs0|jd�d}djdd�|jD��S)N�schedulerrcSs+g|]!}|j|jkr|j�qSr)�nodeType�	TEXT_NODE�	nodeValue)�.0�trrr�
<listcomp>2s	z'_get_entry_schedule.<locals>.<listcomp>)�getElementsByTagName�join�
childNodes)�entryrrrr�_get_entry_schedule0sr'cCs0|jd�d}djdd�|jD��S)N�propertyrrcSs+g|]!}|j|jkr|j�qSr)rrr)r r!rrrr"9s	z(_get_target_property.<locals>.<listcomp>)r#r$r%)�targetZ
property_textrrr�_get_target_property7sr*cCs+tjdkr!|jd�}n|}|S)N�rzutf-8)r+r)r�version_info�encode)�decoded_strrrrr�
_get_xml_data>sr/cGs6|s|dkr#tjj|�Stjj||�S)N�.)�os�pathr$)�prefix�suffixrrr�joinpathGsr5cCs�yLtj�}|s"|dkr5tj�d}n|rKtj|�nWn!tjtfk
rod}YnXtjdk}|s�ddg|S|j	d�r�|r�dS|SdS)NzUS-ASCIIr�darwinzutf-8zmac-)
�locale�getpreferredencoding�getdefaultlocale�codecs�lookup�Error�LookupErrorrr�
startswith)r�is_osxrrr�determine_console_encodingLsr@cCsL|dkrt}nt|t�s6|j|�}ntjd|�}|S)a�
    Decode the console or file output explicitly using getpreferredencoding.
    The text paraemeter should be a encoded string, if not no decode occurs
    If no encoding is given, getpreferredencoding is used.  If encoding is
    specified, that is used instead.  This would be needed for SVN --xml
    output.  Unicode is explicitly put in composed NFC form.

    --xml should be UTF-8 (SVN Issue 2938) the discussion on the Subversion
    DEV List from 2007 seems to indicate the same.
    NZNFC)�_console_encoding�
isinstancer�decode�unicodedata�	normalize)�textrrrrris
	rcCs�tjjjt|��}t�}x||D]t\}}|dkr+|jdkr+|j|�t|�j	d�s�|j
|jd�|jd�f�q�q+q+W|dd�S)z+Parse the entries from a recursive info xml�
START_ELEMENTr&�deleter2�kindrN)�xml�dom�pulldom�parseStringr/�list�nodeName�
expandNoder'r>�append�getAttribute)r.�doc�entries�event�noderrr�parse_dir_entries�s	
rWrc	Cstjj|�}tjj|�}tjjjt|��}t	�}x�|D]�\}}|dkrO|j
dkrO|j|�tjj|jd��}tjj|�j
|�r�|t|�dd�}nt|�}x-t|�D]}|jt||��q�WqOqOW|S)z!Parse a propget svn:externals xmlrGr)r2rN)r1r2�normpath�normcaserJrKrLrMr/rNrOrPrRr>�lenr*�parse_external_proprQr5)	r.r3rS�	externalsrUrVr2r�externalrrr�parse_externals_xml�s	
!r^cCs�g}x�|j�D]�}|j�}|s1qntjdkrR|jd�}ntj|�}tjd	kr�dd�|D�}ntj|d
�dr�|d}n
|d}t	|dd�}|j
tjj
|��qW|S)z�
    Parse the value of a retrieved svn:externals entry.

    possible token setups (with quotng and backscaping in laters versions)
        URL[@#] EXT_FOLDERNAME
        [-r#] URL EXT_FOLDERNAME
        EXT_FOLDERNAME [-r#] URL
    r+rzutf-8cSsg|]}|jd��qS)zutf-8)rC)r �xrrrr"�s	z'parse_external_prop.<locals>.<listcomp>rr)r+r)r+r���r`)�
splitlines�lstriprr,r-�shlex�split�urlparse�urlsplitrrQr1r2rX)�linesr\�liner]rrrr[�s 	

r[c	
Cs�d}t|d�}d}z�x�t|jd�D]}|j�}t|�dkr1|\}}|jt|��}|dkr�||kr�d}q�|dkr�|r�Pq�q1q1WWd|j�X|S)NF�rtr��KT�V)�open�iter�readlinerdrZ�read�int�close)	�filename�key�found�frrh�partsrI�lengthrrr�parse_prop_file�s	ryc@s�eZdZdZedd��Zejdej�Z	e
ddd��Zddd	�Zd
d�Z
edd
��Zedd��Zdd�Zdd�Zddd�Zdd�Zdd�ZdS)�SvnInfoz�
    Generic svn_info object.  No has little knowledge of how to extract
    information.  Use cls.load to instatiate according svn version.

    Paths are not filesystem encoded.
    cCs?tdddg�\}}|dkr7|r7|j�SdSdS)N�svnz	--versionz--quietrr)r�strip)�coderrrr�get_svn_version�s
zSvnInfo.get_svn_versionz!(?:([\-0-9]+):)?(\d+)([a-z]*)\s*$rc	Cshtjj|�}tdd|g�\}}tjj|d�}tjjtjj|d��p�tjjtjj|d��p�tjjtjj|d��}t|j�jd��}y'tdd	�|dd
�D��}Wnt	k
rt�}YnX|st
|�S|s.|s.|dkrHtjd
t
�t|�S|dkr^t|�St|�S)Nr{�infoz.svnrTz	dir-propsz
dir-prop-baser0css|]}t|�VqdS)N)rq)r r_rrr�	<genexpr>szSvnInfo.load.<locals>.<genexpr>rjrr+z?No SVN 1.3+ command found: falling back on pre 1.7 .svn parsing�)rr+)rr�)r1r2rXrr$�isfile�tupler~rd�
ValueErrorrz�warnings�warn�DeprecationWarning�SvnFileInfo�	Svn13Info�	Svn15Info)	�cls�dirname�normdirr}rZsvn_dirZhas_svn�svn_versionZbase_svn_versionrrr�load�s(!!!'

	

zSvnInfo.loadcCs||_d|_d|_dS)N)r2�_entries�
_externals)�selfr2rrr�__init__s		zSvnInfo.__init__cCshtdd|jg�\}}|r5tjd�dS|jj|�}|r`t|jd��SdSdS)z<Retrieve the directory revision informatino using svnversionZ
svnversionz-czsvnversion failedrrjN)rr2rr��revision_re�matchrq�group)r�r}r�parsedrrr�get_revisions
zSvnInfo.get_revisioncCs(|jdkr!|j�|_n|jS)N)r��get_entries)r�rrrrT(szSvnInfo.entriescCs(|jdkr!|j�|_n|jS)N)r��
get_externals)r�rrrr\.szSvnInfo.externalsccsx|jD]}|Vq
WdS)zR
        Iterate over the svn:external references in the repository path.
        N)r\)r��itemrrr�iter_externals4szSvnInfo.iter_externalsccs8x1|jD]&\}}|j�dkr
|Vq
q
WdS)zR
        Iterate over the non-deleted file entries in the repository path
        �fileN)rT�lower)r�r�rIrrr�
iter_files;szSvnInfo.iter_filesTccsI|r|jVnx1|jD]&\}}|j�dkr|VqqWdS)zR
        Iterate over the non-deleted file entries in the repository path
        �dirN)r2rTr�)r�Zinclude_rootr�rIrrr�	iter_dirsCs
zSvnInfo.iter_dirscCsgS)Nr)r�rrrr�MszSvnInfo.get_entriescCsgS)Nr)r�rrrr�PszSvnInfo.get_externalsN)�__name__�
__module__�__qualname__�__doc__�staticmethodr~�re�compile�Ir��classmethodr�r�r�r(rTr\r�r�r�r�r�rrrrrz�s


rzc@s(eZdZdd�Zdd�ZdS)r�cCsKtdddd|jgdd�\}}|rAtjd�gSt|�S)Nr{rz-Rz--xmlrzutf-8zsvn info failed)rr2r�debugrW)r�r}rrrrr�Us
zSvn13Info.get_entriescCs�dddg}g}x�|j�D]�}t||gdd�\}}|dkrdtjd�gSxKt|�D]=}|r�tjj||�}n|jtjj	|��qqWq"W|S)Nr{�propgetz
svn:externalsrzutf-8rzsvn propget failed)
r�rrr�r[r1r2r$rQrX)r��cmd�result�folderr}rgr]rrrr�_s
!zSvn13Info.get_externalsN)r�r�r�r�r�rrrrr�Ts
r�c@seZdZdd�ZdS)r�cCsiddd|jddg}t|dd�\}}|rJtjd�gSt|d	tjj|j��S)
Nr{r�z
svn:externalsz-Rz--xmlrzutf-8zsvn propget failedr3)r2rrr�r^r1�abspath)r�r�r}rgrrrr�ss
zSvn15Info.get_externalsN)r�r�r�r�rrrrr�rsr�csaeZdZd�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z�S)r�rcs,tt|�j|�d|_d|_dS)N)�superr�r�Z_directories�	_revision)r�r2)�	__class__rrr�~s	zSvnFileInfo.__init__ccs�t|dd�}tjj|�r�tj|�}|d|j�fVx�|j�D]x}t|�}t||�}tjj|�r�|ddfVqTtjj	|�rTx|j
|�D]}|Vq�WqTqTWndS)Nz.svnrTFT)r5r1r2r��SVNEntriesFiler��parse_revision�get_undeleted_recordsr�isdir�	_walk_svn)r��base�
entry_filerTr2r�rrrr��szSvnFileInfo._walk_svncCs�t�}d}xa|j|j�D]M\}}}|rM|j|df�q"|j|df�t||�}q"W||_||_dS)Nrr�r�)rNr�r2rQ�maxr�r�)r�rT�revr2r�Zdir_revrrr�_build_entries�s	"	zSvnFileInfo._build_entriescCs#|jdkr|j�n|jS)N)r�r�)r�rrrr��s
zSvnFileInfo.get_entriescCs#|jdkr|j�n|jS)N)r�r�)r�rrrr��s
zSvnFileInfo.get_revisioncCs�ddgddgg}g}x�|j�D]�}d}x8|D]0}t||�}tjj|�r>|}q>q>W|dk	r+t|d�}t|dd�}|jt|��q+q+W|S)Nz.svnz
dir-prop-basez	dir-propsz
svn:externalsrzutf-8)	r�r5r1r2r�ryr�extendr[)r�Z
prop_filesr\r�Z	prop_fileZ	rel_partsrsZext_proprrrr��s	

zSvnFileInfo.get_externals)	r�r�r�r�r�r�r�r�r�rr)r�rr�|sr�ccsqtj|�}x|j�D]}|VqWx?|j�D]1}tj|�}x|j�D]}|VqZWq8WdS)N)rzr�r�r�)r�rr2Zsub_infoZsub_pathrrr�
svn_finder�s	r�c@sLeZdZdd�Zedd��Zedd��Zdd�Zd	S)
r�cCs
||_dS)N)r)r�rrrrr��szSVNEntriesFile.__init__c
CsItjj|dd�}t|�}ztj|�}Wd|j�X|S)Nz.svnrT)r1r2r$rmr�rprr)�class_r�rsrvr�rrrr��szSVNEntriesFile.loadcCs5|j�}|jd�}ttg|}||�S)Nz<?xml)rpr>�SVNEntriesFileText�SVNEntriesFileXML)r��fileobjrZis_xmlrrrrp�szSVNEntriesFile.readcCs|j�dg}t|�S)Nr)�parse_revision_numbersr�)r�Zall_revsrrrr��szSVNEntriesFile.parse_revisionN)r�r�r�r�r�r�rpr�rrrrr��s
r�c@sseZdZidd6dd6dd6Zdd�Zd	d
�Zdd�Zd
d�Zdd�Zdd�Z	dS)r��z1.4.x�	z1.5.x�
z1.6.xcCs|jS)N)�sections)r�rrrZ__get_cached_sections�sz(SVNEntriesFileText.__get_cached_sectionscCs�d}|jj|�}dd�ttj|�D�}yEt|djd��}||jj�kr{t	j
d|�nWntk
r�dSYnX||_|j
|_|jS)Nz
cSsg|]}|�qSrr)r r_rrrr"�s	z3SVNEntriesFileText.get_sections.<locals>.<listcomp>rzUnknown subversion verson %d)rrd�map�strrarq�pop�known_svn_versions�valuesrr�r�r��(_SVNEntriesFileText__get_cached_sections�get_sections)r�ZSECTION_DIVIDERr�r�rrrr��s
		zSVNEntriesFileText.get_sectionscCst|j��S)N)�boolr�)r�rrr�is_valid�szSVNEntriesFileText.is_validcCs|j�ddS)Nr�)r�)r�rrr�get_urlszSVNEntriesFileText.get_urlcs)d��fdd�|j�D�}|S)Nr�cs<g|]2}t|��kr|�rt|���qSr)rZrq)r �section)�revision_line_numberrrr"s	z=SVNEntriesFileText.parse_revision_numbers.<locals>.<listcomp>)r�)r�Zrev_numbersr)r�rr�sz)SVNEntriesFileText.parse_revision_numberscs/dd���fdd�|j�D�}|S)NcSs0|o/|do/t|�dkp/|ddkS)Nr�r�rH)rZ)�srrr�<lambda>sz:SVNEntriesFileText.get_undeleted_records.<locals>.<lambda>cs&g|]}�|�r|d�qS)rr)r r�)�	undeletedrrr"s	z<SVNEntriesFileText.get_undeleted_records.<locals>.<listcomp>)r�)r�r�r)r�rr�sz(SVNEntriesFileText.get_undeleted_recordsN)
r�r�r�r�r�r�r�r�r�r�rrrrr��s

r�c@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
r�cCsdS)NTr)r�rrrr�szSVNEntriesFileXML.is_validcCs(tjd�}|j|j�jd�S)zGet repository URLz
url="([^"]+)"r)r�r��searchrr�)r�Zurlrerrrr�szSVNEntriesFileXML.get_urlcCs,tjd�}dd�|j|j�D�S)Nzcommitted-rev="(\d+)"cSs%g|]}t|jd���qS)r)rqr�)r �mrrrr"$s	z<SVNEntriesFileXML.parse_revision_numbers.<locals>.<listcomp>)r�r��finditerr)r�Zrevrerrrr�!s	z(SVNEntriesFileXML.parse_revision_numberscCs8tjdtj�}dd�|j|j�D�}|S)Nz%name="([^"]+)"(?![^>]+deleted="true")cSs%g|]}t|jd���qS)r)rr�)r r�rrrr",s	z;SVNEntriesFileXML.get_undeleted_records.<locals>.<listcomp>)r�r�r�r�r)r�Zentries_pattern�resultsrrrr�(s	z'SVNEntriesFileXML.get_undeleted_recordsN)r�r�r�r�r�r�r�rrrrr�sr��__main__r)2r1r�r�	distutilsrZxml.dom.pulldomrJrcr7r:rDr�Zsetuptools.compatr�xml.sax.saxutilsrre�ImportError�urllib.parse�parse�
subprocessrr
rZ_PIPErr'r*r/r5r@rArrWr^r[ry�objectrzr�r�r�r�r�r�r�r��argv�name�printrrrr�<module>sN
		$t
B
3python3.4/site-packages/setuptools/__pycache__/site-patch.cpython-34.pyc000064400000003225151735050020022150 0ustar00�
M�Rer	�@s)dd�Zedkr%e�[ndS)cCs�ddl}ddl}ddl}|jjd�}|dksX|jdkra|rag}n|j|j�}t|di�}|j	t
|�d�}|j	jt�}x�|D]�}||ks�|r�q�n|j|�}|dk	r |j
d�}|dk	r�|jd�Pq�q�y.ddl}	|	j
d|g�\}
}}Wntk
rew�YnX|
dkrxq�nz|	jd|
||�Wd|
j�XPq�Wtd��tdd�|j	D��}
t|d	d�}d|_x|D]}t|�q�W|j|7_t|d�\}}d}g}x�|j	D]�}t|�\}}||kr}|dkr}t
|�}n||
ks�|dkr�|j|�q>|j||�|d
7}q>W||j	dd�<dS)N��
PYTHONPATH�win32�path_importer_cache�sitez$Couldn't find the real 'site' modulecSs&g|]}t|�ddf�qS)�)�makepath)�.0�item�r
�0/tmp/pip-l4uy7dan-build/setuptools/site-patch.py�
<listcomp>+s	z__boot.<locals>.<listcomp>�__egginsertr)�sys�os�os.path�environ�get�platform�split�pathsep�getattr�path�len�dirname�__file__�find_module�load_module�imp�ImportError�close�dictr
�
addsitedirr�append�insert)rrrZpicZstdpathZmydirr	�importer�loaderr�streamr�descr�known_paths�oldpos�dZndZ	insert_at�new_path�p�npr
r
r�__boots^$"	

"
	
r.rN)r.�__name__r
r
r
r�<module>sHpython3.4/site-packages/setuptools/__pycache__/depends.cpython-34.pyc000064400000013401151735050020021526 0ustar00�
M�ReM�@sddlmZddlZddlZddlZddlmZmZmZmZddl	m
Z
mZddddgZGd	d�d�Z
d
d�Zddd�Zdddd�Zddd�Zejjd�s�ejdkr[[ejd�ejd�ndS)�)�
generatorsN)�
PKG_DIRECTORY�PY_COMPILED�	PY_SOURCE�	PY_FROZEN)�
StrictVersion�LooseVersion�Require�find_module�get_module_constant�extract_constantc@sseZdZdZddddd�Zdd�Zdd	�Zdd
dd�Zdd
d�Zddd�Z	dS)r	z7A prerequisite to building or installing a distribution�NcCsn|dkr!|dk	r!t}n|dk	rQ||�}|dkrQd}qQn|jjt��|`dS)N�__version__)r�__dict__�update�locals�self)r�name�requested_version�moduleZhomepage�	attribute�format�r�-/tmp/pip-l4uy7dan-build/setuptools/depends.py�__init__
s	zRequire.__init__cCs*|jdk	r#d|j|jfS|jS)z0Return full package/distribution name, w/versionNz%s-%s)rr)rrrr�	full_nameszRequire.full_namecCs=|jdkp<|jdkp<t|�dko<||jkS)z%Is 'version' sufficiently up-to-date?N�unknown)rr�strr)r�versionrrr�
version_ok$szRequire.version_okrc
Cs�|jdkray6t|j|�\}}}|r@|j�n|SWqatk
r]dSYqaXnt|j|j||�}|dk	r�||k	r�|jdk	r�|j|�S|S)a�Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        N)rr
r�close�ImportErrorrr)r�paths�default�f�p�i�vrrr�get_version*s

'
zRequire.get_versioncCs|j|�dk	S)z/Return true if dependency is present on 'paths'N)r()rr"rrr�
is_presentFszRequire.is_presentcCs,|j|�}|dkrdS|j|�S)z>Return true if dependency is present and up-to-date on 'paths'NF)r(r)rr"rrrr�
is_currentKszRequire.is_current)
�__name__�
__module__�__qualname__�__doc__rrrr(r)r*rrrrr	
sc
cs�ddlm}ddlm}m}|d|j�}t|j�}d}d}x�||kr�||}||kr�||d||dd|}	|d7}||kr�|	td	�}qVq�nd
}	|d7}||	fVqVWd
S)z>Yield '(op,arg)' pair for each operation in code object 'code'r)�array)�
HAVE_ARGUMENT�EXTENDED_ARG�b����iN)r/Zdisr0r1�co_code�lenZ	long_type)
�coder/r0r1�bytes�eof�ptrZextended_arg�op�argrrr�
_iter_codeSs"
"
	
r?c
Cs�|jd�}x�|r�|jd�}tj||�\}}\}}}}	|tkrv|pgdg}|g}q|rtd||f��qqW|	S)z7Just like 'imp.find_module()', but with package support�.rrzCan't find %r in %s)�split�pop�impr
rr!)
rr"�parts�partr$�path�suffix�mode�kind�inforrrr
|s	(r3c
Cs!y%t||�\}}\}}}Wntk
r=dSYnXz�|tkrl|jd�tj|�}	n�|tkr�tj|�}	no|t	kr�t
|j�|d�}	nH|tjkr�tj
||||||f�nttj||d�SWd|r|j�nXt|	||�S)z�Find 'module' by searching 'paths', and extract 'symbol'

    Return 'None' if 'module' does not exist on 'paths', or it does not define
    'symbol'.  If the module defines 'symbol' as a constant, return the
    constant.  Otherwise, return 'default'.N��exec)r
r!r�read�marshal�loadrrC�get_frozen_objectr�compile�sys�modules�load_module�getattrr r)
r�symbolr#r"r$rFrGrHrIr9rrrr�s$%
	
"c
Cs�||jkrdSt|j�j|�}d}d}d}|}xdt|�D]V\}}	||krx|j|	}qP|	|kr�||ks�||kr�|S|}qPWdS)aExtract the constant value of 'symbol' from 'code'

    If the name 'symbol' is bound to a constant value by the Python code
    object 'code', return that value.  If 'symbol' is bound to an expression,
    return 'default'.  Otherwise, return 'None'.

    Return value is based on the first assignment to 'symbol'.  'symbol' must
    be a global, or at least a non-"fast" local in the code block.  That is,
    only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
    must be present in 'code.co_names'.
    N�Z�a�d)�co_names�list�indexr?�	co_consts)
r9rVr#Zname_idxZ
STORE_NAMEZSTORE_GLOBALZ
LOAD_CONST�constr=r>rrrr�s
$�java�cli���ra)�
__future__rrRrCrNrrrr�distutils.versionrr�__all__r	r?r
rr�platform�
startswith�removerrrr�<module>s$"I)))"!
python3.4/site-packages/setuptools/__pycache__/extension.cpython-34.pyc000064400000003604151735050020022124 0ustar00�
M�Re|�@s�ddlZddlZddlZddlmZeejj�Zdd�Z	Gdd�de�ZGdd�de�Z
eej_eej_d	ejkr�eejd	_ndS)
�N)�_get_unpatchedcCsNd}xA|D]9}yt|ddg�jdSWq
tk
rEYq
Xq
WdS)z9
    Return True if Cython or Pyrex can be imported.
    �Cython.Distutils.build_ext�Pyrex.Distutils.build_ext�fromlist�	build_extTF)rr)�
__import__r�	Exception)Zpyrex_implsZ
pyrex_impl�r	�//tmp/pip-l4uy7dan-build/setuptools/extension.py�
have_pyrex	s

	rc@s.eZdZdZdd�Zdd�ZdS)�	Extensionz7Extension that uses '.c' files in place of '.pyx' filescOs-tj|||�t�s)|j�ndS)N)�
_Extension�__init__r�_convert_pyx_sources_to_c)�self�args�kwr	r	r
rs	zExtension.__init__cCs+dd�}tt||j��|_dS)zconvert .pyx extensions to .ccSs*|jd�r&|dd�d}n|S)Nz.pyx�z.c���)�endswith)�sourcer	r	r
�pyx_to_c"sz5Extension._convert_pyx_sources_to_c.<locals>.pyx_to_cN)�list�map�sources)rrr	r	r
r sz#Extension._convert_pyx_sources_to_cN)�__name__�
__module__�__qualname__�__doc__rrr	r	r	r
rsrc@seZdZdZdS)�Libraryz=Just like a regular Extension, but built as a library insteadN)rrrrr	r	r	r
r(srzdistutils.command.build_ext)
�sys�distutils.core�	distutils�distutils.extensionZsetuptools.distr�corerr
rr�	extension�modulesr	r	r	r
�<module>spython3.4/site-packages/setuptools/ssl_support.py000064400000016757151735050020016240 0ustar00import os
import socket
import atexit
import re

import pkg_resources
from pkg_resources import ResolutionError, ExtractionError
from setuptools.compat import urllib2

try:
    import ssl
except ImportError:
    ssl = None

__all__ = [
    'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_available', 'cert_paths',
    'opener_for'
]

cert_paths = """
/etc/pki/tls/certs/ca-bundle.crt
/etc/ssl/certs/ca-certificates.crt
/usr/share/ssl/certs/ca-bundle.crt
/usr/local/share/certs/ca-root.crt
/etc/ssl/cert.pem
/System/Library/OpenSSL/certs/cert.pem
""".strip().split()


HTTPSHandler = HTTPSConnection = object

for what, where in (
    ('HTTPSHandler', ['urllib2','urllib.request']),
    ('HTTPSConnection', ['httplib', 'http.client']),
):
    for module in where:
        try:
            exec("from %s import %s" % (module, what))
        except ImportError:
            pass

is_available = ssl is not None and object not in (HTTPSHandler, HTTPSConnection)


try:
    from ssl import CertificateError, match_hostname
except ImportError:
    try:
        from backports.ssl_match_hostname import CertificateError
        from backports.ssl_match_hostname import match_hostname
    except ImportError:
        CertificateError = None
        match_hostname = None

if not CertificateError:
    class CertificateError(ValueError):
        pass

if not match_hostname:
    def _dnsname_match(dn, hostname, max_wildcards=1):
        """Matching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        """
        pats = []
        if not dn:
            return False

        # Ported from python3-syntax:
        # leftmost, *remainder = dn.split(r'.')
        parts = dn.split(r'.')
        leftmost = parts[0]
        remainder = parts[1:]

        wildcards = leftmost.count('*')
        if wildcards > max_wildcards:
            # Issue #17980: avoid denials of service by refusing more
            # than one wildcard per fragment.  A survey of established
            # policy among SSL implementations showed it to be a
            # reasonable choice.
            raise CertificateError(
                "too many wildcards in certificate DNS name: " + repr(dn))

        # speed up common case w/o wildcards
        if not wildcards:
            return dn.lower() == hostname.lower()

        # RFC 6125, section 6.4.3, subitem 1.
        # The client SHOULD NOT attempt to match a presented identifier in which
        # the wildcard character comprises a label other than the left-most label.
        if leftmost == '*':
            # When '*' is a fragment by itself, it matches a non-empty dotless
            # fragment.
            pats.append('[^.]+')
        elif leftmost.startswith('xn--') or hostname.startswith('xn--'):
            # RFC 6125, section 6.4.3, subitem 3.
            # The client SHOULD NOT attempt to match a presented identifier
            # where the wildcard character is embedded within an A-label or
            # U-label of an internationalized domain name.
            pats.append(re.escape(leftmost))
        else:
            # Otherwise, '*' matches any dotless string, e.g. www*
            pats.append(re.escape(leftmost).replace(r'\*', '[^.]*'))

        # add the remaining fragments, ignore any wildcards
        for frag in remainder:
            pats.append(re.escape(frag))

        pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)
        return pat.match(hostname)

    def match_hostname(cert, hostname):
        """Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
        rules are followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        """
        if not cert:
            raise ValueError("empty or no certificate")
        dnsnames = []
        san = cert.get('subjectAltName', ())
        for key, value in san:
            if key == 'DNS':
                if _dnsname_match(value, hostname):
                    return
                dnsnames.append(value)
        if not dnsnames:
            # The subject is only checked when there is no dNSName entry
            # in subjectAltName
            for sub in cert.get('subject', ()):
                for key, value in sub:
                    # XXX according to RFC 2818, the most specific Common Name
                    # must be used.
                    if key == 'commonName':
                        if _dnsname_match(value, hostname):
                            return
                        dnsnames.append(value)
        if len(dnsnames) > 1:
            raise CertificateError("hostname %r "
                "doesn't match either of %s"
                % (hostname, ', '.join(map(repr, dnsnames))))
        elif len(dnsnames) == 1:
            raise CertificateError("hostname %r "
                "doesn't match %r"
                % (hostname, dnsnames[0]))
        else:
            raise CertificateError("no appropriate commonName or "
                "subjectAltName fields were found")


class VerifyingHTTPSHandler(HTTPSHandler):
    """Simple verifying handler: no auth, subclasses, timeouts, etc."""

    def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)

    def https_open(self, req):
        return self.do_open(
            lambda host, **kw: VerifyingHTTPSConn(host, self.ca_bundle, **kw), req
        )


class VerifyingHTTPSConn(HTTPSConnection):
    """Simple verifying connection: no auth, subclasses, timeouts, etc."""
    def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle

    def connect(self):
        sock = socket.create_connection(
            (self.host, self.port), getattr(self, 'source_address', None)
        )

        # Handle the socket if a (proxy) tunnel is present
        if hasattr(self, '_tunnel') and getattr(self, '_tunnel_host', None):
            self.sock = sock
            self._tunnel()

        self.sock = ssl.wrap_socket(
            sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle
        )
        try:
            match_hostname(self.sock.getpeercert(), self.host)
        except CertificateError:
            self.sock.shutdown(socket.SHUT_RDWR)
            self.sock.close()
            raise

def opener_for(ca_bundle=None):
    """Get a urlopen() replacement that uses ca_bundle for verification"""
    return urllib2.build_opener(
        VerifyingHTTPSHandler(ca_bundle or find_ca_bundle())
    ).open


_wincerts = None

def get_win_certfile():
    global _wincerts
    if _wincerts is not None:
        return _wincerts.name

    try:
        from wincertstore import CertFile
    except ImportError:
        return None

    class MyCertFile(CertFile):
        def __init__(self, stores=(), certs=()):
            CertFile.__init__(self)
            for store in stores:
                self.addstore(store)
            self.addcerts(certs)
            atexit.register(self.close)

    _wincerts = MyCertFile(stores=['CA', 'ROOT'])
    return _wincerts.name


def find_ca_bundle():
    """Return an existing CA bundle path, or None"""
    if os.name=='nt':
        return get_win_certfile()
    else:
        for cert_path in cert_paths:
            if os.path.isfile(cert_path):
                return cert_path
    try:
        return pkg_resources.resource_filename('certifi', 'cacert.pem')
    except (ImportError, ResolutionError, ExtractionError):
        return None
python3.4/site-packages/setuptools/svn_utils.py000064400000042670151735050020015662 0ustar00import os
import re
import sys
from distutils import log
import xml.dom.pulldom
import shlex
import locale
import codecs
import unicodedata
import warnings
from setuptools.compat import unicode
from xml.sax.saxutils import unescape

try:
    import urlparse
except ImportError:
    import urllib.parse as urlparse

from subprocess import Popen as _Popen, PIPE as _PIPE

#NOTE: Use of the command line options require SVN 1.3 or newer (December 2005)
#      and SVN 1.3 hasn't been supported by the developers since mid 2008.

#subprocess is called several times with shell=(sys.platform=='win32')
#see the follow for more information:
#       http://bugs.python.org/issue8557
#       http://stackoverflow.com/questions/5658622/
#              python-subprocess-popen-environment-path


def _run_command(args, stdout=_PIPE, stderr=_PIPE, encoding=None, stream=0):
    #regarding the shell argument, see: http://bugs.python.org/issue8557
    try:
        proc = _Popen(args, stdout=stdout, stderr=stderr,
                      shell=(sys.platform == 'win32'))

        data = proc.communicate()[stream]
    except OSError:
        return 1, ''

    #doubled checked and
    data = decode_as_string(data, encoding)

    #communciate calls wait()
    return proc.returncode, data


def _get_entry_schedule(entry):
    schedule = entry.getElementsByTagName('schedule')[0]
    return "".join([t.nodeValue
                    for t in schedule.childNodes
                    if t.nodeType == t.TEXT_NODE])


def _get_target_property(target):
    property_text = target.getElementsByTagName('property')[0]
    return "".join([t.nodeValue
                    for t in property_text.childNodes
                    if t.nodeType == t.TEXT_NODE])


def _get_xml_data(decoded_str):
    if sys.version_info < (3, 0):
        #old versions want an encoded string
        data = decoded_str.encode('utf-8')
    else:
        data = decoded_str
    return data


def joinpath(prefix, *suffix):
    if not prefix or prefix == '.':
        return os.path.join(*suffix)
    return os.path.join(prefix, *suffix)

def determine_console_encoding():
    try:
        #try for the preferred encoding
        encoding = locale.getpreferredencoding()

        #see if the locale.getdefaultlocale returns null
        #some versions of python\platforms return US-ASCII
        #when it cannot determine an encoding
        if not encoding or encoding == "US-ASCII":
            encoding = locale.getdefaultlocale()[1]

        if encoding:
            codecs.lookup(encoding)  # make sure a lookup error is not made

    except (locale.Error, LookupError):
        encoding = None

    is_osx = sys.platform == "darwin"
    if not encoding:
        return ["US-ASCII", "utf-8"][is_osx]
    elif encoding.startswith("mac-") and is_osx:
        #certain versions of python would return mac-roman as default
        #OSX as a left over of earlier mac versions.
        return "utf-8"
    else:
        return encoding

_console_encoding = determine_console_encoding()

def decode_as_string(text, encoding=None):
    """
    Decode the console or file output explicitly using getpreferredencoding.
    The text paraemeter should be a encoded string, if not no decode occurs
    If no encoding is given, getpreferredencoding is used.  If encoding is
    specified, that is used instead.  This would be needed for SVN --xml
    output.  Unicode is explicitly put in composed NFC form.

    --xml should be UTF-8 (SVN Issue 2938) the discussion on the Subversion
    DEV List from 2007 seems to indicate the same.
    """
    #text should be a byte string

    if encoding is None:
        encoding = _console_encoding

    if not isinstance(text, unicode):
        text = text.decode(encoding)

    text = unicodedata.normalize('NFC', text)

    return text


def parse_dir_entries(decoded_str):
    '''Parse the entries from a recursive info xml'''
    doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str))
    entries = list()

    for event, node in doc:
        if event == 'START_ELEMENT' and node.nodeName == 'entry':
            doc.expandNode(node)
            if not _get_entry_schedule(node).startswith('delete'):
                entries.append((node.getAttribute('path'),
                                node.getAttribute('kind')))

    return entries[1:]  # do not want the root directory


def parse_externals_xml(decoded_str, prefix=''):
    '''Parse a propget svn:externals xml'''
    prefix = os.path.normpath(prefix)
    prefix = os.path.normcase(prefix)

    doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str))
    externals = list()

    for event, node in doc:
        if event == 'START_ELEMENT' and node.nodeName == 'target':
            doc.expandNode(node)
            path = os.path.normpath(node.getAttribute('path'))

            if os.path.normcase(path).startswith(prefix):
                path = path[len(prefix)+1:]

            data = _get_target_property(node)
            #data should be decoded already
            for external in parse_external_prop(data):
                externals.append(joinpath(path, external))

    return externals  # do not want the root directory


def parse_external_prop(lines):
    """
    Parse the value of a retrieved svn:externals entry.

    possible token setups (with quotng and backscaping in laters versions)
        URL[@#] EXT_FOLDERNAME
        [-r#] URL EXT_FOLDERNAME
        EXT_FOLDERNAME [-r#] URL
    """
    externals = []
    for line in lines.splitlines():
        line = line.lstrip()  # there might be a "\ "
        if not line:
            continue

        if sys.version_info < (3, 0):
            #shlex handles NULLs just fine and shlex in 2.7 tries to encode
            #as ascii automatiically
            line = line.encode('utf-8')
        line = shlex.split(line)
        if sys.version_info < (3, 0):
            line = [x.decode('utf-8') for x in line]

        #EXT_FOLDERNAME is either the first or last depending on where
        #the URL falls
        if urlparse.urlsplit(line[-1])[0]:
            external = line[0]
        else:
            external = line[-1]

        external = decode_as_string(external, encoding="utf-8")
        externals.append(os.path.normpath(external))

    return externals


def parse_prop_file(filename, key):
    found = False
    f = open(filename, 'rt')
    data = ''
    try:
        for line in iter(f.readline, ''):    # can't use direct iter!
            parts = line.split()
            if len(parts) == 2:
                kind, length = parts
                data = f.read(int(length))
                if kind == 'K' and data == key:
                    found = True
                elif kind == 'V' and found:
                    break
    finally:
        f.close()

    return data


class SvnInfo(object):
    '''
    Generic svn_info object.  No has little knowledge of how to extract
    information.  Use cls.load to instatiate according svn version.

    Paths are not filesystem encoded.
    '''

    @staticmethod
    def get_svn_version():
        code, data = _run_command(['svn', '--version', '--quiet'])
        if code == 0 and data:
            return data.strip()
        else:
            return ''

    #svnversion return values (previous implementations return max revision)
    #   4123:4168     mixed revision working copy
    #   4168M         modified working copy
    #   4123S         switched working copy
    #   4123:4168MS   mixed revision, modified, switched working copy
    revision_re = re.compile(r'(?:([\-0-9]+):)?(\d+)([a-z]*)\s*$', re.I)

    @classmethod
    def load(cls, dirname=''):
        normdir = os.path.normpath(dirname)
        code, data = _run_command(['svn', 'info', normdir])
        # Must check for some contents, as some use empty directories
        # in testcases
        svn_dir = os.path.join(normdir, '.svn')
        has_svn = (os.path.isfile(os.path.join(svn_dir, 'entries')) or
                   os.path.isfile(os.path.join(svn_dir, 'dir-props')) or
                   os.path.isfile(os.path.join(svn_dir, 'dir-prop-base')))

        svn_version = tuple(cls.get_svn_version().split('.'))

        try:
            base_svn_version = tuple(int(x) for x in svn_version[:2])
        except ValueError:
            base_svn_version = tuple()

        if not has_svn:
            return SvnInfo(dirname)

        if code or not base_svn_version or base_svn_version < (1, 3):
            warnings.warn(("No SVN 1.3+ command found: falling back "
                           "on pre 1.7 .svn parsing"), DeprecationWarning)
            return SvnFileInfo(dirname)

        if base_svn_version < (1, 5):
            return Svn13Info(dirname)

        return Svn15Info(dirname)

    def __init__(self, path=''):
        self.path = path
        self._entries = None
        self._externals = None

    def get_revision(self):
        'Retrieve the directory revision informatino using svnversion'
        code, data = _run_command(['svnversion', '-c', self.path])
        if code:
            log.warn("svnversion failed")
            return 0

        parsed = self.revision_re.match(data)
        if parsed:
            return int(parsed.group(2))
        else:
            return 0

    @property
    def entries(self):
        if self._entries is None:
            self._entries = self.get_entries()
        return self._entries

    @property
    def externals(self):
        if self._externals is None:
            self._externals = self.get_externals()
        return self._externals

    def iter_externals(self):
        '''
        Iterate over the svn:external references in the repository path.
        '''
        for item in self.externals:
            yield item

    def iter_files(self):
        '''
        Iterate over the non-deleted file entries in the repository path
        '''
        for item, kind in self.entries:
            if kind.lower() == 'file':
                yield item

    def iter_dirs(self, include_root=True):
        '''
        Iterate over the non-deleted file entries in the repository path
        '''
        if include_root:
            yield self.path
        for item, kind in self.entries:
            if kind.lower() == 'dir':
                yield item

    def get_entries(self):
        return []

    def get_externals(self):
        return []


class Svn13Info(SvnInfo):
    def get_entries(self):
        code, data = _run_command(['svn', 'info', '-R', '--xml', self.path],
                                  encoding="utf-8")

        if code:
            log.debug("svn info failed")
            return []

        return parse_dir_entries(data)

    def get_externals(self):
        #Previous to 1.5 --xml was not supported for svn propget and the -R
        #output format breaks the shlex compatible semantics.
        cmd = ['svn', 'propget', 'svn:externals']
        result = []
        for folder in self.iter_dirs():
            code, lines = _run_command(cmd + [folder], encoding="utf-8")
            if code != 0:
                log.warn("svn propget failed")
                return []
            #lines should a str
            for external in parse_external_prop(lines):
                if folder:
                    external = os.path.join(folder, external)
                result.append(os.path.normpath(external))

        return result


class Svn15Info(Svn13Info):
    def get_externals(self):
        cmd = ['svn', 'propget', 'svn:externals', self.path, '-R', '--xml']
        code, lines = _run_command(cmd, encoding="utf-8")
        if code:
            log.debug("svn propget failed")
            return []
        return parse_externals_xml(lines, prefix=os.path.abspath(self.path))


class SvnFileInfo(SvnInfo):

    def __init__(self, path=''):
        super(SvnFileInfo, self).__init__(path)
        self._directories = None
        self._revision = None

    def _walk_svn(self, base):
        entry_file = joinpath(base, '.svn', 'entries')
        if os.path.isfile(entry_file):
            entries = SVNEntriesFile.load(base)
            yield (base, False, entries.parse_revision())
            for path in entries.get_undeleted_records():
                path = decode_as_string(path)
                path = joinpath(base, path)
                if os.path.isfile(path):
                    yield (path, True, None)
                elif os.path.isdir(path):
                    for item in self._walk_svn(path):
                        yield item

    def _build_entries(self):
        entries = list()

        rev = 0
        for path, isfile, dir_rev in self._walk_svn(self.path):
            if isfile:
                entries.append((path, 'file'))
            else:
                entries.append((path, 'dir'))
                rev = max(rev, dir_rev)

        self._entries = entries
        self._revision = rev

    def get_entries(self):
        if self._entries is None:
            self._build_entries()
        return self._entries

    def get_revision(self):
        if self._revision is None:
            self._build_entries()
        return self._revision

    def get_externals(self):
        prop_files = [['.svn', 'dir-prop-base'],
                      ['.svn', 'dir-props']]
        externals = []

        for dirname in self.iter_dirs():
            prop_file = None
            for rel_parts in prop_files:
                filename = joinpath(dirname, *rel_parts)
                if os.path.isfile(filename):
                    prop_file = filename

            if prop_file is not None:
                ext_prop = parse_prop_file(prop_file, 'svn:externals')
                #ext_prop should be utf-8 coming from svn:externals
                ext_prop = decode_as_string(ext_prop, encoding="utf-8")
                externals.extend(parse_external_prop(ext_prop))

        return externals


def svn_finder(dirname=''):
    #combined externals due to common interface
    #combined externals and entries due to lack of dir_props in 1.7
    info = SvnInfo.load(dirname)
    for path in info.iter_files():
        yield path

    for path in info.iter_externals():
        sub_info = SvnInfo.load(path)
        for sub_path in sub_info.iter_files():
            yield sub_path


class SVNEntriesFile(object):
    def __init__(self, data):
        self.data = data

    @classmethod
    def load(class_, base):
        filename = os.path.join(base, '.svn', 'entries')
        f = open(filename)
        try:
            result = SVNEntriesFile.read(f)
        finally:
            f.close()
        return result

    @classmethod
    def read(class_, fileobj):
        data = fileobj.read()
        is_xml = data.startswith('<?xml')
        class_ = [SVNEntriesFileText, SVNEntriesFileXML][is_xml]
        return class_(data)

    def parse_revision(self):
        all_revs = self.parse_revision_numbers() + [0]
        return max(all_revs)


class SVNEntriesFileText(SVNEntriesFile):
    known_svn_versions = {
        '1.4.x': 8,
        '1.5.x': 9,
        '1.6.x': 10,
    }

    def __get_cached_sections(self):
        return self.sections

    def get_sections(self):
        SECTION_DIVIDER = '\f\n'
        sections = self.data.split(SECTION_DIVIDER)
        sections = [x for x in map(str.splitlines, sections)]
        try:
            # remove the SVN version number from the first line
            svn_version = int(sections[0].pop(0))
            if not svn_version in self.known_svn_versions.values():
                log.warn("Unknown subversion verson %d", svn_version)
        except ValueError:
            return
        self.sections = sections
        self.get_sections = self.__get_cached_sections
        return self.sections

    def is_valid(self):
        return bool(self.get_sections())

    def get_url(self):
        return self.get_sections()[0][4]

    def parse_revision_numbers(self):
        revision_line_number = 9
        rev_numbers = [
            int(section[revision_line_number])
            for section in self.get_sections()
            if (len(section) > revision_line_number
                and section[revision_line_number])
        ]
        return rev_numbers

    def get_undeleted_records(self):
        undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete')
        result = [
            section[0]
            for section in self.get_sections()
            if undeleted(section)
        ]
        return result


class SVNEntriesFileXML(SVNEntriesFile):
    def is_valid(self):
        return True

    def get_url(self):
        "Get repository URL"
        urlre = re.compile('url="([^"]+)"')
        return urlre.search(self.data).group(1)

    def parse_revision_numbers(self):
        revre = re.compile(r'committed-rev="(\d+)"')
        return [
            int(m.group(1))
            for m in revre.finditer(self.data)
        ]

    def get_undeleted_records(self):
        entries_pattern = \
            re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', re.I)
        results = [
            unescape(match.group(1))
            for match in entries_pattern.finditer(self.data)
        ]
        return results


if __name__ == '__main__':
    for name in svn_finder(sys.argv[1]):
        print(name)
python3.4/site-packages/setuptools/archive_util.py000064400000014711151735050020016305 0ustar00"""Utilities for extracting common archive formats"""


__all__ = [
    "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter",
    "UnrecognizedFormat", "extraction_drivers", "unpack_directory",
]

import zipfile, tarfile, os, shutil, posixpath
from pkg_resources import ensure_directory
from distutils.errors import DistutilsError

class UnrecognizedFormat(DistutilsError):
    """Couldn't recognize the archive type"""

def default_filter(src,dst):
    """The default progress/filter callback; returns True for all files"""   
    return dst























def unpack_archive(filename, extract_dir, progress_filter=default_filter,
    drivers=None
):
    """Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

    `progress_filter` is a function taking two arguments: a source path
    internal to the archive ('/'-separated), and a filesystem path where it
    will be extracted.  The callback must return the desired extract path
    (which may be the same as the one passed in), or else ``None`` to skip
    that file or directory.  The callback can thus be used to report on the
    progress of the extraction, as well as to filter the items extracted or
    alter their extraction paths.

    `drivers`, if supplied, must be a non-empty sequence of functions with the
    same signature as this function (minus the `drivers` argument), that raise
    ``UnrecognizedFormat`` if they do not support extracting the designated
    archive type.  The `drivers` are tried in sequence until one is found that
    does not raise an error, or until all are exhausted (in which case
    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
    drivers, the module's ``extraction_drivers`` constant will be used, which
    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
    order.
    """
    for driver in drivers or extraction_drivers:
        try:
            driver(filename, extract_dir, progress_filter)
        except UnrecognizedFormat:
            continue
        else:
            return
    else:
        raise UnrecognizedFormat(
            "Not a recognized archive type: %s" % filename
        )







def unpack_directory(filename, extract_dir, progress_filter=default_filter):
    """"Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    """
    if not os.path.isdir(filename):
        raise UnrecognizedFormat("%s is not a directory" % (filename,))

    paths = {filename:('',extract_dir)}
    for base, dirs, files in os.walk(filename):
        src,dst = paths[base]
        for d in dirs:
            paths[os.path.join(base,d)] = src+d+'/', os.path.join(dst,d)
        for f in files:
            name = src+f
            target = os.path.join(dst,f)
            target = progress_filter(src+f, target)
            if not target:
                continue    # skip non-files
            ensure_directory(target)
            f = os.path.join(base,f)
            shutil.copyfile(f, target)
            shutil.copystat(f, target)


















def unpack_zipfile(filename, extract_dir, progress_filter=default_filter):
    """Unpack zip `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    """

    if not zipfile.is_zipfile(filename):
        raise UnrecognizedFormat("%s is not a zip file" % (filename,))

    z = zipfile.ZipFile(filename)
    try:
        for info in z.infolist():
            name = info.filename

            # don't extract absolute paths or ones with .. in them
            if name.startswith('/') or '..' in name.split('/'):
                continue

            target = os.path.join(extract_dir, *name.split('/'))
            target = progress_filter(name, target)
            if not target:
                continue
            if name.endswith('/'):
                # directory
                ensure_directory(target)
            else:
                # file
                ensure_directory(target)
                data = z.read(info.filename)
                f = open(target,'wb')
                try:
                    f.write(data)
                finally:
                    f.close()
                    del data
            unix_attributes = info.external_attr >> 16
            if unix_attributes:
                os.chmod(target, unix_attributes)
    finally:
        z.close()


def unpack_tarfile(filename, extract_dir, progress_filter=default_filter):
    """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    """
    try:
        tarobj = tarfile.open(filename)
    except tarfile.TarError:
        raise UnrecognizedFormat(
            "%s is not a compressed or uncompressed tar file" % (filename,)
        )
    try:
        tarobj.chown = lambda *args: None   # don't do any chowning!
        for member in tarobj:
            name = member.name
            # don't extract absolute paths or ones with .. in them
            if not name.startswith('/') and '..' not in name.split('/'):
                prelim_dst = os.path.join(extract_dir, *name.split('/'))

                # resolve any links and to extract the link targets as normal files
                while member is not None and (member.islnk() or member.issym()):
                    linkpath = member.linkname
                    if member.issym():
                        linkpath = posixpath.join(posixpath.dirname(member.name), linkpath)
                        linkpath = posixpath.normpath(linkpath)
                    member = tarobj._getmember(linkpath)

                if member is not None and (member.isfile() or member.isdir()):
                    final_dst = progress_filter(name, prelim_dst)
                    if final_dst:
                        if final_dst.endswith(os.sep):
                            final_dst = final_dst[:-1]
                        try:
                            tarobj._extract_member(member, final_dst)  # XXX Ugh
                        except tarfile.ExtractError:
                            pass    # chown/chmod/mkfifo/mknode/makedev failed
        return True
    finally:
        tarobj.close()

extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile
python3.4/site-packages/setuptools/sandbox.py000064400000023412151735050020015263 0ustar00import os
import sys
import tempfile
import operator
import functools
import itertools
import re

import pkg_resources

if os.name == "java":
    import org.python.modules.posix.PosixModule as _os
else:
    _os = sys.modules[os.name]
try:
    _file = file
except NameError:
    _file = None
_open = open
from distutils.errors import DistutilsError
from pkg_resources import working_set

from setuptools.compat import builtins, execfile

__all__ = [
    "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup",
]

def run_setup(setup_script, args):
    """Run a distutils setup script, sandboxed in its directory"""
    old_dir = os.getcwd()
    save_argv = sys.argv[:]
    save_path = sys.path[:]
    setup_dir = os.path.abspath(os.path.dirname(setup_script))
    temp_dir = os.path.join(setup_dir,'temp')
    if not os.path.isdir(temp_dir): os.makedirs(temp_dir)
    save_tmp = tempfile.tempdir
    save_modules = sys.modules.copy()
    pr_state = pkg_resources.__getstate__()
    try:
        tempfile.tempdir = temp_dir
        os.chdir(setup_dir)
        try:
            sys.argv[:] = [setup_script]+list(args)
            sys.path.insert(0, setup_dir)
            # reset to include setup dir, w/clean callback list
            working_set.__init__()
            working_set.callbacks.append(lambda dist:dist.activate())
            DirectorySandbox(setup_dir).run(
                lambda: execfile(
                    "setup.py",
                    {'__file__':setup_script, '__name__':'__main__'}
                )
            )
        except SystemExit:
            v = sys.exc_info()[1]
            if v.args and v.args[0]:
                raise
            # Normal exit, just return
    finally:
        pkg_resources.__setstate__(pr_state)
        sys.modules.update(save_modules)
        # remove any modules imported within the sandbox
        del_modules = [
            mod_name for mod_name in sys.modules
            if mod_name not in save_modules
            # exclude any encodings modules. See #285
            and not mod_name.startswith('encodings.')
        ]
        list(map(sys.modules.__delitem__, del_modules))
        os.chdir(old_dir)
        sys.path[:] = save_path
        sys.argv[:] = save_argv
        tempfile.tempdir = save_tmp


class AbstractSandbox:
    """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts"""

    _active = False

    def __init__(self):
        self._attrs = [
            name for name in dir(_os)
                if not name.startswith('_') and hasattr(self,name)
        ]

    def _copy(self, source):
        for name in self._attrs:
            setattr(os, name, getattr(source,name))

    def run(self, func):
        """Run 'func' under os sandboxing"""
        try:
            self._copy(self)
            if _file:
                builtins.file = self._file
            builtins.open = self._open
            self._active = True
            return func()
        finally:
            self._active = False
            if _file:
                builtins.file = _file
            builtins.open = _open
            self._copy(_os)

    def _mk_dual_path_wrapper(name):
        original = getattr(_os,name)
        def wrap(self,src,dst,*args,**kw):
            if self._active:
                src,dst = self._remap_pair(name,src,dst,*args,**kw)
            return original(src,dst,*args,**kw)
        return wrap

    for name in ["rename", "link", "symlink"]:
        if hasattr(_os,name): locals()[name] = _mk_dual_path_wrapper(name)

    def _mk_single_path_wrapper(name, original=None):
        original = original or getattr(_os,name)
        def wrap(self,path,*args,**kw):
            if self._active:
                path = self._remap_input(name,path,*args,**kw)
            return original(path,*args,**kw)
        return wrap

    if _file:
        _file = _mk_single_path_wrapper('file', _file)
    _open = _mk_single_path_wrapper('open', _open)
    for name in [
        "stat", "listdir", "chdir", "open", "chmod", "chown", "mkdir",
        "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "lstat",
        "startfile", "mkfifo", "mknod", "pathconf", "access"
    ]:
        if hasattr(_os,name): locals()[name] = _mk_single_path_wrapper(name)

    def _mk_single_with_return(name):
        original = getattr(_os,name)
        def wrap(self,path,*args,**kw):
            if self._active:
                path = self._remap_input(name,path,*args,**kw)
                return self._remap_output(name, original(path,*args,**kw))
            return original(path,*args,**kw)
        return wrap

    for name in ['readlink', 'tempnam']:
        if hasattr(_os,name): locals()[name] = _mk_single_with_return(name)

    def _mk_query(name):
        original = getattr(_os,name)
        def wrap(self,*args,**kw):
            retval = original(*args,**kw)
            if self._active:
                return self._remap_output(name, retval)
            return retval
        return wrap

    for name in ['getcwd', 'tmpnam']:
        if hasattr(_os,name): locals()[name] = _mk_query(name)

    def _validate_path(self,path):
        """Called to remap or validate any path, whether input or output"""
        return path

    def _remap_input(self,operation,path,*args,**kw):
        """Called for path inputs"""
        return self._validate_path(path)

    def _remap_output(self,operation,path):
        """Called for path outputs"""
        return self._validate_path(path)

    def _remap_pair(self,operation,src,dst,*args,**kw):
        """Called for path pairs like rename, link, and symlink operations"""
        return (
            self._remap_input(operation+'-from',src,*args,**kw),
            self._remap_input(operation+'-to',dst,*args,**kw)
        )


if hasattr(os, 'devnull'):
    _EXCEPTIONS = [os.devnull,]
else:
    _EXCEPTIONS = []

try:
    from win32com.client.gencache import GetGeneratePath
    _EXCEPTIONS.append(GetGeneratePath())
    del GetGeneratePath
except ImportError:
    # it appears pywin32 is not installed, so no need to exclude.
    pass

class DirectorySandbox(AbstractSandbox):
    """Restrict operations to a single subdirectory - pseudo-chroot"""

    write_ops = dict.fromkeys([
        "open", "chmod", "chown", "mkdir", "remove", "unlink", "rmdir",
        "utime", "lchown", "chroot", "mkfifo", "mknod", "tempnam",
    ])

    _exception_patterns = [
        # Allow lib2to3 to attempt to save a pickled grammar object (#121)
        '.*lib2to3.*\.pickle$',
    ]
    "exempt writing to paths that match the pattern"

    def __init__(self, sandbox, exceptions=_EXCEPTIONS):
        self._sandbox = os.path.normcase(os.path.realpath(sandbox))
        self._prefix = os.path.join(self._sandbox,'')
        self._exceptions = [
            os.path.normcase(os.path.realpath(path))
            for path in exceptions
        ]
        AbstractSandbox.__init__(self)

    def _violation(self, operation, *args, **kw):
        raise SandboxViolation(operation, args, kw)

    if _file:
        def _file(self, path, mode='r', *args, **kw):
            if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
                self._violation("file", path, mode, *args, **kw)
            return _file(path,mode,*args,**kw)

    def _open(self, path, mode='r', *args, **kw):
        if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
            self._violation("open", path, mode, *args, **kw)
        return _open(path,mode,*args,**kw)

    def tmpnam(self):
        self._violation("tmpnam")

    def _ok(self, path):
        active = self._active
        try:
            self._active = False
            realpath = os.path.normcase(os.path.realpath(path))
            return (
                self._exempted(realpath)
                or realpath == self._sandbox
                or realpath.startswith(self._prefix)
            )
        finally:
            self._active = active

    def _exempted(self, filepath):
        start_matches = (
            filepath.startswith(exception)
            for exception in self._exceptions
        )
        pattern_matches = (
            re.match(pattern, filepath)
            for pattern in self._exception_patterns
        )
        candidates = itertools.chain(start_matches, pattern_matches)
        return any(candidates)

    def _remap_input(self, operation, path, *args, **kw):
        """Called for path inputs"""
        if operation in self.write_ops and not self._ok(path):
            self._violation(operation, os.path.realpath(path), *args, **kw)
        return path

    def _remap_pair(self, operation, src, dst, *args, **kw):
        """Called for path pairs like rename, link, and symlink operations"""
        if not self._ok(src) or not self._ok(dst):
            self._violation(operation, src, dst, *args, **kw)
        return (src,dst)

    def open(self, file, flags, mode=0x1FF, *args, **kw):    # 0777
        """Called for low-level os.open()"""
        if flags & WRITE_FLAGS and not self._ok(file):
            self._violation("os.open", file, flags, mode, *args, **kw)
        return _os.open(file,flags,mode, *args, **kw)

WRITE_FLAGS = functools.reduce(
    operator.or_, [getattr(_os, a, 0) for a in
        "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()]
)

class SandboxViolation(DistutilsError):
    """A setup script attempted to modify the filesystem outside the sandbox"""

    def __str__(self):
        return """SandboxViolation: %s%r %s

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.""" % self.args



























#
python3.4/site-packages/setuptools/script template.py000064400000000243151735050020016722 0ustar00# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r
__requires__ = """%(spec)r"""
import pkg_resources
pkg_resources.run_script("""%(spec)r""", """%(script_name)r""")
python3.4/site-packages/setuptools/__init__.py000064400000006365151735050020015374 0ustar00"""Extensions to the 'distutils' for large or complex distributions"""

import os
import sys
import distutils.core
import distutils.filelist
from distutils.core import Command as _Command
from distutils.util import convert_path

import setuptools.version
from setuptools.extension import Extension
from setuptools.dist import Distribution, Feature, _get_unpatched
from setuptools.depends import Require

__all__ = [
    'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require',
    'find_packages'
]

__version__ = setuptools.version.__version__

bootstrap_install_from = None

# If we run 2to3 on .py files, should we also convert docstrings?
# Default: yes; assume that we can detect doctests reliably
run_2to3_on_doctests = True
# Standard package names for fixer packages
lib2to3_fixer_packages = ['lib2to3.fixes']

def find_packages(where='.', exclude=()):
    """Return a list all Python packages found within directory 'where'

    'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it
    will be converted to the appropriate local path syntax.  'exclude' is a
    sequence of package names to exclude; '*' can be used as a wildcard in the
    names, such that 'foo.*' will exclude all subpackages of 'foo' (but not
    'foo' itself).
    """
    out = []
    stack=[(convert_path(where), '')]
    while stack:
        where,prefix = stack.pop(0)
        for name in os.listdir(where):
            fn = os.path.join(where,name)
            looks_like_package = (
                '.' not in name
                and os.path.isdir(fn)
                and os.path.isfile(os.path.join(fn, '__init__.py'))
            )
            if looks_like_package:
                out.append(prefix+name)
                stack.append((fn, prefix+name+'.'))
    for pat in list(exclude)+['ez_setup']:
        from fnmatch import fnmatchcase
        out = [item for item in out if not fnmatchcase(item,pat)]
    return out

setup = distutils.core.setup

_Command = _get_unpatched(_Command)

class Command(_Command):
    __doc__ = _Command.__doc__

    command_consumes_arguments = False

    def __init__(self, dist, **kw):
        # Add support for keyword arguments
        _Command.__init__(self,dist)
        for k,v in kw.items():
            setattr(self,k,v)

    def reinitialize_command(self, command, reinit_subcommands=0, **kw):
        cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
        for k,v in kw.items():
            setattr(cmd,k,v)    # update command with keywords
        return cmd

distutils.core.Command = Command    # we can't patch distutils.cmd, alas

def findall(dir = os.curdir):
    """Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    """
    all_files = []
    for base, dirs, files in os.walk(dir):
        if base==os.curdir or base.startswith(os.curdir+os.sep):
            base = base[2:]
        if base:
            files = [os.path.join(base, f) for f in files]
        all_files.extend(filter(os.path.isfile, files))
    return all_files

distutils.filelist.findall = findall    # fix findall bug in distutils.

# sys.dont_write_bytecode was introduced in Python 2.6.
_dont_write_bytecode = getattr(sys, 'dont_write_bytecode',
    bool(os.environ.get("PYTHONDONTWRITEBYTECODE")))
python3.4/site-packages/setuptools/site-patch.py000064400000004562151735050020015673 0ustar00def __boot():
    import sys, os, os.path
    PYTHONPATH = os.environ.get('PYTHONPATH')
    if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
        PYTHONPATH = []
    else:
        PYTHONPATH = PYTHONPATH.split(os.pathsep)

    pic = getattr(sys,'path_importer_cache',{})
    stdpath = sys.path[len(PYTHONPATH):]
    mydir = os.path.dirname(__file__)
    #print "searching",stdpath,sys.path

    for item in stdpath:
        if item==mydir or not item:
            continue    # skip if current dir. on Windows, or my own directory
        importer = pic.get(item)
        if importer is not None:
            loader = importer.find_module('site')
            if loader is not None:
                # This should actually reload the current module
                loader.load_module('site')
                break
        else:
            try:
                import imp # Avoid import loop in Python >= 3.3
                stream, path, descr = imp.find_module('site',[item])
            except ImportError:
                continue
            if stream is None:
                continue
            try:
                # This should actually reload the current module
                imp.load_module('site',stream,path,descr)
            finally:
                stream.close()
            break
    else:
        raise ImportError("Couldn't find the real 'site' module")

    #print "loaded", __file__

    known_paths = dict([(makepath(item)[1],1) for item in sys.path]) # 2.2 comp

    oldpos = getattr(sys,'__egginsert',0)   # save old insertion position
    sys.__egginsert = 0                     # and reset the current one

    for item in PYTHONPATH:
        addsitedir(item)

    sys.__egginsert += oldpos           # restore effective old position
    
    d,nd = makepath(stdpath[0])
    insert_at = None
    new_path = []

    for item in sys.path:
        p,np = makepath(item)

        if np==nd and insert_at is None:
            # We've hit the first 'system' path entry, so added entries go here
            insert_at = len(new_path)

        if np in known_paths or insert_at is None:
            new_path.append(item)
        else:
            # new path after the insert point, back-insert it
            new_path.insert(insert_at, item)
            insert_at += 1
            
    sys.path[:] = new_path

if __name__=='site':    
    __boot()
    del __boot
    







python3.4/site-packages/setuptools/depends.py000064400000014115151735050020015247 0ustar00from __future__ import generators
import sys, imp, marshal
from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN
from distutils.version import StrictVersion, LooseVersion

__all__ = [
    'Require', 'find_module', 'get_module_constant', 'extract_constant'
]

class Require:
    """A prerequisite to building or installing a distribution"""

    def __init__(self,name,requested_version,module,homepage='',
        attribute=None,format=None
    ):

        if format is None and requested_version is not None:
            format = StrictVersion

        if format is not None:
            requested_version = format(requested_version)
            if attribute is None:
                attribute = '__version__'

        self.__dict__.update(locals())
        del self.self


    def full_name(self):
        """Return full package/distribution name, w/version"""
        if self.requested_version is not None:
            return '%s-%s' % (self.name,self.requested_version)
        return self.name


    def version_ok(self,version):
        """Is 'version' sufficiently up-to-date?"""
        return self.attribute is None or self.format is None or \
            str(version) != "unknown" and version >= self.requested_version


    def get_version(self, paths=None, default="unknown"):

        """Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        """

        if self.attribute is None:
            try:
                f,p,i = find_module(self.module,paths)
                if f: f.close()
                return default
            except ImportError:
                return None

        v = get_module_constant(self.module,self.attribute,default,paths)

        if v is not None and v is not default and self.format is not None:
            return self.format(v)

        return v


    def is_present(self,paths=None):
        """Return true if dependency is present on 'paths'"""
        return self.get_version(paths) is not None


    def is_current(self,paths=None):
        """Return true if dependency is present and up-to-date on 'paths'"""
        version = self.get_version(paths)
        if version is None:
            return False
        return self.version_ok(version)


def _iter_code(code):

    """Yield '(op,arg)' pair for each operation in code object 'code'"""

    from array import array
    from dis import HAVE_ARGUMENT, EXTENDED_ARG

    bytes = array('b',code.co_code)
    eof = len(code.co_code)

    ptr = 0
    extended_arg = 0

    while ptr<eof:

        op = bytes[ptr]

        if op>=HAVE_ARGUMENT:

            arg = bytes[ptr+1] + bytes[ptr+2]*256 + extended_arg
            ptr += 3

            if op==EXTENDED_ARG:
                extended_arg = arg * long_type(65536)
                continue

        else:
            arg = None
            ptr += 1

        yield op,arg










def find_module(module, paths=None):
    """Just like 'imp.find_module()', but with package support"""

    parts = module.split('.')

    while parts:
        part = parts.pop(0)
        f, path, (suffix,mode,kind) = info = imp.find_module(part, paths)

        if kind==PKG_DIRECTORY:
            parts = parts or ['__init__']
            paths = [path]

        elif parts:
            raise ImportError("Can't find %r in %s" % (parts,module))

    return info
























def get_module_constant(module, symbol, default=-1, paths=None):

    """Find 'module' by searching 'paths', and extract 'symbol'

    Return 'None' if 'module' does not exist on 'paths', or it does not define
    'symbol'.  If the module defines 'symbol' as a constant, return the
    constant.  Otherwise, return 'default'."""

    try:
        f, path, (suffix,mode,kind) = find_module(module,paths)
    except ImportError:
        # Module doesn't exist
        return None

    try:
        if kind==PY_COMPILED:
            f.read(8)   # skip magic & date
            code = marshal.load(f)
        elif kind==PY_FROZEN:
            code = imp.get_frozen_object(module)
        elif kind==PY_SOURCE:
            code = compile(f.read(), path, 'exec')
        else:
            # Not something we can parse; we'll have to import it.  :(
            if module not in sys.modules:
                imp.load_module(module,f,path,(suffix,mode,kind))
            return getattr(sys.modules[module],symbol,None)

    finally:
        if f:
            f.close()

    return extract_constant(code,symbol,default)








def extract_constant(code,symbol,default=-1):
    """Extract the constant value of 'symbol' from 'code'

    If the name 'symbol' is bound to a constant value by the Python code
    object 'code', return that value.  If 'symbol' is bound to an expression,
    return 'default'.  Otherwise, return 'None'.

    Return value is based on the first assignment to 'symbol'.  'symbol' must
    be a global, or at least a non-"fast" local in the code block.  That is,
    only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
    must be present in 'code.co_names'.
    """

    if symbol not in code.co_names:
        # name's not there, can't possibly be an assigment
        return None

    name_idx = list(code.co_names).index(symbol)

    STORE_NAME = 90
    STORE_GLOBAL = 97
    LOAD_CONST = 100

    const = default

    for op, arg in _iter_code(code):

        if op==LOAD_CONST:
            const = code.co_consts[arg]
        elif arg==name_idx and (op==STORE_NAME or op==STORE_GLOBAL):
            return const
        else:
            const = default
            
if sys.platform.startswith('java') or sys.platform == 'cli':
    # XXX it'd be better to test assertions about bytecode instead...
    del extract_constant, get_module_constant
    __all__.remove('extract_constant')
    __all__.remove('get_module_constant')


python3.4/site-packages/setuptools/dist.py000064400000077444151735050020014606 0ustar00__all__ = ['Distribution']

import re
import os
import sys
import warnings
import distutils.log
import distutils.core
import distutils.cmd
from distutils.core import Distribution as _Distribution
from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
    DistutilsSetupError)

from setuptools.depends import Require
from setuptools.compat import numeric_types, basestring
import pkg_resources

def _get_unpatched(cls):
    """Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
    """
    while cls.__module__.startswith('setuptools'):
        cls, = cls.__bases__
    if not cls.__module__.startswith('distutils'):
        raise AssertionError(
            "distutils has already been patched by %r" % cls
        )
    return cls

_Distribution = _get_unpatched(_Distribution)

sequence = tuple, list

def check_importable(dist, attr, value):
    try:
        ep = pkg_resources.EntryPoint.parse('x='+value)
        assert not ep.extras
    except (TypeError,ValueError,AttributeError,AssertionError):
        raise DistutilsSetupError(
            "%r must be importable 'module:attrs' string (got %r)"
            % (attr,value)
        )


def assert_string_list(dist, attr, value):
    """Verify that value is a string list or None"""
    try:
        assert ''.join(value)!=value
    except (TypeError,ValueError,AttributeError,AssertionError):
        raise DistutilsSetupError(
            "%r must be a list of strings (got %r)" % (attr,value)
        )
def check_nsp(dist, attr, value):
    """Verify that namespace packages are valid"""
    assert_string_list(dist,attr,value)
    for nsp in value:
        if not dist.has_contents_for(nsp):
            raise DistutilsSetupError(
                "Distribution contains no modules or packages for " +
                "namespace package %r" % nsp
            )
        if '.' in nsp:
            parent = '.'.join(nsp.split('.')[:-1])
            if parent not in value:
                distutils.log.warn(
                    "WARNING: %r is declared as a package namespace, but %r"
                    " is not: please correct this in setup.py", nsp, parent
                )

def check_extras(dist, attr, value):
    """Verify that extras_require mapping is valid"""
    try:
        for k,v in value.items():
            if ':' in k:
                k,m = k.split(':',1)
                if pkg_resources.invalid_marker(m):
                    raise DistutilsSetupError("Invalid environment marker: "+m)
            list(pkg_resources.parse_requirements(v))
    except (TypeError,ValueError,AttributeError):
        raise DistutilsSetupError(
            "'extras_require' must be a dictionary whose values are "
            "strings or lists of strings containing valid project/version "
            "requirement specifiers."
        )

def assert_bool(dist, attr, value):
    """Verify that value is True, False, 0, or 1"""
    if bool(value) != value:
        raise DistutilsSetupError(
            "%r must be a boolean value (got %r)" % (attr,value)
        )
def check_requirements(dist, attr, value):
    """Verify that install_requires is a valid requirements list"""
    try:
        list(pkg_resources.parse_requirements(value))
    except (TypeError,ValueError):
        raise DistutilsSetupError(
            "%r must be a string or list of strings "
            "containing valid project/version requirement specifiers" % (attr,)
        )
def check_entry_points(dist, attr, value):
    """Verify that entry_points map is parseable"""
    try:
        pkg_resources.EntryPoint.parse_map(value)
    except ValueError:
        e = sys.exc_info()[1]
        raise DistutilsSetupError(e)

def check_test_suite(dist, attr, value):
    if not isinstance(value,basestring):
        raise DistutilsSetupError("test_suite must be a string")

def check_package_data(dist, attr, value):
    """Verify that value is a dictionary of package names to glob lists"""
    if isinstance(value,dict):
        for k,v in value.items():
            if not isinstance(k,str): break
            try: iter(v)
            except TypeError:
                break
        else:
            return
    raise DistutilsSetupError(
        attr+" must be a dictionary mapping package names to lists of "
        "wildcard patterns"
    )

def check_packages(dist, attr, value):
    for pkgname in value:
        if not re.match(r'\w+(\.\w+)*', pkgname):
            distutils.log.warn(
                "WARNING: %r not a valid package name; please use only"
                ".-separated package names in setup.py", pkgname
            )


class Distribution(_Distribution):
    """Distribution with support for features, tests, and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'features' **deprecated** -- a dictionary mapping option names to
        'setuptools.Feature'
        objects.  Features are a portion of the distribution that can be
        included or excluded based on user options, inter-feature dependencies,
        and availability on the current system.  Excluded features are omitted
        from all setup commands, including source and binary distributions, so
        you can create multiple distributions from the same source tree.
        Feature names should be valid Python identifiers, except that they may
        contain the '-' (minus) sign.  Features can be included or excluded
        via the command line options '--with-X' and '--without-X', where 'X' is
        the name of the feature.  Whether a feature is included by default, and
        whether you are allowed to control this from the command line, is
        determined by the Feature object.  See the 'Feature' class for more
        information.

     'test_suite' -- the name of a test suite to run for the 'test' command.
        If the user runs 'python setup.py test', the package will be installed,
        and the named test suite will be run.  The format is the same as
        would be used on a 'unittest.py' command line.  That is, it is the
        dotted name of an object to import and call to generate a test suite.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.  They are used by the feature subsystem to configure the
    distribution for the included and excluded features.
    """

    _patched_dist = None

    def patch_missing_pkg_info(self, attrs):
        # Fake up a replacement for the data that would normally come from
        # PKG-INFO, but which might not yet be built if this is a fresh
        # checkout.
        #
        if not attrs or 'name' not in attrs or 'version' not in attrs:
            return
        key = pkg_resources.safe_name(str(attrs['name'])).lower()
        dist = pkg_resources.working_set.by_key.get(key)
        if dist is not None and not dist.has_metadata('PKG-INFO'):
            dist._version = pkg_resources.safe_version(str(attrs['version']))
            self._patched_dist = dist

    def __init__(self, attrs=None):
        have_package_data = hasattr(self, "package_data")
        if not have_package_data:
            self.package_data = {}
        _attrs_dict = attrs or {}
        if 'features' in _attrs_dict or 'require_features' in _attrs_dict:
            Feature.warn_deprecated()
        self.require_features = []
        self.features = {}
        self.dist_files = []
        self.src_root = attrs and attrs.pop("src_root", None)
        self.patch_missing_pkg_info(attrs)
        # Make sure we have any eggs needed to interpret 'attrs'
        if attrs is not None:
            self.dependency_links = attrs.pop('dependency_links', [])
            assert_string_list(self,'dependency_links',self.dependency_links)
        if attrs and 'setup_requires' in attrs:
            self.fetch_build_eggs(attrs.pop('setup_requires'))
        for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
            if not hasattr(self,ep.name):
                setattr(self,ep.name,None)
        _Distribution.__init__(self,attrs)
        if isinstance(self.metadata.version, numeric_types):
            # Some people apparently take "version number" too literally :)
            self.metadata.version = str(self.metadata.version)

    def parse_command_line(self):
        """Process features after parsing command line options"""
        result = _Distribution.parse_command_line(self)
        if self.features:
            self._finalize_features()
        return result

    def _feature_attrname(self,name):
        """Convert feature name to corresponding option attribute name"""
        return 'with_'+name.replace('-','_')

    def fetch_build_eggs(self, requires):
        """Resolve pre-setup requirements"""
        from pkg_resources import working_set, parse_requirements
        for dist in working_set.resolve(
            parse_requirements(requires), installer=self.fetch_build_egg
        ):
            working_set.add(dist)

    def finalize_options(self):
        _Distribution.finalize_options(self)
        if self.features:
            self._set_global_opts_from_features()

        for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
            value = getattr(self,ep.name,None)
            if value is not None:
                ep.require(installer=self.fetch_build_egg)
                ep.load()(self, ep.name, value)
        if getattr(self, 'convert_2to3_doctests', None):
            # XXX may convert to set here when we can rely on set being builtin
            self.convert_2to3_doctests = [os.path.abspath(p) for p in self.convert_2to3_doctests]
        else:
            self.convert_2to3_doctests = []

    def fetch_build_egg(self, req):
        """Fetch an egg needed for building"""

        try:
            cmd = self._egg_fetcher
            cmd.package_index.to_scan = []
        except AttributeError:
            from setuptools.command.easy_install import easy_install
            dist = self.__class__({'script_args':['easy_install']})
            dist.parse_config_files()
            opts = dist.get_option_dict('easy_install')
            keep = (
                'find_links', 'site_dirs', 'index_url', 'optimize',
                'site_dirs', 'allow_hosts'
            )
            for key in opts.keys():
                if key not in keep:
                    del opts[key]   # don't use any other settings
            if self.dependency_links:
                links = self.dependency_links[:]
                if 'find_links' in opts:
                    links = opts['find_links'][1].split() + links
                opts['find_links'] = ('setup', links)
            cmd = easy_install(
                dist, args=["x"], install_dir=os.curdir, exclude_scripts=True,
                always_copy=False, build_directory=None, editable=False,
                upgrade=False, multi_version=True, no_report=True, user=False
            )
            cmd.ensure_finalized()
            self._egg_fetcher = cmd
        return cmd.easy_install(req)

    def _set_global_opts_from_features(self):
        """Add --with-X/--without-X options based on optional features"""

        go = []
        no = self.negative_opt.copy()

        for name,feature in self.features.items():
            self._set_feature(name,None)
            feature.validate(self)

            if feature.optional:
                descr = feature.description
                incdef = ' (default)'
                excdef=''
                if not feature.include_by_default():
                    excdef, incdef = incdef, excdef

                go.append(('with-'+name, None, 'include '+descr+incdef))
                go.append(('without-'+name, None, 'exclude '+descr+excdef))
                no['without-'+name] = 'with-'+name

        self.global_options = self.feature_options = go + self.global_options
        self.negative_opt = self.feature_negopt = no

    def _finalize_features(self):
        """Add/remove features and resolve dependencies between them"""

        # First, flag all the enabled items (and thus their dependencies)
        for name,feature in self.features.items():
            enabled = self.feature_is_included(name)
            if enabled or (enabled is None and feature.include_by_default()):
                feature.include_in(self)
                self._set_feature(name,1)

        # Then disable the rest, so that off-by-default features don't
        # get flagged as errors when they're required by an enabled feature
        for name,feature in self.features.items():
            if not self.feature_is_included(name):
                feature.exclude_from(self)
                self._set_feature(name,0)

    def get_command_class(self, command):
        """Pluggable version of get_command_class()"""
        if command in self.cmdclass:
            return self.cmdclass[command]

        for ep in pkg_resources.iter_entry_points('distutils.commands',command):
            ep.require(installer=self.fetch_build_egg)
            self.cmdclass[command] = cmdclass = ep.load()
            return cmdclass
        else:
            return _Distribution.get_command_class(self, command)

    def print_commands(self):
        for ep in pkg_resources.iter_entry_points('distutils.commands'):
            if ep.name not in self.cmdclass:
                cmdclass = ep.load(False) # don't require extras, we're not running
                self.cmdclass[ep.name] = cmdclass
        return _Distribution.print_commands(self)

    def _set_feature(self,name,status):
        """Set feature's inclusion status"""
        setattr(self,self._feature_attrname(name),status)

    def feature_is_included(self,name):
        """Return 1 if feature is included, 0 if excluded, 'None' if unknown"""
        return getattr(self,self._feature_attrname(name))

    def include_feature(self,name):
        """Request inclusion of feature named 'name'"""

        if self.feature_is_included(name)==0:
            descr = self.features[name].description
            raise DistutilsOptionError(
                descr + " is required, but was excluded or is not available"
            )
        self.features[name].include_in(self)
        self._set_feature(name,1)

    def include(self,**attrs):
        """Add items to distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        """
        for k,v in attrs.items():
            include = getattr(self, '_include_'+k, None)
            if include:
                include(v)
            else:
                self._include_misc(k,v)

    def exclude_package(self,package):
        """Remove packages, modules, and extensions in named package"""

        pfx = package+'.'
        if self.packages:
            self.packages = [
                p for p in self.packages
                    if p != package and not p.startswith(pfx)
            ]

        if self.py_modules:
            self.py_modules = [
                p for p in self.py_modules
                    if p != package and not p.startswith(pfx)
            ]

        if self.ext_modules:
            self.ext_modules = [
                p for p in self.ext_modules
                    if p.name != package and not p.name.startswith(pfx)
            ]

    def has_contents_for(self,package):
        """Return true if 'exclude_package(package)' would do something"""

        pfx = package+'.'

        for p in self.iter_distribution_names():
            if p==package or p.startswith(pfx):
                return True

    def _exclude_misc(self,name,value):
        """Handle 'exclude()' for list/tuple attrs without a special handler"""
        if not isinstance(value,sequence):
            raise DistutilsSetupError(
                "%s: setting must be a list or tuple (%r)" % (name, value)
            )
        try:
            old = getattr(self,name)
        except AttributeError:
            raise DistutilsSetupError(
                "%s: No such distribution setting" % name
            )
        if old is not None and not isinstance(old,sequence):
            raise DistutilsSetupError(
                name+": this setting cannot be changed via include/exclude"
            )
        elif old:
            setattr(self,name,[item for item in old if item not in value])

    def _include_misc(self,name,value):
        """Handle 'include()' for list/tuple attrs without a special handler"""

        if not isinstance(value,sequence):
            raise DistutilsSetupError(
                "%s: setting must be a list (%r)" % (name, value)
            )
        try:
            old = getattr(self,name)
        except AttributeError:
            raise DistutilsSetupError(
                "%s: No such distribution setting" % name
            )
        if old is None:
            setattr(self,name,value)
        elif not isinstance(old,sequence):
            raise DistutilsSetupError(
                name+": this setting cannot be changed via include/exclude"
            )
        else:
            setattr(self,name,old+[item for item in value if item not in old])

    def exclude(self,**attrs):
        """Remove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        """
        for k,v in attrs.items():
            exclude = getattr(self, '_exclude_'+k, None)
            if exclude:
                exclude(v)
            else:
                self._exclude_misc(k,v)

    def _exclude_packages(self,packages):
        if not isinstance(packages,sequence):
            raise DistutilsSetupError(
                "packages: setting must be a list or tuple (%r)" % (packages,)
            )
        list(map(self.exclude_package, packages))

    def _parse_command_opts(self, parser, args):
        # Remove --with-X/--without-X options when processing command args
        self.global_options = self.__class__.global_options
        self.negative_opt = self.__class__.negative_opt

        # First, expand any aliases
        command = args[0]
        aliases = self.get_option_dict('aliases')
        while command in aliases:
            src,alias = aliases[command]
            del aliases[command]    # ensure each alias can expand only once!
            import shlex
            args[:1] = shlex.split(alias,True)
            command = args[0]

        nargs = _Distribution._parse_command_opts(self, parser, args)

        # Handle commands that want to consume all remaining arguments
        cmd_class = self.get_command_class(command)
        if getattr(cmd_class,'command_consumes_arguments',None):
            self.get_option_dict(command)['args'] = ("command line", nargs)
            if nargs is not None:
                return []

        return nargs

    def get_cmdline_options(self):
        """Return a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        """

        d = {}

        for cmd,opts in self.command_options.items():

            for opt,(src,val) in opts.items():

                if src != "command line":
                    continue

                opt = opt.replace('_','-')

                if val==0:
                    cmdobj = self.get_command_obj(cmd)
                    neg_opt = self.negative_opt.copy()
                    neg_opt.update(getattr(cmdobj,'negative_opt',{}))
                    for neg,pos in neg_opt.items():
                        if pos==opt:
                            opt=neg
                            val=None
                            break
                    else:
                        raise AssertionError("Shouldn't be able to get here")

                elif val==1:
                    val = None

                d.setdefault(cmd,{})[opt] = val

        return d

    def iter_distribution_names(self):
        """Yield all packages, modules, and extension names in distribution"""

        for pkg in self.packages or ():
            yield pkg

        for module in self.py_modules or ():
            yield module

        for ext in self.ext_modules or ():
            if isinstance(ext,tuple):
                name, buildinfo = ext
            else:
                name = ext.name
            if name.endswith('module'):
                name = name[:-6]
            yield name

    def handle_display_options(self, option_order):
        """If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        """
        import sys

        if sys.version_info < (3,) or self.help_commands:
            return _Distribution.handle_display_options(self, option_order)

        # Stdout may be StringIO (e.g. in tests)
        import io
        if not isinstance(sys.stdout, io.TextIOWrapper):
            return _Distribution.handle_display_options(self, option_order)

        # Don't wrap stdout if utf-8 is already the encoding. Provides
        #  workaround for #334.
        if sys.stdout.encoding.lower() in ('utf-8', 'utf8'):
            return _Distribution.handle_display_options(self, option_order)

        # Print metadata in UTF-8 no matter the platform
        encoding = sys.stdout.encoding
        errors = sys.stdout.errors
        newline = sys.platform != 'win32' and '\n' or None
        line_buffering = sys.stdout.line_buffering

        sys.stdout = io.TextIOWrapper(
            sys.stdout.detach(), 'utf-8', errors, newline, line_buffering)
        try:
            return _Distribution.handle_display_options(self, option_order)
        finally:
            sys.stdout = io.TextIOWrapper(
                sys.stdout.detach(), encoding, errors, newline, line_buffering)


# Install it throughout the distutils
for module in distutils.dist, distutils.core, distutils.cmd:
    module.Distribution = Distribution


class Feature:
    """
    **deprecated** -- The `Feature` facility was never completely implemented
    or supported, `has reported issues
    <https://bitbucket.org/pypa/setuptools/issue/58>`_ and will be removed in
    a future version.

    A subset of the distribution that can be excluded if unneeded/wanted

    Features are created using these keyword arguments:

      'description' -- a short, human readable description of the feature, to
         be used in error messages, and option help messages.

      'standard' -- if true, the feature is included by default if it is
         available on the current system.  Otherwise, the feature is only
         included if requested via a command line '--with-X' option, or if
         another included feature requires it.  The default setting is 'False'.

      'available' -- if true, the feature is available for installation on the
         current system.  The default setting is 'True'.

      'optional' -- if true, the feature's inclusion can be controlled from the
         command line, using the '--with-X' or '--without-X' options.  If
         false, the feature's inclusion status is determined automatically,
         based on 'availabile', 'standard', and whether any other feature
         requires it.  The default setting is 'True'.

      'require_features' -- a string or sequence of strings naming features
         that should also be included if this feature is included.  Defaults to
         empty list.  May also contain 'Require' objects that should be
         added/removed from the distribution.

      'remove' -- a string or list of strings naming packages to be removed
         from the distribution if this feature is *not* included.  If the
         feature *is* included, this argument is ignored.  This argument exists
         to support removing features that "crosscut" a distribution, such as
         defining a 'tests' feature that removes all the 'tests' subpackages
         provided by other features.  The default for this argument is an empty
         list.  (Note: the named package(s) or modules must exist in the base
         distribution when the 'setup()' function is initially called.)

      other keywords -- any other keyword arguments are saved, and passed to
         the distribution's 'include()' and 'exclude()' methods when the
         feature is included or excluded, respectively.  So, for example, you
         could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be
         added or removed from the distribution as appropriate.

    A feature must include at least one 'requires', 'remove', or other
    keyword argument.  Otherwise, it can't affect the distribution in any way.
    Note also that you can subclass 'Feature' to create your own specialized
    feature types that modify the distribution in other ways when included or
    excluded.  See the docstrings for the various methods here for more detail.
    Aside from the methods, the only feature attributes that distributions look
    at are 'description' and 'optional'.
    """

    @staticmethod
    def warn_deprecated():
        warnings.warn(
            "Features are deprecated and will be removed in a future "
                "version. See http://bitbucket.org/pypa/setuptools/65.",
            DeprecationWarning,
            stacklevel=3,
        )

    def __init__(self, description, standard=False, available=True,
            optional=True, require_features=(), remove=(), **extras):
        self.warn_deprecated()

        self.description = description
        self.standard = standard
        self.available = available
        self.optional = optional
        if isinstance(require_features,(str,Require)):
            require_features = require_features,

        self.require_features = [
            r for r in require_features if isinstance(r,str)
        ]
        er = [r for r in require_features if not isinstance(r,str)]
        if er: extras['require_features'] = er

        if isinstance(remove,str):
            remove = remove,
        self.remove = remove
        self.extras = extras

        if not remove and not require_features and not extras:
            raise DistutilsSetupError(
                "Feature %s: must define 'require_features', 'remove', or at least one"
                " of 'packages', 'py_modules', etc."
            )

    def include_by_default(self):
        """Should this feature be included by default?"""
        return self.available and self.standard

    def include_in(self,dist):

        """Ensure feature and its requirements are included in distribution

        You may override this in a subclass to perform additional operations on
        the distribution.  Note that this method may be called more than once
        per feature, and so should be idempotent.

        """

        if not self.available:
            raise DistutilsPlatformError(
                self.description+" is required,"
                "but is not available on this platform"
            )

        dist.include(**self.extras)

        for f in self.require_features:
            dist.include_feature(f)

    def exclude_from(self,dist):

        """Ensure feature is excluded from distribution

        You may override this in a subclass to perform additional operations on
        the distribution.  This method will be called at most once per
        feature, and only after all included features have been asked to
        include themselves.
        """

        dist.exclude(**self.extras)

        if self.remove:
            for item in self.remove:
                dist.exclude_package(item)

    def validate(self,dist):

        """Verify that feature makes sense in context of distribution

        This method is called by the distribution just before it parses its
        command line.  It checks to ensure that the 'remove' attribute, if any,
        contains only valid package/module names that are present in the base
        distribution when 'setup()' is called.  You may override it in a
        subclass to perform any other required validation of the feature
        against a target distribution.
        """

        for item in self.remove:
            if not dist.has_contents_for(item):
                raise DistutilsSetupError(
                    "%s wants to be able to remove %s, but the distribution"
                    " doesn't contain any packages or modules under %s"
                    % (self.description, item, item)
                )
python3.4/site-packages/setuptools/extension.py000064400000002574151735050020015647 0ustar00import sys
import distutils.core
import distutils.extension

from setuptools.dist import _get_unpatched

_Extension = _get_unpatched(distutils.core.Extension)

def have_pyrex():
    """
    Return True if Cython or Pyrex can be imported.
    """
    pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext'
    for pyrex_impl in pyrex_impls:
        try:
            # from (pyrex_impl) import build_ext
            __import__(pyrex_impl, fromlist=['build_ext']).build_ext
            return True
        except Exception:
            pass
    return False


class Extension(_Extension):
    """Extension that uses '.c' files in place of '.pyx' files"""

    def __init__(self, *args, **kw):
        _Extension.__init__(self, *args, **kw)
        if not have_pyrex():
            self._convert_pyx_sources_to_c()

    def _convert_pyx_sources_to_c(self):
        "convert .pyx extensions to .c"
        def pyx_to_c(source):
            if source.endswith('.pyx'):
                source = source[:-4] + '.c'
            return source
        self.sources = list(map(pyx_to_c, self.sources))

class Library(Extension):
    """Just like a regular Extension, but built as a library instead"""

distutils.core.Extension = Extension
distutils.extension.Extension = Extension
if 'distutils.command.build_ext' in sys.modules:
    sys.modules['distutils.command.build_ext'].Extension = Extension
python3.4/site-packages/setuptools/py31compat.py000064400000000614151735050020015624 0ustar00__all__ = ['get_config_vars', 'get_path']

try:
    # Python 2.7 or >=3.2
    from sysconfig import get_config_vars, get_path
except ImportError:
    from distutils.sysconfig import get_config_vars, get_python_lib
    def get_path(name):
        if name not in ('platlib', 'purelib'):
            raise ValueError("Name must be purelib or platlib")
        return get_python_lib(name=='platlib')
python3.4/site-packages/setuptools/package_index.py000064400000114015151735050020016407 0ustar00"""PyPI and direct package downloading"""
import sys
import os
import re
import shutil
import socket
import base64
import hashlib
from functools import wraps

from pkg_resources import (
    CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST,
    require, Environment, find_distributions, safe_name, safe_version,
    to_filename, Requirement, DEVELOP_DIST,
)
from setuptools import ssl_support
from distutils import log
from distutils.errors import DistutilsError
from setuptools.compat import (urllib2, httplib, StringIO, HTTPError,
                               urlparse, urlunparse, unquote, splituser,
                               url2pathname, name2codepoint,
                               unichr, urljoin, urlsplit, urlunsplit,
                               ConfigParser)
from setuptools.compat import filterfalse
from fnmatch import translate
from setuptools.py26compat import strip_fragment
from setuptools.py27compat import get_all_headers

EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$')
HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I)
# this is here to fix emacs' cruddy broken syntax highlighting
PYPI_MD5 = re.compile(
    '<a href="([^"#]+)">([^<]+)</a>\n\s+\\(<a (?:title="MD5 hash"\n\s+)'
    'href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\\)'
)
URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):',re.I).match
EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split()

__all__ = [
    'PackageIndex', 'distros_for_url', 'parse_bdist_wininst',
    'interpret_distro_name',
]

_SOCKET_TIMEOUT = 15

def parse_bdist_wininst(name):
    """Return (base,pyversion) or (None,None) for possible .exe name"""

    lower = name.lower()
    base, py_ver, plat = None, None, None

    if lower.endswith('.exe'):
        if lower.endswith('.win32.exe'):
            base = name[:-10]
            plat = 'win32'
        elif lower.startswith('.win32-py',-16):
            py_ver = name[-7:-4]
            base = name[:-16]
            plat = 'win32'
        elif lower.endswith('.win-amd64.exe'):
            base = name[:-14]
            plat = 'win-amd64'
        elif lower.startswith('.win-amd64-py',-20):
            py_ver = name[-7:-4]
            base = name[:-20]
            plat = 'win-amd64'
    return base,py_ver,plat


def egg_info_for_url(url):
    scheme, server, path, parameters, query, fragment = urlparse(url)
    base = unquote(path.split('/')[-1])
    if server=='sourceforge.net' and base=='download':    # XXX Yuck
        base = unquote(path.split('/')[-2])
    if '#' in base: base, fragment = base.split('#',1)
    return base,fragment

def distros_for_url(url, metadata=None):
    """Yield egg or source distribution objects that might be found at a URL"""
    base, fragment = egg_info_for_url(url)
    for dist in distros_for_location(url, base, metadata): yield dist
    if fragment:
        match = EGG_FRAGMENT.match(fragment)
        if match:
            for dist in interpret_distro_name(
                url, match.group(1), metadata, precedence = CHECKOUT_DIST
            ):
                yield dist

def distros_for_location(location, basename, metadata=None):
    """Yield egg or source distribution objects based on basename"""
    if basename.endswith('.egg.zip'):
        basename = basename[:-4]    # strip the .zip
    if basename.endswith('.egg') and '-' in basename:
        # only one, unambiguous interpretation
        return [Distribution.from_location(location, basename, metadata)]
    if basename.endswith('.exe'):
        win_base, py_ver, platform = parse_bdist_wininst(basename)
        if win_base is not None:
            return interpret_distro_name(
                location, win_base, metadata, py_ver, BINARY_DIST, platform
            )
    # Try source distro extensions (.zip, .tgz, etc.)
    #
    for ext in EXTENSIONS:
        if basename.endswith(ext):
            basename = basename[:-len(ext)]
            return interpret_distro_name(location, basename, metadata)
    return []  # no extension matched

def distros_for_filename(filename, metadata=None):
    """Yield possible egg or source distribution objects based on a filename"""
    return distros_for_location(
        normalize_path(filename), os.path.basename(filename), metadata
    )


def interpret_distro_name(
        location, basename, metadata, py_version=None, precedence=SOURCE_DIST,
        platform=None
        ):
    """Generate alternative interpretations of a source distro name

    Note: if `location` is a filesystem filename, you should call
    ``pkg_resources.normalize_path()`` on it before passing it to this
    routine!
    """
    # Generate alternative interpretations of a source distro name
    # Because some packages are ambiguous as to name/versions split
    # e.g. "adns-python-1.1.0", "egenix-mx-commercial", etc.
    # So, we generate each possible interepretation (e.g. "adns, python-1.1.0"
    # "adns-python, 1.1.0", and "adns-python-1.1.0, no version").  In practice,
    # the spurious interpretations should be ignored, because in the event
    # there's also an "adns" package, the spurious "python-1.1.0" version will
    # compare lower than any numeric version number, and is therefore unlikely
    # to match a request for it.  It's still a potential problem, though, and
    # in the long run PyPI and the distutils should go for "safe" names and
    # versions in distribution archive names (sdist and bdist).

    parts = basename.split('-')
    if not py_version:
        for i,p in enumerate(parts[2:]):
            if len(p)==5 and p.startswith('py2.'):
                return # It's a bdist_dumb, not an sdist -- bail out

    for p in range(1,len(parts)+1):
        yield Distribution(
            location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]),
            py_version=py_version, precedence = precedence,
            platform = platform
        )

# From Python 2.7 docs
def unique_everseen(iterable, key=None):
    "List unique elements, preserving order. Remember all elements ever seen."
    # unique_everseen('AAAABBBCCDAABBB') --> A B C D
    # unique_everseen('ABBCcAD', str.lower) --> A B C D
    seen = set()
    seen_add = seen.add
    if key is None:
        for element in filterfalse(seen.__contains__, iterable):
            seen_add(element)
            yield element
    else:
        for element in iterable:
            k = key(element)
            if k not in seen:
                seen_add(k)
                yield element

def unique_values(func):
    """
    Wrap a function returning an iterable such that the resulting iterable
    only ever yields unique items.
    """
    @wraps(func)
    def wrapper(*args, **kwargs):
        return unique_everseen(func(*args, **kwargs))
    return wrapper

REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
# this line is here to fix emacs' cruddy broken syntax highlighting

@unique_values
def find_external_links(url, page):
    """Find rel="homepage" and rel="download" links in `page`, yielding URLs"""

    for match in REL.finditer(page):
        tag, rel = match.groups()
        rels = set(map(str.strip, rel.lower().split(',')))
        if 'homepage' in rels or 'download' in rels:
            for match in HREF.finditer(tag):
                yield urljoin(url, htmldecode(match.group(1)))

    for tag in ("<th>Home Page", "<th>Download URL"):
        pos = page.find(tag)
        if pos!=-1:
            match = HREF.search(page,pos)
            if match:
                yield urljoin(url, htmldecode(match.group(1)))

user_agent = "Python-urllib/%s setuptools/%s" % (
    sys.version[:3], require('setuptools')[0].version
)

class ContentChecker(object):
    """
    A null content checker that defines the interface for checking content
    """
    def feed(self, block):
        """
        Feed a block of data to the hash.
        """
        return

    def is_valid(self):
        """
        Check the hash. Return False if validation fails.
        """
        return True

    def report(self, reporter, template):
        """
        Call reporter with information about the checker (hash name)
        substituted into the template.
        """
        return

class HashChecker(ContentChecker):
    pattern = re.compile(
        r'(?P<hash_name>sha1|sha224|sha384|sha256|sha512|md5)='
        r'(?P<expected>[a-f0-9]+)'
    )

    def __init__(self, hash_name, expected):
        self.hash_name = hash_name
        self.hash = hashlib.new(hash_name)
        self.expected = expected

    @classmethod
    def from_url(cls, url):
        "Construct a (possibly null) ContentChecker from a URL"
        fragment = urlparse(url)[-1]
        if not fragment:
            return ContentChecker()
        match = cls.pattern.search(fragment)
        if not match:
            return ContentChecker()
        return cls(**match.groupdict())

    def feed(self, block):
        self.hash.update(block)

    def is_valid(self):
        return self.hash.hexdigest() == self.expected

    def report(self, reporter, template):
        msg = template % self.hash_name
        return reporter(msg)


class PackageIndex(Environment):
    """A distribution index that scans web pages for download URLs"""

    def __init__(
            self, index_url="https://pypi.python.org/simple", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
            ):
        Environment.__init__(self,*args,**kw)
        self.index_url = index_url + "/"[:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate,hosts))).match
        self.to_scan = []
        if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()):
            self.opener = ssl_support.opener_for(ca_bundle)
        else: self.opener = urllib2.urlopen

    def process_url(self, url, retrieve=False):
        """Evaluate a URL as a possible download, and maybe retrieve it"""
        if url in self.scanned_urls and not retrieve:
            return
        self.scanned_urls[url] = True
        if not URL_SCHEME(url):
            self.process_filename(url)
            return
        else:
            dists = list(distros_for_url(url))
            if dists:
                if not self.url_ok(url):
                    return
                self.debug("Found link: %s", url)

        if dists or not retrieve or url in self.fetched_urls:
            list(map(self.add, dists))
            return  # don't need the actual page

        if not self.url_ok(url):
            self.fetched_urls[url] = True
            return

        self.info("Reading %s", url)
        self.fetched_urls[url] = True   # prevent multiple fetch attempts
        f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url)
        if f is None: return
        self.fetched_urls[f.url] = True
        if 'html' not in f.headers.get('content-type', '').lower():
            f.close()   # not html, we can't process it
            return

        base = f.url     # handle redirects
        page = f.read()
        if not isinstance(page, str): # We are in Python 3 and got bytes. We want str.
            if isinstance(f, HTTPError):
                # Errors have no charset, assume latin1:
                charset = 'latin-1'
            else:
                charset = f.headers.get_param('charset') or 'latin-1'
            page = page.decode(charset, "ignore")
        f.close()
        for match in HREF.finditer(page):
            link = urljoin(base, htmldecode(match.group(1)))
            self.process_url(link)
        if url.startswith(self.index_url) and getattr(f,'code',None)!=404:
            page = self.process_index(url, page)

    def process_filename(self, fn, nested=False):
        # process filenames or directories
        if not os.path.exists(fn):
            self.warn("Not found: %s", fn)
            return

        if os.path.isdir(fn) and not nested:
            path = os.path.realpath(fn)
            for item in os.listdir(path):
                self.process_filename(os.path.join(path,item), True)

        dists = distros_for_filename(fn)
        if dists:
            self.debug("Found: %s", fn)
            list(map(self.add, dists))

    def url_ok(self, url, fatal=False):
        s = URL_SCHEME(url)
        if (s and s.group(1).lower()=='file') or self.allows(urlparse(url)[1]):
            return True
        msg = ("\nNote: Bypassing %s (disallowed host; see "
            "http://bit.ly/1dg9ijs for details).\n")
        if fatal:
            raise DistutilsError(msg % url)
        else:
            self.warn(msg, url)

    def scan_egg_links(self, search_path):
        for item in search_path:
            if os.path.isdir(item):
                for entry in os.listdir(item):
                    if entry.endswith('.egg-link'):
                        self.scan_egg_link(item, entry)

    def scan_egg_link(self, path, entry):
        lines = [_f for _f in map(str.strip,
                                  open(os.path.join(path, entry))) if _f]
        if len(lines)==2:
            for dist in find_distributions(os.path.join(path, lines[0])):
                dist.location = os.path.join(path, *lines)
                dist.precedence = SOURCE_DIST
                self.add(dist)

    def process_index(self,url,page):
        """Process the contents of a PyPI page"""
        def scan(link):
            # Process a URL to see if it's for a package page
            if link.startswith(self.index_url):
                parts = list(map(
                    unquote, link[len(self.index_url):].split('/')
                ))
                if len(parts)==2 and '#' not in parts[1]:
                    # it's a package page, sanitize and index it
                    pkg = safe_name(parts[0])
                    ver = safe_version(parts[1])
                    self.package_pages.setdefault(pkg.lower(),{})[link] = True
                    return to_filename(pkg), to_filename(ver)
            return None, None

        # process an index page into the package-page index
        for match in HREF.finditer(page):
            try:
                scan(urljoin(url, htmldecode(match.group(1))))
            except ValueError:
                pass

        pkg, ver = scan(url)   # ensure this page is in the page index
        if pkg:
            # process individual package page
            for new_url in find_external_links(url, page):
                # Process the found URL
                base, frag = egg_info_for_url(new_url)
                if base.endswith('.py') and not frag:
                    if ver:
                        new_url+='#egg=%s-%s' % (pkg,ver)
                    else:
                        self.need_version_info(url)
                self.scan_url(new_url)

            return PYPI_MD5.sub(
                lambda m: '<a href="%s#md5=%s">%s</a>' % m.group(1,3,2), page
            )
        else:
            return ""   # no sense double-scanning non-package pages

    def need_version_info(self, url):
        self.scan_all(
            "Page at %s links to .py file(s) without version info; an index "
            "scan is required.", url
        )

    def scan_all(self, msg=None, *args):
        if self.index_url not in self.fetched_urls:
            if msg: self.warn(msg,*args)
            self.info(
                "Scanning index of all packages (this may take a while)"
            )
        self.scan_url(self.index_url)

    def find_packages(self, requirement):
        self.scan_url(self.index_url + requirement.unsafe_name+'/')

        if not self.package_pages.get(requirement.key):
            # Fall back to safe version of the name
            self.scan_url(self.index_url + requirement.project_name+'/')

        if not self.package_pages.get(requirement.key):
            # We couldn't find the target package, so search the index page too
            self.not_found_in_index(requirement)

        for url in list(self.package_pages.get(requirement.key,())):
            # scan each page that might be related to the desired package
            self.scan_url(url)

    def obtain(self, requirement, installer=None):
        self.prescan()
        self.find_packages(requirement)
        for dist in self[requirement.key]:
            if dist in requirement:
                return dist
            self.debug("%s does not match %s", requirement, dist)
        return super(PackageIndex, self).obtain(requirement,installer)

    def check_hash(self, checker, filename, tfp):
        """
        checker is a ContentChecker
        """
        checker.report(self.debug,
            "Validating %%s checksum for %s" % filename)
        if not checker.is_valid():
            tfp.close()
            os.unlink(filename)
            raise DistutilsError(
                "%s validation failed for %s; "
                "possible download problem?" % (
                                checker.hash.name, os.path.basename(filename))
            )

    def add_find_links(self, urls):
        """Add `urls` to the list that will be prescanned for searches"""
        for url in urls:
            if (
                self.to_scan is None        # if we have already "gone online"
                or not URL_SCHEME(url)      # or it's a local file/directory
                or url.startswith('file:')
                or list(distros_for_url(url))   # or a direct package link
            ):
                # then go ahead and process it now
                self.scan_url(url)
            else:
                # otherwise, defer retrieval till later
                self.to_scan.append(url)

    def prescan(self):
        """Scan urls scheduled for prescanning (e.g. --find-links)"""
        if self.to_scan:
            list(map(self.scan_url, self.to_scan))
        self.to_scan = None     # from now on, go ahead and process immediately

    def not_found_in_index(self, requirement):
        if self[requirement.key]:   # we've seen at least one distro
            meth, msg = self.info, "Couldn't retrieve index page for %r"
        else:   # no distros seen for this name, might be misspelled
            meth, msg = (self.warn,
                "Couldn't find index page for %r (maybe misspelled?)")
        meth(msg, requirement.unsafe_name)
        self.scan_all()

    def download(self, spec, tmpdir):
        """Locate and/or download `spec` to `tmpdir`, returning a local path

        `spec` may be a ``Requirement`` object, or a string containing a URL,
        an existing local filename, or a project/version requirement spec
        (i.e. the string form of a ``Requirement`` object).  If it is the URL
        of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
        that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
        automatically created alongside the downloaded file.

        If `spec` is a ``Requirement`` object or a string containing a
        project/version requirement spec, this method returns the location of
        a matching distribution (possibly after downloading it to `tmpdir`).
        If `spec` is a locally existing file or directory name, it is simply
        returned unchanged.  If `spec` is a URL, it is downloaded to a subpath
        of `tmpdir`, and the local filename is returned.  Various errors may be
        raised if a problem occurs during downloading.
        """
        if not isinstance(spec,Requirement):
            scheme = URL_SCHEME(spec)
            if scheme:
                # It's a url, download it to tmpdir
                found = self._download_url(scheme.group(1), spec, tmpdir)
                base, fragment = egg_info_for_url(spec)
                if base.endswith('.py'):
                    found = self.gen_setup(found,fragment,tmpdir)
                return found
            elif os.path.exists(spec):
                # Existing file or directory, just return it
                return spec
            else:
                try:
                    spec = Requirement.parse(spec)
                except ValueError:
                    raise DistutilsError(
                        "Not a URL, existing file, or requirement spec: %r" %
                        (spec,)
                    )
        return getattr(self.fetch_distribution(spec, tmpdir),'location',None)

    def fetch_distribution(
            self, requirement, tmpdir, force_scan=False, source=False,
            develop_ok=False, local_index=None
            ):
        """Obtain a distribution suitable for fulfilling `requirement`

        `requirement` must be a ``pkg_resources.Requirement`` instance.
        If necessary, or if the `force_scan` flag is set, the requirement is
        searched for in the (online) package index as well as the locally
        installed packages.  If a distribution matching `requirement` is found,
        the returned distribution's ``location`` is the value you would have
        gotten from calling the ``download()`` method with the matching
        distribution's URL or filename.  If no matching distribution is found,
        ``None`` is returned.

        If the `source` flag is set, only source distributions and source
        checkout links will be considered.  Unless the `develop_ok` flag is
        set, development and system eggs (i.e., those using the ``.egg-info``
        format) will be ignored.
        """
        # process a Requirement
        self.info("Searching for %s", requirement)
        skipped = {}
        dist = None

        def find(req, env=None):
            if env is None:
                env = self
            # Find a matching distribution; may be called more than once

            for dist in env[req.key]:

                if dist.precedence==DEVELOP_DIST and not develop_ok:
                    if dist not in skipped:
                        self.warn("Skipping development or system egg: %s",dist)
                        skipped[dist] = 1
                    continue

                if dist in req and (dist.precedence<=SOURCE_DIST or not source):
                    return dist

        if force_scan:
            self.prescan()
            self.find_packages(requirement)
            dist = find(requirement)

        if local_index is not None:
            dist = dist or find(requirement, local_index)

        if dist is None and self.to_scan is not None:
            self.prescan()
            dist = find(requirement)

        if dist is None and not force_scan:
            self.find_packages(requirement)
            dist = find(requirement)

        if dist is None:
            self.warn(
                "No local packages or download links found for %s%s",
                (source and "a source distribution of " or ""),
                requirement,
            )
        else:
            self.info("Best match: %s", dist)
            return dist.clone(location=self.download(dist.location, tmpdir))

    def fetch(self, requirement, tmpdir, force_scan=False, source=False):
        """Obtain a file suitable for fulfilling `requirement`

        DEPRECATED; use the ``fetch_distribution()`` method now instead.  For
        backward compatibility, this routine is identical but returns the
        ``location`` of the downloaded distribution instead of a distribution
        object.
        """
        dist = self.fetch_distribution(requirement,tmpdir,force_scan,source)
        if dist is not None:
            return dist.location
        return None

    def gen_setup(self, filename, fragment, tmpdir):
        match = EGG_FRAGMENT.match(fragment)
        dists = match and [
            d for d in
            interpret_distro_name(filename, match.group(1), None) if d.version
        ] or []

        if len(dists)==1:   # unambiguous ``#egg`` fragment
            basename = os.path.basename(filename)

            # Make sure the file has been downloaded to the temp dir.
            if os.path.dirname(filename) != tmpdir:
                dst = os.path.join(tmpdir, basename)
                from setuptools.command.easy_install import samefile
                if not samefile(filename, dst):
                    shutil.copy2(filename, dst)
                    filename=dst

            file = open(os.path.join(tmpdir, 'setup.py'), 'w')
            file.write(
                "from setuptools import setup\n"
                "setup(name=%r, version=%r, py_modules=[%r])\n"
                % (
                    dists[0].project_name, dists[0].version,
                    os.path.splitext(basename)[0]
                )
            )
            file.close()
            return filename

        elif match:
            raise DistutilsError(
                "Can't unambiguously interpret project/version identifier %r; "
                "any dashes in the name or version should be escaped using "
                "underscores. %r" % (fragment,dists)
            )
        else:
            raise DistutilsError(
                "Can't process plain .py files without an '#egg=name-version'"
                " suffix to enable automatic setup script generation."
            )

    dl_blocksize = 8192
    def _download_to(self, url, filename):
        self.info("Downloading %s", url)
        # Download the file
        fp, tfp, info = None, None, None
        try:
            checker = HashChecker.from_url(url)
            fp = self.open_url(strip_fragment(url))
            if isinstance(fp, HTTPError):
                raise DistutilsError(
                    "Can't download %s: %s %s" % (url, fp.code,fp.msg)
                )
            headers = fp.info()
            blocknum = 0
            bs = self.dl_blocksize
            size = -1
            if "content-length" in headers:
                # Some servers return multiple Content-Length headers :(
                sizes = get_all_headers(headers, 'Content-Length')
                size = max(map(int, sizes))
                self.reporthook(url, filename, blocknum, bs, size)
            tfp = open(filename,'wb')
            while True:
                block = fp.read(bs)
                if block:
                    checker.feed(block)
                    tfp.write(block)
                    blocknum += 1
                    self.reporthook(url, filename, blocknum, bs, size)
                else:
                    break
            self.check_hash(checker, filename, tfp)
            return headers
        finally:
            if fp: fp.close()
            if tfp: tfp.close()

    def reporthook(self, url, filename, blocknum, blksize, size):
        pass    # no-op

    def open_url(self, url, warning=None):
        if url.startswith('file:'):
            return local_open(url)
        try:
            return open_with_auth(url, self.opener)
        except (ValueError, httplib.InvalidURL):
            v = sys.exc_info()[1]
            msg = ' '.join([str(arg) for arg in v.args])
            if warning:
                self.warn(warning, msg)
            else:
                raise DistutilsError('%s %s' % (url, msg))
        except urllib2.HTTPError:
            v = sys.exc_info()[1]
            return v
        except urllib2.URLError:
            v = sys.exc_info()[1]
            if warning:
                self.warn(warning, v.reason)
            else:
                raise DistutilsError("Download error for %s: %s"
                                     % (url, v.reason))
        except httplib.BadStatusLine:
            v = sys.exc_info()[1]
            if warning:
                self.warn(warning, v.line)
            else:
                raise DistutilsError(
                    '%s returned a bad status line. The server might be '
                    'down, %s' %
                    (url, v.line)
                )
        except httplib.HTTPException:
            v = sys.exc_info()[1]
            if warning:
                self.warn(warning, v)
            else:
                raise DistutilsError("Download error for %s: %s"
                                     % (url, v))

    def _download_url(self, scheme, url, tmpdir):
        # Determine download filename
        #
        name, fragment = egg_info_for_url(url)
        if name:
            while '..' in name:
                name = name.replace('..','.').replace('\\','_')
        else:
            name = "__downloaded__"    # default if URL has no path contents

        if name.endswith('.egg.zip'):
            name = name[:-4]    # strip the extra .zip before download

        filename = os.path.join(tmpdir,name)

        # Download the file
        #
        if scheme=='svn' or scheme.startswith('svn+'):
            return self._download_svn(url, filename)
        elif scheme=='git' or scheme.startswith('git+'):
            return self._download_git(url, filename)
        elif scheme.startswith('hg+'):
            return self._download_hg(url, filename)
        elif scheme=='file':
            return url2pathname(urlparse(url)[2])
        else:
            self.url_ok(url, True)   # raises error if not allowed
            return self._attempt_download(url, filename)

    def scan_url(self, url):
        self.process_url(url, True)

    def _attempt_download(self, url, filename):
        headers = self._download_to(url, filename)
        if 'html' in headers.get('content-type','').lower():
            return self._download_html(url, headers, filename)
        else:
            return filename

    def _download_html(self, url, headers, filename):
        file = open(filename)
        for line in file:
            if line.strip():
                # Check for a subversion index page
                if re.search(r'<title>([^- ]+ - )?Revision \d+:', line):
                    # it's a subversion index page:
                    file.close()
                    os.unlink(filename)
                    return self._download_svn(url, filename)
                break   # not an index page
        file.close()
        os.unlink(filename)
        raise DistutilsError("Unexpected HTML page found at "+url)

    def _download_svn(self, url, filename):
        url = url.split('#',1)[0]   # remove any fragment for svn's sake
        creds = ''
        if url.lower().startswith('svn:') and '@' in url:
            scheme, netloc, path, p, q, f = urlparse(url)
            if not netloc and path.startswith('//') and '/' in path[2:]:
                netloc, path = path[2:].split('/',1)
                auth, host = splituser(netloc)
                if auth:
                    if ':' in auth:
                        user, pw = auth.split(':',1)
                        creds = " --username=%s --password=%s" % (user, pw)
                    else:
                        creds = " --username="+auth
                    netloc = host
                    url = urlunparse((scheme, netloc, url, p, q, f))
        self.info("Doing subversion checkout from %s to %s", url, filename)
        os.system("svn checkout%s -q %s %s" % (creds, url, filename))
        return filename

    @staticmethod
    def _vcs_split_rev_from_url(url, pop_prefix=False):
        scheme, netloc, path, query, frag = urlsplit(url)

        scheme = scheme.split('+', 1)[-1]

        # Some fragment identification fails
        path = path.split('#',1)[0]

        rev = None
        if '@' in path:
            path, rev = path.rsplit('@', 1)

        # Also, discard fragment
        url = urlunsplit((scheme, netloc, path, query, ''))

        return url, rev

    def _download_git(self, url, filename):
        filename = filename.split('#',1)[0]
        url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)

        self.info("Doing git clone from %s to %s", url, filename)
        os.system("git clone --quiet %s %s" % (url, filename))

        if rev is not None:
            self.info("Checking out %s", rev)
            os.system("(cd %s && git checkout --quiet %s)" % (
                filename,
                rev,
            ))

        return filename

    def _download_hg(self, url, filename):
        filename = filename.split('#',1)[0]
        url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)

        self.info("Doing hg clone from %s to %s", url, filename)
        os.system("hg clone --quiet %s %s" % (url, filename))

        if rev is not None:
            self.info("Updating to %s", rev)
            os.system("(cd %s && hg up -C -r %s >&-)" % (
                filename,
                rev,
            ))

        return filename

    def debug(self, msg, *args):
        log.debug(msg, *args)

    def info(self, msg, *args):
        log.info(msg, *args)

    def warn(self, msg, *args):
        log.warn(msg, *args)

# This pattern matches a character entity reference (a decimal numeric
# references, a hexadecimal numeric reference, or a named reference).
entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub

def uchr(c):
    if not isinstance(c, int):
        return c
    if c>255: return unichr(c)
    return chr(c)

def decode_entity(match):
    what = match.group(1)
    if what.startswith('#x'):
        what = int(what[2:], 16)
    elif what.startswith('#'):
        what = int(what[1:])
    else:
        what = name2codepoint.get(what, match.group(0))
    return uchr(what)

def htmldecode(text):
    """Decode HTML entities in the given text."""
    return entity_sub(decode_entity, text)

def socket_timeout(timeout=15):
    def _socket_timeout(func):
        def _socket_timeout(*args, **kwargs):
            old_timeout = socket.getdefaulttimeout()
            socket.setdefaulttimeout(timeout)
            try:
                return func(*args, **kwargs)
            finally:
                socket.setdefaulttimeout(old_timeout)
        return _socket_timeout
    return _socket_timeout

def _encode_auth(auth):
    """
    A function compatible with Python 2.3-3.3 that will encode
    auth from a URL suitable for an HTTP header.
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
    """
    auth_s = unquote(auth)
    # convert to bytes
    auth_bytes = auth_s.encode()
    # use the legacy interface for Python 2.3 support
    encoded_bytes = base64.encodestring(auth_bytes)
    # convert back to a string
    encoded = encoded_bytes.decode()
    # strip the trailing carriage return
    return encoded.replace('\n','')

class Credential(object):
    """
    A username/password pair. Use like a namedtuple.
    """
    def __init__(self, username, password):
        self.username = username
        self.password = password

    def __iter__(self):
        yield self.username
        yield self.password

    def __str__(self):
        return '%(username)s:%(password)s' % vars(self)

class PyPIConfig(ConfigParser.ConfigParser):

    def __init__(self):
        """
        Load from ~/.pypirc
        """
        defaults = dict.fromkeys(['username', 'password', 'repository'], '')
        ConfigParser.ConfigParser.__init__(self, defaults)

        rc = os.path.join(os.path.expanduser('~'), '.pypirc')
        if os.path.exists(rc):
            self.read(rc)

    @property
    def creds_by_repository(self):
        sections_with_repositories = [
            section for section in self.sections()
            if self.get(section, 'repository').strip()
        ]

        return dict(map(self._get_repo_cred, sections_with_repositories))

    def _get_repo_cred(self, section):
        repo = self.get(section, 'repository').strip()
        return repo, Credential(
            self.get(section, 'username').strip(),
            self.get(section, 'password').strip(),
        )

    def find_credential(self, url):
        """
        If the URL indicated appears to be a repository defined in this
        config, return the credential for that repository.
        """
        for repository, cred in self.creds_by_repository.items():
            if url.startswith(repository):
                return cred


def open_with_auth(url, opener=urllib2.urlopen):
    """Open a urllib2 request, handling HTTP authentication"""

    scheme, netloc, path, params, query, frag = urlparse(url)

    # Double scheme does not raise on Mac OS X as revealed by a
    # failing test. We would expect "nonnumeric port". Refs #20.
    if netloc.endswith(':'):
        raise httplib.InvalidURL("nonnumeric port: ''")

    if scheme in ('http', 'https'):
        auth, host = splituser(netloc)
    else:
        auth = None

    if not auth:
        cred = PyPIConfig().find_credential(url)
        if cred:
            auth = str(cred)
            info = cred.username, url
            log.info('Authenticating as %s for %s (from .pypirc)' % info)

    if auth:
        auth = "Basic " + _encode_auth(auth)
        new_url = urlunparse((scheme,host,path,params,query,frag))
        request = urllib2.Request(new_url)
        request.add_header("Authorization", auth)
    else:
        request = urllib2.Request(url)

    request.add_header('User-Agent', user_agent)
    fp = opener(request)

    if auth:
        # Put authentication info back into request URL if same host,
        # so that links found on the page will work
        s2, h2, path2, param2, query2, frag2 = urlparse(fp.url)
        if s2==scheme and h2==host:
            fp.url = urlunparse((s2,netloc,path2,param2,query2,frag2))

    return fp

# adding a timeout to avoid freezing package_index
open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth)


def fix_sf_url(url):
    return url      # backward compatibility

def local_open(url):
    """Read a local path, with special support for directories"""
    scheme, server, path, param, query, frag = urlparse(url)
    filename = url2pathname(path)
    if os.path.isfile(filename):
        return urllib2.urlopen(url)
    elif path.endswith('/') and os.path.isdir(filename):
        files = []
        for f in os.listdir(filename):
            if f=='index.html':
                fp = open(os.path.join(filename,f),'r')
                body = fp.read()
                fp.close()
                break
            elif os.path.isdir(os.path.join(filename,f)):
                f+='/'
            files.append("<a href=%r>%s</a>" % (f,f))
        else:
            body = ("<html><head><title>%s</title>" % url) + \
                "</head><body>%s</body></html>" % '\n'.join(files)
        status, message = 200, "OK"
    else:
        status, message, body = 404, "Path not found", "Not found"

    headers = {'content-type': 'text/html'}
    return HTTPError(url, status, message, headers, StringIO(body))
python3.4/site-packages/setuptools/lib2to3_ex.py000064400000003716151735050020015604 0ustar00"""
Customized Mixin2to3 support:

 - adds support for converting doctests


This module raises an ImportError on Python 2.
"""

from distutils.util import Mixin2to3 as _Mixin2to3
from distutils import log
from lib2to3.refactor import RefactoringTool, get_fixers_from_package
import setuptools

class DistutilsRefactoringTool(RefactoringTool):
    def log_error(self, msg, *args, **kw):
        log.error(msg, *args)

    def log_message(self, msg, *args):
        log.info(msg, *args)

    def log_debug(self, msg, *args):
        log.debug(msg, *args)

class Mixin2to3(_Mixin2to3):
    def run_2to3(self, files, doctests = False):
        # See of the distribution option has been set, otherwise check the
        # setuptools default.
        if self.distribution.use_2to3 is not True:
            return
        if not files:
            return
        log.info("Fixing "+" ".join(files))
        self.__build_fixer_names()
        self.__exclude_fixers()
        if doctests:
            if setuptools.run_2to3_on_doctests:
                r = DistutilsRefactoringTool(self.fixer_names)
                r.refactor(files, write=True, doctests_only=True)
        else:
            _Mixin2to3.run_2to3(self, files)

    def __build_fixer_names(self):
        if self.fixer_names: return
        self.fixer_names = []
        for p in setuptools.lib2to3_fixer_packages:
            self.fixer_names.extend(get_fixers_from_package(p))
        if self.distribution.use_2to3_fixers is not None:
            for p in self.distribution.use_2to3_fixers:
                self.fixer_names.extend(get_fixers_from_package(p))

    def __exclude_fixers(self):
        excluded_fixers = getattr(self, 'exclude_fixers', [])
        if self.distribution.use_2to3_exclude_fixers is not None:
            excluded_fixers.extend(self.distribution.use_2to3_exclude_fixers)
        for fixer_name in excluded_fixers:
            if fixer_name in self.fixer_names:
                self.fixer_names.remove(fixer_name)
python3.4/site-packages/setuptools/py27compat.py000064400000000462151735050020015632 0ustar00"""
Compatibility Support for Python 2.7 and earlier
"""

import sys

def get_all_headers(message, key):
	"""
	Given an HTTPMessage, return all headers matching a given key.
	"""
	return message.get_all(key)

if sys.version_info < (3,):
	def get_all_headers(message, key):
		return message.getheaders(key)
python3.4/site-packages/setuptools/py26compat.py000064400000000657151735050020015637 0ustar00"""
Compatibility Support for Python 2.6 and earlier
"""

import sys

from setuptools.compat import splittag

def strip_fragment(url):
	"""
	In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
	later was patched to disregard the fragment when making URL requests.
	Do the same for Python 2.6 and earlier.
	"""
	url, fragment = splittag(url)
	return url

if sys.version_info >= (2,7):
	strip_fragment = lambda x: x
python3.4/site-packages/setuptools/script template (dev).py000064400000000467151735050020017612 0ustar00# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
__requires__ = """%(spec)r"""
import sys
from pkg_resources import require
require("""%(spec)r""")
del require
__file__ = """%(dev_path)r"""
if sys.version_info < (3, 0):
    execfile(__file__)
else:
    exec(compile(open(__file__).read(), __file__, 'exec'))
python3.4/site-packages/pip-1.5.6.dist-info/entry_points.txt000064400000000104151735050020017451 0ustar00[console_scripts]
pip3 = pip:main
pip = pip:main
pip3.4 = pip:main

python3.4/site-packages/pip-1.5.6.dist-info/METADATA000064400000004703151735050020015267 0ustar00Metadata-Version: 2.0
Name: pip
Version: 1.5.6
Summary: A tool for installing and managing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: python-virtualenv@groups.google.com
License: MIT
Keywords: easy_install distutils setuptools egg virtualenv
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Build Tools
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Provides-Extra: testing
Requires-Dist: pytest; extra == 'testing'
Requires-Dist: virtualenv (>=1.10); extra == 'testing'
Requires-Dist: scripttest (>=1.3); extra == 'testing'
Requires-Dist: mock; extra == 'testing'


Project Info
============

* Project Page: https://github.com/pypa/pip
* Install howto: https://pip.pypa.io/en/latest/installing.html
* Changelog: https://pip.pypa.io/en/latest/news.html
* Bug Tracking: https://github.com/pypa/pip/issues
* Mailing list: http://groups.google.com/group/python-virtualenv
* Docs: https://pip.pypa.io/
* User IRC: #pypa on Freenode.
* Dev IRC: #pypa-dev on Freenode.

Quickstart
==========

First, :doc:`Install pip <installing>`.

Install a package from `PyPI`_:

::

  $ pip install SomePackage
    [...]
    Successfully installed SomePackage

Show what files were installed:

::

  $ pip show --files SomePackage
    Name: SomePackage
    Version: 1.0
    Location: /my/env/lib/pythonx.x/site-packages
    Files:
     ../somepackage/__init__.py
     [...]

List what packages are outdated:

::

  $ pip list --outdated
    SomePackage (Current: 1.0 Latest: 2.0)

Upgrade a package:

::

  $ pip install --upgrade SomePackage
    [...]
    Found existing installation: SomePackage 1.0
    Uninstalling SomePackage:
      Successfully uninstalled SomePackage
    Running setup.py install for SomePackage
    Successfully installed SomePackage

Uninstall a package:

::

  $ pip uninstall SomePackage
    Uninstalling SomePackage:
      /my/env/lib/pythonx.x/site-packages/somepackage
    Proceed (y/n)? y
    Successfully uninstalled SomePackage


.. _PyPI: http://pypi.python.org/pypi/


python3.4/site-packages/pip-1.5.6.dist-info/pydist.json000064400000002521151735050020016367 0ustar00{"metadata_version": "2.0", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Build Tools", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3"], "exports": {"console_scripts": {"pip3": "pip:main", "pip": "pip:main", "pip3.4": "pip:main"}}, "license": "MIT", "summary": "A tool for installing and managing Python packages.", "test_requires": [{"requires": ["pytest", "virtualenv (>=1.10)", "scripttest (>=1.3)", "mock"]}], "keywords": "easy_install distutils setuptools egg virtualenv", "contacts": [{"name": "The pip developers", "email": "python-virtualenv@groups.google.com", "role": "author"}], "name": "pip", "generator": "bdist_wheel (0.22.0)", "project_urls": {"Home": "https://pip.pypa.io/"}, "commands": {"wrap_console": {"pip3": "pip:main", "pip": "pip:main", "pip3.4": "pip:main"}}, "extras": ["testing"], "version": "1.5.6", "run_requires": [{"requires": ["pytest", "virtualenv (>=1.10)", "scripttest (>=1.3)", "mock"], "extra": "testing"}], "document_names": {"description": "DESCRIPTION.rst"}}python3.4/site-packages/pip-1.5.6.dist-info/RECORD000064400000074055151735050030015075 0ustar00pip-1.5.6.data/scripts/pip3,sha256=nAVJqitsjrwZv6KSY8NlXstCc8XTvg-jrC2oBIV_1k8,274
pip-1.5.6.data/scripts/pip,sha256=De0W2oww_P4dM50MGVfNpWeKo69Hnr6COf8DQL5QqsI,272
pip-1.5.6.data/scripts/pip3.4,sha256=AyhsCbqgiM5UnN86GlzK71uxOqSDiaEQ-_UhuA92B74,278
pip/index.py,sha256=CLPb0crVhOQ3aZpl4feUKpf1pVR6qLhBiJTa71PoIkM,40403
pip/pep425tags.py,sha256=jb5Rq395Gz_Uv8kn3L9Im1HX7EhEj8nqyYX0nXulzWo,2969
pip/locations.py,sha256=YyFyCLYADKgT5x-Ctj_LeZl5bEzkbBXuR2Iv8IbVqDA,6202
pip/cmdoptions.py,sha256=2E4AK_UNbyvJE6bmvlvsWhkrttE3jrwM_hNYpIecLfE,9330
pip/req.py,sha256=iuQoYf21dUNtwrBG4rkpzGdrsobLBmwAxy9yvsN4_xg,83753
pip/exceptions.py,sha256=wAoboA4PdhGN7xH-ayf_dcDFPYZe9XAivAlZJbOgCN4,1086
pip/__init__.py,sha256=WzANeRzRVWoA1cpCc_d_41hpcWFR90Auv8IpKToWzMw,9428
pip/util.py,sha256=rmGahY7tRBWTKqT42eA9k1tKyVTlOHq4w_NfBk4yt10,25124
pip/baseparser.py,sha256=DZKWTOA1OeD5mLyBUx183Jx-M16cqWOXPZZuJN4-4j8,8162
pip/basecommand.py,sha256=N_nE7BCcoMA7t2nRNTiJB8T__1XqI74SJI2G72VaM2E,6578
pip/runner.py,sha256=VkcZKNikprpDOSl2Y3m0FaQbdGuYsoHkxdhjtL0N3oA,431
pip/status_codes.py,sha256=sEFHUaUJbqv8iArL3HAtcztWZmGOFX01hTesSytDEh0,116
pip/__main__.py,sha256=9JBJhprGRLUy1fEvAdufs0tsjKFAvFAY_nTde6GDkHk,116
pip/download.py,sha256=jnZvTGYutxPtgJvF0URMnsBGkTABNrfgFevu5QmscfE,22580
pip/wheel.py,sha256=BbXwXLwU5IqWU5sPieWErTbuI3sDHxGUUm24rzXebLI,20800
pip/log.py,sha256=1fW7cVRIRBhfqWz4JH2HhJRHzVQ4PJTRbolRj3S33f8,9455
pip/backwardcompat/__init__.py,sha256=AcP5dr3nL-4AGxSwsFIEUcf9ki0ROUFwfc0IrIeHaJI,3756
pip/vcs/git.py,sha256=ib3TqDwJyfjBnSRFKVe_HhNdwkmfcOZfJHbqt2RUOVg,7898
pip/vcs/mercurial.py,sha256=71ESfgxotPPPZjiH6sMTBWcj5TS8kjgJxVnWrRb3bwo,5820
pip/vcs/__init__.py,sha256=kS31hLmJ6BgKnBu8kvXKQlJEwoj1MxYE7wfRuFL-daM,8748
pip/vcs/bazaar.py,sha256=qUIuIqDJqwZ_nP6WR52YwvYVy1lvIUmvaT-IdxDYUHo,4943
pip/vcs/subversion.py,sha256=P31K7o83JdcipIyuEVlnpSp5KZqakb4OJ1PKT-FB7C8,10640
pip/commands/list.py,sha256=FHf7H35AajbCuymiG2z8xAGNSx8W5CNZKj6Hh2QGo38,6814
pip/commands/__init__.py,sha256=N_4io-oGcWF9-raDN5TYXbGlJFsx5po36HZmwgLso6I,2236
pip/commands/zip.py,sha256=KECCb3oCHxJqDT3kUEnlf0udp31Ckoe8oyEKdS7EKNQ,14821
pip/commands/show.py,sha256=ipjEcTrk-hgvFysSKJ5E9PSPXZGTuE3NIXLYvXnsdNk,2767
pip/commands/unzip.py,sha256=_PeTWKOd_iRxPt_7njQ8jGFpjX006vobn593tcIyeUc,185
pip/commands/uninstall.py,sha256=MF4zSLfMxnH3E8T673ORNWz0Bsc4C6LEI5KImpAQrck,2203
pip/commands/install.py,sha256=nKCSLKvUpYHWVZXP96XcyWVGQBoOnG635Tt1JxLx7Ts,13780
pip/commands/help.py,sha256=ETLg8xfv8uFwS3KvxmsCE-I56S15jUTvfkwaPAA18pE,927
pip/commands/completion.py,sha256=LnJgUrpGGO4x2Y8VdwhKda4kGZWMFO28P4jYzYT5Q8k,1838
pip/commands/bundle.py,sha256=tK8LU3Khjkrz65y3brNP71QOBkQCb9mlv9x8s1W02T4,1787
pip/commands/search.py,sha256=_4Mza0qEb6P1aDA2OROYd-KuOJg0NrITOtQoiCDJF5Q,4736
pip/commands/wheel.py,sha256=BLf-jQxO7BhiHho302fNGPsz9fA5NGjfGUSv33XmP9s,7714
pip/commands/freeze.py,sha256=Hyx1gzMaTFwTMcP98fwNCRVvvrWenX9j1RBziLCIo0A,4664
pip/_vendor/pkg_resources.py,sha256=0y2CkvxQcHCBVOmTCNvdMN8hTPPUogThjhkCxegggII,100025
pip/_vendor/__init__.py,sha256=f-xO4dF7jRP89yrL4h26_nULYgYTzgnTgUFlkDasJrc,266
pip/_vendor/re-vendor.py,sha256=PcdZ40d0ohMsdJmA4t0AeAWbPXi1tFsvAwA5KE5FGeY,773
pip/_vendor/six.py,sha256=whAS1kvmixxh-pKqb5qQ05-fHMnGjuKyU6m7_wa09O4,23462
pip/_vendor/distlib/index.py,sha256=D-Zz8pQ6Gtr4t7HlFebU36P9inMPSfExmit061S8DUk,19476
pip/_vendor/distlib/manifest.py,sha256=I-JG2bVBN3Zmf4gpt9MFjgsukcIt0rMrz95jQ1kwbgE,13497
pip/_vendor/distlib/scripts.py,sha256=0bIHpJFwyvymJ4CEnm1-x3AcJZbYTEkhBAKuas295Ic,12307
pip/_vendor/distlib/markers.py,sha256=iRrVWwpyVwjkKJSX8NEQ92_MRMwpROcfNGKCD-Ch1QM,6282
pip/_vendor/distlib/resources.py,sha256=H9QmD7R_8t-iLxZne9EnjAHAdSEbJ22PYotEppOGxts,9432
pip/_vendor/distlib/t64.exe,sha256=71TYxgPfviERRKhyYaXPx2pl4o4ugs5zNWuIMLlm7ss,94720
pip/_vendor/distlib/w64.exe,sha256=haGpLW73-UaPHkjhKaQVPTBJCZ9Lg1rMBZdhpi7f_V8,91648
pip/_vendor/distlib/__init__.py,sha256=kTBiZ-2Ndb1k7wb8yCvl7iRBCDTnvaOR15qf32RgvsY,581
pip/_vendor/distlib/version.py,sha256=FgTBNWH7dDY12fqTFy6nATw21wV8kKJw5G19aFouwDE,22996
pip/_vendor/distlib/util.py,sha256=UBy5ki-nyb0nJyM_-TlXSfni_cEOI4r6LzglMMB_1zc,51230
pip/_vendor/distlib/compat.py,sha256=pVILHBDu1P72lO1lEgPFpwRWGs4Cj2-eo_xOPLKjprk,38875
pip/_vendor/distlib/locators.py,sha256=Vi88LbYqF981rmCc8dbD9qnmt5MeJzv7qiAlvgrK3vs,46946
pip/_vendor/distlib/database.py,sha256=reYrKl6tqHs3eOrMrdXX4W0OGlBqathuqSzCy-696MI,49138
pip/_vendor/distlib/t32.exe,sha256=snr0x6iR5Yd7ZndiuvGMuuQGg8VklUc5538uQcOeVYQ,91136
pip/_vendor/distlib/wheel.py,sha256=TUMl4Pzri_jglkvr2jZ4GJfWAumG3VNzT2CaW7oBXQQ,38259
pip/_vendor/distlib/w32.exe,sha256=QoyveFPxLH-db4j2YDzb-VmP7DmGT1vHwPOLGpzc3uw,87040
pip/_vendor/distlib/metadata.py,sha256=IS0Q8hNbQWEhaLtItUlLxYC3j9zVtFD76DgXbHxcRZE,36815
pip/_vendor/distlib/_backport/tarfile.py,sha256=bjyTNONZb-YEXrHFLExOSuagtSOoPaONP2UUoxwkAqE,92627
pip/_vendor/distlib/_backport/__init__.py,sha256=bqS_dTOH6uW9iGgd0uzfpPjo6vZ4xpPZ7kyfZJ2vNaw,274
pip/_vendor/distlib/_backport/misc.py,sha256=KWecINdbFNOxSOP1fGF680CJnaC6S4fBRgEtaYTw0ig,971
pip/_vendor/distlib/_backport/sysconfig.cfg,sha256=swZKxq9RY5e9r3PXCrlvQPMsvOdiWZBTHLEbqS8LJLU,2617
pip/_vendor/distlib/_backport/shutil.py,sha256=AUi8718iRoJ9K26mRi-rywtt8Gx7ykvrvbUbZszjfYE,25650
pip/_vendor/distlib/_backport/sysconfig.py,sha256=7WdYP0wbw8izH1eAEGNA-HXUyJrhzIAGK_LniUs4UNI,26958
pip/_vendor/html5lib/ihatexml.py,sha256=MT12cVXAKaW-ALUkUeN175HpUP73xK8wAIpPzQ8cgfI,16581
pip/_vendor/html5lib/inputstream.py,sha256=qa-xwqbm-w250UR-uVzooXPSHFI4Ho6drLhPl7VWvHI,30636
pip/_vendor/html5lib/__init__.py,sha256=6fwIe3NEcpx7aLb1bBXUpsDgJFE9PnbpRADB7i2QhBw,714
pip/_vendor/html5lib/constants.py,sha256=w_Lrxu8h6qE4KATYy0SL5hiJ5ebuB28SlCcdXUHf6to,87346
pip/_vendor/html5lib/html5parser.py,sha256=qMHEOEahKSZzLHHkqLRVbuIJYgAteVR-nmkjMp59Tvw,117029
pip/_vendor/html5lib/utils.py,sha256=T-BFeUVGJDjVCRbNoqar2qxn8jEoCOOJXE1nH0nDHEQ,2545
pip/_vendor/html5lib/tokenizer.py,sha256=6Uf8sDUkvNn661bcBSBYUCTfXzSs9EyCTiPcj5PAjYI,76929
pip/_vendor/html5lib/sanitizer.py,sha256=sg7g5CXF9tfvykIoSVAvA8647MgScy3ncZC7IYH-8SA,16428
pip/_vendor/html5lib/treewalkers/lxmletree.py,sha256=vWfXWK3GOSrq2trQm2aPmIRWPhVuYDZ3g9Fu8hUeBQg,6215
pip/_vendor/html5lib/treewalkers/pulldom.py,sha256=9W6i8yWtUzayV6EwX-okVacttHaqpQZwdBCc2S3XeQ4,2302
pip/_vendor/html5lib/treewalkers/__init__.py,sha256=44g-xYZEoYxzkMu6CepBTLm4m-g9iy7Vm_IG8PWAbhY,2323
pip/_vendor/html5lib/treewalkers/genshistream.py,sha256=IbBFrlgi-59-K7P1zm0d7ZFIknBN4c5E57PHJDkx39s,2278
pip/_vendor/html5lib/treewalkers/etree.py,sha256=waFU6dxcV5y4SEMyxZpQ9M4I5pKpMmCtUSN1GbuCVcE,4625
pip/_vendor/html5lib/treewalkers/_base.py,sha256=hnL6zMgGJoGqEJYKVKveDmfpz1d2xriyuuau6479xq4,6919
pip/_vendor/html5lib/treewalkers/dom.py,sha256=mAg05wBWN2k-CGPoo0KNxa55QAlHciNccp8AezCa8j8,1457
pip/_vendor/html5lib/treebuilders/__init__.py,sha256=Xz4X6B5DA1R-5GyRa44j0sJwfl6dUNyb0NBu9-7sK3U,3405
pip/_vendor/html5lib/treebuilders/etree.py,sha256=etbO6yQlyV46rWlj9mSyVqQOWrgoHgyJ01Tut4lWZkk,12621
pip/_vendor/html5lib/treebuilders/_base.py,sha256=Xf0FZVcVwIQS6tEseJdj5wKbYucbNCnbAsnsG4lONis,13711
pip/_vendor/html5lib/treebuilders/dom.py,sha256=ylkIlwEV2NsIWBpwEtfqF0LVoCGg4oXazEWs4-486jk,8469
pip/_vendor/html5lib/treebuilders/etree_lxml.py,sha256=z3Bnfm2MstEEb_lbaAeicl5l-ab6MSQa5Q1ZZreK7Pc,14031
pip/_vendor/html5lib/trie/datrie.py,sha256=EQpqSfkZRuTbE-DuhW7xMdVDxdZNZ0CfmnYfHA_3zxM,1178
pip/_vendor/html5lib/trie/__init__.py,sha256=mec5zyJ5wIKRM8819gIcIsYQwncg91rEmPwGH1dG3Ho,212
pip/_vendor/html5lib/trie/_base.py,sha256=WGY8SGptFmx4O0aKLJ54zrIQOoyuvhS0ngA36vAcIcc,927
pip/_vendor/html5lib/trie/py.py,sha256=wXmQLrZRf4MyWNyg0m3h81m9InhLR7GJ002mIIZh-8o,1775
pip/_vendor/html5lib/serializer/__init__.py,sha256=xFXFP-inaTNlbnau5c5DGrH_O8yPm-C6HWbJxpiSqFE,490
pip/_vendor/html5lib/serializer/htmlserializer.py,sha256=bSXUuFJB6s-ODOl0nzFN0UA6xlQRU-BwYamPeJvsNSE,12909
pip/_vendor/html5lib/filters/inject_meta_charset.py,sha256=xllv1I7unxhcyZTf3LTsv30wh2mAkT7wmTZx7zIhpuY,2746
pip/_vendor/html5lib/filters/optionaltags.py,sha256=4ozLwBgMRaxe7iqxefLQpDhp3irK7YHo9LgSGsvZYMw,10500
pip/_vendor/html5lib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/html5lib/filters/whitespace.py,sha256=LbOUcC0zQ9z703KNZrArOr0kVBO7OMXjKjucDW32LU4,1142
pip/_vendor/html5lib/filters/_base.py,sha256=z-IU9ZAYjpsVsqmVt7kuWC63jR11hDMr6CVrvuao8W0,286
pip/_vendor/html5lib/filters/alphabeticalattributes.py,sha256=fpRLbz6TCe5yXEkGmyMlJ80FekWsTR-sHk3Ano0U9LQ,624
pip/_vendor/html5lib/filters/lint.py,sha256=6rlGRUTxD5KWwEVoXVHI_PeyUHN6Vw2v_ovg0YiHsDA,4306
pip/_vendor/html5lib/filters/sanitizer.py,sha256=MvGUs_v2taWPgGhjxswRSUiHfxrqMUhsNPz-eSeUYUQ,352
pip/_vendor/html5lib/treeadapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/html5lib/treeadapters/sax.py,sha256=3of4vvaUYIAic7pngebwJV24hpOS7Zg9ggJa_WQegy4,1661
pip/_vendor/requests/models.py,sha256=OYZOkemxZPpeTp5cvhdx-gAnl9bW82wdnGIr4uoVH20,26436
pip/_vendor/requests/cacert.pem,sha256=ak7q_q8ozHdQ9ff27U-E1vCNrLisFRQSMy9zJkdpQlM,308434
pip/_vendor/requests/hooks.py,sha256=9vNiuiRHRd5Qy6BX_0p1H3NsUzDo1M_HaFR2AFL41Tg,820
pip/_vendor/requests/exceptions.py,sha256=z-3QpicafKtIh85bMEaClL2OpNPdsc6TP_83KcsVh8Y,1877
pip/_vendor/requests/__init__.py,sha256=Rl423kV-MBTFDiTtEOJiP9CuaubFSi8rHaqzq1KBN0w,1856
pip/_vendor/requests/cookies.py,sha256=BjMKtrI8TXQD5oQVeToYtkRBF149eI85UhWsBGwsJac,16686
pip/_vendor/requests/adapters.py,sha256=fp4t_woMNJPv8vikcrLbkkDxhJHJMZ3h8MlgtKvpuE8,14608
pip/_vendor/requests/compat.py,sha256=JGrJPV2YGatzwrexl9kSt8Z8QtmFboRZH9ywsLK_MMA,2556
pip/_vendor/requests/sessions.py,sha256=kwPPNj1M3D6yfHPcygUERvfqWaSx8odBijhqKTqRX_Q,22290
pip/_vendor/requests/status_codes.py,sha256=LYpqLv4AEKuTPby-QSvgl_gI7fcVlUDqSBcndIwX-Qg,3136
pip/_vendor/requests/certs.py,sha256=wSaqhSNoB0igp6Da-hWw0jtXICKXBbL8aS9swthlt50,544
pip/_vendor/requests/structures.py,sha256=d7f7ZXZZzgZtvrBQBZA1boJYX_QlP1YqL-_xtpzImGw,3541
pip/_vendor/requests/auth.py,sha256=x2bFqHK3Lkbm7qPUyh_dAqYLTDTotBi-1za9EpCdA0U,6123
pip/_vendor/requests/utils.py,sha256=MxSUha_2szwhfLKmGg5bolxt6lA6OghSvVZ4xMZwQhM,19973
pip/_vendor/requests/api.py,sha256=4xrabBN80yaqHxsomHVQD09v2VndgCz1cSsEnRvGGL0,4344
pip/_vendor/requests/packages/__init__.py,sha256=aXkbNCjM_WhryRBocE4AaA_p7-CTxL5LOutY7XzKm4s,62
pip/_vendor/requests/packages/chardet/big5prober.py,sha256=XX96C--6WKYW36mL-z7pJSAtc169Z8ZImByCP4pEN9A,1684
pip/_vendor/requests/packages/chardet/euckrfreq.py,sha256=T5saK5mImySG5ygQPtsp6o2uKulouCwYm2ElOyFkJqU,45978
pip/_vendor/requests/packages/chardet/langthaimodel.py,sha256=-k7djh3dGKngAGnt3WfuoJN7acDcWcmHAPojhaUd7q4,11275
pip/_vendor/requests/packages/chardet/euctwfreq.py,sha256=G_I0BW9i1w0ONeeUwIYqV7_U09buIHdqh-wNHVaql7I,34872
pip/_vendor/requests/packages/chardet/sbcharsetprober.py,sha256=Xq0lODqJnDgxglBiQI4BqTFiPbn63-0a5XNA5-hVu7U,4793
pip/_vendor/requests/packages/chardet/euckrprober.py,sha256=Wo7dnZ5Erw_nB4H-m5alMiOxOuJUmGHlwCSaGqExDZA,1675
pip/_vendor/requests/packages/chardet/escprober.py,sha256=q5TcQKeVq31WxrW7Sv8yjpZkjEoaHO8S92EJZ9hodys,3187
pip/_vendor/requests/packages/chardet/gb2312freq.py,sha256=M2gFdo_qQ_BslStEchrPW5CrPEZEacC0uyDLw4ok-kY,36011
pip/_vendor/requests/packages/chardet/sjisprober.py,sha256=1RjpQ2LU2gvoEB_4O839xDQVchWx2fG_C7_vXh52P5I,3734
pip/_vendor/requests/packages/chardet/__init__.py,sha256=8-39Dg2qEuod5DNN7RMdn2ZYOO9zFU3fFfaE80iDWGc,1295
pip/_vendor/requests/packages/chardet/latin1prober.py,sha256=g67gqZ2z89LUOlR7BZEAh4-p5a1yGWss9nWy8FCNm8Q,5241
pip/_vendor/requests/packages/chardet/langcyrillicmodel.py,sha256=fkcd5OvogUp-GrNDWAZPgkYsSRCD2omotAEvqjlmLKE,17725
pip/_vendor/requests/packages/chardet/charsetgroupprober.py,sha256=0lKk7VE516fgMw119tNefFqLOxKfIE9WfdkpIT69OKU,3791
pip/_vendor/requests/packages/chardet/chardistribution.py,sha256=cUARQFr1oTLXeJCDQrDRkUP778AvSMzhSCnG8VLCV58,9226
pip/_vendor/requests/packages/chardet/eucjpprober.py,sha256=5IpfSEjAb7h3hcGMd6dkU80O900C2N6xku28rdYFKuc,3678
pip/_vendor/requests/packages/chardet/mbcharsetprober.py,sha256=9rOCjDVsmSMp6e7q2syqak22j7lrbUZhJhMee2gbVL0,3268
pip/_vendor/requests/packages/chardet/langhungarianmodel.py,sha256=SXwuUzh49_cBeMXhshRHdrhlkz0T8_pZWV_pdqBKNFk,12536
pip/_vendor/requests/packages/chardet/langhebrewmodel.py,sha256=4ASl5vzKJPng4H278VHKtRYC03TpQpenlHTcsmZH1rE,11318
pip/_vendor/requests/packages/chardet/escsm.py,sha256=7iljEKN8lXTh8JFXPUSwlibMno6R6ksq4evLxbkzfro,7839
pip/_vendor/requests/packages/chardet/jisfreq.py,sha256=ZcL4R5ekHHbP2KCYGakVMBsiKqZZZAABzhwi-uRkOps,47315
pip/_vendor/requests/packages/chardet/big5freq.py,sha256=D8oTdz-GM7Jg8TsaWJDm65vM_OLHC3xub6qUJ3rOgsQ,82594
pip/_vendor/requests/packages/chardet/compat.py,sha256=5mm6yrHwef1JEG5OxkPJlSq5lkjLVpEGh3iPgFBkpkM,1157
pip/_vendor/requests/packages/chardet/gb2312prober.py,sha256=VWnjoRa83Y6V6oczMaxyUr0uy48iCnC2nzk9zfEIRHc,1681
pip/_vendor/requests/packages/chardet/utf8prober.py,sha256=7tdNZGrJY7jZUBD483GGMkiP0Tx8Fp-cGvWHoAsilHg,2652
pip/_vendor/requests/packages/chardet/universaldetector.py,sha256=GkZdwNyNfbFWC8I1uqnzyhOUF7favWCqCOKqdQlx6gQ,6831
pip/_vendor/requests/packages/chardet/sbcsgroupprober.py,sha256=8hLyH8RAG-aohBo7o_KciWVgRo42ZE_zEtuNG1JMRYI,3291
pip/_vendor/requests/packages/chardet/constants.py,sha256=-UnY8U7EP7z9fTyd09yq35BEkSFEAUAiv9ohd1DW1s4,1335
pip/_vendor/requests/packages/chardet/langbulgarianmodel.py,sha256=ZyPsA796MSVhYdfWhMCgKWckupAKAnKqWcE3Cl3ej6o,12784
pip/_vendor/requests/packages/chardet/euctwprober.py,sha256=upS2P6GuT5ujOxXYw-RJLcT7A4PTuo27KGUKU4UZpIQ,1676
pip/_vendor/requests/packages/chardet/langgreekmodel.py,sha256=QHMy31CH_ot67UCtmurCEKqKx2WwoaKrw2YCYYBK2Lw,12628
pip/_vendor/requests/packages/chardet/hebrewprober.py,sha256=8pdoUfsVXf_L4BnJde_BewS6H2yInV5688eu0nFhLHY,13359
pip/_vendor/requests/packages/chardet/chardetect.py,sha256=8g-dRSA97bSE6M25Tqe1roKKtl3XHSMnqi6vTzpHNV0,1141
pip/_vendor/requests/packages/chardet/charsetprober.py,sha256=Z48o2KiOj23FNqYH8FqzhH5m1qdm3rI8DcTm2Yqtklg,1902
pip/_vendor/requests/packages/chardet/mbcssm.py,sha256=UuiA4Ic8vEc0XpTKDneqZyiH2TwGuFVZxOxWJep3X_4,19608
pip/_vendor/requests/packages/chardet/mbcsgroupprober.py,sha256=SHRzNPLpDXfMJLA8phCHVU0WgqbgDCNxDQMolGX_7yk,1967
pip/_vendor/requests/packages/chardet/jpcntx.py,sha256=9fJ9oS0BUarcdZNySwmzVRuT03sYdClSmFwXDj3yVNg,19104
pip/_vendor/requests/packages/chardet/codingstatemachine.py,sha256=E85rYhHVMw9xDEJVgiQhp0OnLGr6i2r8_7QOWMKTH08,2318
pip/_vendor/requests/packages/chardet/cp949prober.py,sha256=FMvdLyB7fejPXRsTbca7LK1P3RUvvssmjUNyaEfz8zY,1782
pip/_vendor/requests/packages/urllib3/request.py,sha256=cXTcrr9d50Rt213ZXLgCf53KNWxe4LQ8lxSV1HBYa9E,5808
pip/_vendor/requests/packages/urllib3/exceptions.py,sha256=T-ILeqVPpEvrOYAq8XEyTF0X8XRWcFVGT2gMrF00km0,3364
pip/_vendor/requests/packages/urllib3/filepost.py,sha256=tWPY33HnFM_RPpEU9PHv9D34n67w8ZRt80ZSsWIv0Kk,2512
pip/_vendor/requests/packages/urllib3/__init__.py,sha256=sLIKv9dGJjDloiVXUBBjXDWWq8bM66kcvTH2SU_WZKg,1701
pip/_vendor/requests/packages/urllib3/response.py,sha256=ff9-9sZkghNWCyeoECvImHspITTum7KOM20J2ia4SAw,10347
pip/_vendor/requests/packages/urllib3/fields.py,sha256=UuTJzGxUc9H1LPYZnD3f8GW308Vx_znb5pt4yimORsI,5976
pip/_vendor/requests/packages/urllib3/_collections.py,sha256=Oh1gxPZRqtOSy3pTV0pWQ949t9sjRAFMautsHiHP_pY,6557
pip/_vendor/requests/packages/urllib3/connection.py,sha256=eug-y4_dOa-x9bxDlURwpqlZuQDhl9Tjre5D1S5bijE,6533
pip/_vendor/requests/packages/urllib3/connectionpool.py,sha256=8eDsWYJzKYOyXMiP4CJqtLeychOw3iD_P20Ov-dbGUs,26904
pip/_vendor/requests/packages/urllib3/poolmanager.py,sha256=bMYHdNaVI5O4YrJHr1T6tE2RYHEMzM2_K0cTy7uzX2M,8977
pip/_vendor/requests/packages/urllib3/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py,sha256=VJ-GjxpYITxSj4UDKX0iqvHwaatyg2RA3PaTym5Wp6w,4741
pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py,sha256=D1cbFXSoWj4ahM0azQdvIDFkvNnzMLxOvo1wnMrPo8M,15086
pip/_vendor/requests/packages/urllib3/packages/__init__.py,sha256=EKCTAOjZtPR_HC50e7X8hS5j4bkFkN87XZOT-Wdpfus,74
pip/_vendor/requests/packages/urllib3/packages/six.py,sha256=U-rO-WBrFS8PxHeamSl6okKCjqPF18NhiZb0qPZ67XM,11628
pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py,sha256=HtHphtStJlorzQqoIat8zUH0lqLns416gfSO9y_aSAQ,8936
pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py,sha256=cOWMIn1orgJoA35p6pSzO_-Dc6iOX9Dhl6D2sL9b_2o,460
pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py,sha256=fK28k37hL7-D79v9iM2fHgNK9Q1Pw0M7qVRL4rkfFjQ,3778
pip/_vendor/requests/packages/urllib3/util/request.py,sha256=-mIHA_M2aZwEmW5PpNfxEi9B47YDmFcoTW5FvQ7prf4,1924
pip/_vendor/requests/packages/urllib3/util/timeout.py,sha256=WGx3s4593QcpwyHLY1FpFZgGPiTdL26A2nJhsZa9Rj8,9236
pip/_vendor/requests/packages/urllib3/util/__init__.py,sha256=nI42Lb9ShOOOl_uRDyJfZP_nxHCR4wTFJXmDa_GEe7c,622
pip/_vendor/requests/packages/urllib3/util/url.py,sha256=ftfW-i1XtyFZEOEKfXLkKNmM7APmgNHbtcGWYr-6xdI,4273
pip/_vendor/requests/packages/urllib3/util/response.py,sha256=EVO-5Q1Wc9K61i3RIhPB83CXfnvZpphL_NNp0SLznzI,354
pip/_vendor/requests/packages/urllib3/util/ssl_.py,sha256=0SJbyE9KURi8IjmOwo8sqmmit4sRkXf9eg_ODWOhSD0,4235
pip/_vendor/requests/packages/urllib3/util/connection.py,sha256=Df5MeJaIpPigbIxEa87ojZ7qxXm1-V9dhnc2m7S6lNA,1348
pip/_vendor/_markerlib/markers.py,sha256=YuFp0-osufFIoqnzG3L0Z2fDCx4Vln3VUDeXJ2DA_1I,3979
pip/_vendor/_markerlib/__init__.py,sha256=2hgtRuYDOrimZF9-ENCkrP8gnJ59HZEtlk-zoTEvn1Y,564
pip/_vendor/colorama/ansi.py,sha256=spKO9jqXAB9POAj6M3bZLrdCf-W9wUVeDCqF664WSGs,1039
pip/_vendor/colorama/initialise.py,sha256=sL44vQFKG5BAoFgoIxfhH0wG2NnLBw9mtnWFVtXkHGs,1297
pip/_vendor/colorama/winterm.py,sha256=RhWJPcGA_T1knfS-84AXpQ0C7cn8XWE6iQkqy1GPsmk,4206
pip/_vendor/colorama/__init__.py,sha256=eABG0aR8L-8JfIiftmvixrDZvqHawB7KIIxiRdKsi1k,217
pip/_vendor/colorama/ansitowin32.py,sha256=C0mA80tFRvkdHVTHzvyrCzsI0CNQ1gY9ng6deCxkbGY,6664
pip/_vendor/colorama/win32.py,sha256=tMAHgaTSySAt5BI5hBoID6oshHIYnJBlUqDsOoHbV0w,4911
pip-1.5.6.dist-info/DESCRIPTION.rst,sha256=n5sT7bxCOnG9ej7TtEjjARQZ_n2ECqWFDiJK88BM0u0,1422
pip-1.5.6.dist-info/RECORD,,
pip-1.5.6.dist-info/METADATA,sha256=lUBJx4V5mJY0jPlxYlu1x4YUNML-AN4dn4Dv-EFX8-Y,2499
pip-1.5.6.dist-info/WHEEL,sha256=SXYYsi-y-rEGIva8sB8iKF6bAFD6YDhmqHX5hI3fc0o,110
pip-1.5.6.dist-info/pydist.json,sha256=yrXk8x9BKWCO-rczdhGAJrjzpeSnpHGuzrqDWFuvHG4,1361
pip-1.5.6.dist-info/entry_points.txt,sha256=2mkeZUaOiR298x7zZKPO096k0xSVuma0UD8AQ6EPF-A,68
pip-1.5.6.dist-info/top_level.txt,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
/opt/alt/python34/bin/pip,sha256=b7pTs3uoz2WlGRPFiAY4p19F-R4PbrYc7Z8qqYPbsbM,218
/opt/alt/python34/bin/pip3,sha256=b7pTs3uoz2WlGRPFiAY4p19F-R4PbrYc7Z8qqYPbsbM,218
/opt/alt/python34/bin/pip3.4,sha256=b7pTs3uoz2WlGRPFiAY4p19F-R4PbrYc7Z8qqYPbsbM,218
pip/_vendor/requests/packages/chardet/__pycache__/langcyrillicmodel.cpython-34.pyc,,
pip/__pycache__/pep425tags.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/database.cpython-34.pyc,,
pip/_vendor/colorama/__pycache__/initialise.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/status_codes.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/timeout.cpython-34.pyc,,
pip/__pycache__/__main__.cpython-34.pyc,,
pip/_vendor/__pycache__/re-vendor.cpython-34.pyc,,
pip/_vendor/html5lib/filters/__pycache__/alphabeticalattributes.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/sessions.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/contrib/__pycache__/__init__.cpython-34.pyc,,
pip/commands/__pycache__/help.cpython-34.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/_base.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/eucjpprober.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/lxmletree.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/hooks.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/big5freq.cpython-34.pyc,,
pip/__pycache__/basecommand.cpython-34.pyc,,
pip/commands/__pycache__/completion.cpython-34.pyc,,
pip/vcs/__pycache__/subversion.cpython-34.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/etree.cpython-34.pyc,,
pip/commands/__pycache__/bundle.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/cp949prober.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/util.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/latin1prober.cpython-34.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/etree.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/charsetprober.cpython-34.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/_base.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/connection.cpython-34.pyc,,
pip/__pycache__/exceptions.cpython-34.pyc,,
pip/commands/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/html5lib/__pycache__/inputstream.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/euctwfreq.cpython-34.pyc,,
pip/_vendor/html5lib/treeadapters/__pycache__/sax.cpython-34.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/dom.cpython-34.pyc,,
pip/_vendor/html5lib/filters/__pycache__/inject_meta_charset.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/mbcsgroupprober.cpython-34.pyc,,
pip/_vendor/requests/packages/__pycache__/__init__.cpython-34.pyc,,
pip/commands/__pycache__/list.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/fields.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/__init__.cpython-34.pyc,,
pip/__pycache__/baseparser.cpython-34.pyc,,
pip/_vendor/colorama/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/chardistribution.cpython-34.pyc,,
pip/__pycache__/cmdoptions.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/exceptions.cpython-34.pyc,,
pip/_vendor/html5lib/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/connection.cpython-34.pyc,,
pip/_vendor/html5lib/__pycache__/html5parser.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/compat.cpython-34.pyc,,
pip/vcs/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/chardetect.cpython-34.pyc,,
pip/vcs/__pycache__/mercurial.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/locators.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/version.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langhebrewmodel.cpython-34.pyc,,
pip/_vendor/__pycache__/pkg_resources.cpython-34.pyc,,
pip/_vendor/html5lib/__pycache__/ihatexml.cpython-34.pyc,,
pip/__pycache__/req.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/euctwprober.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/response.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/manifest.cpython-34.pyc,,
pip/_vendor/_markerlib/__pycache__/markers.cpython-34.pyc,,
pip/commands/__pycache__/uninstall.cpython-34.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/etree_lxml.cpython-34.pyc,,
pip/commands/__pycache__/search.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/poolmanager.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langgreekmodel.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/index.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/exceptions.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/euckrprober.cpython-34.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/dom.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/markers.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/gb2312prober.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langthaimodel.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/api.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/cookies.cpython-34.pyc,,
pip/commands/__pycache__/install.cpython-34.pyc,,
pip/_vendor/colorama/__pycache__/ansi.cpython-34.pyc,,
pip/_vendor/html5lib/__pycache__/constants.cpython-34.pyc,,
pip/__pycache__/index.cpython-34.pyc,,
pip/__pycache__/runner.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/request.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/big5prober.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/sjisprober.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/contrib/__pycache__/pyopenssl.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/compat.cpython-34.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/pulldom.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/resources.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/packages/__pycache__/__init__.cpython-34.pyc,,
pip/__pycache__/download.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/connectionpool.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/mbcharsetprober.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/sbcsgroupprober.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/adapters.cpython-34.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/contrib/__pycache__/ntlmpool.cpython-34.pyc,,
pip/_vendor/colorama/__pycache__/win32.cpython-34.pyc,,
pip/commands/__pycache__/unzip.cpython-34.pyc,,
pip/__pycache__/log.cpython-34.pyc,,
pip/_vendor/html5lib/__pycache__/sanitizer.cpython-34.pyc,,
pip/__pycache__/locations.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/_collections.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/_implementation.cpython-34.pyc,,
pip/_vendor/__pycache__/six.cpython-34.pyc,,
pip/_vendor/distlib/_backport/__pycache__/shutil.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/mbcssm.cpython-34.pyc,,
pip/_vendor/html5lib/filters/__pycache__/lint.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langhungarianmodel.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/ssl_.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/response.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/auth.cpython-34.pyc,,
pip/_vendor/html5lib/filters/__pycache__/sanitizer.cpython-34.pyc,,
pip/_vendor/distlib/_backport/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/gb2312freq.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/jisfreq.cpython-34.pyc,,
pip/_vendor/colorama/__pycache__/winterm.cpython-34.pyc,,
pip/_vendor/html5lib/trie/__pycache__/_base.cpython-34.pyc,,
pip/commands/__pycache__/zip.cpython-34.pyc,,
pip/_vendor/distlib/_backport/__pycache__/misc.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/scripts.cpython-34.pyc,,
pip/_vendor/html5lib/filters/__pycache__/optionaltags.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/packages/__pycache__/six.cpython-34.pyc,,
pip/_vendor/html5lib/treebuilders/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/codingstatemachine.cpython-34.pyc,,
pip/commands/__pycache__/show.cpython-34.pyc,,
pip/vcs/__pycache__/bazaar.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/universaldetector.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/certs.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/utf8prober.cpython-34.pyc,,
pip/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/html5lib/__pycache__/utils.cpython-34.pyc,,
pip/_vendor/html5lib/treewalkers/__pycache__/genshistream.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/packages/__pycache__/ordered_dict.cpython-34.pyc,,
pip/vcs/__pycache__/git.cpython-34.pyc,,
pip/_vendor/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/html5lib/filters/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/_markerlib/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/escsm.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/structures.cpython-34.pyc,,
pip/commands/__pycache__/wheel.cpython-34.pyc,,
pip/_vendor/html5lib/trie/__pycache__/py.cpython-34.pyc,,
pip/_vendor/html5lib/filters/__pycache__/_base.cpython-34.pyc,,
pip/_vendor/html5lib/trie/__pycache__/datrie.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/hebrewprober.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/compat.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/charsetgroupprober.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/models.cpython-34.pyc,,
pip/_vendor/html5lib/__pycache__/tokenizer.cpython-34.pyc,,
pip/_vendor/html5lib/treeadapters/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/escprober.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/wheel.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/url.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/jpcntx.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/sbcharsetprober.cpython-34.pyc,,
pip/_vendor/html5lib/serializer/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/util/__pycache__/request.cpython-34.pyc,,
pip/_vendor/html5lib/serializer/__pycache__/htmlserializer.cpython-34.pyc,,
pip/__pycache__/status_codes.cpython-34.pyc,,
pip/_vendor/distlib/_backport/__pycache__/sysconfig.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/__init__.cpython-34.pyc,,
pip/commands/__pycache__/freeze.cpython-34.pyc,,
pip/_vendor/html5lib/trie/__pycache__/__init__.cpython-34.pyc,,
pip/__pycache__/wheel.cpython-34.pyc,,
pip/_vendor/distlib/_backport/__pycache__/tarfile.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/constants.cpython-34.pyc,,
pip/_vendor/requests/packages/urllib3/__pycache__/filepost.cpython-34.pyc,,
pip/_vendor/distlib/__pycache__/metadata.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/langbulgarianmodel.cpython-34.pyc,,
pip/_vendor/requests/__pycache__/utils.cpython-34.pyc,,
pip/backwardcompat/__pycache__/__init__.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/euckrfreq.cpython-34.pyc,,
pip/_vendor/html5lib/filters/__pycache__/whitespace.cpython-34.pyc,,
pip/__pycache__/util.cpython-34.pyc,,
pip/_vendor/colorama/__pycache__/ansitowin32.cpython-34.pyc,,
pip/_vendor/requests/packages/chardet/__pycache__/__init__.cpython-34.pyc,,
python3.4/site-packages/pip-1.5.6.dist-info/top_level.txt000064400000000004151735050030016705 0ustar00pip
python3.4/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst000064400000002616151735050030016503 0ustar00
Project Info
============

* Project Page: https://github.com/pypa/pip
* Install howto: https://pip.pypa.io/en/latest/installing.html
* Changelog: https://pip.pypa.io/en/latest/news.html
* Bug Tracking: https://github.com/pypa/pip/issues
* Mailing list: http://groups.google.com/group/python-virtualenv
* Docs: https://pip.pypa.io/
* User IRC: #pypa on Freenode.
* Dev IRC: #pypa-dev on Freenode.

Quickstart
==========

First, :doc:`Install pip <installing>`.

Install a package from `PyPI`_:

::

  $ pip install SomePackage
    [...]
    Successfully installed SomePackage

Show what files were installed:

::

  $ pip show --files SomePackage
    Name: SomePackage
    Version: 1.0
    Location: /my/env/lib/pythonx.x/site-packages
    Files:
     ../somepackage/__init__.py
     [...]

List what packages are outdated:

::

  $ pip list --outdated
    SomePackage (Current: 1.0 Latest: 2.0)

Upgrade a package:

::

  $ pip install --upgrade SomePackage
    [...]
    Found existing installation: SomePackage 1.0
    Uninstalling SomePackage:
      Successfully uninstalled SomePackage
    Running setup.py install for SomePackage
    Successfully installed SomePackage

Uninstall a package:

::

  $ pip uninstall SomePackage
    Uninstalling SomePackage:
      /my/env/lib/pythonx.x/site-packages/somepackage
    Proceed (y/n)? y
    Successfully uninstalled SomePackage


.. _PyPI: http://pypi.python.org/pypi/


python3.4/site-packages/pip-1.5.6.dist-info/WHEEL000064400000000156151735050030014752 0ustar00Wheel-Version: 1.0
Generator: bdist_wheel (0.22.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

python3.4/site-packages/setuptools-2.0.dist-info/zip-safe000064400000000002151735050030017073 0ustar00
python3.4/site-packages/setuptools-2.0.dist-info/entry_points.txt000064400000005325151735050030020745 0ustar00[egg_info.writers]
depends.txt = setuptools.command.egg_info:warn_depends_obsolete
top_level.txt = setuptools.command.egg_info:write_toplevel_names
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
requires.txt = setuptools.command.egg_info:write_requirements
entry_points.txt = setuptools.command.egg_info:write_entries
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
PKG-INFO = setuptools.command.egg_info:write_pkg_info
eager_resources.txt = setuptools.command.egg_info:overwrite_arg

[setuptools.file_finders]
svn_cvs = setuptools.command.sdist:_default_revctrl

[distutils.commands]
alias = setuptools.command.alias:alias
egg_info = setuptools.command.egg_info:egg_info
develop = setuptools.command.develop:develop
test = setuptools.command.test:test
register = setuptools.command.register:register
saveopts = setuptools.command.saveopts:saveopts
sdist = setuptools.command.sdist:sdist
build_ext = setuptools.command.build_ext:build_ext
rotate = setuptools.command.rotate:rotate
setopt = setuptools.command.setopt:setopt
install_egg_info = setuptools.command.install_egg_info:install_egg_info
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
easy_install = setuptools.command.easy_install:easy_install
bdist_egg = setuptools.command.bdist_egg:bdist_egg
install_lib = setuptools.command.install_lib:install_lib
install = setuptools.command.install:install
bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst
upload_docs = setuptools.command.upload_docs:upload_docs
build_py = setuptools.command.build_py:build_py
install_scripts = setuptools.command.install_scripts:install_scripts

[distutils.setup_keywords]
include_package_data = setuptools.dist:assert_bool
tests_require = setuptools.dist:check_requirements
install_requires = setuptools.dist:check_requirements
dependency_links = setuptools.dist:assert_string_list
entry_points = setuptools.dist:check_entry_points
packages = setuptools.dist:check_packages
namespace_packages = setuptools.dist:check_nsp
test_suite = setuptools.dist:check_test_suite
package_data = setuptools.dist:check_package_data
extras_require = setuptools.dist:check_extras
test_loader = setuptools.dist:check_importable
zip_safe = setuptools.dist:assert_bool
use_2to3_fixers = setuptools.dist:assert_string_list
convert_2to3_doctests = setuptools.dist:assert_string_list
exclude_package_data = setuptools.dist:check_package_data
use_2to3_exclude_fixers = setuptools.dist:assert_string_list
eager_resources = setuptools.dist:assert_string_list
use_2to3 = setuptools.dist:assert_bool

[console_scripts]
easy_install = setuptools.command.easy_install:main
easy_install-3.4 = setuptools.command.easy_install:main

[setuptools.installation]
eggsecutable = setuptools.command.easy_install:bootstrap

python3.4/site-packages/setuptools-2.0.dist-info/METADATA000064400000213042151735050030016547 0ustar00Metadata-Version: 2.0
Name: setuptools
Version: 2.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://pypi.python.org/pypi/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: PSF or ZPL
Keywords: CPAN PyPI distutils eggs package management
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Provides-Extra: ssl:sys_platform=='win32'
Requires-Dist: wincertstore (==0.1); extra == "ssl:sys_platform=='win32'"
Provides-Extra: certs
Requires-Dist: certifi (==0.0.8); extra == 'certs'

===============================
Installing and Using Setuptools
===============================

.. contents:: **Table of Contents**


-------------------------
Installation Instructions
-------------------------

Upgrading from Distribute
=========================

Currently, Distribute disallows installing Setuptools 0.7+ over Distribute.
You must first uninstall any active version of Distribute first (see
`Uninstalling`_).

Upgrading from Setuptools 0.6
=============================

Upgrading from prior versions of Setuptools is supported. Initial reports
good success in this regard.

Windows
=======

The recommended way to install setuptools on Windows is to download
`ez_setup.py`_ and run it. The script will download the appropriate .egg
file and install it for you.

.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

For best results, uninstall previous versions FIRST (see `Uninstalling`_).

Once installation is complete, you will find an ``easy_install`` program in
your Python ``Scripts`` subdirectory.  For simple invocation and best results,
add this directory to your ``PATH`` environment variable, if it is not already
present.


Unix-based Systems including Mac OS X
=====================================

Download `ez_setup.py`_ and run it using the target Python version. The script
will download the appropriate version and install it for you::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

Note that you will may need to invoke the command with superuser privileges to
install to the system Python::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

Alternatively, on Python 2.6 and later, Setuptools may be installed to a
user-local path::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
    > python ez_setup.py --user


Python 2.4 and Python 2.5 support
=================================

Setuptools 2.0 and later requires Python 2.6 or later. To install setuptools
on Python 2.4 or Python 2.5, use the bootstrap script for Setuptools 1.x:
https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py.


Advanced Installation
=====================

For more advanced installation options, such as installing to custom
locations or prefixes, download and extract the source
tarball from `Setuptools on PyPI <https://pypi.python.org/pypi/setuptools>`_
and run setup.py with any supported distutils and Setuptools options.
For example::

    setuptools-x.x$ python setup.py --prefix=/opt/setuptools

Use ``--help`` to get a full options list, but we recommend consulting
the `EasyInstall manual`_ for detailed instructions, especially `the section
on custom installation locations`_.

.. _EasyInstall manual: https://pythonhosted.org/setuptools/EasyInstall
.. _the section on custom installation locations: https://pythonhosted.org/setuptools/EasyInstall#custom-installation-locations


Downloads
=========

All setuptools downloads can be found at `the project's home page in the Python
Package Index`_.  Scroll to the very bottom of the page to find the links.

.. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools

In addition to the PyPI downloads, the development version of ``setuptools``
is available from the `Bitbucket repo`_, and in-development versions of the
`0.6 branch`_ are available as well.

.. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev
.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06

Uninstalling
============

On Windows, if Setuptools was installed using an ``.exe`` or ``.msi``
installer, simply use the uninstall feature of "Add/Remove Programs" in the
Control Panel.

Otherwise, to uninstall Setuptools or Distribute, regardless of the Python
version, delete all ``setuptools*`` and ``distribute*`` files and
directories from your system's ``site-packages`` directory
(and any other ``sys.path`` directories) FIRST.

If you are upgrading or otherwise plan to re-install Setuptools or Distribute,
nothing further needs to be done. If you want to completely remove Setuptools,
you may also want to remove the 'easy_install' and 'easy_install-x.x' scripts
and associated executables installed to the Python scripts directory.

--------------------------------
Using Setuptools and EasyInstall
--------------------------------

Here are some of the available manuals, tutorials, and other resources for
learning about Setuptools, Python Eggs, and EasyInstall:

* `The EasyInstall user's guide and reference manual`_
* `The setuptools Developer's Guide`_
* `The pkg_resources API reference`_
* `Package Compatibility Notes`_ (user-maintained)
* `The Internal Structure of Python Eggs`_

Questions, comments, and bug reports should be directed to the `distutils-sig
mailing list`_.  If you have written (or know of) any tutorials, documentation,
plug-ins, or other resources for setuptools users, please let us know about
them there, so this reference list can be updated.  If you have working,
*tested* patches to correct problems or add features, you may submit them to
the `setuptools bug tracker`_.

.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/issues
.. _Package Compatibility Notes: https://pythonhosted.org/setuptools/PackageNotes
.. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html
.. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html
.. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html
.. _The EasyInstall user's guide and reference manual: https://pythonhosted.org/setuptools/easy_install.html
.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/


-------
Credits
-------

* The original design for the ``.egg`` format and the ``pkg_resources`` API was
  co-created by Phillip Eby and Bob Ippolito.  Bob also implemented the first
  version of ``pkg_resources``, and supplied the OS X operating system version
  compatibility algorithm.

* Ian Bicking implemented many early "creature comfort" features of
  easy_install, including support for downloading via Sourceforge and
  Subversion repositories.  Ian's comments on the Web-SIG about WSGI
  application deployment also inspired the concept of "entry points" in eggs,
  and he has given talks at PyCon and elsewhere to inform and educate the
  community about eggs and setuptools.

* Jim Fulton contributed time and effort to build automated tests of various
  aspects of ``easy_install``, and supplied the doctests for the command-line
  ``.exe`` wrappers on Windows.

* Phillip J. Eby is the seminal author of setuptools, and
  first proposed the idea of an importable binary distribution format for
  Python application plug-ins.

* Significant parts of the implementation of setuptools were funded by the Open
  Source Applications Foundation, to provide a plug-in infrastructure for the
  Chandler PIM application.  In addition, many OSAF staffers (such as Mike
  "Code Bear" Taylor) contributed their time and stress as guinea pigs for the
  use of eggs and setuptools, even before eggs were "cool".  (Thanks, guys!)

* Since the merge with Distribute, Jason R. Coombs is the
  maintainer of setuptools.  The project is maintained in coordination with
  the Python Packaging Authority (PyPA) and the larger Python community.

.. _files:

=======
CHANGES
=======

---
2.0
---

* `Issue #121 <https://bitbucket.org/pypa/setuptools/issue/121>`_: Exempt lib2to3 pickled grammars from DirectorySandbox.
* `Issue #41 <https://bitbucket.org/pypa/setuptools/issue/41>`_: Dropped support for Python 2.4 and Python 2.5. Clients requiring
  setuptools for those versions of Python should use setuptools 1.x.
* Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients
  expecting this boolean variable should use ``site.ENABLE_USER_SITE``
  instead.
* Removed ``pkg_resources.ImpWrapper``. Clients that expected this class
  should use ``pkgutil.ImpImporter`` instead.

-----
1.4.2
-----

* `Issue #116 <https://bitbucket.org/pypa/setuptools/issue/116>`_: Correct TypeError when reading a local package index on Python
  3.

-----
1.4.1
-----

* `Issue #114 <https://bitbucket.org/pypa/setuptools/issue/114>`_: Use ``sys.getfilesystemencoding`` for decoding config in
  ``bdist_wininst`` distributions.

* `Issue #105 <https://bitbucket.org/pypa/setuptools/issue/105>`_ and `Issue #113 <https://bitbucket.org/pypa/setuptools/issue/113>`_: Establish a more robust technique for
  determining the terminal encoding::

    1. Try ``getpreferredencoding``
    2. If that returns US_ASCII or None, try the encoding from
       ``getdefaultlocale``. If that encoding was a "fallback" because Python
       could not figure it out from the environment or OS, encoding remains
       unresolved.
    3. If the encoding is resolved, then make sure Python actually implements
       the encoding.
    4. On the event of an error or unknown codec, revert to fallbacks
       (UTF-8 on Darwin, ASCII on everything else).
    5. On the encoding is 'mac-roman' on Darwin, use UTF-8 as 'mac-roman' was
       a bug on older Python releases.

    On a side note, it would seem that the encoding only matters for when SVN
    does not yet support ``--xml`` and when getting repository and svn version
    numbers. The ``--xml`` technique should yield UTF-8 according to some
    messages on the SVN mailing lists. So if the version numbers are always
    7-bit ASCII clean, it may be best to only support the file parsing methods
    for legacy SVN releases and support for SVN without the subprocess command
    would simple go away as support for the older SVNs does.

---
1.4
---

* `Issue #27 <https://bitbucket.org/pypa/setuptools/issue/27>`_: ``easy_install`` will now use credentials from .pypirc if
  present for connecting to the package index.
* `Pull Request #21 <https://bitbucket.org/pypa/setuptools/pull-request/21>`_: Omit unwanted newlines in ``package_index._encode_auth``
  when the username/password pair length indicates wrapping.

-----
1.3.2
-----

* `Issue #99 <https://bitbucket.org/pypa/setuptools/issue/99>`_: Fix filename encoding issues in SVN support.

-----
1.3.1
-----

* Remove exuberant warning in SVN support when SVN is not used.

---
1.3
---

* Address security vulnerability in SSL match_hostname check as reported in
  `Python #17997 <http://bugs.python.org/issue17997>`_.
* Prefer `backports.ssl_match_hostname
  <https://pypi.python.org/pypi/backports.ssl_match_hostname>`_ for backport
  implementation if present.
* Correct NameError in ``ssl_support`` module (``socket.error``).

---
1.2
---

* `Issue #26 <https://bitbucket.org/pypa/setuptools/issue/26>`_: Add support for SVN 1.7. Special thanks to Philip Thiem for the
  contribution.
* `Issue #93 <https://bitbucket.org/pypa/setuptools/issue/93>`_: Wheels are now distributed with every release. Note that as
  reported in `Issue #108 <https://bitbucket.org/pypa/setuptools/issue/108>`_, as of Pip 1.4, scripts aren't installed properly
  from wheels. Therefore, if using Pip to install setuptools from a wheel,
  the ``easy_install`` command will not be available.
* Setuptools "natural" launcher support, introduced in 1.0, is now officially
  supported.

-----
1.1.7
-----

* Fixed behavior of NameError handling in 'script template (dev).py' (script
  launcher for 'develop' installs).
* ``ez_setup.py`` now ensures partial downloads are cleaned up following
  a failed download.
* `Distribute #363 <https://bitbucket.org/tarek/distribute/issue/363>`_ and `Issue #55 <https://bitbucket.org/pypa/setuptools/issue/55>`_: Skip an sdist test that fails on locales
  other than UTF-8.

-----
1.1.6
-----

* `Distribute #349 <https://bitbucket.org/tarek/distribute/issue/349>`_: ``sandbox.execfile`` now opens the target file in binary
  mode, thus honoring a BOM in the file when compiled.

-----
1.1.5
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Second attempt at fix (logic was reversed).

-----
1.1.4
-----

* `Issue #77 <https://bitbucket.org/pypa/setuptools/issue/77>`_: Fix error in upload command (Python 2.4).

-----
1.1.3
-----

* Fix NameError in previous patch.

-----
1.1.2
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Correct issue where 404 errors are returned for URLs with
  fragments in them (such as #egg=).

-----
1.1.1
-----

* `Issue #75 <https://bitbucket.org/pypa/setuptools/issue/75>`_: Add ``--insecure`` option to ez_setup.py to accommodate
  environments where a trusted SSL connection cannot be validated.
* `Issue #76 <https://bitbucket.org/pypa/setuptools/issue/76>`_: Fix AttributeError in upload command with Python 2.4.

---
1.1
---

* `Issue #71 <https://bitbucket.org/pypa/setuptools/issue/71>`_ (`Distribute #333 <https://bitbucket.org/tarek/distribute/issue/333>`_): EasyInstall now puts less emphasis on the
  condition when a host is blocked via ``--allow-hosts``.
* `Issue #72 <https://bitbucket.org/pypa/setuptools/issue/72>`_: Restored Python 2.4 compatibility in ``ez_setup.py``.

---
1.0
---

* `Issue #60 <https://bitbucket.org/pypa/setuptools/issue/60>`_: On Windows, Setuptools supports deferring to another launcher,
  such as Vinay Sajip's `pylauncher <https://bitbucket.org/pypa/pylauncher>`_
  (included with Python 3.3) to launch console and GUI scripts and not install
  its own launcher executables. This experimental functionality is currently
  only enabled if  the ``SETUPTOOLS_LAUNCHER`` environment variable is set to
  "natural". In the future, this behavior may become default, but only after
  it has matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER``
  also accepts "executable" to force the default behavior of creating launcher
  executables.
* `Issue #63 <https://bitbucket.org/pypa/setuptools/issue/63>`_: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or
  wget for retrieving the Setuptools tarball for improved security of the
  install. The script will still fall back to a simple ``urlopen`` on
  platforms that do not have these tools.
* `Issue #65 <https://bitbucket.org/pypa/setuptools/issue/65>`_: Deprecated the ``Features`` functionality.
* `Issue #52 <https://bitbucket.org/pypa/setuptools/issue/52>`_: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied)
  connection.

Backward-Incompatible Changes
=============================

This release includes a couple of backward-incompatible changes, but most if
not all users will find 1.0 a drop-in replacement for 0.9.

* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: Normalized API of environment marker support. Specifically,
  removed line number and filename from SyntaxErrors when returned from
  `pkg_resources.invalid_marker`. Any clients depending on the specific
  string representation of exceptions returned by that function may need to
  be updated to account for this change.
* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: SyntaxErrors generated by `pkg_resources.invalid_marker` are
  normalized for cross-implementation consistency.
* Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting``
  options to easy_install. These options have been deprecated since 0.6a11.

-----
0.9.8
-----

* `Issue #53 <https://bitbucket.org/pypa/setuptools/issue/53>`_: Fix NameErrors in `_vcs_split_rev_from_url`.

-----
0.9.7
-----

* `Issue #49 <https://bitbucket.org/pypa/setuptools/issue/49>`_: Correct AttributeError on PyPy where a hashlib.HASH object does
  not have a `.name` attribute.
* `Issue #34 <https://bitbucket.org/pypa/setuptools/issue/34>`_: Documentation now refers to bootstrap script in code repository
  referenced by bookmark.
* Add underscore-separated keys to environment markers (markerlib).

-----
0.9.6
-----

* `Issue #44 <https://bitbucket.org/pypa/setuptools/issue/44>`_: Test failure on Python 2.4 when MD5 hash doesn't have a `.name`
  attribute.

-----
0.9.5
-----

* `Python #17980 <http://bugs.python.org/issue17980>`_: Fix security vulnerability in SSL certificate validation.

-----
0.9.4
-----

* `Issue #43 <https://bitbucket.org/pypa/setuptools/issue/43>`_: Fix issue (introduced in 0.9.1) with version resolution when
  upgrading over other releases of Setuptools.

-----
0.9.3
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix new ``AttributeError`` introduced in last fix.

-----
0.9.2
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix regression where blank checksums would trigger an
  ``AttributeError``.

-----
0.9.1
-----

* `Distribute #386 <https://bitbucket.org/tarek/distribute/issue/386>`_: Allow other positional and keyword arguments to os.open.
* Corrected dependency on certifi mis-referenced in 0.9.

---
0.9
---

* `package_index` now validates hashes other than MD5 in download links.

---
0.8
---

* Code base now runs on Python 2.4 - Python 3.3 without Python 2to3
  conversion.

-----
0.7.8
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Yet another fix for yet another regression.

-----
0.7.7
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release (redo).
* `Issue #30 <https://bitbucket.org/pypa/setuptools/issue/30>`_: Added test for get_cache_path.

-----
0.7.6
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release.

-----
0.7.5
-----

* `Issue #21 <https://bitbucket.org/pypa/setuptools/issue/21>`_: Restore Python 2.4 compatibility in ``test_easy_install``.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Merged additional warning from Distribute 0.6.46.
* Now honor the environment variable
  ``SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT`` in addition to the now
  deprecated ``DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT``.

-----
0.7.4
-----

* `Issue #20 <https://bitbucket.org/pypa/setuptools/issue/20>`_: Fix comparison of parsed SVN version on Python 3.

-----
0.7.3
-----

* `Issue #1 <https://bitbucket.org/pypa/setuptools/issue/1>`_: Disable installation of Windows-specific files on non-Windows systems.
* Use new sysconfig module with Python 2.7 or >=3.2.

-----
0.7.2
-----

* `Issue #14 <https://bitbucket.org/pypa/setuptools/issue/14>`_: Use markerlib when the `parser` module is not available.
* `Issue #10 <https://bitbucket.org/pypa/setuptools/issue/10>`_: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI.

-----
0.7.1
-----

* Fix NameError (`Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_) again - broken in bad merge.

---
0.7
---

* Merged Setuptools and Distribute. See docs/merge.txt for details.

Added several features that were slated for setuptools 0.6c12:

* Index URL now defaults to HTTPS.
* Added experimental environment marker support. Now clients may designate a
  PEP-426 environment marker for "extra" dependencies. Setuptools uses this
  feature in ``setup.py`` for optional SSL and certificate validation support
  on older platforms. Based on Distutils-SIG discussions, the syntax is
  somewhat tentative. There should probably be a PEP with a firmer spec before
  the feature should be considered suitable for use.
* Added support for SSL certificate validation when installing packages from
  an HTTPS service.

-----
0.7b4
-----

* `Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_: Fixed NameError in SSL support.

------
0.6.49
------

* Move warning check in ``get_cache_path`` to follow the directory creation
  to avoid errors when the cache path does not yet exist. Fixes the error
  reported in `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_.

------
0.6.48
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46 (redo).

------
0.6.47
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46.

------
0.6.46
------

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Issue a warning if the PYTHON_EGG_CACHE or otherwise
  customized egg cache location specifies a directory that's group- or
  world-writable.

------
0.6.45
------

* `Distribute #379 <https://bitbucket.org/tarek/distribute/issue/379>`_: ``distribute_setup.py`` now traps VersionConflict as well,
  restoring ability to upgrade from an older setuptools version.

------
0.6.44
------

* ``distribute_setup.py`` has been updated to allow Setuptools 0.7 to
  satisfy use_setuptools.

------
0.6.43
------

* `Distribute #378 <https://bitbucket.org/tarek/distribute/issue/378>`_: Restore support for Python 2.4 Syntax (regression in 0.6.42).

------
0.6.42
------

* External links finder no longer yields duplicate links.
* `Distribute #337 <https://bitbucket.org/tarek/distribute/issue/337>`_: Moved site.py to setuptools/site-patch.py (graft of very old
  patch from setuptools trunk which inspired PR `#31 <https://bitbucket.org/pypa/setuptools/issue/31>`_).

------
0.6.41
------

* `Distribute #27 <https://bitbucket.org/tarek/distribute/issue/27>`_: Use public api for loading resources from zip files rather than
  the private method `_zip_directory_cache`.
* Added a new function ``easy_install.get_win_launcher`` which may be used by
  third-party libraries such as buildout to get a suitable script launcher.

------
0.6.40
------

* `Distribute #376 <https://bitbucket.org/tarek/distribute/issue/376>`_: brought back cli.exe and gui.exe that were deleted in the
  previous release.

------
0.6.39
------

* Add support for console launchers on ARM platforms.
* Fix possible issue in GUI launchers where the subsystem was not supplied to
  the linker.
* Launcher build script now refactored for robustness.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Resources extracted from a zip egg to the file system now also
  check the contents of the file against the zip contents during each
  invocation of get_resource_filename.

------
0.6.38
------

* `Distribute #371 <https://bitbucket.org/tarek/distribute/issue/371>`_: The launcher manifest file is now installed properly.

------
0.6.37
------

* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Launcher scripts, including easy_install itself, are now
  accompanied by a manifest on 32-bit Windows environments to avoid the
  Installer Detection Technology and thus undesirable UAC elevation described
  in `this Microsoft article
  <http://technet.microsoft.com/en-us/library/cc709628%28WS.10%29.aspx>`_.

------
0.6.36
------

* `Pull Request #35 <https://bitbucket.org/pypa/setuptools/pull-request/35>`_: In `Buildout #64 <https://github.com/buildout/buildout/issues/64>`_, it was reported that
  under Python 3, installation of distutils scripts could attempt to copy
  the ``__pycache__`` directory as a file, causing an error, apparently only
  under Windows. Easy_install now skips all directories when processing
  metadata scripts.

------
0.6.35
------


Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in
how it parses version numbers.

* `Distribute #278 <https://bitbucket.org/tarek/distribute/issue/278>`_: Restored compatibility with distribute 0.6.22 and setuptools
  0.6. Updated the documentation to match more closely with the version
  parsing as intended in setuptools 0.6.

------
0.6.34
------

* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: 0.6.33 fails to build under Python 2.4.

------
0.6.33
------

* Fix 2 errors with Jython 2.5.
* Fix 1 failure with Jython 2.5 and 2.7.
* Disable workaround for Jython scripts on Linux systems.
* `Distribute #336 <https://bitbucket.org/tarek/distribute/issue/336>`_: `setup.py` no longer masks failure exit code when tests fail.
* Fix issue in pkg_resources where try/except around a platform-dependent
  import would trigger hook load failures on Mercurial. See pull request 32
  for details.
* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: Fix a ResourceWarning.

------
0.6.32
------

* Fix test suite with Python 2.6.
* Fix some DeprecationWarnings and ResourceWarnings.
* `Distribute #335 <https://bitbucket.org/tarek/distribute/issue/335>`_: Backed out `setup_requires` superceding installed requirements
  until regression can be addressed.

------
0.6.31
------

* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Make sure the manifest only ever contains UTF-8 in Python 3.
* `Distribute #329 <https://bitbucket.org/tarek/distribute/issue/329>`_: Properly close files created by tests for compatibility with
  Jython.
* Work around `Jython #1980 <http://bugs.jython.org/issue1980>`_ and `Jython #1981 <http://bugs.jython.org/issue1981>`_.
* `Distribute #334 <https://bitbucket.org/tarek/distribute/issue/334>`_: Provide workaround for packages that reference `sys.__stdout__`
  such as numpy does. This change should address
  `virtualenv `#359 <https://bitbucket.org/pypa/setuptools/issue/359>`_ <https://github.com/pypa/virtualenv/issues/359>`_ as long
  as the system encoding is UTF-8 or the IO encoding is specified in the
  environment, i.e.::

     PYTHONIOENCODING=utf8 pip install numpy

* Fix for encoding issue when installing from Windows executable on Python 3.
* `Distribute #323 <https://bitbucket.org/tarek/distribute/issue/323>`_: Allow `setup_requires` requirements to supercede installed
  requirements. Added some new keyword arguments to existing pkg_resources
  methods. Also had to updated how __path__ is handled for namespace packages
  to ensure that when a new egg distribution containing a namespace package is
  placed on sys.path, the entries in __path__ are found in the same order they
  would have been in had that egg been on the path when pkg_resources was
  first imported.

------
0.6.30
------

* `Distribute #328 <https://bitbucket.org/tarek/distribute/issue/328>`_: Clean up temporary directories in distribute_setup.py.
* Fix fatal bug in distribute_setup.py.

------
0.6.29
------

* `Pull Request #14 <https://bitbucket.org/pypa/setuptools/pull-request/14>`_: Honor file permissions in zip files.
* `Distribute #327 <https://bitbucket.org/tarek/distribute/issue/327>`_: Merged pull request `#24 <https://bitbucket.org/pypa/setuptools/issue/24>`_ to fix a dependency problem with pip.
* Merged pull request `#23 <https://bitbucket.org/pypa/setuptools/issue/23>`_ to fix https://github.com/pypa/virtualenv/issues/301.
* If Sphinx is installed, the `upload_docs` command now runs `build_sphinx`
  to produce uploadable documentation.
* `Distribute #326 <https://bitbucket.org/tarek/distribute/issue/326>`_: `upload_docs` provided mangled auth credentials under Python 3.
* `Distribute #320 <https://bitbucket.org/tarek/distribute/issue/320>`_: Fix check for "createable" in distribute_setup.py.
* `Distribute #305 <https://bitbucket.org/tarek/distribute/issue/305>`_: Remove a warning that was triggered during normal operations.
* `Distribute #311 <https://bitbucket.org/tarek/distribute/issue/311>`_: Print metadata in UTF-8 independent of platform.
* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Read manifest file with UTF-8 encoding under Python 3.
* `Distribute #301 <https://bitbucket.org/tarek/distribute/issue/301>`_: Allow to run tests of namespace packages when using 2to3.
* `Distribute #304 <https://bitbucket.org/tarek/distribute/issue/304>`_: Prevent import loop in site.py under Python 3.3.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3.
* `Distribute #299 <https://bitbucket.org/tarek/distribute/issue/299>`_: The develop command didn't work on Python 3, when using 2to3,
  as the egg link would go to the Python 2 source. Linking to the 2to3'd code
  in build/lib makes it work, although you will have to rebuild the module
  before testing it.
* `Distribute #306 <https://bitbucket.org/tarek/distribute/issue/306>`_: Even if 2to3 is used, we build in-place under Python 2.
* `Distribute #307 <https://bitbucket.org/tarek/distribute/issue/307>`_: Prints the full path when .svn/entries is broken.
* `Distribute #313 <https://bitbucket.org/tarek/distribute/issue/313>`_: Support for sdist subcommands (Python 2.7)
* `Distribute #314 <https://bitbucket.org/tarek/distribute/issue/314>`_: test_local_index() would fail an OS X.
* `Distribute #310 <https://bitbucket.org/tarek/distribute/issue/310>`_: Non-ascii characters in a namespace __init__.py causes errors.
* `Distribute #218 <https://bitbucket.org/tarek/distribute/issue/218>`_: Improved documentation on behavior of `package_data` and
  `include_package_data`. Files indicated by `package_data` are now included
  in the manifest.
* `distribute_setup.py` now allows a `--download-base` argument for retrieving
  distribute from a specified location.

------
0.6.28
------

* `Distribute #294 <https://bitbucket.org/tarek/distribute/issue/294>`_: setup.py can now be invoked from any directory.
* Scripts are now installed honoring the umask.
* Added support for .dist-info directories.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Fix and disable scanning of `*.pyc` / `*.pyo` files on
  Python 3.3.

------
0.6.27
------

* Support current snapshots of CPython 3.3.
* Distribute now recognizes README.rst as a standard, default readme file.
* Exclude 'encodings' modules when removing modules from sys.modules.
  Workaround for `#285 <https://bitbucket.org/pypa/setuptools/issue/285>`_.
* `Distribute #231 <https://bitbucket.org/tarek/distribute/issue/231>`_: Don't fiddle with system python when used with buildout
  (bootstrap.py)

------
0.6.26
------

* `Distribute #183 <https://bitbucket.org/tarek/distribute/issue/183>`_: Symlinked files are now extracted from source distributions.
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: Easy_install fetch parameters are now passed during the
  installation of a source distribution; now fulfillment of setup_requires
  dependencies will honor the parameters passed to easy_install.

------
0.6.25
------

* `Distribute #258 <https://bitbucket.org/tarek/distribute/issue/258>`_: Workaround a cache issue
* `Distribute #260 <https://bitbucket.org/tarek/distribute/issue/260>`_: distribute_setup.py now accepts the --user parameter for
  Python 2.6 and later.
* `Distribute #262 <https://bitbucket.org/tarek/distribute/issue/262>`_: package_index.open_with_auth no longer throws LookupError
  on Python 3.
* `Distribute #269 <https://bitbucket.org/tarek/distribute/issue/269>`_: AttributeError when an exception occurs reading Manifest.in
  on late releases of Python.
* `Distribute #272 <https://bitbucket.org/tarek/distribute/issue/272>`_: Prevent TypeError when namespace package names are unicode
  and single-install-externally-managed is used. Also fixes PIP issue
  449.
* `Distribute #273 <https://bitbucket.org/tarek/distribute/issue/273>`_: Legacy script launchers now install with Python2/3 support.

------
0.6.24
------

* `Distribute #249 <https://bitbucket.org/tarek/distribute/issue/249>`_: Added options to exclude 2to3 fixers

------
0.6.23
------

* `Distribute #244 <https://bitbucket.org/tarek/distribute/issue/244>`_: Fixed a test
* `Distribute #243 <https://bitbucket.org/tarek/distribute/issue/243>`_: Fixed a test
* `Distribute #239 <https://bitbucket.org/tarek/distribute/issue/239>`_: Fixed a test
* `Distribute #240 <https://bitbucket.org/tarek/distribute/issue/240>`_: Fixed a test
* `Distribute #241 <https://bitbucket.org/tarek/distribute/issue/241>`_: Fixed a test
* `Distribute #237 <https://bitbucket.org/tarek/distribute/issue/237>`_: Fixed a test
* `Distribute #238 <https://bitbucket.org/tarek/distribute/issue/238>`_: easy_install now uses 64bit executable wrappers on 64bit Python
* `Distribute #208 <https://bitbucket.org/tarek/distribute/issue/208>`_: Fixed parsed_versions, it now honors post-releases as noted in the documentation
* `Distribute #207 <https://bitbucket.org/tarek/distribute/issue/207>`_: Windows cli and gui wrappers pass CTRL-C to child python process
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: easy_install now passes its arguments to setup.py bdist_egg
* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: Fixed a NameError on Python 2.5, 2.4

------
0.6.21
------

* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: FIxed a regression on py2.4

------
0.6.20
------

* `Distribute #135 <https://bitbucket.org/tarek/distribute/issue/135>`_: Include url in warning when processing URLs in package_index.
* `Distribute #212 <https://bitbucket.org/tarek/distribute/issue/212>`_: Fix issue where easy_instal fails on Python 3 on windows installer.
* `Distribute #213 <https://bitbucket.org/tarek/distribute/issue/213>`_: Fix typo in documentation.

------
0.6.19
------

* `Distribute #206 <https://bitbucket.org/tarek/distribute/issue/206>`_: AttributeError: 'HTTPMessage' object has no attribute 'getheaders'

------
0.6.18
------

* `Distribute #210 <https://bitbucket.org/tarek/distribute/issue/210>`_: Fixed a regression introduced by `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_ fix.

------
0.6.17
------

* Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment
  variable to allow to disable installation of easy_install-${version} script.
* Support Python >=3.1.4 and >=3.2.1.
* `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_: Don't try to import the parent of a namespace package in
  declare_namespace
* `Distribute #196 <https://bitbucket.org/tarek/distribute/issue/196>`_: Tolerate responses with multiple Content-Length headers
* `Distribute #205 <https://bitbucket.org/tarek/distribute/issue/205>`_: Sandboxing doesn't preserve working_set. Leads to setup_requires
  problems.

------
0.6.16
------

* Builds sdist gztar even on Windows (avoiding `Distribute #193 <https://bitbucket.org/tarek/distribute/issue/193>`_).
* `Distribute #192 <https://bitbucket.org/tarek/distribute/issue/192>`_: Fixed metadata omitted on Windows when package_dir
  specified with forward-slash.
* `Distribute #195 <https://bitbucket.org/tarek/distribute/issue/195>`_: Cython build support.
* `Distribute #200 <https://bitbucket.org/tarek/distribute/issue/200>`_: Issues with recognizing 64-bit packages on Windows.

------
0.6.15
------

* Fixed typo in bdist_egg
* Several issues under Python 3 has been solved.
* `Distribute #146 <https://bitbucket.org/tarek/distribute/issue/146>`_: Fixed missing DLL files after easy_install of windows exe package.

------
0.6.14
------

* `Distribute #170 <https://bitbucket.org/tarek/distribute/issue/170>`_: Fixed unittest failure. Thanks to Toshio.
* `Distribute #171 <https://bitbucket.org/tarek/distribute/issue/171>`_: Fixed race condition in unittests cause deadlocks in test suite.
* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Fixed a lookup issue with easy_install.
  Thanks to David and Zooko.
* `Distribute #174 <https://bitbucket.org/tarek/distribute/issue/174>`_: Fixed the edit mode when its used with setuptools itself

------
0.6.13
------

* `Distribute #160 <https://bitbucket.org/tarek/distribute/issue/160>`_: 2.7 gives ValueError("Invalid IPv6 URL")
* `Distribute #150 <https://bitbucket.org/tarek/distribute/issue/150>`_: Fixed using ~/.local even in a --no-site-packages virtualenv
* `Distribute #163 <https://bitbucket.org/tarek/distribute/issue/163>`_: scan index links before external links, and don't use the md5 when
  comparing two distributions

------
0.6.12
------

* `Distribute #149 <https://bitbucket.org/tarek/distribute/issue/149>`_: Fixed various failures on 2.3/2.4

------
0.6.11
------

* Found another case of SandboxViolation - fixed
* `Distribute #15 <https://bitbucket.org/tarek/distribute/issue/15>`_ and `Distribute #48 <https://bitbucket.org/tarek/distribute/issue/48>`_: Introduced a socket timeout of 15 seconds on url openings
* Added indexsidebar.html into MANIFEST.in
* `Distribute #108 <https://bitbucket.org/tarek/distribute/issue/108>`_: Fixed TypeError with Python3.1
* `Distribute #121 <https://bitbucket.org/tarek/distribute/issue/121>`_: Fixed --help install command trying to actually install.
* `Distribute #112 <https://bitbucket.org/tarek/distribute/issue/112>`_: Added an os.makedirs so that Tarek's solution will work.
* `Distribute #133 <https://bitbucket.org/tarek/distribute/issue/133>`_: Added --no-find-links to easy_install
* Added easy_install --user
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: Fixed develop --user not taking '.' in PYTHONPATH into account
* `Distribute #134 <https://bitbucket.org/tarek/distribute/issue/134>`_: removed spurious UserWarnings. Patch by VanLindberg
* `Distribute #138 <https://bitbucket.org/tarek/distribute/issue/138>`_: cant_write_to_target error when setup_requires is used.
* `Distribute #147 <https://bitbucket.org/tarek/distribute/issue/147>`_: respect the sys.dont_write_bytecode flag

------
0.6.10
------

* Reverted change made for the DistributionNotFound exception because
  zc.buildout uses the exception message to get the name of the
  distribution.

-----
0.6.9
-----

* `Distribute #90 <https://bitbucket.org/tarek/distribute/issue/90>`_: unknown setuptools version can be added in the working set
* `Distribute #87 <https://bitbucket.org/tarek/distribute/issue/87>`_: setupt.py doesn't try to convert distribute_setup.py anymore
  Initial Patch by arfrever.
* `Distribute #89 <https://bitbucket.org/tarek/distribute/issue/89>`_: added a side bar with a download link to the doc.
* `Distribute #86 <https://bitbucket.org/tarek/distribute/issue/86>`_: fixed missing sentence in pkg_resources doc.
* Added a nicer error message when a DistributionNotFound is raised.
* `Distribute #80 <https://bitbucket.org/tarek/distribute/issue/80>`_: test_develop now works with Python 3.1
* `Distribute #93 <https://bitbucket.org/tarek/distribute/issue/93>`_: upload_docs now works if there is an empty sub-directory.
* `Distribute #70 <https://bitbucket.org/tarek/distribute/issue/70>`_: exec bit on non-exec files
* `Distribute #99 <https://bitbucket.org/tarek/distribute/issue/99>`_: now the standalone easy_install command doesn't uses a
  "setup.cfg" if any exists in the working directory. It will use it
  only if triggered by ``install_requires`` from a setup.py call
  (install, develop, etc).
* `Distribute #101 <https://bitbucket.org/tarek/distribute/issue/101>`_: Allowing ``os.devnull`` in Sandbox
* `Distribute #92 <https://bitbucket.org/tarek/distribute/issue/92>`_: Fixed the "no eggs" found error with MacPort
  (platform.mac_ver() fails)
* `Distribute #103 <https://bitbucket.org/tarek/distribute/issue/103>`_: test_get_script_header_jython_workaround not run
  anymore under py3 with C or POSIX local. Contributed by Arfrever.
* `Distribute #104 <https://bitbucket.org/tarek/distribute/issue/104>`_: remvoved the assertion when the installation fails,
  with a nicer message for the end user.
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: making sure there's no SandboxViolation when
  the setup script patches setuptools.

-----
0.6.8
-----

* Added "check_packages" in dist. (added in Setuptools 0.6c11)
* Fixed the DONT_PATCH_SETUPTOOLS state.

-----
0.6.7
-----

* `Distribute #58 <https://bitbucket.org/tarek/distribute/issue/58>`_: Added --user support to the develop command
* `Distribute #11 <https://bitbucket.org/tarek/distribute/issue/11>`_: Generated scripts now wrap their call to the script entry point
  in the standard "if name == 'main'"
* Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv
  can drive an installation that doesn't patch a global setuptools.
* Reviewed unladen-swallow specific change from
  http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719
  and determined that it no longer applies. Distribute should work fine with
  Unladen Swallow 2009Q3.
* `Distribute #21 <https://bitbucket.org/tarek/distribute/issue/21>`_: Allow PackageIndex.open_url to gracefully handle all cases of a
  httplib.HTTPException instead of just InvalidURL and BadStatusLine.
* Removed virtual-python.py from this distribution and updated documentation
  to point to the actively maintained virtualenv instead.
* `Distribute #64 <https://bitbucket.org/tarek/distribute/issue/64>`_: use_setuptools no longer rebuilds the distribute egg every
  time it is run
* use_setuptools now properly respects the requested version
* use_setuptools will no longer try to import a distribute egg for the
  wrong Python version
* `Distribute #74 <https://bitbucket.org/tarek/distribute/issue/74>`_: no_fake should be True by default.
* `Distribute #72 <https://bitbucket.org/tarek/distribute/issue/72>`_: avoid a bootstrapping issue with easy_install -U

-----
0.6.6
-----

* Unified the bootstrap file so it works on both py2.x and py3k without 2to3
  (patch by Holger Krekel)

-----
0.6.5
-----

* `Distribute #65 <https://bitbucket.org/tarek/distribute/issue/65>`_: cli.exe and gui.exe are now generated at build time,
  depending on the platform in use.

* `Distribute #67 <https://bitbucket.org/tarek/distribute/issue/67>`_: Fixed doc typo (PEP 381/382)

* Distribute no longer shadows setuptools if we require a 0.7-series
  setuptools.  And an error is raised when installing a 0.7 setuptools with
  distribute.

* When run from within buildout, no attempt is made to modify an existing
  setuptools egg, whether in a shared egg directory or a system setuptools.

* Fixed a hole in sandboxing allowing builtin file to write outside of
  the sandbox.

-----
0.6.4
-----

* Added the generation of `distribute_setup_3k.py` during the release.
  This closes `Distribute #52 <https://bitbucket.org/tarek/distribute/issue/52>`_.

* Added an upload_docs command to easily upload project documentation to
  PyPI's https://pythonhosted.org. This close issue `Distribute #56 <https://bitbucket.org/tarek/distribute/issue/56>`_.

* Fixed a bootstrap bug on the use_setuptools() API.

-----
0.6.3
-----

setuptools
==========

* Fixed a bunch of calls to file() that caused crashes on Python 3.

bootstrapping
=============

* Fixed a bug in sorting that caused bootstrap to fail on Python 3.

-----
0.6.2
-----

setuptools
==========

* Added Python 3 support; see docs/python3.txt.
  This closes `Old Setuptools #39 <http://bugs.python.org/setuptools/issue39>`_.

* Added option to run 2to3 automatically when installing on Python 3.
  This closes issue `Distribute #31 <https://bitbucket.org/tarek/distribute/issue/31>`_.

* Fixed invalid usage of requirement.parse, that broke develop -d.
  This closes `Old Setuptools #44 <http://bugs.python.org/setuptools/issue44>`_.

* Fixed script launcher for 64-bit Windows.
  This closes `Old Setuptools #2 <http://bugs.python.org/setuptools/issue2>`_.

* KeyError when compiling extensions.
  This closes `Old Setuptools #41 <http://bugs.python.org/setuptools/issue41>`_.

bootstrapping
=============

* Fixed bootstrap not working on Windows. This closes issue `Distribute #49 <https://bitbucket.org/tarek/distribute/issue/49>`_.

* Fixed 2.6 dependencies. This closes issue `Distribute #50 <https://bitbucket.org/tarek/distribute/issue/50>`_.

* Make sure setuptools is patched when running through easy_install
  This closes `Old Setuptools #40 <http://bugs.python.org/setuptools/issue40>`_.

-----
0.6.1
-----

setuptools
==========

* package_index.urlopen now catches BadStatusLine and malformed url errors.
  This closes `Distribute #16 <https://bitbucket.org/tarek/distribute/issue/16>`_ and `Distribute #18 <https://bitbucket.org/tarek/distribute/issue/18>`_.

* zip_ok is now False by default. This closes `Old Setuptools #33 <http://bugs.python.org/setuptools/issue33>`_.

* Fixed invalid URL error catching. `Old Setuptools #20 <http://bugs.python.org/setuptools/issue20>`_.

* Fixed invalid bootstraping with easy_install installation (`Distribute #40 <https://bitbucket.org/tarek/distribute/issue/40>`_).
  Thanks to Florian Schulze for the help.

* Removed buildout/bootstrap.py. A new repository will create a specific
  bootstrap.py script.


bootstrapping
=============

* The boostrap process leave setuptools alone if detected in the system
  and --root or --prefix is provided, but is not in the same location.
  This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

---
0.6
---

setuptools
==========

* Packages required at build time where not fully present at install time.
  This closes `Distribute #12 <https://bitbucket.org/tarek/distribute/issue/12>`_.

* Protected against failures in tarfile extraction. This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

* Made Jython api_tests.txt doctest compatible. This closes `Distribute #7 <https://bitbucket.org/tarek/distribute/issue/7>`_.

* sandbox.py replaced builtin type file with builtin function open. This
  closes `Distribute #6 <https://bitbucket.org/tarek/distribute/issue/6>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

* Added compatibility with Subversion 1.6. This references `Distribute #1 <https://bitbucket.org/tarek/distribute/issue/1>`_.

pkg_resources
=============

* Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API
  instead. Based on a patch from ronaldoussoren. This closes issue `#5 <https://bitbucket.org/pypa/setuptools/issue/5>`_.

* Fixed a SandboxViolation for mkdir that could occur in certain cases.
  This closes `Distribute #13 <https://bitbucket.org/tarek/distribute/issue/13>`_.

* Allow to find_on_path on systems with tight permissions to fail gracefully.
  This closes `Distribute #9 <https://bitbucket.org/tarek/distribute/issue/9>`_.

* Corrected inconsistency between documentation and code of add_entry.
  This closes `Distribute #8 <https://bitbucket.org/tarek/distribute/issue/8>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

easy_install
============

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

-----
0.6c9
-----

 * Fixed a missing files problem when using Windows source distributions on
   non-Windows platforms, due to distutils not handling manifest file line
   endings correctly.

 * Updated Pyrex support to work with Pyrex 0.9.6 and higher.

 * Minor changes for Jython compatibility, including skipping tests that can't
   work on Jython.

 * Fixed not installing eggs in ``install_requires`` if they were also used for
   ``setup_requires`` or ``tests_require``.

 * Fixed not fetching eggs in ``install_requires`` when running tests.

 * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools
   installations when called from a standalone ``setup.py``.

 * Added a warning if a namespace package is declared, but its parent package
   is not also declared as a namespace.

 * Support Subversion 1.5

 * Removed use of deprecated ``md5`` module if ``hashlib`` is available

 * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice

 * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's
   ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``.

 * Ensure that _full_name is set on all shared libs before extensions are
   checked for shared lib usage.  (Fixes a bug in the experimental shared
   library build support.)

 * Fix to allow unpacked eggs containing native libraries to fail more
   gracefully under Google App Engine (with an ``ImportError`` loading the
   C-based module, instead of getting a ``NameError``).

-----
0.6c7
-----

 * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and
   ``egg_info`` command failing on new, uncommitted SVN directories.

 * Fix import problems with nested namespace packages installed via
   ``--root`` or ``--single-version-externally-managed``, due to the
   parent package not having the child package as an attribute.

-----
0.6c6
-----

 * Added ``--egg-path`` option to ``develop`` command, allowing you to force
   ``.egg-link`` files to use relative paths (allowing them to be shared across
   platforms on a networked drive).

 * Fix not building binary RPMs correctly.

 * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with
   bash-compatible shells.

 * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there
   was whitespace inside a quoted argument or at the end of the ``#!`` line
   (a regression introduced in 0.6c4).

 * Fix ``test`` command possibly failing if an older version of the project
   being tested was installed on ``sys.path`` ahead of the test source
   directory.

 * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in
   their names as packages.

-----
0.6c5
-----

 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg``
   packages under Python versions less than 2.5.

 * Fix uploaded ``bdist_wininst`` packages being described as suitable for
   "any" version by Python 2.5, even if a ``--target-version`` was specified.

-----
0.6c4
-----

 * Overhauled Windows script wrapping to support ``bdist_wininst`` better.
   Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or
   ``#!pythonw.exe`` as the executable name (even when built on non-Windows
   platforms!), and the wrappers will look for the executable in the script's
   parent directory (which should find the right version of Python).

 * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or
   ``bdist_wininst`` under Python 2.3 and 2.4.

 * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is
   prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish
   platforms.  (This is mainly so that setuptools itself can have a single-file
   installer on Unix, without doing multiple downloads, dealing with firewalls,
   etc.)

 * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files

 * Use cross-platform relative paths in ``easy-install.pth`` when doing
   ``develop`` and the source directory is a subdirectory of the installation
   target directory.

 * Fix a problem installing eggs with a system packaging tool if the project
   contained an implicit namespace package; for example if the ``setup()``
   listed a namespace package ``foo.bar`` without explicitly listing ``foo``
   as a namespace package.

-----
0.6c3
-----

 * Fixed breakages caused by Subversion 1.4's new "working copy" format

-----
0.6c2
-----

 * The ``ez_setup`` module displays the conflicting version of setuptools (and
   its installation location) when a script requests a version that's not
   available.

 * Running ``setup.py develop`` on a setuptools-using project will now install
   setuptools if needed, instead of only downloading the egg.

-----
0.6c1
-----

 * Fixed ``AttributeError`` when trying to download a ``setup_requires``
   dependency when a distribution lacks a ``dependency_links`` setting.

 * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so
   as to play better with packaging tools that complain about zero-length
   files.

 * Made ``setup.py develop`` respect the ``--no-deps`` option, which it
   previously was ignoring.

 * Support ``extra_path`` option to ``setup()`` when ``install`` is run in
   backward-compatibility mode.

 * Source distributions now always include a ``setup.cfg`` file that explicitly
   sets ``egg_info`` options such that they produce an identical version number
   to the source distribution's version number.  (Previously, the default
   version number could be different due to the use of ``--tag-date``, or if
   the version was overridden on the command line that built the source
   distribution.)

-----
0.6b4
-----

 * Fix ``register`` not obeying name/version set by ``egg_info`` command, if
   ``egg_info`` wasn't explicitly run first on the same command line.

 * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info``
   command, to allow suppressing tags configured in ``setup.cfg``.

 * Fixed redundant warnings about missing ``README`` file(s); it should now
   appear only if you are actually a source distribution.

-----
0.6b3
-----

 * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``.

 * Allow ``.py`` files found by the ``include_package_data`` option to be
   automatically included.  Remove duplicate data file matches if both
   ``include_package_data`` and ``package_data`` are used to refer to the same
   files.

-----
0.6b1
-----

 * Strip ``module`` from the end of compiled extension modules when computing
   the name of a ``.py`` loader/wrapper.  (Python's import machinery ignores
   this suffix when searching for an extension module.)

------
0.6a11
------

 * Added ``test_loader`` keyword to support custom test loaders

 * Added ``setuptools.file_finders`` entry point group to allow implementing
   revision control plugins.

 * Added ``--identity`` option to ``upload`` command.

 * Added ``dependency_links`` to allow specifying URLs for ``--find-links``.

 * Enhanced test loader to scan packages as well as modules, and call
   ``additional_tests()`` if present to get non-unittest tests.

 * Support namespace packages in conjunction with system packagers, by omitting
   the installation of any ``__init__.py`` files for namespace packages, and
   adding a special ``.pth`` file to create a working package in
   ``sys.modules``.

 * Made ``--single-version-externally-managed`` automatic when ``--root`` is
   used, so that most system packagers won't require special support for
   setuptools.

 * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or
   other configuration files for their option defaults when installing, and
   also made the install use ``--multi-version`` mode so that the project
   directory doesn't need to support .pth files.

 * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading
   it.  Previously, the file could be left open and the actual error would be
   masked by problems trying to remove the open file on Windows systems.

------
0.6a10
------

 * Fixed the ``develop`` command ignoring ``--find-links``.

-----
0.6a9
-----

 * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to
   create source distributions.  ``MANIFEST.in`` is still read and processed,
   as are the standard defaults and pruning.  But the manifest is built inside
   the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt
   every time the ``egg_info`` command is run.

 * Added the ``include_package_data`` keyword to ``setup()``, allowing you to
   automatically include any package data listed in revision control or
   ``MANIFEST.in``

 * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to
   trim back files included via the ``package_data`` and
   ``include_package_data`` options.

 * Fixed ``--tag-svn-revision`` not working when run from a source
   distribution.

 * Added warning for namespace packages with missing ``declare_namespace()``

 * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages
   requiring ``nose`` to run unit tests can make this dependency optional
   unless the ``test`` command is run.

 * Made all commands that use ``easy_install`` respect its configuration
   options, as this was causing some problems with ``setup.py install``.

 * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so
   that you can process a directory tree through a processing filter as if it
   were a zipfile or tarfile.

 * Added an internal ``install_egg_info`` command to use as part of old-style
   ``install`` operations, that installs an ``.egg-info`` directory with the
   package.

 * Added a ``--single-version-externally-managed`` option to the ``install``
   command so that you can more easily wrap a "flat" egg in a system package.

 * Enhanced ``bdist_rpm`` so that it installs single-version eggs that
   don't rely on a ``.pth`` file.  The ``--no-egg`` option has been removed,
   since all RPMs are now built in a more backwards-compatible format.

 * Support full roundtrip translation of eggs to and from ``bdist_wininst``
   format.  Running ``bdist_wininst`` on a setuptools-based package wraps the
   egg in an .exe that will safely install it as an egg (i.e., with metadata
   and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
   back into an ``.egg`` file or directory and install it as such.


-----
0.6a8
-----

 * Fixed some problems building extensions when Pyrex was installed, especially
   with Python 2.4 and/or packages using SWIG.

 * Made ``develop`` command accept all the same options as ``easy_install``,
   and use the ``easy_install`` command's configuration settings as defaults.

 * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision
   number from ``PKG-INFO`` in case it is being run on a source distribution of
   a snapshot taken from a Subversion-based project.

 * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being
   installed as data, adding them to ``native_libs.txt`` automatically.

 * Fixed some problems with fresh checkouts of projects that don't include
   ``.egg-info/PKG-INFO`` under revision control and put the project's source
   code directly in the project directory.  If such a package had any
   requirements that get processed before the ``egg_info`` command can be run,
   the setup scripts would fail with a "Missing 'Version:' header and/or
   PKG-INFO file" error, because the egg runtime interpreted the unbuilt
   metadata in a directory on ``sys.path`` (i.e. the current directory) as
   being a corrupted egg.  Setuptools now monkeypatches the distribution
   metadata cache to pretend that the egg has valid version information, until
   it has a chance to make it actually be so (via the ``egg_info`` command).

-----
0.6a5
-----

 * Fixed missing gui/cli .exe files in distribution.  Fixed bugs in tests.

-----
0.6a3
-----

 * Added ``gui_scripts`` entry point group to allow installing GUI scripts
   on Windows and other platforms.  (The special handling is only for Windows;
   other platforms are treated the same as for ``console_scripts``.)

-----
0.6a2
-----

 * Added ``console_scripts`` entry point group to allow installing scripts
   without the need to create separate script files.  On Windows, console
   scripts get an ``.exe`` wrapper so you can just type their name.  On other
   platforms, the scripts are written without a file extension.

-----
0.6a1
-----

 * Added support for building "old-style" RPMs that don't install an egg for
   the target package, using a ``--no-egg`` option.

 * The ``build_ext`` command now works better when using the ``--inplace``
   option and multiple Python versions.  It now makes sure that all extensions
   match the current Python version, even if newer copies were built for a
   different Python version.

 * The ``upload`` command no longer attaches an extra ``.zip`` when uploading
   eggs, as PyPI now supports egg uploads without trickery.

 * The ``ez_setup`` script/module now displays a warning before downloading
   the setuptools egg, and attempts to check the downloaded egg against an
   internal MD5 checksum table.

 * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the
   latest revision number; it was using the revision number of the directory
   containing ``setup.py``, not the highest revision number in the project.

 * Added ``eager_resources`` setup argument

 * The ``sdist`` command now recognizes Subversion "deleted file" entries and
   does not include them in source distributions.

 * ``setuptools`` now embeds itself more thoroughly into the distutils, so that
   other distutils extensions (e.g. py2exe, py2app) will subclass setuptools'
   versions of things, rather than the native distutils ones.

 * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``;
   ``setup_requires`` allows you to automatically find and download packages
   that are needed in order to *build* your project (as opposed to running it).

 * ``setuptools`` now finds its commands, ``setup()`` argument validators, and
   metadata writers using entry points, so that they can be extended by
   third-party packages.  See `Creating distutils Extensions
   <http://pythonhosted.org/setuptools/setuptools.html#creating-distutils-extensions>`_
   for more details.

 * The vestigial ``depends`` command has been removed.  It was never finished
   or documented, and never would have worked without EasyInstall - which it
   pre-dated and was never compatible with.

------
0.5a12
------

 * The zip-safety scanner now checks for modules that might be used with
   ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't
   handle ``-m`` on zipped modules.

------
0.5a11
------

 * Fix breakage of the "develop" command that was caused by the addition of
   ``--always-unzip`` to the ``easy_install`` command.

-----
0.5a9
-----

 * Include ``svn:externals`` directories in source distributions as well as
   normal subversion-controlled files and directories.

 * Added ``exclude=patternlist`` option to ``setuptools.find_packages()``

 * Changed --tag-svn-revision to include an "r" in front of the revision number
   for better readability.

 * Added ability to build eggs without including source files (except for any
   scripts, of course), using the ``--exclude-source-files`` option to
   ``bdist_egg``.

 * ``setup.py install`` now automatically detects when an "unmanaged" package
   or module is going to be on ``sys.path`` ahead of a package being installed,
   thereby preventing the newer version from being imported.  If this occurs,
   a warning message is output to ``sys.stderr``, but installation proceeds
   anyway.  The warning message informs the user what files or directories
   need deleting, and advises them they can also use EasyInstall (with the
   ``--delete-conflicting`` option) to do it automatically.

 * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata
   directory that lists all top-level modules and packages in the distribution.
   This is used by the ``easy_install`` command to find possibly-conflicting
   "unmanaged" packages when installing the distribution.

 * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``.
   Added package analysis to determine zip-safety if the ``zip_safe`` flag
   is not given, and advise the author regarding what code might need changing.

 * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``.

-----
0.5a8
-----

 * The "egg_info" command now always sets the distribution metadata to "safe"
   forms of the distribution name and version, so that distribution files will
   be generated with parseable names (i.e., ones that don't include '-' in the
   name or version).  Also, this means that if you use the various ``--tag``
   options of "egg_info", any distributions generated will use the tags in the
   version, not just egg distributions.

 * Added support for defining command aliases in distutils configuration files,
   under the "[aliases]" section.  To prevent recursion and to allow aliases to
   call the command of the same name, a given alias can be expanded only once
   per command-line invocation.  You can define new aliases with the "alias"
   command, either for the local, global, or per-user configuration.

 * Added "rotate" command to delete old distribution files, given a set of
   patterns to match and the number of files to keep.  (Keeps the most
   recently-modified distribution files matching each pattern.)

 * Added "saveopts" command that saves all command-line options for the current
   invocation to the local, global, or per-user configuration file.  Useful for
   setting defaults without having to hand-edit a configuration file.

 * Added a "setopt" command that sets a single option in a specified distutils
   configuration file.

-----
0.5a7
-----

 * Added "upload" support for egg and source distributions, including a bug
   fix for "upload" and a temporary workaround for lack of .egg support in
   PyPI.

-----
0.5a6
-----

 * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it
   will include all files under revision control (CVS or Subversion) in the
   current directory, and it will regenerate the list every time you create a
   source distribution, not just when you tell it to.  This should make the
   default "do what you mean" more often than the distutils' default behavior
   did, while still retaining the old behavior in the presence of MANIFEST.in.

 * Fixed the "develop" command always updating .pth files, even if you
   specified ``-n`` or ``--dry-run``.

 * Slightly changed the format of the generated version when you use
   ``--tag-build`` on the "egg_info" command, so that you can make tagged
   revisions compare *lower* than the version specified in setup.py (e.g. by
   using ``--tag-build=dev``).

-----
0.5a5
-----

 * Added ``develop`` command to ``setuptools``-based packages.  This command
   installs an ``.egg-link`` pointing to the package's source directory, and
   script wrappers that ``execfile()`` the source versions of the package's
   scripts.  This lets you put your development checkout(s) on sys.path without
   having to actually install them.  (To uninstall the link, use
   use ``setup.py develop --uninstall``.)

 * Added ``egg_info`` command to ``setuptools``-based packages.  This command
   just creates or updates the "projectname.egg-info" directory, without
   building an egg.  (It's used by the ``bdist_egg``, ``test``, and ``develop``
   commands.)

 * Enhanced the ``test`` command so that it doesn't install the package, but
   instead builds any C extensions in-place, updates the ``.egg-info``
   metadata, adds the source directory to ``sys.path``, and runs the tests
   directly on the source.  This avoids an "unmanaged" installation of the
   package to ``site-packages`` or elsewhere.

 * Made ``easy_install`` a standard ``setuptools`` command, moving it from
   the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
   that if you were importing or extending it, you must now change your imports
   accordingly.  ``easy_install.py`` is still installed as a script, but not as
   a module.

-----
0.5a4
-----

 * Setup scripts using setuptools can now list their dependencies directly in
   the setup.py file, without having to manually create a ``depends.txt`` file.
   The ``install_requires`` and ``extras_require`` arguments to ``setup()``
   are used to create a dependencies file automatically.  If you are manually
   creating ``depends.txt`` right now, please switch to using these setup
   arguments as soon as practical, because ``depends.txt`` support will be
   removed in the 0.6 release cycle.  For documentation on the new arguments,
   see the ``setuptools.dist.Distribution`` class.

 * Setup scripts using setuptools now always install using ``easy_install``
   internally, for ease of uninstallation and upgrading.

-----
0.5a1
-----

 * Added support for "self-installation" bootstrapping.  Packages can now
   include ``ez_setup.py`` in their source distribution, and add the following
   to their ``setup.py``, in order to automatically bootstrap installation of
   setuptools as part of their setup process::

    from ez_setup import use_setuptools
    use_setuptools()

    from setuptools import setup
    # etc...

-----
0.4a2
-----

 * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools
   installation easier, and to allow distributions using setuptools to avoid
   having to include setuptools in their source distribution.

 * All downloads are now managed by the ``PackageIndex`` class (which is now
   subclassable and replaceable), so that embedders can more easily override
   download logic, give download progress reports, etc.  The class has also
   been moved to the new ``setuptools.package_index`` module.

 * The ``Installer`` class no longer handles downloading, manages a temporary
   directory, or tracks the ``zip_ok`` option.  Downloading is now handled
   by ``PackageIndex``, and ``Installer`` has become an ``easy_install``
   command class based on ``setuptools.Command``.

 * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup
   script in a directory sandbox, and a new ``setuptools.archive_util`` module
   with an ``unpack_archive()`` API.  These were split out of EasyInstall to
   allow reuse by other tools and applications.

 * ``setuptools.Command`` now supports reinitializing commands using keyword
   arguments to set/reset options.  Also, ``Command`` subclasses can now set
   their ``command_consumes_arguments`` attribute to ``True`` in order to
   receive an ``args`` option containing the rest of the command line.

-----
0.3a2
-----

 * Added new options to ``bdist_egg`` to allow tagging the egg's version number
   with a subversion revision number, the current date, or an explicit tag
   value.  Run ``setup.py bdist_egg --help`` to get more information.

 * Misc. bug fixes

-----
0.3a1
-----

 * Initial release.


python3.4/site-packages/setuptools-2.0.dist-info/pydist.json000064400000010700151735050030017647 0ustar00{"contacts": [{"name": "Python Packaging Authority", "email": "distutils-sig@python.org", "role": "author"}], "exports": {"egg_info.writers": {"depends.txt": "setuptools.command.egg_info:warn_depends_obsolete", "top_level.txt": "setuptools.command.egg_info:write_toplevel_names", "namespace_packages.txt": "setuptools.command.egg_info:overwrite_arg", "requires.txt": "setuptools.command.egg_info:write_requirements", "entry_points.txt": "setuptools.command.egg_info:write_entries", "PKG-INFO": "setuptools.command.egg_info:write_pkg_info", "dependency_links.txt": "setuptools.command.egg_info:overwrite_arg", "eager_resources.txt": "setuptools.command.egg_info:overwrite_arg"}, "setuptools.file_finders": {"svn_cvs": "setuptools.command.sdist:_default_revctrl"}, "distutils.commands": {"alias": "setuptools.command.alias:alias", "egg_info": "setuptools.command.egg_info:egg_info", "develop": "setuptools.command.develop:develop", "install_scripts": "setuptools.command.install_scripts:install_scripts", "register": "setuptools.command.register:register", "saveopts": "setuptools.command.saveopts:saveopts", "sdist": "setuptools.command.sdist:sdist", "build_ext": "setuptools.command.build_ext:build_ext", "rotate": "setuptools.command.rotate:rotate", "setopt": "setuptools.command.setopt:setopt", "bdist_rpm": "setuptools.command.bdist_rpm:bdist_rpm", "easy_install": "setuptools.command.easy_install:easy_install", "install_egg_info": "setuptools.command.install_egg_info:install_egg_info", "install_lib": "setuptools.command.install_lib:install_lib", "install": "setuptools.command.install:install", "bdist_egg": "setuptools.command.bdist_egg:bdist_egg", "bdist_wininst": "setuptools.command.bdist_wininst:bdist_wininst", "upload_docs": "setuptools.command.upload_docs:upload_docs", "build_py": "setuptools.command.build_py:build_py", "test": "setuptools.command.test:test"}, "distutils.setup_keywords": {"include_package_data": "setuptools.dist:assert_bool", "exclude_package_data": "setuptools.dist:check_package_data", "dependency_links": "setuptools.dist:assert_string_list", "install_requires": "setuptools.dist:check_requirements", "use_2to3_exclude_fixers": "setuptools.dist:assert_string_list", "entry_points": "setuptools.dist:check_entry_points", "packages": "setuptools.dist:check_packages", "namespace_packages": "setuptools.dist:check_nsp", "test_suite": "setuptools.dist:check_test_suite", "package_data": "setuptools.dist:check_package_data", "extras_require": "setuptools.dist:check_extras", "test_loader": "setuptools.dist:check_importable", "zip_safe": "setuptools.dist:assert_bool", "use_2to3_fixers": "setuptools.dist:assert_string_list", "convert_2to3_doctests": "setuptools.dist:assert_string_list", "tests_require": "setuptools.dist:check_requirements", "eager_resources": "setuptools.dist:assert_string_list", "use_2to3": "setuptools.dist:assert_bool"}, "console_scripts": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.4": "setuptools.command.easy_install:main"}, "setuptools.installation": {"eggsecutable": "setuptools.command.easy_install:bootstrap"}}, "generator": "bdist_wheel (0.22.0)", "summary": "Easily download, build, install, upgrade, and uninstall Python packages", "commands": {"wrap_console": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.4": "setuptools.command.easy_install:main"}}, "extras": ["certs", "ssl:sys_platform=='win32'"], "run_requires": [{"environment": "extra == \"ssl:sys_platform=='win32'\"", "requires": ["wincertstore (==0.1)"]}, {"extra": "certs", "requires": ["certifi (==0.0.8)"]}], "keywords": "CPAN PyPI distutils eggs package management", "project_urls": {"Home": "https://pypi.python.org/pypi/setuptools"}, "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving :: Packaging", "Topic :: System :: Systems Administration", "Topic :: Utilities"], "name": "setuptools", "version": "2.0", "metadata_version": "2.0", "document_names": {"description": "DESCRIPTION.rst"}, "license": "PSF or ZPL"}python3.4/site-packages/setuptools-2.0.dist-info/dependency_links.txt000064400000000335151735050040021523 0ustar00https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec
https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c
python3.4/site-packages/setuptools-2.0.dist-info/RECORD000064400000016004151735050040016345 0ustar00pkg_resources.py,sha256=PTsVwvKZOvKRb0fpUA4EMxtWeAqimPdbQo4VcL_oVfY,98911
easy_install.py,sha256=MDC9vt5AxDsXX5qcKlBz2TnW6Tpuv_AobnfhCJ9X3PM,126
setuptools-2.0.data/scripts/easy_install,sha256=CCoKwnAC2FcNUE_BiA2Sn5rrWuy2yAqjEl-Zyp-rSoY,305
setuptools-2.0.data/scripts/easy_install-3.4,sha256=StkreN6Qq5BS90p6K6PPkEMROfhppfNrD70S96fepo0,313
setuptools-2.0.dist-info/DESCRIPTION.rst,sha256=HvlYC-3n9_8lxg3FLymgsd4SbA4aQwI6tEh98kDZTDE,69872
setuptools-2.0.dist-info/RECORD,,
setuptools-2.0.dist-info/METADATA,sha256=zCZIX5URU19O4g_YhIIpgT2k3uZyCriLmWgkTrM_by4,71202
setuptools-2.0.dist-info/WHEEL,sha256=SXYYsi-y-rEGIva8sB8iKF6bAFD6YDhmqHX5hI3fc0o,110
setuptools-2.0.dist-info/pydist.json,sha256=Z065uXBlSbrsRMNdpOQI1yn2TrfWzyHwWMAFJoe8KGA,4544
setuptools-2.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
setuptools-2.0.dist-info/entry_points.txt,sha256=jLGAKfqpKeKLX1kOD-9JBSbSbiO5DUkoB94FycadyTY,2773
setuptools-2.0.dist-info/top_level.txt,sha256=XeUv9rDVQkRjOcMBG-Dno7lX2yJRfQqUiCxcocZnmnA,49
setuptools-2.0.dist-info/dependency_links.txt,sha256=H84NpZJcSa-8h9mn-ZONhSwqx6F9qdpEAzLiHqI7NX8,221
_markerlib/markers.py,sha256=YuFp0-osufFIoqnzG3L0Z2fDCx4Vln3VUDeXJ2DA_1I,3979
_markerlib/__init__.py,sha256=GSmhZqvAitLJHhSgtqqusfq2nJ_ClP3oy3Lm0uZLIsU,552
setuptools/py31compat.py,sha256=95J21c4_2pcNOrScsHvAMDA-HUO-93qDWn9W_71Sv8o,396
setuptools/script template (dev).py,sha256=fZZQIwfK2-F1tF0ld6Sh141zltAD6ubIa525WH6cMz8,311
setuptools/__init__.py,sha256=Sn0OUGFc_YlwGw2A3glq08IkDCcqssSoJTNwZK3cnJA,3317
setuptools/ssl_support.py,sha256=wnK1ffiiA7TrLYseT5A1qwNJuKelxMu9o3L4E270mD4,7663
setuptools/version.py,sha256=A3Ub7Z2q2OEONprXnC5jlQ8x525YffgG93hA9M4DAIk,20
setuptools/lib2to3_ex.py,sha256=6jPF9sJuHiz0cyg4cwIBLl2VMAxcl3GYSZwWAOuJplU,1998
setuptools/compat.py,sha256=DhySZMeNA-fmaMiESpefR2T0G1lV1k47xgHpXsB1NGU,2556
setuptools/depends.py,sha256=MZYC62GbkiR-H-w56YonoPCVttPfYxhTK6kZ07FpGXc,6221
setuptools/extension.py,sha256=Lxj67VzDEYORY-oEW9U-SP9JL3s-O9Sgk9BOwtvVLdQ,1404
setuptools/py26compat.py,sha256=ggKS8_aZWWHHS792vF3uXp5vmUkGNk3vjLreLTHr_-Q,431
setuptools/py27compat.py,sha256=CGj-jZcFgHUkrEdLvArkxHj96tAaMbG2-yJtUVU7QVI,306
setuptools/archive_util.py,sha256=4knsPzl_EjgtRu5-3G4tN5m0GIRcsiZOGJ1vjqaV3jg,6601
setuptools/script template.py,sha256=VpRgZSPN7tulpU94pWiFkKPzhHXonxnBZh2hjPIGAxY,163
setuptools/svn_utils.py,sha256=GMqvFLBQyD3dx06qQuA8H-fTUhAYK5ma4USzoR1iKfk,17848
setuptools/dist.py,sha256=PbBXveYctz6VclEdkt9Ysjon-OyAMxiWXaa3hvjw4rg,32548
setuptools/package_index.py,sha256=VKTKT2NijHEWrxmrqa57QfDHMaaI44KeSKhJeFZCfcw,38925
setuptools/site-patch.py,sha256=SeMejq4jWSvvCdCPktirf2278IwLWET5FQ8c0R9F2zo,2418
setuptools/sandbox.py,sha256=wXVdRCIL4pVWiGVgYjQKKoP0UmIduT5nZDO2rKH8Y2k,9994
setuptools/command/develop.py,sha256=svjNIfZbyne63KcNMjxwr8L_rw8XZW8j0T09stYLOGE,6447
setuptools/command/build_ext.py,sha256=k65J3ZUZzQw62U-5Xt7NuQ0UuWMUhU0-sIUpuxcqA7M,11854
setuptools/command/install_scripts.py,sha256=va2sHUlpGZNxOB3V5Z4ZuqnD-1mrccE9M2n6014xSXM,2068
setuptools/command/upload_docs.py,sha256=3vxqDQS1yh47cTaNEcu16ltHz5Gr764z4NB3OM7HFzc,6807
setuptools/command/install_egg_info.py,sha256=_QGULrbm0ueuGxldzPoGB7QdSd2g4bhU8qhzL8fR17w,3833
setuptools/command/__init__.py,sha256=XeM2FtxUGjx9ipxX4xnHsfMOSplYVQpgXvXDEe2cEz0,553
setuptools/command/setopt.py,sha256=akZNG_5z74x6NmhgNm0Opxc-cPO-6jV7SRC5i98TAVE,5068
setuptools/command/sdist.py,sha256=0inyxsLJMwSIB-nnea6qM-JF7J3ZzTbpPl5YgSiL6FQ,8341
setuptools/command/bdist_rpm.py,sha256=knEihWuGchIAzJlxp3iuJomX2kiTlgWnbw7dM38bXQk,2025
setuptools/command/easy_install.py,sha256=RL_-m07dMUR5qlLVnyFQevGOVUE4RORmTSr8uzjeGRo,72716
setuptools/command/install_lib.py,sha256=y7jrhIP0DG7_hO-MiYHCoBwf4ctdUhQcST9RtyvAkG4,2486
setuptools/command/install.py,sha256=8b2aDpZyH6E9u4dyPfEKmu_FrG5q5hUfchagFW-3Ysk,4065
setuptools/command/egg_info.py,sha256=tv-uFbNLnypUOUkwM4HZ_MjBAQiYcz654Pj5vgRouZw,14320
setuptools/command/rotate.py,sha256=zBjgakDOmqXL2abaxS9qpZu-jNBWVH0L3oaAUvZFwHE,2062
setuptools/command/register.py,sha256=a3b1P-yqZJGAh6ONEtmgzeSyCZ6hdItlCL9eFKnCYbo,277
setuptools/command/bdist_egg.py,sha256=U0cNWkqDHAppQFBwl8cB2tWxEYz7dTGDMlPpagmU0jc,18718
setuptools/command/bdist_wininst.py,sha256=mU8EplmcWQ71cyE6S-fXCF4p3wh7UaOHu3q8qgKR8UI,2283
setuptools/command/saveopts.py,sha256=r9oreFEGkaEn3a6FuWKvaIpigz6oQFayKcD7Jhn-RgI,705
setuptools/command/build_py.py,sha256=DrLl-zFXlM0BX2vAS4LS_arxKbCYVlDPczTFecrGJpo,8440
setuptools/command/alias.py,sha256=tO3iC_Kem0gj2QQEFVi3E5HXGewhaD5WoCeBrK7VuWY,2486
setuptools/command/test.py,sha256=rIOoFLV990UvprR50fLT5mUZvRu7O3q9reHc1IV76z0,5932
/opt/alt/python34/bin/easy_install,sha256=tEu8cZ6O72_3-OZ6kKYsmW9pfSdeuQDdkdYk4ZPwrrM,246
/opt/alt/python34/bin/easy_install-3.4,sha256=tEu8cZ6O72_3-OZ6kKYsmW9pfSdeuQDdkdYk4ZPwrrM,246
setuptools/command/__pycache__/install_lib.cpython-34.pyc,,
setuptools/command/__pycache__/upload_docs.cpython-34.pyc,,
setuptools/command/__pycache__/bdist_egg.cpython-34.pyc,,
setuptools/__pycache__/extension.cpython-34.pyc,,
setuptools/command/__pycache__/saveopts.cpython-34.pyc,,
setuptools/__pycache__/sandbox.cpython-34.pyc,,
__pycache__/pkg_resources.cpython-34.pyc,,
setuptools/__pycache__/depends.cpython-34.pyc,,
setuptools/command/__pycache__/sdist.cpython-34.pyc,,
setuptools/command/__pycache__/build_ext.cpython-34.pyc,,
setuptools/command/__pycache__/install.cpython-34.pyc,,
setuptools/command/__pycache__/register.cpython-34.pyc,,
setuptools/command/__pycache__/egg_info.cpython-34.pyc,,
setuptools/__pycache__/__init__.cpython-34.pyc,,
setuptools/command/__pycache__/install_egg_info.cpython-34.pyc,,
setuptools/command/__pycache__/build_py.cpython-34.pyc,,
setuptools/__pycache__/script template.cpython-34.pyc,,
setuptools/command/__pycache__/__init__.cpython-34.pyc,,
setuptools/command/__pycache__/setopt.cpython-34.pyc,,
setuptools/__pycache__/compat.cpython-34.pyc,,
setuptools/command/__pycache__/install_scripts.cpython-34.pyc,,
setuptools/__pycache__/dist.cpython-34.pyc,,
setuptools/__pycache__/archive_util.cpython-34.pyc,,
setuptools/command/__pycache__/test.cpython-34.pyc,,
setuptools/command/__pycache__/bdist_rpm.cpython-34.pyc,,
_markerlib/__pycache__/__init__.cpython-34.pyc,,
setuptools/__pycache__/py31compat.cpython-34.pyc,,
setuptools/__pycache__/package_index.cpython-34.pyc,,
setuptools/command/__pycache__/alias.cpython-34.pyc,,
setuptools/__pycache__/ssl_support.cpython-34.pyc,,
setuptools/__pycache__/svn_utils.cpython-34.pyc,,
setuptools/__pycache__/script template (dev).cpython-34.pyc,,
setuptools/__pycache__/py27compat.cpython-34.pyc,,
setuptools/__pycache__/site-patch.cpython-34.pyc,,
__pycache__/easy_install.cpython-34.pyc,,
setuptools/command/__pycache__/rotate.cpython-34.pyc,,
setuptools/__pycache__/version.cpython-34.pyc,,
setuptools/command/__pycache__/easy_install.cpython-34.pyc,,
_markerlib/__pycache__/markers.cpython-34.pyc,,
setuptools/command/__pycache__/develop.cpython-34.pyc,,
setuptools/__pycache__/py26compat.cpython-34.pyc,,
setuptools/__pycache__/lib2to3_ex.cpython-34.pyc,,
setuptools/command/__pycache__/bdist_wininst.cpython-34.pyc,,
python3.4/site-packages/setuptools-2.0.dist-info/top_level.txt000064400000000061151735050040020172 0ustar00setuptools
easy_install
_markerlib
pkg_resources
python3.4/site-packages/setuptools-2.0.dist-info/DESCRIPTION.rst000064400000210360151735050040017762 0ustar00===============================
Installing and Using Setuptools
===============================

.. contents:: **Table of Contents**


-------------------------
Installation Instructions
-------------------------

Upgrading from Distribute
=========================

Currently, Distribute disallows installing Setuptools 0.7+ over Distribute.
You must first uninstall any active version of Distribute first (see
`Uninstalling`_).

Upgrading from Setuptools 0.6
=============================

Upgrading from prior versions of Setuptools is supported. Initial reports
good success in this regard.

Windows
=======

The recommended way to install setuptools on Windows is to download
`ez_setup.py`_ and run it. The script will download the appropriate .egg
file and install it for you.

.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

For best results, uninstall previous versions FIRST (see `Uninstalling`_).

Once installation is complete, you will find an ``easy_install`` program in
your Python ``Scripts`` subdirectory.  For simple invocation and best results,
add this directory to your ``PATH`` environment variable, if it is not already
present.


Unix-based Systems including Mac OS X
=====================================

Download `ez_setup.py`_ and run it using the target Python version. The script
will download the appropriate version and install it for you::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

Note that you will may need to invoke the command with superuser privileges to
install to the system Python::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

Alternatively, on Python 2.6 and later, Setuptools may be installed to a
user-local path::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
    > python ez_setup.py --user


Python 2.4 and Python 2.5 support
=================================

Setuptools 2.0 and later requires Python 2.6 or later. To install setuptools
on Python 2.4 or Python 2.5, use the bootstrap script for Setuptools 1.x:
https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py.


Advanced Installation
=====================

For more advanced installation options, such as installing to custom
locations or prefixes, download and extract the source
tarball from `Setuptools on PyPI <https://pypi.python.org/pypi/setuptools>`_
and run setup.py with any supported distutils and Setuptools options.
For example::

    setuptools-x.x$ python setup.py --prefix=/opt/setuptools

Use ``--help`` to get a full options list, but we recommend consulting
the `EasyInstall manual`_ for detailed instructions, especially `the section
on custom installation locations`_.

.. _EasyInstall manual: https://pythonhosted.org/setuptools/EasyInstall
.. _the section on custom installation locations: https://pythonhosted.org/setuptools/EasyInstall#custom-installation-locations


Downloads
=========

All setuptools downloads can be found at `the project's home page in the Python
Package Index`_.  Scroll to the very bottom of the page to find the links.

.. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools

In addition to the PyPI downloads, the development version of ``setuptools``
is available from the `Bitbucket repo`_, and in-development versions of the
`0.6 branch`_ are available as well.

.. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev
.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06

Uninstalling
============

On Windows, if Setuptools was installed using an ``.exe`` or ``.msi``
installer, simply use the uninstall feature of "Add/Remove Programs" in the
Control Panel.

Otherwise, to uninstall Setuptools or Distribute, regardless of the Python
version, delete all ``setuptools*`` and ``distribute*`` files and
directories from your system's ``site-packages`` directory
(and any other ``sys.path`` directories) FIRST.

If you are upgrading or otherwise plan to re-install Setuptools or Distribute,
nothing further needs to be done. If you want to completely remove Setuptools,
you may also want to remove the 'easy_install' and 'easy_install-x.x' scripts
and associated executables installed to the Python scripts directory.

--------------------------------
Using Setuptools and EasyInstall
--------------------------------

Here are some of the available manuals, tutorials, and other resources for
learning about Setuptools, Python Eggs, and EasyInstall:

* `The EasyInstall user's guide and reference manual`_
* `The setuptools Developer's Guide`_
* `The pkg_resources API reference`_
* `Package Compatibility Notes`_ (user-maintained)
* `The Internal Structure of Python Eggs`_

Questions, comments, and bug reports should be directed to the `distutils-sig
mailing list`_.  If you have written (or know of) any tutorials, documentation,
plug-ins, or other resources for setuptools users, please let us know about
them there, so this reference list can be updated.  If you have working,
*tested* patches to correct problems or add features, you may submit them to
the `setuptools bug tracker`_.

.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/issues
.. _Package Compatibility Notes: https://pythonhosted.org/setuptools/PackageNotes
.. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html
.. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html
.. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html
.. _The EasyInstall user's guide and reference manual: https://pythonhosted.org/setuptools/easy_install.html
.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/


-------
Credits
-------

* The original design for the ``.egg`` format and the ``pkg_resources`` API was
  co-created by Phillip Eby and Bob Ippolito.  Bob also implemented the first
  version of ``pkg_resources``, and supplied the OS X operating system version
  compatibility algorithm.

* Ian Bicking implemented many early "creature comfort" features of
  easy_install, including support for downloading via Sourceforge and
  Subversion repositories.  Ian's comments on the Web-SIG about WSGI
  application deployment also inspired the concept of "entry points" in eggs,
  and he has given talks at PyCon and elsewhere to inform and educate the
  community about eggs and setuptools.

* Jim Fulton contributed time and effort to build automated tests of various
  aspects of ``easy_install``, and supplied the doctests for the command-line
  ``.exe`` wrappers on Windows.

* Phillip J. Eby is the seminal author of setuptools, and
  first proposed the idea of an importable binary distribution format for
  Python application plug-ins.

* Significant parts of the implementation of setuptools were funded by the Open
  Source Applications Foundation, to provide a plug-in infrastructure for the
  Chandler PIM application.  In addition, many OSAF staffers (such as Mike
  "Code Bear" Taylor) contributed their time and stress as guinea pigs for the
  use of eggs and setuptools, even before eggs were "cool".  (Thanks, guys!)

* Since the merge with Distribute, Jason R. Coombs is the
  maintainer of setuptools.  The project is maintained in coordination with
  the Python Packaging Authority (PyPA) and the larger Python community.

.. _files:

=======
CHANGES
=======

---
2.0
---

* `Issue #121 <https://bitbucket.org/pypa/setuptools/issue/121>`_: Exempt lib2to3 pickled grammars from DirectorySandbox.
* `Issue #41 <https://bitbucket.org/pypa/setuptools/issue/41>`_: Dropped support for Python 2.4 and Python 2.5. Clients requiring
  setuptools for those versions of Python should use setuptools 1.x.
* Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients
  expecting this boolean variable should use ``site.ENABLE_USER_SITE``
  instead.
* Removed ``pkg_resources.ImpWrapper``. Clients that expected this class
  should use ``pkgutil.ImpImporter`` instead.

-----
1.4.2
-----

* `Issue #116 <https://bitbucket.org/pypa/setuptools/issue/116>`_: Correct TypeError when reading a local package index on Python
  3.

-----
1.4.1
-----

* `Issue #114 <https://bitbucket.org/pypa/setuptools/issue/114>`_: Use ``sys.getfilesystemencoding`` for decoding config in
  ``bdist_wininst`` distributions.

* `Issue #105 <https://bitbucket.org/pypa/setuptools/issue/105>`_ and `Issue #113 <https://bitbucket.org/pypa/setuptools/issue/113>`_: Establish a more robust technique for
  determining the terminal encoding::

    1. Try ``getpreferredencoding``
    2. If that returns US_ASCII or None, try the encoding from
       ``getdefaultlocale``. If that encoding was a "fallback" because Python
       could not figure it out from the environment or OS, encoding remains
       unresolved.
    3. If the encoding is resolved, then make sure Python actually implements
       the encoding.
    4. On the event of an error or unknown codec, revert to fallbacks
       (UTF-8 on Darwin, ASCII on everything else).
    5. On the encoding is 'mac-roman' on Darwin, use UTF-8 as 'mac-roman' was
       a bug on older Python releases.

    On a side note, it would seem that the encoding only matters for when SVN
    does not yet support ``--xml`` and when getting repository and svn version
    numbers. The ``--xml`` technique should yield UTF-8 according to some
    messages on the SVN mailing lists. So if the version numbers are always
    7-bit ASCII clean, it may be best to only support the file parsing methods
    for legacy SVN releases and support for SVN without the subprocess command
    would simple go away as support for the older SVNs does.

---
1.4
---

* `Issue #27 <https://bitbucket.org/pypa/setuptools/issue/27>`_: ``easy_install`` will now use credentials from .pypirc if
  present for connecting to the package index.
* `Pull Request #21 <https://bitbucket.org/pypa/setuptools/pull-request/21>`_: Omit unwanted newlines in ``package_index._encode_auth``
  when the username/password pair length indicates wrapping.

-----
1.3.2
-----

* `Issue #99 <https://bitbucket.org/pypa/setuptools/issue/99>`_: Fix filename encoding issues in SVN support.

-----
1.3.1
-----

* Remove exuberant warning in SVN support when SVN is not used.

---
1.3
---

* Address security vulnerability in SSL match_hostname check as reported in
  `Python #17997 <http://bugs.python.org/issue17997>`_.
* Prefer `backports.ssl_match_hostname
  <https://pypi.python.org/pypi/backports.ssl_match_hostname>`_ for backport
  implementation if present.
* Correct NameError in ``ssl_support`` module (``socket.error``).

---
1.2
---

* `Issue #26 <https://bitbucket.org/pypa/setuptools/issue/26>`_: Add support for SVN 1.7. Special thanks to Philip Thiem for the
  contribution.
* `Issue #93 <https://bitbucket.org/pypa/setuptools/issue/93>`_: Wheels are now distributed with every release. Note that as
  reported in `Issue #108 <https://bitbucket.org/pypa/setuptools/issue/108>`_, as of Pip 1.4, scripts aren't installed properly
  from wheels. Therefore, if using Pip to install setuptools from a wheel,
  the ``easy_install`` command will not be available.
* Setuptools "natural" launcher support, introduced in 1.0, is now officially
  supported.

-----
1.1.7
-----

* Fixed behavior of NameError handling in 'script template (dev).py' (script
  launcher for 'develop' installs).
* ``ez_setup.py`` now ensures partial downloads are cleaned up following
  a failed download.
* `Distribute #363 <https://bitbucket.org/tarek/distribute/issue/363>`_ and `Issue #55 <https://bitbucket.org/pypa/setuptools/issue/55>`_: Skip an sdist test that fails on locales
  other than UTF-8.

-----
1.1.6
-----

* `Distribute #349 <https://bitbucket.org/tarek/distribute/issue/349>`_: ``sandbox.execfile`` now opens the target file in binary
  mode, thus honoring a BOM in the file when compiled.

-----
1.1.5
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Second attempt at fix (logic was reversed).

-----
1.1.4
-----

* `Issue #77 <https://bitbucket.org/pypa/setuptools/issue/77>`_: Fix error in upload command (Python 2.4).

-----
1.1.3
-----

* Fix NameError in previous patch.

-----
1.1.2
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Correct issue where 404 errors are returned for URLs with
  fragments in them (such as #egg=).

-----
1.1.1
-----

* `Issue #75 <https://bitbucket.org/pypa/setuptools/issue/75>`_: Add ``--insecure`` option to ez_setup.py to accommodate
  environments where a trusted SSL connection cannot be validated.
* `Issue #76 <https://bitbucket.org/pypa/setuptools/issue/76>`_: Fix AttributeError in upload command with Python 2.4.

---
1.1
---

* `Issue #71 <https://bitbucket.org/pypa/setuptools/issue/71>`_ (`Distribute #333 <https://bitbucket.org/tarek/distribute/issue/333>`_): EasyInstall now puts less emphasis on the
  condition when a host is blocked via ``--allow-hosts``.
* `Issue #72 <https://bitbucket.org/pypa/setuptools/issue/72>`_: Restored Python 2.4 compatibility in ``ez_setup.py``.

---
1.0
---

* `Issue #60 <https://bitbucket.org/pypa/setuptools/issue/60>`_: On Windows, Setuptools supports deferring to another launcher,
  such as Vinay Sajip's `pylauncher <https://bitbucket.org/pypa/pylauncher>`_
  (included with Python 3.3) to launch console and GUI scripts and not install
  its own launcher executables. This experimental functionality is currently
  only enabled if  the ``SETUPTOOLS_LAUNCHER`` environment variable is set to
  "natural". In the future, this behavior may become default, but only after
  it has matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER``
  also accepts "executable" to force the default behavior of creating launcher
  executables.
* `Issue #63 <https://bitbucket.org/pypa/setuptools/issue/63>`_: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or
  wget for retrieving the Setuptools tarball for improved security of the
  install. The script will still fall back to a simple ``urlopen`` on
  platforms that do not have these tools.
* `Issue #65 <https://bitbucket.org/pypa/setuptools/issue/65>`_: Deprecated the ``Features`` functionality.
* `Issue #52 <https://bitbucket.org/pypa/setuptools/issue/52>`_: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied)
  connection.

Backward-Incompatible Changes
=============================

This release includes a couple of backward-incompatible changes, but most if
not all users will find 1.0 a drop-in replacement for 0.9.

* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: Normalized API of environment marker support. Specifically,
  removed line number and filename from SyntaxErrors when returned from
  `pkg_resources.invalid_marker`. Any clients depending on the specific
  string representation of exceptions returned by that function may need to
  be updated to account for this change.
* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: SyntaxErrors generated by `pkg_resources.invalid_marker` are
  normalized for cross-implementation consistency.
* Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting``
  options to easy_install. These options have been deprecated since 0.6a11.

-----
0.9.8
-----

* `Issue #53 <https://bitbucket.org/pypa/setuptools/issue/53>`_: Fix NameErrors in `_vcs_split_rev_from_url`.

-----
0.9.7
-----

* `Issue #49 <https://bitbucket.org/pypa/setuptools/issue/49>`_: Correct AttributeError on PyPy where a hashlib.HASH object does
  not have a `.name` attribute.
* `Issue #34 <https://bitbucket.org/pypa/setuptools/issue/34>`_: Documentation now refers to bootstrap script in code repository
  referenced by bookmark.
* Add underscore-separated keys to environment markers (markerlib).

-----
0.9.6
-----

* `Issue #44 <https://bitbucket.org/pypa/setuptools/issue/44>`_: Test failure on Python 2.4 when MD5 hash doesn't have a `.name`
  attribute.

-----
0.9.5
-----

* `Python #17980 <http://bugs.python.org/issue17980>`_: Fix security vulnerability in SSL certificate validation.

-----
0.9.4
-----

* `Issue #43 <https://bitbucket.org/pypa/setuptools/issue/43>`_: Fix issue (introduced in 0.9.1) with version resolution when
  upgrading over other releases of Setuptools.

-----
0.9.3
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix new ``AttributeError`` introduced in last fix.

-----
0.9.2
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix regression where blank checksums would trigger an
  ``AttributeError``.

-----
0.9.1
-----

* `Distribute #386 <https://bitbucket.org/tarek/distribute/issue/386>`_: Allow other positional and keyword arguments to os.open.
* Corrected dependency on certifi mis-referenced in 0.9.

---
0.9
---

* `package_index` now validates hashes other than MD5 in download links.

---
0.8
---

* Code base now runs on Python 2.4 - Python 3.3 without Python 2to3
  conversion.

-----
0.7.8
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Yet another fix for yet another regression.

-----
0.7.7
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release (redo).
* `Issue #30 <https://bitbucket.org/pypa/setuptools/issue/30>`_: Added test for get_cache_path.

-----
0.7.6
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release.

-----
0.7.5
-----

* `Issue #21 <https://bitbucket.org/pypa/setuptools/issue/21>`_: Restore Python 2.4 compatibility in ``test_easy_install``.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Merged additional warning from Distribute 0.6.46.
* Now honor the environment variable
  ``SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT`` in addition to the now
  deprecated ``DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT``.

-----
0.7.4
-----

* `Issue #20 <https://bitbucket.org/pypa/setuptools/issue/20>`_: Fix comparison of parsed SVN version on Python 3.

-----
0.7.3
-----

* `Issue #1 <https://bitbucket.org/pypa/setuptools/issue/1>`_: Disable installation of Windows-specific files on non-Windows systems.
* Use new sysconfig module with Python 2.7 or >=3.2.

-----
0.7.2
-----

* `Issue #14 <https://bitbucket.org/pypa/setuptools/issue/14>`_: Use markerlib when the `parser` module is not available.
* `Issue #10 <https://bitbucket.org/pypa/setuptools/issue/10>`_: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI.

-----
0.7.1
-----

* Fix NameError (`Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_) again - broken in bad merge.

---
0.7
---

* Merged Setuptools and Distribute. See docs/merge.txt for details.

Added several features that were slated for setuptools 0.6c12:

* Index URL now defaults to HTTPS.
* Added experimental environment marker support. Now clients may designate a
  PEP-426 environment marker for "extra" dependencies. Setuptools uses this
  feature in ``setup.py`` for optional SSL and certificate validation support
  on older platforms. Based on Distutils-SIG discussions, the syntax is
  somewhat tentative. There should probably be a PEP with a firmer spec before
  the feature should be considered suitable for use.
* Added support for SSL certificate validation when installing packages from
  an HTTPS service.

-----
0.7b4
-----

* `Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_: Fixed NameError in SSL support.

------
0.6.49
------

* Move warning check in ``get_cache_path`` to follow the directory creation
  to avoid errors when the cache path does not yet exist. Fixes the error
  reported in `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_.

------
0.6.48
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46 (redo).

------
0.6.47
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46.

------
0.6.46
------

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Issue a warning if the PYTHON_EGG_CACHE or otherwise
  customized egg cache location specifies a directory that's group- or
  world-writable.

------
0.6.45
------

* `Distribute #379 <https://bitbucket.org/tarek/distribute/issue/379>`_: ``distribute_setup.py`` now traps VersionConflict as well,
  restoring ability to upgrade from an older setuptools version.

------
0.6.44
------

* ``distribute_setup.py`` has been updated to allow Setuptools 0.7 to
  satisfy use_setuptools.

------
0.6.43
------

* `Distribute #378 <https://bitbucket.org/tarek/distribute/issue/378>`_: Restore support for Python 2.4 Syntax (regression in 0.6.42).

------
0.6.42
------

* External links finder no longer yields duplicate links.
* `Distribute #337 <https://bitbucket.org/tarek/distribute/issue/337>`_: Moved site.py to setuptools/site-patch.py (graft of very old
  patch from setuptools trunk which inspired PR `#31 <https://bitbucket.org/pypa/setuptools/issue/31>`_).

------
0.6.41
------

* `Distribute #27 <https://bitbucket.org/tarek/distribute/issue/27>`_: Use public api for loading resources from zip files rather than
  the private method `_zip_directory_cache`.
* Added a new function ``easy_install.get_win_launcher`` which may be used by
  third-party libraries such as buildout to get a suitable script launcher.

------
0.6.40
------

* `Distribute #376 <https://bitbucket.org/tarek/distribute/issue/376>`_: brought back cli.exe and gui.exe that were deleted in the
  previous release.

------
0.6.39
------

* Add support for console launchers on ARM platforms.
* Fix possible issue in GUI launchers where the subsystem was not supplied to
  the linker.
* Launcher build script now refactored for robustness.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Resources extracted from a zip egg to the file system now also
  check the contents of the file against the zip contents during each
  invocation of get_resource_filename.

------
0.6.38
------

* `Distribute #371 <https://bitbucket.org/tarek/distribute/issue/371>`_: The launcher manifest file is now installed properly.

------
0.6.37
------

* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Launcher scripts, including easy_install itself, are now
  accompanied by a manifest on 32-bit Windows environments to avoid the
  Installer Detection Technology and thus undesirable UAC elevation described
  in `this Microsoft article
  <http://technet.microsoft.com/en-us/library/cc709628%28WS.10%29.aspx>`_.

------
0.6.36
------

* `Pull Request #35 <https://bitbucket.org/pypa/setuptools/pull-request/35>`_: In `Buildout #64 <https://github.com/buildout/buildout/issues/64>`_, it was reported that
  under Python 3, installation of distutils scripts could attempt to copy
  the ``__pycache__`` directory as a file, causing an error, apparently only
  under Windows. Easy_install now skips all directories when processing
  metadata scripts.

------
0.6.35
------


Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in
how it parses version numbers.

* `Distribute #278 <https://bitbucket.org/tarek/distribute/issue/278>`_: Restored compatibility with distribute 0.6.22 and setuptools
  0.6. Updated the documentation to match more closely with the version
  parsing as intended in setuptools 0.6.

------
0.6.34
------

* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: 0.6.33 fails to build under Python 2.4.

------
0.6.33
------

* Fix 2 errors with Jython 2.5.
* Fix 1 failure with Jython 2.5 and 2.7.
* Disable workaround for Jython scripts on Linux systems.
* `Distribute #336 <https://bitbucket.org/tarek/distribute/issue/336>`_: `setup.py` no longer masks failure exit code when tests fail.
* Fix issue in pkg_resources where try/except around a platform-dependent
  import would trigger hook load failures on Mercurial. See pull request 32
  for details.
* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: Fix a ResourceWarning.

------
0.6.32
------

* Fix test suite with Python 2.6.
* Fix some DeprecationWarnings and ResourceWarnings.
* `Distribute #335 <https://bitbucket.org/tarek/distribute/issue/335>`_: Backed out `setup_requires` superceding installed requirements
  until regression can be addressed.

------
0.6.31
------

* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Make sure the manifest only ever contains UTF-8 in Python 3.
* `Distribute #329 <https://bitbucket.org/tarek/distribute/issue/329>`_: Properly close files created by tests for compatibility with
  Jython.
* Work around `Jython #1980 <http://bugs.jython.org/issue1980>`_ and `Jython #1981 <http://bugs.jython.org/issue1981>`_.
* `Distribute #334 <https://bitbucket.org/tarek/distribute/issue/334>`_: Provide workaround for packages that reference `sys.__stdout__`
  such as numpy does. This change should address
  `virtualenv `#359 <https://bitbucket.org/pypa/setuptools/issue/359>`_ <https://github.com/pypa/virtualenv/issues/359>`_ as long
  as the system encoding is UTF-8 or the IO encoding is specified in the
  environment, i.e.::

     PYTHONIOENCODING=utf8 pip install numpy

* Fix for encoding issue when installing from Windows executable on Python 3.
* `Distribute #323 <https://bitbucket.org/tarek/distribute/issue/323>`_: Allow `setup_requires` requirements to supercede installed
  requirements. Added some new keyword arguments to existing pkg_resources
  methods. Also had to updated how __path__ is handled for namespace packages
  to ensure that when a new egg distribution containing a namespace package is
  placed on sys.path, the entries in __path__ are found in the same order they
  would have been in had that egg been on the path when pkg_resources was
  first imported.

------
0.6.30
------

* `Distribute #328 <https://bitbucket.org/tarek/distribute/issue/328>`_: Clean up temporary directories in distribute_setup.py.
* Fix fatal bug in distribute_setup.py.

------
0.6.29
------

* `Pull Request #14 <https://bitbucket.org/pypa/setuptools/pull-request/14>`_: Honor file permissions in zip files.
* `Distribute #327 <https://bitbucket.org/tarek/distribute/issue/327>`_: Merged pull request `#24 <https://bitbucket.org/pypa/setuptools/issue/24>`_ to fix a dependency problem with pip.
* Merged pull request `#23 <https://bitbucket.org/pypa/setuptools/issue/23>`_ to fix https://github.com/pypa/virtualenv/issues/301.
* If Sphinx is installed, the `upload_docs` command now runs `build_sphinx`
  to produce uploadable documentation.
* `Distribute #326 <https://bitbucket.org/tarek/distribute/issue/326>`_: `upload_docs` provided mangled auth credentials under Python 3.
* `Distribute #320 <https://bitbucket.org/tarek/distribute/issue/320>`_: Fix check for "createable" in distribute_setup.py.
* `Distribute #305 <https://bitbucket.org/tarek/distribute/issue/305>`_: Remove a warning that was triggered during normal operations.
* `Distribute #311 <https://bitbucket.org/tarek/distribute/issue/311>`_: Print metadata in UTF-8 independent of platform.
* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Read manifest file with UTF-8 encoding under Python 3.
* `Distribute #301 <https://bitbucket.org/tarek/distribute/issue/301>`_: Allow to run tests of namespace packages when using 2to3.
* `Distribute #304 <https://bitbucket.org/tarek/distribute/issue/304>`_: Prevent import loop in site.py under Python 3.3.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3.
* `Distribute #299 <https://bitbucket.org/tarek/distribute/issue/299>`_: The develop command didn't work on Python 3, when using 2to3,
  as the egg link would go to the Python 2 source. Linking to the 2to3'd code
  in build/lib makes it work, although you will have to rebuild the module
  before testing it.
* `Distribute #306 <https://bitbucket.org/tarek/distribute/issue/306>`_: Even if 2to3 is used, we build in-place under Python 2.
* `Distribute #307 <https://bitbucket.org/tarek/distribute/issue/307>`_: Prints the full path when .svn/entries is broken.
* `Distribute #313 <https://bitbucket.org/tarek/distribute/issue/313>`_: Support for sdist subcommands (Python 2.7)
* `Distribute #314 <https://bitbucket.org/tarek/distribute/issue/314>`_: test_local_index() would fail an OS X.
* `Distribute #310 <https://bitbucket.org/tarek/distribute/issue/310>`_: Non-ascii characters in a namespace __init__.py causes errors.
* `Distribute #218 <https://bitbucket.org/tarek/distribute/issue/218>`_: Improved documentation on behavior of `package_data` and
  `include_package_data`. Files indicated by `package_data` are now included
  in the manifest.
* `distribute_setup.py` now allows a `--download-base` argument for retrieving
  distribute from a specified location.

------
0.6.28
------

* `Distribute #294 <https://bitbucket.org/tarek/distribute/issue/294>`_: setup.py can now be invoked from any directory.
* Scripts are now installed honoring the umask.
* Added support for .dist-info directories.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Fix and disable scanning of `*.pyc` / `*.pyo` files on
  Python 3.3.

------
0.6.27
------

* Support current snapshots of CPython 3.3.
* Distribute now recognizes README.rst as a standard, default readme file.
* Exclude 'encodings' modules when removing modules from sys.modules.
  Workaround for `#285 <https://bitbucket.org/pypa/setuptools/issue/285>`_.
* `Distribute #231 <https://bitbucket.org/tarek/distribute/issue/231>`_: Don't fiddle with system python when used with buildout
  (bootstrap.py)

------
0.6.26
------

* `Distribute #183 <https://bitbucket.org/tarek/distribute/issue/183>`_: Symlinked files are now extracted from source distributions.
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: Easy_install fetch parameters are now passed during the
  installation of a source distribution; now fulfillment of setup_requires
  dependencies will honor the parameters passed to easy_install.

------
0.6.25
------

* `Distribute #258 <https://bitbucket.org/tarek/distribute/issue/258>`_: Workaround a cache issue
* `Distribute #260 <https://bitbucket.org/tarek/distribute/issue/260>`_: distribute_setup.py now accepts the --user parameter for
  Python 2.6 and later.
* `Distribute #262 <https://bitbucket.org/tarek/distribute/issue/262>`_: package_index.open_with_auth no longer throws LookupError
  on Python 3.
* `Distribute #269 <https://bitbucket.org/tarek/distribute/issue/269>`_: AttributeError when an exception occurs reading Manifest.in
  on late releases of Python.
* `Distribute #272 <https://bitbucket.org/tarek/distribute/issue/272>`_: Prevent TypeError when namespace package names are unicode
  and single-install-externally-managed is used. Also fixes PIP issue
  449.
* `Distribute #273 <https://bitbucket.org/tarek/distribute/issue/273>`_: Legacy script launchers now install with Python2/3 support.

------
0.6.24
------

* `Distribute #249 <https://bitbucket.org/tarek/distribute/issue/249>`_: Added options to exclude 2to3 fixers

------
0.6.23
------

* `Distribute #244 <https://bitbucket.org/tarek/distribute/issue/244>`_: Fixed a test
* `Distribute #243 <https://bitbucket.org/tarek/distribute/issue/243>`_: Fixed a test
* `Distribute #239 <https://bitbucket.org/tarek/distribute/issue/239>`_: Fixed a test
* `Distribute #240 <https://bitbucket.org/tarek/distribute/issue/240>`_: Fixed a test
* `Distribute #241 <https://bitbucket.org/tarek/distribute/issue/241>`_: Fixed a test
* `Distribute #237 <https://bitbucket.org/tarek/distribute/issue/237>`_: Fixed a test
* `Distribute #238 <https://bitbucket.org/tarek/distribute/issue/238>`_: easy_install now uses 64bit executable wrappers on 64bit Python
* `Distribute #208 <https://bitbucket.org/tarek/distribute/issue/208>`_: Fixed parsed_versions, it now honors post-releases as noted in the documentation
* `Distribute #207 <https://bitbucket.org/tarek/distribute/issue/207>`_: Windows cli and gui wrappers pass CTRL-C to child python process
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: easy_install now passes its arguments to setup.py bdist_egg
* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: Fixed a NameError on Python 2.5, 2.4

------
0.6.21
------

* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: FIxed a regression on py2.4

------
0.6.20
------

* `Distribute #135 <https://bitbucket.org/tarek/distribute/issue/135>`_: Include url in warning when processing URLs in package_index.
* `Distribute #212 <https://bitbucket.org/tarek/distribute/issue/212>`_: Fix issue where easy_instal fails on Python 3 on windows installer.
* `Distribute #213 <https://bitbucket.org/tarek/distribute/issue/213>`_: Fix typo in documentation.

------
0.6.19
------

* `Distribute #206 <https://bitbucket.org/tarek/distribute/issue/206>`_: AttributeError: 'HTTPMessage' object has no attribute 'getheaders'

------
0.6.18
------

* `Distribute #210 <https://bitbucket.org/tarek/distribute/issue/210>`_: Fixed a regression introduced by `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_ fix.

------
0.6.17
------

* Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment
  variable to allow to disable installation of easy_install-${version} script.
* Support Python >=3.1.4 and >=3.2.1.
* `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_: Don't try to import the parent of a namespace package in
  declare_namespace
* `Distribute #196 <https://bitbucket.org/tarek/distribute/issue/196>`_: Tolerate responses with multiple Content-Length headers
* `Distribute #205 <https://bitbucket.org/tarek/distribute/issue/205>`_: Sandboxing doesn't preserve working_set. Leads to setup_requires
  problems.

------
0.6.16
------

* Builds sdist gztar even on Windows (avoiding `Distribute #193 <https://bitbucket.org/tarek/distribute/issue/193>`_).
* `Distribute #192 <https://bitbucket.org/tarek/distribute/issue/192>`_: Fixed metadata omitted on Windows when package_dir
  specified with forward-slash.
* `Distribute #195 <https://bitbucket.org/tarek/distribute/issue/195>`_: Cython build support.
* `Distribute #200 <https://bitbucket.org/tarek/distribute/issue/200>`_: Issues with recognizing 64-bit packages on Windows.

------
0.6.15
------

* Fixed typo in bdist_egg
* Several issues under Python 3 has been solved.
* `Distribute #146 <https://bitbucket.org/tarek/distribute/issue/146>`_: Fixed missing DLL files after easy_install of windows exe package.

------
0.6.14
------

* `Distribute #170 <https://bitbucket.org/tarek/distribute/issue/170>`_: Fixed unittest failure. Thanks to Toshio.
* `Distribute #171 <https://bitbucket.org/tarek/distribute/issue/171>`_: Fixed race condition in unittests cause deadlocks in test suite.
* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Fixed a lookup issue with easy_install.
  Thanks to David and Zooko.
* `Distribute #174 <https://bitbucket.org/tarek/distribute/issue/174>`_: Fixed the edit mode when its used with setuptools itself

------
0.6.13
------

* `Distribute #160 <https://bitbucket.org/tarek/distribute/issue/160>`_: 2.7 gives ValueError("Invalid IPv6 URL")
* `Distribute #150 <https://bitbucket.org/tarek/distribute/issue/150>`_: Fixed using ~/.local even in a --no-site-packages virtualenv
* `Distribute #163 <https://bitbucket.org/tarek/distribute/issue/163>`_: scan index links before external links, and don't use the md5 when
  comparing two distributions

------
0.6.12
------

* `Distribute #149 <https://bitbucket.org/tarek/distribute/issue/149>`_: Fixed various failures on 2.3/2.4

------
0.6.11
------

* Found another case of SandboxViolation - fixed
* `Distribute #15 <https://bitbucket.org/tarek/distribute/issue/15>`_ and `Distribute #48 <https://bitbucket.org/tarek/distribute/issue/48>`_: Introduced a socket timeout of 15 seconds on url openings
* Added indexsidebar.html into MANIFEST.in
* `Distribute #108 <https://bitbucket.org/tarek/distribute/issue/108>`_: Fixed TypeError with Python3.1
* `Distribute #121 <https://bitbucket.org/tarek/distribute/issue/121>`_: Fixed --help install command trying to actually install.
* `Distribute #112 <https://bitbucket.org/tarek/distribute/issue/112>`_: Added an os.makedirs so that Tarek's solution will work.
* `Distribute #133 <https://bitbucket.org/tarek/distribute/issue/133>`_: Added --no-find-links to easy_install
* Added easy_install --user
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: Fixed develop --user not taking '.' in PYTHONPATH into account
* `Distribute #134 <https://bitbucket.org/tarek/distribute/issue/134>`_: removed spurious UserWarnings. Patch by VanLindberg
* `Distribute #138 <https://bitbucket.org/tarek/distribute/issue/138>`_: cant_write_to_target error when setup_requires is used.
* `Distribute #147 <https://bitbucket.org/tarek/distribute/issue/147>`_: respect the sys.dont_write_bytecode flag

------
0.6.10
------

* Reverted change made for the DistributionNotFound exception because
  zc.buildout uses the exception message to get the name of the
  distribution.

-----
0.6.9
-----

* `Distribute #90 <https://bitbucket.org/tarek/distribute/issue/90>`_: unknown setuptools version can be added in the working set
* `Distribute #87 <https://bitbucket.org/tarek/distribute/issue/87>`_: setupt.py doesn't try to convert distribute_setup.py anymore
  Initial Patch by arfrever.
* `Distribute #89 <https://bitbucket.org/tarek/distribute/issue/89>`_: added a side bar with a download link to the doc.
* `Distribute #86 <https://bitbucket.org/tarek/distribute/issue/86>`_: fixed missing sentence in pkg_resources doc.
* Added a nicer error message when a DistributionNotFound is raised.
* `Distribute #80 <https://bitbucket.org/tarek/distribute/issue/80>`_: test_develop now works with Python 3.1
* `Distribute #93 <https://bitbucket.org/tarek/distribute/issue/93>`_: upload_docs now works if there is an empty sub-directory.
* `Distribute #70 <https://bitbucket.org/tarek/distribute/issue/70>`_: exec bit on non-exec files
* `Distribute #99 <https://bitbucket.org/tarek/distribute/issue/99>`_: now the standalone easy_install command doesn't uses a
  "setup.cfg" if any exists in the working directory. It will use it
  only if triggered by ``install_requires`` from a setup.py call
  (install, develop, etc).
* `Distribute #101 <https://bitbucket.org/tarek/distribute/issue/101>`_: Allowing ``os.devnull`` in Sandbox
* `Distribute #92 <https://bitbucket.org/tarek/distribute/issue/92>`_: Fixed the "no eggs" found error with MacPort
  (platform.mac_ver() fails)
* `Distribute #103 <https://bitbucket.org/tarek/distribute/issue/103>`_: test_get_script_header_jython_workaround not run
  anymore under py3 with C or POSIX local. Contributed by Arfrever.
* `Distribute #104 <https://bitbucket.org/tarek/distribute/issue/104>`_: remvoved the assertion when the installation fails,
  with a nicer message for the end user.
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: making sure there's no SandboxViolation when
  the setup script patches setuptools.

-----
0.6.8
-----

* Added "check_packages" in dist. (added in Setuptools 0.6c11)
* Fixed the DONT_PATCH_SETUPTOOLS state.

-----
0.6.7
-----

* `Distribute #58 <https://bitbucket.org/tarek/distribute/issue/58>`_: Added --user support to the develop command
* `Distribute #11 <https://bitbucket.org/tarek/distribute/issue/11>`_: Generated scripts now wrap their call to the script entry point
  in the standard "if name == 'main'"
* Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv
  can drive an installation that doesn't patch a global setuptools.
* Reviewed unladen-swallow specific change from
  http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719
  and determined that it no longer applies. Distribute should work fine with
  Unladen Swallow 2009Q3.
* `Distribute #21 <https://bitbucket.org/tarek/distribute/issue/21>`_: Allow PackageIndex.open_url to gracefully handle all cases of a
  httplib.HTTPException instead of just InvalidURL and BadStatusLine.
* Removed virtual-python.py from this distribution and updated documentation
  to point to the actively maintained virtualenv instead.
* `Distribute #64 <https://bitbucket.org/tarek/distribute/issue/64>`_: use_setuptools no longer rebuilds the distribute egg every
  time it is run
* use_setuptools now properly respects the requested version
* use_setuptools will no longer try to import a distribute egg for the
  wrong Python version
* `Distribute #74 <https://bitbucket.org/tarek/distribute/issue/74>`_: no_fake should be True by default.
* `Distribute #72 <https://bitbucket.org/tarek/distribute/issue/72>`_: avoid a bootstrapping issue with easy_install -U

-----
0.6.6
-----

* Unified the bootstrap file so it works on both py2.x and py3k without 2to3
  (patch by Holger Krekel)

-----
0.6.5
-----

* `Distribute #65 <https://bitbucket.org/tarek/distribute/issue/65>`_: cli.exe and gui.exe are now generated at build time,
  depending on the platform in use.

* `Distribute #67 <https://bitbucket.org/tarek/distribute/issue/67>`_: Fixed doc typo (PEP 381/382)

* Distribute no longer shadows setuptools if we require a 0.7-series
  setuptools.  And an error is raised when installing a 0.7 setuptools with
  distribute.

* When run from within buildout, no attempt is made to modify an existing
  setuptools egg, whether in a shared egg directory or a system setuptools.

* Fixed a hole in sandboxing allowing builtin file to write outside of
  the sandbox.

-----
0.6.4
-----

* Added the generation of `distribute_setup_3k.py` during the release.
  This closes `Distribute #52 <https://bitbucket.org/tarek/distribute/issue/52>`_.

* Added an upload_docs command to easily upload project documentation to
  PyPI's https://pythonhosted.org. This close issue `Distribute #56 <https://bitbucket.org/tarek/distribute/issue/56>`_.

* Fixed a bootstrap bug on the use_setuptools() API.

-----
0.6.3
-----

setuptools
==========

* Fixed a bunch of calls to file() that caused crashes on Python 3.

bootstrapping
=============

* Fixed a bug in sorting that caused bootstrap to fail on Python 3.

-----
0.6.2
-----

setuptools
==========

* Added Python 3 support; see docs/python3.txt.
  This closes `Old Setuptools #39 <http://bugs.python.org/setuptools/issue39>`_.

* Added option to run 2to3 automatically when installing on Python 3.
  This closes issue `Distribute #31 <https://bitbucket.org/tarek/distribute/issue/31>`_.

* Fixed invalid usage of requirement.parse, that broke develop -d.
  This closes `Old Setuptools #44 <http://bugs.python.org/setuptools/issue44>`_.

* Fixed script launcher for 64-bit Windows.
  This closes `Old Setuptools #2 <http://bugs.python.org/setuptools/issue2>`_.

* KeyError when compiling extensions.
  This closes `Old Setuptools #41 <http://bugs.python.org/setuptools/issue41>`_.

bootstrapping
=============

* Fixed bootstrap not working on Windows. This closes issue `Distribute #49 <https://bitbucket.org/tarek/distribute/issue/49>`_.

* Fixed 2.6 dependencies. This closes issue `Distribute #50 <https://bitbucket.org/tarek/distribute/issue/50>`_.

* Make sure setuptools is patched when running through easy_install
  This closes `Old Setuptools #40 <http://bugs.python.org/setuptools/issue40>`_.

-----
0.6.1
-----

setuptools
==========

* package_index.urlopen now catches BadStatusLine and malformed url errors.
  This closes `Distribute #16 <https://bitbucket.org/tarek/distribute/issue/16>`_ and `Distribute #18 <https://bitbucket.org/tarek/distribute/issue/18>`_.

* zip_ok is now False by default. This closes `Old Setuptools #33 <http://bugs.python.org/setuptools/issue33>`_.

* Fixed invalid URL error catching. `Old Setuptools #20 <http://bugs.python.org/setuptools/issue20>`_.

* Fixed invalid bootstraping with easy_install installation (`Distribute #40 <https://bitbucket.org/tarek/distribute/issue/40>`_).
  Thanks to Florian Schulze for the help.

* Removed buildout/bootstrap.py. A new repository will create a specific
  bootstrap.py script.


bootstrapping
=============

* The boostrap process leave setuptools alone if detected in the system
  and --root or --prefix is provided, but is not in the same location.
  This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

---
0.6
---

setuptools
==========

* Packages required at build time where not fully present at install time.
  This closes `Distribute #12 <https://bitbucket.org/tarek/distribute/issue/12>`_.

* Protected against failures in tarfile extraction. This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

* Made Jython api_tests.txt doctest compatible. This closes `Distribute #7 <https://bitbucket.org/tarek/distribute/issue/7>`_.

* sandbox.py replaced builtin type file with builtin function open. This
  closes `Distribute #6 <https://bitbucket.org/tarek/distribute/issue/6>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

* Added compatibility with Subversion 1.6. This references `Distribute #1 <https://bitbucket.org/tarek/distribute/issue/1>`_.

pkg_resources
=============

* Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API
  instead. Based on a patch from ronaldoussoren. This closes issue `#5 <https://bitbucket.org/pypa/setuptools/issue/5>`_.

* Fixed a SandboxViolation for mkdir that could occur in certain cases.
  This closes `Distribute #13 <https://bitbucket.org/tarek/distribute/issue/13>`_.

* Allow to find_on_path on systems with tight permissions to fail gracefully.
  This closes `Distribute #9 <https://bitbucket.org/tarek/distribute/issue/9>`_.

* Corrected inconsistency between documentation and code of add_entry.
  This closes `Distribute #8 <https://bitbucket.org/tarek/distribute/issue/8>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

easy_install
============

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

-----
0.6c9
-----

 * Fixed a missing files problem when using Windows source distributions on
   non-Windows platforms, due to distutils not handling manifest file line
   endings correctly.

 * Updated Pyrex support to work with Pyrex 0.9.6 and higher.

 * Minor changes for Jython compatibility, including skipping tests that can't
   work on Jython.

 * Fixed not installing eggs in ``install_requires`` if they were also used for
   ``setup_requires`` or ``tests_require``.

 * Fixed not fetching eggs in ``install_requires`` when running tests.

 * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools
   installations when called from a standalone ``setup.py``.

 * Added a warning if a namespace package is declared, but its parent package
   is not also declared as a namespace.

 * Support Subversion 1.5

 * Removed use of deprecated ``md5`` module if ``hashlib`` is available

 * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice

 * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's
   ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``.

 * Ensure that _full_name is set on all shared libs before extensions are
   checked for shared lib usage.  (Fixes a bug in the experimental shared
   library build support.)

 * Fix to allow unpacked eggs containing native libraries to fail more
   gracefully under Google App Engine (with an ``ImportError`` loading the
   C-based module, instead of getting a ``NameError``).

-----
0.6c7
-----

 * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and
   ``egg_info`` command failing on new, uncommitted SVN directories.

 * Fix import problems with nested namespace packages installed via
   ``--root`` or ``--single-version-externally-managed``, due to the
   parent package not having the child package as an attribute.

-----
0.6c6
-----

 * Added ``--egg-path`` option to ``develop`` command, allowing you to force
   ``.egg-link`` files to use relative paths (allowing them to be shared across
   platforms on a networked drive).

 * Fix not building binary RPMs correctly.

 * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with
   bash-compatible shells.

 * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there
   was whitespace inside a quoted argument or at the end of the ``#!`` line
   (a regression introduced in 0.6c4).

 * Fix ``test`` command possibly failing if an older version of the project
   being tested was installed on ``sys.path`` ahead of the test source
   directory.

 * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in
   their names as packages.

-----
0.6c5
-----

 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg``
   packages under Python versions less than 2.5.

 * Fix uploaded ``bdist_wininst`` packages being described as suitable for
   "any" version by Python 2.5, even if a ``--target-version`` was specified.

-----
0.6c4
-----

 * Overhauled Windows script wrapping to support ``bdist_wininst`` better.
   Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or
   ``#!pythonw.exe`` as the executable name (even when built on non-Windows
   platforms!), and the wrappers will look for the executable in the script's
   parent directory (which should find the right version of Python).

 * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or
   ``bdist_wininst`` under Python 2.3 and 2.4.

 * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is
   prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish
   platforms.  (This is mainly so that setuptools itself can have a single-file
   installer on Unix, without doing multiple downloads, dealing with firewalls,
   etc.)

 * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files

 * Use cross-platform relative paths in ``easy-install.pth`` when doing
   ``develop`` and the source directory is a subdirectory of the installation
   target directory.

 * Fix a problem installing eggs with a system packaging tool if the project
   contained an implicit namespace package; for example if the ``setup()``
   listed a namespace package ``foo.bar`` without explicitly listing ``foo``
   as a namespace package.

-----
0.6c3
-----

 * Fixed breakages caused by Subversion 1.4's new "working copy" format

-----
0.6c2
-----

 * The ``ez_setup`` module displays the conflicting version of setuptools (and
   its installation location) when a script requests a version that's not
   available.

 * Running ``setup.py develop`` on a setuptools-using project will now install
   setuptools if needed, instead of only downloading the egg.

-----
0.6c1
-----

 * Fixed ``AttributeError`` when trying to download a ``setup_requires``
   dependency when a distribution lacks a ``dependency_links`` setting.

 * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so
   as to play better with packaging tools that complain about zero-length
   files.

 * Made ``setup.py develop`` respect the ``--no-deps`` option, which it
   previously was ignoring.

 * Support ``extra_path`` option to ``setup()`` when ``install`` is run in
   backward-compatibility mode.

 * Source distributions now always include a ``setup.cfg`` file that explicitly
   sets ``egg_info`` options such that they produce an identical version number
   to the source distribution's version number.  (Previously, the default
   version number could be different due to the use of ``--tag-date``, or if
   the version was overridden on the command line that built the source
   distribution.)

-----
0.6b4
-----

 * Fix ``register`` not obeying name/version set by ``egg_info`` command, if
   ``egg_info`` wasn't explicitly run first on the same command line.

 * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info``
   command, to allow suppressing tags configured in ``setup.cfg``.

 * Fixed redundant warnings about missing ``README`` file(s); it should now
   appear only if you are actually a source distribution.

-----
0.6b3
-----

 * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``.

 * Allow ``.py`` files found by the ``include_package_data`` option to be
   automatically included.  Remove duplicate data file matches if both
   ``include_package_data`` and ``package_data`` are used to refer to the same
   files.

-----
0.6b1
-----

 * Strip ``module`` from the end of compiled extension modules when computing
   the name of a ``.py`` loader/wrapper.  (Python's import machinery ignores
   this suffix when searching for an extension module.)

------
0.6a11
------

 * Added ``test_loader`` keyword to support custom test loaders

 * Added ``setuptools.file_finders`` entry point group to allow implementing
   revision control plugins.

 * Added ``--identity`` option to ``upload`` command.

 * Added ``dependency_links`` to allow specifying URLs for ``--find-links``.

 * Enhanced test loader to scan packages as well as modules, and call
   ``additional_tests()`` if present to get non-unittest tests.

 * Support namespace packages in conjunction with system packagers, by omitting
   the installation of any ``__init__.py`` files for namespace packages, and
   adding a special ``.pth`` file to create a working package in
   ``sys.modules``.

 * Made ``--single-version-externally-managed`` automatic when ``--root`` is
   used, so that most system packagers won't require special support for
   setuptools.

 * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or
   other configuration files for their option defaults when installing, and
   also made the install use ``--multi-version`` mode so that the project
   directory doesn't need to support .pth files.

 * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading
   it.  Previously, the file could be left open and the actual error would be
   masked by problems trying to remove the open file on Windows systems.

------
0.6a10
------

 * Fixed the ``develop`` command ignoring ``--find-links``.

-----
0.6a9
-----

 * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to
   create source distributions.  ``MANIFEST.in`` is still read and processed,
   as are the standard defaults and pruning.  But the manifest is built inside
   the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt
   every time the ``egg_info`` command is run.

 * Added the ``include_package_data`` keyword to ``setup()``, allowing you to
   automatically include any package data listed in revision control or
   ``MANIFEST.in``

 * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to
   trim back files included via the ``package_data`` and
   ``include_package_data`` options.

 * Fixed ``--tag-svn-revision`` not working when run from a source
   distribution.

 * Added warning for namespace packages with missing ``declare_namespace()``

 * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages
   requiring ``nose`` to run unit tests can make this dependency optional
   unless the ``test`` command is run.

 * Made all commands that use ``easy_install`` respect its configuration
   options, as this was causing some problems with ``setup.py install``.

 * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so
   that you can process a directory tree through a processing filter as if it
   were a zipfile or tarfile.

 * Added an internal ``install_egg_info`` command to use as part of old-style
   ``install`` operations, that installs an ``.egg-info`` directory with the
   package.

 * Added a ``--single-version-externally-managed`` option to the ``install``
   command so that you can more easily wrap a "flat" egg in a system package.

 * Enhanced ``bdist_rpm`` so that it installs single-version eggs that
   don't rely on a ``.pth`` file.  The ``--no-egg`` option has been removed,
   since all RPMs are now built in a more backwards-compatible format.

 * Support full roundtrip translation of eggs to and from ``bdist_wininst``
   format.  Running ``bdist_wininst`` on a setuptools-based package wraps the
   egg in an .exe that will safely install it as an egg (i.e., with metadata
   and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
   back into an ``.egg`` file or directory and install it as such.


-----
0.6a8
-----

 * Fixed some problems building extensions when Pyrex was installed, especially
   with Python 2.4 and/or packages using SWIG.

 * Made ``develop`` command accept all the same options as ``easy_install``,
   and use the ``easy_install`` command's configuration settings as defaults.

 * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision
   number from ``PKG-INFO`` in case it is being run on a source distribution of
   a snapshot taken from a Subversion-based project.

 * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being
   installed as data, adding them to ``native_libs.txt`` automatically.

 * Fixed some problems with fresh checkouts of projects that don't include
   ``.egg-info/PKG-INFO`` under revision control and put the project's source
   code directly in the project directory.  If such a package had any
   requirements that get processed before the ``egg_info`` command can be run,
   the setup scripts would fail with a "Missing 'Version:' header and/or
   PKG-INFO file" error, because the egg runtime interpreted the unbuilt
   metadata in a directory on ``sys.path`` (i.e. the current directory) as
   being a corrupted egg.  Setuptools now monkeypatches the distribution
   metadata cache to pretend that the egg has valid version information, until
   it has a chance to make it actually be so (via the ``egg_info`` command).

-----
0.6a5
-----

 * Fixed missing gui/cli .exe files in distribution.  Fixed bugs in tests.

-----
0.6a3
-----

 * Added ``gui_scripts`` entry point group to allow installing GUI scripts
   on Windows and other platforms.  (The special handling is only for Windows;
   other platforms are treated the same as for ``console_scripts``.)

-----
0.6a2
-----

 * Added ``console_scripts`` entry point group to allow installing scripts
   without the need to create separate script files.  On Windows, console
   scripts get an ``.exe`` wrapper so you can just type their name.  On other
   platforms, the scripts are written without a file extension.

-----
0.6a1
-----

 * Added support for building "old-style" RPMs that don't install an egg for
   the target package, using a ``--no-egg`` option.

 * The ``build_ext`` command now works better when using the ``--inplace``
   option and multiple Python versions.  It now makes sure that all extensions
   match the current Python version, even if newer copies were built for a
   different Python version.

 * The ``upload`` command no longer attaches an extra ``.zip`` when uploading
   eggs, as PyPI now supports egg uploads without trickery.

 * The ``ez_setup`` script/module now displays a warning before downloading
   the setuptools egg, and attempts to check the downloaded egg against an
   internal MD5 checksum table.

 * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the
   latest revision number; it was using the revision number of the directory
   containing ``setup.py``, not the highest revision number in the project.

 * Added ``eager_resources`` setup argument

 * The ``sdist`` command now recognizes Subversion "deleted file" entries and
   does not include them in source distributions.

 * ``setuptools`` now embeds itself more thoroughly into the distutils, so that
   other distutils extensions (e.g. py2exe, py2app) will subclass setuptools'
   versions of things, rather than the native distutils ones.

 * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``;
   ``setup_requires`` allows you to automatically find and download packages
   that are needed in order to *build* your project (as opposed to running it).

 * ``setuptools`` now finds its commands, ``setup()`` argument validators, and
   metadata writers using entry points, so that they can be extended by
   third-party packages.  See `Creating distutils Extensions
   <http://pythonhosted.org/setuptools/setuptools.html#creating-distutils-extensions>`_
   for more details.

 * The vestigial ``depends`` command has been removed.  It was never finished
   or documented, and never would have worked without EasyInstall - which it
   pre-dated and was never compatible with.

------
0.5a12
------

 * The zip-safety scanner now checks for modules that might be used with
   ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't
   handle ``-m`` on zipped modules.

------
0.5a11
------

 * Fix breakage of the "develop" command that was caused by the addition of
   ``--always-unzip`` to the ``easy_install`` command.

-----
0.5a9
-----

 * Include ``svn:externals`` directories in source distributions as well as
   normal subversion-controlled files and directories.

 * Added ``exclude=patternlist`` option to ``setuptools.find_packages()``

 * Changed --tag-svn-revision to include an "r" in front of the revision number
   for better readability.

 * Added ability to build eggs without including source files (except for any
   scripts, of course), using the ``--exclude-source-files`` option to
   ``bdist_egg``.

 * ``setup.py install`` now automatically detects when an "unmanaged" package
   or module is going to be on ``sys.path`` ahead of a package being installed,
   thereby preventing the newer version from being imported.  If this occurs,
   a warning message is output to ``sys.stderr``, but installation proceeds
   anyway.  The warning message informs the user what files or directories
   need deleting, and advises them they can also use EasyInstall (with the
   ``--delete-conflicting`` option) to do it automatically.

 * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata
   directory that lists all top-level modules and packages in the distribution.
   This is used by the ``easy_install`` command to find possibly-conflicting
   "unmanaged" packages when installing the distribution.

 * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``.
   Added package analysis to determine zip-safety if the ``zip_safe`` flag
   is not given, and advise the author regarding what code might need changing.

 * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``.

-----
0.5a8
-----

 * The "egg_info" command now always sets the distribution metadata to "safe"
   forms of the distribution name and version, so that distribution files will
   be generated with parseable names (i.e., ones that don't include '-' in the
   name or version).  Also, this means that if you use the various ``--tag``
   options of "egg_info", any distributions generated will use the tags in the
   version, not just egg distributions.

 * Added support for defining command aliases in distutils configuration files,
   under the "[aliases]" section.  To prevent recursion and to allow aliases to
   call the command of the same name, a given alias can be expanded only once
   per command-line invocation.  You can define new aliases with the "alias"
   command, either for the local, global, or per-user configuration.

 * Added "rotate" command to delete old distribution files, given a set of
   patterns to match and the number of files to keep.  (Keeps the most
   recently-modified distribution files matching each pattern.)

 * Added "saveopts" command that saves all command-line options for the current
   invocation to the local, global, or per-user configuration file.  Useful for
   setting defaults without having to hand-edit a configuration file.

 * Added a "setopt" command that sets a single option in a specified distutils
   configuration file.

-----
0.5a7
-----

 * Added "upload" support for egg and source distributions, including a bug
   fix for "upload" and a temporary workaround for lack of .egg support in
   PyPI.

-----
0.5a6
-----

 * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it
   will include all files under revision control (CVS or Subversion) in the
   current directory, and it will regenerate the list every time you create a
   source distribution, not just when you tell it to.  This should make the
   default "do what you mean" more often than the distutils' default behavior
   did, while still retaining the old behavior in the presence of MANIFEST.in.

 * Fixed the "develop" command always updating .pth files, even if you
   specified ``-n`` or ``--dry-run``.

 * Slightly changed the format of the generated version when you use
   ``--tag-build`` on the "egg_info" command, so that you can make tagged
   revisions compare *lower* than the version specified in setup.py (e.g. by
   using ``--tag-build=dev``).

-----
0.5a5
-----

 * Added ``develop`` command to ``setuptools``-based packages.  This command
   installs an ``.egg-link`` pointing to the package's source directory, and
   script wrappers that ``execfile()`` the source versions of the package's
   scripts.  This lets you put your development checkout(s) on sys.path without
   having to actually install them.  (To uninstall the link, use
   use ``setup.py develop --uninstall``.)

 * Added ``egg_info`` command to ``setuptools``-based packages.  This command
   just creates or updates the "projectname.egg-info" directory, without
   building an egg.  (It's used by the ``bdist_egg``, ``test``, and ``develop``
   commands.)

 * Enhanced the ``test`` command so that it doesn't install the package, but
   instead builds any C extensions in-place, updates the ``.egg-info``
   metadata, adds the source directory to ``sys.path``, and runs the tests
   directly on the source.  This avoids an "unmanaged" installation of the
   package to ``site-packages`` or elsewhere.

 * Made ``easy_install`` a standard ``setuptools`` command, moving it from
   the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
   that if you were importing or extending it, you must now change your imports
   accordingly.  ``easy_install.py`` is still installed as a script, but not as
   a module.

-----
0.5a4
-----

 * Setup scripts using setuptools can now list their dependencies directly in
   the setup.py file, without having to manually create a ``depends.txt`` file.
   The ``install_requires`` and ``extras_require`` arguments to ``setup()``
   are used to create a dependencies file automatically.  If you are manually
   creating ``depends.txt`` right now, please switch to using these setup
   arguments as soon as practical, because ``depends.txt`` support will be
   removed in the 0.6 release cycle.  For documentation on the new arguments,
   see the ``setuptools.dist.Distribution`` class.

 * Setup scripts using setuptools now always install using ``easy_install``
   internally, for ease of uninstallation and upgrading.

-----
0.5a1
-----

 * Added support for "self-installation" bootstrapping.  Packages can now
   include ``ez_setup.py`` in their source distribution, and add the following
   to their ``setup.py``, in order to automatically bootstrap installation of
   setuptools as part of their setup process::

    from ez_setup import use_setuptools
    use_setuptools()

    from setuptools import setup
    # etc...

-----
0.4a2
-----

 * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools
   installation easier, and to allow distributions using setuptools to avoid
   having to include setuptools in their source distribution.

 * All downloads are now managed by the ``PackageIndex`` class (which is now
   subclassable and replaceable), so that embedders can more easily override
   download logic, give download progress reports, etc.  The class has also
   been moved to the new ``setuptools.package_index`` module.

 * The ``Installer`` class no longer handles downloading, manages a temporary
   directory, or tracks the ``zip_ok`` option.  Downloading is now handled
   by ``PackageIndex``, and ``Installer`` has become an ``easy_install``
   command class based on ``setuptools.Command``.

 * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup
   script in a directory sandbox, and a new ``setuptools.archive_util`` module
   with an ``unpack_archive()`` API.  These were split out of EasyInstall to
   allow reuse by other tools and applications.

 * ``setuptools.Command`` now supports reinitializing commands using keyword
   arguments to set/reset options.  Also, ``Command`` subclasses can now set
   their ``command_consumes_arguments`` attribute to ``True`` in order to
   receive an ``args`` option containing the rest of the command line.

-----
0.3a2
-----

 * Added new options to ``bdist_egg`` to allow tagging the egg's version number
   with a subversion revision number, the current date, or an explicit tag
   value.  Run ``setup.py bdist_egg --help`` to get more information.

 * Misc. bug fixes

-----
0.3a1
-----

 * Initial release.


python3.4/site-packages/setuptools-2.0.dist-info/WHEEL000064400000000156151735050040016234 0ustar00Wheel-Version: 1.0
Generator: bdist_wheel (0.22.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

python3.4/site-packages/pkg_resources.py000064400000301137151735050040014264 0ustar00"""Package resource API
--------------------

A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.

The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
"""

import sys
import os
import time
import re
import imp
import zipfile
import zipimport
import warnings
import stat
import functools
import pkgutil
from pkgutil import get_importer

try:
    from urlparse import urlparse, urlunparse
except ImportError:
    from urllib.parse import urlparse, urlunparse

try:
    frozenset
except NameError:
    from sets import ImmutableSet as frozenset
try:
    basestring
    next = lambda o: o.next()
    from cStringIO import StringIO as BytesIO
except NameError:
    basestring = str
    from io import BytesIO
    def execfile(fn, globs=None, locs=None):
        if globs is None:
            globs = globals()
        if locs is None:
            locs = globs
        exec(compile(open(fn).read(), fn, 'exec'), globs, locs)

# capture these to bypass sandboxing
from os import utime
try:
    from os import mkdir, rename, unlink
    WRITE_SUPPORT = True
except ImportError:
    # no write support, probably under GAE
    WRITE_SUPPORT = False

from os import open as os_open
from os.path import isdir, split

# Avoid try/except due to potential problems with delayed import mechanisms.
if sys.version_info >= (3, 3) and sys.implementation.name == "cpython":
    import importlib._bootstrap as importlib_bootstrap
else:
    importlib_bootstrap = None

try:
    import parser
except ImportError:
    pass

def _bypass_ensure_directory(name, mode=0x1FF):  # 0777
    # Sandbox-bypassing version of ensure_directory()
    if not WRITE_SUPPORT:
        raise IOError('"os.mkdir" not supported on this platform.')
    dirname, filename = split(name)
    if dirname and filename and not isdir(dirname):
        _bypass_ensure_directory(dirname)
        mkdir(dirname, mode)


_state_vars = {}

def _declare_state(vartype, **kw):
    g = globals()
    for name, val in kw.items():
        g[name] = val
        _state_vars[name] = vartype

def __getstate__():
    state = {}
    g = globals()
    for k, v in _state_vars.items():
        state[k] = g['_sget_'+v](g[k])
    return state

def __setstate__(state):
    g = globals()
    for k, v in state.items():
        g['_sset_'+_state_vars[k]](k, g[k], v)
    return state

def _sget_dict(val):
    return val.copy()

def _sset_dict(key, ob, state):
    ob.clear()
    ob.update(state)

def _sget_object(val):
    return val.__getstate__()

def _sset_object(key, ob, state):
    ob.__setstate__(state)

_sget_none = _sset_none = lambda *args: None


def get_supported_platform():
    """Return this platform's maximum compatible version.

    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.

    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    """
    plat = get_build_platform()
    m = macosVersionString.match(plat)
    if m is not None and sys.platform == "darwin":
        try:
            plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3))
        except ValueError:
            pass    # not Mac OS X
    return plat

__all__ = [
    # Basic resource access and distribution/entry point discovery
    'require', 'run_script', 'get_provider',  'get_distribution',
    'load_entry_point', 'get_entry_map', 'get_entry_info', 'iter_entry_points',
    'resource_string', 'resource_stream', 'resource_filename',
    'resource_listdir', 'resource_exists', 'resource_isdir',

    # Environmental control
    'declare_namespace', 'working_set', 'add_activation_listener',
    'find_distributions', 'set_extraction_path', 'cleanup_resources',
    'get_default_cache',

    # Primary implementation classes
    'Environment', 'WorkingSet', 'ResourceManager',
    'Distribution', 'Requirement', 'EntryPoint',

    # Exceptions
    'ResolutionError','VersionConflict','DistributionNotFound','UnknownExtra',
    'ExtractionError',

    # Parsing functions and string utilities
    'parse_requirements', 'parse_version', 'safe_name', 'safe_version',
    'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections',
    'safe_extra', 'to_filename', 'invalid_marker', 'evaluate_marker',

    # filesystem utilities
    'ensure_directory', 'normalize_path',

    # Distribution "precedence" constants
    'EGG_DIST', 'BINARY_DIST', 'SOURCE_DIST', 'CHECKOUT_DIST', 'DEVELOP_DIST',

    # "Provider" interfaces, implementations, and registration/lookup APIs
    'IMetadataProvider', 'IResourceProvider', 'FileMetadata',
    'PathMetadata', 'EggMetadata', 'EmptyProvider', 'empty_provider',
    'NullProvider', 'EggProvider', 'DefaultProvider', 'ZipProvider',
    'register_finder', 'register_namespace_handler', 'register_loader_type',
    'fixup_namespace_packages', 'get_importer',

    # Deprecated/backward compatibility only
    'run_main', 'AvailableDistributions',
]

class ResolutionError(Exception):
    """Abstract base for dependency resolution errors"""
    def __repr__(self):
        return self.__class__.__name__+repr(self.args)

class VersionConflict(ResolutionError):
    """An already-installed version conflicts with the requested version"""

class DistributionNotFound(ResolutionError):
    """A requested distribution was not found"""

class UnknownExtra(ResolutionError):
    """Distribution doesn't have an "extra feature" of the given name"""
_provider_factories = {}

PY_MAJOR = sys.version[:3]
EGG_DIST = 3
BINARY_DIST = 2
SOURCE_DIST = 1
CHECKOUT_DIST = 0
DEVELOP_DIST = -1

def register_loader_type(loader_type, provider_factory):
    """Register `provider_factory` to make providers for `loader_type`

    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    """
    _provider_factories[loader_type] = provider_factory

def get_provider(moduleOrReq):
    """Return an IResourceProvider for the named module or requirement"""
    if isinstance(moduleOrReq,Requirement):
        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
    try:
        module = sys.modules[moduleOrReq]
    except KeyError:
        __import__(moduleOrReq)
        module = sys.modules[moduleOrReq]
    loader = getattr(module, '__loader__', None)
    return _find_adapter(_provider_factories, loader)(module)

def _macosx_vers(_cache=[]):
    if not _cache:
        import platform
        version = platform.mac_ver()[0]
        # fallback for MacPorts
        if version == '':
            import plistlib
            plist = '/System/Library/CoreServices/SystemVersion.plist'
            if os.path.exists(plist):
                if hasattr(plistlib, 'readPlist'):
                    plist_content = plistlib.readPlist(plist)
                    if 'ProductVersion' in plist_content:
                        version = plist_content['ProductVersion']

        _cache.append(version.split('.'))
    return _cache[0]

def _macosx_arch(machine):
    return {'PowerPC':'ppc', 'Power_Macintosh':'ppc'}.get(machine,machine)

def get_build_platform():
    """Return this platform's string for platform-specific distributions

    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    """
    try:
        # Python 2.7 or >=3.2
        from sysconfig import get_platform
    except ImportError:
        from distutils.util import get_platform

    plat = get_platform()
    if sys.platform == "darwin" and not plat.startswith('macosx-'):
        try:
            version = _macosx_vers()
            machine = os.uname()[4].replace(" ", "_")
            return "macosx-%d.%d-%s" % (int(version[0]), int(version[1]),
                _macosx_arch(machine))
        except ValueError:
            # if someone is running a non-Mac darwin system, this will fall
            # through to the default implementation
            pass
    return plat

macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
get_platform = get_build_platform   # XXX backward compat


def compatible_platforms(provided,required):
    """Can code for the `provided` platform run on the `required` platform?

    Returns true if either platform is ``None``, or the platforms are equal.

    XXX Needs compatibility checks for Linux and other unixy OSes.
    """
    if provided is None or required is None or provided==required:
        return True     # easy case

    # Mac OS X special cases
    reqMac = macosVersionString.match(required)
    if reqMac:
        provMac = macosVersionString.match(provided)

        # is this a Mac package?
        if not provMac:
            # this is backwards compatibility for packages built before
            # setuptools 0.6. All packages built after this point will
            # use the new macosx designation.
            provDarwin = darwinVersionString.match(provided)
            if provDarwin:
                dversion = int(provDarwin.group(1))
                macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2))
                if dversion == 7 and macosversion >= "10.3" or \
                        dversion == 8 and macosversion >= "10.4":

                    #import warnings
                    #warnings.warn("Mac eggs should be rebuilt to "
                    #    "use the macosx designation instead of darwin.",
                    #    category=DeprecationWarning)
                    return True
            return False    # egg isn't macosx or legacy darwin

        # are they the same major version and machine type?
        if provMac.group(1) != reqMac.group(1) or \
                provMac.group(3) != reqMac.group(3):
            return False

        # is the required OS major update >= the provided one?
        if int(provMac.group(2)) > int(reqMac.group(2)):
            return False

        return True

    # XXX Linux and other platforms' special cases should go here
    return False


def run_script(dist_spec, script_name):
    """Locate distribution `dist_spec` and run its `script_name` script"""
    ns = sys._getframe(1).f_globals
    name = ns['__name__']
    ns.clear()
    ns['__name__'] = name
    require(dist_spec)[0].run_script(script_name, ns)

run_main = run_script   # backward compatibility

def get_distribution(dist):
    """Return a current distribution object for a Requirement or string"""
    if isinstance(dist,basestring): dist = Requirement.parse(dist)
    if isinstance(dist,Requirement): dist = get_provider(dist)
    if not isinstance(dist,Distribution):
        raise TypeError("Expected string, Requirement, or Distribution", dist)
    return dist

def load_entry_point(dist, group, name):
    """Return `name` entry point of `group` for `dist` or raise ImportError"""
    return get_distribution(dist).load_entry_point(group, name)

def get_entry_map(dist, group=None):
    """Return the entry point map for `group`, or the full entry map"""
    return get_distribution(dist).get_entry_map(group)

def get_entry_info(dist, group, name):
    """Return the EntryPoint object for `group`+`name`, or ``None``"""
    return get_distribution(dist).get_entry_info(group, name)


class IMetadataProvider:

    def has_metadata(name):
        """Does the package's distribution contain the named metadata?"""

    def get_metadata(name):
        """The named metadata resource as a string"""

    def get_metadata_lines(name):
        """Yield named metadata resource as list of non-blank non-comment lines

       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted."""

    def metadata_isdir(name):
        """Is the named metadata a directory?  (like ``os.path.isdir()``)"""

    def metadata_listdir(name):
        """List of metadata names in the directory (like ``os.listdir()``)"""

    def run_script(script_name, namespace):
        """Execute the named script in the supplied namespace dictionary"""


class IResourceProvider(IMetadataProvider):
    """An object that provides access to package resources"""

    def get_resource_filename(manager, resource_name):
        """Return a true filesystem path for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_stream(manager, resource_name):
        """Return a readable file-like object for `resource_name`

        `manager` must be an ``IResourceManager``"""

    def get_resource_string(manager, resource_name):
        """Return a string containing the contents of `resource_name`

        `manager` must be an ``IResourceManager``"""

    def has_resource(resource_name):
        """Does the package contain the named resource?"""

    def resource_isdir(resource_name):
        """Is the named resource a directory?  (like ``os.path.isdir()``)"""

    def resource_listdir(resource_name):
        """List of resource names in the directory (like ``os.listdir()``)"""


class WorkingSet(object):
    """A collection of active distributions on sys.path (or a similar list)"""

    def __init__(self, entries=None):
        """Create working set from list of path entries (default=sys.path)"""
        self.entries = []
        self.entry_keys = {}
        self.by_key = {}
        self.callbacks = []

        if entries is None:
            entries = sys.path

        for entry in entries:
            self.add_entry(entry)

    def add_entry(self, entry):
        """Add a path item to ``.entries``, finding any distributions on it

        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        """
        self.entry_keys.setdefault(entry, [])
        self.entries.append(entry)
        for dist in find_distributions(entry, True):
            self.add(dist, entry, False)

    def __contains__(self,dist):
        """True if `dist` is the active distribution for its project"""
        return self.by_key.get(dist.key) == dist

    def find(self, req):
        """Find a distribution matching requirement `req`

        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        """
        dist = self.by_key.get(req.key)
        if dist is not None and dist not in req:
            raise VersionConflict(dist,req)     # XXX add more info
        else:
            return dist

    def iter_entry_points(self, group, name=None):
        """Yield entry point objects from `group` matching `name`

        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        """
        for dist in self:
            entries = dist.get_entry_map(group)
            if name is None:
                for ep in entries.values():
                    yield ep
            elif name in entries:
                yield entries[name]

    def run_script(self, requires, script_name):
        """Locate distribution for `requires` and run `script_name` script"""
        ns = sys._getframe(1).f_globals
        name = ns['__name__']
        ns.clear()
        ns['__name__'] = name
        self.require(requires)[0].run_script(script_name, ns)

    def __iter__(self):
        """Yield distributions for non-duplicate projects in the working set

        The yield order is the order in which the items' path entries were
        added to the working set.
        """
        seen = {}
        for item in self.entries:
            if item not in self.entry_keys:
                # workaround a cache issue
                continue

            for key in self.entry_keys[item]:
                if key not in seen:
                    seen[key]=1
                    yield self.by_key[key]

    def add(self, dist, entry=None, insert=True):
        """Add `dist` to working set, associated with `entry`

        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).

        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set.  If it's added, any
        callbacks registered with the ``subscribe()`` method will be called.
        """
        if insert:
            dist.insert_on(self.entries, entry)

        if entry is None:
            entry = dist.location
        keys = self.entry_keys.setdefault(entry,[])
        keys2 = self.entry_keys.setdefault(dist.location,[])
        if dist.key in self.by_key:
            return      # ignore hidden distros

        self.by_key[dist.key] = dist
        if dist.key not in keys:
            keys.append(dist.key)
        if dist.key not in keys2:
            keys2.append(dist.key)
        self._added_new(dist)

    def resolve(self, requirements, env=None, installer=None):
        """List all distributions needed to (recursively) meet `requirements`

        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
        """

        requirements = list(requirements)[::-1]  # set up the stack
        processed = {}  # set of processed requirements
        best = {}  # key -> dist
        to_activate = []

        while requirements:
            req = requirements.pop(0)   # process dependencies breadth-first
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None:
                    if env is None:
                        env = Environment(self.entries)
                    dist = best[req.key] = env.best_match(req, self, installer)
                    if dist is None:
                        #msg = ("The '%s' distribution was not found on this "
                        #       "system, and is required by this application.")
                        #raise DistributionNotFound(msg % req)

                        # unfortunately, zc.buildout uses a str(err)
                        # to get the name of the distribution here..
                        raise DistributionNotFound(req)
                to_activate.append(dist)
            if dist not in req:
                # Oops, the "best" so far conflicts with a dependency
                raise VersionConflict(dist,req) # XXX put more info here
            requirements.extend(dist.requires(req.extras)[::-1])
            processed[req] = True

        return to_activate    # return list of distros to activate

    def find_plugins(self, plugin_env, full_env=None, installer=None,
            fallback=True):
        """Find all activatable distributions in `plugin_env`

        Example usage::

            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            map(working_set.add, distributions)  # add plugins+libs to sys.path
            print 'Could not load', errors        # display errors

        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.

        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.

        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        """

        plugin_projects = list(plugin_env)
        plugin_projects.sort()  # scan project names in alphabetic order

        error_info = {}
        distributions = {}

        if full_env is None:
            env = Environment(self.entries)
            env += plugin_env
        else:
            env = full_env + plugin_env

        shadow_set = self.__class__([])
        list(map(shadow_set.add, self))   # put all our entries in shadow_set

        for project_name in plugin_projects:

            for dist in plugin_env[project_name]:

                req = [dist.as_requirement()]

                try:
                    resolvees = shadow_set.resolve(req, env, installer)

                except ResolutionError:
                    v = sys.exc_info()[1]
                    error_info[dist] = v    # save error info
                    if fallback:
                        continue    # try the next older version of project
                    else:
                        break       # give up on this project, keep going

                else:
                    list(map(shadow_set.add, resolvees))
                    distributions.update(dict.fromkeys(resolvees))

                    # success, no need to try any more versions of this project
                    break

        distributions = list(distributions)
        distributions.sort()

        return distributions, error_info

    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated

        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
        needed = self.resolve(parse_requirements(requirements))

        for dist in needed:
            self.add(dist)

        return needed

    def subscribe(self, callback):
        """Invoke `callback` for all distributions (including existing ones)"""
        if callback in self.callbacks:
            return
        self.callbacks.append(callback)
        for dist in self:
            callback(dist)

    def _added_new(self, dist):
        for callback in self.callbacks:
            callback(dist)

    def __getstate__(self):
        return (
            self.entries[:], self.entry_keys.copy(), self.by_key.copy(),
            self.callbacks[:]
        )

    def __setstate__(self, e_k_b_c):
        entries, keys, by_key, callbacks = e_k_b_c
        self.entries = entries[:]
        self.entry_keys = keys.copy()
        self.by_key = by_key.copy()
        self.callbacks = callbacks[:]


class Environment(object):
    """Searchable snapshot of distributions on a search path"""

    def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
        """Snapshot distributions available on a search path

        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.

        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.3'``);
        it defaults to the current version.

        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        """
        self._distmap = {}
        self._cache = {}
        self.platform = platform
        self.python = python
        self.scan(search_path)

    def can_add(self, dist):
        """Is distribution `dist` acceptable for this environment?

        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        """
        return (self.python is None or dist.py_version is None
            or dist.py_version==self.python) \
            and compatible_platforms(dist.platform,self.platform)

    def remove(self, dist):
        """Remove `dist` from the environment"""
        self._distmap[dist.key].remove(dist)

    def scan(self, search_path=None):
        """Scan `search_path` for distributions usable in this environment

        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        """
        if search_path is None:
            search_path = sys.path

        for item in search_path:
            for dist in find_distributions(item):
                self.add(dist)

    def __getitem__(self,project_name):
        """Return a newest-to-oldest list of distributions for `project_name`
        """
        try:
            return self._cache[project_name]
        except KeyError:
            project_name = project_name.lower()
            if project_name not in self._distmap:
                return []

        if project_name not in self._cache:
            dists = self._cache[project_name] = self._distmap[project_name]
            _sort_dists(dists)

        return self._cache[project_name]

    def add(self,dist):
        """Add `dist` if we ``can_add()`` it and it isn't already added"""
        if self.can_add(dist) and dist.has_version():
            dists = self._distmap.setdefault(dist.key,[])
            if dist not in dists:
                dists.append(dist)
                if dist.key in self._cache:
                    _sort_dists(self._cache[dist.key])

    def best_match(self, req, working_set, installer=None):
        """Find distribution best matching `req` and usable on `working_set`

        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        """
        dist = working_set.find(req)
        if dist is not None:
            return dist
        for dist in self[req.key]:
            if dist in req:
                return dist
        return self.obtain(req, installer) # try and download/install

    def obtain(self, requirement, installer=None):
        """Obtain a distribution matching `requirement` (e.g. via download)

        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument."""
        if installer is not None:
            return installer(requirement)

    def __iter__(self):
        """Yield the unique project names of the available distributions"""
        for key in self._distmap.keys():
            if self[key]: yield key

    def __iadd__(self, other):
        """In-place addition of a distribution or environment"""
        if isinstance(other,Distribution):
            self.add(other)
        elif isinstance(other,Environment):
            for project in other:
                for dist in other[project]:
                    self.add(dist)
        else:
            raise TypeError("Can't add %r to environment" % (other,))
        return self

    def __add__(self, other):
        """Add an environment or distribution to an environment"""
        new = self.__class__([], platform=None, python=None)
        for env in self, other:
            new += env
        return new


AvailableDistributions = Environment    # XXX backward compatibility


class ExtractionError(RuntimeError):
    """An error occurred extracting a resource

    The following attributes are available from instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail
    """


class ResourceManager:
    """Manage resource extraction and packages"""
    extraction_path = None

    def __init__(self):
        self.cached_files = {}

    def resource_exists(self, package_or_requirement, resource_name):
        """Does the named resource exist?"""
        return get_provider(package_or_requirement).has_resource(resource_name)

    def resource_isdir(self, package_or_requirement, resource_name):
        """Is the named resource an existing directory?"""
        return get_provider(package_or_requirement).resource_isdir(
            resource_name
        )

    def resource_filename(self, package_or_requirement, resource_name):
        """Return a true filesystem path for specified resource"""
        return get_provider(package_or_requirement).get_resource_filename(
            self, resource_name
        )

    def resource_stream(self, package_or_requirement, resource_name):
        """Return a readable file-like object for specified resource"""
        return get_provider(package_or_requirement).get_resource_stream(
            self, resource_name
        )

    def resource_string(self, package_or_requirement, resource_name):
        """Return specified resource as a string"""
        return get_provider(package_or_requirement).get_resource_string(
            self, resource_name
        )

    def resource_listdir(self, package_or_requirement, resource_name):
        """List the contents of the named resource directory"""
        return get_provider(package_or_requirement).resource_listdir(
            resource_name
        )

    def extraction_error(self):
        """Give an error message for problems extracting file(s)"""

        old_exc = sys.exc_info()[1]
        cache_path = self.extraction_path or get_default_cache()

        err = ExtractionError("""Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  %s

The Python egg cache directory is currently set to:

  %s

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
""" % (old_exc, cache_path)
        )
        err.manager = self
        err.cache_path = cache_path
        err.original_error = old_exc
        raise err

    def get_cache_path(self, archive_name, names=()):
        """Return absolute location in cache for `archive_name` and `names`

        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.

        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        """
        extract_path = self.extraction_path or get_default_cache()
        target_path = os.path.join(extract_path, archive_name+'-tmp', *names)
        try:
            _bypass_ensure_directory(target_path)
        except:
            self.extraction_error()

        self._warn_unsafe_extraction_path(extract_path)

        self.cached_files[target_path] = 1
        return target_path

    @staticmethod
    def _warn_unsafe_extraction_path(path):
        """
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.

        See Distribute #375 for more details.
        """
        if os.name == 'nt' and not path.startswith(os.environ['windir']):
            # On Windows, permissions are generally restrictive by default
            #  and temp directories are not writable by other users, so
            #  bypass the warning.
            return
        mode = os.stat(path).st_mode
        if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
            msg = ("%s is writable by group/others and vulnerable to attack "
                "when "
                "used with get_resource_filename. Consider a more secure "
                "location (set with .set_extraction_path or the "
                "PYTHON_EGG_CACHE environment variable)." % path)
            warnings.warn(msg, UserWarning)

    def postprocess(self, tempname, filename):
        """Perform any platform-specific postprocessing of `tempname`

        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.

        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.

        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        """

        if os.name == 'posix':
            # Make the resource executable
            mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777
            os.chmod(tempname, mode)

    def set_extraction_path(self, path):
        """Set the base path where resources will be extracted to, if needed.

        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)

        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.

        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        """
        if self.cached_files:
            raise ValueError(
                "Can't change extraction path, files already extracted"
            )

        self.extraction_path = path

    def cleanup_resources(self, force=False):
        """
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        """
        # XXX

def get_default_cache():
    """Determine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    """
    try:
        return os.environ['PYTHON_EGG_CACHE']
    except KeyError:
        pass

    if os.name!='nt':
        return os.path.expanduser('~/.python-eggs')

    app_data = 'Application Data'   # XXX this may be locale-specific!
    app_homes = [
        (('APPDATA',), None),       # best option, should be locale-safe
        (('USERPROFILE',), app_data),
        (('HOMEDRIVE','HOMEPATH'), app_data),
        (('HOMEPATH',), app_data),
        (('HOME',), None),
        (('WINDIR',), app_data),    # 95/98/ME
    ]

    for keys, subdir in app_homes:
        dirname = ''
        for key in keys:
            if key in os.environ:
                dirname = os.path.join(dirname, os.environ[key])
            else:
                break
        else:
            if subdir:
                dirname = os.path.join(dirname,subdir)
            return os.path.join(dirname, 'Python-Eggs')
    else:
        raise RuntimeError(
            "Please set the PYTHON_EGG_CACHE enviroment variable"
        )

def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    """
    version = version.replace(' ','.')
    return re.sub('[^A-Za-z0-9.]+', '-', version)


def safe_extra(extra):
    """Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    """
    return re.sub('[^A-Za-z0-9.]+', '_', extra).lower()


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-','_')

_marker_names = {
    'os': ['name'], 'sys': ['platform'],
    'platform': ['version','machine','python_implementation'],
    'python_version': [], 'python_full_version': [], 'extra':[],
}

_marker_values = {
    'os_name': lambda: os.name,
    'sys_platform': lambda: sys.platform,
    'python_full_version': lambda: sys.version.split()[0],
    'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]),
    'platform_version': lambda: _platinfo('version'),
    'platform_machine': lambda: _platinfo('machine'),
    'python_implementation': lambda: _platinfo('python_implementation') or _pyimp(),
}

def _platinfo(attr):
    try:
        import platform
    except ImportError:
        return ''
    return getattr(platform, attr, lambda:'')()

def _pyimp():
    if sys.platform=='cli':
        return 'IronPython'
    elif sys.platform.startswith('java'):
        return 'Jython'
    elif '__pypy__' in sys.builtin_module_names:
        return 'PyPy'
    else:
        return 'CPython'

def normalize_exception(exc):
    """
    Given a SyntaxError from a marker evaluation, normalize the error message:
     - Remove indications of filename and line number.
     - Replace platform-specific error messages with standard error messages.
    """
    subs = {
        'unexpected EOF while parsing': 'invalid syntax',
        'parenthesis is never closed': 'invalid syntax',
    }
    exc.filename = None
    exc.lineno = None
    exc.msg = subs.get(exc.msg, exc.msg)
    return exc


def invalid_marker(text):
    """Validate text as a PEP 426 environment marker; return exception or False"""
    try:
        evaluate_marker(text)
    except SyntaxError:
        return normalize_exception(sys.exc_info()[1])
    return False

def evaluate_marker(text, extra=None, _ops={}):
    """
    Evaluate a PEP 426 environment marker on CPython 2.4+.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.

    This implementation uses the 'parser' module, which is not implemented on
    Jython and has been superseded by the 'ast' module in Python 2.6 and
    later.
    """

    if not _ops:

        from token import NAME, STRING
        import token
        import symbol
        import operator

        def and_test(nodelist):
            # MUST NOT short-circuit evaluation, or invalid syntax can be skipped!
            return functools.reduce(operator.and_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)])

        def test(nodelist):
            # MUST NOT short-circuit evaluation, or invalid syntax can be skipped!
            return functools.reduce(operator.or_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)])

        def atom(nodelist):
            t = nodelist[1][0]
            if t == token.LPAR:
                if nodelist[2][0] == token.RPAR:
                    raise SyntaxError("Empty parentheses")
                return interpret(nodelist[2])
            raise SyntaxError("Language feature not supported in environment markers")

        def comparison(nodelist):
            if len(nodelist)>4:
                raise SyntaxError("Chained comparison not allowed in environment markers")
            comp = nodelist[2][1]
            cop = comp[1]
            if comp[0] == NAME:
                if len(nodelist[2]) == 3:
                    if cop == 'not':
                        cop = 'not in'
                    else:
                        cop = 'is not'
            try:
                cop = _ops[cop]
            except KeyError:
                raise SyntaxError(repr(cop)+" operator not allowed in environment markers")
            return cop(evaluate(nodelist[1]), evaluate(nodelist[3]))

        _ops.update({
            symbol.test: test, symbol.and_test: and_test, symbol.atom: atom,
            symbol.comparison: comparison, 'not in': lambda x,y: x not in y,
            'in': lambda x,y: x in y, '==': operator.eq, '!=': operator.ne,
        })
        if hasattr(symbol,'or_test'):
            _ops[symbol.or_test] = test

    def interpret(nodelist):
        while len(nodelist)==2: nodelist = nodelist[1]
        try:
            op = _ops[nodelist[0]]
        except KeyError:
            raise SyntaxError("Comparison or logical expression expected")
            raise SyntaxError("Language feature not supported in environment markers: "+symbol.sym_name[nodelist[0]])
        return op(nodelist)

    def evaluate(nodelist):
        while len(nodelist)==2: nodelist = nodelist[1]
        kind = nodelist[0]
        name = nodelist[1]
        #while len(name)==2: name = name[1]
        if kind==NAME:
            try:
                op = _marker_values[name]
            except KeyError:
                raise SyntaxError("Unknown name %r" % name)
            return op()
        if kind==STRING:
            s = nodelist[1]
            if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \
                    or '\\' in s:
                raise SyntaxError(
                    "Only plain strings allowed in environment markers")
            return s[1:-1]
        raise SyntaxError("Language feature not supported in environment markers")

    return interpret(parser.expr(text).totuple(1)[1])

def _markerlib_evaluate(text):
    """
    Evaluate a PEP 426 environment marker using markerlib.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.
    """
    import _markerlib
    # markerlib implements Metadata 1.2 (PEP 345) environment markers.
    # Translate the variables to Metadata 2.0 (PEP 426).
    env = _markerlib.default_environment()
    for key in env.keys():
        new_key = key.replace('.', '_')
        env[new_key] = env.pop(key)
    try:
        result = _markerlib.interpret(text, env)
    except NameError:
        e = sys.exc_info()[1]
        raise SyntaxError(e.args[0])
    return result

if 'parser' not in globals():
    # fallback to less-complete _markerlib implementation if 'parser' module
    #  is not available.
    evaluate_marker = _markerlib_evaluate

class NullProvider:
    """Try to implement resources and metadata for arbitrary PEP 302 loaders"""

    egg_name = None
    egg_info = None
    loader = None

    def __init__(self, module):
        self.loader = getattr(module, '__loader__', None)
        self.module_path = os.path.dirname(getattr(module, '__file__', ''))

    def get_resource_filename(self, manager, resource_name):
        return self._fn(self.module_path, resource_name)

    def get_resource_stream(self, manager, resource_name):
        return BytesIO(self.get_resource_string(manager, resource_name))

    def get_resource_string(self, manager, resource_name):
        return self._get(self._fn(self.module_path, resource_name))

    def has_resource(self, resource_name):
        return self._has(self._fn(self.module_path, resource_name))

    def has_metadata(self, name):
        return self.egg_info and self._has(self._fn(self.egg_info,name))

    if sys.version_info <= (3,):
        def get_metadata(self, name):
            if not self.egg_info:
                return ""
            return self._get(self._fn(self.egg_info,name))
    else:
        def get_metadata(self, name):
            if not self.egg_info:
                return ""
            return self._get(self._fn(self.egg_info,name)).decode("utf-8")

    def get_metadata_lines(self, name):
        return yield_lines(self.get_metadata(name))

    def resource_isdir(self,resource_name):
        return self._isdir(self._fn(self.module_path, resource_name))

    def metadata_isdir(self,name):
        return self.egg_info and self._isdir(self._fn(self.egg_info,name))

    def resource_listdir(self,resource_name):
        return self._listdir(self._fn(self.module_path,resource_name))

    def metadata_listdir(self,name):
        if self.egg_info:
            return self._listdir(self._fn(self.egg_info,name))
        return []

    def run_script(self,script_name,namespace):
        script = 'scripts/'+script_name
        if not self.has_metadata(script):
            raise ResolutionError("No script named %r" % script_name)
        script_text = self.get_metadata(script).replace('\r\n','\n')
        script_text = script_text.replace('\r','\n')
        script_filename = self._fn(self.egg_info,script)
        namespace['__file__'] = script_filename
        if os.path.exists(script_filename):
            execfile(script_filename, namespace, namespace)
        else:
            from linecache import cache
            cache[script_filename] = (
                len(script_text), 0, script_text.split('\n'), script_filename
            )
            script_code = compile(script_text,script_filename,'exec')
            exec(script_code, namespace, namespace)

    def _has(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _isdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _listdir(self, path):
        raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )

    def _fn(self, base, resource_name):
        if resource_name:
            return os.path.join(base, *resource_name.split('/'))
        return base

    def _get(self, path):
        if hasattr(self.loader, 'get_data'):
            return self.loader.get_data(path)
        raise NotImplementedError(
            "Can't perform this operation for loaders without 'get_data()'"
        )

register_loader_type(object, NullProvider)


class EggProvider(NullProvider):
    """Provider based on a virtual filesystem"""

    def __init__(self,module):
        NullProvider.__init__(self,module)
        self._setup_prefix()

    def _setup_prefix(self):
        # we assume here that our metadata may be nested inside a "basket"
        # of multiple eggs; that's why we use module_path instead of .archive
        path = self.module_path
        old = None
        while path!=old:
            if path.lower().endswith('.egg'):
                self.egg_name = os.path.basename(path)
                self.egg_info = os.path.join(path, 'EGG-INFO')
                self.egg_root = path
                break
            old = path
            path, base = os.path.split(path)

class DefaultProvider(EggProvider):
    """Provides access to package resources in the filesystem"""

    def _has(self, path):
        return os.path.exists(path)

    def _isdir(self,path):
        return os.path.isdir(path)

    def _listdir(self,path):
        return os.listdir(path)

    def get_resource_stream(self, manager, resource_name):
        return open(self._fn(self.module_path, resource_name), 'rb')

    def _get(self, path):
        stream = open(path, 'rb')
        try:
            return stream.read()
        finally:
            stream.close()

register_loader_type(type(None), DefaultProvider)

if importlib_bootstrap is not None:
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)


class EmptyProvider(NullProvider):
    """Provider that returns nothing for all requests"""

    _isdir = _has = lambda self,path: False
    _get = lambda self,path: ''
    _listdir = lambda self,path: []
    module_path = None

    def __init__(self):
        pass

empty_provider = EmptyProvider()


def build_zipmanifest(path):
    """
    This builds a similar dictionary to the zipimport directory
    caches.  However instead of tuples, ZipInfo objects are stored.

    The translation of the tuple is as follows:
      * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep
              on pypy it is the same (one reason why distribute did work
              in some cases on pypy and win32).
      * [1] - zipinfo.compress_type
      * [2] - zipinfo.compress_size
      * [3] - zipinfo.file_size
      * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
              len(ascii encoding of filename) otherwise
      * [5] - (zipinfo.date_time[0] - 1980) << 9 |
               zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
      * [6] - (zipinfo.date_time[3] - 1980) << 11 |
               zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
      * [7] - zipinfo.CRC
    """
    zipinfo = dict()
    zfile = zipfile.ZipFile(path)
    #Got ZipFile has not __exit__ on python 3.1
    try:
        for zitem in zfile.namelist():
            zpath = zitem.replace('/', os.sep)
            zipinfo[zpath] = zfile.getinfo(zitem)
            assert zipinfo[zpath] is not None
    finally:
        zfile.close()
    return zipinfo


class ZipProvider(EggProvider):
    """Resource support for zips and eggs"""

    eagers = None

    def __init__(self, module):
        EggProvider.__init__(self,module)
        self.zipinfo = build_zipmanifest(self.loader.archive)
        self.zip_pre = self.loader.archive+os.sep

    def _zipinfo_name(self, fspath):
        # Convert a virtual filename (full path to file) into a zipfile subpath
        # usable with the zipimport directory cache for our target archive
        if fspath.startswith(self.zip_pre):
            return fspath[len(self.zip_pre):]
        raise AssertionError(
            "%s is not a subpath of %s" % (fspath,self.zip_pre)
        )

    def _parts(self,zip_path):
        # Convert a zipfile subpath into an egg-relative path part list
        fspath = self.zip_pre+zip_path  # pseudo-fs path
        if fspath.startswith(self.egg_root+os.sep):
            return fspath[len(self.egg_root)+1:].split(os.sep)
        raise AssertionError(
            "%s is not a subpath of %s" % (fspath,self.egg_root)
        )

    def get_resource_filename(self, manager, resource_name):
        if not self.egg_name:
            raise NotImplementedError(
                "resource_filename() only supported for .egg, not .zip"
            )
        # no need to lock for extraction, since we use temp names
        zip_path = self._resource_to_zip(resource_name)
        eagers = self._get_eager_resources()
        if '/'.join(self._parts(zip_path)) in eagers:
            for name in eagers:
                self._extract_resource(manager, self._eager_to_zip(name))
        return self._extract_resource(manager, zip_path)

    @staticmethod
    def _get_date_and_size(zip_stat):
        size = zip_stat.file_size
        date_time = zip_stat.date_time + (0, 0, -1)  # ymdhms+wday, yday, dst
        #1980 offset already done
        timestamp = time.mktime(date_time)
        return timestamp, size

    def _extract_resource(self, manager, zip_path):

        if zip_path in self._index():
            for name in self._index()[zip_path]:
                last = self._extract_resource(
                    manager, os.path.join(zip_path, name)
                )
            return os.path.dirname(last)  # return the extracted directory name

        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])

        if not WRITE_SUPPORT:
            raise IOError('"os.rename" and "os.unlink" are not supported '
                          'on this platform')
        try:

            real_path = manager.get_cache_path(
                self.egg_name, self._parts(zip_path)
            )

            if self._is_current(real_path, zip_path):
                return real_path

            outf, tmpnam = _mkstemp(".$extract", dir=os.path.dirname(real_path))
            os.write(outf, self.loader.get_data(zip_path))
            os.close(outf)
            utime(tmpnam, (timestamp,timestamp))
            manager.postprocess(tmpnam, real_path)

            try:
                rename(tmpnam, real_path)

            except os.error:
                if os.path.isfile(real_path):
                    if self._is_current(real_path, zip_path):
                        # the file became current since it was checked above,
                        #  so proceed.
                        return real_path
                    elif os.name=='nt':     # Windows, del old file and retry
                        unlink(real_path)
                        rename(tmpnam, real_path)
                        return real_path
                raise

        except os.error:
            manager.extraction_error()  # report a user-friendly error

        return real_path

    def _is_current(self, file_path, zip_path):
        """
        Return True if the file_path is current for this zip_path
        """
        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
        if not os.path.isfile(file_path):
            return False
        stat = os.stat(file_path)
        if stat.st_size!=size or stat.st_mtime!=timestamp:
            return False
        # check that the contents match
        zip_contents = self.loader.get_data(zip_path)
        f = open(file_path, 'rb')
        file_contents = f.read()
        f.close()
        return zip_contents == file_contents

    def _get_eager_resources(self):
        if self.eagers is None:
            eagers = []
            for name in ('native_libs.txt', 'eager_resources.txt'):
                if self.has_metadata(name):
                    eagers.extend(self.get_metadata_lines(name))
            self.eagers = eagers
        return self.eagers

    def _index(self):
        try:
            return self._dirindex
        except AttributeError:
            ind = {}
            for path in self.zipinfo:
                parts = path.split(os.sep)
                while parts:
                    parent = os.sep.join(parts[:-1])
                    if parent in ind:
                        ind[parent].append(parts[-1])
                        break
                    else:
                        ind[parent] = [parts.pop()]
            self._dirindex = ind
            return ind

    def _has(self, fspath):
        zip_path = self._zipinfo_name(fspath)
        return zip_path in self.zipinfo or zip_path in self._index()

    def _isdir(self,fspath):
        return self._zipinfo_name(fspath) in self._index()

    def _listdir(self,fspath):
        return list(self._index().get(self._zipinfo_name(fspath), ()))

    def _eager_to_zip(self,resource_name):
        return self._zipinfo_name(self._fn(self.egg_root,resource_name))

    def _resource_to_zip(self,resource_name):
        return self._zipinfo_name(self._fn(self.module_path,resource_name))

register_loader_type(zipimport.zipimporter, ZipProvider)


class FileMetadata(EmptyProvider):
    """Metadata handler for standalone PKG-INFO files

    Usage::

        metadata = FileMetadata("/path/to/PKG-INFO")

    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    """

    def __init__(self,path):
        self.path = path

    def has_metadata(self,name):
        return name=='PKG-INFO'

    def get_metadata(self,name):
        if name=='PKG-INFO':
            f = open(self.path,'rU')
            metadata = f.read()
            f.close()
            return metadata
        raise KeyError("No metadata except PKG-INFO is available")

    def get_metadata_lines(self,name):
        return yield_lines(self.get_metadata(name))


class PathMetadata(DefaultProvider):
    """Metadata provider for egg directories

    Usage::

        # Development eggs:

        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir,project_name=dist_name,metadata=metadata)

        # Unpacked egg directories:

        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    """

    def __init__(self, path, egg_info):
        self.module_path = path
        self.egg_info = egg_info


class EggMetadata(ZipProvider):
    """Metadata provider for .egg files"""

    def __init__(self, importer):
        """Create a metadata provider from a zipimporter"""

        self.zipinfo = build_zipmanifest(importer.archive)
        self.zip_pre = importer.archive+os.sep
        self.loader = importer
        if importer.prefix:
            self.module_path = os.path.join(importer.archive, importer.prefix)
        else:
            self.module_path = importer.archive
        self._setup_prefix()

_declare_state('dict', _distribution_finders = {})

def register_finder(importer_type, distribution_finder):
    """Register `distribution_finder` to find distributions in sys.path items

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example."""
    _distribution_finders[importer_type] = distribution_finder


def find_distributions(path_item, only=False):
    """Yield distributions accessible via `path_item`"""
    importer = get_importer(path_item)
    finder = _find_adapter(_distribution_finders, importer)
    return finder(importer, path_item, only)

def find_in_zip(importer, path_item, only=False):
    metadata = EggMetadata(importer)
    if metadata.has_metadata('PKG-INFO'):
        yield Distribution.from_filename(path_item, metadata=metadata)
    if only:
        return  # don't yield nested distros
    for subitem in metadata.resource_listdir('/'):
        if subitem.endswith('.egg'):
            subpath = os.path.join(path_item, subitem)
            for dist in find_in_zip(zipimport.zipimporter(subpath), subpath):
                yield dist

register_finder(zipimport.zipimporter, find_in_zip)

def find_nothing(importer, path_item, only=False):
    return ()
register_finder(object,find_nothing)

def find_on_path(importer, path_item, only=False):
    """Yield distributions accessible on a sys.path directory"""
    path_item = _normalize_cached(path_item)

    if os.path.isdir(path_item) and os.access(path_item, os.R_OK):
        if path_item.lower().endswith('.egg'):
            # unpacked egg
            yield Distribution.from_filename(
                path_item, metadata=PathMetadata(
                    path_item, os.path.join(path_item,'EGG-INFO')
                )
            )
        else:
            # scan for .egg and .egg-info in directory
            for entry in os.listdir(path_item):
                lower = entry.lower()
                if lower.endswith('.egg-info') or lower.endswith('.dist-info'):
                    fullpath = os.path.join(path_item, entry)
                    if os.path.isdir(fullpath):
                        # egg-info directory, allow getting metadata
                        metadata = PathMetadata(path_item, fullpath)
                    else:
                        metadata = FileMetadata(fullpath)
                    yield Distribution.from_location(
                        path_item,entry,metadata,precedence=DEVELOP_DIST
                    )
                elif not only and lower.endswith('.egg'):
                    for dist in find_distributions(os.path.join(path_item, entry)):
                        yield dist
                elif not only and lower.endswith('.egg-link'):
                    entry_file = open(os.path.join(path_item, entry))
                    try:
                        entry_lines = entry_file.readlines()
                    finally:
                        entry_file.close()
                    for line in entry_lines:
                        if not line.strip(): continue
                        for item in find_distributions(os.path.join(path_item,line.rstrip())):
                            yield item
                        break
register_finder(pkgutil.ImpImporter,find_on_path)

if importlib_bootstrap is not None:
    register_finder(importlib_bootstrap.FileFinder, find_on_path)

_declare_state('dict', _namespace_handlers={})
_declare_state('dict', _namespace_packages={})


def register_namespace_handler(importer_type, namespace_handler):
    """Register `namespace_handler` to declare namespace packages

    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::

        def namespace_handler(importer,path_entry,moduleName,module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    """
    _namespace_handlers[importer_type] = namespace_handler

def _handle_ns(packageName, path_item):
    """Ensure that named package includes a subpath of path_item (if needed)"""
    importer = get_importer(path_item)
    if importer is None:
        return None
    loader = importer.find_module(packageName)
    if loader is None:
        return None
    module = sys.modules.get(packageName)
    if module is None:
        module = sys.modules[packageName] = imp.new_module(packageName)
        module.__path__ = []
        _set_parent_ns(packageName)
    elif not hasattr(module,'__path__'):
        raise TypeError("Not a package:", packageName)
    handler = _find_adapter(_namespace_handlers, importer)
    subpath = handler(importer,path_item,packageName,module)
    if subpath is not None:
        path = module.__path__
        path.append(subpath)
        loader.load_module(packageName)
        module.__path__ = path
    return subpath

def declare_namespace(packageName):
    """Declare that package 'packageName' is a namespace package"""

    imp.acquire_lock()
    try:
        if packageName in _namespace_packages:
            return

        path, parent = sys.path, None
        if '.' in packageName:
            parent = '.'.join(packageName.split('.')[:-1])
            declare_namespace(parent)
            if parent not in _namespace_packages:
                __import__(parent)
            try:
                path = sys.modules[parent].__path__
            except AttributeError:
                raise TypeError("Not a package:", parent)

        # Track what packages are namespaces, so when new path items are added,
        # they can be updated
        _namespace_packages.setdefault(parent,[]).append(packageName)
        _namespace_packages.setdefault(packageName,[])

        for path_item in path:
            # Ensure all the parent's path items are reflected in the child,
            # if they apply
            _handle_ns(packageName, path_item)

    finally:
        imp.release_lock()

def fixup_namespace_packages(path_item, parent=None):
    """Ensure that previously-declared namespace packages include path_item"""
    imp.acquire_lock()
    try:
        for package in _namespace_packages.get(parent,()):
            subpath = _handle_ns(package, path_item)
            if subpath: fixup_namespace_packages(subpath,package)
    finally:
        imp.release_lock()

def file_ns_handler(importer, path_item, packageName, module):
    """Compute an ns-package subpath for a filesystem or zipfile importer"""

    subpath = os.path.join(path_item, packageName.split('.')[-1])
    normalized = _normalize_cached(subpath)
    for item in module.__path__:
        if _normalize_cached(item)==normalized:
            break
    else:
        # Only return the path if it's not already there
        return subpath

register_namespace_handler(pkgutil.ImpImporter,file_ns_handler)
register_namespace_handler(zipimport.zipimporter,file_ns_handler)

if importlib_bootstrap is not None:
    register_namespace_handler(importlib_bootstrap.FileFinder, file_ns_handler)


def null_ns_handler(importer, path_item, packageName, module):
    return None

register_namespace_handler(object,null_ns_handler)


def normalize_path(filename):
    """Normalize a file/dir name for comparison purposes"""
    return os.path.normcase(os.path.realpath(filename))

def _normalize_cached(filename,_cache={}):
    try:
        return _cache[filename]
    except KeyError:
        _cache[filename] = result = normalize_path(filename)
        return result

def _set_parent_ns(packageName):
    parts = packageName.split('.')
    name = parts.pop()
    if parts:
        parent = '.'.join(parts)
        setattr(sys.modules[parent], name, sys.modules[packageName])


def yield_lines(strs):
    """Yield non-empty/non-comment lines of a ``basestring`` or sequence"""
    if isinstance(strs,basestring):
        for s in strs.splitlines():
            s = s.strip()
            if s and not s.startswith('#'):     # skip blank lines/comments
                yield s
    else:
        for ss in strs:
            for s in yield_lines(ss):
                yield s

LINE_END = re.compile(r"\s*(#.*)?$").match         # whitespace and comment
CONTINUE = re.compile(r"\s*\\\s*(#.*)?$").match    # line continuation
DISTRO = re.compile(r"\s*((\w|[-.])+)").match    # Distribution or extra
VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match  # ver. info
COMMA = re.compile(r"\s*,").match               # comma between items
OBRACKET = re.compile(r"\s*\[").match
CBRACKET = re.compile(r"\s*\]").match
MODULE = re.compile(r"\w+(\.\w+)*$").match
EGG_NAME = re.compile(
    r"(?P<name>[^-]+)"
    r"( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?",
    re.VERBOSE | re.IGNORECASE
).match

component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE)
replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'}.get

def _parse_version_parts(s):
    for part in component_re.split(s):
        part = replace(part,part)
        if not part or part=='.':
            continue
        if part[:1] in '0123456789':
            yield part.zfill(8)    # pad for numeric comparison
        else:
            yield '*'+part

    yield '*final'  # ensure that alpha/beta/candidate are before final

def parse_version(s):
    """Convert a version string to a chronologically-sortable key

    This is a rough cross between distutils' StrictVersion and LooseVersion;
    if you give it versions that would work with StrictVersion, then it behaves
    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    *possible* to create pathological version coding schemes that will fool
    this parser, but they should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    than any other pre-release tag.
    """
    parts = []
    for part in _parse_version_parts(s.lower()):
        if part.startswith('*'):
            if part<'*final':   # remove '-' before a prerelease tag
                while parts and parts[-1]=='*final-': parts.pop()
            # remove trailing zeros from each series of numeric parts
            while parts and parts[-1]=='00000000':
                parts.pop()
        parts.append(part)
    return tuple(parts)
class EntryPoint(object):
    """Object representing an advertised importable object"""

    def __init__(self, name, module_name, attrs=(), extras=(), dist=None):
        if not MODULE(module_name):
            raise ValueError("Invalid module name", module_name)
        self.name = name
        self.module_name = module_name
        self.attrs = tuple(attrs)
        self.extras = Requirement.parse(("x[%s]" % ','.join(extras))).extras
        self.dist = dist

    def __str__(self):
        s = "%s = %s" % (self.name, self.module_name)
        if self.attrs:
            s += ':' + '.'.join(self.attrs)
        if self.extras:
            s += ' [%s]' % ','.join(self.extras)
        return s

    def __repr__(self):
        return "EntryPoint.parse(%r)" % str(self)

    def load(self, require=True, env=None, installer=None):
        if require: self.require(env, installer)
        entry = __import__(self.module_name, globals(),globals(), ['__name__'])
        for attr in self.attrs:
            try:
                entry = getattr(entry,attr)
            except AttributeError:
                raise ImportError("%r has no %r attribute" % (entry,attr))
        return entry

    def require(self, env=None, installer=None):
        if self.extras and not self.dist:
            raise UnknownExtra("Can't require() without a distribution", self)
        list(map(working_set.add,
            working_set.resolve(self.dist.requires(self.extras),env,installer)))

    #@classmethod
    def parse(cls, src, dist=None):
        """Parse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        """
        try:
            attrs = extras = ()
            name,value = src.split('=',1)
            if '[' in value:
                value,extras = value.split('[',1)
                req = Requirement.parse("x["+extras)
                if req.specs: raise ValueError
                extras = req.extras
            if ':' in value:
                value,attrs = value.split(':',1)
                if not MODULE(attrs.rstrip()):
                    raise ValueError
                attrs = attrs.rstrip().split('.')
        except ValueError:
            raise ValueError(
                "EntryPoint must be in 'name=module:attrs [extras]' format",
                src
            )
        else:
            return cls(name.strip(), value.strip(), attrs, extras, dist)

    parse = classmethod(parse)

    #@classmethod
    def parse_group(cls, group, lines, dist=None):
        """Parse an entry point group"""
        if not MODULE(group):
            raise ValueError("Invalid group name", group)
        this = {}
        for line in yield_lines(lines):
            ep = cls.parse(line, dist)
            if ep.name in this:
                raise ValueError("Duplicate entry point", group, ep.name)
            this[ep.name]=ep
        return this

    parse_group = classmethod(parse_group)

    #@classmethod
    def parse_map(cls, data, dist=None):
        """Parse a map of entry point groups"""
        if isinstance(data,dict):
            data = data.items()
        else:
            data = split_sections(data)
        maps = {}
        for group, lines in data:
            if group is None:
                if not lines:
                    continue
                raise ValueError("Entry points must be listed in groups")
            group = group.strip()
            if group in maps:
                raise ValueError("Duplicate group name", group)
            maps[group] = cls.parse_group(group, lines, dist)
        return maps

    parse_map = classmethod(parse_map)


def _remove_md5_fragment(location):
    if not location:
        return ''
    parsed = urlparse(location)
    if parsed[-1].startswith('md5='):
        return urlunparse(parsed[:-1] + ('',))
    return location


class Distribution(object):
    """Wrap an actual or potential sys.path entry w/metadata"""
    PKG_INFO = 'PKG-INFO'

    def __init__(self, location=None, metadata=None, project_name=None,
            version=None, py_version=PY_MAJOR, platform=None,
            precedence=EGG_DIST):
        self.project_name = safe_name(project_name or 'Unknown')
        if version is not None:
            self._version = safe_version(version)
        self.py_version = py_version
        self.platform = platform
        self.location = location
        self.precedence = precedence
        self._provider = metadata or empty_provider

    #@classmethod
    def from_location(cls,location,basename,metadata=None,**kw):
        project_name, version, py_version, platform = [None]*4
        basename, ext = os.path.splitext(basename)
        if ext.lower() in _distributionImpl:
            # .dist-info gets much metadata differently
            match = EGG_NAME(basename)
            if match:
                project_name, version, py_version, platform = match.group(
                    'name','ver','pyver','plat'
                )
            cls = _distributionImpl[ext.lower()]
        return cls(
            location, metadata, project_name=project_name, version=version,
            py_version=py_version, platform=platform, **kw
        )
    from_location = classmethod(from_location)

    hashcmp = property(
        lambda self: (
            getattr(self,'parsed_version',()),
            self.precedence,
            self.key,
            _remove_md5_fragment(self.location),
            self.py_version,
            self.platform
        )
    )
    def __hash__(self): return hash(self.hashcmp)
    def __lt__(self, other):
        return self.hashcmp < other.hashcmp
    def __le__(self, other):
        return self.hashcmp <= other.hashcmp
    def __gt__(self, other):
        return self.hashcmp > other.hashcmp
    def __ge__(self, other):
        return self.hashcmp >= other.hashcmp
    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            # It's not a Distribution, so they are not equal
            return False
        return self.hashcmp == other.hashcmp
    def __ne__(self, other):
        return not self == other

    # These properties have to be lazy so that we don't have to load any
    # metadata until/unless it's actually needed.  (i.e., some distributions
    # may not know their name or version without loading PKG-INFO)

    #@property
    def key(self):
        try:
            return self._key
        except AttributeError:
            self._key = key = self.project_name.lower()
            return key
    key = property(key)

    #@property
    def parsed_version(self):
        try:
            return self._parsed_version
        except AttributeError:
            self._parsed_version = pv = parse_version(self.version)
            return pv

    parsed_version = property(parsed_version)

    #@property
    def version(self):
        try:
            return self._version
        except AttributeError:
            for line in self._get_metadata(self.PKG_INFO):
                if line.lower().startswith('version:'):
                    self._version = safe_version(line.split(':',1)[1].strip())
                    return self._version
            else:
                raise ValueError(
                    "Missing 'Version:' header and/or %s file" % self.PKG_INFO, self
                )
    version = property(version)

    #@property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            dm = self.__dep_map = {None: []}
            for name in 'requires.txt', 'depends.txt':
                for extra,reqs in split_sections(self._get_metadata(name)):
                    if extra:
                        if ':' in extra:
                            extra, marker = extra.split(':',1)
                            if invalid_marker(marker):
                                reqs=[] # XXX warn
                            elif not evaluate_marker(marker):
                                reqs=[]
                        extra = safe_extra(extra) or None
                    dm.setdefault(extra,[]).extend(parse_requirements(reqs))
            return dm
    _dep_map = property(_dep_map)

    def requires(self,extras=()):
        """List of Requirements needed for this distro if `extras` are used"""
        dm = self._dep_map
        deps = []
        deps.extend(dm.get(None,()))
        for ext in extras:
            try:
                deps.extend(dm[safe_extra(ext)])
            except KeyError:
                raise UnknownExtra(
                    "%s has no such extra feature %r" % (self, ext)
                )
        return deps

    def _get_metadata(self,name):
        if self.has_metadata(name):
            for line in self.get_metadata_lines(name):
                yield line

    def activate(self,path=None):
        """Ensure distribution is importable on `path` (default=sys.path)"""
        if path is None: path = sys.path
        self.insert_on(path)
        if path is sys.path:
            fixup_namespace_packages(self.location)
            list(map(declare_namespace, self._get_metadata('namespace_packages.txt')))

    def egg_name(self):
        """Return what this distribution's standard .egg filename should be"""
        filename = "%s-%s-py%s" % (
            to_filename(self.project_name), to_filename(self.version),
            self.py_version or PY_MAJOR
        )

        if self.platform:
            filename += '-'+self.platform
        return filename

    def __repr__(self):
        if self.location:
            return "%s (%s)" % (self,self.location)
        else:
            return str(self)

    def __str__(self):
        try: version = getattr(self,'version',None)
        except ValueError: version = None
        version = version or "[unknown version]"
        return "%s %s" % (self.project_name,version)

    def __getattr__(self,attr):
        """Delegate all unrecognized public attributes to .metadata provider"""
        if attr.startswith('_'):
            raise AttributeError(attr)
        return getattr(self._provider, attr)

    #@classmethod
    def from_filename(cls,filename,metadata=None, **kw):
        return cls.from_location(
            _normalize_cached(filename), os.path.basename(filename), metadata,
            **kw
        )
    from_filename = classmethod(from_filename)

    def as_requirement(self):
        """Return a ``Requirement`` that matches this distribution exactly"""
        return Requirement.parse('%s==%s' % (self.project_name, self.version))

    def load_entry_point(self, group, name):
        """Return the `name` entry point of `group` or raise ImportError"""
        ep = self.get_entry_info(group,name)
        if ep is None:
            raise ImportError("Entry point %r not found" % ((group,name),))
        return ep.load()

    def get_entry_map(self, group=None):
        """Return the entry point map for `group`, or the full entry map"""
        try:
            ep_map = self._ep_map
        except AttributeError:
            ep_map = self._ep_map = EntryPoint.parse_map(
                self._get_metadata('entry_points.txt'), self
            )
        if group is not None:
            return ep_map.get(group,{})
        return ep_map

    def get_entry_info(self, group, name):
        """Return the EntryPoint object for `group`+`name`, or ``None``"""
        return self.get_entry_map(group).get(name)

    def insert_on(self, path, loc = None):
        """Insert self.location in path before its nearest parent directory"""

        loc = loc or self.location
        if not loc:
            return

        nloc = _normalize_cached(loc)
        bdir = os.path.dirname(nloc)
        npath= [(p and _normalize_cached(p) or p) for p in path]

        for p, item in enumerate(npath):
            if item==nloc:
                break
            elif item==bdir and self.precedence==EGG_DIST:
                # if it's an .egg, give it precedence over its directory
                if path is sys.path:
                    self.check_version_conflict()
                path.insert(p, loc)
                npath.insert(p, nloc)
                break
        else:
            if path is sys.path:
                self.check_version_conflict()
            path.append(loc)
            return

        # p is the spot where we found or inserted loc; now remove duplicates
        while 1:
            try:
                np = npath.index(nloc, p+1)
            except ValueError:
                break
            else:
                del npath[np], path[np]
                p = np  # ha!

        return

    def check_version_conflict(self):
        if self.key=='setuptools':
            return      # ignore the inevitable setuptools self-conflicts  :(

        nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
        loc = normalize_path(self.location)
        for modname in self._get_metadata('top_level.txt'):
            if (modname not in sys.modules or modname in nsp
                    or modname in _namespace_packages):
                continue
            if modname in ('pkg_resources', 'setuptools', 'site'):
                continue
            fn = getattr(sys.modules[modname], '__file__', None)
            if fn and (normalize_path(fn).startswith(loc) or
                       fn.startswith(self.location)):
                continue
            issue_warning(
                "Module %s was already imported from %s, but %s is being added"
                " to sys.path" % (modname, fn, self.location),
            )

    def has_version(self):
        try:
            self.version
        except ValueError:
            issue_warning("Unbuilt egg for "+repr(self))
            return False
        return True

    def clone(self,**kw):
        """Copy this distribution, substituting in any changed keyword args"""
        for attr in (
            'project_name', 'version', 'py_version', 'platform', 'location',
            'precedence'
        ):
            kw.setdefault(attr, getattr(self,attr,None))
        kw.setdefault('metadata', self._provider)
        return self.__class__(**kw)

    #@property
    def extras(self):
        return [dep for dep in self._dep_map if dep]
    extras = property(extras)


class DistInfoDistribution(Distribution):
    """Wrap an actual or potential sys.path entry w/metadata, .dist-info style"""
    PKG_INFO = 'METADATA'
    EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])")

    @property
    def _parsed_pkg_info(self):
        """Parse and cache metadata"""
        try:
            return self._pkg_info
        except AttributeError:
            from email.parser import Parser
            self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO))
            return self._pkg_info

    @property
    def _dep_map(self):
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._compute_dependencies()
            return self.__dep_map

    def _preparse_requirement(self, requires_dist):
        """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz')
        Split environment marker, add == prefix to version specifiers as
        necessary, and remove parenthesis.
        """
        parts = requires_dist.split(';', 1) + ['']
        distvers = parts[0].strip()
        mark = parts[1].strip()
        distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers)
        distvers = distvers.replace('(', '').replace(')', '')
        return (distvers, mark)

    def _compute_dependencies(self):
        """Recompute this distribution's dependencies."""
        from _markerlib import compile as compile_marker
        dm = self.__dep_map = {None: []}

        reqs = []
        # Including any condition expressions
        for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
            distvers, mark = self._preparse_requirement(req)
            parsed = next(parse_requirements(distvers))
            parsed.marker_fn = compile_marker(mark)
            reqs.append(parsed)

        def reqs_for_extra(extra):
            for req in reqs:
                if req.marker_fn(override={'extra':extra}):
                    yield req

        common = frozenset(reqs_for_extra(None))
        dm[None].extend(common)

        for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
            extra = safe_extra(extra.strip())
            dm[extra] = list(frozenset(reqs_for_extra(extra)) - common)

        return dm


_distributionImpl = {
    '.egg': Distribution,
    '.egg-info': Distribution,
    '.dist-info': DistInfoDistribution,
    }


def issue_warning(*args,**kw):
    level = 1
    g = globals()
    try:
        # find the first stack frame that is *not* code in
        # the pkg_resources module, to use for the warning
        while sys._getframe(level).f_globals is g:
            level += 1
    except ValueError:
        pass
    from warnings import warn
    warn(stacklevel = level+1, *args, **kw)


def parse_requirements(strs):
    """Yield ``Requirement`` objects for each specification in `strs`

    `strs` must be an instance of ``basestring``, or a (possibly-nested)
    iterable thereof.
    """
    # create a steppable iterator, so we can handle \-continuations
    lines = iter(yield_lines(strs))

    def scan_list(ITEM,TERMINATOR,line,p,groups,item_name):

        items = []

        while not TERMINATOR(line,p):
            if CONTINUE(line,p):
                try:
                    line = next(lines)
                    p = 0
                except StopIteration:
                    raise ValueError(
                        "\\ must not appear on the last nonblank line"
                    )

            match = ITEM(line,p)
            if not match:
                raise ValueError("Expected "+item_name+" in",line,"at",line[p:])

            items.append(match.group(*groups))
            p = match.end()

            match = COMMA(line,p)
            if match:
                p = match.end() # skip the comma
            elif not TERMINATOR(line,p):
                raise ValueError(
                    "Expected ',' or end-of-list in",line,"at",line[p:]
                )

        match = TERMINATOR(line,p)
        if match: p = match.end()   # skip the terminator, if any
        return line, p, items

    for line in lines:
        match = DISTRO(line)
        if not match:
            raise ValueError("Missing distribution spec", line)
        project_name = match.group(1)
        p = match.end()
        extras = []

        match = OBRACKET(line,p)
        if match:
            p = match.end()
            line, p, extras = scan_list(
                DISTRO, CBRACKET, line, p, (1,), "'extra' name"
            )

        line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
        specs = [(op,safe_version(val)) for op,val in specs]
        yield Requirement(project_name, specs, extras)


def _sort_dists(dists):
    tmp = [(dist.hashcmp,dist) for dist in dists]
    tmp.sort()
    dists[::-1] = [d for hc,d in tmp]


class Requirement:
    def __init__(self, project_name, specs, extras):
        """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
        self.unsafe_name, project_name = project_name, safe_name(project_name)
        self.project_name, self.key = project_name, project_name.lower()
        index = [(parse_version(v),state_machine[op],op,v) for op,v in specs]
        index.sort()
        self.specs = [(op,ver) for parsed,trans,op,ver in index]
        self.index, self.extras = index, tuple(map(safe_extra,extras))
        self.hashCmp = (
            self.key, tuple([(op,parsed) for parsed,trans,op,ver in index]),
            frozenset(self.extras)
        )
        self.__hash = hash(self.hashCmp)

    def __str__(self):
        specs = ','.join([''.join(s) for s in self.specs])
        extras = ','.join(self.extras)
        if extras: extras = '[%s]' % extras
        return '%s%s%s' % (self.project_name, extras, specs)

    def __eq__(self,other):
        return isinstance(other,Requirement) and self.hashCmp==other.hashCmp

    def __contains__(self,item):
        if isinstance(item,Distribution):
            if item.key != self.key: return False
            if self.index: item = item.parsed_version  # only get if we need it
        elif isinstance(item,basestring):
            item = parse_version(item)
        last = None
        compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1
        for parsed,trans,op,ver in self.index:
            action = trans[compare(item,parsed)] # Indexing: 0, 1, -1
            if action=='F':
                return False
            elif action=='T':
                return True
            elif action=='+':
                last = True
            elif action=='-' or last is None:   last = False
        if last is None: last = True    # no rules encountered
        return last

    def __hash__(self):
        return self.__hash

    def __repr__(self): return "Requirement.parse(%r)" % str(self)

    #@staticmethod
    def parse(s):
        reqs = list(parse_requirements(s))
        if reqs:
            if len(reqs)==1:
                return reqs[0]
            raise ValueError("Expected only one requirement", s)
        raise ValueError("No requirements found", s)

    parse = staticmethod(parse)

state_machine = {
    #       =><
    '<': '--T',
    '<=': 'T-T',
    '>': 'F+F',
    '>=': 'T+F',
    '==': 'T..',
    '!=': 'F++',
}


def _get_mro(cls):
    """Get an mro for a type or classic class"""
    if not isinstance(cls,type):
        class cls(cls,object): pass
        return cls.__mro__[1:]
    return cls.__mro__

def _find_adapter(registry, ob):
    """Return an adapter factory for `ob` from `registry`"""
    for t in _get_mro(getattr(ob, '__class__', type(ob))):
        if t in registry:
            return registry[t]


def ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    if not os.path.isdir(dirname):
        os.makedirs(dirname)

def split_sections(s):
    """Split a string or iterable thereof into (section,content) pairs

    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    """
    section = None
    content = []
    for line in yield_lines(s):
        if line.startswith("["):
            if line.endswith("]"):
                if section or content:
                    yield section, content
                section = line[1:-1].strip()
                content = []
            else:
                raise ValueError("Invalid section heading", line)
        else:
            content.append(line)

    # wrap up last segment
    yield section, content

def _mkstemp(*args,**kw):
    from tempfile import mkstemp
    old_open = os.open
    try:
        os.open = os_open   # temporarily bypass sandboxing
        return mkstemp(*args,**kw)
    finally:
        os.open = old_open  # and then put it back


# Set up global resource manager (deliberately not state-saved)
_manager = ResourceManager()
def _initialize(g):
    for name in dir(_manager):
        if not name.startswith('_'):
            g[name] = getattr(_manager, name)
_initialize(globals())

# Prepare the master working set and make the ``require()`` API available
_declare_state('object', working_set = WorkingSet())
try:
    # Does the main program list any requirements?
    from __main__ import __requires__
except ImportError:
    pass # No: just use the default working set based on sys.path
else:
    # Yes: ensure the requirements are met, by prefixing sys.path if necessary
    try:
        working_set.require(__requires__)
    except VersionConflict:     # try it without defaults already on sys.path
        working_set = WorkingSet([])    # by starting with an empty path
        for dist in working_set.resolve(
            parse_requirements(__requires__), Environment()
        ):
            working_set.add(dist)
        for entry in sys.path:  # add any missing entries from sys.path
            if entry not in working_set.entries:
                working_set.add_entry(entry)
        sys.path[:] = working_set.entries   # then copy back to sys.path

require = working_set.require
iter_entry_points = working_set.iter_entry_points
add_activation_listener = working_set.subscribe
run_script = working_set.run_script
run_main = run_script   # backward compatibility
# Activate all distributions already on sys.path, and ensure that
# all distributions added to the working set in the future (e.g. by
# calling ``require()``) will get activated as well.
add_activation_listener(lambda dist: dist.activate())
working_set.entries=[]
list(map(working_set.add_entry,sys.path)) # match order